thirdweb 5.110.3 → 5.110.4
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/cjs/exports/x402.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/DirectPayment.js +9 -9
- package/dist/cjs/react/web/ui/Bridge/DirectPayment.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/common/WithHeader.js +3 -2
- package/dist/cjs/react/web/ui/Bridge/common/WithHeader.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/FiatValue.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/FiatValue.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/formatTokenBalance.js +2 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/formatTokenBalance.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/x402/common.js +1 -1
- package/dist/cjs/x402/common.js.map +1 -1
- package/dist/cjs/x402/sign.js +1 -1
- package/dist/cjs/x402/sign.js.map +1 -1
- package/dist/esm/exports/x402.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/DirectPayment.js +9 -9
- package/dist/esm/react/web/ui/Bridge/DirectPayment.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/common/WithHeader.js +4 -3
- package/dist/esm/react/web/ui/Bridge/common/WithHeader.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/FiatValue.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/FiatValue.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/formatTokenBalance.js +2 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/formatTokenBalance.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/x402/common.js +1 -1
- package/dist/esm/x402/common.js.map +1 -1
- package/dist/esm/x402/sign.js +1 -1
- package/dist/esm/x402/sign.js.map +1 -1
- package/dist/scripts/bridge-widget.js +3 -3
- package/dist/types/exports/x402.d.ts +1 -1
- package/dist/types/exports/x402.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/DirectPayment.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/common/WithHeader.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/x402/schemas.d.ts +6 -6
- package/package.json +2 -2
- package/src/exports/x402.ts +6 -1
- package/src/react/web/ui/Bridge/DirectPayment.tsx +15 -21
- package/src/react/web/ui/Bridge/common/WithHeader.tsx +4 -2
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/FiatValue.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/screens/formatTokenBalance.ts +2 -0
- package/src/version.ts +1 -1
- package/src/x402/common.ts +1 -1
- package/src/x402/sign.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// thirdweb/scripts/bridge-widget@5.110.
|
|
1
|
+
// thirdweb/scripts/bridge-widget@5.110.4
|
|
2
2
|
"use strict";var BridgeWidget=(()=>{var XMt=Object.create;var nv=Object.defineProperty;var JMt=Object.getOwnPropertyDescriptor;var _Mt=Object.getOwnPropertyNames;var $Mt=Object.getPrototypeOf,ekt=Object.prototype.hasOwnProperty;var mfe=e=>{throw TypeError(e)};var tkt=(e,t,n)=>t in e?nv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var p=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ie=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),y=(e,t)=>{for(var n in t)nv(e,n,{get:t[n],enumerable:!0})},HE=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of _Mt(t))!ekt.call(e,o)&&o!==n&&nv(e,o,{get:()=>t[o],enumerable:!(r=JMt(t,o))||r.enumerable});return e},hs=(e,t,n)=>(HE(e,t,"default"),n&&HE(n,t,"default")),T=(e,t,n)=>(n=e!=null?XMt($Mt(e)):{},HE(t||!e||!e.__esModule?nv(n,"default",{value:e,enumerable:!0}):n,e)),By=e=>HE(nv({},"__esModule",{value:!0}),e);var Ve=(e,t,n)=>tkt(e,typeof t!="symbol"?t+"":t,n),kZ=(e,t,n)=>t.has(e)||mfe("Cannot "+n);var W=(e,t,n)=>(kZ(e,t,"read from private field"),n?n.call(e):t.get(e)),ke=(e,t,n)=>t.has(e)?mfe("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),de=(e,t,n,r)=>(kZ(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),_e=(e,t,n)=>(kZ(e,t,"access private method"),n);var rv=(e,t,n,r)=>({set _(o){de(e,t,o,n)},get _(){return W(e,t,r)}});var Ife=Ie(Kr=>{"use strict";function DZ(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(0<WE(o,t))e[r]=t,e[n]=o,n=r;else break e}}function Z1(e){return e.length===0?null:e[0]}function VE(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,i=o>>>1;r<i;){var a=2*(r+1)-1,s=e[a],l=a+1,c=e[l];if(0>WE(s,n))l<o&&0>WE(c,s)?(e[r]=c,e[l]=n,r=l):(e[r]=s,e[a]=n,r=a);else if(l<o&&0>WE(c,n))e[r]=c,e[l]=n,r=l;else break e}}return t}function WE(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}Kr.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(hfe=performance,Kr.unstable_now=function(){return hfe.now()}):(EZ=Date,gfe=EZ.now(),Kr.unstable_now=function(){return EZ.now()-gfe});var hfe,EZ,gfe,Nf=[],K0=[],nkt=1,ou=null,La=3,LZ=!1,ov=!1,iv=!1,OZ=!1,bfe=typeof setTimeout=="function"?setTimeout:null,Afe=typeof clearTimeout=="function"?clearTimeout:null,yfe=typeof setImmediate<"u"?setImmediate:null;function FE(e){for(var t=Z1(K0);t!==null;){if(t.callback===null)VE(K0);else if(t.startTime<=e)VE(K0),t.sortIndex=t.expirationTime,DZ(Nf,t);else break;t=Z1(K0)}}function RZ(e){if(iv=!1,FE(e),!ov)if(Z1(Nf)!==null)ov=!0,Uy||(Uy=!0,zy());else{var t=Z1(K0);t!==null&&jZ(RZ,t.startTime-e)}}var Uy=!1,av=-1,xfe=5,vfe=-1;function Cfe(){return OZ?!0:!(Kr.unstable_now()-vfe<xfe)}function PZ(){if(OZ=!1,Uy){var e=Kr.unstable_now();vfe=e;var t=!0;try{e:{ov=!1,iv&&(iv=!1,Afe(av),av=-1),LZ=!0;var n=La;try{t:{for(FE(e),ou=Z1(Nf);ou!==null&&!(ou.expirationTime>e&&Cfe());){var r=ou.callback;if(typeof r=="function"){ou.callback=null,La=ou.priorityLevel;var o=r(ou.expirationTime<=e);if(e=Kr.unstable_now(),typeof o=="function"){ou.callback=o,FE(e),t=!0;break t}ou===Z1(Nf)&&VE(Nf),FE(e)}else VE(Nf);ou=Z1(Nf)}if(ou!==null)t=!0;else{var i=Z1(K0);i!==null&&jZ(RZ,i.startTime-e),t=!1}}break e}finally{ou=null,La=n,LZ=!1}t=void 0}}finally{t?zy():Uy=!1}}}var zy;typeof yfe=="function"?zy=function(){yfe(PZ)}:typeof MessageChannel<"u"?(NZ=new MessageChannel,wfe=NZ.port2,NZ.port1.onmessage=PZ,zy=function(){wfe.postMessage(null)}):zy=function(){bfe(PZ,0)};var NZ,wfe;function jZ(e,t){av=bfe(function(){e(Kr.unstable_now())},t)}Kr.unstable_IdlePriority=5;Kr.unstable_ImmediatePriority=1;Kr.unstable_LowPriority=4;Kr.unstable_NormalPriority=3;Kr.unstable_Profiling=null;Kr.unstable_UserBlockingPriority=2;Kr.unstable_cancelCallback=function(e){e.callback=null};Kr.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):xfe=0<e?Math.floor(1e3/e):5};Kr.unstable_getCurrentPriorityLevel=function(){return La};Kr.unstable_next=function(e){switch(La){case 1:case 2:case 3:var t=3;break;default:t=La}var n=La;La=t;try{return e()}finally{La=n}};Kr.unstable_requestPaint=function(){OZ=!0};Kr.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=La;La=e;try{return t()}finally{La=n}};Kr.unstable_scheduleCallback=function(e,t,n){var r=Kr.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?r+n:r):n=r,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=n+o,e={id:nkt++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,DZ(K0,e),Z1(Nf)===null&&e===Z1(K0)&&(iv?(Afe(av),av=-1):iv=!0,jZ(RZ,n-r))):(e.sortIndex=o,DZ(Nf,e),ov||LZ||(ov=!0,Uy||(Uy=!0,zy()))),e};Kr.unstable_shouldYield=Cfe;Kr.unstable_wrapCallback=function(e){var t=La;return function(){var n=La;La=t;try{return e.apply(this,arguments)}finally{La=n}}}});var Sfe=Ie((YRn,Tfe)=>{"use strict";Tfe.exports=Ife()});var zfe=Ie(Ft=>{"use strict";var zZ=Symbol.for("react.transitional.element"),rkt=Symbol.for("react.portal"),okt=Symbol.for("react.fragment"),ikt=Symbol.for("react.strict_mode"),akt=Symbol.for("react.profiler"),skt=Symbol.for("react.consumer"),lkt=Symbol.for("react.context"),ckt=Symbol.for("react.forward_ref"),ukt=Symbol.for("react.suspense"),dkt=Symbol.for("react.memo"),Dfe=Symbol.for("react.lazy"),Mfe=Symbol.iterator;function pkt(e){return e===null||typeof e!="object"?null:(e=Mfe&&e[Mfe]||e["@@iterator"],typeof e=="function"?e:null)}var Lfe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ofe=Object.assign,Rfe={};function Wy(e,t,n){this.props=e,this.context=t,this.refs=Rfe,this.updater=n||Lfe}Wy.prototype.isReactComponent={};Wy.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Wy.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function jfe(){}jfe.prototype=Wy.prototype;function UZ(e,t,n){this.props=e,this.context=t,this.refs=Rfe,this.updater=n||Lfe}var HZ=UZ.prototype=new jfe;HZ.constructor=UZ;Ofe(HZ,Wy.prototype);HZ.isPureReactComponent=!0;var kfe=Array.isArray,Xr={H:null,A:null,T:null,S:null,V:null},Bfe=Object.prototype.hasOwnProperty;function WZ(e,t,n,r,o,i){return n=i.ref,{$$typeof:zZ,type:e,key:t,ref:n!==void 0?n:null,props:i}}function fkt(e,t){return WZ(e.type,t,void 0,void 0,void 0,e.props)}function FZ(e){return typeof e=="object"&&e!==null&&e.$$typeof===zZ}function mkt(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Efe=/\/+/g;function BZ(e,t){return typeof e=="object"&&e!==null&&e.key!=null?mkt(""+e.key):t.toString(36)}function Pfe(){}function hkt(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Pfe,Pfe):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Hy(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case zZ:case rkt:a=!0;break;case Dfe:return a=e._init,Hy(a(e._payload),t,n,r,o)}}if(a)return o=o(e),a=r===""?"."+BZ(e,0):r,kfe(o)?(n="",a!=null&&(n=a.replace(Efe,"$&/")+"/"),Hy(o,t,n,"",function(c){return c})):o!=null&&(FZ(o)&&(o=fkt(o,n+(o.key==null||e&&e.key===o.key?"":(""+o.key).replace(Efe,"$&/")+"/")+a)),t.push(o)),1;a=0;var s=r===""?".":r+":";if(kfe(e))for(var l=0;l<e.length;l++)r=e[l],i=s+BZ(r,l),a+=Hy(r,t,n,i,o);else if(l=pkt(e),typeof l=="function")for(e=l.call(e),l=0;!(r=e.next()).done;)r=r.value,i=s+BZ(r,l++),a+=Hy(r,t,n,i,o);else if(i==="object"){if(typeof e.then=="function")return Hy(hkt(e),t,n,r,o);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return a}function ZE(e,t,n){if(e==null)return e;var r=[],o=0;return Hy(e,r,"","",function(i){return t.call(n,i,o++)}),r}function gkt(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Nfe=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function ykt(){}Ft.Children={map:ZE,forEach:function(e,t,n){ZE(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ZE(e,function(){t++}),t},toArray:function(e){return ZE(e,function(t){return t})||[]},only:function(e){if(!FZ(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Ft.Component=Wy;Ft.Fragment=okt;Ft.Profiler=akt;Ft.PureComponent=UZ;Ft.StrictMode=ikt;Ft.Suspense=ukt;Ft.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Xr;Ft.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Xr.H.useMemoCache(e)}};Ft.cache=function(e){return function(){return e.apply(null,arguments)}};Ft.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=Ofe({},e.props),o=e.key,i=void 0;if(t!=null)for(a in t.ref!==void 0&&(i=void 0),t.key!==void 0&&(o=""+t.key),t)!Bfe.call(t,a)||a==="key"||a==="__self"||a==="__source"||a==="ref"&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var s=Array(a),l=0;l<a;l++)s[l]=arguments[l+2];r.children=s}return WZ(e.type,o,void 0,void 0,i,r)};Ft.createContext=function(e){return e={$$typeof:lkt,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:skt,_context:e},e};Ft.createElement=function(e,t,n){var r,o={},i=null;if(t!=null)for(r in t.key!==void 0&&(i=""+t.key),t)Bfe.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var s=Array(a),l=0;l<a;l++)s[l]=arguments[l+2];o.children=s}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)o[r]===void 0&&(o[r]=a[r]);return WZ(e,i,void 0,void 0,null,o)};Ft.createRef=function(){return{current:null}};Ft.forwardRef=function(e){return{$$typeof:ckt,render:e}};Ft.isValidElement=FZ;Ft.lazy=function(e){return{$$typeof:Dfe,_payload:{_status:-1,_result:e},_init:gkt}};Ft.memo=function(e,t){return{$$typeof:dkt,type:e,compare:t===void 0?null:t}};Ft.startTransition=function(e){var t=Xr.T,n={};Xr.T=n;try{var r=e(),o=Xr.S;o!==null&&o(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(ykt,Nfe)}catch(i){Nfe(i)}finally{Xr.T=t}};Ft.unstable_useCacheRefresh=function(){return Xr.H.useCacheRefresh()};Ft.use=function(e){return Xr.H.use(e)};Ft.useActionState=function(e,t,n){return Xr.H.useActionState(e,t,n)};Ft.useCallback=function(e,t){return Xr.H.useCallback(e,t)};Ft.useContext=function(e){return Xr.H.useContext(e)};Ft.useDebugValue=function(){};Ft.useDeferredValue=function(e,t){return Xr.H.useDeferredValue(e,t)};Ft.useEffect=function(e,t,n){var r=Xr.H;if(typeof n=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return r.useEffect(e,t)};Ft.useId=function(){return Xr.H.useId()};Ft.useImperativeHandle=function(e,t,n){return Xr.H.useImperativeHandle(e,t,n)};Ft.useInsertionEffect=function(e,t){return Xr.H.useInsertionEffect(e,t)};Ft.useLayoutEffect=function(e,t){return Xr.H.useLayoutEffect(e,t)};Ft.useMemo=function(e,t){return Xr.H.useMemo(e,t)};Ft.useOptimistic=function(e,t){return Xr.H.useOptimistic(e,t)};Ft.useReducer=function(e,t,n){return Xr.H.useReducer(e,t,n)};Ft.useRef=function(e){return Xr.H.useRef(e)};Ft.useState=function(e){return Xr.H.useState(e)};Ft.useSyncExternalStore=function(e,t,n){return Xr.H.useSyncExternalStore(e,t,n)};Ft.useTransition=function(){return Xr.H.useTransition()};Ft.version="19.1.0"});var _=Ie((XRn,Ufe)=>{"use strict";Ufe.exports=zfe()});var Wfe=Ie(ys=>{"use strict";var wkt=_();function Hfe(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function X0(){}var gs={d:{f:X0,r:function(){throw Error(Hfe(522))},D:X0,C:X0,L:X0,m:X0,X:X0,S:X0,M:X0},p:0,findDOMNode:null},bkt=Symbol.for("react.portal");function Akt(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:bkt,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}var sv=wkt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function QE(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}ys.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=gs;ys.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(Hfe(299));return Akt(e,t,null,n)};ys.flushSync=function(e){var t=sv.T,n=gs.p;try{if(sv.T=null,gs.p=2,e)return e()}finally{sv.T=t,gs.p=n,gs.d.f()}};ys.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,gs.d.C(e,t))};ys.prefetchDNS=function(e){typeof e=="string"&&gs.d.D(e)};ys.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,r=QE(n,t.crossOrigin),o=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?gs.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:r,integrity:o,fetchPriority:i}):n==="script"&&gs.d.X(e,{crossOrigin:r,integrity:o,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};ys.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=QE(t.as,t.crossOrigin);gs.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&gs.d.M(e)};ys.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,r=QE(n,t.crossOrigin);gs.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};ys.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=QE(t.as,t.crossOrigin);gs.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else gs.d.m(e)};ys.requestFormReset=function(e){gs.d.r(e)};ys.unstable_batchedUpdates=function(e,t){return e(t)};ys.useFormState=function(e,t,n){return sv.H.useFormState(e,t,n)};ys.useFormStatus=function(){return sv.H.useHostTransitionStatus()};ys.version="19.1.0"});var lv=Ie((_Rn,Vfe)=>{"use strict";function Ffe(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ffe)}catch(e){console.error(e)}}Ffe(),Vfe.exports=Wfe()});var Q2e=Ie(fN=>{"use strict";var vi=Sfe(),d0e=_(),xkt=lv();function re(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function p0e(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Kv(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function f0e(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Zfe(e){if(Kv(e)!==e)throw Error(re(188))}function vkt(e){var t=e.alternate;if(!t){if(t=Kv(e),t===null)throw Error(re(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Zfe(o),e;if(i===r)return Zfe(o),t;i=i.sibling}throw Error(re(188))}if(n.return!==r.return)n=o,r=i;else{for(var a=!1,s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a){for(s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a)throw Error(re(189))}}if(n.alternate!==r)throw Error(re(190))}if(n.tag!==3)throw Error(re(188));return n.stateNode.current===n?e:t}function m0e(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m0e(e),t!==null)return t;e=e.sibling}return null}var Ur=Object.assign,Ckt=Symbol.for("react.element"),qE=Symbol.for("react.transitional.element"),yv=Symbol.for("react.portal"),Yy=Symbol.for("react.fragment"),h0e=Symbol.for("react.strict_mode"),AQ=Symbol.for("react.profiler"),Ikt=Symbol.for("react.provider"),g0e=Symbol.for("react.consumer"),jf=Symbol.for("react.context"),hq=Symbol.for("react.forward_ref"),xQ=Symbol.for("react.suspense"),vQ=Symbol.for("react.suspense_list"),gq=Symbol.for("react.memo"),$0=Symbol.for("react.lazy");Symbol.for("react.scope");var CQ=Symbol.for("react.activity");Symbol.for("react.legacy_hidden");Symbol.for("react.tracing_marker");var Tkt=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var Qfe=Symbol.iterator;function cv(e){return e===null||typeof e!="object"?null:(e=Qfe&&e[Qfe]||e["@@iterator"],typeof e=="function"?e:null)}var Skt=Symbol.for("react.client.reference");function IQ(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Skt?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Yy:return"Fragment";case AQ:return"Profiler";case h0e:return"StrictMode";case xQ:return"Suspense";case vQ:return"SuspenseList";case CQ:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case yv:return"Portal";case jf:return(e.displayName||"Context")+".Provider";case g0e:return(e._context.displayName||"Context")+".Consumer";case hq:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case gq:return t=e.displayName||null,t!==null?t:IQ(e.type)||"Memo";case $0:t=e._payload,e=e._init;try{return IQ(e(t))}catch{}}return null}var wv=Array.isArray,dt=d0e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Hn=xkt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,s9={pending:!1,data:null,method:null,action:null},TQ=[],Ky=-1;function J1(e){return{current:e}}function Fi(e){0>Ky||(e.current=TQ[Ky],TQ[Ky]=null,Ky--)}function _r(e,t){Ky++,TQ[Ky]=e.current,e.current=t}var Y1=J1(null),Rv=J1(null),ch=J1(null),vP=J1(null);function CP(e,t){switch(_r(ch,t),_r(Rv,e),_r(Y1,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Jme(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Jme(t),e=L2e(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Fi(Y1),_r(Y1,e)}function m6(){Fi(Y1),Fi(Rv),Fi(ch)}function SQ(e){e.memoizedState!==null&&_r(vP,e);var t=Y1.current,n=L2e(t,e.type);t!==n&&(_r(Rv,e),_r(Y1,n))}function IP(e){Rv.current===e&&(Fi(Y1),Fi(Rv)),vP.current===e&&(Fi(vP),Qv._currentValue=s9)}var MQ=Object.prototype.hasOwnProperty,yq=vi.unstable_scheduleCallback,VZ=vi.unstable_cancelCallback,Mkt=vi.unstable_shouldYield,kkt=vi.unstable_requestPaint,K1=vi.unstable_now,Ekt=vi.unstable_getCurrentPriorityLevel,y0e=vi.unstable_ImmediatePriority,w0e=vi.unstable_UserBlockingPriority,TP=vi.unstable_NormalPriority,Pkt=vi.unstable_LowPriority,b0e=vi.unstable_IdlePriority,Nkt=vi.log,Dkt=vi.unstable_setDisableYieldValue,Xv=null,fc=null;function ih(e){if(typeof Nkt=="function"&&Dkt(e),fc&&typeof fc.setStrictMode=="function")try{fc.setStrictMode(Xv,e)}catch{}}var mc=Math.clz32?Math.clz32:Rkt,Lkt=Math.log,Okt=Math.LN2;function Rkt(e){return e>>>=0,e===0?32:31-(Lkt(e)/Okt|0)|0}var GE=256,YE=4194304;function o9(e){var t=e&42;if(t!==0)return t;switch(e&-e){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:return 64;case 128:return 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 e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function _P(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var o=0,i=e.suspendedLanes,a=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s!==0?(r=s&~i,r!==0?o=o9(r):(a&=s,a!==0?o=o9(a):n||(n=s&~e,n!==0&&(o=o9(n))))):(s=r&~i,s!==0?o=o9(s):a!==0?o=o9(a):n||(n=r&~e,n!==0&&(o=o9(n)))),o===0?0:t!==0&&t!==o&&(t&i)===0&&(i=o&-o,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:o}function Jv(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function jkt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function A0e(){var e=GE;return GE<<=1,(GE&4194048)===0&&(GE=256),e}function x0e(){var e=YE;return YE<<=1,(YE&62914560)===0&&(YE=4194304),e}function ZZ(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function _v(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Bkt(e,t,n,r,o,i){var a=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(n=a&~n;0<n;){var u=31-mc(n),d=1<<u;s[u]=0,l[u]=-1;var f=c[u];if(f!==null)for(c[u]=null,u=0;u<f.length;u++){var m=f[u];m!==null&&(m.lane&=-536870913)}n&=~d}r!==0&&v0e(e,r,0),i!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=i&~(a&~t))}function v0e(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-mc(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&4194090}function C0e(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-mc(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}function wq(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function bq(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function I0e(){var e=Hn.p;return e!==0?e:(e=window.event,e===void 0?32:V2e(e.type))}function zkt(e,t){var n=Hn.p;try{return Hn.p=e,t()}finally{Hn.p=n}}var Ah=Math.random().toString(36).slice(2),Oa="__reactFiber$"+Ah,al="__reactProps$"+Ah,T6="__reactContainer$"+Ah,kQ="__reactEvents$"+Ah,Ukt="__reactListeners$"+Ah,Hkt="__reactHandles$"+Ah,qfe="__reactResources$"+Ah,$v="__reactMarker$"+Ah;function Aq(e){delete e[Oa],delete e[al],delete e[kQ],delete e[Ukt],delete e[Hkt]}function Xy(e){var t=e[Oa];if(t)return t;for(var n=e.parentNode;n;){if(t=n[T6]||n[Oa]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=e0e(e);e!==null;){if(n=e[Oa])return n;e=e0e(e)}return t}e=n,n=e.parentNode}return null}function S6(e){if(e=e[Oa]||e[T6]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function bv(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(re(33))}function a6(e){var t=e[qfe];return t||(t=e[qfe]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Hi(e){e[$v]=!0}var T0e=new Set,S0e={};function w9(e,t){h6(e,t),h6(e+"Capture",t)}function h6(e,t){for(S0e[e]=t,e=0;e<t.length;e++)T0e.add(t[e])}var Wkt=RegExp("^[: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]*$"),Gfe={},Yfe={};function Fkt(e){return MQ.call(Yfe,e)?!0:MQ.call(Gfe,e)?!1:Wkt.test(e)?Yfe[e]=!0:(Gfe[e]=!0,!1)}function cP(e,t,n){if(Fkt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function KE(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Df(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+r)}}var QZ,Kfe;function Qy(e){if(QZ===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);QZ=t&&t[1]||"",Kfe=-1<n.stack.indexOf(`
|
|
3
3
|
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
4
|
`+QZ+e+Kfe}var qZ=!1;function GZ(e,t){if(!e||qZ)return"";qZ=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(m){var f=m}Reflect.construct(e,[],d)}else{try{d.call()}catch(m){f=m}e.call(d.prototype)}}else{try{throw Error()}catch(m){f=m}(d=e())&&typeof d.catch=="function"&&d.catch(function(){})}}catch(m){if(m&&f&&typeof m.stack=="string")return[m.stack,f.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=r.DetermineComponentFrameRoot(),a=i[0],s=i[1];if(a&&s){var l=a.split(`
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
`+l[r].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=r&&0<=o);break}}}finally{qZ=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Qy(n):""}function Vkt(e){switch(e.tag){case 26:case 27:case 5:return Qy(e.type);case 16:return Qy("Lazy");case 13:return Qy("Suspense");case 19:return Qy("SuspenseList");case 0:case 15:return GZ(e.type,!1);case 11:return GZ(e.type.render,!1);case 1:return GZ(e.type,!0);case 31:return Qy("Activity");default:return""}}function Xfe(e){try{var t="";do t+=Vkt(e),e=e.return;while(e);return t}catch(n){return`
|
|
8
8
|
Error generating stack: `+n.message+`
|
|
9
9
|
`+n.stack}}function au(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function M0e(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Zkt(e){var t=M0e(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function SP(e){e._valueTracker||(e._valueTracker=Zkt(e))}function k0e(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=M0e(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function MP(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Qkt=/[\n"\\]/g;function cu(e){return e.replace(Qkt,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function EQ(e,t,n,r,o,i,a,s){e.name="",a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"?e.type=a:e.removeAttribute("type"),t!=null?a==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+au(t)):e.value!==""+au(t)&&(e.value=""+au(t)):a!=="submit"&&a!=="reset"||e.removeAttribute("value"),t!=null?PQ(e,a,au(t)):n!=null?PQ(e,a,au(n)):r!=null&&e.removeAttribute("value"),o==null&&i!=null&&(e.defaultChecked=!!i),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.name=""+au(s):e.removeAttribute("name")}function E0e(e,t,n,r,o,i,a,s){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null))return;n=n!=null?""+au(n):"",t=t!=null?""+au(t):n,s||t===e.value||(e.value=t),e.defaultValue=t}r=r??o,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.name=a)}function PQ(e,t,n){t==="number"&&MP(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function s6(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+au(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function P0e(e,t,n){if(t!=null&&(t=""+au(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+au(n):""}function N0e(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(re(92));if(wv(r)){if(1<r.length)throw Error(re(93));r=r[0]}n=r}n==null&&(n=""),t=n}n=au(t),e.defaultValue=n,r=e.textContent,r===n&&r!==""&&r!==null&&(e.value=r)}function g6(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var qkt=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Jfe(e,t,n){var r=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n!="number"||n===0||qkt.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function D0e(e,t,n){if(t!=null&&typeof t!="object")throw Error(re(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var o in t)r=t[o],t.hasOwnProperty(o)&&n[o]!==r&&Jfe(e,o,r)}else for(var i in t)t.hasOwnProperty(i)&&Jfe(e,i,t[i])}function xq(e){if(e.indexOf("-")===-1)return!1;switch(e){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 Gkt=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Ykt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function uP(e){return Ykt.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var NQ=null;function vq(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Jy=null,l6=null;function _fe(e){var t=S6(e);if(t&&(e=t.stateNode)){var n=e[al]||null;e:switch(e=t.stateNode,t.type){case"input":if(EQ(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+cu(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=r[al]||null;if(!o)throw Error(re(90));EQ(r,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&k0e(r)}break e;case"textarea":P0e(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&s6(e,!!n.multiple,t,!1)}}}var YZ=!1;function L0e(e,t,n){if(YZ)return e(t,n);YZ=!0;try{var r=e(t);return r}finally{if(YZ=!1,(Jy!==null||l6!==null)&&(lN(),Jy&&(t=Jy,e=l6,l6=Jy=null,_fe(t),e)))for(t=0;t<e.length;t++)_fe(e[t])}}function jv(e,t){var n=e.stateNode;if(n===null)return null;var r=n[al]||null;if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(re(231,t,typeof n));return n}var Vf=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),DQ=!1;if(Vf)try{Fy={},Object.defineProperty(Fy,"passive",{get:function(){DQ=!0}}),window.addEventListener("test",Fy,Fy),window.removeEventListener("test",Fy,Fy)}catch{DQ=!1}var Fy,ah=null,Cq=null,dP=null;function O0e(){if(dP)return dP;var e,t=Cq,n=t.length,r,o="value"in ah?ah.value:ah.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===o[i-r];r++);return dP=o.slice(e,1<r?1-r:void 0)}function pP(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function XE(){return!0}function $fe(){return!1}function sl(e){function t(n,r,o,i,a){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(i):i[s]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?XE:$fe,this.isPropagationStopped=$fe,this}return Ur(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=XE)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=XE)},persist:function(){},isPersistent:XE}),t}var b9={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$P=sl(b9),eC=Ur({},b9,{view:0,detail:0}),Kkt=sl(eC),KZ,XZ,uv,eN=Ur({},eC,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Iq,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==uv&&(uv&&e.type==="mousemove"?(KZ=e.screenX-uv.screenX,XZ=e.screenY-uv.screenY):XZ=KZ=0,uv=e),KZ)},movementY:function(e){return"movementY"in e?e.movementY:XZ}}),eme=sl(eN),Xkt=Ur({},eN,{dataTransfer:0}),Jkt=sl(Xkt),_kt=Ur({},eC,{relatedTarget:0}),JZ=sl(_kt),$kt=Ur({},b9,{animationName:0,elapsedTime:0,pseudoElement:0}),eEt=sl($kt),tEt=Ur({},b9,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),nEt=sl(tEt),rEt=Ur({},b9,{data:0}),tme=sl(rEt),oEt={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},iEt={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"},aEt={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sEt(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=aEt[e])?!!t[e]:!1}function Iq(){return sEt}var lEt=Ur({},eC,{key:function(e){if(e.key){var t=oEt[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=pP(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?iEt[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Iq,charCode:function(e){return e.type==="keypress"?pP(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?pP(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),cEt=sl(lEt),uEt=Ur({},eN,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),nme=sl(uEt),dEt=Ur({},eC,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Iq}),pEt=sl(dEt),fEt=Ur({},b9,{propertyName:0,elapsedTime:0,pseudoElement:0}),mEt=sl(fEt),hEt=Ur({},eN,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),gEt=sl(hEt),yEt=Ur({},b9,{newState:0,oldState:0}),wEt=sl(yEt),bEt=[9,13,27,32],Tq=Vf&&"CompositionEvent"in window,xv=null;Vf&&"documentMode"in document&&(xv=document.documentMode);var AEt=Vf&&"TextEvent"in window&&!xv,R0e=Vf&&(!Tq||xv&&8<xv&&11>=xv),rme=" ",ome=!1;function j0e(e,t){switch(e){case"keyup":return bEt.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function B0e(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _y=!1;function xEt(e,t){switch(e){case"compositionend":return B0e(t);case"keypress":return t.which!==32?null:(ome=!0,rme);case"textInput":return e=t.data,e===rme&&ome?null:e;default:return null}}function vEt(e,t){if(_y)return e==="compositionend"||!Tq&&j0e(e,t)?(e=O0e(),dP=Cq=ah=null,_y=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return R0e&&t.locale!=="ko"?null:t.data;default:return null}}var CEt={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 ime(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!CEt[e.type]:t==="textarea"}function z0e(e,t,n,r){Jy?l6?l6.push(r):l6=[r]:Jy=r,t=QP(t,"onChange"),0<t.length&&(n=new $P("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var vv=null,Bv=null;function IEt(e){P2e(e,0)}function tN(e){var t=bv(e);if(k0e(t))return e}function ame(e,t){if(e==="change")return t}var U0e=!1;Vf&&(Vf?(_E="oninput"in document,_E||(_Z=document.createElement("div"),_Z.setAttribute("oninput","return;"),_E=typeof _Z.oninput=="function"),JE=_E):JE=!1,U0e=JE&&(!document.documentMode||9<document.documentMode));var JE,_E,_Z;function sme(){vv&&(vv.detachEvent("onpropertychange",H0e),Bv=vv=null)}function H0e(e){if(e.propertyName==="value"&&tN(Bv)){var t=[];z0e(t,Bv,e,vq(e)),L0e(IEt,t)}}function TEt(e,t,n){e==="focusin"?(sme(),vv=t,Bv=n,vv.attachEvent("onpropertychange",H0e)):e==="focusout"&&sme()}function SEt(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return tN(Bv)}function MEt(e,t){if(e==="click")return tN(t)}function kEt(e,t){if(e==="input"||e==="change")return tN(t)}function EEt(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yc=typeof Object.is=="function"?Object.is:EEt;function zv(e,t){if(yc(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!MQ.call(t,o)||!yc(e[o],t[o]))return!1}return!0}function lme(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cme(e,t){var n=lme(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=lme(n)}}function W0e(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?W0e(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function F0e(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=MP(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=MP(e.document)}return t}function Sq(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var PEt=Vf&&"documentMode"in document&&11>=document.documentMode,$y=null,LQ=null,Cv=null,OQ=!1;function ume(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;OQ||$y==null||$y!==MP(r)||(r=$y,"selectionStart"in r&&Sq(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Cv&&zv(Cv,r)||(Cv=r,r=QP(LQ,"onSelect"),0<r.length&&(t=new $P("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=$y)))}function r9(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var e6={animationend:r9("Animation","AnimationEnd"),animationiteration:r9("Animation","AnimationIteration"),animationstart:r9("Animation","AnimationStart"),transitionrun:r9("Transition","TransitionRun"),transitionstart:r9("Transition","TransitionStart"),transitioncancel:r9("Transition","TransitionCancel"),transitionend:r9("Transition","TransitionEnd")},$Z={},V0e={};Vf&&(V0e=document.createElement("div").style,"AnimationEvent"in window||(delete e6.animationend.animation,delete e6.animationiteration.animation,delete e6.animationstart.animation),"TransitionEvent"in window||delete e6.transitionend.transition);function A9(e){if($Z[e])return $Z[e];if(!e6[e])return e;var t=e6[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in V0e)return $Z[e]=t[n];return e}var Z0e=A9("animationend"),Q0e=A9("animationiteration"),q0e=A9("animationstart"),NEt=A9("transitionrun"),DEt=A9("transitionstart"),LEt=A9("transitioncancel"),G0e=A9("transitionend"),Y0e=new Map,RQ="abort auxClick beforeToggle 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(" ");RQ.push("scrollEnd");function Ld(e,t){Y0e.set(e,t),w9(t,[e])}var dme=new WeakMap;function uu(e,t){if(typeof e=="object"&&e!==null){var n=dme.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Xfe(t)},dme.set(e,t),t)}return{value:e,source:t,stack:Xfe(t)}}var iu=[],t6=0,Mq=0;function nN(){for(var e=t6,t=Mq=t6=0;t<e;){var n=iu[t];iu[t++]=null;var r=iu[t];iu[t++]=null;var o=iu[t];iu[t++]=null;var i=iu[t];if(iu[t++]=null,r!==null&&o!==null){var a=r.pending;a===null?o.next=o:(o.next=a.next,a.next=o),r.pending=o}i!==0&&K0e(n,o,i)}}function rN(e,t,n,r){iu[t6++]=e,iu[t6++]=t,iu[t6++]=n,iu[t6++]=r,Mq|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function kq(e,t,n,r){return rN(e,t,n,r),kP(e)}function M6(e,t){return rN(e,null,null,t),kP(e)}function K0e(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var o=!1,i=e.return;i!==null;)i.childLanes|=n,r=i.alternate,r!==null&&(r.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(o=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,o&&t!==null&&(o=31-mc(n),e=i.hiddenUpdates,r=e[o],r===null?e[o]=[t]:r.push(t),t.lane=n|536870912),i):null}function kP(e){if(50<Lv)throw Lv=0,nq=null,Error(re(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var n6={};function OEt(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pc(e,t,n,r){return new OEt(e,t,n,r)}function Eq(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Wf(e,t){var n=e.alternate;return n===null?(n=pc(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function X0e(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function fP(e,t,n,r,o,i){var a=0;if(r=e,typeof e=="function")Eq(e)&&(a=1);else if(typeof e=="string")a=OPt(e,n,Y1.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case CQ:return e=pc(31,n,t,o),e.elementType=CQ,e.lanes=i,e;case Yy:return l9(n.children,o,i,t);case h0e:a=8,o|=24;break;case AQ:return e=pc(12,n,t,o|2),e.elementType=AQ,e.lanes=i,e;case xQ:return e=pc(13,n,t,o),e.elementType=xQ,e.lanes=i,e;case vQ:return e=pc(19,n,t,o),e.elementType=vQ,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ikt:case jf:a=10;break e;case g0e:a=9;break e;case hq:a=11;break e;case gq:a=14;break e;case $0:a=16,r=null;break e}a=29,n=Error(re(130,e===null?"null":typeof e,"")),r=null}return t=pc(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function l9(e,t,n,r){return e=pc(7,e,r,t),e.lanes=n,e}function eQ(e,t,n){return e=pc(6,e,null,t),e.lanes=n,e}function tQ(e,t,n){return t=pc(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var r6=[],o6=0,EP=null,PP=0,su=[],lu=0,c9=null,Bf=1,zf="";function i9(e,t){r6[o6++]=PP,r6[o6++]=EP,EP=e,PP=t}function J0e(e,t,n){su[lu++]=Bf,su[lu++]=zf,su[lu++]=c9,c9=e;var r=Bf;e=zf;var o=32-mc(r)-1;r&=~(1<<o),n+=1;var i=32-mc(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,Bf=1<<32-mc(t)+o|n<<o|r,zf=i+e}else Bf=1<<i|n<<o|r,zf=e}function Pq(e){e.return!==null&&(i9(e,1),J0e(e,1,0))}function Nq(e){for(;e===EP;)EP=r6[--o6],r6[o6]=null,PP=r6[--o6],r6[o6]=null;for(;e===c9;)c9=su[--lu],su[lu]=null,zf=su[--lu],su[lu]=null,Bf=su[--lu],su[lu]=null}var ws=null,To=null,Un=!1,u9=null,q1=!1,jQ=Error(re(519));function m9(e){var t=Error(re(418,""));throw Uv(uu(t,e)),jQ}function pme(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Oa]=e,t[al]=r,n){case"dialog":$t("cancel",t),$t("close",t);break;case"iframe":case"object":case"embed":$t("load",t);break;case"video":case"audio":for(n=0;n<Fv.length;n++)$t(Fv[n],t);break;case"source":$t("error",t);break;case"img":case"image":case"link":$t("error",t),$t("load",t);break;case"details":$t("toggle",t);break;case"input":$t("invalid",t),E0e(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0),SP(t);break;case"select":$t("invalid",t);break;case"textarea":$t("invalid",t),N0e(t,r.value,r.defaultValue,r.children),SP(t)}n=r.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||r.suppressHydrationWarning===!0||D2e(t.textContent,n)?(r.popover!=null&&($t("beforetoggle",t),$t("toggle",t)),r.onScroll!=null&&$t("scroll",t),r.onScrollEnd!=null&&$t("scrollend",t),r.onClick!=null&&(t.onclick=dN),t=!0):t=!1,t||m9(e)}function fme(e){for(ws=e.return;ws;)switch(ws.tag){case 5:case 13:q1=!1;return;case 27:case 3:q1=!0;return;default:ws=ws.return}}function dv(e){if(e!==ws)return!1;if(!Un)return fme(e),Un=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||lq(e.type,e.memoizedProps)),n=!n),n&&To&&m9(e),fme(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(re(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(n=e.data,n==="/$"){if(t===0){To=Dd(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++;e=e.nextSibling}To=null}}else t===27?(t=To,xh(e.type)?(e=dq,dq=null,To=e):To=t):To=ws?Dd(e.stateNode.nextSibling):null;return!0}function tC(){To=ws=null,Un=!1}function mme(){var e=u9;return e!==null&&(il===null?il=e:il.push.apply(il,e),u9=null),e}function Uv(e){u9===null?u9=[e]:u9.push(e)}var BQ=J1(null),x9=null,Uf=null;function th(e,t,n){_r(BQ,t._currentValue),t._currentValue=n}function Ff(e){e._currentValue=BQ.current,Fi(BQ)}function zQ(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function UQ(e,t,n,r){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var i=o.dependencies;if(i!==null){var a=o.child;i=i.firstContext;e:for(;i!==null;){var s=i;i=o;for(var l=0;l<t.length;l++)if(s.context===t[l]){i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),zQ(i.return,n,e),r||(a=null);break e}i=s.next}}else if(o.tag===18){if(a=o.return,a===null)throw Error(re(341));a.lanes|=n,i=a.alternate,i!==null&&(i.lanes|=n),zQ(a,n,e),a=null}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===e){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}}function nC(e,t,n,r){e=null;for(var o=t,i=!1;o!==null;){if(!i){if((o.flags&524288)!==0)i=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var a=o.alternate;if(a===null)throw Error(re(387));if(a=a.memoizedProps,a!==null){var s=o.type;yc(o.pendingProps.value,a.value)||(e!==null?e.push(s):e=[s])}}else if(o===vP.current){if(a=o.alternate,a===null)throw Error(re(387));a.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(Qv):e=[Qv])}o=o.return}e!==null&&UQ(t,e,n,r),t.flags|=262144}function NP(e){for(e=e.firstContext;e!==null;){if(!yc(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function h9(e){x9=e,Uf=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ra(e){return _0e(x9,e)}function $E(e,t){return x9===null&&h9(e),_0e(e,t)}function _0e(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Uf===null){if(e===null)throw Error(re(308));Uf=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Uf=Uf.next=t;return n}var REt=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},jEt=vi.unstable_scheduleCallback,BEt=vi.unstable_NormalPriority,Ai={$$typeof:jf,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Dq(){return{controller:new REt,data:new Map,refCount:0}}function rC(e){e.refCount--,e.refCount===0&&jEt(BEt,function(){e.controller.abort()})}var Iv=null,HQ=0,y6=0,c6=null;function zEt(e,t){if(Iv===null){var n=Iv=[];HQ=0,y6=tG(),c6={status:"pending",value:void 0,then:function(r){n.push(r)}}}return HQ++,t.then(hme,hme),t}function hme(){if(--HQ===0&&Iv!==null){c6!==null&&(c6.status="fulfilled");var e=Iv;Iv=null,y6=0,c6=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function UEt(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(o){n.push(o)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var o=0;o<n.length;o++)(0,n[o])(t)},function(o){for(r.status="rejected",r.reason=o,o=0;o<n.length;o++)(0,n[o])(void 0)}),r}var gme=dt.S;dt.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&zEt(e,t),gme!==null&&gme(e,t)};var d9=J1(null);function Lq(){var e=d9.current;return e!==null?e:kr.pooledCache}function mP(e,t){t===null?_r(d9,d9.current):_r(d9,t.pool)}function $0e(){var e=Lq();return e===null?null:{parent:Ai._currentValue,pool:e}}var oC=Error(re(460)),ehe=Error(re(474)),oN=Error(re(542)),WQ={then:function(){}};function yme(e){return e=e.status,e==="fulfilled"||e==="rejected"}function eP(){}function the(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(eP,eP),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,bme(e),e;default:if(typeof t.status=="string")t.then(eP,eP);else{if(e=kr,e!==null&&100<e.shellSuspendCounter)throw Error(re(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=r}},function(r){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,bme(e),e}throw Tv=t,oC}}var Tv=null;function wme(){if(Tv===null)throw Error(re(459));var e=Tv;return Tv=null,e}function bme(e){if(e===oC||e===oN)throw Error(re(483))}var eh=!1;function Oq(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function FQ(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function uh(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function dh(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(tr&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,t=kP(e),K0e(e,null,n),t}return rN(e,r,t,n),kP(e)}function Sv(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,C0e(e,n)}}function nQ(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?o=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var VQ=!1;function Mv(){if(VQ){var e=c6;if(e!==null)throw e}}function kv(e,t,n,r){VQ=!1;var o=e.updateQueue;eh=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var l=s,c=l.next;l.next=null,a===null?i=c:a.next=c,a=l;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==a&&(s===null?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=o.baseState;a=0,u=c=l=null,s=i;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(wn&f)===f:(r&f)===f){f!==0&&f===y6&&(VQ=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var h=e,g=s;f=t;var w=n;switch(g.tag){case 1:if(h=g.payload,typeof h=="function"){d=h.call(w,d,f);break e}d=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h=="function"?h.call(w,d,f):h,f==null)break e;d=Ur({},d,f);break e;case 2:eh=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=o.callbacks,m===null?o.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(c=u=m,l=d):u=u.next=m,a|=f;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;m=s,s=m.next,m.next=null,o.lastBaseUpdate=m,o.shared.pending=null}}while(!0);u===null&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,i===null&&(o.shared.lanes=0),bh|=a,e.lanes=a,e.memoizedState=d}}function nhe(e,t){if(typeof e!="function")throw Error(re(191,e));e.call(t)}function rhe(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)nhe(n[e],t)}var w6=J1(null),DP=J1(0);function Ame(e,t){e=qf,_r(DP,e),_r(w6,t),qf=e|t.baseLanes}function ZQ(){_r(DP,qf),_r(w6,w6.current)}function Rq(){qf=DP.current,Fi(w6),Fi(DP)}var yh=0,Yt=null,dr=null,ti=null,LP=!1,u6=!1,g9=!1,OP=0,Hv=0,d6=null,HEt=0;function Ho(){throw Error(re(321))}function jq(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!yc(e[n],t[n]))return!1;return!0}function Bq(e,t,n,r,o,i){return yh=i,Yt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,dt.H=e===null||e.memoizedState===null?Ohe:Rhe,g9=!1,i=n(r,o),g9=!1,u6&&(i=ihe(t,n,r,o)),ohe(e),i}function ohe(e){dt.H=RP;var t=dr!==null&&dr.next!==null;if(yh=0,ti=dr=Yt=null,LP=!1,Hv=0,d6=null,t)throw Error(re(300));e===null||Wi||(e=e.dependencies,e!==null&&NP(e)&&(Wi=!0))}function ihe(e,t,n,r){Yt=e;var o=0;do{if(u6&&(d6=null),Hv=0,u6=!1,25<=o)throw Error(re(301));if(o+=1,ti=dr=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}dt.H=GEt,i=t(n,r)}while(u6);return i}function WEt(){var e=dt.H,t=e.useState()[0];return t=typeof t.then=="function"?iC(t):t,e=e.useState()[0],(dr!==null?dr.memoizedState:null)!==e&&(Yt.flags|=1024),t}function zq(){var e=OP!==0;return OP=0,e}function Uq(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Hq(e){if(LP){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}LP=!1}yh=0,ti=dr=Yt=null,u6=!1,Hv=OP=0,d6=null}function rl(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ti===null?Yt.memoizedState=ti=e:ti=ti.next=e,ti}function ni(){if(dr===null){var e=Yt.alternate;e=e!==null?e.memoizedState:null}else e=dr.next;var t=ti===null?Yt.memoizedState:ti.next;if(t!==null)ti=t,dr=e;else{if(e===null)throw Yt.alternate===null?Error(re(467)):Error(re(310));dr=e,e={memoizedState:dr.memoizedState,baseState:dr.baseState,baseQueue:dr.baseQueue,queue:dr.queue,next:null},ti===null?Yt.memoizedState=ti=e:ti=ti.next=e}return ti}function Wq(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function iC(e){var t=Hv;return Hv+=1,d6===null&&(d6=[]),e=the(d6,e,t),t=Yt,(ti===null?t.memoizedState:ti.next)===null&&(t=t.alternate,dt.H=t===null||t.memoizedState===null?Ohe:Rhe),e}function iN(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return iC(e);if(e.$$typeof===jf)return Ra(e)}throw Error(re(438,String(e)))}function Fq(e){var t=null,n=Yt.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Yt.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Wq(),Yt.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=Tkt;return t.index++,n}function Zf(e,t){return typeof t=="function"?t(e):t}function hP(e){var t=ni();return Vq(t,dr,e)}function Vq(e,t,n){var r=e.queue;if(r===null)throw Error(re(311));r.lastRenderedReducer=n;var o=e.baseQueue,i=r.pending;if(i!==null){if(o!==null){var a=o.next;o.next=i.next,i.next=a}t.baseQueue=o=i,r.pending=null}if(i=e.baseState,o===null)e.memoizedState=i;else{t=o.next;var s=a=null,l=null,c=t,u=!1;do{var d=c.lane&-536870913;if(d!==c.lane?(wn&d)===d:(yh&d)===d){var f=c.revertLane;if(f===0)l!==null&&(l=l.next={lane:0,revertLane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),d===y6&&(u=!0);else if((yh&f)===f){c=c.next,f===y6&&(u=!0);continue}else d={lane:0,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},l===null?(s=l=d,a=i):l=l.next=d,Yt.lanes|=f,bh|=f;d=c.action,g9&&n(i,d),i=c.hasEagerState?c.eagerState:n(i,d)}else f={lane:d,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},l===null?(s=l=f,a=i):l=l.next=f,Yt.lanes|=d,bh|=d;c=c.next}while(c!==null&&c!==t);if(l===null?a=i:l.next=s,!yc(i,e.memoizedState)&&(Wi=!0,u&&(n=c6,n!==null)))throw n;e.memoizedState=i,e.baseState=a,e.baseQueue=l,r.lastRenderedState=i}return o===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function rQ(e){var t=ni(),n=t.queue;if(n===null)throw Error(re(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var a=o=o.next;do i=e(i,a.action),a=a.next;while(a!==o);yc(i,t.memoizedState)||(Wi=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ahe(e,t,n){var r=Yt,o=ni(),i=Un;if(i){if(n===void 0)throw Error(re(407));n=n()}else n=t();var a=!yc((dr||o).memoizedState,n);a&&(o.memoizedState=n,Wi=!0),o=o.queue;var s=che.bind(null,r,o,e);if(aC(2048,8,s,[e]),o.getSnapshot!==t||a||ti!==null&&ti.memoizedState.tag&1){if(r.flags|=2048,b6(9,aN(),lhe.bind(null,r,o,n,t),null),kr===null)throw Error(re(349));i||(yh&124)!==0||she(r,t,n)}return n}function she(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Yt.updateQueue,t===null?(t=Wq(),Yt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function lhe(e,t,n,r){t.value=n,t.getSnapshot=r,uhe(t)&&dhe(e)}function che(e,t,n){return n(function(){uhe(t)&&dhe(e)})}function uhe(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!yc(e,n)}catch{return!0}}function dhe(e){var t=M6(e,2);t!==null&&gc(t,e,2)}function QQ(e){var t=rl();if(typeof e=="function"){var n=e;if(e=n(),g9){ih(!0);try{n()}finally{ih(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zf,lastRenderedState:e},t}function phe(e,t,n,r){return e.baseState=n,Vq(e,dr,typeof r=="function"?r:Zf)}function FEt(e,t,n,r,o){if(sN(e))throw Error(re(485));if(e=t.action,e!==null){var i={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(a){i.listeners.push(a)}};dt.T!==null?n(!0):i.isTransition=!1,r(i),n=t.pending,n===null?(i.next=t.pending=i,fhe(t,i)):(i.next=n.next,t.pending=n.next=i)}}function fhe(e,t){var n=t.action,r=t.payload,o=e.state;if(t.isTransition){var i=dt.T,a={};dt.T=a;try{var s=n(o,r),l=dt.S;l!==null&&l(a,s),xme(e,t,s)}catch(c){qQ(e,t,c)}finally{dt.T=i}}else try{i=n(o,r),xme(e,t,i)}catch(c){qQ(e,t,c)}}function xme(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(r){vme(e,t,r)},function(r){return qQ(e,t,r)}):vme(e,t,n)}function vme(e,t,n){t.status="fulfilled",t.value=n,mhe(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,fhe(e,n)))}function qQ(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,mhe(t),t=t.next;while(t!==r)}e.action=null}function mhe(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function hhe(e,t){return t}function Cme(e,t){if(Un){var n=kr.formState;if(n!==null){e:{var r=Yt;if(Un){if(To){t:{for(var o=To,i=q1;o.nodeType!==8;){if(!i){o=null;break t}if(o=Dd(o.nextSibling),o===null){o=null;break t}}i=o.data,o=i==="F!"||i==="F"?o:null}if(o){To=Dd(o.nextSibling),r=o.data==="F!";break e}}m9(r)}r=!1}r&&(t=n[0])}}return n=rl(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hhe,lastRenderedState:t},n.queue=r,n=Nhe.bind(null,Yt,r),r.dispatch=n,r=QQ(!1),i=Gq.bind(null,Yt,!1,r.queue),r=rl(),o={state:t,dispatch:null,action:e,pending:null},r.queue=o,n=FEt.bind(null,Yt,o,i,n),o.dispatch=n,r.memoizedState=e,[t,n,!1]}function Ime(e){var t=ni();return ghe(t,dr,e)}function ghe(e,t,n){if(t=Vq(e,t,hhe)[0],e=hP(Zf)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=iC(t)}catch(a){throw a===oC?oN:a}else r=t;t=ni();var o=t.queue,i=o.dispatch;return n!==t.memoizedState&&(Yt.flags|=2048,b6(9,aN(),VEt.bind(null,o,n),null)),[r,i,e]}function VEt(e,t){e.action=t}function Tme(e){var t=ni(),n=dr;if(n!==null)return ghe(t,n,e);ni(),t=t.memoizedState,n=ni();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function b6(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Yt.updateQueue,t===null&&(t=Wq(),Yt.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function aN(){return{destroy:void 0,resource:void 0}}function yhe(){return ni().memoizedState}function gP(e,t,n,r){var o=rl();r=r===void 0?null:r,Yt.flags|=e,o.memoizedState=b6(1|t,aN(),n,r)}function aC(e,t,n,r){var o=ni();r=r===void 0?null:r;var i=o.memoizedState.inst;dr!==null&&r!==null&&jq(r,dr.memoizedState.deps)?o.memoizedState=b6(t,i,n,r):(Yt.flags|=e,o.memoizedState=b6(1|t,i,n,r))}function Sme(e,t){gP(8390656,8,e,t)}function whe(e,t){aC(2048,8,e,t)}function bhe(e,t){return aC(4,2,e,t)}function Ahe(e,t){return aC(4,4,e,t)}function xhe(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function vhe(e,t,n){n=n!=null?n.concat([e]):null,aC(4,4,xhe.bind(null,t,e),n)}function Zq(){}function Che(e,t){var n=ni();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&jq(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ihe(e,t){var n=ni();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&jq(t,r[1]))return r[0];if(r=e(),g9){ih(!0);try{e()}finally{ih(!1)}}return n.memoizedState=[r,t],r}function Qq(e,t,n){return n===void 0||(yh&1073741824)!==0?e.memoizedState=t:(e.memoizedState=n,e=m2e(),Yt.lanes|=e,bh|=e,n)}function The(e,t,n,r){return yc(n,t)?n:w6.current!==null?(e=Qq(e,n,r),yc(e,t)||(Wi=!0),e):(yh&42)===0?(Wi=!0,e.memoizedState=n):(e=m2e(),Yt.lanes|=e,bh|=e,t)}function She(e,t,n,r,o){var i=Hn.p;Hn.p=i!==0&&8>i?i:8;var a=dt.T,s={};dt.T=s,Gq(e,!1,t,n);try{var l=o(),c=dt.S;if(c!==null&&c(s,l),l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=UEt(l,r);Ev(e,t,u,hc(e))}else Ev(e,t,r,hc(e))}catch(d){Ev(e,t,{then:function(){},status:"rejected",reason:d},hc())}finally{Hn.p=i,dt.T=a}}function ZEt(){}function GQ(e,t,n,r){if(e.tag!==5)throw Error(re(476));var o=Mhe(e).queue;She(e,o,t,s9,n===null?ZEt:function(){return khe(e),n(r)})}function Mhe(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:s9,baseState:s9,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zf,lastRenderedState:s9},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zf,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function khe(e){var t=Mhe(e).next.queue;Ev(e,t,{},hc())}function qq(){return Ra(Qv)}function Ehe(){return ni().memoizedState}function Phe(){return ni().memoizedState}function QEt(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=hc();e=uh(n);var r=dh(t,e,n);r!==null&&(gc(r,t,n),Sv(r,t,n)),t={cache:Dq()},e.payload=t;return}t=t.return}}function qEt(e,t,n){var r=hc();n={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},sN(e)?Dhe(t,n):(n=kq(e,t,n,r),n!==null&&(gc(n,e,r),Lhe(n,t,r)))}function Nhe(e,t,n){var r=hc();Ev(e,t,n,r)}function Ev(e,t,n,r){var o={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(sN(e))Dhe(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,yc(s,a))return rN(e,t,o,0),kr===null&&nN(),!1}catch{}finally{}if(n=kq(e,t,o,r),n!==null)return gc(n,e,r),Lhe(n,t,r),!0}return!1}function Gq(e,t,n,r){if(r={lane:2,revertLane:tG(),action:r,hasEagerState:!1,eagerState:null,next:null},sN(e)){if(t)throw Error(re(479))}else t=kq(e,n,r,2),t!==null&&gc(t,e,2)}function sN(e){var t=e.alternate;return e===Yt||t!==null&&t===Yt}function Dhe(e,t){u6=LP=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Lhe(e,t,n){if((n&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,C0e(e,n)}}var RP={readContext:Ra,use:iN,useCallback:Ho,useContext:Ho,useEffect:Ho,useImperativeHandle:Ho,useLayoutEffect:Ho,useInsertionEffect:Ho,useMemo:Ho,useReducer:Ho,useRef:Ho,useState:Ho,useDebugValue:Ho,useDeferredValue:Ho,useTransition:Ho,useSyncExternalStore:Ho,useId:Ho,useHostTransitionStatus:Ho,useFormState:Ho,useActionState:Ho,useOptimistic:Ho,useMemoCache:Ho,useCacheRefresh:Ho},Ohe={readContext:Ra,use:iN,useCallback:function(e,t){return rl().memoizedState=[e,t===void 0?null:t],e},useContext:Ra,useEffect:Sme,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,gP(4194308,4,xhe.bind(null,t,e),n)},useLayoutEffect:function(e,t){return gP(4194308,4,e,t)},useInsertionEffect:function(e,t){gP(4,2,e,t)},useMemo:function(e,t){var n=rl();t=t===void 0?null:t;var r=e();if(g9){ih(!0);try{e()}finally{ih(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=rl();if(n!==void 0){var o=n(t);if(g9){ih(!0);try{n(t)}finally{ih(!1)}}}else o=t;return r.memoizedState=r.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},r.queue=e,e=e.dispatch=qEt.bind(null,Yt,e),[r.memoizedState,e]},useRef:function(e){var t=rl();return e={current:e},t.memoizedState=e},useState:function(e){e=QQ(e);var t=e.queue,n=Nhe.bind(null,Yt,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Zq,useDeferredValue:function(e,t){var n=rl();return Qq(n,e,t)},useTransition:function(){var e=QQ(!1);return e=She.bind(null,Yt,e.queue,!0,!1),rl().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Yt,o=rl();if(Un){if(n===void 0)throw Error(re(407));n=n()}else{if(n=t(),kr===null)throw Error(re(349));(wn&124)!==0||she(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Sme(che.bind(null,r,i,e),[e]),r.flags|=2048,b6(9,aN(),lhe.bind(null,r,i,n,t),null),n},useId:function(){var e=rl(),t=kr.identifierPrefix;if(Un){var n=zf,r=Bf;n=(r&~(1<<32-mc(r)-1)).toString(32)+n,t="\xAB"+t+"R"+n,n=OP++,0<n&&(t+="H"+n.toString(32)),t+="\xBB"}else n=HEt++,t="\xAB"+t+"r"+n.toString(32)+"\xBB";return e.memoizedState=t},useHostTransitionStatus:qq,useFormState:Cme,useActionState:Cme,useOptimistic:function(e){var t=rl();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Gq.bind(null,Yt,!0,n),n.dispatch=t,[e,t]},useMemoCache:Fq,useCacheRefresh:function(){return rl().memoizedState=QEt.bind(null,Yt)}},Rhe={readContext:Ra,use:iN,useCallback:Che,useContext:Ra,useEffect:whe,useImperativeHandle:vhe,useInsertionEffect:bhe,useLayoutEffect:Ahe,useMemo:Ihe,useReducer:hP,useRef:yhe,useState:function(){return hP(Zf)},useDebugValue:Zq,useDeferredValue:function(e,t){var n=ni();return The(n,dr.memoizedState,e,t)},useTransition:function(){var e=hP(Zf)[0],t=ni().memoizedState;return[typeof e=="boolean"?e:iC(e),t]},useSyncExternalStore:ahe,useId:Ehe,useHostTransitionStatus:qq,useFormState:Ime,useActionState:Ime,useOptimistic:function(e,t){var n=ni();return phe(n,dr,e,t)},useMemoCache:Fq,useCacheRefresh:Phe},GEt={readContext:Ra,use:iN,useCallback:Che,useContext:Ra,useEffect:whe,useImperativeHandle:vhe,useInsertionEffect:bhe,useLayoutEffect:Ahe,useMemo:Ihe,useReducer:rQ,useRef:yhe,useState:function(){return rQ(Zf)},useDebugValue:Zq,useDeferredValue:function(e,t){var n=ni();return dr===null?Qq(n,e,t):The(n,dr.memoizedState,e,t)},useTransition:function(){var e=rQ(Zf)[0],t=ni().memoizedState;return[typeof e=="boolean"?e:iC(e),t]},useSyncExternalStore:ahe,useId:Ehe,useHostTransitionStatus:qq,useFormState:Tme,useActionState:Tme,useOptimistic:function(e,t){var n=ni();return dr!==null?phe(n,dr,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Fq,useCacheRefresh:Phe},p6=null,Wv=0;function tP(e){var t=Wv;return Wv+=1,p6===null&&(p6=[]),the(p6,e,t)}function pv(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function nP(e,t){throw t.$$typeof===Ckt?Error(re(525)):(e=Object.prototype.toString.call(t),Error(re(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Mme(e){var t=e._init;return t(e._payload)}function jhe(e){function t(b,A){if(e){var x=b.deletions;x===null?(b.deletions=[A],b.flags|=16):x.push(A)}}function n(b,A){if(!e)return null;for(;A!==null;)t(b,A),A=A.sibling;return null}function r(b){for(var A=new Map;b!==null;)b.key!==null?A.set(b.key,b):A.set(b.index,b),b=b.sibling;return A}function o(b,A){return b=Wf(b,A),b.index=0,b.sibling=null,b}function i(b,A,x){return b.index=x,e?(x=b.alternate,x!==null?(x=x.index,x<A?(b.flags|=67108866,A):x):(b.flags|=67108866,A)):(b.flags|=1048576,A)}function a(b){return e&&b.alternate===null&&(b.flags|=67108866),b}function s(b,A,x,v){return A===null||A.tag!==6?(A=eQ(x,b.mode,v),A.return=b,A):(A=o(A,x),A.return=b,A)}function l(b,A,x,v){var C=x.type;return C===Yy?u(b,A,x.props.children,v,x.key):A!==null&&(A.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===$0&&Mme(C)===A.type)?(A=o(A,x.props),pv(A,x),A.return=b,A):(A=fP(x.type,x.key,x.props,null,b.mode,v),pv(A,x),A.return=b,A)}function c(b,A,x,v){return A===null||A.tag!==4||A.stateNode.containerInfo!==x.containerInfo||A.stateNode.implementation!==x.implementation?(A=tQ(x,b.mode,v),A.return=b,A):(A=o(A,x.children||[]),A.return=b,A)}function u(b,A,x,v,C){return A===null||A.tag!==7?(A=l9(x,b.mode,v,C),A.return=b,A):(A=o(A,x),A.return=b,A)}function d(b,A,x){if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return A=eQ(""+A,b.mode,x),A.return=b,A;if(typeof A=="object"&&A!==null){switch(A.$$typeof){case qE:return x=fP(A.type,A.key,A.props,null,b.mode,x),pv(x,A),x.return=b,x;case yv:return A=tQ(A,b.mode,x),A.return=b,A;case $0:var v=A._init;return A=v(A._payload),d(b,A,x)}if(wv(A)||cv(A))return A=l9(A,b.mode,x,null),A.return=b,A;if(typeof A.then=="function")return d(b,tP(A),x);if(A.$$typeof===jf)return d(b,$E(b,A),x);nP(b,A)}return null}function f(b,A,x,v){var C=A!==null?A.key:null;if(typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint")return C!==null?null:s(b,A,""+x,v);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case qE:return x.key===C?l(b,A,x,v):null;case yv:return x.key===C?c(b,A,x,v):null;case $0:return C=x._init,x=C(x._payload),f(b,A,x,v)}if(wv(x)||cv(x))return C!==null?null:u(b,A,x,v,null);if(typeof x.then=="function")return f(b,A,tP(x),v);if(x.$$typeof===jf)return f(b,A,$E(b,x),v);nP(b,x)}return null}function m(b,A,x,v,C){if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return b=b.get(x)||null,s(A,b,""+v,C);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case qE:return b=b.get(v.key===null?x:v.key)||null,l(A,b,v,C);case yv:return b=b.get(v.key===null?x:v.key)||null,c(A,b,v,C);case $0:var M=v._init;return v=M(v._payload),m(b,A,x,v,C)}if(wv(v)||cv(v))return b=b.get(x)||null,u(A,b,v,C,null);if(typeof v.then=="function")return m(b,A,x,tP(v),C);if(v.$$typeof===jf)return m(b,A,x,$E(A,v),C);nP(A,v)}return null}function h(b,A,x,v){for(var C=null,M=null,I=A,P=A=0,E=null;I!==null&&P<x.length;P++){I.index>P?(E=I,I=null):E=I.sibling;var O=f(b,I,x[P],v);if(O===null){I===null&&(I=E);break}e&&I&&O.alternate===null&&t(b,I),A=i(O,A,P),M===null?C=O:M.sibling=O,M=O,I=E}if(P===x.length)return n(b,I),Un&&i9(b,P),C;if(I===null){for(;P<x.length;P++)I=d(b,x[P],v),I!==null&&(A=i(I,A,P),M===null?C=I:M.sibling=I,M=I);return Un&&i9(b,P),C}for(I=r(I);P<x.length;P++)E=m(I,b,P,x[P],v),E!==null&&(e&&E.alternate!==null&&I.delete(E.key===null?P:E.key),A=i(E,A,P),M===null?C=E:M.sibling=E,M=E);return e&&I.forEach(function(k){return t(b,k)}),Un&&i9(b,P),C}function g(b,A,x,v){if(x==null)throw Error(re(151));for(var C=null,M=null,I=A,P=A=0,E=null,O=x.next();I!==null&&!O.done;P++,O=x.next()){I.index>P?(E=I,I=null):E=I.sibling;var k=f(b,I,O.value,v);if(k===null){I===null&&(I=E);break}e&&I&&k.alternate===null&&t(b,I),A=i(k,A,P),M===null?C=k:M.sibling=k,M=k,I=E}if(O.done)return n(b,I),Un&&i9(b,P),C;if(I===null){for(;!O.done;P++,O=x.next())O=d(b,O.value,v),O!==null&&(A=i(O,A,P),M===null?C=O:M.sibling=O,M=O);return Un&&i9(b,P),C}for(I=r(I);!O.done;P++,O=x.next())O=m(I,b,P,O.value,v),O!==null&&(e&&O.alternate!==null&&I.delete(O.key===null?P:O.key),A=i(O,A,P),M===null?C=O:M.sibling=O,M=O);return e&&I.forEach(function(N){return t(b,N)}),Un&&i9(b,P),C}function w(b,A,x,v){if(typeof x=="object"&&x!==null&&x.type===Yy&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case qE:e:{for(var C=x.key;A!==null;){if(A.key===C){if(C=x.type,C===Yy){if(A.tag===7){n(b,A.sibling),v=o(A,x.props.children),v.return=b,b=v;break e}}else if(A.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===$0&&Mme(C)===A.type){n(b,A.sibling),v=o(A,x.props),pv(v,x),v.return=b,b=v;break e}n(b,A);break}else t(b,A);A=A.sibling}x.type===Yy?(v=l9(x.props.children,b.mode,v,x.key),v.return=b,b=v):(v=fP(x.type,x.key,x.props,null,b.mode,v),pv(v,x),v.return=b,b=v)}return a(b);case yv:e:{for(C=x.key;A!==null;){if(A.key===C)if(A.tag===4&&A.stateNode.containerInfo===x.containerInfo&&A.stateNode.implementation===x.implementation){n(b,A.sibling),v=o(A,x.children||[]),v.return=b,b=v;break e}else{n(b,A);break}else t(b,A);A=A.sibling}v=tQ(x,b.mode,v),v.return=b,b=v}return a(b);case $0:return C=x._init,x=C(x._payload),w(b,A,x,v)}if(wv(x))return h(b,A,x,v);if(cv(x)){if(C=cv(x),typeof C!="function")throw Error(re(150));return x=C.call(x),g(b,A,x,v)}if(typeof x.then=="function")return w(b,A,tP(x),v);if(x.$$typeof===jf)return w(b,A,$E(b,x),v);nP(b,x)}return typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint"?(x=""+x,A!==null&&A.tag===6?(n(b,A.sibling),v=o(A,x),v.return=b,b=v):(n(b,A),v=eQ(x,b.mode,v),v.return=b,b=v),a(b)):n(b,A)}return function(b,A,x,v){try{Wv=0;var C=w(b,A,x,v);return p6=null,C}catch(I){if(I===oC||I===oN)throw I;var M=pc(29,I,null,b.mode);return M.lanes=v,M.return=b,M}finally{}}}var A6=jhe(!0),Bhe=jhe(!1),pu=J1(null),X1=null;function nh(e){var t=e.alternate;_r(xi,xi.current&1),_r(pu,e),X1===null&&(t===null||w6.current!==null||t.memoizedState!==null)&&(X1=e)}function zhe(e){if(e.tag===22){if(_r(xi,xi.current),_r(pu,e),X1===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(X1=e)}}else rh(e)}function rh(){_r(xi,xi.current),_r(pu,pu.current)}function Hf(e){Fi(pu),X1===e&&(X1=null),Fi(xi)}var xi=J1(0);function jP(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||uq(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function oQ(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ur({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var YQ={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=hc(),o=uh(r);o.payload=t,n!=null&&(o.callback=n),t=dh(e,o,r),t!==null&&(gc(t,e,r),Sv(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=hc(),o=uh(r);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=dh(e,o,r),t!==null&&(gc(t,e,r),Sv(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=hc(),r=uh(n);r.tag=2,t!=null&&(r.callback=t),t=dh(e,r,n),t!==null&&(gc(t,e,n),Sv(t,e,n))}};function kme(e,t,n,r,o,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,a):t.prototype&&t.prototype.isPureReactComponent?!zv(n,r)||!zv(o,i):!0}function Eme(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&YQ.enqueueReplaceState(t,t.state,null)}function y9(e,t){var n=t;if("ref"in t){n={};for(var r in t)r!=="ref"&&(n[r]=t[r])}if(e=e.defaultProps){n===t&&(n=Ur({},n));for(var o in e)n[o]===void 0&&(n[o]=e[o])}return n}var BP=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function Uhe(e){BP(e)}function Hhe(e){console.error(e)}function Whe(e){BP(e)}function zP(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function Pme(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function KQ(e,t,n){return n=uh(n),n.tag=3,n.payload={element:null},n.callback=function(){zP(e,t)},n}function Fhe(e){return e=uh(e),e.tag=3,e}function Vhe(e,t,n,r){var o=n.type.getDerivedStateFromError;if(typeof o=="function"){var i=r.value;e.payload=function(){return o(i)},e.callback=function(){Pme(t,n,r)}}var a=n.stateNode;a!==null&&typeof a.componentDidCatch=="function"&&(e.callback=function(){Pme(t,n,r),typeof o!="function"&&(ph===null?ph=new Set([this]):ph.add(this));var s=r.stack;this.componentDidCatch(r.value,{componentStack:s!==null?s:""})})}function YEt(e,t,n,r,o){if(n.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=n.alternate,t!==null&&nC(t,n,o,!0),n=pu.current,n!==null){switch(n.tag){case 13:return X1===null?rq():n.alternate===null&&So===0&&(So=3),n.flags&=-257,n.flags|=65536,n.lanes=o,r===WQ?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),hQ(e,r,o)),!1;case 22:return n.flags|=65536,r===WQ?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),hQ(e,r,o)),!1}throw Error(re(435,n.tag))}return hQ(e,r,o),rq(),!1}if(Un)return t=pu.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,r!==jQ&&(e=Error(re(422),{cause:r}),Uv(uu(e,n)))):(r!==jQ&&(t=Error(re(423),{cause:r}),Uv(uu(t,n))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,r=uu(r,n),o=KQ(e.stateNode,r,o),nQ(e,o),So!==4&&(So=2)),!1;var i=Error(re(520),{cause:r});if(i=uu(i,n),Dv===null?Dv=[i]:Dv.push(i),So!==4&&(So=2),t===null)return!0;r=uu(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=o&-o,n.lanes|=e,e=KQ(n.stateNode,r,e),nQ(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(ph===null||!ph.has(i))))return n.flags|=65536,o&=-o,n.lanes|=o,o=Fhe(o),Vhe(o,e,n,r),nQ(n,o),!1}n=n.return}while(n!==null);return!1}var Zhe=Error(re(461)),Wi=!1;function ta(e,t,n,r){t.child=e===null?Bhe(t,null,n,r):A6(t,e.child,n,r)}function Nme(e,t,n,r,o){n=n.render;var i=t.ref;if("ref"in r){var a={};for(var s in r)s!=="ref"&&(a[s]=r[s])}else a=r;return h9(t),r=Bq(e,t,n,a,i,o),s=zq(),e!==null&&!Wi?(Uq(e,t,o),Qf(e,t,o)):(Un&&s&&Pq(t),t.flags|=1,ta(e,t,r,o),t.child)}function Dme(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!Eq(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,Qhe(e,t,i,r,o)):(e=fP(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Yq(e,o)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:zv,n(a,r)&&e.ref===t.ref)return Qf(e,t,o)}return t.flags|=1,e=Wf(i,r),e.ref=t.ref,e.return=t,t.child=e}function Qhe(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(zv(i,r)&&e.ref===t.ref)if(Wi=!1,t.pendingProps=r=i,Yq(e,o))(e.flags&131072)!==0&&(Wi=!0);else return t.lanes=e.lanes,Qf(e,t,o)}return XQ(e,t,n,r,o)}function qhe(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden"){if((t.flags&128)!==0){if(r=i!==null?i.baseLanes|n:n,e!==null){for(o=t.child=e.child,i=0;o!==null;)i=i|o.lanes|o.childLanes,o=o.sibling;t.childLanes=i&~r}else t.childLanes=0,t.child=null;return Lme(e,t,r,n)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&mP(t,i!==null?i.cachePool:null),i!==null?Ame(t,i):ZQ(),zhe(t);else return t.lanes=t.childLanes=536870912,Lme(e,t,i!==null?i.baseLanes|n:n,n)}else i!==null?(mP(t,i.cachePool),Ame(t,i),rh(t),t.memoizedState=null):(e!==null&&mP(t,null),ZQ(),rh(t));return ta(e,t,o,n),t.child}function Lme(e,t,n,r){var o=Lq();return o=o===null?null:{parent:Ai._currentValue,pool:o},t.memoizedState={baseLanes:n,cachePool:o},e!==null&&mP(t,null),ZQ(),zhe(t),e!==null&&nC(e,t,r,!0),null}function yP(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(re(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function XQ(e,t,n,r,o){return h9(t),n=Bq(e,t,n,r,void 0,o),r=zq(),e!==null&&!Wi?(Uq(e,t,o),Qf(e,t,o)):(Un&&r&&Pq(t),t.flags|=1,ta(e,t,n,o),t.child)}function Ome(e,t,n,r,o,i){return h9(t),t.updateQueue=null,n=ihe(t,r,n,o),ohe(e),r=zq(),e!==null&&!Wi?(Uq(e,t,i),Qf(e,t,i)):(Un&&r&&Pq(t),t.flags|=1,ta(e,t,n,i),t.child)}function Rme(e,t,n,r,o){if(h9(t),t.stateNode===null){var i=n6,a=n.contextType;typeof a=="object"&&a!==null&&(i=Ra(a)),i=new n(r,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=YQ,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=r,i.state=t.memoizedState,i.refs={},Oq(t),a=n.contextType,i.context=typeof a=="object"&&a!==null?Ra(a):n6,i.state=t.memoizedState,a=n.getDerivedStateFromProps,typeof a=="function"&&(oQ(t,n,a,r),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(a=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),a!==i.state&&YQ.enqueueReplaceState(i,i.state,null),kv(t,r,i,o),Mv(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){i=t.stateNode;var s=t.memoizedProps,l=y9(n,s);i.props=l;var c=i.context,u=n.contextType;a=n6,typeof u=="object"&&u!==null&&(a=Ra(u));var d=n.getDerivedStateFromProps;u=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function",s=t.pendingProps!==s,u||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s||c!==a)&&Eme(t,i,r,a),eh=!1;var f=t.memoizedState;i.state=f,kv(t,r,i,o),Mv(),c=t.memoizedState,s||f!==c||eh?(typeof d=="function"&&(oQ(t,n,d,r),c=t.memoizedState),(l=eh||kme(t,n,l,r,f,c,a))?(u||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=a,r=l):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,FQ(e,t),a=t.memoizedProps,u=y9(n,a),i.props=u,d=t.pendingProps,f=i.context,c=n.contextType,l=n6,typeof c=="object"&&c!==null&&(l=Ra(c)),s=n.getDerivedStateFromProps,(c=typeof s=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==d||f!==l)&&Eme(t,i,r,l),eh=!1,f=t.memoizedState,i.state=f,kv(t,r,i,o),Mv();var m=t.memoizedState;a!==d||f!==m||eh||e!==null&&e.dependencies!==null&&NP(e.dependencies)?(typeof s=="function"&&(oQ(t,n,s,r),m=t.memoizedState),(u=eh||kme(t,n,u,r,f,m,l)||e!==null&&e.dependencies!==null&&NP(e.dependencies))?(c||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,m,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,m,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),i.props=r,i.state=m,i.context=l,r=u):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return i=r,yP(e,t),r=(t.flags&128)!==0,i||r?(i=t.stateNode,n=r&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&r?(t.child=A6(t,e.child,null,o),t.child=A6(t,null,n,o)):ta(e,t,n,o),t.memoizedState=i.state,e=t.child):e=Qf(e,t,o),e}function jme(e,t,n,r){return tC(),t.flags|=256,ta(e,t,n,r),t.child}var iQ={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function aQ(e){return{baseLanes:e,cachePool:$0e()}}function sQ(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=du),e}function Ghe(e,t,n){var r=t.pendingProps,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(xi.current&2)!==0),a&&(o=!0,t.flags&=-129),a=(t.flags&32)!==0,t.flags&=-33,e===null){if(Un){if(o?nh(t):rh(t),Un){var s=To,l;if(l=s){e:{for(l=s,s=q1;l.nodeType!==8;){if(!s){s=null;break e}if(l=Dd(l.nextSibling),l===null){s=null;break e}}s=l}s!==null?(t.memoizedState={dehydrated:s,treeContext:c9!==null?{id:Bf,overflow:zf}:null,retryLane:536870912,hydrationErrors:null},l=pc(18,null,null,0),l.stateNode=s,l.return=t,t.child=l,ws=t,To=null,l=!0):l=!1}l||m9(t)}if(s=t.memoizedState,s!==null&&(s=s.dehydrated,s!==null))return uq(s)?t.lanes=32:t.lanes=536870912,null;Hf(t)}return s=r.children,r=r.fallback,o?(rh(t),o=t.mode,s=UP({mode:"hidden",children:s},o),r=l9(r,o,n,null),s.return=t,r.return=t,s.sibling=r,t.child=s,o=t.child,o.memoizedState=aQ(n),o.childLanes=sQ(e,a,n),t.memoizedState=iQ,r):(nh(t),JQ(t,s))}if(l=e.memoizedState,l!==null&&(s=l.dehydrated,s!==null)){if(i)t.flags&256?(nh(t),t.flags&=-257,t=lQ(e,t,n)):t.memoizedState!==null?(rh(t),t.child=e.child,t.flags|=128,t=null):(rh(t),o=r.fallback,s=t.mode,r=UP({mode:"visible",children:r.children},s),o=l9(o,s,n,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,A6(t,e.child,null,n),r=t.child,r.memoizedState=aQ(n),r.childLanes=sQ(e,a,n),t.memoizedState=iQ,t=o);else if(nh(t),uq(s)){if(a=s.nextSibling&&s.nextSibling.dataset,a)var c=a.dgst;a=c,r=Error(re(419)),r.stack="",r.digest=a,Uv({value:r,source:null,stack:null}),t=lQ(e,t,n)}else if(Wi||nC(e,t,n,!1),a=(n&e.childLanes)!==0,Wi||a){if(a=kr,a!==null&&(r=n&-n,r=(r&42)!==0?1:wq(r),r=(r&(a.suspendedLanes|n))!==0?0:r,r!==0&&r!==l.retryLane))throw l.retryLane=r,M6(e,r),gc(a,e,r),Zhe;s.data==="$?"||rq(),t=lQ(e,t,n)}else s.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,To=Dd(s.nextSibling),ws=t,Un=!0,u9=null,q1=!1,e!==null&&(su[lu++]=Bf,su[lu++]=zf,su[lu++]=c9,Bf=e.id,zf=e.overflow,c9=t),t=JQ(t,r.children),t.flags|=4096);return t}return o?(rh(t),o=r.fallback,s=t.mode,l=e.child,c=l.sibling,r=Wf(l,{mode:"hidden",children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,c!==null?o=Wf(c,o):(o=l9(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s===null?s=aQ(n):(l=s.cachePool,l!==null?(c=Ai._currentValue,l=l.parent!==c?{parent:c,pool:c}:l):l=$0e(),s={baseLanes:s.baseLanes|n,cachePool:l}),o.memoizedState=s,o.childLanes=sQ(e,a,n),t.memoizedState=iQ,r):(nh(t),n=e.child,e=n.sibling,n=Wf(n,{mode:"visible",children:r.children}),n.return=t,n.sibling=null,e!==null&&(a=t.deletions,a===null?(t.deletions=[e],t.flags|=16):a.push(e)),t.child=n,t.memoizedState=null,n)}function JQ(e,t){return t=UP({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function UP(e,t){return e=pc(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function lQ(e,t,n){return A6(t,e.child,null,n),e=JQ(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Bme(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),zQ(e.return,t,n)}function cQ(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Yhe(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(ta(e,t,r.children,n),r=xi.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Bme(e,n,t);else if(e.tag===19)Bme(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}switch(_r(xi,r),o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&jP(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),cQ(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&jP(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}cQ(t,!0,n,null,i);break;case"together":cQ(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Qf(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),bh|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(nC(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(re(153));if(t.child!==null){for(e=t.child,n=Wf(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Wf(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Yq(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&NP(e)))}function KEt(e,t,n){switch(t.tag){case 3:CP(t,t.stateNode.containerInfo),th(t,Ai,e.memoizedState.cache),tC();break;case 27:case 5:SQ(t);break;case 4:CP(t,t.stateNode.containerInfo);break;case 10:th(t,t.type,t.memoizedProps.value);break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(nh(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Ghe(e,t,n):(nh(t),e=Qf(e,t,n),e!==null?e.sibling:null);nh(t);break;case 19:var o=(e.flags&128)!==0;if(r=(n&t.childLanes)!==0,r||(nC(e,t,n,!1),r=(n&t.childLanes)!==0),o){if(r)return Yhe(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),_r(xi,xi.current),r)break;return null;case 22:case 23:return t.lanes=0,qhe(e,t,n);case 24:th(t,Ai,e.memoizedState.cache)}return Qf(e,t,n)}function Khe(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Wi=!0;else{if(!Yq(e,n)&&(t.flags&128)===0)return Wi=!1,KEt(e,t,n);Wi=(e.flags&131072)!==0}else Wi=!1,Un&&(t.flags&1048576)!==0&&J0e(t,PP,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var r=t.elementType,o=r._init;if(r=o(r._payload),t.type=r,typeof r=="function")Eq(r)?(e=y9(r,e),t.tag=1,t=Rme(null,t,r,e,n)):(t.tag=0,t=XQ(null,t,r,e,n));else{if(r!=null){if(o=r.$$typeof,o===hq){t.tag=11,t=Nme(null,t,r,e,n);break e}else if(o===gq){t.tag=14,t=Dme(null,t,r,e,n);break e}}throw t=IQ(r)||r,Error(re(306,t,""))}}return t;case 0:return XQ(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,o=y9(r,t.pendingProps),Rme(e,t,r,o,n);case 3:e:{if(CP(t,t.stateNode.containerInfo),e===null)throw Error(re(387));r=t.pendingProps;var i=t.memoizedState;o=i.element,FQ(e,t),kv(t,r,null,n);var a=t.memoizedState;if(r=a.cache,th(t,Ai,r),r!==i.cache&&UQ(t,[Ai],n,!0),Mv(),r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=jme(e,t,r,n);break e}else if(r!==o){o=uu(Error(re(424)),t),Uv(o),t=jme(e,t,r,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(To=Dd(e.firstChild),ws=t,Un=!0,u9=null,q1=!0,n=Bhe(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(tC(),r===o){t=Qf(e,t,n);break e}ta(e,t,r,n)}t=t.child}return t;case 26:return yP(e,t),e===null?(n=n0e(t.type,null,t.pendingProps,null))?t.memoizedState=n:Un||(n=t.type,e=t.pendingProps,r=qP(ch.current).createElement(n),r[Oa]=t,r[al]=e,ra(r,n,e),Hi(r),t.stateNode=r):t.memoizedState=n0e(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return SQ(t),e===null&&Un&&(r=t.stateNode=R2e(t.type,t.pendingProps,ch.current),ws=t,q1=!0,o=To,xh(t.type)?(dq=o,To=Dd(r.firstChild)):To=o),ta(e,t,t.pendingProps.children,n),yP(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Un&&((o=r=To)&&(r=xPt(r,t.type,t.pendingProps,q1),r!==null?(t.stateNode=r,ws=t,To=Dd(r.firstChild),q1=!1,o=!0):o=!1),o||m9(t)),SQ(t),o=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,r=i.children,lq(o,i)?r=null:a!==null&&lq(o,a)&&(t.flags|=32),t.memoizedState!==null&&(o=Bq(e,t,WEt,null,null,n),Qv._currentValue=o),yP(e,t),ta(e,t,r,n),t.child;case 6:return e===null&&Un&&((e=n=To)&&(n=vPt(n,t.pendingProps,q1),n!==null?(t.stateNode=n,ws=t,To=null,e=!0):e=!1),e||m9(t)),null;case 13:return Ghe(e,t,n);case 4:return CP(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=A6(t,null,r,n):ta(e,t,r,n),t.child;case 11:return Nme(e,t,t.type,t.pendingProps,n);case 7:return ta(e,t,t.pendingProps,n),t.child;case 8:return ta(e,t,t.pendingProps.children,n),t.child;case 12:return ta(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,th(t,t.type,r.value),ta(e,t,r.children,n),t.child;case 9:return o=t.type._context,r=t.pendingProps.children,h9(t),o=Ra(o),r=r(o),t.flags|=1,ta(e,t,r,n),t.child;case 14:return Dme(e,t,t.type,t.pendingProps,n);case 15:return Qhe(e,t,t.type,t.pendingProps,n);case 19:return Yhe(e,t,n);case 31:return r=t.pendingProps,n=t.mode,r={mode:r.mode,children:r.children},e===null?(n=UP(r,n),n.ref=t.ref,t.child=n,n.return=t,t=n):(n=Wf(e.child,r),n.ref=t.ref,t.child=n,n.return=t,t=n),t;case 22:return qhe(e,t,n);case 24:return h9(t),r=Ra(Ai),e===null?(o=Lq(),o===null&&(o=kr,i=Dq(),o.pooledCache=i,i.refCount++,i!==null&&(o.pooledCacheLanes|=n),o=i),t.memoizedState={parent:r,cache:o},Oq(t),th(t,Ai,o)):((e.lanes&n)!==0&&(FQ(e,t),kv(t,null,null,n),Mv()),o=e.memoizedState,i=t.memoizedState,o.parent!==r?(o={parent:r,cache:r},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),th(t,Ai,r)):(r=i.cache,th(t,Ai,r),r!==o.cache&&UQ(t,[Ai],n,!0))),ta(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(re(156,t.tag))}function Lf(e){e.flags|=4}function zme(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!z2e(t)){if(t=pu.current,t!==null&&((wn&4194048)===wn?X1!==null:(wn&62914560)!==wn&&(wn&536870912)===0||t!==X1))throw Tv=WQ,ehe;e.flags|=8192}}function rP(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?x0e():536870912,e.lanes|=t,x6|=t)}function fv(e,t){if(!Un)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function co(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&65011712,r|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function XEt(e,t,n){var r=t.pendingProps;switch(Nq(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return co(t),null;case 1:return co(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ff(Ai),m6(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(dv(t)?Lf(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,mme())),co(t),null;case 26:return n=t.memoizedState,e===null?(Lf(t),n!==null?(co(t),zme(t,n)):(co(t),t.flags&=-16777217)):n?n!==e.memoizedState?(Lf(t),co(t),zme(t,n)):(co(t),t.flags&=-16777217):(e.memoizedProps!==r&&Lf(t),co(t),t.flags&=-16777217),null;case 27:IP(t),n=ch.current;var o=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Lf(t);else{if(!r){if(t.stateNode===null)throw Error(re(166));return co(t),null}e=Y1.current,dv(t)?pme(t,e):(e=R2e(o,r,n),t.stateNode=e,Lf(t))}return co(t),null;case 5:if(IP(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Lf(t);else{if(!r){if(t.stateNode===null)throw Error(re(166));return co(t),null}if(e=Y1.current,dv(t))pme(t,e);else{switch(o=qP(ch.current),e){case 1:e=o.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=o.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=o.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=o.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof r.is=="string"?o.createElement("select",{is:r.is}):o.createElement("select"),r.multiple?e.multiple=!0:r.size&&(e.size=r.size);break;default:e=typeof r.is=="string"?o.createElement(n,{is:r.is}):o.createElement(n)}}e[Oa]=t,e[al]=r;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)e.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=e;e:switch(ra(e,n,r),n){case"button":case"input":case"select":case"textarea":e=!!r.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Lf(t)}}return co(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Lf(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(re(166));if(e=ch.current,dv(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,o=ws,o!==null)switch(o.tag){case 27:case 5:r=o.memoizedProps}e[Oa]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||D2e(e.nodeValue,n)),e||m9(t)}else e=qP(e).createTextNode(r),e[Oa]=t,t.stateNode=e}return co(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=dv(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(re(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(re(317));o[Oa]=t}else tC(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;co(t),o=!1}else o=mme(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(Hf(t),t):(Hf(t),null)}if(Hf(t),(t.flags&128)!==0)return t.lanes=n,t;if(n=r!==null,e=e!==null&&e.memoizedState!==null,n){r=t.child,o=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(o=r.alternate.memoizedState.cachePool.pool);var i=null;r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==o&&(r.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),rP(t,t.updateQueue),co(t),null;case 4:return m6(),e===null&&nG(t.stateNode.containerInfo),co(t),null;case 10:return Ff(t.type),co(t),null;case 19:if(Fi(xi),o=t.memoizedState,o===null)return co(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)fv(o,!1);else{if(So!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=jP(e),i!==null){for(t.flags|=128,fv(o,!1),e=i.updateQueue,t.updateQueue=e,rP(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)X0e(n,e),n=n.sibling;return _r(xi,xi.current&1|2),t.child}e=e.sibling}o.tail!==null&&K1()>WP&&(t.flags|=128,r=!0,fv(o,!1),t.lanes=4194304)}else{if(!r)if(e=jP(i),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,rP(t,e),fv(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!Un)return co(t),null}else 2*K1()-o.renderingStartTime>WP&&n!==536870912&&(t.flags|=128,r=!0,fv(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(e=o.last,e!==null?e.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=K1(),t.sibling=null,e=xi.current,_r(xi,r?e&1|2:e&1),t):(co(t),null);case 22:case 23:return Hf(t),Rq(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(n&536870912)!==0&&(t.flags&128)===0&&(co(t),t.subtreeFlags&6&&(t.flags|=8192)):co(t),n=t.updateQueue,n!==null&&rP(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&Fi(d9),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ff(Ai),co(t),null;case 25:return null;case 30:return null}throw Error(re(156,t.tag))}function JEt(e,t){switch(Nq(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ff(Ai),m6(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return IP(t),null;case 13:if(Hf(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(re(340));tC()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Fi(xi),null;case 4:return m6(),null;case 10:return Ff(t.type),null;case 22:case 23:return Hf(t),Rq(),e!==null&&Fi(d9),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ff(Ai),null;case 25:return null;default:return null}}function Xhe(e,t){switch(Nq(t),t.tag){case 3:Ff(Ai),m6();break;case 26:case 27:case 5:IP(t);break;case 4:m6();break;case 13:Hf(t);break;case 19:Fi(xi);break;case 10:Ff(t.type);break;case 22:case 23:Hf(t),Rq(),e!==null&&Fi(d9);break;case 24:Ff(Ai)}}function sC(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var o=r.next;n=o;do{if((n.tag&e)===e){r=void 0;var i=n.create,a=n.inst;r=i(),a.destroy=r}n=n.next}while(n!==o)}}catch(s){br(t,t.return,s)}}function wh(e,t,n){try{var r=t.updateQueue,o=r!==null?r.lastEffect:null;if(o!==null){var i=o.next;r=i;do{if((r.tag&e)===e){var a=r.inst,s=a.destroy;if(s!==void 0){a.destroy=void 0,o=t;var l=n,c=s;try{c()}catch(u){br(o,l,u)}}}r=r.next}while(r!==i)}}catch(u){br(t,t.return,u)}}function Jhe(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{rhe(t,n)}catch(r){br(e,e.return,r)}}}function _he(e,t,n){n.props=y9(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){br(e,t,r)}}function Pv(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n=="function"?e.refCleanup=n(r):n.current=r}}catch(o){br(e,t,o)}}function G1(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(o){br(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(o){br(e,t,o)}else n.current=null}function $he(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(o){br(e,e.return,o)}}function uQ(e,t,n){try{var r=e.stateNode;gPt(r,e.type,n,t),r[al]=t}catch(o){br(e,e.return,o)}}function e2e(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&xh(e.type)||e.tag===4}function dQ(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||e2e(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&xh(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function _Q(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=dN));else if(r!==4&&(r===27&&xh(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(_Q(e,t,n),e=e.sibling;e!==null;)_Q(e,t,n),e=e.sibling}function HP(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&xh(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(HP(e,t,n),e=e.sibling;e!==null;)HP(e,t,n),e=e.sibling}function t2e(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);ra(t,r,n),t[Oa]=e,t[al]=n}catch(i){br(e,e.return,i)}}var Rf=!1,Wo=!1,pQ=!1,Ume=typeof WeakSet=="function"?WeakSet:Set,Ui=null;function _Et(e,t){if(e=e.containerInfo,aq=XP,e=F0e(e),Sq(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var m;d!==n||o!==0&&d.nodeType!==3||(s=a+o),d!==i||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(m=d.firstChild)!==null;)f=d,d=m;for(;;){if(d===e)break t;if(f===n&&++c===o&&(s=a),f===i&&++u===r&&(l=a),(m=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=m}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(sq={focusedElem:e,selectionRange:n},XP=!1,Ui=t;Ui!==null;)if(t=Ui,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,Ui=e;else for(;Ui!==null;){switch(t=Ui,i=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,n=t,o=i.memoizedProps,i=i.memoizedState,r=n.stateNode;try{var h=y9(n.type,o,n.elementType===n.type);e=r.getSnapshotBeforeUpdate(h,i),r.__reactInternalSnapshotBeforeUpdate=e}catch(g){br(n,n.return,g)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)cq(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":cq(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(re(163))}if(e=t.sibling,e!==null){e.return=t.return,Ui=e;break}Ui=t.return}}function n2e(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:J0(e,n),r&4&&sC(5,n);break;case 1:if(J0(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(a){br(n,n.return,a)}else{var o=y9(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(a){br(n,n.return,a)}}r&64&&Jhe(n),r&512&&Pv(n,n.return);break;case 3:if(J0(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{rhe(e,t)}catch(a){br(n,n.return,a)}}break;case 27:t===null&&r&4&&t2e(n);case 26:case 5:J0(e,n),t===null&&r&4&&$he(n),r&512&&Pv(n,n.return);break;case 12:J0(e,n);break;case 13:J0(e,n),r&4&&i2e(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=sPt.bind(null,n),CPt(e,n))));break;case 22:if(r=n.memoizedState!==null||Rf,!r){t=t!==null&&t.memoizedState!==null||Wo,o=Rf;var i=Wo;Rf=r,(Wo=t)&&!i?_0(e,n,(n.subtreeFlags&8772)!==0):J0(e,n),Rf=o,Wo=i}break;case 30:break;default:J0(e,n)}}function r2e(e){var t=e.alternate;t!==null&&(e.alternate=null,r2e(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Aq(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Jr=null,ol=!1;function Of(e,t,n){for(n=n.child;n!==null;)o2e(e,t,n),n=n.sibling}function o2e(e,t,n){if(fc&&typeof fc.onCommitFiberUnmount=="function")try{fc.onCommitFiberUnmount(Xv,n)}catch{}switch(n.tag){case 26:Wo||G1(n,t),Of(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Wo||G1(n,t);var r=Jr,o=ol;xh(n.type)&&(Jr=n.stateNode,ol=!1),Of(e,t,n),Ov(n.stateNode),Jr=r,ol=o;break;case 5:Wo||G1(n,t);case 6:if(r=Jr,o=ol,Jr=null,Of(e,t,n),Jr=r,ol=o,Jr!==null)if(ol)try{(Jr.nodeType===9?Jr.body:Jr.nodeName==="HTML"?Jr.ownerDocument.body:Jr).removeChild(n.stateNode)}catch(i){br(n,t,i)}else try{Jr.removeChild(n.stateNode)}catch(i){br(n,t,i)}break;case 18:Jr!==null&&(ol?(e=Jr,$me(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Yv(e)):$me(Jr,n.stateNode));break;case 4:r=Jr,o=ol,Jr=n.stateNode.containerInfo,ol=!0,Of(e,t,n),Jr=r,ol=o;break;case 0:case 11:case 14:case 15:Wo||wh(2,n,t),Wo||wh(4,n,t),Of(e,t,n);break;case 1:Wo||(G1(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"&&_he(n,t,r)),Of(e,t,n);break;case 21:Of(e,t,n);break;case 22:Wo=(r=Wo)||n.memoizedState!==null,Of(e,t,n),Wo=r;break;default:Of(e,t,n)}}function i2e(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Yv(e)}catch(n){br(t,t.return,n)}}function $Et(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ume),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ume),t;default:throw Error(re(435,e.tag))}}function fQ(e,t){var n=$Et(e);t.forEach(function(r){var o=lPt.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}function cc(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r],i=e,a=t,s=a;e:for(;s!==null;){switch(s.tag){case 27:if(xh(s.type)){Jr=s.stateNode,ol=!1;break e}break;case 5:Jr=s.stateNode,ol=!1;break e;case 3:case 4:Jr=s.stateNode.containerInfo,ol=!0;break e}s=s.return}if(Jr===null)throw Error(re(160));o2e(i,a,o),Jr=null,ol=!1,i=o.alternate,i!==null&&(i.return=null),o.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)a2e(t,e),t=t.sibling}var Nd=null;function a2e(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:cc(t,e),uc(e),r&4&&(wh(3,e,e.return),sC(3,e),wh(5,e,e.return));break;case 1:cc(t,e),uc(e),r&512&&(Wo||n===null||G1(n,n.return)),r&64&&Rf&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var o=Nd;if(cc(t,e),uc(e),r&512&&(Wo||n===null||G1(n,n.return)),r&4){var i=n!==null?n.memoizedState:null;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){e:{r=e.type,n=e.memoizedProps,o=o.ownerDocument||o;t:switch(r){case"title":i=o.getElementsByTagName("title")[0],(!i||i[$v]||i[Oa]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=o.createElement(r),o.head.insertBefore(i,o.querySelector("head > title"))),ra(i,r,n),i[Oa]=e,Hi(i),r=i;break e;case"link":var a=o0e("link","href",o).get(r+(n.href||""));if(a){for(var s=0;s<a.length;s++)if(i=a[s],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){a.splice(s,1);break t}}i=o.createElement(r),ra(i,r,n),o.head.appendChild(i);break;case"meta":if(a=o0e("meta","content",o).get(r+(n.content||""))){for(s=0;s<a.length;s++)if(i=a[s],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){a.splice(s,1);break t}}i=o.createElement(r),ra(i,r,n),o.head.appendChild(i);break;default:throw Error(re(468,r))}i[Oa]=e,Hi(i),r=i}e.stateNode=r}else i0e(o,e.type,e.stateNode);else e.stateNode=r0e(o,r,e.memoizedProps);else i!==r?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,r===null?i0e(o,e.type,e.stateNode):r0e(o,r,e.memoizedProps)):r===null&&e.stateNode!==null&&uQ(e,e.memoizedProps,n.memoizedProps)}break;case 27:cc(t,e),uc(e),r&512&&(Wo||n===null||G1(n,n.return)),n!==null&&r&4&&uQ(e,e.memoizedProps,n.memoizedProps);break;case 5:if(cc(t,e),uc(e),r&512&&(Wo||n===null||G1(n,n.return)),e.flags&32){o=e.stateNode;try{g6(o,"")}catch(m){br(e,e.return,m)}}r&4&&e.stateNode!=null&&(o=e.memoizedProps,uQ(e,o,n!==null?n.memoizedProps:o)),r&1024&&(pQ=!0);break;case 6:if(cc(t,e),uc(e),r&4){if(e.stateNode===null)throw Error(re(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(m){br(e,e.return,m)}}break;case 3:if(AP=null,o=Nd,Nd=GP(t.containerInfo),cc(t,e),Nd=o,uc(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Yv(t.containerInfo)}catch(m){br(e,e.return,m)}pQ&&(pQ=!1,s2e(e));break;case 4:r=Nd,Nd=GP(e.stateNode.containerInfo),cc(t,e),uc(e),Nd=r;break;case 12:cc(t,e),uc(e);break;case 13:cc(t,e),uc(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($q=K1()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fQ(e,r)));break;case 22:o=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,c=Rf,u=Wo;if(Rf=c||o,Wo=u||l,cc(t,e),Wo=u,Rf=c,uc(e),r&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(n===null||l||Rf||Wo||a9(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(i=l.stateNode,o)a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none";else{s=l.stateNode;var d=l.memoizedProps.style,f=d!=null&&d.hasOwnProperty("display")?d.display:null;s.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(m){br(l,l.return,m)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=o?"":l.memoizedProps}catch(m){br(l,l.return,m)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,fQ(e,n))));break;case 19:cc(t,e),uc(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fQ(e,r)));break;case 30:break;case 21:break;default:cc(t,e),uc(e)}}function uc(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(e2e(r)){n=r;break}r=r.return}if(n==null)throw Error(re(160));switch(n.tag){case 27:var o=n.stateNode,i=dQ(e);HP(e,i,o);break;case 5:var a=n.stateNode;n.flags&32&&(g6(a,""),n.flags&=-33);var s=dQ(e);HP(e,s,a);break;case 3:case 4:var l=n.stateNode.containerInfo,c=dQ(e);_Q(e,c,l);break;default:throw Error(re(161))}}catch(u){br(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function s2e(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;s2e(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function J0(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)n2e(e,t.alternate,t),t=t.sibling}function a9(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:wh(4,t,t.return),a9(t);break;case 1:G1(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&_he(t,t.return,n),a9(t);break;case 27:Ov(t.stateNode);case 26:case 5:G1(t,t.return),a9(t);break;case 22:t.memoizedState===null&&a9(t);break;case 30:a9(t);break;default:a9(t)}e=e.sibling}}function _0(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,o=e,i=t,a=i.flags;switch(i.tag){case 0:case 11:case 15:_0(o,i,n),sC(4,i);break;case 1:if(_0(o,i,n),r=i,o=r.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(c){br(r,r.return,c)}if(r=i,o=r.updateQueue,o!==null){var s=r.stateNode;try{var l=o.shared.hiddenCallbacks;if(l!==null)for(o.shared.hiddenCallbacks=null,o=0;o<l.length;o++)nhe(l[o],s)}catch(c){br(r,r.return,c)}}n&&a&64&&Jhe(i),Pv(i,i.return);break;case 27:t2e(i);case 26:case 5:_0(o,i,n),n&&r===null&&a&4&&$he(i),Pv(i,i.return);break;case 12:_0(o,i,n);break;case 13:_0(o,i,n),n&&a&4&&i2e(o,i);break;case 22:i.memoizedState===null&&_0(o,i,n),Pv(i,i.return);break;case 30:break;default:_0(o,i,n)}t=t.sibling}}function Kq(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&rC(n))}function Xq(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&rC(e))}function Q1(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)l2e(e,t,n,r),t=t.sibling}function l2e(e,t,n,r){var o=t.flags;switch(t.tag){case 0:case 11:case 15:Q1(e,t,n,r),o&2048&&sC(9,t);break;case 1:Q1(e,t,n,r);break;case 3:Q1(e,t,n,r),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&rC(e)));break;case 12:if(o&2048){Q1(e,t,n,r),e=t.stateNode;try{var i=t.memoizedProps,a=i.id,s=i.onPostCommit;typeof s=="function"&&s(a,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(l){br(t,t.return,l)}}else Q1(e,t,n,r);break;case 13:Q1(e,t,n,r);break;case 23:break;case 22:i=t.stateNode,a=t.alternate,t.memoizedState!==null?i._visibility&2?Q1(e,t,n,r):Nv(e,t):i._visibility&2?Q1(e,t,n,r):(i._visibility|=2,qy(e,t,n,r,(t.subtreeFlags&10256)!==0)),o&2048&&Kq(a,t);break;case 24:Q1(e,t,n,r),o&2048&&Xq(t.alternate,t);break;default:Q1(e,t,n,r)}}function qy(e,t,n,r,o){for(o=o&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var i=e,a=t,s=n,l=r,c=a.flags;switch(a.tag){case 0:case 11:case 15:qy(i,a,s,l,o),sC(8,a);break;case 23:break;case 22:var u=a.stateNode;a.memoizedState!==null?u._visibility&2?qy(i,a,s,l,o):Nv(i,a):(u._visibility|=2,qy(i,a,s,l,o)),o&&c&2048&&Kq(a.alternate,a);break;case 24:qy(i,a,s,l,o),o&&c&2048&&Xq(a.alternate,a);break;default:qy(i,a,s,l,o)}t=t.sibling}}function Nv(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,o=r.flags;switch(r.tag){case 22:Nv(n,r),o&2048&&Kq(r.alternate,r);break;case 24:Nv(n,r),o&2048&&Xq(r.alternate,r);break;default:Nv(n,r)}t=t.sibling}}var Av=8192;function Vy(e){if(e.subtreeFlags&Av)for(e=e.child;e!==null;)c2e(e),e=e.sibling}function c2e(e){switch(e.tag){case 26:Vy(e),e.flags&Av&&e.memoizedState!==null&&jPt(Nd,e.memoizedState,e.memoizedProps);break;case 5:Vy(e);break;case 3:case 4:var t=Nd;Nd=GP(e.stateNode.containerInfo),Vy(e),Nd=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=Av,Av=16777216,Vy(e),Av=t):Vy(e));break;default:Vy(e)}}function u2e(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function mv(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Ui=r,p2e(r,e)}u2e(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)d2e(e),e=e.sibling}function d2e(e){switch(e.tag){case 0:case 11:case 15:mv(e),e.flags&2048&&wh(9,e,e.return);break;case 3:mv(e);break;case 12:mv(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,wP(e)):mv(e);break;default:mv(e)}}function wP(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Ui=r,p2e(r,e)}u2e(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:wh(8,t,t.return),wP(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,wP(t));break;default:wP(t)}e=e.sibling}}function p2e(e,t){for(;Ui!==null;){var n=Ui;switch(n.tag){case 0:case 11:case 15:wh(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:rC(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Ui=r;else e:for(n=e;Ui!==null;){r=Ui;var o=r.sibling,i=r.return;if(r2e(r),r===n){Ui=null;break e}if(o!==null){o.return=i,Ui=o;break e}Ui=i}}}var ePt={getCacheForType:function(e){var t=Ra(Ai),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n}},tPt=typeof WeakMap=="function"?WeakMap:Map,tr=0,kr=null,en=null,wn=0,er=0,dc=null,sh=!1,k6=!1,Jq=!1,qf=0,So=0,bh=0,p9=0,_q=0,du=0,x6=0,Dv=null,il=null,$Q=!1,$q=0,WP=1/0,FP=null,ph=null,na=0,fh=null,v6=null,f6=0,eq=0,tq=null,f2e=null,Lv=0,nq=null;function hc(){if((tr&2)!==0&&wn!==0)return wn&-wn;if(dt.T!==null){var e=y6;return e!==0?e:tG()}return I0e()}function m2e(){du===0&&(du=(wn&536870912)===0||Un?A0e():536870912);var e=pu.current;return e!==null&&(e.flags|=32),du}function gc(e,t,n){(e===kr&&(er===2||er===9)||e.cancelPendingCommit!==null)&&(C6(e,0),lh(e,wn,du,!1)),_v(e,n),((tr&2)===0||e!==kr)&&(e===kr&&((tr&2)===0&&(p9|=n),So===4&&lh(e,wn,du,!1)),_1(e))}function h2e(e,t,n){if((tr&6)!==0)throw Error(re(327));var r=!n&&(t&124)===0&&(t&e.expiredLanes)===0||Jv(e,t),o=r?oPt(e,t):mQ(e,t,!0),i=r;do{if(o===0){k6&&!r&&lh(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!nPt(n)){o=mQ(e,t,!1),i=!1;continue}if(o===2){if(i=t,e.errorRecoveryDisabledLanes&i)var a=0;else a=e.pendingLanes&-536870913,a=a!==0?a:a&536870912?536870912:0;if(a!==0){t=a;e:{var s=e;o=Dv;var l=s.current.memoizedState.isDehydrated;if(l&&(C6(s,a).flags|=256),a=mQ(s,a,!1),a!==2){if(Jq&&!l){s.errorRecoveryDisabledLanes|=i,p9|=i,o=4;break e}i=il,il=o,i!==null&&(il===null?il=i:il.push.apply(il,i))}o=a}if(i=!1,o!==2)continue}}if(o===1){C6(e,0),lh(e,t,0,!0);break}e:{switch(r=e,i=o,i){case 0:case 1:throw Error(re(345));case 4:if((t&4194048)!==t)break;case 6:lh(r,t,du,!sh);break e;case 2:il=null;break;case 3:case 5:break;default:throw Error(re(329))}if((t&62914560)===t&&(o=$q+300-K1(),10<o)){if(lh(r,t,du,!sh),_P(r,0,!0)!==0)break e;r.timeoutHandle=O2e(Hme.bind(null,r,n,il,FP,$Q,t,du,p9,x6,sh,i,2,-0,0),o);break e}Hme(r,n,il,FP,$Q,t,du,p9,x6,sh,i,0,-0,0)}}break}while(!0);_1(e)}function Hme(e,t,n,r,o,i,a,s,l,c,u,d,f,m){if(e.timeoutHandle=-1,d=t.subtreeFlags,(d&8192||(d&16785408)===16785408)&&(Zv={stylesheets:null,count:0,unsuspend:RPt},c2e(t),d=BPt(),d!==null)){e.cancelPendingCommit=d(Fme.bind(null,e,t,i,n,r,o,a,s,l,u,1,f,m)),lh(e,i,a,!c);return}Fme(e,t,i,n,r,o,a,s,l)}function nPt(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!yc(i(),o))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function lh(e,t,n,r){t&=~_q,t&=~p9,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var o=t;0<o;){var i=31-mc(o),a=1<<i;r[i]=-1,o&=~a}n!==0&&v0e(e,n,t)}function lN(){return(tr&6)===0?(lC(0,!1),!1):!0}function eG(){if(en!==null){if(er===0)var e=en.return;else e=en,Uf=x9=null,Hq(e),p6=null,Wv=0,e=en;for(;e!==null;)Xhe(e.alternate,e),e=e.return;en=null}}function C6(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,wPt(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),eG(),kr=e,en=n=Wf(e.current,null),wn=t,er=0,dc=null,sh=!1,k6=Jv(e,t),Jq=!1,x6=du=_q=p9=bh=So=0,il=Dv=null,$Q=!1,(t&8)!==0&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var o=31-mc(r),i=1<<o;t|=e[o],r&=~i}return qf=t,nN(),n}function g2e(e,t){Yt=null,dt.H=RP,t===oC||t===oN?(t=wme(),er=3):t===ehe?(t=wme(),er=4):er=t===Zhe?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,dc=t,en===null&&(So=1,zP(e,uu(t,e.current)))}function y2e(){var e=dt.H;return dt.H=RP,e===null?RP:e}function w2e(){var e=dt.A;return dt.A=ePt,e}function rq(){So=4,sh||(wn&4194048)!==wn&&pu.current!==null||(k6=!0),(bh&134217727)===0&&(p9&134217727)===0||kr===null||lh(kr,wn,du,!1)}function mQ(e,t,n){var r=tr;tr|=2;var o=y2e(),i=w2e();(kr!==e||wn!==t)&&(FP=null,C6(e,t)),t=!1;var a=So;e:do try{if(er!==0&&en!==null){var s=en,l=dc;switch(er){case 8:eG(),a=6;break e;case 3:case 2:case 9:case 6:pu.current===null&&(t=!0);var c=er;if(er=0,dc=null,i6(e,s,l,c),n&&k6){a=0;break e}break;default:c=er,er=0,dc=null,i6(e,s,l,c)}}rPt(),a=So;break}catch(u){g2e(e,u)}while(!0);return t&&e.shellSuspendCounter++,Uf=x9=null,tr=r,dt.H=o,dt.A=i,en===null&&(kr=null,wn=0,nN()),a}function rPt(){for(;en!==null;)b2e(en)}function oPt(e,t){var n=tr;tr|=2;var r=y2e(),o=w2e();kr!==e||wn!==t?(FP=null,WP=K1()+500,C6(e,t)):k6=Jv(e,t);e:do try{if(er!==0&&en!==null){t=en;var i=dc;t:switch(er){case 1:er=0,dc=null,i6(e,t,i,1);break;case 2:case 9:if(yme(i)){er=0,dc=null,Wme(t);break}t=function(){er!==2&&er!==9||kr!==e||(er=7),_1(e)},i.then(t,t);break e;case 3:er=7;break e;case 4:er=5;break e;case 7:yme(i)?(er=0,dc=null,Wme(t)):(er=0,dc=null,i6(e,t,i,7));break;case 5:var a=null;switch(en.tag){case 26:a=en.memoizedState;case 5:case 27:var s=en;if(!a||z2e(a)){er=0,dc=null;var l=s.sibling;if(l!==null)en=l;else{var c=s.return;c!==null?(en=c,cN(c)):en=null}break t}}er=0,dc=null,i6(e,t,i,5);break;case 6:er=0,dc=null,i6(e,t,i,6);break;case 8:eG(),So=6;break e;default:throw Error(re(462))}}iPt();break}catch(u){g2e(e,u)}while(!0);return Uf=x9=null,dt.H=r,dt.A=o,tr=n,en!==null?0:(kr=null,wn=0,nN(),So)}function iPt(){for(;en!==null&&!Mkt();)b2e(en)}function b2e(e){var t=Khe(e.alternate,e,qf);e.memoizedProps=e.pendingProps,t===null?cN(e):en=t}function Wme(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Ome(n,t,t.pendingProps,t.type,void 0,wn);break;case 11:t=Ome(n,t,t.pendingProps,t.type.render,t.ref,wn);break;case 5:Hq(t);default:Xhe(n,t),t=en=X0e(t,qf),t=Khe(n,t,qf)}e.memoizedProps=e.pendingProps,t===null?cN(e):en=t}function i6(e,t,n,r){Uf=x9=null,Hq(t),p6=null,Wv=0;var o=t.return;try{if(YEt(e,o,t,n,wn)){So=1,zP(e,uu(n,e.current)),en=null;return}}catch(i){if(o!==null)throw en=o,i;So=1,zP(e,uu(n,e.current)),en=null;return}t.flags&32768?(Un||r===1?e=!0:k6||(wn&536870912)!==0?e=!1:(sh=e=!0,(r===2||r===9||r===3||r===6)&&(r=pu.current,r!==null&&r.tag===13&&(r.flags|=16384))),A2e(t,e)):cN(t)}function cN(e){var t=e;do{if((t.flags&32768)!==0){A2e(t,sh);return}e=t.return;var n=XEt(t.alternate,t,qf);if(n!==null){en=n;return}if(t=t.sibling,t!==null){en=t;return}en=t=e}while(t!==null);So===0&&(So=5)}function A2e(e,t){do{var n=JEt(e.alternate,e);if(n!==null){n.flags&=32767,en=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){en=e;return}en=e=n}while(e!==null);So=6,en=null}function Fme(e,t,n,r,o,i,a,s,l){e.cancelPendingCommit=null;do uN();while(na!==0);if((tr&6)!==0)throw Error(re(327));if(t!==null){if(t===e.current)throw Error(re(177));if(i=t.lanes|t.childLanes,i|=Mq,Bkt(e,n,i,a,s,l),e===kr&&(en=kr=null,wn=0),v6=t,fh=e,f6=n,eq=i,tq=o,f2e=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,cPt(TP,function(){return T2e(!0),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=dt.T,dt.T=null,o=Hn.p,Hn.p=2,a=tr,tr|=4;try{_Et(e,t,n)}finally{tr=a,Hn.p=o,dt.T=r}}na=1,x2e(),v2e(),C2e()}}function x2e(){if(na===1){na=0;var e=fh,t=v6,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=dt.T,dt.T=null;var r=Hn.p;Hn.p=2;var o=tr;tr|=4;try{a2e(t,e);var i=sq,a=F0e(e.containerInfo),s=i.focusedElem,l=i.selectionRange;if(a!==s&&s&&s.ownerDocument&&W0e(s.ownerDocument.documentElement,s)){if(l!==null&&Sq(s)){var c=l.start,u=l.end;if(u===void 0&&(u=c),"selectionStart"in s)s.selectionStart=c,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var m=f.getSelection(),h=s.textContent.length,g=Math.min(l.start,h),w=l.end===void 0?g:Math.min(l.end,h);!m.extend&&g>w&&(a=w,w=g,g=a);var b=cme(s,g),A=cme(s,w);if(b&&A&&(m.rangeCount!==1||m.anchorNode!==b.node||m.anchorOffset!==b.offset||m.focusNode!==A.node||m.focusOffset!==A.offset)){var x=d.createRange();x.setStart(b.node,b.offset),m.removeAllRanges(),g>w?(m.addRange(x),m.extend(A.node,A.offset)):(x.setEnd(A.node,A.offset),m.addRange(x))}}}}for(d=[],m=s;m=m.parentNode;)m.nodeType===1&&d.push({element:m,left:m.scrollLeft,top:m.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<d.length;s++){var v=d[s];v.element.scrollLeft=v.left,v.element.scrollTop=v.top}}XP=!!aq,sq=aq=null}finally{tr=o,Hn.p=r,dt.T=n}}e.current=t,na=2}}function v2e(){if(na===2){na=0;var e=fh,t=v6,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=dt.T,dt.T=null;var r=Hn.p;Hn.p=2;var o=tr;tr|=4;try{n2e(e,t.alternate,t)}finally{tr=o,Hn.p=r,dt.T=n}}na=3}}function C2e(){if(na===4||na===3){na=0,kkt();var e=fh,t=v6,n=f6,r=f2e;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?na=5:(na=0,v6=fh=null,I2e(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(ph=null),bq(n),t=t.stateNode,fc&&typeof fc.onCommitFiberRoot=="function")try{fc.onCommitFiberRoot(Xv,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=dt.T,o=Hn.p,Hn.p=2,dt.T=null;try{for(var i=e.onRecoverableError,a=0;a<r.length;a++){var s=r[a];i(s.value,{componentStack:s.stack})}}finally{dt.T=t,Hn.p=o}}(f6&3)!==0&&uN(),_1(e),o=e.pendingLanes,(n&4194090)!==0&&(o&42)!==0?e===nq?Lv++:(Lv=0,nq=e):Lv=0,lC(0,!1)}}function I2e(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,rC(t)))}function uN(e){return x2e(),v2e(),C2e(),T2e(e)}function T2e(){if(na!==5)return!1;var e=fh,t=eq;eq=0;var n=bq(f6),r=dt.T,o=Hn.p;try{Hn.p=32>n?32:n,dt.T=null,n=tq,tq=null;var i=fh,a=f6;if(na=0,v6=fh=null,f6=0,(tr&6)!==0)throw Error(re(331));var s=tr;if(tr|=4,d2e(i.current),l2e(i,i.current,a,n),tr=s,lC(0,!1),fc&&typeof fc.onPostCommitFiberRoot=="function")try{fc.onPostCommitFiberRoot(Xv,i)}catch{}return!0}finally{Hn.p=o,dt.T=r,I2e(e,t)}}function Vme(e,t,n){t=uu(n,t),t=KQ(e.stateNode,t,2),e=dh(e,t,2),e!==null&&(_v(e,2),_1(e))}function br(e,t,n){if(e.tag===3)Vme(e,e,n);else for(;t!==null;){if(t.tag===3){Vme(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ph===null||!ph.has(r))){e=uu(n,e),n=Fhe(2),r=dh(t,n,2),r!==null&&(Vhe(n,r,t,e),_v(r,2),_1(r));break}}t=t.return}}function hQ(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new tPt;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(Jq=!0,o.add(n),e=aPt.bind(null,e,t,n),t.then(e,e))}function aPt(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,kr===e&&(wn&n)===n&&(So===4||So===3&&(wn&62914560)===wn&&300>K1()-$q?(tr&2)===0&&C6(e,0):_q|=n,x6===wn&&(x6=0)),_1(e)}function S2e(e,t){t===0&&(t=x0e()),e=M6(e,t),e!==null&&(_v(e,t),_1(e))}function sPt(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),S2e(e,n)}function lPt(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(re(314))}r!==null&&r.delete(t),S2e(e,n)}function cPt(e,t){return yq(e,t)}var VP=null,Gy=null,oq=!1,ZP=!1,gQ=!1,f9=0;function _1(e){e!==Gy&&e.next===null&&(Gy===null?VP=Gy=e:Gy=Gy.next=e),ZP=!0,oq||(oq=!0,dPt())}function lC(e,t){if(!gQ&&ZP){gQ=!0;do for(var n=!1,r=VP;r!==null;){if(!t)if(e!==0){var o=r.pendingLanes;if(o===0)var i=0;else{var a=r.suspendedLanes,s=r.pingedLanes;i=(1<<31-mc(42|e)+1)-1,i&=o&~(a&~s),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,Zme(r,i))}else i=wn,i=_P(r,r===kr?i:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(i&3)===0||Jv(r,i)||(n=!0,Zme(r,i));r=r.next}while(n);gQ=!1}}function uPt(){M2e()}function M2e(){ZP=oq=!1;var e=0;f9!==0&&(yPt()&&(e=f9),f9=0);for(var t=K1(),n=null,r=VP;r!==null;){var o=r.next,i=k2e(r,t);i===0?(r.next=null,n===null?VP=o:n.next=o,o===null&&(Gy=n)):(n=r,(e!==0||(i&3)!==0)&&(ZP=!0)),r=o}lC(e,!1)}function k2e(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var a=31-mc(i),s=1<<a,l=o[a];l===-1?((s&n)===0||(s&r)!==0)&&(o[a]=jkt(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}if(t=kr,n=wn,n=_P(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(er===2||er===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&VZ(r),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Jv(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&VZ(r),bq(n)){case 2:case 8:n=w0e;break;case 32:n=TP;break;case 268435456:n=b0e;break;default:n=TP}return r=E2e.bind(null,e),n=yq(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&VZ(r),e.callbackPriority=2,e.callbackNode=null,2}function E2e(e,t){if(na!==0&&na!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(uN(!0)&&e.callbackNode!==n)return null;var r=wn;return r=_P(e,e===kr?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(h2e(e,r,t),k2e(e,K1()),e.callbackNode!=null&&e.callbackNode===n?E2e.bind(null,e):null)}function Zme(e,t){if(uN())return null;h2e(e,t,!0)}function dPt(){bPt(function(){(tr&6)!==0?yq(y0e,uPt):M2e()})}function tG(){return f9===0&&(f9=A0e()),f9}function Qme(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:uP(""+e)}function qme(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function pPt(e,t,n,r,o){if(t==="submit"&&n&&n.stateNode===o){var i=Qme((o[al]||null).action),a=r.submitter;a&&(t=(t=a[al]||null)?Qme(t.formAction):a.getAttribute("formAction"),t!==null&&(i=t,a=null));var s=new $P("action","action",null,r,o);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(f9!==0){var l=a?qme(o,a):new FormData(o);GQ(n,{pending:!0,data:l,method:o.method,action:i},null,l)}}else typeof i=="function"&&(s.preventDefault(),l=a?qme(o,a):new FormData(o),GQ(n,{pending:!0,data:l,method:o.method,action:i},i,l))},currentTarget:o}]})}}for(oP=0;oP<RQ.length;oP++)iP=RQ[oP],Gme=iP.toLowerCase(),Yme=iP[0].toUpperCase()+iP.slice(1),Ld(Gme,"on"+Yme);var iP,Gme,Yme,oP;Ld(Z0e,"onAnimationEnd");Ld(Q0e,"onAnimationIteration");Ld(q0e,"onAnimationStart");Ld("dblclick","onDoubleClick");Ld("focusin","onFocus");Ld("focusout","onBlur");Ld(NEt,"onTransitionRun");Ld(DEt,"onTransitionStart");Ld(LEt,"onTransitionCancel");Ld(G0e,"onTransitionEnd");h6("onMouseEnter",["mouseout","mouseover"]);h6("onMouseLeave",["mouseout","mouseover"]);h6("onPointerEnter",["pointerout","pointerover"]);h6("onPointerLeave",["pointerout","pointerover"]);w9("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));w9("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));w9("onBeforeInput",["compositionend","keypress","textInput","paste"]);w9("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));w9("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));w9("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fv="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(" "),fPt=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Fv));function P2e(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==i&&o.isPropagationStopped())break e;i=s,o.currentTarget=c;try{i(o)}catch(u){BP(u)}o.currentTarget=null,i=l}else for(a=0;a<r.length;a++){if(s=r[a],l=s.instance,c=s.currentTarget,s=s.listener,l!==i&&o.isPropagationStopped())break e;i=s,o.currentTarget=c;try{i(o)}catch(u){BP(u)}o.currentTarget=null,i=l}}}}function $t(e,t){var n=t[kQ];n===void 0&&(n=t[kQ]=new Set);var r=e+"__bubble";n.has(r)||(N2e(t,e,2,!1),n.add(r))}function yQ(e,t,n){var r=0;t&&(r|=4),N2e(n,e,r,t)}var aP="_reactListening"+Math.random().toString(36).slice(2);function nG(e){if(!e[aP]){e[aP]=!0,T0e.forEach(function(n){n!=="selectionchange"&&(fPt.has(n)||yQ(n,!1,e),yQ(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[aP]||(t[aP]=!0,yQ("selectionchange",!1,t))}}function N2e(e,t,n,r){switch(V2e(t)){case 2:var o=HPt;break;case 8:o=WPt;break;default:o=aG}n=o.bind(null,t,n,e),o=void 0,!DQ||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function wQ(e,t,n,r,o){var i=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var s=r.stateNode.containerInfo;if(s===o)break;if(a===4)for(a=r.return;a!==null;){var l=a.tag;if((l===3||l===4)&&a.stateNode.containerInfo===o)return;a=a.return}for(;s!==null;){if(a=Xy(s),a===null)return;if(l=a.tag,l===5||l===6||l===26||l===27){r=i=a;continue e}s=s.parentNode}}r=r.return}L0e(function(){var c=i,u=vq(n),d=[];e:{var f=Y0e.get(e);if(f!==void 0){var m=$P,h=e;switch(e){case"keypress":if(pP(n)===0)break e;case"keydown":case"keyup":m=cEt;break;case"focusin":h="focus",m=JZ;break;case"focusout":h="blur",m=JZ;break;case"beforeblur":case"afterblur":m=JZ;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=eme;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=Jkt;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=pEt;break;case Z0e:case Q0e:case q0e:m=eEt;break;case G0e:m=mEt;break;case"scroll":case"scrollend":m=Kkt;break;case"wheel":m=gEt;break;case"copy":case"cut":case"paste":m=nEt;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=nme;break;case"toggle":case"beforetoggle":m=wEt}var g=(t&4)!==0,w=!g&&(e==="scroll"||e==="scrollend"),b=g?f!==null?f+"Capture":null:f;g=[];for(var A=c,x;A!==null;){var v=A;if(x=v.stateNode,v=v.tag,v!==5&&v!==26&&v!==27||x===null||b===null||(v=jv(A,b),v!=null&&g.push(Vv(A,v,x))),w)break;A=A.return}0<g.length&&(f=new m(f,h,null,n,u),d.push({event:f,listeners:g}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",f&&n!==NQ&&(h=n.relatedTarget||n.fromElement)&&(Xy(h)||h[T6]))break e;if((m||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,m?(h=n.relatedTarget||n.toElement,m=c,h=h?Xy(h):null,h!==null&&(w=Kv(h),g=h.tag,h!==w||g!==5&&g!==27&&g!==6)&&(h=null)):(m=null,h=c),m!==h)){if(g=eme,v="onMouseLeave",b="onMouseEnter",A="mouse",(e==="pointerout"||e==="pointerover")&&(g=nme,v="onPointerLeave",b="onPointerEnter",A="pointer"),w=m==null?f:bv(m),x=h==null?f:bv(h),f=new g(v,A+"leave",m,n,u),f.target=w,f.relatedTarget=x,v=null,Xy(u)===c&&(g=new g(b,A+"enter",h,n,u),g.target=x,g.relatedTarget=w,v=g),w=v,m&&h)t:{for(g=m,b=h,A=0,x=g;x;x=Zy(x))A++;for(x=0,v=b;v;v=Zy(v))x++;for(;0<A-x;)g=Zy(g),A--;for(;0<x-A;)b=Zy(b),x--;for(;A--;){if(g===b||b!==null&&g===b.alternate)break t;g=Zy(g),b=Zy(b)}g=null}else g=null;m!==null&&Kme(d,f,m,g,!1),h!==null&&w!==null&&Kme(d,w,h,g,!0)}}e:{if(f=c?bv(c):window,m=f.nodeName&&f.nodeName.toLowerCase(),m==="select"||m==="input"&&f.type==="file")var C=ame;else if(ime(f))if(U0e)C=kEt;else{C=SEt;var M=TEt}else m=f.nodeName,!m||m.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?c&&xq(c.elementType)&&(C=ame):C=MEt;if(C&&(C=C(e,c))){z0e(d,C,n,u);break e}M&&M(e,f,c),e==="focusout"&&c&&f.type==="number"&&c.memoizedProps.value!=null&&PQ(f,"number",f.value)}switch(M=c?bv(c):window,e){case"focusin":(ime(M)||M.contentEditable==="true")&&($y=M,LQ=c,Cv=null);break;case"focusout":Cv=LQ=$y=null;break;case"mousedown":OQ=!0;break;case"contextmenu":case"mouseup":case"dragend":OQ=!1,ume(d,n,u);break;case"selectionchange":if(PEt)break;case"keydown":case"keyup":ume(d,n,u)}var I;if(Tq)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else _y?j0e(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(R0e&&n.locale!=="ko"&&(_y||P!=="onCompositionStart"?P==="onCompositionEnd"&&_y&&(I=O0e()):(ah=u,Cq="value"in ah?ah.value:ah.textContent,_y=!0)),M=QP(c,P),0<M.length&&(P=new tme(P,e,null,n,u),d.push({event:P,listeners:M}),I?P.data=I:(I=B0e(n),I!==null&&(P.data=I)))),(I=AEt?xEt(e,n):vEt(e,n))&&(P=QP(c,"onBeforeInput"),0<P.length&&(M=new tme("onBeforeInput","beforeinput",null,n,u),d.push({event:M,listeners:P}),M.data=I)),pPt(d,e,c,n,u)}P2e(d,t)})}function Vv(e,t,n){return{instance:e,listener:t,currentTarget:n}}function QP(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||i===null||(o=jv(e,n),o!=null&&r.unshift(Vv(e,o,i)),o=jv(e,t),o!=null&&r.push(Vv(e,o,i))),e.tag===3)return r;e=e.return}return[]}function Zy(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Kme(e,t,n,r,o){for(var i=t._reactName,a=[];n!==null&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(s=s.tag,l!==null&&l===r)break;s!==5&&s!==26&&s!==27||c===null||(l=c,o?(c=jv(n,i),c!=null&&a.unshift(Vv(n,c,l))):o||(c=jv(n,i),c!=null&&a.push(Vv(n,c,l)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var mPt=/\r\n?/g,hPt=/\u0000|\uFFFD/g;function Xme(e){return(typeof e=="string"?e:""+e).replace(mPt,`
|
|
10
|
-
`).replace(hPt,"")}function D2e(e,t){return t=Xme(t),Xme(e)===t}function dN(){}function ur(e,t,n,r,o,i){switch(n){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||g6(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&g6(e,""+r);break;case"className":KE(e,"class",r);break;case"tabIndex":KE(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":KE(e,n,r);break;case"style":D0e(e,r,i);break;case"data":if(t!=="object"){KE(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=uP(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(n==="formAction"?(t!=="input"&&ur(e,t,"name",o.name,o,null),ur(e,t,"formEncType",o.formEncType,o,null),ur(e,t,"formMethod",o.formMethod,o,null),ur(e,t,"formTarget",o.formTarget,o,null)):(ur(e,t,"encType",o.encType,o,null),ur(e,t,"method",o.method,o,null),ur(e,t,"target",o.target,o,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=uP(""+r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=dN);break;case"onScroll":r!=null&&$t("scroll",e);break;case"onScrollEnd":r!=null&&$t("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(re(61));if(n=r.__html,n!=null){if(o.children!=null)throw Error(re(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}n=uP(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""+r):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":r===!0?e.setAttribute(n,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":$t("beforetoggle",e),$t("toggle",e),cP(e,"popover",r);break;case"xlinkActuate":Df(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":Df(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":Df(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":Df(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":Df(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":Df(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":Df(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":Df(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":Df(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":cP(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Gkt.get(n)||n,cP(e,n,r))}}function iq(e,t,n,r,o,i){switch(n){case"style":D0e(e,r,i);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(re(61));if(n=r.__html,n!=null){if(o.children!=null)throw Error(re(60));e.innerHTML=n}}break;case"children":typeof r=="string"?g6(e,r):(typeof r=="number"||typeof r=="bigint")&&g6(e,""+r);break;case"onScroll":r!=null&&$t("scroll",e);break;case"onScrollEnd":r!=null&&$t("scrollend",e);break;case"onClick":r!=null&&(e.onclick=dN);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!S0e.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(o=n.endsWith("Capture"),t=n.slice(2,o?n.length-7:void 0),i=e[al]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,o),typeof r=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,o);break e}n in e?e[n]=r:r===!0?e.setAttribute(n,""):cP(e,n,r)}}}function ra(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":$t("error",e),$t("load",e);var r=!1,o=!1,i;for(i in n)if(n.hasOwnProperty(i)){var a=n[i];if(a!=null)switch(i){case"src":r=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(re(137,t));default:ur(e,t,i,a,n,null)}}o&&ur(e,t,"srcSet",n.srcSet,n,null),r&&ur(e,t,"src",n.src,n,null);return;case"input":$t("invalid",e);var s=i=a=o=null,l=null,c=null;for(r in n)if(n.hasOwnProperty(r)){var u=n[r];if(u!=null)switch(r){case"name":o=u;break;case"type":a=u;break;case"checked":l=u;break;case"defaultChecked":c=u;break;case"value":i=u;break;case"defaultValue":s=u;break;case"children":case"dangerouslySetInnerHTML":if(u!=null)throw Error(re(137,t));break;default:ur(e,t,r,u,n,null)}}E0e(e,i,s,l,c,a,o,!1),SP(e);return;case"select":$t("invalid",e),r=a=i=null;for(o in n)if(n.hasOwnProperty(o)&&(s=n[o],s!=null))switch(o){case"value":i=s;break;case"defaultValue":a=s;break;case"multiple":r=s;default:ur(e,t,o,s,n,null)}t=i,n=a,e.multiple=!!r,t!=null?s6(e,!!r,t,!1):n!=null&&s6(e,!!r,n,!0);return;case"textarea":$t("invalid",e),i=o=r=null;for(a in n)if(n.hasOwnProperty(a)&&(s=n[a],s!=null))switch(a){case"value":r=s;break;case"defaultValue":o=s;break;case"children":i=s;break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(re(91));break;default:ur(e,t,a,s,n,null)}N0e(e,r,o,i),SP(e);return;case"option":for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:ur(e,t,l,r,n,null)}return;case"dialog":$t("beforetoggle",e),$t("toggle",e),$t("cancel",e),$t("close",e);break;case"iframe":case"object":$t("load",e);break;case"video":case"audio":for(r=0;r<Fv.length;r++)$t(Fv[r],e);break;case"image":$t("error",e),$t("load",e);break;case"details":$t("toggle",e);break;case"embed":case"source":case"link":$t("error",e),$t("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(c in n)if(n.hasOwnProperty(c)&&(r=n[c],r!=null))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(re(137,t));default:ur(e,t,c,r,n,null)}return;default:if(xq(t)){for(u in n)n.hasOwnProperty(u)&&(r=n[u],r!==void 0&&iq(e,t,u,r,n,void 0));return}}for(s in n)n.hasOwnProperty(s)&&(r=n[s],r!=null&&ur(e,t,s,r,n,null))}function gPt(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,i=null,a=null,s=null,l=null,c=null,u=null;for(m in n){var d=n[m];if(n.hasOwnProperty(m)&&d!=null)switch(m){case"checked":break;case"value":break;case"defaultValue":l=d;default:r.hasOwnProperty(m)||ur(e,t,m,null,r,d)}}for(var f in r){var m=r[f];if(d=n[f],r.hasOwnProperty(f)&&(m!=null||d!=null))switch(f){case"type":i=m;break;case"name":o=m;break;case"checked":c=m;break;case"defaultChecked":u=m;break;case"value":a=m;break;case"defaultValue":s=m;break;case"children":case"dangerouslySetInnerHTML":if(m!=null)throw Error(re(137,t));break;default:m!==d&&ur(e,t,f,m,r,d)}}EQ(e,a,s,l,c,u,i,o);return;case"select":m=a=s=f=null;for(i in n)if(l=n[i],n.hasOwnProperty(i)&&l!=null)switch(i){case"value":break;case"multiple":m=l;default:r.hasOwnProperty(i)||ur(e,t,i,null,r,l)}for(o in r)if(i=r[o],l=n[o],r.hasOwnProperty(o)&&(i!=null||l!=null))switch(o){case"value":f=i;break;case"defaultValue":s=i;break;case"multiple":a=i;default:i!==l&&ur(e,t,o,i,r,l)}t=s,n=a,r=m,f!=null?s6(e,!!n,f,!1):!!r!=!!n&&(t!=null?s6(e,!!n,t,!0):s6(e,!!n,n?[]:"",!1));return;case"textarea":m=f=null;for(s in n)if(o=n[s],n.hasOwnProperty(s)&&o!=null&&!r.hasOwnProperty(s))switch(s){case"value":break;case"children":break;default:ur(e,t,s,null,r,o)}for(a in r)if(o=r[a],i=n[a],r.hasOwnProperty(a)&&(o!=null||i!=null))switch(a){case"value":f=o;break;case"defaultValue":m=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(re(91));break;default:o!==i&&ur(e,t,a,o,r,i)}P0e(e,f,m);return;case"option":for(var h in n)if(f=n[h],n.hasOwnProperty(h)&&f!=null&&!r.hasOwnProperty(h))switch(h){case"selected":e.selected=!1;break;default:ur(e,t,h,null,r,f)}for(l in r)if(f=r[l],m=n[l],r.hasOwnProperty(l)&&f!==m&&(f!=null||m!=null))switch(l){case"selected":e.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:ur(e,t,l,f,r,m)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var g in n)f=n[g],n.hasOwnProperty(g)&&f!=null&&!r.hasOwnProperty(g)&&ur(e,t,g,null,r,f);for(c in r)if(f=r[c],m=n[c],r.hasOwnProperty(c)&&f!==m&&(f!=null||m!=null))switch(c){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(re(137,t));break;default:ur(e,t,c,f,r,m)}return;default:if(xq(t)){for(var w in n)f=n[w],n.hasOwnProperty(w)&&f!==void 0&&!r.hasOwnProperty(w)&&iq(e,t,w,void 0,r,f);for(u in r)f=r[u],m=n[u],!r.hasOwnProperty(u)||f===m||f===void 0&&m===void 0||iq(e,t,u,f,r,m);return}}for(var b in n)f=n[b],n.hasOwnProperty(b)&&f!=null&&!r.hasOwnProperty(b)&&ur(e,t,b,null,r,f);for(d in r)f=r[d],m=n[d],!r.hasOwnProperty(d)||f===m||f==null&&m==null||ur(e,t,d,f,r,m)}var aq=null,sq=null;function qP(e){return e.nodeType===9?e:e.ownerDocument}function Jme(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function L2e(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function lq(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var bQ=null;function yPt(){var e=window.event;return e&&e.type==="popstate"?e===bQ?!1:(bQ=e,!0):(bQ=null,!1)}var O2e=typeof setTimeout=="function"?setTimeout:void 0,wPt=typeof clearTimeout=="function"?clearTimeout:void 0,_me=typeof Promise=="function"?Promise:void 0,bPt=typeof queueMicrotask=="function"?queueMicrotask:typeof _me<"u"?function(e){return _me.resolve(null).then(e).catch(APt)}:O2e;function APt(e){setTimeout(function(){throw e})}function xh(e){return e==="head"}function $me(e,t){var n=t,r=0,o=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(0<r&&8>r){n=r;var a=e.ownerDocument;if(n&1&&Ov(a.documentElement),n&2&&Ov(a.body),n&4)for(n=a.head,Ov(n),a=n.firstChild;a;){var s=a.nextSibling,l=a.nodeName;a[$v]||l==="SCRIPT"||l==="STYLE"||l==="LINK"&&a.rel.toLowerCase()==="stylesheet"||n.removeChild(a),a=s}}if(o===0){e.removeChild(i),Yv(t);return}o--}else n==="$"||n==="$?"||n==="$!"?o++:r=n.charCodeAt(0)-48;else r=0;n=i}while(n);Yv(t)}function cq(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":cq(n),Aq(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function xPt(e,t,n,r){for(;e.nodeType===1;){var o=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[$v])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=Dd(e.nextSibling),e===null)break}return null}function vPt(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Dd(e.nextSibling),e===null))return null;return e}function uq(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function CPt(e,t){var n=e.ownerDocument;if(e.data!=="$?"||n.readyState==="complete")t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function Dd(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}var dq=null;function e0e(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}function R2e(e,t,n){switch(t=qP(n),e){case"html":if(e=t.documentElement,!e)throw Error(re(452));return e;case"head":if(e=t.head,!e)throw Error(re(453));return e;case"body":if(e=t.body,!e)throw Error(re(454));return e;default:throw Error(re(451))}}function Ov(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Aq(e)}var fu=new Map,t0e=new Set;function GP(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Gf=Hn.d;Hn.d={f:IPt,r:TPt,D:SPt,C:MPt,L:kPt,m:EPt,X:NPt,S:PPt,M:DPt};function IPt(){var e=Gf.f(),t=lN();return e||t}function TPt(e){var t=S6(e);t!==null&&t.tag===5&&t.type==="form"?khe(t):Gf.r(e)}var E6=typeof document>"u"?null:document;function j2e(e,t,n){var r=E6;if(r&&typeof t=="string"&&t){var o=cu(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof n=="string"&&(o+='[crossorigin="'+n+'"]'),t0e.has(o)||(t0e.add(o),e={rel:e,crossOrigin:n,href:t},r.querySelector(o)===null&&(t=r.createElement("link"),ra(t,"link",e),Hi(t),r.head.appendChild(t)))}}function SPt(e){Gf.D(e),j2e("dns-prefetch",e,null)}function MPt(e,t){Gf.C(e,t),j2e("preconnect",e,t)}function kPt(e,t,n){Gf.L(e,t,n);var r=E6;if(r&&e&&t){var o='link[rel="preload"][as="'+cu(t)+'"]';t==="image"&&n&&n.imageSrcSet?(o+='[imagesrcset="'+cu(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(o+='[imagesizes="'+cu(n.imageSizes)+'"]')):o+='[href="'+cu(e)+'"]';var i=o;switch(t){case"style":i=I6(e);break;case"script":i=P6(e)}fu.has(i)||(e=Ur({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),fu.set(i,e),r.querySelector(o)!==null||t==="style"&&r.querySelector(cC(i))||t==="script"&&r.querySelector(uC(i))||(t=r.createElement("link"),ra(t,"link",e),Hi(t),r.head.appendChild(t)))}}function EPt(e,t){Gf.m(e,t);var n=E6;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+cu(r)+'"][href="'+cu(e)+'"]',i=o;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=P6(e)}if(!fu.has(i)&&(e=Ur({rel:"modulepreload",href:e},t),fu.set(i,e),n.querySelector(o)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(uC(i)))return}r=n.createElement("link"),ra(r,"link",e),Hi(r),n.head.appendChild(r)}}}function PPt(e,t,n){Gf.S(e,t,n);var r=E6;if(r&&e){var o=a6(r).hoistableStyles,i=I6(e);t=t||"default";var a=o.get(i);if(!a){var s={loading:0,preload:null};if(a=r.querySelector(cC(i)))s.loading=5;else{e=Ur({rel:"stylesheet",href:e,"data-precedence":t},n),(n=fu.get(i))&&rG(e,n);var l=a=r.createElement("link");Hi(l),ra(l,"link",e),l._p=new Promise(function(c,u){l.onload=c,l.onerror=u}),l.addEventListener("load",function(){s.loading|=1}),l.addEventListener("error",function(){s.loading|=2}),s.loading|=4,bP(a,t,r)}a={type:"stylesheet",instance:a,count:1,state:s},o.set(i,a)}}}function NPt(e,t){Gf.X(e,t);var n=E6;if(n&&e){var r=a6(n).hoistableScripts,o=P6(e),i=r.get(o);i||(i=n.querySelector(uC(o)),i||(e=Ur({src:e,async:!0},t),(t=fu.get(o))&&oG(e,t),i=n.createElement("script"),Hi(i),ra(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(o,i))}}function DPt(e,t){Gf.M(e,t);var n=E6;if(n&&e){var r=a6(n).hoistableScripts,o=P6(e),i=r.get(o);i||(i=n.querySelector(uC(o)),i||(e=Ur({src:e,async:!0,type:"module"},t),(t=fu.get(o))&&oG(e,t),i=n.createElement("script"),Hi(i),ra(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(o,i))}}function n0e(e,t,n,r){var o=(o=ch.current)?GP(o):null;if(!o)throw Error(re(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=I6(n.href),n=a6(o).hoistableStyles,r=n.get(t),r||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=I6(n.href);var i=a6(o).hoistableStyles,a=i.get(e);if(a||(o=o.ownerDocument||o,a={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,a),(i=o.querySelector(cC(e)))&&!i._p&&(a.instance=i,a.state.loading=5),fu.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},fu.set(e,n),i||LPt(o,e,n,a.state))),t&&r===null)throw Error(re(528,""));return a}if(t&&r!==null)throw Error(re(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=P6(n),n=a6(o).hoistableScripts,r=n.get(t),r||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(re(444,e))}}function I6(e){return'href="'+cu(e)+'"'}function cC(e){return'link[rel="stylesheet"]['+e+"]"}function B2e(e){return Ur({},e,{"data-precedence":e.precedence,precedence:null})}function LPt(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),ra(t,"link",n),Hi(t),e.head.appendChild(t))}function P6(e){return'[src="'+cu(e)+'"]'}function uC(e){return"script[async]"+e}function r0e(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+cu(n.href)+'"]');if(r)return t.instance=r,Hi(r),r;var o=Ur({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Hi(r),ra(r,"style",o),bP(r,n.precedence,e),t.instance=r;case"stylesheet":o=I6(n.href);var i=e.querySelector(cC(o));if(i)return t.state.loading|=4,t.instance=i,Hi(i),i;r=B2e(n),(o=fu.get(o))&&rG(r,o),i=(e.ownerDocument||e).createElement("link"),Hi(i);var a=i;return a._p=new Promise(function(s,l){a.onload=s,a.onerror=l}),ra(i,"link",r),t.state.loading|=4,bP(i,n.precedence,e),t.instance=i;case"script":return i=P6(n.src),(o=e.querySelector(uC(i)))?(t.instance=o,Hi(o),o):(r=n,(o=fu.get(i))&&(r=Ur({},n),oG(r,o)),e=e.ownerDocument||e,o=e.createElement("script"),Hi(o),ra(o,"link",r),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(re(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,bP(r,n.precedence,e));return t.instance}function bP(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=r.length?r[r.length-1]:null,i=o,a=0;a<r.length;a++){var s=r[a];if(s.dataset.precedence===t)i=s;else if(i!==o)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function rG(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function oG(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var AP=null;function o0e(e,t,n){if(AP===null){var r=new Map,o=AP=new Map;o.set(n,r)}else o=AP,r=o.get(n),r||(r=new Map,o.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),o=0;o<n.length;o++){var i=n[o];if(!(i[$v]||i[Oa]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var a=i.getAttribute(t)||"";a=e+a;var s=r.get(a);s?s.push(i):r.set(a,[i])}}return r}function i0e(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function OPt(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function z2e(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Zv=null;function RPt(){}function jPt(e,t,n){if(Zv===null)throw Error(re(475));var r=Zv;if(t.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var o=I6(n.href),i=e.querySelector(cC(o));if(i){e=i._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(r.count++,r=YP.bind(r),e.then(r,r)),t.state.loading|=4,t.instance=i,Hi(i);return}i=e.ownerDocument||e,n=B2e(n),(o=fu.get(o))&&rG(n,o),i=i.createElement("link"),Hi(i);var a=i;a._p=new Promise(function(s,l){a.onload=s,a.onerror=l}),ra(i,"link",n),t.instance=i}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(r.count++,t=YP.bind(r),e.addEventListener("load",t),e.addEventListener("error",t))}}function BPt(){if(Zv===null)throw Error(re(475));var e=Zv;return e.stylesheets&&e.count===0&&pq(e,e.stylesheets),0<e.count?function(t){var n=setTimeout(function(){if(e.stylesheets&&pq(e,e.stylesheets),e.unsuspend){var r=e.unsuspend;e.unsuspend=null,r()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}function YP(){if(this.count--,this.count===0){if(this.stylesheets)pq(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var KP=null;function pq(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,KP=new Map,t.forEach(zPt,e),KP=null,YP.call(e))}function zPt(e,t){if(!(t.state.loading&4)){var n=KP.get(e);if(n)var r=n.get(null);else{n=new Map,KP.set(e,n);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<o.length;i++){var a=o[i];(a.nodeName==="LINK"||a.getAttribute("media")!=="not all")&&(n.set(a.dataset.precedence,a),r=a)}r&&n.set(null,r)}o=t.instance,a=o.getAttribute("data-precedence"),i=n.get(a)||r,i===r&&n.set(null,o),n.set(a,o),this.count++,r=YP.bind(this),o.addEventListener("load",r),o.addEventListener("error",r),i?i.parentNode.insertBefore(o,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var Qv={$$typeof:jf,Provider:null,Consumer:null,_currentValue:s9,_currentValue2:s9,_threadCount:0};function UPt(e,t,n,r,o,i,a,s){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ZZ(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ZZ(0),this.hiddenUpdates=ZZ(null),this.identifierPrefix=r,this.onUncaughtError=o,this.onCaughtError=i,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=s,this.incompleteTransitions=new Map}function U2e(e,t,n,r,o,i,a,s,l,c,u,d){return e=new UPt(e,t,n,a,s,l,c,d),t=1,i===!0&&(t|=24),i=pc(3,null,null,t),e.current=i,i.stateNode=e,t=Dq(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:r,isDehydrated:n,cache:t},Oq(i),e}function H2e(e){return e?(e=n6,e):n6}function W2e(e,t,n,r,o,i){o=H2e(o),r.context===null?r.context=o:r.pendingContext=o,r=uh(t),r.payload={element:n},i=i===void 0?null:i,i!==null&&(r.callback=i),n=dh(e,r,t),n!==null&&(gc(n,e,t),Sv(n,e,t))}function a0e(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function iG(e,t){a0e(e,t),(e=e.alternate)&&a0e(e,t)}function F2e(e){if(e.tag===13){var t=M6(e,67108864);t!==null&&gc(t,e,67108864),iG(e,67108864)}}var XP=!0;function HPt(e,t,n,r){var o=dt.T;dt.T=null;var i=Hn.p;try{Hn.p=2,aG(e,t,n,r)}finally{Hn.p=i,dt.T=o}}function WPt(e,t,n,r){var o=dt.T;dt.T=null;var i=Hn.p;try{Hn.p=8,aG(e,t,n,r)}finally{Hn.p=i,dt.T=o}}function aG(e,t,n,r){if(XP){var o=fq(r);if(o===null)wQ(e,t,r,JP,n),s0e(e,r);else if(VPt(o,e,t,n,r))r.stopPropagation();else if(s0e(e,r),t&4&&-1<FPt.indexOf(e)){for(;o!==null;){var i=S6(o);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var a=o9(i.pendingLanes);if(a!==0){var s=i;for(s.pendingLanes|=2,s.entangledLanes|=2;a;){var l=1<<31-mc(a);s.entanglements[1]|=l,a&=~l}_1(i),(tr&6)===0&&(WP=K1()+500,lC(0,!1))}}break;case 13:s=M6(i,2),s!==null&&gc(s,i,2),lN(),iG(i,2)}if(i=fq(r),i===null&&wQ(e,t,r,JP,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else wQ(e,t,r,null,n)}}function fq(e){return e=vq(e),sG(e)}var JP=null;function sG(e){if(JP=null,e=Xy(e),e!==null){var t=Kv(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=f0e(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return JP=e,null}function V2e(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ekt()){case y0e:return 2;case w0e:return 8;case TP:case Pkt:return 32;case b0e:return 268435456;default:return 32}default:return 32}}var mq=!1,mh=null,hh=null,gh=null,qv=new Map,Gv=new Map,oh=[],FPt="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".split(" ");function s0e(e,t){switch(e){case"focusin":case"focusout":mh=null;break;case"dragenter":case"dragleave":hh=null;break;case"mouseover":case"mouseout":gh=null;break;case"pointerover":case"pointerout":qv.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gv.delete(t.pointerId)}}function hv(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=S6(t),t!==null&&F2e(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function VPt(e,t,n,r,o){switch(t){case"focusin":return mh=hv(mh,e,t,n,r,o),!0;case"dragenter":return hh=hv(hh,e,t,n,r,o),!0;case"mouseover":return gh=hv(gh,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return qv.set(i,hv(qv.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Gv.set(i,hv(Gv.get(i)||null,e,t,n,r,o)),!0}return!1}function Z2e(e){var t=Xy(e.target);if(t!==null){var n=Kv(t);if(n!==null){if(t=n.tag,t===13){if(t=f0e(n),t!==null){e.blockedOn=t,zkt(e.priority,function(){if(n.tag===13){var r=hc();r=wq(r);var o=M6(n,r);o!==null&&gc(o,n,r),iG(n,r)}});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function xP(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=fq(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);NQ=r,n.target.dispatchEvent(r),NQ=null}else return t=S6(n),t!==null&&F2e(t),e.blockedOn=n,!1;t.shift()}return!0}function l0e(e,t,n){xP(e)&&n.delete(t)}function ZPt(){mq=!1,mh!==null&&xP(mh)&&(mh=null),hh!==null&&xP(hh)&&(hh=null),gh!==null&&xP(gh)&&(gh=null),qv.forEach(l0e),Gv.forEach(l0e)}function sP(e,t){e.blockedOn===t&&(e.blockedOn=null,mq||(mq=!0,vi.unstable_scheduleCallback(vi.unstable_NormalPriority,ZPt)))}var lP=null;function c0e(e){lP!==e&&(lP=e,vi.unstable_scheduleCallback(vi.unstable_NormalPriority,function(){lP===e&&(lP=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],o=e[t+2];if(typeof r!="function"){if(sG(r||n)===null)continue;break}var i=S6(n);i!==null&&(e.splice(t,3),t-=3,GQ(i,{pending:!0,data:o,method:n.method,action:r},r,o))}}))}function Yv(e){function t(l){return sP(l,e)}mh!==null&&sP(mh,e),hh!==null&&sP(hh,e),gh!==null&&sP(gh,e),qv.forEach(t),Gv.forEach(t);for(var n=0;n<oh.length;n++){var r=oh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<oh.length&&(n=oh[0],n.blockedOn===null);)Z2e(n),n.blockedOn===null&&oh.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var o=n[r],i=n[r+1],a=o[al]||null;if(typeof i=="function")a||c0e(n);else if(a){var s=null;if(i&&i.hasAttribute("formAction")){if(o=i,a=i[al]||null)s=a.formAction;else if(sG(o)!==null)continue}else s=a.action;typeof s=="function"?n[r+1]=s:(n.splice(r,3),r-=3),c0e(n)}}}function lG(e){this._internalRoot=e}pN.prototype.render=lG.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(re(409));var n=t.current,r=hc();W2e(n,r,e,t,null,null)};pN.prototype.unmount=lG.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;W2e(e.current,2,null,e,null,null),lN(),t[T6]=null}};function pN(e){this._internalRoot=e}pN.prototype.unstable_scheduleHydration=function(e){if(e){var t=I0e();e={blockedOn:null,target:e,priority:t};for(var n=0;n<oh.length&&t!==0&&t<oh[n].priority;n++);oh.splice(n,0,e),n===0&&Z2e(e)}};var u0e=d0e.version;if(u0e!=="19.1.0")throw Error(re(527,u0e,"19.1.0"));Hn.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(re(188)):(e=Object.keys(e).join(","),Error(re(268,e)));return e=vkt(t),e=e!==null?m0e(e):null,e=e===null?null:e.stateNode,e};var QPt={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:dt,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(gv=__REACT_DEVTOOLS_GLOBAL_HOOK__,!gv.isDisabled&&gv.supportsFiber))try{Xv=gv.inject(QPt),fc=gv}catch{}var gv;fN.createRoot=function(e,t){if(!p0e(e))throw Error(re(299));var n=!1,r="",o=Uhe,i=Hhe,a=Whe,s=null;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(a=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(s=t.unstable_transitionCallbacks)),t=U2e(e,1,!1,null,null,n,r,o,i,a,s,null),e[T6]=t.current,nG(e),new lG(t)};fN.hydrateRoot=function(e,t,n){if(!p0e(e))throw Error(re(299));var r=!1,o="",i=Uhe,a=Hhe,s=Whe,l=null,c=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(a=n.onCaughtError),n.onRecoverableError!==void 0&&(s=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(l=n.unstable_transitionCallbacks),n.formState!==void 0&&(c=n.formState)),t=U2e(e,1,!0,t,n??null,r,o,i,a,s,l,c),t.context=H2e(null),n=t.current,r=hc(),r=wq(r),o=uh(r),o.callback=null,dh(n,o,r),n=r,t.current.lanes=n,_v(t,n),_1(t),e[T6]=t.current,nG(e),new pN(t)};fN.version="19.1.0"});var Y2e=Ie((ejn,G2e)=>{"use strict";function q2e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(q2e)}catch(e){console.error(e)}}q2e(),G2e.exports=Q2e()});var kn,bs=p(()=>{"use strict";kn={async getItem(e){try{if(typeof window<"u"&&window.localStorage)return localStorage.getItem(e)}catch{}return null},async removeItem(e){typeof window<"u"&&window.localStorage&&localStorage.removeItem(e)},async setItem(e,t){try{typeof window<"u"&&window.localStorage&&localStorage.setItem(e,t)}catch{}}}});var pC={};y(pC,{DEFAULT_RPC_URL:()=>dC,getServiceKey:()=>uG,getThirdwebBaseUrl:()=>Be,getThirdwebDomains:()=>mu,setServiceKey:()=>GPt,setThirdwebDomains:()=>qPt});var dC,K2e,X2e,J2e,_2e,$2e,ege,tge,nge,rge,cG,qPt,mu,Be,oge,GPt,uG,an=p(()=>{"use strict";dC="rpc.thirdweb.com",K2e="social.thirdweb.com",X2e="embedded-wallet.thirdweb.com",J2e="pay.thirdweb.com",_2e="storage.thirdweb.com",$2e="bundler.thirdweb.com",ege="c.thirdweb.com",tge="insight.thirdweb.com",nge="engine.thirdweb.com",rge="bridge.thirdweb.com",cG={analytics:ege,bridge:rge,bundler:$2e,engineCloud:nge,inAppWallet:X2e,insight:tge,pay:J2e,rpc:dC,social:K2e,storage:_2e},qPt=e=>{cG={analytics:e.analytics??ege,bridge:e.bridge??rge,bundler:e.bundler??$2e,engineCloud:e.engineCloud??nge,inAppWallet:e.inAppWallet??X2e,insight:e.insight??tge,pay:e.pay??J2e,rpc:e.rpc??dC,social:e.social??K2e,storage:e.storage??_2e}},mu=()=>cG,Be=e=>{let t=cG[e];return t.startsWith("localhost")?`http://${t}`:`https://${t}`},oge=null,GPt=e=>{oge=e},uG=()=>oge});var ige,age=p(()=>{"use strict";ige="5.110.3"});var hu,N6=p(()=>{"use strict";hu=class extends Map{constructor(n){super();Ve(this,"maxSize");this.maxSize=n}get(n){let r=super.get(n);return super.has(n)&&r!==void 0&&(this.delete(n),super.set(n,r)),r}set(n,r){if(super.set(n,r),this.maxSize&&this.size>this.maxSize){let o=this.keys().next().value;o&&this.delete(o)}return this}}});function lge(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?"mobile":typeof navigator<"u"?"browser":"node"}function fC(e){for(let t=0,n=sge.length;t<n;t++){let[r,o]=sge[t];if(o.exec(e))return r}return null}var sge,dG=p(()=>{"use strict";sge=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]]});function mC(e){return e.split(".").length===3}var pG=p(()=>{"use strict"});var mN,cge,hN=p(()=>{"use strict";mN=typeof process<"u"&&process.env&&!1,cge=typeof process<"u"&&process.env&&!1});var hC={};y(hC,{IS_THIRDWEB_URL_CACHE:()=>D6,getClientFetch:()=>Pe,getPlatformHeaders:()=>uge,isThirdwebUrl:()=>L6});function Pe(e,t){async function n(r,o){let{requestTimeoutMs:i=YPt,useAuthToken:a,...s}=o||{},l=s.headers?new Headers(s.headers):typeof r=="object"?r.headers:void 0,c=typeof r=="string"?r:r.url;if(L6(c)){l||(l=new Headers);let f=a&&e.secretKey&&mC(e.secretKey)?e.secretKey:void 0,m=e.secretKey&&!mC(e.secretKey)?e.secretKey:void 0,h=e.clientId;f&&_Pt(c)?(l.set("authorization",`Bearer ${f}`),e.teamId&&l.set("x-team-id",e.teamId),h&&l.set("x-client-id",h)):f&&!XPt(c)&&!JPt(c)?(l.set("authorization",`Bearer ${f}`),e.teamId&&l.set("x-team-id",e.teamId)):(m&&l.set("x-secret-key",m),h&&l.set("x-client-id",h)),t&&(l.set("x-ecosystem-id",t.id),t.partnerId&&l.set("x-ecosystem-partner-id",t.partnerId));for(let[w,b]of uge())l.set(w,b);let g=uG();g&&l.set("x-service-api-key",g)}let u,d;return i&&(u=new AbortController,d=setTimeout(()=>{u?.abort("timeout")},i)),fetch(r,{...s,headers:l,signal:u?.signal}).finally(()=>{d&&clearTimeout(d)})}return n}function L6(e){if(D6.has(e))return D6.get(e);try{let{hostname:t}=new URL(e);try{if(mN&&t==="localhost")return D6.set(e,!0),!0}catch{}let n=KPt.some(r=>t.endsWith(r));return D6.set(e,n),n}catch{return D6.set(e,!1),!1}}function XPt(e){try{let{hostname:t}=new URL(e);return t.startsWith("pay.")}catch{return!1}}function JPt(e){try{let{hostname:t}=new URL(e);return t.startsWith("in-app-wallet.")||t.startsWith("embedded-wallet.")}catch{return!1}}function _Pt(e){try{let{hostname:t}=new URL(e);return t.endsWith(".bundler.thirdweb.com")||t.endsWith(".bundler.thirdweb-dev.com")}catch{return!1}}function uge(){if(gN)return gN;let e=null;typeof navigator<"u"&&(e=fC(navigator.userAgent));let t;return typeof globalThis<"u"&&"Application"in globalThis&&(t=globalThis.Application.applicationId),gN=Object.entries({"x-sdk-name":$Pt,"x-sdk-os":e?eNt(e):"unknown","x-sdk-platform":lge(),"x-sdk-version":ige,...t?{"x-bundle-id":t}:{}}),gN}function eNt(e){let t=e.toLowerCase();if(t.startsWith("win"))return"win";switch(e){case"Mac OS":return"mac";case"iOS":return"ios";case"Android OS":return"android";default:return t.replace(/\s/gi,"_")}}var YPt,KPt,D6,$Pt,gN,Kt=p(()=>{"use strict";age();N6();dG();an();pG();hN();YPt=6e4;KPt=[".thirdweb.com",".ipfscdn.io",".thirdweb.dev",".thirdweb-dev.com",".thirdwebstorage-dev.com"],D6=new hu(4096);$Pt="unified-sdk"});function rNt(e){let t=(o,i)=>({clear:()=>i.delete(o),get:()=>i.get(o),set:a=>i.set(o,a)}),n=t(e,tNt),r=t(e,nNt);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}async function nr(e,{cacheKey:t,cacheTime:n=Number.POSITIVE_INFINITY}){let r=rNt(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{let a=await i;return r.response.set({created:new Date,data:a}),a}finally{r.promise.clear()}}var tNt,nNt,As=p(()=>{"use strict";tNt=new Map,nNt=new Map});var bC={};y(bC,{CUSTOM_CHAIN_MAP:()=>O6,cacheChains:()=>fG,convertApiChainToChain:()=>v9,convertLegacyChain:()=>pge,convertViemChain:()=>fge,defineChain:()=>vt,getCachedChain:()=>We,getCachedChainIfExists:()=>Yf,getChainDecimals:()=>yC,getChainMetadata:()=>uo,getChainNativeCurrencyName:()=>wC,getChainSymbol:()=>gC,getInsightEnabledChainIds:()=>mG,getRpcUrlForChain:()=>R6});function vt(e){let t=mu().rpc;if(typeof e=="number")return{id:e,rpc:`https://${e}.${t}`};if(iNt(e))return fge(e);if(oNt(e))return pge(e);let n=e.rpc;n||(n=`https://${e.id}.${t}`);let r={...e,rpc:n};return O6.set(e.id,r),r}function fG(e){for(let t of e)O6.set(t.id,t)}function We(e){if(O6.has(e))return O6.get(e);let t=mu().rpc;return{id:e,rpc:`https://${e}.${t}`}}function Yf(e){return O6.get(e)}function oNt(e){return"rpc"in e&&Array.isArray(e.rpc)&&"slug"in e}function pge(e){let t=mu().rpc;return{blockExplorers:e?.explorers?.map(n=>({apiUrl:n.url,name:n.name,url:n.url})),faucets:e.faucets?[...e.faucets]:void 0,icon:e.icon,id:e.chainId,name:e.name,nativeCurrency:{decimals:e.nativeCurrency.decimals,name:e.nativeCurrency.name,symbol:e.nativeCurrency.symbol},rpc:e.rpc[0]??`https://${e.chainId}.${t}`,testnet:e.testnet?!0:void 0}}function iNt(e){return"rpcUrls"in e&&!("rpc"in e)}function fge(e){let t=mu().rpc;return{blockExplorers:e?.blockExplorers?Object.values(e?.blockExplorers).map(n=>({apiUrl:n.apiUrl,name:n.name,url:n.url})):[],id:e.id,name:e.name,nativeCurrency:{decimals:e.nativeCurrency.decimals,name:e.nativeCurrency.name,symbol:e.nativeCurrency.symbol},rpc:e.rpcUrls.default.http[0]??`https://${e.id}.${t}`,testnet:e.testnet?!0:void 0}}function R6(e){let t=mu().rpc;if(typeof e.chain=="number")return`https://${e.chain}.${t}/${e.client.clientId}`;let{rpc:n}=e.chain;if(L6(n)){let r=new URL(e.chain.rpc.replace(dC,t));return(r.pathname==="/"||r.pathname.startsWith("/$"))&&(r.pathname=`/${e.client.clientId}`),r.toString()}return n}async function gC(e){return e.nativeCurrency?.symbol?e.nativeCurrency.symbol:uo(e).then(t=>t.nativeCurrency.symbol).catch(()=>"ETH")}async function yC(e){return e.nativeCurrency?.decimals?e.nativeCurrency.decimals:uo(e).then(t=>t.nativeCurrency.decimals).catch(()=>18)}async function wC(e){return e.nativeCurrency?.name?e.nativeCurrency.name:uo(e).then(t=>t.nativeCurrency.name).catch(()=>"ETH")}function uo(e){let t=e.id;return nr(async()=>{try{let n=await fetch(`https://api.thirdweb.com/v1/chains/${t}`);if(!n.ok)throw new Error(`Failed to fetch chain data for chainId ${t}. ${n.status} ${n.statusText}`);let r=await n.json();if(r.error)throw new Error(`Failed to fetch chain data for chainId ${t}`);if(!r.data)throw new Error(`Failed to fetch chain data for chainId ${t}`);let o=r.data;return dge(e,o)}catch{return dge(e)}},{cacheKey:`chain:${t}`,cacheTime:5*60*1e3})}async function mG(){return nr(async()=>{let e=await fetch("https://api.thirdweb.com/v1/chains/services?service=insight");if(!e.ok)throw new Error(`Failed to fetch services. ${e.status} ${e.statusText}`);let t=await e.json();return Object.keys(t.data).map(n=>Number(n))},{cacheKey:"chain:insight-enabled",cacheTime:24*60*60*1e3})}function v9(e){return{blockExplorers:e.explorers?.map(t=>({apiUrl:t.url,name:t.name,url:t.url})),faucets:e.faucets?[...e.faucets]:void 0,icon:e.icon,id:e.chainId,name:e.name,nativeCurrency:e.nativeCurrency,rpc:e.rpc[0]||"",testnet:e.testnet===!0?!0:void 0}}function dge(e,t){let n=e.nativeCurrency?{...t?.nativeCurrency,...e.nativeCurrency}:t?.nativeCurrency;return{...t,chain:t?.chain||e.name||"",chainId:e.id||t?.chainId||-1,explorers:e.blockExplorers?.map(r=>({name:r.name,standard:"EIP3091",url:r.url}))||t?.explorers,icon:e.icon||t?.icon,name:e.name||t?.name||"",nativeCurrency:{decimals:n?.decimals||18,name:n?.name||"",symbol:n?.symbol||""},rpc:e.rpc?[e.rpc]:t?.rpc||[""],shortName:t?.shortName||e.name||"",slug:t?.slug||e.name||"",stackType:t?.stackType||"",testnet:e.testnet||t?.testnet||!1}}var O6,qe=p(()=>{"use strict";an();Kt();As();O6=new Map});function $1(e){let t=new Set,n=e,r=()=>{for(let o of t)o()};return{getValue(){return n},setValue(o){o!==n&&(n=o,r())},subscribe(o){return t.add(o),()=>{t.delete(o)}}}}var hG=p(()=>{"use strict"});var yN={};y(yN,{stringify:()=>pe});function pe(e,t,n){return JSON.stringify(e,(o,i)=>{let a=typeof i=="bigint"?i.toString():i;return typeof t=="function"?t(o,a):a},n)}var Nt=p(()=>{"use strict"});async function hge(e,t,n){if(!aNt(n))throw new Error("given params are not stringifiable");let r=await e.getItem(xC),o;if(r){try{o=JSON.parse(r)}catch{o={}}o[t]=n}else o={[t]:n};e.setItem(xC,pe(o))}async function gge(e,t){let n=await e.getItem(xC),r;if(n){try{r=JSON.parse(n)}catch{r={}}delete r[t],e.setItem(xC,pe(r))}}async function yge(e,t){let n=await e.getItem(xC);if(!n)return null;try{let r=JSON.parse(n);return r?.[t]?r[t]:null}catch{return null}}function aNt(e){try{return pe(e),!0}catch{return!1}}var xC,gG=p(()=>{"use strict";Nt();xC="tw:connected-wallet-params"});function j6(e){if(!e)return!1;let n=(typeof e=="string"?e:e?.message||e?.data?.message||"").toLowerCase();return n.includes("insufficient funds")||n.includes("insufficient balance")||n.includes("insufficient")&&(n.includes("native")||n.includes("gas"))||e?.code==="INSUFFICIENT_FUNDS"||e?.reason==="insufficient funds"}function wge(e){if(!e)return{message:"Unknown error"};let t=typeof e=="string"?e:e?.message||e?.data?.message||String(e);return{code:e?.code||e?.reason,message:t}}var vC=p(()=>{"use strict"});async function C9({client:e,ecosystem:t,data:n}){let r=Pe(e,t),o={source:"sdk",...n};return r(`${Be("analytics")}/event`,{body:pe(o),method:"POST"}).catch(()=>{})}var wN=p(()=>{"use strict";an();Kt();Nt()});async function xs(e){return sNt({...e,action:"transaction:sent"})}function sNt(e){return C9({client:e.client,data:{action:e.action,chainId:e.chainId,clientId:e.client.clientId,contractAddress:e.contractAddress,errorCode:pe(e.error),functionName:e.functionName,gasPrice:e.gasPrice,transactionHash:e.transactionHash,walletAddress:e.walletAddress,walletType:e.walletType},ecosystem:e.ecosystem})}async function B6(e){let t=wge(e.error);return C9({client:e.client,data:{action:"transaction:insufficient_funds",chainId:e.chainId,clientId:e.client.clientId,contractAddress:e.contractAddress,errorCode:t.code?pe(t.code):void 0,errorMessage:t.message,functionName:e.functionName,requiredAmount:e.requiredAmount?.toString(),transactionValue:e.transactionValue?.toString(),userBalance:e.userBalance?.toString(),walletAddress:e.walletAddress},ecosystem:e.ecosystem})}var vh=p(()=>{"use strict";Nt();vC();wN()});function bge(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?lNt:BigInt("0x"+e)}var lNt,Djn,Age=p(()=>{"use strict";lNt=BigInt(0);Djn=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function"});var xge,vge=p(()=>{"use strict";xge="0.1.1"});function Cge(){return xge}var Ige=p(()=>{"use strict";vge()});function Tge(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?Tge(e.cause,t):t?null:e}var it,gu=p(()=>{"use strict";Ige();it=class e extends Error{constructor(t,n={}){let r=(()=>{if(n.cause instanceof e){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:n.cause?.message?n.cause.message:n.details})(),o=n.cause instanceof e&&n.cause.docsPath||n.docsPath,a=`https://oxlib.sh${o??""}`,s=[t||"An error occurred.",...n.metaMessages?["",...n.metaMessages]:[],...r||o?["",r?`Details: ${r}`:void 0,o?`See: ${a}`:void 0]:[]].filter(l=>typeof l=="string").join(`
|
|
10
|
+
`).replace(hPt,"")}function D2e(e,t){return t=Xme(t),Xme(e)===t}function dN(){}function ur(e,t,n,r,o,i){switch(n){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||g6(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&g6(e,""+r);break;case"className":KE(e,"class",r);break;case"tabIndex":KE(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":KE(e,n,r);break;case"style":D0e(e,r,i);break;case"data":if(t!=="object"){KE(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=uP(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(n==="formAction"?(t!=="input"&&ur(e,t,"name",o.name,o,null),ur(e,t,"formEncType",o.formEncType,o,null),ur(e,t,"formMethod",o.formMethod,o,null),ur(e,t,"formTarget",o.formTarget,o,null)):(ur(e,t,"encType",o.encType,o,null),ur(e,t,"method",o.method,o,null),ur(e,t,"target",o.target,o,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=uP(""+r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=dN);break;case"onScroll":r!=null&&$t("scroll",e);break;case"onScrollEnd":r!=null&&$t("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(re(61));if(n=r.__html,n!=null){if(o.children!=null)throw Error(re(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}n=uP(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""+r):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":r===!0?e.setAttribute(n,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":$t("beforetoggle",e),$t("toggle",e),cP(e,"popover",r);break;case"xlinkActuate":Df(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":Df(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":Df(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":Df(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":Df(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":Df(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":Df(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":Df(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":Df(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":cP(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Gkt.get(n)||n,cP(e,n,r))}}function iq(e,t,n,r,o,i){switch(n){case"style":D0e(e,r,i);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(re(61));if(n=r.__html,n!=null){if(o.children!=null)throw Error(re(60));e.innerHTML=n}}break;case"children":typeof r=="string"?g6(e,r):(typeof r=="number"||typeof r=="bigint")&&g6(e,""+r);break;case"onScroll":r!=null&&$t("scroll",e);break;case"onScrollEnd":r!=null&&$t("scrollend",e);break;case"onClick":r!=null&&(e.onclick=dN);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!S0e.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(o=n.endsWith("Capture"),t=n.slice(2,o?n.length-7:void 0),i=e[al]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,o),typeof r=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,o);break e}n in e?e[n]=r:r===!0?e.setAttribute(n,""):cP(e,n,r)}}}function ra(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":$t("error",e),$t("load",e);var r=!1,o=!1,i;for(i in n)if(n.hasOwnProperty(i)){var a=n[i];if(a!=null)switch(i){case"src":r=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(re(137,t));default:ur(e,t,i,a,n,null)}}o&&ur(e,t,"srcSet",n.srcSet,n,null),r&&ur(e,t,"src",n.src,n,null);return;case"input":$t("invalid",e);var s=i=a=o=null,l=null,c=null;for(r in n)if(n.hasOwnProperty(r)){var u=n[r];if(u!=null)switch(r){case"name":o=u;break;case"type":a=u;break;case"checked":l=u;break;case"defaultChecked":c=u;break;case"value":i=u;break;case"defaultValue":s=u;break;case"children":case"dangerouslySetInnerHTML":if(u!=null)throw Error(re(137,t));break;default:ur(e,t,r,u,n,null)}}E0e(e,i,s,l,c,a,o,!1),SP(e);return;case"select":$t("invalid",e),r=a=i=null;for(o in n)if(n.hasOwnProperty(o)&&(s=n[o],s!=null))switch(o){case"value":i=s;break;case"defaultValue":a=s;break;case"multiple":r=s;default:ur(e,t,o,s,n,null)}t=i,n=a,e.multiple=!!r,t!=null?s6(e,!!r,t,!1):n!=null&&s6(e,!!r,n,!0);return;case"textarea":$t("invalid",e),i=o=r=null;for(a in n)if(n.hasOwnProperty(a)&&(s=n[a],s!=null))switch(a){case"value":r=s;break;case"defaultValue":o=s;break;case"children":i=s;break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(re(91));break;default:ur(e,t,a,s,n,null)}N0e(e,r,o,i),SP(e);return;case"option":for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:ur(e,t,l,r,n,null)}return;case"dialog":$t("beforetoggle",e),$t("toggle",e),$t("cancel",e),$t("close",e);break;case"iframe":case"object":$t("load",e);break;case"video":case"audio":for(r=0;r<Fv.length;r++)$t(Fv[r],e);break;case"image":$t("error",e),$t("load",e);break;case"details":$t("toggle",e);break;case"embed":case"source":case"link":$t("error",e),$t("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(c in n)if(n.hasOwnProperty(c)&&(r=n[c],r!=null))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(re(137,t));default:ur(e,t,c,r,n,null)}return;default:if(xq(t)){for(u in n)n.hasOwnProperty(u)&&(r=n[u],r!==void 0&&iq(e,t,u,r,n,void 0));return}}for(s in n)n.hasOwnProperty(s)&&(r=n[s],r!=null&&ur(e,t,s,r,n,null))}function gPt(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,i=null,a=null,s=null,l=null,c=null,u=null;for(m in n){var d=n[m];if(n.hasOwnProperty(m)&&d!=null)switch(m){case"checked":break;case"value":break;case"defaultValue":l=d;default:r.hasOwnProperty(m)||ur(e,t,m,null,r,d)}}for(var f in r){var m=r[f];if(d=n[f],r.hasOwnProperty(f)&&(m!=null||d!=null))switch(f){case"type":i=m;break;case"name":o=m;break;case"checked":c=m;break;case"defaultChecked":u=m;break;case"value":a=m;break;case"defaultValue":s=m;break;case"children":case"dangerouslySetInnerHTML":if(m!=null)throw Error(re(137,t));break;default:m!==d&&ur(e,t,f,m,r,d)}}EQ(e,a,s,l,c,u,i,o);return;case"select":m=a=s=f=null;for(i in n)if(l=n[i],n.hasOwnProperty(i)&&l!=null)switch(i){case"value":break;case"multiple":m=l;default:r.hasOwnProperty(i)||ur(e,t,i,null,r,l)}for(o in r)if(i=r[o],l=n[o],r.hasOwnProperty(o)&&(i!=null||l!=null))switch(o){case"value":f=i;break;case"defaultValue":s=i;break;case"multiple":a=i;default:i!==l&&ur(e,t,o,i,r,l)}t=s,n=a,r=m,f!=null?s6(e,!!n,f,!1):!!r!=!!n&&(t!=null?s6(e,!!n,t,!0):s6(e,!!n,n?[]:"",!1));return;case"textarea":m=f=null;for(s in n)if(o=n[s],n.hasOwnProperty(s)&&o!=null&&!r.hasOwnProperty(s))switch(s){case"value":break;case"children":break;default:ur(e,t,s,null,r,o)}for(a in r)if(o=r[a],i=n[a],r.hasOwnProperty(a)&&(o!=null||i!=null))switch(a){case"value":f=o;break;case"defaultValue":m=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(re(91));break;default:o!==i&&ur(e,t,a,o,r,i)}P0e(e,f,m);return;case"option":for(var h in n)if(f=n[h],n.hasOwnProperty(h)&&f!=null&&!r.hasOwnProperty(h))switch(h){case"selected":e.selected=!1;break;default:ur(e,t,h,null,r,f)}for(l in r)if(f=r[l],m=n[l],r.hasOwnProperty(l)&&f!==m&&(f!=null||m!=null))switch(l){case"selected":e.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:ur(e,t,l,f,r,m)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var g in n)f=n[g],n.hasOwnProperty(g)&&f!=null&&!r.hasOwnProperty(g)&&ur(e,t,g,null,r,f);for(c in r)if(f=r[c],m=n[c],r.hasOwnProperty(c)&&f!==m&&(f!=null||m!=null))switch(c){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(re(137,t));break;default:ur(e,t,c,f,r,m)}return;default:if(xq(t)){for(var w in n)f=n[w],n.hasOwnProperty(w)&&f!==void 0&&!r.hasOwnProperty(w)&&iq(e,t,w,void 0,r,f);for(u in r)f=r[u],m=n[u],!r.hasOwnProperty(u)||f===m||f===void 0&&m===void 0||iq(e,t,u,f,r,m);return}}for(var b in n)f=n[b],n.hasOwnProperty(b)&&f!=null&&!r.hasOwnProperty(b)&&ur(e,t,b,null,r,f);for(d in r)f=r[d],m=n[d],!r.hasOwnProperty(d)||f===m||f==null&&m==null||ur(e,t,d,f,r,m)}var aq=null,sq=null;function qP(e){return e.nodeType===9?e:e.ownerDocument}function Jme(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function L2e(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function lq(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var bQ=null;function yPt(){var e=window.event;return e&&e.type==="popstate"?e===bQ?!1:(bQ=e,!0):(bQ=null,!1)}var O2e=typeof setTimeout=="function"?setTimeout:void 0,wPt=typeof clearTimeout=="function"?clearTimeout:void 0,_me=typeof Promise=="function"?Promise:void 0,bPt=typeof queueMicrotask=="function"?queueMicrotask:typeof _me<"u"?function(e){return _me.resolve(null).then(e).catch(APt)}:O2e;function APt(e){setTimeout(function(){throw e})}function xh(e){return e==="head"}function $me(e,t){var n=t,r=0,o=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(0<r&&8>r){n=r;var a=e.ownerDocument;if(n&1&&Ov(a.documentElement),n&2&&Ov(a.body),n&4)for(n=a.head,Ov(n),a=n.firstChild;a;){var s=a.nextSibling,l=a.nodeName;a[$v]||l==="SCRIPT"||l==="STYLE"||l==="LINK"&&a.rel.toLowerCase()==="stylesheet"||n.removeChild(a),a=s}}if(o===0){e.removeChild(i),Yv(t);return}o--}else n==="$"||n==="$?"||n==="$!"?o++:r=n.charCodeAt(0)-48;else r=0;n=i}while(n);Yv(t)}function cq(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":cq(n),Aq(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function xPt(e,t,n,r){for(;e.nodeType===1;){var o=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[$v])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=Dd(e.nextSibling),e===null)break}return null}function vPt(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Dd(e.nextSibling),e===null))return null;return e}function uq(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function CPt(e,t){var n=e.ownerDocument;if(e.data!=="$?"||n.readyState==="complete")t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function Dd(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}var dq=null;function e0e(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}function R2e(e,t,n){switch(t=qP(n),e){case"html":if(e=t.documentElement,!e)throw Error(re(452));return e;case"head":if(e=t.head,!e)throw Error(re(453));return e;case"body":if(e=t.body,!e)throw Error(re(454));return e;default:throw Error(re(451))}}function Ov(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Aq(e)}var fu=new Map,t0e=new Set;function GP(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Gf=Hn.d;Hn.d={f:IPt,r:TPt,D:SPt,C:MPt,L:kPt,m:EPt,X:NPt,S:PPt,M:DPt};function IPt(){var e=Gf.f(),t=lN();return e||t}function TPt(e){var t=S6(e);t!==null&&t.tag===5&&t.type==="form"?khe(t):Gf.r(e)}var E6=typeof document>"u"?null:document;function j2e(e,t,n){var r=E6;if(r&&typeof t=="string"&&t){var o=cu(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof n=="string"&&(o+='[crossorigin="'+n+'"]'),t0e.has(o)||(t0e.add(o),e={rel:e,crossOrigin:n,href:t},r.querySelector(o)===null&&(t=r.createElement("link"),ra(t,"link",e),Hi(t),r.head.appendChild(t)))}}function SPt(e){Gf.D(e),j2e("dns-prefetch",e,null)}function MPt(e,t){Gf.C(e,t),j2e("preconnect",e,t)}function kPt(e,t,n){Gf.L(e,t,n);var r=E6;if(r&&e&&t){var o='link[rel="preload"][as="'+cu(t)+'"]';t==="image"&&n&&n.imageSrcSet?(o+='[imagesrcset="'+cu(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(o+='[imagesizes="'+cu(n.imageSizes)+'"]')):o+='[href="'+cu(e)+'"]';var i=o;switch(t){case"style":i=I6(e);break;case"script":i=P6(e)}fu.has(i)||(e=Ur({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),fu.set(i,e),r.querySelector(o)!==null||t==="style"&&r.querySelector(cC(i))||t==="script"&&r.querySelector(uC(i))||(t=r.createElement("link"),ra(t,"link",e),Hi(t),r.head.appendChild(t)))}}function EPt(e,t){Gf.m(e,t);var n=E6;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+cu(r)+'"][href="'+cu(e)+'"]',i=o;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=P6(e)}if(!fu.has(i)&&(e=Ur({rel:"modulepreload",href:e},t),fu.set(i,e),n.querySelector(o)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(uC(i)))return}r=n.createElement("link"),ra(r,"link",e),Hi(r),n.head.appendChild(r)}}}function PPt(e,t,n){Gf.S(e,t,n);var r=E6;if(r&&e){var o=a6(r).hoistableStyles,i=I6(e);t=t||"default";var a=o.get(i);if(!a){var s={loading:0,preload:null};if(a=r.querySelector(cC(i)))s.loading=5;else{e=Ur({rel:"stylesheet",href:e,"data-precedence":t},n),(n=fu.get(i))&&rG(e,n);var l=a=r.createElement("link");Hi(l),ra(l,"link",e),l._p=new Promise(function(c,u){l.onload=c,l.onerror=u}),l.addEventListener("load",function(){s.loading|=1}),l.addEventListener("error",function(){s.loading|=2}),s.loading|=4,bP(a,t,r)}a={type:"stylesheet",instance:a,count:1,state:s},o.set(i,a)}}}function NPt(e,t){Gf.X(e,t);var n=E6;if(n&&e){var r=a6(n).hoistableScripts,o=P6(e),i=r.get(o);i||(i=n.querySelector(uC(o)),i||(e=Ur({src:e,async:!0},t),(t=fu.get(o))&&oG(e,t),i=n.createElement("script"),Hi(i),ra(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(o,i))}}function DPt(e,t){Gf.M(e,t);var n=E6;if(n&&e){var r=a6(n).hoistableScripts,o=P6(e),i=r.get(o);i||(i=n.querySelector(uC(o)),i||(e=Ur({src:e,async:!0,type:"module"},t),(t=fu.get(o))&&oG(e,t),i=n.createElement("script"),Hi(i),ra(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(o,i))}}function n0e(e,t,n,r){var o=(o=ch.current)?GP(o):null;if(!o)throw Error(re(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=I6(n.href),n=a6(o).hoistableStyles,r=n.get(t),r||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=I6(n.href);var i=a6(o).hoistableStyles,a=i.get(e);if(a||(o=o.ownerDocument||o,a={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,a),(i=o.querySelector(cC(e)))&&!i._p&&(a.instance=i,a.state.loading=5),fu.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},fu.set(e,n),i||LPt(o,e,n,a.state))),t&&r===null)throw Error(re(528,""));return a}if(t&&r!==null)throw Error(re(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=P6(n),n=a6(o).hoistableScripts,r=n.get(t),r||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(re(444,e))}}function I6(e){return'href="'+cu(e)+'"'}function cC(e){return'link[rel="stylesheet"]['+e+"]"}function B2e(e){return Ur({},e,{"data-precedence":e.precedence,precedence:null})}function LPt(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),ra(t,"link",n),Hi(t),e.head.appendChild(t))}function P6(e){return'[src="'+cu(e)+'"]'}function uC(e){return"script[async]"+e}function r0e(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+cu(n.href)+'"]');if(r)return t.instance=r,Hi(r),r;var o=Ur({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Hi(r),ra(r,"style",o),bP(r,n.precedence,e),t.instance=r;case"stylesheet":o=I6(n.href);var i=e.querySelector(cC(o));if(i)return t.state.loading|=4,t.instance=i,Hi(i),i;r=B2e(n),(o=fu.get(o))&&rG(r,o),i=(e.ownerDocument||e).createElement("link"),Hi(i);var a=i;return a._p=new Promise(function(s,l){a.onload=s,a.onerror=l}),ra(i,"link",r),t.state.loading|=4,bP(i,n.precedence,e),t.instance=i;case"script":return i=P6(n.src),(o=e.querySelector(uC(i)))?(t.instance=o,Hi(o),o):(r=n,(o=fu.get(i))&&(r=Ur({},n),oG(r,o)),e=e.ownerDocument||e,o=e.createElement("script"),Hi(o),ra(o,"link",r),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(re(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,bP(r,n.precedence,e));return t.instance}function bP(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=r.length?r[r.length-1]:null,i=o,a=0;a<r.length;a++){var s=r[a];if(s.dataset.precedence===t)i=s;else if(i!==o)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function rG(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function oG(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var AP=null;function o0e(e,t,n){if(AP===null){var r=new Map,o=AP=new Map;o.set(n,r)}else o=AP,r=o.get(n),r||(r=new Map,o.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),o=0;o<n.length;o++){var i=n[o];if(!(i[$v]||i[Oa]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var a=i.getAttribute(t)||"";a=e+a;var s=r.get(a);s?s.push(i):r.set(a,[i])}}return r}function i0e(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function OPt(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function z2e(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Zv=null;function RPt(){}function jPt(e,t,n){if(Zv===null)throw Error(re(475));var r=Zv;if(t.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var o=I6(n.href),i=e.querySelector(cC(o));if(i){e=i._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(r.count++,r=YP.bind(r),e.then(r,r)),t.state.loading|=4,t.instance=i,Hi(i);return}i=e.ownerDocument||e,n=B2e(n),(o=fu.get(o))&&rG(n,o),i=i.createElement("link"),Hi(i);var a=i;a._p=new Promise(function(s,l){a.onload=s,a.onerror=l}),ra(i,"link",n),t.instance=i}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(r.count++,t=YP.bind(r),e.addEventListener("load",t),e.addEventListener("error",t))}}function BPt(){if(Zv===null)throw Error(re(475));var e=Zv;return e.stylesheets&&e.count===0&&pq(e,e.stylesheets),0<e.count?function(t){var n=setTimeout(function(){if(e.stylesheets&&pq(e,e.stylesheets),e.unsuspend){var r=e.unsuspend;e.unsuspend=null,r()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}function YP(){if(this.count--,this.count===0){if(this.stylesheets)pq(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var KP=null;function pq(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,KP=new Map,t.forEach(zPt,e),KP=null,YP.call(e))}function zPt(e,t){if(!(t.state.loading&4)){var n=KP.get(e);if(n)var r=n.get(null);else{n=new Map,KP.set(e,n);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<o.length;i++){var a=o[i];(a.nodeName==="LINK"||a.getAttribute("media")!=="not all")&&(n.set(a.dataset.precedence,a),r=a)}r&&n.set(null,r)}o=t.instance,a=o.getAttribute("data-precedence"),i=n.get(a)||r,i===r&&n.set(null,o),n.set(a,o),this.count++,r=YP.bind(this),o.addEventListener("load",r),o.addEventListener("error",r),i?i.parentNode.insertBefore(o,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var Qv={$$typeof:jf,Provider:null,Consumer:null,_currentValue:s9,_currentValue2:s9,_threadCount:0};function UPt(e,t,n,r,o,i,a,s){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ZZ(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ZZ(0),this.hiddenUpdates=ZZ(null),this.identifierPrefix=r,this.onUncaughtError=o,this.onCaughtError=i,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=s,this.incompleteTransitions=new Map}function U2e(e,t,n,r,o,i,a,s,l,c,u,d){return e=new UPt(e,t,n,a,s,l,c,d),t=1,i===!0&&(t|=24),i=pc(3,null,null,t),e.current=i,i.stateNode=e,t=Dq(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:r,isDehydrated:n,cache:t},Oq(i),e}function H2e(e){return e?(e=n6,e):n6}function W2e(e,t,n,r,o,i){o=H2e(o),r.context===null?r.context=o:r.pendingContext=o,r=uh(t),r.payload={element:n},i=i===void 0?null:i,i!==null&&(r.callback=i),n=dh(e,r,t),n!==null&&(gc(n,e,t),Sv(n,e,t))}function a0e(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function iG(e,t){a0e(e,t),(e=e.alternate)&&a0e(e,t)}function F2e(e){if(e.tag===13){var t=M6(e,67108864);t!==null&&gc(t,e,67108864),iG(e,67108864)}}var XP=!0;function HPt(e,t,n,r){var o=dt.T;dt.T=null;var i=Hn.p;try{Hn.p=2,aG(e,t,n,r)}finally{Hn.p=i,dt.T=o}}function WPt(e,t,n,r){var o=dt.T;dt.T=null;var i=Hn.p;try{Hn.p=8,aG(e,t,n,r)}finally{Hn.p=i,dt.T=o}}function aG(e,t,n,r){if(XP){var o=fq(r);if(o===null)wQ(e,t,r,JP,n),s0e(e,r);else if(VPt(o,e,t,n,r))r.stopPropagation();else if(s0e(e,r),t&4&&-1<FPt.indexOf(e)){for(;o!==null;){var i=S6(o);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var a=o9(i.pendingLanes);if(a!==0){var s=i;for(s.pendingLanes|=2,s.entangledLanes|=2;a;){var l=1<<31-mc(a);s.entanglements[1]|=l,a&=~l}_1(i),(tr&6)===0&&(WP=K1()+500,lC(0,!1))}}break;case 13:s=M6(i,2),s!==null&&gc(s,i,2),lN(),iG(i,2)}if(i=fq(r),i===null&&wQ(e,t,r,JP,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else wQ(e,t,r,null,n)}}function fq(e){return e=vq(e),sG(e)}var JP=null;function sG(e){if(JP=null,e=Xy(e),e!==null){var t=Kv(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=f0e(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return JP=e,null}function V2e(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ekt()){case y0e:return 2;case w0e:return 8;case TP:case Pkt:return 32;case b0e:return 268435456;default:return 32}default:return 32}}var mq=!1,mh=null,hh=null,gh=null,qv=new Map,Gv=new Map,oh=[],FPt="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".split(" ");function s0e(e,t){switch(e){case"focusin":case"focusout":mh=null;break;case"dragenter":case"dragleave":hh=null;break;case"mouseover":case"mouseout":gh=null;break;case"pointerover":case"pointerout":qv.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gv.delete(t.pointerId)}}function hv(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=S6(t),t!==null&&F2e(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function VPt(e,t,n,r,o){switch(t){case"focusin":return mh=hv(mh,e,t,n,r,o),!0;case"dragenter":return hh=hv(hh,e,t,n,r,o),!0;case"mouseover":return gh=hv(gh,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return qv.set(i,hv(qv.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Gv.set(i,hv(Gv.get(i)||null,e,t,n,r,o)),!0}return!1}function Z2e(e){var t=Xy(e.target);if(t!==null){var n=Kv(t);if(n!==null){if(t=n.tag,t===13){if(t=f0e(n),t!==null){e.blockedOn=t,zkt(e.priority,function(){if(n.tag===13){var r=hc();r=wq(r);var o=M6(n,r);o!==null&&gc(o,n,r),iG(n,r)}});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function xP(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=fq(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);NQ=r,n.target.dispatchEvent(r),NQ=null}else return t=S6(n),t!==null&&F2e(t),e.blockedOn=n,!1;t.shift()}return!0}function l0e(e,t,n){xP(e)&&n.delete(t)}function ZPt(){mq=!1,mh!==null&&xP(mh)&&(mh=null),hh!==null&&xP(hh)&&(hh=null),gh!==null&&xP(gh)&&(gh=null),qv.forEach(l0e),Gv.forEach(l0e)}function sP(e,t){e.blockedOn===t&&(e.blockedOn=null,mq||(mq=!0,vi.unstable_scheduleCallback(vi.unstable_NormalPriority,ZPt)))}var lP=null;function c0e(e){lP!==e&&(lP=e,vi.unstable_scheduleCallback(vi.unstable_NormalPriority,function(){lP===e&&(lP=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],o=e[t+2];if(typeof r!="function"){if(sG(r||n)===null)continue;break}var i=S6(n);i!==null&&(e.splice(t,3),t-=3,GQ(i,{pending:!0,data:o,method:n.method,action:r},r,o))}}))}function Yv(e){function t(l){return sP(l,e)}mh!==null&&sP(mh,e),hh!==null&&sP(hh,e),gh!==null&&sP(gh,e),qv.forEach(t),Gv.forEach(t);for(var n=0;n<oh.length;n++){var r=oh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<oh.length&&(n=oh[0],n.blockedOn===null);)Z2e(n),n.blockedOn===null&&oh.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var o=n[r],i=n[r+1],a=o[al]||null;if(typeof i=="function")a||c0e(n);else if(a){var s=null;if(i&&i.hasAttribute("formAction")){if(o=i,a=i[al]||null)s=a.formAction;else if(sG(o)!==null)continue}else s=a.action;typeof s=="function"?n[r+1]=s:(n.splice(r,3),r-=3),c0e(n)}}}function lG(e){this._internalRoot=e}pN.prototype.render=lG.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(re(409));var n=t.current,r=hc();W2e(n,r,e,t,null,null)};pN.prototype.unmount=lG.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;W2e(e.current,2,null,e,null,null),lN(),t[T6]=null}};function pN(e){this._internalRoot=e}pN.prototype.unstable_scheduleHydration=function(e){if(e){var t=I0e();e={blockedOn:null,target:e,priority:t};for(var n=0;n<oh.length&&t!==0&&t<oh[n].priority;n++);oh.splice(n,0,e),n===0&&Z2e(e)}};var u0e=d0e.version;if(u0e!=="19.1.0")throw Error(re(527,u0e,"19.1.0"));Hn.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(re(188)):(e=Object.keys(e).join(","),Error(re(268,e)));return e=vkt(t),e=e!==null?m0e(e):null,e=e===null?null:e.stateNode,e};var QPt={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:dt,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(gv=__REACT_DEVTOOLS_GLOBAL_HOOK__,!gv.isDisabled&&gv.supportsFiber))try{Xv=gv.inject(QPt),fc=gv}catch{}var gv;fN.createRoot=function(e,t){if(!p0e(e))throw Error(re(299));var n=!1,r="",o=Uhe,i=Hhe,a=Whe,s=null;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(a=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(s=t.unstable_transitionCallbacks)),t=U2e(e,1,!1,null,null,n,r,o,i,a,s,null),e[T6]=t.current,nG(e),new lG(t)};fN.hydrateRoot=function(e,t,n){if(!p0e(e))throw Error(re(299));var r=!1,o="",i=Uhe,a=Hhe,s=Whe,l=null,c=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(a=n.onCaughtError),n.onRecoverableError!==void 0&&(s=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(l=n.unstable_transitionCallbacks),n.formState!==void 0&&(c=n.formState)),t=U2e(e,1,!0,t,n??null,r,o,i,a,s,l,c),t.context=H2e(null),n=t.current,r=hc(),r=wq(r),o=uh(r),o.callback=null,dh(n,o,r),n=r,t.current.lanes=n,_v(t,n),_1(t),e[T6]=t.current,nG(e),new pN(t)};fN.version="19.1.0"});var Y2e=Ie((ejn,G2e)=>{"use strict";function q2e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(q2e)}catch(e){console.error(e)}}q2e(),G2e.exports=Q2e()});var kn,bs=p(()=>{"use strict";kn={async getItem(e){try{if(typeof window<"u"&&window.localStorage)return localStorage.getItem(e)}catch{}return null},async removeItem(e){typeof window<"u"&&window.localStorage&&localStorage.removeItem(e)},async setItem(e,t){try{typeof window<"u"&&window.localStorage&&localStorage.setItem(e,t)}catch{}}}});var pC={};y(pC,{DEFAULT_RPC_URL:()=>dC,getServiceKey:()=>uG,getThirdwebBaseUrl:()=>Be,getThirdwebDomains:()=>mu,setServiceKey:()=>GPt,setThirdwebDomains:()=>qPt});var dC,K2e,X2e,J2e,_2e,$2e,ege,tge,nge,rge,cG,qPt,mu,Be,oge,GPt,uG,an=p(()=>{"use strict";dC="rpc.thirdweb.com",K2e="social.thirdweb.com",X2e="embedded-wallet.thirdweb.com",J2e="pay.thirdweb.com",_2e="storage.thirdweb.com",$2e="bundler.thirdweb.com",ege="c.thirdweb.com",tge="insight.thirdweb.com",nge="engine.thirdweb.com",rge="bridge.thirdweb.com",cG={analytics:ege,bridge:rge,bundler:$2e,engineCloud:nge,inAppWallet:X2e,insight:tge,pay:J2e,rpc:dC,social:K2e,storage:_2e},qPt=e=>{cG={analytics:e.analytics??ege,bridge:e.bridge??rge,bundler:e.bundler??$2e,engineCloud:e.engineCloud??nge,inAppWallet:e.inAppWallet??X2e,insight:e.insight??tge,pay:e.pay??J2e,rpc:e.rpc??dC,social:e.social??K2e,storage:e.storage??_2e}},mu=()=>cG,Be=e=>{let t=cG[e];return t.startsWith("localhost")?`http://${t}`:`https://${t}`},oge=null,GPt=e=>{oge=e},uG=()=>oge});var ige,age=p(()=>{"use strict";ige="5.110.4"});var hu,N6=p(()=>{"use strict";hu=class extends Map{constructor(n){super();Ve(this,"maxSize");this.maxSize=n}get(n){let r=super.get(n);return super.has(n)&&r!==void 0&&(this.delete(n),super.set(n,r)),r}set(n,r){if(super.set(n,r),this.maxSize&&this.size>this.maxSize){let o=this.keys().next().value;o&&this.delete(o)}return this}}});function lge(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?"mobile":typeof navigator<"u"?"browser":"node"}function fC(e){for(let t=0,n=sge.length;t<n;t++){let[r,o]=sge[t];if(o.exec(e))return r}return null}var sge,dG=p(()=>{"use strict";sge=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]]});function mC(e){return e.split(".").length===3}var pG=p(()=>{"use strict"});var mN,cge,hN=p(()=>{"use strict";mN=typeof process<"u"&&process.env&&!1,cge=typeof process<"u"&&process.env&&!1});var hC={};y(hC,{IS_THIRDWEB_URL_CACHE:()=>D6,getClientFetch:()=>Pe,getPlatformHeaders:()=>uge,isThirdwebUrl:()=>L6});function Pe(e,t){async function n(r,o){let{requestTimeoutMs:i=YPt,useAuthToken:a,...s}=o||{},l=s.headers?new Headers(s.headers):typeof r=="object"?r.headers:void 0,c=typeof r=="string"?r:r.url;if(L6(c)){l||(l=new Headers);let f=a&&e.secretKey&&mC(e.secretKey)?e.secretKey:void 0,m=e.secretKey&&!mC(e.secretKey)?e.secretKey:void 0,h=e.clientId;f&&_Pt(c)?(l.set("authorization",`Bearer ${f}`),e.teamId&&l.set("x-team-id",e.teamId),h&&l.set("x-client-id",h)):f&&!XPt(c)&&!JPt(c)?(l.set("authorization",`Bearer ${f}`),e.teamId&&l.set("x-team-id",e.teamId)):(m&&l.set("x-secret-key",m),h&&l.set("x-client-id",h)),t&&(l.set("x-ecosystem-id",t.id),t.partnerId&&l.set("x-ecosystem-partner-id",t.partnerId));for(let[w,b]of uge())l.set(w,b);let g=uG();g&&l.set("x-service-api-key",g)}let u,d;return i&&(u=new AbortController,d=setTimeout(()=>{u?.abort("timeout")},i)),fetch(r,{...s,headers:l,signal:u?.signal}).finally(()=>{d&&clearTimeout(d)})}return n}function L6(e){if(D6.has(e))return D6.get(e);try{let{hostname:t}=new URL(e);try{if(mN&&t==="localhost")return D6.set(e,!0),!0}catch{}let n=KPt.some(r=>t.endsWith(r));return D6.set(e,n),n}catch{return D6.set(e,!1),!1}}function XPt(e){try{let{hostname:t}=new URL(e);return t.startsWith("pay.")}catch{return!1}}function JPt(e){try{let{hostname:t}=new URL(e);return t.startsWith("in-app-wallet.")||t.startsWith("embedded-wallet.")}catch{return!1}}function _Pt(e){try{let{hostname:t}=new URL(e);return t.endsWith(".bundler.thirdweb.com")||t.endsWith(".bundler.thirdweb-dev.com")}catch{return!1}}function uge(){if(gN)return gN;let e=null;typeof navigator<"u"&&(e=fC(navigator.userAgent));let t;return typeof globalThis<"u"&&"Application"in globalThis&&(t=globalThis.Application.applicationId),gN=Object.entries({"x-sdk-name":$Pt,"x-sdk-os":e?eNt(e):"unknown","x-sdk-platform":lge(),"x-sdk-version":ige,...t?{"x-bundle-id":t}:{}}),gN}function eNt(e){let t=e.toLowerCase();if(t.startsWith("win"))return"win";switch(e){case"Mac OS":return"mac";case"iOS":return"ios";case"Android OS":return"android";default:return t.replace(/\s/gi,"_")}}var YPt,KPt,D6,$Pt,gN,Kt=p(()=>{"use strict";age();N6();dG();an();pG();hN();YPt=6e4;KPt=[".thirdweb.com",".ipfscdn.io",".thirdweb.dev",".thirdweb-dev.com",".thirdwebstorage-dev.com"],D6=new hu(4096);$Pt="unified-sdk"});function rNt(e){let t=(o,i)=>({clear:()=>i.delete(o),get:()=>i.get(o),set:a=>i.set(o,a)}),n=t(e,tNt),r=t(e,nNt);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}async function nr(e,{cacheKey:t,cacheTime:n=Number.POSITIVE_INFINITY}){let r=rNt(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{let a=await i;return r.response.set({created:new Date,data:a}),a}finally{r.promise.clear()}}var tNt,nNt,As=p(()=>{"use strict";tNt=new Map,nNt=new Map});var bC={};y(bC,{CUSTOM_CHAIN_MAP:()=>O6,cacheChains:()=>fG,convertApiChainToChain:()=>v9,convertLegacyChain:()=>pge,convertViemChain:()=>fge,defineChain:()=>vt,getCachedChain:()=>We,getCachedChainIfExists:()=>Yf,getChainDecimals:()=>yC,getChainMetadata:()=>uo,getChainNativeCurrencyName:()=>wC,getChainSymbol:()=>gC,getInsightEnabledChainIds:()=>mG,getRpcUrlForChain:()=>R6});function vt(e){let t=mu().rpc;if(typeof e=="number")return{id:e,rpc:`https://${e}.${t}`};if(iNt(e))return fge(e);if(oNt(e))return pge(e);let n=e.rpc;n||(n=`https://${e.id}.${t}`);let r={...e,rpc:n};return O6.set(e.id,r),r}function fG(e){for(let t of e)O6.set(t.id,t)}function We(e){if(O6.has(e))return O6.get(e);let t=mu().rpc;return{id:e,rpc:`https://${e}.${t}`}}function Yf(e){return O6.get(e)}function oNt(e){return"rpc"in e&&Array.isArray(e.rpc)&&"slug"in e}function pge(e){let t=mu().rpc;return{blockExplorers:e?.explorers?.map(n=>({apiUrl:n.url,name:n.name,url:n.url})),faucets:e.faucets?[...e.faucets]:void 0,icon:e.icon,id:e.chainId,name:e.name,nativeCurrency:{decimals:e.nativeCurrency.decimals,name:e.nativeCurrency.name,symbol:e.nativeCurrency.symbol},rpc:e.rpc[0]??`https://${e.chainId}.${t}`,testnet:e.testnet?!0:void 0}}function iNt(e){return"rpcUrls"in e&&!("rpc"in e)}function fge(e){let t=mu().rpc;return{blockExplorers:e?.blockExplorers?Object.values(e?.blockExplorers).map(n=>({apiUrl:n.apiUrl,name:n.name,url:n.url})):[],id:e.id,name:e.name,nativeCurrency:{decimals:e.nativeCurrency.decimals,name:e.nativeCurrency.name,symbol:e.nativeCurrency.symbol},rpc:e.rpcUrls.default.http[0]??`https://${e.id}.${t}`,testnet:e.testnet?!0:void 0}}function R6(e){let t=mu().rpc;if(typeof e.chain=="number")return`https://${e.chain}.${t}/${e.client.clientId}`;let{rpc:n}=e.chain;if(L6(n)){let r=new URL(e.chain.rpc.replace(dC,t));return(r.pathname==="/"||r.pathname.startsWith("/$"))&&(r.pathname=`/${e.client.clientId}`),r.toString()}return n}async function gC(e){return e.nativeCurrency?.symbol?e.nativeCurrency.symbol:uo(e).then(t=>t.nativeCurrency.symbol).catch(()=>"ETH")}async function yC(e){return e.nativeCurrency?.decimals?e.nativeCurrency.decimals:uo(e).then(t=>t.nativeCurrency.decimals).catch(()=>18)}async function wC(e){return e.nativeCurrency?.name?e.nativeCurrency.name:uo(e).then(t=>t.nativeCurrency.name).catch(()=>"ETH")}function uo(e){let t=e.id;return nr(async()=>{try{let n=await fetch(`https://api.thirdweb.com/v1/chains/${t}`);if(!n.ok)throw new Error(`Failed to fetch chain data for chainId ${t}. ${n.status} ${n.statusText}`);let r=await n.json();if(r.error)throw new Error(`Failed to fetch chain data for chainId ${t}`);if(!r.data)throw new Error(`Failed to fetch chain data for chainId ${t}`);let o=r.data;return dge(e,o)}catch{return dge(e)}},{cacheKey:`chain:${t}`,cacheTime:5*60*1e3})}async function mG(){return nr(async()=>{let e=await fetch("https://api.thirdweb.com/v1/chains/services?service=insight");if(!e.ok)throw new Error(`Failed to fetch services. ${e.status} ${e.statusText}`);let t=await e.json();return Object.keys(t.data).map(n=>Number(n))},{cacheKey:"chain:insight-enabled",cacheTime:24*60*60*1e3})}function v9(e){return{blockExplorers:e.explorers?.map(t=>({apiUrl:t.url,name:t.name,url:t.url})),faucets:e.faucets?[...e.faucets]:void 0,icon:e.icon,id:e.chainId,name:e.name,nativeCurrency:e.nativeCurrency,rpc:e.rpc[0]||"",testnet:e.testnet===!0?!0:void 0}}function dge(e,t){let n=e.nativeCurrency?{...t?.nativeCurrency,...e.nativeCurrency}:t?.nativeCurrency;return{...t,chain:t?.chain||e.name||"",chainId:e.id||t?.chainId||-1,explorers:e.blockExplorers?.map(r=>({name:r.name,standard:"EIP3091",url:r.url}))||t?.explorers,icon:e.icon||t?.icon,name:e.name||t?.name||"",nativeCurrency:{decimals:n?.decimals||18,name:n?.name||"",symbol:n?.symbol||""},rpc:e.rpc?[e.rpc]:t?.rpc||[""],shortName:t?.shortName||e.name||"",slug:t?.slug||e.name||"",stackType:t?.stackType||"",testnet:e.testnet||t?.testnet||!1}}var O6,qe=p(()=>{"use strict";an();Kt();As();O6=new Map});function $1(e){let t=new Set,n=e,r=()=>{for(let o of t)o()};return{getValue(){return n},setValue(o){o!==n&&(n=o,r())},subscribe(o){return t.add(o),()=>{t.delete(o)}}}}var hG=p(()=>{"use strict"});var yN={};y(yN,{stringify:()=>pe});function pe(e,t,n){return JSON.stringify(e,(o,i)=>{let a=typeof i=="bigint"?i.toString():i;return typeof t=="function"?t(o,a):a},n)}var Nt=p(()=>{"use strict"});async function hge(e,t,n){if(!aNt(n))throw new Error("given params are not stringifiable");let r=await e.getItem(xC),o;if(r){try{o=JSON.parse(r)}catch{o={}}o[t]=n}else o={[t]:n};e.setItem(xC,pe(o))}async function gge(e,t){let n=await e.getItem(xC),r;if(n){try{r=JSON.parse(n)}catch{r={}}delete r[t],e.setItem(xC,pe(r))}}async function yge(e,t){let n=await e.getItem(xC);if(!n)return null;try{let r=JSON.parse(n);return r?.[t]?r[t]:null}catch{return null}}function aNt(e){try{return pe(e),!0}catch{return!1}}var xC,gG=p(()=>{"use strict";Nt();xC="tw:connected-wallet-params"});function j6(e){if(!e)return!1;let n=(typeof e=="string"?e:e?.message||e?.data?.message||"").toLowerCase();return n.includes("insufficient funds")||n.includes("insufficient balance")||n.includes("insufficient")&&(n.includes("native")||n.includes("gas"))||e?.code==="INSUFFICIENT_FUNDS"||e?.reason==="insufficient funds"}function wge(e){if(!e)return{message:"Unknown error"};let t=typeof e=="string"?e:e?.message||e?.data?.message||String(e);return{code:e?.code||e?.reason,message:t}}var vC=p(()=>{"use strict"});async function C9({client:e,ecosystem:t,data:n}){let r=Pe(e,t),o={source:"sdk",...n};return r(`${Be("analytics")}/event`,{body:pe(o),method:"POST"}).catch(()=>{})}var wN=p(()=>{"use strict";an();Kt();Nt()});async function xs(e){return sNt({...e,action:"transaction:sent"})}function sNt(e){return C9({client:e.client,data:{action:e.action,chainId:e.chainId,clientId:e.client.clientId,contractAddress:e.contractAddress,errorCode:pe(e.error),functionName:e.functionName,gasPrice:e.gasPrice,transactionHash:e.transactionHash,walletAddress:e.walletAddress,walletType:e.walletType},ecosystem:e.ecosystem})}async function B6(e){let t=wge(e.error);return C9({client:e.client,data:{action:"transaction:insufficient_funds",chainId:e.chainId,clientId:e.client.clientId,contractAddress:e.contractAddress,errorCode:t.code?pe(t.code):void 0,errorMessage:t.message,functionName:e.functionName,requiredAmount:e.requiredAmount?.toString(),transactionValue:e.transactionValue?.toString(),userBalance:e.userBalance?.toString(),walletAddress:e.walletAddress},ecosystem:e.ecosystem})}var vh=p(()=>{"use strict";Nt();vC();wN()});function bge(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?lNt:BigInt("0x"+e)}var lNt,Djn,Age=p(()=>{"use strict";lNt=BigInt(0);Djn=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function"});var xge,vge=p(()=>{"use strict";xge="0.1.1"});function Cge(){return xge}var Ige=p(()=>{"use strict";vge()});function Tge(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?Tge(e.cause,t):t?null:e}var it,gu=p(()=>{"use strict";Ige();it=class e extends Error{constructor(t,n={}){let r=(()=>{if(n.cause instanceof e){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:n.cause?.message?n.cause.message:n.details})(),o=n.cause instanceof e&&n.cause.docsPath||n.docsPath,a=`https://oxlib.sh${o??""}`,s=[t||"An error occurred.",...n.metaMessages?["",...n.metaMessages]:[],...r||o?["",r?`Details: ${r}`:void 0,o?`See: ${a}`:void 0]:[]].filter(l=>typeof l=="string").join(`
|
|
11
11
|
`);super(s,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,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:`ox@${Cge()}`}),this.cause=n.cause,this.details=r,this.docs=a,this.docsPath=o,this.shortMessage=t}walk(t){return Tge(this,t)}}});function I9(e,t,n){return JSON.stringify(e,(r,o)=>typeof t=="function"?t(r,o):typeof o=="bigint"?o.toString()+cNt:o,n)}var cNt,bN=p(()=>{"use strict";cNt="#__bigint"});function CC(e,t){if(wG(e)>t)throw new AN({givenSize:wG(e),maxSize:t})}function bG(e){if(e>=Kf.zero&&e<=Kf.nine)return e-Kf.zero;if(e>=Kf.A&&e<=Kf.F)return e-(Kf.A-10);if(e>=Kf.a&&e<=Kf.f)return e-(Kf.a-10)}function AG(e,t={}){let{dir:n,size:r=32}=t;if(r===0)return e;if(e.length>r)throw new xN({size:e.length,targetSize:r,type:"Bytes"});let o=new Uint8Array(r);for(let i=0;i<r;i++){let a=n==="right";o[a?i:r-i-1]=e[a?i:e.length-i-1]}return o}function Sge(e,t={}){let{dir:n="left"}=t,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}var Kf,xG=p(()=>{"use strict";ep();Kf={zero:48,nine:57,A:65,F:70,a:97,f:102}});function z6(e,t){if($r(e)>t)throw new vN({givenSize:$r(e),maxSize:t})}function kge(e,t){if(typeof t=="number"&&t>0&&t>$r(e)-1)throw new IC({offset:t,position:"start",size:$r(e)})}function Ege(e,t,n){if(typeof t=="number"&&typeof n=="number"&&$r(e)!==n-t)throw new IC({offset:n,position:"end",size:$r(e)})}function vG(e,t={}){let{dir:n,size:r=32}=t;if(r===0)return e;let o=e.replace("0x","");if(o.length>r*2)throw new CN({size:Math.ceil(o.length/2),targetSize:r,type:"Hex"});return`0x${o[n==="right"?"padEnd":"padStart"](r*2,"0")}`}function Pge(e,t={}){let{dir:n="left"}=t,r=e.replace("0x",""),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==="0"?"0x":n==="right"&&r.length%2===1?`0x${r}0`:`0x${r}`}var CG=p(()=>{"use strict";po()});function pNt(e,t={}){let{strict:n=!1}=t;if(!e)throw new IN(e);if(typeof e!="string")throw new IN(e);if(n&&!/^0x[0-9a-fA-F]*$/.test(e))throw new TN(e);if(!e.startsWith("0x"))throw new TN(e)}function rr(...e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function Dge(e){return e instanceof Uint8Array?ll(e):Array.isArray(e)?ll(new Uint8Array(e)):e}function U6(e,t={}){let n=`0x${Number(e)}`;return typeof t.size=="number"?(z6(n,t.size),Rd(n,t.size)):n}function ll(e,t={}){let n="";for(let o=0;o<e.length;o++)n+=dNt[e[o]];let r=`0x${n}`;return typeof t.size=="number"?(z6(r,t.size),yu(r,t.size)):r}function Ge(e,t={}){let{signed:n,size:r}=t,o=BigInt(e),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));let a=typeof i=="bigint"&&n?-i-1n:0;if(i&&o>i||o<a){let c=typeof e=="bigint"?"n":"";throw new TC({max:i?`${i}${c}`:void 0,min:`${a}${c}`,signed:n,size:r,value:`${e}${c}`})}let l=`0x${(n&&o<0?(1n<<BigInt(r*8))+BigInt(o):o).toString(16)}`;return r?Rd(l,r):l}function Ch(e,t={}){return ll(uNt.encode(e),t)}function Rd(e,t){return vG(e,{dir:"left",size:t})}function yu(e,t){return vG(e,{dir:"right",size:t})}function tp(e,t,n,r={}){let{strict:o}=r;kge(e,t);let i=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return o&&Ege(i,t,n),i}function $r(e){return Math.ceil((e.length-2)/2)}function T9(e){return Pge(e,{dir:"left"})}function jd(e,t={}){let{signed:n}=t;t.size&&z6(e,t.size);let r=BigInt(e);if(!n)return r;let o=(e.length-2)/2,i=(1n<<BigInt(o)*8n)-1n,a=i>>1n;return r<=a?r:r-i-1n}function Lge(e,t={}){return Bd(e,t)}function SC(e,t={}){let{signed:n,size:r}=t;return Number(!n&&!r?e:jd(e,t))}function Oge(e,t={}){let{size:n}=t,r=Bd(e);return n&&(CC(r,n),r=Rge(r)),new TextDecoder().decode(r)}function wu(e,t={}){let{strict:n=!1}=t;try{return pNt(e,{strict:n}),!0}catch{return!1}}var uNt,dNt,TC,IN,TN,vN,IC,CN,po=p(()=>{"use strict";ep();gu();bN();xG();CG();uNt=new TextEncoder,dNt=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));TC=class extends it{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"})}},IN=class extends it{constructor(t){super(`Value \`${typeof t=="object"?I9(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"})}},TN=class extends it{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"})}},vN=class extends it{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"})}},IC=class extends it{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"})}},CN=class extends it{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 SN(...e){let t=0;for(let r of e)t+=r.length;let n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){let i=e[r];n.set(i,o),o+=i.length}return n}function jge(e){return e instanceof Uint8Array?e:typeof e=="string"?Bd(e):mNt(e)}function mNt(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function Bge(e,t={}){let{size:n}=t,r=new Uint8Array(1);return r[0]=Number(e),typeof n=="number"?(CC(r,n),hNt(r,n)):r}function Bd(e,t={}){let{size:n}=t,r=e;n&&(z6(e,n),r=yu(e,n));let o=r.slice(2);o.length%2&&(o=`0${o}`);let i=o.length/2,a=new Uint8Array(i);for(let s=0,l=0;s<i;s++){let c=bG(o.charCodeAt(l++)),u=bG(o.charCodeAt(l++));if(c===void 0||u===void 0)throw new it(`Invalid byte sequence ("${o[l-2]}${o[l-1]}" in "${o}").`);a[s]=c*16+u}return a}function zge(e,t){let n=Ge(e,t);return Bd(n)}function H6(e,t={}){let{size:n}=t,r=fNt.encode(e);return typeof n=="number"?(CC(r,n),gNt(r,n)):r}function hNt(e,t){return AG(e,{dir:"left",size:t})}function gNt(e,t){return AG(e,{dir:"right",size:t})}function wG(e){return e.length}function Rge(e){return Sge(e,{dir:"right"})}var fNt,AN,xN,ep=p(()=>{"use strict";gu();po();xG();CG();fNt=new TextEncoder;AN=class extends it{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"})}},xN=class extends it{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"})}}});function qn(e,t={}){return wu(e,t)}var MC=p(()=>{"use strict";po()});function MN(e,t={}){switch(typeof e){case"number":case"bigint":return wNt(e,t);case"boolean":return yNt(e,t);default:return qn(e)?kC(e,t):cl(e,t)}}function yNt(e,t={}){return Bge(e,t)}function kC(e,t={}){return Bd(e,t)}function wNt(e,t){return zge(e,t)}function cl(e,t={}){return H6(e,t)}var Ih=p(()=>{"use strict";ep();MC()});function IG(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function bNt(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function W6(e,...t){if(!bNt(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 F6(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 kN(e,t){W6(e);let n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}var EN=p(()=>{"use strict"});function ANt(e,t=!1){return t?{h:Number(e&PN),l:Number(e>>Uge&PN)}:{h:Number(e>>Uge&PN)|0,l:Number(e&PN)|0}}function Hge(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let o=0;o<e.length;o++){let{h:i,l:a}=ANt(e[o],t);[n[o],r[o]]=[i,a]}return[n,r]}var PN,Uge,Wge,Fge,Vge,Zge,Qge=p(()=>{"use strict";PN=BigInt(4294967295),Uge=BigInt(32);Wge=(e,t,n)=>e<<n|t>>>32-n,Fge=(e,t,n)=>t<<n|e>>>32-n,Vge=(e,t,n)=>t<<n-32|e>>>64-n,Zge=(e,t,n)=>e<<n-32|t>>>64-n});function qge(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function NN(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function zd(e,t){return e<<32-t|e>>>t}function xNt(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function SG(e){for(let t=0;t<e.length;t++)e[t]=xNt(e[t])}function Gge(e){if(W6(e),vNt)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=CNt[e[n]];return t}function INt(e){if(typeof e!="string")throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array(new TextEncoder().encode(e))}function Z6(e){return typeof e=="string"&&(e=INt(e)),W6(e),e}function DN(e){let t=r=>e().update(Z6(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function Yge(e){let t=(r,o)=>e(o).update(Z6(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}var TG,vNt,CNt,V6,EC=p(()=>{"use strict";EN();TG=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;vNt=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",CNt=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));V6=class{clone(){return this._cloneInto()}}});function DNt(e,t=24){let n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let a=0;a<10;a++)n[a]=e[a]^e[a+10]^e[a+20]^e[a+30]^e[a+40];for(let a=0;a<10;a+=2){let s=(a+8)%10,l=(a+2)%10,c=n[l],u=n[l+1],d=Kge(c,u,1)^n[s],f=Xge(c,u,1)^n[s+1];for(let m=0;m<50;m+=10)e[a+m]^=d,e[a+m+1]^=f}let o=e[2],i=e[3];for(let a=0;a<24;a++){let s=_ge[a],l=Kge(o,i,s),c=Xge(o,i,s),u=Jge[a];o=e[u],i=e[u+1],e[u]=l,e[u+1]=c}for(let a=0;a<50;a+=10){for(let s=0;s<10;s++)n[s]=e[a+s];for(let s=0;s<10;s++)e[a+s]^=~n[(s+2)%10]&n[(s+4)%10]}e[0]^=PNt[r],e[1]^=NNt[r]}n.fill(0)}var Jge,_ge,$ge,TNt,PC,SNt,MNt,kNt,ENt,PNt,NNt,Kge,Xge,LN,Th,_jn,$jn,eBn,tBn,nBn,ON,rBn,oBn,e5e,iBn,aBn,MG=p(()=>{"use strict";EN();Qge();EC();Jge=[],_ge=[],$ge=[],TNt=BigInt(0),PC=BigInt(1),SNt=BigInt(2),MNt=BigInt(7),kNt=BigInt(256),ENt=BigInt(113);for(let e=0,t=PC,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],Jge.push(2*(5*r+n)),_ge.push((e+1)*(e+2)/2%64);let o=TNt;for(let i=0;i<7;i++)t=(t<<PC^(t>>MNt)*ENt)%kNt,t&SNt&&(o^=PC<<(PC<<BigInt(i))-PC);$ge.push(o)}[PNt,NNt]=Hge($ge,!0),Kge=(e,t,n)=>n>32?Vge(e,t,n):Wge(e,t,n),Xge=(e,t,n)=>n>32?Zge(e,t,n):Fge(e,t,n);LN=class e extends V6{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,IG(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=qge(this.state)}keccak(){TG||SG(this.state32),DNt(this.state32,this.rounds),TG||SG(this.state32),this.posOut=0,this.pos=0}update(t){F6(this);let{blockLen:n,state:r}=this;t=Z6(t);let o=t.length;for(let i=0;i<o;){let a=Math.min(n-this.pos,o-i);for(let s=0;s<a;s++)r[this.pos++]^=t[i++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{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){F6(this,!1),W6(t),this.finish();let n=this.state,{blockLen:r}=this;for(let o=0,i=t.length;o<i;){this.posOut>=r&&this.keccak();let a=Math.min(r-this.posOut,i-o);t.set(n.subarray(this.posOut,this.posOut+a),o),this.posOut+=a,o+=a}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return IG(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(kN(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,this.state.fill(0)}_cloneInto(t){let{blockLen:n,suffix:r,outputLen:o,rounds:i,enableXOF:a}=this;return t||(t=new e(n,r,o,a,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=a,t.destroyed=this.destroyed,t}},Th=(e,t,n)=>DN(()=>new LN(t,e,n)),_jn=Th(6,144,224/8),$jn=Th(6,136,256/8),eBn=Th(6,104,384/8),tBn=Th(6,72,512/8),nBn=Th(1,144,224/8),ON=Th(1,136,256/8),rBn=Th(1,104,384/8),oBn=Th(1,72,512/8),e5e=(e,t,n)=>Yge((r={})=>new LN(t,e,r.dkLen===void 0?n:r.dkLen,!0)),iBn=e5e(31,168,128/8),aBn=e5e(31,136,256/8)});function Sh(e,t={}){let{dir:n,size:r=32}=t;return r===null?e:n==="right"?yu(e,r):Rd(e,r)}function t5e(e,t={}){return Oge(e,t)}function sn(e,t={}){return jd(e,t)}function Ud(e,t={}){return SC(e,t)}function RN(e,t={}){return Lge(e,t)}function kG(e,t={}){return U6(e,t)}function vs(e,t={}){return ll(e,t)}function ln(e,t={}){return Ge(e,t)}function bu(e,t={}){return Ch(e,t)}function En(e,t={}){switch(typeof e){case"number":case"bigint":return ln(e,t);case"string":return bu(e,t);case"boolean":return kG(e,t);default:return vs(e,t)}}var Dt=p(()=>{"use strict";po();MC()});function Ci(e,t){let n=ON(qn(e,{strict:!1})?RN(e):e);return t==="bytes"?n:vs(n)}var S9=p(()=>{"use strict";MG();Dt()});function eo(e){if(EG.has(e))return EG.get(e);let t=LNt.test(e)&&(e.toLowerCase()===e||Hd(e)===e);return EG.set(e,t),t}function Hd(e){let t=e.substring(2).toLowerCase(),n=Ci(cl(t),"bytes"),r=t.split("");for(let o=0;o<40;o+=2)n[o>>1]>>4>=8&&e[o]&&(r[o]=r[o].toUpperCase()),(n[o>>1]&15)>=8&&e[o+1]&&(r[o+1]=r[o+1].toUpperCase());return`0x${r.join("")}`}function ge(e){if(!eo(e))throw new Error(`Invalid address: ${e}`);return Hd(e)}function Vi(e,t=4){let n=ge(e);return Q6(n,t)}function Q6(e,t=4){return`${e.slice(0,t+2)}...${e.slice(-t)}`}var LNt,EG,zt=p(()=>{"use strict";N6();Ih();S9();LNt=/^0x[a-fA-F0-9]{40}$/,EG=new hu(4096)});function at(e){if(!e.client)throw new Error(`getContract validation error - invalid client: ${e.client}`);if(!eo(e.address))throw new Error(`getContract validation error - invalid address: ${e.address}`);if(!e.chain||!e.chain.id)throw new Error(`getContract validation error - invalid chain: ${e.chain}`);return e}var ko=p(()=>{"use strict";zt()});var n5e,r5e=p(()=>{"use strict";n5e="1.1.0"});var Eo,q6=p(()=>{"use strict";r5e();Eo=class e extends Error{constructor(t,n={}){let r=n.cause instanceof e?n.cause.details:n.cause?.message?n.cause.message:n.details,o=n.cause instanceof e&&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@${n5e}`].join(`
|
|
12
12
|
`);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 wc(e,t){return e.exec(t)?.groups}var PG,NG,jN,NC=p(()=>{"use strict";PG=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,NG=/^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)?$/,jN=/^\(.+?\).*?$/});function BN(e){let t=e.type;if(o5e.test(e.type)&&"components"in e){t="(";let n=e.components.length;for(let o=0;o<n;o++){let i=e.components[o];t+=BN(i),o<n-1&&(t+=", ")}let r=wc(o5e,e.type);return t+=`)${r?.array??""}`,BN({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}var o5e,i5e=p(()=>{"use strict";NC();o5e=/^tuple(?<array>(\[(\d*)\])*)$/});function Jf(e){let t="",n=e.length;for(let r=0;r<n;r++){let o=e[r];t+=BN(o),r!==n-1&&(t+=", ")}return t}var DG=p(()=>{"use strict";i5e()});function M9(e){return e.type==="function"?`function ${e.name}(${Jf(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${Jf(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${Jf(e.inputs)})`:e.type==="error"?`error ${e.name}(${Jf(e.inputs)})`:e.type==="constructor"?`constructor(${Jf(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}var a5e=p(()=>{"use strict";DG()});function l5e(e){return s5e.test(e)}function c5e(e){return wc(s5e,e)}function d5e(e){return u5e.test(e)}function p5e(e){return wc(u5e,e)}function m5e(e){return f5e.test(e)}function h5e(e){return wc(f5e,e)}function np(e){return g5e.test(e)}function y5e(e){return wc(g5e,e)}function b5e(e){return w5e.test(e)}function A5e(e){return wc(w5e,e)}function v5e(e){return x5e.test(e)}function C5e(e){return wc(x5e,e)}function I5e(e){return ONt.test(e)}var s5e,u5e,f5e,g5e,w5e,x5e,ONt,G6,T5e,zN,k9=p(()=>{"use strict";NC();s5e=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;u5e=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;f5e=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;g5e=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;w5e=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;x5e=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;ONt=/^receive\(\) external payable$/;G6=new Set(["memory","indexed","storage","calldata"]),T5e=new Set(["indexed"]),zN=new Set(["calldata","memory","storage"])});var E9,P9,DC,LC=p(()=>{"use strict";q6();E9=class extends Eo{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"})}},P9=class extends Eo{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"})}},DC=class extends Eo{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"})}}});var N9,D9,L9,O9,R9,j9,B9,Y6=p(()=>{"use strict";q6();N9=class extends Eo{constructor({param:t}){super("Failed to parse ABI parameter.",{details:`parseAbiParameter(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiparameter-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParameterError"})}},D9=class extends Eo{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"})}},L9=class extends Eo{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}},O9=class extends Eo{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"})}},R9=class extends Eo{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"})}},j9=class extends Eo{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"})}},B9=class extends Eo{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"})}}});var bc,z9,U9,UN=p(()=>{"use strict";q6();bc=class extends Eo{constructor({signature:t,type:n}){super(`Invalid ${n} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}},z9=class extends Eo{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}},U9=class extends Eo{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"})}}});var H9,LG=p(()=>{"use strict";q6();H9=class extends Eo{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"})}}});var W9,OG=p(()=>{"use strict";q6();W9=class extends Eo{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 S5e(e,t,n){let r="";if(n)for(let o of Object.entries(n)){if(!o)continue;let i="";for(let a of o[1])i+=`[${a.type}${a.name?`:${a.name}`:""}]`;r+=`(${o[0]}{${i}})`}return t?`${t}:${e}${r}`:e}var HN,M5e=p(()=>{"use strict";HN=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 OC(e,t={}){if(m5e(e))return RNt(e,t);if(d5e(e))return jNt(e,t);if(l5e(e))return BNt(e,t);if(b5e(e))return zNt(e,t);if(v5e(e))return UNt(e);if(I5e(e))return{type:"receive",stateMutability:"payable"};throw new z9({signature:e})}function RNt(e,t={}){let n=h5e(e);if(!n)throw new bc({signature:e,type:"function"});let r=ul(n.parameters),o=[],i=r.length;for(let s=0;s<i;s++)o.push(dl(r[s],{modifiers:zN,structs:t,type:"function"}));let a=[];if(n.returns){let s=ul(n.returns),l=s.length;for(let c=0;c<l;c++)a.push(dl(s[c],{modifiers:zN,structs:t,type:"function"}))}return{name:n.name,type:"function",stateMutability:n.stateMutability??"nonpayable",inputs:o,outputs:a}}function jNt(e,t={}){let n=p5e(e);if(!n)throw new bc({signature:e,type:"event"});let r=ul(n.parameters),o=[],i=r.length;for(let a=0;a<i;a++)o.push(dl(r[a],{modifiers:T5e,structs:t,type:"event"}));return{name:n.name,type:"event",inputs:o}}function BNt(e,t={}){let n=c5e(e);if(!n)throw new bc({signature:e,type:"error"});let r=ul(n.parameters),o=[],i=r.length;for(let a=0;a<i;a++)o.push(dl(r[a],{structs:t,type:"error"}));return{name:n.name,type:"error",inputs:o}}function zNt(e,t={}){let n=A5e(e);if(!n)throw new bc({signature:e,type:"constructor"});let r=ul(n.parameters),o=[],i=r.length;for(let a=0;a<i;a++)o.push(dl(r[a],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:n.stateMutability??"nonpayable",inputs:o}}function UNt(e){let t=C5e(e);if(!t)throw new bc({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}function dl(e,t){let n=S5e(e,t?.type,t?.structs);if(HN.has(n))return HN.get(n);let r=jN.test(e),o=wc(r?WNt:HNt,e);if(!o)throw new L9({param:e});if(o.name&&ZNt(o.name))throw new O9({param:e,name:o.name});let i=o.name?{name:o.name}:{},a=o.modifier==="indexed"?{indexed:!0}:{},s=t?.structs??{},l,c={};if(r){l="tuple";let d=ul(o.type),f=[],m=d.length;for(let h=0;h<m;h++)f.push(dl(d[h],{structs:s}));c={components:f}}else if(o.type in s)l="tuple",c={components:s[o.type]};else if(FNt.test(o.type))l=`${o.type}256`;else if(o.type==="address payable")l="address";else if(l=o.type,t?.type!=="struct"&&!RG(l))throw new DC({type:l});if(o.modifier){if(!t?.modifiers?.has?.(o.modifier))throw new R9({param:e,type:t?.type,modifier:o.modifier});if(zN.has(o.modifier)&&!QNt(l,!!o.array))throw new j9({param:e,type:t?.type,modifier:o.modifier})}let u={type:`${l}${o.array??""}`,...i,...a,...c};return HN.set(n,u),u}function ul(e,t=[],n="",r=0){let o=e.trim().length;for(let i=0;i<o;i++){let a=e[i],s=e.slice(i+1);switch(a){case",":return r===0?ul(s,[...t,n.trim()]):ul(s,t,`${n}${a}`,r);case"(":return ul(s,t,`${n}${a}`,r+1);case")":return ul(s,t,`${n}${a}`,r-1);default:return ul(s,t,`${n}${a}`,r)}}if(n==="")return t;if(r!==0)throw new W9({current:n,depth:r});return t.push(n.trim()),t}function RG(e){return e==="address"||e==="bool"||e==="function"||e==="string"||PG.test(e)||NG.test(e)}function ZNt(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||PG.test(e)||NG.test(e)||VNt.test(e)}function QNt(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}var HNt,WNt,FNt,VNt,F9=p(()=>{"use strict";NC();LC();Y6();UN();OG();M5e();k9();HNt=/^(?<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$_]*))?$/,WNt=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,FNt=/^u?int$/;VNt=/^(?: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 Mh(e){let t={},n=e.length;for(let a=0;a<n;a++){let s=e[a];if(!np(s))continue;let l=y5e(s);if(!l)throw new bc({signature:s,type:"struct"});let c=l.properties.split(";"),u=[],d=c.length;for(let f=0;f<d;f++){let h=c[f].trim();if(!h)continue;let g=dl(h,{type:"struct"});u.push(g)}if(!u.length)throw new U9({signature:s});t[l.name]=u}let r={},o=Object.entries(t),i=o.length;for(let a=0;a<i;a++){let[s,l]=o[a];r[s]=k5e(l,t)}return r}function k5e(e,t,n=new Set){let r=[],o=e.length;for(let i=0;i<o;i++){let a=e[i];if(jN.test(a.type))r.push(a);else{let l=wc(qNt,a.type);if(!l?.type)throw new B9({abiParameter:a});let{array:c,type:u}=l;if(u in t){if(n.has(u))throw new H9({type:u});r.push({...a,type:`tuple${c??""}`,components:k5e(t[u]??[],t,new Set([...n,u]))})}else if(RG(u))r.push(a);else throw new P9({type:u})}}return r}var qNt,RC=p(()=>{"use strict";NC();LC();Y6();UN();LG();k9();F9();qNt=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/});function K6(e){let t=Mh(e),n=[],r=e.length;for(let o=0;o<r;o++){let i=e[o];np(i)||n.push(OC(i,t))}return n}var E5e=p(()=>{"use strict";k9();RC();F9()});function X6(e){let t;if(typeof e=="string")t=OC(e);else{let n=Mh(e),r=e.length;for(let o=0;o<r;o++){let i=e[o];if(!np(i)){t=OC(i,n);break}}}if(!t)throw new E9({signature:e});return t}var P5e=p(()=>{"use strict";LC();k9();RC();F9()});function jG(e){let t;if(typeof e=="string")t=dl(e,{modifiers:G6});else{let n=Mh(e),r=e.length;for(let o=0;o<r;o++){let i=e[o];if(!np(i)){t=dl(i,{modifiers:G6,structs:n});break}}}if(!t)throw new N9({param:e});return t}var N5e=p(()=>{"use strict";Y6();k9();RC();F9()});function J6(e){let t=[];if(typeof e=="string"){let n=ul(e),r=n.length;for(let o=0;o<r;o++)t.push(dl(n[o],{modifiers:G6}))}else{let n=Mh(e),r=e.length;for(let o=0;o<r;o++){let i=e[o];if(np(i))continue;let a=ul(i),s=a.length;for(let l=0;l<s;l++)t.push(dl(a[l],{modifiers:G6,structs:n}))}}if(t.length===0)throw new D9({params:e});return t}var D5e=p(()=>{"use strict";Y6();k9();RC();F9();F9()});var _6=p(()=>{"use strict";a5e();DG();E5e();P5e();N5e();D5e();LC();Y6();UN();OG();LG()});function fe(e,t,n){let r=e[t.name];if(typeof r=="function")return r;let o=e[n];return typeof o=="function"?o:i=>t(e,i)}var or=p(()=>{"use strict"});function Ii(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new $6(e.type);return`${e.name}(${jC(e.inputs,{includeName:t})})`}function jC(e,{includeName:t=!1}={}){return e?e.map(n=>GNt(n,{includeName:t})).join(t?", ":","):""}function GNt(e,{includeName:t}){return e.type.startsWith("tuple")?`(${jC(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}var _f=p(()=>{"use strict";Hr()});function Re(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}var Cs=p(()=>{"use strict"});function Jt(e){return Re(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}var pl=p(()=>{"use strict";Cs()});var BG,O5e=p(()=>{"use strict";BG="2.37.9"});function R5e(e){WN=e}function j5e(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?j5e(e.cause,t):t?null:e}var WN,G,Ct=p(()=>{"use strict";O5e();WN={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${BG}`};G=class e extends Error{constructor(t,n={}){let r=n.cause instanceof e?n.cause.details:n.cause?.message?n.cause.message:n.details,o=n.cause instanceof e&&n.cause.docsPath||n.docsPath,i=WN.getDocsUrl?.({...n,docsPath:o}),a=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: ${i}`]:[],...r?[`Details: ${r}`]:[],...WN.version?[`Version: ${WN.version}`]:[]].join(`
|
|
13
13
|
`);super(a,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=BG}walk(t){return j5e(this,t)}}});var kh,rp,FN,Eh,fl,e7,t7,Ph,n7,V9,Nh,r7,Dh,Z9,Ac,Lh,o7,VN,Oh,xc,Au,i7,a7,Rh,$6,s7,Hr=p(()=>{"use strict";_f();pl();Ct();kh=class extends G{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(`
|
|
@@ -465,7 +465,7 @@ to {
|
|
|
465
465
|
opacity: 1;
|
|
466
466
|
transform: translateY(0);
|
|
467
467
|
}
|
|
468
|
-
`,qPn=Zt(Hxt)(e=>{let t=$();return{animation:`${QPn} 200ms cubic-bezier(0.16, 1, 0.3, 1)`,background:t.colors.tooltipBg,borderRadius:te.sm,boxShadow:Ej.sm,color:t.colors.tooltipText,fontSize:oe.sm,lineHeight:1.5,maxWidth:"300px",padding:`${Z.xs} ${Z.sm}`,userSelect:"none",willChange:"transform, opacity",zIndex:999999999999999}}),GPn=Zt(Wxt)(()=>({fill:$().colors.tooltipBg}));var Cy=T(L(),1),Nx=e=>{let{hasCopied:t,onCopy:n}=rV(e.text),r=e.hasCopied||t;return(0,Cy.jsx)("div",{onClick:n,onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&n()},style:{alignItems:"center",display:"flex",justifyContent:"center"},children:(0,Cy.jsx)(vy,{align:e.align,side:e.side,tip:e.tip,children:(0,Cy.jsx)("div",{children:(0,Cy.jsx)(S,{center:"both",color:r?"success":void 0,flex:"row",children:r?(0,Cy.jsx)(ad,{className:"tw-check-icon",width:e.iconSize||16,height:e.iconSize||16}):(0,Cy.jsx)(EA,{className:"tw-copy-icon",width:e.iconSize||16,height:e.iconSize||16})})})})})};var Sd="data:image/svg+xml;charset=UTF-8,%3csvg width='15' height='14' viewBox='0 0 15 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M7 8.04238e-07C5.1435 8.04238e-07 3.36301 0.737501 2.05025 2.05025C0.7375 3.36301 0 5.1435 0 7C0 7.225 -1.52737e-07 7.445 0.0349998 7.665C0.16385 9.0151 0.68213 10.2988 1.52686 11.3598C2.37158 12.4209 3.50637 13.2137 4.79326 13.642C6.0801 14.0702 7.4637 14.1153 8.7758 13.7719C10.0879 13.4285 11.2719 12.7113 12.184 11.7075C13.0961 10.7038 13.6969 9.4567 13.9135 8.1178C14.1301 6.7789 13.9531 5.406 13.4039 4.16587C12.8548 2.92574 11.9573 1.87184 10.8204 1.13228C9.6835 0.392721 8.3563 -0.000649196 7 8.04238e-07ZM7 1C8.581 1.00137 10.0975 1.62668 11.22 2.74V3.24C9.2438 2.55991 7.0956 2.56872 5.125 3.265C4.96758 3.1116 4.76997 3.00586 4.555 2.96H4.43C4.37 2.75 4.315 2.54 4.27 2.325C4.225 2.11 4.2 1.92 4.175 1.715C5.043 1.24658 6.0137 1.00091 7 1ZM5.5 3.935C7.3158 3.32693 9.2838 3.34984 11.085 4C10.8414 5.2703 10.3094 6.4677 9.53 7.5C9.312 7.4077 9.0707 7.3855 8.8395 7.4366C8.6083 7.4877 8.3988 7.6094 8.24 7.785C8.065 7.685 7.89 7.585 7.74 7.47C6.7307 6.7966 5.8877 5.9023 5.275 4.855C5.374 4.73221 5.4461 4.58996 5.4866 4.43749C5.5271 4.28502 5.5351 4.12575 5.51 3.97L5.5 3.935ZM3.5 2.135C3.5 2.24 3.53 2.35 3.55 2.455C3.595 2.675 3.655 2.89 3.715 3.105C3.52353 3.21838 3.36943 3.38531 3.2717 3.58522C3.17397 3.78513 3.13688 4.00927 3.165 4.23C2.37575 4.7454 1.67078 5.3795 1.075 6.11C1.19455 5.3189 1.47112 4.55966 1.88843 3.87701C2.30575 3.19437 2.85539 2.60208 3.505 2.135H3.5ZM3.5 9.99C3.30481 10.0555 3.13037 10.1714 2.9943 10.3259C2.85822 10.4804 2.76533 10.6681 2.725 10.87H2.405C1.59754 9.9069 1.1146 8.7136 1.025 7.46L1.08 7.365C1.70611 6.3942 2.52463 5.562 3.485 4.92C3.62899 5.0704 3.81094 5.179 4.01162 5.2345C4.2123 5.2899 4.42423 5.2901 4.625 5.235C5.2938 6.3652 6.208 7.3306 7.3 8.06C7.505 8.195 7.715 8.32 7.925 8.44C7.9082 8.6312 7.9391 8.8237 8.015 9C7.1 9.7266 6.0445 10.256 4.915 10.555C4.78401 10.3103 4.57028 10.1201 4.31199 10.0184C4.05369 9.9167 3.76766 9.9102 3.505 10L3.5 9.99ZM7 12.99C5.9831 12.9903 4.98307 12.7304 4.095 12.235L4.235 12.205C4.43397 12.1397 4.61176 12.0222 4.74984 11.8648C4.88792 11.7074 4.98122 11.5158 5.02 11.31C6.2985 10.984 7.4921 10.3872 8.52 9.56C8.7642 9.7027 9.0525 9.75 9.3295 9.6927C9.6064 9.6355 9.8524 9.4778 10.02 9.25C10.7254 9.4334 11.4511 9.5275 12.18 9.53H12.445C11.9626 10.5673 11.1938 11.4451 10.2291 12.0599C9.2643 12.6747 8.144 13.0009 7 13V12.99ZM10.255 8.54C10.2545 8.3304 10.1975 8.1249 10.09 7.945C10.9221 6.8581 11.5012 5.5991 11.785 4.26C12.035 4.37667 12.2817 4.50667 12.525 4.65C13.0749 5.9495 13.1493 7.4012 12.735 8.75C11.9049 8.8142 11.0698 8.7484 10.26 8.555L10.255 8.54Z' fill='%23646D7A'/%3e%3c/svg%3e";Fe();var Vxt=T(L(),1),Fxt=e=>{let t=$();return(0,Vxt.jsx)("div",{style:{alignItems:"center",border:`1px solid ${t.colors.borderColor}`,borderRadius:"100%",display:"flex",flexShrink:0,justifyItems:"center",overflow:"hidden",padding:e.padding??"6px",position:"relative",...e.style},children:e.children})};$o();nt();_o();Ye();md();h5();Bn();var Zxt=T(L(),1);function Jk({formatFn:e,...t}){let{address:n}=mf(),r=e?e(n):n;return(0,Zxt.jsx)("span",{...t,children:r})}tt();Myt();kW();zW();qae();var Qxt=T(L(),1);function _k({socialType:e,resolverAddress:t,resolverChain:n,loadingComponent:r,fallbackComponent:o,queryOptions:i,...a}){let{address:s,client:l}=mf(),c=le({queryFn:async()=>{let[u,d]=await Promise.all([KA({address:s,client:l}),UA({address:s||"",client:l,resolverAddress:t,resolverChain:n})]),f=u?.filter(g=>g.avatar&&(e?g.type===e:!0))[0]?.avatar,[m,h]=await Promise.all([f?CW({client:l,uri:f}):void 0,d?Syt({client:l,name:d}):void 0]);if(!m&&!h)throw new Error("Failed to resolve social + ens avatar");if(m)return m;if(h)return h;throw new Error("Failed to resolve social + ens avatar")},queryKey:["account-avatar",s,{socialType:e},{resolverAddress:t,resolverChain:n}],retry:!1,...i});return c.isLoading?r||null:c.data?(0,Qxt.jsx)("img",{src:c.data,...a,alt:a.alt}):o||null}tt();zt();var yV=T(L(),1);function Iy({chain:e,tokenAddress:t,loadingComponent:n,fallbackComponent:r,queryOptions:o,formatFn:i,showBalanceInFiat:a,...s}){let{address:l,client:c}=mf(),u=cr(),d=e||u,f=le({queryFn:async()=>lAt({address:ge(l),chain:d,client:c,showBalanceInFiat:a,tokenAddress:t?ge(t):void 0}),queryKey:["internal_account_balance",d?.id||-1,l,{tokenAddress:t},a],retry:!1,...o});return f.isLoading?n||null:f.data?i?(0,yV.jsx)("span",{...s,children:i(f.data)}):a?(0,yV.jsx)("span",{...s,children:Vk({...f.data,decimals:0})}):(0,yV.jsx)("span",{...s,children:Ix({...f.data,decimals:f.data.balance<1?3:2})}):r||null}Age();var wV=T(_(),1);var qxt=T(L(),1);function bV(e){let t=(0,wV.useId)(),n=(0,wV.useMemo)(()=>Qle[Number(bge(e.address.slice(2,4)))%Qle.length],[e.address]);return(0,qxt.jsx)("div",{className:e.className,id:t,style:{...e.style,backgroundImage:`radial-gradient(ellipse at left bottom, ${n[0]}, ${n[1]})`,...e.size?{height:`${e.size}px`,width:`${e.size}px`}:void 0}})}var Gxt=T(L(),1);function Ty(e){let{address:t}=mf();return(0,Gxt.jsx)(bV,{...e,address:t})}tt();kW();zW();var Yxt=T(L(),1);function $k({resolverAddress:e,resolverChain:t,socialType:n,formatFn:r,queryOptions:o,loadingComponent:i,fallbackComponent:a,...s}){let{address:l,client:c}=mf(),u=le({queryFn:async()=>{let[d,f]=await Promise.all([KA({address:l,client:c}),UA({address:l,client:c,resolverAddress:e,resolverChain:t})]),m=d?.filter(h=>h.name&&(n?h.type===n:!0))[0]?.name||f;if(!m)throw new Error("Failed to resolve account name");return r?r(m):m},queryKey:["account-name",l,{socialType:n},{resolverAddress:e,resolverChain:t}],retry:!1,...o});return u.isLoading?i||null:u.data?(0,Yxt.jsx)("span",{...s,children:u.data}):a||null}tt();qe();$8();var lce=new Map;function AV(e){if(lce.has(e))return lce.get(e);let t=kp();return lce.set(e,t),t}Lm();var xV=T(_(),1),Xxt=T(L(),1),Kxt=(0,xV.createContext)(void 0);function vV(e){return(0,Xxt.jsx)(Kxt.Provider,{value:e,children:e.children})}function CV(){let e=(0,xV.useContext)(Kxt);if(!e)throw new Error("ChainProviderContext not found. Make sure you are using ChainName, ChainIcon, etc. inside a <ChainProvider /> component");return e}var Jxt=T(L(),1);function IV({iconResolver:e,loadingComponent:t,fallbackComponent:n,queryOptions:r,client:o,...i}){let{chain:a}=CV(),s=le({queryFn:async()=>YPn({chain:a,client:o,iconResolver:e}),queryKey:KPn({chainId:a.id,iconResolver:e}),...r});return s.isLoading?t||null:s.data?(0,Jxt.jsx)("img",{src:s.data,...i,alt:i.alt}):n||null}async function YPn(e){let{chain:t,client:n,iconResolver:r}=e;if(typeof r=="string")return r;if(typeof r=="function")return r();if(t.icon?.url)return ca({client:n,uri:t.icon.url});let o=await uo(t).then(i=>i.icon?.url).catch(()=>{});if(!o)throw new Error("Failed to resolve icon for chain");return ca({client:n,uri:o})}function KPn(e){let{chainId:t,iconResolver:n}=e;return["_internal_chain_icon_",t,{resolver:typeof n=="string"?n:typeof n=="function"?AV(n):void 0}]}tt();qe();var _xt=T(L(),1);function eE({nameResolver:e,formatFn:t,loadingComponent:n,fallbackComponent:r,queryOptions:o,...i}){let{chain:a}=CV(),s=le({queryFn:async()=>XPn({chain:a,nameResolver:e}),queryKey:JPn({chainId:a.id,nameResolver:e}),...o});if(s.isLoading)return n||null;if(!s.data)return r||null;let l=t?t(s.data):s.data;return(0,_xt.jsx)("span",{...i,children:l})}async function XPn(e){let{nameResolver:t,chain:n}=e;return typeof t=="string"?t:typeof t=="function"?t():n.name?n.name:uo(n).then(r=>r.name)}function JPn(e){return typeof e.nameResolver=="function"?["_internal_chain_name_",e.chainId,{resolver:AV(e.nameResolver)}]:["_internal_chain_name_",e.chainId]}M1();var Sy=T(L(),1),Z5=e=>(0,Sy.jsxs)("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[(0,Sy.jsx)("path",{d:"M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),(0,Sy.jsx)("path",{d:"M18.0901 10.37C19.0354 10.7224 19.8766 11.3075 20.5358 12.0712C21.1951 12.8349 21.6512 13.7524 21.8618 14.7391C22.0725 15.7257 22.031 16.7495 21.7411 17.7158C21.4513 18.6822 20.9224 19.5598 20.2035 20.2676C19.4846 20.9754 18.5988 21.4905 17.6281 21.7652C16.6573 22.04 15.633 22.0655 14.6498 21.8395C13.6666 21.6134 12.7562 21.1431 12.0029 20.472C11.2496 19.8009 10.6777 18.9507 10.3401 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),(0,Sy.jsx)("path",{d:"M7 6H8V10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),(0,Sy.jsx)("path",{d:"M16.7101 13.88L17.4101 14.59L14.5901 17.41",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})]});var Dx=T(L(),1),$xt=({size:e})=>(0,Dx.jsxs)("svg",{fill:"none",height:e,role:"presentation",viewBox:"0 0 16 16",width:e,xmlns:"http://www.w3.org/2000/svg",children:[(0,Dx.jsx)("path",{d:"M14.001 8.00048C14.001 9.18726 13.649 10.3474 12.9897 11.3342C12.3304 12.3209 11.3932 13.09 10.2968 13.5442C9.20032 13.9984 7.99382 14.1172 6.82984 13.8857C5.66587 13.6541 4.59668 13.0826 3.7575 12.2435C2.91832 11.4043 2.34683 10.3351 2.1153 9.17111C1.88377 8.00713 2.0026 6.80064 2.45676 5.70419C2.91092 4.60775 3.68002 3.6706 4.66679 3.01126C5.65357 2.35192 6.8137 2 8.00048 2",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.2001"}),(0,Dx.jsx)("path",{d:"M14.0005 2L8 8.00048",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.2001"}),(0,Dx.jsx)("path",{d:"M10.3984 2H13.9987V5.60029",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.2001"})]});JA();Fe();ye();Bn();var Xs=Ia(e=>{let t=$();return{all:"unset","&:hover":{backgroundColor:t.colors.tertiaryBg,svg:{color:t.colors.accentText}},"&[data-variant='danger']:hover svg":{color:`${t.colors.danger}!important`},"&[data-variant='primary']:hover svg":{color:`${t.colors.primaryText}!important`},"&[disabled]":{cursor:"not-allowed"},alignItems:"center",backgroundColor:"transparent",borderRadius:te.md,boxSizing:"border-box",color:t.colors.secondaryText,cursor:"pointer",display:"flex",fontSize:oe.md,fontWeight:500,gap:Z.sm,lineHeight:1.3,padding:`${Z.sm} ${Z.sm}`,svg:{color:t.colors.secondaryText,transition:"color 200ms ease"},transition:"background-color 200ms ease, transform 200ms ease",WebkitTapHighlightColor:"transparent",width:"100%"}}),evt=Xs.withComponent("a");uf();qc();Cn();ele();var gi=T(_(),1);qe();Fe();ye();ve();St();M5();DA();$o();nt();_o();Ye();Bn();Ok();tle();var je=T(L(),1);function TV(e){let t=e.connectLocale.networkSelector,[n,r]=(0,gi.useState)(""),[o,i]=(0,gi.useState)("all"),a=P5(n,300),{onSwitch:s,onCustomClick:l}=e.networkSelector||{},c=t.categoryLabel.others,u=t.categoryLabel.popular,d=t.categoryLabel.recentlyUsed,{chainSections:f,allChains:m,allChainsToSectionMap:h}=(0,gi.useMemo)(()=>{let I=[],P=[],E=new Map;function O(N,j){E.set(N.id,j),P.push(N)}if(e.networkSelector?.sections)for(let N of e.networkSelector.sections){let j=N.chains.filter(H=>!E.has(H.id));if(j.length>0){I.push({chains:j,label:N.label});for(let H of j)O(H,N.label)}}else{let N=new Map(e.chains.map(j=>[j.id,j]));if(e.networkSelector?.recentChainIds&&e.networkSelector?.recentChainIds.length>0){let j=e.networkSelector.recentChainIds.map(H=>N.get(H)).filter(H=>H!==void 0);I.push({chains:j,label:d});for(let H of j)O(H,d)}if(e.networkSelector?.popularChainIds&&e.networkSelector.popularChainIds.length>0){let H=e.networkSelector.popularChainIds.map(R=>N.get(R)).filter(R=>R!==void 0).filter(R=>!E.has(R.id));if(H.length>0){I.push({chains:H,label:u});for(let R of H)O(R,u)}}}let k=e.chains.filter(N=>!E.has(N.id));if(k.length>0){I.push({chains:k,label:c});for(let N of k)O(N,c)}return{allChains:P,allChainsToSectionMap:E,chainSections:I}},[e.networkSelector?.sections,e.networkSelector?.recentChainIds,e.networkSelector?.popularChainIds,e.chains,d,u,c]),g=m.every(I=>!!I.name),w=$F(g?[]:m,10),b=g?!1:w.some(I=>I.isLoading),A=g?m:b?[]:w.filter(I=>!!I.data).map(I=>v9(I.data)),x=(0,gi.useMemo)(()=>new R1(A,{keys:[{name:"name",weight:1},{name:"chainId",weight:1}],threshold:.4}),[A]),v=(0,gi.useMemo)(()=>{if(a==="")return;let I=[],P=x.search(a).map(E=>E.item);for(let E of P){let O=h.get(E.id);if(!O)return;let k=I.find(N=>N.label===O);k?k.chains.push(E):I.push({chains:[E],label:O})}return I},[a,x,h])||f,C=(0,gi.useMemo)(()=>o==="all"?v:v.map(I=>({chains:I.chains.filter(P=>o==="mainnet"&&!P.testnet||o==="testnet"&&P.testnet),label:I.label})),[v,o]),M=(0,gi.useCallback)(I=>{s&&s(I),e.closeModal()},[s,e]);return(0,je.jsxs)(S,{className:e.className,children:[(0,je.jsx)(S,{p:"lg",children:e.onBack?(0,je.jsx)(be,{onBack:e.onBack,title:t.title}):(0,je.jsx)(tf,{children:t.title})}),e.showTabs!==!1&&(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(S,{px:"lg",children:(0,je.jsxs)(S,{flex:"row",gap:"xxs",children:[(0,je.jsx)(cce,{"data-active":o==="all",onClick:()=>i("all"),children:t.allNetworks}),(0,je.jsx)(cce,{"data-active":o==="mainnet",onClick:()=>i("mainnet"),children:t.mainnets}),(0,je.jsx)(cce,{"data-active":o==="testnet",onClick:()=>i("testnet"),children:t.testnets})]})}),(0,je.jsx)(Q,{y:"lg"})]}),e.showTabs===!1&&(0,je.jsx)(Q,{y:"xxs"}),(0,je.jsx)(S,{px:"lg",children:(0,je.jsxs)("div",{style:{alignItems:"center",display:"flex",position:"relative"},children:[(0,je.jsx)(rNn,{height:z.md,width:z.md}),(0,je.jsx)(Ys,{disabled:b,onChange:I=>{r(I.target.value)},placeholder:b?"Loading chains...":t.inputPlaceholder,style:{padding:`${Z.sm} ${Z.md} ${Z.sm} ${Z.xxl}`},tabIndex:-1,value:n,variant:"outline"}),(a!==n||b)&&(0,je.jsx)("div",{style:{position:"absolute",right:Z.md},children:(0,je.jsx)(wt,{color:"accentText",size:"md"})})]})}),(0,je.jsx)(Q,{y:"lg"}),(0,je.jsx)(S,{px:"md",children:(0,je.jsx)(_Pn,{chainSections:C,client:e.client,close:e.closeModal,connectLocale:e.connectLocale,onSwitch:M,renderChain:e.networkSelector?.renderChain})}),l&&(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(Wt,{}),(0,je.jsx)(S,{p:"lg",children:(0,je.jsx)(ae,{fullWidth:!0,onClick:()=>{l(),e.closeModal()},style:{boxShadow:"none",display:"flex",fontSize:oe.sm},variant:"link",children:t.addCustomNetwork})})]})]})}var _Pn=e=>{let{chainSections:t}=e,n=t.every(r=>r.chains.length===0);return(0,je.jsx)(S,{animate:"fadein",scrollY:!0,style:{height:"330px",paddingBottom:Z.lg},children:n?(0,je.jsxs)(S,{center:"both",color:"secondaryText",flex:"column",gap:"md",children:[(0,je.jsx)(Q,{y:"xl"}),(0,je.jsx)(Qs,{height:z.xl,width:z.xl}),(0,je.jsx)(F,{children:" No Results "})]}):t.map((r,o)=>r.chains.length===0?null:(0,je.jsxs)(gi.Fragment,{children:[o!==0&&(0,je.jsx)(Q,{y:"lg"}),(0,je.jsx)(eNn,{children:r.label}),(0,je.jsx)(Q,{y:"xs"}),(0,je.jsx)($Pn,{chains:r.chains,client:e.client,close:e.close,connectLocale:e.connectLocale,onSwitch:e.onSwitch,renderChain:e.renderChain})]},r.label))})},$Pn=(0,gi.memo)(function(t){let{itemsToShow:n,lastItemRef:r}=SF(10,10),o=eV(),i=cr(),[a,s]=(0,gi.useState)(-1),[l,c]=(0,gi.useState)(-1),u=t.close;(0,gi.useEffect)(()=>{a!==-1&&i?.id===a&&u&&u()},[a,u,i?.id]);let d=async h=>{c(-1),s(h.id);try{await o(h),t.onSwitch(h)}catch(g){c(h.id),console.error(g)}finally{s(-1)}},f=t.renderChain,m=t.chains.slice(0,n);return(0,je.jsx)(tNn,{children:m.map((h,g)=>{if(!h)return null;let w=a===h.id,b=l===h.id,A=g===m.length-1;return(0,je.jsx)("li",{ref:A?r:void 0,children:f?(0,je.jsx)(f,{chain:h,close:t.close,switchChain:()=>{d(h)},switchFailed:l===h.id,switching:a===h.id}):(0,je.jsx)(uce,{chain:h,client:t.client,confirming:w,connectLocale:t.connectLocale,onClick:()=>d(h),switchingFailed:b})},h.id)})})}),uce=(0,gi.memo)(function(t){let n=t.connectLocale,{chain:r,confirming:o,switchingFailed:i}=t,a=cr();return(0,je.jsx)(vV,{chain:r,children:(0,je.jsxs)(nNn,{"data-active":a?.id===r.id,onClick:t.onClick,children:[(0,je.jsxs)(S,{style:{alignItems:"center",display:"flex",flexShrink:0,position:"relative"},children:[(0,je.jsx)(IV,{client:t.client,fallbackComponent:(0,je.jsx)("img",{alt:"",src:Sd,style:{height:`${z.lg}px`,width:`${z.lg}px`}}),loading:"lazy",loadingComponent:(0,je.jsx)(Te,{height:`${z.lg}px`,width:`${z.lg}px`}),style:{height:`${z.lg}px`,width:`${z.lg}px`}}),a?.id===r.id&&(0,je.jsx)(Tx,{className:"tw-chain-active-dot-button-network-selector"})]}),o||i?(0,je.jsxs)(S,{flex:"column",gap:"3xs",style:{alignItems:"flex-start",width:"100%"},children:[(0,je.jsx)(eE,{loadingComponent:(0,je.jsx)(Te,{height:"20px",width:"150px"})}),(0,je.jsxs)(S,{animate:"fadein",center:"y",flex:"row",gap:"xxs",children:[o&&(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(F,{color:"accentText",size:"xs",children:n.switchingNetwork}),(0,je.jsx)(wt,{color:"accentText",size:"xs"})]}),i&&(0,je.jsx)(S,{animate:"fadein",children:(0,je.jsx)(F,{color:"danger",size:"xs",children:n.networkSelector.failedToSwitch})})]})]}):(0,je.jsx)(eE,{className:"tw-chain-icon-none-confirming",loadingComponent:(0,je.jsx)(Te,{height:"20px",width:"150px"})})]})})}),cce=Zt.button(e=>{let t=$();return{all:"unset","&[data-active='true']":{background:t.colors.secondaryButtonBg,color:t.colors.primaryText},borderRadius:te.lg,color:t.colors.secondaryText,cursor:"pointer",fontSize:oe.sm,fontWeight:500,padding:`${Z.sm} ${Z.sm}`,transition:"background 0.2s ease, color 0.2s ease",WebkitTapHighlightColor:"transparent"}}),eNn=V4t(()=>({color:$().colors.secondaryText,display:"block",fontSize:oe.sm,margin:0,padding:`0 ${Z.xs}`})),tNn=dW({boxSizing:"border-box",display:"flex",flexDirection:"column",gap:Z.xs,listStyle:"none",margin:0,padding:0}),nNn=Ia(e=>{let t=$();return{"&:hover":{background:t.colors.secondaryButtonBg},all:"unset",alignItems:"center",borderRadius:te.md,boxSizing:"border-box",color:t.colors.primaryText,cursor:"pointer",display:"flex",fontSize:oe.md,fontWeight:500,gap:Z.md,padding:`${Z.xs} ${Z.sm}`,transition:"background 0.2s ease",width:"100%",[Fw.mobile]:{fontSize:oe.sm}}}),rNn=Zt(PA)(e=>({color:$().colors.secondaryText,left:Z.sm,position:"absolute"}));Cn();var nvt=T(_(),1);zt();Fe();ye();mk();ls();ve();St();$o();nt();Ye();md();Ik();Go();function W0(e,t=!0,n=5){return W5(Number(e.displayValue),n)+(t?` ${e.symbol}`:"")}function zo(e,t,n=5){return W5(Number.parseFloat(go(e,t)),n).toString()}function xf(e,t){return oNn(t,"en-US",e)}function oNn(e,t,n){return new Intl.NumberFormat(t,{style:"currency",currency:n}).format(e)}ZM();uf();var tvt=T(L(),1);function SV(e){let t=cr(),n=Gl(),r=e.wallets||f5({appMetadata:e.appMetadata,chains:e.chains}).filter(i=>i.id!=="inApp"),o=nx({size:"compact",wallets:r,welcomeScreen:void 0});return(0,tvt.jsx)(NF,{accountAbstraction:e.accountAbstraction,auth:void 0,chain:e.chain||t,chains:e.chains,client:e.client,connectLocale:e.connectLocale,hideHeader:e.isEmbed,isOpen:!0,meta:{showThirdwebBranding:!1},modalHeader:{onBack:e.onBack,title:"Connect"},onClose:()=>{},onConnect:i=>{e.onSelect(i),e.onBack()},recommendedWallets:e.recommendedWallets,screenSetup:o,setModalVisibility:()=>{},shouldSetActive:!1,showAllWallets:e.showAllWallets,size:"compact",walletConnect:e.walletConnect,walletIdsToHide:n.map(i=>i.id),wallets:r,welcomeScreen:void 0})}var Jn=T(L(),1);function rvt(e){let[t,n]=(0,nvt.useState)("wallets"),r=Gl(),o=yW(),i=!e.showAllWallets&&e.wallets?.every(a=>r.includes(a));return t==="connect"?(0,Jn.jsx)(SV,{...e,isEmbed:!1,onSelect:a=>{o(a),e.onBack()}}):(0,Jn.jsxs)(S,{children:[(0,Jn.jsx)(S,{p:"lg",children:(0,Jn.jsx)(be,{onBack:e.onBack,title:"Wallets"})}),(0,Jn.jsx)(Wt,{}),(0,Jn.jsx)(Q,{y:"md"}),(0,Jn.jsx)(S,{px:"md",style:{minHeight:"150px"},children:(0,Jn.jsx)(S,{flex:"column",gap:"xs",children:r.filter(a=>!e.hiddenWallets?.includes(a.id)).map(a=>(0,Jn.jsx)(iNn,{chain:e.activeChain,client:e.client,onClick:()=>{o(a),e.onBack()},wallet:a},a.id))})}),(0,Jn.jsx)(Q,{y:"xxl"}),(0,Jn.jsx)(S,{p:"lg",children:!i&&(0,Jn.jsxs)(ae,{fullWidth:!0,gap:"xs",onClick:()=>{n("connect")},variant:"accent",children:[(0,Jn.jsx)(NA,{height:z.sm,width:z.sm}),"Connect Wallet"]})})]})}function iNn(e){let t=$(),n=Mn(),{disconnect:r}=j3(),o=e.wallet.id,i=e.wallet.getAccount()?.address,a=C5({address:i,chain:e.chain,client:e.client});return(0,Jn.jsxs)("div",{style:{position:"relative"},children:[(0,Jn.jsx)(Ck,{onClick:e.onClick,style:{justifyContent:"space-between"},children:(0,Jn.jsxs)(S,{center:"y",flex:"row",gap:"md",children:[(0,Jn.jsx)(jo,{client:e.client,id:o,size:z.lg}),(0,Jn.jsxs)(S,{flex:"column",gap:"4xs",children:[(0,Jn.jsx)(F,{color:"primaryText",children:Vi(i||"")}),a.data?(0,Jn.jsx)(F,{color:"secondaryText",size:"xs",weight:400,children:W0(a.data)}):(0,Jn.jsx)(Te,{height:oe.sm,width:"100px"})]})]})}),(0,Jn.jsx)("div",{style:{position:"absolute",right:Z.xxs,top:"50%",transform:"translateY(-50%)",zIndex:1},children:n?.id===e.wallet.id?(0,Jn.jsx)(vy,{tip:"Active Wallet",children:(0,Jn.jsx)(qs,{children:(0,Jn.jsx)(ad,{height:z.md,width:z.md})})}):(0,Jn.jsx)(vy,{tip:"Disconnect",children:(0,Jn.jsx)(qs,{onClick:()=>{r(e.wallet)},children:(0,Jn.jsx)($4t,{height:z.md,style:{color:t.colors.secondaryText},width:z.md})})})})]})}Cn();tt();ai();N0();function ovt(){let e=Gl(),t=da();return Up({mutationFn:async({client:n,profileToUnlink:r,allowAccountDeletion:o=!1})=>{let i=e.find(s=>yt(s)),a=i?{id:i.id,partnerId:i.getConfig()?.partnerId}:void 0;await pse({allowAccountDeletion:o,client:n,ecosystem:a,profileToUnlink:r})},onSuccess:()=>{t.invalidateQueries({queryKey:["profiles"]})}})}zt();ye();r6t();$3();tt();ai();N0();function MV(e){let t=Gl(),n=t.length>0&&t.some(r=>r.id==="inApp"||yt(r));return le({enabled:n,queryFn:async()=>{let r=t.find(i=>yt(i)),o=r?{id:r.id,partnerId:r.getConfig()?.partnerId}:void 0;return fse({client:e.client,ecosystem:o})},queryKey:["profiles",t.map(r=>`${r.id}-${r.getAccount()?.address}`)]})}ql();ve();St();Sa();nt();Ye();var dce=T(L(),1),ivt=e=>(0,dce.jsx)("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:(0,dce.jsx)("path",{d:"M12 15.5H7.5C6.10444 15.5 5.40665 15.5 4.83886 15.6722C3.56045 16.06 2.56004 17.0605 2.17224 18.3389C2 18.9067 2 19.6044 2 21M19 21V15M16 18H22M14.5 7.5C14.5 9.98528 12.4853 12 10 12C7.51472 12 5.5 9.98528 5.5 7.5C5.5 5.01472 7.51472 3 10 3C12.4853 3 14.5 5.01472 14.5 7.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})});FW();yk();ZW();var _n=T(L(),1);function aNn(e){switch(!0){case(e.type==="email"&&e.details.email!==void 0):return e.details.email;case(e.type==="google"&&e.details.email!==void 0):return e.details.email;case(e.type==="phone"&&e.details.phone!==void 0):return e.details.phone;case e.details.address!==void 0:return Vi(e.details.address,6);case(e.type==="cognito"&&e.details.email!==void 0):return e.details.email;case e.type.toLowerCase()==="custom_auth_endpoint":return"Custom Profile";default:return e.type.slice(0,1).toUpperCase()+e.type.slice(1)}}function avt(e){let{data:t,isLoading:n}=MV({client:e.client});return n?(0,_n.jsx)(zn,{}):(0,_n.jsxs)(S,{style:{minHeight:"300px"},children:[(0,_n.jsx)(S,{p:"lg",children:(0,_n.jsx)(be,{onBack:e.onBack,title:e.locale.manageWallet.linkedProfiles})}),(0,_n.jsx)(Wt,{}),(0,_n.jsxs)(S,{scrollY:!0,style:{height:"300px"},children:[(0,_n.jsx)(Q,{y:"md"}),(0,_n.jsxs)(S,{px:"sm",children:[(0,_n.jsxs)(Xs,{onClick:()=>{e.setScreen("link-profile")},style:{fontSize:oe.sm},children:[(0,_n.jsx)(ivt,{size:z.lg}),(0,_n.jsx)(F,{color:"primaryText",children:e.locale.manageWallet.linkProfile})]}),(0,_n.jsx)(Q,{y:"xs"}),t?.filter(r=>r.type.toLowerCase()!=="guest"&&r.type.toLowerCase()!=="custom_jwt"&&r.type.toLowerCase()!=="custom_auth_endpoint").map(r=>(0,_n.jsx)(sNn,{client:e.client,enableUnlinking:t.length>1,profile:r},`${JSON.stringify(r)}`))]}),(0,_n.jsx)(Q,{y:"md"})]})]})}function sNn({profile:e,enableUnlinking:t,client:n}){let{data:r}=n6t({address:e.details.address,client:n}),{mutate:o,isPending:i}=ovt();return(0,_n.jsxs)(Xs,{as:"div",disabled:!0,style:{cursor:"default",fontSize:oe.sm},children:[r?.some(a=>a.avatar)?(0,_n.jsx)(nn,{client:n,height:z.lg,loading:"eager",src:r?.find(a=>a.avatar)?.avatar,style:{borderRadius:"100%"},width:z.lg}):e.details.address!==void 0?(0,_n.jsx)(S,{style:{borderRadius:"100%",height:"32px",overflow:"hidden",width:"32px"},children:(0,_n.jsx)(bV,{address:e.details.address,size:32})}):e.type==="passkey"?(0,_n.jsx)(af,{size:z.lg}):e.type==="email"?(0,_n.jsx)(XA,{size:z.lg}):e.type==="phone"?(0,_n.jsx)(_A,{size:z.lg}):(0,_n.jsx)(nn,{client:n,height:z.lg,loading:"eager",src:hk(e.type),width:z.lg}),(0,_n.jsxs)("div",{style:{alignItems:"center",display:"flex",flexDirection:"row",flexGrow:1,justifyContent:"space-between"},children:[(0,_n.jsx)(F,{color:"primaryText",children:r?.find(a=>a.avatar)?.name||aNn(e)}),(0,_n.jsxs)("div",{style:{alignItems:"center",display:"flex",flexDirection:"row",gap:"8px"},children:[r?.find(a=>a.avatar)?.name&&e.details.address&&(0,_n.jsx)(F,{color:"secondaryText",size:"sm",children:Vi(e.details.address,4)}),t&&(0,_n.jsx)(qs,{"aria-label":"Unlink",autoFocus:!0,disabled:i,onClick:()=>o({client:n,profileToUnlink:e}),style:{pointerEvents:"auto"},type:"button",children:(0,_n.jsx)(fW,{height:z.md,style:{color:"inherit"},width:z.md})})]})]})]})}Cn();tt();var tE=T(_(),1);ai();ye();ls();cle();ql();ve();Ye();var ms=T(L(),1),lNn=(0,tE.lazy)(()=>Promise.resolve().then(()=>(sle(),ale)));function svt(e){let t=w5(),n=Mn(),r=cr(),o=da(),i=t||n;return i?i.id==="inApp"?(0,ms.jsx)(tE.Suspense,{fallback:(0,ms.jsx)(zn,{}),children:(0,ms.jsx)(lNn,{chain:r,client:e.client,connectLocale:e.locale,done:()=>{setTimeout(()=>{o.invalidateQueries({queryKey:["profiles"]})},500),e.onBack()},goBack:e.onBack,isLinking:!0,meta:{showThirdwebBranding:!1,title:e.locale.manageWallet.linkProfile},size:"compact",wallet:i,walletConnect:e.walletConnect})}):yt(i)?(0,ms.jsx)(tE.Suspense,{fallback:(0,ms.jsx)(zn,{}),children:(0,ms.jsx)(lle,{chain:r,client:e.client,connectLocale:e.locale,done:()=>{setTimeout(()=>{o.invalidateQueries({queryKey:["profiles"]})},500),e.onBack()},goBack:e.onBack,isLinking:!0,meta:{showThirdwebBranding:!1,title:e.locale.manageWallet.linkProfile},size:"compact",wallet:i,walletConnect:e.walletConnect})}):(0,ms.jsxs)(S,{style:{minHeight:"300px"},children:[(0,ms.jsx)(S,{p:"lg",children:(0,ms.jsx)(be,{onBack:e.onBack,title:e.locale.manageWallet.linkProfile})}),(0,ms.jsx)(Wt,{}),(0,ms.jsxs)(S,{center:"both",color:"secondaryText",flex:"column",gap:"md",px:"xl",style:{flex:"1",minHeight:"250px"},children:[(0,ms.jsx)(Qs,{height:z.xl,width:z.xl}),(0,ms.jsx)(F,{center:!0,children:"This wallet does not support account linking"})]})]}):(0,ms.jsx)(zn,{})}Cn();ib();Qu();ye();ls();ve();nt();Ye();var nE=T(L(),1),lvt=e=>(0,nE.jsxs)("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[(0,nE.jsx)("path",{d:"M2 5.99999L2 2.99999C2 2.39999 2.4 1.99999 3 1.99999H7L7 4.99999H10V7.99999H12L13.4 9.39999C14.7898 8.91585 16.3028 8.9177 17.6915 9.40524C19.0801 9.89278 20.2622 10.8372 21.0444 12.0839C21.8265 13.3306 22.1624 14.8058 21.9971 16.2683C21.8318 17.7307 21.1751 19.0937 20.1344 20.1344C19.0937 21.1751 17.7307 21.8318 16.2683 21.9971C14.8058 22.1624 13.3306 21.8265 12.0839 21.0444C10.8372 20.2622 9.89279 19.0801 9.40525 17.6915C8.91771 16.3028 8.91585 14.7898 9.4 13.4L2 5.99999Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),(0,nE.jsx)("path",{d:"M15.5 15C15.7761 15 16 15.2239 16 15.5C16 15.7761 15.7761 16 15.5 16C15.2239 16 15 15.7761 15 15.5C15 15.2239 15.2239 15 15.5 15Z",fill:"currentColor",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})]});var pce=T(L(),1),cvt=e=>(0,pce.jsx)("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:(0,pce.jsx)("path",{d:"M22 21V19C22 17.1362 20.7252 15.5701 19 15.126M15.5 3.29076C16.9659 3.88415 18 5.32131 18 7C18 8.67869 16.9659 10.1159 15.5 10.7092M17 21C17 19.1362 17 18.2044 16.6955 17.4693C16.2895 16.4892 15.5108 15.7105 14.5307 15.3045C13.7956 15 12.8638 15 11 15H8C6.13623 15 5.20435 15 4.46927 15.3045C3.48915 15.7105 2.71046 16.4892 2.30448 17.4693C2 18.2044 2 19.1362 2 21M13.5 7C13.5 9.20914 11.7091 11 9.5 11C7.29086 11 5.5 9.20914 5.5 7C5.5 4.79086 7.29086 3 9.5 3C11.7091 3 13.5 4.79086 13.5 7Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})});var fce=T(L(),1),uvt=e=>(0,fce.jsx)("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:(0,fce.jsx)("path",{d:"M4.91334 7.73539C8.82714 4.0882 15.1729 4.0882 19.0867 7.73539L19.5577 8.17432C19.7534 8.35664 19.7534 8.65232 19.5577 8.83464L17.9464 10.3362C17.8485 10.4274 17.6899 10.4274 17.5921 10.3362L16.9439 9.73217C14.2134 7.18782 9.7866 7.18782 7.05614 9.73217L6.36193 10.379C6.26407 10.4702 6.10547 10.4702 6.0076 10.379L4.39629 8.87747C4.20056 8.69515 4.20056 8.39947 4.39629 8.21715L4.91334 7.73539ZM22.4191 10.8407L23.8532 12.1771C24.0489 12.3594 24.0489 12.6551 23.8532 12.8374L17.3867 18.8632C17.1911 19.0456 16.8738 19.0456 16.6781 18.8632L12.0886 14.5865C12.0397 14.5409 11.9604 14.5409 11.9115 14.5865L7.32202 18.8632C7.12638 19.0456 6.8091 19.0456 6.61337 18.8632L0.146771 12.8373C-0.0489237 12.655 -0.0489237 12.3593 0.146771 12.177L1.58087 10.8406C1.77657 10.6582 2.09384 10.6582 2.28954 10.8406L6.87907 15.1173C6.928 15.163 7.0073 15.163 7.05623 15.1173L11.6456 10.8406C11.8412 10.6582 12.1585 10.6582 12.3542 10.8406L16.9438 15.1173C16.9927 15.163 17.072 15.163 17.1209 15.1173L21.7105 10.8407C21.9061 10.6583 22.2234 10.6583 22.4191 10.8407Z",fill:"currentColor"})});var vo=T(L(),1);function dvt(e){let t=w5(),n=Mn(),r=t||n;return(0,vo.jsxs)(S,{style:{minHeight:"300px"},children:[(0,vo.jsx)(S,{p:"lg",children:(0,vo.jsx)(be,{onBack:e.onBack,title:e.locale.manageWallet.title})}),(0,vo.jsx)(Wt,{}),(0,vo.jsxs)(S,{px:"sm",scrollY:!0,style:{maxHeight:"500px"},children:[(0,vo.jsx)(Q,{y:"md"}),(0,vo.jsxs)(S,{style:{height:"250px",position:"relative"},children:[(0,vo.jsx)(cNn,{closeModal:e.closeModal,connectLocale:e.locale}),typeof r<"u"&&e.manageWallet?.allowLinkingProfiles!==!1&&(0,vo.jsxs)(Xs,{onClick:()=>{e.setScreen("linked-profiles")},style:{fontSize:oe.sm},children:[(0,vo.jsx)(cvt,{size:z.md}),(0,vo.jsx)(F,{color:"primaryText",children:e.locale.manageWallet.linkedProfiles})]}),(0,vo.jsxs)(Xs,{onClick:()=>{e.setScreen("wallet-connect-receiver")},style:{fontSize:oe.sm},children:[(0,vo.jsx)(uvt,{size:z.md}),(0,vo.jsx)(F,{color:"primaryText",children:e.locale.manageWallet.connectAnApp})]}),r&&wS(r)&&!r.getConfig()?.hidePrivateKeyExport&&(0,vo.jsxs)(Xs,{onClick:()=>{e.setScreen("private-key")},style:{fontSize:oe.sm},children:[(0,vo.jsx)(lvt,{size:z.md}),(0,vo.jsx)(F,{color:"primaryText",children:e.locale.manageWallet.exportPrivateKey})]})]}),(0,vo.jsx)(Q,{y:"lg"})]})]})}function cNn(e){let t=Mn(),n=e.connectLocale;if(t?.id!=="io.metamask")return null;let r=CS("io.metamask");return r?(0,vo.jsxs)(Xs,{onClick:async()=>{await r.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}),e.closeModal()},type:"button",children:[(0,vo.jsx)(r3t,{height:z.md,width:z.md}),(0,vo.jsx)(F,{color:"primaryText",children:n.switchAccount})]}):null}var kV=T(_(),1);an();bs();ai();o3();ve();nt();_o();var ic=T(L(),1);function pvt(e){let[t,n]=(0,kV.useState)(!0),r=Be("inAppWallet");if((0,kV.useEffect)(()=>{let i=async a=>{if(typeof a.data=="object"&&"eventType"in a.data&&a.origin===r&&a.data.eventType==="exportPrivateKeyIframeLoaded"){let s=document.getElementById(`export-wallet-${e.wallet?.id}`);if(!(s instanceof HTMLIFrameElement)||!e.wallet)return;let l=new Ol({clientId:e.client.clientId,ecosystem:yt(e.wallet)?{id:e.wallet.id,partnerId:e.wallet.getConfig()?.partnerId}:void 0,storage:kn});s?.contentWindow&&s.contentWindow.postMessage({authToken:await l.getAuthCookie(),eventType:"initExportPrivateKey"},a.origin)}};return window.addEventListener("message",i),()=>{window.removeEventListener("message",i)}},[e.wallet,e.client.clientId,r]),!e.wallet)throw new Error("[PrivateKey] No wallet found");let o=yt(e.wallet)?{id:e.wallet.id,partnerId:e.wallet.getConfig()?.partnerId}:void 0;return(0,ic.jsxs)(S,{style:{minHeight:"300px"},children:[(0,ic.jsx)(S,{p:"lg",children:(0,ic.jsx)(be,{onBack:e.onBack,title:e.connectLocale.manageWallet.exportPrivateKey})}),(0,ic.jsx)(Wt,{}),(0,ic.jsxs)(S,{px:"sm",scrollY:!0,style:{maxHeight:"500px"},children:[(0,ic.jsx)(Q,{y:"md"}),(0,ic.jsxs)(S,{style:{height:"250px",position:"relative"},children:[t?(0,ic.jsx)(S,{center:"both",flex:"column",style:{height:"100%",position:"absolute",width:"100%"},children:(0,ic.jsx)(wt,{color:"primaryButtonBg",size:"lg"})}):null,(0,ic.jsx)(S,{style:{height:"100%",position:"absolute",width:"100%",zIndex:11},children:(0,ic.jsx)("iframe",{allow:"clipboard-read; clipboard-write",id:`export-wallet-${e.wallet.id}`,onLoad:()=>{n(!1)},src:`${r}/sdk/2022-08-12/embedded-wallet/export-private-key?clientId=${e.client.clientId}&theme=${typeof e.theme=="string"?e.theme:e.theme.type}${o?`&ecosystemId=${o.id}`:""}${o?.partnerId?`&partnerId=${o.partnerId}`:""}`,style:{height:"250px",visibility:t?"hidden":"unset",width:"100%"},title:"Export In-App Wallet"})})]}),(0,ic.jsx)(Q,{y:"lg"})]})]})}Fe();ye();Zl();function fvt(e,t=!0){return`${e.substring(0,t?4:6)}...${e.substring(e.length-(t?3:4))}`}ve();lF();nt();Ye();md();Bn();var ac=T(L(),1);function mvt(e){let n=Xn()?.address,{hasCopied:r,onCopy:o}=rV(n||""),{connectLocale:i,client:a}=e,s=i.receiveFundsScreen;return(0,ac.jsxs)(S,{p:"lg",className:"tw-receive-funds-screen",children:[(0,ac.jsx)(be,{onBack:e.onBack,title:s.title}),(0,ac.jsx)(Q,{y:"xl"}),(0,ac.jsx)(S,{center:"x",flex:"row",children:(0,ac.jsx)(sx,{QRIcon:e.walletId&&(0,ac.jsx)(jo,{client:a,id:e.walletId,size:z.xxl}),qrCodeUri:n,size:350})}),(0,ac.jsx)(Q,{y:"xl"}),(0,ac.jsxs)(uNn,{onClick:o,className:"tw-copy-address-button",children:[(0,ac.jsx)(F,{color:"primaryText",size:"md",children:fvt(n||"",!1)}),(0,ac.jsx)(Nx,{hasCopied:r,text:n||"",tip:"Copy address"})]}),(0,ac.jsx)(Q,{y:"lg"}),(0,ac.jsx)(F,{balance:!0,center:!0,size:"sm",className:"receive_fund_screen_instruction",multiline:!0,children:s.instruction})]})}var uNn=Ia(e=>{let t=$();return{all:"unset","&:hover":{borderColor:t.colors.accentText},border:`1px solid ${t.colors.borderColor}`,borderRadius:te.md,boxSizing:"border-box",cursor:"pointer",display:"flex",justifyContent:"space-between",padding:Z.md,transition:"border-color 200ms ease",width:"100%"}});Cn();var F0=T(_(),1);ye();mk();Zl();tt();ko();e3();ko();zt();Dt();Gae();TW();As();t1();var dNn="0x3b3b57de",pNn=[{name:"name",type:"bytes32"}];function fNn(e){return No(pNn,[e.name])}function hvt(e){return dNn+fNn(e).slice(2)}Yae();MW();async function gvt(e){let{client:t,name:n,resolverAddress:r,resolverChain:o}=e;return eo(n)?ge(n):nr(async()=>{let i=at({address:r||zA,chain:o||Zu,client:t}),a=hvt({name:IW(n)}),s=await SW({contract:i,data:a,name:En(BA(n))});return ge(`0x${s[0].slice(-40)}`)},{cacheKey:`ens:addr:${o?.id||1}:${n}`,cacheTime:60*1e3})}Go();pw();bT();var mNn="0xa9059cbb",hNn=[{name:"to",type:"address"},{name:"value",type:"uint256"}],gNn=[{type:"bool"}];function yvt(e){let t=ug(async()=>"asyncParams"in e?await e.asyncParams():e);return Lu({accessList:async()=>(await t()).overrides?.accessList,authorizationList:async()=>(await t()).overrides?.authorizationList,contract:e.contract,erc20Value:async()=>(await t()).overrides?.erc20Value,extraGas:async()=>(await t()).overrides?.extraGas,gas:async()=>(await t()).overrides?.gas,gasPrice:async()=>(await t()).overrides?.gasPrice,maxFeePerGas:async()=>(await t()).overrides?.maxFeePerGas,maxPriorityFeePerGas:async()=>(await t()).overrides?.maxPriorityFeePerGas,method:[mNn,hNn,gNn],nonce:async()=>(await t()).overrides?.nonce,params:async()=>{let n=await t();return[n.to,n.value]},value:async()=>(await t()).overrides?.value})}function wvt(e){return yvt({asyncParams:async()=>{let t;if("amount"in e){let{decimals:n}=await Promise.resolve().then(()=>(UR(),u_)),r=await n(e).catch(()=>18);t=Er(e.amount.toString(),r)}else t=e.amountWei;return{overrides:{erc20Value:{amountWei:t,tokenAddress:e.contract.address},...e.overrides},to:e.to,value:t}},contract:e.contract})}fR();E4();k4();S4();zt();function bvt(e){let t=e.split("."),n=t[t.length-1];return t.length<2||!n||/\s/.test(n)||/^\d+$/.test(n)?!1:t.every(r=>!(r.length<1||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(r)||/[\uff01-\uff5e]/.test(r)))}Go();BW();ls();function Avt(e){let t=Mn(),n=da();return Up({async mutationFn(r){let{tokenAddress:o,receiverAddress:i,amount:a}=r,s=t?.getChain(),l=t?.getAccount();if(!s)throw new Error("No active chain");if(!l)throw new Error("No active account");if(!i||!bvt(i)&&!eo(i))throw new Error("Invalid receiver address");if(!a||Number.isNaN(Number(a))||Number(a)<0)throw new Error("Invalid amount");let c=i;try{c=await gvt({client:e,name:i})}catch{throw new Error("Failed to resolve address")}if(o){let u=at({address:o,chain:s,client:e}),d=wvt({amount:a,contract:u,to:c});return await Dp({account:l,transaction:d})}else{let u=T4({chain:s,client:e,to:c,value:tg(a)}),d=await ew({account:l,transaction:u}),f=await YA({address:l.address,chain:s,client:e});if(tg(a)+d>f.value)throw new Error("Insufficient balance for transfer amount and gas");return await Dp({account:l,transaction:u})}},onSettled:async(r,o)=>{o||(r?.transactionHash&&await Ou({chain:r.chain,client:e,maxBlocksWaitTime:1e4,transactionHash:r.transactionHash}),Sj(n))}})}ve();St();M5();$o();nt();_o();var xvt=T(_(),1);Ps();ye();$3();Ps();zt();var My={nativeToken:!0};function Md(e){return e&&("nativeToken"in e||e.address?.toLowerCase()===Pr.toLowerCase()||e?.address===dg)||!1}function mce(e){return Md(e)?Pr:ge(e.address)}ve();Sa();var EV=T(L(),1);function Lx(e){let t=H5(e.chain).data,n=(0,xvt.useMemo)(()=>Md(e.token)||e.token.address===Pr?t?.nativeCurrency.symbol==="ETH"?"ipfs://QmcxZHpyJa8T4i63xqjPYrZ6tKrt55tZJpbXcjSDKuKaf9/ethereum/512.png":t?.icon?.url:e.token.icon,[e.token,t?.icon?.url,t?.nativeCurrency.symbol]);return n?(0,EV.jsx)(nn,{client:e.client,fallbackImage:WW,height:z[e.size],src:n,width:z[e.size]}):(0,EV.jsx)(S,{center:"both",color:"secondaryText",style:{height:z[e.size],width:z[e.size]},children:(0,EV.jsx)(Z5,{size:z[e.size]})})}Ye();Bn();qc();Cn();tt();var gce=T(_(),1);qe();ko();Kae();la();Go();async function vvt(e){let{account:t,client:n,chain:r,tokenAddress:o}=e;if(o){let{getBalance:u}=await Promise.resolve().then(()=>(ase(),ise));return u({address:t.address,contract:at({address:o,chain:r,client:n})})}let i=An({chain:r,client:n}),[a,s,l,c]=await Promise.all([gC(r),yC(r),wC(r),EW(i,{address:t.address})]);return{decimals:s,displayValue:go(c,s),name:l,symbol:a,value:c}}Fe();ye();tt();ko();function hce(e){let{chain:t,tokenAddress:n,client:r}=e;return le({enabled:!!t&&!!r,queryFn:async()=>{if(n){let{getCurrencyMetadata:d}=await Promise.resolve().then(()=>(ose(),t6t));return await d({contract:at({address:n,chain:t,client:r})})}let{getChainDecimals:o,getChainNativeCurrencyName:i,getChainSymbol:a}=await Promise.resolve().then(()=>(qe(),bC)),[s,l,c]=await Promise.all([a(t),o(t),i(t)]);return{decimals:l,name:c,symbol:s}},queryKey:["tokenInfo",t?.id||-1,{tokenAddress:n}]})}Zl();ve();St();Lm();ve();Sa();var rE=T(L(),1),PV=e=>(0,rE.jsxs)(S,{style:{alignItems:"center",display:"flex",flexShrink:0,position:"relative"},children:[(0,rE.jsx)(nn,{client:e.client,fallbackImage:Sd,height:e.size,src:yNn(e),width:e.size}),e.active&&(0,rE.jsx)(Tx,{className:"tw-chain-active-dot-legacy-chain-icon"})]}),yNn=e=>{let t=e.chainIconUrl;if(!t)return Sd;try{return ca({client:e.client,uri:t})}catch{return Sd}};M5();$o();nt();_o();Ye();var qt=T(L(),1);function Ivt(e){let[t,n]=(0,gce.useState)("base"),[r,o]=(0,gce.useState)(""),i=e.chain,a=JF(i),s=xx(i),l=hce({chain:i,client:e.client,tokenAddress:r}),c=e.connectLocale.sendFundsScreen,u=e.tokenList;l.data&&r&&(u=[{...l.data,address:r},...u]);let d=r?u.filter(m=>{let h=r.toLowerCase();return m.name.toLowerCase().includes(h)||m.symbol.toLowerCase().includes(h)||m.address.includes(r)}):u,{chainSelection:f}=e;return t==="select-chain"&&f?(0,qt.jsx)(TV,{className:"tw-send-funds-screen tw-send-funds-screen__select-chain",chains:f.chains,client:e.client,closeModal:()=>n("base"),connectLocale:e.connectLocale,networkSelector:{renderChain(m){return(0,qt.jsx)(uce,{chain:m.chain,client:e.client,confirming:!1,connectLocale:e.connectLocale,onClick:()=>{f.select(m.chain),n("base")},switchingFailed:!1})}},onBack:()=>n("base"),showTabs:!1}):(0,qt.jsxs)(S,{className:"tw-send-funds-screen tw-send-funds-screen__select-token",animate:"fadein",style:{minHeight:"300px"},children:[(0,qt.jsx)(S,{p:"lg",children:(0,qt.jsx)(be,{onBack:e.onBack,title:e.modalTitle||c.selectTokenTitle})}),(0,qt.jsx)(Wt,{}),(0,qt.jsxs)(S,{scrollY:!0,style:{maxHeight:"450px"},children:[(0,qt.jsx)(Q,{y:"md"}),e.chainSelection&&(0,qt.jsxs)(S,{px:"lg",children:[(0,qt.jsx)(F,{size:"sm",children:"Select Network"}),(0,qt.jsx)(Q,{y:"xxs"}),(0,qt.jsxs)(Tvt,{fullWidth:!0,onClick:()=>{n("select-chain")},variant:"secondary",children:[(0,qt.jsx)(PV,{chainIconUrl:s.url,client:e.client,size:z.lg}),a.name?(0,qt.jsx)(F,{color:"primaryText",size:"sm",children:a.name}):(0,qt.jsx)(Te,{height:oe.md}),(0,qt.jsx)(y5,{height:z.sm,style:{marginLeft:"auto"},width:z.sm})]}),(0,qt.jsx)(Q,{y:"xl"}),(0,qt.jsx)(F,{size:"sm",children:"Select Token"})]}),(0,qt.jsxs)(S,{px:"lg",children:[(0,qt.jsx)(Q,{y:"xs"}),(0,qt.jsx)(Ys,{onChange:m=>{o(m.target.value)},placeholder:c.searchToken,value:r,variant:"outline"})]}),(0,qt.jsx)(Q,{y:"md"}),(d.length>0||!r)&&(0,qt.jsxs)(S,{flex:"column",gap:"xs",px:"lg",scrollY:!0,style:{paddingBottom:Z.lg,paddingTop:0},children:[!r&&(0,qt.jsx)(Cvt,{chain:e.chain,client:e.client,onClick:()=>{e.onTokenSelect(My)},token:My}),d.map(m=>(0,qt.jsx)(Cvt,{chain:e.chain,client:e.client,onClick:()=>e.onTokenSelect(m),token:m},m.address))]}),d.length===0&&l.isLoading&&r&&(0,qt.jsx)(S,{animate:"fadein",center:"both",color:"secondaryText",flex:"column",gap:"md",p:"lg",style:{minHeight:"200px",paddingTop:0},children:(0,qt.jsx)(wt,{color:"accentText",size:"lg"})}),d.length===0&&!l.isLoading&&r&&(0,qt.jsxs)(S,{animate:"fadein",center:"both",color:"secondaryText",flex:"column",gap:"md",p:"lg",style:{minHeight:"200px",paddingTop:0},children:[(0,qt.jsx)(Qs,{height:z.lg,width:z.lg}),c.noTokensFound]}),(0,qt.jsx)(Q,{y:"md"})]})]})}function Cvt(e){let t=Xn(),n=hce({chain:e.chain,client:e.client,tokenAddress:Md(e.token)?void 0:e.token.address}),r=Md(e.token)?n.data?.name:e.token.name;return(0,qt.jsxs)(Tvt,{fullWidth:!0,onClick:e.onClick,variant:"secondary",children:[(0,qt.jsx)(Lx,{chain:e.chain,client:e.client,size:"lg",token:e.token}),(0,qt.jsxs)(S,{flex:"column",gap:"4xs",children:[r?(0,qt.jsx)(F,{color:"primaryText",size:"sm",children:r}):(0,qt.jsx)(Te,{height:oe.md,width:"150px"}),t&&(0,qt.jsx)(wNn,{account:t,chain:e.chain,client:e.client,tokenAddress:Md(e.token)?void 0:e.token.address})]})]})}function wNn(e){let t=le({queryFn:async()=>vvt({account:e.account,chain:e.chain,client:e.client,tokenAddress:e.tokenAddress}),queryKey:["tokenBalance",e]});return t.data?(0,qt.jsxs)(F,{size:"xs",children:[" ",W0(t.data)]}):(0,qt.jsx)(Te,{height:oe.xs,width:"100px"})}var Tvt=Zt(ae)(()=>{let e=$();return{"&:hover":{background:e.colors.secondaryButtonBg,transform:"scale(1.01)"},background:e.colors.tertiaryBg,gap:Z.sm,justifyContent:"flex-start",padding:Z.sm,transition:"background 200ms ease, transform 150ms ease"}});var jt=T(L(),1);function Svt(e){let[t,n]=(0,F0.useState)("base"),o=cr()?.id,{connectLocale:i,client:a}=e,s=My,l=e.supportedTokens||B5;if(o&&l[o]&&l[o]!==B5[o]){let A=l[o]?.[0];A&&(s=A)}let[c,u]=(0,F0.useState)(s),[d,f]=(0,F0.useState)(""),[m,h]=(0,F0.useState)("0"),g=cr(),w=(g?.id?l[g.id]:void 0)||[];return t==="tokenSelector"&&g?(0,jt.jsx)(Ivt,{chain:g,client:a,connectLocale:i,onBack:()=>{n("base")},onTokenSelect:b=>{u(b),n("base")},tokenList:w}):(0,jt.jsx)(bNn,{amount:m,client:a,connectLocale:i,onBack:e.onBack,onTokenSelect:()=>{n("tokenSelector")},receiverAddress:d,setAmount:h,setReceiverAddress:f,token:c})}function bNn(e){let t=e.connectLocale.sendFundsScreen,n=e.token&&"address"in e.token?e.token.address:void 0,r=cr(),o=Xn(),i=cr(),a=C5({address:o?.address,chain:r,client:e.client,tokenAddress:n}),{receiverAddress:s,setReceiverAddress:l,amount:c,setAmount:u}=e,d=Avt(e.client);function f(A){let x=A?.data?.message||A?.message;return x?x.includes("user rejected")||x.includes("user closed modal")||x.includes("user denied")?t.transactionRejected:x.includes("insufficient funds")?t.insufficientFunds:x:t.transactionFailed}let m=(0,F0.useId)(),h=(0,F0.useId)(),g=(0,F0.useId)();if(!i)return null;if(d.isError)return(0,jt.jsxs)(S,{animate:"fadein",p:"lg",className:"tw-send-funds-screen tw-send-funds-screen__error",children:[(0,jt.jsx)(be,{onBack:()=>{d.reset()},title:t.title}),(0,jt.jsx)(Q,{y:"xl"}),(0,jt.jsxs)(S,{animate:"fadein",center:"both",color:"danger",flex:"column",gap:"lg",style:{minHeight:"200px"},children:[(0,jt.jsx)(Qs,{height:z.xl,width:z.xl}),(0,jt.jsx)(F,{center:!0,color:"danger",multiline:!0,children:f(d.error)})]})]});if(d.isSuccess)return(0,jt.jsxs)(S,{animate:"fadein",p:"lg",className:"tw-send-funds-screen tw-send-funds-screen__success",children:[(0,jt.jsx)(be,{onBack:()=>{d.reset()},title:t.title}),(0,jt.jsxs)(S,{animate:"fadein",center:"both",color:"success",flex:"column",gap:"lg",style:{minHeight:"250px"},children:[(0,jt.jsx)(Y4t,{height:z.xl,width:z.xl}),(0,jt.jsxs)(F,{color:"success",children:[" ",t.successMessage," "]})]})]});let w=(e.token&&"name"in e.token?e.token.name:void 0)||a?.data?.name,b=(e.token&&"symbol"in e.token?e.token.symbol:void 0)||a?.data?.symbol;return(0,jt.jsxs)(S,{animate:"fadein",p:"lg",className:"tw-send-funds-screen tw-send-funds-screen__form",children:[(0,jt.jsx)(be,{onBack:e.onBack,title:t.title}),(0,jt.jsx)(Q,{y:"xl"}),(0,jt.jsxs)("form",{onSubmit:A=>{A.preventDefault()},children:[(0,jt.jsx)(XW,{color:"secondaryText",htmlFor:m,children:t.token}),(0,jt.jsx)(Q,{y:"sm"}),(0,jt.jsxs)(ae,{className:"tw-select-token-button",fullWidth:!0,id:m,onClick:e.onTokenSelect,style:{gap:Z.sm,justifyContent:"flex-start",padding:Z.sm},variant:"outline",children:[(0,jt.jsx)(Lx,{chain:i,client:e.client,size:"lg",token:e.token}),(0,jt.jsxs)(S,{flex:"column",gap:"xs",children:[w?(0,jt.jsx)(F,{color:"primaryText",size:"sm",children:w}):(0,jt.jsx)(Te,{height:oe.xs,width:"150px"}),a.data?(0,jt.jsx)(F,{size:"xs",children:W0(a.data)}):(0,jt.jsx)(Te,{height:oe.xs,width:"100px"})]})]}),(0,jt.jsx)(Q,{y:"lg"}),(0,jt.jsx)(XW,{color:"secondaryText",htmlFor:h,children:t.sendTo}),(0,jt.jsx)(Q,{y:"sm"}),(0,jt.jsx)(Ys,{className:"tw-address-input",id:h,onChange:A=>{l(A.target.value)},placeholder:"0x... or ENS name",required:!0,value:s,variant:"outline"}),(0,jt.jsx)(Q,{y:"lg"}),(0,jt.jsx)(XW,{color:"secondaryText",htmlFor:g,children:t.amount}),(0,jt.jsx)(Q,{y:"sm"}),(0,jt.jsxs)(S,{relative:!0,children:[(0,jt.jsx)(Ys,{className:"tw-amount-input",id:g,onChange:A=>{u(A.target.value)},required:!0,type:"number",value:c,variant:"outline"}),(0,jt.jsx)(ANn,{children:(0,jt.jsxs)(F,{size:"xs",children:[" ",b," "]})})]}),(0,jt.jsx)(Q,{y:"xxl"}),(0,jt.jsxs)(ae,{className:"tw-send-funds-button",fullWidth:!0,onClick:async()=>{!s||!c||await d.mutateAsync({amount:c,receiverAddress:s,tokenAddress:n})},style:{alignItems:"center",gap:Z.sm,padding:Z.md},type:"submit",variant:"accent",children:[d.isPending&&(0,jt.jsx)(wt,{color:"accentButtonText",size:"sm"}),d.isPending?t.sending:t.submitButton]})]})]})}var ANn=mt({position:"absolute",right:Z.sm,top:"50%",transform:"translateY(-50%)"});var OV=T(_(),1);ye();ve();nt();Fe();ye();Ye();ve();St();nt();var ky=T(L(),1);function yce({selected:e,onSelect:t,options:n,children:r}){let o=$();return(0,ky.jsxs)("div",{children:[(0,ky.jsx)(S,{bg:"secondaryButtonBg",center:"y",flex:"row",p:"xxs",style:{borderRadius:te.lg,width:"100%"},children:n.map(i=>(0,ky.jsx)(ae,{onClick:()=>t(i.value),style:{alignItems:"center",backgroundColor:i.value===e?o.colors.modalBg:"transparent",borderRadius:te.md,display:"flex",flex:1,justifyContent:"center",paddingBlock:Z.sm,position:"relative"},type:"button",variant:"accent",children:(0,ky.jsx)(F,{color:i.value===e?"primaryText":"secondaryText",size:"sm",style:{textAlign:"center"},children:i.label})},i.value))}),(0,ky.jsx)(Q,{y:"sm"}),r]})}var Ox=T(L(),1),Mvt=e=>(0,Ox.jsxs)("svg",{fill:"none",height:e.size,role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[(0,Ox.jsx)("rect",{height:"18",rx:"2",ry:"2",width:"18",x:"3",y:"3"}),(0,Ox.jsx)("circle",{cx:"9",cy:"9",r:"2"}),(0,Ox.jsx)("path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"})]});tt();qe();xW();Zl();ve();$o();nt();Ye();var Co=T(_(),1);var _c=T(L(),1),kvt=e=>(0,_c.jsxs)("svg",{height:"16",role:"presentation",viewBox:"0 0 32 32",width:"16",...e,children:[(0,_c.jsx)("circle",{cx:"9",cy:"28.5",fill:"currentColor",r:"1.5"}),(0,_c.jsx)("path",{d:"M10 25H8v-4h2a2 2 0 0 0 0-4H8a2.002 2.002 0 0 0-2 2v.5H4V19a4.005 4.005 0 0 1 4-4h2a4 4 0 0 1 0 8Z",fill:"currentColor"}),(0,_c.jsx)("path",{d:"m27.7 9.3l-7-7A.908.908 0 0 0 20 2H10a2.006 2.006 0 0 0-2 2v8h2V4h8v6a2.006 2.006 0 0 0 2 2h6v16H14v2h12a2.006 2.006 0 0 0 2-2V10a.91.91 0 0 0-.3-.7ZM20 10V4.4l5.6 5.6Z",fill:"currentColor"})]}),Evt=e=>(0,_c.jsxs)("svg",{height:"16",role:"presentation",viewBox:"0 0 32 32",width:"16",...e,children:[(0,_c.jsx)("path",{d:"M29 31a.999.999 0 0 1-.625-.22L23.65 27H20a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1h3.65l4.726-3.78A1 1 0 0 1 30 17v13a1 1 0 0 1-1 1Zm-8-6h3a1 1 0 0 1 .625.22L28 27.92v-8.84l-3.376 2.7A1 1 0 0 1 24 22h-3Z",fill:"currentColor"}),(0,_c.jsx)("path",{d:"M16 28H8V4h8v6a2.006 2.006 0 0 0 2 2h6v3h2v-5a.91.91 0 0 0-.3-.7l-7-7A.909.909 0 0 0 18 2H8a2.006 2.006 0 0 0-2 2v24a2.006 2.006 0 0 0 2 2h8Zm2-23.6l5.6 5.6H18Z",fill:"currentColor"})]}),Pvt=e=>(0,_c.jsx)("svg",{height:"16",role:"presentation",viewBox:"0 0 32 32",width:"16",...e,children:(0,_c.jsx)("path",{d:"M12 6h-2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2zm10 0h-2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2z",fill:"currentColor"})}),Nvt=e=>(0,_c.jsx)("svg",{height:"16",role:"presentation",viewBox:"0 0 32 32",width:"16",...e,children:(0,_c.jsx)("path",{d:"M7 28a1 1 0 0 1-1-1V5a1 1 0 0 1 1.482-.876l20 11a1 1 0 0 1 0 1.752l-20 11A1 1 0 0 1 7 28Z",fill:"currentColor"})});tt();var Rvt=T(_(),1);CJ();Lm();var Rx="audio/mpeg",NV="audio/midi",DV="audio/ogg",wce="image/jpeg",Dvt={"*3gpp":"audio/3gpp","*jpm":"video/jpm","*mp3":"audio/mp3","*wav":"audio/wave","*x3db":"model/x3d+binary","*x3dv":"model/x3d+vrml","3g2":"video/3gpp2","3gp":"video/3gpp","3gpp":"video/3gpp","3mf":"model/3mf",adp:"audio/adpcm",amr:"audio/amr",apng:"image/apng",au:"audio/basic",avif:"image/avif",bmp:"image/bmp",cgm:"image/cgm",drle:"image/dicom-rle",emf:"image/emf",exr:"image/aces",fits:"image/fits",g3:"image/g3fax",gif:"image/gif",glb:"model/gltf-binary",gltf:"model/gltf+json",h261:"video/h261",h263:"video/h263",h264:"video/h264",heic:"image/heic",heics:"image/heic-sequence",heif:"image/heif",heifs:"image/heif-sequence",hej2:"image/hej2k",hsj2:"image/hsj2",htm:"text/html",html:"text/html",ief:"image/ief",iges:"model/iges",igs:"model/iges",jhc:"image/jphc",jls:"image/jls",jp2:"image/jp2",jpe:wce,jpeg:wce,jpf:"image/jpx",jpg:wce,jpg2:"image/jp2",jpgm:"video/jpm",jpgv:"video/jpeg",jph:"image/jph",jpm:"image/jpm",jpx:"image/jpx",jxr:"image/jxr",jxra:"image/jxra",jxrs:"image/jxrs",jxs:"image/jxs",jxsc:"image/jxsc",jxsi:"image/jxsi",jxss:"image/jxss",kar:NV,ktx:"image/ktx",ktx2:"image/ktx2",m1v:"video/mpeg",m2a:Rx,m2v:"video/mpeg",m3a:Rx,m4a:"audio/mp4",m4s:"video/iso.segment",mesh:"model/mesh",mid:NV,midi:NV,mj2:"video/mj2",mjp2:"video/mj2",mkv:"video/x-matroska",mov:"video/quicktime",mp2:Rx,mp2a:Rx,mp3:Rx,mp4:"video/mp4",mp4a:"audio/mp4",mp4v:"video/mp4",mpe:"video/mpeg",mpeg:"video/mpeg",mpg:"video/mpeg",mpg4:"video/mp4",mpga:Rx,msh:"model/mesh",mtl:"model/mtl",mxmf:"audio/mobile-xmf",obj:"model/obj",oga:DV,ogg:DV,ogv:"video/ogg",opus:DV,png:"image/png",qt:"video/quicktime",rmi:NV,s3m:"audio/s3m",sgi:"image/sgi",shtml:"text/html",sil:"audio/silk",silo:"model/mesh",snd:"audio/basic",spx:DV,stl:"model/stl",svg:"image/svg+xml",svgz:"image/svg+xml",t38:"image/t38",tfx:"image/tiff-fx",tif:"image/tiff",tiff:"image/tiff",ts:"video/mp2t",vrml:"model/vrml",wav:"audio/wav",weba:"audio/webm",webm:"video/webm",webp:"image/webp",wmf:"image/wmf",wrl:"model/vrml",x3d:"model/x3d+xml",x3db:"model/x3d+fastinfoset",x3dbz:"model/x3d+binary",x3dv:"model/x3d-vrml",x3dvz:"model/x3d+vrml",x3dz:"model/x3d+xml",xm:"audio/xm"};function Lvt(e){let t=e.replace(/^.*[/\\]/,"").toLowerCase(),n=t.replace(/^.*\./,"").toLowerCase(),r=t.length<e.length;return(n.length<t.length-1||!r)&&Dvt[n]||null}async function Ovt(e){if(!e)return;let t=Lvt(e);if(t)return t;let n=e.startsWith("blob:")?await fetch(e):await fetch(e,{method:"HEAD"});if(n.ok&&n.headers.has("content-type"))return n.headers.get("content-type")||void 0}function bce(e,t,n,r){let o=(0,Rvt.useMemo)(()=>{if(!t)return"";if(t.startsWith("ar://"))return vJ({gatewayUrl:r,uri:t});if(r)return t.replace("ipfs://",r);try{return ca({client:e,uri:t})}catch{return t.replace("ipfs://","https://ipfs.io/ipfs/")}},[t,r,e]),i=le({enabled:!!o&&!n,initialData:n,queryFn:()=>Ovt(o),queryKey:["mime-type",o]});return{isFetched:i.isFetched||!!n,mediaInfo:{mimeType:i.data||"image/",url:o}}}var gn=T(L(),1),Bvt=(0,Co.forwardRef)(function({src:t,poster:n,alt:r,gatewayUrl:o,requireInteraction:i=!1,width:a="300px",height:s="300px",style:l,mimeType:c,client:u,controls:d,className:f},m){let h={objectFit:"contain",...l},{mediaInfo:g,isFetched:w}=bce(u,t??void 0,c,o),{mediaInfo:b}=bce(u,n??void 0,void 0,o);if(!w||!t)return(0,gn.jsx)("div",{className:f,style:l});if(g.mimeType){if(g.mimeType.startsWith("text/html"))return(0,gn.jsx)(CNn,{alt:r,className:f,poster:b.url,ref:m,requireInteraction:i,src:g.url,style:h});if(g.mimeType.startsWith("model")&&(console.error("Encountered an unsupported media type. 3D model support was removed in v5.92.0. To add a 3D model to your app, use @google/model-viewer and use the ModelViewer component."),b.mimeType?.startsWith("image/")))return(0,gn.jsx)(jvt,{alt:r,className:f,height:s,ref:m,src:b.url,style:h,width:a});if(g.mimeType.startsWith("video"))return(0,gn.jsx)(xNn,{className:f,controls:d,poster:b.mimeType?.startsWith("image/")?b.url:void 0,ref:m,requireInteraction:i,src:g.url,style:h});if(g.mimeType.startsWith("audio"))return(0,gn.jsx)(vNn,{alt:r,className:f,controls:d,height:s,poster:b.url,ref:m,src:g.url,style:h,width:a});if(g.mimeType.startsWith("image/"))return(0,gn.jsx)(jvt,{alt:r,className:f,height:s,ref:m,src:g.url,style:h,width:a})}return(0,gn.jsx)(LV,{alt:r,className:f,ref:m,src:g.url,style:h})}),Ace=({onClick:e,isPlaying:t})=>{let[n,r]=(0,Co.useState)(!1);return(0,gn.jsx)("button",{onClick:e,onMouseDown:()=>r(!1),onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),onMouseUp:()=>r(!0),style:{backgroundColor:"#fff",border:"1px solid rgb(229, 232, 235)",borderRadius:"50%",bottom:0,color:"rgb(138, 147, 155)",cursor:"pointer",display:"grid",height:"32px",padding:0,placeItems:"center",position:"absolute",right:0,transform:"translate(-25%, -25%)",width:"32px",zIndex:3,...n?{boxShadow:"rgb(4 17 29 / 25%) 0px 0px 8px 0px",color:"rgb(53, 56, 64)"}:{}},type:"button",children:t?(0,gn.jsx)(Pvt,{}):(0,gn.jsx)(Nvt,{})})},jvt=(0,Co.forwardRef)(function(t,n){let{style:r,src:o,alt:i,className:a,height:s,width:l}=t,[c,u]=(0,Co.useState)(!1);return c?(0,gn.jsx)(LV,{alt:i,className:a,ref:n,src:o,style:r}):(0,gn.jsx)("img",{alt:i,className:a,height:s,onError:()=>{u(!0)},ref:n,src:o??void 0,style:r,width:l})}),xNn=(0,Co.forwardRef)(function({src:t,alt:n,poster:r,requireInteraction:o,style:i,width:a,height:s,controls:l,className:c},u){let d=(0,Co.useRef)(null),[f,m]=(0,Co.useState)(!o),[h,g]=(0,Co.useState)(!0),[w,b]=(0,Co.useState)(!1);return(0,Co.useEffect)(()=>{if(d.current)if(f)try{d.current.play()}catch(A){console.error("Error playing video",A)}else try{d.current.pause(),d.current.currentTime=0}catch(A){console.error("Error pausing video",A)}},[f]),w?(0,gn.jsx)(LV,{alt:n,className:c,ref:u,src:t,style:i}):(0,gn.jsxs)("div",{className:c,style:{position:"relative",...i},children:[(0,gn.jsx)("video",{controls:l,controlsList:"nodownload",height:s,loop:!0,muted:h,onCanPlay:()=>{f&&d.current?.play()},onError:()=>{b(!0)},playsInline:!0,poster:r??void 0,preload:r?"metadata":"auto",ref:zvt([d,u]),src:t??void 0,style:{height:"100%",objectFit:"contain",opacity:r?f?1:0:1,transition:"opacity .5s",width:"100%",zIndex:1},width:a}),r&&(0,gn.jsx)("img",{alt:n,src:r,style:{bottom:0,height:"100%",left:0,objectFit:"contain",opacity:f?0:1,pointerEvents:"none",position:"absolute",right:0,top:0,transition:"opacity .5s",width:"100%",zIndex:2}}),(0,gn.jsx)(Ace,{isPlaying:f,onClick:()=>{m(A=>!A),g(!1)}})]})}),vNn=(0,Co.forwardRef)(function({src:t,alt:n,poster:r,style:o,height:i,width:a,className:s,controls:l},c){let u=(0,Co.useRef)(null),[d,f]=(0,Co.useState)(!1),[m,h]=(0,Co.useState)(!0),[g,w]=(0,Co.useState)(!1);return(0,Co.useEffect)(()=>{u.current&&(d?u.current.play():(u.current.pause(),u.current.currentTime=0))},[d]),g?(0,gn.jsx)(LV,{alt:n,className:s,ref:c,src:t,style:o}):(0,gn.jsxs)("div",{className:s,style:{position:"relative",...o},children:[r?(0,gn.jsx)("img",{alt:n,height:i,src:r,style:{height:"100%",objectFit:"contain",pointerEvents:"none",width:"100%"},width:a}):(0,gn.jsx)("div",{style:{backgroundColor:"#fff",color:"rgb(138, 147, 155)",display:"grid",height:"100%",placeItems:"center",pointerEvents:"none",width:"100%"},children:(0,gn.jsx)(Evt,{style:{height:"64px",width:"64px"}})}),(0,gn.jsx)(Ace,{isPlaying:d,onClick:()=>{f(b=>!b),h(!1)}}),(0,gn.jsx)("audio",{controls:l,controlsList:"nodownload",loop:!0,muted:m,onError:()=>{w(!0)},playsInline:!0,preload:"none",ref:zvt([u,c]),src:t??void 0,style:{opacity:0,pointerEvents:"none",position:"absolute",visibility:"hidden",zIndex:-1}})]})}),CNn=(0,Co.forwardRef)(function({src:t,alt:n,poster:r,requireInteraction:o,style:i,...a},s){let[l,c]=(0,Co.useState)(!o);return(0,gn.jsxs)("div",{style:{position:"relative",...i},...a,children:[(0,gn.jsx)("iframe",{allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",ref:s,sandbox:"allow-scripts",src:l?t??void 0:void 0,style:{border:"none",height:"100%",objectFit:"contain",opacity:r?l?1:0:1,transition:"opacity .5s",width:"100%",zIndex:1},title:n||"thirdweb iframe player"}),r&&(0,gn.jsx)("img",{alt:n,src:r,style:{bottom:0,height:"100%",left:0,objectFit:"contain",opacity:l?0:1,pointerEvents:"none",position:"absolute",right:0,top:0,transition:"opacity .5s",width:"100%",zIndex:2}}),(0,gn.jsx)(Ace,{isPlaying:l,onClick:()=>{c(u=>!u)}})]})}),LV=(0,Co.forwardRef)(function({src:t,alt:n,style:r,className:o},i){return(0,gn.jsx)("div",{className:o,style:{position:"relative",...r},children:(0,gn.jsx)("div",{style:{backgroundColor:"#fff",color:"rgb(138, 147, 155)",display:"grid",height:"100%",placeItems:"center",width:"100%"},children:(0,gn.jsxs)("div",{style:{alignItems:"center",display:"flex",flexDirection:"column",flexWrap:"nowrap",gap:"8px"},children:[(0,gn.jsx)(kvt,{style:{aspectRatio:"1",maxWidth:"128px",minWidth:"48px",width:"50%"}}),(0,gn.jsx)("a",{href:t??void 0,ref:i,rel:"noopener noreferrer",style:{color:"rgb(138, 147, 155)",textDecoration:"underline"},target:"_blank",children:n||"File"})]})})})});function zvt(e){return t=>{for(let n of e)typeof n=="function"?n(t):n!=null&&(n.current=t)}}var Vn=T(L(),1);function Uvt(e){return(0,Vn.jsxs)(S,{style:{minHeight:"300px"},children:[(0,Vn.jsx)(S,{p:"lg",children:(0,Vn.jsx)(be,{onBack:e.onBack,title:e.connectLocale.viewFunds.viewNFTs})}),(0,Vn.jsx)(Wt,{}),(0,Vn.jsxs)(S,{px:"sm",scrollY:!0,style:{maxHeight:"500px"},children:[(0,Vn.jsx)(Q,{y:"md"}),(0,Vn.jsx)(xce,{...e})]})]})}function xce(e){let t=Xn(),n=cr(),r=le({enabled:!!n&&!!t,queryFn:async()=>{if(!t)throw new Error("No active account");if(!n)throw new Error("No active chain");return(await Uae({chains:[n],client:e.client,ownerAddress:t.address,contractAddresses:e.supportedNFTs?.[n.id]?.map(a=>a.toLowerCase())})).filter(a=>!!a.metadata.name&&!!a.metadata.image).map(a=>({address:a.tokenAddress,chain:We(a.chainId),...a}))},queryKey:["nfts",n?.id,t?.address,e.supportedNFTs]});if(!n?.id||!t?.address)return null;let o=r.data;return(0,Vn.jsxs)(Vn.Fragment,{children:[r.error?(0,Vn.jsx)(S,{center:"both",py:"lg",children:(0,Vn.jsx)(F,{center:!0,color:"secondaryText",size:"sm",children:"Error loading NFTs"})}):r.data?.length===0&&!r.isLoading?(0,Vn.jsx)(S,{center:"both",py:"lg",children:(0,Vn.jsx)(F,{center:!0,color:"secondaryText",size:"sm",children:"No NFTs found on this chain"})}):(0,Vn.jsx)(S,{style:{display:"grid",gap:"12px",gridTemplateColumns:"1fr 1fr"},children:r.isLoading||!o?(0,Vn.jsxs)(Vn.Fragment,{children:[(0,Vn.jsx)(Te,{height:"150px",width:"150px"}),(0,Vn.jsx)(Te,{height:"150px",width:"150px"}),(0,Vn.jsx)(Te,{height:"150px",width:"150px"})]}):o.map(i=>(0,Vn.jsx)(INn,{...i,chain:i.chain,client:e.client,theme:e.theme},`${i.chain.id}:${i.address}:${i.id}`))}),(0,Vn.jsx)(Q,{y:"lg"})]})}function INn(e){let t=typeof e.theme=="string"?e.theme:e.theme.type,n=typeof e.theme=="string"?void 0:e.theme,r=(0,Vn.jsxs)("div",{style:{alignItems:"center",display:"flex",flexDirection:"column",gap:"4px",width:"150px"},children:[(0,Vn.jsxs)("div",{style:{alignItems:"center",background:t==="light"?"rgba(0, 0, 0, 0.10)":"rgba(0, 0, 0, 0.20)",borderRadius:"8px",display:"flex",flexShrink:0,height:"150px",overflow:"hidden",position:"relative",width:"150px"},children:[e.metadata.image&&(0,Vn.jsx)(Bvt,{client:e.client,src:e.metadata.image,style:{height:"100%",width:"100%"}}),e.quantityOwned>1&&(0,Vn.jsx)("div",{style:{alignItems:"center",background:n?.colors?.modalBg??(t==="light"?"white":"black"),borderRadius:"100%",bottom:"4px",display:"flex",fontSize:"10px",height:"20px",justifyContent:"center",padding:"4px 4px",position:"absolute",right:"4px",width:"20px"},children:e.quantityOwned.toString()}),e.chain.icon&&(0,Vn.jsx)("img",{alt:e.chain.name,src:e.chain.icon.url,style:{bottom:"4px",height:"20px",left:"4px",position:"absolute",width:"20px"}})]}),(0,Vn.jsx)(F,{color:"primaryText",size:"xs",style:{fontWeight:600,maxLines:2,textAlign:"center"},children:e.metadata.name})]});return e.chain.name?(0,Vn.jsx)("a",{href:`https://thirdweb.com/${e.chain.id}/${e.address}/nfts/${e.id}`,rel:"noreferrer",target:"_blank",children:r}):r}tt();ryt();ye();mk();Zl();ve();$o();nt();Ye();var Tr=T(L(),1);function Hvt(e){return(0,Tr.jsxs)(S,{style:{minHeight:"300px"},children:[(0,Tr.jsx)(S,{p:"lg",children:(0,Tr.jsx)(be,{onBack:e.onBack,title:e.connectLocale.viewFunds.viewTokens})}),(0,Tr.jsx)(Wt,{}),(0,Tr.jsxs)(S,{px:"sm",scrollY:!0,style:{maxHeight:"500px"},children:[(0,Tr.jsx)(Q,{y:"md"}),(0,Tr.jsx)(Cce,{...e}),(0,Tr.jsx)(Q,{y:"lg"})]})]})}function Cce(e){let t=Xn(),n=cr(),r=e.supportedTokens||B5,o=(n?.id?r[n.id]:void 0)||[],i=le({enabled:!!n&&!!t&&(!e.supportedTokens||!e.supportedTokens[n.id]),queryFn:async()=>{if(!n)throw new Error("No active chain");if(!t)throw new Error("No account");return(await nyt({chains:[n],client:e.client,ownerAddress:t.address})).filter(s=>!B5[n.id]?.some(l=>l.address.toLowerCase()===s.tokenAddress.toLowerCase()))},queryKey:["tokens",n?.id,t?.address]});return!n||!t?null:(0,Tr.jsxs)(Tr.Fragment,{children:[(0,Tr.jsx)(vce,{chain:n,client:e.client,token:My}),o.map(a=>(0,Tr.jsx)(vce,{chain:n,client:e.client,token:a},a.address)),i.isLoading&&(0,Tr.jsxs)(S,{flex:"column",gap:"sm",p:"sm",children:[(0,Tr.jsx)(Te,{height:oe.md,width:"100%"}),(0,Tr.jsx)(Te,{height:oe.md,width:"100%"})]}),i.data?.map(a=>(0,Tr.jsx)(vce,{balanceData:a,chain:n,client:e.client,token:{address:a.tokenAddress,name:a.name??"",symbol:a.symbol??""}},a.tokenAddress))]})}function vce(e){let t=Xn(),n=C5({address:t?.address,chain:e.chain,client:e.client,tokenAddress:Md(e.token)?void 0:e.token.address},{enabled:e.balanceData===void 0}),r=Md(e.token)?n.data?.name:e.token.name;return(0,Tr.jsxs)(S,{flex:"row",gap:"sm",p:"sm",children:[(0,Tr.jsx)(Lx,{chain:e.chain,client:e.client,size:"lg",token:e.token}),(0,Tr.jsxs)(S,{flex:"column",gap:"xxs",children:[r?(0,Tr.jsx)(F,{color:"primaryText",size:"sm",children:r}):(0,Tr.jsx)(Te,{height:oe.md,width:"150px"}),e.balanceData?(0,Tr.jsxs)(F,{size:"xs",children:[" ",W0(e.balanceData)]}):n.data?(0,Tr.jsxs)(F,{size:"xs",children:[" ",W0(n.data)]}):(0,Tr.jsx)(Te,{height:oe.xs,width:"100px"})]})]})}var Pa=T(L(),1),Wvt={label:(0,Pa.jsxs)("span",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[(0,Pa.jsx)(Z5,{size:z.sm})," Tokens"]}),value:"Tokens"},Fvt={label:(0,Pa.jsxs)("span",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[(0,Pa.jsx)(Mvt,{size:z.sm})," NFTs"]}),value:"NFTs"};function Vvt(e){let{connectLocale:t}=e,n=(0,OV.useMemo)(()=>{if(!e.assetTabs)return[Wvt,Fvt];if(!e.assetTabs.length)return[];let i=[];for(let a of e.assetTabs)a==="token"?i.push(Wvt):a==="nft"&&i.push(Fvt);return i},[e.assetTabs]),[r,o]=(0,OV.useState)(n[0]?.value||"Tokens");return(0,Pa.jsxs)(S,{animate:"fadein",style:{minHeight:"300px"},children:[(0,Pa.jsx)(S,{p:"lg",children:(0,Pa.jsx)(be,{onBack:e.onBack,title:t.viewFunds.viewAssets})}),(0,Pa.jsx)(Wt,{}),(0,Pa.jsxs)(S,{px:"lg",scrollY:!0,style:{minHeight:"330px"},children:[(0,Pa.jsx)(Q,{y:"md"}),(0,Pa.jsx)(yce,{onSelect:o,options:n,selected:r,children:(0,Pa.jsxs)(S,{scrollY:!0,style:{maxHeight:"300px"},children:[r==="Tokens"&&(0,Pa.jsx)(Cce,{client:e.client,connectLocale:t,supportedTokens:e.supportedTokens}),r==="NFTs"&&(0,Pa.jsx)(xce,{client:e.client,connectLocale:t,supportedNFTs:e.supportedNFTs,theme:e.theme})]})}),(0,Pa.jsx)(Q,{y:"lg"})]})]})}Cn();tt();var Ece=T(_(),1);Mce();ye();ls();gse();ve();St();nt();Ye();Cn();ye();ve();St();nt();Ye();Ak();var ao=T(L(),1);function pCt(e){return(0,ao.jsxs)(S,{style:{minHeight:"300px"},children:[(0,ao.jsx)(S,{p:"lg",children:(0,ao.jsx)(be,{onBack:e.onBack,title:"Connect an App"})}),(0,ao.jsx)(Wt,{}),(0,ao.jsx)(S,{px:"lg",scrollY:!0,style:{maxHeight:"500px"},children:(0,ao.jsxs)(S,{py:"lg",style:{position:"relative"},children:[(0,ao.jsx)(S,{py:"md",children:(0,ao.jsx)(S5,{client:e.client,error:!!e.error,hideSpinner:!0,id:"walletConnect"})}),(0,ao.jsx)(S,{animate:"fadein",style:{animationDuration:"200ms"},children:e.error?(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsx)(F,{balance:!0,center:!0,multiline:!0,size:"sm",children:e.error}),(0,ao.jsx)(Q,{y:"md"}),(0,ao.jsx)(S,{animate:"fadein",center:"x",flex:"row",children:(0,ao.jsxs)(ae,{fullWidth:!0,onClick:()=>e.disconnect(),style:{alignItems:"center",gap:Z.xs},variant:"accent",children:[(0,ao.jsx)(A0,{height:z.sm,width:z.sm}),"Retry"]})})]}):(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsxs)(F,{balance:!0,center:!0,multiline:!0,size:"md",children:["Connected to ",e.session.origin??"another app."]}),(0,ao.jsx)(Q,{y:"xl"}),(0,ao.jsx)(ae,{fullWidth:!0,onClick:()=>{e.disconnect()},variant:"accent",children:"Disconnect"})]})})]})})]})}Ak();var Zn=T(L(),1);function fCt(e){let t=Mn(),[n,r]=(0,Ece.useState)(!1),[o,i]=(0,Ece.useState)(!1),a=da(),{data:s}=le({enabled:!!t,queryFn:async()=>{if(t)try{return await cCt({chains:e.chains,client:e.client,onConnect:()=>{r(!1),a.invalidateQueries({queryKey:["walletConnectSession"]})},onDisconnect:()=>{r(!1),a.invalidateQueries({queryKey:["walletConnectSession"]})},onError:f=>{i(f.message),r(!1)},wallet:t})}catch{i("Failed to establish WalletConnect connection");return}},queryKey:["walletConnectClient"],retry:!1}),{data:l,refetch:c}=le({enabled:!!s,queryFn:async()=>s&&(await dCt())[0]||null,queryKey:["walletConnectSession"]}),{mutateAsync:u}=Up({mutationFn:async()=>{if(!s||!l)throw new Error("No session");await Bx({session:l,walletConnectClient:s})},onError:d=>{console.error(d),i(d.message)},onSuccess:()=>{i(!1),a.invalidateQueries({queryKey:["walletConnectSession"]}),c()}});return l?(0,Zn.jsx)(pCt,{disconnect:u,error:o,...e,session:l}):(0,Zn.jsxs)(S,{style:{minHeight:"300px"},children:[(0,Zn.jsx)(S,{p:"lg",children:(0,Zn.jsx)(be,{onBack:e.onBack,title:"Connect an App"})}),(0,Zn.jsx)(Wt,{}),(0,Zn.jsx)(S,{px:"lg",scrollY:!0,style:{maxHeight:"500px"},children:(0,Zn.jsxs)(S,{py:"sm",style:{position:"relative"},children:[(0,Zn.jsx)(S,{py:"md",children:(0,Zn.jsx)(S5,{client:e.client,error:!!o,hideSpinner:!n,id:"walletConnect"})}),(0,Zn.jsx)(S,{animate:"fadein",style:{animationDuration:"200ms"},children:o?(0,Zn.jsxs)(Zn.Fragment,{children:[(0,Zn.jsx)(F,{balance:!0,center:!0,multiline:!0,size:"sm",children:o}),(0,Zn.jsx)(Q,{y:"md"}),(0,Zn.jsx)(S,{animate:"fadein",center:"x",flex:"row",children:(0,Zn.jsxs)(ae,{fullWidth:!0,onClick:()=>i(!1),style:{alignItems:"center",gap:Z.xs},variant:"accent",children:[(0,Zn.jsx)(A0,{height:z.sm,width:z.sm}),"Retry"]})})]}):(0,Zn.jsxs)(Zn.Fragment,{children:[(0,Zn.jsx)(F,{balance:!0,center:!0,multiline:!0,size:"sm",children:"Copy your connection URI from the external app."}),(0,Zn.jsx)(Q,{y:"xl"}),(0,Zn.jsx)(Mk,{disabled:n||!!o||!s,emptyErrorMessage:"Please enter a valid URI",name:"wcUri",onSelect:async d=>{if(r(!0),!s)i("No WalletConnect client found");else try{uCt({uri:d,walletConnectClient:s})}catch{i("Error creating WalletConnect session")}},placeholder:"WalletConnect URI",submitButtonText:"Connect",type:"text"})]})})]})}),(0,Zn.jsxs)(S,{children:[(0,Zn.jsx)(Q,{y:"lg"}),(0,Zn.jsx)(Wt,{}),(0,Zn.jsx)(S,{center:"x",flex:"row",p:"lg",children:(0,Zn.jsx)("a",{href:"https://blog.thirdweb.com/p/a62c0ef4-1d8f-424d-95b9-a006e5239849/",children:(0,Zn.jsx)(ae,{onClick:()=>{},variant:"link",children:"Where do I find the URI?"})})})]})]})}Cn();q4();ye();Zl();ls();ql();ve();St();nt();qc();Cn();tt();var hCt=T(_(),1);e3();qe();VR();zt();q4();Fe();ye();tt();k4();function mCt(e){return le({enabled:!!e?.transactionHash&&(e?.queryOptions?.enabled??!0),queryFn:async()=>{if(!e?.transactionHash)throw new Error("No transaction hash or user op hash provided");return Ou(e)},queryKey:["waitForReceipt",e?.chain.id||-1,e?.transactionHash],retry:!1})}ve();St();nt();_o();Ye();var wr=T(L(),1);function gCt(e){let t=cr(),n=_F(t),r=A_(e.address),o=(0,hCt.useSyncExternalStore)(r.subscribe,r.getValue),i=le({enabled:!!t,queryFn:()=>tIe({chain:t||Zu,client:e.client,walletAddress:e.address}),queryKey:["transactions",e.address,t]}),a=[...[...o].reverse(),...i.data||[]];return(0,wr.jsx)(S,{flex:"column",fullHeight:!0,scrollY:!0,style:{maxHeight:"370px",minHeight:"250px",paddingBottom:Z.lg},children:(0,wr.jsxs)(S,{expand:!0,flex:"column",gap:"xs",children:[i.isLoading&&(0,wr.jsxs)(S,{center:"both",color:"secondaryText",flex:"column",gap:"md",style:{flex:"1",minHeight:"250px"},children:[(0,wr.jsx)(wt,{color:"secondaryText",size:"md"}),(0,wr.jsx)(F,{children:"Loading recent transactions..."})]}),!i.isLoading&&a.length===0?(0,wr.jsxs)(S,{center:"both",color:"secondaryText",flex:"column",gap:"md",style:{flex:"1",minHeight:"250px"},children:[(0,wr.jsx)(Qs,{height:z.xl,width:z.xl}),(0,wr.jsx)(F,{children:"No Transactions"})]}):(0,wr.jsx)(S,{animate:"fadein",flex:"column",gap:"xs",style:{minHeight:"250px"},children:a.map(s=>(0,wr.jsx)(ENn,{client:e.client,explorerUrl:n.explorers[0]?.url,tx:s},s.transactionHash))})]})})}function ENn(e){let{data:t,isLoading:n,error:r}=mCt({chain:We(e.tx.chainId),client:e.client,queryOptions:{enabled:e.tx.receipt===void 0},transactionHash:e.tx.transactionHash}),o=xx(We(e.tx.chainId)),i=e.tx.receipt??t,a=e.tx.decoded,s=(0,wr.jsxs)(PNn,{fullWidth:!0,style:{paddingBlock:Z.sm},variant:"secondary",children:[(0,wr.jsxs)(S,{center:"y",flex:"row",gap:"md",style:{flex:1},children:[(0,wr.jsx)(PV,{chainIconUrl:o.url,client:e.client,size:z.lg}),(0,wr.jsxs)("div",{style:{display:"flex",flex:1,flexDirection:"column",justifyContent:"center"},children:[(0,wr.jsx)(S,{center:"y",flex:"row",gap:"xs",style:{justifyContent:"space-between"},children:(0,wr.jsx)(F,{color:"primaryText",size:"sm",children:a?a.name:"Transaction Sent"})}),(0,wr.jsx)(Q,{y:"xxs"}),(0,wr.jsx)(S,{center:"y",flex:"row",gap:"xxs",style:{justifyContent:"space-between"},children:(0,wr.jsx)(F,{color:"secondaryText",size:"xs",children:i?.to?Q6(i?.to,4):Q6(e.tx.transactionHash,4)})})]})]}),(0,wr.jsxs)(S,{center:"y",flex:"row",gap:"xxs",children:[n&&(0,wr.jsx)(wt,{color:"primaryText",size:"sm"}),!n&&i&&i.status==="success"&&(0,wr.jsx)(F,{color:"success",size:"md",children:(0,wr.jsx)(ad,{height:z.md,width:z.md})}),(r||!n&&i&&i.status!=="success")&&(0,wr.jsx)(F,{color:"danger",size:"md",children:(0,wr.jsx)(Qs,{height:z.md,width:z.md})})]})]});return e.explorerUrl?(0,wr.jsx)("a",{href:Dj(e.explorerUrl,e.tx.transactionHash),rel:"noreferrer",target:"_blank",children:s}):s}var PNn=Zt(ae)(()=>{let e=$();return{"&:hover":{background:e.colors.secondaryButtonBg},background:e.colors.tertiaryBg,height:"62px"}});var sc=T(L(),1);function yCt(e){let t=cr(),n=Mn(),r=Xn(),o=_F(t),i=t&&r&&n?{account:r,chain:t,wallet:n}:void 0;return i?(0,sc.jsxs)(S,{animate:"fadein",children:[(0,sc.jsx)(S,{p:"lg",children:(0,sc.jsx)(be,{onBack:e.onBack,title:e.locale.transactions})}),(0,sc.jsx)(Wt,{}),(0,sc.jsxs)(S,{px:"lg",scrollY:!0,style:{minHeight:"330px"},children:[(0,sc.jsx)(Q,{y:"md"}),(0,sc.jsx)(gCt,{address:i.account.address,client:e.client,locale:e.locale})]}),(0,sc.jsx)(Wt,{}),(0,sc.jsx)(S,{p:"lg",children:(0,sc.jsxs)(hW,{as:"a",fullWidth:!0,gap:"xs",href:_Se(o.explorers[0]?.url??"",r?.address??""),style:{color:"inherit",textDecoration:"none"},target:"_blank",variant:"outline",children:["View on Explorer",(0,sc.jsx)(mW,{height:z.sm,width:z.sm})]})})]}):(0,sc.jsx)(zn,{})}var J=T(L(),1),q5="tw-connected-wallet",NNn=1337,wCt=e=>{let{connectLocale:t,client:n}=e,r=(0,kd.useContext)(Mj),o=cr();function i(){r(null)}function a(){r((0,J.jsx)(iE,{assetTabs:e.detailsModal?.assetTabs,chains:e.chains,client:n,closeModal:i,connectOptions:e.connectOptions,detailsModal:e.detailsModal,displayBalanceToken:e.detailsButton?.displayBalanceToken,locale:t,onDisconnect:e.onDisconnect,supportedNFTs:e.supportedNFTs,supportedTokens:e.supportedTokens,theme:e.theme,showBalanceInFiat:e.detailsButton?.showBalanceInFiat}))}let s=e.chain&&o&&o.id!==e.chain.id;if(e.detailsButton?.render)return(0,J.jsx)("div",{onClick:a,children:(0,J.jsx)(e.detailsButton.render,{})});if(e.chain&&s)return(0,J.jsx)(UNn,{className:e.switchButton?.className,connectLocale:t,style:e.switchButton?.style,switchNetworkBtnTitle:e.switchButton?.label,targetChain:e.chain});let l=`${q5} ${e.detailsButton?.className||""}`,c=e.detailsButton?.displayBalanceToken?.[Number(o?.id)];return(0,J.jsxs)(RNn,{className:l,"data-test":"connected-wallet-details",onClick:a,style:e.detailsButton?.style,type:"button",children:[(0,J.jsx)(S,{style:{borderRadius:"100%",height:"35px",overflow:"hidden",width:"35px"},children:e.detailsButton?.connectedAccountAvatarUrl?(0,J.jsx)("img",{alt:"",src:e.detailsButton.connectedAccountAvatarUrl,style:{height:"100%",objectFit:"cover",width:"100%"}}):(0,J.jsx)(_k,{className:`${q5}__account_avatar`,fallbackComponent:(0,J.jsx)(Ty,{className:`${q5}__account_avatar`,size:35}),loadingComponent:(0,J.jsx)(Ty,{className:`${q5}__account_avatar`,size:35}),queryOptions:{refetchOnMount:!1,refetchOnWindowFocus:!1},style:{height:"100%",objectFit:"cover",width:"100%"}})}),(0,J.jsxs)(S,{flex:"column",gap:"4xs",style:{borderRadius:`0 ${te.md} ${te.md} 0`,textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[e.detailsButton?.connectedAccountName?(0,J.jsx)(F,{className:`${q5}__address`,color:"primaryText",size:"xs",weight:500,children:e.detailsButton.connectedAccountName}):(0,J.jsx)(F,{className:`${q5}__address`,color:"primaryText",size:"xs",weight:500,children:(0,J.jsx)($k,{fallbackComponent:(0,J.jsx)(Jk,{formatFn:Vi}),loadingComponent:(0,J.jsx)(Jk,{formatFn:Vi})})}),(0,J.jsx)(F,{className:`${q5}__balance`,color:"secondaryText",size:"xs",style:{alignItems:"center",display:"flex",gap:"2px"},weight:400,children:e.detailsButton?.showBalanceInFiat?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Iy,{chain:o,fallbackComponent:(0,J.jsx)(Te,{height:oe.xs,width:"50px"}),loadingComponent:(0,J.jsx)(Te,{height:oe.xs,width:"50px"}),tokenAddress:c}),(0,J.jsx)(Iy,{chain:o,formatFn:DNn,loadingComponent:(0,J.jsx)(Te,{height:oe.xs,width:"20px"}),showBalanceInFiat:"USD",tokenAddress:c})]}):(0,J.jsx)(Iy,{chain:o,fallbackComponent:(0,J.jsx)(Te,{height:oe.xs,width:"70px"}),formatFn:LNn,loadingComponent:(0,J.jsx)(Te,{height:oe.xs,width:"70px"}),tokenAddress:c})})]})]})};function DNn(e){return` (${Vk({...e,decimals:0})})`}function LNn(e){return`${Ix({...e,decimals:e.balance<1?5:4})}`}function iE(e){let[t,n]=(0,kd.useState)("main"),{disconnect:r}=j3(),[o,i]=(0,kd.useState)(!0),{client:a,locale:s}=e,l=cr(),c=Xn(),u=z$(e.theme),d=Mn(),f=oAt(l),m=H5(l),h=!d?.switchChain,g=nx({size:"compact",wallets:d?[d]:[],welcomeScreen:void 0}),w=(0,kd.useCallback)(()=>{i(!1),N3(()=>{e.closeModal()})},[e.closeModal]);function b(P){i(!1),e.closeModal(),e.onDisconnect(P)}(0,kd.useEffect)(()=>{c||w()},[c,w]);let{hideSendFunds:A,hideReceiveFunds:x,hideBuyFunds:v}=e.detailsModal||{},C=A&&x&&v,M=(0,J.jsxs)(S,{style:{height:`${z.xl}px`,position:"relative",width:`${z.xl}px`},children:[(0,J.jsx)(S,{style:{borderRadius:"100%",height:"100%",overflow:"hidden",width:"100%"},children:e.detailsModal?.connectedAccountAvatarUrl?(0,J.jsx)("img",{alt:"",src:e.detailsModal.connectedAccountAvatarUrl,style:{height:"100%",objectFit:"cover",width:"100%"}}):c&&(0,J.jsx)(_k,{fallbackComponent:(0,J.jsx)(Ty,{size:Number(z.xxl)}),loadingComponent:(0,J.jsx)(Ty,{size:Number(z.xxl)}),style:{height:"100%",objectFit:"cover",width:"100%"}})}),e.detailsModal?.hideSwitchWallet?null:(0,J.jsx)(S,{style:{bottom:-2,position:"absolute",right:-2},children:(0,J.jsx)(Fxt,{padding:"4px",style:{background:u.colors.modalBg},children:d&&(0,J.jsx)(jo,{client:a,id:d.id,size:"12",style:{borderRadius:0}})})})]}),I=(0,J.jsxs)("div",{className:`${q5}__default_modal_screen`,children:[(0,J.jsx)(Q,{y:"xs"}),(0,J.jsxs)(S,{center:"y",flex:"row",gap:"sm",px:"lg",style:{paddingBottom:C?Z.md:Z.lg,paddingTop:Z.lg},children:[e.detailsModal?.hideSwitchWallet?M:(0,J.jsx)(vy,{tip:"Switch wallet",children:(0,J.jsx)("div",{onClick:()=>{n("wallet-manager")},onKeyDown:P=>{P.key==="w"&&n("wallet-manager")},style:{cursor:"pointer"},children:M})}),(0,J.jsxs)(S,{flex:"column",gap:"3xs",children:[(0,J.jsxs)("div",{style:{alignItems:"center",display:"flex",gap:Z.xxs},children:[e.detailsModal?.connectedAccountName?(0,J.jsx)(F,{color:"primaryText",size:"md",weight:500,children:e.detailsModal.connectedAccountName}):(0,J.jsx)(F,{color:"primaryText",size:"md",weight:500,children:(0,J.jsx)($k,{fallbackComponent:(0,J.jsx)(Jk,{formatFn:Vi}),loadingComponent:(0,J.jsx)(Jk,{formatFn:Vi})})}),(0,J.jsx)(qs,{children:(0,J.jsx)(Nx,{text:c?.address||"",tip:s.copyAddress})})]}),(0,J.jsx)(zNn,{client:a,locale:s})]})]}),!C&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(S,{px:"lg",children:(0,J.jsxs)(S,{className:"tw-highlight-buttons",style:{display:"flex",gap:Z.xs},children:[!A&&(0,J.jsxs)(ae,{className:"tw-highlight-button__send",onClick:()=>{n("send")},style:{alignItems:"center",display:"flex",flex:1,fontSize:oe.sm,gap:Z.xs,padding:Z.sm},variant:"outline",children:[(0,J.jsx)(S,{center:"both",color:"secondaryText",flex:"row",children:(0,J.jsx)(e3t,{height:z.sm,style:{transform:"translateY(-10%) rotate(-45deg) "},width:z.sm})}),s.send]}),!x&&(0,J.jsxs)(ae,{className:"tw-highlight-button__receive",onClick:()=>{n("receive")},style:{alignItems:"center",display:"flex",flex:1,fontSize:oe.sm,gap:Z.xs,padding:Z.sm},variant:"outline",children:[(0,J.jsx)(S,{center:"both",color:"secondaryText",flex:"row",children:(0,J.jsx)(t3t,{height:z.sm,width:z.sm})}),s.receive]}),!v&&m.data&&!m.data.testnet&&(0,J.jsxs)(ae,{className:"tw-highlight-button__buy",onClick:()=>{Ki({client:a,event:"details_modal_buy_click",walletAddress:c?.address,walletType:d?.id}),n("buy")},style:{alignItems:"center",display:"flex",flex:1,fontSize:oe.sm,gap:Z.xs,padding:Z.sm},variant:"outline",children:[(0,J.jsx)(S,{center:"both",color:"secondaryText",flex:"row",children:(0,J.jsx)(NA,{height:z.sm,width:z.sm})}),s.buy]})]})}),(0,J.jsx)(Q,{y:"md"})]}),(0,J.jsxs)(S,{px:"md",children:[(0,J.jsxs)(S,{flex:"column",style:{gap:"1px"},children:[(0,J.jsx)(ONn,{client:e.client,disableSwitchChain:h,displayBalanceToken:e.displayBalanceToken,setScreen:()=>n("network-switcher"),showBalanceInFiat:e.detailsModal?.showBalanceInFiat}),(0,J.jsxs)(Xs,{className:"tw-view-transactions-button",onClick:()=>{n("transactions")},style:{fontSize:oe.sm},children:[(0,J.jsx)(o3t,{height:z.md,width:z.md}),(0,J.jsx)(S,{center:"y",flex:"row",gap:"xs",children:(0,J.jsx)(F,{color:"primaryText",children:s.transactions})})]}),(e.assetTabs===void 0||e.assetTabs.length>0)&&(0,J.jsxs)(Xs,{className:"tw-view-assets-button",onClick:()=>{n("view-assets")},style:{fontSize:oe.sm},children:[(0,J.jsx)(Z5,{size:z.md}),(0,J.jsx)(F,{color:"primaryText",children:s.viewFunds.viewAssets})]}),(0,J.jsxs)(Xs,{className:"tw-manage-wallet-button",onClick:()=>{n("manage-wallet")},style:{fontSize:oe.sm},children:[(0,J.jsx)(fd,{size:z.md}),(0,J.jsx)(F,{color:"primaryText",children:e.locale.manageWallet.title})]}),(e.detailsModal?.showTestnetFaucet??!1)&&(f.faucets.length>0||l?.id===NNn)&&(0,J.jsxs)(evt,{className:"tw-request-testnet-funds-button",as:"a",href:f.faucets?f.faucets[0]:"#",style:{color:"inherit",textDecoration:"none"},target:"_blank",children:[(0,J.jsx)(S,{center:"both",color:"secondaryText",flex:"row",children:(0,J.jsx)($xt,{size:z.md})}),s.requestTestnetFunds]}),e.detailsModal?.footer&&(0,J.jsx)(e.detailsModal.footer,{close:w})]}),(0,J.jsx)(Q,{y:"md"})]}),e.detailsModal?.hideDisconnect!==!0&&(0,J.jsxs)(S,{children:[(0,J.jsx)(Wt,{}),(0,J.jsx)(Q,{y:"sm"}),(0,J.jsx)(S,{px:"md",children:(0,J.jsxs)(Xs,{className:"tw-disconnect-wallet-button","data-variant":"danger",onClick:()=>{d&&c&&(r(d),b({account:c,wallet:d}))},type:"button",children:[(0,J.jsx)(_4t,{height:z.md,width:z.md}),(0,J.jsx)(F,{color:"primaryText",children:s.disconnectWallet})]})}),(0,J.jsx)(Q,{y:"sm"})]})]});if(t==="transactions"&&(I=(0,J.jsx)(yCt,{client:a,closeModal:w,locale:s,onBack:()=>n("main"),setScreen:n,title:s.buy})),t==="wallet-manager"&&c&&l&&d&&(I=(0,J.jsx)(rvt,{accountAbstraction:e.connectOptions?.accountAbstraction,activeAccount:c,activeChain:l,activeWallet:d,appMetadata:e.connectOptions?.appMetadata,chain:e.connectOptions?.chain,chains:e.connectOptions?.chains,client:a,connectLocale:s,hiddenWallets:e.connectOptions?.hiddenWallets,onBack:()=>n("main"),recommendedWallets:e.connectOptions?.recommendedWallets,showAllWallets:!!e.connectOptions?.showAllWallets,walletConnect:e.connectOptions?.walletConnect,wallets:e.connectOptions?.wallets})),t==="network-switcher")I=(0,J.jsx)(TV,{chains:l&&e.chains.find(P=>P.id===l.id)===void 0?[l,...e.chains]:e.chains,client:a,closeModal:w,connectLocale:s,networkSelector:e.detailsModal?.networkSelector,onBack:()=>{n("main")}});else if(t==="view-assets")I=(0,J.jsx)(Vvt,{assetTabs:e.detailsModal?.assetTabs,client:a,connectLocale:s,onBack:()=>{n("main")},setScreen:n,supportedNFTs:e.supportedNFTs,supportedTokens:e.supportedTokens,theme:e.theme});else if(t==="view-nfts")I=(0,J.jsx)(Uvt,{client:a,connectLocale:s,onBack:()=>{n("main")},supportedNFTs:e.supportedNFTs,theme:e.theme});else if(t==="view-tokens")I=(0,J.jsx)(Hvt,{client:a,connectLocale:s,onBack:()=>{n("main")},supportedTokens:e.supportedTokens});else if(t==="private-key")I=(0,J.jsx)(pvt,{client:a,connectLocale:s,onBack:()=>{n("manage-wallet")},theme:e.theme,wallet:d});else if(t==="manage-wallet")I=(0,J.jsx)(dvt,{client:a,closeModal:w,locale:s,onBack:()=>{n("main")},manageWallet:e.detailsModal?.manageWallet,setScreen:n});else if(t==="wallet-connect-receiver")I=(0,J.jsx)(fCt,{chains:e.chains,client:a,onBack:()=>{n("manage-wallet")}});else if(t==="linked-profiles")I=(0,J.jsx)(avt,{client:a,locale:s,onBack:()=>n("manage-wallet"),setScreen:n});else if(t==="link-profile")I=(0,J.jsx)(svt,{client:a,locale:s,onBack:()=>{n("linked-profiles")},walletConnect:e.connectOptions?.walletConnect});else if(t==="send")I=(0,J.jsx)(Svt,{client:a,connectLocale:s,onBack:()=>{n("main")},supportedTokens:e.supportedTokens});else if(t==="receive")I=(0,J.jsx)(mvt,{client:a,connectLocale:s,onBack:()=>{n("main")},walletId:d?.id});else if(t==="buy"){let P=e.detailsModal?.payOptions?.prefillBuy?.chain?.id||l?.id||e.chains[0]?.id||1;I=(0,J.jsx)(jV,{amount:e.detailsModal?.payOptions?.prefillBuy?.amount||"0.01",chain:We(P),client:a,hiddenWallets:e.detailsModal?.hiddenWallets,connectOptions:e.connectOptions,onCancel:()=>n("main"),onSuccess:()=>n("main"),supportedTokens:e.supportedTokens,theme:e.theme,style:{border:"none",borderRadius:te.lg},tokenAddress:e.displayBalanceToken?.[Number(P)]})}return(0,J.jsx)(Hu,{theme:e.theme,children:(0,J.jsx)(LH,{isOpen:!1,theme:e.theme,children:(0,J.jsx)(vk.Provider,{value:g,children:(0,J.jsx)(gf,{className:"tw-modal__wallet-details",title:"Manage Wallet",open:o,crossContainerStyles:{display:t==="buy"?"none":"block"},setOpen:P=>{P||(w(),e.detailsModal?.onClose&&e.detailsModal?.onClose(t))},size:"compact",children:c?.address&&(0,J.jsx)(px,{address:c.address,client:a,children:I})})})})})}function ONn(e){let{disableSwitchChain:t,setScreen:n,showBalanceInFiat:r,client:o}=e,i=cr();return i?(0,J.jsxs)(Xs,{className:"tw-internal-network-switcher-button tw-switch-network-button","data-variant":"primary",disabled:t,onClick:()=>{n("network-switcher")},type:"button",children:[(0,J.jsxs)(vV,{chain:i,children:[(0,J.jsx)("div",{style:{alignItems:"center",display:"flex",position:"relative"},children:(0,J.jsxs)(S,{style:{alignItems:"center",display:"flex",flexShrink:0,position:"relative"},children:[(0,J.jsx)(IV,{client:o,fallbackComponent:(0,J.jsx)("img",{alt:"",src:Sd,style:{height:`${z.md}px`,width:`${z.md}px`}}),loadingComponent:(0,J.jsx)(Te,{height:`${z.md}px`,width:`${z.md}px`}),style:{height:`${z.md}px`,width:`${z.md}px`}}),(0,J.jsx)(Tx,{className:"tw-chain-active-dot-details-button"})]})}),(0,J.jsxs)(F,{color:"primaryText",multiline:!0,size:"md",children:[(0,J.jsx)(eE,{fallbackComponent:(0,J.jsxs)("span",{children:["Unknown chain #",i?.id]}),loadingComponent:(0,J.jsx)(Te,{height:"16px",width:"150px"})}),(0,J.jsx)(F,{color:"secondaryText",size:"xs",children:r?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Iy,{chain:i,fallbackComponent:(0,J.jsx)(Te,{height:"1em",width:"70px"}),formatFn:a=>Ix({...a,decimals:7}),loadingComponent:(0,J.jsx)(Te,{height:"1em",width:"70px"}),tokenAddress:e.displayBalanceToken?.[Number(i?.id)]})," ",(0,J.jsx)(Iy,{chain:i,formatFn:a=>` (${Vk({...a,decimals:3})})`,loadingComponent:(0,J.jsx)(Te,{height:"1em",width:"30px"}),showBalanceInFiat:"USD",tokenAddress:e.displayBalanceToken?.[Number(i?.id)]})]}):(0,J.jsx)(Iy,{chain:i,fallbackComponent:(0,J.jsx)(Te,{height:"1em",width:"100px"}),formatFn:a=>Ix({...a,decimals:7}),loadingComponent:(0,J.jsx)(Te,{height:"1em",width:"100px"}),tokenAddress:e.displayBalanceToken?.[Number(i?.id)]})})]})]}),(0,J.jsx)(jNn,{height:z.sm,style:{flexShrink:0,marginLeft:"auto"},width:z.sm})]}):null}var RNn=Ia(e=>{let t=$();return{all:"unset","&:hover":{background:t.colors.connectedButtonBgHover,transition:"background 250ms ease"},alignItems:"center",animation:`${Ql} 300ms ease`,background:t.colors.connectedButtonBg,border:`1px solid ${t.colors.borderColor}`,borderRadius:te.md,boxSizing:"border-box",cursor:"pointer",display:"inline-flex",gap:Z.xs,height:"50px",lineHeight:"normal",minWidth:"165px",overflow:"hidden",padding:Z.xs,WebkitTapHighlightColor:"transparent"}}),jNn=Zt(K4t)(()=>({color:$().colors.secondaryText}));function BNn(e){let t=Xn(),n=Mn(),r=ju(n),o=cr(),{client:i,connectLocale:a}=e,[s,l]=(0,kd.useState)(!1);(0,kd.useEffect)(()=>{if(t&&r&&t.address&&o){let u=at({address:t.address,chain:o,client:i});Dc(u).then(d=>{l(d)})}else l(!1)},[t,o,i,r]);let c=(0,J.jsx)(S,{center:"y",flex:"row",gap:"3xs",children:(0,J.jsx)(F,{color:"secondaryText",size:"xs",weight:400,children:a.connectedToSmartWallet})});return o&&t&&r?(0,J.jsx)(J.Fragment,{children:s?(0,J.jsx)(k1,{color:"secondaryText",hoverColor:"primaryText",href:`https://thirdweb.com/${o.id}/${t.address}/account`,size:"sm",target:"_blank",children:c}):(0,J.jsxs)(F,{size:"sm",children:[" ",c]})}):null}function zNn(e){let{client:t,locale:n}=e,r=Xn(),o=Mn(),i=w5(),{data:a}=dd(o?.id),s=ju(o),{data:l}=le({enabled:!!o?.id&&!!a,queryFn:async()=>{let u=await gW(kn);return u==="guest"?"Guest":u&&(o?.id==="inApp"||o?.id==="smart")&&t3.includes(u)?u.slice(0,1).toUpperCase()+u.slice(1):a?.name},queryKey:["wallet-name",{walletAddress:r?.address,walletId:o?.id}]}),c=le({enabled:!!i,queryFn:async()=>{if(!(i&&(i.id==="inApp"||i.id.startsWith("ecosystem."))))return null;let d;if(yt(i)){let w=i,b=w.getConfig()?.partnerId;d={id:w.id,partnerId:b}}let{getUserEmail:f,getUserPhoneNumber:m}=await Promise.resolve().then(()=>(N0(),L6t)),[h,g]=await Promise.all([f({client:t,ecosystem:d}),m({client:t,ecosystem:d})]);return h||g||null},queryKey:["in-app-wallet-user",t,r?.address]});return!c.data&&s?(0,J.jsx)(BNn,{client:t,connectLocale:n}):c.data||l?(0,J.jsx)(F,{size:"xs",weight:400,children:c.data||l}):(0,J.jsx)(Te,{className:"InAppWalletUserInfo__skeleton",height:"10px",width:"50px"})}function UNn(e){let t=eV(),[n,r]=(0,kd.useState)(!1),o=e.connectLocale,i=e.switchNetworkBtnTitle??o.switchNetwork;return(0,J.jsx)(ae,{"aria-label":n?o.switchingNetwork:void 0,className:`tw-connect-wallet--switch-network ${e.className||""}`,"data-is-loading":n,"data-test":"switch-network-button",disabled:n,onClick:async()=>{r(!0);try{await t(e.targetChain)}catch(a){console.error(a)}r(!1)},style:{minWidth:"140px",...e.style},type:"button",variant:"primary",children:n?(0,J.jsx)(wt,{color:"primaryButtonText",size:"sm"}):i})}var Pce=T(L(),1),bCt=e=>(0,Pce.jsx)("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 16 21",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:(0,Pce.jsx)("path",{d:"M2 21C1.45 21 0.979333 20.8043 0.588 20.413C0.196 20.021 0 19.55 0 19V9C0 8.45 0.196 7.979 0.588 7.587C0.979333 7.19567 1.45 7 2 7H3V5C3 3.61667 3.48767 2.43733 4.463 1.462C5.43767 0.487333 6.61667 0 8 0C9.38333 0 10.5627 0.487333 11.538 1.462C12.5127 2.43733 13 3.61667 13 5V7H14C14.55 7 15.021 7.19567 15.413 7.587C15.8043 7.979 16 8.45 16 9V19C16 19.55 15.8043 20.021 15.413 20.413C15.021 20.8043 14.55 21 14 21H2ZM8 16C8.55 16 9.021 15.8043 9.413 15.413C9.80433 15.021 10 14.55 10 14C10 13.45 9.80433 12.979 9.413 12.587C9.021 12.1957 8.55 12 8 12C7.45 12 6.97933 12.1957 6.588 12.587C6.196 12.979 6 13.45 6 14C6 14.55 6.196 15.021 6.588 15.413C6.97933 15.8043 7.45 16 8 16ZM5 7H11V5C11 4.16667 10.7083 3.45833 10.125 2.875C9.54167 2.29167 8.83333 2 8 2C7.16667 2 6.45833 2.29167 5.875 2.875C5.29167 3.45833 5 4.16667 5 5V7Z",fill:"currentColor"})});var G5=T(_(),1);Zl();S1();M1();uf();var Nce=T(L(),1),HNn=e=>{let t=nx({size:e.size,wallets:e.wallets,welcomeScreen:e.welcomeScreen}),n=cs(),{screen:r,setScreen:o,initialScreen:i}=t,a=S9t(),s=OH(),[l,c]=(0,G5.useState)(!1),u=(0,G5.useCallback)(()=>{e.onClose?.(),s(!1),N3(()=>{o(i),n({})})},[i,s,o,n,e.onClose]),d=Xn();(0,G5.useEffect)(()=>{a||N3(()=>{c(!1)})},[a]);let f=(0,G5.useCallback)(m=>c(!m),[]);return(0,G5.useEffect)(()=>{a&&r===di.signIn&&!d&&(o(i),s(!1))},[i,a,r,s,o,d]),(0,Nce.jsx)(gf,{className:"tw-modal__connect-wallet",title:"Connect Wallet",hide:l,open:a,setOpen:m=>{l||m||u()},size:e.size,children:(0,Nce.jsx)(NF,{accountAbstraction:e.accountAbstraction,auth:e.auth,chain:e.chain,chains:e.chains,client:e.client,connectLocale:e.connectLocale,hideHeader:!1,isOpen:a,meta:e.meta,modalHeader:void 0,onClose:u,onConnect:e.onConnect,recommendedWallets:e.recommendedWallets,screenSetup:t,setModalVisibility:f,shouldSetActive:e.shouldSetActive,showAllWallets:e.showAllWallets,size:e.size,walletConnect:e.walletConnect,walletIdsToHide:e.hiddenWallets,wallets:e.wallets,welcomeScreen:e.welcomeScreen})})},ACt=HNn;var so=T(L(),1),Dce="tw-connect-wallet";function BV(e){let t=(0,Cf.useMemo)(()=>e.wallets||f5({appMetadata:e.appMetadata,chains:e.chains,executionMode:e.accountAbstraction?{mode:"EIP4337",smartAccount:e.accountAbstraction}:void 0}),[e.wallets,e.appMetadata,e.chains,e.accountAbstraction]),n=z3t(e.locale||"en_US"),r=Hw(),o=Xn(),i=Mn(),a=pA(i,o,e.auth),s=e.hiddenWallets||e.detailsModal?.hiddenWallets;P9t({wallets:t}),(0,Cf.useEffect)(()=>{e.chain&&r.defineChains([e.chain])},[e.chain,r]),(0,Cf.useEffect)(()=>{e.chains&&r.defineChains(e.chains)},[e.chains,r]);let l=(0,Cf.useMemo)(()=>!E9t()||t.length===1?"compact":e.connectModal?.size||"compact",[t.length,e.connectModal?.size]),c=e.accountAbstraction?.chain||e.chain||e.chains?.[0],u=e.autoConnect!==!1&&(0,so.jsx)(g3t,{accountAbstraction:e.accountAbstraction,appMetadata:e.appMetadata,chain:c,client:e.client,onConnect:e.onConnect,siweAuth:a,timeout:typeof e.autoConnect=="boolean"?void 0:e.autoConnect?.timeout,wallets:t});if(!n.data){let d=`${e.connectButton?.className||""} ${Dce}`;return(0,so.jsxs)(Lce,{className:d,disabled:!0,style:{height:"50px",minWidth:"165px",...e.connectButton?.style},type:"button",variant:"primary",children:[u,(0,so.jsx)(wt,{color:"primaryButtonText",size:"sm"})]})}return(0,so.jsxs)(LH,{isOpen:!1,theme:e.theme,children:[(0,so.jsx)(WNn,{...e,connectLocale:n.data,siweAuth:a}),(0,so.jsx)(ACt,{accountAbstraction:e.accountAbstraction,auth:e.auth,chain:c,chains:e.chains,client:e.client,connectLocale:n.data,hiddenWallets:s,localeId:e.locale||"en_US",meta:{privacyPolicyUrl:e.connectModal?.privacyPolicyUrl,requireApproval:e.connectModal?.requireApproval,showThirdwebBranding:e.connectModal?.showThirdwebBranding,termsOfServiceUrl:e.connectModal?.termsOfServiceUrl,title:e.connectModal?.title,titleIconUrl:e.connectModal?.titleIcon},onConnect:e.onConnect,recommendedWallets:e.recommendedWallets,shouldSetActive:!0,showAllWallets:e.showAllWallets,size:l,walletConnect:e.walletConnect,wallets:t,welcomeScreen:e.connectModal?.welcomeScreen}),u]})}function WNn(e){let t=e.siweAuth,n=Xn(),[r,o]=(0,Cf.useState)(!1),i=e.hiddenWallets||e.detailsModal?.hiddenWallets;(0,Cf.useEffect)(()=>{n||o(!1)},[n]);let a=e.theme||"dark",s=Owt(),l=e.connectLocale,c=s==="connecting",u=e.connectButton?.label||l.defaultButtonTitle,d=OH(),f=(0,Cf.useMemo)(()=>{if(!e.supportedTokens)return;let m={...B5};for(let h in e.supportedTokens){let g=Number(h),w=e.supportedTokens[g];w&&(m[g]=w)}return m},[e.supportedTokens]);if(!n){let m=`${e.connectButton?.className||""} ${Dce}`;return(0,so.jsx)(Lce,{"aria-label":s==="connecting"?l.connecting:typeof u=="string"?u:l.defaultButtonTitle,className:m,"data-is-loading":c,"data-test":"connect-wallet-button","data-theme":a,disabled:c,onClick:()=>{d(!0)},style:{fontSize:"16px",height:"50px",minWidth:"165px",...e.connectButton?.style},type:"button",variant:"primary",children:c?(0,so.jsx)(wt,{color:"primaryButtonText",size:"sm"}):u})}if(t.requiresAuth){if(t.isPending||t.isLoggingIn||t.isLoggingOut){let m=`${e.connectButton?.className||""} ${Dce}`;return(0,so.jsx)(Lce,{className:m,disabled:!0,style:{height:"50px",minWidth:"165px",...e.connectButton?.style},type:"button",variant:"primary",children:(0,so.jsx)(wt,{color:"primaryButtonText",size:"sm"})})}if(!t.isLoggedIn)return(0,so.jsxs)(so.Fragment,{children:[(0,so.jsx)(ae,{className:e.signInButton?.className,onClick:()=>{o(!0)},style:{minHeight:"50px",minWidth:"165px",...e.signInButton?.style},type:"button",variant:"primary",children:t.isLoggingIn?(0,so.jsx)(wt,{color:"primaryButtonText",size:"sm"}):(0,so.jsxs)(S,{center:"y",flex:"row",gap:"sm",children:[(0,so.jsx)(bCt,{size:z.sm}),(0,so.jsxs)("span",{children:[" ",e.signInButton?.label||l.signIn," "]})]})}),(0,so.jsx)(gf,{className:"tw-modal__sign-in",title:"Sign in",open:r,setOpen:o,size:"compact",children:(0,so.jsx)(qW,{auth:e.auth,client:e.client,connectLocale:l,modalSize:"compact",onDone:()=>o(!1),privacyPolicyUrl:e.connectModal?.privacyPolicyUrl,termsOfServiceUrl:e.connectModal?.termsOfServiceUrl})})]})}return(0,so.jsx)(px,{address:n.address,client:e.client,children:(0,so.jsx)(wCt,{chain:e.chain,chains:e?.chains||[],client:e.client,connectLocale:l,connectOptions:{accountAbstraction:e.accountAbstraction,appMetadata:e.appMetadata,chain:e.chain,chains:e.chains,connectModal:e.connectModal,hiddenWallets:i,recommendedWallets:e.recommendedWallets,showAllWallets:e.showAllWallets,walletConnect:e.walletConnect,wallets:e.wallets},detailsButton:e.detailsButton,detailsModal:{...e.detailsModal,hiddenWallets:i},onDisconnect:m=>{t.requiresAuth&&t.doLogout(),e.onDisconnect?.(m)},supportedNFTs:e.supportedNFTs,supportedTokens:f,switchButton:e.switchButton,theme:a})})}var Lce=Zt(ae)({animation:`${Ql} 300ms ease`});var Oce=T(L(),1),zV=e=>(0,Oce.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 18 18",width:e.size,height:e.size,role:"presentation",children:(0,Oce.jsx)("path",{fill:"currentColor",d:"M15.6 4.6H1.85v-.55l12.1-.968v.968h1.65V2.4c0-1.21-.98-2.059-2.177-1.888L2.378 2.089C1.18 2.26.2 3.39.2 4.6v11a2.2 2.2 0 002.2 2.2h13.2a2.2 2.2 0 002.2-2.2V6.8a2.2 2.2 0 00-2.2-2.2zm-1.65 7.707a1.65 1.65 0 01-.63-3.176 1.65 1.65 0 11.63 3.176z"})});sk();ty();ve();St();$o();nt();Ye();var UV=T(_(),1),Rce=640;function zx(){let[e,t]=UV.useState(void 0);return UV.useEffect(()=>{let n=window.matchMedia(`(max-width: ${Rce-1}px)`),r=()=>{t(window.innerWidth<Rce)};return n.addEventListener("change",r),t(window.innerWidth<Rce),()=>n.removeEventListener("change",r)},[]),!!e}qc();zt();Fe();ye();sse();ve();St();$3();var vCt=T(L(),1);function xCt({loadingComponent:e,fallbackComponent:t,queryOptions:n,...r}){let o=C6t({queryOptions:n});return o.isLoading?e||null:o.data?(0,vCt.jsx)("img",{src:o.data,...r,alt:r.alt}):t||null}var $c=T(L(),1);function HV(e){let t=e.activeWalletInfo.activeWallet,n=e.activeWalletInfo.activeAccount,r=(0,$c.jsx)(Ty,{style:{width:`${z.xs}px`,height:`${z.xs}px`,borderRadius:te.full}}),o=(0,$c.jsx)(xCt,{style:{width:`${z.xs}px`,height:`${z.xs}px`},fallbackComponent:r,loadingComponent:r});return(0,$c.jsx)(FNn,{variant:"ghost-solid",style:{paddingInline:Z.xxs,paddingBlock:"2px"},onClick:e.onClick,children:(0,$c.jsx)(px,{address:n.address,client:e.client,children:(0,$c.jsx)(a6t,{id:t.id,children:(0,$c.jsxs)(S,{flex:"row",gap:"xxs",center:"y",children:[(0,$c.jsx)(_k,{style:{width:`${z.xs}px`,height:`${z.xs}px`,borderRadius:te.full,objectFit:"cover"},fallbackComponent:o,loadingComponent:o}),(0,$c.jsx)("span",{style:{fontSize:oe.xs,letterSpacing:"0.025em"},children:(0,$c.jsx)($k,{fallbackComponent:(0,$c.jsx)("span",{children:Vi(n.address)}),loadingComponent:(0,$c.jsx)("span",{children:Vi(n.address)})})})]})})})})}var FNn=Zt(ae)(()=>{let e=$();return{color:e.colors.secondaryText,transition:"color 200ms ease","&:hover":{color:e.colors.primaryText}}});M5();var CCt=T(L(),1);function aE(e){let t=n=>{let r=n;r=r.replace(",","."),r.startsWith(".")&&(r=`0${r}`);let o=Number(r);Number.isNaN(o)||(r.length>1&&r.startsWith("0")&&!r.startsWith("0.")?e.setValue(r.slice(1)):e.setValue(r))};return(0,CCt.jsx)(Ys,{...e,inputMode:"decimal",onChange:n=>{t(n.target.value)},onClick:n=>{e.value===""&&n.currentTarget.setSelectionRange(n.currentTarget.value.length,n.currentTarget.value.length)},pattern:"^[0-9]*[.,]?[0-9]*$",placeholder:"0.0",type:"text",variant:"transparent"})}Cn();Fe();ye();ve();St();Sa();$o();Ye();function Ux(e){return e.replace("Mainnet","")}var ICt=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:5,minimumFractionDigits:2});var yi=T(L(),1);function WV(e){let t=$();return(0,yi.jsxs)(ae,{variant:"ghost-solid",hoverBg:"secondaryButtonBg",fullWidth:!0,onClick:e.onSelectToken,gap:"sm",style:{borderBottom:`1px dashed ${t.colors.borderColor}`,justifyContent:"space-between",paddingInline:Z.md,paddingBlock:Z.md,borderRadius:0},children:[(0,yi.jsxs)(S,{gap:"sm",flex:"row",center:"y",children:[(0,yi.jsxs)(S,{relative:!0,color:"secondaryText",children:[e.selectedToken&&!e.selectedToken.isError?(0,yi.jsx)(nn,{src:e.selectedToken?.data===void 0?void 0:e.selectedToken.data.iconUri||"",client:e.client,width:"40",height:"40",fallback:(0,yi.jsx)(S,{style:{background:`linear-gradient(45deg, white, ${t.colors.accentText})`,borderRadius:te.full,width:"40px",height:"40px"}}),style:{objectFit:"cover",borderRadius:te.full}},e.selectedToken?.data?.iconUri):(0,yi.jsx)(S,{style:{border:`1px solid ${t.colors.borderColor}`,background:`linear-gradient(45deg, white, ${t.colors.accentText})`,borderRadius:te.full,width:"40px",height:"40px"}}),e.chain&&(0,yi.jsx)(S,{bg:"modalBg",style:{padding:"2px",position:"absolute",bottom:-2,right:-2,display:"flex",borderRadius:te.full},children:(0,yi.jsx)(nn,{src:e.chain?.icon,client:e.client,width:z.sm,height:z.sm,style:{borderRadius:te.full}})})]}),e.selectedToken&&!e.selectedToken.isError?(0,yi.jsxs)(S,{flex:"column",style:{gap:"3px"},children:[e.selectedToken?.isFetching?(0,yi.jsx)(Te,{width:"60px",height:oe.md}):(0,yi.jsx)(F,{size:"md",color:"primaryText",weight:500,children:e.selectedToken?.data?.symbol}),e.chain?(0,yi.jsx)(F,{size:"xs",color:"secondaryText",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:Ux(e.chain.name)}):(0,yi.jsx)(Te,{width:"140px",height:oe.sm})]}):(0,yi.jsxs)(S,{flex:"column",style:{gap:"3px"},children:[(0,yi.jsx)(F,{size:"md",color:"primaryText",weight:500,children:"Select Token"}),(0,yi.jsx)(F,{size:"xs",color:"secondaryText",children:"Required"})]})]}),(0,yi.jsx)(S,{color:"secondaryText",flex:"row",center:"both",borderColor:"borderColor",style:{borderRadius:te.full,borderWidth:1,borderStyle:"solid",padding:Z.xs},children:(0,yi.jsx)(y5,{width:z.sm,height:z.sm})})]})}qe();Ps();zt();mk();function sE(e){return C5({address:e.walletAddress,chain:e.chainId?vt(e.chainId):void 0,client:e.client,tokenAddress:e.tokenAddress?ge(e.tokenAddress)===ge(Pr)?void 0:ge(e.tokenAddress):void 0})}tt();Ps();function TCt(e){return le({enabled:!!e.chainId,queryFn:async()=>{if(!e.chainId)throw new Error("Chain ID is required");let t=e.tokenAddress||Pr,n=await yf(e.client,t,e.chainId).catch(r=>{r.message.includes("not supported")||Promise.reject(r)});return n?{token:n,type:"success"}:{type:"unsupported_token"}},queryKey:["bridge.getToken",e],refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1})}Lm();Fe();ye();ve();nt();Ye();var Js=T(L(),1);function SCt(e){let t=$();return(0,Js.jsxs)(S,{flex:"column",children:[e.image&&(0,Js.jsx)("div",{style:{aspectRatio:"16/9",backgroundColor:t.colors.tertiaryBg,backgroundImage:`url(${VNn(e.client,e.image)})`,backgroundPosition:"center",backgroundSize:"cover",borderRadius:`${te.md} ${te.md} 0 0`,overflow:"hidden",width:"100%"}}),(0,Js.jsxs)(S,{flex:"column",px:"md",children:[(0,Js.jsx)(Q,{y:"md"}),(e.title||e.description)&&(0,Js.jsxs)(Js.Fragment,{children:[e.title&&(0,Js.jsx)(F,{color:"primaryText",size:"lg",weight:600,children:e.title}),e.description&&(0,Js.jsxs)(Js.Fragment,{children:[(0,Js.jsx)(Q,{y:"xxs"}),(0,Js.jsx)(F,{color:"secondaryText",size:"sm",multiline:!0,children:e.description})]}),(0,Js.jsx)(Q,{y:"md"})]}),e.children]})]})}function VNn(e,t){return t.startsWith("ipfs://")?ca({client:e,uri:t}):t}var MCt=T(_(),1);Zl();ls();function FV(){let e=Xn(),t=Mn(),n=cr();return(0,MCt.useMemo)(()=>e&&t&&n?{activeChain:n,activeWallet:t,activeAccount:e}:void 0,[e,t,n])}var Sf=T(_(),1);Go();Fe();ye();ve();St();Sa();$o();nt();_o();Ye();Bn();Ok();Cn();ye();ve();M5();var Hx=T(L(),1);function VV(e){return(0,Hx.jsxs)("div",{style:{position:"relative"},children:[(0,Hx.jsx)(S,{color:"secondaryText",children:(0,Hx.jsx)(PA,{width:z.md,height:z.md,style:{position:"absolute",left:Z.sm,top:"50%",borderRadius:te.lg,transform:"translateY(-50%)"}})}),(0,Hx.jsx)(Ys,{variant:"outline",placeholder:e.placeholder,value:e.value,sm:!0,style:{paddingLeft:"44px"},onChange:t=>e.onChange(t.target.value),autoFocus:e.autoFocus})]})}Cn();ye();St();Sa();var Wx=T(L(),1);function kCt(e){return(0,Wx.jsxs)(ae,{variant:"outline",bg:"tertiaryBg",fullWidth:!0,style:{justifyContent:"flex-start",fontWeight:500,fontSize:oe.md,padding:`${Z.sm} ${Z.sm}`,borderRadius:te.lg,minHeight:"48px"},gap:"sm",onClick:e.onClick,children:[(0,Wx.jsx)(nn,{src:e.selectedChain.icon,client:e.client,width:z.lg,height:z.lg}),(0,Wx.jsxs)("span",{children:[" ",Ux(e.selectedChain.name)," "]}),(0,Wx.jsx)(y5,{width:z.sm,height:z.sm,style:{marginLeft:"auto"}})]})}var OE=T(_(),1);ye();ve();St();Sa();$o();nt();Ye();tt();LE();function Tf(e){return le({queryKey:["bridge-chains"],queryFn:()=>ZV({client:e}),refetchOnMount:!1,refetchOnWindowFocus:!1})}var lo=T(L(),1);function ife(e){let t=Tf(e.client);return(0,lo.jsx)(uRn,{...e,isPending:t.isPending,onSelectChain:e.onSelectChain,chains:t.data??[]})}function uRn(e){let[t,n]=(0,OE.useState)(""),[r]=(0,OE.useState)(e.selectedChain),i=(0,OE.useMemo)(()=>r?[r,...e.chains.filter(a=>a.chainId!==r.chainId)]:e.chains,[e.chains,r]).filter(a=>a.name.toLowerCase().includes(t.toLowerCase()));return(0,lo.jsxs)(S,{fullHeight:!0,flex:"column",children:[e.isMobile&&(0,lo.jsxs)(lo.Fragment,{children:[(0,lo.jsx)(S,{px:"md",py:"md+",children:(0,lo.jsx)(be,{onBack:e.onBack,title:"Select Chain"})}),(0,lo.jsx)(Wt,{})]}),(0,lo.jsx)(Q,{y:"md"}),(0,lo.jsx)(S,{px:"md",style:{paddingBottom:0},children:(0,lo.jsx)(VV,{value:t,onChange:n,placeholder:"Search Chain"})}),(0,lo.jsx)(Q,{y:"sm"}),(0,lo.jsxs)(S,{expand:!0,px:"md",gap:e.isMobile?void 0:"xxs",flex:"column",style:{maxHeight:e.isMobile?"400px":"none",overflowY:"auto",scrollbarWidth:"none",paddingBottom:Z.md},children:[i.map(a=>(0,lo.jsx)(pRn,{chain:a,client:e.client,onClick:()=>e.onSelectChain(a),isSelected:a.chainId===e.selectedChain?.chainId,isMobile:e.isMobile},a.chainId)),e.isPending&&new Array(20).fill(0).map(()=>(0,lo.jsx)(dRn,{})),i.length===0&&!e.isPending&&(0,lo.jsx)("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:(0,lo.jsxs)(F,{color:"secondaryText",size:"md",center:!0,multiline:!0,children:['No chains found for "',t,'"']})})]})]})}function dRn(){return(0,lo.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:Z.sm,padding:`${Z.sm} ${Z.sm}`},children:[(0,lo.jsx)(Te,{height:`${z.lg}px`,width:`${z.lg}px`}),(0,lo.jsx)(Te,{height:oe.md,width:"160px"})]})}function pRn(e){return(0,lo.jsxs)(ae,{variant:e.isSelected?"secondary":"ghost-solid",fullWidth:!0,style:{justifyContent:"flex-start",fontWeight:500,fontSize:e.isMobile?oe.md:oe.sm,border:"1px solid transparent",padding:e.isMobile?void 0:`${Z.xs} ${Z.xs}`},onClick:e.onClick,gap:"sm",children:[(0,lo.jsx)(nn,{src:e.chain.icon,client:e.client,width:e.isMobile?z.lg:z.md,height:e.isMobile?z.lg:z.md,style:{borderRadius:te.full}}),Ux(e.chain.name)]})}tt();tV();zt();an();function GSt(e){return le({queryKey:["tokens",e],enabled:!!e.chainId,retry:!1,queryFn:()=>{if(!e.chainId)throw new Error("Chain ID is required");let t=e.search?eo(e.search):!1;return Cx({chainId:e.chainId,client:e.client,offset:e.offset,limit:e.limit,includePrices:!1,query:e.search&&!t?e.search:void 0,tokenAddress:e.search&&t?e.search:void 0})}})}function YSt(e){return le({queryKey:["bridge/v1/wallets",e],enabled:!!e.chainId&&!!e.walletAddress,queryFn:async()=>{if(!e.chainId||!e.walletAddress)throw new Error("invalid options");let n=Be("bridge").includes("thirdweb-dev"),r=new URL(`https://api.${n?"thirdweb-dev":"thirdweb"}.com/v1/wallets/${e.walletAddress}/tokens`);r.searchParams.set("chainId",e.chainId.toString()),r.searchParams.set("limit",e.limit.toString()),r.searchParams.set("page",e.page.toString()),r.searchParams.set("metadata","true"),r.searchParams.set("resolveMetadataLinks","true"),r.searchParams.set("includeSpam","false"),r.searchParams.set("includeNative","true"),r.searchParams.set("sortBy","usd_value"),r.searchParams.set("sortOrder","desc"),r.searchParams.set("includeWithoutPrice","false");let o=await fetch(r.toString(),{headers:{"x-client-id":e.clientId}});if(!o.ok)throw new Error(`Failed to fetch token balances: ${o.statusText}`);return(await o.json()).result},refetchOnMount:!1,retry:!1,refetchOnWindowFocus:!1})}var Ke=T(L(),1);function afe(e,t){if(t)return e.find(n=>n.chainId===t)}function RE(e){let t=Tf(e.client),[n,r]=(0,Sf.useState)(""),o=P5(n,500),[i,a]=(0,Sf.useState)(1e3),[s,l]=(0,Sf.useState)(void 0),c=s||(t.data?afe(t.data,e.selectedToken?.chainId)||afe(t.data,e.activeWalletInfo?.activeChain.id)||afe(t.data,1):void 0),u=GSt({client:e.client,chainId:c?.chainId,search:o,limit:i,offset:0}),d=YSt({clientId:e.client.clientId,chainId:c?.chainId,limit:i,page:1,walletAddress:e.activeWalletInfo?.activeAccount.address}),f=(0,Sf.useMemo)(()=>d.data?.tokens?.filter(h=>h.symbol.toLowerCase().includes(o.toLowerCase())||h.name.toLowerCase().includes(o.toLowerCase())||h.token_address.toLowerCase().includes(o.toLowerCase())),[d.data?.tokens,o]),m=u.isFetching||d.isFetching;return(0,Ke.jsx)(fRn,{...e,ownedTokens:f||[],allTokens:u.data||[],isFetching:m,selectedChain:c,setSelectedChain:l,search:n,setSearch:r,selectedToken:e.selectedToken,setSelectedToken:e.setSelectedToken,showMore:u.data?.length===i?()=>{a(i*2)}:void 0})}function fRn(e){let t=zx(),[n,r]=(0,Sf.useState)("select-token"),o=(0,Sf.useMemo)(()=>e.ownedTokens.sort((s,l)=>s.icon_uri&&!l.icon_uri?-1:!s.icon_uri&&l.icon_uri?1:0),[e.ownedTokens]),i=(0,Sf.useMemo)(()=>{let s=new Set(o.map(l=>`${l.token_address}-${l.chain_id}`.toLowerCase()));return e.allTokens.filter(l=>!s.has(`${l.address}-${l.chainId}`.toLowerCase()))},[e.allTokens,o]),a=(0,Sf.useMemo)(()=>i.sort((s,l)=>s.iconUri&&!l.iconUri?-1:!s.iconUri&&l.iconUri?1:0),[i]);return t?n==="select-token"?(0,Ke.jsx)(XSt,{onSelectToken:s=>{e.setSelectedToken(s),e.onClose()},selectedToken:e.selectedToken,isFetching:e.isFetching,ownedTokens:e.ownedTokens,otherTokens:a,showMore:e.showMore,selectedChain:e.selectedChain,isMobile:!0,onSelectChain:()=>r("select-chain"),client:e.client,search:e.search,setSearch:e.setSearch}):n==="select-chain"?(0,Ke.jsx)(ife,{isMobile:!0,onBack:()=>r("select-token"),client:e.client,onSelectChain:s=>{e.setSelectedChain(s),r("select-token")},selectedChain:e.selectedChain}):null:(0,Ke.jsxs)(S,{style:{display:"grid",gridTemplateColumns:"300px 1fr",height:"100%"},children:[(0,Ke.jsx)(hRn,{children:(0,Ke.jsx)(ife,{onBack:()=>r("select-token"),client:e.client,isMobile:!1,onSelectChain:s=>{e.setSelectedChain(s),r("select-token")},selectedChain:e.selectedChain})}),(0,Ke.jsx)(S,{flex:"column",relative:!0,scrollY:!0,children:(0,Ke.jsx)(XSt,{onSelectToken:s=>{e.setSelectedToken(s),e.onClose()},isMobile:!1,selectedToken:e.selectedToken,isFetching:e.isFetching,ownedTokens:e.ownedTokens,otherTokens:a,showMore:e.showMore,selectedChain:e.selectedChain,onSelectChain:()=>r("select-chain"),client:e.client,search:e.search,setSearch:e.setSearch})})]})}function mRn(){return(0,Ke.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:Z.sm,padding:`${Z.xs} ${Z.xs}`,height:"70px"},children:[(0,Ke.jsx)(Te,{height:`${z.lg}px`,width:`${z.lg}px`}),(0,Ke.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[(0,Ke.jsx)(Te,{height:oe.sm,width:"100px"}),(0,Ke.jsx)(Te,{height:oe.md,width:"200px"})]})]})}function KSt(e){let t=$(),n="balance"in e.token?go(BigInt(e.token.balance),e.token.decimals):void 0,r="balance"in e.token?e.token.price_data.price_usd*Number(n):void 0;return(0,Ke.jsxs)(ae,{variant:e.isSelected?"secondary":"ghost-solid",fullWidth:!0,style:{justifyContent:"flex-start",fontWeight:500,fontSize:oe.md,border:"1px solid transparent",padding:`${Z.xs} ${Z.xs}`,textAlign:"left",lineHeight:"1.5",borderRadius:te.lg},gap:"sm",onClick:async()=>{"balance"in e.token?e.onSelect({tokenAddress:e.token.token_address,chainId:e.token.chain_id}):e.onSelect({tokenAddress:e.token.address,chainId:e.token.chainId})},children:[(0,Ke.jsx)(nn,{src:("balance"in e.token?e.token.icon_uri:e.token.iconUri)||"",client:e.client,width:z.lg,height:z.lg,style:{flexShrink:0,borderRadius:te.full},fallback:(0,Ke.jsx)(S,{color:"secondaryText",children:(0,Ke.jsx)(S,{style:{background:`linear-gradient(45deg, white, ${t.colors.accentText})`,borderRadius:te.full,width:`${z.lg}px`,height:`${z.lg}px`}})})}),(0,Ke.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:Z["3xs"],flex:1},children:[(0,Ke.jsxs)(S,{flex:"row",style:{justifyContent:"space-between",width:"100%"},children:[(0,Ke.jsx)(F,{size:"md",color:"primaryText",weight:500,children:e.token.symbol}),"balance"in e.token&&(0,Ke.jsx)(F,{size:"md",color:"primaryText",children:ICt.format(Number(go(BigInt(e.token.balance),e.token.decimals)))})]}),(0,Ke.jsxs)(S,{flex:"row",style:{justifyContent:"space-between",width:"100%"},children:[(0,Ke.jsx)(F,{size:"xs",color:"secondaryText",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"200px"},children:e.token.name}),r&&(0,Ke.jsx)(S,{flex:"row",children:(0,Ke.jsxs)(F,{size:"xs",color:"secondaryText",weight:400,children:["$",r.toFixed(2)]})})]})]})]})}function XSt(e){let t=!e.isFetching&&e.otherTokens.length===0&&e.ownedTokens.length===0;return(0,Ke.jsxs)(S,{fullHeight:!0,flex:"column",children:[(0,Ke.jsxs)(S,{px:"md",pt:"md+",children:[(0,Ke.jsx)(F,{size:"lg",weight:600,color:"primaryText",trackingTight:!0,children:"Select Token"}),(0,Ke.jsx)(Q,{y:"3xs"}),(0,Ke.jsx)(F,{size:"xs",color:"secondaryText",multiline:!0,style:{textWrap:"pretty",maxWidth:"70%"},children:"Select a token from the list or search for a token by symbol or address"})]}),!e.selectedChain&&(0,Ke.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"400px"},children:(0,Ke.jsx)(wt,{color:"secondaryText",size:"xl"})}),e.selectedChain&&(0,Ke.jsxs)(Ke.Fragment,{children:[e.isMobile?(0,Ke.jsx)(S,{p:"md",children:(0,Ke.jsx)(kCt,{onClick:e.onSelectChain,selectedChain:e.selectedChain,client:e.client})}):(0,Ke.jsx)(Q,{y:"md"}),(0,Ke.jsx)(S,{px:"md",children:(0,Ke.jsx)(VV,{value:e.search,onChange:e.setSearch,placeholder:"Search by token or address",autoFocus:!e.isMobile})}),(0,Ke.jsx)(Q,{y:"xs"}),(0,Ke.jsxs)(S,{pb:"md",px:"md",expand:!0,gap:"xxs",flex:"column",style:{minHeight:"400px",maxHeight:e.isMobile?"450px":"none",overflowY:"auto",scrollbarWidth:"none",paddingBottom:Z.md},children:[e.isFetching&&new Array(20).fill(0).map((n,r)=>(0,Ke.jsx)(mRn,{},r)),!e.isFetching&&e.ownedTokens.length>0&&(0,Ke.jsxs)(S,{px:"xs",py:"xs",flex:"row",gap:"xs",center:"y",color:"secondaryText",children:[(0,Ke.jsx)(zV,{size:z.xs}),(0,Ke.jsx)(F,{size:"sm",color:"secondaryText",style:{overflow:"unset"},children:"Your Tokens"})]}),!e.isFetching&&e.ownedTokens.map(n=>(0,Ke.jsx)(KSt,{token:n,client:e.client,onSelect:e.onSelectToken,isSelected:!!e.selectedToken&&e.selectedToken.tokenAddress.toLowerCase()===n.token_address.toLowerCase()&&n.chain_id===e.selectedToken.chainId},n.token_address)),!e.isFetching&&e.ownedTokens.length>0&&(0,Ke.jsxs)(S,{px:"xs",py:"xs",flex:"row",gap:"xs",center:"y",color:"secondaryText",style:{marginTop:Z.sm},children:[(0,Ke.jsx)(Z5,{size:z.xs}),(0,Ke.jsx)(F,{size:"sm",color:"secondaryText",style:{overflow:"unset"},children:"Other Tokens"})]}),!e.isFetching&&e.otherTokens.map(n=>(0,Ke.jsx)(KSt,{token:n,client:e.client,onSelect:e.onSelectToken,isSelected:!!e.selectedToken&&e.selectedToken.tokenAddress.toLowerCase()===n.address.toLowerCase()&&n.chainId===e.selectedToken.chainId},n.address)),e.showMore&&(0,Ke.jsx)(ae,{variant:"secondary",fullWidth:!0,onClick:()=>{e.showMore?.()},children:"Load More"}),t&&(0,Ke.jsx)("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:(0,Ke.jsx)(F,{size:"md",color:"secondaryText",children:"No Tokens Found"})})]})]})]})}var hRn=mt(e=>{let t=$();return{display:"flex",flexDirection:"column",overflowY:"auto",...x0,borderRight:`1px solid ${t.colors.separatorLine}`,position:"relative"}});var He=T(L(),1);function JSt(e){let t=$(),n=FV(),r=e.receiverAddress??n?.activeAccount?.address,[o,i]=(0,sfe.useState)(!1),[a,s]=(0,sfe.useState)(!1),l=e.receiverAddress&&eo(e.receiverAddress)&&(n?.activeAccount?.address?Hd(e.receiverAddress)!==Hd(n?.activeAccount?.address):!0),c=TCt({tokenAddress:e.selectedToken?.tokenAddress,chainId:e.selectedToken?.chainId,client:e.client}),u=c.data?.type==="success"?c.data.token:void 0,d=sE({chainId:e.selectedToken?.chainId,tokenAddress:e.selectedToken?.tokenAddress,client:e.client,walletAddress:n?.activeAccount?.address}),f=l?"Pay":"Buy",m=zx(),h=!e.receiverAddress&&!n;return(0,He.jsxs)(SCt,{client:e.client,title:e.metadata.title,description:e.metadata.description,image:e.metadata.image,children:[o&&(0,He.jsx)(iE,{client:e.client,locale:R3,detailsModal:{hideBuyFunds:!0},theme:e.theme,closeModal:()=>{i(!1)},onDisconnect:()=>{e.onDisconnect?.()},chains:[],connectOptions:e.connectOptions}),(0,He.jsx)(gf,{hide:!1,className:"tw-modal__buy-widget",size:m?"compact":"wide",title:"Select Token",open:a,crossContainerStyles:{right:Z.md,top:Z["md+"],transform:"none"},setOpen:g=>s(g),autoFocusCrossIcon:!1,children:(0,He.jsx)(RE,{activeWalletInfo:n,onClose:()=>s(!1),client:e.client,selectedToken:e.selectedToken,setSelectedToken:g=>{e.setSelectedToken(g),s(!1)}})}),(0,He.jsxs)(S,{flex:"column",children:[(0,He.jsx)(gRn,{title:f,presetOptions:e.presetOptions,amountSelection:e.amountSelection,setAmount:e.setAmountSelection,activeWalletInfo:n,selectedToken:e.selectedToken?{data:c.data?.type==="success"?c.data.token:void 0,isFetching:c.isFetching,isError:c.isError||c.data?.type==="unsupported_token"}:void 0,balance:{data:d.data,isFetching:d.isFetching},client:e.client,isConnected:!!n,onSelectToken:()=>{s(!0)},onWalletClick:()=>{i(!0)},currency:e.currency}),r&&l&&(0,He.jsxs)(He.Fragment,{children:[(0,He.jsx)(wRn,{}),(0,He.jsx)(yRn,{address:r,client:e.client})]})]}),(0,He.jsx)(Q,{y:"md"}),(c.isError||c.data?.type==="unsupported_token")&&(0,He.jsx)("div",{style:{border:`1px solid ${t.colors.borderColor}`,borderRadius:te.full,padding:Z.xs,marginBottom:Z.md},children:(0,He.jsx)(F,{size:"sm",color:"danger",center:!0,children:"Failed to fetch token details"})}),h?(0,He.jsx)(BV,{client:e.client,connectButton:{label:e.buttonLabel||f,style:{width:"100%",borderRadius:te.full}},theme:t,...e.connectOptions}):(0,He.jsx)(ae,{disabled:!r,fullWidth:!0,onClick:()=>{if(!r||!u)return;let g=u.prices[e.currency],{tokenValue:w}=_St(e.amountSelection,g);w&&e.onContinue(String(w),u,ge(r))},style:{fontSize:oe.md,borderRadius:te.full},variant:"primary",children:e.buttonLabel||f}),e.showThirdwebBranding?(0,He.jsxs)("div",{children:[(0,He.jsx)(Q,{y:"md"}),(0,He.jsx)(hd,{link:"https://playground.thirdweb.com/payments/fund-wallet"})]}):(0,He.jsx)(Q,{y:"xxs"}),(0,He.jsx)(Q,{y:"md"})]})}function _St(e,t){let n=e.type==="usd"?e.value:t?t*Number(e.value):void 0,r=e.type==="token"?e.value:t?Number(e.value)/t:void 0;return{fiatValue:n,tokenValue:r}}function gRn(e){let t=$(),r=Tf(e.client).data?.find(s=>s.chainId===e.selectedToken?.data?.chainId),o=e.selectedToken?.data?.prices[e.currency],{fiatValue:i,tokenValue:a}=_St(e.amountSelection,o);return(0,He.jsxs)($St,{header:(0,He.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,He.jsx)(S,{flex:"row",center:"y",gap:"3xs",color:"secondaryText",children:(0,He.jsx)(F,{size:"xs",color:"primaryText",style:{letterSpacing:"0.07em",textTransform:"uppercase"},children:e.title})}),e.activeWalletInfo&&(0,He.jsx)(HV,{activeWalletInfo:e.activeWalletInfo,client:e.client,onClick:e.onWalletClick})]}),children:[(0,He.jsx)(WV,{selectedToken:e.selectedToken,client:e.client,onSelectToken:e.onSelectToken,chain:r}),(0,He.jsxs)(S,{px:"md",py:"md",children:[(0,He.jsx)(aE,{value:a?String(a):"",setValue:s=>{e.setAmount({type:"token",value:s})},style:{border:"none",boxShadow:"none",fontSize:oe.xl,fontWeight:500,paddingInline:0,paddingBlock:0,letterSpacing:"-0.025em"}}),(0,He.jsx)(Q,{y:"xs"}),(0,He.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"2px"},children:[(0,He.jsx)(F,{size:"md",color:"secondaryText",style:{flexShrink:0},children:jk(e.currency)}),e.selectedToken?.isFetching?(0,He.jsx)(Te,{width:"120px",height:"20px",style:{transform:"translateX(4px)"}}):(0,He.jsx)(aE,{value:String(i||0),setValue:s=>{e.setAmount({type:"usd",value:s})},style:{border:"none",boxShadow:"none",fontSize:oe.md,fontWeight:400,color:t.colors.secondaryText,paddingInline:0,height:"20px",paddingBlock:0}})]}),(0,He.jsx)(Q,{y:"md"}),(0,He.jsx)(S,{flex:"row",gap:"xxs",children:e.presetOptions.map(s=>(0,He.jsxs)(ae,{disabled:!e.selectedToken?.data,onClick:()=>e.setAmount({type:"usd",value:String(s)}),style:{backgroundColor:"transparent",color:t.colors.secondaryText,fontSize:oe.xs,fontWeight:400,borderRadius:te.full,gap:"0.5px",padding:`${Z.xxs} ${Z.sm}`},variant:"outline",children:[(0,He.jsx)("span",{children:jk(e.currency)}),(0,He.jsx)("span",{children:s})]},s))})]}),e.isConnected&&e.selectedToken&&(0,He.jsx)(S,{px:"md",py:"md",style:{borderTop:`1px dashed ${t.colors.borderColor}`,justifyContent:"start"},children:(0,He.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"3px"},children:[(0,He.jsx)(F,{size:"xs",color:"secondaryText",children:"Current Balance"}),e.balance.data===void 0?(0,He.jsx)(Te,{height:oe.xs,width:"100px"}):(0,He.jsxs)(F,{size:"xs",color:"primaryText",children:[zo(e.balance.data.value,e.balance.data.decimals,5)," ",e.balance.data.symbol]})]})})]})}function yRn(e){let t=UW({address:e.address,client:e.client});return(0,He.jsx)($St,{header:(0,He.jsx)(F,{size:"xs",color:"primaryText",style:{letterSpacing:"0.07em",textTransform:"uppercase"},children:"To"}),children:(0,He.jsxs)(S,{px:"md",py:"md",flex:"row",center:"y",gap:"xs",color:"secondaryText",children:[(0,He.jsx)(zV,{size:z.xs,color:"secondaryText"}),(0,He.jsx)(F,{size:"sm",color:"primaryText",children:t.data||Vi(e.address)}),(0,He.jsx)(Nx,{text:e.address,tip:"Copy address",iconSize:14})]})})}function $St(e){let t=$();return(0,He.jsxs)(S,{style:{borderRadius:te.xl,borderWidth:1,borderStyle:"solid",position:"relative",overflow:"hidden"},borderColor:"borderColor",children:[(0,He.jsx)(S,{bg:"tertiaryBg",style:{position:"absolute",inset:0,opacity:.5,zIndex:0}}),(0,He.jsx)(S,{style:{position:"relative",zIndex:1},children:(0,He.jsx)(S,{px:"md",py:"sm",relative:!0,children:e.header})}),(0,He.jsx)(S,{bg:"tertiaryBg",style:{position:"relative",overflow:"hidden",borderRadius:te.xl,borderTop:`1px solid ${t.colors.borderColor}`},children:e.children})]})}function wRn(){return(0,He.jsx)("div",{style:{display:"flex",justifyContent:"center",marginBlock:"-13px",zIndex:2,position:"relative"},children:(0,He.jsx)(S,{p:"xs",center:"both",flex:"row",color:"primaryText",bg:"modalBg",borderColor:"borderColor",style:{borderRadius:te.full,borderWidth:1,borderStyle:"solid"},children:(0,He.jsx)(q4t,{width:z["sm+"],height:z["sm+"]})})})}tt();var mMt=T(_(),1);qe();Fe();ye();ve();St();nt();Ye();qe();Fe();ye();tt();Vr();Ps();function eMt(e){let t=e;"source_metadata"in e&&(t=e.source_metadata);let n=t.settings.compilationTarget,r=Object.keys(n),o=n[r[0]],i={author:t.output.devdoc.author,details:t.output.devdoc.detail,notice:t.output.userdoc.notice,title:t.output.devdoc.title},a=[...new Set(Object.entries(t.sources).map(([,s])=>s.license))];return{abi:t?.output?.abi||[],info:i,isPartialAbi:t.isPartialAbi,licenses:a,metadata:t,name:o,zk_version:e.zk_version}}async function tMt(e){let{address:t,chain:n}=e,r=await fetch(`https://contract.thirdweb.com/metadata/${n.id}/${t}`,{headers:{"Content-Type":"application/json"},method:"GET"});if(!r.ok){let i=await r.json();throw new Error(i.message||i.error||"Failed to get compiler metadata")}let o=await r.json();return eMt(o)}ko();UR();Om();RR();Nt();Nu();Go();JR();function nMt({transaction:e,client:t,wallet:n}){let r=H5(e.chain),o=oTe(n);return le({enabled:!!e.to&&!!r.data,queryFn:async()=>{let i=at({address:e.to,chain:e.chain,client:t}),[a,s,l,c]=await Promise.all([tMt(i).catch(()=>null),pt(e.value),pt(e.erc20Value),Yi(e).catch(()=>"0x")]),[u,d]=await Promise.all([yf(t,l?.tokenAddress||Pr,e.chain.id),o?0n:l_(e).catch(()=>null)]),f={description:void 0,functionName:"Contract Call",selector:"0x"};if(a?.abi&&c.length>=10)try{let v=c.slice(0,10),C=a.abi,P=(Array.isArray(C)?C:[]).filter(E=>E&&typeof E=="object"&&"type"in E&&E.type==="function").map(E=>E).find(E=>Mi(E)===v);P&&(f={description:void 0,functionName:P.name,selector:v})}catch{}let h=await(async()=>u?u.decimals:l?c_({contract:at({address:l.tokenAddress,chain:e.chain,client:t})}):18)(),g=l?l.amountWei:s||0n,w=r.data?.nativeCurrency?.symbol||"ETH",b=u?.symbol||w,A=l&&l.tokenAddress.toLowerCase()!==Pr?l.amountWei:(s||0n)+(d||0n),x=go(A,h);return{contractMetadata:a,costWei:g,functionInfo:f,gasCostDisplay:d?`${zo(d,18)} ${w}`:null,gasCostWei:d,tokenInfo:u,totalCost:x,totalCostWei:A,txCostDisplay:`${zo(g,h)} ${b}`}},queryKey:["transaction-details",pe(e),o]})}Cn();ye();var rMt=T(_(),1),Q0=T(L(),1),oMt=e=>{let t=(0,rMt.useId)();return(0,Q0.jsxs)("svg",{"aria-hidden":"true",height:e.size,viewBox:"0 0 512 512",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[(0,Q0.jsx)("mask",{id:t,children:(0,Q0.jsx)("circle",{cx:"256",cy:"256",fill:"#fff",r:"256"})}),(0,Q0.jsxs)("g",{mask:`url(#${t})`,children:[(0,Q0.jsx)("path",{d:"M0 0v512h144l112-64 112 64h144V0H368L256 64 144 0Z",fill:"#d80027"}),(0,Q0.jsx)("path",{d:"M144 0h224v512H144Z",fill:"#eee"}),(0,Q0.jsx)("path",{d:"m301 289 44-22-22-11v-22l-45 22 23-44h-23l-22-34-22 33h-23l23 45-45-22v22l-22 11 45 22-12 23h45v33h22v-33h45z",fill:"#d80027"})]})]})};var iMt=T(_(),1),$5=T(L(),1),aMt=e=>{let t=(0,iMt.useId)();return(0,$5.jsxs)("svg",{"aria-hidden":"true",height:e.size,viewBox:"0 0 512 512",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[(0,$5.jsx)("mask",{id:t,children:(0,$5.jsx)("circle",{cx:"256",cy:"256",fill:"#fff",r:"256"})}),(0,$5.jsxs)("g",{mask:`url(#${t})`,children:[(0,$5.jsx)("path",{d:"M0 0h512v512H0z",fill:"#0052b4"}),(0,$5.jsx)("path",{d:"m256 100.2 8.3 25.5H291l-21.7 15.7 8.3 25.6-21.7-15.8-21.7 15.8 8.3-25.6-21.7-15.7h26.8zm-110.2 45.6 24 12.2 18.9-19-4.2 26.5 23.9 12.2-26.5 4.2-4.2 26.5-12.2-24-26.5 4.3 19-19zM100.2 256l25.5-8.3V221l15.7 21.7 25.6-8.3-15.8 21.7 15.8 21.7-25.6-8.3-15.7 21.7v-26.8zm45.6 110.2 12.2-24-19-18.9 26.5 4.2 12.2-23.9 4.2 26.5 26.5 4.2-24 12.2 4.3 26.5-19-19zM256 411.8l-8.3-25.5H221l21.7-15.7-8.3-25.6 21.7 15.8 21.7-15.8-8.3 25.6 21.7 15.7h-26.8zm110.2-45.6-24-12.2-18.9 19 4.2-26.5-23.9-12.2 26.5-4.2 4.2-26.5 12.2 24 26.5-4.3-19 19zM411.8 256l-25.5 8.3V291l-15.7-21.7-25.6 8.3 15.8-21.7-15.8-21.7 25.6 8.3 15.7-21.7v26.8zm-45.6-110.2-12.2 24 19 18.9-26.5-4.2-12.2 23.9-4.2-26.5-26.5-4.2 24-12.2-4.3-26.5 19 19z",fill:"#ffda44"})]})]})};var Bi=T(L(),1),sMt=e=>(0,Bi.jsxs)("svg",{"aria-hidden":"true",height:e.size,version:"1.1",viewBox:"0 0 512 512",width:e.size,x:"0px",xmlns:"http://www.w3.org/2000/svg",y:"0px",children:[(0,Bi.jsx)("circle",{cx:"256",cy:"256",fill:"#F0F0F0",r:"256"}),(0,Bi.jsxs)("g",{children:[(0,Bi.jsx)("path",{d:"M52.92,100.142c-20.109,26.163-35.272,56.318-44.101,89.077h133.178L52.92,100.142z",fill:"#0052B4"}),(0,Bi.jsx)("path",{d:"M503.181,189.219c-8.829-32.758-23.993-62.913-44.101-89.076l-89.075,89.076H503.181z",fill:"#0052B4"}),(0,Bi.jsx)("path",{d:"M8.819,322.784c8.83,32.758,23.993,62.913,44.101,89.075l89.074-89.075L8.819,322.784L8.819,322.784 z",fill:"#0052B4"}),(0,Bi.jsx)("path",{d:"M411.858,52.921c-26.163-20.109-56.317-35.272-89.076-44.102v133.177L411.858,52.921z",fill:"#0052B4"}),(0,Bi.jsx)("path",{d:"M100.142,459.079c26.163,20.109,56.318,35.272,89.076,44.102V370.005L100.142,459.079z",fill:"#0052B4"}),(0,Bi.jsx)("path",{d:"M189.217,8.819c-32.758,8.83-62.913,23.993-89.075,44.101l89.075,89.075V8.819z",fill:"#0052B4"}),(0,Bi.jsx)("path",{d:"M322.783,503.181c32.758-8.83,62.913-23.993,89.075-44.101l-89.075-89.075V503.181z",fill:"#0052B4"}),(0,Bi.jsx)("path",{d:"M370.005,322.784l89.075,89.076c20.108-26.162,35.272-56.318,44.101-89.076H370.005z",fill:"#0052B4"})]}),(0,Bi.jsxs)("g",{children:[(0,Bi.jsx)("path",{d:"M509.833,222.609h-220.44h-0.001V2.167C278.461,0.744,267.317,0,256,0 c-11.319,0-22.461,0.744-33.391,2.167v220.44v0.001H2.167C0.744,233.539,0,244.683,0,256c0,11.319,0.744,22.461,2.167,33.391 h220.44h0.001v220.442C233.539,511.256,244.681,512,256,512c11.317,0,22.461-0.743,33.391-2.167v-220.44v-0.001h220.442 C511.256,278.461,512,267.319,512,256C512,244.683,511.256,233.539,509.833,222.609z",fill:"#D80027"}),(0,Bi.jsx)("path",{d:"M322.783,322.784L322.783,322.784L437.019,437.02c5.254-5.252,10.266-10.743,15.048-16.435 l-97.802-97.802h-31.482V322.784z",fill:"#D80027"}),(0,Bi.jsx)("path",{d:"M189.217,322.784h-0.002L74.98,437.019c5.252,5.254,10.743,10.266,16.435,15.048l97.802-97.804 V322.784z",fill:"#D80027"}),(0,Bi.jsx)("path",{d:"M189.217,189.219v-0.002L74.981,74.98c-5.254,5.252-10.266,10.743-15.048,16.435l97.803,97.803 H189.217z",fill:"#D80027"}),(0,Bi.jsx)("path",{d:"M322.783,189.219L322.783,189.219L437.02,74.981c-5.252-5.254-10.743-10.266-16.435-15.047 l-97.802,97.803V189.219z",fill:"#D80027"})]})]});var tv=T(L(),1),lMt=e=>(0,tv.jsx)("svg",{height:e.size,role:"presentation",viewBox:"0 0 32 32",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:(0,tv.jsxs)("g",{fill:"none",fillRule:"evenodd",children:[(0,tv.jsx)("circle",{cx:"16",cy:"16",fill:"#a81b1b",r:"16"}),(0,tv.jsx)("path",{d:"M17.548 18.711v1.878h5.063v2.288h-5.063V25.5h-3.096v-2.623H9.389v-2.288h5.063v-1.878H9.389v-2.288h4.171L7.5 7.5h3.752l4.8 7.534L20.853 7.5H24.5l-6.086 8.923h4.197v2.288z",fill:"#ffffff"})]})});var Mf=T(L(),1),cMt=e=>(0,Mf.jsxs)("svg",{"aria-hidden":"true",height:e.size,version:"1.1",viewBox:"0 0 512 512",width:e.size,x:"0px",xmlns:"http://www.w3.org/2000/svg",y:"0px",children:[(0,Mf.jsx)("circle",{cx:"256",cy:"256",fill:"#F0F0F0",r:"256"}),(0,Mf.jsxs)("g",{children:[(0,Mf.jsx)("path",{d:"M244.87,256H512c0-23.106-3.08-45.49-8.819-66.783H244.87V256z",fill:"#D80027"}),(0,Mf.jsx)("path",{d:"M244.87,122.435h229.556c-15.671-25.572-35.708-48.175-59.07-66.783H244.87V122.435z",fill:"#D80027"}),(0,Mf.jsx)("path",{d:"M256,512c60.249,0,115.626-20.824,159.356-55.652H96.644C140.374,491.176,195.751,512,256,512z",fill:"#D80027"}),(0,Mf.jsx)("path",{d:"M37.574,389.565h436.852c12.581-20.529,22.338-42.969,28.755-66.783H8.819 C15.236,346.596,24.993,369.036,37.574,389.565z",fill:"#D80027"})]}),(0,Mf.jsx)("path",{d:"M118.584,39.978h23.329l-21.7,15.765l8.289,25.509l-21.699-15.765L85.104,81.252l7.16-22.037 C73.158,75.13,56.412,93.776,42.612,114.552h7.475l-13.813,10.035c-2.152,3.59-4.216,7.237-6.194,10.938l6.596,20.301l-12.306-8.941 c-3.059,6.481-5.857,13.108-8.372,19.873l7.267,22.368h26.822l-21.7,15.765l8.289,25.509l-21.699-15.765l-12.998,9.444 C0.678,234.537,0,245.189,0,256h256c0-141.384,0-158.052,0-256C205.428,0,158.285,14.67,118.584,39.978z M128.502,230.4 l-21.699-15.765L85.104,230.4l8.289-25.509l-21.7-15.765h26.822l8.288-25.509l8.288,25.509h26.822l-21.7,15.765L128.502,230.4z M120.213,130.317l8.289,25.509l-21.699-15.765l-21.699,15.765l8.289-25.509l-21.7-15.765h26.822l8.288-25.509l8.288,25.509h26.822 L120.213,130.317z M220.328,230.4l-21.699-15.765L176.93,230.4l8.289-25.509l-21.7-15.765h26.822l8.288-25.509l8.288,25.509h26.822 l-21.7,15.765L220.328,230.4z M212.039,130.317l8.289,25.509l-21.699-15.765l-21.699,15.765l8.289-25.509l-21.7-15.765h26.822 l8.288-25.509l8.288,25.509h26.822L212.039,130.317z M212.039,55.743l8.289,25.509l-21.699-15.765L176.93,81.252l8.289-25.509 l-21.7-15.765h26.822l8.288-25.509l8.288,25.509h26.822L212.039,55.743z",fill:"#0052B4"})]});var hZ=T(L(),1),bRn={countryCode:"US",icon:cMt,name:"US Dollar",shorthand:"USD",symbol:"$"},ARn=[bRn,{countryCode:"CA",icon:oMt,name:"Canadian Dollar",shorthand:"CAD",symbol:"$"},{countryCode:"GB",icon:sMt,name:"British Pound",shorthand:"GBP",symbol:"\xA3"},{countryCode:"EU",icon:aMt,name:"Euro",shorthand:"EUR",symbol:"\u20AC"},{countryCode:"JP",icon:lMt,name:"Japanese Yen",shorthand:"JPY",symbol:"\xA5"},{countryCode:"AU",name:"Australian Dollar",shorthand:"AUD",symbol:"$"},{countryCode:"NZ",name:"New Zealand Dollar",shorthand:"NZD",symbol:"$"}];function xRn(e){return ARn.find(t=>t.shorthand.toLowerCase()===e.toLowerCase())??{countryCode:"US",icon:CRn,name:e,shorthand:e,symbol:"$"}}function vRn(e,t){return e.icon?(0,hZ.jsx)(e.icon,{size:z[t]}):(0,hZ.jsx)("img",{alt:e.shorthand,height:z[t],src:`https://flagsapi.com/${e.countryCode.toUpperCase()}/flat/64.png`,width:z[t]})}function uMt(e){return vRn(xRn(e.currency),e.size)}var CRn=e=>(0,hZ.jsx)(n3t,{height:e.size,width:e.size});tt();ye();$o();Ye();Ok();var lfe=T(L(),1);function gZ(e){let t=P5(e.tokenAmount,500),n=le({queryFn:()=>nV({chain:e.chain,client:e.client,fromAmount:Number(t),fromTokenAddress:mce(e.token),to:e.currency||"USD"}),queryKey:["cryptoToFiat",e.chain.id,mce(e.token),t,e.currency]});return n.isLoading?(0,lfe.jsx)(Te,{height:oe.lg,width:"50px"}):n.data?.result?(0,lfe.jsx)(F,{...e,children:xf(e.currency||"USD",n.data.result)}):null}Cn();Fe();ve();var yZ=T(L(),1);function dMt(){let e=$();return(0,yZ.jsx)(S,{center:"both",flex:"row",style:{marginBottom:"-10px",marginTop:"-10px",position:"relative",width:"100%",zIndex:1e3},children:(0,yZ.jsx)(S,{center:"both",color:"primaryText",flex:"row",style:{backgroundColor:e.colors.modalBg,border:`1px solid ${e.colors.borderColor}`,borderRadius:"100%",height:"30px",width:"30px"},children:(0,yZ.jsx)(y5,{height:16,width:16})})})}zt();ai();Um();ye();M0();ve();$o();Ye();md();JA();var W1=T(L(),1);function jE(e){let{client:t,address:n}=e,r=Gl(),o=MV({client:t}),i=r.find(u=>u.getAccount()?.address?.toLowerCase()===n.toLowerCase()),a=i&&(i.id==="inApp"||yt(i)||ju(i))?o.data?.find(u=>!!u.details.email)?.details.email:void 0,s=dd(i?.id),l=UW({address:n,client:t}),c=n?l.data||Vi(n):"";return(0,W1.jsx)(S,{flex:"row",style:{justifyContent:"space-between"},children:(0,W1.jsxs)(S,{center:"y",color:"secondaryText",flex:"row",gap:"md",children:[i?(0,W1.jsx)(jo,{client:e.client,id:i.id,size:z[e.iconSize||"md"]}):(0,W1.jsx)(fd,{size:z[e.iconSize||"md"]}),(0,W1.jsxs)(S,{flex:"column",gap:"3xs",children:[e.label?(0,W1.jsx)(F,{color:"secondaryText",size:"xs",children:e.label}):null,(0,W1.jsx)(F,{color:"primaryText",size:e.textSize||"xs",children:c||Vi(e.address)}),o.isLoading?(0,W1.jsx)(Te,{height:oe.sm,width:"100px"}):a||s?.data?.name?(0,W1.jsx)(F,{color:"secondaryText",size:"xs",children:a||s?.data?.name}):null]})]})})}ve();Ye();qc();qe();Fe();ye();ve();St();Ye();var pMt=T(_(),1);qe();Ps();Lm();Fe();ye();$3();ve();ye();$o();Ye();var cfe=T(L(),1),wZ=e=>{let{name:t}=JF(e.chain);return t?(0,cfe.jsx)(F,{color:e.color,size:e.size,style:e.style,children:e.short?bZ(t):t}):(0,cfe.jsx)(Te,{height:oe[e.size],width:"50px"})};function bZ(e){let t=e.split(" "),n=new Set(["mainnet","testnet","chain"]);return t.filter(r=>!n.has(r.toLowerCase())).join(" ")}Sa();Ye();var $s=T(L(),1);function AZ({token:e,client:t,size:n,style:r}){let o=$(),i=We(e.chainId);return(0,$s.jsxs)(S,{center:"y",flex:"row",gap:"sm",style:{flexWrap:"nowrap",...r},children:[(0,$s.jsxs)(S,{style:{height:z[n],position:"relative",width:z[n]},children:[(0,$s.jsx)(IRn,{client:t,size:n,token:e}),i.id!==1&&(0,$s.jsx)(S,{style:{background:o.colors.borderColor,border:`1.5px solid ${o.colors.modalBg}`,borderRadius:"50%",bottom:"-2px",height:n==="lg"||n==="xl"?z.sm:z.xs,position:"absolute",right:"-2px",width:n==="lg"||n==="xl"?z.sm:z.xs},children:(0,$s.jsx)(TRn,{chain:i,client:t,size:n==="xl"||n==="lg"?"sm":"xs"})})]}),(0,$s.jsxs)(S,{flex:"column",gap:"4xs",style:{minWidth:0},children:[(0,$s.jsx)(F,{color:"primaryText",size:n==="xl"?"lg":"sm",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},weight:600,trackingTight:!0,children:e.name}),(0,$s.jsx)(wZ,{chain:i,client:t,short:!0,size:n==="xl"?"sm":"xs"})]})]})}function IRn(e){let t=We(e.token.chainId),n=H5(t).data,r=$(),o=(0,pMt.useMemo)(()=>Md(e.token)||e.token.address===Pr?n?.nativeCurrency.symbol==="ETH"?"ipfs://QmcxZHpyJa8T4i63xqjPYrZ6tKrt55tZJpbXcjSDKuKaf9/ethereum/512.png":n?.icon?.url:e.token.iconUri,[e.token,n?.icon?.url,n?.nativeCurrency.symbol]);return o?(0,$s.jsx)(nn,{client:e.client,fallbackImage:WW,height:z[e.size],src:o,style:{borderRadius:"50%"},width:z[e.size]}):(0,$s.jsx)(S,{style:{alignItems:"center",backgroundColor:r.colors.secondaryButtonBg,border:`1px solid ${r.colors.borderColor}`,borderRadius:"50%",display:"flex",height:`${z[e.size]}px`,justifyContent:"center",padding:Z.xs,width:`${z[e.size]}px`},children:(0,$s.jsx)(F,{color:"secondaryText",size:e.size==="xl"?"sm":"xs",style:{fontWeight:600},children:e.token.symbol.slice(0,1)})})}var TRn=e=>{let{url:t}=xx(e.chain);return(0,$s.jsx)(S,{style:{alignItems:"center",display:"flex",flexShrink:0,position:"relative"},children:(0,$s.jsx)(nn,{client:e.client,fallbackImage:Sd,height:z[e.size],src:SRn({chainIconUrl:t,client:e.client}),width:z[e.size]})})},SRn=e=>{let t=e.chainIconUrl;if(!t)return Sd;try{return ca({client:e.client,uri:t})}catch{return Sd}};var e9=T(L(),1);function ufe({client:e,token:t,amount:n,onClick:r,style:o,currency:i}){let a=We(t.chainId);return(0,e9.jsxs)(MRn,{onClick:()=>r(t),style:{display:"flex",justifyContent:"space-between",padding:`${Z.sm} ${Z.md}`,...o},variant:"secondary",children:[(0,e9.jsx)(AZ,{client:e,size:"lg",style:{flex:1,maxWidth:"50%"},token:t}),(0,e9.jsx)(S,{center:"y",color:"secondaryText",flex:"row",gap:"4xs",style:{flex:"1",flexWrap:"nowrap",justifyContent:"flex-end",maxWidth:"50%",minWidth:0},children:(0,e9.jsxs)(S,{color:"secondaryText",flex:"column",gap:"3xs",style:{alignItems:"flex-end",minWidth:0,overflow:"hidden"},children:[(0,e9.jsx)(gZ,{currency:i,chain:a,client:e,color:"primaryText",size:"sm",token:t,tokenAmount:n}),(0,e9.jsx)(F,{color:"secondaryText",size:"xs",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:`${Number(n).toLocaleString(void 0,{maximumFractionDigits:6,minimumFractionDigits:0})} ${t.symbol}`})]})})]})}var MRn=Zt(ae)(e=>({"&:hover":{background:$().colors.secondaryButtonBg},background:"transparent",flexDirection:"row",flexWrap:"nowrap",gap:Z.sm,justifyContent:"space-between",padding:Z.sm,paddingRight:Z.xs,transition:"background 200ms ease, transform 150ms ease",...e.style}));var _t=T(L(),1);function fMt(e){let t=$(),n=e.sender||(e.paymentMethod.type==="wallet"?e.paymentMethod.payerWallet.getAccount()?.address:void 0),r=e.receiver.toLowerCase()!==n?.toLowerCase();return(0,_t.jsxs)(S,{children:[(0,_t.jsxs)(S,{bg:"tertiaryBg",flex:"column",style:{border:`1px solid ${t.colors.borderColor}`,borderRadius:te.lg},children:[n&&(0,_t.jsx)(S,{flex:"row",gap:"sm",px:"md",py:"sm",style:{borderBottom:`1px solid ${t.colors.borderColor}`},children:(0,_t.jsx)(jE,{address:n,client:e.client,iconSize:"md",textSize:"sm"})}),e.paymentMethod.type==="wallet"&&(0,_t.jsx)(ufe,{currency:e.currency,amount:e.fromAmount,client:e.client,onClick:()=>{},style:{background:"transparent",border:"none",borderRadius:0},token:e.paymentMethod.originToken}),e.paymentMethod.type==="fiat"&&(0,_t.jsxs)(S,{center:"y",flex:"row",gap:"sm",px:"md",py:"sm",style:{justifyContent:"space-between"},children:[(0,_t.jsxs)(S,{center:"y",flex:"row",gap:"sm",children:[uMt({currency:e.paymentMethod.currency,size:"lg"}),(0,_t.jsxs)(S,{center:"y",flex:"column",gap:"3xs",children:[(0,_t.jsx)(F,{color:"primaryText",size:"sm",style:{fontWeight:600},children:e.paymentMethod.currency}),(0,_t.jsx)(F,{color:"secondaryText",size:"xs",children:e.paymentMethod.onramp.charAt(0).toUpperCase()+e.paymentMethod.onramp.slice(1)})]})]}),(0,_t.jsx)(F,{color:"primaryText",size:"sm",style:{fontWeight:600},children:e.fromAmount})]})]}),(0,_t.jsx)(dMt,{}),(0,_t.jsxs)(S,{bg:"tertiaryBg",flex:"column",style:{border:`1px solid ${t.colors.borderColor}`,borderRadius:te.lg},children:[r&&(0,_t.jsx)(S,{flex:"row",gap:"sm",px:"md",py:"sm",style:{borderBottom:`1px solid ${t.colors.borderColor}`},children:(0,_t.jsx)(jE,{address:e.receiver,client:e.client,iconSize:"md",textSize:"sm"})}),e.modeInfo.mode==="direct_payment"&&(0,_t.jsxs)(S,{center:"y",flex:"row",gap:"sm",p:"md",style:{justifyContent:"space-between"},children:[(0,_t.jsxs)(S,{center:"y",flex:"column",gap:"3xs",style:{flex:1},children:[(0,_t.jsx)(F,{color:"primaryText",size:"sm",style:{fontWeight:600},children:e.metadata.title||"Payment"}),e.metadata.description&&(0,_t.jsx)(F,{color:"secondaryText",size:"xs",children:e.metadata.description})]}),(0,_t.jsxs)(S,{center:"y",flex:"column",gap:"3xs",style:{alignItems:"flex-end"},children:[(0,_t.jsx)(gZ,{currency:e.currency,chain:vt(e.toToken.chainId),client:e.client,color:"primaryText",size:"sm",token:e.toToken,tokenAmount:e.modeInfo.paymentInfo.amount,weight:600}),(0,_t.jsxs)(F,{color:"secondaryText",size:"xs",children:[e.modeInfo.paymentInfo.amount," ",e.toToken.symbol]})]})]}),e.modeInfo.mode==="fund_wallet"&&(0,_t.jsx)(ufe,{currency:e.currency,amount:e.toAmount,client:e.client,onClick:()=>{},style:{background:"transparent",border:"none",borderRadius:0},token:e.toToken}),e.modeInfo.mode==="transaction"&&(0,_t.jsx)(kRn,{client:e.client,paymentMethod:e.paymentMethod,transaction:e.modeInfo.transaction,metadata:e.metadata})]})]})}var kRn=e=>{let t=$(),n=nMt({client:e.client,transaction:e.transaction,wallet:e.paymentMethod.payerWallet});return n.data?(0,_t.jsxs)(S,{center:"y",flex:"row",gap:"sm",p:"md",style:{justifyContent:"space-between"},children:[(0,_t.jsxs)(S,{center:"y",flex:"column",gap:"3xs",style:{flex:1},children:[(0,_t.jsx)(F,{color:"primaryText",size:"sm",style:{fontWeight:600},children:e.metadata.title||"Transaction"}),e.metadata.description&&(0,_t.jsx)(F,{color:"secondaryText",size:"xs",children:e.metadata.description})]}),(0,_t.jsx)(S,{center:"y",flex:"column",gap:"3xs",style:{alignItems:"flex-end"},children:(0,_t.jsx)(F,{color:"secondaryText",size:"xs",style:{backgroundColor:t.colors.secondaryButtonBg,borderRadius:Z.sm,fontFamily:"monospace",padding:`${Z.xs} ${Z.sm}`,textAlign:"right"},children:n.data.functionInfo.functionName})})]}):(0,_t.jsxs)(S,{center:"y",flex:"row",gap:"sm",p:"md",style:{justifyContent:"space-between"},children:[(0,_t.jsxs)(S,{center:"y",flex:"column",gap:"3xs",style:{flex:1},children:[(0,_t.jsx)("div",{style:{backgroundColor:t.colors.skeletonBg,borderRadius:Z.xs,height:"16px",width:"120px"}}),e.metadata.description&&(0,_t.jsx)("div",{style:{backgroundColor:t.colors.skeletonBg,borderRadius:Z.xs,height:"12px",width:"80px"}})]}),(0,_t.jsx)(S,{center:"y",flex:"column",gap:"3xs",style:{alignItems:"flex-end"},children:(0,_t.jsx)("div",{style:{backgroundColor:t.colors.skeletonBg,borderRadius:Z.sm,height:"24px",width:"100px"}})})]})};var on=T(L(),1);function xZ({metadata:e,confirmButtonLabel:t,client:n,paymentMethod:r,preparedQuote:o,onConfirm:i,onBack:a,onError:s,currency:l,modeInfo:c}){let u=$(),d=()=>{try{i()}catch(w){s(w)}};le({queryFn:()=>((o.type==="buy"||o.type==="sell"||o.type==="transfer")&&Ki({chainId:o.type==="transfer"?o.intent.chainId:o.intent.originChainId,client:n,event:"payment_details",fromToken:o.type==="transfer"?o.intent.tokenAddress:o.intent.originTokenAddress,toChainId:o.type==="transfer"?o.intent.chainId:o.intent.destinationChainId,toToken:o.type==="transfer"?o.intent.tokenAddress:o.intent.destinationTokenAddress}),!0),queryKey:["payment_details",o.type]});let f=$F(o.steps.flatMap(w=>[vt(w.originToken.chainId),vt(w.destinationToken.chainId)]),10),m=(0,mMt.useMemo)(()=>f.map(w=>w.data),[f]).filter(w=>!!w),g=(()=>{switch(o.type){case"transfer":{let w=r.type==="wallet"?r.originToken:void 0;return w?{destinationAmount:zo(o.destinationAmount,w.decimals),destinationToken:w,estimatedTime:o.estimatedExecutionTimeMs,originAmount:zo(o.originAmount,w.decimals),originToken:w}:(s(new Error("Invalid payment method")),{destinationAmount:"0",destinationToken:void 0,estimatedTime:0,originAmount:"0",originToken:void 0})}case"buy":{let w=r.type==="wallet"?r:void 0;return w?{destinationAmount:zo(o.destinationAmount,o.steps[o.steps.length-1]?.destinationToken?.decimals??18),destinationToken:o.steps[o.steps.length-1]?.destinationToken,estimatedTime:o.estimatedExecutionTimeMs,originAmount:zo(o.originAmount,w.originToken.decimals),originToken:r.type==="wallet"?r.originToken:void 0}:(s(new Error("Invalid payment method")),{destinationAmount:"0",destinationToken:void 0,estimatedTime:0,originAmount:"0",originToken:void 0})}case"sell":{let w=r.type==="wallet"?r:void 0;return w?{destinationAmount:zo(o.destinationAmount,o.steps[o.steps.length-1]?.destinationToken?.decimals??18),destinationToken:o.steps[o.steps.length-1]?.destinationToken,estimatedTime:o.estimatedExecutionTimeMs,originAmount:zo(o.originAmount,w.originToken.decimals),originToken:r.type==="wallet"?r.originToken:void 0}:(s(new Error("Invalid payment method")),{destinationAmount:"0",destinationToken:void 0,estimatedTime:0,originAmount:"0",originToken:void 0})}case"onramp":{let w=r.type==="fiat"?r:void 0;return w?{destinationAmount:zo(o.destinationAmount,o.destinationToken.decimals),destinationToken:o.destinationToken,estimatedTime:void 0,originAmount:xf(w.currency,Number(o.currencyAmount)),originToken:void 0}:(s(new Error("Invalid payment method")),{destinationAmount:"0",destinationToken:void 0,estimatedTime:0,originAmount:"0",originToken:void 0})}default:throw new Error(`Unsupported bridge prepare type: ${o.type}`)}})();return(0,on.jsxs)(S,{flex:"column",fullHeight:!0,px:"md",pb:"md",pt:"md+",children:[(0,on.jsx)(be,{onBack:a,title:e.title||"Payment Details"}),(0,on.jsx)(Q,{y:"lg"}),(0,on.jsxs)(S,{flex:"column",children:[(0,on.jsxs)(S,{flex:"column",children:[g.destinationToken&&(0,on.jsx)(fMt,{currency:l,metadata:e,modeInfo:c,client:n,fromAmount:g.originAmount,paymentMethod:r,receiver:o.intent.receiver,sender:o.intent.sender||r.payerWallet?.getAccount()?.address,toAmount:g.destinationAmount,toToken:g.destinationToken}),(0,on.jsx)(Q,{y:"md"}),(0,on.jsxs)(S,{flex:"row",gap:"sm",children:[(0,on.jsxs)(S,{flex:"row",gap:"xs",style:{flex:1,justifyContent:"center"},children:[(0,on.jsx)(F,{color:"secondaryText",size:"sm",children:"Estimated Time"}),(0,on.jsx)(F,{color:"primaryText",size:"sm",children:g.estimatedTime?`~${Math.ceil(g.estimatedTime/6e4)} min`:"~2 min"})]}),o.steps.length>1?(0,on.jsxs)(S,{flex:"row",gap:"xs",style:{flex:1,justifyContent:"center"},children:[(0,on.jsx)(F,{color:"secondaryText",size:"sm",children:"Route Length"}),(0,on.jsxs)(F,{color:"primaryText",size:"sm",children:[o.steps.length," step",o.steps.length!==1?"s":""]})]}):null]})]}),o.steps.length>1&&(0,on.jsxs)(S,{flex:"column",children:[(0,on.jsx)(Q,{y:"sm"}),(0,on.jsx)(S,{flex:"column",gap:"sm",style:{backgroundColor:u.colors.tertiaryBg,border:`1px solid ${u.colors.borderColor}`,borderRadius:te.md,padding:`${Z.sm} ${Z.md}`},children:o.steps.map((w,b)=>(0,on.jsx)(S,{flex:"column",gap:"sm",children:(0,on.jsxs)(S,{flex:"row",gap:"md",style:{alignItems:"center"},children:[(0,on.jsx)(S,{center:"both",flex:"row",style:{backgroundColor:u.colors.accentButtonBg,borderRadius:"50%",color:u.colors.accentButtonText,flexShrink:0,fontSize:"12px",fontWeight:"bold",height:"24px",width:"24px"},children:(0,on.jsx)(F,{color:"accentButtonText",size:"xs",children:b+1})}),(0,on.jsx)(S,{center:"y",flex:"row",gap:"sm",style:{flex:1},children:(0,on.jsxs)(S,{flex:"column",gap:"3xs",style:{flex:1},children:[(0,on.jsx)(F,{color:"primaryText",size:"sm",children:w.destinationToken.chainId!==w.originToken.chainId?(0,on.jsxs)(on.Fragment,{children:["Bridge"," ",w.originToken.symbol===w.destinationToken.symbol?w.originToken.symbol:`${w.originToken.symbol} to ${w.destinationToken.symbol}`]}):(0,on.jsxs)(on.Fragment,{children:["Swap ",w.originToken.symbol," to"," ",w.destinationToken.symbol]})}),(0,on.jsx)(F,{color:"secondaryText",size:"xs",children:w.originToken.chainId!==w.destinationToken.chainId?(0,on.jsxs)(on.Fragment,{children:[m.find(A=>A.chainId===w.originToken.chainId)?.name," ","to"," ",m.find(A=>A.chainId===w.destinationToken.chainId)?.name]}):m.find(A=>A.chainId===w.originToken.chainId)?.name})]})})]})},`step-${b}-${w.originToken.address}-${w.destinationToken.address}`))})]}),(0,on.jsx)(Q,{y:"lg"}),(0,on.jsx)(S,{flex:"column",gap:"sm",children:(0,on.jsx)(ae,{fullWidth:!0,onClick:d,variant:"accent",children:t||"Confirm Payment"})})]})]})}tt();var vZ=T(_(),1);qe();Go();tt();$l();an();Kt();Go();ls();function hMt(e){let{destinationToken:t,destinationAmount:n,client:r,payerWallet:o,supportedTokens:i}=e,a=Mn(),s=o||a,l=le({enabled:!!s,queryFn:async()=>{let c=s?.getAccount();if(!s||!c)throw new Error("No wallet connected");let u=new URL(`${Be("bridge")}/v1/buy/quote/${c.address}`);u.searchParams.set("destinationChainId",t.chainId.toString()),u.searchParams.set("destinationTokenAddress",t.address),u.searchParams.set("amount",Er(n,t.decimals).toString());let f=await Pe(r)(u.toString());if(!f.ok){let A=await f.json();throw new dn({code:A.code||"UNKNOWN_ERROR",correlationId:A.correlationId||void 0,message:A.message||f.statusText,statusCode:f.status})}let{data:m}=await f.json(),g=m.map(A=>({balance:BigInt(A.balance),originToken:A.token,payerWallet:s,type:"wallet",quote:A.quote})).filter(A=>!!A.originToken.prices.USD).sort((A,x)=>Number.parseFloat(go(x.balance,x.originToken.decimals))*(x.originToken.prices.USD||1)-Number.parseFloat(go(A.balance,A.originToken.decimals))*(A.originToken.prices.USD||1)),w=i?Object.keys(i).flatMap(A=>i[Number(A)]?.map(x=>({chainId:Number(A),address:x.address}))??[]):[];return(i?g.filter(A=>w.find(x=>x.chainId===A.originToken.chainId&&x.address.toLowerCase()===A.originToken.address.toLowerCase())):g).map(A=>({...A,action:"buy"}))},queryKey:["payment-methods",t.chainId,t.address,n,o?.getAccount()?.address,i],refetchOnWindowFocus:!1,staleTime:5*60*1e3});return{data:l.data||[],error:l.error,isError:l.isError,isLoading:l.isLoading,isSuccess:l.isSuccess,refetch:l.refetch}}ls();ve();nt();var yMt=T(_(),1);zt();Go();ye();tt();Bce();Go();function gMt(e,t){return Q4({queries:["coinbase","stripe","transak"].map(o=>({...t,enabled:!!e,queryFn:async()=>{if(!e)throw new Error("No params provided");let i=await yf(e.client,e.tokenAddress,e.chainId),a=Er(e.amount,i.decimals);return jce({amount:a,chainId:e.chainId,client:e.client,currency:e.currency||"USD",onramp:o,receiver:e.receiver,tokenAddress:e.tokenAddress,country:e.country})},queryKey:["onramp-prepare",o,e],retry:!1}))})}ve();St();Sa();nt();_o();Ye();var zi=T(L(),1),ERn=[{description:"Fast and secure payments",iconUri:"https://i.ibb.co/LDJ3Rk2t/Frame-5.png",id:"coinbase",name:"Coinbase"},{description:"Trusted payment processing",iconUri:"https://i.ibb.co/CpgQC2Lf/images-3.png",id:"stripe",name:"Stripe"},{description:"Global payment solution",iconUri:"https://i.ibb.co/Xx2r882p/Transak-official-symbol-1.png",id:"transak",name:"Transak"}];function wMt({onProviderSelected:e,client:t,toChainId:n,toTokenAddress:r,toAddress:o,toAmount:i,currency:a,country:s}){let l=gMt({amount:i||"0",chainId:n,client:t,currency:a||"USD",receiver:Hd(o),tokenAddress:Hd(r),country:s}),c=(0,yMt.useMemo)(()=>l.map(d=>d.data).filter(d=>!!d),[l]),u=l.some(d=>d.isLoading);return l.every(d=>d.isError)?(0,zi.jsx)(S,{center:"both",flex:"column",style:{minHeight:"200px",flexGrow:1},children:(0,zi.jsx)(F,{color:"secondaryText",size:"sm",children:"No quotes available"})}):(0,zi.jsx)(S,{flex:"column",gap:"xs",style:{flexGrow:1},children:u?(0,zi.jsxs)(S,{center:"both",flex:"column",style:{flexGrow:1,paddingBottom:Z.lg},px:"md",children:[(0,zi.jsx)(wt,{color:"secondaryText",size:"xl"}),(0,zi.jsx)(Q,{y:"lg"}),(0,zi.jsx)(F,{center:!0,color:"primaryText",size:"lg",weight:600,trackingTight:!0,children:"Searching Providers"}),(0,zi.jsx)(Q,{y:"xs"}),(0,zi.jsx)(F,{center:!0,color:"secondaryText",size:"sm",multiline:!0,style:{textWrap:"pretty"},children:"Searching for the best providers for this payment"})]}):c.sort((d,f)=>d.currencyAmount-f.currencyAmount).map(d=>{let f=ERn.find(m=>m.id===d.intent.onramp);return f?(0,zi.jsx)(ae,{fullWidth:!0,onClick:()=>e(f.id),style:{borderRadius:te.lg,textAlign:"left",padding:`${Z.md}`},variant:"secondary",children:(0,zi.jsxs)(S,{flex:"row",gap:"sm",style:{alignItems:"center",width:"100%"},children:[(0,zi.jsx)(nn,{alt:f.name,client:t,height:z.lg,src:f.iconUri,width:z.lg,style:{borderRadius:te.full}}),(0,zi.jsx)(S,{flex:"column",gap:"3xs",style:{flex:1},children:(0,zi.jsx)(F,{color:"primaryText",size:"md",weight:500,children:f.name})}),(0,zi.jsxs)(S,{flex:"column",gap:"3xs",style:{alignItems:"flex-end"},children:[(0,zi.jsx)(F,{color:"primaryText",size:"sm",style:{fontWeight:500},children:xf(a||"USD",d.currencyAmount)}),(0,zi.jsxs)(F,{color:"secondaryText",size:"xs",children:[W5(Number(go(d.destinationAmount,d.destinationToken.decimals)),4)," ",d.destinationToken.symbol]})]})]})},f.id):null})})}Fe();ye();ve();St();$o();nt();Ye();var $n=T(L(),1);function PRn({paymentMethod:e,client:t,onPaymentMethodSelected:n,currency:r}){let o=$(),i=e.quote.originAmount,a=i?e.balance>=i:!1,s=e.originToken.prices[r||"USD"];return(0,$n.jsx)(ae,{disabled:!a,fullWidth:!0,onClick:()=>n(e),style:{backgroundColor:o.colors.tertiaryBg,borderRadius:te.lg,padding:`${Z.md} ${Z.md}`,textAlign:"left"},variant:"secondary",children:(0,$n.jsxs)(S,{flex:"row",gap:"md",style:{alignItems:"center",width:"100%"},children:[(0,$n.jsx)(AZ,{client:t,size:"lg",style:{maxWidth:"50%"},token:e.originToken}),(0,$n.jsxs)(S,{flex:"column",gap:"3xs",style:{alignItems:"flex-end",flex:1},children:[s&&(0,$n.jsx)(F,{color:"primaryText",size:"sm",style:{fontWeight:600,textWrap:"nowrap"},children:xf(r||"USD",Number(zo(e.balance,e.originToken.decimals))*s)}),(0,$n.jsx)(S,{flex:"row",gap:"3xs",children:(0,$n.jsxs)(F,{color:a?"success":"danger",size:"xs",children:[zo(e.balance,e.originToken.decimals)," ",e.originToken.symbol]})})]})]})},`${e.originToken.address}-${e.originToken.chainId}`)}function bMt({paymentMethods:e,paymentMethodsLoading:t,client:n,onPaymentMethodSelected:r,onBack:o,destinationToken:i,destinationAmount:a,feePayer:s,currency:l}){let c=$();return t?(0,$n.jsx)(S,{flex:"column",gap:"xs",pb:"lg",style:{maxHeight:"400px",overflowY:"auto",scrollbarWidth:"none"},children:new Array(10).fill(0).map((u,d)=>(0,$n.jsx)(S,{style:{backgroundColor:c.colors.tertiaryBg,borderRadius:te.lg,padding:`${Z.md} ${Z.md}`},children:(0,$n.jsxs)(S,{flex:"row",gap:"md",style:{alignItems:"center",width:"100%"},children:[(0,$n.jsxs)(S,{center:"y",flex:"row",gap:"sm",style:{maxWidth:"50%"},children:[(0,$n.jsx)("div",{style:{backgroundColor:c.colors.skeletonBg,borderRadius:"50%",height:"32px",width:"32px"}}),(0,$n.jsxs)(S,{flex:"column",gap:"3xs",children:[(0,$n.jsx)(Te,{height:"14px",width:"60px"}),(0,$n.jsx)(Te,{height:"12px",width:"40px"})]})]}),(0,$n.jsxs)(S,{flex:"column",gap:"3xs",style:{alignItems:"flex-end",flex:1},children:[(0,$n.jsx)(Te,{height:"16px",width:"80px"}),(0,$n.jsxs)(S,{flex:"row",gap:"3xs",children:[(0,$n.jsx)(Te,{height:"12px",width:"50px"}),(0,$n.jsx)(Te,{height:"12px",width:"40px"})]})]})]})},d))}):e.length===0?(0,$n.jsxs)(S,{center:"both",flex:"column",style:{minHeight:"250px"},children:[(0,$n.jsx)(F,{center:!0,color:"primaryText",size:"md",children:"No available tokens found for this wallet"}),(0,$n.jsx)(Q,{y:"sm"}),(0,$n.jsx)(F,{center:!0,color:"secondaryText",size:"sm",children:"Try connecting a different wallet or pay with card"}),(0,$n.jsx)(Q,{y:"lg"}),(0,$n.jsx)(ae,{onClick:o,variant:"primary",children:"Select another payment method"})]}):(0,$n.jsx)(S,{flex:"column",gap:"xs",pb:"lg",style:{maxHeight:"400px",overflowY:"auto",scrollbarWidth:"none"},children:e.filter(u=>u.type==="wallet").map(u=>(0,$n.jsx)(PRn,{client:n,destinationAmount:a,destinationToken:i,feePayer:s,onPaymentMethodSelected:r,paymentMethod:u,currency:l},`${u.originToken.address}-${u.originToken.chainId}`))})}Cn();Fe();ye();var BE=T(L(),1),AMt=e=>(0,BE.jsxs)("svg",{fill:"none",height:e.size,role:"presentation",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[(0,BE.jsx)("rect",{height:"14",rx:"2",width:"20",x:"2",y:"5"}),(0,BE.jsx)("line",{x1:"2",x2:"22",y1:"10",y2:"10"})]});ve();St();Ye();var Uo=T(L(),1);function xMt({connectedWallets:e,client:t,onWalletSelected:n,onFiatSelected:r,onConnectWallet:o,paymentMethods:i=["crypto","card"]}){let a=$();return(0,Uo.jsxs)(S,{flex:"column",gap:"xs",children:[i.includes("crypto")&&(0,Uo.jsxs)(Uo.Fragment,{children:[e.length>0&&(0,Uo.jsx)(S,{flex:"column",gap:"sm",children:e.map(s=>{let l=s.getAccount();return l?.address?(0,Uo.jsx)(ae,{fullWidth:!0,onClick:()=>n(s),style:{borderRadius:te.md,justifyContent:"space-between",padding:`${Z.md} ${Z.md}`},variant:"secondary",children:(0,Uo.jsx)(jE,{address:l?.address,client:t,iconSize:"lg",textSize:"sm"})},`${s.id}-${l.address}`):null})}),(0,Uo.jsx)(ae,{fullWidth:!0,onClick:o,style:{borderRadius:te.md,height:"auto",padding:`${Z.md} ${Z.md}`,textAlign:"left"},variant:"secondary",children:(0,Uo.jsxs)(S,{flex:"row",gap:"md",style:{alignItems:"center",width:"100%"},children:[(0,Uo.jsx)(S,{style:{alignItems:"center",border:`1px dashed ${a.colors.secondaryText}`,borderRadius:te.full,display:"flex",height:`${z.lg}px`,justifyContent:"center",width:`${z.lg}px`},children:(0,Uo.jsx)(NA,{color:a.colors.secondaryText,height:z["sm+"],width:z["sm+"]})}),(0,Uo.jsxs)(S,{flex:"column",gap:"3xs",style:{flex:1},children:[(0,Uo.jsx)(F,{color:"primaryText",size:"sm",children:"Connect a Wallet"}),(0,Uo.jsx)(F,{color:"secondaryText",size:"xs",children:"Pay with any web3 wallet"})]})]})})]}),i.includes("card")&&(0,Uo.jsx)(ae,{fullWidth:!0,onClick:r,style:{borderRadius:te.md,height:"auto",padding:`${Z.md} ${Z.md}`,textAlign:"left"},variant:"secondary",children:(0,Uo.jsxs)(S,{flex:"row",gap:"md",style:{alignItems:"center",width:"100%"},children:[(0,Uo.jsx)(AMt,{color:a.colors.secondaryText,size:z.lg}),(0,Uo.jsxs)(S,{flex:"column",gap:"3xs",style:{flex:1},children:[(0,Uo.jsx)(F,{color:"primaryText",size:"sm",children:"Pay with Card"}),(0,Uo.jsx)(F,{color:"secondaryText",size:"xs",children:"Onramp and pay in one step"})]})]})})]})}var kf=T(L(),1);function vMt({destinationToken:e,client:t,destinationAmount:n,receiverAddress:r,onPaymentMethodSelected:o,onError:i,onBack:a,connectOptions:s,connectLocale:l,paymentMethods:c,supportedTokens:u,feePayer:d,currency:f,country:m}){let h=Gl(),g=Mn(),w=c.length===1&&c[0]==="card"?{type:"fiatProviderSelection"}:{type:"walletSelection"},[b,A]=(0,vZ.useState)(w);le({queryFn:()=>(Ki({client:t,event:"payment_selection",toChainId:e.chainId,toToken:e.address}),!0),queryKey:["payment_selection"]});let x=b.type==="tokenSelection"?b.selectedWallet:g,{data:v,isLoading:C,error:M}=hMt({client:t,destinationAmount:n,destinationToken:e,payerWallet:x,supportedTokens:u});(0,vZ.useEffect)(()=>{M&&i(M)},[M,i]);let I=R=>{try{o(R)}catch(D){i(D)}},P=R=>{A({selectedWallet:R,type:"tokenSelection"})},E=async()=>{A({type:"walletConnection"})},O=()=>{A({type:"fiatProviderSelection"})},k=()=>{A({type:"walletSelection"})},N=R=>{if(!(r||x?.getAccount()?.address)){i(new Error("No recipient address available for fiat payment"));return}I({currency:f||"USD",onramp:R,payerWallet:x,type:"fiat"})},j=()=>{switch(b.type){case"walletSelection":return"Choose Payment Method";case"tokenSelection":return"Select Token";case"fiatProviderSelection":return"Select Payment Provider";case"walletConnection":return"Connect Wallet"}},H=()=>{if(c.length===1&&c[0]==="card")return a;switch(b.type){case"walletSelection":return a;case"tokenSelection":case"fiatProviderSelection":case"walletConnection":return k}};if(b.type==="walletConnection"){let R=e?vt(e.chainId):void 0,D=R?[R,...s?.chains||[]]:s?.chains;return(0,kf.jsx)(SV,{accountAbstraction:s?.accountAbstraction,appMetadata:s?.appMetadata,chain:R||s?.chain,chains:D,client:t,connectLocale:l,hiddenWallets:[],isEmbed:!1,onBack:k,onSelect:P,recommendedWallets:s?.recommendedWallets,showAllWallets:s?.showAllWallets===void 0?!0:s?.showAllWallets,walletConnect:s?.walletConnect,wallets:s?.wallets?.filter(U=>U.id!=="inApp")})}return(0,kf.jsxs)(S,{flex:"column",px:"md",pt:"md+",children:[(0,kf.jsx)(be,{onBack:H(),title:j()}),(0,kf.jsx)(Q,{y:"lg"}),(0,kf.jsxs)(S,{flex:"column",style:{minHeight:"300px"},children:[b.type==="walletSelection"&&(0,kf.jsx)(xMt,{client:t,connectedWallets:h,onConnectWallet:E,onFiatSelected:O,onWalletSelected:P,paymentMethods:c}),b.type==="tokenSelection"&&(0,kf.jsx)(bMt,{client:t,destinationAmount:Er(n,e.decimals),destinationToken:e,feePayer:d,onBack:k,onPaymentMethodSelected:I,paymentMethods:v,paymentMethodsLoading:C,currency:f}),b.type==="fiatProviderSelection"&&(0,kf.jsx)(wMt,{country:m,client:t,onProviderSelected:N,toAddress:r||x?.getAccount()?.address||"",toAmount:n,toChainId:e.chainId,toTokenAddress:e.address,currency:f})]})]})}Cn();tt();var TMt=T(_(),1);Fe();ye();ve();St();nt();Ye();Cn();tt();var CMt=T(_(),1);qe();zt();q4();Fe();ye();ve();$o();nt();Ye();var yn=T(L(),1);function NRn(e,t){return e.type==="onramp"?e.id:t.transactions[t.transactions.length-1]?.transactionHash}function DRn(e,t){return le({enabled:!0,queryFn:async()=>{if(e.type==="onramp"&&t.type==="onramp")return{amountPaid:`${t.currencyAmount} ${t.currency}`,amountReceived:`${zo(t.destinationAmount,t.destinationToken.decimals)} ${t.destinationToken.symbol}`,chain:await uo(vt(t.destinationToken.chainId)),destinationToken:t.destinationToken,id:t.id,label:"Onramp Payment",type:"paymentId"};if((e.type==="buy"||e.type==="sell"||e.type==="transfer")&&e.transactions.length>0){let r=e.transactions[e.transactions.length-1];if(r){let[o,i]=await Promise.all([uo(We(e.destinationToken.chainId)),uo(We(e.originToken.chainId))]);return{amountPaid:`${zo(e.originAmount,e.originToken.decimals)} ${e.originToken.symbol}`,amountReceived:`${zo(e.destinationAmount,e.destinationToken.decimals)} ${e.destinationToken.symbol}`,chain:o,destinationChain:o,destinationToken:e.destinationToken,id:r.transactionHash,label:"Transaction",originChain:i,originToken:e.originToken,type:"transactionHash"}}}return null},queryKey:["transaction-info",e.type,NRn(t,e)],staleTime:5*60*1e3})}function LRn({status:e,preparedQuote:t,windowAdapter:n,onCopyToClipboard:r}){let o=$(),{data:i,isLoading:a}=DRn(e,t);return a?(0,yn.jsxs)(S,{flex:"column",gap:"sm",style:{backgroundColor:o.colors.tertiaryBg,border:`1px solid ${o.colors.borderColor}`,borderRadius:te.sm,padding:Z.md},children:[(0,yn.jsx)(Te,{height:"30px"}),(0,yn.jsx)(Te,{height:"30px"}),(0,yn.jsx)(Te,{height:"30px"})]}):i?(0,yn.jsxs)(S,{flex:"column",gap:"sm",style:{backgroundColor:o.colors.tertiaryBg,border:`1px solid ${o.colors.borderColor}`,borderRadius:te.sm,padding:Z.md},children:[(0,yn.jsxs)(S,{flex:"row",gap:"sm",style:{alignItems:"center",justifyContent:"space-between"},children:[(0,yn.jsx)(F,{color:"primaryText",size:"sm",children:i.label}),(0,yn.jsx)(S,{style:{backgroundColor:o.colors.success,borderRadius:te.sm,padding:`${Z["3xs"]} ${Z.xs}`},children:(0,yn.jsx)(F,{size:"xs",style:{color:o.colors.primaryButtonText},children:"COMPLETED"})})]}),i.amountPaid&&(0,yn.jsxs)(S,{center:"y",flex:"row",style:{justifyContent:"space-between"},children:[(0,yn.jsx)(F,{color:"secondaryText",size:"sm",children:"Amount Paid"}),(0,yn.jsx)(F,{color:"primaryText",size:"sm",children:i.amountPaid})]}),i.originChain&&(0,yn.jsxs)(S,{center:"y",flex:"row",style:{justifyContent:"space-between"},children:[(0,yn.jsx)(F,{color:"secondaryText",size:"sm",children:"Origin Chain"}),(0,yn.jsx)(F,{color:"primaryText",size:"sm",children:bZ(i.originChain.name)})]}),i.amountReceived&&(0,yn.jsxs)(S,{center:"y",flex:"row",style:{justifyContent:"space-between"},children:[(0,yn.jsx)(F,{color:"secondaryText",size:"sm",children:"Amount Received"}),(0,yn.jsx)(F,{color:"primaryText",size:"sm",children:i.amountReceived})]}),(0,yn.jsxs)(S,{center:"y",flex:"row",style:{justifyContent:"space-between"},children:[(0,yn.jsx)(F,{color:"secondaryText",size:"sm",children:"Chain"}),(0,yn.jsx)(F,{color:"primaryText",size:"sm",children:bZ(i.chain.name)})]}),(0,yn.jsxs)(S,{center:"y",flex:"row",style:{justifyContent:"space-between"},children:[(0,yn.jsx)(F,{color:"secondaryText",size:"sm",children:i.type==="paymentId"?"Payment ID":"Transaction Hash"}),(0,yn.jsxs)(S,{flex:"row",gap:"sm",style:{alignItems:"center"},children:[(0,yn.jsx)(F,{color:"accentText",onClick:i.type==="paymentId"?()=>r(i.id):()=>{let s=i.chain.explorers?.[0];s&&n.open(Dj(s.url,i.id))},size:"sm",style:{cursor:"pointer",fontFamily:"monospace"},children:Q6(i.id)}),i.type==="paymentId"?(0,yn.jsx)("button",{onClick:()=>r(i.id),style:{background:"none",border:"none",cursor:"pointer",padding:0},type:"button",children:(0,yn.jsx)(EA,{color:o.colors.primaryText,height:z.sm,width:z.sm})}):null]})]})]},i.id):null}function IMt({preparedQuote:e,completedStatuses:t,onBack:n,windowAdapter:r}){let o=(0,CMt.useCallback)(async i=>{try{await navigator.clipboard.writeText(i)}catch(a){console.warn("Failed to copy to clipboard:",a)}},[]);return(0,yn.jsxs)(S,{flex:"column",fullHeight:!0,p:"md",style:{maxHeight:"500px",minHeight:"250px",overflowY:"auto"},children:[(0,yn.jsx)(be,{onBack:n,title:"Payment Receipt"}),(0,yn.jsx)(Q,{y:"lg"}),(0,yn.jsx)(S,{flex:"column",gap:"lg",children:(0,yn.jsx)(S,{flex:"column",gap:"md",children:t.map((i,a)=>(0,yn.jsx)(LRn,{onCopyToClipboard:o,preparedQuote:e,status:i,windowAdapter:r},`${i.type}-${a}`))})})]})}var Na=T(L(),1);function CZ({preparedQuote:e,completedStatuses:t,onDone:n,windowAdapter:r,client:o,hasPaymentId:i=!1,showContinueWithTx:a}){let s=$(),[l,c]=(0,TMt.useState)("success");return le({queryFn:()=>{(e.type==="buy"||e.type==="sell")&&Ki({chainId:e.intent.originChainId,client:o,event:"ub:ui:success_screen",fromToken:e.intent.originTokenAddress,toChainId:e.intent.destinationChainId,toToken:e.intent.destinationTokenAddress})},queryKey:["success_screen",e.type]}),l==="detail"?(0,Na.jsx)(IMt,{completedStatuses:t,onBack:()=>c("success"),preparedQuote:e,windowAdapter:r}):(0,Na.jsxs)(S,{flex:"column",fullHeight:!0,px:"md",pb:"md",pt:"md+",children:[(0,Na.jsx)(be,{title:"Payment Complete"}),(0,Na.jsx)(Q,{y:"xxl"}),(0,Na.jsxs)(S,{center:"x",flex:"column",gap:"md",children:[(0,Na.jsx)(S,{center:"both",flex:"row",style:{animation:"successBounce 0.6s ease-out",border:`2px solid ${s.colors.success}`,borderRadius:"50%",height:"64px",marginBottom:"16px",width:"64px"},children:(0,Na.jsx)(ad,{color:s.colors.success,height:z.xl,style:{animation:"checkAppear 0.3s ease-out 0.3s both"},width:z.xl})}),(0,Na.jsxs)("div",{children:[(0,Na.jsx)(F,{center:!0,color:"primaryText",size:"xl",weight:600,trackingTight:!0,style:{marginBottom:Z.xxs},children:"Payment Successful!"}),(0,Na.jsx)(F,{center:!0,color:"secondaryText",size:"sm",children:i?"You can now close this page and return to the application.":a?"Click continue to execute your transaction.":"Your payment has been completed successfully."})]})]}),(0,Na.jsx)(Q,{y:"xxl"}),(0,Na.jsxs)(S,{flex:"column",gap:"sm",style:{width:"100%"},children:[(0,Na.jsx)(ae,{fullWidth:!0,onClick:()=>c("detail"),variant:"secondary",children:"View Payment Receipt"}),!i&&(0,Na.jsx)(ae,{fullWidth:!0,onClick:n,variant:"accent",children:a?"Continue":"Done"})]}),(0,Na.jsx)("style",{children:`
|
|
468
|
+
`,qPn=Zt(Hxt)(e=>{let t=$();return{animation:`${QPn} 200ms cubic-bezier(0.16, 1, 0.3, 1)`,background:t.colors.tooltipBg,borderRadius:te.sm,boxShadow:Ej.sm,color:t.colors.tooltipText,fontSize:oe.sm,lineHeight:1.5,maxWidth:"300px",padding:`${Z.xs} ${Z.sm}`,userSelect:"none",willChange:"transform, opacity",zIndex:999999999999999}}),GPn=Zt(Wxt)(()=>({fill:$().colors.tooltipBg}));var Cy=T(L(),1),Nx=e=>{let{hasCopied:t,onCopy:n}=rV(e.text),r=e.hasCopied||t;return(0,Cy.jsx)("div",{onClick:n,onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&n()},style:{alignItems:"center",display:"flex",justifyContent:"center"},children:(0,Cy.jsx)(vy,{align:e.align,side:e.side,tip:e.tip,children:(0,Cy.jsx)("div",{children:(0,Cy.jsx)(S,{center:"both",color:r?"success":void 0,flex:"row",children:r?(0,Cy.jsx)(ad,{className:"tw-check-icon",width:e.iconSize||16,height:e.iconSize||16}):(0,Cy.jsx)(EA,{className:"tw-copy-icon",width:e.iconSize||16,height:e.iconSize||16})})})})})};var Sd="data:image/svg+xml;charset=UTF-8,%3csvg width='15' height='14' viewBox='0 0 15 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M7 8.04238e-07C5.1435 8.04238e-07 3.36301 0.737501 2.05025 2.05025C0.7375 3.36301 0 5.1435 0 7C0 7.225 -1.52737e-07 7.445 0.0349998 7.665C0.16385 9.0151 0.68213 10.2988 1.52686 11.3598C2.37158 12.4209 3.50637 13.2137 4.79326 13.642C6.0801 14.0702 7.4637 14.1153 8.7758 13.7719C10.0879 13.4285 11.2719 12.7113 12.184 11.7075C13.0961 10.7038 13.6969 9.4567 13.9135 8.1178C14.1301 6.7789 13.9531 5.406 13.4039 4.16587C12.8548 2.92574 11.9573 1.87184 10.8204 1.13228C9.6835 0.392721 8.3563 -0.000649196 7 8.04238e-07ZM7 1C8.581 1.00137 10.0975 1.62668 11.22 2.74V3.24C9.2438 2.55991 7.0956 2.56872 5.125 3.265C4.96758 3.1116 4.76997 3.00586 4.555 2.96H4.43C4.37 2.75 4.315 2.54 4.27 2.325C4.225 2.11 4.2 1.92 4.175 1.715C5.043 1.24658 6.0137 1.00091 7 1ZM5.5 3.935C7.3158 3.32693 9.2838 3.34984 11.085 4C10.8414 5.2703 10.3094 6.4677 9.53 7.5C9.312 7.4077 9.0707 7.3855 8.8395 7.4366C8.6083 7.4877 8.3988 7.6094 8.24 7.785C8.065 7.685 7.89 7.585 7.74 7.47C6.7307 6.7966 5.8877 5.9023 5.275 4.855C5.374 4.73221 5.4461 4.58996 5.4866 4.43749C5.5271 4.28502 5.5351 4.12575 5.51 3.97L5.5 3.935ZM3.5 2.135C3.5 2.24 3.53 2.35 3.55 2.455C3.595 2.675 3.655 2.89 3.715 3.105C3.52353 3.21838 3.36943 3.38531 3.2717 3.58522C3.17397 3.78513 3.13688 4.00927 3.165 4.23C2.37575 4.7454 1.67078 5.3795 1.075 6.11C1.19455 5.3189 1.47112 4.55966 1.88843 3.87701C2.30575 3.19437 2.85539 2.60208 3.505 2.135H3.5ZM3.5 9.99C3.30481 10.0555 3.13037 10.1714 2.9943 10.3259C2.85822 10.4804 2.76533 10.6681 2.725 10.87H2.405C1.59754 9.9069 1.1146 8.7136 1.025 7.46L1.08 7.365C1.70611 6.3942 2.52463 5.562 3.485 4.92C3.62899 5.0704 3.81094 5.179 4.01162 5.2345C4.2123 5.2899 4.42423 5.2901 4.625 5.235C5.2938 6.3652 6.208 7.3306 7.3 8.06C7.505 8.195 7.715 8.32 7.925 8.44C7.9082 8.6312 7.9391 8.8237 8.015 9C7.1 9.7266 6.0445 10.256 4.915 10.555C4.78401 10.3103 4.57028 10.1201 4.31199 10.0184C4.05369 9.9167 3.76766 9.9102 3.505 10L3.5 9.99ZM7 12.99C5.9831 12.9903 4.98307 12.7304 4.095 12.235L4.235 12.205C4.43397 12.1397 4.61176 12.0222 4.74984 11.8648C4.88792 11.7074 4.98122 11.5158 5.02 11.31C6.2985 10.984 7.4921 10.3872 8.52 9.56C8.7642 9.7027 9.0525 9.75 9.3295 9.6927C9.6064 9.6355 9.8524 9.4778 10.02 9.25C10.7254 9.4334 11.4511 9.5275 12.18 9.53H12.445C11.9626 10.5673 11.1938 11.4451 10.2291 12.0599C9.2643 12.6747 8.144 13.0009 7 13V12.99ZM10.255 8.54C10.2545 8.3304 10.1975 8.1249 10.09 7.945C10.9221 6.8581 11.5012 5.5991 11.785 4.26C12.035 4.37667 12.2817 4.50667 12.525 4.65C13.0749 5.9495 13.1493 7.4012 12.735 8.75C11.9049 8.8142 11.0698 8.7484 10.26 8.555L10.255 8.54Z' fill='%23646D7A'/%3e%3c/svg%3e";Fe();var Vxt=T(L(),1),Fxt=e=>{let t=$();return(0,Vxt.jsx)("div",{style:{alignItems:"center",border:`1px solid ${t.colors.borderColor}`,borderRadius:"100%",display:"flex",flexShrink:0,justifyItems:"center",overflow:"hidden",padding:e.padding??"6px",position:"relative",...e.style},children:e.children})};$o();nt();_o();Ye();md();h5();Bn();var Zxt=T(L(),1);function Jk({formatFn:e,...t}){let{address:n}=mf(),r=e?e(n):n;return(0,Zxt.jsx)("span",{...t,children:r})}tt();Myt();kW();zW();qae();var Qxt=T(L(),1);function _k({socialType:e,resolverAddress:t,resolverChain:n,loadingComponent:r,fallbackComponent:o,queryOptions:i,...a}){let{address:s,client:l}=mf(),c=le({queryFn:async()=>{let[u,d]=await Promise.all([KA({address:s,client:l}),UA({address:s||"",client:l,resolverAddress:t,resolverChain:n})]),f=u?.filter(g=>g.avatar&&(e?g.type===e:!0))[0]?.avatar,[m,h]=await Promise.all([f?CW({client:l,uri:f}):void 0,d?Syt({client:l,name:d}):void 0]);if(!m&&!h)throw new Error("Failed to resolve social + ens avatar");if(m)return m;if(h)return h;throw new Error("Failed to resolve social + ens avatar")},queryKey:["account-avatar",s,{socialType:e},{resolverAddress:t,resolverChain:n}],retry:!1,...i});return c.isLoading?r||null:c.data?(0,Qxt.jsx)("img",{src:c.data,...a,alt:a.alt}):o||null}tt();zt();var yV=T(L(),1);function Iy({chain:e,tokenAddress:t,loadingComponent:n,fallbackComponent:r,queryOptions:o,formatFn:i,showBalanceInFiat:a,...s}){let{address:l,client:c}=mf(),u=cr(),d=e||u,f=le({queryFn:async()=>lAt({address:ge(l),chain:d,client:c,showBalanceInFiat:a,tokenAddress:t?ge(t):void 0}),queryKey:["internal_account_balance",d?.id||-1,l,{tokenAddress:t},a],retry:!1,...o});return f.isLoading?n||null:f.data?i?(0,yV.jsx)("span",{...s,children:i(f.data)}):a?(0,yV.jsx)("span",{...s,children:Vk({...f.data,decimals:0})}):(0,yV.jsx)("span",{...s,children:Ix({...f.data,decimals:f.data.balance<1?3:2})}):r||null}Age();var wV=T(_(),1);var qxt=T(L(),1);function bV(e){let t=(0,wV.useId)(),n=(0,wV.useMemo)(()=>Qle[Number(bge(e.address.slice(2,4)))%Qle.length],[e.address]);return(0,qxt.jsx)("div",{className:e.className,id:t,style:{...e.style,backgroundImage:`radial-gradient(ellipse at left bottom, ${n[0]}, ${n[1]})`,...e.size?{height:`${e.size}px`,width:`${e.size}px`}:void 0}})}var Gxt=T(L(),1);function Ty(e){let{address:t}=mf();return(0,Gxt.jsx)(bV,{...e,address:t})}tt();kW();zW();var Yxt=T(L(),1);function $k({resolverAddress:e,resolverChain:t,socialType:n,formatFn:r,queryOptions:o,loadingComponent:i,fallbackComponent:a,...s}){let{address:l,client:c}=mf(),u=le({queryFn:async()=>{let[d,f]=await Promise.all([KA({address:l,client:c}),UA({address:l,client:c,resolverAddress:e,resolverChain:t})]),m=d?.filter(h=>h.name&&(n?h.type===n:!0))[0]?.name||f;if(!m)throw new Error("Failed to resolve account name");return r?r(m):m},queryKey:["account-name",l,{socialType:n},{resolverAddress:e,resolverChain:t}],retry:!1,...o});return u.isLoading?i||null:u.data?(0,Yxt.jsx)("span",{...s,children:u.data}):a||null}tt();qe();$8();var lce=new Map;function AV(e){if(lce.has(e))return lce.get(e);let t=kp();return lce.set(e,t),t}Lm();var xV=T(_(),1),Xxt=T(L(),1),Kxt=(0,xV.createContext)(void 0);function vV(e){return(0,Xxt.jsx)(Kxt.Provider,{value:e,children:e.children})}function CV(){let e=(0,xV.useContext)(Kxt);if(!e)throw new Error("ChainProviderContext not found. Make sure you are using ChainName, ChainIcon, etc. inside a <ChainProvider /> component");return e}var Jxt=T(L(),1);function IV({iconResolver:e,loadingComponent:t,fallbackComponent:n,queryOptions:r,client:o,...i}){let{chain:a}=CV(),s=le({queryFn:async()=>YPn({chain:a,client:o,iconResolver:e}),queryKey:KPn({chainId:a.id,iconResolver:e}),...r});return s.isLoading?t||null:s.data?(0,Jxt.jsx)("img",{src:s.data,...i,alt:i.alt}):n||null}async function YPn(e){let{chain:t,client:n,iconResolver:r}=e;if(typeof r=="string")return r;if(typeof r=="function")return r();if(t.icon?.url)return ca({client:n,uri:t.icon.url});let o=await uo(t).then(i=>i.icon?.url).catch(()=>{});if(!o)throw new Error("Failed to resolve icon for chain");return ca({client:n,uri:o})}function KPn(e){let{chainId:t,iconResolver:n}=e;return["_internal_chain_icon_",t,{resolver:typeof n=="string"?n:typeof n=="function"?AV(n):void 0}]}tt();qe();var _xt=T(L(),1);function eE({nameResolver:e,formatFn:t,loadingComponent:n,fallbackComponent:r,queryOptions:o,...i}){let{chain:a}=CV(),s=le({queryFn:async()=>XPn({chain:a,nameResolver:e}),queryKey:JPn({chainId:a.id,nameResolver:e}),...o});if(s.isLoading)return n||null;if(!s.data)return r||null;let l=t?t(s.data):s.data;return(0,_xt.jsx)("span",{...i,children:l})}async function XPn(e){let{nameResolver:t,chain:n}=e;return typeof t=="string"?t:typeof t=="function"?t():n.name?n.name:uo(n).then(r=>r.name)}function JPn(e){return typeof e.nameResolver=="function"?["_internal_chain_name_",e.chainId,{resolver:AV(e.nameResolver)}]:["_internal_chain_name_",e.chainId]}M1();var Sy=T(L(),1),Z5=e=>(0,Sy.jsxs)("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[(0,Sy.jsx)("path",{d:"M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),(0,Sy.jsx)("path",{d:"M18.0901 10.37C19.0354 10.7224 19.8766 11.3075 20.5358 12.0712C21.1951 12.8349 21.6512 13.7524 21.8618 14.7391C22.0725 15.7257 22.031 16.7495 21.7411 17.7158C21.4513 18.6822 20.9224 19.5598 20.2035 20.2676C19.4846 20.9754 18.5988 21.4905 17.6281 21.7652C16.6573 22.04 15.633 22.0655 14.6498 21.8395C13.6666 21.6134 12.7562 21.1431 12.0029 20.472C11.2496 19.8009 10.6777 18.9507 10.3401 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),(0,Sy.jsx)("path",{d:"M7 6H8V10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),(0,Sy.jsx)("path",{d:"M16.7101 13.88L17.4101 14.59L14.5901 17.41",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})]});var Dx=T(L(),1),$xt=({size:e})=>(0,Dx.jsxs)("svg",{fill:"none",height:e,role:"presentation",viewBox:"0 0 16 16",width:e,xmlns:"http://www.w3.org/2000/svg",children:[(0,Dx.jsx)("path",{d:"M14.001 8.00048C14.001 9.18726 13.649 10.3474 12.9897 11.3342C12.3304 12.3209 11.3932 13.09 10.2968 13.5442C9.20032 13.9984 7.99382 14.1172 6.82984 13.8857C5.66587 13.6541 4.59668 13.0826 3.7575 12.2435C2.91832 11.4043 2.34683 10.3351 2.1153 9.17111C1.88377 8.00713 2.0026 6.80064 2.45676 5.70419C2.91092 4.60775 3.68002 3.6706 4.66679 3.01126C5.65357 2.35192 6.8137 2 8.00048 2",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.2001"}),(0,Dx.jsx)("path",{d:"M14.0005 2L8 8.00048",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.2001"}),(0,Dx.jsx)("path",{d:"M10.3984 2H13.9987V5.60029",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.2001"})]});JA();Fe();ye();Bn();var Xs=Ia(e=>{let t=$();return{all:"unset","&:hover":{backgroundColor:t.colors.tertiaryBg,svg:{color:t.colors.accentText}},"&[data-variant='danger']:hover svg":{color:`${t.colors.danger}!important`},"&[data-variant='primary']:hover svg":{color:`${t.colors.primaryText}!important`},"&[disabled]":{cursor:"not-allowed"},alignItems:"center",backgroundColor:"transparent",borderRadius:te.md,boxSizing:"border-box",color:t.colors.secondaryText,cursor:"pointer",display:"flex",fontSize:oe.md,fontWeight:500,gap:Z.sm,lineHeight:1.3,padding:`${Z.sm} ${Z.sm}`,svg:{color:t.colors.secondaryText,transition:"color 200ms ease"},transition:"background-color 200ms ease, transform 200ms ease",WebkitTapHighlightColor:"transparent",width:"100%"}}),evt=Xs.withComponent("a");uf();qc();Cn();ele();var gi=T(_(),1);qe();Fe();ye();ve();St();M5();DA();$o();nt();_o();Ye();Bn();Ok();tle();var je=T(L(),1);function TV(e){let t=e.connectLocale.networkSelector,[n,r]=(0,gi.useState)(""),[o,i]=(0,gi.useState)("all"),a=P5(n,300),{onSwitch:s,onCustomClick:l}=e.networkSelector||{},c=t.categoryLabel.others,u=t.categoryLabel.popular,d=t.categoryLabel.recentlyUsed,{chainSections:f,allChains:m,allChainsToSectionMap:h}=(0,gi.useMemo)(()=>{let I=[],P=[],E=new Map;function O(N,j){E.set(N.id,j),P.push(N)}if(e.networkSelector?.sections)for(let N of e.networkSelector.sections){let j=N.chains.filter(H=>!E.has(H.id));if(j.length>0){I.push({chains:j,label:N.label});for(let H of j)O(H,N.label)}}else{let N=new Map(e.chains.map(j=>[j.id,j]));if(e.networkSelector?.recentChainIds&&e.networkSelector?.recentChainIds.length>0){let j=e.networkSelector.recentChainIds.map(H=>N.get(H)).filter(H=>H!==void 0);I.push({chains:j,label:d});for(let H of j)O(H,d)}if(e.networkSelector?.popularChainIds&&e.networkSelector.popularChainIds.length>0){let H=e.networkSelector.popularChainIds.map(R=>N.get(R)).filter(R=>R!==void 0).filter(R=>!E.has(R.id));if(H.length>0){I.push({chains:H,label:u});for(let R of H)O(R,u)}}}let k=e.chains.filter(N=>!E.has(N.id));if(k.length>0){I.push({chains:k,label:c});for(let N of k)O(N,c)}return{allChains:P,allChainsToSectionMap:E,chainSections:I}},[e.networkSelector?.sections,e.networkSelector?.recentChainIds,e.networkSelector?.popularChainIds,e.chains,d,u,c]),g=m.every(I=>!!I.name),w=$F(g?[]:m,10),b=g?!1:w.some(I=>I.isLoading),A=g?m:b?[]:w.filter(I=>!!I.data).map(I=>v9(I.data)),x=(0,gi.useMemo)(()=>new R1(A,{keys:[{name:"name",weight:1},{name:"chainId",weight:1}],threshold:.4}),[A]),v=(0,gi.useMemo)(()=>{if(a==="")return;let I=[],P=x.search(a).map(E=>E.item);for(let E of P){let O=h.get(E.id);if(!O)return;let k=I.find(N=>N.label===O);k?k.chains.push(E):I.push({chains:[E],label:O})}return I},[a,x,h])||f,C=(0,gi.useMemo)(()=>o==="all"?v:v.map(I=>({chains:I.chains.filter(P=>o==="mainnet"&&!P.testnet||o==="testnet"&&P.testnet),label:I.label})),[v,o]),M=(0,gi.useCallback)(I=>{s&&s(I),e.closeModal()},[s,e]);return(0,je.jsxs)(S,{className:e.className,children:[(0,je.jsx)(S,{p:"lg",children:e.onBack?(0,je.jsx)(be,{onBack:e.onBack,title:t.title}):(0,je.jsx)(tf,{children:t.title})}),e.showTabs!==!1&&(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(S,{px:"lg",children:(0,je.jsxs)(S,{flex:"row",gap:"xxs",children:[(0,je.jsx)(cce,{"data-active":o==="all",onClick:()=>i("all"),children:t.allNetworks}),(0,je.jsx)(cce,{"data-active":o==="mainnet",onClick:()=>i("mainnet"),children:t.mainnets}),(0,je.jsx)(cce,{"data-active":o==="testnet",onClick:()=>i("testnet"),children:t.testnets})]})}),(0,je.jsx)(Q,{y:"lg"})]}),e.showTabs===!1&&(0,je.jsx)(Q,{y:"xxs"}),(0,je.jsx)(S,{px:"lg",children:(0,je.jsxs)("div",{style:{alignItems:"center",display:"flex",position:"relative"},children:[(0,je.jsx)(rNn,{height:z.md,width:z.md}),(0,je.jsx)(Ys,{disabled:b,onChange:I=>{r(I.target.value)},placeholder:b?"Loading chains...":t.inputPlaceholder,style:{padding:`${Z.sm} ${Z.md} ${Z.sm} ${Z.xxl}`},tabIndex:-1,value:n,variant:"outline"}),(a!==n||b)&&(0,je.jsx)("div",{style:{position:"absolute",right:Z.md},children:(0,je.jsx)(wt,{color:"accentText",size:"md"})})]})}),(0,je.jsx)(Q,{y:"lg"}),(0,je.jsx)(S,{px:"md",children:(0,je.jsx)(_Pn,{chainSections:C,client:e.client,close:e.closeModal,connectLocale:e.connectLocale,onSwitch:M,renderChain:e.networkSelector?.renderChain})}),l&&(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(Wt,{}),(0,je.jsx)(S,{p:"lg",children:(0,je.jsx)(ae,{fullWidth:!0,onClick:()=>{l(),e.closeModal()},style:{boxShadow:"none",display:"flex",fontSize:oe.sm},variant:"link",children:t.addCustomNetwork})})]})]})}var _Pn=e=>{let{chainSections:t}=e,n=t.every(r=>r.chains.length===0);return(0,je.jsx)(S,{animate:"fadein",scrollY:!0,style:{height:"330px",paddingBottom:Z.lg},children:n?(0,je.jsxs)(S,{center:"both",color:"secondaryText",flex:"column",gap:"md",children:[(0,je.jsx)(Q,{y:"xl"}),(0,je.jsx)(Qs,{height:z.xl,width:z.xl}),(0,je.jsx)(F,{children:" No Results "})]}):t.map((r,o)=>r.chains.length===0?null:(0,je.jsxs)(gi.Fragment,{children:[o!==0&&(0,je.jsx)(Q,{y:"lg"}),(0,je.jsx)(eNn,{children:r.label}),(0,je.jsx)(Q,{y:"xs"}),(0,je.jsx)($Pn,{chains:r.chains,client:e.client,close:e.close,connectLocale:e.connectLocale,onSwitch:e.onSwitch,renderChain:e.renderChain})]},r.label))})},$Pn=(0,gi.memo)(function(t){let{itemsToShow:n,lastItemRef:r}=SF(10,10),o=eV(),i=cr(),[a,s]=(0,gi.useState)(-1),[l,c]=(0,gi.useState)(-1),u=t.close;(0,gi.useEffect)(()=>{a!==-1&&i?.id===a&&u&&u()},[a,u,i?.id]);let d=async h=>{c(-1),s(h.id);try{await o(h),t.onSwitch(h)}catch(g){c(h.id),console.error(g)}finally{s(-1)}},f=t.renderChain,m=t.chains.slice(0,n);return(0,je.jsx)(tNn,{children:m.map((h,g)=>{if(!h)return null;let w=a===h.id,b=l===h.id,A=g===m.length-1;return(0,je.jsx)("li",{ref:A?r:void 0,children:f?(0,je.jsx)(f,{chain:h,close:t.close,switchChain:()=>{d(h)},switchFailed:l===h.id,switching:a===h.id}):(0,je.jsx)(uce,{chain:h,client:t.client,confirming:w,connectLocale:t.connectLocale,onClick:()=>d(h),switchingFailed:b})},h.id)})})}),uce=(0,gi.memo)(function(t){let n=t.connectLocale,{chain:r,confirming:o,switchingFailed:i}=t,a=cr();return(0,je.jsx)(vV,{chain:r,children:(0,je.jsxs)(nNn,{"data-active":a?.id===r.id,onClick:t.onClick,children:[(0,je.jsxs)(S,{style:{alignItems:"center",display:"flex",flexShrink:0,position:"relative"},children:[(0,je.jsx)(IV,{client:t.client,fallbackComponent:(0,je.jsx)("img",{alt:"",src:Sd,style:{height:`${z.lg}px`,width:`${z.lg}px`}}),loading:"lazy",loadingComponent:(0,je.jsx)(Te,{height:`${z.lg}px`,width:`${z.lg}px`}),style:{height:`${z.lg}px`,width:`${z.lg}px`}}),a?.id===r.id&&(0,je.jsx)(Tx,{className:"tw-chain-active-dot-button-network-selector"})]}),o||i?(0,je.jsxs)(S,{flex:"column",gap:"3xs",style:{alignItems:"flex-start",width:"100%"},children:[(0,je.jsx)(eE,{loadingComponent:(0,je.jsx)(Te,{height:"20px",width:"150px"})}),(0,je.jsxs)(S,{animate:"fadein",center:"y",flex:"row",gap:"xxs",children:[o&&(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(F,{color:"accentText",size:"xs",children:n.switchingNetwork}),(0,je.jsx)(wt,{color:"accentText",size:"xs"})]}),i&&(0,je.jsx)(S,{animate:"fadein",children:(0,je.jsx)(F,{color:"danger",size:"xs",children:n.networkSelector.failedToSwitch})})]})]}):(0,je.jsx)(eE,{className:"tw-chain-icon-none-confirming",loadingComponent:(0,je.jsx)(Te,{height:"20px",width:"150px"})})]})})}),cce=Zt.button(e=>{let t=$();return{all:"unset","&[data-active='true']":{background:t.colors.secondaryButtonBg,color:t.colors.primaryText},borderRadius:te.lg,color:t.colors.secondaryText,cursor:"pointer",fontSize:oe.sm,fontWeight:500,padding:`${Z.sm} ${Z.sm}`,transition:"background 0.2s ease, color 0.2s ease",WebkitTapHighlightColor:"transparent"}}),eNn=V4t(()=>({color:$().colors.secondaryText,display:"block",fontSize:oe.sm,margin:0,padding:`0 ${Z.xs}`})),tNn=dW({boxSizing:"border-box",display:"flex",flexDirection:"column",gap:Z.xs,listStyle:"none",margin:0,padding:0}),nNn=Ia(e=>{let t=$();return{"&:hover":{background:t.colors.secondaryButtonBg},all:"unset",alignItems:"center",borderRadius:te.md,boxSizing:"border-box",color:t.colors.primaryText,cursor:"pointer",display:"flex",fontSize:oe.md,fontWeight:500,gap:Z.md,padding:`${Z.xs} ${Z.sm}`,transition:"background 0.2s ease",width:"100%",[Fw.mobile]:{fontSize:oe.sm}}}),rNn=Zt(PA)(e=>({color:$().colors.secondaryText,left:Z.sm,position:"absolute"}));Cn();var nvt=T(_(),1);zt();Fe();ye();mk();ls();ve();St();$o();nt();Ye();md();Ik();Go();function W0(e,t=!0,n=5){return W5(Number(e.displayValue),n)+(t?` ${e.symbol}`:"")}function zo(e,t,n=5){return W5(Number.parseFloat(go(e,t)),n).toString()}function xf(e,t){return oNn(t,"en-US",e)}function oNn(e,t,n){return new Intl.NumberFormat(t,{style:"currency",currency:n,maximumFractionDigits:5,minimumFractionDigits:0}).format(e)}ZM();uf();var tvt=T(L(),1);function SV(e){let t=cr(),n=Gl(),r=e.wallets||f5({appMetadata:e.appMetadata,chains:e.chains}).filter(i=>i.id!=="inApp"),o=nx({size:"compact",wallets:r,welcomeScreen:void 0});return(0,tvt.jsx)(NF,{accountAbstraction:e.accountAbstraction,auth:void 0,chain:e.chain||t,chains:e.chains,client:e.client,connectLocale:e.connectLocale,hideHeader:e.isEmbed,isOpen:!0,meta:{showThirdwebBranding:!1},modalHeader:{onBack:e.onBack,title:"Connect"},onClose:()=>{},onConnect:i=>{e.onSelect(i),e.onBack()},recommendedWallets:e.recommendedWallets,screenSetup:o,setModalVisibility:()=>{},shouldSetActive:!1,showAllWallets:e.showAllWallets,size:"compact",walletConnect:e.walletConnect,walletIdsToHide:n.map(i=>i.id),wallets:r,welcomeScreen:void 0})}var Jn=T(L(),1);function rvt(e){let[t,n]=(0,nvt.useState)("wallets"),r=Gl(),o=yW(),i=!e.showAllWallets&&e.wallets?.every(a=>r.includes(a));return t==="connect"?(0,Jn.jsx)(SV,{...e,isEmbed:!1,onSelect:a=>{o(a),e.onBack()}}):(0,Jn.jsxs)(S,{children:[(0,Jn.jsx)(S,{p:"lg",children:(0,Jn.jsx)(be,{onBack:e.onBack,title:"Wallets"})}),(0,Jn.jsx)(Wt,{}),(0,Jn.jsx)(Q,{y:"md"}),(0,Jn.jsx)(S,{px:"md",style:{minHeight:"150px"},children:(0,Jn.jsx)(S,{flex:"column",gap:"xs",children:r.filter(a=>!e.hiddenWallets?.includes(a.id)).map(a=>(0,Jn.jsx)(iNn,{chain:e.activeChain,client:e.client,onClick:()=>{o(a),e.onBack()},wallet:a},a.id))})}),(0,Jn.jsx)(Q,{y:"xxl"}),(0,Jn.jsx)(S,{p:"lg",children:!i&&(0,Jn.jsxs)(ae,{fullWidth:!0,gap:"xs",onClick:()=>{n("connect")},variant:"accent",children:[(0,Jn.jsx)(NA,{height:z.sm,width:z.sm}),"Connect Wallet"]})})]})}function iNn(e){let t=$(),n=Mn(),{disconnect:r}=j3(),o=e.wallet.id,i=e.wallet.getAccount()?.address,a=C5({address:i,chain:e.chain,client:e.client});return(0,Jn.jsxs)("div",{style:{position:"relative"},children:[(0,Jn.jsx)(Ck,{onClick:e.onClick,style:{justifyContent:"space-between"},children:(0,Jn.jsxs)(S,{center:"y",flex:"row",gap:"md",children:[(0,Jn.jsx)(jo,{client:e.client,id:o,size:z.lg}),(0,Jn.jsxs)(S,{flex:"column",gap:"4xs",children:[(0,Jn.jsx)(F,{color:"primaryText",children:Vi(i||"")}),a.data?(0,Jn.jsx)(F,{color:"secondaryText",size:"xs",weight:400,children:W0(a.data)}):(0,Jn.jsx)(Te,{height:oe.sm,width:"100px"})]})]})}),(0,Jn.jsx)("div",{style:{position:"absolute",right:Z.xxs,top:"50%",transform:"translateY(-50%)",zIndex:1},children:n?.id===e.wallet.id?(0,Jn.jsx)(vy,{tip:"Active Wallet",children:(0,Jn.jsx)(qs,{children:(0,Jn.jsx)(ad,{height:z.md,width:z.md})})}):(0,Jn.jsx)(vy,{tip:"Disconnect",children:(0,Jn.jsx)(qs,{onClick:()=>{r(e.wallet)},children:(0,Jn.jsx)($4t,{height:z.md,style:{color:t.colors.secondaryText},width:z.md})})})})]})}Cn();tt();ai();N0();function ovt(){let e=Gl(),t=da();return Up({mutationFn:async({client:n,profileToUnlink:r,allowAccountDeletion:o=!1})=>{let i=e.find(s=>yt(s)),a=i?{id:i.id,partnerId:i.getConfig()?.partnerId}:void 0;await pse({allowAccountDeletion:o,client:n,ecosystem:a,profileToUnlink:r})},onSuccess:()=>{t.invalidateQueries({queryKey:["profiles"]})}})}zt();ye();r6t();$3();tt();ai();N0();function MV(e){let t=Gl(),n=t.length>0&&t.some(r=>r.id==="inApp"||yt(r));return le({enabled:n,queryFn:async()=>{let r=t.find(i=>yt(i)),o=r?{id:r.id,partnerId:r.getConfig()?.partnerId}:void 0;return fse({client:e.client,ecosystem:o})},queryKey:["profiles",t.map(r=>`${r.id}-${r.getAccount()?.address}`)]})}ql();ve();St();Sa();nt();Ye();var dce=T(L(),1),ivt=e=>(0,dce.jsx)("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:(0,dce.jsx)("path",{d:"M12 15.5H7.5C6.10444 15.5 5.40665 15.5 4.83886 15.6722C3.56045 16.06 2.56004 17.0605 2.17224 18.3389C2 18.9067 2 19.6044 2 21M19 21V15M16 18H22M14.5 7.5C14.5 9.98528 12.4853 12 10 12C7.51472 12 5.5 9.98528 5.5 7.5C5.5 5.01472 7.51472 3 10 3C12.4853 3 14.5 5.01472 14.5 7.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})});FW();yk();ZW();var _n=T(L(),1);function aNn(e){switch(!0){case(e.type==="email"&&e.details.email!==void 0):return e.details.email;case(e.type==="google"&&e.details.email!==void 0):return e.details.email;case(e.type==="phone"&&e.details.phone!==void 0):return e.details.phone;case e.details.address!==void 0:return Vi(e.details.address,6);case(e.type==="cognito"&&e.details.email!==void 0):return e.details.email;case e.type.toLowerCase()==="custom_auth_endpoint":return"Custom Profile";default:return e.type.slice(0,1).toUpperCase()+e.type.slice(1)}}function avt(e){let{data:t,isLoading:n}=MV({client:e.client});return n?(0,_n.jsx)(zn,{}):(0,_n.jsxs)(S,{style:{minHeight:"300px"},children:[(0,_n.jsx)(S,{p:"lg",children:(0,_n.jsx)(be,{onBack:e.onBack,title:e.locale.manageWallet.linkedProfiles})}),(0,_n.jsx)(Wt,{}),(0,_n.jsxs)(S,{scrollY:!0,style:{height:"300px"},children:[(0,_n.jsx)(Q,{y:"md"}),(0,_n.jsxs)(S,{px:"sm",children:[(0,_n.jsxs)(Xs,{onClick:()=>{e.setScreen("link-profile")},style:{fontSize:oe.sm},children:[(0,_n.jsx)(ivt,{size:z.lg}),(0,_n.jsx)(F,{color:"primaryText",children:e.locale.manageWallet.linkProfile})]}),(0,_n.jsx)(Q,{y:"xs"}),t?.filter(r=>r.type.toLowerCase()!=="guest"&&r.type.toLowerCase()!=="custom_jwt"&&r.type.toLowerCase()!=="custom_auth_endpoint").map(r=>(0,_n.jsx)(sNn,{client:e.client,enableUnlinking:t.length>1,profile:r},`${JSON.stringify(r)}`))]}),(0,_n.jsx)(Q,{y:"md"})]})]})}function sNn({profile:e,enableUnlinking:t,client:n}){let{data:r}=n6t({address:e.details.address,client:n}),{mutate:o,isPending:i}=ovt();return(0,_n.jsxs)(Xs,{as:"div",disabled:!0,style:{cursor:"default",fontSize:oe.sm},children:[r?.some(a=>a.avatar)?(0,_n.jsx)(nn,{client:n,height:z.lg,loading:"eager",src:r?.find(a=>a.avatar)?.avatar,style:{borderRadius:"100%"},width:z.lg}):e.details.address!==void 0?(0,_n.jsx)(S,{style:{borderRadius:"100%",height:"32px",overflow:"hidden",width:"32px"},children:(0,_n.jsx)(bV,{address:e.details.address,size:32})}):e.type==="passkey"?(0,_n.jsx)(af,{size:z.lg}):e.type==="email"?(0,_n.jsx)(XA,{size:z.lg}):e.type==="phone"?(0,_n.jsx)(_A,{size:z.lg}):(0,_n.jsx)(nn,{client:n,height:z.lg,loading:"eager",src:hk(e.type),width:z.lg}),(0,_n.jsxs)("div",{style:{alignItems:"center",display:"flex",flexDirection:"row",flexGrow:1,justifyContent:"space-between"},children:[(0,_n.jsx)(F,{color:"primaryText",children:r?.find(a=>a.avatar)?.name||aNn(e)}),(0,_n.jsxs)("div",{style:{alignItems:"center",display:"flex",flexDirection:"row",gap:"8px"},children:[r?.find(a=>a.avatar)?.name&&e.details.address&&(0,_n.jsx)(F,{color:"secondaryText",size:"sm",children:Vi(e.details.address,4)}),t&&(0,_n.jsx)(qs,{"aria-label":"Unlink",autoFocus:!0,disabled:i,onClick:()=>o({client:n,profileToUnlink:e}),style:{pointerEvents:"auto"},type:"button",children:(0,_n.jsx)(fW,{height:z.md,style:{color:"inherit"},width:z.md})})]})]})]})}Cn();tt();var tE=T(_(),1);ai();ye();ls();cle();ql();ve();Ye();var ms=T(L(),1),lNn=(0,tE.lazy)(()=>Promise.resolve().then(()=>(sle(),ale)));function svt(e){let t=w5(),n=Mn(),r=cr(),o=da(),i=t||n;return i?i.id==="inApp"?(0,ms.jsx)(tE.Suspense,{fallback:(0,ms.jsx)(zn,{}),children:(0,ms.jsx)(lNn,{chain:r,client:e.client,connectLocale:e.locale,done:()=>{setTimeout(()=>{o.invalidateQueries({queryKey:["profiles"]})},500),e.onBack()},goBack:e.onBack,isLinking:!0,meta:{showThirdwebBranding:!1,title:e.locale.manageWallet.linkProfile},size:"compact",wallet:i,walletConnect:e.walletConnect})}):yt(i)?(0,ms.jsx)(tE.Suspense,{fallback:(0,ms.jsx)(zn,{}),children:(0,ms.jsx)(lle,{chain:r,client:e.client,connectLocale:e.locale,done:()=>{setTimeout(()=>{o.invalidateQueries({queryKey:["profiles"]})},500),e.onBack()},goBack:e.onBack,isLinking:!0,meta:{showThirdwebBranding:!1,title:e.locale.manageWallet.linkProfile},size:"compact",wallet:i,walletConnect:e.walletConnect})}):(0,ms.jsxs)(S,{style:{minHeight:"300px"},children:[(0,ms.jsx)(S,{p:"lg",children:(0,ms.jsx)(be,{onBack:e.onBack,title:e.locale.manageWallet.linkProfile})}),(0,ms.jsx)(Wt,{}),(0,ms.jsxs)(S,{center:"both",color:"secondaryText",flex:"column",gap:"md",px:"xl",style:{flex:"1",minHeight:"250px"},children:[(0,ms.jsx)(Qs,{height:z.xl,width:z.xl}),(0,ms.jsx)(F,{center:!0,children:"This wallet does not support account linking"})]})]}):(0,ms.jsx)(zn,{})}Cn();ib();Qu();ye();ls();ve();nt();Ye();var nE=T(L(),1),lvt=e=>(0,nE.jsxs)("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[(0,nE.jsx)("path",{d:"M2 5.99999L2 2.99999C2 2.39999 2.4 1.99999 3 1.99999H7L7 4.99999H10V7.99999H12L13.4 9.39999C14.7898 8.91585 16.3028 8.9177 17.6915 9.40524C19.0801 9.89278 20.2622 10.8372 21.0444 12.0839C21.8265 13.3306 22.1624 14.8058 21.9971 16.2683C21.8318 17.7307 21.1751 19.0937 20.1344 20.1344C19.0937 21.1751 17.7307 21.8318 16.2683 21.9971C14.8058 22.1624 13.3306 21.8265 12.0839 21.0444C10.8372 20.2622 9.89279 19.0801 9.40525 17.6915C8.91771 16.3028 8.91585 14.7898 9.4 13.4L2 5.99999Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),(0,nE.jsx)("path",{d:"M15.5 15C15.7761 15 16 15.2239 16 15.5C16 15.7761 15.7761 16 15.5 16C15.2239 16 15 15.7761 15 15.5C15 15.2239 15.2239 15 15.5 15Z",fill:"currentColor",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})]});var pce=T(L(),1),cvt=e=>(0,pce.jsx)("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:(0,pce.jsx)("path",{d:"M22 21V19C22 17.1362 20.7252 15.5701 19 15.126M15.5 3.29076C16.9659 3.88415 18 5.32131 18 7C18 8.67869 16.9659 10.1159 15.5 10.7092M17 21C17 19.1362 17 18.2044 16.6955 17.4693C16.2895 16.4892 15.5108 15.7105 14.5307 15.3045C13.7956 15 12.8638 15 11 15H8C6.13623 15 5.20435 15 4.46927 15.3045C3.48915 15.7105 2.71046 16.4892 2.30448 17.4693C2 18.2044 2 19.1362 2 21M13.5 7C13.5 9.20914 11.7091 11 9.5 11C7.29086 11 5.5 9.20914 5.5 7C5.5 4.79086 7.29086 3 9.5 3C11.7091 3 13.5 4.79086 13.5 7Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})});var fce=T(L(),1),uvt=e=>(0,fce.jsx)("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:(0,fce.jsx)("path",{d:"M4.91334 7.73539C8.82714 4.0882 15.1729 4.0882 19.0867 7.73539L19.5577 8.17432C19.7534 8.35664 19.7534 8.65232 19.5577 8.83464L17.9464 10.3362C17.8485 10.4274 17.6899 10.4274 17.5921 10.3362L16.9439 9.73217C14.2134 7.18782 9.7866 7.18782 7.05614 9.73217L6.36193 10.379C6.26407 10.4702 6.10547 10.4702 6.0076 10.379L4.39629 8.87747C4.20056 8.69515 4.20056 8.39947 4.39629 8.21715L4.91334 7.73539ZM22.4191 10.8407L23.8532 12.1771C24.0489 12.3594 24.0489 12.6551 23.8532 12.8374L17.3867 18.8632C17.1911 19.0456 16.8738 19.0456 16.6781 18.8632L12.0886 14.5865C12.0397 14.5409 11.9604 14.5409 11.9115 14.5865L7.32202 18.8632C7.12638 19.0456 6.8091 19.0456 6.61337 18.8632L0.146771 12.8373C-0.0489237 12.655 -0.0489237 12.3593 0.146771 12.177L1.58087 10.8406C1.77657 10.6582 2.09384 10.6582 2.28954 10.8406L6.87907 15.1173C6.928 15.163 7.0073 15.163 7.05623 15.1173L11.6456 10.8406C11.8412 10.6582 12.1585 10.6582 12.3542 10.8406L16.9438 15.1173C16.9927 15.163 17.072 15.163 17.1209 15.1173L21.7105 10.8407C21.9061 10.6583 22.2234 10.6583 22.4191 10.8407Z",fill:"currentColor"})});var vo=T(L(),1);function dvt(e){let t=w5(),n=Mn(),r=t||n;return(0,vo.jsxs)(S,{style:{minHeight:"300px"},children:[(0,vo.jsx)(S,{p:"lg",children:(0,vo.jsx)(be,{onBack:e.onBack,title:e.locale.manageWallet.title})}),(0,vo.jsx)(Wt,{}),(0,vo.jsxs)(S,{px:"sm",scrollY:!0,style:{maxHeight:"500px"},children:[(0,vo.jsx)(Q,{y:"md"}),(0,vo.jsxs)(S,{style:{height:"250px",position:"relative"},children:[(0,vo.jsx)(cNn,{closeModal:e.closeModal,connectLocale:e.locale}),typeof r<"u"&&e.manageWallet?.allowLinkingProfiles!==!1&&(0,vo.jsxs)(Xs,{onClick:()=>{e.setScreen("linked-profiles")},style:{fontSize:oe.sm},children:[(0,vo.jsx)(cvt,{size:z.md}),(0,vo.jsx)(F,{color:"primaryText",children:e.locale.manageWallet.linkedProfiles})]}),(0,vo.jsxs)(Xs,{onClick:()=>{e.setScreen("wallet-connect-receiver")},style:{fontSize:oe.sm},children:[(0,vo.jsx)(uvt,{size:z.md}),(0,vo.jsx)(F,{color:"primaryText",children:e.locale.manageWallet.connectAnApp})]}),r&&wS(r)&&!r.getConfig()?.hidePrivateKeyExport&&(0,vo.jsxs)(Xs,{onClick:()=>{e.setScreen("private-key")},style:{fontSize:oe.sm},children:[(0,vo.jsx)(lvt,{size:z.md}),(0,vo.jsx)(F,{color:"primaryText",children:e.locale.manageWallet.exportPrivateKey})]})]}),(0,vo.jsx)(Q,{y:"lg"})]})]})}function cNn(e){let t=Mn(),n=e.connectLocale;if(t?.id!=="io.metamask")return null;let r=CS("io.metamask");return r?(0,vo.jsxs)(Xs,{onClick:async()=>{await r.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}),e.closeModal()},type:"button",children:[(0,vo.jsx)(r3t,{height:z.md,width:z.md}),(0,vo.jsx)(F,{color:"primaryText",children:n.switchAccount})]}):null}var kV=T(_(),1);an();bs();ai();o3();ve();nt();_o();var ic=T(L(),1);function pvt(e){let[t,n]=(0,kV.useState)(!0),r=Be("inAppWallet");if((0,kV.useEffect)(()=>{let i=async a=>{if(typeof a.data=="object"&&"eventType"in a.data&&a.origin===r&&a.data.eventType==="exportPrivateKeyIframeLoaded"){let s=document.getElementById(`export-wallet-${e.wallet?.id}`);if(!(s instanceof HTMLIFrameElement)||!e.wallet)return;let l=new Ol({clientId:e.client.clientId,ecosystem:yt(e.wallet)?{id:e.wallet.id,partnerId:e.wallet.getConfig()?.partnerId}:void 0,storage:kn});s?.contentWindow&&s.contentWindow.postMessage({authToken:await l.getAuthCookie(),eventType:"initExportPrivateKey"},a.origin)}};return window.addEventListener("message",i),()=>{window.removeEventListener("message",i)}},[e.wallet,e.client.clientId,r]),!e.wallet)throw new Error("[PrivateKey] No wallet found");let o=yt(e.wallet)?{id:e.wallet.id,partnerId:e.wallet.getConfig()?.partnerId}:void 0;return(0,ic.jsxs)(S,{style:{minHeight:"300px"},children:[(0,ic.jsx)(S,{p:"lg",children:(0,ic.jsx)(be,{onBack:e.onBack,title:e.connectLocale.manageWallet.exportPrivateKey})}),(0,ic.jsx)(Wt,{}),(0,ic.jsxs)(S,{px:"sm",scrollY:!0,style:{maxHeight:"500px"},children:[(0,ic.jsx)(Q,{y:"md"}),(0,ic.jsxs)(S,{style:{height:"250px",position:"relative"},children:[t?(0,ic.jsx)(S,{center:"both",flex:"column",style:{height:"100%",position:"absolute",width:"100%"},children:(0,ic.jsx)(wt,{color:"primaryButtonBg",size:"lg"})}):null,(0,ic.jsx)(S,{style:{height:"100%",position:"absolute",width:"100%",zIndex:11},children:(0,ic.jsx)("iframe",{allow:"clipboard-read; clipboard-write",id:`export-wallet-${e.wallet.id}`,onLoad:()=>{n(!1)},src:`${r}/sdk/2022-08-12/embedded-wallet/export-private-key?clientId=${e.client.clientId}&theme=${typeof e.theme=="string"?e.theme:e.theme.type}${o?`&ecosystemId=${o.id}`:""}${o?.partnerId?`&partnerId=${o.partnerId}`:""}`,style:{height:"250px",visibility:t?"hidden":"unset",width:"100%"},title:"Export In-App Wallet"})})]}),(0,ic.jsx)(Q,{y:"lg"})]})]})}Fe();ye();Zl();function fvt(e,t=!0){return`${e.substring(0,t?4:6)}...${e.substring(e.length-(t?3:4))}`}ve();lF();nt();Ye();md();Bn();var ac=T(L(),1);function mvt(e){let n=Xn()?.address,{hasCopied:r,onCopy:o}=rV(n||""),{connectLocale:i,client:a}=e,s=i.receiveFundsScreen;return(0,ac.jsxs)(S,{p:"lg",className:"tw-receive-funds-screen",children:[(0,ac.jsx)(be,{onBack:e.onBack,title:s.title}),(0,ac.jsx)(Q,{y:"xl"}),(0,ac.jsx)(S,{center:"x",flex:"row",children:(0,ac.jsx)(sx,{QRIcon:e.walletId&&(0,ac.jsx)(jo,{client:a,id:e.walletId,size:z.xxl}),qrCodeUri:n,size:350})}),(0,ac.jsx)(Q,{y:"xl"}),(0,ac.jsxs)(uNn,{onClick:o,className:"tw-copy-address-button",children:[(0,ac.jsx)(F,{color:"primaryText",size:"md",children:fvt(n||"",!1)}),(0,ac.jsx)(Nx,{hasCopied:r,text:n||"",tip:"Copy address"})]}),(0,ac.jsx)(Q,{y:"lg"}),(0,ac.jsx)(F,{balance:!0,center:!0,size:"sm",className:"receive_fund_screen_instruction",multiline:!0,children:s.instruction})]})}var uNn=Ia(e=>{let t=$();return{all:"unset","&:hover":{borderColor:t.colors.accentText},border:`1px solid ${t.colors.borderColor}`,borderRadius:te.md,boxSizing:"border-box",cursor:"pointer",display:"flex",justifyContent:"space-between",padding:Z.md,transition:"border-color 200ms ease",width:"100%"}});Cn();var F0=T(_(),1);ye();mk();Zl();tt();ko();e3();ko();zt();Dt();Gae();TW();As();t1();var dNn="0x3b3b57de",pNn=[{name:"name",type:"bytes32"}];function fNn(e){return No(pNn,[e.name])}function hvt(e){return dNn+fNn(e).slice(2)}Yae();MW();async function gvt(e){let{client:t,name:n,resolverAddress:r,resolverChain:o}=e;return eo(n)?ge(n):nr(async()=>{let i=at({address:r||zA,chain:o||Zu,client:t}),a=hvt({name:IW(n)}),s=await SW({contract:i,data:a,name:En(BA(n))});return ge(`0x${s[0].slice(-40)}`)},{cacheKey:`ens:addr:${o?.id||1}:${n}`,cacheTime:60*1e3})}Go();pw();bT();var mNn="0xa9059cbb",hNn=[{name:"to",type:"address"},{name:"value",type:"uint256"}],gNn=[{type:"bool"}];function yvt(e){let t=ug(async()=>"asyncParams"in e?await e.asyncParams():e);return Lu({accessList:async()=>(await t()).overrides?.accessList,authorizationList:async()=>(await t()).overrides?.authorizationList,contract:e.contract,erc20Value:async()=>(await t()).overrides?.erc20Value,extraGas:async()=>(await t()).overrides?.extraGas,gas:async()=>(await t()).overrides?.gas,gasPrice:async()=>(await t()).overrides?.gasPrice,maxFeePerGas:async()=>(await t()).overrides?.maxFeePerGas,maxPriorityFeePerGas:async()=>(await t()).overrides?.maxPriorityFeePerGas,method:[mNn,hNn,gNn],nonce:async()=>(await t()).overrides?.nonce,params:async()=>{let n=await t();return[n.to,n.value]},value:async()=>(await t()).overrides?.value})}function wvt(e){return yvt({asyncParams:async()=>{let t;if("amount"in e){let{decimals:n}=await Promise.resolve().then(()=>(UR(),u_)),r=await n(e).catch(()=>18);t=Er(e.amount.toString(),r)}else t=e.amountWei;return{overrides:{erc20Value:{amountWei:t,tokenAddress:e.contract.address},...e.overrides},to:e.to,value:t}},contract:e.contract})}fR();E4();k4();S4();zt();function bvt(e){let t=e.split("."),n=t[t.length-1];return t.length<2||!n||/\s/.test(n)||/^\d+$/.test(n)?!1:t.every(r=>!(r.length<1||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(r)||/[\uff01-\uff5e]/.test(r)))}Go();BW();ls();function Avt(e){let t=Mn(),n=da();return Up({async mutationFn(r){let{tokenAddress:o,receiverAddress:i,amount:a}=r,s=t?.getChain(),l=t?.getAccount();if(!s)throw new Error("No active chain");if(!l)throw new Error("No active account");if(!i||!bvt(i)&&!eo(i))throw new Error("Invalid receiver address");if(!a||Number.isNaN(Number(a))||Number(a)<0)throw new Error("Invalid amount");let c=i;try{c=await gvt({client:e,name:i})}catch{throw new Error("Failed to resolve address")}if(o){let u=at({address:o,chain:s,client:e}),d=wvt({amount:a,contract:u,to:c});return await Dp({account:l,transaction:d})}else{let u=T4({chain:s,client:e,to:c,value:tg(a)}),d=await ew({account:l,transaction:u}),f=await YA({address:l.address,chain:s,client:e});if(tg(a)+d>f.value)throw new Error("Insufficient balance for transfer amount and gas");return await Dp({account:l,transaction:u})}},onSettled:async(r,o)=>{o||(r?.transactionHash&&await Ou({chain:r.chain,client:e,maxBlocksWaitTime:1e4,transactionHash:r.transactionHash}),Sj(n))}})}ve();St();M5();$o();nt();_o();var xvt=T(_(),1);Ps();ye();$3();Ps();zt();var My={nativeToken:!0};function Md(e){return e&&("nativeToken"in e||e.address?.toLowerCase()===Pr.toLowerCase()||e?.address===dg)||!1}function mce(e){return Md(e)?Pr:ge(e.address)}ve();Sa();var EV=T(L(),1);function Lx(e){let t=H5(e.chain).data,n=(0,xvt.useMemo)(()=>Md(e.token)||e.token.address===Pr?t?.nativeCurrency.symbol==="ETH"?"ipfs://QmcxZHpyJa8T4i63xqjPYrZ6tKrt55tZJpbXcjSDKuKaf9/ethereum/512.png":t?.icon?.url:e.token.icon,[e.token,t?.icon?.url,t?.nativeCurrency.symbol]);return n?(0,EV.jsx)(nn,{client:e.client,fallbackImage:WW,height:z[e.size],src:n,width:z[e.size]}):(0,EV.jsx)(S,{center:"both",color:"secondaryText",style:{height:z[e.size],width:z[e.size]},children:(0,EV.jsx)(Z5,{size:z[e.size]})})}Ye();Bn();qc();Cn();tt();var gce=T(_(),1);qe();ko();Kae();la();Go();async function vvt(e){let{account:t,client:n,chain:r,tokenAddress:o}=e;if(o){let{getBalance:u}=await Promise.resolve().then(()=>(ase(),ise));return u({address:t.address,contract:at({address:o,chain:r,client:n})})}let i=An({chain:r,client:n}),[a,s,l,c]=await Promise.all([gC(r),yC(r),wC(r),EW(i,{address:t.address})]);return{decimals:s,displayValue:go(c,s),name:l,symbol:a,value:c}}Fe();ye();tt();ko();function hce(e){let{chain:t,tokenAddress:n,client:r}=e;return le({enabled:!!t&&!!r,queryFn:async()=>{if(n){let{getCurrencyMetadata:d}=await Promise.resolve().then(()=>(ose(),t6t));return await d({contract:at({address:n,chain:t,client:r})})}let{getChainDecimals:o,getChainNativeCurrencyName:i,getChainSymbol:a}=await Promise.resolve().then(()=>(qe(),bC)),[s,l,c]=await Promise.all([a(t),o(t),i(t)]);return{decimals:l,name:c,symbol:s}},queryKey:["tokenInfo",t?.id||-1,{tokenAddress:n}]})}Zl();ve();St();Lm();ve();Sa();var rE=T(L(),1),PV=e=>(0,rE.jsxs)(S,{style:{alignItems:"center",display:"flex",flexShrink:0,position:"relative"},children:[(0,rE.jsx)(nn,{client:e.client,fallbackImage:Sd,height:e.size,src:yNn(e),width:e.size}),e.active&&(0,rE.jsx)(Tx,{className:"tw-chain-active-dot-legacy-chain-icon"})]}),yNn=e=>{let t=e.chainIconUrl;if(!t)return Sd;try{return ca({client:e.client,uri:t})}catch{return Sd}};M5();$o();nt();_o();Ye();var qt=T(L(),1);function Ivt(e){let[t,n]=(0,gce.useState)("base"),[r,o]=(0,gce.useState)(""),i=e.chain,a=JF(i),s=xx(i),l=hce({chain:i,client:e.client,tokenAddress:r}),c=e.connectLocale.sendFundsScreen,u=e.tokenList;l.data&&r&&(u=[{...l.data,address:r},...u]);let d=r?u.filter(m=>{let h=r.toLowerCase();return m.name.toLowerCase().includes(h)||m.symbol.toLowerCase().includes(h)||m.address.includes(r)}):u,{chainSelection:f}=e;return t==="select-chain"&&f?(0,qt.jsx)(TV,{className:"tw-send-funds-screen tw-send-funds-screen__select-chain",chains:f.chains,client:e.client,closeModal:()=>n("base"),connectLocale:e.connectLocale,networkSelector:{renderChain(m){return(0,qt.jsx)(uce,{chain:m.chain,client:e.client,confirming:!1,connectLocale:e.connectLocale,onClick:()=>{f.select(m.chain),n("base")},switchingFailed:!1})}},onBack:()=>n("base"),showTabs:!1}):(0,qt.jsxs)(S,{className:"tw-send-funds-screen tw-send-funds-screen__select-token",animate:"fadein",style:{minHeight:"300px"},children:[(0,qt.jsx)(S,{p:"lg",children:(0,qt.jsx)(be,{onBack:e.onBack,title:e.modalTitle||c.selectTokenTitle})}),(0,qt.jsx)(Wt,{}),(0,qt.jsxs)(S,{scrollY:!0,style:{maxHeight:"450px"},children:[(0,qt.jsx)(Q,{y:"md"}),e.chainSelection&&(0,qt.jsxs)(S,{px:"lg",children:[(0,qt.jsx)(F,{size:"sm",children:"Select Network"}),(0,qt.jsx)(Q,{y:"xxs"}),(0,qt.jsxs)(Tvt,{fullWidth:!0,onClick:()=>{n("select-chain")},variant:"secondary",children:[(0,qt.jsx)(PV,{chainIconUrl:s.url,client:e.client,size:z.lg}),a.name?(0,qt.jsx)(F,{color:"primaryText",size:"sm",children:a.name}):(0,qt.jsx)(Te,{height:oe.md}),(0,qt.jsx)(y5,{height:z.sm,style:{marginLeft:"auto"},width:z.sm})]}),(0,qt.jsx)(Q,{y:"xl"}),(0,qt.jsx)(F,{size:"sm",children:"Select Token"})]}),(0,qt.jsxs)(S,{px:"lg",children:[(0,qt.jsx)(Q,{y:"xs"}),(0,qt.jsx)(Ys,{onChange:m=>{o(m.target.value)},placeholder:c.searchToken,value:r,variant:"outline"})]}),(0,qt.jsx)(Q,{y:"md"}),(d.length>0||!r)&&(0,qt.jsxs)(S,{flex:"column",gap:"xs",px:"lg",scrollY:!0,style:{paddingBottom:Z.lg,paddingTop:0},children:[!r&&(0,qt.jsx)(Cvt,{chain:e.chain,client:e.client,onClick:()=>{e.onTokenSelect(My)},token:My}),d.map(m=>(0,qt.jsx)(Cvt,{chain:e.chain,client:e.client,onClick:()=>e.onTokenSelect(m),token:m},m.address))]}),d.length===0&&l.isLoading&&r&&(0,qt.jsx)(S,{animate:"fadein",center:"both",color:"secondaryText",flex:"column",gap:"md",p:"lg",style:{minHeight:"200px",paddingTop:0},children:(0,qt.jsx)(wt,{color:"accentText",size:"lg"})}),d.length===0&&!l.isLoading&&r&&(0,qt.jsxs)(S,{animate:"fadein",center:"both",color:"secondaryText",flex:"column",gap:"md",p:"lg",style:{minHeight:"200px",paddingTop:0},children:[(0,qt.jsx)(Qs,{height:z.lg,width:z.lg}),c.noTokensFound]}),(0,qt.jsx)(Q,{y:"md"})]})]})}function Cvt(e){let t=Xn(),n=hce({chain:e.chain,client:e.client,tokenAddress:Md(e.token)?void 0:e.token.address}),r=Md(e.token)?n.data?.name:e.token.name;return(0,qt.jsxs)(Tvt,{fullWidth:!0,onClick:e.onClick,variant:"secondary",children:[(0,qt.jsx)(Lx,{chain:e.chain,client:e.client,size:"lg",token:e.token}),(0,qt.jsxs)(S,{flex:"column",gap:"4xs",children:[r?(0,qt.jsx)(F,{color:"primaryText",size:"sm",children:r}):(0,qt.jsx)(Te,{height:oe.md,width:"150px"}),t&&(0,qt.jsx)(wNn,{account:t,chain:e.chain,client:e.client,tokenAddress:Md(e.token)?void 0:e.token.address})]})]})}function wNn(e){let t=le({queryFn:async()=>vvt({account:e.account,chain:e.chain,client:e.client,tokenAddress:e.tokenAddress}),queryKey:["tokenBalance",e]});return t.data?(0,qt.jsxs)(F,{size:"xs",children:[" ",W0(t.data)]}):(0,qt.jsx)(Te,{height:oe.xs,width:"100px"})}var Tvt=Zt(ae)(()=>{let e=$();return{"&:hover":{background:e.colors.secondaryButtonBg,transform:"scale(1.01)"},background:e.colors.tertiaryBg,gap:Z.sm,justifyContent:"flex-start",padding:Z.sm,transition:"background 200ms ease, transform 150ms ease"}});var jt=T(L(),1);function Svt(e){let[t,n]=(0,F0.useState)("base"),o=cr()?.id,{connectLocale:i,client:a}=e,s=My,l=e.supportedTokens||B5;if(o&&l[o]&&l[o]!==B5[o]){let A=l[o]?.[0];A&&(s=A)}let[c,u]=(0,F0.useState)(s),[d,f]=(0,F0.useState)(""),[m,h]=(0,F0.useState)("0"),g=cr(),w=(g?.id?l[g.id]:void 0)||[];return t==="tokenSelector"&&g?(0,jt.jsx)(Ivt,{chain:g,client:a,connectLocale:i,onBack:()=>{n("base")},onTokenSelect:b=>{u(b),n("base")},tokenList:w}):(0,jt.jsx)(bNn,{amount:m,client:a,connectLocale:i,onBack:e.onBack,onTokenSelect:()=>{n("tokenSelector")},receiverAddress:d,setAmount:h,setReceiverAddress:f,token:c})}function bNn(e){let t=e.connectLocale.sendFundsScreen,n=e.token&&"address"in e.token?e.token.address:void 0,r=cr(),o=Xn(),i=cr(),a=C5({address:o?.address,chain:r,client:e.client,tokenAddress:n}),{receiverAddress:s,setReceiverAddress:l,amount:c,setAmount:u}=e,d=Avt(e.client);function f(A){let x=A?.data?.message||A?.message;return x?x.includes("user rejected")||x.includes("user closed modal")||x.includes("user denied")?t.transactionRejected:x.includes("insufficient funds")?t.insufficientFunds:x:t.transactionFailed}let m=(0,F0.useId)(),h=(0,F0.useId)(),g=(0,F0.useId)();if(!i)return null;if(d.isError)return(0,jt.jsxs)(S,{animate:"fadein",p:"lg",className:"tw-send-funds-screen tw-send-funds-screen__error",children:[(0,jt.jsx)(be,{onBack:()=>{d.reset()},title:t.title}),(0,jt.jsx)(Q,{y:"xl"}),(0,jt.jsxs)(S,{animate:"fadein",center:"both",color:"danger",flex:"column",gap:"lg",style:{minHeight:"200px"},children:[(0,jt.jsx)(Qs,{height:z.xl,width:z.xl}),(0,jt.jsx)(F,{center:!0,color:"danger",multiline:!0,children:f(d.error)})]})]});if(d.isSuccess)return(0,jt.jsxs)(S,{animate:"fadein",p:"lg",className:"tw-send-funds-screen tw-send-funds-screen__success",children:[(0,jt.jsx)(be,{onBack:()=>{d.reset()},title:t.title}),(0,jt.jsxs)(S,{animate:"fadein",center:"both",color:"success",flex:"column",gap:"lg",style:{minHeight:"250px"},children:[(0,jt.jsx)(Y4t,{height:z.xl,width:z.xl}),(0,jt.jsxs)(F,{color:"success",children:[" ",t.successMessage," "]})]})]});let w=(e.token&&"name"in e.token?e.token.name:void 0)||a?.data?.name,b=(e.token&&"symbol"in e.token?e.token.symbol:void 0)||a?.data?.symbol;return(0,jt.jsxs)(S,{animate:"fadein",p:"lg",className:"tw-send-funds-screen tw-send-funds-screen__form",children:[(0,jt.jsx)(be,{onBack:e.onBack,title:t.title}),(0,jt.jsx)(Q,{y:"xl"}),(0,jt.jsxs)("form",{onSubmit:A=>{A.preventDefault()},children:[(0,jt.jsx)(XW,{color:"secondaryText",htmlFor:m,children:t.token}),(0,jt.jsx)(Q,{y:"sm"}),(0,jt.jsxs)(ae,{className:"tw-select-token-button",fullWidth:!0,id:m,onClick:e.onTokenSelect,style:{gap:Z.sm,justifyContent:"flex-start",padding:Z.sm},variant:"outline",children:[(0,jt.jsx)(Lx,{chain:i,client:e.client,size:"lg",token:e.token}),(0,jt.jsxs)(S,{flex:"column",gap:"xs",children:[w?(0,jt.jsx)(F,{color:"primaryText",size:"sm",children:w}):(0,jt.jsx)(Te,{height:oe.xs,width:"150px"}),a.data?(0,jt.jsx)(F,{size:"xs",children:W0(a.data)}):(0,jt.jsx)(Te,{height:oe.xs,width:"100px"})]})]}),(0,jt.jsx)(Q,{y:"lg"}),(0,jt.jsx)(XW,{color:"secondaryText",htmlFor:h,children:t.sendTo}),(0,jt.jsx)(Q,{y:"sm"}),(0,jt.jsx)(Ys,{className:"tw-address-input",id:h,onChange:A=>{l(A.target.value)},placeholder:"0x... or ENS name",required:!0,value:s,variant:"outline"}),(0,jt.jsx)(Q,{y:"lg"}),(0,jt.jsx)(XW,{color:"secondaryText",htmlFor:g,children:t.amount}),(0,jt.jsx)(Q,{y:"sm"}),(0,jt.jsxs)(S,{relative:!0,children:[(0,jt.jsx)(Ys,{className:"tw-amount-input",id:g,onChange:A=>{u(A.target.value)},required:!0,type:"number",value:c,variant:"outline"}),(0,jt.jsx)(ANn,{children:(0,jt.jsxs)(F,{size:"xs",children:[" ",b," "]})})]}),(0,jt.jsx)(Q,{y:"xxl"}),(0,jt.jsxs)(ae,{className:"tw-send-funds-button",fullWidth:!0,onClick:async()=>{!s||!c||await d.mutateAsync({amount:c,receiverAddress:s,tokenAddress:n})},style:{alignItems:"center",gap:Z.sm,padding:Z.md},type:"submit",variant:"accent",children:[d.isPending&&(0,jt.jsx)(wt,{color:"accentButtonText",size:"sm"}),d.isPending?t.sending:t.submitButton]})]})]})}var ANn=mt({position:"absolute",right:Z.sm,top:"50%",transform:"translateY(-50%)"});var OV=T(_(),1);ye();ve();nt();Fe();ye();Ye();ve();St();nt();var ky=T(L(),1);function yce({selected:e,onSelect:t,options:n,children:r}){let o=$();return(0,ky.jsxs)("div",{children:[(0,ky.jsx)(S,{bg:"secondaryButtonBg",center:"y",flex:"row",p:"xxs",style:{borderRadius:te.lg,width:"100%"},children:n.map(i=>(0,ky.jsx)(ae,{onClick:()=>t(i.value),style:{alignItems:"center",backgroundColor:i.value===e?o.colors.modalBg:"transparent",borderRadius:te.md,display:"flex",flex:1,justifyContent:"center",paddingBlock:Z.sm,position:"relative"},type:"button",variant:"accent",children:(0,ky.jsx)(F,{color:i.value===e?"primaryText":"secondaryText",size:"sm",style:{textAlign:"center"},children:i.label})},i.value))}),(0,ky.jsx)(Q,{y:"sm"}),r]})}var Ox=T(L(),1),Mvt=e=>(0,Ox.jsxs)("svg",{fill:"none",height:e.size,role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[(0,Ox.jsx)("rect",{height:"18",rx:"2",ry:"2",width:"18",x:"3",y:"3"}),(0,Ox.jsx)("circle",{cx:"9",cy:"9",r:"2"}),(0,Ox.jsx)("path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"})]});tt();qe();xW();Zl();ve();$o();nt();Ye();var Co=T(_(),1);var _c=T(L(),1),kvt=e=>(0,_c.jsxs)("svg",{height:"16",role:"presentation",viewBox:"0 0 32 32",width:"16",...e,children:[(0,_c.jsx)("circle",{cx:"9",cy:"28.5",fill:"currentColor",r:"1.5"}),(0,_c.jsx)("path",{d:"M10 25H8v-4h2a2 2 0 0 0 0-4H8a2.002 2.002 0 0 0-2 2v.5H4V19a4.005 4.005 0 0 1 4-4h2a4 4 0 0 1 0 8Z",fill:"currentColor"}),(0,_c.jsx)("path",{d:"m27.7 9.3l-7-7A.908.908 0 0 0 20 2H10a2.006 2.006 0 0 0-2 2v8h2V4h8v6a2.006 2.006 0 0 0 2 2h6v16H14v2h12a2.006 2.006 0 0 0 2-2V10a.91.91 0 0 0-.3-.7ZM20 10V4.4l5.6 5.6Z",fill:"currentColor"})]}),Evt=e=>(0,_c.jsxs)("svg",{height:"16",role:"presentation",viewBox:"0 0 32 32",width:"16",...e,children:[(0,_c.jsx)("path",{d:"M29 31a.999.999 0 0 1-.625-.22L23.65 27H20a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1h3.65l4.726-3.78A1 1 0 0 1 30 17v13a1 1 0 0 1-1 1Zm-8-6h3a1 1 0 0 1 .625.22L28 27.92v-8.84l-3.376 2.7A1 1 0 0 1 24 22h-3Z",fill:"currentColor"}),(0,_c.jsx)("path",{d:"M16 28H8V4h8v6a2.006 2.006 0 0 0 2 2h6v3h2v-5a.91.91 0 0 0-.3-.7l-7-7A.909.909 0 0 0 18 2H8a2.006 2.006 0 0 0-2 2v24a2.006 2.006 0 0 0 2 2h8Zm2-23.6l5.6 5.6H18Z",fill:"currentColor"})]}),Pvt=e=>(0,_c.jsx)("svg",{height:"16",role:"presentation",viewBox:"0 0 32 32",width:"16",...e,children:(0,_c.jsx)("path",{d:"M12 6h-2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2zm10 0h-2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2z",fill:"currentColor"})}),Nvt=e=>(0,_c.jsx)("svg",{height:"16",role:"presentation",viewBox:"0 0 32 32",width:"16",...e,children:(0,_c.jsx)("path",{d:"M7 28a1 1 0 0 1-1-1V5a1 1 0 0 1 1.482-.876l20 11a1 1 0 0 1 0 1.752l-20 11A1 1 0 0 1 7 28Z",fill:"currentColor"})});tt();var Rvt=T(_(),1);CJ();Lm();var Rx="audio/mpeg",NV="audio/midi",DV="audio/ogg",wce="image/jpeg",Dvt={"*3gpp":"audio/3gpp","*jpm":"video/jpm","*mp3":"audio/mp3","*wav":"audio/wave","*x3db":"model/x3d+binary","*x3dv":"model/x3d+vrml","3g2":"video/3gpp2","3gp":"video/3gpp","3gpp":"video/3gpp","3mf":"model/3mf",adp:"audio/adpcm",amr:"audio/amr",apng:"image/apng",au:"audio/basic",avif:"image/avif",bmp:"image/bmp",cgm:"image/cgm",drle:"image/dicom-rle",emf:"image/emf",exr:"image/aces",fits:"image/fits",g3:"image/g3fax",gif:"image/gif",glb:"model/gltf-binary",gltf:"model/gltf+json",h261:"video/h261",h263:"video/h263",h264:"video/h264",heic:"image/heic",heics:"image/heic-sequence",heif:"image/heif",heifs:"image/heif-sequence",hej2:"image/hej2k",hsj2:"image/hsj2",htm:"text/html",html:"text/html",ief:"image/ief",iges:"model/iges",igs:"model/iges",jhc:"image/jphc",jls:"image/jls",jp2:"image/jp2",jpe:wce,jpeg:wce,jpf:"image/jpx",jpg:wce,jpg2:"image/jp2",jpgm:"video/jpm",jpgv:"video/jpeg",jph:"image/jph",jpm:"image/jpm",jpx:"image/jpx",jxr:"image/jxr",jxra:"image/jxra",jxrs:"image/jxrs",jxs:"image/jxs",jxsc:"image/jxsc",jxsi:"image/jxsi",jxss:"image/jxss",kar:NV,ktx:"image/ktx",ktx2:"image/ktx2",m1v:"video/mpeg",m2a:Rx,m2v:"video/mpeg",m3a:Rx,m4a:"audio/mp4",m4s:"video/iso.segment",mesh:"model/mesh",mid:NV,midi:NV,mj2:"video/mj2",mjp2:"video/mj2",mkv:"video/x-matroska",mov:"video/quicktime",mp2:Rx,mp2a:Rx,mp3:Rx,mp4:"video/mp4",mp4a:"audio/mp4",mp4v:"video/mp4",mpe:"video/mpeg",mpeg:"video/mpeg",mpg:"video/mpeg",mpg4:"video/mp4",mpga:Rx,msh:"model/mesh",mtl:"model/mtl",mxmf:"audio/mobile-xmf",obj:"model/obj",oga:DV,ogg:DV,ogv:"video/ogg",opus:DV,png:"image/png",qt:"video/quicktime",rmi:NV,s3m:"audio/s3m",sgi:"image/sgi",shtml:"text/html",sil:"audio/silk",silo:"model/mesh",snd:"audio/basic",spx:DV,stl:"model/stl",svg:"image/svg+xml",svgz:"image/svg+xml",t38:"image/t38",tfx:"image/tiff-fx",tif:"image/tiff",tiff:"image/tiff",ts:"video/mp2t",vrml:"model/vrml",wav:"audio/wav",weba:"audio/webm",webm:"video/webm",webp:"image/webp",wmf:"image/wmf",wrl:"model/vrml",x3d:"model/x3d+xml",x3db:"model/x3d+fastinfoset",x3dbz:"model/x3d+binary",x3dv:"model/x3d-vrml",x3dvz:"model/x3d+vrml",x3dz:"model/x3d+xml",xm:"audio/xm"};function Lvt(e){let t=e.replace(/^.*[/\\]/,"").toLowerCase(),n=t.replace(/^.*\./,"").toLowerCase(),r=t.length<e.length;return(n.length<t.length-1||!r)&&Dvt[n]||null}async function Ovt(e){if(!e)return;let t=Lvt(e);if(t)return t;let n=e.startsWith("blob:")?await fetch(e):await fetch(e,{method:"HEAD"});if(n.ok&&n.headers.has("content-type"))return n.headers.get("content-type")||void 0}function bce(e,t,n,r){let o=(0,Rvt.useMemo)(()=>{if(!t)return"";if(t.startsWith("ar://"))return vJ({gatewayUrl:r,uri:t});if(r)return t.replace("ipfs://",r);try{return ca({client:e,uri:t})}catch{return t.replace("ipfs://","https://ipfs.io/ipfs/")}},[t,r,e]),i=le({enabled:!!o&&!n,initialData:n,queryFn:()=>Ovt(o),queryKey:["mime-type",o]});return{isFetched:i.isFetched||!!n,mediaInfo:{mimeType:i.data||"image/",url:o}}}var gn=T(L(),1),Bvt=(0,Co.forwardRef)(function({src:t,poster:n,alt:r,gatewayUrl:o,requireInteraction:i=!1,width:a="300px",height:s="300px",style:l,mimeType:c,client:u,controls:d,className:f},m){let h={objectFit:"contain",...l},{mediaInfo:g,isFetched:w}=bce(u,t??void 0,c,o),{mediaInfo:b}=bce(u,n??void 0,void 0,o);if(!w||!t)return(0,gn.jsx)("div",{className:f,style:l});if(g.mimeType){if(g.mimeType.startsWith("text/html"))return(0,gn.jsx)(CNn,{alt:r,className:f,poster:b.url,ref:m,requireInteraction:i,src:g.url,style:h});if(g.mimeType.startsWith("model")&&(console.error("Encountered an unsupported media type. 3D model support was removed in v5.92.0. To add a 3D model to your app, use @google/model-viewer and use the ModelViewer component."),b.mimeType?.startsWith("image/")))return(0,gn.jsx)(jvt,{alt:r,className:f,height:s,ref:m,src:b.url,style:h,width:a});if(g.mimeType.startsWith("video"))return(0,gn.jsx)(xNn,{className:f,controls:d,poster:b.mimeType?.startsWith("image/")?b.url:void 0,ref:m,requireInteraction:i,src:g.url,style:h});if(g.mimeType.startsWith("audio"))return(0,gn.jsx)(vNn,{alt:r,className:f,controls:d,height:s,poster:b.url,ref:m,src:g.url,style:h,width:a});if(g.mimeType.startsWith("image/"))return(0,gn.jsx)(jvt,{alt:r,className:f,height:s,ref:m,src:g.url,style:h,width:a})}return(0,gn.jsx)(LV,{alt:r,className:f,ref:m,src:g.url,style:h})}),Ace=({onClick:e,isPlaying:t})=>{let[n,r]=(0,Co.useState)(!1);return(0,gn.jsx)("button",{onClick:e,onMouseDown:()=>r(!1),onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),onMouseUp:()=>r(!0),style:{backgroundColor:"#fff",border:"1px solid rgb(229, 232, 235)",borderRadius:"50%",bottom:0,color:"rgb(138, 147, 155)",cursor:"pointer",display:"grid",height:"32px",padding:0,placeItems:"center",position:"absolute",right:0,transform:"translate(-25%, -25%)",width:"32px",zIndex:3,...n?{boxShadow:"rgb(4 17 29 / 25%) 0px 0px 8px 0px",color:"rgb(53, 56, 64)"}:{}},type:"button",children:t?(0,gn.jsx)(Pvt,{}):(0,gn.jsx)(Nvt,{})})},jvt=(0,Co.forwardRef)(function(t,n){let{style:r,src:o,alt:i,className:a,height:s,width:l}=t,[c,u]=(0,Co.useState)(!1);return c?(0,gn.jsx)(LV,{alt:i,className:a,ref:n,src:o,style:r}):(0,gn.jsx)("img",{alt:i,className:a,height:s,onError:()=>{u(!0)},ref:n,src:o??void 0,style:r,width:l})}),xNn=(0,Co.forwardRef)(function({src:t,alt:n,poster:r,requireInteraction:o,style:i,width:a,height:s,controls:l,className:c},u){let d=(0,Co.useRef)(null),[f,m]=(0,Co.useState)(!o),[h,g]=(0,Co.useState)(!0),[w,b]=(0,Co.useState)(!1);return(0,Co.useEffect)(()=>{if(d.current)if(f)try{d.current.play()}catch(A){console.error("Error playing video",A)}else try{d.current.pause(),d.current.currentTime=0}catch(A){console.error("Error pausing video",A)}},[f]),w?(0,gn.jsx)(LV,{alt:n,className:c,ref:u,src:t,style:i}):(0,gn.jsxs)("div",{className:c,style:{position:"relative",...i},children:[(0,gn.jsx)("video",{controls:l,controlsList:"nodownload",height:s,loop:!0,muted:h,onCanPlay:()=>{f&&d.current?.play()},onError:()=>{b(!0)},playsInline:!0,poster:r??void 0,preload:r?"metadata":"auto",ref:zvt([d,u]),src:t??void 0,style:{height:"100%",objectFit:"contain",opacity:r?f?1:0:1,transition:"opacity .5s",width:"100%",zIndex:1},width:a}),r&&(0,gn.jsx)("img",{alt:n,src:r,style:{bottom:0,height:"100%",left:0,objectFit:"contain",opacity:f?0:1,pointerEvents:"none",position:"absolute",right:0,top:0,transition:"opacity .5s",width:"100%",zIndex:2}}),(0,gn.jsx)(Ace,{isPlaying:f,onClick:()=>{m(A=>!A),g(!1)}})]})}),vNn=(0,Co.forwardRef)(function({src:t,alt:n,poster:r,style:o,height:i,width:a,className:s,controls:l},c){let u=(0,Co.useRef)(null),[d,f]=(0,Co.useState)(!1),[m,h]=(0,Co.useState)(!0),[g,w]=(0,Co.useState)(!1);return(0,Co.useEffect)(()=>{u.current&&(d?u.current.play():(u.current.pause(),u.current.currentTime=0))},[d]),g?(0,gn.jsx)(LV,{alt:n,className:s,ref:c,src:t,style:o}):(0,gn.jsxs)("div",{className:s,style:{position:"relative",...o},children:[r?(0,gn.jsx)("img",{alt:n,height:i,src:r,style:{height:"100%",objectFit:"contain",pointerEvents:"none",width:"100%"},width:a}):(0,gn.jsx)("div",{style:{backgroundColor:"#fff",color:"rgb(138, 147, 155)",display:"grid",height:"100%",placeItems:"center",pointerEvents:"none",width:"100%"},children:(0,gn.jsx)(Evt,{style:{height:"64px",width:"64px"}})}),(0,gn.jsx)(Ace,{isPlaying:d,onClick:()=>{f(b=>!b),h(!1)}}),(0,gn.jsx)("audio",{controls:l,controlsList:"nodownload",loop:!0,muted:m,onError:()=>{w(!0)},playsInline:!0,preload:"none",ref:zvt([u,c]),src:t??void 0,style:{opacity:0,pointerEvents:"none",position:"absolute",visibility:"hidden",zIndex:-1}})]})}),CNn=(0,Co.forwardRef)(function({src:t,alt:n,poster:r,requireInteraction:o,style:i,...a},s){let[l,c]=(0,Co.useState)(!o);return(0,gn.jsxs)("div",{style:{position:"relative",...i},...a,children:[(0,gn.jsx)("iframe",{allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",ref:s,sandbox:"allow-scripts",src:l?t??void 0:void 0,style:{border:"none",height:"100%",objectFit:"contain",opacity:r?l?1:0:1,transition:"opacity .5s",width:"100%",zIndex:1},title:n||"thirdweb iframe player"}),r&&(0,gn.jsx)("img",{alt:n,src:r,style:{bottom:0,height:"100%",left:0,objectFit:"contain",opacity:l?0:1,pointerEvents:"none",position:"absolute",right:0,top:0,transition:"opacity .5s",width:"100%",zIndex:2}}),(0,gn.jsx)(Ace,{isPlaying:l,onClick:()=>{c(u=>!u)}})]})}),LV=(0,Co.forwardRef)(function({src:t,alt:n,style:r,className:o},i){return(0,gn.jsx)("div",{className:o,style:{position:"relative",...r},children:(0,gn.jsx)("div",{style:{backgroundColor:"#fff",color:"rgb(138, 147, 155)",display:"grid",height:"100%",placeItems:"center",width:"100%"},children:(0,gn.jsxs)("div",{style:{alignItems:"center",display:"flex",flexDirection:"column",flexWrap:"nowrap",gap:"8px"},children:[(0,gn.jsx)(kvt,{style:{aspectRatio:"1",maxWidth:"128px",minWidth:"48px",width:"50%"}}),(0,gn.jsx)("a",{href:t??void 0,ref:i,rel:"noopener noreferrer",style:{color:"rgb(138, 147, 155)",textDecoration:"underline"},target:"_blank",children:n||"File"})]})})})});function zvt(e){return t=>{for(let n of e)typeof n=="function"?n(t):n!=null&&(n.current=t)}}var Vn=T(L(),1);function Uvt(e){return(0,Vn.jsxs)(S,{style:{minHeight:"300px"},children:[(0,Vn.jsx)(S,{p:"lg",children:(0,Vn.jsx)(be,{onBack:e.onBack,title:e.connectLocale.viewFunds.viewNFTs})}),(0,Vn.jsx)(Wt,{}),(0,Vn.jsxs)(S,{px:"sm",scrollY:!0,style:{maxHeight:"500px"},children:[(0,Vn.jsx)(Q,{y:"md"}),(0,Vn.jsx)(xce,{...e})]})]})}function xce(e){let t=Xn(),n=cr(),r=le({enabled:!!n&&!!t,queryFn:async()=>{if(!t)throw new Error("No active account");if(!n)throw new Error("No active chain");return(await Uae({chains:[n],client:e.client,ownerAddress:t.address,contractAddresses:e.supportedNFTs?.[n.id]?.map(a=>a.toLowerCase())})).filter(a=>!!a.metadata.name&&!!a.metadata.image).map(a=>({address:a.tokenAddress,chain:We(a.chainId),...a}))},queryKey:["nfts",n?.id,t?.address,e.supportedNFTs]});if(!n?.id||!t?.address)return null;let o=r.data;return(0,Vn.jsxs)(Vn.Fragment,{children:[r.error?(0,Vn.jsx)(S,{center:"both",py:"lg",children:(0,Vn.jsx)(F,{center:!0,color:"secondaryText",size:"sm",children:"Error loading NFTs"})}):r.data?.length===0&&!r.isLoading?(0,Vn.jsx)(S,{center:"both",py:"lg",children:(0,Vn.jsx)(F,{center:!0,color:"secondaryText",size:"sm",children:"No NFTs found on this chain"})}):(0,Vn.jsx)(S,{style:{display:"grid",gap:"12px",gridTemplateColumns:"1fr 1fr"},children:r.isLoading||!o?(0,Vn.jsxs)(Vn.Fragment,{children:[(0,Vn.jsx)(Te,{height:"150px",width:"150px"}),(0,Vn.jsx)(Te,{height:"150px",width:"150px"}),(0,Vn.jsx)(Te,{height:"150px",width:"150px"})]}):o.map(i=>(0,Vn.jsx)(INn,{...i,chain:i.chain,client:e.client,theme:e.theme},`${i.chain.id}:${i.address}:${i.id}`))}),(0,Vn.jsx)(Q,{y:"lg"})]})}function INn(e){let t=typeof e.theme=="string"?e.theme:e.theme.type,n=typeof e.theme=="string"?void 0:e.theme,r=(0,Vn.jsxs)("div",{style:{alignItems:"center",display:"flex",flexDirection:"column",gap:"4px",width:"150px"},children:[(0,Vn.jsxs)("div",{style:{alignItems:"center",background:t==="light"?"rgba(0, 0, 0, 0.10)":"rgba(0, 0, 0, 0.20)",borderRadius:"8px",display:"flex",flexShrink:0,height:"150px",overflow:"hidden",position:"relative",width:"150px"},children:[e.metadata.image&&(0,Vn.jsx)(Bvt,{client:e.client,src:e.metadata.image,style:{height:"100%",width:"100%"}}),e.quantityOwned>1&&(0,Vn.jsx)("div",{style:{alignItems:"center",background:n?.colors?.modalBg??(t==="light"?"white":"black"),borderRadius:"100%",bottom:"4px",display:"flex",fontSize:"10px",height:"20px",justifyContent:"center",padding:"4px 4px",position:"absolute",right:"4px",width:"20px"},children:e.quantityOwned.toString()}),e.chain.icon&&(0,Vn.jsx)("img",{alt:e.chain.name,src:e.chain.icon.url,style:{bottom:"4px",height:"20px",left:"4px",position:"absolute",width:"20px"}})]}),(0,Vn.jsx)(F,{color:"primaryText",size:"xs",style:{fontWeight:600,maxLines:2,textAlign:"center"},children:e.metadata.name})]});return e.chain.name?(0,Vn.jsx)("a",{href:`https://thirdweb.com/${e.chain.id}/${e.address}/nfts/${e.id}`,rel:"noreferrer",target:"_blank",children:r}):r}tt();ryt();ye();mk();Zl();ve();$o();nt();Ye();var Tr=T(L(),1);function Hvt(e){return(0,Tr.jsxs)(S,{style:{minHeight:"300px"},children:[(0,Tr.jsx)(S,{p:"lg",children:(0,Tr.jsx)(be,{onBack:e.onBack,title:e.connectLocale.viewFunds.viewTokens})}),(0,Tr.jsx)(Wt,{}),(0,Tr.jsxs)(S,{px:"sm",scrollY:!0,style:{maxHeight:"500px"},children:[(0,Tr.jsx)(Q,{y:"md"}),(0,Tr.jsx)(Cce,{...e}),(0,Tr.jsx)(Q,{y:"lg"})]})]})}function Cce(e){let t=Xn(),n=cr(),r=e.supportedTokens||B5,o=(n?.id?r[n.id]:void 0)||[],i=le({enabled:!!n&&!!t&&(!e.supportedTokens||!e.supportedTokens[n.id]),queryFn:async()=>{if(!n)throw new Error("No active chain");if(!t)throw new Error("No account");return(await nyt({chains:[n],client:e.client,ownerAddress:t.address})).filter(s=>!B5[n.id]?.some(l=>l.address.toLowerCase()===s.tokenAddress.toLowerCase()))},queryKey:["tokens",n?.id,t?.address]});return!n||!t?null:(0,Tr.jsxs)(Tr.Fragment,{children:[(0,Tr.jsx)(vce,{chain:n,client:e.client,token:My}),o.map(a=>(0,Tr.jsx)(vce,{chain:n,client:e.client,token:a},a.address)),i.isLoading&&(0,Tr.jsxs)(S,{flex:"column",gap:"sm",p:"sm",children:[(0,Tr.jsx)(Te,{height:oe.md,width:"100%"}),(0,Tr.jsx)(Te,{height:oe.md,width:"100%"})]}),i.data?.map(a=>(0,Tr.jsx)(vce,{balanceData:a,chain:n,client:e.client,token:{address:a.tokenAddress,name:a.name??"",symbol:a.symbol??""}},a.tokenAddress))]})}function vce(e){let t=Xn(),n=C5({address:t?.address,chain:e.chain,client:e.client,tokenAddress:Md(e.token)?void 0:e.token.address},{enabled:e.balanceData===void 0}),r=Md(e.token)?n.data?.name:e.token.name;return(0,Tr.jsxs)(S,{flex:"row",gap:"sm",p:"sm",children:[(0,Tr.jsx)(Lx,{chain:e.chain,client:e.client,size:"lg",token:e.token}),(0,Tr.jsxs)(S,{flex:"column",gap:"xxs",children:[r?(0,Tr.jsx)(F,{color:"primaryText",size:"sm",children:r}):(0,Tr.jsx)(Te,{height:oe.md,width:"150px"}),e.balanceData?(0,Tr.jsxs)(F,{size:"xs",children:[" ",W0(e.balanceData)]}):n.data?(0,Tr.jsxs)(F,{size:"xs",children:[" ",W0(n.data)]}):(0,Tr.jsx)(Te,{height:oe.xs,width:"100px"})]})]})}var Pa=T(L(),1),Wvt={label:(0,Pa.jsxs)("span",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[(0,Pa.jsx)(Z5,{size:z.sm})," Tokens"]}),value:"Tokens"},Fvt={label:(0,Pa.jsxs)("span",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[(0,Pa.jsx)(Mvt,{size:z.sm})," NFTs"]}),value:"NFTs"};function Vvt(e){let{connectLocale:t}=e,n=(0,OV.useMemo)(()=>{if(!e.assetTabs)return[Wvt,Fvt];if(!e.assetTabs.length)return[];let i=[];for(let a of e.assetTabs)a==="token"?i.push(Wvt):a==="nft"&&i.push(Fvt);return i},[e.assetTabs]),[r,o]=(0,OV.useState)(n[0]?.value||"Tokens");return(0,Pa.jsxs)(S,{animate:"fadein",style:{minHeight:"300px"},children:[(0,Pa.jsx)(S,{p:"lg",children:(0,Pa.jsx)(be,{onBack:e.onBack,title:t.viewFunds.viewAssets})}),(0,Pa.jsx)(Wt,{}),(0,Pa.jsxs)(S,{px:"lg",scrollY:!0,style:{minHeight:"330px"},children:[(0,Pa.jsx)(Q,{y:"md"}),(0,Pa.jsx)(yce,{onSelect:o,options:n,selected:r,children:(0,Pa.jsxs)(S,{scrollY:!0,style:{maxHeight:"300px"},children:[r==="Tokens"&&(0,Pa.jsx)(Cce,{client:e.client,connectLocale:t,supportedTokens:e.supportedTokens}),r==="NFTs"&&(0,Pa.jsx)(xce,{client:e.client,connectLocale:t,supportedNFTs:e.supportedNFTs,theme:e.theme})]})}),(0,Pa.jsx)(Q,{y:"lg"})]})]})}Cn();tt();var Ece=T(_(),1);Mce();ye();ls();gse();ve();St();nt();Ye();Cn();ye();ve();St();nt();Ye();Ak();var ao=T(L(),1);function pCt(e){return(0,ao.jsxs)(S,{style:{minHeight:"300px"},children:[(0,ao.jsx)(S,{p:"lg",children:(0,ao.jsx)(be,{onBack:e.onBack,title:"Connect an App"})}),(0,ao.jsx)(Wt,{}),(0,ao.jsx)(S,{px:"lg",scrollY:!0,style:{maxHeight:"500px"},children:(0,ao.jsxs)(S,{py:"lg",style:{position:"relative"},children:[(0,ao.jsx)(S,{py:"md",children:(0,ao.jsx)(S5,{client:e.client,error:!!e.error,hideSpinner:!0,id:"walletConnect"})}),(0,ao.jsx)(S,{animate:"fadein",style:{animationDuration:"200ms"},children:e.error?(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsx)(F,{balance:!0,center:!0,multiline:!0,size:"sm",children:e.error}),(0,ao.jsx)(Q,{y:"md"}),(0,ao.jsx)(S,{animate:"fadein",center:"x",flex:"row",children:(0,ao.jsxs)(ae,{fullWidth:!0,onClick:()=>e.disconnect(),style:{alignItems:"center",gap:Z.xs},variant:"accent",children:[(0,ao.jsx)(A0,{height:z.sm,width:z.sm}),"Retry"]})})]}):(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsxs)(F,{balance:!0,center:!0,multiline:!0,size:"md",children:["Connected to ",e.session.origin??"another app."]}),(0,ao.jsx)(Q,{y:"xl"}),(0,ao.jsx)(ae,{fullWidth:!0,onClick:()=>{e.disconnect()},variant:"accent",children:"Disconnect"})]})})]})})]})}Ak();var Zn=T(L(),1);function fCt(e){let t=Mn(),[n,r]=(0,Ece.useState)(!1),[o,i]=(0,Ece.useState)(!1),a=da(),{data:s}=le({enabled:!!t,queryFn:async()=>{if(t)try{return await cCt({chains:e.chains,client:e.client,onConnect:()=>{r(!1),a.invalidateQueries({queryKey:["walletConnectSession"]})},onDisconnect:()=>{r(!1),a.invalidateQueries({queryKey:["walletConnectSession"]})},onError:f=>{i(f.message),r(!1)},wallet:t})}catch{i("Failed to establish WalletConnect connection");return}},queryKey:["walletConnectClient"],retry:!1}),{data:l,refetch:c}=le({enabled:!!s,queryFn:async()=>s&&(await dCt())[0]||null,queryKey:["walletConnectSession"]}),{mutateAsync:u}=Up({mutationFn:async()=>{if(!s||!l)throw new Error("No session");await Bx({session:l,walletConnectClient:s})},onError:d=>{console.error(d),i(d.message)},onSuccess:()=>{i(!1),a.invalidateQueries({queryKey:["walletConnectSession"]}),c()}});return l?(0,Zn.jsx)(pCt,{disconnect:u,error:o,...e,session:l}):(0,Zn.jsxs)(S,{style:{minHeight:"300px"},children:[(0,Zn.jsx)(S,{p:"lg",children:(0,Zn.jsx)(be,{onBack:e.onBack,title:"Connect an App"})}),(0,Zn.jsx)(Wt,{}),(0,Zn.jsx)(S,{px:"lg",scrollY:!0,style:{maxHeight:"500px"},children:(0,Zn.jsxs)(S,{py:"sm",style:{position:"relative"},children:[(0,Zn.jsx)(S,{py:"md",children:(0,Zn.jsx)(S5,{client:e.client,error:!!o,hideSpinner:!n,id:"walletConnect"})}),(0,Zn.jsx)(S,{animate:"fadein",style:{animationDuration:"200ms"},children:o?(0,Zn.jsxs)(Zn.Fragment,{children:[(0,Zn.jsx)(F,{balance:!0,center:!0,multiline:!0,size:"sm",children:o}),(0,Zn.jsx)(Q,{y:"md"}),(0,Zn.jsx)(S,{animate:"fadein",center:"x",flex:"row",children:(0,Zn.jsxs)(ae,{fullWidth:!0,onClick:()=>i(!1),style:{alignItems:"center",gap:Z.xs},variant:"accent",children:[(0,Zn.jsx)(A0,{height:z.sm,width:z.sm}),"Retry"]})})]}):(0,Zn.jsxs)(Zn.Fragment,{children:[(0,Zn.jsx)(F,{balance:!0,center:!0,multiline:!0,size:"sm",children:"Copy your connection URI from the external app."}),(0,Zn.jsx)(Q,{y:"xl"}),(0,Zn.jsx)(Mk,{disabled:n||!!o||!s,emptyErrorMessage:"Please enter a valid URI",name:"wcUri",onSelect:async d=>{if(r(!0),!s)i("No WalletConnect client found");else try{uCt({uri:d,walletConnectClient:s})}catch{i("Error creating WalletConnect session")}},placeholder:"WalletConnect URI",submitButtonText:"Connect",type:"text"})]})})]})}),(0,Zn.jsxs)(S,{children:[(0,Zn.jsx)(Q,{y:"lg"}),(0,Zn.jsx)(Wt,{}),(0,Zn.jsx)(S,{center:"x",flex:"row",p:"lg",children:(0,Zn.jsx)("a",{href:"https://blog.thirdweb.com/p/a62c0ef4-1d8f-424d-95b9-a006e5239849/",children:(0,Zn.jsx)(ae,{onClick:()=>{},variant:"link",children:"Where do I find the URI?"})})})]})]})}Cn();q4();ye();Zl();ls();ql();ve();St();nt();qc();Cn();tt();var hCt=T(_(),1);e3();qe();VR();zt();q4();Fe();ye();tt();k4();function mCt(e){return le({enabled:!!e?.transactionHash&&(e?.queryOptions?.enabled??!0),queryFn:async()=>{if(!e?.transactionHash)throw new Error("No transaction hash or user op hash provided");return Ou(e)},queryKey:["waitForReceipt",e?.chain.id||-1,e?.transactionHash],retry:!1})}ve();St();nt();_o();Ye();var wr=T(L(),1);function gCt(e){let t=cr(),n=_F(t),r=A_(e.address),o=(0,hCt.useSyncExternalStore)(r.subscribe,r.getValue),i=le({enabled:!!t,queryFn:()=>tIe({chain:t||Zu,client:e.client,walletAddress:e.address}),queryKey:["transactions",e.address,t]}),a=[...[...o].reverse(),...i.data||[]];return(0,wr.jsx)(S,{flex:"column",fullHeight:!0,scrollY:!0,style:{maxHeight:"370px",minHeight:"250px",paddingBottom:Z.lg},children:(0,wr.jsxs)(S,{expand:!0,flex:"column",gap:"xs",children:[i.isLoading&&(0,wr.jsxs)(S,{center:"both",color:"secondaryText",flex:"column",gap:"md",style:{flex:"1",minHeight:"250px"},children:[(0,wr.jsx)(wt,{color:"secondaryText",size:"md"}),(0,wr.jsx)(F,{children:"Loading recent transactions..."})]}),!i.isLoading&&a.length===0?(0,wr.jsxs)(S,{center:"both",color:"secondaryText",flex:"column",gap:"md",style:{flex:"1",minHeight:"250px"},children:[(0,wr.jsx)(Qs,{height:z.xl,width:z.xl}),(0,wr.jsx)(F,{children:"No Transactions"})]}):(0,wr.jsx)(S,{animate:"fadein",flex:"column",gap:"xs",style:{minHeight:"250px"},children:a.map(s=>(0,wr.jsx)(ENn,{client:e.client,explorerUrl:n.explorers[0]?.url,tx:s},s.transactionHash))})]})})}function ENn(e){let{data:t,isLoading:n,error:r}=mCt({chain:We(e.tx.chainId),client:e.client,queryOptions:{enabled:e.tx.receipt===void 0},transactionHash:e.tx.transactionHash}),o=xx(We(e.tx.chainId)),i=e.tx.receipt??t,a=e.tx.decoded,s=(0,wr.jsxs)(PNn,{fullWidth:!0,style:{paddingBlock:Z.sm},variant:"secondary",children:[(0,wr.jsxs)(S,{center:"y",flex:"row",gap:"md",style:{flex:1},children:[(0,wr.jsx)(PV,{chainIconUrl:o.url,client:e.client,size:z.lg}),(0,wr.jsxs)("div",{style:{display:"flex",flex:1,flexDirection:"column",justifyContent:"center"},children:[(0,wr.jsx)(S,{center:"y",flex:"row",gap:"xs",style:{justifyContent:"space-between"},children:(0,wr.jsx)(F,{color:"primaryText",size:"sm",children:a?a.name:"Transaction Sent"})}),(0,wr.jsx)(Q,{y:"xxs"}),(0,wr.jsx)(S,{center:"y",flex:"row",gap:"xxs",style:{justifyContent:"space-between"},children:(0,wr.jsx)(F,{color:"secondaryText",size:"xs",children:i?.to?Q6(i?.to,4):Q6(e.tx.transactionHash,4)})})]})]}),(0,wr.jsxs)(S,{center:"y",flex:"row",gap:"xxs",children:[n&&(0,wr.jsx)(wt,{color:"primaryText",size:"sm"}),!n&&i&&i.status==="success"&&(0,wr.jsx)(F,{color:"success",size:"md",children:(0,wr.jsx)(ad,{height:z.md,width:z.md})}),(r||!n&&i&&i.status!=="success")&&(0,wr.jsx)(F,{color:"danger",size:"md",children:(0,wr.jsx)(Qs,{height:z.md,width:z.md})})]})]});return e.explorerUrl?(0,wr.jsx)("a",{href:Dj(e.explorerUrl,e.tx.transactionHash),rel:"noreferrer",target:"_blank",children:s}):s}var PNn=Zt(ae)(()=>{let e=$();return{"&:hover":{background:e.colors.secondaryButtonBg},background:e.colors.tertiaryBg,height:"62px"}});var sc=T(L(),1);function yCt(e){let t=cr(),n=Mn(),r=Xn(),o=_F(t),i=t&&r&&n?{account:r,chain:t,wallet:n}:void 0;return i?(0,sc.jsxs)(S,{animate:"fadein",children:[(0,sc.jsx)(S,{p:"lg",children:(0,sc.jsx)(be,{onBack:e.onBack,title:e.locale.transactions})}),(0,sc.jsx)(Wt,{}),(0,sc.jsxs)(S,{px:"lg",scrollY:!0,style:{minHeight:"330px"},children:[(0,sc.jsx)(Q,{y:"md"}),(0,sc.jsx)(gCt,{address:i.account.address,client:e.client,locale:e.locale})]}),(0,sc.jsx)(Wt,{}),(0,sc.jsx)(S,{p:"lg",children:(0,sc.jsxs)(hW,{as:"a",fullWidth:!0,gap:"xs",href:_Se(o.explorers[0]?.url??"",r?.address??""),style:{color:"inherit",textDecoration:"none"},target:"_blank",variant:"outline",children:["View on Explorer",(0,sc.jsx)(mW,{height:z.sm,width:z.sm})]})})]}):(0,sc.jsx)(zn,{})}var J=T(L(),1),q5="tw-connected-wallet",NNn=1337,wCt=e=>{let{connectLocale:t,client:n}=e,r=(0,kd.useContext)(Mj),o=cr();function i(){r(null)}function a(){r((0,J.jsx)(iE,{assetTabs:e.detailsModal?.assetTabs,chains:e.chains,client:n,closeModal:i,connectOptions:e.connectOptions,detailsModal:e.detailsModal,displayBalanceToken:e.detailsButton?.displayBalanceToken,locale:t,onDisconnect:e.onDisconnect,supportedNFTs:e.supportedNFTs,supportedTokens:e.supportedTokens,theme:e.theme,showBalanceInFiat:e.detailsButton?.showBalanceInFiat}))}let s=e.chain&&o&&o.id!==e.chain.id;if(e.detailsButton?.render)return(0,J.jsx)("div",{onClick:a,children:(0,J.jsx)(e.detailsButton.render,{})});if(e.chain&&s)return(0,J.jsx)(UNn,{className:e.switchButton?.className,connectLocale:t,style:e.switchButton?.style,switchNetworkBtnTitle:e.switchButton?.label,targetChain:e.chain});let l=`${q5} ${e.detailsButton?.className||""}`,c=e.detailsButton?.displayBalanceToken?.[Number(o?.id)];return(0,J.jsxs)(RNn,{className:l,"data-test":"connected-wallet-details",onClick:a,style:e.detailsButton?.style,type:"button",children:[(0,J.jsx)(S,{style:{borderRadius:"100%",height:"35px",overflow:"hidden",width:"35px"},children:e.detailsButton?.connectedAccountAvatarUrl?(0,J.jsx)("img",{alt:"",src:e.detailsButton.connectedAccountAvatarUrl,style:{height:"100%",objectFit:"cover",width:"100%"}}):(0,J.jsx)(_k,{className:`${q5}__account_avatar`,fallbackComponent:(0,J.jsx)(Ty,{className:`${q5}__account_avatar`,size:35}),loadingComponent:(0,J.jsx)(Ty,{className:`${q5}__account_avatar`,size:35}),queryOptions:{refetchOnMount:!1,refetchOnWindowFocus:!1},style:{height:"100%",objectFit:"cover",width:"100%"}})}),(0,J.jsxs)(S,{flex:"column",gap:"4xs",style:{borderRadius:`0 ${te.md} ${te.md} 0`,textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[e.detailsButton?.connectedAccountName?(0,J.jsx)(F,{className:`${q5}__address`,color:"primaryText",size:"xs",weight:500,children:e.detailsButton.connectedAccountName}):(0,J.jsx)(F,{className:`${q5}__address`,color:"primaryText",size:"xs",weight:500,children:(0,J.jsx)($k,{fallbackComponent:(0,J.jsx)(Jk,{formatFn:Vi}),loadingComponent:(0,J.jsx)(Jk,{formatFn:Vi})})}),(0,J.jsx)(F,{className:`${q5}__balance`,color:"secondaryText",size:"xs",style:{alignItems:"center",display:"flex",gap:"2px"},weight:400,children:e.detailsButton?.showBalanceInFiat?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Iy,{chain:o,fallbackComponent:(0,J.jsx)(Te,{height:oe.xs,width:"50px"}),loadingComponent:(0,J.jsx)(Te,{height:oe.xs,width:"50px"}),tokenAddress:c}),(0,J.jsx)(Iy,{chain:o,formatFn:DNn,loadingComponent:(0,J.jsx)(Te,{height:oe.xs,width:"20px"}),showBalanceInFiat:"USD",tokenAddress:c})]}):(0,J.jsx)(Iy,{chain:o,fallbackComponent:(0,J.jsx)(Te,{height:oe.xs,width:"70px"}),formatFn:LNn,loadingComponent:(0,J.jsx)(Te,{height:oe.xs,width:"70px"}),tokenAddress:c})})]})]})};function DNn(e){return` (${Vk({...e,decimals:0})})`}function LNn(e){return`${Ix({...e,decimals:e.balance<1?5:4})}`}function iE(e){let[t,n]=(0,kd.useState)("main"),{disconnect:r}=j3(),[o,i]=(0,kd.useState)(!0),{client:a,locale:s}=e,l=cr(),c=Xn(),u=z$(e.theme),d=Mn(),f=oAt(l),m=H5(l),h=!d?.switchChain,g=nx({size:"compact",wallets:d?[d]:[],welcomeScreen:void 0}),w=(0,kd.useCallback)(()=>{i(!1),N3(()=>{e.closeModal()})},[e.closeModal]);function b(P){i(!1),e.closeModal(),e.onDisconnect(P)}(0,kd.useEffect)(()=>{c||w()},[c,w]);let{hideSendFunds:A,hideReceiveFunds:x,hideBuyFunds:v}=e.detailsModal||{},C=A&&x&&v,M=(0,J.jsxs)(S,{style:{height:`${z.xl}px`,position:"relative",width:`${z.xl}px`},children:[(0,J.jsx)(S,{style:{borderRadius:"100%",height:"100%",overflow:"hidden",width:"100%"},children:e.detailsModal?.connectedAccountAvatarUrl?(0,J.jsx)("img",{alt:"",src:e.detailsModal.connectedAccountAvatarUrl,style:{height:"100%",objectFit:"cover",width:"100%"}}):c&&(0,J.jsx)(_k,{fallbackComponent:(0,J.jsx)(Ty,{size:Number(z.xxl)}),loadingComponent:(0,J.jsx)(Ty,{size:Number(z.xxl)}),style:{height:"100%",objectFit:"cover",width:"100%"}})}),e.detailsModal?.hideSwitchWallet?null:(0,J.jsx)(S,{style:{bottom:-2,position:"absolute",right:-2},children:(0,J.jsx)(Fxt,{padding:"4px",style:{background:u.colors.modalBg},children:d&&(0,J.jsx)(jo,{client:a,id:d.id,size:"12",style:{borderRadius:0}})})})]}),I=(0,J.jsxs)("div",{className:`${q5}__default_modal_screen`,children:[(0,J.jsx)(Q,{y:"xs"}),(0,J.jsxs)(S,{center:"y",flex:"row",gap:"sm",px:"lg",style:{paddingBottom:C?Z.md:Z.lg,paddingTop:Z.lg},children:[e.detailsModal?.hideSwitchWallet?M:(0,J.jsx)(vy,{tip:"Switch wallet",children:(0,J.jsx)("div",{onClick:()=>{n("wallet-manager")},onKeyDown:P=>{P.key==="w"&&n("wallet-manager")},style:{cursor:"pointer"},children:M})}),(0,J.jsxs)(S,{flex:"column",gap:"3xs",children:[(0,J.jsxs)("div",{style:{alignItems:"center",display:"flex",gap:Z.xxs},children:[e.detailsModal?.connectedAccountName?(0,J.jsx)(F,{color:"primaryText",size:"md",weight:500,children:e.detailsModal.connectedAccountName}):(0,J.jsx)(F,{color:"primaryText",size:"md",weight:500,children:(0,J.jsx)($k,{fallbackComponent:(0,J.jsx)(Jk,{formatFn:Vi}),loadingComponent:(0,J.jsx)(Jk,{formatFn:Vi})})}),(0,J.jsx)(qs,{children:(0,J.jsx)(Nx,{text:c?.address||"",tip:s.copyAddress})})]}),(0,J.jsx)(zNn,{client:a,locale:s})]})]}),!C&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(S,{px:"lg",children:(0,J.jsxs)(S,{className:"tw-highlight-buttons",style:{display:"flex",gap:Z.xs},children:[!A&&(0,J.jsxs)(ae,{className:"tw-highlight-button__send",onClick:()=>{n("send")},style:{alignItems:"center",display:"flex",flex:1,fontSize:oe.sm,gap:Z.xs,padding:Z.sm},variant:"outline",children:[(0,J.jsx)(S,{center:"both",color:"secondaryText",flex:"row",children:(0,J.jsx)(e3t,{height:z.sm,style:{transform:"translateY(-10%) rotate(-45deg) "},width:z.sm})}),s.send]}),!x&&(0,J.jsxs)(ae,{className:"tw-highlight-button__receive",onClick:()=>{n("receive")},style:{alignItems:"center",display:"flex",flex:1,fontSize:oe.sm,gap:Z.xs,padding:Z.sm},variant:"outline",children:[(0,J.jsx)(S,{center:"both",color:"secondaryText",flex:"row",children:(0,J.jsx)(t3t,{height:z.sm,width:z.sm})}),s.receive]}),!v&&m.data&&!m.data.testnet&&(0,J.jsxs)(ae,{className:"tw-highlight-button__buy",onClick:()=>{Ki({client:a,event:"details_modal_buy_click",walletAddress:c?.address,walletType:d?.id}),n("buy")},style:{alignItems:"center",display:"flex",flex:1,fontSize:oe.sm,gap:Z.xs,padding:Z.sm},variant:"outline",children:[(0,J.jsx)(S,{center:"both",color:"secondaryText",flex:"row",children:(0,J.jsx)(NA,{height:z.sm,width:z.sm})}),s.buy]})]})}),(0,J.jsx)(Q,{y:"md"})]}),(0,J.jsxs)(S,{px:"md",children:[(0,J.jsxs)(S,{flex:"column",style:{gap:"1px"},children:[(0,J.jsx)(ONn,{client:e.client,disableSwitchChain:h,displayBalanceToken:e.displayBalanceToken,setScreen:()=>n("network-switcher"),showBalanceInFiat:e.detailsModal?.showBalanceInFiat}),(0,J.jsxs)(Xs,{className:"tw-view-transactions-button",onClick:()=>{n("transactions")},style:{fontSize:oe.sm},children:[(0,J.jsx)(o3t,{height:z.md,width:z.md}),(0,J.jsx)(S,{center:"y",flex:"row",gap:"xs",children:(0,J.jsx)(F,{color:"primaryText",children:s.transactions})})]}),(e.assetTabs===void 0||e.assetTabs.length>0)&&(0,J.jsxs)(Xs,{className:"tw-view-assets-button",onClick:()=>{n("view-assets")},style:{fontSize:oe.sm},children:[(0,J.jsx)(Z5,{size:z.md}),(0,J.jsx)(F,{color:"primaryText",children:s.viewFunds.viewAssets})]}),(0,J.jsxs)(Xs,{className:"tw-manage-wallet-button",onClick:()=>{n("manage-wallet")},style:{fontSize:oe.sm},children:[(0,J.jsx)(fd,{size:z.md}),(0,J.jsx)(F,{color:"primaryText",children:e.locale.manageWallet.title})]}),(e.detailsModal?.showTestnetFaucet??!1)&&(f.faucets.length>0||l?.id===NNn)&&(0,J.jsxs)(evt,{className:"tw-request-testnet-funds-button",as:"a",href:f.faucets?f.faucets[0]:"#",style:{color:"inherit",textDecoration:"none"},target:"_blank",children:[(0,J.jsx)(S,{center:"both",color:"secondaryText",flex:"row",children:(0,J.jsx)($xt,{size:z.md})}),s.requestTestnetFunds]}),e.detailsModal?.footer&&(0,J.jsx)(e.detailsModal.footer,{close:w})]}),(0,J.jsx)(Q,{y:"md"})]}),e.detailsModal?.hideDisconnect!==!0&&(0,J.jsxs)(S,{children:[(0,J.jsx)(Wt,{}),(0,J.jsx)(Q,{y:"sm"}),(0,J.jsx)(S,{px:"md",children:(0,J.jsxs)(Xs,{className:"tw-disconnect-wallet-button","data-variant":"danger",onClick:()=>{d&&c&&(r(d),b({account:c,wallet:d}))},type:"button",children:[(0,J.jsx)(_4t,{height:z.md,width:z.md}),(0,J.jsx)(F,{color:"primaryText",children:s.disconnectWallet})]})}),(0,J.jsx)(Q,{y:"sm"})]})]});if(t==="transactions"&&(I=(0,J.jsx)(yCt,{client:a,closeModal:w,locale:s,onBack:()=>n("main"),setScreen:n,title:s.buy})),t==="wallet-manager"&&c&&l&&d&&(I=(0,J.jsx)(rvt,{accountAbstraction:e.connectOptions?.accountAbstraction,activeAccount:c,activeChain:l,activeWallet:d,appMetadata:e.connectOptions?.appMetadata,chain:e.connectOptions?.chain,chains:e.connectOptions?.chains,client:a,connectLocale:s,hiddenWallets:e.connectOptions?.hiddenWallets,onBack:()=>n("main"),recommendedWallets:e.connectOptions?.recommendedWallets,showAllWallets:!!e.connectOptions?.showAllWallets,walletConnect:e.connectOptions?.walletConnect,wallets:e.connectOptions?.wallets})),t==="network-switcher")I=(0,J.jsx)(TV,{chains:l&&e.chains.find(P=>P.id===l.id)===void 0?[l,...e.chains]:e.chains,client:a,closeModal:w,connectLocale:s,networkSelector:e.detailsModal?.networkSelector,onBack:()=>{n("main")}});else if(t==="view-assets")I=(0,J.jsx)(Vvt,{assetTabs:e.detailsModal?.assetTabs,client:a,connectLocale:s,onBack:()=>{n("main")},setScreen:n,supportedNFTs:e.supportedNFTs,supportedTokens:e.supportedTokens,theme:e.theme});else if(t==="view-nfts")I=(0,J.jsx)(Uvt,{client:a,connectLocale:s,onBack:()=>{n("main")},supportedNFTs:e.supportedNFTs,theme:e.theme});else if(t==="view-tokens")I=(0,J.jsx)(Hvt,{client:a,connectLocale:s,onBack:()=>{n("main")},supportedTokens:e.supportedTokens});else if(t==="private-key")I=(0,J.jsx)(pvt,{client:a,connectLocale:s,onBack:()=>{n("manage-wallet")},theme:e.theme,wallet:d});else if(t==="manage-wallet")I=(0,J.jsx)(dvt,{client:a,closeModal:w,locale:s,onBack:()=>{n("main")},manageWallet:e.detailsModal?.manageWallet,setScreen:n});else if(t==="wallet-connect-receiver")I=(0,J.jsx)(fCt,{chains:e.chains,client:a,onBack:()=>{n("manage-wallet")}});else if(t==="linked-profiles")I=(0,J.jsx)(avt,{client:a,locale:s,onBack:()=>n("manage-wallet"),setScreen:n});else if(t==="link-profile")I=(0,J.jsx)(svt,{client:a,locale:s,onBack:()=>{n("linked-profiles")},walletConnect:e.connectOptions?.walletConnect});else if(t==="send")I=(0,J.jsx)(Svt,{client:a,connectLocale:s,onBack:()=>{n("main")},supportedTokens:e.supportedTokens});else if(t==="receive")I=(0,J.jsx)(mvt,{client:a,connectLocale:s,onBack:()=>{n("main")},walletId:d?.id});else if(t==="buy"){let P=e.detailsModal?.payOptions?.prefillBuy?.chain?.id||l?.id||e.chains[0]?.id||1;I=(0,J.jsx)(jV,{amount:e.detailsModal?.payOptions?.prefillBuy?.amount||"0.01",chain:We(P),client:a,hiddenWallets:e.detailsModal?.hiddenWallets,connectOptions:e.connectOptions,onCancel:()=>n("main"),onSuccess:()=>n("main"),supportedTokens:e.supportedTokens,theme:e.theme,style:{border:"none",borderRadius:te.lg},tokenAddress:e.displayBalanceToken?.[Number(P)]})}return(0,J.jsx)(Hu,{theme:e.theme,children:(0,J.jsx)(LH,{isOpen:!1,theme:e.theme,children:(0,J.jsx)(vk.Provider,{value:g,children:(0,J.jsx)(gf,{className:"tw-modal__wallet-details",title:"Manage Wallet",open:o,crossContainerStyles:{display:t==="buy"?"none":"block"},setOpen:P=>{P||(w(),e.detailsModal?.onClose&&e.detailsModal?.onClose(t))},size:"compact",children:c?.address&&(0,J.jsx)(px,{address:c.address,client:a,children:I})})})})})}function ONn(e){let{disableSwitchChain:t,setScreen:n,showBalanceInFiat:r,client:o}=e,i=cr();return i?(0,J.jsxs)(Xs,{className:"tw-internal-network-switcher-button tw-switch-network-button","data-variant":"primary",disabled:t,onClick:()=>{n("network-switcher")},type:"button",children:[(0,J.jsxs)(vV,{chain:i,children:[(0,J.jsx)("div",{style:{alignItems:"center",display:"flex",position:"relative"},children:(0,J.jsxs)(S,{style:{alignItems:"center",display:"flex",flexShrink:0,position:"relative"},children:[(0,J.jsx)(IV,{client:o,fallbackComponent:(0,J.jsx)("img",{alt:"",src:Sd,style:{height:`${z.md}px`,width:`${z.md}px`}}),loadingComponent:(0,J.jsx)(Te,{height:`${z.md}px`,width:`${z.md}px`}),style:{height:`${z.md}px`,width:`${z.md}px`}}),(0,J.jsx)(Tx,{className:"tw-chain-active-dot-details-button"})]})}),(0,J.jsxs)(F,{color:"primaryText",multiline:!0,size:"md",children:[(0,J.jsx)(eE,{fallbackComponent:(0,J.jsxs)("span",{children:["Unknown chain #",i?.id]}),loadingComponent:(0,J.jsx)(Te,{height:"16px",width:"150px"})}),(0,J.jsx)(F,{color:"secondaryText",size:"xs",children:r?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Iy,{chain:i,fallbackComponent:(0,J.jsx)(Te,{height:"1em",width:"70px"}),formatFn:a=>Ix({...a,decimals:7}),loadingComponent:(0,J.jsx)(Te,{height:"1em",width:"70px"}),tokenAddress:e.displayBalanceToken?.[Number(i?.id)]})," ",(0,J.jsx)(Iy,{chain:i,formatFn:a=>` (${Vk({...a,decimals:3})})`,loadingComponent:(0,J.jsx)(Te,{height:"1em",width:"30px"}),showBalanceInFiat:"USD",tokenAddress:e.displayBalanceToken?.[Number(i?.id)]})]}):(0,J.jsx)(Iy,{chain:i,fallbackComponent:(0,J.jsx)(Te,{height:"1em",width:"100px"}),formatFn:a=>Ix({...a,decimals:7}),loadingComponent:(0,J.jsx)(Te,{height:"1em",width:"100px"}),tokenAddress:e.displayBalanceToken?.[Number(i?.id)]})})]})]}),(0,J.jsx)(jNn,{height:z.sm,style:{flexShrink:0,marginLeft:"auto"},width:z.sm})]}):null}var RNn=Ia(e=>{let t=$();return{all:"unset","&:hover":{background:t.colors.connectedButtonBgHover,transition:"background 250ms ease"},alignItems:"center",animation:`${Ql} 300ms ease`,background:t.colors.connectedButtonBg,border:`1px solid ${t.colors.borderColor}`,borderRadius:te.md,boxSizing:"border-box",cursor:"pointer",display:"inline-flex",gap:Z.xs,height:"50px",lineHeight:"normal",minWidth:"165px",overflow:"hidden",padding:Z.xs,WebkitTapHighlightColor:"transparent"}}),jNn=Zt(K4t)(()=>({color:$().colors.secondaryText}));function BNn(e){let t=Xn(),n=Mn(),r=ju(n),o=cr(),{client:i,connectLocale:a}=e,[s,l]=(0,kd.useState)(!1);(0,kd.useEffect)(()=>{if(t&&r&&t.address&&o){let u=at({address:t.address,chain:o,client:i});Dc(u).then(d=>{l(d)})}else l(!1)},[t,o,i,r]);let c=(0,J.jsx)(S,{center:"y",flex:"row",gap:"3xs",children:(0,J.jsx)(F,{color:"secondaryText",size:"xs",weight:400,children:a.connectedToSmartWallet})});return o&&t&&r?(0,J.jsx)(J.Fragment,{children:s?(0,J.jsx)(k1,{color:"secondaryText",hoverColor:"primaryText",href:`https://thirdweb.com/${o.id}/${t.address}/account`,size:"sm",target:"_blank",children:c}):(0,J.jsxs)(F,{size:"sm",children:[" ",c]})}):null}function zNn(e){let{client:t,locale:n}=e,r=Xn(),o=Mn(),i=w5(),{data:a}=dd(o?.id),s=ju(o),{data:l}=le({enabled:!!o?.id&&!!a,queryFn:async()=>{let u=await gW(kn);return u==="guest"?"Guest":u&&(o?.id==="inApp"||o?.id==="smart")&&t3.includes(u)?u.slice(0,1).toUpperCase()+u.slice(1):a?.name},queryKey:["wallet-name",{walletAddress:r?.address,walletId:o?.id}]}),c=le({enabled:!!i,queryFn:async()=>{if(!(i&&(i.id==="inApp"||i.id.startsWith("ecosystem."))))return null;let d;if(yt(i)){let w=i,b=w.getConfig()?.partnerId;d={id:w.id,partnerId:b}}let{getUserEmail:f,getUserPhoneNumber:m}=await Promise.resolve().then(()=>(N0(),L6t)),[h,g]=await Promise.all([f({client:t,ecosystem:d}),m({client:t,ecosystem:d})]);return h||g||null},queryKey:["in-app-wallet-user",t,r?.address]});return!c.data&&s?(0,J.jsx)(BNn,{client:t,connectLocale:n}):c.data||l?(0,J.jsx)(F,{size:"xs",weight:400,children:c.data||l}):(0,J.jsx)(Te,{className:"InAppWalletUserInfo__skeleton",height:"10px",width:"50px"})}function UNn(e){let t=eV(),[n,r]=(0,kd.useState)(!1),o=e.connectLocale,i=e.switchNetworkBtnTitle??o.switchNetwork;return(0,J.jsx)(ae,{"aria-label":n?o.switchingNetwork:void 0,className:`tw-connect-wallet--switch-network ${e.className||""}`,"data-is-loading":n,"data-test":"switch-network-button",disabled:n,onClick:async()=>{r(!0);try{await t(e.targetChain)}catch(a){console.error(a)}r(!1)},style:{minWidth:"140px",...e.style},type:"button",variant:"primary",children:n?(0,J.jsx)(wt,{color:"primaryButtonText",size:"sm"}):i})}var Pce=T(L(),1),bCt=e=>(0,Pce.jsx)("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 16 21",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:(0,Pce.jsx)("path",{d:"M2 21C1.45 21 0.979333 20.8043 0.588 20.413C0.196 20.021 0 19.55 0 19V9C0 8.45 0.196 7.979 0.588 7.587C0.979333 7.19567 1.45 7 2 7H3V5C3 3.61667 3.48767 2.43733 4.463 1.462C5.43767 0.487333 6.61667 0 8 0C9.38333 0 10.5627 0.487333 11.538 1.462C12.5127 2.43733 13 3.61667 13 5V7H14C14.55 7 15.021 7.19567 15.413 7.587C15.8043 7.979 16 8.45 16 9V19C16 19.55 15.8043 20.021 15.413 20.413C15.021 20.8043 14.55 21 14 21H2ZM8 16C8.55 16 9.021 15.8043 9.413 15.413C9.80433 15.021 10 14.55 10 14C10 13.45 9.80433 12.979 9.413 12.587C9.021 12.1957 8.55 12 8 12C7.45 12 6.97933 12.1957 6.588 12.587C6.196 12.979 6 13.45 6 14C6 14.55 6.196 15.021 6.588 15.413C6.97933 15.8043 7.45 16 8 16ZM5 7H11V5C11 4.16667 10.7083 3.45833 10.125 2.875C9.54167 2.29167 8.83333 2 8 2C7.16667 2 6.45833 2.29167 5.875 2.875C5.29167 3.45833 5 4.16667 5 5V7Z",fill:"currentColor"})});var G5=T(_(),1);Zl();S1();M1();uf();var Nce=T(L(),1),HNn=e=>{let t=nx({size:e.size,wallets:e.wallets,welcomeScreen:e.welcomeScreen}),n=cs(),{screen:r,setScreen:o,initialScreen:i}=t,a=S9t(),s=OH(),[l,c]=(0,G5.useState)(!1),u=(0,G5.useCallback)(()=>{e.onClose?.(),s(!1),N3(()=>{o(i),n({})})},[i,s,o,n,e.onClose]),d=Xn();(0,G5.useEffect)(()=>{a||N3(()=>{c(!1)})},[a]);let f=(0,G5.useCallback)(m=>c(!m),[]);return(0,G5.useEffect)(()=>{a&&r===di.signIn&&!d&&(o(i),s(!1))},[i,a,r,s,o,d]),(0,Nce.jsx)(gf,{className:"tw-modal__connect-wallet",title:"Connect Wallet",hide:l,open:a,setOpen:m=>{l||m||u()},size:e.size,children:(0,Nce.jsx)(NF,{accountAbstraction:e.accountAbstraction,auth:e.auth,chain:e.chain,chains:e.chains,client:e.client,connectLocale:e.connectLocale,hideHeader:!1,isOpen:a,meta:e.meta,modalHeader:void 0,onClose:u,onConnect:e.onConnect,recommendedWallets:e.recommendedWallets,screenSetup:t,setModalVisibility:f,shouldSetActive:e.shouldSetActive,showAllWallets:e.showAllWallets,size:e.size,walletConnect:e.walletConnect,walletIdsToHide:e.hiddenWallets,wallets:e.wallets,welcomeScreen:e.welcomeScreen})})},ACt=HNn;var so=T(L(),1),Dce="tw-connect-wallet";function BV(e){let t=(0,Cf.useMemo)(()=>e.wallets||f5({appMetadata:e.appMetadata,chains:e.chains,executionMode:e.accountAbstraction?{mode:"EIP4337",smartAccount:e.accountAbstraction}:void 0}),[e.wallets,e.appMetadata,e.chains,e.accountAbstraction]),n=z3t(e.locale||"en_US"),r=Hw(),o=Xn(),i=Mn(),a=pA(i,o,e.auth),s=e.hiddenWallets||e.detailsModal?.hiddenWallets;P9t({wallets:t}),(0,Cf.useEffect)(()=>{e.chain&&r.defineChains([e.chain])},[e.chain,r]),(0,Cf.useEffect)(()=>{e.chains&&r.defineChains(e.chains)},[e.chains,r]);let l=(0,Cf.useMemo)(()=>!E9t()||t.length===1?"compact":e.connectModal?.size||"compact",[t.length,e.connectModal?.size]),c=e.accountAbstraction?.chain||e.chain||e.chains?.[0],u=e.autoConnect!==!1&&(0,so.jsx)(g3t,{accountAbstraction:e.accountAbstraction,appMetadata:e.appMetadata,chain:c,client:e.client,onConnect:e.onConnect,siweAuth:a,timeout:typeof e.autoConnect=="boolean"?void 0:e.autoConnect?.timeout,wallets:t});if(!n.data){let d=`${e.connectButton?.className||""} ${Dce}`;return(0,so.jsxs)(Lce,{className:d,disabled:!0,style:{height:"50px",minWidth:"165px",...e.connectButton?.style},type:"button",variant:"primary",children:[u,(0,so.jsx)(wt,{color:"primaryButtonText",size:"sm"})]})}return(0,so.jsxs)(LH,{isOpen:!1,theme:e.theme,children:[(0,so.jsx)(WNn,{...e,connectLocale:n.data,siweAuth:a}),(0,so.jsx)(ACt,{accountAbstraction:e.accountAbstraction,auth:e.auth,chain:c,chains:e.chains,client:e.client,connectLocale:n.data,hiddenWallets:s,localeId:e.locale||"en_US",meta:{privacyPolicyUrl:e.connectModal?.privacyPolicyUrl,requireApproval:e.connectModal?.requireApproval,showThirdwebBranding:e.connectModal?.showThirdwebBranding,termsOfServiceUrl:e.connectModal?.termsOfServiceUrl,title:e.connectModal?.title,titleIconUrl:e.connectModal?.titleIcon},onConnect:e.onConnect,recommendedWallets:e.recommendedWallets,shouldSetActive:!0,showAllWallets:e.showAllWallets,size:l,walletConnect:e.walletConnect,wallets:t,welcomeScreen:e.connectModal?.welcomeScreen}),u]})}function WNn(e){let t=e.siweAuth,n=Xn(),[r,o]=(0,Cf.useState)(!1),i=e.hiddenWallets||e.detailsModal?.hiddenWallets;(0,Cf.useEffect)(()=>{n||o(!1)},[n]);let a=e.theme||"dark",s=Owt(),l=e.connectLocale,c=s==="connecting",u=e.connectButton?.label||l.defaultButtonTitle,d=OH(),f=(0,Cf.useMemo)(()=>{if(!e.supportedTokens)return;let m={...B5};for(let h in e.supportedTokens){let g=Number(h),w=e.supportedTokens[g];w&&(m[g]=w)}return m},[e.supportedTokens]);if(!n){let m=`${e.connectButton?.className||""} ${Dce}`;return(0,so.jsx)(Lce,{"aria-label":s==="connecting"?l.connecting:typeof u=="string"?u:l.defaultButtonTitle,className:m,"data-is-loading":c,"data-test":"connect-wallet-button","data-theme":a,disabled:c,onClick:()=>{d(!0)},style:{fontSize:"16px",height:"50px",minWidth:"165px",...e.connectButton?.style},type:"button",variant:"primary",children:c?(0,so.jsx)(wt,{color:"primaryButtonText",size:"sm"}):u})}if(t.requiresAuth){if(t.isPending||t.isLoggingIn||t.isLoggingOut){let m=`${e.connectButton?.className||""} ${Dce}`;return(0,so.jsx)(Lce,{className:m,disabled:!0,style:{height:"50px",minWidth:"165px",...e.connectButton?.style},type:"button",variant:"primary",children:(0,so.jsx)(wt,{color:"primaryButtonText",size:"sm"})})}if(!t.isLoggedIn)return(0,so.jsxs)(so.Fragment,{children:[(0,so.jsx)(ae,{className:e.signInButton?.className,onClick:()=>{o(!0)},style:{minHeight:"50px",minWidth:"165px",...e.signInButton?.style},type:"button",variant:"primary",children:t.isLoggingIn?(0,so.jsx)(wt,{color:"primaryButtonText",size:"sm"}):(0,so.jsxs)(S,{center:"y",flex:"row",gap:"sm",children:[(0,so.jsx)(bCt,{size:z.sm}),(0,so.jsxs)("span",{children:[" ",e.signInButton?.label||l.signIn," "]})]})}),(0,so.jsx)(gf,{className:"tw-modal__sign-in",title:"Sign in",open:r,setOpen:o,size:"compact",children:(0,so.jsx)(qW,{auth:e.auth,client:e.client,connectLocale:l,modalSize:"compact",onDone:()=>o(!1),privacyPolicyUrl:e.connectModal?.privacyPolicyUrl,termsOfServiceUrl:e.connectModal?.termsOfServiceUrl})})]})}return(0,so.jsx)(px,{address:n.address,client:e.client,children:(0,so.jsx)(wCt,{chain:e.chain,chains:e?.chains||[],client:e.client,connectLocale:l,connectOptions:{accountAbstraction:e.accountAbstraction,appMetadata:e.appMetadata,chain:e.chain,chains:e.chains,connectModal:e.connectModal,hiddenWallets:i,recommendedWallets:e.recommendedWallets,showAllWallets:e.showAllWallets,walletConnect:e.walletConnect,wallets:e.wallets},detailsButton:e.detailsButton,detailsModal:{...e.detailsModal,hiddenWallets:i},onDisconnect:m=>{t.requiresAuth&&t.doLogout(),e.onDisconnect?.(m)},supportedNFTs:e.supportedNFTs,supportedTokens:f,switchButton:e.switchButton,theme:a})})}var Lce=Zt(ae)({animation:`${Ql} 300ms ease`});var Oce=T(L(),1),zV=e=>(0,Oce.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 18 18",width:e.size,height:e.size,role:"presentation",children:(0,Oce.jsx)("path",{fill:"currentColor",d:"M15.6 4.6H1.85v-.55l12.1-.968v.968h1.65V2.4c0-1.21-.98-2.059-2.177-1.888L2.378 2.089C1.18 2.26.2 3.39.2 4.6v11a2.2 2.2 0 002.2 2.2h13.2a2.2 2.2 0 002.2-2.2V6.8a2.2 2.2 0 00-2.2-2.2zm-1.65 7.707a1.65 1.65 0 01-.63-3.176 1.65 1.65 0 11.63 3.176z"})});sk();ty();ve();St();$o();nt();Ye();var UV=T(_(),1),Rce=640;function zx(){let[e,t]=UV.useState(void 0);return UV.useEffect(()=>{let n=window.matchMedia(`(max-width: ${Rce-1}px)`),r=()=>{t(window.innerWidth<Rce)};return n.addEventListener("change",r),t(window.innerWidth<Rce),()=>n.removeEventListener("change",r)},[]),!!e}qc();zt();Fe();ye();sse();ve();St();$3();var vCt=T(L(),1);function xCt({loadingComponent:e,fallbackComponent:t,queryOptions:n,...r}){let o=C6t({queryOptions:n});return o.isLoading?e||null:o.data?(0,vCt.jsx)("img",{src:o.data,...r,alt:r.alt}):t||null}var $c=T(L(),1);function HV(e){let t=e.activeWalletInfo.activeWallet,n=e.activeWalletInfo.activeAccount,r=(0,$c.jsx)(Ty,{style:{width:`${z.xs}px`,height:`${z.xs}px`,borderRadius:te.full}}),o=(0,$c.jsx)(xCt,{style:{width:`${z.xs}px`,height:`${z.xs}px`},fallbackComponent:r,loadingComponent:r});return(0,$c.jsx)(FNn,{variant:"ghost-solid",style:{paddingInline:Z.xxs,paddingBlock:"2px"},onClick:e.onClick,children:(0,$c.jsx)(px,{address:n.address,client:e.client,children:(0,$c.jsx)(a6t,{id:t.id,children:(0,$c.jsxs)(S,{flex:"row",gap:"xxs",center:"y",children:[(0,$c.jsx)(_k,{style:{width:`${z.xs}px`,height:`${z.xs}px`,borderRadius:te.full,objectFit:"cover"},fallbackComponent:o,loadingComponent:o}),(0,$c.jsx)("span",{style:{fontSize:oe.xs,letterSpacing:"0.025em"},children:(0,$c.jsx)($k,{fallbackComponent:(0,$c.jsx)("span",{children:Vi(n.address)}),loadingComponent:(0,$c.jsx)("span",{children:Vi(n.address)})})})]})})})})}var FNn=Zt(ae)(()=>{let e=$();return{color:e.colors.secondaryText,transition:"color 200ms ease","&:hover":{color:e.colors.primaryText}}});M5();var CCt=T(L(),1);function aE(e){let t=n=>{let r=n;r=r.replace(",","."),r.startsWith(".")&&(r=`0${r}`);let o=Number(r);Number.isNaN(o)||(r.length>1&&r.startsWith("0")&&!r.startsWith("0.")?e.setValue(r.slice(1)):e.setValue(r))};return(0,CCt.jsx)(Ys,{...e,inputMode:"decimal",onChange:n=>{t(n.target.value)},onClick:n=>{e.value===""&&n.currentTarget.setSelectionRange(n.currentTarget.value.length,n.currentTarget.value.length)},pattern:"^[0-9]*[.,]?[0-9]*$",placeholder:"0.0",type:"text",variant:"transparent"})}Cn();Fe();ye();ve();St();Sa();$o();Ye();function Ux(e){return e.replace("Mainnet","")}var ICt=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:5,minimumFractionDigits:2});var yi=T(L(),1);function WV(e){let t=$();return(0,yi.jsxs)(ae,{variant:"ghost-solid",hoverBg:"secondaryButtonBg",fullWidth:!0,onClick:e.onSelectToken,gap:"sm",style:{borderBottom:`1px dashed ${t.colors.borderColor}`,justifyContent:"space-between",paddingInline:Z.md,paddingBlock:Z.md,borderRadius:0},children:[(0,yi.jsxs)(S,{gap:"sm",flex:"row",center:"y",children:[(0,yi.jsxs)(S,{relative:!0,color:"secondaryText",children:[e.selectedToken&&!e.selectedToken.isError?(0,yi.jsx)(nn,{src:e.selectedToken?.data===void 0?void 0:e.selectedToken.data.iconUri||"",client:e.client,width:"40",height:"40",fallback:(0,yi.jsx)(S,{style:{background:`linear-gradient(45deg, white, ${t.colors.accentText})`,borderRadius:te.full,width:"40px",height:"40px"}}),style:{objectFit:"cover",borderRadius:te.full}},e.selectedToken?.data?.iconUri):(0,yi.jsx)(S,{style:{border:`1px solid ${t.colors.borderColor}`,background:`linear-gradient(45deg, white, ${t.colors.accentText})`,borderRadius:te.full,width:"40px",height:"40px"}}),e.chain&&(0,yi.jsx)(S,{bg:"modalBg",style:{padding:"2px",position:"absolute",bottom:-2,right:-2,display:"flex",borderRadius:te.full},children:(0,yi.jsx)(nn,{src:e.chain?.icon,client:e.client,width:z.sm,height:z.sm,style:{borderRadius:te.full}})})]}),e.selectedToken&&!e.selectedToken.isError?(0,yi.jsxs)(S,{flex:"column",style:{gap:"3px"},children:[e.selectedToken?.isFetching?(0,yi.jsx)(Te,{width:"60px",height:oe.md}):(0,yi.jsx)(F,{size:"md",color:"primaryText",weight:500,children:e.selectedToken?.data?.symbol}),e.chain?(0,yi.jsx)(F,{size:"xs",color:"secondaryText",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:Ux(e.chain.name)}):(0,yi.jsx)(Te,{width:"140px",height:oe.sm})]}):(0,yi.jsxs)(S,{flex:"column",style:{gap:"3px"},children:[(0,yi.jsx)(F,{size:"md",color:"primaryText",weight:500,children:"Select Token"}),(0,yi.jsx)(F,{size:"xs",color:"secondaryText",children:"Required"})]})]}),(0,yi.jsx)(S,{color:"secondaryText",flex:"row",center:"both",borderColor:"borderColor",style:{borderRadius:te.full,borderWidth:1,borderStyle:"solid",padding:Z.xs},children:(0,yi.jsx)(y5,{width:z.sm,height:z.sm})})]})}qe();Ps();zt();mk();function sE(e){return C5({address:e.walletAddress,chain:e.chainId?vt(e.chainId):void 0,client:e.client,tokenAddress:e.tokenAddress?ge(e.tokenAddress)===ge(Pr)?void 0:ge(e.tokenAddress):void 0})}tt();Ps();function TCt(e){return le({enabled:!!e.chainId,queryFn:async()=>{if(!e.chainId)throw new Error("Chain ID is required");let t=e.tokenAddress||Pr,n=await yf(e.client,t,e.chainId).catch(r=>{r.message.includes("not supported")||Promise.reject(r)});return n?{token:n,type:"success"}:{type:"unsupported_token"}},queryKey:["bridge.getToken",e],refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1})}Lm();Fe();ye();ve();nt();Ye();var Js=T(L(),1);function SCt(e){let t=$();return(0,Js.jsxs)(S,{flex:"column",children:[e.image&&(0,Js.jsx)("div",{className:"tw-header-image",style:{aspectRatio:"16/9",backgroundColor:t.colors.tertiaryBg,backgroundImage:`url(${VNn(e.client,e.image)})`,backgroundPosition:"center",backgroundSize:"cover",borderRadius:`${te.md} ${te.md} 0 0`,marginBottom:Z.xxs,overflow:"hidden",width:"100%"}}),(0,Js.jsxs)(S,{flex:"column",px:"md",children:[(0,Js.jsx)(Q,{y:"md"}),(e.title||e.description)&&(0,Js.jsxs)(Js.Fragment,{children:[e.title&&(0,Js.jsx)(F,{color:"primaryText",size:"lg",weight:500,trackingTight:!0,children:e.title}),e.description&&(0,Js.jsxs)(Js.Fragment,{children:[(0,Js.jsx)(Q,{y:"xxs"}),(0,Js.jsx)(F,{color:"secondaryText",size:"sm",multiline:!0,children:e.description})]}),(0,Js.jsx)(Q,{y:"md"})]}),e.children]})]})}function VNn(e,t){return t.startsWith("ipfs://")?ca({client:e,uri:t}):t}var MCt=T(_(),1);Zl();ls();function FV(){let e=Xn(),t=Mn(),n=cr();return(0,MCt.useMemo)(()=>e&&t&&n?{activeChain:n,activeWallet:t,activeAccount:e}:void 0,[e,t,n])}var Sf=T(_(),1);Go();Fe();ye();ve();St();Sa();$o();nt();_o();Ye();Bn();Ok();Cn();ye();ve();M5();var Hx=T(L(),1);function VV(e){return(0,Hx.jsxs)("div",{style:{position:"relative"},children:[(0,Hx.jsx)(S,{color:"secondaryText",children:(0,Hx.jsx)(PA,{width:z.md,height:z.md,style:{position:"absolute",left:Z.sm,top:"50%",borderRadius:te.lg,transform:"translateY(-50%)"}})}),(0,Hx.jsx)(Ys,{variant:"outline",placeholder:e.placeholder,value:e.value,sm:!0,style:{paddingLeft:"44px"},onChange:t=>e.onChange(t.target.value),autoFocus:e.autoFocus})]})}Cn();ye();St();Sa();var Wx=T(L(),1);function kCt(e){return(0,Wx.jsxs)(ae,{variant:"outline",bg:"tertiaryBg",fullWidth:!0,style:{justifyContent:"flex-start",fontWeight:500,fontSize:oe.md,padding:`${Z.sm} ${Z.sm}`,borderRadius:te.lg,minHeight:"48px"},gap:"sm",onClick:e.onClick,children:[(0,Wx.jsx)(nn,{src:e.selectedChain.icon,client:e.client,width:z.lg,height:z.lg}),(0,Wx.jsxs)("span",{children:[" ",Ux(e.selectedChain.name)," "]}),(0,Wx.jsx)(y5,{width:z.sm,height:z.sm,style:{marginLeft:"auto"}})]})}var OE=T(_(),1);ye();ve();St();Sa();$o();nt();Ye();tt();LE();function Tf(e){return le({queryKey:["bridge-chains"],queryFn:()=>ZV({client:e}),refetchOnMount:!1,refetchOnWindowFocus:!1})}var lo=T(L(),1);function ife(e){let t=Tf(e.client);return(0,lo.jsx)(uRn,{...e,isPending:t.isPending,onSelectChain:e.onSelectChain,chains:t.data??[]})}function uRn(e){let[t,n]=(0,OE.useState)(""),[r]=(0,OE.useState)(e.selectedChain),i=(0,OE.useMemo)(()=>r?[r,...e.chains.filter(a=>a.chainId!==r.chainId)]:e.chains,[e.chains,r]).filter(a=>a.name.toLowerCase().includes(t.toLowerCase()));return(0,lo.jsxs)(S,{fullHeight:!0,flex:"column",children:[e.isMobile&&(0,lo.jsxs)(lo.Fragment,{children:[(0,lo.jsx)(S,{px:"md",py:"md+",children:(0,lo.jsx)(be,{onBack:e.onBack,title:"Select Chain"})}),(0,lo.jsx)(Wt,{})]}),(0,lo.jsx)(Q,{y:"md"}),(0,lo.jsx)(S,{px:"md",style:{paddingBottom:0},children:(0,lo.jsx)(VV,{value:t,onChange:n,placeholder:"Search Chain"})}),(0,lo.jsx)(Q,{y:"sm"}),(0,lo.jsxs)(S,{expand:!0,px:"md",gap:e.isMobile?void 0:"xxs",flex:"column",style:{maxHeight:e.isMobile?"400px":"none",overflowY:"auto",scrollbarWidth:"none",paddingBottom:Z.md},children:[i.map(a=>(0,lo.jsx)(pRn,{chain:a,client:e.client,onClick:()=>e.onSelectChain(a),isSelected:a.chainId===e.selectedChain?.chainId,isMobile:e.isMobile},a.chainId)),e.isPending&&new Array(20).fill(0).map(()=>(0,lo.jsx)(dRn,{})),i.length===0&&!e.isPending&&(0,lo.jsx)("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:(0,lo.jsxs)(F,{color:"secondaryText",size:"md",center:!0,multiline:!0,children:['No chains found for "',t,'"']})})]})]})}function dRn(){return(0,lo.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:Z.sm,padding:`${Z.sm} ${Z.sm}`},children:[(0,lo.jsx)(Te,{height:`${z.lg}px`,width:`${z.lg}px`}),(0,lo.jsx)(Te,{height:oe.md,width:"160px"})]})}function pRn(e){return(0,lo.jsxs)(ae,{variant:e.isSelected?"secondary":"ghost-solid",fullWidth:!0,style:{justifyContent:"flex-start",fontWeight:500,fontSize:e.isMobile?oe.md:oe.sm,border:"1px solid transparent",padding:e.isMobile?void 0:`${Z.xs} ${Z.xs}`},onClick:e.onClick,gap:"sm",children:[(0,lo.jsx)(nn,{src:e.chain.icon,client:e.client,width:e.isMobile?z.lg:z.md,height:e.isMobile?z.lg:z.md,style:{borderRadius:te.full}}),Ux(e.chain.name)]})}tt();tV();zt();an();function GSt(e){return le({queryKey:["tokens",e],enabled:!!e.chainId,retry:!1,queryFn:()=>{if(!e.chainId)throw new Error("Chain ID is required");let t=e.search?eo(e.search):!1;return Cx({chainId:e.chainId,client:e.client,offset:e.offset,limit:e.limit,includePrices:!1,query:e.search&&!t?e.search:void 0,tokenAddress:e.search&&t?e.search:void 0})}})}function YSt(e){return le({queryKey:["bridge/v1/wallets",e],enabled:!!e.chainId&&!!e.walletAddress,queryFn:async()=>{if(!e.chainId||!e.walletAddress)throw new Error("invalid options");let n=Be("bridge").includes("thirdweb-dev"),r=new URL(`https://api.${n?"thirdweb-dev":"thirdweb"}.com/v1/wallets/${e.walletAddress}/tokens`);r.searchParams.set("chainId",e.chainId.toString()),r.searchParams.set("limit",e.limit.toString()),r.searchParams.set("page",e.page.toString()),r.searchParams.set("metadata","true"),r.searchParams.set("resolveMetadataLinks","true"),r.searchParams.set("includeSpam","false"),r.searchParams.set("includeNative","true"),r.searchParams.set("sortBy","usd_value"),r.searchParams.set("sortOrder","desc"),r.searchParams.set("includeWithoutPrice","false");let o=await fetch(r.toString(),{headers:{"x-client-id":e.clientId}});if(!o.ok)throw new Error(`Failed to fetch token balances: ${o.statusText}`);return(await o.json()).result},refetchOnMount:!1,retry:!1,refetchOnWindowFocus:!1})}var Ke=T(L(),1);function afe(e,t){if(t)return e.find(n=>n.chainId===t)}function RE(e){let t=Tf(e.client),[n,r]=(0,Sf.useState)(""),o=P5(n,500),[i,a]=(0,Sf.useState)(1e3),[s,l]=(0,Sf.useState)(void 0),c=s||(t.data?afe(t.data,e.selectedToken?.chainId)||afe(t.data,e.activeWalletInfo?.activeChain.id)||afe(t.data,1):void 0),u=GSt({client:e.client,chainId:c?.chainId,search:o,limit:i,offset:0}),d=YSt({clientId:e.client.clientId,chainId:c?.chainId,limit:i,page:1,walletAddress:e.activeWalletInfo?.activeAccount.address}),f=(0,Sf.useMemo)(()=>d.data?.tokens?.filter(h=>h.symbol.toLowerCase().includes(o.toLowerCase())||h.name.toLowerCase().includes(o.toLowerCase())||h.token_address.toLowerCase().includes(o.toLowerCase())),[d.data?.tokens,o]),m=u.isFetching||d.isFetching;return(0,Ke.jsx)(fRn,{...e,ownedTokens:f||[],allTokens:u.data||[],isFetching:m,selectedChain:c,setSelectedChain:l,search:n,setSearch:r,selectedToken:e.selectedToken,setSelectedToken:e.setSelectedToken,showMore:u.data?.length===i?()=>{a(i*2)}:void 0})}function fRn(e){let t=zx(),[n,r]=(0,Sf.useState)("select-token"),o=(0,Sf.useMemo)(()=>e.ownedTokens.sort((s,l)=>s.icon_uri&&!l.icon_uri?-1:!s.icon_uri&&l.icon_uri?1:0),[e.ownedTokens]),i=(0,Sf.useMemo)(()=>{let s=new Set(o.map(l=>`${l.token_address}-${l.chain_id}`.toLowerCase()));return e.allTokens.filter(l=>!s.has(`${l.address}-${l.chainId}`.toLowerCase()))},[e.allTokens,o]),a=(0,Sf.useMemo)(()=>i.sort((s,l)=>s.iconUri&&!l.iconUri?-1:!s.iconUri&&l.iconUri?1:0),[i]);return t?n==="select-token"?(0,Ke.jsx)(XSt,{onSelectToken:s=>{e.setSelectedToken(s),e.onClose()},selectedToken:e.selectedToken,isFetching:e.isFetching,ownedTokens:e.ownedTokens,otherTokens:a,showMore:e.showMore,selectedChain:e.selectedChain,isMobile:!0,onSelectChain:()=>r("select-chain"),client:e.client,search:e.search,setSearch:e.setSearch}):n==="select-chain"?(0,Ke.jsx)(ife,{isMobile:!0,onBack:()=>r("select-token"),client:e.client,onSelectChain:s=>{e.setSelectedChain(s),r("select-token")},selectedChain:e.selectedChain}):null:(0,Ke.jsxs)(S,{style:{display:"grid",gridTemplateColumns:"300px 1fr",height:"100%"},children:[(0,Ke.jsx)(hRn,{children:(0,Ke.jsx)(ife,{onBack:()=>r("select-token"),client:e.client,isMobile:!1,onSelectChain:s=>{e.setSelectedChain(s),r("select-token")},selectedChain:e.selectedChain})}),(0,Ke.jsx)(S,{flex:"column",relative:!0,scrollY:!0,children:(0,Ke.jsx)(XSt,{onSelectToken:s=>{e.setSelectedToken(s),e.onClose()},isMobile:!1,selectedToken:e.selectedToken,isFetching:e.isFetching,ownedTokens:e.ownedTokens,otherTokens:a,showMore:e.showMore,selectedChain:e.selectedChain,onSelectChain:()=>r("select-chain"),client:e.client,search:e.search,setSearch:e.setSearch})})]})}function mRn(){return(0,Ke.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:Z.sm,padding:`${Z.xs} ${Z.xs}`,height:"70px"},children:[(0,Ke.jsx)(Te,{height:`${z.lg}px`,width:`${z.lg}px`}),(0,Ke.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[(0,Ke.jsx)(Te,{height:oe.sm,width:"100px"}),(0,Ke.jsx)(Te,{height:oe.md,width:"200px"})]})]})}function KSt(e){let t=$(),n="balance"in e.token?go(BigInt(e.token.balance),e.token.decimals):void 0,r="balance"in e.token?e.token.price_data.price_usd*Number(n):void 0;return(0,Ke.jsxs)(ae,{variant:e.isSelected?"secondary":"ghost-solid",fullWidth:!0,style:{justifyContent:"flex-start",fontWeight:500,fontSize:oe.md,border:"1px solid transparent",padding:`${Z.xs} ${Z.xs}`,textAlign:"left",lineHeight:"1.5",borderRadius:te.lg},gap:"sm",onClick:async()=>{"balance"in e.token?e.onSelect({tokenAddress:e.token.token_address,chainId:e.token.chain_id}):e.onSelect({tokenAddress:e.token.address,chainId:e.token.chainId})},children:[(0,Ke.jsx)(nn,{src:("balance"in e.token?e.token.icon_uri:e.token.iconUri)||"",client:e.client,width:z.lg,height:z.lg,style:{flexShrink:0,borderRadius:te.full},fallback:(0,Ke.jsx)(S,{color:"secondaryText",children:(0,Ke.jsx)(S,{style:{background:`linear-gradient(45deg, white, ${t.colors.accentText})`,borderRadius:te.full,width:`${z.lg}px`,height:`${z.lg}px`}})})}),(0,Ke.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:Z["3xs"],flex:1},children:[(0,Ke.jsxs)(S,{flex:"row",style:{justifyContent:"space-between",width:"100%"},children:[(0,Ke.jsx)(F,{size:"md",color:"primaryText",weight:500,children:e.token.symbol}),"balance"in e.token&&(0,Ke.jsx)(F,{size:"md",color:"primaryText",children:ICt.format(Number(go(BigInt(e.token.balance),e.token.decimals)))})]}),(0,Ke.jsxs)(S,{flex:"row",style:{justifyContent:"space-between",width:"100%"},children:[(0,Ke.jsx)(F,{size:"xs",color:"secondaryText",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"200px"},children:e.token.name}),r&&(0,Ke.jsx)(S,{flex:"row",children:(0,Ke.jsxs)(F,{size:"xs",color:"secondaryText",weight:400,children:["$",r.toFixed(2)]})})]})]})]})}function XSt(e){let t=!e.isFetching&&e.otherTokens.length===0&&e.ownedTokens.length===0;return(0,Ke.jsxs)(S,{fullHeight:!0,flex:"column",children:[(0,Ke.jsxs)(S,{px:"md",pt:"md+",children:[(0,Ke.jsx)(F,{size:"lg",weight:600,color:"primaryText",trackingTight:!0,children:"Select Token"}),(0,Ke.jsx)(Q,{y:"3xs"}),(0,Ke.jsx)(F,{size:"xs",color:"secondaryText",multiline:!0,style:{textWrap:"pretty",maxWidth:"70%"},children:"Select a token from the list or search for a token by symbol or address"})]}),!e.selectedChain&&(0,Ke.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"400px"},children:(0,Ke.jsx)(wt,{color:"secondaryText",size:"xl"})}),e.selectedChain&&(0,Ke.jsxs)(Ke.Fragment,{children:[e.isMobile?(0,Ke.jsx)(S,{p:"md",children:(0,Ke.jsx)(kCt,{onClick:e.onSelectChain,selectedChain:e.selectedChain,client:e.client})}):(0,Ke.jsx)(Q,{y:"md"}),(0,Ke.jsx)(S,{px:"md",children:(0,Ke.jsx)(VV,{value:e.search,onChange:e.setSearch,placeholder:"Search by token or address",autoFocus:!e.isMobile})}),(0,Ke.jsx)(Q,{y:"xs"}),(0,Ke.jsxs)(S,{pb:"md",px:"md",expand:!0,gap:"xxs",flex:"column",style:{minHeight:"400px",maxHeight:e.isMobile?"450px":"none",overflowY:"auto",scrollbarWidth:"none",paddingBottom:Z.md},children:[e.isFetching&&new Array(20).fill(0).map((n,r)=>(0,Ke.jsx)(mRn,{},r)),!e.isFetching&&e.ownedTokens.length>0&&(0,Ke.jsxs)(S,{px:"xs",py:"xs",flex:"row",gap:"xs",center:"y",color:"secondaryText",children:[(0,Ke.jsx)(zV,{size:z.xs}),(0,Ke.jsx)(F,{size:"sm",color:"secondaryText",style:{overflow:"unset"},children:"Your Tokens"})]}),!e.isFetching&&e.ownedTokens.map(n=>(0,Ke.jsx)(KSt,{token:n,client:e.client,onSelect:e.onSelectToken,isSelected:!!e.selectedToken&&e.selectedToken.tokenAddress.toLowerCase()===n.token_address.toLowerCase()&&n.chain_id===e.selectedToken.chainId},n.token_address)),!e.isFetching&&e.ownedTokens.length>0&&(0,Ke.jsxs)(S,{px:"xs",py:"xs",flex:"row",gap:"xs",center:"y",color:"secondaryText",style:{marginTop:Z.sm},children:[(0,Ke.jsx)(Z5,{size:z.xs}),(0,Ke.jsx)(F,{size:"sm",color:"secondaryText",style:{overflow:"unset"},children:"Other Tokens"})]}),!e.isFetching&&e.otherTokens.map(n=>(0,Ke.jsx)(KSt,{token:n,client:e.client,onSelect:e.onSelectToken,isSelected:!!e.selectedToken&&e.selectedToken.tokenAddress.toLowerCase()===n.address.toLowerCase()&&n.chainId===e.selectedToken.chainId},n.address)),e.showMore&&(0,Ke.jsx)(ae,{variant:"secondary",fullWidth:!0,onClick:()=>{e.showMore?.()},children:"Load More"}),t&&(0,Ke.jsx)("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:(0,Ke.jsx)(F,{size:"md",color:"secondaryText",children:"No Tokens Found"})})]})]})]})}var hRn=mt(e=>{let t=$();return{display:"flex",flexDirection:"column",overflowY:"auto",...x0,borderRight:`1px solid ${t.colors.separatorLine}`,position:"relative"}});var He=T(L(),1);function JSt(e){let t=$(),n=FV(),r=e.receiverAddress??n?.activeAccount?.address,[o,i]=(0,sfe.useState)(!1),[a,s]=(0,sfe.useState)(!1),l=e.receiverAddress&&eo(e.receiverAddress)&&(n?.activeAccount?.address?Hd(e.receiverAddress)!==Hd(n?.activeAccount?.address):!0),c=TCt({tokenAddress:e.selectedToken?.tokenAddress,chainId:e.selectedToken?.chainId,client:e.client}),u=c.data?.type==="success"?c.data.token:void 0,d=sE({chainId:e.selectedToken?.chainId,tokenAddress:e.selectedToken?.tokenAddress,client:e.client,walletAddress:n?.activeAccount?.address}),f=l?"Pay":"Buy",m=zx(),h=!e.receiverAddress&&!n;return(0,He.jsxs)(SCt,{client:e.client,title:e.metadata.title,description:e.metadata.description,image:e.metadata.image,children:[o&&(0,He.jsx)(iE,{client:e.client,locale:R3,detailsModal:{hideBuyFunds:!0},theme:e.theme,closeModal:()=>{i(!1)},onDisconnect:()=>{e.onDisconnect?.()},chains:[],connectOptions:e.connectOptions}),(0,He.jsx)(gf,{hide:!1,className:"tw-modal__buy-widget",size:m?"compact":"wide",title:"Select Token",open:a,crossContainerStyles:{right:Z.md,top:Z["md+"],transform:"none"},setOpen:g=>s(g),autoFocusCrossIcon:!1,children:(0,He.jsx)(RE,{activeWalletInfo:n,onClose:()=>s(!1),client:e.client,selectedToken:e.selectedToken,setSelectedToken:g=>{e.setSelectedToken(g),s(!1)}})}),(0,He.jsxs)(S,{flex:"column",children:[(0,He.jsx)(gRn,{title:f,presetOptions:e.presetOptions,amountSelection:e.amountSelection,setAmount:e.setAmountSelection,activeWalletInfo:n,selectedToken:e.selectedToken?{data:c.data?.type==="success"?c.data.token:void 0,isFetching:c.isFetching,isError:c.isError||c.data?.type==="unsupported_token"}:void 0,balance:{data:d.data,isFetching:d.isFetching},client:e.client,isConnected:!!n,onSelectToken:()=>{s(!0)},onWalletClick:()=>{i(!0)},currency:e.currency}),r&&l&&(0,He.jsxs)(He.Fragment,{children:[(0,He.jsx)(wRn,{}),(0,He.jsx)(yRn,{address:r,client:e.client})]})]}),(0,He.jsx)(Q,{y:"md"}),(c.isError||c.data?.type==="unsupported_token")&&(0,He.jsx)("div",{style:{border:`1px solid ${t.colors.borderColor}`,borderRadius:te.full,padding:Z.xs,marginBottom:Z.md},children:(0,He.jsx)(F,{size:"sm",color:"danger",center:!0,children:"Failed to fetch token details"})}),h?(0,He.jsx)(BV,{client:e.client,connectButton:{label:e.buttonLabel||f,style:{width:"100%",borderRadius:te.full}},theme:t,...e.connectOptions}):(0,He.jsx)(ae,{disabled:!r,fullWidth:!0,onClick:()=>{if(!r||!u)return;let g=u.prices[e.currency],{tokenValue:w}=_St(e.amountSelection,g);w&&e.onContinue(String(w),u,ge(r))},style:{fontSize:oe.md,borderRadius:te.full},variant:"primary",children:e.buttonLabel||f}),e.showThirdwebBranding?(0,He.jsxs)("div",{children:[(0,He.jsx)(Q,{y:"md"}),(0,He.jsx)(hd,{link:"https://playground.thirdweb.com/payments/fund-wallet"})]}):(0,He.jsx)(Q,{y:"xxs"}),(0,He.jsx)(Q,{y:"md"})]})}function _St(e,t){let n=e.type==="usd"?e.value:t?t*Number(e.value):void 0,r=e.type==="token"?e.value:t?Number(e.value)/t:void 0;return{fiatValue:n,tokenValue:r}}function gRn(e){let t=$(),r=Tf(e.client).data?.find(s=>s.chainId===e.selectedToken?.data?.chainId),o=e.selectedToken?.data?.prices[e.currency],{fiatValue:i,tokenValue:a}=_St(e.amountSelection,o);return(0,He.jsxs)($St,{header:(0,He.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,He.jsx)(S,{flex:"row",center:"y",gap:"3xs",color:"secondaryText",children:(0,He.jsx)(F,{size:"xs",color:"primaryText",style:{letterSpacing:"0.07em",textTransform:"uppercase"},children:e.title})}),e.activeWalletInfo&&(0,He.jsx)(HV,{activeWalletInfo:e.activeWalletInfo,client:e.client,onClick:e.onWalletClick})]}),children:[(0,He.jsx)(WV,{selectedToken:e.selectedToken,client:e.client,onSelectToken:e.onSelectToken,chain:r}),(0,He.jsxs)(S,{px:"md",py:"md",children:[(0,He.jsx)(aE,{value:a?String(a):"",setValue:s=>{e.setAmount({type:"token",value:s})},style:{border:"none",boxShadow:"none",fontSize:oe.xl,fontWeight:500,paddingInline:0,paddingBlock:0,letterSpacing:"-0.025em"}}),(0,He.jsx)(Q,{y:"xs"}),(0,He.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"2px"},children:[(0,He.jsx)(F,{size:"md",color:"secondaryText",style:{flexShrink:0},children:jk(e.currency)}),e.selectedToken?.isFetching?(0,He.jsx)(Te,{width:"120px",height:"20px",style:{transform:"translateX(4px)"}}):(0,He.jsx)(aE,{value:String(i||0),setValue:s=>{e.setAmount({type:"usd",value:s})},style:{border:"none",boxShadow:"none",fontSize:oe.md,fontWeight:400,color:t.colors.secondaryText,paddingInline:0,height:"20px",paddingBlock:0}})]}),(0,He.jsx)(Q,{y:"md"}),(0,He.jsx)(S,{flex:"row",gap:"xxs",children:e.presetOptions.map(s=>(0,He.jsxs)(ae,{disabled:!e.selectedToken?.data,onClick:()=>e.setAmount({type:"usd",value:String(s)}),style:{backgroundColor:"transparent",color:t.colors.secondaryText,fontSize:oe.xs,fontWeight:400,borderRadius:te.full,gap:"0.5px",padding:`${Z.xxs} ${Z.sm}`},variant:"outline",children:[(0,He.jsx)("span",{children:jk(e.currency)}),(0,He.jsx)("span",{children:s})]},s))})]}),e.isConnected&&e.selectedToken&&(0,He.jsx)(S,{px:"md",py:"md",style:{borderTop:`1px dashed ${t.colors.borderColor}`,justifyContent:"start"},children:(0,He.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"3px"},children:[(0,He.jsx)(F,{size:"xs",color:"secondaryText",children:"Current Balance"}),e.balance.data===void 0?(0,He.jsx)(Te,{height:oe.xs,width:"100px"}):(0,He.jsxs)(F,{size:"xs",color:"primaryText",children:[zo(e.balance.data.value,e.balance.data.decimals,5)," ",e.balance.data.symbol]})]})})]})}function yRn(e){let t=UW({address:e.address,client:e.client});return(0,He.jsx)($St,{header:(0,He.jsx)(F,{size:"xs",color:"primaryText",style:{letterSpacing:"0.07em",textTransform:"uppercase"},children:"To"}),children:(0,He.jsxs)(S,{px:"md",py:"md",flex:"row",center:"y",gap:"xs",color:"secondaryText",children:[(0,He.jsx)(zV,{size:z.xs,color:"secondaryText"}),(0,He.jsx)(F,{size:"sm",color:"primaryText",children:t.data||Vi(e.address)}),(0,He.jsx)(Nx,{text:e.address,tip:"Copy address",iconSize:14})]})})}function $St(e){let t=$();return(0,He.jsxs)(S,{style:{borderRadius:te.xl,borderWidth:1,borderStyle:"solid",position:"relative",overflow:"hidden"},borderColor:"borderColor",children:[(0,He.jsx)(S,{bg:"tertiaryBg",style:{position:"absolute",inset:0,opacity:.5,zIndex:0}}),(0,He.jsx)(S,{style:{position:"relative",zIndex:1},children:(0,He.jsx)(S,{px:"md",py:"sm",relative:!0,children:e.header})}),(0,He.jsx)(S,{bg:"tertiaryBg",style:{position:"relative",overflow:"hidden",borderRadius:te.xl,borderTop:`1px solid ${t.colors.borderColor}`},children:e.children})]})}function wRn(){return(0,He.jsx)("div",{style:{display:"flex",justifyContent:"center",marginBlock:"-13px",zIndex:2,position:"relative"},children:(0,He.jsx)(S,{p:"xs",center:"both",flex:"row",color:"primaryText",bg:"modalBg",borderColor:"borderColor",style:{borderRadius:te.full,borderWidth:1,borderStyle:"solid"},children:(0,He.jsx)(q4t,{width:z["sm+"],height:z["sm+"]})})})}tt();var mMt=T(_(),1);qe();Fe();ye();ve();St();nt();Ye();qe();Fe();ye();tt();Vr();Ps();function eMt(e){let t=e;"source_metadata"in e&&(t=e.source_metadata);let n=t.settings.compilationTarget,r=Object.keys(n),o=n[r[0]],i={author:t.output.devdoc.author,details:t.output.devdoc.detail,notice:t.output.userdoc.notice,title:t.output.devdoc.title},a=[...new Set(Object.entries(t.sources).map(([,s])=>s.license))];return{abi:t?.output?.abi||[],info:i,isPartialAbi:t.isPartialAbi,licenses:a,metadata:t,name:o,zk_version:e.zk_version}}async function tMt(e){let{address:t,chain:n}=e,r=await fetch(`https://contract.thirdweb.com/metadata/${n.id}/${t}`,{headers:{"Content-Type":"application/json"},method:"GET"});if(!r.ok){let i=await r.json();throw new Error(i.message||i.error||"Failed to get compiler metadata")}let o=await r.json();return eMt(o)}ko();UR();Om();RR();Nt();Nu();Go();JR();function nMt({transaction:e,client:t,wallet:n}){let r=H5(e.chain),o=oTe(n);return le({enabled:!!e.to&&!!r.data,queryFn:async()=>{let i=at({address:e.to,chain:e.chain,client:t}),[a,s,l,c]=await Promise.all([tMt(i).catch(()=>null),pt(e.value),pt(e.erc20Value),Yi(e).catch(()=>"0x")]),[u,d]=await Promise.all([yf(t,l?.tokenAddress||Pr,e.chain.id),o?0n:l_(e).catch(()=>null)]),f={description:void 0,functionName:"Contract Call",selector:"0x"};if(a?.abi&&c.length>=10)try{let v=c.slice(0,10),C=a.abi,P=(Array.isArray(C)?C:[]).filter(E=>E&&typeof E=="object"&&"type"in E&&E.type==="function").map(E=>E).find(E=>Mi(E)===v);P&&(f={description:void 0,functionName:P.name,selector:v})}catch{}let h=await(async()=>u?u.decimals:l?c_({contract:at({address:l.tokenAddress,chain:e.chain,client:t})}):18)(),g=l?l.amountWei:s||0n,w=r.data?.nativeCurrency?.symbol||"ETH",b=u?.symbol||w,A=l&&l.tokenAddress.toLowerCase()!==Pr?l.amountWei:(s||0n)+(d||0n),x=go(A,h);return{contractMetadata:a,costWei:g,functionInfo:f,gasCostDisplay:d?`${zo(d,18)} ${w}`:null,gasCostWei:d,tokenInfo:u,totalCost:x,totalCostWei:A,txCostDisplay:`${zo(g,h)} ${b}`}},queryKey:["transaction-details",pe(e),o]})}Cn();ye();var rMt=T(_(),1),Q0=T(L(),1),oMt=e=>{let t=(0,rMt.useId)();return(0,Q0.jsxs)("svg",{"aria-hidden":"true",height:e.size,viewBox:"0 0 512 512",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[(0,Q0.jsx)("mask",{id:t,children:(0,Q0.jsx)("circle",{cx:"256",cy:"256",fill:"#fff",r:"256"})}),(0,Q0.jsxs)("g",{mask:`url(#${t})`,children:[(0,Q0.jsx)("path",{d:"M0 0v512h144l112-64 112 64h144V0H368L256 64 144 0Z",fill:"#d80027"}),(0,Q0.jsx)("path",{d:"M144 0h224v512H144Z",fill:"#eee"}),(0,Q0.jsx)("path",{d:"m301 289 44-22-22-11v-22l-45 22 23-44h-23l-22-34-22 33h-23l23 45-45-22v22l-22 11 45 22-12 23h45v33h22v-33h45z",fill:"#d80027"})]})]})};var iMt=T(_(),1),$5=T(L(),1),aMt=e=>{let t=(0,iMt.useId)();return(0,$5.jsxs)("svg",{"aria-hidden":"true",height:e.size,viewBox:"0 0 512 512",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[(0,$5.jsx)("mask",{id:t,children:(0,$5.jsx)("circle",{cx:"256",cy:"256",fill:"#fff",r:"256"})}),(0,$5.jsxs)("g",{mask:`url(#${t})`,children:[(0,$5.jsx)("path",{d:"M0 0h512v512H0z",fill:"#0052b4"}),(0,$5.jsx)("path",{d:"m256 100.2 8.3 25.5H291l-21.7 15.7 8.3 25.6-21.7-15.8-21.7 15.8 8.3-25.6-21.7-15.7h26.8zm-110.2 45.6 24 12.2 18.9-19-4.2 26.5 23.9 12.2-26.5 4.2-4.2 26.5-12.2-24-26.5 4.3 19-19zM100.2 256l25.5-8.3V221l15.7 21.7 25.6-8.3-15.8 21.7 15.8 21.7-25.6-8.3-15.7 21.7v-26.8zm45.6 110.2 12.2-24-19-18.9 26.5 4.2 12.2-23.9 4.2 26.5 26.5 4.2-24 12.2 4.3 26.5-19-19zM256 411.8l-8.3-25.5H221l21.7-15.7-8.3-25.6 21.7 15.8 21.7-15.8-8.3 25.6 21.7 15.7h-26.8zm110.2-45.6-24-12.2-18.9 19 4.2-26.5-23.9-12.2 26.5-4.2 4.2-26.5 12.2 24 26.5-4.3-19 19zM411.8 256l-25.5 8.3V291l-15.7-21.7-25.6 8.3 15.8-21.7-15.8-21.7 25.6 8.3 15.7-21.7v26.8zm-45.6-110.2-12.2 24 19 18.9-26.5-4.2-12.2 23.9-4.2-26.5-26.5-4.2 24-12.2-4.3-26.5 19 19z",fill:"#ffda44"})]})]})};var Bi=T(L(),1),sMt=e=>(0,Bi.jsxs)("svg",{"aria-hidden":"true",height:e.size,version:"1.1",viewBox:"0 0 512 512",width:e.size,x:"0px",xmlns:"http://www.w3.org/2000/svg",y:"0px",children:[(0,Bi.jsx)("circle",{cx:"256",cy:"256",fill:"#F0F0F0",r:"256"}),(0,Bi.jsxs)("g",{children:[(0,Bi.jsx)("path",{d:"M52.92,100.142c-20.109,26.163-35.272,56.318-44.101,89.077h133.178L52.92,100.142z",fill:"#0052B4"}),(0,Bi.jsx)("path",{d:"M503.181,189.219c-8.829-32.758-23.993-62.913-44.101-89.076l-89.075,89.076H503.181z",fill:"#0052B4"}),(0,Bi.jsx)("path",{d:"M8.819,322.784c8.83,32.758,23.993,62.913,44.101,89.075l89.074-89.075L8.819,322.784L8.819,322.784 z",fill:"#0052B4"}),(0,Bi.jsx)("path",{d:"M411.858,52.921c-26.163-20.109-56.317-35.272-89.076-44.102v133.177L411.858,52.921z",fill:"#0052B4"}),(0,Bi.jsx)("path",{d:"M100.142,459.079c26.163,20.109,56.318,35.272,89.076,44.102V370.005L100.142,459.079z",fill:"#0052B4"}),(0,Bi.jsx)("path",{d:"M189.217,8.819c-32.758,8.83-62.913,23.993-89.075,44.101l89.075,89.075V8.819z",fill:"#0052B4"}),(0,Bi.jsx)("path",{d:"M322.783,503.181c32.758-8.83,62.913-23.993,89.075-44.101l-89.075-89.075V503.181z",fill:"#0052B4"}),(0,Bi.jsx)("path",{d:"M370.005,322.784l89.075,89.076c20.108-26.162,35.272-56.318,44.101-89.076H370.005z",fill:"#0052B4"})]}),(0,Bi.jsxs)("g",{children:[(0,Bi.jsx)("path",{d:"M509.833,222.609h-220.44h-0.001V2.167C278.461,0.744,267.317,0,256,0 c-11.319,0-22.461,0.744-33.391,2.167v220.44v0.001H2.167C0.744,233.539,0,244.683,0,256c0,11.319,0.744,22.461,2.167,33.391 h220.44h0.001v220.442C233.539,511.256,244.681,512,256,512c11.317,0,22.461-0.743,33.391-2.167v-220.44v-0.001h220.442 C511.256,278.461,512,267.319,512,256C512,244.683,511.256,233.539,509.833,222.609z",fill:"#D80027"}),(0,Bi.jsx)("path",{d:"M322.783,322.784L322.783,322.784L437.019,437.02c5.254-5.252,10.266-10.743,15.048-16.435 l-97.802-97.802h-31.482V322.784z",fill:"#D80027"}),(0,Bi.jsx)("path",{d:"M189.217,322.784h-0.002L74.98,437.019c5.252,5.254,10.743,10.266,16.435,15.048l97.802-97.804 V322.784z",fill:"#D80027"}),(0,Bi.jsx)("path",{d:"M189.217,189.219v-0.002L74.981,74.98c-5.254,5.252-10.266,10.743-15.048,16.435l97.803,97.803 H189.217z",fill:"#D80027"}),(0,Bi.jsx)("path",{d:"M322.783,189.219L322.783,189.219L437.02,74.981c-5.252-5.254-10.743-10.266-16.435-15.047 l-97.802,97.803V189.219z",fill:"#D80027"})]})]});var tv=T(L(),1),lMt=e=>(0,tv.jsx)("svg",{height:e.size,role:"presentation",viewBox:"0 0 32 32",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:(0,tv.jsxs)("g",{fill:"none",fillRule:"evenodd",children:[(0,tv.jsx)("circle",{cx:"16",cy:"16",fill:"#a81b1b",r:"16"}),(0,tv.jsx)("path",{d:"M17.548 18.711v1.878h5.063v2.288h-5.063V25.5h-3.096v-2.623H9.389v-2.288h5.063v-1.878H9.389v-2.288h4.171L7.5 7.5h3.752l4.8 7.534L20.853 7.5H24.5l-6.086 8.923h4.197v2.288z",fill:"#ffffff"})]})});var Mf=T(L(),1),cMt=e=>(0,Mf.jsxs)("svg",{"aria-hidden":"true",height:e.size,version:"1.1",viewBox:"0 0 512 512",width:e.size,x:"0px",xmlns:"http://www.w3.org/2000/svg",y:"0px",children:[(0,Mf.jsx)("circle",{cx:"256",cy:"256",fill:"#F0F0F0",r:"256"}),(0,Mf.jsxs)("g",{children:[(0,Mf.jsx)("path",{d:"M244.87,256H512c0-23.106-3.08-45.49-8.819-66.783H244.87V256z",fill:"#D80027"}),(0,Mf.jsx)("path",{d:"M244.87,122.435h229.556c-15.671-25.572-35.708-48.175-59.07-66.783H244.87V122.435z",fill:"#D80027"}),(0,Mf.jsx)("path",{d:"M256,512c60.249,0,115.626-20.824,159.356-55.652H96.644C140.374,491.176,195.751,512,256,512z",fill:"#D80027"}),(0,Mf.jsx)("path",{d:"M37.574,389.565h436.852c12.581-20.529,22.338-42.969,28.755-66.783H8.819 C15.236,346.596,24.993,369.036,37.574,389.565z",fill:"#D80027"})]}),(0,Mf.jsx)("path",{d:"M118.584,39.978h23.329l-21.7,15.765l8.289,25.509l-21.699-15.765L85.104,81.252l7.16-22.037 C73.158,75.13,56.412,93.776,42.612,114.552h7.475l-13.813,10.035c-2.152,3.59-4.216,7.237-6.194,10.938l6.596,20.301l-12.306-8.941 c-3.059,6.481-5.857,13.108-8.372,19.873l7.267,22.368h26.822l-21.7,15.765l8.289,25.509l-21.699-15.765l-12.998,9.444 C0.678,234.537,0,245.189,0,256h256c0-141.384,0-158.052,0-256C205.428,0,158.285,14.67,118.584,39.978z M128.502,230.4 l-21.699-15.765L85.104,230.4l8.289-25.509l-21.7-15.765h26.822l8.288-25.509l8.288,25.509h26.822l-21.7,15.765L128.502,230.4z M120.213,130.317l8.289,25.509l-21.699-15.765l-21.699,15.765l8.289-25.509l-21.7-15.765h26.822l8.288-25.509l8.288,25.509h26.822 L120.213,130.317z M220.328,230.4l-21.699-15.765L176.93,230.4l8.289-25.509l-21.7-15.765h26.822l8.288-25.509l8.288,25.509h26.822 l-21.7,15.765L220.328,230.4z M212.039,130.317l8.289,25.509l-21.699-15.765l-21.699,15.765l8.289-25.509l-21.7-15.765h26.822 l8.288-25.509l8.288,25.509h26.822L212.039,130.317z M212.039,55.743l8.289,25.509l-21.699-15.765L176.93,81.252l8.289-25.509 l-21.7-15.765h26.822l8.288-25.509l8.288,25.509h26.822L212.039,55.743z",fill:"#0052B4"})]});var hZ=T(L(),1),bRn={countryCode:"US",icon:cMt,name:"US Dollar",shorthand:"USD",symbol:"$"},ARn=[bRn,{countryCode:"CA",icon:oMt,name:"Canadian Dollar",shorthand:"CAD",symbol:"$"},{countryCode:"GB",icon:sMt,name:"British Pound",shorthand:"GBP",symbol:"\xA3"},{countryCode:"EU",icon:aMt,name:"Euro",shorthand:"EUR",symbol:"\u20AC"},{countryCode:"JP",icon:lMt,name:"Japanese Yen",shorthand:"JPY",symbol:"\xA5"},{countryCode:"AU",name:"Australian Dollar",shorthand:"AUD",symbol:"$"},{countryCode:"NZ",name:"New Zealand Dollar",shorthand:"NZD",symbol:"$"}];function xRn(e){return ARn.find(t=>t.shorthand.toLowerCase()===e.toLowerCase())??{countryCode:"US",icon:CRn,name:e,shorthand:e,symbol:"$"}}function vRn(e,t){return e.icon?(0,hZ.jsx)(e.icon,{size:z[t]}):(0,hZ.jsx)("img",{alt:e.shorthand,height:z[t],src:`https://flagsapi.com/${e.countryCode.toUpperCase()}/flat/64.png`,width:z[t]})}function uMt(e){return vRn(xRn(e.currency),e.size)}var CRn=e=>(0,hZ.jsx)(n3t,{height:e.size,width:e.size});tt();ye();$o();Ye();Ok();var lfe=T(L(),1);function gZ(e){let t=P5(e.tokenAmount,500),n=le({queryFn:()=>nV({chain:e.chain,client:e.client,fromAmount:Number(t),fromTokenAddress:mce(e.token),to:e.currency||"USD"}),queryKey:["cryptoToFiat",e.chain.id,mce(e.token),t,e.currency]});return n.isLoading?(0,lfe.jsx)(Te,{height:oe.lg,width:"50px"}):n.data?.result?(0,lfe.jsx)(F,{...e,trackingTight:!0,children:xf(e.currency||"USD",n.data.result)}):null}Cn();Fe();ve();var yZ=T(L(),1);function dMt(){let e=$();return(0,yZ.jsx)(S,{center:"both",flex:"row",style:{marginBottom:"-10px",marginTop:"-10px",position:"relative",width:"100%",zIndex:1e3},children:(0,yZ.jsx)(S,{center:"both",color:"primaryText",flex:"row",style:{backgroundColor:e.colors.modalBg,border:`1px solid ${e.colors.borderColor}`,borderRadius:"100%",height:"30px",width:"30px"},children:(0,yZ.jsx)(y5,{height:16,width:16})})})}zt();ai();Um();ye();M0();ve();$o();Ye();md();JA();var W1=T(L(),1);function jE(e){let{client:t,address:n}=e,r=Gl(),o=MV({client:t}),i=r.find(u=>u.getAccount()?.address?.toLowerCase()===n.toLowerCase()),a=i&&(i.id==="inApp"||yt(i)||ju(i))?o.data?.find(u=>!!u.details.email)?.details.email:void 0,s=dd(i?.id),l=UW({address:n,client:t}),c=n?l.data||Vi(n):"";return(0,W1.jsx)(S,{flex:"row",style:{justifyContent:"space-between"},children:(0,W1.jsxs)(S,{center:"y",color:"secondaryText",flex:"row",gap:"md",children:[i?(0,W1.jsx)(jo,{client:e.client,id:i.id,size:z[e.iconSize||"md"]}):(0,W1.jsx)(fd,{size:z[e.iconSize||"md"]}),(0,W1.jsxs)(S,{flex:"column",gap:"3xs",children:[e.label?(0,W1.jsx)(F,{color:"secondaryText",size:"xs",children:e.label}):null,(0,W1.jsx)(F,{color:"primaryText",size:e.textSize||"xs",children:c||Vi(e.address)}),o.isLoading?(0,W1.jsx)(Te,{height:oe.sm,width:"100px"}):a||s?.data?.name?(0,W1.jsx)(F,{color:"secondaryText",size:"xs",children:a||s?.data?.name}):null]})]})})}ve();Ye();qc();qe();Fe();ye();ve();St();Ye();var pMt=T(_(),1);qe();Ps();Lm();Fe();ye();$3();ve();ye();$o();Ye();var cfe=T(L(),1),wZ=e=>{let{name:t}=JF(e.chain);return t?(0,cfe.jsx)(F,{color:e.color,size:e.size,style:e.style,children:e.short?bZ(t):t}):(0,cfe.jsx)(Te,{height:oe[e.size],width:"50px"})};function bZ(e){let t=e.split(" "),n=new Set(["mainnet","testnet","chain"]);return t.filter(r=>!n.has(r.toLowerCase())).join(" ")}Sa();Ye();var $s=T(L(),1);function AZ({token:e,client:t,size:n,style:r}){let o=$(),i=We(e.chainId);return(0,$s.jsxs)(S,{center:"y",flex:"row",gap:"sm",style:{flexWrap:"nowrap",...r},children:[(0,$s.jsxs)(S,{style:{height:z[n],position:"relative",width:z[n]},children:[(0,$s.jsx)(IRn,{client:t,size:n,token:e}),i.id!==1&&(0,$s.jsx)(S,{style:{background:o.colors.borderColor,border:`1.5px solid ${o.colors.modalBg}`,borderRadius:"50%",bottom:"-2px",height:n==="lg"||n==="xl"?z.sm:z.xs,position:"absolute",right:"-2px",width:n==="lg"||n==="xl"?z.sm:z.xs},children:(0,$s.jsx)(TRn,{chain:i,client:t,size:n==="xl"||n==="lg"?"sm":"xs"})})]}),(0,$s.jsxs)(S,{flex:"column",gap:"4xs",style:{minWidth:0},children:[(0,$s.jsx)(F,{color:"primaryText",size:n==="xl"?"lg":"sm",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},weight:600,trackingTight:!0,children:e.name}),(0,$s.jsx)(wZ,{chain:i,client:t,short:!0,size:n==="xl"?"sm":"xs"})]})]})}function IRn(e){let t=We(e.token.chainId),n=H5(t).data,r=$(),o=(0,pMt.useMemo)(()=>Md(e.token)||e.token.address===Pr?n?.nativeCurrency.symbol==="ETH"?"ipfs://QmcxZHpyJa8T4i63xqjPYrZ6tKrt55tZJpbXcjSDKuKaf9/ethereum/512.png":n?.icon?.url:e.token.iconUri,[e.token,n?.icon?.url,n?.nativeCurrency.symbol]);return o?(0,$s.jsx)(nn,{client:e.client,fallbackImage:WW,height:z[e.size],src:o,style:{borderRadius:"50%"},width:z[e.size]}):(0,$s.jsx)(S,{style:{alignItems:"center",backgroundColor:r.colors.secondaryButtonBg,border:`1px solid ${r.colors.borderColor}`,borderRadius:"50%",display:"flex",height:`${z[e.size]}px`,justifyContent:"center",padding:Z.xs,width:`${z[e.size]}px`},children:(0,$s.jsx)(F,{color:"secondaryText",size:e.size==="xl"?"sm":"xs",style:{fontWeight:600},children:e.token.symbol.slice(0,1)})})}var TRn=e=>{let{url:t}=xx(e.chain);return(0,$s.jsx)(S,{style:{alignItems:"center",display:"flex",flexShrink:0,position:"relative"},children:(0,$s.jsx)(nn,{client:e.client,fallbackImage:Sd,height:z[e.size],src:SRn({chainIconUrl:t,client:e.client}),width:z[e.size]})})},SRn=e=>{let t=e.chainIconUrl;if(!t)return Sd;try{return ca({client:e.client,uri:t})}catch{return Sd}};var e9=T(L(),1);function ufe({client:e,token:t,amount:n,onClick:r,style:o,currency:i}){let a=We(t.chainId);return(0,e9.jsxs)(MRn,{onClick:()=>r(t),style:{display:"flex",justifyContent:"space-between",padding:`${Z.sm} ${Z.md}`,...o},variant:"secondary",children:[(0,e9.jsx)(AZ,{client:e,size:"lg",style:{flex:1,maxWidth:"50%"},token:t}),(0,e9.jsx)(S,{center:"y",color:"secondaryText",flex:"row",gap:"4xs",style:{flex:"1",flexWrap:"nowrap",justifyContent:"flex-end",maxWidth:"50%",minWidth:0},children:(0,e9.jsxs)(S,{color:"secondaryText",flex:"column",gap:"3xs",style:{alignItems:"flex-end",minWidth:0,overflow:"hidden"},children:[(0,e9.jsx)(gZ,{currency:i,chain:a,client:e,color:"primaryText",size:"sm",token:t,tokenAmount:n}),(0,e9.jsx)(F,{color:"secondaryText",size:"xs",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:`${Number(n).toLocaleString(void 0,{maximumFractionDigits:6,minimumFractionDigits:0})} ${t.symbol}`})]})})]})}var MRn=Zt(ae)(e=>({"&:hover":{background:$().colors.secondaryButtonBg},background:"transparent",flexDirection:"row",flexWrap:"nowrap",gap:Z.sm,justifyContent:"space-between",padding:Z.sm,paddingRight:Z.xs,transition:"background 200ms ease, transform 150ms ease",...e.style}));var _t=T(L(),1);function fMt(e){let t=$(),n=e.sender||(e.paymentMethod.type==="wallet"?e.paymentMethod.payerWallet.getAccount()?.address:void 0),r=e.receiver.toLowerCase()!==n?.toLowerCase();return(0,_t.jsxs)(S,{children:[(0,_t.jsxs)(S,{bg:"tertiaryBg",flex:"column",style:{border:`1px solid ${t.colors.borderColor}`,borderRadius:te.lg},children:[n&&(0,_t.jsx)(S,{flex:"row",gap:"sm",px:"md",py:"sm",style:{borderBottom:`1px solid ${t.colors.borderColor}`},children:(0,_t.jsx)(jE,{address:n,client:e.client,iconSize:"md",textSize:"sm"})}),e.paymentMethod.type==="wallet"&&(0,_t.jsx)(ufe,{currency:e.currency,amount:e.fromAmount,client:e.client,onClick:()=>{},style:{background:"transparent",border:"none",borderRadius:0},token:e.paymentMethod.originToken}),e.paymentMethod.type==="fiat"&&(0,_t.jsxs)(S,{center:"y",flex:"row",gap:"sm",px:"md",py:"sm",style:{justifyContent:"space-between"},children:[(0,_t.jsxs)(S,{center:"y",flex:"row",gap:"sm",children:[uMt({currency:e.paymentMethod.currency,size:"lg"}),(0,_t.jsxs)(S,{center:"y",flex:"column",gap:"3xs",children:[(0,_t.jsx)(F,{color:"primaryText",size:"sm",style:{fontWeight:600},children:e.paymentMethod.currency}),(0,_t.jsx)(F,{color:"secondaryText",size:"xs",children:e.paymentMethod.onramp.charAt(0).toUpperCase()+e.paymentMethod.onramp.slice(1)})]})]}),(0,_t.jsx)(F,{color:"primaryText",size:"sm",style:{fontWeight:600},children:e.fromAmount})]})]}),(0,_t.jsx)(dMt,{}),(0,_t.jsxs)(S,{bg:"tertiaryBg",flex:"column",style:{border:`1px solid ${t.colors.borderColor}`,borderRadius:te.lg},children:[r&&(0,_t.jsx)(S,{flex:"row",gap:"sm",px:"md",py:"sm",style:{borderBottom:`1px solid ${t.colors.borderColor}`},children:(0,_t.jsx)(jE,{address:e.receiver,client:e.client,iconSize:"md",textSize:"sm"})}),e.modeInfo.mode==="direct_payment"&&(0,_t.jsxs)(S,{center:"y",flex:"row",gap:"sm",p:"md",style:{justifyContent:"space-between"},children:[(0,_t.jsxs)(S,{center:"y",flex:"column",gap:"3xs",style:{flex:1},children:[(0,_t.jsx)(F,{color:"primaryText",size:"sm",style:{fontWeight:600},children:e.metadata.title||"Payment"}),e.metadata.description&&(0,_t.jsx)(F,{color:"secondaryText",size:"xs",children:e.metadata.description})]}),(0,_t.jsxs)(S,{center:"y",flex:"column",gap:"3xs",style:{alignItems:"flex-end"},children:[(0,_t.jsx)(gZ,{currency:e.currency,chain:vt(e.toToken.chainId),client:e.client,color:"primaryText",size:"sm",token:e.toToken,tokenAmount:e.modeInfo.paymentInfo.amount,weight:600}),(0,_t.jsxs)(F,{color:"secondaryText",size:"xs",children:[e.modeInfo.paymentInfo.amount," ",e.toToken.symbol]})]})]}),e.modeInfo.mode==="fund_wallet"&&(0,_t.jsx)(ufe,{currency:e.currency,amount:e.toAmount,client:e.client,onClick:()=>{},style:{background:"transparent",border:"none",borderRadius:0},token:e.toToken}),e.modeInfo.mode==="transaction"&&(0,_t.jsx)(kRn,{client:e.client,paymentMethod:e.paymentMethod,transaction:e.modeInfo.transaction,metadata:e.metadata})]})]})}var kRn=e=>{let t=$(),n=nMt({client:e.client,transaction:e.transaction,wallet:e.paymentMethod.payerWallet});return n.data?(0,_t.jsxs)(S,{center:"y",flex:"row",gap:"sm",p:"md",style:{justifyContent:"space-between"},children:[(0,_t.jsxs)(S,{center:"y",flex:"column",gap:"3xs",style:{flex:1},children:[(0,_t.jsx)(F,{color:"primaryText",size:"sm",style:{fontWeight:600},children:e.metadata.title||"Transaction"}),e.metadata.description&&(0,_t.jsx)(F,{color:"secondaryText",size:"xs",children:e.metadata.description})]}),(0,_t.jsx)(S,{center:"y",flex:"column",gap:"3xs",style:{alignItems:"flex-end"},children:(0,_t.jsx)(F,{color:"secondaryText",size:"xs",style:{backgroundColor:t.colors.secondaryButtonBg,borderRadius:Z.sm,fontFamily:"monospace",padding:`${Z.xs} ${Z.sm}`,textAlign:"right"},children:n.data.functionInfo.functionName})})]}):(0,_t.jsxs)(S,{center:"y",flex:"row",gap:"sm",p:"md",style:{justifyContent:"space-between"},children:[(0,_t.jsxs)(S,{center:"y",flex:"column",gap:"3xs",style:{flex:1},children:[(0,_t.jsx)("div",{style:{backgroundColor:t.colors.skeletonBg,borderRadius:Z.xs,height:"16px",width:"120px"}}),e.metadata.description&&(0,_t.jsx)("div",{style:{backgroundColor:t.colors.skeletonBg,borderRadius:Z.xs,height:"12px",width:"80px"}})]}),(0,_t.jsx)(S,{center:"y",flex:"column",gap:"3xs",style:{alignItems:"flex-end"},children:(0,_t.jsx)("div",{style:{backgroundColor:t.colors.skeletonBg,borderRadius:Z.sm,height:"24px",width:"100px"}})})]})};var on=T(L(),1);function xZ({metadata:e,confirmButtonLabel:t,client:n,paymentMethod:r,preparedQuote:o,onConfirm:i,onBack:a,onError:s,currency:l,modeInfo:c}){let u=$(),d=()=>{try{i()}catch(w){s(w)}};le({queryFn:()=>((o.type==="buy"||o.type==="sell"||o.type==="transfer")&&Ki({chainId:o.type==="transfer"?o.intent.chainId:o.intent.originChainId,client:n,event:"payment_details",fromToken:o.type==="transfer"?o.intent.tokenAddress:o.intent.originTokenAddress,toChainId:o.type==="transfer"?o.intent.chainId:o.intent.destinationChainId,toToken:o.type==="transfer"?o.intent.tokenAddress:o.intent.destinationTokenAddress}),!0),queryKey:["payment_details",o.type]});let f=$F(o.steps.flatMap(w=>[vt(w.originToken.chainId),vt(w.destinationToken.chainId)]),10),m=(0,mMt.useMemo)(()=>f.map(w=>w.data),[f]).filter(w=>!!w),g=(()=>{switch(o.type){case"transfer":{let w=r.type==="wallet"?r.originToken:void 0;return w?{destinationAmount:zo(o.destinationAmount,w.decimals),destinationToken:w,estimatedTime:o.estimatedExecutionTimeMs,originAmount:zo(o.originAmount,w.decimals),originToken:w}:(s(new Error("Invalid payment method")),{destinationAmount:"0",destinationToken:void 0,estimatedTime:0,originAmount:"0",originToken:void 0})}case"buy":{let w=r.type==="wallet"?r:void 0;return w?{destinationAmount:zo(o.destinationAmount,o.steps[o.steps.length-1]?.destinationToken?.decimals??18),destinationToken:o.steps[o.steps.length-1]?.destinationToken,estimatedTime:o.estimatedExecutionTimeMs,originAmount:zo(o.originAmount,w.originToken.decimals),originToken:r.type==="wallet"?r.originToken:void 0}:(s(new Error("Invalid payment method")),{destinationAmount:"0",destinationToken:void 0,estimatedTime:0,originAmount:"0",originToken:void 0})}case"sell":{let w=r.type==="wallet"?r:void 0;return w?{destinationAmount:zo(o.destinationAmount,o.steps[o.steps.length-1]?.destinationToken?.decimals??18),destinationToken:o.steps[o.steps.length-1]?.destinationToken,estimatedTime:o.estimatedExecutionTimeMs,originAmount:zo(o.originAmount,w.originToken.decimals),originToken:r.type==="wallet"?r.originToken:void 0}:(s(new Error("Invalid payment method")),{destinationAmount:"0",destinationToken:void 0,estimatedTime:0,originAmount:"0",originToken:void 0})}case"onramp":{let w=r.type==="fiat"?r:void 0;return w?{destinationAmount:zo(o.destinationAmount,o.destinationToken.decimals),destinationToken:o.destinationToken,estimatedTime:void 0,originAmount:xf(w.currency,Number(o.currencyAmount)),originToken:void 0}:(s(new Error("Invalid payment method")),{destinationAmount:"0",destinationToken:void 0,estimatedTime:0,originAmount:"0",originToken:void 0})}default:throw new Error(`Unsupported bridge prepare type: ${o.type}`)}})();return(0,on.jsxs)(S,{flex:"column",fullHeight:!0,px:"md",pb:"md",pt:"md+",children:[(0,on.jsx)(be,{onBack:a,title:e.title||"Payment Details"}),(0,on.jsx)(Q,{y:"lg"}),(0,on.jsxs)(S,{flex:"column",children:[(0,on.jsxs)(S,{flex:"column",children:[g.destinationToken&&(0,on.jsx)(fMt,{currency:l,metadata:e,modeInfo:c,client:n,fromAmount:g.originAmount,paymentMethod:r,receiver:o.intent.receiver,sender:o.intent.sender||r.payerWallet?.getAccount()?.address,toAmount:g.destinationAmount,toToken:g.destinationToken}),(0,on.jsx)(Q,{y:"md"}),(0,on.jsxs)(S,{flex:"row",gap:"sm",children:[(0,on.jsxs)(S,{flex:"row",gap:"xs",style:{flex:1,justifyContent:"center"},children:[(0,on.jsx)(F,{color:"secondaryText",size:"sm",children:"Estimated Time"}),(0,on.jsx)(F,{color:"primaryText",size:"sm",children:g.estimatedTime?`~${Math.ceil(g.estimatedTime/6e4)} min`:"~2 min"})]}),o.steps.length>1?(0,on.jsxs)(S,{flex:"row",gap:"xs",style:{flex:1,justifyContent:"center"},children:[(0,on.jsx)(F,{color:"secondaryText",size:"sm",children:"Route Length"}),(0,on.jsxs)(F,{color:"primaryText",size:"sm",children:[o.steps.length," step",o.steps.length!==1?"s":""]})]}):null]})]}),o.steps.length>1&&(0,on.jsxs)(S,{flex:"column",children:[(0,on.jsx)(Q,{y:"sm"}),(0,on.jsx)(S,{flex:"column",gap:"sm",style:{backgroundColor:u.colors.tertiaryBg,border:`1px solid ${u.colors.borderColor}`,borderRadius:te.md,padding:`${Z.sm} ${Z.md}`},children:o.steps.map((w,b)=>(0,on.jsx)(S,{flex:"column",gap:"sm",children:(0,on.jsxs)(S,{flex:"row",gap:"md",style:{alignItems:"center"},children:[(0,on.jsx)(S,{center:"both",flex:"row",style:{backgroundColor:u.colors.accentButtonBg,borderRadius:"50%",color:u.colors.accentButtonText,flexShrink:0,fontSize:"12px",fontWeight:"bold",height:"24px",width:"24px"},children:(0,on.jsx)(F,{color:"accentButtonText",size:"xs",children:b+1})}),(0,on.jsx)(S,{center:"y",flex:"row",gap:"sm",style:{flex:1},children:(0,on.jsxs)(S,{flex:"column",gap:"3xs",style:{flex:1},children:[(0,on.jsx)(F,{color:"primaryText",size:"sm",children:w.destinationToken.chainId!==w.originToken.chainId?(0,on.jsxs)(on.Fragment,{children:["Bridge"," ",w.originToken.symbol===w.destinationToken.symbol?w.originToken.symbol:`${w.originToken.symbol} to ${w.destinationToken.symbol}`]}):(0,on.jsxs)(on.Fragment,{children:["Swap ",w.originToken.symbol," to"," ",w.destinationToken.symbol]})}),(0,on.jsx)(F,{color:"secondaryText",size:"xs",children:w.originToken.chainId!==w.destinationToken.chainId?(0,on.jsxs)(on.Fragment,{children:[m.find(A=>A.chainId===w.originToken.chainId)?.name," ","to"," ",m.find(A=>A.chainId===w.destinationToken.chainId)?.name]}):m.find(A=>A.chainId===w.originToken.chainId)?.name})]})})]})},`step-${b}-${w.originToken.address}-${w.destinationToken.address}`))})]}),(0,on.jsx)(Q,{y:"lg"}),(0,on.jsx)(S,{flex:"column",gap:"sm",children:(0,on.jsx)(ae,{fullWidth:!0,onClick:d,variant:"accent",children:t||"Confirm Payment"})})]})]})}tt();var vZ=T(_(),1);qe();Go();tt();$l();an();Kt();Go();ls();function hMt(e){let{destinationToken:t,destinationAmount:n,client:r,payerWallet:o,supportedTokens:i}=e,a=Mn(),s=o||a,l=le({enabled:!!s,queryFn:async()=>{let c=s?.getAccount();if(!s||!c)throw new Error("No wallet connected");let u=new URL(`${Be("bridge")}/v1/buy/quote/${c.address}`);u.searchParams.set("destinationChainId",t.chainId.toString()),u.searchParams.set("destinationTokenAddress",t.address),u.searchParams.set("amount",Er(n,t.decimals).toString());let f=await Pe(r)(u.toString());if(!f.ok){let A=await f.json();throw new dn({code:A.code||"UNKNOWN_ERROR",correlationId:A.correlationId||void 0,message:A.message||f.statusText,statusCode:f.status})}let{data:m}=await f.json(),g=m.map(A=>({balance:BigInt(A.balance),originToken:A.token,payerWallet:s,type:"wallet",quote:A.quote})).filter(A=>!!A.originToken.prices.USD).sort((A,x)=>Number.parseFloat(go(x.balance,x.originToken.decimals))*(x.originToken.prices.USD||1)-Number.parseFloat(go(A.balance,A.originToken.decimals))*(A.originToken.prices.USD||1)),w=i?Object.keys(i).flatMap(A=>i[Number(A)]?.map(x=>({chainId:Number(A),address:x.address}))??[]):[];return(i?g.filter(A=>w.find(x=>x.chainId===A.originToken.chainId&&x.address.toLowerCase()===A.originToken.address.toLowerCase())):g).map(A=>({...A,action:"buy"}))},queryKey:["payment-methods",t.chainId,t.address,n,o?.getAccount()?.address,i],refetchOnWindowFocus:!1,staleTime:5*60*1e3});return{data:l.data||[],error:l.error,isError:l.isError,isLoading:l.isLoading,isSuccess:l.isSuccess,refetch:l.refetch}}ls();ve();nt();var yMt=T(_(),1);zt();Go();ye();tt();Bce();Go();function gMt(e,t){return Q4({queries:["coinbase","stripe","transak"].map(o=>({...t,enabled:!!e,queryFn:async()=>{if(!e)throw new Error("No params provided");let i=await yf(e.client,e.tokenAddress,e.chainId),a=Er(e.amount,i.decimals);return jce({amount:a,chainId:e.chainId,client:e.client,currency:e.currency||"USD",onramp:o,receiver:e.receiver,tokenAddress:e.tokenAddress,country:e.country})},queryKey:["onramp-prepare",o,e],retry:!1}))})}ve();St();Sa();nt();_o();Ye();var zi=T(L(),1),ERn=[{description:"Fast and secure payments",iconUri:"https://i.ibb.co/LDJ3Rk2t/Frame-5.png",id:"coinbase",name:"Coinbase"},{description:"Trusted payment processing",iconUri:"https://i.ibb.co/CpgQC2Lf/images-3.png",id:"stripe",name:"Stripe"},{description:"Global payment solution",iconUri:"https://i.ibb.co/Xx2r882p/Transak-official-symbol-1.png",id:"transak",name:"Transak"}];function wMt({onProviderSelected:e,client:t,toChainId:n,toTokenAddress:r,toAddress:o,toAmount:i,currency:a,country:s}){let l=gMt({amount:i||"0",chainId:n,client:t,currency:a||"USD",receiver:Hd(o),tokenAddress:Hd(r),country:s}),c=(0,yMt.useMemo)(()=>l.map(d=>d.data).filter(d=>!!d),[l]),u=l.some(d=>d.isLoading);return l.every(d=>d.isError)?(0,zi.jsx)(S,{center:"both",flex:"column",style:{minHeight:"200px",flexGrow:1},children:(0,zi.jsx)(F,{color:"secondaryText",size:"sm",children:"No quotes available"})}):(0,zi.jsx)(S,{flex:"column",gap:"xs",style:{flexGrow:1},children:u?(0,zi.jsxs)(S,{center:"both",flex:"column",style:{flexGrow:1,paddingBottom:Z.lg},px:"md",children:[(0,zi.jsx)(wt,{color:"secondaryText",size:"xl"}),(0,zi.jsx)(Q,{y:"lg"}),(0,zi.jsx)(F,{center:!0,color:"primaryText",size:"lg",weight:600,trackingTight:!0,children:"Searching Providers"}),(0,zi.jsx)(Q,{y:"xs"}),(0,zi.jsx)(F,{center:!0,color:"secondaryText",size:"sm",multiline:!0,style:{textWrap:"pretty"},children:"Searching for the best providers for this payment"})]}):c.sort((d,f)=>d.currencyAmount-f.currencyAmount).map(d=>{let f=ERn.find(m=>m.id===d.intent.onramp);return f?(0,zi.jsx)(ae,{fullWidth:!0,onClick:()=>e(f.id),style:{borderRadius:te.lg,textAlign:"left",padding:`${Z.md}`},variant:"secondary",children:(0,zi.jsxs)(S,{flex:"row",gap:"sm",style:{alignItems:"center",width:"100%"},children:[(0,zi.jsx)(nn,{alt:f.name,client:t,height:z.lg,src:f.iconUri,width:z.lg,style:{borderRadius:te.full}}),(0,zi.jsx)(S,{flex:"column",gap:"3xs",style:{flex:1},children:(0,zi.jsx)(F,{color:"primaryText",size:"md",weight:500,children:f.name})}),(0,zi.jsxs)(S,{flex:"column",gap:"3xs",style:{alignItems:"flex-end"},children:[(0,zi.jsx)(F,{color:"primaryText",size:"sm",style:{fontWeight:500},children:xf(a||"USD",d.currencyAmount)}),(0,zi.jsxs)(F,{color:"secondaryText",size:"xs",children:[W5(Number(go(d.destinationAmount,d.destinationToken.decimals)),4)," ",d.destinationToken.symbol]})]})]})},f.id):null})})}Fe();ye();ve();St();$o();nt();Ye();var $n=T(L(),1);function PRn({paymentMethod:e,client:t,onPaymentMethodSelected:n,currency:r}){let o=$(),i=e.quote.originAmount,a=i?e.balance>=i:!1,s=e.originToken.prices[r||"USD"];return(0,$n.jsx)(ae,{disabled:!a,fullWidth:!0,onClick:()=>n(e),style:{backgroundColor:o.colors.tertiaryBg,borderRadius:te.lg,padding:`${Z.md} ${Z.md}`,textAlign:"left"},variant:"secondary",children:(0,$n.jsxs)(S,{flex:"row",gap:"md",style:{alignItems:"center",width:"100%"},children:[(0,$n.jsx)(AZ,{client:t,size:"lg",style:{maxWidth:"50%"},token:e.originToken}),(0,$n.jsxs)(S,{flex:"column",gap:"3xs",style:{alignItems:"flex-end",flex:1},children:[s&&(0,$n.jsx)(F,{color:"primaryText",size:"sm",style:{fontWeight:600,textWrap:"nowrap"},children:xf(r||"USD",Number(zo(e.balance,e.originToken.decimals))*s)}),(0,$n.jsx)(S,{flex:"row",gap:"3xs",children:(0,$n.jsxs)(F,{color:a?"success":"danger",size:"xs",children:[zo(e.balance,e.originToken.decimals)," ",e.originToken.symbol]})})]})]})},`${e.originToken.address}-${e.originToken.chainId}`)}function bMt({paymentMethods:e,paymentMethodsLoading:t,client:n,onPaymentMethodSelected:r,onBack:o,destinationToken:i,destinationAmount:a,feePayer:s,currency:l}){let c=$();return t?(0,$n.jsx)(S,{flex:"column",gap:"xs",pb:"lg",style:{maxHeight:"400px",overflowY:"auto",scrollbarWidth:"none"},children:new Array(10).fill(0).map((u,d)=>(0,$n.jsx)(S,{style:{backgroundColor:c.colors.tertiaryBg,borderRadius:te.lg,padding:`${Z.md} ${Z.md}`},children:(0,$n.jsxs)(S,{flex:"row",gap:"md",style:{alignItems:"center",width:"100%"},children:[(0,$n.jsxs)(S,{center:"y",flex:"row",gap:"sm",style:{maxWidth:"50%"},children:[(0,$n.jsx)("div",{style:{backgroundColor:c.colors.skeletonBg,borderRadius:"50%",height:"32px",width:"32px"}}),(0,$n.jsxs)(S,{flex:"column",gap:"3xs",children:[(0,$n.jsx)(Te,{height:"14px",width:"60px"}),(0,$n.jsx)(Te,{height:"12px",width:"40px"})]})]}),(0,$n.jsxs)(S,{flex:"column",gap:"3xs",style:{alignItems:"flex-end",flex:1},children:[(0,$n.jsx)(Te,{height:"16px",width:"80px"}),(0,$n.jsxs)(S,{flex:"row",gap:"3xs",children:[(0,$n.jsx)(Te,{height:"12px",width:"50px"}),(0,$n.jsx)(Te,{height:"12px",width:"40px"})]})]})]})},d))}):e.length===0?(0,$n.jsxs)(S,{center:"both",flex:"column",style:{minHeight:"250px"},children:[(0,$n.jsx)(F,{center:!0,color:"primaryText",size:"md",children:"No available tokens found for this wallet"}),(0,$n.jsx)(Q,{y:"sm"}),(0,$n.jsx)(F,{center:!0,color:"secondaryText",size:"sm",children:"Try connecting a different wallet or pay with card"}),(0,$n.jsx)(Q,{y:"lg"}),(0,$n.jsx)(ae,{onClick:o,variant:"primary",children:"Select another payment method"})]}):(0,$n.jsx)(S,{flex:"column",gap:"xs",pb:"lg",style:{maxHeight:"400px",overflowY:"auto",scrollbarWidth:"none"},children:e.filter(u=>u.type==="wallet").map(u=>(0,$n.jsx)(PRn,{client:n,destinationAmount:a,destinationToken:i,feePayer:s,onPaymentMethodSelected:r,paymentMethod:u,currency:l},`${u.originToken.address}-${u.originToken.chainId}`))})}Cn();Fe();ye();var BE=T(L(),1),AMt=e=>(0,BE.jsxs)("svg",{fill:"none",height:e.size,role:"presentation",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[(0,BE.jsx)("rect",{height:"14",rx:"2",width:"20",x:"2",y:"5"}),(0,BE.jsx)("line",{x1:"2",x2:"22",y1:"10",y2:"10"})]});ve();St();Ye();var Uo=T(L(),1);function xMt({connectedWallets:e,client:t,onWalletSelected:n,onFiatSelected:r,onConnectWallet:o,paymentMethods:i=["crypto","card"]}){let a=$();return(0,Uo.jsxs)(S,{flex:"column",gap:"xs",children:[i.includes("crypto")&&(0,Uo.jsxs)(Uo.Fragment,{children:[e.length>0&&(0,Uo.jsx)(S,{flex:"column",gap:"sm",children:e.map(s=>{let l=s.getAccount();return l?.address?(0,Uo.jsx)(ae,{fullWidth:!0,onClick:()=>n(s),style:{borderRadius:te.md,justifyContent:"space-between",padding:`${Z.md} ${Z.md}`},variant:"secondary",children:(0,Uo.jsx)(jE,{address:l?.address,client:t,iconSize:"lg",textSize:"sm"})},`${s.id}-${l.address}`):null})}),(0,Uo.jsx)(ae,{fullWidth:!0,onClick:o,style:{borderRadius:te.md,height:"auto",padding:`${Z.md} ${Z.md}`,textAlign:"left"},variant:"secondary",children:(0,Uo.jsxs)(S,{flex:"row",gap:"md",style:{alignItems:"center",width:"100%"},children:[(0,Uo.jsx)(S,{style:{alignItems:"center",border:`1px dashed ${a.colors.secondaryText}`,borderRadius:te.full,display:"flex",height:`${z.lg}px`,justifyContent:"center",width:`${z.lg}px`},children:(0,Uo.jsx)(NA,{color:a.colors.secondaryText,height:z["sm+"],width:z["sm+"]})}),(0,Uo.jsxs)(S,{flex:"column",gap:"3xs",style:{flex:1},children:[(0,Uo.jsx)(F,{color:"primaryText",size:"sm",children:"Connect a Wallet"}),(0,Uo.jsx)(F,{color:"secondaryText",size:"xs",children:"Pay with any web3 wallet"})]})]})})]}),i.includes("card")&&(0,Uo.jsx)(ae,{fullWidth:!0,onClick:r,style:{borderRadius:te.md,height:"auto",padding:`${Z.md} ${Z.md}`,textAlign:"left"},variant:"secondary",children:(0,Uo.jsxs)(S,{flex:"row",gap:"md",style:{alignItems:"center",width:"100%"},children:[(0,Uo.jsx)(AMt,{color:a.colors.secondaryText,size:z.lg}),(0,Uo.jsxs)(S,{flex:"column",gap:"3xs",style:{flex:1},children:[(0,Uo.jsx)(F,{color:"primaryText",size:"sm",children:"Pay with Card"}),(0,Uo.jsx)(F,{color:"secondaryText",size:"xs",children:"Onramp and pay in one step"})]})]})})]})}var kf=T(L(),1);function vMt({destinationToken:e,client:t,destinationAmount:n,receiverAddress:r,onPaymentMethodSelected:o,onError:i,onBack:a,connectOptions:s,connectLocale:l,paymentMethods:c,supportedTokens:u,feePayer:d,currency:f,country:m}){let h=Gl(),g=Mn(),w=c.length===1&&c[0]==="card"?{type:"fiatProviderSelection"}:{type:"walletSelection"},[b,A]=(0,vZ.useState)(w);le({queryFn:()=>(Ki({client:t,event:"payment_selection",toChainId:e.chainId,toToken:e.address}),!0),queryKey:["payment_selection"]});let x=b.type==="tokenSelection"?b.selectedWallet:g,{data:v,isLoading:C,error:M}=hMt({client:t,destinationAmount:n,destinationToken:e,payerWallet:x,supportedTokens:u});(0,vZ.useEffect)(()=>{M&&i(M)},[M,i]);let I=R=>{try{o(R)}catch(D){i(D)}},P=R=>{A({selectedWallet:R,type:"tokenSelection"})},E=async()=>{A({type:"walletConnection"})},O=()=>{A({type:"fiatProviderSelection"})},k=()=>{A({type:"walletSelection"})},N=R=>{if(!(r||x?.getAccount()?.address)){i(new Error("No recipient address available for fiat payment"));return}I({currency:f||"USD",onramp:R,payerWallet:x,type:"fiat"})},j=()=>{switch(b.type){case"walletSelection":return"Choose Payment Method";case"tokenSelection":return"Select Token";case"fiatProviderSelection":return"Select Payment Provider";case"walletConnection":return"Connect Wallet"}},H=()=>{if(c.length===1&&c[0]==="card")return a;switch(b.type){case"walletSelection":return a;case"tokenSelection":case"fiatProviderSelection":case"walletConnection":return k}};if(b.type==="walletConnection"){let R=e?vt(e.chainId):void 0,D=R?[R,...s?.chains||[]]:s?.chains;return(0,kf.jsx)(SV,{accountAbstraction:s?.accountAbstraction,appMetadata:s?.appMetadata,chain:R||s?.chain,chains:D,client:t,connectLocale:l,hiddenWallets:[],isEmbed:!1,onBack:k,onSelect:P,recommendedWallets:s?.recommendedWallets,showAllWallets:s?.showAllWallets===void 0?!0:s?.showAllWallets,walletConnect:s?.walletConnect,wallets:s?.wallets?.filter(U=>U.id!=="inApp")})}return(0,kf.jsxs)(S,{flex:"column",px:"md",pt:"md+",children:[(0,kf.jsx)(be,{onBack:H(),title:j()}),(0,kf.jsx)(Q,{y:"lg"}),(0,kf.jsxs)(S,{flex:"column",style:{minHeight:"300px"},children:[b.type==="walletSelection"&&(0,kf.jsx)(xMt,{client:t,connectedWallets:h,onConnectWallet:E,onFiatSelected:O,onWalletSelected:P,paymentMethods:c}),b.type==="tokenSelection"&&(0,kf.jsx)(bMt,{client:t,destinationAmount:Er(n,e.decimals),destinationToken:e,feePayer:d,onBack:k,onPaymentMethodSelected:I,paymentMethods:v,paymentMethodsLoading:C,currency:f}),b.type==="fiatProviderSelection"&&(0,kf.jsx)(wMt,{country:m,client:t,onProviderSelected:N,toAddress:r||x?.getAccount()?.address||"",toAmount:n,toChainId:e.chainId,toTokenAddress:e.address,currency:f})]})]})}Cn();tt();var TMt=T(_(),1);Fe();ye();ve();St();nt();Ye();Cn();tt();var CMt=T(_(),1);qe();zt();q4();Fe();ye();ve();$o();nt();Ye();var yn=T(L(),1);function NRn(e,t){return e.type==="onramp"?e.id:t.transactions[t.transactions.length-1]?.transactionHash}function DRn(e,t){return le({enabled:!0,queryFn:async()=>{if(e.type==="onramp"&&t.type==="onramp")return{amountPaid:`${t.currencyAmount} ${t.currency}`,amountReceived:`${zo(t.destinationAmount,t.destinationToken.decimals)} ${t.destinationToken.symbol}`,chain:await uo(vt(t.destinationToken.chainId)),destinationToken:t.destinationToken,id:t.id,label:"Onramp Payment",type:"paymentId"};if((e.type==="buy"||e.type==="sell"||e.type==="transfer")&&e.transactions.length>0){let r=e.transactions[e.transactions.length-1];if(r){let[o,i]=await Promise.all([uo(We(e.destinationToken.chainId)),uo(We(e.originToken.chainId))]);return{amountPaid:`${zo(e.originAmount,e.originToken.decimals)} ${e.originToken.symbol}`,amountReceived:`${zo(e.destinationAmount,e.destinationToken.decimals)} ${e.destinationToken.symbol}`,chain:o,destinationChain:o,destinationToken:e.destinationToken,id:r.transactionHash,label:"Transaction",originChain:i,originToken:e.originToken,type:"transactionHash"}}}return null},queryKey:["transaction-info",e.type,NRn(t,e)],staleTime:5*60*1e3})}function LRn({status:e,preparedQuote:t,windowAdapter:n,onCopyToClipboard:r}){let o=$(),{data:i,isLoading:a}=DRn(e,t);return a?(0,yn.jsxs)(S,{flex:"column",gap:"sm",style:{backgroundColor:o.colors.tertiaryBg,border:`1px solid ${o.colors.borderColor}`,borderRadius:te.sm,padding:Z.md},children:[(0,yn.jsx)(Te,{height:"30px"}),(0,yn.jsx)(Te,{height:"30px"}),(0,yn.jsx)(Te,{height:"30px"})]}):i?(0,yn.jsxs)(S,{flex:"column",gap:"sm",style:{backgroundColor:o.colors.tertiaryBg,border:`1px solid ${o.colors.borderColor}`,borderRadius:te.sm,padding:Z.md},children:[(0,yn.jsxs)(S,{flex:"row",gap:"sm",style:{alignItems:"center",justifyContent:"space-between"},children:[(0,yn.jsx)(F,{color:"primaryText",size:"sm",children:i.label}),(0,yn.jsx)(S,{style:{backgroundColor:o.colors.success,borderRadius:te.sm,padding:`${Z["3xs"]} ${Z.xs}`},children:(0,yn.jsx)(F,{size:"xs",style:{color:o.colors.primaryButtonText},children:"COMPLETED"})})]}),i.amountPaid&&(0,yn.jsxs)(S,{center:"y",flex:"row",style:{justifyContent:"space-between"},children:[(0,yn.jsx)(F,{color:"secondaryText",size:"sm",children:"Amount Paid"}),(0,yn.jsx)(F,{color:"primaryText",size:"sm",children:i.amountPaid})]}),i.originChain&&(0,yn.jsxs)(S,{center:"y",flex:"row",style:{justifyContent:"space-between"},children:[(0,yn.jsx)(F,{color:"secondaryText",size:"sm",children:"Origin Chain"}),(0,yn.jsx)(F,{color:"primaryText",size:"sm",children:bZ(i.originChain.name)})]}),i.amountReceived&&(0,yn.jsxs)(S,{center:"y",flex:"row",style:{justifyContent:"space-between"},children:[(0,yn.jsx)(F,{color:"secondaryText",size:"sm",children:"Amount Received"}),(0,yn.jsx)(F,{color:"primaryText",size:"sm",children:i.amountReceived})]}),(0,yn.jsxs)(S,{center:"y",flex:"row",style:{justifyContent:"space-between"},children:[(0,yn.jsx)(F,{color:"secondaryText",size:"sm",children:"Chain"}),(0,yn.jsx)(F,{color:"primaryText",size:"sm",children:bZ(i.chain.name)})]}),(0,yn.jsxs)(S,{center:"y",flex:"row",style:{justifyContent:"space-between"},children:[(0,yn.jsx)(F,{color:"secondaryText",size:"sm",children:i.type==="paymentId"?"Payment ID":"Transaction Hash"}),(0,yn.jsxs)(S,{flex:"row",gap:"sm",style:{alignItems:"center"},children:[(0,yn.jsx)(F,{color:"accentText",onClick:i.type==="paymentId"?()=>r(i.id):()=>{let s=i.chain.explorers?.[0];s&&n.open(Dj(s.url,i.id))},size:"sm",style:{cursor:"pointer",fontFamily:"monospace"},children:Q6(i.id)}),i.type==="paymentId"?(0,yn.jsx)("button",{onClick:()=>r(i.id),style:{background:"none",border:"none",cursor:"pointer",padding:0},type:"button",children:(0,yn.jsx)(EA,{color:o.colors.primaryText,height:z.sm,width:z.sm})}):null]})]})]},i.id):null}function IMt({preparedQuote:e,completedStatuses:t,onBack:n,windowAdapter:r}){let o=(0,CMt.useCallback)(async i=>{try{await navigator.clipboard.writeText(i)}catch(a){console.warn("Failed to copy to clipboard:",a)}},[]);return(0,yn.jsxs)(S,{flex:"column",fullHeight:!0,p:"md",style:{maxHeight:"500px",minHeight:"250px",overflowY:"auto"},children:[(0,yn.jsx)(be,{onBack:n,title:"Payment Receipt"}),(0,yn.jsx)(Q,{y:"lg"}),(0,yn.jsx)(S,{flex:"column",gap:"lg",children:(0,yn.jsx)(S,{flex:"column",gap:"md",children:t.map((i,a)=>(0,yn.jsx)(LRn,{onCopyToClipboard:o,preparedQuote:e,status:i,windowAdapter:r},`${i.type}-${a}`))})})]})}var Na=T(L(),1);function CZ({preparedQuote:e,completedStatuses:t,onDone:n,windowAdapter:r,client:o,hasPaymentId:i=!1,showContinueWithTx:a}){let s=$(),[l,c]=(0,TMt.useState)("success");return le({queryFn:()=>{(e.type==="buy"||e.type==="sell")&&Ki({chainId:e.intent.originChainId,client:o,event:"ub:ui:success_screen",fromToken:e.intent.originTokenAddress,toChainId:e.intent.destinationChainId,toToken:e.intent.destinationTokenAddress})},queryKey:["success_screen",e.type]}),l==="detail"?(0,Na.jsx)(IMt,{completedStatuses:t,onBack:()=>c("success"),preparedQuote:e,windowAdapter:r}):(0,Na.jsxs)(S,{flex:"column",fullHeight:!0,px:"md",pb:"md",pt:"md+",children:[(0,Na.jsx)(be,{title:"Payment Complete"}),(0,Na.jsx)(Q,{y:"xxl"}),(0,Na.jsxs)(S,{center:"x",flex:"column",gap:"md",children:[(0,Na.jsx)(S,{center:"both",flex:"row",style:{animation:"successBounce 0.6s ease-out",border:`2px solid ${s.colors.success}`,borderRadius:"50%",height:"64px",marginBottom:"16px",width:"64px"},children:(0,Na.jsx)(ad,{color:s.colors.success,height:z.xl,style:{animation:"checkAppear 0.3s ease-out 0.3s both"},width:z.xl})}),(0,Na.jsxs)("div",{children:[(0,Na.jsx)(F,{center:!0,color:"primaryText",size:"xl",weight:600,trackingTight:!0,style:{marginBottom:Z.xxs},children:"Payment Successful!"}),(0,Na.jsx)(F,{center:!0,color:"secondaryText",size:"sm",children:i?"You can now close this page and return to the application.":a?"Click continue to execute your transaction.":"Your payment has been completed successfully."})]})]}),(0,Na.jsx)(Q,{y:"xxl"}),(0,Na.jsxs)(S,{flex:"column",gap:"sm",style:{width:"100%"},children:[(0,Na.jsx)(ae,{fullWidth:!0,onClick:()=>c("detail"),variant:"secondary",children:"View Payment Receipt"}),!i&&(0,Na.jsx)(ae,{fullWidth:!0,onClick:n,variant:"accent",children:a?"Continue":"Done"})]}),(0,Na.jsx)("style",{children:`
|
|
469
469
|
@keyframes successBounce {
|
|
470
470
|
0% {
|
|
471
471
|
transform: scale(0.3);
|