@antseed/ants 0.1.34 → 0.1.36
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/ants-web/assets/{add-DlbQgs3_.js → add-D4zQoEIK.js} +1 -1
- package/dist/ants-web/assets/{all-wallets-BK2qS6NL.js → all-wallets-CSXQnxSz.js} +1 -1
- package/dist/ants-web/assets/{app-store-N3CL6qWP.js → app-store-C7MfAk8S.js} +1 -1
- package/dist/ants-web/assets/{apple-DozSeUy8.js → apple-4Yf6Gk8i.js} +1 -1
- package/dist/ants-web/assets/{arrow-bottom-DwET6Nv7.js → arrow-bottom-ChiE880W.js} +1 -1
- package/dist/ants-web/assets/{arrow-bottom-circle-DK1zW295.js → arrow-bottom-circle-C9qoLWeh.js} +1 -1
- package/dist/ants-web/assets/{arrow-left-BrAknJU2.js → arrow-left-D0oqJTeZ.js} +1 -1
- package/dist/ants-web/assets/{arrow-right-CI9Oks3m.js → arrow-right-CVfE56Yg.js} +1 -1
- package/dist/ants-web/assets/{arrow-top-CcmUiwgZ.js → arrow-top-NrpyjFQp.js} +1 -1
- package/dist/ants-web/assets/{bank-Dfb62TSH.js → bank-D8ctKFFZ.js} +1 -1
- package/dist/ants-web/assets/{basic-CjAUtuVn.js → basic-BexMAQoe.js} +1 -1
- package/dist/ants-web/assets/{browser-Dj7Z1kBD.js → browser-bKXfiS_2.js} +1 -1
- package/dist/ants-web/assets/{card-DCTb5zNI.js → card-CRWJ1CWL.js} +1 -1
- package/dist/ants-web/assets/{ccip--1B43jeF.js → ccip-Dul-v0dr.js} +1 -1
- package/dist/ants-web/assets/{checkmark-CZwJ78Lx.js → checkmark-CyO---D6.js} +1 -1
- package/dist/ants-web/assets/{checkmark-bold-BC28Cexr.js → checkmark-bold-zaYJJgag.js} +1 -1
- package/dist/ants-web/assets/{chevron-bottom-BtCslGbi.js → chevron-bottom-BpS8IJB4.js} +1 -1
- package/dist/ants-web/assets/{chevron-left-D3uVxABE.js → chevron-left-BHzMrOkP.js} +1 -1
- package/dist/ants-web/assets/{chevron-right-DkE5Kegl.js → chevron-right-CAEaDmF1.js} +1 -1
- package/dist/ants-web/assets/{chevron-top-C5KoeLUh.js → chevron-top-CwMOuusa.js} +1 -1
- package/dist/ants-web/assets/{chrome-store-Dxfm2ORa.js → chrome-store-DyVTKcJ5.js} +1 -1
- package/dist/ants-web/assets/{clock-BzaPMjig.js → clock-CHnyFLN6.js} +1 -1
- package/dist/ants-web/assets/{close-BKLILSp5.js → close-BlUhU60k.js} +1 -1
- package/dist/ants-web/assets/{coinPlaceholder-DHGFpIzc.js → coinPlaceholder-Bi4hRH6y.js} +1 -1
- package/dist/ants-web/assets/{compass-CIOOMxuB.js → compass-DMPX9tIS.js} +1 -1
- package/dist/ants-web/assets/{copy-BRT-Qo9E.js → copy-hhvB5n14.js} +1 -1
- package/dist/ants-web/assets/{core-dFkoIyPJ.js → core-BfoAFkY8.js} +3 -3
- package/dist/ants-web/assets/{cursor-CovooXXI.js → cursor-BZHdYR7x.js} +1 -1
- package/dist/ants-web/assets/{cursor-transparent-CEI7Uo9s.js → cursor-transparent-DU5VzNlI.js} +1 -1
- package/dist/ants-web/assets/{desktop-DqPIvD_j.js → desktop-CJvmoWSh.js} +1 -1
- package/dist/ants-web/assets/{disconnect-CjG-vhS0.js → disconnect-y3SXlAJD.js} +1 -1
- package/dist/ants-web/assets/{discord-C4mDPRgZ.js → discord-CIryPE3Q.js} +1 -1
- package/dist/ants-web/assets/{etherscan-Dv4fm5ON.js → etherscan-CorqRFTw.js} +1 -1
- package/dist/ants-web/assets/{exclamation-triangle-D2iSwL4F.js → exclamation-triangle-BkEoTHZ5.js} +1 -1
- package/dist/ants-web/assets/{extension-BWiabI_y.js → extension-DyrRcjbU.js} +1 -1
- package/dist/ants-web/assets/{external-link-DRQjNZm2.js → external-link-DdO_iUGI.js} +1 -1
- package/dist/ants-web/assets/{facebook-4_sWPfm_.js → facebook-yYGvRtWV.js} +1 -1
- package/dist/ants-web/assets/{farcaster-BMUQahla.js → farcaster-nluXMXtO.js} +1 -1
- package/dist/ants-web/assets/{filters-CVdpn-pB.js → filters-DsHlEnve.js} +1 -1
- package/dist/ants-web/assets/{github-Fazo9Ng9.js → github-CTYsMkh0.js} +1 -1
- package/dist/ants-web/assets/{google-B2vT6QZk.js → google-kM4Wvu7Z.js} +1 -1
- package/dist/ants-web/assets/{help-circle-CUkBnniI.js → help-circle-DKOLqw_b.js} +1 -1
- package/dist/ants-web/assets/{id-BeH5ke0b.js → id-CusREk5-.js} +1 -1
- package/dist/ants-web/assets/{image-CRg86FKb.js → image-DMNQNh0Y.js} +1 -1
- package/dist/ants-web/assets/{index-C6TSwFK5.css → index-BEpanGpi.css} +1 -1
- package/dist/ants-web/assets/{index-DIR15lga.js → index-COY2px3j.js} +1 -1
- package/dist/ants-web/assets/{index-CDIBLXxv.js → index-CPLzfsPE.js} +3 -3
- package/dist/ants-web/assets/{index-CQOq78xq.js → index-DANxT8qS.js} +1 -1
- package/dist/ants-web/assets/{index-DAMKuJIh.js → index-DUuPTQ3k.js} +1 -1
- package/dist/ants-web/assets/index-VZ32oQFb.js +1729 -0
- package/dist/ants-web/assets/{index.es-CoEUA0kG.js → index.es-DPlCdt54.js} +4 -4
- package/dist/ants-web/assets/{info-DttPVoPz.js → info-CnM2svWJ.js} +1 -1
- package/dist/ants-web/assets/{info-circle-Dkqa-siN.js → info-circle-DJzqb4SI.js} +1 -1
- package/dist/ants-web/assets/{lightbulb-Dm4gXGc-.js → lightbulb-CST9dVcZ.js} +1 -1
- package/dist/ants-web/assets/{mail-NfpgCHaC.js → mail-BJ1hKVqS.js} +1 -1
- package/dist/ants-web/assets/{metamask-sdk-C7pFdHLp.js → metamask-sdk-BH6ZlElr.js} +1 -1
- package/dist/ants-web/assets/{mobile-DCTvLORz.js → mobile-wmYRpcgE.js} +1 -1
- package/dist/ants-web/assets/{more-DywQpHgt.js → more-IGP1bF3R.js} +1 -1
- package/dist/ants-web/assets/{network-placeholder-3SXhPKTd.js → network-placeholder-BngyJw8O.js} +1 -1
- package/dist/ants-web/assets/{nftPlaceholder-BRA_PIZG.js → nftPlaceholder-BrzrjnCr.js} +1 -1
- package/dist/ants-web/assets/{off-CvdJExYE.js → off-C1QfuJWG.js} +1 -1
- package/dist/ants-web/assets/{play-store-CwTSHd-9.js → play-store-CADZOU9s.js} +1 -1
- package/dist/ants-web/assets/{plus-Bov7RaWs.js → plus-BTdAeL37.js} +1 -1
- package/dist/ants-web/assets/{qr-code-BmLa7tEw.js → qr-code-mzZyj0IW.js} +1 -1
- package/dist/ants-web/assets/{recycle-horizontal-ty08wbO3.js → recycle-horizontal-8XGvHUej.js} +1 -1
- package/dist/ants-web/assets/{refresh-QqOdCUg6.js → refresh-B4TDccir.js} +1 -1
- package/dist/ants-web/assets/{reown-logo-BSNpdnY9.js → reown-logo-B7g0SQf8.js} +1 -1
- package/dist/ants-web/assets/{search-Bb5lzcKZ.js → search-DING6LvV.js} +1 -1
- package/dist/ants-web/assets/{secp256k1-BYIAG9Vl.js → secp256k1-a7iMSBSR.js} +1 -1
- package/dist/ants-web/assets/{send-UyY5pYJl.js → send-CnCS4TcQ.js} +1 -1
- package/dist/ants-web/assets/{swapHorizontal-BWnJVlFx.js → swapHorizontal-DgdBiOXF.js} +1 -1
- package/dist/ants-web/assets/{swapHorizontalBold-CtBqvC6A.js → swapHorizontalBold-BggYc17K.js} +1 -1
- package/dist/ants-web/assets/{swapHorizontalMedium-BObSx-48.js → swapHorizontalMedium-BmbMM6av.js} +1 -1
- package/dist/ants-web/assets/{swapHorizontalRoundedBold-lh9cK6of.js → swapHorizontalRoundedBold-9GHD52KZ.js} +1 -1
- package/dist/ants-web/assets/{swapVertical-DdrIJ3SV.js → swapVertical-CEdy1srN.js} +1 -1
- package/dist/ants-web/assets/{telegram-Y9ojCe2G.js → telegram-CzVWpOYY.js} +1 -1
- package/dist/ants-web/assets/{three-dots-CVR73UW5.js → three-dots-BG2Qdpc1.js} +1 -1
- package/dist/ants-web/assets/{twitch-DJswgYms.js → twitch-BJsVNWdF.js} +1 -1
- package/dist/ants-web/assets/{twitterIcon-DnPXCJ2u.js → twitterIcon-BOPFGd5P.js} +1 -1
- package/dist/ants-web/assets/{verify-CbbZfjH1.js → verify-CjXYfWEC.js} +1 -1
- package/dist/ants-web/assets/{verify-filled-MSTNLod3.js → verify-filled-CKhuGj0x.js} +1 -1
- package/dist/ants-web/assets/{w3m-modal-Cj-lZAwZ.js → w3m-modal-DcLR3Mp3.js} +1 -1
- package/dist/ants-web/assets/{wallet-Bhh1JFlp.js → wallet-BE8yFWV-.js} +1 -1
- package/dist/ants-web/assets/{wallet-placeholder-D3yeV4Lh.js → wallet-placeholder-V9pJvNWq.js} +1 -1
- package/dist/ants-web/assets/{walletconnect-CZSY4sTW.js → walletconnect-D2pRbx3L.js} +1 -1
- package/dist/ants-web/assets/{warning-circle-Cp1omknM.js → warning-circle-ClqEAZx7.js} +1 -1
- package/dist/ants-web/assets/{x-DCAj5cUL.js → x-rj_yq1Mp.js} +1 -1
- package/dist/ants-web/index.html +2 -2
- package/dist/routes.js +26 -1
- package/dist/routes.js.map +1 -1
- package/dist/service/free-tier.d.ts +12 -0
- package/dist/service/free-tier.js +63 -0
- package/dist/service/free-tier.js.map +1 -0
- package/dist/service/index.d.ts +1 -0
- package/dist/service/index.js +1 -0
- package/dist/service/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/ants-web/assets/index-7ttZWn4u.js +0 -1729
|
@@ -1,1729 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DIR15lga.js","assets/index-kzlEvkEN.js","assets/index-CQOq78xq.js","assets/events-DQ172AOg.js","assets/index.es-CoEUA0kG.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var cj=Object.defineProperty;var qb=e=>{throw TypeError(e)};var uj=(e,t,n)=>t in e?cj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var er=(e,t,n)=>uj(e,typeof t!="symbol"?t+"":t,n),d0=(e,t,n)=>t.has(e)||qb("Cannot "+n);var z=(e,t,n)=>(d0(e,t,"read from private field"),n?n.call(e):t.get(e)),je=(e,t,n)=>t.has(e)?qb("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),pe=(e,t,n,r)=>(d0(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Oe=(e,t,n)=>(d0(e,t,"access private method"),n);var Ld=(e,t,n,r)=>({set _(o){pe(e,t,o,n)},get _(){return z(e,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var bW=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function s5(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function xW(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var f0={exports:{}},Xl={},h0={exports:{}},Le={};/**
|
|
3
|
-
* @license React
|
|
4
|
-
* react.production.min.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var Hb;function dj(){if(Hb)return Le;Hb=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),m=Symbol.iterator;function g(U){return U===null||typeof U!="object"?null:(U=m&&U[m]||U["@@iterator"],typeof U=="function"?U:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,b={};function C(U,X,he){this.props=U,this.context=X,this.refs=b,this.updater=he||v}C.prototype.isReactComponent={},C.prototype.setState=function(U,X){if(typeof U!="object"&&typeof U!="function"&&U!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,U,X,"setState")},C.prototype.forceUpdate=function(U){this.updater.enqueueForceUpdate(this,U,"forceUpdate")};function j(){}j.prototype=C.prototype;function I(U,X,he){this.props=U,this.context=X,this.refs=b,this.updater=he||v}var A=I.prototype=new j;A.constructor=I,w(A,C.prototype),A.isPureReactComponent=!0;var S=Array.isArray,N=Object.prototype.hasOwnProperty,T={current:null},B={key:!0,ref:!0,__self:!0,__source:!0};function R(U,X,he){var se,ie={},re=null,ue=null;if(X!=null)for(se in X.ref!==void 0&&(ue=X.ref),X.key!==void 0&&(re=""+X.key),X)N.call(X,se)&&!B.hasOwnProperty(se)&&(ie[se]=X[se]);var Se=arguments.length-2;if(Se===1)ie.children=he;else if(1<Se){for(var Pe=Array(Se),Me=0;Me<Se;Me++)Pe[Me]=arguments[Me+2];ie.children=Pe}if(U&&U.defaultProps)for(se in Se=U.defaultProps,Se)ie[se]===void 0&&(ie[se]=Se[se]);return{$$typeof:e,type:U,key:re,ref:ue,props:ie,_owner:T.current}}function M(U,X){return{$$typeof:e,type:U.type,key:X,ref:U.ref,props:U.props,_owner:U._owner}}function H(U){return typeof U=="object"&&U!==null&&U.$$typeof===e}function V(U){var X={"=":"=0",":":"=2"};return"$"+U.replace(/[=:]/g,function(he){return X[he]})}var W=/\/+/g;function L(U,X){return typeof U=="object"&&U!==null&&U.key!=null?V(""+U.key):X.toString(36)}function J(U,X,he,se,ie){var re=typeof U;(re==="undefined"||re==="boolean")&&(U=null);var ue=!1;if(U===null)ue=!0;else switch(re){case"string":case"number":ue=!0;break;case"object":switch(U.$$typeof){case e:case t:ue=!0}}if(ue)return ue=U,ie=ie(ue),U=se===""?"."+L(ue,0):se,S(ie)?(he="",U!=null&&(he=U.replace(W,"$&/")+"/"),J(ie,X,he,"",function(Me){return Me})):ie!=null&&(H(ie)&&(ie=M(ie,he+(!ie.key||ue&&ue.key===ie.key?"":(""+ie.key).replace(W,"$&/")+"/")+U)),X.push(ie)),1;if(ue=0,se=se===""?".":se+":",S(U))for(var Se=0;Se<U.length;Se++){re=U[Se];var Pe=se+L(re,Se);ue+=J(re,X,he,Pe,ie)}else if(Pe=g(U),typeof Pe=="function")for(U=Pe.call(U),Se=0;!(re=U.next()).done;)re=re.value,Pe=se+L(re,Se++),ue+=J(re,X,he,Pe,ie);else if(re==="object")throw X=String(U),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(U).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.");return ue}function O(U,X,he){if(U==null)return U;var se=[],ie=0;return J(U,se,"","",function(re){return X.call(he,re,ie++)}),se}function G(U){if(U._status===-1){var X=U._result;X=X(),X.then(function(he){(U._status===0||U._status===-1)&&(U._status=1,U._result=he)},function(he){(U._status===0||U._status===-1)&&(U._status=2,U._result=he)}),U._status===-1&&(U._status=0,U._result=X)}if(U._status===1)return U._result.default;throw U._result}var ee={current:null},F={transition:null},K={ReactCurrentDispatcher:ee,ReactCurrentBatchConfig:F,ReactCurrentOwner:T};function Y(){throw Error("act(...) is not supported in production builds of React.")}return Le.Children={map:O,forEach:function(U,X,he){O(U,function(){X.apply(this,arguments)},he)},count:function(U){var X=0;return O(U,function(){X++}),X},toArray:function(U){return O(U,function(X){return X})||[]},only:function(U){if(!H(U))throw Error("React.Children.only expected to receive a single React element child.");return U}},Le.Component=C,Le.Fragment=n,Le.Profiler=o,Le.PureComponent=I,Le.StrictMode=r,Le.Suspense=u,Le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=K,Le.act=Y,Le.cloneElement=function(U,X,he){if(U==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+U+".");var se=w({},U.props),ie=U.key,re=U.ref,ue=U._owner;if(X!=null){if(X.ref!==void 0&&(re=X.ref,ue=T.current),X.key!==void 0&&(ie=""+X.key),U.type&&U.type.defaultProps)var Se=U.type.defaultProps;for(Pe in X)N.call(X,Pe)&&!B.hasOwnProperty(Pe)&&(se[Pe]=X[Pe]===void 0&&Se!==void 0?Se[Pe]:X[Pe])}var Pe=arguments.length-2;if(Pe===1)se.children=he;else if(1<Pe){Se=Array(Pe);for(var Me=0;Me<Pe;Me++)Se[Me]=arguments[Me+2];se.children=Se}return{$$typeof:e,type:U.type,key:ie,ref:re,props:se,_owner:ue}},Le.createContext=function(U){return U={$$typeof:l,_currentValue:U,_currentValue2:U,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},U.Provider={$$typeof:i,_context:U},U.Consumer=U},Le.createElement=R,Le.createFactory=function(U){var X=R.bind(null,U);return X.type=U,X},Le.createRef=function(){return{current:null}},Le.forwardRef=function(U){return{$$typeof:c,render:U}},Le.isValidElement=H,Le.lazy=function(U){return{$$typeof:f,_payload:{_status:-1,_result:U},_init:G}},Le.memo=function(U,X){return{$$typeof:p,type:U,compare:X===void 0?null:X}},Le.startTransition=function(U){var X=F.transition;F.transition={};try{U()}finally{F.transition=X}},Le.unstable_act=Y,Le.useCallback=function(U,X){return ee.current.useCallback(U,X)},Le.useContext=function(U){return ee.current.useContext(U)},Le.useDebugValue=function(){},Le.useDeferredValue=function(U){return ee.current.useDeferredValue(U)},Le.useEffect=function(U,X){return ee.current.useEffect(U,X)},Le.useId=function(){return ee.current.useId()},Le.useImperativeHandle=function(U,X,he){return ee.current.useImperativeHandle(U,X,he)},Le.useInsertionEffect=function(U,X){return ee.current.useInsertionEffect(U,X)},Le.useLayoutEffect=function(U,X){return ee.current.useLayoutEffect(U,X)},Le.useMemo=function(U,X){return ee.current.useMemo(U,X)},Le.useReducer=function(U,X,he){return ee.current.useReducer(U,X,he)},Le.useRef=function(U){return ee.current.useRef(U)},Le.useState=function(U){return ee.current.useState(U)},Le.useSyncExternalStore=function(U,X,he){return ee.current.useSyncExternalStore(U,X,he)},Le.useTransition=function(){return ee.current.useTransition()},Le.version="18.3.1",Le}var Vb;function cu(){return Vb||(Vb=1,h0.exports=dj()),h0.exports}/**
|
|
11
|
-
* @license React
|
|
12
|
-
* react-jsx-runtime.production.min.js
|
|
13
|
-
*
|
|
14
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the MIT license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var Qb;function fj(){if(Qb)return Xl;Qb=1;var e=cu(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function l(c,u,p){var f,m={},g=null,v=null;p!==void 0&&(g=""+p),u.key!==void 0&&(g=""+u.key),u.ref!==void 0&&(v=u.ref);for(f in u)r.call(u,f)&&!i.hasOwnProperty(f)&&(m[f]=u[f]);if(c&&c.defaultProps)for(f in u=c.defaultProps,u)m[f]===void 0&&(m[f]=u[f]);return{$$typeof:t,type:c,key:g,ref:v,props:m,_owner:o.current}}return Xl.Fragment=n,Xl.jsx=l,Xl.jsxs=l,Xl}var Gb;function hj(){return Gb||(Gb=1,f0.exports=fj()),f0.exports}var h=hj(),P=cu();const E=s5(P);var Dd={},p0={exports:{}},Cn={},m0={exports:{}},g0={};/**
|
|
19
|
-
* @license React
|
|
20
|
-
* scheduler.production.min.js
|
|
21
|
-
*
|
|
22
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the MIT license found in the
|
|
25
|
-
* LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/var Kb;function pj(){return Kb||(Kb=1,(function(e){function t(F,K){var Y=F.length;F.push(K);e:for(;0<Y;){var U=Y-1>>>1,X=F[U];if(0<o(X,K))F[U]=K,F[Y]=X,Y=U;else break e}}function n(F){return F.length===0?null:F[0]}function r(F){if(F.length===0)return null;var K=F[0],Y=F.pop();if(Y!==K){F[0]=Y;e:for(var U=0,X=F.length,he=X>>>1;U<he;){var se=2*(U+1)-1,ie=F[se],re=se+1,ue=F[re];if(0>o(ie,Y))re<X&&0>o(ue,ie)?(F[U]=ue,F[re]=Y,U=re):(F[U]=ie,F[se]=Y,U=se);else if(re<X&&0>o(ue,Y))F[U]=ue,F[re]=Y,U=re;else break e}}return K}function o(F,K){var Y=F.sortIndex-K.sortIndex;return Y!==0?Y:F.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var u=[],p=[],f=1,m=null,g=3,v=!1,w=!1,b=!1,C=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(F){for(var K=n(p);K!==null;){if(K.callback===null)r(p);else if(K.startTime<=F)r(p),K.sortIndex=K.expirationTime,t(u,K);else break;K=n(p)}}function S(F){if(b=!1,A(F),!w)if(n(u)!==null)w=!0,G(N);else{var K=n(p);K!==null&&ee(S,K.startTime-F)}}function N(F,K){w=!1,b&&(b=!1,j(R),R=-1),v=!0;var Y=g;try{for(A(K),m=n(u);m!==null&&(!(m.expirationTime>K)||F&&!V());){var U=m.callback;if(typeof U=="function"){m.callback=null,g=m.priorityLevel;var X=U(m.expirationTime<=K);K=e.unstable_now(),typeof X=="function"?m.callback=X:m===n(u)&&r(u),A(K)}else r(u);m=n(u)}if(m!==null)var he=!0;else{var se=n(p);se!==null&&ee(S,se.startTime-K),he=!1}return he}finally{m=null,g=Y,v=!1}}var T=!1,B=null,R=-1,M=5,H=-1;function V(){return!(e.unstable_now()-H<M)}function W(){if(B!==null){var F=e.unstable_now();H=F;var K=!0;try{K=B(!0,F)}finally{K?L():(T=!1,B=null)}}else T=!1}var L;if(typeof I=="function")L=function(){I(W)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,O=J.port2;J.port1.onmessage=W,L=function(){O.postMessage(null)}}else L=function(){C(W,0)};function G(F){B=F,T||(T=!0,L())}function ee(F,K){R=C(function(){F(e.unstable_now())},K)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(F){F.callback=null},e.unstable_continueExecution=function(){w||v||(w=!0,G(N))},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(F){switch(g){case 1:case 2:case 3:var K=3;break;default:K=g}var Y=g;g=K;try{return F()}finally{g=Y}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(F,K){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var Y=g;g=F;try{return K()}finally{g=Y}},e.unstable_scheduleCallback=function(F,K,Y){var U=e.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?U+Y:U):Y=U,F){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=Y+X,F={id:f++,callback:K,priorityLevel:F,startTime:Y,expirationTime:X,sortIndex:-1},Y>U?(F.sortIndex=Y,t(p,F),n(u)===null&&F===n(p)&&(b?(j(R),R=-1):b=!0,ee(S,Y-U))):(F.sortIndex=X,t(u,F),w||v||(w=!0,G(N))),F},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(F){var K=g;return function(){var Y=g;g=K;try{return F.apply(this,arguments)}finally{g=Y}}}})(g0)),g0}var Yb;function mj(){return Yb||(Yb=1,m0.exports=pj()),m0.exports}/**
|
|
27
|
-
* @license React
|
|
28
|
-
* react-dom.production.min.js
|
|
29
|
-
*
|
|
30
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
31
|
-
*
|
|
32
|
-
* This source code is licensed under the MIT license found in the
|
|
33
|
-
* LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/var Jb;function gj(){if(Jb)return Cn;Jb=1;var e=cu(),t=mj();function n(s){for(var a="https://reactjs.org/docs/error-decoder.html?invariant="+s,d=1;d<arguments.length;d++)a+="&args[]="+encodeURIComponent(arguments[d]);return"Minified React error #"+s+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function i(s,a){l(s,a),l(s+"Capture",a)}function l(s,a){for(o[s]=a,s=0;s<a.length;s++)r.add(a[s])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u=Object.prototype.hasOwnProperty,p=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},m={};function g(s){return u.call(m,s)?!0:u.call(f,s)?!1:p.test(s)?m[s]=!0:(f[s]=!0,!1)}function v(s,a,d,y){if(d!==null&&d.type===0)return!1;switch(typeof a){case"function":case"symbol":return!0;case"boolean":return y?!1:d!==null?!d.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function w(s,a,d,y){if(a===null||typeof a>"u"||v(s,a,d,y))return!0;if(y)return!1;if(d!==null)switch(d.type){case 3:return!a;case 4:return a===!1;case 5:return isNaN(a);case 6:return isNaN(a)||1>a}return!1}function b(s,a,d,y,x,k,_){this.acceptsBooleans=a===2||a===3||a===4,this.attributeName=y,this.attributeNamespace=x,this.mustUseProperty=d,this.propertyName=s,this.type=a,this.sanitizeURL=k,this.removeEmptyString=_}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){C[s]=new b(s,0,!1,s,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var a=s[0];C[a]=new b(a,1,!1,s[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(s){C[s]=new b(s,2,!1,s.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){C[s]=new b(s,2,!1,s,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(s){C[s]=new b(s,3,!1,s.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(s){C[s]=new b(s,3,!0,s,null,!1,!1)}),["capture","download"].forEach(function(s){C[s]=new b(s,4,!1,s,null,!1,!1)}),["cols","rows","size","span"].forEach(function(s){C[s]=new b(s,6,!1,s,null,!1,!1)}),["rowSpan","start"].forEach(function(s){C[s]=new b(s,5,!1,s.toLowerCase(),null,!1,!1)});var j=/[\-:]([a-z])/g;function I(s){return s[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(s){var a=s.replace(j,I);C[a]=new b(a,1,!1,s,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var a=s.replace(j,I);C[a]=new b(a,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(s){var a=s.replace(j,I);C[a]=new b(a,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(s){C[s]=new b(s,1,!1,s.toLowerCase(),null,!1,!1)}),C.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(s){C[s]=new b(s,1,!1,s.toLowerCase(),null,!0,!0)});function A(s,a,d,y){var x=C.hasOwnProperty(a)?C[a]:null;(x!==null?x.type!==0:y||!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(w(a,d,x,y)&&(d=null),y||x===null?g(a)&&(d===null?s.removeAttribute(a):s.setAttribute(a,""+d)):x.mustUseProperty?s[x.propertyName]=d===null?x.type===3?!1:"":d:(a=x.attributeName,y=x.attributeNamespace,d===null?s.removeAttribute(a):(x=x.type,d=x===3||x===4&&d===!0?"":""+d,y?s.setAttributeNS(y,a,d):s.setAttribute(a,d))))}var S=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,N=Symbol.for("react.element"),T=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),V=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),ee=Symbol.for("react.offscreen"),F=Symbol.iterator;function K(s){return s===null||typeof s!="object"?null:(s=F&&s[F]||s["@@iterator"],typeof s=="function"?s:null)}var Y=Object.assign,U;function X(s){if(U===void 0)try{throw Error()}catch(d){var a=d.stack.trim().match(/\n( *(at )?)/);U=a&&a[1]||""}return`
|
|
35
|
-
`+U+s}var he=!1;function se(s,a){if(!s||he)return"";he=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(a)if(a=function(){throw Error()},Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(a,[])}catch(ne){var y=ne}Reflect.construct(s,[],a)}else{try{a.call()}catch(ne){y=ne}s.call(a.prototype)}else{try{throw Error()}catch(ne){y=ne}s()}}catch(ne){if(ne&&y&&typeof ne.stack=="string"){for(var x=ne.stack.split(`
|
|
36
|
-
`),k=y.stack.split(`
|
|
37
|
-
`),_=x.length-1,D=k.length-1;1<=_&&0<=D&&x[_]!==k[D];)D--;for(;1<=_&&0<=D;_--,D--)if(x[_]!==k[D]){if(_!==1||D!==1)do if(_--,D--,0>D||x[_]!==k[D]){var q=`
|
|
38
|
-
`+x[_].replace(" at new "," at ");return s.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",s.displayName)),q}while(1<=_&&0<=D);break}}}finally{he=!1,Error.prepareStackTrace=d}return(s=s?s.displayName||s.name:"")?X(s):""}function ie(s){switch(s.tag){case 5:return X(s.type);case 16:return X("Lazy");case 13:return X("Suspense");case 19:return X("SuspenseList");case 0:case 2:case 15:return s=se(s.type,!1),s;case 11:return s=se(s.type.render,!1),s;case 1:return s=se(s.type,!0),s;default:return""}}function re(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case B:return"Fragment";case T:return"Portal";case M:return"Profiler";case R:return"StrictMode";case L:return"Suspense";case J:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case V:return(s.displayName||"Context")+".Consumer";case H:return(s._context.displayName||"Context")+".Provider";case W:var a=s.render;return s=s.displayName,s||(s=a.displayName||a.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case O:return a=s.displayName||null,a!==null?a:re(s.type)||"Memo";case G:a=s._payload,s=s._init;try{return re(s(a))}catch{}}return null}function ue(s){var a=s.type;switch(s.tag){case 24:return"Cache";case 9:return(a.displayName||"Context")+".Consumer";case 10:return(a._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=a.render,s=s.displayName||s.name||"",a.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return a;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return re(a);case 8:return a===R?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a}return null}function Se(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Pe(s){var a=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Me(s){var a=Pe(s)?"checked":"value",d=Object.getOwnPropertyDescriptor(s.constructor.prototype,a),y=""+s[a];if(!s.hasOwnProperty(a)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var x=d.get,k=d.set;return Object.defineProperty(s,a,{configurable:!0,get:function(){return x.call(this)},set:function(_){y=""+_,k.call(this,_)}}),Object.defineProperty(s,a,{enumerable:d.enumerable}),{getValue:function(){return y},setValue:function(_){y=""+_},stopTracking:function(){s._valueTracker=null,delete s[a]}}}}function mt(s){s._valueTracker||(s._valueTracker=Me(s))}function It(s){if(!s)return!1;var a=s._valueTracker;if(!a)return!0;var d=a.getValue(),y="";return s&&(y=Pe(s)?s.checked?"true":"false":s.value),s=y,s!==d?(a.setValue(s),!0):!1}function gt(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function Wt(s,a){var d=a.checked;return Y({},a,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??s._wrapperState.initialChecked})}function on(s,a){var d=a.defaultValue==null?"":a.defaultValue,y=a.checked!=null?a.checked:a.defaultChecked;d=Se(a.value!=null?a.value:d),s._wrapperState={initialChecked:y,initialValue:d,controlled:a.type==="checkbox"||a.type==="radio"?a.checked!=null:a.value!=null}}function rt(s,a){a=a.checked,a!=null&&A(s,"checked",a,!1)}function sn(s,a){rt(s,a);var d=Se(a.value),y=a.type;if(d!=null)y==="number"?(d===0&&s.value===""||s.value!=d)&&(s.value=""+d):s.value!==""+d&&(s.value=""+d);else if(y==="submit"||y==="reset"){s.removeAttribute("value");return}a.hasOwnProperty("value")?Mt(s,a.type,d):a.hasOwnProperty("defaultValue")&&Mt(s,a.type,Se(a.defaultValue)),a.checked==null&&a.defaultChecked!=null&&(s.defaultChecked=!!a.defaultChecked)}function Ot(s,a,d){if(a.hasOwnProperty("value")||a.hasOwnProperty("defaultValue")){var y=a.type;if(!(y!=="submit"&&y!=="reset"||a.value!==void 0&&a.value!==null))return;a=""+s._wrapperState.initialValue,d||a===s.value||(s.value=a),s.defaultValue=a}d=s.name,d!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,d!==""&&(s.name=d)}function Mt(s,a,d){(a!=="number"||gt(s.ownerDocument)!==s)&&(d==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+d&&(s.defaultValue=""+d))}var ye=Array.isArray;function Je(s,a,d,y){if(s=s.options,a){a={};for(var x=0;x<d.length;x++)a["$"+d[x]]=!0;for(d=0;d<s.length;d++)x=a.hasOwnProperty("$"+s[d].value),s[d].selected!==x&&(s[d].selected=x),x&&y&&(s[d].defaultSelected=!0)}else{for(d=""+Se(d),a=null,x=0;x<s.length;x++){if(s[x].value===d){s[x].selected=!0,y&&(s[x].defaultSelected=!0);return}a!==null||s[x].disabled||(a=s[x])}a!==null&&(a.selected=!0)}}function Nr(s,a){if(a.dangerouslySetInnerHTML!=null)throw Error(n(91));return Y({},a,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function _o(s,a){var d=a.value;if(d==null){if(d=a.children,a=a.defaultValue,d!=null){if(a!=null)throw Error(n(92));if(ye(d)){if(1<d.length)throw Error(n(93));d=d[0]}a=d}a==null&&(a=""),d=a}s._wrapperState={initialValue:Se(d)}}function Ro(s,a){var d=Se(a.value),y=Se(a.defaultValue);d!=null&&(d=""+d,d!==s.value&&(s.value=d),a.defaultValue==null&&s.defaultValue!==d&&(s.defaultValue=d)),y!=null&&(s.defaultValue=""+y)}function Pu(s){var a=s.textContent;a===s._wrapperState.initialValue&&a!==""&&a!==null&&(s.value=a)}function gl(s){switch(s){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function _i(s,a){return s==null||s==="http://www.w3.org/1999/xhtml"?gl(a):s==="http://www.w3.org/2000/svg"&&a==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var qt,Zr=(function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(a,d,y,x){MSApp.execUnsafeLocalFunction(function(){return s(a,d,y,x)})}:s})(function(s,a){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=a;else{for(qt=qt||document.createElement("div"),qt.innerHTML="<svg>"+a.valueOf().toString()+"</svg>",a=qt.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;a.firstChild;)s.appendChild(a.firstChild)}});function Pr(s,a){if(a){var d=s.firstChild;if(d&&d===s.lastChild&&d.nodeType===3){d.nodeValue=a;return}}s.textContent=a}var Re={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},We=["Webkit","ms","Moz","O"];Object.keys(Re).forEach(function(s){We.forEach(function(a){a=a+s.charAt(0).toUpperCase()+s.substring(1),Re[a]=Re[s]})});function _e(s,a,d){return a==null||typeof a=="boolean"||a===""?"":d||typeof a!="number"||a===0||Re.hasOwnProperty(s)&&Re[s]?(""+a).trim():a+"px"}function Ge(s,a){s=s.style;for(var d in a)if(a.hasOwnProperty(d)){var y=d.indexOf("--")===0,x=_e(d,a[d],y);d==="float"&&(d="cssFloat"),y?s.setProperty(d,x):s[d]=x}}var fr=Y({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function mn(s,a){if(a){if(fr[s]&&(a.children!=null||a.dangerouslySetInnerHTML!=null))throw Error(n(137,s));if(a.dangerouslySetInnerHTML!=null){if(a.children!=null)throw Error(n(60));if(typeof a.dangerouslySetInnerHTML!="object"||!("__html"in a.dangerouslySetInnerHTML))throw Error(n(61))}if(a.style!=null&&typeof a.style!="object")throw Error(n(62))}}function ze(s,a){if(s.indexOf("-")===-1)return typeof a.is=="string";switch(s){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Be=null;function gn(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var _s=null,Xr=null,Ri=null;function av(s){if(s=Ll(s)){if(typeof _s!="function")throw Error(n(280));var a=s.stateNode;a&&(a=Xu(a),_s(s.stateNode,s.type,a))}}function lv(s){Xr?Ri?Ri.push(s):Ri=[s]:Xr=s}function cv(){if(Xr){var s=Xr,a=Ri;if(Ri=Xr=null,av(s),a)for(s=0;s<a.length;s++)av(a[s])}}function uv(s,a){return s(a)}function dv(){}var Ih=!1;function fv(s,a,d){if(Ih)return s(a,d);Ih=!0;try{return uv(s,a,d)}finally{Ih=!1,(Xr!==null||Ri!==null)&&(dv(),cv())}}function yl(s,a){var d=s.stateNode;if(d===null)return null;var y=Xu(d);if(y===null)return null;d=y[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(y=!y.disabled)||(s=s.type,y=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!y;break e;default:s=!1}if(s)return null;if(d&&typeof d!="function")throw Error(n(231,a,typeof d));return d}var Nh=!1;if(c)try{var vl={};Object.defineProperty(vl,"passive",{get:function(){Nh=!0}}),window.addEventListener("test",vl,vl),window.removeEventListener("test",vl,vl)}catch{Nh=!1}function mA(s,a,d,y,x,k,_,D,q){var ne=Array.prototype.slice.call(arguments,3);try{a.apply(d,ne)}catch(le){this.onError(le)}}var wl=!1,Bu=null,Tu=!1,Ph=null,gA={onError:function(s){wl=!0,Bu=s}};function yA(s,a,d,y,x,k,_,D,q){wl=!1,Bu=null,mA.apply(gA,arguments)}function vA(s,a,d,y,x,k,_,D,q){if(yA.apply(this,arguments),wl){if(wl){var ne=Bu;wl=!1,Bu=null}else throw Error(n(198));Tu||(Tu=!0,Ph=ne)}}function Rs(s){var a=s,d=s;if(s.alternate)for(;a.return;)a=a.return;else{s=a;do a=s,(a.flags&4098)!==0&&(d=a.return),s=a.return;while(s)}return a.tag===3?d:null}function hv(s){if(s.tag===13){var a=s.memoizedState;if(a===null&&(s=s.alternate,s!==null&&(a=s.memoizedState)),a!==null)return a.dehydrated}return null}function pv(s){if(Rs(s)!==s)throw Error(n(188))}function wA(s){var a=s.alternate;if(!a){if(a=Rs(s),a===null)throw Error(n(188));return a!==s?null:s}for(var d=s,y=a;;){var x=d.return;if(x===null)break;var k=x.alternate;if(k===null){if(y=x.return,y!==null){d=y;continue}break}if(x.child===k.child){for(k=x.child;k;){if(k===d)return pv(x),s;if(k===y)return pv(x),a;k=k.sibling}throw Error(n(188))}if(d.return!==y.return)d=x,y=k;else{for(var _=!1,D=x.child;D;){if(D===d){_=!0,d=x,y=k;break}if(D===y){_=!0,y=x,d=k;break}D=D.sibling}if(!_){for(D=k.child;D;){if(D===d){_=!0,d=k,y=x;break}if(D===y){_=!0,y=k,d=x;break}D=D.sibling}if(!_)throw Error(n(189))}}if(d.alternate!==y)throw Error(n(190))}if(d.tag!==3)throw Error(n(188));return d.stateNode.current===d?s:a}function mv(s){return s=wA(s),s!==null?gv(s):null}function gv(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var a=gv(s);if(a!==null)return a;s=s.sibling}return null}var yv=t.unstable_scheduleCallback,vv=t.unstable_cancelCallback,bA=t.unstable_shouldYield,xA=t.unstable_requestPaint,dt=t.unstable_now,CA=t.unstable_getCurrentPriorityLevel,Bh=t.unstable_ImmediatePriority,wv=t.unstable_UserBlockingPriority,_u=t.unstable_NormalPriority,kA=t.unstable_LowPriority,bv=t.unstable_IdlePriority,Ru=null,Br=null;function EA(s){if(Br&&typeof Br.onCommitFiberRoot=="function")try{Br.onCommitFiberRoot(Ru,s,void 0,(s.current.flags&128)===128)}catch{}}var hr=Math.clz32?Math.clz32:jA,AA=Math.log,SA=Math.LN2;function jA(s){return s>>>=0,s===0?32:31-(AA(s)/SA|0)|0}var Ou=64,Mu=4194304;function bl(s){switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function Fu(s,a){var d=s.pendingLanes;if(d===0)return 0;var y=0,x=s.suspendedLanes,k=s.pingedLanes,_=d&268435455;if(_!==0){var D=_&~x;D!==0?y=bl(D):(k&=_,k!==0&&(y=bl(k)))}else _=d&~x,_!==0?y=bl(_):k!==0&&(y=bl(k));if(y===0)return 0;if(a!==0&&a!==y&&(a&x)===0&&(x=y&-y,k=a&-a,x>=k||x===16&&(k&4194240)!==0))return a;if((y&4)!==0&&(y|=d&16),a=s.entangledLanes,a!==0)for(s=s.entanglements,a&=y;0<a;)d=31-hr(a),x=1<<d,y|=s[d],a&=~x;return y}function IA(s,a){switch(s){case 1:case 2:case 4:return a+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function NA(s,a){for(var d=s.suspendedLanes,y=s.pingedLanes,x=s.expirationTimes,k=s.pendingLanes;0<k;){var _=31-hr(k),D=1<<_,q=x[_];q===-1?((D&d)===0||(D&y)!==0)&&(x[_]=IA(D,a)):q<=a&&(s.expiredLanes|=D),k&=~D}}function Th(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function xv(){var s=Ou;return Ou<<=1,(Ou&4194240)===0&&(Ou=64),s}function _h(s){for(var a=[],d=0;31>d;d++)a.push(s);return a}function xl(s,a,d){s.pendingLanes|=a,a!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,a=31-hr(a),s[a]=d}function PA(s,a){var d=s.pendingLanes&~a;s.pendingLanes=a,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=a,s.mutableReadLanes&=a,s.entangledLanes&=a,a=s.entanglements;var y=s.eventTimes;for(s=s.expirationTimes;0<d;){var x=31-hr(d),k=1<<x;a[x]=0,y[x]=-1,s[x]=-1,d&=~k}}function Rh(s,a){var d=s.entangledLanes|=a;for(s=s.entanglements;d;){var y=31-hr(d),x=1<<y;x&a|s[y]&a&&(s[y]|=a),d&=~x}}var Ke=0;function Cv(s){return s&=-s,1<s?4<s?(s&268435455)!==0?16:536870912:4:1}var kv,Oh,Ev,Av,Sv,Mh=!1,Lu=[],Oo=null,Mo=null,Fo=null,Cl=new Map,kl=new Map,Lo=[],BA="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function jv(s,a){switch(s){case"focusin":case"focusout":Oo=null;break;case"dragenter":case"dragleave":Mo=null;break;case"mouseover":case"mouseout":Fo=null;break;case"pointerover":case"pointerout":Cl.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":kl.delete(a.pointerId)}}function El(s,a,d,y,x,k){return s===null||s.nativeEvent!==k?(s={blockedOn:a,domEventName:d,eventSystemFlags:y,nativeEvent:k,targetContainers:[x]},a!==null&&(a=Ll(a),a!==null&&Oh(a)),s):(s.eventSystemFlags|=y,a=s.targetContainers,x!==null&&a.indexOf(x)===-1&&a.push(x),s)}function TA(s,a,d,y,x){switch(a){case"focusin":return Oo=El(Oo,s,a,d,y,x),!0;case"dragenter":return Mo=El(Mo,s,a,d,y,x),!0;case"mouseover":return Fo=El(Fo,s,a,d,y,x),!0;case"pointerover":var k=x.pointerId;return Cl.set(k,El(Cl.get(k)||null,s,a,d,y,x)),!0;case"gotpointercapture":return k=x.pointerId,kl.set(k,El(kl.get(k)||null,s,a,d,y,x)),!0}return!1}function Iv(s){var a=Os(s.target);if(a!==null){var d=Rs(a);if(d!==null){if(a=d.tag,a===13){if(a=hv(d),a!==null){s.blockedOn=a,Sv(s.priority,function(){Ev(d)});return}}else if(a===3&&d.stateNode.current.memoizedState.isDehydrated){s.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Du(s){if(s.blockedOn!==null)return!1;for(var a=s.targetContainers;0<a.length;){var d=Lh(s.domEventName,s.eventSystemFlags,a[0],s.nativeEvent);if(d===null){d=s.nativeEvent;var y=new d.constructor(d.type,d);Be=y,d.target.dispatchEvent(y),Be=null}else return a=Ll(d),a!==null&&Oh(a),s.blockedOn=d,!1;a.shift()}return!0}function Nv(s,a,d){Du(s)&&d.delete(a)}function _A(){Mh=!1,Oo!==null&&Du(Oo)&&(Oo=null),Mo!==null&&Du(Mo)&&(Mo=null),Fo!==null&&Du(Fo)&&(Fo=null),Cl.forEach(Nv),kl.forEach(Nv)}function Al(s,a){s.blockedOn===a&&(s.blockedOn=null,Mh||(Mh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,_A)))}function Sl(s){function a(x){return Al(x,s)}if(0<Lu.length){Al(Lu[0],s);for(var d=1;d<Lu.length;d++){var y=Lu[d];y.blockedOn===s&&(y.blockedOn=null)}}for(Oo!==null&&Al(Oo,s),Mo!==null&&Al(Mo,s),Fo!==null&&Al(Fo,s),Cl.forEach(a),kl.forEach(a),d=0;d<Lo.length;d++)y=Lo[d],y.blockedOn===s&&(y.blockedOn=null);for(;0<Lo.length&&(d=Lo[0],d.blockedOn===null);)Iv(d),d.blockedOn===null&&Lo.shift()}var Oi=S.ReactCurrentBatchConfig,Uu=!0;function RA(s,a,d,y){var x=Ke,k=Oi.transition;Oi.transition=null;try{Ke=1,Fh(s,a,d,y)}finally{Ke=x,Oi.transition=k}}function OA(s,a,d,y){var x=Ke,k=Oi.transition;Oi.transition=null;try{Ke=4,Fh(s,a,d,y)}finally{Ke=x,Oi.transition=k}}function Fh(s,a,d,y){if(Uu){var x=Lh(s,a,d,y);if(x===null)tp(s,a,y,$u,d),jv(s,y);else if(TA(x,s,a,d,y))y.stopPropagation();else if(jv(s,y),a&4&&-1<BA.indexOf(s)){for(;x!==null;){var k=Ll(x);if(k!==null&&kv(k),k=Lh(s,a,d,y),k===null&&tp(s,a,y,$u,d),k===x)break;x=k}x!==null&&y.stopPropagation()}else tp(s,a,y,null,d)}}var $u=null;function Lh(s,a,d,y){if($u=null,s=gn(y),s=Os(s),s!==null)if(a=Rs(s),a===null)s=null;else if(d=a.tag,d===13){if(s=hv(a),s!==null)return s;s=null}else if(d===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;s=null}else a!==s&&(s=null);return $u=s,null}function Pv(s){switch(s){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(CA()){case Bh:return 1;case wv:return 4;case _u:case kA:return 16;case bv:return 536870912;default:return 16}default:return 16}}var Do=null,Dh=null,zu=null;function Bv(){if(zu)return zu;var s,a=Dh,d=a.length,y,x="value"in Do?Do.value:Do.textContent,k=x.length;for(s=0;s<d&&a[s]===x[s];s++);var _=d-s;for(y=1;y<=_&&a[d-y]===x[k-y];y++);return zu=x.slice(s,1<y?1-y:void 0)}function Wu(s){var a=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&a===13&&(s=13)):s=a,s===10&&(s=13),32<=s||s===13?s:0}function qu(){return!0}function Tv(){return!1}function Mn(s){function a(d,y,x,k,_){this._reactName=d,this._targetInst=x,this.type=y,this.nativeEvent=k,this.target=_,this.currentTarget=null;for(var D in s)s.hasOwnProperty(D)&&(d=s[D],this[D]=d?d(k):k[D]);return this.isDefaultPrevented=(k.defaultPrevented!=null?k.defaultPrevented:k.returnValue===!1)?qu:Tv,this.isPropagationStopped=Tv,this}return Y(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=qu)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=qu)},persist:function(){},isPersistent:qu}),a}var Mi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Uh=Mn(Mi),jl=Y({},Mi,{view:0,detail:0}),MA=Mn(jl),$h,zh,Il,Hu=Y({},jl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qh,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==Il&&(Il&&s.type==="mousemove"?($h=s.screenX-Il.screenX,zh=s.screenY-Il.screenY):zh=$h=0,Il=s),$h)},movementY:function(s){return"movementY"in s?s.movementY:zh}}),_v=Mn(Hu),FA=Y({},Hu,{dataTransfer:0}),LA=Mn(FA),DA=Y({},jl,{relatedTarget:0}),Wh=Mn(DA),UA=Y({},Mi,{animationName:0,elapsedTime:0,pseudoElement:0}),$A=Mn(UA),zA=Y({},Mi,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),WA=Mn(zA),qA=Y({},Mi,{data:0}),Rv=Mn(qA),HA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},VA={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},QA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function GA(s){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(s):(s=QA[s])?!!a[s]:!1}function qh(){return GA}var KA=Y({},jl,{key:function(s){if(s.key){var a=HA[s.key]||s.key;if(a!=="Unidentified")return a}return s.type==="keypress"?(s=Wu(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?VA[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qh,charCode:function(s){return s.type==="keypress"?Wu(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?Wu(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),YA=Mn(KA),JA=Y({},Hu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ov=Mn(JA),ZA=Y({},jl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qh}),XA=Mn(ZA),eS=Y({},Mi,{propertyName:0,elapsedTime:0,pseudoElement:0}),tS=Mn(eS),nS=Y({},Hu,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),rS=Mn(nS),oS=[9,13,27,32],Hh=c&&"CompositionEvent"in window,Nl=null;c&&"documentMode"in document&&(Nl=document.documentMode);var sS=c&&"TextEvent"in window&&!Nl,Mv=c&&(!Hh||Nl&&8<Nl&&11>=Nl),Fv=" ",Lv=!1;function Dv(s,a){switch(s){case"keyup":return oS.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Uv(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Fi=!1;function iS(s,a){switch(s){case"compositionend":return Uv(a);case"keypress":return a.which!==32?null:(Lv=!0,Fv);case"textInput":return s=a.data,s===Fv&&Lv?null:s;default:return null}}function aS(s,a){if(Fi)return s==="compositionend"||!Hh&&Dv(s,a)?(s=Bv(),zu=Dh=Do=null,Fi=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Mv&&a.locale!=="ko"?null:a.data;default:return null}}var lS={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function $v(s){var a=s&&s.nodeName&&s.nodeName.toLowerCase();return a==="input"?!!lS[s.type]:a==="textarea"}function zv(s,a,d,y){lv(y),a=Yu(a,"onChange"),0<a.length&&(d=new Uh("onChange","change",null,d,y),s.push({event:d,listeners:a}))}var Pl=null,Bl=null;function cS(s){iw(s,0)}function Vu(s){var a=zi(s);if(It(a))return s}function uS(s,a){if(s==="change")return a}var Wv=!1;if(c){var Vh;if(c){var Qh="oninput"in document;if(!Qh){var qv=document.createElement("div");qv.setAttribute("oninput","return;"),Qh=typeof qv.oninput=="function"}Vh=Qh}else Vh=!1;Wv=Vh&&(!document.documentMode||9<document.documentMode)}function Hv(){Pl&&(Pl.detachEvent("onpropertychange",Vv),Bl=Pl=null)}function Vv(s){if(s.propertyName==="value"&&Vu(Bl)){var a=[];zv(a,Bl,s,gn(s)),fv(cS,a)}}function dS(s,a,d){s==="focusin"?(Hv(),Pl=a,Bl=d,Pl.attachEvent("onpropertychange",Vv)):s==="focusout"&&Hv()}function fS(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return Vu(Bl)}function hS(s,a){if(s==="click")return Vu(a)}function pS(s,a){if(s==="input"||s==="change")return Vu(a)}function mS(s,a){return s===a&&(s!==0||1/s===1/a)||s!==s&&a!==a}var pr=typeof Object.is=="function"?Object.is:mS;function Tl(s,a){if(pr(s,a))return!0;if(typeof s!="object"||s===null||typeof a!="object"||a===null)return!1;var d=Object.keys(s),y=Object.keys(a);if(d.length!==y.length)return!1;for(y=0;y<d.length;y++){var x=d[y];if(!u.call(a,x)||!pr(s[x],a[x]))return!1}return!0}function Qv(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function Gv(s,a){var d=Qv(s);s=0;for(var y;d;){if(d.nodeType===3){if(y=s+d.textContent.length,s<=a&&y>=a)return{node:d,offset:a-s};s=y}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=Qv(d)}}function Kv(s,a){return s&&a?s===a?!0:s&&s.nodeType===3?!1:a&&a.nodeType===3?Kv(s,a.parentNode):"contains"in s?s.contains(a):s.compareDocumentPosition?!!(s.compareDocumentPosition(a)&16):!1:!1}function Yv(){for(var s=window,a=gt();a instanceof s.HTMLIFrameElement;){try{var d=typeof a.contentWindow.location.href=="string"}catch{d=!1}if(d)s=a.contentWindow;else break;a=gt(s.document)}return a}function Gh(s){var a=s&&s.nodeName&&s.nodeName.toLowerCase();return a&&(a==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||a==="textarea"||s.contentEditable==="true")}function gS(s){var a=Yv(),d=s.focusedElem,y=s.selectionRange;if(a!==d&&d&&d.ownerDocument&&Kv(d.ownerDocument.documentElement,d)){if(y!==null&&Gh(d)){if(a=y.start,s=y.end,s===void 0&&(s=a),"selectionStart"in d)d.selectionStart=a,d.selectionEnd=Math.min(s,d.value.length);else if(s=(a=d.ownerDocument||document)&&a.defaultView||window,s.getSelection){s=s.getSelection();var x=d.textContent.length,k=Math.min(y.start,x);y=y.end===void 0?k:Math.min(y.end,x),!s.extend&&k>y&&(x=y,y=k,k=x),x=Gv(d,k);var _=Gv(d,y);x&&_&&(s.rangeCount!==1||s.anchorNode!==x.node||s.anchorOffset!==x.offset||s.focusNode!==_.node||s.focusOffset!==_.offset)&&(a=a.createRange(),a.setStart(x.node,x.offset),s.removeAllRanges(),k>y?(s.addRange(a),s.extend(_.node,_.offset)):(a.setEnd(_.node,_.offset),s.addRange(a)))}}for(a=[],s=d;s=s.parentNode;)s.nodeType===1&&a.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<a.length;d++)s=a[d],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var yS=c&&"documentMode"in document&&11>=document.documentMode,Li=null,Kh=null,_l=null,Yh=!1;function Jv(s,a,d){var y=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Yh||Li==null||Li!==gt(y)||(y=Li,"selectionStart"in y&&Gh(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),_l&&Tl(_l,y)||(_l=y,y=Yu(Kh,"onSelect"),0<y.length&&(a=new Uh("onSelect","select",null,a,d),s.push({event:a,listeners:y}),a.target=Li)))}function Qu(s,a){var d={};return d[s.toLowerCase()]=a.toLowerCase(),d["Webkit"+s]="webkit"+a,d["Moz"+s]="moz"+a,d}var Di={animationend:Qu("Animation","AnimationEnd"),animationiteration:Qu("Animation","AnimationIteration"),animationstart:Qu("Animation","AnimationStart"),transitionend:Qu("Transition","TransitionEnd")},Jh={},Zv={};c&&(Zv=document.createElement("div").style,"AnimationEvent"in window||(delete Di.animationend.animation,delete Di.animationiteration.animation,delete Di.animationstart.animation),"TransitionEvent"in window||delete Di.transitionend.transition);function Gu(s){if(Jh[s])return Jh[s];if(!Di[s])return s;var a=Di[s],d;for(d in a)if(a.hasOwnProperty(d)&&d in Zv)return Jh[s]=a[d];return s}var Xv=Gu("animationend"),ew=Gu("animationiteration"),tw=Gu("animationstart"),nw=Gu("transitionend"),rw=new Map,ow="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Uo(s,a){rw.set(s,a),i(a,[s])}for(var Zh=0;Zh<ow.length;Zh++){var Xh=ow[Zh],vS=Xh.toLowerCase(),wS=Xh[0].toUpperCase()+Xh.slice(1);Uo(vS,"on"+wS)}Uo(Xv,"onAnimationEnd"),Uo(ew,"onAnimationIteration"),Uo(tw,"onAnimationStart"),Uo("dblclick","onDoubleClick"),Uo("focusin","onFocus"),Uo("focusout","onBlur"),Uo(nw,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),i("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),i("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),i("onBeforeInput",["compositionend","keypress","textInput","paste"]),i("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Rl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),bS=new Set("cancel close invalid load scroll toggle".split(" ").concat(Rl));function sw(s,a,d){var y=s.type||"unknown-event";s.currentTarget=d,vA(y,a,void 0,s),s.currentTarget=null}function iw(s,a){a=(a&4)!==0;for(var d=0;d<s.length;d++){var y=s[d],x=y.event;y=y.listeners;e:{var k=void 0;if(a)for(var _=y.length-1;0<=_;_--){var D=y[_],q=D.instance,ne=D.currentTarget;if(D=D.listener,q!==k&&x.isPropagationStopped())break e;sw(x,D,ne),k=q}else for(_=0;_<y.length;_++){if(D=y[_],q=D.instance,ne=D.currentTarget,D=D.listener,q!==k&&x.isPropagationStopped())break e;sw(x,D,ne),k=q}}}if(Tu)throw s=Ph,Tu=!1,Ph=null,s}function Xe(s,a){var d=a[ap];d===void 0&&(d=a[ap]=new Set);var y=s+"__bubble";d.has(y)||(aw(a,s,2,!1),d.add(y))}function ep(s,a,d){var y=0;a&&(y|=4),aw(d,s,y,a)}var Ku="_reactListening"+Math.random().toString(36).slice(2);function Ol(s){if(!s[Ku]){s[Ku]=!0,r.forEach(function(d){d!=="selectionchange"&&(bS.has(d)||ep(d,!1,s),ep(d,!0,s))});var a=s.nodeType===9?s:s.ownerDocument;a===null||a[Ku]||(a[Ku]=!0,ep("selectionchange",!1,a))}}function aw(s,a,d,y){switch(Pv(a)){case 1:var x=RA;break;case 4:x=OA;break;default:x=Fh}d=x.bind(null,a,d,s),x=void 0,!Nh||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(x=!0),y?x!==void 0?s.addEventListener(a,d,{capture:!0,passive:x}):s.addEventListener(a,d,!0):x!==void 0?s.addEventListener(a,d,{passive:x}):s.addEventListener(a,d,!1)}function tp(s,a,d,y,x){var k=y;if((a&1)===0&&(a&2)===0&&y!==null)e:for(;;){if(y===null)return;var _=y.tag;if(_===3||_===4){var D=y.stateNode.containerInfo;if(D===x||D.nodeType===8&&D.parentNode===x)break;if(_===4)for(_=y.return;_!==null;){var q=_.tag;if((q===3||q===4)&&(q=_.stateNode.containerInfo,q===x||q.nodeType===8&&q.parentNode===x))return;_=_.return}for(;D!==null;){if(_=Os(D),_===null)return;if(q=_.tag,q===5||q===6){y=k=_;continue e}D=D.parentNode}}y=y.return}fv(function(){var ne=k,le=gn(d),ce=[];e:{var ae=rw.get(s);if(ae!==void 0){var me=Uh,Ce=s;switch(s){case"keypress":if(Wu(d)===0)break e;case"keydown":case"keyup":me=YA;break;case"focusin":Ce="focus",me=Wh;break;case"focusout":Ce="blur",me=Wh;break;case"beforeblur":case"afterblur":me=Wh;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":me=_v;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":me=LA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":me=XA;break;case Xv:case ew:case tw:me=$A;break;case nw:me=tS;break;case"scroll":me=MA;break;case"wheel":me=rS;break;case"copy":case"cut":case"paste":me=WA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":me=Ov}var ke=(a&4)!==0,ft=!ke&&s==="scroll",Z=ke?ae!==null?ae+"Capture":null:ae;ke=[];for(var Q=ne,te;Q!==null;){te=Q;var de=te.stateNode;if(te.tag===5&&de!==null&&(te=de,Z!==null&&(de=yl(Q,Z),de!=null&&ke.push(Ml(Q,de,te)))),ft)break;Q=Q.return}0<ke.length&&(ae=new me(ae,Ce,null,d,le),ce.push({event:ae,listeners:ke}))}}if((a&7)===0){e:{if(ae=s==="mouseover"||s==="pointerover",me=s==="mouseout"||s==="pointerout",ae&&d!==Be&&(Ce=d.relatedTarget||d.fromElement)&&(Os(Ce)||Ce[eo]))break e;if((me||ae)&&(ae=le.window===le?le:(ae=le.ownerDocument)?ae.defaultView||ae.parentWindow:window,me?(Ce=d.relatedTarget||d.toElement,me=ne,Ce=Ce?Os(Ce):null,Ce!==null&&(ft=Rs(Ce),Ce!==ft||Ce.tag!==5&&Ce.tag!==6)&&(Ce=null)):(me=null,Ce=ne),me!==Ce)){if(ke=_v,de="onMouseLeave",Z="onMouseEnter",Q="mouse",(s==="pointerout"||s==="pointerover")&&(ke=Ov,de="onPointerLeave",Z="onPointerEnter",Q="pointer"),ft=me==null?ae:zi(me),te=Ce==null?ae:zi(Ce),ae=new ke(de,Q+"leave",me,d,le),ae.target=ft,ae.relatedTarget=te,de=null,Os(le)===ne&&(ke=new ke(Z,Q+"enter",Ce,d,le),ke.target=te,ke.relatedTarget=ft,de=ke),ft=de,me&&Ce)t:{for(ke=me,Z=Ce,Q=0,te=ke;te;te=Ui(te))Q++;for(te=0,de=Z;de;de=Ui(de))te++;for(;0<Q-te;)ke=Ui(ke),Q--;for(;0<te-Q;)Z=Ui(Z),te--;for(;Q--;){if(ke===Z||Z!==null&&ke===Z.alternate)break t;ke=Ui(ke),Z=Ui(Z)}ke=null}else ke=null;me!==null&&lw(ce,ae,me,ke,!1),Ce!==null&&ft!==null&&lw(ce,ft,Ce,ke,!0)}}e:{if(ae=ne?zi(ne):window,me=ae.nodeName&&ae.nodeName.toLowerCase(),me==="select"||me==="input"&&ae.type==="file")var Ae=uS;else if($v(ae))if(Wv)Ae=pS;else{Ae=fS;var Ie=dS}else(me=ae.nodeName)&&me.toLowerCase()==="input"&&(ae.type==="checkbox"||ae.type==="radio")&&(Ae=hS);if(Ae&&(Ae=Ae(s,ne))){zv(ce,Ae,d,le);break e}Ie&&Ie(s,ae,ne),s==="focusout"&&(Ie=ae._wrapperState)&&Ie.controlled&&ae.type==="number"&&Mt(ae,"number",ae.value)}switch(Ie=ne?zi(ne):window,s){case"focusin":($v(Ie)||Ie.contentEditable==="true")&&(Li=Ie,Kh=ne,_l=null);break;case"focusout":_l=Kh=Li=null;break;case"mousedown":Yh=!0;break;case"contextmenu":case"mouseup":case"dragend":Yh=!1,Jv(ce,d,le);break;case"selectionchange":if(yS)break;case"keydown":case"keyup":Jv(ce,d,le)}var Ne;if(Hh)e:{switch(s){case"compositionstart":var Te="onCompositionStart";break e;case"compositionend":Te="onCompositionEnd";break e;case"compositionupdate":Te="onCompositionUpdate";break e}Te=void 0}else Fi?Dv(s,d)&&(Te="onCompositionEnd"):s==="keydown"&&d.keyCode===229&&(Te="onCompositionStart");Te&&(Mv&&d.locale!=="ko"&&(Fi||Te!=="onCompositionStart"?Te==="onCompositionEnd"&&Fi&&(Ne=Bv()):(Do=le,Dh="value"in Do?Do.value:Do.textContent,Fi=!0)),Ie=Yu(ne,Te),0<Ie.length&&(Te=new Rv(Te,s,null,d,le),ce.push({event:Te,listeners:Ie}),Ne?Te.data=Ne:(Ne=Uv(d),Ne!==null&&(Te.data=Ne)))),(Ne=sS?iS(s,d):aS(s,d))&&(ne=Yu(ne,"onBeforeInput"),0<ne.length&&(le=new Rv("onBeforeInput","beforeinput",null,d,le),ce.push({event:le,listeners:ne}),le.data=Ne))}iw(ce,a)})}function Ml(s,a,d){return{instance:s,listener:a,currentTarget:d}}function Yu(s,a){for(var d=a+"Capture",y=[];s!==null;){var x=s,k=x.stateNode;x.tag===5&&k!==null&&(x=k,k=yl(s,d),k!=null&&y.unshift(Ml(s,k,x)),k=yl(s,a),k!=null&&y.push(Ml(s,k,x))),s=s.return}return y}function Ui(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function lw(s,a,d,y,x){for(var k=a._reactName,_=[];d!==null&&d!==y;){var D=d,q=D.alternate,ne=D.stateNode;if(q!==null&&q===y)break;D.tag===5&&ne!==null&&(D=ne,x?(q=yl(d,k),q!=null&&_.unshift(Ml(d,q,D))):x||(q=yl(d,k),q!=null&&_.push(Ml(d,q,D)))),d=d.return}_.length!==0&&s.push({event:a,listeners:_})}var xS=/\r\n?/g,CS=/\u0000|\uFFFD/g;function cw(s){return(typeof s=="string"?s:""+s).replace(xS,`
|
|
39
|
-
`).replace(CS,"")}function Ju(s,a,d){if(a=cw(a),cw(s)!==a&&d)throw Error(n(425))}function Zu(){}var np=null,rp=null;function op(s,a){return s==="textarea"||s==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var sp=typeof setTimeout=="function"?setTimeout:void 0,kS=typeof clearTimeout=="function"?clearTimeout:void 0,uw=typeof Promise=="function"?Promise:void 0,ES=typeof queueMicrotask=="function"?queueMicrotask:typeof uw<"u"?function(s){return uw.resolve(null).then(s).catch(AS)}:sp;function AS(s){setTimeout(function(){throw s})}function ip(s,a){var d=a,y=0;do{var x=d.nextSibling;if(s.removeChild(d),x&&x.nodeType===8)if(d=x.data,d==="/$"){if(y===0){s.removeChild(x),Sl(a);return}y--}else d!=="$"&&d!=="$?"&&d!=="$!"||y++;d=x}while(d);Sl(a)}function $o(s){for(;s!=null;s=s.nextSibling){var a=s.nodeType;if(a===1||a===3)break;if(a===8){if(a=s.data,a==="$"||a==="$!"||a==="$?")break;if(a==="/$")return null}}return s}function dw(s){s=s.previousSibling;for(var a=0;s;){if(s.nodeType===8){var d=s.data;if(d==="$"||d==="$!"||d==="$?"){if(a===0)return s;a--}else d==="/$"&&a++}s=s.previousSibling}return null}var $i=Math.random().toString(36).slice(2),Tr="__reactFiber$"+$i,Fl="__reactProps$"+$i,eo="__reactContainer$"+$i,ap="__reactEvents$"+$i,SS="__reactListeners$"+$i,jS="__reactHandles$"+$i;function Os(s){var a=s[Tr];if(a)return a;for(var d=s.parentNode;d;){if(a=d[eo]||d[Tr]){if(d=a.alternate,a.child!==null||d!==null&&d.child!==null)for(s=dw(s);s!==null;){if(d=s[Tr])return d;s=dw(s)}return a}s=d,d=s.parentNode}return null}function Ll(s){return s=s[Tr]||s[eo],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function zi(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(n(33))}function Xu(s){return s[Fl]||null}var lp=[],Wi=-1;function zo(s){return{current:s}}function et(s){0>Wi||(s.current=lp[Wi],lp[Wi]=null,Wi--)}function Ze(s,a){Wi++,lp[Wi]=s.current,s.current=a}var Wo={},Ht=zo(Wo),yn=zo(!1),Ms=Wo;function qi(s,a){var d=s.type.contextTypes;if(!d)return Wo;var y=s.stateNode;if(y&&y.__reactInternalMemoizedUnmaskedChildContext===a)return y.__reactInternalMemoizedMaskedChildContext;var x={},k;for(k in d)x[k]=a[k];return y&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=a,s.__reactInternalMemoizedMaskedChildContext=x),x}function vn(s){return s=s.childContextTypes,s!=null}function ed(){et(yn),et(Ht)}function fw(s,a,d){if(Ht.current!==Wo)throw Error(n(168));Ze(Ht,a),Ze(yn,d)}function hw(s,a,d){var y=s.stateNode;if(a=a.childContextTypes,typeof y.getChildContext!="function")return d;y=y.getChildContext();for(var x in y)if(!(x in a))throw Error(n(108,ue(s)||"Unknown",x));return Y({},d,y)}function td(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||Wo,Ms=Ht.current,Ze(Ht,s),Ze(yn,yn.current),!0}function pw(s,a,d){var y=s.stateNode;if(!y)throw Error(n(169));d?(s=hw(s,a,Ms),y.__reactInternalMemoizedMergedChildContext=s,et(yn),et(Ht),Ze(Ht,s)):et(yn),Ze(yn,d)}var to=null,nd=!1,cp=!1;function mw(s){to===null?to=[s]:to.push(s)}function IS(s){nd=!0,mw(s)}function qo(){if(!cp&&to!==null){cp=!0;var s=0,a=Ke;try{var d=to;for(Ke=1;s<d.length;s++){var y=d[s];do y=y(!0);while(y!==null)}to=null,nd=!1}catch(x){throw to!==null&&(to=to.slice(s+1)),yv(Bh,qo),x}finally{Ke=a,cp=!1}}return null}var Hi=[],Vi=0,rd=null,od=0,Gn=[],Kn=0,Fs=null,no=1,ro="";function Ls(s,a){Hi[Vi++]=od,Hi[Vi++]=rd,rd=s,od=a}function gw(s,a,d){Gn[Kn++]=no,Gn[Kn++]=ro,Gn[Kn++]=Fs,Fs=s;var y=no;s=ro;var x=32-hr(y)-1;y&=~(1<<x),d+=1;var k=32-hr(a)+x;if(30<k){var _=x-x%5;k=(y&(1<<_)-1).toString(32),y>>=_,x-=_,no=1<<32-hr(a)+x|d<<x|y,ro=k+s}else no=1<<k|d<<x|y,ro=s}function up(s){s.return!==null&&(Ls(s,1),gw(s,1,0))}function dp(s){for(;s===rd;)rd=Hi[--Vi],Hi[Vi]=null,od=Hi[--Vi],Hi[Vi]=null;for(;s===Fs;)Fs=Gn[--Kn],Gn[Kn]=null,ro=Gn[--Kn],Gn[Kn]=null,no=Gn[--Kn],Gn[Kn]=null}var Fn=null,Ln=null,ot=!1,mr=null;function yw(s,a){var d=Xn(5,null,null,0);d.elementType="DELETED",d.stateNode=a,d.return=s,a=s.deletions,a===null?(s.deletions=[d],s.flags|=16):a.push(d)}function vw(s,a){switch(s.tag){case 5:var d=s.type;return a=a.nodeType!==1||d.toLowerCase()!==a.nodeName.toLowerCase()?null:a,a!==null?(s.stateNode=a,Fn=s,Ln=$o(a.firstChild),!0):!1;case 6:return a=s.pendingProps===""||a.nodeType!==3?null:a,a!==null?(s.stateNode=a,Fn=s,Ln=null,!0):!1;case 13:return a=a.nodeType!==8?null:a,a!==null?(d=Fs!==null?{id:no,overflow:ro}:null,s.memoizedState={dehydrated:a,treeContext:d,retryLane:1073741824},d=Xn(18,null,null,0),d.stateNode=a,d.return=s,s.child=d,Fn=s,Ln=null,!0):!1;default:return!1}}function fp(s){return(s.mode&1)!==0&&(s.flags&128)===0}function hp(s){if(ot){var a=Ln;if(a){var d=a;if(!vw(s,a)){if(fp(s))throw Error(n(418));a=$o(d.nextSibling);var y=Fn;a&&vw(s,a)?yw(y,d):(s.flags=s.flags&-4097|2,ot=!1,Fn=s)}}else{if(fp(s))throw Error(n(418));s.flags=s.flags&-4097|2,ot=!1,Fn=s}}}function ww(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;Fn=s}function sd(s){if(s!==Fn)return!1;if(!ot)return ww(s),ot=!0,!1;var a;if((a=s.tag!==3)&&!(a=s.tag!==5)&&(a=s.type,a=a!=="head"&&a!=="body"&&!op(s.type,s.memoizedProps)),a&&(a=Ln)){if(fp(s))throw bw(),Error(n(418));for(;a;)yw(s,a),a=$o(a.nextSibling)}if(ww(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));e:{for(s=s.nextSibling,a=0;s;){if(s.nodeType===8){var d=s.data;if(d==="/$"){if(a===0){Ln=$o(s.nextSibling);break e}a--}else d!=="$"&&d!=="$!"&&d!=="$?"||a++}s=s.nextSibling}Ln=null}}else Ln=Fn?$o(s.stateNode.nextSibling):null;return!0}function bw(){for(var s=Ln;s;)s=$o(s.nextSibling)}function Qi(){Ln=Fn=null,ot=!1}function pp(s){mr===null?mr=[s]:mr.push(s)}var NS=S.ReactCurrentBatchConfig;function Dl(s,a,d){if(s=d.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(d._owner){if(d=d._owner,d){if(d.tag!==1)throw Error(n(309));var y=d.stateNode}if(!y)throw Error(n(147,s));var x=y,k=""+s;return a!==null&&a.ref!==null&&typeof a.ref=="function"&&a.ref._stringRef===k?a.ref:(a=function(_){var D=x.refs;_===null?delete D[k]:D[k]=_},a._stringRef=k,a)}if(typeof s!="string")throw Error(n(284));if(!d._owner)throw Error(n(290,s))}return s}function id(s,a){throw s=Object.prototype.toString.call(a),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":s))}function xw(s){var a=s._init;return a(s._payload)}function Cw(s){function a(Z,Q){if(s){var te=Z.deletions;te===null?(Z.deletions=[Q],Z.flags|=16):te.push(Q)}}function d(Z,Q){if(!s)return null;for(;Q!==null;)a(Z,Q),Q=Q.sibling;return null}function y(Z,Q){for(Z=new Map;Q!==null;)Q.key!==null?Z.set(Q.key,Q):Z.set(Q.index,Q),Q=Q.sibling;return Z}function x(Z,Q){return Z=Zo(Z,Q),Z.index=0,Z.sibling=null,Z}function k(Z,Q,te){return Z.index=te,s?(te=Z.alternate,te!==null?(te=te.index,te<Q?(Z.flags|=2,Q):te):(Z.flags|=2,Q)):(Z.flags|=1048576,Q)}function _(Z){return s&&Z.alternate===null&&(Z.flags|=2),Z}function D(Z,Q,te,de){return Q===null||Q.tag!==6?(Q=s0(te,Z.mode,de),Q.return=Z,Q):(Q=x(Q,te),Q.return=Z,Q)}function q(Z,Q,te,de){var Ae=te.type;return Ae===B?le(Z,Q,te.props.children,de,te.key):Q!==null&&(Q.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===G&&xw(Ae)===Q.type)?(de=x(Q,te.props),de.ref=Dl(Z,Q,te),de.return=Z,de):(de=Pd(te.type,te.key,te.props,null,Z.mode,de),de.ref=Dl(Z,Q,te),de.return=Z,de)}function ne(Z,Q,te,de){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==te.containerInfo||Q.stateNode.implementation!==te.implementation?(Q=i0(te,Z.mode,de),Q.return=Z,Q):(Q=x(Q,te.children||[]),Q.return=Z,Q)}function le(Z,Q,te,de,Ae){return Q===null||Q.tag!==7?(Q=Vs(te,Z.mode,de,Ae),Q.return=Z,Q):(Q=x(Q,te),Q.return=Z,Q)}function ce(Z,Q,te){if(typeof Q=="string"&&Q!==""||typeof Q=="number")return Q=s0(""+Q,Z.mode,te),Q.return=Z,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case N:return te=Pd(Q.type,Q.key,Q.props,null,Z.mode,te),te.ref=Dl(Z,null,Q),te.return=Z,te;case T:return Q=i0(Q,Z.mode,te),Q.return=Z,Q;case G:var de=Q._init;return ce(Z,de(Q._payload),te)}if(ye(Q)||K(Q))return Q=Vs(Q,Z.mode,te,null),Q.return=Z,Q;id(Z,Q)}return null}function ae(Z,Q,te,de){var Ae=Q!==null?Q.key:null;if(typeof te=="string"&&te!==""||typeof te=="number")return Ae!==null?null:D(Z,Q,""+te,de);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case N:return te.key===Ae?q(Z,Q,te,de):null;case T:return te.key===Ae?ne(Z,Q,te,de):null;case G:return Ae=te._init,ae(Z,Q,Ae(te._payload),de)}if(ye(te)||K(te))return Ae!==null?null:le(Z,Q,te,de,null);id(Z,te)}return null}function me(Z,Q,te,de,Ae){if(typeof de=="string"&&de!==""||typeof de=="number")return Z=Z.get(te)||null,D(Q,Z,""+de,Ae);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case N:return Z=Z.get(de.key===null?te:de.key)||null,q(Q,Z,de,Ae);case T:return Z=Z.get(de.key===null?te:de.key)||null,ne(Q,Z,de,Ae);case G:var Ie=de._init;return me(Z,Q,te,Ie(de._payload),Ae)}if(ye(de)||K(de))return Z=Z.get(te)||null,le(Q,Z,de,Ae,null);id(Q,de)}return null}function Ce(Z,Q,te,de){for(var Ae=null,Ie=null,Ne=Q,Te=Q=0,Bt=null;Ne!==null&&Te<te.length;Te++){Ne.index>Te?(Bt=Ne,Ne=null):Bt=Ne.sibling;var He=ae(Z,Ne,te[Te],de);if(He===null){Ne===null&&(Ne=Bt);break}s&&Ne&&He.alternate===null&&a(Z,Ne),Q=k(He,Q,Te),Ie===null?Ae=He:Ie.sibling=He,Ie=He,Ne=Bt}if(Te===te.length)return d(Z,Ne),ot&&Ls(Z,Te),Ae;if(Ne===null){for(;Te<te.length;Te++)Ne=ce(Z,te[Te],de),Ne!==null&&(Q=k(Ne,Q,Te),Ie===null?Ae=Ne:Ie.sibling=Ne,Ie=Ne);return ot&&Ls(Z,Te),Ae}for(Ne=y(Z,Ne);Te<te.length;Te++)Bt=me(Ne,Z,Te,te[Te],de),Bt!==null&&(s&&Bt.alternate!==null&&Ne.delete(Bt.key===null?Te:Bt.key),Q=k(Bt,Q,Te),Ie===null?Ae=Bt:Ie.sibling=Bt,Ie=Bt);return s&&Ne.forEach(function(Xo){return a(Z,Xo)}),ot&&Ls(Z,Te),Ae}function ke(Z,Q,te,de){var Ae=K(te);if(typeof Ae!="function")throw Error(n(150));if(te=Ae.call(te),te==null)throw Error(n(151));for(var Ie=Ae=null,Ne=Q,Te=Q=0,Bt=null,He=te.next();Ne!==null&&!He.done;Te++,He=te.next()){Ne.index>Te?(Bt=Ne,Ne=null):Bt=Ne.sibling;var Xo=ae(Z,Ne,He.value,de);if(Xo===null){Ne===null&&(Ne=Bt);break}s&&Ne&&Xo.alternate===null&&a(Z,Ne),Q=k(Xo,Q,Te),Ie===null?Ae=Xo:Ie.sibling=Xo,Ie=Xo,Ne=Bt}if(He.done)return d(Z,Ne),ot&&Ls(Z,Te),Ae;if(Ne===null){for(;!He.done;Te++,He=te.next())He=ce(Z,He.value,de),He!==null&&(Q=k(He,Q,Te),Ie===null?Ae=He:Ie.sibling=He,Ie=He);return ot&&Ls(Z,Te),Ae}for(Ne=y(Z,Ne);!He.done;Te++,He=te.next())He=me(Ne,Z,Te,He.value,de),He!==null&&(s&&He.alternate!==null&&Ne.delete(He.key===null?Te:He.key),Q=k(He,Q,Te),Ie===null?Ae=He:Ie.sibling=He,Ie=He);return s&&Ne.forEach(function(lj){return a(Z,lj)}),ot&&Ls(Z,Te),Ae}function ft(Z,Q,te,de){if(typeof te=="object"&&te!==null&&te.type===B&&te.key===null&&(te=te.props.children),typeof te=="object"&&te!==null){switch(te.$$typeof){case N:e:{for(var Ae=te.key,Ie=Q;Ie!==null;){if(Ie.key===Ae){if(Ae=te.type,Ae===B){if(Ie.tag===7){d(Z,Ie.sibling),Q=x(Ie,te.props.children),Q.return=Z,Z=Q;break e}}else if(Ie.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===G&&xw(Ae)===Ie.type){d(Z,Ie.sibling),Q=x(Ie,te.props),Q.ref=Dl(Z,Ie,te),Q.return=Z,Z=Q;break e}d(Z,Ie);break}else a(Z,Ie);Ie=Ie.sibling}te.type===B?(Q=Vs(te.props.children,Z.mode,de,te.key),Q.return=Z,Z=Q):(de=Pd(te.type,te.key,te.props,null,Z.mode,de),de.ref=Dl(Z,Q,te),de.return=Z,Z=de)}return _(Z);case T:e:{for(Ie=te.key;Q!==null;){if(Q.key===Ie)if(Q.tag===4&&Q.stateNode.containerInfo===te.containerInfo&&Q.stateNode.implementation===te.implementation){d(Z,Q.sibling),Q=x(Q,te.children||[]),Q.return=Z,Z=Q;break e}else{d(Z,Q);break}else a(Z,Q);Q=Q.sibling}Q=i0(te,Z.mode,de),Q.return=Z,Z=Q}return _(Z);case G:return Ie=te._init,ft(Z,Q,Ie(te._payload),de)}if(ye(te))return Ce(Z,Q,te,de);if(K(te))return ke(Z,Q,te,de);id(Z,te)}return typeof te=="string"&&te!==""||typeof te=="number"?(te=""+te,Q!==null&&Q.tag===6?(d(Z,Q.sibling),Q=x(Q,te),Q.return=Z,Z=Q):(d(Z,Q),Q=s0(te,Z.mode,de),Q.return=Z,Z=Q),_(Z)):d(Z,Q)}return ft}var Gi=Cw(!0),kw=Cw(!1),ad=zo(null),ld=null,Ki=null,mp=null;function gp(){mp=Ki=ld=null}function yp(s){var a=ad.current;et(ad),s._currentValue=a}function vp(s,a,d){for(;s!==null;){var y=s.alternate;if((s.childLanes&a)!==a?(s.childLanes|=a,y!==null&&(y.childLanes|=a)):y!==null&&(y.childLanes&a)!==a&&(y.childLanes|=a),s===d)break;s=s.return}}function Yi(s,a){ld=s,mp=Ki=null,s=s.dependencies,s!==null&&s.firstContext!==null&&((s.lanes&a)!==0&&(wn=!0),s.firstContext=null)}function Yn(s){var a=s._currentValue;if(mp!==s)if(s={context:s,memoizedValue:a,next:null},Ki===null){if(ld===null)throw Error(n(308));Ki=s,ld.dependencies={lanes:0,firstContext:s}}else Ki=Ki.next=s;return a}var Ds=null;function wp(s){Ds===null?Ds=[s]:Ds.push(s)}function Ew(s,a,d,y){var x=a.interleaved;return x===null?(d.next=d,wp(a)):(d.next=x.next,x.next=d),a.interleaved=d,oo(s,y)}function oo(s,a){s.lanes|=a;var d=s.alternate;for(d!==null&&(d.lanes|=a),d=s,s=s.return;s!==null;)s.childLanes|=a,d=s.alternate,d!==null&&(d.childLanes|=a),d=s,s=s.return;return d.tag===3?d.stateNode:null}var Ho=!1;function bp(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Aw(s,a){s=s.updateQueue,a.updateQueue===s&&(a.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function so(s,a){return{eventTime:s,lane:a,tag:0,payload:null,callback:null,next:null}}function Vo(s,a,d){var y=s.updateQueue;if(y===null)return null;if(y=y.shared,(qe&2)!==0){var x=y.pending;return x===null?a.next=a:(a.next=x.next,x.next=a),y.pending=a,oo(s,d)}return x=y.interleaved,x===null?(a.next=a,wp(y)):(a.next=x.next,x.next=a),y.interleaved=a,oo(s,d)}function cd(s,a,d){if(a=a.updateQueue,a!==null&&(a=a.shared,(d&4194240)!==0)){var y=a.lanes;y&=s.pendingLanes,d|=y,a.lanes=d,Rh(s,d)}}function Sw(s,a){var d=s.updateQueue,y=s.alternate;if(y!==null&&(y=y.updateQueue,d===y)){var x=null,k=null;if(d=d.firstBaseUpdate,d!==null){do{var _={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};k===null?x=k=_:k=k.next=_,d=d.next}while(d!==null);k===null?x=k=a:k=k.next=a}else x=k=a;d={baseState:y.baseState,firstBaseUpdate:x,lastBaseUpdate:k,shared:y.shared,effects:y.effects},s.updateQueue=d;return}s=d.lastBaseUpdate,s===null?d.firstBaseUpdate=a:s.next=a,d.lastBaseUpdate=a}function ud(s,a,d,y){var x=s.updateQueue;Ho=!1;var k=x.firstBaseUpdate,_=x.lastBaseUpdate,D=x.shared.pending;if(D!==null){x.shared.pending=null;var q=D,ne=q.next;q.next=null,_===null?k=ne:_.next=ne,_=q;var le=s.alternate;le!==null&&(le=le.updateQueue,D=le.lastBaseUpdate,D!==_&&(D===null?le.firstBaseUpdate=ne:D.next=ne,le.lastBaseUpdate=q))}if(k!==null){var ce=x.baseState;_=0,le=ne=q=null,D=k;do{var ae=D.lane,me=D.eventTime;if((y&ae)===ae){le!==null&&(le=le.next={eventTime:me,lane:0,tag:D.tag,payload:D.payload,callback:D.callback,next:null});e:{var Ce=s,ke=D;switch(ae=a,me=d,ke.tag){case 1:if(Ce=ke.payload,typeof Ce=="function"){ce=Ce.call(me,ce,ae);break e}ce=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=ke.payload,ae=typeof Ce=="function"?Ce.call(me,ce,ae):Ce,ae==null)break e;ce=Y({},ce,ae);break e;case 2:Ho=!0}}D.callback!==null&&D.lane!==0&&(s.flags|=64,ae=x.effects,ae===null?x.effects=[D]:ae.push(D))}else me={eventTime:me,lane:ae,tag:D.tag,payload:D.payload,callback:D.callback,next:null},le===null?(ne=le=me,q=ce):le=le.next=me,_|=ae;if(D=D.next,D===null){if(D=x.shared.pending,D===null)break;ae=D,D=ae.next,ae.next=null,x.lastBaseUpdate=ae,x.shared.pending=null}}while(!0);if(le===null&&(q=ce),x.baseState=q,x.firstBaseUpdate=ne,x.lastBaseUpdate=le,a=x.shared.interleaved,a!==null){x=a;do _|=x.lane,x=x.next;while(x!==a)}else k===null&&(x.shared.lanes=0);zs|=_,s.lanes=_,s.memoizedState=ce}}function jw(s,a,d){if(s=a.effects,a.effects=null,s!==null)for(a=0;a<s.length;a++){var y=s[a],x=y.callback;if(x!==null){if(y.callback=null,y=d,typeof x!="function")throw Error(n(191,x));x.call(y)}}}var Ul={},_r=zo(Ul),$l=zo(Ul),zl=zo(Ul);function Us(s){if(s===Ul)throw Error(n(174));return s}function xp(s,a){switch(Ze(zl,a),Ze($l,s),Ze(_r,Ul),s=a.nodeType,s){case 9:case 11:a=(a=a.documentElement)?a.namespaceURI:_i(null,"");break;default:s=s===8?a.parentNode:a,a=s.namespaceURI||null,s=s.tagName,a=_i(a,s)}et(_r),Ze(_r,a)}function Ji(){et(_r),et($l),et(zl)}function Iw(s){Us(zl.current);var a=Us(_r.current),d=_i(a,s.type);a!==d&&(Ze($l,s),Ze(_r,d))}function Cp(s){$l.current===s&&(et(_r),et($l))}var st=zo(0);function dd(s){for(var a=s;a!==null;){if(a.tag===13){var d=a.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||d.data==="$?"||d.data==="$!"))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break;for(;a.sibling===null;){if(a.return===null||a.return===s)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var kp=[];function Ep(){for(var s=0;s<kp.length;s++)kp[s]._workInProgressVersionPrimary=null;kp.length=0}var fd=S.ReactCurrentDispatcher,Ap=S.ReactCurrentBatchConfig,$s=0,it=null,Ct=null,Nt=null,hd=!1,Wl=!1,ql=0,PS=0;function Vt(){throw Error(n(321))}function Sp(s,a){if(a===null)return!1;for(var d=0;d<a.length&&d<s.length;d++)if(!pr(s[d],a[d]))return!1;return!0}function jp(s,a,d,y,x,k){if($s=k,it=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,fd.current=s===null||s.memoizedState===null?RS:OS,s=d(y,x),Wl){k=0;do{if(Wl=!1,ql=0,25<=k)throw Error(n(301));k+=1,Nt=Ct=null,a.updateQueue=null,fd.current=MS,s=d(y,x)}while(Wl)}if(fd.current=gd,a=Ct!==null&&Ct.next!==null,$s=0,Nt=Ct=it=null,hd=!1,a)throw Error(n(300));return s}function Ip(){var s=ql!==0;return ql=0,s}function Rr(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Nt===null?it.memoizedState=Nt=s:Nt=Nt.next=s,Nt}function Jn(){if(Ct===null){var s=it.alternate;s=s!==null?s.memoizedState:null}else s=Ct.next;var a=Nt===null?it.memoizedState:Nt.next;if(a!==null)Nt=a,Ct=s;else{if(s===null)throw Error(n(310));Ct=s,s={memoizedState:Ct.memoizedState,baseState:Ct.baseState,baseQueue:Ct.baseQueue,queue:Ct.queue,next:null},Nt===null?it.memoizedState=Nt=s:Nt=Nt.next=s}return Nt}function Hl(s,a){return typeof a=="function"?a(s):a}function Np(s){var a=Jn(),d=a.queue;if(d===null)throw Error(n(311));d.lastRenderedReducer=s;var y=Ct,x=y.baseQueue,k=d.pending;if(k!==null){if(x!==null){var _=x.next;x.next=k.next,k.next=_}y.baseQueue=x=k,d.pending=null}if(x!==null){k=x.next,y=y.baseState;var D=_=null,q=null,ne=k;do{var le=ne.lane;if(($s&le)===le)q!==null&&(q=q.next={lane:0,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null}),y=ne.hasEagerState?ne.eagerState:s(y,ne.action);else{var ce={lane:le,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null};q===null?(D=q=ce,_=y):q=q.next=ce,it.lanes|=le,zs|=le}ne=ne.next}while(ne!==null&&ne!==k);q===null?_=y:q.next=D,pr(y,a.memoizedState)||(wn=!0),a.memoizedState=y,a.baseState=_,a.baseQueue=q,d.lastRenderedState=y}if(s=d.interleaved,s!==null){x=s;do k=x.lane,it.lanes|=k,zs|=k,x=x.next;while(x!==s)}else x===null&&(d.lanes=0);return[a.memoizedState,d.dispatch]}function Pp(s){var a=Jn(),d=a.queue;if(d===null)throw Error(n(311));d.lastRenderedReducer=s;var y=d.dispatch,x=d.pending,k=a.memoizedState;if(x!==null){d.pending=null;var _=x=x.next;do k=s(k,_.action),_=_.next;while(_!==x);pr(k,a.memoizedState)||(wn=!0),a.memoizedState=k,a.baseQueue===null&&(a.baseState=k),d.lastRenderedState=k}return[k,y]}function Nw(){}function Pw(s,a){var d=it,y=Jn(),x=a(),k=!pr(y.memoizedState,x);if(k&&(y.memoizedState=x,wn=!0),y=y.queue,Bp(_w.bind(null,d,y,s),[s]),y.getSnapshot!==a||k||Nt!==null&&Nt.memoizedState.tag&1){if(d.flags|=2048,Vl(9,Tw.bind(null,d,y,x,a),void 0,null),Pt===null)throw Error(n(349));($s&30)!==0||Bw(d,a,x)}return x}function Bw(s,a,d){s.flags|=16384,s={getSnapshot:a,value:d},a=it.updateQueue,a===null?(a={lastEffect:null,stores:null},it.updateQueue=a,a.stores=[s]):(d=a.stores,d===null?a.stores=[s]:d.push(s))}function Tw(s,a,d,y){a.value=d,a.getSnapshot=y,Rw(a)&&Ow(s)}function _w(s,a,d){return d(function(){Rw(a)&&Ow(s)})}function Rw(s){var a=s.getSnapshot;s=s.value;try{var d=a();return!pr(s,d)}catch{return!0}}function Ow(s){var a=oo(s,1);a!==null&&wr(a,s,1,-1)}function Mw(s){var a=Rr();return typeof s=="function"&&(s=s()),a.memoizedState=a.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Hl,lastRenderedState:s},a.queue=s,s=s.dispatch=_S.bind(null,it,s),[a.memoizedState,s]}function Vl(s,a,d,y){return s={tag:s,create:a,destroy:d,deps:y,next:null},a=it.updateQueue,a===null?(a={lastEffect:null,stores:null},it.updateQueue=a,a.lastEffect=s.next=s):(d=a.lastEffect,d===null?a.lastEffect=s.next=s:(y=d.next,d.next=s,s.next=y,a.lastEffect=s)),s}function Fw(){return Jn().memoizedState}function pd(s,a,d,y){var x=Rr();it.flags|=s,x.memoizedState=Vl(1|a,d,void 0,y===void 0?null:y)}function md(s,a,d,y){var x=Jn();y=y===void 0?null:y;var k=void 0;if(Ct!==null){var _=Ct.memoizedState;if(k=_.destroy,y!==null&&Sp(y,_.deps)){x.memoizedState=Vl(a,d,k,y);return}}it.flags|=s,x.memoizedState=Vl(1|a,d,k,y)}function Lw(s,a){return pd(8390656,8,s,a)}function Bp(s,a){return md(2048,8,s,a)}function Dw(s,a){return md(4,2,s,a)}function Uw(s,a){return md(4,4,s,a)}function $w(s,a){if(typeof a=="function")return s=s(),a(s),function(){a(null)};if(a!=null)return s=s(),a.current=s,function(){a.current=null}}function zw(s,a,d){return d=d!=null?d.concat([s]):null,md(4,4,$w.bind(null,a,s),d)}function Tp(){}function Ww(s,a){var d=Jn();a=a===void 0?null:a;var y=d.memoizedState;return y!==null&&a!==null&&Sp(a,y[1])?y[0]:(d.memoizedState=[s,a],s)}function qw(s,a){var d=Jn();a=a===void 0?null:a;var y=d.memoizedState;return y!==null&&a!==null&&Sp(a,y[1])?y[0]:(s=s(),d.memoizedState=[s,a],s)}function Hw(s,a,d){return($s&21)===0?(s.baseState&&(s.baseState=!1,wn=!0),s.memoizedState=d):(pr(d,a)||(d=xv(),it.lanes|=d,zs|=d,s.baseState=!0),a)}function BS(s,a){var d=Ke;Ke=d!==0&&4>d?d:4,s(!0);var y=Ap.transition;Ap.transition={};try{s(!1),a()}finally{Ke=d,Ap.transition=y}}function Vw(){return Jn().memoizedState}function TS(s,a,d){var y=Yo(s);if(d={lane:y,action:d,hasEagerState:!1,eagerState:null,next:null},Qw(s))Gw(a,d);else if(d=Ew(s,a,d,y),d!==null){var x=ln();wr(d,s,y,x),Kw(d,a,y)}}function _S(s,a,d){var y=Yo(s),x={lane:y,action:d,hasEagerState:!1,eagerState:null,next:null};if(Qw(s))Gw(a,x);else{var k=s.alternate;if(s.lanes===0&&(k===null||k.lanes===0)&&(k=a.lastRenderedReducer,k!==null))try{var _=a.lastRenderedState,D=k(_,d);if(x.hasEagerState=!0,x.eagerState=D,pr(D,_)){var q=a.interleaved;q===null?(x.next=x,wp(a)):(x.next=q.next,q.next=x),a.interleaved=x;return}}catch{}finally{}d=Ew(s,a,x,y),d!==null&&(x=ln(),wr(d,s,y,x),Kw(d,a,y))}}function Qw(s){var a=s.alternate;return s===it||a!==null&&a===it}function Gw(s,a){Wl=hd=!0;var d=s.pending;d===null?a.next=a:(a.next=d.next,d.next=a),s.pending=a}function Kw(s,a,d){if((d&4194240)!==0){var y=a.lanes;y&=s.pendingLanes,d|=y,a.lanes=d,Rh(s,d)}}var gd={readContext:Yn,useCallback:Vt,useContext:Vt,useEffect:Vt,useImperativeHandle:Vt,useInsertionEffect:Vt,useLayoutEffect:Vt,useMemo:Vt,useReducer:Vt,useRef:Vt,useState:Vt,useDebugValue:Vt,useDeferredValue:Vt,useTransition:Vt,useMutableSource:Vt,useSyncExternalStore:Vt,useId:Vt,unstable_isNewReconciler:!1},RS={readContext:Yn,useCallback:function(s,a){return Rr().memoizedState=[s,a===void 0?null:a],s},useContext:Yn,useEffect:Lw,useImperativeHandle:function(s,a,d){return d=d!=null?d.concat([s]):null,pd(4194308,4,$w.bind(null,a,s),d)},useLayoutEffect:function(s,a){return pd(4194308,4,s,a)},useInsertionEffect:function(s,a){return pd(4,2,s,a)},useMemo:function(s,a){var d=Rr();return a=a===void 0?null:a,s=s(),d.memoizedState=[s,a],s},useReducer:function(s,a,d){var y=Rr();return a=d!==void 0?d(a):a,y.memoizedState=y.baseState=a,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:a},y.queue=s,s=s.dispatch=TS.bind(null,it,s),[y.memoizedState,s]},useRef:function(s){var a=Rr();return s={current:s},a.memoizedState=s},useState:Mw,useDebugValue:Tp,useDeferredValue:function(s){return Rr().memoizedState=s},useTransition:function(){var s=Mw(!1),a=s[0];return s=BS.bind(null,s[1]),Rr().memoizedState=s,[a,s]},useMutableSource:function(){},useSyncExternalStore:function(s,a,d){var y=it,x=Rr();if(ot){if(d===void 0)throw Error(n(407));d=d()}else{if(d=a(),Pt===null)throw Error(n(349));($s&30)!==0||Bw(y,a,d)}x.memoizedState=d;var k={value:d,getSnapshot:a};return x.queue=k,Lw(_w.bind(null,y,k,s),[s]),y.flags|=2048,Vl(9,Tw.bind(null,y,k,d,a),void 0,null),d},useId:function(){var s=Rr(),a=Pt.identifierPrefix;if(ot){var d=ro,y=no;d=(y&~(1<<32-hr(y)-1)).toString(32)+d,a=":"+a+"R"+d,d=ql++,0<d&&(a+="H"+d.toString(32)),a+=":"}else d=PS++,a=":"+a+"r"+d.toString(32)+":";return s.memoizedState=a},unstable_isNewReconciler:!1},OS={readContext:Yn,useCallback:Ww,useContext:Yn,useEffect:Bp,useImperativeHandle:zw,useInsertionEffect:Dw,useLayoutEffect:Uw,useMemo:qw,useReducer:Np,useRef:Fw,useState:function(){return Np(Hl)},useDebugValue:Tp,useDeferredValue:function(s){var a=Jn();return Hw(a,Ct.memoizedState,s)},useTransition:function(){var s=Np(Hl)[0],a=Jn().memoizedState;return[s,a]},useMutableSource:Nw,useSyncExternalStore:Pw,useId:Vw,unstable_isNewReconciler:!1},MS={readContext:Yn,useCallback:Ww,useContext:Yn,useEffect:Bp,useImperativeHandle:zw,useInsertionEffect:Dw,useLayoutEffect:Uw,useMemo:qw,useReducer:Pp,useRef:Fw,useState:function(){return Pp(Hl)},useDebugValue:Tp,useDeferredValue:function(s){var a=Jn();return Ct===null?a.memoizedState=s:Hw(a,Ct.memoizedState,s)},useTransition:function(){var s=Pp(Hl)[0],a=Jn().memoizedState;return[s,a]},useMutableSource:Nw,useSyncExternalStore:Pw,useId:Vw,unstable_isNewReconciler:!1};function gr(s,a){if(s&&s.defaultProps){a=Y({},a),s=s.defaultProps;for(var d in s)a[d]===void 0&&(a[d]=s[d]);return a}return a}function _p(s,a,d,y){a=s.memoizedState,d=d(y,a),d=d==null?a:Y({},a,d),s.memoizedState=d,s.lanes===0&&(s.updateQueue.baseState=d)}var yd={isMounted:function(s){return(s=s._reactInternals)?Rs(s)===s:!1},enqueueSetState:function(s,a,d){s=s._reactInternals;var y=ln(),x=Yo(s),k=so(y,x);k.payload=a,d!=null&&(k.callback=d),a=Vo(s,k,x),a!==null&&(wr(a,s,x,y),cd(a,s,x))},enqueueReplaceState:function(s,a,d){s=s._reactInternals;var y=ln(),x=Yo(s),k=so(y,x);k.tag=1,k.payload=a,d!=null&&(k.callback=d),a=Vo(s,k,x),a!==null&&(wr(a,s,x,y),cd(a,s,x))},enqueueForceUpdate:function(s,a){s=s._reactInternals;var d=ln(),y=Yo(s),x=so(d,y);x.tag=2,a!=null&&(x.callback=a),a=Vo(s,x,y),a!==null&&(wr(a,s,y,d),cd(a,s,y))}};function Yw(s,a,d,y,x,k,_){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(y,k,_):a.prototype&&a.prototype.isPureReactComponent?!Tl(d,y)||!Tl(x,k):!0}function Jw(s,a,d){var y=!1,x=Wo,k=a.contextType;return typeof k=="object"&&k!==null?k=Yn(k):(x=vn(a)?Ms:Ht.current,y=a.contextTypes,k=(y=y!=null)?qi(s,x):Wo),a=new a(d,k),s.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=yd,s.stateNode=a,a._reactInternals=s,y&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=x,s.__reactInternalMemoizedMaskedChildContext=k),a}function Zw(s,a,d,y){s=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(d,y),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(d,y),a.state!==s&&yd.enqueueReplaceState(a,a.state,null)}function Rp(s,a,d,y){var x=s.stateNode;x.props=d,x.state=s.memoizedState,x.refs={},bp(s);var k=a.contextType;typeof k=="object"&&k!==null?x.context=Yn(k):(k=vn(a)?Ms:Ht.current,x.context=qi(s,k)),x.state=s.memoizedState,k=a.getDerivedStateFromProps,typeof k=="function"&&(_p(s,a,k,d),x.state=s.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(a=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),a!==x.state&&yd.enqueueReplaceState(x,x.state,null),ud(s,d,x,y),x.state=s.memoizedState),typeof x.componentDidMount=="function"&&(s.flags|=4194308)}function Zi(s,a){try{var d="",y=a;do d+=ie(y),y=y.return;while(y);var x=d}catch(k){x=`
|
|
40
|
-
Error generating stack: `+k.message+`
|
|
41
|
-
`+k.stack}return{value:s,source:a,stack:x,digest:null}}function Op(s,a,d){return{value:s,source:null,stack:d??null,digest:a??null}}function Mp(s,a){try{console.error(a.value)}catch(d){setTimeout(function(){throw d})}}var FS=typeof WeakMap=="function"?WeakMap:Map;function Xw(s,a,d){d=so(-1,d),d.tag=3,d.payload={element:null};var y=a.value;return d.callback=function(){Ed||(Ed=!0,Jp=y),Mp(s,a)},d}function eb(s,a,d){d=so(-1,d),d.tag=3;var y=s.type.getDerivedStateFromError;if(typeof y=="function"){var x=a.value;d.payload=function(){return y(x)},d.callback=function(){Mp(s,a)}}var k=s.stateNode;return k!==null&&typeof k.componentDidCatch=="function"&&(d.callback=function(){Mp(s,a),typeof y!="function"&&(Go===null?Go=new Set([this]):Go.add(this));var _=a.stack;this.componentDidCatch(a.value,{componentStack:_!==null?_:""})}),d}function tb(s,a,d){var y=s.pingCache;if(y===null){y=s.pingCache=new FS;var x=new Set;y.set(a,x)}else x=y.get(a),x===void 0&&(x=new Set,y.set(a,x));x.has(d)||(x.add(d),s=JS.bind(null,s,a,d),a.then(s,s))}function nb(s){do{var a;if((a=s.tag===13)&&(a=s.memoizedState,a=a!==null?a.dehydrated!==null:!0),a)return s;s=s.return}while(s!==null);return null}function rb(s,a,d,y,x){return(s.mode&1)===0?(s===a?s.flags|=65536:(s.flags|=128,d.flags|=131072,d.flags&=-52805,d.tag===1&&(d.alternate===null?d.tag=17:(a=so(-1,1),a.tag=2,Vo(d,a,1))),d.lanes|=1),s):(s.flags|=65536,s.lanes=x,s)}var LS=S.ReactCurrentOwner,wn=!1;function an(s,a,d,y){a.child=s===null?kw(a,null,d,y):Gi(a,s.child,d,y)}function ob(s,a,d,y,x){d=d.render;var k=a.ref;return Yi(a,x),y=jp(s,a,d,y,k,x),d=Ip(),s!==null&&!wn?(a.updateQueue=s.updateQueue,a.flags&=-2053,s.lanes&=~x,io(s,a,x)):(ot&&d&&up(a),a.flags|=1,an(s,a,y,x),a.child)}function sb(s,a,d,y,x){if(s===null){var k=d.type;return typeof k=="function"&&!o0(k)&&k.defaultProps===void 0&&d.compare===null&&d.defaultProps===void 0?(a.tag=15,a.type=k,ib(s,a,k,y,x)):(s=Pd(d.type,null,y,a,a.mode,x),s.ref=a.ref,s.return=a,a.child=s)}if(k=s.child,(s.lanes&x)===0){var _=k.memoizedProps;if(d=d.compare,d=d!==null?d:Tl,d(_,y)&&s.ref===a.ref)return io(s,a,x)}return a.flags|=1,s=Zo(k,y),s.ref=a.ref,s.return=a,a.child=s}function ib(s,a,d,y,x){if(s!==null){var k=s.memoizedProps;if(Tl(k,y)&&s.ref===a.ref)if(wn=!1,a.pendingProps=y=k,(s.lanes&x)!==0)(s.flags&131072)!==0&&(wn=!0);else return a.lanes=s.lanes,io(s,a,x)}return Fp(s,a,d,y,x)}function ab(s,a,d){var y=a.pendingProps,x=y.children,k=s!==null?s.memoizedState:null;if(y.mode==="hidden")if((a.mode&1)===0)a.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ze(ea,Dn),Dn|=d;else{if((d&1073741824)===0)return s=k!==null?k.baseLanes|d:d,a.lanes=a.childLanes=1073741824,a.memoizedState={baseLanes:s,cachePool:null,transitions:null},a.updateQueue=null,Ze(ea,Dn),Dn|=s,null;a.memoizedState={baseLanes:0,cachePool:null,transitions:null},y=k!==null?k.baseLanes:d,Ze(ea,Dn),Dn|=y}else k!==null?(y=k.baseLanes|d,a.memoizedState=null):y=d,Ze(ea,Dn),Dn|=y;return an(s,a,x,d),a.child}function lb(s,a){var d=a.ref;(s===null&&d!==null||s!==null&&s.ref!==d)&&(a.flags|=512,a.flags|=2097152)}function Fp(s,a,d,y,x){var k=vn(d)?Ms:Ht.current;return k=qi(a,k),Yi(a,x),d=jp(s,a,d,y,k,x),y=Ip(),s!==null&&!wn?(a.updateQueue=s.updateQueue,a.flags&=-2053,s.lanes&=~x,io(s,a,x)):(ot&&y&&up(a),a.flags|=1,an(s,a,d,x),a.child)}function cb(s,a,d,y,x){if(vn(d)){var k=!0;td(a)}else k=!1;if(Yi(a,x),a.stateNode===null)wd(s,a),Jw(a,d,y),Rp(a,d,y,x),y=!0;else if(s===null){var _=a.stateNode,D=a.memoizedProps;_.props=D;var q=_.context,ne=d.contextType;typeof ne=="object"&&ne!==null?ne=Yn(ne):(ne=vn(d)?Ms:Ht.current,ne=qi(a,ne));var le=d.getDerivedStateFromProps,ce=typeof le=="function"||typeof _.getSnapshotBeforeUpdate=="function";ce||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(D!==y||q!==ne)&&Zw(a,_,y,ne),Ho=!1;var ae=a.memoizedState;_.state=ae,ud(a,y,_,x),q=a.memoizedState,D!==y||ae!==q||yn.current||Ho?(typeof le=="function"&&(_p(a,d,le,y),q=a.memoizedState),(D=Ho||Yw(a,d,D,y,ae,q,ne))?(ce||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(a.flags|=4194308)):(typeof _.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=y,a.memoizedState=q),_.props=y,_.state=q,_.context=ne,y=D):(typeof _.componentDidMount=="function"&&(a.flags|=4194308),y=!1)}else{_=a.stateNode,Aw(s,a),D=a.memoizedProps,ne=a.type===a.elementType?D:gr(a.type,D),_.props=ne,ce=a.pendingProps,ae=_.context,q=d.contextType,typeof q=="object"&&q!==null?q=Yn(q):(q=vn(d)?Ms:Ht.current,q=qi(a,q));var me=d.getDerivedStateFromProps;(le=typeof me=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(D!==ce||ae!==q)&&Zw(a,_,y,q),Ho=!1,ae=a.memoizedState,_.state=ae,ud(a,y,_,x);var Ce=a.memoizedState;D!==ce||ae!==Ce||yn.current||Ho?(typeof me=="function"&&(_p(a,d,me,y),Ce=a.memoizedState),(ne=Ho||Yw(a,d,ne,y,ae,Ce,q)||!1)?(le||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(y,Ce,q),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(y,Ce,q)),typeof _.componentDidUpdate=="function"&&(a.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof _.componentDidUpdate!="function"||D===s.memoizedProps&&ae===s.memoizedState||(a.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||D===s.memoizedProps&&ae===s.memoizedState||(a.flags|=1024),a.memoizedProps=y,a.memoizedState=Ce),_.props=y,_.state=Ce,_.context=q,y=ne):(typeof _.componentDidUpdate!="function"||D===s.memoizedProps&&ae===s.memoizedState||(a.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||D===s.memoizedProps&&ae===s.memoizedState||(a.flags|=1024),y=!1)}return Lp(s,a,d,y,k,x)}function Lp(s,a,d,y,x,k){lb(s,a);var _=(a.flags&128)!==0;if(!y&&!_)return x&&pw(a,d,!1),io(s,a,k);y=a.stateNode,LS.current=a;var D=_&&typeof d.getDerivedStateFromError!="function"?null:y.render();return a.flags|=1,s!==null&&_?(a.child=Gi(a,s.child,null,k),a.child=Gi(a,null,D,k)):an(s,a,D,k),a.memoizedState=y.state,x&&pw(a,d,!0),a.child}function ub(s){var a=s.stateNode;a.pendingContext?fw(s,a.pendingContext,a.pendingContext!==a.context):a.context&&fw(s,a.context,!1),xp(s,a.containerInfo)}function db(s,a,d,y,x){return Qi(),pp(x),a.flags|=256,an(s,a,d,y),a.child}var Dp={dehydrated:null,treeContext:null,retryLane:0};function Up(s){return{baseLanes:s,cachePool:null,transitions:null}}function fb(s,a,d){var y=a.pendingProps,x=st.current,k=!1,_=(a.flags&128)!==0,D;if((D=_)||(D=s!==null&&s.memoizedState===null?!1:(x&2)!==0),D?(k=!0,a.flags&=-129):(s===null||s.memoizedState!==null)&&(x|=1),Ze(st,x&1),s===null)return hp(a),s=a.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((a.mode&1)===0?a.lanes=1:s.data==="$!"?a.lanes=8:a.lanes=1073741824,null):(_=y.children,s=y.fallback,k?(y=a.mode,k=a.child,_={mode:"hidden",children:_},(y&1)===0&&k!==null?(k.childLanes=0,k.pendingProps=_):k=Bd(_,y,0,null),s=Vs(s,y,d,null),k.return=a,s.return=a,k.sibling=s,a.child=k,a.child.memoizedState=Up(d),a.memoizedState=Dp,s):$p(a,_));if(x=s.memoizedState,x!==null&&(D=x.dehydrated,D!==null))return DS(s,a,_,y,D,x,d);if(k){k=y.fallback,_=a.mode,x=s.child,D=x.sibling;var q={mode:"hidden",children:y.children};return(_&1)===0&&a.child!==x?(y=a.child,y.childLanes=0,y.pendingProps=q,a.deletions=null):(y=Zo(x,q),y.subtreeFlags=x.subtreeFlags&14680064),D!==null?k=Zo(D,k):(k=Vs(k,_,d,null),k.flags|=2),k.return=a,y.return=a,y.sibling=k,a.child=y,y=k,k=a.child,_=s.child.memoizedState,_=_===null?Up(d):{baseLanes:_.baseLanes|d,cachePool:null,transitions:_.transitions},k.memoizedState=_,k.childLanes=s.childLanes&~d,a.memoizedState=Dp,y}return k=s.child,s=k.sibling,y=Zo(k,{mode:"visible",children:y.children}),(a.mode&1)===0&&(y.lanes=d),y.return=a,y.sibling=null,s!==null&&(d=a.deletions,d===null?(a.deletions=[s],a.flags|=16):d.push(s)),a.child=y,a.memoizedState=null,y}function $p(s,a){return a=Bd({mode:"visible",children:a},s.mode,0,null),a.return=s,s.child=a}function vd(s,a,d,y){return y!==null&&pp(y),Gi(a,s.child,null,d),s=$p(a,a.pendingProps.children),s.flags|=2,a.memoizedState=null,s}function DS(s,a,d,y,x,k,_){if(d)return a.flags&256?(a.flags&=-257,y=Op(Error(n(422))),vd(s,a,_,y)):a.memoizedState!==null?(a.child=s.child,a.flags|=128,null):(k=y.fallback,x=a.mode,y=Bd({mode:"visible",children:y.children},x,0,null),k=Vs(k,x,_,null),k.flags|=2,y.return=a,k.return=a,y.sibling=k,a.child=y,(a.mode&1)!==0&&Gi(a,s.child,null,_),a.child.memoizedState=Up(_),a.memoizedState=Dp,k);if((a.mode&1)===0)return vd(s,a,_,null);if(x.data==="$!"){if(y=x.nextSibling&&x.nextSibling.dataset,y)var D=y.dgst;return y=D,k=Error(n(419)),y=Op(k,y,void 0),vd(s,a,_,y)}if(D=(_&s.childLanes)!==0,wn||D){if(y=Pt,y!==null){switch(_&-_){case 4:x=2;break;case 16:x=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:x=32;break;case 536870912:x=268435456;break;default:x=0}x=(x&(y.suspendedLanes|_))!==0?0:x,x!==0&&x!==k.retryLane&&(k.retryLane=x,oo(s,x),wr(y,s,x,-1))}return r0(),y=Op(Error(n(421))),vd(s,a,_,y)}return x.data==="$?"?(a.flags|=128,a.child=s.child,a=ZS.bind(null,s),x._reactRetry=a,null):(s=k.treeContext,Ln=$o(x.nextSibling),Fn=a,ot=!0,mr=null,s!==null&&(Gn[Kn++]=no,Gn[Kn++]=ro,Gn[Kn++]=Fs,no=s.id,ro=s.overflow,Fs=a),a=$p(a,y.children),a.flags|=4096,a)}function hb(s,a,d){s.lanes|=a;var y=s.alternate;y!==null&&(y.lanes|=a),vp(s.return,a,d)}function zp(s,a,d,y,x){var k=s.memoizedState;k===null?s.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:y,tail:d,tailMode:x}:(k.isBackwards=a,k.rendering=null,k.renderingStartTime=0,k.last=y,k.tail=d,k.tailMode=x)}function pb(s,a,d){var y=a.pendingProps,x=y.revealOrder,k=y.tail;if(an(s,a,y.children,d),y=st.current,(y&2)!==0)y=y&1|2,a.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=a.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&hb(s,d,a);else if(s.tag===19)hb(s,d,a);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break e;for(;s.sibling===null;){if(s.return===null||s.return===a)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}y&=1}if(Ze(st,y),(a.mode&1)===0)a.memoizedState=null;else switch(x){case"forwards":for(d=a.child,x=null;d!==null;)s=d.alternate,s!==null&&dd(s)===null&&(x=d),d=d.sibling;d=x,d===null?(x=a.child,a.child=null):(x=d.sibling,d.sibling=null),zp(a,!1,x,d,k);break;case"backwards":for(d=null,x=a.child,a.child=null;x!==null;){if(s=x.alternate,s!==null&&dd(s)===null){a.child=x;break}s=x.sibling,x.sibling=d,d=x,x=s}zp(a,!0,d,null,k);break;case"together":zp(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function wd(s,a){(a.mode&1)===0&&s!==null&&(s.alternate=null,a.alternate=null,a.flags|=2)}function io(s,a,d){if(s!==null&&(a.dependencies=s.dependencies),zs|=a.lanes,(d&a.childLanes)===0)return null;if(s!==null&&a.child!==s.child)throw Error(n(153));if(a.child!==null){for(s=a.child,d=Zo(s,s.pendingProps),a.child=d,d.return=a;s.sibling!==null;)s=s.sibling,d=d.sibling=Zo(s,s.pendingProps),d.return=a;d.sibling=null}return a.child}function US(s,a,d){switch(a.tag){case 3:ub(a),Qi();break;case 5:Iw(a);break;case 1:vn(a.type)&&td(a);break;case 4:xp(a,a.stateNode.containerInfo);break;case 10:var y=a.type._context,x=a.memoizedProps.value;Ze(ad,y._currentValue),y._currentValue=x;break;case 13:if(y=a.memoizedState,y!==null)return y.dehydrated!==null?(Ze(st,st.current&1),a.flags|=128,null):(d&a.child.childLanes)!==0?fb(s,a,d):(Ze(st,st.current&1),s=io(s,a,d),s!==null?s.sibling:null);Ze(st,st.current&1);break;case 19:if(y=(d&a.childLanes)!==0,(s.flags&128)!==0){if(y)return pb(s,a,d);a.flags|=128}if(x=a.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),Ze(st,st.current),y)break;return null;case 22:case 23:return a.lanes=0,ab(s,a,d)}return io(s,a,d)}var mb,Wp,gb,yb;mb=function(s,a){for(var d=a.child;d!==null;){if(d.tag===5||d.tag===6)s.appendChild(d.stateNode);else if(d.tag!==4&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===a)break;for(;d.sibling===null;){if(d.return===null||d.return===a)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},Wp=function(){},gb=function(s,a,d,y){var x=s.memoizedProps;if(x!==y){s=a.stateNode,Us(_r.current);var k=null;switch(d){case"input":x=Wt(s,x),y=Wt(s,y),k=[];break;case"select":x=Y({},x,{value:void 0}),y=Y({},y,{value:void 0}),k=[];break;case"textarea":x=Nr(s,x),y=Nr(s,y),k=[];break;default:typeof x.onClick!="function"&&typeof y.onClick=="function"&&(s.onclick=Zu)}mn(d,y);var _;d=null;for(ne in x)if(!y.hasOwnProperty(ne)&&x.hasOwnProperty(ne)&&x[ne]!=null)if(ne==="style"){var D=x[ne];for(_ in D)D.hasOwnProperty(_)&&(d||(d={}),d[_]="")}else ne!=="dangerouslySetInnerHTML"&&ne!=="children"&&ne!=="suppressContentEditableWarning"&&ne!=="suppressHydrationWarning"&&ne!=="autoFocus"&&(o.hasOwnProperty(ne)?k||(k=[]):(k=k||[]).push(ne,null));for(ne in y){var q=y[ne];if(D=x!=null?x[ne]:void 0,y.hasOwnProperty(ne)&&q!==D&&(q!=null||D!=null))if(ne==="style")if(D){for(_ in D)!D.hasOwnProperty(_)||q&&q.hasOwnProperty(_)||(d||(d={}),d[_]="");for(_ in q)q.hasOwnProperty(_)&&D[_]!==q[_]&&(d||(d={}),d[_]=q[_])}else d||(k||(k=[]),k.push(ne,d)),d=q;else ne==="dangerouslySetInnerHTML"?(q=q?q.__html:void 0,D=D?D.__html:void 0,q!=null&&D!==q&&(k=k||[]).push(ne,q)):ne==="children"?typeof q!="string"&&typeof q!="number"||(k=k||[]).push(ne,""+q):ne!=="suppressContentEditableWarning"&&ne!=="suppressHydrationWarning"&&(o.hasOwnProperty(ne)?(q!=null&&ne==="onScroll"&&Xe("scroll",s),k||D===q||(k=[])):(k=k||[]).push(ne,q))}d&&(k=k||[]).push("style",d);var ne=k;(a.updateQueue=ne)&&(a.flags|=4)}},yb=function(s,a,d,y){d!==y&&(a.flags|=4)};function Ql(s,a){if(!ot)switch(s.tailMode){case"hidden":a=s.tail;for(var d=null;a!==null;)a.alternate!==null&&(d=a),a=a.sibling;d===null?s.tail=null:d.sibling=null;break;case"collapsed":d=s.tail;for(var y=null;d!==null;)d.alternate!==null&&(y=d),d=d.sibling;y===null?a||s.tail===null?s.tail=null:s.tail.sibling=null:y.sibling=null}}function Qt(s){var a=s.alternate!==null&&s.alternate.child===s.child,d=0,y=0;if(a)for(var x=s.child;x!==null;)d|=x.lanes|x.childLanes,y|=x.subtreeFlags&14680064,y|=x.flags&14680064,x.return=s,x=x.sibling;else for(x=s.child;x!==null;)d|=x.lanes|x.childLanes,y|=x.subtreeFlags,y|=x.flags,x.return=s,x=x.sibling;return s.subtreeFlags|=y,s.childLanes=d,a}function $S(s,a,d){var y=a.pendingProps;switch(dp(a),a.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qt(a),null;case 1:return vn(a.type)&&ed(),Qt(a),null;case 3:return y=a.stateNode,Ji(),et(yn),et(Ht),Ep(),y.pendingContext&&(y.context=y.pendingContext,y.pendingContext=null),(s===null||s.child===null)&&(sd(a)?a.flags|=4:s===null||s.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,mr!==null&&(e0(mr),mr=null))),Wp(s,a),Qt(a),null;case 5:Cp(a);var x=Us(zl.current);if(d=a.type,s!==null&&a.stateNode!=null)gb(s,a,d,y,x),s.ref!==a.ref&&(a.flags|=512,a.flags|=2097152);else{if(!y){if(a.stateNode===null)throw Error(n(166));return Qt(a),null}if(s=Us(_r.current),sd(a)){y=a.stateNode,d=a.type;var k=a.memoizedProps;switch(y[Tr]=a,y[Fl]=k,s=(a.mode&1)!==0,d){case"dialog":Xe("cancel",y),Xe("close",y);break;case"iframe":case"object":case"embed":Xe("load",y);break;case"video":case"audio":for(x=0;x<Rl.length;x++)Xe(Rl[x],y);break;case"source":Xe("error",y);break;case"img":case"image":case"link":Xe("error",y),Xe("load",y);break;case"details":Xe("toggle",y);break;case"input":on(y,k),Xe("invalid",y);break;case"select":y._wrapperState={wasMultiple:!!k.multiple},Xe("invalid",y);break;case"textarea":_o(y,k),Xe("invalid",y)}mn(d,k),x=null;for(var _ in k)if(k.hasOwnProperty(_)){var D=k[_];_==="children"?typeof D=="string"?y.textContent!==D&&(k.suppressHydrationWarning!==!0&&Ju(y.textContent,D,s),x=["children",D]):typeof D=="number"&&y.textContent!==""+D&&(k.suppressHydrationWarning!==!0&&Ju(y.textContent,D,s),x=["children",""+D]):o.hasOwnProperty(_)&&D!=null&&_==="onScroll"&&Xe("scroll",y)}switch(d){case"input":mt(y),Ot(y,k,!0);break;case"textarea":mt(y),Pu(y);break;case"select":case"option":break;default:typeof k.onClick=="function"&&(y.onclick=Zu)}y=x,a.updateQueue=y,y!==null&&(a.flags|=4)}else{_=x.nodeType===9?x:x.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=gl(d)),s==="http://www.w3.org/1999/xhtml"?d==="script"?(s=_.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof y.is=="string"?s=_.createElement(d,{is:y.is}):(s=_.createElement(d),d==="select"&&(_=s,y.multiple?_.multiple=!0:y.size&&(_.size=y.size))):s=_.createElementNS(s,d),s[Tr]=a,s[Fl]=y,mb(s,a,!1,!1),a.stateNode=s;e:{switch(_=ze(d,y),d){case"dialog":Xe("cancel",s),Xe("close",s),x=y;break;case"iframe":case"object":case"embed":Xe("load",s),x=y;break;case"video":case"audio":for(x=0;x<Rl.length;x++)Xe(Rl[x],s);x=y;break;case"source":Xe("error",s),x=y;break;case"img":case"image":case"link":Xe("error",s),Xe("load",s),x=y;break;case"details":Xe("toggle",s),x=y;break;case"input":on(s,y),x=Wt(s,y),Xe("invalid",s);break;case"option":x=y;break;case"select":s._wrapperState={wasMultiple:!!y.multiple},x=Y({},y,{value:void 0}),Xe("invalid",s);break;case"textarea":_o(s,y),x=Nr(s,y),Xe("invalid",s);break;default:x=y}mn(d,x),D=x;for(k in D)if(D.hasOwnProperty(k)){var q=D[k];k==="style"?Ge(s,q):k==="dangerouslySetInnerHTML"?(q=q?q.__html:void 0,q!=null&&Zr(s,q)):k==="children"?typeof q=="string"?(d!=="textarea"||q!=="")&&Pr(s,q):typeof q=="number"&&Pr(s,""+q):k!=="suppressContentEditableWarning"&&k!=="suppressHydrationWarning"&&k!=="autoFocus"&&(o.hasOwnProperty(k)?q!=null&&k==="onScroll"&&Xe("scroll",s):q!=null&&A(s,k,q,_))}switch(d){case"input":mt(s),Ot(s,y,!1);break;case"textarea":mt(s),Pu(s);break;case"option":y.value!=null&&s.setAttribute("value",""+Se(y.value));break;case"select":s.multiple=!!y.multiple,k=y.value,k!=null?Je(s,!!y.multiple,k,!1):y.defaultValue!=null&&Je(s,!!y.multiple,y.defaultValue,!0);break;default:typeof x.onClick=="function"&&(s.onclick=Zu)}switch(d){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break e;case"img":y=!0;break e;default:y=!1}}y&&(a.flags|=4)}a.ref!==null&&(a.flags|=512,a.flags|=2097152)}return Qt(a),null;case 6:if(s&&a.stateNode!=null)yb(s,a,s.memoizedProps,y);else{if(typeof y!="string"&&a.stateNode===null)throw Error(n(166));if(d=Us(zl.current),Us(_r.current),sd(a)){if(y=a.stateNode,d=a.memoizedProps,y[Tr]=a,(k=y.nodeValue!==d)&&(s=Fn,s!==null))switch(s.tag){case 3:Ju(y.nodeValue,d,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&Ju(y.nodeValue,d,(s.mode&1)!==0)}k&&(a.flags|=4)}else y=(d.nodeType===9?d:d.ownerDocument).createTextNode(y),y[Tr]=a,a.stateNode=y}return Qt(a),null;case 13:if(et(st),y=a.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(ot&&Ln!==null&&(a.mode&1)!==0&&(a.flags&128)===0)bw(),Qi(),a.flags|=98560,k=!1;else if(k=sd(a),y!==null&&y.dehydrated!==null){if(s===null){if(!k)throw Error(n(318));if(k=a.memoizedState,k=k!==null?k.dehydrated:null,!k)throw Error(n(317));k[Tr]=a}else Qi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Qt(a),k=!1}else mr!==null&&(e0(mr),mr=null),k=!0;if(!k)return a.flags&65536?a:null}return(a.flags&128)!==0?(a.lanes=d,a):(y=y!==null,y!==(s!==null&&s.memoizedState!==null)&&y&&(a.child.flags|=8192,(a.mode&1)!==0&&(s===null||(st.current&1)!==0?kt===0&&(kt=3):r0())),a.updateQueue!==null&&(a.flags|=4),Qt(a),null);case 4:return Ji(),Wp(s,a),s===null&&Ol(a.stateNode.containerInfo),Qt(a),null;case 10:return yp(a.type._context),Qt(a),null;case 17:return vn(a.type)&&ed(),Qt(a),null;case 19:if(et(st),k=a.memoizedState,k===null)return Qt(a),null;if(y=(a.flags&128)!==0,_=k.rendering,_===null)if(y)Ql(k,!1);else{if(kt!==0||s!==null&&(s.flags&128)!==0)for(s=a.child;s!==null;){if(_=dd(s),_!==null){for(a.flags|=128,Ql(k,!1),y=_.updateQueue,y!==null&&(a.updateQueue=y,a.flags|=4),a.subtreeFlags=0,y=d,d=a.child;d!==null;)k=d,s=y,k.flags&=14680066,_=k.alternate,_===null?(k.childLanes=0,k.lanes=s,k.child=null,k.subtreeFlags=0,k.memoizedProps=null,k.memoizedState=null,k.updateQueue=null,k.dependencies=null,k.stateNode=null):(k.childLanes=_.childLanes,k.lanes=_.lanes,k.child=_.child,k.subtreeFlags=0,k.deletions=null,k.memoizedProps=_.memoizedProps,k.memoizedState=_.memoizedState,k.updateQueue=_.updateQueue,k.type=_.type,s=_.dependencies,k.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),d=d.sibling;return Ze(st,st.current&1|2),a.child}s=s.sibling}k.tail!==null&&dt()>ta&&(a.flags|=128,y=!0,Ql(k,!1),a.lanes=4194304)}else{if(!y)if(s=dd(_),s!==null){if(a.flags|=128,y=!0,d=s.updateQueue,d!==null&&(a.updateQueue=d,a.flags|=4),Ql(k,!0),k.tail===null&&k.tailMode==="hidden"&&!_.alternate&&!ot)return Qt(a),null}else 2*dt()-k.renderingStartTime>ta&&d!==1073741824&&(a.flags|=128,y=!0,Ql(k,!1),a.lanes=4194304);k.isBackwards?(_.sibling=a.child,a.child=_):(d=k.last,d!==null?d.sibling=_:a.child=_,k.last=_)}return k.tail!==null?(a=k.tail,k.rendering=a,k.tail=a.sibling,k.renderingStartTime=dt(),a.sibling=null,d=st.current,Ze(st,y?d&1|2:d&1),a):(Qt(a),null);case 22:case 23:return n0(),y=a.memoizedState!==null,s!==null&&s.memoizedState!==null!==y&&(a.flags|=8192),y&&(a.mode&1)!==0?(Dn&1073741824)!==0&&(Qt(a),a.subtreeFlags&6&&(a.flags|=8192)):Qt(a),null;case 24:return null;case 25:return null}throw Error(n(156,a.tag))}function zS(s,a){switch(dp(a),a.tag){case 1:return vn(a.type)&&ed(),s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 3:return Ji(),et(yn),et(Ht),Ep(),s=a.flags,(s&65536)!==0&&(s&128)===0?(a.flags=s&-65537|128,a):null;case 5:return Cp(a),null;case 13:if(et(st),s=a.memoizedState,s!==null&&s.dehydrated!==null){if(a.alternate===null)throw Error(n(340));Qi()}return s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 19:return et(st),null;case 4:return Ji(),null;case 10:return yp(a.type._context),null;case 22:case 23:return n0(),null;case 24:return null;default:return null}}var bd=!1,Gt=!1,WS=typeof WeakSet=="function"?WeakSet:Set,xe=null;function Xi(s,a){var d=s.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(y){lt(s,a,y)}else d.current=null}function qp(s,a,d){try{d()}catch(y){lt(s,a,y)}}var vb=!1;function qS(s,a){if(np=Uu,s=Yv(),Gh(s)){if("selectionStart"in s)var d={start:s.selectionStart,end:s.selectionEnd};else e:{d=(d=s.ownerDocument)&&d.defaultView||window;var y=d.getSelection&&d.getSelection();if(y&&y.rangeCount!==0){d=y.anchorNode;var x=y.anchorOffset,k=y.focusNode;y=y.focusOffset;try{d.nodeType,k.nodeType}catch{d=null;break e}var _=0,D=-1,q=-1,ne=0,le=0,ce=s,ae=null;t:for(;;){for(var me;ce!==d||x!==0&&ce.nodeType!==3||(D=_+x),ce!==k||y!==0&&ce.nodeType!==3||(q=_+y),ce.nodeType===3&&(_+=ce.nodeValue.length),(me=ce.firstChild)!==null;)ae=ce,ce=me;for(;;){if(ce===s)break t;if(ae===d&&++ne===x&&(D=_),ae===k&&++le===y&&(q=_),(me=ce.nextSibling)!==null)break;ce=ae,ae=ce.parentNode}ce=me}d=D===-1||q===-1?null:{start:D,end:q}}else d=null}d=d||{start:0,end:0}}else d=null;for(rp={focusedElem:s,selectionRange:d},Uu=!1,xe=a;xe!==null;)if(a=xe,s=a.child,(a.subtreeFlags&1028)!==0&&s!==null)s.return=a,xe=s;else for(;xe!==null;){a=xe;try{var Ce=a.alternate;if((a.flags&1024)!==0)switch(a.tag){case 0:case 11:case 15:break;case 1:if(Ce!==null){var ke=Ce.memoizedProps,ft=Ce.memoizedState,Z=a.stateNode,Q=Z.getSnapshotBeforeUpdate(a.elementType===a.type?ke:gr(a.type,ke),ft);Z.__reactInternalSnapshotBeforeUpdate=Q}break;case 3:var te=a.stateNode.containerInfo;te.nodeType===1?te.textContent="":te.nodeType===9&&te.documentElement&&te.removeChild(te.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(de){lt(a,a.return,de)}if(s=a.sibling,s!==null){s.return=a.return,xe=s;break}xe=a.return}return Ce=vb,vb=!1,Ce}function Gl(s,a,d){var y=a.updateQueue;if(y=y!==null?y.lastEffect:null,y!==null){var x=y=y.next;do{if((x.tag&s)===s){var k=x.destroy;x.destroy=void 0,k!==void 0&&qp(a,d,k)}x=x.next}while(x!==y)}}function xd(s,a){if(a=a.updateQueue,a=a!==null?a.lastEffect:null,a!==null){var d=a=a.next;do{if((d.tag&s)===s){var y=d.create;d.destroy=y()}d=d.next}while(d!==a)}}function Hp(s){var a=s.ref;if(a!==null){var d=s.stateNode;switch(s.tag){case 5:s=d;break;default:s=d}typeof a=="function"?a(s):a.current=s}}function wb(s){var a=s.alternate;a!==null&&(s.alternate=null,wb(a)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(a=s.stateNode,a!==null&&(delete a[Tr],delete a[Fl],delete a[ap],delete a[SS],delete a[jS])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function bb(s){return s.tag===5||s.tag===3||s.tag===4}function xb(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||bb(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Vp(s,a,d){var y=s.tag;if(y===5||y===6)s=s.stateNode,a?d.nodeType===8?d.parentNode.insertBefore(s,a):d.insertBefore(s,a):(d.nodeType===8?(a=d.parentNode,a.insertBefore(s,d)):(a=d,a.appendChild(s)),d=d._reactRootContainer,d!=null||a.onclick!==null||(a.onclick=Zu));else if(y!==4&&(s=s.child,s!==null))for(Vp(s,a,d),s=s.sibling;s!==null;)Vp(s,a,d),s=s.sibling}function Qp(s,a,d){var y=s.tag;if(y===5||y===6)s=s.stateNode,a?d.insertBefore(s,a):d.appendChild(s);else if(y!==4&&(s=s.child,s!==null))for(Qp(s,a,d),s=s.sibling;s!==null;)Qp(s,a,d),s=s.sibling}var Ft=null,yr=!1;function Qo(s,a,d){for(d=d.child;d!==null;)Cb(s,a,d),d=d.sibling}function Cb(s,a,d){if(Br&&typeof Br.onCommitFiberUnmount=="function")try{Br.onCommitFiberUnmount(Ru,d)}catch{}switch(d.tag){case 5:Gt||Xi(d,a);case 6:var y=Ft,x=yr;Ft=null,Qo(s,a,d),Ft=y,yr=x,Ft!==null&&(yr?(s=Ft,d=d.stateNode,s.nodeType===8?s.parentNode.removeChild(d):s.removeChild(d)):Ft.removeChild(d.stateNode));break;case 18:Ft!==null&&(yr?(s=Ft,d=d.stateNode,s.nodeType===8?ip(s.parentNode,d):s.nodeType===1&&ip(s,d),Sl(s)):ip(Ft,d.stateNode));break;case 4:y=Ft,x=yr,Ft=d.stateNode.containerInfo,yr=!0,Qo(s,a,d),Ft=y,yr=x;break;case 0:case 11:case 14:case 15:if(!Gt&&(y=d.updateQueue,y!==null&&(y=y.lastEffect,y!==null))){x=y=y.next;do{var k=x,_=k.destroy;k=k.tag,_!==void 0&&((k&2)!==0||(k&4)!==0)&&qp(d,a,_),x=x.next}while(x!==y)}Qo(s,a,d);break;case 1:if(!Gt&&(Xi(d,a),y=d.stateNode,typeof y.componentWillUnmount=="function"))try{y.props=d.memoizedProps,y.state=d.memoizedState,y.componentWillUnmount()}catch(D){lt(d,a,D)}Qo(s,a,d);break;case 21:Qo(s,a,d);break;case 22:d.mode&1?(Gt=(y=Gt)||d.memoizedState!==null,Qo(s,a,d),Gt=y):Qo(s,a,d);break;default:Qo(s,a,d)}}function kb(s){var a=s.updateQueue;if(a!==null){s.updateQueue=null;var d=s.stateNode;d===null&&(d=s.stateNode=new WS),a.forEach(function(y){var x=XS.bind(null,s,y);d.has(y)||(d.add(y),y.then(x,x))})}}function vr(s,a){var d=a.deletions;if(d!==null)for(var y=0;y<d.length;y++){var x=d[y];try{var k=s,_=a,D=_;e:for(;D!==null;){switch(D.tag){case 5:Ft=D.stateNode,yr=!1;break e;case 3:Ft=D.stateNode.containerInfo,yr=!0;break e;case 4:Ft=D.stateNode.containerInfo,yr=!0;break e}D=D.return}if(Ft===null)throw Error(n(160));Cb(k,_,x),Ft=null,yr=!1;var q=x.alternate;q!==null&&(q.return=null),x.return=null}catch(ne){lt(x,a,ne)}}if(a.subtreeFlags&12854)for(a=a.child;a!==null;)Eb(a,s),a=a.sibling}function Eb(s,a){var d=s.alternate,y=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(vr(a,s),Or(s),y&4){try{Gl(3,s,s.return),xd(3,s)}catch(ke){lt(s,s.return,ke)}try{Gl(5,s,s.return)}catch(ke){lt(s,s.return,ke)}}break;case 1:vr(a,s),Or(s),y&512&&d!==null&&Xi(d,d.return);break;case 5:if(vr(a,s),Or(s),y&512&&d!==null&&Xi(d,d.return),s.flags&32){var x=s.stateNode;try{Pr(x,"")}catch(ke){lt(s,s.return,ke)}}if(y&4&&(x=s.stateNode,x!=null)){var k=s.memoizedProps,_=d!==null?d.memoizedProps:k,D=s.type,q=s.updateQueue;if(s.updateQueue=null,q!==null)try{D==="input"&&k.type==="radio"&&k.name!=null&&rt(x,k),ze(D,_);var ne=ze(D,k);for(_=0;_<q.length;_+=2){var le=q[_],ce=q[_+1];le==="style"?Ge(x,ce):le==="dangerouslySetInnerHTML"?Zr(x,ce):le==="children"?Pr(x,ce):A(x,le,ce,ne)}switch(D){case"input":sn(x,k);break;case"textarea":Ro(x,k);break;case"select":var ae=x._wrapperState.wasMultiple;x._wrapperState.wasMultiple=!!k.multiple;var me=k.value;me!=null?Je(x,!!k.multiple,me,!1):ae!==!!k.multiple&&(k.defaultValue!=null?Je(x,!!k.multiple,k.defaultValue,!0):Je(x,!!k.multiple,k.multiple?[]:"",!1))}x[Fl]=k}catch(ke){lt(s,s.return,ke)}}break;case 6:if(vr(a,s),Or(s),y&4){if(s.stateNode===null)throw Error(n(162));x=s.stateNode,k=s.memoizedProps;try{x.nodeValue=k}catch(ke){lt(s,s.return,ke)}}break;case 3:if(vr(a,s),Or(s),y&4&&d!==null&&d.memoizedState.isDehydrated)try{Sl(a.containerInfo)}catch(ke){lt(s,s.return,ke)}break;case 4:vr(a,s),Or(s);break;case 13:vr(a,s),Or(s),x=s.child,x.flags&8192&&(k=x.memoizedState!==null,x.stateNode.isHidden=k,!k||x.alternate!==null&&x.alternate.memoizedState!==null||(Yp=dt())),y&4&&kb(s);break;case 22:if(le=d!==null&&d.memoizedState!==null,s.mode&1?(Gt=(ne=Gt)||le,vr(a,s),Gt=ne):vr(a,s),Or(s),y&8192){if(ne=s.memoizedState!==null,(s.stateNode.isHidden=ne)&&!le&&(s.mode&1)!==0)for(xe=s,le=s.child;le!==null;){for(ce=xe=le;xe!==null;){switch(ae=xe,me=ae.child,ae.tag){case 0:case 11:case 14:case 15:Gl(4,ae,ae.return);break;case 1:Xi(ae,ae.return);var Ce=ae.stateNode;if(typeof Ce.componentWillUnmount=="function"){y=ae,d=ae.return;try{a=y,Ce.props=a.memoizedProps,Ce.state=a.memoizedState,Ce.componentWillUnmount()}catch(ke){lt(y,d,ke)}}break;case 5:Xi(ae,ae.return);break;case 22:if(ae.memoizedState!==null){jb(ce);continue}}me!==null?(me.return=ae,xe=me):jb(ce)}le=le.sibling}e:for(le=null,ce=s;;){if(ce.tag===5){if(le===null){le=ce;try{x=ce.stateNode,ne?(k=x.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none"):(D=ce.stateNode,q=ce.memoizedProps.style,_=q!=null&&q.hasOwnProperty("display")?q.display:null,D.style.display=_e("display",_))}catch(ke){lt(s,s.return,ke)}}}else if(ce.tag===6){if(le===null)try{ce.stateNode.nodeValue=ne?"":ce.memoizedProps}catch(ke){lt(s,s.return,ke)}}else if((ce.tag!==22&&ce.tag!==23||ce.memoizedState===null||ce===s)&&ce.child!==null){ce.child.return=ce,ce=ce.child;continue}if(ce===s)break e;for(;ce.sibling===null;){if(ce.return===null||ce.return===s)break e;le===ce&&(le=null),ce=ce.return}le===ce&&(le=null),ce.sibling.return=ce.return,ce=ce.sibling}}break;case 19:vr(a,s),Or(s),y&4&&kb(s);break;case 21:break;default:vr(a,s),Or(s)}}function Or(s){var a=s.flags;if(a&2){try{e:{for(var d=s.return;d!==null;){if(bb(d)){var y=d;break e}d=d.return}throw Error(n(160))}switch(y.tag){case 5:var x=y.stateNode;y.flags&32&&(Pr(x,""),y.flags&=-33);var k=xb(s);Qp(s,k,x);break;case 3:case 4:var _=y.stateNode.containerInfo,D=xb(s);Vp(s,D,_);break;default:throw Error(n(161))}}catch(q){lt(s,s.return,q)}s.flags&=-3}a&4096&&(s.flags&=-4097)}function HS(s,a,d){xe=s,Ab(s)}function Ab(s,a,d){for(var y=(s.mode&1)!==0;xe!==null;){var x=xe,k=x.child;if(x.tag===22&&y){var _=x.memoizedState!==null||bd;if(!_){var D=x.alternate,q=D!==null&&D.memoizedState!==null||Gt;D=bd;var ne=Gt;if(bd=_,(Gt=q)&&!ne)for(xe=x;xe!==null;)_=xe,q=_.child,_.tag===22&&_.memoizedState!==null?Ib(x):q!==null?(q.return=_,xe=q):Ib(x);for(;k!==null;)xe=k,Ab(k),k=k.sibling;xe=x,bd=D,Gt=ne}Sb(s)}else(x.subtreeFlags&8772)!==0&&k!==null?(k.return=x,xe=k):Sb(s)}}function Sb(s){for(;xe!==null;){var a=xe;if((a.flags&8772)!==0){var d=a.alternate;try{if((a.flags&8772)!==0)switch(a.tag){case 0:case 11:case 15:Gt||xd(5,a);break;case 1:var y=a.stateNode;if(a.flags&4&&!Gt)if(d===null)y.componentDidMount();else{var x=a.elementType===a.type?d.memoizedProps:gr(a.type,d.memoizedProps);y.componentDidUpdate(x,d.memoizedState,y.__reactInternalSnapshotBeforeUpdate)}var k=a.updateQueue;k!==null&&jw(a,k,y);break;case 3:var _=a.updateQueue;if(_!==null){if(d=null,a.child!==null)switch(a.child.tag){case 5:d=a.child.stateNode;break;case 1:d=a.child.stateNode}jw(a,_,d)}break;case 5:var D=a.stateNode;if(d===null&&a.flags&4){d=D;var q=a.memoizedProps;switch(a.type){case"button":case"input":case"select":case"textarea":q.autoFocus&&d.focus();break;case"img":q.src&&(d.src=q.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(a.memoizedState===null){var ne=a.alternate;if(ne!==null){var le=ne.memoizedState;if(le!==null){var ce=le.dehydrated;ce!==null&&Sl(ce)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Gt||a.flags&512&&Hp(a)}catch(ae){lt(a,a.return,ae)}}if(a===s){xe=null;break}if(d=a.sibling,d!==null){d.return=a.return,xe=d;break}xe=a.return}}function jb(s){for(;xe!==null;){var a=xe;if(a===s){xe=null;break}var d=a.sibling;if(d!==null){d.return=a.return,xe=d;break}xe=a.return}}function Ib(s){for(;xe!==null;){var a=xe;try{switch(a.tag){case 0:case 11:case 15:var d=a.return;try{xd(4,a)}catch(q){lt(a,d,q)}break;case 1:var y=a.stateNode;if(typeof y.componentDidMount=="function"){var x=a.return;try{y.componentDidMount()}catch(q){lt(a,x,q)}}var k=a.return;try{Hp(a)}catch(q){lt(a,k,q)}break;case 5:var _=a.return;try{Hp(a)}catch(q){lt(a,_,q)}}}catch(q){lt(a,a.return,q)}if(a===s){xe=null;break}var D=a.sibling;if(D!==null){D.return=a.return,xe=D;break}xe=a.return}}var VS=Math.ceil,Cd=S.ReactCurrentDispatcher,Gp=S.ReactCurrentOwner,Zn=S.ReactCurrentBatchConfig,qe=0,Pt=null,yt=null,Lt=0,Dn=0,ea=zo(0),kt=0,Kl=null,zs=0,kd=0,Kp=0,Yl=null,bn=null,Yp=0,ta=1/0,ao=null,Ed=!1,Jp=null,Go=null,Ad=!1,Ko=null,Sd=0,Jl=0,Zp=null,jd=-1,Id=0;function ln(){return(qe&6)!==0?dt():jd!==-1?jd:jd=dt()}function Yo(s){return(s.mode&1)===0?1:(qe&2)!==0&&Lt!==0?Lt&-Lt:NS.transition!==null?(Id===0&&(Id=xv()),Id):(s=Ke,s!==0||(s=window.event,s=s===void 0?16:Pv(s.type)),s)}function wr(s,a,d,y){if(50<Jl)throw Jl=0,Zp=null,Error(n(185));xl(s,d,y),((qe&2)===0||s!==Pt)&&(s===Pt&&((qe&2)===0&&(kd|=d),kt===4&&Jo(s,Lt)),xn(s,y),d===1&&qe===0&&(a.mode&1)===0&&(ta=dt()+500,nd&&qo()))}function xn(s,a){var d=s.callbackNode;NA(s,a);var y=Fu(s,s===Pt?Lt:0);if(y===0)d!==null&&vv(d),s.callbackNode=null,s.callbackPriority=0;else if(a=y&-y,s.callbackPriority!==a){if(d!=null&&vv(d),a===1)s.tag===0?IS(Pb.bind(null,s)):mw(Pb.bind(null,s)),ES(function(){(qe&6)===0&&qo()}),d=null;else{switch(Cv(y)){case 1:d=Bh;break;case 4:d=wv;break;case 16:d=_u;break;case 536870912:d=bv;break;default:d=_u}d=Lb(d,Nb.bind(null,s))}s.callbackPriority=a,s.callbackNode=d}}function Nb(s,a){if(jd=-1,Id=0,(qe&6)!==0)throw Error(n(327));var d=s.callbackNode;if(na()&&s.callbackNode!==d)return null;var y=Fu(s,s===Pt?Lt:0);if(y===0)return null;if((y&30)!==0||(y&s.expiredLanes)!==0||a)a=Nd(s,y);else{a=y;var x=qe;qe|=2;var k=Tb();(Pt!==s||Lt!==a)&&(ao=null,ta=dt()+500,qs(s,a));do try{KS();break}catch(D){Bb(s,D)}while(!0);gp(),Cd.current=k,qe=x,yt!==null?a=0:(Pt=null,Lt=0,a=kt)}if(a!==0){if(a===2&&(x=Th(s),x!==0&&(y=x,a=Xp(s,x))),a===1)throw d=Kl,qs(s,0),Jo(s,y),xn(s,dt()),d;if(a===6)Jo(s,y);else{if(x=s.current.alternate,(y&30)===0&&!QS(x)&&(a=Nd(s,y),a===2&&(k=Th(s),k!==0&&(y=k,a=Xp(s,k))),a===1))throw d=Kl,qs(s,0),Jo(s,y),xn(s,dt()),d;switch(s.finishedWork=x,s.finishedLanes=y,a){case 0:case 1:throw Error(n(345));case 2:Hs(s,bn,ao);break;case 3:if(Jo(s,y),(y&130023424)===y&&(a=Yp+500-dt(),10<a)){if(Fu(s,0)!==0)break;if(x=s.suspendedLanes,(x&y)!==y){ln(),s.pingedLanes|=s.suspendedLanes&x;break}s.timeoutHandle=sp(Hs.bind(null,s,bn,ao),a);break}Hs(s,bn,ao);break;case 4:if(Jo(s,y),(y&4194240)===y)break;for(a=s.eventTimes,x=-1;0<y;){var _=31-hr(y);k=1<<_,_=a[_],_>x&&(x=_),y&=~k}if(y=x,y=dt()-y,y=(120>y?120:480>y?480:1080>y?1080:1920>y?1920:3e3>y?3e3:4320>y?4320:1960*VS(y/1960))-y,10<y){s.timeoutHandle=sp(Hs.bind(null,s,bn,ao),y);break}Hs(s,bn,ao);break;case 5:Hs(s,bn,ao);break;default:throw Error(n(329))}}}return xn(s,dt()),s.callbackNode===d?Nb.bind(null,s):null}function Xp(s,a){var d=Yl;return s.current.memoizedState.isDehydrated&&(qs(s,a).flags|=256),s=Nd(s,a),s!==2&&(a=bn,bn=d,a!==null&&e0(a)),s}function e0(s){bn===null?bn=s:bn.push.apply(bn,s)}function QS(s){for(var a=s;;){if(a.flags&16384){var d=a.updateQueue;if(d!==null&&(d=d.stores,d!==null))for(var y=0;y<d.length;y++){var x=d[y],k=x.getSnapshot;x=x.value;try{if(!pr(k(),x))return!1}catch{return!1}}}if(d=a.child,a.subtreeFlags&16384&&d!==null)d.return=a,a=d;else{if(a===s)break;for(;a.sibling===null;){if(a.return===null||a.return===s)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Jo(s,a){for(a&=~Kp,a&=~kd,s.suspendedLanes|=a,s.pingedLanes&=~a,s=s.expirationTimes;0<a;){var d=31-hr(a),y=1<<d;s[d]=-1,a&=~y}}function Pb(s){if((qe&6)!==0)throw Error(n(327));na();var a=Fu(s,0);if((a&1)===0)return xn(s,dt()),null;var d=Nd(s,a);if(s.tag!==0&&d===2){var y=Th(s);y!==0&&(a=y,d=Xp(s,y))}if(d===1)throw d=Kl,qs(s,0),Jo(s,a),xn(s,dt()),d;if(d===6)throw Error(n(345));return s.finishedWork=s.current.alternate,s.finishedLanes=a,Hs(s,bn,ao),xn(s,dt()),null}function t0(s,a){var d=qe;qe|=1;try{return s(a)}finally{qe=d,qe===0&&(ta=dt()+500,nd&&qo())}}function Ws(s){Ko!==null&&Ko.tag===0&&(qe&6)===0&&na();var a=qe;qe|=1;var d=Zn.transition,y=Ke;try{if(Zn.transition=null,Ke=1,s)return s()}finally{Ke=y,Zn.transition=d,qe=a,(qe&6)===0&&qo()}}function n0(){Dn=ea.current,et(ea)}function qs(s,a){s.finishedWork=null,s.finishedLanes=0;var d=s.timeoutHandle;if(d!==-1&&(s.timeoutHandle=-1,kS(d)),yt!==null)for(d=yt.return;d!==null;){var y=d;switch(dp(y),y.tag){case 1:y=y.type.childContextTypes,y!=null&&ed();break;case 3:Ji(),et(yn),et(Ht),Ep();break;case 5:Cp(y);break;case 4:Ji();break;case 13:et(st);break;case 19:et(st);break;case 10:yp(y.type._context);break;case 22:case 23:n0()}d=d.return}if(Pt=s,yt=s=Zo(s.current,null),Lt=Dn=a,kt=0,Kl=null,Kp=kd=zs=0,bn=Yl=null,Ds!==null){for(a=0;a<Ds.length;a++)if(d=Ds[a],y=d.interleaved,y!==null){d.interleaved=null;var x=y.next,k=d.pending;if(k!==null){var _=k.next;k.next=x,y.next=_}d.pending=y}Ds=null}return s}function Bb(s,a){do{var d=yt;try{if(gp(),fd.current=gd,hd){for(var y=it.memoizedState;y!==null;){var x=y.queue;x!==null&&(x.pending=null),y=y.next}hd=!1}if($s=0,Nt=Ct=it=null,Wl=!1,ql=0,Gp.current=null,d===null||d.return===null){kt=1,Kl=a,yt=null;break}e:{var k=s,_=d.return,D=d,q=a;if(a=Lt,D.flags|=32768,q!==null&&typeof q=="object"&&typeof q.then=="function"){var ne=q,le=D,ce=le.tag;if((le.mode&1)===0&&(ce===0||ce===11||ce===15)){var ae=le.alternate;ae?(le.updateQueue=ae.updateQueue,le.memoizedState=ae.memoizedState,le.lanes=ae.lanes):(le.updateQueue=null,le.memoizedState=null)}var me=nb(_);if(me!==null){me.flags&=-257,rb(me,_,D,k,a),me.mode&1&&tb(k,ne,a),a=me,q=ne;var Ce=a.updateQueue;if(Ce===null){var ke=new Set;ke.add(q),a.updateQueue=ke}else Ce.add(q);break e}else{if((a&1)===0){tb(k,ne,a),r0();break e}q=Error(n(426))}}else if(ot&&D.mode&1){var ft=nb(_);if(ft!==null){(ft.flags&65536)===0&&(ft.flags|=256),rb(ft,_,D,k,a),pp(Zi(q,D));break e}}k=q=Zi(q,D),kt!==4&&(kt=2),Yl===null?Yl=[k]:Yl.push(k),k=_;do{switch(k.tag){case 3:k.flags|=65536,a&=-a,k.lanes|=a;var Z=Xw(k,q,a);Sw(k,Z);break e;case 1:D=q;var Q=k.type,te=k.stateNode;if((k.flags&128)===0&&(typeof Q.getDerivedStateFromError=="function"||te!==null&&typeof te.componentDidCatch=="function"&&(Go===null||!Go.has(te)))){k.flags|=65536,a&=-a,k.lanes|=a;var de=eb(k,D,a);Sw(k,de);break e}}k=k.return}while(k!==null)}Rb(d)}catch(Ae){a=Ae,yt===d&&d!==null&&(yt=d=d.return);continue}break}while(!0)}function Tb(){var s=Cd.current;return Cd.current=gd,s===null?gd:s}function r0(){(kt===0||kt===3||kt===2)&&(kt=4),Pt===null||(zs&268435455)===0&&(kd&268435455)===0||Jo(Pt,Lt)}function Nd(s,a){var d=qe;qe|=2;var y=Tb();(Pt!==s||Lt!==a)&&(ao=null,qs(s,a));do try{GS();break}catch(x){Bb(s,x)}while(!0);if(gp(),qe=d,Cd.current=y,yt!==null)throw Error(n(261));return Pt=null,Lt=0,kt}function GS(){for(;yt!==null;)_b(yt)}function KS(){for(;yt!==null&&!bA();)_b(yt)}function _b(s){var a=Fb(s.alternate,s,Dn);s.memoizedProps=s.pendingProps,a===null?Rb(s):yt=a,Gp.current=null}function Rb(s){var a=s;do{var d=a.alternate;if(s=a.return,(a.flags&32768)===0){if(d=$S(d,a,Dn),d!==null){yt=d;return}}else{if(d=zS(d,a),d!==null){d.flags&=32767,yt=d;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{kt=6,yt=null;return}}if(a=a.sibling,a!==null){yt=a;return}yt=a=s}while(a!==null);kt===0&&(kt=5)}function Hs(s,a,d){var y=Ke,x=Zn.transition;try{Zn.transition=null,Ke=1,YS(s,a,d,y)}finally{Zn.transition=x,Ke=y}return null}function YS(s,a,d,y){do na();while(Ko!==null);if((qe&6)!==0)throw Error(n(327));d=s.finishedWork;var x=s.finishedLanes;if(d===null)return null;if(s.finishedWork=null,s.finishedLanes=0,d===s.current)throw Error(n(177));s.callbackNode=null,s.callbackPriority=0;var k=d.lanes|d.childLanes;if(PA(s,k),s===Pt&&(yt=Pt=null,Lt=0),(d.subtreeFlags&2064)===0&&(d.flags&2064)===0||Ad||(Ad=!0,Lb(_u,function(){return na(),null})),k=(d.flags&15990)!==0,(d.subtreeFlags&15990)!==0||k){k=Zn.transition,Zn.transition=null;var _=Ke;Ke=1;var D=qe;qe|=4,Gp.current=null,qS(s,d),Eb(d,s),gS(rp),Uu=!!np,rp=np=null,s.current=d,HS(d),xA(),qe=D,Ke=_,Zn.transition=k}else s.current=d;if(Ad&&(Ad=!1,Ko=s,Sd=x),k=s.pendingLanes,k===0&&(Go=null),EA(d.stateNode),xn(s,dt()),a!==null)for(y=s.onRecoverableError,d=0;d<a.length;d++)x=a[d],y(x.value,{componentStack:x.stack,digest:x.digest});if(Ed)throw Ed=!1,s=Jp,Jp=null,s;return(Sd&1)!==0&&s.tag!==0&&na(),k=s.pendingLanes,(k&1)!==0?s===Zp?Jl++:(Jl=0,Zp=s):Jl=0,qo(),null}function na(){if(Ko!==null){var s=Cv(Sd),a=Zn.transition,d=Ke;try{if(Zn.transition=null,Ke=16>s?16:s,Ko===null)var y=!1;else{if(s=Ko,Ko=null,Sd=0,(qe&6)!==0)throw Error(n(331));var x=qe;for(qe|=4,xe=s.current;xe!==null;){var k=xe,_=k.child;if((xe.flags&16)!==0){var D=k.deletions;if(D!==null){for(var q=0;q<D.length;q++){var ne=D[q];for(xe=ne;xe!==null;){var le=xe;switch(le.tag){case 0:case 11:case 15:Gl(8,le,k)}var ce=le.child;if(ce!==null)ce.return=le,xe=ce;else for(;xe!==null;){le=xe;var ae=le.sibling,me=le.return;if(wb(le),le===ne){xe=null;break}if(ae!==null){ae.return=me,xe=ae;break}xe=me}}}var Ce=k.alternate;if(Ce!==null){var ke=Ce.child;if(ke!==null){Ce.child=null;do{var ft=ke.sibling;ke.sibling=null,ke=ft}while(ke!==null)}}xe=k}}if((k.subtreeFlags&2064)!==0&&_!==null)_.return=k,xe=_;else e:for(;xe!==null;){if(k=xe,(k.flags&2048)!==0)switch(k.tag){case 0:case 11:case 15:Gl(9,k,k.return)}var Z=k.sibling;if(Z!==null){Z.return=k.return,xe=Z;break e}xe=k.return}}var Q=s.current;for(xe=Q;xe!==null;){_=xe;var te=_.child;if((_.subtreeFlags&2064)!==0&&te!==null)te.return=_,xe=te;else e:for(_=Q;xe!==null;){if(D=xe,(D.flags&2048)!==0)try{switch(D.tag){case 0:case 11:case 15:xd(9,D)}}catch(Ae){lt(D,D.return,Ae)}if(D===_){xe=null;break e}var de=D.sibling;if(de!==null){de.return=D.return,xe=de;break e}xe=D.return}}if(qe=x,qo(),Br&&typeof Br.onPostCommitFiberRoot=="function")try{Br.onPostCommitFiberRoot(Ru,s)}catch{}y=!0}return y}finally{Ke=d,Zn.transition=a}}return!1}function Ob(s,a,d){a=Zi(d,a),a=Xw(s,a,1),s=Vo(s,a,1),a=ln(),s!==null&&(xl(s,1,a),xn(s,a))}function lt(s,a,d){if(s.tag===3)Ob(s,s,d);else for(;a!==null;){if(a.tag===3){Ob(a,s,d);break}else if(a.tag===1){var y=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Go===null||!Go.has(y))){s=Zi(d,s),s=eb(a,s,1),a=Vo(a,s,1),s=ln(),a!==null&&(xl(a,1,s),xn(a,s));break}}a=a.return}}function JS(s,a,d){var y=s.pingCache;y!==null&&y.delete(a),a=ln(),s.pingedLanes|=s.suspendedLanes&d,Pt===s&&(Lt&d)===d&&(kt===4||kt===3&&(Lt&130023424)===Lt&&500>dt()-Yp?qs(s,0):Kp|=d),xn(s,a)}function Mb(s,a){a===0&&((s.mode&1)===0?a=1:(a=Mu,Mu<<=1,(Mu&130023424)===0&&(Mu=4194304)));var d=ln();s=oo(s,a),s!==null&&(xl(s,a,d),xn(s,d))}function ZS(s){var a=s.memoizedState,d=0;a!==null&&(d=a.retryLane),Mb(s,d)}function XS(s,a){var d=0;switch(s.tag){case 13:var y=s.stateNode,x=s.memoizedState;x!==null&&(d=x.retryLane);break;case 19:y=s.stateNode;break;default:throw Error(n(314))}y!==null&&y.delete(a),Mb(s,d)}var Fb;Fb=function(s,a,d){if(s!==null)if(s.memoizedProps!==a.pendingProps||yn.current)wn=!0;else{if((s.lanes&d)===0&&(a.flags&128)===0)return wn=!1,US(s,a,d);wn=(s.flags&131072)!==0}else wn=!1,ot&&(a.flags&1048576)!==0&&gw(a,od,a.index);switch(a.lanes=0,a.tag){case 2:var y=a.type;wd(s,a),s=a.pendingProps;var x=qi(a,Ht.current);Yi(a,d),x=jp(null,a,y,s,x,d);var k=Ip();return a.flags|=1,typeof x=="object"&&x!==null&&typeof x.render=="function"&&x.$$typeof===void 0?(a.tag=1,a.memoizedState=null,a.updateQueue=null,vn(y)?(k=!0,td(a)):k=!1,a.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,bp(a),x.updater=yd,a.stateNode=x,x._reactInternals=a,Rp(a,y,s,d),a=Lp(null,a,y,!0,k,d)):(a.tag=0,ot&&k&&up(a),an(null,a,x,d),a=a.child),a;case 16:y=a.elementType;e:{switch(wd(s,a),s=a.pendingProps,x=y._init,y=x(y._payload),a.type=y,x=a.tag=tj(y),s=gr(y,s),x){case 0:a=Fp(null,a,y,s,d);break e;case 1:a=cb(null,a,y,s,d);break e;case 11:a=ob(null,a,y,s,d);break e;case 14:a=sb(null,a,y,gr(y.type,s),d);break e}throw Error(n(306,y,""))}return a;case 0:return y=a.type,x=a.pendingProps,x=a.elementType===y?x:gr(y,x),Fp(s,a,y,x,d);case 1:return y=a.type,x=a.pendingProps,x=a.elementType===y?x:gr(y,x),cb(s,a,y,x,d);case 3:e:{if(ub(a),s===null)throw Error(n(387));y=a.pendingProps,k=a.memoizedState,x=k.element,Aw(s,a),ud(a,y,null,d);var _=a.memoizedState;if(y=_.element,k.isDehydrated)if(k={element:y,isDehydrated:!1,cache:_.cache,pendingSuspenseBoundaries:_.pendingSuspenseBoundaries,transitions:_.transitions},a.updateQueue.baseState=k,a.memoizedState=k,a.flags&256){x=Zi(Error(n(423)),a),a=db(s,a,y,d,x);break e}else if(y!==x){x=Zi(Error(n(424)),a),a=db(s,a,y,d,x);break e}else for(Ln=$o(a.stateNode.containerInfo.firstChild),Fn=a,ot=!0,mr=null,d=kw(a,null,y,d),a.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(Qi(),y===x){a=io(s,a,d);break e}an(s,a,y,d)}a=a.child}return a;case 5:return Iw(a),s===null&&hp(a),y=a.type,x=a.pendingProps,k=s!==null?s.memoizedProps:null,_=x.children,op(y,x)?_=null:k!==null&&op(y,k)&&(a.flags|=32),lb(s,a),an(s,a,_,d),a.child;case 6:return s===null&&hp(a),null;case 13:return fb(s,a,d);case 4:return xp(a,a.stateNode.containerInfo),y=a.pendingProps,s===null?a.child=Gi(a,null,y,d):an(s,a,y,d),a.child;case 11:return y=a.type,x=a.pendingProps,x=a.elementType===y?x:gr(y,x),ob(s,a,y,x,d);case 7:return an(s,a,a.pendingProps,d),a.child;case 8:return an(s,a,a.pendingProps.children,d),a.child;case 12:return an(s,a,a.pendingProps.children,d),a.child;case 10:e:{if(y=a.type._context,x=a.pendingProps,k=a.memoizedProps,_=x.value,Ze(ad,y._currentValue),y._currentValue=_,k!==null)if(pr(k.value,_)){if(k.children===x.children&&!yn.current){a=io(s,a,d);break e}}else for(k=a.child,k!==null&&(k.return=a);k!==null;){var D=k.dependencies;if(D!==null){_=k.child;for(var q=D.firstContext;q!==null;){if(q.context===y){if(k.tag===1){q=so(-1,d&-d),q.tag=2;var ne=k.updateQueue;if(ne!==null){ne=ne.shared;var le=ne.pending;le===null?q.next=q:(q.next=le.next,le.next=q),ne.pending=q}}k.lanes|=d,q=k.alternate,q!==null&&(q.lanes|=d),vp(k.return,d,a),D.lanes|=d;break}q=q.next}}else if(k.tag===10)_=k.type===a.type?null:k.child;else if(k.tag===18){if(_=k.return,_===null)throw Error(n(341));_.lanes|=d,D=_.alternate,D!==null&&(D.lanes|=d),vp(_,d,a),_=k.sibling}else _=k.child;if(_!==null)_.return=k;else for(_=k;_!==null;){if(_===a){_=null;break}if(k=_.sibling,k!==null){k.return=_.return,_=k;break}_=_.return}k=_}an(s,a,x.children,d),a=a.child}return a;case 9:return x=a.type,y=a.pendingProps.children,Yi(a,d),x=Yn(x),y=y(x),a.flags|=1,an(s,a,y,d),a.child;case 14:return y=a.type,x=gr(y,a.pendingProps),x=gr(y.type,x),sb(s,a,y,x,d);case 15:return ib(s,a,a.type,a.pendingProps,d);case 17:return y=a.type,x=a.pendingProps,x=a.elementType===y?x:gr(y,x),wd(s,a),a.tag=1,vn(y)?(s=!0,td(a)):s=!1,Yi(a,d),Jw(a,y,x),Rp(a,y,x,d),Lp(null,a,y,!0,s,d);case 19:return pb(s,a,d);case 22:return ab(s,a,d)}throw Error(n(156,a.tag))};function Lb(s,a){return yv(s,a)}function ej(s,a,d,y){this.tag=s,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xn(s,a,d,y){return new ej(s,a,d,y)}function o0(s){return s=s.prototype,!(!s||!s.isReactComponent)}function tj(s){if(typeof s=="function")return o0(s)?1:0;if(s!=null){if(s=s.$$typeof,s===W)return 11;if(s===O)return 14}return 2}function Zo(s,a){var d=s.alternate;return d===null?(d=Xn(s.tag,a,s.key,s.mode),d.elementType=s.elementType,d.type=s.type,d.stateNode=s.stateNode,d.alternate=s,s.alternate=d):(d.pendingProps=a,d.type=s.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=s.flags&14680064,d.childLanes=s.childLanes,d.lanes=s.lanes,d.child=s.child,d.memoizedProps=s.memoizedProps,d.memoizedState=s.memoizedState,d.updateQueue=s.updateQueue,a=s.dependencies,d.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},d.sibling=s.sibling,d.index=s.index,d.ref=s.ref,d}function Pd(s,a,d,y,x,k){var _=2;if(y=s,typeof s=="function")o0(s)&&(_=1);else if(typeof s=="string")_=5;else e:switch(s){case B:return Vs(d.children,x,k,a);case R:_=8,x|=8;break;case M:return s=Xn(12,d,a,x|2),s.elementType=M,s.lanes=k,s;case L:return s=Xn(13,d,a,x),s.elementType=L,s.lanes=k,s;case J:return s=Xn(19,d,a,x),s.elementType=J,s.lanes=k,s;case ee:return Bd(d,x,k,a);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case H:_=10;break e;case V:_=9;break e;case W:_=11;break e;case O:_=14;break e;case G:_=16,y=null;break e}throw Error(n(130,s==null?s:typeof s,""))}return a=Xn(_,d,a,x),a.elementType=s,a.type=y,a.lanes=k,a}function Vs(s,a,d,y){return s=Xn(7,s,y,a),s.lanes=d,s}function Bd(s,a,d,y){return s=Xn(22,s,y,a),s.elementType=ee,s.lanes=d,s.stateNode={isHidden:!1},s}function s0(s,a,d){return s=Xn(6,s,null,a),s.lanes=d,s}function i0(s,a,d){return a=Xn(4,s.children!==null?s.children:[],s.key,a),a.lanes=d,a.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},a}function nj(s,a,d,y,x){this.tag=a,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=_h(0),this.expirationTimes=_h(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_h(0),this.identifierPrefix=y,this.onRecoverableError=x,this.mutableSourceEagerHydrationData=null}function a0(s,a,d,y,x,k,_,D,q){return s=new nj(s,a,d,D,q),a===1?(a=1,k===!0&&(a|=8)):a=0,k=Xn(3,null,null,a),s.current=k,k.stateNode=s,k.memoizedState={element:y,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},bp(k),s}function rj(s,a,d){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:T,key:y==null?null:""+y,children:s,containerInfo:a,implementation:d}}function Db(s){if(!s)return Wo;s=s._reactInternals;e:{if(Rs(s)!==s||s.tag!==1)throw Error(n(170));var a=s;do{switch(a.tag){case 3:a=a.stateNode.context;break e;case 1:if(vn(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break e}}a=a.return}while(a!==null);throw Error(n(171))}if(s.tag===1){var d=s.type;if(vn(d))return hw(s,d,a)}return a}function Ub(s,a,d,y,x,k,_,D,q){return s=a0(d,y,!0,s,x,k,_,D,q),s.context=Db(null),d=s.current,y=ln(),x=Yo(d),k=so(y,x),k.callback=a??null,Vo(d,k,x),s.current.lanes=x,xl(s,x,y),xn(s,y),s}function Td(s,a,d,y){var x=a.current,k=ln(),_=Yo(x);return d=Db(d),a.context===null?a.context=d:a.pendingContext=d,a=so(k,_),a.payload={element:s},y=y===void 0?null:y,y!==null&&(a.callback=y),s=Vo(x,a,_),s!==null&&(wr(s,x,_,k),cd(s,x,_)),_}function _d(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function $b(s,a){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var d=s.retryLane;s.retryLane=d!==0&&d<a?d:a}}function l0(s,a){$b(s,a),(s=s.alternate)&&$b(s,a)}function oj(){return null}var zb=typeof reportError=="function"?reportError:function(s){console.error(s)};function c0(s){this._internalRoot=s}Rd.prototype.render=c0.prototype.render=function(s){var a=this._internalRoot;if(a===null)throw Error(n(409));Td(s,a,null,null)},Rd.prototype.unmount=c0.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var a=s.containerInfo;Ws(function(){Td(null,s,null,null)}),a[eo]=null}};function Rd(s){this._internalRoot=s}Rd.prototype.unstable_scheduleHydration=function(s){if(s){var a=Av();s={blockedOn:null,target:s,priority:a};for(var d=0;d<Lo.length&&a!==0&&a<Lo[d].priority;d++);Lo.splice(d,0,s),d===0&&Iv(s)}};function u0(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function Od(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function Wb(){}function sj(s,a,d,y,x){if(x){if(typeof y=="function"){var k=y;y=function(){var ne=_d(_);k.call(ne)}}var _=Ub(a,y,s,0,null,!1,!1,"",Wb);return s._reactRootContainer=_,s[eo]=_.current,Ol(s.nodeType===8?s.parentNode:s),Ws(),_}for(;x=s.lastChild;)s.removeChild(x);if(typeof y=="function"){var D=y;y=function(){var ne=_d(q);D.call(ne)}}var q=a0(s,0,!1,null,null,!1,!1,"",Wb);return s._reactRootContainer=q,s[eo]=q.current,Ol(s.nodeType===8?s.parentNode:s),Ws(function(){Td(a,q,d,y)}),q}function Md(s,a,d,y,x){var k=d._reactRootContainer;if(k){var _=k;if(typeof x=="function"){var D=x;x=function(){var q=_d(_);D.call(q)}}Td(a,_,s,x)}else _=sj(d,a,s,x,y);return _d(_)}kv=function(s){switch(s.tag){case 3:var a=s.stateNode;if(a.current.memoizedState.isDehydrated){var d=bl(a.pendingLanes);d!==0&&(Rh(a,d|1),xn(a,dt()),(qe&6)===0&&(ta=dt()+500,qo()))}break;case 13:Ws(function(){var y=oo(s,1);if(y!==null){var x=ln();wr(y,s,1,x)}}),l0(s,1)}},Oh=function(s){if(s.tag===13){var a=oo(s,134217728);if(a!==null){var d=ln();wr(a,s,134217728,d)}l0(s,134217728)}},Ev=function(s){if(s.tag===13){var a=Yo(s),d=oo(s,a);if(d!==null){var y=ln();wr(d,s,a,y)}l0(s,a)}},Av=function(){return Ke},Sv=function(s,a){var d=Ke;try{return Ke=s,a()}finally{Ke=d}},_s=function(s,a,d){switch(a){case"input":if(sn(s,d),a=d.name,d.type==="radio"&&a!=null){for(d=s;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll("input[name="+JSON.stringify(""+a)+'][type="radio"]'),a=0;a<d.length;a++){var y=d[a];if(y!==s&&y.form===s.form){var x=Xu(y);if(!x)throw Error(n(90));It(y),sn(y,x)}}}break;case"textarea":Ro(s,d);break;case"select":a=d.value,a!=null&&Je(s,!!d.multiple,a,!1)}},uv=t0,dv=Ws;var ij={usingClientEntryPoint:!1,Events:[Ll,zi,Xu,lv,cv,t0]},Zl={findFiberByHostInstance:Os,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},aj={bundleType:Zl.bundleType,version:Zl.version,rendererPackageName:Zl.rendererPackageName,rendererConfig:Zl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:S.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=mv(s),s===null?null:s.stateNode},findFiberByHostInstance:Zl.findFiberByHostInstance||oj,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fd.isDisabled&&Fd.supportsFiber)try{Ru=Fd.inject(aj),Br=Fd}catch{}}return Cn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ij,Cn.createPortal=function(s,a){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!u0(a))throw Error(n(200));return rj(s,a,null,d)},Cn.createRoot=function(s,a){if(!u0(s))throw Error(n(299));var d=!1,y="",x=zb;return a!=null&&(a.unstable_strictMode===!0&&(d=!0),a.identifierPrefix!==void 0&&(y=a.identifierPrefix),a.onRecoverableError!==void 0&&(x=a.onRecoverableError)),a=a0(s,1,!1,null,null,d,!1,y,x),s[eo]=a.current,Ol(s.nodeType===8?s.parentNode:s),new c0(a)},Cn.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var a=s._reactInternals;if(a===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=mv(a),s=s===null?null:s.stateNode,s},Cn.flushSync=function(s){return Ws(s)},Cn.hydrate=function(s,a,d){if(!Od(a))throw Error(n(200));return Md(null,s,a,!0,d)},Cn.hydrateRoot=function(s,a,d){if(!u0(s))throw Error(n(405));var y=d!=null&&d.hydratedSources||null,x=!1,k="",_=zb;if(d!=null&&(d.unstable_strictMode===!0&&(x=!0),d.identifierPrefix!==void 0&&(k=d.identifierPrefix),d.onRecoverableError!==void 0&&(_=d.onRecoverableError)),a=Ub(a,null,s,1,d??null,x,!1,k,_),s[eo]=a.current,Ol(s),y)for(s=0;s<y.length;s++)d=y[s],x=d._getVersion,x=x(d._source),a.mutableSourceEagerHydrationData==null?a.mutableSourceEagerHydrationData=[d,x]:a.mutableSourceEagerHydrationData.push(d,x);return new Rd(a)},Cn.render=function(s,a,d){if(!Od(a))throw Error(n(200));return Md(null,s,a,!1,d)},Cn.unmountComponentAtNode=function(s){if(!Od(s))throw Error(n(40));return s._reactRootContainer?(Ws(function(){Md(null,null,s,!1,function(){s._reactRootContainer=null,s[eo]=null})}),!0):!1},Cn.unstable_batchedUpdates=t0,Cn.unstable_renderSubtreeIntoContainer=function(s,a,d,y){if(!Od(d))throw Error(n(200));if(s==null||s._reactInternals===void 0)throw Error(n(38));return Md(s,a,d,!1,y)},Cn.version="18.3.1-next-f1338f8080-20240426",Cn}var Zb;function i5(){if(Zb)return p0.exports;Zb=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),p0.exports=gj(),p0.exports}var Xb;function yj(){if(Xb)return Dd;Xb=1;var e=i5();return Dd.createRoot=e.createRoot,Dd.hydrateRoot=e.hydrateRoot,Dd}var vj=yj();class a5 extends Error{constructor(t="Waiting for Antscan to catch up with your transaction"){super(t),this.name="IndexerSyncingError"}}const wj=[{label:"Market",items:[{id:"stake",label:"Sellers"}]},{label:"You",items:[{id:"positions",label:"My positions"},{id:"rewards",label:"Rewards"},{id:"seller",label:"Seller"}]},{label:"Protocol",items:[{id:"network",label:"Network"},{id:"addresses",label:"Addresses"}]}],l5=["stake","positions","rewards","seller","network","addresses"],sy="ants.dashboard.token";function bj(){try{return window.sessionStorage.getItem(sy)}catch{return null}}const xj={embedded:!1,apiUrl:e=>e,headers:()=>({Authorization:`Bearer ${bj()??""}`}),href:e=>`#/${e}`,currentPath:()=>window.location.hash.replace(/^#\/?/,""),replace:e=>window.history.replaceState(null,"",`#/${e}`),subscribe:e=>(window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)),portalTarget:()=>document.body,pages:l5,buyerRewards:!0};let Cj=xj;function Er(){return Cj}class ys extends Error{constructor(n,r){super(n);er(this,"status");this.name="ApiError",this.status=r}}function kj(){const e=/(?:^#|[#&?])token=([A-Za-z0-9_-]+)/.exec(window.location.hash),t=e==null?void 0:e[1];if(!t)return;try{window.sessionStorage.setItem(sy,t)}catch{}const n=new URLSearchParams(window.location.hash.slice(1)).get("page");window.history.replaceState(null,"",`${window.location.pathname}${window.location.search}#/${n==="rewards"?"rewards":"stake"}`)}function Ej(){try{return window.sessionStorage.getItem(sy)}catch{return null}}const jm=new Set;function Aj(e){return jm.add(e),()=>{jm.delete(e)}}async function Js(e,t){const n={...Er().headers()};let r;(t==null?void 0:t.body)!==void 0&&(n["Content-Type"]="application/json",r=JSON.stringify(t.body));let o;try{o=await fetch(Er().apiUrl(e),{method:(t==null?void 0:t.method)??"GET",headers:n,body:r})}catch(l){throw new ys(`Network error: ${l instanceof Error?l.message:String(l)}`,0)}if(o.status===401){for(const l of jm)l();throw new ys("Unauthorized",401)}let i=null;try{i=await o.json()}catch{i=null}if(!i||typeof i!="object")throw new ys(`HTTP ${o.status}`,o.status);if(!i.ok)throw"state"in i&&i.state==="syncing"?new a5:new ys("error"in i&&i.error||`HTTP ${o.status}`,o.status);return i.data}function Kt(e){return Js(e)}function e6(e,t){return Js(e,{method:"POST",body:t})}const Ye={config:()=>Kt("/api/config"),overview:()=>Kt("/api/overview"),positions:()=>Kt("/api/positions"),rewards:()=>Kt("/api/rewards"),pools:()=>Kt("/api/pools"),sellerModels:async e=>{try{const t=await Kt(`/api/sellers/${encodeURIComponent(e)}/models`);if(!t||!("period"in t)||!("totals"in t))throw new ys("The running dashboard server still uses sampled model data. Restart the updated desktop or dashboard process to load last-epoch totals.",502);return t}catch(t){throw t instanceof ys&&t.status===404?new ys("The running dashboard server does not have the model-data endpoint (HTTP 404). Restart the updated desktop or dashboard process, then reopen staking.",404):t}},pool:e=>Kt(`/api/pools/${e}`),usage:e=>Kt(`/api/usage?epochs=${e}`),emissions:()=>Kt("/api/emissions"),network:()=>Kt("/api/network"),networkLegacy:()=>Kt("/api/network/legacy"),verification:e=>Kt(`/api/verification${e?`?seller=${encodeURIComponent(e)}`:""}`),proofStatus:e=>Kt(`/api/verification/proofs/${encodeURIComponent(e)}`),seller:()=>Kt("/api/seller"),jobs:()=>Kt("/api/jobs"),job:e=>Kt(`/api/jobs/${encodeURIComponent(e)}`),withdrawPreview:e=>e6("/api/positions/withdraw/preview",{positionIds:e}),startJob:(e,t)=>e6(e,t)},za=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{name:"addr",type:"address"}],name:"getEthBalance",outputs:[{name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],Im=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],c5=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}],u5=[...c5,{name:"resolveWithGateways",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],Sj=[...c5,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],t6=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],n6=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],d5=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],r6=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}];function Ar(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new Uj(e.type);return`${e.name}(${Df(e.inputs,{includeName:t})})`}function Df(e,{includeName:t=!1}={}){return e?e.map(n=>jj(n,{includeName:t})).join(t?", ":","):""}function jj(e,{includeName:t}){return e.type.startsWith("tuple")?`(${Df(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}function Vr(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function at(e){return Vr(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const f5="2.47.12";let ec={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${f5}`},oe=class Nm extends Error{constructor(t,n={}){var c;const r=(()=>{var u;return n.cause instanceof Nm?n.cause.details:(u=n.cause)!=null&&u.message?n.cause.message:n.details})(),o=n.cause instanceof Nm&&n.cause.docsPath||n.docsPath,i=(c=ec.getDocsUrl)==null?void 0:c.call(ec,{...n,docsPath:o}),l=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: ${i}`]:[],...r?[`Details: ${r}`]:[],...ec.version?[`Version: ${ec.version}`]:[]].join(`
|
|
42
|
-
`);super(l,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=o,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=f5}walk(t){return h5(this,t)}};function h5(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?h5(e.cause,t):t?null:e}class Ij extends oe{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
|
|
43
|
-
`),{docsPath:t,name:"AbiConstructorNotFoundError"})}}class o6 extends oe{constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
|
|
44
|
-
`),{docsPath:t,name:"AbiConstructorParamsNotFoundError"})}}class p5 extends oe{constructor({data:t,params:n,size:r}){super([`Data size of ${r} bytes is too small for given parameters.`].join(`
|
|
45
|
-
`),{metaMessages:[`Params: (${Df(n,{includeName:!0})})`,`Data: ${t} (${r} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t,this.params=n,this.size=r}}class uu extends oe{constructor({cause:t}={}){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError",cause:t})}}class Nj extends oe{constructor({expectedLength:t,givenLength:n,type:r}){super([`ABI encoding array length mismatch for type ${r}.`,`Expected length: ${t}`,`Given length: ${n}`].join(`
|
|
46
|
-
`),{name:"AbiEncodingArrayLengthMismatchError"})}}class Pj extends oe{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${at(n)}) does not match expected size (bytes${t}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class Bj extends oe{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${n}`].join(`
|
|
47
|
-
`),{name:"AbiEncodingLengthMismatchError"})}}class Tj extends oe{constructor(t,{docsPath:n}){super([`Arguments (\`args\`) were provided to "${t}", but "${t}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join(`
|
|
48
|
-
`),{docsPath:n,name:"AbiErrorInputsNotFoundError"})}}class s6 extends oe{constructor(t,{docsPath:n}={}){super([`Error ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(`
|
|
49
|
-
`),{docsPath:n,name:"AbiErrorNotFoundError"})}}class m5 extends oe{constructor(t,{docsPath:n,cause:r}){super([`Encoded error signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${t}.`].join(`
|
|
50
|
-
`),{docsPath:n,name:"AbiErrorSignatureNotFoundError",cause:r}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=t}}class _j extends oe{constructor({docsPath:t}){super("Cannot extract event signature from empty topics.",{docsPath:t,name:"AbiEventSignatureEmptyTopicsError"})}}class Rj extends oe{constructor(t,{docsPath:n}){super([`Encoded event signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://4byte.sourcify.dev/?q=${t}.`].join(`
|
|
51
|
-
`),{docsPath:n,name:"AbiEventSignatureNotFoundError"})}}class i6 extends oe{constructor(t,{docsPath:n}={}){super([`Event ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(`
|
|
52
|
-
`),{docsPath:n,name:"AbiEventNotFoundError"})}}class Wa extends oe{constructor(t,{docsPath:n}={}){super([`Function ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
|
|
53
|
-
`),{docsPath:n,name:"AbiFunctionNotFoundError"})}}class g5 extends oe{constructor(t,{docsPath:n}){super([`Function "${t}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(`
|
|
54
|
-
`),{docsPath:n,name:"AbiFunctionOutputsNotFoundError"})}}class Oj extends oe{constructor(t,{docsPath:n}){super([`Encoded function signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://4byte.sourcify.dev/?q=${t}.`].join(`
|
|
55
|
-
`),{docsPath:n,name:"AbiFunctionSignatureNotFoundError"})}}class Mj extends oe{constructor(t,n){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${t.type}\` in \`${Ar(t.abiItem)}\`, and`,`\`${n.type}\` in \`${Ar(n.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}let Fj=class extends oe{constructor({expectedSize:t,givenSize:n}){super(`Expected bytes${t}, got bytes${n}.`,{name:"BytesSizeMismatchError"})}};class mf extends oe{constructor({abiItem:t,data:n,params:r,size:o}){super([`Data size of ${o} bytes is too small for non-indexed event parameters.`].join(`
|
|
56
|
-
`),{metaMessages:[`Params: (${Df(r,{includeName:!0})})`,`Data: ${n} (${o} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=t,this.data=n,this.params=r,this.size=o}}class iy extends oe{constructor({abiItem:t,param:n}){super([`Expected a topic for indexed event parameter${n.name?` "${n.name}"`:""} on event "${Ar(t,{includeName:!0})}".`].join(`
|
|
57
|
-
`),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=t}}class Lj extends oe{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
|
|
58
|
-
`),{docsPath:n,name:"InvalidAbiEncodingType"})}}class Dj extends oe{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
|
|
59
|
-
`),{docsPath:n,name:"InvalidAbiDecodingType"})}}let y5=class extends oe{constructor(t){super([`Value "${t}" is not a valid array.`].join(`
|
|
60
|
-
`),{name:"InvalidArrayError"})}};class Uj extends oe{constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
|
|
61
|
-
`),{name:"InvalidDefinitionTypeError"})}}class EW extends oe{constructor(t){super(`Type "${t}" is not supported for packed encoding.`,{name:"UnsupportedPackedAbiType"})}}let xs=class extends oe{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}},v5=class extends oe{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${r}).`,{name:"SliceOffsetOutOfBoundsError"})}},w5=class extends oe{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}};class a6 extends oe{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${n} ${r} long, but is ${t} ${r} long.`,{name:"InvalidBytesLengthError"})}}function rl(e,{dir:t,size:n=32}={}){return typeof e=="string"?vs(e,{dir:t,size:n}):$j(e,{dir:t,size:n})}function vs(e,{dir:t,size:n=32}={}){if(n===null)return e;const r=e.replace("0x","");if(r.length>n*2)throw new w5({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function $j(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new w5({size:e.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let o=0;o<n;o++){const i=t==="right";r[i?o:n-o-1]=e[i?o:e.length-o-1]}return r}let ay=class extends oe{constructor({max:t,min:n,signed:r,size:o,value:i}){super(`Number "${i}" is not in safe ${o?`${o*8}-bit ${r?"signed":"unsigned"} `:""}integer range ${t?`(${n} to ${t})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}},zj=class extends oe{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}};class Wj extends oe{constructor(t){super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}let qj=class extends oe{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}};function Wr(e,{dir:t="left"}={}){let n=typeof e=="string"?e.replace("0x",""):e,r=0;for(let o=0;o<n.length-1&&n[t==="left"?o:n.length-o-1].toString()==="0";o++)r++;return n=t==="left"?n.slice(r):n.slice(0,n.length-r),typeof e=="string"?(n.length===1&&t==="right"&&(n=`${n}0`),`0x${n.length%2===1?`0${n}`:n}`):n}function ur(e,{size:t}){if(at(e)>t)throw new qj({givenSize:at(e),maxSize:t})}function Hn(e,t={}){const{signed:n}=t;t.size&&ur(e,{size:t.size});const r=BigInt(e);if(!n)return r;const o=(e.length-2)/2,i=(1n<<BigInt(o)*8n-1n)-1n;return r<=i?r:r-BigInt(`0x${"f".padStart(o*2,"f")}`)-1n}function Hj(e,t={}){let n=e;if(t.size&&(ur(n,{size:t.size}),n=Wr(n)),Wr(n)==="0x00")return!1;if(Wr(n)==="0x01")return!0;throw new Wj(n)}function lr(e,t={}){const n=Hn(e,t),r=Number(n);if(!Number.isSafeInteger(r))throw new ay({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:t.signed,size:t.size,value:`${n}n`});return r}function Vj(e,t={}){let n=Sr(e);return t.size&&(ur(n,{size:t.size}),n=Wr(n,{dir:"right"})),new TextDecoder().decode(n)}const Qj=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function jo(e,t={}){return typeof e=="number"||typeof e=="bigint"?ge(e,t):typeof e=="string"?qa(e,t):typeof e=="boolean"?b5(e,t):St(e,t)}function b5(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(ur(n,{size:t.size}),rl(n,{size:t.size})):n}function St(e,t={}){let n="";for(let o=0;o<e.length;o++)n+=Qj[e[o]];const r=`0x${n}`;return typeof t.size=="number"?(ur(r,{size:t.size}),rl(r,{dir:"right",size:t.size})):r}function ge(e,t={}){const{signed:n,size:r}=t,o=BigInt(e);let i;r?n?i=(1n<<BigInt(r)*8n-1n)-1n:i=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));const l=typeof i=="bigint"&&n?-i-1n:0;if(i&&o>i||o<l){const u=typeof e=="bigint"?"n":"";throw new ay({max:i?`${i}${u}`:void 0,min:`${l}${u}`,signed:n,size:r,value:`${e}${u}`})}const c=`0x${(n&&o<0?(1n<<BigInt(r*8))+BigInt(o):o).toString(16)}`;return r?rl(c,{size:r}):c}const Gj=new TextEncoder;function qa(e,t={}){const n=Gj.encode(e);return St(n,t)}const Kj=new TextEncoder;function ol(e,t={}){return typeof e=="number"||typeof e=="bigint"?Jj(e,t):typeof e=="boolean"?Yj(e,t):Vr(e)?Sr(e,t):fi(e,t)}function Yj(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),typeof t.size=="number"?(ur(n,{size:t.size}),rl(n,{size:t.size})):n}const lo={zero:48,nine:57,A:65,F:70,a:97,f:102};function l6(e){if(e>=lo.zero&&e<=lo.nine)return e-lo.zero;if(e>=lo.A&&e<=lo.F)return e-(lo.A-10);if(e>=lo.a&&e<=lo.f)return e-(lo.a-10)}function Sr(e,t={}){let n=e;t.size&&(ur(n,{size:t.size}),n=rl(n,{dir:"right",size:t.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const o=r.length/2,i=new Uint8Array(o);for(let l=0,c=0;l<o;l++){const u=l6(r.charCodeAt(c++)),p=l6(r.charCodeAt(c++));if(u===void 0||p===void 0)throw new oe(`Invalid byte sequence ("${r[c-2]}${r[c-1]}" in "${r}").`);i[l]=u*16+p}return i}function Jj(e,t){const n=ge(e,t);return Sr(n)}function fi(e,t={}){const n=Kj.encode(e);return typeof t.size=="number"?(ur(n,{size:t.size}),rl(n,{dir:"right",size:t.size})):n}const Ud=BigInt(2**32-1),c6=BigInt(32);function Zj(e,t=!1){return t?{h:Number(e&Ud),l:Number(e>>c6&Ud)}:{h:Number(e>>c6&Ud)|0,l:Number(e&Ud)|0}}function x5(e,t=!1){const n=e.length;let r=new Uint32Array(n),o=new Uint32Array(n);for(let i=0;i<n;i++){const{h:l,l:c}=Zj(e[i],t);[r[i],o[i]]=[l,c]}return[r,o]}const u6=(e,t,n)=>e>>>n,d6=(e,t,n)=>e<<32-n|t>>>n,ra=(e,t,n)=>e>>>n|t<<32-n,oa=(e,t,n)=>e<<32-n|t>>>n,$d=(e,t,n)=>e<<64-n|t>>>n-32,zd=(e,t,n)=>e>>>n-32|t<<64-n,Xj=(e,t,n)=>e<<n|t>>>32-n,e4=(e,t,n)=>t<<n|e>>>32-n,t4=(e,t,n)=>t<<n-32|e>>>64-n,n4=(e,t,n)=>e<<n-32|t>>>64-n;function co(e,t,n,r){const o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:o|0}}const r4=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),o4=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,s4=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),i4=(e,t,n,r,o)=>t+n+r+o+(e/2**32|0)|0,a4=(e,t,n,r,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(o>>>0),l4=(e,t,n,r,o,i)=>t+n+r+o+i+(e/2**32|0)|0,sa=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function c4(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function wc(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Cs(e,...t){if(!c4(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function u4(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");wc(e.outputLen),wc(e.blockLen)}function Ha(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function C5(e,t){Cs(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function d4(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function ks(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function y0(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Mr(e,t){return e<<32-t|e>>>t}const f4=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function h4(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function p4(e){for(let t=0;t<e.length;t++)e[t]=h4(e[t]);return e}const f6=f4?e=>e:p4,k5=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",m4=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function BW(e){if(Cs(e),k5)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=m4[e[n]];return t}const uo={_0:48,_9:57,A:65,F:70,a:97,f:102};function h6(e){if(e>=uo._0&&e<=uo._9)return e-uo._0;if(e>=uo.A&&e<=uo.F)return e-(uo.A-10);if(e>=uo.a&&e<=uo.f)return e-(uo.a-10)}function TW(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(k5)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let o=0,i=0;o<n;o++,i+=2){const l=h6(e.charCodeAt(i)),c=h6(e.charCodeAt(i+1));if(l===void 0||c===void 0){const u=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+u+'" at index '+i)}r[o]=l*16+c}return r}function g4(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Uf(e){return typeof e=="string"&&(e=g4(e)),Cs(e),e}function y4(...e){let t=0;for(let r=0;r<e.length;r++){const o=e[r];Cs(o),t+=o.length}const n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){const i=e[r];n.set(i,o),o+=i.length}return n}class ly{}function $f(e){const t=r=>e().update(Uf(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function v4(e=32){if(sa&&typeof sa.getRandomValues=="function")return sa.getRandomValues(new Uint8Array(e));if(sa&&typeof sa.randomBytes=="function")return Uint8Array.from(sa.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}const w4=BigInt(0),tc=BigInt(1),b4=BigInt(2),x4=BigInt(7),C4=BigInt(256),k4=BigInt(113),E5=[],A5=[],S5=[];for(let e=0,t=tc,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],E5.push(2*(5*r+n)),A5.push((e+1)*(e+2)/2%64);let o=w4;for(let i=0;i<7;i++)t=(t<<tc^(t>>x4)*k4)%C4,t&b4&&(o^=tc<<(tc<<BigInt(i))-tc);S5.push(o)}const j5=x5(S5,!0),E4=j5[0],A4=j5[1],p6=(e,t,n)=>n>32?t4(e,t,n):Xj(e,t,n),m6=(e,t,n)=>n>32?n4(e,t,n):e4(e,t,n);function S4(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let l=0;l<10;l++)n[l]=e[l]^e[l+10]^e[l+20]^e[l+30]^e[l+40];for(let l=0;l<10;l+=2){const c=(l+8)%10,u=(l+2)%10,p=n[u],f=n[u+1],m=p6(p,f,1)^n[c],g=m6(p,f,1)^n[c+1];for(let v=0;v<50;v+=10)e[l+v]^=m,e[l+v+1]^=g}let o=e[2],i=e[3];for(let l=0;l<24;l++){const c=A5[l],u=p6(o,i,c),p=m6(o,i,c),f=E5[l];o=e[f],i=e[f+1],e[f]=u,e[f+1]=p}for(let l=0;l<50;l+=10){for(let c=0;c<10;c++)n[c]=e[l+c];for(let c=0;c<10;c++)e[l+c]^=~n[(c+2)%10]&n[(c+4)%10]}e[0]^=E4[r],e[1]^=A4[r]}ks(n)}class cy extends ly{constructor(t,n,r,o=!1,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=o,this.rounds=i,wc(r),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=d4(this.state)}clone(){return this._cloneInto()}keccak(){f6(this.state32),S4(this.state32,this.rounds),f6(this.state32),this.posOut=0,this.pos=0}update(t){Ha(this),t=Uf(t),Cs(t);const{blockLen:n,state:r}=this,o=t.length;for(let i=0;i<o;){const l=Math.min(n-this.pos,o-i);for(let c=0;c<l;c++)r[this.pos++]^=t[i++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:r,blockLen:o}=this;t[r]^=n,(n&128)!==0&&r===o-1&&this.keccak(),t[o-1]^=128,this.keccak()}writeInto(t){Ha(this,!1),Cs(t),this.finish();const n=this.state,{blockLen:r}=this;for(let o=0,i=t.length;o<i;){this.posOut>=r&&this.keccak();const l=Math.min(r-this.posOut,i-o);t.set(n.subarray(this.posOut,this.posOut+l),o),this.posOut+=l,o+=l}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return wc(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(C5(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,ks(this.state)}_cloneInto(t){const{blockLen:n,suffix:r,outputLen:o,rounds:i,enableXOF:l}=this;return t||(t=new cy(n,r,o,l,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=r,t.outputLen=o,t.enableXOF=l,t.destroyed=this.destroyed,t}}const j4=(e,t,n)=>$f(()=>new cy(t,e,n)),I5=j4(1,136,256/8);function Ut(e,t){const n=t||"hex",r=I5(Vr(e,{strict:!1})?ol(e):e);return n==="bytes"?r:jo(r)}let sl=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&(super.delete(t),super.set(t,n)),n}set(t,n){if(super.has(t)&&super.delete(t),super.set(t,n),this.maxSize&&this.size>this.maxSize){const r=super.keys().next().value;r!==void 0&&super.delete(r)}return this}};const I4=/^0x[a-fA-F0-9]{40}$/,v0=new sl(8192);function Vn(e,t){const{strict:n=!0}=t??{},r=`${e}.${n}`;if(v0.has(r))return v0.get(r);const o=I4.test(e)?e.toLowerCase()===e?!0:n?du(e)===e:!0:!1;return v0.set(r,o),o}const w0=new sl(8192);function du(e,t){if(w0.has(`${e}.${t}`))return w0.get(`${e}.${t}`);const n=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),r=Ut(fi(n),"bytes"),o=(t?n.substring(`${t}0x`.length):n).split("");for(let l=0;l<40;l+=2)r[l>>1]>>4>=8&&o[l]&&(o[l]=o[l].toUpperCase()),(r[l>>1]&15)>=8&&o[l+1]&&(o[l+1]=o[l+1].toUpperCase());const i=`0x${o.join("")}`;return w0.set(`${e}.${t}`,i),i}function vt(e,t){if(!Vn(e,{strict:!1}))throw new xs({address:e});return du(e,t)}let g6=class extends oe{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}},N5=class extends oe{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}},N4=class extends oe{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}};const P4={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new N4({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new N5({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new g6({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new g6({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function uy(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(P4);return n.bytes=e,n.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function yi(e,t,n,{strict:r}={}){return Vr(e,{strict:!1})?Pm(e,t,n,{strict:r}):T5(e,t,n,{strict:r})}function P5(e,t){if(typeof t=="number"&&t>0&&t>at(e)-1)throw new v5({offset:t,position:"start",size:at(e)})}function B5(e,t,n){if(typeof t=="number"&&typeof n=="number"&&at(e)!==n-t)throw new v5({offset:n,position:"end",size:at(e)})}function T5(e,t,n,{strict:r}={}){P5(e,t);const o=e.slice(t,n);return r&&B5(o,t,n),o}function Pm(e,t,n,{strict:r}={}){P5(e,t);const o=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return r&&B5(o,t,n),o}function B4(e,t={}){typeof t.size<"u"&&ur(e,{size:t.size});const n=St(e,t);return Hn(n,t)}function T4(e,t={}){let n=e;if(typeof t.size<"u"&&(ur(n,{size:t.size}),n=Wr(n)),n.length>1||n[0]>1)throw new zj(n);return!!n[0]}function ko(e,t={}){typeof t.size<"u"&&ur(e,{size:t.size});const n=St(e,t);return lr(n,t)}function _4(e,t={}){let n=e;return typeof t.size<"u"&&(ur(n,{size:t.size}),n=Wr(n,{dir:"right"})),new TextDecoder().decode(n)}function rn(e){return typeof e[0]=="string"?il(e):R4(e)}function R4(e){let t=0;for(const o of e)t+=o.length;const n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function il(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}const FW=/^(.*)\[([0-9]*)\]$/,O4=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,_5=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function Ii(e,t){if(e.length!==t.length)throw new Bj({expectedLength:e.length,givenLength:t.length});const n=M4({params:e,values:t}),r=fy(n);return r.length===0?"0x":r}function M4({params:e,values:t}){const n=[];for(let r=0;r<e.length;r++)n.push(dy({param:e[r],value:t[r]}));return n}function dy({param:e,value:t}){const n=hy(e.type);if(n){const[r,o]=n;return L4(t,{length:r,param:{...e,type:o}})}if(e.type==="tuple")return W4(t,{param:e});if(e.type==="address")return F4(t);if(e.type==="bool")return U4(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const r=e.type.startsWith("int"),[,,o="256"]=_5.exec(e.type)??[];return $4(t,{signed:r,size:Number(o)})}if(e.type.startsWith("bytes"))return D4(t,{param:e});if(e.type==="string")return z4(t);throw new Lj(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function fy(e){let t=0;for(let i=0;i<e.length;i++){const{dynamic:l,encoded:c}=e[i];l?t+=32:t+=at(c)}const n=[],r=[];let o=0;for(let i=0;i<e.length;i++){const{dynamic:l,encoded:c}=e[i];l?(n.push(ge(t+o,{size:32})),r.push(c),o+=at(c)):n.push(c)}return rn([...n,...r])}function F4(e){if(!Vn(e))throw new xs({address:e});return{dynamic:!1,encoded:vs(e.toLowerCase())}}function L4(e,{length:t,param:n}){const r=t===null;if(!Array.isArray(e))throw new y5(e);if(!r&&e.length!==t)throw new Nj({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let o=!1;const i=[];for(let l=0;l<e.length;l++){const c=dy({param:n,value:e[l]});c.dynamic&&(o=!0),i.push(c)}if(r||o){const l=fy(i);if(r){const c=ge(i.length,{size:32});return{dynamic:!0,encoded:i.length>0?rn([c,l]):c}}if(o)return{dynamic:!0,encoded:l}}return{dynamic:!1,encoded:rn(i.map(({encoded:l})=>l))}}function D4(e,{param:t}){const[,n]=t.type.split("bytes"),r=at(e);if(!n){let o=e;return r%32!==0&&(o=vs(o,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:rn([vs(ge(r,{size:32})),o])}}if(r!==Number.parseInt(n,10))throw new Pj({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:vs(e,{dir:"right"})}}function U4(e){if(typeof e!="boolean")throw new oe(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:vs(b5(e))}}function $4(e,{signed:t,size:n=256}){if(typeof n=="number"){const r=2n**(BigInt(n)-(t?1n:0n))-1n,o=t?-r-1n:0n;if(e>r||e<o)throw new ay({max:r.toString(),min:o.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:ge(e,{size:32,signed:t})}}function z4(e){const t=qa(e),n=Math.ceil(at(t)/32),r=[];for(let o=0;o<n;o++)r.push(vs(yi(t,o*32,(o+1)*32),{dir:"right"}));return{dynamic:!0,encoded:rn([vs(ge(at(t),{size:32})),...r])}}function W4(e,{param:t}){let n=!1;const r=[];for(let o=0;o<t.components.length;o++){const i=t.components[o],l=Array.isArray(e)?o:i.name,c=dy({param:i,value:e[l]});r.push(c),c.dynamic&&(n=!0)}return{dynamic:n,encoded:n?fy(r):rn(r.map(({encoded:o})=>o))}}function hy(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function fu(e,t){const n=typeof t=="string"?Sr(t):t,r=uy(n);if(at(n)===0&&e.length>0)throw new uu;if(at(t)&&at(t)<32)throw new p5({data:typeof t=="string"?t:St(t),params:e,size:at(t)});let o=0;const i=[];for(let l=0;l<e.length;++l){const c=e[l];r.setPosition(o);const[u,p]=xa(r,c,{staticPosition:0});o+=p,i.push(u)}return i}function xa(e,t,{staticPosition:n}){const r=hy(t.type);if(r){const[o,i]=r;return H4(e,{...t,type:i},{length:o,staticPosition:n})}if(t.type==="tuple")return K4(e,t,{staticPosition:n});if(t.type==="address")return q4(e);if(t.type==="bool")return V4(e);if(t.type.startsWith("bytes"))return Q4(e,t,{staticPosition:n});if(t.type.startsWith("uint")||t.type.startsWith("int"))return G4(e,t);if(t.type==="string")return Y4(e,{staticPosition:n});throw new Dj(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const y6=32,Bm=32;function q4(e){const t=e.readBytes(32);return[du(St(T5(t,-20))),32]}function H4(e,t,{length:n,staticPosition:r}){if(!n){const l=ko(e.readBytes(Bm)),c=r+l,u=c+y6;e.setPosition(c);const p=ko(e.readBytes(y6)),f=bc(t);let m=0;const g=[];for(let v=0;v<p;++v){e.setPosition(u+(f?v*32:m));const[w,b]=xa(e,t,{staticPosition:u});m+=b,g.push(w)}return e.setPosition(r+32),[g,32]}if(bc(t)){const l=ko(e.readBytes(Bm)),c=r+l,u=[];for(let p=0;p<n;++p){e.setPosition(c+p*32);const[f]=xa(e,t,{staticPosition:c});u.push(f)}return e.setPosition(r+32),[u,32]}let o=0;const i=[];for(let l=0;l<n;++l){const[c,u]=xa(e,t,{staticPosition:r+o});o+=u,i.push(c)}return[i,o]}function V4(e){return[T4(e.readBytes(32),{size:32}),32]}function Q4(e,t,{staticPosition:n}){const[r,o]=t.type.split("bytes");if(!o){const l=ko(e.readBytes(32));e.setPosition(n+l);const c=ko(e.readBytes(32));if(c===0)return e.setPosition(n+32),["0x",32];const u=e.readBytes(c);return e.setPosition(n+32),[St(u),32]}return[St(e.readBytes(Number.parseInt(o,10),32)),32]}function G4(e,t){const n=t.type.startsWith("int"),r=Number.parseInt(t.type.split("int")[1]||"256",10),o=e.readBytes(32);return[r>48?B4(o,{signed:n}):ko(o,{signed:n}),32]}function K4(e,t,{staticPosition:n}){const r=t.components.length===0||t.components.some(({name:l})=>!l),o=r?[]:{};let i=0;if(bc(t)){const l=ko(e.readBytes(Bm)),c=n+l;for(let u=0;u<t.components.length;++u){const p=t.components[u];e.setPosition(c+i);const[f,m]=xa(e,p,{staticPosition:c});i+=m,o[r?u:p==null?void 0:p.name]=f}return e.setPosition(n+32),[o,32]}for(let l=0;l<t.components.length;++l){const c=t.components[l],[u,p]=xa(e,c,{staticPosition:n});o[r?l:c==null?void 0:c.name]=u,i+=p}return[o,i]}function Y4(e,{staticPosition:t}){const n=ko(e.readBytes(32)),r=t+n;e.setPosition(r);const o=ko(e.readBytes(32));if(o===0)return e.setPosition(t+32),["",32];const i=e.readBytes(o,32),l=_4(Wr(i));return e.setPosition(t+32),[l,32]}function bc(e){var r;const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return(r=e.components)==null?void 0:r.some(bc);const n=hy(e.type);return!!(n&&bc({...e,type:n[1]}))}const J4=e=>Ut(ol(e));function Z4(e){return J4(e)}const X4="1.2.3";let Tn=class Tm extends Error{constructor(t,n={}){var l;const r=n.cause instanceof Tm?n.cause.details:(l=n.cause)!=null&&l.message?n.cause.message:n.details,o=n.cause instanceof Tm&&n.cause.docsPath||n.docsPath,i=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...o?[`Docs: https://abitype.dev${o}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${X4}`].join(`
|
|
62
|
-
`);super(i),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"}),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=o,this.metaMessages=n.metaMessages,this.shortMessage=t}};function Po(e,t){const n=e.exec(t);return n==null?void 0:n.groups}const R5=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,O5=/^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)?$/,M5=/^\(.+?\).*?$/,v6=/^tuple(?<array>(\[(\d*)\])*)$/;function _m(e){let t=e.type;if(v6.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let o=0;o<n;o++){const i=e.components[o];t+=_m(i),o<n-1&&(t+=", ")}const r=Po(v6,e.type);return t+=`)${(r==null?void 0:r.array)||""}`,_m({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function ma(e){let t="";const n=e.length;for(let r=0;r<n;r++){const o=e[r];t+=_m(o),r!==n-1&&(t+=", ")}return t}function gf(e){var t;return e.type==="function"?`function ${e.name}(${ma(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${(t=e.outputs)!=null&&t.length?` returns (${ma(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${ma(e.inputs)})`:e.type==="error"?`error ${e.name}(${ma(e.inputs)})`:e.type==="constructor"?`constructor(${ma(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}const F5=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function e7(e){return F5.test(e)}function t7(e){return Po(F5,e)}const L5=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function n7(e){return L5.test(e)}function r7(e){return Po(L5,e)}const D5=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function o7(e){return D5.test(e)}function s7(e){return Po(D5,e)}const U5=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function zf(e){return U5.test(e)}function i7(e){return Po(U5,e)}const $5=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function a7(e){return $5.test(e)}function l7(e){return Po($5,e)}const z5=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function c7(e){return z5.test(e)}function u7(e){return Po(z5,e)}const d7=/^receive\(\) external payable$/;function f7(e){return d7.test(e)}const w6=new Set(["memory","indexed","storage","calldata"]),h7=new Set(["indexed"]),Rm=new Set(["calldata","memory","storage"]);class p7 extends Tn{constructor({signature:t}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class m7 extends Tn{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" 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 g7 extends Tn{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class y7 extends Tn{constructor({params:t}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}class v7 extends Tn{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class w7 extends Tn{constructor({param:t,name:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${n}" 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 b7 extends Tn{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class x7 extends Tn{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class C7 extends Tn{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class al extends Tn{constructor({signature:t,type:n}){super(`Invalid ${n} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class k7 extends Tn{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class E7 extends Tn{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class A7 extends Tn{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class S7 extends Tn{constructor({current:t,depth:n}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${n>0?"opening":"closing"} parentheses.`],details:`Depth "${n}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function j7(e,t,n){let r="";if(n)for(const o of Object.entries(n)){if(!o)continue;let i="";for(const l of o[1])i+=`[${l.type}${l.name?`:${l.name}`:""}]`;r+=`(${o[0]}{${i}})`}return t?`${t}:${e}${r}`:`${e}${r}`}const b0=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 Om(e,t={}){if(o7(e))return I7(e,t);if(n7(e))return N7(e,t);if(e7(e))return P7(e,t);if(a7(e))return B7(e,t);if(c7(e))return T7(e);if(f7(e))return{type:"receive",stateMutability:"payable"};throw new k7({signature:e})}function I7(e,t={}){const n=s7(e);if(!n)throw new al({signature:e,type:"function"});const r=zn(n.parameters),o=[],i=r.length;for(let c=0;c<i;c++)o.push(Io(r[c],{modifiers:Rm,structs:t,type:"function"}));const l=[];if(n.returns){const c=zn(n.returns),u=c.length;for(let p=0;p<u;p++)l.push(Io(c[p],{modifiers:Rm,structs:t,type:"function"}))}return{name:n.name,type:"function",stateMutability:n.stateMutability??"nonpayable",inputs:o,outputs:l}}function N7(e,t={}){const n=r7(e);if(!n)throw new al({signature:e,type:"event"});const r=zn(n.parameters),o=[],i=r.length;for(let l=0;l<i;l++)o.push(Io(r[l],{modifiers:h7,structs:t,type:"event"}));return{name:n.name,type:"event",inputs:o}}function P7(e,t={}){const n=t7(e);if(!n)throw new al({signature:e,type:"error"});const r=zn(n.parameters),o=[],i=r.length;for(let l=0;l<i;l++)o.push(Io(r[l],{structs:t,type:"error"}));return{name:n.name,type:"error",inputs:o}}function B7(e,t={}){const n=l7(e);if(!n)throw new al({signature:e,type:"constructor"});const r=zn(n.parameters),o=[],i=r.length;for(let l=0;l<i;l++)o.push(Io(r[l],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:n.stateMutability??"nonpayable",inputs:o}}function T7(e){const t=u7(e);if(!t)throw new al({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}const _7=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,R7=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,O7=/^u?int$/;function Io(e,t){var m,g;const n=j7(e,t==null?void 0:t.type,t==null?void 0:t.structs);if(b0.has(n))return b0.get(n);const r=M5.test(e),o=Po(r?R7:_7,e);if(!o)throw new v7({param:e});if(o.name&&F7(o.name))throw new w7({param:e,name:o.name});const i=o.name?{name:o.name}:{},l=o.modifier==="indexed"?{indexed:!0}:{},c=(t==null?void 0:t.structs)??{};let u,p={};if(r){u="tuple";const v=zn(o.type),w=[],b=v.length;for(let C=0;C<b;C++)w.push(Io(v[C],{structs:c}));p={components:w}}else if(o.type in c)u="tuple",p={components:c[o.type]};else if(O7.test(o.type))u=`${o.type}256`;else if(o.type==="address payable")u="address";else if(u=o.type,(t==null?void 0:t.type)!=="struct"&&!W5(u))throw new g7({type:u});if(o.modifier){if(!((g=(m=t==null?void 0:t.modifiers)==null?void 0:m.has)!=null&&g.call(m,o.modifier)))throw new b7({param:e,type:t==null?void 0:t.type,modifier:o.modifier});if(Rm.has(o.modifier)&&!L7(u,!!o.array))throw new x7({param:e,type:t==null?void 0:t.type,modifier:o.modifier})}const f={type:`${u}${o.array??""}`,...i,...l,...p};return b0.set(n,f),f}function zn(e,t=[],n="",r=0){const o=e.trim().length;for(let i=0;i<o;i++){const l=e[i],c=e.slice(i+1);switch(l){case",":return r===0?zn(c,[...t,n.trim()]):zn(c,t,`${n}${l}`,r);case"(":return zn(c,t,`${n}${l}`,r+1);case")":return zn(c,t,`${n}${l}`,r-1);default:return zn(c,t,`${n}${l}`,r)}}if(n==="")return t;if(r!==0)throw new S7({current:n,depth:r});return t.push(n.trim()),t}function W5(e){return e==="address"||e==="bool"||e==="function"||e==="string"||R5.test(e)||O5.test(e)}const M7=/^(?: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 F7(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||R5.test(e)||O5.test(e)||M7.test(e)}function L7(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}function py(e){const t={},n=e.length;for(let l=0;l<n;l++){const c=e[l];if(!zf(c))continue;const u=i7(c);if(!u)throw new al({signature:c,type:"struct"});const p=u.properties.split(";"),f=[],m=p.length;for(let g=0;g<m;g++){const w=p[g].trim();if(!w)continue;const b=Io(w,{type:"struct"});f.push(b)}if(!f.length)throw new E7({signature:c});t[u.name]=f}const r={},o=Object.entries(t),i=o.length;for(let l=0;l<i;l++){const[c,u]=o[l];r[c]=q5(u,t)}return r}const D7=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function q5(e=[],t={},n=new Set){const r=[],o=e.length;for(let i=0;i<o;i++){const l=e[i];if(M5.test(l.type))r.push(l);else{const u=Po(D7,l.type);if(!(u!=null&&u.type))throw new C7({abiParameter:l});const{array:p,type:f}=u;if(f in t){if(n.has(f))throw new A7({type:f});r.push({...l,type:`tuple${p??""}`,components:q5(t[f],t,new Set([...n,f]))})}else if(W5(f))r.push(l);else throw new m7({type:f})}}return r}function H5(e){const t=py(e),n=[],r=e.length;for(let o=0;o<r;o++){const i=e[o];zf(i)||n.push(Om(i,t))}return n}function b6(e){let t;if(typeof e=="string")t=Om(e);else{const n=py(e),r=e.length;for(let o=0;o<r;o++){const i=e[o];if(!zf(i)){t=Om(i,n);break}}}if(!t)throw new p7({signature:e});return t}function x6(e){const t=[];if(typeof e=="string"){const n=zn(e),r=n.length;for(let o=0;o<r;o++)t.push(Io(n[o],{modifiers:w6}))}else{const n=py(e),r=e.length;for(let o=0;o<r;o++){const i=e[o];if(zf(i))continue;const l=zn(i),c=l.length;for(let u=0;u<c;u++)t.push(Io(l[u],{modifiers:w6,structs:n}))}}if(t.length===0)throw new y7({params:e});return t}function U7(e){let t=!0,n="",r=0,o="",i=!1;for(let l=0;l<e.length;l++){const c=e[l];if(["(",")",","].includes(c)&&(t=!0),c==="("&&r++,c===")"&&r--,!!t){if(r===0){if(c===" "&&["event","function",""].includes(o))o="";else if(o+=c,c===")"){i=!0;break}continue}if(c===" "){e[l-1]!==","&&n!==","&&n!==",("&&(n="",t=!1);continue}o+=c,n+=c}}if(!i)throw new oe("Unable to normalize signature.");return o}const $7=e=>{const t=typeof e=="string"?e:gf(e);return U7(t)};function V5(e){return Z4($7(e))}const Wf=V5,hu=e=>yi(V5(e),0,4);function Ni(e){const{abi:t,args:n=[],name:r}=e,o=Vr(r,{strict:!1}),i=t.filter(c=>o?c.type==="function"?hu(c)===r:c.type==="event"?Wf(c)===r:!1:"name"in c&&c.name===r);if(i.length===0)return;if(i.length===1)return i[0];let l;for(const c of i){if(!("inputs"in c))continue;if(!n||n.length===0){if(!c.inputs||c.inputs.length===0)return c;continue}if(!c.inputs||c.inputs.length===0||c.inputs.length!==n.length)continue;if(n.every((p,f)=>{const m="inputs"in c&&c.inputs[f];return m?Mm(p,m):!1})){if(l&&"inputs"in l&&l.inputs){const p=Q5(c.inputs,l.inputs,n);if(p)throw new Mj({abiItem:c,type:p[0]},{abiItem:l,type:p[1]})}l=c}}return l||i[0]}function Mm(e,t){const n=typeof e,r=t.type;switch(r){case"address":return Vn(e,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in t?Object.values(t.components).every((o,i)=>n==="object"&&Mm(Object.values(e)[i],o)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(e)&&e.every(o=>Mm(o,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function Q5(e,t,n){for(const r in e){const o=e[r],i=t[r];if(o.type==="tuple"&&i.type==="tuple"&&"components"in o&&"components"in i)return Q5(o.components,i.components,n[r]);const l=[o.type,i.type];if(l.includes("address")&&l.includes("bytes20")?!0:l.includes("address")&&l.includes("string")?Vn(n[r],{strict:!1}):l.includes("address")&&l.includes("bytes")?Vn(n[r],{strict:!1}):!1)return l}}const x0="/docs/contract/decodeFunctionResult";function js(e){const{abi:t,args:n,functionName:r,data:o}=e;let i=t[0];if(r){const c=Ni({abi:t,args:n,name:r});if(!c)throw new Wa(r,{docsPath:x0});i=c}if(i.type!=="function")throw new Wa(void 0,{docsPath:x0});if(!i.outputs)throw new g5(i.name,{docsPath:x0});const l=fu(i.outputs,o);if(l&&l.length>1)return l;if(l&&l.length===1)return l[0]}const C6="/docs/contract/encodeFunctionData";function z7(e){const{abi:t,args:n,functionName:r}=e;let o=t[0];if(r){const i=Ni({abi:t,args:n,name:r});if(!i)throw new Wa(r,{docsPath:C6});o=i}if(o.type!=="function")throw new Wa(void 0,{docsPath:C6});return{abi:[o],functionName:hu(Ar(o))}}function _n(e){const{args:t}=e,{abi:n,functionName:r}=(()=>{var c;return e.abi.length===1&&((c=e.functionName)!=null&&c.startsWith("0x"))?e:z7(e)})(),o=n[0],i=r,l="inputs"in o&&o.inputs?Ii(o.inputs,t??[]):void 0;return il([i,l??"0x"])}class Fm extends oe{constructor({blockNumber:t,chain:n,contract:r}){super(`Chain "${n.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...t&&r.blockCreated&&r.blockCreated>t?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${r.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class W7 extends oe{constructor({chain:t,currentChainId:n}){super(`The current chain of the wallet (id: ${n}) does not match the target chain for the transaction (id: ${t.id} – ${t.name}).`,{metaMessages:[`Current Chain ID: ${n}`,`Expected Chain ID: ${t.id} – ${t.name}`],name:"ChainMismatchError"})}}class q7 extends oe{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(`
|
|
63
|
-
`),{name:"ChainNotFoundError"})}}class G5 extends oe{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}class LW extends oe{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}function ll({blockNumber:e,chain:t,contract:n}){var o;const r=(o=t==null?void 0:t.contracts)==null?void 0:o[n];if(!r)throw new Fm({chain:t,contract:{name:n}});if(e&&r.blockCreated&&r.blockCreated>e)throw new Fm({blockNumber:e,chain:t,contract:{name:n,blockCreated:r.blockCreated}});return r.address}function nt(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}const H7={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."},K5={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},V7={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function Q7(e){const{abi:t,data:n,cause:r}=e,o=yi(n,0,4);if(o==="0x")throw new uu({cause:r});const l=[...t||[],K5,V7].find(c=>c.type==="error"&&o===hu(Ar(c)));if(!l)throw new m5(o,{docsPath:"/docs/contract/decodeErrorResult",cause:r});return{abiItem:l,args:"inputs"in l&&l.inputs&&l.inputs.length>0?fu(l.inputs,yi(n,4)):void 0,errorName:l.name}}const At=(e,t,n)=>JSON.stringify(e,(r,o)=>typeof o=="bigint"?o.toString():o,n);function Y5({abiItem:e,args:t,includeFunctionName:n=!0,includeName:r=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${n?e.name:""}(${e.inputs.map((o,i)=>`${r&&o.name?`${o.name}: `:""}${typeof t[i]=="object"?At(t[i]):t[i]}`).join(", ")})`}const G7={gwei:9,wei:18},K7={ether:-9,wei:9},Y7={ether:-18,gwei:-9};function qf(e,t){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[o,i]=[n.slice(0,n.length-t),n.slice(n.length-t)];return i=i.replace(/(0+)$/,""),`${r?"-":""}${o||"0"}${i?`.${i}`:""}`}function my(e,t="wei"){return qf(e,G7[t])}function Pn(e,t="wei"){return qf(e,K7[t])}class J7 extends oe{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"})}}class Z7 extends oe{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function k6(e){return e.reduce((t,{slot:n,value:r})=>`${t} ${n}: ${r}
|
|
64
|
-
`,"")}function X7(e){return e.reduce((t,{address:n,...r})=>{let o=`${t} ${n}:
|
|
65
|
-
`;return r.nonce&&(o+=` nonce: ${r.nonce}
|
|
66
|
-
`),r.balance&&(o+=` balance: ${r.balance}
|
|
67
|
-
`),r.code&&(o+=` code: ${r.code}
|
|
68
|
-
`),r.state&&(o+=` state:
|
|
69
|
-
`,o+=k6(r.state)),r.stateDiff&&(o+=` stateDiff:
|
|
70
|
-
`,o+=k6(r.stateDiff)),o},` State Override:
|
|
71
|
-
`).slice(0,-1)}function pu(e){const t=Object.entries(e).map(([r,o])=>o===void 0||o===!1?null:[r,o]).filter(Boolean),n=t.reduce((r,[o])=>Math.max(r,o.length),0);return t.map(([r,o])=>` ${`${r}:`.padEnd(n+1)} ${o}`).join(`
|
|
72
|
-
`)}class DW extends oe{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class eI extends oe{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",pu(t),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class UW extends oe{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class tI extends oe{constructor(t,{account:n,docsPath:r,chain:o,data:i,gas:l,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:p,nonce:f,to:m,value:g}){var w;const v=pu({chain:o&&`${o==null?void 0:o.name} (id: ${o==null?void 0:o.id})`,from:n==null?void 0:n.address,to:m,value:typeof g<"u"&&`${my(g)} ${((w=o==null?void 0:o.nativeCurrency)==null?void 0:w.symbol)||"ETH"}`,data:i,gas:l,gasPrice:typeof c<"u"&&`${Pn(c)} gwei`,maxFeePerGas:typeof u<"u"&&`${Pn(u)} gwei`,maxPriorityFeePerGas:typeof p<"u"&&`${Pn(p)} gwei`,nonce:f});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",v].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class J5 extends oe{constructor({blockHash:t,blockNumber:n,blockTag:r,hash:o,index:i}){let l="Transaction";r&&i!==void 0&&(l=`Transaction at block time "${r}" at index "${i}"`),t&&i!==void 0&&(l=`Transaction at block hash "${t}" at index "${i}"`),n&&i!==void 0&&(l=`Transaction at block number "${n}" at index "${i}"`),o&&(l=`Transaction with hash "${o}"`),super(`${l} could not be found.`,{name:"TransactionNotFoundError"})}}class Z5 extends oe{constructor({hash:t}){super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class X5 extends oe{constructor({receipt:t}){super(`Transaction with hash "${t.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.receipt=t}}class nI extends oe{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}const rI=e=>e,gy=e=>e;class e3 extends oe{constructor(t,{account:n,docsPath:r,chain:o,data:i,gas:l,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:p,nonce:f,to:m,value:g,stateOverride:v}){var C;const w=n?nt(n):void 0;let b=pu({from:w==null?void 0:w.address,to:m,value:typeof g<"u"&&`${my(g)} ${((C=o==null?void 0:o.nativeCurrency)==null?void 0:C.symbol)||"ETH"}`,data:i,gas:l,gasPrice:typeof c<"u"&&`${Pn(c)} gwei`,maxFeePerGas:typeof u<"u"&&`${Pn(u)} gwei`,maxPriorityFeePerGas:typeof p<"u"&&`${Pn(p)} gwei`,nonce:f});v&&(b+=`
|
|
73
|
-
${X7(v)}`),super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Raw Call Arguments:",b].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class yy extends oe{constructor(t,{abi:n,args:r,contractAddress:o,docsPath:i,functionName:l,sender:c}){const u=Ni({abi:n,args:r,name:l}),p=u?Y5({abiItem:u,args:r,includeFunctionName:!1,includeName:!1}):void 0,f=u?Ar(u,{includeName:!0}):void 0,m=pu({address:o&&rI(o),function:f,args:p&&p!=="()"&&`${[...Array((l==null?void 0:l.length)??0).keys()].map(()=>" ").join("")}${p}`,sender:c});super(t.shortMessage||`An unknown error occurred while executing the contract function "${l}".`,{cause:t,docsPath:i,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],m&&"Contract Call:",m].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=n,this.args=r,this.cause=t,this.contractAddress=o,this.functionName=l,this.sender=c}}class Lm extends oe{constructor({abi:t,data:n,functionName:r,message:o,cause:i}){let l,c,u,p;if(n&&n!=="0x")try{c=Q7({abi:t,data:n,cause:i});const{abiItem:m,errorName:g,args:v}=c;if(g==="Error")p=v[0];else if(g==="Panic"){const[w]=v;p=H7[w]}else{const w=m?Ar(m,{includeName:!0}):void 0,b=m&&v?Y5({abiItem:m,args:v,includeFunctionName:!1,includeName:!1}):void 0;u=[w?`Error: ${w}`:"",b&&b!=="()"?` ${[...Array((g==null?void 0:g.length)??0).keys()].map(()=>" ").join("")}${b}`:""]}}catch(m){l=m}else o&&(p=o);let f;l instanceof m5&&(f=l.signature,u=[`Unable to decode signature "${f}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${f}.`]),super(p&&p!=="execution reverted"||f?[`The contract function "${r}" reverted with the following ${f?"signature":"reason"}:`,p||f].join(`
|
|
74
|
-
`):`The contract function "${r}" reverted.`,{cause:l??i,metaMessages:u,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=c,this.raw=n,this.reason=p,this.signature=f}}class oI extends oe{constructor({functionName:t,cause:n}){super(`The contract function "${t}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${t}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError",cause:n})}}class sI extends oe{constructor({factory:t}){super(`Deployment for counterfactual contract call failed${t?` for factory "${t}".`:""}`,{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 Hf extends oe{constructor({data:t,message:n}){super(n||"",{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=t}}function vy(e){var n,r,o,i,l,c;if(!(e instanceof oe))return!1;const t=e.walk(u=>u instanceof Lm);return t instanceof Lm?((n=t.data)==null?void 0:n.errorName)==="HttpError"||((r=t.data)==null?void 0:r.errorName)==="ResolverError"||((o=t.data)==null?void 0:o.errorName)==="ResolverNotContract"||((i=t.data)==null?void 0:i.errorName)==="ResolverNotFound"||((l=t.data)==null?void 0:l.errorName)==="ReverseAddressMismatch"||((c=t.data)==null?void 0:c.errorName)==="UnsupportedResolverProfile":!1}function iI(e){const{abi:t,data:n}=e,r=yi(n,0,4),o=t.find(i=>i.type==="function"&&r===hu(Ar(i)));if(!o)throw new Oj(r,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:o.name,args:"inputs"in o&&o.inputs&&o.inputs.length>0?fu(o.inputs,yi(n,4)):void 0}}const C0="/docs/contract/encodeErrorResult";function E6(e){const{abi:t,errorName:n,args:r}=e;let o=t[0];if(n){const u=Ni({abi:t,args:r,name:n});if(!u)throw new s6(n,{docsPath:C0});o=u}if(o.type!=="error")throw new s6(void 0,{docsPath:C0});const i=Ar(o),l=hu(i);let c="0x";if(r&&r.length>0){if(!o.inputs)throw new Tj(o.name,{docsPath:C0});c=Ii(o.inputs,r)}return il([l,c])}const k0="/docs/contract/encodeFunctionResult";function aI(e){const{abi:t,functionName:n,result:r}=e;let o=t[0];if(n){const l=Ni({abi:t,name:n});if(!l)throw new Wa(n,{docsPath:k0});o=l}if(o.type!=="function")throw new Wa(void 0,{docsPath:k0});if(!o.outputs)throw new g5(o.name,{docsPath:k0});const i=(()=>{if(o.outputs.length===0)return[];if(o.outputs.length===1)return[r];if(Array.isArray(r))return r;throw new y5(r)})();return Ii(o.outputs,i)}const Vf="x-batch-gateway:true";async function lI(e){const{data:t,ccipRequest:n}=e,{args:[r]}=iI({abi:Im,data:t}),o=[],i=[];return await Promise.all(r.map(async(l,c)=>{try{i[c]=l.urls.includes(Vf)?await lI({data:l.data,ccipRequest:n}):await n(l),o[c]=!1}catch(u){o[c]=!0,i[c]=cI(u)}})),aI({abi:Im,functionName:"query",result:[o,i]})}function cI(e){return e.name==="HttpRequestError"&&e.status?E6({abi:Im,errorName:"HttpError",args:[e.status,e.shortMessage]}):E6({abi:[K5],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}function t3(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;const t=`0x${e.slice(1,65)}`;return Vr(t)?t:null}function Dm(e){let t=new Uint8Array(32).fill(0);if(!e)return St(t);const n=e.split(".");for(let r=n.length-1;r>=0;r-=1){const o=t3(n[r]),i=o?ol(o):Ut(fi(n[r]),"bytes");t=Ut(rn([t,i]),"bytes")}return St(t)}function uI(e){return`[${e.slice(2)}]`}function dI(e){const t=new Uint8Array(32).fill(0);return e?t3(e)||Ut(fi(e)):St(t)}function wy(e){const t=e.replace(/^\.|\.$/gm,"");if(t.length===0)return new Uint8Array(1);const n=new Uint8Array(fi(t).byteLength+2);let r=0;const o=t.split(".");for(let i=0;i<o.length;i++){let l=fi(o[i]);l.byteLength>255&&(l=fi(uI(dI(o[i])))),n[r]=l.length,n.set(l,r+1),r+=l.length+1}return n.byteLength!==r+1?n.slice(0,r+1):n}function ve(e,t,n){const r=e[t.name];if(typeof r=="function")return r;const o=e[n];return typeof o=="function"?o:i=>t(e,i)}class hc extends oe{constructor({body:t,cause:n,details:r,headers:o,status:i,url:l}){super("HTTP request failed.",{cause:n,details:r,metaMessages:[i&&`Status: ${i}`,`URL: ${gy(l)}`,t&&`Request body: ${At(t)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=t,this.headers=o,this.status=i,this.url=l}}class by extends oe{constructor({body:t,error:n,url:r}){super("RPC Request failed.",{cause:n,details:n.message,metaMessages:[`URL: ${gy(r)}`,`Request body: ${At(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=n.code,this.data=n.data,this.url=r}}class A6 extends oe{constructor({body:t,url:n}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${gy(n)}`,`Request body: ${At(t)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=n}}const fI=-1;class Rn extends oe{constructor(t,{code:n,docsPath:r,metaMessages:o,name:i,shortMessage:l}){super(l,{cause:t,docsPath:r,metaMessages:o||(t==null?void 0:t.metaMessages),name:i||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=i||t.name,this.code=t instanceof by?t.code:n??fI}}class On extends Rn{constructor(t,n){super(t,n),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=n.data}}class xc extends Rn{constructor(t){super(t,{code:xc.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(xc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class Cc extends Rn{constructor(t){super(t,{code:Cc.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(Cc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class kc extends Rn{constructor(t,{method:n}={}){super(t,{code:kc.code,name:"MethodNotFoundRpcError",shortMessage:`The method${n?` "${n}"`:""} does not exist / is not available.`})}}Object.defineProperty(kc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class Ec extends Rn{constructor(t){super(t,{code:Ec.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
|
|
75
|
-
`)})}}Object.defineProperty(Ec,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class vi extends Rn{constructor(t){super(t,{code:vi.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(vi,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class Es extends Rn{constructor(t){super(t,{code:Es.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
|
|
76
|
-
`)})}}Object.defineProperty(Es,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class Ac extends Rn{constructor(t){super(t,{code:Ac.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(Ac,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class qr extends Rn{constructor(t){super(t,{code:qr.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(qr,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class Sc extends Rn{constructor(t){super(t,{code:Sc.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(Sc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class Zs extends Rn{constructor(t,{method:n}={}){super(t,{code:Zs.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${n?` "${n}"`:""} is not supported.`})}}Object.defineProperty(Zs,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class Va extends Rn{constructor(t){super(t,{code:Va.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(Va,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class jc extends Rn{constructor(t){super(t,{code:jc.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(jc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class Ve extends On{constructor(t){super(t,{code:Ve.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(Ve,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class Ic extends On{constructor(t){super(t,{code:Ic.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(Ic,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class Nc extends On{constructor(t,{method:n}={}){super(t,{code:Nc.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${n?` " ${n}"`:""}.`})}}Object.defineProperty(Nc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class Pc extends On{constructor(t){super(t,{code:Pc.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(Pc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class Bc extends On{constructor(t){super(t,{code:Bc.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(Bc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class qn extends On{constructor(t){super(t,{code:qn.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(qn,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class Qa extends On{constructor(t){super(t,{code:Qa.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(Qa,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class Tc extends On{constructor(t){super(t,{code:Tc.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(Tc,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class _c extends On{constructor(t){super(t,{code:_c.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(_c,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class Rc extends On{constructor(t){super(t,{code:Rc.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(Rc,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class Oc extends On{constructor(t){super(t,{code:Oc.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(Oc,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class Mc extends On{constructor(t){super(t,{code:Mc.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(Mc,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class Ga extends On{constructor(t){super(t,{code:Ga.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(Ga,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class Fc extends On{constructor(t){super(t,{code:Fc.code,name:"WalletConnectSessionSettlementError",shortMessage:"WalletConnect session settlement failed."})}}Object.defineProperty(Fc,"code",{enumerable:!0,configurable:!0,writable:!0,value:7e3});class hI extends Rn{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}const pI=3;function wi(e,{abi:t,address:n,args:r,docsPath:o,functionName:i,sender:l}){const c=e instanceof Hf?e:e instanceof oe?e.walk(w=>"data"in w)||e.walk():{},{code:u,data:p,details:f,message:m,shortMessage:g}=c,v=e instanceof uu?new oI({functionName:i,cause:e}):[pI,vi.code].includes(u)&&(p||f||m||g)||u===Es.code&&f==="execution reverted"&&p?new Lm({abi:t,data:typeof p=="object"?p.data:p,functionName:i,message:c instanceof by?f:g??m,cause:e}):e;return new yy(v,{abi:t,args:r,contractAddress:n,docsPath:o,functionName:i,sender:l})}const mI="modulepreload",gI=function(e){return"/"+e},S6={},fe=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let l=function(p){return Promise.all(p.map(f=>Promise.resolve(f).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),u=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));o=l(n.map(p=>{if(p=gI(p),p in S6)return;S6[p]=!0;const f=p.endsWith(".css"),m=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${m}`))return;const g=document.createElement("link");if(g.rel=f?"stylesheet":mI,f||(g.as="script"),g.crossOrigin="",g.href=p,u&&g.setAttribute("nonce",u),document.head.appendChild(g),f)return new Promise((v,w)=>{g.addEventListener("load",v),g.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${p}`)))})}))}function i(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return o.then(l=>{for(const c of l||[])c.status==="rejected"&&i(c.reason);return t().catch(i)})};/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const xy=BigInt(0),Um=BigInt(1);function mu(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Cy(e){if(!mu(e))throw new Error("Uint8Array expected")}function Lc(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function Wd(e){const t=e.toString(16);return t.length&1?"0"+t:t}function n3(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?xy:BigInt("0x"+e)}const r3=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",yI=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Dc(e){if(Cy(e),r3)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=yI[e[n]];return t}const fo={_0:48,_9:57,A:65,F:70,a:97,f:102};function j6(e){if(e>=fo._0&&e<=fo._9)return e-fo._0;if(e>=fo.A&&e<=fo.F)return e-(fo.A-10);if(e>=fo.a&&e<=fo.f)return e-(fo.a-10)}function yf(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(r3)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let o=0,i=0;o<n;o++,i+=2){const l=j6(e.charCodeAt(i)),c=j6(e.charCodeAt(i+1));if(l===void 0||c===void 0){const u=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+u+'" at index '+i)}r[o]=l*16+c}return r}function hi(e){return n3(Dc(e))}function o3(e){return Cy(e),n3(Dc(Uint8Array.from(e).reverse()))}function gu(e,t){return yf(e.toString(16).padStart(t*2,"0"))}function s3(e,t){return gu(e,t).reverse()}function nr(e,t,n){let r;if(typeof t=="string")try{r=yf(t)}catch(i){throw new Error(e+" must be hex string or Uint8Array, cause: "+i)}else if(mu(t))r=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const o=r.length;if(typeof n=="number"&&o!==n)throw new Error(e+" of length "+n+" expected, got "+o);return r}function vf(...e){let t=0;for(let r=0;r<e.length;r++){const o=e[r];Cy(o),t+=o.length}const n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){const i=e[r];n.set(i,o),o+=i.length}return n}const E0=e=>typeof e=="bigint"&&xy<=e;function ky(e,t,n){return E0(e)&&E0(t)&&E0(n)&&t<=e&&e<n}function Ca(e,t,n,r){if(!ky(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function vI(e){let t;for(t=0;e>xy;e>>=Um,t+=1);return t}const Qf=e=>(Um<<BigInt(e))-Um,A0=e=>new Uint8Array(e),I6=e=>Uint8Array.from(e);function wI(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=A0(e),o=A0(e),i=0;const l=()=>{r.fill(1),o.fill(0),i=0},c=(...m)=>n(o,r,...m),u=(m=A0(0))=>{o=c(I6([0]),m),r=c(),m.length!==0&&(o=c(I6([1]),m),r=c())},p=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let m=0;const g=[];for(;m<t;){r=c();const v=r.slice();g.push(v),m+=r.length}return vf(...g)};return(m,g)=>{l(),u(m);let v;for(;!(v=g(p()));)u();return l(),v}}const bI={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||mu(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function Gf(e,t,n={}){const r=(o,i,l)=>{const c=bI[i];if(typeof c!="function")throw new Error("invalid validator function");const u=e[o];if(!(l&&u===void 0)&&!c(u,e))throw new Error("param "+String(o)+" is invalid. Expected "+i+", got "+u)};for(const[o,i]of Object.entries(t))r(o,i,!1);for(const[o,i]of Object.entries(n))r(o,i,!0);return e}function N6(e){const t=new WeakMap;return(n,...r)=>{const o=t.get(n);if(o!==void 0)return o;const i=e(n,...r);return t.set(n,i),i}}const xI="0.1.1";function CI(){return xI}let De=class po extends Error{static setStaticOptions(t){po.prototype.docsOrigin=t.docsOrigin,po.prototype.showVersion=t.showVersion,po.prototype.version=t.version}constructor(t,n={}){const r=(()=>{var f;if(n.cause instanceof po){if(n.cause.details)return n.cause.details;if(n.cause.shortMessage)return n.cause.shortMessage}return n.cause&&"details"in n.cause&&typeof n.cause.details=="string"?n.cause.details:(f=n.cause)!=null&&f.message?n.cause.message:n.details})(),o=n.cause instanceof po&&n.cause.docsPath||n.docsPath,i=n.docsOrigin??po.prototype.docsOrigin,l=`${i}${o??""}`,c=!!(n.version??po.prototype.showVersion),u=n.version??po.prototype.version,p=[t||"An error occurred.",...n.metaMessages?["",...n.metaMessages]:[],...r||o||c?["",r?`Details: ${r}`:void 0,o?`See: ${l}`:void 0,c?`Version: ${u}`:void 0]:[]].filter(f=>typeof f=="string").join(`
|
|
77
|
-
`);super(p,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsOrigin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showVersion",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.cause=n.cause,this.details=r,this.docs=l,this.docsOrigin=i,this.docsPath=o,this.shortMessage=t,this.showVersion=c,this.version=u}walk(t){return i3(this,t)}};Object.defineProperty(De,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${CI()}`}});De.setStaticOptions(De.defaultStaticOptions);function i3(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?i3(e.cause,t):t?null:e}function yu(e,t){if(ya(e)>t)throw new DI({givenSize:ya(e),maxSize:t})}const ho={zero:48,nine:57,A:65,F:70,a:97,f:102};function P6(e){if(e>=ho.zero&&e<=ho.nine)return e-ho.zero;if(e>=ho.A&&e<=ho.F)return e-(ho.A-10);if(e>=ho.a&&e<=ho.f)return e-(ho.a-10)}function kI(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;if(e.length>r)throw new UI({size:e.length,targetSize:r,type:"Bytes"});const o=new Uint8Array(r);for(let i=0;i<r;i++){const l=n==="right";o[l?i:r-i-1]=e[l?i:e.length-i-1]}return o}function a3(e,t={}){const{dir:n="left"}=t;let r=e,o=0;for(let i=0;i<r.length-1&&r[n==="left"?i:r.length-i-1].toString()==="0";i++)o++;return r=n==="left"?r.slice(o):r.slice(0,r.length-o),r}function Kf(e,t){if(Qn(e)>t)throw new VI({givenSize:Qn(e),maxSize:t})}function EI(e,t){if(typeof t=="number"&&t>0&&t>Qn(e)-1)throw new g3({offset:t,position:"start",size:Qn(e)})}function AI(e,t,n){if(typeof t=="number"&&typeof n=="number"&&Qn(e)!==n-t)throw new g3({offset:n,position:"end",size:Qn(e)})}function l3(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;const o=e.replace("0x","");if(o.length>r*2)throw new QI({size:Math.ceil(o.length/2),targetSize:r,type:"Hex"});return`0x${o[n==="right"?"padEnd":"padStart"](r*2,"0")}`}const SI="#__bigint";function c3(e,t,n){return JSON.stringify(e,(r,o)=>typeof o=="bigint"?o.toString()+SI:o,n)}const jI=new TextDecoder,II=new TextEncoder;function NI(e){return e instanceof Uint8Array?e:typeof e=="string"?u3(e):PI(e)}function PI(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function u3(e,t={}){const{size:n}=t;let r=e;n&&(Kf(e,n),r=xi(e,n));let o=r.slice(2);o.length%2&&(o=`0${o}`);const i=o.length/2,l=new Uint8Array(i);for(let c=0,u=0;c<i;c++){const p=P6(o.charCodeAt(u++)),f=P6(o.charCodeAt(u++));if(p===void 0||f===void 0)throw new De(`Invalid byte sequence ("${o[u-2]}${o[u-1]}" in "${o}").`);l[c]=p<<4|f}return l}function BI(e,t={}){const{size:n}=t,r=II.encode(e);return typeof n=="number"?(yu(r,n),TI(r,n)):r}function TI(e,t){return kI(e,{dir:"right",size:t})}function ya(e){return e.length}function _I(e,t,n,r={}){const{strict:o}=r;return e.slice(t,n)}function RI(e,t={}){const{size:n}=t;typeof n<"u"&&yu(e,n);const r=Ir(e,t);return h3(r,t)}function OI(e,t={}){const{size:n}=t;let r=e;if(typeof n<"u"&&(yu(r,n),r=d3(r)),r.length>1||r[0]>1)throw new LI(r);return!!r[0]}function Eo(e,t={}){const{size:n}=t;typeof n<"u"&&yu(e,n);const r=Ir(e,t);return p3(r,t)}function MI(e,t={}){const{size:n}=t;let r=e;return typeof n<"u"&&(yu(r,n),r=FI(r)),jI.decode(r)}function d3(e){return a3(e,{dir:"left"})}function FI(e){return a3(e,{dir:"right"})}class LI extends De{constructor(t){super(`Bytes value \`${t}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesBooleanError"})}}let DI=class extends De{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}},UI=class extends De{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}};const $I=new TextEncoder,zI=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function WI(e,t={}){const{strict:n=!1}=t;if(!e)throw new B6(e);if(typeof e!="string")throw new B6(e);if(n&&!/^0x[0-9a-fA-F]*$/.test(e))throw new T6(e);if(!e.startsWith("0x"))throw new T6(e)}function jr(...e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function qI(e){return e instanceof Uint8Array?Ir(e):Array.isArray(e)?Ir(new Uint8Array(e)):e}function f3(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(Kf(n,t.size),bi(n,t.size)):n}function Ir(e,t={}){let n="";for(let o=0;o<e.length;o++)n+=zI[e[o]];const r=`0x${n}`;return typeof t.size=="number"?(Kf(r,t.size),xi(r,t.size)):r}function fn(e,t={}){const{signed:n,size:r}=t,o=BigInt(e);let i;r?n?i=(1n<<BigInt(r)*8n-1n)-1n:i=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));const l=typeof i=="bigint"&&n?-i-1n:0;if(i&&o>i||o<l){const p=typeof e=="bigint"?"n":"";throw new m3({max:i?`${i}${p}`:void 0,min:`${l}${p}`,signed:n,size:r,value:`${e}${p}`})}const u=`0x${(n&&o<0?BigInt.asUintN(r*8,BigInt(o)):o).toString(16)}`;return r?bi(u,r):u}function Ey(e,t={}){return Ir($I.encode(e),t)}function bi(e,t){return l3(e,{dir:"left",size:t})}function xi(e,t){return l3(e,{dir:"right",size:t})}function Hr(e,t,n,r={}){const{strict:o}=r;EI(e,t);const i=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return o&&AI(i,t,n),i}function Qn(e){return Math.ceil((e.length-2)/2)}function h3(e,t={}){const{signed:n}=t;t.size&&Kf(e,t.size);const r=BigInt(e);if(!n)return r;const o=(e.length-2)/2,i=(1n<<BigInt(o)*8n)-1n,l=i>>1n;return r<=l?r:r-i-1n}function p3(e,t={}){const{signed:n,size:r}=t;return Number(!n&&!r?e:h3(e,t))}function HI(e,t={}){const{strict:n=!1}=t;try{return WI(e,{strict:n}),!0}catch{return!1}}class m3 extends De{constructor({max:t,min:n,signed:r,size:o,value:i}){super(`Number \`${i}\` is not in safe${o?` ${o*8}-bit`:""}${r?" signed":" unsigned"} integer range ${t?`(\`${n}\` to \`${t}\`)`:`(above \`${n}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class B6 extends De{constructor(t){super(`Value \`${typeof t=="object"?c3(t):t}\` of type \`${typeof t}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}class T6 extends De{constructor(t){super(`Value \`${t}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}class VI extends De{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}class g3 extends De{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset \`${t}\` is out-of-bounds (size: \`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}class QI extends De{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}function GI(e){return{address:e.address,amount:fn(e.amount),index:fn(e.index),validatorIndex:fn(e.validatorIndex)}}function y3(e){return{...typeof e.baseFeePerGas=="bigint"&&{baseFeePerGas:fn(e.baseFeePerGas)},...typeof e.blobBaseFee=="bigint"&&{blobBaseFee:fn(e.blobBaseFee)},...typeof e.feeRecipient=="string"&&{feeRecipient:e.feeRecipient},...typeof e.gasLimit=="bigint"&&{gasLimit:fn(e.gasLimit)},...typeof e.number=="bigint"&&{number:fn(e.number)},...typeof e.prevRandao=="bigint"&&{prevRandao:fn(e.prevRandao)},...typeof e.time=="bigint"&&{time:fn(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(GI)}}}const KI="0x82ad56cb",v3="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",YI="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",JI="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",Ay="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033",S0="/docs/contract/encodeDeployData";function Yf(e){const{abi:t,args:n,bytecode:r}=e;if(!n||n.length===0)return r;const o=t.find(l=>"type"in l&&l.type==="constructor");if(!o)throw new Ij({docsPath:S0});if(!("inputs"in o))throw new o6({docsPath:S0});if(!o.inputs||o.inputs.length===0)throw new o6({docsPath:S0});const i=Ii(o.inputs,n);return il([r,i])}class va extends oe{constructor({cause:t,message:n}={}){var o;const r=(o=n==null?void 0:n.replace("execution reverted: ",""))==null?void 0:o.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(va,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(va,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});class wf extends oe{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Pn(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}}Object.defineProperty(wf,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class $m extends oe{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Pn(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty($m,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class zm extends oe{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}}Object.defineProperty(zm,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class Wm extends oe{constructor({cause:t,nonce:n}={}){super([`Nonce provided for the transaction ${n?`(${n}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
|
|
78
|
-
`),{cause:t,name:"NonceTooLowError"})}}Object.defineProperty(Wm,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class qm extends oe{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"})}}Object.defineProperty(qm,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class Hm extends oe{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
|
|
79
|
-
`),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(Hm,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class Vm extends oe{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(Vm,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class Qm extends oe{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(Qm,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class Gm extends oe{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(Gm,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class bf extends oe{constructor({cause:t,maxPriorityFeePerGas:n,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${n?` = ${Pn(n)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${Pn(r)} gwei`:""}).`].join(`
|
|
80
|
-
`),{cause:t,name:"TipAboveFeeCapError"})}}Object.defineProperty(bf,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class vu extends oe{constructor({cause:t}){super(`An error occurred while executing: ${t==null?void 0:t.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}function Jf(e,t){const n=(e.details||"").toLowerCase(),r=e instanceof oe?e.walk(o=>(o==null?void 0:o.code)===va.code):e;return r instanceof oe?new va({cause:e,message:r.details}):va.nodeMessage.test(n)?new va({cause:e,message:e.details}):wf.nodeMessage.test(n)?new wf({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):$m.nodeMessage.test(n)?new $m({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):zm.nodeMessage.test(n)?new zm({cause:e,nonce:t==null?void 0:t.nonce}):Wm.nodeMessage.test(n)?new Wm({cause:e,nonce:t==null?void 0:t.nonce}):qm.nodeMessage.test(n)?new qm({cause:e,nonce:t==null?void 0:t.nonce}):Hm.nodeMessage.test(n)?new Hm({cause:e}):Vm.nodeMessage.test(n)?new Vm({cause:e,gas:t==null?void 0:t.gas}):Qm.nodeMessage.test(n)?new Qm({cause:e,gas:t==null?void 0:t.gas}):Gm.nodeMessage.test(n)?new Gm({cause:e}):bf.nodeMessage.test(n)?new bf({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas,maxPriorityFeePerGas:t==null?void 0:t.maxPriorityFeePerGas}):new vu({cause:e})}function w3(e,{docsPath:t,...n}){const r=(()=>{const o=Jf(e,n);return o instanceof vu?e:o})();return new e3(r,{docsPath:t,...n})}function cl(e,{format:t}){if(!t)return{};const n={};function r(i){const l=Object.keys(i);for(const c of l)c in e&&(n[c]=e[c]),i[c]&&typeof i[c]=="object"&&!Array.isArray(i[c])&&r(i[c])}const o=t(e||{});return r(o),n}function Sy(e,t){return({exclude:n,format:r})=>({exclude:n,format:(o,i)=>{const l=t(o,i);if(n)for(const c of n)delete l[c];return{...l,...r(o,i)}},type:e})}const ZI={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function Is(e,t){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=XI(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(r=>St(r)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),e.account&&(n.from=e.account.address),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=ge(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=ge(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=ge(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=ge(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=ge(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=ge(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=ZI[e.type]),typeof e.value<"u"&&(n.value=ge(e.value)),n}function XI(e){return e.map(t=>({address:t.address,r:t.r?ge(BigInt(t.r)):t.r,s:t.s?ge(BigInt(t.s)):t.s,chainId:ge(t.chainId),nonce:ge(t.nonce),...typeof t.yParity<"u"?{yParity:ge(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:ge(t.v)}:{}}))}function jy(){let e=()=>{},t=()=>{};return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}}const j0=new Map;function b3({fn:e,id:t,shouldSplitBatch:n,wait:r=0,sort:o}){const i=async()=>{const f=u();l();const m=f.map(({args:g})=>g);m.length!==0&&e(m).then(g=>{o&&Array.isArray(g)&&g.sort(o);for(let v=0;v<f.length;v++){const{resolve:w}=f[v];w==null||w([g[v],g])}}).catch(g=>{for(let v=0;v<f.length;v++){const{reject:w}=f[v];w==null||w(g)}})},l=()=>j0.delete(t),c=()=>u().map(({args:f})=>f),u=()=>j0.get(t)||[],p=f=>j0.set(t,[...u(),f]);return{flush:l,async schedule(f){const{promise:m,resolve:g,reject:v}=jy();return(n==null?void 0:n([...c(),f]))&&i(),u().length>0?(p({args:f,resolve:g,reject:v}),m):(p({args:f,resolve:g,reject:v}),setTimeout(i,r),m)}}}function _6(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:r})=>{if(n.length!==66)throw new a6({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new a6({size:r.length,targetSize:66,type:"hex"});return t[n]=r,t},{})}function e9(e){const{balance:t,nonce:n,state:r,stateDiff:o,code:i}=e,l={};if(i!==void 0&&(l.code=i),t!==void 0&&(l.balance=ge(t)),n!==void 0&&(l.nonce=ge(n)),r!==void 0&&(l.state=_6(r)),o!==void 0){if(l.state)throw new Z7;l.stateDiff=_6(o)}return l}function Iy(e){if(!e)return;const t={};for(const{address:n,...r}of e){if(!Vn(n,{strict:!1}))throw new xs({address:n});if(t[n])throw new J7({address:n});t[n]=e9(r)}return t}const t9=2n**256n-1n;function Bo(e){const{account:t,maxFeePerGas:n,maxPriorityFeePerGas:r,to:o}=e,i=t?nt(t):void 0;if(i&&!Vn(i.address))throw new xs({address:i.address});if(o&&!Vn(o))throw new xs({address:o});if(n&&n>t9)throw new wf({maxFeePerGas:n});if(r&&n&&r>n)throw new bf({maxFeePerGas:n,maxPriorityFeePerGas:r})}async function wu(e,t){var L,J,O,G;const{account:n=e.account,authorizationList:r,batch:o=!!((L=e.batch)!=null&&L.multicall),blockNumber:i,blockTag:l=e.experimental_blockTag??"latest",accessList:c,blobs:u,blockOverrides:p,code:f,data:m,factory:g,factoryData:v,gas:w,gasPrice:b,maxFeePerBlobGas:C,maxFeePerGas:j,maxPriorityFeePerGas:I,nonce:A,to:S,value:N,stateOverride:T,...B}=t,R=n?nt(n):void 0;if(f&&(g||v))throw new oe("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(f&&S)throw new oe("Cannot provide both `code` & `to` as parameters.");const M=f&&m,H=g&&v&&S&&m,V=M||H,W=M?x3({code:f,data:m}):H?o9({data:m,factory:g,factoryData:v,to:S}):m;try{Bo(t);const F=(typeof i=="bigint"?ge(i):void 0)||l,K=p?y3(p):void 0,Y=Iy(T),U=(G=(O=(J=e.chain)==null?void 0:J.formatters)==null?void 0:O.transactionRequest)==null?void 0:G.format,he=(U||Is)({...cl(B,{format:U}),accessList:c,account:R,authorizationList:r,blobs:u,data:W,gas:w,gasPrice:b,maxFeePerBlobGas:C,maxFeePerGas:j,maxPriorityFeePerGas:I,nonce:A,to:V?void 0:S,value:N},"call");if(o&&n9({request:he})&&!Y&&!K)try{return await r9(e,{...he,blockNumber:i,blockTag:l})}catch(re){if(!(re instanceof G5)&&!(re instanceof Fm))throw re}const se=(()=>{const re=[he,F];return Y&&K?[...re,Y,K]:Y?[...re,Y]:K?[...re,{},K]:re})(),ie=await e.request({method:"eth_call",params:se});return ie==="0x"?{data:void 0}:{data:ie}}catch(ee){const F=s9(ee),{offchainLookup:K,offchainLookupSignature:Y}=await fe(async()=>{const{offchainLookup:U,offchainLookupSignature:X}=await import("./ccip--1B43jeF.js");return{offchainLookup:U,offchainLookupSignature:X}},[]);if(e.ccipRead!==!1&&(F==null?void 0:F.slice(0,10))===Y&&S)return{data:await K(e,{data:F,to:S})};throw V&&(F==null?void 0:F.slice(0,10))==="0x101bb98d"?new sI({factory:g}):w3(ee,{...t,account:R,chain:e.chain})}}function n9({request:e}){const{data:t,to:n,...r}=e;return!(!t||t.startsWith(KI)||!n||Object.values(r).filter(o=>typeof o<"u").length>0)}async function r9(e,t){var b;const{batchSize:n=1024,deployless:r=!1,wait:o=0}=typeof((b=e.batch)==null?void 0:b.multicall)=="object"?e.batch.multicall:{},{blockNumber:i,blockTag:l=e.experimental_blockTag??"latest",data:c,to:u}=t,p=(()=>{if(r)return null;if(t.multicallAddress)return t.multicallAddress;if(e.chain)return ll({blockNumber:i,chain:e.chain,contract:"multicall3"});throw new G5})(),m=(typeof i=="bigint"?ge(i):void 0)||l,{schedule:g}=b3({id:`${e.uid}.${m}`,wait:o,shouldSplitBatch(C){return C.reduce((I,{data:A})=>I+(A.length-2),0)>n*2},fn:async C=>{const j=C.map(S=>({allowFailure:!0,callData:S.data,target:S.to})),I=_n({abi:za,args:[j],functionName:"aggregate3"}),A=await e.request({method:"eth_call",params:[{...p===null?{data:x3({code:Ay,data:I})}:{to:p,data:I}},m]});return js({abi:za,args:[j],functionName:"aggregate3",data:A||"0x"})}}),[{returnData:v,success:w}]=await g({data:c,to:u});if(!w)throw new Hf({data:v});return v==="0x"?{data:void 0}:{data:v}}function x3(e){const{code:t,data:n}=e;return Yf({abi:H5(["constructor(bytes, bytes)"]),bytecode:v3,args:[t,n]})}function o9(e){const{data:t,factory:n,factoryData:r,to:o}=e;return Yf({abi:H5(["constructor(address, bytes, address, bytes)"]),bytecode:YI,args:[o,t,n,r]})}function s9(e){var n;if(!(e instanceof oe))return;const t=e.walk();return typeof(t==null?void 0:t.data)=="object"?(n=t.data)==null?void 0:n.data:t.data}async function cr(e,t){const{abi:n,address:r,args:o,functionName:i,...l}=t,c=_n({abi:n,args:o,functionName:i});try{const{data:u}=await ve(e,wu,"call")({...l,data:c,to:r});return js({abi:n,args:o,functionName:i,data:u||"0x"})}catch(u){throw wi(u,{abi:n,address:r,args:o,docsPath:"/docs/contract/readContract",functionName:i})}}async function i9(e,t){const{blockNumber:n,blockTag:r,coinType:o,name:i,gatewayUrls:l,strict:c}=t,{chain:u}=e,p=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!u)throw new Error("client chain not configured. universalResolverAddress is required.");return ll({blockNumber:n,chain:u,contract:"ensUniversalResolver"})})(),f=u==null?void 0:u.ensTlds;if(f&&!f.some(g=>i.endsWith(g)))return null;const m=o!=null?[Dm(i),BigInt(o)]:[Dm(i)];try{const g=_n({abi:n6,functionName:"addr",args:m}),v={address:p,abi:u5,functionName:"resolveWithGateways",args:[jo(wy(i)),g,l??[Vf]],blockNumber:n,blockTag:r},b=await ve(e,cr,"readContract")(v);if(b[0]==="0x")return null;const C=js({abi:n6,args:m,functionName:"addr",data:b[0]});return C==="0x"||Wr(C)==="0x00"?null:C}catch(g){if(c)throw g;if(vy(g))return null;throw g}}class a9 extends oe{constructor({data:t}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(t)}`],name:"EnsAvatarInvalidMetadataError"})}}class nc extends oe{constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"})}}class Ny extends oe{constructor({uri:t}){super(`Unable to resolve ENS avatar URI "${t}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}class l9 extends oe{constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}const c9=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,u9=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,d9=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,f9=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function h9(e){try{const t=await fetch(e,{method:"HEAD"});if(t.status===200){const n=t.headers.get("content-type");return n==null?void 0:n.startsWith("image/")}return!1}catch(t){return typeof t=="object"&&typeof t.response<"u"||!Object.hasOwn(globalThis,"Image")?!1:new Promise(n=>{const r=new Image;r.onload=()=>{n(!0)},r.onerror=()=>{n(!1)},r.src=e})}}function R6(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function C3({uri:e,gatewayUrls:t}){const n=d9.test(e);if(n)return{uri:e,isOnChain:!0,isEncoded:n};const r=R6(t==null?void 0:t.ipfs,"https://ipfs.io"),o=R6(t==null?void 0:t.arweave,"https://arweave.net"),i=e.match(c9),{protocol:l,subpath:c,target:u,subtarget:p=""}=(i==null?void 0:i.groups)||{},f=l==="ipns:/"||c==="ipns/",m=l==="ipfs:/"||c==="ipfs/"||u9.test(e);if(e.startsWith("http")&&!f&&!m){let v=e;return t!=null&&t.arweave&&(v=e.replace(/https:\/\/arweave.net/g,t==null?void 0:t.arweave)),{uri:v,isOnChain:!1,isEncoded:!1}}if((f||m)&&u)return{uri:`${r}/${f?"ipns":"ipfs"}/${u}${p}`,isOnChain:!1,isEncoded:!1};if(l==="ar:/"&&u)return{uri:`${o}/${u}${p||""}`,isOnChain:!1,isEncoded:!1};let g=e.replace(f9,"");if(g.startsWith("<svg")&&(g=`data:image/svg+xml;base64,${btoa(g)}`),g.startsWith("data:")||g.startsWith("{"))return{uri:g,isOnChain:!0,isEncoded:!1};throw new Ny({uri:e})}function k3(e){if(typeof e!="object"||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new a9({data:e});return e.image||e.image_url||e.image_data}async function p9({gatewayUrls:e,uri:t}){try{const n=await fetch(t).then(o=>o.json());return await Py({gatewayUrls:e,uri:k3(n)})}catch{throw new Ny({uri:t})}}async function Py({gatewayUrls:e,uri:t}){const{uri:n,isOnChain:r}=C3({uri:t,gatewayUrls:e});if(r||await h9(n))return n;throw new Ny({uri:t})}function m9(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));const[n,r,o]=t.split("/"),[i,l]=n.split(":"),[c,u]=r.split(":");if(!i||i.toLowerCase()!=="eip155")throw new nc({reason:"Only EIP-155 supported"});if(!l)throw new nc({reason:"Chain ID not found"});if(!u)throw new nc({reason:"Contract address not found"});if(!o)throw new nc({reason:"Token ID not found"});if(!c)throw new nc({reason:"ERC namespace not found"});return{chainID:Number.parseInt(l,10),namespace:c.toLowerCase(),contractAddress:u,tokenID:o}}async function g9(e,{nft:t}){if(t.namespace==="erc721")return cr(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if(t.namespace==="erc1155")return cr(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new l9({namespace:t.namespace})}async function y9(e,{gatewayUrls:t,record:n}){return/eip155:/i.test(n)?v9(e,{gatewayUrls:t,record:n}):Py({uri:n,gatewayUrls:t})}async function v9(e,{gatewayUrls:t,record:n}){const r=m9(n),o=await g9(e,{nft:r}),{uri:i,isOnChain:l,isEncoded:c}=C3({uri:o,gatewayUrls:t});if(l&&(i.includes("data:application/json;base64,")||i.startsWith("{"))){const p=c?atob(i.replace("data:application/json;base64,","")):i,f=JSON.parse(p);return Py({uri:k3(f),gatewayUrls:t})}let u=r.tokenID;return r.namespace==="erc1155"&&(u=u.replace("0x","").padStart(64,"0")),p9({gatewayUrls:t,uri:i.replace(/(?:0x)?{id}/,u)})}async function E3(e,t){const{blockNumber:n,blockTag:r,key:o,name:i,gatewayUrls:l,strict:c}=t,{chain:u}=e,p=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!u)throw new Error("client chain not configured. universalResolverAddress is required.");return ll({blockNumber:n,chain:u,contract:"ensUniversalResolver"})})(),f=u==null?void 0:u.ensTlds;if(f&&!f.some(m=>i.endsWith(m)))return null;try{const m={address:p,abi:u5,args:[jo(wy(i)),_n({abi:t6,functionName:"text",args:[Dm(i),o]}),l??[Vf]],functionName:"resolveWithGateways",blockNumber:n,blockTag:r},v=await ve(e,cr,"readContract")(m);if(v[0]==="0x")return null;const w=js({abi:t6,functionName:"text",data:v[0]});return w===""?null:w}catch(m){if(c)throw m;if(vy(m))return null;throw m}}async function A3(e,{blockNumber:t,blockTag:n,assetGatewayUrls:r,name:o,gatewayUrls:i,strict:l,universalResolverAddress:c}){const u=await ve(e,E3,"getEnsText")({blockNumber:t,blockTag:n,key:"avatar",name:o,universalResolverAddress:c,gatewayUrls:i,strict:l});if(!u)return null;try{return await y9(e,{record:u,gatewayUrls:r})}catch{return null}}async function S3(e,t){const{address:n,blockNumber:r,blockTag:o,coinType:i=60n,gatewayUrls:l,strict:c}=t,{chain:u}=e,p=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!u)throw new Error("client chain not configured. universalResolverAddress is required.");return ll({blockNumber:r,chain:u,contract:"ensUniversalResolver"})})();try{const f={address:p,abi:Sj,args:[n,i,l??[Vf]],functionName:"reverseWithGateways",blockNumber:r,blockTag:o},m=ve(e,cr,"readContract"),[g]=await m(f);return g||null}catch(f){if(c)throw f;if(vy(f))return null;throw f}}async function w9(e,t){const{blockNumber:n,blockTag:r,name:o}=t,{chain:i}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!i)throw new Error("client chain not configured. universalResolverAddress is required.");return ll({blockNumber:n,chain:i,contract:"ensUniversalResolver"})})(),c=i==null?void 0:i.ensTlds;if(c&&!c.some(p=>o.endsWith(p)))throw new Error(`${o} is not a valid ENS TLD (${c==null?void 0:c.join(", ")}) for chain "${i.name}" (id: ${i.id}).`);const[u]=await ve(e,cr,"readContract")({address:l,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[jo(wy(o))],blockNumber:n,blockTag:r});return u}async function j3(e,t){var C,j,I;const{account:n=e.account,blockNumber:r,blockTag:o="latest",blobs:i,data:l,gas:c,gasPrice:u,maxFeePerBlobGas:p,maxFeePerGas:f,maxPriorityFeePerGas:m,to:g,value:v,...w}=t,b=n?nt(n):void 0;try{Bo(t);const S=(typeof r=="bigint"?ge(r):void 0)||o,N=(I=(j=(C=e.chain)==null?void 0:C.formatters)==null?void 0:j.transactionRequest)==null?void 0:I.format,B=(N||Is)({...cl(w,{format:N}),account:b,blobs:i,data:l,gas:c,gasPrice:u,maxFeePerBlobGas:p,maxFeePerGas:f,maxPriorityFeePerGas:m,to:g,value:v},"createAccessList"),R=await e.request({method:"eth_createAccessList",params:[B,S]});return{accessList:R.accessList,gasUsed:BigInt(R.gasUsed)}}catch(A){throw w3(A,{...t,account:b,chain:e.chain})}}function Zf(e,{method:t}){var r,o;const n={};return e.transport.type==="fallback"&&((o=(r=e.transport).onResponse)==null||o.call(r,({method:i,response:l,status:c,transport:u})=>{c==="success"&&t===i&&(n[l]=u.request)})),(i=>n[i]||e.request)}async function b9(e){const t=Zf(e,{method:"eth_newBlockFilter"}),n=await e.request({method:"eth_newBlockFilter"});return{id:n,request:t(n),type:"block"}}class x9 extends oe{constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}const O6="/docs/contract/encodeEventTopics";function bu(e){var u;const{abi:t,eventName:n,args:r}=e;let o=t[0];if(n){const p=Ni({abi:t,name:n});if(!p)throw new i6(n,{docsPath:O6});o=p}if(o.type!=="event")throw new i6(void 0,{docsPath:O6});const i=Ar(o),l=Wf(i);let c=[];if(r&&"inputs"in o){const p=(u=o.inputs)==null?void 0:u.filter(m=>"indexed"in m&&m.indexed),f=Array.isArray(r)?r:Object.values(r).length>0?(p==null?void 0:p.map(m=>r[m.name]))??[]:[];f.length>0&&(c=(p==null?void 0:p.map((m,g)=>Array.isArray(f[g])?f[g].map((v,w)=>M6({param:m,value:f[g][w]})):typeof f[g]<"u"&&f[g]!==null?M6({param:m,value:f[g]}):null))??[])}return[l,...c]}function M6({param:e,value:t}){if(e.type==="string"||e.type==="bytes")return Ut(ol(t));if(e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/))throw new x9(e.type);return Ii([e],[t])}async function I3(e,t){const{address:n,abi:r,args:o,eventName:i,fromBlock:l,strict:c,toBlock:u}=t,p=Zf(e,{method:"eth_newFilter"}),f=i?bu({abi:r,args:o,eventName:i}):void 0,m=await e.request({method:"eth_newFilter",params:[{address:n,fromBlock:typeof l=="bigint"?ge(l):l,toBlock:typeof u=="bigint"?ge(u):u,topics:f}]});return{abi:r,args:o,eventName:i,id:m,request:p(m),strict:!!c,type:"event"}}async function N3(e,{address:t,args:n,event:r,events:o,fromBlock:i,strict:l,toBlock:c}={}){const u=o??(r?[r]:void 0),p=Zf(e,{method:"eth_newFilter"});let f=[];u&&(f=[u.flatMap(v=>bu({abi:[v],eventName:v.name,args:n}))],r&&(f=f[0]));const m=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof i=="bigint"?ge(i):i,toBlock:typeof c=="bigint"?ge(c):c,...f.length?{topics:f}:{}}]});return{abi:u,args:n,eventName:r?r.name:void 0,fromBlock:i,id:m,request:p(m),strict:!!l,toBlock:c,type:"event"}}async function P3(e){const t=Zf(e,{method:"eth_newPendingTransactionFilter"}),n=await e.request({method:"eth_newPendingTransactionFilter"});return{id:n,request:t(n),type:"transaction"}}function C9(e){const t=Ut(`0x${e.substring(4)}`).substring(26);return du(`0x${t}`)}async function k9({hash:e,signature:t}){const n=Vr(e)?e:jo(e),{secp256k1:r}=await fe(async()=>{const{secp256k1:l}=await Promise.resolve().then(()=>_P);return{secp256k1:l}},void 0);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:p,s:f,v:m,yParity:g}=t,v=Number(g??m),w=F6(v);return new r.Signature(Hn(p),Hn(f)).addRecoveryBit(w)}const l=Vr(t)?t:jo(t);if(at(l)!==65)throw new Error("invalid signature length");const c=lr(`0x${l.slice(130)}`),u=F6(c);return r.Signature.fromCompact(l.substring(2,130)).addRecoveryBit(u)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function F6(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function Km({hash:e,signature:t}){return C9(await k9({hash:e,signature:t}))}function E9(e,t="hex"){const n=B3(e),r=uy(new Uint8Array(n.length));return n.encode(r),t==="hex"?St(r.bytes):r.bytes}function B3(e){return Array.isArray(e)?A9(e.map(t=>B3(t))):S9(e)}function A9(e){const t=e.reduce((o,i)=>o+i.length,0),n=T3(t);return{length:t<=55?1+t:1+n+t,encode(o){t<=55?o.pushByte(192+t):(o.pushByte(247+n),n===1?o.pushUint8(t):n===2?o.pushUint16(t):n===3?o.pushUint24(t):o.pushUint32(t));for(const{encode:i}of e)i(o)}}}function S9(e){const t=typeof e=="string"?Sr(e):e,n=T3(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(o){t.length===1&&t[0]<128?o.pushBytes(t):t.length<=55?(o.pushByte(128+t.length),o.pushBytes(t)):(o.pushByte(183+n),n===1?o.pushUint8(t.length):n===2?o.pushUint16(t.length):n===3?o.pushUint24(t.length):o.pushUint32(t.length),o.pushBytes(t))}}}function T3(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new oe("Length is too large.")}function j9(e){const{chainId:t,nonce:n,to:r}=e,o=e.contractAddress??e.address,i=Ut(il(["0x05",E9([t?ge(t):"0x",o,n?ge(n):"0x"])]));return r==="bytes"?Sr(i):i}async function Xf(e){const{authorization:t,signature:n}=e;return Km({hash:j9(t),signature:n??t})}class I9 extends oe{constructor(t,{account:n,docsPath:r,chain:o,data:i,gas:l,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:p,nonce:f,to:m,value:g}){var w;const v=pu({from:n==null?void 0:n.address,to:m,value:typeof g<"u"&&`${my(g)} ${((w=o==null?void 0:o.nativeCurrency)==null?void 0:w.symbol)||"ETH"}`,data:i,gas:l,gasPrice:typeof c<"u"&&`${Pn(c)} gwei`,maxFeePerGas:typeof u<"u"&&`${Pn(u)} gwei`,maxPriorityFeePerGas:typeof p<"u"&&`${Pn(p)} gwei`,nonce:f});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",v].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}function N9(e,{docsPath:t,...n}){const r=(()=>{const o=Jf(e,n);return o instanceof vu?e:o})();return new I9(r,{docsPath:t,...n})}class _3 extends oe{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class By extends oe{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class P9 extends oe{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${Pn(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class R3 extends oe{constructor({blockHash:t,blockNumber:n}){let r="Block";t&&(r=`Block at hash "${t}"`),n&&(r=`Block at number "${n}"`),super(`${r} could not be found.`,{name:"BlockNotFoundError"})}}const O3={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function eh(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?lr(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?lr(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?O3[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(n.authorizationList=B9(e.authorizationList)),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof n.v=="bigint"){if(n.v===0n||n.v===27n)return 0;if(n.v===1n||n.v===28n)return 1;if(n.v>=35n)return n.v%2n===0n?1:0}})(),n.type==="legacy"&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),n.type==="eip2930"&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n.type==="eip1559"&&delete n.maxFeePerBlobGas,n}const WW=Sy("transaction",eh);function B9(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function Ty(e,t){const n=(e.transactions??[]).map(r=>typeof r=="string"?r:eh(r));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const qW=Sy("block",Ty);async function Cr(e,{blockHash:t,blockNumber:n,blockTag:r=e.experimental_blockTag??"latest",includeTransactions:o}={}){var p,f,m;const i=o??!1,l=n!==void 0?ge(n):void 0;let c=null;if(t?c=await e.request({method:"eth_getBlockByHash",params:[t,i]},{dedupe:!0}):c=await e.request({method:"eth_getBlockByNumber",params:[l||r,i]},{dedupe:!!l}),!c)throw new R3({blockHash:t,blockNumber:n});return(((m=(f=(p=e.chain)==null?void 0:p.formatters)==null?void 0:f.block)==null?void 0:m.format)||Ty)(c,"getBlock")}async function _y(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function T9(e,t){return M3(e,t)}async function M3(e,t){var i,l;const{block:n,chain:r=e.chain,request:o}=t||{};try{const c=((i=r==null?void 0:r.fees)==null?void 0:i.maxPriorityFeePerGas)??((l=r==null?void 0:r.fees)==null?void 0:l.defaultPriorityFee);if(typeof c=="function"){const p=n||await ve(e,Cr,"getBlock")({}),f=await c({block:p,client:e,request:o});if(f===null)throw new Error;return f}if(typeof c<"u")return c;const u=await e.request({method:"eth_maxPriorityFeePerGas"});return Hn(u)}catch{const[c,u]=await Promise.all([n?Promise.resolve(n):ve(e,Cr,"getBlock")({}),ve(e,_y,"getGasPrice")({})]);if(typeof c.baseFeePerGas!="bigint")throw new By;const p=u-c.baseFeePerGas;return p<0n?0n:p}}async function _9(e,t){return Ym(e,t)}async function Ym(e,t){var g,v;const{block:n,chain:r=e.chain,request:o,type:i="eip1559"}=t||{},l=await(async()=>{var w,b;return typeof((w=r==null?void 0:r.fees)==null?void 0:w.baseFeeMultiplier)=="function"?r.fees.baseFeeMultiplier({block:n,client:e,request:o}):((b=r==null?void 0:r.fees)==null?void 0:b.baseFeeMultiplier)??1.2})();if(l<1)throw new _3;const u=10**(((g=l.toString().split(".")[1])==null?void 0:g.length)??0),p=w=>w*BigInt(Math.ceil(l*u))/BigInt(u),f=n||await ve(e,Cr,"getBlock")({});if(typeof((v=r==null?void 0:r.fees)==null?void 0:v.estimateFeesPerGas)=="function"){const w=await r.fees.estimateFeesPerGas({block:n,client:e,multiply:p,request:o,type:i});if(w!==null)return w}if(i==="eip1559"){if(typeof f.baseFeePerGas!="bigint")throw new By;const w=typeof(o==null?void 0:o.maxPriorityFeePerGas)=="bigint"?o.maxPriorityFeePerGas:await M3(e,{block:f,chain:r,request:o}),b=p(f.baseFeePerGas);return{maxFeePerGas:(o==null?void 0:o.maxFeePerGas)??b+w,maxPriorityFeePerGas:w}}return{gasPrice:(o==null?void 0:o.gasPrice)??p(await ve(e,_y,"getGasPrice")({}))}}async function Ry(e,{address:t,blockTag:n="latest",blockNumber:r}){const o=await e.request({method:"eth_getTransactionCount",params:[t,typeof r=="bigint"?ge(r):n]},{dedupe:!!r});return lr(o)}function F3(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(i=>Sr(i)):e.blobs,o=[];for(const i of r)o.push(Uint8Array.from(t.blobToKzgCommitment(i)));return n==="bytes"?o:o.map(i=>St(i))}function L3(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(l=>Sr(l)):e.blobs,o=typeof e.commitments[0]=="string"?e.commitments.map(l=>Sr(l)):e.commitments,i=[];for(let l=0;l<r.length;l++){const c=r[l],u=o[l];i.push(Uint8Array.from(t.computeBlobKzgProof(c,u)))}return n==="bytes"?i:i.map(l=>St(l))}function R9(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),i=BigInt(4294967295),l=Number(n>>o&i),c=Number(n&i),u=r?4:0,p=r?0:4;e.setUint32(t+u,l,r),e.setUint32(t+p,c,r)}function O9(e,t,n){return e&t^~e&n}function M9(e,t,n){return e&t^e&n^t&n}class D3 extends ly{constructor(t,n,r,o){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.buffer=new Uint8Array(t),this.view=y0(this.buffer)}update(t){Ha(this),t=Uf(t),Cs(t);const{view:n,buffer:r,blockLen:o}=this,i=t.length;for(let l=0;l<i;){const c=Math.min(o-this.pos,i-l);if(c===o){const u=y0(t);for(;o<=i-l;l+=o)this.process(u,l);continue}r.set(t.subarray(l,l+c),this.pos),this.pos+=c,l+=c,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Ha(this),C5(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:o,isLE:i}=this;let{pos:l}=this;n[l++]=128,ks(this.buffer.subarray(l)),this.padOffset>o-l&&(this.process(r,0),l=0);for(let m=l;m<o;m++)n[m]=0;R9(r,o-8,BigInt(this.length*8),i),this.process(r,0);const c=y0(t),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const p=u/4,f=this.get();if(p>f.length)throw new Error("_sha2: outputLen bigger than state");for(let m=0;m<p;m++)c.setUint32(4*m,f[m],i)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:o,finished:i,destroyed:l,pos:c}=this;return t.destroyed=l,t.finished=i,t.length=o,t.pos=c,o%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const es=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Yt=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),Jt=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),F9=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ts=new Uint32Array(64);class L9 extends D3{constructor(t=32){super(64,t,8,!1),this.A=es[0]|0,this.B=es[1]|0,this.C=es[2]|0,this.D=es[3]|0,this.E=es[4]|0,this.F=es[5]|0,this.G=es[6]|0,this.H=es[7]|0}get(){const{A:t,B:n,C:r,D:o,E:i,F:l,G:c,H:u}=this;return[t,n,r,o,i,l,c,u]}set(t,n,r,o,i,l,c,u){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=i|0,this.F=l|0,this.G=c|0,this.H=u|0}process(t,n){for(let m=0;m<16;m++,n+=4)ts[m]=t.getUint32(n,!1);for(let m=16;m<64;m++){const g=ts[m-15],v=ts[m-2],w=Mr(g,7)^Mr(g,18)^g>>>3,b=Mr(v,17)^Mr(v,19)^v>>>10;ts[m]=b+ts[m-7]+w+ts[m-16]|0}let{A:r,B:o,C:i,D:l,E:c,F:u,G:p,H:f}=this;for(let m=0;m<64;m++){const g=Mr(c,6)^Mr(c,11)^Mr(c,25),v=f+g+O9(c,u,p)+F9[m]+ts[m]|0,b=(Mr(r,2)^Mr(r,13)^Mr(r,22))+M9(r,o,i)|0;f=p,p=u,u=c,c=l+v|0,l=i,i=o,o=r,r=v+b|0}r=r+this.A|0,o=o+this.B|0,i=i+this.C|0,l=l+this.D|0,c=c+this.E|0,u=u+this.F|0,p=p+this.G|0,f=f+this.H|0,this.set(r,o,i,l,c,u,p,f)}roundClean(){ks(ts)}destroy(){this.set(0,0,0,0,0,0,0,0),ks(this.buffer)}}const U3=x5(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),D9=U3[0],U9=U3[1],ns=new Uint32Array(80),rs=new Uint32Array(80);class $3 extends D3{constructor(t=64){super(128,t,16,!1),this.Ah=Jt[0]|0,this.Al=Jt[1]|0,this.Bh=Jt[2]|0,this.Bl=Jt[3]|0,this.Ch=Jt[4]|0,this.Cl=Jt[5]|0,this.Dh=Jt[6]|0,this.Dl=Jt[7]|0,this.Eh=Jt[8]|0,this.El=Jt[9]|0,this.Fh=Jt[10]|0,this.Fl=Jt[11]|0,this.Gh=Jt[12]|0,this.Gl=Jt[13]|0,this.Hh=Jt[14]|0,this.Hl=Jt[15]|0}get(){const{Ah:t,Al:n,Bh:r,Bl:o,Ch:i,Cl:l,Dh:c,Dl:u,Eh:p,El:f,Fh:m,Fl:g,Gh:v,Gl:w,Hh:b,Hl:C}=this;return[t,n,r,o,i,l,c,u,p,f,m,g,v,w,b,C]}set(t,n,r,o,i,l,c,u,p,f,m,g,v,w,b,C){this.Ah=t|0,this.Al=n|0,this.Bh=r|0,this.Bl=o|0,this.Ch=i|0,this.Cl=l|0,this.Dh=c|0,this.Dl=u|0,this.Eh=p|0,this.El=f|0,this.Fh=m|0,this.Fl=g|0,this.Gh=v|0,this.Gl=w|0,this.Hh=b|0,this.Hl=C|0}process(t,n){for(let A=0;A<16;A++,n+=4)ns[A]=t.getUint32(n),rs[A]=t.getUint32(n+=4);for(let A=16;A<80;A++){const S=ns[A-15]|0,N=rs[A-15]|0,T=ra(S,N,1)^ra(S,N,8)^u6(S,N,7),B=oa(S,N,1)^oa(S,N,8)^d6(S,N,7),R=ns[A-2]|0,M=rs[A-2]|0,H=ra(R,M,19)^$d(R,M,61)^u6(R,M,6),V=oa(R,M,19)^zd(R,M,61)^d6(R,M,6),W=s4(B,V,rs[A-7],rs[A-16]),L=i4(W,T,H,ns[A-7],ns[A-16]);ns[A]=L|0,rs[A]=W|0}let{Ah:r,Al:o,Bh:i,Bl:l,Ch:c,Cl:u,Dh:p,Dl:f,Eh:m,El:g,Fh:v,Fl:w,Gh:b,Gl:C,Hh:j,Hl:I}=this;for(let A=0;A<80;A++){const S=ra(m,g,14)^ra(m,g,18)^$d(m,g,41),N=oa(m,g,14)^oa(m,g,18)^zd(m,g,41),T=m&v^~m&b,B=g&w^~g&C,R=a4(I,N,B,U9[A],rs[A]),M=l4(R,j,S,T,D9[A],ns[A]),H=R|0,V=ra(r,o,28)^$d(r,o,34)^$d(r,o,39),W=oa(r,o,28)^zd(r,o,34)^zd(r,o,39),L=r&i^r&c^i&c,J=o&l^o&u^l&u;j=b|0,I=C|0,b=v|0,C=w|0,v=m|0,w=g|0,{h:m,l:g}=co(p|0,f|0,M|0,H|0),p=c|0,f=u|0,c=i|0,u=l|0,i=r|0,l=o|0;const O=r4(H,W,J);r=o4(O,M,V,L),o=O|0}({h:r,l:o}=co(this.Ah|0,this.Al|0,r|0,o|0)),{h:i,l}=co(this.Bh|0,this.Bl|0,i|0,l|0),{h:c,l:u}=co(this.Ch|0,this.Cl|0,c|0,u|0),{h:p,l:f}=co(this.Dh|0,this.Dl|0,p|0,f|0),{h:m,l:g}=co(this.Eh|0,this.El|0,m|0,g|0),{h:v,l:w}=co(this.Fh|0,this.Fl|0,v|0,w|0),{h:b,l:C}=co(this.Gh|0,this.Gl|0,b|0,C|0),{h:j,l:I}=co(this.Hh|0,this.Hl|0,j|0,I|0),this.set(r,o,i,l,c,u,p,f,m,g,v,w,b,C,j,I)}roundClean(){ks(ns,rs)}destroy(){ks(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class $9 extends $3{constructor(){super(48),this.Ah=Yt[0]|0,this.Al=Yt[1]|0,this.Bh=Yt[2]|0,this.Bl=Yt[3]|0,this.Ch=Yt[4]|0,this.Cl=Yt[5]|0,this.Dh=Yt[6]|0,this.Dl=Yt[7]|0,this.Eh=Yt[8]|0,this.El=Yt[9]|0,this.Fh=Yt[10]|0,this.Fl=Yt[11]|0,this.Gh=Yt[12]|0,this.Gl=Yt[13]|0,this.Hh=Yt[14]|0,this.Hl=Yt[15]|0}}const z3=$f(()=>new L9),HW=$f(()=>new $3),VW=$f(()=>new $9),z9=z3;function W9(e,t){return z9(Vr(e,{strict:!1})?ol(e):e)}function q9(e){const{commitment:t,version:n=1}=e,r=e.to??(typeof t=="string"?"hex":"bytes"),o=W9(t);return o.set([n],0),r==="bytes"?o:St(o)}function H9(e){const{commitments:t,version:n}=e,r=e.to??(typeof t[0]=="string"?"hex":"bytes"),o=[];for(const i of t)o.push(q9({commitment:i,to:r,version:n}));return o}const L6=6,W3=32,Oy=4096,q3=W3*Oy,D6=q3*L6-1-1*Oy*L6,V9=1;class Q9 extends oe{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class G9 extends oe{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class QW extends oe{constructor({hash:t,size:n}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${n}`],name:"InvalidVersionedHashSizeError"})}}class GW extends oe{constructor({hash:t,version:n}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${V9}`,`Received: ${n}`],name:"InvalidVersionedHashVersionError"})}}function K9(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),n=typeof e.data=="string"?Sr(e.data):e.data,r=at(n);if(!r)throw new G9;if(r>D6)throw new Q9({maxSize:D6,size:r});const o=[];let i=!0,l=0;for(;i;){const c=uy(new Uint8Array(q3));let u=0;for(;u<Oy;){const p=n.slice(l,l+(W3-1));if(c.pushByte(0),c.pushBytes(p),p.length<31){c.pushByte(128),i=!1;break}u++,l+=31}o.push(c)}return t==="bytes"?o.map(c=>c.bytes):o.map(c=>St(c.bytes))}function Y9(e){const{data:t,kzg:n,to:r}=e,o=e.blobs??K9({data:t,to:r}),i=e.commitments??F3({blobs:o,kzg:n,to:r}),l=e.proofs??L3({blobs:o,commitments:i,kzg:n,to:r}),c=[];for(let u=0;u<o.length;u++)c.push({blob:o[u],commitment:i[u],proof:l[u]});return c}function J9(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return"eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return"eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new eI({transaction:e})}function th(e,{docsPath:t,...n}){const r=(()=>{const o=Jf(e,n);return o instanceof vu?e:o})();return new tI(r,{docsPath:t,...n})}async function Ns(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return lr(t)}async function My(e,t){var R,M,H,V,W;const{account:n=e.account,accessList:r,authorizationList:o,chain:i=e.chain,blobVersionedHashes:l,blobs:c,data:u,gas:p,gasPrice:f,maxFeePerBlobGas:m,maxFeePerGas:g,maxPriorityFeePerGas:v,nonce:w,nonceManager:b,to:C,type:j,value:I,...A}=t,S=await(async()=>{if(!n||!b||typeof w<"u")return w;const L=nt(n),J=i?i.id:await ve(e,Ns,"getChainId")({});return await b.consume({address:L.address,chainId:J,client:e})})();Bo(t);const N=(M=(R=i==null?void 0:i.formatters)==null?void 0:R.transactionRequest)==null?void 0:M.format,B=(N||Is)({...cl(A,{format:N}),account:n?nt(n):void 0,accessList:r,authorizationList:o,blobs:c,blobVersionedHashes:l,data:u,gas:p,gasPrice:f,maxFeePerBlobGas:m,maxFeePerGas:g,maxPriorityFeePerGas:v,nonce:S,to:C,type:j,value:I},"fillTransaction");try{const L=await e.request({method:"eth_fillTransaction",params:[B]}),O=(((V=(H=i==null?void 0:i.formatters)==null?void 0:H.transaction)==null?void 0:V.format)||eh)(L.tx);delete O.blockHash,delete O.blockNumber,delete O.r,delete O.s,delete O.transactionIndex,delete O.v,delete O.yParity,O.data=O.input,O.gas&&(O.gas=t.gas??O.gas),O.gasPrice&&(O.gasPrice=t.gasPrice??O.gasPrice),O.maxFeePerBlobGas&&(O.maxFeePerBlobGas=t.maxFeePerBlobGas??O.maxFeePerBlobGas),O.maxFeePerGas&&(O.maxFeePerGas=t.maxFeePerGas??O.maxFeePerGas),O.maxPriorityFeePerGas&&(O.maxPriorityFeePerGas=t.maxPriorityFeePerGas??O.maxPriorityFeePerGas),O.nonce&&(O.nonce=t.nonce??O.nonce);const G=await(async()=>{var Y,U;if(typeof((Y=i==null?void 0:i.fees)==null?void 0:Y.baseFeeMultiplier)=="function"){const X=await ve(e,Cr,"getBlock")({});return i.fees.baseFeeMultiplier({block:X,client:e,request:t})}return((U=i==null?void 0:i.fees)==null?void 0:U.baseFeeMultiplier)??1.2})();if(G<1)throw new _3;const F=10**(((W=G.toString().split(".")[1])==null?void 0:W.length)??0),K=Y=>Y*BigInt(Math.ceil(G*F))/BigInt(F);return O.maxFeePerGas&&!t.maxFeePerGas&&(O.maxFeePerGas=K(O.maxFeePerGas)),O.gasPrice&&!t.gasPrice&&(O.gasPrice=K(O.gasPrice)),{raw:L.raw,transaction:{from:B.from,...O}}}catch(L){throw th(L,{...t,chain:e.chain})}}const Fy=["blobVersionedHashes","chainId","fees","gas","nonce","type"],U6=new Map,I0=new sl(128);async function xu(e,t){var S,N,T;let n=t;n.account??(n.account=e.account),n.parameters??(n.parameters=Fy);const{account:r,chain:o=e.chain,nonceManager:i,parameters:l}=n,c=(()=>{if(typeof(o==null?void 0:o.prepareTransactionRequest)=="function")return{fn:o.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(o==null?void 0:o.prepareTransactionRequest))return{fn:o.prepareTransactionRequest[0],runAt:o.prepareTransactionRequest[1].runAt}})();let u;async function p(){return u||(typeof n.chainId<"u"?n.chainId:o?o.id:(u=await ve(e,Ns,"getChainId")({}),u))}const f=r&&nt(r);let m=n.nonce;if(l.includes("nonce")&&typeof m>"u"&&f&&i){const B=await p();m=await i.consume({address:f.address,chainId:B,client:e})}c!=null&&c.fn&&((S=c.runAt)!=null&&S.includes("beforeFillTransaction"))&&(n=await c.fn({...n,chain:o},{phase:"beforeFillTransaction"}),m??(m=n.nonce));const v=((l.includes("blobVersionedHashes")||l.includes("sidecars"))&&n.kzg&&n.blobs||I0.get(e.uid)===!1||!["fees","gas"].some(R=>l.includes(R))?!1:!!(l.includes("chainId")&&typeof n.chainId!="number"||l.includes("nonce")&&typeof m!="number"||l.includes("fees")&&typeof n.gasPrice!="bigint"&&(typeof n.maxFeePerGas!="bigint"||typeof n.maxPriorityFeePerGas!="bigint")||l.includes("gas")&&typeof n.gas!="bigint"))?await ve(e,My,"fillTransaction")({...n,nonce:m}).then(B=>{const{chainId:R,from:M,gas:H,gasPrice:V,nonce:W,maxFeePerBlobGas:L,maxFeePerGas:J,maxPriorityFeePerGas:O,type:G,...ee}=B.transaction;return I0.set(e.uid,!0),{...n,...M?{from:M}:{},...G&&!n.type?{type:G}:{},...typeof R<"u"?{chainId:R}:{},...typeof H<"u"?{gas:H}:{},...typeof V<"u"?{gasPrice:V}:{},...typeof W<"u"?{nonce:W}:{},...typeof L<"u"&&n.type!=="legacy"&&n.type!=="eip2930"?{maxFeePerBlobGas:L}:{},...typeof J<"u"&&n.type!=="legacy"&&n.type!=="eip2930"?{maxFeePerGas:J}:{},...typeof O<"u"&&n.type!=="legacy"&&n.type!=="eip2930"?{maxPriorityFeePerGas:O}:{},..."nonceKey"in ee&&typeof ee.nonceKey<"u"?{nonceKey:ee.nonceKey}:{},..."keyAuthorization"in ee&&typeof ee.keyAuthorization<"u"&&ee.keyAuthorization!==null&&!("keyAuthorization"in n)?{keyAuthorization:ee.keyAuthorization}:{},..."feePayerSignature"in ee&&typeof ee.feePayerSignature<"u"&&ee.feePayerSignature!==null?{feePayerSignature:ee.feePayerSignature}:{}}}).catch(B=>{var V,W;const R=B;if(R.name!=="TransactionExecutionError")return n;if((V=R.walk)==null?void 0:V.call(R,L=>L.name==="ExecutionRevertedError"))throw B;return((W=R.walk)==null?void 0:W.call(R,L=>{var O;const J=L;return J.name==="MethodNotFoundRpcError"||J.name==="MethodNotSupportedRpcError"||((O=J.message)==null?void 0:O.includes("eth_fillTransaction is not available"))}))&&I0.set(e.uid,!1),n}):n;m??(m=v.nonce),n={...v,...f?{from:f==null?void 0:f.address}:{},...m?{nonce:m}:{}};const{blobs:w,gas:b,kzg:C,type:j}=n;c!=null&&c.fn&&((N=c.runAt)!=null&&N.includes("beforeFillParameters"))&&(n=await c.fn({...n,chain:o},{phase:"beforeFillParameters"}));let I;async function A(){return I||(I=await ve(e,Cr,"getBlock")({blockTag:"latest"}),I)}if(l.includes("nonce")&&typeof m>"u"&&f&&!i&&(n.nonce=await ve(e,Ry,"getTransactionCount")({address:f.address,blockTag:"pending"})),(l.includes("blobVersionedHashes")||l.includes("sidecars"))&&w&&C){const B=F3({blobs:w,kzg:C});if(l.includes("blobVersionedHashes")){const R=H9({commitments:B,to:"hex"});n.blobVersionedHashes=R}if(l.includes("sidecars")){const R=L3({blobs:w,commitments:B,kzg:C}),M=Y9({blobs:w,commitments:B,proofs:R,to:"hex"});n.sidecars=M}}if(l.includes("chainId")&&(n.chainId=await p()),(l.includes("fees")||l.includes("type"))&&typeof j>"u")try{n.type=J9(n)}catch{let B=U6.get(e.uid);if(typeof B>"u"){const R=await A();B=typeof(R==null?void 0:R.baseFeePerGas)=="bigint",U6.set(e.uid,B)}n.type=B?"eip1559":"legacy"}if(l.includes("fees"))if(n.type!=="legacy"&&n.type!=="eip2930"){if(typeof n.maxFeePerGas>"u"||typeof n.maxPriorityFeePerGas>"u"){const B=await A(),{maxFeePerGas:R,maxPriorityFeePerGas:M}=await Ym(e,{block:B,chain:o,request:n});if(typeof n.maxPriorityFeePerGas>"u"&&n.maxFeePerGas&&n.maxFeePerGas<M)throw new P9({maxPriorityFeePerGas:M});n.maxPriorityFeePerGas=M,n.maxFeePerGas=R}}else{if(typeof n.maxFeePerGas<"u"||typeof n.maxPriorityFeePerGas<"u")throw new By;if(typeof n.gasPrice>"u"){const B=await A(),{gasPrice:R}=await Ym(e,{block:B,chain:o,request:n,type:"legacy"});n.gasPrice=R}}return l.includes("gas")&&typeof b>"u"&&(n.gas=await ve(e,Ly,"estimateGas")({...n,account:f,prepare:(f==null?void 0:f.type)==="local"?[]:["blobVersionedHashes"]})),c!=null&&c.fn&&((T=c.runAt)!=null&&T.includes("afterFillParameters"))&&(n=await c.fn({...n,chain:o},{phase:"afterFillParameters"})),Bo(n),delete n.parameters,n}async function Ly(e,t){var l,c,u;const{account:n=e.account,prepare:r=!0}=t,o=n?nt(n):void 0,i=(()=>{if(Array.isArray(r))return r;if((o==null?void 0:o.type)!=="local")return["blobVersionedHashes"]})();try{const p=await(async()=>{if(t.to)return t.to;if(t.authorizationList&&t.authorizationList.length>0)return await Xf({authorization:t.authorizationList[0]}).catch(()=>{throw new oe("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:f,authorizationList:m,blobs:g,blobVersionedHashes:v,blockNumber:w,blockTag:b,data:C,gas:j,gasPrice:I,maxFeePerBlobGas:A,maxFeePerGas:S,maxPriorityFeePerGas:N,nonce:T,value:B,stateOverride:R,...M}=r?await xu(e,{...t,parameters:i,to:p}):t;if(j&&t.gas!==j)return j;const V=(typeof w=="bigint"?ge(w):void 0)||b,W=Iy(R);Bo(t);const L=(u=(c=(l=e.chain)==null?void 0:l.formatters)==null?void 0:c.transactionRequest)==null?void 0:u.format,O=(L||Is)({...cl(M,{format:L}),account:o,accessList:f,authorizationList:m,blobs:g,blobVersionedHashes:v,data:C,gasPrice:I,maxFeePerBlobGas:A,maxFeePerGas:S,maxPriorityFeePerGas:N,nonce:T,to:p,value:B},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:W?[O,V??e.experimental_blockTag??"latest",W]:V?[O,V]:[O]}))}catch(p){throw N9(p,{...t,account:o,chain:e.chain})}}async function Z9(e,t){var p;const{abi:n,address:r,args:o,functionName:i,dataSuffix:l=typeof e.dataSuffix=="string"?e.dataSuffix:(p=e.dataSuffix)==null?void 0:p.value,...c}=t,u=_n({abi:n,args:o,functionName:i});try{return await ve(e,Ly,"estimateGas")({data:`${u}${l?l.replace("0x",""):""}`,to:r,...c})}catch(f){const m=c.account?nt(c.account):void 0;throw wi(f,{abi:n,address:r,args:o,docsPath:"/docs/contract/estimateContractGas",functionName:i,sender:m==null?void 0:m.address})}}async function H3(e,{address:t,blockNumber:n,blockTag:r=e.experimental_blockTag??"latest"}){var l,c,u;if((l=e.batch)!=null&&l.multicall&&((u=(c=e.chain)==null?void 0:c.contracts)!=null&&u.multicall3)){const p=e.chain.contracts.multicall3.address,f=_n({abi:za,functionName:"getEthBalance",args:[t]}),{data:m}=await ve(e,wu,"call")({to:p,data:f,blockNumber:n,blockTag:r});return js({abi:za,functionName:"getEthBalance",args:[t],data:m||"0x"})}const o=typeof n=="bigint"?ge(n):void 0,i=await e.request({method:"eth_getBalance",params:[t,o||r]});return BigInt(i)}async function X9(e){const t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}const eN=new Map,tN=new Map;function nN(e){const t=(o,i)=>({clear:()=>i.delete(o),get:()=>i.get(o),set:l=>i.set(o,l)}),n=t(e,eN),r=t(e,tN);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}async function rN(e,{cacheKey:t,cacheTime:n=Number.POSITIVE_INFINITY}){const r=nN(t),o=r.response.get();if(o&&n>0&&Date.now()-o.created.getTime()<n)return o.data;let i=r.promise.get();i||(i=e(),r.promise.set(i));try{const l=await i;return r.response.set({created:new Date,data:l}),l}finally{r.promise.clear()}}const oN=e=>`blockNumber.${e}`;async function Cu(e,{cacheTime:t=e.cacheTime}={}){const n=await rN(()=>e.request({method:"eth_blockNumber"}),{cacheKey:oN(e.uid),cacheTime:t});return BigInt(n)}async function sN(e,{blockHash:t,blockNumber:n,blockTag:r="latest"}={}){const o=n!==void 0?ge(n):void 0;let i;return t?i=await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:!0}):i=await e.request({method:"eth_getBlockTransactionCountByNumber",params:[o||r]},{dedupe:!!o}),lr(i)}async function xf(e,{address:t,blockNumber:n,blockTag:r="latest"}){const o=n!==void 0?ge(n):void 0,i=await e.request({method:"eth_getCode",params:[t,o||r]},{dedupe:!!o});if(i!=="0x")return i}function Ka(e,t){if(!Vn(e,{strict:!1}))throw new xs({address:e});if(!Vn(t,{strict:!1}))throw new xs({address:t});return e.toLowerCase()===t.toLowerCase()}function Qr(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}const $6="/docs/contract/decodeEventLog";function Cf(e){const{abi:t,data:n,strict:r,topics:o}=e,i=r??!0,[l,...c]=o;if(!l)throw new _j({docsPath:$6});const u=t.find(j=>j.type==="event"&&l===Wf(Ar(j)));if(!(u&&"name"in u)||u.type!=="event")throw new Rj(l,{docsPath:$6});const{name:p,inputs:f}=u,m=f==null?void 0:f.some(j=>!("name"in j&&j.name)),g=m?[]:{},v=f.map((j,I)=>[j,I]).filter(([j])=>"indexed"in j&&j.indexed),w=[];for(let j=0;j<v.length;j++){const[I,A]=v[j],S=c[j];if(!S){if(i)throw new iy({abiItem:u,param:I});w.push([I,A]);continue}g[m?A:I.name||A]=iN({param:I,value:S})}const b=f.filter(j=>!("indexed"in j&&j.indexed)),C=i?b:[...w.map(([j])=>j),...b];if(C.length>0){if(n&&n!=="0x")try{const j=fu(C,n);if(j){let I=0;if(!i)for(const[A,S]of w)g[m?S:A.name||S]=j[I++];if(m)for(let A=0;A<f.length;A++)g[A]===void 0&&I<j.length&&(g[A]=j[I++]);else for(let A=0;A<b.length;A++)g[b[A].name]=j[I++]}}catch(j){if(i)throw j instanceof p5||j instanceof N5?new mf({abiItem:u,data:n,params:C,size:at(n)}):j}else if(i)throw new mf({abiItem:u,data:"0x",params:C,size:0})}return{eventName:p,args:Object.values(g).length>0?g:void 0}}function iN({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(fu([e],t)||[])[0]}function Dy(e){const{abi:t,args:n,logs:r,strict:o=!0}=e,i=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})(),l=t.filter(c=>c.type==="event").map(c=>({abi:c,selector:Wf(c)}));return r.map(c=>{var g;const u=typeof c.blockNumber=="string"?Qr(c):c,p=l.filter(v=>u.topics[0]===v.selector);if(p.length===0)return null;let f,m;for(const v of p)try{f=Cf({...u,abi:[v.abi],strict:!0}),m=v;break}catch{}if(!f&&!o){m=p[0];try{f=Cf({data:u.data,topics:u.topics,abi:[m.abi],strict:!1})}catch{const v=(g=m.abi.inputs)==null?void 0:g.some(w=>!("name"in w&&w.name));return{...u,args:v?[]:{},eventName:m.abi.name}}}return!f||!m||i&&!i.includes(f.eventName)||!aN({args:f.args,inputs:m.abi.inputs,matchArgs:n})?null:{...f,...u}}).filter(Boolean)}function aN(e){const{args:t,inputs:n,matchArgs:r}=e;if(!r)return!0;if(!t)return!1;function o(i,l,c){try{return i.type==="address"?Ka(l,c):i.type==="string"||i.type==="bytes"?Ut(ol(l))===c:l===c}catch{return!1}}return Array.isArray(t)&&Array.isArray(r)?r.every((i,l)=>{if(i==null)return!0;const c=n[l];return c?(Array.isArray(i)?i:[i]).some(p=>o(c,p,t[l])):!1}):typeof t=="object"&&!Array.isArray(t)&&typeof r=="object"&&!Array.isArray(r)?Object.entries(r).every(([i,l])=>{if(l==null)return!0;const c=n.find(p=>p.name===i);return c?(Array.isArray(l)?l:[l]).some(p=>o(c,p,t[i])):!1}):!1}async function Uy(e,{address:t,blockHash:n,fromBlock:r,toBlock:o,event:i,events:l,args:c,strict:u}={}){const p=u??!1,f=l??(i?[i]:void 0);let m=[];f&&(m=[f.flatMap(b=>bu({abi:[b],eventName:b.name,args:l?void 0:c}))],i&&(m=m[0]));let g;n?g=await e.request({method:"eth_getLogs",params:[{address:t,topics:m,blockHash:n}]}):g=await e.request({method:"eth_getLogs",params:[{address:t,topics:m,fromBlock:typeof r=="bigint"?ge(r):r,toBlock:typeof o=="bigint"?ge(o):o}]});const v=g.map(w=>Qr(w));return f?Dy({abi:f,args:c,logs:v,strict:p}):v}async function V3(e,t){const{abi:n,address:r,args:o,blockHash:i,eventName:l,fromBlock:c,toBlock:u,strict:p}=t,f=l?Ni({abi:n,name:l}):void 0,m=f?void 0:n.filter(g=>g.type==="event");return ve(e,Uy,"getLogs")({address:r,args:o,blockHash:i,event:f,events:m,fromBlock:c,toBlock:u,strict:p})}async function lN(e,{address:t,blockNumber:n,blockTag:r="latest"}){const o=await xf(e,{address:t,...n!==void 0?{blockNumber:n}:{blockTag:r}});if(o&&at(o)===23&&o.startsWith("0xef0100"))return vt(yi(o,3,23))}class cN extends oe{constructor({address:t}){super(`No EIP-712 domain found on contract "${t}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${t}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}async function uN(e,t){const{address:n,factory:r,factoryData:o}=t;try{const[i,l,c,u,p,f,m]=await ve(e,cr,"readContract")({abi:dN,address:n,functionName:"eip712Domain",factory:r,factoryData:o});return{domain:{name:l,version:c,chainId:Number(u),verifyingContract:p,salt:f},extensions:m,fields:i}}catch(i){const l=i;throw l.name==="ContractFunctionExecutionError"&&l.cause.name==="ContractFunctionZeroDataError"?new cN({address:n}):l}}const dN=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];function fN(e){var t;return{baseFeePerGas:e.baseFeePerGas.map(n=>BigInt(n)),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:(t=e.reward)==null?void 0:t.map(n=>n.map(r=>BigInt(r)))}}async function hN(e,{blockCount:t,blockNumber:n,blockTag:r="latest",rewardPercentiles:o}){const i=typeof n=="bigint"?ge(n):void 0,l=await e.request({method:"eth_feeHistory",params:[ge(t),i||r,o]},{dedupe:!!i});return fN(l)}async function nh(e,{filter:t}){const n="strict"in t&&t.strict,r=await t.request({method:"eth_getFilterChanges",params:[t.id]});if(typeof r[0]=="string")return r;const o=r.map(i=>Qr(i));return!("abi"in t)||!t.abi?o:Dy({abi:t.abi,logs:o,strict:n})}async function pN(e,{filter:t}){const n=t.strict??!1,o=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(i=>Qr(i));return t.abi?Dy({abi:t.abi,logs:o,strict:n}):o}async function mN({address:e,authorization:t,signature:n}){return Ka(vt(e),await Xf({authorization:t,signature:n}))}const qd=new sl(8192);function gN(e,{enabled:t=!0,id:n}){if(!t||!n)return e();if(qd.get(n))return qd.get(n);const r=e().finally(()=>qd.delete(n));return qd.set(n,r),r}async function Jm(e){return new Promise(t=>setTimeout(t,e))}function Ci(e,{delay:t=100,retryCount:n=2,shouldRetry:r=()=>!0}={}){return new Promise((o,i)=>{const l=async({count:c=0}={})=>{const u=async({error:p})=>{const f=typeof t=="function"?t({count:c,error:p}):t;f&&await Jm(f),l({count:c+1})};try{const p=await e();o(p)}catch(p){if(c<n&&await r({count:c,error:p}))return u({error:p});i(p)}};l()})}function yN(e,t={}){return async(n,r={})=>{var m;const{dedupe:o=!1,methods:i,retryDelay:l=150,retryCount:c=3,uid:u}={...t,...r},{method:p}=n;if((m=i==null?void 0:i.exclude)!=null&&m.includes(p))throw new Zs(new Error("method not supported"),{method:p});if(i!=null&&i.include&&!i.include.includes(p))throw new Zs(new Error("method not supported"),{method:p});const f=o?qa(`${u}.${At(n)}`):void 0;return gN(()=>Ci(async()=>{try{return await e(n)}catch(g){const v=g;switch(v.code){case xc.code:throw new xc(v);case Cc.code:throw new Cc(v);case kc.code:throw new kc(v,{method:n.method});case Ec.code:throw new Ec(v);case vi.code:throw new vi(v);case Es.code:throw new Es(v);case Ac.code:throw new Ac(v);case qr.code:throw new qr(v);case Sc.code:throw new Sc(v);case Zs.code:throw new Zs(v,{method:n.method});case Va.code:throw new Va(v);case jc.code:throw new jc(v);case Ve.code:throw new Ve(v);case Ic.code:throw new Ic(v);case Nc.code:throw new Nc(v);case Pc.code:throw new Pc(v);case Bc.code:throw new Bc(v);case qn.code:throw new qn(v);case Qa.code:throw new Qa(v);case Tc.code:throw new Tc(v);case _c.code:throw new _c(v);case Rc.code:throw new Rc(v);case Oc.code:throw new Oc(v);case Mc.code:throw new Mc(v);case Ga.code:throw new Ga(v);case 5e3:throw new Ve(v);case Fc.code:throw new Fc(v);default:throw g instanceof oe?g:new hI(v)}}},{delay:({count:g,error:v})=>{var w;if(v&&v instanceof hc){const b=(w=v==null?void 0:v.headers)==null?void 0:w.get("Retry-After");if(b!=null&&b.match(/\d/))return Number.parseInt(b,10)*1e3}return~~(1<<g)*l},retryCount:c,shouldRetry:({error:g})=>vN(g)}),{enabled:o,id:f})}}function vN(e){return"code"in e&&typeof e.code=="number"?e.code===-1||e.code===Va.code||e.code===vi.code||e.code===429:e instanceof hc&&e.status?e.status===403||e.status===408||e.status===413||e.status===429||e.status===500||e.status===502||e.status===503||e.status===504:!0}function $y({chain:e,currentChainId:t}){if(!e)throw new q7;if(t!==e.id)throw new W7({chain:e,currentChainId:t})}function Q3(e){const t={formatters:void 0,fees:void 0,serializers:void 0,...e};function n(r){return o=>{const i=typeof o=="function"?o(r):o,l={...r,...i};return Object.assign(l,{extend:n(l)})}}return Object.assign(t,{extend:n(t)})}const G3={"0x0":"reverted","0x1":"success"};function zy(e,t){const n={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(r=>Qr(r)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?lr(e.transactionIndex):null,status:e.status?G3[e.status]:null,type:e.type?O3[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const KW=Sy("transactionReceipt",zy);function rh(e,{errorInstance:t=new Error("timed out"),timeout:n,signal:r}){return new Promise((o,i)=>{(async()=>{let l;try{const c=new AbortController;n>0&&(l=setTimeout(()=>{r?c.abort():i(t)},n)),o(await e({signal:(c==null?void 0:c.signal)||null}))}catch(c){(c==null?void 0:c.name)==="AbortError"&&i(t),i(c)}finally{clearTimeout(l)}})()})}function wN(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const z6=wN();function bN(e,t={}){const{url:n,headers:r}=xN(e);return{async request(o){var w,b,C;const{body:i,fetchFn:l=t.fetchFn??fetch,onRequest:c=t.onRequest,onResponse:u=t.onResponse,timeout:p=t.timeout??1e4}=o,f={...t.fetchOptions??{},...o.fetchOptions??{}},{headers:m,method:g,signal:v}=f;try{const j=await rh(async({signal:A})=>{const S={...f,body:Array.isArray(i)?At(i.map(R=>({jsonrpc:"2.0",id:R.id??z6.take(),...R}))):At({jsonrpc:"2.0",id:i.id??z6.take(),...i}),headers:{...r,"Content-Type":"application/json",...m},method:g||"POST",signal:v||(p>0?A:null)},N=new Request(n,S),T=await(c==null?void 0:c(N,S))??{...S,url:n};return await l(T.url??n,T)},{errorInstance:new A6({body:i,url:n}),timeout:p,signal:!0});u&&await u(j);let I;if((w=j.headers.get("Content-Type"))!=null&&w.startsWith("application/json"))I=await j.json();else{I=await j.text();try{I=JSON.parse(I||"{}")}catch(A){if(j.ok)throw A;I={error:I}}}if(!j.ok){if(typeof((b=I.error)==null?void 0:b.code)=="number"&&typeof((C=I.error)==null?void 0:C.message)=="string")return I;throw new hc({body:i,details:At(I.error)||j.statusText,headers:j.headers,status:j.status,url:n})}return I}catch(j){throw j instanceof hc||j instanceof A6?j:new hc({body:i,cause:j,url:n})}}}}function xN(e){try{const t=new URL(e),n=(()=>{if(t.username){const r=`${decodeURIComponent(t.username)}:${decodeURIComponent(t.password)}`;return t.username="",t.password="",{url:t.toString(),headers:{Authorization:`Basic ${btoa(r)}`}}}})();return{url:t.toString(),...n}}catch{return{url:e}}}const CN=`Ethereum Signed Message:
|
|
81
|
-
`;function kN(e){const t=typeof e=="string"?qa(e):typeof e.raw=="string"?e.raw:St(e.raw),n=qa(`${CN}${at(t)}`);return rn([n,t])}function K3(e,t){return Ut(kN(e),t)}class EN extends oe{constructor({domain:t}){super(`Invalid domain "${At(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class AN extends oe{constructor({primaryType:t,types:n}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(n))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class SN extends oe{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function jN(e){const{domain:t,message:n,primaryType:r,types:o}=e,i=(u,p)=>{const f={...p};for(const m of u){const{name:g,type:v}=m;v==="address"&&(f[g]=f[g].toLowerCase())}return f},l=o.EIP712Domain?t?i(o.EIP712Domain,t):{}:{},c=(()=>{if(r!=="EIP712Domain")return i(o[r],n)})();return At({domain:l,message:c,primaryType:r,types:o})}function Y3(e){const{domain:t,message:n,primaryType:r,types:o}=e,i=(l,c)=>{for(const u of l){const{name:p,type:f}=u,m=c[p],g=f.match(_5);if(g&&(typeof m=="number"||typeof m=="bigint")){const[b,C,j]=g;ge(m,{signed:C==="int",size:Number.parseInt(j,10)/8})}if(f==="address"&&typeof m=="string"&&!Vn(m))throw new xs({address:m});const v=f.match(O4);if(v){const[b,C]=v;if(C&&at(m)!==Number.parseInt(C,10))throw new Fj({expectedSize:Number.parseInt(C,10),givenSize:at(m)})}const w=o[f];w&&(IN(f),i(w,m))}};if(o.EIP712Domain&&t){if(typeof t!="object")throw new EN({domain:t});i(o.EIP712Domain,t)}if(r!=="EIP712Domain")if(o[r])i(o[r],n);else throw new AN({primaryType:r,types:o})}function J3({domain:e}){return[typeof(e==null?void 0:e.name)=="string"&&{name:"name",type:"string"},(e==null?void 0:e.version)&&{name:"version",type:"string"},(typeof(e==null?void 0:e.chainId)=="number"||typeof(e==null?void 0:e.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(e==null?void 0:e.verifyingContract)&&{name:"verifyingContract",type:"address"},(e==null?void 0:e.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function IN(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new SN({type:e})}function NN(e){const{domain:t={},message:n,primaryType:r}=e,o={EIP712Domain:J3({domain:t}),...e.types};Y3({domain:t,message:n,primaryType:r,types:o});const i=["0x1901"];return t&&i.push(PN({domain:t,types:o})),r!=="EIP712Domain"&&i.push(Z3({data:n,primaryType:r,types:o})),Ut(rn(i))}function PN({domain:e,types:t}){return Z3({data:e,primaryType:"EIP712Domain",types:t})}function Z3({data:e,primaryType:t,types:n}){const r=X3({data:e,primaryType:t,types:n});return Ut(r)}function X3({data:e,primaryType:t,types:n}){const r=[{type:"bytes32"}],o=[BN({primaryType:t,types:n})];for(const i of n[t]){const[l,c]=tC({types:n,name:i.name,type:i.type,value:e[i.name]});r.push(l),o.push(c)}return Ii(r,o)}function BN({primaryType:e,types:t}){const n=jo(TN({primaryType:e,types:t}));return Ut(n)}function TN({primaryType:e,types:t}){let n="";const r=eC({primaryType:e,types:t});r.delete(e);const o=[e,...Array.from(r).sort()];for(const i of o)n+=`${i}(${t[i].map(({name:l,type:c})=>`${c} ${l}`).join(",")})`;return n}function eC({primaryType:e,types:t},n=new Set){const r=e.match(/^\w*/u),o=r==null?void 0:r[0];if(n.has(o)||t[o]===void 0)return n;n.add(o);for(const i of t[o])eC({primaryType:i.type,types:t},n);return n}function tC({types:e,name:t,type:n,value:r}){if(e[n]!==void 0)return[{type:"bytes32"},Ut(X3({data:r,primaryType:n,types:e}))];if(n==="bytes")return[{type:"bytes32"},Ut(r)];if(n==="string")return[{type:"bytes32"},Ut(jo(r))];if(n.lastIndexOf("]")===n.length-1){const o=n.slice(0,n.lastIndexOf("[")),i=r.map(l=>tC({name:t,type:o,types:e,value:l}));return[{type:"bytes32"},Ut(Ii(i.map(([l])=>l),i.map(([,l])=>l)))]}return[{type:n},r]}class _N extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}}const RN={checksum:new _N(8192)},N0=RN.checksum;class nC extends ly{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,u4(t);const r=Uf(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,i=new Uint8Array(o);i.set(r.length>o?t.create().update(r).digest():r);for(let l=0;l<i.length;l++)i[l]^=54;this.iHash.update(i),this.oHash=t.create();for(let l=0;l<i.length;l++)i[l]^=106;this.oHash.update(i),ks(i)}update(t){return Ha(this),this.iHash.update(t),this}digestInto(t){Ha(this),Cs(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:o,destroyed:i,blockLen:l,outputLen:c}=this;return t=t,t.finished=o,t.destroyed=i,t.blockLen=l,t.outputLen=c,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const rC=(e,t,n)=>new nC(e,t).update(n).digest();rC.create=(e,t)=>new nC(e,t);function oC(e,t={}){const{as:n=typeof e=="string"?"Hex":"Bytes"}=t,r=I5(NI(e));return n==="Bytes"?r:Ir(r)}const ON=/^0x[a-fA-F0-9]{40}$/;function oh(e,t={}){const{strict:n=!0}=t;if(!ON.test(e))throw new W6({address:e,cause:new MN});if(n){if(e.toLowerCase()===e)return;if(sC(e)!==e)throw new W6({address:e,cause:new FN})}}function sC(e){if(N0.has(e))return N0.get(e);oh(e,{strict:!1});const t=e.substring(2).toLowerCase(),n=oC(BI(t),{as:"Bytes"}),r=t.split("");for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&r[i]&&(r[i]=r[i].toUpperCase()),(n[i>>1]&15)>=8&&r[i+1]&&(r[i+1]=r[i+1].toUpperCase());const o=`0x${r.join("")}`;return N0.set(e,o),o}function Zm(e,t={}){const{strict:n=!0}=t??{};try{return oh(e,{strict:n}),!0}catch{return!1}}class W6 extends De{constructor({address:t,cause:n}){super(`Address "${t}" is invalid.`,{cause:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class MN extends De{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class FN extends De{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}const LN=/^(.*)\[([0-9]*)\]$/,DN=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,iC=/^(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)?$/,q6=2n**256n-1n;function ka(e,t,n){const{checksumAddress:r,staticPosition:o}=n,i=Hy(t.type);if(i){const[l,c]=i;return $N(e,{...t,type:c},{checksumAddress:r,length:l,staticPosition:o})}if(t.type==="tuple")return HN(e,t,{checksumAddress:r,staticPosition:o});if(t.type==="address")return UN(e,{checksum:r});if(t.type==="bool")return zN(e);if(t.type.startsWith("bytes"))return WN(e,t,{staticPosition:o});if(t.type.startsWith("uint")||t.type.startsWith("int"))return qN(e,t);if(t.type==="string")return VN(e,{staticPosition:o});throw new Qy(t.type)}const H6=32,Xm=32;function UN(e,t={}){const{checksum:n=!1}=t,r=e.readBytes(32);return[(i=>n?sC(i):i)(Ir(_I(r,-20))),32]}function $N(e,t,n){const{checksumAddress:r,length:o,staticPosition:i}=n;if(!o){const u=Eo(e.readBytes(Xm)),p=i+u,f=p+H6;e.setPosition(p);const m=Eo(e.readBytes(H6)),g=Uc(t);let v=0;const w=[];for(let b=0;b<m;++b){e.setPosition(f+(g?b*32:v));const[C,j]=ka(e,t,{checksumAddress:r,staticPosition:f});v+=j,w.push(C)}return e.setPosition(i+32),[w,32]}if(Uc(t)){const u=Eo(e.readBytes(Xm)),p=i+u,f=[];for(let m=0;m<o;++m){e.setPosition(p+m*32);const[g]=ka(e,t,{checksumAddress:r,staticPosition:p});f.push(g)}return e.setPosition(i+32),[f,32]}let l=0;const c=[];for(let u=0;u<o;++u){const[p,f]=ka(e,t,{checksumAddress:r,staticPosition:i+l});l+=f,c.push(p)}return[c,l]}function zN(e){return[OI(e.readBytes(32),{size:32}),32]}function WN(e,t,{staticPosition:n}){const[r,o]=t.type.split("bytes");if(!o){const l=Eo(e.readBytes(32));e.setPosition(n+l);const c=Eo(e.readBytes(32));if(c===0)return e.setPosition(n+32),["0x",32];const u=e.readBytes(c);return e.setPosition(n+32),[Ir(u),32]}return[Ir(e.readBytes(Number.parseInt(o,10),32)),32]}function qN(e,t){const n=t.type.startsWith("int"),r=Number.parseInt(t.type.split("int")[1]||"256",10),o=e.readBytes(32);return[r>48?RI(o,{signed:n}):Eo(o,{signed:n}),32]}function HN(e,t,n){const{checksumAddress:r,staticPosition:o}=n,i=t.components.length===0||t.components.some(({name:u})=>!u),l=i?[]:{};let c=0;if(Uc(t)){const u=Eo(e.readBytes(Xm)),p=o+u;for(let f=0;f<t.components.length;++f){const m=t.components[f];e.setPosition(p+c);const[g,v]=ka(e,m,{checksumAddress:r,staticPosition:p});c+=v,l[i?f:m==null?void 0:m.name]=g}return e.setPosition(o+32),[l,32]}for(let u=0;u<t.components.length;++u){const p=t.components[u],[f,m]=ka(e,p,{checksumAddress:r,staticPosition:o});l[i?u:p==null?void 0:p.name]=f,c+=m}return[l,c]}function VN(e,{staticPosition:t}){const n=Eo(e.readBytes(32)),r=t+n;e.setPosition(r);const o=Eo(e.readBytes(32));if(o===0)return e.setPosition(t+32),["",32];const i=e.readBytes(o,32),l=MI(d3(i));return e.setPosition(t+32),[l,32]}function QN({checksumAddress:e,parameters:t,values:n}){const r=[];for(let o=0;o<t.length;o++)r.push(Wy({checksumAddress:e,parameter:t[o],value:n[o]}));return r}function Wy({checksumAddress:e=!1,parameter:t,value:n}){const r=t,o=Hy(r.type);if(o){const[i,l]=o;return KN(n,{checksumAddress:e,length:i,parameter:{...r,type:l}})}if(r.type==="tuple")return eP(n,{checksumAddress:e,parameter:r});if(r.type==="address")return GN(n,{checksum:e});if(r.type==="bool")return JN(n);if(r.type.startsWith("uint")||r.type.startsWith("int")){const i=r.type.startsWith("int"),[,,l="256"]=iC.exec(r.type)??[];return ZN(n,{signed:i,size:Number(l)})}if(r.type.startsWith("bytes"))return YN(n,{type:r.type});if(r.type==="string")return XN(n);throw new Qy(r.type)}function qy(e){let t=0;for(let i=0;i<e.length;i++){const{dynamic:l,encoded:c}=e[i];l?t+=32:t+=Qn(c)}const n=[],r=[];let o=0;for(let i=0;i<e.length;i++){const{dynamic:l,encoded:c}=e[i];l?(n.push(fn(t+o,{size:32})),r.push(c),o+=Qn(c)):n.push(c)}return jr(...n,...r)}function GN(e,t){const{checksum:n=!1}=t;return oh(e,{strict:n}),{dynamic:!1,encoded:bi(e.toLowerCase())}}function KN(e,t){const{checksumAddress:n,length:r,parameter:o}=t,i=r===null;if(!Array.isArray(e))throw new cP(e);if(!i&&e.length!==r)throw new lP({expectedLength:r,givenLength:e.length,type:`${o.type}[${r}]`});let l=!1;const c=[];for(let u=0;u<e.length;u++){const p=Wy({checksumAddress:n,parameter:o,value:e[u]});p.dynamic&&(l=!0),c.push(p)}if(i||l){const u=qy(c);if(i){const p=fn(c.length,{size:32});return{dynamic:!0,encoded:c.length>0?jr(p,u):p}}if(l)return{dynamic:!0,encoded:u}}return{dynamic:!1,encoded:jr(...c.map(({encoded:u})=>u))}}function YN(e,{type:t}){const[,n]=t.split("bytes"),r=Qn(e);if(!n){let o=e;return r%32!==0&&(o=xi(o,Math.ceil((e.length-2)/2/32)*32)),{dynamic:!0,encoded:jr(bi(fn(r,{size:32})),o)}}if(r!==Number.parseInt(n,10))throw new lC({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:xi(e)}}function JN(e){if(typeof e!="boolean")throw new De(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:bi(f3(e))}}function ZN(e,{signed:t,size:n}){if(typeof n=="number"){const r=2n**(BigInt(n)-(t?1n:0n))-1n,o=t?-r-1n:0n;if(e>r||e<o)throw new m3({max:r.toString(),min:o.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:fn(e,{size:32,signed:t})}}function XN(e){const t=Ey(e),n=Math.ceil(Qn(t)/32),r=[];for(let o=0;o<n;o++)r.push(xi(Hr(t,o*32,(o+1)*32)));return{dynamic:!0,encoded:jr(xi(fn(Qn(t),{size:32})),...r)}}function eP(e,t){const{checksumAddress:n,parameter:r}=t;let o=!1;const i=[];for(let l=0;l<r.components.length;l++){const c=r.components[l],u=Array.isArray(e)?l:c.name,p=Wy({checksumAddress:n,parameter:c,value:e[u]});i.push(p),p.dynamic&&(o=!0)}return{dynamic:o,encoded:o?qy(i):jr(...i.map(({encoded:l})=>l))}}function Hy(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function Uc(e){var r;const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return(r=e.components)==null?void 0:r.some(Uc);const n=Hy(e.type);return!!(n&&Uc({...e,type:n[1]}))}const tP={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new oP({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new rP({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new V6({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new V6({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function nP(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(tP);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}class V6 extends De{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}class rP extends De{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}class oP extends De{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}function sP(e,t,n={}){const{as:r="Array",checksumAddress:o=!1}=n,i=typeof t=="string"?u3(t):t,l=nP(i);if(ya(i)===0&&e.length>0)throw new aP;if(ya(i)&&ya(i)<32)throw new iP({data:typeof t=="string"?t:Ir(t),parameters:e,size:ya(i)});let c=0;const u=r==="Array"?[]:{};for(let p=0;p<e.length;++p){const f=e[p];l.setPosition(c);const[m,g]=ka(l,f,{checksumAddress:o,staticPosition:0});c+=g,r==="Array"?u.push(m):u[f.name??p]=m}return u}function Vy(e,t,n){const{checksumAddress:r=!1}={};if(e.length!==t.length)throw new cC({expectedLength:e.length,givenLength:t.length});const o=QN({checksumAddress:r,parameters:e,values:t}),i=qy(o);return i.length===0?"0x":i}function eg(e,t){if(e.length!==t.length)throw new cC({expectedLength:e.length,givenLength:t.length});const n=[];for(let r=0;r<e.length;r++){const o=e[r],i=t[r];n.push(eg.encode(o,i))}return jr(...n)}(function(e){function t(n,r,o=!1){if(n==="address"){const u=r;return oh(u),bi(u.toLowerCase(),o?32:0)}if(n==="string")return Ey(r);if(n==="bytes")return r;if(n==="bool")return bi(f3(r),o?32:1);const i=n.match(iC);if(i){const[u,p,f="256"]=i,m=Number.parseInt(f,10)/8;return fn(r,{size:o?32:m,signed:p==="int"})}const l=n.match(DN);if(l){const[u,p]=l;if(Number.parseInt(p,10)!==(r.length-2)/2)throw new lC({expectedSize:Number.parseInt(p,10),value:r});return xi(r,o?32:0)}const c=n.match(LN);if(c&&Array.isArray(r)){const[u,p]=c,f=[];for(let m=0;m<r.length;m++)f.push(t(p,r[m],!0));return f.length===0?"0x":jr(...f)}throw new Qy(n)}e.encode=t})(eg||(eg={}));function aC(e){return Array.isArray(e)&&typeof e[0]=="string"||typeof e=="string"?x6(e):e}class iP extends De{constructor({data:t,parameters:n,size:r}){super(`Data size of ${r} bytes is too small for given parameters.`,{metaMessages:[`Params: (${ma(n)})`,`Data: ${t} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}class aP extends De{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}class lP extends De{constructor({expectedLength:t,givenLength:n,type:r}){super(`Array length mismatch for type \`${r}\`. Expected: \`${t}\`. Given: \`${n}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}class lC extends De{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${Qn(n)}) does not match expected size (bytes${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class cC extends De{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${t}`,`Given length (values): ${n}`].join(`
|
|
82
|
-
`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}class cP extends De{constructor(t){super(`Value \`${t}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}class Qy extends De{constructor(t){super(`Type \`${t}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const In=BigInt(0),hn=BigInt(1),Xs=BigInt(2),uP=BigInt(3),uC=BigInt(4),dC=BigInt(5),fC=BigInt(8);function jn(e,t){const n=e%t;return n>=In?n:t+n}function tr(e,t,n){let r=e;for(;t-- >In;)r*=r,r%=n;return r}function tg(e,t){if(e===In)throw new Error("invert: expected non-zero number");if(t<=In)throw new Error("invert: expected positive modulus, got "+t);let n=jn(e,t),r=t,o=In,i=hn;for(;n!==In;){const c=r/n,u=r%n,p=o-i*c;r=n,n=u,o=i,i=p}if(r!==hn)throw new Error("invert: does not exist");return jn(o,t)}function hC(e,t){const n=(e.ORDER+hn)/uC,r=e.pow(t,n);if(!e.eql(e.sqr(r),t))throw new Error("Cannot find square root");return r}function dP(e,t){const n=(e.ORDER-dC)/fC,r=e.mul(t,Xs),o=e.pow(r,n),i=e.mul(t,o),l=e.mul(e.mul(i,Xs),o),c=e.mul(i,e.sub(l,e.ONE));if(!e.eql(e.sqr(c),t))throw new Error("Cannot find square root");return c}function fP(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-hn,n=0;for(;t%Xs===In;)t/=Xs,n++;let r=Xs;const o=Gy(e);for(;Q6(o,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return hC;let i=o.pow(r,t);const l=(t+hn)/Xs;return function(u,p){if(u.is0(p))return p;if(Q6(u,p)!==1)throw new Error("Cannot find square root");let f=n,m=u.mul(u.ONE,i),g=u.pow(p,t),v=u.pow(p,l);for(;!u.eql(g,u.ONE);){if(u.is0(g))return u.ZERO;let w=1,b=u.sqr(g);for(;!u.eql(b,u.ONE);)if(w++,b=u.sqr(b),w===f)throw new Error("Cannot find square root");const C=hn<<BigInt(f-w-1),j=u.pow(m,C);f=w,m=u.sqr(j),g=u.mul(g,m),v=u.mul(v,j)}return v}}function hP(e){return e%uC===uP?hC:e%fC===dC?dP:fP(e)}const pP=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function mP(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=pP.reduce((r,o)=>(r[o]="function",r),t);return Gf(e,n)}function gP(e,t,n){if(n<In)throw new Error("invalid exponent, negatives unsupported");if(n===In)return e.ONE;if(n===hn)return t;let r=e.ONE,o=t;for(;n>In;)n&hn&&(r=e.mul(r,o)),o=e.sqr(o),n>>=hn;return r}function pC(e,t,n=!1){const r=new Array(t.length).fill(n?e.ZERO:void 0),o=t.reduce((l,c,u)=>e.is0(c)?l:(r[u]=l,e.mul(l,c)),e.ONE),i=e.inv(o);return t.reduceRight((l,c,u)=>e.is0(c)?l:(r[u]=e.mul(l,r[u]),e.mul(l,c)),i),r}function Q6(e,t){const n=(e.ORDER-hn)/Xs,r=e.pow(t,n),o=e.eql(r,e.ONE),i=e.eql(r,e.ZERO),l=e.eql(r,e.neg(e.ONE));if(!o&&!i&&!l)throw new Error("invalid Legendre symbol result");return o?1:i?0:-1}function mC(e,t){t!==void 0&&wc(t);const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function Gy(e,t,n=!1,r={}){if(e<=In)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:o,nByteLength:i}=mC(e,t);if(i>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let l;const c=Object.freeze({ORDER:e,isLE:n,BITS:o,BYTES:i,MASK:Qf(o),ZERO:In,ONE:hn,create:u=>jn(u,e),isValid:u=>{if(typeof u!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof u);return In<=u&&u<e},is0:u=>u===In,isOdd:u=>(u&hn)===hn,neg:u=>jn(-u,e),eql:(u,p)=>u===p,sqr:u=>jn(u*u,e),add:(u,p)=>jn(u+p,e),sub:(u,p)=>jn(u-p,e),mul:(u,p)=>jn(u*p,e),pow:(u,p)=>gP(c,u,p),div:(u,p)=>jn(u*tg(p,e),e),sqrN:u=>u*u,addN:(u,p)=>u+p,subN:(u,p)=>u-p,mulN:(u,p)=>u*p,inv:u=>tg(u,e),sqrt:r.sqrt||(u=>(l||(l=hP(e)),l(c,u))),toBytes:u=>n?s3(u,i):gu(u,i),fromBytes:u=>{if(u.length!==i)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+u.length);return n?o3(u):hi(u)},invertBatch:u=>pC(c,u),cmov:(u,p,f)=>f?p:u});return Object.freeze(c)}function gC(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function yC(e){const t=gC(e);return t+Math.ceil(t/2)}function yP(e,t,n=!1){const r=e.length,o=gC(t),i=yC(t);if(r<16||r<i||r>1024)throw new Error("expected "+i+"-1024 bytes of input, got "+r);const l=n?o3(e):hi(e),c=jn(l,t-hn)+hn;return n?s3(c,o):gu(c,o)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const G6=BigInt(0),ng=BigInt(1);function P0(e,t){const n=t.negate();return e?n:t}function vC(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function B0(e,t){vC(e,t);const n=Math.ceil(t/e)+1,r=2**(e-1),o=2**e,i=Qf(e),l=BigInt(e);return{windows:n,windowSize:r,mask:i,maxNumber:o,shiftBy:l}}function K6(e,t,n){const{windowSize:r,mask:o,maxNumber:i,shiftBy:l}=n;let c=Number(e&o),u=e>>l;c>r&&(c-=i,u+=ng);const p=t*r,f=p+Math.abs(c)-1,m=c===0,g=c<0,v=t%2!==0;return{nextN:u,offset:f,isZero:m,isNeg:g,isNegF:v,offsetF:p}}function vP(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((n,r)=>{if(!(n instanceof t))throw new Error("invalid point at index "+r)})}function wP(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((n,r)=>{if(!t.isValid(n))throw new Error("invalid scalar at index "+r)})}const T0=new WeakMap,wC=new WeakMap;function _0(e){return wC.get(e)||1}function bP(e,t){return{constTimeNegate:P0,hasPrecomputes(n){return _0(n)!==1},unsafeLadder(n,r,o=e.ZERO){let i=n;for(;r>G6;)r&ng&&(o=o.add(i)),i=i.double(),r>>=ng;return o},precomputeWindow(n,r){const{windows:o,windowSize:i}=B0(r,t),l=[];let c=n,u=c;for(let p=0;p<o;p++){u=c,l.push(u);for(let f=1;f<i;f++)u=u.add(c),l.push(u);c=u.double()}return l},wNAF(n,r,o){let i=e.ZERO,l=e.BASE;const c=B0(n,t);for(let u=0;u<c.windows;u++){const{nextN:p,offset:f,isZero:m,isNeg:g,isNegF:v,offsetF:w}=K6(o,u,c);o=p,m?l=l.add(P0(v,r[w])):i=i.add(P0(g,r[f]))}return{p:i,f:l}},wNAFUnsafe(n,r,o,i=e.ZERO){const l=B0(n,t);for(let c=0;c<l.windows&&o!==G6;c++){const{nextN:u,offset:p,isZero:f,isNeg:m}=K6(o,c,l);if(o=u,!f){const g=r[p];i=i.add(m?g.negate():g)}}return i},getPrecomputes(n,r,o){let i=T0.get(r);return i||(i=this.precomputeWindow(r,n),n!==1&&T0.set(r,o(i))),i},wNAFCached(n,r,o){const i=_0(n);return this.wNAF(i,this.getPrecomputes(i,n,o),r)},wNAFCachedUnsafe(n,r,o,i){const l=_0(n);return l===1?this.unsafeLadder(n,r,i):this.wNAFUnsafe(l,this.getPrecomputes(l,n,o),r,i)},setWindowSize(n,r){vC(r,t),wC.set(n,r),T0.delete(n)}}}function xP(e,t,n,r){vP(n,e),wP(r,t);const o=n.length,i=r.length;if(o!==i)throw new Error("arrays of points and scalars must have equal length");const l=e.ZERO,c=vI(BigInt(o));let u=1;c>12?u=c-3:c>4?u=c-2:c>0&&(u=2);const p=Qf(u),f=new Array(Number(p)+1).fill(l),m=Math.floor((t.BITS-1)/u)*u;let g=l;for(let v=m;v>=0;v-=u){f.fill(l);for(let b=0;b<i;b++){const C=r[b],j=Number(C>>BigInt(v)&p);f[j]=f[j].add(n[b])}let w=l;for(let b=f.length-1,C=l;b>0;b--)C=C.add(f[b]),w=w.add(C);if(g=g.add(w),v!==0)for(let b=0;b<u;b++)g=g.double()}return g}function bC(e){return mP(e.Fp),Gf(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...mC(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Y6(e){e.lowS!==void 0&&Lc("lowS",e.lowS),e.prehash!==void 0&&Lc("prehash",e.prehash)}function CP(e){const t=bC(e);Gf(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:n,Fp:r,a:o}=t;if(n){if(!r.eql(o,r.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}class kP extends Error{constructor(t=""){super(t)}}const go={Err:kP,_tlv:{encode:(e,t)=>{const{Err:n}=go;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length&1)throw new n("tlv.encode: unpadded data");const r=t.length/2,o=Wd(r);if(o.length/2&128)throw new n("tlv.encode: long form length too big");const i=r>127?Wd(o.length/2|128):"";return Wd(e)+i+o+t},decode(e,t){const{Err:n}=go;let r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");const o=t[r++],i=!!(o&128);let l=0;if(!i)l=o;else{const u=o&127;if(!u)throw new n("tlv.decode(long): indefinite length not supported");if(u>4)throw new n("tlv.decode(long): byte length is too big");const p=t.subarray(r,r+u);if(p.length!==u)throw new n("tlv.decode: length bytes not complete");if(p[0]===0)throw new n("tlv.decode(long): zero leftmost byte");for(const f of p)l=l<<8|f;if(r+=u,l<128)throw new n("tlv.decode(long): not minimal encoding")}const c=t.subarray(r,r+l);if(c.length!==l)throw new n("tlv.decode: wrong value length");return{v:c,l:t.subarray(r+l)}}},_int:{encode(e){const{Err:t}=go;if(e<xo)throw new t("integer: negative integers are not allowed");let n=Wd(e);if(Number.parseInt(n[0],16)&8&&(n="00"+n),n.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return n},decode(e){const{Err:t}=go;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return hi(e)}},toSig(e){const{Err:t,_int:n,_tlv:r}=go,o=nr("signature",e),{v:i,l}=r.decode(48,o);if(l.length)throw new t("invalid signature: left bytes after parsing");const{v:c,l:u}=r.decode(2,i),{v:p,l:f}=r.decode(2,u);if(f.length)throw new t("invalid signature: left bytes after parsing");return{r:n.decode(c),s:n.decode(p)}},hexFromSig(e){const{_tlv:t,_int:n}=go,r=t.encode(2,n.encode(e.r)),o=t.encode(2,n.encode(e.s)),i=r+o;return t.encode(48,i)}};function R0(e,t){return Dc(gu(e,t))}const xo=BigInt(0),_t=BigInt(1);BigInt(2);const O0=BigInt(3),EP=BigInt(4);function AP(e){const t=CP(e),{Fp:n}=t,r=Gy(t.n,t.nBitLength),o=t.toBytes||((A,S,N)=>{const T=S.toAffine();return vf(Uint8Array.from([4]),n.toBytes(T.x),n.toBytes(T.y))}),i=t.fromBytes||(A=>{const S=A.subarray(1),N=n.fromBytes(S.subarray(0,n.BYTES)),T=n.fromBytes(S.subarray(n.BYTES,2*n.BYTES));return{x:N,y:T}});function l(A){const{a:S,b:N}=t,T=n.sqr(A),B=n.mul(T,A);return n.add(n.add(B,n.mul(A,S)),N)}function c(A,S){const N=n.sqr(S),T=l(A);return n.eql(N,T)}if(!c(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const u=n.mul(n.pow(t.a,O0),EP),p=n.mul(n.sqr(t.b),BigInt(27));if(n.is0(n.add(u,p)))throw new Error("bad curve params: a or b");function f(A){return ky(A,_t,t.n)}function m(A){const{allowedPrivateKeyLengths:S,nByteLength:N,wrapPrivateKey:T,n:B}=t;if(S&&typeof A!="bigint"){if(mu(A)&&(A=Dc(A)),typeof A!="string"||!S.includes(A.length))throw new Error("invalid private key");A=A.padStart(N*2,"0")}let R;try{R=typeof A=="bigint"?A:hi(nr("private key",A,N))}catch{throw new Error("invalid private key, expected hex or "+N+" bytes, got "+typeof A)}return T&&(R=jn(R,B)),Ca("private key",R,_t,B),R}function g(A){if(!(A instanceof b))throw new Error("ProjectivePoint expected")}const v=N6((A,S)=>{const{px:N,py:T,pz:B}=A;if(n.eql(B,n.ONE))return{x:N,y:T};const R=A.is0();S==null&&(S=R?n.ONE:n.inv(B));const M=n.mul(N,S),H=n.mul(T,S),V=n.mul(B,S);if(R)return{x:n.ZERO,y:n.ZERO};if(!n.eql(V,n.ONE))throw new Error("invZ was invalid");return{x:M,y:H}}),w=N6(A=>{if(A.is0()){if(t.allowInfinityPoint&&!n.is0(A.py))return;throw new Error("bad point: ZERO")}const{x:S,y:N}=A.toAffine();if(!n.isValid(S)||!n.isValid(N))throw new Error("bad point: x or y not FE");if(!c(S,N))throw new Error("bad point: equation left != right");if(!A.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class b{constructor(S,N,T){if(S==null||!n.isValid(S))throw new Error("x required");if(N==null||!n.isValid(N)||n.is0(N))throw new Error("y required");if(T==null||!n.isValid(T))throw new Error("z required");this.px=S,this.py=N,this.pz=T,Object.freeze(this)}static fromAffine(S){const{x:N,y:T}=S||{};if(!S||!n.isValid(N)||!n.isValid(T))throw new Error("invalid affine point");if(S instanceof b)throw new Error("projective point not allowed");const B=R=>n.eql(R,n.ZERO);return B(N)&&B(T)?b.ZERO:new b(N,T,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(S){const N=pC(n,S.map(T=>T.pz));return S.map((T,B)=>T.toAffine(N[B])).map(b.fromAffine)}static fromHex(S){const N=b.fromAffine(i(nr("pointHex",S)));return N.assertValidity(),N}static fromPrivateKey(S){return b.BASE.multiply(m(S))}static msm(S,N){return xP(b,r,S,N)}_setWindowSize(S){I.setWindowSize(this,S)}assertValidity(){w(this)}hasEvenY(){const{y:S}=this.toAffine();if(n.isOdd)return!n.isOdd(S);throw new Error("Field doesn't support isOdd")}equals(S){g(S);const{px:N,py:T,pz:B}=this,{px:R,py:M,pz:H}=S,V=n.eql(n.mul(N,H),n.mul(R,B)),W=n.eql(n.mul(T,H),n.mul(M,B));return V&&W}negate(){return new b(this.px,n.neg(this.py),this.pz)}double(){const{a:S,b:N}=t,T=n.mul(N,O0),{px:B,py:R,pz:M}=this;let H=n.ZERO,V=n.ZERO,W=n.ZERO,L=n.mul(B,B),J=n.mul(R,R),O=n.mul(M,M),G=n.mul(B,R);return G=n.add(G,G),W=n.mul(B,M),W=n.add(W,W),H=n.mul(S,W),V=n.mul(T,O),V=n.add(H,V),H=n.sub(J,V),V=n.add(J,V),V=n.mul(H,V),H=n.mul(G,H),W=n.mul(T,W),O=n.mul(S,O),G=n.sub(L,O),G=n.mul(S,G),G=n.add(G,W),W=n.add(L,L),L=n.add(W,L),L=n.add(L,O),L=n.mul(L,G),V=n.add(V,L),O=n.mul(R,M),O=n.add(O,O),L=n.mul(O,G),H=n.sub(H,L),W=n.mul(O,J),W=n.add(W,W),W=n.add(W,W),new b(H,V,W)}add(S){g(S);const{px:N,py:T,pz:B}=this,{px:R,py:M,pz:H}=S;let V=n.ZERO,W=n.ZERO,L=n.ZERO;const J=t.a,O=n.mul(t.b,O0);let G=n.mul(N,R),ee=n.mul(T,M),F=n.mul(B,H),K=n.add(N,T),Y=n.add(R,M);K=n.mul(K,Y),Y=n.add(G,ee),K=n.sub(K,Y),Y=n.add(N,B);let U=n.add(R,H);return Y=n.mul(Y,U),U=n.add(G,F),Y=n.sub(Y,U),U=n.add(T,B),V=n.add(M,H),U=n.mul(U,V),V=n.add(ee,F),U=n.sub(U,V),L=n.mul(J,Y),V=n.mul(O,F),L=n.add(V,L),V=n.sub(ee,L),L=n.add(ee,L),W=n.mul(V,L),ee=n.add(G,G),ee=n.add(ee,G),F=n.mul(J,F),Y=n.mul(O,Y),ee=n.add(ee,F),F=n.sub(G,F),F=n.mul(J,F),Y=n.add(Y,F),G=n.mul(ee,Y),W=n.add(W,G),G=n.mul(U,Y),V=n.mul(K,V),V=n.sub(V,G),G=n.mul(K,ee),L=n.mul(U,L),L=n.add(L,G),new b(V,W,L)}subtract(S){return this.add(S.negate())}is0(){return this.equals(b.ZERO)}wNAF(S){return I.wNAFCached(this,S,b.normalizeZ)}multiplyUnsafe(S){const{endo:N,n:T}=t;Ca("scalar",S,xo,T);const B=b.ZERO;if(S===xo)return B;if(this.is0()||S===_t)return this;if(!N||I.hasPrecomputes(this))return I.wNAFCachedUnsafe(this,S,b.normalizeZ);let{k1neg:R,k1:M,k2neg:H,k2:V}=N.splitScalar(S),W=B,L=B,J=this;for(;M>xo||V>xo;)M&_t&&(W=W.add(J)),V&_t&&(L=L.add(J)),J=J.double(),M>>=_t,V>>=_t;return R&&(W=W.negate()),H&&(L=L.negate()),L=new b(n.mul(L.px,N.beta),L.py,L.pz),W.add(L)}multiply(S){const{endo:N,n:T}=t;Ca("scalar",S,_t,T);let B,R;if(N){const{k1neg:M,k1:H,k2neg:V,k2:W}=N.splitScalar(S);let{p:L,f:J}=this.wNAF(H),{p:O,f:G}=this.wNAF(W);L=I.constTimeNegate(M,L),O=I.constTimeNegate(V,O),O=new b(n.mul(O.px,N.beta),O.py,O.pz),B=L.add(O),R=J.add(G)}else{const{p:M,f:H}=this.wNAF(S);B=M,R=H}return b.normalizeZ([B,R])[0]}multiplyAndAddUnsafe(S,N,T){const B=b.BASE,R=(H,V)=>V===xo||V===_t||!H.equals(B)?H.multiplyUnsafe(V):H.multiply(V),M=R(this,N).add(R(S,T));return M.is0()?void 0:M}toAffine(S){return v(this,S)}isTorsionFree(){const{h:S,isTorsionFree:N}=t;if(S===_t)return!0;if(N)return N(b,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:S,clearCofactor:N}=t;return S===_t?this:N?N(b,this):this.multiplyUnsafe(t.h)}toRawBytes(S=!0){return Lc("isCompressed",S),this.assertValidity(),o(b,this,S)}toHex(S=!0){return Lc("isCompressed",S),Dc(this.toRawBytes(S))}}b.BASE=new b(t.Gx,t.Gy,n.ONE),b.ZERO=new b(n.ZERO,n.ONE,n.ZERO);const{endo:C,nBitLength:j}=t,I=bP(b,C?Math.ceil(j/2):j);return{CURVE:t,ProjectivePoint:b,normPrivateKeyToScalar:m,weierstrassEquation:l,isWithinCurveOrder:f}}function SP(e){const t=bC(e);return Gf(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function jP(e){const t=SP(e),{Fp:n,n:r,nByteLength:o,nBitLength:i}=t,l=n.BYTES+1,c=2*n.BYTES+1;function u(O){return jn(O,r)}function p(O){return tg(O,r)}const{ProjectivePoint:f,normPrivateKeyToScalar:m,weierstrassEquation:g,isWithinCurveOrder:v}=AP({...t,toBytes(O,G,ee){const F=G.toAffine(),K=n.toBytes(F.x),Y=vf;return Lc("isCompressed",ee),ee?Y(Uint8Array.from([G.hasEvenY()?2:3]),K):Y(Uint8Array.from([4]),K,n.toBytes(F.y))},fromBytes(O){const G=O.length,ee=O[0],F=O.subarray(1);if(G===l&&(ee===2||ee===3)){const K=hi(F);if(!ky(K,_t,n.ORDER))throw new Error("Point is not on curve");const Y=g(K);let U;try{U=n.sqrt(Y)}catch(se){const ie=se instanceof Error?": "+se.message:"";throw new Error("Point is not on curve"+ie)}const X=(U&_t)===_t;return(ee&1)===1!==X&&(U=n.neg(U)),{x:K,y:U}}else if(G===c&&ee===4){const K=n.fromBytes(F.subarray(0,n.BYTES)),Y=n.fromBytes(F.subarray(n.BYTES,2*n.BYTES));return{x:K,y:Y}}else{const K=l,Y=c;throw new Error("invalid Point, expected length of "+K+", or uncompressed "+Y+", got "+G)}}});function w(O){const G=r>>_t;return O>G}function b(O){return w(O)?u(-O):O}const C=(O,G,ee)=>hi(O.slice(G,ee));class j{constructor(G,ee,F){Ca("r",G,_t,r),Ca("s",ee,_t,r),this.r=G,this.s=ee,F!=null&&(this.recovery=F),Object.freeze(this)}static fromCompact(G){const ee=o;return G=nr("compactSignature",G,ee*2),new j(C(G,0,ee),C(G,ee,2*ee))}static fromDER(G){const{r:ee,s:F}=go.toSig(nr("DER",G));return new j(ee,F)}assertValidity(){}addRecoveryBit(G){return new j(this.r,this.s,G)}recoverPublicKey(G){const{r:ee,s:F,recovery:K}=this,Y=B(nr("msgHash",G));if(K==null||![0,1,2,3].includes(K))throw new Error("recovery id invalid");const U=K===2||K===3?ee+t.n:ee;if(U>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const X=(K&1)===0?"02":"03",he=f.fromHex(X+R0(U,n.BYTES)),se=p(U),ie=u(-Y*se),re=u(F*se),ue=f.BASE.multiplyAndAddUnsafe(he,ie,re);if(!ue)throw new Error("point at infinify");return ue.assertValidity(),ue}hasHighS(){return w(this.s)}normalizeS(){return this.hasHighS()?new j(this.r,u(-this.s),this.recovery):this}toDERRawBytes(){return yf(this.toDERHex())}toDERHex(){return go.hexFromSig(this)}toCompactRawBytes(){return yf(this.toCompactHex())}toCompactHex(){const G=o;return R0(this.r,G)+R0(this.s,G)}}const I={isValidPrivateKey(O){try{return m(O),!0}catch{return!1}},normPrivateKeyToScalar:m,randomPrivateKey:()=>{const O=yC(t.n);return yP(t.randomBytes(O),t.n)},precompute(O=8,G=f.BASE){return G._setWindowSize(O),G.multiply(BigInt(3)),G}};function A(O,G=!0){return f.fromPrivateKey(O).toRawBytes(G)}function S(O){if(typeof O=="bigint")return!1;if(O instanceof f)return!0;const ee=nr("key",O).length,F=n.BYTES,K=F+1,Y=2*F+1;if(!(t.allowedPrivateKeyLengths||o===K))return ee===K||ee===Y}function N(O,G,ee=!0){if(S(O)===!0)throw new Error("first arg must be private key");if(S(G)===!1)throw new Error("second arg must be public key");return f.fromHex(G).multiply(m(O)).toRawBytes(ee)}const T=t.bits2int||function(O){if(O.length>8192)throw new Error("input is too large");const G=hi(O),ee=O.length*8-i;return ee>0?G>>BigInt(ee):G},B=t.bits2int_modN||function(O){return u(T(O))},R=Qf(i);function M(O){return Ca("num < 2^"+i,O,xo,R),gu(O,o)}function H(O,G,ee=V){if(["recovered","canonical"].some(Pe=>Pe in ee))throw new Error("sign() legacy options not supported");const{hash:F,randomBytes:K}=t;let{lowS:Y,prehash:U,extraEntropy:X}=ee;Y==null&&(Y=!0),O=nr("msgHash",O),Y6(ee),U&&(O=nr("prehashed msgHash",F(O)));const he=B(O),se=m(G),ie=[M(se),M(he)];if(X!=null&&X!==!1){const Pe=X===!0?K(n.BYTES):X;ie.push(nr("extraEntropy",Pe))}const re=vf(...ie),ue=he;function Se(Pe){const Me=T(Pe);if(!v(Me))return;const mt=p(Me),It=f.BASE.multiply(Me).toAffine(),gt=u(It.x);if(gt===xo)return;const Wt=u(mt*u(ue+gt*se));if(Wt===xo)return;let on=(It.x===gt?0:2)|Number(It.y&_t),rt=Wt;return Y&&w(Wt)&&(rt=b(Wt),on^=1),new j(gt,rt,on)}return{seed:re,k2sig:Se}}const V={lowS:t.lowS,prehash:!1},W={lowS:t.lowS,prehash:!1};function L(O,G,ee=V){const{seed:F,k2sig:K}=H(O,G,ee),Y=t;return wI(Y.hash.outputLen,Y.nByteLength,Y.hmac)(F,K)}f.BASE._setWindowSize(8);function J(O,G,ee,F=W){var on;const K=O;G=nr("msgHash",G),ee=nr("publicKey",ee);const{lowS:Y,prehash:U,format:X}=F;if(Y6(F),"strict"in F)throw new Error("options.strict was renamed to lowS");if(X!==void 0&&X!=="compact"&&X!=="der")throw new Error("format must be compact or der");const he=typeof K=="string"||mu(K),se=!he&&!X&&typeof K=="object"&&K!==null&&typeof K.r=="bigint"&&typeof K.s=="bigint";if(!he&&!se)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let ie,re;try{if(se&&(ie=new j(K.r,K.s)),he){try{X!=="compact"&&(ie=j.fromDER(K))}catch(rt){if(!(rt instanceof go.Err))throw rt}!ie&&X!=="der"&&(ie=j.fromCompact(K))}re=f.fromHex(ee)}catch{return!1}if(!ie||Y&&ie.hasHighS())return!1;U&&(G=t.hash(G));const{r:ue,s:Se}=ie,Pe=B(G),Me=p(Se),mt=u(Pe*Me),It=u(ue*Me),gt=(on=f.BASE.multiplyAndAddUnsafe(re,mt,It))==null?void 0:on.toAffine();return gt?u(gt.x)===ue:!1}return{CURVE:t,getPublicKey:A,getSharedSecret:N,sign:L,verify:J,ProjectivePoint:f,Signature:j,utils:I}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function IP(e){return{hash:e,hmac:(t,...n)=>rC(e,t,y4(...n)),randomBytes:v4}}function NP(e,t){const n=r=>jP({...e,...IP(r)});return{...n(t),create:n}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const xC=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),J6=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),PP=BigInt(0),BP=BigInt(1),rg=BigInt(2),Z6=(e,t)=>(e+t/rg)/t;function TP(e){const t=xC,n=BigInt(3),r=BigInt(6),o=BigInt(11),i=BigInt(22),l=BigInt(23),c=BigInt(44),u=BigInt(88),p=e*e*e%t,f=p*p*e%t,m=tr(f,n,t)*f%t,g=tr(m,n,t)*f%t,v=tr(g,rg,t)*p%t,w=tr(v,o,t)*v%t,b=tr(w,i,t)*w%t,C=tr(b,c,t)*b%t,j=tr(C,u,t)*C%t,I=tr(j,c,t)*b%t,A=tr(I,n,t)*f%t,S=tr(A,l,t)*w%t,N=tr(S,r,t)*p%t,T=tr(N,rg,t);if(!og.eql(og.sqr(T),e))throw new Error("Cannot find square root");return T}const og=Gy(xC,void 0,void 0,{sqrt:TP}),CC=NP({a:PP,b:BigInt(7),Fp:og,n:J6,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=J6,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-BP*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=n,l=BigInt("0x100000000000000000000000000000000"),c=Z6(i*e,t),u=Z6(-r*e,t);let p=jn(e-c*n-u*o,t),f=jn(-c*r-u*i,t);const m=p>l,g=f>l;if(m&&(p=t-p),g&&(f=t-f),p>l||f>l)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:m,k1:p,k2neg:g,k2:f}}}},z3),_P=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:CC},Symbol.toStringTag,{value:"Module"}));function kC(e,t={}){const{recovered:n}=t;if(typeof e.r>"u")throw new M0({signature:e});if(typeof e.s>"u")throw new M0({signature:e});if(n&&typeof e.yParity>"u")throw new M0({signature:e});if(e.r<0n||e.r>q6)throw new UP({value:e.r});if(e.s<0n||e.s>q6)throw new $P({value:e.s});if(typeof e.yParity=="number"&&e.yParity!==0&&e.yParity!==1)throw new Yy({value:e.yParity})}function RP(e){return EC(Ir(e))}function EC(e){if(e.length!==130&&e.length!==132)throw new DP({signature:e});const t=BigInt(Hr(e,0,32)),n=BigInt(Hr(e,32,64)),r=(()=>{const o=+`0x${e.slice(130)}`;if(!Number.isNaN(o))try{return Ky(o)}catch{throw new Yy({value:o})}})();return typeof r>"u"?{r:t,s:n}:{r:t,s:n,yParity:r}}function OP(e){if(!(typeof e.r>"u")&&!(typeof e.s>"u"))return MP(e)}function MP(e){const t=typeof e=="string"?EC(e):e instanceof Uint8Array?RP(e):typeof e.r=="string"?LP(e):e.v?FP(e):{r:e.r,s:e.s,...typeof e.yParity<"u"?{yParity:e.yParity}:{}};return kC(t),t}function FP(e){return{r:e.r,s:e.s,yParity:Ky(e.v)}}function LP(e){const t=(()=>{const n=e.v?Number(e.v):void 0;let r=e.yParity?Number(e.yParity):void 0;if(typeof n=="number"&&typeof r!="number"&&(r=Ky(n)),typeof r!="number")throw new Yy({value:e.yParity});return r})();return{r:BigInt(e.r),s:BigInt(e.s),yParity:t}}function Ky(e){if(e===0||e===27)return 0;if(e===1||e===28)return 1;if(e>=35)return e%2===0?1:0;throw new zP({value:e})}class DP extends De{constructor({signature:t}){super(`Value \`${t}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${Qn(qI(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class M0 extends De{constructor({signature:t}){super(`Signature \`${c3(t)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class UP extends De{constructor({value:t}){super(`Value \`${t}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class $P extends De{constructor({value:t}){super(`Value \`${t}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class Yy extends De{constructor({value:t}){super(`Value \`${t}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class zP extends De{constructor({value:t}){super(`Value \`${t}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}function WP(e,t={}){return typeof e.chainId=="string"?qP(e):{...e,...t.signature}}function qP(e){const{address:t,chainId:n,nonce:r}=e,o=OP(e);return{address:t,chainId:Number(n),nonce:BigInt(r),...o}}const HP="0x8010801080108010801080108010801080108010801080108010801080108010",VP=aC("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function AC(e){if(typeof e=="string"){if(Hr(e,-32)!==HP)throw new KP(e)}else kC(e.authorization)}function QP(e){AC(e);const t=p3(Hr(e,-64,-32)),n=Hr(e,-t-64,-64),r=Hr(e,0,-t-64),[o,i,l]=sP(VP,n);return{authorization:WP({address:o.delegation,chainId:Number(o.chainId),nonce:o.nonce,yParity:o.yParity,r:o.r,s:o.s}),signature:r,...l&&l!=="0x"?{data:l,to:i}:{}}}function GP(e){try{return AC(e),!0}catch{return!1}}let KP=class extends De{constructor(t){super(`Value \`${t}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}};function YP(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function JP(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?lr(e.nonce):void 0,storageProof:e.storageProof?YP(e.storageProof):void 0}}async function ZP(e,{address:t,blockNumber:n,blockTag:r,storageKeys:o}){const i=r??"latest",l=n!==void 0?ge(n):void 0,c=await e.request({method:"eth_getProof",params:[t,o,l||i]});return JP(c)}async function XP(e,{address:t,blockNumber:n,blockTag:r="latest",slot:o}){const i=n!==void 0?ge(n):void 0;return await e.request({method:"eth_getStorageAt",params:[t,o,i||r]})}async function Jy(e,{blockHash:t,blockNumber:n,blockTag:r,hash:o,index:i,sender:l,nonce:c}){var g,v,w;const u=r||"latest",p=n!==void 0?ge(n):void 0;let f=null;if(o?f=await e.request({method:"eth_getTransactionByHash",params:[o]},{dedupe:!0}):t?f=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,ge(i)]},{dedupe:!0}):typeof i=="number"?f=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[p||u,ge(i)]},{dedupe:!!p}):l&&typeof c=="number"&&(f=await e.request({method:"eth_getTransactionBySenderAndNonce",params:[l,ge(c)]},{dedupe:!0})),!f)throw new J5({blockHash:t,blockNumber:n,blockTag:u,hash:o,index:i});return(((w=(v=(g=e.chain)==null?void 0:g.formatters)==null?void 0:v.transaction)==null?void 0:w.format)||eh)(f,"getTransaction")}async function eB(e,{hash:t,transactionReceipt:n}){const[r,o]=await Promise.all([ve(e,Cu,"getBlockNumber")({}),t?ve(e,Jy,"getTransaction")({hash:t}):void 0]),i=(n==null?void 0:n.blockNumber)||(o==null?void 0:o.blockNumber);return i?r-i+1n:0n}async function lf(e,{hash:t}){var o,i,l;const n=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!n)throw new Z5({hash:t});return(((l=(i=(o=e.chain)==null?void 0:o.formatters)==null?void 0:i.transactionReceipt)==null?void 0:l.format)||zy)(n,"getTransactionReceipt")}async function SC(e,t){var I;const{account:n,authorizationList:r,allowFailure:o=!0,blockNumber:i,blockOverrides:l,blockTag:c,stateOverride:u}=t,p=t.contracts,{batchSize:f=t.batchSize??1024,deployless:m=t.deployless??!1}=typeof((I=e.batch)==null?void 0:I.multicall)=="object"?e.batch.multicall:{},g=(()=>{if(t.multicallAddress)return t.multicallAddress;if(m)return null;if(e.chain)return ll({blockNumber:i,chain:e.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),v=[[]];let w=0,b=0;for(let A=0;A<p.length;A++){const{abi:S,address:N,args:T,functionName:B}=p[A];try{const R=_n({abi:S,args:T,functionName:B});b+=(R.length-2)/2,f>0&&b>f&&v[w].length>0&&(w++,b=(R.length-2)/2,v[w]=[]),v[w]=[...v[w],{allowFailure:!0,callData:R,target:N}]}catch(R){const M=wi(R,{abi:S,address:N,args:T,docsPath:"/docs/contract/multicall",functionName:B,sender:n});if(!o)throw M;v[w]=[...v[w],{allowFailure:!0,callData:"0x",target:N}]}}const C=await Promise.allSettled(v.map(A=>ve(e,cr,"readContract")({...g===null?{code:Ay}:{address:g},abi:za,account:n,args:[A],authorizationList:r,blockNumber:i,blockOverrides:l,blockTag:c,functionName:"aggregate3",stateOverride:u}))),j=[];for(let A=0;A<C.length;A++){const S=C[A];if(S.status==="rejected"){if(!o)throw S.reason;for(let T=0;T<v[A].length;T++)j.push({status:"failure",error:S.reason,result:void 0});continue}const N=S.value;for(let T=0;T<N.length;T++){const{returnData:B,success:R}=N[T],{callData:M}=v[A][T],{abi:H,address:V,functionName:W,args:L}=p[j.length];try{if(M==="0x")throw new uu;if(!R)throw new Hf({data:B});const J=js({abi:H,args:L,data:B,functionName:W});j.push(o?{result:J,status:"success"}:J)}catch(J){const O=wi(J,{abi:H,address:V,args:L,docsPath:"/docs/contract/multicall",functionName:W});if(!o)throw O;j.push({error:O,result:void 0,status:"failure"})}}}if(j.length!==p.length)throw new oe("multicall results mismatch");return j}async function sg(e,t){const{blockNumber:n,blockTag:r=e.experimental_blockTag??"latest",blocks:o,returnFullTransactions:i,traceTransfers:l,validation:c}=t;try{const u=[];for(const g of o){const v=g.blockOverrides?y3(g.blockOverrides):void 0,w=g.calls.map(C=>{const j=C,I=j.account?nt(j.account):void 0,A=j.abi?_n(j):j.data,S={...j,account:I,data:j.dataSuffix?rn([A||"0x",j.dataSuffix]):A,from:j.from??(I==null?void 0:I.address)};return Bo(S),Is(S)}),b=g.stateOverrides?Iy(g.stateOverrides):void 0;u.push({blockOverrides:v,calls:w,stateOverrides:b})}const f=(typeof n=="bigint"?ge(n):void 0)||r;return(await e.request({method:"eth_simulateV1",params:[{blockStateCalls:u,returnFullTransactions:i,traceTransfers:l,validation:c},f]})).map((g,v)=>({...Ty(g),calls:g.calls.map((w,b)=>{var H,V;const{abi:C,args:j,functionName:I,to:A}=o[v].calls[b],S=((H=w.error)==null?void 0:H.data)??w.returnData,N=BigInt(w.gasUsed),T=(V=w.logs)==null?void 0:V.map(W=>Qr(W)),B=w.status==="0x1"?"success":"failure",R=C&&B==="success"&&S!=="0x"?js({abi:C,data:S,functionName:I}):null,M=(()=>{if(B==="success")return;let W;if(S==="0x"?W=new uu:S&&(W=new Hf({data:S})),!!W)return wi(W,{abi:C??[],address:A??"0x",args:j,functionName:I??"<unknown>"})})();return{data:S,gasUsed:N,logs:T,status:B,...B==="success"?{result:R}:{error:M}}})}))}catch(u){const p=u,f=Jf(p,{});throw f instanceof vu?p:f}}function ig(e){let t=!0,n="",r=0,o="",i=!1;for(let l=0;l<e.length;l++){const c=e[l];if(["(",")",","].includes(c)&&(t=!0),c==="("&&r++,c===")"&&r--,!!t){if(r===0){if(c===" "&&["event","function","error",""].includes(o))o="";else if(o+=c,c===")"){i=!0;break}continue}if(c===" "){e[l-1]!==","&&n!==","&&n!==",("&&(n="",t=!1);continue}o+=c,n+=c}}if(!i)throw new De("Unable to normalize signature.");return o}function ag(e,t){const n=typeof e,r=t.type;switch(r){case"address":return Zm(e,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in t?Object.values(t.components).every((o,i)=>ag(Object.values(e)[i],o)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(e)&&e.every(o=>ag(o,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function jC(e,t,n){for(const r in e){const o=e[r],i=t[r];if(o.type==="tuple"&&i.type==="tuple"&&"components"in o&&"components"in i)return jC(o.components,i.components,n[r]);const l=[o.type,i.type];if(l.includes("address")&&l.includes("bytes20")?!0:l.includes("address")&&l.includes("string")?Zm(n[r],{strict:!1}):l.includes("address")&&l.includes("bytes")?Zm(n[r],{strict:!1}):!1)return l}}function IC(e,t={}){const{prepare:n=!0}=t,r=Array.isArray(e)||typeof e=="string"?b6(e):e;return{...r,...n?{hash:wa(r)}:{}}}function sh(e,t,n){const{args:r=[],prepare:o=!0}=n??{},i=HI(t,{strict:!1}),l=e.filter(p=>i?p.type==="function"||p.type==="error"?NC(p)===Hr(t,0,4):p.type==="event"?wa(p)===t:!1:"name"in p&&p.name===t);if(l.length===0)throw new kf({name:t});if(l.length===1)return{...l[0],...o?{hash:wa(l[0])}:{}};let c;for(const p of l){if(!("inputs"in p))continue;if(!r||r.length===0){if(!p.inputs||p.inputs.length===0)return{...p,...o?{hash:wa(p)}:{}};continue}if(!p.inputs||p.inputs.length===0||p.inputs.length!==r.length)continue;if(r.every((m,g)=>{const v="inputs"in p&&p.inputs[g];return v?ag(m,v):!1})){if(c&&"inputs"in c&&c.inputs){const m=jC(p.inputs,c.inputs,r);if(m)throw new nB({abiItem:p,type:m[0]},{abiItem:c,type:m[1]})}c=p}}const u=(()=>{if(c)return c;const[p,...f]=l;return{...p,overloads:f}})();if(!u)throw new kf({name:t});return{...u,...o?{hash:wa(u)}:{}}}function NC(...e){const t=(()=>{if(Array.isArray(e[0])){const[n,r]=e;return sh(n,r)}return e[0]})();return Hr(wa(t),0,4)}function tB(...e){const t=(()=>{if(Array.isArray(e[0])){const[r,o]=e;return sh(r,o)}return e[0]})(),n=typeof t=="string"?t:gf(t);return ig(n)}function wa(...e){const t=(()=>{if(Array.isArray(e[0])){const[n,r]=e;return sh(n,r)}return e[0]})();return typeof t!="string"&&"hash"in t&&t.hash?t.hash:oC(Ey(tB(t)))}class nB extends De{constructor(t,n){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${t.type}\` in \`${ig(gf(t.abiItem))}\`, and`,`\`${n.type}\` in \`${ig(gf(n.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}class kf extends De{constructor({name:t,data:n,type:r="item"}){const o=t?` with name "${t}"`:n?` with data "${n}"`:"";super(`ABI ${r}${o} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}function rB(...e){var i;const[t,n]=(()=>{if(Array.isArray(e[0])){const[l,c]=e;return[sB(l),c]}return e})(),{bytecode:r,args:o}=n;return jr(r,(i=t.inputs)!=null&&i.length&&(o!=null&&o.length)?Vy(t.inputs,o):"0x")}function oB(e){return IC(e)}function sB(e){const t=e.find(n=>n.type==="constructor");if(!t)throw new kf({name:"constructor"});return t}function iB(...e){const[t,n=[]]=(()=>{if(Array.isArray(e[0])){const[p,f,m]=e;return[X6(p,f,{args:m}),m]}const[c,u]=e;return[c,u]})(),{overloads:r}=t,o=r?X6([t,...r],t.name,{args:n}):t,i=aB(o),l=n.length>0?Vy(o.inputs,n):void 0;return l?jr(i,l):i}function ia(e,t={}){return IC(e,t)}function X6(e,t,n){const r=sh(e,t,n);if(r.type!=="function")throw new kf({name:t,type:"function"});return r}function aB(e){return NC(e)}const lB="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",br="0x0000000000000000000000000000000000000000",cB="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function uB(e,t){const{blockNumber:n,blockTag:r,calls:o,stateOverrides:i,traceAssetChanges:l,traceTransfers:c,validation:u}=t,p=t.account?nt(t.account):void 0;if(l&&!p)throw new oe("`account` is required when `traceAssetChanges` is true");const f=p?rB(oB("constructor(bytes, bytes)"),{bytecode:v3,args:[cB,iB(ia("function getBalance(address)"),[p.address])]}):void 0,m=l?await Promise.all(t.calls.map(async F=>{if(!F.data&&!F.abi)return;const{accessList:K}=await j3(e,{account:p.address,...F,data:F.abi?_n(F):F.data});return K.map(({address:Y,storageKeys:U})=>U.length>0?Y:null)})).then(F=>F.flat().filter(Boolean)):[],g=await sg(e,{blockNumber:n,blockTag:r,blocks:[...l?[{calls:[{data:f}],stateOverrides:i},{calls:m.map((F,K)=>({abi:[ia("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[p.address],to:F,from:br,nonce:K})),stateOverrides:[{address:br,nonce:0}]}]:[],{calls:[...o,{to:br}].map(F=>({...F,from:p==null?void 0:p.address})),stateOverrides:i},...l?[{calls:[{data:f}]},{calls:m.map((F,K)=>({abi:[ia("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[p.address],to:F,from:br,nonce:K})),stateOverrides:[{address:br,nonce:0}]},{calls:m.map((F,K)=>({to:F,abi:[ia("function decimals() returns (uint256)")],functionName:"decimals",from:br,nonce:K})),stateOverrides:[{address:br,nonce:0}]},{calls:m.map((F,K)=>({to:F,abi:[ia("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:br,nonce:K})),stateOverrides:[{address:br,nonce:0}]},{calls:m.map((F,K)=>({to:F,abi:[ia("function symbol() returns (string)")],functionName:"symbol",from:br,nonce:K})),stateOverrides:[{address:br,nonce:0}]}]:[]],traceTransfers:c,validation:u}),v=l?g[2]:g[0],[w,b,,C,j,I,A,S]=l?g:[],{calls:N,...T}=v,B=N.slice(0,-1)??[],R=(w==null?void 0:w.calls)??[],M=(b==null?void 0:b.calls)??[],H=[...R,...M].map(F=>F.status==="success"?Hn(F.data):null),V=(C==null?void 0:C.calls)??[],W=(j==null?void 0:j.calls)??[],L=[...V,...W].map(F=>F.status==="success"?Hn(F.data):null),J=((I==null?void 0:I.calls)??[]).map(F=>F.status==="success"?F.result:null),O=((S==null?void 0:S.calls)??[]).map(F=>F.status==="success"?F.result:null),G=((A==null?void 0:A.calls)??[]).map(F=>F.status==="success"?F.result:null),ee=[];for(const[F,K]of L.entries()){const Y=H[F];if(typeof K!="bigint"||typeof Y!="bigint")continue;const U=J[F-1],X=O[F-1],he=G[F-1],se=F===0?{address:lB,decimals:18,symbol:"ETH"}:{address:m[F-1],decimals:he||U?Number(U??1):void 0,symbol:X??void 0};ee.some(ie=>ie.token.address===se.address)||ee.push({token:se,value:{pre:Y,post:K,diff:K-Y}})}return{assetChanges:ee,block:T,results:B}}async function dB(e,t){var f;const{abi:n,address:r,args:o,functionName:i,dataSuffix:l=typeof e.dataSuffix=="string"?e.dataSuffix:(f=e.dataSuffix)==null?void 0:f.value,...c}=t,u=c.account?nt(c.account):e.account,p=_n({abi:n,args:o,functionName:i});try{const{data:m}=await ve(e,wu,"call")({batch:!1,data:`${p}${l?l.replace("0x",""):""}`,to:r,...c,account:u}),g=js({abi:n,args:o,functionName:i,data:m||"0x"}),v=n.filter(w=>"name"in w&&w.name===t.functionName);return{result:g,request:{abi:v,address:r,args:o,dataSuffix:l,functionName:i,...c,account:u}}}catch(m){throw wi(m,{abi:n,address:r,args:o,docsPath:"/docs/contract/simulateContract",functionName:i,sender:u==null?void 0:u.address})}}async function ih(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}const PC="0x6492649264926492649264926492649264926492649264926492649264926492";function fB(e){if(Hr(e,-32)!==PC)throw new mB(e)}function hB(e){const{data:t,signature:n,to:r}=e;return jr(Vy(aC("address, bytes, bytes"),[r,t,n]),PC)}function pB(e){try{return fB(e),!0}catch{return!1}}class mB extends De{constructor(t){super(`Value \`${t}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}}function gB({r:e,s:t,to:n="hex",v:r,yParity:o}){const i=(()=>{if(o===0||o===1)return o;if(r&&(r===27n||r===28n||r>=35n))return r%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),l=`0x${new CC.Signature(Hn(e),Hn(t)).toCompactHex()}${i===0?"1b":"1c"}`;return n==="hex"?l:Sr(l)}async function ah(e,t){var p,f,m,g;const{address:n,chain:r=e.chain,hash:o,erc6492VerifierAddress:i=t.universalSignatureVerifierAddress??((f=(p=r==null?void 0:r.contracts)==null?void 0:p.erc6492Verifier)==null?void 0:f.address),multicallAddress:l=t.multicallAddress??((g=(m=r==null?void 0:r.contracts)==null?void 0:m.multicall3)==null?void 0:g.address),mode:c="auto"}=t;if(r!=null&&r.verifyHash)return await r.verifyHash(e,t);const u=(()=>{const v=t.signature;return Vr(v)?v:typeof v=="object"&&"r"in v&&"s"in v?gB(v):St(v)})();try{if(c==="eoa")try{if(Ka(vt(n),await Km({hash:o,signature:u})))return!0}catch{}return GP(u)?await yB(e,{...t,multicallAddress:l,signature:u}):await vB(e,{...t,verifierAddress:i,signature:u})}catch(v){if(c!=="eoa")try{if(Ka(vt(n),await Km({hash:o,signature:u})))return!0}catch{}if(v instanceof ki)return!1;throw v}}async function yB(e,t){var C;const{address:n,blockNumber:r,blockTag:o,hash:i,multicallAddress:l}=t,{authorization:c,data:u,signature:p,to:f}=QP(t.signature);if(await xf(e,{address:n,blockNumber:r,blockTag:o})===il(["0xef0100",c.address]))return await wB(e,{address:n,blockNumber:r,blockTag:o,hash:i,signature:p});const g={address:c.address,chainId:Number(c.chainId),nonce:Number(c.nonce),r:ge(c.r,{size:32}),s:ge(c.s,{size:32}),yParity:c.yParity};if(!await mN({address:n,authorization:g}))throw new ki;const w=await ve(e,cr,"readContract")({...l?{address:l}:{code:Ay},authorizationList:[g],abi:za,blockNumber:r,blockTag:"pending",functionName:"aggregate3",args:[[...u?[{allowFailure:!0,target:f??n,callData:u}]:[],{allowFailure:!0,target:n,callData:_n({abi:d5,functionName:"isValidSignature",args:[i,p]})}]]}),b=(C=w[w.length-1])==null?void 0:C.returnData;if(b!=null&&b.startsWith("0x1626ba7e"))return!0;throw new ki}async function vB(e,t){const{address:n,factory:r,factoryData:o,hash:i,signature:l,verifierAddress:c,...u}=t,p=await(async()=>!r&&!o||pB(l)?l:hB({data:o,signature:l,to:r}))(),f=c?{to:c,data:_n({abi:r6,functionName:"isValidSig",args:[n,i,p]}),...u}:{data:Yf({abi:r6,args:[n,i,p],bytecode:JI}),...u},{data:m}=await ve(e,wu,"call")(f).catch(g=>{throw g instanceof e3?new ki:g});if(Hj(m??"0x0"))return!0;throw new ki}async function wB(e,t){const{address:n,blockNumber:r,blockTag:o,hash:i,signature:l}=t;if((await ve(e,cr,"readContract")({address:n,abi:d5,args:[i,l],blockNumber:r,blockTag:o,functionName:"isValidSignature"}).catch(u=>{throw u instanceof yy?new ki:u})).startsWith("0x1626ba7e"))return!0;throw new ki}class ki extends Error{}async function bB(e,{address:t,message:n,factory:r,factoryData:o,signature:i,...l}){const c=K3(n);return ve(e,ah,"verifyHash")({address:t,factory:r,factoryData:o,hash:c,signature:i,...l})}async function xB(e,t){const{address:n,factory:r,factoryData:o,signature:i,message:l,primaryType:c,types:u,domain:p,...f}=t,m=NN({message:l,primaryType:c,types:u,domain:p});return ve(e,ah,"verifyHash")({address:n,factory:r,factoryData:o,hash:m,signature:i,...f})}const F0=new Map,ex=new Map;let CB=0;function No(e,t,n){const r=++CB,o=()=>F0.get(e)||[],i=()=>{const f=o();F0.set(e,f.filter(m=>m.id!==r))},l=()=>{const f=o();if(!f.some(g=>g.id===r))return;const m=ex.get(e);if(f.length===1&&m){const g=m();g instanceof Promise&&g.catch(()=>{})}i()},c=o();if(F0.set(e,[...c,{id:r,fns:t}]),c&&c.length>0)return l;const u={};for(const f in t)u[f]=((...m)=>{var v,w;const g=o();if(g.length!==0)for(const b of g)(w=(v=b.fns)[f])==null||w.call(v,...m)});const p=n(u);return typeof p=="function"&&ex.set(e,p),l}function ul(e,{emitOnBegin:t,initialWaitTime:n,interval:r}){let o=!0;const i=()=>o=!1;return(async()=>{let c;t&&(c=await e({unpoll:i}));const u=await(n==null?void 0:n(c))??r;await Jm(u);const p=async()=>{o&&(await e({unpoll:i}),await Jm(r),p())};p()})(),i}function BC(e,{emitOnBegin:t=!1,emitMissed:n=!1,onBlockNumber:r,onError:o,poll:i,pollingInterval:l=e.pollingInterval}){const c=typeof i<"u"?i:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc"));let u;return c?(()=>{const m=At(["watchBlockNumber",e.uid,t,n,l]);return No(m,{onBlockNumber:r,onError:o},g=>ul(async()=>{var v;try{const w=await ve(e,Cu,"getBlockNumber")({cacheTime:0});if(u!==void 0){if(w===u)return;if(w-u>1&&n)for(let b=u+1n;b<w;b++)g.onBlockNumber(b,u),u=b}(u===void 0||w>u)&&(g.onBlockNumber(w,u),u=w)}catch(w){(v=g.onError)==null||v.call(g,w)}},{emitOnBegin:t,interval:l}))})():(()=>{const m=At(["watchBlockNumber",e.uid,t,n]);return No(m,{onBlockNumber:r,onError:o},g=>{let v=!0,w=()=>v=!1;return(async()=>{try{const b=(()=>{if(e.transport.type==="fallback"){const j=e.transport.transports.find(I=>I.config.type==="webSocket"||I.config.type==="ipc");return j?j.value:e.transport}return e.transport})(),{unsubscribe:C}=await b.subscribe({params:["newHeads"],onData(j){var A;if(!v)return;const I=Hn((A=j.result)==null?void 0:A.number);g.onBlockNumber(I,u),u=I},onError(j){var I;(I=g.onError)==null||I.call(g,j)}});w=C,v||w()}catch(b){o==null||o(b)}})(),()=>w()})})()}async function TC(e,t){const{checkReplacement:n=!0,confirmations:r=1,hash:o,onReplaced:i,retryCount:l=6,retryDelay:c=({count:N})=>~~(1<<N)*200,timeout:u=18e4}=t,p=At(["waitForTransactionReceipt",e.uid,o]),f=(()=>{var N;return t.pollingInterval?t.pollingInterval:(N=e.chain)!=null&&N.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval})();let m,g,v,w=!1,b,C;const{promise:j,resolve:I,reject:A}=jy(),S=u?setTimeout(()=>{C==null||C(),b==null||b(),A(new nI({hash:o}))},u):void 0;return b=No(p,{onReplaced:i,resolve:I,reject:A},async N=>{if(v=await ve(e,lf,"getTransactionReceipt")({hash:o}).catch(()=>{}),v&&r<=1){clearTimeout(S),N.resolve(v),b==null||b();return}C=ve(e,BC,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:f,async onBlockNumber(T){const B=M=>{clearTimeout(S),C==null||C(),M(),b==null||b()};let R=T;if(!w)try{if(v){if(r>1&&(!v.blockNumber||R-v.blockNumber+1n<r))return;B(()=>N.resolve(v));return}if(n&&!m&&(w=!0,await Ci(async()=>{m=await ve(e,Jy,"getTransaction")({hash:o}),m.blockNumber&&(R=m.blockNumber)},{delay:c,retryCount:l}),w=!1),v=await ve(e,lf,"getTransactionReceipt")({hash:o}),r>1&&(!v.blockNumber||R-v.blockNumber+1n<r))return;B(()=>N.resolve(v))}catch(M){if(M instanceof J5||M instanceof Z5){if(!m){w=!1;return}try{g=m,w=!0;const H=await Ci(()=>ve(e,Cr,"getBlock")({blockNumber:R,includeTransactions:!0}),{delay:c,retryCount:l,shouldRetry:({error:L})=>L instanceof R3});w=!1;const V=H.transactions.find(({from:L,nonce:J})=>L===g.from&&J===g.nonce);if(!V||(v=await ve(e,lf,"getTransactionReceipt")({hash:V.hash}),r>1&&(!v.blockNumber||R-v.blockNumber+1n<r)))return;let W="replaced";V.to===g.to&&V.value===g.value&&V.input===g.input?W="repriced":V.from===V.to&&V.value===0n&&(W="cancelled"),B(()=>{var L;(L=N.onReplaced)==null||L.call(N,{reason:W,replacedTransaction:g,transaction:V,transactionReceipt:v}),N.resolve(v)})}catch(H){B(()=>N.reject(H))}}else B(()=>N.reject(M))}}})}),j}function kB(e,{blockTag:t=e.experimental_blockTag??"latest",emitMissed:n=!1,emitOnBegin:r=!1,onBlock:o,onError:i,includeTransactions:l,poll:c,pollingInterval:u=e.pollingInterval}){const p=typeof c<"u"?c:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),f=l??!1;let m;return p?(()=>{const w=At(["watchBlocks",e.uid,t,n,r,f,u]);return No(w,{onBlock:o,onError:i},b=>ul(async()=>{var C;try{const j=await ve(e,Cr,"getBlock")({blockTag:t,includeTransactions:f});if(j.number!==null&&(m==null?void 0:m.number)!=null){if(j.number===m.number)return;if(j.number-m.number>1&&n)for(let I=(m==null?void 0:m.number)+1n;I<j.number;I++){const A=await ve(e,Cr,"getBlock")({blockNumber:I,includeTransactions:f});b.onBlock(A,m),m=A}}((m==null?void 0:m.number)==null||t==="pending"&&(j==null?void 0:j.number)==null||j.number!==null&&j.number>m.number)&&(b.onBlock(j,m),m=j)}catch(j){(C=b.onError)==null||C.call(b,j)}},{emitOnBegin:r,interval:u}))})():(()=>{let w=!0,b=!0,C=()=>w=!1;return(async()=>{try{r&&ve(e,Cr,"getBlock")({blockTag:t,includeTransactions:f}).then(A=>{w&&b&&(o(A,void 0),b=!1)}).catch(i);const j=(()=>{if(e.transport.type==="fallback"){const A=e.transport.transports.find(S=>S.config.type==="webSocket"||S.config.type==="ipc");return A?A.value:e.transport}return e.transport})(),{unsubscribe:I}=await j.subscribe({params:["newHeads"],async onData(A){var N;if(!w)return;const S=await ve(e,Cr,"getBlock")({blockNumber:(N=A.result)==null?void 0:N.number,includeTransactions:f}).catch(()=>{});w&&(o(S,m),b=!1,m=S)},onError(A){i==null||i(A)}});C=I,w||C()}catch(j){i==null||i(j)}})(),()=>C()})()}function EB(e,t){const{abi:n,address:r,args:o,batch:i=!0,eventName:l,fromBlock:c,onError:u,onLogs:p,poll:f,pollingInterval:m=e.pollingInterval,strict:g}=t;return(typeof f<"u"?f:typeof c=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")))?(()=>{const C=g??!1,j=At(["watchContractEvent",r,o,i,e.uid,l,m,C,c]);return No(j,{onLogs:p,onError:u},I=>{let A;c!==void 0&&(A=c-1n);let S,N=!1;const T=ul(async()=>{var B;if(!N){try{S=await ve(e,I3,"createContractEventFilter")({abi:n,address:r,args:o,eventName:l,strict:C,fromBlock:c})}catch{}N=!0;return}try{let R;if(S)R=await ve(e,nh,"getFilterChanges")({filter:S});else{const M=await ve(e,Cu,"getBlockNumber")({});A&&A<M?R=await ve(e,V3,"getContractEvents")({abi:n,address:r,args:o,eventName:l,fromBlock:A+1n,toBlock:M,strict:C}):R=[],A=M}if(R.length===0)return;if(i)I.onLogs(R);else for(const M of R)I.onLogs([M])}catch(R){S&&R instanceof Es&&(N=!1),(B=I.onError)==null||B.call(I,R)}},{emitOnBegin:!0,interval:m});return async()=>{S&&await ve(e,ih,"uninstallFilter")({filter:S}),T()}})})():(()=>{const C=g??!1,j=At(["watchContractEvent",r,o,i,e.uid,l,m,C]);let I=!0,A=()=>I=!1;return No(j,{onLogs:p,onError:u},S=>((async()=>{try{const N=(()=>{if(e.transport.type==="fallback"){const R=e.transport.transports.find(M=>M.config.type==="webSocket"||M.config.type==="ipc");return R?R.value:e.transport}return e.transport})(),T=l?bu({abi:n,eventName:l,args:o}):[],{unsubscribe:B}=await N.subscribe({params:["logs",{address:r,topics:T}],onData(R){var H;if(!I)return;const M=R.result;try{const{eventName:V,args:W}=Cf({abi:n,data:M.data,topics:M.topics,strict:g}),L=Qr(M,{args:W,eventName:V});S.onLogs([L])}catch(V){let W,L;if(V instanceof mf||V instanceof iy){if(g)return;W=V.abiItem.name,L=(H=V.abiItem.inputs)==null?void 0:H.some(O=>!("name"in O&&O.name))}const J=Qr(M,{args:L?[]:{},eventName:W});S.onLogs([J])}},onError(R){var M;(M=S.onError)==null||M.call(S,R)}});A=B,I||A()}catch(N){u==null||u(N)}})(),()=>A()))})()}function AB(e,{address:t,args:n,batch:r=!0,event:o,events:i,fromBlock:l,onError:c,onLogs:u,poll:p,pollingInterval:f=e.pollingInterval,strict:m}){const g=typeof p<"u"?p:typeof l=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),v=m??!1;return g?(()=>{const C=At(["watchEvent",t,n,r,e.uid,o,f,l]);return No(C,{onLogs:u,onError:c},j=>{let I;l!==void 0&&(I=l-1n);let A,S=!1;const N=ul(async()=>{var T;if(!S){try{A=await ve(e,N3,"createEventFilter")({address:t,args:n,event:o,events:i,strict:v,fromBlock:l})}catch{}S=!0;return}try{let B;if(A)B=await ve(e,nh,"getFilterChanges")({filter:A});else{const R=await ve(e,Cu,"getBlockNumber")({});I&&I!==R?B=await ve(e,Uy,"getLogs")({address:t,args:n,event:o,events:i,fromBlock:I+1n,toBlock:R}):B=[],I=R}if(B.length===0)return;if(r)j.onLogs(B);else for(const R of B)j.onLogs([R])}catch(B){A&&B instanceof Es&&(S=!1),(T=j.onError)==null||T.call(j,B)}},{emitOnBegin:!0,interval:f});return async()=>{A&&await ve(e,ih,"uninstallFilter")({filter:A}),N()}})})():(()=>{let C=!0,j=()=>C=!1;return(async()=>{try{const I=(()=>{if(e.transport.type==="fallback"){const T=e.transport.transports.find(B=>B.config.type==="webSocket"||B.config.type==="ipc");return T?T.value:e.transport}return e.transport})(),A=i??(o?[o]:void 0);let S=[];A&&(S=[A.flatMap(B=>bu({abi:[B],eventName:B.name,args:n}))],o&&(S=S[0]));const{unsubscribe:N}=await I.subscribe({params:["logs",{address:t,topics:S}],onData(T){var R;if(!C)return;const B=T.result;try{const{eventName:M,args:H}=Cf({abi:A??[],data:B.data,topics:B.topics,strict:v}),V=Qr(B,{args:H,eventName:M});u([V])}catch(M){let H,V;if(M instanceof mf||M instanceof iy){if(m)return;H=M.abiItem.name,V=(R=M.abiItem.inputs)==null?void 0:R.some(L=>!("name"in L&&L.name))}const W=Qr(B,{args:V?[]:{},eventName:H});u([W])}},onError(T){c==null||c(T)}});j=N,C||j()}catch(I){c==null||c(I)}})(),()=>j()})()}function SB(e,{batch:t=!0,onError:n,onTransactions:r,poll:o,pollingInterval:i=e.pollingInterval}){return(typeof o<"u"?o:e.transport.type!=="webSocket"&&e.transport.type!=="ipc")?(()=>{const p=At(["watchPendingTransactions",e.uid,t,i]);return No(p,{onTransactions:r,onError:n},f=>{let m;const g=ul(async()=>{var v;try{if(!m)try{m=await ve(e,P3,"createPendingTransactionFilter")({});return}catch(b){throw g(),b}const w=await ve(e,nh,"getFilterChanges")({filter:m});if(w.length===0)return;if(t)f.onTransactions(w);else for(const b of w)f.onTransactions([b])}catch(w){(v=f.onError)==null||v.call(f,w)}},{emitOnBegin:!0,interval:i});return async()=>{m&&await ve(e,ih,"uninstallFilter")({filter:m}),g()}})})():(()=>{let p=!0,f=()=>p=!1;return(async()=>{try{const{unsubscribe:m}=await e.transport.subscribe({params:["newPendingTransactions"],onData(g){if(!p)return;const v=g.result;r([v])},onError(g){n==null||n(g)}});f=m,p||f()}catch(m){n==null||n(m)}})(),()=>f()})()}async function jB(e,{chain:t}){const{id:n,name:r,nativeCurrency:o,rpcUrls:i,blockExplorers:l}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:ge(n),chainName:r,nativeCurrency:o,rpcUrls:i.default.http,blockExplorerUrls:l?Object.values(l).map(({url:c})=>c):void 0}]},{dedupe:!0,retryCount:0})}class Ps extends oe{constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
|
|
83
|
-
`),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}}class pi extends oe{constructor({docsPath:t,metaMessages:n,type:r}){super(`Account type "${r}" is not supported.`,{docsPath:t,metaMessages:n,name:"AccountTypeNotSupportedError"})}}async function Zy(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}const L0=new sl(128);async function lh(e,t){var S,N,T,B,R;const{account:n=e.account,assertChainId:r=!0,chain:o=e.chain,accessList:i,authorizationList:l,blobs:c,data:u,dataSuffix:p=typeof e.dataSuffix=="string"?e.dataSuffix:(S=e.dataSuffix)==null?void 0:S.value,gas:f,gasPrice:m,maxFeePerBlobGas:g,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:b,type:C,value:j,...I}=t;if(typeof n>"u")throw new Ps({docsPath:"/docs/actions/wallet/sendTransaction"});const A=n?nt(n):null;try{Bo(t);const M=await(async()=>{if(t.to)return t.to;if(t.to!==null&&l&&l.length>0)return await Xf({authorization:l[0]}).catch(()=>{throw new oe("`to` is required. Could not infer from `authorizationList`.")})})();if((A==null?void 0:A.type)==="json-rpc"||A===null){let H;o!==null&&(H=await ve(e,Ns,"getChainId")({}),r&&$y({currentChainId:H,chain:o}));const V=(B=(T=(N=e.chain)==null?void 0:N.formatters)==null?void 0:T.transactionRequest)==null?void 0:B.format,L=(V||Is)({...cl(I,{format:V}),accessList:i,account:A,authorizationList:l,blobs:c,chainId:H,data:p?rn([u??"0x",p]):u,gas:f,gasPrice:m,maxFeePerBlobGas:g,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:b,to:M,type:C,value:j},"sendTransaction"),J=L0.get(e.uid),O=J?"wallet_sendTransaction":"eth_sendTransaction";try{return await e.request({method:O,params:[L]},{retryCount:0})}catch(G){if(J===!1)throw G;const ee=G;if(ee.name==="InvalidInputRpcError"||ee.name==="InvalidParamsRpcError"||ee.name==="MethodNotFoundRpcError"||ee.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[L]},{retryCount:0}).then(F=>(L0.set(e.uid,!0),F)).catch(F=>{const K=F;throw K.name==="MethodNotFoundRpcError"||K.name==="MethodNotSupportedRpcError"?(L0.set(e.uid,!1),ee):K});throw ee}}if((A==null?void 0:A.type)==="local"){const H=await ve(e,xu,"prepareTransactionRequest")({account:A,accessList:i,authorizationList:l,blobs:c,chain:o,data:p?rn([u??"0x",p]):u,gas:f,gasPrice:m,maxFeePerBlobGas:g,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:b,nonceManager:A.nonceManager,parameters:[...Fy,"sidecars"],type:C,value:j,...I,to:M}),V=(R=o==null?void 0:o.serializers)==null?void 0:R.transaction,W=await A.signTransaction(H,{serializer:V});return await ve(e,Zy,"sendRawTransaction")({serializedTransaction:W})}throw(A==null?void 0:A.type)==="smart"?new pi({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new pi({docsPath:"/docs/actions/wallet/sendTransaction",type:A==null?void 0:A.type})}catch(M){throw M instanceof pi?M:th(M,{...t,account:A,chain:t.chain||void 0})}}function IB(e,t){const{abi:n,args:r,bytecode:o,...i}=t,l=Yf({abi:n,args:r,bytecode:o});return lh(e,{...i,...i.authorizationList?{to:null}:{},data:l})}async function NB(e){var n;return((n=e.account)==null?void 0:n.type)==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(r=>du(r))}const _C="0x5792579257925792579257925792579257925792579257925792579257925792",RC=ge(0,{size:32});async function OC(e,t){var g;const{account:n=e.account,chain:r=e.chain,experimental_fallback:o,experimental_fallbackDelay:i=32,forceAtomic:l=!1,id:c,version:u="2.0.0"}=t,p=n?nt(n):null;let f=t.capabilities;e.dataSuffix&&!((g=t.capabilities)!=null&&g.dataSuffix)&&(typeof e.dataSuffix=="string"?f={...t.capabilities,dataSuffix:{value:e.dataSuffix,optional:!0}}:f={...t.capabilities,dataSuffix:{value:e.dataSuffix.value,...e.dataSuffix.required?{}:{optional:!0}}});const m=t.calls.map(v=>{const w=v,b=w.abi?_n({abi:w.abi,functionName:w.functionName,args:w.args}):w.data;return{data:w.dataSuffix&&b?rn([b,w.dataSuffix]):b,to:w.to,value:w.value?ge(w.value):void 0}});try{const v=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:l,calls:m,capabilities:f,chainId:ge(r.id),from:p==null?void 0:p.address,id:c,version:u}]},{retryCount:0});return typeof v=="string"?{id:v}:v}catch(v){const w=v;if(o&&(w.name==="MethodNotFoundRpcError"||w.name==="MethodNotSupportedRpcError"||w.name==="UnknownRpcError"||w.details.toLowerCase().includes("does not exist / is not available")||w.details.toLowerCase().includes("missing or invalid. request()")||w.details.toLowerCase().includes("did not match any variant of untagged enum")||w.details.toLowerCase().includes("account upgraded to unsupported contract")||w.details.toLowerCase().includes("eip-7702 not supported")||w.details.toLowerCase().includes("unsupported wc_ method")||w.details.toLowerCase().includes("feature toggled misconfigured")||w.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(f&&Object.values(f).some(A=>!A.optional)){const A="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new Qa(new oe(A,{details:A}))}if(l&&m.length>1){const I="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new Ga(new oe(I,{details:I}))}const b=[];for(const I of m){const A=lh(e,{account:p,chain:r,data:I.data,to:I.to,value:I.value?Hn(I.value):void 0});b.push(A),i>0&&await new Promise(S=>setTimeout(S,i))}const C=await Promise.allSettled(b);if(C.every(I=>I.status==="rejected"))throw C[0].reason;const j=C.map(I=>I.status==="fulfilled"?I.value:RC);return{id:rn([...j,ge(r.id,{size:32}),_C])}}throw th(v,{...t,account:p,chain:t.chain})}}async function MC(e,t){async function n(f){if(f.endsWith(_C.slice(2))){const g=Wr(Pm(f,-64,-32)),v=Pm(f,0,-64).slice(2).match(/.{1,64}/g),w=await Promise.all(v.map(C=>RC.slice(2)!==C?e.request({method:"eth_getTransactionReceipt",params:[`0x${C}`]},{dedupe:!0}):void 0)),b=w.some(C=>C===null)?100:w.every(C=>(C==null?void 0:C.status)==="0x1")?200:w.every(C=>(C==null?void 0:C.status)==="0x0")?500:600;return{atomic:!1,chainId:lr(g),receipts:w.filter(Boolean),status:b,version:"2.0.0"}}return e.request({method:"wallet_getCallsStatus",params:[f]})}const{atomic:r=!1,chainId:o,receipts:i,version:l="2.0.0",...c}=await n(t.id),[u,p]=(()=>{const f=c.status;return f>=100&&f<200?["pending",f]:f>=200&&f<300?["success",f]:f>=300&&f<700?["failure",f]:f==="CONFIRMED"?["success",200]:f==="PENDING"?["pending",100]:[void 0,f]})();return{...c,atomic:r,chainId:o?lr(o):void 0,receipts:(i==null?void 0:i.map(f=>({...f,blockNumber:Hn(f.blockNumber),gasUsed:Hn(f.gasUsed),status:G3[f.status]})))??[],statusCode:p,status:u,version:l}}async function PB(e,t={}){const{account:n=e.account,chainId:r}=t,o=n?nt(n):void 0,i=r?[o==null?void 0:o.address,[ge(r)]]:[o==null?void 0:o.address],l=await e.request({method:"wallet_getCapabilities",params:i}),c={};for(const[u,p]of Object.entries(l)){c[Number(u)]={};for(let[f,m]of Object.entries(p))f==="addSubAccount"&&(f="unstable_addSubAccount"),c[Number(u)][f]=m}return typeof r=="number"?c[r]:c}async function BB(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}async function FC(e,t){var u;const{account:n=e.account,chainId:r,nonce:o}=t;if(!n)throw new Ps({docsPath:"/docs/eip7702/prepareAuthorization"});const i=nt(n),l=(()=>{if(t.executor)return t.executor==="self"?t.executor:nt(t.executor)})(),c={address:t.contractAddress??t.address,chainId:r,nonce:o};return typeof c.chainId>"u"&&(c.chainId=((u=e.chain)==null?void 0:u.id)??await ve(e,Ns,"getChainId")({})),typeof c.nonce>"u"&&(c.nonce=await ve(e,Ry,"getTransactionCount")({address:i.address,blockTag:"pending"}),(l==="self"||l!=null&&l.address&&Ka(l.address,i.address))&&(c.nonce+=1)),c}async function TB(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(n=>vt(n))}async function _B(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}class RB extends oe{constructor(t){super(`Call bundle failed with status: ${t.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=t}}async function LC(e,t){const{id:n,pollingInterval:r=e.pollingInterval,status:o=({statusCode:b})=>b===200||b>=300,retryCount:i=4,retryDelay:l=({count:b})=>~~(1<<b)*200,timeout:c=6e4,throwOnFailure:u=!1}=t,p=At(["waitForCallsStatus",e.uid,n]),{promise:f,resolve:m,reject:g}=jy();let v;const w=No(p,{resolve:m,reject:g},b=>{const C=ul(async()=>{const j=I=>{clearTimeout(v),C(),I(),w()};try{const I=await Ci(async()=>{const A=await ve(e,MC,"getCallsStatus")({id:n});if(u&&A.status==="failure")throw new RB(A);return A},{retryCount:i,delay:l});if(!o(I))return;j(()=>b.resolve(I))}catch(I){j(()=>b.reject(I))}},{interval:r,emitOnBegin:!0});return C});return v=c?setTimeout(()=>{w(),clearTimeout(v),g(new OB({id:n}))},c):void 0,await f}class OB extends oe{constructor({id:t}){super(`Timed out while waiting for call bundle with id "${t}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}async function MB(e,t){const{chain:n=e.chain}=t,r=t.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3),o=await ve(e,OC,"sendCalls")(t);return await ve(e,LC,"waitForCallsStatus")({...t,id:o.id,timeout:r})}async function Xy(e,{serializedTransaction:t,throwOnReceiptRevert:n,timeout:r}){var c,u,p;const o=await e.request({method:"eth_sendRawTransactionSync",params:r?[t,r]:[t]},{retryCount:0}),l=(((p=(u=(c=e.chain)==null?void 0:c.formatters)==null?void 0:u.transactionReceipt)==null?void 0:p.format)||zy)(o);if(l.status==="reverted"&&n)throw new X5({receipt:l});return l}const D0=new sl(128);async function DC(e,t){var B,R,M,H,V;const{account:n=e.account,assertChainId:r=!0,chain:o=e.chain,accessList:i,authorizationList:l,blobs:c,data:u,dataSuffix:p=typeof e.dataSuffix=="string"?e.dataSuffix:(B=e.dataSuffix)==null?void 0:B.value,gas:f,gasPrice:m,maxFeePerBlobGas:g,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:b,pollingInterval:C,throwOnReceiptRevert:j,type:I,value:A,...S}=t,N=t.timeout??Math.max(((o==null?void 0:o.blockTime)??0)*3,5e3);if(typeof n>"u")throw new Ps({docsPath:"/docs/actions/wallet/sendTransactionSync"});const T=n?nt(n):null;try{Bo(t);const W=await(async()=>{if(t.to)return t.to;if(t.to!==null&&l&&l.length>0)return await Xf({authorization:l[0]}).catch(()=>{throw new oe("`to` is required. Could not infer from `authorizationList`.")})})();if((T==null?void 0:T.type)==="json-rpc"||T===null){let L;o!==null&&(L=await ve(e,Ns,"getChainId")({}),r&&$y({currentChainId:L,chain:o}));const J=(H=(M=(R=e.chain)==null?void 0:R.formatters)==null?void 0:M.transactionRequest)==null?void 0:H.format,G=(J||Is)({...cl(S,{format:J}),accessList:i,account:T,authorizationList:l,blobs:c,chainId:L,data:u&&rn([u,p??"0x"]),gas:f,gasPrice:m,maxFeePerBlobGas:g,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:b,to:W,type:I,value:A},"sendTransaction"),ee=D0.get(e.uid),F=ee?"wallet_sendTransaction":"eth_sendTransaction",K=await(async()=>{try{return await e.request({method:F,params:[G]},{retryCount:0})}catch(U){if(ee===!1)throw U;const X=U;if(X.name==="InvalidInputRpcError"||X.name==="InvalidParamsRpcError"||X.name==="MethodNotFoundRpcError"||X.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[G]},{retryCount:0}).then(he=>(D0.set(e.uid,!0),he)).catch(he=>{const se=he;throw se.name==="MethodNotFoundRpcError"||se.name==="MethodNotSupportedRpcError"?(D0.set(e.uid,!1),X):se});throw X}})(),Y=await ve(e,TC,"waitForTransactionReceipt")({checkReplacement:!1,hash:K,pollingInterval:C,timeout:N});if(j&&Y.status==="reverted")throw new X5({receipt:Y});return Y}if((T==null?void 0:T.type)==="local"){const L=await ve(e,xu,"prepareTransactionRequest")({account:T,accessList:i,authorizationList:l,blobs:c,chain:o,data:u&&rn([u,p??"0x"]),gas:f,gasPrice:m,maxFeePerBlobGas:g,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:b,nonceManager:T.nonceManager,parameters:[...Fy,"sidecars"],type:I,value:A,...S,to:W}),J=(V=o==null?void 0:o.serializers)==null?void 0:V.transaction,O=await T.signTransaction(L,{serializer:J});return await ve(e,Xy,"sendRawTransactionSync")({serializedTransaction:O,throwOnReceiptRevert:j,timeout:t.timeout})}throw(T==null?void 0:T.type)==="smart"?new pi({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new pi({docsPath:"/docs/actions/wallet/sendTransactionSync",type:T==null?void 0:T.type})}catch(W){throw W instanceof pi?W:th(W,{...t,account:T,chain:t.chain||void 0})}}async function FB(e,t){const{id:n}=t;await e.request({method:"wallet_showCallsStatus",params:[n]})}async function LB(e,t){const{account:n=e.account}=t;if(!n)throw new Ps({docsPath:"/docs/eip7702/signAuthorization"});const r=nt(n);if(!r.signAuthorization)throw new pi({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:r.type});const o=await FC(e,t);return r.signAuthorization(o)}async function UC(e,{account:t=e.account,message:n}){if(!t)throw new Ps({docsPath:"/docs/actions/wallet/signMessage"});const r=nt(t);if(r.signMessage)return r.signMessage({message:n});const o=typeof n=="string"?qa(n):n.raw instanceof Uint8Array?jo(n.raw):n.raw;return e.request({method:"personal_sign",params:[o,r.address]},{retryCount:0})}async function DB(e,t){var p,f,m,g;const{account:n=e.account,chain:r=e.chain,...o}=t;if(!n)throw new Ps({docsPath:"/docs/actions/wallet/signTransaction"});const i=nt(n);Bo({account:i,...t});const l=await ve(e,Ns,"getChainId")({});r!==null&&$y({currentChainId:l,chain:r});const c=(r==null?void 0:r.formatters)||((p=e.chain)==null?void 0:p.formatters),u=((f=c==null?void 0:c.transactionRequest)==null?void 0:f.format)||Is;return i.signTransaction?i.signTransaction({...o,chainId:l},{serializer:(g=(m=e.chain)==null?void 0:m.serializers)==null?void 0:g.transaction}):await e.request({method:"eth_signTransaction",params:[{...u({...o,account:i},"signTransaction"),chainId:ge(l),from:i.address}]},{retryCount:0})}async function UB(e,t){const{account:n=e.account,domain:r,message:o,primaryType:i}=t;if(!n)throw new Ps({docsPath:"/docs/actions/wallet/signTypedData"});const l=nt(n),c={EIP712Domain:J3({domain:r}),...t.types};if(Y3({domain:r,message:o,primaryType:i,types:c}),l.signTypedData)return l.signTypedData({domain:r,message:o,primaryType:i,types:c});const u=jN({domain:r,message:o,primaryType:i,types:c});return e.request({method:"eth_signTypedData_v4",params:[l.address,u]},{retryCount:0})}async function $B(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:ge(t)}]},{retryCount:0})}async function zB(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}async function $c(e,t){return $c.internal(e,lh,"sendTransaction",t)}(function(e){async function t(n,r,o,i){const{abi:l,account:c=n.account,address:u,args:p,functionName:f,...m}=i;if(typeof c>"u")throw new Ps({docsPath:"/docs/contract/writeContract"});const g=c?nt(c):null,v=_n({abi:l,args:p,functionName:f});try{return await ve(n,r,o)({data:v,to:u,account:g,...m})}catch(w){throw wi(w,{abi:l,address:u,args:p,docsPath:"/docs/contract/writeContract",functionName:f,sender:g==null?void 0:g.address})}}e.internal=t})($c||($c={}));async function WB(e,t){return $c.internal(e,DC,"sendTransactionSync",t)}function dl(e,t,n){const r=e[t.name];if(typeof r=="function")return r;const o=e[n];return typeof o=="function"?o:i=>t(e,i)}const cf="2.22.1",qB=()=>`@wagmi/core@${cf}`;var $C=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},Ef,zC;let To=class lg extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return qB()}constructor(t,n={}){var i;super(),Ef.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 r=n.cause instanceof lg?n.cause.details:(i=n.cause)!=null&&i.message?n.cause.message:n.details,o=n.cause instanceof lg&&n.cause.docsPath||n.docsPath;this.message=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...o?[`Docs: ${this.docsBaseUrl}${o}.html${n.docsSlug?`#${n.docsSlug}`:""}`]:[],...r?[`Details: ${r}`]:[],`Version: ${this.version}`].join(`
|
|
84
|
-
`),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=o,this.metaMessages=n.metaMessages,this.shortMessage=t}walk(t){return $C(this,Ef,"m",zC).call(this,this,t)}};Ef=new WeakSet,zC=function e(t,n){return n!=null&&n(t)?t:t.cause?$C(this,Ef,"m",e).call(this,t.cause,n):t};class As extends To{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}class HB extends To{constructor(){super("Connector already connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAlreadyConnectedError"})}}class VB extends To{constructor(){super("Connector not connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorNotConnectedError"})}}class QB extends To{constructor({address:t,connector:n}){super(`Account "${t}" not found for connector "${n.name}".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAccountNotFoundError"})}}class GB extends To{constructor({connectionChainId:t,connectorChainId:n}){super(`The current chain of the connector (id: ${n}) does not match the connection's chain (id: ${t}).`,{metaMessages:[`Current Chain ID: ${n}`,`Expected Chain ID: ${t}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorChainMismatchError"})}}class KB extends To{constructor({connector:t}){super(`Connector "${t.name}" unavailable while reconnecting.`,{details:["During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uid`.","All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored.","This error commonly occurs for connectors that asynchronously inject after reconnection has already started."].join(" ")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorUnavailableReconnectingError"})}}async function YB(e,t){var r;let n;if(typeof t.connector=="function"?n=e._internal.connectors.setup(t.connector):n=t.connector,n.uid===e.state.current)throw new HB;try{e.setState(c=>({...c,status:"connecting"})),n.emitter.emit("message",{type:"connecting"});const{connector:o,...i}=t,l=await n.connect(i);return n.emitter.off("connect",e._internal.events.connect),n.emitter.on("change",e._internal.events.change),n.emitter.on("disconnect",e._internal.events.disconnect),await((r=e.storage)==null?void 0:r.setItem("recentConnectorId",n.id)),e.setState(c=>({...c,connections:new Map(c.connections).set(n.uid,{accounts:i.withCapabilities?l.accounts.map(u=>typeof u=="object"?u.address:u):l.accounts,chainId:l.chainId,connector:n}),current:n.uid,status:"connected"})),{accounts:i.withCapabilities?l.accounts.map(c=>typeof c=="object"?c:{address:c,capabilities:{}}):l.accounts,chainId:l.chainId}}catch(o){throw e.setState(i=>({...i,status:i.current?"connected":"disconnected"})),o}}const cg=256;let Hd=cg,Vd;function WC(e=11){if(!Vd||Hd+e>cg*2){Vd="",Hd=0;for(let t=0;t<cg;t++)Vd+=(256+Math.random()*256|0).toString(16).substring(1)}return Vd.substring(Hd,Hd+++e)}function qC(e){const{batch:t,chain:n,ccipRead:r,dataSuffix:o,key:i="base",name:l="Base Client",type:c="base"}=e,u=e.experimental_blockTag??(typeof(n==null?void 0:n.experimental_preconfirmationTime)=="number"?"pending":void 0),p=(n==null?void 0:n.blockTime)??12e3,f=Math.min(Math.max(Math.floor(p/2),500),4e3),m=e.pollingInterval??f,g=e.cacheTime??m,v=e.account?nt(e.account):void 0,{config:w,request:b,value:C}=e.transport({account:v,chain:n,pollingInterval:m}),j={...w,...C},I={account:v,batch:t,cacheTime:g,ccipRead:r,chain:n,dataSuffix:o,key:i,name:l,pollingInterval:m,request:b,transport:j,type:c,uid:WC(),...u?{experimental_blockTag:u}:{}};function A(S){return N=>{const T=N(S);for(const R in I)delete T[R];const B={...S,...T};return Object.assign(B,{extend:A(B)})}}return Object.assign(I,{extend:A(I)})}function JB(e){var m,g,v;const{scheme:t,statement:n,...r}=((m=e.match(ZB))==null?void 0:m.groups)??{},{chainId:o,expirationTime:i,issuedAt:l,notBefore:c,requestId:u,...p}=((g=e.match(XB))==null?void 0:g.groups)??{},f=(v=e.split("Resources:")[1])==null?void 0:v.split(`
|
|
85
|
-
- `).slice(1);return{...r,...p,...o?{chainId:Number(o)}:{},...i?{expirationTime:new Date(i)}:{},...l?{issuedAt:new Date(l)}:{},...c?{notBefore:new Date(c)}:{},...u?{requestId:u}:{},...f?{resources:f}:{},...t?{scheme:t}:{},...n?{statement:n}:{}}}const ZB=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,XB=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;function eT(e){const{address:t,domain:n,message:r,nonce:o,scheme:i,time:l=new Date}=e;if(n&&r.domain!==n||o&&r.nonce!==o||i&&r.scheme!==i||r.expirationTime&&l>=r.expirationTime||r.notBefore&&l<r.notBefore)return!1;try{if(!r.address||!Vn(r.address,{strict:!1})||t&&!Ka(r.address,t))return!1}catch{return!1}return!0}async function tT(e,t){const{address:n,domain:r,message:o,nonce:i,scheme:l,signature:c,time:u=new Date,...p}=t,f=JB(o);if(!f.address||!eT({address:n,domain:r,message:f,nonce:i,scheme:l,time:u}))return!1;const g=K3(o);return ah(e,{address:f.address,hash:g,signature:c,...p})}function nT(e){return{call:t=>wu(e,t),createAccessList:t=>j3(e,t),createBlockFilter:()=>b9(e),createContractEventFilter:t=>I3(e,t),createEventFilter:t=>N3(e,t),createPendingTransactionFilter:()=>P3(e),estimateContractGas:t=>Z9(e,t),estimateGas:t=>Ly(e,t),getBalance:t=>H3(e,t),getBlobBaseFee:()=>X9(e),getBlock:t=>Cr(e,t),getBlockNumber:t=>Cu(e,t),getBlockTransactionCount:t=>sN(e,t),getBytecode:t=>xf(e,t),getChainId:()=>Ns(e),getCode:t=>xf(e,t),getContractEvents:t=>V3(e,t),getDelegation:t=>lN(e,t),getEip712Domain:t=>uN(e,t),getEnsAddress:t=>i9(e,t),getEnsAvatar:t=>A3(e,t),getEnsName:t=>S3(e,t),getEnsResolver:t=>w9(e,t),getEnsText:t=>E3(e,t),getFeeHistory:t=>hN(e,t),estimateFeesPerGas:t=>_9(e,t),getFilterChanges:t=>nh(e,t),getFilterLogs:t=>pN(e,t),getGasPrice:()=>_y(e),getLogs:t=>Uy(e,t),getProof:t=>ZP(e,t),estimateMaxPriorityFeePerGas:t=>T9(e,t),fillTransaction:t=>My(e,t),getStorageAt:t=>XP(e,t),getTransaction:t=>Jy(e,t),getTransactionConfirmations:t=>eB(e,t),getTransactionCount:t=>Ry(e,t),getTransactionReceipt:t=>lf(e,t),multicall:t=>SC(e,t),prepareTransactionRequest:t=>xu(e,t),readContract:t=>cr(e,t),sendRawTransaction:t=>Zy(e,t),sendRawTransactionSync:t=>Xy(e,t),simulate:t=>sg(e,t),simulateBlocks:t=>sg(e,t),simulateCalls:t=>uB(e,t),simulateContract:t=>dB(e,t),verifyHash:t=>ah(e,t),verifyMessage:t=>bB(e,t),verifySiweMessage:t=>tT(e,t),verifyTypedData:t=>xB(e,t),uninstallFilter:t=>ih(e,t),waitForTransactionReceipt:t=>TC(e,t),watchBlocks:t=>kB(e,t),watchBlockNumber:t=>BC(e,t),watchContractEvent:t=>EB(e,t),watchEvent:t=>AB(e,t),watchPendingTransactions:t=>SB(e,t)}}function rT(e){return{addChain:t=>jB(e,t),deployContract:t=>IB(e,t),fillTransaction:t=>My(e,t),getAddresses:()=>NB(e),getCallsStatus:t=>MC(e,t),getCapabilities:t=>PB(e,t),getChainId:()=>Ns(e),getPermissions:()=>BB(e),prepareAuthorization:t=>FC(e,t),prepareTransactionRequest:t=>xu(e,t),requestAddresses:()=>TB(e),requestPermissions:t=>_B(e,t),sendCalls:t=>OC(e,t),sendCallsSync:t=>MB(e,t),sendRawTransaction:t=>Zy(e,t),sendRawTransactionSync:t=>Xy(e,t),sendTransaction:t=>lh(e,t),sendTransactionSync:t=>DC(e,t),showCallsStatus:t=>FB(e,t),signAuthorization:t=>LB(e,t),signMessage:t=>UC(e,t),signTransaction:t=>DB(e,t),signTypedData:t=>UB(e,t),switchChain:t=>$B(e,t),waitForCallsStatus:t=>LC(e,t),watchAsset:t=>zB(e,t),writeContract:t=>$c(e,t),writeContractSync:t=>WB(e,t)}}function HC({key:e,methods:t,name:n,request:r,retryCount:o=3,retryDelay:i=150,timeout:l,type:c},u){const p=WC();return{config:{key:e,methods:t,name:n,request:r,retryCount:o,retryDelay:i,timeout:l,type:c},request:yN(r,{methods:t,retryCount:o,retryDelay:i,uid:p}),value:u}}function oT(e,t={}){const{key:n="custom",methods:r,name:o="Custom Provider",retryDelay:i}=t;return({retryCount:l})=>HC({key:n,methods:r,name:o,request:e.request.bind(e),retryCount:t.retryCount??l,retryDelay:i,type:"custom"})}class sT extends oe{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 VC(e,t={}){const{batch:n,fetchFn:r,fetchOptions:o,key:i="http",methods:l,name:c="HTTP JSON-RPC",onFetchRequest:u,onFetchResponse:p,retryDelay:f,raw:m}=t;return({chain:g,retryCount:v,timeout:w})=>{const{batchSize:b=1e3,wait:C=0}=typeof n=="object"?n:{},j=t.retryCount??v,I=w??t.timeout??1e4,A=e||(g==null?void 0:g.rpcUrls.default.http[0]);if(!A)throw new sT;const S=bN(A,{fetchFn:r,fetchOptions:o,onRequest:u,onResponse:p,timeout:I});return HC({key:i,methods:l,name:c,async request({method:N,params:T}){const B={method:N,params:T},{schedule:R}=b3({id:A,wait:C,shouldSplitBatch(W){return W.length>b},fn:W=>S.request({body:W}),sort:(W,L)=>W.id-L.id}),M=async W=>n?R(W):[await S.request({body:W})],[{error:H,result:V}]=await M(B);if(m)return{error:H,result:V};if(H)throw new by({body:B,error:H,url:A});return V},retryCount:j,retryDelay:f,timeout:I,type:"http"},{fetchOptions:o,url:A})}}async function QC(e,t={}){const{assertChainId:n=!0}=t;let r;if(t.connector){const{connector:f}=t;if(e.state.status==="reconnecting"&&!f.getAccounts&&!f.getChainId)throw new KB({connector:f});const[m,g]=await Promise.all([f.getAccounts().catch(v=>{if(t.account===null)return[];throw v}),f.getChainId()]);r={accounts:m,chainId:g,connector:f}}else r=e.state.connections.get(e.state.current);if(!r)throw new VB;const o=t.chainId??r.chainId,i=await r.connector.getChainId();if(n&&i!==o)throw new GB({connectionChainId:o,connectorChainId:i});const l=r.connector;if(l.getClient)return l.getClient({chainId:o});const c=nt(t.account??r.accounts[0]);if(c&&(c.address=vt(c.address)),t.account&&!r.accounts.some(f=>f.toLowerCase()===c.address.toLowerCase()))throw new QB({address:c.address,connector:l});const u=e.chains.find(f=>f.id===o),p=await r.connector.getProvider({chainId:o});return qC({account:c,chain:u,name:"Connector Client",transport:f=>oT(p)({...f,retryCount:0})})}async function iT(e,t={}){var o,i;let n;if(t.connector)n=t.connector;else{const{connections:l,current:c}=e.state,u=l.get(c);n=u==null?void 0:u.connector}const r=e.state.connections;n&&(await n.disconnect(),n.emitter.off("change",e._internal.events.change),n.emitter.off("disconnect",e._internal.events.disconnect),n.emitter.on("connect",e._internal.events.connect),r.delete(n.uid)),e.setState(l=>{if(r.size===0)return{...l,connections:new Map,current:null,status:"disconnected"};const c=r.values().next().value;return{...l,connections:new Map(r),current:c.connector.uid}});{const l=e.state.current;if(!l)return;const c=(o=e.state.connections.get(l))==null?void 0:o.connector;if(!c)return;await((i=e.storage)==null?void 0:i.setItem("recentConnectorId",c.id))}}function GC(e){return typeof e=="number"?e:e==="wei"?0:Math.abs(Y7[e])}function KC(e){const t=e.state.current,n=e.state.connections.get(t),r=n==null?void 0:n.accounts,o=r==null?void 0:r[0],i=e.chains.find(c=>c.id===(n==null?void 0:n.chainId)),l=e.state.status;switch(l){case"connected":return{address:o,addresses:r,chain:i,chainId:n==null?void 0:n.chainId,connector:n==null?void 0:n.connector,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:l};case"reconnecting":return{address:o,addresses:r,chain:i,chainId:n==null?void 0:n.chainId,connector:n==null?void 0:n.connector,isConnected:!!o,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:l};case"connecting":return{address:o,addresses:r,chain:i,chainId:n==null?void 0:n.chainId,connector:n==null?void 0:n.connector,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:l};case"disconnected":return{address:void 0,addresses:void 0,chain:void 0,chainId:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:l}}}async function aT(e,t){const{allowFailure:n=!0,chainId:r,contracts:o,...i}=t,l=e.getClient({chainId:r});return dl(l,SC,"multicall")({allowFailure:n,contracts:o,...i})}function lT(e,t){const{chainId:n,...r}=t,o=e.getClient({chainId:n});return dl(o,cr,"readContract")(r)}async function cT(e,t){var c;const{allowFailure:n=!0,blockNumber:r,blockTag:o,...i}=t,l=t.contracts;try{const u={};for(const[g,v]of l.entries()){const w=v.chainId??e.state.chainId;u[w]||(u[w]=[]),(c=u[w])==null||c.push({contract:v,index:g})}const p=()=>Object.entries(u).map(([g,v])=>aT(e,{...i,allowFailure:n,blockNumber:r,blockTag:o,chainId:Number.parseInt(g,10),contracts:v.map(({contract:w})=>w)})),f=(await Promise.all(p())).flat(),m=Object.values(u).flatMap(g=>g.map(({index:v})=>v));return f.reduce((g,v,w)=>(g&&(g[m[w]]=v),g),[])}catch(u){if(u instanceof yy)throw u;const p=()=>l.map(f=>lT(e,{...f,blockNumber:r,blockTag:o}));return n?(await Promise.allSettled(p())).map(f=>f.status==="fulfilled"?{result:f.value,status:"success"}:{error:f.reason,result:void 0,status:"failure"}):await Promise.all(p())}}async function uT(e,t){const{address:n,blockNumber:r,blockTag:o,chainId:i,token:l,unit:c="ether"}=t;if(l)try{return await tx(e,{balanceAddress:n,chainId:i,symbolType:"string",tokenAddress:l})}catch(g){if(g.name==="ContractFunctionExecutionError"){const v=await tx(e,{balanceAddress:n,chainId:i,symbolType:"bytes32",tokenAddress:l}),w=Vj(Wr(v.symbol,{dir:"right"}));return{...v,symbol:w}}throw g}const u=e.getClient({chainId:i}),f=await dl(u,H3,"getBalance")(r?{address:n,blockNumber:r}:{address:n,blockTag:o}),m=e.chains.find(g=>g.id===i)??u.chain;return{decimals:m.nativeCurrency.decimals,formatted:qf(f,GC(c)),symbol:m.nativeCurrency.symbol,value:f}}async function tx(e,t){const{balanceAddress:n,chainId:r,symbolType:o,tokenAddress:i,unit:l}=t,c={abi:[{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:o}]}],address:i},[u,p,f]=await cT(e,{allowFailure:!1,contracts:[{...c,functionName:"balanceOf",args:[n],chainId:r},{...c,functionName:"decimals",chainId:r},{...c,functionName:"symbol",chainId:r}]}),m=qf(u??"0",GC(l??p));return{decimals:p,formatted:m,symbol:f,value:u}}function nx(e){return e.state.chainId}function Ei(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let n,r;if(Array.isArray(e)&&Array.isArray(t)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ei(e[r],t[r]))return!1;return!0}if(typeof e.valueOf=="function"&&e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(typeof e.toString=="function"&&e.toString!==Object.prototype.toString)return e.toString()===t.toString();const o=Object.keys(e);if(n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.hasOwn(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(i&&!Ei(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}let U0=[];function rx(e){const t=e.chains;return Ei(U0,t)?U0:(U0=t,t)}function dT(e,t={}){try{return e.getClient(t)}catch{return}}let Qd=[];function ug(e){const t=[...e.state.connections.values()];return e.state.status==="reconnecting"||Ei(Qd,t)?Qd:(Qd=t,t)}let Gd=[];function ox(e){const t=e.connectors;return Gd.length===t.length&&Gd.every((n,r)=>n===t[r])?Gd:(Gd=t,t)}function fT(e,t){const{chainId:n,...r}=t,o=e.getClient({chainId:n});return dl(o,A3,"getEnsAvatar")(r)}function hT(e,t){const{chainId:n,...r}=t,o=e.getClient({chainId:n});return dl(o,S3,"getEnsName")(r)}function dg(e,t={}){const n=dT(e,t);return n==null?void 0:n.extend(nT)}async function pT(e,t={}){return(await QC(e,t)).extend(rT)}let $0=!1;async function mT(e,t={}){var p,f;if($0)return[];$0=!0,e.setState(m=>({...m,status:m.current?"reconnecting":"connecting"}));const n=[];if((p=t.connectors)!=null&&p.length)for(const m of t.connectors){let g;typeof m=="function"?g=e._internal.connectors.setup(m):g=m,n.push(g)}else n.push(...e.connectors);let r;try{r=await((f=e.storage)==null?void 0:f.getItem("recentConnectorId"))}catch{}const o={};for(const[,m]of e.state.connections)o[m.connector.id]=1;r&&(o[r]=0);const i=Object.keys(o).length>0?[...n].sort((m,g)=>(o[m.id]??10)-(o[g.id]??10)):n;let l=!1;const c=[],u=[];for(const m of i){const g=await m.getProvider().catch(()=>{});if(!g||u.some(b=>b===g)||!await m.isAuthorized())continue;const w=await m.connect({isReconnecting:!0}).catch(()=>null);w&&(m.emitter.off("connect",e._internal.events.connect),m.emitter.on("change",e._internal.events.change),m.emitter.on("disconnect",e._internal.events.disconnect),e.setState(b=>{const C=new Map(l?b.connections:new Map).set(m.uid,{accounts:w.accounts,chainId:w.chainId,connector:m});return{...b,current:l?b.current:m.uid,connections:C}}),c.push({accounts:w.accounts,chainId:w.chainId,connector:m}),u.push(g),l=!0)}return(e.state.status==="reconnecting"||e.state.status==="connecting")&&(l?e.setState(m=>({...m,status:"connected"})):e.setState(m=>({...m,connections:new Map,current:null,status:"disconnected"}))),$0=!1,c}async function gT(e,t){const{account:n,connector:r,...o}=t;let i;return typeof n=="object"&&n.type==="local"?i=e.getClient():i=await QC(e,{account:n,connector:r}),dl(i,UC,"signMessage")({...o,...n?{account:n}:{}})}class $n extends To{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}class yT extends To{constructor({connector:t}){super(`"${t.name}" does not support programmatic chain switching.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainNotSupportedError"})}}async function vT(e,t){var l;const{addEthereumChainParameter:n,chainId:r}=t,o=e.state.connections.get(((l=t.connector)==null?void 0:l.uid)??e.state.current);if(o){const c=o.connector;if(!c.switchChain)throw new yT({connector:c});return await c.switchChain({addEthereumChainParameter:n,chainId:r})}const i=e.chains.find(c=>c.id===r);if(!i)throw new As;return e.setState(c=>({...c,chainId:r})),i}function YC(e,t){const{onChange:n}=t;return e.subscribe(()=>KC(e),n,{equalityFn(r,o){const{connector:i,...l}=r,{connector:c,...u}=o;return Ei(l,u)&&(i==null?void 0:i.id)===(c==null?void 0:c.id)&&(i==null?void 0:i.uid)===(c==null?void 0:c.uid)}})}function wT(e,t){const{onChange:n}=t;return e.subscribe(r=>r.chainId,n)}function bT(e,t){const{onChange:n}=t;return e.subscribe(()=>ug(e),n,{equalityFn:Ei})}function xT(e,t){const{onChange:n}=t;return e._internal.connectors.subscribe((r,o)=>{n(Object.values(r),o)})}function CT(e,t){const{onChange:n}=t;return e.subscribe(()=>dg(e),n,{equalityFn(r,o){return(r==null?void 0:r.uid)===(o==null?void 0:o.uid)}})}ch.type="injected";function ch(e={}){const{shimDisconnect:t=!0,unstable_shimAsyncInject:n}=e;function r(){const u=e.target;if(typeof u=="function"){const p=u();if(p)return p}return typeof u=="object"?u:typeof u=="string"?{...kT[u]??{id:u,name:`${u[0].toUpperCase()}${u.slice(1)}`,provider:`is${u[0].toUpperCase()}${u.slice(1)}`}}:{id:"injected",name:"Injected",provider(p){return p==null?void 0:p.ethereum}}}let o,i,l,c;return u=>({get icon(){return r().icon},get id(){return r().id},get name(){return r().name},get supportsSimulation(){return!0},type:ch.type,async setup(){const p=await this.getProvider();p!=null&&p.on&&e.target&&(l||(l=this.onConnect.bind(this),p.on("connect",l)),o||(o=this.onAccountsChanged.bind(this),p.on("accountsChanged",o)))},async connect({chainId:p,isReconnecting:f,withCapabilities:m}={}){var w,b,C,j,I,A;const g=await this.getProvider();if(!g)throw new $n;let v=[];if(f)v=await this.getAccounts().catch(()=>[]);else if(t)try{v=(j=(C=(b=(w=(await g.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}))[0])==null?void 0:w.caveats)==null?void 0:b[0])==null?void 0:C.value)==null?void 0:j.map(N=>vt(N)),v.length>0&&(v=await this.getAccounts())}catch(S){const N=S;if(N.code===Ve.code)throw new Ve(N);if(N.code===qr.code)throw N}try{!(v!=null&&v.length)&&!f&&(v=(await g.request({method:"eth_requestAccounts"})).map(T=>vt(T))),l&&(g.removeListener("connect",l),l=void 0),o||(o=this.onAccountsChanged.bind(this),g.on("accountsChanged",o)),i||(i=this.onChainChanged.bind(this),g.on("chainChanged",i)),c||(c=this.onDisconnect.bind(this),g.on("disconnect",c));let S=await this.getChainId();if(p&&S!==p){const N=await this.switchChain({chainId:p}).catch(T=>{if(T.code===Ve.code)throw T;return{id:S}});S=(N==null?void 0:N.id)??S}return t&&await((I=u.storage)==null?void 0:I.removeItem(`${this.id}.disconnected`)),e.target||await((A=u.storage)==null?void 0:A.setItem("injected.connected",!0)),{accounts:m?v.map(N=>({address:N,capabilities:{}})):v,chainId:S}}catch(S){const N=S;throw N.code===Ve.code?new Ve(N):N.code===qr.code?new qr(N):N}},async disconnect(){var f,m;const p=await this.getProvider();if(!p)throw new $n;i&&(p.removeListener("chainChanged",i),i=void 0),c&&(p.removeListener("disconnect",c),c=void 0),l||(l=this.onConnect.bind(this),p.on("connect",l));try{await rh(()=>p.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}t&&await((f=u.storage)==null?void 0:f.setItem(`${this.id}.disconnected`,!0)),e.target||await((m=u.storage)==null?void 0:m.removeItem("injected.connected"))},async getAccounts(){const p=await this.getProvider();if(!p)throw new $n;return(await p.request({method:"eth_accounts"})).map(m=>vt(m))},async getChainId(){const p=await this.getProvider();if(!p)throw new $n;const f=await p.request({method:"eth_chainId"});return Number(f)},async getProvider(){if(typeof window>"u")return;let p;const f=r();return typeof f.provider=="function"?p=f.provider(window):typeof f.provider=="string"?p=uf(window,f.provider):p=f.provider,p&&!p.removeListener&&("off"in p&&typeof p.off=="function"?p.removeListener=p.off:p.removeListener=()=>{}),p},async isAuthorized(){var p,f;try{if(t&&await((p=u.storage)==null?void 0:p.getItem(`${this.id}.disconnected`))||!e.target&&!await((f=u.storage)==null?void 0:f.getItem("injected.connected")))return!1;if(!await this.getProvider()){if(n!==void 0&&n!==!1){const w=async()=>(typeof window<"u"&&window.removeEventListener("ethereum#initialized",w),!!await this.getProvider()),b=typeof n=="number"?n:1e3;if(await Promise.race([...typeof window<"u"?[new Promise(j=>window.addEventListener("ethereum#initialized",()=>j(w()),{once:!0}))]:[],new Promise(j=>setTimeout(()=>j(w()),b))]))return!0}throw new $n}return!!(await Ci(()=>this.getAccounts())).length}catch{return!1}},async switchChain({addEthereumChainParameter:p,chainId:f}){var w,b,C,j;const m=await this.getProvider();if(!m)throw new $n;const g=u.chains.find(I=>I.id===f);if(!g)throw new qn(new As);const v=new Promise(I=>{const A=(S=>{"chainId"in S&&S.chainId===f&&(u.emitter.off("change",A),I())});u.emitter.on("change",A)});try{return await Promise.all([m.request({method:"wallet_switchEthereumChain",params:[{chainId:ge(f)}]}).then(async()=>{await this.getChainId()===f&&u.emitter.emit("change",{chainId:f})}),v]),g}catch(I){const A=I;if(A.code===4902||((b=(w=A==null?void 0:A.data)==null?void 0:w.originalError)==null?void 0:b.code)===4902)try{const{default:S,...N}=g.blockExplorers??{};let T;p!=null&&p.blockExplorerUrls?T=p.blockExplorerUrls:S&&(T=[S.url,...Object.values(N).map(M=>M.url)]);let B;(C=p==null?void 0:p.rpcUrls)!=null&&C.length?B=p.rpcUrls:B=[((j=g.rpcUrls.default)==null?void 0:j.http[0])??""];const R={blockExplorerUrls:T,chainId:ge(f),chainName:(p==null?void 0:p.chainName)??g.name,iconUrls:p==null?void 0:p.iconUrls,nativeCurrency:(p==null?void 0:p.nativeCurrency)??g.nativeCurrency,rpcUrls:B};return await Promise.all([m.request({method:"wallet_addEthereumChain",params:[R]}).then(async()=>{if(await this.getChainId()===f)u.emitter.emit("change",{chainId:f});else throw new Ve(new Error("User rejected switch after adding network."))}),v]),g}catch(S){throw new Ve(S)}throw A.code===Ve.code?new Ve(A):new qn(A)}},async onAccountsChanged(p){var f;if(p.length===0)this.onDisconnect();else if(u.emitter.listenerCount("connect")){const m=(await this.getChainId()).toString();this.onConnect({chainId:m}),t&&await((f=u.storage)==null?void 0:f.removeItem(`${this.id}.disconnected`))}else u.emitter.emit("change",{accounts:p.map(m=>vt(m))})},onChainChanged(p){const f=Number(p);u.emitter.emit("change",{chainId:f})},async onConnect(p){const f=await this.getAccounts();if(f.length===0)return;const m=Number(p.chainId);u.emitter.emit("connect",{accounts:f,chainId:m});const g=await this.getProvider();g&&(l&&(g.removeListener("connect",l),l=void 0),o||(o=this.onAccountsChanged.bind(this),g.on("accountsChanged",o)),i||(i=this.onChainChanged.bind(this),g.on("chainChanged",i)),c||(c=this.onDisconnect.bind(this),g.on("disconnect",c)))},async onDisconnect(p){const f=await this.getProvider();p&&p.code===1013&&f&&(await this.getAccounts()).length||(u.emitter.emit("disconnect"),f&&(i&&(f.removeListener("chainChanged",i),i=void 0),c&&(f.removeListener("disconnect",c),c=void 0),l||(l=this.onConnect.bind(this),f.on("connect",l))))}})}const kT={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider(e){return e!=null&&e.coinbaseWalletExtension?e.coinbaseWalletExtension:uf(e,"isCoinbaseWallet")}},metaMask:{id:"metaMask",name:"MetaMask",provider(e){return uf(e,t=>{if(!t.isMetaMask||t.isBraveWallet&&!t._events&&!t._state)return!1;const n=["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPhantom","isPortal","isRabby","isTokenPocket","isTokenary","isUniswapWallet","isZerion"];for(const r of n)if(t[r])return!1;return!0})}},phantom:{id:"phantom",name:"Phantom",provider(e){var t,n;return(t=e==null?void 0:e.phantom)!=null&&t.ethereum?(n=e.phantom)==null?void 0:n.ethereum:uf(e,"isPhantom")}}};function uf(e,t){function n(o){return typeof t=="function"?t(o):typeof t=="string"?o[t]:!0}const r=e.ethereum;if(r!=null&&r.providers)return r.providers.find(o=>n(o));if(r&&n(r))return r}function ET(e){if(typeof window>"u")return;const t=n=>e(n.detail);return window.addEventListener("eip6963:announceProvider",t),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",t)}function AT(){const e=new Set;let t=[];const n=()=>ET(o=>{t.some(({info:i})=>i.uuid===o.info.uuid)||(t=[...t,o],e.forEach(i=>i(t,{added:[o]})))});let r=n();return{_listeners(){return e},clear(){e.forEach(o=>o([],{removed:[...t]})),t=[]},destroy(){this.clear(),e.clear(),r==null||r()},findProvider({rdns:o}){return t.find(i=>i.info.rdns===o)},getProviders(){return t},reset(){this.clear(),r==null||r(),r=n()},subscribe(o,{emitImmediately:i}={}){return e.add(o),i&&o(t,{added:t}),()=>e.delete(o)}}}const ST=e=>(t,n,r)=>{const o=r.subscribe;return r.subscribe=(l,c,u)=>{let p=l;if(c){const f=(u==null?void 0:u.equalityFn)||Object.is;let m=l(r.getState());p=g=>{const v=l(g);if(!f(m,v)){const w=m;c(m=v,w)}},u!=null&&u.fireImmediately&&c(m,m)}return o(p)},e(t,n,r)},jT=ST;function IT(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var i;const l=u=>u===null?null:JSON.parse(u,void 0),c=(i=n.getItem(o))!=null?i:null;return c instanceof Promise?c.then(l):l(c)},setItem:(o,i)=>n.setItem(o,JSON.stringify(i,void 0)),removeItem:o=>n.removeItem(o)}}const fg=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return fg(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return fg(r)(n)}}}},NT=(e,t)=>(n,r,o)=>{let i={storage:IT(()=>localStorage),partialize:b=>b,version:0,merge:(b,C)=>({...C,...b}),...t},l=!1;const c=new Set,u=new Set;let p=i.storage;if(!p)return e((...b)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...b)},r,o);const f=()=>{const b=i.partialize({...r()});return p.setItem(i.name,{state:b,version:i.version})},m=o.setState;o.setState=(b,C)=>{m(b,C),f()};const g=e((...b)=>{n(...b),f()},r,o);o.getInitialState=()=>g;let v;const w=()=>{var b,C;if(!p)return;l=!1,c.forEach(I=>{var A;return I((A=r())!=null?A:g)});const j=((C=i.onRehydrateStorage)==null?void 0:C.call(i,(b=r())!=null?b:g))||void 0;return fg(p.getItem.bind(p))(i.name).then(I=>{if(I)if(typeof I.version=="number"&&I.version!==i.version){if(i.migrate)return[!0,i.migrate(I.state,I.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,I.state];return[!1,void 0]}).then(I=>{var A;const[S,N]=I;if(v=i.merge(N,(A=r())!=null?A:g),n(v,!0),S)return f()}).then(()=>{j==null||j(v,void 0),v=r(),l=!0,u.forEach(I=>I(v))}).catch(I=>{j==null||j(void 0,I)})};return o.persist={setOptions:b=>{i={...i,...b},b.storage&&(p=b.storage)},clearStorage:()=>{p==null||p.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>w(),hasHydrated:()=>l,onHydrate:b=>(c.add(b),()=>{c.delete(b)}),onFinishHydration:b=>(u.add(b),()=>{u.delete(b)})},i.skipHydration||w(),v||g},PT=NT,sx=e=>{let t;const n=new Set,r=(p,f)=>{const m=typeof p=="function"?p(t):p;if(!Object.is(m,t)){const g=t;t=f??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(v=>v(t,g))}},o=()=>t,c={setState:r,getState:o,getInitialState:()=>u,subscribe:p=>(n.add(p),()=>n.delete(p))},u=t=e(r,o,c);return c},z0=e=>e?sx(e):sx;var W0={exports:{}},ix;function BT(){return ix||(ix=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function o(u,p,f){this.fn=u,this.context=p,this.once=f||!1}function i(u,p,f,m,g){if(typeof f!="function")throw new TypeError("The listener must be a function");var v=new o(f,m||u,g),w=n?n+p:p;return u._events[w]?u._events[w].fn?u._events[w]=[u._events[w],v]:u._events[w].push(v):(u._events[w]=v,u._eventsCount++),u}function l(u,p){--u._eventsCount===0?u._events=new r:delete u._events[p]}function c(){this._events=new r,this._eventsCount=0}c.prototype.eventNames=function(){var p=[],f,m;if(this._eventsCount===0)return p;for(m in f=this._events)t.call(f,m)&&p.push(n?m.slice(1):m);return Object.getOwnPropertySymbols?p.concat(Object.getOwnPropertySymbols(f)):p},c.prototype.listeners=function(p){var f=n?n+p:p,m=this._events[f];if(!m)return[];if(m.fn)return[m.fn];for(var g=0,v=m.length,w=new Array(v);g<v;g++)w[g]=m[g].fn;return w},c.prototype.listenerCount=function(p){var f=n?n+p:p,m=this._events[f];return m?m.fn?1:m.length:0},c.prototype.emit=function(p,f,m,g,v,w){var b=n?n+p:p;if(!this._events[b])return!1;var C=this._events[b],j=arguments.length,I,A;if(C.fn){switch(C.once&&this.removeListener(p,C.fn,void 0,!0),j){case 1:return C.fn.call(C.context),!0;case 2:return C.fn.call(C.context,f),!0;case 3:return C.fn.call(C.context,f,m),!0;case 4:return C.fn.call(C.context,f,m,g),!0;case 5:return C.fn.call(C.context,f,m,g,v),!0;case 6:return C.fn.call(C.context,f,m,g,v,w),!0}for(A=1,I=new Array(j-1);A<j;A++)I[A-1]=arguments[A];C.fn.apply(C.context,I)}else{var S=C.length,N;for(A=0;A<S;A++)switch(C[A].once&&this.removeListener(p,C[A].fn,void 0,!0),j){case 1:C[A].fn.call(C[A].context);break;case 2:C[A].fn.call(C[A].context,f);break;case 3:C[A].fn.call(C[A].context,f,m);break;case 4:C[A].fn.call(C[A].context,f,m,g);break;default:if(!I)for(N=1,I=new Array(j-1);N<j;N++)I[N-1]=arguments[N];C[A].fn.apply(C[A].context,I)}}return!0},c.prototype.on=function(p,f,m){return i(this,p,f,m,!1)},c.prototype.once=function(p,f,m){return i(this,p,f,m,!0)},c.prototype.removeListener=function(p,f,m,g){var v=n?n+p:p;if(!this._events[v])return this;if(!f)return l(this,v),this;var w=this._events[v];if(w.fn)w.fn===f&&(!g||w.once)&&(!m||w.context===m)&&l(this,v);else{for(var b=0,C=[],j=w.length;b<j;b++)(w[b].fn!==f||g&&!w[b].once||m&&w[b].context!==m)&&C.push(w[b]);C.length?this._events[v]=C.length===1?C[0]:C:l(this,v)}return this},c.prototype.removeAllListeners=function(p){var f;return p?(f=n?n+p:p,this._events[f]&&l(this,f)):(this._events=new r,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=n,c.EventEmitter=c,e.exports=c})(W0)),W0.exports}var TT=BT();const _T=s5(TT);class RT{constructor(t){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"_emitter",{enumerable:!0,configurable:!0,writable:!0,value:new _T})}on(t,n){this._emitter.on(t,n)}once(t,n){this._emitter.once(t,n)}off(t,n){this._emitter.off(t,n)}emit(t,...n){const r=n[0];this._emitter.emit(t,{uid:this.uid,...r})}listenerCount(t){return this._emitter.listenerCount(t)}}function OT(e){return new RT(e)}function MT(e,t){return JSON.parse(e,(n,r)=>{let o=r;return(o==null?void 0:o.__type)==="bigint"&&(o=BigInt(o.value)),(o==null?void 0:o.__type)==="Map"&&(o=new Map(o.value)),(t==null?void 0:t(n,o))??o})}function ax(e,t){return e.slice(0,t).join(".")||"."}function lx(e,t){const{length:n}=e;for(let r=0;r<n;++r)if(e[r]===t)return r+1;return 0}function FT(e,t){const n=typeof e=="function",r=typeof t=="function",o=[],i=[];return function(c,u){if(typeof u=="object")if(o.length){const p=lx(o,this);p===0?o[o.length]=this:(o.splice(p),i.splice(p)),i[i.length]=c;const f=lx(o,u);if(f!==0)return r?t.call(this,c,u,ax(i,f)):`[ref=${ax(i,f)}]`}else o[0]=u,i[0]=c;return n?e.call(this,c,u):u}}function LT(e,t,n,r){return JSON.stringify(e,FT((o,i)=>{let l=i;return typeof l=="bigint"&&(l={__type:"bigint",value:i.toString()}),l instanceof Map&&(l={__type:"Map",value:Array.from(i.entries())}),(t==null?void 0:t(o,l))??l},r),n??void 0)}function DT(e){const{deserialize:t=MT,key:n="wagmi",serialize:r=LT,storage:o=JC}=e;function i(l){return l instanceof Promise?l.then(c=>c).catch(()=>null):l}return{...o,key:n,async getItem(l,c){const u=o.getItem(`${n}.${l}`),p=await i(u);return p?t(p)??null:c??null},async setItem(l,c){const u=`${n}.${l}`;c===null?await i(o.removeItem(u)):await i(o.setItem(u,r(c)))},async removeItem(l){await i(o.removeItem(`${n}.${l}`))}}}const JC={getItem:()=>null,setItem:()=>{},removeItem:()=>{}};function UT(){const e=typeof window<"u"&&window.localStorage?window.localStorage:JC;return{getItem(t){return e.getItem(t)},removeItem(t){e.removeItem(t)},setItem(t,n){try{e.setItem(t,n)}catch{}}}}const hg=256;let Kd=hg,Yd;function $T(e=11){if(!Yd||Kd+e>hg*2){Yd="",Kd=0;for(let t=0;t<hg;t++)Yd+=(256+Math.random()*256|0).toString(16).substring(1)}return Yd.substring(Kd,Kd+++e)}function zT(e){const{multiInjectedProviderDiscovery:t=!0,storage:n=DT({storage:UT()}),syncConnectedChain:r=!0,ssr:o=!1,...i}=e,l=typeof window<"u"&&t?AT():void 0,c=z0(()=>i.chains),u=z0(()=>{const N=[],T=new Set;for(const B of i.connectors??[]){const R=p(B);if(N.push(R),!o&&R.rdns){const M=typeof R.rdns=="string"?[R.rdns]:R.rdns;for(const H of M)T.add(H)}}if(!o&&l){const B=l.getProviders();for(const R of B)T.has(R.info.rdns)||N.push(p(f(R)))}return N});function p(N){var R;const T=OT($T()),B={...N({emitter:T,chains:c.getState(),storage:n,transports:i.transports}),emitter:T,uid:T.uid};return T.on("connect",A),(R=B.setup)==null||R.call(B),B}function f(N){const{info:T}=N,B=N.provider;return ch({target:{...T,id:T.rdns,provider:B}})}const m=new Map;function g(N={}){const T=N.chainId??C.getState().chainId,B=c.getState().find(M=>M.id===T);if(N.chainId&&!B)throw new As;{const M=m.get(C.getState().chainId);if(M&&!B)return M;if(!B)throw new As}{const M=m.get(T);if(M)return M}let R;if(i.client)R=i.client({chain:B});else{const M=B.id,H=c.getState().map(L=>L.id),V={},W=Object.entries(i);for(const[L,J]of W)if(!(L==="chains"||L==="client"||L==="connectors"||L==="transports"))if(typeof J=="object")if(M in J)V[L]=J[M];else{if(H.some(G=>G in J))continue;V[L]=J}else V[L]=J;R=qC({...V,chain:B,batch:V.batch??{multicall:!0},transport:L=>i.transports[M]({...L,connectors:u})})}return m.set(T,R),R}function v(){return{chainId:c.getState()[0].id,connections:new Map,current:null,status:"disconnected"}}let w;const b="0.0.0-canary-";cf.startsWith(b)?w=Number.parseInt(cf.replace(b,""),10):w=Number.parseInt(cf.split(".")[0]??"0",10);const C=z0(jT(n?PT(v,{migrate(N,T){if(T===w)return N;const B=v(),R=j(N,B.chainId);return{...B,chainId:R}},name:"store",partialize(N){return{connections:{__type:"Map",value:Array.from(N.connections.entries()).map(([T,B])=>{const{id:R,name:M,type:H,uid:V}=B.connector;return[T,{...B,connector:{id:R,name:M,type:H,uid:V}}]})},chainId:N.chainId,current:N.current}},merge(N,T){typeof N=="object"&&N&&"status"in N&&delete N.status;const B=j(N,T.chainId);return{...T,...N,chainId:B}},skipHydration:o,storage:n,version:w}):v));C.setState(v());function j(N,T){return N&&typeof N=="object"&&"chainId"in N&&typeof N.chainId=="number"&&c.getState().some(B=>B.id===N.chainId)?N.chainId:T}r&&C.subscribe(({connections:N,current:T})=>{var B;return T?(B=N.get(T))==null?void 0:B.chainId:void 0},N=>{if(c.getState().some(B=>B.id===N))return C.setState(B=>({...B,chainId:N??B.chainId}))}),l==null||l.subscribe(N=>{const T=new Set,B=new Set;for(const M of u.getState())if(T.add(M.id),M.rdns){const H=typeof M.rdns=="string"?[M.rdns]:M.rdns;for(const V of H)B.add(V)}const R=[];for(const M of N){if(B.has(M.info.rdns))continue;const H=p(f(M));T.has(H.id)||R.push(H)}n&&!C.persist.hasHydrated()||u.setState(M=>[...M,...R],!0)});function I(N){C.setState(T=>{const B=T.connections.get(N.uid);return B?{...T,connections:new Map(T.connections).set(N.uid,{accounts:N.accounts??B.accounts,chainId:N.chainId??B.chainId,connector:B.connector})}:T})}function A(N){C.getState().status==="connecting"||C.getState().status==="reconnecting"||C.setState(T=>{const B=u.getState().find(R=>R.uid===N.uid);return B?(B.emitter.listenerCount("connect")&&B.emitter.off("connect",I),B.emitter.listenerCount("change")||B.emitter.on("change",I),B.emitter.listenerCount("disconnect")||B.emitter.on("disconnect",S),{...T,connections:new Map(T.connections).set(N.uid,{accounts:N.accounts,chainId:N.chainId,connector:B}),current:N.uid,status:"connected"}):T})}function S(N){C.setState(T=>{const B=T.connections.get(N.uid);if(B){const M=B.connector;M.emitter.listenerCount("change")&&B.connector.emitter.off("change",I),M.emitter.listenerCount("disconnect")&&B.connector.emitter.off("disconnect",S),M.emitter.listenerCount("connect")||B.connector.emitter.on("connect",A)}if(T.connections.delete(N.uid),T.connections.size===0)return{...T,connections:new Map,current:null,status:"disconnected"};const R=T.connections.values().next().value;return{...T,connections:new Map(T.connections),current:R.connector.uid}})}return{get chains(){return c.getState()},get connectors(){return u.getState()},storage:n,getClient:g,get state(){return C.getState()},setState(N){let T;typeof N=="function"?T=N(C.getState()):T=N;const B=v();typeof T!="object"&&(T=B),Object.keys(B).some(M=>!(M in T))&&(T=B),C.setState(T,!0)},subscribe(N,T,B){return C.subscribe(N,T,B?{...B,fireImmediately:B.emitImmediately}:void 0)},_internal:{mipd:l,async revalidate(){const N=C.getState(),T=N.connections;let B=N.current;for(const[,R]of T){const M=R.connector;M.isAuthorized&&await M.isAuthorized()||(T.delete(M.uid),B===M.uid&&(B=null))}C.setState(R=>({...R,connections:T,current:B}))},store:C,ssr:!!o,syncConnectedChain:r,transports:i.transports,chains:{setState(N){const T=typeof N=="function"?N(c.getState()):N;if(T.length!==0)return c.setState(T,!0)},subscribe(N){return c.subscribe(N)}},connectors:{providerDetailToConnector:f,setup:p,setState(N){return u.setState(typeof N=="function"?N(u.getState()):N,!0)},subscribe(N){return u.subscribe(N)}},events:{change:I,connect:A,disconnect:S}}}}function WT(e,t){const{initialState:n,reconnectOnMount:r}=t;return n&&!e._internal.store.persist.hasHydrated()&&e.setState({...n,chainId:e.chains.some(o=>o.id===n.chainId)?n.chainId:e.chains[0].id,connections:r?n.connections:new Map,status:r?"reconnecting":"disconnected"}),{async onMount(){e._internal.ssr&&(await e._internal.store.persist.rehydrate(),e._internal.mipd&&e._internal.connectors.setState(o=>{var u;const i=new Set;for(const p of o??[])if(p.rdns){const f=Array.isArray(p.rdns)?p.rdns:[p.rdns];for(const m of f)i.add(m)}const l=[],c=((u=e._internal.mipd)==null?void 0:u.getProviders())??[];for(const p of c){if(i.has(p.info.rdns))continue;const f=e._internal.connectors.providerDetailToConnector(p),m=e._internal.connectors.setup(f);l.push(m)}return[...o,...l]})),r?mT(e):e.storage&&e.setState(o=>({...o,connections:new Map}))}}}function ZC(e){var i,l,c;const{chain:t}=e,n=t.rpcUrls.default.http[0];if(!e.transports)return[n];const r=(l=(i=e.transports)==null?void 0:i[t.id])==null?void 0:l.call(i,{chain:t});return(((c=r==null?void 0:r.value)==null?void 0:c.transports)||[r]).map(({value:u})=>(u==null?void 0:u.url)||n)}function qT(e){const{children:t,config:n,initialState:r,reconnectOnMount:o=!0}=e,{onMount:i}=WT(n,{initialState:r,reconnectOnMount:o});n._internal.ssr||i();const l=P.useRef(!0);return P.useEffect(()=>{if(l.current&&n._internal.ssr)return i(),()=>{l.current=!1}},[]),t}const XC=P.createContext(void 0);function HT(e){const{children:t,config:n}=e,r={value:n};return P.createElement(qT,e,P.createElement(XC.Provider,r,t))}const VT="2.19.5",QT=()=>`wagmi@${VT}`;class GT extends To{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 QT()}}class KT extends GT{constructor(){super("`useConfig` must be used within `WagmiProvider`.",{docsPath:"/api/WagmiProvider"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiProviderNotFoundError"})}}function jt(e={}){const t=e.config??P.useContext(XC);if(!t)throw new KT;return t}function YT(e,t){const{onChange:n}=t;return e._internal.chains.subscribe((r,o)=>{n(r,o)})}var q0={exports:{}},H0={},V0={exports:{}},Q0={};/**
|
|
86
|
-
* @license React
|
|
87
|
-
* use-sync-external-store-shim.production.js
|
|
88
|
-
*
|
|
89
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
90
|
-
*
|
|
91
|
-
* This source code is licensed under the MIT license found in the
|
|
92
|
-
* LICENSE file in the root directory of this source tree.
|
|
93
|
-
*/var cx;function JT(){if(cx)return Q0;cx=1;var e=cu();function t(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,l=e.useDebugValue;function c(m,g){var v=g(),w=r({inst:{value:v,getSnapshot:g}}),b=w[0].inst,C=w[1];return i(function(){b.value=v,b.getSnapshot=g,u(b)&&C({inst:b})},[m,v,g]),o(function(){return u(b)&&C({inst:b}),m(function(){u(b)&&C({inst:b})})},[m]),l(v),v}function u(m){var g=m.getSnapshot;m=m.value;try{var v=g();return!n(m,v)}catch{return!0}}function p(m,g){return g()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:c;return Q0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,Q0}var ux;function ZT(){return ux||(ux=1,V0.exports=JT()),V0.exports}/**
|
|
94
|
-
* @license React
|
|
95
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
96
|
-
*
|
|
97
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
98
|
-
*
|
|
99
|
-
* This source code is licensed under the MIT license found in the
|
|
100
|
-
* LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/var dx;function XT(){if(dx)return H0;dx=1;var e=cu(),t=ZT();function n(p,f){return p===f&&(p!==0||1/p===1/f)||p!==p&&f!==f}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,l=e.useEffect,c=e.useMemo,u=e.useDebugValue;return H0.useSyncExternalStoreWithSelector=function(p,f,m,g,v){var w=i(null);if(w.current===null){var b={hasValue:!1,value:null};w.current=b}else b=w.current;w=c(function(){function j(T){if(!I){if(I=!0,A=T,T=g(T),v!==void 0&&b.hasValue){var B=b.value;if(v(B,T))return S=B}return S=T}if(B=S,r(A,T))return B;var R=g(T);return v!==void 0&&v(B,R)?(A=T,B):(A=T,S=R)}var I=!1,A,S,N=m===void 0?null:m;return[function(){return j(f())},N===null?void 0:function(){return j(N())}]},[f,m,g,v]);var C=o(p,w[0],w[1]);return l(function(){b.hasValue=!0,b.value=C},[C]),u(C),C},H0}var fx;function e_(){return fx||(fx=1,q0.exports=XT()),q0.exports}var ek=e_();const G0=e=>typeof e=="object"&&!Array.isArray(e);function t_(e,t,n=t,r=Ei){const o=P.useRef([]),i=ek.useSyncExternalStoreWithSelector(e,t,n,l=>l,(l,c)=>{if(G0(l)&&G0(c)&&o.current.length){for(const u of o.current)if(!r(l[u],c[u]))return!1;return!0}return r(l,c)});return P.useMemo(()=>{if(G0(i)){const l={...i};let c={};for(const[u,p]of Object.entries(l))c={...c,[u]:{configurable:!1,enumerable:!0,get:()=>(o.current.includes(u)||o.current.push(u),p)}};return Object.defineProperties(l,c),l}return i},[i])}function zt(e={}){const t=jt(e);return t_(n=>YC(t,{onChange:n}),()=>KC(t))}function tk(e={}){const{onConnect:t,onDisconnect:n}=e,r=jt(e);P.useEffect(()=>YC(r,{onChange(o,i){if((i.status==="reconnecting"||i.status==="connecting"&&i.address===void 0)&&o.status==="connected"){const{address:l,addresses:c,chain:u,chainId:p,connector:f}=o,m=i.status==="reconnecting"||i.status===void 0;t==null||t({address:l,addresses:c,chain:u,chainId:p,connector:f,isReconnected:m})}else i.status==="connected"&&o.status==="disconnected"&&(n==null||n())}}),[r,t,n])}var fl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ri,ls,Pa,G2,n_=(G2=class extends fl{constructor(){super();je(this,ri);je(this,ls);je(this,Pa);pe(this,Pa,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){z(this,ls)||this.setEventListener(z(this,Pa))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,ls))==null||t.call(this),pe(this,ls,void 0))}setEventListener(t){var n;pe(this,Pa,t),(n=z(this,ls))==null||n.call(this),pe(this,ls,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){z(this,ri)!==t&&(pe(this,ri,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof z(this,ri)=="boolean"?z(this,ri):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ri=new WeakMap,ls=new WeakMap,Pa=new WeakMap,G2),e1=new n_,r_={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},cs,oy,K2,o_=(K2=class{constructor(){je(this,cs,r_);je(this,oy,!1)}setTimeoutProvider(e){pe(this,cs,e)}setTimeout(e,t){return z(this,cs).setTimeout(e,t)}clearTimeout(e){z(this,cs).clearTimeout(e)}setInterval(e,t){return z(this,cs).setInterval(e,t)}clearInterval(e){z(this,cs).clearInterval(e)}},cs=new WeakMap,oy=new WeakMap,K2),ei=new o_;function s_(e){setTimeout(e,0)}var i_=typeof window>"u"||"Deno"in globalThis;function dn(){}function a_(e,t){return typeof e=="function"?e(t):e}function pg(e){return typeof e=="number"&&e>=0&&e!==1/0}function nk(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ws(e,t){return typeof e=="function"?e(t):e}function or(e,t){return typeof e=="function"?e(t):e}function hx(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:l,stale:c}=e;if(l){if(r){if(t.queryHash!==t1(l,t.options))return!1}else if(!zc(t.queryKey,l))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||o&&o!==t.state.fetchStatus||i&&!i(t))}function px(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Ai(t.options.mutationKey)!==Ai(i))return!1}else if(!zc(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function t1(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ai)(e)}function Ai(e){return JSON.stringify(e,(t,n)=>mg(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function zc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>zc(e[n],t[n])):!1}var l_=Object.prototype.hasOwnProperty;function rk(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=mx(e)&&mx(t);if(!r&&!(mg(e)&&mg(t)))return t;const i=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),c=l.length,u=r?new Array(c):{};let p=0;for(let f=0;f<c;f++){const m=r?f:l[f],g=e[m],v=t[m];if(g===v){u[m]=g,(r?f<i:l_.call(e,m))&&p++;continue}if(g===null||v===null||typeof g!="object"||typeof v!="object"){u[m]=v;continue}const w=rk(g,v,n+1);u[m]=w,w===g&&p++}return i===c&&p===i?e:u}function Af(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function mx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function mg(e){if(!gx(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!gx(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function gx(e){return Object.prototype.toString.call(e)==="[object Object]"}function c_(e){return new Promise(t=>{ei.setTimeout(t,e)})}function gg(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?rk(e,t):t}function u_(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function d_(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var n1=Symbol();function ok(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===n1?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function r1(e,t){return typeof e=="function"?e(...t):!!e}function f_(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var Wc=(()=>{let e=()=>i_;return{isServer(){return e()},setIsServer(t){e=t}}})();function yg(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var h_=s_;function p_(){let e=[],t=0,n=c=>{c()},r=c=>{c()},o=h_;const i=c=>{t?e.push(c):o(()=>{n(c)})},l=()=>{const c=e;e=[],c.length&&o(()=>{r(()=>{c.forEach(u=>{n(u)})})})};return{batch:c=>{let u;t++;try{u=c()}finally{t--,t||l()}return u},batchCalls:c=>(...u)=>{i(()=>{c(...u)})},schedule:i,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{o=c}}}var Et=p_(),Ba,us,Ta,Y2,m_=(Y2=class extends fl{constructor(){super();je(this,Ba,!0);je(this,us);je(this,Ta);pe(this,Ta,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){z(this,us)||this.setEventListener(z(this,Ta))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,us))==null||t.call(this),pe(this,us,void 0))}setEventListener(t){var n;pe(this,Ta,t),(n=z(this,us))==null||n.call(this),pe(this,us,t(this.setOnline.bind(this)))}setOnline(t){z(this,Ba)!==t&&(pe(this,Ba,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return z(this,Ba)}},Ba=new WeakMap,us=new WeakMap,Ta=new WeakMap,Y2),Sf=new m_;function g_(e){return Math.min(1e3*2**e,3e4)}function sk(e){return(e??"online")==="online"?Sf.isOnline():!0}var vg=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ik(e){let t=!1,n=0,r;const o=yg(),i=()=>o.status!=="pending",l=b=>{var C;if(!i()){const j=new vg(b);g(j),(C=e.onCancel)==null||C.call(e,j)}},c=()=>{t=!0},u=()=>{t=!1},p=()=>e1.isFocused()&&(e.networkMode==="always"||Sf.isOnline())&&e.canRun(),f=()=>sk(e.networkMode)&&e.canRun(),m=b=>{i()||(r==null||r(),o.resolve(b))},g=b=>{i()||(r==null||r(),o.reject(b))},v=()=>new Promise(b=>{var C;r=j=>{(i()||p())&&b(j)},(C=e.onPause)==null||C.call(e)}).then(()=>{var b;r=void 0,i()||(b=e.onContinue)==null||b.call(e)}),w=()=>{if(i())return;let b;const C=n===0?e.initialPromise:void 0;try{b=C??e.fn()}catch(j){b=Promise.reject(j)}Promise.resolve(b).then(m).catch(j=>{var T;if(i())return;const I=e.retry??(Wc.isServer()?0:3),A=e.retryDelay??g_,S=typeof A=="function"?A(n,j):A,N=I===!0||typeof I=="number"&&n<I||typeof I=="function"&&I(n,j);if(t||!N){g(j);return}n++,(T=e.onFail)==null||T.call(e,n,j),c_(S).then(()=>p()?void 0:v()).then(()=>{t?g(j):w()})})};return{promise:o,status:()=>o.status,cancel:l,continue:()=>(r==null||r(),o),cancelRetry:c,continueRetry:u,canStart:f,start:()=>(f()?w():v().then(w),o)}}var oi,J2,ak=(J2=class{constructor(){je(this,oi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),pg(this.gcTime)&&pe(this,oi,ei.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Wc.isServer()?1/0:300*1e3))}clearGcTimeout(){z(this,oi)!==void 0&&(ei.clearTimeout(z(this,oi)),pe(this,oi,void 0))}},oi=new WeakMap,J2),si,_a,rr,ii,Tt,ou,ai,Un,lk,mo,Z2,y_=(Z2=class extends ak{constructor(t){super();je(this,Un);je(this,si);je(this,_a);je(this,rr);je(this,ii);je(this,Tt);je(this,ou);je(this,ai);pe(this,ai,!1),pe(this,ou,t.defaultOptions),this.setOptions(t.options),this.observers=[],pe(this,ii,t.client),pe(this,rr,z(this,ii).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,pe(this,si,vx(this.options)),this.state=t.state??z(this,si),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=z(this,Tt))==null?void 0:t.promise}setOptions(t){if(this.options={...z(this,ou),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=vx(this.options);n.data!==void 0&&(this.setState(yx(n.data,n.dataUpdatedAt)),pe(this,si,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&z(this,rr).remove(this)}setData(t,n){const r=gg(this.state.data,t,this.options);return Oe(this,Un,mo).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Oe(this,Un,mo).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=z(this,Tt))==null?void 0:r.promise;return(o=z(this,Tt))==null||o.cancel(t),n?n.then(dn).catch(dn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return z(this,si)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>or(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===n1||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ws(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!nk(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=z(this,Tt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=z(this,Tt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),z(this,rr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(z(this,Tt)&&(z(this,ai)||Oe(this,Un,lk).call(this)?z(this,Tt).cancel({revert:!0}):z(this,Tt).cancelRetry()),this.scheduleGc()),z(this,rr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Oe(this,Un,mo).call(this,{type:"invalidate"})}async fetch(t,n){var u,p,f,m,g,v,w,b,C,j,I,A;if(this.state.fetchStatus!=="idle"&&((u=z(this,Tt))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(z(this,Tt))return z(this,Tt).continueRetry(),z(this,Tt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const S=this.observers.find(N=>N.options.queryFn);S&&this.setOptions(S.options)}const r=new AbortController,o=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(pe(this,ai,!0),r.signal)})},i=()=>{const S=ok(this.options,n),T=(()=>{const B={client:z(this,ii),queryKey:this.queryKey,meta:this.meta};return o(B),B})();return pe(this,ai,!1),this.options.persister?this.options.persister(S,T,this):S(T)},c=(()=>{const S={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:z(this,ii),state:this.state,fetchFn:i};return o(S),S})();(p=this.options.behavior)==null||p.onFetch(c,this),pe(this,_a,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=c.fetchOptions)==null?void 0:f.meta))&&Oe(this,Un,mo).call(this,{type:"fetch",meta:(m=c.fetchOptions)==null?void 0:m.meta}),pe(this,Tt,ik({initialPromise:n==null?void 0:n.initialPromise,fn:c.fetchFn,onCancel:S=>{S instanceof vg&&S.revert&&this.setState({...z(this,_a),fetchStatus:"idle"}),r.abort()},onFail:(S,N)=>{Oe(this,Un,mo).call(this,{type:"failed",failureCount:S,error:N})},onPause:()=>{Oe(this,Un,mo).call(this,{type:"pause"})},onContinue:()=>{Oe(this,Un,mo).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const S=await z(this,Tt).start();if(S===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(S),(v=(g=z(this,rr).config).onSuccess)==null||v.call(g,S,this),(b=(w=z(this,rr).config).onSettled)==null||b.call(w,S,this.state.error,this),S}catch(S){if(S instanceof vg){if(S.silent)return z(this,Tt).promise;if(S.revert){if(this.state.data===void 0)throw S;return this.state.data}}throw Oe(this,Un,mo).call(this,{type:"error",error:S}),(j=(C=z(this,rr).config).onError)==null||j.call(C,S,this),(A=(I=z(this,rr).config).onSettled)==null||A.call(I,this.state.data,S,this),S}finally{this.scheduleGc()}}},si=new WeakMap,_a=new WeakMap,rr=new WeakMap,ii=new WeakMap,Tt=new WeakMap,ou=new WeakMap,ai=new WeakMap,Un=new WeakSet,lk=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},mo=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...ck(r.data,this.options),fetchMeta:t.meta??null};case"success":const o={...r,...yx(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return pe(this,_a,t.manual?o:void 0),o;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Et.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),z(this,rr).notify({query:this,type:"updated",action:t})})},Z2);function ck(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:sk(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function yx(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function vx(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var En,$e,su,cn,li,Ra,yo,ds,iu,Oa,Ma,ci,ui,fs,Fa,Qe,ac,wg,bg,xg,Cg,kg,Eg,Ag,uk,X2,v_=(X2=class extends fl{constructor(t,n){super();je(this,Qe);je(this,En);je(this,$e);je(this,su);je(this,cn);je(this,li);je(this,Ra);je(this,yo);je(this,ds);je(this,iu);je(this,Oa);je(this,Ma);je(this,ci);je(this,ui);je(this,fs);je(this,Fa,new Set);this.options=n,pe(this,En,t),pe(this,ds,null),pe(this,yo,yg()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(z(this,$e).addObserver(this),wx(z(this,$e),this.options)?Oe(this,Qe,ac).call(this):this.updateResult(),Oe(this,Qe,Cg).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Sg(z(this,$e),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Sg(z(this,$e),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Oe(this,Qe,kg).call(this),Oe(this,Qe,Eg).call(this),z(this,$e).removeObserver(this)}setOptions(t){const n=this.options,r=z(this,$e);if(this.options=z(this,En).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof or(this.options.enabled,z(this,$e))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Oe(this,Qe,Ag).call(this),z(this,$e).setOptions(this.options),n._defaulted&&!Af(this.options,n)&&z(this,En).getQueryCache().notify({type:"observerOptionsUpdated",query:z(this,$e),observer:this});const o=this.hasListeners();o&&bx(z(this,$e),r,this.options,n)&&Oe(this,Qe,ac).call(this),this.updateResult(),o&&(z(this,$e)!==r||or(this.options.enabled,z(this,$e))!==or(n.enabled,z(this,$e))||ws(this.options.staleTime,z(this,$e))!==ws(n.staleTime,z(this,$e)))&&Oe(this,Qe,wg).call(this);const i=Oe(this,Qe,bg).call(this);o&&(z(this,$e)!==r||or(this.options.enabled,z(this,$e))!==or(n.enabled,z(this,$e))||i!==z(this,fs))&&Oe(this,Qe,xg).call(this,i)}getOptimisticResult(t){const n=z(this,En).getQueryCache().build(z(this,En),t),r=this.createResult(n,t);return b_(this,r)&&(pe(this,cn,r),pe(this,Ra,this.options),pe(this,li,z(this,$e).state)),r}getCurrentResult(){return z(this,cn)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&z(this,yo).status==="pending"&&z(this,yo).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o))})}trackProp(t){z(this,Fa).add(t)}getCurrentQuery(){return z(this,$e)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=z(this,En).defaultQueryOptions(t),r=z(this,En).getQueryCache().build(z(this,En),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Oe(this,Qe,ac).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),z(this,cn)))}createResult(t,n){var M;const r=z(this,$e),o=this.options,i=z(this,cn),l=z(this,li),c=z(this,Ra),p=t!==r?t.state:z(this,su),{state:f}=t;let m={...f},g=!1,v;if(n._optimisticResults){const H=this.hasListeners(),V=!H&&wx(t,n),W=H&&bx(t,r,n,o);(V||W)&&(m={...m,...ck(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:w,errorUpdatedAt:b,status:C}=m;v=m.data;let j=!1;if(n.placeholderData!==void 0&&v===void 0&&C==="pending"){let H;i!=null&&i.isPlaceholderData&&n.placeholderData===(c==null?void 0:c.placeholderData)?(H=i.data,j=!0):H=typeof n.placeholderData=="function"?n.placeholderData((M=z(this,Ma))==null?void 0:M.state.data,z(this,Ma)):n.placeholderData,H!==void 0&&(C="success",v=gg(i==null?void 0:i.data,H,n),g=!0)}if(n.select&&v!==void 0&&!j)if(i&&v===(l==null?void 0:l.data)&&n.select===z(this,iu))v=z(this,Oa);else try{pe(this,iu,n.select),v=n.select(v),v=gg(i==null?void 0:i.data,v,n),pe(this,Oa,v),pe(this,ds,null)}catch(H){pe(this,ds,H)}z(this,ds)&&(w=z(this,ds),v=z(this,Oa),b=Date.now(),C="error");const I=m.fetchStatus==="fetching",A=C==="pending",S=C==="error",N=A&&I,T=v!==void 0,R={status:C,fetchStatus:m.fetchStatus,isPending:A,isSuccess:C==="success",isError:S,isInitialLoading:N,isLoading:N,data:v,dataUpdatedAt:m.dataUpdatedAt,error:w,errorUpdatedAt:b,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:m.dataUpdateCount>p.dataUpdateCount||m.errorUpdateCount>p.errorUpdateCount,isFetching:I,isRefetching:I&&!A,isLoadingError:S&&!T,isPaused:m.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:S&&T,isStale:o1(t,n),refetch:this.refetch,promise:z(this,yo),isEnabled:or(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const H=R.data!==void 0,V=R.status==="error"&&!H,W=O=>{V?O.reject(R.error):H&&O.resolve(R.data)},L=()=>{const O=pe(this,yo,R.promise=yg());W(O)},J=z(this,yo);switch(J.status){case"pending":t.queryHash===r.queryHash&&W(J);break;case"fulfilled":(V||R.data!==J.value)&&L();break;case"rejected":(!V||R.error!==J.reason)&&L();break}}return R}updateResult(){const t=z(this,cn),n=this.createResult(z(this,$e),this.options);if(pe(this,li,z(this,$e).state),pe(this,Ra,this.options),z(this,li).data!==void 0&&pe(this,Ma,z(this,$e)),Af(n,t))return;pe(this,cn,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,i=typeof o=="function"?o():o;if(i==="all"||!i&&!z(this,Fa).size)return!0;const l=new Set(i??z(this,Fa));return this.options.throwOnError&&l.add("error"),Object.keys(z(this,cn)).some(c=>{const u=c;return z(this,cn)[u]!==t[u]&&l.has(u)})};Oe(this,Qe,uk).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Oe(this,Qe,Cg).call(this)}},En=new WeakMap,$e=new WeakMap,su=new WeakMap,cn=new WeakMap,li=new WeakMap,Ra=new WeakMap,yo=new WeakMap,ds=new WeakMap,iu=new WeakMap,Oa=new WeakMap,Ma=new WeakMap,ci=new WeakMap,ui=new WeakMap,fs=new WeakMap,Fa=new WeakMap,Qe=new WeakSet,ac=function(t){Oe(this,Qe,Ag).call(this);let n=z(this,$e).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(dn)),n},wg=function(){Oe(this,Qe,kg).call(this);const t=ws(this.options.staleTime,z(this,$e));if(Wc.isServer()||z(this,cn).isStale||!pg(t))return;const r=nk(z(this,cn).dataUpdatedAt,t)+1;pe(this,ci,ei.setTimeout(()=>{z(this,cn).isStale||this.updateResult()},r))},bg=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(z(this,$e)):this.options.refetchInterval)??!1},xg=function(t){Oe(this,Qe,Eg).call(this),pe(this,fs,t),!(Wc.isServer()||or(this.options.enabled,z(this,$e))===!1||!pg(z(this,fs))||z(this,fs)===0)&&pe(this,ui,ei.setInterval(()=>{(this.options.refetchIntervalInBackground||e1.isFocused())&&Oe(this,Qe,ac).call(this)},z(this,fs)))},Cg=function(){Oe(this,Qe,wg).call(this),Oe(this,Qe,xg).call(this,Oe(this,Qe,bg).call(this))},kg=function(){z(this,ci)!==void 0&&(ei.clearTimeout(z(this,ci)),pe(this,ci,void 0))},Eg=function(){z(this,ui)!==void 0&&(ei.clearInterval(z(this,ui)),pe(this,ui,void 0))},Ag=function(){const t=z(this,En).getQueryCache().build(z(this,En),this.options);if(t===z(this,$e))return;const n=z(this,$e);pe(this,$e,t),pe(this,su,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},uk=function(t){Et.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(z(this,cn))}),z(this,En).getQueryCache().notify({query:z(this,$e),type:"observerResultsUpdated"})})},X2);function w_(e,t){return or(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function wx(e,t){return w_(e,t)||e.state.data!==void 0&&Sg(e,t,t.refetchOnMount)}function Sg(e,t,n){if(or(t.enabled,e)!==!1&&ws(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&o1(e,t)}return!1}function bx(e,t,n,r){return(e!==t||or(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&o1(e,n)}function o1(e,t){return or(t.enabled,e)!==!1&&e.isStaleByTime(ws(t.staleTime,e))}function b_(e,t){return!Af(e.getCurrentResult(),t)}function xx(e){return{onFetch:(t,n)=>{var f,m,g,v,w;const r=t.options,o=(g=(m=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:m.fetchMore)==null?void 0:g.direction,i=((v=t.state.data)==null?void 0:v.pages)||[],l=((w=t.state.data)==null?void 0:w.pageParams)||[];let c={pages:[],pageParams:[]},u=0;const p=async()=>{let b=!1;const C=A=>{f_(A,()=>t.signal,()=>b=!0)},j=ok(t.options,t.fetchOptions),I=async(A,S,N)=>{if(b)return Promise.reject();if(S==null&&A.pages.length)return Promise.resolve(A);const B=(()=>{const V={client:t.client,queryKey:t.queryKey,pageParam:S,direction:N?"backward":"forward",meta:t.options.meta};return C(V),V})(),R=await j(B),{maxPages:M}=t.options,H=N?d_:u_;return{pages:H(A.pages,R,M),pageParams:H(A.pageParams,S,M)}};if(o&&i.length){const A=o==="backward",S=A?x_:Cx,N={pages:i,pageParams:l},T=S(r,N);c=await I(N,T,A)}else{const A=e??i.length;do{const S=u===0?l[0]??r.initialPageParam:Cx(r,c);if(u>0&&S==null)break;c=await I(c,S),u++}while(u<A)}return c};t.options.persister?t.fetchFn=()=>{var b,C;return(C=(b=t.options).persister)==null?void 0:C.call(b,p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=p}}}function Cx(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function x_(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var au,Lr,Zt,di,Dr,is,e5,C_=(e5=class extends ak{constructor(t){super();je(this,Dr);je(this,au);je(this,Lr);je(this,Zt);je(this,di);pe(this,au,t.client),this.mutationId=t.mutationId,pe(this,Zt,t.mutationCache),pe(this,Lr,[]),this.state=t.state||dk(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){z(this,Lr).includes(t)||(z(this,Lr).push(t),this.clearGcTimeout(),z(this,Zt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){pe(this,Lr,z(this,Lr).filter(n=>n!==t)),this.scheduleGc(),z(this,Zt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){z(this,Lr).length||(this.state.status==="pending"?this.scheduleGc():z(this,Zt).remove(this))}continue(){var t;return((t=z(this,di))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,c,u,p,f,m,g,v,w,b,C,j,I,A,S,N,T,B;const n=()=>{Oe(this,Dr,is).call(this,{type:"continue"})},r={client:z(this,au),meta:this.options.meta,mutationKey:this.options.mutationKey};pe(this,di,ik({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(R,M)=>{Oe(this,Dr,is).call(this,{type:"failed",failureCount:R,error:M})},onPause:()=>{Oe(this,Dr,is).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>z(this,Zt).canRun(this)}));const o=this.state.status==="pending",i=!z(this,di).canStart();try{if(o)n();else{Oe(this,Dr,is).call(this,{type:"pending",variables:t,isPaused:i}),z(this,Zt).config.onMutate&&await z(this,Zt).config.onMutate(t,this,r);const M=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t,r));M!==this.state.context&&Oe(this,Dr,is).call(this,{type:"pending",context:M,variables:t,isPaused:i})}const R=await z(this,di).start();return await((p=(u=z(this,Zt).config).onSuccess)==null?void 0:p.call(u,R,t,this.state.context,this,r)),await((m=(f=this.options).onSuccess)==null?void 0:m.call(f,R,t,this.state.context,r)),await((v=(g=z(this,Zt).config).onSettled)==null?void 0:v.call(g,R,null,this.state.variables,this.state.context,this,r)),await((b=(w=this.options).onSettled)==null?void 0:b.call(w,R,null,t,this.state.context,r)),Oe(this,Dr,is).call(this,{type:"success",data:R}),R}catch(R){try{await((j=(C=z(this,Zt).config).onError)==null?void 0:j.call(C,R,t,this.state.context,this,r))}catch(M){Promise.reject(M)}try{await((A=(I=this.options).onError)==null?void 0:A.call(I,R,t,this.state.context,r))}catch(M){Promise.reject(M)}try{await((N=(S=z(this,Zt).config).onSettled)==null?void 0:N.call(S,void 0,R,this.state.variables,this.state.context,this,r))}catch(M){Promise.reject(M)}try{await((B=(T=this.options).onSettled)==null?void 0:B.call(T,void 0,R,t,this.state.context,r))}catch(M){Promise.reject(M)}throw Oe(this,Dr,is).call(this,{type:"error",error:R}),R}finally{z(this,Zt).runNext(this)}}},au=new WeakMap,Lr=new WeakMap,Zt=new WeakMap,di=new WeakMap,Dr=new WeakSet,is=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Et.batch(()=>{z(this,Lr).forEach(r=>{r.onMutationUpdate(t)}),z(this,Zt).notify({mutation:this,type:"updated",action:t})})},e5);function dk(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var vo,xr,lu,t5,k_=(t5=class extends fl{constructor(t={}){super();je(this,vo);je(this,xr);je(this,lu);this.config=t,pe(this,vo,new Set),pe(this,xr,new Map),pe(this,lu,0)}build(t,n,r){const o=new C_({client:t,mutationCache:this,mutationId:++Ld(this,lu)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){z(this,vo).add(t);const n=Jd(t);if(typeof n=="string"){const r=z(this,xr).get(n);r?r.push(t):z(this,xr).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(z(this,vo).delete(t)){const n=Jd(t);if(typeof n=="string"){const r=z(this,xr).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&z(this,xr).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Jd(t);if(typeof n=="string"){const r=z(this,xr).get(n),o=r==null?void 0:r.find(i=>i.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=Jd(t);if(typeof n=="string"){const o=(r=z(this,xr).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Et.batch(()=>{z(this,vo).forEach(t=>{this.notify({type:"removed",mutation:t})}),z(this,vo).clear(),z(this,xr).clear()})}getAll(){return Array.from(z(this,vo))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>px(n,r))}findAll(t={}){return this.getAll().filter(n=>px(t,n))}notify(t){Et.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Et.batch(()=>Promise.all(t.map(n=>n.continue().catch(dn))))}},vo=new WeakMap,xr=new WeakMap,lu=new WeakMap,t5);function Jd(e){var t;return(t=e.options.scope)==null?void 0:t.id}var wo,hs,An,bo,So,df,jg,n5,E_=(n5=class extends fl{constructor(n,r){super();je(this,So);je(this,wo);je(this,hs);je(this,An);je(this,bo);pe(this,wo,n),this.setOptions(r),this.bindMethods(),Oe(this,So,df).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=z(this,wo).defaultMutationOptions(n),Af(this.options,r)||z(this,wo).getMutationCache().notify({type:"observerOptionsUpdated",mutation:z(this,An),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Ai(r.mutationKey)!==Ai(this.options.mutationKey)?this.reset():((o=z(this,An))==null?void 0:o.state.status)==="pending"&&z(this,An).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=z(this,An))==null||n.removeObserver(this)}onMutationUpdate(n){Oe(this,So,df).call(this),Oe(this,So,jg).call(this,n)}getCurrentResult(){return z(this,hs)}reset(){var n;(n=z(this,An))==null||n.removeObserver(this),pe(this,An,void 0),Oe(this,So,df).call(this),Oe(this,So,jg).call(this)}mutate(n,r){var o;return pe(this,bo,r),(o=z(this,An))==null||o.removeObserver(this),pe(this,An,z(this,wo).getMutationCache().build(z(this,wo),this.options)),z(this,An).addObserver(this),z(this,An).execute(n)}},wo=new WeakMap,hs=new WeakMap,An=new WeakMap,bo=new WeakMap,So=new WeakSet,df=function(){var r;const n=((r=z(this,An))==null?void 0:r.state)??dk();pe(this,hs,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},jg=function(n){Et.batch(()=>{var r,o,i,l,c,u,p,f;if(z(this,bo)&&this.hasListeners()){const m=z(this,hs).variables,g=z(this,hs).context,v={client:z(this,wo),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(o=(r=z(this,bo)).onSuccess)==null||o.call(r,n.data,m,g,v)}catch(w){Promise.reject(w)}try{(l=(i=z(this,bo)).onSettled)==null||l.call(i,n.data,null,m,g,v)}catch(w){Promise.reject(w)}}else if((n==null?void 0:n.type)==="error"){try{(u=(c=z(this,bo)).onError)==null||u.call(c,n.error,m,g,v)}catch(w){Promise.reject(w)}try{(f=(p=z(this,bo)).onSettled)==null||f.call(p,void 0,n.error,m,g,v)}catch(w){Promise.reject(w)}}}this.listeners.forEach(m=>{m(z(this,hs))})})},n5),Ur,r5,A_=(r5=class extends fl{constructor(t={}){super();je(this,Ur);this.config=t,pe(this,Ur,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??t1(o,n);let l=this.get(i);return l||(l=new y_({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(l)),l}add(t){z(this,Ur).has(t.queryHash)||(z(this,Ur).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=z(this,Ur).get(t.queryHash);n&&(t.destroy(),n===t&&z(this,Ur).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Et.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return z(this,Ur).get(t)}getAll(){return[...z(this,Ur).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>hx(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>hx(t,r)):n}notify(t){Et.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Et.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Et.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ur=new WeakMap,r5),ct,ps,ms,La,Da,gs,Ua,$a,o5,S_=(o5=class{constructor(e={}){je(this,ct);je(this,ps);je(this,ms);je(this,La);je(this,Da);je(this,gs);je(this,Ua);je(this,$a);pe(this,ct,e.queryCache||new A_),pe(this,ps,e.mutationCache||new k_),pe(this,ms,e.defaultOptions||{}),pe(this,La,new Map),pe(this,Da,new Map),pe(this,gs,0)}mount(){Ld(this,gs)._++,z(this,gs)===1&&(pe(this,Ua,e1.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,ct).onFocus())})),pe(this,$a,Sf.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,ct).onOnline())})))}unmount(){var e,t;Ld(this,gs)._--,z(this,gs)===0&&((e=z(this,Ua))==null||e.call(this),pe(this,Ua,void 0),(t=z(this,$a))==null||t.call(this),pe(this,$a,void 0))}isFetching(e){return z(this,ct).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return z(this,ps).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=z(this,ct).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=z(this,ct).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ws(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return z(this,ct).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=z(this,ct).get(r.queryHash),i=o==null?void 0:o.state.data,l=a_(t,i);if(l!==void 0)return z(this,ct).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return Et.batch(()=>z(this,ct).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=z(this,ct).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=z(this,ct);Et.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=z(this,ct);return Et.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Et.batch(()=>z(this,ct).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(dn).catch(dn)}invalidateQueries(e,t={}){return Et.batch(()=>(z(this,ct).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Et.batch(()=>z(this,ct).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(dn)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(dn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=z(this,ct).build(this,t);return n.isStaleByTime(ws(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(dn).catch(dn)}fetchInfiniteQuery(e){return e.behavior=xx(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(dn).catch(dn)}ensureInfiniteQueryData(e){return e.behavior=xx(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Sf.isOnline()?z(this,ps).resumePausedMutations():Promise.resolve()}getQueryCache(){return z(this,ct)}getMutationCache(){return z(this,ps)}getDefaultOptions(){return z(this,ms)}setDefaultOptions(e){pe(this,ms,e)}setQueryDefaults(e,t){z(this,La).set(Ai(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...z(this,La).values()],n={};return t.forEach(r=>{zc(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){z(this,Da).set(Ai(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...z(this,Da).values()],n={};return t.forEach(r=>{zc(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...z(this,ms).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=t1(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===n1&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...z(this,ms).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){z(this,ct).clear(),z(this,ps).clear()}},ct=new WeakMap,ps=new WeakMap,ms=new WeakMap,La=new WeakMap,Da=new WeakMap,gs=new WeakMap,Ua=new WeakMap,$a=new WeakMap,o5);function j_(e){return JSON.stringify(e,(t,n)=>I_(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):typeof n=="bigint"?n.toString():n)}function I_(e){if(!kx(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!kx(n)||!n.hasOwnProperty("isPrototypeOf"))}function kx(e){return Object.prototype.toString.call(e)==="[object Object]"}function uh(e){const{_defaulted:t,behavior:n,gcTime:r,initialData:o,initialDataUpdatedAt:i,maxPages:l,meta:c,networkMode:u,queryFn:p,queryHash:f,queryKey:m,queryKeyHashFn:g,retry:v,retryDelay:w,structuralSharing:b,getPreviousPageParam:C,getNextPageParam:j,initialPageParam:I,_optimisticResults:A,enabled:S,notifyOnChangeProps:N,placeholderData:T,refetchInterval:B,refetchIntervalInBackground:R,refetchOnMount:M,refetchOnReconnect:H,refetchOnWindowFocus:V,retryOnMount:W,select:L,staleTime:J,suspense:O,throwOnError:G,config:ee,connector:F,query:K,...Y}=e;return Y}function N_(e){return{mutationFn(t){return YB(e,t)},mutationKey:["connect"]}}function P_(e){return{mutationFn(t){return iT(e,t)},mutationKey:["disconnect"]}}function B_(e,t={}){return{async queryFn({queryKey:n}){const{address:r,scopeKey:o,...i}=n[1];if(!r)throw new Error("address is required");return await uT(e,{...i,address:r})??null},queryKey:T_(t)}}function T_(e={}){return["balance",uh(e)]}function __(e,t={}){return{async queryFn({queryKey:n}){const{name:r,scopeKey:o,...i}=n[1];if(!r)throw new Error("name is required");return fT(e,{...i,name:r})},queryKey:R_(t)}}function R_(e={}){return["ensAvatar",uh(e)]}function O_(e,t={}){return{async queryFn({queryKey:n}){const{address:r,scopeKey:o,...i}=n[1];if(!r)throw new Error("address is required");return hT(e,{...i,address:r})},queryKey:M_(t)}}function M_(e={}){return["ensName",uh(e)]}function F_(e,t={}){return{gcTime:0,async queryFn({queryKey:n}){const{connector:r}=t,{connectorUid:o,scopeKey:i,...l}=n[1];return pT(e,{...l,connector:r})},queryKey:L_(t)}}function L_(e={}){const{connector:t,...n}=e;return["walletClient",{...uh(n),connectorUid:t==null?void 0:t.uid}]}function D_(e){return{mutationFn(t){return gT(e,t)},mutationKey:["signMessage"]}}function U_(e){return{mutationFn(t){return vT(e,t)},mutationKey:["switchChain"]}}var fk=P.createContext(void 0),s1=e=>{const t=P.useContext(fk);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},$_=({client:e,children:t})=>(P.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),h.jsx(fk.Provider,{value:e,children:t})),hk=P.createContext(!1),z_=()=>P.useContext(hk);hk.Provider;function W_(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var q_=P.createContext(W_()),H_=()=>P.useContext(q_),V_=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?r1(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Q_=e=>{P.useEffect(()=>{e.clearReset()},[e])},G_=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||r1(n,[e.error,r])),K_=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Y_=(e,t)=>e.isLoading&&e.isFetching&&!t,J_=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Ex=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Z_(e,t,n){var g,v,w,b;const r=z_(),o=H_(),i=s1(),l=i.defaultQueryOptions(e);(v=(g=i.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||v.call(g,l);const c=i.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",K_(l),V_(l,o,c),Q_(o);const u=!i.getQueryCache().get(l.queryHash),[p]=P.useState(()=>new t(i,l)),f=p.getOptimisticResult(l),m=!r&&e.subscribed!==!1;if(P.useSyncExternalStore(P.useCallback(C=>{const j=m?p.subscribe(Et.batchCalls(C)):dn;return p.updateResult(),j},[p,m]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),P.useEffect(()=>{p.setOptions(l)},[l,p]),J_(l,f))throw Ex(l,p,o);if(G_({result:f,errorResetBoundary:o,throwOnError:l.throwOnError,query:c,suspense:l.suspense}))throw f.error;if((b=(w=i.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||b.call(w,l,f),l.experimental_prefetchInRender&&!Wc.isServer()&&Y_(f,r)){const C=u?Ex(l,p,o):c==null?void 0:c.promise;C==null||C.catch(dn).finally(()=>{p.updateResult()})}return l.notifyOnChangeProps?f:p.trackResult(f)}function pk(e,t){return Z_(e,v_)}function dh(e,t){const n=s1(),[r]=P.useState(()=>new E_(n,e));P.useEffect(()=>{r.setOptions(e)},[r,e]);const o=P.useSyncExternalStore(P.useCallback(l=>r.subscribe(Et.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=P.useCallback((l,c)=>{r.mutate(l,c).catch(dn)},[r]);if(o.error&&r1(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}function fh(e){const t=pk({...e,queryKeyHashFn:j_});return t.queryKey=e.queryKey,t}function hh(e={}){const t=jt(e);return P.useSyncExternalStore(n=>wT(t,{onChange:n}),()=>nx(t),()=>nx(t))}function mk(e={}){const{address:t,query:n={}}=e,r=jt(e),o=hh({config:r}),i=B_(r,{...e,chainId:e.chainId??o}),l=!!(t&&(n.enabled??!0));return fh({...n,...i,enabled:l})}function X_(e={}){const t=jt(e);return P.useSyncExternalStore(n=>YT(t,{onChange:n}),()=>rx(t),()=>rx(t))}function eR(e={}){const t=jt(e);return P.useSyncExternalStore(n=>xT(t,{onChange:n}),()=>ox(t),()=>ox(t))}function tR(e={}){const{mutation:t}=e,n=jt(e),r=N_(n),{mutate:o,mutateAsync:i,...l}=dh({...t,...r});return P.useEffect(()=>n.subscribe(({status:c})=>c,(c,u)=>{u==="connected"&&c==="disconnected"&&l.reset()}),[n,l.reset]),{...l,connect:o,connectAsync:i,connectors:eR({config:n})}}function nR(e={}){const t=jt(e);return P.useSyncExternalStore(n=>bT(t,{onChange:n}),()=>ug(t),()=>ug(t))}function i1(e={}){const{mutation:t}=e,n=jt(e),r=P_(n),{mutate:o,mutateAsync:i,...l}=dh({...t,...r});return{...l,connectors:nR({config:n}).map(c=>c.connector),disconnect:o,disconnectAsync:i}}function rR(e={}){const{name:t,query:n={}}=e,r=jt(e),o=hh({config:r}),i=__(r,{...e,chainId:e.chainId??o}),l=!!(t&&(n.enabled??!0));return fh({...n,...i,enabled:l})}function oR(e={}){const{address:t,query:n={}}=e,r=jt(e),o=hh({config:r}),i=O_(r,{...e,chainId:e.chainId??o}),l=!!(t&&(n.enabled??!0));return fh({...n,...i,enabled:l})}function sR(e={}){const t=jt(e);return ek.useSyncExternalStoreWithSelector(n=>CT(t,{onChange:n}),()=>dg(t,e),()=>dg(t,e),n=>n,(n,r)=>(n==null?void 0:n.uid)===(r==null?void 0:r.uid))}function iR(e={}){const{mutation:t}=e,n=jt(e),r=D_(n),{mutate:o,mutateAsync:i,...l}=dh({...t,...r});return{...l,signMessage:o,signMessageAsync:i}}function aR(e={}){const{mutation:t}=e,n=jt(e),r=U_(n),{mutate:o,mutateAsync:i,...l}=dh({...t,...r});return{...l,chains:X_({config:n}),switchChain:o,switchChainAsync:i}}function gk(e={}){const{query:t={},...n}=e,r=jt(n),o=s1(),{address:i,connector:l,status:c}=zt({config:r}),u=hh({config:r}),p=e.connector??l,{queryKey:f,...m}=F_(r,{...e,chainId:e.chainId??u,connector:e.connector??l}),g=!!((c==="connected"||c==="reconnecting"&&(p!=null&&p.getProvider))&&(t.enabled??!0)),v=P.useRef(i);return P.useEffect(()=>{const w=v.current;!i&&w?(o.removeQueries({queryKey:f}),v.current=void 0):i!==w&&(o.invalidateQueries({queryKey:f}),v.current=i)},[i,o]),fh({...t,...m,queryKey:f,enabled:g,staleTime:Number.POSITIVE_INFINITY})}var Ax='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',lR={rounded:`SFRounded, ui-rounded, "SF Pro Rounded", ${Ax}`,system:Ax},rc={large:{actionButton:"9999px",connectButton:"12px",modal:"24px",modalMobile:"28px"},medium:{actionButton:"10px",connectButton:"8px",modal:"16px",modalMobile:"18px"},none:{actionButton:"0px",connectButton:"0px",modal:"0px",modalMobile:"0px"},small:{actionButton:"4px",connectButton:"4px",modal:"8px",modalMobile:"8px"}},cR={large:{modalOverlay:"blur(20px)"},none:{modalOverlay:"blur(0px)"},small:{modalOverlay:"blur(4px)"}},yk=({borderRadius:e="large",fontStack:t="rounded",overlayBlur:n="none"})=>({blurs:{modalOverlay:cR[n].modalOverlay},fonts:{body:lR[t]},radii:{actionButton:rc[e].actionButton,connectButton:rc[e].connectButton,menuButton:rc[e].connectButton,modal:rc[e].modal,modalMobile:rc[e].modalMobile}}),ff="#1A1B1F",vk={blue:{accentColor:"#3898FF",accentColorForeground:"#FFF"},green:{accentColor:"#4BD166",accentColorForeground:ff},orange:{accentColor:"#FF983D",accentColorForeground:ff},pink:{accentColor:"#FF7AB8",accentColorForeground:ff},purple:{accentColor:"#7A70FF",accentColorForeground:"#FFF"},red:{accentColor:"#FF6257",accentColorForeground:"#FFF"}},Sx=vk.blue,wk=({accentColor:e=Sx.accentColor,accentColorForeground:t=Sx.accentColorForeground,...n}={})=>({...yk(n),colors:{accentColor:e,accentColorForeground:t,actionButtonBorder:"rgba(255, 255, 255, 0.04)",actionButtonBorderMobile:"rgba(255, 255, 255, 0.08)",actionButtonSecondaryBackground:"rgba(255, 255, 255, 0.08)",closeButton:"rgba(224, 232, 255, 0.6)",closeButtonBackground:"rgba(255, 255, 255, 0.08)",connectButtonBackground:ff,connectButtonBackgroundError:"#FF494A",connectButtonInnerBackground:"linear-gradient(0deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.15))",connectButtonText:"#FFF",connectButtonTextError:"#FFF",connectionIndicator:"#30E000",downloadBottomCardBackground:"linear-gradient(126deg, rgba(0, 0, 0, 0) 9.49%, rgba(120, 120, 120, 0.2) 71.04%), #1A1B1F",downloadTopCardBackground:"linear-gradient(126deg, rgba(120, 120, 120, 0.2) 9.49%, rgba(0, 0, 0, 0) 71.04%), #1A1B1F",error:"#FF494A",generalBorder:"rgba(255, 255, 255, 0.08)",generalBorderDim:"rgba(255, 255, 255, 0.04)",menuItemBackground:"rgba(224, 232, 255, 0.1)",modalBackdrop:"rgba(0, 0, 0, 0.5)",modalBackground:"#1A1B1F",modalBorder:"rgba(255, 255, 255, 0.08)",modalText:"#FFF",modalTextDim:"rgba(224, 232, 255, 0.3)",modalTextSecondary:"rgba(255, 255, 255, 0.6)",profileAction:"rgba(224, 232, 255, 0.1)",profileActionHover:"rgba(224, 232, 255, 0.2)",profileForeground:"rgba(224, 232, 255, 0.05)",selectedOptionBorder:"rgba(224, 232, 255, 0.1)",standby:"#FFD641"},shadows:{connectButton:"0px 4px 12px rgba(0, 0, 0, 0.1)",dialog:"0px 8px 32px rgba(0, 0, 0, 0.32)",profileDetailsAction:"0px 2px 6px rgba(37, 41, 46, 0.04)",selectedOption:"0px 2px 6px rgba(0, 0, 0, 0.24)",selectedWallet:"0px 2px 6px rgba(0, 0, 0, 0.24)",walletLogo:"0px 2px 16px rgba(0, 0, 0, 0.16)"}});wk.accentColors=vk;var bk={blue:{accentColor:"#0E76FD",accentColorForeground:"#FFF"},green:{accentColor:"#1DB847",accentColorForeground:"#FFF"},orange:{accentColor:"#FF801F",accentColorForeground:"#FFF"},pink:{accentColor:"#FF5CA0",accentColorForeground:"#FFF"},purple:{accentColor:"#5F5AFA",accentColorForeground:"#FFF"},red:{accentColor:"#FA423C",accentColorForeground:"#FFF"}},jx=bk.blue,xk=({accentColor:e=jx.accentColor,accentColorForeground:t=jx.accentColorForeground,...n}={})=>({...yk(n),colors:{accentColor:e,accentColorForeground:t,actionButtonBorder:"rgba(0, 0, 0, 0.04)",actionButtonBorderMobile:"rgba(0, 0, 0, 0.06)",actionButtonSecondaryBackground:"rgba(0, 0, 0, 0.06)",closeButton:"rgba(60, 66, 66, 0.8)",closeButtonBackground:"rgba(0, 0, 0, 0.06)",connectButtonBackground:"#FFF",connectButtonBackgroundError:"#FF494A",connectButtonInnerBackground:"linear-gradient(0deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.06))",connectButtonText:"#25292E",connectButtonTextError:"#FFF",connectionIndicator:"#30E000",downloadBottomCardBackground:"linear-gradient(126deg, rgba(255, 255, 255, 0) 9.49%, rgba(171, 171, 171, 0.04) 71.04%), #FFFFFF",downloadTopCardBackground:"linear-gradient(126deg, rgba(171, 171, 171, 0.2) 9.49%, rgba(255, 255, 255, 0) 71.04%), #FFFFFF",error:"#FF494A",generalBorder:"rgba(0, 0, 0, 0.06)",generalBorderDim:"rgba(0, 0, 0, 0.03)",menuItemBackground:"rgba(60, 66, 66, 0.1)",modalBackdrop:"rgba(0, 0, 0, 0.3)",modalBackground:"#FFF",modalBorder:"transparent",modalText:"#25292E",modalTextDim:"rgba(60, 66, 66, 0.3)",modalTextSecondary:"rgba(60, 66, 66, 0.6)",profileAction:"#FFF",profileActionHover:"rgba(255, 255, 255, 0.5)",profileForeground:"rgba(60, 66, 66, 0.06)",selectedOptionBorder:"rgba(60, 66, 66, 0.1)",standby:"#FFD641"},shadows:{connectButton:"0px 4px 12px rgba(0, 0, 0, 0.1)",dialog:"0px 8px 32px rgba(0, 0, 0, 0.32)",profileDetailsAction:"0px 2px 6px rgba(37, 41, 46, 0.04)",selectedOption:"0px 2px 6px rgba(0, 0, 0, 0.24)",selectedWallet:"0px 2px 6px rgba(0, 0, 0, 0.12)",walletLogo:"0px 2px 16px rgba(0, 0, 0, 0.16)"}});xk.accentColors=bk;var Ig=`{
|
|
102
|
-
"connect_wallet": {
|
|
103
|
-
"label": "Connect Wallet",
|
|
104
|
-
"wrong_network": {
|
|
105
|
-
"label": "Wrong network"
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
|
|
109
|
-
"intro": {
|
|
110
|
-
"title": "What is a Wallet?",
|
|
111
|
-
"description": "A wallet is used to send, receive, store, and display digital assets. It's also a new way to log in, without needing to create new accounts and passwords on every website.",
|
|
112
|
-
"digital_asset": {
|
|
113
|
-
"title": "A Home for your Digital Assets",
|
|
114
|
-
"description": "Wallets are used to send, receive, store, and display digital assets like Ethereum and NFTs."
|
|
115
|
-
},
|
|
116
|
-
"login": {
|
|
117
|
-
"title": "A New Way to Log In",
|
|
118
|
-
"description": "Instead of creating new accounts and passwords on every website, just connect your wallet."
|
|
119
|
-
},
|
|
120
|
-
"get": {
|
|
121
|
-
"label": "Get a Wallet"
|
|
122
|
-
},
|
|
123
|
-
"learn_more": {
|
|
124
|
-
"label": "Learn More"
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
|
|
128
|
-
"sign_in": {
|
|
129
|
-
"label": "Verify your account",
|
|
130
|
-
"description": "To finish connecting, you must sign a message in your wallet to verify that you are the owner of this account.",
|
|
131
|
-
"message": {
|
|
132
|
-
"send": "Sign message",
|
|
133
|
-
"preparing": "Preparing message...",
|
|
134
|
-
"cancel": "Cancel",
|
|
135
|
-
"preparing_error": "Error preparing message, please retry!"
|
|
136
|
-
},
|
|
137
|
-
"signature": {
|
|
138
|
-
"waiting": "Waiting for signature...",
|
|
139
|
-
"verifying": "Verifying signature...",
|
|
140
|
-
"signing_error": "Error signing message, please retry!",
|
|
141
|
-
"verifying_error": "Error verifying signature, please retry!",
|
|
142
|
-
"oops_error": "Oops, something went wrong!"
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
|
|
146
|
-
"connect": {
|
|
147
|
-
"label": "Connect",
|
|
148
|
-
"title": "Connect a Wallet",
|
|
149
|
-
"new_to_ethereum": {
|
|
150
|
-
"description": "New to Ethereum wallets?",
|
|
151
|
-
"learn_more": {
|
|
152
|
-
"label": "Learn More"
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
"learn_more": {
|
|
156
|
-
"label": "Learn more"
|
|
157
|
-
},
|
|
158
|
-
"recent": "Recent",
|
|
159
|
-
"status": {
|
|
160
|
-
"opening": "Opening %{wallet}...",
|
|
161
|
-
"connecting": "Connecting",
|
|
162
|
-
"connect_mobile": "Continue in %{wallet}",
|
|
163
|
-
"not_installed": "%{wallet} is not installed",
|
|
164
|
-
"not_available": "%{wallet} is not available",
|
|
165
|
-
"confirm": "Confirm connection in the extension",
|
|
166
|
-
"confirm_mobile": "Accept connection request in the wallet"
|
|
167
|
-
},
|
|
168
|
-
"secondary_action": {
|
|
169
|
-
"get": {
|
|
170
|
-
"description": "Don't have %{wallet}?",
|
|
171
|
-
"label": "GET"
|
|
172
|
-
},
|
|
173
|
-
"install": {
|
|
174
|
-
"label": "INSTALL"
|
|
175
|
-
},
|
|
176
|
-
"retry": {
|
|
177
|
-
"label": "RETRY"
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
"walletconnect": {
|
|
181
|
-
"description": {
|
|
182
|
-
"full": "Need the official WalletConnect modal?",
|
|
183
|
-
"compact": "Need the WalletConnect modal?"
|
|
184
|
-
},
|
|
185
|
-
"open": {
|
|
186
|
-
"label": "OPEN"
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
},
|
|
190
|
-
|
|
191
|
-
"connect_scan": {
|
|
192
|
-
"title": "Scan with %{wallet}",
|
|
193
|
-
"fallback_title": "Scan with your phone"
|
|
194
|
-
},
|
|
195
|
-
|
|
196
|
-
"connector_group": {
|
|
197
|
-
"installed": "Installed",
|
|
198
|
-
"recommended": "Recommended",
|
|
199
|
-
"other": "Other",
|
|
200
|
-
"popular": "Popular",
|
|
201
|
-
"more": "More",
|
|
202
|
-
"others": "Others"
|
|
203
|
-
},
|
|
204
|
-
|
|
205
|
-
"get": {
|
|
206
|
-
"title": "Get a Wallet",
|
|
207
|
-
"action": {
|
|
208
|
-
"label": "GET"
|
|
209
|
-
},
|
|
210
|
-
"mobile": {
|
|
211
|
-
"description": "Mobile Wallet"
|
|
212
|
-
},
|
|
213
|
-
"extension": {
|
|
214
|
-
"description": "Browser Extension"
|
|
215
|
-
},
|
|
216
|
-
"mobile_and_extension": {
|
|
217
|
-
"description": "Mobile Wallet and Extension"
|
|
218
|
-
},
|
|
219
|
-
"mobile_and_desktop": {
|
|
220
|
-
"description": "Mobile and Desktop Wallet"
|
|
221
|
-
},
|
|
222
|
-
"looking_for": {
|
|
223
|
-
"title": "Not what you're looking for?",
|
|
224
|
-
"mobile": {
|
|
225
|
-
"description": "Select a wallet on the main screen to get started with a different wallet provider."
|
|
226
|
-
},
|
|
227
|
-
"desktop": {
|
|
228
|
-
"compact_description": "Select a wallet on the main screen to get started with a different wallet provider.",
|
|
229
|
-
"wide_description": "Select a wallet on the left to get started with a different wallet provider."
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
},
|
|
233
|
-
|
|
234
|
-
"get_options": {
|
|
235
|
-
"title": "Get started with %{wallet}",
|
|
236
|
-
"short_title": "Get %{wallet}",
|
|
237
|
-
"mobile": {
|
|
238
|
-
"title": "%{wallet} for Mobile",
|
|
239
|
-
"description": "Use the mobile wallet to explore the world of Ethereum.",
|
|
240
|
-
"download": {
|
|
241
|
-
"label": "Get the app"
|
|
242
|
-
}
|
|
243
|
-
},
|
|
244
|
-
"extension": {
|
|
245
|
-
"title": "%{wallet} for %{browser}",
|
|
246
|
-
"description": "Access your wallet right from your favorite web browser.",
|
|
247
|
-
"download": {
|
|
248
|
-
"label": "Add to %{browser}"
|
|
249
|
-
}
|
|
250
|
-
},
|
|
251
|
-
"desktop": {
|
|
252
|
-
"title": "%{wallet} for %{platform}",
|
|
253
|
-
"description": "Access your wallet natively from your powerful desktop.",
|
|
254
|
-
"download": {
|
|
255
|
-
"label": "Add to %{platform}"
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
},
|
|
259
|
-
|
|
260
|
-
"get_mobile": {
|
|
261
|
-
"title": "Install %{wallet}",
|
|
262
|
-
"description": "Scan with your phone to download on iOS or Android",
|
|
263
|
-
"continue": {
|
|
264
|
-
"label": "Continue"
|
|
265
|
-
}
|
|
266
|
-
},
|
|
267
|
-
|
|
268
|
-
"get_instructions": {
|
|
269
|
-
"mobile": {
|
|
270
|
-
"connect": {
|
|
271
|
-
"label": "Connect"
|
|
272
|
-
},
|
|
273
|
-
"learn_more": {
|
|
274
|
-
"label": "Learn More"
|
|
275
|
-
}
|
|
276
|
-
},
|
|
277
|
-
"extension": {
|
|
278
|
-
"refresh": {
|
|
279
|
-
"label": "Refresh"
|
|
280
|
-
},
|
|
281
|
-
"learn_more": {
|
|
282
|
-
"label": "Learn More"
|
|
283
|
-
}
|
|
284
|
-
},
|
|
285
|
-
"desktop": {
|
|
286
|
-
"connect": {
|
|
287
|
-
"label": "Connect"
|
|
288
|
-
},
|
|
289
|
-
"learn_more": {
|
|
290
|
-
"label": "Learn More"
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
},
|
|
294
|
-
|
|
295
|
-
"chains": {
|
|
296
|
-
"title": "Switch Networks",
|
|
297
|
-
"wrong_network": "Wrong network detected, switch or disconnect to continue.",
|
|
298
|
-
"confirm": "Confirm in Wallet",
|
|
299
|
-
"switching_not_supported": "Your wallet does not support switching networks from %{appName}. Try switching networks from within your wallet instead.",
|
|
300
|
-
"switching_not_supported_fallback": "Your wallet does not support switching networks from this app. Try switching networks from within your wallet instead.",
|
|
301
|
-
"disconnect": "Disconnect",
|
|
302
|
-
"connected": "Connected"
|
|
303
|
-
},
|
|
304
|
-
|
|
305
|
-
"profile": {
|
|
306
|
-
"disconnect": {
|
|
307
|
-
"label": "Disconnect"
|
|
308
|
-
},
|
|
309
|
-
"copy_address": {
|
|
310
|
-
"label": "Copy Address",
|
|
311
|
-
"copied": "Copied!"
|
|
312
|
-
},
|
|
313
|
-
"explorer": {
|
|
314
|
-
"label": "View more on explorer"
|
|
315
|
-
},
|
|
316
|
-
"transactions": {
|
|
317
|
-
"description": "%{appName} transactions will appear here...",
|
|
318
|
-
"description_fallback": "Your transactions will appear here...",
|
|
319
|
-
"recent": {
|
|
320
|
-
"title": "Recent Transactions"
|
|
321
|
-
},
|
|
322
|
-
"clear": {
|
|
323
|
-
"label": "Clear All"
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
},
|
|
327
|
-
|
|
328
|
-
"wallet_connectors": {
|
|
329
|
-
"ready": {
|
|
330
|
-
"qr_code": {
|
|
331
|
-
"step1": {
|
|
332
|
-
"description": "Add Ready to your home screen for faster access to your wallet.",
|
|
333
|
-
"title": "Open the Ready app"
|
|
334
|
-
},
|
|
335
|
-
"step2": {
|
|
336
|
-
"description": "Create a wallet and username, or import an existing wallet.",
|
|
337
|
-
"title": "Create or Import a Wallet"
|
|
338
|
-
},
|
|
339
|
-
"step3": {
|
|
340
|
-
"description": "After you scan, a connection prompt will appear for you to connect your wallet.",
|
|
341
|
-
"title": "Tap the Scan QR button"
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
},
|
|
345
|
-
|
|
346
|
-
"berasig": {
|
|
347
|
-
"extension": {
|
|
348
|
-
"step1": {
|
|
349
|
-
"title": "Install the BeraSig extension",
|
|
350
|
-
"description": "We recommend pinning BeraSig to your taskbar for easier access to your wallet."
|
|
351
|
-
},
|
|
352
|
-
"step2": {
|
|
353
|
-
"title": "Create a Wallet",
|
|
354
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
|
|
355
|
-
},
|
|
356
|
-
"step3": {
|
|
357
|
-
"title": "Refresh your browser",
|
|
358
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
},
|
|
362
|
-
|
|
363
|
-
"best": {
|
|
364
|
-
"qr_code": {
|
|
365
|
-
"step1": {
|
|
366
|
-
"title": "Open the Best Wallet app",
|
|
367
|
-
"description": "Add Best Wallet to your home screen for faster access to your wallet."
|
|
368
|
-
},
|
|
369
|
-
"step2": {
|
|
370
|
-
"title": "Create or Import a Wallet",
|
|
371
|
-
"description": "Create a new wallet or import an existing one."
|
|
372
|
-
},
|
|
373
|
-
"step3": {
|
|
374
|
-
"title": "Tap the QR icon and scan",
|
|
375
|
-
"description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect."
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
},
|
|
379
|
-
|
|
380
|
-
"bifrost": {
|
|
381
|
-
"qr_code": {
|
|
382
|
-
"step1": {
|
|
383
|
-
"description": "We recommend putting Bifrost Wallet on your home screen for quicker access.",
|
|
384
|
-
"title": "Open the Bifrost Wallet app"
|
|
385
|
-
},
|
|
386
|
-
"step2": {
|
|
387
|
-
"description": "Create or import a wallet using your recovery phrase.",
|
|
388
|
-
"title": "Create or Import a Wallet"
|
|
389
|
-
},
|
|
390
|
-
"step3": {
|
|
391
|
-
"description": "After you scan, a connection prompt will appear for you to connect your wallet.",
|
|
392
|
-
"title": "Tap the scan button"
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
},
|
|
396
|
-
|
|
397
|
-
"bitget": {
|
|
398
|
-
"qr_code": {
|
|
399
|
-
"step1": {
|
|
400
|
-
"description": "We recommend putting Bitget Wallet on your home screen for quicker access.",
|
|
401
|
-
"title": "Open the Bitget Wallet app"
|
|
402
|
-
},
|
|
403
|
-
"step2": {
|
|
404
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
|
|
405
|
-
"title": "Create or Import a Wallet"
|
|
406
|
-
},
|
|
407
|
-
"step3": {
|
|
408
|
-
"description": "After you scan, a connection prompt will appear for you to connect your wallet.",
|
|
409
|
-
"title": "Tap the scan button"
|
|
410
|
-
}
|
|
411
|
-
},
|
|
412
|
-
|
|
413
|
-
"extension": {
|
|
414
|
-
"step1": {
|
|
415
|
-
"description": "We recommend pinning Bitget Wallet to your taskbar for quicker access to your wallet.",
|
|
416
|
-
"title": "Install the Bitget Wallet extension"
|
|
417
|
-
},
|
|
418
|
-
"step2": {
|
|
419
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
|
|
420
|
-
"title": "Create or Import a Wallet"
|
|
421
|
-
},
|
|
422
|
-
"step3": {
|
|
423
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
|
|
424
|
-
"title": "Refresh your browser"
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
},
|
|
428
|
-
|
|
429
|
-
"bitski": {
|
|
430
|
-
"extension": {
|
|
431
|
-
"step1": {
|
|
432
|
-
"description": "We recommend pinning Bitski to your taskbar for quicker access to your wallet.",
|
|
433
|
-
"title": "Install the Bitski extension"
|
|
434
|
-
},
|
|
435
|
-
"step2": {
|
|
436
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
|
|
437
|
-
"title": "Create or Import a Wallet"
|
|
438
|
-
},
|
|
439
|
-
"step3": {
|
|
440
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
|
|
441
|
-
"title": "Refresh your browser"
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
},
|
|
445
|
-
|
|
446
|
-
"bitverse": {
|
|
447
|
-
"qr_code": {
|
|
448
|
-
"step1": {
|
|
449
|
-
"title": "Open the Bitverse Wallet app",
|
|
450
|
-
"description": "Add Bitverse Wallet to your home screen for faster access to your wallet."
|
|
451
|
-
},
|
|
452
|
-
"step2": {
|
|
453
|
-
"title": "Create or Import a Wallet",
|
|
454
|
-
"description": "Create a new wallet or import an existing one."
|
|
455
|
-
},
|
|
456
|
-
"step3": {
|
|
457
|
-
"title": "Tap the QR icon and scan",
|
|
458
|
-
"description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect."
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
},
|
|
462
|
-
|
|
463
|
-
"bloom": {
|
|
464
|
-
"desktop": {
|
|
465
|
-
"step1": {
|
|
466
|
-
"title": "Open the Bloom Wallet app",
|
|
467
|
-
"description": "We recommend putting Bloom Wallet on your home screen for quicker access."
|
|
468
|
-
},
|
|
469
|
-
"step2": {
|
|
470
|
-
"description": "Create or import a wallet using your recovery phrase.",
|
|
471
|
-
"title": "Create or Import a Wallet"
|
|
472
|
-
},
|
|
473
|
-
"step3": {
|
|
474
|
-
"description": "After you have a wallet, click on Connect to connect via Bloom. A connection prompt in the app will appear for you to confirm the connection.",
|
|
475
|
-
"title": "Click on Connect"
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
},
|
|
479
|
-
|
|
480
|
-
"bybit": {
|
|
481
|
-
"qr_code": {
|
|
482
|
-
"step1": {
|
|
483
|
-
"description": "We recommend putting Bybit on your home screen for faster access to your wallet.",
|
|
484
|
-
"title": "Open the Bybit app"
|
|
485
|
-
},
|
|
486
|
-
"step2": {
|
|
487
|
-
"description": "You can easily backup your wallet using our backup feature on your phone.",
|
|
488
|
-
"title": "Create or Import a Wallet"
|
|
489
|
-
},
|
|
490
|
-
"step3": {
|
|
491
|
-
"description": "After you scan, a connection prompt will appear for you to connect your wallet.",
|
|
492
|
-
"title": "Tap the scan button"
|
|
493
|
-
}
|
|
494
|
-
},
|
|
495
|
-
|
|
496
|
-
"extension": {
|
|
497
|
-
"step1": {
|
|
498
|
-
"description": "Click at the top right of your browser and pin Bybit Wallet for easy access.",
|
|
499
|
-
"title": "Install the Bybit Wallet extension"
|
|
500
|
-
},
|
|
501
|
-
"step2": {
|
|
502
|
-
"description": "Create a new wallet or import an existing one.",
|
|
503
|
-
"title": "Create or Import a wallet"
|
|
504
|
-
},
|
|
505
|
-
"step3": {
|
|
506
|
-
"description": "Once you set up Bybit Wallet, click below to refresh the browser and load up the extension.",
|
|
507
|
-
"title": "Refresh your browser"
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
},
|
|
511
|
-
|
|
512
|
-
"binance": {
|
|
513
|
-
"qr_code": {
|
|
514
|
-
"step1": {
|
|
515
|
-
"description": "We recommend putting Binance on your home screen for faster access to your wallet.",
|
|
516
|
-
"title": "Open the Binance app"
|
|
517
|
-
},
|
|
518
|
-
"step2": {
|
|
519
|
-
"description": "You can easily backup your wallet using our backup feature on your phone.",
|
|
520
|
-
"title": "Create or Import a Wallet"
|
|
521
|
-
},
|
|
522
|
-
"step3": {
|
|
523
|
-
"description": "After you scan, a connection prompt will appear for you to connect your wallet.",
|
|
524
|
-
"title": "Tap the WalletConnect button"
|
|
525
|
-
}
|
|
526
|
-
},
|
|
527
|
-
"extension": {
|
|
528
|
-
"step1": {
|
|
529
|
-
"title": "Install the Binance Wallet extension",
|
|
530
|
-
"description": "We recommend pinning Binance Wallet to your taskbar for quicker access to your wallet."
|
|
531
|
-
},
|
|
532
|
-
"step2": {
|
|
533
|
-
"title": "Create or Import a Wallet",
|
|
534
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
|
|
535
|
-
},
|
|
536
|
-
"step3": {
|
|
537
|
-
"title": "Refresh your browser",
|
|
538
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
},
|
|
542
|
-
|
|
543
|
-
"coin98": {
|
|
544
|
-
"qr_code": {
|
|
545
|
-
"step1": {
|
|
546
|
-
"description": "We recommend putting Coin98 Wallet on your home screen for faster access to your wallet.",
|
|
547
|
-
"title": "Open the Coin98 Wallet app"
|
|
548
|
-
},
|
|
549
|
-
"step2": {
|
|
550
|
-
"description": "You can easily backup your wallet using our backup feature on your phone.",
|
|
551
|
-
"title": "Create or Import a Wallet"
|
|
552
|
-
},
|
|
553
|
-
"step3": {
|
|
554
|
-
"description": "After you scan, a connection prompt will appear for you to connect your wallet.",
|
|
555
|
-
"title": "Tap the WalletConnect button"
|
|
556
|
-
}
|
|
557
|
-
},
|
|
558
|
-
|
|
559
|
-
"extension": {
|
|
560
|
-
"step1": {
|
|
561
|
-
"description": "Click at the top right of your browser and pin Coin98 Wallet for easy access.",
|
|
562
|
-
"title": "Install the Coin98 Wallet extension"
|
|
563
|
-
},
|
|
564
|
-
"step2": {
|
|
565
|
-
"description": "Create a new wallet or import an existing one.",
|
|
566
|
-
"title": "Create or Import a wallet"
|
|
567
|
-
},
|
|
568
|
-
"step3": {
|
|
569
|
-
"description": "Once you set up Coin98 Wallet, click below to refresh the browser and load up the extension.",
|
|
570
|
-
"title": "Refresh your browser"
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
},
|
|
574
|
-
|
|
575
|
-
"coinbase": {
|
|
576
|
-
"qr_code": {
|
|
577
|
-
"step1": {
|
|
578
|
-
"description": "We recommend putting Coinbase Wallet on your home screen for quicker access.",
|
|
579
|
-
"title": "Open the Coinbase Wallet app"
|
|
580
|
-
},
|
|
581
|
-
"step2": {
|
|
582
|
-
"description": "You can easily backup your wallet using the cloud backup feature.",
|
|
583
|
-
"title": "Create or Import a Wallet"
|
|
584
|
-
},
|
|
585
|
-
"step3": {
|
|
586
|
-
"description": "After you scan, a connection prompt will appear for you to connect your wallet.",
|
|
587
|
-
"title": "Tap the scan button"
|
|
588
|
-
}
|
|
589
|
-
},
|
|
590
|
-
|
|
591
|
-
"extension": {
|
|
592
|
-
"step1": {
|
|
593
|
-
"description": "We recommend pinning Coinbase Wallet to your taskbar for quicker access to your wallet.",
|
|
594
|
-
"title": "Install the Coinbase Wallet extension"
|
|
595
|
-
},
|
|
596
|
-
"step2": {
|
|
597
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
|
|
598
|
-
"title": "Create or Import a Wallet"
|
|
599
|
-
},
|
|
600
|
-
"step3": {
|
|
601
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
|
|
602
|
-
"title": "Refresh your browser"
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
},
|
|
606
|
-
|
|
607
|
-
"compass": {
|
|
608
|
-
"extension": {
|
|
609
|
-
"step1": {
|
|
610
|
-
"description": "We recommend pinning Compass Wallet to your taskbar for quicker access to your wallet.",
|
|
611
|
-
"title": "Install the Compass Wallet extension"
|
|
612
|
-
},
|
|
613
|
-
"step2": {
|
|
614
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
|
|
615
|
-
"title": "Create or Import a Wallet"
|
|
616
|
-
},
|
|
617
|
-
"step3": {
|
|
618
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
|
|
619
|
-
"title": "Refresh your browser"
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
},
|
|
623
|
-
|
|
624
|
-
"core": {
|
|
625
|
-
"qr_code": {
|
|
626
|
-
"step1": {
|
|
627
|
-
"description": "We recommend putting Core on your home screen for faster access to your wallet.",
|
|
628
|
-
"title": "Open the Core app"
|
|
629
|
-
},
|
|
630
|
-
"step2": {
|
|
631
|
-
"description": "You can easily backup your wallet using our backup feature on your phone.",
|
|
632
|
-
"title": "Create or Import a Wallet"
|
|
633
|
-
},
|
|
634
|
-
"step3": {
|
|
635
|
-
"description": "After you scan, a connection prompt will appear for you to connect your wallet.",
|
|
636
|
-
"title": "Tap the WalletConnect button"
|
|
637
|
-
}
|
|
638
|
-
},
|
|
639
|
-
|
|
640
|
-
"extension": {
|
|
641
|
-
"step1": {
|
|
642
|
-
"description": "We recommend pinning Core to your taskbar for quicker access to your wallet.",
|
|
643
|
-
"title": "Install the Core extension"
|
|
644
|
-
},
|
|
645
|
-
"step2": {
|
|
646
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
|
|
647
|
-
"title": "Create or Import a Wallet"
|
|
648
|
-
},
|
|
649
|
-
"step3": {
|
|
650
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
|
|
651
|
-
"title": "Refresh your browser"
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
},
|
|
655
|
-
|
|
656
|
-
"fox": {
|
|
657
|
-
"qr_code": {
|
|
658
|
-
"step1": {
|
|
659
|
-
"description": "We recommend putting FoxWallet on your home screen for quicker access.",
|
|
660
|
-
"title": "Open the FoxWallet app"
|
|
661
|
-
},
|
|
662
|
-
"step2": {
|
|
663
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
|
|
664
|
-
"title": "Create or Import a Wallet"
|
|
665
|
-
},
|
|
666
|
-
"step3": {
|
|
667
|
-
"description": "After you scan, a connection prompt will appear for you to connect your wallet.",
|
|
668
|
-
"title": "Tap the scan button"
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
},
|
|
672
|
-
|
|
673
|
-
"frontier": {
|
|
674
|
-
"qr_code": {
|
|
675
|
-
"step1": {
|
|
676
|
-
"description": "We recommend putting Frontier Wallet on your home screen for quicker access.",
|
|
677
|
-
"title": "Open the Frontier Wallet app"
|
|
678
|
-
},
|
|
679
|
-
"step2": {
|
|
680
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
|
|
681
|
-
"title": "Create or Import a Wallet"
|
|
682
|
-
},
|
|
683
|
-
"step3": {
|
|
684
|
-
"description": "After you scan, a connection prompt will appear for you to connect your wallet.",
|
|
685
|
-
"title": "Tap the scan button"
|
|
686
|
-
}
|
|
687
|
-
},
|
|
688
|
-
|
|
689
|
-
"extension": {
|
|
690
|
-
"step1": {
|
|
691
|
-
"description": "We recommend pinning Frontier Wallet to your taskbar for quicker access to your wallet.",
|
|
692
|
-
"title": "Install the Frontier Wallet extension"
|
|
693
|
-
},
|
|
694
|
-
"step2": {
|
|
695
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
|
|
696
|
-
"title": "Create or Import a Wallet"
|
|
697
|
-
},
|
|
698
|
-
"step3": {
|
|
699
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
|
|
700
|
-
"title": "Refresh your browser"
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
},
|
|
704
|
-
|
|
705
|
-
"im_token": {
|
|
706
|
-
"qr_code": {
|
|
707
|
-
"step1": {
|
|
708
|
-
"title": "Open the imToken app",
|
|
709
|
-
"description": "Put imToken app on your home screen for faster access to your wallet."
|
|
710
|
-
},
|
|
711
|
-
"step2": {
|
|
712
|
-
"title": "Create or Import a Wallet",
|
|
713
|
-
"description": "Create a new wallet or import an existing one."
|
|
714
|
-
},
|
|
715
|
-
"step3": {
|
|
716
|
-
"title": "Tap Scanner Icon in top right corner",
|
|
717
|
-
"description": "Choose New Connection, then scan the QR code and confirm the prompt to connect."
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
},
|
|
721
|
-
|
|
722
|
-
"iopay": {
|
|
723
|
-
"qr_code": {
|
|
724
|
-
"step1": {
|
|
725
|
-
"description": "We recommend putting ioPay on your home screen for faster access to your wallet.",
|
|
726
|
-
"title": "Open the ioPay app"
|
|
727
|
-
},
|
|
728
|
-
"step2": {
|
|
729
|
-
"description": "You can easily backup your wallet using our backup feature on your phone.",
|
|
730
|
-
"title": "Create or Import a Wallet"
|
|
731
|
-
},
|
|
732
|
-
"step3": {
|
|
733
|
-
"description": "After you scan, a connection prompt will appear for you to connect your wallet.",
|
|
734
|
-
"title": "Tap the WalletConnect button"
|
|
735
|
-
}
|
|
736
|
-
}
|
|
737
|
-
},
|
|
738
|
-
|
|
739
|
-
"kaikas": {
|
|
740
|
-
"extension": {
|
|
741
|
-
"step1": {
|
|
742
|
-
"description": "We recommend pinning Kaikas to your taskbar for quicker access to your wallet.",
|
|
743
|
-
"title": "Install the Kaikas extension"
|
|
744
|
-
},
|
|
745
|
-
"step2": {
|
|
746
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
|
|
747
|
-
"title": "Create or Import a Wallet"
|
|
748
|
-
},
|
|
749
|
-
"step3": {
|
|
750
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
|
|
751
|
-
"title": "Refresh your browser"
|
|
752
|
-
}
|
|
753
|
-
},
|
|
754
|
-
"qr_code": {
|
|
755
|
-
"step1": {
|
|
756
|
-
"title": "Open the Kaikas app",
|
|
757
|
-
"description": "Put Kaikas app on your home screen for faster access to your wallet."
|
|
758
|
-
},
|
|
759
|
-
"step2": {
|
|
760
|
-
"title": "Create or Import a Wallet",
|
|
761
|
-
"description": "Create a new wallet or import an existing one."
|
|
762
|
-
},
|
|
763
|
-
"step3": {
|
|
764
|
-
"title": "Tap Scanner Icon in top right corner",
|
|
765
|
-
"description": "Choose New Connection, then scan the QR code and confirm the prompt to connect."
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
},
|
|
769
|
-
|
|
770
|
-
"kaia": {
|
|
771
|
-
"extension": {
|
|
772
|
-
"step1": {
|
|
773
|
-
"description": "We recommend pinning Kaia to your taskbar for quicker access to your wallet.",
|
|
774
|
-
"title": "Install the Kaia extension"
|
|
775
|
-
},
|
|
776
|
-
"step2": {
|
|
777
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
|
|
778
|
-
"title": "Create or Import a Wallet"
|
|
779
|
-
},
|
|
780
|
-
"step3": {
|
|
781
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
|
|
782
|
-
"title": "Refresh your browser"
|
|
783
|
-
}
|
|
784
|
-
},
|
|
785
|
-
"qr_code": {
|
|
786
|
-
"step1": {
|
|
787
|
-
"title": "Open the Kaia app",
|
|
788
|
-
"description": "Put Kaia app on your home screen for faster access to your wallet."
|
|
789
|
-
},
|
|
790
|
-
"step2": {
|
|
791
|
-
"title": "Create or Import a Wallet",
|
|
792
|
-
"description": "Create a new wallet or import an existing one."
|
|
793
|
-
},
|
|
794
|
-
"step3": {
|
|
795
|
-
"title": "Tap Scanner Icon in top right corner",
|
|
796
|
-
"description": "Choose New Connection, then scan the QR code and confirm the prompt to connect."
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
},
|
|
800
|
-
|
|
801
|
-
"kraken": {
|
|
802
|
-
"qr_code": {
|
|
803
|
-
"step1": {
|
|
804
|
-
"title": "Open the Kraken Wallet app",
|
|
805
|
-
"description": "Add Kraken Wallet to your home screen for faster access to your wallet."
|
|
806
|
-
},
|
|
807
|
-
"step2": {
|
|
808
|
-
"title": "Create or Import a Wallet",
|
|
809
|
-
"description": "Create a new wallet or import an existing one."
|
|
810
|
-
},
|
|
811
|
-
"step3": {
|
|
812
|
-
"title": "Tap the QR icon and scan",
|
|
813
|
-
"description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect."
|
|
814
|
-
}
|
|
815
|
-
}
|
|
816
|
-
},
|
|
817
|
-
|
|
818
|
-
"kresus": {
|
|
819
|
-
"qr_code": {
|
|
820
|
-
"step1": {
|
|
821
|
-
"title": "Open the Kresus Wallet app",
|
|
822
|
-
"description": "Add Kresus Wallet to your home screen for faster access to your wallet."
|
|
823
|
-
},
|
|
824
|
-
"step2": {
|
|
825
|
-
"title": "Create or Import a Wallet",
|
|
826
|
-
"description": "Create a new wallet or import an existing one."
|
|
827
|
-
},
|
|
828
|
-
"step3": {
|
|
829
|
-
"title": "Tap the QR icon and scan",
|
|
830
|
-
"description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect."
|
|
831
|
-
}
|
|
832
|
-
}
|
|
833
|
-
},
|
|
834
|
-
|
|
835
|
-
"magicEden": {
|
|
836
|
-
"extension": {
|
|
837
|
-
"step1": {
|
|
838
|
-
"title": "Install the Magic Eden extension",
|
|
839
|
-
"description": "We recommend pinning Magic Eden to your taskbar for easier access to your wallet."
|
|
840
|
-
},
|
|
841
|
-
"step2": {
|
|
842
|
-
"title": "Create or Import a Wallet",
|
|
843
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret recovery phrase with anyone."
|
|
844
|
-
},
|
|
845
|
-
"step3": {
|
|
846
|
-
"title": "Refresh your browser",
|
|
847
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
},
|
|
851
|
-
|
|
852
|
-
"metamask": {
|
|
853
|
-
"qr_code": {
|
|
854
|
-
"step1": {
|
|
855
|
-
"title": "Open the MetaMask app",
|
|
856
|
-
"description": "We recommend putting MetaMask on your home screen for quicker access."
|
|
857
|
-
},
|
|
858
|
-
"step2": {
|
|
859
|
-
"title": "Create or Import a Wallet",
|
|
860
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
|
|
861
|
-
},
|
|
862
|
-
"step3": {
|
|
863
|
-
"title": "Tap the scan button",
|
|
864
|
-
"description": "After you scan, a connection prompt will appear for you to connect your wallet."
|
|
865
|
-
}
|
|
866
|
-
},
|
|
867
|
-
|
|
868
|
-
"extension": {
|
|
869
|
-
"step1": {
|
|
870
|
-
"title": "Install the MetaMask extension",
|
|
871
|
-
"description": "We recommend pinning MetaMask to your taskbar for quicker access to your wallet."
|
|
872
|
-
},
|
|
873
|
-
"step2": {
|
|
874
|
-
"title": "Create or Import a Wallet",
|
|
875
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
|
|
876
|
-
},
|
|
877
|
-
"step3": {
|
|
878
|
-
"title": "Refresh your browser",
|
|
879
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
|
|
880
|
-
}
|
|
881
|
-
}
|
|
882
|
-
},
|
|
883
|
-
|
|
884
|
-
"nestwallet": {
|
|
885
|
-
"extension": {
|
|
886
|
-
"step1": {
|
|
887
|
-
"title": "Install the NestWallet extension",
|
|
888
|
-
"description": "We recommend pinning NestWallet to your taskbar for quicker access to your wallet."
|
|
889
|
-
},
|
|
890
|
-
"step2": {
|
|
891
|
-
"title": "Create or Import a Wallet",
|
|
892
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
|
|
893
|
-
},
|
|
894
|
-
"step3": {
|
|
895
|
-
"title": "Refresh your browser",
|
|
896
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
|
|
897
|
-
}
|
|
898
|
-
}
|
|
899
|
-
},
|
|
900
|
-
|
|
901
|
-
"okx": {
|
|
902
|
-
"qr_code": {
|
|
903
|
-
"step1": {
|
|
904
|
-
"title": "Open the OKX Wallet app",
|
|
905
|
-
"description": "We recommend putting OKX Wallet on your home screen for quicker access."
|
|
906
|
-
},
|
|
907
|
-
"step2": {
|
|
908
|
-
"title": "Create or Import a Wallet",
|
|
909
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
|
|
910
|
-
},
|
|
911
|
-
"step3": {
|
|
912
|
-
"title": "Tap the scan button",
|
|
913
|
-
"description": "After you scan, a connection prompt will appear for you to connect your wallet."
|
|
914
|
-
}
|
|
915
|
-
},
|
|
916
|
-
|
|
917
|
-
"extension": {
|
|
918
|
-
"step1": {
|
|
919
|
-
"title": "Install the OKX Wallet extension",
|
|
920
|
-
"description": "We recommend pinning OKX Wallet to your taskbar for quicker access to your wallet."
|
|
921
|
-
},
|
|
922
|
-
"step2": {
|
|
923
|
-
"title": "Create or Import a Wallet",
|
|
924
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
|
|
925
|
-
},
|
|
926
|
-
"step3": {
|
|
927
|
-
"title": "Refresh your browser",
|
|
928
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
|
|
929
|
-
}
|
|
930
|
-
}
|
|
931
|
-
},
|
|
932
|
-
|
|
933
|
-
"omni": {
|
|
934
|
-
"qr_code": {
|
|
935
|
-
"step1": {
|
|
936
|
-
"title": "Open the Omni app",
|
|
937
|
-
"description": "Add Omni to your home screen for faster access to your wallet."
|
|
938
|
-
},
|
|
939
|
-
"step2": {
|
|
940
|
-
"title": "Create or Import a Wallet",
|
|
941
|
-
"description": "Create a new wallet or import an existing one."
|
|
942
|
-
},
|
|
943
|
-
"step3": {
|
|
944
|
-
"title": "Tap the QR icon and scan",
|
|
945
|
-
"description": "Tap the QR icon on your home screen, scan the code and confirm the prompt to connect."
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
},
|
|
949
|
-
|
|
950
|
-
"1inch": {
|
|
951
|
-
"qr_code": {
|
|
952
|
-
"step1": {
|
|
953
|
-
"description": "Put 1inch Wallet on your home screen for faster access to your wallet.",
|
|
954
|
-
"title": "Open the 1inch Wallet app"
|
|
955
|
-
},
|
|
956
|
-
"step2": {
|
|
957
|
-
"description": "Create a wallet and username, or import an existing wallet.",
|
|
958
|
-
"title": "Create or Import a Wallet"
|
|
959
|
-
},
|
|
960
|
-
"step3": {
|
|
961
|
-
"description": "After you scan, a connection prompt will appear for you to connect your wallet.",
|
|
962
|
-
"title": "Tap the Scan QR button"
|
|
963
|
-
}
|
|
964
|
-
}
|
|
965
|
-
},
|
|
966
|
-
|
|
967
|
-
"token_pocket": {
|
|
968
|
-
"qr_code": {
|
|
969
|
-
"step1": {
|
|
970
|
-
"title": "Open the TokenPocket app",
|
|
971
|
-
"description": "We recommend putting TokenPocket on your home screen for quicker access."
|
|
972
|
-
},
|
|
973
|
-
"step2": {
|
|
974
|
-
"title": "Create or Import a Wallet",
|
|
975
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
|
|
976
|
-
},
|
|
977
|
-
"step3": {
|
|
978
|
-
"title": "Tap the scan button",
|
|
979
|
-
"description": "After you scan, a connection prompt will appear for you to connect your wallet."
|
|
980
|
-
}
|
|
981
|
-
},
|
|
982
|
-
|
|
983
|
-
"extension": {
|
|
984
|
-
"step1": {
|
|
985
|
-
"title": "Install the TokenPocket extension",
|
|
986
|
-
"description": "We recommend pinning TokenPocket to your taskbar for quicker access to your wallet."
|
|
987
|
-
},
|
|
988
|
-
"step2": {
|
|
989
|
-
"title": "Create or Import a Wallet",
|
|
990
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
|
|
991
|
-
},
|
|
992
|
-
"step3": {
|
|
993
|
-
"title": "Refresh your browser",
|
|
994
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
|
|
995
|
-
}
|
|
996
|
-
}
|
|
997
|
-
},
|
|
998
|
-
|
|
999
|
-
"trust": {
|
|
1000
|
-
"qr_code": {
|
|
1001
|
-
"step1": {
|
|
1002
|
-
"title": "Open the Trust Wallet app",
|
|
1003
|
-
"description": "Put Trust Wallet on your home screen for faster access to your wallet."
|
|
1004
|
-
},
|
|
1005
|
-
"step2": {
|
|
1006
|
-
"title": "Create or Import a Wallet",
|
|
1007
|
-
"description": "Create a new wallet or import an existing one."
|
|
1008
|
-
},
|
|
1009
|
-
"step3": {
|
|
1010
|
-
"title": "Tap WalletConnect in Settings",
|
|
1011
|
-
"description": "Choose New Connection, then scan the QR code and confirm the prompt to connect."
|
|
1012
|
-
}
|
|
1013
|
-
},
|
|
1014
|
-
|
|
1015
|
-
"extension": {
|
|
1016
|
-
"step1": {
|
|
1017
|
-
"title": "Install the Trust Wallet extension",
|
|
1018
|
-
"description": "Click at the top right of your browser and pin Trust Wallet for easy access."
|
|
1019
|
-
},
|
|
1020
|
-
"step2": {
|
|
1021
|
-
"title": "Create or Import a wallet",
|
|
1022
|
-
"description": "Create a new wallet or import an existing one."
|
|
1023
|
-
},
|
|
1024
|
-
"step3": {
|
|
1025
|
-
"title": "Refresh your browser",
|
|
1026
|
-
"description": "Once you set up Trust Wallet, click below to refresh the browser and load up the extension."
|
|
1027
|
-
}
|
|
1028
|
-
}
|
|
1029
|
-
},
|
|
1030
|
-
|
|
1031
|
-
"uniswap": {
|
|
1032
|
-
"qr_code": {
|
|
1033
|
-
"step1": {
|
|
1034
|
-
"title": "Open the Uniswap app",
|
|
1035
|
-
"description": "Add Uniswap Wallet to your home screen for faster access to your wallet."
|
|
1036
|
-
},
|
|
1037
|
-
"step2": {
|
|
1038
|
-
"title": "Create or Import a Wallet",
|
|
1039
|
-
"description": "Create a new wallet or import an existing one."
|
|
1040
|
-
},
|
|
1041
|
-
"step3": {
|
|
1042
|
-
"title": "Tap the QR icon and scan",
|
|
1043
|
-
"description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect."
|
|
1044
|
-
}
|
|
1045
|
-
}
|
|
1046
|
-
},
|
|
1047
|
-
|
|
1048
|
-
"zerion": {
|
|
1049
|
-
"qr_code": {
|
|
1050
|
-
"step1": {
|
|
1051
|
-
"title": "Open the Zerion app",
|
|
1052
|
-
"description": "We recommend putting Zerion on your home screen for quicker access."
|
|
1053
|
-
},
|
|
1054
|
-
"step2": {
|
|
1055
|
-
"title": "Create or Import a Wallet",
|
|
1056
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
|
|
1057
|
-
},
|
|
1058
|
-
"step3": {
|
|
1059
|
-
"title": "Tap the scan button",
|
|
1060
|
-
"description": "After you scan, a connection prompt will appear for you to connect your wallet."
|
|
1061
|
-
}
|
|
1062
|
-
},
|
|
1063
|
-
|
|
1064
|
-
"extension": {
|
|
1065
|
-
"step1": {
|
|
1066
|
-
"title": "Install the Zerion extension",
|
|
1067
|
-
"description": "We recommend pinning Zerion to your taskbar for quicker access to your wallet."
|
|
1068
|
-
},
|
|
1069
|
-
"step2": {
|
|
1070
|
-
"title": "Create or Import a Wallet",
|
|
1071
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
|
|
1072
|
-
},
|
|
1073
|
-
"step3": {
|
|
1074
|
-
"title": "Refresh your browser",
|
|
1075
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
|
|
1076
|
-
}
|
|
1077
|
-
}
|
|
1078
|
-
},
|
|
1079
|
-
|
|
1080
|
-
"rainbow": {
|
|
1081
|
-
"qr_code": {
|
|
1082
|
-
"step1": {
|
|
1083
|
-
"title": "Open the Rainbow app",
|
|
1084
|
-
"description": "We recommend putting Rainbow on your home screen for faster access to your wallet."
|
|
1085
|
-
},
|
|
1086
|
-
"step2": {
|
|
1087
|
-
"title": "Create or Import a Wallet",
|
|
1088
|
-
"description": "You can easily backup your wallet using our backup feature on your phone."
|
|
1089
|
-
},
|
|
1090
|
-
"step3": {
|
|
1091
|
-
"title": "Tap the scan button",
|
|
1092
|
-
"description": "After you scan, a connection prompt will appear for you to connect your wallet."
|
|
1093
|
-
}
|
|
1094
|
-
}
|
|
1095
|
-
},
|
|
1096
|
-
|
|
1097
|
-
"enkrypt": {
|
|
1098
|
-
"extension": {
|
|
1099
|
-
"step1": {
|
|
1100
|
-
"description": "We recommend pinning Enkrypt Wallet to your taskbar for quicker access to your wallet.",
|
|
1101
|
-
"title": "Install the Enkrypt Wallet extension"
|
|
1102
|
-
},
|
|
1103
|
-
"step2": {
|
|
1104
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
|
|
1105
|
-
"title": "Create or Import a Wallet"
|
|
1106
|
-
},
|
|
1107
|
-
"step3": {
|
|
1108
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
|
|
1109
|
-
"title": "Refresh your browser"
|
|
1110
|
-
}
|
|
1111
|
-
}
|
|
1112
|
-
},
|
|
1113
|
-
|
|
1114
|
-
"frame": {
|
|
1115
|
-
"extension": {
|
|
1116
|
-
"step1": {
|
|
1117
|
-
"description": "We recommend pinning Frame to your taskbar for quicker access to your wallet.",
|
|
1118
|
-
"title": "Install Frame & the companion extension"
|
|
1119
|
-
},
|
|
1120
|
-
"step2": {
|
|
1121
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
|
|
1122
|
-
"title": "Create or Import a Wallet"
|
|
1123
|
-
},
|
|
1124
|
-
"step3": {
|
|
1125
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
|
|
1126
|
-
"title": "Refresh your browser"
|
|
1127
|
-
}
|
|
1128
|
-
}
|
|
1129
|
-
},
|
|
1130
|
-
|
|
1131
|
-
"one_key": {
|
|
1132
|
-
"extension": {
|
|
1133
|
-
"step1": {
|
|
1134
|
-
"title": "Install the OneKey Wallet extension",
|
|
1135
|
-
"description": "We recommend pinning OneKey Wallet to your taskbar for quicker access to your wallet."
|
|
1136
|
-
},
|
|
1137
|
-
"step2": {
|
|
1138
|
-
"title": "Create or Import a Wallet",
|
|
1139
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
|
|
1140
|
-
},
|
|
1141
|
-
"step3": {
|
|
1142
|
-
"title": "Refresh your browser",
|
|
1143
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
|
-
},
|
|
1147
|
-
|
|
1148
|
-
"paraswap": {
|
|
1149
|
-
"qr_code": {
|
|
1150
|
-
"step1": {
|
|
1151
|
-
"title": "Open the ParaSwap app",
|
|
1152
|
-
"description": "Add ParaSwap Wallet to your home screen for faster access to your wallet."
|
|
1153
|
-
},
|
|
1154
|
-
"step2": {
|
|
1155
|
-
"title": "Create or Import a Wallet",
|
|
1156
|
-
"description": "Create a new wallet or import an existing one."
|
|
1157
|
-
},
|
|
1158
|
-
"step3": {
|
|
1159
|
-
"title": "Tap the QR icon and scan",
|
|
1160
|
-
"description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect."
|
|
1161
|
-
}
|
|
1162
|
-
}
|
|
1163
|
-
},
|
|
1164
|
-
|
|
1165
|
-
"phantom": {
|
|
1166
|
-
"extension": {
|
|
1167
|
-
"step1": {
|
|
1168
|
-
"title": "Install the Phantom extension",
|
|
1169
|
-
"description": "We recommend pinning Phantom to your taskbar for easier access to your wallet."
|
|
1170
|
-
},
|
|
1171
|
-
"step2": {
|
|
1172
|
-
"title": "Create or Import a Wallet",
|
|
1173
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret recovery phrase with anyone."
|
|
1174
|
-
},
|
|
1175
|
-
"step3": {
|
|
1176
|
-
"title": "Refresh your browser",
|
|
1177
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
|
|
1178
|
-
}
|
|
1179
|
-
}
|
|
1180
|
-
},
|
|
1181
|
-
|
|
1182
|
-
"rabby": {
|
|
1183
|
-
"extension": {
|
|
1184
|
-
"step1": {
|
|
1185
|
-
"title": "Install the Rabby extension",
|
|
1186
|
-
"description": "We recommend pinning Rabby to your taskbar for quicker access to your wallet."
|
|
1187
|
-
},
|
|
1188
|
-
"step2": {
|
|
1189
|
-
"title": "Create or Import a Wallet",
|
|
1190
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
|
|
1191
|
-
},
|
|
1192
|
-
"step3": {
|
|
1193
|
-
"title": "Refresh your browser",
|
|
1194
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
|
|
1195
|
-
}
|
|
1196
|
-
}
|
|
1197
|
-
},
|
|
1198
|
-
|
|
1199
|
-
"ronin": {
|
|
1200
|
-
"qr_code": {
|
|
1201
|
-
"step1": {
|
|
1202
|
-
"description": "We recommend putting Ronin Wallet on your home screen for quicker access.",
|
|
1203
|
-
"title": "Open the Ronin Wallet app"
|
|
1204
|
-
},
|
|
1205
|
-
"step2": {
|
|
1206
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
|
|
1207
|
-
"title": "Create or Import a Wallet"
|
|
1208
|
-
},
|
|
1209
|
-
"step3": {
|
|
1210
|
-
"description": "After you scan, a connection prompt will appear for you to connect your wallet.",
|
|
1211
|
-
"title": "Tap the scan button"
|
|
1212
|
-
}
|
|
1213
|
-
},
|
|
1214
|
-
|
|
1215
|
-
"extension": {
|
|
1216
|
-
"step1": {
|
|
1217
|
-
"description": "We recommend pinning Ronin Wallet to your taskbar for quicker access to your wallet.",
|
|
1218
|
-
"title": "Install the Ronin Wallet extension"
|
|
1219
|
-
},
|
|
1220
|
-
"step2": {
|
|
1221
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
|
|
1222
|
-
"title": "Create or Import a Wallet"
|
|
1223
|
-
},
|
|
1224
|
-
"step3": {
|
|
1225
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
|
|
1226
|
-
"title": "Refresh your browser"
|
|
1227
|
-
}
|
|
1228
|
-
}
|
|
1229
|
-
},
|
|
1230
|
-
|
|
1231
|
-
"ramper": {
|
|
1232
|
-
"extension": {
|
|
1233
|
-
"step1": {
|
|
1234
|
-
"title": "Install the Ramper extension",
|
|
1235
|
-
"description": "We recommend pinning Ramper to your taskbar for easier access to your wallet."
|
|
1236
|
-
},
|
|
1237
|
-
"step2": {
|
|
1238
|
-
"title": "Create a Wallet",
|
|
1239
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
|
|
1240
|
-
},
|
|
1241
|
-
"step3": {
|
|
1242
|
-
"title": "Refresh your browser",
|
|
1243
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
|
|
1244
|
-
}
|
|
1245
|
-
}
|
|
1246
|
-
},
|
|
1247
|
-
|
|
1248
|
-
"safeheron": {
|
|
1249
|
-
"extension": {
|
|
1250
|
-
"step1": {
|
|
1251
|
-
"title": "Install the Core extension",
|
|
1252
|
-
"description": "We recommend pinning Safeheron to your taskbar for quicker access to your wallet."
|
|
1253
|
-
},
|
|
1254
|
-
"step2": {
|
|
1255
|
-
"title": "Create or Import a Wallet",
|
|
1256
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
|
|
1257
|
-
},
|
|
1258
|
-
"step3": {
|
|
1259
|
-
"title": "Refresh your browser",
|
|
1260
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
|
|
1261
|
-
}
|
|
1262
|
-
}
|
|
1263
|
-
},
|
|
1264
|
-
|
|
1265
|
-
"taho": {
|
|
1266
|
-
"extension": {
|
|
1267
|
-
"step1": {
|
|
1268
|
-
"title": "Install the Taho extension",
|
|
1269
|
-
"description": "We recommend pinning Taho to your taskbar for quicker access to your wallet."
|
|
1270
|
-
},
|
|
1271
|
-
"step2": {
|
|
1272
|
-
"title": "Create or Import a Wallet",
|
|
1273
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
|
|
1274
|
-
},
|
|
1275
|
-
"step3": {
|
|
1276
|
-
"title": "Refresh your browser",
|
|
1277
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
|
|
1278
|
-
}
|
|
1279
|
-
}
|
|
1280
|
-
},
|
|
1281
|
-
|
|
1282
|
-
"wigwam": {
|
|
1283
|
-
"extension": {
|
|
1284
|
-
"step1": {
|
|
1285
|
-
"title": "Install the Wigwam extension",
|
|
1286
|
-
"description": "We recommend pinning Wigwam to your taskbar for quicker access to your wallet."
|
|
1287
|
-
},
|
|
1288
|
-
"step2": {
|
|
1289
|
-
"title": "Create or Import a Wallet",
|
|
1290
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
|
|
1291
|
-
},
|
|
1292
|
-
"step3": {
|
|
1293
|
-
"title": "Refresh your browser",
|
|
1294
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
|
|
1295
|
-
}
|
|
1296
|
-
}
|
|
1297
|
-
},
|
|
1298
|
-
|
|
1299
|
-
"talisman": {
|
|
1300
|
-
"extension": {
|
|
1301
|
-
"step1": {
|
|
1302
|
-
"title": "Install the Talisman extension",
|
|
1303
|
-
"description": "We recommend pinning Talisman to your taskbar for quicker access to your wallet."
|
|
1304
|
-
},
|
|
1305
|
-
"step2": {
|
|
1306
|
-
"title": "Create or Import an Ethereum Wallet",
|
|
1307
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your recovery phrase with anyone."
|
|
1308
|
-
},
|
|
1309
|
-
"step3": {
|
|
1310
|
-
"title": "Refresh your browser",
|
|
1311
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
|
|
1312
|
-
}
|
|
1313
|
-
}
|
|
1314
|
-
},
|
|
1315
|
-
|
|
1316
|
-
"ctrl": {
|
|
1317
|
-
"extension": {
|
|
1318
|
-
"step1": {
|
|
1319
|
-
"title": "Install the CTRL Wallet extension",
|
|
1320
|
-
"description": "We recommend pinning CTRL Wallet to your taskbar for quicker access to your wallet."
|
|
1321
|
-
},
|
|
1322
|
-
"step2": {
|
|
1323
|
-
"title": "Create or Import a Wallet",
|
|
1324
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
|
|
1325
|
-
},
|
|
1326
|
-
"step3": {
|
|
1327
|
-
"title": "Refresh your browser",
|
|
1328
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
|
|
1329
|
-
}
|
|
1330
|
-
}
|
|
1331
|
-
},
|
|
1332
|
-
|
|
1333
|
-
"zeal": {
|
|
1334
|
-
"qr_code": {
|
|
1335
|
-
"step1": {
|
|
1336
|
-
"title": "Open the Zeal app",
|
|
1337
|
-
"description": "Add Zeal Wallet to your home screen for faster access to your wallet."
|
|
1338
|
-
},
|
|
1339
|
-
"step2": {
|
|
1340
|
-
"title": "Create or Import a Wallet",
|
|
1341
|
-
"description": "Create a new wallet or import an existing one."
|
|
1342
|
-
},
|
|
1343
|
-
"step3": {
|
|
1344
|
-
"title": "Tap the QR icon and scan",
|
|
1345
|
-
"description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect."
|
|
1346
|
-
}
|
|
1347
|
-
},
|
|
1348
|
-
"extension": {
|
|
1349
|
-
"step1": {
|
|
1350
|
-
"title": "Install the Zeal extension",
|
|
1351
|
-
"description": "We recommend pinning Zeal to your taskbar for quicker access to your wallet."
|
|
1352
|
-
},
|
|
1353
|
-
"step2": {
|
|
1354
|
-
"title": "Create or Import a Wallet",
|
|
1355
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
|
|
1356
|
-
},
|
|
1357
|
-
"step3": {
|
|
1358
|
-
"title": "Refresh your browser",
|
|
1359
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
|
|
1360
|
-
}
|
|
1361
|
-
}
|
|
1362
|
-
},
|
|
1363
|
-
|
|
1364
|
-
"safepal": {
|
|
1365
|
-
"extension": {
|
|
1366
|
-
"step1": {
|
|
1367
|
-
"title": "Install the SafePal Wallet extension",
|
|
1368
|
-
"description": "Click at the top right of your browser and pin SafePal Wallet for easy access."
|
|
1369
|
-
},
|
|
1370
|
-
"step2": {
|
|
1371
|
-
"title": "Create or Import a wallet",
|
|
1372
|
-
"description": "Create a new wallet or import an existing one."
|
|
1373
|
-
},
|
|
1374
|
-
"step3": {
|
|
1375
|
-
"title": "Refresh your browser",
|
|
1376
|
-
"description": "Once you set up SafePal Wallet, click below to refresh the browser and load up the extension."
|
|
1377
|
-
}
|
|
1378
|
-
},
|
|
1379
|
-
"qr_code": {
|
|
1380
|
-
"step1": {
|
|
1381
|
-
"title": "Open the SafePal Wallet app",
|
|
1382
|
-
"description": "Put SafePal Wallet on your home screen for faster access to your wallet."
|
|
1383
|
-
},
|
|
1384
|
-
"step2": {
|
|
1385
|
-
"title": "Create or Import a Wallet",
|
|
1386
|
-
"description": "Create a new wallet or import an existing one."
|
|
1387
|
-
},
|
|
1388
|
-
"step3": {
|
|
1389
|
-
"title": "Tap WalletConnect in Settings",
|
|
1390
|
-
"description": "Choose New Connection, then scan the QR code and confirm the prompt to connect."
|
|
1391
|
-
}
|
|
1392
|
-
}
|
|
1393
|
-
},
|
|
1394
|
-
|
|
1395
|
-
"desig": {
|
|
1396
|
-
"extension": {
|
|
1397
|
-
"step1": {
|
|
1398
|
-
"title": "Install the Desig extension",
|
|
1399
|
-
"description": "We recommend pinning Desig to your taskbar for easier access to your wallet."
|
|
1400
|
-
},
|
|
1401
|
-
"step2": {
|
|
1402
|
-
"title": "Create a Wallet",
|
|
1403
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
|
|
1404
|
-
},
|
|
1405
|
-
"step3": {
|
|
1406
|
-
"title": "Refresh your browser",
|
|
1407
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
},
|
|
1411
|
-
|
|
1412
|
-
"subwallet": {
|
|
1413
|
-
"extension": {
|
|
1414
|
-
"step1": {
|
|
1415
|
-
"title": "Install the SubWallet extension",
|
|
1416
|
-
"description": "We recommend pinning SubWallet to your taskbar for quicker access to your wallet."
|
|
1417
|
-
},
|
|
1418
|
-
"step2": {
|
|
1419
|
-
"title": "Create or Import a Wallet",
|
|
1420
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your recovery phrase with anyone."
|
|
1421
|
-
},
|
|
1422
|
-
"step3": {
|
|
1423
|
-
"title": "Refresh your browser",
|
|
1424
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
|
|
1425
|
-
}
|
|
1426
|
-
},
|
|
1427
|
-
"qr_code": {
|
|
1428
|
-
"step1": {
|
|
1429
|
-
"title": "Open the SubWallet app",
|
|
1430
|
-
"description": "We recommend putting SubWallet on your home screen for quicker access."
|
|
1431
|
-
},
|
|
1432
|
-
"step2": {
|
|
1433
|
-
"title": "Create or Import a Wallet",
|
|
1434
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
|
|
1435
|
-
},
|
|
1436
|
-
"step3": {
|
|
1437
|
-
"title": "Tap the scan button",
|
|
1438
|
-
"description": "After you scan, a connection prompt will appear for you to connect your wallet."
|
|
1439
|
-
}
|
|
1440
|
-
}
|
|
1441
|
-
},
|
|
1442
|
-
|
|
1443
|
-
"clv": {
|
|
1444
|
-
"extension": {
|
|
1445
|
-
"step1": {
|
|
1446
|
-
"title": "Install the CLV Wallet extension",
|
|
1447
|
-
"description": "We recommend pinning CLV Wallet to your taskbar for quicker access to your wallet."
|
|
1448
|
-
},
|
|
1449
|
-
"step2": {
|
|
1450
|
-
"title": "Create or Import a Wallet",
|
|
1451
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
|
|
1452
|
-
},
|
|
1453
|
-
"step3": {
|
|
1454
|
-
"title": "Refresh your browser",
|
|
1455
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
|
|
1456
|
-
}
|
|
1457
|
-
},
|
|
1458
|
-
"qr_code": {
|
|
1459
|
-
"step1": {
|
|
1460
|
-
"title": "Open the CLV Wallet app",
|
|
1461
|
-
"description": "We recommend putting CLV Wallet on your home screen for quicker access."
|
|
1462
|
-
},
|
|
1463
|
-
"step2": {
|
|
1464
|
-
"title": "Create or Import a Wallet",
|
|
1465
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
|
|
1466
|
-
},
|
|
1467
|
-
"step3": {
|
|
1468
|
-
"title": "Tap the scan button",
|
|
1469
|
-
"description": "After you scan, a connection prompt will appear for you to connect your wallet."
|
|
1470
|
-
}
|
|
1471
|
-
}
|
|
1472
|
-
},
|
|
1473
|
-
|
|
1474
|
-
"okto": {
|
|
1475
|
-
"qr_code": {
|
|
1476
|
-
"step1": {
|
|
1477
|
-
"title": "Open the Okto app",
|
|
1478
|
-
"description": "Add Okto to your home screen for quick access"
|
|
1479
|
-
},
|
|
1480
|
-
"step2": {
|
|
1481
|
-
"title": "Create an MPC Wallet",
|
|
1482
|
-
"description": "Create an account and generate a wallet"
|
|
1483
|
-
},
|
|
1484
|
-
"step3": {
|
|
1485
|
-
"title": "Tap WalletConnect in Settings",
|
|
1486
|
-
"description": "Tap the Scan QR icon at the top right and confirm the prompt to connect."
|
|
1487
|
-
}
|
|
1488
|
-
}
|
|
1489
|
-
},
|
|
1490
|
-
|
|
1491
|
-
"ledger": {
|
|
1492
|
-
"desktop": {
|
|
1493
|
-
"step1": {
|
|
1494
|
-
"title": "Open the Ledger Live app",
|
|
1495
|
-
"description": "We recommend putting Ledger Live on your home screen for quicker access."
|
|
1496
|
-
},
|
|
1497
|
-
"step2": {
|
|
1498
|
-
"title": "Set up your Ledger",
|
|
1499
|
-
"description": "Set up a new Ledger or connect to an existing one."
|
|
1500
|
-
},
|
|
1501
|
-
"step3": {
|
|
1502
|
-
"title": "Connect",
|
|
1503
|
-
"description": "A connection prompt will appear for you to connect your wallet."
|
|
1504
|
-
}
|
|
1505
|
-
},
|
|
1506
|
-
"qr_code": {
|
|
1507
|
-
"step1": {
|
|
1508
|
-
"title": "Open the Ledger Live app",
|
|
1509
|
-
"description": "We recommend putting Ledger Live on your home screen for quicker access."
|
|
1510
|
-
},
|
|
1511
|
-
"step2": {
|
|
1512
|
-
"title": "Set up your Ledger",
|
|
1513
|
-
"description": "You can either sync with the desktop app or connect your Ledger."
|
|
1514
|
-
},
|
|
1515
|
-
"step3": {
|
|
1516
|
-
"title": "Scan the code",
|
|
1517
|
-
"description": "Tap WalletConnect then Switch to Scanner. After you scan, a connection prompt will appear for you to connect your wallet."
|
|
1518
|
-
}
|
|
1519
|
-
}
|
|
1520
|
-
},
|
|
1521
|
-
|
|
1522
|
-
"valora": {
|
|
1523
|
-
"qr_code": {
|
|
1524
|
-
"step1": {
|
|
1525
|
-
"title": "Open the Valora app",
|
|
1526
|
-
"description": "We recommend putting Valora on your home screen for quicker access."
|
|
1527
|
-
},
|
|
1528
|
-
"step2": {
|
|
1529
|
-
"title": "Create or import a wallet",
|
|
1530
|
-
"description": "Create a new wallet or import an existing one."
|
|
1531
|
-
},
|
|
1532
|
-
"step3": {
|
|
1533
|
-
"title": "Tap the scan button",
|
|
1534
|
-
"description": "After you scan, a connection prompt will appear for you to connect your wallet."
|
|
1535
|
-
}
|
|
1536
|
-
}
|
|
1537
|
-
},
|
|
1538
|
-
|
|
1539
|
-
"gate": {
|
|
1540
|
-
"qr_code": {
|
|
1541
|
-
"step1": {
|
|
1542
|
-
"title": "Open the Gate app",
|
|
1543
|
-
"description": "We recommend putting Gate on your home screen for quicker access."
|
|
1544
|
-
},
|
|
1545
|
-
"step2": {
|
|
1546
|
-
"title": "Create or Import a Wallet",
|
|
1547
|
-
"description": "Create a new wallet or import an existing one."
|
|
1548
|
-
},
|
|
1549
|
-
"step3": {
|
|
1550
|
-
"title": "Tap the scan button",
|
|
1551
|
-
"description": "After you scan, a connection prompt will appear for you to connect your wallet."
|
|
1552
|
-
}
|
|
1553
|
-
},
|
|
1554
|
-
"extension": {
|
|
1555
|
-
"step1": {
|
|
1556
|
-
"title": "Install the Gate extension",
|
|
1557
|
-
"description": "We recommend pinning Gate to your taskbar for easier access to your wallet."
|
|
1558
|
-
},
|
|
1559
|
-
"step2": {
|
|
1560
|
-
"title": "Create or Import a Wallet",
|
|
1561
|
-
"description": "Be sure to back up your wallet using a secure method. Never share your secret recovery phrase with anyone."
|
|
1562
|
-
},
|
|
1563
|
-
"step3": {
|
|
1564
|
-
"title": "Refresh your browser",
|
|
1565
|
-
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
|
|
1566
|
-
}
|
|
1567
|
-
}
|
|
1568
|
-
},
|
|
1569
|
-
|
|
1570
|
-
"gemini": {
|
|
1571
|
-
"qr_code": {
|
|
1572
|
-
"step1": {
|
|
1573
|
-
"title": "Open keys.gemini.com",
|
|
1574
|
-
"description": "Visit keys.gemini.com on your mobile browser - no app download required."
|
|
1575
|
-
},
|
|
1576
|
-
"step2": {
|
|
1577
|
-
"title": "Create Your Wallet Instantly",
|
|
1578
|
-
"description": "Set up your smart wallet in seconds using your device's built-in authentication."
|
|
1579
|
-
},
|
|
1580
|
-
"step3": {
|
|
1581
|
-
"title": "Scan to Connect",
|
|
1582
|
-
"description": "Scan the QR code to instantly connect your wallet - it just works."
|
|
1583
|
-
}
|
|
1584
|
-
},
|
|
1585
|
-
"extension": {
|
|
1586
|
-
"step1": {
|
|
1587
|
-
"title": "Go to keys.gemini.com",
|
|
1588
|
-
"description": "No extensions or downloads needed - your wallet lives securely in the browser."
|
|
1589
|
-
},
|
|
1590
|
-
"step2": {
|
|
1591
|
-
"title": "One-Click Setup",
|
|
1592
|
-
"description": "Create your smart wallet instantly with passkey authentication - easier than any wallet out there."
|
|
1593
|
-
},
|
|
1594
|
-
"step3": {
|
|
1595
|
-
"title": "Connect and Go",
|
|
1596
|
-
"description": "Approve the connection and you're ready - the unopinionated wallet that just works."
|
|
1597
|
-
}
|
|
1598
|
-
}
|
|
1599
|
-
},
|
|
1600
|
-
|
|
1601
|
-
"xportal": {
|
|
1602
|
-
"qr_code": {
|
|
1603
|
-
"step1": {
|
|
1604
|
-
"description": "Put xPortal on your home screen for faster access to your wallet.",
|
|
1605
|
-
"title": "Open the xPortal app"
|
|
1606
|
-
},
|
|
1607
|
-
"step2": {
|
|
1608
|
-
"description": "Create a wallet or import an existing one.",
|
|
1609
|
-
"title": "Create or Import a Wallet"
|
|
1610
|
-
},
|
|
1611
|
-
"step3": {
|
|
1612
|
-
"description": "After you scan, a connection prompt will appear for you to connect your wallet.",
|
|
1613
|
-
"title": "Tap the Scan QR button"
|
|
1614
|
-
}
|
|
1615
|
-
}
|
|
1616
|
-
},
|
|
1617
|
-
|
|
1618
|
-
"mew": {
|
|
1619
|
-
"qr_code": {
|
|
1620
|
-
"step1": {
|
|
1621
|
-
"description": "We recommend putting MEW Wallet on your home screen for quicker access.",
|
|
1622
|
-
"title": "Open the MEW Wallet app"
|
|
1623
|
-
},
|
|
1624
|
-
"step2": {
|
|
1625
|
-
"description": "You can easily backup your wallet using the cloud backup feature.",
|
|
1626
|
-
"title": "Create or Import a Wallet"
|
|
1627
|
-
},
|
|
1628
|
-
"step3": {
|
|
1629
|
-
"description": "After you scan, a connection prompt will appear for you to connect your wallet.",
|
|
1630
|
-
"title": "Tap the scan button"
|
|
1631
|
-
}
|
|
1632
|
-
}
|
|
1633
|
-
},
|
|
1634
|
-
|
|
1635
|
-
"zilpay": {
|
|
1636
|
-
"qr_code": {
|
|
1637
|
-
"step1": {
|
|
1638
|
-
"title": "Open the ZilPay app",
|
|
1639
|
-
"description": "Add ZilPay to your home screen for faster access to your wallet."
|
|
1640
|
-
},
|
|
1641
|
-
"step2": {
|
|
1642
|
-
"title": "Create or Import a Wallet",
|
|
1643
|
-
"description": "Create a new wallet or import an existing one."
|
|
1644
|
-
},
|
|
1645
|
-
"step3": {
|
|
1646
|
-
"title": "Tap the scan button",
|
|
1647
|
-
"description": "After you scan, a connection prompt will appear for you to connect your wallet."
|
|
1648
|
-
}
|
|
1649
|
-
}
|
|
1650
|
-
},
|
|
1651
|
-
|
|
1652
|
-
"nova": {
|
|
1653
|
-
"qr_code": {
|
|
1654
|
-
"step1": {
|
|
1655
|
-
"title": "Open the Nova Wallet app",
|
|
1656
|
-
"description": "Add Nova Wallet to your home screen for faster access to your wallet."
|
|
1657
|
-
},
|
|
1658
|
-
"step2": {
|
|
1659
|
-
"title": "Create or Import a Wallet",
|
|
1660
|
-
"description": "Create a new wallet or import an existing one."
|
|
1661
|
-
},
|
|
1662
|
-
"step3": {
|
|
1663
|
-
"title": "Tap the scan button",
|
|
1664
|
-
"description": "After you scan, a connection prompt will appear for you to connect your wallet."
|
|
1665
|
-
}
|
|
1666
|
-
}
|
|
1667
|
-
}
|
|
1668
|
-
}
|
|
1669
|
-
}
|
|
1670
|
-
`;function uR(e,t){return Object.defineProperty(e,"__recipe__",{value:t,writable:!1}),e}var Ck=uR;function kk(e){var{conditions:t}=e;if(!t)throw new Error("Styles have no conditions");function n(r){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean"){if(!t.defaultCondition)throw new Error("No default condition");return{[t.defaultCondition]:r}}if(Array.isArray(r)){if(!("responsiveArray"in t))throw new Error("Responsive arrays are not supported");var o={};for(var i in t.responsiveArray)r[i]!=null&&(o[t.responsiveArray[i]]=r[i]);return o}return r}return Ck(n,{importPath:"@vanilla-extract/sprinkles/createUtils",importName:"createNormalizeValueFn",args:[{conditions:e.conditions}]})}function dR(e){var{conditions:t}=e;if(!t)throw new Error("Styles have no conditions");var n=kk(e);function r(o,i){if(typeof o=="string"||typeof o=="number"||typeof o=="boolean"){if(!t.defaultCondition)throw new Error("No default condition");return i(o,t.defaultCondition)}var l=Array.isArray(o)?n(o):o,c={};for(var u in l)l[u]!=null&&(c[u]=i(l[u],u));return c}return Ck(r,{importPath:"@vanilla-extract/sprinkles/createUtils",importName:"createMapValueFn",args:[{conditions:e.conditions}]})}function fR(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hR(e){var t=fR(e,"string");return typeof t=="symbol"?t:String(t)}function pR(e,t,n){return t=hR(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ix(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function K0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ix(Object(n),!0).forEach(function(r){pR(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ix(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var mR=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=Object.assign({},...n.map(u=>u.styles)),i=Object.keys(o),l=i.filter(u=>"mappings"in o[u]),c=u=>{var p=[],f={},m=K0({},u),g=!1;for(var v of l){var w=u[v];if(w!=null){var b=o[v];g=!0;for(var C of b.mappings)f[C]=w,m[C]==null&&delete m[C]}}var j=g?K0(K0({},f),m):u,I=function(){var N=j[A],T=o[A];try{if(T.mappings)return 1;if(typeof N=="string"||typeof N=="number")p.push(T.values[N].defaultClass);else if(Array.isArray(N))for(var B=0;B<N.length;B++){var R=N[B];if(R!=null){var M=T.responsiveArray[B];p.push(T.values[R].conditions[M])}}else for(var H in N){var V=N[H];V!=null&&p.push(T.values[V].conditions[H])}}catch(W){throw W}};for(var A in j)I();return e(p.join(" "))};return Object.assign(c,{properties:new Set(i)})},gR=e=>e,yR=function(){return mR(gR)(...arguments)};function Ek(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ek(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ak(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ek(e))&&(r&&(r+=" "),r+=t);return r}var vR="AEkVMQnvDV0B0wKWAQYBQgDpATQAoQDcAIUApwBsAOMAcACTAEUAigBRAHkAPgA/ACwANwAoAGIAHgAvACsAJQAXAC8AHAAhACIALwAVACsAEQAiAAsAGwARABgAFwA7ACoAKwAsADQAFgAtABIAHAAhAA4AHQAdABUAFgAZAA0ADgAXABAAGQAUABIEtAYQASIUOjfDBdMAsQCuPwFnAKUBA10jAK5/Ly8vLwE/pwUJ6/0HPwbkMQVXBVgAPSs5APa2EQbIwQuUCkEDyJ4zAsUKLwKOoQKG2D+Ob4kCxcsCg/IBH98JAPKtAUECLY0KP48A4wDiChUAF9S5yAwLPZ0EG3cA/QI5GL0P6wkGKekFBIFnDRsHLQCrAGmR76WcfwBbBpMjBukAGwA7DJMAWxVbqft7uycM2yDPCLspA7EUOwD3LWujAKF9GAAXBCXXFgEdALkZzQT6CSBMNwmXCYgeG1ZZTOODQgATAAwAFQAOa1QAIQAOAEfuFdg98zlYypXmLgoQHV9NWD3sABMADAAVAA5rIFxAlwDD6wAbADkMxQAbFVup+3EB224cHQVbBeIC0J8CxLAKTBykZRRzGm1M9QC7DWcC4QALLTSJF8mRAoF7ARMbAL0NZwLhAAstAUhQJZFMCgMt+wUyCddpF60B10MASSsSdwIxFiEC6ye5N2sAOeEB9SUAxw7LtQEbY4EAsQUABQCK00kFG8MfBxcAqCfRAaErLQObAGcBChk+7Td0BBgXAKoBxwIhANMrEnM681CwBZA6dyc1SAX6JwVZBVivuAVpO11CEjpYQZd7k2ZfofgLEwPFByXxdyMEo0sCU1MCdRurJwGPo6U1WwNFFwSDYQkA0QarPy8jBykCOV0AawFhH3EAgx0ZAJUBSbcAJ2kXAa/FAzctIUNTAW9ZBmUCZQDxSRcDKQEFAElBAKsAXQBzACu1Bgfz7xmNfwAJIQApALMbRwHRAdsHCzGXeIHoAAoAEQA0AD0AODN3edPAEF8QXAFNCUxsOhULAqwPpgvlERUM0SrL09gANKkH6wNTB+sDUwNTB+sH6wNTB+sDUwNTA1MDUxwK8BrTwBBfD0gEbQWOBYsE1giDJkkRgQcoCNJUDXQeHEcDRQD8IyVJHDuTMwslQkwMTQMH/DZCbKd9OANHMatU9ZCiA8syTzlsAR5xEqAAKg9zHDW1Tn56R3GgCktPrrV/SWJOZwK+Oqg/+AohCZNvu3dOBj0QFyehEPMMLwGxATcN6UvUBO0GNwTFH3kZFQ/JlZgIoS3ZDOkm3y6dgFYj8Sp/BelL8DzZC0lRZA9VC2EJ3zpfgUoDHQEJIocK2Q01CGkQ7wrFZw3hEUEHNQPRSZYAoQb9Cw0dMRWxJgxiqAsFOXMG9xryC4smqxMlevgFzxodBkkBJRr7AMsu44WsWi1cGE9bBf8LISPDFKRQHA0hQLN4RBoXBxElpQKNQ2xKg1EyHo8h8jw5DWIuD1F4B/E8ARlLC308mkanRQoRzj6JPUQiRUwoBDF7LCsnhwnLD4EMtXxuAVUJHQmtDG0TLRETN8EINQcVKZcgJxEIHUaRYJYE85sD7xPNAwcFOwk9Bw8DsRwpEyoVJQUJgSDTAu820S6vAotWfAETBccPIR/bEExH3A7lCJcCYQN/JecAKRUdABMilwg/XwBbj9RTAS7HCMNqaCNwA2MU410RbweNDlMHoxwvFbsc3XDEXgeGBCifqwlXAXEJlQFbBN8IBTVXjJwgPWdPi1QYlyBdQTtd+AItDGEVm0S5h3QChw9nEhcBMQFvBzUM/QJzEekRZxCRCOeGADWxM/Q6IQRLIX8gDQojA0tsygsjJvUM9GUBnxJeAwg0OXfqZ6dgsiAX+QcVMsFBXCHtC45PyQyYGr0YPlQqGeAHuwPvGu8n5kFTBfsDnw86STPqBLkLZQiHCTsARQ6fEwfTGGYKbYzMAS2HAbOVA1ONfwJriwYzBwcAYweDBXXhABkCowifAAEAywNTADUCqQeZABUAgT0BOQMjKwEd4QKLA48ILccBkSsB7yUEF78MEQDzM25GAsOtAoBmZp4F2VQCigJFMQFJIQQBSkNNA6tt3QDXAEcGD9tDARGnRscW3z8B22snAMMA9wABMQcBPQHJAe9pALMBWwstCZ6vsQFJ5SUAfwARZwHTAoUA2QAxAHvtAU8ASQVV9QXPAktFAQ0tFCdTXQG3AxsBLwEJAHUGx4mhxQMbBGkHzwIQFxXdAu8qB7EDItsTyULBAr3aUQAyEgo0CrUKtB9f81wvAi1uPUwACh+kPsM/SgVNO087VDtPO1Q7TztUO087VDtPO1QDk7veu94KaF9BYecMog3QRMQ6RRPXYE1gLhPELbMUvRXKJVIZORq4JwEl4FUFDwAtz2YsCCg0cRe4ADspZIM9Y4IeLApHHONTjVT0LRcArUueM6sNqBsRRDwFQ3XpYiYWCgoeAmR9AmI+V0mrVzccAqHzAmiUAmYFAp+AOBcHAmY3AmYiBGoEewN/DwN+jjkCOXMTOX46Hx8CbBkCMjI4BgJtwwJtquuGL2NBJwFjANoA3QBGAQeUDIkA+ge+AAmxAncrAnaeOwJ5Rz8CeLYZWNdFqkbTAnw7AnrEAn0FAnzsBVUFHEf8SHlfIAAnEUlUSlcRE0rIAtD9AtDISyMDiEsDh+JEwZEuAvKdXP8DA6pLykwpIctNSE2rAos7AorUvRcDGT9jAbMCjjMCjlg8k30CjtUCjlh0UbBTMQZS0FSBApP3ApMIAOUAGFUaVatVzAIsFymRgjLdeGJFNzUCl5sC765YHaQAVSEClosClniYAKVZqFoFfUkANwKWsQKWSlxAXM0CmccCmWBcxl0DFQKclzm+OpkCnBICn5cCnrSGABkLLSYLAp3tAp6OALE5YTBh6wKezwKgagGlAp6bGwKeSqFjxGQjIScCJ6sCJnoCoPcCoEgCotkCocACpisCpcoCp/sAeQKn7mh4aK3/RWoYas0CrN8CrKoCrWMCrP4CVxkCVdgCsd3TAx9KbJMCsrkJArLkE2zcbV9tRFsDJckCtlg3O26MAylBArhaArlDEQK5JnNwMnDdAr0VArvWcJIDMg0CvoRx/gMzbQK+FnMec0sCw8cCwwBzfnRHMUF03AM8owM8lgM9uwLFeALGQwLGDIUCyGVNAshAAslLAskqAmSZAt3OeHVdeKp5IUvMAxifZv4CYfAZ75Ugewdejl63DQLPZwLPaCtHT87vD5sAwqkCz28BJeYDTg5+RwEC3CMC24YC0ksDUlgDU1sA/QNViICFO8cS6VxBghiCz4LKg4kC2sMC2dqEDIRFpzgDhqEAKwNkCoZtVfUAUQLfYQLetG9zAuIr7RAB8ywjAfSXAfLOgwLr7wLpbHUC6vUC6uAA9UMBtQLuhQLrmJamlv8C7jsDhdyYdXDccZ0C8v8AZQOOEpmPAvcPA5FqA5KDAveUAvnVAvhimhiap7czmxoDnX8C/vYBFwA1nxifrwMFiQOmZgOm1QDNwQMGZqGEogEFAwxFAQsBGwdpBl21YwEAtwRnuw2HHq8JABNxNQAfAy8SSQOFewFfIx0AjOsAHQDmnwObjQizBhufwQCnBRG76R09PhZ4BWg3PkArQiFCtF9xEV+8AJbFBTIAkEwZm7k7JmAyEbrPDi8YxhiJyfYFVwVYBVcFWAVjBVgFVwVYBVcFWAVXBVgFVwVYRhUI14VnAgICCmRe6SsEyQOxBi+7uwC7BKe7AOdAKRayBUY+aT5wQj9Ctl91N1/oAFgRM6sAjP7Ma8v8pudGej0mIwQrFic2NX5t32rB8RnCLGkBa9duMBcFXwVqycHJuAjPSVsAAAAKfF59i74AMz+BAAMW0QblrSMFAIzDCwMBDQDlZR09JB9KQrFCvEE4I18nYDYnOCMJwT0KRD9DPng+gT5wPnECiUK8SUI7X8tOT2pNCixrVC9qC24fX+AzOhsJZ5sKYiMrPB0mQqtCvCvMAcv8X8kOHy4JCAkifp3fajotShfJq8msCWXBy8wKYEFfD+UQoxEAk40dRUIlG6ltOc44CjM/Qz5wQj8cBwodTEdsWywtWuG8Egp97R0rQj8cXQhKCQ4zVENCNwQ7Q5wsCoEbLUI/G/UIUyIjGDAxAAWPYfBeCnFkyWALYC0jbkNgGTkCGx5gswYCaxBlTmBNEQFk52AVYJVgfWCzYEtgkWgWFwa1DtxVqbxaC0MWqwG7K83BAh8VABwDHgF5AmwvMJVSgAGKCrhHGgDkI3SOCsoNpk3qAZsCh5xPBUBfAPf3BwA0FlcMC6UMJB+6r0eAgQw0ABUTnyuCCHoC0gtLZREbANhOBnUECh5aADEAtritAJQnCxZvqyQ4nxkBWwGGCfwD2e0PBqoGSga5AB3LValaCbthE4kLLT8OuwG7ASICR1ooKCggHh8hLBImBiEMjQBUAm5XkEmVAW4fD3FHAdN1D85RIBmpsE3qBxEFTF8A9/cHAHoGJGwKKwulODAtx69WDQsAX7wLAGNAlQh6AOpN7yIbvwAxALa4rQCUJy07Ds4CkBh7ULtYyHRyjsOlmw/ZFUkb7AEpEFwSBh/lAccJOhCTBQ8rDDYLABEAs+AiAQIApADhAJiCCrJrOS8AFABbG8YubHYqDcEQAjskHNPhHB4LG30CewTBCqrxbAAnLQ6mLs6hHAe7CQAQOg+7GkcczaF3HgE9Kl8cLs4RGQB9q9ocAuugCAHCAULz5B9lAb4Jtwz6CDwKPgAFwAs9AksNuwi8DTwKvAk8DrsFmAEbawouzqEqD4sa4QHDAREWOwCgCzsLuxC7BBiqe9wAO2sMPAACpgm8BRvQ9QUBvgH6bsoGewG7D00RErwBAQDqAQAAdBVbBhbLFPxvF7sYOxjbL7ZtvgNIqLsAB7sALrsC6w5WAAq7BAAeuwJVICp/FTwVuwG+J+QAsloBvSjgo7vIAAFbAAG7AAJbAALjAAg7AA67AgAbu6VbDr/EAPQAaPuoOwMBu5UnSwDn3Rm7CBp7CKEFCv9wAN+7p7sau6OLeXIG+6mbgwASuwYbCwG8AACGAG27BgALu6c7ARo7ugihnMoBuwvtB8CpOwDhewG/AADlABW7AAb7AAm7AGmLABq7GLuOaRX7AA5rAC5LHgAGuwAXuwghAA1KAcIAt68mAcAAALQADpsAHBsBv/7hCqEABcYLFRXbAAebAEK7AQIAabsAC3sAHbsACLsJoQAFygBunxnVAJEIIQAFygABOwAH2wAdmwghAAaaAAl7ABsrAG0bAOa7gAAIWwAUuwkhAAbKAOOLAAk7C6EOxPtfAAc7AG6cQEgARwADOwAJrQM3AAcbABl7Abv/Aab7AAobAAo7AAn7p+sGuwAJGwADCwAQOwAIPAAUOwARawAPiwAN6wANuwAZCwYWGwAVOwBumxm7ALobLgATOwMAaSsKAOFLAAI7AARSABd7BRsABtAAGLsAC/sAX7sAa/sA5IsBuwAXdgG8AAFyC6EABUoAbXYAB/sA5XsAHGseAXsoUgA5RQD+Bw0McgAoKnABpAUIXgG8XiMMCQdvS2xfKokfPBRiLTYDoQq0AdgAFgLRA24BdnJHUhQhA08CFT4BLAYDc0a8e1J6QAApADEB+wBTCtsAe5AsASsAduUNETJGAUoAVwUAAVABB4rMAHg7BCClAFoA1hUAlWg3H4sAzWuxAM/UFgjCdXMbGFYdCdEBiJCrIlNTTUgSPMKJ+QB/HDdAKSvgEZdPAHIBKSwwKUIZDwMwVQT3xe4AS2XcAGoCcQI/EXo6x3guNdUGBQAQGx0KCAwqBB8dKU5TTgi5ugAKEs0AJgABGgCGAIkAjjUA7gC0AOAAnTwAuwCrAKYAoQDyAJ8A0wCcAOsBDAEHAMAAeQBaAMsAzQEHANcA6wCIAKIBNQDjANgA1QMBByoz1NTU1LbA3M3QzkMyFwFNAVcvRwFVAWQBYwFWAUdLQ0VoDQFOFQcIAzI2DAcAIg0kJiksODo6PT09Pj8OQB5RUVFRU1NSUylUVVdWVhxdYWFgYmEjZmhwb3JycnJycnR0dHR0dHR0dHR0dnZ3dnVbAEDsAEUAlgB0AC4AYvIAigBTAFMAMwJz6QCH//LyAGAAj+wAmwBLAF4AYPn5qgCBAIEAZQBSAK0AHgCyAH8CPAI/APgA4wD6APoA5AD7AOUA5QDkAOIAKQJ3AU0BPAE6AVABOgE6AToBNQE0ATQBNAEYAVQPACsIAABNFwoWAxUWDgCKAJIAogBLAGQYAi0AcABpAJEDEgMkKgMeQT5HKQCLAksAwwJTAqAAugKSApICkgKSApICkgKHApICkgKSApICkgKSApECkQKUApwCkwKSApICkAKQApACkAKOApECcQHQApMCmwKSApICkRZ5CwD6BQOnAl0CNhcBUBA1At4RCisTAUo3E02RAXekPAFlWQD/Az1HAQAAkykeGI9qAClgAGkALgCJA5TMi/CuhFoFuisOwhEBndV0KgsEIzFsATNabAGyAN5+gH9+gH6BgoJ+g4aEfoWIhoCHgoiCiX6Kfot+jIqNfo5+j4KQfpF+kn6TfpSDlYiWgpd+2gLabOEC2GwAgmwkbKAAg2xsBEkERgRIBEsESQRPBEwERwRNBE8ETgRKBEwETwCWZmwAowOIbAC0ZgEFbADJUWxsAM9sAgxsAPZabAD2ARkA9gD0APQA9QD0A31ebNSEI2XAAPYA9AD0APUA9BxsbACJWmwA9gCJARkA9gCJAL4A6AAIAPYAiQN9XmzUhCNlwBxsAPdabAEZAPYA9gD0APQA9QD0APcA9AD0APUA9AN9XmzUhCNlwBxsbACJWmwBGQD2AIkA9gCJAu0A9gCJAL4CNwD3AIkDfV5s1IQjZcAcbAJDATZsAkoBOWwCS8FsbAJXbGwDnwLtA58DnwOgA6ADoAOg1IQjZcAGA31ebBxsbACJWmwBGQOfAIkDnwCJAu0DnwCJAL4CNwOfAInUhCNlwAYDfV5sHGwEPmwAiQQ/AIkGjTFtIDFs1m4DKGwDrAJsbABVWv4VMgJsbACJAmwAVAEAul5sAmxebGwAiV5sAmxebD3YAEls1gJsbEbCxxP/x5BApA0KYFA89AsjTx97EHmJQPyocItC2JnNFRCEnFU6SFTDoI0PxeRNRoNRWkpzVnWW8pTagkNmgf+jGupqZ3eu50LAFnc+OzfJwdub1AdpOy76VnijWNR/CMEevikQkFyQuLuPajxWi9chqOoMJ7qpCN4sx3LJG4Myu8kD68wC6+iAwt+pU1JEeY13rpCVkXSZfinVKn4xZpxsI3Lp8bJLrJ9ujkrIalMRBAcv/GSKEtowzcEn5XmJw2BagB8V2UWJoJHZ14SXhM7p0XeGFOuw6mlvyq99WYp5XxrO6ru9nn4RHcOkJ7hx5UqWtman7yVMLzYXQefQRUdIY70RYQE8+aAzCNSGQkXiHfnHYRMi+xczKDdZLk3AV1gzxkkSHLjBwuq8shIJ+/RAbqjqQbugFhe0rqklu432EERkM5k9y1DXzds46oLqKAx6OhPT2WiqEfhaITn7OF9Y694AmKmUvbpWp0xJqDaf3jeNJXnK6NpnGcFOmbclbARC+5+5U52ufw5b0Hh+2LrrNimvZe4eYmApRsZnJE310SqB+1xB6rSJfnV1f2D0awB18Oc0sXAFqIlgHgWiaZGdvP5CJUSsCTCQUC335+iSkwPlLJJ5lwjTSn9Lw22NbK1Tu8w+bUpHtDRDPho7Gun8aw2Jzu9i+N0Ot/kPMbLAb/rUQ82kfpk85qLDkfxLl39QPDngo72GYh/Xigbpcm1pA23D2ywt3D8GgMOao040wDqkHxOEx0OhC+ZmHiIdjK7yRbfJD2ouZbAedhD3p7s8WDmCJfNforgDYPGAXSI08fTjPZ5B37lc5VXGzc1vJmibDwBNVzXuaUzg7N5H4BxqjhJ+kz9HLUJys7bpBDYAPvbut13AwJCWd059tS8YTYgC8HwrkewBfa1LSSpmMr9uR2EekTiAMH+Mx4AGzgbquccwBDlLmRhgXL/YiLPCEb6d2k5qJ6o800qddABkpqt7NG+sc2uvHZwZs57W1AHTFM1KkMShasADAh2FvzbzJOzVDMS3ZlT2BSFKdnkZFB6JyqJbhm6XANis9TrtzJdlPVp+rl8v3nIke6Jou7m2TKu53Vounupgkz2LzrQPhhatLIG7rfF/gUKWp15X3LKt+ZvuCDSqPUigF9yJntimC1HJR7Yj/dUrLAXWrT+1tnwPJJLGKAlQ5VeNDWRKCTt2vz3rJuo4+gIt75/Mkfl/gSZblZ9r/SEeeosZXneli/xNh1WVCvkRt2RnyyjtMkMqhzXh1PVOCbILqv0r7rGYm0CHIyKdhHL90cl9E1I6eEtQTCt6RXj8M0HHrHCHLVRpNM6WIbT5BCMGVnL0o5895qSRbCJz+5I8PGMhAN/Xrj4BgIdlKqlHtBHqTJwmK169toZ2IWxNzrAbIG7zh85Q/LG2A4yBcaBel52zdunokB0lv3A7kXnTI7M6ZnfZ7nwuj5lkGhqSpW+w5CI/FmRlplBEbnZy1ZxS3DL8rf1YWhO5XivWZBSRh1gFsjjyj3qRG1cm/6ors7WsEif6WRxns1MKDZa6KrbfMQ/swIb+2nb0tqxHeii6FcgVeAjE/Xwac1owx04dJKG8R5YQgHNnEfHf0qb8WOnU0eQSjazq+IK7cSuCqYzPEUB/x+QgGZqM3dBoYvNvZVOHDkbgdilWdagqO5bkybXfLpyMPuGq8mvAAEZGbR6RwXGlW9ErOWTfnjfx6dXFJqBj0OBSGFz4lWQasNOmVJeN4SFWSLfOGB/7ehV5YuoNNROHZEG9ElVuMnqbDMMuDleOt/cN/gsWxGw128mwU8/HxkOKqdTZnI7dHka67WCTf/FmBrxpNCaKJ1GxBTCSS7MNfhNj8S4Gtotg6Z3AM9cAeVROnppUMaiV5jjudLnNqoVrKO1/FijLlAc74kxydxKX1RQuMqHR63eecYr5o6MJ+B78VsLlCrpelWh6GOrCOBIoQmIcdpJL1pwE2zzZqBkecGTdK8KMOB6r1eNRURyrz6M899TZaoS/vNOxHf+5gORU+OyYIcIW6diP25GHF6u8TNjuL/GJzCnLLXd01KrsjRa51v4+O/VIAWXESJxfxWjv628J+cWUQpoD+Yytzs3jSMRJ23/XT+vUdtUMLDQq1vnIoeg/GjWh88MT6k9dRqDaQ+vodilFgvjuNw5pJpId9mfwyYeLCGb3BmHXdfQfhfPRQaupe/f8TG4Bk3eDKlYBaEK3kZYNN2Sdxz47m/vYBxvIOKtnqplB1pebzuXmAr/MuzQCknKe653dzaWQQ7MUhWYWvzIZwLe1v0rXxImLaz+AkAu+sYikhouNF3EW6w4crZ6MuUiDbIAx8XhAfegcvW6x9BPb3/sCxGWu9YyatqExB+TSm69qIkI9IwhjrcnzME+jWBx4mNQm5WwLzUjSyY4FZ0aMF5YFlXUD4hL4XfOeYv5rDe2s2D/Cn+28fZ9UCnOQvXFMnQqfc0G+ZqOWWD9l/liqUPaNQzZjxCHpUAD8Rcc90MniQ02ugHWsUupFUvhC9usY7zNPt5F2jO7qgzhafsQSd50jgLrC6Qx6bpHbXR3WNAu1BzGmwbz+ebGmwTjdy006Y6zipP7n/OJlvSmbq+SY+nefAVKK6EBMPbce5n3IdRI8+vbxCpN53rw3TvgNds1SuMiuLGxt89L71mxPDeanGhyHvOjmO56tnVpoHalQnL6TqNuqKsHjHCIKB4pCgj4WyYPvRvYvqi5EMr7lN3MotPR/KH7JUD1lZbU0QzfbrEBJnuQiVAyAC9vwXWp2TRU1/0aapyAH2cbglEHVAdl+1rb1u147uV0td1eNoQZsqHrIMIYVPXtLk2TIU3cJE08PjoYNDpfF/IcJnYQHl6nsplczX3Rgah4NbJJHl//5scUufqsSd//kbIS406ZWoMP//+jhGUswX/5nVNz/jAj9KmXPtAmMiK+khhbn1w/mELzZMT/WxcW//y/jsHaOM/61oAW/CjYhJtY622/TtMYuP7bilBvbiT3vB9n8IcFPnwM78H0KfhYDRdY5PhWJ4jWRQzB+HT5NVZV56LG82hcQms+jOTT/c9Y9sx5rPi1/wB7f/+c5UfUCKk3iwwCuywUc2MGnAwsXf1E5hoI55x1Q/Qby+sWH8NRjavZ8VaDsdi1NUVhH86BJHX1yaFt1w1OYeL5LVmdN+5Q+KuTvXEPDzUCg6xp0HhsUhTWSe7MZMM/6rsTUb0/nbUE3YQlGGt48kT1/6cnf6yHnvHtQx9EosOXN077yyEq/jE3YTiG/5SEJmXFeocJJ1EAd6vKeK6VEdJLOZ1km/EwOnZWCQpzCLKPHxrfh4yJhGq//2dos2E/3+MOcdW5EsgIdmTQUQetzRy5fQHhDBl37XbWzsqO/cASEDjyst1/8NEROqVAxWnddQV+umJ8IrKVgKvGaTc0GsQ4s8h0Osql5QKwlddPDjJhKInyWqYUKmmlIts+FIcXZ6yM6cljbsjUG2ksSOkuIw4sYHffRNgBOLApvD6XrR6Rt0rV2Uf8IpnIUVnb9Twt91QjAaD/dStSWDxg7aYY+VXIgnuowYdOkjywa2hlgrnI6PjaU3e3UjQ5Yk5mdIJGyHnv3/P+1EkMav1yFyF+FeJE/RXnWBw+Nh0aOo6TGlKX7d+dkP9+brvr79SdtXJtcD/aXBGiMNfG6/NQniQHYQlK78FEHDqOh+bDI0o+2Ub0h53EL/vlzjrBczVEZz2bOtvIL+DIzDkk9nCWt7tlqsq3l9JMtJk3r5HG2iJ9b/X11TG6wwMAjHLQ2oasaMEsydh88QPvI+hmqIHhvalpKoKOueJR0eZ9J8G2alNOIOy98jwvbc87Ewk9d+5G/tUijTmlbjFlDKXV05HalKxaRTrucc73On7yzAPS6f2v4ogiaWyWeV73dv/MsQT5HjRrsYV9dLAcI3T+zC2qEVINyNpEhoKV+xVSuWtT4AhBfpnZ7unIM+HX3msI0HiI+P+z2PFgkjGi5PqEbG/wNIWeRUjPtDEgbbubN+I4JaDLrW9borRBDob7ZFx+JdKeFVUKVeWqb/c88Ol7DhM0suLtuEd8tkDSMTD3DFx8UphPINHMHi51hAPttXL4Ektt/lKEUG/R4qZKohHjVpAcPIMiHyWr6xR8/EWnNJvBFET76yCdk5er7ADB/1bgoImhpSiZ/omZjPKPCEeZsOwvPmXL+1vlJNeGO3TzySmGA1X6e58gLrazDM71jywM1XL8zKHN6G3kB31Y8vLtP982N975SZXk2JwDvmv7AY/aDsFFk1v+nE7/hbvuOWhBH4kuemeYozPk2K22Vx/YGiDTLU7YilpOt29u3RZMBh4UJjlTP5ItxTzWv6ebL9b+GSU1Vsm2S8LMfVfJczaBSqE8J1A4YUjpsALL7++bwCPXFhaufdpDFtBlHb9makeYbqdg9ltvK/HwF/rNE6KrtWUkEcxmTB7Iyu5TiVaIgW/YxzQhpArliIMkOoK5L7ShVtF+DYqV01mk7fwop04hQRwg4KFmr5z9nYf05VVqkSe7gfnx5bxxlQ0qEV0jiwzf064qG11iEqjHcUgDWWsDs/LEGlzX31T5KVL+7D4EoKim7HBagiqRo5JI3WfDBgpKIruWz9j/J6Hp5Q/EJbMWB8NeSMuFarNw3AEYPBJtYQO/4oD/ZgPTSQ06di0EeumX5EbrdThO+fvYEVSxLtZ3AJkee0Xn0sDwNtiiZhJjJRDuG1YRKB1vOulfd9JjHeyu+UHTmrtra/pm+8Rixh4WKiLaLOCxIbZNoWRZSyyUGLPjAaAo+SQBpfO2uruWrzFxLlpvrXJNMCWtlJDKGAnlWK5xpU2tcxXbeD+sbdfwYXt/qTwDk6UqXR/aUt099DhSNl4Nk8mXwpw+b0nvjKOG6Mg1PRXjrMUMANvNgEArv8nMJs3vj1aHi8MHz/UfJWWzkcrSpZTNBhduXlGR7i+ip/THDp5R9KRNcDKECgtwgXg4EFN5HHfikP/XvsoCkHTg+NbsD8Gl6eknk4Arwn/BWGJ0hgW0/gUKrzuGZhub7igRP3abetpIm+24xEOlWl3YKpm2qTBFvX8ddDRvm1LcwnCJuEfZx12qPY9TrntMIQsv316zvpyWnyStX8VU4j6tQk+CWlLBUCJR6MdH9Cp7g2qdn2WM9qFbREmejH09dlWEPm8hPF0L7RxwRRdiCs0DP8ewk6ApoELkKU9hckSdbnXm8UHJmaNXjxv/q0fTTpu8rnl9lN0vQCpDRbCtcz12rGRFEA7Cfg7FhZn5QFkNmv1ZURKEsiZce1nS9K7HrwpC7yJV4Xt3eAVbLJfoXHrtwG60Z8gwaSnmxoL3s2ZlRqggZN/MHo1oUS4L+GwObFI596Ld4Mvi8l+cQmF1gJpkpnDio7TuO35npaMHiWzFqPSX3qNgkIPGuX0qGYnPIVsM901Yu8oZnOZOY1TbtIdFUNKNq2dP8SJ4F/VCEzIjF0/Rh+7UrZj80tC6rognVH3mqa8eCs/lcQU1Pjj98kBmAKDbZUTwosv02UunRR3n0X6c+f73mtwB7/WbQ16gO431EtwZbNG1SM4TZPBnsQSESlsfG2JLQXx5xWf4bmQ/xcVCPISAX5897JxHKLD/Xkgu57+ABR2+MMtEbX64+MNlBHpKC7sjlWVEShf5qA+dGc59LFVlZrX/Enq9z/v+wnZ1HErmxmjJjxOA+hAjVUWgtq6ygAi/8ewJDjUMFw3zhQFtbyTLDPFd21Ji5S5QPZo9nMSxdg1+DGFSN0wlWt7XeYPbHqLfliV0J1kOhQNp0VbUPy0MS2Ms66OxtSWvaULaWHnfAA+sieVVgtjDwN3nKonWapkSKRN8BKKJQpCfqo8RQI5udhfu5s5+7vwsppmAJDgz2GNA7d43VdbV2l/SrvEu4RYslmNJmfSOVbssxAhSYy6WxpIQdDB0FVBpZ6IM8yr81QN+XLZ3n/wed/R+s6LslkxKbzzst/GkRbe6rFmtvJCwr1T44ETM+IMgOnjUO0eG6a1n2w7lwM1oFBvzMUWRkNFOvKcx3oSb5XdenZ5dXsute6nkRypBiSdAtA2fxAd8UdLOZW/MB7fZoEuFheQXijdaF8kuaRZoSeWdKOkKsGYEGaXfaDKTu0WMTcLniQs7KRCz9iK3SP+Y2xIjkfVGqFLSQ6vh+A1u6FdfwXsv1VPMfi2cxmdM+/xTgMXEyo2ZGcQ2YmPsghnYdv2+z48JpGZA4tUK1p1q2VdVxyfypXEXcrxKKtmt8UdW7sHWmKMqDuBBM3J/JUQx8eUYN4pJ5oRqvdiPHU1o/WPjiKvnlCqOdyxlxF54L9PrtLD1NejZ9aZDivVr6ZfMFK1/psVygoPIAnphcJWWb9+5IKMKmgRQULsTPZi6Bw4wP32zVEoKcHpP73CkFAqS98nSaGoWDjDJiaACJn4p5o1jq9R4Q4VcibhXF//LHP0bdf63kRVZdRbbhGe7sDQcyWS5tpkfeYHnff25WK+4FpzLlAcbaKmHdIBqOw3fImx1uqQIADH0TyHzFlqTG6nMoY81svP0T6BIyELMS8tMe+E1p6TFP6sVpZa6VNaTumufD5aj9goRa9SAmdJT4HhI2r0egj8UrgFb8L59wGLnYlzkLAiUd3m/WWIIEU61kPoEjd3gIVy/fiBcgqQqHnoXpL0SqLGdGGgn7DQeVMSYWHfjno1FngIKP9cjYaTlcRP6bZunjHP13/lbVm4awti894pTf/ZNNqr4OR+tDVie/m+rC8QpVnRbsCMPukOH87B2jM4AG6pHuXl1x9SiKdhYJVOhfo/+SCaGjUW2CoogL1FFhFGN9o+acoVLl0SXs/3vrSccmZeAF3NewFuOg/P12QYKQF+SH+KYcNnsAhIAELPBUgre/KRUJEA+KPD0MHRjv+3J/j2Z23MuJmkfy7leWcMsti8wXLSHgXFJTaksx1Woi6oljwxFVIJG12SBSZLNJDbXMYPekmiXT4FclKI35BFgqnYpKfcsr+f8HUXQoHJ9UYZ4J5YMiHHyAxg6eidhodgqJ2Htf/xYEx+G0zXchuzlt8hcAl+AT8NCQ4orFc4DerabF1enA7NTLnvtZh3FUwqIOvY7Q4DYmoDHwXTSw5UNNh6r7j0B/ezMYJMDcw4+6gCTZX4YQ+7Xs8de72vsR3cmfpxIX64/6KR1p3VX4F6vfHEzxzarh8aDH4G1DFoBBM6npXFpK+Rh+WrcFclAeAxi0PoaR9CpOxxGLSdvxKVSw8oOOanG/soKImRopN38AdcUhhM2GT/PgQeSQrG12njuJJD5Z7vWfAZmFybYLdSA91kB4aoBhoj1Z//KNIVVujqaLLRwCkbyn4vh0739C9V9iSjybeOIeSOvNs7LW1a7EUtNoKAnOGML4U8KBXpfrw73WjAszJG4Qscq+Xr3kZWR4Omm0xT6qE9y6FNSpstV4onMZSqCEJ+3VX9qjvdx5QVrM0WXxmPZxejdfnihcFAjzv5PjlTl6ickDbHe6+Lch52pjOPqk+m3RZ+bh2JSMGtFBuODbMchrpRVlt16NTQ05Ps0IDtWlUmWfP2vX8M4YDynIuOZ4Ck91+591B98Gw9fw+yQogTR8CSg0zaJu+rlBo/mr3A+1NziF+kdubz+whc857AZt6DwIBIF5+5yiaaf3ByQp1Fm3sOkZDAzwsYSQTM/Kv6idkugF63FDobDdUY3huruU+sCaBuRR+HmOowvmZoBjZHNh77SXFtmY/oOUE7ifN7nBHAo83S/xvcS6H4Ci2u/9Id62Wv6Ui+zMNLAzhfkTkVcW2BwrnYvpur0ZDlzs+ZLsmGTWvd1892t78gx1YjEJusGcxphjLkV0UfAKlekfSBVWHE2ahk4AbbRmHyL7GYdtKfdlINwrcdJuf3Cee1nfUojDQn/YmItESOFhtLzrkEv4k2XpMU9oaJQ3VUC+1INh6BE68pkHameGJm4Gvdb24Q0fXWxd9Tp3A9mzFSe4qXDGGDIV4AAGV1jIDfveknH1TwWpUT6HiQxKP3AAHJNkJeRlj/mXBmS4S1j8FK6YmpK7jyyAiRbsMCCLoJcx01fvgpMvKQRxu9IOwymconQjD56g7ksOrcOeoTbius4JnGesAS1DtgdaophYsw1wGIsMS3P7K6doE3K5czznqPQLSRRF/Ylzb5NtSKsL33SgskFNCF4khn5LWaDxI23ZRi2hzqN8uW8UzZEBYy68+VtGLSymQrXGUlr2nO2BbBIT5Vh1RmGAyDXaW0FPrpx3wv2UYdFk9tSl+906bMxCuXQaKDQP/U19UEcVGK4gmksL8lAorxQSAOwpeYX9xrZsh6yoGaL/X5O3tgQC8OM+/GvxnW9XvAtu/JxAigydfSmZfqZfg1XOcHNOpLlN8j64OZ36l5qawDBJ62YaTvxeNmm5gowCdBosgcpHOgNgwA+sknN8XmsR2IYChcafl9bGNMZ/nB5guWuvEziv6QI2bP2DtyKWG/qUjZMaxy+wASkkVGtuwGtywkTYG6MYrZBo18vYcww48G/+f+eITA/qMwbLlJC0S3+/ai2pPvkOhRRVmGTuSupaxhIk0xoXLtixCxSAn4Z3OnUS3wBqVscLI4P3GP7i/6gxYsswsVmkvDXFLhO/OKcur8flegCSKiqmVpIRvCzgbjEA0mXPn+RExXY/2OE1f/BYuWpRQY8gCDpMOYBx9Gn4tL3hihSIR1ixh2PIIT7cr2gUJbfs76EKYG52Jk0UZF/PQkBxGuFCEWXnG6ue/hTIqjTRq1sotVrKrwIGHDrITyuanUzbIYdgdEeV88K1VD82TYB2B61Ft+tB1KqHPmT9+hWoaV+iF3SuvtJqvnoLaA8wxrD56AUMULEgzO9SvBcBAfqz/dzMYzwMt/YLszDbmGe1bcHHfFMcvGql9bf/tp+Hrj4q18aNnftGjmXTfws39emn7/5IBxog9MrmftAA5Oq4awenm8HimWO72dwVlHcHmutVMdrMHw+p2vzpzT+B0iIZ+IEpplwWhClcXlxhxAsF3CHRnnaUEqq3ByQ+cqhe5SvR4SFxh/LZoQwtj8QZQGT1BzY2EMpYnUcZWQEPlwFZw+7UryK9qV8KgruYsvyMoK16KI2sN4SOblrVwhyiL8+IBZ8cpUhsJQSU7TFHAi+L2F0sn0y+FtDODlnuif2Mba8QddPZYYxjTsIgkMe3M6+7kXxUfZvbCUlyq71J1eNczGk6Vqw6rSx2K3vM+DjLxDRGzWepTO2qTT/W8S7u0QXcyFUahcB4vq8xCYTpy8iswtnyz7Kx6lgTEQJ9RqkgEIN6DOUqB0uRdeYuDa7AP7Zy9z+ZlTsmVR5vtV71m3dmdtNeWghbr5PnPJtjXAzcvZjxyV96VEx/B1TA0IEQSI50ywGuIbmAYdQg/l/rxhQLX+6uOLyFsaUt6mtjpAJkLfehnB6MlOHnNOrWLvCBqVBS07jcM+4RzLEed3f3/0Xwp92U+nataNHyEgnnuYR6PXEjRLETz0xrt3UglfK7Bn4aNlXG7cZco4lMziLv5+Mh2JCww3mz69Z9ZMRR/xv5EKJ38IFxKd9dw5CgPIXja/gzAshMbF14/qBIgNkdUQeP8YE7SrICGtiTnAKTyA9cXa3OauDHxZOdTP7yuYBzD1UcHstIO16FxF1bRUAlSkszI83YufTchU8OPnnozDl9bS0y6CnnjGwgj9M61cXcZsljjhLeT/Vq+30ScN2PcT/dOoxUDqDS38+OpCCzLDdnwHQc3ECQVIkaxmdPaZTSdfp2jjGzSdNLM5yPQsgJDl+ZnhclDQi8ltUnkqWJ323IvTZPN8rn0+EshL1cx9PiaLTzUsryn9Zp2Nt/detUAh4N/2I3dlMQqjHFxSihv0uykzflq5clMy2ZBaxoEb0/QMp03IQQus3vnZd/NOmSsmgqXqKFP3ozyDgY7RQS+npabe/hNG+5sa5FtvL8v0uYuag2NewYkcol3TOTadpuncCnDgOGpmLnTQ1PEPUN2cNsrW8LYfIv+hzfb7vod+ipXHzmbgj5Fzc6RcT/5PD7VQ8nTJBNj1urkVUx9uJvTWmqY08OC80rGDLaWXv243VB16gjt4Xtwp5H2UDR0LiKW24Ed/sOO8jl1yEU/XAb3h7ScKnCFy/V3sICrkY1D0K9fSokHIL0s5/7DLShLAPXRbV7fbv4qj6OwHC9d5PlEOX3LRpQ3P7hcSAKlIKPDM83ypz56U5+rJeo0cyUtC7wltL8wqEiNSgZsDWzACc7RFoZqhlD0+sihIBQlkQTXmvUyIOZhkQX2zqME5VRC7ms1sa3CY+odMn3mMBiTvCMKnnCxg5ZPLq4GUDB4jF8Br2K4x4sxfWjGXQatJ25I1JyrIv2Z4bP1jKw5C+B2/s0v4dGUOsaS6IPIQV3ETQ+F2fSl2BPBXHzyYN8VmwWIrKeMX9pyGWuAOVXwkxJsRBaBVzLhZDP8ONGncknL5DpTxHN32GgFWMwsc0GmL0oRDmRT8u2lvjAKUIi0MmXhIHSlFeh3Qh5pP6ap4YUd6b569ZIaHgya2AyD12cPxY0In/PBjzDctTaKJCU+xc6m9RkNLDEE8guvxtJP8sl8N9bLqw0F/qejaBlcHYqw31zYpsutQp07hsP1vhGdl4hJ1wA7OCsAHnKj9879uSHILEmuZ6vI1lT4tvnWCVKZhhYrWHW9oPKPKpbOC6FTjf/OtUvwmiXr2ykvyLzHGQeyS7BenZpL3N/CaF5T7Gkml7JXN5cj0PKaDpZVImD61FuMgFHPqSHvt4Ej4KBdAfdcoO3AjQPLwwtKsgGM+ty4lNZMBEItJSRLunG5ckrM/BeoXWoPZVvEoIzLgFQYPupMwZCXis4W2SCJ2zsefZqCj+aTfSq1FYdUj2UeJALvVTf7vuuikOE1Hit3UIAGUi/sqgMum9vw218y1FlY/9XnOji9nqhGAcMYICc7BiqLZj5N+cKEuSAuiyWbMg81ZD1lHovy/we2eaCcCv4MzEW3O0mVA/t2xdA0cxTVbXmFhn+tARDpvDz5ftLr15OAAmvo2QiAky+feVO4bGibv2nlBmBzqx0lEDfEm4UnEs11pbnwZlJ/0Y73/wBPYfTNZiJKR73TzdCW1BffiJq9bLjQmaKnU0+gN8sfe25IKSUCooQwxePDrFn3a/zUgWxvPoTYVXfobY/GV2qqTkeVDV9D8657fhY0/wiaJ5NfLxhXbE/naxs34N0hd6vxNfdm1TCnozm/NKSCThchoYgMF7Z2tzXFovRfsNVkf86JjrM60r7UIuV3bsmfrMOqzjXjN6HPBG25zCJ3QLueySbj9oFvX/HxWBqh31PBPxduCVAxMqC9HK+YL3oBZqBruoh6LKvdMqoz0PYXUBrwbiioyE8Tj5ImjJmiOOWLbAZvIZ/l9rIPljx3T5glJ2ewlfuIT5GlodQsAf/IEtmYkML5SRQGxxwW+rlZkD8belJNu09Itwx9xDULTnemVDeojdbgcd2gKGM9aO00Jivtbs7ZyOSE8IPh98GfvatD8Ud5uHcZfAfMiPSlIxd4UqeSDzuNfbKDuFepkyC/s3j9fawmhY1b9NqDi0ZS5eP35l7rL2eK5QlWLlyCmxx8AFaFiTuD2pMUxZV5mBSJuJduOaq2ZrWpu28DE8jl/hisBz7bGWH6qLF0ayWNq1Sejtcs8KQrQqJk5P9QHDYHOIolgNsMDmEaWcTelghbfFCDqWrq6YLwDWy+m68ec5nShgq2fduUBpQUuKKKgnttaUX9PRfMmxqJyU7e0RLr1bev+ge1KK0bZyhHKKDE8gQX9Vf7rNHWOxBtZcxwwGusyMpH77qWZxXsQmbgIGhtiO+gSSRCyu/ek+OFsz1HMiQH0IHV7PjJi3dszYfFp8ue9h4+AfKte4MTiehPvxNcm/T1t9vsFZx8rHN5ie77r2jzZOq/Em4Q+H9sNcZakf9HnzCc1fJixppxP8FQABmVnqa6GbJhwaka7WH7Wdoz1WxOjSNV8N9sgW5S3Ppgkut+TTCkjA+AodUOk1KIR+8G8S3WrSZG4nyqfJ6FEjXl6a/LEoRMHZUqfPRWvwqrtXYy9IUsmUGzkqi76ib4NANCe5DnyOxnFRZ9d8FdBVBjra3iNuZhJuWW5Omi/hBigqDsg0mu2AhfJDXdwyMIJ33HHHPfS2JtjegRejX11m41TbNL+Qp7mR0g9CPKTj9PIjuSycGN/YPozXI4zarXuAeLv5CHKtKcJKRbd6R2oLNiEt0T8+QIVJH7zt9ncKMgd49vV2P1AyScZ9Qzbu3m3LBnuu6dw7aE0b6r4kzVkI/GUS88mA53L/rLtntkFlZXGtIoqNP2mD3eVv08AVVPT3wJn81zpbJV9SuqZ6Pd1ge0Zz2RFHeCdV5CLPftH9V5o9+VzFu4R0QeumqDwUhXn3IyYotdJnxr1l3BqWnQVAeDBEOtPyJQx1q5+mODiClXtYeBLTWtsJ42AMBcf/IFIhpfhYO08hsg0Ik+DpQFNOKReK3o3cudkxWX0soPtI5eSFOA6yNylS+IQjrQtYQ/5s4UcixJfokumBUjpH9ofSjUTwPCapGFndfqqG5IHeMMvfg+88SXm7bNyjk6pGKzL+WxDAdqKtQ72WWVbOk3I+ueGuammmB2pvFZvqIcU/lvW3n9+r2lycnQLE4OX9R1jIgW4cDjJ3v8dAa66mVcfC7ptCr5io6mCaA9qI9T9FFWqo1ZAaMxgxAu8aXqmaOYryMND2sTUfoHvxcYK7hEiJhCLYFDx3PBhE97c2a0ub1/ePJcyJOqr7UaTAPTJ+xvZtjb/40sloY1ltRnTkWILmIP2b7S3AdXCR+YiArMUHwdncpjpyDGfzqGOUoAuaamWzAMacQtb34/M32FEgR5lUEf8fRzFrZUhzQj0fR7/6gdzdnVVvcSneLmtqJ930VCCDORY8CVdQWdo/S3PNkX3pQsPVKWIYGAMrFZoq8bQ/OJBDSXP7KSBdL3QN0Zqd393p6VFc7DnlnFiN00SY5Nux7yadeIM0Upl2rVsu8/VAI";const Nx=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),Px=4;function wR(e){let t=0;function n(){return e[t++]<<8|e[t++]}let r=n(),o=1,i=[0,1];for(let N=1;N<r;N++)i.push(o+=n());let l=n(),c=t;t+=l;let u=0,p=0;function f(){return u==0&&(p=p<<8|e[t++],u=8),p>>--u&1}const m=31,g=2**m,v=g>>>1,w=v>>1,b=g-1;let C=0;for(let N=0;N<m;N++)C=C<<1|f();let j=[],I=0,A=g;for(;;){let N=Math.floor(((C-I+1)*o-1)/A),T=0,B=r;for(;B-T>1;){let H=T+B>>>1;N<i[H]?B=H:T=H}if(T==0)break;j.push(T);let R=I+Math.floor(A*i[T]/o),M=I+Math.floor(A*i[T+1]/o)-1;for(;((R^M)&v)==0;)C=C<<1&b|f(),R=R<<1&b,M=M<<1&b|1;for(;R&~M&w;)C=C&v|C<<1&b>>>1|f(),R=R<<1^v,M=(M^v)<<1|v|1;I=R,A=1+M-R}let S=r-4;return j.map(N=>{switch(N-S){case 3:return S+65792+(e[c++]<<16|e[c++]<<8|e[c++]);case 2:return S+256+(e[c++]<<8|e[c++]);case 1:return S+e[c++];default:return N-1}})}function bR(e){let t=0;return()=>e[t++]}function Sk(e){return bR(wR(xR(e)))}function xR(e){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((o,i)=>t[o.charCodeAt(0)]=i);let n=e.length,r=new Uint8Array(6*n>>3);for(let o=0,i=0,l=0,c=0;o<n;o++)c=c<<6|t[e.charCodeAt(o)],l+=6,l>=8&&(r[i++]=c>>(l-=8));return r}function CR(e){return e&1?~e>>1:e>>1}function kR(e,t){let n=Array(e);for(let r=0,o=0;r<e;r++)n[r]=o+=CR(t());return n}function qc(e,t=0){let n=[];for(;;){let r=e(),o=e();if(!o)break;t+=r;for(let i=0;i<o;i++)n.push(t+i);t+=o+1}return n}function jk(e){return Hc(()=>{let t=qc(e);if(t.length)return t})}function Ik(e){let t=[];for(;;){let n=e();if(n==0)break;t.push(ER(n,e))}for(;;){let n=e()-1;if(n<0)break;t.push(AR(n,e))}return t.flat()}function Hc(e){let t=[];for(;;){let n=e(t.length);if(!n)break;t.push(n)}return t}function Nk(e,t,n){let r=Array(e).fill().map(()=>[]);for(let o=0;o<t;o++)kR(e,n).forEach((i,l)=>r[l].push(i));return r}function ER(e,t){let n=1+t(),r=t(),o=Hc(t);return Nk(o.length,1+e,t).flatMap((l,c)=>{let[u,...p]=l;return Array(o[c]).fill().map((f,m)=>{let g=m*r;return[u+m*n,p.map(v=>v+g)]})})}function AR(e,t){let n=1+t();return Nk(n,1+e,t).map(o=>[o[0],o.slice(1)])}function SR(e){let t=[],n=qc(e);return o(r([]),[]),t;function r(i){let l=e(),c=Hc(()=>{let u=qc(e).map(p=>n[p]);if(u.length)return r(u)});return{S:l,B:c,Q:i}}function o({S:i,B:l},c,u){if(!(i&4&&u===c[c.length-1])){i&2&&(u=c[c.length-1]),i&1&&t.push(c);for(let p of l)for(let f of p.Q)o(p,[...c,f],u)}}}function jR(e){return e.toString(16).toUpperCase().padStart(2,"0")}function Pk(e){return`{${jR(e)}}`}function IR(e){let t=[];for(let n=0,r=e.length;n<r;){let o=e.codePointAt(n);n+=o<65536?1:2,t.push(o)}return t}function Ya(e){let n=e.length;if(n<4096)return String.fromCodePoint(...e);let r=[];for(let o=0;o<n;)r.push(String.fromCodePoint(...e.slice(o,o+=4096)));return r.join("")}function NR(e,t){let n=e.length,r=n-t.length;for(let o=0;r==0&&o<n;o++)r=e[o]-t[o];return r}var PR="AEUDWAHSCGYATwDVADIAdgAiADQAFAAtABQAIQAPACcADQASAAsAGQAJABIACQARAAUACwAFAAwABQAQAAMABwAEAAoABQAJAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACwANAA0AAwAKAAkABAAdAAYAZwDTAecDNACxCmIB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgPi89uj00MsvBXxEPAGPCDwBnQKoEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJEMAJpIBpob5AERSMAKNoAXqaQLRBMCzEiC+AZ4EWRJJFbEu7QDQLARtEbgECxDwAb/RyAk1AV4nD2cEQQKTAzsAGpobPgAahAGPCrysdy0OAKwAfFIcBAQFUmoA/PtZADkBIadVj2UMUgx5Il4ANQC9vLIBDAHUGVsQ8wCzfQIbGVcCHBZHAZ8CBAgXOhG7AqMZ4M7+1M0UAPDNAWsC+mcJDe8AAQA99zkEXLICyQozAo6lAobcP5JvjQLFzwKD9gU/OD8FEQCtEQL6bW+nAKUEvzjDHsuRyUvOFHcacUz5AqIFRSE2kzsBEQCuaQL5DQTlcgO6twSpTiUgCwIFCAUXBHQEqQV6swAVxUlmTmsCwjqsP/wKJQmXb793UgZBEBsnpRD3DDMBtQE7De1L2ATxBjsEyR99GRkPzZWcCKUt3QztJuMuoYBaI/UqgwXtS/Q83QtNUWgPWQtlCeM6Y4FOAyEBDSKLCt0NOQhtEPMKyWsN5RFFBzkD1UmaAKUHAQsRHTUVtSYQYqwLCTl3Bvsa9guPJq8TKXr8BdMaIQZNASka/wDPLueFsFoxXBxPXwYDCyUjxxSoUCANJUC3eEgaGwcVJakCkUNwSodRNh6TIfY8PQ1mLhNRfAf1PAUZTwuBPJ5Gq0UOEdI+jT1IIklMLAQ1fywvJ4sJzw+FDLl8cgFZCSEJsQxxEzERFzfFCDkHGS2XJCcVCCFGlWCaBPefA/MT0QMLBT8JQQcTA7UcLRMuFSkFDYEk1wLzNtUuswKPVoABFwXLDyUf3xBQR+AO6QibAmUDgyXrAC0VIQAXIpsIQ2MAX4/YUwUuywjHamwjdANnFOdhEXMHkQ5XB6ccMxW/HOFwyF4Lhggoo68JWwF1CZkBXwTjCAk1W4ygIEFnU4tYGJsgYUE/XfwCMQxlFZ9EvYd4AosPaxIbATUBcwc5DQECdxHtEWsQlQjrhgQ1tTP4OiUETyGDIBEKJwNPbM4LJyb5DPhpAaMSYgMMND137merYLYkF/0HGTLFQWAh8QuST80MnBrBGEJULhnkB78D8xrzJ+pBVwX/A6MDEzpNM+4EvQtpCIsJPwBJDqMXB9cYagpxjNABMYsBt5kDV5GDAm+PBjcHCwBnC4cFeeUAHQKnCKMABQDPA1cAOQKtB50AGQCFQQE9AycvASHlAo8DkwgxywGVLwHzKQQbwwwVAPc3bkoCw7ECgGpmogXdWAKOAkk1AU0lBAVOR1EDr3HhANsASwYT30cBFatKyxrjQwHfbysAxwD7AAU1BwVBAc0B820AtwFfCzEJorO1AU3pKQCDABVrAdcCiQDdADUAf/EBUwBNBVn5BdMCT0kBETEYK1dhAbsDHwEzAQ0AeQbLjaXJBx8EbQfTAhAbFeEC7y4HtQEDIt8TzULFAr3eVaFgAmSBAmJCW02vWzcgAqH3AmiYAmYJAp+EOBsLAmY7AmYmBG4EfwN/EwN+kjkGOXcXOYI6IyMCbB0CMjY4CgJtxwJtru+KM2dFKwFnAN4A4QBKBQeYDI0A/gvCAA21AncvAnaiPwJ5S0MCeLodXNtFrkbXAnw/AnrIAn0JAnzwBVkFIEgASH1jJAKBbQKAAAKABQJ/rklYSlsVF0rMAtEBAtDMSycDiE8Dh+ZExZEyAvKhXQMDA65LzkwtJQPPTUxNrwKLPwKK2MEbBx1DZwW3Ao43Ao5cQJeBAo7ZAo5ceFG0UzUKUtRUhQKT+wKTDADpABxVHlWvVdAGLBsplYYy4XhmRTs5ApefAu+yWCGoAFklApaPApZ8nACpWaxaCYFNADsClrUClk5cRFzRApnLAplkXMpdBxkCnJs5wjqdApwWAp+bAp64igAdDzEqDwKd8QKekgC1PWE0Ye8CntMCoG4BqQKenx8Cnk6lY8hkJyUrAievAiZ+AqD7AqBMAqLdAqHEAqYvAqXOAqf/AH0Cp/JofGixAANJahxq0QKs4wKsrgKtZwKtAgJXHQJV3AKx4dcDH05slwKyvQ0CsugXbOBtY21IXwMlzQK2XDs/bpADKUUCuF4CuUcVArkqd3A2cOECvRkCu9pwlgMyEQK+iHICAzNxAr4acyJzTwLDywLDBHOCdEs1RXTgAzynAzyaAz2/AsV8AsZHAsYQiQLIaVECyEQCyU8CyS4CZJ0C3dJ4eWF4rnklS9ADGKNnAgJh9BnzlSR7C16SXrsRAs9rAs9sL0tT0vMTnwDGrQLPcwEp6gNOEn5LBQLcJwLbigLSTwNSXANTXwEBA1WMgIk/AMsW7WBFghyC04LOg40C2scC2d6EEIRJpzwDhqUALwNkDoZxWfkAVQLfZQLeuHN3AuIv7RQB8zAnAfSbAfLShwLr8wLpcHkC6vkC6uQA+UcBuQLuiQLrnJaqlwMC7j8DheCYeXDgcaEC8wMAaQOOFpmTAvcTA5FuA5KHAveYAvnZAvhmmhyaq7s3mx4DnYMC/voBGwA5nxyfswMFjQOmagOm2QDRxQMGaqGIogUJAwxJAtQAPwMA4UEXUwER8wNrB5dnBQCTLSu3r73bAYmZFH8RBDkB+ykFIQ6dCZ8Akv0TtRQrxQL3LScApQC3BbmOkRc/xqdtQS4UJo0uAUMBgPwBtSYAdQMOBG0ALAIWDKEAAAoCPQJqA90DfgSRASBFBSF8CgAFAEQAEwA2EgJ3AQAF1QNr7wrFAgD3Cp8nv7G35QGRIUFCAekUfxE0wIkABAAbAFoCRQKEiwAGOlM6lI1tALg6jzrQAI04wTrcAKUA6ADLATqBOjs5/Dn5O3aJOls7nok6bzkYAVYBMwFsBS81XTWeNa01ZjV1NbY1xTWCNZE10jXhNZ41rTXuNf01sjXBNgI2ETXGNdU2FjYnNd417TYuNj02LjUtITY6Nj02PDbJNwgEkDxXNjg23TcgNw82yiA3iTcwCgSwPGc2JDcZN2w6jTchQtRDB0LgQwscDw8JmyhtKFFVBgDpfwDpsAD+mxQ91wLpNSMArQC9BbeOkRdLxptzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgELgEaJZkC7aMAoQCjBcGOmxdNxrsBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUHqSvAj5Gqwr7YrMUACT9AN3rpF27H7fsd/twPt4l+UW1yQYKBt2Cgy7qJpGiLcdE2P1cQSImUbqJ6ICH27H4knQMIRMrFkHu3sx6tC35Y+eLIh4e4CMKJ4DfyV+8mfta499RCAJ0xfeZR8PsoYOApva9pjGn4PhvyZS7/h5JLuhaucfjuU+Z584wwqNO4hWYmaBCcjgQPale1bjoHzMUbut/zTgxHxBnAyrdKpF4IRMASLBtD/jviyLeCgj8twWjAd3HchN/uqaeRYeHJgl7JEY9/cTrvtfybx/r3Y/NtxJ9dp+MTVmiS9bwBH73s8Di56/Ma+mTPMHq4T1yEG1fWcqr0u+hrGnJEvU1JJAm/maQSrKrazIyvSkDFkj8UUlfBq8baniTGPng6YZRL661rDNw4w/1g2figG0IhXnL7wosd/sVNo5dYSmMBTP5c7rYLjRdCwg8quwljOMPf63D8ICAL0r71XRiyFHdgwHbwfgnPOf4Lzjf2v+j+IiDHG2isp5yUnzSDyDRb4i/Vs0qHSHq8PiEQ/JnBP7PxnjN0j6gT4AVAeRx/1o9VnEUlUwvFrzJqHk9jxAw4sYxCnrxaeBdCFFKbnE7z+x54F5W7ZZsU6kx8Qocul6FoAHHy01FGL/nne61mn4+uYXfQ1Uccn+HMLKE+cZzT8BB1E3FRskOgJrRsq25rauLm8+uamXpkS/bTy6y1wDbCrW4eD532kTWrtNUmVVZOIn/C+/JR9KVR5iG9TY8iaT67ubm/whL1xbKZoqtY+a6fNxMJrg211bGYJDUkYMNWA0BMB++9zOm6Eik4roqs9CCEFW0lyAK0PbvlzvoxrZuY/OEhNW/l/63U15Od/RSvmDvXpGLiVmeGi5PDSH2bYz5o2g6wFDQ2FbZgYgTF8rPlvA1ifjZD3NLtFdXdpSIJvgKR7GpjJWG7GZGawPomIH8B5tUmtHH9LpM+/KQKunEPa1GiQkCXv4Cnm9DLORo2joicHdPDZ64obQrPZ5bgqckkj0G6/NEiPYBY4bCkL7W8G5YzsUb6GakFjykSPkT7JGeLeB6uJOGMm+x7N381BCDfbJFx0dtLgV9Q477BfL1fvitX5anV/oYfxeYl+eF5x5bB8+Ep/L2nsmd56aKF4aAD4GbJWsdKyBW22xEmAD3XdbtsMyAFoR5mOla0gEd9U/YVB7zvHGpHbQonay9Sv0bQ8iZ8piaXVrKc5AG1AmqqgaEvzHSP2Wux7aZTWh6quVDVU01JtMIVRdCFwlSbbqqhoFlyzsotQzRexFvZ/MqUSFu3OhRIuNBbufvBpdVgb8XdGJ48/lJPCZ7dsOujTTbKPSEvGXkOnG2Xdi8/nM3EMRqITd5QeU7iOjKqC7URJY6TnLsHij22xAHKnVRD5MDtBYnoGFqZGMDmXCW6Oj+BAWw14hESY/xLF6bLku06AHkiXTHPCFZ0f9YSqqo27eAhhS67OrA2Het4M9JM3jm/yRX6bYxnfmzYl5qQdHxN08FsNuWDrWd4vMUY2QD3hr8vS73SCTkFoXZR3xNzOQt8d/6HfjBmXqvrE6EGkLzK6YK2U2/ksU/iUH+LvVIsJI+ri2AL/klo+ShdDyfs5A83i2prkMs51IKR7ZcqjZJi5X3+bd8GlyWvtddxKEoEqSgEO7A8jIgf2nH0h8FjM7oB6yte3X5mpL0i/E4Rx0CotKnILJj/vJqo4VkPQ93jRtRVfaitQPqldl5xRYPq8387Z0DcnZvOeION0Ht1+P27kFLGQIcLBX4FG3sffccNHh5cPfzp9INoRtqVtdViJfg8RjnXiIz/MNqEN6zvzX3hMzyWC7oSoXIT14ubc0abPX8Rp9GVa5NI/8iv+6ela1oTncbdimRKnrbRffDR/X4nH+bgqAuHWl7hOaeXPWVzIeRl7ga+JzD4Sx3mlj/q6Ra/E2HhDf21eEzTLNGfCZsY+/yxZzQzIAuijG65ii4O/waAJCrEJaWd/DRAKMQ5678Dw5AT7RCKzdadIwd8LsD+DgPBASmWsUlf8R0k1w/2k4lO2Wpb4zMI6EJVJs0xk/wn8/fRUPqrDKhbjHR41SqgFMx5RGMPuduFwlu5lK89tW11sTqiX/5EfGs5nO+y9FKvgXKPOEmgE05EKNL6Sjb3xS40H3BVPhm0ESOZgAjZoymc8be0inDVo4JdJVf+NKd3tN/CaB7GShhH27qf95NoFZVX/6ZkR2lX+CgWrQ2INgkh+bbMz68+uJ3Clsh8HSMPEQtAt+BBE6fXDab7KIlsKxU1lIXW/KWVstpdPanJ0pdXpQinDyUQjtY7ZVcfiecRxRDMAUhHFU2cEaciQ+htiPMPx1kdvtWG9T44w3r037ljHBFJdYR0r55qvMRixtAEFJAqA4T1ES87FAx7UozXasytg8MftZYt0rjYgLe6EJ5aWvy2qscBSBQ7yehoJIA3wIIZ9ukfkyBb6qnue5ko8W50rpV4kXqWjI5nbGRXrNW0tBZHXlY48nSgcUXBHWT4GcgLZJoLlKJnV96kCYpq9eWHh7xJzkCAyrQuQ5AJ0qq/uZ3toJglNterev+Qm0KXxPg/+YbFRJdfhbp1wOnVOEYdVHTya6CtO0afhEaBhx3oHwCb5Kq6RwHDzFMl2vfjL8GwzcCoTj7wZe+UFnYDV2yKpPU9dba29gYBdNqJg/KXozO+CJTlKmlKhnqTf5doeS35DZFV+cYJQVjd+oVY/Gtc/6XPzUxb1gMqf6cEjNNoRC8AObrp+fx0cVtGu4ffC2TgXRC8zPl8moUHCB5HZ25d87mlsiiK0aNwBtcEQjRNBT/QrXbw/8aVXdKMHn9EqYEKEyxSGTpYQOaes1G1Qq8pDgqkZtlO2HRyCXpmeM7TSrRPkAh004BfisVpF6zP44n2Jvxz/gOVocNCyy9V6lkod28QM4pbaMvVJigD/w3BrsjSJrXlqc4ulBYOCceiBN4b/gHajYyupbhEt63a619Ay4wsL6a6w6B+A7TnoyE7BliWHJfzVxxIKM/W3M/J8Bx99Op863Q8eNuIMGRx++VbYfjm+VGYBA3Ap/KEu/wxBNBpJJncwHPG45V8Gh98ZIrGCc20MwijGowZbcS7d1nEgcOW5cddZpHL2XPAIRbColiheZzXTvBxZOY3iMSDSKDrICyJ/iQs1vdplVdH/JrLJsQ2jtTnfCrITIghq3KFX3qAgLWAIp8IffNSdTYptnbGfc8s+qcr3zyzyHp1aJg+jxTF4kD1ry5Wauv5V3xnOGwTFecNzXSLHBW20/pCQjk4uorD0plIhMSTc79+/r4RKPClRYTBYex1Ob5crtfvRQBBv6re/6FhtCqtduag67glqRA77/3ulblh9YRtMdDxkCyJDeNnAuCLPQFmdRRWJtH20Z8DstfJf+5oj5SSB64d0iF5/Ya4KfTWxfivj9Ap2/zbYaTo/1gO3tM6RYsCZharMBFr7Fm61mLSrQnEI4OF1gbVS4k/JE9UotOrnLJZuswoWodCSV8zbybkJSVIP7n8UaE9xCR39rJZmf27HOAPVOGc9pdkQUcRrI0qyVF9Z3j1RHDbxIfwbWzmPVjwIdPJvtmBYwEQIUsIW1S939hcVikK00ozPRI02cqhzVUNzpOxVdrwRPvlh1aIOf0xFEqD3YkGnCnFah/cFN3J2gB7N+bZSGawwkKFu1tpQMrp1W+27YNkyT0TpcFpTqgOqqLabrgcCUPxh97mREOGy4xItzQ9xSl6rq+8BZsHcrQFReS+QeMxJ3P6CnL9EP/eOLDjumLhvrcQrpPiknsofbzBv9gTP0lU+TIVwE6E7CcKfT36q+ZiEOHJ9ayf0dyUJLezAb2M8aNHwd0+OJmsVgTzRWA";const Vc=44032,jf=4352,If=4449,Nf=4519,Bk=19,Tk=21,Ja=28,Pf=Tk*Ja,BR=Bk*Pf,TR=Vc+BR,_R=jf+Bk,RR=If+Tk,OR=Nf+Ja;function lc(e){return e>>24&255}function _k(e){return e&16777215}let Ng,Bx,Pg,hf;function MR(){let e=Sk(PR);Ng=new Map(jk(e).flatMap((t,n)=>t.map(r=>[r,n+1<<24]))),Bx=new Set(qc(e)),Pg=new Map,hf=new Map;for(let[t,n]of Ik(e)){if(!Bx.has(t)&&n.length==2){let[r,o]=n,i=hf.get(r);i||(i=new Map,hf.set(r,i)),i.set(o,t)}Pg.set(t,n.reverse())}}function Rk(e){return e>=Vc&&e<TR}function FR(e,t){if(e>=jf&&e<_R&&t>=If&&t<RR)return Vc+(e-jf)*Pf+(t-If)*Ja;if(Rk(e)&&t>Nf&&t<OR&&(e-Vc)%Ja==0)return e+(t-Nf);{let n=hf.get(e);return n&&(n=n.get(t),n)?n:-1}}function Ok(e){Ng||MR();let t=[],n=[],r=!1;function o(i){let l=Ng.get(i);l&&(r=!0,i|=l),t.push(i)}for(let i of e)for(;;){if(i<128)t.push(i);else if(Rk(i)){let l=i-Vc,c=l/Pf|0,u=l%Pf/Ja|0,p=l%Ja;o(jf+c),o(If+u),p>0&&o(Nf+p)}else{let l=Pg.get(i);l?n.push(...l):o(i)}if(!n.length)break;i=n.pop()}if(r&&t.length>1){let i=lc(t[0]);for(let l=1;l<t.length;l++){let c=lc(t[l]);if(c==0||i<=c){i=c;continue}let u=l-1;for(;;){let p=t[u+1];if(t[u+1]=t[u],t[u]=p,!u||(i=lc(t[--u]),i<=c))break}i=lc(t[l])}}return t}function LR(e){let t=[],n=[],r=-1,o=0;for(let i of e){let l=lc(i),c=_k(i);if(r==-1)l==0?r=c:t.push(c);else if(o>0&&o>=l)l==0?(t.push(r,...n),n.length=0,r=c):n.push(c),o=l;else{let u=FR(r,c);u>=0?r=u:o==0&&l==0?(t.push(r),r=c):(n.push(c),o=l)}}return r>=0&&t.push(r,...n),t}function Mk(e){return Ok(e).map(_k)}function DR(e){return LR(Ok(e))}const Tx=45,Fk=".",Lk=65039,Dk=1,Bf=e=>Array.from(e);function Qc(e,t){return e.P.has(t)||e.Q.has(t)}class UR extends Array{get is_emoji(){return!0}}let Bg,Uk,ti,Tg,$k,Ea,Y0,ga,Ys,_x,_g;function a1(){if(Bg)return;let e=Sk(vR);const t=()=>qc(e),n=()=>new Set(t()),r=(f,m)=>m.forEach(g=>f.add(g));Bg=new Map(Ik(e)),Uk=n(),ti=t(),Tg=new Set(t().map(f=>ti[f])),ti=new Set(ti),$k=n(),n();let o=jk(e),i=e();const l=()=>{let f=new Set;return t().forEach(m=>r(f,o[m])),r(f,t()),f};Ea=Hc(f=>{let m=Hc(e).map(g=>g+96);if(m.length){let g=f>=i;m[0]-=32,m=Ya(m),g&&(m=`Restricted[${m}]`);let v=l(),w=l(),b=!e();return{N:m,P:v,Q:w,M:b,R:g}}}),Y0=n(),ga=new Map;let c=t().concat(Bf(Y0)).sort((f,m)=>f-m);c.forEach((f,m)=>{let g=e(),v=c[m]=g?c[m-g]:{V:[],M:new Map};v.V.push(f),Y0.has(f)||ga.set(f,v)});for(let{V:f,M:m}of new Set(ga.values())){let g=[];for(let w of f){let b=Ea.filter(j=>Qc(j,w)),C=g.find(({G:j})=>b.some(I=>j.has(I)));C||(C={G:new Set,V:[]},g.push(C)),C.V.push(w),r(C.G,b)}let v=g.flatMap(w=>Bf(w.G));for(let{G:w,V:b}of g){let C=new Set(v.filter(j=>!w.has(j)));for(let j of b)m.set(j,C)}}Ys=new Set;let u=new Set;const p=f=>Ys.has(f)?u.add(f):Ys.add(f);for(let f of Ea){for(let m of f.P)p(m);for(let m of f.Q)p(m)}for(let f of Ys)!ga.has(f)&&!u.has(f)&&ga.set(f,Dk);r(Ys,Mk(Ys)),_x=SR(e).map(f=>UR.from(f)).sort(NR),_g=new Map;for(let f of _x){let m=[_g];for(let g of f){let v=m.map(w=>{let b=w.get(g);return b||(b=new Map,w.set(g,b)),b});g===Lk?m.push(...v):m=v}for(let g of m)g.V=f}}function l1(e){return(zk(e)?"":`${c1(ph([e]))} `)+Pk(e)}function c1(e){return`"${e}"`}function $R(e){if(e.length>=4&&e[2]==Tx&&e[3]==Tx)throw new Error(`invalid label extension: "${Ya(e.slice(0,4))}"`)}function zR(e){for(let n=e.lastIndexOf(95);n>0;)if(e[--n]!==95)throw new Error("underscore allowed only at start")}function WR(e){let t=e[0],n=Nx.get(t);if(n)throw pc(`leading ${n}`);let r=e.length,o=-1;for(let i=1;i<r;i++){t=e[i];let l=Nx.get(t);if(l){if(o==i)throw pc(`${n} + ${l}`);o=i+1,n=l}}if(o==r)throw pc(`trailing ${n}`)}function ph(e,t=1/0,n=Pk){let r=[];qR(e[0])&&r.push("◌"),e.length>t&&(t>>=1,e=[...e.slice(0,t),8230,...e.slice(-t)]);let o=0,i=e.length;for(let l=0;l<i;l++){let c=e[l];zk(c)&&(r.push(Ya(e.slice(o,l))),r.push(n(c)),o=l+1)}return r.push(Ya(e.slice(o,i))),r.join("")}function qR(e,t){return a1(),ti.has(e)}function zk(e){return a1(),$k.has(e)}function HR(e){return KR(VR(e,DR,ZR))}function VR(e,t,n){if(!e)return[];a1();let r=0;return e.split(Fk).map(o=>{let i=IR(o),l={input:i,offset:r};r+=i.length+1;try{let c=l.tokens=JR(i,t,n),u=c.length,p;if(!u)throw new Error("empty label");let f=l.output=c.flat();if(zR(f),!(l.emoji=u>1||c[0].is_emoji)&&f.every(g=>g<128))$R(f),p="ASCII";else{let g=c.flatMap(v=>v.is_emoji?[]:v);if(!g.length)p="Emoji";else{if(ti.has(f[0]))throw pc("leading combining mark");for(let b=1;b<u;b++){let C=c[b];if(!C.is_emoji&&ti.has(C[0]))throw pc(`emoji + combining mark: "${Ya(c[b-1])} + ${ph([C[0]])}"`)}WR(f);let v=Bf(new Set(g)),[w]=GR(v);YR(w,g),QR(w,v),p=w.N}}l.type=p}catch(c){l.error=c}return l})}function QR(e,t){let n,r=[];for(let o of t){let i=ga.get(o);if(i===Dk)return;if(i){let l=i.M.get(o);if(n=n?n.filter(c=>l.has(c)):Bf(l),!n.length)return}else r.push(o)}if(n){for(let o of n)if(r.every(i=>Qc(o,i)))throw new Error(`whole-script confusable: ${e.N}/${o.N}`)}}function GR(e){let t=Ea;for(let n of e){let r=t.filter(o=>Qc(o,n));if(!r.length)throw Ea.some(o=>Qc(o,n))?qk(t[0],n):Wk(n);if(t=r,r.length==1)break}return t}function KR(e){return e.map(({input:t,error:n,output:r})=>{if(n){let o=n.message;throw new Error(e.length==1?o:`Invalid label ${c1(ph(t,63))}: ${o}`)}return Ya(r)}).join(Fk)}function Wk(e){return new Error(`disallowed character: ${l1(e)}`)}function qk(e,t){let n=l1(t),r=Ea.find(o=>o.P.has(t));return r&&(n=`${r.N} ${n}`),new Error(`illegal mixture: ${e.N} + ${n}`)}function pc(e){return new Error(`illegal placement: ${e}`)}function YR(e,t){for(let n of t)if(!Qc(e,n))throw qk(e,n);if(e.M){let n=Mk(t);for(let r=1,o=n.length;r<o;r++)if(Tg.has(n[r])){let i=r+1;for(let l;i<o&&Tg.has(l=n[i]);i++)for(let c=r;c<i;c++)if(n[c]==l)throw new Error(`duplicate non-spacing marks: ${l1(l)}`);if(i-r>Px)throw new Error(`excessive non-spacing marks: ${c1(ph(n.slice(r-1,i)))} (${i-r}/${Px})`);r=i}}}function JR(e,t,n){let r=[],o=[];for(e=e.slice().reverse();e.length;){let i=XR(e);if(i)o.length&&(r.push(t(o)),o=[]),r.push(n(i));else{let l=e.pop();if(Ys.has(l))o.push(l);else{let c=Bg.get(l);if(c)o.push(...c);else if(!Uk.has(l))throw Wk(l)}}}return o.length&&r.push(t(o)),r}function ZR(e){return e.filter(t=>t!=Lk)}function XR(e,t){let n=_g,r,o=e.length;for(;o&&(n=n.get(e[--o]),!!n);){let{V:i}=n;i&&(r=i,e.length=o)}return r}function eO(e){return HR(e)}function tO(e){return eO(e)}const u1=Q3({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:12e3,rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:23085558},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}});var d1=i5(),en=function(){return en=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},en.apply(this,arguments)};function f1(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Hk(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var mc="right-scroll-bar-position",gc="width-before-scroll-bar",nO="with-scroll-bars-hidden",rO="--removed-body-scroll-bar-size";function J0(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function oO(e,t){var n=P.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var sO=typeof window<"u"?P.useLayoutEffect:P.useEffect,Rx=new WeakMap;function h1(e,t){var n=oO(null,function(r){return e.forEach(function(o){return J0(o,r)})});return sO(function(){var r=Rx.get(n);if(r){var o=new Set(r),i=new Set(e),l=n.current;o.forEach(function(c){i.has(c)||J0(c,null)}),i.forEach(function(c){o.has(c)||J0(c,l)})}Rx.set(n,e)},[e]),n}function Vk(e){return e}function Qk(e,t){t===void 0&&(t=Vk);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var l=t(i,r);return n.push(l),function(){n=n.filter(function(c){return c!==l})}},assignSyncMedium:function(i){for(r=!0;n.length;){var l=n;n=[],l.forEach(i)}n={push:function(c){return i(c)},filter:function(){return n}}},assignMedium:function(i){r=!0;var l=[];if(n.length){var c=n;n=[],c.forEach(i),l=n}var u=function(){var f=l;l=[],f.forEach(i)},p=function(){return Promise.resolve().then(u)};p(),n={push:function(f){l.push(f),p()},filter:function(f){return l=l.filter(f),n}}}};return o}function p1(e,t){return t===void 0&&(t=Vk),Qk(e,t)}function m1(e){e===void 0&&(e={});var t=Qk(null);return t.options=en({async:!0,ssr:!1},e),t}var Gk=function(e){var t=e.sideCar,n=f1(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return P.createElement(r,en({},n))};Gk.isSideCarExport=!0;function Kk(e,t){return e.useMedium(t),Gk}var Yk=m1(),Z0=function(){},mh=P.forwardRef(function(e,t){var n=P.useRef(null),r=P.useState({onScrollCapture:Z0,onWheelCapture:Z0,onTouchMoveCapture:Z0}),o=r[0],i=r[1],l=e.forwardProps,c=e.children,u=e.className,p=e.removeScrollBar,f=e.enabled,m=e.shards,g=e.sideCar,v=e.noIsolation,w=e.inert,b=e.allowPinchZoom,C=e.as,j=C===void 0?"div":C,I=e.gapMode,A=f1(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=g,N=h1([n,t]),T=en(en({},A),o);return P.createElement(P.Fragment,null,f&&P.createElement(S,{sideCar:Yk,removeScrollBar:p,shards:m,noIsolation:v,inert:w,setCallbacks:i,allowPinchZoom:!!b,lockRef:n,gapMode:I}),l?P.cloneElement(P.Children.only(c),en(en({},T),{ref:N})):P.createElement(j,en({},T,{className:u,ref:N}),c))});mh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};mh.classNames={fullWidth:gc,zeroRight:mc};var iO=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function aO(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=iO();return t&&e.setAttribute("nonce",t),e}function lO(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function cO(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var uO=function(){var e=0,t=null;return{add:function(n){e==0&&(t=aO())&&(lO(t,n),cO(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},dO=function(){var e=uO();return function(t,n){P.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},g1=function(){var e=dO(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},fO={left:0,top:0,right:0,gap:0},X0=function(e){return parseInt(e||"",10)||0},hO=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[X0(n),X0(r),X0(o)]},pO=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return fO;var t=hO(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},mO=g1(),Aa="data-scroll-locked",gO=function(e,t,n,r){var o=e.left,i=e.top,l=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
1671
|
-
.`.concat(nO,` {
|
|
1672
|
-
overflow: hidden `).concat(r,`;
|
|
1673
|
-
padding-right: `).concat(c,"px ").concat(r,`;
|
|
1674
|
-
}
|
|
1675
|
-
body[`).concat(Aa,`] {
|
|
1676
|
-
overflow: hidden `).concat(r,`;
|
|
1677
|
-
overscroll-behavior: contain;
|
|
1678
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
1679
|
-
padding-left: `.concat(o,`px;
|
|
1680
|
-
padding-top: `).concat(i,`px;
|
|
1681
|
-
padding-right: `).concat(l,`px;
|
|
1682
|
-
margin-left:0;
|
|
1683
|
-
margin-top:0;
|
|
1684
|
-
margin-right: `).concat(c,"px ").concat(r,`;
|
|
1685
|
-
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
1686
|
-
}
|
|
1687
|
-
|
|
1688
|
-
.`).concat(mc,` {
|
|
1689
|
-
right: `).concat(c,"px ").concat(r,`;
|
|
1690
|
-
}
|
|
1691
|
-
|
|
1692
|
-
.`).concat(gc,` {
|
|
1693
|
-
margin-right: `).concat(c,"px ").concat(r,`;
|
|
1694
|
-
}
|
|
1695
|
-
|
|
1696
|
-
.`).concat(mc," .").concat(mc,` {
|
|
1697
|
-
right: 0 `).concat(r,`;
|
|
1698
|
-
}
|
|
1699
|
-
|
|
1700
|
-
.`).concat(gc," .").concat(gc,` {
|
|
1701
|
-
margin-right: 0 `).concat(r,`;
|
|
1702
|
-
}
|
|
1703
|
-
|
|
1704
|
-
body[`).concat(Aa,`] {
|
|
1705
|
-
`).concat(rO,": ").concat(c,`px;
|
|
1706
|
-
}
|
|
1707
|
-
`)},Ox=function(){var e=parseInt(document.body.getAttribute(Aa)||"0",10);return isFinite(e)?e:0},yO=function(){P.useEffect(function(){return document.body.setAttribute(Aa,(Ox()+1).toString()),function(){var e=Ox()-1;e<=0?document.body.removeAttribute(Aa):document.body.setAttribute(Aa,e.toString())}},[])},Jk=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;yO();var i=P.useMemo(function(){return pO(o)},[o]);return P.createElement(mO,{styles:gO(i,!t,o,n?"":"!important")})},Rg=!1;if(typeof window<"u")try{var Zd=Object.defineProperty({},"passive",{get:function(){return Rg=!0,!0}});window.addEventListener("test",Zd,Zd),window.removeEventListener("test",Zd,Zd)}catch{Rg=!1}var aa=Rg?{passive:!1}:!1,vO=function(e){return e.tagName==="TEXTAREA"},Zk=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!vO(e)&&n[t]==="visible")},wO=function(e){return Zk(e,"overflowY")},bO=function(e){return Zk(e,"overflowX")},Mx=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Xk(e,r);if(o){var i=eE(e,r),l=i[1],c=i[2];if(l>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},xO=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},CO=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Xk=function(e,t){return e==="v"?wO(t):bO(t)},eE=function(e,t){return e==="v"?xO(t):CO(t)},kO=function(e,t){return e==="h"&&t==="rtl"?-1:1},EO=function(e,t,n,r,o){var i=kO(e,window.getComputedStyle(t).direction),l=i*r,c=n.target,u=t.contains(c),p=!1,f=l>0,m=0,g=0;do{var v=eE(e,c),w=v[0],b=v[1],C=v[2],j=b-C-i*w;(w||j)&&Xk(e,c)&&(m+=j,g+=w),c instanceof ShadowRoot?c=c.host:c=c.parentNode}while(!u&&c!==document.body||u&&(t.contains(c)||t===c));return(f&&Math.abs(m)<1||!f&&Math.abs(g)<1)&&(p=!0),p},Xd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Fx=function(e){return[e.deltaX,e.deltaY]},Lx=function(e){return e&&"current"in e?e.current:e},AO=function(e,t){return e[0]===t[0]&&e[1]===t[1]},SO=function(e){return`
|
|
1708
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
1709
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
1710
|
-
`)},jO=0,la=[];function IO(e){var t=P.useRef([]),n=P.useRef([0,0]),r=P.useRef(),o=P.useState(jO++)[0],i=P.useState(g1)[0],l=P.useRef(e);P.useEffect(function(){l.current=e},[e]),P.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var b=Hk([e.lockRef.current],(e.shards||[]).map(Lx),!0).filter(Boolean);return b.forEach(function(C){return C.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),b.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=P.useCallback(function(b,C){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!l.current.allowPinchZoom;var j=Xd(b),I=n.current,A="deltaX"in b?b.deltaX:I[0]-j[0],S="deltaY"in b?b.deltaY:I[1]-j[1],N,T=b.target,B=Math.abs(A)>Math.abs(S)?"h":"v";if("touches"in b&&B==="h"&&T.type==="range")return!1;var R=Mx(B,T);if(!R)return!0;if(R?N=B:(N=B==="v"?"h":"v",R=Mx(B,T)),!R)return!1;if(!r.current&&"changedTouches"in b&&(A||S)&&(r.current=N),!N)return!0;var M=r.current||N;return EO(M,C,b,M==="h"?A:S)},[]),u=P.useCallback(function(b){var C=b;if(!(!la.length||la[la.length-1]!==i)){var j="deltaY"in C?Fx(C):Xd(C),I=t.current.filter(function(N){return N.name===C.type&&(N.target===C.target||C.target===N.shadowParent)&&AO(N.delta,j)})[0];if(I&&I.should){C.cancelable&&C.preventDefault();return}if(!I){var A=(l.current.shards||[]).map(Lx).filter(Boolean).filter(function(N){return N.contains(C.target)}),S=A.length>0?c(C,A[0]):!l.current.noIsolation;S&&C.cancelable&&C.preventDefault()}}},[]),p=P.useCallback(function(b,C,j,I){var A={name:b,delta:C,target:j,should:I,shadowParent:NO(j)};t.current.push(A),setTimeout(function(){t.current=t.current.filter(function(S){return S!==A})},1)},[]),f=P.useCallback(function(b){n.current=Xd(b),r.current=void 0},[]),m=P.useCallback(function(b){p(b.type,Fx(b),b.target,c(b,e.lockRef.current))},[]),g=P.useCallback(function(b){p(b.type,Xd(b),b.target,c(b,e.lockRef.current))},[]);P.useEffect(function(){return la.push(i),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:g}),document.addEventListener("wheel",u,aa),document.addEventListener("touchmove",u,aa),document.addEventListener("touchstart",f,aa),function(){la=la.filter(function(b){return b!==i}),document.removeEventListener("wheel",u,aa),document.removeEventListener("touchmove",u,aa),document.removeEventListener("touchstart",f,aa)}},[]);var v=e.removeScrollBar,w=e.inert;return P.createElement(P.Fragment,null,w?P.createElement(i,{styles:SO(o)}):null,v?P.createElement(Jk,{gapMode:e.gapMode}):null)}function NO(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const PO=Kk(Yk,IO);var tE=P.forwardRef(function(e,t){return P.createElement(mh,en({},e,{ref:t,sideCar:PO}))});tE.classNames=mh.classNames;function Dx(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function BO(e,t){var n=e;for(var r of t){if(!(r in n))throw new Error("Path ".concat(t.join(" -> ")," does not exist in object"));n=n[r]}return n}function nE(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r={};for(var o in e){var i=e[o],l=[...n,o];typeof i=="string"||typeof i=="number"||i==null?r[o]=t(i,l):typeof i=="object"&&!Array.isArray(i)?r[o]=nE(i,t,l):console.warn('Skipping invalid key "'.concat(l.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(i)?"Array":typeof i,'"'))}return r}function Ux(e,t){var n={};if(typeof t=="object"){var r=e;nE(t,(c,u)=>{if(c!=null){var p=BO(r,u);n[Dx(p)]=String(c)}})}else{var o=e;for(var i in o){var l=o[i];l!=null&&(n[Dx(i)]=l)}}return Object.defineProperty(n,"toString",{value:function(){return Object.keys(this).map(u=>"".concat(u,":").concat(this[u])).join(";")},writable:!1}),n}var cc={exports:{}},TO=cc.exports,$x;function _O(){return $x||($x=1,(function(e,t){(function(n,r){var o="1.0.41",i="",l="?",c="function",u="undefined",p="object",f="string",m="major",g="model",v="name",w="type",b="vendor",C="version",j="architecture",I="console",A="mobile",S="tablet",N="smarttv",T="wearable",B="embedded",R=500,M="Amazon",H="Apple",V="ASUS",W="BlackBerry",L="Browser",J="Chrome",O="Edge",G="Firefox",ee="Google",F="Honor",K="Huawei",Y="Lenovo",U="LG",X="Microsoft",he="Motorola",se="Nvidia",ie="OnePlus",re="Opera",ue="OPPO",Se="Samsung",Pe="Sharp",Me="Sony",mt="Xiaomi",It="Zebra",gt="Facebook",Wt="Chromium OS",on="Mac OS",rt=" Browser",sn=function(Re,We){var _e={};for(var Ge in Re)We[Ge]&&We[Ge].length%2===0?_e[Ge]=We[Ge].concat(Re[Ge]):_e[Ge]=Re[Ge];return _e},Ot=function(Re){for(var We={},_e=0;_e<Re.length;_e++)We[Re[_e].toUpperCase()]=Re[_e];return We},Mt=function(Re,We){return typeof Re===f?ye(We).indexOf(ye(Re))!==-1:!1},ye=function(Re){return Re.toLowerCase()},Je=function(Re){return typeof Re===f?Re.replace(/[^\d\.]/g,i).split(".")[0]:r},Nr=function(Re,We){if(typeof Re===f)return Re=Re.replace(/^\s\s*/,i),typeof We===u?Re:Re.substring(0,R)},_o=function(Re,We){for(var _e=0,Ge,fr,mn,ze,Be,gn;_e<We.length&&!Be;){var _s=We[_e],Xr=We[_e+1];for(Ge=fr=0;Ge<_s.length&&!Be&&_s[Ge];)if(Be=_s[Ge++].exec(Re),Be)for(mn=0;mn<Xr.length;mn++)gn=Be[++fr],ze=Xr[mn],typeof ze===p&&ze.length>0?ze.length===2?typeof ze[1]==c?this[ze[0]]=ze[1].call(this,gn):this[ze[0]]=ze[1]:ze.length===3?typeof ze[1]===c&&!(ze[1].exec&&ze[1].test)?this[ze[0]]=gn?ze[1].call(this,gn,ze[2]):r:this[ze[0]]=gn?gn.replace(ze[1],ze[2]):r:ze.length===4&&(this[ze[0]]=gn?ze[3].call(this,gn.replace(ze[1],ze[2])):r):this[ze]=gn||r;_e+=2}},Ro=function(Re,We){for(var _e in We)if(typeof We[_e]===p&&We[_e].length>0){for(var Ge=0;Ge<We[_e].length;Ge++)if(Mt(We[_e][Ge],Re))return _e===l?r:_e}else if(Mt(We[_e],Re))return _e===l?r:_e;return We.hasOwnProperty("*")?We["*"]:Re},Pu={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},gl={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},_i={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[C,[v,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[C,[v,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[v,C],[/opios[\/ ]+([\w\.]+)/i],[C,[v,re+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[C,[v,re+" GX"]],[/\bopr\/([\w\.]+)/i],[C,[v,re]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[C,[v,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[C,[v,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[v,C],[/quark(?:pc)?\/([-\w\.]+)/i],[C,[v,"Quark"]],[/\bddg\/([\w\.]+)/i],[C,[v,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[C,[v,"UC"+L]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[C,[v,"WeChat"]],[/konqueror\/([\w\.]+)/i],[C,[v,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[C,[v,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[C,[v,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[C,[v,"Smart Lenovo "+L]],[/(avast|avg)\/([\w\.]+)/i],[[v,/(.+)/,"$1 Secure "+L],C],[/\bfocus\/([\w\.]+)/i],[C,[v,G+" Focus"]],[/\bopt\/([\w\.]+)/i],[C,[v,re+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[C,[v,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[C,[v,"Dolphin"]],[/coast\/([\w\.]+)/i],[C,[v,re+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[C,[v,"MIUI"+rt]],[/fxios\/([\w\.-]+)/i],[C,[v,G]],[/\bqihoobrowser\/?([\w\.]*)/i],[C,[v,"360"]],[/\b(qq)\/([\w\.]+)/i],[[v,/(.+)/,"$1Browser"],C],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[v,/(.+)/,"$1"+rt],C],[/samsungbrowser\/([\w\.]+)/i],[C,[v,Se+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[C,[v,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[v,"Sogou Mobile"],C],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[v,C],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[v],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[C,v],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[v,gt],C],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[v,C],[/\bgsa\/([\w\.]+) .*safari\//i],[C,[v,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[C,[v,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[C,[v,J+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[v,J+" WebView"],C],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[C,[v,"Android "+L]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[v,C],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[C,[v,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[C,v],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[v,[C,Ro,Pu]],[/(webkit|khtml)\/([\w\.]+)/i],[v,C],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[v,"Netscape"],C],[/(wolvic|librewolf)\/([\w\.]+)/i],[v,C],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[C,[v,G+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[v,[C,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[v,[C,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[j,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[j,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[j,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[j,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[j,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[j,/ower/,i,ye]],[/ sun4\w[;\)]/i],[[j,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[j,ye]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[g,[b,Se],[w,S]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[g,[b,Se],[w,A]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[g,[b,H],[w,A]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[g,[b,H],[w,S]],[/(macintosh);/i],[g,[b,H]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[g,[b,Pe],[w,A]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[g,[b,F],[w,S]],[/honor([-\w ]+)[;\)]/i],[g,[b,F],[w,A]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[g,[b,K],[w,S]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[g,[b,K],[w,A]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[g,/_/g," "],[b,mt],[w,S]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[g,/_/g," "],[b,mt],[w,A]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[g,[b,ue],[w,A]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[g,[b,Ro,{OnePlus:["304","403","203"],"*":ue}],[w,S]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[g,[b,"Vivo"],[w,A]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[g,[b,"Realme"],[w,A]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[g,[b,he],[w,A]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[g,[b,he],[w,S]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[g,[b,U],[w,S]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[g,[b,U],[w,A]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[g,[b,Y],[w,S]],[/(nokia) (t[12][01])/i],[b,g,[w,S]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[g,/_/g," "],[w,A],[b,"Nokia"]],[/(pixel (c|tablet))\b/i],[g,[b,ee],[w,S]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[g,[b,ee],[w,A]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[g,[b,Me],[w,A]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[g,"Xperia Tablet"],[b,Me],[w,S]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[g,[b,ie],[w,A]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[g,[b,M],[w,S]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[g,/(.+)/g,"Fire Phone $1"],[b,M],[w,A]],[/(playbook);[-\w\),; ]+(rim)/i],[g,b,[w,S]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[g,[b,W],[w,A]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[g,[b,V],[w,S]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[g,[b,V],[w,A]],[/(nexus 9)/i],[g,[b,"HTC"],[w,S]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[b,[g,/_/g," "],[w,A]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[g,[b,"TCL"],[w,S]],[/(itel) ((\w+))/i],[[b,ye],g,[w,Ro,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[g,[b,"Acer"],[w,S]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[g,[b,"Meizu"],[w,A]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[g,[b,"Ulefone"],[w,A]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[g,[b,"Energizer"],[w,A]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[g,[b,"Cat"],[w,A]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[g,[b,"Smartfren"],[w,A]],[/droid.+; (a(?:015|06[35]|142p?))/i],[g,[b,"Nothing"],[w,A]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[g,[b,"Archos"],[w,S]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[g,[b,"Archos"],[w,A]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[b,g,[w,S]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[b,g,[w,A]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[b,g,[w,S]],[/(surface duo)/i],[g,[b,X],[w,S]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[g,[b,"Fairphone"],[w,A]],[/(u304aa)/i],[g,[b,"AT&T"],[w,A]],[/\bsie-(\w*)/i],[g,[b,"Siemens"],[w,A]],[/\b(rct\w+) b/i],[g,[b,"RCA"],[w,S]],[/\b(venue[\d ]{2,7}) b/i],[g,[b,"Dell"],[w,S]],[/\b(q(?:mv|ta)\w+) b/i],[g,[b,"Verizon"],[w,S]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[g,[b,"Barnes & Noble"],[w,S]],[/\b(tm\d{3}\w+) b/i],[g,[b,"NuVision"],[w,S]],[/\b(k88) b/i],[g,[b,"ZTE"],[w,S]],[/\b(nx\d{3}j) b/i],[g,[b,"ZTE"],[w,A]],[/\b(gen\d{3}) b.+49h/i],[g,[b,"Swiss"],[w,A]],[/\b(zur\d{3}) b/i],[g,[b,"Swiss"],[w,S]],[/\b((zeki)?tb.*\b) b/i],[g,[b,"Zeki"],[w,S]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[b,"Dragon Touch"],g,[w,S]],[/\b(ns-?\w{0,9}) b/i],[g,[b,"Insignia"],[w,S]],[/\b((nxa|next)-?\w{0,9}) b/i],[g,[b,"NextBook"],[w,S]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[b,"Voice"],g,[w,A]],[/\b(lvtel\-)?(v1[12]) b/i],[[b,"LvTel"],g,[w,A]],[/\b(ph-1) /i],[g,[b,"Essential"],[w,A]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[g,[b,"Envizen"],[w,S]],[/\b(trio[-\w\. ]+) b/i],[g,[b,"MachSpeed"],[w,S]],[/\btu_(1491) b/i],[g,[b,"Rotor"],[w,S]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[g,[b,se],[w,S]],[/(sprint) (\w+)/i],[b,g,[w,A]],[/(kin\.[onetw]{3})/i],[[g,/\./g," "],[b,X],[w,A]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[g,[b,It],[w,S]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[g,[b,It],[w,A]],[/smart-tv.+(samsung)/i],[b,[w,N]],[/hbbtv.+maple;(\d+)/i],[[g,/^/,"SmartTV"],[b,Se],[w,N]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[b,U],[w,N]],[/(apple) ?tv/i],[b,[g,H+" TV"],[w,N]],[/crkey/i],[[g,J+"cast"],[b,ee],[w,N]],[/droid.+aft(\w+)( bui|\))/i],[g,[b,M],[w,N]],[/(shield \w+ tv)/i],[g,[b,se],[w,N]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[g,[b,Pe],[w,N]],[/(bravia[\w ]+)( bui|\))/i],[g,[b,Me],[w,N]],[/(mi(tv|box)-?\w+) bui/i],[g,[b,mt],[w,N]],[/Hbbtv.*(technisat) (.*);/i],[b,g,[w,N]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[b,Nr],[g,Nr],[w,N]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[g,[w,N]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[w,N]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[b,g,[w,I]],[/droid.+; (shield)( bui|\))/i],[g,[b,se],[w,I]],[/(playstation \w+)/i],[g,[b,Me],[w,I]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[g,[b,X],[w,I]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[g,[b,Se],[w,T]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[b,g,[w,T]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[g,[b,ue],[w,T]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[g,[b,H],[w,T]],[/(opwwe\d{3})/i],[g,[b,ie],[w,T]],[/(moto 360)/i],[g,[b,he],[w,T]],[/(smartwatch 3)/i],[g,[b,Me],[w,T]],[/(g watch r)/i],[g,[b,U],[w,T]],[/droid.+; (wt63?0{2,3})\)/i],[g,[b,It],[w,T]],[/droid.+; (glass) \d/i],[g,[b,ee],[w,T]],[/(pico) (4|neo3(?: link|pro)?)/i],[b,g,[w,T]],[/; (quest( \d| pro)?)/i],[g,[b,gt],[w,T]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[b,[w,B]],[/(aeobc)\b/i],[g,[b,M],[w,B]],[/(homepod).+mac os/i],[g,[b,H],[w,B]],[/windows iot/i],[[w,B]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[g,[w,A]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[g,[w,S]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[w,S]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[w,A]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[g,[b,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[C,[v,O+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[v,C],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[C,[v,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[v,C],[/ladybird\//i],[[v,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[C,v]],os:[[/microsoft (windows) (vista|xp)/i],[v,C],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[v,[C,Ro,gl]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[C,Ro,gl],[v,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[C,/_/g,"."],[v,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[v,on],[C,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[C,v],[/(ubuntu) ([\w\.]+) like android/i],[[v,/(.+)/,"$1 Touch"],C],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[v,C],[/\(bb(10);/i],[C,[v,W]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[C,[v,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[C,[v,G+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[C,[v,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[C,[v,"watchOS"]],[/crkey\/([\d\.]+)/i],[C,[v,J+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[v,Wt],C],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[v,C],[/(sunos) ?([\w\.\d]*)/i],[[v,"Solaris"],C],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[v,C]]},qt=function(Re,We){if(typeof Re===p&&(We=Re,Re=r),!(this instanceof qt))return new qt(Re,We).getResult();var _e=typeof n!==u&&n.navigator?n.navigator:r,Ge=Re||(_e&&_e.userAgent?_e.userAgent:i),fr=_e&&_e.userAgentData?_e.userAgentData:r,mn=We?sn(_i,We):_i,ze=_e&&_e.userAgent==Ge;return this.getBrowser=function(){var Be={};return Be[v]=r,Be[C]=r,_o.call(Be,Ge,mn.browser),Be[m]=Je(Be[C]),ze&&_e&&_e.brave&&typeof _e.brave.isBrave==c&&(Be[v]="Brave"),Be},this.getCPU=function(){var Be={};return Be[j]=r,_o.call(Be,Ge,mn.cpu),Be},this.getDevice=function(){var Be={};return Be[b]=r,Be[g]=r,Be[w]=r,_o.call(Be,Ge,mn.device),ze&&!Be[w]&&fr&&fr.mobile&&(Be[w]=A),ze&&Be[g]=="Macintosh"&&_e&&typeof _e.standalone!==u&&_e.maxTouchPoints&&_e.maxTouchPoints>2&&(Be[g]="iPad",Be[w]=S),Be},this.getEngine=function(){var Be={};return Be[v]=r,Be[C]=r,_o.call(Be,Ge,mn.engine),Be},this.getOS=function(){var Be={};return Be[v]=r,Be[C]=r,_o.call(Be,Ge,mn.os),ze&&!Be[v]&&fr&&fr.platform&&fr.platform!="Unknown"&&(Be[v]=fr.platform.replace(/chrome os/i,Wt).replace(/macos/i,on)),Be},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return Ge},this.setUA=function(Be){return Ge=typeof Be===f&&Be.length>R?Nr(Be,R):Be,this},this.setUA(Ge),this};qt.VERSION=o,qt.BROWSER=Ot([v,C,m]),qt.CPU=Ot([j]),qt.DEVICE=Ot([g,b,w,I,A,N,S,T,B]),qt.ENGINE=qt.OS=Ot([v,C]),e.exports&&(t=e.exports=qt),t.UAParser=qt;var Zr=typeof n!==u&&(n.jQuery||n.Zepto);if(Zr&&!Zr.ua){var Pr=new qt;Zr.ua=Pr.getResult(),Zr.ua.get=function(){return Pr.getUA()},Zr.ua.set=function(Re){Pr.setUA(Re);var We=Pr.getResult();for(var _e in We)Zr.ua[_e]=We[_e]}}})(typeof window=="object"?window:TO)})(cc,cc.exports)),cc.exports}var RO=_O();/*!
|
|
1711
|
-
Copyright (c) 2023 Paul Miller (paulmillr.com)
|
|
1712
|
-
The library paulmillr-qr is dual-licensed under the Apache 2.0 OR MIT license.
|
|
1713
|
-
You can select a license of your choice.
|
|
1714
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
1715
|
-
you may not use this file except in compliance with the License.
|
|
1716
|
-
You may obtain a copy of the License at
|
|
1717
|
-
|
|
1718
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
1719
|
-
|
|
1720
|
-
Unless required by applicable law or agreed to in writing, software
|
|
1721
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
1722
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1723
|
-
See the License for the specific language governing permissions and
|
|
1724
|
-
limitations under the License.
|
|
1725
|
-
*/const oc={newline:10,reset:27};function OO(e){if(!Number.isSafeInteger(e))throw new Error(`integer expected: ${e}`)}function MO(e){if(!Number.isSafeInteger(e)||e<1||e>40)throw new Error(`Invalid version=${e}. Expected number [1..40]`)}function Qs(e,t){return e.toString(2).padStart(t,"0")}function zx(e,t){const n=e%t;return n>=0?n:t+n}function Fr(e,t){return new Array(e).fill(t)}function em(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}function Wx(e){let t=0,n=0;for(const i of e)t=Math.max(t,i.length),n+=i.length;const r=new Uint8Array(n);let o=0;for(let i=0;i<t;i++)for(const l of e)i<l.length&&(r[o++]=l[i]);return r}function FO(){let e,t=1/0;return{add(n,r){n>=t||(e=r,t=n)},get:()=>e,score:()=>t}}function qx(e){return{has:t=>e.includes(t),decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("alphabet.decode input should be array of strings");return t.map(n=>{if(typeof n!="string")throw new Error(`alphabet.decode: not string element=${n}`);const r=e.indexOf(n);if(r===-1)throw new Error(`Unknown letter: "${n}". Allowed: ${e}`);return r})},encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return t.map(n=>{if(OO(n),n<0||n>=e.length)throw new Error(`Digit index outside alphabet: ${n} (alphabet: ${e.length})`);return e[n]})}}}function Hx(e){if(e.length!==32)throw new Error("expects 32 element matrix");const t=[1431655765,858993459,252645135,16711935,65535];for(let n=0;n<5;n++){const r=t[n]>>>0,o=1<<n,i=o<<1;for(let l=0;l<32;l+=i)for(let c=0;c<o;c++){const u=l+c,p=u+o,f=e[u]>>>0,m=e[p]>>>0,g=(f>>>o^m)&r;e[u]=(f^g<<o)>>>0,e[p]=(m^g)>>>0}}}const sc=e=>1<<(e&31)>>>0,Gs=(e,t)=>t===0?0:t===32?4294967295:(1<<t)-1<<e>>>0;class un{constructor(t,n){er(this,"defined");er(this,"value");er(this,"tailMask");er(this,"words");er(this,"fullWords");er(this,"height");er(this,"width");const{height:r,width:o}=un.size(t);if(this.height=r,this.width=o,this.tailMask=Gs(0,o&31||32),this.words=Math.ceil(o/32)|0,this.fullWords=Math.floor(o/32)|0,this.value=new Uint32Array(this.words*r),this.defined=new Uint32Array(this.value.length),n){if(n.length!==r)throw new Error(`Bitmap: data height mismatch: exp=${r} got=${n.length}`);for(let i=0;i<r;i++){const l=n[i];if(!l||l.length!==o)throw new Error(`Bitmap: data width mismatch at y=${i}: exp=${o} got=${l==null?void 0:l.length}`);for(let c=0;c<o;c++)this.set(c,i,l[c])}}}static size(t,n){if(typeof t=="number"&&(t={height:t,width:t}),!Number.isSafeInteger(t.height)&&t.height!==1/0)throw new Error(`Bitmap: invalid height=${t.height} (${typeof t.height})`);if(!Number.isSafeInteger(t.width)&&t.width!==1/0)throw new Error(`Bitmap: invalid width=${t.width} (${typeof t.width})`);return n!==void 0&&(t={width:Math.min(t.width,n.width),height:Math.min(t.height,n.height)}),t}static fromString(t){t=t.replace(/^\n+/g,"").replace(/\n+$/g,"");const n=t.split(String.fromCharCode(oc.newline)),r=n.length;let o;const i=[];for(const l of n){const c=l.split("").map(u=>{if(u==="X")return!0;if(u===" ")return!1;if(u!=="?")throw new Error(`Bitmap.fromString: unknown symbol=${u}`)});if(o!==void 0&&c.length!==o)throw new Error(`Bitmap.fromString different row sizes: width=${o} cur=${c.length}`);o=c.length,i.push(c)}return o===void 0&&(o=0),new un({height:r,width:o},i)}point(t){return this.get(t.x,t.y)}isInside(t){return 0<=t.x&&t.x<this.width&&0<=t.y&&t.y<this.height}size(t){if(!t)return{height:this.height,width:this.width};const{x:n,y:r}=this.xy(t);return{height:this.height-r,width:this.width-n}}xy(t){if(typeof t=="number"&&(t={x:t,y:t}),!Number.isSafeInteger(t.x))throw new Error(`Bitmap: invalid x=${t.x}`);if(!Number.isSafeInteger(t.y))throw new Error(`Bitmap: invalid y=${t.y}`);return t.x=zx(t.x,this.width),t.y=zx(t.y,this.height),t}wordIndex(t,n){return n*this.words+(t>>>5)}bitIndex(t,n){return{word:this.wordIndex(t,n),bit:t&31}}isDefined(t,n){const r=this.wordIndex(t,n),o=sc(t);return(this.defined[r]&o)!==0}get(t,n){const r=this.wordIndex(t,n),o=sc(t);return(this.value[r]&o)!==0}maskWord(t,n,r){const{defined:o,value:i}=this;o[t]|=n,i[t]=i[t]&~n|-r&n}set(t,n,r){r!==void 0&&this.maskWord(this.wordIndex(t,n),sc(t),r)}fillRectConst(t,n,r,o,i){if(r<=0||o<=0||i===void 0)return;const{value:l,defined:c,words:u}=this,p=t>>>5,f=t+r-1>>>5,m=t&31,g=t+r-1&31;for(let v=0;v<o;v++){const w=(n+v)*u;if(p===f){const b=Gs(m,g-m+1);this.maskWord(w+p,b,i);continue}this.maskWord(w+p,Gs(m,32-m),i);for(let b=p+1;b<f;b++)c[w+b]=4294967295,l[w+b]=i?4294967295:0;this.maskWord(w+f,Gs(0,g+1),i)}}rectWords(t,n,r,o,i){for(let l=0;l<o;l++){const c=n+l;for(let u=0;u<r;){const p=t+u,{bit:f,word:m}=this.bitIndex(p,c),g=Math.min(32-f,r-u);i(m,p,u,l,g),u+=g}}}rect(t,n,r){const{x:o,y:i}=this.xy(t),{height:l,width:c}=un.size(n,this.size({x:o,y:i}));if(typeof r!="function")return this.fillRectConst(o,i,c,l,r),this;const{defined:u,value:p}=this;return this.rectWords(o,i,c,l,(f,m,g,v,w)=>{let b=0,C=p[f];for(let j=0;j<w;j++){const I=sc(m+j),A=r({x:g+j,y:v},(C&I)!==0);A!==void 0&&(b|=I,C=C&~I|-A&I)}u[f]|=b,p[f]=C}),this}rectRead(t,n,r){const{x:o,y:i}=this.xy(t),{height:l,width:c}=un.size(n,this.size({x:o,y:i})),{value:u}=this;return this.rectWords(o,i,c,l,(p,f,m,g,v)=>{const w=u[p];for(let b=0;b<v;b++){const C=sc(f+b);r({x:m+b,y:g},(w&C)!==0)}}),this}hLine(t,n,r){return this.rect(t,{width:n,height:1},r)}vLine(t,n,r){return this.rect(t,{width:1,height:n},r)}border(t=2,n){const r=this.height+2*t,o=this.width+2*t,i=new un({height:r,width:o});return i.rect(0,1/0,n),i.embed({x:t,y:t},this),i}embed(t,n){const{x:r,y:o}=this.xy(t),{height:i,width:l}=un.size(n.size(),this.size({x:r,y:o}));if(l<=0||i<=0)return this;const{value:c,defined:u}=this,{words:p,value:f}=n;for(let m=0;m<i;m++){const g=m*p;for(let v=0;v<l;){const w=r+v,{word:b,bit:C}=this.bitIndex(w,o+m),{word:j,bit:I}=n.bitIndex(v,m),A=Math.min(32-C,l-v),S=f[j],N=I&&j+1<g+p?f[j+1]:0,T=I?(S>>>I|N<<32-I)>>>0:S,B=Gs(C,A),R=(T&Gs(0,A))<<C>>>0;u[b]|=B,c[b]=c[b]&~B|R,v+=A}}return this}rectSlice(t,n=this.size()){const{x:r,y:o}=this.xy(t),{height:i,width:l}=un.size(n,this.size({x:r,y:o})),c=new un({height:i,width:l});return this.rectRead({x:r,y:o},{height:i,width:l},(u,p)=>{this.isDefined(r+u.x,o+u.y)&&c.set(u.x,u.y,p)}),c}transpose(){const{height:t,width:n,value:r,defined:o,words:i}=this,l=new un({height:n,width:t}),{words:c,value:u,defined:p,tailMask:f}=l,m=new Uint32Array(32),g=new Uint32Array(32);for(let v=0;v<t;v+=32)for(let w=0;w<i;w++){const b=Math.min(32,t-v);for(let C=0;C<b;C++){const j=this.wordIndex(32*w,v+C);m[C]=r[j],g[C]=o[j]}m.fill(0,b),g.fill(0,b),Hx(m),Hx(g);for(let C=0;C<32;C++){const j=w*32+C;if(j>=n)break;const I=l.wordIndex(v,j),A=v>>>5===c-1?f:4294967295;u[I]=m[C]&A,p[I]=g[C]&A}}return l}negate(){const t=this.defined.length;for(let n=0;n<t;n++)this.value[n]=~this.value[n],this.defined[n]=4294967295;return this}scale(t){if(!Number.isSafeInteger(t)||t>1024)throw new Error(`invalid scale factor: ${t}`);const{height:n,width:r}=this;return new un({height:t*n,width:t*r}).rect({x:0,y:0},1/0,({x:i,y:l})=>this.get(i/t|0,l/t|0))}clone(){const t=new un(this.size());return t.defined.set(this.defined),t.value.set(this.value),t}assertDrawn(){const{height:t,width:n,defined:r,tailMask:o,fullWords:i,words:l}=this;if(!(!t||!n))for(let c=0;c<t;c++){const u=c*l;for(let p=0;p<i;p++)if(r[u+p]!==4294967295)throw new Error("Invalid color type=undefined");if(l!==i&&(r[u+i]&o)!==o)throw new Error("Invalid color type=undefined")}}countPatternInRow(t,n,...r){if(n<=0||n>=32)throw new Error("wrong patternLen");const o=(1<<n)-1,{width:i,value:l,words:c}=this;let u=0;const p=this.wordIndex(0,t);for(let f=0,m=0;f<c;f++){const g=l[p+f],v=f===c-1&&i&31||32;for(let w=0;w<v;w++)if(m=(m<<1|g>>>w&1)&o,!(f*32+w+1<n)){for(const b of r)if(m===b){u++;break}}}return u}getRuns(t,n){const{width:r,value:o,words:i}=this;if(r===0)return;let l=0,c;const u=this.wordIndex(0,t);for(let p=0;p<i;p++){const f=o[u+p],m=p===i-1&&r&31||32;for(let g=0;g<m;g++){const v=(f&1<<g)!==0;if(v===c){l++;continue}c!==void 0&&n(l,c),c=v,l=1}}c!==void 0&&n(l,c)}popcnt(){const{height:t,width:n,words:r,fullWords:o,tailMask:i}=this;if(!t||!n)return 0;let l=0;for(let c=0;c<t;c++){const u=c*r;for(let p=0;p<o;p++)l+=em(this.value[u+p]);r!==o&&(l+=em(this.value[u+o]&i))}return l}countBoxes2x2(t){const{width:n,words:r}=this;if(n<2||(t|0)<0||t+1>=this.height)return 0;const o=this.wordIndex(0,t)|0,i=this.wordIndex(0,t+1)|0,c=(n&31)===0?2147483647:Gs(0,n-1&31);let u=0;for(let p=0;p<r;p++){const f=this.value[o+p],m=this.value[i+p],g=~(f^m)>>>0,v=p+1<r?this.value[o+p+1]>>>0:0,w=~(f^(f>>>1|(v&1)<<31)>>>0)>>>0,b=p+1<r?this.value[i+p+1]>>>0:0,C=~(m^(m>>>1|(b&1)<<31)>>>0)>>>0;let j=(g&w&C)>>>0;p===r-1&&(j&=c),u+=em(j)}return u}toString(){const t=String.fromCharCode(oc.newline);let n="";for(let r=0;r<this.height;r++){let o="";for(let i=0;i<this.width;i++){const l=this.get(i,r);o+=this.isDefined(i,r)?l?"X":" ":"?"}n+=o+(r+1===this.height?"":t)}return n}toRaw(){const t=Array.from({length:this.height},()=>new Array(this.width));for(let n=0;n<this.height;n++){const r=t[n];for(let o=0;o<this.width;o++)r[o]=this.get(o,n)}return t}toASCII(){const{height:t,width:n}=this;let r="";for(let o=0;o<t;o+=2){for(let i=0;i<n;i++){const l=this.get(i,o),c=o+1>=t?!0:this.get(i,o+1);!l&&!c?r+="█":!l&&c?r+="▀":l&&!c?r+="▄":l&&c&&(r+=" ")}r+=String.fromCharCode(oc.newline)}return r}toTerm(){const t=String.fromCharCode(oc.reset),n=t+"[0m",r=t+"[1;47m "+n,o=t+"[40m "+n,i=String.fromCharCode(oc.newline);let l="";for(let c=0;c<this.height;c++){for(let u=0;u<this.width;u++){const p=this.get(u,c);l+=p?o:r}l+=i}return l}toSVG(t=!0){let n=`<svg viewBox="0 0 ${this.width} ${this.height}" xmlns="http://www.w3.org/2000/svg">`,r="",o;return this.rectRead(0,1/0,(i,l)=>{if(!l)return;const{x:c,y:u}=i;if(!t){n+=`<rect x="${c}" y="${u}" width="1" height="1" />`;return}let p=`M${c} ${u}`;if(o){const m=`m${c-o.x} ${u-o.y}`;m.length<=p.length&&(p=m)}const f=c<10?`H${c}`:"h-1";r+=`${p}h1v1${f}Z`,o=i}),t&&(n+=`<path d="${r}"/>`),n+="</svg>",n}toGIF(){const t=c=>[c&255,c>>>8&255],n=[...t(this.width),...t(this.height)],r=[];this.rectRead(0,1/0,(c,u)=>r.push(+(u===!0)));const o=126,i=[71,73,70,56,55,97,...n,246,0,0,255,255,255,...Fr(381,0),44,0,0,0,0,...n,0,7],l=Math.floor(r.length/o);for(let c=0;c<l;c++)i.push(o+1,128,...r.slice(o*c,o*(c+1)).map(u=>+u));return i.push(r.length%o+1,128,...r.slice(l*o).map(c=>+c)),i.push(1,129,0,59),new Uint8Array(i)}toImage(t=!1){const{height:n,width:r}=this.size(),o=new Uint8Array(n*r*(t?3:4));let i=0;for(let l=0;l<n;l++)for(let c=0;c<r;c++){const u=this.get(c,l)?0:255;o[i++]=u,o[i++]=u,o[i++]=u,t||(o[i++]=255)}return{height:n,width:r,data:o}}}const Vx=["low","medium","quartile","high"],Qx=["numeric","alphanumeric","byte","kanji","eci"],LO=[26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706],DO={low:[7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],medium:[10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],quartile:[13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],high:[17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]},UO={low:[1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],medium:[1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],quartile:[1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],high:[1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]},tn={size:{encode:e=>21+4*(e-1),decode:e=>(e-17)/4},sizeType:e=>Math.floor((e+7)/17),alignmentPatterns(e){if(e===1)return[];const t=6,n=tn.size.encode(e)-t-1,r=n-t,o=Math.ceil(r/28);let i=Math.floor(r/o);i%2?i+=1:r%o*2>=o&&(i+=2);const l=[t];for(let c=1;c<o;c++)l.push(n-(o-c)*i);return l.push(n),l},ECCode:{low:1,medium:0,quartile:3,high:2},formatMask:21522,formatBits(e,t){const n=tn.ECCode[e]<<3|t;let r=n;for(let o=0;o<10;o++)r=r<<1^(r>>9)*1335;return(n<<10|r)^tn.formatMask},versionBits(e){let t=e;for(let n=0;n<12;n++)t=t<<1^(t>>11)*7973;return e<<12|t},alphabet:{numeric:qx("0123456789"),alphanumerc:qx("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:")},lengthBits(e,t){return{numeric:[10,12,14],alphanumeric:[9,11,13],byte:[8,16,16],kanji:[8,10,12],eci:[0,0,0]}[t][tn.sizeType(e)]},modeBits:{numeric:"0001",alphanumeric:"0010",byte:"0100",kanji:"1000",eci:"0111"},capacity(e,t){const n=LO[e-1],r=DO[t][e-1],o=UO[t][e-1],i=Math.floor(n/o)-r,l=o-n%o;return{words:r,numBlocks:o,shortBlocks:l,blockLen:i,capacity:(n-r*o)*8,total:(r+i)*o+o-l}}},y1=[(e,t)=>(e+t)%2==0,(e,t)=>t%2==0,(e,t)=>e%3==0,(e,t)=>(e+t)%3==0,(e,t)=>(Math.floor(t/2)+Math.floor(e/3))%2==0,(e,t)=>e*t%2+e*t%3==0,(e,t)=>(e*t%2+e*t%3)%2==0,(e,t)=>((e+t)%2+e*t%3)%2==0],we={tables:(e=>{const t=Fr(256,0),n=Fr(256,0);for(let r=0,o=1;r<256;r++)t[r]=o,n[o]=r,o<<=1,o&256&&(o^=e);return{exp:t,log:n}})(285),exp:e=>we.tables.exp[e],log(e){if(e===0)throw new Error(`GF.log: invalid arg=${e}`);return we.tables.log[e]%255},mul(e,t){return e===0||t===0?0:we.tables.exp[(we.tables.log[e]+we.tables.log[t])%255]},add:(e,t)=>e^t,pow:(e,t)=>we.tables.exp[we.tables.log[e]*t%255],inv(e){if(e===0)throw new Error(`GF.inverse: invalid arg=${e}`);return we.tables.exp[255-we.tables.log[e]]},polynomial(e){if(e.length==0)throw new Error("GF.polymomial: invalid length");if(e[0]!==0)return e;let t=0;for(;t<e.length-1&&e[t]==0;t++);return e.slice(t)},monomial(e,t){if(e<0)throw new Error(`GF.monomial: invalid degree=${e}`);if(t==0)return[0];let n=Fr(e+1,0);return n[0]=t,we.polynomial(n)},degree:e=>e.length-1,coefficient:(e,t)=>e[we.degree(e)-t],mulPoly(e,t){if(e[0]===0||t[0]===0)return[0];const n=Fr(e.length+t.length-1,0);for(let r=0;r<e.length;r++)for(let o=0;o<t.length;o++)n[r+o]=we.add(n[r+o],we.mul(e[r],t[o]));return we.polynomial(n)},mulPolyScalar(e,t){if(t==0)return[0];if(t==1)return e;const n=Fr(e.length,0);for(let r=0;r<e.length;r++)n[r]=we.mul(e[r],t);return we.polynomial(n)},mulPolyMonomial(e,t,n){if(t<0)throw new Error("GF.mulPolyMonomial: invalid degree");if(n==0)return[0];const r=Fr(e.length+t,0);for(let o=0;o<e.length;o++)r[o]=we.mul(e[o],n);return we.polynomial(r)},addPoly(e,t){if(e[0]===0)return t;if(t[0]===0)return e;let n=e,r=t;n.length>r.length&&([n,r]=[r,n]);let o=Fr(r.length,0),i=r.length-n.length,l=r.slice(0,i);for(let c=0;c<l.length;c++)o[c]=l[c];for(let c=i;c<r.length;c++)o[c]=we.add(n[c-i],r[c]);return we.polynomial(o)},remainderPoly(e,t){const n=Array.from(e);for(let r=0;r<e.length-t.length+1;r++){const o=n[r];if(o!==0)for(let i=1;i<t.length;i++)t[i]!==0&&(n[r+i]=we.add(n[r+i],we.mul(t[i],o)))}return n.slice(e.length-t.length+1,n.length)},divisorPoly(e){let t=[1];for(let n=0;n<e;n++)t=we.mulPoly(t,[1,we.pow(2,n)]);return t},evalPoly(e,t){if(t==0)return we.coefficient(e,0);let n=e[0];for(let r=1;r<e.length;r++)n=we.add(we.mul(t,n),e[r]);return n},euclidian(e,t,n){we.degree(e)<we.degree(t)&&([e,t]=[t,e]);let r=e,o=t,i=[0],l=[1];for(;2*we.degree(o)>=n;){let p=r,f=i;if(r=o,i=l,r[0]===0)throw new Error("rLast[0] === 0");o=p;let m=[0];const g=we.inv(r[0]);for(;we.degree(o)>=we.degree(r)&&o[0]!==0;){const v=we.degree(o)-we.degree(r),w=we.mul(o[0],g);m=we.addPoly(m,we.monomial(v,w)),o=we.addPoly(o,we.mulPolyMonomial(r,v,w))}if(m=we.mulPoly(m,i),l=we.addPoly(m,f),we.degree(o)>=we.degree(r))throw new Error(`Division failed r: ${o}, rLast: ${r}`)}const c=we.coefficient(l,0);if(c==0)throw new Error("sigmaTilde(0) was zero");const u=we.inv(c);return[we.mulPolyScalar(l,u),we.mulPolyScalar(o,u)]}};function $O(e){return{encode(t){const n=we.divisorPoly(e),r=Array.from(t);return r.push(...n.slice(0,-1).fill(0)),Uint8Array.from(we.remainderPoly(r,n))},decode(t){const n=t.slice(),r=we.polynomial(Array.from(t));let o=Fr(e,0),i=!1;for(let m=0;m<e;m++){const g=we.evalPoly(r,we.exp(m));o[o.length-1-m]=g,g!==0&&(i=!0)}if(!i)return n;o=we.polynomial(o);const l=we.monomial(e,1),[c,u]=we.euclidian(l,o,e),p=Fr(we.degree(c),0);let f=0;for(let m=1;m<256&&f<p.length;m++)we.evalPoly(c,m)===0&&(p[f++]=we.inv(m));if(f!==p.length)throw new Error("RS.decode: invalid errors number");for(let m=0;m<p.length;m++){const g=n.length-1-we.log(p[m]);if(g<0)throw new Error("RS.decode: invalid error location");const v=we.inv(p[m]);let w=1;for(let b=0;b<p.length;b++)m!==b&&(w=we.mul(w,we.add(1,we.mul(p[b],v))));n[g]=we.add(n[g],we.mul(we.evalPoly(u,v),we.inv(w)))}return n}}}function zO(e,t){const{words:n,shortBlocks:r,numBlocks:o,blockLen:i,total:l}=tn.capacity(e,t),c=$O(n);return{encode(u){const p=[],f=[];for(let w=0;w<o;w++){const b=w<r,C=i+(b?0:1);p.push(u.subarray(0,C)),f.push(c.encode(u.subarray(0,C))),u=u.subarray(C)}const m=Wx(p),g=Wx(f),v=new Uint8Array(m.length+g.length);return v.set(m),v.set(g,m.length),v},decode(u){if(u.length!==l)throw new Error(`interleave.decode: len(data)=${u.length}, total=${l}`);const p=[];for(let g=0;g<o;g++){const v=g<r;p.push(new Uint8Array(n+i+(v?0:1)))}let f=0;for(let g=0;g<i;g++)for(let v=0;v<o;v++)p[v][g]=u[f++];for(let g=r;g<o;g++)p[g][i]=u[f++];for(let g=i;g<i+n;g++)for(let v=0;v<o;v++){const w=v<r;p[v][g+(w?0:1)]=u[f++]}const m=[];for(const g of p)m.push(...Array.from(c.decode(g)).slice(0,-n));return Uint8Array.from(m)}}}function WO(e,t,n,r=!1){const o=tn.size.encode(e);let i=new un(o+2);const l=new un(3).rect(0,3,!0).border(1,!1).border(1,!0).border(1,!1);i=i.embed(0,l).embed({x:-l.width,y:0},l).embed({x:0,y:-l.height},l),i=i.rectSlice(1,o);const c=new un(1).rect(0,1,!0).border(1,!1).border(1,!0),u=tn.alignmentPatterns(e);for(const p of u)for(const f of u)i.isDefined(f,p)||i.embed({x:f-2,y:p-2},c);i=i.hLine({x:0,y:6},1/0,({x:p})=>i.isDefined(p,6)?void 0:p%2==0).vLine({x:6,y:0},1/0,({y:p})=>i.isDefined(6,p)?void 0:p%2==0);{const p=tn.formatBits(t,n),f=m=>!r&&(p>>m&1)==1;for(let m=0;m<6;m++)i.set(8,m,f(m));for(let m=6;m<8;m++)i.set(8,m+1,f(m));for(let m=8;m<15;m++)i.set(8,o-15+m,f(m));for(let m=0;m<8;m++)i.set(o-m-1,8,f(m));for(let m=8;m<9;m++)i.set(15-m-1+1,8,f(m));for(let m=9;m<15;m++)i.set(15-m-1,8,f(m));i.set(8,o-8,!r)}if(e>=7){const p=tn.versionBits(e);for(let f=0;f<18;f+=1){const m=!r&&(p>>f&1)==1,g=Math.floor(f/3),v=f%3+o-8-3;i.set(v,g,m),i.set(g,v,m)}}return i}function qO(e,t,n){const r=e.height,o=y1[t];let i=-1,l=r-1;for(let c=r-1;c>0;c-=2){for(c==6&&(c=5);;l+=i){for(let u=0;u<2;u+=1){const p=c-u;e.isDefined(p,l)||n(p,l,o(p,l))}if(l+i<0||l+i>=r)break}i=-i}}function HO(e){let t="numeric";for(let n of e)if(!tn.alphabet.numeric.has(n)&&(t="alphanumeric",!tn.alphabet.alphanumerc.has(n)))return"byte";return t}function VO(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function Gx(e,t,n,r,o=VO){let i="",l=n.length;if(r==="numeric"){const g=tn.alphabet.numeric.decode(n.split("")),v=g.length;for(let w=0;w<v-2;w+=3)i+=Qs(g[w]*100+g[w+1]*10+g[w+2],10);v%3===1?i+=Qs(g[v-1],4):v%3===2&&(i+=Qs(g[v-2]*10+g[v-1],7))}else if(r==="alphanumeric"){const g=tn.alphabet.alphanumerc.decode(n.split("")),v=g.length;for(let w=0;w<v-1;w+=2)i+=Qs(g[w]*45+g[w+1],11);v%2==1&&(i+=Qs(g[v-1],6))}else if(r==="byte"){const g=o(n);l=g.length,i=Array.from(g).map(v=>Qs(v,8)).join("")}else throw new Error("encode: unsupported type");const{capacity:c}=tn.capacity(e,t),u=Qs(l,tn.lengthBits(e,r));let p=tn.modeBits[r]+u+i;if(p.length>c)throw new Error("Capacity overflow");p+="0".repeat(Math.min(4,Math.max(0,c-p.length))),p.length%8&&(p+="0".repeat(8-p.length%8));const f="1110110000010001";for(let g=0;p.length!==c;g++)p+=f[g%f.length];const m=Uint8Array.from(p.match(/(.{8})/g).map(g=>+`0b${g}`));return zO(e,t).encode(m)}function Kx(e,t,n,r,o=!1){const i=WO(e,t,r,o);let l=0;const c=8*n.length;if(qO(i,r,(u,p,f)=>{let m=!1;l<c&&(m=(n[l>>>3]>>(7-l&7)&1)!==0,l++),i.set(u,p,m!==f)}),l!==c)throw new Error("QR: bytes left after draw");return i}const rE=e=>{const t=e.map(n=>n?"1":"0").join("");return{len:t.length,n:+`0b${t}`}},oE=[!0,!1,!0,!0,!0,!1,!0],sE=[!1,!1,!1,!1],ef=rE([...oE,...sE]),Yx=rE([...sE,...oE]);function QO(e){const{width:t,height:n}=e,r=e.transpose();let o=0;for(let f=0;f<n;f++)e.getRuns(f,m=>{m>=5&&(o+=3+(m-5))});for(let f=0;f<t;f++)r.getRuns(f,m=>{m>=5&&(o+=3+(m-5))});let i=0;for(let f=0;f<n-1;f++)i+=3*e.countBoxes2x2(f);let l=0;for(let f=0;f<n;f++)l+=40*e.countPatternInRow(f,ef.len,ef.n,Yx.n);for(let f=0;f<t;f++)l+=40*r.countPatternInRow(f,ef.len,ef.n,Yx.n);let c=0;c=e.popcnt();const u=c/(n*t)*100,p=10*Math.floor(Math.abs(u-50)/5);return o+i+l+p}function GO(e,t,n,r){if(r===void 0){const o=FO();for(let i=0;i<y1.length;i++)o.add(QO(Kx(e,t,n,i,!0)),i);r=o.get()}if(r===void 0)throw new Error("Cannot find mask");return Kx(e,t,n,r)}function KO(e){if(!Vx.includes(e))throw new Error(`Invalid error correction mode=${e}. Expected: ${Vx}`)}function YO(e){if(!Qx.includes(e))throw new Error(`Encoding: invalid mode=${e}. Expected: ${Qx}`);if(e==="kanji"||e==="eci")throw new Error(`Encoding: ${e} is not supported (yet?).`)}function JO(e){if(![0,1,2,3,4,5,6,7].includes(e)||!y1[e])throw new Error(`Invalid mask=${e}. Expected number [0..7]`)}function ZO(e,t="raw",n={}){const r=n.ecc!==void 0?n.ecc:"medium";KO(r);const o=n.encoding!==void 0?n.encoding:HO(e);YO(o),n.mask!==void 0&&JO(n.mask);let i=n.version,l,c=new Error("Unknown error");if(i!==void 0)MO(i),l=Gx(i,r,e,o,n.textEncoder);else for(let f=1;f<=40;f++)try{l=Gx(f,r,e,o,n.textEncoder),i=f;break}catch(m){c=m}if(!i||!l)throw c;let u=GO(i,r,l,n.mask);u.assertDrawn();const p=n.border===void 0?2:n.border;if(!Number.isSafeInteger(p))throw new Error(`invalid border type=${typeof p}`);if(u=u.border(p,!1),n.scale!==void 0&&(u=u.scale(n.scale)),t==="raw")return u.toRaw();if(t==="ascii")return u.toASCII();if(t==="svg")return u.toSVG(n.optimize);if(t==="gif")return u.toGIF();if(t==="term")return u.toTerm();throw new Error(`Unknown output: ${t}`)}function XO(e,t={}){const{errorCorrection:n,version:r}=t,o=ZO(e,"raw",{border:0,ecc:n,scale:1,version:r});return{edgeLength:o.length,finderLength:7,grid:o,value:e}}function zr(e){const{arena:t,...n}=e;return h.jsxs(zr.Root,{...n,children:[h.jsx(zr.Finder,{}),h.jsx(zr.Cells,{}),t&&h.jsx(zr.Arena,{children:typeof t=="string"?h.jsx("img",{alt:"Arena",src:t,style:{borderRadius:1,height:"100%",objectFit:"cover",width:"100%"}}):t})]})}(function(e){e.Context=P.createContext(null);function t(i){const{children:l,size:c="100%",value:u,version:p,errorCorrection:f,...m}=i,g=P.useMemo(()=>(P.Children.map(l,A=>!P.isValidElement(A)||typeof A.type=="string"?null:"displayName"in A.type&&A.type.displayName==="Arena"?!0:null)??[]).some(Boolean),[l]),v=P.useMemo(()=>{let A=f;return g&&f==="low"&&(A="medium"),XO(u,{errorCorrection:A,version:p})},[u,g,f,p]),w=1,b=v.edgeLength*w,C=v.finderLength*w/2,j=g?Math.floor(b/4):0,I=P.useMemo(()=>({arenaSize:j,cellSize:w,edgeSize:b,qrcode:v,finderSize:C}),[j,b,v,C]);return h.jsx(e.Context.Provider,{value:I,children:h.jsxs("svg",{...m,width:c,height:c,viewBox:`0 0 ${b} ${b}`,xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("title",{children:"QR Code"}),l]})})}e.Root=t,(function(i){i.displayName="Root"})(t=e.Root||(e.Root={}));function n(i){const{className:l,fill:c,innerClassName:u,radius:p=.25}=i,{cellSize:f,edgeSize:m,finderSize:g}=P.useContext(e.Context);function v({position:w}){let b=g-(g-f)-f/2;w==="top-right"&&(b=m-g-(g-f)-f/2);let C=g-(g-f)-f/2;w==="bottom-left"&&(C=m-g-(g-f)-f/2);let j=g-f*1.5;w==="top-right"&&(j=m-g-f*1.5);let I=g-f*1.5;return w==="bottom-left"&&(I=m-g-f*1.5),h.jsxs(h.Fragment,{children:[h.jsx("rect",{className:l,stroke:c??"currentColor",fill:"transparent",x:b,y:C,width:f+(g-f)*2,height:f+(g-f)*2,rx:2*p*(g-f),ry:2*p*(g-f),strokeWidth:f}),h.jsx("rect",{className:u,fill:c??"currentColor",x:j,y:I,width:f*3,height:f*3,rx:2*p*f,ry:2*p*f})]})}return h.jsxs(h.Fragment,{children:[h.jsx(v,{position:"top-left"}),h.jsx(v,{position:"top-right"}),h.jsx(v,{position:"bottom-left"})]})}e.Finder=n,(function(i){i.displayName="Finder"})(n=e.Finder||(e.Finder={}));function r(i){const{className:l,fill:c="currentColor",inset:u=!0,radius:p=1}=i,{arenaSize:f,cellSize:m,qrcode:g}=P.useContext(e.Context),{edgeLength:v,finderLength:w}=g,b=P.useMemo(()=>{let C="";for(let j=0;j<g.grid.length;j++){const I=g.grid[j];if(I)for(let A=0;A<I.length;A++){if(!I[A])continue;const N=v/2-f/2,T=N+f;if(j>=N&&j<=T&&A>=N&&A<=T)continue;const B=j<w&&A<w,R=j<w&&A>=v-w,M=j>=v-w&&A<w;if(B||R||M)continue;const H=u?m*.1:0,V=(m-H*2)/2,W=A*m+m/2,L=j*m+m/2,J=W-V,O=W+V,G=L-V,ee=L+V,F=p*V;C+=[`M ${J+F},${G}`,`L ${O-F},${G}`,`A ${F},${F} 0 0,1 ${O},${G+F}`,`L ${O},${ee-F}`,`A ${F},${F} 0 0,1 ${O-F},${ee}`,`L ${J+F},${ee}`,`A ${F},${F} 0 0,1 ${J},${ee-F}`,`L ${J},${G+F}`,`A ${F},${F} 0 0,1 ${J+F},${G}`,"z"].join(" ")}}return C},[f,m,v,w,g.grid,u,p]);return h.jsx("path",{className:l,d:b,fill:c})}e.Cells=r,(function(i){i.displayName="Cells"})(r=e.Cells||(e.Cells={}));function o(i){const{children:l}=i,{arenaSize:c,cellSize:u,edgeSize:p}=P.useContext(e.Context),f=Math.ceil(p/2-c/2),m=c+c%2,g=u/2;return h.jsx("foreignObject",{x:f,y:f,width:m,height:m,children:h.jsx("div",{style:{alignItems:"center",display:"flex",fontSize:1,justifyContent:"center",height:"100%",overflow:"hidden",width:"100%",padding:g,boxSizing:"border-box"},children:l})})}e.Arena=o,(function(i){i.displayName="Arena"})(o=e.Arena||(e.Arena={}))})(zr||(zr={}));function eM(e={}){let t,n,r,o;return i=>({id:"baseAccount",name:"Base Account",rdns:"app.base.account",type:"baseAccount",async connect({chainId:l,withCapabilities:c,...u}={}){var p;try{const f=await this.getProvider(),m=l??((p=i.chains[0])==null?void 0:p.id);if(!m)throw new As;const g=await f.request({method:"wallet_connect",params:[{capabilities:"capabilities"in u&&u.capabilities?u.capabilities:{},chainIds:[ge(m),...i.chains.filter(b=>b.id!==m).map(b=>ge(b.id))]}]}),v=g.accounts.map(b=>({address:vt(b.address),capabilities:b.capabilities??{}}));let w=Number(g.chainIds[0]);if(n||(n=this.onAccountsChanged.bind(this),f.on("accountsChanged",n)),r||(r=this.onChainChanged.bind(this),f.on("chainChanged",r)),o||(o=this.onDisconnect.bind(this),f.on("disconnect",o)),l&&w!==l){const b=await this.switchChain({chainId:l}).catch(C=>{if(C.code===Ve.code)throw C;return{id:w}});w=(b==null?void 0:b.id)??w}return{accounts:c?v:v.map(b=>b.address),chainId:w}}catch(f){throw/(user closed modal|accounts received is empty|user denied account|request rejected)/i.test(f.message)?new Ve(f):f}},async disconnect(){const l=await this.getProvider();n&&(l.removeListener("accountsChanged",n),n=void 0),r&&(l.removeListener("chainChanged",r),r=void 0),o&&(l.removeListener("disconnect",o),o=void 0),l.disconnect()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(c=>vt(c))},async getChainId(){const c=await(await this.getProvider()).request({method:"eth_chainId"});return Number(c)},async getProvider(){if(!t){const l=(()=>{var p;return typeof e.preference=="string"?{options:e.preference}:{...e.preference,options:((p=e.preference)==null?void 0:p.options)??"all"}})(),{createBaseAccountSDK:c}=await fe(async()=>{const{createBaseAccountSDK:p}=await import("./index-DAMKuJIh.js");return{createBaseAccountSDK:p}},[]);t=c({...e,appChainIds:i.chains.map(p=>p.id),preference:l}).getProvider()}return t},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:l,chainId:c}){var f,m,g,v;const u=i.chains.find(w=>w.id===c);if(!u)throw new qn(new As);const p=await this.getProvider();try{return await p.request({method:"wallet_switchEthereumChain",params:[{chainId:ge(u.id)}]}),u}catch(w){if(w.code===4902)try{let b;l!=null&&l.blockExplorerUrls?b=l.blockExplorerUrls:b=(f=u.blockExplorers)!=null&&f.default.url?[(m=u.blockExplorers)==null?void 0:m.default.url]:[];let C;(g=l==null?void 0:l.rpcUrls)!=null&&g.length?C=l.rpcUrls:C=[((v=u.rpcUrls.default)==null?void 0:v.http[0])??""];const j={blockExplorerUrls:b,chainId:ge(c),chainName:(l==null?void 0:l.chainName)??u.name,iconUrls:l==null?void 0:l.iconUrls,nativeCurrency:(l==null?void 0:l.nativeCurrency)??u.nativeCurrency,rpcUrls:C};return await p.request({method:"wallet_addEthereumChain",params:[j]}),u}catch(b){throw new Ve(b)}throw new qn(w)}},onAccountsChanged(l){l.length===0?this.onDisconnect():i.emitter.emit("change",{accounts:l.map(c=>vt(c))})},onChainChanged(l){const c=Number(l);i.emitter.emit("change",{chainId:c})},async onDisconnect(l){i.emitter.emit("disconnect");const c=await this.getProvider();n&&(c.removeListener("accountsChanged",n),n=void 0),r&&(c.removeListener("chainChanged",r),r=void 0),o&&(c.removeListener("disconnect",o),o=void 0)}})}v1.type="metaMask";function v1(e={}){let t,n,r,o,i,l,c,u;return p=>({id:"metaMaskSDK",name:"MetaMask",rdns:["io.metamask","io.metamask.mobile"],type:v1.type,async setup(){const f=await this.getProvider();f!=null&&f.on&&(l||(l=this.onConnect.bind(this),f.on("connect",l)),o||(o=this.onAccountsChanged.bind(this),f.on("accountsChanged",o)))},async connect({chainId:f,isReconnecting:m,withCapabilities:g}={}){const v=await this.getProvider();c||(c=this.onDisplayUri,v.on("display_uri",c));let w=[];m&&(w=await this.getAccounts().catch(()=>[]));try{let b,C;w!=null&&w.length||(e.connectAndSign||e.connectWith?(e.connectAndSign?b=await t.connectAndSign({msg:e.connectAndSign}):e.connectWith&&(C=await t.connectWith({method:e.connectWith.method,params:e.connectWith.params})),w=await this.getAccounts()):w=(await t.connect()).map(A=>vt(A)));let j=await this.getChainId();if(f&&j!==f){const I=await this.switchChain({chainId:f}).catch(A=>{if(A.code===Ve.code)throw A;return{id:j}});j=(I==null?void 0:I.id)??j}return c&&(v.removeListener("display_uri",c),c=void 0),b?v.emit("connectAndSign",{accounts:w,chainId:j,signResponse:b}):C&&v.emit("connectWith",{accounts:w,chainId:j,connectWithResponse:C}),l&&(v.removeListener("connect",l),l=void 0),o||(o=this.onAccountsChanged.bind(this),v.on("accountsChanged",o)),i||(i=this.onChainChanged.bind(this),v.on("chainChanged",i)),u||(u=this.onDisconnect.bind(this),v.on("disconnect",u)),{accounts:g?w.map(I=>({address:I,capabilities:{}})):w,chainId:j}}catch(b){const C=b;throw C.code===Ve.code?new Ve(C):C.code===qr.code?new qr(C):C}},async disconnect(){const f=await this.getProvider();i&&(f.removeListener("chainChanged",i),i=void 0),u&&(f.removeListener("disconnect",u),u=void 0),l||(l=this.onConnect.bind(this),f.on("connect",l)),await t.terminate()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(g=>vt(g))},async getChainId(){const f=await this.getProvider(),m=f.getChainId()||await(f==null?void 0:f.request({method:"eth_chainId"}));return Number(m)},async getProvider(){async function f(){var b,C,j,I,A;const m=await(async()=>{const{default:S}=await fe(async()=>{const{default:N}=await import("./metamask-sdk-C7pFdHLp.js");return{default:N}},[]);return typeof S!="function"&&typeof S.default=="function"?S.default:S})(),g={};for(const S of p.chains)g[ge(S.id)]=(b=ZC({chain:S,transports:p.transports}))==null?void 0:b[0];t=new m({_source:"wagmi",forceDeleteProvider:!1,forceInjectProvider:!1,injectProvider:!1,...e,readonlyRPCMap:g,dappMetadata:{...e.dappMetadata,name:(C=e.dappMetadata)!=null&&C.name?(j=e.dappMetadata)==null?void 0:j.name:"wagmi",url:(I=e.dappMetadata)!=null&&I.url?(A=e.dappMetadata)==null?void 0:A.url:typeof window<"u"?window.location.origin:"https://wagmi.sh"},useDeeplink:e.useDeeplink??!0});const v=await t.init(),w=v!=null&&v.activeProvider?v.activeProvider:t.getProvider();if(!w)throw new $n;return w}return n||(r||(r=f()),n=await r),n},async isAuthorized(){try{return!!(await Ci(()=>rh(()=>this.getAccounts(),{timeout:200}),{delay:201,retryCount:3})).length}catch{return!1}},async switchChain({addEthereumChainParameter:f,chainId:m}){var C,j;const g=await this.getProvider(),v=p.chains.find(I=>I.id===m);if(!v)throw new qn(new As);try{return await g.request({method:"wallet_switchEthereumChain",params:[{chainId:ge(m)}]}),await w(),await b(m),v}catch(I){const A=I;if(A.code===Ve.code)throw new Ve(A);if(A.code===4902||((j=(C=A==null?void 0:A.data)==null?void 0:C.originalError)==null?void 0:j.code)===4902)try{return await g.request({method:"wallet_addEthereumChain",params:[{blockExplorerUrls:(()=>{const{default:S,...N}=v.blockExplorers??{};if(f!=null&&f.blockExplorerUrls)return f.blockExplorerUrls;if(S)return[S.url,...Object.values(N).map(T=>T.url)]})(),chainId:ge(m),chainName:(f==null?void 0:f.chainName)??v.name,iconUrls:f==null?void 0:f.iconUrls,nativeCurrency:(f==null?void 0:f.nativeCurrency)??v.nativeCurrency,rpcUrls:(()=>{var S,N;return(S=f==null?void 0:f.rpcUrls)!=null&&S.length?f.rpcUrls:[((N=v.rpcUrls.default)==null?void 0:N.http[0])??""]})()}]}),await w(),await b(m),v}catch(S){const N=S;throw N.code===Ve.code?new Ve(N):new qn(N)}throw new qn(A)}async function w(){await Ci(async()=>{const I=lr(await g.request({method:"eth_chainId"}));if(I!==m)throw new Error("User rejected switch after adding network.");return I},{delay:50,retryCount:20})}async function b(I){await new Promise(A=>{const S=(N=>{"chainId"in N&&N.chainId===I&&(p.emitter.off("change",S),A())});p.emitter.on("change",S),p.emitter.emit("change",{chainId:I})})}},async onAccountsChanged(f){if(f.length===0)if(t.isExtensionActive())this.onDisconnect();else return;else if(p.emitter.listenerCount("connect")){const m=(await this.getChainId()).toString();this.onConnect({chainId:m})}else p.emitter.emit("change",{accounts:f.map(m=>vt(m))})},onChainChanged(f){const m=Number(f);p.emitter.emit("change",{chainId:m})},async onConnect(f){const m=await this.getAccounts();if(m.length===0)return;const g=Number(f.chainId);p.emitter.emit("connect",{accounts:m,chainId:g});const v=await this.getProvider();l&&(v.removeListener("connect",l),l=void 0),o||(o=this.onAccountsChanged.bind(this),v.on("accountsChanged",o)),i||(i=this.onChainChanged.bind(this),v.on("chainChanged",i)),u||(u=this.onDisconnect.bind(this),v.on("disconnect",u))},async onDisconnect(f){const m=await this.getProvider();f&&f.code===1013&&m&&(await this.getAccounts()).length||(p.emitter.emit("disconnect"),i&&(m.removeListener("chainChanged",i),i=void 0),u&&(m.removeListener("disconnect",u),u=void 0),l||(l=this.onConnect.bind(this),m.on("connect",l)))},onDisplayUri(f){p.emitter.emit("message",{type:"display_uri",data:f})}})}w1.type="safe";function w1(e={}){const{shimDisconnect:t=!1}=e;let n,r;return o=>({id:"safe",name:"Safe",type:w1.type,async connect({withCapabilities:i}={}){var p;const l=await this.getProvider();if(!l)throw new $n;const c=await this.getAccounts(),u=await this.getChainId();return r||(r=this.onDisconnect.bind(this),l.on("disconnect",r)),t&&await((p=o.storage)==null?void 0:p.removeItem("safe.disconnected")),{accounts:i?c.map(f=>({address:f,capabilities:{}})):c,chainId:u}},async disconnect(){var l;const i=await this.getProvider();if(!i)throw new $n;r&&(i.removeListener("disconnect",r),r=void 0),t&&await((l=o.storage)==null?void 0:l.setItem("safe.disconnected",!0))},async getAccounts(){const i=await this.getProvider();if(!i)throw new $n;return(await i.request({method:"eth_accounts"})).map(vt)},async getProvider(){if(typeof window<"u"&&(window==null?void 0:window.parent)!==window){if(!n){const{default:l}=await fe(async()=>{const{default:f}=await import("./index-DIR15lga.js");return{default:f}},__vite__mapDeps([0,1])),c=new l(e),u=await rh(()=>c.safe.getInfo(),{timeout:e.unstable_getInfoTimeout??10});if(!u)throw new Error("Could not load Safe information");const p=await(async()=>{const f=await fe(()=>import("./index-CQOq78xq.js").then(m=>m.i),__vite__mapDeps([2,1,3]));return typeof f.SafeAppProvider!="function"&&typeof f.default.SafeAppProvider=="function"?f.default.SafeAppProvider:f.SafeAppProvider})();n=new p(u,c)}return n}},async getChainId(){const i=await this.getProvider();if(!i)throw new $n;return Number(i.chainId)},async isAuthorized(){var i;try{return t&&await((i=o.storage)==null?void 0:i.getItem("safe.disconnected"))?!1:!!(await this.getAccounts()).length}catch{return!1}},onAccountsChanged(){},onChainChanged(){},onDisconnect(){o.emitter.emit("disconnect")}})}b1.type="walletConnect";function b1(e){const t=e.isNewChainsStale??!0;let n,r;const o="eip155";let i,l,c,u,p,f;return m=>({id:"walletConnect",name:"WalletConnect",type:b1.type,async setup(){const g=await this.getProvider().catch(()=>null);g&&(c||(c=this.onConnect.bind(this),g.on("connect",c)),p||(p=this.onSessionDelete.bind(this),g.on("session_delete",p)))},async connect({chainId:g,withCapabilities:v,...w}={}){var b,C;try{const j=await this.getProvider();if(!j)throw new $n;u||(u=this.onDisplayUri,j.on("display_uri",u));let I=g;if(!I){const T=await((b=m.storage)==null?void 0:b.getItem("state"))??{};m.chains.some(R=>R.id===T.chainId)?I=T.chainId:I=(C=m.chains[0])==null?void 0:C.id}if(!I)throw new Error("No chains found on connector.");const A=await this.isChainsStale();if(j.session&&A&&await j.disconnect(),!j.session||A){const T=m.chains.filter(B=>B.id!==I).map(B=>B.id);await j.connect({optionalChains:[I,...T],..."pairingTopic"in w?{pairingTopic:w.pairingTopic}:{}}),this.setRequestedChainsIds(m.chains.map(B=>B.id))}const S=(await j.enable()).map(T=>vt(T));let N=await this.getChainId();if(g&&N!==g){const T=await this.switchChain({chainId:g}).catch(B=>{var R;if(B.code===Ve.code&&((R=B.cause)==null?void 0:R.message)!=="Missing or invalid. request() method: wallet_addEthereumChain")throw B;return{id:N}});N=(T==null?void 0:T.id)??N}return u&&(j.removeListener("display_uri",u),u=void 0),c&&(j.removeListener("connect",c),c=void 0),i||(i=this.onAccountsChanged.bind(this),j.on("accountsChanged",i)),l||(l=this.onChainChanged.bind(this),j.on("chainChanged",l)),f||(f=this.onDisconnect.bind(this),j.on("disconnect",f)),p||(p=this.onSessionDelete.bind(this),j.on("session_delete",p)),{accounts:v?S.map(T=>({address:T,capabilities:{}})):S,chainId:N}}catch(j){throw/(user rejected|connection request reset)/i.test(j==null?void 0:j.message)?new Ve(j):j}},async disconnect(){const g=await this.getProvider();try{await(g==null?void 0:g.disconnect())}catch(v){if(!/No matching key/i.test(v.message))throw v}finally{l&&(g==null||g.removeListener("chainChanged",l),l=void 0),f&&(g==null||g.removeListener("disconnect",f),f=void 0),c||(c=this.onConnect.bind(this),g==null||g.on("connect",c)),i&&(g==null||g.removeListener("accountsChanged",i),i=void 0),p&&(g==null||g.removeListener("session_delete",p),p=void 0),this.setRequestedChainsIds([])}},async getAccounts(){return(await this.getProvider()).accounts.map(v=>vt(v))},async getProvider({chainId:g}={}){var w;async function v(){const b=m.chains.map(j=>j.id);if(!b.length)return;const{EthereumProvider:C}=await fe(async()=>{const{EthereumProvider:j}=await import("./index.es-CoEUA0kG.js").then(I=>I.X);return{EthereumProvider:j}},__vite__mapDeps([4,3]));return await C.init({...e,disableProviderPing:!0,optionalChains:b,projectId:e.projectId,rpcMap:Object.fromEntries(m.chains.map(j=>{const[I]=ZC({chain:j,transports:m.transports});return[j.id,I]})),showQrModal:e.showQrModal??!0})}return n||(r||(r=v()),n=await r,n==null||n.events.setMaxListeners(Number.POSITIVE_INFINITY)),g&&await((w=this.switchChain)==null?void 0:w.call(this,{chainId:g})),n},async getChainId(){return(await this.getProvider()).chainId},async isAuthorized(){try{const[g,v]=await Promise.all([this.getAccounts(),this.getProvider()]);return g.length?await this.isChainsStale()&&v.session?(await v.disconnect().catch(()=>{}),!1):!0:!1}catch{return!1}},async switchChain({addEthereumChainParameter:g,chainId:v}){var C,j,I;const w=await this.getProvider();if(!w)throw new $n;const b=m.chains.find(A=>A.id===v);if(!b)throw new qn(new As);try{await Promise.all([new Promise(S=>{const N=({chainId:T})=>{T===v&&(m.emitter.off("change",N),S())};m.emitter.on("change",N)}),w.request({method:"wallet_switchEthereumChain",params:[{chainId:ge(v)}]})]);const A=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...A,v]),b}catch(A){const S=A;if(/(user rejected)/i.test(S.message))throw new Ve(S);try{let N;g!=null&&g.blockExplorerUrls?N=g.blockExplorerUrls:N=(C=b.blockExplorers)!=null&&C.default.url?[(j=b.blockExplorers)==null?void 0:j.default.url]:[];let T;(I=g==null?void 0:g.rpcUrls)!=null&&I.length?T=g.rpcUrls:T=[...b.rpcUrls.default.http];const B={blockExplorerUrls:N,chainId:ge(v),chainName:(g==null?void 0:g.chainName)??b.name,iconUrls:g==null?void 0:g.iconUrls,nativeCurrency:(g==null?void 0:g.nativeCurrency)??b.nativeCurrency,rpcUrls:T};await w.request({method:"wallet_addEthereumChain",params:[B]});const R=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...R,v]),b}catch(N){throw new Ve(N)}}},onAccountsChanged(g){g.length===0?this.onDisconnect():m.emitter.emit("change",{accounts:g.map(v=>vt(v))})},onChainChanged(g){const v=Number(g);m.emitter.emit("change",{chainId:v})},async onConnect(g){const v=Number(g.chainId),w=await this.getAccounts();m.emitter.emit("connect",{accounts:w,chainId:v})},async onDisconnect(g){this.setRequestedChainsIds([]),m.emitter.emit("disconnect");const v=await this.getProvider();i&&(v.removeListener("accountsChanged",i),i=void 0),l&&(v.removeListener("chainChanged",l),l=void 0),f&&(v.removeListener("disconnect",f),f=void 0),p&&(v.removeListener("session_delete",p),p=void 0),c||(c=this.onConnect.bind(this),v.on("connect",c))},onDisplayUri(g){m.emitter.emit("message",{type:"display_uri",data:g})},onSessionDelete(){this.onDisconnect()},getNamespaceChainsIds(){var v,w,b;return n?((b=(w=(v=n.session)==null?void 0:v.namespaces[o])==null?void 0:w.accounts)==null?void 0:b.map(C=>Number.parseInt(C.split(":")[1]||"",10)))??[]:[]},async getRequestedChainsIds(){var g;return await((g=m.storage)==null?void 0:g.getItem(this.requestedChainsStorageKey))??[]},async isChainsStale(){if(!t)return!1;const g=m.chains.map(b=>b.id),v=this.getNamespaceChainsIds();if(v.length&&!v.some(b=>g.includes(b)))return!1;const w=await this.getRequestedChainsIds();return!g.every(b=>w.includes(b))},async setRequestedChainsIds(g){var v;await((v=m.storage)==null?void 0:v.setItem(this.requestedChainsStorageKey,g))},get requestedChainsStorageKey(){return`${this.id}.requestedChains`}})}var Tf={},tM=768,ca=dR({conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0}}),iE=kk({conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0}}),Og=yR({conditions:{defaultCondition:"base",conditionNames:["base","hover","active"],responsiveArray:void 0},styles:{background:{values:{accentColor:{conditions:{base:"ju367v9i",hover:"ju367v9j",active:"ju367v9k"},defaultClass:"ju367v9i"},accentColorForeground:{conditions:{base:"ju367v9l",hover:"ju367v9m",active:"ju367v9n"},defaultClass:"ju367v9l"},actionButtonBorder:{conditions:{base:"ju367v9o",hover:"ju367v9p",active:"ju367v9q"},defaultClass:"ju367v9o"},actionButtonBorderMobile:{conditions:{base:"ju367v9r",hover:"ju367v9s",active:"ju367v9t"},defaultClass:"ju367v9r"},actionButtonSecondaryBackground:{conditions:{base:"ju367v9u",hover:"ju367v9v",active:"ju367v9w"},defaultClass:"ju367v9u"},closeButton:{conditions:{base:"ju367v9x",hover:"ju367v9y",active:"ju367v9z"},defaultClass:"ju367v9x"},closeButtonBackground:{conditions:{base:"ju367va0",hover:"ju367va1",active:"ju367va2"},defaultClass:"ju367va0"},connectButtonBackground:{conditions:{base:"ju367va3",hover:"ju367va4",active:"ju367va5"},defaultClass:"ju367va3"},connectButtonBackgroundError:{conditions:{base:"ju367va6",hover:"ju367va7",active:"ju367va8"},defaultClass:"ju367va6"},connectButtonInnerBackground:{conditions:{base:"ju367va9",hover:"ju367vaa",active:"ju367vab"},defaultClass:"ju367va9"},connectButtonText:{conditions:{base:"ju367vac",hover:"ju367vad",active:"ju367vae"},defaultClass:"ju367vac"},connectButtonTextError:{conditions:{base:"ju367vaf",hover:"ju367vag",active:"ju367vah"},defaultClass:"ju367vaf"},connectionIndicator:{conditions:{base:"ju367vai",hover:"ju367vaj",active:"ju367vak"},defaultClass:"ju367vai"},downloadBottomCardBackground:{conditions:{base:"ju367val",hover:"ju367vam",active:"ju367van"},defaultClass:"ju367val"},downloadTopCardBackground:{conditions:{base:"ju367vao",hover:"ju367vap",active:"ju367vaq"},defaultClass:"ju367vao"},error:{conditions:{base:"ju367var",hover:"ju367vas",active:"ju367vat"},defaultClass:"ju367var"},generalBorder:{conditions:{base:"ju367vau",hover:"ju367vav",active:"ju367vaw"},defaultClass:"ju367vau"},generalBorderDim:{conditions:{base:"ju367vax",hover:"ju367vay",active:"ju367vaz"},defaultClass:"ju367vax"},menuItemBackground:{conditions:{base:"ju367vb0",hover:"ju367vb1",active:"ju367vb2"},defaultClass:"ju367vb0"},modalBackdrop:{conditions:{base:"ju367vb3",hover:"ju367vb4",active:"ju367vb5"},defaultClass:"ju367vb3"},modalBackground:{conditions:{base:"ju367vb6",hover:"ju367vb7",active:"ju367vb8"},defaultClass:"ju367vb6"},modalBorder:{conditions:{base:"ju367vb9",hover:"ju367vba",active:"ju367vbb"},defaultClass:"ju367vb9"},modalText:{conditions:{base:"ju367vbc",hover:"ju367vbd",active:"ju367vbe"},defaultClass:"ju367vbc"},modalTextDim:{conditions:{base:"ju367vbf",hover:"ju367vbg",active:"ju367vbh"},defaultClass:"ju367vbf"},modalTextSecondary:{conditions:{base:"ju367vbi",hover:"ju367vbj",active:"ju367vbk"},defaultClass:"ju367vbi"},profileAction:{conditions:{base:"ju367vbl",hover:"ju367vbm",active:"ju367vbn"},defaultClass:"ju367vbl"},profileActionHover:{conditions:{base:"ju367vbo",hover:"ju367vbp",active:"ju367vbq"},defaultClass:"ju367vbo"},profileForeground:{conditions:{base:"ju367vbr",hover:"ju367vbs",active:"ju367vbt"},defaultClass:"ju367vbr"},selectedOptionBorder:{conditions:{base:"ju367vbu",hover:"ju367vbv",active:"ju367vbw"},defaultClass:"ju367vbu"},standby:{conditions:{base:"ju367vbx",hover:"ju367vby",active:"ju367vbz"},defaultClass:"ju367vbx"}}},borderColor:{values:{accentColor:{conditions:{base:"ju367vc0",hover:"ju367vc1",active:"ju367vc2"},defaultClass:"ju367vc0"},accentColorForeground:{conditions:{base:"ju367vc3",hover:"ju367vc4",active:"ju367vc5"},defaultClass:"ju367vc3"},actionButtonBorder:{conditions:{base:"ju367vc6",hover:"ju367vc7",active:"ju367vc8"},defaultClass:"ju367vc6"},actionButtonBorderMobile:{conditions:{base:"ju367vc9",hover:"ju367vca",active:"ju367vcb"},defaultClass:"ju367vc9"},actionButtonSecondaryBackground:{conditions:{base:"ju367vcc",hover:"ju367vcd",active:"ju367vce"},defaultClass:"ju367vcc"},closeButton:{conditions:{base:"ju367vcf",hover:"ju367vcg",active:"ju367vch"},defaultClass:"ju367vcf"},closeButtonBackground:{conditions:{base:"ju367vci",hover:"ju367vcj",active:"ju367vck"},defaultClass:"ju367vci"},connectButtonBackground:{conditions:{base:"ju367vcl",hover:"ju367vcm",active:"ju367vcn"},defaultClass:"ju367vcl"},connectButtonBackgroundError:{conditions:{base:"ju367vco",hover:"ju367vcp",active:"ju367vcq"},defaultClass:"ju367vco"},connectButtonInnerBackground:{conditions:{base:"ju367vcr",hover:"ju367vcs",active:"ju367vct"},defaultClass:"ju367vcr"},connectButtonText:{conditions:{base:"ju367vcu",hover:"ju367vcv",active:"ju367vcw"},defaultClass:"ju367vcu"},connectButtonTextError:{conditions:{base:"ju367vcx",hover:"ju367vcy",active:"ju367vcz"},defaultClass:"ju367vcx"},connectionIndicator:{conditions:{base:"ju367vd0",hover:"ju367vd1",active:"ju367vd2"},defaultClass:"ju367vd0"},downloadBottomCardBackground:{conditions:{base:"ju367vd3",hover:"ju367vd4",active:"ju367vd5"},defaultClass:"ju367vd3"},downloadTopCardBackground:{conditions:{base:"ju367vd6",hover:"ju367vd7",active:"ju367vd8"},defaultClass:"ju367vd6"},error:{conditions:{base:"ju367vd9",hover:"ju367vda",active:"ju367vdb"},defaultClass:"ju367vd9"},generalBorder:{conditions:{base:"ju367vdc",hover:"ju367vdd",active:"ju367vde"},defaultClass:"ju367vdc"},generalBorderDim:{conditions:{base:"ju367vdf",hover:"ju367vdg",active:"ju367vdh"},defaultClass:"ju367vdf"},menuItemBackground:{conditions:{base:"ju367vdi",hover:"ju367vdj",active:"ju367vdk"},defaultClass:"ju367vdi"},modalBackdrop:{conditions:{base:"ju367vdl",hover:"ju367vdm",active:"ju367vdn"},defaultClass:"ju367vdl"},modalBackground:{conditions:{base:"ju367vdo",hover:"ju367vdp",active:"ju367vdq"},defaultClass:"ju367vdo"},modalBorder:{conditions:{base:"ju367vdr",hover:"ju367vds",active:"ju367vdt"},defaultClass:"ju367vdr"},modalText:{conditions:{base:"ju367vdu",hover:"ju367vdv",active:"ju367vdw"},defaultClass:"ju367vdu"},modalTextDim:{conditions:{base:"ju367vdx",hover:"ju367vdy",active:"ju367vdz"},defaultClass:"ju367vdx"},modalTextSecondary:{conditions:{base:"ju367ve0",hover:"ju367ve1",active:"ju367ve2"},defaultClass:"ju367ve0"},profileAction:{conditions:{base:"ju367ve3",hover:"ju367ve4",active:"ju367ve5"},defaultClass:"ju367ve3"},profileActionHover:{conditions:{base:"ju367ve6",hover:"ju367ve7",active:"ju367ve8"},defaultClass:"ju367ve6"},profileForeground:{conditions:{base:"ju367ve9",hover:"ju367vea",active:"ju367veb"},defaultClass:"ju367ve9"},selectedOptionBorder:{conditions:{base:"ju367vec",hover:"ju367ved",active:"ju367vee"},defaultClass:"ju367vec"},standby:{conditions:{base:"ju367vef",hover:"ju367veg",active:"ju367veh"},defaultClass:"ju367vef"}}},boxShadow:{values:{connectButton:{conditions:{base:"ju367vei",hover:"ju367vej",active:"ju367vek"},defaultClass:"ju367vei"},dialog:{conditions:{base:"ju367vel",hover:"ju367vem",active:"ju367ven"},defaultClass:"ju367vel"},profileDetailsAction:{conditions:{base:"ju367veo",hover:"ju367vep",active:"ju367veq"},defaultClass:"ju367veo"},selectedOption:{conditions:{base:"ju367ver",hover:"ju367ves",active:"ju367vet"},defaultClass:"ju367ver"},selectedWallet:{conditions:{base:"ju367veu",hover:"ju367vev",active:"ju367vew"},defaultClass:"ju367veu"},walletLogo:{conditions:{base:"ju367vex",hover:"ju367vey",active:"ju367vez"},defaultClass:"ju367vex"}}},color:{values:{accentColor:{conditions:{base:"ju367vf0",hover:"ju367vf1",active:"ju367vf2"},defaultClass:"ju367vf0"},accentColorForeground:{conditions:{base:"ju367vf3",hover:"ju367vf4",active:"ju367vf5"},defaultClass:"ju367vf3"},actionButtonBorder:{conditions:{base:"ju367vf6",hover:"ju367vf7",active:"ju367vf8"},defaultClass:"ju367vf6"},actionButtonBorderMobile:{conditions:{base:"ju367vf9",hover:"ju367vfa",active:"ju367vfb"},defaultClass:"ju367vf9"},actionButtonSecondaryBackground:{conditions:{base:"ju367vfc",hover:"ju367vfd",active:"ju367vfe"},defaultClass:"ju367vfc"},closeButton:{conditions:{base:"ju367vff",hover:"ju367vfg",active:"ju367vfh"},defaultClass:"ju367vff"},closeButtonBackground:{conditions:{base:"ju367vfi",hover:"ju367vfj",active:"ju367vfk"},defaultClass:"ju367vfi"},connectButtonBackground:{conditions:{base:"ju367vfl",hover:"ju367vfm",active:"ju367vfn"},defaultClass:"ju367vfl"},connectButtonBackgroundError:{conditions:{base:"ju367vfo",hover:"ju367vfp",active:"ju367vfq"},defaultClass:"ju367vfo"},connectButtonInnerBackground:{conditions:{base:"ju367vfr",hover:"ju367vfs",active:"ju367vft"},defaultClass:"ju367vfr"},connectButtonText:{conditions:{base:"ju367vfu",hover:"ju367vfv",active:"ju367vfw"},defaultClass:"ju367vfu"},connectButtonTextError:{conditions:{base:"ju367vfx",hover:"ju367vfy",active:"ju367vfz"},defaultClass:"ju367vfx"},connectionIndicator:{conditions:{base:"ju367vg0",hover:"ju367vg1",active:"ju367vg2"},defaultClass:"ju367vg0"},downloadBottomCardBackground:{conditions:{base:"ju367vg3",hover:"ju367vg4",active:"ju367vg5"},defaultClass:"ju367vg3"},downloadTopCardBackground:{conditions:{base:"ju367vg6",hover:"ju367vg7",active:"ju367vg8"},defaultClass:"ju367vg6"},error:{conditions:{base:"ju367vg9",hover:"ju367vga",active:"ju367vgb"},defaultClass:"ju367vg9"},generalBorder:{conditions:{base:"ju367vgc",hover:"ju367vgd",active:"ju367vge"},defaultClass:"ju367vgc"},generalBorderDim:{conditions:{base:"ju367vgf",hover:"ju367vgg",active:"ju367vgh"},defaultClass:"ju367vgf"},menuItemBackground:{conditions:{base:"ju367vgi",hover:"ju367vgj",active:"ju367vgk"},defaultClass:"ju367vgi"},modalBackdrop:{conditions:{base:"ju367vgl",hover:"ju367vgm",active:"ju367vgn"},defaultClass:"ju367vgl"},modalBackground:{conditions:{base:"ju367vgo",hover:"ju367vgp",active:"ju367vgq"},defaultClass:"ju367vgo"},modalBorder:{conditions:{base:"ju367vgr",hover:"ju367vgs",active:"ju367vgt"},defaultClass:"ju367vgr"},modalText:{conditions:{base:"ju367vgu",hover:"ju367vgv",active:"ju367vgw"},defaultClass:"ju367vgu"},modalTextDim:{conditions:{base:"ju367vgx",hover:"ju367vgy",active:"ju367vgz"},defaultClass:"ju367vgx"},modalTextSecondary:{conditions:{base:"ju367vh0",hover:"ju367vh1",active:"ju367vh2"},defaultClass:"ju367vh0"},profileAction:{conditions:{base:"ju367vh3",hover:"ju367vh4",active:"ju367vh5"},defaultClass:"ju367vh3"},profileActionHover:{conditions:{base:"ju367vh6",hover:"ju367vh7",active:"ju367vh8"},defaultClass:"ju367vh6"},profileForeground:{conditions:{base:"ju367vh9",hover:"ju367vha",active:"ju367vhb"},defaultClass:"ju367vh9"},selectedOptionBorder:{conditions:{base:"ju367vhc",hover:"ju367vhd",active:"ju367vhe"},defaultClass:"ju367vhc"},standby:{conditions:{base:"ju367vhf",hover:"ju367vhg",active:"ju367vhh"},defaultClass:"ju367vhf"}}}}},{conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0},styles:{alignItems:{values:{"flex-start":{conditions:{smallScreen:"ju367v0",largeScreen:"ju367v1"},defaultClass:"ju367v0"},"flex-end":{conditions:{smallScreen:"ju367v2",largeScreen:"ju367v3"},defaultClass:"ju367v2"},center:{conditions:{smallScreen:"ju367v4",largeScreen:"ju367v5"},defaultClass:"ju367v4"}}},display:{values:{none:{conditions:{smallScreen:"ju367v6",largeScreen:"ju367v7"},defaultClass:"ju367v6"},block:{conditions:{smallScreen:"ju367v8",largeScreen:"ju367v9"},defaultClass:"ju367v8"},flex:{conditions:{smallScreen:"ju367va",largeScreen:"ju367vb"},defaultClass:"ju367va"},inline:{conditions:{smallScreen:"ju367vc",largeScreen:"ju367vd"},defaultClass:"ju367vc"}}}}},{conditions:void 0,styles:{margin:{mappings:["marginTop","marginBottom","marginLeft","marginRight"]},marginX:{mappings:["marginLeft","marginRight"]},marginY:{mappings:["marginTop","marginBottom"]},padding:{mappings:["paddingTop","paddingBottom","paddingLeft","paddingRight"]},paddingX:{mappings:["paddingLeft","paddingRight"]},paddingY:{mappings:["paddingTop","paddingBottom"]},alignSelf:{values:{"flex-start":{defaultClass:"ju367ve"},"flex-end":{defaultClass:"ju367vf"},center:{defaultClass:"ju367vg"}}},backgroundSize:{values:{cover:{defaultClass:"ju367vh"}}},borderRadius:{values:{1:{defaultClass:"ju367vi"},6:{defaultClass:"ju367vj"},10:{defaultClass:"ju367vk"},13:{defaultClass:"ju367vl"},actionButton:{defaultClass:"ju367vm"},connectButton:{defaultClass:"ju367vn"},menuButton:{defaultClass:"ju367vo"},modal:{defaultClass:"ju367vp"},modalMobile:{defaultClass:"ju367vq"},"25%":{defaultClass:"ju367vr"},full:{defaultClass:"ju367vs"}}},borderStyle:{values:{solid:{defaultClass:"ju367vt"}}},borderWidth:{values:{0:{defaultClass:"ju367vu"},1:{defaultClass:"ju367vv"},2:{defaultClass:"ju367vw"},4:{defaultClass:"ju367vx"}}},cursor:{values:{pointer:{defaultClass:"ju367vy"},none:{defaultClass:"ju367vz"}}},pointerEvents:{values:{none:{defaultClass:"ju367v10"},all:{defaultClass:"ju367v11"}}},minHeight:{values:{8:{defaultClass:"ju367v12"},44:{defaultClass:"ju367v13"}}},flexDirection:{values:{row:{defaultClass:"ju367v14"},column:{defaultClass:"ju367v15"}}},fontFamily:{values:{body:{defaultClass:"ju367v16"}}},fontSize:{values:{12:{defaultClass:"ju367v17"},13:{defaultClass:"ju367v18"},14:{defaultClass:"ju367v19"},16:{defaultClass:"ju367v1a"},18:{defaultClass:"ju367v1b"},20:{defaultClass:"ju367v1c"},23:{defaultClass:"ju367v1d"}}},fontWeight:{values:{regular:{defaultClass:"ju367v1e"},medium:{defaultClass:"ju367v1f"},semibold:{defaultClass:"ju367v1g"},bold:{defaultClass:"ju367v1h"},heavy:{defaultClass:"ju367v1i"}}},gap:{values:{0:{defaultClass:"ju367v1j"},1:{defaultClass:"ju367v1k"},2:{defaultClass:"ju367v1l"},3:{defaultClass:"ju367v1m"},4:{defaultClass:"ju367v1n"},5:{defaultClass:"ju367v1o"},6:{defaultClass:"ju367v1p"},8:{defaultClass:"ju367v1q"},10:{defaultClass:"ju367v1r"},12:{defaultClass:"ju367v1s"},14:{defaultClass:"ju367v1t"},16:{defaultClass:"ju367v1u"},18:{defaultClass:"ju367v1v"},20:{defaultClass:"ju367v1w"},24:{defaultClass:"ju367v1x"},28:{defaultClass:"ju367v1y"},32:{defaultClass:"ju367v1z"},36:{defaultClass:"ju367v20"},44:{defaultClass:"ju367v21"},64:{defaultClass:"ju367v22"},"-1":{defaultClass:"ju367v23"}}},height:{values:{1:{defaultClass:"ju367v24"},2:{defaultClass:"ju367v25"},4:{defaultClass:"ju367v26"},8:{defaultClass:"ju367v27"},12:{defaultClass:"ju367v28"},20:{defaultClass:"ju367v29"},24:{defaultClass:"ju367v2a"},28:{defaultClass:"ju367v2b"},30:{defaultClass:"ju367v2c"},32:{defaultClass:"ju367v2d"},34:{defaultClass:"ju367v2e"},36:{defaultClass:"ju367v2f"},40:{defaultClass:"ju367v2g"},44:{defaultClass:"ju367v2h"},48:{defaultClass:"ju367v2i"},54:{defaultClass:"ju367v2j"},60:{defaultClass:"ju367v2k"},200:{defaultClass:"ju367v2l"},full:{defaultClass:"ju367v2m"},max:{defaultClass:"ju367v2n"}}},justifyContent:{values:{"flex-start":{defaultClass:"ju367v2o"},"flex-end":{defaultClass:"ju367v2p"},center:{defaultClass:"ju367v2q"},"space-between":{defaultClass:"ju367v2r"},"space-around":{defaultClass:"ju367v2s"}}},textAlign:{values:{left:{defaultClass:"ju367v2t"},center:{defaultClass:"ju367v2u"},inherit:{defaultClass:"ju367v2v"}}},marginBottom:{values:{0:{defaultClass:"ju367v2w"},1:{defaultClass:"ju367v2x"},2:{defaultClass:"ju367v2y"},3:{defaultClass:"ju367v2z"},4:{defaultClass:"ju367v30"},5:{defaultClass:"ju367v31"},6:{defaultClass:"ju367v32"},8:{defaultClass:"ju367v33"},10:{defaultClass:"ju367v34"},12:{defaultClass:"ju367v35"},14:{defaultClass:"ju367v36"},16:{defaultClass:"ju367v37"},18:{defaultClass:"ju367v38"},20:{defaultClass:"ju367v39"},24:{defaultClass:"ju367v3a"},28:{defaultClass:"ju367v3b"},32:{defaultClass:"ju367v3c"},36:{defaultClass:"ju367v3d"},44:{defaultClass:"ju367v3e"},64:{defaultClass:"ju367v3f"},"-1":{defaultClass:"ju367v3g"}}},marginLeft:{values:{0:{defaultClass:"ju367v3h"},1:{defaultClass:"ju367v3i"},2:{defaultClass:"ju367v3j"},3:{defaultClass:"ju367v3k"},4:{defaultClass:"ju367v3l"},5:{defaultClass:"ju367v3m"},6:{defaultClass:"ju367v3n"},8:{defaultClass:"ju367v3o"},10:{defaultClass:"ju367v3p"},12:{defaultClass:"ju367v3q"},14:{defaultClass:"ju367v3r"},16:{defaultClass:"ju367v3s"},18:{defaultClass:"ju367v3t"},20:{defaultClass:"ju367v3u"},24:{defaultClass:"ju367v3v"},28:{defaultClass:"ju367v3w"},32:{defaultClass:"ju367v3x"},36:{defaultClass:"ju367v3y"},44:{defaultClass:"ju367v3z"},64:{defaultClass:"ju367v40"},"-1":{defaultClass:"ju367v41"}}},marginRight:{values:{0:{defaultClass:"ju367v42"},1:{defaultClass:"ju367v43"},2:{defaultClass:"ju367v44"},3:{defaultClass:"ju367v45"},4:{defaultClass:"ju367v46"},5:{defaultClass:"ju367v47"},6:{defaultClass:"ju367v48"},8:{defaultClass:"ju367v49"},10:{defaultClass:"ju367v4a"},12:{defaultClass:"ju367v4b"},14:{defaultClass:"ju367v4c"},16:{defaultClass:"ju367v4d"},18:{defaultClass:"ju367v4e"},20:{defaultClass:"ju367v4f"},24:{defaultClass:"ju367v4g"},28:{defaultClass:"ju367v4h"},32:{defaultClass:"ju367v4i"},36:{defaultClass:"ju367v4j"},44:{defaultClass:"ju367v4k"},64:{defaultClass:"ju367v4l"},"-1":{defaultClass:"ju367v4m"}}},marginTop:{values:{0:{defaultClass:"ju367v4n"},1:{defaultClass:"ju367v4o"},2:{defaultClass:"ju367v4p"},3:{defaultClass:"ju367v4q"},4:{defaultClass:"ju367v4r"},5:{defaultClass:"ju367v4s"},6:{defaultClass:"ju367v4t"},8:{defaultClass:"ju367v4u"},10:{defaultClass:"ju367v4v"},12:{defaultClass:"ju367v4w"},14:{defaultClass:"ju367v4x"},16:{defaultClass:"ju367v4y"},18:{defaultClass:"ju367v4z"},20:{defaultClass:"ju367v50"},24:{defaultClass:"ju367v51"},28:{defaultClass:"ju367v52"},32:{defaultClass:"ju367v53"},36:{defaultClass:"ju367v54"},44:{defaultClass:"ju367v55"},64:{defaultClass:"ju367v56"},"-1":{defaultClass:"ju367v57"}}},maxWidth:{values:{1:{defaultClass:"ju367v58"},2:{defaultClass:"ju367v59"},4:{defaultClass:"ju367v5a"},8:{defaultClass:"ju367v5b"},12:{defaultClass:"ju367v5c"},20:{defaultClass:"ju367v5d"},24:{defaultClass:"ju367v5e"},28:{defaultClass:"ju367v5f"},30:{defaultClass:"ju367v5g"},32:{defaultClass:"ju367v5h"},34:{defaultClass:"ju367v5i"},36:{defaultClass:"ju367v5j"},40:{defaultClass:"ju367v5k"},44:{defaultClass:"ju367v5l"},48:{defaultClass:"ju367v5m"},54:{defaultClass:"ju367v5n"},60:{defaultClass:"ju367v5o"},200:{defaultClass:"ju367v5p"},full:{defaultClass:"ju367v5q"},max:{defaultClass:"ju367v5r"}}},minWidth:{values:{1:{defaultClass:"ju367v5s"},2:{defaultClass:"ju367v5t"},4:{defaultClass:"ju367v5u"},8:{defaultClass:"ju367v5v"},12:{defaultClass:"ju367v5w"},20:{defaultClass:"ju367v5x"},24:{defaultClass:"ju367v5y"},28:{defaultClass:"ju367v5z"},30:{defaultClass:"ju367v60"},32:{defaultClass:"ju367v61"},34:{defaultClass:"ju367v62"},36:{defaultClass:"ju367v63"},40:{defaultClass:"ju367v64"},44:{defaultClass:"ju367v65"},48:{defaultClass:"ju367v66"},54:{defaultClass:"ju367v67"},60:{defaultClass:"ju367v68"},200:{defaultClass:"ju367v69"},full:{defaultClass:"ju367v6a"},max:{defaultClass:"ju367v6b"}}},overflow:{values:{hidden:{defaultClass:"ju367v6c"}}},paddingBottom:{values:{0:{defaultClass:"ju367v6d"},1:{defaultClass:"ju367v6e"},2:{defaultClass:"ju367v6f"},3:{defaultClass:"ju367v6g"},4:{defaultClass:"ju367v6h"},5:{defaultClass:"ju367v6i"},6:{defaultClass:"ju367v6j"},8:{defaultClass:"ju367v6k"},10:{defaultClass:"ju367v6l"},12:{defaultClass:"ju367v6m"},14:{defaultClass:"ju367v6n"},16:{defaultClass:"ju367v6o"},18:{defaultClass:"ju367v6p"},20:{defaultClass:"ju367v6q"},24:{defaultClass:"ju367v6r"},28:{defaultClass:"ju367v6s"},32:{defaultClass:"ju367v6t"},36:{defaultClass:"ju367v6u"},44:{defaultClass:"ju367v6v"},64:{defaultClass:"ju367v6w"},"-1":{defaultClass:"ju367v6x"}}},paddingLeft:{values:{0:{defaultClass:"ju367v6y"},1:{defaultClass:"ju367v6z"},2:{defaultClass:"ju367v70"},3:{defaultClass:"ju367v71"},4:{defaultClass:"ju367v72"},5:{defaultClass:"ju367v73"},6:{defaultClass:"ju367v74"},8:{defaultClass:"ju367v75"},10:{defaultClass:"ju367v76"},12:{defaultClass:"ju367v77"},14:{defaultClass:"ju367v78"},16:{defaultClass:"ju367v79"},18:{defaultClass:"ju367v7a"},20:{defaultClass:"ju367v7b"},24:{defaultClass:"ju367v7c"},28:{defaultClass:"ju367v7d"},32:{defaultClass:"ju367v7e"},36:{defaultClass:"ju367v7f"},44:{defaultClass:"ju367v7g"},64:{defaultClass:"ju367v7h"},"-1":{defaultClass:"ju367v7i"}}},paddingRight:{values:{0:{defaultClass:"ju367v7j"},1:{defaultClass:"ju367v7k"},2:{defaultClass:"ju367v7l"},3:{defaultClass:"ju367v7m"},4:{defaultClass:"ju367v7n"},5:{defaultClass:"ju367v7o"},6:{defaultClass:"ju367v7p"},8:{defaultClass:"ju367v7q"},10:{defaultClass:"ju367v7r"},12:{defaultClass:"ju367v7s"},14:{defaultClass:"ju367v7t"},16:{defaultClass:"ju367v7u"},18:{defaultClass:"ju367v7v"},20:{defaultClass:"ju367v7w"},24:{defaultClass:"ju367v7x"},28:{defaultClass:"ju367v7y"},32:{defaultClass:"ju367v7z"},36:{defaultClass:"ju367v80"},44:{defaultClass:"ju367v81"},64:{defaultClass:"ju367v82"},"-1":{defaultClass:"ju367v83"}}},paddingTop:{values:{0:{defaultClass:"ju367v84"},1:{defaultClass:"ju367v85"},2:{defaultClass:"ju367v86"},3:{defaultClass:"ju367v87"},4:{defaultClass:"ju367v88"},5:{defaultClass:"ju367v89"},6:{defaultClass:"ju367v8a"},8:{defaultClass:"ju367v8b"},10:{defaultClass:"ju367v8c"},12:{defaultClass:"ju367v8d"},14:{defaultClass:"ju367v8e"},16:{defaultClass:"ju367v8f"},18:{defaultClass:"ju367v8g"},20:{defaultClass:"ju367v8h"},24:{defaultClass:"ju367v8i"},28:{defaultClass:"ju367v8j"},32:{defaultClass:"ju367v8k"},36:{defaultClass:"ju367v8l"},44:{defaultClass:"ju367v8m"},64:{defaultClass:"ju367v8n"},"-1":{defaultClass:"ju367v8o"}}},position:{values:{absolute:{defaultClass:"ju367v8p"},fixed:{defaultClass:"ju367v8q"},relative:{defaultClass:"ju367v8r"}}},WebkitUserSelect:{values:{none:{defaultClass:"ju367v8s"}}},right:{values:{0:{defaultClass:"ju367v8t"}}},transition:{values:{default:{defaultClass:"ju367v8u"},transform:{defaultClass:"ju367v8v"}}},userSelect:{values:{none:{defaultClass:"ju367v8w"}}},width:{values:{1:{defaultClass:"ju367v8x"},2:{defaultClass:"ju367v8y"},4:{defaultClass:"ju367v8z"},8:{defaultClass:"ju367v90"},12:{defaultClass:"ju367v91"},20:{defaultClass:"ju367v92"},24:{defaultClass:"ju367v93"},28:{defaultClass:"ju367v94"},30:{defaultClass:"ju367v95"},32:{defaultClass:"ju367v96"},34:{defaultClass:"ju367v97"},36:{defaultClass:"ju367v98"},40:{defaultClass:"ju367v99"},44:{defaultClass:"ju367v9a"},48:{defaultClass:"ju367v9b"},54:{defaultClass:"ju367v9c"},60:{defaultClass:"ju367v9d"},200:{defaultClass:"ju367v9e"},full:{defaultClass:"ju367v9f"},max:{defaultClass:"ju367v9g"}}},backdropFilter:{values:{modalOverlay:{defaultClass:"ju367v9h"}}}}}),Jx={colors:{accentColor:"var(--rk-colors-accentColor)",accentColorForeground:"var(--rk-colors-accentColorForeground)",actionButtonBorder:"var(--rk-colors-actionButtonBorder)",actionButtonBorderMobile:"var(--rk-colors-actionButtonBorderMobile)",actionButtonSecondaryBackground:"var(--rk-colors-actionButtonSecondaryBackground)",closeButton:"var(--rk-colors-closeButton)",closeButtonBackground:"var(--rk-colors-closeButtonBackground)",connectButtonBackground:"var(--rk-colors-connectButtonBackground)",connectButtonBackgroundError:"var(--rk-colors-connectButtonBackgroundError)",connectButtonInnerBackground:"var(--rk-colors-connectButtonInnerBackground)",connectButtonText:"var(--rk-colors-connectButtonText)",connectButtonTextError:"var(--rk-colors-connectButtonTextError)",connectionIndicator:"var(--rk-colors-connectionIndicator)",downloadBottomCardBackground:"var(--rk-colors-downloadBottomCardBackground)",downloadTopCardBackground:"var(--rk-colors-downloadTopCardBackground)",error:"var(--rk-colors-error)",generalBorder:"var(--rk-colors-generalBorder)",generalBorderDim:"var(--rk-colors-generalBorderDim)",menuItemBackground:"var(--rk-colors-menuItemBackground)",modalBackdrop:"var(--rk-colors-modalBackdrop)",modalBackground:"var(--rk-colors-modalBackground)",modalBorder:"var(--rk-colors-modalBorder)",modalText:"var(--rk-colors-modalText)",modalTextDim:"var(--rk-colors-modalTextDim)",modalTextSecondary:"var(--rk-colors-modalTextSecondary)",profileAction:"var(--rk-colors-profileAction)",profileActionHover:"var(--rk-colors-profileActionHover)",profileForeground:"var(--rk-colors-profileForeground)",selectedOptionBorder:"var(--rk-colors-selectedOptionBorder)",standby:"var(--rk-colors-standby)"},fonts:{body:"var(--rk-fonts-body)"},radii:{actionButton:"var(--rk-radii-actionButton)",connectButton:"var(--rk-radii-connectButton)",menuButton:"var(--rk-radii-menuButton)",modal:"var(--rk-radii-modal)",modalMobile:"var(--rk-radii-modalMobile)"},shadows:{connectButton:"var(--rk-shadows-connectButton)",dialog:"var(--rk-shadows-dialog)",profileDetailsAction:"var(--rk-shadows-profileDetailsAction)",selectedOption:"var(--rk-shadows-selectedOption)",selectedWallet:"var(--rk-shadows-selectedWallet)",walletLogo:"var(--rk-shadows-walletLogo)"},blurs:{modalOverlay:"var(--rk-blurs-modalOverlay)"}},nM={shrink:"_12cbo8i6",shrinkSm:"_12cbo8i7"},rM="_12cbo8i3 ju367v8r",oM={grow:"_12cbo8i4",growLg:"_12cbo8i5"};function wt({active:e,hover:t}){return[rM,t&&oM[t],nM[e]]}var aE=P.createContext(null);function sM(){const{adapter:e}=P.useContext(aE)??{};if(!e)throw new Error("No authentication adapter found");return e}function gh(){const e=P.useContext(aE);return(e==null?void 0:e.status)??null}function x1(){const e=gh(),{isConnected:t}=zt();return t?e&&(e==="loading"||e==="unauthenticated")?e:"connected":"disconnected"}function lE(){return typeof navigator<"u"&&/android/i.test(navigator.userAgent)}function iM(){return typeof navigator<"u"&&/iPhone|iPod/.test(navigator.userAgent)}function aM(){return typeof navigator<"u"&&(/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)}function ku(){return iM()||aM()}function bt(){return lE()||ku()}var lM="iekbcc0",cM={a:"iekbcca",blockquote:"iekbcc2",button:"iekbcc9",input:"iekbcc8 iekbcc5 iekbcc4",mark:"iekbcc6",ol:"iekbcc1",q:"iekbcc2",select:"iekbcc7 iekbcc5 iekbcc4",table:"iekbcc3",textarea:"iekbcc5 iekbcc4",ul:"iekbcc1"},uM=({reset:e,...t})=>{if(!e)return Og(t);const n=cM[e],r=Og(t);return Ak(lM,n,r)},$=E.forwardRef(({as:e="div",className:t,testId:n,...r},o)=>{const i={},l={};for(const u in r)Og.properties.has(u)?i[u]=r[u]:l[u]=r[u];const c=uM({reset:typeof e=="string"?e:"div",...i});return E.createElement(e,{className:Ak(c,t),...l,"data-testid":n?`rk-${n.replace(/^rk-/,"")}`:void 0,ref:o})});$.displayName="Box";var cE=new Map,tm=new Map;async function uE(e){const t=tm.get(e);if(t)return t;const n=async()=>e().then(async o=>(cE.set(e,o),o)),r=n().catch(o=>n().catch(i=>{tm.delete(e)}));return tm.set(e,r),r}async function Gr(...e){return await Promise.all(e.map(t=>typeof t=="function"?uE(t):t))}function dM(){const[,e]=P.useReducer(t=>t+1,0);return e}function yh(e){const t=typeof e=="function"?cE.get(e):void 0,n=dM();return P.useEffect(()=>{typeof e=="function"&&!t&&uE(e).then(n)},[e,t,n]),typeof e=="function"?t:e}function Rt({alt:e,background:t,borderColor:n,borderRadius:r,useAsImage:o,boxShadow:i,height:l,src:c,width:u,testId:p}){const f=ku(),m=yh(c),g=m&&/^http/.test(m),[v,w]=P.useReducer(()=>!0,!1);return E.createElement($,{"aria-label":e,borderRadius:r,boxShadow:i,height:typeof l=="string"?l:void 0,overflow:"hidden",position:"relative",role:"img",style:{background:t,height:typeof l=="number"?l:void 0,width:typeof u=="number"?u:void 0},width:typeof u=="string"?u:void 0,testId:p},E.createElement($,{...g?{"aria-hidden":!0,as:"img",onLoad:w,src:m}:{"aria-hidden":!0,as:"img",src:m},height:"full",position:"absolute",...f?{WebkitUserSelect:"none"}:{},style:{WebkitTouchCallout:"none",transition:"opacity .15s linear",userSelect:"none",...!o&&g?{opacity:v?1:0}:{}},width:"full"}),n?E.createElement($,{...typeof n=="object"&&"custom"in n?{style:{borderColor:n.custom}}:{borderColor:n},borderRadius:r,borderStyle:"solid",borderWidth:"1",height:"full",position:"relative",width:"full"}):null)}var fM="_1luule42",hM="_1luule43",pM=e=>P.useMemo(()=>`${e}_${Math.round(Math.random()*1e9)}`,[e]),Gc=({height:e=21,width:t=21})=>{const n=pM("spinner");return E.createElement("svg",{className:fM,fill:"none",height:e,viewBox:"0 0 21 21",width:t,xmlns:"http://www.w3.org/2000/svg"},E.createElement("title",null,"Loading"),E.createElement("clipPath",{id:n},E.createElement("path",{d:"M10.5 3C6.35786 3 3 6.35786 3 10.5C3 14.6421 6.35786 18 10.5 18C11.3284 18 12 18.6716 12 19.5C12 20.3284 11.3284 21 10.5 21C4.70101 21 0 16.299 0 10.5C0 4.70101 4.70101 0 10.5 0C16.299 0 21 4.70101 21 10.5C21 11.3284 20.3284 12 19.5 12C18.6716 12 18 11.3284 18 10.5C18 6.35786 14.6421 3 10.5 3Z"})),E.createElement("foreignObject",{clipPath:`url(#${n})`,height:"21",width:"21",x:"0",y:"0"},E.createElement("div",{className:hM})))},Ue=["#FC5C54","#FFD95A","#E95D72","#6A87C8","#5FD0F3","#75C06B","#FFDD86","#5FC6D4","#FF949A","#FF8024","#9BA1A4","#EC66FF","#FF8CBC","#FF9A23","#C5DADB","#A8CE63","#71ABFF","#FFE279","#B6B1B6","#FF6780","#A575FF","#4D82FF","#FFB35A"],Zx=[{color:Ue[0],emoji:"🌶"},{color:Ue[1],emoji:"🤑"},{color:Ue[2],emoji:"🐙"},{color:Ue[3],emoji:"🫐"},{color:Ue[4],emoji:"🐳"},{color:Ue[0],emoji:"🤶"},{color:Ue[5],emoji:"🌲"},{color:Ue[6],emoji:"🌞"},{color:Ue[7],emoji:"🐒"},{color:Ue[8],emoji:"🐵"},{color:Ue[9],emoji:"🦊"},{color:Ue[10],emoji:"🐼"},{color:Ue[11],emoji:"🦄"},{color:Ue[12],emoji:"🐷"},{color:Ue[13],emoji:"🐧"},{color:Ue[8],emoji:"🦩"},{color:Ue[14],emoji:"👽"},{color:Ue[0],emoji:"🎈"},{color:Ue[8],emoji:"🍉"},{color:Ue[1],emoji:"🎉"},{color:Ue[15],emoji:"🐲"},{color:Ue[16],emoji:"🌎"},{color:Ue[17],emoji:"🍊"},{color:Ue[18],emoji:"🐭"},{color:Ue[19],emoji:"🍣"},{color:Ue[1],emoji:"🐥"},{color:Ue[20],emoji:"👾"},{color:Ue[15],emoji:"🥦"},{color:Ue[0],emoji:"👹"},{color:Ue[17],emoji:"🙀"},{color:Ue[4],emoji:"⛱"},{color:Ue[21],emoji:"⛵️"},{color:Ue[17],emoji:"🥳"},{color:Ue[8],emoji:"🤯"},{color:Ue[22],emoji:"🤠"}];function mM(e){let t=0;if(e.length===0)return t;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=(t<<5)-t+r,t|=0}return t}function gM(e){const n=Math.abs(mM((typeof e=="string"?e:"").toLowerCase())%Zx.length);return Zx[n??0]}var yM=({address:e,ensImage:t,size:n})=>{const[r,o]=P.useState(!1);P.useEffect(()=>{if(t){const c=new Image;c.src=t,c.onload=()=>o(!0)}},[t]);const{color:i,emoji:l}=P.useMemo(()=>gM(e),[e]);return t?r?E.createElement($,{backgroundSize:"cover",borderRadius:"full",position:"absolute",style:{backgroundImage:`url(${t})`,backgroundPosition:"center",height:n,width:n}}):E.createElement($,{alignItems:"center",backgroundSize:"cover",borderRadius:"full",color:"modalText",display:"flex",justifyContent:"center",position:"absolute",style:{height:n,width:n}},E.createElement(Gc,null)):E.createElement($,{alignItems:"center",display:"flex",justifyContent:"center",overflow:"hidden",style:{...!t&&{backgroundColor:i},height:n,width:n}},l)},dE=yM,fE=P.createContext(dE);function hE({address:e,imageUrl:t,loading:n,size:r}){const o=P.useContext(fE);return E.createElement($,{"aria-hidden":!0,borderRadius:"full",overflow:"hidden",position:"relative",style:{height:`${r}px`,width:`${r}px`},userSelect:"none"},E.createElement($,{alignItems:"center",borderRadius:"full",display:"flex",justifyContent:"center",overflow:"hidden",position:"absolute",style:{fontSize:`${Math.round(r*.55)}px`,height:`${r}px`,transform:n?"scale(0.72)":void 0,transition:".25s ease",transitionDelay:n?void 0:".1s",width:`${r}px`,willChange:"transform"},userSelect:"none"},E.createElement(o,{address:e,ensImage:t,size:r})),n&&E.createElement($,{color:"accentColor",display:"flex",height:"full",position:"absolute",width:"full"},E.createElement(Gc,{height:"100%",width:"100%"})))}var Xx=()=>E.createElement("svg",{fill:"none",height:"7",width:"14",xmlns:"http://www.w3.org/2000/svg"},E.createElement("title",null,"Dropdown"),E.createElement("path",{d:"M12.75 1.54001L8.51647 5.0038C7.77974 5.60658 6.72026 5.60658 5.98352 5.0038L1.75 1.54001",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.5",xmlns:"http://www.w3.org/2000/svg"})),e2={defaultLocale:"en",locale:"en"},vM=class{constructor(e){this.listeners=new Set,this.defaultLocale=e2.defaultLocale,this.enableFallback=!1,this.locale=e2.locale,this.cachedLocales=[],this.translations={};for(const[t,n]of Object.entries(e))this.cachedLocales=[...this.cachedLocales,t],this.translations={...this.translations,...this.flattenTranslation(n,t)}}missingMessage(e){return`[missing: "${this.locale}.${e}" translation]`}flattenTranslation(e,t){const n={},r=(o,i)=>{for(const l of Object.keys(o)){const c=`${i}.${l}`,u=o[l];typeof u=="object"&&u!==null?r(u,c):n[c]=u}};return r(e,t),n}translateWithReplacements(e,t={}){let n=e;for(const r in t){const o=t[r];n=n.replace(`%{${r}}`,o)}return n}t(e,t,n){const r=`${this.locale}.${e}`,o=this.translations[r];if(!o){if(this.enableFallback){const i=`${this.defaultLocale}.${e}`,l=this.translations[i];if(l)return this.translateWithReplacements(l,t)}return n!=null&&n.rawKeyIfTranslationMissing?e:this.missingMessage(e)}return this.translateWithReplacements(o,t)}isLocaleCached(e){return this.cachedLocales.includes(e)}updateLocale(e){this.locale=e,this.notifyListeners()}setTranslations(e,t){this.isLocaleCached(e)||(this.cachedLocales=[...this.cachedLocales,e],this.translations={...this.translations,...this.flattenTranslation(t,e)}),this.locale=e,this.notifyListeners()}notifyListeners(){for(const e of this.listeners)e()}onChange(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}},sr=new vM({en:JSON.parse(Ig),"en-US":JSON.parse(Ig)});sr.defaultLocale="en-US";sr.locale="en-US";sr.enableFallback=!0;var wM=async e=>{switch(e){case"ar":case"ar-AR":return(await fe(async()=>{const{default:t}=await import("./ar_AR-44JUQ6EW-BMX-am0v.js");return{default:t}},[])).default;case"de":case"de-DE":return(await fe(async()=>{const{default:t}=await import("./de_DE-PYAO5YD6-BWlqPWgO.js");return{default:t}},[])).default;case"en":case"en-US":return(await fe(async()=>{const{default:t}=await Promise.resolve().then(()=>Q2);return{default:t}},void 0)).default;case"es":case"es-419":return(await fe(async()=>{const{default:t}=await import("./es_419-HRGOJ6VT-D-qzxUM-.js");return{default:t}},[])).default;case"fr":case"fr-FR":return(await fe(async()=>{const{default:t}=await import("./fr_FR-IGGVC6RM-D8LpUM75.js");return{default:t}},[])).default;case"hi":case"hi-IN":return(await fe(async()=>{const{default:t}=await import("./hi_IN-XSKAA3MF-C3QUpWyP.js");return{default:t}},[])).default;case"id":case"id-ID":return(await fe(async()=>{const{default:t}=await import("./id_ID-KUOB4UAL-K9y-nRWm.js");return{default:t}},[])).default;case"ja":case"ja-JP":return(await fe(async()=>{const{default:t}=await import("./ja_JP-4WRQ63RX-Ct5pF4ug.js");return{default:t}},[])).default;case"ko":case"ko-KR":return(await fe(async()=>{const{default:t}=await import("./ko_KR-I2K7AIEP-B5gw8Mwb.js");return{default:t}},[])).default;case"ms":case"ms-MY":return(await fe(async()=>{const{default:t}=await import("./ms_MY-6VZW6Q3Z-BtFD07hR.js");return{default:t}},[])).default;case"pt":case"pt-BR":return(await fe(async()=>{const{default:t}=await import("./pt_BR-N3XOZ4SV-CvVpfsHb.js");return{default:t}},[])).default;case"ru":case"ru-RU":return(await fe(async()=>{const{default:t}=await import("./ru_RU-IITAPRET-DOj6Jzj7.js");return{default:t}},[])).default;case"th":case"th-TH":return(await fe(async()=>{const{default:t}=await import("./th_TH-3ZQCKCQE-BcHUN2Q4.js");return{default:t}},[])).default;case"tr":case"tr-TR":return(await fe(async()=>{const{default:t}=await import("./tr_TR-QUPUGMUF-CwpF6ZFn.js");return{default:t}},[])).default;case"ua":case"uk-UA":return(await fe(async()=>{const{default:t}=await import("./uk_UA-SSN6SV5E-IlYYyRC6.js");return{default:t}},[])).default;case"vi":case"vi-VN":return(await fe(async()=>{const{default:t}=await import("./vi_VN-7BUVRNYY-CZ9S75qZ.js");return{default:t}},[])).default;case"zh":case"zh-CN":case"zh-Hans":return(await fe(async()=>{const{default:t}=await import("./zh_CN-HJBN674C-Baf0GEeT.js");return{default:t}},[])).default;case"zh-HK":return(await fe(async()=>{const{default:t}=await import("./zh_HK-JW3WLRKE-VztJKXL5.js");return{default:t}},[])).default;case"zh-Hant":case"zh-TW":return(await fe(async()=>{const{default:t}=await import("./zh_TW-VNNRNXY7-aWfg7Qp4.js");return{default:t}},[])).default;default:return(await fe(async()=>{const{default:t}=await Promise.resolve().then(()=>Q2);return{default:t}},void 0)).default}};async function t2(e){if(sr.isLocaleCached(e)){sr.updateLocale(e);return}const n=await wM(e);sr.setTranslations(e,JSON.parse(n))}var bM=()=>{var e;if(typeof window<"u"&&typeof navigator<"u"){if((e=navigator.languages)!=null&&e.length)return navigator.languages[0];if(navigator.language)return navigator.language}},xt=P.createContext({i18n:sr}),xM=({children:e,locale:t})=>{const[n,r]=P.useState(0),o=P.useMemo(()=>bM(),[]);P.useEffect(()=>sr.onChange(()=>{r(c=>c+1)}),[]),P.useEffect(()=>{t&&t!==sr.locale?t2(t):!t&&o&&o!==sr.locale&&t2(o)},[t,o]);const i=P.useMemo(()=>({t:(c,u)=>sr.t(c,u),i18n:sr}),[n]);return E.createElement(xt.Provider,{value:i},e)};function pE(e){return e!=null}var n2={iconBackground:"#7290CC",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./apechain-SX5YFU6N-q5qBv-mp.js");return{default:e}},[])).default},nm={iconBackground:"#96bedc",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./arbitrum-WURIBY6W-CqVkHBr5.js");return{default:e}},[])).default},r2={iconBackground:"#e84141",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./avalanche-KOMJD3XY-Dsn_JPR4.js");return{default:e}},[])).default},rm={iconBackground:"#0052ff",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./base-OAXLRA4F-CoYTVIiL.js");return{default:e}},[])).default},om={iconBackground:"#814625",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./berachain-NJECWIVC-DumxnFvf.js");return{default:e}},[])).default},o2={iconBackground:"#000000",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./blast-V555OVXZ-BbhJh1tj.js");return{default:e}},[])).default},s2={iconBackground:"#ebac0e",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./bsc-N647EYR2-B2nLKXWV.js");return{default:e}},[])).default},i2={iconBackground:"#FCFF52",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./celo-GEP4TUHG-CenIBYLU.js");return{default:e}},[])).default},a2={iconBackground:"#002D74",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./cronos-HJPAQTAE-BEOvlOC4.js");return{default:e}},[])).default},CM={iconBackground:"#A36EFD",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./degen-FQQ4XGHB-CeHTs88l.js");return{default:e}},[])).default},os={iconBackground:"#484c50",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./ethereum-RGGVA4PY-SWGOlkuk.js");return{default:e}},[])).default},l2={iconBackground:"transparent",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./flow-5FQJFCTK-CUie2reO.js");return{default:e}},[])).default},kM={iconBackground:"#04795c",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./gnosis-37ZC4RBL-B137OtHZ.js");return{default:e}},[])).default},c2={iconBackground:"#000000",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./gravity-J5YQHTYH-Bj6B0uod.js");return{default:e}},[])).default},EM={iconBackground:"#f9f7ec",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./hardhat-TX56IT5N-CV1FY-wE.js");return{default:e}},[])).default},AM={iconBackground:"#000000",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./hyperevm-VKPAA4SA-CHwraEsx.js");return{default:e}},[])).default},u2={iconBackground:"#7132F5",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./ink-FZMYZWHG-62p-5IK5.js");return{default:e}},[])).default},d2={iconBackground:"transparent",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./kaia-65D2U3PU-JmuLQ4gC.js");return{default:e}},[])).default},sm={iconBackground:"#ffffff",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./linea-QRMVQ5DY-DuI3vv0d.js");return{default:e}},[])).default},im={iconBackground:"#ffffff",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./manta-SI27YFEJ-CpVOKa06.js");return{default:e}},[])).default},f2={iconBackground:"#000000",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./mantle-CKIUT334-DR2WgqzU.js");return{default:e}},[])).default},SM={iconBackground:"transparent",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./monad-4KWC6TSS-DVXSkpiz.js");return{default:e}},[])).default},tf={iconBackground:"#ff5a57",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./optimism-HAF2GUT7-ec6Nqxs9.js");return{default:e}},[])).default},am={iconBackground:"#9f71ec",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./polygon-WW6ZI7PM-DXlmm4L1.js");return{default:e}},[])).default},jM={iconBackground:"#1273EA",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./ronin-EMCPYXZT-N-QBHZdV.js");return{default:e}},[])).default},IM={iconBackground:"#000000",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./sanko-RHQYXGM5-OX010CbN.js");return{default:e}},[])).default},NM={iconBackground:"#000000",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./superposition-HG6MMR2Y-bRkgatRO.js");return{default:e}},[])).default},h2={iconBackground:"#FFEEDA",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./scroll-5OBGQVOV-DJFECiai.js");return{default:e}},[])).default},p2={iconBackground:"#F50DB4",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./unichain-C5BWO2ZY-BfguYsnu.js");return{default:e}},[])).default},m2={iconBackground:"#f9f7ec",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./xdc-KJ3TDBYO-DNV6zchh.js");return{default:e}},[])).default},g2={iconBackground:"#000000",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./zetachain-TLDS5IPW-Udhyw16T.js");return{default:e}},[])).default},y2={iconBackground:"#f9f7ec",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./zksync-DH7HK5U4-Dt4usFw6.js");return{default:e}},[])).default},lm={iconBackground:"#000000",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./zora-FYL5H3IO-iB4wygST.js");return{default:e}},[])).default},PM={apechain:{chainId:33139,name:"ApeChain",...n2},apechainCurtis:{chainId:33111,name:"ApeChain Curtis",...n2},arbitrum:{chainId:42161,name:"Arbitrum",...nm},arbitrumGoerli:{chainId:421613,...nm},arbitrumSepolia:{chainId:421614,...nm},avalanche:{chainId:43114,...r2},avalancheFuji:{chainId:43113,...r2},base:{chainId:8453,name:"Base",...rm},baseGoerli:{chainId:84531,...rm},baseSepolia:{chainId:84532,...rm},berachain:{chainId:80094,name:"Berachain",...om},berachainArtio:{chainId:80085,name:"Berachain Artio",...om},berachainBArtio:{chainId:80084,name:"Berachain bArtio",...om},blast:{chainId:81457,name:"Blast",...o2},blastSepolia:{chainId:168587773,...o2},bsc:{chainId:56,name:"BSC",...s2},bscTestnet:{chainId:97,...s2},celo:{chainId:42220,name:"Celo",...i2},celoAlfajores:{chainId:44787,name:"Celo Alfajores",...i2},cronos:{chainId:25,...a2},cronosTestnet:{chainId:338,...a2},degen:{chainId:666666666,name:"Degen",...CM},flow:{chainId:747,...l2},flowTestnet:{chainId:545,...l2},gnosis:{chainId:100,name:"Gnosis",...kM},goerli:{chainId:5,...os},gravity:{chainId:1625,name:"Gravity",...c2},gravitySepolia:{chainId:13505,name:"Gravity Sepolia",...c2},hardhat:{chainId:31337,...EM},holesky:{chainId:17e3,...os},hyperevm:{chainId:999,...AM},ink:{chainId:57073,...u2},inkSepolia:{chainId:763373,...u2},kaia:{chainId:8217,name:"Kaia",...d2},kairos:{chainId:1001,name:"Kairos",...d2},kovan:{chainId:42,...os},linea:{chainId:59144,name:"Linea",...sm},lineaGoerli:{chainId:59140,name:"Linea Goerli",...sm},lineaSepolia:{chainId:59141,name:"Linea Sepolia",...sm},localhost:{chainId:1337,...os},mainnet:{chainId:1,name:"Ethereum",...os},manta:{chainId:169,name:"Manta",...im},mantaSepolia:{chainId:3441006,...im},mantaTestnet:{chainId:3441005,...im},mantle:{chainId:5e3,...f2},mantleTestnet:{chainId:5001,...f2},monadTestnet:{chainId:10143,name:"Monad Testnet",...SM},optimism:{chainId:10,name:"Optimism",...tf},optimismGoerli:{chainId:420,...tf},optimismKovan:{chainId:69,...tf},optimismSepolia:{chainId:11155420,...tf},polygon:{chainId:137,name:"Polygon",...am},polygonAmoy:{chainId:80002,...am},polygonMumbai:{chainId:80001,...am},rinkeby:{chainId:4,...os},ronin:{chainId:2020,...jM},ropsten:{chainId:3,...os},sanko:{chainId:1996,name:"Sanko",...IM},scroll:{chainId:534352,...h2},scrollSepolia:{chainId:534351,...h2},sepolia:{chainId:11155111,...os},superposition:{chainId:55244,name:"Superposition",...NM},unichain:{chainId:130,...p2},unichainSepolia:{chainId:1301,...p2},xdc:{chainId:50,name:"XDC",...m2},xdcTestnet:{chainId:51,...m2},zetachain:{chainId:7e3,name:"ZetaChain",...g2},zetachainAthensTestnet:{chainId:7001,name:"Zeta Athens",...g2},zkSync:{chainId:324,name:"zkSync",...y2},zkSyncTestnet:{chainId:280,...y2},zora:{chainId:7777777,name:"Zora",...lm},zoraSepolia:{chainId:999999999,...lm},zoraTestnet:{chainId:999,...lm}},BM=Object.fromEntries(Object.values(PM).filter(pE).map(({chainId:e,...t})=>[e,t])),TM=e=>e.map(t=>{const n=BM[t.id]??{};return{...t,name:n.name??t.name,iconUrl:t.iconUrl??n.iconUrl,iconBackground:t.iconBackground??n.iconBackground}}),C1=P.createContext({chains:[]});function _M({children:e,initialChain:t}){const{chains:n}=jt();return E.createElement(C1.Provider,{value:P.useMemo(()=>({chains:TM(n),initialChainId:typeof t=="number"?t:t==null?void 0:t.id}),[n,t])},e)}var Pi=()=>P.useContext(C1).chains,RM=()=>P.useContext(C1).initialChainId,OM=()=>{const e=Pi();return P.useMemo(()=>{const t={};for(const n of e)t[n.id]=n;return t},[e])},mE=P.createContext({showBalance:void 0,setShowBalance:()=>{}});function MM({children:e}){const[t,n]=P.useState();return E.createElement(mE.Provider,{value:{showBalance:t,setShowBalance:n}},e)}var gE=()=>P.useContext(mE);function FM(){const[e,t]=P.useState(!1);return P.useEffect(()=>(t(!0),()=>{t(!1)}),[]),P.useCallback(()=>e,[e])}function yE(){const e=Pi(),t=u1.id;return e.some(r=>r.id===t)}function LM(e){const t=yE(),n=o=>{try{return tO(o)}catch{}},{data:r}=rR({chainId:u1.id,name:e?n(e):void 0,query:{enabled:t}});return r}async function Ks(e,t){if(t={headers:{},method:"get",...t,timeout:t.timeout??1e4},!e)throw new Error("rainbowFetch: Missing url argument");const n=new AbortController,r=setTimeout(()=>n.abort(),t.timeout),{body:o,params:i,headers:l,...c}=t,u=o&&typeof o=="object"?JSON.stringify(t.body):t.body,p=await fetch(`${e}${UM(i)}`,{...c,body:u,headers:{Accept:"application/json","Content-Type":"application/json",...l},signal:n.signal});clearTimeout(r);const f=await DM(p);if(p.ok){const{headers:v,status:w}=p;return{data:f,headers:v,status:w}}throw $M({requestBody:o,response:p,responseBody:typeof f=="string"?{error:f}:f})}function DM(e){const t=e.headers.get("Content-Type");return t!=null&&t.startsWith("application/json")?e.json():e.text()}function UM(e){return e&&Object.keys(e).length?`?${new URLSearchParams(e)}`:""}function $M({requestBody:e,response:t,responseBody:n}){const r=(n==null?void 0:n.error)||(t==null?void 0:t.statusText)||"There was an error with the request.",o=new Error(r);return o.response=t,o.responseBody=n,o.requestBody=e,o}var zM=class{constructor(e={}){const{baseUrl:t="",...n}=e;this.baseUrl=t,this.opts=n}get(e,t){return Ks(`${this.baseUrl}${e}`,{...this.opts,...t||{},method:"get"})}delete(e,t){return Ks(`${this.baseUrl}${e}`,{...this.opts,...t||{},method:"delete"})}head(e,t){return Ks(`${this.baseUrl}${e}`,{...this.opts,...t||{},method:"head"})}options(e,t){return Ks(`${this.baseUrl}${e}`,{...this.opts,...t||{},method:"options"})}post(e,t,n){return Ks(`${this.baseUrl}${e}`,{...this.opts,...n||{},body:t,method:"post"})}put(e,t,n){return Ks(`${this.baseUrl}${e}`,{...this.opts,...n||{},body:t,method:"put"})}patch(e,t,n){return Ks(`${this.baseUrl}${e}`,{...this.opts,...n||{},body:t,method:"patch"})}};function WM({baseUrl:e,headers:t,params:n,timeout:r}){return new zM({baseUrl:e,headers:t,params:n,timeout:r})}var qM=!!(typeof process<"u"&&typeof Tf<"u"&&Tf.RAINBOW_PROVIDER_API_KEY),HM=WM({baseUrl:"https://enhanced-provider.rainbow.me",headers:{"x-api-key":typeof process<"u"&&typeof Tf<"u"&&Tf.RAINBOW_PROVIDER_API_KEY||"LzbasoBiLqltex3VkcQ7LRmL4PtfiiZ1EMJrizrgfonWN6byJReu/l6yrUoo3zLW"}});function VM(e,t,n={}){return[e,t,n]}function pf(e){return`rk-ens-name-${e}`}function QM(e){try{const t=e?JSON.parse(e):null;return typeof t=="object"?t:null}catch{return null}}function GM(e,t){if(!Vn(e))return;const n=new Date,r=new Date(n.getTime()+180*6e4);localStorage.setItem(pf(e),JSON.stringify({ensName:t,expires:r.getTime()}))}function KM(e){const t=QM(localStorage.getItem(pf(e)));if(!t)return null;const{ensName:n,expires:r}=t;return typeof n!="string"||Number.isNaN(Number(r))||new Date().getTime()>Number(r)?(localStorage.removeItem(pf(e)),null):n}async function YM({address:e}){const t=KM(e);if(t)return t;const r=(await HM.get("/v1/resolve-ens",{params:{address:e}})).data.data;return r&&GM(e,r),r}function JM(e){const t=yE(),{data:n}=oR({chainId:u1.id,address:e,query:{enabled:t}}),{data:r}=pk({queryKey:VM("address",e),queryFn:()=>YM({address:e}),enabled:!t&&!!e&&qM,staleTime:10*(60*1e3),retry:1});return n||r}function vE({address:e,includeBalance:t}){const n=JM(e),r=LM(n),{data:o}=mk({address:t?e:void 0});return{ensName:n,ensAvatar:r,balance:o}}function k1(){const{chain:e}=zt();return(e==null?void 0:e.id)??null}var wE="rk-transactions";function ZM(e){try{const t=e?JSON.parse(e):{};return typeof t=="object"?t:{}}catch{return{}}}function v2(){return ZM(typeof localStorage<"u"?localStorage.getItem(wE):null)}var XM=/^0x([A-Fa-f0-9]{64})$/;function eF(e){const t=[];return XM.test(e.hash)||t.push("Invalid transaction hash"),typeof e.description!="string"&&t.push("Transaction must have a description"),typeof e.confirmations<"u"&&(!Number.isInteger(e.confirmations)||e.confirmations<1)&&t.push("Transaction confirmations must be a positiver integer"),t}function tF({provider:e}){let t=v2(),n=e;const r=new Set,o=new Set,i=new Map;function l(I){n=I}function c(I,A){var S;return((S=t[I])==null?void 0:S[A])??[]}function u(I,A,S){const N=eF(S);if(N.length>0)throw new Error(["Unable to add transaction",...N].join(`
|
|
1726
|
-
`));g(I,A,T=>[{...S,status:"pending"},...T.filter(({hash:B})=>B!==S.hash)])}function p(I,A){g(I,A,()=>[])}function f(I,A,S,N){g(I,A,T=>T.map(B=>B.hash===S?{...B,status:N}:B))}async function m(I,A){await Promise.all(c(I,A).filter(S=>S.status==="pending").map(async S=>{const{confirmations:N,hash:T}=S,B=i.get(T);if(B)return await B;const R=n.waitForTransactionReceipt({confirmations:N,hash:T,timeout:3e5}).then(({status:M})=>{i.delete(T),M!==void 0&&(f(I,A,T,M===0||M==="reverted"?"failed":"confirmed"),b(M))}).catch(()=>{f(I,A,T,"failed")});return i.set(T,R),await R}))}function g(I,A,S){t=v2(),t[I]=t[I]??{};let N=0;const T=10,B=S(t[I][A]??[]).filter(({status:R})=>R==="pending"?!0:N++<=T);t[I][A]=B.length>0?B:void 0,v(),w(),m(I,A)}function v(){localStorage.setItem(wE,JSON.stringify(t))}function w(){for(const I of r)I()}function b(I){for(const A of o)A(I)}function C(I){return r.add(I),()=>{r.delete(I)}}function j(I){return o.add(I),()=>{o.delete(I)}}return{addTransaction:u,clearTransactions:p,getTransactions:c,onTransactionStatus:j,onChange:C,setProvider:l,waitForPendingTransactions:m}}var w2,bE=E.createContext(null);function nF({children:e}){const t=sR(),{address:n}=zt(),r=k1(),{refetch:o}=mk({address:n,query:{enabled:!1}}),[i]=E.useState(()=>w2??(w2=tF({provider:t}))),l=E.useCallback(c=>{c==="success"&&o()},[o]);return E.useEffect(()=>{i.setProvider(t)},[i,t]),E.useEffect(()=>{n&&r&&i.waitForPendingTransactions(n,r)},[i,n,r]),E.useEffect(()=>{if(i&&n&&r)return i.onTransactionStatus(l)},[i,n,r,l]),E.createElement(bE.Provider,{value:i},e)}function xE(){const e=E.useContext(bE);if(!e)throw new Error("Transaction hooks must be used within RainbowKitProvider");return e}function CE(){const e=xE(),{address:t}=zt(),n=k1(),[r,o]=P.useState(()=>e&&t&&n?e.getTransactions(t,n):[]);return P.useEffect(()=>{if(e&&t&&n)return o(e.getTransactions(t,n)),e.onChange(()=>{o(e.getTransactions(t,n))})},[e,t,n]),r}var b2=e=>typeof e=="function"?e():e;function rF(e,{extends:t}={}){const n={...Ux(Jx,b2(e))};if(!t)return n;const r=Ux(Jx,b2(t));return Object.fromEntries(Object.entries(n).filter(([i,l])=>l!==r[i]))}function x2(e,t={}){return Object.entries(rF(e,t)).map(([n,r])=>`${n}:${r.replace(/[:;{}</>]/g,"")};`).join("")}var kE={appName:void 0,disclaimer:void 0,learnMoreUrl:"https://learn.rainbow.me/understanding-web3?utm_source=rainbowkit&utm_campaign=learnmore"},Eu=P.createContext(kE),EE=P.createContext(!1);function oF(e,t){let n;return()=>{n&&clearTimeout(n),n=setTimeout(()=>{n=null,e()},t)}}var AE=()=>{const[e,t]=P.useState({height:void 0,width:void 0});return P.useEffect(()=>{const n=oF(()=>{t({height:window.innerHeight,width:window.innerWidth})},500);return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},[]),e},Au=P.createContext({connector:null,setConnector:()=>{}});function sF({children:e}){const[t,n]=P.useState(null);return E.createElement(Au.Provider,{value:P.useMemo(()=>({connector:t,setConnector:n}),[t])},e)}var Su={COMPACT:"compact",WIDE:"wide"},vh=P.createContext(Su.WIDE);function iF({children:e,modalSize:t}){const{width:n}=AE(),r=n&&n<tM,{connector:o}=P.useContext(Au);return E.createElement(vh.Provider,{value:r||o?Su.COMPACT:t},e)}var E1=P.createContext(!1),aF="rk-version";function lF({version:e}){localStorage.setItem(aF,e)}function cF(){const e=P.useCallback(()=>{lF({version:"2.2.10"})},[]);P.useEffect(()=>{e()},[e])}function uF(e,t){const n={};for(const r of e){const o=t(r);o&&(n[o]=r)}return n}function A1(){return typeof navigator<"u"&&typeof navigator.userAgent<"u"&&/Version\/([0-9._]+).*Safari/.test(navigator.userAgent)}function dF(){return typeof document<"u"&&getComputedStyle(document.body).getPropertyValue("--arc-palette-focus")!==""}function S1(){var t,n;if(typeof navigator>"u")return"Browser";const e=(t=navigator.userAgent)==null?void 0:t.toLowerCase();return(n=navigator.brave)!=null&&n.isBrave?"Brave":(e==null?void 0:e.indexOf("edg/"))>-1?"Edge":(e==null?void 0:e.indexOf("op"))>-1?"Opera":dF()?"Arc":(e==null?void 0:e.indexOf("chrome"))>-1?"Chrome":(e==null?void 0:e.indexOf("firefox"))>-1?"Firefox":A1()?"Safari":"Browser"}var fF=RO.UAParser(),{os:j1}=fF;function hF(){return j1.name==="Windows"}function pF(){return j1.name==="Mac OS"}function mF(){return["Ubuntu","Mint","Fedora","Debian","Arch","Linux"].includes(j1.name)}function I1(){return hF()?"Windows":pF()?"macOS":mF()?"Linux":"Desktop"}var gF=e=>{var n,r,o,i,l,c,u,p,f,m,g;const t=S1();return{Arc:(n=e==null?void 0:e.downloadUrls)==null?void 0:n.chrome,Brave:(r=e==null?void 0:e.downloadUrls)==null?void 0:r.chrome,Chrome:(o=e==null?void 0:e.downloadUrls)==null?void 0:o.chrome,Edge:((i=e==null?void 0:e.downloadUrls)==null?void 0:i.edge)||((l=e==null?void 0:e.downloadUrls)==null?void 0:l.chrome),Firefox:(c=e==null?void 0:e.downloadUrls)==null?void 0:c.firefox,Opera:((u=e==null?void 0:e.downloadUrls)==null?void 0:u.opera)||((p=e==null?void 0:e.downloadUrls)==null?void 0:p.chrome),Safari:(f=e==null?void 0:e.downloadUrls)==null?void 0:f.safari,Browser:(m=e==null?void 0:e.downloadUrls)==null?void 0:m.browserExtension}[t]??((g=e==null?void 0:e.downloadUrls)==null?void 0:g.browserExtension)},yF=e=>{var n,r,o;return(ku()?(n=e==null?void 0:e.downloadUrls)==null?void 0:n.ios:(r=e==null?void 0:e.downloadUrls)==null?void 0:r.android)??((o=e==null?void 0:e.downloadUrls)==null?void 0:o.mobile)},vF=e=>{var n,r,o,i,l;const t=I1();return{Windows:(n=e==null?void 0:e.downloadUrls)==null?void 0:n.windows,macOS:(r=e==null?void 0:e.downloadUrls)==null?void 0:r.macos,Linux:(o=e==null?void 0:e.downloadUrls)==null?void 0:o.linux,Desktop:(i=e==null?void 0:e.downloadUrls)==null?void 0:i.desktop}[t]??((l=e==null?void 0:e.downloadUrls)==null?void 0:l.desktop)},SE=(e,t)=>e.some(n=>n.id===t),wF=e=>!!e.isRainbowKitConnector,C2=e=>{var t;return!!(!e.isRainbowKitConnector&&((t=e.icon)!=null&&t.replace(/\n/g,"").startsWith("data:image"))&&e.uid&&e.name)},bF=(e,t)=>e.id==="walletConnect"&&t?{...e,walletConnectModalConnector:t}:e,xF=({wallets:e,recentWallets:t})=>[...t,...e.filter(n=>!SE(t,n.id))],jE="rk-recent";function CF(e){try{const t=e?JSON.parse(e):[];return Array.isArray(t)?t:[]}catch{return[]}}function IE(){return typeof localStorage<"u"?CF(localStorage.getItem(jE)):[]}function kF(e){return[...new Set(e)]}function EF(e){const t=kF([e,...IE()]);localStorage.setItem(jE,JSON.stringify(t))}function Kc(e=!1){var S,N,T;const t=Pi(),n=RM(),{connectAsync:r,connectors:o}=tR(),i=o,{setIsWalletConnectModalOpen:l}=XE(),c=i.map(B=>({...B,...B.rkDetails||{}}));async function u(B,R){var V,W;const M=await B.getChainId(),H=await r({...R,chainId:(R==null?void 0:R.chainId)??n??((V=t.find(({id:L})=>L===M))==null?void 0:V.id)??((W=t[0])==null?void 0:W.id),connector:B});return H&&EF(B.id),H}async function p(B){try{l(!0),await u(B),l(!1)}catch(R){const M=R.name==="UserRejectedRequestError"||R.message==="Connection request reset. Please try again.";if(l(!1),!M)throw R}}const f=async(B,R)=>{const M=await B.getProvider();return B.id==="coinbase"?M.qrUrl:new Promise(H=>M.once("display_uri",V=>{H(R(V))}))},m=c.find(B=>B.id==="walletConnect"&&B.isWalletConnectModalConnector),g=c.filter(C2).map(B=>({...B,groupIndex:0})),v=c.filter(wF).filter(B=>!B.isWalletConnectModalConnector).filter(B=>e?!g.some(M=>M.id===B.rdns):!0).map(B=>bF(B,m)),w=[...g,...v],b=uF(w,B=>B.id),j=IE().map(B=>b[B]).filter(Boolean).slice(0,3),I=[],A=xF({wallets:w,recentWallets:j});for(const B of A){if(!B)continue;const R=C2(B),M=SE(j,B.id);if(R){I.push({...B,iconUrl:B.icon,ready:!0,connect:u.bind(null,B),groupName:"Installed",recent:M});continue}I.push({...B,ready:B.installed??!0,connect:u.bind(null,B),desktopDownloadUrl:vF(B),extensionDownloadUrl:gF(B),groupName:B.groupName,mobileDownloadUrl:yF(B),getQrCodeUri:(S=B.qrCode)!=null&&S.getUri?()=>f(B,B.qrCode.getUri):void 0,getDesktopUri:(N=B.desktop)!=null&&N.getUri?()=>f(B,B.desktop.getUri):void 0,getMobileUri:(T=B.mobile)!=null&&T.getUri?()=>{var H;return f(B,(H=B.mobile)==null?void 0:H.getUri)}:void 0,recent:M,showWalletConnectModal:B.walletConnectModalConnector?()=>p(B.walletConnectModalConnector):void 0})}return I}var NE=async()=>(await fe(async()=>{const{default:e}=await import("./assets-Q6ZU7ZJ5-P8HioiAD.js");return{default:e}},[])).default,AF=()=>Gr(NE),SF=()=>E.createElement(Rt,{background:"#d0d5de",borderRadius:"10",height:"48",src:NE,width:"48"}),PE=async()=>(await fe(async()=>{const{default:e}=await import("./login-UP3DZBGS-Db_wM5oQ.js");return{default:e}},[])).default,jF=()=>Gr(PE),IF=()=>E.createElement(Rt,{background:"#d0d5de",borderRadius:"10",height:"48",src:PE,width:"48"}),Ee=E.forwardRef(({as:e="div",children:t,className:n,color:r,display:o,font:i="body",id:l,size:c="16",style:u,tabIndex:p,textAlign:f="inherit",weight:m="regular",testId:g},v)=>E.createElement($,{as:e,className:n,color:r,display:o,fontFamily:i,fontSize:c,fontWeight:m,id:l,ref:v,style:u,tabIndex:p,textAlign:f,testId:g},t));Ee.displayName="Text";var NF={large:{fontSize:"16",paddingX:"24",paddingY:"10"},medium:{fontSize:"14",height:"28",paddingX:"12",paddingY:"4"},small:{fontSize:"14",paddingX:"10",paddingY:"5"}};function pn({disabled:e=!1,href:t,label:n,onClick:r,rel:o="noreferrer noopener",size:i="medium",target:l="_blank",testId:c,type:u="primary"}){const p=u==="primary",f=i!=="large",m=bt(),g=e?"actionButtonSecondaryBackground":p?"accentColor":f?"actionButtonSecondaryBackground":null,{fontSize:v,height:w,paddingX:b,paddingY:C}=NF[i],j=!m||!f;return E.createElement($,{...t?e?{}:{as:"a",href:t,rel:o,target:l}:{as:"button",type:"button"},onClick:e?void 0:r,...j?{borderColor:m&&!f&&!p?"actionButtonBorderMobile":"actionButtonBorder",borderStyle:"solid",borderWidth:"1"}:{},borderRadius:"actionButton",className:!e&&wt({active:"shrinkSm",hover:"grow"}),display:"block",paddingX:b,paddingY:C,style:{willChange:"transform"},testId:c,textAlign:"center",transition:"transform",...g?{background:g}:{},...w?{height:w}:{}},E.createElement(Ee,{color:e?"modalTextSecondary":p?"accentColorForeground":"accentColor",size:v,weight:"bold"},n))}var PF=()=>bt()?E.createElement("svg",{"aria-hidden":!0,fill:"none",height:"11.5",viewBox:"0 0 11.5 11.5",width:"11.5",xmlns:"http://www.w3.org/2000/svg"},E.createElement("title",null,"Close"),E.createElement("path",{d:"M2.13388 0.366117C1.64573 -0.122039 0.854272 -0.122039 0.366117 0.366117C-0.122039 0.854272 -0.122039 1.64573 0.366117 2.13388L3.98223 5.75L0.366117 9.36612C-0.122039 9.85427 -0.122039 10.6457 0.366117 11.1339C0.854272 11.622 1.64573 11.622 2.13388 11.1339L5.75 7.51777L9.36612 11.1339C9.85427 11.622 10.6457 11.622 11.1339 11.1339C11.622 10.6457 11.622 9.85427 11.1339 9.36612L7.51777 5.75L11.1339 2.13388C11.622 1.64573 11.622 0.854272 11.1339 0.366117C10.6457 -0.122039 9.85427 -0.122039 9.36612 0.366117L5.75 3.98223L2.13388 0.366117Z",fill:"currentColor"})):E.createElement("svg",{"aria-hidden":!0,fill:"none",height:"10",viewBox:"0 0 10 10",width:"10",xmlns:"http://www.w3.org/2000/svg"},E.createElement("title",null,"Close"),E.createElement("path",{d:"M1.70711 0.292893C1.31658 -0.0976311 0.683417 -0.0976311 0.292893 0.292893C-0.0976311 0.683417 -0.0976311 1.31658 0.292893 1.70711L3.58579 5L0.292893 8.29289C-0.0976311 8.68342 -0.0976311 9.31658 0.292893 9.70711C0.683417 10.0976 1.31658 10.0976 1.70711 9.70711L5 6.41421L8.29289 9.70711C8.68342 10.0976 9.31658 10.0976 9.70711 9.70711C10.0976 9.31658 10.0976 8.68342 9.70711 8.29289L6.41421 5L9.70711 1.70711C10.0976 1.31658 10.0976 0.683417 9.70711 0.292893C9.31658 -0.0976311 8.68342 -0.0976311 8.29289 0.292893L5 3.58579L1.70711 0.292893Z",fill:"currentColor"})),Si=({"aria-label":e="Close",onClose:t})=>{const n=bt();return E.createElement($,{alignItems:"center","aria-label":e,as:"button",background:"closeButtonBackground",borderColor:"actionButtonBorder",borderRadius:"full",borderStyle:"solid",borderWidth:n?"0":"1",className:wt({active:"shrinkSm",hover:"growLg"}),color:"closeButton",display:"flex",height:n?"30":"28",justifyContent:"center",onClick:t,style:{willChange:"transform"},transition:"default",type:"button",width:n?"30":"28"},E.createElement(PF,null))},BE=async()=>(await fe(async()=>{const{default:e}=await import("./sign-A7IJEUT5-CGsRnPrd.js");return{default:e}},[])).default;function BF({onClose:e,onCloseModal:t}){const{i18n:n}=P.useContext(xt),[{status:r,...o},i]=E.useState({status:"idle"}),l=sM(),c=P.useCallback(async()=>{try{const w=await l.getNonce();i(b=>({...b,nonce:w}))}catch{i(w=>({...w,errorMessage:n.t("sign_in.message.preparing_error"),status:"idle"}))}},[l,n.t]),u=P.useRef(!1);E.useEffect(()=>{u.current||(u.current=!0,c())},[c]);const p=bt(),{address:f,chain:m}=zt(),{signMessageAsync:g}=iR(),v=async()=>{try{const w=m==null?void 0:m.id,{nonce:b}=o;if(!f||!w||!b)return;i(I=>({...I,errorMessage:void 0,status:"signing"}));const C=l.createMessage({address:f,chainId:w,nonce:b});let j;try{j=await g({message:C})}catch(I){return I instanceof Ve?i(A=>({...A,status:"idle"})):i(A=>({...A,errorMessage:n.t("sign_in.signature.signing_error"),status:"idle"}))}i(I=>({...I,status:"verifying"}));try{if(await l.verify({message:C,signature:j})){t();return}throw new Error}catch{return i(I=>({...I,errorMessage:n.t("sign_in.signature.verifying_error"),status:"idle"}))}}catch{i({errorMessage:n.t("sign_in.signature.oops_error"),status:"idle"})}};return E.createElement($,{position:"relative"},E.createElement($,{display:"flex",paddingRight:"16",paddingTop:"16",position:"absolute",right:"0"},E.createElement(Si,{onClose:e})),E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:p?"32":"24",padding:"24",paddingX:"18",style:{paddingTop:p?"60px":"36px"}},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:p?"6":"4",style:{maxWidth:p?320:280}},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:p?"32":"16"},E.createElement(Rt,{height:40,src:BE,width:40}),E.createElement(Ee,{color:"modalText",size:p?"20":"18",textAlign:"center",weight:"heavy"},n.t("sign_in.label"))),E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:p?"16":"12"},E.createElement(Ee,{color:"modalTextSecondary",size:p?"16":"14",textAlign:"center"},n.t("sign_in.description")),r==="idle"&&o.errorMessage?E.createElement(Ee,{color:"error",size:p?"16":"14",textAlign:"center",weight:"bold"},o.errorMessage):null)),E.createElement($,{alignItems:p?void 0:"center",display:"flex",flexDirection:"column",gap:"8",width:"full"},E.createElement(pn,{disabled:!o.nonce||r==="signing"||r==="verifying",label:o.nonce?r==="signing"?n.t("sign_in.signature.waiting"):r==="verifying"?n.t("sign_in.signature.verifying"):n.t("sign_in.message.send"):n.t("sign_in.message.preparing"),onClick:v,size:p?"large":"medium",testId:"auth-message-button"}),p?E.createElement(pn,{label:"Cancel",onClick:e,size:"large",type:"secondary"}):E.createElement($,{as:"button",borderRadius:"full",className:wt({active:"shrink",hover:"grow"}),display:"block",onClick:e,paddingX:"10",paddingY:"5",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},E.createElement(Ee,{color:"closeButton",size:p?"16":"14",weight:"bold"},n.t("sign_in.message.cancel"))))))}function TF(){const e=Pi(),t=Kc(),n=gh()==="unauthenticated",r=P.useCallback(()=>{Gr(...t.map(o=>o.iconUrl),...e.map(o=>o.iconUrl).filter(pE)),bt()||(AF(),jF()),n&&Gr(BE)},[t,e,n]);P.useEffect(()=>{r()},[r])}var TE="WALLETCONNECT_DEEPLINK_CHOICE";function _F({mobileUri:e,name:t}){localStorage.setItem(TE,JSON.stringify({href:e.split("?")[0],name:t}))}function RF(){localStorage.removeItem(TE)}var _E=P.createContext(void 0),Mg="data-rk",RE=e=>({[Mg]:e||""}),OF=e=>{if(e&&!/^[a-zA-Z0-9_]+$/.test(e))throw new Error(`Invalid ID: ${e}`);return e?`[${Mg}="${e}"]`:`[${Mg}]`},MF=()=>{const e=P.useContext(_E);return RE(e)},FF=xk();function LF({appInfo:e,avatar:t,children:n,coolMode:r=!1,id:o,initialChain:i,locale:l,modalSize:c=Su.WIDE,showRecentTransactions:u=!1,theme:p=FF}){if(TF(),cF(),tk({onDisconnect:RF}),typeof p=="function")throw new Error('A theme function was provided to the "theme" prop instead of a theme object. You must execute this function to get the resulting theme object.');const f=OF(o),m={...kE,...e},g=t??dE;return E.createElement(_M,{initialChain:i},E.createElement(sF,null,E.createElement(xM,{locale:l},E.createElement(EE.Provider,{value:r},E.createElement(iF,{modalSize:c},E.createElement(E1.Provider,{value:u},E.createElement(nF,null,E.createElement(fE.Provider,{value:g},E.createElement(Eu.Provider,{value:m},E.createElement(_E.Provider,{value:o},E.createElement(MM,null,E.createElement(ZL,null,p?E.createElement("div",{...RE(o)},E.createElement("style",{dangerouslySetInnerHTML:{__html:[`${f}{${x2("lightMode"in p?p.lightMode:p)}}`,"darkMode"in p?`@media(prefers-color-scheme:dark){${f}{${x2(p.darkMode,{extends:p.lightMode})}}}`:null].join("")}}),n):n))))))))))))}var DF="_9pm4ki5 ju367va ju367v15 ju367v8r",UF="_9pm4ki3 ju367v9h ju367vb3 ju367va ju367v2q ju367v8q",k2=(e,t)=>{const n=e.querySelectorAll("button:not(:disabled), a[href]");n.length!==0&&n[t==="end"?n.length-1:0].focus()};function $F(e){const t=P.useRef(null);return P.useEffect(()=>{const n=document.activeElement;return()=>{var r;(r=n.focus)==null||r.call(n)}},[]),P.useEffect(()=>{if(t.current){const n=t.current.querySelector("[data-auto-focus]");n?n.focus():t.current.focus()}},[]),E.createElement(E.Fragment,null,E.createElement("div",{onFocus:P.useCallback(()=>t.current&&k2(t.current,"end"),[]),tabIndex:0}),E.createElement("div",{ref:t,style:{outline:"none"},tabIndex:-1,...e}),E.createElement("div",{onFocus:P.useCallback(()=>t.current&&k2(t.current,"start"),[]),tabIndex:0}))}var zF=e=>e.stopPropagation();function _f({children:e,onClose:t,open:n,titleId:r}){P.useEffect(()=>{const p=f=>n&&f.key==="Escape"&&t();return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[n,t]);const[o,i]=P.useState(!0);P.useEffect(()=>{i(getComputedStyle(window.document.body).overflow!=="hidden")},[]);const l=P.useCallback(()=>t(),[t]),c=MF(),u=bt();return E.createElement(E.Fragment,null,n?d1.createPortal(E.createElement(tE,{enabled:o},E.createElement($,{...c},E.createElement($,{...c,alignItems:u?"flex-end":"center","aria-labelledby":r,"aria-modal":!0,className:UF,onClick:l,position:"fixed",role:"dialog"},E.createElement($F,{className:DF,onClick:zF,role:"document"},e)))),document.body):null)}var WF="_1ckjpok7",qF="_1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r",HF="_1ckjpok4 _1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r",VF="_1ckjpok6 ju367vq",QF="_1ckjpok3 _1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r",GF="_1ckjpok2 _1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r";function Rf({bottomSheetOnMobile:e=!1,children:t,marginTop:n,padding:r="16",paddingBottom:o,wide:i=!1}){const l=bt(),u=P.useContext(vh)===Su.COMPACT;return E.createElement($,{marginTop:n},E.createElement($,{className:[i?l?GF:u?HF:QF:qF,l?VF:null,l&&e?WF:null].join(" ")},E.createElement($,{padding:r,paddingBottom:o??r},t)))}var E2=["k","m","b","t"];function nf(e,t=1){return e.toString().replace(new RegExp(`(.+\\.\\d{${t}})\\d+`),"$1").replace(/(\.[1-9]*)0+$/,"$1").replace(/\.$/,"")}function OE(e){if(e<1)return nf(e,3);if(e<10**2)return nf(e,2);if(e<10**4)return new Intl.NumberFormat().format(Number.parseFloat(nf(e,1)));const t=10**1;let n=String(e);for(let r=E2.length-1;r>=0;r--){const o=10**((r+1)*3);if(o<=e){e=e*t/o/t,n=nf(e,1)+E2[r];break}}return n}function ME(e){return e.length<8?e:`${e.substring(0,4)}…${e.substring(e.length-4)}`}function FE(e){if(!e)return"";const t=e.split("."),n=t.pop();return t.join(".").length>24?`${t.join(".").substring(0,24)}...`:`${t.join(".")}.${n}`}var KF=()=>E.createElement("svg",{fill:"none",height:"13",viewBox:"0 0 13 13",width:"13",xmlns:"http://www.w3.org/2000/svg"},E.createElement("title",null,"Copied"),E.createElement("path",{d:"M4.94568 12.2646C5.41052 12.2646 5.77283 12.0869 6.01892 11.7109L12.39 1.96973C12.5677 1.69629 12.6429 1.44336 12.6429 1.2041C12.6429 0.561523 12.1644 0.0966797 11.5082 0.0966797C11.057 0.0966797 10.7767 0.260742 10.5033 0.691406L4.9115 9.50977L2.07458 5.98926C1.82166 5.68848 1.54822 5.55176 1.16541 5.55176C0.502319 5.55176 0.0238037 6.02344 0.0238037 6.66602C0.0238037 6.95312 0.112671 7.20605 0.358765 7.48633L3.88611 11.7588C4.18005 12.1074 4.50818 12.2646 4.94568 12.2646Z",fill:"currentColor"})),YF=()=>E.createElement("svg",{fill:"none",height:"16",viewBox:"0 0 17 16",width:"17",xmlns:"http://www.w3.org/2000/svg"},E.createElement("title",null,"Copy"),E.createElement("path",{d:"M3.04236 12.3027H4.18396V13.3008C4.18396 14.8525 5.03845 15.7002 6.59705 15.7002H13.6244C15.183 15.7002 16.0375 14.8525 16.0375 13.3008V6.24609C16.0375 4.69434 15.183 3.84668 13.6244 3.84668H12.4828V2.8418C12.4828 1.29688 11.6283 0.442383 10.0697 0.442383H3.04236C1.48376 0.442383 0.629272 1.29004 0.629272 2.8418V9.90332C0.629272 11.4551 1.48376 12.3027 3.04236 12.3027ZM3.23376 10.5391C2.68689 10.5391 2.39294 10.2656 2.39294 9.68457V3.06055C2.39294 2.47949 2.68689 2.21289 3.23376 2.21289H9.8783C10.4252 2.21289 10.7191 2.47949 10.7191 3.06055V3.84668H6.59705C5.03845 3.84668 4.18396 4.69434 4.18396 6.24609V10.5391H3.23376ZM6.78845 13.9365C6.24158 13.9365 5.94763 13.6699 5.94763 13.0889V6.45801C5.94763 5.87695 6.24158 5.61035 6.78845 5.61035H13.433C13.9799 5.61035 14.2738 5.87695 14.2738 6.45801V13.0889C14.2738 13.6699 13.9799 13.9365 13.433 13.9365H6.78845Z",fill:"currentColor"})),JF=()=>E.createElement("svg",{fill:"none",height:"16",viewBox:"0 0 18 16",width:"18",xmlns:"http://www.w3.org/2000/svg"},E.createElement("title",null,"Disconnect"),E.createElement("path",{d:"M2.67834 15.5908H9.99963C11.5514 15.5908 12.399 14.7432 12.399 13.1777V10.2656H10.6354V12.9863C10.6354 13.5332 10.3688 13.8271 9.78772 13.8271H2.89026C2.3092 13.8271 2.0426 13.5332 2.0426 12.9863V3.15625C2.0426 2.60254 2.3092 2.30859 2.89026 2.30859H9.78772C10.3688 2.30859 10.6354 2.60254 10.6354 3.15625V5.89746H12.399V2.95801C12.399 1.39941 11.5514 0.544922 9.99963 0.544922H2.67834C1.12659 0.544922 0.278931 1.39941 0.278931 2.95801V13.1777C0.278931 14.7432 1.12659 15.5908 2.67834 15.5908ZM7.43616 8.85059H14.0875L15.0924 8.78906L14.566 9.14453L13.6842 9.96484C13.5406 10.1016 13.4586 10.2861 13.4586 10.4844C13.4586 10.8398 13.7321 11.168 14.1217 11.168C14.3199 11.168 14.4635 11.0928 14.6002 10.9561L16.7809 8.68652C16.986 8.48145 17.0543 8.27637 17.0543 8.06445C17.0543 7.85254 16.986 7.64746 16.7809 7.43555L14.6002 5.17285C14.4635 5.03613 14.3199 4.9541 14.1217 4.9541C13.7321 4.9541 13.4586 5.27539 13.4586 5.6377C13.4586 5.83594 13.5406 6.02734 13.6842 6.15723L14.566 6.98438L15.0924 7.33984L14.0875 7.27148H7.43616C7.01917 7.27148 6.65686 7.62012 6.65686 8.06445C6.65686 8.50195 7.01917 8.85059 7.43616 8.85059Z",fill:"currentColor"}));function ZF(){const e=xE(),{address:t}=zt(),n=k1();return P.useCallback(()=>{if(!t||!n)throw new Error("No address or chain ID found");e.clearTransactions(t,n)},[e,t,n])}var LE=e=>{var t,n;return(n=(t=e==null?void 0:e.blockExplorers)==null?void 0:t.default)==null?void 0:n.url},DE=()=>E.createElement("svg",{fill:"none",height:"19",viewBox:"0 0 20 19",width:"20",xmlns:"http://www.w3.org/2000/svg"},E.createElement("title",null,"Link"),E.createElement("path",{d:"M10 18.9443C15.0977 18.9443 19.2812 14.752 19.2812 9.6543C19.2812 4.56543 15.0889 0.373047 10 0.373047C4.90234 0.373047 0.71875 4.56543 0.71875 9.6543C0.71875 14.752 4.91113 18.9443 10 18.9443ZM10 16.6328C6.1416 16.6328 3.03906 13.5215 3.03906 9.6543C3.03906 5.7959 6.13281 2.68457 10 2.68457C13.8584 2.68457 16.9697 5.7959 16.9697 9.6543C16.9785 13.5215 13.8672 16.6328 10 16.6328ZM12.7158 12.1416C13.2432 12.1416 13.5684 11.7549 13.5684 11.1836V7.19336C13.5684 6.44629 13.1377 6.05957 12.417 6.05957H8.40918C7.8291 6.05957 7.45117 6.38477 7.45117 6.91211C7.45117 7.43945 7.8291 7.77344 8.40918 7.77344H9.69238L10.7207 7.63281L9.53418 8.67871L6.73047 11.4912C6.53711 11.6758 6.41406 11.9395 6.41406 12.2031C6.41406 12.7832 6.85352 13.1699 7.39844 13.1699C7.68848 13.1699 7.92578 13.0732 8.1543 12.8623L10.9316 10.0762L11.9775 8.89844L11.8545 9.98828V11.1836C11.8545 11.7725 12.1885 12.1416 12.7158 12.1416Z",fill:"currentColor"})),XF=()=>E.createElement("svg",{fill:"none",height:"19",viewBox:"0 0 20 19",width:"20",xmlns:"http://www.w3.org/2000/svg"},E.createElement("title",null,"Cancel"),E.createElement("path",{d:"M10 18.9443C15.0977 18.9443 19.2812 14.752 19.2812 9.6543C19.2812 4.56543 15.0889 0.373047 10 0.373047C4.90234 0.373047 0.71875 4.56543 0.71875 9.6543C0.71875 14.752 4.91113 18.9443 10 18.9443ZM10 16.6328C6.1416 16.6328 3.03906 13.5215 3.03906 9.6543C3.03906 5.7959 6.13281 2.68457 10 2.68457C13.8584 2.68457 16.9697 5.7959 16.9697 9.6543C16.9785 13.5215 13.8672 16.6328 10 16.6328ZM7.29297 13.3018C7.58301 13.3018 7.81152 13.2139 7.99609 13.0205L10 11.0166L12.0127 13.0205C12.1973 13.2051 12.4258 13.3018 12.707 13.3018C13.2432 13.3018 13.6562 12.8887 13.6562 12.3525C13.6562 12.0977 13.5508 11.8691 13.3662 11.6934L11.3535 9.67188L13.375 7.6416C13.5596 7.44824 13.6562 7.22852 13.6562 6.98242C13.6562 6.44629 13.2432 6.0332 12.7158 6.0332C12.4346 6.0332 12.2148 6.12109 12.0215 6.31445L10 8.32715L7.9873 6.32324C7.80273 6.12988 7.58301 6.04199 7.29297 6.04199C6.76562 6.04199 6.35254 6.45508 6.35254 6.99121C6.35254 7.2373 6.44922 7.46582 6.63379 7.6416L8.65527 9.67188L6.63379 11.6934C6.44922 11.8691 6.35254 12.1064 6.35254 12.3525C6.35254 12.8887 6.76562 13.3018 7.29297 13.3018Z",fill:"currentColor"})),eL=()=>E.createElement("svg",{fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},E.createElement("title",null,"Success"),E.createElement("path",{d:"M10 19.4443C15.0977 19.4443 19.2812 15.252 19.2812 10.1543C19.2812 5.06543 15.0889 0.873047 10 0.873047C4.90234 0.873047 0.71875 5.06543 0.71875 10.1543C0.71875 15.252 4.91113 19.4443 10 19.4443ZM10 17.1328C6.1416 17.1328 3.03906 14.0215 3.03906 10.1543C3.03906 6.2959 6.13281 3.18457 10 3.18457C13.8584 3.18457 16.9697 6.2959 16.9697 10.1543C16.9785 14.0215 13.8672 17.1328 10 17.1328ZM9.07715 14.3379C9.4375 14.3379 9.7627 14.1533 9.97363 13.8369L13.7441 8.00977C13.8848 7.79883 13.9814 7.5791 13.9814 7.36816C13.9814 6.84961 13.5244 6.48926 13.0322 6.48926C12.707 6.48926 12.4258 6.66504 12.2148 7.0166L9.05957 12.0967L7.5918 10.2949C7.37207 10.0225 7.13477 9.9082 6.84473 9.9082C6.33496 9.9082 5.92188 10.3125 5.92188 10.8223C5.92188 11.0684 6.00098 11.2793 6.18555 11.5078L8.1543 13.8545C8.40918 14.1709 8.70801 14.3379 9.07715 14.3379Z",fill:"currentColor"})),tL=e=>{switch(e){case"pending":return Gc;case"confirmed":return eL;case"failed":return XF;default:return Gc}};function nL({tx:e}){const t=bt(),n=tL(e.status),r=e.status==="failed"?"error":"accentColor",{chain:o}=zt(),i=e.status==="confirmed"?"Confirmed":e.status==="failed"?"Failed":"Pending",l=LE(o);return E.createElement(E.Fragment,null,E.createElement($,{...l?{as:"a",background:{hover:"profileForeground"},borderRadius:"menuButton",className:wt({active:"shrink"}),href:`${l}/tx/${e.hash}`,rel:"noreferrer noopener",target:"_blank",transition:"default"}:{},color:"modalText",display:"flex",flexDirection:"row",justifyContent:"space-between",padding:"8",width:"full"},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",gap:t?"16":"14"},E.createElement($,{color:r},E.createElement(n,null)),E.createElement($,{display:"flex",flexDirection:"column",gap:t?"3":"1"},E.createElement($,null,E.createElement(Ee,{color:"modalText",font:"body",size:t?"16":"14",weight:"bold"},e==null?void 0:e.description)),E.createElement($,null,E.createElement(Ee,{color:e.status==="pending"?"modalTextSecondary":r,font:"body",size:"14",weight:t?"medium":"regular"},i)))),l&&E.createElement($,{alignItems:"center",color:"modalTextDim",display:"flex"},E.createElement(DE,null))))}var rL=3;function oL({address:e}){const t=CE(),n=ZF(),{chain:r}=zt(),o=LE(r),i=t.slice(0,rL),l=i.length>0,c=bt(),{appName:u}=P.useContext(Eu),{i18n:p}=P.useContext(xt);return E.createElement(E.Fragment,null,E.createElement($,{display:"flex",flexDirection:"column",gap:"10",paddingBottom:"2",paddingTop:"16",paddingX:c?"8":"18"},l&&E.createElement($,{paddingBottom:c?"4":"0",paddingTop:"8",paddingX:c?"12":"6"},E.createElement($,{display:"flex",justifyContent:"space-between"},E.createElement(Ee,{color:"modalTextSecondary",size:c?"16":"14",weight:"semibold"},p.t("profile.transactions.recent.title")),E.createElement($,{style:{marginBottom:-6,marginLeft:-10,marginRight:-10,marginTop:-6}},E.createElement($,{as:"button",background:{hover:"profileForeground"},borderRadius:"actionButton",className:wt({active:"shrink"}),onClick:n,paddingX:c?"8":"12",paddingY:c?"4":"5",transition:"default",type:"button"},E.createElement(Ee,{color:"modalTextSecondary",size:c?"16":"14",weight:"semibold"},p.t("profile.transactions.clear.label")))))),E.createElement($,{display:"flex",flexDirection:"column",gap:"4"},l?i.map(f=>E.createElement(nL,{key:f.hash,tx:f})):E.createElement(E.Fragment,null,E.createElement($,{padding:c?"12":"8"},E.createElement(Ee,{color:"modalTextDim",size:c?"16":"14",weight:c?"medium":"bold"},u?p.t("profile.transactions.description",{appName:u}):p.t("profile.transactions.description_fallback"))),c&&E.createElement($,{background:"generalBorderDim",height:"1",marginX:"12",marginY:"8"})))),o&&E.createElement($,{paddingBottom:"18",paddingX:c?"8":"18"},E.createElement($,{alignItems:"center",as:"a",background:{hover:"profileForeground"},borderRadius:"menuButton",className:wt({active:"shrink"}),color:"modalTextDim",display:"flex",flexDirection:"row",href:`${o}/address/${e}`,justifyContent:"space-between",paddingX:"8",paddingY:"12",rel:"noreferrer noopener",style:{willChange:"transform"},target:"_blank",transition:"default",width:"full",...c?{paddingLeft:"12"}:{}},E.createElement(Ee,{color:"modalText",font:"body",size:c?"16":"14",weight:c?"semibold":"bold"},p.t("profile.explorer.label")),E.createElement(DE,null))))}function A2({action:e,icon:t,label:n,testId:r,url:o}){const i=bt();return E.createElement($,{...o?{as:"a",href:o,rel:"noreferrer noopener",target:"_blank"}:{as:"button",type:"button"},background:{base:"profileAction",...i?{}:{hover:"profileActionHover"}},borderRadius:"menuButton",boxShadow:"profileDetailsAction",className:wt({active:"shrinkSm",hover:i?void 0:"grow"}),display:"flex",onClick:e,padding:i?"6":"8",style:{willChange:"transform"},testId:r,transition:"default",width:"full"},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"1",justifyContent:"center",paddingTop:"2",width:"full"},E.createElement($,{color:"modalText",height:"max"},t),E.createElement($,null,E.createElement(Ee,{color:"modalText",size:i?"12":"13",weight:"semibold"},n))))}function sL({address:e,ensAvatar:t,ensName:n,balance:r,onClose:o,onDisconnect:i}){const l=P.useContext(E1),[c,u]=P.useState(!1),p=P.useCallback(()=>{e&&(navigator.clipboard.writeText(e),u(!0))},[e]);if(P.useEffect(()=>{if(c){const C=setTimeout(()=>{u(!1)},1500);return()=>clearTimeout(C)}},[c]),!e)return null;const f=n?FE(n):ME(e),m=r==null?void 0:r.formatted,g=m?OE(Number.parseFloat(m)):void 0,v="rk_profile_title",w=bt(),{i18n:b}=P.useContext(xt);return E.createElement(E.Fragment,null,E.createElement($,{display:"flex",flexDirection:"column"},E.createElement($,{background:"profileForeground",padding:"16"},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:w?"16":"12",justifyContent:"center",margin:"8",style:{textAlign:"center"}},E.createElement($,{style:{position:"absolute",right:16,top:16,willChange:"transform"}},E.createElement(Si,{onClose:o}))," ",E.createElement($,{marginTop:w?"24":"0"},E.createElement(hE,{address:e,imageUrl:t,size:w?82:74})),E.createElement($,{display:"flex",flexDirection:"column",gap:w?"4":"0",textAlign:"center"},E.createElement($,{textAlign:"center"},E.createElement(Ee,{as:"h1",color:"modalText",id:v,size:w?"20":"18",weight:"heavy"},f)),!!r&&E.createElement($,{textAlign:"center"},E.createElement(Ee,{as:"h1",color:"modalTextSecondary",id:v,size:w?"16":"14",weight:"semibold"},g," ",r.symbol)))),E.createElement($,{display:"flex",flexDirection:"row",gap:"8",margin:"2",marginTop:"16"},E.createElement(A2,{action:p,icon:c?E.createElement(KF,null):E.createElement(YF,null),label:c?b.t("profile.copy_address.copied"):b.t("profile.copy_address.label")}),E.createElement(A2,{action:i,icon:E.createElement(JF,null),label:b.t("profile.disconnect.label"),testId:"disconnect-button"}))),l&&E.createElement(E.Fragment,null,E.createElement($,{background:"generalBorder",height:"1",marginTop:"-1"}),E.createElement($,null,E.createElement(oL,{address:e})))))}function iL({onClose:e,open:t}){const{address:n}=zt(),{balance:r,ensAvatar:o,ensName:i}=vE({address:n,includeBalance:t}),{disconnect:l}=i1();return n?E.createElement(E.Fragment,null,n&&E.createElement(_f,{onClose:e,open:t,titleId:"rk_account_modal_title"},E.createElement(Rf,{bottomSheetOnMobile:!0,padding:"0"},E.createElement(sL,{address:n,ensAvatar:o,ensName:i,balance:r,onClose:e,onDisconnect:l})))):null}var aL=({size:e})=>E.createElement("svg",{fill:"none",height:e,viewBox:"0 0 28 28",width:e,xmlns:"http://www.w3.org/2000/svg"},E.createElement("title",null,"Disconnect"),E.createElement("path",{d:"M6.742 22.195h8.367c1.774 0 2.743-.968 2.743-2.758V16.11h-2.016v3.11c0 .625-.305.96-.969.96H6.984c-.664 0-.968-.335-.968-.96V7.984c0-.632.304-.968.968-.968h7.883c.664 0 .969.336.969.968v3.133h2.016v-3.36c0-1.78-.97-2.757-2.743-2.757H6.742C4.97 5 4 5.977 4 7.758v11.68c0 1.789.969 2.757 2.742 2.757Zm5.438-7.703h7.601l1.149-.07-.602.406-1.008.938a.816.816 0 0 0-.258.593c0 .407.313.782.758.782.227 0 .39-.086.547-.243l2.492-2.593c.235-.235.313-.47.313-.711 0-.242-.078-.477-.313-.719l-2.492-2.586c-.156-.156-.32-.25-.547-.25-.445 0-.758.367-.758.781 0 .227.094.446.258.594l1.008.945.602.407-1.149-.079H12.18a.904.904 0 0 0 0 1.805Z",fill:"currentColor"})),lL="v9horb0",N1=E.forwardRef(({children:e,currentlySelected:t=!1,onClick:n,testId:r,...o},i)=>{const l=bt();return E.createElement($,{as:"button",borderRadius:"menuButton",disabled:t,display:"flex",onClick:n,ref:i,testId:r,type:"button"},E.createElement($,{borderRadius:"menuButton",className:[l?lL:void 0,!t&&wt({active:"shrink"})],padding:l?"8":"6",transition:"default",width:"full",...t?{background:"accentColor",borderColor:"selectedOptionBorder",borderStyle:"solid",borderWidth:"1",boxShadow:"selectedOption",color:"accentColorForeground"}:{background:{hover:"menuItemBackground"},color:"modalText",transition:"default"},...o},e))});N1.displayName="MenuButton";var cL=({chainId:e,currentChainId:t,switchChain:n,chainIconSize:r,isLoading:o,src:i,name:l,iconBackground:c,idx:u})=>{const p=bt(),{i18n:f}=P.useContext(xt),m=Pi(),g=t===e;return E.createElement(P.Fragment,null,E.createElement(N1,{currentlySelected:g,onClick:g?void 0:()=>n({chainId:e}),testId:`chain-option-${e}`},E.createElement($,{fontFamily:"body",fontSize:"16",fontWeight:"bold"},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",justifyContent:"space-between"},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",height:r},i&&E.createElement($,{height:"full",marginRight:"8"},E.createElement(Rt,{alt:l,background:c,borderRadius:"full",height:r,src:i,width:r,testId:`chain-option-${e}-icon`})),E.createElement("div",null,l??l)),g&&E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",marginRight:"6"},E.createElement(Ee,{color:"accentColorForeground",size:"14",weight:"medium"},f.t("chains.connected")),E.createElement($,{background:"connectionIndicator",borderColor:"selectedOptionBorder",borderRadius:"full",borderStyle:"solid",borderWidth:"1",height:"8",marginLeft:"8",width:"8"})),o&&E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",marginRight:"6"},E.createElement(Ee,{color:"modalText",size:"14",weight:"medium"},f.t("chains.confirm")),E.createElement($,{background:"standby",borderRadius:"full",height:"8",marginLeft:"8",width:"8"}))))),p&&u<m.length-1&&E.createElement($,{background:"generalBorderDim",height:"1",marginX:"8"}))},uL=cL,dL="_18dqw9x0",fL="_18dqw9x1";function hL({onClose:e,open:t}){const{chainId:n}=zt(),{chains:r}=jt(),[o,i]=P.useState(null),{switchChain:l}=aR({mutation:{onMutate:({chainId:w})=>{i(w)},onSuccess:()=>{o&&i(null)},onError:()=>{o&&i(null)},onSettled:()=>{e()}}}),{i18n:c}=P.useContext(xt),{disconnect:u}=i1(),p="rk_chain_modal_title",f=bt(),m=r.some(w=>w.id===n),g=f?"36":"28",v=Pi();return n?E.createElement(_f,{onClose:e,open:t,titleId:p},E.createElement(Rf,{bottomSheetOnMobile:!0,paddingBottom:"0"},E.createElement($,{display:"flex",flexDirection:"column",gap:"14"},E.createElement($,{display:"flex",flexDirection:"row",justifyContent:"space-between"},f&&E.createElement($,{width:"30"}),E.createElement($,{paddingBottom:"0",paddingLeft:"8",paddingTop:"4"},E.createElement(Ee,{as:"h1",color:"modalText",id:p,size:f?"20":"18",weight:"heavy"},c.t("chains.title"))),E.createElement(Si,{onClose:e})),!m&&E.createElement($,{marginX:"8",textAlign:f?"center":"left"},E.createElement(Ee,{color:"modalTextSecondary",size:"14",weight:"medium"},c.t("chains.wrong_network"))),E.createElement($,{className:f?fL:dL,display:"flex",flexDirection:"column",gap:"4",padding:"2",paddingBottom:"16"},v.map(({iconBackground:w,iconUrl:b,id:C,name:j},I)=>E.createElement(uL,{key:C,chainId:C,currentChainId:n,switchChain:l,chainIconSize:g,isLoading:o===C,src:b,name:j,iconBackground:w,idx:I})),!m&&E.createElement(E.Fragment,null,E.createElement($,{background:"generalBorderDim",height:"1",marginX:"8"}),E.createElement(N1,{onClick:()=>u(),testId:"chain-option-disconnect"},E.createElement($,{color:"error",fontFamily:"body",fontSize:"16",fontWeight:"bold"},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",justifyContent:"space-between"},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",height:g},E.createElement($,{alignItems:"center",color:"error",height:g,justifyContent:"center",marginRight:"8"},E.createElement(aL,{size:Number(g)})),E.createElement("div",null,c.t("chains.disconnect"))))))))))):null}function pL(e,t){const n={};for(const r of e){const o=t(r);o&&(n[o]||(n[o]=[]),n[o].push(r))}return n}var P1=({children:e,href:t})=>E.createElement($,{as:"a",color:"accentColor",href:t,rel:"noreferrer",target:"_blank"},e),B1=({children:e})=>E.createElement(Ee,{color:"modalTextSecondary",size:"12",weight:"medium"},e);function S2({compactModeEnabled:e=!1,getWallet:t}){const{disclaimer:n,learnMoreUrl:r}=P.useContext(Eu),{i18n:o}=P.useContext(xt);return E.createElement(E.Fragment,null,E.createElement($,{alignItems:"center",color:"accentColor",display:"flex",flexDirection:"column",height:"full",justifyContent:"space-around"},E.createElement($,{marginBottom:"10"},!e&&E.createElement(Ee,{color:"modalText",size:"18",weight:"heavy"},o.t("intro.title"))),E.createElement($,{display:"flex",flexDirection:"column",gap:"32",justifyContent:"center",marginY:"20",style:{maxWidth:312}},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},E.createElement($,{borderRadius:"6",height:"48",minWidth:"48",width:"48"},E.createElement(SF,null)),E.createElement($,{display:"flex",flexDirection:"column",gap:"4"},E.createElement(Ee,{color:"modalText",size:"14",weight:"bold"},o.t("intro.digital_asset.title")),E.createElement(Ee,{color:"modalTextSecondary",size:"14",weight:"medium"},o.t("intro.digital_asset.description")))),E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},E.createElement($,{borderRadius:"6",height:"48",minWidth:"48",width:"48"},E.createElement(IF,null)),E.createElement($,{display:"flex",flexDirection:"column",gap:"4"},E.createElement(Ee,{color:"modalText",size:"14",weight:"bold"},o.t("intro.login.title")),E.createElement(Ee,{color:"modalTextSecondary",size:"14",weight:"medium"},o.t("intro.login.description"))))),E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",margin:"10"},E.createElement(pn,{label:o.t("intro.get.label"),onClick:t}),E.createElement($,{as:"a",className:wt({active:"shrink",hover:"grow"}),display:"block",href:r,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},E.createElement(Ee,{color:"accentColor",size:"14",weight:"bold"},o.t("intro.learn_more.label")))),n&&!e&&E.createElement($,{marginBottom:"8",marginTop:"12",textAlign:"center"},E.createElement(n,{Link:P1,Text:B1}))))}var UE=()=>E.createElement("svg",{fill:"none",height:"17",viewBox:"0 0 11 17",width:"11",xmlns:"http://www.w3.org/2000/svg"},E.createElement("title",null,"Back"),E.createElement("path",{d:"M0.99707 8.6543C0.99707 9.08496 1.15527 9.44531 1.51562 9.79688L8.16016 16.3096C8.43262 16.5732 8.74902 16.7051 9.13574 16.7051C9.90918 16.7051 10.5508 16.0811 10.5508 15.3076C10.5508 14.9121 10.3838 14.5605 10.0938 14.2705L4.30176 8.64551L10.0938 3.0293C10.3838 2.74805 10.5508 2.3877 10.5508 2.00098C10.5508 1.23633 9.90918 0.603516 9.13574 0.603516C8.74902 0.603516 8.43262 0.735352 8.16016 0.999023L1.51562 7.51172C1.15527 7.85449 1.00586 8.21484 0.99707 8.6543Z",fill:"currentColor"})),mL=()=>E.createElement("svg",{fill:"none",height:"12",viewBox:"0 0 8 12",width:"8",xmlns:"http://www.w3.org/2000/svg"},E.createElement("title",null,"Info"),E.createElement("path",{d:"M3.64258 7.99609C4.19336 7.99609 4.5625 7.73828 4.68555 7.24609C4.69141 7.21094 4.70312 7.16406 4.70898 7.13477C4.80859 6.60742 5.05469 6.35547 6.04492 5.76367C7.14648 5.10156 7.67969 4.3457 7.67969 3.24414C7.67969 1.39844 6.17383 0.255859 3.95898 0.255859C2.32422 0.255859 1.05859 0.894531 0.548828 1.86719C0.396484 2.14844 0.320312 2.44727 0.320312 2.74023C0.314453 3.37305 0.742188 3.79492 1.42188 3.79492C1.91406 3.79492 2.33594 3.54883 2.53516 3.11523C2.78711 2.47656 3.23242 2.21289 3.83594 2.21289C4.55664 2.21289 5.10742 2.65234 5.10742 3.29102C5.10742 3.9707 4.7793 4.29883 3.81836 4.87891C3.02148 5.36523 2.50586 5.92773 2.50586 6.76562V6.90039C2.50586 7.55664 2.96289 7.99609 3.64258 7.99609ZM3.67188 11.4473C4.42773 11.4473 5.04297 10.8672 5.04297 10.1406C5.04297 9.41406 4.42773 8.83984 3.67188 8.83984C2.91602 8.83984 2.30664 9.41406 2.30664 10.1406C2.30664 10.8672 2.91602 11.4473 3.67188 11.4473Z",fill:"currentColor"})),gL=({"aria-label":e="Info",onClick:t})=>{const n=bt();return E.createElement($,{alignItems:"center","aria-label":e,as:"button",background:"closeButtonBackground",borderColor:"actionButtonBorder",borderRadius:"full",borderStyle:"solid",borderWidth:n?"0":"1",className:wt({active:"shrinkSm",hover:"growLg"}),color:"closeButton",display:"flex",height:n?"30":"28",justifyContent:"center",onClick:t,style:{willChange:"transform"},transition:"default",type:"button",width:n?"30":"28"},E.createElement(mL,null))},$E=e=>{const t=P.useRef(null),n=P.useContext(EE),r=yh(e);return P.useEffect(()=>{if(n&&t.current&&r)return vL(t.current,r)},[n,r]),t},yL=()=>{const e="_rk_coolMode",t=document.getElementById(e);if(t)return t;const n=document.createElement("div");return n.setAttribute("id",e),n.setAttribute("style",["overflow:hidden","position:fixed","height:100%","top:0","left:0","right:0","bottom:0","pointer-events:none","z-index:2147483647"].join(";")),document.body.appendChild(n),n},j2=0;function vL(e,t){j2++;const n=[15,20,25,35,45],r=35;let o=[],i=!1,l=0,c=0;const u=yL();function p(){const S=n[Math.floor(Math.random()*n.length)],N=Math.random()*10,T=Math.random()*25,B=Math.random()*360,R=Math.random()*35*(Math.random()<=.5?-1:1),M=c-S/2,H=l-S/2,V=Math.random()<=.5?-1:1,W=document.createElement("div");W.innerHTML=`<img src="${t}" width="${S}" height="${S}" style="border-radius: 25%">`,W.setAttribute("style",["position:absolute","will-change:transform",`top:${M}px`,`left:${H}px`,`transform:rotate(${B}deg)`].join(";")),u.appendChild(W),o.push({direction:V,element:W,left:H,size:S,speedHorz:N,speedUp:T,spinSpeed:R,spinVal:B,top:M})}function f(){for(const S of o)S.left=S.left-S.speedHorz*S.direction,S.top=S.top-S.speedUp,S.speedUp=Math.min(S.size,S.speedUp-1),S.spinVal=S.spinVal+S.spinSpeed,S.top>=Math.max(window.innerHeight,document.body.clientHeight)+S.size&&(o=o.filter(N=>N!==S),S.element.remove()),S.element.setAttribute("style",["position:absolute","will-change:transform",`top:${S.top}px`,`left:${S.left}px`,`transform:rotate(${S.spinVal}deg)`].join(";"))}let m;function g(){i&&o.length<r&&p(),f(),m=requestAnimationFrame(g)}g();const v="ontouchstart"in window||navigator.msMaxTouchPoints,w=v?"touchstart":"mousedown",b=v?"touchend":"mouseup",C=v?"touchmove":"mousemove",j=S=>{var N,T;"touches"in S?(l=(N=S.touches)==null?void 0:N[0].clientX,c=(T=S.touches)==null?void 0:T[0].clientY):(l=S.clientX,c=S.clientY)},I=S=>{j(S),i=!0},A=()=>{i=!1};return e.addEventListener(C,j,{passive:!1}),e.addEventListener(w,I),e.addEventListener(b,A),e.addEventListener("mouseleave",A),()=>{e.removeEventListener(C,j),e.removeEventListener(w,I),e.removeEventListener(b,A),e.removeEventListener("mouseleave",A);const S=setInterval(()=>{m&&o.length===0&&(cancelAnimationFrame(m),clearInterval(S),--j2===0&&u.remove())},500)}}var wL="g5kl0l0",zE=({as:e="button",currentlySelected:t=!1,iconBackground:n,iconUrl:r,name:o,onClick:i,ready:l,recent:c,testId:u,isRainbowKitConnector:p,...f})=>{const m=$E(r),[g,v]=E.useState(!1),{i18n:w}=E.useContext(xt);return E.createElement($,{display:"flex",flexDirection:"column",onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),ref:m},E.createElement($,{as:e,borderRadius:"menuButton",borderStyle:"solid",borderWidth:"1",className:t?void 0:[wL,wt({active:"shrink"})],disabled:t,onClick:i,padding:"5",style:{willChange:"transform"},testId:u,transition:"default",width:"full",...t?{background:"accentColor",borderColor:"selectedOptionBorder",boxShadow:"selectedWallet"}:{background:{hover:"menuItemBackground"}},...f},E.createElement($,{color:t?"accentColorForeground":"modalText",disabled:!l,fontFamily:"body",fontSize:"16",fontWeight:"bold",transition:"default"},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",gap:"12"},E.createElement(Rt,{background:n,...!g&&p?{borderColor:"actionButtonBorder"}:{},useAsImage:!p,borderRadius:"6",height:"28",src:r,width:"28"}),E.createElement($,null,E.createElement($,{style:{marginTop:c?-2:void 0},maxWidth:"200"},o),c&&E.createElement(Ee,{color:t?"accentColorForeground":"accentColor",size:"12",style:{lineHeight:1,marginTop:-1},weight:"medium"},w.t("connect.recent")))))))};zE.displayName="ModalSelection";var bL="rk-latest-id";function xL(e){localStorage.setItem(bL,e)}var cm=(e,t=1)=>{let n=e.replace("#","");n.length===3&&(n=`${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`);const r=Number.parseInt(n.substring(0,2),16),o=Number.parseInt(n.substring(2,4),16),i=Number.parseInt(n.substring(4,6),16);return t>1&&t<=100&&(t=t/100),`rgba(${r},${o},${i},${t})`},CL=e=>e?[cm(e,.2),cm(e,.14),cm(e,.1)]:null,kL=e=>/^#([0-9a-f]{3}){1,2}$/i.test(e),WE=async()=>(await fe(async()=>{const{default:e}=await import("./connect-UA7M4XW6-IY3X6Bmr.js");return{default:e}},[])).default,EL=()=>Gr(WE),AL=()=>E.createElement(Rt,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:WE,width:"48"}),qE=async()=>(await fe(async()=>{const{default:e}=await import("./create-FASO7PVG-D_rvSpre.js");return{default:e}},[])).default,HE=()=>Gr(qE),SL=()=>E.createElement(Rt,{background:"#e3a5e8",borderColor:"generalBorder",borderRadius:"10",height:"48",src:qE,width:"48"}),VE=async()=>(await fe(async()=>{const{default:e}=await import("./refresh-S4T5V5GX-CwqIaaxK.js");return{default:e}},[])).default,jL=()=>Gr(VE),IL=()=>E.createElement(Rt,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:VE,width:"48"}),QE=async()=>(await fe(async()=>{const{default:e}=await import("./scan-4UYSQ56Q-CjMz6-XC.js");return{default:e}},[])).default,GE=()=>Gr(QE),NL=()=>E.createElement(Rt,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:QE,width:"48"}),PL="_1vwt0cg0",BL="_1vwt0cg2 ju367v7a ju367v7v",TL="_1vwt0cg3",_L="_1vwt0cg4";function KE({ecc:e="medium",logoBackground:t,logoSize:n=50,logoUrl:r,size:o=200,uri:i}){const c=o-Number.parseInt("20",10)*2,u=yh(r);return E.createElement($,{borderColor:"generalBorder",borderRadius:"menuButton",borderStyle:"solid",borderWidth:"1",className:PL,padding:"20",width:"max"},E.createElement($,{style:{height:c,userSelect:"none",width:c},userSelect:"none"},E.createElement(zr.Root,{errorCorrection:e,size:c,value:i},E.createElement(zr.Cells,{radius:1}),E.createElement(zr.Finder,{radius:.25}),u&&E.createElement(zr.Arena,null,E.createElement("img",{alt:"Wallet Logo",src:u,style:{objectFit:"cover",height:"88%",width:"88%",borderRadius:"22.5%",backgroundColor:t}})))))}var YE=async()=>{switch(S1()){case"Arc":return(await fe(async()=>{const{default:t}=await import("./Arc-VDBY7LNS-BChRXCXW.js");return{default:t}},[])).default;case"Brave":return(await fe(async()=>{const{default:t}=await import("./Brave-BRAKJXDS-mq-Xo37j.js");return{default:t}},[])).default;case"Chrome":return(await fe(async()=>{const{default:t}=await import("./Chrome-65Q5P54Y-DR9MQEVr.js");return{default:t}},[])).default;case"Edge":return(await fe(async()=>{const{default:t}=await import("./Edge-XSPUTORV-DEoZslQE.js");return{default:t}},[])).default;case"Firefox":return(await fe(async()=>{const{default:t}=await import("./Firefox-AAHGJQIP-Bp_Hm04m.js");return{default:t}},[])).default;case"Opera":return(await fe(async()=>{const{default:t}=await import("./Opera-KQZLSACL-Cwv5MDFy.js");return{default:t}},[])).default;case"Safari":return(await fe(async()=>{const{default:t}=await import("./Safari-ZPL37GXR-C4Ggg6rz.js");return{default:t}},[])).default;default:return(await fe(async()=>{const{default:t}=await import("./Browser-76IHF3Y2-BMhRaC5Z.js");return{default:t}},[])).default}},RL=()=>Gr(YE),JE=async()=>{switch(I1()){case"Windows":return(await fe(async()=>{const{default:t}=await import("./Windows-PPTHQER6-BlyV2p7Y.js");return{default:t}},[])).default;case"macOS":return(await fe(async()=>{const{default:t}=await import("./Macos-MW4AE7LN-Vvm8Drw3.js");return{default:t}},[])).default;case"Linux":return(await fe(async()=>{const{default:t}=await import("./Linux-OO4TNCLJ-B0aw93n9.js");return{default:t}},[])).default;default:return(await fe(async()=>{const{default:t}=await import("./Linux-OO4TNCLJ-B0aw93n9.js");return{default:t}},[])).default}},OL=()=>Gr(JE);function ML({getWalletDownload:e,compactModeEnabled:t}){const r=Kc().filter(i=>i.isRainbowKitConnector).splice(0,5),{i18n:o}=P.useContext(xt);return E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",marginTop:"18",width:"full"},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"28",height:"full",width:"full"},r==null?void 0:r.filter(i=>{var l;return i.extensionDownloadUrl||i.desktopDownloadUrl||i.qrCode&&((l=i.downloadUrls)==null?void 0:l.qrCode)}).map(i=>{const{downloadUrls:l,iconBackground:c,iconUrl:u,id:p,name:f,qrCode:m}=i,g=(l==null?void 0:l.qrCode)&&m,v=!!i.extensionDownloadUrl,w=(l==null?void 0:l.qrCode)&&v,b=(l==null?void 0:l.qrCode)&&!!i.desktopDownloadUrl;return E.createElement($,{alignItems:"center",display:"flex",gap:"16",justifyContent:"space-between",key:i.id,width:"full"},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},E.createElement(Rt,{background:c,borderColor:"actionButtonBorder",borderRadius:"10",height:"48",src:u,width:"48"}),E.createElement($,{display:"flex",flexDirection:"column",gap:"2"},E.createElement(Ee,{color:"modalText",size:"14",weight:"bold"},f),E.createElement(Ee,{color:"modalTextSecondary",size:"14",weight:"medium"},w?o.t("get.mobile_and_extension.description"):b?o.t("get.mobile_and_desktop.description"):g?o.t("get.mobile.description"):v?o.t("get.extension.description"):null))),E.createElement($,{display:"flex",flexDirection:"column",gap:"4"},E.createElement(pn,{label:o.t("get.action.label"),onClick:()=>e(p),type:"secondary"})))})),E.createElement($,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"column",gap:"8",justifyContent:"space-between",marginBottom:"4",paddingY:"8",style:{maxWidth:275,textAlign:"center"}},E.createElement(Ee,{color:"modalText",size:"14",weight:"bold"},o.t("get.looking_for.title")),E.createElement(Ee,{color:"modalTextSecondary",size:"14",weight:"medium"},t?o.t("get.looking_for.desktop.compact_description"):o.t("get.looking_for.desktop.wide_description"))))}var um="44";function FL({changeWalletStep:e,compactModeEnabled:t,connectionError:n,onClose:r,qrCodeUri:o,reconnect:i,wallet:l}){const{downloadUrls:c,iconBackground:u,iconUrl:p,name:f,qrCode:m,ready:g,showWalletConnectModal:v,getDesktopUri:w}=l,b=!!w,C=A1(),{i18n:j}=P.useContext(xt),I=!!l.extensionDownloadUrl,A=(c==null?void 0:c.qrCode)&&I,S=(c==null?void 0:c.qrCode)&&!!l.desktopDownloadUrl,N=m&&o,T=async()=>{const H=await(w==null?void 0:w());window.open(H,C?"_blank":"_self")},B=v?{description:t?j.t("connect.walletconnect.description.compact"):j.t("connect.walletconnect.description.full"),label:j.t("connect.walletconnect.open.label"),onClick:()=>{r(),v()}}:N?{description:j.t("connect.secondary_action.get.description",{wallet:f}),label:j.t("connect.secondary_action.get.label"),onClick:()=>e(A||S?"DOWNLOAD_OPTIONS":"DOWNLOAD")}:null,{width:R}=AE(),M=R&&R<768;return P.useEffect(()=>{RL(),OL()},[]),E.createElement($,{display:"flex",flexDirection:"column",height:"full",width:"full"},N?E.createElement($,{alignItems:"center",display:"flex",height:"full",justifyContent:"center"},E.createElement(KE,{logoBackground:u,logoSize:t?60:72,logoUrl:p,size:t?318:M?Math.max(280,Math.min(R-308,382)):382,uri:o})):E.createElement($,{alignItems:"center",display:"flex",justifyContent:"center",style:{flexGrow:1}},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"8"},E.createElement($,{borderRadius:"10",height:um,overflow:"hidden"},E.createElement(Rt,{useAsImage:!l.isRainbowKitConnector,height:um,src:p,width:um})),E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"4",paddingX:"32",style:{textAlign:"center"}},E.createElement(Ee,{color:"modalText",size:"18",weight:"bold"},g?j.t("connect.status.opening",{wallet:f}):I?j.t("connect.status.not_installed",{wallet:f}):j.t("connect.status.not_available",{wallet:f})),!g&&I?E.createElement($,{paddingTop:"20"},E.createElement(pn,{href:l.extensionDownloadUrl,label:j.t("connect.secondary_action.install.label"),type:"secondary"})):null,g&&!N&&E.createElement(E.Fragment,null,E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",justifyContent:"center"},E.createElement(Ee,{color:"modalTextSecondary",size:"14",textAlign:"center",weight:"medium"},j.t("connect.status.confirm"))),E.createElement($,{alignItems:"center",color:"modalText",display:"flex",flexDirection:"row",height:"32",marginTop:"8"},n?E.createElement(pn,{label:j.t("connect.secondary_action.retry.label"),onClick:async()=>{b&&T(),i(l)}}):E.createElement($,{color:"modalTextSecondary"},E.createElement(Gc,null))))))),E.createElement($,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"row",gap:"8",height:"28",justifyContent:"space-between",marginTop:"12"},g&&B&&E.createElement(E.Fragment,null,E.createElement(Ee,{color:"modalTextSecondary",size:"14",weight:"medium"},B.description),E.createElement(pn,{label:B.label,onClick:B.onClick,type:"secondary"}))))}var dm=({actionLabel:e,description:t,iconAccent:n,iconBackground:r,iconUrl:o,isCompact:i,onAction:l,title:c,url:u,variant:p})=>{const f=p==="browser",m=!f&&n&&CL(n);return E.createElement($,{alignItems:"center",borderRadius:"13",display:"flex",justifyContent:"center",overflow:"hidden",paddingX:i?"18":"44",position:"relative",style:{flex:1,isolation:"isolate"},width:"full"},E.createElement($,{borderColor:"actionButtonBorder",borderRadius:"13",borderStyle:"solid",borderWidth:"1",style:{bottom:"0",left:"0",position:"absolute",right:"0",top:"0",zIndex:1}}),f&&E.createElement($,{background:"downloadTopCardBackground",height:"full",position:"absolute",style:{zIndex:0},width:"full"},E.createElement($,{display:"flex",flexDirection:"row",justifyContent:"space-between",style:{bottom:"0",filter:"blur(20px)",left:"0",position:"absolute",right:"0",top:"0",transform:"translate3d(0, 0, 0)"}},E.createElement($,{style:{filter:"blur(100px)",marginLeft:-27,marginTop:-20,opacity:.6,transform:"translate3d(0, 0, 0)"}},E.createElement(Rt,{borderRadius:"full",height:"200",src:o,width:"200"})),E.createElement($,{style:{filter:"blur(100px)",marginRight:0,marginTop:105,opacity:.6,overflow:"auto",transform:"translate3d(0, 0, 0)"}},E.createElement(Rt,{borderRadius:"full",height:"200",src:o,width:"200"})))),!f&&m&&E.createElement($,{background:"downloadBottomCardBackground",style:{bottom:"0",left:"0",position:"absolute",right:"0",top:"0"}},E.createElement($,{position:"absolute",style:{background:`radial-gradient(50% 50% at 50% 50%, ${m[0]} 0%, ${m[1]} 25%, rgba(0,0,0,0) 100%)`,height:564,left:-215,top:-197,transform:"translate3d(0, 0, 0)",width:564}}),E.createElement($,{position:"absolute",style:{background:`radial-gradient(50% 50% at 50% 50%, ${m[2]} 0%, rgba(0, 0, 0, 0) 100%)`,height:564,left:-1,top:-76,transform:"translate3d(0, 0, 0)",width:564}})),E.createElement($,{alignItems:"flex-start",display:"flex",flexDirection:"row",gap:"24",height:"max",justifyContent:"center",style:{zIndex:1}},E.createElement($,null,E.createElement(Rt,{height:"60",src:o,width:"60",...r?{background:r,borderColor:"generalBorder",borderRadius:"10"}:null})),E.createElement($,{display:"flex",flexDirection:"column",gap:"4",style:{flex:1},width:"full"},E.createElement(Ee,{color:"modalText",size:"14",weight:"bold"},c),E.createElement(Ee,{color:"modalTextSecondary",size:"14",weight:"medium"},t),E.createElement($,{marginTop:"14",width:"max"},E.createElement(pn,{href:u,label:e,onClick:l,size:"medium"})))))};function LL({changeWalletStep:e,wallet:t}){const n=S1(),r=I1(),i=P.useContext(vh)==="compact",{desktop:l,desktopDownloadUrl:c,extension:u,extensionDownloadUrl:p,mobileDownloadUrl:f}=t,{i18n:m}=P.useContext(xt);return P.useEffect(()=>{HE(),GE(),jL(),EL()},[]),E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"24",height:"full",marginBottom:"8",marginTop:"4",width:"full"},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"8",height:"full",justifyContent:"center",width:"full"},p&&E.createElement(dm,{actionLabel:m.t("get_options.extension.download.label",{browser:n}),description:m.t("get_options.extension.description"),iconUrl:YE,isCompact:i,onAction:()=>e(u!=null&&u.instructions?"INSTRUCTIONS_EXTENSION":"CONNECT"),title:m.t("get_options.extension.title",{wallet:t.name,browser:n}),url:p,variant:"browser"}),c&&E.createElement(dm,{actionLabel:m.t("get_options.desktop.download.label",{platform:r}),description:m.t("get_options.desktop.description"),iconUrl:JE,isCompact:i,onAction:()=>e(l!=null&&l.instructions?"INSTRUCTIONS_DESKTOP":"CONNECT"),title:m.t("get_options.desktop.title",{wallet:t.name,platform:r}),url:c,variant:"desktop"}),f&&E.createElement(dm,{actionLabel:m.t("get_options.mobile.download.label",{wallet:t.name}),description:m.t("get_options.mobile.description"),iconAccent:t.iconAccent,iconBackground:t.iconBackground,iconUrl:t.iconUrl,isCompact:i,onAction:()=>{e("DOWNLOAD")},title:m.t("get_options.mobile.title",{wallet:t.name}),variant:"app"})))}function DL({changeWalletStep:e,wallet:t}){const{downloadUrls:n,qrCode:r}=t,{i18n:o}=P.useContext(xt);return P.useEffect(()=>{HE(),GE()},[]),E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"24",height:"full",width:"full"},E.createElement($,{style:{maxWidth:220,textAlign:"center"}},E.createElement(Ee,{color:"modalTextSecondary",size:"14",weight:"semibold"},o.t("get_mobile.description"))),E.createElement($,{height:"full"},n!=null&&n.qrCode?E.createElement(KE,{logoSize:0,size:268,uri:n.qrCode}):null),E.createElement($,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"row",gap:"8",height:"34",justifyContent:"space-between",marginBottom:"12",paddingY:"8"},E.createElement(pn,{label:o.t("get_mobile.continue.label"),onClick:()=>e(r!=null&&r.instructions?"INSTRUCTIONS_MOBILE":"CONNECT")})))}var Ao={connect:()=>E.createElement(AL,null),create:()=>E.createElement(SL,null),install:e=>E.createElement(Rt,{background:e.iconBackground,borderColor:"generalBorder",borderRadius:"10",height:"48",src:e.iconUrl,width:"48"}),refresh:()=>E.createElement(IL,null),scan:()=>E.createElement(NL,null)};function UL({connectWallet:e,wallet:t}){var r,o,i,l;const{i18n:n}=P.useContext(xt);return E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},E.createElement($,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},(o=(r=t==null?void 0:t.qrCode)==null?void 0:r.instructions)==null?void 0:o.steps.map((c,u)=>{var p;return E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:u},E.createElement($,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},(p=Ao[c.step])==null?void 0:p.call(Ao,t)),E.createElement($,{display:"flex",flexDirection:"column",gap:"4"},E.createElement(Ee,{color:"modalText",size:"14",weight:"bold"},n.t(c.title,void 0,{rawKeyIfTranslationMissing:!0})),E.createElement(Ee,{color:"modalTextSecondary",size:"14",weight:"medium"},n.t(c.description,void 0,{rawKeyIfTranslationMissing:!0}))))})),E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},E.createElement(pn,{label:n.t("get_instructions.mobile.connect.label"),onClick:()=>e(t)}),E.createElement($,{as:"a",className:wt({active:"shrink",hover:"grow"}),display:"block",href:(l=(i=t==null?void 0:t.qrCode)==null?void 0:i.instructions)==null?void 0:l.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},E.createElement(Ee,{color:"accentColor",size:"14",weight:"bold"},n.t("get_instructions.mobile.learn_more.label")))))}function $L({wallet:e}){var n,r,o,i;const{i18n:t}=P.useContext(xt);return E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},E.createElement($,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},(r=(n=e==null?void 0:e.extension)==null?void 0:n.instructions)==null?void 0:r.steps.map((l,c)=>{var u;return E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:c},E.createElement($,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},(u=Ao[l.step])==null?void 0:u.call(Ao,e)),E.createElement($,{display:"flex",flexDirection:"column",gap:"4"},E.createElement(Ee,{color:"modalText",size:"14",weight:"bold"},t.t(l.title,void 0,{rawKeyIfTranslationMissing:!0})),E.createElement(Ee,{color:"modalTextSecondary",size:"14",weight:"medium"},t.t(l.description,void 0,{rawKeyIfTranslationMissing:!0}))))})),E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},E.createElement(pn,{label:t.t("get_instructions.extension.refresh.label"),onClick:window.location.reload.bind(window.location)}),E.createElement($,{as:"a",className:wt({active:"shrink",hover:"grow"}),display:"block",href:(i=(o=e==null?void 0:e.extension)==null?void 0:o.instructions)==null?void 0:i.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},E.createElement(Ee,{color:"accentColor",size:"14",weight:"bold"},t.t("get_instructions.extension.learn_more.label")))))}function zL({connectWallet:e,wallet:t}){var r,o,i,l;const{i18n:n}=P.useContext(xt);return E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},E.createElement($,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},(o=(r=t==null?void 0:t.desktop)==null?void 0:r.instructions)==null?void 0:o.steps.map((c,u)=>{var p;return E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:u},E.createElement($,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},(p=Ao[c.step])==null?void 0:p.call(Ao,t)),E.createElement($,{display:"flex",flexDirection:"column",gap:"4"},E.createElement(Ee,{color:"modalText",size:"14",weight:"bold"},n.t(c.title,void 0,{rawKeyIfTranslationMissing:!0})),E.createElement(Ee,{color:"modalTextSecondary",size:"14",weight:"medium"},n.t(c.description,void 0,{rawKeyIfTranslationMissing:!0}))))})),E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},E.createElement(pn,{label:n.t("get_instructions.desktop.connect.label"),onClick:()=>e(t)}),E.createElement($,{as:"a",className:wt({active:"shrink",hover:"grow"}),display:"block",href:(l=(i=t==null?void 0:t.desktop)==null?void 0:i.instructions)==null?void 0:l.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},E.createElement(Ee,{color:"accentColor",size:"14",weight:"bold"},n.t("get_instructions.desktop.learn_more.label")))))}function WL({onClose:e}){const t="rk_connect_title",[n,r]=P.useState(),[o,i]=P.useState(),[l,c]=P.useState(),u=!!(o!=null&&o.qrCode)&&l,[p,f]=P.useState(!1),g=P.useContext(vh)===Su.COMPACT,{disclaimer:v}=P.useContext(Eu),{i18n:w}=P.useContext(xt),b=A1(),C=P.useRef(!1),{connector:j}=P.useContext(Au),A=Kc(!j).filter(se=>se.ready||!!se.extensionDownloadUrl).sort((se,ie)=>se.groupIndex-ie.groupIndex),S=Kc(),N=pL(A,se=>se.groupName),T=["Recommended","Other","Popular","More","Others","Installed"];P.useEffect(()=>{j&&!C.current&&(L("CONNECT"),H(j),C.current=!0)},[j]);const B=se=>{var ie,re;f(!1),se.ready&&((re=(ie=se==null?void 0:se.connect)==null?void 0:ie.call(se))==null||re.catch(()=>{f(!0)}))},R=async se=>{const ie=A.find(re=>se.id===re.id);ie!=null&&ie.getDesktopUri&&setTimeout(async()=>{var ue;const re=await((ue=ie==null?void 0:ie.getDesktopUri)==null?void 0:ue.call(ie));re&&window.open(re,b?"_blank":"_self")},0)},M=async se=>{var ue;const ie=A.find(Se=>se.id===Se.id),re=await((ue=ie==null?void 0:ie.getQrCodeUri)==null?void 0:ue.call(ie));c(re),setTimeout(()=>{i(ie),L("CONNECT")},re?0:50)},H=async se=>{xL(se.id),se.ready&&(M(se),R(se)),B(se),r(se.id),se.ready||(i(se),L(se!=null&&se.extensionDownloadUrl?"DOWNLOAD_OPTIONS":"CONNECT"))},V=se=>{var Pe;const ie=S.find(Me=>se===Me.id),re=(Pe=ie==null?void 0:ie.downloadUrls)==null?void 0:Pe.qrCode,ue=!!(ie!=null&&ie.desktopDownloadUrl),Se=!!(ie!=null&&ie.extensionDownloadUrl);i(ie),L(re&&(Se||ue)?"DOWNLOAD_OPTIONS":re?"DOWNLOAD":ue?"INSTRUCTIONS_DESKTOP":"INSTRUCTIONS_EXTENSION")},W=()=>{r(void 0),i(void 0),c(void 0)},L=(se,ie=!1)=>{ie&&se==="GET"&&J==="GET"?W():!ie&&se==="GET"?O("GET"):!ie&&se==="CONNECT"&&O("CONNECT"),ee(se)},[J,O]=P.useState("NONE"),[G,ee]=P.useState("NONE");let F=null,K=null,Y=null,U;P.useEffect(()=>{f(!1)},[G,o]);const he=!!(!!(o!=null&&o.extensionDownloadUrl)&&(o!=null&&o.mobileDownloadUrl));switch(G){case"NONE":F=E.createElement(S2,{getWallet:()=>L("GET")});break;case"LEARN_COMPACT":F=E.createElement(S2,{compactModeEnabled:g,getWallet:()=>L("GET")}),K=w.t("intro.title"),Y="NONE";break;case"GET":F=E.createElement(ML,{getWalletDownload:V,compactModeEnabled:g}),K=w.t("get.title"),Y=g?"LEARN_COMPACT":"NONE";break;case"CONNECT":F=o&&E.createElement(FL,{changeWalletStep:L,compactModeEnabled:g,connectionError:p,onClose:e,qrCodeUri:l,reconnect:B,wallet:o}),K=u&&(o.name==="WalletConnect"?w.t("connect_scan.fallback_title"):w.t("connect_scan.title",{wallet:o.name})),Y=g?j?null:"NONE":null,U=g?j?()=>{}:W:()=>{};break;case"DOWNLOAD_OPTIONS":F=o&&E.createElement(LL,{changeWalletStep:L,wallet:o}),K=o&&w.t("get_options.short_title",{wallet:o.name}),Y=j?"CONNECT":g?"NONE":J;break;case"DOWNLOAD":F=o&&E.createElement(DL,{changeWalletStep:L,wallet:o}),K=o&&w.t("get_mobile.title",{wallet:o.name}),Y=he?"DOWNLOAD_OPTIONS":J;break;case"INSTRUCTIONS_MOBILE":F=o&&E.createElement(UL,{connectWallet:H,wallet:o}),K=o&&w.t("get_options.title",{wallet:g&&o.shortName||o.name}),Y="DOWNLOAD";break;case"INSTRUCTIONS_EXTENSION":F=o&&E.createElement($L,{wallet:o}),K=o&&w.t("get_options.title",{wallet:g&&o.shortName||o.name}),Y="DOWNLOAD_OPTIONS";break;case"INSTRUCTIONS_DESKTOP":F=o&&E.createElement(zL,{connectWallet:H,wallet:o}),K=o&&w.t("get_options.title",{wallet:g&&o.shortName||o.name}),Y="DOWNLOAD_OPTIONS";break}return E.createElement($,{display:"flex",flexDirection:"row",style:{maxHeight:g?468:504}},(g?G==="NONE":!0)&&E.createElement($,{className:g?_L:TL,display:"flex",flexDirection:"column",marginTop:"16"},E.createElement($,{display:"flex",justifyContent:"space-between"},g&&v&&E.createElement($,{marginLeft:"16",width:"28"},E.createElement(gL,{onClick:()=>L("LEARN_COMPACT")})),g&&!v&&E.createElement($,{marginLeft:"16",width:"28"}),E.createElement($,{marginLeft:g?"0":"6",paddingBottom:"8",paddingTop:"2",paddingX:"18"},E.createElement(Ee,{as:"h1",color:"modalText",id:t,size:"18",weight:"heavy",testId:"connect-header-label"},w.t("connect.title"))),g&&E.createElement($,{marginRight:"16"},E.createElement(Si,{onClose:e}))),E.createElement($,{className:BL,paddingBottom:"18"},Object.entries(N).map(([se,ie],re)=>ie.length>0&&E.createElement(P.Fragment,{key:re},se?E.createElement($,{marginBottom:"8",marginTop:"16",marginX:"6"},E.createElement(Ee,{color:se==="Installed"?"accentColor":"modalTextSecondary",size:"14",weight:"bold"},T.includes(se)?w.t(`connector_group.${se.toLowerCase()}`):se)):null,E.createElement($,{display:"flex",flexDirection:"column",gap:"4"},ie.map(ue=>E.createElement(zE,{currentlySelected:ue.id===n,iconBackground:ue.iconBackground,iconUrl:ue.iconUrl,key:ue.id,name:ue.name,onClick:()=>H(ue),ready:ue.ready,recent:ue.recent,testId:`wallet-option-${ue.id}`,isRainbowKitConnector:ue.isRainbowKitConnector})))))),g&&E.createElement(E.Fragment,null,E.createElement($,{background:"generalBorder",height:"1",marginTop:"-1"}),v?E.createElement($,{paddingX:"24",paddingY:"16",textAlign:"center"},E.createElement(v,{Link:P1,Text:B1})):E.createElement($,{alignItems:"center",display:"flex",justifyContent:"space-between",paddingX:"24",paddingY:"16"},E.createElement($,{paddingY:"4"},E.createElement(Ee,{color:"modalTextSecondary",size:"14",weight:"medium"},w.t("connect.new_to_ethereum.description"))),E.createElement($,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",justifyContent:"center"},E.createElement($,{className:wt({active:"shrink",hover:"grow"}),cursor:"pointer",onClick:()=>L("LEARN_COMPACT"),paddingY:"4",style:{willChange:"transform"},transition:"default"},E.createElement(Ee,{color:"accentColor",size:"14",weight:"bold"},w.t("connect.new_to_ethereum.learn_more.label"))))))),(g?G!=="NONE":!0)&&E.createElement(E.Fragment,null,!g&&E.createElement($,{background:"generalBorder",minWidth:"1",width:"1"}),E.createElement($,{display:"flex",flexDirection:"column",margin:"16",style:{flexGrow:1}},E.createElement($,{alignItems:"center",display:"flex",justifyContent:"space-between",marginBottom:"12"},E.createElement($,{width:"28"},Y&&E.createElement($,{as:"button",className:wt({active:"shrinkSm",hover:"growLg"}),color:"accentColor",onClick:()=>{Y&&L(Y,!0),U==null||U()},paddingX:"8",paddingY:"4",style:{boxSizing:"content-box",height:17,willChange:"transform"},transition:"default",type:"button"},E.createElement(UE,null))),E.createElement($,{display:"flex",justifyContent:"center",style:{flexGrow:1}},K&&E.createElement(Ee,{color:"modalText",size:"18",textAlign:"center",weight:"heavy"},K)),E.createElement(Si,{onClose:e})),E.createElement($,{display:"flex",flexDirection:"column",style:{minHeight:g?396:432}},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"6",height:"full",justifyContent:"center",marginX:"8"},F)))))}var qL="_1am14412",HL="_1am14410",VL="_1am14413",QL=({wallet:e})=>E.createElement("svg",{className:VL,viewBox:"0 0 86 86",width:"86",height:"86"},E.createElement("title",null,"Loading"),E.createElement("rect",{x:"3",y:"3",width:80,height:80,rx:20,ry:20,strokeDasharray:`${160/3} ${320/3}`,strokeDashoffset:160,className:qL,style:{stroke:(e==null?void 0:e.iconAccent)||"#0D3887"}}));function ZE({onClose:e,wallet:t,connecting:n}){const{connect:r,iconBackground:o,iconUrl:i,id:l,name:c,getMobileUri:u,ready:p,shortName:f,showWalletConnectModal:m}=t,g=$E(i),v=P.useRef(!1),{i18n:w}=P.useContext(xt),b=P.useCallback(async()=>{if(l!=="walletConnect"&&(async()=>{const j=await(u==null?void 0:u());if(j)if(j&&_F({mobileUri:j,name:c}),j.startsWith("http")){const I=document.createElement("a");I.href=j,I.target="_blank",I.rel="noreferrer noopener",I.click()}else window.location.href=j})(),m){m(),e==null||e();return}try{await(r==null?void 0:r())}catch{}},[r,u,m,e,c,l]);return P.useEffect(()=>{n&&!v.current&&(b(),v.current=!0)},[n,b]),E.createElement($,{as:"button",color:p?"modalText":"modalTextSecondary",disabled:!p,fontFamily:"body",key:l,onClick:b,ref:g,style:{overflow:"visible",textAlign:"center"},testId:`wallet-option-${l}`,type:"button",width:"full"},E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",justifyContent:"center"},E.createElement($,{display:"flex",alignItems:"center",justifyContent:"center",paddingBottom:"8",paddingTop:"10",position:"relative"},n?E.createElement(QL,{wallet:t}):null,E.createElement(Rt,{background:o,borderRadius:"13",boxShadow:"walletLogo",height:"60",src:i,width:"60"})),n?null:E.createElement($,{display:"flex",flexDirection:"column",textAlign:"center"},E.createElement(Ee,{as:"h2",color:t.ready?"modalText":"modalTextSecondary",size:"13",weight:"medium"},E.createElement($,{as:"span",position:"relative"},f??c,!t.ready&&" (unsupported)")),t.recent&&E.createElement(Ee,{color:"accentColor",size:"12",weight:"medium"},w.t("connect.recent")))))}function GL({onClose:e}){var v;const t="rk_connect_title",n=Kc().filter(w=>w.isRainbowKitConnector),{disclaimer:r,learnMoreUrl:o}=P.useContext(Eu);let i=null,l=null,c=!1,u=null;const[p,f]=P.useState("CONNECT"),{i18n:m}=P.useContext(xt),g=ku();switch(p){case"CONNECT":{i=m.t("connect.title"),c=!0,l=E.createElement($,null,E.createElement($,{background:"profileForeground",className:HL,display:"flex",paddingBottom:"20",paddingTop:"6",paddingX:"20",style:{gap:"calc((100% - 40px - 240px + 47px) / 4)"}},n.filter(w=>w.ready).map(w=>E.createElement($,{key:w.id,width:"60"},E.createElement(ZE,{onClose:e,wallet:w})))),E.createElement($,{background:"generalBorder",height:"1",marginBottom:"32",marginTop:"-1"}),E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"32",paddingX:"32",style:{textAlign:"center"}},E.createElement($,{display:"flex",flexDirection:"column",gap:"8",textAlign:"center"},E.createElement(Ee,{color:"modalText",size:"16",weight:"bold"},m.t("intro.title")),E.createElement(Ee,{color:"modalTextSecondary",size:"16"},m.t("intro.description")))),E.createElement($,{paddingTop:"32",paddingX:"20"},E.createElement($,{display:"flex",gap:"14",justifyContent:"center"},E.createElement(pn,{label:m.t("intro.get.label"),onClick:()=>f("GET"),size:"large",type:"secondary"}),E.createElement(pn,{href:o,label:m.t("intro.learn_more.label"),size:"large",type:"secondary"}))),r&&E.createElement($,{marginTop:"28",marginX:"32",textAlign:"center"},E.createElement(r,{Link:P1,Text:B1})));break}case"GET":{i=m.t("get.title"),u="CONNECT";const w=(v=n==null?void 0:n.filter(b=>{var C,j,I;return((C=b.downloadUrls)==null?void 0:C.ios)||((j=b.downloadUrls)==null?void 0:j.android)||((I=b.downloadUrls)==null?void 0:I.mobile)}))==null?void 0:v.splice(0,3);l=E.createElement($,null,E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",marginBottom:"36",marginTop:"5",paddingTop:"12",width:"full"},w.map((b,C)=>{const{downloadUrls:j,iconBackground:I,iconUrl:A,name:S}=b;return!(j!=null&&j.ios)&&!(j!=null&&j.android)&&!(j!=null&&j.mobile)?null:E.createElement($,{display:"flex",gap:"16",key:b.id,paddingX:"20",width:"full"},E.createElement($,{style:{minHeight:48,minWidth:48}},E.createElement(Rt,{background:I,borderColor:"generalBorder",borderRadius:"10",height:"48",src:A,width:"48"})),E.createElement($,{display:"flex",flexDirection:"column",width:"full"},E.createElement($,{alignItems:"center",display:"flex",height:"48"},E.createElement($,{width:"full"},E.createElement(Ee,{color:"modalText",size:"18",weight:"bold"},S)),E.createElement(pn,{href:(g?j==null?void 0:j.ios:j==null?void 0:j.android)||(j==null?void 0:j.mobile),label:m.t("get.action.label"),size:"small",type:"secondary"})),C<w.length-1&&E.createElement($,{background:"generalBorderDim",height:"1",marginY:"10",width:"full"})))})),E.createElement($,{style:{marginBottom:"42px"}}),E.createElement($,{alignItems:"center",display:"flex",flexDirection:"column",gap:"36",paddingX:"36",style:{textAlign:"center"}},E.createElement($,{display:"flex",flexDirection:"column",gap:"12",textAlign:"center"},E.createElement(Ee,{color:"modalText",size:"16",weight:"bold"},m.t("get.looking_for.title")),E.createElement(Ee,{color:"modalTextSecondary",size:"16"},m.t("get.looking_for.mobile.description")))));break}}return E.createElement($,{display:"flex",flexDirection:"column",paddingBottom:"36"},E.createElement($,{background:c?"profileForeground":"modalBackground",display:"flex",flexDirection:"column",paddingBottom:"4",paddingTop:"14"},E.createElement($,{display:"flex",justifyContent:"center",paddingBottom:"6",paddingX:"20",position:"relative"},u&&E.createElement($,{display:"flex",position:"absolute",style:{left:0,marginBottom:-20,marginTop:-20}},E.createElement($,{alignItems:"center",as:"button",className:wt({active:"shrinkSm",hover:"growLg"}),color:"accentColor",display:"flex",marginLeft:"4",marginTop:"20",onClick:()=>f(u),padding:"16",style:{height:17,willChange:"transform"},transition:"default",type:"button"},E.createElement(UE,null))),E.createElement($,{marginTop:"4",textAlign:"center",width:"full"},E.createElement(Ee,{as:"h1",color:"modalText",id:t,size:"20",weight:"bold"},i)),E.createElement($,{alignItems:"center",display:"flex",height:"32",paddingRight:"14",position:"absolute",right:"0"},E.createElement($,{style:{marginBottom:-20,marginTop:-20}},E.createElement(Si,{onClose:e}))))),E.createElement($,{display:"flex",flexDirection:"column"},l))}var KL=({onClose:e})=>{const{connector:t}=P.useContext(Au),{i18n:n}=P.useContext(xt),r=(t==null?void 0:t.name)||"";return E.createElement($,null,E.createElement($,{display:"flex",paddingBottom:"32",justifyContent:"center",alignItems:"center",background:"profileForeground",flexDirection:"column"},E.createElement($,{width:"full",display:"flex",justifyContent:"flex-end",marginTop:"18",marginRight:"24"},E.createElement(Si,{onClose:e})),E.createElement($,{width:"60"},E.createElement(ZE,{onClose:e,wallet:t,connecting:!0})),E.createElement($,{marginTop:"20"},E.createElement(Ee,{textAlign:"center",color:"modalText",size:"18",weight:"semibold"},n.t("connect.status.connect_mobile",{wallet:r}))),E.createElement($,{maxWidth:"full",marginTop:"8"},E.createElement(Ee,{textAlign:"center",color:"modalText",size:"16",weight:"medium"},n.t("connect.status.confirm_mobile",{wallet:r})))))};function YL({onClose:e}){const{connector:t}=P.useContext(Au);return bt()?t?E.createElement(KL,{onClose:e}):E.createElement(GL,{onClose:e}):E.createElement(WL,{onClose:e})}function JL({onClose:e,open:t}){const n="rk_connect_title",r=x1(),{disconnect:o}=i1(),{isConnecting:i}=zt(),l=E.useCallback(()=>{e(),o()},[e,o]),c=E.useCallback(()=>{i&&o(),e()},[e,o,i]);return r==="disconnected"?E.createElement(_f,{onClose:c,open:t,titleId:n},E.createElement(Rf,{bottomSheetOnMobile:!0,padding:"0",wide:!0},E.createElement(YL,{onClose:c}))):r==="unauthenticated"?E.createElement(_f,{onClose:l,open:t,titleId:n},E.createElement(Rf,{bottomSheetOnMobile:!0,padding:"0"},E.createElement(BF,{onClose:l,onCloseModal:e}))):null}function fm(){const[e,t]=P.useState(!1);return{closeModal:P.useCallback(()=>t(!1),[]),isModalOpen:e,openModal:P.useCallback(()=>t(!0),[])}}var hl=P.createContext({accountModalOpen:!1,chainModalOpen:!1,connectModalOpen:!1,isWalletConnectModalOpen:!1,setIsWalletConnectModalOpen:()=>{}});function ZL({children:e}){const{closeModal:t,isModalOpen:n,openModal:r}=fm(),{closeModal:o,isModalOpen:i,openModal:l}=fm(),{closeModal:c,isModalOpen:u,openModal:p}=fm(),[f,m]=P.useState(!1),g=x1(),{chainId:v}=zt(),{chains:w}=jt(),b=w.some(I=>I.id===v),C=P.useCallback(({keepConnectModalOpen:I=!1}={})=>{I||t(),o(),c()},[t,o,c]),j=gh()==="unauthenticated";return tk({onConnect:()=>C({keepConnectModalOpen:j}),onDisconnect:()=>C()}),P.useEffect(()=>{j&&C()},[j,C]),E.createElement(hl.Provider,{value:P.useMemo(()=>({accountModalOpen:i,chainModalOpen:u,connectModalOpen:n,isWalletConnectModalOpen:f,openAccountModal:b&&g==="connected"?l:void 0,openChainModal:g==="connected"?p:void 0,openConnectModal:g==="disconnected"||g==="unauthenticated"?r:void 0,setIsWalletConnectModalOpen:m}),[g,i,u,n,l,p,r,b,f])},e,E.createElement(JL,{onClose:t,open:n}),E.createElement(iL,{onClose:o,open:i}),E.createElement(hL,{onClose:c,open:u}))}function XL(){const{accountModalOpen:e,chainModalOpen:t,connectModalOpen:n}=P.useContext(hl);return{accountModalOpen:e,chainModalOpen:t,connectModalOpen:n}}function eD(){const{accountModalOpen:e,openAccountModal:t}=P.useContext(hl);return{accountModalOpen:e,openAccountModal:t}}function tD(){const{chainModalOpen:e,openChainModal:t}=P.useContext(hl);return{chainModalOpen:e,openChainModal:t}}function XE(){const{isWalletConnectModalOpen:e,setIsWalletConnectModalOpen:t}=P.useContext(hl);return{isWalletConnectModalOpen:e,setIsWalletConnectModalOpen:t}}function nD(){const{connectModalOpen:e,openConnectModal:t}=P.useContext(hl),{isWalletConnectModalOpen:n}=XE();return{connectModalOpen:e||n,openConnectModal:t}}var hm=()=>{};function T1({children:e}){const t=FM(),{address:n}=zt(),{chainId:r}=zt(),{chains:o}=jt(),i=o.some(W=>W.id===r),l=OM(),c=gh()??void 0,u=r?l[r]:void 0,p=(u==null?void 0:u.name)??void 0,f=(u==null?void 0:u.iconUrl)??void 0,m=(u==null?void 0:u.iconBackground)??void 0,g=yh(f),v=P.useContext(E1),w=CE().some(({status:W})=>W==="pending")&&v,{showBalance:b}=gE(),j=typeof b=="boolean"?b:b?iE(b)[bt()?"smallScreen":"largeScreen"]:!0,{balance:I,ensAvatar:A,ensName:S}=vE({address:n,includeBalance:j}),N=I?`${OE(Number.parseFloat(I.formatted))} ${I.symbol}`:void 0,{openConnectModal:T}=nD(),{openChainModal:B}=tD(),{openAccountModal:R}=eD(),{accountModalOpen:M,chainModalOpen:H,connectModalOpen:V}=XL();return E.createElement(E.Fragment,null,e({account:n?{address:n,balanceDecimals:I==null?void 0:I.decimals,balanceFormatted:I==null?void 0:I.formatted,balanceSymbol:I==null?void 0:I.symbol,displayBalance:N,displayName:S?FE(S):ME(n),ensAvatar:A??void 0,ensName:S??void 0,hasPendingTransactions:w}:void 0,accountModalOpen:M,authenticationStatus:c,chain:r?{hasIcon:!!f,iconBackground:m,iconUrl:g,id:r,name:p,unsupported:!i}:void 0,chainModalOpen:H,connectModalOpen:V,mounted:t(),openAccountModal:R??hm,openChainModal:B??hm,openConnectModal:T??hm}))}T1.displayName="ConnectButton.Custom";var uc={accountStatus:"full",chainStatus:{largeScreen:"full",smallScreen:"icon"},label:"Connect Wallet",showBalance:{largeScreen:!0,smallScreen:!1}};function wh({accountStatus:e=uc.accountStatus,chainStatus:t=uc.chainStatus,label:n=uc.label,showBalance:r=uc.showBalance}){const o=Pi(),i=x1(),{setShowBalance:l}=gE(),[c,u]=P.useState(!1),{i18n:p}=P.useContext(xt);return P.useEffect(()=>{l(r),c||u(!0)},[r,l]),c?E.createElement(T1,null,({account:f,chain:m,mounted:g,openAccountModal:v,openChainModal:w,openConnectModal:b})=>{const C=g&&i!=="loading",j=(m==null?void 0:m.unsupported)??!1;return E.createElement($,{display:"flex",gap:"12",...!C&&{"aria-hidden":!0,style:{opacity:0,pointerEvents:"none",userSelect:"none"}}},C&&f&&i==="connected"?E.createElement(E.Fragment,null,m&&(o.length>1||j)&&E.createElement($,{alignItems:"center","aria-label":"Chain Selector",as:"button",background:j?"connectButtonBackgroundError":"connectButtonBackground",borderRadius:"connectButton",boxShadow:"connectButton",className:wt({active:"shrink",hover:"grow"}),color:j?"connectButtonTextError":"connectButtonText",display:ca(t,I=>I==="none"?"none":"flex"),fontFamily:"body",fontWeight:"bold",gap:"6",key:j?"unsupported":"supported",onClick:w,paddingX:"10",paddingY:"8",testId:j?"wrong-network-button":"chain-button",transition:"default",type:"button"},j?E.createElement($,{alignItems:"center",display:"flex",height:"24",paddingX:"4"},p.t("connect_wallet.wrong_network.label")):E.createElement($,{alignItems:"center",display:"flex",gap:"6"},m.hasIcon?E.createElement($,{display:ca(t,I=>I==="full"||I==="icon"?"block":"none"),height:"24",width:"24"},E.createElement(Rt,{alt:m.name??"Chain icon",background:m.iconBackground,borderRadius:"full",height:"24",src:m.iconUrl,width:"24"})):null,E.createElement($,{display:ca(t,I=>I==="icon"&&!m.iconUrl||I==="full"||I==="name"?"block":"none")},m.name??m.id)),E.createElement(Xx,null)),!j&&E.createElement($,{alignItems:"center",as:"button",background:"connectButtonBackground",borderRadius:"connectButton",boxShadow:"connectButton",className:wt({active:"shrink",hover:"grow"}),color:"connectButtonText",display:"flex",fontFamily:"body",fontWeight:"bold",onClick:v,testId:"account-button",transition:"default",type:"button"},f.displayBalance&&E.createElement($,{display:ca(r,I=>I?"block":"none"),padding:"8",paddingLeft:"12"},f.displayBalance),E.createElement($,{background:iE(r)[bt()?"smallScreen":"largeScreen"]?"connectButtonInnerBackground":"connectButtonBackground",borderColor:"connectButtonBackground",borderRadius:"connectButton",borderStyle:"solid",borderWidth:"2",color:"connectButtonText",fontFamily:"body",fontWeight:"bold",paddingX:"8",paddingY:"6",transition:"default"},E.createElement($,{alignItems:"center",display:"flex",gap:"6",height:"24"},E.createElement($,{display:ca(e,I=>I==="full"||I==="avatar"?"block":"none")},E.createElement(hE,{address:f.address,imageUrl:f.ensAvatar,loading:f.hasPendingTransactions,size:24})),E.createElement($,{alignItems:"center",display:"flex",gap:"6"},E.createElement($,{display:ca(e,I=>I==="full"||I==="address"?"block":"none")},f.displayName),E.createElement(Xx,null)))))):E.createElement($,{as:"button",background:"accentColor",borderRadius:"connectButton",boxShadow:"connectButton",className:wt({active:"shrink",hover:"grow"}),color:"accentColorForeground",fontFamily:"body",fontWeight:"bold",height:"40",key:"connect",onClick:b,paddingX:"14",testId:"connect-button",transition:"default",type:"button"},g&&n==="Connect Wallet"?p.t("connect_wallet.label"):n))}):E.createElement(E.Fragment,null)}wh.__defaultProps=uc;wh.Custom=T1;var e8=({appName:e,appDescription:t,appUrl:n,appIcon:r})=>({name:e,description:t??e,url:n??(typeof window<"u"?window.location.origin:""),icons:[...r?[r]:[]]});function rD(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>n!==void 0))}function oD(e,t){const n=[];for(const r of e)n.some(o=>o[t]===r[t])||n.push(r);return n}var sD=(e,{projectId:t,walletConnectParameters:n,appName:r,appDescription:o,appUrl:i,appIcon:l})=>{if(!e.length)throw new Error("No wallet list was provided");for(const{wallets:v,groupName:w}of e)if(!v.length)throw new Error(`No wallets provided for group: ${w}`);let c=-1;const u=[],p=[],f=[],m=e8({appName:r,appDescription:o,appUrl:i,appIcon:l});for(const[v,{groupName:w,wallets:b}]of e.entries())for(const C of b){c++;const j=C({projectId:t,appName:r,appIcon:l,options:{metadata:m,...n},walletConnectParameters:{metadata:m,...n}});if(j!=null&&j.iconAccent&&!kL(j==null?void 0:j.iconAccent))throw new Error(`Property \`iconAccent\` is not a hex value for wallet: ${j.name}`);const I={...j,groupIndex:v+1,groupName:w,index:c};typeof j.hidden=="function"?f.push(I):p.push(I)}const g=oD([...p,...f],"id");for(const{createConnector:v,groupIndex:w,groupName:b,hidden:C,...j}of g){if(typeof C=="function"&&C())continue;const I=N=>({rkDetails:rD({...j,groupIndex:w,groupName:b,isRainbowKitConnector:!0,...N||{}})});j.id==="walletConnect"&&u.push(v(I({isWalletConnectModalConnector:!0,showQrModal:!0})));const S=v(I());u.push(S)}return u},I2=new Map,iD=({projectId:e,walletConnectParameters:t,rkDetailsShowQrModal:n,rkDetailsIsWalletConnectModalConnector:r})=>{let o={telemetryEnabled:!1,...t||{},projectId:e,showQrModal:!1};n&&(o={...o,showQrModal:!0}),"customStoragePrefix"in o||(o={...o,customStoragePrefix:r?"clientOne":"clientTwo"});const i=JSON.stringify(o),l=I2.get(i);if(l)return l;const c=b1(o);return I2.set(i,c),c};function aD({projectId:e,walletDetails:t,walletConnectParameters:n}){return r=>({...iD({projectId:e,walletConnectParameters:n,rkDetailsShowQrModal:t.rkDetails.showQrModal,rkDetailsIsWalletConnectModalConnector:t.rkDetails.isWalletConnectModalConnector})(r),...t})}function _1({projectId:e,walletConnectParameters:t}){const n="21fef48091f12692cad574a6f7753643";if(!e||e==="")throw new Error("No projectId found. Every dApp must now provide a WalletConnect Cloud projectId to enable WalletConnect v2 https://www.rainbowkit.com/docs/installation#configure");return e==="YOUR_PROJECT_ID"&&(e=n),r=>aD({projectId:e,walletDetails:r,walletConnectParameters:t})}function t8(e){const t=typeof window<"u"?window:void 0;if(typeof t>"u"||typeof t.ethereum>"u")return;const n=t.ethereum.providers;return n?n.find(r=>r[e]):t.ethereum[e]?t.ethereum:void 0}function n8(e){const t=(n,r)=>{const[o,...i]=r.split("."),l=n[o];if(l)return i.length===0?l:t(l,i.join("."))};if(typeof window<"u")return t(window,e)}function lD({flag:e,namespace:t}){return!!(t&&typeof n8(t)<"u"||typeof t8(e)<"u")}function cD({flag:e,namespace:t}){var o;const n=typeof window<"u"?window:void 0;if(typeof n>"u")return;if(t){const i=n8(t);if(i)return i}const r=(o=n.ethereum)==null?void 0:o.providers;{const i=t8(e);if(i)return i}return typeof r<"u"&&r.length>0?r[0]:n.ethereum}function uD(e){return t=>{const n=e?{target:()=>({id:t.rkDetails.id,name:t.rkDetails.name,provider:e})}:{};return r=>({...ch(n)(r),...t})}}function dD({flag:e,namespace:t,target:n}){const r=n||cD({flag:e,namespace:t});return uD(r)}var r8=({appName:e,appIcon:t})=>{const{preference:n,...r}=r8;return{id:"baseAccount",name:"Base Account",shortName:"Base Account",rdns:"app.base.account",iconUrl:async()=>(await fe(async()=>{const{default:o}=await import("./baseAccount-44UITRK7-CsjdbWCf.js");return{default:o}},[])).default,iconAccent:"#0000FF",iconBackground:"#0000FF",installed:!0,createConnector:o=>{const i=eM({appName:e,appLogoUrl:t,...r,preference:{telemetry:!1,...n||{}}});return l=>({...i(l),...o})}}};function fD(e){return!(!(e!=null&&e.isMetaMask)||e.isBraveWallet&&!e._events&&!e._state||e.isApexWallet||e.isAvalanche||e.isBackpack||e.isBifrost||e.isBitKeep||e.isBitski||e.isBinance||e.isBlockWallet||e.isCoinbaseWallet||e.isDawn||e.isEnkrypt||e.isExodus||e.isFrame||e.isFrontier||e.isGamestop||e.isHyperPay||e.isImToken||e.isKuCoinWallet||e.isMathWallet||e.isNestWallet||e.isOkxWallet||e.isOKExWallet||e.isOneInchIOSWallet||e.isOneInchAndroidWallet||e.isOpera||e.isPhantom||e.isZilPay||e.isPortal||e.isxPortal||e.isRabby||e.isRainbow||e.isStatus||e.isTalisman||e.isTally||e.isTokenPocket||e.isTokenary||e.isTrust||e.isTrustWallet||e.isCTRL||e.isZeal||e.isCoin98||e.isMEWwallet||e.isSafeheron||e.isSafePal||e.isWigwam||e.isZerion||e.__seif)}var o8=({projectId:e,walletConnectParameters:t})=>{const{...n}=o8,r=typeof window<"u"?fD(window.ethereum):!1,o=!r&&!bt(),i=r||bt();return{id:"metaMask",name:"MetaMask",rdns:"io.metamask",iconUrl:async()=>(await fe(async()=>{const{default:l}=await import("./metaMaskWallet-SITXT2FV-BlemcphV.js");return{default:l}},[])).default,iconAccent:"#f6851a",iconBackground:"#fff",installed:r||void 0,downloadUrls:{android:"https://play.google.com/store/apps/details?id=io.metamask",ios:"https://apps.apple.com/us/app/metamask/id1438144202",mobile:"https://metamask.io/download",qrCode:"https://metamask.io/download",chrome:"https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",edge:"https://microsoftedge.microsoft.com/addons/detail/metamask/ejbalbakoplchlghecdalmeeeajnimhm",firefox:"https://addons.mozilla.org/firefox/addon/ether-metamask",opera:"https://addons.opera.com/extensions/details/metamask-10",browserExtension:"https://metamask.io/download"},mobile:{getUri:i?l=>l:void 0},qrCode:o?{getUri:l=>`https://metamask.app.link/wc?uri=${encodeURIComponent(l)}`,instructions:{learnMoreUrl:"https://metamask.io/faqs/",steps:[{description:"wallet_connectors.metamask.qr_code.step1.description",step:"install",title:"wallet_connectors.metamask.qr_code.step1.title"},{description:"wallet_connectors.metamask.qr_code.step2.description",step:"create",title:"wallet_connectors.metamask.qr_code.step2.title"},{description:"wallet_connectors.metamask.qr_code.step3.description",step:"refresh",title:"wallet_connectors.metamask.qr_code.step3.title"}]}}:void 0,extension:{instructions:{learnMoreUrl:"https://metamask.io/faqs/",steps:[{description:"wallet_connectors.metamask.extension.step1.description",step:"install",title:"wallet_connectors.metamask.extension.step1.title"},{description:"wallet_connectors.metamask.extension.step2.description",step:"create",title:"wallet_connectors.metamask.extension.step2.title"},{description:"wallet_connectors.metamask.extension.step3.description",step:"refresh",title:"wallet_connectors.metamask.extension.step3.title"}]}},createConnector:o?_1({projectId:e,walletConnectParameters:t}):(l=>c=>{var p,f,m;const u=v1({dappMetadata:{connector:"rainbowkit",name:(p=t==null?void 0:t.metadata)==null?void 0:p.name,iconUrl:(f=t==null?void 0:t.metadata)==null?void 0:f.icons[0],url:(m=t==null?void 0:t.metadata)==null?void 0:m.url},headless:!0,checkInstallationImmediately:!1,enableAnalytics:!1,...n})(c);return{...u,...l,getChainId:async()=>{var g;try{return await u.getChainId()}catch{return((g=c.chains[0])==null?void 0:g.id)??1}}}})}},hD=({projectId:e,walletConnectParameters:t})=>{const n=lD({flag:"isRainbow"}),r=!n,o=i=>lE()?i:ku()?`rainbow://wc?uri=${encodeURIComponent(i)}&connector=rainbowkit`:`https://rnbwapp.com/wc?uri=${encodeURIComponent(i)}&connector=rainbowkit`;return{id:"rainbow",name:"Rainbow",rdns:"me.rainbow",iconUrl:async()=>(await fe(async()=>{const{default:i}=await import("./rainbowWallet-O26YNBMX-DUhYus-9.js");return{default:i}},[])).default,iconBackground:"#0c2f78",installed:r?void 0:n,downloadUrls:{android:"https://play.google.com/store/apps/details?id=me.rainbow&referrer=utm_source%3Drainbowkit&utm_source=rainbowkit",ios:"https://apps.apple.com/app/apple-store/id1457119021?pt=119997837&ct=rainbowkit&mt=8",mobile:"https://rainbow.download?utm_source=rainbowkit",qrCode:"https://rainbow.download?utm_source=rainbowkit&utm_medium=qrcode",browserExtension:"https://rainbow.me/extension?utm_source=rainbowkit"},mobile:{getUri:r?o:void 0},qrCode:r?{getUri:o,instructions:{learnMoreUrl:"https://learn.rainbow.me/connect-to-a-website-or-app?utm_source=rainbowkit&utm_medium=connector&utm_campaign=learnmore",steps:[{description:"wallet_connectors.rainbow.qr_code.step1.description",step:"install",title:"wallet_connectors.rainbow.qr_code.step1.title"},{description:"wallet_connectors.rainbow.qr_code.step2.description",step:"create",title:"wallet_connectors.rainbow.qr_code.step2.title"},{description:"wallet_connectors.rainbow.qr_code.step3.description",step:"scan",title:"wallet_connectors.rainbow.qr_code.step3.title"}]}}:void 0,createConnector:r?_1({projectId:e,walletConnectParameters:t}):dD({flag:"isRainbow"})}},pD=()=>({id:"safe",name:"Safe",iconAccent:"#12ff80",iconBackground:"#fff",iconUrl:async()=>(await fe(async()=>{const{default:e}=await import("./safeWallet-5MNKTR5Z-D-5imDLD.js");return{default:e}},[])).default,installed:!(typeof window>"u")&&(window==null?void 0:window.parent)!==window,downloadUrls:{},createConnector:e=>t=>({...w1()(t),...e})}),mD=({projectId:e,options:t})=>({id:"walletConnect",name:"WalletConnect",installed:void 0,iconUrl:async()=>(await fe(async()=>{const{default:r}=await import("./walletConnectWallet-YHWKVTDY-D3lyiczV.js");return{default:r}},[])).default,iconBackground:"#3b99fc",qrCode:{getUri:r=>r},createConnector:_1({projectId:e,walletConnectParameters:t})}),gD=e=>e.reduce((n,r)=>{const o=r.id;return n[o]=VC(),n},{}),yD=({appName:e,appDescription:t,appUrl:n,appIcon:r,wallets:o,projectId:i,walletConnectParameters:l,...c})=>{const{transports:u,chains:p,...f}=c,m=e8({appName:e,appDescription:t,appUrl:n,appIcon:r}),g=sD(o||[{groupName:"Popular",wallets:[pD,hD,r8,o8,mD]}],{projectId:i,appName:e,appDescription:t,appUrl:n,appIcon:r,walletConnectParameters:{metadata:m,...l}});return zT({connectors:g,chains:p,transports:u||gD(p),...f})};const vD="9a1851410cb5589bc351a6dabf17140e",wD={accentColor:"#1fd87a",accentColorForeground:"#06281a",borderRadius:"small",fontStack:"system"};function Fg(e){return e.replace(/\B(?=(\d{3})+(?!\d))/g,",")}function ht(e){if(e==null||e==="")return null;try{return BigInt(e)}catch{return null}}function s8(e,t,n=2){const r=typeof e=="bigint"?e:ht(e);if(r===null)return"—";const o=r<0n,i=o?-r:r,l=10n**BigInt(t),c=i/l,u=i%l;let p="";if(n>0&&t>0&&(p=u.toString().padStart(t,"0").slice(0,n).replace(/0+$/,"")),i>0n&&c===0n&&p===""){const f=n===0?"1":`0.${"0".repeat(n-1)}1`;return`${o?"-":""}<${f}`}return`${o?"-":""}${Fg(c.toString())}${p?`.${p}`:""}`}function be(e,t=2){return s8(e,18,t)}function Wn(e,t=2){return s8(e,6,t)}function Fe(e){if(typeof e=="number")return Number.isFinite(e)?Fg(Math.trunc(e).toString()):"—";const t=typeof e=="bigint"?e:ht(e);if(t===null)return"—";const n=t<0n;return`${n?"-":""}${Fg((n?-t:t).toString())}`}function Bn(e){return e==null||!Number.isFinite(e)?"—":`${(e/100).toFixed(2)}%`}function Xt(e){const t=ht(e);return t===null||t===0n}function pm(e,t){const n=ht(e)??0n,r=ht(t)??0n;return n<r?-1:n>r?1:0}function Lg(e){return e.reduce((t,n)=>t+(ht(n)??0n),0n).toString()}function bh(e){return e.length<=13?e:`${e.slice(0,6)}…${e.slice(-4)}`}function Dg(e){return e.length<=18?e:`${e.slice(0,10)}…${e.slice(-6)}`}function bD(e){return/^0x[0-9a-fA-F]{40}$/.test(e)}function ar(e){return Number.isFinite(e)?`${new Date(e*1e3).toISOString().slice(0,16).replace("T"," ")} UTC`:"—"}function Of(e){return Number.isFinite(e)?new Date(e*1e3).toISOString().slice(0,10):"—"}function Za(e,t,n){return t+e*n}function xh(e){const t=Math.max(0,Math.floor(e)),n=Math.floor(t/86400),r=Math.floor(t%86400/3600),o=Math.floor(t%3600/60),i=t%60,l=c=>c.toString().padStart(2,"0");return`${n}d ${l(r)}:${l(o)}:${l(i)}`}function i8(e){return e%86400===0?`${e/86400} days`:e%3600===0?`${e/3600} hours`:`${Fe(e)} s`}function R1(e){return e===8453?"https://basescan.org":e===84532?"https://sepolia.basescan.org":null}function xD(e){return R1(e)?"Basescan":null}function CD(e,t=Date.now()){const n=Math.max(0,Math.round((t-e)/1e3));if(n<5)return"just now";if(n<60)return`${n}s ago`;const r=Math.floor(n/60);if(r<60)return`${r}m ago`;const o=Math.floor(r/60);return o<24?`${o}h ago`:`${Math.floor(o/24)}d ago`}function a8(e,t){const n=R1(e);return n?`${n}/tx/${t}`:null}function kD(e,t){const n=R1(e);return n?`${n}/address/${t}`:null}function yc(e){return/^\d+(\.\d+)?$/.test(e.trim())?/[1-9]/.test(e):!1}function ED(e){return/^\d+$/.test(e.trim())&&Number(e)>0}function Ug(e,t){const n=/^(\d+)(?:\.(\d+))?$/.exec(e.trim());if(!n)return null;const r=n[1]??"0",o=(n[2]??"").slice(0,t).padEnd(t,"0");try{return BigInt(r)*10n**BigInt(t)+BigInt(o||"0")}catch{return null}}function Ss(e){return e instanceof Error?e.message:String(e)}function N2(e,t){return e==null||!Number.isFinite(e)||!t?"—":`${(e*100/t).toFixed(2)}%`}function Xa(e){const t=typeof e=="bigint"?e:ht(e);if(t===null)return"—";const n=t<0n,r=(n?-t:t)/10000n,o=Number(r)/100,i=n?"-":"";return o>=1e6?`${i}$${(o/1e6).toFixed(o>=1e7?0:1)}M`:o>=1e3?`${i}$${(o/1e3).toFixed(o>=1e4?0:1)}k`:o>=100?`${i}$${o.toFixed(0)}`:`${i}$${o.toFixed(2)}`}const AD=3e3;let dc=0;const as=new Map,fc=new Map,$g=new Set;function zg({clear:e=!1,confirmed:t=!1}={}){if(dc++,fc.clear(),e)as.clear();else for(const n of as.values())n.at=0,n.reconciling||(n.reconciling=t);for(const n of $g)n(e,t)}function SD(e,t=document,n=window){let r=!1;const o=()=>{r||t.visibilityState!=="visible"||(r=!0,e())},i=n.setTimeout(o,AD);return t.addEventListener("visibilitychange",o),()=>{r=!0,n.clearTimeout(i),t.removeEventListener("visibilitychange",o)}}function ss(e){const t=e!==null?as.get(e):void 0;return t?{key:e,data:t.data,error:null,loading:!1,reconciling:t.reconciling??!1,partial:t.partial??!1,updatedAt:t.at}:{key:e,data:null,error:null,loading:e!==null,reconciling:!1,partial:!1,updatedAt:null}}function tt(e,t,n=6e4,r={}){const[o,i]=P.useState(()=>ss(e)),l=P.useRef(t);l.current=t;const c=P.useRef(r);c.current=r;const u=P.useRef(e);u.current=e;const p=P.useRef(!0),f=P.useRef(0);P.useEffect(()=>(p.current=!0,()=>{p.current=!1}),[]);const m=P.useCallback((b,C=!1)=>{const j=dc;i(A=>{const S=A.key===b?A:ss(b);return{...S,loading:!0,error:null,reconciling:C||S.reconciling}});let I=fc.get(b);if(!I){const A=l.current();I=A,fc.set(b,A),A.then(S=>{var R,M,H,V,W,L;if(j!==dc)return;const N=((M=(R=c.current).isPartial)==null?void 0:M.call(R,S))??!1,T=as.get(b);if((V=(H=c.current).isSyncing)!=null&&V.call(H,S)){const J=T&&!c.current.isSyncing(T.data);as.set(b,{data:J?T.data:S,at:0,partial:J?T.partial:N,reconciling:!0});return}const B=N&&T&&!((L=(W=c.current).isPartial)!=null&&L.call(W,T.data));as.set(b,{data:B?T.data:S,at:B?T.at:Date.now(),partial:N})}).catch(()=>{}).finally(()=>{fc.get(b)===A&&fc.delete(b)})}I.then(()=>{!p.current||u.current!==b||j!==dc||i(ss(b))},A=>{if(!p.current||u.current!==b||j!==dc)return;const S=A instanceof a5,N=as.get(b);S&&N&&(N.at=0,N.reconciling=!0),i(T=>{const B=T.key===b?T:ss(b);return{...B,key:b,loading:!1,reconciling:S||B.reconciling,error:S?null:Ss(A)}})})},[]);P.useEffect(()=>{if(e===null){i(ss(null));return}const b=as.get(e);b&&(i(ss(e)),!b.partial&&Date.now()-b.at<n)||m(e)},[e,m,n]),P.useEffect(()=>{const b=(C,j)=>{u.current!==null&&(C&&u.current!=="config"&&i(ss(u.current)),m(u.current,j&&!C))};return $g.add(b),()=>{$g.delete(b)}},[m]);const g=P.useCallback(()=>{u.current!==null&&m(u.current)},[m]);P.useEffect(()=>{f.current=0},[e]),P.useEffect(()=>{if(!o.error){o.loading||(f.current=0);return}if(c.current.retryOnError===!1||e===null||f.current>=2||!/rate limit|network error|HTTP 5\d\d|timeout/i.test(o.error))return;const b=window.setTimeout(()=>{f.current+=1,m(e)},25e3*(f.current+1));return()=>window.clearTimeout(b)},[e,o.error,o.loading,m]);const v=o.key===e&&o.reconciling&&!o.error;P.useEffect(()=>{if(!(!v||o.loading||e===null))return SD(()=>m(e))},[e,v,o.loading,m]);const w=o.key===e?o:ss(e);return{data:w.data,error:w.error,loading:w.loading,reconciling:w.reconciling,partial:w.partial,updatedAt:w.updatedAt,refresh:g}}const jD={overview:"stake",pools:"stake",usage:"network",emissions:"network",verification:"network"};function ID(e){return l5.some(t=>t===e)}function ND(e){const t=e.startsWith("#")?e.slice(1):e,[n="",r=""]=t.split("?"),o=n.split("/").filter(Boolean),i=o[0],l=i!==void 0?jD[i]:void 0,c=ID(i)?i:l??"stake",u=Er().pages;return{page:u.includes(c)?c:u[0]??c,segments:o.slice(1),query:new URLSearchParams(r),redirected:l!==void 0}}function P2(){const e=ND(Er().currentPath());return e.redirected&&Er().replace(e.page),e}function PD(){const[e,t]=P.useState(P2);return P.useEffect(()=>{const n=()=>t(P2());return Er().subscribe(n)},[]),e}function el(e,...t){return Er().href([e,...t].join("/"))}const l8="ants.dashboard.started-jobs";function BD(){try{const e=JSON.parse(sessionStorage.getItem(l8)??"[]");return new Set(Array.isArray(e)?e.filter(t=>typeof t=="string").slice(-100):[])}catch{return new Set}}function TD(e,t){const n=new Set([...e,t].slice(-100));try{sessionStorage.setItem(l8,JSON.stringify([...n]))}catch{}return n}const c8=P.createContext(null),u8=()=>P.useContext(c8);function _D(e,t){var n,r;return e.browserWallet?t.status==="connecting"||t.status==="reconnecting"?{label:"Connecting wallet…",reason:"Wait for the wallet connection to finish."}:t.status!=="connected"||!t.address?{label:"Connect wallet",reason:"Connect wallet before submitting a transaction."}:t.chainId!==e.evmChainId?{label:"Switch network",reason:`Switch your wallet to ${e.chainId}.`}:e.readOnly||t.address.toLowerCase()!==((n=e.walletAddress)==null?void 0:n.toLowerCase())?{label:"Waiting for wallet sync…",reason:"Wait for the connected wallet to sync with the dashboard."}:((r=t.clientAddress)==null?void 0:r.toLowerCase())!==t.address.toLowerCase()||t.clientChainId!==e.evmChainId?{label:"Waiting for wallet…",reason:"The connected wallet is not ready to sign yet."}:{}:{}}const RD=2e3,OD=8e3,MD=new Set(["stake","restake","stake-usage","compound"]),d8=P.createContext(null);function Bs(){const e=P.useContext(d8);if(!e)throw new Error("JobsContext is not mounted");return e}const FD={stake:"Stake",move:"Move stake",split:"Split position",merge:"Merge positions",extend:"Extend lock","max-lock":"Max lock",withdraw:"Withdraw",claim:"Claim rewards",restake:"Stake rewards","stake-usage":"Stake rewards",compound:"Stake rewards","verify-submit":"Submit proof","seller-register":"Register seller","claim-starter":"Claim starter"};function O1(e){const t=FD[e];if(t)return t;const n=e.replace(/[-_]+/g," ").trim();return n?n.charAt(0).toUpperCase()+n.slice(1):"Transaction"}function LD(e,t){const n=t,o=(Array.isArray(n==null?void 0:n.positionIds)?n.positionIds:[n==null?void 0:n.positionId]).filter(i=>typeof i=="number"&&Number.isSafeInteger(i)&&i>0);return`${O1(e)}${o.length?` · position${o.length>1?"s":""} ${o.map(i=>`#${i}`).join(", ")}`:""}`}function B2(e){return[...e].sort((t,n)=>n.startedAt-t.startedAt)}function DD({children:e}){const t=u8(),n=P.useRef(t);n.current=t;const r=P.useRef(new Map),o=P.useCallback(W=>r.current.get(W)??"Transaction",[]),[i,l]=P.useState([]),[c,u]=P.useState(BD),p=P.useRef(c),[f,m]=P.useState(!1),[g,v]=P.useState(null),[w,b]=P.useState([]),C=P.useRef(new Map),j=P.useRef(0),I=P.useRef(new Map),A=P.useCallback(W=>{const L=I.current.get(W);L!==void 0&&(window.clearTimeout(L),I.current.delete(W)),b(J=>J.filter(O=>O.id!==W))},[]),S=P.useCallback(W=>{const L=++j.current;b(J=>[...J.filter(O=>!W.jobId||O.jobId!==W.jobId),{...W,id:L}]),W.sticky||I.current.set(L,window.setTimeout(()=>A(L),OD))},[A]);P.useEffect(()=>{const W=I.current;return()=>{for(const L of W.values())window.clearTimeout(L);W.clear()}},[]);const N=P.useCallback((W,L)=>{var G,ee;let J=!1,O=!1;for(const F of W){r.current.has(F.id)||r.current.set(F.id,O1(F.kind));let K=C.current.get(F.id);if(!K){const Y=L||F.status!=="running"&&!p.current.has(F.id);if(K={hashes:new Set,terminal:Y&&F.status!=="running"},Y)for(const U of F.steps)U.hash&&K.hashes.add(U.hash);C.current.set(F.id,K)}for(const Y of F.steps)!Y.hash||K.hashes.has(Y.hash)||(K.hashes.add(Y.hash),L||S({tone:"success",jobId:F.id,title:`${o(F.id)} · Confirmed`,body:Y.label,hash:Y.hash,sticky:!1}));if(F.status!=="running"&&!K.terminal){if(K.terminal=!0,J=!0,O||(O=F.steps.some(Y=>!!Y.hash)),F.status==="failed")S({tone:"danger",jobId:F.id,title:`${o(F.id)} · ${(G=F.error)!=null&&G.startsWith("You rejected")?"Rejected":"Failed"}`,body:F.error??"The transaction did not complete.",sticky:!0});else if(!L){const Y=MD.has(F.kind)?{href:el("positions"),label:"View my positions"}:void 0;S({tone:"success",jobId:F.id,title:`${o(F.id)} · ${F.steps.some(U=>!!U.hash)?"Confirmed":"Complete"}`,hash:(ee=[...F.steps].reverse().find(U=>!!U.hash))==null?void 0:ee.hash,sticky:!!Y,link:Y})}}}l(B2(W)),J&&!L&&zg({confirmed:O})},[S,o]),T=P.useRef(!0),B=P.useCallback(async()=>{const W=T.current;try{const L=await Ye.jobs();N(L,W),T.current=!1,v(null)}catch(L){v(Ss(L))}},[N]);P.useEffect(()=>{B()},[B]);const R=P.useMemo(()=>i.filter(W=>W.status==="running").length,[i]),M=R>0;P.useEffect(()=>{if(!f&&!M)return;let W=!1,L=0;const J=async()=>{W||(await B(),!W&&(L=window.setTimeout(()=>void J(),RD)))};return J(),()=>{W=!0,window.clearTimeout(L)}},[f,M,B]);const H=P.useCallback(async(W,L)=>{var O;(O=n.current)==null||O.assertReady();const J=await Ye.startJob(W,L);return r.current.set(J.id,LD(J.kind,L)),p.current=TD(p.current,J.id),u(p.current),T.current=!1,C.current.has(J.id)||C.current.set(J.id,{hashes:new Set,terminal:!1}),v(null),l(G=>B2([J,...G.filter(ee=>ee.id!==J.id)])),J},[]),V=P.useMemo(()=>({jobs:i,locallyStartedJobIds:c,pending:R,running:M,drawerOpen:f,pollError:g,toasts:w,setDrawerOpen:m,dismissToast:A,pushToast:S,titleForJob:o,start:H}),[i,c,R,M,f,g,w,A,S,o,H]);return h.jsx(d8.Provider,{value:V,children:e})}const ua={rejected:"You rejected the wallet request. This request was not submitted.",disconnected:"The wallet disconnected or no longer permits this request. Reconnect before retrying.",network:"The wallet is on the wrong network. Switch to the dashboard network before retrying.",reverted:"The contract rejected this transaction during wallet simulation. Refresh the position and review its action restrictions.",unknown:"The wallet could not complete the request. Check its activity before retrying; the submission status is unknown."};function UD(e){const t=new Set;let n=e,r=ua.unknown;for(;n&&typeof n=="object"&&!t.has(n);){t.add(n);const o=n;if(o.code===4001||o.name==="UserRejectedRequestError")return ua.rejected;if(o.code===4100||o.code===4900||o.name==="ProviderDisconnectedError"||o.name==="ConnectorNotConnectedError")return ua.disconnected;if(o.code===4901)return ua.network;(o.name==="ChainMismatchError"||o.name==="SwitchChainError"||o.name==="ChainDisconnectedError")&&(r=ua.network),(o.name==="ContractFunctionRevertedError"||o.name==="ExecutionRevertedError")&&(r=ua.reverted),n=o.cause}return r}class $D{constructor(){er(this,"attempted",new Set)}canPrompt(t){var r,o;const n=t.transaction;return!!(n!=null&&n.jobId)&&t.locallyStartedJobIds.has(n.jobId)&&!t.busy&&!t.settling&&!n.approvalStarted&&!n.submittedHash&&!this.attempted.has(n.id)&&((r=t.accountAddress)==null?void 0:r.toLowerCase())===n.from.toLowerCase()&&((o=t.walletAddress)==null?void 0:o.toLowerCase())===n.from.toLowerCase()&&t.expectedChainId===n.chainId&&t.accountChainId===n.chainId&&t.walletChainId===n.chainId}claim(t){return this.canPrompt(t)?(this.attempted.add(t.transaction.id),!0):!1}}class zD{constructor(t){er(this,"results",new Map);er(this,"delivering",new Set);this.send=t}enqueue(t){this.results.has(t.id)||this.results.set(t.id,t)}async deliver(t){if(!t||this.delivering.has(t))return;const n=this.results.get(t);if(n){this.delivering.add(t);try{await this.send(n),this.results.delete(t)}catch{return}finally{this.delivering.delete(t)}}}}const WD=new S_,qD=wk(wD),HD=HT;function VD({config:e,children:t}){const n=P.useMemo(()=>yD({appName:"AntSeed Staking",projectId:vD,chains:[Q3({id:e.evmChainId,name:e.chainId,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:[e.walletRpcUrl??(e.evmChainId===8453?"https://mainnet.base.org":e.evmChainId===84532?"https://sepolia.base.org":"http://127.0.0.1:8545")]}}})],transports:{[e.evmChainId]:VC()}}),[e.chainId,e.evmChainId,e.walletRpcUrl]);return e.browserWallet?h.jsx(HD,{config:n,children:h.jsx($_,{client:WD,children:h.jsx(LF,{theme:qD,children:h.jsx(QD,{config:e,children:t})})})}):h.jsx(h.Fragment,{children:t})}function QD({config:e,children:t}){const n=zt(),{data:r}=gk(),o=_D(e,{status:n.status,address:n.address,chainId:n.chainId,clientAddress:r==null?void 0:r.account.address,clientChainId:r==null?void 0:r.chain.id}),i=P.useRef(o);i.current=o;const l=P.useCallback(()=>{if(i.current.reason)throw new Error(i.current.reason)},[]);return h.jsx(c8.Provider,{value:{...o,assertReady:l},children:t})}function GD({config:e}){const t=zt(),{jobs:n,running:r,locallyStartedJobIds:o,pushToast:i,titleForJob:l}=Bs(),{data:c}=gk(),[u,p]=P.useState(null),[f,m]=P.useState(null),[g,v]=P.useState(!1),w=P.useRef(!1),b=P.useRef(new $D),C=P.useRef(new Map),j=P.useRef(null),I=P.useRef(Promise.resolve()),A=P.useRef(new zD(M=>Js("/api/wallet/result",{method:"POST",body:M}))),S=P.useRef(!1);S.current=r||g||u!==null;const N=!!t.address&&t.chainId!==e.evmChainId,T=t.status==="connecting"||t.status==="reconnecting";P.useEffect(()=>{f&&i({tone:"danger",title:"Wallet request failed",body:f,sticky:!0})},[f,i]),P.useEffect(()=>{var G;if(T)return;let M=!1,H;const V=`${((G=t.address)==null?void 0:G.toLowerCase())??""}:${t.chainId??""}`,W=!!j.current&&!j.current.startsWith(":");let L=!1;function J(ee=!1){L||M||(L=!0,I.current=I.current.catch(()=>{}).then(async()=>{if(!M)try{const F=ee&&!N,K=N||!t.address&&W,Y=await Js("/api/wallet",{method:"POST",body:{address:N?void 0:t.address,chainId:t.chainId,refresh:F,disconnect:K}});if(!M){const U=Y.changed??j.current!==V;j.current=V,m(null),(U||F)&&zg({clear:U})}}catch(F){M||(m(F instanceof Error?F.message:String(F)),e.selectedAddress&&F instanceof ys&&F.status===400?zg():H=setTimeout(()=>J(ee),1500))}finally{L=!1}}))}J();const O=()=>{S.current||J(!0)};return window.addEventListener("focus",O),()=>{M=!0,clearTimeout(H),window.removeEventListener("focus",O)}},[t.address,t.chainId,N,T,e.selectedAddress]),P.useEffect(()=>{let M=!1,H;const V=async()=>{try{const W=await Js("/api/wallet/request");M||(p(W),await A.current.deliver((W==null?void 0:W.id)??null))}catch{}finally{M||(H=setTimeout(()=>void V(),r||u!==null?1e3:3e4))}};return V(),()=>{M=!0,clearTimeout(H)}},[r,u!==null]),P.useEffect(()=>{if(!(u!=null&&u.jobId))return;const M=n.find(V=>V.id===u.jobId);if(!M||M.status!=="running")return;const H=u.submittedHash?"Submitted":"Awaiting wallet approval";C.current.get(u.id)!==H&&C.current.get(u.id)!=="Submitted"&&(C.current.set(u.id,H),i({tone:"info",jobId:u.jobId,title:`${l(u.jobId)} · ${H}`,body:u.submittedHash?"Waiting for on-chain confirmation.":"No transaction has been submitted yet.",hash:u.submittedHash,sticky:!0}))},[u,n,i,l]);const B=P.useCallback(async()=>{var H;if(!u||!c||w.current||u.submittedHash)return;w.current=!0,v(!0),m(null);let M=!1;try{if(c.account.address.toLowerCase()!==u.from.toLowerCase()||((H=t.address)==null?void 0:H.toLowerCase())!==u.from.toLowerCase()||t.chainId!==u.chainId||c.chain.id!==u.chainId||e.evmChainId!==u.chainId)throw new Error("Connect the wallet and network shown in this request.");await Js("/api/wallet/begin",{method:"POST",body:{id:u.id}}),M=!0;const V=await c.sendTransaction({account:c.account,chain:c.chain,to:u.to,data:u.data,value:BigInt(u.value)});A.current.enqueue({id:u.id,hash:V}),C.current.set(u.id,"Submitted"),i({tone:"info",jobId:u.jobId,title:`${l(u.jobId??"")} · Submitted`,body:"Waiting for on-chain confirmation.",hash:V,sticky:!0}),await A.current.deliver(u.id)}catch(V){const W=UD(V);M?(A.current.enqueue({id:u.id,error:W}),await A.current.deliver(u.id)):m(W)}finally{w.current=!1,v(!1)}},[u,c,t.address,t.chainId,e.evmChainId,i,l]),R=P.useMemo(()=>({transaction:u,locallyStartedJobIds:o,accountAddress:t.address,accountChainId:t.chainId,walletAddress:c==null?void 0:c.account.address,walletChainId:c==null?void 0:c.chain.id,expectedChainId:e.evmChainId,busy:g,settling:T}),[u,o,t.address,t.chainId,c,e.evmChainId,g,T]);return P.useEffect(()=>{b.current.claim(R)&&B()},[R,B]),h.jsxs("div",{className:"browser-wallet",children:[h.jsx(wh,{accountStatus:"address",chainStatus:"icon",showBalance:!1}),N&&h.jsxs("span",{className:"hint",children:["Switch to ",e.chainId," to continue."]})]})}function KD(){return h.jsx(wh.Custom,{children:({account:e,chain:t,openConnectModal:n,openAccountModal:r,openChainModal:o,mounted:i})=>h.jsx("button",{className:"btn",disabled:!i,onClick:e?t!=null&&t.unsupported?o:r:n,children:e?t!=null&&t.unsupported?"Switch network":"Change wallet":"Connect wallet"})})}function pl(...e){return e.filter(Boolean).join(" ")}function pt({children:e,className:t,fullWidth:n=!1,leadingIcon:r,size:o="md",type:i="button",variant:l="primary",...c}){return h.jsxs("button",{type:i,className:pl("btn",`btn--${l}`,`btn--${o}`,n&&"btn--full",t),...c,children:[r?h.jsx("span",{className:"btn__icon","aria-hidden":"true",children:r}):null,h.jsx("span",{className:"btn__label",children:e})]})}function Kr({children:e,className:t,tone:n="surface",...r}){return h.jsx("div",{className:pl("card",n!=="surface"&&`card--${n}`,t),...r,children:e})}function Yc({action:e,children:t,className:n,title:r,tone:o="info",...i}){return h.jsxs("div",{className:pl("alert",`alert--${o}`,n),role:o==="danger"||o==="warning"?"alert":"status",...i,children:[h.jsxs("div",{className:"alert__content",children:[r?h.jsx("div",{className:"alert__title",children:r}):null,h.jsx("div",{className:"alert__body",children:t})]}),e?h.jsx("div",{className:"alert__action",children:e}):null]})}function M1({className:e,height:t,radius:n,style:r,width:o,...i}){return h.jsx("div",{className:pl("skeleton",e),style:{...r,...t!==void 0?{height:t}:{},...n!==void 0?{borderRadius:n}:{},...o!==void 0?{width:o}:{}},...i})}function YD({className:e,error:t,hint:n,id:r,label:o,...i}){const l=r??i.name;return h.jsxs("label",{className:pl("field",e),htmlFor:l,children:[o?h.jsx("span",{className:"field__label",children:o}):null,h.jsx("input",{id:l,className:"field__input",...i}),t?h.jsx("span",{className:"field__error",children:t}):n?h.jsx("span",{className:"field__hint",children:n}):null]})}function F1({children:e,className:t,label:n,type:r="button",...o}){return h.jsx("button",{type:r,className:pl("icon-button",t),"aria-label":n,title:o.title??n,...o,children:e})}const f8=P.createContext(null);function Bi(){const e=P.useContext(f8);if(!e)throw new Error("AppContext is not mounted");return e}function Ts(){return Bi().config}function dr(){var e;return((e=Bi().overview)==null?void 0:e.epoch)??null}function ju({rows:e=4,width:t}){return h.jsx("div",{className:"skel-list","aria-busy":"true",children:Array.from({length:e},(n,r)=>h.jsx(M1,{height:14,width:t??`${60+r*17%40}%`},r))})}function nn({error:e,onRetry:t,title:n}){return h.jsx(Yc,{tone:"danger",title:n,action:t?h.jsx(pt,{variant:"outline",size:"sm",onClick:t,children:"Retry"}):void 0,children:h.jsx("span",{className:"break",children:e})})}function Ch(){return h.jsx("span",{className:"spinner","aria-label":"loading"})}function kh(e=1e3){const[t,n]=P.useState(()=>Date.now());return P.useEffect(()=>{const r=window.setInterval(()=>n(Date.now()),e);return()=>window.clearInterval(r)},[e]),t}function h8(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M4 4L12 12M12 4L4 12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})})}function JD(){return h.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M2.5 6.2l2.4 2.4 4.6-4.9",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})})}function ZD(){return h.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M3 3l6 6M9 3l-6 6",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})})}function p8({status:e}){return e==="running"?h.jsx("span",{className:"status-icon status-icon--running",title:"Pending",children:h.jsx(Ch,{})}):e==="done"?h.jsx("span",{className:"status-icon status-icon--done",title:"Confirmed",children:h.jsx(JD,{})}):h.jsx("span",{className:"status-icon status-icon--failed",title:"Failed",children:h.jsx(ZD,{})})}function m8({hash:e,showHash:t=!1}){const{evmChainId:n}=Ts(),r=a8(n,e),o=xD(n);return!r||!o?h.jsx("span",{className:"activity-hash mono",title:e,children:Dg(e)}):h.jsxs("span",{className:"activity-link-wrap",children:[h.jsxs("a",{className:"activity-link",href:r,target:"_blank",rel:"noreferrer",title:e,children:["View on ",o]}),t?h.jsx("span",{className:"activity-hash mono dim",children:Dg(e)}):null]})}function XD(){const{drawerOpen:e,setDrawerOpen:t}=Bs();if(P.useEffect(()=>{if(!e)return;const r=o=>{o.key==="Escape"&&t(!1)};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[e,t]),!e)return null;const n=()=>t(!1);return h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"drawer-backdrop",onClick:n}),h.jsxs("aside",{className:"drawer activity-drawer",role:"dialog","aria-modal":"true","aria-label":"Activity",children:[h.jsxs("header",{className:"drawer-header",children:[h.jsx("div",{className:"drawer-titles",children:h.jsx("h2",{className:"drawer-title",children:"Activity"})}),h.jsx(F1,{label:"Close",className:"drawer-close",onClick:n,children:h.jsx(h8,{})})]}),h.jsx("div",{className:"drawer-body",children:h.jsx(eU,{})})]})]})}function eU(){const{jobs:e,pollError:t}=Bs(),n=kh(1e3);return h.jsxs(h.Fragment,{children:[e.length===0?h.jsx("div",{className:"activity-empty",children:"No recorded transactions. Signed-wallet activity is saved locally for 30 days."}):h.jsx("ol",{className:"activity-list",children:e.map(r=>h.jsx(tU,{job:r,now:n},r.id))}),t?h.jsxs("div",{className:"activity-poll-error",children:["Could not refresh activity: ",t]}):null]})}function tU({job:e,now:t}){var o;const n=e.steps.filter(i=>i.hash),r=(o=e.steps[0])==null?void 0:o.label;return h.jsxs("li",{className:`activity-row activity-row--${e.status}`,children:[h.jsxs("div",{className:"activity-main",children:[h.jsx("div",{className:"activity-title",children:O1(e.kind)}),r?h.jsx("div",{className:"activity-sub",children:r}):null,e.steps.length>1?h.jsxs("details",{children:[h.jsx("summary",{children:"Action steps"}),h.jsx("ol",{children:e.steps.map((i,l)=>h.jsx("li",{children:i.label},l))})]}):null,e.status==="failed"&&e.error?h.jsx("div",{className:"activity-error",children:e.error}):null,n.length>0?h.jsx("div",{className:"activity-links",children:n.map(i=>h.jsx(m8,{hash:i.hash,showHash:n.length>1},i.hash))}):null]}),h.jsxs("div",{className:"activity-side",children:[h.jsx(p8,{status:e.status}),h.jsx("span",{className:"activity-time",children:CD(e.startedAt,t)})]})]})}function ut({value:e,kind:t="address",short:n=!0,label:r,copy:o=!1,className:i}){const{evmChainId:l}=Ts(),c=t==="tx"?a8(l,e):kD(l,e),u=r??(n?t==="tx"?Dg(e):bh(e):e),p=`mono ${i??""}`.trim();return h.jsxs("span",{className:"nowrap",children:[c?h.jsx("a",{className:p,href:c,target:"_blank",rel:"noreferrer",title:e,children:u}):h.jsx("span",{className:p,title:e,children:u}),o?h.jsx(nU,{value:e}):null]})}function nU({value:e}){const[t,n]=P.useState(!1),r=()=>{var o;(o=navigator.clipboard)==null||o.writeText(e).then(()=>{n(!0),window.setTimeout(()=>n(!1),1200)}).catch(()=>{})};return h.jsx("button",{className:"link-button",style:{marginLeft:6},onClick:r,type:"button",title:"Copy",children:t?"copied":"copy"})}function rU(){const{toasts:e,dismissToast:t}=Bs();return e.length===0?null:h.jsx("div",{className:"toasts",role:"region","aria-label":"Transaction notifications",children:e.map(n=>h.jsxs("div",{className:`toast toast--${n.tone}`,role:n.tone==="danger"?"alert":"status",children:[h.jsx(p8,{status:n.tone==="danger"?"failed":n.tone==="info"?"running":"done"}),h.jsxs("div",{className:"toast-body",children:[h.jsx("div",{className:"toast-title",children:n.title}),n.body?h.jsx("div",{className:"toast-text",children:n.body}):null,n.hash?h.jsx(m8,{hash:n.hash}):null,n.link?h.jsxs("a",{className:"toast-link",href:n.link.href,children:[n.link.label," →"]}):null]}),h.jsx(F1,{label:"Dismiss",className:"toast-close",onClick:()=>t(n.id),children:h.jsx(h8,{})})]},n.id))})}function oU({page:e,updatedAt:t,children:n}){return h.jsxs("div",{className:"app",children:[h.jsx(sU,{page:e,updatedAt:t}),h.jsx("div",{className:"content",children:h.jsx("main",{className:"main",children:n})}),h.jsx(XD,{}),h.jsx(rU,{})]})}function sU({page:e,updatedAt:t}){const{config:n,theme:r,toggleTheme:o}=Bi();return h.jsxs("aside",{className:"sidebar",children:[h.jsxs("a",{className:"wordmark",href:el("stake"),children:["ANTS",h.jsx("span",{children:"staking"})]}),h.jsx("nav",{className:"sidenav","aria-label":"Main",children:wj.map(i=>h.jsxs("div",{className:"sidenav-group",children:[h.jsx("div",{className:"sidenav-label",children:i.label}),i.items.map(l=>h.jsxs("a",{href:el(l.id),className:l.id===e?"sidenav-item active":"sidenav-item","aria-current":l.id===e?"page":void 0,children:[h.jsx(aU,{page:l.id}),h.jsx("span",{children:l.label})]},l.id))]},i.label))}),h.jsxs("div",{className:"sidebar-foot",children:[h.jsx(iU,{updatedAt:t}),n.selectedAddress&&h.jsxs("div",{className:"small",children:["Selected account ",h.jsx(ut,{value:n.selectedAddress,copy:!0})]}),h.jsxs("div",{className:"sidebar-foot-row",children:[n.browserWallet?h.jsx(GD,{config:n}):h.jsx("span",{className:"wallet-chip",children:h.jsx(ut,{value:n.address,copy:!0,className:"wallet-chip-addr"})}),h.jsx(F1,{label:r==="dark"?"Switch to light theme":"Switch to dark theme",className:"theme-toggle",onClick:o,children:r==="dark"?h.jsx(lU,{}):h.jsx(cU,{})})]})]})]})}function iU({updatedAt:e}){const{overview:t}=Bi(),n=kh(3e4);if(!t)return null;const r=t.epoch,o=e!==null?e+r.secondsToBoundary*1e3:r.nextBoundaryAt*1e3,i=Math.max(0,Math.floor((o-n)/1e3)),l=h.jsxs(h.Fragment,{children:[h.jsx("i",{"aria-hidden":"true"}),h.jsxs("span",{children:["epoch ",h.jsx("strong",{children:r.current})]}),h.jsxs("span",{children:["· ",h.jsx("strong",{children:xh(i)})," left"]})]}),c="Current epoch and time until the next boundary";return Er().pages.includes("network")?h.jsx("a",{className:"epoch-chip",href:el("network"),title:c,children:l}):h.jsx("span",{className:"epoch-chip",title:c,children:l})}function aU({page:e}){const t={width:16,height:16,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0};switch(e){case"stake":return h.jsx("svg",{...t,children:h.jsx("path",{d:"M2 13h12M3.5 10.5v-3M7 10.5V4M10.5 10.5V6.5M14 10.5V2.5"})});case"positions":return h.jsxs("svg",{...t,children:[h.jsx("path",{d:"M8 2.5 14 5.5 8 8.5 2 5.5Z"}),h.jsx("path",{d:"m2 8.5 6 3 6-3M2 11.5l6 3 6-3"})]});case"rewards":return h.jsxs("svg",{...t,children:[h.jsx("circle",{cx:"8",cy:"8",r:"5.5"}),h.jsx("path",{d:"M8 5v6M6.2 6.6c0-.9.8-1.4 1.8-1.4s1.8.5 1.8 1.2c0 1.6-3.6.9-3.6 2.5 0 .8.8 1.3 1.8 1.3s1.8-.5 1.8-1.3"})]});case"seller":return h.jsxs("svg",{...t,children:[h.jsx("rect",{x:"2.5",y:"3",width:"11",height:"10",rx:"1.5"}),h.jsx("circle",{cx:"6",cy:"7",r:"1.5"}),h.jsx("path",{d:"M4 11c.5-1 1.2-1.5 2-1.5s1.5.5 2 1.5M9.5 6.5h2.5M9.5 9h2.5"})]});case"network":return h.jsxs("svg",{...t,children:[h.jsx("circle",{cx:"8",cy:"8",r:"5.5"}),h.jsx("path",{d:"M2.5 8h11M8 2.5c1.8 1.8 1.8 9.2 0 11M8 2.5c-1.8 1.8-1.8 9.2 0 11"})]});case"addresses":return h.jsxs("svg",{...t,children:[h.jsx("path",{d:"M6.5 9.5a2.5 2.5 0 0 0 3.5 0l2-2a2.5 2.5 0 0 0-3.5-3.5l-.8.8"}),h.jsx("path",{d:"M9.5 6.5a2.5 2.5 0 0 0-3.5 0l-2 2a2.5 2.5 0 0 0 3.5 3.5l.8-.8"})]});default:return null}}function lU(){return h.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("circle",{cx:"8",cy:"8",r:"3",stroke:"currentColor",strokeWidth:"1.5"}),h.jsx("path",{d:"M8 1.5v2M8 12.5v2M1.5 8h2M12.5 8h2M3.4 3.4l1.4 1.4M11.2 11.2l1.4 1.4M3.4 12.6l1.4-1.4M11.2 4.8l1.4-1.4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}function cU(){return h.jsx("svg",{width:"15",height:"15",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M13.5 9.5A6 6 0 0 1 6.5 2.5a6 6 0 1 0 7 7z",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"})})}function Dt({title:e,actions:t,children:n,className:r,tone:o}){return h.jsxs(Kr,{className:`panel ${r??""}`.trim(),tone:o,children:[e||t?h.jsxs("div",{className:"panel-head",children:[e?h.jsx("h3",{children:e}):h.jsx("span",{}),t?h.jsx("div",{className:"row",children:t}):null]}):null,n]})}function $t({items:e}){return h.jsx("dl",{className:"facts",children:e.map(([t,n])=>h.jsx(uU,{label:t,value:n},t))})}function uU({label:e,value:t}){return h.jsxs(h.Fragment,{children:[h.jsx("dt",{children:e}),h.jsx("dd",{children:t??"—"})]})}function tl({columns:e,rows:t,rowKey:n,empty:r,loading:o,onRowClick:i,footer:l}){const c=u=>[u.align==="right"?"num":"",u.mono?"mono":"",u.className??""].filter(Boolean).join(" ")||void 0;return h.jsx("div",{className:"table-wrap",tabIndex:0,role:"region","aria-label":"Data table; scroll horizontally to see all columns",children:h.jsxs("table",{className:"table",children:[h.jsx("thead",{children:h.jsx("tr",{children:e.map(u=>h.jsx("th",{className:[u.align==="right"?"num":"",u.className??""].filter(Boolean).join(" ")||void 0,title:u.title,"aria-sort":u.sortDirection,children:u.label},u.key))})}),h.jsxs("tbody",{children:[o&&t.length===0?Array.from({length:3},(u,p)=>h.jsx("tr",{children:e.map(f=>h.jsx("td",{children:h.jsx(M1,{width:"70%",height:12})},f.key))},`skel-${p}`)):null,!o&&t.length===0?h.jsx("tr",{children:h.jsx("td",{className:"empty",colSpan:e.length,children:r??"Nothing to show."})}):null,t.map((u,p)=>h.jsx("tr",{className:i?"clickable":void 0,onClick:i?()=>i(u):void 0,children:e.map(f=>h.jsx("td",{className:c(f),children:f.render(u,p)},f.key))},n(u)))]}),l?h.jsx("tfoot",{children:l}):null]})})}function dU(){const e=tt("overview",Ye.overview),t=e.data,n=Object.entries((t==null?void 0:t.addresses)??{}).map(([r,o])=>({name:r,address:o})).sort((r,o)=>r.name.localeCompare(o.name));return h.jsxs(h.Fragment,{children:[h.jsx("h1",{className:"page-title",children:"Addresses"}),e.error&&!t?h.jsx(nn,{error:e.error,onRetry:e.refresh}):null,h.jsx(Dt,{title:"Protocol contracts",children:h.jsx(tl,{columns:[{key:"name",label:"Contract",render:r=>r.name},{key:"address",label:"Address",render:r=>h.jsx(ut,{value:r.address,short:!1,copy:!0})}],rows:n,rowKey:r=>r.name,loading:e.loading&&!t,empty:"No contract addresses are configured for this chain."})})]})}function ir({summary:e,children:t,open:n,className:r,lazy:o=!1}){const[i,l]=P.useState(n??!1);return h.jsxs("details",{className:["details",r??""].filter(Boolean).join(" "),open:n,onToggle:c=>l(c.currentTarget.open),children:[h.jsx("summary",{children:e}),h.jsx("div",{className:"details-body",children:!o||i?t:null})]})}function mm(e,t){if(e===null||t===null||BigInt(t)===0n)return"—";const n=BigInt(e)*10000n/BigInt(t);return`${n/100n}.${(n%100n).toString().padStart(2,"0")}%`}const fU="Early withdrawal permanently burns some principal, based on the remaining lock and configured limits. No penalty after expiry. Preview shows the exact burn and payout. Claim rewards separately.";function Wg(){return h.jsx(Jc,{label:"About the early-exit penalty",children:fU})}function Jc({label:e,children:t,symbol:n="?"}){const r=P.useId(),o=P.useRef(),i=()=>{clearTimeout(o.current)},l=()=>{o.current=setTimeout(()=>p(null),150)};P.useEffect(()=>()=>clearTimeout(o.current),[]);const c=P.useRef(null),[u,p]=P.useState(null),f=()=>{var v;i();const m=(v=c.current)==null?void 0:v.getBoundingClientRect();if(!m)return;const g=m.bottom+240>window.innerHeight;p({left:Math.max(8,Math.min(m.left,window.innerWidth-328)),top:g?m.top-8:m.bottom+8,above:g})};return P.useEffect(()=>{if(!u)return;const m=()=>p(null),g=v=>{v.key==="Escape"&&(v.stopPropagation(),m())};return window.addEventListener("scroll",m,!0),window.addEventListener("resize",m),document.addEventListener("keydown",g,!0),()=>{window.removeEventListener("scroll",m,!0),window.removeEventListener("resize",m),document.removeEventListener("keydown",g,!0)}},[u]),h.jsxs("span",{className:"early-exit-help",children:[h.jsx("button",{ref:c,type:"button",className:"early-exit-help__trigger","aria-label":e,"aria-describedby":u?r:void 0,onMouseEnter:f,onMouseLeave:l,onFocus:f,onBlur:()=>p(null),onClick:f,children:n}),u&&d1.createPortal(h.jsx("span",{id:r,role:"tooltip",className:"early-exit-help__tooltip",onMouseEnter:i,onMouseLeave:l,style:{left:u.left,top:u.top,transform:u.above?"translateY(-100%)":void 0},children:t}),Er().portalTarget())]})}function Sn(e){return e===null?"Unavailable":`${be(e)} ANTS`}const T2={"seller-pools":"Seller pools",usage:"Usage rewards",team:"Team",reserve:"Reserve — base allowance",verification:"Verification"};function hU({data:e}){var m,g;const t=[{key:"name",label:"Bucket",render:v=>T2[v.name]??v.name},{key:"share",label:"Share of scheduled emission",align:"right",mono:!0,render:v=>mm(v.budget,e.emission)},{key:"budget",label:"Bucket allowance",align:"right",mono:!0,render:v=>Sn(v.budget)}],n=[{name:"Staker rewards",budget:e.budgets.staker},{name:"Buyer usage rewards",budget:e.budgets.buyer},{name:"Seller usage rewards",budget:e.budgets.seller}],r=e.buckets.filter(v=>v.budget!==null&&v.nextBudget!==null&&v.budget!==v.nextBudget),o=e.stakerConfig,i=e.usageConfig,l=e.nextStakerConfig,c=e.nextUsageConfig,u=o&&l&&JSON.stringify(o)!==JSON.stringify(l),p=i&&c&&JSON.stringify(i)!==JSON.stringify(c),f=(v,w)=>`${N2(v,e.shareDenominator)} – ${N2(w,e.shareDenominator)}`;return h.jsxs(h.Fragment,{children:[h.jsxs(Dt,{title:h.jsxs(h.Fragment,{children:[`Current epoch reward budgets · epoch ${e.epoch.current}`," ",h.jsx(Jc,{label:"When reward budgets become final",symbol:"i",children:"Budgets can change during the epoch. After it ends, each reward contract fixes its budgets on the first claim or settlement—not at rollover."})]}),children:[h.jsx("p",{className:"hint",children:"Live network-wide budgets—not your wallet rewards or amounts already paid."}),h.jsx(tl,{columns:[{key:"name",label:"Recipient",render:v=>v.name},{key:"budget",label:"Calculated epoch budget",align:"right",mono:!0,render:v=>Sn(v.budget)},{key:"share",label:"Share of epoch emission",align:"right",mono:!0,render:v=>mm(v.budget,e.emission)}],rows:n,rowKey:v=>v.name}),h.jsxs(ir,{summary:"How these budgets are calculated",children:[h.jsx("div",{className:"section-label",children:"Staker rewards"}),o?h.jsx($t,{items:[["Configured share range",f(o.minShareBps,o.maxShareBps)],["Network active stake used by the contract",Sn(e.totalActiveStake)],["Stake target for this epoch",Sn(e.scaledStakeTarget)],["Initial-emission stake target",Sn(o.stakeShareTarget)],["Seller-pools budget cap",Sn(((m=e.buckets.find(v=>v.name==="seller-pools"))==null?void 0:m.budget)??null)]]}):h.jsx("p",{className:"muted",children:"Staker configuration unavailable."}),h.jsx("p",{className:"hint",children:"With positive active stake, the share rises toward the configured maximum as stake grows. The stake target scales with the epoch emission; it is not a hard threshold. Zero active stake produces a zero budget."}),h.jsx("div",{className:"section-label mt",children:"Buyer and seller rewards"}),i?h.jsx($t,{items:[["Buyer share range",f(i.buyerMinShareBps,i.buyerMaxShareBps)],["Seller share range",f(i.sellerMinShareBps,i.sellerMaxShareBps)],["Accounted usage input",e.usageVolume===null?"Unavailable":`${Wn(e.usageVolume)} USDC-equivalent`],["Usage target",`${Wn(i.volumeShareTarget)} USDC-equivalent / epoch`],["Combined usage budget cap",Sn(((g=e.buckets.find(v=>v.name==="usage"))==null?void 0:g.budget)??null)]]}):h.jsx("p",{className:"muted",children:"Usage configuration unavailable."}),h.jsx("p",{className:"hint",children:"The usage input is the larger of the epoch’s total buyer points and total seller points—not their sum. With positive usage, each share rises toward its maximum. If the combined desired budgets exceed the usage bucket limit, the contract scales them proportionally. Zero usage produces zero budgets."}),h.jsx("p",{className:"hint",children:"For a positive input, the curve is minimum + (maximum − minimum) × input / (input + target), with contract integer rounding. A zero target selects the maximum. Displayed budgets come directly from contract getters, not a browser calculation."})]})]}),h.jsxs(Dt,{title:`Emission bucket allowances · epoch ${e.epoch.current}`,children:[h.jsx("p",{className:"hint",children:"Bucket limits, not payouts. Shares use this epoch’s scheduled emission."}),h.jsx(tl,{columns:t,rows:e.buckets,rowKey:v=>v.id,empty:"No emission buckets available."}),h.jsx("p",{className:"hint mt",children:"Unallocated seller-pool and usage allowances go to the burn destination (combined cap: 30% of scheduled emission), then Reserve on top of its base allowance. Requires an on-chain settlement."}),(r.length>0||u||p||e.nextEmission!==e.emission)&&h.jsxs(ir,{summary:`Next epoch · ${e.epoch.current+1}`,children:[h.jsx($t,{items:[["Scheduled emission",Sn(e.nextEmission)],...r.map(v=>[T2[v.name]??v.name,`${Sn(v.nextBudget)} · ${mm(v.nextBudget,e.nextEmission)}`]),...u?[["Staker share range",f(l.minShareBps,l.maxShareBps)],["Staker target at initial emission",Sn(l.stakeShareTarget)]]:[],...p?[["Buyer share range",f(c.buyerMinShareBps,c.buyerMaxShareBps)],["Seller share range",f(c.sellerMinShareBps,c.sellerMaxShareBps)],["Usage target",`${Wn(c.volumeShareTarget)} USDC-equivalent / epoch`]]:[]]}),h.jsx("p",{className:"hint",children:"Next-epoch allowances and configuration are shown separately. They are not a prediction of next epoch’s earned rewards."})]})]})]})}function kr({label:e,value:t,unit:n,sub:r,loading:o,title:i}){return h.jsxs(Kr,{className:"tile",title:i,children:[h.jsx("div",{className:"tile-label",children:e}),o?h.jsx(M1,{width:"60%",height:22,style:{marginTop:3}}):h.jsxs("div",{className:"tile-value",children:[t,n?h.jsx("span",{className:"unit",children:n}):null]}),r?h.jsx("div",{className:"tile-sub",children:r}):null]})}function L1({children:e}){return h.jsx("div",{className:"tiles",children:e})}function Iu({epoch:e,dateOnly:t=!1}){const n=dr();if(e==null)return h.jsx("span",{className:"mono",children:"—"});const r=n?ar(Za(e,n.genesis,n.epochDuration)):null;return t?h.jsx("span",{className:"mono",children:r??"—"}):h.jsxs("span",{className:"mono",title:r??void 0,children:[e,r?h.jsxs("span",{className:"muted small",children:[" ",r.slice(0,10)]}):null]})}function Sa({label:e,hint:t,width:n,children:r}){return h.jsxs("label",{className:["field",n?`field-w-${n}`:""].filter(Boolean).join(" "),children:[h.jsx("span",{className:"field__label",children:e}),r,t?h.jsx("span",{className:"field__hint",children:t}):null]})}function ml({mono:e=!0,width:t="md",className:n,...r}){const o=[`field-w-${t}`,n??""].filter(Boolean).join(" ");return h.jsx(YD,{className:o,...r,style:e?{fontFamily:"var(--font-mono)",fontVariantNumeric:"tabular-nums",...r.style}:r.style})}function ja({className:e,children:t,...n}){const r=["field__input",e??""].filter(Boolean).join(" ");return h.jsx("span",{className:"select-wrap",children:h.jsx("select",{className:r,...n,children:t})})}const pU=[4,8,12,26,52];function mU(){const{overview:e}=Bi(),[t,n]=P.useState(8),[r,o]=P.useState(!1),i=tt(`usage:${t}`,()=>Ye.usage(t)),l=i.data,c=[{key:"epoch",label:"Epoch",render:f=>h.jsx(Iu,{epoch:f.epoch})},{key:"buyer",label:"Your buyer pts",align:"right",mono:!0,render:f=>Fe(f.buyerPoints)},...r?[{key:"wbuyer",label:"Weighted",align:"right",mono:!0,title:"Buyer points after pool weighting",render:f=>Fe(f.weightedBuyerPoints)}]:[],{key:"seller",label:"Your seller pts",align:"right",mono:!0,render:f=>Fe(f.sellerPoints)},{key:"nbuyer",label:"Network buyer",align:"right",mono:!0,render:f=>Fe(f.totalBuyerPoints)},{key:"nseller",label:"Network seller",align:"right",mono:!0,render:f=>Fe(f.totalSellerPoints)},{key:"pool",label:"Pool pts",align:"right",mono:!0,render:f=>Fe(f.totalPoolPoints)},...r?[{key:"wpool",label:"Weighted pool pts",align:"right",mono:!0,render:f=>Fe(f.totalWeightedPoolPoints)}]:[]],u=(l==null?void 0:l.firstRewardedEpoch)??(e==null?void 0:e.epoch.effective)??null,p=u!==null&&(!l||l.currentEpoch<u)?`Usage accounting starts at epoch ${u}.`:"No usage has been recorded for this wallet in the selected epochs.";return h.jsxs(Dt,{title:"Your usage · historical network comparisons",actions:h.jsxs(h.Fragment,{children:[h.jsxs("label",{className:"check small",children:[h.jsx("input",{type:"checkbox",checked:r,onChange:f=>o(f.target.checked)}),"weighted columns"]}),h.jsxs("label",{className:"row small",children:[h.jsx("span",{className:"muted",children:"epochs"}),h.jsx(ja,{value:t,onChange:f=>n(Number(f.target.value)),style:{width:72,minHeight:30,padding:"4px 8px"},children:pU.map(f=>h.jsx("option",{value:f,children:f},f))})]})]}),children:[i.error&&!l?h.jsx(nn,{error:i.error,onRetry:i.refresh}):null,i.error&&l?h.jsxs("div",{className:"status-line",children:["Refresh failed: ",i.error]}):null,l&&h.jsxs("p",{className:"hint",children:[l.source==="indexer"?"Historical rows are indexed data and may lag the current contract snapshot.":"Historical rows are unavailable without the explorer; current totals are read from the chain.",l.sourceError?` ${l.sourceError}`:""]}),h.jsx($t,{items:[["Your buyer points",l?Fe(l.totals.buyerPoints):"…"],["Network buyer points",l?Fe(l.totals.networkBuyerPoints):"…"],["Network seller points",l?Fe(l.totals.networkSellerPoints):"…"],["First rewarded epoch",l?l.firstRewardedEpoch??"—":"…"]]}),h.jsx("div",{className:"mt",children:h.jsx(tl,{columns:c,rows:(l==null?void 0:l.epochs)??[],rowKey:f=>f.epoch,loading:i.loading&&!l,empty:p,footer:l&&l.epochs.length>0?h.jsxs("tr",{children:[h.jsx("td",{children:"Total"}),h.jsx("td",{className:"num mono",children:Fe(l.totals.buyerPoints)}),r?h.jsx("td",{className:"num mono",children:Fe(l.totals.buyerWeightedPoints)}):null,h.jsx("td",{className:"num mono",children:Fe(gU(l.epochs.map(f=>f.sellerPoints)))}),h.jsx("td",{className:"num mono",children:Fe(l.totals.networkBuyerPoints)}),h.jsx("td",{className:"num mono",children:Fe(l.totals.networkSellerPoints)}),h.jsx("td",{}),r?h.jsx("td",{}):null]}):null})}),h.jsxs(ir,{summary:"Policies",children:[h.jsx($t,{items:[["Points policy",l!=null&&l.pointsPolicy?h.jsx(ut,{value:l.pointsPolicy,short:!1}):h.jsx("span",{className:"muted",children:"not set"})],["Pool weight policy",l!=null&&l.poolWeightPolicy?h.jsx(ut,{value:l.poolWeightPolicy,short:!1}):h.jsx("span",{className:"muted",children:"not set"})],["Minimum accounted pool power",l!=null&&l.minimumAccountedPoolPower?`${be(l.minimumAccountedPoolPower,4)} ANTS`:"—"],["Your weighted buyer points",l?Fe(l.totals.buyerWeightedPoints):"…"]]}),h.jsx("p",{className:"hint mt",children:"Points are raw usage units recorded on chain per epoch. Weighted points apply the pool weight policy; pools below the minimum accounted power earn no usage rewards."})]})]})}function gU(e){return e.reduce((t,n)=>{try{return t+BigInt(n)}catch{return t}},0n).toString()}function yU(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Zc(){return Zc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zc.apply(null,arguments)}var qg="data-focus-lock",g8="data-focus-lock-disabled",vU="data-no-focus-lock",wU="data-autofocus-inside",bU="data-no-autofocus",gm={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},y8=p1({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),v8=p1(),xU=p1(),CU=m1({async:!0,ssr:typeof document<"u"}),kU=P.createContext(void 0),EU=[],D1=P.forwardRef(function(t,n){var r,o=P.useState(),i=o[0],l=o[1],c=P.useRef(),u=P.useRef(!1),p=P.useRef(null),f=P.useState({}),m=f[1],g=t.children,v=t.disabled,w=v===void 0?!1:v,b=t.noFocusGuards,C=b===void 0?!1:b,j=t.persistentFocus,I=j===void 0?!1:j,A=t.crossFrame,S=A===void 0?!0:A,N=t.autoFocus,T=N===void 0?!0:N;t.allowTextSelection;var B=t.group,R=t.className,M=t.whiteList,H=t.hasPositiveIndices,V=t.shards,W=V===void 0?EU:V,L=t.as,J=L===void 0?"div":L,O=t.lockProps,G=O===void 0?{}:O,ee=t.sideCar,F=t.returnFocus,K=F===void 0?!1:F,Y=t.focusOptions,U=t.onActivation,X=t.onDeactivation,he=P.useState({}),se=he[0],ie=P.useCallback(function(rt){var sn=rt.captureFocusRestore;if(!p.current){var Ot,Mt=(Ot=document)==null?void 0:Ot.activeElement;p.current=Mt,Mt!==document.body&&(p.current=sn(Mt))}c.current&&U&&U(c.current),u.current=!0,m()},[U]),re=P.useCallback(function(){u.current=!1,X&&X(c.current),m()},[X]),ue=P.useCallback(function(rt){var sn=p.current;if(sn){var Ot=(typeof sn=="function"?sn():sn)||document.body,Mt=typeof K=="function"?K(Ot):K;if(Mt){var ye=typeof Mt=="object"?Mt:void 0;p.current=null,rt?Promise.resolve().then(function(){return Ot.focus(ye)}):Ot.focus(ye)}}},[K]),Se=P.useCallback(function(rt){u.current&&y8.useMedium(rt)},[]),Pe=v8.useMedium,Me=P.useCallback(function(rt){c.current!==rt&&(c.current=rt,l(rt))},[]),mt=Zc((r={},r[g8]=w&&"disabled",r[qg]=B,r),G),It=C!==!0,gt=It&&C!=="tail",Wt=h1([n,Me]),on=P.useMemo(function(){return{observed:c,shards:W,enabled:!w,get active(){return u.current}}},[w,u,W,c]);return E.createElement(P.Fragment,null,It&&[E.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:w?-1:0,style:gm}),H?E.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:w?-1:1,style:gm}):null],!w&&E.createElement(ee,{id:se,sideCar:CU,observed:i,disabled:w,persistentFocus:I,crossFrame:S,autoFocus:T,whiteList:M,shards:W,onActivation:ie,onDeactivation:re,returnFocus:ue,focusOptions:Y,noFocusGuards:C}),E.createElement(J,Zc({ref:Wt},mt,{className:R,onBlur:Pe,onFocus:Se}),E.createElement(kU.Provider,{value:on},g)),gt&&E.createElement("div",{"data-focus-guard":!0,tabIndex:w?-1:0,style:gm}))});D1.propTypes={};function Hg(e,t){return Hg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Hg(e,t)}function AU(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Hg(e,t)}function Xc(e){"@babel/helpers - typeof";return Xc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xc(e)}function SU(e,t){if(Xc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Xc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jU(e){var t=SU(e,"string");return Xc(t)=="symbol"?t:t+""}function IU(e,t,n){return(t=jU(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NU(e,t){function n(r){return r.displayName||r.name||"Component"}return function(o){var i=[],l;function c(){l=e(i.map(function(p){return p.props})),t(l)}var u=(function(p){AU(f,p);function f(){return p.apply(this,arguments)||this}f.peek=function(){return l};var m=f.prototype;return m.componentDidMount=function(){i.push(this),c()},m.componentDidUpdate=function(){c()},m.componentWillUnmount=function(){var v=i.indexOf(this);i.splice(v,1),c()},m.render=function(){return E.createElement(o,this.props)},f})(P.PureComponent);return IU(u,"displayName","SideEffect("+n(o)+")"),u}}var Yr=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t},ji=function(e){return Array.isArray(e)?e:[e]},w8=function(e){return Array.isArray(e)?e[0]:e},PU=function(e){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var t=window.getComputedStyle(e,null);return!t||!t.getPropertyValue?!1:t.getPropertyValue("display")==="none"||t.getPropertyValue("visibility")==="hidden"},b8=function(e){return e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode},x8=function(e){return e===document||e&&e.nodeType===Node.DOCUMENT_NODE},BU=function(e){return e.hasAttribute("inert")},TU=function(e,t){return!e||x8(e)||!PU(e)&&!BU(e)&&t(b8(e))},C8=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=TU(t,C8.bind(void 0,e));return e.set(t,r),r},_U=function(e,t){return e&&!x8(e)?MU(e)?t(b8(e)):!1:!0},k8=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=_U(t,k8.bind(void 0,e));return e.set(t,r),r},E8=function(e){return e.dataset},RU=function(e){return e.tagName==="BUTTON"},A8=function(e){return e.tagName==="INPUT"},S8=function(e){return A8(e)&&e.type==="radio"},OU=function(e){return!((A8(e)||RU(e))&&(e.type==="hidden"||e.disabled))},MU=function(e){var t=e.getAttribute(bU);return![!0,"true",""].includes(t)},U1=function(e){var t;return!!(e&&(!((t=E8(e))===null||t===void 0)&&t.focusGuard))},Vg=function(e){return!U1(e)},FU=function(e){return!!e},LU=function(e,t){var n=Math.max(0,e.tabIndex),r=Math.max(0,t.tabIndex),o=n-r,i=e.index-t.index;if(o){if(!n)return 1;if(!r)return-1}return o||i},DU=function(e){return e.tabIndex<0&&!e.hasAttribute("tabindex")?0:e.tabIndex},$1=function(e,t,n){return Yr(e).map(function(r,o){var i=DU(r);return{node:r,index:o,tabIndex:n&&i===-1?(r.dataset||{}).focusGuard?0:-1:i}}).filter(function(r){return!t||r.tabIndex>=0}).sort(LU)},UU=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],z1=UU.join(","),$U="".concat(z1,", [data-focus-guard]"),j8=function(e,t){return Yr((e.shadowRoot||e).children).reduce(function(n,r){return n.concat(r.matches(t?$U:z1)?[r]:[],j8(r))},[])},zU=function(e,t){var n;return e instanceof HTMLIFrameElement&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?nl([e.contentDocument.body],t):[e]},nl=function(e,t){return e.reduce(function(n,r){var o,i=j8(r,t),l=(o=[]).concat.apply(o,i.map(function(c){return zU(c,t)}));return n.concat(l,r.parentNode?Yr(r.parentNode.querySelectorAll(z1)).filter(function(c){return c===r}):[])},[])},WU=function(e){var t=e.querySelectorAll("[".concat(wU,"]"));return Yr(t).map(function(n){return nl([n])}).reduce(function(n,r){return n.concat(r)},[])},W1=function(e,t){return Yr(e).filter(function(n){return C8(t,n)}).filter(function(n){return OU(n)})},_2=function(e,t){return t===void 0&&(t=new Map),Yr(e).filter(function(n){return k8(t,n)})},q1=function(e,t,n){return $1(W1(nl(e,n),t),!0,n)},eu=function(e,t){return $1(W1(nl(e),t),!1)},qU=function(e,t){return W1(WU(e),t)},mi=function(e,t){return e.shadowRoot?mi(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Yr(e.children).some(function(n){var r;if(n instanceof HTMLIFrameElement){var o=(r=n.contentDocument)===null||r===void 0?void 0:r.body;return o?mi(o,t):!1}return mi(n,t)})},HU=function(e){for(var t=new Set,n=e.length,r=0;r<n;r+=1)for(var o=r+1;o<n;o+=1){var i=e[r].compareDocumentPosition(e[o]);(i&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(o),(i&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(l,c){return!t.has(c)})},I8=function(e){return e.parentNode?I8(e.parentNode):e},H1=function(e){var t=ji(e);return t.filter(Boolean).reduce(function(n,r){var o=r.getAttribute(qg);return n.push.apply(n,o?HU(Yr(I8(r).querySelectorAll("[".concat(qg,'="').concat(o,'"]:not([').concat(g8,'="disabled"])')))):[r]),n},[])},VU=function(e){try{return e()}catch{return}},tu=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var t=e.activeElement;return t.shadowRoot?tu(t.shadowRoot):t instanceof HTMLIFrameElement&&VU(function(){return t.contentWindow.document})?tu(t.contentWindow.document):t}},QU=function(e,t){return e===t},GU=function(e,t){return!!Yr(e.querySelectorAll("iframe")).some(function(n){return QU(n,t)})},N8=function(e,t){return t===void 0&&(t=tu(w8(e).ownerDocument)),!t||t.dataset&&t.dataset.focusGuard?!1:H1(e).some(function(n){return mi(n,t)||GU(n,t)})},KU=function(e){e===void 0&&(e=document);var t=tu(e);return t?Yr(e.querySelectorAll("[".concat(vU,"]"))).some(function(n){return mi(n,t)}):!1},YU=function(e,t){return t.filter(S8).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},V1=function(e,t){return S8(e)&&e.name?YU(e,t):e},JU=function(e){var t=new Set;return e.forEach(function(n){return t.add(V1(n,e))}),e.filter(function(n){return t.has(n)})},R2=function(e){return e[0]&&e.length>1?V1(e[0],e):e[0]},O2=function(e,t){return e.indexOf(V1(t,e))},Qg="NEW_FOCUS",ZU=function(e,t,n,r,o){var i=e.length,l=e[0],c=e[i-1],u=U1(r);if(!(r&&e.indexOf(r)>=0)){var p=r!==void 0?n.indexOf(r):-1,f=o?n.indexOf(o):p,m=o?e.indexOf(o):-1;if(p===-1)return m!==-1?m:Qg;if(m===-1)return Qg;var g=p-f,v=n.indexOf(l),w=n.indexOf(c),b=JU(n),C=r!==void 0?b.indexOf(r):-1,j=o?b.indexOf(o):C,I=b.filter(function(R){return R.tabIndex>=0}),A=r!==void 0?I.indexOf(r):-1,S=o?I.indexOf(o):A,N=A>=0&&S>=0?S-A:j-C;if(!g&&m>=0||t.length===0)return m;var T=O2(e,t[0]),B=O2(e,t[t.length-1]);if(p<=v&&u&&Math.abs(g)>1)return B;if(p>=w&&u&&Math.abs(g)>1)return T;if(g&&Math.abs(N)>1)return m;if(p<=v)return B;if(p>w)return T;if(g)return Math.abs(g)>1?m:(i+m+g)%i}},XU=function(e){return function(t){var n,r=(n=E8(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},M2=function(e,t,n){var r=e.map(function(i){var l=i.node;return l}),o=_2(r.filter(XU(n)));return o&&o.length?R2(o):R2(_2(t))},Gg=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&Gg(e.parentNode.host||e.parentNode,t),t},ym=function(e,t){for(var n=Gg(e),r=Gg(t),o=0;o<n.length;o+=1){var i=n[o];if(r.indexOf(i)>=0)return i}return!1},P8=function(e,t,n){var r=ji(e),o=ji(t),i=r[0],l=!1;return o.filter(Boolean).forEach(function(c){l=ym(l||c,c)||l,n.filter(Boolean).forEach(function(u){var p=ym(i,u);p&&(!l||mi(p,l)?l=p:l=ym(p,l))})}),l},F2=function(e,t){return e.reduce(function(n,r){return n.concat(qU(r,t))},[])},e$=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(FU)},t$=function(e,t){var n=tu(ji(e).length>0?document:w8(e).ownerDocument),r=H1(e).filter(Vg),o=P8(n||e,e,r),i=new Map,l=eu(r,i),c=l.filter(function(w){var b=w.node;return Vg(b)});if(c[0]){var u=eu([o],i).map(function(w){var b=w.node;return b}),p=e$(u,c),f=p.map(function(w){var b=w.node;return b}),m=p.filter(function(w){var b=w.tabIndex;return b>=0}).map(function(w){var b=w.node;return b}),g=ZU(f,m,u,n,t);if(g===Qg){var v=M2(l,m,F2(r,i))||M2(l,f,F2(r,i));if(v)return{node:v};console.warn("focus-lock: cannot find any node to move focus into");return}return g===void 0?g:p[g]}},n$=function(e){var t=H1(e).filter(Vg),n=P8(e,e,t),r=$1(nl([n],!0),!0,!0),o=nl(t,!1);return r.map(function(i){var l=i.node,c=i.index;return{node:l,index:c,lockItem:o.indexOf(l)>=0,guard:U1(l)}})},Q1=function(e,t){e&&("focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus())},vm=0,wm=!1,B8=function(e,t,n){n===void 0&&(n={});var r=t$(e,t);if(!wm&&r){if(vm>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),wm=!0,setTimeout(function(){wm=!1},1);return}vm++,Q1(r.node,n.focusOptions),vm--}};function ic(e){if(!e)return null;if(typeof WeakRef>"u")return function(){return e||null};var t=e?new WeakRef(e):null;return function(){return(t==null?void 0:t.deref())||null}}var r$=function(e){if(!e)return null;for(var t=[],n=e;n&&n!==document.body;)t.push({current:ic(n),parent:ic(n.parentElement),left:ic(n.previousElementSibling),right:ic(n.nextElementSibling)}),n=n.parentElement;return{element:ic(e),stack:t,ownerDocument:e.ownerDocument}},o$=function(e){var t,n,r,o,i;if(e)for(var l=e.stack,c=e.ownerDocument,u=new Map,p=0,f=l;p<f.length;p++){var m=f[p],g=(t=m.parent)===null||t===void 0?void 0:t.call(m);if(g&&c.contains(g)){for(var v=(n=m.left)===null||n===void 0?void 0:n.call(m),w=m.current(),b=g.contains(w)?w:void 0,C=(r=m.right)===null||r===void 0?void 0:r.call(m),j=q1([g],u),I=(i=(o=b??(v==null?void 0:v.nextElementSibling))!==null&&o!==void 0?o:C)!==null&&i!==void 0?i:v;I;){for(var A=0,S=j;A<S.length;A++){var N=S[A];if(I!=null&&I.contains(N.node))return N.node}I=I.nextElementSibling}if(j.length)return j[0].node}}},T8=function(e){var t=r$(e);return function(){return o$(t)}},s$=function(e,t,n){if(!e||!t)return console.error("no element or scope given"),{};var r=ji(t);if(r.every(function(l){return!mi(l,e)}))return console.error("Active element is not contained in the scope"),{};var o=n?q1(r,new Map):eu(r,new Map),i=o.findIndex(function(l){var c=l.node;return c===e});if(i!==-1)return{prev:o[i-1],next:o[i+1],first:o[0],last:o[o.length-1]}},i$=function(e,t){var n=t?q1(ji(e),new Map):eu(ji(e),new Map);return{first:n[0],last:n[n.length-1]}},a$=function(e){return Object.assign({scope:document.body,cycle:!0,onlyTabbable:!0},e)},_8=function(e,t,n){t===void 0&&(t={});var r=a$(t),o=s$(e,r.scope,r.onlyTabbable);if(o){var i=n(o,r.cycle);i&&Q1(i.node,r.focusOptions)}},l$=function(e,t){t===void 0&&(t={}),_8(e,t,function(n,r){var o=n.next,i=n.first;return o||r&&i})},c$=function(e,t){t===void 0&&(t={}),_8(e,t,function(n,r){var o=n.prev,i=n.last;return o||r&&i})},R8=function(e,t,n){var r,o=i$(e,(r=t.onlyTabbable)!==null&&r!==void 0?r:!0),i=o[n];i&&Q1(i.node,t.focusOptions)},u$=function(e,t){t===void 0&&(t={}),R8(e,t,"first")},d$=function(e,t){t===void 0&&(t={}),R8(e,t,"last")};function G1(e){setTimeout(e,1)}var f$=function(t){return t&&"current"in t?t.current:t},O8=function(){return document&&document.activeElement===document.body},h$=function(){return O8()||KU()},Ia=null,kn=null,L2=function(){return null},Na=null,nu=!1,K1=!1,p$=function(){return!0},m$=function(t){return(Ia.whiteList||p$)(t)},g$=function(t,n){Na={observerNode:t,portaledElement:n}},y$=function(t){return Na&&Na.portaledElement===t};function D2(e,t,n,r){var o=null,i=e;do{var l=r[i];if(l.guard)l.node.dataset.focusAutoGuard&&(o=l);else if(l.lockItem){if(i!==e)return;o=null}else break}while((i+=n)!==t);o&&(o.node.tabIndex=0)}var v$=function(t){return t?!!nu:nu==="meanwhile"},w$=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},b$=function(t,n){return n.some(function(r){return w$(t,r,r)})},M8=function(t){return eu(t,new Map)},x$=function(t){return!M8([t.parentNode]).some(function(n){return n.node===t})},Mf=function(){var t=!1;if(Ia){var n=Ia,r=n.observed,o=n.persistentFocus,i=n.autoFocus,l=n.shards,c=n.crossFrame,u=n.focusOptions,p=n.noFocusGuards,f=r||Na&&Na.portaledElement;if(O8()&&kn&&kn!==document.body&&(!document.body.contains(kn)||x$(kn))){var m=L2();m&&m.focus()}var g=document&&document.activeElement;if(f){var v=[f].concat(l.map(f$).filter(Boolean)),w=function(){if(!v$(c)||!p||!kn||K1)return!1;var A=M8(v),S=A.findIndex(function(N){var T=N.node;return T===kn});return S===0||S===A.length-1};if((!g||m$(g))&&(o||w()||!h$()||!kn&&i)&&(f&&!(N8(v)||g&&b$(g,v)||y$(g))&&(document&&!kn&&g&&!i?(g.blur&&g.blur(),document.body.focus()):(t=B8(v,kn,{focusOptions:u}),Na={})),kn=document&&document.activeElement,kn!==document.body&&(L2=T8(kn)),nu=!1),document&&g!==document.activeElement&&document.querySelector("[data-focus-auto-guard]")){var b=document&&document.activeElement,C=n$(v),j=C.map(function(I){var A=I.node;return A}).indexOf(b);j>-1&&(C.filter(function(I){var A=I.guard,S=I.node;return A&&S.dataset.focusAutoGuard}).forEach(function(I){var A=I.node;return A.removeAttribute("tabIndex")}),D2(j,C.length,1,C),D2(j,-1,-1,C))}}}return t},F8=function(t){Mf()&&t&&(t.stopPropagation(),t.preventDefault())},Y1=function(){return G1(Mf)},C$=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||g$(r,n)},k$=function(){return null},L8=function(){K1=!0},D8=function(){K1=!1,nu="just",G1(function(){nu="meanwhile"})},E$=function(){document.addEventListener("focusin",F8),document.addEventListener("focusout",Y1),window.addEventListener("focus",L8),window.addEventListener("blur",D8)},A$=function(){document.removeEventListener("focusin",F8),document.removeEventListener("focusout",Y1),window.removeEventListener("focus",L8),window.removeEventListener("blur",D8)};function S$(e){return e.filter(function(t){var n=t.disabled;return!n})}var U8={moveFocusInside:B8,focusInside:N8,focusNextElement:l$,focusPrevElement:c$,focusFirstElement:u$,focusLastElement:d$,captureFocusRestore:T8};function j$(e){var t=e.slice(-1)[0];t&&!Ia&&E$();var n=Ia,r=n&&t&&t.id===n.id;Ia=t,n&&!r&&(n.onDeactivation(),e.filter(function(o){var i=o.id;return i===n.id}).length||n.returnFocus(!t)),t?(kn=null,(!r||n.observed!==t.observed)&&t.onActivation(U8),Mf(),G1(Mf)):(A$(),kn=null)}y8.assignSyncMedium(C$);v8.assignMedium(Y1);xU.assignMedium(function(e){return e(U8)});const I$=NU(S$,j$)(k$);var $8=P.forwardRef(function(t,n){return E.createElement(D1,Zc({sideCar:I$,ref:n},t))}),z8=D1.propTypes||{};z8.sideCar;yU(z8,["sideCar"]);$8.propTypes={};var W8=m1(),bm=function(){},Eh=P.forwardRef(function(e,t){var n=P.useRef(null),r=P.useState({onScrollCapture:bm,onWheelCapture:bm,onTouchMoveCapture:bm}),o=r[0],i=r[1],l=e.forwardProps,c=e.children,u=e.className,p=e.removeScrollBar,f=e.enabled,m=e.shards,g=e.sideCar,v=e.noRelative,w=e.noIsolation,b=e.inert,C=e.allowPinchZoom,j=e.as,I=j===void 0?"div":j,A=e.gapMode,S=f1(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=g,T=h1([n,t]),B=en(en({},S),o);return P.createElement(P.Fragment,null,f&&P.createElement(N,{sideCar:W8,removeScrollBar:p,shards:m,noRelative:v,noIsolation:w,inert:b,setCallbacks:i,allowPinchZoom:!!C,lockRef:n,gapMode:A}),l?P.cloneElement(P.Children.only(c),en(en({},B),{ref:T})):P.createElement(I,en({},B,{className:u,ref:T}),c))});Eh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Eh.classNames={fullWidth:gc,zeroRight:mc};var Kg=!1;if(typeof window<"u")try{var rf=Object.defineProperty({},"passive",{get:function(){return Kg=!0,!0}});window.addEventListener("test",rf,rf),window.removeEventListener("test",rf,rf)}catch{Kg=!1}var da=Kg?{passive:!1}:!1,N$=function(e){return e.tagName==="TEXTAREA"},q8=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!N$(e)&&n[t]==="visible")},P$=function(e){return q8(e,"overflowY")},B$=function(e){return q8(e,"overflowX")},U2=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=H8(e,r);if(o){var i=V8(e,r),l=i[1],c=i[2];if(l>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},T$=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},_$=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},H8=function(e,t){return e==="v"?P$(t):B$(t)},V8=function(e,t){return e==="v"?T$(t):_$(t)},R$=function(e,t){return e==="h"&&t==="rtl"?-1:1},O$=function(e,t,n,r,o){var i=R$(e,window.getComputedStyle(t).direction),l=i*r,c=n.target,u=t.contains(c),p=!1,f=l>0,m=0,g=0;do{if(!c)break;var v=V8(e,c),w=v[0],b=v[1],C=v[2],j=b-C-i*w;(w||j)&&H8(e,c)&&(m+=j,g+=w);var I=c.parentNode;c=I&&I.nodeType===Node.DOCUMENT_FRAGMENT_NODE?I.host:I}while(!u&&c!==document.body||u&&(t.contains(c)||t===c));return(f&&Math.abs(m)<1||!f&&Math.abs(g)<1)&&(p=!0),p},of=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},$2=function(e){return[e.deltaX,e.deltaY]},z2=function(e){return e&&"current"in e?e.current:e},M$=function(e,t){return e[0]===t[0]&&e[1]===t[1]},F$=function(e){return`
|
|
1727
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
1728
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
1729
|
-
`)},L$=0,fa=[];function D$(e){var t=P.useRef([]),n=P.useRef([0,0]),r=P.useRef(),o=P.useState(L$++)[0],i=P.useState(g1)[0],l=P.useRef(e);P.useEffect(function(){l.current=e},[e]),P.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var b=Hk([e.lockRef.current],(e.shards||[]).map(z2),!0).filter(Boolean);return b.forEach(function(C){return C.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),b.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=P.useCallback(function(b,C){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!l.current.allowPinchZoom;var j=of(b),I=n.current,A="deltaX"in b?b.deltaX:I[0]-j[0],S="deltaY"in b?b.deltaY:I[1]-j[1],N,T=b.target,B=Math.abs(A)>Math.abs(S)?"h":"v";if("touches"in b&&B==="h"&&T.type==="range")return!1;var R=window.getSelection(),M=R&&R.anchorNode,H=M?M===T||M.contains(T):!1;if(H)return!1;var V=U2(B,T);if(!V)return!0;if(V?N=B:(N=B==="v"?"h":"v",V=U2(B,T)),!V)return!1;if(!r.current&&"changedTouches"in b&&(A||S)&&(r.current=N),!N)return!0;var W=r.current||N;return O$(W,C,b,W==="h"?A:S)},[]),u=P.useCallback(function(b){var C=b;if(!(!fa.length||fa[fa.length-1]!==i)){var j="deltaY"in C?$2(C):of(C),I=t.current.filter(function(N){return N.name===C.type&&(N.target===C.target||C.target===N.shadowParent)&&M$(N.delta,j)})[0];if(I&&I.should){C.cancelable&&C.preventDefault();return}if(!I){var A=(l.current.shards||[]).map(z2).filter(Boolean).filter(function(N){return N.contains(C.target)}),S=A.length>0?c(C,A[0]):!l.current.noIsolation;S&&C.cancelable&&C.preventDefault()}}},[]),p=P.useCallback(function(b,C,j,I){var A={name:b,delta:C,target:j,should:I,shadowParent:U$(j)};t.current.push(A),setTimeout(function(){t.current=t.current.filter(function(S){return S!==A})},1)},[]),f=P.useCallback(function(b){n.current=of(b),r.current=void 0},[]),m=P.useCallback(function(b){p(b.type,$2(b),b.target,c(b,e.lockRef.current))},[]),g=P.useCallback(function(b){p(b.type,of(b),b.target,c(b,e.lockRef.current))},[]);P.useEffect(function(){return fa.push(i),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:g}),document.addEventListener("wheel",u,da),document.addEventListener("touchmove",u,da),document.addEventListener("touchstart",f,da),function(){fa=fa.filter(function(b){return b!==i}),document.removeEventListener("wheel",u,da),document.removeEventListener("touchmove",u,da),document.removeEventListener("touchstart",f,da)}},[]);var v=e.removeScrollBar,w=e.inert;return P.createElement(P.Fragment,null,w?P.createElement(i,{styles:F$(o)}):null,v?P.createElement(Jk,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function U$(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const $$=Kk(W8,D$);var Q8=P.forwardRef(function(e,t){return P.createElement(Eh,en({},e,{ref:t,sideCar:$$}))});Q8.classNames=Eh.classNames;var G8=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ha=new WeakMap,sf=new WeakMap,af={},xm=0,K8=function(e){return e&&(e.host||K8(e.parentNode))},z$=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=K8(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Y8=function(e,t,n,r){var o=z$(t,Array.isArray(e)?e:[e]);af[n]||(af[n]=new WeakMap);var i=af[n],l=[],c=new Set,u=new Set(o),p=function(m){!m||c.has(m)||(c.add(m),p(m.parentNode))};o.forEach(p);var f=function(m){!m||u.has(m)||Array.prototype.forEach.call(m.children,function(g){if(c.has(g))f(g);else try{var v=g.getAttribute(r),w=v!==null&&v!=="false",b=(ha.get(g)||0)+1,C=(i.get(g)||0)+1;ha.set(g,b),i.set(g,C),l.push(g),b===1&&w&&sf.set(g,!0),C===1&&g.setAttribute(n,"true"),w||g.setAttribute(r,"true")}catch(j){console.error("aria-hidden: cannot operate on ",g,j)}})};return f(t),c.clear(),xm++,function(){l.forEach(function(m){var g=ha.get(m)-1,v=i.get(m)-1;ha.set(m,g),i.set(m,v),g||(sf.has(m)||m.removeAttribute(r),sf.delete(m)),v||m.removeAttribute(n)}),xm--,xm||(ha=new WeakMap,ha=new WeakMap,sf=new WeakMap,af={})}},W$=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||G8(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Y8(r,o,n,"aria-hidden")):function(){return null}},q$=function(e,t,n){n===void 0&&(n="data-inert-ed");var r=t||G8(e);return r?Y8(e,r,n,"inert"):function(){return null}},H$=function(){return typeof HTMLElement<"u"&&HTMLElement.prototype.hasOwnProperty("inert")},V$=function(e,t,n){return n===void 0&&(n="data-suppressed"),(H$()?q$:W$)(e,t,n)};let gi=[];const Yg=new Set;function J8(){Yg.forEach(e=>e())}function Q$(e){gi=gi.filter(t=>t!==e),gi.push(e),J8()}function G$(e){gi=gi.filter(t=>t!==e),J8()}function Cm(e){return gi[gi.length-1]===e}function K$(e,t,n){const r=P.useRef(n),o=P.useRef(null),[i,l]=P.useState(!1);P.useEffect(()=>{r.current=n},[n]);const c=P.useCallback(()=>{const p=o.current;o.current=null,p&&document.contains(p)&&p.focus({preventScroll:!0})},[]),u=P.useCallback(()=>{r.current()},[]);return P.useEffect(()=>{if(!e)return;const p=t.current;if(!p)return;const f=p;o.current=document.activeElement instanceof HTMLElement?document.activeElement:null,Q$(f),l(Cm(f));function m(){l(Cm(f))}function g(v){if(!Cm(f))return;const w=v.target instanceof Element?v.target:null,b=w==null?void 0:w.closest('[role="dialog"]');b&&b!==f&&!f.contains(b)||v.key==="Escape"&&(v.preventDefault(),v.stopPropagation(),v.stopImmediatePropagation(),u())}return Yg.add(m),window.addEventListener("keydown",g,!0),()=>{window.removeEventListener("keydown",g,!0),Yg.delete(m),G$(f),c()}},[u,e,t,c]),P.useEffect(()=>{var m,g;if(!e||!i)return;const p=t.current;if(!p)return;const f=((g=(m=p.parentElement)==null?void 0:m.parentElement)==null?void 0:g.querySelectorAll("[data-focus-guard]"))??[];return V$([p,...f])},[e,i,t]),{closeDialog:u,isTopDialog:i}}const Y$={sm:"24rem",md:"28.75rem",lg:"35rem",xl:"52rem"};function J$(){return h.jsx("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M4 4L12 12M12 4L4 12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})})}function J1({bodyClassName:e,children:t,className:n,closeLabel:r="Close",eyebrow:o,footer:i,isOpen:l,onClose:c,overlayClassName:u,size:p="md",subtitle:f,title:m}){const g=P.useRef(null),v=P.useId(),w=P.useId(),{closeDialog:b,isTopDialog:C}=K$(l,g,c);if(!l)return null;const j=["as-modal-overlay",u].filter(Boolean).join(" "),I=["as-modal",`as-modal--${p}`,n].filter(Boolean).join(" "),A=["as-modal__body",e].filter(Boolean).join(" "),S={"--as-modal-width":Y$[p]};return h.jsx("div",{className:j,role:"presentation",onMouseDown:b,children:h.jsx(Q8,{allowPinchZoom:!0,className:"as-modal__scroll-lock",enabled:C,style:S,children:h.jsx($8,{autoFocus:!0,className:"as-modal__focus-lock",disabled:!C,focusOptions:{preventScroll:!0},returnFocus:!1,children:h.jsxs("div",{"aria-describedby":f?w:void 0,"aria-hidden":C?void 0:!0,"aria-labelledby":v,"aria-modal":C?"true":void 0,className:I,ref:g,role:"dialog",tabIndex:-1,onMouseDown:N=>N.stopPropagation(),children:[h.jsxs("header",{className:"as-modal__header",children:[h.jsxs("div",{className:"as-modal__titles",children:[o&&h.jsx("div",{className:"as-modal__eyebrow",children:o}),h.jsx("h2",{className:"as-modal__title",id:v,children:m}),f&&h.jsx("p",{className:"as-modal__subtitle",id:w,children:f})]}),h.jsx(Z$,{label:r,className:"as-modal__close",onClick:b,children:h.jsx(J$,{})})]}),h.jsx("div",{className:A,children:t}),i&&h.jsx("footer",{className:"as-modal__footer",children:i})]})})})})}function Z$({children:e,className:t,label:n,onClick:r}){return h.jsx("button",{type:"button",className:t,onClick:r,"aria-label":n,children:e})}const Z1=P.createContext(null),Z8=typeof document>"u"?P.useEffect:P.useLayoutEffect;function X1({title:e,children:t,onClose:n,busy:r=!1}){const o=P.useRef(!1),i=P.useRef(r);Z8(()=>{i.current=r},[r]);const[l]=P.useState(()=>typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null);P.useEffect(()=>()=>{queueMicrotask(()=>{l!=null&&l.isConnected&&l.focus({preventScroll:!0})})},[l]);const c=h.jsx(J1,{isOpen:!0,title:e,size:"lg",overlayClassName:"ants-stake-overlay ants-action-overlay",onClose:()=>{!i.current&&!o.current&&n()},children:h.jsx(Z1.Provider,{value:o,children:t})});return typeof document>"u"?c:d1.createPortal(c,Er().portalTarget())}function X8({title:e,hideTitle:t=!1,summary:n,children:r,confirmLabel:o="Confirm",danger:i,disabled:l,busy:c,error:u,onConfirm:p,onCancel:f,embedded:m,cancelLabel:g="Cancel"}){const v=P.useContext(Z1),w=m||v!==null;Z8(()=>(v&&(v.current=c===!0),()=>{v&&(v.current=!1)}),[c,v]);const b=h.jsxs(Kr,{className:"confirm",tone:i?"danger":"surface",role:"region","aria-label":e,children:[w&&!t?h.jsx("div",{className:"confirm-title",children:e}):null,n&&n.length>0?h.jsx("dl",{className:"facts",children:n.map(([C,j],I)=>h.jsx(X$,{label:C,value:j},`${C}-${I}`))}):null,r,u?h.jsx("div",{className:"error-text",children:u}):null,h.jsxs("div",{className:"confirm-actions",children:[h.jsx(pt,{variant:i?"danger":"primary",onClick:p,disabled:l||c,children:c?"Sending…":o}),h.jsx(pt,{variant:"outline",onClick:f,disabled:c,children:g})]})]});return w?b:h.jsx(X1,{title:e,onClose:f,busy:c,children:b})}function X$({label:e,value:t}){return h.jsxs(h.Fragment,{children:[h.jsx("dt",{children:e}),h.jsx("dd",{children:t})]})}function ev(e=!1){const{config:{readOnly:t,selectedAddress:n,walletAddress:r,browserWallet:o},overview:i,overviewError:l}=Bi(),{running:c}=Bs(),u=u8();return o&&!u?{blocked:!0,label:"Connect wallet",reason:"Connect wallet before submitting a transaction."}:u!=null&&u.reason?{blocked:!0,reason:u.reason,label:u.label}:t?{blocked:!0,reason:"Read-only mode: no wallet is available to sign."}:n&&!e&&n.toLowerCase()!==(r==null?void 0:r.toLowerCase())?{blocked:!0,reason:`Connect the selected account wallet ${n} for seller and staking actions.`}:!i||l?{blocked:!0,reason:"Wallet information is unavailable. Refresh before sending a transaction."}:BigInt(i.wallet.signingWalletEth??i.wallet.eth)===0n?{blocked:!0,reason:"The signing wallet needs ETH on the selected network for transaction fees."}:c?{blocked:!0,reason:"Another action is still running."}:{blocked:!1,reason:void 0}}function Jr(e){const t=Bs(),n=e.body,r=e.path==="/api/rewards/claim"&&(n==null?void 0:n.scope)==="buyer"||e.path==="/api/rewards/stake-usage"&&(n==null?void 0:n.side)==="buyer",o=ev(r),[i,l]=P.useState(!1),[c,u]=P.useState(null),[p,f]=P.useState(!1),m=P.useRef(!1),g=P.useContext(Z1),v=!e.children,w=o.blocked||e.disabled===!0,b=o.reason??(e.disabled?e.disabledReason:void 0),C=async()=>{var S;if(w||m.current||v&&e.confirmDisabled)return;const A=((S=e.validate)==null?void 0:S.call(e))??null;u(A),A===null&&(v?await j():l(!0))},j=async()=>{var S,N;if(w||e.confirmDisabled||m.current)return;const A=((S=e.validate)==null?void 0:S.call(e))??null;if(A!==null){u(A);return}m.current=!0,v&&g&&(g.current=!0),f(!0),u(null);try{await t.start(e.path,e.body),l(!1),(N=e.onStarted)==null||N.call(e)}catch(T){t.pushToast({tone:"danger",title:`${e.title??e.label} failed`,body:Ss(T),sticky:!0})}finally{m.current=!1,v&&g&&(g.current=!1),f(!1)}},I=e.variant==="primary"?"primary":e.variant==="danger"?"danger":"outline";return h.jsxs("div",{className:"action",children:[i?null:h.jsx("span",{className:"btn-wrap",title:b,children:h.jsx(pt,{variant:I,size:e.size==="sm"?"sm":"md",onClick:C,disabled:w||p||v&&e.confirmDisabled,children:p&&v?"Sending…":o.label??e.label})}),c&&!i?h.jsx("div",{className:"error-text",children:c}):null,i?h.jsx(X8,{title:e.title??e.label,summary:e.summary,confirmLabel:o.label??e.confirmLabel??e.label,danger:e.variant==="danger",disabled:w||e.confirmDisabled,busy:p,error:c,onConfirm:()=>{j()},onCancel:()=>{l(!1),u(null)},children:e.children}):null]})}function Nn({tone:e="neutral",mono:t,title:n,children:r}){const o=["pill",e!=="neutral"?`pill--${e}`:"",t?"pill--mono":""].filter(Boolean).join(" ");return h.jsx("span",{className:o,title:n,children:r})}const km="antseed-wash-trading-seller-proof";function ez({data:e}){const t=e.registry;return h.jsx("div",{className:"stack",children:t?h.jsxs(h.Fragment,{children:[h.jsx($t,{items:[["Registry",h.jsx(ut,{value:t.address})],["Enforced",e.enforced?h.jsx(Nn,{tone:"accent",children:"enforced"}):h.jsx(Nn,{tone:"muted",children:"not enforced"})],["Flag threshold",`${Bn(t.thresholdBps)} of seller volume`],["Period blocks",`${Fe(t.periodStartBlock)} – ${Fe(t.periodEndBlock)}`]]}),h.jsxs(ir,{summary:"Details",children:[h.jsx($t,{items:[["Verifier",h.jsx(ut,{value:t.verifier,short:!1})],["Verifier hash",h.jsx("span",{className:"break mono small",children:t.verifierHash})],["Blockhash store",h.jsx(ut,{value:t.blockhashStore,short:!1})],["Seller program vkey",h.jsx("span",{className:"break mono small",children:t.sellerProgramVKey})],["Points policy",e.pointsPolicy?h.jsx(ut,{value:e.pointsPolicy,short:!1}):h.jsx("span",{className:"muted",children:"not set"})],...e.policies.map(n=>["Policy → pinned registry",h.jsxs("span",{children:[h.jsx(ut,{value:n.address})," → ",n.washTradingRegistry?h.jsx(ut,{value:n.washTradingRegistry}):h.jsx("span",{className:"muted",children:"not pinned"})]})])]}),h.jsx("div",{className:"hint mt",children:"Enforced means the active points policy pins the registry, so flagged sellers earn no usage points."})]})]}):h.jsx("span",{className:"muted",children:"No wash-trading registry is deployed on this chain."})})}function eA({data:e,seller:t}){const n=e.seller;return n?h.jsxs("div",{className:"stack",children:[h.jsxs("div",{className:"row",children:[n.isProvenWashTrader?h.jsx(Nn,{tone:"danger",children:"flagged wash trader"}):h.jsx(Nn,{tone:"accent",children:"not flagged"}),h.jsxs("span",{className:"muted small",children:["proven share ",h.jsx("span",{className:`mono ${n.isProvenWashTrader?"danger":""}`,children:Bn(n.provenWashShareBps)})]})]}),h.jsx($t,{items:[["Proven wash volume",`${Wn(n.provenWashVolume)} USDC`],["Total seller volume",`${Wn(n.totalSellerVolume)} USDC`]]}),h.jsx(ir,{summary:"Evidence",children:h.jsx($t,{items:[["Seller",h.jsx(ut,{value:n.seller,short:!1})],["Evidence digest",h.jsx("span",{className:"break mono small",children:n.evidenceDigest})]]})})]}):h.jsxs("div",{className:"muted small",children:["No verification record for ",h.jsx(ut,{value:t}),"."]})}function tz(){const{address:e}=Ts(),t=tt("verification:own",()=>Ye.verification(),5*6e4);return t.error&&!t.data?h.jsx(nn,{error:t.error,onRetry:t.refresh}):t.data?t.data.registry?h.jsx(eA,{data:t.data,seller:e}):h.jsx("span",{className:"muted",children:"No wash-trading registry is deployed on this chain."}):h.jsxs("span",{className:"muted small",children:[h.jsx(Ch,{})," loading…"]})}function nz(){const[e,t]=P.useState(""),[n,r]=P.useState(null),o=tt(n?`verification:${n.toLowerCase()}`:null,()=>Ye.verification(n??void 0),5*6e4),i=bD(e.trim());return h.jsxs("div",{className:"stack",children:[h.jsxs("div",{className:"form-row",children:[h.jsx(ml,{label:"Seller address",width:"lg",value:e,onChange:l=>t(l.target.value),placeholder:"0x…"}),h.jsx(pt,{variant:"outline",onClick:()=>r(e.trim()),disabled:!i,children:"Look up"})]}),e.trim()&&!i?h.jsx("div",{className:"error-text",children:"Enter a 0x-prefixed 20-byte address."}):null,n&&o.loading&&!o.data?h.jsxs("span",{className:"muted small",children:[h.jsx(Ch,{})," loading…"]}):null,n&&o.error&&!o.data?h.jsx(nn,{error:o.error,onRetry:o.refresh}):null,n&&o.data?h.jsx(eA,{data:o.data,seller:n}):null]})}function rz(e){if(typeof e!="object"||e===null)return null;const t=e.kind;return typeof t=="string"?t:null}function oz(e){if(typeof e!="object"||e===null)return null;const t=e,n=t.seller;if(typeof n=="string")return n;const r=t.claim;if(typeof r=="object"&&r!==null){const o=r.seller;if(typeof o=="string")return o}return null}function sz(){const[e,t]=P.useState(null),[n,r]=P.useState(null),o=async i=>{var c;const l=(c=i.target.files)==null?void 0:c[0];if(t(null),r(null),!!l)try{const u=JSON.parse(await l.text()),p=rz(u);if(p!==km){r(`Expected a proof file with kind "${km}"${p?`, got "${p}"`:""}.`);return}t({name:l.name,artifact:u,kind:p,seller:oz(u)})}catch(u){r(`Could not parse file as JSON: ${Ss(u)}`)}};return h.jsxs("div",{className:"stack",children:[h.jsxs("div",{className:"hint",children:["Pick a seller proof produced by the loop-proof tooling (",h.jsx("code",{children:km}),"). Only the kind is checked here; the registry verifies the proof on chain. Submission may take several transactions (block references, chunks, finalize)."]}),h.jsxs("div",{className:"form-row",children:[h.jsx(Sa,{label:"Proof file",children:h.jsx("input",{type:"file",accept:"application/json,.json",onChange:i=>{o(i)}})}),h.jsx(Jr,{label:"Submit proof",variant:"primary",title:"Submit seller proof",path:"/api/verification/submit",body:{artifact:e==null?void 0:e.artifact},disabled:!e,disabledReason:"Choose a valid proof file first."})]}),n?h.jsx("div",{className:"error-text",children:n}):null]})}function iz(){const[e,t]=P.useState(""),[n,r]=P.useState(null),[o,i]=P.useState(null),[l,c]=P.useState(!1),u=async()=>{const p=e.trim();if(p){c(!0),i(null),r(null);try{r(await Ye.proofStatus(p))}catch(f){i(Ss(f))}finally{c(!1)}}};return h.jsxs("div",{className:"stack",children:[h.jsxs("div",{className:"form-row",children:[h.jsx(ml,{label:"Proof id",width:"lg",value:e,onChange:p=>t(p.target.value),placeholder:"0x…"}),h.jsx(pt,{variant:"outline",onClick:()=>{u()},disabled:!e.trim()||l,children:l?"Looking up…":"Look up"})]}),o?h.jsx("div",{className:"error-text",children:o}):null,n?h.jsx($t,{items:[["Proof id",h.jsx("span",{className:"break mono small",children:n.proofId})],["Staged",n.staged?"yes":"no"],["Finalized",n.finalized?"yes":"no"],["Authenticated block references",Fe(n.authenticatedBlockReferenceCount)],["Authenticated block chunks",Fe(n.authenticatedBlockChunkCount)]]}):null]})}function az(){const e=tt("network",Ye.network,2e4),{data:t,refresh:n}=e,r=kh(1e3),o=P.useRef(null);P.useEffect(()=>{const l=()=>{document.visibilityState==="visible"&&n()},c=window.setInterval(l,6e4);return document.addEventListener("visibilitychange",l),()=>{window.clearInterval(c),document.removeEventListener("visibilitychange",l)}},[n]),P.useEffect(()=>{if(!t||o.current===t.epoch.current)return;const l=Math.max(1e3,t.epoch.secondsToBoundary*1e3-(Date.now()-t.fetchedAt)),c=window.setTimeout(()=>{o.current=t.epoch.current,document.visibilityState==="visible"&&n()},l);return()=>window.clearTimeout(c)},[t,n]);const i=!!t&&(!!e.error||r-t.fetchedAt>9e4);return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"row",children:[h.jsx("h1",{className:"page-title",children:"Network"}),h.jsx(pt,{variant:"outline",size:"sm",onClick:n,disabled:e.loading,children:"Refresh network"})]}),e.error&&!t?h.jsx(nn,{error:e.error,onRetry:n}):null,!t&&e.loading?h.jsx(ju,{rows:5}):null,t&&h.jsxs(h.Fragment,{children:[h.jsxs("p",{className:"hint",children:[t.evmChainId===31337?"Local Anvil · test-chain data, not live production":`${t.chainId} · chain ${t.evmChainId}`," · block ",t.blockNumber," · ",ar(t.blockTimestamp)]}),t.activation!=="active"&&h.jsx("p",{className:"status-line",children:t.activation==="not-active"?"The configured reward stack is not the registry’s active stack. These are its configured allowances, not a claim of active reward distribution.":"Registry activation could not be verified."}),t.epoch.effective!==null&&t.epoch.current<t.epoch.effective&&h.jsxs("p",{className:"hint",children:["Recognized-usage rewards start at epoch ",t.epoch.effective,". The current epoch is before reward activation."]}),i&&h.jsxs("p",{className:"status-line",role:"status",children:["Stale network snapshot. ",e.error??"Refresh to read the latest contract state."]}),t.errors.length>0&&h.jsxs("div",{className:"status-line",role:"status",children:["Some contract reads are unavailable: ",t.errors.join(" ")]}),h.jsx(lz,{data:t,now:r}),h.jsx(hU,{data:t}),h.jsx(Dt,{children:h.jsxs(ir,{summary:"Emission schedule and contract details",children:[h.jsx($t,{items:[["First recognized-usage reward epoch",t.epoch.effective??"Unavailable"],["Epoch length",xh(t.epoch.epochDuration)],["Genesis",ar(t.epoch.genesis)],["Initial scheduled emission",Sn(t.initialEmission)],["Halving interval",`${t.halvingInterval} epochs`],["Scheduled cumulative emission through this epoch",Sn(t.cumulativeScheduled)],["Total active stake",Sn(t.totalActiveStake)],["Total power weight",t.totalPowerWeight===null?"Unavailable":be(t.totalPowerWeight)],...Object.entries(t.contracts).map(([l,c])=>[l,h.jsx(ut,{value:c,short:!1})])]}),h.jsx("p",{className:"hint",children:"Scheduled emission is an allowance, not a minted-token counter. Current supply is read separately from the token contract. All main network figures use the same snapshot block."})]})})]}),h.jsx(Dt,{children:h.jsx(ir,{summary:"Your usage history and network comparisons",lazy:!0,children:h.jsx(mU,{})})}),h.jsx(Dt,{children:h.jsx(ir,{summary:"Legacy emissions",lazy:!0,children:h.jsx(cz,{})})}),h.jsx(Dt,{children:h.jsx(ir,{summary:"Verification registry",lazy:!0,children:h.jsx(uz,{})})})]})}function lz({data:e,now:t}){const n=Math.max(0,e.epoch.secondsToBoundary-Math.floor((t-e.fetchedAt)/1e3));return h.jsxs(L1,{children:[h.jsx(kr,{label:"Current epoch",value:e.epoch.current,sub:ar(e.epoch.genesis+e.epoch.current*e.epoch.epochDuration)}),h.jsx(kr,{label:"Next epoch starts in",value:n>0?xh(n):"Awaiting chain update",sub:ar(e.epoch.nextBoundaryAt)}),h.jsx(kr,{label:"Scheduled epoch emission · ANTS",value:e.emission===null?"Unavailable":be(e.emission),sub:"Allowance, not tokens already minted"}),h.jsx(kr,{label:"Current token supply · ANTS",value:e.totalSupply===null?"Unavailable":be(e.totalSupply),sub:`Maximum supply: ${Sn(e.maxSupply)}`})]})}function cz(){const e=tt("network:legacy",Ye.networkLegacy,3e5);if(e.error)return h.jsx(nn,{error:e.error,onRetry:e.refresh});if(e.loading&&!e.data)return h.jsx(ju,{rows:2});const t=e.data;return t?h.jsxs(h.Fragment,{children:[h.jsx($t,{items:[["Legacy contract",h.jsx(ut,{value:t.contract})],["Legacy epoch",t.currentEpoch],["Legacy configured split",`Sellers ${t.sellerPct}% · buyers ${t.buyerPct}% · reserve ${t.reservePct}% · team ${t.teamPct}%`]]}),h.jsx("p",{className:"hint",children:"Historical reward-system configuration. These percentages do not describe the current recognized-usage reward budgets."})]}):h.jsx("p",{className:"muted",children:"No legacy emissions contract configured."})}function uz(){const e=tt("verification:own",()=>Ye.verification(),3e5);return e.error?h.jsx(nn,{error:e.error,onRetry:e.refresh}):e.data?h.jsx(ez,{data:e.data}):h.jsx(ju,{rows:3})}const dz=10000n*10n**18n,Jg=86400,Ff=1e4,Ah=">10.000%",fz=`APY is shown as ${Ah} when either end of the range exceeds 10,000%. Ranges at or below 10,000% remain visible.`;function ru(e){return e==null||!Number.isFinite(e)?"—":e>Ff?Ah:`${e.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}%`}function tA(e,t,n){const r=Number(e*10n**18n/t)/1e18,o=Math.expm1(Math.log1p(r)*(365*Jg/n))*100;return Number.isFinite(o)?o:null}function hz(e,t,n,r){const o=t==null?void 0:t.yield;if(!t||t.agentId!==e.agentId||!o||o.status==="unavailable"||o.epoch<0||o.reward==null||n===void 0||!Number.isSafeInteger(n)||n<0||e.withdrawn||e.closedAtEpoch!==0||e.state==="closed"||e.state==="withdrawn"||e.state==="matured")return null;const i=o.endsAt-o.startsAt;if(!Number.isFinite(i)||i<=0)return null;try{const l=BigInt(e.amount),c=BigInt(t.weight),u=BigInt(o.reward);if(l<=0n||c<0n||u<0n)return null;const p=e.stakeStartEpoch>n,f=p?e.stakeStartEpoch===n+1?e.nextPower:void 0:e.power;let m;if(f!=null)m=BigInt(f);else{const w=(p?e.maxLockedNext:e.maxLocked)?r:e.stakeEndEpoch-Math.max(n,e.stakeStartEpoch);if(w===void 0||!Number.isSafeInteger(w)||w<=0)return null;const b=BigInt(e.weightAmount);if(b<=0n)return null;m=b*BigInt(w)}if(m<=0n)return null;const g=p?c+m:c;return g<=0n||m>g?null:tA(u*m/g,l,i)}catch{return null}}function nA(e,t){const n=e?e.endsAt-e.startsAt:0;if(!e||!Number.isFinite(n)||n<=0||e.minLockEpochs==null||e.maxLockEpochs==null)return{epochs:null,actualDays:null,status:"unavailable"};const r=Math.round(t*Jg/n);return!Number.isSafeInteger(r)||r<1||r<e.minLockEpochs||r>e.maxLockEpochs?{epochs:null,actualDays:null,status:"unsupported"}:{epochs:r,actualDays:r*n/Jg,status:"supported"}}function Zg(e,t){const{epochs:n}=nA(e,t);if(n===null)return{epochs:null,apy:null};const r=rA(e,n,dz.toString());return{epochs:r===null?null:n,apy:r}}function rA(e,t,n,r=0){if(!e||e.status==="unavailable"||e.epoch<0||e.reward==null||e.power==null||e.minLockEpochs==null||e.maxLockEpochs==null)return null;const o=e.endsAt-e.startsAt;if(!Number.isFinite(o)||o<=0||!Number.isSafeInteger(t)||t<1||t<e.minLockEpochs||t>e.maxLockEpochs||!Number.isSafeInteger(r)||r<0)return null;try{const i=BigInt(e.reward),l=BigInt(e.power),c=BigInt(n);if(i<0n||l<=0n||c<=0n)return null;const p=c*(10000n+BigInt(r))/10000n*BigInt(t),f=i*p/(l+p);return tA(f,c,o)}catch{return null}}function tv(e){return{oneWeek:Zg(e,7),twoYears:Zg(e,730)}}function pz(e){return[{label:"1 day",days:1},{label:"1 month",days:30},{label:"1 year",days:365},{label:"2 years",days:730}].map(t=>({...t,...nA(e,t.days),apy:Zg(e,t.days).apy}))}const nv={isPartial:e=>e.source==="chain"&&!!e.sourceError,isSyncing:e=>!!e.walletSyncing,retryOnError:!1},mz={isSyncing:e=>!!e.walletSyncing};function rv({left:e,top:t,title:n,rows:r}){const o=typeof window<"u"&&e>window.innerWidth-240;return h.jsxs("div",{className:o?"chart-tip chart-tip--left":"chart-tip",style:{left:e,top:t},role:"status","aria-live":"polite",children:[h.jsx("div",{className:"chart-tip-title",children:n}),r.map(i=>h.jsxs("div",{className:"chart-tip-row",children:[h.jsx("i",{style:i.color?{background:i.color}:void 0,"aria-hidden":"true"}),h.jsx("span",{className:"chart-tip-name",children:i.name}),h.jsxs("span",{className:"chart-tip-value",children:[i.value,i.note?h.jsxs("small",{children:[" ",i.note]}):null]})]},i.name))]})}function gz(e,t,n,r){if(r<=0||n<=0)return null;const o=Math.floor((e-t)/n);return o<0||o>=r?null:o}function oA(e,t){let n=null,r=Number.POSITIVE_INFINITY;return t.forEach((o,i)=>{const l=Math.abs(o-e);l<r&&(r=l,n=i)}),n}function ov(e,t,n,r){const[o,i]=P.useState(null);return{hover:o,onPointerMove:p=>{var g;const f=(g=e.current)==null?void 0:g.getBoundingClientRect();if(!f||f.width===0)return;const m=r((p.clientX-f.left)*(t/f.width));m===null?i(null):m!==(o==null?void 0:o.index)&&i({index:m})},onPointerLeave:()=>i(null),setHover:i,clientPoint:(p,f)=>{var g;const m=(g=e.current)==null?void 0:g.getBoundingClientRect();return!m||m.width===0?{left:p,top:f}:{left:m.left+p*(m.width/t),top:m.top+f*(m.height/n)}}}}function yz(e,t,n){const r=new Map(t.map(o=>[o.epoch,ht(o.usdc)]));return e.filter(o=>o.epoch<n).sort((o,i)=>o.epoch-i.epoch).map(o=>{const i=ht(o.usdc),l=r.get(o.epoch);return{epoch:o.epoch,volume:i!==null&&i>=0n?i:null,network:l??null,share:i!==null&&i>=0n&&l!=null&&l>0n&&i<=l?i*10000n/l:null}})}function vz({points:e}){var V,W;const t=P.useId(),n=P.useRef(null),[r,o]=P.useState(800);P.useEffect(()=>{if(!n.current||typeof ResizeObserver>"u")return;const L=new ResizeObserver(J=>{const O=J[0];O&&o(Math.max(280,Math.round(O.contentRect.width)))});return L.observe(n.current),()=>L.disconnect()},[]);const i=e.flatMap(L=>L.volume===null?[]:[L.volume]),l=i.reduce((L,J)=>J>L?J:L,0n)||1000000n,c=e.some(L=>L.share!==null),u=64,p=r-64,f=((V=e[0])==null?void 0:V.epoch)??0,m=((W=e.at(-1))==null?void 0:W.epoch)??f,g=L=>f===m?r/2:u+(L-f)/(m-f)*(p-u),v=(L,J)=>218-Number(L*1000000n/J)/1e6*180,w=[{key:"volume",name:"Settled volume",scale:l,format:L=>`${Wn(String(L))} USDC`},{key:"share",name:"Network volume share",scale:10000n,format:L=>Bn(Number(L))}],b=(L,J)=>{let O=null;return e.map(G=>{const ee=G[L];if(ee===null)return O=null,"";const F=O!==null&&G.epoch===O+1?"L":"M";return O=G.epoch,`${F}${g(G.epoch)},${v(ee,J)}`}).join(" ")},C=r<500?3:6,j=Math.max(1,Math.ceil((e.length-1)/(C-1))),I=P.useRef(null),A=e.map(L=>g(L.epoch)),{hover:S,onPointerMove:N,onPointerLeave:T,setHover:B,clientPoint:R}=ov(I,r,270,L=>oA(L,A)),M=S!==null?e[S.index]??null:null,H=[];return M&&(M.volume!==null&&H.push({name:"Settled volume",value:`${Wn(String(M.volume))} USDC`,color:"var(--pc-accent)"}),M.network!==null&&H.push({name:"Network volume",value:`${Wn(String(M.network))} USDC`,color:"var(--pc-sub)"}),M.share!==null&&H.push({name:"Network share",value:Bn(Number(M.share)),color:"var(--pc-blue)"})),h.jsxs("div",{className:"pool-chart",children:[h.jsxs("div",{className:"pool-chart-legend",children:[h.jsxs("h4",{children:[h.jsx("span",{className:"pool-chart-dot"}),"Settled volume · left axis"]}),h.jsxs("h4",{className:"pool-chart--share",children:[h.jsx("span",{className:"pool-chart-dot"}),"Network volume share · right axis"]})]}),h.jsxs("div",{ref:n,className:"pool-chart-plot",children:[i.length?h.jsxs("svg",{ref:I,viewBox:`0 0 ${r} 270`,role:"img","aria-labelledby":t,onPointerMove:N,onPointerLeave:T,children:[h.jsx("title",{id:t,children:"Settled volume and network volume share by completed epoch. USDC on the left axis; 0–100% on the right axis. Hover anywhere over the chart for that epoch's values."}),M?h.jsx("line",{x1:g(M.epoch),x2:g(M.epoch),y1:38,y2:218,className:"chart-crosshair","aria-hidden":"true"}):null,h.jsx("text",{x:u,y:"16",className:"pool-chart-axis-volume",children:"USDC"}),h.jsx("text",{x:p,y:"16",textAnchor:"end",className:"pool-chart-axis-share",children:"Share · %"}),[0,1,2,3,4].map(L=>h.jsxs("g",{children:[h.jsx("line",{x1:u,x2:p,y1:38+L*45,y2:38+L*45,className:"pool-chart-grid"}),h.jsx("text",{x:u-9,y:42+L*45,textAnchor:"end",className:"pool-chart-axis-volume",children:Xa(String(l*BigInt(4-L)/4n))}),h.jsxs("text",{x:p+9,y:42+L*45,textAnchor:"start",className:"pool-chart-axis-share",children:[100-L*25,"%"]})]},L)),w.map(L=>h.jsxs("g",{className:L.key==="share"?"pool-chart--share":void 0,children:[e.some(J=>J[L.key]!==null)&&h.jsx("path",{d:b(L.key,L.scale),className:"pool-chart-line","data-series":L.key}),e.map((J,O)=>{const G=J[L.key];if(G===null)return null;const ee=`${L.name}, epoch ${J.epoch}: ${L.format(G)}`;return h.jsx("circle",{cx:g(J.epoch),cy:v(G,L.scale),r:M===J?5.5:4,tabIndex:0,role:"img","aria-label":ee,onFocus:()=>B({index:O}),onBlur:T,children:h.jsx("title",{children:ee})},J.epoch)})]},L.key)),e.filter((L,J)=>J%j===0||J===e.length-1).map(L=>h.jsx("text",{x:g(L.epoch),y:"242",textAnchor:"middle",children:L.epoch},L.epoch)),h.jsx("text",{x:r/2,y:"265",textAnchor:"middle",children:"Epoch"})]}):h.jsx("div",{className:"pool-chart-empty",children:"Settlement volume unavailable for completed epochs."}),M&&H.length>0?h.jsx(rv,{...R(g(M.epoch),38),title:`Epoch ${M.epoch}`,rows:H}):null]}),i.length>0&&!c&&h.jsx("p",{className:"hint",children:"Network share unavailable for these epochs."})]})}function wz({volumes:e,networkVolumes:t,currentEpoch:n}){const r=yz(e,t,n);return h.jsxs(h.Fragment,{children:[h.jsx(vz,{points:r}),h.jsx("p",{className:"hint",children:"Network share = seller settled volume ÷ total network settled volume in the same epoch. The right axis stays at 0–100%; each line uses its own units. Missing observations leave gaps; a missing or zero network total is not a 0% share."})]})}function bz(e){const t=new Map;for(const n of e){const r=n.name.trim(),o=r.toLowerCase(),i=t.get(o)??{name:r,providers:[]};i.providers.includes(n.provider)||i.providers.push(n.provider),t.set(o,i)}return[...t.values()]}function xz({address:e}){const t=tt(e?`seller-models:${e}`:null,()=>Ye.sellerModels(e)),n=t.data;return h.jsxs("section",{className:"pool-section",children:[h.jsxs("div",{className:"pool-section-heading",children:[h.jsx("h3",{children:"Models & usage"}),h.jsx("span",{className:"small muted",children:"Sourced from Antscan"})]}),e?n?h.jsxs(h.Fragment,{children:[t.error&&h.jsx("p",{className:"hint",children:"Model data could not refresh. Showing the previously loaded snapshot."}),h.jsxs("h4",{className:"pool-subheading",children:["Observed model usage ",h.jsxs("span",{className:"small muted",children:["Last completed epoch",n.period?` · Epoch ${n.period.epoch}`:""]})]}),n.usageStatus==="unavailable"?h.jsxs("div",{role:"status",children:[h.jsx("p",{className:"hint",children:n.usageError??"Model usage is unavailable."}),h.jsx("button",{type:"button",className:"link-button",onClick:t.refresh,disabled:t.loading,children:"Retry model data"})]}):n.usage.length?h.jsx("div",{className:"table-wrap",tabIndex:0,role:"region","aria-label":"Observed model usage",children:h.jsxs("table",{className:"table pool-model-table",children:[h.jsx("thead",{children:h.jsxs("tr",{children:[h.jsx("th",{children:"Model"}),h.jsx("th",{className:"num",children:"Requests"}),h.jsx("th",{className:"num",children:"Input tokens"}),h.jsx("th",{className:"num",children:"Output tokens"}),h.jsx("th",{className:"num",children:"Volume · USDC"})]})}),h.jsx("tbody",{children:n.usage.map(r=>h.jsxs("tr",{children:[h.jsx("td",{children:r.name}),h.jsx("td",{className:"num",children:Fe(r.requests)}),h.jsx("td",{className:"num",children:Fe(r.inputTokens)}),h.jsx("td",{className:"num",children:Fe(r.outputTokens)}),h.jsx("td",{className:"num",children:Wn(r.volumeUsdc)})]},r.serviceId))})]})}):h.jsx("p",{className:"hint",children:"No indexed model usage for this seller in this epoch."}),n.totals&&h.jsxs("p",{className:"hint",children:["Settled volume: ",Wn(n.totals.settledVolumeUsdc)," USDC · Model-attributed: ",Wn(n.totals.attributedVolumeUsdc)," USDC · Unattributed: ",n.totals.unattributedVolumeUsdc===null?"unavailable (model totals exceed settlements)":`${Wn(n.totals.unattributedVolumeUsdc)} USDC`]}),h.jsxs("section",{className:"pool-catalog","aria-label":"Advertised models",children:[h.jsxs("h4",{className:"pool-subheading",children:["Advertised models ",h.jsx("span",{className:"small muted",children:n.catalogStatus==="live"?"Latest discovered catalog":n.catalogStatus==="stale"?"Stale catalog":"Unavailable"})]}),h.jsx("p",{className:"hint",children:"Seller-advertised models, not a guarantee of availability."}),n.catalogStatus==="unavailable"?h.jsx("p",{className:"hint",children:"Antscan model catalog is unavailable."}):n.offerings.length?h.jsx("ul",{className:"pool-model-tags","aria-label":"Advertised model names",children:bz(n.offerings).map(r=>h.jsx("li",{children:h.jsx(Nn,{title:`Providers: ${r.providers.join(", ")}`,children:r.name})},r.name))}):h.jsx("p",{className:"hint",children:"No advertised models found in Antscan’s catalog."}),n.catalogUpdatedAt!==null&&h.jsxs("p",{className:"small muted",children:["Catalog snapshot ",ar(Math.floor(n.catalogUpdatedAt/1e3))]})]})]}):t.error?h.jsxs("div",{role:"status",children:[h.jsx("p",{className:"hint",children:"Model data could not load. Pool statistics remain available."}),h.jsx("p",{className:"hint",children:t.error}),h.jsx("button",{type:"button",className:"link-button",onClick:t.refresh,disabled:t.loading,children:"Retry model data"})]}):h.jsx("p",{className:"hint",children:"Loading provider models and last-epoch usage…"}):h.jsx("p",{className:"hint",children:"Bind a seller to see its model catalog."})]})}function Cz(e){const t=P.useRef(null),[n,r]=P.useState(e);return P.useEffect(()=>{if(!t.current||typeof ResizeObserver>"u")return;const o=new ResizeObserver(i=>{const l=i[0];l&&r(Math.max(240,Math.round(l.contentRect.width)))});return o.observe(t.current),()=>o.disconnect()},[]),{ref:t,width:n}}function W2(e){if(e.max!==void 0)return e.max;const n=e.values.filter(r=>r!==null&&r>0n).reduce((r,o)=>o>r?o:r,0n);return n===0n?1n:n}function q2({epochs:e,bars:t,line:n,title:r,height:o=200,compact:i=!1}){var ie;const l=P.useId(),{ref:c,width:u}=Cz(640),p=i?48:60,f=n?i?44:56:12,m=14,g=28,v=Math.max(40,u-p-f),w=o-m-g,b=Math.max(1,e.length),C=v/b,j=Math.max(3,Math.min(28,C*.58)),I=W2(t),A=n?W2(n):1n,S=(re,ue)=>Number(re*1000000n/ue)/1e6,N=re=>m+w-S(re,I)*w,T=re=>m+w-S(re,A)*w,B=re=>p+C*re+C/2,R=t.values.some(re=>re!==null),M=!!n&&n.values.some(re=>re!==null),H=[0,1,2,3,4],V=u<480?4:8,W=Math.max(1,Math.ceil(b/V)),L=t.tick??t.format,J=n?n.tick??n.format:null,O=P.useRef(null),{hover:G,onPointerMove:ee,onPointerLeave:F,setHover:K,clientPoint:Y}=ov(O,u,o,re=>gz(re,p,C,e.length)),U=re=>K({index:re}),X=(G==null?void 0:G.index)??null,he=[];if(X!==null){const re=t.values[X];re!=null&&he.push({name:t.name,value:t.format(re),color:"var(--pc-accent)",note:(ie=t.provisional)!=null&&ie[X]?"estimated":void 0});const ue=n==null?void 0:n.values[X];n&&ue!=null&&he.push({name:n.name,value:n.format(ue),color:"var(--pc-blue)"})}let se="";if(n){let re=null;se=n.values.map((ue,Se)=>{if(ue===null)return re=null,"";const Pe=re!==null&&Se===re+1?"L":"M";return re=Se,`${Pe}${B(Se).toFixed(1)},${T(ue).toFixed(1)}`}).join(" ")}return h.jsxs("div",{className:"chart",children:[h.jsxs("div",{className:"chart-legend",children:[h.jsxs("span",{className:"chart-legend-item chart-legend-item--bars",children:[h.jsx("i",{}),t.name]}),n?h.jsxs("span",{className:"chart-legend-item chart-legend-item--line",children:[h.jsx("i",{}),n.name]}):null]}),h.jsxs("div",{ref:c,className:"chart-plot",children:[R||M?h.jsxs("svg",{ref:O,viewBox:`0 0 ${u} ${o}`,role:"img","aria-labelledby":l,onPointerMove:ee,onPointerLeave:F,children:[h.jsx("title",{id:l,children:r}),X!==null?h.jsxs("g",{className:"chart-hover","aria-hidden":"true",children:[h.jsx("rect",{x:B(X)-C/2,y:m,width:C,height:w,className:"chart-hover-band"}),h.jsx("line",{x1:B(X),x2:B(X),y1:m,y2:m+w,className:"chart-crosshair"})]}):null,H.map(re=>{const ue=m+w*re/4,Se=I*BigInt(4-re)/4n,Pe=A*BigInt(4-re)/4n;return h.jsxs("g",{children:[h.jsx("line",{x1:p,x2:p+v,y1:ue,y2:ue,className:"chart-grid"}),h.jsx("text",{x:p-8,y:ue+4,textAnchor:"end",className:"chart-axis chart-axis--bars",children:L(Se)}),n&&J?h.jsx("text",{x:p+v+8,y:ue+4,textAnchor:"start",className:"chart-axis chart-axis--line",children:J(Pe)}):null]},re)}),h.jsx("g",{className:"chart-bars",children:t.values.map((re,ue)=>{var mt;if(re===null)return null;const Se=((mt=t.provisional)==null?void 0:mt[ue])===!0,Pe=N(re),Me=`${t.name}, epoch ${e[ue]}: ${t.format(re)}${Se?" (estimated)":""}`;return h.jsx("rect",{x:B(ue)-j/2,y:Math.min(Pe,m+w-1),width:j,height:Math.max(1,m+w-Pe),rx:Math.min(3,j/3),className:`${Se?"chart-bar chart-bar--provisional":"chart-bar"}${X===ue?" chart-bar--hover":""}`,tabIndex:0,role:"img","aria-label":Me,onFocus:()=>U(ue),onBlur:F,children:h.jsx("title",{children:Me})},e[ue])})}),n&&M?h.jsxs("g",{className:"chart-line-group",children:[h.jsx("path",{d:se,className:"chart-line","data-series":n.key}),n.values.map((re,ue)=>{if(re===null)return null;const Se=`${n.name}, epoch ${e[ue]}: ${n.format(re)}`;return h.jsx("circle",{cx:B(ue),cy:T(re),r:X===ue?5:3.5,className:"chart-dot",tabIndex:0,role:"img","aria-label":Se,onFocus:()=>U(ue),onBlur:F,children:h.jsx("title",{children:Se})},e[ue])})]}):null,e.map((re,ue)=>ue%W===0||ue===e.length-1?h.jsx("text",{x:B(ue),y:o-8,textAnchor:"middle",className:"chart-axis chart-axis--x",children:re},re):null)]}):h.jsx("div",{className:"chart-empty",children:"No indexed data for these epochs."}),X!==null&&he.length>0?h.jsx(rv,{...Y(B(X),m),title:`Epoch ${e[X]}`,rows:he}):null]})]})}function kz({values:e,width:t=96,height:n=26,label:r,tone:o="accent",labels:i,format:l}){const c=P.useId(),u=e.map(O=>O===null?null:Number(O)),p=u.filter(O=>O!==null&&Number.isFinite(O)),f=P.useRef(null),m=u.length>1?(t-2)/(u.length-1):0,g=O=>1+O*m,v=u.map((O,G)=>O===null||!Number.isFinite(O)?Number.POSITIVE_INFINITY:g(G)),{hover:w,onPointerMove:b,onPointerLeave:C,clientPoint:j}=ov(f,t,n,O=>i?oA(O,v):null);if(p.length<2)return h.jsx("span",{className:"sparkline sparkline--empty","aria-label":r,role:"img",children:"·"});const I=Math.max(...p),A=Math.min(...p,0),S=I-A||1,N=2,T=O=>n-N-(O-A)/S*(n-N*2);let B="",R="",M=null;u.forEach((O,G)=>{if(O===null||!Number.isFinite(O)){M=null;return}B+=`${M===null?"M":"L"}${g(G).toFixed(1)},${T(O).toFixed(1)} `,M=G});const H=u.findIndex(O=>O!==null),V=u.length-1-[...u].reverse().findIndex(O=>O!==null);H>=0&&V>=H&&(R=`${B.trim()} L${g(V).toFixed(1)},${n} L${g(H).toFixed(1)},${n} Z`);const W=u[V],L=w!==null?u[w.index]:null,J=w!==null&&L!==null&&L!==void 0&&Number.isFinite(L)?{index:w.index,value:L}:null;return h.jsxs("span",{className:"sparkline-wrap",children:[h.jsxs("svg",{ref:f,className:`sparkline sparkline--${o}`,width:t,height:n,viewBox:`0 0 ${t} ${n}`,role:"img","aria-label":r,onPointerMove:b,onPointerLeave:C,children:[h.jsx("defs",{children:h.jsxs("linearGradient",{id:c,x1:"0",x2:"0",y1:"0",y2:"1",children:[h.jsx("stop",{offset:"0",stopColor:"currentColor",stopOpacity:"0.28"}),h.jsx("stop",{offset:"1",stopColor:"currentColor",stopOpacity:"0"})]})}),R?h.jsx("path",{d:R,fill:`url(#${c})`,stroke:"none"}):null,h.jsx("path",{d:B.trim(),fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round",strokeLinecap:"round"}),W!=null&&Number.isFinite(W)?h.jsx("circle",{cx:g(V),cy:T(W),r:"2",fill:"currentColor"}):null,J?h.jsx("circle",{cx:g(J.index),cy:T(J.value),r:"3",className:"sparkline-hover","aria-hidden":"true"}):null]}),J?h.jsx(rv,{...j(g(J.index),0),title:(i==null?void 0:i[J.index])??"",rows:[{name:"Settled volume",value:l?l(J.value):String(J.value)}]}):null]})}function sv({value:e,min:t=1,max:n,onChange:r,label:o="Lock",disabled:i,startEpoch:l,showUnlockDate:c=!0}){const u=dr(),p=Math.min(Math.max(e,t),n),f=l==null?null:l+p,m=u&&f!==null?Of(Za(f,u.genesis,u.epochDuration)):null;return h.jsxs("label",{className:"field lock-slider",children:[h.jsx("span",{className:"field__label",children:o}),h.jsx("input",{type:"range",className:"range",min:t,max:n,step:1,value:p,disabled:i,onChange:g=>r(Number(g.target.value)),"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":p,"aria-valuetext":`${p} ${p===1?"epoch":"epochs"}${m?`; unlocks ${m}`:""}`}),h.jsxs("span",{className:"lock-slider-readout",children:[h.jsx("span",{className:"mono",children:p})," ",p===1?"epoch":"epochs",u?` (${p*u.epochDuration/86400} days)`:"",c&&m?h.jsxs("span",{className:"muted",children:[" ","· unlocks ",h.jsx("span",{className:"mono",children:m})]}):null,p===n?h.jsx("span",{className:"dim",children:" · max"}):null]})]})}function Ez(e,t,n){const r=[];if(e){BigInt(e.buyerUsage.total)>0n&&r.push({id:"buyer",kind:"buyer",label:"Unclaimed buyer rewards",amount:e.buyerUsage.total,available:e.buyerUsage.claimable}),BigInt(e.sellerUsage.total)>0n&&r.push({id:"seller",kind:"seller",label:"Unclaimed seller rewards",amount:e.sellerUsage.total,available:e.sellerUsage.claimable,agentId:e.sellerUsage.agentId});for(const o of e.staker.positions)BigInt(o.amount)>0n&&r.push({id:`staker:${o.id}`,kind:"staker",label:`Staking rewards · position #${o.id}`,amount:o.amount,available:!0,agentId:o.agentId,positionId:o.id})}return n&&r.push({id:"wallet",kind:"wallet",label:"Wallet balance",amount:t,available:!0}),r}function Az(e,t,n,r){if(!e.available)throw new Error("This staking source is unavailable.");if(e.agentId!==void 0&&e.agentId!==t)throw new Error("These rewards must be staked into their source pool.");return e.kind==="wallet"?{path:"/api/positions/stake",body:{agentId:t,amount:n,epochs:r}}:e.kind==="staker"?{path:"/api/rewards/restake",body:{positionIds:[e.positionId],epochs:r}}:{path:"/api/rewards/stake-usage",body:{side:e.kind,epochs:r,...e.kind==="buyer"?{stakeAgentId:t}:{}}}}const Sz=86400,H2=e=>be(e,18).replace(/,/g,""),jz=[{label:"1w",days:7},{label:"1m",days:30},{label:"6m",days:182},{label:"1y",days:365},{label:"max",days:"max"}];function Iz(e){return e.kind==="wallet"?"Stakes wallet ANTS; token approval may be needed.":e.kind==="buyer"?"AI buying rewards. Choose any seller; no claim needed.":e.kind==="seller"?"AI selling rewards. Stakes into your own pool.":"Position rewards. Restakes into the same pool."}function sA({config:e,pools:t,balance:n,rewards:r=null,rewardsError:o,defaultAgentId:i,lockedPool:l=!1,onStarted:c,onClose:u,onBusyChange:p}){var sn,Ot,Mt;const{overview:f,config:m}=Bi(),g=dr(),v=Bs(),[w,b]=P.useState(null),[C,j]=P.useState(!1),I=P.useRef(!1),[A,S]=P.useState(()=>{var ye;return String(i??((ye=t[0])==null?void 0:ye.agentId)??"")}),[N,T]=P.useState(""),[B,R]=P.useState(null),M=(f==null?void 0:f.wallet.canTransfer)??!1,H=!m.selectedAddress||m.selectedAddress.toLowerCase()===((sn=m.walletAddress)==null?void 0:sn.toLowerCase()),V=Ez(o?null:r,n??"0",M).filter(ye=>H||ye.kind==="buyer"),W=l&&i?V.filter(ye=>ye.agentId===void 0||ye.agentId===i):V,L=l?V.length-W.length:0,J=W.find(ye=>ye.id===B),O=J??W.find(ye=>ye.available&&ye.kind!=="wallet")??W[0]??null,G=ev((O==null?void 0:O.kind)==="buyer"),ee=B!==null&&!J,F=(O==null?void 0:O.kind)==="wallet",K=O===null?"":F?N:H2(O.amount),Y=(O==null?void 0:O.agentId)??Number(A),U=(e==null?void 0:e.maxStakeEpochs)??1,X=Math.max(1,(e==null?void 0:e.minStakeEpochs)??1),[he,se]=P.useState(X);P.useEffect(()=>{e&&se(ye=>Math.max(e.minStakeEpochs,Math.min(ye,e.maxStakeEpochs)))},[e==null?void 0:e.minStakeEpochs,e==null?void 0:e.maxStakeEpochs]),P.useEffect(()=>{i&&S(String(i))},[i]),P.useEffect(()=>{!A&&t[0]&&S(String(t[0].agentId))},[A,t]);const ie=t.find(ye=>ye.agentId===Y)??null;let re=null;if(e&&(O!=null&&O.available)&&!ee&&yc(K)){const ye=Ug(K,18),Je=O.kind==="staker"?Math.floor(e.restakedRewardWeightBonusBps*he/e.maxStakeEpochs):0;ye!==null&&(re=rA(ie==null?void 0:ie.yield,he,ye.toString(),Je))}const ue=()=>{n!==void 0&&T(H2(n))},Se=()=>{if(!O)return"Nothing is available to stake.";if(!Y||O.agentId===void 0&&!ie)return"Choose a pool.";if(!yc(K))return"Amount must be a positive decimal number of ANTS.";const ye=Ug(K,18);if(ye===null)return"Amount must have no more than 18 decimal places.";if(F&&n!==void 0&&ye!==null){let Je=0n;try{Je=BigInt(n)}catch{Je=0n}if(ye>Je)return`Amount exceeds wallet balance (${be(n,4)} ANTS).`}return e?he<X||he>U?`Lock must be between ${X} and ${U} epochs.`:null:"Pool configuration is still loading."},Pe=e&&f?f.epoch.current+e.stakeActivationDelay:null,Me=(O==null?void 0:O.agentId)===void 0&&t.length===0,mt=m.browserWallet&&m.readOnly?"Connect wallet to stake.":f?ee?"The selected rewards are no longer available. Choose a source again.":O&&!O.available?"Use the wallet button above to switch to the authorized wallet for these rewards.":BigInt(f.wallet.signingWalletEth??f.wallet.eth)===0n?"The signing wallet needs ETH on the selected network to pay transaction fees.":null:"Wallet information is unavailable. Refresh before staking.",It=G.blocked||Me||!!mt||O===null,gt=mt??G.reason??(Me?"No stakeable pools yet.":null),Wt=ye=>g?Math.max(X,Math.min(U,Math.round(ye*Sz/g.epochDuration))):null,on=async()=>{if(I.current||It||!O)return;const ye=Se();if(ye){b(ye);return}I.current=!0,j(!0),p==null||p(!0),b(null);try{const Je=Az(O,Y,K.trim(),he);await v.start(Je.path,Je.body),c==null||c()}catch(Je){v.pushToast({tone:"danger",title:`${F?"Stake":"Stake rewards"} failed`,body:Ss(Je),sticky:!0})}finally{I.current=!1,j(!1),p==null||p(!1)}},rt=!r&&!o;return m.browserWallet&&m.readOnly?h.jsxs("form",{className:"stake-form",onSubmit:ye=>ye.preventDefault(),children:[h.jsx("div",{className:"status-line status-line--muted",role:"status",children:"Connect your wallet to see what you can stake. Unclaimed rewards can be staked directly; wallet ANTS are stakeable once transfers are enabled."}),u?h.jsx("div",{className:"stake-form-actions",children:h.jsx(pt,{variant:"outline",onClick:u,children:"Close"})}):null]}):h.jsxs("form",{className:"stake-form",onSubmit:ye=>{ye.preventDefault(),on()},children:[gt?h.jsx("div",{className:"status-line status-line--muted",role:"status",children:gt}):null,o?h.jsxs("p",{className:"error-text",children:["Rewards could not be loaded: ",o]}):null,W.length===0?h.jsx("div",{className:"stake-empty",role:"status",children:rt?h.jsx("span",{children:"Loading unclaimed rewards…"}):h.jsxs(h.Fragment,{children:[h.jsx("strong",{children:"Nothing to stake yet"}),M?"Your wallet holds no ANTS and no eligible rewards are unclaimed.":"ANTS transfers are not enabled for this wallet, so staking from the wallet balance is unavailable. Rewards you earn buying, selling or staking can be staked here directly as they accrue.",L>0?` ${L} reward source${L===1?"":"s"} belong to other pools.`:""]})}):h.jsxs("div",{className:"field",children:[h.jsx(Sa,{label:"Stake from",hint:O?Iz(O):void 0,children:h.jsx(ja,{value:(O==null?void 0:O.id)??"",disabled:C,onChange:ye=>{R(ye.target.value),b(null)},children:W.map(ye=>h.jsxs("option",{value:ye.id,children:[ye.label,ye.available?"":" · other wallet"," · ",be(ye.amount,4)," ANTS"]},ye.id))})}),M?null:h.jsx("span",{className:"field__hint",children:"Rewards only: wallet ANTS transfers are disabled."}),L>0?h.jsxs("span",{className:"field__hint",children:[L," reward source",L===1?"":"s"," bound to other pools ",L===1?"is":"are"," not shown here."]}):null]}),O?h.jsxs("div",{className:"form-row",children:[!l&&O.agentId===void 0?h.jsx(Sa,{label:"Seller pool",width:"lg",children:h.jsxs(ja,{value:String(Y||""),onChange:ye=>S(ye.target.value),disabled:C||Me,children:[Me?h.jsx("option",{value:"",children:"No stakeable pools"}):null,t.map(ye=>{var Je,Nr;return h.jsx("option",{value:ye.agentId,children:((Nr=(Je=ye.profile)==null?void 0:Je.name)==null?void 0:Nr.trim())||`Agent ID ${ye.agentId}`},ye.agentId)})]})}):O.agentId!==void 0&&!l?h.jsx(Sa,{label:"Seller pool",width:"lg",hint:"These rewards can only be staked into this seller pool.",children:h.jsx(ja,{value:String(O.agentId),disabled:!0,children:h.jsx("option",{value:O.agentId,children:((Mt=(Ot=ie==null?void 0:ie.profile)==null?void 0:Ot.name)==null?void 0:Mt.trim())||`Agent ID ${O.agentId}`})})}):null,F?h.jsx(ml,{label:"Amount (ANTS)",hint:n!==void 0?h.jsxs(h.Fragment,{children:["Balance ",h.jsx("span",{className:"mono",children:be(n,4)})," ·"," ",h.jsx("button",{type:"button",className:"link-button",onClick:ue,disabled:C,children:"Max"})]}):void 0,inputMode:"decimal",value:K,onChange:ye=>T(ye.target.value),placeholder:"0.0",disabled:C||Me}):null,h.jsxs("div",{className:"stake-lock-settings",children:[h.jsx(sv,{value:he,min:X,max:U,startEpoch:Pe,onChange:se,disabled:C||!e||Me}),h.jsx("div",{className:"lock-presets","aria-label":"Lock presets",children:jz.map(ye=>{const Je=ye.days==="max"?U:Wt(ye.days);return Je===null?null:h.jsx("button",{type:"button",className:"lock-preset","aria-pressed":he===Je,disabled:C||!e,onClick:()=>se(Je),children:ye.label},ye.label)})}),h.jsxs("div",{className:"stake-apy","aria-live":"polite",children:[h.jsxs("span",{className:"small",children:["Estimated APY ",h.jsx("strong",{className:"mono",children:ru(re)}),h.jsx(Jc,{label:"About estimated APY",children:"Uses your initial power, restaking bonus and added pool power. Assumes past rewards repeat with per-epoch compounding—not automatic. Excludes declining power and activation delays. Returns aren’t guaranteed."})]}),re===null?h.jsx("span",{className:"field__hint",children:F&&!yc(K)?"Enter an amount to estimate APY.":"APY unavailable: missing reward history or staking data."}):null]})]})]}):null,O&&(e||!F)?h.jsxs("div",{className:"hint",children:["Staking details",h.jsxs(Jc,{label:"About staking and early withdrawal",children:[e?h.jsxs(h.Fragment,{children:["Longer locks increase power. Early exit burns ",Bn(e.minEarlyExitSlashBps),"–",Bn(e.maxSlashBps)," of principal; preview shows the amount. Dates assume confirmation this epoch. "]}):null,F?null:h.jsx(h.Fragment,{children:"Stakes all eligible rewards, verified on-chain. Usage rewards may need approval per epoch."})]})]}):null,w?h.jsx("div",{className:"error-text",role:"alert",children:w}):null,O?h.jsxs("div",{className:"stake-form-actions",children:[h.jsx("button",{type:"submit",className:"btn btn--primary btn--md",disabled:It||C,children:C?"Sending…":G.label??(F?"Stake":"Stake rewards")}),u?h.jsx(pt,{variant:"outline",onClick:u,disabled:C,children:"Cancel"}):null]}):u?h.jsx("div",{className:"stake-form-actions",children:h.jsx(pt,{variant:"outline",onClick:u,children:"Close"})}):null]})}function Lf(e){var t,n;return((n=(t=e.profile)==null?void 0:t.name)==null?void 0:n.trim())||`Seller pool #${e.agentId}`}const Em=20;function iA(e){return[...e].sort((t,n)=>{var l,c;if(t.stakeable!==n.stakeable)return t.stakeable?-1:1;const r=t.lastEpochRewardPer1kPower,o=n.lastEpochRewardPer1kPower;if(r!==null&&o!==null){const u=pm(o,r);if(u!==0)return u}else{if(r!==null)return-1;if(o!==null)return 1}const i=pm(n.weight,t.weight);return i!==0?i:pm(((l=n.volumes[0])==null?void 0:l.usdc)??"0",((c=t.volumes[0])==null?void 0:c.usdc)??"0")})}function Xg(e,t){if(e.volumeStatus!=="available")return null;const n=e.volumes.find(r=>r.epoch===t-1);return n?ht(n.usdc):null}function bs(e){return ht(e??null)??0n}function Am(e){var t,n;return((n=(t=e.profile)==null?void 0:t.name)==null?void 0:n.trim())||"Unnamed seller"}function Nz(e,t,n,r){const o=i=>t==="apy"?tv(i.yield).oneWeek.apy:t==="stake"?ht(i.activeStake):Xg(i,r);return[...e].sort((i,l)=>{const c=o(i),u=o(l);if(c===null)return u===null?0:1;if(u===null)return-1;const p=c<u?-1:c>u?1:0;return n==="ascending"?p:-p})}function Pz(e,t){var r;if(!t)return!0;const n=t.toLowerCase();return String(e.agentId)===t||(((r=e.profile)==null?void 0:r.name)??"").toLowerCase().includes(n)||(e.seller??"").toLowerCase().includes(n)}function Bz(e,t){return aA(e,t).map(n=>ht(n.usdc))}function aA(e,t){return e.volumeStatus!=="available"?[]:[...e.volumes].filter(n=>n.epoch<t).sort((n,r)=>n.epoch-r.epoch)}function V2(e){return bs(e.yourStake)+bs(e.yourPendingStake)}function lA({amount:e,pending:t,sub:n,className:r}){return h.jsxs("span",{className:r?`cell-stack ${r}`:"cell-stack",children:[be(e),h.jsx("span",{className:"cell-sub",children:t>0n?h.jsxs("span",{className:"pending-amount",children:["+",be(t)," pending"]}):n})]})}function Tz({pool:e}){const t=bs(e.yourStake),n=bs(e.yourPendingStake);return t===0n&&n===0n?h.jsx("span",{className:"dim",children:"—"}):t===0n?h.jsxs("span",{className:"cell-stack pending-amount",children:[be(n),h.jsx("span",{className:"cell-sub",children:"pending activation"})]}):h.jsx(lA,{amount:e.yourStake,pending:n,sub:`${Bn(e.yourPoolShareBps)} of pool`,className:"accent"})}function _z({pools:e,currentEpoch:t,loading:n,walletSyncing:r=!1,onOpen:o,onStake:i}){const[l,c]=P.useState(""),[u,p]=P.useState(!1),[f,m]=P.useState("apy"),[g,v]=P.useState("descending"),[w,b]=P.useState(!1),C=(R,M)=>h.jsxs("button",{type:"button",className:"table-sort","aria-label":`Sort by ${M}, ${f===R&&g==="descending"?"ascending":"descending"}`,onClick:()=>{v(f===R&&g==="descending"?"ascending":"descending"),m(R),p(!1)},children:[M," ",h.jsx("span",{"aria-hidden":"true",children:f===R?g==="descending"?"↓":"↑":"↕"})]}),j=l.trim(),I=P.useMemo(()=>e.filter(R=>R.stakeable),[e]),A=P.useMemo(()=>I.filter(R=>V2(R)>0n).length,[I]),S=P.useMemo(()=>Nz(I.filter(R=>Pz(R,j)&&(!w||V2(R)>0n)),f,g,t),[I,j,f,g,t,w]),T=!u&&S.length>Em?S.slice(0,Em):S,B=[{key:"seller",label:"Seller",render:R=>{var M;return h.jsxs("div",{className:"seller-cell",children:[h.jsx("button",{type:"button",className:"pool-details-trigger","aria-label":`View ${Am(R)} overview`,"aria-haspopup":"dialog",onClick:H=>{H.stopPropagation(),o(R)},children:Am(R)}),h.jsxs("span",{className:"seller-cell-meta",children:[R.stakers!=null?h.jsxs("span",{children:[Fe(R.stakers)," ",R.stakers===1?"staker":"stakers"]}):R.openPositions!==void 0?h.jsxs("span",{children:[Fe(R.openPositions)," ",R.openPositions===1?"position":"positions"]}):null,((M=R.profile)==null?void 0:M.modelsServed)!=null?h.jsxs("span",{children:[Fe(R.profile.modelsServed)," models"]}):null]})]})}},{key:"trend",label:"Volume trend",title:"Settled USDC volume over the last completed epochs.",render:R=>h.jsx(kz,{values:Bz(R,t),labels:aA(R,t).map(M=>`Epoch ${M.epoch}`),format:M=>`${Xa(BigInt(Math.round(M)))} USDC`,label:`${Am(R)} settled volume over recent epochs`,tone:(Xg(R,t)??0n)>0n?"accent":"muted"})},{key:"apy",label:C("apy","APY"),sortDirection:f==="apy"?g:"none",align:"right",mono:!0,render:R=>h.jsx(Dz,{pool:R})},{key:"stake",label:C("stake","TVL"),sortDirection:f==="stake"?g:"none",title:"Total active stake in this pool (ANTS).",align:"right",mono:!0,render:R=>h.jsx(lA,{amount:R.activeStake,pending:bs(R.pendingStake),sub:`${Bn(R.powerShareBps)} power`})},{key:"volume",label:C("volume","Last epoch"),sortDirection:f==="volume"?g:"none",title:"Settled USDC volume in the last completed epoch.",align:"right",mono:!0,render:R=>{const M=Xg(R,t);return M===null?"—":Xa(M)}},{key:"yours",label:"Your stake",align:"right",mono:!0,render:R=>r?h.jsx("span",{className:"dim",children:"Updating…"}):h.jsx(Tz,{pool:R})},{key:"actions",label:"",align:"right",className:"col-actions",render:R=>R.stakeable?h.jsx("span",{onClick:M=>M.stopPropagation(),children:h.jsx(pt,{variant:"outline",size:"sm",onClick:()=>i(R),children:"Stake"})}):null}];return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"pools-toolbar",children:[I.length>5?h.jsx(ml,{label:"",mono:!1,width:"md",placeholder:"Search seller or agent id",value:l,onChange:R=>c(R.target.value),"aria-label":"Filter pools"}):null,A>0&&!r?h.jsxs("button",{type:"button",className:"lock-preset","aria-pressed":w,onClick:()=>b(R=>!R),children:["my pools · ",A]}):null,n?null:h.jsxs("span",{className:"muted small",children:[j||w?`${Fe(S.length)} of `:"",Fe(I.length)," ",I.length===1?"seller":"sellers"]})]}),I.some(R=>{var M;return(M=R.displaySource)==null?void 0:M.error})?h.jsx("p",{className:"hint",children:"Some Antscan statistics are unavailable or may lag. Missing historical yield is shown as —; open a provider for details."}):null,h.jsx(tl,{columns:B,rows:T,rowKey:R=>R.agentId,loading:n,onRowClick:o,empty:j?`No seller matches "${j}" in this view.`:w?"You have no stake in any seller yet.":"No sellers are ready for staking yet."}),S.length>Em?h.jsxs("div",{className:"pools-more",children:[h.jsxs("span",{className:"muted small",children:["Showing ",Fe(T.length)," of ",Fe(S.length)]}),h.jsx("button",{type:"button",className:"link-button",onClick:()=>p(R=>!R),children:u?"Show fewer":"Show all"})]}):null]})}function Rz({pool:e,view:t,onClose:n,stake:r}){var C,j,I,A,S,N;const o=tt(`pool:${e.agentId}`,()=>Ye.pool(e.agentId),6e4,mz),i=o.data??e,l=o.data?o.reconciling:!!t.walletSyncing,c=!!o.error||!!o.data&&o.data.volumeStatus!=="available",u=c&&e.volumeStatus==="available"?e:i,p=u===e?t.currentEpoch:((C=o.data)==null?void 0:C.currentEpoch)??t.currentEpoch,f=i.profile,m=t.explorer&&i.seller?`${t.explorer.replace(/\/$/,"")}/account/${i.seller}`:null,g=u.volumes.find(T=>T.epoch===p-1),v=bs(i.yourStake),w=bs(i.yourPendingStake),b=bs(i.pendingStake);return h.jsx(J1,{isOpen:!0,onClose:n,size:"lg",overlayClassName:"ants-stake-overlay ants-pool-overlay",className:"pool-overview",title:Lf(i),eyebrow:"SELLER",subtitle:h.jsxs(h.Fragment,{children:["Agent ",h.jsx("span",{className:"mono",children:i.agentId})," · ",i.seller?h.jsx(ut,{value:i.seller,copy:!0}):"No seller bound",m?h.jsxs(h.Fragment,{children:[" · ",h.jsx("a",{href:m,target:"_blank",rel:"noreferrer",children:"View on Antscan ↗"})]}):null]}),children:h.jsxs("div",{className:"vault",children:[h.jsxs("div",{className:"vault-main",children:[h.jsxs("div",{className:"pool-overview-status",children:[h.jsx(Nn,{tone:i.stakeable?"accent":"muted",children:i.hasPool?"Staking pool":"No pool yet"}),f!=null&&f.providers.length?f.providers.slice(0,4).map(T=>h.jsx(Nn,{tone:"muted",children:T},T)):null,i.openPositions!==void 0?h.jsxs("span",{children:[Fe(i.openPositions)," open positions",i.stakers!=null?` · ${Fe(i.stakers)} stakers`:""]}):null,((j=i.displaySource)==null?void 0:j.source)==="indexer"?h.jsxs("span",{className:"dim",children:["Antscan block ",i.displaySource.indexedBlock]}):null]}),(I=i.displaySource)!=null&&I.error?h.jsxs("p",{className:"hint",children:["Antscan: ",i.displaySource.error,((A=i.yield)==null?void 0:A.status)==="unavailable"?" Historical yield is unavailable.":""]}):null,h.jsxs("div",{className:"pool-metrics",children:[h.jsxs("div",{children:[h.jsx("span",{className:"tile-label",children:"Total value locked"}),h.jsxs("strong",{children:[be(i.activeStake)," ",h.jsx("small",{children:"ANTS"})]}),b>0n?h.jsxs("span",{className:"small pending-amount",children:["+",be(b)," ANTS pending activation"]}):null]}),h.jsxs("div",{children:[h.jsx("span",{className:"tile-label",children:"Last epoch volume"}),h.jsxs("strong",{children:[g&&u.volumeStatus==="available"?Xa(g.usdc):"—"," ",h.jsx("small",{children:"USDC"})]})]}),h.jsxs("div",{children:[h.jsx("span",{className:"tile-label",children:"Power share"}),h.jsx("strong",{children:Bn(i.powerShareBps)}),h.jsx("span",{className:"small muted",children:"of all pools' staking power"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"tile-label",children:"Last epoch rewards"}),h.jsxs("strong",{children:[i.lastEpochEmission!=null?be(i.lastEpochEmission):"—"," ",h.jsx("small",{children:"ANTS"})]}),h.jsx("span",{className:"small muted",children:i.lastEpochEmission!=null?i.lastEpochEmissionSettled?"settled to stakers":"estimated, not settled":"no usage yet"})]})]}),h.jsxs("section",{className:"pool-apy-section","aria-label":"Estimated APY by lock",children:[h.jsxs("div",{className:"pool-section-heading",children:[h.jsx("h3",{children:"Estimated APY by lock"}),h.jsx("span",{className:"small muted",children:"10,000 ANTS reference stake · longer locks earn more power"})]}),h.jsx(Fz,{pool:i})]}),h.jsxs("section",{className:"pool-section",children:[h.jsxs("div",{className:"pool-section-heading",children:[h.jsx("h3",{children:"Settled volume · completed epochs"}),h.jsx("span",{className:"small muted",children:"Includes legacy seller activity."})]}),c&&u===e&&u.volumeStatus==="available"&&h.jsx("p",{className:"hint",children:"Seller history could not refresh. Showing previously loaded history."}),u.volumeStatus!=="available"&&h.jsxs("p",{className:"hint",children:["Settlement volume ",u.volumeStatus==="stale"?"is stale":"is unavailable",". Usage points are not revenue."]}),h.jsx(wz,{volumes:u.volumes,networkVolumes:t.networkVolumes,currentEpoch:p}),u.statsUpdatedAt&&h.jsxs("p",{className:"small muted",children:["History fetched ",ar(Math.floor(u.statsUpdatedAt/1e3))]})]}),h.jsxs("section",{className:"pool-section",children:[h.jsxs("div",{className:"pool-section-heading",children:[h.jsx("h3",{children:"Stake, power and staker rewards"}),h.jsx("span",{className:"small muted",children:o.loading&&!o.data?"loading history…":(S=i.history)!=null&&S.length?`${i.history.length} indexed epochs`:"no indexed history"})]}),h.jsx(Mz,{history:i.history??[],currentEpoch:p})]}),h.jsxs("section",{className:"pool-section",children:[h.jsxs("div",{className:"pool-section-heading",children:[h.jsx("h3",{children:"Seller profile · lifetime activity"}),h.jsx("span",{className:"small muted",children:"Antscan indexed totals"})]}),(f==null?void 0:f.stale)&&h.jsx("p",{className:"hint",children:"Seller activity is stale; the indexer could not refresh."}),f?h.jsxs("div",{className:"pool-lifetime",children:[h.jsxs("div",{children:[h.jsx("span",{className:"tile-label",children:"Settled volume"}),h.jsx("strong",{children:f.lifetimeVolumeUsdc!=null?`${Xa(f.lifetimeVolumeUsdc)} USDC`:"—"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"tile-label",children:"Requests"}),h.jsx("strong",{children:f.requestCount!=null?Fe(f.requestCount):"—"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"tile-label",children:"Unique buyers"}),h.jsx("strong",{children:f.uniqueBuyers!=null?Fe(f.uniqueBuyers):"—"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"tile-label",children:"Models served"}),h.jsx("strong",{children:f.modelsServed!=null?Fe(f.modelsServed):"—"})]})]}):h.jsx("p",{className:"hint",children:"The explorer has no record for this seller."}),h.jsx($t,{items:[["Providers",f!=null&&f.providers.length?f.providers.join(", "):"—"],["Last epoch emission",i.lastEpochEmission!=null?`${be(i.lastEpochEmission,4)} ANTS`:"—"],["Ghost rate",(f==null?void 0:f.ghostRate)!=null&&Number.isFinite(f.ghostRate)&&f.ghostRate>=0&&f.ghostRate<=100?`${f.ghostRate.toFixed(1)}%`:"Unavailable"],["Last settled",(f==null?void 0:f.lastSettledAt)!=null?ar(f.lastSettledAt):"—"]]}),(f==null?void 0:f.fetchedAt)&&h.jsxs("p",{className:"small muted",children:["Profile fetched ",ar(Math.floor(f.fetchedAt/1e3))]})]}),h.jsx(xz,{address:i.seller})]}),h.jsxs("aside",{className:"vault-side","aria-label":"Your position and staking",children:[h.jsxs(Kr,{children:[h.jsx("h3",{children:"Your position"}),l?h.jsx("p",{className:"hint",role:"status",children:"Updating… Waiting for Antscan to include your latest transaction."}):h.jsxs("div",{className:"vault-your",children:[h.jsxs("div",{children:[h.jsx("span",{className:"tile-label",children:"Staked"}),h.jsx("strong",{children:v>0n?be(i.yourStake):"—"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"tile-label",children:"Pending activation"}),h.jsx("strong",{className:w>0n?"pending-amount":void 0,children:w>0n?be(i.yourPendingStake):"—"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"tile-label",children:"Power"}),h.jsx("strong",{children:v>0n?be(i.yourPower):"—"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"tile-label",children:"Pool share"}),h.jsx("strong",{children:v>0n?Bn(i.yourPoolShareBps):"—"})]}),h.jsxs("div",{children:[h.jsx("span",{className:"tile-label",children:"Positions"}),h.jsx("strong",{children:((N=i.yourPositionIds)==null?void 0:N.length)||"—"})]})]}),!l&&w>0n?h.jsxs("p",{className:"hint",children:["Pending stake starts earning at its activation epoch; it is listed under ",h.jsx("a",{href:el("positions"),children:"My positions"})," with its start date."]}):null]}),h.jsxs(Kr,{children:[h.jsxs("h3",{children:["Stake into ",Lf(i)]}),r?h.jsx(sA,{config:r.config,pools:[i],balance:r.balance,rewards:r.rewards,rewardsError:r.rewardsError,defaultAgentId:i.agentId,lockedPool:!0},`${i.agentId}:${r.walletReady}`):h.jsx("p",{className:"hint",children:"Open this seller from the Stake page to stake into it."})]})]})]})})}const Oz=10n**18n,Sm=e=>{const t=e/Oz;return t>=1000000n?`${(Number(t)/1e6).toFixed(1)}M`:t>=10000n?`${(Number(t)/1e3).toFixed(0)}k`:t>=1000n?`${(Number(t)/1e3).toFixed(1)}k`:t>=100n?t.toString():be(e,2)};function Mz({history:e,currentEpoch:t}){const n=e.filter(u=>u.epoch<=t),r=n.map(u=>u.epoch),o=n.map(u=>ht(u.activeStake)),i=n.map(u=>ht(u.weight)),l=n.map(u=>ht(u.emission)),c=n.map(u=>!u.settled);return h.jsxs("div",{className:"chart-grid-2",children:[h.jsx(q2,{epochs:r,title:"Active stake per epoch as bars (ANTS, left axis) with pool power as a line (right axis).",bars:{key:"stake",name:"Active stake · ANTS",values:o,format:u=>`${be(u)} ANTS`,tick:Sm},line:{key:"power",name:"Pool power",values:i,format:u=>be(u),tick:Sm}}),h.jsx(q2,{epochs:r,title:"Staker rewards per epoch (ANTS). Hollow bars are estimates for epochs not yet settled.",bars:{key:"emission",name:"Staker rewards · ANTS",values:l,format:u=>`${be(u,2)} ANTS`,tick:Sm,provisional:c}})]})}function Fz({pool:e}){return h.jsx("dl",{className:"pool-apy-estimates",children:pz(e.yield).map(t=>{var n,r;return h.jsxs("div",{title:t.status==="unsupported"?`${t.label} is not supported by this pool's whole-epoch lock limits.`:t.apy===null?"APY is unavailable because reward or epoch data is missing.":`10,000 ANTS reference stake. ${t.epochs} epoch(s), ${t.actualDays} days. Annualized initial earning rate with hypothetical compounding; not the return over this lock. APY above 10,000% is shown as ${Ah}. Source epoch ${e.yield.epoch}.${((n=e.yield)==null?void 0:n.status)==="estimated"?" Rewards are not yet settled.":""}`,children:[h.jsx("dt",{children:t.label}),h.jsx("dd",{children:t.status==="unsupported"?h.jsx("span",{className:"pool-apy-unavailable",children:"Unsupported"}):h.jsxs(h.Fragment,{children:[ru(t.apy),t.apy!==null&&t.apy<=Ff&&((r=e.yield)==null?void 0:r.status)==="estimated"?h.jsx("span",{className:"dim small",children:" est."}):null]})})]},t.label)})})}function Lz(e){const t=e.yield;if(!t||t.status==="unavailable")return"Last-epoch yield is unavailable.";const n=tv(t),r=t.endsAt-t.startsAt,o=i=>i===null?"unavailable":`${i} epoch(s), ${i*r/86400} days`;return`10,000 ANTS reference stake, including added pool power. 1 week: ${o(n.oneWeek.epochs)}; 2 years: ${o(n.twoYears.epochs)}. Source epoch ${t.epoch}: ${ar(t.startsAt)} – ${ar(t.endsAt)}. Assumes rewards and initial rates repeat each epoch; compounding is not automatic. Excludes declining power and activation delays. Returns aren’t guaranteed. — means unavailable.${t.status==="estimated"?" Rewards not yet settled.":""}`}function Dz({pool:e}){var c;const{oneWeek:t,twoYears:n}=tv(e.yield),r=t.apy!==null||n.apy!==null,o=(t.apy??0)>Ff||(n.apy??0)>Ff,i=ru(t.apy),l=ru(n.apy);return h.jsxs("span",{className:`yield-percent${r?" yield-percent--hot":""}`,title:`${Lz(e)}${o?` ${fz}`:""}`,children:[o?Ah:r?`${i} – ${l}`:"—",r&&!o&&((c=e.yield)==null?void 0:c.status)==="estimated"?h.jsx("span",{className:"dim small",children:" est."}):null]})}function cA(e){return e.maxLockedNext??e.maxLocked}function iv(e,t,n){return e==="enable-max-lock"||e==="disable-max-lock"?t+1:Math.max(t+1,...n.map(r=>r.stakeStartEpoch))}function uA(e,t,n){if(e.withdrawn||e.closedAtEpoch!==0)return"This position is already closed or withdrawn.";if(n===null)return"Waiting for current epoch information.";const r=cA(e);return t==="disable-max-lock"?r?null:"This position is not scheduled for max lock.":r?t==="enable-max-lock"?"This position is already scheduled for max lock.":"Disable maximum lock before this action.":t==="enable-max-lock"&&n<e.stakeStartEpoch?`Max lock can be enabled when the next epoch reaches activation epoch ${e.stakeStartEpoch}.`:e.stakeEndEpoch===0||n>=e.stakeEndEpoch?"The position has no remaining lock when this action takes effect. Withdraw it, then stake again to start a new lock.":null}function Uz({items:e,label:t="More actions"}){const[n,r]=P.useState(!1),o=P.useRef(null),i=P.useRef(null),[l,c]=P.useState({});return P.useLayoutEffect(()=>{if(!n||!i.current)return;const u=i.current.getBoundingClientRect();c({top:u.bottom+4,right:Math.max(8,window.innerWidth-u.right)})},[n]),P.useEffect(()=>{if(!n)return;const u=m=>{o.current&&!o.current.contains(m.target)&&r(!1)},p=m=>{m.key==="Escape"&&r(!1)},f=()=>r(!1);return document.addEventListener("mousedown",u),window.addEventListener("keydown",p),window.addEventListener("scroll",f,!0),window.addEventListener("resize",f),()=>{document.removeEventListener("mousedown",u),window.removeEventListener("keydown",p),window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",f)}},[n]),h.jsxs("span",{className:"menu",ref:o,onClick:u=>u.stopPropagation(),children:[h.jsx("button",{ref:i,type:"button",className:"menu-trigger","aria-label":t,"aria-haspopup":"menu","aria-expanded":n,title:t,onClick:()=>r(u=>!u),children:h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:[h.jsx("circle",{cx:"3",cy:"8",r:"1.4"}),h.jsx("circle",{cx:"8",cy:"8",r:"1.4"}),h.jsx("circle",{cx:"13",cy:"8",r:"1.4"})]})}),n?h.jsx("div",{className:"menu-list",role:"menu",style:l,children:e.map(u=>h.jsx("button",{type:"button",role:"menuitem",className:"menu-item",disabled:u.disabled,title:u.title,onClick:()=>{var p;r(!1),(p=i.current)==null||p.focus({preventScroll:!0}),u.onSelect()},children:u.label},u.label))}):null]})}function dA({positionId:e,positionIds:t,size:n,autoOpen:r=!1,onStarted:o,onCancel:i}){const l=t??(e!==void 0?[e]:[]),c=Bs(),u=ev(),[p,f]=P.useState(r),[m,g]=P.useState(null),[v,w]=P.useState(null),[b,C]=P.useState(!1),[j,I]=P.useState(!1),[A,S]=P.useState(null),[N,T]=P.useState(!1),B=P.useRef(!1),R=l.length===0||l.some(J=>!Number.isSafeInteger(J)||J<=0),M=async()=>{if(!R){C(!0),g(null),w(null),I(!1);try{const J=await Ye.withdrawPreview(l);g(l.length===1?$z(J,l[0]):J)}catch(J){w(Ss(J))}finally{C(!1)}}},H=()=>{R||(f(!0),S(null),M())};P.useEffect(()=>{r&&!R&&H()},[]);const V=async()=>{if(!L||!m||B.current)return;const J={positionIds:l,acceptSlashing:m.earlyExit&&j,maxSlashedAmount:m.totalSlashed};B.current=!0,T(!0),S(null);try{await c.start("/api/positions/withdraw",J),f(!1),o==null||o()}catch(O){c.pushToast({tone:"danger",title:`Withdraw · position${l.length>1?"s":""} ${l.map(G=>`#${G}`).join(", ")} failed`,body:Ss(O),sticky:!0})}finally{B.current=!1,T(!1)}},W=u.reason??(R?"Choose at least one position to withdraw.":void 0),L=!R&&!u.blocked&&!N&&m!==null&&!m.simulationError&&(!m.earlyExit||j);return h.jsxs("div",{className:"action",children:[p&&r?null:h.jsx("span",{className:"btn-wrap",title:W,children:h.jsx(pt,{variant:"outline",size:n==="sm"?"sm":"md",onClick:H,disabled:R,children:"Withdraw"})}),p?h.jsxs(X8,{title:l.length>1?`Withdraw ${l.length} positions`:"Withdraw position",hideTitle:r,confirmLabel:u.label??(m!=null&&m.earlyExit?"Withdraw and burn slashed principal":"Withdraw"),danger:(m==null?void 0:m.earlyExit)===!0,disabled:!L,busy:N,error:A,onConfirm:()=>{V()},onCancel:()=>{f(!1),i==null||i()},children:[u.reason?h.jsxs("div",{className:"hint",children:[u.reason," You can still review this estimate."]}):null,b?h.jsxs("div",{className:"muted small",children:[h.jsx(Ch,{})," Computing slashing preview…"]}):null,v?h.jsxs("div",{children:[h.jsx("div",{className:"error-text",children:v}),h.jsx("div",{className:"mt",children:h.jsx(pt,{variant:"outline",size:"sm",onClick:()=>void M(),children:"Retry preview"})})]}):null,(m==null?void 0:m.simulationError)&&h.jsxs("div",{className:"error-text",children:["Withdrawal cannot execute: ",m.simulationError]}),m?h.jsxs("div",{className:"hint",children:["Rewards to claim separately: ",be(m.pendingRewards,4)," ANTS. ",m.transfersRestricted?"Returned ANTS remain transfer-restricted in this wallet. Ending a position does not enable token transfers. Consider moving your allocation directly to another seller.":"ANTS transfers are currently enabled for this wallet."]}):null,m?h.jsxs("div",{className:"stack",children:[h.jsx(zz,{preview:m}),m.earlyExit?h.jsxs("div",{className:"row",children:[h.jsxs("label",{className:"check danger",children:[h.jsx("input",{type:"checkbox",checked:j,onChange:J=>I(J.target.checked)}),h.jsxs("span",{children:["I accept burning ",h.jsx("span",{className:"mono",children:be(m.totalSlashed,4)})," ANTS of principal (early exit)."]})]}),h.jsx(Wg,{})]}):h.jsxs("div",{className:"hint",children:["No early-exit penalty applies. Withdrawal returns principal; rewards must be claimed separately.",h.jsx(Wg,{})]})]}):null]}):null]})}function $z(e,t){var n;if(e.positions.length!==1||((n=e.positions[0])==null?void 0:n.id)!==t)throw new Error("Withdrawal preview does not match this position. Refresh and try again.");return e}function zz({preview:e}){const t=e.positions.length===1;return h.jsx($t,{items:[...t?[["Early-exit penalty",h.jsxs("span",{className:e.earlyExit?"danger":void 0,children:[Bn(e.positions[0].slashBps),h.jsx(Wg,{})]})]]:e.positions.map(n=>[`Position #${n.id}`,h.jsxs("span",{className:n.slashBps>0?"danger":void 0,children:[be(n.amount,4)," ANTS · penalty ",Bn(n.slashBps)]})]),["Burned",h.jsxs("span",{className:e.earlyExit?"danger":void 0,children:[be(e.totalSlashed,4)," ANTS"]})],["You receive",`${be(e.totalReturned,4)} ANTS`]]})}function Wz({pools:e,enabled:t=!0}){var W,L,J;const n=dr(),r=tt(t?"positions:current":null,Ye.positions),[o,i]=P.useState(!1),[l,c]=P.useState(null),[u,p]=P.useState(null),[f,m]=P.useState(()=>new Set),g=r.data,v=r.reconciling||!!r.error,w=P.useMemo(()=>(g==null?void 0:g.positions)??[],[g]),b=P.useMemo(()=>w.filter(O=>!Co(O)).length,[w]),C=P.useMemo(()=>o?w:w.filter(Co),[w,o]),j=l?C.find(O=>O.id===l.id)??null:null,I=P.useMemo(()=>new Map(e.map(O=>[O.agentId,O])),[e]),A=P.useMemo(()=>C.filter(Co),[C]),S=P.useMemo(()=>A.filter(O=>f.has(O.id)),[A,f]),N=fA(S,n==null?void 0:n.current),T=(O,G)=>c({id:O,kind:G}),B=O=>m(G=>{const ee=new Set(G);return ee.has(O)?ee.delete(O):ee.add(O),ee}),R=()=>m(O=>O.size===A.length?new Set:new Set(A.map(G=>G.id))),M=()=>m(new Set),H=O=>O.stopPropagation(),V=[{key:"select",className:"col-select",label:A.length>0?h.jsx("input",{type:"checkbox","aria-label":"Select all open positions",disabled:v,checked:f.size>0&&f.size===A.length,onChange:R}):"",render:O=>Co(O)?h.jsx("input",{type:"checkbox","aria-label":`Select position ${O.id}`,disabled:v,checked:f.has(O.id),onChange:()=>B(O.id),onClick:H}):null},{key:"seller",label:"Seller",render:O=>{var ee,F;const G=I.get(O.agentId);return h.jsxs("span",{className:"cell-stack",title:(G==null?void 0:G.seller)??void 0,children:[h.jsx("span",{children:((F=(ee=G==null?void 0:G.profile)==null?void 0:ee.name)==null?void 0:F.trim())||(G!=null&&G.seller?bh(G.seller):"Unknown seller")}),h.jsxs("span",{className:"cell-sub",children:["#",O.id,qz(O)]})]})}},{key:"amount",label:"Amount",align:"right",mono:!0,render:O=>h.jsxs("span",{className:"cell-stack",children:[be(O.amount,4),h.jsxs("span",{className:"cell-sub",title:O.nextPower!=null?`Next epoch power: ${be(O.nextPower,0)}`:void 0,children:["power ",be(O.power??O.weightAmount,0)]})]})},{key:"apy",label:h.jsxs(h.Fragment,{children:["Est. APY",h.jsx(Jc,{label:"About position APY",children:"Illustrative annualized return using the pool’s historical epoch reward budget and current pool power. Active positions use their current power, already included in the pool total. Pending positions use their activation power added to the current pool total; other pending changes are not projected. Assumes the rate repeats and compounds every epoch. Compounding is not automatic, normal-lock power declines, and activation delays are excluded. Missing data and closed or expired positions show —. Future rewards are not guaranteed."})]}),align:"right",mono:!0,render:O=>{var K,Y,U;const G=I.get(O.agentId),ee=(g==null?void 0:g.currentEpoch)??(n==null?void 0:n.current),F=hz(O,G,ee,(K=g==null?void 0:g.config)==null?void 0:K.maxStakeEpochs);return h.jsx("span",{title:F===null?"APY unavailable for this position.":`Based on ${((Y=G==null?void 0:G.yield)==null?void 0:Y.status)==="estimated"?"estimated ":""}pool rewards in epoch ${(U=G==null?void 0:G.yield)==null?void 0:U.epoch}.${ee!==void 0&&O.stakeStartEpoch>ee?" Estimate for when this position activates.":""}`,children:ru(F)})}},{key:"unlocks",label:"Unlocks",title:"Epoch and date when the lock expires. Funds are not withdrawn automatically.",render:O=>h.jsx(Sh,{position:O})},{key:"state",label:"Status",title:"The current stage of this staking position.",render:O=>h.jsx(Qz,{position:O})},{key:"reward",label:"Pending reward",align:"right",mono:!0,render:O=>be(O.pendingReward,4)},{key:"actions",label:"",align:"right",className:"col-actions",render:O=>Co(O)&&!v?h.jsx("span",{className:"row-nowrap",onClick:H,children:h.jsx(Uz,{label:`More actions for position ${O.id}`,items:[{label:"Split",onSelect:()=>T(O.id,"split"),disabled:$r(O,"split",n==null?void 0:n.current)!==null,title:$r(O,"split",n==null?void 0:n.current)??void 0},{label:"Extend lock",onSelect:()=>T(O.id,"extend"),disabled:$r(O,"extend",n==null?void 0:n.current)!==null,title:$r(O,"extend",n==null?void 0:n.current)??void 0},{label:Ti(O)?"Disable max lock":"Enable max lock",onSelect:()=>T(O.id,"max-lock"),disabled:ty(O,n==null?void 0:n.current)!==null,title:ty(O,n==null?void 0:n.current)??void 0},{label:"Move allocation",onSelect:()=>T(O.id,"move"),disabled:$r(O,"move",n==null?void 0:n.current)!==null,title:$r(O,"move",n==null?void 0:n.current)??void 0},{label:"Withdraw",onSelect:()=>T(O.id,"withdraw")}]})}):null}];return h.jsxs(Dt,{title:`Your positions${g?` (${C.length})`:""}`,className:"positions-card",actions:b>0?h.jsx("button",{type:"button",className:"link-button",onClick:()=>i(O=>!O),children:o?"hide closed":`show ${b} closed`}):null,children:[r.error&&!g?h.jsx(nn,{error:r.error,onRetry:r.refresh}):null,r.error&&g?h.jsxs("div",{className:"status-line",children:["Refresh failed: ",r.error]}):null,r.reconciling&&!r.error?h.jsx("p",{role:"status",className:"hint",children:"Updating… Waiting for the latest position data."}):null,(g==null?void 0:g.historySource)==="local"?h.jsx("p",{className:"hint",children:"Includes closed positions from verified local transactions. Older history may be incomplete without an indexer."}):null,(g==null?void 0:g.historySource)==="chain"?h.jsx("div",{className:"status-line status-line--muted",children:"Closed-position history is unavailable. Open positions are shown from the chain; rewards on closed positions may be missing."}):null,S.length>0&&!v?h.jsxs("div",{className:"bulk-bar",role:"region","aria-label":"Selected positions",children:[h.jsxs("span",{className:"bulk-bar-count",children:[S.length," selected · ",be(ey(S),4)," ANTS"]}),h.jsx("button",{type:"button",className:"link-button",onClick:M,children:"clear"}),h.jsxs("div",{className:"bulk-bar-actions",children:[h.jsx("span",{className:"btn-wrap",title:N??"Combine the selected positions into one.",children:h.jsxs(pt,{variant:"outline",size:"sm",disabled:N!==null,onClick:()=>p("merge"),children:["Merge ",S.length>1?S.length:""]})}),h.jsxs(pt,{variant:"outline",size:"sm",onClick:()=>p("withdraw"),children:["Withdraw ",S.length]})]})]}):null,l&&j&&g&&!v?h.jsx(Zz,{kind:l.kind,position:j,config:g.config,pools:e,onClose:()=>c(null)},`${l.id}:${l.kind}`):null,u&&g&&S.length>0&&!v?h.jsx(Xz,{kind:u,positions:S,pools:e,onClose:()=>p(null),onStarted:()=>{p(null),M()}}):null,h.jsx(tl,{columns:V,rows:C,rowKey:O=>O.id,empty:t?r.error?"Positions are currently unavailable.":g?r.reconciling?"Updating positions…":"No open positions. Stake rewards into a seller to open one.":"Loading positions…":"Connect a wallet to see your positions."}),((W=g==null?void 0:g.displaySource)==null?void 0:W.source)==="indexer"?h.jsx("p",{className:"hint",children:"Position status from Antscan. Withdrawal amounts and transaction eligibility are checked live before signing."}):null,((L=g==null?void 0:g.rewardSource)==null?void 0:L.indexedBlock)!==void 0?h.jsxs("p",{className:"hint",children:["Reward estimates from Antscan at block ",g.rewardSource.indexedBlock,"."]}):null,(J=g==null?void 0:g.rewardSource)!=null&&J.error?h.jsxs("p",{role:"status",className:"hint",children:["Indexed rewards unavailable: ",g.rewardSource.error,". Unknown amounts are shown as —, not zero."]}):null]})}function ey(e){return e.reduce((t,n)=>t+(ht(n.amount)??0n),0n).toString()}function fA(e,t){if(e.length<2)return"Select at least two positions to merge.";if(new Set(e.map(r=>r.id)).size!==e.length)return"Select each position only once.";if(new Set(e.map(r=>r.agentId)).size!==1)return"Merged positions must stake the same seller.";const n=t===void 0?null:iv("merge",t,e);for(const r of e){const o=uA(r,"merge",n);if(o)return o}return new Set(e.map(r=>r.stakeEndEpoch)).size!==1?"Merged positions must share the same unlock epoch. Extend the shorter ones first.":null}function Ti(e){return cA(e)}function qz(e){const t=Ti(e);return t&&e.maxLocked?" · max lock":t?" · max lock from next epoch":e.maxLocked?" · max lock ends next epoch":""}function Co(e){return!e.withdrawn&&e.closedAtEpoch===0&&e.state!=="withdrawn"&&e.state!=="closed"}const Hz={pending:"amber",active:"accent",matured:"muted",closed:"muted",withdrawn:"muted"},Vz={pending:"Waiting for the stake activation epoch.",active:"The staking position is active and its lock has not expired.",matured:"The lock has expired. Withdraw to receive your funds; withdrawal is not automatic.",closed:"This position has been closed, for example by a split, merge, or move.",withdrawn:"Funds have been withdrawn from this position."};function Qz({position:e}){const{state:t}=e,n=Co(e)&&(t==="pending"||e.changePending);return h.jsx(Nn,{tone:n?"amber":Hz[t],title:n?"The transaction is confirmed. This position starts contributing staking power at its activation epoch.":Vz[t],children:n?`Activates epoch ${e.stakeStartEpoch}`:t})}function $r(e,t,n){const r=n===void 0?null:iv(t,n,[e]);return uA(e,t,r)}function ty(e,t){return $r(e,Ti(e)?"disable-max-lock":"enable-max-lock",t)}function Sh({position:e,dateOnly:t=!1}){const n=dr();if(!Co(e))return h.jsx("span",{className:"muted",children:"—"});const r=n?`epoch ${n.current+1}`:"next epoch";return Ti(e)?h.jsxs("span",{className:"cell-stack",children:[h.jsx("span",{className:"muted",title:"Disable max lock to start the countdown.",children:"Max lock"}),!e.maxLocked&&h.jsxs("span",{className:"cell-sub",children:["Max lock starts ",r]})]}):h.jsxs("span",{className:"cell-stack",children:[h.jsx(Iu,{epoch:e.stakeEndEpoch,dateOnly:t}),e.maxLocked&&h.jsxs("span",{className:"cell-sub",children:["Countdown starts ",r]})]})}function jh(e,t){var r,o;const n=t.find(i=>i.agentId===e);return((o=(r=n==null?void 0:n.profile)==null?void 0:r.name)==null?void 0:o.trim())||(n!=null&&n.seller?bh(n.seller):"Unknown seller")}function Gz({position:e,pools:t}){const n=dr(),r=e.epochsRemaining,o=n?Of(Za(e.stakeEndEpoch,n.genesis,n.epochDuration)):null,i=n?Of(Za(e.stakeStartEpoch,n.genesis,n.epochDuration)):null;return h.jsxs("div",{children:[h.jsxs("div",{children:[jh(e.agentId,t)," · ",h.jsxs("span",{className:"mono",children:[be(e.amount,4)," ANTS"]})]}),h.jsxs("div",{className:"muted small",children:[Co(e)?Ti(e)||e.maxLocked?h.jsx(Sh,{position:e,dateOnly:!0}):e.state==="matured"?"Lock expired":h.jsxs(h.Fragment,{children:[e.state==="pending"?"Lock duration":"Remaining lock",": ",r," ",r===1?"epoch":"epochs",n?` (${e.state==="pending"?"":"up to "}${i8(r*n.epochDuration)})`:"",e.state==="pending"?` · starts ${i?`${i} UTC`:`epoch ${e.stakeStartEpoch}`}`:""]}):"Position closed",!e.maxLocked&&Co(e)?` · ${e.state==="matured"?"unlocked":"unlocks"} ${o?`${o} UTC`:`epoch ${e.stakeEndEpoch}`}`:""]})]})}function Kz({position:e,config:t,pools:n,onStarted:r}){const o=dr(),i=n.filter(g=>g.stakeable&&g.agentId!==e.agentId),[l,c]=P.useState(()=>{var g;return String(((g=i[0])==null?void 0:g.agentId)??"")}),u=i.find(g=>String(g.agentId)===l)??null,p={positionIds:[e.id],toAgentId:Number(l)},f=$r(e,"move",o==null?void 0:o.current),m=Math.max(((o==null?void 0:o.current)??0)+1,e.stakeStartEpoch);return h.jsxs("div",{className:"form-row",children:[h.jsx("p",{className:"hint",children:"Move your allocation directly to another seller. Principal stays staked and the lock end date is preserved. Accrued rewards remain claimable on the source position."}),h.jsxs("p",{className:"hint",children:["Effective ",o?`${Of(Za(m,o.genesis,o.epochDuration))} UTC (epoch ${m})`:`epoch ${m}`,". One transaction; your wallet will ask you to approve it."]}),f&&h.jsx("p",{className:"error-text",children:f}),h.jsx(Sa,{label:"To seller",hint:t.moveWeightPenaltyBps===0?"No move penalty is currently configured. Moving does not burn your ANTS.":`Moving reduces future staking power by ${Bn(t.moveWeightPenaltyBps)}. Your ANTS principal is not burned.`,width:"lg",children:h.jsxs(ja,{value:l,onChange:g=>c(g.target.value),disabled:i.length===0,children:[i.length===0?h.jsx("option",{value:"",children:"No other seller to move to"}):null,i.map(g=>h.jsx("option",{value:g.agentId,children:jh(g.agentId,n)},g.agentId))]})}),h.jsx(Jr,{label:"Move allocation",disabled:f!==null,disabledReason:f??void 0,variant:"primary",path:"/api/positions/move",body:p,validate:()=>u?null:"Choose a target seller.",onStarted:r})]})}function Yz({position:e,onStarted:t}){const n=dr(),r=ht(e.amount)??0n,o=ht(e.weightAmount)??0n,[i,l]=P.useState(""),c=yc(i)?Ug(i,18):null,u=c!==null&&c>0n&&c<r,p=u?o*c/r:0n,f=$r(e,"split",n==null?void 0:n.current),m=v=>l(be(r*BigInt(Math.round(v*1e4))/10000n,18).replace(/,/g,"")),g={positionId:e.id,amount:i.trim()};return h.jsxs("div",{className:"stack",children:[h.jsx("p",{className:"hint",children:"Splitting replaces this position with two positions with the same seller and lock terms. Power splits in proportion to the amount, so total power is unchanged. Disable max lock before splitting; you can enable it on the new positions before they activate."}),f&&h.jsx("p",{className:"error-text",children:f}),h.jsx("div",{className:"form-row",children:h.jsx(ml,{label:"Amount to split off (ANTS)",inputMode:"decimal",value:i,onChange:v=>l(v.target.value),placeholder:"0.0",hint:h.jsxs(h.Fragment,{children:["of ",h.jsx("span",{className:"mono",children:be(e.amount,4)})," ·"," ",[.25,.5,.75].map(v=>h.jsxs("button",{type:"button",className:"link-button",style:{marginRight:8},onClick:()=>m(v),children:[v*100,"%"]},v))]})})}),h.jsxs("div",{className:"split-preview","aria-live":"polite",children:[h.jsxs("div",{className:"split-part",children:[h.jsxs("span",{className:"tile-label",children:["Keeps position #",e.id]}),h.jsxs("strong",{children:[be(u?r-c:r,4)," ANTS"]}),h.jsxs("span",{className:"small muted",children:["power ",be(u?o-p:o,0)]})]}),h.jsxs("div",{className:"split-part split-part--new",children:[h.jsx("span",{className:"tile-label",children:"New position"}),h.jsxs("strong",{children:[u?be(c,4):"—"," ANTS"]}),h.jsxs("span",{className:"small muted",children:["power ",u?be(p,0):"—"]})]})]}),h.jsx(Jr,{label:"Split position",variant:"primary",path:"/api/positions/split",body:g,disabled:f!==null,disabledReason:f??void 0,validate:()=>yc(i)?c===null?"Amount must have no more than 18 decimal places.":c>=r?`Amount must be below the position's ${be(e.amount,4)} ANTS.`:p===0n||o-p===0n?"Amount is too small: both parts need non-zero power.":null:"Amount must be a positive decimal number of ANTS.",onStarted:t})]})}function Jz({position:e,config:t,onStarted:n}){const r=dr(),o=!Ti(e),i={positionId:e.id,enable:o},l=ty(e,r==null?void 0:r.current),c=r?r.current+1+t.maxStakeEpochs:null;return h.jsxs("div",{className:"stack",children:[o?h.jsxs(h.Fragment,{children:[h.jsxs("p",{className:"hint",children:["Max lock pins this position at the maximum lock (",t.maxStakeEpochs," epochs",r?`, ${i8(t.maxStakeEpochs*r.epochDuration)}`:"",") so its staking power stays at the maximum instead of decaying as the lock runs down."]}),h.jsx("p",{className:"hint",children:"The lock no longer counts down. To withdraw later, disable max lock first: a fresh full countdown then starts from the next epoch. Disabling before activation does not restore the original shorter lock. Moves and merges require max lock to be disabled at their effective epoch."})]}):h.jsxs(h.Fragment,{children:[h.jsxs("p",{className:"hint",children:["Disabling max lock starts a fresh ",t.maxStakeEpochs,"-epoch countdown from the next epoch",c!==null?h.jsxs(h.Fragment,{children:[" (unlocks ",h.jsx(Iu,{epoch:c,dateOnly:!0}),")"]}):null,". Power then decays as the lock runs down."]}),h.jsx("p",{className:"hint",children:"Withdrawing before that countdown ends is an early exit and burns part of the principal."})]}),l&&h.jsx("p",{className:"error-text",children:l}),h.jsx(Jr,{label:o?"Enable max lock":"Disable max lock",variant:o?"primary":"default",path:"/api/positions/max-lock",body:i,disabled:l!==null,disabledReason:l??void 0,onStarted:n})]})}function Zz({kind:e,position:t,config:n,pools:r=[],onClose:o}){const i=dr(),l=i?iv("extend",i.current,[t]):null,c=l===null?null:t.stakeEndEpoch,u=c===null||l===null?0:Math.max(n.maxStakeEpochs-(c-l),0),p=$r(t,"extend",i==null?void 0:i.current),[f,m]=P.useState(Math.min(1,u)||1),g={move:"Move allocation",extend:"Extend position",split:"Split position","max-lock":Ti(t)?"Disable max lock":"Enable max lock",withdraw:"Withdraw positions"},v={positionId:t.id,epochs:f},w=()=>p||(u<=0?`This position is already at the maximum lock (${n.maxStakeEpochs} epochs).`:f<1||f>u?`At most ${u} more epoch(s) can be added (max lock ${n.maxStakeEpochs}).`:null);return h.jsxs(X1,{title:g[e],onClose:o,children:[e!=="extend"?h.jsx("div",{className:"small mb",children:h.jsx(Gz,{position:t,pools:r})}):null,e==="withdraw"?h.jsxs("div",{className:"stack",children:[t.changePending?h.jsxs("div",{className:"error-text",children:["Withdrawals are blocked until activation epoch ",t.withdrawableEpoch,". The position change is already confirmed."]}):null,h.jsx(dA,{positionId:t.id,autoOpen:!0,onStarted:o,onCancel:o})]}):null,e==="move"?h.jsx(Kz,{position:t,config:n,pools:r,onStarted:o}):null,e==="split"?h.jsx(Yz,{position:t,onStarted:o}):null,e==="max-lock"?h.jsx(Jz,{position:t,config:n,onStarted:o}):null,e==="extend"?h.jsxs("div",{className:"stack",children:[h.jsxs("dl",{className:"facts",children:[h.jsx("dt",{children:"Amount"}),h.jsxs("dd",{children:[be(t.amount,4)," ANTS"]}),h.jsx("dt",{children:"Current unlock time"}),h.jsx("dd",{children:h.jsx(Sh,{position:t,dateOnly:!0})})]}),p&&h.jsx("p",{className:"error-text",children:p}),h.jsx(sv,{label:"Add",value:f,min:1,max:Math.max(u,1),startEpoch:c,onChange:m,disabled:p!==null||u<=0,showUnlockDate:!1}),h.jsxs("dl",{className:"facts","aria-live":"polite",children:[h.jsx("dt",{children:"New unlock date"}),h.jsx("dd",{children:h.jsx(Iu,{epoch:c!==null&&u>0&&!p?c+f:null,dateOnly:!0})})]}),h.jsx(Jr,{label:"Extend",variant:"primary",path:"/api/positions/extend",body:v,disabled:p!==null||u<=0,disabledReason:p??(u<=0?"This position is already at the maximum lock.":void 0),validate:w,onStarted:o})]}):null]})}function Xz({kind:e,positions:t,pools:n,onClose:r,onStarted:o}){const i=dr(),l=t.map(f=>f.id),c=fA(t,i==null?void 0:i.current),u={positionIds:l},p=t[0];return h.jsx(X1,{title:e==="merge"?`Merge ${t.length} positions`:`Withdraw ${t.length} positions`,onClose:r,children:h.jsxs("div",{className:"stack",children:[h.jsxs("dl",{className:"facts",children:[t.map(f=>h.jsx(eW,{position:f,pools:n},f.id)),h.jsx("dt",{children:"Total"}),h.jsxs("dd",{children:[be(ey(t),4)," ANTS"]})]}),e==="merge"?h.jsxs(h.Fragment,{children:[h.jsxs("p",{className:"hint",children:["Merging combines these positions into one position of ",be(ey(t),4)," ANTS in ",jh(p.agentId,n)," with the shared unlock epoch ",p.stakeEndEpoch,". Power is preserved. The source positions close; their accrued rewards stay claimable. The contract verifies matching underlying lock start and end terms before wallet approval; matching unlock dates alone are not sufficient."]}),c?h.jsx("p",{className:"error-text",children:c}):null,h.jsx(Jr,{label:"Merge positions",variant:"primary",path:"/api/positions/merge",body:u,disabled:c!==null,disabledReason:c??void 0,onStarted:o})]}):h.jsxs(h.Fragment,{children:[t.some(f=>f.changePending)?h.jsx("div",{className:"error-text",children:"A selected position has not activated. Withdrawals remain blocked until its activation epoch."}):null,h.jsx(dA,{positionIds:l,autoOpen:!0,onStarted:o,onCancel:r})]})]})})}function eW({position:e,pools:t}){return h.jsxs(h.Fragment,{children:[h.jsxs("dt",{children:["#",e.id," · ",jh(e.agentId,t)]}),h.jsxs("dd",{children:[be(e.amount,4)," ANTS · ",h.jsx(Sh,{position:e,dateOnly:!0})]})]})}function tW(){var f;const e=Ts(),t=!e.browserWallet||!e.readOnly,n=t||!!(e.selectedAddress||e.walletAddress)&&!/^0x0{40}$/i.test(e.address),r=tt("overview",Ye.overview),o=tt("rewards",Ye.rewards,5*6e4),i=tt("pools",Ye.pools,5*6e4,nv),l=P.useMemo(()=>{var m;return iA(((m=i.data)==null?void 0:m.pools)??[])},[i.data]),c=r.data,u=(c==null?void 0:c.wallet.canTransfer)??!1,p=i.reconciling?0n:ht(((f=i.data)==null?void 0:f.yourPendingStake)??null)??0n;return h.jsxs(h.Fragment,{children:[h.jsx("h1",{className:"page-title",children:"My positions"}),r.error&&!c?h.jsx(nn,{error:r.error,onRetry:r.refresh}):null,h.jsxs(L1,{children:[h.jsx(kr,{label:"Your total staked",value:c?be(c.wallet.totalActiveStake):"…",unit:"ANTS",loading:!c,sub:r.reconciling&&!r.error?"Updating…":c?h.jsxs(h.Fragment,{children:[Fe(c.wallet.positionCount)," position",c.wallet.positionCount===1?"":"s",p>0n?h.jsxs(h.Fragment,{children:[" · ",h.jsxs("span",{className:"pending-amount",children:[be(p)," ANTS pending activation"]})]}):null]}):void 0}),h.jsx(kr,{label:"Your power",value:i.reconciling&&!i.error?"…":i.data?be(i.data.yourTotalPower):i.error?"—":"…",loading:i.loading&&!i.data,sub:i.reconciling&&!i.error?"Updating…":i.data?`${Bn(i.data.yourNetworkShareBps)} of all pools`:i.error?h.jsx("span",{className:"danger",children:i.error}):"scanning pools…"}),h.jsx(kr,{label:t?"Claimable rewards":"Buyer rewards",value:o.data?be(o.data.total):o.error?"—":"…",unit:"ANTS",loading:o.loading&&!o.data,sub:o.error?h.jsxs("span",{className:"danger",children:[o.error," ",h.jsx("button",{className:"link-button",onClick:o.refresh,type:"button",children:"retry"})]}):o.reconciling?"Updating…":o.data?h.jsx("a",{href:el("rewards"),children:t?"Stake rewards or claim →":"View buyer rewards →"}):"loading from chain…"}),h.jsx(kr,{label:"Wallet balance",value:c?be(c.wallet.ants,4):"…",unit:"ANTS",loading:!c,sub:r.reconciling&&!r.error?"Updating…":c?u?"transfers enabled · stakeable":"transfers not enabled · stake from rewards":void 0})]}),h.jsx(Wz,{pools:l,enabled:n})]})}const Nu=P.createContext({updating:!1,stale:!1});function nW(){const e=tt("rewards",Ye.rewards,3e5),t=e.data,n=e.reconciling&&(!e.error||e.loading),r=!!t&&(e.reconciling||!!e.error);return h.jsxs(h.Fragment,{children:[e.error&&!t?h.jsx(nn,{error:e.error,onRetry:e.refresh}):null,e.error&&t&&!e.loading?h.jsx(nn,{title:"Rewards could not be refreshed",error:`Shown amounts may be out of date. Retry refreshing before another action. This does not mean a confirmed transaction failed. ${e.error}`,onRetry:e.refresh}):null,n?h.jsx("p",{role:"status",className:"hint",children:"Updating… Waiting for the latest reward data."}):null,!t&&e.loading?h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"muted small mb",children:"Loading rewards from the blockchain and indexer…"}),h.jsx(ju,{rows:6})]}):null,t?h.jsxs(Nu.Provider,{value:{updating:n,stale:r},children:[h.jsx(rW,{data:t}),t.scope!=="buyer"?h.jsx(oW,{onRefresh:e.refresh,data:t}):null]}):null]})}function ny(){const{updating:e,stale:t}=P.useContext(Nu);return t?h.jsx("span",{className:"reward-refresh-state",children:e?"Updating…":"Out of date"}):null}function ni({children:e}){const{updating:t}=P.useContext(Nu);return t?h.jsx("span",{className:"muted","aria-busy":"true",children:e}):h.jsx(h.Fragment,{children:e})}function rW({data:e}){var w;const t=Ts(),[n,r]=P.useState(null),[o,i]=P.useState(!1),l=Lg([e.buyerUsage.total,e.legacy.buyer]),c=e.buyerUsage.operator,u=!!c&&c.toLowerCase()===(t.walletAddress??t.address).toLowerCase()&&!t.readOnly,p=!c&&t.canAuthorize,f=c&&!u&&t.browserWallet,m=Xt(e.buyerUsage.total)?"No current buyer rewards are available to stake yet.":u?e.buyerUsage.claimable?null:"These buyer rewards are not currently eligible for direct staking.":"Connect the authorized buyer wallet to stake these rewards.",g=tt(u&&!Xt(e.buyerUsage.total)?"positions:current":null,Ye.positions),v=async()=>{i(!0),r(null);try{await Js("/api/wallet/authorize",{method:"POST"})}catch(b){r(b instanceof Error?b.message:String(b))}finally{i(!1)}};return h.jsxs(Kr,{className:"hero",children:[h.jsx("div",{className:"tile-label",children:"Buyer rewards"}),h.jsxs("p",{className:"hint",children:["Earned by buyer account ",h.jsx(ut,{value:t.buyerAddress??t.address}),"."]}),h.jsxs("div",{className:"hero-value",children:[h.jsx(ni,{children:be(l,4)}),h.jsx("span",{className:"unit",children:"ANTS"}),h.jsx(ny,{})]}),Xt(l)?h.jsx("p",{className:"hero-sub muted",children:"Nothing to claim yet. Rewards accrue at each epoch boundary."}):null,c?u?null:h.jsxs("p",{className:"hint",children:["Connect the authorized wallet ",h.jsx(ut,{value:c})," on ",t.chainId," to claim or stake."]}):h.jsx("p",{className:"hint",children:"Authorize a wallet to claim or stake this buyer’s rewards."}),u&&t.selectedAddress&&(c==null?void 0:c.toLowerCase())!==t.selectedAddress.toLowerCase()?h.jsxs("p",{className:"hint",children:["Buyer rewards and positions created by staking them belong to operator ",h.jsx(ut,{value:c}),". Select that address to manage those positions."]}):null,p||f?h.jsxs("div",{className:"hero-actions",children:[p?h.jsx("button",{className:"btn",disabled:o,onClick:()=>void v(),children:o?"Opening…":"Authorize wallet ↗"}):null,f?h.jsx(KD,{}):null]}):null,n?h.jsx("p",{role:"alert",className:"hint",children:n}):null,h.jsxs("div",{className:"buckets",children:[h.jsx(vc,{visible:!0,name:"Current buyer rewards",amount:e.buyerUsage.total,note:"Earned from using AI services.",actions:h.jsxs(h.Fragment,{children:[h.jsx(ba,{bucket:"buyer",scope:"buyer",amount:e.buyerUsage.total,title:"Claim current buyer rewards",disabled:!u||!e.buyerUsage.claimable,reason:"Connect the authorized wallet and check buyer reward eligibility."}),m?h.jsx("span",{className:"btn-wrap",title:m,children:h.jsx(pt,{variant:"outline",size:"sm",disabled:!0,children:"Stake rewards"})}):h.jsx(ry,{kind:"buyer",data:e,maxEpochs:((w=g.data)==null?void 0:w.config.maxStakeEpochs)??null})]})}),h.jsx(vc,{visible:!Xt(e.legacy.buyer),name:"Legacy buyer rewards",amount:e.legacy.buyer,note:"Earned from using AI services under the previous rewards system.",actions:h.jsx(ba,{bucket:"legacy",scope:"buyer",amount:e.legacy.buyer,title:"Claim legacy buyer rewards",disabled:!u||!e.legacy.buyerClaimable,reason:"Connect the authorized wallet for this buyer account."})})]})]})}function oW({data:e,onRefresh:t}){var v,w,b;const n=Ts(),r=e.sellerUsage.claimable?e.sellerUsage.total:"0",o=e.legacy.seller,i=Lg([e.sellerUsage.total,e.legacy.seller,e.locked.claimable]),l=Lg([e.sellerUsage.claimable?"0":e.sellerUsage.total,e.legacy.seller,e.locked.claimable]),u=((v=tt("positions:current",Ye.positions).data)==null?void 0:v.config.maxStakeEpochs)??null,p=Xt(i),f=e.legacy.sellerPayout,m=!!(f!=null&&f.recipient)&&f.destination!=="unknown",g=(f==null?void 0:f.destination)==="locked";return h.jsxs(h.Fragment,{children:[h.jsxs(Kr,{className:"hero","aria-label":"Staking rewards",children:[e.historySource==="chain"?h.jsx("p",{className:"status-line status-line--muted",children:"Closed-position history is unavailable. Without an indexer, some rewards may be missing. Refresh to retry."}):null,e.historySource==="local"?h.jsx("p",{className:"status-line status-line--muted",children:"Local transaction history included. Older closed positions—and their rewards—may be missing without an indexer."}):null,h.jsx("div",{className:"tile-label",children:"Staking rewards"}),h.jsxs("p",{className:"hint",children:["Unclaimed staking rewards for ",h.jsx(ut,{value:n.address}),"—not your wallet balance."]}),h.jsxs("div",{className:"hero-value",children:[h.jsx(ni,{children:be(e.staker.total,4)}),h.jsx("span",{className:"unit",children:"ANTS"}),h.jsx(ny,{})]}),((w=e.staker.source)==null?void 0:w.indexedBlock)!==void 0?h.jsxs("p",{className:"hint",children:["Estimated by Antscan at block ",e.staker.source.indexedBlock,". Claims and restaking are checked live."]}):null,e.staker.total===null?h.jsxs("p",{role:"status",className:"hint",children:["Staking rewards unavailable: ",((b=e.staker.source)==null?void 0:b.error)??"Antscan has not finished indexing these rewards."," ",h.jsx("button",{className:"link-button",onClick:t,children:"Retry"})]}):Xt(e.staker.total)?h.jsx("p",{className:"hero-sub muted",children:"Nothing to claim yet. Rewards accrue at each epoch boundary."}):h.jsxs("div",{className:"hero-actions",children:[h.jsx(ba,{bucket:"staker",amount:e.staker.total}),h.jsx(ry,{kind:"staker",data:e,maxEpochs:u})]})]}),!Er().pages.includes("seller")&&p&&Xt(e.locked.locked)?null:h.jsxs(Kr,{className:"hero","aria-label":"Seller rewards",children:[h.jsx("div",{className:"tile-label",children:"Seller rewards"}),h.jsxs("p",{className:"hint",children:["Unclaimed AI selling rewards for ",h.jsx(ut,{value:n.address}),"—not your wallet balance."]}),h.jsxs("div",{className:"hero-value",children:[h.jsx(ni,{children:be(i,4)}),h.jsx("span",{className:"unit",children:"ANTS"}),h.jsx(ny,{})]}),p?null:h.jsxs("div",{className:"hero-sub",children:["Available to stake directly ",h.jsx("span",{className:"mono",children:h.jsx(ni,{children:be(r,4)})})," · other rewards ",h.jsx("span",{className:"mono",children:h.jsx(ni,{children:be(l,4)})})]}),p?h.jsx("div",{className:"hero-sub muted",children:"Nothing to claim yet. Rewards accrue at each epoch boundary."}):null,p&&Xt(e.locked.locked)?null:h.jsxs("div",{className:"buckets",children:[h.jsx(vc,{visible:!Xt(e.sellerUsage.total),name:"Current seller rewards",note:"Earned from providing AI services.",amount:e.sellerUsage.total,actions:h.jsxs(h.Fragment,{children:[h.jsx(ba,{bucket:"seller",amount:e.sellerUsage.total,disabled:!e.sellerUsage.claimable,reason:"Seller usage rewards are not claimable from this wallet."}),h.jsx(ry,{kind:"seller",data:e,maxEpochs:u})]})}),h.jsx(vc,{visible:!Xt(e.legacy.seller),name:"Legacy seller rewards",note:"Earned from providing AI services under the previous rewards system.",amount:e.legacy.seller,actions:h.jsxs(h.Fragment,{children:[h.jsx(ba,{bucket:"legacy",amount:o,title:"Claim legacy seller rewards",label:m?g?"Claim not available yet":"Claim to wallet":"Claim unavailable",disabled:!m||g,reason:m&&g?"Claiming legacy seller rewards into the locked pool is currently unavailable in this dashboard.":"Payout destination could not be verified. Refresh rewards before claiming.",expectedLegacySellerRecipient:(f==null?void 0:f.recipient)??void 0}),m?null:h.jsx(pt,{variant:"outline",size:"sm",onClick:t,children:"Refresh rewards"})]})}),h.jsx(vc,{visible:!Xt(e.locked.claimable)||!Xt(e.locked.locked),name:"Locked seller rewards",note:"Past seller rewards held in the locked pool.",amount:e.locked.claimable,amountDetail:`${be(e.locked.locked,4)} ANTS locked`,actions:h.jsx(ba,{bucket:"locked",amount:e.locked.claimable,label:"Withdraw available amount",title:"Withdraw released seller rewards",disabled:!e.locked.policy,reason:e.locked.policy?Xt(e.locked.claimable)?"No rewards are currently released for withdrawal.":void 0:"M002 (unlock policy) is not installed."})})]})]})]})}function vc({visible:e,name:t,note:n,amount:r,amountDetail:o,actions:i}){return e?h.jsxs("div",{className:"bucket",children:[h.jsxs("div",{className:"bucket-main",children:[h.jsx("div",{className:"bucket-name",children:t}),n?h.jsx("div",{className:"bucket-note",children:n}):null]}),h.jsxs("div",{className:`bucket-amount mono${o?" bucket-amount--detailed":""}`,children:[h.jsxs("span",{children:[h.jsx(ni,{children:be(r,4)})," ",h.jsx("span",{className:"unit",children:"ANTS"})]}),o?h.jsx("span",{className:"bucket-amount-detail",children:h.jsx(ni,{children:o})}):null]}),h.jsx("div",{className:"bucket-actions",children:i})]}):null}function ba({bucket:e,amount:t,label:n,title:r,disabled:o,reason:i,scope:l="wallet",expectedLegacySellerRecipient:c}){const{stale:u}=P.useContext(Nu),p={buckets:[e],scope:l,...c?{expectedLegacySellerRecipient:c}:{}},f=Xt(t);return h.jsx(Jr,{label:n??"Claim to wallet",size:"sm",title:r??(e==="staker"?"Claim staking rewards":"Claim current seller rewards"),path:"/api/rewards/claim",body:p,disabled:u||o||f,disabledReason:u?"Wait for rewards to refresh before another action.":i??(f?"Nothing to claim.":void 0)})}function sW(e){var i;const t=dr(),n=tt("positions:current",Ye.positions),[r,o]=P.useState(e??1);return P.useEffect(()=>{e!==null&&o(e)},[e]),{epochs:r,setEpochs:o,positions:n,slider:h.jsx(sv,{value:r,min:((i=n.data)==null?void 0:i.config.minStakeEpochs)??1,max:e??1,startEpoch:t&&n.data?t.current+n.data.config.stakeActivationDelay:null,onChange:o,disabled:e===null})}}function iW({data:e,pools:t}){const n=new Map;for(const r of e.staker.positions){const o=ht(r.amount)??0n;o>0n&&n.set(r.agentId,(n.get(r.agentId)??0n)+o)}return n.size===0?h.jsx(h.Fragment,{children:"Destination unavailable"}):h.jsx("div",{children:[...n].map(([r,o])=>{const i=t.find(l=>l.agentId===r);return h.jsxs("div",{children:[i?Lf(i):`Seller pool #${r}`," · ",be(o.toString(),4)," ANTS"]},r)})})}function ry({kind:e,data:t,maxEpochs:n}){var j;const{stale:r}=P.useContext(Nu),{epochs:o,slider:i,positions:l}=sW(n),c=tt("pools",Ye.pools,5*6e4,nv),[u,p]=P.useState(()=>t.sellerUsage.agentId?String(t.sellerUsage.agentId):""),f=((j=c.data)==null?void 0:j.pools)??[];P.useEffect(()=>{!u&&f[0]&&p(String(f[0].agentId))},[u,f]);const m=e==="staker"?t.staker.total:e==="seller"?t.sellerUsage.total:t.buyerUsage.total,g=e==="staker"?!0:e==="seller"?t.sellerUsage.claimable:t.buyerUsage.claimable,v=e==="staker"?"/api/rewards/restake":"/api/rewards/stake-usage",w=e==="staker"?{epochs:o}:{side:e,epochs:o,...e==="buyer"&&u?{stakeAgentId:Number(u)}:{}},b=f.find(I=>I.agentId===t.sellerUsage.agentId),C=e==="staker"?h.jsx(iW,{data:t,pools:f}):b?Lf(b):t.sellerUsage.agentId?`Seller pool #${t.sellerUsage.agentId}`:"Destination unavailable";return n===null&&g&&!Xt(m)?l.error&&!l.loading?h.jsx("span",{className:"btn-wrap",title:`Staking configuration could not be loaded: ${l.error}`,children:h.jsx(pt,{variant:"outline",size:"sm",onClick:l.refresh,children:"Retry loading"})}):h.jsx(pt,{variant:"outline",size:"sm",disabled:!0,"aria-busy":"true","aria-label":"Loading staking configuration",children:"Loading…"}):h.jsx(Jr,{label:"Stake rewards",size:"sm",title:e==="staker"?"Stake position rewards":`Stake current ${e} rewards`,path:v,body:w,disabled:r||Xt(m)||!g||n===null,disabledReason:r?"Wait for rewards to refresh before another action.":g?"No rewards are available to stake.":`${e} usage rewards are not claimable from this wallet.`,validate:()=>n===null?"Pool configuration is still loading.":e==="buyer"&&!u?"Choose a pool to stake into.":null,summary:e==="buyer"?[["Amount",h.jsxs("span",{className:"mono",children:[be(m,4)," ANTS"]})]]:[["Amount",h.jsxs("span",{className:"mono",children:[be(m,4)," ANTS"]})],["Into",C],["Lock",h.jsxs("span",{className:"mono",children:[o," epochs"]})]],children:h.jsxs("div",{className:"stack mt",children:[i,e==="buyer"?h.jsx(Sa,{label:"Pool",width:"lg",hint:c.loading&&!c.data?"loading pools…":void 0,children:h.jsx(ja,{value:u,onChange:I=>p(I.target.value),children:f.map(I=>{var A,S;return h.jsx("option",{value:I.agentId,children:((S=(A=I.profile)==null?void 0:A.name)==null?void 0:S.trim())||`Agent ID ${I.agentId}`},I.agentId)})})}):null]})})}function aW(){const e=Ts(),t=/^0x0{40}$/i.test(e.address),n=tt(t?null:`seller:${e.address.toLowerCase()}`,Ye.seller),r=n.data;return t?h.jsx(Dt,{title:"Open your seller dashboard",children:h.jsxs("p",{className:"muted",children:["Open this dashboard with ",h.jsx("code",{children:"antseed ants --address 0x..."})," using your seller’s address, then connect that seller’s wallet."]})}):r?h.jsxs(h.Fragment,{children:[n.error&&r?h.jsxs("div",{className:"status-line",children:["Refresh failed: ",n.error]}):null,r.agentId===0?h.jsx(Dt,{title:"Not registered as a seller",children:h.jsx("p",{className:"muted",children:"The connected wallet has no seller identity on this network. Switch to your seller wallet, or register this wallet below to create its identity and bind it in the seller registry."})}):null,h.jsx(lW,{data:r}),h.jsx(Dt,{title:"Wash-trading status",children:h.jsx(tz,{})}),h.jsx(Dt,{className:"panel-collapsible",children:h.jsx(ir,{summary:"Advanced: submit a seller proof",children:h.jsxs("div",{className:"stack-lg",children:[h.jsx(sz,{}),h.jsxs("div",{children:[h.jsx("div",{className:"section-label",children:"Proof status"}),h.jsx(iz,{})]})]})})}),h.jsx(Dt,{className:"panel-collapsible",children:h.jsx(ir,{summary:"Look up another seller",children:h.jsx(nz,{})})})]}):n.error?h.jsx(nn,{error:n.error,onRetry:n.refresh}):h.jsx(ju,{rows:6})}function pa({value:e}){return e===null?h.jsx("span",{className:"muted",children:"n/a"}):e?h.jsx(Nn,{tone:"accent",children:"yes"}):h.jsx(Nn,{tone:"muted",children:"no"})}function lW({data:e}){const t=e.starter;return h.jsxs(h.Fragment,{children:[h.jsxs(L1,{children:[h.jsx(kr,{label:"Agent id",value:e.agentId||"—",sub:e.identityRegistered?"identity registered":"no ERC-8004 identity"}),h.jsx(kr,{label:"Eligible",value:e.eligible?"yes":"no",sub:e.registryBound?"bound in seller registry":"not bound"}),h.jsx(kr,{label:"Pool active stake",value:be(e.poolActiveStake),unit:"ANTS",sub:e.minPoolStake!==null?`min ${be(e.minPoolStake)} ANTS`:void 0})]}),h.jsxs(Dt,{title:"Identity and registry",children:[h.jsx($t,{items:[["ERC-8004 identity",h.jsx(pa,{value:e.identityRegistered})],["Seller registry binding",h.jsx(pa,{value:e.registryBound})],["Legacy stake",`${Wn(e.legacyStake)} USDC`],["Legacy eligibility path",h.jsx(pa,{value:e.legacyEligibilityEnabled})]]}),h.jsx("div",{className:"mt",children:h.jsx(cW,{data:e})}),h.jsxs("div",{className:"hint mt",children:["CLI equivalent: ",h.jsx("code",{children:"antseed seller register"})]})]}),h.jsx(Dt,{title:"Starter grant",actions:t?t.claimable?h.jsx(Nn,{tone:"accent",children:"claimable"}):t.expired?h.jsx(Nn,{tone:"muted",children:"expired"}):t.initialized?h.jsx(Nn,{tone:"amber",children:"initialized"}):h.jsx(Nn,{tone:"muted",children:"not initialized"}):null,children:t?h.jsxs(h.Fragment,{children:[h.jsx($t,{items:[["Grants remaining",Fe(t.remaining)],["Grant amount",`${be(t.amount,4)} ANTS`],["Claim window ends",h.jsx(Iu,{epoch:t.endEpoch})],["Legacy eligible",h.jsx(pa,{value:t.legacyEligible})]]}),h.jsx("div",{className:"mt",children:h.jsx(Jr,{label:t.initialized?"Grant already claimed":"Claim starter",variant:"primary",title:"Claim starter grant",path:"/api/seller/claim-starter",body:{},disabled:t.initialized||!t.claimable,disabledReason:t.initialized?"This starter grant has already been claimed.":t.expired?"The starter grant window has expired.":"The starter grant is not claimable for this wallet."})}),h.jsxs(ir,{summary:"Details",className:"mt",children:[h.jsx($t,{items:[["Contract",t.contract?h.jsx(ut,{value:t.contract,short:!1}):"—"],["Initialized",h.jsx(pa,{value:t.initialized})],["Expired",h.jsx(pa,{value:t.expired})]]}),h.jsxs("div",{className:"hint mt",children:["CLI equivalent: ",h.jsx("code",{children:"antseed seller legacy claim-starter"})]})]})]}):h.jsx("span",{className:"muted",children:"No starter grant contract on this chain."})})]})}function cW({data:e}){const[t,n]=P.useState(e.agentId>0?String(e.agentId):""),r=t.trim()?{agentId:Number(t)}:{};return h.jsxs("div",{className:"form-row",children:[h.jsx(ml,{label:"Agent id (optional)",hint:"Use an existing ID, or leave empty to create an identity if this wallet has none.",width:"md",inputMode:"numeric",value:t,onChange:o=>n(o.target.value)}),h.jsx(Jr,{label:e.registryBound?"Re-register binding":"Register binding",variant:"primary",title:"Register seller binding",path:"/api/seller/register",body:r,validate:()=>t.trim()&&!ED(t)?"Agent id must be a positive integer.":null}),h.jsx("p",{className:"hint mt",children:"Binds this wallet to its agent id in the seller registry. Without an id, it reuses a known identity or creates one if this wallet has none. Creating and binding can require separate transactions."})]})}function uW(){var H,V,W,L,J,O,G,ee,F;const e=Ts(),t=!e.browserWallet||!e.readOnly,n=tt("overview",Ye.overview),r=tt(t?"positions:current":null,Ye.positions),o=tt("rewards",Ye.rewards,5*6e4),i=tt("pools",Ye.pools,5*6e4,nv),l=n.data,c=(H=o.data)==null?void 0:H.buyerUsage.operator,u=t&&!!c&&c.toLowerCase()!==e.address.toLowerCase()&&BigInt(((V=o.data)==null?void 0:V.buyerUsage.total)??"0")>0n,p=(l==null?void 0:l.notices.filter(K=>!K.startsWith("ANTS transfers are not enabled")))??[],[f,m]=P.useState(void 0),[g,v]=P.useState(!1),w=P.useRef(null),[b,C]=P.useState(null),j=P.useRef(null),I=()=>{C(null),requestAnimationFrame(()=>{var K;(K=j.current)!=null&&K.isConnected&&j.current.focus({preventScroll:!0})})},A=P.useMemo(()=>{var K;return iA(((K=i.data)==null?void 0:K.pools)??[])},[i.data]),S=P.useRef(null),N=b!==null?A.find(K=>K.agentId===b):void 0;N&&i.data&&(S.current={pool:N,view:i.data});const T=b!==null&&((W=S.current)==null?void 0:W.pool.agentId)===b?S.current:null,B=K=>{j.current=document.activeElement instanceof HTMLElement?document.activeElement:null,C(K.agentId)},R=()=>{m(void 0),requestAnimationFrame(()=>{var Y;const K=w.current;K!=null&&K.isConnected?K.focus({preventScroll:!0}):(Y=document.querySelector("[data-stake-trigger]"))==null||Y.focus({preventScroll:!0})})},M={config:((L=r.data)==null?void 0:L.config)??null,balance:l==null?void 0:l.wallet.ants,rewards:o.data,rewardsError:o.error,walletReady:t};return h.jsxs(h.Fragment,{children:[e.browserWallet&&u?h.jsxs(Yc,{tone:"info",title:"Connect your authorized wallet",children:["To stake buyer rewards, use the wallet button above to switch to ",h.jsx("span",{className:"mono",title:c,children:bh(c)}),", the authorized wallet for your buyer account."]}):null,n.error&&!l?h.jsx(nn,{error:n.error,onRetry:n.refresh}):null,n.error&&l?h.jsxs("div",{className:"status-line",children:["Refresh failed: ",n.error]}):null,l&&l.phase!=="active"?h.jsx(fW,{data:l}):null,p.length>0?h.jsx(Yc,{tone:"info",children:h.jsx("ul",{className:"notices-list",children:p.map((K,Y)=>h.jsx("li",{children:K},Y))})}):null,i.data?h.jsx(dW,{view:i.data}):null,h.jsxs(Dt,{title:"Sellers",className:"pools-card",actions:h.jsx(pt,{"data-stake-trigger":!0,variant:"primary",size:"sm",onClick:K=>{w.current=K.currentTarget,m(null)},disabled:!i.data,children:"Stake rewards"}),children:[i.error&&!i.data?h.jsx(nn,{error:i.error,onRetry:i.refresh}):null,i.loading?h.jsx("p",{className:"hint",role:"status",children:i.data?"Updating sellers… Showing previously loaded data.":"Loading sellers…"}):null,!i.loading&&i.reconciling?h.jsx("p",{className:"hint",role:"status",children:"Updating your stake… Waiting for Antscan to include your latest transaction."}):null,!i.loading&&(i.partial||i.error&&i.data)?h.jsxs("div",{className:i.error?"status-line":"status-line status-line--muted",role:"status",children:[i.error?`Could not update sellers: ${i.error}. `:"Could not load the full seller list. ",i.error||((J=i.data)==null?void 0:J.source)==="indexer"?"Showing previously loaded data; statistics may be out of date.":"Only pools you stake in are shown, read live from the chain."," ",h.jsx(pt,{variant:"outline",size:"sm",onClick:i.refresh,children:"Try again"})]}):null,!i.loading&&((O=i.data)==null?void 0:O.source)==="chain"&&!i.partial&&!i.error?h.jsx("div",{className:"status-line status-line--muted",children:"No explorer configured. Only pools you stake in are listed, read live from the chain."}):null,!i.loading&&((G=i.data)==null?void 0:G.source)==="chain"&&A.length===0?i.reconciling?null:h.jsx("p",{className:"hint",children:"You have no staked pools to show."}):i.data||i.loading?h.jsx(_z,{pools:A,currentEpoch:((ee=i.data)==null?void 0:ee.currentEpoch)??0,loading:i.loading&&!i.data,walletSyncing:i.reconciling,onOpen:B,onStake:B}):null]}),f!==void 0&&i.data?h.jsxs(J1,{isOpen:!0,title:"Stake rewards",size:"lg",overlayClassName:"ants-stake-overlay",onClose:()=>{g||R()},children:[r.error&&!r.data?h.jsx(nn,{error:r.error,onRetry:r.refresh}):null,h.jsx(sA,{config:((F=r.data)==null?void 0:F.config)??null,pools:A.filter(K=>K.stakeable),balance:l==null?void 0:l.wallet.ants,rewards:o.data,rewardsError:o.error,defaultAgentId:f,onStarted:R,onClose:R,onBusyChange:v},`${e.address}:${e.evmChainId}:${f??"any"}`)]}):null,T?h.jsx(Rz,{pool:T.pool,view:T.view,onClose:I,stake:M}):null]})}function dW({view:e}){const t=e.networkVolumes.find(r=>r.epoch===e.currentEpoch-1),n=e.pools.filter(r=>r.stakeable).length;return h.jsxs("div",{className:"ticker",role:"list","aria-label":"Network",children:[h.jsxs("div",{className:"ticker-item",role:"listitem",children:[h.jsx("span",{className:"ticker-label",children:"Total staked"}),h.jsxs("span",{className:"ticker-value",children:[be(e.totalActiveStake),h.jsx("small",{children:"ANTS"})]})]}),h.jsxs("div",{className:"ticker-item",role:"listitem",children:[h.jsx("span",{className:"ticker-label",children:"Total power"}),h.jsx("span",{className:"ticker-value",children:be(e.totalPowerWeight)})]}),h.jsxs("div",{className:"ticker-item",role:"listitem",children:[h.jsx("span",{className:"ticker-label",children:"Staker budget · epoch"}),h.jsxs("span",{className:"ticker-value",children:[be(e.stakerBudget),h.jsx("small",{children:"ANTS"})]})]}),h.jsxs("div",{className:"ticker-item",role:"listitem",children:[h.jsx("span",{className:"ticker-label",children:"Network volume · last epoch"}),h.jsxs("span",{className:"ticker-value",children:[t?Xa(t.usdc):"—",h.jsx("small",{children:"USDC"})]})]}),h.jsxs("div",{className:"ticker-item",role:"listitem",children:[h.jsx("span",{className:"ticker-label",children:"Sellers"}),h.jsxs("span",{className:"ticker-value",children:[Fe(n),h.jsx("small",{children:"stakeable"})]})]}),h.jsxs("div",{className:"ticker-item",role:"listitem",children:[h.jsx("span",{className:"ticker-label",children:"Epoch"}),h.jsxs("span",{className:"ticker-value",children:[e.currentEpoch,h.jsx("small",{children:e.source==="indexer"?"indexed":"chain"})]})]})]})}function fW({data:e}){const t=kh(1e3),{phase:n,epoch:r}=e;if(n==="legacy")return h.jsx(Yc,{tone:"info",title:"Legacy protocol",children:"The recognized-usage stack (M001) is not deployed on this chain. Pool staking, usage rewards and emissions views are unavailable."});if(n==="deployed"&&r.effective!==null){const o=Za(r.effective,r.genesis,r.epochDuration),i=Math.max(0,Math.floor(o-t/1e3));return h.jsxs(Yc,{tone:"warning",title:"Deployed, not active yet",children:["Recognized usage activates at epoch ",h.jsx("span",{className:"mono",children:r.effective})," (",ar(o),") — in ",h.jsx("span",{className:"mono",children:xh(i)}),". Positions staked now become active from the effective epoch."]})}return null}const hA="ants.dashboard.theme",hW=6e4;function pW(){var e;try{const t=window.localStorage.getItem(hA);if(t==="light"||t==="dark")return t}catch{}try{return(e=window.matchMedia)!=null&&e.call(window,"(prefers-color-scheme: light)").matches?"light":"dark"}catch{return"dark"}}function mW(){const[e,t]=P.useState(()=>Ej()===null);P.useEffect(()=>Aj(()=>t(!0)),[]);const[n,r]=P.useState(pW);P.useEffect(()=>{document.documentElement.dataset.theme=n},[n]);const o=P.useCallback(()=>{r(i=>{const l=i==="dark"?"light":"dark";try{window.localStorage.setItem(hA,l)}catch{}return l})},[]);return e?h.jsx(gW,{}):h.jsx(yW,{theme:n,toggleTheme:o})}function gW(){return h.jsx("div",{className:"full-page",children:h.jsxs(Kr,{className:"full-page-inner",children:[h.jsxs("div",{className:"wordmark",children:["ANTS",h.jsx("span",{children:"staking"})]}),h.jsx("p",{children:h.jsx("strong",{children:"Reopen your rewards or staking dashboard"})}),h.jsx("p",{className:"muted small",children:"This link is missing a valid session or is no longer valid. Open a fresh link to continue."}),h.jsxs("p",{className:"muted small",children:[h.jsx("strong",{children:"Using the AntSeed desktop app?"}),h.jsx("br",{}),"Go to ",h.jsx("strong",{children:"Rewards"}),", then select ",h.jsx("strong",{children:"Claim rewards"})," or ",h.jsx("strong",{children:"Manage staking"}),". To use another browser, choose"," ",h.jsx("strong",{children:"Copy link"})," beside the action and paste it into the browser where you use your wallet."]}),h.jsxs("p",{className:"muted small",children:[h.jsx("strong",{children:"Using the CLI?"}),h.jsx("br",{}),"Run ",h.jsx("code",{children:"antseed ants"})," to reopen the dashboard."]})]})})}function yW({theme:e,toggleTheme:t}){const n=tt("config",Ye.config,Number.POSITIVE_INFINITY),r=tt("overview",Ye.overview),o=PD(),i=r.refresh;P.useEffect(()=>{const c=window.setInterval(()=>{document.visibilityState==="visible"&&i()},hW);return()=>window.clearInterval(c)},[i]);const l=P.useMemo(()=>n.data?{config:n.data,overview:r.data,overviewError:r.error,theme:e,toggleTheme:t}:null,[n.data,r.data,r.error,e,t]);return l?h.jsx(VD,{config:l.config,children:h.jsx(f8.Provider,{value:l,children:h.jsx(DD,{children:h.jsx(oU,{page:o.page,updatedAt:r.updatedAt,loading:r.loading,children:h.jsx(vW,{page:o.page})})})})}):h.jsx("div",{className:"full-page",children:h.jsx(Kr,{className:"full-page-inner",children:n.error?h.jsx(nn,{error:n.error,onRetry:n.refresh,title:"Could not load dashboard config"}):h.jsx("span",{className:"muted",children:"Connecting to the local server…"})})})}function vW({page:e}){switch(e){case"positions":return h.jsx(tW,{});case"rewards":return h.jsx(nW,{});case"seller":return h.jsx(aW,{});case"network":return h.jsx(az,{});case"addresses":return h.jsx(dU,{});case"stake":default:return h.jsx(uW,{})}}kj();window.location.hash||window.history.replaceState(null,"","#/stake");const pA=document.getElementById("root");if(!pA)throw new Error("#root element is missing");vj.createRoot(pA).render(h.jsx(P.StrictMode,{children:h.jsx(mW,{})}));const Q2=Object.freeze(Object.defineProperty({__proto__:null,default:Ig},Symbol.toStringTag,{value:"Module"}));export{J9 as $,Bj as A,oe as B,_5 as C,ge as D,va as E,O4 as F,Fj as G,hc as H,xs as I,FW as J,EW as K,LW as L,t9 as M,wf as N,bf as O,G9 as P,at as Q,lr as R,yi as S,Sc as T,Ve as U,QW as V,Fc as W,V9 as X,GW as Y,UW as Z,fe as _,lI as a,E9 as a0,St as a1,F3 as a2,H9 as a3,L3 as a4,Y9 as a5,DW as a6,Wr as a7,sl as a8,Sr as a9,oI as aA,Lm as aB,yy as aC,Ps as aD,_9 as aE,FC as aF,nt as aG,Ns as aH,Iy as aI,Qr as aJ,zy as aK,No as aL,ul as aM,u1 as aN,z9 as aO,z3 as aP,VW as aQ,HW as aR,LC as aS,fi as aT,iI as aU,Vj as aV,fu as aW,qC as aa,nT as ab,CC as ac,BW as ad,c4 as ae,TW as af,Cs as ag,y4 as ah,wc as ai,u4 as aj,v4 as ak,rC as al,KW as am,Hn as an,WW as ao,qW as ap,eh as aq,Q3 as ar,_T as as,Ut as at,ve as au,xf as av,cr as aw,H5 as ax,pu as ay,Pn as az,rn as b,wu as c,Q7 as d,Ii as e,Vr as f,gy as g,_n as h,Ka as i,K3 as j,NN as k,Vf as l,bW as m,s5 as n,HC as o,qf as p,VC as q,xW as r,At as s,jo as t,il as u,Vn as v,Jm as w,rl as x,qa as y,b5 as z};
|