@nexus-cross/dapp-ui 1.5.0-beta.1 → 1.5.0-beta.3

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/index.cjs CHANGED
@@ -1,29 +1,29 @@
1
- "use strict";var bb=Object.create;var pi=Object.defineProperty;var wb=Object.getOwnPropertyDescriptor;var yb=Object.getOwnPropertyNames;var xb=Object.getPrototypeOf,vb=Object.prototype.hasOwnProperty;var kb=(e,t)=>{for(var n in t)pi(e,n,{get:t[n],enumerable:!0})},Ec=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of yb(t))!vb.call(e,o)&&o!==n&&pi(e,o,{get:()=>t[o],enumerable:!(r=wb(t,o))||r.enumerable});return e};var _=(e,t,n)=>(n=e!=null?bb(xb(e)):{},Ec(t||!e||!e.__esModule?pi(n,"default",{value:e,enumerable:!0}):n,e)),Cb=e=>Ec(pi({},"__esModule",{value:!0}),e);var I2={};kb(I2,{APPLE_ICON:()=>ni,AppLauncher:()=>Bl,AppLauncherContent:()=>Ul,AppLauncherTrigger:()=>zl,BINANCE_ICON:()=>ei,BridgeFlow:()=>mo,CHAINS_CONFIG_FILE:()=>eo,CONNECTOR_REGISTRY:()=>ca,CROSSX_ICON:()=>Ja,ConnectButton:()=>fc,ConnectorId:()=>Si,DEFAULT_SKILLS_HREF:()=>mc,DEFAULT_TRUSTED_FACTORIES:()=>vo,DappUiErrorBoundary:()=>ia,GOOGLE_ICON:()=>ti,GetOneUsd:()=>pc,METAMASK_ICON:()=>$a,OnePopBody:()=>La,OnePopGetTokenTrigger:()=>Bd,PORTFOLIO_SECTIONS:()=>Ra,RelayApiError:()=>Wn,RelayDeposit:()=>qo,RelayHistory:()=>$d,RelayRecovery:()=>oc,SOCIAL_REGISTRY:()=>$i,SendFlow:()=>ga,SkillsButton:()=>gc,StatusTracker:()=>lc,TOKEN_STATS_QUERY_KEY:()=>Vi,USER_BALANCE_QUERY_KEY:()=>_i,WALLET_PORTFOLIO_QUERY_PREFIX:()=>pd,WALLET_REGISTRY:()=>zo,WalletConnectModal:()=>uc,WalletInfo:()=>wo,WalletInfoPage:()=>Ud,WalletPortfolio:()=>vd,WalletPortfolioBody:()=>po,announceAppLauncherUsage:()=>bi,captureDappUiException:()=>aa,createRelayClient:()=>rn,findGetOneUsdToken:()=>_a,getChainDisplay:()=>Bc,getDappUiSentryScope:()=>oa,getOneUsdTokenKey:()=>Ha,initDappUiSentry:()=>Ao,invalidateWalletPortfolioQueries:()=>Er,isGetOneUsdActionEnabled:()=>Va,isGetOneUsdActionSupported:()=>Zo,isGetOneUsdActionVisible:()=>Ko,isGetOneUsdTargetAvailable:()=>Qa,matchesGetOneUsdToken:()=>rl,normalizeFailureReason:()=>Nn,resolveEnvironment:()=>it,resolveGetOneUsdRoute:()=>Yo,selectChainMeta:()=>gi,setDappUiAnalyticsUser:()=>no,trackDappUiEvent:()=>sa,trackDappUiFunnel:()=>Je,useChainDisplay:()=>zr,useChainsConfig:()=>zc,useGlobalMenu:()=>la,useRelayConfig:()=>ac,useRelayOrders:()=>Dr,useRelayRecovery:()=>ic,useTokenBalance:()=>Sr,useTokenStats:()=>Tr,useWalletDetect:()=>Ka});module.exports=Cb(I2);var Rb={};function Ac(e){try{return Rb.env?.[e]}catch{return}}function Mc(e){if(!(typeof process>"u"))return process.env?.[e]}function it(e){if(e)return Lc(e);let t=Ac("VITE_CROSSX_ENVIRONMENT")??Ac("NEXT_PUBLIC_CROSSX_ENVIRONMENT")??Mc("NEXT_PUBLIC_CROSSX_ENVIRONMENT")??Mc("CROSSX_ENVIRONMENT");return Lc(t)}function Lc(e){switch(e?.toLowerCase()){case"dev":case"development":return"dev";case"stage":case"staging":case"stg":return"stage";default:return"production"}}var ar=_(require("react"),1);var ra="eip155";function On(e){return`${ra}:${e}`}function Dc(e){let t=e.indexOf(":");return t>0?e.slice(0,t):void 0}function Pc(e){let t=Dc(e);return t===void 0||t===ra}function ui(e){if(typeof e=="number")return Number.isSafeInteger(e)&&e>0?e:void 0;if(typeof e!="string")return;let t=e.trim(),n=Dc(t);if(n!==void 0&&n!==ra)return;let r=n===ra?t.slice(ra.length+1):t;if(!/^\d+$/.test(r))return;let o=Number(r);return Number.isSafeInteger(o)&&o>0?o:void 0}function Oc(e){let t=ui(e);return t===void 0?void 0:On(t)}var Nb={dev:"https://stg-contents.crosstoken.io/frontend/common/app-launcher",stage:"https://stg-contents.crosstoken.io/frontend/common/app-launcher",production:"https://contents.crosstoken.io/frontend/common/app-launcher"},Sb=3e3;function Bn(e,t){if(e!=null)return typeof e=="object"&&!Array.isArray(e)&&("dev"in e||"stage"in e||"production"in e)?e[t]:e}var Il=new Map;function vr(e,t){let n=`${Nb[t]}/${e}`,r=Il.get(n);return r||(r=(async()=>{let o=new AbortController,a=setTimeout(()=>o.abort(),Sb);try{let i=await fetch(n,{cache:"no-store",signal:o.signal});return i.ok?await i.json():null}catch{return null}finally{clearTimeout(a)}})().then(o=>(o===null&&Il.delete(n),o)),Il.set(n,r)),r}function Tb(e){return typeof e=="string"&&e.startsWith("https://")}async function Be(e,t){let n=await vr("endpoints.json",t),r=Bn(n?.apis?.[e],t);if(!Tb(r))throw new Error(`[remote-config] endpoints.json missing or invalid api base: ${e} (${t})`);return r}var fi="apps.json";function mi(e,t){let n=Bn(e?.relay?.forwarderFactories,t),r=[n?.standingForwarderFactory,n?.depositorForwarderFactory].filter(o=>typeof o=="string");return r.length>0?r:void 0}var eo="chains.json";function gi(e,t){return e?e[On(t)]??e[String(t)]??{}:{}}async function Bc(e,t){let n=await vr(eo,t);return gi(n?.chains,e)}function zr(e,t){let[n,r]=ar.useState({});return ar.useEffect(()=>{if(e==null){r({});return}let o=!0;return vr(eo,t).then(a=>{o&&r(gi(a?.chains,e))}),()=>{o=!1}},[e,t]),n}function zc(e){let[t,n]=ar.useState({});return ar.useEffect(()=>{let r=!0;return vr(eo,e).then(o=>{r&&n(o?.chains??{})}),()=>{r=!1}},[e]),t}function Xt(e,t,n){let[r,o]=ar.useState(void 0),a=ar.useRef(n);return a.current=n,ar.useEffect(()=>{let i=!0;return vr(e,t).then(s=>{if(!i)return;let l=a.current(s);l!==void 0&&o(l)}),()=>{i=!1}},[e,t]),r}var to="1.5.0-beta.1";var hi="__nexusCrossAppLauncherRuntime";function Ib(){if(typeof window>"u")return null;let e=window;return e[hi]??(e[hi]={mode:"dapp-ui"}),e[hi]}function Eb(e){if(e.scheduled)return;e.scheduled=!0;let t=()=>{if(e.scheduled=!1,e.loggedMode!==e.mode){if(e.mode==="connect-kit-react"){let n=e.connectKitVersion??"unknown";console.info(`[CROSSx App Launcher] connect-kit-react v${n} \uCD08\uAE30\uD654 \uC644\uB8CC (dapp-ui v${to}, \uC0AC\uC6A9 \uBAA8\uB4DC: connect-kit)`)}else console.info(`[CROSSx App Launcher] dapp-ui v${to} \uCD08\uAE30\uD654 \uC644\uB8CC (\uC0AC\uC6A9 \uBAA8\uB4DC: dapp-ui only)`);e.loggedMode=e.mode}};typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t)}function bi(e){let t=Ib();t&&(e?.mode==="connect-kit-react"?t.mode="connect-kit-react":t.mode||(t.mode="dapp-ui"),e?.connectKitVersion&&(t.connectKitVersion=e.connectKitVersion),Eb(t))}var ir=require("@sentry/react");var Ab="https://5c82aeb32da33b5a0a14b7c5393992ca@o4511668907081728.ingest.de.sentry.io/4511705324126289",Mb=`dapp-ui@${to}`,Eo=null,Fc=.1;function Uc(){return Fc}function Lb(e){switch(e){case"dev":return"dev";case"stage":return"stg";default:return"prod"}}function Ao(e){if(Eo)return Eo;if(typeof window>"u")return null;let t=Lb(it(e?.environment));typeof e?.analyticsSampleRate=="number"&&(Fc=Math.min(1,Math.max(0,e.analyticsSampleRate)));let n=new ir.BrowserClient({dsn:e?.dsn??Ab,transport:ir.makeFetchTransport,stackParser:ir.defaultStackParser,integrations:[(0,ir.linkedErrorsIntegration)()],environment:t,release:Mb,enabled:e?.enabled??t==="prod"}),r=new ir.Scope;return r.setClient(n),r.setTags({package:"dapp-ui",framework:"react",source:"dapp-ui"}),n.init(),Eo=r,Eo}function oa(){return Eo}function aa(e,t){let n=Eo??Ao();if(n)return n.captureException(e,t?{captureContext:{extra:t}}:void 0)}var jc=require("react");var ia=class extends jc.Component{constructor(){super(...arguments);this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(n,r){aa(n,{componentStack:r.componentStack??void 0,boundary:this.props.name??"dapp-ui"})}render(){return this.state.hasError?this.props.fallback??null:this.props.children}};function Ee(...e){return e.filter(Boolean).join(" ")}var Db=/CROSSx|ONE\s?wallet|ONE\s?pocket/i;function Mo(){return typeof window>"u"?!1:Db.test(window.navigator.userAgent)}var Wc="__nexus_dapp_ui_uid",El=null;function Pb(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():Array.from({length:32},()=>Math.floor(Math.random()*16).toString(16)).join("")}function Al(){if(El)return El;let e=null;try{e=window.localStorage.getItem(Wc)}catch{}if(!e||!e.startsWith("anon_")){e=`anon_${Pb()}`;try{window.localStorage.setItem(Wc,e)}catch{}}return El=e,e}async function Gc(e){if(typeof crypto>"u"||!crypto.subtle)return null;try{let t=new TextEncoder().encode(e.trim().toLowerCase()),n=await crypto.subtle.digest("SHA-256",t);return`wallet_${Array.from(new Uint8Array(n),o=>o.toString(16).padStart(2,"0")).join("").slice(0,16)}`}catch{return null}}function Ob(){let e=window.navigator.userAgent;return/ipad|tablet|(android(?!.*mobile))/i.test(e)?"tablet":/mobile|iphone|ipod|android/i.test(e)?"mobile":"desktop"}function Qc(){return{host:window.location.hostname,device_type:Ob(),is_cross_inapp:String(Mo())}}var Hc=!1;function Ml(){if(typeof window>"u")return null;let e=oa()??Ao();return e?(Hc||(Hc=!0,e.setUser({id:Al()})),e):null}function Vc(){return Math.random()>=Uc()}var _c=0;function no(e){let t=Ml();if(!t)return;let n=++_c;if(!e){t.setUser({id:Al()});return}Gc(e).then(r=>{r&&n===_c&&t.setUser({id:r})})}function sa(e,t,n){let r=Ml();!r||Vc()||r.captureMessage(`ui: ${e}_${t}`,"info",{captureContext:{tags:{...Qc(),feature:e,action:t,...n}}})}function Je(e,t,n){let r=Ml();if(!r||Vc())return;let o=n?.status??"success";r.captureMessage(`funnel: ${e}_${t}`,"info",{captureContext:{tags:{...Qc(),flow:e,funnel_step:`${e}_${t}`,funnel_status:o,...o==="failure"?{failure_reason:n?.reason??"unknown"}:{},...n?.tags}}})}function Nn(e){let t=e,n=String((t&&typeof t=="object"&&"message"in t?t.message:e)??"").toLowerCase();return t?.code===4001||/reject|denied|declin|cancel/i.test(n)?"user-rejected":/insufficient (funds|gas|balance)|exceeds balance/i.test(n)?"insufficient-gas":/timeout|timed out|deadline/i.test(n)?"timeout":/revert|execution failed/i.test(n)?"contract-reverted":/network|fetch|connection|disconnected|offline/i.test(n)?"network":"unknown"}var qc=require("react");var Yc=require("react/jsx-runtime");function Le({feature:e,children:t}){let n=(0,qc.useCallback)(r=>{let o=r.nativeEvent;if(o.__dappUiTracked)return;let i=r.target?.closest?.("[data-track]");if(!i)return;let s=i.getAttribute("data-track");if(!s)return;o.__dappUiTracked=!0;let l=i.getAttribute("data-track-id");sa(e,s,l?{item_id:l}:void 0)},[e]);return(0,Yc.jsx)("div",{style:{display:"contents"},onClick:n,children:t})}var Po=_(require("react"),1),Zc=_(require("@radix-ui/react-popover"),1),Xc=require("vaul");var wi=require("react"),Ll=(0,wi.createContext)(null);function yi(){let e=(0,wi.useContext)(Ll);if(!e)throw new Error("AppLauncher compound components must be used within <AppLauncher>");return e}var vi=_(require("react"),1),Bb="__dappUiOverlay",ro=[],Lo=0,Pl=0,xi=!1,Dl=!1;function Kc(){if(Pl>0){Pl-=1;return}Lo=Math.max(0,Lo-1),ro.pop()?.close(),Ol()}function zb(){xi||(window.addEventListener("popstate",Kc),xi=!0)}function Ol(){ro.length>0||!xi||(window.removeEventListener("popstate",Kc),xi=!1)}function Fb(){Dl||(Dl=!0,queueMicrotask(()=>{Dl=!1;let e=Lo-ro.length;if(e<=0){Ol();return}Lo-=e,Pl+=1,window.history.go(-e),Ol()}))}function Vn(e,t){let n=vi.useRef(t);n.current=t,vi.useEffect(()=>{if(!(!e||typeof window>"u"))return Ub(()=>n.current())},[e])}function Ub(e){let t={close:e};return ro.push(t),Lo<ro.length&&(window.history.pushState({[Bb]:!0},""),Lo+=1),zb(),()=>{let n=ro.lastIndexOf(t);n!==-1&&(ro.splice(n,1),Fb())}}var ki=require("react");function Do(e){let[t,n]=(0,ki.useState)(!1);return(0,ki.useEffect)(()=>{let r=window.matchMedia(e);n(r.matches);let o=a=>n(a.matches);return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[e]),t}function he(e,{insertAt:t}={}){if(!e||typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}he(`[data-theme=dark]{--al-bg: var(--ds-surface-default, #1e232e);--al-bg-hover: var(--ds-surface-medium, #252b39);--al-text: var(--ds-content-highest, #ffffff);--al-text-secondary: var(--ds-content-medium, #ffffffa6);--al-border: var(--ds-border-default, #ffffff12);--al-shadow: var(--ds-shadow-modal, 0px 4px 30px -1px rgba(0, 0, 0, .7));--al-primary: #f3742e;--al-primary-hover: #ff8a4a;--al-primary-soft: #3a261f;--al-new-ribbon-bg: #ed0a72;--al-badge-bg: var(--ds-accent-primary-low, #422a1f);--al-badge-text: var(--ds-accent-primary-default, #f0640d);--al-drawer-overlay: var(--ds-overlay-dim, #000000b3)}[data-theme=light]{--al-bg: var(--ds-surface-default, #ffffff);--al-bg-hover: var(--ds-surface-medium, #f5f7fa);--al-text: var(--ds-content-highest, #000000);--al-text-secondary: var(--ds-content-medium, #000000a6);--al-border: var(--ds-border-default, #00000012);--al-shadow: var(--ds-shadow-modal, 0px 4px 30px -1px rgba(0, 0, 0, .15));--al-primary: #f3742e;--al-primary-hover: #ff8a4a;--al-primary-soft: #fff1eb;--al-new-ribbon-bg: #ed0a72;--al-badge-bg: var(--ds-accent-primary-low, #fff5ee);--al-badge-text: var(--ds-accent-primary-default, #ff8438);--al-drawer-overlay: var(--ds-overlay-dim, #00000080)}
1
+ "use strict";var Ib=Object.create;var fi=Object.defineProperty;var Eb=Object.getOwnPropertyDescriptor;var Ab=Object.getOwnPropertyNames;var Mb=Object.getPrototypeOf,Lb=Object.prototype.hasOwnProperty;var Db=(e,t)=>{for(var n in t)fi(e,n,{get:t[n],enumerable:!0})},Dc=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ab(t))!Lb.call(e,o)&&o!==n&&fi(e,o,{get:()=>t[o],enumerable:!(r=Eb(t,o))||r.enumerable});return e};var H=(e,t,n)=>(n=e!=null?Ib(Mb(e)):{},Dc(t||!e||!e.__esModule?fi(n,"default",{value:e,enumerable:!0}):n,e)),Pb=e=>Dc(fi({},"__esModule",{value:!0}),e);var H2={};Db(H2,{APPLE_ICON:()=>ri,AppLauncher:()=>Ul,AppLauncherContent:()=>Gl,AppLauncherTrigger:()=>jl,BINANCE_ICON:()=>ti,BridgeFlow:()=>go,CHAINS_CONFIG_FILE:()=>to,CONNECTOR_REGISTRY:()=>pa,CROSSX_ICON:()=>$a,ConnectButton:()=>hc,ConnectorId:()=>Ii,DEFAULT_SKILLS_HREF:()=>bc,DEFAULT_TRUSTED_FACTORIES:()=>ko,DappUiErrorBoundary:()=>sa,GOOGLE_ICON:()=>ni,GetOneUsd:()=>mc,METAMASK_ICON:()=>ei,OnePopBody:()=>Da,OnePopGetTokenTrigger:()=>Ud,PORTFOLIO_SECTIONS:()=>Na,RelayApiError:()=>Wn,RelayDeposit:()=>Yo,RelayHistory:()=>nc,RelayRecovery:()=>sc,SOCIAL_REGISTRY:()=>ns,SendFlow:()=>ha,SkillsButton:()=>wc,StatusTracker:()=>pc,TOKEN_STATS_QUERY_KEY:()=>Ki,USER_BALANCE_QUERY_KEY:()=>qi,WALLET_PORTFOLIO_QUERY_PREFIX:()=>md,WALLET_REGISTRY:()=>Fo,WalletConnectModal:()=>gc,WalletInfo:()=>yo,WalletInfoPage:()=>Gd,WalletPortfolio:()=>Rd,WalletPortfolioBody:()=>uo,announceAppLauncherUsage:()=>yi,captureDappUiException:()=>ia,createRelayClient:()=>rn,findGetOneUsdToken:()=>Va,getChainDisplay:()=>jc,getDappUiSentryScope:()=>aa,getOneUsdTokenKey:()=>_a,initDappUiSentry:()=>Mo,invalidateWalletPortfolioQueries:()=>Ar,isGetOneUsdActionEnabled:()=>qa,isGetOneUsdActionSupported:()=>Xo,isGetOneUsdActionVisible:()=>Zo,isGetOneUsdTargetAvailable:()=>Qa,matchesGetOneUsdToken:()=>il,normalizeFailureReason:()=>Nn,resolveEnvironment:()=>it,resolveGetOneUsdRoute:()=>Ko,selectChainMeta:()=>bi,setDappUiAnalyticsUser:()=>ro,trackDappUiEvent:()=>la,trackDappUiFunnel:()=>Je,useChainDisplay:()=>Fr,useChainsConfig:()=>Wc,useGlobalMenu:()=>da,useRelayConfig:()=>lc,useRelayOrders:()=>Pr,useRelayRecovery:()=>dc,useTokenBalance:()=>Tr,useTokenStats:()=>Ir,useWalletDetect:()=>Za});module.exports=Pb(H2);var Ob={};function Pc(e){try{return Ob.env?.[e]}catch{return}}function Oc(e){if(!(typeof process>"u"))return process.env?.[e]}function it(e){if(e)return Bc(e);let t=Pc("VITE_CROSSX_ENVIRONMENT")??Pc("NEXT_PUBLIC_CROSSX_ENVIRONMENT")??Oc("NEXT_PUBLIC_CROSSX_ENVIRONMENT")??Oc("CROSSX_ENVIRONMENT");return Bc(t)}function Bc(e){switch(e?.toLowerCase()){case"dev":case"development":return"dev";case"stage":case"staging":case"stg":return"stage";default:return"production"}}var ar=H(require("react"),1);var oa="eip155";function On(e){return`${oa}:${e}`}function zc(e){let t=e.indexOf(":");return t>0?e.slice(0,t):void 0}function Fc(e){let t=zc(e);return t===void 0||t===oa}function mi(e){if(typeof e=="number")return Number.isSafeInteger(e)&&e>0?e:void 0;if(typeof e!="string")return;let t=e.trim(),n=zc(t);if(n!==void 0&&n!==oa)return;let r=n===oa?t.slice(oa.length+1):t;if(!/^\d+$/.test(r))return;let o=Number(r);return Number.isSafeInteger(o)&&o>0?o:void 0}function Uc(e){let t=mi(e);return t===void 0?void 0:On(t)}var Bb={dev:"https://stg-contents.crosstoken.io/frontend/common/app-launcher",stage:"https://stg-contents.crosstoken.io/frontend/common/app-launcher",production:"https://contents.crosstoken.io/frontend/common/app-launcher"},zb=3e3;function Bn(e,t){if(e!=null)return typeof e=="object"&&!Array.isArray(e)&&("dev"in e||"stage"in e||"production"in e)?e[t]:e}var Ml=new Map;function kr(e,t){let n=`${Bb[t]}/${e}`,r=Ml.get(n);return r||(r=(async()=>{let o=new AbortController,a=setTimeout(()=>o.abort(),zb);try{let i=await fetch(n,{cache:"no-store",signal:o.signal});return i.ok?await i.json():null}catch{return null}finally{clearTimeout(a)}})().then(o=>(o===null&&Ml.delete(n),o)),Ml.set(n,r)),r}function Fb(e){return typeof e=="string"&&e.startsWith("https://")}async function Be(e,t){let n=await kr("endpoints.json",t),r=Bn(n?.apis?.[e],t);if(!Fb(r))throw new Error(`[remote-config] endpoints.json missing or invalid api base: ${e} (${t})`);return r}var gi="apps.json";function hi(e,t){let n=Bn(e?.relay?.forwarderFactories,t),r=[n?.standingForwarderFactory,n?.depositorForwarderFactory].filter(o=>typeof o=="string");return r.length>0?r:void 0}var to="chains.json";function bi(e,t){return e?e[On(t)]??e[String(t)]??{}:{}}async function jc(e,t){let n=await kr(to,t);return bi(n?.chains,e)}function Fr(e,t){let[n,r]=ar.useState({});return ar.useEffect(()=>{if(e==null){r({});return}let o=!0;return kr(to,t).then(a=>{o&&r(bi(a?.chains,e))}),()=>{o=!1}},[e,t]),n}function Wc(e){let[t,n]=ar.useState({});return ar.useEffect(()=>{let r=!0;return kr(to,e).then(o=>{r&&n(o?.chains??{})}),()=>{r=!1}},[e]),t}function Xt(e,t,n){let[r,o]=ar.useState(void 0),a=ar.useRef(n);return a.current=n,ar.useEffect(()=>{let i=!0;return kr(e,t).then(s=>{if(!i)return;let l=a.current(s);l!==void 0&&o(l)}),()=>{i=!1}},[e,t]),r}var no="1.5.0-beta.3";var wi="__nexusCrossAppLauncherRuntime";function Ub(){if(typeof window>"u")return null;let e=window;return e[wi]??(e[wi]={mode:"dapp-ui"}),e[wi]}function jb(e){if(e.scheduled)return;e.scheduled=!0;let t=()=>{if(e.scheduled=!1,e.loggedMode!==e.mode){if(e.mode==="connect-kit-react"){let n=e.connectKitVersion??"unknown";console.info(`[CROSSx App Launcher] connect-kit-react v${n} \uCD08\uAE30\uD654 \uC644\uB8CC (dapp-ui v${no}, \uC0AC\uC6A9 \uBAA8\uB4DC: connect-kit)`)}else console.info(`[CROSSx App Launcher] dapp-ui v${no} \uCD08\uAE30\uD654 \uC644\uB8CC (\uC0AC\uC6A9 \uBAA8\uB4DC: dapp-ui only)`);e.loggedMode=e.mode}};typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t)}function yi(e){let t=Ub();t&&(e?.mode==="connect-kit-react"?t.mode="connect-kit-react":t.mode||(t.mode="dapp-ui"),e?.connectKitVersion&&(t.connectKitVersion=e.connectKitVersion),jb(t))}var ir=require("@sentry/react");var Wb="https://5c82aeb32da33b5a0a14b7c5393992ca@o4511668907081728.ingest.de.sentry.io/4511705324126289",Gb=`dapp-ui@${no}`,Ao=null,Gc=.1;function Hc(){return Gc}function Hb(e){switch(e){case"dev":return"dev";case"stage":return"stg";default:return"prod"}}function Mo(e){if(Ao)return Ao;if(typeof window>"u")return null;let t=Hb(it(e?.environment));typeof e?.analyticsSampleRate=="number"&&(Gc=Math.min(1,Math.max(0,e.analyticsSampleRate)));let n=new ir.BrowserClient({dsn:e?.dsn??Wb,transport:ir.makeFetchTransport,stackParser:ir.defaultStackParser,integrations:[(0,ir.linkedErrorsIntegration)()],environment:t,release:Gb,enabled:e?.enabled??t==="prod"}),r=new ir.Scope;return r.setClient(n),r.setTags({package:"dapp-ui",framework:"react",source:"dapp-ui"}),n.init(),Ao=r,Ao}function aa(){return Ao}function ia(e,t){let n=Ao??Mo();if(n)return n.captureException(e,t?{captureContext:{extra:t}}:void 0)}var _c=require("react");var sa=class extends _c.Component{constructor(){super(...arguments);this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(n,r){ia(n,{componentStack:r.componentStack??void 0,boundary:this.props.name??"dapp-ui"})}render(){return this.state.hasError?this.props.fallback??null:this.props.children}};function Ie(...e){return e.filter(Boolean).join(" ")}var _b=/CROSSx|ONE\s?wallet|ONE\s?pocket/i;function Lo(){return typeof window>"u"?!1:_b.test(window.navigator.userAgent)}var Vc="__nexus_dapp_ui_uid",Ll=null;function Vb(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():Array.from({length:32},()=>Math.floor(Math.random()*16).toString(16)).join("")}function Dl(){if(Ll)return Ll;let e=null;try{e=window.localStorage.getItem(Vc)}catch{}if(!e||!e.startsWith("anon_")){e=`anon_${Vb()}`;try{window.localStorage.setItem(Vc,e)}catch{}}return Ll=e,e}async function Qc(e){if(typeof crypto>"u"||!crypto.subtle)return null;try{let t=new TextEncoder().encode(e.trim().toLowerCase()),n=await crypto.subtle.digest("SHA-256",t);return`wallet_${Array.from(new Uint8Array(n),o=>o.toString(16).padStart(2,"0")).join("").slice(0,16)}`}catch{return null}}function Qb(){let e=window.navigator.userAgent;return/ipad|tablet|(android(?!.*mobile))/i.test(e)?"tablet":/mobile|iphone|ipod|android/i.test(e)?"mobile":"desktop"}function Kc(){return{host:window.location.hostname,device_type:Qb(),is_cross_inapp:String(Lo())}}var qc=!1;function Pl(){if(typeof window>"u")return null;let e=aa()??Mo();return e?(qc||(qc=!0,e.setUser({id:Dl()})),e):null}function Zc(){return Math.random()>=Hc()}var Yc=0;function ro(e){let t=Pl();if(!t)return;let n=++Yc;if(!e){t.setUser({id:Dl()});return}Qc(e).then(r=>{r&&n===Yc&&t.setUser({id:r})})}function la(e,t,n){let r=Pl();!r||Zc()||r.captureMessage(`ui: ${e}_${t}`,"info",{captureContext:{tags:{...Kc(),feature:e,action:t,...n}}})}function Je(e,t,n){let r=Pl();if(!r||Zc())return;let o=n?.status??"success";r.captureMessage(`funnel: ${e}_${t}`,"info",{captureContext:{tags:{...Kc(),flow:e,funnel_step:`${e}_${t}`,funnel_status:o,...o==="failure"?{failure_reason:n?.reason??"unknown"}:{},...n?.tags}}})}function Nn(e){let t=e,n=String((t&&typeof t=="object"&&"message"in t?t.message:e)??"").toLowerCase();return t?.code===4001||/reject|denied|declin|cancel/i.test(n)?"user-rejected":/insufficient (funds|gas|balance)|exceeds balance/i.test(n)?"insufficient-gas":/timeout|timed out|deadline/i.test(n)?"timeout":/revert|execution failed/i.test(n)?"contract-reverted":/network|fetch|connection|disconnected|offline/i.test(n)?"network":"unknown"}var Xc=require("react");var Jc=require("react/jsx-runtime");function Me({feature:e,children:t}){let n=(0,Xc.useCallback)(r=>{let o=r.nativeEvent;if(o.__dappUiTracked)return;let i=r.target?.closest?.("[data-track]");if(!i)return;let s=i.getAttribute("data-track");if(!s)return;o.__dappUiTracked=!0;let l=i.getAttribute("data-track-id");la(e,s,l?{item_id:l}:void 0)},[e]);return(0,Jc.jsx)("div",{style:{display:"contents"},onClick:n,children:t})}var Oo=H(require("react"),1),ep=H(require("@radix-ui/react-popover"),1),tp=require("vaul");var xi=require("react"),Ol=(0,xi.createContext)(null);function vi(){let e=(0,xi.useContext)(Ol);if(!e)throw new Error("AppLauncher compound components must be used within <AppLauncher>");return e}var Ci=H(require("react"),1),qb="__dappUiOverlay",oo=[],Do=0,zl=0,ki=!1,Bl=!1;function $c(){if(zl>0){zl-=1;return}Do=Math.max(0,Do-1),oo.pop()?.close(),Fl()}function Yb(){ki||(window.addEventListener("popstate",$c),ki=!0)}function Fl(){oo.length>0||!ki||(window.removeEventListener("popstate",$c),ki=!1)}function Kb(){Bl||(Bl=!0,queueMicrotask(()=>{Bl=!1;let e=Do-oo.length;if(e<=0){Fl();return}Do-=e,zl+=1,window.history.go(-e),Fl()}))}function Qn(e,t){let n=Ci.useRef(t);n.current=t,Ci.useEffect(()=>{if(!(!e||typeof window>"u"))return Zb(()=>n.current())},[e])}function Zb(e){let t={close:e};return oo.push(t),Do<oo.length&&(window.history.pushState({[qb]:!0},""),Do+=1),Yb(),()=>{let n=oo.lastIndexOf(t);n!==-1&&(oo.splice(n,1),Kb())}}var Ri=require("react");function Po(e){let[t,n]=(0,Ri.useState)(!1);return(0,Ri.useEffect)(()=>{let r=window.matchMedia(e);n(r.matches);let o=a=>n(a.matches);return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[e]),t}function he(e,{insertAt:t}={}){if(!e||typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}he(`[data-theme=dark]{--al-bg: var(--ds-surface-default, #1e232e);--al-bg-hover: var(--ds-surface-medium, #252b39);--al-text: var(--ds-content-highest, #ffffff);--al-text-secondary: var(--ds-content-medium, #ffffffa6);--al-border: var(--ds-border-default, #ffffff12);--al-shadow: var(--ds-shadow-modal, 0px 4px 30px -1px rgba(0, 0, 0, .7));--al-primary: #f3742e;--al-primary-hover: #ff8a4a;--al-primary-soft: #3a261f;--al-new-ribbon-bg: #ed0a72;--al-badge-bg: var(--ds-accent-primary-low, #2e2854);--al-badge-text: var(--ds-accent-primary-default, #a392ff);--al-drawer-overlay: var(--ds-overlay-dim, #000000b3)}[data-theme=light]{--al-bg: var(--ds-surface-default, #ffffff);--al-bg-hover: var(--ds-surface-medium, #f5f7fa);--al-text: var(--ds-content-highest, #000000);--al-text-secondary: var(--ds-content-medium, #000000a6);--al-border: var(--ds-border-default, #00000012);--al-shadow: var(--ds-shadow-modal, 0px 4px 30px -1px rgba(0, 0, 0, .15));--al-primary: #f3742e;--al-primary-hover: #ff8a4a;--al-primary-soft: #fff1eb;--al-new-ribbon-bg: #ed0a72;--al-badge-bg: var(--ds-accent-primary-low, #f5f3ff);--al-badge-text: var(--ds-accent-primary-default, #7e54f4);--al-drawer-overlay: var(--ds-overlay-dim, #00000080)}
2
2
  `);he(`.al-trigger-btn{--at-bg: transparent;--at-bg-hover: #eaedf1;--at-color: var(--ds-content-high, rgba(0, 0, 0, .85));--at-border: none;--at-border-radius: 8px;--at-size: 36px;--at-padding: 0;--at-press-scale: .95;--at-transition: background-color .15s ease;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--at-size);height:var(--at-size);padding:var(--at-padding);border:var(--at-border);background:var(--at-bg);border-radius:var(--at-border-radius);color:var(--at-color);cursor:pointer;transition:var(--at-transition)}.al-trigger-btn:hover,.al-trigger-btn[data-state=open]{background:var(--at-bg-hover)}.al-trigger-btn:active:not(:disabled){background:var(--at-bg-hover);transform:scale(var(--at-press-scale))}.al-trigger-btn[data-theme=dark]{--at-color: var(--ds-content-high, rgba(255, 255, 255, .85));--at-bg-hover: #252b39}.al-trigger-btn[data-theme=light]{--at-color: var(--ds-content-high, rgba(0, 0, 0, .85))}
3
3
  `);he(`@keyframes al-fade-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
4
4
  `);he(`.al-popover-content{-webkit-font-smoothing:antialiased;z-index:100001;border-radius:24px;background:var(--al-bg);border:1px solid var(--al-popover-border, var(--al-border));box-shadow:var(--al-popover-shadow, var(--al-shadow));animation:al-fade-in .15s ease-out;max-height:80vh;overflow-x:hidden;overflow-y:auto;padding:20px 4px;box-sizing:border-box}.al-popover-content .al-menu{display:flex;flex-direction:column;width:424px;max-width:calc(100vw - 32px);padding:0 12px;box-sizing:border-box}.al-popover-content .al-grid{display:grid;grid-template-columns:repeat(4,100px);row-gap:12px;column-gap:0;justify-content:center;align-items:start}.al-popover-content .al-grid-item{position:relative;flex-direction:column;justify-content:flex-start;align-items:center;gap:6px;padding:12px 0;width:100px;min-width:0;border-radius:10px}.al-popover-content .al-grid-item-left{flex-direction:column;align-items:center;gap:8px;width:100%;overflow:visible}.al-popover-content .al-grid-item-icon{width:50px;height:50px;border-radius:10.125px;overflow:visible}.al-popover-content .al-grid-item-icon img{object-fit:cover}.al-popover-content .al-grid-item-label{font-family:Inter,sans-serif;font-size:12px;font-weight:500;line-height:1.1;letter-spacing:0;text-align:center;color:var(--al-text);max-width:100%;white-space:normal;overflow-wrap:anywhere}.al-popover-content .al-grid-item-text{flex-direction:column;align-items:center;justify-content:center;gap:2px;max-width:100%;min-height:26px}.al-popover-content .al-grid-item-status-text{font-size:10px;line-height:1.1}.al-popover-content .al-badge-list{display:none}.al-drawer-overlay{position:fixed;inset:0;z-index:100000;background:var(--al-drawer-overlay)}.al-drawer-content{-webkit-font-smoothing:antialiased;position:fixed;top:0;right:0;bottom:0;z-index:100001;width:100vw;background:var(--al-bg);overflow-x:hidden;overflow-y:hidden;display:flex;flex-direction:column;box-sizing:border-box}.al-drawer-body{flex:1;overflow-y:auto;overscroll-behavior-y:contain;min-height:0}.al-drawer-content .al-menu{display:flex;flex-direction:column;min-height:0}.al-drawer-content .al-grid{display:flex;flex-direction:column;grid-template-columns:none;max-width:100%;overflow:hidden;flex-shrink:0;gap:0;row-gap:0;column-gap:0;padding:8px 16px}.al-drawer-content .al-grid-item{width:100%;max-width:100%;gap:8px;padding:16px 12px;border-radius:8px;overflow:hidden;background:transparent}.al-drawer-content .al-grid-item:hover,.al-drawer-content .al-grid-item[data-active=true]{background:var(--al-bg-hover)}.al-drawer-content .al-grid-item-left{gap:8px;flex:1 1 auto;min-width:0;overflow:visible}.al-drawer-content .al-grid-item-icon{width:32px;height:32px;border-radius:6.75px;overflow:visible}.al-drawer-content .al-grid-item-icon img{width:100%;height:100%;object-fit:cover;border-radius:6.75px}.al-drawer-content .al-grid-item-label{font-size:16px;line-height:1.35;letter-spacing:0;font-weight:400}.al-drawer-content .al-grid-item[data-active=true] .al-grid-item-label{font-weight:500}.al-drawer-header{display:flex;align-items:center;justify-content:space-between;padding:16px;flex-shrink:0}.al-drawer-title{font-family:Inter,sans-serif;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--al-text);margin:0}.al-drawer-close{display:inline-flex;align-items:center;justify-content:center;padding:4px;border:none;background:transparent;border-radius:4px;cursor:pointer;color:var(--al-text-secondary);transition:opacity .15s ease}.al-drawer-close:hover{opacity:.7}.al-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:4px;padding:8px}.al-grid-item{display:flex;align-items:center;justify-content:flex-start;gap:10px;padding:16px 12px;border:none;background:var(--al-bg);border-radius:8px;cursor:pointer;transition:none;color:var(--al-text);text-align:left;font-family:Inter,sans-serif;flex-shrink:0}.al-grid-item:hover,.al-grid-item[data-active=true]{background:var(--al-bg-hover)!important}.al-grid-item-left{display:flex;align-items:center;gap:8px;min-width:0;overflow:visible}.al-grid-item-text{display:flex;flex-direction:column;align-items:flex-start;gap:1px;max-width:100%;min-width:0}.al-grid-item-icon{display:flex;align-items:center;justify-content:center;position:relative;width:24px;height:24px;overflow:visible;border-radius:5px;flex-shrink:0}.al-grid-item-icon img{width:100%;height:100%;object-fit:contain;border-radius:inherit}.al-grid-item-label{font-family:Inter,sans-serif;font-size:16px;font-weight:500;line-height:150%;letter-spacing:0;color:var(--al-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.al-grid-item-status-text{font-family:Inter,sans-serif;font-size:12px;font-weight:400;line-height:1.15;letter-spacing:0;color:var(--al-text);white-space:nowrap}.al-status-ribbon{position:absolute;top:-6px;right:-6px;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;box-sizing:border-box;border-radius:999px;color:#fff;font-family:Pretendard,Inter,sans-serif;font-size:12px;font-weight:800;line-height:1;pointer-events:none;box-shadow:0 1px 3px #0000002e}.al-status-ribbon-new{background:var(--al-new-ribbon-bg)}.al-badge{display:flex;padding:1px 4px 2px;justify-content:center;align-items:center;gap:2px;border-radius:3px;background:var(--al-badge-bg);color:var(--al-badge-text);font-family:Pretendard,Inter,sans-serif;font-size:10px;font-weight:600;line-height:150%;letter-spacing:0;white-space:nowrap;flex-shrink:0}
5
- `);he("");var Ci=require("react/jsx-runtime");function Bl({env:e,theme:t="dark",mobileBreakpoint:n=768,domain:r,children:o}){let a=Do(`(max-width: ${n}px)`),[i,s]=Po.useState(!1),l=Po.useCallback(()=>s(!1),[]),d=it(e);Vn(i,l);let p=Po.useMemo(()=>({env:d,theme:t,isMobile:a,open:i,domain:r,close:l}),[d,t,a,i,r,l]);return(0,Ci.jsx)(Ll.Provider,{value:p,children:a?(0,Ci.jsx)(Xc.Drawer.Root,{direction:"right",open:i,onOpenChange:s,noBodyStyles:!0,children:o},"drawer"):(0,Ci.jsx)(Zc.Root,{open:i,onOpenChange:s,children:o},"popover")})}var tp=_(require("@radix-ui/react-popover"),1),np=require("vaul");var wn=require("react/jsx-runtime");function Jc({size:e=18}){return(0,wn.jsxs)("svg",{className:"al-trigger-icon",width:e,height:e,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,wn.jsx)("rect",{width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,wn.jsx)("rect",{x:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,wn.jsx)("rect",{x:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,wn.jsx)("rect",{y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,wn.jsx)("rect",{x:"7",y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,wn.jsx)("rect",{x:"14",y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,wn.jsx)("rect",{y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,wn.jsx)("rect",{x:"7",y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,wn.jsx)("rect",{x:"14",y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"})]})}function $c(){return(0,wn.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,wn.jsx)("path",{d:"M12 19L5 12M5 12L12 5M5 12H19",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function ep(){return(0,wn.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,wn.jsx)("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}var oo=require("react/jsx-runtime");function zl({asChild:e,children:t,className:n,style:r}){let{isMobile:o,theme:a}=yi(),i=t!=null,s=e??!0,l=n?`al-trigger-btn ${n}`:"al-trigger-btn",d=i?t:(0,oo.jsx)("button",{type:"button",className:l,"data-theme":a,"data-track":"open",style:r,children:(0,oo.jsx)(Jc,{size:18})});return o?(0,oo.jsx)(Le,{feature:"app_launcher",children:(0,oo.jsx)(np.Drawer.Trigger,{asChild:s,children:d})}):(0,oo.jsx)(Le,{feature:"app_launcher",children:(0,oo.jsx)(tp.Trigger,{asChild:s,children:d})})}var sr=_(require("react"),1),Ri=_(require("@radix-ui/react-popover"),1),ao=require("vaul");var ap=require("@tanstack/react-query");var rp={dev:"https://stg-contents.crosstoken.io/frontend/common/app-launcher/app-launcher-v2.json",stage:"https://stg-contents.crosstoken.io/frontend/common/app-launcher/app-launcher-v2.json",production:"https://contents.crosstoken.io/frontend/common/app-launcher/app-launcher-v2.json"};var jb="https://stg-contents.crosstoken.io/frontend/common/app-launcher/icons",Wb="https://contents.crosstoken.io/frontend/common/app-launcher/icons";function qn(e,t){return`${e==="production"?Wb:jb}/${t}.png`}function op(e){let t=e==="production"?"production":"stage";return{version:"0.0.1-fallback",items:[{id:"gametoken-cross",label:"Gametoken",description:"Trade game tokens easily using CROSS.",url:{dev:"https://stg.onechain.nexus/gametoken",stage:"https://stg.onechain.nexus/gametoken",production:"https://www.onechain.nexus/gametoken"},iconUrl:qn(t,"game-token"),order:1e3,type:"gametoken",badge:null,isNew:!1,serviceStatus:"available"},{id:"forge",label:"Forge",description:"Launch Your Game, Ignite the Market",url:{dev:"https://stg.onechain.nexus/forge",stage:"https://stg.onechain.nexus/forge",production:"https://onechain.nexus/forge"},iconUrl:qn(t,"forge"),order:4e3,type:"forge",badge:null,isNew:!0,serviceStatus:"available"},{id:"crossd",label:"Bridge",description:"The first decentralized exchange on the CROSS network.",url:{dev:"https://stg.crossdefi.io/swap-bridge",stage:"https://stg.crossdefi.io/swap-bridge",production:"https://www.crossdefi.io/swap-bridge"},iconUrl:qn(t,"crossd"),order:5e3,type:"crossd",badge:null,isNew:!1,serviceStatus:"ending"},{id:"onepop",label:"ONEpop",description:"Send crypto with just an X handle.",url:{dev:"https://dev.onechain.nexus/pop",stage:"https://stg.onechain.nexus/pop",production:"https://onechain.nexus/pop"},iconUrl:t==="production"?"https://contents.onechain.nexus/frontend/common/app-launcher/icons/onepop.png":"https://stg-contents.onechain.nexus/frontend/common/app-launcher/icons/onepop.png",order:5500,type:"onepop",badge:null,isNew:!0,serviceStatus:"available"},{id:"prediction",label:"Prediction",description:"Prediction market",url:{dev:"https://stg-prediction.crossdefi.io",stage:"https://stg-prediction.crossdefi.io",production:"https://prediction.crossdefi.io/"},iconUrl:qn(t,"prediction"),order:6e3,type:"prediction",badge:null,isNew:!0,serviceStatus:"available"},{id:"rewards",label:"Rewards",description:"Deposit CROSS and earn rewards. Grow together.",url:{dev:"https://stg.onechain.nexus/rewards",stage:"https://stg.onechain.nexus/rewards",production:"https://onechain.nexus/rewards"},iconUrl:qn(t,"reward"),order:7e3,type:"rewards",badge:null,isNew:!1,serviceStatus:"ending"},{id:"cross-staking",label:"Staking",description:"Stake CROSS and earn rewards.",url:{dev:"https://stg-stake.ogfcorp.com",stage:"https://stg-stake.ogfcorp.com",production:"https://stake.ogfcorp.com"},iconUrl:qn(t,"cross-staking"),order:7500,type:"cross-staking",badge:null,isNew:!0,serviceStatus:"available"},{id:"nft",label:"NFT",description:"Trade and collect NFTs in the CROSS ecosystem.",url:{dev:"https://stg.crossnft.io/",stage:"https://stg.crossnft.io/",production:"https://www.crossnft.io/"},iconUrl:qn(t,"nft"),order:8e3,type:"nft",badge:null,isNew:!1,serviceStatus:"available"},{id:"play",label:"Quest",description:"Discover and play games on CROSS.",url:{dev:"https://stg.onechain.nexus/quest",stage:"https://stg.onechain.nexus/quest",production:"https://www.onechain.nexus/quest"},iconUrl:qn(t,"play"),order:8500,type:"play",badge:null,isNew:!0,serviceStatus:"available"},{id:"shop",label:"Shop",description:"Game Payment Platform & In-Game Currency Store.",url:{dev:"https://stg.onechain.nexus/shop",stage:"https://stg.onechain.nexus/shop",production:"https://www.onechain.nexus/shop"},iconUrl:qn(t,"shop"),order:9e3,type:"shop",badge:null,isNew:!1,serviceStatus:"available"},{id:"explorer",label:"Explorer",description:"View transactions, blocks, and token data on the CROSS network.",url:{dev:"https://stg-explorer.onechain.nexus",stage:"https://stg-explorer.onechain.nexus",production:"https://explorer.onechain.nexus"},iconUrl:qn(t,"explorer"),order:12e3,type:"explorer",badge:null,isNew:!1,serviceStatus:"available"},{id:"wave",label:"Wave",description:"Stream, support, and earn in the CROSS ecosystem.",url:{dev:"https://stg.onechain.nexus/wave",stage:"https://stg.onechain.nexus/wave",production:"https://www.onechain.nexus/wave"},iconUrl:qn(t,"wave"),order:11e4,type:"wave",badge:null,isNew:!1,serviceStatus:"available"}]}}function la(e){let t=it(e);return(0,ap.useQuery)({queryKey:["global-menu",t],queryFn:async()=>{try{let n=await fetch(rp[t],{cache:"no-store"});if(!n.ok)throw new Error(`Failed to fetch global menu: ${n.status}`);return n.json()}catch{return op(t)}},staleTime:300*1e3,gcTime:600*1e3,retry:!1,refetchOnMount:!0})}function Fl(e){return e.serviceStatus==="ending"||e.serviceStatus==="comingSoon"?e.serviceStatus:"available"}function sp(e,t){return typeof e=="string"?e:e[t]??e.production??e.stage??e.dev}function lp(e){return[...e].sort((t,n)=>{let r=ip(t)-ip(n);return r!==0?r:t.order-n.order})}function ip(e){let t=Fl(e);return t==="comingSoon"?0:t==="ending"?2:1}var ct=require("react/jsx-runtime");function Gb(e){return e.id==="cross-staking"||e.type==="cross-staking"}function Ul({align:e="end",sideOffset:t=8,className:n}){let{env:r,theme:o,isMobile:a,domain:i,close:s}=yi(),{data:l}=la(r),d=sr.useMemo(()=>lp(l?.items??[]),[l?.items]),p=24,w=sr.useRef(null),u=sr.useRef(!1),h=sr.useCallback(v=>{w.current={x:v.clientX,y:v.clientY},u.current=!1},[]),x=sr.useCallback(v=>{let C=w.current;w.current=null,C&&(u.current=Math.abs(v.clientX-C.x)>p||Math.abs(v.clientY-C.y)>p)},[]),y=sr.useCallback(()=>{w.current=null,u.current=!0},[]),f=typeof window<"u"?window.location.pathname:"",c=sr.useCallback((v,C)=>{let N=u.current;if(u.current=!1,N&&v.detail!==0)return;let I=C.url[r]??C.url.production,R=dp(I,i);if(!R)try{let S=new URL(I);if(S.pathname===window.location.pathname&&S.search===window.location.search&&S.hash===window.location.hash){s();return}}catch{}if(R){let S=window.open(I,"_blank");if(S){S.opener=null,s();return}}window.location.href=I},[r,i,s]),b=v=>{let C=v.url[r]??v.url.production,N=dp(C,i),I=Fl(v),R=I==="ending",S=sp(v.iconUrl,r),E=!1;if(!N)try{let M=new URL(C).pathname;E=f===M||f.startsWith(M+"/")}catch{E=!1}return(0,ct.jsx)("button",{type:"button",className:"al-grid-item","data-track":"menu_item_click","data-track-id":v.id,"data-active":E||void 0,"data-service-status":I,onPointerDown:h,onPointerUp:x,onPointerCancel:y,onClick:M=>c(M,v),children:(0,ct.jsxs)("div",{className:"al-grid-item-left",children:[(0,ct.jsxs)("div",{className:"al-grid-item-icon",children:[(0,ct.jsx)("img",{src:S,alt:v.label,width:24,height:24,loading:"lazy"}),v.isNew&&(0,ct.jsx)("span",{className:"al-status-ribbon al-status-ribbon-new",children:"N"})]}),(0,ct.jsxs)("span",{className:"al-grid-item-text",children:[(0,ct.jsx)("span",{className:"al-grid-item-label",children:v.label}),R&&(0,ct.jsx)("span",{className:"al-grid-item-status-text",children:"(End Soon)"}),v.badge&&!Gb(v)&&(0,ct.jsx)("span",{className:"al-badge al-badge-list",children:v.badge})]})]})},v.id)},g=(0,ct.jsx)("div",{className:"al-menu","data-theme":o,children:(0,ct.jsx)("div",{className:"al-grid",children:d.map(b)})});return a?(0,ct.jsx)(Le,{feature:"app_launcher",children:(0,ct.jsxs)(ao.Drawer.Portal,{children:[(0,ct.jsx)(ao.Drawer.Overlay,{className:"al-drawer-overlay"}),(0,ct.jsxs)(ao.Drawer.Content,{className:Ee("al-drawer-content",n),"data-theme":o,children:[(0,ct.jsxs)("div",{className:"al-drawer-header",children:[(0,ct.jsx)(ao.Drawer.Close,{className:"al-drawer-close","data-track":"close",children:(0,ct.jsx)($c,{})}),(0,ct.jsx)(ao.Drawer.Title,{className:"al-drawer-title",children:"ONE Services"}),(0,ct.jsx)(ao.Drawer.Close,{className:"al-drawer-close","data-track":"close",children:(0,ct.jsx)(ep,{})})]}),(0,ct.jsx)("div",{className:"al-drawer-body",children:g})]})]})}):(0,ct.jsx)(Le,{feature:"app_launcher",children:(0,ct.jsx)(Ri.Portal,{children:(0,ct.jsx)(Ri.Content,{align:e,sideOffset:t,className:Ee("al-popover-content",n),"data-theme":o,children:g})})})}function dp(e,t){try{let n=new URL(e).hostname;return typeof window>"u"?!0:n!==(t??window.location.hostname)}catch{return!1}}var Oa=_(require("react"),1),Kg=_(require("@radix-ui/react-popover"),1),Zg=require("vaul");var Ni=require("react"),da=(0,Ni.createContext)(null);function Fr(){let e=(0,Ni.useContext)(da);if(!e)throw new Error("WalletInfo compound components must be used within <WalletInfo>");return e}var gn=_(require("react"),1);var cp=require("@nexus-cross/crossx-design-system"),Si=(r=>(r.CROSSx="crossx",r.MetaMask="io.metamask",r.Binance="com.binance.wallet",r))(Si||{}),ca={crossx:{name:cp.WALLET_LABELS.default,iconUrl:"https://contents.crosstoken.io/wallet/token/images/tCROSS.svg"},"io.metamask":{name:"MetaMask",iconUrl:"https://upload.wikimedia.org/wikipedia/commons/3/36/MetaMask_Fox.svg"},"com.binance.wallet":{name:"Binance Wallet",iconUrl:"https://public.bnbstatic.com/static/images/common/favicon.ico"}};var ru=_(require("react"),1);var Re=require("react/jsx-runtime");function pp({size:e=16,className:t}){return(0,Re.jsxs)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Re.jsx)("path",{d:"M12.6667 4.66667V2.66667C12.6667 2.48986 12.5964 2.32029 12.4714 2.19526C12.3464 2.07024 12.1768 2 12 2H3.33333C2.97971 2 2.64057 2.14048 2.39052 2.39052C2.14048 2.64057 2 2.97971 2 3.33333C2 3.68696 2.14048 4.02609 2.39052 4.27614C2.64057 4.52619 2.97971 4.66667 3.33333 4.66667H13.3333C13.5101 4.66667 13.6797 4.7369 13.8047 4.86193C13.9298 4.98695 14 5.15652 14 5.33333V8M14 8H12C11.6464 8 11.3072 8.14048 11.0572 8.39052C10.8071 8.64057 10.6667 8.97971 10.6667 9.33333C10.6667 9.68696 10.8071 10.0261 11.0572 10.2761C11.3072 10.5262 11.6464 10.6667 12 10.6667H14C14.1768 10.6667 14.3464 10.5964 14.4714 10.4714C14.5964 10.3464 14.6667 10.1768 14.6667 10V8.66667C14.6667 8.48986 14.5964 8.32029 14.4714 8.19526C14.3464 8.07024 14.1768 8 14 8Z",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),(0,Re.jsx)("path",{d:"M2 3.33325V12.6666C2 13.0202 2.14048 13.3593 2.39052 13.6094C2.64057 13.8594 2.97971 13.9999 3.33333 13.9999H13.3333C13.5101 13.9999 13.6797 13.9297 13.8047 13.8047C13.9298 13.6796 14 13.5101 14 13.3333V10.6666",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})]})}function kr({size:e=16,className:t}){return(0,Re.jsx)("svg",{width:e,height:e,viewBox:"4 4 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Re.jsx)("path",{d:"M9.40284 17.0647H4.85156V4.84656H17.0697V9.39783H15.4407V6.47565H6.48066V15.4356H9.40284V17.0647ZM21.5192 12.5644H12.5592V21.5244H21.5192V12.5644ZM23.1483 10.9353V23.1535H10.9301V10.9353H23.1483Z",fill:"currentColor"})})}function Yn({size:e=16,className:t}){return(0,Re.jsx)("svg",{width:e,height:e,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Re.jsx)("path",{d:"M11.6667 3.5L5.25 9.91667L2.33334 7",stroke:"currentColor",strokeWidth:1.16667,strokeLinecap:"round",strokeLinejoin:"round"})})}function vn({size:e=24,className:t}){return(0,Re.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Re.jsx)("path",{d:"M18 6L6 18M6 6l12 12",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function up({size:e=20,className:t}){return(0,Re.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Re.jsx)("path",{d:"M7.5 17.5H4.167A1.667 1.667 0 012.5 15.833V4.167A1.667 1.667 0 014.167 2.5H7.5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),(0,Re.jsx)("path",{d:"M13.333 14.167L17.5 10l-4.167-4.167M17.5 10H7.5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})]})}function Ti({size:e=20,className:t}){return(0,Re.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,children:(0,Re.jsx)("path",{d:"M7.91305 10.8327C8.60341 10.8327 9.16305 11.3924 9.16305 12.0827V16.2458C9.16305 16.9361 8.60341 17.4958 7.91305 17.4958H3.75C3.05964 17.4958 2.5 16.9361 2.5 16.2458L2.5 12.0827C2.5 11.3924 3.05964 10.8327 3.75 10.8327H7.91305ZM14.1685 17.4958H12.5027V15.83H14.1685V17.4958ZM17.5 17.4958H15.8342V15.83H17.5V17.4958ZM4.16576 12.4985V15.83H7.49729V12.4985H4.16576ZM12.5027 15.83H10.8369V14.1642H12.5027V15.83ZM15.8342 15.83H14.1685V14.1642H15.8342V15.83ZM14.1685 14.1642H12.5027V12.4985H14.1685V14.1642ZM17.5 14.1642H15.8342V12.4985H17.5V14.1642ZM12.5027 12.4985H10.8369V10.8327H12.5027V12.4985ZM15.8342 12.4985H14.1685V10.8327H15.8342V12.4985ZM7.91305 2.50391C8.60341 2.50391 9.16305 3.06355 9.16305 3.75391V7.91696C9.16305 8.60731 8.60341 9.16696 7.91305 9.16696H3.75C3.05964 9.16696 2.5 8.60731 2.5 7.91696L2.5 3.75391C2.5 3.06355 3.05964 2.50391 3.75 2.50391L7.91305 2.50391ZM16.2419 2.50391C16.9322 2.50391 17.4919 3.06355 17.4919 3.75391V7.91696C17.4919 8.60731 16.9322 9.16696 16.2419 9.16696H12.0788C11.3885 9.16696 10.8288 8.60731 10.8288 7.91696V3.75391C10.8288 3.06355 11.3885 2.50391 12.0788 2.50391L16.2419 2.50391ZM4.16576 4.16967L4.16576 7.50119L7.49729 7.50119L7.49729 4.16967L4.16576 4.16967ZM12.4946 4.16967V7.50119H15.8261V4.16967H12.4946Z",fill:"currentColor",fillOpacity:1})})}function En({size:e=20,className:t}){return(0,Re.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Re.jsx)("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor",strokeWidth:1.67,strokeLinecap:"round",strokeLinejoin:"round"})})}function zn({size:e=20,className:t}){return(0,Re.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Re.jsx)("path",{d:"M5 8L10 13L15 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function fp({size:e=16,className:t}){return(0,Re.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Re.jsx)("path",{d:"M1.667 10S4.167 4.167 10 4.167 18.333 10 18.333 10 15.833 15.833 10 15.833 1.667 10 1.667 10z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),(0,Re.jsx)("path",{d:"M10 12.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})]})}function mp({size:e=16,className:t}){return(0,Re.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Re.jsx)("path",{d:"M14.95 14.95A8.283 8.283 0 0110 16.667c-5.833 0-8.333-5.833-8.333-5.833a15.238 15.238 0 014.183-4.884m3.267-1.55A7.55 7.55 0 0110 4.167c5.833 0 8.333 5.833 8.333 5.833a15.28 15.28 0 01-1.783 2.633M11.767 11.767a2.5 2.5 0 11-3.534-3.534",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),(0,Re.jsx)("path",{d:"M1.667 1.667l16.666 16.666",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})]})}var Hb='<svg width="100%" height="100%" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_72837_24069)"><mask id="mask0_72837_24069" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="100" height="100"><path d="M50 0C10.5289 0 0 10.5289 0 50C0 89.4711 10.5289 100 50 100C89.4711 100 100 89.4711 100 50C100 10.5289 89.4711 0 50 0Z" fill="white"/></mask><g mask="url(#mask0_72837_24069)"><path d="M99.9501 0.0499268H0V100H99.9501V0.0499268Z" fill="url(#paint0_linear_72837_24069)"/><path d="M34.9302 100H99.9751V19.0619L34.9302 60.7286V100Z" fill="url(#paint1_linear_72837_24069)"/><path d="M34.9301 100H0V23.8024L34.9301 60.7285V100Z" fill="url(#paint2_linear_72837_24069)"/></g><g filter="url(#filter0_d_72837_24069)"><path d="M49.9503 21.4821L31.9862 31.8613C28.8176 33.6827 27.7198 37.7745 29.5411 40.9432C31.3625 44.1118 35.4543 45.2096 38.623 43.3883L53.8176 34.6058L46.582 42.3653V72.8044C46.582 76.4721 49.576 79.4661 53.2437 79.4661C56.9114 79.4661 59.9054 76.4721 59.9054 72.8044V27.2455C59.9054 25.9731 59.5062 24.7256 59.0072 23.9022C57.1359 20.7585 53.094 19.6358 49.9254 21.4571L49.9503 21.4821Z" fill="white"/></g></g><defs><filter id="filter0_d_72837_24069" x="7.4286" y="-0.650014" width="87.831" height="115.47" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dx="7.06088" dy="7.06088"/><feGaussianBlur stdDeviation="14.1467"/><feColorMatrix type="matrix" values="0 0 0 0 0.831373 0 0 0 0 0.113725 0 0 0 0 0.356863 0 0 0 0.3 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_72837_24069"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_72837_24069" result="shape"/></filter><linearGradient id="paint0_linear_72837_24069" x1="-11.5768" y1="-12.001" x2="106.562" y2="106.986" gradientUnits="userSpaceOnUse"><stop stop-color="#F3752D"/><stop offset="1" stop-color="#EC1272"/></linearGradient><linearGradient id="paint1_linear_72837_24069" x1="24.9501" y1="23.004" x2="73.6278" y2="64.8453" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><linearGradient id="paint2_linear_72837_24069" x1="62.3503" y1="3.46804" x2="16.3423" y2="63.3732" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><clipPath id="clip0_72837_24069"><rect width="100" height="100" fill="white"/></clipPath></defs></svg>',_b=`data:image/svg+xml,${encodeURIComponent(Hb)}`;function gp({size:e=42,className:t}){return(0,Re.jsx)("img",{src:_b,width:e,height:e,alt:"",className:t,style:{display:"block"}})}function hp({size:e=20,className:t}){return(0,Re.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Re.jsx)("path",{d:"M9.19133 10.8077C9.04905 10.6657 8.87947 10.554 8.69283 10.4792L2.78881 8.11167C2.71832 8.08338 2.65816 8.03421 2.61642 7.97075C2.57468 7.90729 2.55335 7.83258 2.5553 7.75665C2.55724 7.68072 2.58237 7.6072 2.6273 7.54596C2.67224 7.48472 2.73483 7.4387 2.80668 7.41406L16.9525 2.5747C17.0185 2.55087 17.0899 2.54632 17.1583 2.56159C17.2268 2.57685 17.2895 2.6113 17.3391 2.66089C17.3887 2.71049 17.4231 2.77319 17.4384 2.84165C17.4536 2.9101 17.4491 2.9815 17.4253 3.04746L12.5859 17.1933C12.5613 17.2651 12.5152 17.3277 12.454 17.3727C12.3928 17.4176 12.3192 17.4427 12.2433 17.4447C12.1674 17.4466 12.0927 17.4253 12.0292 17.3835C11.9658 17.3418 11.9166 17.2817 11.8883 17.2112L9.52073 11.3056C9.44567 11.1191 9.33362 10.9498 9.19133 10.8077ZM9.19133 10.8077L17.3367 2.66404",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}function bp({size:e=24,className:t}){return(0,Re.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Re.jsx)("defs",{children:(0,Re.jsxs)("linearGradient",{id:"wi-send-solid-grad",x1:"3",y1:"21",x2:"21",y2:"3",gradientUnits:"userSpaceOnUse",children:[(0,Re.jsx)("stop",{stopColor:"var(--wi-send-solid-from, #f62e61)"}),(0,Re.jsx)("stop",{offset:"1",stopColor:"var(--wi-send-solid-to, #f7564a)"})]})}),(0,Re.jsx)("path",{d:"M20.98 3.02a1.2 1.2 0 0 0-1.28-.28L3.6 8.9a1.2 1.2 0 0 0 .07 2.26l6.06 1.9a.6.6 0 0 1 .39.4l1.9 6.06a1.2 1.2 0 0 0 2.26.07l6.16-16.1a1.2 1.2 0 0 0-.46-1.47Z",fill:"url(#wi-send-solid-grad)"})]})}function wp({size:e=20,className:t}){return(0,Re.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Re.jsx)("path",{d:"M10.8333 14.1667V7.5M15 14.1667V4.16667M2.5 2.5V15.8333C2.5 16.2754 2.67559 16.6993 2.98816 17.0118C3.30072 17.3244 3.72464 17.5 4.16667 17.5H17.5M6.66667 14.1667V11.6667",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}function yp({size:e=20,className:t}){return(0,Re.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Re.jsx)("path",{d:"M6.6665 9.99984H13.3332M9.99984 6.6665V13.3332M18.3332 9.99984C18.3332 14.6022 14.6022 18.3332 9.99984 18.3332C5.39746 18.3332 1.6665 14.6022 1.6665 9.99984C1.6665 5.39746 5.39746 1.6665 9.99984 1.6665C14.6022 1.6665 18.3332 5.39746 18.3332 9.99984Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}function xp({size:e=20,className:t}){return(0,Re.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Re.jsx)("path",{d:"M6.667 2.5 3.333 5.833 6.667 9.167M3.333 5.833h13.334M13.333 17.5l3.334-3.333-3.334-3.334M16.667 14.167H3.333",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}function vp({size:e=20,className:t}){return(0,Re.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Re.jsx)("circle",{cx:"10",cy:"10",r:"10",fill:"currentColor"}),(0,Re.jsx)("path",{d:"M6 10.2L8.6 12.8L14 7.2",stroke:"var(--ds-accent-primary-on, #ffffff)",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"})]})}function pa({size:e=14,className:t}){return(0,Re.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":!0,children:(0,Re.jsx)("path",{d:"M14 4h6v6M20 4l-9 9M18 13v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h5",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})})}var be=_(require("react"),1);var Ur=_(require("bignumber.js"),1);function Qb(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===48;)t--;return t>0&&e.charCodeAt(t-1)===46&&t--,e.slice(0,t)}function Cr(e,t){if(!e||e==="0")return"0.00";let n=new Ur.default(e).shiftedBy(-t),r=n.isGreaterThanOrEqualTo(1)?2:4;return n.toFormat(r,Ur.default.ROUND_DOWN)}function dn(e){return e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`}function io(e){let t=typeof e=="string"?parseFloat(e):e;if(Number.isNaN(t)||t===0)return"$0.00";let n=t>=1?2:4,r=Math.pow(10,n);return`$${(Math.floor(t*r)/r).toLocaleString("en-US",{minimumFractionDigits:n,maximumFractionDigits:n})}`}function Ii(e,t,n){let o=new Ur.default(e).shiftedBy(-t).multipliedBy(new Ur.default(n));return o.isZero()||o.isNaN()?"$0.00":`$${(o.integerValue(Ur.default.ROUND_DOWN).isGreaterThanOrEqualTo(1)?o.decimalPlaces(2,Ur.default.ROUND_DOWN):o.decimalPlaces(4,Ur.default.ROUND_DOWN)).toFormat()}`}function kp(e){if(e===""||e===null||e===void 0)return{displayValue:"0",isLowerBound:!1};let t=typeof e=="number"?e.toString():e;if(t==="0"||t==="0.0")return{displayValue:"0",isLowerBound:!1};let n=t;if(n.includes("e")||n.includes("E")){let i=Number(n);if(!Number.isFinite(i)||i===0)return{displayValue:"0",isLowerBound:!1};n=Qb(i.toFixed(18))}let[r="0",o=""]=n.split(".");if(Number(r)>=1){let i=o.slice(0,2).padEnd(2,"0");return{displayValue:`${Number(r).toLocaleString("en-US")}.${i}`,isLowerBound:!1}}return o.length<4?{displayValue:`${r}.${o}`,isLowerBound:!1}:o.slice(0,4)==="0000"?{displayValue:"0.0001",isLowerBound:!0}:{displayValue:`0.${o.slice(0,4)}`,isLowerBound:!1}}var Wl=require("react"),Np=require("@tanstack/react-query");var At={dev:{cross:612044,bsc:97},stage:{cross:612044,bsc:97},production:{cross:612055,bsc:56}},Cp={dev:[On(612044),On(97),On(998)],stage:[On(612044),On(97),On(998)],production:[On(612055),On(56)]};function jl(e){return Cp[e]}var Ei="https://terms.onechain.nexus/docs/terms-july-23-2026",Ai="https://terms.onechain.nexus/docs/pp-july-23-2026",Rp="https://contents.crossdefi.io/Terms/terms/tos-26-07-09-oneusd.html";var Vb="send:chain-info";function qb(e){if("data"in e&&e.data!==void 0){let t=e.data;if(Array.isArray(t)){let n=t[0];if(!n)throw new Error("Chain info payload is empty.");return n}return t}return e}function Gl(e,...t){let n=e.replace(/\/+$/,""),r=t.map(o=>o.replace(/^\/+|\/+$/g,"")).filter(Boolean);return[n,...r].join("/")}function Sp(e,t,n,r){if(r)return t===At[e].cross?Tp(t,r):n?.explorer_url?Gl(n.explorer_url,n.explorer_postfix?.transaction??"tx",r):Yb(e,t,r)}function Tp(e,t){return Gl("https://explorer.onechain.nexus",String(e),"tx",t)}function Yb(e,t,n){let r=At[e];if(t===r.cross)return Tp(t,n);if(t===r.bsc)return Gl(e==="production"?"https://bscscan.com":"https://testnet.bscscan.com","tx",n)}function ua(e,t,n,r=!0){let o=(0,Np.useQuery)({queryKey:[Vb,e,t],queryFn:async({signal:s})=>{let l=await Be("walletServer",e),d=await fetch(`${l}/v1/public/chain/info/${t}`,{cache:"no-store",signal:s});if(!d.ok)throw new Error(`Failed to fetch chain info: ${d.status}`);let p=await d.json();if("code"in p&&p.code!==void 0&&p.code!==200)throw new Error(`Chain info API error: ${p.code}`);return qb(p)},enabled:r,staleTime:3e5}),a=o.data;return{transactionUrl:(0,Wl.useMemo)(()=>Sp(e,t,a,n),[t,a,e,n]),chainInfo:a,...o}}function Mi(e,t,n=!0){let{chainInfo:r}=ua(e,t,void 0,n);return{buildTxUrl:(0,Wl.useMemo)(()=>a=>Sp(e,t,r,a),[e,t,r]),chainInfo:r}}var Ip="0x0000000000000000000000000000000000000001";var Kb="0xa9059cbb",Zb=/^0x[a-fA-F0-9]{40}$/,Xb="nexus-cross:dapp-ui:send:recent:",Ep=10;function Jb(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===48;)t--;return e.slice(0,t)}function fa(e){return e.toLowerCase()}function lr(e){return Zb.test(e)}function jr(e){return fa(e.address)===Ip}function Hl(e){return`${Xb}${e.toLowerCase()}`}function Oo(e){if(typeof window>"u")return[];try{let t=window.localStorage.getItem(Hl(e));if(!t)return[];let n=JSON.parse(t);return Array.isArray(n)?n.filter(r=>r!==null&&typeof r=="object"&&lr(r.address)&&typeof r.updatedAt=="number").slice(0,Ep):[]}catch{return[]}}function _l(e,t){if(typeof window>"u")return[];let n=fa(t),r=[{address:n,updatedAt:Date.now()},...Oo(e).filter(o=>o.address!==n)].slice(0,Ep);try{window.localStorage.setItem(Hl(e),JSON.stringify(r))}catch{return Oo(e)}return r}function Ql(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(Hl(e))}catch{}}function Rr(e,t){let n=e.trim();if(!n)return{error:"Enter an amount."};if(!/^\d+(\.\d*)?$/.test(n))return{error:"Enter a valid amount."};let[r="0",o=""]=n.split(".");if(o.length>t)return{error:`Max ${t} decimal places.`};let a=BigInt(r||"0"),i=o.padEnd(t,"0"),s=i?BigInt(i):0n,l=10n**BigInt(t),d=a*l+s;return d<=0n?{error:"Amount must be greater than 0."}:{value:d}}function Bo(e,t){let n=BigInt(e||"0"),r=10n**BigInt(t),o=n/r,a=n%r;if(a===0n)return o.toString();let i=Jb(a.toString().padStart(t,"0"));return`${o.toString()}.${i}`}function Vl(e,t){let n=e.replace(/^0x/,"").toLowerCase().padStart(64,"0"),r=t.toString(16).padStart(64,"0");return`${Kb}${n}${r}`}function dr(e,t,n=10){if(t<=0)return e.toString();let r=10n**BigInt(t),o=e/r,a=e%r;if(a===0n)return o.toString();let s=a.toString().padStart(t,"0").slice(0,Math.max(0,Math.min(n,t)));return s=s.replace(/0+$/,""),s?`${o.toString()}.${s}`:o.toString()}function ql(e,t){return dr(e,t,6)}function Ap(e){return dr(e,9,2)}function Mp(e){return e.toLocaleString("en-US")}function Li(e){return e===56||e===97}function Di(e){return e.gasPrice??e.maxFeePerGas}function Lp(e,t=!1){return t?Di(e)!==void 0?"legacy":null:e.maxFeePerGas!==void 0?"dynamic":e.gasPrice!==void 0?"legacy":null}function Pi(e,t=!1){if(t){let n=Di(e);return n!==void 0?e.gasLimit*n:null}return e.maxFeePerGas!==void 0?e.gasLimit*e.maxFeePerGas:e.gasPrice!==void 0?e.gasLimit*e.gasPrice:null}function Oi(e){return!Number.isFinite(e)||e<=0?"$0.00":`$${e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`}function Dp(e,t=0){if(t>4||e===null||e===void 0)return"";if(typeof e=="string")return e.toLowerCase();if(typeof e!="object")return"";let n=e,r=[];return typeof n.name=="string"&&r.push(n.name),typeof n.shortMessage=="string"&&r.push(n.shortMessage),typeof n.message=="string"&&r.push(n.message),typeof n.details=="string"&&r.push(n.details),n.cause!==void 0&&r.push(Dp(n.cause,t+1)),r.join(`
6
- `).toLowerCase()}function $b(e){if(e instanceof Error)return e.message;if(typeof e=="string")return e;if(e&&typeof e=="object"){let t=e;if(typeof t.shortMessage=="string")return t.shortMessage;if(typeof t.message=="string")return t.message}return""}function Yl(e,t={},n="Failed to send transaction."){let r=Dp(e);if(!r)return n;let o=t.nativeSymbol?.trim()||"gas token",a=t.networkName?.trim();if(r.includes("user rejected")||r.includes("userrejected")||r.includes("user denied")||r.includes("user cancelled")||r.includes("user canceled")||r.includes("action_rejected")||r.includes("rejected by user"))return"Transaction was cancelled.";if(r.includes("insufficientfunds")||r.includes("insufficient funds")||r.includes("exceeds the balance of the account")||r.includes("insufficient balance for transfer")){let i=a?` on ${a}`:"";return`Not enough ${o} to cover the gas fee.Please top up your ${o} balance and try again.`}return r.includes("transaction underpriced")||r.includes("replacement transaction underpriced")||r.includes("fee too low")?"Gas fee was too low for the network. Please try again.":r.includes("nonce too low")||r.includes("nonce has already been used")||r.includes("nonce too high")?"Pending transactions are out of order. Refresh the page and try again.":r.includes("execution reverted")||r.includes("contractfunctionrevertederror")||r.includes("contractfunctionexecutionerror")?"The transaction was rejected by the contract. The recipient or token may be invalid.":r.match(/chain \d+ is not configured/)?"This network is not registered in the app. Contact support.":r.includes("http request failed")||r.includes("failed to fetch")||r.includes("network request failed")||r.includes("timeout")||r.includes("econnreset")||r.includes("rpc error")||r.includes("429")?"Network connection failed. Check your internet and try again.":r.includes("estimategas")||r.includes("gas estimation failed")?"Could not estimate the gas fee. The recipient address or amount may be invalid.":$b(e)||n}var ew=2000000000n,tw=1000000000n;async function Bi(e,t,n){let r=new AbortController,o=setTimeout(()=>r.abort(),8e3),a=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:t,params:n}),signal:r.signal}).finally(()=>clearTimeout(o));if(!a.ok)throw new Error(`RPC ${t} HTTP ${a.status}`);let i=await a.json();if(i.error)throw new Error(`RPC ${t}: ${i.error.message}`);if(i.result===void 0)throw new Error(`RPC ${t}: empty result`);return i.result}function zi(e){return BigInt(e)}function nw(e){return`0x${e.toString(16)}`}function rw(e){let t={to:e.to};return e.from&&(t.from=e.from),e.value!==void 0&&e.value>0n&&(t.value=nw(e.value)),e.data&&(t.data=e.data),t}function ow(e){return e===56||e===97}async function Pp(e){try{let t=await Bi(e,"eth_gasPrice",[]);return{gasPrice:zi(t)}}catch{return{gasPrice:ew}}}async function aw(e,t){let n=tw;try{let r=await Bi(e,"eth_maxPriorityFeePerGas",[]);n=zi(r)}catch{}return{maxFeePerGas:t+n,maxPriorityFeePerGas:n}}async function iw(e,t){if(t)return Pp(e);let n;try{n=(await Bi(e,"eth_getBlockByNumber",["latest",!1]))?.baseFeePerGas}catch{}return n?aw(e,zi(n)):Pp(e)}async function Op(e,t){let n=ow(t.chainId),r=rw(t),[o,a]=await Promise.all([Bi(e,"eth_estimateGas",[r]),iw(e,n)]);return{gasLimit:zi(o),gasPrice:a.gasPrice,maxFeePerGas:a.maxFeePerGas,maxPriorityFeePerGas:a.maxPriorityFeePerGas}}function Bp(e){let{estimateGas:t,sendTransaction:n,getTransactionReceipt:r}=e;return{canSend:!!n,canEstimateGas(o){return!!t||!!o},async estimateGas(o,a){if(t)return t(o);if(a)return Op(a,o);throw new Error("Gas estimation is not available.")},async sendTransaction(o){if(!n)throw new Error("Sending is not available for this wallet.");return n(o)},getTransactionReceipt:r}}var sw=1500,lw=120;function zp(e){return!!(e.token||e.recipient||e.amount)}function Kl({recipient:e,amount:t,token:n,balanceRaw:r}){let o={},a=e.trim(),i=Rr(t,n.quantity.decimals),s;return a?lr(a)||(o.recipient="Enter a valid EVM recipient address."):o.recipient="Enter a recipient address.","error"in i?o.amount=i.error:(s=i.value,s>r&&(o.amount="Amount exceeds available balance.")),!jr(n)&&!lr(n.address)&&(o.token="Token contract address is invalid."),{errors:o,rawAmount:o.amount?void 0:s,recipient:a&&lr(a)?a:void 0}}function Zl({token:e,walletAddress:t,recipient:n,rawAmount:r}){let o=t;return jr(e)?{to:n,value:r,chainId:e.chainId,from:o}:{to:fa(e.address),data:Vl(n,r),value:0n,chainId:e.chainId,from:o}}function dw(e){let{status:t}=e;return t==="reverted"||t==="0x0"||t===0||t===0n||t===!1}var cw=e=>new Promise(t=>setTimeout(t,e));async function Fp({repository:e,args:t,chainId:n,onSubmitted:r,pollIntervalMs:o=sw,pollMaxAttempts:a=lw}){let i=await e.sendTransaction(t);r(i);let{getTransactionReceipt:s}=e;if(!s)return"success";for(let l=0;l<a;l+=1){let d=await s({hash:i,chainId:n}).catch(()=>null);if(d)return dw(d)?"reverted":"success";await cw(o)}return"timeout"}var Up=["token","recipient","amount","review"];function jp(e){let{env:t,walletAddress:n,accountName:r,accounts:o=[],initialStep:a="recipient",token:i,tokens:s=[],onTokenChange:l,sendTransaction:d,getTransactionReceipt:p,estimateGas:w,getTokenPriceUsd:u,onSubmitted:h,onSuccess:x,onFailed:y,onExit:f,onOutlink:c}=e,b=be.useMemo(()=>Bp({sendTransaction:d,getTransactionReceipt:p,estimateGas:w}),[d,p,w]),[g,v]=be.useState(i);be.useEffect(()=>{v(i)},[i.address,i.chainId]);let[C,N]=be.useState(a),[I,R]=be.useState(""),[S,E]=be.useState(""),[M,z]=be.useState({}),[L,G]=be.useState("idle"),[A,j]=be.useState(""),[le,oe]=be.useState(""),[ne,V]=be.useState(null),[ee,F]=be.useState(!1),[q,ae]=be.useState(""),X=be.useRef(0),[me,ke]=be.useState(null),[ze,ge]=be.useState(""),[Ne,Ce]=be.useState(()=>Oo(n)),tt=be.useRef(new Set),Me=be.useCallback((Q,xe)=>{tt.current.has(Q)||(tt.current.add(Q),Je("send",Q,xe))},[]);be.useEffect(()=>{Me("opened"),a!=="token"&&Me("token_selected",{tags:{item_id:i.symbol}})},[Me,a,i.symbol]);let Qe=be.useMemo(()=>it(t),[t]),{transactionUrl:lt,chainInfo:We}=ua(Qe,g.chainId,A||void 0,!0),Ve=zr(g.chainId,Qe),Ge=Ve.nativeSymbol??We?.currency_symbol??"",Dt=Ve.name??We?.name??`Chain ID ${g.chainId}`,tn=be.useRef({nativeSymbol:Ge||void 0,networkName:Dt,tokenSymbol:g.symbol});tn.current={nativeSymbol:Ge||void 0,networkName:Dt,tokenSymbol:g.symbol};let yt=be.useMemo(()=>BigInt(g.quantity.numeric||"0"),[g.quantity.numeric]),Pt=be.useMemo(()=>Cr(g.quantity.numeric,g.quantity.decimals),[g.quantity.numeric,g.quantity.decimals]),Tt=u?.(g),nn=be.useMemo(()=>{if(Tt===void 0)return;let Q=parseFloat(S.replace(/,/g,""));return Number.isFinite(Q)?Q*Tt:0},[S,Tt]);be.useEffect(()=>{E(""),z({})},[g.address,g.chainId]),be.useEffect(()=>{X.current+=1,V(null),ae(""),F(!1)},[g.address,g.chainId,I,S]),be.useEffect(()=>{Ce(Oo(n))},[n]);let It=be.useCallback(Q=>{R(Q),z(xe=>({...xe,recipient:void 0}))},[]),ft=be.useCallback(Q=>{E(Q),z(xe=>({...xe,amount:void 0}))},[]),Ot=be.useCallback(()=>{E(Pt.replace(/,/g,"")),z(Q=>({...Q,amount:void 0}))},[Pt]),rt=be.useCallback(Q=>{v(Q),l?.(Q),Me("token_selected",{tags:{item_id:Q.symbol}}),N("recipient")},[l,Me]),on=be.useCallback(()=>N("token"),[]),mt=be.useCallback(()=>{N(Q=>{if(Q==="result")return"review";if(Q===a)return f?.(),Q;let xe=Up.indexOf(Q);return xe<=0?(f?.(),Q):Up[xe-1]})},[a,f]),fn=be.useCallback(()=>{let{errors:Q}=Kl({recipient:I,amount:"1",token:g,balanceRaw:yt});if(Q.recipient){z(xe=>({...xe,recipient:Q.recipient}));return}z(xe=>({...xe,recipient:void 0})),Me("recipient_entered"),N("amount")},[I,g,yt,Me]),Ze=be.useCallback(Q=>{R(Q),z(xe=>({...xe,recipient:void 0})),Me("recipient_entered"),N("amount")},[Me]),dt=be.useCallback(()=>{let Q=Kl({recipient:I,amount:S,token:g,balanceRaw:yt});z(Q.errors),!(zp(Q.errors)||Q.rawAmount===void 0||!Q.recipient)&&(ke(Q.rawAmount),ge(Q.recipient),V(null),ae(""),G("idle"),Me("amount_entered"),N("review"))},[I,S,g,yt,Me]);be.useEffect(()=>{if(C!=="review"||!ze||me===null||ne!==null||ee||q||!b.canEstimateGas(We?.rpc))return;let Q=++X.current;F(!0),ae(""),(async()=>{try{let xe=Zl({token:g,walletAddress:n,recipient:ze,rawAmount:me}),Se=await b.estimateGas(xe,We?.rpc);if(X.current!==Q)return;V(Se)}catch(xe){if(X.current!==Q)return;ae(Yl(xe,tn.current,"Failed to estimate gas."))}finally{X.current===Q&&F(!1)}})()},[C,ze,me,ne,ee,q,b,We?.rpc,g,n]);let nt=be.useMemo(()=>{if(!jr(g)||!ne||me===null)return!1;let Q=Pi(ne,Li(g.chainId));return Q===null?!1:me+Q>yt},[g,ne,me,yt]),Et=be.useCallback(async()=>{if(!(!ze||me===null)&&!nt){oe(""),j(""),G("submitting"),Me("submitted");try{let Q="",xe=await Fp({repository:b,args:Zl({token:g,walletAddress:n,recipient:ze,rawAmount:me}),chainId:g.chainId,onSubmitted:Se=>{Q=Se,j(Se),G("confirming"),Ce(_l(n,ze)),h?.({txHash:Se,chainId:g.chainId,amount:S,tokenSymbol:g.symbol,recipient:ze})}});if(xe==="success")G("success"),Me("confirmed"),Q&&x?x?.(Q):N("result");else if(xe==="reverted"){let Se="Transaction reverted on-chain.";G("error"),oe(Se),Me("confirmed",{status:"failure",reason:Nn(new Error(Se))}),Q&&y?y({txHash:Q,chainId:g.chainId,message:Se}):N("result")}else{let Se="Transaction receipt was not found. Please check again later.";G("error"),oe(Se),Me("confirmed",{status:"failure",reason:"timeout"}),Q&&y?y({txHash:Q,chainId:g.chainId,message:Se}):N("result")}}catch(Q){G("error"),Me("confirmed",{status:"failure",reason:Nn(Q)}),oe(Yl(Q,{nativeSymbol:Ge||void 0,networkName:Dt,tokenSymbol:g.symbol})),N("result")}}},[b,ze,me,nt,g,S,n,h,x,y,Ge,Dt,Me]),[Rt,Xe]=be.useState(!1),an=be.useRef(void 0);be.useEffect(()=>()=>clearTimeout(an.current),[]);let sn=be.useCallback(async()=>{if(A)try{await navigator.clipboard.writeText(A),Xe(!0),clearTimeout(an.current),an.current=setTimeout(()=>Xe(!1),2e3)}catch{}},[A]),Yt=be.useCallback(()=>{if(!lt||!A)return;let Q=Fe=>{typeof window<"u"&&window.open(Fe,"_blank","noopener,noreferrer")};if(!c){Q(lt);return}let xe=c(lt,{category:"send",origin:"send-transaction",payload:{chainId:g.chainId,txHash:A}});if(xe&&typeof xe.then=="function"){let Fe=typeof window<"u"?window.open("","_blank","noopener,noreferrer"):null;xe.then(ot=>{if(ot===null){Fe?.close();return}let Kt=ot??lt;if(Fe)try{Fe.location.href=Kt}catch{Fe.close(),Q(Kt)}else Q(Kt)});return}let Se=xe;Se!==null&&Q(Se??lt)},[c,g.chainId,lt,A]),ln=be.useCallback(()=>{oe(""),j(""),G("idle"),V(null),ae(""),tt.current.delete("submitted"),tt.current.delete("confirmed"),N("review")},[]);return{step:C,status:L,token:g,tokens:s.length>0?s:[g],recipient:I,amount:S,amountUsd:nn,fieldErrors:M,error:le,txHash:A,gasEstimate:ne,gasLoading:ee,gasError:q,insufficientGas:nt,reviewRawAmount:me,reviewRecipient:ze,recentAddresses:Ne,accounts:o,accountName:r,walletAddress:n,resolvedEnv:Qe,transactionUrl:lt,networkName:Dt,nativeSymbol:Ge,nativeDecimals:We?.currency_decimals??g.quantity.decimals,balanceRaw:yt,balanceText:Pt,priceUsd:Tt,canSelectToken:(s.length>0?s:[g]).length>1,canSend:b.canSend,getTokenPriceUsd:u,setRecipient:It,setAmount:ft,setMax:Ot,selectToken:rt,goToTokenSelect:on,selectRecipient:Ze,submitRecipient:fn,submitAmount:dt,confirmSend:Et,retry:ln,back:mt,hashCopied:Rt,copyHash:sn,openTransaction:Yt}}var Kn=_(require("react"),1);var cr=require("react/jsx-runtime");function Wp({flow:e}){let{amount:t,setAmount:n,amountUsd:r,balanceText:o,balanceRaw:a,token:i,setMax:s}=e,l=Kn.useRef(null),d=Kn.useCallback(()=>{requestAnimationFrame(()=>{let y=l.current;if(!y)return;let f=y.value.length;y.setSelectionRange(f,f)})},[]);Kn.useEffect(()=>{l.current?.focus(),d()},[d]),Kn.useEffect(()=>{t===""&&(u(!1),d())},[t,d]);let p=Kn.useMemo(()=>{let y=Rr(t,i.quantity.decimals);return"value"in y&&y.value>a},[t,i.quantity.decimals,a]),[w,u]=Kn.useState(!1),h=!w&&t===""?"0.00":t,x=t.trim()===""||t.trim()==="0";return(0,cr.jsx)("div",{className:"sf-body sf-amount",children:(0,cr.jsxs)("div",{className:"sf-amount-center",children:[(0,cr.jsx)("span",{className:"sf-amount-usd",children:r!==void 0?Oi(r):"\xA0"}),(0,cr.jsx)("div",{className:"sf-amount-input-wrap","data-over":p||void 0,"data-empty":x||void 0,onClick:()=>l.current?.focus(),children:(0,cr.jsx)("input",{ref:l,className:"sf-amount-input",value:h,onChange:y=>{let f=y.target.value;if(w)n(f);else if(t===""){if(f.length<4)return;u(!0);let c=f.startsWith("0.00")?f.slice(4):f;n(c)}else u(!0),n(f)},placeholder:"0.00",inputMode:"decimal",autoComplete:"off","aria-label":`Amount in ${i.symbol}`,size:1})}),(0,cr.jsxs)("div",{className:"sf-amount-balance",children:[(0,cr.jsx)("span",{children:"Balance:"}),(0,cr.jsxs)("button",{type:"button",className:"sf-amount-max",onClick:s,"data-track":"amount_max",children:[o," ",i.symbol]})]})]})})}var Zn=_(require("react"),1);var uw=new Set(["0xff42c13d927a6b9265236619161accb227b6d452","0x9364ea6790f6e0ecfaa5164085f2a7de34ec55fb"].map(e=>e.toLowerCase()));function Xl(e){return uw.has(e.toLowerCase())}var fw="0x0000000000000000000000000000000000000001",mw={dev:"0x26ca2a92ea9659e073621bb85b9117dc5944cff1",stage:"0x26ca2a92ea9659e073621bb85b9117dc5944cff1",production:"0x6bf62ca91e397b5a7d1d6bce97d9092065d7a510"},gw={dev:"0x9364ea6790f6e0ecfaa5164085f2a7de34ec55fb",stage:"0x9364ea6790f6e0ecfaa5164085f2a7de34ec55fb",production:"0xff42c13d927a6b9265236619161accb227b6d452"};function Fi(e){let t=At[e];return[{chainId:t.cross,address:fw},{chainId:t.bsc,address:mw[e]},{chainId:t.cross,address:gw[e]}].map(({chainId:n,address:r})=>({chainId:n,address:r.toLowerCase()}))}var Gp={cross:"https://contents.crosstoken.io/wallet/token/images/CROSS.svg",bsc:"https://contents.crosstoken.io/wallet/token/images/BSC.svg"};function ma(e,t){let n=At[e];if(t===n.cross)return Gp.cross;if(t===n.bsc)return Gp.bsc}var hw={dev:"https://dev-portrait.crosstoken.io",stage:"https://dev-portrait.crosstoken.io",production:"https://portrait.crosstoken.io"};function Nr(e,t,n={}){if(!t||!t.startsWith("0x"))return;let{size:r=120,bg:o,format:a="png"}=n,i=hw[e],s=o?`&bg=${o}`:"";return`${i}/portrait/evm/${t}.${a}?size=${r}${s}`}var cn=require("react/jsx-runtime");function Hp({size:e=20,className:t}){return(0,cn.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,"aria-hidden":"true",children:[(0,cn.jsx)("circle",{cx:"9",cy:"9",r:"6",stroke:"currentColor",strokeWidth:"1.7"}),(0,cn.jsx)("path",{d:"m17 17-3.2-3.2",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})]})}function _p({size:e=20,className:t}){return(0,cn.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":"true",children:(0,cn.jsx)("path",{d:"M9 2h6a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zM8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-2M12 11v6M9 14h6",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})})}function Qp({size:e=20,className:t}){return(0,cn.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,"aria-hidden":"true",children:[(0,cn.jsx)("circle",{cx:"10",cy:"10",r:"10",fill:"currentColor",opacity:"0.12"}),(0,cn.jsx)("path",{d:"M7 7l6 6M13 7l-6 6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]})}function Vp({size:e=16,className:t}){return(0,cn.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",className:t,"aria-hidden":"true",children:(0,cn.jsx)("path",{d:"M8 3v10m0 0 4-4m-4 4-4-4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function qp({size:e=56,className:t}){return(0,cn.jsxs)("svg",{width:e,height:e,viewBox:"0 0 56 56",fill:"none",className:t,"aria-hidden":"true",children:[(0,cn.jsx)("circle",{cx:"28",cy:"28",r:"28",fill:"var(--ds-system-green-default, #00b4b7)"}),(0,cn.jsx)("path",{d:"M17 28.5 24.2 35.5 39 20.5",stroke:"var(--ds-system-green-on, #ffffff)",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Yp({size:e=56,className:t}){return(0,cn.jsxs)("svg",{width:e,height:e,viewBox:"0 0 56 56",fill:"none",className:t,"aria-hidden":"true",children:[(0,cn.jsx)("circle",{cx:"28",cy:"28",r:"28",fill:"var(--ds-system-red-default, #da0b2e)"}),(0,cn.jsx)("path",{d:"M20 20 36 36m0-16L20 36",stroke:"#ffffff",strokeWidth:"4",strokeLinecap:"round"})]})}var $e=require("react/jsx-runtime");function Kp(e,t){return e.name||`Account ${(e.index??t)+1}`}function Zp(e){return e.trim().slice(0,1).toUpperCase()||"A"}function Xp(e){return e.toLowerCase()}function Jp({flow:e}){let{recipient:t,setRecipient:n,fieldErrors:r,recentAddresses:o,accounts:a,walletAddress:i,resolvedEnv:s,selectRecipient:l}=e,d=Zn.useMemo(()=>a.filter(g=>g.address.toLowerCase()!==i.toLowerCase()),[a,i]),p=d.length>0,w=Zn.useMemo(()=>new Map(d.map((g,v)=>[Xp(g.address),{account:g,index:v}])),[d]),[u,h]=Zn.useState("recent"),x=Zn.useRef(null);Zn.useEffect(()=>{x.current?.focus()},[]);let y="1A1A2E",f=Zn.useCallback(async()=>{try{let g=await navigator.clipboard.readText();g&&n(g.trim())}catch{}},[n]),c=t.trim().length>0,b=lr(t.trim());return(0,$e.jsxs)("div",{className:"sf-recipient",children:[(0,$e.jsxs)("div",{className:"sf-recipient-top",children:[(0,$e.jsxs)("div",{className:"sf-address-field","data-filled":c||void 0,"data-invalid":r.recipient||void 0,children:[(0,$e.jsx)("textarea",{ref:x,className:"sf-address-input",value:t,onChange:g=>n(g.target.value),placeholder:"Enter the recipient's address",autoComplete:"off",spellCheck:!1,"aria-label":"Recipient address",rows:c?2:1}),c?(0,$e.jsx)("button",{type:"button",className:"sf-address-action",onClick:()=>n(""),"aria-label":"Clear","data-track":"recipient_clear",children:(0,$e.jsx)(Qp,{size:20})}):(0,$e.jsx)("button",{type:"button",className:"sf-address-action",onClick:f,"aria-label":"Paste from clipboard","data-track":"recipient_paste",children:(0,$e.jsx)(_p,{size:20})})]}),r.recipient&&(0,$e.jsx)("p",{className:"sf-field-error",role:"alert",children:r.recipient}),(0,$e.jsxs)("div",{className:"sf-tabs",role:"tablist",children:[(0,$e.jsx)("button",{type:"button",role:"tab",className:"sf-tab","data-active":u==="recent"||void 0,"aria-selected":u==="recent",onClick:()=>h("recent"),"data-track":"recipient_tab","data-track-id":"recent",children:"Recent"}),p&&(0,$e.jsx)("button",{type:"button",role:"tab",className:"sf-tab","data-active":u==="account"||void 0,"aria-selected":u==="account",onClick:()=>h("account"),"data-track":"recipient_tab","data-track-id":"account",children:"My Account"})]})]}),(0,$e.jsx)("div",{className:"sf-address-list",children:u==="account"&&p?d.map((g,v)=>{let C=Kp(g,v),N=Nr(s,g.address,{size:56,bg:y});return(0,$e.jsxs)("button",{type:"button",className:"sf-address-row",onClick:()=>l(g.address),"data-track":"recipient_item",children:[(0,$e.jsxs)("span",{className:"sf-address-avatar",children:[N&&(0,$e.jsx)("img",{src:N,alt:"",width:40,height:40,draggable:!1,onError:I=>{I.currentTarget.style.display="none"}}),(0,$e.jsx)("span",{className:"sf-address-avatar-fallback",children:Zp(C)})]}),(0,$e.jsxs)("span",{className:"sf-address-meta",children:[(0,$e.jsx)("span",{className:"sf-address-name",children:C}),(0,$e.jsx)("span",{className:"sf-address-value",children:dn(g.address)})]})]},g.address)}):o.length>0?o.map(g=>{let v=w.get(Xp(g.address)),C=v?Kp(v.account,v.index):dn(g.address),N=Nr(s,g.address,{size:56,bg:y});return(0,$e.jsxs)("button",{type:"button",className:"sf-address-row",onClick:()=>l(g.address),"data-track":"recipient_item",children:[(0,$e.jsxs)("span",{className:"sf-address-avatar",children:[N&&(0,$e.jsx)("img",{src:N,alt:"",width:40,height:40,draggable:!1,onError:I=>{I.currentTarget.style.display="none"}}),(0,$e.jsx)("span",{className:"sf-address-avatar-fallback",children:Zp(C)})]}),(0,$e.jsxs)("span",{className:"sf-address-meta",children:[(0,$e.jsx)("span",{className:"sf-address-name",children:C}),(0,$e.jsx)("span",{className:"sf-address-value",children:dn(g.address)})]})]},g.address)}):(0,$e.jsx)("div",{className:"sf-empty",children:"No send history"})}),c&&!b&&!r.recipient&&(0,$e.jsx)("p",{className:"sf-field-error",role:"alert",children:"Enter a valid EVM recipient address."})]})}var Mt=require("react/jsx-runtime");function eu({flow:e}){let{status:t,txHash:n,error:r,copyHash:o,hashCopied:a,openTransaction:i}=e,s=t==="error",l=t==="success";return s?(0,Mt.jsxs)("div",{className:"sf-body sf-result sf-result--error",children:[(0,Mt.jsx)("span",{className:"sf-result-icon",children:(0,Mt.jsx)(Yp,{size:56})}),(0,Mt.jsxs)("div",{className:"sf-result-copy",children:[(0,Mt.jsx)("h3",{className:"sf-result-title",children:"Transaction Failed"}),(0,Mt.jsx)("p",{className:"sf-result-desc",children:r||"Something went wrong. Please try again."})]}),n&&(0,Mt.jsx)($p,{txHash:n,hashCopied:a,onCopy:o,onOpen:i})]}):(0,Mt.jsxs)("div",{className:"sf-body sf-result",children:[(0,Mt.jsx)("span",{className:"sf-result-icon","data-pending":!l||void 0,children:l?(0,Mt.jsx)(qp,{size:56}):(0,Mt.jsx)("span",{className:"sf-result-spinner"})}),(0,Mt.jsxs)("div",{className:"sf-result-copy",children:[(0,Mt.jsx)("h3",{className:"sf-result-title",children:l?"Transaction Complete":"Transaction in Progress"}),(0,Mt.jsx)("p",{className:"sf-result-desc",children:l?"Your transfer was sent successfully.":"Transfer in progress. Waiting for confirmation."})]}),n&&(0,Mt.jsx)($p,{txHash:n,hashCopied:a,onCopy:o,onOpen:i})]})}function $p({txHash:e,hashCopied:t,onCopy:n,onOpen:r}){return(0,Mt.jsxs)("div",{className:"sf-result-hash-card",children:[(0,Mt.jsx)("span",{className:"sf-result-hash-label",children:"Transaction Hash"}),(0,Mt.jsxs)("div",{className:"sf-result-hash-row",children:[(0,Mt.jsx)("button",{type:"button",className:"sf-result-hash-link",onClick:r,"aria-label":"Open transaction in explorer","data-track":"tx_link_open",children:dn(e)}),(0,Mt.jsx)("button",{type:"button",className:"sf-result-copy-btn",onClick:n,"aria-label":"Copy transaction hash","data-track":"tx_hash_copy",children:t?(0,Mt.jsx)(Yn,{size:16}):"Copy"})]})]})}var Ue=require("react/jsx-runtime"),Ui="\u2014";function tu({flow:e}){let{token:t,reviewRawAmount:n,reviewRecipient:r,accountName:o,accounts:a,walletAddress:i,networkName:s,nativeSymbol:l,nativeDecimals:d,gasEstimate:p,gasLoading:w,gasError:u,insufficientGas:h,error:x,resolvedEnv:y}=e,f=jr(t),c=n!==null?dr(n,t.quantity.decimals):"",b=o?.trim()||`Account ${(a[0]?.index??0)+1}`,g=Nr(y,i,{size:56,bg:"1A1A2E"}),v=l||(f?t.symbol:""),C=Li(t.chainId),N=p?Lp(p,C):null,I=p?Pi(p,C):null,R=L=>L!==null&&v?`${ql(L,d)} ${v}`:Ui,S=L=>L!==void 0?`${Ap(L)} Gwei`:Ui,E=(()=>{if(!f||!p||I===null||n===null)return Ui;let L=n+I;return`${ql(L,d)} ${v||t.symbol}`})(),M=L=>w?"\u2026":L,z=[{label:"Est. Tx Fee",value:M(R(I))},...N==="dynamic"?[{label:"Max Priority Fee",value:M(S(p?.maxPriorityFeePerGas))},{label:"Max Gas Fee",value:M(S(p?.maxFeePerGas))}]:N==="legacy"?[{label:"Gas Price",value:M(S(p?Di(p):void 0))}]:[],{label:"Gas Limit",value:M(p?Mp(p.gasLimit):Ui)}];return(0,Ue.jsxs)("div",{className:"sf-body sf-review",children:[(0,Ue.jsxs)("div",{className:"sf-review-amount",children:[(0,Ue.jsx)("img",{className:"sf-review-amount-icon",src:t.icon_url,alt:"",width:40,height:40,draggable:!1,onError:L=>{L.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),(0,Ue.jsxs)("span",{className:"sf-review-amount-value",children:[c,(0,Ue.jsx)("span",{className:"sf-review-amount-symbol",children:t.symbol})]})]}),(0,Ue.jsxs)("div",{className:"sf-review-parties",children:[(0,Ue.jsxs)("div",{className:"sf-review-card sf-review-party",children:[(0,Ue.jsx)("span",{className:"sf-review-party-label",children:"From"}),(0,Ue.jsxs)("div",{className:"sf-review-party-head",children:[(0,Ue.jsx)("span",{className:"sf-review-party-avatar",children:g&&(0,Ue.jsx)("img",{src:g,alt:"",width:28,height:28,draggable:!1,onError:L=>{L.currentTarget.style.display="none"}})}),(0,Ue.jsx)("span",{className:"sf-review-party-name",children:b})]}),(0,Ue.jsx)("span",{className:"sf-review-party-addr",children:i})]}),(0,Ue.jsx)("span",{className:"sf-review-arrow","aria-hidden":!0,children:(0,Ue.jsx)(Vp,{size:16})}),(0,Ue.jsxs)("div",{className:"sf-review-card sf-review-party",children:[(0,Ue.jsx)("span",{className:"sf-review-party-label",children:"To"}),(0,Ue.jsx)("span",{className:"sf-review-party-addr",children:r})]})]}),(0,Ue.jsxs)("section",{className:"sf-review-card",children:[(0,Ue.jsx)("h3",{className:"sf-review-section-title",children:"Summary"}),(0,Ue.jsxs)("div",{className:"sf-review-row",children:[(0,Ue.jsx)("span",{className:"sf-review-row-label",children:"Network"}),(0,Ue.jsx)("span",{className:"sf-review-row-value",children:s})]}),z.map(L=>(0,Ue.jsxs)("div",{className:"sf-review-row",children:[(0,Ue.jsx)("span",{className:"sf-review-row-label",children:L.label}),(0,Ue.jsx)("span",{className:"sf-review-row-value",children:L.value})]},L.label))]}),(0,Ue.jsxs)("section",{className:"sf-review-card",children:[(0,Ue.jsx)("h3",{className:"sf-review-section-title",children:"Total"}),(0,Ue.jsxs)("div",{className:"sf-review-row",children:[(0,Ue.jsx)("span",{className:"sf-review-row-label",children:"Total Amount"}),(0,Ue.jsxs)("span",{className:"sf-review-row-value",children:[c," ",t.symbol]})]}),f&&(0,Ue.jsxs)("div",{className:"sf-review-row",children:[(0,Ue.jsx)("span",{className:"sf-review-row-label",children:"Max. Total Amount"}),(0,Ue.jsx)("span",{className:"sf-review-row-value",children:M(E)})]})]}),h&&!u&&!x&&(0,Ue.jsxs)("div",{className:"sf-message sf-message--error",role:"alert",children:["Not enough ",v||t.symbol," to cover the amount plus the network fee. Reduce the amount and try again."]}),(u||x)&&(0,Ue.jsx)("div",{className:"sf-message sf-message--error",role:"alert",children:u||x})]})}var ji=_(require("react"),1);var mn=require("react/jsx-runtime");function nu({flow:e}){let[t,n]=ji.useState(""),r=t.trim().toLowerCase(),o=ji.useMemo(()=>r?e.tokens.filter(a=>a.symbol.toLowerCase().includes(r)||a.name.toLowerCase().includes(r)):e.tokens,[e.tokens,r]);return(0,mn.jsxs)("div",{className:"sf-body sf-token-select",children:[(0,mn.jsxs)("div",{className:"sf-search",children:[(0,mn.jsx)(Hp,{size:20}),(0,mn.jsx)("input",{className:"sf-search-input",value:t,onChange:a=>n(a.target.value),placeholder:"Search Tokens",autoComplete:"off",spellCheck:!1,"aria-label":"Search tokens"})]}),(0,mn.jsxs)("div",{className:"sf-token-list",children:[o.map(a=>{let i=`${a.chainId}:${a.address.toLowerCase()}`,s=ma(e.resolvedEnv,a.chainId),l=e.getTokenPriceUsd?.(a);return(0,mn.jsxs)("button",{type:"button",className:"sf-token-row",onClick:()=>e.selectToken(a),"data-track":"token_item","data-track-id":a.symbol,children:[(0,mn.jsxs)("span",{className:"sf-token-left",children:[(0,mn.jsxs)("span",{className:"sf-token-icon-wrap",children:[(0,mn.jsx)("img",{className:"sf-token-icon",src:a.icon_url,alt:"",width:40,height:40,loading:"lazy",draggable:!1,onError:d=>{d.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),s&&(0,mn.jsx)("img",{className:"sf-token-chain-badge",src:s,alt:"","aria-hidden":!0,width:16,height:16,loading:"lazy",draggable:!1,onError:d=>{d.currentTarget.style.display="none"}})]}),(0,mn.jsx)("span",{className:"sf-token-name",children:a.symbol})]}),(0,mn.jsxs)("span",{className:"sf-token-right",children:[(0,mn.jsx)("span",{className:"sf-token-balance",children:Cr(a.quantity.numeric,a.quantity.decimals)}),l!==void 0&&(0,mn.jsx)("span",{className:"sf-token-price",children:Oi(l)})]})]},i)}),o.length===0&&(0,mn.jsx)("div",{className:"sf-empty",children:"No tokens found"})]})]})}he(`.sf-root{display:flex;flex-direction:column;flex:1;min-height:0;font-family:inherit}.sf-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:24px;flex-shrink:0;position:relative;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.sf-header .sf-header-btn:last-child{position:absolute;top:24px;right:24px}.sf-header-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;padding:0;border:none;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;filter:none;transition:color .15s ease}.sf-header-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85));filter:none}.sf-header-title{position:absolute;left:50%;transform:translate(-50%);text-align:center;font-family:inherit;font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);pointer-events:none}.sf-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent;overscroll-behavior:contain}[data-theme=light] .sf-body{scrollbar-color:rgba(0,0,0,.12) transparent}.sf-body::-webkit-scrollbar{width:4px;height:4px}.sf-body::-webkit-scrollbar-track,.sf-body::-webkit-scrollbar-corner{background:transparent}.sf-body::-webkit-scrollbar-thumb{border-radius:4px;background:#ffffff26}.sf-body::-webkit-scrollbar-thumb:hover{background:#ffffff40}[data-theme=light] .sf-body::-webkit-scrollbar-thumb{background:#0000001f}[data-theme=light] .sf-body::-webkit-scrollbar-thumb:hover{background:#0003}.sf-empty{padding:32px 0;text-align:center;font-family:inherit;font-size:14px;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-field-error{margin:8px 24px 0;font-family:inherit;font-size:12px;line-height:1.5;color:var(--ds-system-red-default, #da0b2e)}.sf-message--error{margin:16px 0 0;padding:12px 16px;background:var(--ds-system-red-low, #ffeeee);color:var(--ds-system-red-high, #d20609);font-family:inherit;font-size:13px;line-height:1.5;border-radius:12px;width:100%;box-sizing:border-box}.sf-footer{display:flex;flex-shrink:0;padding:16px 24px 24px}.sf-footer:empty{display:none}.sf-footer-row{display:flex;gap:8px;width:100%}.sf-footer-row .sf-btn,.sf-footer-row .sf-btn--secondary{flex:1 1 0;min-width:0}.sf-footer>.sf-btn{width:100%}.sf-btn{appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:1;height:48px;padding:0 24px;border:none;border-radius:12px;font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;transition:background-color .15s ease,transform .1s ease}.sf-btn--primary{background:var(--ds-accent-gradient, linear-gradient(196deg, #ff2589 16%, #ff823d 84%));color:#fff}.sf-btn--primary:hover:not(:disabled):not([data-disabled]){filter:brightness(1.05)}.sf-btn--primary:active:not(:disabled):not([data-disabled]){transform:scale(.97)}.sf-btn--primary[data-disabled],.sf-btn--primary:disabled{background:var(--ds-accent-gradient, linear-gradient(196deg, #ff2589 16%, #ff823d 84%));color:#fff;cursor:default;opacity:.5}.sf-btn--secondary{flex:0 0 120px;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-token-select{padding:0;display:flex;flex-direction:column}.sf-token-select .sf-search{margin:16px 24px}.sf-token-select .sf-token-list{width:100%;margin-top:0}.sf-search{display:flex;align-items:center;gap:8px;padding:12px 16px;border-radius:12px;border:1.5px solid transparent;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-low, rgba(0, 0, 0, .4));box-sizing:border-box;transition:border-color .15s ease}.sf-search:hover{border-color:var(--ds-border-medium, rgba(0, 0, 0, .18))}.sf-search:focus-within{border-color:var(--ds-accent-primary-high, #f0640d)}.sf-search-input{flex:1;min-width:0;border:none;background:transparent;outline:none;font-family:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-search-input::placeholder{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-token-list{display:flex;flex-direction:column;margin-top:8px}.sf-token-row{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:12px 24px;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;border-radius:0;box-sizing:border-box;transition:background-color .15s ease}.sf-token-row:hover{background:var(--ds-surface-medium, rgba(0, 0, 0, .04))}.sf-token-left{display:flex;align-items:center;gap:16px;min-width:0}.sf-token-icon-wrap{position:relative;width:40px;height:40px;flex-shrink:0}.sf-token-icon{width:40px;height:40px;border-radius:0;object-fit:contain}.sf-token-chain-badge{position:absolute;right:-2px;bottom:-2px;width:16px;height:16px;border-radius:50%;object-fit:cover}.sf-token-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.sf-token-right{display:flex;flex-direction:column;align-items:flex-end;flex-shrink:0}.sf-token-balance{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);white-space:nowrap}.sf-token-price{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.sf-recipient{display:flex;flex-direction:column;flex:1;min-height:0}.sf-recipient-top{display:flex;flex-direction:column;flex-shrink:0;padding:16px 24px 0}.sf-address-field{display:flex;align-items:center;gap:8px;padding:12px;border-radius:12px;border:1.5px solid transparent;background:var(--ds-surface-medium, #f5f7fa);transition:border-color .15s ease;box-sizing:border-box}.sf-address-field:hover{border-color:var(--ds-border-medium, rgba(0, 0, 0, .18))}.sf-address-field:focus-within{border-color:var(--ds-accent-primary-high, #f0640d)}.sf-address-field[data-filled]{border-color:var(--ds-accent-primary-high, #f0640d)}.sf-address-field[data-invalid]{border-color:var(--ds-system-red-default, #da0b2e)}.sf-address-input{flex:1;min-width:0;border:none;background:transparent;outline:none;resize:none;overflow:hidden;font-family:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));word-break:break-word;overflow-wrap:anywhere}.sf-address-input::placeholder{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-address-action{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;padding:0;border:none;background:transparent;border-radius:6px;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;transition:color .15s ease}.sf-address-action:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-address-field[data-filled] .sf-address-action{border-radius:9999px}.sf-tabs{display:flex;gap:0;margin:16px 0 0}.sf-tab{position:relative;padding:8px 12px;border:none;background:transparent;cursor:pointer;font-family:inherit;font-size:16px;font-weight:600;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-tab[data-active]{color:var(--ds-accent-primary-high, #f0640d)}.sf-tab[data-active]:after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:3px;border-radius:9999px;background:var(--ds-accent-primary-high, #f0640d)}.sf-address-list{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;margin-top:8px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent}[data-theme=light] .sf-address-list{scrollbar-color:rgba(0,0,0,.12) transparent}.sf-address-list::-webkit-scrollbar{width:4px}.sf-address-list::-webkit-scrollbar-track{background:transparent}.sf-address-list::-webkit-scrollbar-thumb{border-radius:4px;background:#ffffff26}[data-theme=light] .sf-address-list::-webkit-scrollbar-thumb{background:#0000001f}.sf-address-row{display:flex;align-items:center;gap:16px;width:100%;padding:12px 24px;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;border-radius:0;box-sizing:border-box;transition:background-color .15s ease}.sf-address-row:hover{background:var(--ds-surface-medium, rgba(0, 0, 0, .04))}.sf-address-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;flex-shrink:0;border-radius:50%;overflow:hidden;background:var(--ds-surface-high, #edf1f2);color:var(--ds-content-medium, rgba(0, 0, 0, .65));font-size:14px;font-weight:600}.sf-address-avatar img{position:absolute;inset:0;z-index:1;width:100%;height:100%;object-fit:cover}.sf-address-avatar-fallback{position:relative;z-index:0}.sf-address-meta{display:flex;flex-direction:column;min-width:0}.sf-address-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sf-address-value{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-drawer-content .sf-header{padding:16px}.wi-drawer-content .sf-header .sf-header-btn:last-child{top:16px;right:16px}.wi-drawer-content .sf-token-select{padding:0}.wi-drawer-content .sf-token-select .sf-search{margin:16px}.wi-drawer-content .sf-token-row{padding:12px 16px}.wi-drawer-content .sf-recipient-top{padding:16px 16px 0}.wi-drawer-content .sf-address-row{padding:12px 16px}.wi-drawer-content .sf-footer{padding:12px 16px 24px}.wi-drawer-content .sf-field-error,.wi-drawer-content .sf-message--error{margin:16px 0 0;width:auto}.sf-amount{display:flex;flex-direction:column}.sf-amount-center{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:8px;padding:64px 24px 48px;text-align:center}.sf-amount-usd{font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));min-height:21px}.sf-amount-input-wrap{display:flex;justify-content:center;max-width:100%}.sf-amount-input{width:auto;max-width:100%;border:none;background:transparent;outline:none;text-align:center;font-family:inherit;font-size:40px;font-weight:700;line-height:1.25;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);field-sizing:content}.sf-amount-input-wrap[data-empty] .sf-amount-input,.sf-amount-input::placeholder{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-amount-input-wrap[data-over] .sf-amount-input{color:var(--ds-system-red-default, #da0b2e)}.sf-amount-balance{display:inline-flex;align-items:center;gap:4px;font-family:inherit;font-size:14px;font-weight:400;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-amount-max{border:none;background:transparent;padding:0;cursor:pointer;font:inherit;color:var(--ds-content-medium, rgba(0, 0, 0, .65));text-decoration:underline;text-underline-offset:2px;transition:color .15s ease}.sf-amount-max:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-drawer-content .sf-amount-center{padding:64px 16px 48px}.sf-review{display:flex;flex-direction:column;gap:16px;padding:24px}.sf-review-amount{display:flex;align-items:center;gap:12px;padding:0;background:transparent}.sf-review-amount-icon{width:40px;height:40px;border-radius:0;object-fit:contain;flex-shrink:0}.sf-review-amount-value{display:inline-flex;flex-direction:column;align-items:flex-start;gap:0;font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);word-break:break-all}.sf-review-amount-symbol{font-size:12px;font-weight:400;line-height:1.5;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-parties{position:relative;display:flex;flex-direction:column;gap:0}.sf-review-arrow{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;margin:-4px auto;border-radius:50%;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-medium, rgba(0, 0, 0, .18));color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-card{display:flex;flex-direction:column;gap:8px;padding:16px;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa)}.sf-review-party-label{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-party-head{display:flex;align-items:center;gap:8px}.sf-review-party-avatar{display:inline-flex;width:24px;height:24px;border-radius:50%;overflow:hidden;background:var(--ds-surface-high, #edf1f2);flex-shrink:0}.sf-review-party-avatar img{width:100%;height:100%;object-fit:cover}.sf-review-party-name{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-review-party-addr{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));word-break:break-all}.sf-review-section-title{margin:0 0 4px;font-family:inherit;font-size:16px;font-weight:600;letter-spacing:-.01em;color:var(--ds-content-highest, #000000)}.sf-review-row{display:flex;flex-direction:column;align-items:flex-start;gap:4px}.sf-review-row-label{font-family:inherit;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-row-value{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));text-align:left;word-break:break-all}.wi-drawer-content .sf-review{padding:16px}.sf-result{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;padding:48px 24px;text-align:center}.sf-result-icon{display:inline-flex;align-items:center;justify-content:center;width:56px;height:56px}.sf-result-spinner{width:56px;height:56px;border-radius:50%;border:4px solid var(--ds-border-medium, rgba(0, 0, 0, .18));border-top-color:var(--ds-accent-primary-high, #f0640d);animation:sf-spin .8s linear infinite}@keyframes sf-spin{to{transform:rotate(360deg)}}.sf-result-copy{display:flex;flex-direction:column;gap:8px}.sf-result-title{margin:0;font-family:inherit;font-size:18px;font-weight:600;letter-spacing:-.01em;color:var(--ds-content-highest, #000000)}.sf-result-desc{margin:0;font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-result-hash-card{display:flex;flex-direction:column;gap:8px;width:100%;padding:16px;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);text-align:left}.sf-result-hash-label{font-family:inherit;font-size:12px;font-weight:500;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-result-hash-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.sf-result-hash-link{border:none;background:transparent;padding:0;cursor:pointer;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:14px;color:var(--ds-accent-primary-high, #f0640d)}.sf-result-copy-btn{display:inline-flex;align-items:center;justify-content:center;min-width:44px;height:28px;padding:0 10px;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));border-radius:8px;background:var(--ds-surface-default, #ffffff);cursor:pointer;font-family:inherit;font-size:12px;font-weight:500;color:var(--ds-content-high, rgba(0, 0, 0, .85))}
7
- `);var Nt=require("react/jsx-runtime"),bw={token:"Send",recipient:"Send",amount:"Send",review:"Sign Transaction",result:""};function ga({onClose:e,onBackToWallet:t,onConfirmSuccess:n,onSuccess:r,className:o,...a}){let i=ru.useCallback(c=>{r?.(c),n?.(c)},[n,r]),l=jp({...a,onSuccess:r||n?i:void 0,onExit:t}),{step:d,status:p}=l,w=lr(l.recipient.trim()),u=Rr(l.amount,l.token.quantity.decimals),h="value"in u&&u.value<=l.balanceRaw,x=p==="submitting"||p==="confirming",y=d!=="result",f=bw[d]??"";return(0,Nt.jsx)(Le,{feature:"send",children:(0,Nt.jsxs)("div",{className:Ee("sf-root",o),"data-step":d,children:[(0,Nt.jsxs)("header",{className:"sf-header",children:[y?(0,Nt.jsx)("button",{type:"button",className:"sf-header-btn",onClick:l.back,"aria-label":"Back","data-track":"back",children:(0,Nt.jsx)(En,{size:24})}):(0,Nt.jsx)("span",{className:"sf-header-btn","aria-hidden":!0}),(0,Nt.jsx)("span",{className:"sf-header-title",children:f}),(0,Nt.jsx)("button",{type:"button",className:"sf-header-btn",onClick:e,"aria-label":"Close","data-track":"close","data-wi-close":!0,children:(0,Nt.jsx)(vn,{size:24})})]}),d==="token"&&(0,Nt.jsx)(nu,{flow:l}),d==="recipient"&&(0,Nt.jsx)(Jp,{flow:l}),d==="amount"&&(0,Nt.jsx)(Wp,{flow:l}),d==="review"&&(0,Nt.jsx)(tu,{flow:l}),d==="result"&&(0,Nt.jsx)(eu,{flow:l}),(0,Nt.jsxs)("footer",{className:"sf-footer","data-step":d,children:[d==="recipient"&&(0,Nt.jsx)("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.submitRecipient,"data-disabled":!w||void 0,"aria-disabled":!w,"data-track":"recipient_next",children:"Next"}),d==="amount"&&(0,Nt.jsx)("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.submitAmount,"data-disabled":!h||void 0,"aria-disabled":!h,"data-track":"amount_next",children:"Next"}),d==="review"&&(0,Nt.jsxs)("div",{className:"sf-footer-row",children:[(0,Nt.jsx)("button",{type:"button",className:"sf-btn sf-btn--secondary",onClick:l.back,disabled:x,"data-track":"review_cancel",children:"Cancel"}),(0,Nt.jsx)("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.confirmSend,disabled:x||!l.canSend||l.insufficientGas,"data-track":"review_send",children:x?"Sending...":"Send"})]}),d==="result"&&p==="success"&&(0,Nt.jsx)("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:()=>n?.(l.txHash||void 0),"data-track":"result_ok",children:"All done"}),d==="result"&&p==="error"&&(0,Nt.jsx)("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.retry,"data-track":"result_retry",children:"Try Again"})]})]})})}function Wi({env:e,theme:t="dark",showBalance:n=!1,showForgeToken:r=!1,showGameToken:o=!0,showQR:a=!0,showBridge:i=!0,showNft:s=!1,qrLogoSrc:l,walletAddress:d,accountName:p,sendAccounts:w,profileImageUrl:u,connectorId:h,connectorName:x,connectorIconUrl:y,preferredTokens:f=[],onSelectWallet:c,onCopyAddress:b,onBuy:g,onBuyDisabledMessage:v,onBridgeDisabledMessage:C,onSendDisabledMessage:N,onDisconnect:I,disconnectLabel:R="Disconnect",termsUrl:S=Ei,termsLabel:E="Terms of Service",privacyUrl:M=Ai,privacyLabel:z="Privacy Policy",showPortfolio:L=!1,showOnePop:G=!1,onePopSummary:A,onOnePopOpen:j,onOnePopSend:le,onOnePopClaim:oe,onOnePopActivity:ne,onOnePopRepliesSeen:V,onePopGetTokenSlot:ee,onePopLogoSrc:F,onePopHeroSrc:q,portfolioTitle:ae="My Portfolio",portfolioSections:X,showTotalAssets:me=!0,totalAssetsLabel:ke="Total Assets USD",sendTransaction:ze,getTransactionReceipt:ge,estimateGas:Ne,onOutlink:Ce,lpBalanceReader:tt,stakingRewardsReader:Me,bridgeTokens:Qe,bridgeHistory:lt,getBridgeQuote:We,getBridgeToTokens:Ve,getBridgeApproval:Ge,approveBridge:Dt,submitBridge:tn,onReceive:yt,onBridge:Pt,onSend:Tt,style:nn},{presentation:It,open:ft,isMobile:Ot,drawerDirection:rt,modal:on,close:mt}){let fn=it(e),Ze=h?ca[h]:void 0,dt=x??Ze?.name,nt=y??Ze?.iconUrl,[Et,Rt]=gn.useState(null),[Xe,an]=gn.useState("top"),[sn,Yt]=gn.useState(null),[ln,Q]=gn.useState("wallet"),[xe,Se]=gn.useState(null),[Fe,ot]=gn.useState(null),[Kt,Bt]=gn.useState(null),[Cn,Rn]=gn.useState(null),O=gn.useCallback(()=>{Q("wallet"),Se(null),ot(null),Bt(null),Rn(null)},[]);gn.useEffect(()=>{ft||O()},[ft,O]);let De=mt??O;gn.useEffect(()=>{no(d)},[d]);let qe=gn.useCallback(()=>{Ql(d),I?.()},[I,d]);return gn.useMemo(()=>({presentation:It,env:fn,theme:t,isMobile:Ot,open:ft,drawerDirection:rt,modal:on,showBalance:n,showForgeToken:r,showGameToken:o,showQR:a,showBridge:i,showNft:s,qrLogoSrc:l,walletAddress:d,accountName:p,sendAccounts:w,profileImageUrl:u,connectorName:dt,connectorIconUrl:nt,preferredTokens:f,close:De,onSelectWallet:c,onCopyAddress:b,onBuy:g,onBuyDisabledMessage:v,onBridgeDisabledMessage:C,onSendDisabledMessage:N,onDisconnect:I?qe:void 0,disconnectLabel:R,termsUrl:S,termsLabel:E,privacyUrl:M,privacyLabel:z,portalStyle:nn,navContent:Et,navPosition:Xe,setNavContent:Rt,setNavPosition:an,footerContent:sn,setFooterContent:Yt,view:ln,setView:Q,selectedSendToken:xe,setSelectedSendToken:Se,selectedDetailToken:Fe,setSelectedDetailToken:ot,selectedNftCollection:Kt,setSelectedNftCollection:Bt,selectedNft:Cn,setSelectedNft:Rn,showPortfolio:L,showOnePop:G,onePopSummary:A,onOnePopOpen:j,onOnePopSend:le,onOnePopClaim:oe,onOnePopActivity:ne,onOnePopRepliesSeen:V,onePopGetTokenSlot:ee,onePopLogoSrc:F,onePopHeroSrc:q,portfolioTitle:ae,portfolioSections:X,showTotalAssets:me,totalAssetsLabel:ke,sendTransaction:ze,getTransactionReceipt:ge,estimateGas:Ne,onOutlink:Ce,lpBalanceReader:tt,stakingRewardsReader:Me,bridgeTokens:Qe,bridgeHistory:lt,getBridgeQuote:We,getBridgeToTokens:Ve,getBridgeApproval:Ge,approveBridge:Dt,submitBridge:tn,onReceive:yt,onBridge:Pt,onSend:Tt}),[It,fn,t,Ot,ft,rt,on,n,r,o,a,i,s,l,d,p,w,u,dt,nt,f,De,c,b,g,v,C,N,I,qe,R,S,E,M,z,nn,Et,Xe,sn,ln,xe,Fe,Kt,Cn,L,G,A,j,le,oe,ne,V,ee,F,q,ae,X,me,ke,ze,ge,Ne,Ce,tt,Me,Qe,lt,We,Ve,Ge,Dt,tn,yt,Pt,Tt])}var ou=_(require("@radix-ui/react-popover"),1),au=require("vaul");var so=require("react/jsx-runtime");function iu({asChild:e,className:t,children:n}){let{isMobile:r,theme:o,walletAddress:a}=Fr(),i=n!=null,s=e??!0,l=i?n:(0,so.jsxs)("button",{type:"button",className:Ee("wi-trigger-btn",t),"data-theme":o,"data-mobile":r||void 0,children:[(0,so.jsx)(pp,{size:r?14:16}),(0,so.jsx)("span",{className:"wi-trigger-address",children:dn(a)})]});return r?(0,so.jsx)(au.Drawer.Trigger,{asChild:s,children:l}):(0,so.jsx)(ou.Trigger,{asChild:s,children:l})}var J=_(require("react"),1),Ts=_(require("@radix-ui/react-popover"),1),Pa=require("vaul");var zd=_(require("bignumber.js"),1);var Gi=_(require("bignumber.js"),1),ww=/^[+-]?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?$/i;function kt(e){if(e==null)return null;if(e instanceof Gi.default)return e.isFinite()?e:null;if(typeof e=="number")return Number.isFinite(e)?new Gi.default(e):null;let t=String(e).replace(/[,%\s]/g,"");if(!ww.test(t))return null;let n=new Gi.default(t);return n.isFinite()?n:null}var pu=require("@tanstack/react-query"),uu=require("react");var Hi=_(require("react"),1);function su(e){if(!e||typeof e!="object")return;let t=[],n=new Set,r=[],o=[];for(let[a,i]of Object.entries(e)){if(i?.balance!==!0)continue;if(!Pc(a)){r.push(a);continue}let s=Oc(a);if(s===void 0){o.push(a);continue}n.has(s)||(n.add(s),t.push(s))}if(t.length!==0)return{chainIds:t,skippedNonEvm:r,skippedMalformed:o}}var lu=new Set;function du(e,t){lu.has(e)||(lu.add(e),console.warn(t))}function cu(e){let t=Xt(eo,e,Hi.useCallback(r=>{let o=su(r?.chains);if(o)return o.skippedNonEvm.length>0&&du(`${e}:non-evm`,`[dapp-ui] chains.json (${e}): EVM \uC774 \uC544\uB2CC \uCCB4\uC778\uC740 \uC790\uC0B0 \uBAA9\uB85D\uC5D0\uC11C \uC81C\uC678\uD569\uB2C8\uB2E4 \u2014 ${o.skippedNonEvm.join(", ")}`),o.skippedMalformed.length>0&&du(`${e}:malformed`,`[dapp-ui] chains.json (${e}): chainId \uD615\uC2DD\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC544 \uC81C\uC678\uD569\uB2C8\uB2E4 \u2014 ${o.skippedMalformed.join(", ")}`),o.chainIds},[e])),n=Hi.useMemo(()=>jl(e),[e]);return t??n}var _i="user-balance";async function yw(e,t,n,r){let o=new URLSearchParams({networkId:t,account:n}),a=await fetch(`${e}/v1/public/token/balance?${o}`,{cache:"no-store",signal:r});if(!a.ok)throw new Error(`Failed to fetch token balance: ${a.status}`);let i=await a.json();if(i.code!==200)throw new Error(`Token balance API error: ${i.code}`);return i.data}function Sr(e,t,n=!0){let r=cu(e),o=(0,pu.useQueries)({queries:r.map(l=>({queryKey:[_i,e,t,l],queryFn:async({signal:d})=>yw(await Be("walletServer",e),l,t,d),enabled:!!t&&n,staleTime:0,refetchInterval:n?5e3:!1}))}),a=o.some(l=>l.isLoading),i=o.some(l=>l.isError);return{tokens:(0,uu.useMemo)(()=>{let l=[];for(let d of o)d.data&&l.push(...d.data);return l},[o]),isLoading:a,isError:i}}var Qi=require("@tanstack/react-query"),fu=require("react");var xw="forge-holdings",vw="forge-token-image";async function kw(e,t,n){let r=await fetch(`${e}/v1/users/${t}/holdings`,{cache:"no-store",signal:n});if(!r.ok)throw new Error(`Failed to fetch forge holdings: ${r.status}`);let o=await r.json();if(!o.success)throw new Error("Forge holdings API error");return o.data.items}async function Cw(e,t,n){let r=await fetch(`${e}/v1/tokens/${t}`,{cache:"no-store",signal:n});if(!r.ok)return{address:t,image_url:""};let o=await r.json();return o.success?{address:t,image_url:o.data.token.image_url}:{address:t,image_url:""}}function mu(e,t,n=!0){let{data:r,...o}=(0,Qi.useQuery)({queryKey:[xw,e,t],queryFn:async({signal:a})=>kw(await Be("bondingCurve",e),t,a),enabled:!!t&&n,staleTime:0,refetchInterval:n?5e3:!1});return{holdings:r??[],...o}}function gu(e,t,n=!0){let r=(0,Qi.useQueries)({queries:t.map(a=>({queryKey:[vw,e,a],queryFn:async({signal:i})=>Cw(await Be("bondingCurve",e),a,i),enabled:n,staleTime:1/0}))});return{imageMap:(0,fu.useMemo)(()=>{let a=new Map;for(let i of r)i.data&&a.set(i.data.address,i.data.image_url);return a},[r])}}var hu=require("@tanstack/react-query"),bu=require("react");var Vi="token-stats";function pr(e,t){return`${e}:${t.toLowerCase()}`}function Tr(e,t=!0){let{data:n,...r}=(0,hu.useQuery)({queryKey:[Vi,e],queryFn:async({signal:a})=>{let i=await Be("walletServer",e),s=await fetch(`${i}/v1/public/token/stats`,{cache:"no-store",signal:a});if(!s.ok)throw new Error(`Failed to fetch token stats: ${s.status}`);let l=await s.json();if(l.code!==200)throw new Error(`Token stats API error: ${l.code}`);return l},enabled:t,staleTime:3e4});return{statsMap:(0,bu.useMemo)(()=>{let a=new Map;if(!n?.data)return a;for(let i of n.data){let s=pr(i.chain_id,i.address);a.set(s,i)}return a},[n]),...r}}var wu=require("@tanstack/react-query"),Rw="crossd-apr",yu=6e4,Nw="https://crossd-dashboard-api.crossdefi.io/api/v1/overview",qi,ha;function Jl(){return qi&&qi.expiresAt>Date.now()?Promise.resolve(qi.value):ha||(ha=(async()=>{let e=await fetch(Nw,{cache:"no-store"});if(!e.ok)throw new Error(`Failed to fetch CROSSD overview: ${e.status}`);let t=await e.json();if(t.code!==200)throw new Error(`CROSSD overview API error: ${t.code}`);let n=parseFloat(t.data.est_last_epoch_apy);if(!Number.isFinite(n))throw new Error("CROSSD overview returned a non-numeric APR");let r=n*100;return qi={value:r,expiresAt:Date.now()+yu},r})().finally(()=>{ha=void 0}),ha)}function Yi(e){let t=Math.abs(e),n=(e>=0?Math.floor:Math.ceil)(t*100)/100;return`APR ${e>=0?"+":"-"}${n}%`}function xu(){let{data:e,...t}=(0,wu.useQuery)({queryKey:[Rw],queryFn:Jl,staleTime:yu});return{aprPercent:e??null,...t}}var vu=require("@tanstack/react-query"),$l=require("react");var Sw="token-info";function Ki(e,t){return`${t.toLowerCase()}_${e}`}function ku(e,t=!0){let{data:n,...r}=(0,vu.useQuery)({queryKey:[Sw,e],queryFn:async({signal:i})=>{let s=await Be("walletServer",e),l=await fetch(`${s}/v1/public/token/info`,{cache:"no-store",signal:i});if(!l.ok)throw new Error(`Failed to fetch token info: ${l.status}`);let d=await l.json();if(d.code!==200)throw new Error(`Token info API error: ${d.code}`);return d},enabled:t,staleTime:1/0}),o=(0,$l.useMemo)(()=>{let i=new Map;if(!n?.data)return i;for(let s of n.data){let l=Ki(s.chain_id,s.address);i.set(l,s.category)}return i},[n]),a=(0,$l.useMemo)(()=>{let i=new Map;if(!n?.data)return i;for(let s of n.data)i.set(Ki(s.chain_id,s.address),s);return i},[n]);return{categoryMap:o,infoMap:a,...r}}var Cu=require("react"),Ru=_(require("bignumber.js"),1);function Nu(e,t,n){let{tokens:r,isLoading:o}=Sr(e,t,n),{statsMap:a}=Tr(e,n);return(0,Cu.useMemo)(()=>{let i=new Ru.default(0);for(let p of r){let w=a.get(pr(p.chainId,p.address));if(!w)continue;let u=kt(p.quantity.numeric),h=kt(w.price);if(!u||!h)continue;let x=u.shiftedBy(-p.quantity.decimals).multipliedBy(h);x.isNaN()||(i=i.plus(x))}let s=i.toFixed(),{displayValue:l,isLowerBound:d}=kp(s);return{totalUsd:s,displayValue:l,isLowerBound:d,isLoading:o}},[r,a,o])}var td=_(require("bignumber.js"),1);var Tw=/^0x[0-9a-f]{40}$/i;function Tu(e){if(!Array.isArray(e)||e.length===0)return;let t=[];for(let n of e){if(!n||typeof n!="object")return;let{chainId:r,address:o}=n,a=ui(r);if(a===void 0||typeof o!="string")return;let i=o.trim();if(!Tw.test(i))return;t.push({chainId:a,address:i.toLowerCase()})}return t}function Iw(e){return new Map(e.map((t,n)=>[`${t.chainId}:${t.address.toLowerCase()}`,n]))}var Ew=new td.default("0.0001");function ed(e){return(kt(e.quantity.numeric)??new td.default(0)).shiftedBy(-e.quantity.decimals)}function Su(e,t){return`${e}:${t.toLowerCase()}`}function Aw(e,t){return`${t.toLowerCase()}_${e}`}function Iu({env:e,tokens:t,pinnedTokens:n,preferredTokens:r,statsMap:o,categoryMap:a,showGameToken:i}){let s=[],l=[],d=[],p=[],w=new Set;for(let f of o.values())w.add(f.chain_id);let u=w.size>0,h=Iw(n??Fi(e)),x=new Map;(r??[]).forEach((f,c)=>{let b=ui(f.chainId);b!==void 0&&x.set(`${b}:${f.address.toLowerCase()}`,c)});for(let f of t){let c=`${f.chainId}:${f.address.toLowerCase()}`,b=h.has(c),g=x.get(c);if(b)s.push(f);else if(g!==void 0)d.push(f);else if(ed(f).isGreaterThanOrEqualTo(Ew)){if(!i&&a.get(Aw(f.chainId,f.address))==="game")continue;u&&!w.has(f.chainId)?l.push(f):p.push(f)}}s.sort((f,c)=>{let b=h.get(`${f.chainId}:${f.address.toLowerCase()}`)??99,g=h.get(`${c.chainId}:${c.address.toLowerCase()}`)??99;return b-g}),d.sort((f,c)=>{let b=x.get(`${f.chainId}:${f.address.toLowerCase()}`)??99,g=x.get(`${c.chainId}:${c.address.toLowerCase()}`)??99;return b-g});let y=(f,c)=>{let b=o.get(Su(f.chainId,f.address)),g=o.get(Su(c.chainId,c.address)),v=ed(f).multipliedBy(kt(b?.price)??0);return ed(c).multipliedBy(kt(g?.price)??0).minus(v).toNumber()};return l.sort(y),p.sort(y),[...s,...l,...d,...p]}var Zi=_(require("react"),1);var Eu=new Set;function Mw(e){Eu.has(e)||(Eu.add(e),console.warn(`[dapp-ui] apps.json walletInfo.pinnedTokens (${e}) \uD615\uC2DD\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC544 \uBB34\uC2DC\uD569\uB2C8\uB2E4 \u2014 \uAE30\uBCF8 \uACE0\uC815 \uBAA9\uB85D\uC73C\uB85C \uD3F4\uBC31\uD569\uB2C8\uB2E4.`))}function Au(e){let t=Xt(fi,e,Zi.useCallback(r=>{let o=r?.walletInfo?.pinnedTokens;if(o===void 0)return;let a=Tu(o);if(!a){Mw(e);return}return a},[e])),n=Zi.useMemo(()=>Fi(e),[e]);return t??n}var Hg=require("qrcode.react");var _g=require("@nexus-cross/crossx-design-system");var Uu=require("@nexus-cross/crossx-design-system");var Ji=require("@nexus-cross/crossx-design-system");var Ae=require("react/jsx-runtime"),Lw='<svg width="100%" height="100%" viewBox="0 0 640 640" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_75048_28969)"><rect width="640" height="640" rx="100" fill="white"/><path d="M640.092 -0.18042H0.0917969V639.82H640.092V-0.18042Z" fill="#CE3E35"/><path d="M43.6074 104.484C43.6074 71.3473 70.4703 44.4844 103.607 44.4844H536.393C569.53 44.4844 596.393 71.3473 596.393 104.484V346.514H43.6074V104.484Z" fill="white"/><g filter="url(#filter0_d_75048_28969)"><path d="M639.908 639.822H0.0917969V158.676C0.0917969 136.585 18.0004 118.676 40.0918 118.676H218.544C237.426 118.676 252.868 132.846 264.251 147.912C277.196 165.045 297.355 176.058 319.999 176.058C342.644 176.058 362.803 165.045 375.748 147.912C387.131 132.846 402.573 118.676 421.455 118.676H599.908C622 118.676 639.908 136.585 639.908 158.676V639.822Z" fill="url(#paint0_linear_75048_28969)"/></g><path d="M223.621 639.503H639.909V181.499L223.621 448.166V639.503Z" fill="url(#paint1_linear_75048_28969)"/><path d="M223.645 639.819H0.0917969V212.869L223.645 449.197V639.819Z" fill="url(#paint2_linear_75048_28969)"/><g filter="url(#filter1_d_75048_28969)"><path d="M317.103 250.341L228.024 301.829C212.311 310.864 206.867 331.162 215.899 346.881C224.93 362.6 245.221 368.046 260.933 359.01L336.28 315.444L300.401 353.936V504.934C300.401 523.129 315.247 537.981 333.434 537.981C351.621 537.981 366.468 523.129 366.468 504.934V278.932C366.468 272.62 364.489 266.431 362.014 262.347C352.735 246.752 332.692 241.182 316.979 250.217L317.103 250.341Z" fill="white"/></g></g><defs><filter id="filter0_d_75048_28969" x="-19.9082" y="93.6763" width="679.816" height="561.146" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dy="-5"/><feGaussianBlur stdDeviation="10"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 0.892803 0 0 0 0 0.220099 0 0 0 0 0.293135 0 0 0 0.5 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_75048_28969"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_75048_28969" result="shape"/></filter><filter id="filter1_d_75048_28969" x="190.367" y="224.71" width="211.348" height="348.518" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dx="7.03953" dy="7.03953"/><feGaussianBlur stdDeviation="14.1039"/><feColorMatrix type="matrix" values="0 0 0 0 0.831373 0 0 0 0 0.113725 0 0 0 0 0.356863 0 0 0 0.3 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_75048_28969"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_75048_28969" result="shape"/></filter><linearGradient id="paint0_linear_75048_28969" x1="-74.0158" y1="54.6376" x2="542.251" y2="802.323" gradientUnits="userSpaceOnUse"><stop stop-color="#F3752D"/><stop offset="1" stop-color="#EC1272"/></linearGradient><linearGradient id="paint1_linear_75048_28969" x1="159.749" y1="206.729" x2="471.286" y2="474.513" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><linearGradient id="paint2_linear_75048_28969" x1="399.134" y1="82.7297" x2="104.683" y2="466.123" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><clipPath id="clip0_75048_28969"><rect width="640" height="640" rx="100" fill="white"/></clipPath></defs></svg>',Dw=`data:image/svg+xml,${encodeURIComponent(Lw)}`;function Xi(){return(0,Ae.jsx)("img",{src:Dw,width:40,height:40,alt:"",style:{display:"block"}})}function Mu(){return(0,Ae.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[(0,Ae.jsxs)("g",{clipPath:"url(#clip0_1331_27065)",children:[(0,Ae.jsx)("path",{d:"M37.2488 38.4674L28.6626 35.8175L22.1876 39.8295L17.6699 39.8274L11.191 35.8175L2.60875 38.4674L-0.00195312 29.3328L2.60875 19.1947L-0.00195312 10.6234L2.60875 0L16.0192 8.30453H23.838L37.2488 0L39.8595 10.6234L37.2488 19.1947L39.8595 29.3328L37.2488 38.4674Z",fill:"#FF5C16"}),(0,Ae.jsx)("path",{d:"M2.60938 0L16.0201 8.31037L15.4868 14.0137L2.60938 0ZM11.1919 29.3366L17.0925 33.9956L11.1919 35.8175V29.3366ZM16.6209 21.6342L15.4868 14.0175L8.22768 19.1971L8.22374 19.195V19.1988L8.24628 24.5302L11.1899 21.6345L16.6209 21.6342ZM37.2477 0L23.837 8.31037L24.3685 14.0137L37.2477 0ZM28.6654 29.3366L22.7646 33.9956L28.6654 35.8175V29.3366ZM31.6313 19.1985V19.1947L31.6297 19.1968L24.3705 14.0175L23.2364 21.6342H28.6651L31.6108 24.5296L31.6313 19.1985Z",fill:"#FF5C16"}),(0,Ae.jsx)("path",{d:"M11.191 35.8175L2.60875 38.4674L-0.00195312 29.3366H11.191V35.8175ZM16.62 21.6321L18.2595 32.6435L15.9873 26.5208L8.24368 24.5296L11.189 21.6324H16.62V21.6321ZM28.6662 35.8175L37.2488 38.4674L39.8595 29.3366H28.6662V35.8175ZM23.2375 21.6321L21.598 32.6435L23.8699 26.5208L31.6138 24.5296L28.6665 21.6324H23.2375V21.6321Z",fill:"#E34807"}),(0,Ae.jsx)("path",{d:"M-0.00195312 29.3328L2.60875 19.1947H8.22284L8.2434 24.5278L15.9876 26.519L18.2595 32.6414L17.0916 33.9897L11.191 29.3307H-0.00195312V29.3328ZM39.8595 29.3328L37.2488 19.1947H31.6344L31.6138 24.5278L23.8702 26.519L21.598 32.6414L22.7657 33.9897L28.6665 29.3307H39.8595V29.3328ZM23.838 8.30444H16.0192L15.4882 14.0078L18.2597 32.6355H21.598L24.3713 14.0078L23.838 8.30444Z",fill:"#FF8D5D"}),(0,Ae.jsx)("path",{d:"M2.60875 0L-0.00195312 10.6234L2.60875 19.1947H8.22284L15.4859 14.0137L2.60875 0ZM14.9975 23.8438H12.4541L11.0693 25.2508L15.9893 26.515L14.9975 23.842V23.8438ZM37.2488 0L39.8595 10.6234L37.2488 19.1947H31.6344L24.3716 14.0137L37.2488 0ZM24.8637 23.8438H27.4107L28.7955 25.2526L23.8699 26.5191L24.8637 23.8418V23.8438ZM22.1857 36.1956L22.7659 33.9936L21.598 32.6453H18.2572L17.0896 33.9936L17.6696 36.1956",fill:"#661800"}),(0,Ae.jsx)("path",{d:"M22.1857 36.1951V39.831H17.6699V36.1951H22.1857Z",fill:"#C0C4CD"}),(0,Ae.jsx)("path",{d:"M11.1914 35.8131L17.672 39.8289V36.193L17.0917 33.9912L11.1914 35.8131ZM28.6649 35.8131L22.1841 39.8289V36.193L22.7644 33.9912L28.6649 35.8131Z",fill:"#E7EBF6"})]}),(0,Ae.jsx)("defs",{children:(0,Ae.jsx)("clipPath",{id:"clip0_1331_27065",children:(0,Ae.jsx)("rect",{width:"40",height:"40",fill:"white"})})})]})}function Lu(){return(0,Ae.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ae.jsx)("path",{d:"M12.23 16.81L20 9.04L27.77 16.81L32.29 12.29L20 0L7.71 12.29L12.23 16.81Z",fill:"#F3BA2F"}),(0,Ae.jsx)("path",{d:"M9.04 20L4.52 15.48L0 20L4.52 24.52L9.04 20Z",fill:"#F3BA2F"}),(0,Ae.jsx)("path",{d:"M12.23 23.19L20 30.96L27.77 23.19L32.29 27.71L20 40L7.71 27.71L12.23 23.19Z",fill:"#F3BA2F"}),(0,Ae.jsx)("path",{d:"M35.48 24.52L40 20L35.48 15.48L30.96 20L35.48 24.52Z",fill:"#F3BA2F"}),(0,Ae.jsx)("path",{d:"M24.58 20L20 15.41L16.61 18.8L16.22 19.19L15.42 19.99L20 24.59L24.59 20L24.58 20Z",fill:"#F3BA2F"})]})}function Du(){return(0,Ae.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"247",height:"246",viewBox:"0 0 247 246",fill:"none",children:[(0,Ae.jsx)("rect",{width:"247.005",height:"245.105",rx:"36",fill:"#121212"}),(0,Ae.jsx)("path",{d:"M89.1233 136.695V59.7551H118.481V140.524L74.5862 184.774L30.4787 140.524V107.55H59.9073V136.695L74.5862 151.303L89.1233 136.695Z",fill:"white"}),(0,Ae.jsx)("path",{d:"M59.8364 99.8915V59.7551H12.0414L30.4787 77.8377V99.8915H59.8364Z",fill:"#2FD7FF"}),(0,Ae.jsx)("path",{d:"M199.534 59.9334C202.562 60.0484 208.427 60.4824 212.031 63.6902C215.635 66.898 216.937 71.0498 216.937 73.1199V104.017L198.767 114.828L216.937 125.561V172.713C216.937 174.511 216.405 178.276 211.034 181.377C205.664 184.477 202.613 184.969 201.758 184.827H143.949C141.879 184.904 136.712 184.182 132.602 180.686C128.493 177.19 128.462 175.216 128.462 173.515V125.561L146.173 114.828L128.462 104.017V71.1268C128.462 69.721 130.109 65.7781 133.237 63.5701C137.147 60.8101 141.112 59.9334 144.409 59.9334H199.534ZM158.3 122.264V166.221H187.033V122.264H158.3ZM158.3 107.794H187.033V78.5272H158.3V107.794Z",fill:"white"})]})}function Pu(){return(0,Ae.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ae.jsxs)("g",{clipPath:"url(#clip0_1185_7785)",children:[(0,Ae.jsx)("path",{d:"M14 28C21.75 28 28 21.75 28 14C28 6.25 21.75 0 14 0C6.25 0 0 6.25 0 14C0 21.75 6.25 28 14 28Z",fill:"#EB0029"}),(0,Ae.jsx)("path",{d:"M19.4975 8.36232L6 6L13.103 23L23 11.5311L19.4975 8.36232ZM19.2801 9.4034L21.3449 11.27L15.6975 12.2424L19.2801 9.4034ZM14.4714 12.0479L8.51876 7.35252L18.247 9.05524L14.4714 12.0479ZM14.0467 12.8782L13.0765 20.5098L7.84385 7.98492L14.0467 12.8782ZM14.9454 13.2835L21.1983 12.2064L14.026 20.518L14.9454 13.2835Z",fill:"white"})]}),(0,Ae.jsx)("defs",{children:(0,Ae.jsx)("clipPath",{id:"clip0_1185_7785",children:(0,Ae.jsx)("rect",{width:"28",height:"28",fill:"white"})})})]})}function Ou(){return(0,Ae.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ae.jsx)("path",{fill:"#FFC107",d:"M43.6 20.5H42V20H24v8h11.3A12 12 0 1 1 24 12c3 0 5.8 1.2 7.9 3l5.7-5.7A20 20 0 1 0 44 24c0-1.2-.1-2.4-.4-3.5z"}),(0,Ae.jsx)("path",{fill:"#FF3D00",d:"M6.3 14.7l6.6 4.8A12 12 0 0 1 24 12c3 0 5.8 1.2 7.9 3l5.7-5.7A20 20 0 0 0 6.3 14.7z"}),(0,Ae.jsx)("path",{fill:"#4CAF50",d:"M24 44c5.2 0 10-2 13.6-5.2l-6.3-5.3A12 12 0 0 1 12.7 28l-6.5 5A20 20 0 0 0 24 44z"}),(0,Ae.jsx)("path",{fill:"#1976D2",d:"M43.6 20.5H42V20H24v8h11.3a12 12 0 0 1-4.1 5.5l6.3 5.3C41 35.7 44 30.3 44 24c0-1.2-.1-2.4-.4-3.5z"})]})}function Bu(){return(0,Ae.jsx)("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,Ae.jsx)("path",{d:"M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.53 4.08zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"})})}function zu(){return(0,Ae.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Ae.jsx)("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}var zo={cross_embedded:{id:"cross_embedded",name:Ji.WALLET_LABELS.social,description:"Sign in with Google or Apple",icon:Xi},cross_wallet:{id:"cross_wallet",name:Ji.WALLET_LABELS.app,description:"App approval is required",icon:Xi,featured:!0},cross_extension:{id:"cross_extension",name:Ji.WALLET_LABELS.extension,description:"Browser extension approval is required",icon:Xi,rdns:"nexus.to.crosswallet.desktop",installUrl:"https://chromewebstore.google.com/detail/crossx/nninbdadmocnokibpaaohnoepbnpdgcg",visibility:"desktop-only"},metamask:{id:"metamask",name:"MetaMask",description:"Browser extension approval is required",icon:Mu,rdns:"io.metamask"},binance:{id:"binance",name:"Binance",description:"Mobile app only \u2014 Add CROSS network first",icon:Lu},verse8:{id:"verse8",name:"Verse8 Wallet",description:"Optimized for Forge and Verse8 ecosystem",icon:Du,badge:"For Forge"},tron:{id:"tron",name:"Tron Wallet",description:"Dedicated for Tron-based transactions and assets",icon:Pu,badge:"For SHOP"}};function nd(e){return zo[e]}var $i={google:{id:"google",name:"Google",icon:Ou},apple:{id:"apple",name:"Apple",icon:Bu}};function Fu(e){return $i[e]}var ju="dappui.wcm.last-selected",Pw=new Set(["google","apple"]);function Wu(e){try{window.localStorage.setItem(ju,e)}catch{}}function Gu(){let e=null;try{e=window.localStorage.getItem(ju)}catch{return}if(e)return Pw.has(e)?Uu.WALLET_LABELS.default:zo[e]?.name}function jt(e,t,n,r){if(!r||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.defaultPrevented)return;e.preventDefault();let o;try{o=r(t,n)}catch(d){console.error("[dapp-ui] onOutlink threw:",d);return}let a=d=>{typeof window>"u"||window.open(d,"_blank","noopener,noreferrer")};if((d=>!!d&&(typeof d=="object"||typeof d=="function")&&typeof d.then=="function")(o)){let d=typeof window<"u"?window.open("","_blank","noopener,noreferrer"):null,p=w=>{if(w===null){d?.close();return}let u=w??t;if(d)try{d.location.href=u}catch{d.close(),a(u)}else a(u)};o.then(p,w=>{console.error("[dapp-ui] onOutlink rejected:",w),d?.close()});return}let s=o;if(s===null)return;a(s??t)}var fo=_(require("react"),1),gm=require("vaul");var Uo=require("react");var An=_(require("bignumber.js"),1),Ow=/^(\d{4}-\d{2}-\d{2})/;function Hu(e){if(!e||e.length===0)return;let t=new Map,n;for(let{key:o,cumulative:a}of e.map(i=>({key:Ow.exec(i.reference_date)?.[1],cumulative:i.cumulative_earned})).filter(i=>!!i.key&&i.cumulative!=null).sort((i,s)=>i.key<s.key?-1:i.key>s.key?1:0))t.set(o,a),n=o;if(n===void 0)return;let r=new Date().toISOString().slice(0,10);return t.get(r)??t.get(n)}function _u(e){return e.poolType==="Unknown"}function es(e){return e.length<=12?e:`${e.slice(0,6)}...${e.slice(-4)}`}function ts(e){return e.length<=13?e:`${e.slice(0,6)}...${e.slice(-4)}`}function ba(e,t){let n=e.length+t.length;if(n>32)return"xs";if(n>24)return"sm"}function rd(e){return e?.toUpperCase()==="WONE"?"ONE":e}var Bw=["Request Arguments:","Details:","Docs:","Version:","Contract Call:"];function wa(e,t){console.error("[wallet-portfolio] withdraw failed:",e);let r=e instanceof Error?e.message:"";for(let a of Bw){let i=r.indexOf(a);i>=0&&(r=r.slice(0,i))}return r.split(`
8
- `).map(a=>a.trim()).find(a=>a.length>0)||t}var zw="0xe00e8bf3";function Qu(e,t){let n=typeof e=="bigint"?e:BigInt(e);if(n<0n)throw new Error("poolId must be non-negative");if(t<0n)throw new Error("amount must be non-negative");let r=n.toString(16).padStart(64,"0"),o=t.toString(16).padStart(64,"0");return`${zw}${r}${o}`}function Fo(e){return!e||e<=0n?"0":new An.default(e.toString()).shiftedBy(-9).toFormat(2,An.default.ROUND_DOWN).replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"")}function ns(e){return!e||e<=0n?"0":new An.default(e.toString()).toFormat(0,An.default.ROUND_DOWN)}function rs(e){if(!e||e<=0n)return"0";let t=new An.default(e.toString()).shiftedBy(-18),n=t.isLessThan(1e-4)?7:4;return t.toFormat(n,An.default.ROUND_DOWN).replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"")}function ur(e,t){let n=new An.default(e).shiftedBy(-t);return!n.isFinite()||n.isZero()?"0":n.isGreaterThanOrEqualTo(1)?n.toFormat(2,An.default.ROUND_DOWN):n.toFormat(4,An.default.ROUND_DOWN)}function od(e){return ur(e,0)}var ya={rate:1,symbol:"$"};function lo(e,t=ya){let n=Number.isFinite(t.rate)&&t.rate>0?t.rate:1;return`${t.symbol||"$"}${e.times(n).toFormat(2,An.default.ROUND_DOWN)}`}function Wr(e,t,n,r=ya){let o=new An.default(n||"0");if(!o.isFinite()||o.isLessThanOrEqualTo(0))return null;let a=new An.default(e||"0").shiftedBy(-t).times(o);return a.isFinite()?lo(a,r):null}var xa=(0,Uo.createContext)(null);function Wt(){let e=(0,Uo.useContext)(xa);if(!e)throw new Error("WalletPortfolio compound components must be used within <WalletPortfolio>");return e}function Fn(){let{conversionRatio:e,currencySymbol:t}=Wt();return(0,Uo.useMemo)(()=>({rate:typeof e=="number"&&e>0?e:ya.rate,symbol:t||ya.symbol}),[e,t])}var Vu=require("vaul");var ad=require("react/jsx-runtime");function qu({asChild:e,children:t}){let{walletAddress:n}=Wt(),r=t!=null,o=e??!0,a=r?t:(0,ad.jsx)("button",{type:"button",children:dn(n)});return(0,ad.jsx)(Vu.Drawer.Trigger,{asChild:o,children:a})}var Na=require("vaul");var _t=_(require("react"),1),fm=require("@tanstack/react-query");var os=require("react"),id=(0,os.createContext)(null);function Yu(){return(0,os.useContext)(id)}var Gt=require("react/jsx-runtime");function Ku({size:e=22,className:t}){return(0,Gt.jsx)("svg",{width:e,height:e,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Gt.jsx)("path",{d:"M14 4L7 11L14 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Zu({size:e=22,className:t}){return(0,Gt.jsxs)("svg",{width:e,height:e,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Gt.jsx)("path",{d:"M18.333 3.667v5.5h-5.5",stroke:"currentColor",strokeWidth:1.833,strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M16.17 13.75a7.333 7.333 0 11-1.54-7.59L18.333 9.167",stroke:"currentColor",strokeWidth:1.833,strokeLinecap:"round",strokeLinejoin:"round"})]})}function Xu({size:e=12,className:t}){return(0,Gt.jsx)("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Gt.jsx)("path",{d:"M6 11A5 5 0 106 1a5 5 0 000 10zM6 8V6M6 4h.005",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"})})}function as({size:e=16,className:t}){return(0,Gt.jsxs)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Gt.jsx)("path",{d:"M5.333 5.333V4a1.333 1.333 0 011.334-1.333h5.333A1.333 1.333 0 0113.333 4v5.333a1.333 1.333 0 01-1.333 1.334h-1.333",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M4 5.333h5.333c.737 0 1.334.597 1.334 1.334V12c0 .736-.597 1.333-1.334 1.333H4A1.333 1.333 0 012.667 12V6.667C2.667 5.93 3.263 5.333 4 5.333z",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"})]})}function is({size:e=16,className:t}){return(0,Gt.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Gt.jsx)("path",{d:"M13.333 4L6 11.333 2.667 8",stroke:"currentColor",strokeWidth:1.667,strokeLinecap:"round",strokeLinejoin:"round"})})}function ss({size:e=48,className:t}){return(0,Gt.jsxs)("svg",{width:e,height:e,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Gt.jsx)("circle",{cx:"24",cy:"24",r:"24",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M14 24.5l6.6 6.6L34.5 17.5",stroke:"var(--wp-claim-success-mark, #ffffff)",strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round"})]})}function Mn({size:e=12,className:t}){return(0,Gt.jsxs)("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":"true",children:[(0,Gt.jsx)("path",{d:"M5 2H2.5A1.5 1.5 0 0 0 1 3.5V9.5A1.5 1.5 0 0 0 2.5 11H8.5A1.5 1.5 0 0 0 10 9.5V7",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M7 1H11V5",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M11 1L6 6",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})]})}var Ju=require("@tanstack/react-query"),sd=require("react");var Fw="wp:reward-pools";function jo(e,t=!0){let{data:n,...r}=(0,Ju.useQuery)({queryKey:[Fw,e],queryFn:async({signal:i})=>{let s=await Be("gameReward",e),l=await fetch(`${s}/v1/pools`,{cache:"no-store",signal:i});if(!l.ok)throw new Error(`Failed to fetch pools: ${l.status}`);let d=await l.json();if(d.code!==200)throw new Error(`Pools API error: ${d.code}`);return d},enabled:t,staleTime:0}),o=(0,sd.useMemo)(()=>n?.data.pools.filter(i=>i.pool_type==="CrossPool")??[],[n]),a=(0,sd.useMemo)(()=>n?.data.pools.filter(i=>i.pool_type==="GamePool")??[],[n]);return{crossPools:o,gamePools:a,allPools:n?.data.pools??[],...r}}var $u=require("@tanstack/react-query"),ef=require("react");var Uw="wp:user-deposits";function ls(e,t,n=!0){let r=n&&!!t,{data:o,...a}=(0,$u.useQuery)({queryKey:[Uw,e,t],queryFn:async({signal:s})=>{let l=await Be("gameReward",e),d=await fetch(`${l}/v1/users/${t}/deposits`,{cache:"no-store",signal:s});if(!d.ok)throw new Error(`Deposits fetch failed: ${d.status}`);let p=await d.json();if(p.code!==200)throw new Error(`Deposits API error: ${p.code}`);return p},enabled:r,staleTime:0});return{depositMap:(0,ef.useMemo)(()=>{let s=new Map;if(!o?.data.user_deposits)return s;for(let l of o.data.user_deposits)s.set(l.pool_address.toLowerCase(),l);return s},[o]),deposits:o?.data.user_deposits??[],...a}}var cf=require("@tanstack/react-query"),pf=require("react");var tf={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"},nf={dev:"https://stg.onechain.nexus/points",stage:"https://stg.onechain.nexus/points",production:"https://www.onechain.nexus/points"};var rf={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"};var ld={dev:"https://dev-stake.ogfcorp.com",stage:"https://stg-stake.ogfcorp.com",production:"https://stake.ogfcorp.com"},of={dev:`${ld.dev}/portfolio`,stage:`${ld.stage}/portfolio`,production:`${ld.production}/portfolio`};var af={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"},Un={dev:"https://stg-contents.crosstoken.io/frontend/common/app-launcher/icons",stage:"https://stg-contents.crosstoken.io/frontend/common/app-launcher/icons",production:"https://contents.crosstoken.io/frontend/common/app-launcher/icons"},ds={dev:"https://stg-swap-api.crossdefi.io",stage:"https://stg-swap-api.crossdefi.io",production:"https://swap-api.crossdefi.io"},sf={dev:"https://stg.crossdefi.io",stage:"https://stg.crossdefi.io",production:"https://www.crossdefi.io"},lf={dev:"0x1Fa8C0bc5B754E82d55D60f0d6151903FD995b1B",stage:"0x1Fa8C0bc5B754E82d55D60f0d6151903FD995b1B",production:"0xEFd871aF7D695A0c1709e46b565761F4cd1Ef5ba"},df={dev:"0xda37a3B60E6b97E8CB44b460130d40331efc566b",stage:"0xda37a3B60E6b97E8CB44b460130d40331efc566b",production:"0x731a104a4461ae45bfef520468b43c262d35e682"};var jw="wp:token-info",Ww="0x0000000000000000000000000000000000000001";function fr(e,t=!0){let n=At[e].cross,{data:r,...o}=(0,cf.useQuery)({queryKey:[jw,e],queryFn:async({signal:p})=>{let w=await Be("walletServer",e),u=await fetch(`${w}/v1/public/token/info`,{cache:"no-store",signal:p});if(!u.ok)throw new Error(`Failed to fetch token info: ${u.status}`);let h=await u.json();if(h.code!==200)throw new Error(`Token info API error: ${h.code}`);return h},enabled:t,staleTime:300*1e3}),{byChainAddr:a,byChainSym:i}=(0,pf.useMemo)(()=>{let p=new Map,w=new Map;if(!r?.data)return{byChainAddr:p,byChainSym:w};for(let u of r.data){let h=u.address.toLowerCase();p.set(`${u.chain_id}:${h}`,u),p.set(h,u);let x=u.symbol.replace(/^t/,"").toUpperCase(),y=`${u.chain_id}:${x}`;w.has(y)||w.set(y,u),w.has(x)||w.set(x,u)}return{byChainAddr:p,byChainSym:w}},[r]);return{getTokenImage:(p,w,u)=>{let h=p.toLowerCase(),x=!!u?.chainOnly,y=a.get(`${n}:${h}`);if(y?.image)return y.image;if(!x){let f=a.get(h);if(f?.image)return f.image}if(w){let f=w.replace(/^t/,"").toUpperCase(),c=i.get(`${n}:${f}`);if(c?.image)return c.image;if(!x){let b=i.get(f);if(b?.image)return b.image}}return""},getTokenSymbol:(p,w,u)=>{let h=p.toLowerCase();return(a.get(`${n}:${h}`)??(u?.chainOnly?void 0:a.get(h)))?.symbol||w},getNativeToken:()=>a.get(`${n}:${Ww}`),...o}}var dd=_(require("react"),1);var co=require("react/jsx-runtime");function jn({sectionKey:e,title:t,icon:n,iconFit:r="cover",isEmpty:o,loading:a=!1,children:i}){let s=Yu();return dd.useEffect(()=>{s?.report(e,{loading:a,empty:o})},[s,e,a,o]),dd.useEffect(()=>()=>s?.unregister(e),[s,e]),o?null:(0,co.jsxs)("div",{className:"wp-svc-card",children:[(0,co.jsxs)("div",{className:"wp-svc-card-head",children:[(0,co.jsx)("img",{className:"wp-svc-card-icon",src:n,alt:"",style:{objectFit:r}}),(0,co.jsx)("span",{className:"wp-svc-card-title",children:t})]}),(0,co.jsx)("div",{className:"wp-svc-items",children:i})]})}var cs=_(require("bignumber.js"),1),_e=require("react/jsx-runtime"),Gw="ONErewards";function Hw(e){return new cs.default(e||"0").isGreaterThan(0)}function uf(){let{env:e,walletAddress:t,onOutlink:n}=Wt(),r=Fn(),o=!!t,{allPools:a,isLoading:i}=jo(e,o),{depositMap:s,isLoading:l}=ls(e,t,o),{getTokenImage:d}=fr(e,o),p=(h,x)=>`${tf[e]}/gametoken/tokens/${h.deposit_token.address}?mode=rewards${x==="withdraw"?"&trade=withdraw":""}`,w=`${Un[e]}/reward.png`,u=a.filter(h=>{let x=s.get(h.pool_address.toLowerCase()),y=x?.deposited_amount??"0",f=x?.claimable_reward??"0";return!(new cs.default(y).isZero()&&new cs.default(f).isZero())});return(0,_e.jsx)(jn,{sectionKey:"rewards",title:Gw,icon:w,isEmpty:u.length===0,loading:i||l,children:u.map(h=>{let x=s.get(h.pool_address.toLowerCase()),y=x?.deposited_amount??"0",f=x?.claimable_reward??"0",c=p(h,"withdraw"),b=p(h,"claim"),g=d(h.deposit_token.address,h.deposit_token.symbol),v=h.reward_tokens[0],C=v?d(v.address,v.symbol):"",N=h.reward_tokens.map(L=>L.symbol),I=N.length>0?`${h.deposit_token.symbol}-${N.join("/")}`:h.deposit_token.symbol,R=v?ur(f,v.decimals):"0",S=v?.symbol??"Reward",E=Wr(y,h.deposit_token.decimals,h.deposit_token.price,r),M=v?Wr(f,v.decimals,v.price,r):null,z=!!x&&Hw(f);return(0,_e.jsxs)("article",{className:"wp-item","data-side":"reward",children:[(0,_e.jsxs)("div",{className:"wp-item-body",children:[(0,_e.jsxs)("div",{className:"wp-item-line",children:[(0,_e.jsxs)("span",{className:"wp-item-label",children:["Pool",(0,_e.jsx)("span",{className:"wp-item-label-sub",children:" (Deposit - Earn)"})]}),(0,_e.jsxs)("div",{className:"wp-svc-token",children:[(0,_e.jsxs)("span",{className:"wp-token-stack","aria-hidden":!0,children:[g&&(0,_e.jsx)("img",{className:"wp-svc-token-icon",src:g,alt:""}),C&&(0,_e.jsx)("img",{className:"wp-svc-token-icon",src:C,alt:""})]}),(0,_e.jsx)("span",{children:I})]})]}),(0,_e.jsxs)("div",{className:"wp-item-line",children:[(0,_e.jsx)("span",{className:"wp-item-label",children:"Deposited"}),(0,_e.jsxs)("div",{className:"wp-svc-token wp-svc-token--amount",children:[g&&(0,_e.jsx)("img",{className:"wp-svc-token-icon",src:g,alt:""}),(0,_e.jsxs)("div",{className:"wp-svc-amount",children:[(0,_e.jsx)("span",{className:"wp-svc-amount-main",children:ur(y,h.deposit_token.decimals)}),E&&(0,_e.jsx)("span",{className:"wp-item-usd",children:E})]})]})]}),(0,_e.jsxs)("div",{className:"wp-item-line",children:[(0,_e.jsxs)("span",{className:"wp-item-label",children:["Claimable (",S,")"]}),(0,_e.jsxs)("div",{className:"wp-svc-token wp-svc-token--amount",children:[C&&(0,_e.jsx)("img",{className:"wp-svc-token-icon",src:C,alt:""}),(0,_e.jsxs)("div",{className:"wp-svc-amount",children:[(0,_e.jsx)("span",{className:"wp-svc-amount-main",children:R}),M&&(0,_e.jsx)("span",{className:"wp-item-usd",children:M})]})]})]})]}),(0,_e.jsxs)("div",{className:"wp-item-tags",children:[(0,_e.jsxs)("a",{className:"wp-tag wp-tag--muted",href:c,target:"_blank",rel:"noopener noreferrer","data-track":"rewards_withdraw_open",onClick:L=>jt(L,c,{category:"portfolio",origin:"portfolio-rewards",payload:{pool:h,userDeposit:x}},n),children:[(0,_e.jsx)("span",{className:"wp-tag-label",children:"Withdraw"}),(0,_e.jsx)(Mn,{size:12,className:"wp-tag-icon"})]}),(0,_e.jsxs)("a",{className:"wp-tag wp-tag--mint","data-disabled":!z||void 0,"aria-disabled":!z||void 0,href:z?b:void 0,target:z?"_blank":void 0,rel:z?"noopener noreferrer":void 0,onClick:L=>{if(!z){L.preventDefault();return}jt(L,b,{category:"portfolio",origin:"portfolio-rewards",payload:{pool:h,userDeposit:x}},n)},children:[(0,_e.jsx)("span",{className:"wp-tag-label",children:"Claim"}),(0,_e.jsx)(Mn,{size:12,className:"wp-tag-icon"})]})]})]},h.pool_address)})})}var kf=_(require("react"),1);var mf=require("@tanstack/react-query"),Ca=require("react");var _w="0x70a08231",Qw="0x18160ddd",Vw="0x313ce567",qw=8e3;async function Yw(e,t,n,r){let o=new AbortController,a=setTimeout(()=>o.abort(),qw);r&&r.addEventListener("abort",()=>o.abort(),{once:!0});let i=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:t,params:n}),signal:o.signal}).finally(()=>clearTimeout(a));if(!i.ok)throw new Error(`RPC ${t} HTTP ${i.status}`);let s=await i.json();if(s.error)throw new Error(`RPC ${t}: ${s.error.message}`);if(s.result===void 0)throw new Error(`RPC ${t}: empty result`);return s.result}function Kw(e){return e.toLowerCase().replace(/^0x/,"").padStart(64,"0")}function va(e){if(!(!e||e==="0x"))try{return BigInt(e)}catch{return}}async function Ir(e,t,n,r,o){try{return await Yw(e,"eth_call",[o?{from:o,to:t,data:n}:{to:t,data:n},"latest"],r)}catch{return}}async function Zw(e,t,n,r){let[o,a,i]=await Promise.all([Ir(e,n,_w+Kw(t),r),Ir(e,n,Qw,r),Ir(e,n,Vw,r)]),s=va(o);if(s===void 0)return null;let l=va(i);return{balance:s,totalSupply:va(a),decimals:l!==void 0?Number(l):void 0}}async function ka(e,t){let n=At[e].cross,r=await Be("walletServer",e),o=await fetch(`${r}/v1/public/chain/info/${n}`,{cache:"no-store",signal:t});if(!o.ok)return;let a=await o.json();return("data"in a&&a.data!==void 0?Array.isArray(a.data)?a.data[0]:a.data:a)?.rpc||void 0}async function ff(e,t,n,r){if(!t||n.length===0)return{};let o;try{o=await ka(e,r)}catch{o=void 0}if(!o)return{};let a=await Promise.all(n.map(async s=>[s.toLowerCase(),await Zw(o,t,s,r)])),i={};for(let[s,l]of a)l&&(i[s]=l);return i}var Xw="wp:withdraw-token-meta",Jw="0xc89039c5",$w="0x95d89b41",e1="0x313ce567";function t1(e){if(!(!e||e==="0x"))try{let t=e.replace(/^0x/,""),n=Number(BigInt("0x"+t.slice(64,128)));if(!Number.isFinite(n)||n<=0||n>64)return;let r=t.slice(128,128+n*2),o="";for(let a=0;a<r.length;a+=2)o+=String.fromCharCode(parseInt(r.slice(a,a+2),16));return o||void 0}catch{return}}function n1(e){if(!e||e==="0x")return;let n="0x"+e.replace(/^0x/,"").padStart(64,"0").slice(24,64);return/^0x[a-f0-9]{40}$/.test(n)&&n!=="0x0000000000000000000000000000000000000000"?n:void 0}async function r1(e,t,n){if(t.length===0)return{};let r;try{r=await ka(e,n)}catch{r=void 0}if(!r)return{};let o=await Promise.all(t.map(async i=>{let s=n1(await Ir(r,i,Jw,n));if(!s)return[i.toLowerCase(),null];let[l,d]=await Promise.all([Ir(r,s,$w,n),Ir(r,s,e1,n)]),p=t1(l),w=va(d);return p?[i.toLowerCase(),{tokenAddress:s,symbol:p,decimals:w!==void 0?Number(w):18}]:[i.toLowerCase(),null]})),a={};for(let[i,s]of o)s&&(a[i]=s);return a}function gf(e,t,n=!0){let o=n&&!!t,{allPools:a,isLoading:i}=jo(e,o),{deposits:s,isLoading:l}=ls(e,t,o),d=(0,Ca.useMemo)(()=>{let f=new Map;for(let c of a)f.set(c.pool_address.toLowerCase(),c);return f},[a]),p=(0,Ca.useMemo)(()=>s.filter(f=>{try{return BigInt(f.deposited_amount||"0")>0n}catch{return!1}}),[s]),w=(0,Ca.useMemo)(()=>p.map(f=>f.pool_address.toLowerCase()).filter(f=>!d.has(f)).sort(),[p,d]),{data:u,isLoading:h}=(0,mf.useQuery)({queryKey:[Xw,e,w],queryFn:({signal:f})=>r1(e,w,f),enabled:o&&w.length>0,staleTime:1440*60*1e3});return{positions:(0,Ca.useMemo)(()=>{let f=[];for(let c of p){let b=c.pool_address.toLowerCase(),g=d.get(b);if(g){f.push({poolId:c.pool_id,poolAddress:c.pool_address,poolType:g.pool_type,tokenSymbol:g.deposit_token.symbol,tokenAddress:g.deposit_token.address,decimals:g.deposit_token.decimals,price:g.deposit_token.price,depositedRaw:c.deposited_amount});continue}let v=u?.[b];v&&f.push({poolId:c.pool_id,poolAddress:c.pool_address,poolType:"Unknown",tokenSymbol:v.symbol,tokenAddress:v.tokenAddress,decimals:v.decimals,depositedRaw:c.deposited_amount})}return f},[p,d,u]),isLoading:i||l||h}}var hn=_(require("react"),1);var ie=require("react/jsx-runtime"),o1=400;function a1(e,t,n){if(t==="loading")return"Estimating...";if(!e||t==="error"||t==="unavailable")return"Wallet estimate";let r=e.maxFeePerGas??e.gasPrice;return!r||r<=0n||e.gasLimit<=0n?"Wallet estimate":`${rs(e.gasLimit*r)} ${n??""}`.trim()}function cd(e,t,n){return n==="loading"?"Estimating...":n==="error"||n==="unavailable"?"-":`${e} ${t}`.trim()}function i1({position:e,size:t}){return e.icon?(0,ie.jsx)("img",{src:e.icon,alt:"",width:t,height:t}):(0,ie.jsx)("span",{children:e.tokenSymbol.slice(0,1)})}function hf({open:e,status:t,positions:n,initialPoolAddress:r,walletAddress:o,txHash:a,error:i,copied:s=!1,estimateWithdraw:l,onClose:d,onConfirm:p,onCopyHash:w,trackFunnel:u,nativeSymbol:h}){let[x,y]=hn.useState(null),[f,c]=hn.useState("idle"),b=hn.useRef(0),g=hn.useRef(void 0),v=hn.useRef(null);hn.useEffect(()=>()=>clearTimeout(g.current),[]);let C=hn.useMemo(()=>{let G=r?.toLowerCase();return n.find(A=>A.poolAddress.toLowerCase()===G)??n[0]??null},[n,r]),N=hn.useMemo(()=>{try{return BigInt(C?.depositedRaw??"0")}catch{return 0n}},[C?.depositedRaw]),I=C?.decimals??18;hn.useEffect(()=>{!e||!C||u?.("position_selected")},[e,C,u]);let R=hn.useCallback(()=>{y(null),c(l?"idle":"unavailable"),b.current+=1,v.current=null},[]);if(hn.useEffect(()=>{e&&R()},[e,R]),hn.useEffect(()=>{if(!e||t!=="confirm"){clearTimeout(g.current);return}if(!l||!C){clearTimeout(g.current),c("unavailable");return}if(N<=0n){clearTimeout(g.current),b.current+=1,v.current=null,y(null),c("idle");return}let G=`${C.poolAddress.toLowerCase()}:${N.toString()}`;if(v.current===G)return;v.current=G,clearTimeout(g.current);let A=b.current+1;b.current=A,c("loading"),g.current=setTimeout(()=>{l(C,N).then(j=>{b.current===A&&(y(j??null),c(j?"ready":"unavailable"))}).catch(()=>{b.current===A&&(y(null),c("error"))})},o1)},[e,t,N,l,C]),!e||!C)return null;let S=t==="submitting",E=Fo(x?.maxPriorityFeePerGas),M=Fo(x?.maxFeePerGas??x?.gasPrice),z=ns(x?.gasLimit),L=ur(C.depositedRaw,I);return(0,ie.jsx)("div",{className:"wp-claim-overlay",role:"presentation",onMouseDown:G=>{G.target===G.currentTarget&&!S&&d()},children:(0,ie.jsxs)("section",{className:"wp-claim-sheet",role:"dialog","aria-modal":"true","aria-labelledby":"wp-withdraw-title","aria-label":"Withdraw","data-status":t,"data-vaul-no-drag":!0,children:[(0,ie.jsx)("div",{className:"wp-claim-grabber","aria-hidden":!0,children:(0,ie.jsx)("span",{})}),(0,ie.jsxs)("div",{className:"wp-claim-content wp-withdraw-content",children:[t==="success"&&a?(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)("span",{className:"wp-claim-icon wp-claim-icon--success","aria-hidden":!0,children:(0,ie.jsx)(ss,{})}),(0,ie.jsxs)("div",{className:"wp-claim-copy",children:[(0,ie.jsx)("h3",{id:"wp-withdraw-title",className:"wp-claim-title",children:"Withdraw Submitted!"}),(0,ie.jsx)("p",{className:"wp-claim-desc",children:"Your withdrawal request has been submitted. Balances will update shortly after the transaction settles."})]}),(0,ie.jsx)("div",{className:"wp-claim-list","aria-label":"Withdraw transaction",children:(0,ie.jsxs)("div",{className:"wp-claim-list-item",children:[(0,ie.jsx)("span",{children:"Tx Hash"}),(0,ie.jsxs)("button",{type:"button",className:"wp-claim-hash",onClick:w,"aria-label":"Copy transaction hash","data-track":"withdraw_hash_copy",children:[(0,ie.jsx)("strong",{children:ts(a)}),s?(0,ie.jsx)(is,{}):(0,ie.jsx)(as,{})]})]})})]}):(0,ie.jsxs)(ie.Fragment,{children:[t==="error"&&(0,ie.jsxs)("div",{className:"wp-claim-heading",children:[(0,ie.jsx)("h3",{id:"wp-withdraw-title",className:"wp-claim-title",children:"Withdraw Failed"}),(0,ie.jsx)("p",{className:"wp-claim-error-message",children:i||"The withdraw request could not be completed."})]}),(0,ie.jsxs)("div",{className:"wp-claim-reward-card","data-fit":ba(C.tokenSymbol,L),"aria-label":"Deposited balance",children:[(0,ie.jsx)("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:(0,ie.jsx)(i1,{position:C,size:28})}),(0,ie.jsx)("strong",{className:"wp-claim-reward-symbol",children:C.tokenSymbol}),(0,ie.jsx)("strong",{className:"wp-claim-reward-amount",children:L})]}),(0,ie.jsxs)("div",{className:"wp-claim-account-card","aria-label":"Withdraw gas fee",children:[(0,ie.jsxs)("div",{className:"wp-claim-account-row",children:[(0,ie.jsxs)("div",{className:"wp-claim-account",children:[(0,ie.jsx)("span",{className:"wp-claim-account-avatar","aria-hidden":!0}),(0,ie.jsxs)("strong",{children:[C.tokenSymbol," Pool"]})]}),(0,ie.jsx)("span",{children:es(o)})]}),(0,ie.jsx)("span",{className:"wp-claim-divider","aria-hidden":!0}),(0,ie.jsxs)("div",{className:"wp-claim-detail-list",children:[(0,ie.jsxs)("div",{className:"wp-claim-detail-row",children:[(0,ie.jsx)("span",{children:"Est. Tx Fee"}),(0,ie.jsx)("strong",{children:a1(x,f,h)})]}),(0,ie.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ie.jsx)("span",{children:"Priority Fee Per Gas"}),(0,ie.jsx)("strong",{children:cd(E,"Gwei",f)})]}),(0,ie.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ie.jsx)("span",{children:"Max Fee Per Gas"}),(0,ie.jsx)("strong",{children:cd(M,"Gwei",f)})]}),(0,ie.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ie.jsx)("span",{children:"Gas Limit"}),(0,ie.jsx)("strong",{children:cd(z,"",f)})]})]})]})]}),(0,ie.jsxs)("div",{className:"wp-claim-actions","data-count":t==="confirm"||t==="error"?2:1,children:[(t==="confirm"||t==="error")&&(0,ie.jsx)("button",{type:"button",className:"wp-claim-secondary","data-track":"withdraw_cancel",onClick:d,children:t==="error"?"Close":"Cancel"}),(0,ie.jsxs)("button",{type:"button",className:"wp-claim-primary","data-track":"withdraw_confirm",onClick:()=>{if(t==="success"){d();return}C&&N>0n&&p(C,N,x)},disabled:S||(t==="confirm"||t==="error")&&N<=0n,children:[t==="success"&&"Done",t==="submitting"&&(0,ie.jsx)("span",{className:"wp-claim-button-spinner","aria-label":"Waiting"}),t==="error"&&"Try Again",t==="confirm"&&"Withdraw Now"]})]})]}),(0,ie.jsx)("div",{className:"wp-claim-home-indicator","aria-hidden":!0,children:(0,ie.jsx)("span",{})})]})})}var Ht=_(require("react"),1),xf=require("@tanstack/react-query");var bf=require("@tanstack/react-query");var s1="wp:reward-factory-info";function wf(e,t=!0){let{data:n,...r}=(0,bf.useQuery)({queryKey:[s1,e],queryFn:async({signal:o})=>{let a=await Be("gameReward",e),i=await fetch(`${a}/v1/factory/info`,{cache:"no-store",signal:o});if(!i.ok)throw new Error(`Factory info fetch failed: ${i.status}`);let s=await i.json();if(s.code!==200)throw new Error(`Factory info API error: ${s.code}`);return s},enabled:t,staleTime:0});return{factoryInfo:n?.data??null,routerAddress:n?.data.router_address??"",...r}}var pd="wp:";function Er(e){return e.invalidateQueries({predicate:t=>typeof t.queryKey[0]=="string"&&t.queryKey[0].startsWith("wp:")})}function yf(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?e:null}function vf(e){let{env:t,walletAddress:n,sendTransaction:r,estimateGas:o}=Wt(),a=!!n,i=!!r,s=(0,xf.useQueryClient)(),{routerAddress:l}=wf(t,a&&i),d=yf(l),[p,w]=Ht.useState(!1),[u,h]=Ht.useState(void 0),[x,y]=Ht.useState("confirm"),[f,c]=Ht.useState(),[b,g]=Ht.useState(""),[v,C]=Ht.useState(!1),N=Ht.useRef(void 0);Ht.useEffect(()=>()=>clearTimeout(N.current),[]);let I=Ht.useRef(new Set),R=Ht.useCallback((j,le)=>{I.current.has(j)||(I.current.add(j),Je("withdraw",j,{...le,tags:{section:e,...le?.tags}}))},[e]),S=Ht.useCallback((j,le)=>d?{to:d,value:0n,data:Qu(j,le),chainId:At[t].cross}:null,[t,d]),E=Ht.useCallback(()=>{Er(s)},[s]),M=Ht.useCallback(j=>{h(j),w(!0),y("confirm"),c(void 0),g(""),C(!1),I.current=new Set,R("opened")},[R]),z=Ht.useCallback(()=>{x!=="submitting"&&(w(!1),h(void 0),y("confirm"),c(void 0),g(""),C(!1),x==="success"&&E())},[x,E]),L=Ht.useCallback(async(j,le)=>{if(!o)return null;let oe=S(j.poolId,le),ne=yf(n);return!oe||!ne?null:o({...oe,from:ne})},[S,o,n]),G=Ht.useCallback(async()=>{if(!(!f||typeof navigator>"u"||!navigator.clipboard))try{await navigator.clipboard.writeText(f),C(!0),clearTimeout(N.current),N.current=setTimeout(()=>C(!1),1400)}catch{C(!1)}},[f]),A=Ht.useCallback(async(j,le,oe)=>{if(!r){y("error"),g("Withdraw is not available for this wallet.");return}if(!d){y("error"),g("Withdraw contract address is not available.");return}try{y("submitting"),g("");let ne=S(j.poolId,le);if(!ne){y("error"),g("Withdraw contract address is not available.");return}R("submitted");let V=await r({...ne,gas:oe?.gasLimit&&oe.gasLimit>0n?oe.gasLimit:void 0,maxFeePerGas:oe?.maxFeePerGas&&oe.maxFeePerGas>0n?oe.maxFeePerGas:void 0,maxPriorityFeePerGas:oe?.maxPriorityFeePerGas&&oe.maxPriorityFeePerGas>0n?oe.maxPriorityFeePerGas:void 0});c(V),y("success"),R("confirmed"),E()}catch(ne){y("error"),g(wa(ne,"Failed to request withdraw.")),R("confirmed",{status:"failure",reason:Nn(ne)})}},[S,E,d,r,R]);return{canWithdrawInline:i,isOpen:p,initialPoolAddress:u,status:x,txHash:f,error:b,copied:v,hasEstimator:!!o,openWithdraw:M,closeWithdraw:z,estimateWithdraw:L,confirmWithdraw:A,copyHash:G,trackFunnelOnce:R}}var pt=require("react/jsx-runtime"),l1="ONEpoints";function Cf(){let{env:e,walletAddress:t,onOutlink:n}=Wt(),r=Fn(),o=!!t,{getTokenImage:a,getNativeToken:i}=fr(e,o),s=vf("points"),{positions:l,isLoading:d}=gf(e,t,o),p=kf.useMemo(()=>l.filter(_u).map(h=>({...h,icon:a(h.tokenAddress,h.tokenSymbol)})),[l,a]),w=`${Un[e]}/point.png`,u=nf[e];return(0,pt.jsxs)(pt.Fragment,{children:[(0,pt.jsx)(jn,{sectionKey:"points",title:l1,icon:w,isEmpty:p.length===0,loading:d,children:p.map(h=>{let x=h.price?Wr(h.depositedRaw,h.decimals,h.price,r):null;return(0,pt.jsxs)("article",{className:"wp-item","data-side":"reward",children:[(0,pt.jsxs)("div",{className:"wp-item-body",children:[(0,pt.jsxs)("div",{className:"wp-item-line",children:[(0,pt.jsx)("span",{className:"wp-item-label",children:"Token"}),(0,pt.jsxs)("div",{className:"wp-svc-token",children:[h.icon&&(0,pt.jsx)("img",{className:"wp-svc-token-icon",src:h.icon,alt:""}),(0,pt.jsx)("span",{children:h.tokenSymbol})]})]}),(0,pt.jsxs)("div",{className:"wp-item-line",children:[(0,pt.jsx)("span",{className:"wp-item-label",children:"Deposited"}),(0,pt.jsxs)("div",{className:"wp-svc-token wp-svc-token--amount",children:[h.icon&&(0,pt.jsx)("img",{className:"wp-svc-token-icon",src:h.icon,alt:""}),(0,pt.jsxs)("div",{className:"wp-svc-amount",children:[(0,pt.jsx)("span",{className:"wp-svc-amount-main",children:ur(h.depositedRaw,h.decimals)}),x&&(0,pt.jsx)("span",{className:"wp-item-usd",children:x})]})]})]})]}),(0,pt.jsx)("div",{className:"wp-item-tags",children:s.canWithdrawInline?(0,pt.jsx)("button",{type:"button",className:"wp-tag wp-tag--muted","data-track":"points_withdraw_open",onClick:()=>s.openWithdraw(h.poolAddress),children:(0,pt.jsx)("span",{className:"wp-tag-label",children:"Withdraw"})}):(0,pt.jsxs)("a",{className:"wp-tag wp-tag--muted",href:u,target:"_blank",rel:"noopener noreferrer","data-track":"points_withdraw_open",onClick:y=>jt(y,u,{category:"portfolio",origin:"portfolio-points",payload:{position:h}},n),children:[(0,pt.jsx)("span",{className:"wp-tag-label",children:"Withdraw"}),(0,pt.jsx)(Mn,{size:12,className:"wp-tag-icon"})]})})]},h.poolAddress)})}),(0,pt.jsx)(hf,{open:s.isOpen,status:s.status,positions:p,initialPoolAddress:s.initialPoolAddress,walletAddress:t,txHash:s.txHash,error:s.error,copied:s.copied,estimateWithdraw:s.hasEstimator?s.estimateWithdraw:void 0,onClose:s.closeWithdraw,onConfirm:s.confirmWithdraw,onCopyHash:s.copyHash,trackFunnel:s.trackFunnelOnce,nativeSymbol:i()?.symbol})]})}var fd=_(require("react"),1);var Rf=require("@tanstack/react-query");var d1="wp:stake-info";function Nf(e,t,n=!0){let r=n&&!!t,{data:o,...a}=(0,Rf.useQuery)({queryKey:[d1,e,t],queryFn:async({signal:s})=>{let l=await Be("posa",e),d=await fetch(`${l}/stake/${t}`,{cache:"no-store",signal:s});if(!d.ok)throw new Error(`Stake info fetch failed: ${d.status}`);let p=await d.json();if(p.code!==0&&p.code!==200)throw new Error(`Stake info API error: ${p.code}`);return p},enabled:r,staleTime:0});return{stakeInfo:o?.data,...a}}var Sf=require("@tanstack/react-query");var c1="wp:stake-rewards",p1=31;function Tf(e,t,n=!0){let r=n&&!!t,{data:o,...a}=(0,Sf.useQuery)({queryKey:[c1,e,t],queryFn:async({signal:i})=>{let s=await Be("posa",e),l=await fetch(`${s}/rewards/${t}?limit=${p1}`,{cache:"no-store",signal:i});if(!l.ok)throw new Error(`Stake rewards fetch failed: ${l.status}`);let d=await l.json();if(d.code!==0&&d.code!==200)throw new Error(`Stake rewards API error: ${d.code}`);return d.data?.data??[]},enabled:r,staleTime:0});return{latestReward:o?.[0]??null,aprAccrued:Hu(o),...a}}var If=require("@tanstack/react-query"),u1="wp:staking-onchain";function Ef(e,t,n=!0){let r=n&&!!t&&!!e,{data:o,...a}=(0,If.useQuery)({queryKey:[u1,e],queryFn:async()=>{if(!t)throw new Error("stakingRewardsReader not provided");return t(e)},enabled:r,staleTime:0});return{onchain:o,...a}}var ud=require("react"),Lf=_(require("bignumber.js"),1);function Af(e){return e?.trim().toUpperCase()==="ONE"}function Mf(e){return new Lf.default(e||"0").isGreaterThan(0)}function ps(e,t,n=!0){let{allPools:r}=jo(e,n),o=(0,ud.useMemo)(()=>{for(let d of r)for(let p of[d.deposit_token,...d.reward_tokens])if(Af(p?.symbol)&&Mf(p.price))return p.price},[r]),a=n&&o===void 0,{tokens:i}=Sr(e,t,a),{statsMap:s}=Tr(e,a),l=At[e].cross;return(0,ud.useMemo)(()=>{if(o)return o;let d=i.find(p=>p.chainId===l&&Af(p.symbol));if(d){let p=s.get(pr(d.chainId,d.address));if(p&&Mf(p.price))return p.price}return"0"},[o,i,s,l])}var Ar=_(require("bignumber.js"),1),zt=require("react/jsx-runtime");function f1(e){if(!e)return"\u2014";let t=new Ar.default(e);return t.isFinite()?`${t.toFormat(2,Ar.default.ROUND_DOWN)}%`:"\u2014"}function Df(){let{env:e,walletAddress:t,onOutlink:n,stakingRewardsReader:r}=Wt(),o=Fn(),a=!!t,{stakeInfo:i,isLoading:s}=Nf(e,t,a),{latestReward:l,aprAccrued:d,isLoading:p}=Tf(e,t,a),{onchain:w}=Ef(t,r,a),u=ps(e,t,a),{getNativeToken:h}=fr(e,a),x=h()?.symbol,y="ONEstaking",f=`${Un[e]}/cross-staking.png`,c=of[e],b=i?.total_stake??"0",g=fd.useMemo(()=>w?new Ar.default(w.earnedWei.toString()).shiftedBy(-18).toString(10):l?.cumulative_earned??i?.rewards_earned??"0",[w,l,i]),v=fd.useMemo(()=>w?new Ar.default(w.stakedWei.toString()).shiftedBy(-18):new Ar.default(b),[w,b]),C=d!==void 0?new Ar.default(d):void 0,N=i?.days_since_first_stake,I=C!==void 0&&C.isFinite()&&v.isGreaterThan(0)&&N!==null&&N!==void 0?C.div(v).times(365).div(Math.max(1,N)).times(100):void 0,R=!(new Ar.default(b).isZero()&&new Ar.default(g).isZero()),S=Wr(b,0,u,o),E=Wr(g,0,u,o);return(0,zt.jsx)(jn,{sectionKey:"staking",title:y,icon:f,iconFit:"contain",isEmpty:!R,loading:s||p,children:(0,zt.jsxs)("article",{className:"wp-item","data-side":"stake",children:[(0,zt.jsxs)("div",{className:"wp-item-body",children:[(0,zt.jsxs)("div",{className:"wp-item-line",children:[(0,zt.jsx)("span",{className:"wp-item-label",children:"Staked"}),(0,zt.jsxs)("div",{className:"wp-svc-amount",children:[(0,zt.jsx)("span",{className:"wp-svc-amount-main",children:`${od(b)} ${x??""}`.trim()}),S&&(0,zt.jsx)("span",{className:"wp-item-usd",children:S})]})]}),(0,zt.jsxs)("div",{className:"wp-item-line",children:[(0,zt.jsx)("span",{className:"wp-item-label",children:"Rewards Earned"}),(0,zt.jsxs)("div",{className:"wp-svc-amount",children:[(0,zt.jsx)("span",{className:"wp-svc-amount-main",children:`${od(g)} ${x??""}`.trim()}),E&&(0,zt.jsx)("span",{className:"wp-item-usd",children:E})]})]}),(0,zt.jsxs)("div",{className:"wp-item-line",children:[(0,zt.jsx)("span",{className:"wp-item-label",children:"My APR"}),(0,zt.jsx)("span",{children:f1(I?.toString(10))})]})]}),(0,zt.jsx)("div",{className:"wp-item-tags",children:(0,zt.jsxs)("a",{className:"wp-tag wp-tag--mint",href:c,target:"_blank",rel:"noopener noreferrer","data-track":"stake_outlink",onClick:M=>jt(M,c,{category:"portfolio",origin:"portfolio-stake",payload:{stakeInfo:i}},n),children:[(0,zt.jsx)("span",{className:"wp-tag-label",children:"Manage"}),(0,zt.jsx)(Mn,{size:12,className:"wp-tag-icon"})]})})]})})}var md=_(require("react"),1);var Pf=require("@tanstack/react-query");var m1="wp:game-swap-pools";function Of(e,t,n=!0){let r=n&&!!t,{data:o,...a}=(0,Pf.useQuery)({queryKey:[m1,e,t],queryFn:async({signal:i})=>{let s=await Be("gameSwap",e),l=await fetch(`${s}/addresses/${t}/portfolio`,{cache:"no-store",signal:i});if(!l.ok)throw new Error(`Game-swap portfolio fetch failed: ${l.status}`);return(await l.json()).pools??[]},enabled:r,staleTime:0});return{pools:o??[],...a}}var Bf=require("@tanstack/react-query");var g1="wp:game-swap-lp-balances";function zf(e,t,n,r){let o=[...n].map(l=>l.toLowerCase()).sort(),a=!!t&&o.length>0,{data:i,...s}=(0,Bf.useQuery)({queryKey:[g1,e,t,o,!!r],queryFn:async({signal:l})=>{let d=r?await r(o):await ff(e,t,o,l),p={};for(let[w,u]of Object.entries(d))p[w.toLowerCase()]=u;return p},enabled:a,staleTime:0});return{balances:i??{},...s}}var mr=_(require("bignumber.js"),1),Ct=require("react/jsx-runtime"),h1="Gametoken LP",Uf=18,b1=new mr.default("0.0001");function Ff(e){return e?.trim().toUpperCase()==="ONE"}function w1(e){return e&&e>0?e:Uf}function y1(e){let t=Ff(e.token_a?.symbol)&&!Ff(e.token_b?.symbol),n=t?e.reserve_a:e.reserve_b,r=w1(t?e.token_a?.decimals:e.token_b?.decimals),o=new mr.default(n||"0").shiftedBy(-r);return!o.isFinite()||o.isLessThanOrEqualTo(0)?new mr.default(0):o.times(2)}function x1(e,t,n,r){let o=e.token_a?.symbol?.trim()||"TOKEN",a=e.token_b?.symbol?.trim()||r||"?",i=t?.decimals??Uf,s,l;if(t&&t.totalSupply&&t.totalSupply>BigInt(0)){let d=new mr.default(t.balance.toString()),p=new mr.default(t.totalSupply.toString()),w=d.div(p);s=w.times(100);let u=w.times(y1(e));if(u.isGreaterThan(0)){let h=new mr.default(e.quote_usd??e.cross_usd??"0");l=h.isGreaterThan(0)?lo(u.times(h),n):`${u.toFormat(4,mr.default.ROUND_DOWN)} ${r??""}`.trim()}}return{pool:e,tokenASymbol:o,tokenBSymbol:a,info:t,lpAmountRaw:t?.balance.toString(),lpDecimals:i,sharePercent:s,valueText:l}}function jf(){let{env:e,walletAddress:t,onOutlink:n,lpBalanceReader:r}=Wt(),o=Fn(),a=!!t,{pools:i,isLoading:s}=Of(e,t,a),l=md.useMemo(()=>i.map(c=>c.pair_address).filter(Boolean),[i]),{balances:d,isLoading:p}=zf(e,t,l,r),{getNativeToken:w}=fr(e,a),u=w()?.symbol,h=`${Un[e]}/game-token.png`,x=Object.keys(d).length>0,y=md.useMemo(()=>{let c=i.map(b=>x1(b,d[b.pair_address?.toLowerCase()],o,u));return x?c.filter(b=>b.lpAmountRaw?new mr.default(b.lpAmountRaw).shiftedBy(-b.lpDecimals).isGreaterThanOrEqualTo(b1):!1):c},[i,d,x,o,u]),f=c=>{let b=c.token_a?.address??c.pair_address;return`${af[e]}/gametoken/tokens/${b}?trade=deposit`};return(0,Ct.jsx)(jn,{sectionKey:"gameSwap",title:h1,icon:h,iconFit:"contain",isEmpty:y.length===0,loading:s||p,children:y.map(c=>{let{pool:b}=c,g=f(b),v=`${c.tokenASymbol} / ${c.tokenBSymbol}`,C=b.token_a?.logo_url,N=b.token_b?.logo_url;return(0,Ct.jsxs)("article",{className:"wp-item","data-side":"game-swap",children:[(0,Ct.jsxs)("div",{className:"wp-item-body",children:[(0,Ct.jsxs)("div",{className:"wp-item-line",children:[(0,Ct.jsx)("span",{className:"wp-item-label",children:"Pool"}),(0,Ct.jsxs)("div",{className:"wp-svc-token",children:[(0,Ct.jsxs)("span",{className:"wp-token-stack","aria-hidden":!0,children:[C&&(0,Ct.jsx)("img",{className:"wp-svc-token-icon",src:C,alt:""}),N&&(0,Ct.jsx)("img",{className:"wp-svc-token-icon",src:N,alt:""})]}),(0,Ct.jsx)("span",{children:v})]})]}),c.lpAmountRaw!==void 0&&(0,Ct.jsxs)("div",{className:"wp-item-line",children:[(0,Ct.jsx)("span",{className:"wp-item-label",children:"My LP"}),(0,Ct.jsxs)("span",{children:[ur(c.lpAmountRaw,c.lpDecimals)," LP"]})]}),c.sharePercent!==void 0&&(0,Ct.jsxs)("div",{className:"wp-item-line",children:[(0,Ct.jsx)("span",{className:"wp-item-label",children:"Pool Share"}),(0,Ct.jsxs)("span",{children:[c.sharePercent.toFormat(2,mr.default.ROUND_DOWN),"%"]})]}),c.valueText!==void 0&&(0,Ct.jsxs)("div",{className:"wp-item-line",children:[(0,Ct.jsx)("span",{className:"wp-item-label",children:"Value"}),(0,Ct.jsx)("span",{children:c.valueText})]})]}),(0,Ct.jsx)("div",{className:"wp-item-tags",children:(0,Ct.jsxs)("a",{className:"wp-tag wp-tag--mint",href:g,target:"_blank",rel:"noopener noreferrer","data-track":"gameswap_outlink","data-track-id":v,onClick:I=>jt(I,g,{category:"portfolio",origin:"portfolio-game-swap",payload:{pool:b}},n),children:[(0,Ct.jsx)("span",{className:"wp-tag-label",children:"Manage"}),(0,Ct.jsx)(Mn,{size:12,className:"wp-tag-icon"})]})})]},b.pair_address)})})}var Gr=_(require("bignumber.js"),1),Vf=require("react");var Wf=require("@tanstack/react-query");var v1="wp:forge-pools";function Gf(e,t,n=!0){let r=n&&!!t,{data:o,...a}=(0,Wf.useQuery)({queryKey:[v1,e,t],queryFn:async()=>{let s=await Be("bondingCurve",e),l=await fetch(`${s}/v1/users/${t}/pools`,{cache:"no-store"});if(!l.ok)throw new Error(`forge pools fetch failed: ${l.status}`);return(await l.json()).data?.items??[]},enabled:r,staleTime:0}),i=o??[];return{pools:i,isEmpty:i.length===0,...a}}var Hf=require("@tanstack/react-query"),_f=require("react");var k1="wp:forge-token-detail";async function C1(e,t){let n=await fetch(`${e}/v1/tokens/${t}`,{cache:"no-store"});return n.ok?(await n.json())?.data?.token??null:null}function Qf(e,t,n=!0){let r=(0,Hf.useQueries)({queries:t.map(i=>({queryKey:[k1,e,i],queryFn:async()=>C1(await Be("bondingCurve",e),i),enabled:n&&!!i,staleTime:3e4}))}),o=(0,_f.useMemo)(()=>{let i=new Map;for(let s=0;s<r.length;s++){let l=r[s]?.data,d=t[s];l&&d&&i.set(d.toLowerCase(),l)}return i},[r,t]),a=r.some(i=>i.isLoading);return{detailMap:o,isLoading:a}}var St=require("react/jsx-runtime"),R1="ONEforge",qf=18,N1="https://contents.crosstoken.io/wallet/token/images/FT.png";function S1(e){if(!e||e==="0")return"0";let t=new Gr.default(e).shiftedBy(-qf);return t.isZero()?"0":t.isGreaterThanOrEqualTo(1)?t.toFormat(2,Gr.default.ROUND_DOWN):t.toFormat(4,Gr.default.ROUND_DOWN)}function T1(e){let t=Number(e);return!Number.isFinite(t)||t<=0?"0%":t>=1?`${(Math.floor(t*100)/100).toFixed(2)}%`:`${(Math.floor(t*1e4)/1e4).toFixed(4)}%`}function I1(e,t,n,r){let o=new Gr.default(n||"0");if(!o.isGreaterThan(0))return null;let a=new Gr.default(e.total_supply||"0"),i=new Gr.default(e.lp_balance||"0"),s=new Gr.default(t?.reserve_b||"0").shiftedBy(-qf);if(!a.isGreaterThan(0)||!i.isGreaterThan(0)||!s.isGreaterThan(0))return null;let l=s.times(2),p=i.div(a).times(l).times(o);return p.isFinite()?lo(p,r):null}function Yf(){let{env:e,walletAddress:t,onOutlink:n}=Wt(),r=Fn(),o=!!t,{pools:a,isEmpty:i,isLoading:s}=Gf(e,t,o),l=(0,Vf.useMemo)(()=>a.map(h=>h.token.address),[a]),{detailMap:d}=Qf(e,l,o&&l.length>0),p=ps(e,t,o),w=h=>`${rf[e]}/forge/token/${h.token.address}`,u=`${Un[e]}/forge.png`;return(0,St.jsx)(jn,{sectionKey:"forge",title:R1,icon:u,iconFit:"contain",isEmpty:i,loading:s,children:a.map(h=>{let x=d.get(h.token.address.toLowerCase()),y=x?.image_url||x?.image||h.token.image||N1,f=x?.symbol||h.token.symbol,c=w(h),b=I1(h,x,p,r);return(0,St.jsxs)("a",{className:"wp-item","data-side":"lp",href:c,target:"_blank",rel:"noopener noreferrer","data-track":"forge_outlink","data-track-id":f,onClick:g=>jt(g,c,{category:"portfolio",origin:"portfolio-forge",payload:{pool:h,tokenDetail:x}},n),children:[(0,St.jsxs)("div",{className:"wp-item-body",children:[(0,St.jsxs)("div",{className:"wp-item-line",children:[(0,St.jsx)("span",{className:"wp-item-label",children:"Asset"}),(0,St.jsxs)("div",{className:"wp-svc-token",children:[(0,St.jsx)("img",{className:"wp-svc-token-icon",src:y,alt:""}),(0,St.jsx)("span",{children:f}),x?.name&&(0,St.jsx)("span",{className:"wp-token-subtle",children:x.name})]})]}),(0,St.jsxs)("div",{className:"wp-item-line",children:[(0,St.jsx)("span",{className:"wp-item-label",children:"LP Balance"}),(0,St.jsx)("div",{className:"wp-svc-token wp-svc-token--amount",children:(0,St.jsxs)("div",{className:"wp-svc-amount",children:[(0,St.jsx)("span",{className:"wp-svc-amount-main",children:S1(h.lp_balance)}),b&&(0,St.jsx)("span",{className:"wp-item-usd",children:b})]})})]}),(0,St.jsxs)("div",{className:"wp-item-line",children:[(0,St.jsx)("span",{className:"wp-item-label",children:"Ownership"}),(0,St.jsx)("span",{className:"wp-line-value",children:T1(h.pool_ownership)})]})]}),(0,St.jsx)("div",{className:"wp-item-tags",children:(0,St.jsxs)("span",{className:"wp-tag wp-tag--muted",children:[(0,St.jsx)("span",{className:"wp-tag-label",children:"Withdraw"}),(0,St.jsx)(Mn,{size:12,className:"wp-tag-icon"})]})})]},h.pair_address)})})}var wd=require("react"),pm=_(require("bignumber.js"),1);var Kf=require("@tanstack/react-query");var E1="wp:crossd-positions";function A1(e){let t=e??{};return(t.positions??t.data?.positions??[]).filter(r=>{if(!r?.token_id||!r.liquidity)return!1;try{return BigInt(r.liquidity)>0n}catch{return!1}})}function Zf(e,t,n=!0){let r=n&&!!t,{data:o,...a}=(0,Kf.useQuery)({queryKey:[E1,e,t],queryFn:async()=>{let s=await fetch(`${ds[e]}/api/v1/positions?owner=${t}`,{cache:"no-store"});if(!s.ok)throw new Error(`crossd positions fetch failed: ${s.status}`);return A1(await s.json())},enabled:r,staleTime:0}),i=o??[];return{positions:i,isEmpty:i.length===0,...a}}var Xf=require("@tanstack/react-query"),Jf=require("react");var M1="wp:crossd-position-details";function L1(e){let t=e??{},n=t.data??t;return n?.token_id||n?.pool?n:null}function $f(e,t,n=!0){let r=(0,Xf.useQueries)({queries:t.map(a=>({queryKey:[M1,e,a],queryFn:async()=>{let i=await fetch(`${ds[e]}/api/v1/positions/${a}`,{cache:"no-store"});if(!i.ok)throw new Error(`crossd position detail failed: ${i.status}`);return L1(await i.json())},enabled:n&&!!a,staleTime:6e4}))});return{detailMap:(0,Jf.useMemo)(()=>{let a=new Map;return r.forEach((i,s)=>{let l=i.data,d=t[s];l&&d&&a.set(d,l)}),a},[r,t])}}var Mr=_(require("react"),1);var ce=require("react/jsx-runtime"),D1=300*1e3,em="https://contents.crosstoken.io/wallet/token/images/Cross.svg";function P1(e,t,n){if(t)return"Estimating...";if(!e)return"Wallet estimate";let r=e.maxFeePerGas??e.gasPrice;return!r||r<=0n||e.gasLimit<=0n?"Wallet estimate":`${rs(e.gasLimit*r)} ${n??""}`.trim()}function gd(e,t,n){return n?"Estimating...":`${e} ${t}`.trim()}function tm({open:e,status:t,target:n,token0Icon:r,token1Icon:o,token0Symbol:a,token1Symbol:i,nativeSymbol:s,txHash:l,error:d,copied:p=!1,hasEstimator:w,prepareWithdraw:u,confirmWithdraw:h,onClose:x,onCopyHash:y,trackFunnel:f}){let[c,b]=Mr.useState(null),[g,v]=Mr.useState(null),C=Mr.useRef(0);Mr.useEffect(()=>{if(!e||!n)return;let X=++C.current;b(null),v(null),f?.("dialog_opened"),u().then(me=>{C.current===X&&(b(me),v(me?Date.now():null))})},[e,n]);let N=t==="submitting",I=t==="estimating"||t==="confirm"&&!c,R=Mr.useCallback(async()=>{let X=c,me=!g||Date.now()-g>D1;if(!X||me){let ke=++C.current;if(X=await u(),C.current!==ke)return;b(X),v(X?Date.now():null)}X&&await h(X)},[c,g,u,h]);if(!e||!n)return null;let{position:S,detail:E}=n,M=E.pool?.token0,z=E.pool?.token1,L=a||M?.symbol||S.pool?.token0_symbol||"?",G=i||z?.symbol||S.pool?.token1_symbol||"?",A=M?.decimals??18,j=z?.decimals??18,le=r||M?.logo_url||em,oe=o||z?.logo_url||em,ne=`${L}/${G}`,V=c?Bo(c.expectedAmount0.toString(),A):null,ee=c?Bo(c.expectedAmount1.toString(),j):null,F=Fo(c?.estimate?.maxPriorityFeePerGas),q=Fo(c?.estimate?.maxFeePerGas??c?.estimate?.gasPrice),ae=ns(c?.estimate?.gasLimit);return(0,ce.jsx)("div",{className:"wp-claim-overlay",role:"presentation",onMouseDown:X=>{X.target===X.currentTarget&&!N&&x()},children:(0,ce.jsxs)("section",{className:"wp-claim-sheet",role:"dialog","aria-modal":"true","aria-labelledby":"wp-crossd-withdraw-title","aria-label":"Withdraw position","data-status":t,"data-vaul-no-drag":!0,children:[(0,ce.jsx)("div",{className:"wp-claim-grabber","aria-hidden":!0,children:(0,ce.jsx)("span",{})}),(0,ce.jsxs)("div",{className:"wp-claim-content wp-withdraw-content",children:[t==="success"&&l?(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)("span",{className:"wp-claim-icon wp-claim-icon--success","aria-hidden":!0,children:(0,ce.jsx)(ss,{})}),(0,ce.jsxs)("div",{className:"wp-claim-copy",children:[(0,ce.jsx)("h3",{id:"wp-crossd-withdraw-title",className:"wp-claim-title",children:"Withdraw Submitted!"}),(0,ce.jsxs)("p",{className:"wp-claim-desc",children:["Your ",ne," position withdrawal has been submitted. Balances will update shortly after the transaction settles."]})]}),(0,ce.jsx)("div",{className:"wp-claim-list","aria-label":"Withdraw transaction",children:(0,ce.jsxs)("div",{className:"wp-claim-list-item",children:[(0,ce.jsx)("span",{children:"Tx Hash"}),(0,ce.jsxs)("button",{type:"button",className:"wp-claim-hash",onClick:y,"aria-label":"Copy transaction hash","data-track":"crossd_withdraw_hash_copy",children:[(0,ce.jsx)("strong",{children:ts(l)}),p?(0,ce.jsx)(is,{}):(0,ce.jsx)(as,{})]})]})})]}):(0,ce.jsxs)(ce.Fragment,{children:[t==="error"&&(0,ce.jsxs)("div",{className:"wp-claim-heading",children:[(0,ce.jsx)("h3",{id:"wp-crossd-withdraw-title",className:"wp-claim-title",children:"Withdraw Failed"}),(0,ce.jsx)("p",{className:"wp-claim-error-message",children:d||"The withdraw request could not be completed."})]}),(0,ce.jsxs)("div",{className:"wp-claim-reward-card","data-fit":ba(L,V??""),"aria-label":`Expected ${L}`,children:[(0,ce.jsx)("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:(0,ce.jsx)("img",{src:le,alt:"",width:28,height:28})}),(0,ce.jsx)("strong",{className:"wp-claim-reward-symbol",children:L}),(0,ce.jsx)("strong",{className:"wp-claim-reward-amount",children:V??"Estimating..."})]}),(0,ce.jsxs)("div",{className:"wp-claim-reward-card","data-fit":ba(G,ee??""),"aria-label":`Expected ${G}`,children:[(0,ce.jsx)("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:(0,ce.jsx)("img",{src:oe,alt:"",width:28,height:28})}),(0,ce.jsx)("strong",{className:"wp-claim-reward-symbol",children:G}),(0,ce.jsx)("strong",{className:"wp-claim-reward-amount",children:ee??"Estimating..."})]}),w&&(0,ce.jsx)("div",{className:"wp-claim-account-card","aria-label":"Withdraw gas fee",children:(0,ce.jsxs)("div",{className:"wp-claim-detail-list",children:[(0,ce.jsxs)("div",{className:"wp-claim-detail-row",children:[(0,ce.jsx)("span",{children:"Est. Tx Fee"}),(0,ce.jsx)("strong",{children:P1(c?.estimate,I,s)})]}),(0,ce.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ce.jsx)("span",{children:"Priority Fee Per Gas"}),(0,ce.jsx)("strong",{children:gd(F,"Gwei",I)})]}),(0,ce.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ce.jsx)("span",{children:"Max Fee Per Gas"}),(0,ce.jsx)("strong",{children:gd(q,"Gwei",I)})]}),(0,ce.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ce.jsx)("span",{children:"Gas Limit"}),(0,ce.jsx)("strong",{children:gd(ae,"",I)})]})]})})]}),(0,ce.jsxs)("div",{className:"wp-claim-actions","data-count":t==="confirm"||t==="error"?2:1,children:[(t==="confirm"||t==="error")&&(0,ce.jsx)("button",{type:"button",className:"wp-claim-secondary","data-track":"crossd_withdraw_cancel",onClick:x,children:t==="error"?"Close":"Cancel"}),(0,ce.jsx)("button",{type:"button",className:"wp-claim-primary","data-track":"crossd_withdraw_confirm",onClick:()=>{if(t==="success"){x();return}N||I||(f?.("confirm_clicked"),R())},disabled:N||I,children:t==="success"?"Done":N?(0,ce.jsx)("span",{className:"wp-claim-button-spinner","aria-label":"Waiting"}):I?(0,ce.jsx)("span",{className:"wp-claim-button-spinner","aria-label":"Estimating"}):t==="error"?"Retry":"Withdraw"})]})]}),(0,ce.jsx)("div",{className:"wp-claim-home-indicator","aria-hidden":!0,children:(0,ce.jsx)("span",{})})]})})}var Lt=_(require("react"),1),lm=require("@tanstack/react-query");var O1="0x0c49ccbe",B1="0xfc6f7865",z1="0x49404b7c",F1="0xdf2ab5bb",U1="0xac9650d8",nm=(1n<<128n)-1n,om=600n,j1=99n,W1=100n;function hd(e){return e*j1/W1}function rm(e,t){return!!e&&!!t&&e.toLowerCase()===t.toLowerCase()}function Sn(e,t){if(e<0n)throw new Error(`${t} must be non-negative`);let n=e.toString(16);if(n.length>64)throw new Error(`${t} exceeds uint256`);return n.padStart(64,"0")}function us(e,t){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`${t} is not a valid address`);return e.toLowerCase().replace(/^0x/,"").padStart(64,"0")}function bd(e){return O1+Sn(e.tokenId,"tokenId")+Sn(e.liquidity,"liquidity")+Sn(e.amount0Min,"amount0Min")+Sn(e.amount1Min,"amount1Min")+Sn(e.deadline,"deadline")}function G1(e){return B1+Sn(e.tokenId,"tokenId")+us(e.recipient,"recipient")+Sn(e.amount0Max,"amount0Max")+Sn(e.amount1Max,"amount1Max")}function H1(e,t){return z1+Sn(e,"amountMinimum")+us(t,"recipient")}function _1(e,t,n){return F1+us(e,"token")+Sn(t,"amountMinimum")+us(n,"recipient")}function Q1(e){if(e.length===0)throw new Error("multicall requires at least one call");let t=e.map(o=>{let a=o.replace(/^0x/,"");if(a.length%2!==0||!/^[0-9a-fA-F]*$/.test(a))throw new Error("multicall element must be valid hex bytes");let i=a.length%64===0?a:a.padEnd(a.length+(64-a.length%64),"0");return Sn(BigInt(a.length/2),"callLength")+i.toLowerCase()}),n=BigInt(e.length)*32n,r=[];for(let o of t)r.push(Sn(n,"callOffset")),n+=BigInt(o.length/2);return U1+Sn(0x20n,"arrayOffset")+Sn(BigInt(e.length),"arrayLength")+r.join("")+t.join("")}function am(e){if(!e||e==="0x")return null;let t=e.replace(/^0x/,"");return t.length<128||!/^[0-9a-fA-F]+$/.test(t)?null:{amount0:BigInt(`0x${t.slice(0,64)}`),amount1:BigInt(`0x${t.slice(64,128)}`)}}function im(e){let t=rm(e.token0,e.wcrossAddress),n=rm(e.token1,e.wcrossAddress),r=t||n,o=[bd({tokenId:e.tokenId,liquidity:e.liquidity,amount0Min:e.amount0Min,amount1Min:e.amount1Min,deadline:e.deadline}),G1({tokenId:e.tokenId,recipient:r?e.positionManagerAddress:e.owner,amount0Max:nm,amount1Max:nm})];return r&&(o.push(H1(0n,e.owner)),o.push(_1(t?e.token1:e.token0,0n,e.owner))),Q1(o)}async function sm(e,t,n){let r;try{r=await ka(e,n)}catch{r=void 0}if(!r)return null;let o=bd({tokenId:t.tokenId,liquidity:t.liquidity,amount0Min:0n,amount1Min:0n,deadline:t.deadline}),a=await Ir(r,t.positionManager,o,n,t.owner);return am(a)}var V1=[1500,3e3,4500,6e3];function q1(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?e:null}function dm(){let{env:e,walletAddress:t,sendTransaction:n,estimateGas:r}=Wt(),o=!!n,a=(0,lm.useQueryClient)(),[i,s]=Lt.useState(!1),[l,d]=Lt.useState(null),[p,w]=Lt.useState("confirm"),[u,h]=Lt.useState(),[x,y]=Lt.useState(""),[f,c]=Lt.useState(!1),[b,g]=Lt.useState(new Set),v=Lt.useRef(void 0),C=Lt.useRef([]),N=Lt.useRef(0);Lt.useEffect(()=>()=>{clearTimeout(v.current),C.current.forEach(clearTimeout)},[]);let I=Lt.useRef(new Set),R=Lt.useCallback((A,j)=>{I.current.has(A)||(I.current.add(A),Je("withdraw",A,{...j,tags:{section:"crossdPool",...j?.tags}}))},[]),S=Lt.useCallback(()=>{let A=()=>Er(a);A(),C.current.forEach(clearTimeout),C.current=V1.map(j=>setTimeout(A,j))},[a]),E=Lt.useCallback(A=>{N.current+=1,d(A),s(!0),w("confirm"),h(void 0),y(""),c(!1),I.current=new Set,R("opened")},[R]),M=Lt.useCallback(()=>{p!=="submitting"&&(N.current+=1,s(!1),d(null),w("confirm"),h(void 0),y(""),c(!1))},[p]),z=Lt.useCallback(async()=>{let A=N.current,j=q1(t),le=l?.position.token_id,oe=l?.position.liquidity,ne=l?.detail.pool?.token0?.address,V=l?.detail.pool?.token1?.address;if(!j||!le||!oe||!ne||!V)return w("error"),y("Position data is incomplete. Please refresh and retry."),null;try{w("estimating"),y("");let ee=BigInt(le),F=BigInt(oe),q=BigInt(Math.floor(Date.now()/1e3))+om,ae=lf[e],X=await sm(e,{owner:j,positionManager:ae,tokenId:ee,liquidity:F,deadline:q});if(N.current!==A)return null;if(!X)return w("error"),y("Failed to estimate withdrawal amounts. Please retry."),null;let me=im({tokenId:ee,liquidity:F,amount0Min:hd(X.amount0),amount1Min:hd(X.amount1),deadline:q,owner:j,positionManagerAddress:ae,token0:ne,token1:V,wcrossAddress:df[e]}),ke={to:ae,value:0n,data:me,chainId:At[e].cross},ze=null;if(r){try{ze=await r({...ke,from:j})}catch{ze=null}if(N.current!==A)return null}return w("confirm"),{tx:ke,estimate:ze,expectedAmount0:X.amount0,expectedAmount1:X.amount1}}catch(ee){return N.current!==A||(w("error"),y(wa(ee,"Failed to prepare withdraw."))),null}},[e,r,l,t]),L=Lt.useCallback(async A=>{if(!n){w("error"),y("Withdraw is not available for this wallet.");return}try{w("submitting"),y(""),R("submitted");let j=await n({...A.tx,gas:A.estimate?.gasLimit&&A.estimate.gasLimit>0n?A.estimate.gasLimit:void 0,maxFeePerGas:A.estimate?.maxFeePerGas&&A.estimate.maxFeePerGas>0n?A.estimate.maxFeePerGas:void 0,maxPriorityFeePerGas:A.estimate?.maxPriorityFeePerGas&&A.estimate.maxPriorityFeePerGas>0n?A.estimate.maxPriorityFeePerGas:void 0});h(j),w("success");let le=l?.position.token_id;le&&g(oe=>{let ne=new Set(oe);return ne.add(le),ne}),R("confirmed"),S()}catch(j){w("error"),y(wa(j,"Failed to request withdraw.")),R("confirmed",{status:"failure",reason:Nn(j)})}},[S,n,l,R]),G=Lt.useCallback(async()=>{if(!(!u||typeof navigator>"u"||!navigator.clipboard))try{await navigator.clipboard.writeText(u),c(!0),clearTimeout(v.current),v.current=setTimeout(()=>c(!1),1400)}catch{c(!1)}},[u]);return{canWithdrawInline:o,isOpen:i,target:l,withdrawnTokenIds:b,status:p,txHash:u,error:x,copied:f,hasEstimator:!!r,openWithdraw:E,closeWithdraw:M,prepareWithdraw:z,confirmWithdraw:L,copyHash:G,trackFunnelOnce:R}}var ht=require("react/jsx-runtime"),Y1="ONEusd Pool",cm="https://contents.crosstoken.io/wallet/token/images/Cross.svg";function um(){let{env:e,walletAddress:t,onOutlink:n}=Wt(),r=Fn(),o=!!t,{positions:a,isLoading:i}=Zf(e,t,o),s=dm(),l=(0,wd.useMemo)(()=>a.filter(R=>!R.token_id||!s.withdrawnTokenIds.has(R.token_id)),[a,s.withdrawnTokenIds]),d=(0,wd.useMemo)(()=>l.map(R=>R.token_id).filter(R=>!!R),[l]),{detailMap:p}=$f(e,d,o&&d.length>0),w=`${sf[e]}/pool`,{getTokenImage:u,getTokenSymbol:h,getNativeToken:x}=fr(e,o),y=u("","ONEUSD",{chainOnly:!0})||`${Un[e]}/crossd.png`,f={chainOnly:!0},c=(R,S)=>{let E=rd(h(R?.address??"",R?.symbol??S,f));return E==="ONE"?x()?.symbol??"?":E??"?"},b=(R,S)=>{let E=R?.symbol??S,M=rd(E);return M==="ONE"?x()?.image||cm:u(R?.address??"",M,f)||R?.logo_url||cm},g=s.target?.detail.pool,v=b(g?.token0,s.target?.position.pool?.token0_symbol),C=b(g?.token1,s.target?.position.pool?.token1_symbol),N=c(g?.token0,s.target?.position.pool?.token0_symbol),I=c(g?.token1,s.target?.position.pool?.token1_symbol);return(0,ht.jsxs)(ht.Fragment,{children:[(0,ht.jsx)(jn,{sectionKey:"crossdPool",title:Y1,icon:y,iconFit:"contain",isEmpty:l.length===0,loading:i,children:l.map(R=>{let S=R.token_id?p.get(R.token_id):void 0,E=`${c(S?.pool?.token0,R.pool?.token0_symbol)}/${c(S?.pool?.token1,R.pool?.token1_symbol)}`,M=R.pool?.fee_tier_percentage,z=b(S?.pool?.token0,R.pool?.token0_symbol),L=b(S?.pool?.token1,R.pool?.token1_symbol),G=lo(new pm.default(R.position_value_usd??"0"),r),A=s.canWithdrawInline&&!!S?.pool?.token0?.address&&!!S?.pool?.token1?.address;return(0,ht.jsxs)("article",{className:"wp-item","data-side":"crossd",children:[(0,ht.jsxs)("div",{className:"wp-item-body",children:[(0,ht.jsxs)("div",{className:"wp-item-line",children:[(0,ht.jsx)("span",{className:"wp-item-label",children:"Pool"}),(0,ht.jsxs)("div",{className:"wp-svc-token",children:[(0,ht.jsxs)("span",{className:"wp-token-stack","aria-hidden":!0,children:[(0,ht.jsx)("img",{className:"wp-svc-token-icon",src:z,alt:""}),(0,ht.jsx)("img",{className:"wp-svc-token-icon",src:L,alt:""})]}),(0,ht.jsx)("span",{children:E}),M&&(0,ht.jsx)("span",{className:"wp-token-subtle",children:M})]})]}),(0,ht.jsxs)("div",{className:"wp-item-line",children:[(0,ht.jsx)("span",{className:"wp-item-label",children:"Position Value"}),(0,ht.jsx)("span",{className:"wp-line-value",children:G})]})]}),(0,ht.jsx)("div",{className:"wp-item-tags",children:A?(0,ht.jsx)("button",{type:"button",className:"wp-tag wp-tag--muted","data-track":"crossd_pool_withdraw_open","data-track-id":E,onClick:()=>{S&&s.openWithdraw({position:R,detail:S})},children:(0,ht.jsx)("span",{className:"wp-tag-label",children:"Withdraw"})}):(0,ht.jsxs)("a",{className:"wp-tag wp-tag--muted",href:w,target:"_blank",rel:"noopener noreferrer","data-track":"crossd_pool_outlink","data-track-id":E,onClick:j=>jt(j,w,{category:"portfolio",origin:"portfolio-crossd-pool",payload:{position:R,detail:S}},n),children:[(0,ht.jsx)("span",{className:"wp-tag-label",children:"Withdraw"}),(0,ht.jsx)(Mn,{size:12,className:"wp-tag-icon"})]})})]},R.token_id)})}),(0,ht.jsx)(tm,{open:s.isOpen,status:s.status,target:s.target,token0Icon:v,token1Icon:C,token0Symbol:N,token1Symbol:I,nativeSymbol:x()?.symbol,txHash:s.txHash,error:s.error,copied:s.copied,hasEstimator:s.hasEstimator,prepareWithdraw:s.prepareWithdraw,confirmWithdraw:s.confirmWithdraw,onClose:s.closeWithdraw,onCopyHash:s.copyHash,trackFunnel:s.trackFunnelOnce})]})}var Ra=["rewards","points","staking","gameSwap","forge","crossdPool"];he(`.wp-fullscreen[data-theme=dark],.wp-embed[data-theme=dark]{--wp-bg: var(--ds-bg-default, #202530);--wp-header-bg: var(--ds-surface-default, #252b39);--wp-card: var(--ds-surface-medium, #252b39);--wp-control: #292f40;--wp-border: var(--ds-border-default, #292f40);--wp-panel-border: var(--ds-border-medium, rgba(255, 255, 255, .18));--wp-panel-shadow: 0px 4px 30px -1px rgba(0, 0, 0, .28);--wp-text: var(--ds-content-highest, #ffffff);--wp-text-60: var(--ds-content-high, rgba(255, 255, 255, .85));--wp-text-40: var(--ds-content-medium, rgba(255, 255, 255, .65));--wp-text-30: var(--ds-content-low, rgba(255, 255, 255, .4));--wp-chrome-text: #ffffff;--wp-tooltip-bg: #151a23;--wp-tooltip-text: #ffffff;--wp-mint: var(--ds-accent-primary-high, #f0640d);--wp-green: var(--ds-system-green-high, #00a0a2);--wp-accent-soft: var(--ds-accent-primary-lowest, #362519);--wp-red: var(--ds-system-red-default, #e70077);--wp-blue: #0488fc;--wp-purple: #7346f3;--wp-orange: #ff9d00;--wp-claim-primary: #ed0a72;--wp-claim-primary-text: #ffffff;--wp-claim-secondary-bg: var(--wp-control);--wp-claim-success: #00d4aa;--wp-claim-success-soft: rgba(0, 212, 170, .18);--wp-claim-error: #ff3aa3;--wp-claim-error-soft: rgba(255, 58, 163, .16)}.wp-fullscreen[data-theme=light],.wp-embed[data-theme=light]{--wp-bg: var(--ds-bg-dim, #f5f7fa);--wp-header-bg: var(--ds-surface-default, #ffffff);--wp-card: var(--ds-surface-default, #ffffff);--wp-control: var(--ds-surface-medium, #f5f7fa);--wp-border: var(--ds-border-default, rgba(0, 0, 0, .07));--wp-panel-border: var(--ds-border-medium, rgba(0, 0, 0, .18));--wp-panel-shadow: 0px 4px 30px -1px rgba(0, 0, 0, .15);--wp-text: var(--ds-content-highest, #000000);--wp-text-60: var(--ds-content-high, rgba(0, 0, 0, .85));--wp-text-40: var(--ds-content-medium, rgba(0, 0, 0, .65));--wp-text-30: var(--ds-content-low, rgba(0, 0, 0, .4));--wp-chrome-text: var(--ds-content-high, rgba(0, 0, 0, .85));--wp-card-shadow: none;--wp-tooltip-bg: #192023;--wp-tooltip-text: #ffffff;--wp-mint: var(--ds-accent-primary-high, #f0640d);--wp-green: var(--ds-system-green-high, #00a0a2);--wp-accent-soft: var(--ds-accent-primary-low, #fff5ee);--wp-red: var(--ds-system-red-default, #e70077);--wp-blue: #0488fc;--wp-purple: #7346f3;--wp-orange: #ff9d00;--wp-claim-primary: #ed0a72;--wp-claim-primary-text: #ffffff;--wp-claim-secondary-bg: #ffffff;--wp-claim-success: #019d92;--wp-claim-success-soft: rgba(1, 157, 146, .15);--wp-claim-error: #e70077;--wp-claim-error-soft: rgba(231, 0, 119, .12)}.wp-fullscreen{position:fixed!important;inset:0!important;width:100%!important;height:100dvh!important;max-height:100dvh!important;z-index:50;background:var(--wp-bg);display:flex;flex-direction:column;overflow:hidden;font-family:inherit;font-feature-settings:"calt" 0,"lnum" 1,"pnum" 1;box-sizing:border-box;-webkit-font-smoothing:antialiased;color:var(--wp-chrome-text)}.wp-embed{width:100%;height:100%;min-height:0;background:var(--wp-bg);display:flex;flex-direction:column;overflow:hidden;position:relative;font-family:inherit;font-feature-settings:"calt" 0,"lnum" 1,"pnum" 1;box-sizing:border-box;-webkit-font-smoothing:antialiased;color:var(--wp-chrome-text)}.wp-overlay{position:fixed;inset:0;z-index:49;background:#0009}.wp-header{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:73px;padding:24px;position:relative;border-bottom:1px solid var(--wp-border);background:var(--wp-header-bg);color:var(--wp-chrome-text);flex-shrink:0;box-sizing:border-box}.wp-fullscreen .wp-header{height:60px;min-height:60px;padding:11px 20px;border-bottom:none;background:transparent}.wp-fullscreen .wp-header-btn{width:22px;height:22px;color:var(--wp-chrome-text)}.wp-fullscreen .wp-header-btn:hover{color:var(--wp-chrome-text)}.wp-header-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--ds-content-low, rgba(0, 0, 0, .4));flex-shrink:0;transition:color .15s ease}.wp-header-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wp-header-edge{display:flex;align-items:center;width:24px;min-width:24px}.wp-header-edge--right{justify-content:flex-end}.wp-header-edge--right .wp-header-btn{position:absolute;top:24px;right:24px}.wp-header-spacer{display:block;width:24px;height:24px}.wp-header-avatar{width:38px;height:38px;flex-shrink:0;border-radius:50%;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;background:var(--wp-header-avatar-bg)}.wp-header-avatar-img{width:30px;height:30px;object-fit:cover;display:block}.wp-fullscreen[data-theme=dark] .wp-header-avatar,.wp-embed[data-theme=dark] .wp-header-avatar{--wp-header-avatar-bg: hsl(221.3 24.6% 25.5%)}.wp-fullscreen[data-theme=light] .wp-header-avatar,.wp-embed[data-theme=light] .wp-header-avatar{--wp-header-avatar-bg: rgba(18, 18, 18, .1)}.wp-refresh-btn{position:relative}.wp-refresh-badge{position:absolute;top:-6px;right:-8px;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--wp-mint);color:#fff;font-size:10px;font-weight:600;line-height:16px;text-align:center}.wp-spin-once{animation:wp-spin-once .6s ease-in-out}@keyframes wp-spin-once{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.wp-header-title{flex:1;font-family:inherit;font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;text-align:center;color:var(--ds-content-highest, #000000);margin:0}.wp-header-account{flex:1;display:flex;align-items:center;gap:12px;min-width:0}.wp-header-account-meta{display:flex;flex-direction:column;justify-content:center;min-width:0;gap:2px}.wp-header-wallet-name{min-width:0;font-family:inherit;font-size:15px;font-weight:600;line-height:1.4;letter-spacing:0;color:var(--wp-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-header-address-btn{display:inline-flex;align-items:center;gap:4px;align-self:flex-start;max-width:100%;padding:0;border:0;background:transparent;cursor:pointer;font:inherit}.wp-header-address{min-width:0;font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;color:var(--wp-text-40);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-header-address-copy{display:inline-flex;align-items:center;flex-shrink:0;color:var(--wp-text-40);transition:color .15s ease}.wp-header-address-btn:hover .wp-header-address-copy{color:var(--wp-text-60)}.wp-header-address-copy[data-copied=true]{color:var(--wp-mint)}.wp-top{flex-shrink:0;padding:0 16px 16px;display:flex;flex-direction:column;gap:16px}.wp-identity{display:flex;flex-direction:column;gap:8px}.wp-address{display:inline-flex;align-items:center;gap:8px}.wp-address-label{font-size:12px;font-weight:400;line-height:1.4;color:var(--wp-text-40)}.wp-address-chevron{display:inline-flex;align-items:center;color:var(--wp-text-40)}.wp-total{font-size:28px;font-weight:600;line-height:1.3;color:var(--wp-text);margin:0}.wp-asset{display:flex;flex-direction:column;gap:8px}.wp-asset-head{display:flex;align-items:center;gap:4px}.wp-asset-head-label{font-size:12px;font-weight:400;line-height:1.4;color:var(--wp-text-40)}.wp-asset-head-icon{display:inline-flex;color:var(--wp-text-40)}.wp-bar{display:flex;height:20px;border-radius:4px;overflow:hidden}.wp-bar-seg{display:flex;align-items:center;justify-content:center;min-width:8px}.wp-bar-seg-pct{font-size:10px;font-weight:400;line-height:1.3;color:#fff;white-space:nowrap}.wp-legend{display:flex;align-items:center;justify-content:center;gap:16px;flex-wrap:wrap}.wp-legend-item{display:flex;align-items:center;gap:4px}.wp-legend-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.wp-legend-label{font-size:12px;font-weight:400;line-height:1.4;color:var(--wp-text-40)}.wp-tabs{flex-shrink:0;padding:8px 16px}.wp-tabs-inner{display:flex;align-items:center;padding:0 2px}.wp-tabs-list{display:flex;gap:20px;flex:1}.wp-tab{display:flex;flex-direction:column;align-items:center;justify-content:space-between;height:44px;padding-top:12px;background:transparent;border:none;cursor:pointer}.wp-tab-text{font-size:14px;font-weight:600;line-height:1.4;color:var(--wp-text-30);white-space:nowrap}.wp-tab[data-active=true] .wp-tab-text{color:var(--wp-mint)}.wp-tab-bar{width:20px;height:4px;border-radius:2px;background:var(--wp-mint);opacity:0}.wp-tab[data-active=true] .wp-tab-bar{opacity:1}.wp-tabs-filter-wrap{position:relative;display:flex;align-items:center;width:44px;height:44px;flex-shrink:0}.wp-tabs-filter-grad{position:absolute;inset:0;background:linear-gradient(to left,var(--wp-bg) 74%,transparent);pointer-events:none}.wp-tabs-filter{position:relative;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--wp-text-40)}.wp-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--wp-border) transparent}.wp-body::-webkit-scrollbar{width:4px}.wp-body::-webkit-scrollbar-track{background:transparent}.wp-body::-webkit-scrollbar-thumb{background:var(--wp-border);border-radius:4px}.wp-body-inner{padding:16px 16px 32px;display:flex;flex-direction:column;gap:32px}.wp-fullscreen .wp-body-inner{padding-top:8px;gap:24px}.wp-summary-card{display:flex;flex-direction:column;gap:8px;width:100%;padding:0;border-radius:0;background:transparent;box-shadow:none;box-sizing:border-box}.wp-summary-head{position:relative;display:flex;align-items:center;justify-content:flex-start;gap:4px}.wp-summary-label{font-size:14px;font-weight:400;line-height:1.5;letter-spacing:0;color:var(--wp-text-40);white-space:nowrap}.wp-address{display:inline-flex;align-items:center;gap:8px;min-width:0}.wp-address-avatar{width:16px;height:16px;border-radius:50%;flex-shrink:0;background:radial-gradient(circle at 68% 34%,#ff78d1 0 18%,transparent 19%),radial-gradient(circle at 34% 66%,#00d4aa 0 20%,transparent 21%),linear-gradient(135deg,#7346f3,#0488fc)}.wp-address-label{font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;color:var(--wp-text-40);white-space:nowrap}.wp-address-chevron{display:inline-flex;align-items:center;color:var(--wp-text-40);flex-shrink:0}.wp-summary-badge{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;border-radius:999px;background:#019d921a;color:var(--wp-mint);font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;white-space:nowrap}.wp-summary-estimate{position:relative;display:inline-flex;align-items:center;gap:6px;flex-shrink:0}.wp-estimate-info{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--wp-text-40);cursor:help}.wp-estimate-tooltip{position:absolute;top:calc(100% + 8px);left:0;right:auto;z-index:3;display:flex;flex-direction:column;gap:8px;width:min(280px,calc(100vw - 48px));padding:12px;border-radius:8px;background:var(--wp-tooltip-bg);box-shadow:0 12px 32px #0000003d;color:var(--wp-tooltip-text);font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;text-align:left;white-space:normal;opacity:0;pointer-events:none;transform:translateY(-4px);visibility:hidden;transition:opacity .15s ease,transform .15s ease,visibility .15s ease}.wp-estimate-tooltip-title{display:block;font-size:12px;font-weight:600;line-height:1.3}.wp-estimate-tooltip-group{display:flex;flex-direction:column;gap:4px}.wp-estimate-tooltip-item{display:block;color:#ffffffc7}.wp-estimate-tooltip-item:before{content:"- "}.wp-estimate-info:hover .wp-estimate-tooltip,.wp-estimate-info:focus .wp-estimate-tooltip,.wp-estimate-info:focus-visible .wp-estimate-tooltip{opacity:1;transform:translateY(0);visibility:visible}.wp-total{font-family:var( --wp-total-font-family, Sora, Inter, system-ui, -apple-system, sans-serif );font-size:36px;font-weight:600;line-height:1.25;letter-spacing:0;color:var(--wp-text);margin:0}.wp-svc-card{display:flex;flex-direction:column;gap:12px;width:100%}.wp-svc-card-head{display:flex;align-items:center;gap:6px}.wp-svc-card-icon{width:24px;height:24px;border-radius:4px;flex-shrink:0;object-fit:cover}.wp-svc-card-title{font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wp-svc-items{display:flex;flex-direction:column;gap:8px;width:100%;padding:0;border-radius:0;background:transparent;box-shadow:none;box-sizing:border-box}.wp-item{position:relative;display:flex;flex-direction:column;gap:20px;width:100%;padding:12px;border-radius:12px;background:var(--wp-card);box-shadow:var(--wp-card-shadow, none);box-sizing:border-box;color:inherit;text-decoration:none;cursor:pointer;outline:none;transition:opacity .15s ease}.wp-item+.wp-item{padding-top:12px;border-top:0}.wp-item:hover{opacity:.88}.wp-item-body{display:flex;flex-direction:column;gap:12px;min-width:0}.wp-order-head{display:flex;align-items:center;width:100%}.wp-item-line{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:21px;min-width:0}.wp-item-label{flex-shrink:0;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-30);white-space:nowrap}.wp-line-value,.wp-order-side{min-width:0;overflow:hidden;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-order-side--buy{color:var(--wp-mint)}.wp-order-side--sell{color:var(--wp-red)}.wp-svc-token{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0;min-height:21px}.wp-svc-token>span{font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-svc-token-icon{width:16px;height:16px;border-radius:50%;flex-shrink:0;object-fit:cover}.wp-item[data-side=reward] .wp-svc-token-icon{border-radius:0;object-fit:contain}.wp-svc-token--amount{align-items:flex-start}.wp-svc-token--amount>.wp-svc-token-icon{margin-top:2.5px}.wp-token-stack{display:inline-flex;align-items:center;justify-content:flex-end;width:29px;min-width:29px;overflow:visible}.wp-token-stack .wp-svc-token-icon+.wp-svc-token-icon{margin-left:-3.5px}.wp-token-subtle,.wp-item-usd{color:var(--wp-text-30)!important}.wp-svc-amount{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:1px;min-width:0}.wp-svc-amount-main{font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.wp-svc-amount .wp-item-usd{font-size:12px;font-weight:500;line-height:1.35}.wp-order-token{display:flex;align-items:center;gap:8px;min-width:0}.wp-order-token .wp-svc-token-icon{width:32px;height:32px}.wp-order-token-meta{display:flex;min-width:0;flex-direction:column;justify-content:center}.wp-order-token-symbol{overflow:hidden;color:var(--wp-text-60);font-size:14px;font-weight:500;line-height:1.5;text-overflow:ellipsis;white-space:nowrap}.wp-order-token-pair{overflow:hidden;color:var(--wp-text-30);font-size:12px;font-weight:500;line-height:1.5;text-overflow:ellipsis;white-space:nowrap}.wp-item-tags{display:flex;align-items:stretch;gap:8px;width:100%}.wp-tag{appearance:none;display:inline-flex;flex:1 1 0;align-items:center;justify-content:center;gap:0;min-width:0;min-height:33px;padding:6px 10px;border-radius:6px;border:0;background:var(--wp-control);font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:0;color:var(--wp-text-40);text-align:center;text-decoration:none;white-space:nowrap;box-sizing:border-box;transition:background-color .15s ease,border-color .15s ease,color .15s ease,transform .15s ease}a.wp-tag,button.wp-tag{cursor:pointer}.wp-tag:hover{background:var(--wp-control);transform:none}.wp-tag:focus-visible{outline:2px solid var(--wp-mint);outline-offset:2px}.wp-tag[aria-disabled=true],.wp-tag[data-disabled]{cursor:default;opacity:.48;pointer-events:none}.wp-tag-label{display:inline-flex;align-items:center}.wp-tag-icon{display:none}.wp-tag:hover .wp-tag-icon{transform:none}.wp-tag--mint{color:var(--wp-mint);background:var(--wp-accent-soft)}.wp-tag--mint:hover{background:var(--wp-accent-soft)}.wp-tag--muted{color:var(--wp-text-40)}.wp-body-inner[data-empty]{min-height:100%;box-sizing:border-box;justify-content:center}.wp-portfolio-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:280px;padding:32px 24px;text-align:center}.wp-portfolio-empty-icon{display:flex;align-items:center;justify-content:center;width:56px;height:56px;margin-bottom:6px;border-radius:50%;background:var(--wp-card);box-shadow:var(--wp-card-shadow, none);color:var(--wp-text-30)}.wp-portfolio-empty-title{margin:0;font-size:15px;font-weight:600;line-height:1.3;color:var(--wp-text-60)}.wp-portfolio-empty-desc{margin:0;font-size:13px;font-weight:400;line-height:1.4;color:var(--wp-text-30)}.wp-portfolio-loading{display:flex;align-items:center;justify-content:center;min-height:280px;padding:32px 24px}.wp-portfolio-spinner{width:22px;height:22px;border:2px solid var(--wp-border);border-top-color:var(--wp-mint);border-radius:50%;animation:wp-claim-spin .8s linear infinite}.wp-claim-overlay{position:absolute;inset:0;z-index:8;display:flex;align-items:flex-end;justify-content:center;background:#00000094;box-sizing:border-box}.wp-claim-sheet{display:flex;flex-direction:column;width:100%;max-height:calc(100% - 24px);overflow:hidden;border-radius:24px 24px 0 0;background:var(--wp-bg);color:var(--wp-text);box-shadow:0 -18px 48px #00000042;animation:wp-claim-slide-up .22s ease-out}@keyframes wp-claim-slide-up{0%{transform:translateY(18px);opacity:0}to{transform:translateY(0);opacity:1}}.wi-popover-content .wp-claim-sheet{min-height:min(600px,calc(100% - 24px))}.wi-popover-content .wp-claim-content{flex:1 1 auto}.wi-popover-content .wp-claim-actions{margin-top:auto}.wp-claim-grabber{display:flex;align-items:flex-start;justify-content:center;height:38px;min-height:38px;padding-top:12px;box-sizing:border-box}.wp-claim-grabber span{display:block;width:52px;height:5px;border-radius:999px;background:var(--wp-control)}.wp-claim-content{display:flex;flex-direction:column;align-items:center;gap:16px;width:100%;padding:20px;box-sizing:border-box}.wp-claim-icon{display:inline-flex;align-items:center;justify-content:center;width:64px;height:64px;border-radius:50%;flex-shrink:0}.wp-claim-icon--success{background:var(--wp-claim-success-soft);color:var(--wp-claim-success)}.wp-claim-icon--pending{background:#9b8cef29;color:var(--wp-claim-primary)}.wp-claim-icon--error{background:var(--wp-claim-error-soft);color:var(--wp-claim-error);font-size:30px;font-weight:600;line-height:1}.wp-claim-icon--token{background:#00d4aa29}.wp-claim-icon--token img{width:48px;height:48px;border-radius:50%;object-fit:cover}.wp-claim-icon--token span{display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:50%;background:var(--wp-mint);color:#101820;font-size:18px;font-weight:600}.wp-claim-spinner{width:36px;height:36px;border-radius:50%;border:3px solid rgba(155,140,239,.28);border-top-color:var(--wp-claim-primary);animation:wp-claim-spin .8s linear infinite}@keyframes wp-claim-spin{to{transform:rotate(360deg)}}.wp-claim-copy{display:flex;flex-direction:column;align-items:center;gap:16px;width:100%;text-align:center}.wp-claim-title{margin:0;font-size:20px;font-weight:600;line-height:1.3;letter-spacing:0;color:var(--wp-text)}.wp-claim-desc{max-width:335px;margin:0;font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0;color:var(--wp-text-40)}.wp-claim-heading{display:flex;flex-direction:column;align-items:flex-start;gap:8px;width:100%}.wp-claim-error-message{margin:0;color:var(--wp-claim-error);font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0}.wp-claim-reward-card{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;min-height:60px;padding:16px 8px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-claim-reward-token{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;flex-shrink:0;overflow:hidden;background:var(--wp-control)}.wp-claim-reward-token img{width:28px;height:28px;object-fit:cover}.wp-claim-reward-token span{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:var(--wp-mint);color:#101820;font-size:13px;font-weight:600;line-height:1}.wp-claim-reward-symbol{flex:1 1 auto;min-width:0;overflow:hidden;color:var(--wp-text);font-size:18px;font-weight:600;line-height:1.3;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.wp-claim-reward-amount{flex-shrink:0;color:var(--wp-text);font-size:20px;font-weight:600;line-height:1.3;letter-spacing:0;white-space:nowrap}.wp-claim-reward-card[data-fit=sm] .wp-claim-reward-symbol{font-size:14px}.wp-claim-reward-card[data-fit=sm] .wp-claim-reward-amount{font-size:16px}.wp-claim-reward-card[data-fit=xs] .wp-claim-reward-symbol{font-size:12px}.wp-claim-reward-card[data-fit=xs] .wp-claim-reward-amount{font-size:13px}.wp-claim-account-card{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-claim-account-row{display:flex;align-items:center;justify-content:space-between;gap:4px;width:100%;min-height:40px}.wp-claim-account-row>span{flex-shrink:0;color:var(--wp-text-40);font-size:14px;font-weight:400;line-height:1.3;letter-spacing:0;white-space:nowrap}.wp-claim-account{display:flex;align-items:center;gap:8px;min-width:0}.wp-claim-account strong{overflow:hidden;color:var(--wp-text);font-size:15px;font-weight:600;line-height:1.6;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.wp-claim-account-avatar{width:32px;height:32px;border-radius:50%;flex-shrink:0;background:radial-gradient(circle at 30% 28%,#d87aff 0 12%,transparent 13%),radial-gradient(circle at 68% 28%,#f0a1ff 0 12%,transparent 13%),radial-gradient(circle at 32% 70%,#b561e7 0 13%,transparent 14%),radial-gradient(circle at 70% 70%,#d4a2ff 0 13%,transparent 14%),radial-gradient(circle at 50% 50%,#8c4fc4 0 18%,transparent 19%),#4a315f;box-shadow:inset 0 0 0 3.37px var(--wp-control)}.wp-claim-divider{display:block;width:100%;height:1px;background:var(--wp-border)}.wp-claim-detail-list{display:flex;flex-direction:column;gap:8px;width:100%}.wp-claim-detail-row{display:flex;align-items:center;justify-content:space-between;gap:20px;width:100%;min-height:20px}.wp-claim-detail-row>span{min-width:0;color:var(--wp-text-40);font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0;white-space:nowrap}.wp-claim-detail-row--sub>span:before{content:"";display:inline-block;width:3px;height:3px;margin:0 8px 3px;background:currentColor}.wp-claim-detail-row strong{min-width:0;overflow:hidden;color:var(--wp-text);font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0;text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-claim-list{display:flex;flex-direction:column;gap:8px;width:100%;padding-bottom:8px}.wp-claim-list-item{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:56px;padding:8px 16px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-claim-list-item>span{flex-shrink:0;font-size:14px;font-weight:400;line-height:1.3;color:var(--wp-text-40);white-space:nowrap}.wp-claim-list-item strong{display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0;overflow:hidden;color:var(--wp-text);font-size:14px;font-weight:400;line-height:1.3;text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-claim-list-item img{width:16px;height:16px;border-radius:50%;flex-shrink:0}.wp-claim-hash{appearance:none;display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0;padding:0;border:none;background:transparent;color:var(--wp-text);cursor:pointer;font:inherit}.wp-claim-hash svg{flex-shrink:0;color:var(--wp-text-60)}.wp-claim-gas-card{display:flex;flex-direction:column;gap:4px;width:100%;padding:14px 16px;border-radius:8px;border:1px solid var(--wp-border);background:var(--wp-card);box-sizing:border-box}.wp-claim-gas-row{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:28px}.wp-claim-gas-row>span{min-width:0;font-size:12px;font-weight:400;line-height:1.3;color:var(--wp-text-40)}.wp-claim-gas-row strong{min-width:0;overflow:hidden;color:var(--wp-text);font-size:12px;font-weight:400;line-height:1.3;text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-claim-gas-row--primary{min-height:32px}.wp-claim-gas-row--primary>span,.wp-claim-gas-row--primary strong{font-size:14px;color:var(--wp-text)}.wp-claim-fee-label{position:relative;display:inline-flex;align-items:center;text-decoration:underline dotted;text-underline-offset:3px;cursor:help;overflow:visible!important}.wp-claim-fee-tooltip{position:absolute;left:0;bottom:calc(100% + 8px);z-index:2;width:min(260px,calc(100vw - 64px));padding:10px 12px;border-radius:8px;background:var(--wp-tooltip-bg);color:var(--wp-tooltip-text);box-shadow:0 12px 32px #0000003d;font-size:11px;font-weight:400;line-height:1.4;text-align:left;text-decoration:none;white-space:normal;opacity:0;pointer-events:none;transform:translateY(4px);visibility:hidden;transition:opacity .15s ease,transform .15s ease,visibility .15s ease}.wp-claim-fee-label:hover .wp-claim-fee-tooltip,.wp-claim-fee-label:focus .wp-claim-fee-tooltip,.wp-claim-fee-label:focus-visible .wp-claim-fee-tooltip{opacity:1;transform:translateY(0);visibility:visible}.wp-claim-actions{display:flex;align-items:center;gap:8px;width:100%}.wp-claim-primary,.wp-claim-secondary{appearance:none;display:inline-flex;align-items:center;justify-content:center;width:100%;min-width:0;height:52px;padding:0 24px;border:none;border-radius:40px;font-family:inherit;font-size:15px;font-weight:600;line-height:1.3;letter-spacing:0;white-space:nowrap;cursor:pointer}.wp-claim-primary{background:var(--wp-claim-primary);color:var(--wp-claim-primary-text)}.wp-claim-primary:disabled{cursor:default;opacity:.72}.wp-claim-secondary{background:var(--wp-claim-secondary-bg, var(--wp-control));color:var(--wp-claim-primary)}.wp-claim-actions[data-count="2"] .wp-claim-primary{flex:1 1 0}.wp-claim-actions[data-count="2"] .wp-claim-secondary{flex:0 0 120px}.wp-claim-button-spinner{width:16px;height:16px;border-radius:50%;border:2px solid rgba(32,37,48,.28);border-top-color:var(--wp-claim-primary-text);animation:wp-claim-spin .8s linear infinite}.wp-claim-home-indicator{display:flex;align-items:flex-end;justify-content:center;height:34px;min-height:34px;padding-bottom:8px;box-sizing:border-box}.wp-claim-home-indicator span{display:block;width:134px;height:5px;border-radius:16px;background:var(--wp-text-40)}@media(max-width:359px){.wp-header{gap:12px;padding:0 12px}.wp-total{font-size:24px}.wp-body-inner{padding:0 12px 128px;gap:20px}.wp-claim-content{padding:18px 14px}.wp-item-line{gap:10px}.wp-svc-token>span{max-width:168px}}@media(max-width:360px){.wp-item-label-sub{display:none}}.wp-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.wi-drawer-content .wp-header,.wi-portfolio-body .wp-header{padding:16px}.wi-drawer-content .wp-header-edge--right .wp-header-btn,.wi-portfolio-body .wp-header-edge--right .wp-header-btn{top:16px;right:16px}.wp-withdraw-amount-card{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-withdraw-amount-row{display:flex;align-items:center;gap:8px;width:100%}.wp-withdraw-input{flex:1 1 auto;min-width:0;padding:0;border:none;background:transparent;color:var(--wp-text);font-family:inherit;font-size:24px;font-weight:600;line-height:1.3;letter-spacing:0;text-align:left;outline:none}.wp-withdraw-input::placeholder{color:var(--wp-text-30)}.wp-withdraw-input[aria-invalid=true]{color:var(--wp-claim-error)}.wp-withdraw-input-symbol{flex-shrink:0;color:var(--wp-text-40);font-size:15px;font-weight:600;line-height:1.3}.wp-withdraw-quick-row{display:flex;align-items:center;gap:8px;width:100%}.wp-withdraw-quick{appearance:none;flex:1 1 0;min-width:0;height:32px;padding:0 10px;border:1px solid var(--wp-border);border-radius:999px;background:transparent;color:var(--wp-text-60);font-family:inherit;font-size:13px;font-weight:600;line-height:1;white-space:nowrap;cursor:pointer}.wp-withdraw-quick:hover:not(:disabled){border-color:var(--wp-claim-primary);color:var(--wp-claim-primary)}.wp-withdraw-quick:disabled{cursor:default;opacity:.5}.wp-withdraw-content{overflow-y:auto}.wp-withdraw-token-list{display:flex;flex-direction:column;gap:8px;width:100%;max-height:216px;overflow-y:auto}.wp-withdraw-token{appearance:none;display:flex;align-items:center;gap:10px;width:100%;min-height:52px;padding:10px 12px;border:1px solid var(--wp-border);border-radius:8px;background:var(--wp-card);color:var(--wp-text);font-family:inherit;text-align:left;cursor:pointer;box-sizing:border-box}.wp-withdraw-token[data-selected]{border-color:var(--wp-claim-primary);box-shadow:inset 0 0 0 1px var(--wp-claim-primary)}.wp-withdraw-token:disabled{cursor:default;opacity:.6}.wp-withdraw-token-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;flex-shrink:0;overflow:hidden;background:var(--wp-control)}.wp-withdraw-token-icon img{width:28px;height:28px;object-fit:cover}.wp-withdraw-token-icon span{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:var(--wp-mint);color:#101820;font-size:13px;font-weight:600;line-height:1}.wp-withdraw-token-symbol{flex:1 1 auto;min-width:0;overflow:hidden;font-size:15px;font-weight:600;line-height:1.3;text-overflow:ellipsis;white-space:nowrap}.wp-withdraw-token-amount{flex-shrink:0;color:var(--wp-text-40);font-size:13px;font-weight:500;line-height:1.3;white-space:nowrap}
9
- `);var Te=require("react/jsx-runtime"),yd=15;function po({env:e,theme:t="light",walletAddress:n,walletName:r,onBack:o,showHeader:a=!0,autoRefresh:i=!0,variant:s="embed",className:l,onOutlink:d,lpBalanceReader:p,stakingRewardsReader:w,sendTransaction:u,estimateGas:h,conversionRatio:x,currencySymbol:y,sections:f}){let c=it(e),b=_t.useCallback(ge=>!f||f.includes(ge),[f]),g=!!n,v=(0,fm.useQueryClient)(),[C,N]=_t.useState({}),I=_t.useCallback((ge,Ne)=>{N(Ce=>{let tt=Ce[ge];return tt&&tt.loading===Ne.loading&&tt.empty===Ne.empty?Ce:{...Ce,[ge]:Ne}})},[]),R=_t.useCallback(ge=>{N(Ne=>{if(!(ge in Ne))return Ne;let Ce={...Ne};return delete Ce[ge],Ce})},[]),S=_t.useMemo(()=>({report:I,unregister:R}),[I,R]),[E,M]=_t.useState(yd),[z,L]=_t.useState(!1),[G,A]=_t.useState(!1),j=_t.useRef(void 0),le=_t.useCallback(()=>{Er(v)},[v]),oe=_t.useCallback(()=>{le(),L(!0),setTimeout(()=>L(!1),600),M(yd)},[le]);_t.useEffect(()=>{if(!g||!i)return;let ge=setInterval(()=>{M(Ne=>Ne<=1?(oe(),yd):Ne-1)},1e3);return()=>clearInterval(ge)},[g,i,oe]);let ne=_t.useCallback(()=>{o?.()},[o]),V=g?Nr(c,n,{size:64}):void 0,ee=_t.useCallback(async()=>{if(!(G||!n))try{await navigator.clipboard.writeText(n),A(!0),clearTimeout(j.current),j.current=setTimeout(()=>A(!1),2e3)}catch{}},[n,G]);_t.useEffect(()=>()=>clearTimeout(j.current),[]);let F=_t.useMemo(()=>({env:c,theme:t,open:!0,walletAddress:n,close:ne,onOutlink:d,lpBalanceReader:p,stakingRewardsReader:w,sendTransaction:u,estimateGas:h,conversionRatio:x,currencySymbol:y}),[c,t,n,ne,d,p,w,u,h,x,y]),q=Ra.filter(b),ae=q.length>0&&q.every(ge=>{let Ne=C[ge];return!!Ne&&!Ne.loading}),X=ae&&q.every(ge=>C[ge]?.empty),me=q.some(ge=>{let Ne=C[ge];return!!Ne&&!Ne.empty}),ke=q.length>0&&!ae&&!me,ze=(0,Te.jsxs)(Te.Fragment,{children:[a&&(0,Te.jsxs)("div",{className:"wp-header",children:[(0,Te.jsxs)("div",{className:"wp-header-account",children:[o&&(0,Te.jsx)("button",{type:"button",className:"wp-header-btn","aria-label":"Back","data-track":"back",onClick:o,children:(0,Te.jsx)(Ku,{})}),(0,Te.jsx)("span",{className:"wp-header-avatar","aria-hidden":!0,children:V&&(0,Te.jsx)("img",{src:V,alt:"",className:"wp-header-avatar-img",draggable:!1})}),(r||n)&&(0,Te.jsxs)("div",{className:"wp-header-account-meta",children:[r&&(0,Te.jsx)("span",{className:"wp-header-wallet-name",title:r,children:r}),n&&(0,Te.jsxs)("button",{type:"button",className:"wp-header-address-btn",onClick:ee,"aria-label":"Copy wallet address","data-track":"address_copy",children:[(0,Te.jsx)("span",{className:"wp-header-address",children:es(n)}),(0,Te.jsx)("span",{className:"wp-header-address-copy","data-copied":G,children:G?(0,Te.jsx)(Yn,{size:14}):(0,Te.jsx)(kr,{size:14})})]})]})]}),(0,Te.jsxs)("button",{type:"button",className:"wp-header-btn wp-refresh-btn","aria-label":"Refresh portfolio","data-track":"refresh",onClick:oe,children:[(0,Te.jsx)(Zu,{className:z?"wp-spin-once":void 0}),g&&(0,Te.jsx)("span",{className:"wp-refresh-badge",children:E})]})]}),(0,Te.jsx)("div",{className:"wp-body",children:(0,Te.jsxs)("div",{className:"wp-body-inner","data-empty":X||void 0,children:[b("rewards")&&(0,Te.jsx)(uf,{}),b("points")&&(0,Te.jsx)(Cf,{}),b("staking")&&(0,Te.jsx)(Df,{}),b("gameSwap")&&(0,Te.jsx)(jf,{}),b("forge")&&(0,Te.jsx)(Yf,{}),b("crossdPool")&&(0,Te.jsx)(um,{}),ke&&(0,Te.jsx)("div",{className:"wp-portfolio-loading",role:"status","aria-label":"Loading portfolio",children:(0,Te.jsx)("span",{className:"wp-portfolio-spinner","aria-hidden":!0})}),X&&(0,Te.jsxs)("div",{className:"wp-portfolio-empty",role:"status",children:[(0,Te.jsx)("span",{className:"wp-portfolio-empty-icon","aria-hidden":!0,children:(0,Te.jsxs)("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Te.jsx)("path",{d:"M20 7H5a2 2 0 0 1-2-2 2 2 0 0 1 2-2h13v4"}),(0,Te.jsx)("path",{d:"M3 5v13a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1"}),(0,Te.jsx)("circle",{cx:"16.5",cy:"13.5",r:"1",fill:"currentColor",stroke:"none"})]})}),(0,Te.jsx)("p",{className:"wp-portfolio-empty-title",children:"No assets yet"}),(0,Te.jsx)("p",{className:"wp-portfolio-empty-desc",children:"Assets you hold across ONE services will appear here."})]})]})})]});return(0,Te.jsx)(xa.Provider,{value:F,children:(0,Te.jsx)(id.Provider,{value:S,children:(0,Te.jsx)(Le,{feature:"wallet_portfolio",children:s==="none"?ze:(0,Te.jsx)("div",{className:Ee(s==="fullscreen"?"wp-fullscreen":"wp-embed",l),"data-theme":t,children:ze})})})})}var uo=require("react/jsx-runtime");function mm({className:e}){let{env:t,theme:n,walletAddress:r,close:o,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s}=Wt();return(0,uo.jsxs)(Na.Drawer.Portal,{children:[(0,uo.jsx)(Na.Drawer.Overlay,{className:"wp-overlay"}),(0,uo.jsxs)(Na.Drawer.Content,{className:Ee("wp-fullscreen",e),"data-theme":n,children:[(0,uo.jsx)(Na.Drawer.Title,{className:"wp-sr-only",children:"Portfolio"}),(0,uo.jsx)(po,{env:t,theme:n,walletAddress:r,onBack:o,variant:"none",onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s})]})]})}var xd=require("react/jsx-runtime");function K1({env:e,theme:t="light",walletAddress:n,open:r,onOpenChange:o,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s,sendTransaction:l,estimateGas:d,conversionRatio:p,currencySymbol:w,children:u}){let h=it(e),x=r!==void 0,[y,f]=fo.useState(!1),c=x?r:y,b=fo.useCallback(C=>{x||f(C),o?.(C)},[x,o]),g=fo.useCallback(()=>b(!1),[b]),v=fo.useMemo(()=>({env:h,theme:t,open:c,walletAddress:n,close:g,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s,sendTransaction:l,estimateGas:d,conversionRatio:p,currencySymbol:w}),[h,t,c,n,g,a,i,s,l,d,p,w]);return(0,xd.jsx)(xa.Provider,{value:v,children:(0,xd.jsx)(gm.Drawer.Root,{direction:"bottom",open:c,onOpenChange:b,noBodyStyles:!0,children:u})})}var vd=Object.assign(K1,{Trigger:qu,Content:mm});var ue=_(require("react"),1),Go=require("react-dom"),Nd=_(require("bignumber.js"),1);var fs=_(require("react"),1),hm=120;function bm(e){return e instanceof HTMLElement&&e.matches("input, textarea, select")}function wm(){let[e,t]=fs.useState(!1);return fs.useEffect(()=>{let n=window.visualViewport,r=()=>n?.height??window.innerHeight,o=r(),a=()=>{let d=r();o=Math.max(o,d),t(o-d>hm)},i=()=>{o=r(),t(!1)},s=d=>{bm(d.target)&&o-r()>hm&&t(!0)},l=d=>{bm(d.target)&&t(!1)};return a(),n?.addEventListener("resize",a),window.addEventListener("resize",a),window.screen?.orientation?.addEventListener("change",i),document.addEventListener("focusin",s),document.addEventListener("focusout",l),()=>{n?.removeEventListener("resize",a),window.removeEventListener("resize",a),window.screen?.orientation?.removeEventListener("change",i),document.removeEventListener("focusin",s),document.removeEventListener("focusout",l)}},[]),e}var ms=_(require("react"),1);function gs(e,t=160){let[n,r]=ms.useState(e||null);return ms.useEffect(()=>{if(e){r(e);return}let o=window.setTimeout(()=>r(null),t);return()=>window.clearTimeout(o)},[e,t]),[e||n,e?"open":"closed"]}var gr=require("react/jsx-runtime");function ym({size:e=16,className:t}){return(0,gr.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,gr.jsx)("path",{d:"M2.667 8a5.333 5.333 0 1 0 1.562-3.771L2.667 5.79M2.667 2.667v3.124h3.124M8 5.333V8l1.667 1",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"})})}function xm({size:e=16,className:t}){return(0,gr.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,gr.jsx)("path",{d:"M2.667 4h4M9.333 4h4M6.667 2.667v2.666M2.667 12h4M9.333 12h4M9.333 10.667v2.666M2.667 8h1.666M7 8h6.333M4.333 6.667v2.666",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"})})}function kd({size:e=20,className:t}){return(0,gr.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,gr.jsx)("path",{d:"M10 4.167v11.666M4.167 10 10 15.833 15.833 10",stroke:"currentColor",strokeWidth:1.667,strokeLinecap:"round",strokeLinejoin:"round"})})}function vm({size:e=16,className:t}){return(0,gr.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":"true",children:(0,gr.jsx)("path",{d:"M3.333 8h9.334M8.667 4l4 4-4 4",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"})})}var te=_(require("react"),1);var Rm=_(require("bignumber.js"),1);function km(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function Cm(e){return!e.isFinite()||e.isNaN()||e.lte(0)?"":e.decimalPlaces(6,Rm.default.ROUND_DOWN).toFixed()}function Z1(e){return e.fromToken.symbol.toLowerCase()===e.toToken.symbol.toLowerCase()||e.fromToken.chainId===e.toToken.chainId&&e.fromToken.address.toLowerCase()===e.toToken.address.toLowerCase()}function X1(e){let t=e.fromToken.priceUsd,n=e.toToken.priceUsd,r=e.lastChangedBy==="to"?e.toAmount:e.fromAmount,o=kt(r);return!o||o.lte(0)?{fromAmount:e.fromAmount,toAmount:e.toAmount}:km(t)&&km(n)?e.lastChangedBy==="to"?{fromAmount:Cm(o.multipliedBy(n).dividedBy(t))}:{toAmount:Cm(o.multipliedBy(t).dividedBy(n))}:Z1(e)?e.lastChangedBy==="to"?{fromAmount:e.toAmount}:{toAmount:e.fromAmount}:{fromAmount:e.lastChangedBy==="to"?"":e.fromAmount,toAmount:e.lastChangedBy==="from"?"":e.toAmount}}function Nm({getQuote:e,submitBridge:t}){return{canQuote:!!e,canSubmit:!!t,async getQuote(n){return e?e(n):X1(n)},async submitBridge(n){if(!t)throw new Error("Bridge submit handler is not configured.");return t(n)}}}var Sm=15,J1=18,Am="cross_bridge_terms_accepted",$1=3600*24*365;function ey(e){let t=e.replace(/[^\d.]/g,""),n=t.indexOf(".");n!==-1&&(t=t.slice(0,n+1)+t.slice(n+1).replace(/\./g,""));let r=t.indexOf(".");if(r===-1)return t.slice(0,Sm);let o=t.slice(0,r).slice(0,Sm),a=t.slice(r+1).slice(0,J1);return`${o}.${a}`}function ty(){return typeof document>"u"?!1:document.cookie.split(";").map(e=>e.trim()).some(e=>e===`${Am}=true`)}function ny(){if(typeof document>"u")return;let e=typeof window<"u"&&window.location.protocol==="https:"?"; Secure":"";document.cookie=[`${Am}=true`,"Path=/",`Max-Age=${$1}`,"SameSite=Lax",e].filter(Boolean).join("; ")}function ry(e){let t=Number(e??"0");if(!Number.isFinite(t)||t<.1)return"1";let n=r=>Math.floor(r*100)/100;if(t<3){let r=n(t*3);return String(r<1?1:r)}return"10"}function Tm(e){let t=e.toUpperCase();return t.startsWith("T")&&t.slice(1).startsWith("ONE")?t.slice(1):t}function oy(e,t){if(!e||!t||e.chainId!==t.chainId)return!1;let n=new Set([Tm(e.symbol),Tm(t.symbol)]);return n.has("ONE")&&n.has("ONEUSD")}function Xn(e,t){return!!e&&!!t&&e.chainId===t.chainId&&e.address.toLowerCase()===t.address.toLowerCase()}function hs(e){return e[0]}function Cd(e,t,n,r){if(n&&!Xn(n,t))return n;let o=t?r?.(t,e):void 0;if(o?.length)return o[0];if(!t)return e[1]??hs(e);let a=e.findIndex(s=>Xn(s,t)),i=a>=0?e[a+1]:void 0;return i&&!Xn(i,t)?i:e.find(s=>!Xn(s,t))??t}function Im({fromToken:e,toToken:t,fromAmount:n,toAmount:r,lastChangedBy:o,slippage:a}){return{fromToken:e,toToken:t,fromAmount:n,toAmount:r,lastChangedBy:o,slippage:a}}function bs(e,t=0){if(!e||t>5)return[];if(typeof e=="string")return[e];if(!(e instanceof Error)&&typeof e!="object")return[String(e)];let n=e;return[...[e instanceof Error?e.name:n.name,e instanceof Error?e.message:n.message,n.shortMessage,n.details,n.code].filter(o=>typeof o=="string"||typeof o=="number").map(String),...bs(n.cause,t+1),...bs(n.data,t+1),...bs(n.error,t+1)]}function Rd(e){let t=bs(e).join(" ").toLowerCase(),n=t.includes("signature_failed")&&(t.includes("\uD0C0\uC785 \uB370\uC774\uD130 \uC11C\uBA85\uC5D0 \uC2E4\uD328")||t.includes("typed data")||t.includes("signtypeddata"));return t.includes("4001")||t.includes("err_user_rejected")||t.includes("userrejectedrequesterror")||t.includes("user rejected")||t.includes("user denied")||t.includes("user cancelled")||t.includes("user canceled")||t.includes("rejected the request")||t.includes("request rejected")||t.includes("action_rejected")||t.includes("rejected by user")||n}function Em(e,t){return Rd(e)?"Transaction request was rejected.":(e instanceof Error?e.message:typeof e=="string"?e:"").split(`
10
- `)[0]?.trim()||t}function Mm(e){let{tokens:t,initialFromToken:n,initialToToken:r,getToTokens:o,getApproval:a,approveBridge:i,history:s=[],initialSlippage:l="1",termsUrl:d,getQuote:p,submitBridge:w,onSubmitted:u,onSuccess:h,onFailed:x,onExit:y}=e,f=te.useMemo(()=>Nm({getQuote:p,submitBridge:w}),[p,w]),[c,b]=te.useState("form"),[g,v]=te.useState(n??hs(t)),[C,N]=te.useState(()=>Cd(t,n??hs(t),r,o)),[I,R]=te.useState(""),[S,E]=te.useState(""),[M,z]=te.useState("from"),[L,G]=te.useState(l),[A,j]=te.useState(null),le=te.useMemo(()=>oy(g,C),[g,C]),oe=te.useMemo(()=>le?"1":L==="auto"?ry(A?.priceImpact):L,[le,L,A?.priceImpact]),[ne,V]=te.useState(""),[ee,F]=te.useState("idle"),[q,ae]=te.useState(""),[X,me]=te.useState(null),[ke,ze]=te.useState([]),[ge,Ne]=te.useState(!1),[Ce,tt]=te.useState(ty),[Me,Qe]=te.useState(null),[lt,We]=te.useState(!1),[Ve,Ge]=te.useState(null),[Dt,tn]=te.useState(null),[yt,Pt]=te.useState(!1),[Tt,nn]=te.useState(!1),It=te.useRef(0),ft=te.useRef(null),Ot=te.useRef(!1),rt=te.useRef(!1),on=te.useRef(!1),mt=te.useRef(!1),fn=te.useRef(!1),Ze=te.useRef(!1),dt=te.useRef(!1);te.useEffect(()=>{on.current||(on.current=!0,Je("bridge","opened"))},[]);let nt=te.useCallback(()=>{ft.current&&(clearTimeout(ft.current),ft.current=null)},[]),Et=te.useCallback(U=>{nt(),tn(U)},[nt]);te.useEffect(()=>nt,[nt]),te.useEffect(()=>{let U=t.find(Pe=>Xn(Pe,g))??hs(t),Oe=U?o?.(U,t):void 0,$=Oe?.find(Pe=>Xn(Pe,C))??(Oe?void 0:t.find(Pe=>Xn(Pe,C)))??Cd(t,U,void 0,o);v(U),N($)},[o,t,g,C]);let Rt=te.useCallback((U,Oe)=>{let $=ey(U);if(!$){It.current+=1,R(""),E(""),z(Oe),j(null),V(""),F("idle");return}Oe==="from"?R($):E($),z(Oe),V(""),!fn.current&&Number($)>0&&(fn.current=!0,Je("bridge","amount_entered"))},[]),Xe=te.useCallback(()=>{It.current+=1,R(""),E(""),z("from"),j(null),V(""),ae(""),F("idle"),Qe(null),We(!1),Ge(null),Pt(!1),Et(null)},[Et]),an=te.useCallback(U=>{Xn(U,g)||(mt.current||(mt.current=!0,Je("bridge","token_selected",{tags:{item_id:`from:${U.symbol}`}})),v(U),N(Cd(t,U,void 0,o)),Xe())},[g,o,Xe,t]),sn=te.useCallback(U=>{Xn(U,C)||Xn(U,g)||(mt.current||(mt.current=!0,Je("bridge","token_selected",{tags:{item_id:`to:${U.symbol}`}})),N(U),Xe())},[g,Xe,C]),Yt=te.useMemo(()=>g?o?.(g,t)??t.filter(U=>!Xn(U,g)):[],[g,o,t]),ln=te.useCallback(()=>{g?.balance&&Rt(g.balance,"from")},[g?.balance,Rt]),Q=te.useCallback(()=>{!g||!C||(v(C),N(g),Xe())},[g,Xe,C]),xe=te.useCallback(()=>{It.current+=1,R(""),E(""),z("from"),j(null),V(""),ae("")},[]);te.useEffect(()=>{if(!g||!C)return;if(!I&&!S){j(null),V(""),F($=>$==="quoting"?"idle":$);return}let U=++It.current,Oe=Im({fromToken:g,toToken:C,fromAmount:I,toAmount:S,lastChangedBy:M,slippage:L});F($=>$==="submitting"?$:f.canQuote?"quoting":"idle"),(async()=>{try{let $=await f.getQuote(Oe);if(It.current!==U)return;$.fromAmount!==void 0&&M==="to"&&R($.fromAmount),$.toAmount!==void 0&&M==="from"&&E($.toAmount),j($.summary??null),V($.error??"")}catch($){if(It.current!==U)return;V($ instanceof Error?$.message:"Failed to quote bridge.")}finally{It.current===U&&F($=>$==="quoting"?"idle":$)}})()},[I,g,M,f,L,S,C]);let Se=te.useCallback(()=>!g||!C?null:Im({fromToken:g,toToken:C,fromAmount:I,toAmount:S,lastChangedBy:M,slippage:oe}),[oe,I,g,M,S,C]),Fe=te.useCallback(async(U,Oe)=>{if(!Ot.current){Ot.current=!0,ae(""),Pt(!1),We(!1),F("submitting");try{if(!Oe?.skipApprovalCheck&&a){let Pe=await a(U);if(Pe){Qe(Pe),Ge(U),F("idle");return}}Qe(null),Ge(null),Et("processing");let $=await f.submitBridge(U);me($),F("success"),ze(Pe=>[{id:$.txHash,timestamp:new Date().toISOString(),txHash:$.txHash,fromToken:$.fromToken,toToken:$.toToken,fromAmount:$.fromAmount,toAmount:$.toAmount,summary:A??void 0,status:"pending"},...Pe.filter(In=>In.txHash!==$.txHash)]),xe(),nn(!0),Et(null),Pt(!0),Je("bridge","confirmed"),Ze.current=!1,dt.current=!1,u?.($),h?.($)}catch($){if(Et(null),Je("bridge","confirmed",{status:"failure",reason:Nn($)}),Ze.current=!1,dt.current=!1,Rd($)){F("idle");return}let Pe=Em($,"Failed to submit bridge.");ae(Pe),F("error"),x?.({message:Pe})}finally{Ot.current=!1}}},[a,x,u,h,f,xe,Et,A]),ot=te.useCallback(async()=>{if(ne)return;let U=Se();if(U){if(Ze.current||(Ze.current=!0,Je("bridge","submitted")),!Ce){Ge(U),Ne(!0);return}await Fe(U)}},[Se,ne,Fe,Ce]),Kt=te.useCallback(async()=>{let U=Ve??Se();U&&(ny(),tt(!0),Ne(!1),await Fe(U))},[Se,Ve,Fe]),Bt=te.useCallback(()=>{Ne(!1),Ge(null)},[]),Cn=te.useCallback(async()=>{if(!(rt.current||ee==="submitting"||!Me||!Ve||!i)){rt.current=!0,ae(""),F("submitting");try{await i(Ve,Me),dt.current||(dt.current=!0,Je("bridge","approved")),Qe(null),F("idle"),We(!0)}catch(U){if(Rd(U)){F("idle");return}let Oe=Em(U,"Failed to approve token.");ae(Oe),F("error"),x?.({message:Oe})}finally{rt.current=!1}}},[Me,i,x,Ve,Fe,ee]),Rn=te.useCallback(()=>{ee!=="submitting"&&(Qe(null),We(!1),Ge(null),F("idle"))},[ee]),O=te.useCallback(async()=>{if(ee==="submitting")return;let U=Ve??Se();if(!U){We(!1),ae("Bridge input is no longer available. Please try again."),F("error");return}We(!1),await Fe(U,{skipApprovalCheck:!0})},[Se,Ve,Fe,ee]),De=te.useCallback(()=>{Pt(!1)},[]),qe=te.useCallback(U=>{b(U),U==="history"&&nn(!1)},[]),re=te.useCallback(()=>{if(c==="history"){qe("form");return}y?.()},[y,qe,c]),Ie=te.useMemo(()=>[...s,...ke.filter(U=>!s.some(Oe=>Oe.txHash===U.txHash))],[s,ke]);return{step:c,setStep:qe,status:ee,error:q,quoteError:ne,fromToken:g,toToken:C,tokens:t,availableToTokens:Yt,fromAmount:I,toAmount:S,lastChangedBy:M,slippage:L,effectiveSlippage:oe,slippageLocked:le,setSlippage:G,summary:A,history:Ie,submitted:X,canSubmit:f.canSubmit,termsOpen:ge,approvalInfo:Me,approvalSuccessOpen:lt,approveBridge:i,pendingSubmitInput:Ve,submitToast:Dt,successDialogOpen:yt,dismissSuccessDialog:De,hasNewHistory:Tt,termsUrl:d,setFromToken:v,setToToken:N,selectFromToken:an,selectToToken:sn,setAmount:Rt,setMax:ln,swapTokens:Q,submit:ot,confirmTerms:Kt,cancelTerms:Bt,confirmApproval:Cn,cancelApproval:Rn,continueAfterApproval:O,back:re}}he(`.bf-root{--bf-bg: var(--ds-bg-default, #1e232e);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .08));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .07));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .85));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .65));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .4));--bf-toast-bg: var(--bf-bg);--bf-toast-strong: var(--bf-text-high);--bf-toast-color: var(--bf-text-medium);position:relative;display:flex;flex:1;min-height:0;flex-direction:column;container:bf-flow / inline-size;overflow:hidden;background:var(--bf-bg);color:var(--ds-content-highest, #ffffff);font-family:inherit}[data-theme=dark].wi-popover-content .bf-root,[data-theme=dark].wi-drawer-content .bf-root{--bf-bg: var(--ds-bg-default, #121212);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .1));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .05));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .85));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .7));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .5))}[data-theme=light].wi-popover-content .bf-root,[data-theme=light].wi-drawer-content .bf-root{--bf-bg: var(--ds-bg-default, #ffffff);--bf-surface: var(--ds-surface-medium, rgba(18, 18, 18, .05));--bf-surface-hover: var(--ds-surface-high, rgba(18, 18, 18, .1));--bf-border: var(--ds-border-default, rgba(18, 18, 18, .05));--bf-text-high: var(--ds-content-high, rgba(18, 18, 18, .85));--bf-text-medium: var(--ds-content-medium, rgba(18, 18, 18, .7));--bf-text-low: var(--ds-content-low, rgba(18, 18, 18, .5))}[data-theme=dark].gou-shell .bf-root,.gou-shell[data-theme=dark] .bf-root{--bf-bg: var(--ds-bg-default, #121212);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .1));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .05));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .85));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .7));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .5))}[data-theme=light].gou-shell .bf-root,.gou-shell[data-theme=light] .bf-root{--bf-bg: var(--ds-bg-default, #ffffff);--bf-surface: var(--ds-surface-medium, rgba(18, 18, 18, .05));--bf-surface-hover: var(--ds-surface-high, rgba(18, 18, 18, .1));--bf-border: var(--ds-border-default, rgba(18, 18, 18, .05));--bf-text-high: var(--ds-content-high, rgba(18, 18, 18, .85));--bf-text-medium: var(--ds-content-medium, rgba(18, 18, 18, .7));--bf-text-low: var(--ds-content-low, rgba(18, 18, 18, .5))}.bf-root[data-view=history]{background:var(--ds-bg-dim, #f5f7fa);color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-header{position:relative;display:flex;flex-shrink:0;align-items:center;justify-content:space-between;padding:24px;border-bottom:1px solid var(--bf-border);background:var(--ds-bg-default, var(--bf-bg));box-sizing:border-box}.bf-root[data-view=history] .bf-header{padding:24px;border-bottom-color:var(--ds-border-default, rgba(0, 0, 0, .07));background:var(--ds-surface-default, #ffffff)}.bf-header-btn{display:inline-flex;width:24px;height:24px;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;transition:color .15s ease}.bf-header-spacer{width:24px;height:24px;flex-shrink:0}.bf-header-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-header .bf-header-btn:last-child{position:absolute;top:24px;right:24px}.bf-header-title{position:absolute;left:50%;transform:translate(-50%);font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--bf-text-high);white-space:nowrap}.bf-header-title[data-clickable=true]{cursor:pointer}.bf-root[data-view=history] .bf-header-title{color:var(--ds-content-highest, #000000)}.bf-body,.bf-history-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;box-sizing:border-box}.bf-body{padding:24px}.bf-history-body{display:flex;flex-direction:column;gap:12px;padding:24px;background:var(--ds-bg-dim, #f5f7fa)}.bf-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}.bf-chip{display:inline-flex;align-items:center;gap:4px;min-height:33px;padding:6px 8px;border:0;border-radius:12px;background:var(--bf-surface);color:var(--bf-text-medium);font:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer}.bf-chip:hover:not(:disabled){color:var(--bf-text-high);background:var(--bf-surface-hover)}.bf-chip:disabled{cursor:default}.bf-chip-history{position:relative}.bf-chip-dot{position:absolute;top:4px;right:4px;width:6px;height:6px;border-radius:999px;background:var(--ds-system-red-default, #da0b2e)}.bf-swap-card{position:relative;display:flex;flex-direction:column;gap:12px;margin-bottom:12px}.bf-field-error{margin-top:-4px;color:var(--ds-system-red-default, #ff2b5f);font-size:13px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-amount-panel{display:flex;min-height:110px;flex-direction:column;gap:8px;padding:16px;border:1px solid transparent;border-radius:12px;background:var(--bf-surface);box-sizing:border-box;transition:border-color .2s ease}.bf-amount-panel:hover{border-color:var(--bf-border)}.bf-amount-head{display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--bf-text-high);font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-balance{display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0;color:var(--bf-text-low);font-size:12px;white-space:nowrap}.bf-amount-main{display:flex;align-items:center;justify-content:space-between;gap:12px}.bf-amount-input-wrap{display:flex;min-width:0;flex:1;flex-direction:column;gap:4px}.bf-amount-input{width:100%;min-width:0;padding:0;border:0;background:transparent;color:var(--bf-text-high);font:inherit;font-size:18px;font-size:clamp(15px,4.5cqi,18px);font-weight:600;line-height:1.5;letter-spacing:-.01em;outline:none}.bf-amount-input[data-size=medium]{font-size:16px;font-size:clamp(14px,4cqi,16px)}.bf-amount-input[data-size=small]{font-size:14px;font-size:clamp(12px,3.5cqi,14px)}.bf-amount-input::placeholder{color:var(--ds-content-lowest, rgba(0, 0, 0, .25))}.bf-amount-usd{overflow:hidden;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;white-space:nowrap;text-overflow:ellipsis}.bf-token-pill{display:inline-flex;flex-shrink:0;align-items:center;gap:6px;min-height:33px;padding:6px 8px 6px 6px;border:1px solid var(--bf-border);border-radius:9999px;background:var(--bf-bg);color:var(--bf-text-high);font:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;perspective:220px;overflow:hidden;transition:transform .12s ease,background .15s ease}.bf-token-pill:hover:not(:disabled):not([data-locked=true]){background:var(--bf-surface-hover)}.bf-token-pill:disabled{cursor:default;opacity:.6}.bf-token-pill[data-locked=true]{cursor:default}.bf-token-icon{position:relative;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;overflow:hidden;border-radius:0;background:var(--ds-accent-primary-default, #f0640d);color:var(--ds-accent-primary-on, #000000);font-size:11px;font-weight:700}.bf-token-icon[data-has-image=true]{background:transparent}.bf-token-icon img{width:100%;height:100%;border-radius:0;object-fit:cover}.bf-token-fallback{line-height:1}.bf-token-pill-face{display:inline-flex;align-items:center;gap:6px;transform-origin:center bottom;animation:bf-token-roll-up .32s cubic-bezier(.22,1,.36,1)}@keyframes bf-token-roll-up{0%{opacity:0;transform:translateY(90%) rotateX(-80deg)}60%{opacity:1}}.bf-token-pill:active:not(:disabled),.bf-embedded-token-pill:active:not(:disabled){transform:scale(.96)}.bf-token-search:focus-within{border-color:var(--ds-accent-primary-default, #f0640d)}.bf-token-search input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:var(--bf-text-high);font:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-token-search input::placeholder{color:var(--bf-text-low)}.bf-token-list{display:flex;min-height:0;flex:1;flex-direction:column;gap:0;overflow-y:auto;overflow-x:hidden;padding:0 24px 24px;scrollbar-width:thin;box-sizing:border-box}.bf-token-row{position:relative;display:flex;width:100%;min-height:69px;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid transparent;border-radius:12px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;box-sizing:border-box}.bf-token-row:hover:not([data-selected=true]){background:var(--ds-surface-medium, rgba(18, 18, 18, .05))}.bf-token-row[data-selected=true]{border-color:var(--ds-accent-primary-default, #ff8438);background:var(--ds-surface-medium, rgba(18, 18, 18, .05))}.bf-token-row-left{display:inline-flex;min-width:0;align-items:center;gap:16px}.bf-token-meta{display:flex;min-width:0;flex-direction:column}.bf-token-symbol{overflow:hidden;color:var(--bf-text-high);font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.bf-token-name{overflow:hidden;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.bf-token-row-right{display:flex;min-width:86px;max-width:42%;flex-shrink:0;flex-direction:column;align-items:flex-end}.bf-token-balance,.bf-token-price{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bf-token-balance{color:var(--bf-text-high);font-size:14px;font-weight:600;line-height:1.5;letter-spacing:0}.bf-token-price{color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-token-row[data-selected=true] .bf-token-symbol{color:var(--bf-text-high)}.bf-token-row[data-selected=true] .bf-token-balance{color:var(--bf-text-high);font-size:16px}.bf-token-row[data-selected=true] .bf-token-price{color:var(--bf-text-low);font-size:14px}.bf-token-empty{padding:32px 16px;color:var(--bf-text-low);font-size:14px;font-weight:500;line-height:1.5;text-align:center}.bf-slippage-overlay{position:fixed;inset:0;z-index:100002;display:flex;align-items:center;justify-content:center;padding:24px;background:#00000085;pointer-events:auto;box-sizing:border-box}.bf-slippage-dialog{display:flex;width:min(480px,calc(100vw - 48px));height:auto;min-height:min(316px,calc(100dvh - 48px));max-height:calc(100dvh - 48px);flex-direction:column;overflow:hidden;border:1px solid var(--ds-border-medium, rgba(0, 0, 0, .18));border-radius:24px;background:var(--ds-surface-default, #ffffff);color:var(--ds-content-highest, #000000);box-shadow:var(--ds-shadow-modal, 0 4px 30px -1px rgba(0, 0, 0, .15));box-sizing:border-box}.bf-slippage-head{position:relative;display:flex;min-height:73px;flex-shrink:0;align-items:center;justify-content:flex-start;padding:24px 56px 24px 24px;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));background:var(--ds-surface-default, #ffffff);box-sizing:border-box}.bf-slippage-head h3{margin:0;color:var(--ds-content-highest, #000000);font-size:20px;font-weight:600;line-height:1.25;letter-spacing:0}.bf-slippage-close{position:absolute;top:24px;right:24px;display:inline-flex;width:24px;height:24px;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer}.bf-slippage-close:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-slippage-body{display:flex;flex:1;min-height:0;flex-direction:column;gap:24px;padding:24px;box-sizing:border-box}.bf-slippage-desc{margin:0;color:var(--ds-content-medium, rgba(0, 0, 0, .65));font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-controls{display:flex;flex-direction:column;gap:12px;width:100%}.bf-slippage-presets{display:flex;gap:8px;width:100%}.bf-slippage-preset{appearance:none;display:inline-flex;flex:1 1 0;min-width:0;min-height:48px;align-items:center;justify-content:center;padding:12px 8px;border:1px solid transparent;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-medium, rgba(0, 0, 0, .65));font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;box-sizing:border-box}.bf-slippage-preset:hover,.bf-slippage-preset[data-selected=true]{border-color:var(--ds-accent-primary-default, #ff8438);background:var(--ds-accent-primary-low, #fff5ee)}.bf-slippage-custom{display:flex;min-height:48px;align-items:center;gap:8px;padding:12px;border:1px solid transparent;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-high, rgba(0, 0, 0, .85));box-sizing:border-box}.bf-slippage-custom:focus-within,.bf-slippage-custom[data-selected=true]{border-color:var(--ds-accent-primary-default, #ff8438)}.bf-slippage-custom input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:var(--ds-content-high, rgba(0, 0, 0, .85));font:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-custom input::placeholder{color:var(--ds-content-lowest, rgba(0, 0, 0, .25))}.bf-slippage-custom span:not(.bf-sr-only){flex-shrink:0;color:var(--ds-content-high, rgba(0, 0, 0, .85));font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-apply{appearance:none;margin-top:auto;width:100%;min-height:48px;padding:12px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #ff8438);color:var(--ds-accent-primary-on-primary, #ffffff);font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;box-sizing:border-box}.bf-slippage-apply:hover{filter:brightness(.96)}.bf-slippage-apply:disabled{cursor:not-allowed;opacity:.5;filter:none}.bf-slippage-message{margin:0;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-message[data-variant=warning]{color:var(--ds-system-orange-high, #e56f00)}.bf-slippage-message[data-variant=error]{color:var(--ds-system-red-default, #da0b2e)}.bf-action-modal-overlay{--bf-bg: var(--ds-bg-default, #1e232e);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .08));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .12));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .92));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .65));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .4));position:fixed;inset:0;z-index:100003;display:flex;align-items:center;justify-content:center;padding:24px;background:#040912b8;pointer-events:auto;box-sizing:border-box;animation:bf-overlay-in .18s ease-out}.bf-action-modal-overlay[data-theme=light]{--bf-bg: var(--ds-bg-default, #ffffff);--bf-surface: var(--ds-surface-medium, rgba(18, 18, 18, .05));--bf-surface-hover: var(--ds-surface-high, rgba(18, 18, 18, .1));--bf-border: var(--ds-border-default, rgba(18, 18, 18, .08));--bf-text-high: var(--ds-content-high, rgba(18, 18, 18, .85));--bf-text-medium: var(--ds-content-medium, rgba(18, 18, 18, .65));--bf-text-low: var(--ds-content-low, rgba(18, 18, 18, .4))}.bf-action-modal{display:flex;width:min(480px,calc(100vw - 48px));flex-direction:column;align-items:center;gap:24px;padding:48px 24px 24px;border:1px solid var(--bf-border);border-radius:24px;background:var(--bf-bg);color:#fff;box-shadow:0 24px 80px #00000073;box-sizing:border-box;animation:bf-modal-in .2s cubic-bezier(.16,1,.3,1)}.bf-action-modal-overlay[data-state=closed]{animation:bf-overlay-out .15s ease-in forwards}.bf-action-modal-overlay[data-state=closed] .bf-action-modal{animation:bf-modal-out .15s ease-in forwards}@keyframes bf-overlay-in{0%{opacity:0}}@keyframes bf-overlay-out{to{opacity:0}}@keyframes bf-modal-in{0%{opacity:0;transform:translateY(8px) scale(.96)}}@keyframes bf-modal-out{to{opacity:0;transform:translateY(4px) scale(.98)}}@media(prefers-reduced-motion:reduce){.bf-action-modal-overlay,.bf-action-modal,.bf-action-modal-overlay[data-state=closed],.bf-action-modal-overlay[data-state=closed] .bf-action-modal{animation:none}}.bf-action-modal h3{width:100%;margin:0;color:var(--bf-text-high);font-size:24px;font-weight:700;line-height:1.25;text-align:left;letter-spacing:0}.bf-action-modal-desc{max-width:380px;margin:0;color:var(--bf-text-low);font-size:15px;font-weight:500;line-height:1.45;text-align:center;letter-spacing:0}.bf-terms-modal{--bf-terms-accent: #f3742e;padding:24px;gap:24px}.bf-terms-modal h3{font-size:20px;font-weight:600;line-height:1.6;text-align:center}.bf-terms-modal .bf-action-modal-desc{font-size:14px;line-height:1.45}.bf-terms-check-row{display:grid;width:100%;min-height:56px;grid-template-columns:20px minmax(0,1fr);align-items:center;column-gap:12px;padding:16px;border:1px solid var(--bf-border);border-radius:12px;background:var(--bf-surface);color:var(--bf-text-high);font-size:14px;font-weight:600;line-height:1.4;box-sizing:border-box}.bf-terms-check-button{appearance:none;display:inline-flex;min-width:0;width:20px;height:20px;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;touch-action:manipulation}.bf-terms-copy{display:flex;width:100%;min-width:0;align-items:baseline;justify-content:space-between;column-gap:12px;row-gap:4px;flex-wrap:wrap}.bf-terms-label{min-width:0;cursor:pointer;touch-action:manipulation}.bf-terms-check-button:focus-visible .bf-terms-checkbox{outline:2px solid var(--ds-accent-primary-default, #f0640d);outline-offset:2px}.bf-terms-checkbox{position:relative;display:inline-flex;width:20px;height:20px;align-items:center;justify-content:center;border:1px solid rgba(124,143,180,.72);border-radius:4px;background:transparent;box-sizing:border-box}.bf-terms-checkbox[data-checked=true]{border-color:var(--ds-accent-primary-default, #f0640d);background:var(--ds-accent-primary-default, #f0640d)}.bf-terms-checkbox[data-checked=true]:after{width:8px;height:4px;border:solid #ffffff;border-width:0 0 2px 2px;content:"";transform:rotate(-45deg) translate(1px,-1px)}.bf-terms-check-row a{position:relative;z-index:1;color:var(--ds-accent-primary-default, #f0640d);font-size:14px;font-weight:700;text-decoration:none;white-space:nowrap}.bf-terms-check-row a:hover{text-decoration:underline}.bf-terms-privacy{max-width:100%;margin:0;color:var(--bf-text-low);font-size:clamp(8px,2.4vw,12px);white-space:nowrap;font-weight:500;line-height:1.45;text-align:center;letter-spacing:0}.bf-action-primary,.bf-action-secondary{display:inline-flex;width:100%;min-height:56px;align-items:center;justify-content:center;padding:14px 16px;border:0;border-radius:12px;font:inherit;font-size:18px;font-weight:700;line-height:1.4;letter-spacing:0;cursor:pointer}.bf-action-primary{background:var(--ds-accent-primary-default, #f0640d);color:var(--ds-accent-primary-on, #000000)}.bf-action-primary:disabled{cursor:not-allowed;opacity:.35}.bf-terms-modal .bf-action-primary{min-height:52px;background:var(--bf-terms-accent);color:#fff;font-size:16px;font-weight:600}.bf-terms-modal .bf-action-primary:disabled{background:var(--bf-surface);color:var(--bf-text-low);opacity:1}.bf-action-primary[aria-busy=true]{gap:8px;opacity:1}.bf-action-button-spinner{width:18px;height:18px;border:2px solid rgba(0,0,0,.22);border-top-color:currentColor;border-right-color:currentColor;border-radius:999px;animation:bf-loading-spin .9s linear infinite}.bf-action-secondary{background:var(--bf-surface);color:var(--bf-text-low)}.bf-action-secondary:disabled{cursor:not-allowed;opacity:.5}.bf-approve-address-box{display:flex;width:100%;flex-direction:column;gap:10px;padding:16px;border:1px solid var(--bf-border);border-radius:12px;background:var(--bf-surface);box-sizing:border-box}.bf-approve-address-box>span{color:var(--bf-text-low);font-size:14px;font-weight:700;line-height:1.4}.bf-approve-address-box>div{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px}.bf-approve-address-box strong{min-width:0;overflow:hidden;color:var(--bf-text-high);font-size:15px;font-weight:500;line-height:1.5;text-overflow:ellipsis;white-space:nowrap}.bf-copy-button{flex-shrink:0;min-width:48px;min-height:32px;padding:6px 10px;border:1px solid rgba(0,206,178,.65);border-radius:8px;background:transparent;color:var(--ds-accent-primary-default, #f0640d);font:inherit;font-size:12px;font-weight:700;line-height:1.2;cursor:pointer}.bf-copy-button:disabled{cursor:not-allowed;opacity:.45}.bf-action-buttons{display:grid;width:100%;grid-template-columns:1fr 1fr;gap:12px}.bf-approval-success-modal{gap:28px}.bf-success-mark{position:relative;display:inline-flex;width:96px;height:96px;flex-shrink:0;align-items:center;justify-content:center;border:12px solid rgba(0,206,178,.12);border-radius:999px;background:#00ceb2a8;box-shadow:0 0 0 10px #00ceb20f;box-sizing:border-box}.bf-success-mark:after{width:34px;height:18px;border:solid #ffffff;border-width:0 0 6px 6px;content:"";transform:rotate(-45deg) translate(2px,-3px)}.bf-status-toast{position:absolute;right:16px;bottom:14px;left:16px;z-index:5;display:flex;align-items:center;gap:12px;min-height:52px;padding:12px;border:1px solid var(--bf-border);border-radius:12px;background:var(--bf-toast-bg);color:var(--bf-toast-color);box-shadow:0 8px 24px #0000003d;box-sizing:border-box}.bf-status-toast-icon{display:inline-flex;width:28px;height:28px;flex-shrink:0;align-items:center;justify-content:center;border-radius:999px}.bf-status-spinner{width:20px;height:20px;border:3px solid rgba(255,255,255,.18);border-top-color:var(--ds-accent-primary-default, #f0640d);border-right-color:var(--ds-accent-primary-default, #f0640d);border-radius:999px;animation:bf-loading-spin .9s linear infinite}.bf-status-check{position:relative;width:20px;height:20px;border-radius:999px;background:var(--ds-system-green-default, #00ceb2)}.bf-status-check:after{position:absolute;top:6px;left:5px;width:8px;height:4px;border:solid var(--ds-system-green-on, #000000);border-width:0 0 2px 2px;content:"";transform:rotate(-45deg)}.bf-status-toast-copy{display:flex;min-width:0;flex:1;flex-direction:column}.bf-status-toast-copy strong,.bf-status-toast-copy span{overflow:hidden;text-overflow:ellipsis}.bf-status-toast-copy strong{color:var(--bf-toast-strong);font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em}.bf-status-toast-copy span{color:var(--bf-toast-color);font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em}.bf-status-toast[data-variant=success] .bf-status-toast-copy span{color:var(--ds-system-green-on-inverted, #00e8c9)}.bf-status-toast[data-variant=error]{border:1px solid rgba(255,43,95,.28);background:var(--bf-toast-bg)}.bf-status-toast[data-variant=error] .bf-status-toast-copy strong{color:var(--bf-toast-strong)}.bf-status-error-mark{display:inline-flex;width:24px;height:24px;align-items:center;justify-content:center;border-radius:999px;background:var(--ds-system-red-default, #ff2b5f);color:#fff;font-size:14px;font-weight:700;line-height:1}.bf-status-toast[data-variant=error] .bf-status-toast-copy span{color:var(--bf-toast-color)}.bf-success-overlay{--bf-bg: var(--ds-bg-default, #1e232e);--bf-border: var(--ds-border-default, rgba(255, 255, 255, .12));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .92));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .65));position:fixed;inset:0;z-index:100003;display:flex;align-items:center;justify-content:center;padding:24px;background:#000000b8;pointer-events:auto;box-sizing:border-box}.bf-success-overlay[data-theme=light]{--bf-bg: #ffffff;--bf-border: rgba(18, 18, 18, .08);--bf-text-high: rgba(18, 18, 18, .85);--bf-text-medium: rgba(18, 18, 18, .65);--bf-text-low: rgba(18, 18, 18, .4)}.bf-success-modal{display:flex;width:min(480px,calc(100vw - 48px));flex-direction:column;overflow:hidden;border:1px solid var(--bf-border);border-radius:24px;background:var(--bf-bg);color:var(--bf-text-high);box-shadow:0 24px 80px #00000073;box-sizing:border-box}.bf-success-head{display:flex;min-height:73px;align-items:center;justify-content:space-between;gap:16px;padding:24px;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));box-sizing:border-box}.bf-success-head h3{min-width:0;margin:0;overflow:hidden;color:var(--ds-content-highest, #000000);font-size:20px;font-weight:600;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.bf-success-close{display:inline-flex;width:24px;height:24px;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer}.bf-success-close:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-success-body{display:flex;flex-direction:column;align-items:center;gap:24px;padding:40px 24px 24px;box-sizing:border-box}.bf-success-copy{display:flex;width:100%;flex-direction:column;align-items:center;gap:4px;color:var(--bf-text-medium);text-align:center}.bf-success-copy strong{color:var(--bf-text-high);font-size:24px;font-weight:700;line-height:1.25;letter-spacing:0}.bf-success-copy span{color:var(--bf-text-medium);font-size:15px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-success-route{display:flex;align-items:center;justify-content:center;gap:12px}.bf-success-route .bf-token-icon{width:48px!important;height:48px!important;background:transparent;font-size:18px}.bf-success-route-arrow{color:var(--bf-text-low);font-size:24px;font-weight:500;line-height:1}.bf-success-ok{display:inline-flex;width:100%;min-height:48px;align-items:center;justify-content:center;padding:12px;border:0;border-radius:12px;background:#00b4b7e0;color:#fff;font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer}@media(max-width:767px){.bf-success-body{padding:40px 24px 24px}.bf-success-copy strong{font-size:22px}.bf-success-copy span{font-size:14px}.bf-success-mark{width:88px;height:88px}.bf-success-route .bf-token-icon{width:44px!important;height:44px!important}}@keyframes bf-loading-spin{to{transform:rotate(360deg)}}.bf-swap-toggle{position:absolute;top:100px;left:50%;z-index:1;display:inline-flex;width:32px;height:32px;align-items:center;justify-content:center;padding:0;border:0;border-radius:9999px;background:var(--ds-accent-primary-default, #f0640d);color:var(--ds-accent-primary-on, #000000);box-shadow:0 1px 5px #0000001f;cursor:pointer}.bf-swap-card[data-has-from-error=true] .bf-swap-toggle{top:132px}.bf-details{display:flex;flex-direction:column;gap:24px}.bf-collapse{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows .22s ease,opacity .14s ease,margin-top .22s ease}.bf-collapse[data-open=true]{grid-template-rows:1fr;opacity:1}.bf-collapse:not([data-open=true]){margin-top:calc(-1 * var(--bf-collapse-gap, 0px))}.bf-collapse-inner{overflow:hidden;min-height:0}@keyframes bf-value-in{0%{opacity:.25;transform:translateY(-2px)}}.bf-info-value,.bf-route-amount-value,.bf-route-meta>span{animation:bf-value-in .24s ease-out}@media(prefers-reduced-motion:reduce){.bf-collapse{transition:none}.bf-info-value,.bf-route-amount-value,.bf-route-meta>span{animation:none}}.bf-exchange-rate{display:flex;width:100%;align-items:center;justify-content:center;gap:4px;padding:0 0 24px;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-detail-section,.bf-history-card{display:flex;flex-direction:column;gap:12px;padding:0;border-radius:12px;background:transparent;box-sizing:border-box}.bf-liquidity{display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:12px;background:var(--bf-surface);box-sizing:border-box}.bf-root[data-view=history] .bf-liquidity,.bf-root[data-view=history] .bf-detail-section,.bf-root[data-view=history] .bf-history-card{background:var(--ds-surface-default, #ffffff)}.bf-detail-section h3{margin:0;color:var(--bf-text-high);font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em}.bf-tx-fee-section{gap:12px}.bf-tx-fee-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.bf-collapse-head{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;margin:0;padding:0;background:none;border:none;color:inherit;font:inherit;text-align:left;cursor:pointer}.bf-detail-section[data-open=true] .bf-collapse-head{padding-bottom:12px;border-bottom:1px solid var(--bf-border)}.bf-collapse-chevron{flex-shrink:0;color:var(--bf-text-low);transition:transform .2s ease}.bf-detail-section[data-open=true] .bf-collapse-chevron{transform:rotate(180deg)}.bf-collapse-body{display:flex;flex-direction:column;gap:14px}.bf-root[data-view=history] .bf-detail-section[data-open=true] .bf-collapse-head{border-bottom-color:var(--ds-border-default, rgba(0, 0, 0, .07))}.bf-root[data-view=history] .bf-collapse-chevron{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.bf-tx-fee-total{display:inline-flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0;color:var(--bf-text-medium);font-size:14px;font-weight:600;line-height:1.4;text-align:right}.bf-tx-fee-total>span[data-delegated=true]{text-decoration:line-through;text-decoration-thickness:2px;text-decoration-color:currentColor}.bf-fee-delegated{display:inline-flex;align-items:center;justify-content:center;min-height:24px;padding:2px 8px;border-radius:6px;background:#379cff2e;color:#4eb3ff;font-size:10px;font-weight:500;line-height:1.3;white-space:nowrap}.bf-tx-fee-token{width:16px;height:16px;flex-shrink:0;border-radius:999px;object-fit:cover}.bf-info-card{gap:14px}.bf-info-section{display:flex;flex-direction:column;gap:10px}.bf-info-section+.bf-info-section{padding-top:2px}.bf-info-section h4{margin:0;color:var(--bf-text-high);font-size:14px;font-weight:600;line-height:1.5}.bf-root[data-view=history] .bf-detail-section h3,.bf-root[data-view=history] .bf-info-section h4{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-route-steps{display:flex;flex-direction:column}.bf-route-step{display:grid;min-width:0;grid-template-columns:18px minmax(0,1fr);column-gap:10px}.bf-route-rail{position:relative;display:flex;justify-content:center}.bf-route-line{position:absolute;top:9px;bottom:-4px;width:1px;background:var(--bf-border)}.bf-route-step[data-last=true] .bf-route-line{display:none}.bf-route-dot{z-index:1;width:9px;height:9px;margin-top:5px;border:2px solid var(--bf-text-low);border-radius:999px;background:var(--bf-bg);box-sizing:border-box}.bf-route-dot[data-final=true]{border-color:var(--ds-accent-primary-default, #00ceb2)}.bf-route-body{display:flex;min-width:0;flex-direction:column;gap:2px;padding-bottom:14px}.bf-route-step[data-last=true] .bf-route-body{padding-bottom:0}.bf-route-head{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px}.bf-route-title{min-width:0;overflow:hidden;color:var(--bf-text-high);font-size:13px;font-weight:620;letter-spacing:-.01em;text-overflow:ellipsis;white-space:nowrap}.bf-route-amount{display:inline-flex;flex-shrink:0;align-items:center;gap:4px;color:var(--bf-text-medium);font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}.bf-route-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;color:var(--bf-text-low);font-size:12px;line-height:1.45;font-variant-numeric:tabular-nums}.bf-route-step[data-kind=hop] .bf-route-title{color:var(--bf-text-medium);font-weight:600}.bf-route-step[data-kind=hop] .bf-route-amount{color:var(--bf-text-low);font-weight:500}.bf-route-step[data-kind=hop] .bf-route-dot{width:7px;height:7px;margin-top:6px;border-width:1px}.bf-route-meta>span[data-tone=accent]{color:var(--ds-accent-primary-default, #00ceb2);font-weight:600}.bf-route-meta>span[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00);font-weight:600}.bf-route-meta>span[data-tone=danger]{color:var(--ds-system-red-default, #da0b2e);font-weight:600}.bf-route-tag{padding:1px 6px;border-radius:5px;background:var(--ds-accent-primary-low, rgba(0, 206, 178, .12));color:var(--ds-accent-primary-high, #00a0a2);font-size:10px;font-weight:700;letter-spacing:.01em}.bf-info-rows{display:flex;flex-direction:column;gap:8px}.bf-info-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-liquidity-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-info-label{display:inline-flex;align-items:center;gap:6px;min-width:0;color:var(--bf-text-low)}.bf-info-value{display:flex;min-width:0;align-items:center;justify-content:flex-end;gap:4px;color:var(--bf-text-medium);text-align:right}.bf-info-route,.bf-info-value-token{display:inline-flex;align-items:center;gap:4px}.bf-info-route .bf-token-icon,.bf-info-value-token .bf-token-icon{flex-shrink:0}.bf-info-route-arrow{display:inline-flex;align-items:center;color:var(--bf-text-medium);font-size:12px;line-height:1}.bf-root[data-view=history] .bf-info-route-arrow{color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.bf-info-value[data-tone=accent]{color:var(--ds-accent-primary-high, #f0640d)}.bf-info-value[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00)}.bf-info-value[data-tone=danger]{color:var(--ds-system-red-default, #da0b2e)}.bf-root[data-view=history] .bf-info-label,.bf-root[data-view=history] .bf-liquidity-head{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.bf-root[data-view=history] .bf-info-value{color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.bf-root[data-view=history] .bf-info-value[data-tone=accent]{color:var(--ds-accent-primary-high, #f0640d)}.bf-root[data-view=history] .bf-info-value[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00)}.bf-root[data-view=history] .bf-info-value[data-tone=danger]{color:var(--ds-system-red-default, #da0b2e)}.bf-liquidity-status{display:inline-flex;align-items:center;gap:6px;padding:4px 12px;border-radius:999px;font-size:13px;font-weight:600;line-height:1.4;white-space:nowrap}.bf-liquidity-status:before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;flex-shrink:0}.bf-liquidity-status[data-status=normal],.bf-liquidity-status:not([data-status]){background:#00ceb21f;color:var(--ds-accent-primary-default, #f0640d)}.bf-liquidity-status[data-status=normal]:before,.bf-liquidity-status:not([data-status]):before{background:var(--ds-accent-primary-default, #f0640d)}.bf-liquidity-status[data-status=low]{background:#e56f001f;color:#e56f00}.bf-liquidity-status[data-status=low]:before{background:#e56f00}.bf-liquidity-status[data-status=rebalancing]{background:#da0b2e1a;color:#da0b2e}.bf-liquidity-status[data-status=rebalancing]:before{background:#da0b2e}.bf-liquidity-track{height:8px;overflow:hidden;border-radius:999px;background:var(--bf-surface-hover)}.bf-liquidity-track span{display:block;height:100%;border-radius:inherit;background:var(--ds-accent-primary-default, #f0640d)}.bf-error{padding:12px;border-radius:12px;background:#da0b2e1f;color:var(--ds-system-red-default, #da0b2e);font-size:13px;line-height:1.4}.bf-footer{display:flex;flex-shrink:0;flex-direction:column;align-items:center;gap:10px;padding:12px 24px 24px;background:var(--ds-bg-default, var(--bf-bg))}.bf-next{width:100%;min-height:48px;padding:12px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #f0640d);color:var(--ds-accent-primary-on, #000000);font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer}.bf-next:disabled{cursor:default;opacity:.6}.bf-powered{display:inline-flex;align-items:center;gap:3px;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;text-decoration:none}.bf-powered:focus-visible{border-radius:4px;outline:2px solid var(--ds-accent-primary-default, #f0640d);outline-offset:2px}.bf-powered-brand{text-decoration:underline;text-underline-offset:2px}.bf-history-tabs{display:flex;align-items:center;gap:4px;width:100%}.bf-history-tab{position:relative;display:inline-flex;min-height:37px;align-items:center;justify-content:center;padding:8px 12px;border:0;background:transparent;color:var(--ds-content-lowest, rgba(0, 0, 0, .25));font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0;cursor:pointer}.bf-history-tab[data-active=true]{color:var(--ds-accent-primary-high, #f0640d)}.bf-history-tab[data-active=true]:after{position:absolute;right:8px;bottom:0;left:8px;height:3px;border-radius:999px;background:var(--ds-accent-primary-high, #f0640d);content:""}.bf-history-tab-dot{position:absolute;top:8px;right:4px;width:6px;height:6px;border-radius:999px;background:var(--ds-system-red-default, #da0b2e)}.bf-history-list{display:flex;flex-direction:column;gap:12px}.bf-history-item{display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:12px;background:var(--ds-surface-default, #ffffff);box-sizing:border-box}.bf-history-item-head,.bf-history-meta,.bf-history-route,.bf-history-route-token{display:inline-flex;align-items:center}.bf-history-item-head{justify-content:space-between;gap:12px;width:100%}.bf-history-status{display:inline-flex;min-height:24px;align-items:center;justify-content:center;padding:3px 8px;border-radius:4px;background:var(--ds-system-orange-low, #fcf5e9);color:var(--ds-system-orange-high, #e56f00);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;white-space:nowrap}.bf-history-status[data-status=completed]{background:var(--ds-system-green-low, #e7f9f8);color:var(--ds-system-green-high, #00a0a2)}.bf-history-status[data-status=failed]{background:var(--ds-system-red-low, rgba(218, 11, 46, .12));color:var(--ds-system-red-default, #da0b2e)}.bf-history-time{min-width:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;text-align:right;white-space:nowrap}.bf-history-item-body{display:flex;flex-direction:column;gap:4px}.bf-history-amount{color:var(--ds-content-high, rgba(0, 0, 0, .85));font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0}.bf-history-meta{justify-content:space-between;gap:12px;min-width:0}.bf-history-usd{min-width:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bf-history-route{justify-content:flex-end;gap:4px;min-width:0;color:var(--ds-content-high, rgba(0, 0, 0, .85));font-size:12px;font-weight:600;line-height:1.5;letter-spacing:0}.bf-history-route-token{gap:4px;min-width:0}.bf-history-route-token span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bf-history-route-arrow{flex-shrink:0;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.bf-empty{padding:32px 16px;text-align:center;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-size:14px}.bf-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:767px){.bf-slippage-overlay{align-items:flex-end;padding:0}.bf-slippage-dialog{width:100%;height:auto;min-height:316px;max-height:82dvh;border-right:0;border-bottom:0;border-left:0;border-radius:24px 24px 0 0}}.wi-drawer-content .bf-header{padding:16px}.wi-drawer-content .bf-header .bf-header-btn:last-child{top:16px;right:16px}.wi-drawer-content .bf-body,.wi-drawer-content .bf-history-body{padding:16px}.bf-root[data-variant=embedded]{--bf-bg: #1c1c1d;--bf-surface: #212224;--bf-surface-hover: rgba(255, 255, 255, .08);--bf-border: rgba(255, 255, 255, .1);--bf-text-high: rgba(255, 255, 255, .85);--bf-text-medium: rgba(255, 255, 255, .65);--bf-text-low: rgba(255, 255, 255, .4);--bf-embedded-primary: #f3742e;--bf-embedded-on-primary: #ffffff;background:var(--bf-bg);color:#fff}.gou-shell[data-theme=light] .bf-root[data-variant=embedded]{--bf-bg: #ffffff;--bf-surface: #ffffff;--bf-surface-hover: rgba(0, 0, 0, .03);--bf-border: rgba(0, 0, 0, .06);--bf-text-high: rgba(0, 0, 0, .85);--bf-text-medium: rgba(0, 0, 0, .65);--bf-text-low: rgba(0, 0, 0, .4);color:#000}.bf-root[data-variant=embedded] .bf-header{min-height:64px;justify-content:flex-start;gap:12px;padding:16px 20px 12px;border-bottom-color:var(--bf-border);background:var(--bf-bg)}.bf-root[data-variant=embedded] .bf-header .bf-header-btn:last-child{top:16px;right:20px}.bf-root[data-variant=embedded] .bf-header-btn{color:var(--bf-text-medium)}.bf-root[data-variant=embedded] .bf-header-title{position:static;flex:1;padding-right:36px;transform:none;color:var(--bf-text-high);font-size:18px;font-weight:600;line-height:1.5;text-align:left}.bf-root[data-variant=embedded] .bf-header-spacer{display:none}.bf-root[data-variant=embedded] .bf-embedded-body{padding:20px}.bf-embedded-form{display:flex;width:100%;min-width:0;flex-direction:column;gap:20px;--bf-collapse-gap: 20px}.bf-embedded-fields{position:relative;display:flex;width:100%;flex-direction:column}.bf-embedded-field-group{display:flex;width:100%;flex-direction:column;gap:8px}.bf-embedded-amount-panel{display:flex;width:100%;min-width:0;flex-direction:column;padding:16px;border:1px solid rgba(255,255,255,.025);border-radius:12px;background:#212224;box-sizing:border-box}.gou-shell[data-theme=light] .bf-embedded-amount-panel{border-color:#00000014;background:#fff}.bf-embedded-amount-head{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.bf-embedded-amount-label{display:inline-flex;min-width:0;align-items:center;gap:8px;white-space:nowrap}.bf-embedded-amount-label strong{color:var(--bf-text-medium);font-size:14px;font-weight:700;line-height:1.5}.bf-embedded-amount-label>span{color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5}.bf-embedded-amount-label em{padding:2px 6px;border-radius:9999px;background:#f3742e1a;color:var(--bf-embedded-primary);font-size:11px;font-style:normal;font-weight:500;line-height:1.25}.bf-embedded-balance{display:inline-flex;min-width:0;max-width:100%;flex-shrink:1;align-items:center;justify-content:flex-end;gap:6px;overflow:hidden;color:var(--bf-text-medium);font-size:12px;font-weight:600;line-height:1.5;text-align:right;white-space:nowrap}.bf-embedded-balance>svg,.bf-embedded-balance>span:not(.bf-embedded-balance-value){flex-shrink:0}.bf-embedded-balance-value{min-width:0;overflow:hidden;text-overflow:ellipsis}.bf-embedded-balance button{flex-shrink:0;padding:2px 8px;border:0;border-radius:9999px;background:#f3742e26;color:var(--bf-embedded-primary);font:inherit;font-size:11px;font-weight:700;line-height:1.4;cursor:pointer}.bf-embedded-balance button:hover{background:#f3742e40}.bf-embedded-amount-main{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px}.bf-embedded-token-pill{display:inline-flex;height:32px;flex-shrink:0;align-items:center;gap:6px;padding:0 12px 0 6px;border:1px solid rgba(255,255,255,.1);border-radius:9999px;background:#ffffff0d;color:#fff;font:inherit;font-size:14px;font-weight:700;line-height:1.5;cursor:pointer;perspective:220px;overflow:hidden;transition:transform .12s ease,background .15s ease}.gou-shell[data-theme=light] .bf-embedded-token-pill{border-color:#0000000f;background:#00000008;color:#000}.bf-embedded-token-pill:disabled{cursor:default;opacity:1}.bf-embedded-input-wrap{display:flex;min-width:0;flex:1}.bf-embedded-amount-input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:#fff;font:inherit;font-size:24px;font-size:clamp(18px,6cqi,24px);font-weight:700;line-height:32px;text-align:right}.gou-shell[data-theme=light] .bf-embedded-amount-input{color:#000}.bf-embedded-amount-input[data-size=medium]{font-size:20px;font-size:clamp(16px,5cqi,20px);line-height:28px}.bf-embedded-amount-input[data-size=small]{font-size:16px;font-size:clamp(14px,4cqi,16px);line-height:24px}.bf-embedded-amount-input::placeholder{color:var(--bf-text-low);opacity:1}.bf-embedded-field-error{color:#ff3c53;font-size:12px;font-weight:400;line-height:1.5}.bf-embedded-direction{position:relative;z-index:10;display:flex;width:100%;align-items:center;justify-content:center;margin:-12px 0}.bf-embedded-direction>span{display:inline-flex;width:36px;height:36px;align-items:center;justify-content:center;border-radius:9999px;background:var(--bf-embedded-primary);color:var(--bf-embedded-on-primary)}.bf-embedded-summary{display:flex;width:100%;flex-direction:column;gap:12px}.bf-embedded-details{display:flex;width:100%;flex-direction:column;gap:16px;padding:0 16px 16px;box-sizing:border-box}.bf-embedded-details .bf-info-section{gap:12px}.bf-embedded-details .bf-info-section+.bf-info-section{padding-top:0}.bf-embedded-details .bf-info-section h4{color:#fffc;font-size:14px;font-weight:700}.gou-shell[data-theme=light] .bf-embedded-details .bf-info-section h4{color:#000c}.bf-embedded-details .bf-info-rows{gap:12px}.bf-embedded-details .bf-info-row{min-height:20px;font-size:13px;font-weight:600}.bf-embedded-details .bf-info-label{gap:6px;color:var(--bf-text-medium);font-size:13px;font-weight:400}.bf-embedded-details .bf-info-value{color:var(--bf-text-medium);font-size:13px;font-weight:600}.bf-embedded-details .bf-info-value[data-tone=accent]{color:var(--bf-embedded-primary)}.bf-embedded-details .bf-info-route-arrow{color:var(--bf-text-medium)}.bf-embedded-liquidity{display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:12px;background:var(--bf-surface)}.bf-embedded-liquidity>div{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--bf-text-medium);font-size:14px}.bf-embedded-liquidity>div>span:last-child{text-transform:capitalize}.bf-embedded-liquidity-track{display:block;height:8px;overflow:hidden;border-radius:9999px;background:var(--bf-surface-hover)}.bf-embedded-liquidity-track>span{display:block;height:100%;border-radius:inherit;background:var(--bf-embedded-primary)}.bf-embedded-liquidity-error{padding:12px 16px;border:1px solid rgba(255,60,83,.3);border-radius:8px;background:#ff3c531a;color:#ff3c53;font-size:14px;line-height:1.5;text-align:center}.bf-embedded-action-footer{width:100%;flex-shrink:0}.bf-embedded-cta{display:flex;width:100%;height:52px;flex-shrink:0;align-items:center;justify-content:center;padding:0 16px;border:0;border-radius:12px;background:var(--bf-embedded-primary);color:var(--bf-embedded-on-primary);font:inherit;font-size:16px;font-weight:600;line-height:1.5;cursor:pointer;transition:opacity .15s ease,background-color .15s ease;box-sizing:border-box}.bf-embedded-cta:hover:not(:disabled){background:#f3742ee6}.bf-embedded-cta:disabled{cursor:not-allowed;opacity:.6}.bf-embedded-spinner{width:20px;height:20px;border:2px solid var(--bf-embedded-on-primary);border-top-color:transparent;border-radius:9999px;animation:bf-loading-spin .9s linear infinite}@media(max-width:767px){.bf-root[data-variant=embedded] .bf-header{min-height:50px;padding:12px 16px 8px;border-bottom:0}.bf-root[data-variant=embedded] .bf-header .bf-header-btn:last-child{display:none}.bf-root[data-variant=embedded] .bf-embedded-body{padding:12px 16px calc(env(safe-area-inset-bottom,0px) + 12px);overscroll-behavior:contain;scroll-padding-bottom:calc(env(safe-area-inset-bottom,0px) + 76px);-webkit-overflow-scrolling:touch}.bf-root[data-variant=embedded] .bf-embedded-action-footer{position:sticky;bottom:0;z-index:20;padding-top:12px;background:var(--bf-bg);isolation:isolate}.bf-root[data-variant=embedded] .bf-embedded-action-footer:after{position:absolute;z-index:-1;top:100%;right:0;left:0;height:calc(env(safe-area-inset-bottom,0px) + 32px);background:var(--bf-bg);box-shadow:0 16px 0 16px var(--bf-bg);content:"";pointer-events:none}.bf-root[data-variant=embedded][data-soft-keyboard-open=true] .bf-embedded-action-footer{position:static;padding-top:0}.bf-root[data-variant=embedded][data-soft-keyboard-open=true] .bf-embedded-action-footer:after{display:none}.bf-root[data-variant=embedded][data-soft-keyboard-open=true] .bf-embedded-body{scroll-padding-bottom:24px}.bf-embedded-amount-head{gap:8px}.bf-embedded-amount-label{gap:6px}.bf-embedded-balance{gap:4px}}
11
- `);var m=require("react/jsx-runtime"),zm=ue.createContext(void 0);function Aa(){return ue.useContext(zm)}function ay(e){let[t,n]=ue.useState(void 0);return ue.useEffect(()=>{let r=e.current;if(!r)return;let o=()=>{let i=r.closest("[data-theme]");n(i?.getAttribute("data-theme")??void 0)};o();let a=new MutationObserver(o);return a.observe(document.documentElement,{attributes:!0,subtree:!0,attributeFilter:["data-theme"]}),()=>a.disconnect()},[e]),t}var Lm=[{value:"0.1",label:"0.1%"},{value:"0.5",label:"0.5%"},{value:"1",label:"1%"},{value:"5",label:"5%"}],iy=[{value:"all",label:"ALL"},{value:"completed",label:"Completed"},{value:"pending",label:"Pending"}];function sy(e,t){return e==="auto"?t?`Auto ${t}%`:"Auto":e?`${e}%`:"1%"}function Dm(e){let t=e.replace(/[^\d.]/g,""),[n="",...r]=t.split("."),o=r.join("");return r.length===0?n:`${n}.${o.slice(0,2)}`}function Fm(e){return`${e.chainId}:${e.address.toLowerCase()}`}function Um(e){let t=Number(e);return Number.isFinite(t)?t.toLocaleString("en-US",{maximumFractionDigits:t>=1?2:6}):e||"0"}function Pm(e,t){let n=Number(e||"0"),r=t?.priceUsd??0;return`\u2248 $${(Number.isFinite(n)?n*r:0).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})} USD`}function ly(e,t=6){if(!e)return e;let[n,r=""]=e.split(".");if(!r)return n;let o=r.slice(0,t).replace(/0+$/,"");return o?`${n}.${o}`:n}function jm(e,t){if(!t)return!1;let n=kt(e),r=kt(t.balance);return!n||!r?!1:n.isGreaterThan(r)}function Ta(e){if(!e.isFinite()||e.isNaN())return"0";let n=e.decimalPlaces(6,Nd.default.ROUND_DOWN).toFixed(6).replace(/\.?0+$/,""),[r="0",o]=n.split("."),a=new Nd.default(r||"0").toFormat(0);return o?`${a}.${o}`:a}function dy(e){return e.length<=14?e:`${e.slice(0,6)}...${e.slice(-6)}`}function cy(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return e;let n=r=>r.toString().padStart(2,"0");return[`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}`,`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`].join(" ")}function py(e){let t=kt(e);return t?Ta(t):e||"0"}function uy(e,t){if(t?.priceUsd===void 0)return null;let n=kt(e);if(!n)return null;let r=n.multipliedBy(t.priceUsd);return r.isFinite()?`$${r.toFormat(2)}`:null}function ks(e){return e.status==="success"?"completed":e.status==="failed"?"failed":"pending"}function fy(e,t){return t==="all"?!0:ks(e)===t}function my(e){return e==="completed"?"Completed":e==="failed"?"Failed":"Pending"}function Wo(e){return e===56||e===97?"BSC":e===612044||e===612055||e===5555?"ONEchain":`Chain ${e}`}function Wm(e,t){return!!e&&!!t&&e.chainId===t.chainId&&e.address.toLowerCase()===t.address.toLowerCase()}function Gm(e,t){if(!(!e||!t))return e.chainId===t.chainId?"swap":Wm(e,t)||e.symbol.toLowerCase()===t.symbol.toLowerCase()?"bridge":"swap-bridge"}function Hm(e){return e==="swap"||e==="deposit-swap"||e==="swap-withdraw"}function ws(e){return!e||e==="0"||Number(e)===0}function _m(e){let t=e.trim().toLowerCase();return t?t.startsWith("minimum ")?{from:e}:t.startsWith("available ")&&t.includes("or more")?{to:e}:t.includes("insufficient balance")||t.includes("not enough balance")||t.includes("exceeds balance")||t.includes("insufficient network fee")?{from:e}:t.includes("insufficient liquidity")||t.includes("not enough liquidity")?{to:e}:{}:{}}function Qm(e){let t=e.fromToken,n=e.toToken,r=Gm(t,n),o=e.fromAmount||"0",a=e.toAmount||"0",i=r!==void 0&&!Hm(r),s=r!==void 0&&r!=="bridge";return{pathType:r,bridgeInfo:i?[{label:"Route",value:t&&n?`${Wo(t.chainId)} \u2192 ${Wo(n.chainId)}`:"-"},{label:"Validator Fee",value:ws(o)?"0":"Free",tone:ws(o)?"default":"accent"},{label:"Network Fee",value:ws(o)?"0":"Free",tone:ws(o)?"default":"accent"}]:void 0,swapInfo:s?[t&&n?{label:"Route",value:"",routeTokens:[{symbol:t.symbol,iconUrl:t.iconUrl},{symbol:n.symbol,iconUrl:n.iconUrl}]}:{label:"Route",value:"-"},{label:"Price Impact",value:"0%"},{label:"In Amount",value:o,valueToken:t?{symbol:t.symbol,iconUrl:t.iconUrl}:void 0},{label:"Swap Fee",value:"0",valueToken:t?{symbol:t.symbol,iconUrl:t.iconUrl}:void 0},{label:"Out Amount",value:a,valueToken:n?{symbol:n.symbol,iconUrl:n.iconUrl}:void 0}]:void 0,txFee:[{label:"Priority Fee Per Gas",value:"0 Gwei"},{label:"Max Fee Per Gas",value:"0 Gwei"},{label:"Gas Limit",value:"0"}],txFeeInfo:{estTxFee:"0",isDelegateFee:!1}}}function Ia({token:e,size:t=20}){let n=e?.iconUrl;return(0,m.jsx)("span",{className:"bf-token-icon","data-has-image":!!n?"true":"false",style:{width:t,height:t},children:n?(0,m.jsx)("img",{src:n,alt:"",width:t,height:t,draggable:!1}):(0,m.jsx)("span",{className:"bf-token-fallback",children:e?.symbol?.slice(0,1)??"?"})})}function ys(e,t){if(e.length===0)return;let n=e.findIndex(r=>Wm(r,t));return e[(n+1)%e.length]}function Om({label:e,token:t,amount:n,usd:r,onAmountChange:o,onTokenClick:a,locked:i=!1}){return(0,m.jsxs)("section",{className:"bf-amount-panel",children:[(0,m.jsxs)("div",{className:"bf-amount-head",children:[(0,m.jsx)("span",{children:e}),(0,m.jsxs)("span",{className:"bf-balance",children:[Um(t?.balance??"0")," ",t?.symbol??""]})]}),(0,m.jsxs)("div",{className:"bf-amount-main",children:[(0,m.jsxs)("label",{className:"bf-amount-input-wrap",children:[(0,m.jsxs)("span",{className:"bf-sr-only",children:[e," amount"]}),(0,m.jsx)("input",{type:"text",inputMode:"decimal",value:n,onChange:s=>o(s.target.value),placeholder:"0",className:"bf-amount-input","data-size":Vm(n)}),(0,m.jsx)("span",{className:"bf-amount-usd",children:r})]}),(0,m.jsxs)("button",{type:"button",className:"bf-token-pill",onClick:i?void 0:a,disabled:!i&&!a,"data-locked":i?"true":void 0,"data-track":i?void 0:"token_switch","data-track-id":e.toLowerCase(),"aria-label":`Switch ${e.toLowerCase()} token`,children:[(0,m.jsxs)("span",{className:"bf-token-pill-face",children:[(0,m.jsx)(Ia,{token:t}),(0,m.jsx)("span",{children:t?.symbol??"Select"})]},t?Fm(t):"none"),!i&&(0,m.jsx)(zn,{size:16})]})]})]})}function gy(e){if(!e)return"";let[t="",n]=e.replace(/,/g,"").split("."),r=t.replace(/\B(?=(\d{3})+(?!\d))/g,",");return n===void 0?r:`${r}.${n}`}function Vm(e){let t=e.replace(/,/g,"").trim().length;return t>26?"small":t>18?"medium":"large"}function hy(){return(0,m.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[(0,m.jsx)("path",{d:"M2.333 4.667A1.667 1.667 0 0 1 4 3h7.333A1.667 1.667 0 0 1 13 4.667v6.666A1.667 1.667 0 0 1 11.333 13H4a1.667 1.667 0 0 1-1.667-1.667V4.667Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,m.jsx)("path",{d:"M2.667 5.333h9.666c.737 0 1.334.597 1.334 1.334v2.666c0 .737-.597 1.334-1.334 1.334H9.667A2.667 2.667 0 0 1 7 8a2.667 2.667 0 0 1 2.667-2.667Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,m.jsx)("circle",{cx:"10",cy:"8",r:".75",fill:"currentColor"})]})}function Bm({label:e,token:t,amount:n,onAmountChange:r,onTokenClick:o,onMax:a,locked:i}){return(0,m.jsxs)("section",{className:"bf-embedded-amount-panel",children:[(0,m.jsxs)("div",{className:"bf-embedded-amount-head",children:[(0,m.jsxs)("span",{className:"bf-embedded-amount-label",children:[(0,m.jsx)("strong",{children:e}),!(e==="From")&&(0,m.jsx)("em",{children:"estimated"})]}),t&&(0,m.jsxs)("span",{className:"bf-embedded-balance",children:[(0,m.jsx)(hy,{}),(0,m.jsx)("span",{className:"bf-embedded-balance-value",children:Um(t.balance)}),(0,m.jsx)("span",{children:t.symbol}),a&&(0,m.jsx)("button",{type:"button",onClick:a,"aria-label":"Use maximum available balance",children:"MAX"})]})]}),(0,m.jsxs)("div",{className:"bf-embedded-amount-main",children:[(0,m.jsxs)("button",{type:"button",className:"bf-embedded-token-pill",onClick:i?void 0:o,disabled:i,"data-locked":i?"true":void 0,"aria-label":`Switch ${e.toLowerCase()} token`,children:[(0,m.jsxs)("span",{className:"bf-token-pill-face",children:[(0,m.jsx)(Ia,{token:t}),(0,m.jsx)("span",{children:t?.symbol??"Select"})]},t?Fm(t):"none"),!i&&(0,m.jsx)(zn,{size:14})]}),(0,m.jsxs)("label",{className:"bf-embedded-input-wrap",children:[(0,m.jsxs)("span",{className:"bf-sr-only",children:[e," amount"]}),(0,m.jsx)("input",{type:"text",inputMode:"decimal",value:gy(n),onChange:l=>r(l.target.value),placeholder:"0.00",className:"bf-embedded-amount-input","data-size":Vm(n)})]})]})]})}function by({flow:e,onClose:t}){let n=ue.useId(),[r,o]=ue.useState(null),a=Lm.find(y=>y.value===e.slippage),[i,s]=ue.useState(e.slippage&&!a?e.slippage:""),l=i.trim()!==""&&i.trim()!==".",d=l?Number(i):NaN,p=Number.isFinite(d)&&d>50,w=Number.isFinite(d)&&d>5&&!p,u=y=>{e.setSlippage(y),t()},h=()=>{!l||p||(e.setSlippage(Dm(i)),t())};if(ue.useEffect(()=>{o(document.body)},[]),ue.useEffect(()=>{let y=f=>{f.key==="Escape"&&t()};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[t]),!r)return null;let x=Aa();return(0,Go.createPortal)((0,m.jsx)("div",{className:"bf-slippage-overlay","data-theme":x,role:"presentation",onMouseDown:y=>{y.target===y.currentTarget&&t()},children:(0,m.jsxs)("section",{className:"bf-slippage-dialog",role:"dialog","aria-modal":"true","aria-labelledby":n,children:[(0,m.jsxs)("header",{className:"bf-slippage-head",children:[(0,m.jsx)("h3",{id:n,children:"Slippage Settings"}),(0,m.jsx)("button",{type:"button",className:"bf-slippage-close",onClick:t,"aria-label":"Close slippage settings",children:(0,m.jsx)(vn,{size:24})})]}),(0,m.jsxs)("div",{className:"bf-slippage-body",children:[(0,m.jsx)("p",{className:"bf-slippage-desc",children:"The maximum price difference you are willing to accept before the transaction is reverted. Higher slippage increases the chance of execution but may result in a worse price."}),(0,m.jsxs)("div",{className:"bf-slippage-controls",children:[(0,m.jsx)("div",{className:"bf-slippage-presets",children:Lm.map(y=>(0,m.jsx)("button",{type:"button",className:"bf-slippage-preset","data-selected":!l&&e.slippage===y.value?"true":"false",onClick:()=>u(y.value),children:y.label},y.value))}),(0,m.jsxs)("label",{className:"bf-slippage-custom","data-selected":l?"true":"false",children:[(0,m.jsx)("span",{className:"bf-sr-only",children:"Custom slippage percent"}),(0,m.jsx)("input",{value:i,onChange:y=>{s(Dm(y.target.value))},onKeyDown:y=>{y.key==="Enter"&&(y.preventDefault(),h())},inputMode:"decimal",placeholder:"Enter custom slippage",autoComplete:"off",spellCheck:!1}),(0,m.jsx)("span",{"aria-hidden":"true",children:"%"})]})]}),p?(0,m.jsx)("p",{className:"bf-slippage-message","data-variant":"error",children:"Slippage cannot exceed 50%."}):w?(0,m.jsx)("p",{className:"bf-slippage-message","data-variant":"warning",children:"Your transaction may be frontrun due to high slippage."}):null,l&&(0,m.jsx)("button",{type:"button",className:"bf-slippage-apply",onClick:h,disabled:p,children:"Apply"})]})]})}),r)}function qm({flow:e,env:t}){let n=ue.useId(),[r,o]=ue.useState(!1),[a,i]=ue.useState(null),s=Aa(),l=Xt("apps.json",t,u=>Bn(u?.legal?.termsUrl,t)),d=e.termsUrl??l??Rp;ue.useEffect(()=>{i(document.body)},[]),ue.useEffect(()=>{let u=h=>{h.key==="Escape"&&e.cancelTerms()};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[e]);let[p,w]=gs(e.termsOpen);return!a||!p?null:(0,Go.createPortal)((0,m.jsx)("div",{className:"bf-action-modal-overlay","data-theme":s,"data-state":w,role:"presentation",onPointerDown:u=>{u.target===u.currentTarget&&e.cancelTerms()},children:(0,m.jsxs)("section",{className:"bf-action-modal bf-terms-modal",role:"dialog","aria-modal":"true","aria-labelledby":n,children:[(0,m.jsx)("h3",{id:n,children:"Agree to Terms of Service"}),(0,m.jsx)("p",{className:"bf-action-modal-desc",children:"Please make sure to review the Terms of Service before using ONEUSD."}),(0,m.jsxs)("div",{className:"bf-terms-check-row","data-checked":r?"true":"false",children:[(0,m.jsx)("button",{type:"button",className:"bf-terms-check-button",role:"checkbox","aria-checked":r,"aria-label":"Agree to Terms of Use","data-track":"terms_check",onClick:()=>o(u=>!u),children:(0,m.jsx)("span",{className:"bf-terms-checkbox","data-checked":r?"true":"false","aria-hidden":"true"})}),(0,m.jsxs)("div",{className:"bf-terms-copy",children:[(0,m.jsx)("span",{className:"bf-terms-label",onClick:()=>o(u=>!u),children:"Agree to Terms of Use"}),d&&(0,m.jsx)("a",{href:d,target:"_blank",rel:"noreferrer",children:"Terms of Service"})]})]}),(0,m.jsx)("p",{className:"bf-terms-privacy",children:"I have read and acknowledged the Privacy Policy to use ONEUSD"}),(0,m.jsx)("button",{type:"button",className:"bf-action-primary",disabled:!r||e.status==="submitting",onClick:e.confirmTerms,"data-track":"terms_confirm",children:"Confirm"})]})}),a)}function wy({value:e,disabled:t=!1}){let[n,r]=ue.useState(!1);return(0,m.jsx)("button",{type:"button",className:"bf-copy-button","aria-label":"Copy token address",disabled:t,onClick:()=>{t||navigator.clipboard?.writeText(e).then(()=>{r(!0),window.setTimeout(()=>r(!1),1200)})},children:n?"OK":"Copy"})}function Ym({flow:e,approval:t}){let n=ue.useId(),[r,o]=ue.useState(null),a=Aa();ue.useEffect(()=>{o(document.body)},[]),ue.useEffect(()=>{if(!t)return;let p=w=>{e.status!=="submitting"&&w.key==="Escape"&&e.cancelApproval()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[e,t]);let[i,s]=gs(t);if(!r||!i)return null;let l=e.status==="submitting"||!e.approveBridge,d=e.status==="submitting";return(0,Go.createPortal)((0,m.jsx)("div",{className:"bf-action-modal-overlay","data-theme":a,"data-state":s,role:"presentation",children:(0,m.jsxs)("section",{className:"bf-action-modal bf-approve-modal",role:"dialog","aria-modal":"true","aria-labelledby":n,children:[(0,m.jsxs)("h3",{id:n,children:["Approve ",i.token.symbol]}),(0,m.jsx)(Ia,{token:i.token,size:72}),(0,m.jsxs)("div",{className:"bf-approve-address-box",children:[(0,m.jsx)("span",{children:"Token Address"}),(0,m.jsxs)("div",{children:[(0,m.jsx)("strong",{children:i.tokenAddress}),(0,m.jsx)(wy,{value:i.tokenAddress,disabled:d})]})]}),(0,m.jsxs)("div",{className:"bf-action-buttons",children:[(0,m.jsx)("button",{type:"button",className:"bf-action-secondary",onClick:e.cancelApproval,disabled:e.status==="submitting",children:"Cancel"}),(0,m.jsxs)("button",{type:"button",className:"bf-action-primary",onClick:e.confirmApproval,disabled:l,"aria-busy":d,"data-track":"approve_confirm",children:[d&&(0,m.jsx)("span",{className:"bf-action-button-spinner","aria-hidden":"true"}),(0,m.jsx)("span",{children:d?"Approving...":"Approve"})]})]})]})}),r)}function Km({flow:e}){let t=ue.useId(),[n,r]=ue.useState(null),o=Aa();ue.useEffect(()=>{r(document.body)},[]),ue.useEffect(()=>{if(!e.approvalSuccessOpen)return;let l=d=>{d.key==="Escape"&&e.cancelApproval()};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[e]);let[a,i]=gs(e.approvalSuccessOpen);if(!n||!a)return null;let s=e.status==="submitting";return(0,Go.createPortal)((0,m.jsx)("div",{className:"bf-action-modal-overlay","data-theme":o,"data-state":i,role:"presentation",children:(0,m.jsxs)("section",{className:"bf-action-modal bf-approval-success-modal",role:"dialog","aria-modal":"true","aria-labelledby":t,children:[(0,m.jsx)("h3",{id:t,children:"Approval Success"}),(0,m.jsx)("span",{className:"bf-success-mark","aria-hidden":"true"}),(0,m.jsxs)("p",{className:"bf-action-modal-desc",children:["Token approval confirmed successfully.",(0,m.jsx)("br",{}),"Please continue to the next step."]}),(0,m.jsxs)("div",{className:"bf-action-buttons",children:[(0,m.jsx)("button",{type:"button",className:"bf-action-secondary",onClick:e.cancelApproval,disabled:s,children:"Cancel"}),(0,m.jsxs)("button",{type:"button",className:"bf-action-primary",onClick:e.continueAfterApproval,disabled:s,"aria-busy":s,children:[s&&(0,m.jsx)("span",{className:"bf-action-button-spinner","aria-hidden":"true"}),(0,m.jsx)("span",{children:s?"Continuing...":"Continue"})]})]})]})}),n)}function yy({fromAmount:e,toAmount:t,fromToken:n,toToken:r}){let o=ue.useMemo(()=>{let i=kt(e),s=kt(t);return!i||!s||i.lte(0)||s.lte(0)?null:s.dividedBy(i)},[e,t]),a=!!(o&&n&&r&&n.symbol!==r.symbol);return(0,m.jsx)(Sa,{open:a,children:(0,m.jsxs)("div",{className:"bf-exchange-rate",children:[(0,m.jsxs)("span",{children:["1 ",n?.symbol]}),(0,m.jsx)("span",{"aria-hidden":"true",children:"="}),(0,m.jsxs)("span",{children:[o?Ta(o):""," ",r?.symbol]})]})})}function Zm({flow:e}){return e.submitToast?(0,m.jsxs)("div",{className:"bf-status-toast","data-variant":"processing",role:"status","aria-live":"polite",children:[(0,m.jsx)("span",{className:"bf-status-toast-icon","aria-hidden":"true",children:(0,m.jsx)("span",{className:"bf-status-spinner"})}),(0,m.jsxs)("span",{className:"bf-status-toast-copy",children:[(0,m.jsx)("strong",{children:"Transaction Processing"}),(0,m.jsx)("span",{children:"Your transaction is being processed on the blockchain"})]})]}):null}function Xm({message:e}){let[t,n]=ue.useState(!1);return ue.useEffect(()=>{if(!e){n(!1);return}n(!0);let r=window.setTimeout(()=>{n(!1)},3500);return()=>window.clearTimeout(r)},[e]),!e||!t?null:(0,m.jsxs)("div",{className:"bf-status-toast","data-variant":"error",role:"alert","aria-live":"assertive",children:[(0,m.jsx)("span",{className:"bf-status-toast-icon","aria-hidden":"true",children:(0,m.jsx)("span",{className:"bf-status-error-mark",children:"!"})}),(0,m.jsxs)("span",{className:"bf-status-toast-copy",children:[(0,m.jsx)("strong",{children:"Error"}),(0,m.jsx)("span",{children:e})]})]})}function xy(e){switch(e){case"swap":case"deposit-swap":case"swap-withdraw":return"Swap Transaction Sent";case"bridge":return"Bridge Transaction Sent";case"swap-bridge":return"Swap & Bridge Transaction Sent";case"bridge-swap":return"Bridge & Swap Transaction Sent";default:return"Transaction Sent"}}function Jm({flow:e}){let t=ue.useId(),[n,r]=ue.useState(null),o=e.submitted,a=Aa();return ue.useEffect(()=>{r(document.body)},[]),ue.useEffect(()=>{if(!e.successDialogOpen)return;let i=s=>{s.key==="Escape"&&e.dismissSuccessDialog()};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[e]),!n||!e.successDialogOpen||!o?null:(0,Go.createPortal)((0,m.jsx)("div",{className:"bf-success-overlay","data-theme":a,role:"presentation",children:(0,m.jsx)("section",{className:"bf-success-modal",role:"dialog","aria-modal":"true","aria-labelledby":t,children:(0,m.jsxs)("div",{className:"bf-success-body",children:[(0,m.jsx)("span",{className:"bf-success-mark","aria-hidden":"true"}),(0,m.jsxs)("div",{className:"bf-success-copy",children:[(0,m.jsx)("strong",{id:t,children:xy(o.pathType)}),(0,m.jsx)("span",{children:"Please check the results in the history."})]}),(0,m.jsx)("div",{className:"bf-success-route","aria-hidden":"true",children:(o.routeTokens&&o.routeTokens.length>0?o.routeTokens:[{symbol:o.fromToken.symbol,iconUrl:o.fromToken.iconUrl},{symbol:o.toToken.symbol,iconUrl:o.toToken.iconUrl}]).map((i,s)=>(0,m.jsxs)(ue.Fragment,{children:[s>0&&(0,m.jsx)("span",{className:"bf-success-route-arrow",children:"\u2192"}),(0,m.jsx)(Ea,{token:i,size:43})]},`${i.symbol}-${s}`))}),(0,m.jsx)("button",{type:"button",className:"bf-success-ok",onClick:e.dismissSuccessDialog,"data-track":"success_ok",children:"OK"})]})})}),n)}function Ea({token:e,size:t=16}){let n=!!e.iconUrl;return(0,m.jsx)("span",{className:"bf-token-icon","data-has-image":n?"true":"false",style:{width:t,height:t},children:e.iconUrl?(0,m.jsx)("img",{src:e.iconUrl,alt:"",width:t,height:t,draggable:!1}):(0,m.jsx)("span",{className:"bf-token-fallback",children:e.symbol?.slice(0,1)??"?"})})}function vy({row:e}){return e.routeTokens&&e.routeTokens.length>0?(0,m.jsx)("span",{className:"bf-info-route",children:e.routeTokens.map((t,n)=>(0,m.jsxs)(ue.Fragment,{children:[n>0&&(0,m.jsx)("span",{className:"bf-info-route-arrow","aria-hidden":"true",children:"\u2192"}),(0,m.jsx)(Ea,{token:t})]},`${t.symbol}-${n}`))}):e.valueToken?(0,m.jsxs)("span",{className:"bf-info-value-token",children:[(0,m.jsx)(Ea,{token:e.valueToken}),(0,m.jsx)("span",{children:e.value})]}):(0,m.jsx)(m.Fragment,{children:e.value})}function $m({rows:e}){return!e||e.length===0?null:(0,m.jsx)("div",{className:"bf-info-rows",children:e.map(t=>(0,m.jsxs)("div",{className:"bf-info-row",children:[(0,m.jsx)("span",{className:"bf-info-label",children:t.label}),(0,m.jsx)("span",{className:"bf-info-value","data-tone":t.tone??"default",children:(0,m.jsx)(vy,{row:t})})]},`${t.label}-${t.value}`))})}function ky(e,t,n){return e.pathType==="bridge"?"Bridge Info":Hm(e.pathType)?"Swap Info":t&&n?"Swap & Bridge Info":t?"Bridge Info":"Swap Info"}function Sa({open:e,className:t,children:n}){let r=ue.useRef(null);return e&&(r.current=n),(0,m.jsx)("div",{className:t?`bf-collapse ${t}`:"bf-collapse","data-open":e?"true":"false","aria-hidden":e?void 0:!0,children:(0,m.jsx)("div",{className:"bf-collapse-inner",children:e?n:r.current})})}function Cy({summary:e,from:t,to:n,feeDelegated:r}){let o=!!e.bridgeInfo?.length,a=!!e.swapInfo?.length,i=!!e.txFee?.length,s=ky(e,o,a),[l,d]=ue.useState(!0),[p,w]=ue.useState(!0);return(0,m.jsxs)("div",{className:"bf-details",children:[e.liquidity&&(0,m.jsxs)("section",{className:"bf-liquidity",children:[(0,m.jsxs)("div",{className:"bf-liquidity-head",children:[(0,m.jsx)("span",{children:e.liquidity.label??"Available Liquidity"}),(0,m.jsx)("span",{className:"bf-liquidity-status","data-status":e.liquidity.status,children:e.liquidity.status??"Normal"})]}),(0,m.jsx)("div",{className:"bf-liquidity-track",children:(0,m.jsx)("span",{style:{width:`${e.liquidity.percentage??50}%`}})})]}),(o||a)&&(0,m.jsxs)("section",{className:"bf-detail-section bf-info-card","data-open":l?"true":"false",children:[(0,m.jsxs)("button",{type:"button",className:"bf-collapse-head","aria-expanded":l,onClick:()=>d(u=>!u),"data-track":"details_toggle",children:[(0,m.jsx)("h3",{children:s}),(0,m.jsx)(zn,{size:16,className:"bf-collapse-chevron"})]}),l&&(0,m.jsx)("div",{className:"bf-collapse-body",children:(0,m.jsx)(ng,{summary:e,from:t,to:n,feeDelegated:r})})]}),i&&(0,m.jsxs)("section",{className:"bf-detail-section bf-tx-fee-section","data-open":p?"true":"false",children:[(0,m.jsxs)("button",{type:"button",className:"bf-collapse-head bf-tx-fee-head","aria-expanded":p,onClick:()=>w(u=>!u),"data-track":"details_toggle",children:[(0,m.jsx)("h3",{children:"Est. Tx Fee"}),(0,m.jsxs)("div",{className:"bf-tx-fee-total",children:[e.txFeeInfo?.isDelegateFee&&(0,m.jsx)("span",{className:"bf-fee-delegated",children:"Fee Delegated"}),e.txFeeInfo?.tokenIconUrl&&(0,m.jsx)("img",{className:"bf-tx-fee-token",src:e.txFeeInfo.tokenIconUrl,alt:e.txFeeInfo.tokenSymbol??"",width:16,height:16,draggable:!1}),(0,m.jsx)("span",{"data-delegated":e.txFeeInfo?.isDelegateFee&&Number(e.txFeeInfo?.estTxFee)>0?"true":void 0,children:ly(e.txFeeInfo?.estTxFee??"0")}),(0,m.jsx)(zn,{size:16,className:"bf-collapse-chevron"})]})]}),p&&(0,m.jsx)("div",{className:"bf-collapse-body",children:(0,m.jsx)($m,{rows:e.txFee})})]})]})}function Ry(e){return{...e,bridgeInfo:e.bridgeInfo?.map(t=>({...t,value:t.label==="Route"?t.value.replace(/\bCROSS\b/g,"ONEchain"):t.value})),swapInfo:e.swapInfo?.map(t=>({...t,label:t.label.startsWith("Swap Fee")?"Est. Swap Fee":t.label}))}}function xs(e){let t=kt(e);if(!(!t||t.lte(0)))return Ta(t)}function Ny(e,t,n,r){if(!n||!r)return;let o=kt(e),a=kt(t);if(!o||!a||o.lte(0)||a.lte(0))return;let i=a.dividedBy(o);if(i.gte("0.001"))return`1 ${n.symbol} = ${Ta(i)} ${r.symbol}`;let s=o.dividedBy(a);return`1 ${r.symbol} = ${Ta(s)} ${n.symbol}`}var Sy=1,Ty=5;function eg(e){return kt(e)?.toNumber()??null}function tg(e){let t=eg(e);if(t!==null){if(t>=Ty)return"danger";if(t>=Sy)return"warning"}}var Iy=/\bin\b.*amount|amount.*\bin\b|^from\b/i,Ey=/\bout\b.*amount|amount.*\bout\b|^to\b|receive/i,Ay=/fee/i,My=/impact|rate|slippage|minimum|min\.|received/i,vs=/impact/i,Ly=/^route$/i;function Dy(e,t,n){let r=e.find(p=>Iy.test(p.label)),o=e.find(p=>Ey.test(p.label)),a=new Set;r&&a.add(r),o&&a.add(o);let i=e.find(p=>Ly.test(p.label)||(p.routeTokens?.length??0)>0),s=i?.routeTokens?.length?i.routeTokens:void 0,l=i&&!s?i.value:void 0;i&&a.add(i);let d=[];for(let p of e){if(a.has(p))continue;let w=Ay.test(p.label);if(!w&&!My.test(p.label))continue;a.add(p);let u=eg(p.value),h=w&&(u===0||/^\s*free\s*$/i.test(String(p.value??"")));h&&t==="swap"||d.push({text:h?`${p.label} Free`:`${p.label} ${p.value}`,tone:h?"accent":vs.test(p.label)?p.tone==="danger"||p.tone==="warning"?p.tone:tg(p.value):void 0})}return{key:t,label:n,routeText:l,routeTokens:s,inRow:r,outRow:o,meta:d,rest:e.filter(p=>!a.has(p))}}function Py({steps:e}){return(0,m.jsx)("div",{className:"bf-route-steps",children:e.map((t,n)=>(0,m.jsxs)("div",{className:"bf-route-step","data-last":n===e.length-1?"true":"false","data-kind":t.key.startsWith("hop-")?"hop":"endpoint",children:[(0,m.jsxs)("span",{className:"bf-route-rail","aria-hidden":"true",children:[(0,m.jsx)("span",{className:"bf-route-line"}),(0,m.jsx)("span",{className:"bf-route-dot","data-final":n===e.length-1?"true":"false"})]}),(0,m.jsxs)("span",{className:"bf-route-body",children:[(0,m.jsxs)("span",{className:"bf-route-head",children:[(0,m.jsx)("span",{className:"bf-route-title",children:t.title}),(0,m.jsx)("span",{className:"bf-route-amount",children:t.routeTokens?.length?t.routeTokens.map((r,o)=>(0,m.jsxs)(ue.Fragment,{children:[o>0&&(0,m.jsx)("span",{className:"bf-info-route-arrow","aria-hidden":"true",children:"\u2192"}),(0,m.jsx)(Ea,{token:r})]},`${r.symbol}-${o}`)):(0,m.jsxs)(m.Fragment,{children:[t.amountToken&&(0,m.jsx)(Ea,{token:t.amountToken}),(0,m.jsx)("span",{className:"bf-route-amount-value",children:t.amount},t.amount)]})})]}),(t.meta.length>0||t.tags.length>0)&&(0,m.jsxs)("span",{className:"bf-route-meta",children:[t.meta.map(r=>(0,m.jsx)("span",{"data-tone":r.tone??"default",children:r.text},r.text)),t.tags.map(r=>(0,m.jsx)("span",{className:"bf-route-tag",children:r},r))]})]})]},t.key))})}function Oy(e){if(!vs.test(e.label)||e.tone==="danger"||e.tone==="warning")return e;let t=tg(e.value);return t?{...e,tone:t}:e}function ng({summary:e,rateLine:t,from:n,to:r,feeDelegated:o,includeTxFee:a=!1}){let i=!!e.txFeeInfo?.isDelegateFee||!!o,s=ue.useMemo(()=>(e.pathType==="bridge-swap"?[["bridge","Bridge"],["swap","Swap"]]:[["swap","Swap"],["bridge","Bridge"]]).map(([C,N])=>{let I=C==="swap"?e.swapInfo:e.bridgeInfo;return I?.length?Dy(I,C,N):null}).filter(C=>C!==null),[e]);if(s.length===0)return null;let l=s[0],d=s[s.length-1],p=l.inRow?.valueToken??(n?.symbol?{symbol:n.symbol,iconUrl:n.iconUrl}:void 0),w=l.inRow?.value??n?.amount,u=d.outRow?.valueToken??(r?.symbol?{symbol:r.symbol,iconUrl:r.iconUrl}:void 0),h=d.outRow?.value??r?.amount;if(!w)return null;let x=e.txFeeInfo,y=a&&x&&!x.isDelegateFee?[{text:`Gas ${x.estTxFee}${x.tokenSymbol?` ${x.tokenSymbol}`:""}`}]:[],f=s.length>1,c=[{key:"send",title:`Send ${p?.symbol??""}`.trim(),amount:w,amountToken:p,routeTokens:f?void 0:l.routeTokens,meta:[...y.length?[{text:"EST."}]:n?.chain?[{text:`on ${n.chain}`}]:[],...y,...f?[]:[...l.routeText?[{text:l.routeText}]:[],...l.meta.filter(v=>!vs.test(v.text))]],tags:i&&!f?["Fee delegated"]:[]},...f?s.map(v=>({key:`hop-${v.key}`,title:v.label,amount:v.routeText??"",routeTokens:v.routeTokens,meta:v.meta,tags:i&&v.key==="swap"?["Fee delegated"]:[]})):[],{key:"receive",title:`Receive ${u?.symbol??""}`.trim(),amount:h??"\u2014",amountToken:u,meta:[...r?.chain?[{text:`on ${r.chain}`}]:[],...f?[]:l.meta.filter(v=>vs.test(v.text))],tags:[]}],b=[...s.flatMap(v=>v.rest),...a?e.txFee??[]:[]].map(Oy),g=!!t;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(Py,{steps:c}),(b.length>0||g)&&(0,m.jsx)("div",{className:"bf-info-section",children:(0,m.jsx)($m,{rows:[...g?[{label:"Rate",value:t}]:[],...b]})})]})}function By({summary:e,rateLine:t,from:n,to:r,feeDelegated:o}){let a=ue.useMemo(()=>Ry(e),[e]);return!a.bridgeInfo?.length&&!a.swapInfo?.length?null:(0,m.jsx)("div",{className:"bf-embedded-details",children:(0,m.jsx)(ng,{summary:a,rateLine:t,from:n,to:r,feeDelegated:o,includeTxFee:!0})})}function zy({flow:e,env:t,toastError:n}){return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(qm,{flow:e,env:t}),(0,m.jsx)(Ym,{flow:e,approval:e.approvalInfo??null}),(0,m.jsx)(Km,{flow:e}),(0,m.jsx)(Zm,{flow:e}),(0,m.jsx)(Xm,{message:e.submitToast?"":n}),(0,m.jsx)(Jm,{flow:e})]})}function Fy({flow:e,env:t,isConnected:n,onRequestConnect:r,feeDelegated:o}){let a=Number(e.fromAmount)>0,i=ue.useMemo(()=>a?e.summary??Qm(e):null,[a,e]),s=_m(e.quoteError),l=jm(e.fromAmount,e.fromToken),d=l?"Insufficient balance":s.from,p=/insufficient liquidity|not enough liquidity/i.test(e.quoteError),w=p?void 0:s.to,u=e.quoteError&&!s.from&&!s.to?e.quoteError:"",h=e.error||u,x=e.status==="submitting",y=!a||!e.toAmount||!e.fromToken||!e.toToken||!e.canSubmit||!!e.quoteError||l||x,f=x?"":p&&a?"Insufficient Liquidity":a?"Continue":"Enter Amount";return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("main",{className:"bf-body bf-embedded-body","data-rd-scroll-area":!0,children:(0,m.jsxs)("div",{className:"bf-embedded-form",children:[(0,m.jsxs)("div",{className:"bf-embedded-fields",children:[(0,m.jsxs)("div",{className:"bf-embedded-field-group",children:[(0,m.jsx)(Bm,{label:"From",token:e.fromToken,amount:e.fromAmount,onAmountChange:c=>e.setAmount(c,"from"),onTokenClick:()=>{let c=ys(e.tokens,e.fromToken);c&&e.selectFromToken(c)},onMax:e.setMax,locked:e.tokens.length<=1}),d&&(0,m.jsx)("div",{className:"bf-embedded-field-error",children:d})]}),(0,m.jsx)("div",{className:"bf-embedded-direction","aria-hidden":"true",children:(0,m.jsx)("span",{children:(0,m.jsx)(kd,{size:16})})}),(0,m.jsxs)("div",{className:"bf-embedded-field-group",children:[(0,m.jsx)(Bm,{label:"To",token:e.toToken,amount:e.toAmount,onAmountChange:c=>e.setAmount(c,"to"),onTokenClick:()=>{let c=ys(e.availableToTokens,e.toToken);c&&e.selectToToken(c)},locked:e.availableToTokens.length<=1}),w&&(0,m.jsx)("div",{className:"bf-embedded-field-error",children:w})]})]}),(0,m.jsx)(Sa,{open:!!i?.liquidity,children:i?.liquidity&&(0,m.jsxs)("section",{className:"bf-embedded-liquidity",children:[(0,m.jsxs)("div",{children:[(0,m.jsx)("span",{children:i.liquidity.label??"Available Liquidity"}),(0,m.jsx)("span",{"data-status":i.liquidity.status,children:i.liquidity.status??"normal"})]}),(0,m.jsx)("span",{className:"bf-embedded-liquidity-track",children:(0,m.jsx)("span",{style:{width:`${i.liquidity.percentage??50}%`}})})]})}),(0,m.jsx)(Sa,{open:p&&a,children:(0,m.jsx)("div",{className:"bf-embedded-liquidity-error",role:"alert",children:"Insufficient liquidity in all pools for this pair and amount."})}),(0,m.jsx)(Sa,{open:!!i,children:i&&(0,m.jsx)("div",{className:"bf-embedded-summary",children:(0,m.jsx)(By,{summary:i,feeDelegated:o,rateLine:Ny(e.fromAmount,e.toAmount,e.fromToken,e.toToken),from:{symbol:e.fromToken?.symbol,iconUrl:e.fromToken?.iconUrl,amount:xs(e.fromAmount),chain:e.fromToken?Wo(e.fromToken.chainId):void 0},to:{symbol:e.toToken?.symbol,iconUrl:e.toToken?.iconUrl,amount:xs(e.toAmount),chain:e.toToken?Wo(e.toToken.chainId):void 0}})})}),(0,m.jsx)("div",{className:"bf-embedded-action-footer",children:n?(0,m.jsx)("button",{type:"button",className:"bf-embedded-cta",onClick:e.submit,"data-track":"next",disabled:y,"aria-busy":x,"aria-label":x?"Processing transaction":p?"Insufficient liquidity":"Continue with swap or bridge",children:x?(0,m.jsx)("span",{className:"bf-embedded-spinner","aria-hidden":"true"}):f}):(0,m.jsx)("button",{type:"button",className:"bf-embedded-cta",onClick:r,"data-track":"connect_click","aria-label":"Connect wallet to continue",children:"Connect Wallet"})})]})}),(0,m.jsx)(zy,{flow:e,env:t,toastError:h})]})}function Uy({item:e}){let t=ks(e),n=uy(e.fromAmount,e.fromToken);return(0,m.jsxs)("article",{className:"bf-history-item",children:[(0,m.jsxs)("div",{className:"bf-history-item-head",children:[(0,m.jsx)("span",{className:"bf-history-status","data-status":t,children:my(t)}),(0,m.jsx)("time",{className:"bf-history-time",dateTime:e.timestamp,children:cy(e.timestamp)})]}),(0,m.jsxs)("div",{className:"bf-history-item-body",children:[(0,m.jsxs)("strong",{className:"bf-history-amount",children:[py(e.fromAmount)," ",e.fromToken.symbol]}),(0,m.jsxs)("div",{className:"bf-history-meta",children:[(0,m.jsx)("span",{className:"bf-history-usd",children:n??dy(e.txHash)}),(0,m.jsxs)("span",{className:"bf-history-route",children:[(0,m.jsxs)("span",{className:"bf-history-route-token",children:[(0,m.jsx)(Ia,{token:e.fromToken,size:16}),(0,m.jsx)("span",{children:e.fromToken.symbol})]}),(0,m.jsx)(vm,{size:16,className:"bf-history-route-arrow"}),(0,m.jsxs)("span",{className:"bf-history-route-token",children:[(0,m.jsx)(Ia,{token:e.toToken,size:16}),(0,m.jsx)("span",{children:e.toToken.symbol})]})]})]})]})]})}function jy({flow:e}){let[t,n]=ue.useState("all"),r=e.history.some(i=>ks(i)==="pending"),o=e.history.filter(i=>fy(i,t)),a=t==="all"?"No bridge history yet.":`No ${t} bridge history.`;return(0,m.jsxs)("main",{className:"bf-history-body",children:[(0,m.jsx)("nav",{className:"bf-history-tabs","aria-label":"Bridge history filters",children:iy.map(i=>(0,m.jsxs)("button",{type:"button",className:"bf-history-tab","data-active":t===i.value?"true":"false",onClick:()=>n(i.value),"data-track":"history_filter","data-track-id":i.value,children:[(0,m.jsx)("span",{children:i.label}),i.value==="pending"&&r&&(0,m.jsx)("span",{className:"bf-history-tab-dot","aria-hidden":"true"})]},i.value))}),o.length>0?(0,m.jsx)("div",{className:"bf-history-list",children:o.map(i=>(0,m.jsx)(Uy,{item:i},i.id||i.txHash))}):(0,m.jsx)("div",{className:"bf-empty",children:a})]})}function Wy({flow:e,env:t,feeDelegated:n}){let[r,o]=ue.useState(!1),[a,i]=ue.useState(0),s=!!(e.fromAmount.trim()||e.toAmount.trim()),l=ue.useMemo(()=>s?e.summary??Qm(e):null,[s,e]),d=Xt("apps.json",t,b=>Bn(b?.bridgePoweredBy?.url,t)),p=_m(e.quoteError),w=jm(e.fromAmount,e.fromToken),u=w?"Insufficient balance":p.from,h=e.quoteError&&!p.from&&!p.to?e.quoteError:"",x=e.error||h,y=e.history.some(b=>ks(b)==="pending"),c=(l?.pathType??Gm(e.fromToken,e.toToken))!=="bridge";return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("main",{className:"bf-body",children:[(0,m.jsxs)("div",{className:"bf-toolbar",children:[(0,m.jsxs)("button",{type:"button",className:"bf-chip bf-chip-history",onClick:()=>e.setStep("history"),"data-track":"history_open",children:[(0,m.jsx)(ym,{}),(0,m.jsx)("span",{children:"History"}),(y||e.hasNewHistory)&&(0,m.jsx)("span",{className:"bf-chip-dot","aria-hidden":"true"})]}),c&&(0,m.jsxs)("button",{type:"button",className:"bf-chip",onClick:()=>o(!0),"data-track":"slippage_open",disabled:e.slippageLocked,"aria-haspopup":"dialog","aria-expanded":r,children:[(0,m.jsx)(xm,{}),(0,m.jsx)("span",{children:e.slippageLocked?"Auto 1%":sy(e.slippage,e.effectiveSlippage)})]})]}),(0,m.jsxs)("div",{className:"bf-swap-card","data-has-from-error":u?"true":"false",children:[(0,m.jsx)(Om,{label:"From",token:e.fromToken,amount:e.fromAmount,usd:Pm(e.fromAmount,e.fromToken),onAmountChange:b=>e.setAmount(b,"from"),onTokenClick:()=>{let b=ys(e.tokens,e.fromToken);b&&e.selectFromToken(b)},locked:e.tokens.length<=1}),u&&(0,m.jsx)("div",{className:"bf-field-error",children:u}),(0,m.jsx)("button",{type:"button",className:"bf-swap-toggle",onClick:()=>{e.swapTokens(),i(b=>b+360)},"data-track":"token_swap",style:{transform:`translateX(-50%) rotate(${a}deg)`,transition:"transform 0.2s ease"},children:(0,m.jsx)(kd,{size:22})}),(0,m.jsx)(Om,{label:"To",token:e.toToken,amount:e.toAmount,usd:Pm(e.toAmount,e.toToken),onAmountChange:b=>e.setAmount(b,"to"),onTokenClick:()=>{let b=ys(e.availableToTokens,e.toToken);b&&e.selectToToken(b)},locked:e.availableToTokens.length<=1}),p.to&&(0,m.jsx)("div",{className:"bf-field-error",children:p.to})]}),(0,m.jsx)(yy,{fromAmount:e.fromAmount,toAmount:e.toAmount,fromToken:e.fromToken,toToken:e.toToken}),(0,m.jsx)(Sa,{open:!!l,children:l&&(0,m.jsx)(Cy,{summary:l,feeDelegated:n,from:{symbol:e.fromToken?.symbol,iconUrl:e.fromToken?.iconUrl,amount:xs(e.fromAmount),chain:e.fromToken?Wo(e.fromToken.chainId):void 0},to:{symbol:e.toToken?.symbol,iconUrl:e.toToken?.iconUrl,amount:xs(e.toAmount),chain:e.toToken?Wo(e.toToken.chainId):void 0}})})]}),(0,m.jsxs)("footer",{className:"bf-footer",children:[(0,m.jsx)("button",{type:"button",className:"bf-next",onClick:e.submit,"data-track":"next",disabled:e.status==="submitting"||!!e.quoteError||w,children:e.status==="submitting"?"Processing...":"Next"}),d&&(0,m.jsxs)("a",{className:"bf-powered",href:d,target:"_blank",rel:"noreferrer",children:["Powered by ",(0,m.jsx)("span",{className:"bf-powered-brand",children:"CROSS DeFi"})]})]}),r&&(0,m.jsx)(by,{flow:e,onClose:()=>o(!1)}),(0,m.jsx)(qm,{flow:e,env:t}),(0,m.jsx)(Ym,{flow:e,approval:e.approvalInfo??null}),(0,m.jsx)(Km,{flow:e}),(0,m.jsx)(Zm,{flow:e}),(0,m.jsx)(Xm,{message:e.submitToast?"":x}),(0,m.jsx)(Jm,{flow:e})]})}function mo({onClose:e,onBackToWallet:t,feeDelegated:n,env:r,variant:o="default",title:a,isConnected:i,onRequestConnect:s,className:l,...d}){let p=ue.useMemo(()=>it(r),[r]),w=wm(),u=Mm({...d,onExit:t}),h=ue.useRef(null),x=ay(h),y=u.step==="history"?"History":a??"Swap & Bridge",f=i??!!d.walletAddress,c=o==="embedded"&&u.step==="form"&&!t?null:u.back;return(0,m.jsx)(Le,{feature:"bridge",children:(0,m.jsx)(zm.Provider,{value:x,children:(0,m.jsxs)("div",{ref:h,className:Ee("bf-root",l),"data-view":u.step,"data-status":u.status,"data-variant":o,"data-soft-keyboard-open":o==="embedded"&&w?"true":"false",children:[(0,m.jsxs)("header",{className:"bf-header",children:[c?(0,m.jsx)("button",{type:"button",className:"bf-header-btn",onClick:c,"aria-label":"Back",children:(0,m.jsx)(En,{size:24})}):(0,m.jsx)("span",{className:"bf-header-spacer","aria-hidden":"true"}),(0,m.jsx)("span",{className:"bf-header-title","data-clickable":c?"true":"false",onClick:c??void 0,children:y}),(0,m.jsx)("button",{type:"button",className:"bf-header-btn",onClick:e,"aria-label":"Close","data-wi-close":!0,children:(0,m.jsx)(vn,{size:24})})]}),u.step==="history"?(0,m.jsx)(jy,{flow:u}):o==="embedded"?(0,m.jsx)(Fy,{flow:u,env:p,isConnected:f,onRequestConnect:s,feeDelegated:n}):(0,m.jsx)(Wy,{flow:u,env:p,feeDelegated:n})]})})})}var yn=_(require("react"),1),cg=_(require("bignumber.js"),1);var rg=require("@tanstack/react-query");var Gy="token-history";function og(e,t,n,r,o=!0){return(0,rg.useInfiniteQuery)({queryKey:[Gy,e,t,n.toLowerCase(),r.toLowerCase()],initialPageParam:void 0,queryFn:async({pageParam:a,signal:i})=>{let s=await Be("walletServer",e),l=new URLSearchParams({chain_id:String(t),token:n,wallet:r}),d=a;d&&(l.set("last_timestamp",String(d.last_timestamp)),l.set("last_log_index",String(d.last_log_index)),l.set("last_tx_index",String(d.last_tx_index)));let p=await fetch(`${s}/v1/public/token/historical?${l}`,{cache:"no-store",signal:i});if(!p.ok)throw new Error(`Failed to fetch token history: ${p.status}`);let w=await p.json();if(w.code!==200)throw new Error(`Token history API error: ${w.code}`);return w.data??[]},getNextPageParam:a=>{if(!a||a.length===0)return;let i=a[a.length-1];return{last_timestamp:i.timestamp,last_log_index:i.log_index,last_tx_index:i.tx_index}},enabled:o&&!!r&&!!n&&t>0,staleTime:1e4})}var Cs=_(require("react"),1);var Sd={chart:!1,balance:!0,overview:!1,social:!1,history:!0},Hy=Object.keys(Sd);function ag(e){let[t,n]=Cs.useState({visibility:Sd,isLoaded:!1});return Cs.useEffect(()=>{let r=!0;return vr(fi,e).then(o=>{if(!r)return;let a=o?.tokenDetail?.sections,i={...Sd};if(a)for(let s of Hy){let l=a[s];typeof l=="boolean"&&(i[s]=l)}n({visibility:i,isLoaded:!0})}),()=>{r=!1}},[e]),t}var kn=_(require("react"),1);var Rs=require("@tanstack/react-query");var _y="token-price-history";function ig(e,t,n,r,o=!0){return(0,Rs.useQuery)({queryKey:[_y,e,t,n.toLowerCase(),r],queryFn:async({signal:a})=>{let i=await Be("walletServer",e),s=new URLSearchParams({chain_id:String(t),token:n,interval:r}),l=await fetch(`${i}/v1/public/token/price/historical?${s}`,{cache:"no-store",signal:a});if(!l.ok)throw new Error(`Failed to fetch token price history: ${l.status}`);let d=await l.json();if(d.code!==200)throw new Error(`Token price history API error: ${d.code}`);return d.data??[]},enabled:o&&!!n&&t>0,staleTime:3e4,placeholderData:Rs.keepPreviousData})}var ut=require("react/jsx-runtime"),Qy="var(--ds-system-green-high, #00a869)",Vy="var(--wi-error, #e70077)",go=150,Ns=3,Td=18,qy=18,Yy=[{key:"10m",label:"10m"},{key:"1h",label:"1H"},{key:"1d",label:"1D"},{key:"7d",label:"1W"},{key:"30d",label:"1M"},{key:"1y",label:"1Y"}],Ky=new Set(["7d","30d","1y"]);function Zy(){let e=kn.useRef(null),[t,n]=kn.useState(0);return kn.useEffect(()=>{let r=e.current;if(!r)return;let o=new ResizeObserver(a=>{n(a[0]?.contentRect.width??0)});return o.observe(r),n(r.clientWidth),()=>o.disconnect()},[]),[e,t]}function Xy(e,t){let n=new Date(e*1e3),r=t?{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}:{hour:"numeric",minute:"2-digit"};return new Intl.DateTimeFormat("en-US",r).format(n)}function Jy(e,t){if(t<=0||e.length===0)return null;let n=e.length===1?[e[0],e[0]]:e,r=n.length,o=n[0],a=n[0],i=0,s=0;for(let b=1;b<r;b++)n[b]>o&&(o=n[b],i=b),n[b]<a&&(a=n[b],s=b);let l=o-a||1,d=Math.max(1,t-Ns*2),p=go-Td-qy,w=b=>r===1?t/2:Ns+b/(r-1)*d,u=b=>Td+(1-(b-a)/l)*p,h=n.map((b,g)=>({x:w(g),y:u(b)})),x=h.map((b,g)=>`${g===0?"M":"L"}${b.x.toFixed(2)},${b.y.toFixed(2)}`).join(" "),y=h[0],f=h[h.length-1],c=`${x} L${f.x.toFixed(2)},${go} L${y.x.toFixed(2)},${go} Z`;return{values:n,points:h,linePath:x,areaPath:c,maxIdx:i,minIdx:s}}function sg({env:e,chainId:t,tokenAddress:n}){let[r,o]=kn.useState("1d"),[a,i]=kn.useState(null),s=kn.useId(),[l,d]=Zy(),{data:p,isLoading:w,isError:u}=ig(e,t,n,r,!0),h=kn.useMemo(()=>(p??[]).filter(j=>Number.isFinite(Number(j.price))).slice().sort((j,le)=>j.updated_at-le.updated_at),[p]),x=kn.useMemo(()=>h.map(A=>Number(A.price)),[h]),y=kn.useMemo(()=>Jy(x,d),[x,d]);kn.useEffect(()=>{i(null)},[r]);let f=h.length>0,c=a!==null&&a<x.length?a:x.length-1,b=f?x[c]:0,g=f?x[0]:0,v=g!==0?(b-g)/g*100:0,C=v>=0,N=C?Qy:Vy,I=(C?"+":"-")+(Math.floor(Math.abs(v)*100)/100).toFixed(2)+"%",R=a!==null&&h[a]?Xy(h[a].updated_at,Ky.has(r)):"",S=A=>{if(!y||d<=0)return;let j=A.currentTarget.getBoundingClientRect(),le=A.clientX-j.left;if(y.values.length<=1){i(0);return}let ne=Math.max(1,d-Ns*2),V=Math.min(1,Math.max(0,(le-Ns)/ne)),ee=Math.round(V*(h.length-1));i(Math.min(h.length-1,Math.max(0,ee)))},E=()=>i(null);if(!w&&(u||!f))return null;let M=a!==null&&y&&y.points[a]?y.points[a]:null,z=y?.points[y.maxIdx],L=y?.points[y.minIdx],G=A=>Math.min(Math.max(A,24),Math.max(24,d-24));return(0,ut.jsxs)("section",{className:"wi-td-chart",children:[(0,ut.jsxs)("div",{className:"wi-td-chart-panel",children:[(0,ut.jsx)("span",{className:"wi-td-chart-price",children:f?io(b):"\u2014"}),f&&(0,ut.jsxs)("span",{className:"wi-td-chart-change","data-positive":C,children:[(0,ut.jsx)("span",{children:I}),R&&(0,ut.jsx)("span",{className:"wi-td-chart-when",children:R})]})]}),(0,ut.jsx)("div",{ref:l,className:"wi-td-chart-plot",children:w&&!f?(0,ut.jsx)("div",{className:"wi-skeleton-block wi-td-chart-skeleton"}):y&&d>0&&(0,ut.jsxs)("svg",{className:"wi-td-chart-svg",width:d,height:go,role:"img","aria-label":"Price chart",children:[(0,ut.jsx)("defs",{children:(0,ut.jsxs)("linearGradient",{id:s,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,ut.jsx)("stop",{offset:"0%",stopColor:N,stopOpacity:.28}),(0,ut.jsx)("stop",{offset:"100%",stopColor:N,stopOpacity:0})]})}),(0,ut.jsx)("path",{d:y.areaPath,fill:`url(#${s})`}),(0,ut.jsx)("path",{d:y.linePath,fill:"none",stroke:N,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),z&&(0,ut.jsx)("text",{className:"wi-td-chart-minmax",x:G(z.x),y:Math.max(11,z.y-7),textAnchor:"middle",children:io(y.values[y.maxIdx])}),L&&y.minIdx!==y.maxIdx&&(0,ut.jsx)("text",{className:"wi-td-chart-minmax",x:G(L.x),y:Math.min(go-5,L.y+14),textAnchor:"middle",children:io(y.values[y.minIdx])}),M&&(0,ut.jsxs)(ut.Fragment,{children:[(0,ut.jsx)("line",{className:"wi-td-chart-cursor",x1:M.x,y1:Td-6,x2:M.x,y2:go}),(0,ut.jsx)("circle",{cx:M.x,cy:M.y,r:4,fill:N,stroke:"var(--wi-surface-bg, #121212)",strokeWidth:2})]}),(0,ut.jsx)("rect",{x:0,y:0,width:d,height:go,fill:"transparent",style:{touchAction:"none"},onPointerMove:S,onPointerDown:S,onPointerLeave:E,onPointerCancel:E})]})}),(0,ut.jsx)("div",{className:"wi-td-chart-tabs",role:"tablist",children:Yy.map(A=>(0,ut.jsx)("button",{type:"button",role:"tab","aria-selected":r===A.key,className:"wi-td-chart-tab","data-active":r===A.key||void 0,onClick:()=>o(A.key),"data-track":"token_detail_interval","data-track-id":A.key,children:A.label},A.key))})]})}var B=require("react/jsx-runtime"),$y="https://contents.crosstoken.io/wallet/token/images/FT.png",ex={receive:"Receive",send:"Send","bridge-in":"Bridge In","bridge-out":"Bridge Out"};function tx(e){return e.length>24?"xs":e.length>18?"sm":"md"}function nx(e){if(!e)return"";let t=e<1e12?e*1e3:e,n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"just now";let r=Math.floor(n/60);if(r<60)return`${r}m`;let o=Math.floor(r/60);if(o<24)return`about ${o}h`;let a=Math.floor(o/24);if(a<30)return`${a}d`;let i=Math.floor(a/30);return i<12?`${i}mo`:`${Math.floor(i/12)}y`}function lg(e){let[t,n]=e.split("."),r="";for(let o=0;o<t.length;o++){let a=t.length-o;o>0&&a%3===0&&(r+=","),r+=t[o]}return n?`${r}.${n}`:r}function dg(e,t){let n=BigInt(e||"0");if(t<=2){let i=10n**BigInt(t),s=n/i,l=n%i*10n**BigInt(2-t);return`${s.toString()}.${l.toString().padStart(2,"0")}`}let r=n/10n**BigInt(t-2),o=r/100n,a=r%100n;return`${o.toString()}.${a.toString().padStart(2,"0")}`}function rx(e,t,n){let r=yn.useRef(null),o=yn.useRef(null),[a,i]=yn.useState(t);return yn.useLayoutEffect(()=>{let s=r.current,l=o.current;if(!s||!l)return;let d=()=>{let w=s.clientWidth;if(!w)return;let u=window.getComputedStyle(l),h=document.createElement("span");h.textContent=l.textContent,h.style.cssText=["position:absolute","left:-9999px","top:-9999px","visibility:hidden","white-space:nowrap",`font-family:${u.fontFamily}`,`font-weight:${u.fontWeight}`,`letter-spacing:${u.letterSpacing}`,`font-size:${t}px`].join(";"),document.body.appendChild(h);let x=h.offsetWidth;if(document.body.removeChild(h),x<=w){i(t);return}let y=Math.max(n,Math.floor(t*w/x));i(y)};d();let p=new ResizeObserver(d);return p.observe(s),()=>p.disconnect()},[e,t,n]),{containerRef:r,textRef:o,fontSize:a}}function ox(e){let t=kt(e);return t?t.decimalPlaces(4,cg.default.ROUND_DOWN).toFormat():"-"}function ax(){return(0,B.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[(0,B.jsx)("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"1.6"}),(0,B.jsx)("path",{d:"M3 12h18M12 3c2.5 2.5 3.8 5.8 3.8 9s-1.3 6.5-3.8 9c-2.5-2.5-3.8-5.8-3.8-9S9.5 5.5 12 3Z",stroke:"currentColor",strokeWidth:"1.6"})]})}function ix(){return(0,B.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,B.jsx)("path",{d:"M21.9 4.3 18.6 20c-.2 1-.9 1.3-1.8.8l-4.9-3.6-2.4 2.3c-.3.3-.5.5-1 .5l.3-4.9 9-8.1c.4-.3-.1-.5-.6-.2L6.2 13.2l-4.8-1.5c-1-.3-1-1 .2-1.5L20.6 3c.9-.3 1.6.2 1.3 1.3Z"})})}function sx(){return(0,B.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,B.jsx)("path",{d:"M18.9 2H22l-7.3 8.3L23.3 22h-6.8l-5.3-6.9L5.1 22H2l7.8-8.9L1 2h6.9l4.8 6.4L18.9 2Zm-1.2 18h1.9L7.2 4H5.2l12.5 16Z"})})}function lx(){return(0,B.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,B.jsx)("path",{d:"M6.9 6.5c0-.2-.1-.5-.3-.6L4.6 3.6V3.3h6.3l4.9 10.7 4.3-10.7H26v.3l-1.8 1.7c-.2.1-.2.3-.2.5v12.4c0 .2 0 .4.2.5l1.7 1.7v.3h-8.7v-.3l1.8-1.7c.2-.2.2-.2.2-.5V8.1l-5 12.6h-.7L7.9 8.1v8.5c0 .3.1.6.3.8l2.3 2.8v.3H4v-.3l2.3-2.8c.2-.2.3-.5.3-.8V6.5Z",transform:"scale(0.85)"})})}function pg({env:e,isMobile:t,token:n,walletAddress:r,stat:o,tokenInfo:a,showBalance:i=!0,onBack:s,onClose:l,onSend:d,onOutlink:p}){let w=n.quantity.decimals,[u,h]=yn.useState(!1),{buildTxUrl:x,chainInfo:y}=Mi(e,n.chainId,!0),{visibility:f}=ag(e),{data:c,isLoading:b,isError:g,fetchNextPage:v,hasNextPage:C,isFetchingNextPage:N,refetch:I}=og(e,n.chainId,n.address,r,!0),R=yn.useMemo(()=>c?.pages?c.pages.flat():[],[c]),S=yn.useRef(null);yn.useEffect(()=>{if(!t)return;let q=S.current;if(!q||!C)return;let ae=new IntersectionObserver(X=>{X[0]?.isIntersecting&&!N&&v()},{rootMargin:"120px"});return ae.observe(q),()=>ae.disconnect()},[t,C,N,v]);let E=yn.useCallback(()=>{navigator?.clipboard&&navigator.clipboard.writeText(n.address).then(()=>{h(!0),setTimeout(()=>h(!1),1500)}).catch(()=>{})},[n.address]),M=lg(dg(n.quantity.numeric,w)),z=o?.price?Ii(n.quantity.numeric,w,o.price):null,L=i?M:"\u2022\u2022\u2022\u2022",{containerRef:G,textRef:A,fontSize:j}=rx(L,30,14),oe=zr(n.chainId,e).name??y?.name??`Chain ${n.chainId}`,ne=y?.explorer_url,V=a?.deployed??!0,ee=yn.useMemo(()=>{let q=[];return a?.info_url&&q.push({key:"web",label:"Website",url:a.info_url,icon:(0,B.jsx)(ax,{})}),a?.telegram_url&&q.push({key:"tg",label:"Telegram",url:a.telegram_url,icon:(0,B.jsx)(ix,{})}),a?.x_url&&q.push({key:"x",label:"X",url:a.x_url,icon:(0,B.jsx)(sx,{})}),a?.medium_url&&q.push({key:"medium",label:"Medium",url:a.medium_url,icon:(0,B.jsx)(lx,{})}),q},[a]),F=(q,ae,X,me)=>{jt(q,ae,{category:"token-detail",origin:X,payload:{address:n.address,txHash:me}},p)};return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("div",{className:"wi-sticky-header",children:[(0,B.jsxs)("div",{className:"wi-header wi-header--receive",children:[(0,B.jsx)("button",{type:"button",className:"wi-header-back",onClick:s,"aria-label":"Back",children:(0,B.jsx)(En,{size:24})}),(0,B.jsxs)("span",{className:"wi-td-header-title",children:[(0,B.jsx)("img",{src:n.icon_url,alt:"","aria-hidden":!0,className:"wi-td-header-icon",width:24,height:24,draggable:!1,onError:q=>{q.currentTarget.src=$y}}),(0,B.jsx)("span",{className:"wi-td-header-name",children:n.symbol})]}),(0,B.jsx)("button",{type:"button",className:"wi-header-action",onClick:l,"aria-label":"Close","data-wi-close":!0,children:(0,B.jsx)(vn,{size:24})})]}),(0,B.jsx)("hr",{className:"wi-divider"})]}),(0,B.jsxs)("div",{className:"wi-td-scroll",children:[f.chart&&(0,B.jsx)(sg,{env:e,chainId:n.chainId,tokenAddress:n.address}),f.balance&&(0,B.jsxs)("section",{className:"wi-td-balance-card",children:[(0,B.jsxs)("div",{className:"wi-td-balance-left",ref:G,children:[(0,B.jsx)("span",{className:"wi-td-balance-label",children:"My Balance"}),(0,B.jsx)("span",{className:"wi-td-balance-amount",ref:A,style:{fontSize:j},children:L}),i&&z&&(0,B.jsx)("span",{className:"wi-td-balance-fiat",children:z})]}),(0,B.jsx)("button",{type:"button",className:"wi-td-send-btn",onClick:()=>d(n),"aria-label":`Send ${n.symbol}`,"data-track":"token_detail_send","data-track-id":n.symbol,children:(0,B.jsx)("span",{children:"Send"})})]}),f.overview&&(0,B.jsxs)("section",{className:"wi-td-section",children:[(0,B.jsx)("h3",{className:"wi-td-section-title",children:"Crypto Overview"}),(0,B.jsxs)("div",{className:"wi-td-rows",children:[(0,B.jsxs)("div",{className:"wi-td-row",children:[(0,B.jsx)("span",{className:"wi-td-row-label",children:"Network"}),ne?(0,B.jsxs)("a",{className:"wi-td-row-value wi-td-row-link",href:ne,target:"_blank",rel:"noopener noreferrer",onClick:q=>F(q,ne,"token-network"),children:[(0,B.jsx)("span",{children:oe}),(0,B.jsx)(pa,{className:"wi-td-external-icon"})]}):(0,B.jsx)("span",{className:"wi-td-row-value",children:oe})]}),(0,B.jsxs)("div",{className:"wi-td-row",children:[(0,B.jsx)("span",{className:"wi-td-row-label",children:"Contract Address"}),(0,B.jsxs)("button",{type:"button",className:"wi-td-row-value wi-td-row-copy",onClick:E,"aria-label":"Copy contract address",children:[(0,B.jsx)("span",{children:dn(n.address)}),u?(0,B.jsx)(Yn,{size:14}):(0,B.jsx)(kr,{size:14})]})]}),(0,B.jsxs)("div",{className:"wi-td-row",children:[(0,B.jsx)("span",{className:"wi-td-row-label",children:"Decimals"}),(0,B.jsx)("span",{className:"wi-td-row-value",children:w})]}),(0,B.jsxs)("div",{className:"wi-td-row",children:[(0,B.jsx)("span",{className:"wi-td-row-label",children:"Total Supply"}),(0,B.jsx)("span",{className:"wi-td-row-value",children:ox(o?.circulating_supply)})]})]})]}),f.social&&ee.length>0&&(0,B.jsxs)("section",{className:"wi-td-section",children:[(0,B.jsx)("h3",{className:"wi-td-section-title",children:"Social Media"}),(0,B.jsx)("div",{className:"wi-td-social-row",children:ee.map(q=>(0,B.jsx)("a",{className:"wi-td-social-btn",href:q.url,target:"_blank",rel:"noopener noreferrer","aria-label":q.label,onClick:ae=>F(ae,q.url,"token-social"),children:q.icon},q.key))})]}),f.history&&(0,B.jsxs)("section",{className:"wi-td-section",children:[(0,B.jsx)("h3",{className:"wi-td-section-title",children:"Token History"}),b&&(0,B.jsx)("div",{className:"wi-td-history-list",children:Array.from({length:3},(q,ae)=>(0,B.jsxs)("div",{className:"wi-td-history-skeleton",children:[(0,B.jsx)("div",{className:"wi-skeleton-block",style:{width:90,height:14}}),(0,B.jsx)("div",{className:"wi-skeleton-block",style:{width:60,height:14}})]},`td-sk-${ae}`))}),!b&&g&&(0,B.jsxs)("div",{className:"wi-td-history-empty",children:[(0,B.jsx)("span",{children:"Failed to load history."}),(0,B.jsx)("button",{type:"button",className:"wi-td-retry-btn",onClick:()=>I(),children:"Retry"})]}),!b&&!g&&R.length===0&&(0,B.jsx)("div",{className:"wi-td-history-empty",children:(0,B.jsx)("span",{children:"No transactions found."})}),!b&&!g&&R.length>0&&(0,B.jsxs)("div",{className:"wi-td-history-list",children:[R.map((q,ae)=>{let X=q.to_alias?.toLowerCase().includes("bridge")??!1,me=q.from_alias?.toLowerCase().includes("bridge")??!1,ke=X?"bridge-out":me?"bridge-in":q.to?.toLowerCase()===r.toLowerCase()?"receive":"send",ze=ke==="receive"||ke==="bridge-in",ge=ze?q.from:q.to,Ne=lg(dg(q.amount,w)),Ce=x(q.tx),tt=nx(q.timestamp),Me=(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("div",{className:"wi-td-history-top",children:[(0,B.jsx)("span",{className:"wi-td-history-type","data-direction":ke,children:ex[ke]}),(0,B.jsx)("span",{className:"wi-td-history-counter",children:dn(ge??"")})]}),(0,B.jsxs)("div",{className:"wi-td-history-bottom",children:[(0,B.jsxs)("span",{className:"wi-td-history-meta",children:[(0,B.jsx)("span",{className:"wi-td-history-status","data-status":q.status,children:q.status==="success"?"Success":"Failed"}),tt&&(0,B.jsx)("span",{className:"wi-td-history-time",children:tt})]}),(0,B.jsxs)("span",{className:"wi-td-history-amount","data-size":tx(`${ze?"+":"-"}${Ne} ${n.symbol}`),children:[ze?"+":"-",Ne," ",n.symbol]})]})]}),Qe=`${q.tx}-${q.log_index}-${ae}`;return Ce?(0,B.jsx)("a",{className:"wi-td-history-item wi-td-history-item--link",href:Ce,target:"_blank",rel:"noopener noreferrer",onClick:lt=>F(lt,Ce,"token-tx",q.tx),children:Me},Qe):(0,B.jsx)("div",{className:"wi-td-history-item",children:Me},Qe)}),C&&(t?(0,B.jsx)("div",{ref:S,className:"wi-td-history-sentinel",children:N&&(0,B.jsx)("span",{className:"wi-td-history-loading",children:"Loading\u2026"})}):(0,B.jsx)("button",{type:"button",className:"wi-td-loadmore-btn",onClick:()=>v(),disabled:N,children:N?"Loading\u2026":"Load more"}))]})]})]})]})}var Hr=_(require("react"),1);var bg=require("@tanstack/react-query");var dx="https://ipfs.io/ipfs/",cx=/^0x[0-9a-fA-F]{40}$/,ug=/^\d+$/;function px(e,t){return typeof e!="string"||!ug.test(e)?t:BigInt(e)}function fg(e,t){let n=e.token?.address,r=e.token_id;if(typeof n!="string"||!cx.test(n)||typeof r!="string"||!ug.test(r))return null;let o=t==="ERC1155"?px(e.quantity,1n):1n;return o<=0n?null:{contract:n.toLowerCase(),tokenId:r,standard:t,tokenUri:e.token_uri||null,quantity:o,collectionName:e.token?.name||mx(n),collectionSymbol:e.token?.symbol||"",collectionIconUrl:bo(e.token?.icon_url)}}function mg(e){let t=new Map,n=new Set;for(let r of e){let o=`${r.contract}:${r.tokenId}`;if(n.has(o))continue;n.add(o);let a=t.get(r.contract);a||(a={contract:r.contract,standard:r.standard,name:r.collectionName,symbol:r.collectionSymbol,iconUrl:r.collectionIconUrl,items:[]},t.set(r.contract,a)),a.items.push(r)}return[...t.values()]}function bo(e){if(typeof e!="string")return null;let t=e.trim();if(!t)return null;if(/^ipfs:\/\//i.test(t)){let n=t.replace(/^ipfs:\/\//i,"").replace(/^ipfs\//i,"");return n?`${dx}${n}`:null}if(/^data:image\//i.test(t))return t;try{let n=new URL(t);return n.protocol!=="https:"&&n.protocol!=="http:"||n.username||n.password?null:n.toString()}catch{return null}}function gg(e){let t=/^data:application\/json(;[^,]*)?,(.*)$/is.exec(e.trim());if(!t)return;let n=t[1]??"",r=t[2]??"";try{let o=/;base64/i.test(n)?ux(r):decodeURIComponent(r);return JSON.parse(o)}catch{return null}}function ux(e){let t=atob(e),n=Uint8Array.from(t,r=>r.charCodeAt(0));return new TextDecoder().decode(n)}function ho(e){return typeof e=="string"&&e.trim()?e.trim():null}function fx(e){return typeof e=="string"?e.trim()||null:typeof e=="number"||typeof e=="boolean"?String(e):null}function Id(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let t=e,n=ho(t.image_data),r=bo(ho(t.image)??ho(t.image_url))??(n&&n.startsWith("<svg")?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(n)}`:null),o=[];if(Array.isArray(t.attributes))for(let a of t.attributes){if(!a||typeof a!="object")continue;let i=a,s=fx(i.value);s!==null&&o.push({traitType:ho(i.trait_type),value:s})}return{name:ho(t.name),description:ho(t.description),image:r,animationUrl:bo(ho(t.animation_url)),attributes:o}}function hg(e){if(!e)return!1;let t=e.split(/[?#]/)[0]?.toLowerCase()??"";return/\.(mp4|webm|ogg|ogv|mov)$/.test(t)}function Ed(e,t){return t?.trim()?t.trim():`#${e}`}function Ad(e,t=12){if(e.length<=t)return`#${e}`;let n=Math.ceil((t-1)/2),r=Math.floor((t-1)/2);return`#${e.slice(0,n)}\u2026${e.slice(-r)}`}function Md(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function mx(e){return`${e.slice(0,6)}\u2026${e.slice(-4)}`}var gx="nft-holdings",hx=5,bx=100,wx=["ERC721","ERC1155"];async function yx(e,t,n,r){let o=[],a=t.toLowerCase();for(let i=1;i<=hx;i+=1){let s=new URLSearchParams({page:String(i),page_size:String(bx),sort_by:"updated",sort_order:"desc"}),l=await fetch(`${e}/v1/accounts/${a}/nfts/${n}?${s}`,{cache:"no-store",signal:r});if(!l.ok)throw new Error(`Failed to fetch ${n} holdings: ${l.status}`);let d=await l.json();for(let p of d.data?.nfts??[]){let w=fg(p,n);w&&o.push(w)}if(!d.data?.next_page)break}return o}function wg(e,t,n=!0){return(0,bg.useQuery)({queryKey:[gx,e,t.toLowerCase()],queryFn:async({signal:r})=>{let o=await Be("crossExplorer",e),a=await Promise.all(wx.map(i=>yx(o,t,i,r)));return mg(a.flat())},enabled:!!t&&n,staleTime:6e4,retry:1})}var xg=require("@tanstack/react-query");var xx="nft-metadata",vx=3e3,kx=4,Ld=0,yg=[];async function Cx(e){Ld>=kx&&await new Promise(t=>yg.push(t)),Ld+=1;try{return await e()}finally{Ld-=1,yg.shift()?.()}}async function Rx(e,t){let n=gg(e);if(n!==void 0)return Id(n);let r=bo(e);return r?Cx(async()=>{let o=new AbortController,a=()=>o.abort();t?.addEventListener("abort",a);let i=setTimeout(a,vx);try{let s=await fetch(r,{signal:o.signal,credentials:"omit",referrerPolicy:"no-referrer"});return s.ok?Id(await s.json()):null}catch{return null}finally{clearTimeout(i),t?.removeEventListener("abort",a)}}):null}function Ss(e,t=!0){return(0,xg.useQuery)({queryKey:[xx,e],queryFn:({signal:n})=>Rx(e,n),enabled:!!e&&t,staleTime:1/0,gcTime:30*6e4,retry:!1})}var vg=require("@tanstack/react-query");var Nx="nft-instance";function kg(e,t,n,r=!0){return(0,vg.useQuery)({queryKey:[Nx,e,t,n],queryFn:async({signal:o})=>{let a=await Be("crossExplorer",e),i=await fetch(`${a}/v1/tokens/${t}/instances/${n}`,{cache:"no-store",signal:o});if(!i.ok)throw new Error(`Failed to fetch NFT instance: ${i.status}`);return(await i.json()).data?.instance??null},enabled:!!t&&!!n&&r,staleTime:5*6e4,retry:!1})}var D=require("react/jsx-runtime"),Cg={ERC721:"ERC-721",ERC1155:"ERC-1155"};function Dd({src:e,tokenId:t,alt:n,className:r}){let[o,a]=Hr.useState(!1);return Hr.useEffect(()=>a(!1),[e]),!e||o?(0,D.jsx)("div",{className:Ee("wi-nft-media wi-nft-media--fallback",r),role:"img","aria-label":n,"data-nft-fallback":!0,children:(0,D.jsx)("span",{className:"wi-nft-media-fallback-text",children:Ad(t)})}):(0,D.jsx)("img",{src:e,alt:n,className:Ee("wi-nft-media",r),loading:"lazy",decoding:"async",draggable:!1,referrerPolicy:"no-referrer",onError:()=>a(!0)})}function Sx({collection:e}){let t=e.items[0],{data:n}=Ss(t?.tokenUri??null,!e.iconUrl);return(0,D.jsx)(Dd,{src:e.iconUrl??n?.image??null,tokenId:t?.tokenId??"0",alt:e.name,className:"wi-nft-thumb"})}function Rg({env:e,walletAddress:t,active:n,onSelectCollection:r}){let{data:o,isLoading:a,isError:i,refetch:s,isFetching:l}=wg(e,t,n);return a?(0,D.jsx)("div",{className:"wi-token-list","aria-busy":"true",children:Array.from({length:4},(d,p)=>(0,D.jsx)("div",{className:"wi-skeleton-item","data-nft-skeleton":!0,children:(0,D.jsxs)("div",{className:"wi-skeleton-left",children:[(0,D.jsx)("div",{className:"wi-skeleton-block wi-nft-thumb-skeleton"}),(0,D.jsxs)("div",{className:"wi-skeleton-lines",children:[(0,D.jsx)("div",{className:"wi-skeleton-block",style:{width:96,height:14}}),(0,D.jsx)("div",{className:"wi-skeleton-block",style:{width:56,height:12}})]})]})},p))}):i?(0,D.jsxs)("div",{className:"wi-nft-state",role:"alert",children:[(0,D.jsx)("span",{className:"wi-nft-state-text",children:"Couldn\u2019t load NFTs"}),(0,D.jsx)("button",{type:"button",className:"wi-nft-retry",onClick:()=>{s()},disabled:l,"data-track":"nft_retry",children:l?"Retrying\u2026":"Try again"})]}):!o||o.length===0?(0,D.jsx)("div",{className:"wi-empty",children:"No NFTs Found"}):(0,D.jsx)("div",{className:"wi-token-list",children:o.map(d=>(0,D.jsxs)("button",{type:"button",className:"wi-token-item wi-token-item--button",onClick:()=>r(d),"aria-label":`View ${d.name} NFTs`,"data-track":"nft_collection","data-track-id":d.contract,children:[(0,D.jsxs)("div",{className:"wi-token-left",children:[(0,D.jsx)(Sx,{collection:d}),(0,D.jsxs)("div",{className:"wi-token-info",children:[(0,D.jsx)("span",{className:"wi-token-name",children:d.name}),(0,D.jsx)("div",{className:"wi-token-price-row",children:(0,D.jsx)("span",{className:"wi-token-price",children:Cg[d.standard]})})]})]}),(0,D.jsx)("div",{className:"wi-token-right",children:(0,D.jsx)("span",{className:"wi-token-balance","data-nft-count":!0,children:d.items.length})})]},d.contract))})}function Ng({title:e,onBack:t,onClose:n}){return(0,D.jsxs)("div",{className:"wi-sticky-header",children:[(0,D.jsxs)("div",{className:"wi-header wi-header--receive",children:[(0,D.jsx)("button",{type:"button",className:"wi-header-back",onClick:t,"aria-label":"Back",children:(0,D.jsx)(En,{size:24})}),(0,D.jsx)("span",{className:"wi-td-header-title",children:(0,D.jsx)("span",{className:"wi-td-header-name wi-nft-header-name",children:e})}),(0,D.jsx)("button",{type:"button",className:"wi-header-action",onClick:n,"aria-label":"Close","data-wi-close":!0,children:(0,D.jsx)(vn,{size:24})})]}),(0,D.jsx)("hr",{className:"wi-divider"})]})}function Tx({item:e,onSelect:t}){let{data:n}=Ss(e.tokenUri),r=Ed(e.tokenId,n?.name);return(0,D.jsxs)("button",{type:"button",className:"wi-nft-card",onClick:()=>t(e),"aria-label":`View ${r}`,"data-track":"nft_detail","data-track-id":`${e.contract}:${e.tokenId}`,children:[(0,D.jsxs)("span",{className:"wi-nft-card-media",children:[(0,D.jsx)(Dd,{src:n?.image??null,tokenId:e.tokenId,alt:r}),e.standard==="ERC1155"&&e.quantity>1n&&(0,D.jsxs)("span",{className:"wi-nft-card-qty",children:["\xD7",Md(e.quantity)]})]}),(0,D.jsx)("span",{className:"wi-nft-card-name",children:r}),n?.name&&(0,D.jsx)("span",{className:"wi-nft-card-id",children:Ad(e.tokenId)})]})}function Sg({collection:e,onBack:t,onClose:n,onSelectNft:r}){return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(Ng,{title:e.name,onBack:t,onClose:n}),(0,D.jsx)("div",{className:"wi-td-scroll","data-vaul-no-drag":!0,children:(0,D.jsx)("div",{className:"wi-nft-grid",children:e.items.map(o=>(0,D.jsx)(Tx,{item:o,onSelect:r},`${o.contract}:${o.tokenId}`))})})]})}function Ix({image:e,animationUrl:t,tokenId:n,alt:r}){let[o,a]=Hr.useState(!1);return hg(t)&&!o?(0,D.jsx)("video",{className:"wi-nft-media wi-nft-detail-media",src:t,poster:e??void 0,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,onError:()=>a(!0),"aria-label":r}):(0,D.jsx)(Dd,{src:e,tokenId:n,alt:r,className:"wi-nft-detail-media"})}function Tg({env:e,item:t,onBack:n,onClose:r,onOutlink:o}){let{data:a,isLoading:i}=Ss(t.tokenUri),{data:s}=kg(e,t.contract,t.tokenId,!i&&!a),l=Ed(t.tokenId,a?.name??s?.name??null),d=a?.description??s?.description??null,p=a?.image??bo(s?.image_url),w=a?.attributes??[],u=At[e].cross,{chainInfo:h}=Mi(e,u),y=zr(u,e).name??h?.name??`Chain ${u}`,f=h?.explorer_url?.replace(/\/+$/,""),c=f?`${f}/token/${t.contract}/instance/${t.tokenId}`:null,[b,g]=Hr.useState(!1),v=Hr.useCallback(()=>{navigator?.clipboard&&navigator.clipboard.writeText(t.contract).then(()=>{g(!0),setTimeout(()=>g(!1),1500)}).catch(()=>{})},[t.contract]),C=(N,I,R)=>jt(N,I,{category:"nft-detail",origin:R,payload:{contract:t.contract,tokenId:t.tokenId}},o);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(Ng,{title:l,onBack:n,onClose:r}),(0,D.jsxs)("div",{className:"wi-td-scroll","data-vaul-no-drag":!0,children:[(0,D.jsx)("div",{className:"wi-nft-detail-hero",children:(0,D.jsx)(Ix,{image:p,animationUrl:a?.animationUrl??null,tokenId:t.tokenId,alt:l})}),(0,D.jsxs)("section",{className:"wi-td-section",children:[(0,D.jsxs)("div",{className:"wi-nft-detail-titles",children:[(0,D.jsx)("span",{className:"wi-nft-detail-collection",children:t.collectionName}),(0,D.jsx)("h3",{className:"wi-td-section-title wi-nft-detail-name",children:l})]}),d&&(0,D.jsx)("p",{className:"wi-nft-detail-desc",children:d})]}),(0,D.jsxs)("section",{className:"wi-td-section",children:[(0,D.jsx)("h3",{className:"wi-td-section-title",children:"Details"}),(0,D.jsxs)("div",{className:"wi-td-rows",children:[(0,D.jsxs)("div",{className:"wi-td-row",children:[(0,D.jsx)("span",{className:"wi-td-row-label",children:"Token ID"}),(0,D.jsx)("span",{className:"wi-td-row-value",children:t.tokenId})]}),(0,D.jsxs)("div",{className:"wi-td-row",children:[(0,D.jsx)("span",{className:"wi-td-row-label",children:"Token Standard"}),(0,D.jsx)("span",{className:"wi-td-row-value",children:Cg[t.standard]})]}),t.standard==="ERC1155"&&(0,D.jsxs)("div",{className:"wi-td-row",children:[(0,D.jsx)("span",{className:"wi-td-row-label",children:"Quantity"}),(0,D.jsx)("span",{className:"wi-td-row-value",children:Md(t.quantity)})]}),(0,D.jsxs)("div",{className:"wi-td-row",children:[(0,D.jsx)("span",{className:"wi-td-row-label",children:"Network"}),f?(0,D.jsxs)("a",{className:"wi-td-row-value wi-td-row-link",href:f,target:"_blank",rel:"noopener noreferrer",onClick:N=>C(N,f,"nft-network"),children:[(0,D.jsx)("span",{children:y}),(0,D.jsx)(pa,{className:"wi-td-external-icon"})]}):(0,D.jsx)("span",{className:"wi-td-row-value",children:y})]}),(0,D.jsxs)("div",{className:"wi-td-row",children:[(0,D.jsx)("span",{className:"wi-td-row-label",children:"Contract Address"}),(0,D.jsxs)("button",{type:"button",className:"wi-td-row-value wi-td-row-copy",onClick:v,"aria-label":"Copy contract address",children:[(0,D.jsx)("span",{children:dn(t.contract)}),b?(0,D.jsx)(Yn,{size:14}):(0,D.jsx)(kr,{size:14})]})]})]})]}),w.length>0&&(0,D.jsxs)("section",{className:"wi-td-section",children:[(0,D.jsx)("h3",{className:"wi-td-section-title",children:"Attributes"}),(0,D.jsx)("div",{className:"wi-nft-attrs",children:w.map((N,I)=>(0,D.jsxs)("div",{className:"wi-nft-attr",children:[N.traitType&&(0,D.jsx)("span",{className:"wi-nft-attr-type",children:N.traitType}),(0,D.jsx)("span",{className:"wi-nft-attr-value",children:N.value})]},`${N.traitType??""}-${I}`))})]}),c&&(0,D.jsxs)("a",{className:"wi-nft-explorer-btn",href:c,target:"_blank",rel:"noopener noreferrer",onClick:N=>C(N,c,"nft-explorer"),"data-track":"nft_explorer",children:[(0,D.jsx)("span",{children:"View on Explorer"}),(0,D.jsx)(pa,{className:"wi-td-external-icon"})]})]})]})}var Jn=_(require("react"),1);var Ig={dev:"https://dev.onechain.nexus/pop",stage:"https://stg.onechain.nexus/pop",production:"https://onechain.nexus/pop"};function Ag(e,t){let n=Ig[e]??Ig.production;return t==="send"?n:`${n}/${t}`}var Eg={dev:"https://stg.onechain.nexus/gametoken/bridge",stage:"https://stg.onechain.nexus/gametoken/bridge",production:"https://www.onechain.nexus/gametoken/bridge"};function Mg(e){return Eg[e]??Eg.production}var K=require("react/jsx-runtime");function Pd({size:e=20,className:t}){return(0,K.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,K.jsx)("path",{d:"M1.66675 7.91662C1.66677 6.98929 1.94808 6.08377 2.47353 5.31967C2.99898 4.55557 3.74385 3.96883 4.60976 3.63695C5.47567 3.30507 6.42188 3.24366 7.32343 3.46082C8.22497 3.67799 9.03944 4.16352 9.65925 4.85329C9.7029 4.89996 9.75568 4.93718 9.81431 4.96262C9.87294 4.98806 9.93617 5.00119 10.0001 5.00119C10.064 5.00119 10.1272 4.98806 10.1859 4.96262C10.2445 4.93718 10.2973 4.89996 10.3409 4.85329C10.9588 4.15904 11.7734 3.66943 12.6764 3.44962C13.5795 3.22982 14.528 3.29024 15.3958 3.62286C16.2636 3.95547 17.0096 4.5445 17.5343 5.31154C18.0591 6.07858 18.3378 6.98725 18.3334 7.91662C18.3334 9.82495 17.0834 11.25 15.8334 12.5L11.2567 16.9275C11.1015 17.1058 10.91 17.249 10.6951 17.3477C10.4802 17.4464 10.2468 17.4982 10.0103 17.4997C9.77386 17.5012 9.53979 17.4523 9.32365 17.3564C9.10752 17.2605 8.91427 17.1196 8.75675 16.9433L4.16675 12.5C2.91675 11.25 1.66675 9.83329 1.66675 7.91662Z",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),(0,K.jsx)("path",{d:"M8.84839 8.28833H10V13.4938",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"})]})}function Lg({size:e=24,className:t}){return(0,K.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,K.jsx)("path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"}),(0,K.jsx)("path",{d:"m21.854 2.147-10.94 10.939",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"})]})}function Dg({size:e=24,className:t}){return(0,K.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,K.jsxs)("g",{stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,K.jsx)("path",{d:"M11 15h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 17"}),(0,K.jsx)("path",{d:"m7 21 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9"}),(0,K.jsx)("path",{d:"m2 16 6 6"}),(0,K.jsx)("circle",{cx:"16",cy:"9",r:"2.9"}),(0,K.jsx)("circle",{cx:"6",cy:"5",r:"3"})]})})}function Pg({size:e=24,className:t}){return(0,K.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,K.jsxs)("g",{stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,K.jsx)("path",{d:"M15 12h-5M15 8h-5"}),(0,K.jsx)("path",{d:"M19 17V5a2 2 0 0 0-2-2H4"}),(0,K.jsx)("path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3"})]})})}function Ma({size:e=12,className:t}){return(0,K.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,K.jsx)("path",{d:"m9 18 6-6-6-6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Og({size:e=20,className:t}){return(0,K.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,K.jsx)("rect",{width:"20",height:"20",rx:"4.8",fill:"currentColor"}),(0,K.jsx)("path",{d:"M11.53 9.05 15.7 4.4h-.99l-3.62 4.04L8.2 4.4H4.86l4.37 6.1-4.37 4.87h.99l3.82-4.26 3.05 4.26h3.34zm-1.35 1.51-.44-.61-3.52-4.9h1.52l2.84 3.96.44.61 3.7 5.14h-1.52z",fill:"var(--wi-op-x-glyph, #ffffff)"})]})}function Bg({size:e=20,className:t}){return(0,K.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,K.jsxs)("g",{stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,K.jsx)("circle",{cx:"9",cy:"7",r:"3.4"}),(0,K.jsx)("path",{d:"M2.6 20.4a6.4 6.4 0 0 1 10.2-5.15"}),(0,K.jsx)("circle",{cx:"17.5",cy:"17.5",r:"2.1"}),(0,K.jsx)("path",{d:"M19.6 17.5v1.05a1.55 1.55 0 0 0 3.1 0v-1.05a5.2 5.2 0 1 0-2.05 4.14"})]})})}function zg({size:e=20,className:t}){return(0,K.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,K.jsxs)("g",{stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,K.jsx)("path",{d:"M12.5 3 5 13.5h5.5L10 21l7.5-10.5H12z"}),(0,K.jsx)("path",{d:"M20 4.5 21.5 3M20.5 8h2M17 2.5V1"})]})})}function Fg({size:e=20,className:t}){return(0,K.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,K.jsxs)("g",{stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,K.jsx)("rect",{x:"2.5",y:"5.5",width:"19",height:"13",rx:"2.5"}),(0,K.jsx)("path",{d:"M12 9v6"}),(0,K.jsx)("path",{d:"m9.5 12.5 2.5 2.5 2.5-2.5"})]})})}function Ug({className:e}){return(0,K.jsxs)("svg",{width:"116",height:"24",viewBox:"0 0 116 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"ONEpop",className:e,children:[(0,K.jsx)("path",{d:"M38.1949 4.06787C33.7184 4.06787 30.085 7.69479 30.085 12.1647C30.085 16.6346 33.7184 20.2616 38.1949 20.2616C42.6713 20.2616 46.3048 16.6346 46.3048 12.1647C46.3048 7.69479 42.6713 4.06787 38.1949 4.06787ZM38.1949 16.6216C35.7312 16.6216 33.7315 14.6284 33.7315 12.1647C33.7315 9.70103 35.7312 7.70786 38.1949 7.70786C40.6586 7.70786 42.6583 9.70103 42.6583 12.1647C42.6583 14.6284 40.6586 16.6216 38.1949 16.6216Z",fill:"currentColor"}),(0,K.jsx)("path",{d:"M52.0033 4.81283C51.6438 4.40113 51.1537 4.11359 50.5721 4.11359C49.5657 4.11359 48.7554 4.93046 48.7554 5.93031V18.4513C48.7554 19.4577 49.5722 20.2681 50.5721 20.2681C51.5719 20.2681 52.3888 19.4512 52.3888 18.4513V10.7727L60.5837 19.5492C60.9431 19.9609 61.4332 20.2485 62.0148 20.2485C63.0212 20.2485 63.8316 19.4316 63.8316 18.4317C63.8316 17.9351 63.6094 17.5038 63.3153 17.1639L51.9967 4.81936L52.0033 4.81283Z",fill:"currentColor"}),(0,K.jsx)("path",{d:"M61.8643 12.3934C62.9034 12.3934 63.7398 11.5504 63.7398 10.5179V5.96953C63.7398 4.93047 62.8968 4.09399 61.8643 4.09399C60.8318 4.09399 59.9888 4.93701 59.9888 5.96953V10.5179C59.9888 11.5569 60.8318 12.3934 61.8643 12.3934Z",fill:"currentColor"}),(0,K.jsx)("path",{d:"M76.9017 7.74704C77.9081 7.74704 78.7249 6.93016 78.7249 5.93031C78.7249 4.93046 77.9081 4.11359 76.9017 4.11359H68.5108C67.5044 4.11359 66.6875 4.93046 66.6875 5.93031V18.4513C66.6875 19.4577 67.5044 20.2681 68.5108 20.2681H76.9017C77.9081 20.2681 78.7249 19.4512 78.7249 18.4513C78.7249 17.4515 77.9081 16.6346 76.9017 16.6346H70.3275V14.0075H76.2286C77.235 14.0075 78.0518 13.1907 78.0518 12.1908C78.0518 11.191 77.235 10.3741 76.2286 10.3741H70.3275V7.74704H76.9017Z",fill:"currentColor"}),(0,K.jsx)("path",{d:"M84.5951 23.1908C84.3206 23.1908 84.105 23.1124 83.9481 22.9555C83.7913 22.7987 83.7129 22.5765 83.7129 22.2889V10.7416C83.7129 10.441 83.7913 10.2188 83.9481 10.0751C84.105 9.91823 84.3206 9.83981 84.5951 9.83981C84.8827 9.83981 85.0983 9.91823 85.2421 10.0751C85.3989 10.2188 85.4773 10.441 85.4773 10.7416V12.5257L85.2617 12.1728C85.4708 11.4539 85.8825 10.8789 86.4968 10.4476C87.1111 10.0163 87.8495 9.8006 88.7122 9.8006C89.5617 9.8006 90.3002 10.0032 90.9275 10.4084C91.5549 10.8004 92.045 11.369 92.3979 12.114C92.7508 12.8459 92.9272 13.7216 92.9272 14.741C92.9272 15.7474 92.7508 16.6297 92.3979 17.3877C92.0581 18.1327 91.5679 18.7078 90.9275 19.1129C90.3002 19.505 89.5617 19.7011 88.7122 19.7011C87.8626 19.7011 87.1307 19.4854 86.5164 19.0541C85.9021 18.6228 85.4904 18.0543 85.2813 17.3485H85.4969V22.2889C85.4969 22.5765 85.4185 22.7987 85.2617 22.9555C85.1048 23.1124 84.8827 23.1908 84.5951 23.1908ZM88.3004 18.2895C88.8625 18.2895 89.3526 18.1523 89.7708 17.8778C90.2021 17.6034 90.5354 17.2047 90.7707 16.6819C91.0059 16.1591 91.1236 15.5122 91.1236 14.741C91.1236 13.5909 90.8687 12.7152 90.359 12.114C89.8492 11.5128 89.1631 11.2122 88.3004 11.2122C87.7254 11.2122 87.2222 11.3494 86.7909 11.6239C86.3726 11.8853 86.0459 12.2774 85.8106 12.8002C85.5884 13.323 85.4773 13.9699 85.4773 14.741C85.4773 15.8912 85.7322 16.7734 86.2419 17.3877C86.7517 17.9889 87.4378 18.2895 88.3004 18.2895Z",fill:"currentColor"}),(0,K.jsx)("path",{d:"M99.2775 19.7011C98.3365 19.7011 97.5196 19.4985 96.8269 19.0933C96.1342 18.6882 95.5983 18.1131 95.2193 17.3681C94.8403 16.6231 94.6508 15.7474 94.6508 14.741C94.6508 13.983 94.7553 13.3033 94.9644 12.7021C95.1866 12.0878 95.5003 11.565 95.9055 11.1337C96.3106 10.7024 96.7942 10.3757 97.3562 10.1535C97.9313 9.91823 98.5718 9.8006 99.2775 9.8006C100.219 9.8006 101.035 10.0032 101.728 10.4084C102.421 10.8135 102.957 11.3886 103.336 12.1336C103.715 12.8655 103.904 13.7347 103.904 14.741C103.904 15.4991 103.793 16.1853 103.571 16.7996C103.362 17.4139 103.055 17.9366 102.65 18.368C102.244 18.7993 101.754 19.1326 101.179 19.3678C100.617 19.59 99.9833 19.7011 99.2775 19.7011ZM99.2775 18.2895C99.8526 18.2895 100.349 18.1523 100.768 17.8778C101.199 17.6034 101.526 17.2047 101.748 16.6819C101.983 16.1591 102.101 15.5122 102.101 14.741C102.101 13.5909 101.846 12.7152 101.336 12.114C100.826 11.5128 100.14 11.2122 99.2775 11.2122C98.7155 11.2122 98.2189 11.3494 97.7876 11.6239C97.3693 11.8853 97.0426 12.2774 96.8073 12.8002C96.572 13.323 96.4544 13.9699 96.4544 14.741C96.4544 15.8912 96.7093 16.7734 97.219 17.3877C97.7418 17.9889 98.428 18.2895 99.2775 18.2895Z",fill:"currentColor"}),(0,K.jsx)("path",{d:"M107.072 23.1908C106.797 23.1908 106.582 23.1124 106.425 22.9555C106.268 22.7987 106.19 22.5765 106.19 22.2889V10.7416C106.19 10.441 106.268 10.2188 106.425 10.0751C106.582 9.91823 106.797 9.83981 107.072 9.83981C107.359 9.83981 107.575 9.91823 107.719 10.0751C107.876 10.2188 107.954 10.441 107.954 10.7416V12.5257L107.738 12.1728C107.948 11.4539 108.359 10.8789 108.974 10.4476C109.588 10.0163 110.326 9.8006 111.189 9.8006C112.038 9.8006 112.777 10.0032 113.404 10.4084C114.032 10.8004 114.522 11.369 114.875 12.114C115.228 12.8459 115.404 13.7216 115.404 14.741C115.404 15.7474 115.228 16.6297 114.875 17.3877C114.535 18.1327 114.045 18.7078 113.404 19.1129C112.777 19.505 112.038 19.7011 111.189 19.7011C110.339 19.7011 109.607 19.4854 108.993 19.0541C108.379 18.6228 107.967 18.0543 107.758 17.3485H107.974V22.2889C107.974 22.5765 107.895 22.7987 107.738 22.9555C107.582 23.1124 107.359 23.1908 107.072 23.1908ZM110.777 18.2895C111.339 18.2895 111.829 18.1523 112.248 17.8778C112.679 17.6034 113.012 17.2047 113.247 16.6819C113.483 16.1591 113.6 15.5122 113.6 14.741C113.6 13.5909 113.345 12.7152 112.836 12.114C112.326 11.5128 111.64 11.2122 110.777 11.2122C110.202 11.2122 109.699 11.3494 109.268 11.6239C108.849 11.8853 108.523 12.2774 108.287 12.8002C108.065 13.323 107.954 13.9699 107.954 14.741C107.954 15.8912 108.209 16.7734 108.719 17.3877C109.228 17.9889 109.915 18.2895 110.777 18.2895Z",fill:"currentColor"}),(0,K.jsx)("path",{d:"M14.7326 0.727918C12.9726 1.59329 11.6096 4.00482 11.0833 5.59357C9.88384 4.95085 7.89924 3.76837 5.7791 4.00482C3.25593 4.28622 1.16093 5.72223 0.333058 8.59505C-0.616745 11.891 0.425001 15.7904 3.97287 17.5788C7.25977 19.2357 10.3262 21.1047 11.8468 22.2197C13.3673 23.3348 14.6332 24.4164 15.5435 23.8398C17.1655 23.054 20.2401 19.6295 22.4534 16.1013C24.3507 13.0769 25.9439 7.65453 23.3488 3.26211C21.2608 -0.0620856 17.6891 -0.725834 14.7326 0.727918Z",fill:"url(#wi-op-logo-heart)"}),(0,K.jsx)("mask",{id:"wi-op-logo-mask",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"25",height:"24",children:(0,K.jsx)("path",{d:"M14.7326 0.727918C12.9726 1.59329 11.6096 4.00482 11.0833 5.59357C9.88384 4.95085 7.89924 3.76837 5.7791 4.00482C3.25593 4.28622 1.16093 5.72223 0.333058 8.59505C-0.616745 11.891 0.425001 15.7904 3.97287 17.5788C7.25977 19.2357 10.3262 21.1047 11.8468 22.2197C13.3673 23.3348 14.6332 24.4164 15.5435 23.8398C17.1655 23.054 20.2401 19.6295 22.4534 16.1013C24.3507 13.0769 25.9439 7.65453 23.3488 3.26211C21.2608 -0.0620856 17.6891 -0.725834 14.7326 0.727918Z",fill:"white"})}),(0,K.jsxs)("g",{mask:"url(#wi-op-logo-mask)",children:[(0,K.jsx)("path",{d:"M29.5305 -3.85553H-1.43018V24.7597H29.5305V-3.85553Z",fill:"url(#wi-op-logo-base)"}),(0,K.jsx)("path",{d:"M12.7993 24.7597H29.5372V1.58752L12.7993 13.5165V24.7597Z",fill:"url(#wi-op-logo-shine-r)"}),(0,K.jsx)("path",{d:"M12.8037 24.7598H-1.63916V2.94476L12.8037 13.5166V24.7598Z",fill:"url(#wi-op-logo-shine-l)"})]}),(0,K.jsx)("path",{d:"M13.4339 7.58409L9.79429 9.73601C9.1523 10.1136 8.92988 10.962 9.2989 11.6189C9.66791 12.2759 10.4969 12.5035 11.1389 12.1259L14.2174 10.305L12.7515 11.9138V18.2247C12.7515 18.9852 13.3581 19.6059 14.1012 19.6059C14.8442 19.6059 15.4508 18.9852 15.4508 18.2247V8.77903C15.4508 8.51521 15.37 8.25656 15.2689 8.08586C14.8897 7.43407 14.0708 7.20129 13.4288 7.57891L13.4339 7.58409Z",fill:"white"}),(0,K.jsxs)("defs",{children:[(0,K.jsxs)("linearGradient",{id:"wi-op-logo-heart",x1:"12.3679",y1:"-0.18782",x2:"12.3679",y2:"23.9797",gradientUnits:"userSpaceOnUse",children:[(0,K.jsx)("stop",{stopColor:"#F1603C"}),(0,K.jsx)("stop",{offset:"1",stopColor:"#EE2566"})]}),(0,K.jsxs)("linearGradient",{id:"wi-op-logo-base",x1:"-5.01624",y1:"-7.30565",x2:"28.6827",y2:"29.4172",gradientUnits:"userSpaceOnUse",children:[(0,K.jsx)("stop",{stopColor:"#F3752D"}),(0,K.jsx)("stop",{offset:"1",stopColor:"#EC1272"})]}),(0,K.jsxs)("linearGradient",{id:"wi-op-logo-shine-r",x1:"10.2312",y1:"2.71613",x2:"23.8708",y2:"13.2539",gradientUnits:"userSpaceOnUse",children:[(0,K.jsx)("stop",{stopColor:"white",stopOpacity:"0.5"}),(0,K.jsx)("stop",{offset:"1",stopColor:"white",stopOpacity:"0"})]}),(0,K.jsxs)("linearGradient",{id:"wi-op-logo-shine-l",x1:"24.1414",y1:"-2.87687",x2:"12.838",y2:"18.379",gradientUnits:"userSpaceOnUse",children:[(0,K.jsx)("stop",{stopColor:"white",stopOpacity:"0.5"}),(0,K.jsx)("stop",{offset:"1",stopColor:"white",stopOpacity:"0"})]})]})]})}var Ex="data:image/webp;base64,UklGRiIfAABXRUJQVlA4WAoAAAAQAAAA9QAA1wAAQUxQSDQJAAABsMf/nzG31uyzu9lNurFtp7Zt27btHtuu3YPatnWM1A2q08bJJmmyu/P7XfSm+2Bm/rsnIiaA/JNAndnDLyQiJi4uNios0MfdIEJ699Dkhv2mLP10zdadu3dsXv7e/HFta0T6GIXG6B/fbPznp9Lz7FjViqzrG+Z1TA4wioolpvOru++WISLCf/8XICAiOh6feKtznEVEvNNG//AYEZFSCviSQBERH+8YmeQhGh415p4vRQQKAOhUAEC0HpmYWE0kTAmTzlUiUgCUFRDLDw8N14uCLqjHvnIECig/IOavauIhBua09x4hUkBlAuLvk0J1AuDT/Tggpajk4i9TjNwXNi8bAVDph9q68Z0ubnk5UkDlp/e38JyU8h1FQBUCZo9w5zd9rd0IgCp9PMrCa1LtIwiAqn08xMxnutSDCKhewIzOBi6L3YmA6v6pDo+FbUBQG+4J5S+PjxwIqHbHm2685TKqGAHVn9NVx1e6RrcRUAvPhfFV8F4E1ETHGy48ZV5mB43AB/V5quUjBNTKNWZ+8tuPFDUzp1EVDGYP36CQ0NDQ4EBvV6OOO6TxFQDagd8Y/8vkG5XSrt+kJe998sWXX3zy9pzBXWrH+Jr4IuJnBNTQR6nELSil16JNpx4VPXfgi23WnGvfLe2VGmzmB/0CB6CWwvt1B394NoeiM3POftwn0ZMXotJRYwr/KkBEoPAyAICIOYem1/LV8Y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Ow7PdSyYIzuQi1ul2IviqZrwjvgitwN/22Ogzpt6VUaERFfLjCSmwNIwt2hcaH3+ZB4sj7qP784wlWjexf/5iN8j6tHK6zzw4Q+QLcMcNksKjPFBaupKpIcBCUxs8o7wxVHzyRhdr/7JP7qiXejoFAtYPP/bcBCgAAAAAAAAAAA==";function jg({className:e}){return(0,K.jsx)("svg",{width:"82",height:"72",viewBox:"0 0 82 72",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,className:e,children:(0,K.jsx)("image",{href:Ex,width:"82",height:"72",preserveAspectRatio:"xMidYMid meet"})})}he(`.wi-op-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;display:flex;flex-direction:column;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent}[data-theme=light] .wi-op-scroll{scrollbar-color:rgba(0,0,0,.12) transparent}.wi-op-scroll::-webkit-scrollbar{width:4px}.wi-op-scroll::-webkit-scrollbar-track{background:transparent}.wi-op-scroll::-webkit-scrollbar-thumb{background:#ffffff26;border-radius:4px}[data-theme=light] .wi-op-scroll::-webkit-scrollbar-thumb{background:#0000001f}.wi-op-header-title{position:absolute;left:50%;transform:translate(-50%);display:inline-flex;align-items:center;pointer-events:none}.wi-op-logo{display:block;flex-shrink:0;color:var(--ds-content-highest, #000000)}.wi-op-logo-img{height:24px;width:auto;object-fit:contain}.wi-op-hero{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:24px;flex-shrink:0}.wi-op-hero-copy{display:flex;flex-direction:column;gap:6px;min-width:0}.wi-op-hero-title{display:flex;flex-direction:column;margin:0;font-family:inherit;font-size:18px;font-weight:600;line-height:1.25;color:var(--ds-content-highest, #000000)}.wi-op-hero-title-row{display:inline-flex;align-items:center;gap:4px;flex-wrap:wrap}.wi-op-x-badge{flex-shrink:0;color:var(--ds-content-highest, #000000)}[data-theme=light] .wi-op-x-badge{--wi-op-x-glyph: #ffffff}[data-theme=dark] .wi-op-x-badge{--wi-op-x-glyph: #1e232e}.wi-op-hero-sub{margin:0;font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-op-hero-art{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:120px;height:72px}.wi-op-hero-img{max-width:100%;max-height:72px;object-fit:contain}.wi-op-panel{display:flex;flex-direction:column;gap:8px;padding:0 24px;flex-shrink:0}.wi-op-balance-card{display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa)}.wi-op-balance-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.wi-op-balance-label{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.wi-op-balance-body{display:flex;align-items:center;gap:4px;min-width:0}.wi-op-balance-icon{width:24px;height:24px;border-radius:50%;object-fit:cover;flex-shrink:0}.wi-op-balance-value{font-family:inherit;font-size:28px;font-weight:600;line-height:1.25;color:var(--ds-content-highest, #000000);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-op-link-btn{appearance:none;display:inline-flex;align-items:center;gap:4px;padding:0;border:none;background:transparent;font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;flex-shrink:0;transition:color .15s ease}.wi-op-link-btn:hover:not(:disabled){color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-link-btn:disabled{cursor:default;opacity:.5}.wi-op-balance-head>[data-gou-mode=button]{display:contents}.wi-op-action-row{display:flex;align-items:stretch;gap:8px}.wi-op-action-card{appearance:none;display:flex;flex:1 1 0;min-width:0;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 8px;border:none;border-radius:10px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-medium, rgba(0, 0, 0, .65));font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;text-align:center;cursor:pointer;transition:background-color .15s ease,transform .1s ease}.wi-op-action-card>svg{flex-shrink:0}.wi-op-action-card:hover:not(:disabled){background:#2e3544}[data-theme=light] .wi-op-action-card:hover:not(:disabled){background:#e4e8ef}.wi-op-action-card:active:not(:disabled){transform:scale(.95)}.wi-op-action-card:disabled{cursor:default;opacity:.45}.wi-op-cta-row{display:flex;flex-direction:column;gap:10px;padding:24px;flex-shrink:0}.wi-op-cta-skeleton{border-radius:10px}.wi-op-cta{appearance:none;display:flex;align-items:center;justify-content:center;width:100%;padding:12px 16px;border:none;border-radius:10px;font-family:inherit;font-size:16px;font-weight:600;line-height:1;cursor:pointer;transition:filter .15s ease,transform .1s ease,background-color .15s ease}.wi-op-cta:active:not(:disabled){transform:scale(.985)}.wi-op-cta:disabled{cursor:default;opacity:.5}.wi-op-cta--gradient{background:linear-gradient(193.7deg,#f62e61 16.1%,#f7564a 83.9%);color:#fff}.wi-op-cta--gradient:hover:not(:disabled){filter:brightness(1.05)}.wi-op-cta--purple{background:var(--ds-system-purple-high, #7346f3);color:var(--ds-system-purple-on, #ffffff)}.wi-op-cta--purple:hover:not(:disabled){filter:brightness(1.08)}.wi-op-cta--outline{background:transparent;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-cta--outline:hover:not(:disabled){background:var(--ds-surface-medium, #f5f7fa)}.wi-op-features{display:flex;flex-direction:column;padding:0 24px 8px;flex-shrink:0}.wi-op-feature{display:flex;align-items:center;gap:6px;padding:12px 0}.wi-op-feature+.wi-op-feature{border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-op-feature-icon{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;flex-shrink:0;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-accent-primary-high, #f0640d)}.wi-op-feature-copy{display:flex;flex-direction:column;min-width:0}.wi-op-feature-title{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-feature-desc{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-op-activity{display:flex;flex-direction:column;gap:8px;padding:0 24px 8px;flex-shrink:0}.wi-op-activity-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.wi-op-activity-heading{display:flex;flex-direction:column;min-width:0}.wi-op-activity-title{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-activity-currency{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-op-activity-list{display:flex;flex-direction:column;margin:0;padding:0;list-style:none}.wi-op-activity-item{display:flex;align-items:flex-start;gap:6px;padding:12px 0}.wi-op-activity-item+.wi-op-activity-item{border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-op-activity-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;overflow:hidden;flex-shrink:0;background:var(--ds-surface-medium, #f5f7fa)}.wi-op-activity-avatar img{width:100%;height:100%;object-fit:cover}.wi-op-activity-initial{font-family:inherit;font-size:13px;font-weight:600;line-height:1;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.wi-op-activity-copy{display:flex;flex-direction:column;flex:1 1 0;min-width:0}.wi-op-activity-meta{display:flex;align-items:center;gap:6px;min-width:0}.wi-op-activity-peer{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-op-activity-sep{width:1px;height:14px;flex-shrink:0;background:var(--ds-border-medium, rgba(0, 0, 0, .18))}.wi-op-activity-time{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap;flex-shrink:0}.wi-op-activity-amount{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-op-badge{display:inline-flex;align-items:center;justify-content:center;padding:3px 6px;border-radius:4px;flex-shrink:0;font-family:inherit;font-size:12px;font-weight:500;line-height:1}.wi-op-badge--claimed{background:var(--ds-system-green-low, #e7f9f8);color:var(--ds-system-green-high, #00a0a2)}.wi-op-badge--waiting{background:var(--ds-accent-primary-low, #fff5ee);color:var(--ds-accent-primary-high, #f0640d)}.wi-op-badge--refunded{background:var(--ds-system-red-low, #ffeeee);color:var(--ds-system-red-high, #d20609)}.wi-op-badge--ready{background:var(--ds-system-blue-low, #ecf8fc);color:var(--ds-system-blue-high, #008dca)}.wi-op-footer{display:flex;align-items:center;justify-content:center;padding:16px 24px;flex-shrink:0;border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-drawer-content .wi-op-hero,.wi-drawer-content .wi-op-cta-row,.wi-drawer-content .wi-op-panel,.wi-drawer-content .wi-op-features,.wi-drawer-content .wi-op-activity,.wi-drawer-content .wi-op-footer{padding-left:16px;padding-right:16px}
12
- `);var P=require("react/jsx-runtime"),Ax=6,Mx={claimed:"Claimed",waiting:"Waiting",refunded:"Refunded",ready:"Ready"};function Wg(e,t){let n;try{n=BigInt(e||"0")}catch{return"0.00"}let r=n<0n;r&&(n=-n);let o,a;if(t<=2){let i=10n**BigInt(t);o=n/i,a=n%i*10n**BigInt(2-t)}else{let i=n/10n**BigInt(t-2);o=i/100n,a=i%100n}return`${r?"-":""}${Lx(o.toString())}.${a.toString().padStart(2,"0")}`}function Lx(e){let t="";for(let n=0;n<e.length;n++){let r=e.length-n;n>0&&r%3===0&&(t+=","),t+=e[n]}return t}function Dx(e){if(!e)return"";let t=e<1e12?e*1e3:e,n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"just now";let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let o=Math.floor(r/60);if(o<24)return`${o}h ago`;let a=Math.floor(o/24);if(a<30)return`${a}d ago`;let i=Math.floor(a/30);return i<12?`${i}mo ago`:`${Math.floor(i/12)}y ago`}function Px(e){let t=e.trim();return t?t.startsWith("@")?t:`@${t}`:""}function La({env:e="production",balanceDisplay:t,balanceIconUrl:n,isBalanceLoading:r,summary:o,logoSrc:a,heroSrc:i,onBack:s,onClose:l,onSend:d,onClaim:p,onActivity:w,onRepliesSeen:u,onBoard:h,onGetToken:x,getTokenSlot:y}){let f=o?.activity??[],c=f.length>0,b=o?.claimableCount??0,g=o?.repliesWaitingCount??0,v=o?.isLoading??!1,C=o?.xConnected??!1,N=Jn.useCallback(A=>{window.open(Ag(e,A),"_blank","noopener,noreferrer")},[e]),I=Jn.useCallback(()=>d?d():N("send"),[d,N]),R=Jn.useCallback(()=>p?p():N("claim"),[p,N]),S=Jn.useCallback(()=>{if(u?.(),w)return w();N("activity")},[w,u,N]),E=Jn.useCallback(()=>h?h():N("board"),[h,N]),M=Jn.useCallback(()=>{if(x)return x();window.open(Mg(e),"_blank","noopener,noreferrer")},[x,e]),z=Jn.useMemo(()=>!o||b<=0?null:Wg(o.claimableTotalRaw,o.claimableDecimals??18),[o,b]),L=Jn.useMemo(()=>f.slice(0,Ax),[f]),G=Jn.useCallback(A=>{A.currentTarget.style.display="none"},[]);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)("div",{className:"wi-sticky-header",children:[(0,P.jsxs)("div",{className:"wi-header wi-header--receive",children:[(0,P.jsx)("button",{type:"button",className:"wi-header-back",onClick:s,"aria-label":"Back",children:(0,P.jsx)(En,{size:24})}),(0,P.jsx)("span",{className:"wi-op-header-title",children:a?(0,P.jsx)("img",{src:a,alt:"ONEpop",className:"wi-op-logo-img",height:24,draggable:!1,onError:G}):(0,P.jsx)(Ug,{className:"wi-op-logo"})}),(0,P.jsx)("button",{type:"button",className:"wi-header-action",onClick:l,"aria-label":"Close","data-wi-close":!0,children:(0,P.jsx)(vn,{size:24})})]}),(0,P.jsx)("hr",{className:"wi-divider"})]}),(0,P.jsxs)("div",{className:"wi-op-scroll","data-vaul-no-drag":!0,children:[(0,P.jsxs)("section",{className:"wi-op-hero",children:[(0,P.jsxs)("div",{className:"wi-op-hero-copy",children:[(0,P.jsxs)("h2",{className:"wi-op-hero-title",children:[(0,P.jsx)("span",{children:"Send money with"}),(0,P.jsxs)("span",{className:"wi-op-hero-title-row",children:["just an",(0,P.jsx)(Og,{size:20,className:"wi-op-x-badge"}),"@handle."]})]}),(0,P.jsx)("p",{className:"wi-op-hero-sub",children:"They don't even need a wallet yet."})]}),(0,P.jsx)("div",{className:"wi-op-hero-art","aria-hidden":!0,children:i?(0,P.jsx)("img",{src:i,alt:"",className:"wi-op-hero-img",draggable:!1,onError:G}):(0,P.jsx)(jg,{})})]}),(0,P.jsxs)("section",{className:"wi-op-panel",children:[(0,P.jsxs)("div",{className:"wi-op-balance-card",children:[(0,P.jsxs)("div",{className:"wi-op-balance-head",children:[(0,P.jsx)("span",{className:"wi-op-balance-label",children:"Available"}),y??(0,P.jsxs)("button",{type:"button",className:"wi-op-link-btn",onClick:M,"data-track":"onepop_get_token",children:[(0,P.jsx)("span",{children:"Get ONEUSD"}),(0,P.jsx)(Ma,{size:12})]})]}),(0,P.jsx)("div",{className:"wi-op-balance-body",children:r?(0,P.jsx)("div",{className:"wi-skeleton-block",style:{width:140,height:32}}):(0,P.jsxs)(P.Fragment,{children:[n&&(0,P.jsx)("img",{src:n,alt:"","aria-hidden":!0,className:"wi-op-balance-icon",width:24,height:24,draggable:!1,onError:G}),(0,P.jsx)("span",{className:"wi-op-balance-value",children:t??"0.00"})]})})]}),(0,P.jsxs)("div",{className:"wi-op-action-row","aria-label":"ONEpop actions",children:[(0,P.jsxs)("button",{type:"button",className:"wi-op-action-card",onClick:I,"aria-label":"Send POP","data-track":"onepop_send",children:[(0,P.jsx)(Lg,{size:24}),(0,P.jsx)("span",{children:"Send POP"})]}),(0,P.jsxs)("button",{type:"button",className:"wi-op-action-card",onClick:R,"aria-label":"Claim POPs","data-track":"onepop_claim",children:[(0,P.jsx)(Dg,{size:24}),(0,P.jsx)("span",{children:"Claim POPs"})]}),C&&(0,P.jsxs)("button",{type:"button",className:"wi-op-action-card",onClick:S,"aria-label":"Activity","data-track":"onepop_activity",children:[(0,P.jsx)(Pg,{size:24}),(0,P.jsx)("span",{children:"Activity"})]})]})]}),(0,P.jsx)("section",{className:"wi-op-cta-row",children:v?(0,P.jsx)("div",{className:"wi-skeleton-block wi-op-cta-skeleton",style:{height:40}}):(0,P.jsxs)(P.Fragment,{children:[!c&&b<=0&&(0,P.jsx)("button",{type:"button",className:"wi-op-cta wi-op-cta--gradient",onClick:I,"data-track":"onepop_send_first",children:"Send your first POP!"}),b>0?(0,P.jsx)("button",{type:"button",className:"wi-op-cta wi-op-cta--purple",onClick:R,"data-track":"onepop_claim_banner",children:`${b} POP${b===1?"":"s"} waiting to claim (total ${z})`}):!c&&(0,P.jsx)("button",{type:"button",className:"wi-op-cta wi-op-cta--purple",onClick:E,"data-track":"onepop_claim_maybe",children:"You might have POPs waiting"}),g>0&&(0,P.jsx)("button",{type:"button",className:"wi-op-cta wi-op-cta--outline",onClick:S,"data-track":"onepop_replies",children:`${g} ${g===1?"reply":"replies"} waiting`})]})}),c?(0,P.jsxs)("section",{className:"wi-op-activity",children:[(0,P.jsxs)("div",{className:"wi-op-activity-head",children:[(0,P.jsxs)("div",{className:"wi-op-activity-heading",children:[(0,P.jsx)("span",{className:"wi-op-activity-title",children:"Recent activity"}),(0,P.jsx)("span",{className:"wi-op-activity-currency",children:"Currency: ONEUSD"})]}),(0,P.jsxs)("button",{type:"button",className:"wi-op-link-btn",onClick:S,"data-track":"onepop_see_all_activity",children:[(0,P.jsx)("span",{children:"See all activity"}),(0,P.jsx)(Ma,{size:16})]})]}),(0,P.jsx)("ul",{className:"wi-op-activity-list",children:L.map(A=>(0,P.jsx)(Ox,{item:A},A.id))})]}):(0,P.jsxs)("section",{className:"wi-op-features",children:[(0,P.jsx)(Od,{icon:(0,P.jsx)(Bg,{size:20}),title:"No wallet address needed",desc:"just their @handle"}),(0,P.jsx)(Od,{icon:(0,P.jsx)(zg,{size:20}),title:"Claim instantly",desc:"social login, zero gas"}),(0,P.jsx)(Od,{icon:(0,P.jsx)(Fg,{size:20}),title:"Refund anytime",desc:"get it back if unclaimed"})]})]}),(0,P.jsx)("div",{className:"wi-op-footer",children:(0,P.jsx)("span",{children:"Powered by ONEpop"})})]})}function Od({icon:e,title:t,desc:n}){return(0,P.jsxs)("div",{className:"wi-op-feature",children:[(0,P.jsx)("span",{className:"wi-op-feature-icon","aria-hidden":!0,children:e}),(0,P.jsxs)("span",{className:"wi-op-feature-copy",children:[(0,P.jsx)("span",{className:"wi-op-feature-title",children:t}),(0,P.jsx)("span",{className:"wi-op-feature-desc",children:n})]})]})}function Ox({item:e}){let t=Px(e.handle),n=e.direction==="sent"?`Sent to ${t}`:`Claimed from ${t}`,r=t.replace("@","").charAt(0).toUpperCase()||"?";return(0,P.jsxs)("li",{className:"wi-op-activity-item",children:[(0,P.jsx)("span",{className:"wi-op-activity-avatar","aria-hidden":!0,children:e.avatarUrl?(0,P.jsx)("img",{src:e.avatarUrl,alt:"",width:30,height:30,draggable:!1,onError:o=>{o.currentTarget.style.display="none"}}):(0,P.jsx)("span",{className:"wi-op-activity-initial",children:r})}),(0,P.jsxs)("span",{className:"wi-op-activity-copy",children:[(0,P.jsxs)("span",{className:"wi-op-activity-meta",children:[(0,P.jsx)("span",{className:"wi-op-activity-peer",children:n}),(0,P.jsx)("span",{className:"wi-op-activity-sep","aria-hidden":!0}),(0,P.jsx)("span",{className:"wi-op-activity-time",children:Dx(e.timestamp)})]}),(0,P.jsx)("span",{className:"wi-op-activity-amount",children:Wg(e.amountRaw,e.decimals)})]}),(0,P.jsx)("span",{className:Ee("wi-op-badge",`wi-op-badge--${e.status}`),"data-status":e.status,children:Mx[e.status]})]})}var Gg=_(require("react"),1);var Da=require("react/jsx-runtime"),Bd=Gg.forwardRef(function({className:t,children:n,...r},o){return(0,Da.jsxs)("button",{...r,ref:o,type:"button",className:"wi-op-link-btn","data-track":"onepop_get_token",children:[(0,Da.jsx)("span",{children:"Get ONEUSD"}),(0,Da.jsx)(Ma,{size:12})]})});var k=require("react/jsx-runtime"),Bx="On-ramp is not available in your region.";function zx(e){if(typeof window>"u"||!e?.length)return!1;let{origin:t,pathname:n}=window.location,r=t+n;return e.some(o=>r===o||r.startsWith(`${o}/`))}function Fx(e){let t=e.lastIndexOf(".");return t===-1?{main:e,decimal:""}:{main:e.slice(0,t),decimal:e.slice(t)}}function Ux(e){let t=e.toLowerCase().replace(/^0x/,""),n=t.length>=8?t.slice(0,8):t.padEnd(8,"0"),r=parseInt(n.slice(0,4),16)%360,o=(r+60+parseInt(n.slice(4,8),16)%120)%360;return`linear-gradient(135deg, hsl(${r} 85% 65%), hsl(${o} 80% 55%))`}function jx(e,t=.5){let n=J.useRef(null),r=J.useRef(null),[o,a]=J.useState(1);return J.useLayoutEffect(()=>{let i=n.current,s=r.current;if(!i||!s)return;let l=()=>{let p=i.clientWidth;if(!p)return;let w=s.cloneNode(!0);w.style.setProperty("--wi-total-scale","1"),w.style.position="absolute",w.style.left="-9999px",w.style.top="-9999px",w.style.visibility="hidden",w.style.maxWidth="none",w.style.width="max-content",i.appendChild(w);let u=w.offsetWidth;i.removeChild(w);let h=u>p?Math.max(t,p/u):1;a(h)};l();let d=new ResizeObserver(l);return d.observe(i),()=>d.disconnect()},[e,t]),{containerRef:n,valueRef:r,scale:o}}function Is({align:e="end",sideOffset:t=12,className:n,children:r}){let{presentation:o,env:a,theme:i,isMobile:s,open:l,drawerDirection:d,modal:p,showBalance:w,showForgeToken:u,showGameToken:h,showQR:x,showBridge:y,showNft:f,qrLogoSrc:c,walletAddress:b,accountName:g,sendAccounts:v,profileImageUrl:C,connectorName:N,preferredTokens:I,close:R,onSelectWallet:S,onCopyAddress:E,onBuy:M,onDisconnect:z,disconnectLabel:L,termsUrl:G,termsLabel:A,privacyUrl:j,privacyLabel:le,portalStyle:oe,navContent:ne,navPosition:V,footerContent:ee,view:F,setView:q,selectedSendToken:ae,setSelectedSendToken:X,selectedDetailToken:me,setSelectedDetailToken:ke,selectedNftCollection:ze,setSelectedNftCollection:ge,selectedNft:Ne,setSelectedNft:Ce,showPortfolio:tt,showOnePop:Me,onePopSummary:Qe,onOnePopOpen:lt,onOnePopSend:We,onOnePopClaim:Ve,onOnePopActivity:Ge,onOnePopRepliesSeen:Dt,onePopLogoSrc:tn,onePopGetTokenSlot:yt,onePopHeroSrc:Pt,portfolioTitle:Tt,portfolioSections:nn,showTotalAssets:It,totalAssetsLabel:ft,sendTransaction:Ot,getTransactionReceipt:rt,estimateGas:on,onOutlink:mt,lpBalanceReader:fn,stakingRewardsReader:Ze,bridgeTokens:dt,bridgeHistory:nt,getBridgeQuote:Et,getBridgeToTokens:Rt,getBridgeApproval:Xe,approveBridge:an,submitBridge:sn,onReceive:Yt,onSend:ln,onBuyDisabledMessage:Q,onBridgeDisabledMessage:xe,onSendDisabledMessage:Se}=Fr(),Fe=o==="page",[ot,Kt]=J.useState();J.useEffect(()=>{Kt(Gu()??(Mo()?_g.WALLET_LABELS.default:void 0))},[]);let Bt=g??N??ot??"Account",[Cn,Rn]=J.useState(null),O=J.useRef(void 0),De=J.useCallback(T=>{Rn(T),clearTimeout(O.current),O.current=setTimeout(()=>Rn(null),4e3)},[]);J.useEffect(()=>()=>clearTimeout(O.current),[]);let qe=!!Q,re=J.useCallback(()=>{if(qe){De(Q);return}let T=M?.();T&&typeof T.then=="function"&&T.catch(()=>{De(Q??Bx)})},[qe,Q,M,De]),Ie=!!xe,U=!!Se,{tokens:Oe,isLoading:$}=Sr(a,b,l&&w),{statsMap:Pe}=Tr(a,w),{aprPercent:In}=xu(),{categoryMap:Zr,infoMap:rr}=ku(a,w),or=w&&It,{displayValue:Jo,isLowerBound:gl,isLoading:hl}=Nu(a,b,l&&or),[Or,Xr]=J.useState(!1),ri=J.useRef(null),[Jr,oi]=J.useState(0),{holdings:$r,isLoading:ai}=mu(a,b,l&&w&&u),bl=J.useMemo(()=>$r.map(T=>T.token),[$r]),{imageMap:Y}=gu(a,bl,u&&$r.length>0),xt=Au(a),gt=J.useMemo(()=>Iu({env:a,tokens:Oe,pinnedTokens:xt,preferredTokens:I,statsMap:Pe,categoryMap:Zr,showGameToken:h}),[Oe,a,Pe,h,Zr,xt,I]),Zt=J.useMemo(()=>{if(!u)return[];let T=new Set(Oe.map(pe=>pe.address.toLowerCase()));return[...$r].filter(pe=>!T.has(pe.token.toLowerCase())).sort((pe,at)=>{let Qn=kt(pe.value)??new zd.default(0);return(kt(at.value)??new zd.default(0)).minus(Qn).toNumber()})},[$r,u,Oe]),Ut=J.useRef(!1),[et,xn]=J.useState(null),He=J.useRef(void 0),_n=et?.chainId??ae?.chainId??gt[0]?.chainId??0,{transactionUrl:Br}=ua(a,_n,et?.txHash,!!(et?.txHash&&_n)),vt=J.useCallback(T=>{Ut.current=!0,q(T)},[q]),[F0,wl]=J.useState("recipient"),$o=J.useCallback(()=>{X(null),wl("recipient"),vt("wallet")},[X,vt]),ii=J.useCallback((T,pe="recipient")=>{if(U){De(Se);return}wl(pe),X(T),vt("send")},[U,Se,De,X,vt]),U0=J.useCallback(T=>{ke(T),vt("token-detail")},[ke,vt]),j0=J.useCallback(()=>{lt?.(),vt("onepop")},[lt,vt]),W0=J.useCallback(()=>{ke(null),vt("wallet")},[ke,vt]),[yl,G0]=J.useState("tokens"),H0=f&&yl==="nfts",_0=J.useCallback(T=>{ge(T),vt("nft-collection")},[ge,vt]),Q0=J.useCallback(T=>{Ce(T),vt("nft-detail")},[Ce,vt]),V0=J.useCallback(()=>{Ce(null),vt("nft-collection")},[Ce,vt]),q0=J.useCallback(()=>{ge(null),vt("wallet")},[ge,vt]),Y0=J.useCallback(T=>{ii(T,"recipient")},[ii]),si=Xt("apps.json",a,T=>Bn(T?.gametokenBridge,a)),hc=Xt("apps.json",a,T=>T?.gametokenSites),K0=J.useCallback(()=>{if(Ie){De(xe);return}if(si){if(zx(hc)){window.location.assign(si);return}window.open(si,"_blank","noopener,noreferrer")}},[Ie,xe,si,hc,De]),Z0=J.useCallback(T=>{clearTimeout(He.current),X(null),vt("wallet"),xn({status:"pending",txHash:T.txHash,chainId:T.chainId,description:`${T.amount} ${T.tokenSymbol} to ${dn(T.recipient)}`})},[X,vt]),X0=J.useCallback(T=>{let pe=ae?.chainId;X(null),vt("wallet"),!(!T||!pe)&&(xn(at=>({status:"success",txHash:T,chainId:pe,description:at?.txHash===T?at.description:"Tap to see your transaction"})),clearTimeout(He.current),He.current=setTimeout(()=>xn(null),5e3))},[ae?.chainId,X,vt]),J0=J.useCallback(T=>{let pe=T.txHash;pe&&(xn({status:"error",txHash:pe,chainId:T.chainId,description:T.message}),clearTimeout(He.current),He.current=setTimeout(()=>xn(null),5e3))},[]),ea=J.useMemo(()=>{if(Yt)return Yt;if(x)return()=>vt("qr")},[Yt,x,vt]),li=J.useMemo(()=>{if(ln)return ln;if(gt.length===0)return;let T=gt[0];return()=>ii(T,"token")},[ln,gt,ii]),bc=J.useCallback(()=>{if(U){De(Se);return}li?.()},[U,Se,li,De]);J.useEffect(()=>{l||(Ut.current=!1,wl("recipient"))},[l]);let xl=J.useRef(null);J.useEffect(()=>{let T=xl.current;if(!T||!s)return;let pe=at=>{at.pointerType==="touch"&&at.stopPropagation()};return T.addEventListener("pointerdown",pe),()=>T.removeEventListener("pointerdown",pe)},[s]);let[To,wc]=J.useState(!1),vl=J.useRef(void 0),[ta,na]=J.useState(!1);J.useEffect(()=>{if(!ta)return;let T=()=>na(!1),pe=Qn=>{Qn.key==="Escape"&&na(!1)},at=setTimeout(()=>{document.addEventListener("mousedown",T,!0),document.addEventListener("keydown",pe,!0)},0);return()=>{clearTimeout(at),document.removeEventListener("mousedown",T,!0),document.removeEventListener("keydown",pe,!0)}},[ta]),J.useEffect(()=>{na(!1)},[b]),J.useEffect(()=>()=>clearTimeout(vl.current),[]),J.useEffect(()=>()=>clearTimeout(He.current),[]),J.useEffect(()=>{let T=ri.current;if(!T||ee===null){oi(0);return}let pe=()=>{oi(T.offsetHeight)};if(pe(),typeof ResizeObserver>"u")return;let at=new ResizeObserver(pe);return at.observe(T),()=>at.disconnect()},[ee]);let yc=J.useCallback(async()=>{if(!To)try{await navigator.clipboard.writeText(b),wc(!0),clearTimeout(vl.current),vl.current=setTimeout(()=>wc(!1),2e3),E?.(b,!0)}catch{E?.(b,!1)}},[b,E,To]),di=J.useCallback(T=>{T.currentTarget.setAttribute("data-loaded","true")},[]),xc=J.useMemo(()=>({background:Ux(b)}),[b]),ci=J.useMemo(()=>C||Nr(a,b,{size:120,bg:i==="dark"?"1A1A2E":"F3F6F8"}),[C,a,b,i]),kl=J.useMemo(()=>Fx(Jo),[Jo]),{containerRef:$0,valueRef:eb,scale:tb}=jx(Or?"\u2022\u2022\u2022\u2022\u2022\u2022":Jo),vc=G||j?(0,k.jsxs)("div",{className:"wi-legal-links",children:[G&&(0,k.jsx)("a",{className:"wi-legal-link",href:G,target:"_blank",rel:"noopener noreferrer","data-track":"terms_link",onClick:T=>jt(T,G,{category:"terms",origin:"terms"},mt),children:A}),G&&j&&(0,k.jsx)("span",{className:"wi-legal-sep","aria-hidden":!0,children:"\xB7"}),j&&(0,k.jsx)("a",{className:"wi-legal-link",href:j,target:"_blank",rel:"noopener noreferrer","data-track":"privacy_link",onClick:T=>jt(T,j,{category:"privacy",origin:"privacy"},mt),children:le})]}):null,kc=z?(0,k.jsxs)("button",{type:"button",className:"wi-disconnect-btn","data-track":"disconnect",onClick:()=>{z(),R()},children:[(0,k.jsx)(up,{size:16}),(0,k.jsx)("span",{className:"wi-disconnect-label",children:L})]}):null,nb=w&&!ne,Cc=!or,Rc=(0,k.jsxs)("button",{type:"button",className:Ee("wi-action-card",U&&"wi-action-card--dimmed"),onClick:bc,disabled:!U&&!li,"aria-disabled":U||void 0,"aria-label":"Send","data-track":"send_open",children:[(0,k.jsx)(hp,{size:20}),(0,k.jsx)("span",{children:"Send"})]}),rb=nb?Fe?Cc?(0,k.jsx)("div",{className:"wi-action-row","aria-label":"Wallet actions",children:Rc}):null:(0,k.jsxs)("div",{className:"wi-action-row","aria-label":"Wallet actions",children:[(0,k.jsxs)("button",{type:"button",className:Ee("wi-action-card",qe&&"wi-action-card--dimmed"),onClick:re,disabled:!M&&!qe,"aria-disabled":qe||void 0,"aria-label":"Buy","data-track":"buy",children:[(0,k.jsx)(yp,{size:20}),(0,k.jsx)("span",{children:"Buy"})]}),y?(0,k.jsxs)("button",{type:"button",className:Ee("wi-action-card",Ie&&"wi-action-card--dimmed"),onClick:K0,"aria-disabled":Ie||void 0,"aria-label":"Bridge","data-track":"bridge_open",children:[(0,k.jsx)(xp,{size:20}),(0,k.jsx)("span",{children:"Bridge"})]}):(0,k.jsxs)("button",{type:"button",className:"wi-action-card",onClick:ea,disabled:!ea,"aria-label":"Receive","data-track":"receive",children:[(0,k.jsx)(Ti,{size:20}),(0,k.jsx)("span",{children:"Receive"})]}),Cc&&Rc,Me&&(0,k.jsxs)("button",{type:"button",className:"wi-action-card",onClick:j0,"aria-label":"Open ONEpop","data-track":"onepop_open",children:[(0,k.jsx)(Pd,{size:20}),(0,k.jsx)("span",{children:"ONEpop"})]}),tt?(0,k.jsxs)("button",{type:"button",className:"wi-action-card",onClick:()=>vt("portfolio"),"aria-label":"View portfolio","data-track":"portfolio_open",children:[(0,k.jsx)(wp,{size:20}),(0,k.jsx)("span",{children:"Portfolio"})]}):y?(0,k.jsxs)("button",{type:"button",className:"wi-action-card",onClick:ea,disabled:!ea,"aria-label":"Receive","data-track":"receive",children:[(0,k.jsx)(Ti,{size:20}),(0,k.jsx)("span",{children:"Receive"})]}):null]}):null,ob=(0,k.jsxs)("div",{className:Ee("wi-view-inner",Ut.current&&"wi-view-wallet"),children:[or&&(0,k.jsxs)("div",{className:"wi-total-section",children:[(0,k.jsxs)("div",{className:"wi-total-head",children:[(0,k.jsx)("span",{className:"wi-total-label",children:ft}),(0,k.jsx)("span",{role:"button",tabIndex:0,className:"wi-total-eye",onClick:T=>{T.stopPropagation(),Xr(pe=>!pe)},onKeyDown:T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),T.stopPropagation(),Xr(pe=>!pe))},"aria-label":Or?"Show balance":"Hide balance","data-track":"balance_toggle",children:Or?(0,k.jsx)(mp,{}):(0,k.jsx)(fp,{})})]}),(0,k.jsxs)("div",{className:"wi-total-body",children:[(0,k.jsx)("div",{className:"wi-total-value-wrap",ref:$0,children:hl?(0,k.jsx)("div",{className:"wi-skeleton-block wi-total-skeleton",style:{width:160,height:42}}):(0,k.jsx)("div",{className:"wi-total-value","data-hidden":Or||void 0,ref:eb,style:{"--wi-total-scale":tb},children:Or?(0,k.jsx)("span",{className:"wi-total-mask",children:"\u2022\u2022\u2022\u2022\u2022\u2022"}):(0,k.jsxs)(k.Fragment,{children:[gl&&(0,k.jsx)("span",{className:"wi-total-lte",children:"\u2264"}),(0,k.jsx)("span",{className:"wi-total-currency",children:"$"}),(0,k.jsx)("span",{className:"wi-total-amount",children:kl.main}),kl.decimal&&(0,k.jsx)("span",{className:"wi-total-decimal",children:kl.decimal})]})})}),(0,k.jsx)("button",{type:"button",className:Ee("wi-total-send",U&&"wi-total-send--dimmed"),onClick:bc,disabled:!U&&!li,"aria-disabled":U||void 0,"aria-label":"Send","data-track":"send_open",children:(0,k.jsx)(bp,{size:27})})]})]}),V==="top"&&(ne?(0,k.jsx)("div",{className:"wi-nav-fixed",children:ne}):rb),f&&(0,k.jsx)("div",{className:"wi-asset-tabs",role:"tablist","aria-label":"Assets",children:["tokens","nfts"].map(T=>(0,k.jsx)("button",{type:"button",role:"tab",className:"wi-asset-tab","aria-selected":yl===T,"data-active":yl===T||void 0,onClick:()=>G0(T),"data-track":"asset_tab","data-track-id":T,children:T==="tokens"?"Tokens":"NFTs"},T))}),H0?(0,k.jsx)("div",{ref:xl,className:"wi-scrollable-body","data-vaul-no-drag":!0,children:(0,k.jsx)(Rg,{env:a,walletAddress:b,active:l,onSelectCollection:_0})}):w&&(0,k.jsx)("div",{ref:xl,className:"wi-scrollable-body","data-vaul-no-drag":!0,children:(0,k.jsxs)("div",{className:"wi-token-list",children:[$&&Array.from({length:5},(T,pe)=>(0,k.jsxs)("div",{className:"wi-skeleton-item",children:[(0,k.jsxs)("div",{className:"wi-skeleton-left",children:[(0,k.jsx)("div",{className:"wi-skeleton-block wi-skeleton-icon"}),(0,k.jsxs)("div",{className:"wi-skeleton-lines",children:[(0,k.jsx)("div",{className:"wi-skeleton-block",style:{width:64,height:14}}),(0,k.jsx)("div",{className:"wi-skeleton-block",style:{width:80,height:12}})]})]}),(0,k.jsxs)("div",{className:"wi-skeleton-right",children:[(0,k.jsx)("div",{className:"wi-skeleton-block",style:{width:72,height:14}}),(0,k.jsx)("div",{className:"wi-skeleton-block",style:{width:48,height:12}})]})]},pe)),!$&&gt.length===0&&!u&&(0,k.jsx)("div",{className:"wi-empty",children:"No Tokens Found"}),gt.map(T=>{let pe=Pe.get(pr(T.chainId,T.address)),at=pe?parseFloat(pe.percent_change_24h):null,Qn=at!==null&&at>=0,Sl=ma(a,T.chainId),hb=Xl(T.address);return(0,k.jsxs)("button",{type:"button",className:"wi-token-item wi-token-item--button",onClick:()=>U0(T),"aria-label":`View ${T.symbol} detail`,"data-track":"token_detail","data-track-id":T.symbol,children:[(0,k.jsxs)("div",{className:"wi-token-left",children:[(0,k.jsxs)("div",{className:"wi-token-icon-wrap",children:[(0,k.jsx)("img",{src:T.icon_url,alt:T.symbol,className:"wi-token-icon",width:32,height:32,loading:"lazy",draggable:!1,onLoad:di,onError:Tl=>{Tl.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),Sl&&(0,k.jsx)("img",{src:Sl,alt:"","aria-hidden":!0,className:"wi-token-chain-badge",width:14,height:14,loading:"lazy",draggable:!1,onError:Tl=>{Tl.currentTarget.style.display="none"}})]}),(0,k.jsxs)("div",{className:"wi-token-info",children:[(0,k.jsxs)("span",{className:"wi-token-name-row",children:[(0,k.jsx)("span",{className:"wi-token-name",children:T.symbol}),hb&&In!==null&&(0,k.jsx)("span",{className:"wi-token-apr",children:Yi(In)})]}),pe&&(0,k.jsxs)("div",{className:"wi-token-price-row",children:[(0,k.jsx)("span",{className:"wi-token-price",children:io(pe.price)}),(0,k.jsx)("span",{className:"wi-token-change","data-positive":Qn,"data-zero":at===0||void 0,children:at!==null&&(at===0?"0%":`${Qn?"+":"-"}${(Qn?Math.floor:Math.ceil)(Math.abs(at)*100)/100}%`)})]})]})]}),(0,k.jsxs)("div",{className:"wi-token-right",children:[(0,k.jsx)("span",{className:"wi-token-balance",children:Cr(T.quantity.numeric,T.quantity.decimals)}),pe&&(0,k.jsx)("span",{className:"wi-token-value",children:Ii(T.quantity.numeric,T.quantity.decimals,pe.price)})]})]},`${T.address}-${T.chainId}`)}),u&&ai&&Array.from({length:3},(T,pe)=>(0,k.jsxs)("div",{className:"wi-skeleton-item",children:[(0,k.jsxs)("div",{className:"wi-skeleton-left",children:[(0,k.jsx)("div",{className:"wi-skeleton-block wi-skeleton-icon"}),(0,k.jsxs)("div",{className:"wi-skeleton-lines",children:[(0,k.jsx)("div",{className:"wi-skeleton-block",style:{width:64,height:14}}),(0,k.jsx)("div",{className:"wi-skeleton-block",style:{width:80,height:12}})]})]}),(0,k.jsxs)("div",{className:"wi-skeleton-right",children:[(0,k.jsx)("div",{className:"wi-skeleton-block",style:{width:72,height:14}}),(0,k.jsx)("div",{className:"wi-skeleton-block",style:{width:48,height:12}})]})]},`forge-sk-${pe}`)),u&&!ai&&!$&&gt.length===0&&Zt.length===0&&(0,k.jsx)("div",{className:"wi-empty",children:"No Tokens Found"}),u&&Zt.map(T=>{let pe=Y.get(T.token)||"",at=ma(a,At[a].cross);return(0,k.jsxs)("div",{className:"wi-token-item",children:[(0,k.jsxs)("div",{className:"wi-token-left",children:[(0,k.jsxs)("div",{className:"wi-token-icon-wrap",children:[(0,k.jsx)("img",{src:pe||"https://contents.crosstoken.io/wallet/token/images/FT.png",alt:T.token_name,className:"wi-token-icon",width:32,height:32,loading:"lazy",draggable:!1,onLoad:di,onError:Qn=>{Qn.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),at&&(0,k.jsx)("img",{src:at,alt:"","aria-hidden":!0,className:"wi-token-chain-badge",width:14,height:14,loading:"lazy",draggable:!1,onError:Qn=>{Qn.currentTarget.style.display="none"}})]}),(0,k.jsxs)("div",{className:"wi-token-info",children:[(0,k.jsx)("span",{className:"wi-token-name",children:T.token_name}),(0,k.jsx)("div",{className:"wi-token-price-row",children:(0,k.jsxs)("span",{className:"wi-token-price",children:[Cr(T.current_price,18)," CROSS"]})})]})]}),(0,k.jsxs)("div",{className:"wi-token-right",children:[(0,k.jsx)("span",{className:"wi-token-balance",children:Cr(T.balance,18)}),(0,k.jsx)("span",{className:"wi-token-value",children:io(T.current_value_usd)})]})]},`forge-${T.token}`)})]})}),V==="bottom"&&ne&&(0,k.jsx)("div",{className:"wi-nav-fixed",children:ne}),kc&&(0,k.jsx)("div",{className:"wi-wallet-disconnect-row",children:kc})]},"wallet"),ab=tt?(0,k.jsx)("div",{className:Ee("wi-view-inner wi-portfolio-body",Ut.current&&"wi-view-portfolio"),children:(0,k.jsx)(po,{env:a,theme:i,walletAddress:b,showHeader:!1,onOutlink:mt,lpBalanceReader:fn,stakingRewardsReader:Ze,sendTransaction:Ot,estimateGas:on,sections:nn})},"portfolio"):null,ib=ae?(0,k.jsx)("div",{className:Ee("wi-view-inner wi-send-body",Ut.current&&"wi-view-send"),children:(0,k.jsx)(ga,{env:a,theme:i,walletAddress:b,accountName:Bt,accounts:v,initialStep:F0,token:ae,tokens:gt,onTokenChange:X,sendTransaction:Ot,getTransactionReceipt:rt,estimateGas:on,getTokenPriceUsd:T=>{let pe=Pe.get(pr(T.chainId,T.address));if(!pe?.price)return;let at=parseFloat(pe.price);return Number.isFinite(at)?at:void 0},onClose:R,onBackToWallet:$o,onSubmitted:Z0,onSuccess:X0,onFailed:J0,onOutlink:mt})},"send"):null,sb=J.useMemo(()=>dt||gt.map(T=>{let pe=Pe.get(pr(T.chainId,T.address)),at=pe?.price?parseFloat(pe.price):void 0;return{name:T.name,symbol:T.symbol,chainId:T.chainId,address:T.address,decimals:T.quantity.decimals,balance:Bo(T.quantity.numeric,T.quantity.decimals),iconUrl:T.icon_url,priceUsd:Number.isFinite(at)?at:void 0}}),[dt,Pe,gt]),lb=(0,k.jsx)("div",{className:Ee("wi-view-inner wi-bridge-body",Ut.current&&"wi-view-send"),children:(0,k.jsx)(mo,{env:a,walletAddress:b,tokens:sb,history:nt,termsUrl:G,getQuote:Et,getToTokens:Rt,getApproval:Xe,approveBridge:an,submitBridge:sn,onClose:R,onBackToWallet:$o})},"bridge"),db=me?(0,k.jsx)("div",{className:Ee("wi-view-inner wi-token-detail-body",Ut.current&&"wi-view-send"),children:(0,k.jsx)(pg,{env:a,isMobile:s,token:me,walletAddress:b,stat:Pe.get(pr(me.chainId,me.address)),tokenInfo:rr.get(Ki(me.chainId,me.address)),showBalance:w,onBack:W0,onClose:R,onSend:Y0,onOutlink:mt})},"token-detail"):null,cb=ze?(0,k.jsx)("div",{className:Ee("wi-view-inner wi-token-detail-body",Ut.current&&"wi-view-send"),children:(0,k.jsx)(Sg,{collection:ze,onBack:q0,onClose:R,onSelectNft:Q0})},"nft-collection"):null,pb=Ne?(0,k.jsx)("div",{className:Ee("wi-view-inner wi-token-detail-body",Ut.current&&"wi-view-send"),children:(0,k.jsx)(Tg,{env:a,item:Ne,onBack:V0,onClose:R,onOutlink:mt})},"nft-detail"):null,Io=J.useMemo(()=>{let T=At[a].cross;return gt.find(pe=>pe.chainId===T&&Xl(pe.address))??gt.find(pe=>pe.chainId===T&&pe.symbol.toUpperCase().includes("ONEUSD"))},[gt,a]),ub=J.useMemo(()=>{if(Io)return Cr(Io.quantity.numeric,Io.quantity.decimals)},[Io]),fb=Me?(0,k.jsx)("div",{className:Ee("wi-view-inner wi-onepop-body",Ut.current&&"wi-view-send"),children:(0,k.jsx)(La,{env:a,balanceDisplay:ub,balanceIconUrl:Io?.icon_url,isBalanceLoading:$&&!Io,summary:Qe,logoSrc:tn,heroSrc:Pt,getTokenSlot:yt,onBack:$o,onClose:R,onSend:We,onClaim:Ve,onActivity:Ge,onRepliesSeen:Dt})},"onepop"):null,Cl=!!S&&g?.trim().toLowerCase()!=="my wallet",Nc=(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)("span",{className:"wi-receive-avatar",children:[(0,k.jsx)("span",{className:"wi-avatar-fallback",style:xc}),ci&&(0,k.jsx)("img",{src:ci,alt:"",className:"wi-avatar-img",width:24,height:24,draggable:!1,onLoad:di,onError:T=>{T.currentTarget.style.display="none"}})]}),(0,k.jsx)("span",{className:"wi-receive-account-name",children:Bt}),Cl&&(0,k.jsx)("span",{className:"wi-receive-chevron","data-open":ta,"aria-hidden":"true",children:(0,k.jsx)(zn,{size:16})})]}),mb=(0,k.jsxs)("div",{className:Ee("wi-view-inner wi-qr-body",Ut.current&&"wi-view-qr"),children:[(0,k.jsxs)("div",{className:"wi-receive-section",children:[Cl?(0,k.jsx)("button",{type:"button",className:"wi-receive-account wi-receive-account--btn",onClick:()=>{na(!0),S?.()},"aria-label":"Switch account",children:Nc}):(0,k.jsx)("div",{className:"wi-receive-account",children:Nc}),(0,k.jsxs)("div",{className:"wi-qr-block",children:[(0,k.jsxs)("div",{className:"wi-qr-box",children:[(0,k.jsx)(Hg.QRCodeSVG,{value:b,size:180,level:"H",marginSize:2,...c&&{imageSettings:{src:c,height:33,width:33,excavate:!0}}}),!c&&(0,k.jsx)("div",{className:"wi-qr-logo",children:(0,k.jsx)(gp,{size:33})})]}),(0,k.jsx)("p",{className:"wi-qr-address",children:b})]}),(0,k.jsxs)("button",{type:"button",className:"wi-qr-copy-btn",onClick:yc,"data-track":"address_copy",children:[(0,k.jsx)("span",{className:"wi-qr-copy-icon",children:To?(0,k.jsx)(Yn,{size:16}):(0,k.jsx)(kr,{size:16})}),(0,k.jsx)("span",{className:"wi-qr-copy-text",children:To?"Copied!":"Copy address"})]})]}),vc&&(0,k.jsx)("div",{className:"wi-receive-footer",children:vc})]},"qr"),gb=F==="qr"||F==="portfolio"||F==="send"||F==="bridge",Sc=ee!==null?(0,k.jsx)("div",{className:"wi-builtin-footer",children:ee}):null,Tc=(0,k.jsxs)("div",{className:"wi-account-text",children:[Cl?(0,k.jsxs)("button",{type:"button",className:"wi-account-row wi-account-row--btn",onClick:()=>{na(!0),S?.()},"aria-label":"Switch account","aria-expanded":ta,children:[(0,k.jsx)("span",{className:"wi-account-name",children:Bt}),(0,k.jsx)("span",{className:"wi-account-switch","data-open":ta,"aria-hidden":"true",children:(0,k.jsx)(zn,{size:20})})]}):(0,k.jsx)("div",{className:"wi-account-row",children:(0,k.jsx)("span",{className:"wi-account-name",children:Bt})}),(0,k.jsxs)("button",{type:"button",className:"wi-address-row-btn",onClick:yc,"aria-label":"Copy address","data-track":"address_copy",children:[(0,k.jsx)("span",{className:"wi-account-address",children:dn(b)}),(0,k.jsx)("span",{className:"wi-account-copy","data-copied":To,children:To?(0,k.jsx)(Yn,{size:12}):(0,k.jsx)(kr,{size:12})})]})]}),Rl=(0,k.jsxs)(k.Fragment,{children:[r,F==="qr"?(0,k.jsx)("div",{className:"wi-sticky-header",children:(0,k.jsxs)("div",{className:"wi-header wi-header--receive",children:[(0,k.jsx)("button",{type:"button",className:"wi-header-back",onClick:$o,"aria-label":"Back",children:(0,k.jsx)(En,{size:24})}),(0,k.jsx)("span",{className:"wi-receive-title",children:"Receive"}),(0,k.jsx)("button",{type:"button",className:"wi-header-action",onClick:R,"aria-label":"Close","data-wi-close":!0,children:(0,k.jsx)(vn,{size:24})})]})}):F==="send"||F==="bridge"||F==="token-detail"||F==="onepop"||F==="nft-collection"||F==="nft-detail"?null:gb?(0,k.jsxs)("div",{className:"wi-sticky-header",children:[(0,k.jsxs)("div",{className:"wi-header wi-header--wallet wi-header--sub-account",children:[(0,k.jsx)("button",{type:"button",className:"wi-header-back",onClick:$o,"aria-label":"Back",children:(0,k.jsx)(En,{size:24})}),(0,k.jsx)("div",{className:"wi-account-block wi-account-block--sub-account",children:Tc}),(0,k.jsx)("button",{type:"button",className:"wi-header-action",onClick:R,"aria-label":"Close","data-wi-close":!0,children:(0,k.jsx)(vn,{size:24})})]}),(0,k.jsx)("hr",{className:"wi-divider"})]}):(0,k.jsxs)("div",{className:"wi-sticky-header",children:[(0,k.jsxs)("div",{className:"wi-header wi-header--wallet",children:[(0,k.jsxs)("div",{className:"wi-account-block",children:[(0,k.jsxs)("div",{className:"wi-avatar",children:[(0,k.jsx)("div",{className:"wi-avatar-fallback",style:xc}),ci&&(0,k.jsx)("img",{src:ci,alt:"",className:"wi-avatar-img",width:28,height:28,draggable:!1,onLoad:di,onError:T=>{T.currentTarget.style.display="none"}})]}),Tc]}),(0,k.jsxs)("div",{className:"wi-header-actions",children:[x&&(y||Fe)&&(0,k.jsx)("button",{type:"button",className:"wi-header-action wi-header-action--qr",onClick:ea,"aria-label":"Show QR code","data-track":"receive",children:(0,k.jsx)(Ti,{size:20})}),(0,k.jsx)("button",{type:"button",className:"wi-header-action",onClick:R,"aria-label":"Close","data-wi-close":!0,children:(0,k.jsx)(vn,{size:24})})]})]}),(0,k.jsx)("hr",{className:"wi-divider"})]}),(0,k.jsxs)("div",{className:"wi-view-container",children:[F==="wallet"&&ob,F==="qr"&&mb,F==="portfolio"&&ab,F==="send"&&ib,F==="bridge"&&lb,F==="token-detail"&&db,F==="onepop"&&fb,F==="nft-collection"&&cb,F==="nft-detail"&&pb]}),(F==="wallet"||F==="onepop")&&Cn&&(0,k.jsx)("div",{className:"wi-action-toast",role:"status","aria-live":"polite",children:Cn}),F==="wallet"&&et&&(0,k.jsxs)("a",{className:"wi-send-toast",href:Br??"#",target:"_blank",rel:"noopener noreferrer",onClick:T=>{if(!Br){T.preventDefault();return}jt(T,Br,{category:"send",origin:"send-transaction",payload:{chainId:et.chainId,txHash:et.txHash}},mt)},children:[(0,k.jsx)("span",{className:"wi-send-toast-icon","data-status":et.status,"aria-hidden":!0,children:et.status==="pending"?(0,k.jsx)("span",{className:"wi-send-toast-spinner"}):et.status==="error"?(0,k.jsx)("span",{className:"wi-send-toast-error-dot"}):(0,k.jsx)(vp,{size:20})}),(0,k.jsxs)("span",{className:"wi-send-toast-copy",children:[(0,k.jsx)("span",{className:"wi-send-toast-title",children:et.status==="pending"?"Sending...":et.status==="error"?"Send failed":"Send complete"}),(0,k.jsx)("span",{className:"wi-send-toast-desc",children:et.status==="pending"||et.status==="error"?et.description:"Tap to see your transaction"})]})]}),Sc&&F!=="portfolio"&&F!=="send"&&F!=="token-detail"&&F!=="nft-collection"&&F!=="nft-detail"&&F!=="onepop"&&(0,k.jsx)("div",{className:"wi-sticky-footer",children:(0,k.jsx)("div",{className:"wi-footer",ref:ri,children:Sc})})]}),Nl={...oe,...Jr>0?{"--wi-footer-height":`${Jr}px`}:null},Ic=J.useCallback(T=>{let pe=T.detail.originalEvent.target;pe instanceof Element&&pe.closest("[data-rd-shell]")!==null&&T.preventDefault()},[]);return Fe?(0,k.jsx)(Le,{feature:"wallet_info",children:(0,k.jsxs)("div",{className:Ee("wi-drawer-content wi-page-content",n),"data-theme":i,style:Nl,"data-no-balance":!w||void 0,"data-has-footer":Jr>0||void 0,"data-view":F,children:[(0,k.jsx)("h1",{className:"wi-sr-only",children:"My Wallet"}),Rl]})}):s?(0,k.jsx)(Le,{feature:"wallet_info",children:(0,k.jsxs)(Pa.Drawer.Portal,{children:[p&&(0,k.jsx)(Pa.Drawer.Overlay,{className:"wi-drawer-overlay"}),(0,k.jsxs)(Pa.Drawer.Content,{className:Ee("wi-drawer-content",n),"data-theme":i,"data-vaul-no-drag":d==="left"||d==="right"?!0:void 0,style:Nl,"data-direction":d,"data-no-balance":!w||void 0,"data-has-footer":Jr>0||void 0,"data-view":F,onInteractOutside:Ic,children:[(0,k.jsx)(Pa.Drawer.Title,{className:"wi-sr-only",children:"My Wallet"}),Rl]})]})}):(0,k.jsxs)(Le,{feature:"wallet_info",children:[p&&l&&(0,k.jsx)("div",{className:"wi-drawer-overlay",onClick:R}),(0,k.jsx)(Ts.Portal,{children:(0,k.jsx)(Ts.Content,{align:e,sideOffset:t,className:Ee("wi-popover-content",n),"data-theme":i,style:Nl,"data-no-balance":!w||void 0,"data-has-footer":Jr>0||void 0,"data-view":F,onInteractOutside:Ic,children:Rl})})]})}var Qg=_(require("react"),1);function Vg({position:e="top",children:t}){let{setNavContent:n,setNavPosition:r}=Fr();return Qg.useEffect(()=>(n(t),r(e),()=>n(null)),[t,e,n,r]),null}var qg=_(require("react"),1);function Yg({children:e}){let{setFooterContent:t}=Fr();return qg.useEffect(()=>(t(e),()=>t(null)),[e,t]),null}he(`[data-theme=dark].wi-popover-content,[data-theme=dark].wi-drawer-content{--wi-primary: var(--ds-accent-primary-high, #f0640d);--wi-secondary: var(--ds-system-red-default, #e70077);--wi-surface-bg: var(--ds-bg-default, #121212);--wi-surface-default: var(--ds-surface-medium, rgba(255, 255, 255, .05));--wi-surface-subtle: var(--ds-surface-high, rgba(255, 255, 255, .1));--wi-border-default: var(--ds-border-default, rgba(255, 255, 255, .05));--wi-border-subtle: var(--ds-border-medium, rgba(255, 255, 255, .1));--wi-texticon-primary: var(--ds-content-highest, #ffffff);--wi-texticon-secondary: var(--ds-content-medium, rgba(255, 255, 255, .7));--wi-texticon-tertiary: var(--ds-content-low, rgba(255, 255, 255, .5));--wi-on-primary: var(--ds-accent-primary-on, #ffffff);--wi-error: var(--ds-system-red-default, #e70077);--wi-shadow: 0 2px 16px -2px rgba(0, 0, 0, .4)}[data-theme=light].wi-popover-content,[data-theme=light].wi-drawer-content{--wi-primary: var(--ds-accent-primary-high, #f0640d);--wi-secondary: var(--ds-system-red-default, #e70077);--wi-surface-bg: var(--ds-bg-default, #ffffff);--wi-surface-default: var(--ds-surface-medium, rgba(18, 18, 18, .05));--wi-surface-subtle: var(--ds-surface-high, rgba(18, 18, 18, .1));--wi-border-default: var(--ds-border-default, rgba(18, 18, 18, .05));--wi-border-subtle: var(--ds-border-medium, rgba(18, 18, 18, .1));--wi-texticon-primary: var(--ds-content-highest, #121212);--wi-texticon-secondary: var(--ds-content-medium, rgba(18, 18, 18, .7));--wi-texticon-tertiary: var(--ds-content-low, rgba(18, 18, 18, .5));--wi-on-primary: var(--ds-accent-primary-on, #ffffff);--wi-error: var(--ds-system-red-default, #e70077);--wi-shadow: 0 2px 16px -2px rgba(0, 0, 0, .15)}
5
+ `);he("");var Ni=require("react/jsx-runtime");function Ul({env:e,theme:t="dark",mobileBreakpoint:n=768,domain:r,children:o}){let a=Po(`(max-width: ${n}px)`),[i,s]=Oo.useState(!1),l=Oo.useCallback(()=>s(!1),[]),d=it(e);Qn(i,l);let p=Oo.useMemo(()=>({env:d,theme:t,isMobile:a,open:i,domain:r,close:l}),[d,t,a,i,r,l]);return(0,Ni.jsx)(Ol.Provider,{value:p,children:a?(0,Ni.jsx)(tp.Drawer.Root,{direction:"right",open:i,onOpenChange:s,noBodyStyles:!0,children:o},"drawer"):(0,Ni.jsx)(ep.Root,{open:i,onOpenChange:s,children:o},"popover")})}var ap=H(require("@radix-ui/react-popover"),1),ip=require("vaul");var wn=require("react/jsx-runtime");function np({size:e=18}){return(0,wn.jsxs)("svg",{className:"al-trigger-icon",width:e,height:e,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,wn.jsx)("rect",{width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,wn.jsx)("rect",{x:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,wn.jsx)("rect",{x:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,wn.jsx)("rect",{y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,wn.jsx)("rect",{x:"7",y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,wn.jsx)("rect",{x:"14",y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,wn.jsx)("rect",{y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,wn.jsx)("rect",{x:"7",y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),(0,wn.jsx)("rect",{x:"14",y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"})]})}function rp(){return(0,wn.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,wn.jsx)("path",{d:"M12 19L5 12M5 12L12 5M5 12H19",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function op(){return(0,wn.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,wn.jsx)("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}var ao=require("react/jsx-runtime");function jl({asChild:e,children:t,className:n,style:r}){let{isMobile:o,theme:a}=vi(),i=t!=null,s=e??!0,l=n?`al-trigger-btn ${n}`:"al-trigger-btn",d=i?t:(0,ao.jsx)("button",{type:"button",className:l,"data-theme":a,"data-track":"open",style:r,children:(0,ao.jsx)(np,{size:18})});return o?(0,ao.jsx)(Me,{feature:"app_launcher",children:(0,ao.jsx)(ip.Drawer.Trigger,{asChild:s,children:d})}):(0,ao.jsx)(Me,{feature:"app_launcher",children:(0,ao.jsx)(ap.Trigger,{asChild:s,children:d})})}var lr=H(require("react"),1),Si=H(require("@radix-ui/react-popover"),1),io=require("vaul");var dp=require("@tanstack/react-query");var sp={dev:"https://stg-contents.crosstoken.io/frontend/common/app-launcher/app-launcher-v2.json",stage:"https://stg-contents.crosstoken.io/frontend/common/app-launcher/app-launcher-v2.json",production:"https://contents.crosstoken.io/frontend/common/app-launcher/app-launcher-v2.json"};var Xb="https://stg-contents.crosstoken.io/frontend/common/app-launcher/icons",Jb="https://contents.crosstoken.io/frontend/common/app-launcher/icons";function sr(e,t){return`${e==="production"?Jb:Xb}/${t}.png`}function lp(e){let t=e==="production"?"production":"stage";return{version:"0.0.1-fallback",items:[{id:"gametoken-cross",label:"Gametoken",description:"Trade game tokens easily using CROSS.",url:{dev:"https://stg.onechain.nexus/gametoken",stage:"https://stg.onechain.nexus/gametoken",production:"https://www.onechain.nexus/gametoken"},iconUrl:sr(t,"game-token"),order:1e3,type:"gametoken",badge:null,isNew:!1,serviceStatus:"available"},{id:"forge",label:"Forge",description:"Launch Your Game, Ignite the Market",url:{dev:"https://stg.onechain.nexus/forge",stage:"https://stg.onechain.nexus/forge",production:"https://onechain.nexus/forge"},iconUrl:sr(t,"forge"),order:4e3,type:"forge",badge:null,isNew:!0,serviceStatus:"available"},{id:"crossd",label:"Bridge",description:"The first decentralized exchange on the CROSS network.",url:{dev:"https://stg.crossdefi.io/swap-bridge",stage:"https://stg.crossdefi.io/swap-bridge",production:"https://www.crossdefi.io/swap-bridge"},iconUrl:sr(t,"crossd"),order:5e3,type:"crossd",badge:null,isNew:!1,serviceStatus:"ending"},{id:"prediction",label:"Prediction",description:"Prediction market",url:{dev:"https://stg-prediction.crossdefi.io",stage:"https://stg-prediction.crossdefi.io",production:"https://prediction.crossdefi.io/"},iconUrl:sr(t,"prediction"),order:6e3,type:"prediction",badge:null,isNew:!0,serviceStatus:"available"},{id:"rewards",label:"Rewards",description:"Deposit CROSS and earn rewards. Grow together.",url:{dev:"https://stg.onechain.nexus/rewards",stage:"https://stg.onechain.nexus/rewards",production:"https://onechain.nexus/rewards"},iconUrl:sr(t,"reward"),order:7e3,type:"rewards",badge:null,isNew:!1,serviceStatus:"ending"},{id:"cross-staking",label:"Staking",description:"Stake CROSS and earn rewards.",url:{dev:"https://stg-stake.ogfcorp.com",stage:"https://stg-stake.ogfcorp.com",production:"https://stake.ogfcorp.com"},iconUrl:sr(t,"cross-staking"),order:7500,type:"cross-staking",badge:null,isNew:!0,serviceStatus:"available"},{id:"play",label:"Quest",description:"Discover and play games on CROSS.",url:{dev:"https://stg.onechain.nexus/quest",stage:"https://stg.onechain.nexus/quest",production:"https://www.onechain.nexus/quest"},iconUrl:sr(t,"play"),order:8500,type:"play",badge:null,isNew:!0,serviceStatus:"available"},{id:"shop",label:"Shop",description:"Game Payment Platform & In-Game Currency Store.",url:{dev:"https://stg.onechain.nexus/shop",stage:"https://stg.onechain.nexus/shop",production:"https://www.onechain.nexus/shop"},iconUrl:sr(t,"shop"),order:9e3,type:"shop",badge:null,isNew:!1,serviceStatus:"available"},{id:"explorer",label:"Explorer",description:"View transactions, blocks, and token data on the CROSS network.",url:{dev:"https://stg-explorer.onechain.nexus",stage:"https://stg-explorer.onechain.nexus",production:"https://explorer.onechain.nexus"},iconUrl:sr(t,"explorer"),order:12e3,type:"explorer",badge:null,isNew:!1,serviceStatus:"available"},{id:"wave",label:"Wave",description:"Stream, support, and earn in the CROSS ecosystem.",url:{dev:"https://stg.onechain.nexus/wave",stage:"https://stg.onechain.nexus/wave",production:"https://www.onechain.nexus/wave"},iconUrl:sr(t,"wave"),order:11e4,type:"wave",badge:null,isNew:!1,serviceStatus:"available"}]}}function da(e){let t=it(e);return(0,dp.useQuery)({queryKey:["global-menu",t],queryFn:async()=>{try{let n=await fetch(sp[t],{cache:"no-store"});if(!n.ok)throw new Error(`Failed to fetch global menu: ${n.status}`);return n.json()}catch{return lp(t)}},staleTime:300*1e3,gcTime:600*1e3,retry:!1,refetchOnMount:!0})}function Wl(e){return e.serviceStatus==="ending"||e.serviceStatus==="comingSoon"?e.serviceStatus:"available"}function pp(e,t){return typeof e=="string"?e:e[t]??e.production??e.stage??e.dev}function up(e){return[...e].sort((t,n)=>{let r=cp(t)-cp(n);return r!==0?r:t.order-n.order})}function cp(e){let t=Wl(e);return t==="comingSoon"?0:t==="ending"?2:1}var dt=require("react/jsx-runtime");function $b(e){return e.id==="cross-staking"||e.type==="cross-staking"}function Gl({align:e="end",sideOffset:t=8,className:n}){let{env:r,theme:o,isMobile:a,domain:i,close:s}=vi(),{data:l}=da(r),d=lr.useMemo(()=>up(l?.items??[]),[l?.items]),p=24,h=lr.useRef(null),u=lr.useRef(!1),g=lr.useCallback(k=>{h.current={x:k.clientX,y:k.clientY},u.current=!1},[]),x=lr.useCallback(k=>{let C=h.current;h.current=null,C&&(u.current=Math.abs(k.clientX-C.x)>p||Math.abs(k.clientY-C.y)>p)},[]),y=lr.useCallback(()=>{h.current=null,u.current=!0},[]),f=typeof window<"u"?window.location.pathname:"",c=lr.useCallback((k,C)=>{let N=u.current;if(u.current=!1,N&&k.detail!==0)return;let T=C.url[r]??C.url.production,R=fp(T,i);if(!R)try{let S=new URL(T);if(S.pathname===window.location.pathname&&S.search===window.location.search&&S.hash===window.location.hash){s();return}}catch{}if(R){let S=window.open(T,"_blank");if(S){S.opener=null,s();return}}window.location.href=T},[r,i,s]),b=k=>{let C=k.url[r]??k.url.production,N=fp(C,i),T=Wl(k),R=T==="ending",S=pp(k.iconUrl,r),E=!1;if(!N)try{let A=new URL(C).pathname;E=f===A||f.startsWith(A+"/")}catch{E=!1}return(0,dt.jsx)("button",{type:"button",className:"al-grid-item","data-track":"menu_item_click","data-track-id":k.id,"data-active":E||void 0,"data-service-status":T,onPointerDown:g,onPointerUp:x,onPointerCancel:y,onClick:A=>c(A,k),children:(0,dt.jsxs)("div",{className:"al-grid-item-left",children:[(0,dt.jsxs)("div",{className:"al-grid-item-icon",children:[(0,dt.jsx)("img",{src:S,alt:k.label,width:24,height:24,loading:"lazy"}),k.isNew&&(0,dt.jsx)("span",{className:"al-status-ribbon al-status-ribbon-new",children:"N"})]}),(0,dt.jsxs)("span",{className:"al-grid-item-text",children:[(0,dt.jsx)("span",{className:"al-grid-item-label",children:k.label}),R&&(0,dt.jsx)("span",{className:"al-grid-item-status-text",children:"(End Soon)"}),k.badge&&!$b(k)&&(0,dt.jsx)("span",{className:"al-badge al-badge-list",children:k.badge})]})]})},k.id)},w=(0,dt.jsx)("div",{className:"al-menu","data-theme":o,children:(0,dt.jsx)("div",{className:"al-grid",children:d.map(b)})});return a?(0,dt.jsx)(Me,{feature:"app_launcher",children:(0,dt.jsxs)(io.Drawer.Portal,{children:[(0,dt.jsx)(io.Drawer.Overlay,{className:"al-drawer-overlay"}),(0,dt.jsxs)(io.Drawer.Content,{className:Ie("al-drawer-content",n),"data-theme":o,children:[(0,dt.jsxs)("div",{className:"al-drawer-header",children:[(0,dt.jsx)(io.Drawer.Close,{className:"al-drawer-close","data-track":"close",children:(0,dt.jsx)(rp,{})}),(0,dt.jsx)(io.Drawer.Title,{className:"al-drawer-title",children:"ONE Services"}),(0,dt.jsx)(io.Drawer.Close,{className:"al-drawer-close","data-track":"close",children:(0,dt.jsx)(op,{})})]}),(0,dt.jsx)("div",{className:"al-drawer-body",children:w})]})]})}):(0,dt.jsx)(Me,{feature:"app_launcher",children:(0,dt.jsx)(Si.Portal,{children:(0,dt.jsx)(Si.Content,{align:e,sideOffset:t,className:Ie("al-popover-content",n),"data-theme":o,children:w})})})}function fp(e,t){try{let n=new URL(e).hostname;return typeof window>"u"?!0:n!==(t??window.location.hostname)}catch{return!1}}var Ba=H(require("react"),1),oh=H(require("@radix-ui/react-popover"),1),ah=require("vaul");var Ti=require("react"),ca=(0,Ti.createContext)(null);function Ur(){let e=(0,Ti.useContext)(ca);if(!e)throw new Error("WalletInfo compound components must be used within <WalletInfo>");return e}var gn=H(require("react"),1);var mp=require("@nexus-cross/crossx-design-system"),Ii=(r=>(r.CROSSx="crossx",r.MetaMask="io.metamask",r.Binance="com.binance.wallet",r))(Ii||{}),pa={crossx:{name:mp.WALLET_LABELS.default,iconUrl:"https://contents.crosstoken.io/wallet/token/images/tCROSS.svg"},"io.metamask":{name:"MetaMask",iconUrl:"https://upload.wikimedia.org/wikipedia/commons/3/36/MetaMask_Fox.svg"},"com.binance.wallet":{name:"Binance Wallet",iconUrl:"https://public.bnbstatic.com/static/images/common/favicon.ico"}};var lu=H(require("react"),1);var be=require("react/jsx-runtime");function gp({size:e=16,className:t}){return(0,be.jsxs)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,be.jsx)("path",{d:"M12.6667 4.66667V2.66667C12.6667 2.48986 12.5964 2.32029 12.4714 2.19526C12.3464 2.07024 12.1768 2 12 2H3.33333C2.97971 2 2.64057 2.14048 2.39052 2.39052C2.14048 2.64057 2 2.97971 2 3.33333C2 3.68696 2.14048 4.02609 2.39052 4.27614C2.64057 4.52619 2.97971 4.66667 3.33333 4.66667H13.3333C13.5101 4.66667 13.6797 4.7369 13.8047 4.86193C13.9298 4.98695 14 5.15652 14 5.33333V8M14 8H12C11.6464 8 11.3072 8.14048 11.0572 8.39052C10.8071 8.64057 10.6667 8.97971 10.6667 9.33333C10.6667 9.68696 10.8071 10.0261 11.0572 10.2761C11.3072 10.5262 11.6464 10.6667 12 10.6667H14C14.1768 10.6667 14.3464 10.5964 14.4714 10.4714C14.5964 10.3464 14.6667 10.1768 14.6667 10V8.66667C14.6667 8.48986 14.5964 8.32029 14.4714 8.19526C14.3464 8.07024 14.1768 8 14 8Z",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),(0,be.jsx)("path",{d:"M2 3.33325V12.6666C2 13.0202 2.14048 13.3593 2.39052 13.6094C2.64057 13.8594 2.97971 13.9999 3.33333 13.9999H13.3333C13.5101 13.9999 13.6797 13.9297 13.8047 13.8047C13.9298 13.6796 14 13.5101 14 13.3333V10.6666",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})]})}function Cr({size:e=16,className:t}){return(0,be.jsx)("svg",{width:e,height:e,viewBox:"4 4 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,be.jsx)("path",{d:"M9.40284 17.0647H4.85156V4.84656H17.0697V9.39783H15.4407V6.47565H6.48066V15.4356H9.40284V17.0647ZM21.5192 12.5644H12.5592V21.5244H21.5192V12.5644ZM23.1483 10.9353V23.1535H10.9301V10.9353H23.1483Z",fill:"currentColor"})})}function qn({size:e=16,className:t}){return(0,be.jsx)("svg",{width:e,height:e,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,be.jsx)("path",{d:"M11.6667 3.5L5.25 9.91667L2.33334 7",stroke:"currentColor",strokeWidth:1.16667,strokeLinecap:"round",strokeLinejoin:"round"})})}function vn({size:e=24,className:t}){return(0,be.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,be.jsx)("path",{d:"M18 6L6 18M6 6l12 12",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function hp({size:e=20,className:t}){return(0,be.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,be.jsx)("path",{d:"M7.5 17.5H4.167A1.667 1.667 0 012.5 15.833V4.167A1.667 1.667 0 014.167 2.5H7.5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),(0,be.jsx)("path",{d:"M13.333 14.167L17.5 10l-4.167-4.167M17.5 10H7.5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})]})}function Ei({size:e=20,className:t}){return(0,be.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,children:(0,be.jsx)("path",{d:"M7.91305 10.8327C8.60341 10.8327 9.16305 11.3924 9.16305 12.0827V16.2458C9.16305 16.9361 8.60341 17.4958 7.91305 17.4958H3.75C3.05964 17.4958 2.5 16.9361 2.5 16.2458L2.5 12.0827C2.5 11.3924 3.05964 10.8327 3.75 10.8327H7.91305ZM14.1685 17.4958H12.5027V15.83H14.1685V17.4958ZM17.5 17.4958H15.8342V15.83H17.5V17.4958ZM4.16576 12.4985V15.83H7.49729V12.4985H4.16576ZM12.5027 15.83H10.8369V14.1642H12.5027V15.83ZM15.8342 15.83H14.1685V14.1642H15.8342V15.83ZM14.1685 14.1642H12.5027V12.4985H14.1685V14.1642ZM17.5 14.1642H15.8342V12.4985H17.5V14.1642ZM12.5027 12.4985H10.8369V10.8327H12.5027V12.4985ZM15.8342 12.4985H14.1685V10.8327H15.8342V12.4985ZM7.91305 2.50391C8.60341 2.50391 9.16305 3.06355 9.16305 3.75391V7.91696C9.16305 8.60731 8.60341 9.16696 7.91305 9.16696H3.75C3.05964 9.16696 2.5 8.60731 2.5 7.91696L2.5 3.75391C2.5 3.06355 3.05964 2.50391 3.75 2.50391L7.91305 2.50391ZM16.2419 2.50391C16.9322 2.50391 17.4919 3.06355 17.4919 3.75391V7.91696C17.4919 8.60731 16.9322 9.16696 16.2419 9.16696H12.0788C11.3885 9.16696 10.8288 8.60731 10.8288 7.91696V3.75391C10.8288 3.06355 11.3885 2.50391 12.0788 2.50391L16.2419 2.50391ZM4.16576 4.16967L4.16576 7.50119L7.49729 7.50119L7.49729 4.16967L4.16576 4.16967ZM12.4946 4.16967V7.50119H15.8261V4.16967H12.4946Z",fill:"currentColor",fillOpacity:1})})}function En({size:e=20,className:t}){return(0,be.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,be.jsx)("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor",strokeWidth:1.67,strokeLinecap:"round",strokeLinejoin:"round"})})}function zn({size:e=20,className:t}){return(0,be.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,be.jsx)("path",{d:"M5 8L10 13L15 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function bp({size:e=16,className:t}){return(0,be.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,be.jsx)("path",{d:"M1.667 10S4.167 4.167 10 4.167 18.333 10 18.333 10 15.833 15.833 10 15.833 1.667 10 1.667 10z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),(0,be.jsx)("path",{d:"M10 12.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})]})}function wp({size:e=16,className:t}){return(0,be.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,be.jsx)("path",{d:"M14.95 14.95A8.283 8.283 0 0110 16.667c-5.833 0-8.333-5.833-8.333-5.833a15.238 15.238 0 014.183-4.884m3.267-1.55A7.55 7.55 0 0110 4.167c5.833 0 8.333 5.833 8.333 5.833a15.28 15.28 0 01-1.783 2.633M11.767 11.767a2.5 2.5 0 11-3.534-3.534",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),(0,be.jsx)("path",{d:"M1.667 1.667l16.666 16.666",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})]})}var ew='<svg width="100%" height="100%" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_72837_24069)"><mask id="mask0_72837_24069" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="100" height="100"><path d="M50 0C10.5289 0 0 10.5289 0 50C0 89.4711 10.5289 100 50 100C89.4711 100 100 89.4711 100 50C100 10.5289 89.4711 0 50 0Z" fill="white"/></mask><g mask="url(#mask0_72837_24069)"><path d="M99.9501 0.0499268H0V100H99.9501V0.0499268Z" fill="url(#paint0_linear_72837_24069)"/><path d="M34.9302 100H99.9751V19.0619L34.9302 60.7286V100Z" fill="url(#paint1_linear_72837_24069)"/><path d="M34.9301 100H0V23.8024L34.9301 60.7285V100Z" fill="url(#paint2_linear_72837_24069)"/></g><g filter="url(#filter0_d_72837_24069)"><path d="M49.9503 21.4821L31.9862 31.8613C28.8176 33.6827 27.7198 37.7745 29.5411 40.9432C31.3625 44.1118 35.4543 45.2096 38.623 43.3883L53.8176 34.6058L46.582 42.3653V72.8044C46.582 76.4721 49.576 79.4661 53.2437 79.4661C56.9114 79.4661 59.9054 76.4721 59.9054 72.8044V27.2455C59.9054 25.9731 59.5062 24.7256 59.0072 23.9022C57.1359 20.7585 53.094 19.6358 49.9254 21.4571L49.9503 21.4821Z" fill="white"/></g></g><defs><filter id="filter0_d_72837_24069" x="7.4286" y="-0.650014" width="87.831" height="115.47" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dx="7.06088" dy="7.06088"/><feGaussianBlur stdDeviation="14.1467"/><feColorMatrix type="matrix" values="0 0 0 0 0.831373 0 0 0 0 0.113725 0 0 0 0 0.356863 0 0 0 0.3 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_72837_24069"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_72837_24069" result="shape"/></filter><linearGradient id="paint0_linear_72837_24069" x1="-11.5768" y1="-12.001" x2="106.562" y2="106.986" gradientUnits="userSpaceOnUse"><stop stop-color="#F3752D"/><stop offset="1" stop-color="#EC1272"/></linearGradient><linearGradient id="paint1_linear_72837_24069" x1="24.9501" y1="23.004" x2="73.6278" y2="64.8453" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><linearGradient id="paint2_linear_72837_24069" x1="62.3503" y1="3.46804" x2="16.3423" y2="63.3732" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><clipPath id="clip0_72837_24069"><rect width="100" height="100" fill="white"/></clipPath></defs></svg>',tw=`data:image/svg+xml,${encodeURIComponent(ew)}`;function yp({size:e=42,className:t}){return(0,be.jsx)("img",{src:tw,width:e,height:e,alt:"",className:t,style:{display:"block"}})}function xp({size:e=20,className:t}){return(0,be.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,be.jsx)("path",{d:"M9.19133 10.8077C9.04905 10.6657 8.87947 10.554 8.69283 10.4792L2.78881 8.11167C2.71832 8.08338 2.65816 8.03421 2.61642 7.97075C2.57468 7.90729 2.55335 7.83258 2.5553 7.75665C2.55724 7.68072 2.58237 7.6072 2.6273 7.54596C2.67224 7.48472 2.73483 7.4387 2.80668 7.41406L16.9525 2.5747C17.0185 2.55087 17.0899 2.54632 17.1583 2.56159C17.2268 2.57685 17.2895 2.6113 17.3391 2.66089C17.3887 2.71049 17.4231 2.77319 17.4384 2.84165C17.4536 2.9101 17.4491 2.9815 17.4253 3.04746L12.5859 17.1933C12.5613 17.2651 12.5152 17.3277 12.454 17.3727C12.3928 17.4176 12.3192 17.4427 12.2433 17.4447C12.1674 17.4466 12.0927 17.4253 12.0292 17.3835C11.9658 17.3418 11.9166 17.2817 11.8883 17.2112L9.52073 11.3056C9.44567 11.1191 9.33362 10.9498 9.19133 10.8077ZM9.19133 10.8077L17.3367 2.66404",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}function vp({size:e=24,className:t}){return(0,be.jsxs)("svg",{width:e,height:e,viewBox:"-2.5 -2.5 26.67 26.67",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,be.jsx)("defs",{children:(0,be.jsxs)("linearGradient",{id:"wi-send-solid-grad",x1:"21.6678",y1:"10.8341",x2:"3.99487",y2:"19.2366",gradientUnits:"userSpaceOnUse",children:[(0,be.jsx)("stop",{stopColor:"var(--wi-send-solid-from, #f62e61)"}),(0,be.jsx)("stop",{offset:"1",stopColor:"var(--wi-send-solid-to, #f7564a)"})]})}),(0,be.jsx)("path",{d:"M19.7662 0.0826863C20.8951 -0.311758 21.9796 0.772686 21.5851 1.90158L15.0018 20.7127C14.574 21.9327 12.874 22.0016 12.3496 20.8205L9.1729 13.6738L13.644 9.20158C13.7912 9.0436 13.8713 8.83466 13.8675 8.61877C13.8637 8.40288 13.7763 8.1969 13.6236 8.04422C13.4709 7.89154 13.2649 7.80408 13.049 7.80027C12.8331 7.79646 12.6242 7.8766 12.4662 8.0238L7.99401 12.4949L0.847345 9.31824C-0.333766 8.79269 -0.263766 7.0938 0.955123 6.66602L19.7662 0.0826863Z",fill:"url(#wi-send-solid-grad)"})]})}function kp({size:e=20,className:t}){return(0,be.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,be.jsx)("path",{d:"M10.8333 14.1667V7.5M15 14.1667V4.16667M2.5 2.5V15.8333C2.5 16.2754 2.67559 16.6993 2.98816 17.0118C3.30072 17.3244 3.72464 17.5 4.16667 17.5H17.5M6.66667 14.1667V11.6667",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}function Cp({size:e=20,className:t}){return(0,be.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,be.jsx)("path",{d:"M6.6665 9.99984H13.3332M9.99984 6.6665V13.3332M18.3332 9.99984C18.3332 14.6022 14.6022 18.3332 9.99984 18.3332C5.39746 18.3332 1.6665 14.6022 1.6665 9.99984C1.6665 5.39746 5.39746 1.6665 9.99984 1.6665C14.6022 1.6665 18.3332 5.39746 18.3332 9.99984Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}function Rp({size:e=20,className:t}){return(0,be.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,be.jsx)("path",{d:"M6.667 2.5 3.333 5.833 6.667 9.167M3.333 5.833h13.334M13.333 17.5l3.334-3.333-3.334-3.334M16.667 14.167H3.333",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}function Np({size:e=20,className:t}){return(0,be.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,be.jsx)("circle",{cx:"10",cy:"10",r:"10",fill:"currentColor"}),(0,be.jsx)("path",{d:"M6 10.2L8.6 12.8L14 7.2",stroke:"var(--ds-accent-primary-on, #ffffff)",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"})]})}function ua({size:e=14,className:t}){return(0,be.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":!0,children:(0,be.jsx)("path",{d:"M14 4h6v6M20 4l-9 9M18 13v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h5",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})})}function Sp({className:e}){return(0,be.jsxs)("svg",{viewBox:"0 0 540 540",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:e,"aria-hidden":!0,children:[(0,be.jsx)("path",{d:"M341.385 435.217V376.643H326.742V362H370.672V376.643H356.029V435.217H341.385Z"}),(0,be.jsx)("path",{d:"M261.725 435.217V362H305.656V376.643H276.369V391.287H305.656V405.93H276.369V435.217H261.725Z"}),(0,be.jsx)("path",{d:"M167.422 435.217V362H182.066V376.643H196.709V391.287H211.352V405.93H225.996V362H240.639V435.217H225.996V420.573H211.352V405.93H196.709V391.287H182.066V435.217H167.422Z"}),(0,be.jsx)("path",{d:"M237.374 204.563C243.054 204.563 248.502 202.307 252.518 198.29C256.534 194.274 258.791 188.826 258.791 183.146C258.791 177.466 256.534 172.019 252.518 168.002C248.502 163.986 243.054 161.73 237.374 161.73C231.694 161.73 226.247 163.986 222.23 168.002C218.214 172.019 215.957 177.466 215.957 183.146C215.957 188.826 218.214 194.274 222.23 198.29C226.247 202.307 231.694 204.563 237.374 204.563ZM371.228 145.667L269.499 86.7713L167.77 145.667V263.459L269.499 322.355L371.228 263.459V145.667ZM269.499 111.518L349.812 158.014V231.687L300.96 202.389L215.604 266.404L189.187 251.112V158.014L269.499 111.518ZM269.499 297.608L235.746 278.065L302.288 228.164L345.1 253.843L269.499 297.608Z"})]})}var we=H(require("react"),1);var jr=H(require("bignumber.js"),1);function nw(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===48;)t--;return t>0&&e.charCodeAt(t-1)===46&&t--,e.slice(0,t)}function Rr(e,t){if(!e||e==="0")return"0.00";let n=new jr.default(e).shiftedBy(-t),r=n.isGreaterThanOrEqualTo(1)?2:4;return n.toFormat(r,jr.default.ROUND_DOWN)}function dn(e){return e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`}function so(e){let t=typeof e=="string"?parseFloat(e):e;if(Number.isNaN(t)||t===0)return"$0.00";let n=t>=1?2:4,r=Math.pow(10,n);return`$${(Math.floor(t*r)/r).toLocaleString("en-US",{minimumFractionDigits:n,maximumFractionDigits:n})}`}function Ai(e,t,n){let o=new jr.default(e).shiftedBy(-t).multipliedBy(new jr.default(n));return o.isZero()||o.isNaN()?"$0.00":`$${(o.integerValue(jr.default.ROUND_DOWN).isGreaterThanOrEqualTo(1)?o.decimalPlaces(2,jr.default.ROUND_DOWN):o.decimalPlaces(4,jr.default.ROUND_DOWN)).toFormat()}`}function Tp(e){if(e===""||e===null||e===void 0)return{displayValue:"0",isLowerBound:!1};let t=typeof e=="number"?e.toString():e;if(t==="0"||t==="0.0")return{displayValue:"0",isLowerBound:!1};let n=t;if(n.includes("e")||n.includes("E")){let i=Number(n);if(!Number.isFinite(i)||i===0)return{displayValue:"0",isLowerBound:!1};n=nw(i.toFixed(18))}let[r="0",o=""]=n.split(".");if(Number(r)>=1){let i=o.slice(0,2).padEnd(2,"0");return{displayValue:`${Number(r).toLocaleString("en-US")}.${i}`,isLowerBound:!1}}return o.length<4?{displayValue:`${r}.${o}`,isLowerBound:!1}:o.slice(0,4)==="0000"?{displayValue:"0.0001",isLowerBound:!0}:{displayValue:`0.${o.slice(0,4)}`,isLowerBound:!1}}var _l=require("react"),Ap=require("@tanstack/react-query");var At={dev:{cross:612044,bsc:97},stage:{cross:612044,bsc:97},production:{cross:612055,bsc:56}},Ip={dev:[On(612044),On(97),On(998)],stage:[On(612044),On(97),On(998)],production:[On(612055),On(56)]};function Hl(e){return Ip[e]}var Mi="https://terms.onechain.nexus/docs/terms-july-23-2026",Li="https://terms.onechain.nexus/docs/pp-july-23-2026",Ep="https://contents.crossdefi.io/Terms/terms/tos-26-07-09-oneusd.html";var rw="send:chain-info";function ow(e){if("data"in e&&e.data!==void 0){let t=e.data;if(Array.isArray(t)){let n=t[0];if(!n)throw new Error("Chain info payload is empty.");return n}return t}return e}function Vl(e,...t){let n=e.replace(/\/+$/,""),r=t.map(o=>o.replace(/^\/+|\/+$/g,"")).filter(Boolean);return[n,...r].join("/")}function Mp(e,t,n,r){if(r)return t===At[e].cross?Lp(t,r):n?.explorer_url?Vl(n.explorer_url,n.explorer_postfix?.transaction??"tx",r):aw(e,t,r)}function Lp(e,t){return Vl("https://explorer.onechain.nexus",String(e),"tx",t)}function aw(e,t,n){let r=At[e];if(t===r.cross)return Lp(t,n);if(t===r.bsc)return Vl(e==="production"?"https://bscscan.com":"https://testnet.bscscan.com","tx",n)}function fa(e,t,n,r=!0){let o=(0,Ap.useQuery)({queryKey:[rw,e,t],queryFn:async({signal:s})=>{let l=await Be("walletServer",e),d=await fetch(`${l}/v1/public/chain/info/${t}`,{cache:"no-store",signal:s});if(!d.ok)throw new Error(`Failed to fetch chain info: ${d.status}`);let p=await d.json();if("code"in p&&p.code!==void 0&&p.code!==200)throw new Error(`Chain info API error: ${p.code}`);return ow(p)},enabled:r,staleTime:3e5}),a=o.data;return{transactionUrl:(0,_l.useMemo)(()=>Mp(e,t,a,n),[t,a,e,n]),chainInfo:a,...o}}function Di(e,t,n=!0){let{chainInfo:r}=fa(e,t,void 0,n);return{buildTxUrl:(0,_l.useMemo)(()=>a=>Mp(e,t,r,a),[e,t,r]),chainInfo:r}}var Dp="0x0000000000000000000000000000000000000001";var iw="0xa9059cbb",sw=/^0x[a-fA-F0-9]{40}$/,lw="nexus-cross:dapp-ui:send:recent:",Pp=10;function dw(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===48;)t--;return e.slice(0,t)}function ma(e){return e.toLowerCase()}function dr(e){return sw.test(e)}function Wr(e){return ma(e.address)===Dp}function Ql(e){return`${lw}${e.toLowerCase()}`}function Bo(e){if(typeof window>"u")return[];try{let t=window.localStorage.getItem(Ql(e));if(!t)return[];let n=JSON.parse(t);return Array.isArray(n)?n.filter(r=>r!==null&&typeof r=="object"&&dr(r.address)&&typeof r.updatedAt=="number").slice(0,Pp):[]}catch{return[]}}function ql(e,t){if(typeof window>"u")return[];let n=ma(t),r=[{address:n,updatedAt:Date.now()},...Bo(e).filter(o=>o.address!==n)].slice(0,Pp);try{window.localStorage.setItem(Ql(e),JSON.stringify(r))}catch{return Bo(e)}return r}function Yl(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(Ql(e))}catch{}}function Nr(e,t){let n=e.trim();if(!n)return{error:"Enter an amount."};if(!/^\d+(\.\d*)?$/.test(n))return{error:"Enter a valid amount."};let[r="0",o=""]=n.split(".");if(o.length>t)return{error:`Max ${t} decimal places.`};let a=BigInt(r||"0"),i=o.padEnd(t,"0"),s=i?BigInt(i):0n,l=10n**BigInt(t),d=a*l+s;return d<=0n?{error:"Amount must be greater than 0."}:{value:d}}function zo(e,t){let n=BigInt(e||"0"),r=10n**BigInt(t),o=n/r,a=n%r;if(a===0n)return o.toString();let i=dw(a.toString().padStart(t,"0"));return`${o.toString()}.${i}`}function Kl(e,t){let n=e.replace(/^0x/,"").toLowerCase().padStart(64,"0"),r=t.toString(16).padStart(64,"0");return`${iw}${n}${r}`}function cr(e,t,n=10){if(t<=0)return e.toString();let r=10n**BigInt(t),o=e/r,a=e%r;if(a===0n)return o.toString();let s=a.toString().padStart(t,"0").slice(0,Math.max(0,Math.min(n,t)));return s=s.replace(/0+$/,""),s?`${o.toString()}.${s}`:o.toString()}function Zl(e,t){return cr(e,t,6)}function Op(e){return cr(e,9,2)}function Bp(e){return e.toLocaleString("en-US")}function Pi(e){return e===56||e===97}function Oi(e){return e.gasPrice??e.maxFeePerGas}function zp(e,t=!1){return t?Oi(e)!==void 0?"legacy":null:e.maxFeePerGas!==void 0?"dynamic":e.gasPrice!==void 0?"legacy":null}function Bi(e,t=!1){if(t){let n=Oi(e);return n!==void 0?e.gasLimit*n:null}return e.maxFeePerGas!==void 0?e.gasLimit*e.maxFeePerGas:e.gasPrice!==void 0?e.gasLimit*e.gasPrice:null}function zi(e){return!Number.isFinite(e)||e<=0?"$0.00":`$${e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`}function Fp(e,t=0){if(t>4||e===null||e===void 0)return"";if(typeof e=="string")return e.toLowerCase();if(typeof e!="object")return"";let n=e,r=[];return typeof n.name=="string"&&r.push(n.name),typeof n.shortMessage=="string"&&r.push(n.shortMessage),typeof n.message=="string"&&r.push(n.message),typeof n.details=="string"&&r.push(n.details),n.cause!==void 0&&r.push(Fp(n.cause,t+1)),r.join(`
6
+ `).toLowerCase()}function cw(e){if(e instanceof Error)return e.message;if(typeof e=="string")return e;if(e&&typeof e=="object"){let t=e;if(typeof t.shortMessage=="string")return t.shortMessage;if(typeof t.message=="string")return t.message}return""}function Xl(e,t={},n="Failed to send transaction."){let r=Fp(e);if(!r)return n;let o=t.nativeSymbol?.trim()||"gas token",a=t.networkName?.trim();if(r.includes("user rejected")||r.includes("userrejected")||r.includes("user denied")||r.includes("user cancelled")||r.includes("user canceled")||r.includes("action_rejected")||r.includes("rejected by user"))return"Transaction was cancelled.";if(r.includes("insufficientfunds")||r.includes("insufficient funds")||r.includes("exceeds the balance of the account")||r.includes("insufficient balance for transfer")){let i=a?` on ${a}`:"";return`Not enough ${o} to cover the gas fee.Please top up your ${o} balance and try again.`}return r.includes("transaction underpriced")||r.includes("replacement transaction underpriced")||r.includes("fee too low")?"Gas fee was too low for the network. Please try again.":r.includes("nonce too low")||r.includes("nonce has already been used")||r.includes("nonce too high")?"Pending transactions are out of order. Refresh the page and try again.":r.includes("execution reverted")||r.includes("contractfunctionrevertederror")||r.includes("contractfunctionexecutionerror")?"The transaction was rejected by the contract. The recipient or token may be invalid.":r.match(/chain \d+ is not configured/)?"This network is not registered in the app. Contact support.":r.includes("http request failed")||r.includes("failed to fetch")||r.includes("network request failed")||r.includes("timeout")||r.includes("econnreset")||r.includes("rpc error")||r.includes("429")?"Network connection failed. Check your internet and try again.":r.includes("estimategas")||r.includes("gas estimation failed")?"Could not estimate the gas fee. The recipient address or amount may be invalid.":cw(e)||n}var pw=2000000000n,uw=1000000000n;async function Fi(e,t,n){let r=new AbortController,o=setTimeout(()=>r.abort(),8e3),a=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:t,params:n}),signal:r.signal}).finally(()=>clearTimeout(o));if(!a.ok)throw new Error(`RPC ${t} HTTP ${a.status}`);let i=await a.json();if(i.error)throw new Error(`RPC ${t}: ${i.error.message}`);if(i.result===void 0)throw new Error(`RPC ${t}: empty result`);return i.result}function Ui(e){return BigInt(e)}function fw(e){return`0x${e.toString(16)}`}function mw(e){let t={to:e.to};return e.from&&(t.from=e.from),e.value!==void 0&&e.value>0n&&(t.value=fw(e.value)),e.data&&(t.data=e.data),t}function gw(e){return e===56||e===97}async function Up(e){try{let t=await Fi(e,"eth_gasPrice",[]);return{gasPrice:Ui(t)}}catch{return{gasPrice:pw}}}async function hw(e,t){let n=uw;try{let r=await Fi(e,"eth_maxPriorityFeePerGas",[]);n=Ui(r)}catch{}return{maxFeePerGas:t+n,maxPriorityFeePerGas:n}}async function bw(e,t){if(t)return Up(e);let n;try{n=(await Fi(e,"eth_getBlockByNumber",["latest",!1]))?.baseFeePerGas}catch{}return n?hw(e,Ui(n)):Up(e)}async function jp(e,t){let n=gw(t.chainId),r=mw(t),[o,a]=await Promise.all([Fi(e,"eth_estimateGas",[r]),bw(e,n)]);return{gasLimit:Ui(o),gasPrice:a.gasPrice,maxFeePerGas:a.maxFeePerGas,maxPriorityFeePerGas:a.maxPriorityFeePerGas}}function Wp(e){let{estimateGas:t,sendTransaction:n,getTransactionReceipt:r}=e;return{canSend:!!n,canEstimateGas(o){return!!t||!!o},async estimateGas(o,a){if(t)return t(o);if(a)return jp(a,o);throw new Error("Gas estimation is not available.")},async sendTransaction(o){if(!n)throw new Error("Sending is not available for this wallet.");return n(o)},getTransactionReceipt:r}}var ww=1500,yw=120;function Gp(e){return!!(e.token||e.recipient||e.amount)}function Jl({recipient:e,amount:t,token:n,balanceRaw:r}){let o={},a=e.trim(),i=Nr(t,n.quantity.decimals),s;return a?dr(a)||(o.recipient="Enter a valid EVM recipient address."):o.recipient="Enter a recipient address.","error"in i?o.amount=i.error:(s=i.value,s>r&&(o.amount="Amount exceeds available balance.")),!Wr(n)&&!dr(n.address)&&(o.token="Token contract address is invalid."),{errors:o,rawAmount:o.amount?void 0:s,recipient:a&&dr(a)?a:void 0}}function $l({token:e,walletAddress:t,recipient:n,rawAmount:r}){let o=t;return Wr(e)?{to:n,value:r,chainId:e.chainId,from:o}:{to:ma(e.address),data:Kl(n,r),value:0n,chainId:e.chainId,from:o}}function xw(e){let{status:t}=e;return t==="reverted"||t==="0x0"||t===0||t===0n||t===!1}var vw=e=>new Promise(t=>setTimeout(t,e));async function Hp({repository:e,args:t,chainId:n,onSubmitted:r,pollIntervalMs:o=ww,pollMaxAttempts:a=yw}){let i=await e.sendTransaction(t);r(i);let{getTransactionReceipt:s}=e;if(!s)return"success";for(let l=0;l<a;l+=1){let d=await s({hash:i,chainId:n}).catch(()=>null);if(d)return xw(d)?"reverted":"success";await vw(o)}return"timeout"}var _p=["token","recipient","amount","review"];function Vp(e){let{env:t,walletAddress:n,accountName:r,accounts:o=[],initialStep:a="recipient",token:i,tokens:s=[],onTokenChange:l,sendTransaction:d,getTransactionReceipt:p,estimateGas:h,getTokenPriceUsd:u,onSubmitted:g,onSuccess:x,onFailed:y,onExit:f,onOutlink:c}=e,b=we.useMemo(()=>Wp({sendTransaction:d,getTransactionReceipt:p,estimateGas:h}),[d,p,h]),[w,k]=we.useState(i);we.useEffect(()=>{k(i)},[i.address,i.chainId]);let[C,N]=we.useState(a),[T,R]=we.useState(""),[S,E]=we.useState(""),[A,F]=we.useState({}),[D,G]=we.useState("idle"),[M,j]=we.useState(""),[le,oe]=we.useState(""),[ne,Q]=we.useState(null),[ee,z]=we.useState(!1),[q,ae]=we.useState(""),Z=we.useRef(0),[pe,Se]=we.useState(null),[Ue,fe]=we.useState(""),[Re,Ce]=we.useState(()=>Bo(n)),tt=we.useRef(new Set),Le=we.useCallback((V,ve)=>{tt.current.has(V)||(tt.current.add(V),Je("send",V,ve))},[]);we.useEffect(()=>{Le("opened"),a!=="token"&&Le("token_selected",{tags:{item_id:i.symbol}})},[Le,a,i.symbol]);let $e=we.useMemo(()=>it(t),[t]),{transactionUrl:wt,chainInfo:Ge}=fa($e,w.chainId,M||void 0,!0),Qe=Fr(w.chainId,$e),He=Qe.nativeSymbol??Ge?.currency_symbol??"",Dt=Qe.name??Ge?.name??`Chain ID ${w.chainId}`,tn=we.useRef({nativeSymbol:He||void 0,networkName:Dt,tokenSymbol:w.symbol});tn.current={nativeSymbol:He||void 0,networkName:Dt,tokenSymbol:w.symbol};let yt=we.useMemo(()=>BigInt(w.quantity.numeric||"0"),[w.quantity.numeric]),Pt=we.useMemo(()=>Rr(w.quantity.numeric,w.quantity.decimals),[w.quantity.numeric,w.quantity.decimals]),Tt=u?.(w),nn=we.useMemo(()=>{if(Tt===void 0)return;let V=parseFloat(S.replace(/,/g,""));return Number.isFinite(V)?V*Tt:0},[S,Tt]);we.useEffect(()=>{E(""),F({})},[w.address,w.chainId]),we.useEffect(()=>{Z.current+=1,Q(null),ae(""),z(!1)},[w.address,w.chainId,T,S]),we.useEffect(()=>{Ce(Bo(n))},[n]);let It=we.useCallback(V=>{R(V),F(ve=>({...ve,recipient:void 0}))},[]),ut=we.useCallback(V=>{E(V),F(ve=>({...ve,amount:void 0}))},[]),Ot=we.useCallback(()=>{E(Pt.replace(/,/g,"")),F(V=>({...V,amount:void 0}))},[Pt]),rt=we.useCallback(V=>{k(V),l?.(V),Le("token_selected",{tags:{item_id:V.symbol}}),N("recipient")},[l,Le]),on=we.useCallback(()=>N("token"),[]),ft=we.useCallback(()=>{N(V=>{if(V==="result")return"review";if(V===a)return f?.(),V;let ve=_p.indexOf(V);return ve<=0?(f?.(),V):_p[ve-1]})},[a,f]),fn=we.useCallback(()=>{let{errors:V}=Jl({recipient:T,amount:"1",token:w,balanceRaw:yt});if(V.recipient){F(ve=>({...ve,recipient:V.recipient}));return}F(ve=>({...ve,recipient:void 0})),Le("recipient_entered"),N("amount")},[T,w,yt,Le]),Ze=we.useCallback(V=>{R(V),F(ve=>({...ve,recipient:void 0})),Le("recipient_entered"),N("amount")},[Le]),lt=we.useCallback(()=>{let V=Jl({recipient:T,amount:S,token:w,balanceRaw:yt});F(V.errors),!(Gp(V.errors)||V.rawAmount===void 0||!V.recipient)&&(Se(V.rawAmount),fe(V.recipient),Q(null),ae(""),G("idle"),Le("amount_entered"),N("review"))},[T,S,w,yt,Le]);we.useEffect(()=>{if(C!=="review"||!Ue||pe===null||ne!==null||ee||q||!b.canEstimateGas(Ge?.rpc))return;let V=++Z.current;z(!0),ae(""),(async()=>{try{let ve=$l({token:w,walletAddress:n,recipient:Ue,rawAmount:pe}),Ne=await b.estimateGas(ve,Ge?.rpc);if(Z.current!==V)return;Q(Ne)}catch(ve){if(Z.current!==V)return;ae(Xl(ve,tn.current,"Failed to estimate gas."))}finally{Z.current===V&&z(!1)}})()},[C,Ue,pe,ne,ee,q,b,Ge?.rpc,w,n]);let nt=we.useMemo(()=>{if(!Wr(w)||!ne||pe===null)return!1;let V=Bi(ne,Pi(w.chainId));return V===null?!1:pe+V>yt},[w,ne,pe,yt]),Et=we.useCallback(async()=>{if(!(!Ue||pe===null)&&!nt){oe(""),j(""),G("submitting"),Le("submitted");try{let V="",ve=await Hp({repository:b,args:$l({token:w,walletAddress:n,recipient:Ue,rawAmount:pe}),chainId:w.chainId,onSubmitted:Ne=>{V=Ne,j(Ne),G("confirming"),Ce(ql(n,Ue)),g?.({txHash:Ne,chainId:w.chainId,amount:S,tokenSymbol:w.symbol,recipient:Ue})}});if(ve==="success")G("success"),Le("confirmed"),V&&x?x?.(V):N("result");else if(ve==="reverted"){let Ne="Transaction reverted on-chain.";G("error"),oe(Ne),Le("confirmed",{status:"failure",reason:Nn(new Error(Ne))}),V&&y?y({txHash:V,chainId:w.chainId,message:Ne}):N("result")}else{let Ne="Transaction receipt was not found. Please check again later.";G("error"),oe(Ne),Le("confirmed",{status:"failure",reason:"timeout"}),V&&y?y({txHash:V,chainId:w.chainId,message:Ne}):N("result")}}catch(V){G("error"),Le("confirmed",{status:"failure",reason:Nn(V)}),oe(Xl(V,{nativeSymbol:He||void 0,networkName:Dt,tokenSymbol:w.symbol})),N("result")}}},[b,Ue,pe,nt,w,S,n,g,x,y,He,Dt,Le]),[Rt,Xe]=we.useState(!1),an=we.useRef(void 0);we.useEffect(()=>()=>clearTimeout(an.current),[]);let sn=we.useCallback(async()=>{if(M)try{await navigator.clipboard.writeText(M),Xe(!0),clearTimeout(an.current),an.current=setTimeout(()=>Xe(!1),2e3)}catch{}},[M]),Yt=we.useCallback(()=>{if(!wt||!M)return;let V=ze=>{typeof window<"u"&&window.open(ze,"_blank","noopener,noreferrer")};if(!c){V(wt);return}let ve=c(wt,{category:"send",origin:"send-transaction",payload:{chainId:w.chainId,txHash:M}});if(ve&&typeof ve.then=="function"){let ze=typeof window<"u"?window.open("","_blank","noopener,noreferrer"):null;ve.then(ot=>{if(ot===null){ze?.close();return}let Kt=ot??wt;if(ze)try{ze.location.href=Kt}catch{ze.close(),V(Kt)}else V(Kt)});return}let Ne=ve;Ne!==null&&V(Ne??wt)},[c,w.chainId,wt,M]),ln=we.useCallback(()=>{oe(""),j(""),G("idle"),Q(null),ae(""),tt.current.delete("submitted"),tt.current.delete("confirmed"),N("review")},[]);return{step:C,status:D,token:w,tokens:s.length>0?s:[w],recipient:T,amount:S,amountUsd:nn,fieldErrors:A,error:le,txHash:M,gasEstimate:ne,gasLoading:ee,gasError:q,insufficientGas:nt,reviewRawAmount:pe,reviewRecipient:Ue,recentAddresses:Re,accounts:o,accountName:r,walletAddress:n,resolvedEnv:$e,transactionUrl:wt,networkName:Dt,nativeSymbol:He,nativeDecimals:Ge?.currency_decimals??w.quantity.decimals,balanceRaw:yt,balanceText:Pt,priceUsd:Tt,canSelectToken:(s.length>0?s:[w]).length>1,canSend:b.canSend,getTokenPriceUsd:u,setRecipient:It,setAmount:ut,setMax:Ot,selectToken:rt,goToTokenSelect:on,selectRecipient:Ze,submitRecipient:fn,submitAmount:lt,confirmSend:Et,retry:ln,back:ft,hashCopied:Rt,copyHash:sn,openTransaction:Yt}}var Yn=H(require("react"),1);var pr=require("react/jsx-runtime");function Qp({flow:e}){let{amount:t,setAmount:n,amountUsd:r,balanceText:o,balanceRaw:a,token:i,setMax:s}=e,l=Yn.useRef(null),d=Yn.useCallback(()=>{requestAnimationFrame(()=>{let y=l.current;if(!y)return;let f=y.value.length;y.setSelectionRange(f,f)})},[]);Yn.useEffect(()=>{l.current?.focus(),d()},[d]),Yn.useEffect(()=>{t===""&&(u(!1),d())},[t,d]);let p=Yn.useMemo(()=>{let y=Nr(t,i.quantity.decimals);return"value"in y&&y.value>a},[t,i.quantity.decimals,a]),[h,u]=Yn.useState(!1),g=!h&&t===""?"0.00":t,x=t.trim()===""||t.trim()==="0";return(0,pr.jsx)("div",{className:"sf-body sf-amount",children:(0,pr.jsxs)("div",{className:"sf-amount-center",children:[(0,pr.jsx)("span",{className:"sf-amount-usd",children:r!==void 0?zi(r):"\xA0"}),(0,pr.jsx)("div",{className:"sf-amount-input-wrap","data-over":p||void 0,"data-empty":x||void 0,onClick:()=>l.current?.focus(),children:(0,pr.jsx)("input",{ref:l,className:"sf-amount-input",value:g,onChange:y=>{let f=y.target.value;if(h)n(f);else if(t===""){if(f.length<4)return;u(!0);let c=f.startsWith("0.00")?f.slice(4):f;n(c)}else u(!0),n(f)},placeholder:"0.00",inputMode:"decimal",autoComplete:"off","aria-label":`Amount in ${i.symbol}`,size:1})}),(0,pr.jsxs)("div",{className:"sf-amount-balance",children:[(0,pr.jsx)("span",{children:"Balance:"}),(0,pr.jsxs)("button",{type:"button",className:"sf-amount-max",onClick:s,"data-track":"amount_max",children:[o," ",i.symbol]})]})]})})}var Zn=H(require("react"),1);var Cw=new Set(["0xff42c13d927a6b9265236619161accb227b6d452","0x9364ea6790f6e0ecfaa5164085f2a7de34ec55fb"].map(e=>e.toLowerCase()));function ed(e){return Cw.has(e.toLowerCase())}var Rw="0x0000000000000000000000000000000000000001",Nw={dev:"0x26ca2a92ea9659e073621bb85b9117dc5944cff1",stage:"0x26ca2a92ea9659e073621bb85b9117dc5944cff1",production:"0x6bf62ca91e397b5a7d1d6bce97d9092065d7a510"},Sw={dev:"0x9364ea6790f6e0ecfaa5164085f2a7de34ec55fb",stage:"0x9364ea6790f6e0ecfaa5164085f2a7de34ec55fb",production:"0xff42c13d927a6b9265236619161accb227b6d452"};function ji(e){let t=At[e];return[{chainId:t.cross,address:Rw},{chainId:t.bsc,address:Nw[e]},{chainId:t.cross,address:Sw[e]}].map(({chainId:n,address:r})=>({chainId:n,address:r.toLowerCase()}))}var qp={cross:"https://contents.crosstoken.io/wallet/token/images/CROSS.svg",bsc:"https://contents.crosstoken.io/wallet/token/images/BSC.svg"};function ga(e,t){let n=At[e];if(t===n.cross)return qp.cross;if(t===n.bsc)return qp.bsc}var Tw={dev:"https://dev-portrait.crosstoken.io",stage:"https://dev-portrait.crosstoken.io",production:"https://portrait.crosstoken.io"};function Sr(e,t,n={}){if(!t||!t.startsWith("0x"))return;let{size:r=120,bg:o,format:a="png"}=n,i=Tw[e],s=o?`&bg=${o}`:"";return`${i}/portrait/evm/${t}.${a}?size=${r}${s}`}var cn=require("react/jsx-runtime");function Yp({size:e=20,className:t}){return(0,cn.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,"aria-hidden":"true",children:[(0,cn.jsx)("circle",{cx:"9",cy:"9",r:"6",stroke:"currentColor",strokeWidth:"1.7"}),(0,cn.jsx)("path",{d:"m17 17-3.2-3.2",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})]})}function Kp({size:e=20,className:t}){return(0,cn.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":"true",children:(0,cn.jsx)("path",{d:"M9 2h6a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zM8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-2M12 11v6M9 14h6",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})})}function Zp({size:e=20,className:t}){return(0,cn.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,"aria-hidden":"true",children:[(0,cn.jsx)("circle",{cx:"10",cy:"10",r:"10",fill:"currentColor",opacity:"0.12"}),(0,cn.jsx)("path",{d:"M7 7l6 6M13 7l-6 6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]})}function Xp({size:e=16,className:t}){return(0,cn.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",className:t,"aria-hidden":"true",children:(0,cn.jsx)("path",{d:"M8 3v10m0 0 4-4m-4 4-4-4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function Jp({size:e=56,className:t}){return(0,cn.jsxs)("svg",{width:e,height:e,viewBox:"0 0 56 56",fill:"none",className:t,"aria-hidden":"true",children:[(0,cn.jsx)("circle",{cx:"28",cy:"28",r:"28",fill:"var(--ds-system-green-default, #00b4b7)"}),(0,cn.jsx)("path",{d:"M17 28.5 24.2 35.5 39 20.5",stroke:"var(--ds-system-green-on, #ffffff)",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"})]})}function $p({size:e=56,className:t}){return(0,cn.jsxs)("svg",{width:e,height:e,viewBox:"0 0 56 56",fill:"none",className:t,"aria-hidden":"true",children:[(0,cn.jsx)("circle",{cx:"28",cy:"28",r:"28",fill:"var(--ds-system-red-default, #da0b2e)"}),(0,cn.jsx)("path",{d:"M20 20 36 36m0-16L20 36",stroke:"#ffffff",strokeWidth:"4",strokeLinecap:"round"})]})}var Kn=H(require("react"),1),Iw=240;function Wi(e,t,n,r=[]){let o=Kn.useRef(null),[a,i]=Kn.useState(null),[s,l]=Kn.useState(null),d=Kn.useCallback(h=>{h!==e&&(l(n.indexOf(h)>n.indexOf(e)?"from-right":"from-left"),t(h))},[e,t,n]);Kn.useEffect(()=>{if(!s)return;let h=window.setTimeout(()=>l(null),Iw+60);return()=>window.clearTimeout(h)},[s,e]),Kn.useLayoutEffect(()=>{let h=o.current;if(!h)return;let u=()=>{let x=h.querySelector("[data-active]");x&&i({left:x.offsetLeft+4,width:Math.max(x.offsetWidth-8,0)})};if(u(),typeof ResizeObserver>"u")return;let g=new ResizeObserver(u);return g.observe(h),h.querySelectorAll('[role="tab"]').forEach(x=>g.observe(x)),()=>g.disconnect()},[e,...r]);let p=a?{width:a.width,transform:`translateX(${a.left}px)`}:void 0;return{tabsRef:o,indicatorStyle:p,slide:s,select:d}}var je=require("react/jsx-runtime"),Ew=["recent","account"];function eu(e,t){return e.name||`Account ${(e.index??t)+1}`}function tu(e){return e.trim().slice(0,1).toUpperCase()||"A"}function nu(e){return e.toLowerCase()}function ru({flow:e}){let{recipient:t,setRecipient:n,fieldErrors:r,recentAddresses:o,accounts:a,walletAddress:i,resolvedEnv:s,selectRecipient:l}=e,d=Zn.useMemo(()=>a.filter(T=>T.address.toLowerCase()!==i.toLowerCase()),[a,i]),p=d.length>0,h=Zn.useMemo(()=>new Map(d.map((T,R)=>[nu(T.address),{account:T,index:R}])),[d]),[u,g]=Zn.useState("recent"),{tabsRef:x,indicatorStyle:y,slide:f,select:c}=Wi(u,g,Ew,[p]),b=Zn.useRef(null);Zn.useEffect(()=>{b.current?.focus()},[]);let w="1A1A2E",k=Zn.useCallback(async()=>{try{let T=await navigator.clipboard.readText();T&&n(T.trim())}catch{}},[n]),C=t.trim().length>0,N=dr(t.trim());return(0,je.jsxs)("div",{className:"sf-recipient",children:[(0,je.jsxs)("div",{className:"sf-recipient-top",children:[(0,je.jsxs)("div",{className:"sf-address-field","data-filled":C||void 0,"data-invalid":r.recipient||void 0,children:[(0,je.jsx)("textarea",{ref:b,className:"sf-address-input",value:t,onChange:T=>n(T.target.value),placeholder:"Enter the recipient's address",autoComplete:"off",spellCheck:!1,"aria-label":"Recipient address",rows:C?2:1}),C?(0,je.jsx)("button",{type:"button",className:"sf-address-action",onClick:()=>n(""),"aria-label":"Clear","data-track":"recipient_clear",children:(0,je.jsx)(Zp,{size:20})}):(0,je.jsx)("button",{type:"button",className:"sf-address-action",onClick:k,"aria-label":"Paste from clipboard","data-track":"recipient_paste",children:(0,je.jsx)(Kp,{size:20})})]}),r.recipient&&(0,je.jsx)("p",{className:"sf-field-error",role:"alert",children:r.recipient}),(0,je.jsxs)("div",{ref:x,className:"sf-tabs",role:"tablist",children:[(0,je.jsx)("button",{type:"button",role:"tab",className:"sf-tab","data-active":u==="recent"||void 0,"aria-selected":u==="recent",onClick:()=>c("recent"),"data-track":"recipient_tab","data-track-id":"recent",children:"Recent"}),p&&(0,je.jsx)("button",{type:"button",role:"tab",className:"sf-tab","data-active":u==="account"||void 0,"aria-selected":u==="account",onClick:()=>c("account"),"data-track":"recipient_tab","data-track-id":"account",children:"My Account"}),y&&(0,je.jsx)("span",{className:"sf-tab-indicator","aria-hidden":!0,"data-animate":f?!0:void 0,style:y})]})]}),(0,je.jsx)("div",{className:"sf-address-list","data-tab-slide":f??void 0,children:u==="account"&&p?d.map((T,R)=>{let S=eu(T,R),E=Sr(s,T.address,{size:56,bg:w});return(0,je.jsxs)("button",{type:"button",className:"sf-address-row",onClick:()=>l(T.address),"data-track":"recipient_item",children:[(0,je.jsxs)("span",{className:"sf-address-avatar",children:[E&&(0,je.jsx)("img",{src:E,alt:"",width:40,height:40,draggable:!1,onError:A=>{A.currentTarget.style.display="none"}}),(0,je.jsx)("span",{className:"sf-address-avatar-fallback",children:tu(S)})]}),(0,je.jsxs)("span",{className:"sf-address-meta",children:[(0,je.jsx)("span",{className:"sf-address-name",children:S}),(0,je.jsx)("span",{className:"sf-address-value",children:dn(T.address)})]})]},T.address)}):o.length>0?o.map(T=>{let R=h.get(nu(T.address)),S=R?eu(R.account,R.index):dn(T.address),E=Sr(s,T.address,{size:56,bg:w});return(0,je.jsxs)("button",{type:"button",className:"sf-address-row",onClick:()=>l(T.address),"data-track":"recipient_item",children:[(0,je.jsxs)("span",{className:"sf-address-avatar",children:[E&&(0,je.jsx)("img",{src:E,alt:"",width:40,height:40,draggable:!1,onError:A=>{A.currentTarget.style.display="none"}}),(0,je.jsx)("span",{className:"sf-address-avatar-fallback",children:tu(S)})]}),(0,je.jsxs)("span",{className:"sf-address-meta",children:[(0,je.jsx)("span",{className:"sf-address-name",children:S}),(0,je.jsx)("span",{className:"sf-address-value",children:dn(T.address)})]})]},T.address)}):(0,je.jsxs)("div",{className:"sf-history-empty",role:"status",children:[(0,je.jsx)("span",{className:"sf-history-empty-icon","aria-hidden":!0,children:(0,je.jsx)("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:(0,je.jsx)("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8M3 3v5h5M12 7v5l4 2"})})}),(0,je.jsx)("p",{className:"sf-history-empty-title",children:"No send history"}),(0,je.jsx)("p",{className:"sf-history-empty-desc",children:"Addresses you send to will appear here."})]})},u),C&&!N&&!r.recipient&&(0,je.jsx)("p",{className:"sf-field-error",role:"alert",children:"Enter a valid EVM recipient address."})]})}var Mt=require("react/jsx-runtime");function au({flow:e}){let{status:t,txHash:n,error:r,copyHash:o,hashCopied:a,openTransaction:i}=e,s=t==="error",l=t==="success";return s?(0,Mt.jsxs)("div",{className:"sf-body sf-result sf-result--error",children:[(0,Mt.jsx)("span",{className:"sf-result-icon",children:(0,Mt.jsx)($p,{size:56})}),(0,Mt.jsxs)("div",{className:"sf-result-copy",children:[(0,Mt.jsx)("h3",{className:"sf-result-title",children:"Transaction Failed"}),(0,Mt.jsx)("p",{className:"sf-result-desc",children:r||"Something went wrong. Please try again."})]}),n&&(0,Mt.jsx)(ou,{txHash:n,hashCopied:a,onCopy:o,onOpen:i})]}):(0,Mt.jsxs)("div",{className:"sf-body sf-result",children:[(0,Mt.jsx)("span",{className:"sf-result-icon","data-pending":!l||void 0,children:l?(0,Mt.jsx)(Jp,{size:56}):(0,Mt.jsx)("span",{className:"sf-result-spinner"})}),(0,Mt.jsxs)("div",{className:"sf-result-copy",children:[(0,Mt.jsx)("h3",{className:"sf-result-title",children:l?"Transaction Complete":"Transaction in Progress"}),(0,Mt.jsx)("p",{className:"sf-result-desc",children:l?"Your transfer was sent successfully.":"Transfer in progress. Waiting for confirmation."})]}),n&&(0,Mt.jsx)(ou,{txHash:n,hashCopied:a,onCopy:o,onOpen:i})]})}function ou({txHash:e,hashCopied:t,onCopy:n,onOpen:r}){return(0,Mt.jsxs)("div",{className:"sf-result-hash-card",children:[(0,Mt.jsx)("span",{className:"sf-result-hash-label",children:"Transaction Hash"}),(0,Mt.jsxs)("div",{className:"sf-result-hash-row",children:[(0,Mt.jsx)("button",{type:"button",className:"sf-result-hash-link",onClick:r,"aria-label":"Open transaction in explorer","data-track":"tx_link_open",children:dn(e)}),(0,Mt.jsx)("button",{type:"button",className:"sf-result-copy-btn",onClick:n,"aria-label":"Copy transaction hash","data-track":"tx_hash_copy",children:t?(0,Mt.jsx)(qn,{size:16}):"Copy"})]})]})}var Fe=require("react/jsx-runtime"),Gi="\u2014";function iu({flow:e}){let{token:t,reviewRawAmount:n,reviewRecipient:r,accountName:o,accounts:a,walletAddress:i,networkName:s,nativeSymbol:l,nativeDecimals:d,gasEstimate:p,gasLoading:h,gasError:u,insufficientGas:g,error:x,resolvedEnv:y}=e,f=Wr(t),c=n!==null?cr(n,t.quantity.decimals):"",b=o?.trim()||`Account ${(a[0]?.index??0)+1}`,w=Sr(y,i,{size:56,bg:"1A1A2E"}),k=l||(f?t.symbol:""),C=Pi(t.chainId),N=p?zp(p,C):null,T=p?Bi(p,C):null,R=D=>D!==null&&k?`${Zl(D,d)} ${k}`:Gi,S=D=>D!==void 0?`${Op(D)} Gwei`:Gi,E=(()=>{if(!f||!p||T===null||n===null)return Gi;let D=n+T;return`${Zl(D,d)} ${k||t.symbol}`})(),A=D=>h?"\u2026":D,F=[{label:"Est. Tx Fee",value:A(R(T))},...N==="dynamic"?[{label:"Max Priority Fee",value:A(S(p?.maxPriorityFeePerGas))},{label:"Max Gas Fee",value:A(S(p?.maxFeePerGas))}]:N==="legacy"?[{label:"Gas Price",value:A(S(p?Oi(p):void 0))}]:[],{label:"Gas Limit",value:A(p?Bp(p.gasLimit):Gi)}];return(0,Fe.jsxs)("div",{className:"sf-body sf-review",children:[(0,Fe.jsxs)("div",{className:"sf-review-amount",children:[(0,Fe.jsx)("img",{className:"sf-review-amount-icon",src:t.icon_url,alt:"",width:40,height:40,draggable:!1,onError:D=>{D.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),(0,Fe.jsxs)("span",{className:"sf-review-amount-value",children:[c,(0,Fe.jsx)("span",{className:"sf-review-amount-symbol",children:t.symbol})]})]}),(0,Fe.jsxs)("div",{className:"sf-review-parties",children:[(0,Fe.jsxs)("div",{className:"sf-review-card sf-review-party",children:[(0,Fe.jsx)("span",{className:"sf-review-party-label",children:"From"}),(0,Fe.jsxs)("div",{className:"sf-review-party-head",children:[(0,Fe.jsx)("span",{className:"sf-review-party-avatar",children:w&&(0,Fe.jsx)("img",{src:w,alt:"",width:28,height:28,draggable:!1,onError:D=>{D.currentTarget.style.display="none"}})}),(0,Fe.jsx)("span",{className:"sf-review-party-name",children:b})]}),(0,Fe.jsx)("span",{className:"sf-review-party-addr",children:i})]}),(0,Fe.jsx)("span",{className:"sf-review-arrow","aria-hidden":!0,children:(0,Fe.jsx)(Xp,{size:16})}),(0,Fe.jsxs)("div",{className:"sf-review-card sf-review-party",children:[(0,Fe.jsx)("span",{className:"sf-review-party-label",children:"To"}),(0,Fe.jsx)("span",{className:"sf-review-party-addr",children:r})]})]}),(0,Fe.jsxs)("section",{className:"sf-review-card",children:[(0,Fe.jsx)("h3",{className:"sf-review-section-title",children:"Summary"}),(0,Fe.jsxs)("div",{className:"sf-review-row",children:[(0,Fe.jsx)("span",{className:"sf-review-row-label",children:"Network"}),(0,Fe.jsx)("span",{className:"sf-review-row-value",children:s})]}),F.map(D=>(0,Fe.jsxs)("div",{className:"sf-review-row",children:[(0,Fe.jsx)("span",{className:"sf-review-row-label",children:D.label}),(0,Fe.jsx)("span",{className:"sf-review-row-value",children:D.value})]},D.label))]}),(0,Fe.jsxs)("section",{className:"sf-review-card",children:[(0,Fe.jsx)("h3",{className:"sf-review-section-title",children:"Total"}),(0,Fe.jsxs)("div",{className:"sf-review-row",children:[(0,Fe.jsx)("span",{className:"sf-review-row-label",children:"Total Amount"}),(0,Fe.jsxs)("span",{className:"sf-review-row-value",children:[c," ",t.symbol]})]}),f&&(0,Fe.jsxs)("div",{className:"sf-review-row",children:[(0,Fe.jsx)("span",{className:"sf-review-row-label",children:"Max. Total Amount"}),(0,Fe.jsx)("span",{className:"sf-review-row-value",children:A(E)})]})]}),g&&!u&&!x&&(0,Fe.jsxs)("div",{className:"sf-message sf-message--error",role:"alert",children:["Not enough ",k||t.symbol," to cover the amount plus the network fee. Reduce the amount and try again."]}),(u||x)&&(0,Fe.jsx)("div",{className:"sf-message sf-message--error",role:"alert",children:u||x})]})}var Hi=H(require("react"),1);var mn=require("react/jsx-runtime");function su({flow:e}){let[t,n]=Hi.useState(""),r=t.trim().toLowerCase(),o=Hi.useMemo(()=>r?e.tokens.filter(a=>a.symbol.toLowerCase().includes(r)||a.name.toLowerCase().includes(r)):e.tokens,[e.tokens,r]);return(0,mn.jsxs)("div",{className:"sf-body sf-token-select",children:[(0,mn.jsxs)("div",{className:"sf-search",children:[(0,mn.jsx)(Yp,{size:20}),(0,mn.jsx)("input",{className:"sf-search-input",value:t,onChange:a=>n(a.target.value),placeholder:"Search Tokens",autoComplete:"off",spellCheck:!1,"aria-label":"Search tokens"})]}),(0,mn.jsxs)("div",{className:"sf-token-list",children:[o.map(a=>{let i=`${a.chainId}:${a.address.toLowerCase()}`,s=ga(e.resolvedEnv,a.chainId),l=e.getTokenPriceUsd?.(a);return(0,mn.jsxs)("button",{type:"button",className:"sf-token-row",onClick:()=>e.selectToken(a),"data-track":"token_item","data-track-id":a.symbol,children:[(0,mn.jsxs)("span",{className:"sf-token-left",children:[(0,mn.jsxs)("span",{className:"sf-token-icon-wrap",children:[(0,mn.jsx)("img",{className:"sf-token-icon",src:a.icon_url,alt:"",width:40,height:40,loading:"lazy",draggable:!1,onError:d=>{d.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),s&&(0,mn.jsx)("img",{className:"sf-token-chain-badge",src:s,alt:"","aria-hidden":!0,width:16,height:16,loading:"lazy",draggable:!1,onError:d=>{d.currentTarget.style.display="none"}})]}),(0,mn.jsx)("span",{className:"sf-token-name",children:a.symbol})]}),(0,mn.jsxs)("span",{className:"sf-token-right",children:[(0,mn.jsx)("span",{className:"sf-token-balance",children:Rr(a.quantity.numeric,a.quantity.decimals)}),l!==void 0&&(0,mn.jsx)("span",{className:"sf-token-price",children:zi(l)})]})]},i)}),o.length===0&&(0,mn.jsx)("div",{className:"sf-empty",children:"No tokens found"})]})]})}he(`.sf-root{display:flex;flex-direction:column;flex:1;min-height:0;font-family:inherit}.sf-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:24px;flex-shrink:0;position:relative;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.sf-header .sf-header-btn:last-child{position:absolute;top:24px;right:24px}.sf-header-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;padding:0;border:none;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;filter:none;transition:color .15s ease}.sf-header-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85));filter:none}.sf-header-title{position:absolute;left:50%;transform:translate(-50%);text-align:center;font-family:inherit;font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);pointer-events:none}.sf-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent;overscroll-behavior:contain}[data-theme=light] .sf-body{scrollbar-color:rgba(0,0,0,.12) transparent}.sf-body::-webkit-scrollbar{width:4px;height:4px}.sf-body::-webkit-scrollbar-track,.sf-body::-webkit-scrollbar-corner{background:transparent}.sf-body::-webkit-scrollbar-thumb{border-radius:4px;background:#ffffff26}.sf-body::-webkit-scrollbar-thumb:hover{background:#ffffff40}[data-theme=light] .sf-body::-webkit-scrollbar-thumb{background:#0000001f}[data-theme=light] .sf-body::-webkit-scrollbar-thumb:hover{background:#0003}.sf-empty{padding:32px 0;text-align:center;font-family:inherit;font-size:14px;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-history-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:48px 24px;text-align:center}.sf-history-empty-icon{display:flex;align-items:center;justify-content:center;width:56px;height:56px;margin-bottom:6px;border-radius:50%;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-history-empty-title{margin:0;font-size:15px;font-weight:600;line-height:1.3;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-history-empty-desc{margin:0;font-size:13px;line-height:1.4;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-field-error{margin:8px 24px 0;font-family:inherit;font-size:12px;line-height:1.5;color:var(--ds-system-red-default, #da0b2e)}.sf-message--error{margin:16px 0 0;padding:12px 16px;background:var(--ds-system-red-low, #ffeeee);color:var(--ds-system-red-high, #d20609);font-family:inherit;font-size:13px;line-height:1.5;border-radius:12px;width:100%;box-sizing:border-box}.sf-footer{display:flex;flex-shrink:0;padding:16px 24px 24px}.sf-footer:empty{display:none}.sf-footer-row{display:flex;gap:8px;width:100%}.sf-footer-row .sf-btn,.sf-footer-row .sf-btn--secondary{flex:1 1 0;min-width:0}.sf-footer>.sf-btn{width:100%}.sf-btn{appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:1;height:48px;padding:0 24px;border:none;border-radius:12px;font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;transition:background-color .15s ease,transform .1s ease}.sf-btn--primary{background:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-on, #ffffff)}.sf-btn--primary:hover:not(:disabled):not([data-disabled]){filter:brightness(1.05)}.sf-btn--primary:active:not(:disabled):not([data-disabled]){transform:scale(.97)}.sf-btn--primary[data-disabled],.sf-btn--primary:disabled{background:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-on, #ffffff);cursor:default;opacity:.5}.sf-btn--secondary{flex:0 0 120px;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-token-select{padding:0;display:flex;flex-direction:column}.sf-token-select .sf-search{margin:16px 24px}.sf-token-select .sf-token-list{width:100%;margin-top:0}.sf-search{display:flex;align-items:center;gap:8px;padding:12px 16px;border-radius:12px;border:1.5px solid transparent;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-low, rgba(0, 0, 0, .4));box-sizing:border-box;transition:border-color .15s ease}.sf-search:hover{border-color:var(--ds-border-medium, rgba(0, 0, 0, .18))}.sf-search:focus-within{border-color:var(--ds-accent-primary-high, #7346f3)}.sf-search-input{flex:1;min-width:0;border:none;background:transparent;outline:none;font-family:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-search-input::placeholder{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-token-list{display:flex;flex-direction:column;margin-top:8px}.sf-token-row{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:12px 24px;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;border-radius:0;box-sizing:border-box;transition:background-color .15s ease}.sf-token-row:hover{background:var(--ds-surface-medium, rgba(0, 0, 0, .04))}.sf-token-left{display:flex;align-items:center;gap:16px;min-width:0}.sf-token-icon-wrap{position:relative;width:36px;height:36px;flex-shrink:0}.sf-token-icon{width:36px;height:36px;border-radius:0;object-fit:contain}.sf-token-chain-badge{position:absolute;right:-2px;bottom:-2px;width:16px;height:16px;border-radius:50%;object-fit:cover}.sf-token-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.sf-token-right{display:flex;flex-direction:column;align-items:flex-end;flex-shrink:0}.sf-token-balance{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);white-space:nowrap}.sf-token-price{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.sf-recipient{display:flex;flex-direction:column;flex:1;min-height:0}.sf-recipient-top{display:flex;flex-direction:column;flex-shrink:0;padding:16px 24px 0}.sf-address-field{display:flex;align-items:center;gap:8px;padding:12px;border-radius:12px;border:1.5px solid transparent;background:var(--ds-surface-medium, #f5f7fa);transition:border-color .15s ease;box-sizing:border-box}.sf-address-field:hover{border-color:var(--ds-border-medium, rgba(0, 0, 0, .18))}.sf-address-field:focus-within{border-color:var(--ds-accent-primary-high, #7346f3)}.sf-address-field[data-filled]{border-color:var(--ds-accent-primary-high, #7346f3)}.sf-address-field[data-invalid]{border-color:var(--ds-system-red-default, #da0b2e)}.sf-address-input{flex:1;min-width:0;border:none;background:transparent;outline:none;resize:none;overflow:hidden;font-family:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));word-break:break-word;overflow-wrap:anywhere}.sf-address-input::placeholder{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-address-action{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;padding:0;border:none;background:transparent;border-radius:6px;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;transition:color .15s ease}.sf-address-action:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-address-field[data-filled] .sf-address-action{border-radius:9999px}.sf-tabs{position:relative;display:flex;gap:20px;margin:16px 0 0}.sf-tab{position:relative;padding:10px 0 12px;border:none;background:transparent;cursor:pointer;font-family:inherit;font-size:16px;font-weight:600;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-tab[data-active]{color:var(--ds-content-highest, #000000)}.sf-tab-indicator{position:absolute;left:0;bottom:0;height:3px;border-radius:3px;background:var(--ds-content-highest, #000000);pointer-events:none}.sf-tab-indicator[data-animate]{transition:transform .24s cubic-bezier(.22,1,.36,1),width .24s cubic-bezier(.22,1,.36,1)}.sf-address-list[data-tab-slide=from-right]{animation:sf-tab-slide-from-right .24s cubic-bezier(.22,1,.36,1)}.sf-address-list[data-tab-slide=from-left]{animation:sf-tab-slide-from-left .24s cubic-bezier(.22,1,.36,1)}@keyframes sf-tab-slide-from-right{0%{opacity:0;transform:translate(32px)}to{opacity:1;transform:none}}@keyframes sf-tab-slide-from-left{0%{opacity:0;transform:translate(-32px)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.sf-tab-indicator[data-animate]{transition:none}.sf-address-list[data-tab-slide]{animation:none}}.sf-address-list{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;margin-top:8px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent}[data-theme=light] .sf-address-list{scrollbar-color:rgba(0,0,0,.12) transparent}.sf-address-list::-webkit-scrollbar{width:4px}.sf-address-list::-webkit-scrollbar-track{background:transparent}.sf-address-list::-webkit-scrollbar-thumb{border-radius:4px;background:#ffffff26}[data-theme=light] .sf-address-list::-webkit-scrollbar-thumb{background:#0000001f}.sf-address-row{display:flex;align-items:center;gap:16px;width:100%;padding:12px 24px;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;border-radius:0;box-sizing:border-box;transition:background-color .15s ease}.sf-address-row:hover{background:var(--ds-surface-medium, rgba(0, 0, 0, .04))}.sf-address-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;flex-shrink:0;border-radius:50%;overflow:hidden;background:var(--ds-surface-high, #edf1f2);color:var(--ds-content-medium, rgba(0, 0, 0, .65));font-size:14px;font-weight:600}.sf-address-avatar img{position:absolute;inset:0;z-index:1;width:100%;height:100%;object-fit:cover}.sf-address-avatar-fallback{position:relative;z-index:0}.sf-address-meta{display:flex;flex-direction:column;min-width:0}.sf-address-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sf-address-value{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-drawer-content .sf-header{padding:16px}.wi-drawer-content .sf-header .sf-header-btn:last-child{top:16px;right:16px}.wi-drawer-content .sf-token-select{padding:0}.wi-drawer-content .sf-token-select .sf-search{margin:16px}.wi-drawer-content .sf-token-row{padding:12px 16px}.wi-drawer-content .sf-recipient-top{padding:16px 16px 0}.wi-drawer-content .sf-address-row{padding:12px 16px}.wi-drawer-content .sf-footer{padding:12px 16px 24px}.wi-drawer-content .sf-field-error,.wi-drawer-content .sf-message--error{margin:16px 0 0;width:auto}.sf-amount{display:flex;flex-direction:column}.sf-amount-center{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:8px;padding:64px 24px 48px;text-align:center}.sf-amount-usd{font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));min-height:21px}.sf-amount-input-wrap{display:flex;justify-content:center;max-width:100%}.sf-amount-input{width:auto;max-width:100%;border:none;background:transparent;outline:none;text-align:center;font-family:inherit;font-size:40px;font-weight:700;line-height:1.25;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);field-sizing:content}.sf-amount-input-wrap[data-empty] .sf-amount-input,.sf-amount-input::placeholder{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-amount-input-wrap[data-over] .sf-amount-input{color:var(--ds-system-red-default, #da0b2e)}.sf-amount-balance{display:inline-flex;align-items:center;gap:4px;font-family:inherit;font-size:14px;font-weight:400;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.sf-amount-max{border:none;background:transparent;padding:0;cursor:pointer;font:inherit;color:var(--ds-content-medium, rgba(0, 0, 0, .65));text-decoration:underline;text-underline-offset:2px;transition:color .15s ease}.sf-amount-max:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-drawer-content .sf-amount-center{padding:64px 16px 48px}.sf-review{display:flex;flex-direction:column;gap:16px;padding:24px}.sf-review-amount{display:flex;align-items:center;gap:12px;padding:0;background:transparent}.sf-review-amount-icon{width:40px;height:40px;border-radius:0;object-fit:contain;flex-shrink:0}.sf-review-amount-value{display:inline-flex;flex-direction:column;align-items:flex-start;gap:0;font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);word-break:break-all}.sf-review-amount-symbol{font-size:12px;font-weight:400;line-height:1.5;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-parties{position:relative;display:flex;flex-direction:column;gap:0}.sf-review-arrow{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;margin:-4px auto;border-radius:50%;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-medium, rgba(0, 0, 0, .18));color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-card{display:flex;flex-direction:column;gap:8px;padding:16px;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa)}.sf-review-party-label{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-party-head{display:flex;align-items:center;gap:8px}.sf-review-party-avatar{display:inline-flex;width:24px;height:24px;border-radius:50%;overflow:hidden;background:var(--ds-surface-high, #edf1f2);flex-shrink:0}.sf-review-party-avatar img{width:100%;height:100%;object-fit:cover}.sf-review-party-name{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.sf-review-party-addr{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));word-break:break-all}.sf-review-section-title{margin:0 0 4px;font-family:inherit;font-size:16px;font-weight:600;letter-spacing:-.01em;color:var(--ds-content-highest, #000000)}.sf-review-row{display:flex;flex-direction:column;align-items:flex-start;gap:4px}.sf-review-row-label{font-family:inherit;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-review-row-value{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));text-align:left;word-break:break-all}.wi-drawer-content .sf-review{padding:16px}.sf-result{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;padding:48px 24px;text-align:center}.sf-result-icon{display:inline-flex;align-items:center;justify-content:center;width:56px;height:56px}.sf-result-spinner{width:56px;height:56px;border-radius:50%;border:4px solid var(--ds-border-medium, rgba(0, 0, 0, .18));border-top-color:var(--ds-accent-primary-high, #7346f3);animation:sf-spin .8s linear infinite}@keyframes sf-spin{to{transform:rotate(360deg)}}.sf-result-copy{display:flex;flex-direction:column;gap:8px}.sf-result-title{margin:0;font-family:inherit;font-size:18px;font-weight:600;letter-spacing:-.01em;color:var(--ds-content-highest, #000000)}.sf-result-desc{margin:0;font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-result-hash-card{display:flex;flex-direction:column;gap:8px;width:100%;padding:16px;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);text-align:left}.sf-result-hash-label{font-family:inherit;font-size:12px;font-weight:500;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.sf-result-hash-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.sf-result-hash-link{border:none;background:transparent;padding:0;cursor:pointer;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:14px;color:var(--ds-accent-primary-high, #7346f3)}.sf-result-copy-btn{display:inline-flex;align-items:center;justify-content:center;min-width:44px;height:28px;padding:0 10px;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));border-radius:8px;background:var(--ds-surface-default, #ffffff);cursor:pointer;font-family:inherit;font-size:12px;font-weight:500;color:var(--ds-content-high, rgba(0, 0, 0, .85))}
7
+ `);var Nt=require("react/jsx-runtime"),Aw={token:"Send",recipient:"Send",amount:"Send",review:"Sign Transaction",result:""};function ha({onClose:e,onBackToWallet:t,onConfirmSuccess:n,onSuccess:r,className:o,...a}){let i=lu.useCallback(c=>{r?.(c),n?.(c)},[n,r]),l=Vp({...a,onSuccess:r||n?i:void 0,onExit:t}),{step:d,status:p}=l,h=dr(l.recipient.trim()),u=Nr(l.amount,l.token.quantity.decimals),g="value"in u&&u.value<=l.balanceRaw,x=p==="submitting"||p==="confirming",y=d!=="result",f=Aw[d]??"";return(0,Nt.jsx)(Me,{feature:"send",children:(0,Nt.jsxs)("div",{className:Ie("sf-root",o),"data-step":d,children:[(0,Nt.jsxs)("header",{className:"sf-header",children:[y?(0,Nt.jsx)("button",{type:"button",className:"sf-header-btn",onClick:l.back,"aria-label":"Back","data-track":"back",children:(0,Nt.jsx)(En,{size:24})}):(0,Nt.jsx)("span",{className:"sf-header-btn","aria-hidden":!0}),(0,Nt.jsx)("span",{className:"sf-header-title",children:f}),(0,Nt.jsx)("button",{type:"button",className:"sf-header-btn",onClick:e,"aria-label":"Close","data-track":"close","data-wi-close":!0,children:(0,Nt.jsx)(vn,{size:24})})]}),d==="token"&&(0,Nt.jsx)(su,{flow:l}),d==="recipient"&&(0,Nt.jsx)(ru,{flow:l}),d==="amount"&&(0,Nt.jsx)(Qp,{flow:l}),d==="review"&&(0,Nt.jsx)(iu,{flow:l}),d==="result"&&(0,Nt.jsx)(au,{flow:l}),(0,Nt.jsxs)("footer",{className:"sf-footer","data-step":d,children:[d==="recipient"&&(0,Nt.jsx)("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.submitRecipient,"data-disabled":!h||void 0,"aria-disabled":!h,"data-track":"recipient_next",children:"Next"}),d==="amount"&&(0,Nt.jsx)("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.submitAmount,"data-disabled":!g||void 0,"aria-disabled":!g,"data-track":"amount_next",children:"Next"}),d==="review"&&(0,Nt.jsxs)("div",{className:"sf-footer-row",children:[(0,Nt.jsx)("button",{type:"button",className:"sf-btn sf-btn--secondary",onClick:l.back,disabled:x,"data-track":"review_cancel",children:"Cancel"}),(0,Nt.jsx)("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.confirmSend,disabled:x||!l.canSend||l.insufficientGas,"data-track":"review_send",children:x?"Sending...":"Send"})]}),d==="result"&&p==="success"&&(0,Nt.jsx)("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:()=>n?.(l.txHash||void 0),"data-track":"result_ok",children:"All done"}),d==="result"&&p==="error"&&(0,Nt.jsx)("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.retry,"data-track":"result_retry",children:"Try Again"})]})]})})}function _i({env:e,theme:t="dark",showBalance:n=!1,showForgeToken:r=!1,showGameToken:o=!0,showQR:a=!0,showBridge:i=!0,showNft:s=!1,qrLogoSrc:l,walletAddress:d,accountName:p,sendAccounts:h,profileImageUrl:u,connectorId:g,connectorName:x,connectorIconUrl:y,preferredTokens:f=[],onSelectWallet:c,onCopyAddress:b,onBuy:w,onBuyDisabledMessage:k,onBridgeDisabledMessage:C,onSendDisabledMessage:N,onDisconnect:T,disconnectLabel:R="Disconnect",termsUrl:S=Mi,termsLabel:E="Terms of Service",privacyUrl:A=Li,privacyLabel:F="Privacy Policy",showPortfolio:D=!1,showOnePop:G=!1,onePopSummary:M,onOnePopOpen:j,onOnePopSend:le,onOnePopClaim:oe,onOnePopActivity:ne,onOnePopRepliesSeen:Q,onePopGetTokenSlot:ee,onePopLogoSrc:z,onePopHeroSrc:q,portfolioTitle:ae="My Portfolio",portfolioSections:Z,showTotalAssets:pe=!0,totalAssetsLabel:Se="Total Assets USD",sendTransaction:Ue,getTransactionReceipt:fe,estimateGas:Re,onOutlink:Ce,lpBalanceReader:tt,stakingRewardsReader:Le,bridgeTokens:$e,bridgeHistory:wt,getBridgeQuote:Ge,getBridgeToTokens:Qe,getBridgeApproval:He,approveBridge:Dt,submitBridge:tn,onReceive:yt,onBridge:Pt,onSend:Tt,style:nn},{presentation:It,open:ut,isMobile:Ot,drawerDirection:rt,modal:on,close:ft}){let fn=it(e),Ze=g?pa[g]:void 0,lt=x??Ze?.name,nt=y??Ze?.iconUrl,[Et,Rt]=gn.useState(null),[Xe,an]=gn.useState("top"),[sn,Yt]=gn.useState(null),[ln,V]=gn.useState("wallet"),[ve,Ne]=gn.useState(null),[ze,ot]=gn.useState(null),[Kt,Bt]=gn.useState(null),[Cn,Rn]=gn.useState(null),O=gn.useCallback(()=>{V("wallet"),Ne(null),ot(null),Bt(null),Rn(null)},[]);gn.useEffect(()=>{ut||O()},[ut,O]);let De=ft??O;gn.useEffect(()=>{ro(d)},[d]);let qe=gn.useCallback(()=>{Yl(d),T?.()},[T,d]);return gn.useMemo(()=>({presentation:It,env:fn,theme:t,isMobile:Ot,open:ut,drawerDirection:rt,modal:on,showBalance:n,showForgeToken:r,showGameToken:o,showQR:a,showBridge:i,showNft:s,qrLogoSrc:l,walletAddress:d,accountName:p,sendAccounts:h,profileImageUrl:u,connectorName:lt,connectorIconUrl:nt,preferredTokens:f,close:De,onSelectWallet:c,onCopyAddress:b,onBuy:w,onBuyDisabledMessage:k,onBridgeDisabledMessage:C,onSendDisabledMessage:N,onDisconnect:T?qe:void 0,disconnectLabel:R,termsUrl:S,termsLabel:E,privacyUrl:A,privacyLabel:F,portalStyle:nn,navContent:Et,navPosition:Xe,setNavContent:Rt,setNavPosition:an,footerContent:sn,setFooterContent:Yt,view:ln,setView:V,selectedSendToken:ve,setSelectedSendToken:Ne,selectedDetailToken:ze,setSelectedDetailToken:ot,selectedNftCollection:Kt,setSelectedNftCollection:Bt,selectedNft:Cn,setSelectedNft:Rn,showPortfolio:D,showOnePop:G,onePopSummary:M,onOnePopOpen:j,onOnePopSend:le,onOnePopClaim:oe,onOnePopActivity:ne,onOnePopRepliesSeen:Q,onePopGetTokenSlot:ee,onePopLogoSrc:z,onePopHeroSrc:q,portfolioTitle:ae,portfolioSections:Z,showTotalAssets:pe,totalAssetsLabel:Se,sendTransaction:Ue,getTransactionReceipt:fe,estimateGas:Re,onOutlink:Ce,lpBalanceReader:tt,stakingRewardsReader:Le,bridgeTokens:$e,bridgeHistory:wt,getBridgeQuote:Ge,getBridgeToTokens:Qe,getBridgeApproval:He,approveBridge:Dt,submitBridge:tn,onReceive:yt,onBridge:Pt,onSend:Tt}),[It,fn,t,Ot,ut,rt,on,n,r,o,a,i,s,l,d,p,h,u,lt,nt,f,De,c,b,w,k,C,N,T,qe,R,S,E,A,F,nn,Et,Xe,sn,ln,ve,ze,Kt,Cn,D,G,M,j,le,oe,ne,Q,ee,z,q,ae,Z,pe,Se,Ue,fe,Re,Ce,tt,Le,$e,wt,Ge,Qe,He,Dt,tn,yt,Pt,Tt])}var du=H(require("@radix-ui/react-popover"),1),cu=require("vaul");var lo=require("react/jsx-runtime");function pu({asChild:e,className:t,children:n}){let{isMobile:r,theme:o,walletAddress:a}=Ur(),i=n!=null,s=e??!0,l=i?n:(0,lo.jsxs)("button",{type:"button",className:Ie("wi-trigger-btn",t),"data-theme":o,"data-mobile":r||void 0,children:[(0,lo.jsx)(gp,{size:r?14:16}),(0,lo.jsx)("span",{className:"wi-trigger-address",children:dn(a)})]});return r?(0,lo.jsx)(cu.Drawer.Trigger,{asChild:s,children:l}):(0,lo.jsx)(du.Trigger,{asChild:s,children:l})}var J=H(require("react"),1),As=H(require("@radix-ui/react-popover"),1),Oa=require("vaul");var jd=H(require("bignumber.js"),1);var Vi=H(require("bignumber.js"),1),Mw=/^[+-]?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?$/i;function kt(e){if(e==null)return null;if(e instanceof Vi.default)return e.isFinite()?e:null;if(typeof e=="number")return Number.isFinite(e)?new Vi.default(e):null;let t=String(e).replace(/[,%\s]/g,"");if(!Mw.test(t))return null;let n=new Vi.default(t);return n.isFinite()?n:null}var hu=require("@tanstack/react-query"),bu=require("react");var Qi=H(require("react"),1);function uu(e){if(!e||typeof e!="object")return;let t=[],n=new Set,r=[],o=[];for(let[a,i]of Object.entries(e)){if(i?.balance!==!0)continue;if(!Fc(a)){r.push(a);continue}let s=Uc(a);if(s===void 0){o.push(a);continue}n.has(s)||(n.add(s),t.push(s))}if(t.length!==0)return{chainIds:t,skippedNonEvm:r,skippedMalformed:o}}var fu=new Set;function mu(e,t){fu.has(e)||(fu.add(e),console.warn(t))}function gu(e){let t=Xt(to,e,Qi.useCallback(r=>{let o=uu(r?.chains);if(o)return o.skippedNonEvm.length>0&&mu(`${e}:non-evm`,`[dapp-ui] chains.json (${e}): EVM \uC774 \uC544\uB2CC \uCCB4\uC778\uC740 \uC790\uC0B0 \uBAA9\uB85D\uC5D0\uC11C \uC81C\uC678\uD569\uB2C8\uB2E4 \u2014 ${o.skippedNonEvm.join(", ")}`),o.skippedMalformed.length>0&&mu(`${e}:malformed`,`[dapp-ui] chains.json (${e}): chainId \uD615\uC2DD\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC544 \uC81C\uC678\uD569\uB2C8\uB2E4 \u2014 ${o.skippedMalformed.join(", ")}`),o.chainIds},[e])),n=Qi.useMemo(()=>Hl(e),[e]);return t??n}var qi="user-balance";async function Lw(e,t,n,r){let o=new URLSearchParams({networkId:t,account:n}),a=await fetch(`${e}/v1/public/token/balance?${o}`,{cache:"no-store",signal:r});if(!a.ok)throw new Error(`Failed to fetch token balance: ${a.status}`);let i=await a.json();if(i.code!==200)throw new Error(`Token balance API error: ${i.code}`);return i.data}function Tr(e,t,n=!0){let r=gu(e),o=(0,hu.useQueries)({queries:r.map(l=>({queryKey:[qi,e,t,l],queryFn:async({signal:d})=>Lw(await Be("walletServer",e),l,t,d),enabled:!!t&&n,staleTime:0,refetchInterval:n?5e3:!1}))}),a=o.some(l=>l.isLoading),i=o.some(l=>l.isError);return{tokens:(0,bu.useMemo)(()=>{let l=[];for(let d of o)d.data&&l.push(...d.data);return l},[o]),isLoading:a,isError:i}}var Yi=require("@tanstack/react-query"),wu=require("react");var Dw="forge-holdings",Pw="forge-token-image";async function Ow(e,t,n){let r=await fetch(`${e}/v1/users/${t}/holdings`,{cache:"no-store",signal:n});if(!r.ok)throw new Error(`Failed to fetch forge holdings: ${r.status}`);let o=await r.json();if(!o.success)throw new Error("Forge holdings API error");return o.data.items}async function Bw(e,t,n){let r=await fetch(`${e}/v1/tokens/${t}`,{cache:"no-store",signal:n});if(!r.ok)return{address:t,image_url:""};let o=await r.json();return o.success?{address:t,image_url:o.data.token.image_url}:{address:t,image_url:""}}function yu(e,t,n=!0){let{data:r,...o}=(0,Yi.useQuery)({queryKey:[Dw,e,t],queryFn:async({signal:a})=>Ow(await Be("bondingCurve",e),t,a),enabled:!!t&&n,staleTime:0,refetchInterval:n?5e3:!1});return{holdings:r??[],...o}}function xu(e,t,n=!0){let r=(0,Yi.useQueries)({queries:t.map(a=>({queryKey:[Pw,e,a],queryFn:async({signal:i})=>Bw(await Be("bondingCurve",e),a,i),enabled:n,staleTime:1/0}))});return{imageMap:(0,wu.useMemo)(()=>{let a=new Map;for(let i of r)i.data&&a.set(i.data.address,i.data.image_url);return a},[r])}}var vu=require("@tanstack/react-query"),ku=require("react");var Ki="token-stats";function ur(e,t){return`${e}:${t.toLowerCase()}`}function Ir(e,t=!0){let{data:n,...r}=(0,vu.useQuery)({queryKey:[Ki,e],queryFn:async({signal:a})=>{let i=await Be("walletServer",e),s=await fetch(`${i}/v1/public/token/stats`,{cache:"no-store",signal:a});if(!s.ok)throw new Error(`Failed to fetch token stats: ${s.status}`);let l=await s.json();if(l.code!==200)throw new Error(`Token stats API error: ${l.code}`);return l},enabled:t,staleTime:3e4});return{statsMap:(0,ku.useMemo)(()=>{let a=new Map;if(!n?.data)return a;for(let i of n.data){let s=ur(i.chain_id,i.address);a.set(s,i)}return a},[n]),...r}}var Cu=require("@tanstack/react-query"),zw="crossd-apr",Ru=6e4,Fw="https://crossd-dashboard-api.crossdefi.io/api/v1/overview",Zi,ba;function td(){return Zi&&Zi.expiresAt>Date.now()?Promise.resolve(Zi.value):ba||(ba=(async()=>{let e=await fetch(Fw,{cache:"no-store"});if(!e.ok)throw new Error(`Failed to fetch CROSSD overview: ${e.status}`);let t=await e.json();if(t.code!==200)throw new Error(`CROSSD overview API error: ${t.code}`);let n=parseFloat(t.data.est_last_epoch_apy);if(!Number.isFinite(n))throw new Error("CROSSD overview returned a non-numeric APR");let r=n*100;return Zi={value:r,expiresAt:Date.now()+Ru},r})().finally(()=>{ba=void 0}),ba)}function Xi(e){let t=Math.abs(e),n=(e>=0?Math.floor:Math.ceil)(t*100)/100;return`APR ${e>=0?"+":"-"}${n}%`}function Nu(){let{data:e,...t}=(0,Cu.useQuery)({queryKey:[zw],queryFn:td,staleTime:Ru});return{aprPercent:e??null,...t}}var Su=require("@tanstack/react-query"),nd=require("react");var Uw="token-info";function Ji(e,t){return`${t.toLowerCase()}_${e}`}function Tu(e,t=!0){let{data:n,...r}=(0,Su.useQuery)({queryKey:[Uw,e],queryFn:async({signal:i})=>{let s=await Be("walletServer",e),l=await fetch(`${s}/v1/public/token/info`,{cache:"no-store",signal:i});if(!l.ok)throw new Error(`Failed to fetch token info: ${l.status}`);let d=await l.json();if(d.code!==200)throw new Error(`Token info API error: ${d.code}`);return d},enabled:t,staleTime:1/0}),o=(0,nd.useMemo)(()=>{let i=new Map;if(!n?.data)return i;for(let s of n.data){let l=Ji(s.chain_id,s.address);i.set(l,s.category)}return i},[n]),a=(0,nd.useMemo)(()=>{let i=new Map;if(!n?.data)return i;for(let s of n.data)i.set(Ji(s.chain_id,s.address),s);return i},[n]);return{categoryMap:o,infoMap:a,...r}}var Iu=require("react"),Eu=H(require("bignumber.js"),1);function Au(e,t,n){let{tokens:r,isLoading:o}=Tr(e,t,n),{statsMap:a}=Ir(e,n);return(0,Iu.useMemo)(()=>{let i=new Eu.default(0);for(let p of r){let h=a.get(ur(p.chainId,p.address));if(!h)continue;let u=kt(p.quantity.numeric),g=kt(h.price);if(!u||!g)continue;let x=u.shiftedBy(-p.quantity.decimals).multipliedBy(g);x.isNaN()||(i=i.plus(x))}let s=i.toFixed(),{displayValue:l,isLowerBound:d}=Tp(s);return{totalUsd:s,displayValue:l,isLowerBound:d,isLoading:o}},[r,a,o])}var od=H(require("bignumber.js"),1);var jw=/^0x[0-9a-f]{40}$/i;function Lu(e){if(!Array.isArray(e)||e.length===0)return;let t=[];for(let n of e){if(!n||typeof n!="object")return;let{chainId:r,address:o}=n,a=mi(r);if(a===void 0||typeof o!="string")return;let i=o.trim();if(!jw.test(i))return;t.push({chainId:a,address:i.toLowerCase()})}return t}function Ww(e){return new Map(e.map((t,n)=>[`${t.chainId}:${t.address.toLowerCase()}`,n]))}var Gw=new od.default("0.0001");function rd(e){return(kt(e.quantity.numeric)??new od.default(0)).shiftedBy(-e.quantity.decimals)}function Mu(e,t){return`${e}:${t.toLowerCase()}`}function Hw(e,t){return`${t.toLowerCase()}_${e}`}function Du({env:e,tokens:t,pinnedTokens:n,preferredTokens:r,statsMap:o,categoryMap:a,showGameToken:i}){let s=[],l=[],d=[],p=[],h=new Set;for(let f of o.values())h.add(f.chain_id);let u=h.size>0,g=Ww(n??ji(e)),x=new Map;(r??[]).forEach((f,c)=>{let b=mi(f.chainId);b!==void 0&&x.set(`${b}:${f.address.toLowerCase()}`,c)});for(let f of t){let c=`${f.chainId}:${f.address.toLowerCase()}`,b=g.has(c),w=x.get(c);if(b)s.push(f);else if(w!==void 0)d.push(f);else if(rd(f).isGreaterThanOrEqualTo(Gw)){if(!i&&a.get(Hw(f.chainId,f.address))==="game")continue;u&&!h.has(f.chainId)?l.push(f):p.push(f)}}s.sort((f,c)=>{let b=g.get(`${f.chainId}:${f.address.toLowerCase()}`)??99,w=g.get(`${c.chainId}:${c.address.toLowerCase()}`)??99;return b-w}),d.sort((f,c)=>{let b=x.get(`${f.chainId}:${f.address.toLowerCase()}`)??99,w=x.get(`${c.chainId}:${c.address.toLowerCase()}`)??99;return b-w});let y=(f,c)=>{let b=o.get(Mu(f.chainId,f.address)),w=o.get(Mu(c.chainId,c.address)),k=rd(f).multipliedBy(kt(b?.price)??0);return rd(c).multipliedBy(kt(w?.price)??0).minus(k).toNumber()};return l.sort(y),p.sort(y),[...s,...l,...d,...p]}var $i=H(require("react"),1);var Pu=new Set;function _w(e){Pu.has(e)||(Pu.add(e),console.warn(`[dapp-ui] apps.json walletInfo.pinnedTokens (${e}) \uD615\uC2DD\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC544 \uBB34\uC2DC\uD569\uB2C8\uB2E4 \u2014 \uAE30\uBCF8 \uACE0\uC815 \uBAA9\uB85D\uC73C\uB85C \uD3F4\uBC31\uD569\uB2C8\uB2E4.`))}function Ou(e){let t=Xt(gi,e,$i.useCallback(r=>{let o=r?.walletInfo?.pinnedTokens;if(o===void 0)return;let a=Lu(o);if(!a){_w(e);return}return a},[e])),n=$i.useMemo(()=>ji(e),[e]);return t??n}var Jg=require("qrcode.react");var $g=require("@nexus-cross/crossx-design-system");var _u=require("@nexus-cross/crossx-design-system");var ts=require("@nexus-cross/crossx-design-system");var Ee=require("react/jsx-runtime"),Vw='<svg width="100%" height="100%" viewBox="0 0 640 640" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_75048_28969)"><rect width="640" height="640" rx="100" fill="white"/><path d="M640.092 -0.18042H0.0917969V639.82H640.092V-0.18042Z" fill="#CE3E35"/><path d="M43.6074 104.484C43.6074 71.3473 70.4703 44.4844 103.607 44.4844H536.393C569.53 44.4844 596.393 71.3473 596.393 104.484V346.514H43.6074V104.484Z" fill="white"/><g filter="url(#filter0_d_75048_28969)"><path d="M639.908 639.822H0.0917969V158.676C0.0917969 136.585 18.0004 118.676 40.0918 118.676H218.544C237.426 118.676 252.868 132.846 264.251 147.912C277.196 165.045 297.355 176.058 319.999 176.058C342.644 176.058 362.803 165.045 375.748 147.912C387.131 132.846 402.573 118.676 421.455 118.676H599.908C622 118.676 639.908 136.585 639.908 158.676V639.822Z" fill="url(#paint0_linear_75048_28969)"/></g><path d="M223.621 639.503H639.909V181.499L223.621 448.166V639.503Z" fill="url(#paint1_linear_75048_28969)"/><path d="M223.645 639.819H0.0917969V212.869L223.645 449.197V639.819Z" fill="url(#paint2_linear_75048_28969)"/><g filter="url(#filter1_d_75048_28969)"><path d="M317.103 250.341L228.024 301.829C212.311 310.864 206.867 331.162 215.899 346.881C224.93 362.6 245.221 368.046 260.933 359.01L336.28 315.444L300.401 353.936V504.934C300.401 523.129 315.247 537.981 333.434 537.981C351.621 537.981 366.468 523.129 366.468 504.934V278.932C366.468 272.62 364.489 266.431 362.014 262.347C352.735 246.752 332.692 241.182 316.979 250.217L317.103 250.341Z" fill="white"/></g></g><defs><filter id="filter0_d_75048_28969" x="-19.9082" y="93.6763" width="679.816" height="561.146" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dy="-5"/><feGaussianBlur stdDeviation="10"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 0.892803 0 0 0 0 0.220099 0 0 0 0 0.293135 0 0 0 0.5 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_75048_28969"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_75048_28969" result="shape"/></filter><filter id="filter1_d_75048_28969" x="190.367" y="224.71" width="211.348" height="348.518" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dx="7.03953" dy="7.03953"/><feGaussianBlur stdDeviation="14.1039"/><feColorMatrix type="matrix" values="0 0 0 0 0.831373 0 0 0 0 0.113725 0 0 0 0 0.356863 0 0 0 0.3 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_75048_28969"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_75048_28969" result="shape"/></filter><linearGradient id="paint0_linear_75048_28969" x1="-74.0158" y1="54.6376" x2="542.251" y2="802.323" gradientUnits="userSpaceOnUse"><stop stop-color="#F3752D"/><stop offset="1" stop-color="#EC1272"/></linearGradient><linearGradient id="paint1_linear_75048_28969" x1="159.749" y1="206.729" x2="471.286" y2="474.513" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><linearGradient id="paint2_linear_75048_28969" x1="399.134" y1="82.7297" x2="104.683" y2="466.123" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><clipPath id="clip0_75048_28969"><rect width="640" height="640" rx="100" fill="white"/></clipPath></defs></svg>',Qw=`data:image/svg+xml,${encodeURIComponent(Vw)}`;function es(){return(0,Ee.jsx)("img",{src:Qw,width:40,height:40,alt:"",style:{display:"block"}})}function Bu(){return(0,Ee.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[(0,Ee.jsxs)("g",{clipPath:"url(#clip0_1331_27065)",children:[(0,Ee.jsx)("path",{d:"M37.2488 38.4674L28.6626 35.8175L22.1876 39.8295L17.6699 39.8274L11.191 35.8175L2.60875 38.4674L-0.00195312 29.3328L2.60875 19.1947L-0.00195312 10.6234L2.60875 0L16.0192 8.30453H23.838L37.2488 0L39.8595 10.6234L37.2488 19.1947L39.8595 29.3328L37.2488 38.4674Z",fill:"#FF5C16"}),(0,Ee.jsx)("path",{d:"M2.60938 0L16.0201 8.31037L15.4868 14.0137L2.60938 0ZM11.1919 29.3366L17.0925 33.9956L11.1919 35.8175V29.3366ZM16.6209 21.6342L15.4868 14.0175L8.22768 19.1971L8.22374 19.195V19.1988L8.24628 24.5302L11.1899 21.6345L16.6209 21.6342ZM37.2477 0L23.837 8.31037L24.3685 14.0137L37.2477 0ZM28.6654 29.3366L22.7646 33.9956L28.6654 35.8175V29.3366ZM31.6313 19.1985V19.1947L31.6297 19.1968L24.3705 14.0175L23.2364 21.6342H28.6651L31.6108 24.5296L31.6313 19.1985Z",fill:"#FF5C16"}),(0,Ee.jsx)("path",{d:"M11.191 35.8175L2.60875 38.4674L-0.00195312 29.3366H11.191V35.8175ZM16.62 21.6321L18.2595 32.6435L15.9873 26.5208L8.24368 24.5296L11.189 21.6324H16.62V21.6321ZM28.6662 35.8175L37.2488 38.4674L39.8595 29.3366H28.6662V35.8175ZM23.2375 21.6321L21.598 32.6435L23.8699 26.5208L31.6138 24.5296L28.6665 21.6324H23.2375V21.6321Z",fill:"#E34807"}),(0,Ee.jsx)("path",{d:"M-0.00195312 29.3328L2.60875 19.1947H8.22284L8.2434 24.5278L15.9876 26.519L18.2595 32.6414L17.0916 33.9897L11.191 29.3307H-0.00195312V29.3328ZM39.8595 29.3328L37.2488 19.1947H31.6344L31.6138 24.5278L23.8702 26.519L21.598 32.6414L22.7657 33.9897L28.6665 29.3307H39.8595V29.3328ZM23.838 8.30444H16.0192L15.4882 14.0078L18.2597 32.6355H21.598L24.3713 14.0078L23.838 8.30444Z",fill:"#FF8D5D"}),(0,Ee.jsx)("path",{d:"M2.60875 0L-0.00195312 10.6234L2.60875 19.1947H8.22284L15.4859 14.0137L2.60875 0ZM14.9975 23.8438H12.4541L11.0693 25.2508L15.9893 26.515L14.9975 23.842V23.8438ZM37.2488 0L39.8595 10.6234L37.2488 19.1947H31.6344L24.3716 14.0137L37.2488 0ZM24.8637 23.8438H27.4107L28.7955 25.2526L23.8699 26.5191L24.8637 23.8418V23.8438ZM22.1857 36.1956L22.7659 33.9936L21.598 32.6453H18.2572L17.0896 33.9936L17.6696 36.1956",fill:"#661800"}),(0,Ee.jsx)("path",{d:"M22.1857 36.1951V39.831H17.6699V36.1951H22.1857Z",fill:"#C0C4CD"}),(0,Ee.jsx)("path",{d:"M11.1914 35.8131L17.672 39.8289V36.193L17.0917 33.9912L11.1914 35.8131ZM28.6649 35.8131L22.1841 39.8289V36.193L22.7644 33.9912L28.6649 35.8131Z",fill:"#E7EBF6"})]}),(0,Ee.jsx)("defs",{children:(0,Ee.jsx)("clipPath",{id:"clip0_1331_27065",children:(0,Ee.jsx)("rect",{width:"40",height:"40",fill:"white"})})})]})}function zu(){return(0,Ee.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ee.jsx)("path",{d:"M12.23 16.81L20 9.04L27.77 16.81L32.29 12.29L20 0L7.71 12.29L12.23 16.81Z",fill:"#F3BA2F"}),(0,Ee.jsx)("path",{d:"M9.04 20L4.52 15.48L0 20L4.52 24.52L9.04 20Z",fill:"#F3BA2F"}),(0,Ee.jsx)("path",{d:"M12.23 23.19L20 30.96L27.77 23.19L32.29 27.71L20 40L7.71 27.71L12.23 23.19Z",fill:"#F3BA2F"}),(0,Ee.jsx)("path",{d:"M35.48 24.52L40 20L35.48 15.48L30.96 20L35.48 24.52Z",fill:"#F3BA2F"}),(0,Ee.jsx)("path",{d:"M24.58 20L20 15.41L16.61 18.8L16.22 19.19L15.42 19.99L20 24.59L24.59 20L24.58 20Z",fill:"#F3BA2F"})]})}function Fu(){return(0,Ee.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"247",height:"246",viewBox:"0 0 247 246",fill:"none",children:[(0,Ee.jsx)("rect",{width:"247.005",height:"245.105",rx:"36",fill:"#121212"}),(0,Ee.jsx)("path",{d:"M89.1233 136.695V59.7551H118.481V140.524L74.5862 184.774L30.4787 140.524V107.55H59.9073V136.695L74.5862 151.303L89.1233 136.695Z",fill:"white"}),(0,Ee.jsx)("path",{d:"M59.8364 99.8915V59.7551H12.0414L30.4787 77.8377V99.8915H59.8364Z",fill:"#2FD7FF"}),(0,Ee.jsx)("path",{d:"M199.534 59.9334C202.562 60.0484 208.427 60.4824 212.031 63.6902C215.635 66.898 216.937 71.0498 216.937 73.1199V104.017L198.767 114.828L216.937 125.561V172.713C216.937 174.511 216.405 178.276 211.034 181.377C205.664 184.477 202.613 184.969 201.758 184.827H143.949C141.879 184.904 136.712 184.182 132.602 180.686C128.493 177.19 128.462 175.216 128.462 173.515V125.561L146.173 114.828L128.462 104.017V71.1268C128.462 69.721 130.109 65.7781 133.237 63.5701C137.147 60.8101 141.112 59.9334 144.409 59.9334H199.534ZM158.3 122.264V166.221H187.033V122.264H158.3ZM158.3 107.794H187.033V78.5272H158.3V107.794Z",fill:"white"})]})}function Uu(){return(0,Ee.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ee.jsxs)("g",{clipPath:"url(#clip0_1185_7785)",children:[(0,Ee.jsx)("path",{d:"M14 28C21.75 28 28 21.75 28 14C28 6.25 21.75 0 14 0C6.25 0 0 6.25 0 14C0 21.75 6.25 28 14 28Z",fill:"#EB0029"}),(0,Ee.jsx)("path",{d:"M19.4975 8.36232L6 6L13.103 23L23 11.5311L19.4975 8.36232ZM19.2801 9.4034L21.3449 11.27L15.6975 12.2424L19.2801 9.4034ZM14.4714 12.0479L8.51876 7.35252L18.247 9.05524L14.4714 12.0479ZM14.0467 12.8782L13.0765 20.5098L7.84385 7.98492L14.0467 12.8782ZM14.9454 13.2835L21.1983 12.2064L14.026 20.518L14.9454 13.2835Z",fill:"white"})]}),(0,Ee.jsx)("defs",{children:(0,Ee.jsx)("clipPath",{id:"clip0_1185_7785",children:(0,Ee.jsx)("rect",{width:"28",height:"28",fill:"white"})})})]})}function ju(){return(0,Ee.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ee.jsx)("path",{fill:"#FFC107",d:"M43.6 20.5H42V20H24v8h11.3A12 12 0 1 1 24 12c3 0 5.8 1.2 7.9 3l5.7-5.7A20 20 0 1 0 44 24c0-1.2-.1-2.4-.4-3.5z"}),(0,Ee.jsx)("path",{fill:"#FF3D00",d:"M6.3 14.7l6.6 4.8A12 12 0 0 1 24 12c3 0 5.8 1.2 7.9 3l5.7-5.7A20 20 0 0 0 6.3 14.7z"}),(0,Ee.jsx)("path",{fill:"#4CAF50",d:"M24 44c5.2 0 10-2 13.6-5.2l-6.3-5.3A12 12 0 0 1 12.7 28l-6.5 5A20 20 0 0 0 24 44z"}),(0,Ee.jsx)("path",{fill:"#1976D2",d:"M43.6 20.5H42V20H24v8h11.3a12 12 0 0 1-4.1 5.5l6.3 5.3C41 35.7 44 30.3 44 24c0-1.2-.1-2.4-.4-3.5z"})]})}function Wu(){return(0,Ee.jsx)("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,Ee.jsx)("path",{d:"M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.53 4.08zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"})})}function Gu(){return(0,Ee.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Ee.jsx)("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}var Fo={cross_embedded:{id:"cross_embedded",name:ts.WALLET_LABELS.social,description:"Sign in with Google or Apple",icon:es},cross_wallet:{id:"cross_wallet",name:ts.WALLET_LABELS.app,description:"App approval is required",icon:es,featured:!0},cross_extension:{id:"cross_extension",name:ts.WALLET_LABELS.extension,description:"Browser extension approval is required",icon:es,rdns:"nexus.to.crosswallet.desktop",installUrl:"https://chromewebstore.google.com/detail/crossx/nninbdadmocnokibpaaohnoepbnpdgcg",visibility:"desktop-only"},metamask:{id:"metamask",name:"MetaMask",description:"Browser extension approval is required",icon:Bu,rdns:"io.metamask"},binance:{id:"binance",name:"Binance",description:"Mobile app only \u2014 Add CROSS network first",icon:zu},verse8:{id:"verse8",name:"Verse8 Wallet",description:"Optimized for Forge and Verse8 ecosystem",icon:Fu,badge:"For Forge"},tron:{id:"tron",name:"Tron Wallet",description:"Dedicated for Tron-based transactions and assets",icon:Uu,badge:"For SHOP"}};function ad(e){return Fo[e]}var ns={google:{id:"google",name:"Google",icon:ju},apple:{id:"apple",name:"Apple",icon:Wu}};function Hu(e){return ns[e]}var Vu="dappui.wcm.last-selected",qw=new Set(["google","apple"]);function Qu(e){try{window.localStorage.setItem(Vu,e)}catch{}}function qu(){let e=null;try{e=window.localStorage.getItem(Vu)}catch{return}if(e)return qw.has(e)?_u.WALLET_LABELS.default:Fo[e]?.name}function jt(e,t,n,r){if(!r||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.defaultPrevented)return;e.preventDefault();let o;try{o=r(t,n)}catch(d){console.error("[dapp-ui] onOutlink threw:",d);return}let a=d=>{typeof window>"u"||window.open(d,"_blank","noopener,noreferrer")};if((d=>!!d&&(typeof d=="object"||typeof d=="function")&&typeof d.then=="function")(o)){let d=typeof window<"u"?window.open("","_blank","noopener,noreferrer"):null,p=h=>{if(h===null){d?.close();return}let u=h??t;if(d)try{d.location.href=u}catch{d.close(),a(u)}else a(u)};o.then(p,h=>{console.error("[dapp-ui] onOutlink rejected:",h),d?.close()});return}let s=o;if(s===null)return;a(s??t)}var mo=H(require("react"),1),xm=require("vaul");var jo=require("react");var An=H(require("bignumber.js"),1),Yw=/^(\d{4}-\d{2}-\d{2})/;function Yu(e){if(!e||e.length===0)return;let t=new Map,n;for(let{key:o,cumulative:a}of e.map(i=>({key:Yw.exec(i.reference_date)?.[1],cumulative:i.cumulative_earned})).filter(i=>!!i.key&&i.cumulative!=null).sort((i,s)=>i.key<s.key?-1:i.key>s.key?1:0))t.set(o,a),n=o;if(n===void 0)return;let r=new Date().toISOString().slice(0,10);return t.get(r)??t.get(n)}function Ku(e){return e.poolType==="Unknown"}function rs(e){return e.length<=12?e:`${e.slice(0,6)}...${e.slice(-4)}`}function os(e){return e.length<=13?e:`${e.slice(0,6)}...${e.slice(-4)}`}function wa(e,t){let n=e.length+t.length;if(n>32)return"xs";if(n>24)return"sm"}function id(e){return e?.toUpperCase()==="WONE"?"ONE":e}var Kw=["Request Arguments:","Details:","Docs:","Version:","Contract Call:"];function ya(e,t){console.error("[wallet-portfolio] withdraw failed:",e);let r=e instanceof Error?e.message:"";for(let a of Kw){let i=r.indexOf(a);i>=0&&(r=r.slice(0,i))}return r.split(`
8
+ `).map(a=>a.trim()).find(a=>a.length>0)||t}var Zw="0xe00e8bf3";function Zu(e,t){let n=typeof e=="bigint"?e:BigInt(e);if(n<0n)throw new Error("poolId must be non-negative");if(t<0n)throw new Error("amount must be non-negative");let r=n.toString(16).padStart(64,"0"),o=t.toString(16).padStart(64,"0");return`${Zw}${r}${o}`}function Uo(e){return!e||e<=0n?"0":new An.default(e.toString()).shiftedBy(-9).toFormat(2,An.default.ROUND_DOWN).replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"")}function as(e){return!e||e<=0n?"0":new An.default(e.toString()).toFormat(0,An.default.ROUND_DOWN)}function is(e){if(!e||e<=0n)return"0";let t=new An.default(e.toString()).shiftedBy(-18),n=t.isLessThan(1e-4)?7:4;return t.toFormat(n,An.default.ROUND_DOWN).replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"")}function fr(e,t){let n=new An.default(e).shiftedBy(-t);return!n.isFinite()||n.isZero()?"0":n.isGreaterThanOrEqualTo(1)?n.toFormat(2,An.default.ROUND_DOWN):n.toFormat(4,An.default.ROUND_DOWN)}function sd(e){return fr(e,0)}var xa={rate:1,symbol:"$"};function co(e,t=xa){let n=Number.isFinite(t.rate)&&t.rate>0?t.rate:1;return`${t.symbol||"$"}${e.times(n).toFormat(2,An.default.ROUND_DOWN)}`}function Gr(e,t,n,r=xa){let o=new An.default(n||"0");if(!o.isFinite()||o.isLessThanOrEqualTo(0))return null;let a=new An.default(e||"0").shiftedBy(-t).times(o);return a.isFinite()?co(a,r):null}var va=(0,jo.createContext)(null);function Wt(){let e=(0,jo.useContext)(va);if(!e)throw new Error("WalletPortfolio compound components must be used within <WalletPortfolio>");return e}function Fn(){let{conversionRatio:e,currencySymbol:t}=Wt();return(0,jo.useMemo)(()=>({rate:typeof e=="number"&&e>0?e:xa.rate,symbol:t||xa.symbol}),[e,t])}var Xu=require("vaul");var ld=require("react/jsx-runtime");function Ju({asChild:e,children:t}){let{walletAddress:n}=Wt(),r=t!=null,o=e??!0,a=r?t:(0,ld.jsx)("button",{type:"button",children:dn(n)});return(0,ld.jsx)(Xu.Drawer.Trigger,{asChild:o,children:a})}var Sa=require("vaul");var _t=H(require("react"),1),wm=require("@tanstack/react-query");var ss=require("react"),dd=(0,ss.createContext)(null);function $u(){return(0,ss.useContext)(dd)}var Gt=require("react/jsx-runtime");function ef({size:e=22,className:t}){return(0,Gt.jsx)("svg",{width:e,height:e,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Gt.jsx)("path",{d:"M14 4L7 11L14 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function tf({size:e=22,className:t}){return(0,Gt.jsxs)("svg",{width:e,height:e,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Gt.jsx)("path",{d:"M18.333 3.667v5.5h-5.5",stroke:"currentColor",strokeWidth:1.833,strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M16.17 13.75a7.333 7.333 0 11-1.54-7.59L18.333 9.167",stroke:"currentColor",strokeWidth:1.833,strokeLinecap:"round",strokeLinejoin:"round"})]})}function nf({size:e=12,className:t}){return(0,Gt.jsx)("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Gt.jsx)("path",{d:"M6 11A5 5 0 106 1a5 5 0 000 10zM6 8V6M6 4h.005",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"})})}function ls({size:e=16,className:t}){return(0,Gt.jsxs)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Gt.jsx)("path",{d:"M5.333 5.333V4a1.333 1.333 0 011.334-1.333h5.333A1.333 1.333 0 0113.333 4v5.333a1.333 1.333 0 01-1.333 1.334h-1.333",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M4 5.333h5.333c.737 0 1.334.597 1.334 1.334V12c0 .736-.597 1.333-1.334 1.333H4A1.333 1.333 0 012.667 12V6.667C2.667 5.93 3.263 5.333 4 5.333z",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"})]})}function ds({size:e=16,className:t}){return(0,Gt.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,Gt.jsx)("path",{d:"M13.333 4L6 11.333 2.667 8",stroke:"currentColor",strokeWidth:1.667,strokeLinecap:"round",strokeLinejoin:"round"})})}function cs({size:e=48,className:t}){return(0,Gt.jsxs)("svg",{width:e,height:e,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,Gt.jsx)("circle",{cx:"24",cy:"24",r:"24",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M14 24.5l6.6 6.6L34.5 17.5",stroke:"var(--wp-claim-success-mark, #ffffff)",strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round"})]})}function Mn({size:e=12,className:t}){return(0,Gt.jsxs)("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":"true",children:[(0,Gt.jsx)("path",{d:"M5 2H2.5A1.5 1.5 0 0 0 1 3.5V9.5A1.5 1.5 0 0 0 2.5 11H8.5A1.5 1.5 0 0 0 10 9.5V7",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M7 1H11V5",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M11 1L6 6",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})]})}var rf=require("@tanstack/react-query"),cd=require("react");var Xw="wp:reward-pools";function Wo(e,t=!0){let{data:n,...r}=(0,rf.useQuery)({queryKey:[Xw,e],queryFn:async({signal:i})=>{let s=await Be("gameReward",e),l=await fetch(`${s}/v1/pools`,{cache:"no-store",signal:i});if(!l.ok)throw new Error(`Failed to fetch pools: ${l.status}`);let d=await l.json();if(d.code!==200)throw new Error(`Pools API error: ${d.code}`);return d},enabled:t,staleTime:0}),o=(0,cd.useMemo)(()=>n?.data.pools.filter(i=>i.pool_type==="CrossPool")??[],[n]),a=(0,cd.useMemo)(()=>n?.data.pools.filter(i=>i.pool_type==="GamePool")??[],[n]);return{crossPools:o,gamePools:a,allPools:n?.data.pools??[],...r}}var of=require("@tanstack/react-query"),af=require("react");var Jw="wp:user-deposits";function ps(e,t,n=!0){let r=n&&!!t,{data:o,...a}=(0,of.useQuery)({queryKey:[Jw,e,t],queryFn:async({signal:s})=>{let l=await Be("gameReward",e),d=await fetch(`${l}/v1/users/${t}/deposits`,{cache:"no-store",signal:s});if(!d.ok)throw new Error(`Deposits fetch failed: ${d.status}`);let p=await d.json();if(p.code!==200)throw new Error(`Deposits API error: ${p.code}`);return p},enabled:r,staleTime:0});return{depositMap:(0,af.useMemo)(()=>{let s=new Map;if(!o?.data.user_deposits)return s;for(let l of o.data.user_deposits)s.set(l.pool_address.toLowerCase(),l);return s},[o]),deposits:o?.data.user_deposits??[],...a}}var gf=require("@tanstack/react-query"),hf=require("react");var sf={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"},lf={dev:"https://stg.onechain.nexus/points",stage:"https://stg.onechain.nexus/points",production:"https://www.onechain.nexus/points"};var df={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"};var pd={dev:"https://dev-stake.ogfcorp.com",stage:"https://stg-stake.ogfcorp.com",production:"https://stake.ogfcorp.com"},cf={dev:`${pd.dev}/portfolio`,stage:`${pd.stage}/portfolio`,production:`${pd.production}/portfolio`};var pf={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"},Un={dev:"https://stg-contents.crosstoken.io/frontend/common/app-launcher/icons",stage:"https://stg-contents.crosstoken.io/frontend/common/app-launcher/icons",production:"https://contents.crosstoken.io/frontend/common/app-launcher/icons"},us={dev:"https://stg-swap-api.crossdefi.io",stage:"https://stg-swap-api.crossdefi.io",production:"https://swap-api.crossdefi.io"},uf={dev:"https://stg.crossdefi.io",stage:"https://stg.crossdefi.io",production:"https://www.crossdefi.io"},ff={dev:"0x1Fa8C0bc5B754E82d55D60f0d6151903FD995b1B",stage:"0x1Fa8C0bc5B754E82d55D60f0d6151903FD995b1B",production:"0xEFd871aF7D695A0c1709e46b565761F4cd1Ef5ba"},mf={dev:"0xda37a3B60E6b97E8CB44b460130d40331efc566b",stage:"0xda37a3B60E6b97E8CB44b460130d40331efc566b",production:"0x731a104a4461ae45bfef520468b43c262d35e682"};var $w="wp:token-info",e1="0x0000000000000000000000000000000000000001";function mr(e,t=!0){let n=At[e].cross,{data:r,...o}=(0,gf.useQuery)({queryKey:[$w,e],queryFn:async({signal:p})=>{let h=await Be("walletServer",e),u=await fetch(`${h}/v1/public/token/info`,{cache:"no-store",signal:p});if(!u.ok)throw new Error(`Failed to fetch token info: ${u.status}`);let g=await u.json();if(g.code!==200)throw new Error(`Token info API error: ${g.code}`);return g},enabled:t,staleTime:300*1e3}),{byChainAddr:a,byChainSym:i}=(0,hf.useMemo)(()=>{let p=new Map,h=new Map;if(!r?.data)return{byChainAddr:p,byChainSym:h};for(let u of r.data){let g=u.address.toLowerCase();p.set(`${u.chain_id}:${g}`,u),p.set(g,u);let x=u.symbol.replace(/^t/,"").toUpperCase(),y=`${u.chain_id}:${x}`;h.has(y)||h.set(y,u),h.has(x)||h.set(x,u)}return{byChainAddr:p,byChainSym:h}},[r]);return{getTokenImage:(p,h,u)=>{let g=p.toLowerCase(),x=!!u?.chainOnly,y=a.get(`${n}:${g}`);if(y?.image)return y.image;if(!x){let f=a.get(g);if(f?.image)return f.image}if(h){let f=h.replace(/^t/,"").toUpperCase(),c=i.get(`${n}:${f}`);if(c?.image)return c.image;if(!x){let b=i.get(f);if(b?.image)return b.image}}return""},getTokenSymbol:(p,h,u)=>{let g=p.toLowerCase();return(a.get(`${n}:${g}`)??(u?.chainOnly?void 0:a.get(g)))?.symbol||h},getNativeToken:()=>a.get(`${n}:${e1}`),...o}}var ud=H(require("react"),1);var po=require("react/jsx-runtime");function jn({sectionKey:e,title:t,icon:n,iconFit:r="cover",isEmpty:o,loading:a=!1,children:i}){let s=$u();return ud.useEffect(()=>{s?.report(e,{loading:a,empty:o})},[s,e,a,o]),ud.useEffect(()=>()=>s?.unregister(e),[s,e]),o?null:(0,po.jsxs)("div",{className:"wp-svc-card",children:[(0,po.jsxs)("div",{className:"wp-svc-card-head",children:[(0,po.jsx)("img",{className:"wp-svc-card-icon",src:n,alt:"",style:{objectFit:r}}),(0,po.jsx)("span",{className:"wp-svc-card-title",children:t})]}),(0,po.jsx)("div",{className:"wp-svc-items",children:i})]})}var fs=H(require("bignumber.js"),1),Ve=require("react/jsx-runtime"),t1="ONErewards";function n1(e){return new fs.default(e||"0").isGreaterThan(0)}function bf(){let{env:e,walletAddress:t,onOutlink:n}=Wt(),r=Fn(),o=!!t,{allPools:a,isLoading:i}=Wo(e,o),{depositMap:s,isLoading:l}=ps(e,t,o),{getTokenImage:d}=mr(e,o),p=(g,x)=>`${sf[e]}/gametoken/tokens/${g.deposit_token.address}?mode=rewards${x==="withdraw"?"&trade=withdraw":""}`,h=`${Un[e]}/reward.png`,u=a.filter(g=>{let x=s.get(g.pool_address.toLowerCase()),y=x?.deposited_amount??"0",f=x?.claimable_reward??"0";return!(new fs.default(y).isZero()&&new fs.default(f).isZero())});return(0,Ve.jsx)(jn,{sectionKey:"rewards",title:t1,icon:h,isEmpty:u.length===0,loading:i||l,children:u.map(g=>{let x=s.get(g.pool_address.toLowerCase()),y=x?.deposited_amount??"0",f=x?.claimable_reward??"0",c=p(g,"withdraw"),b=p(g,"claim"),w=d(g.deposit_token.address,g.deposit_token.symbol),k=g.reward_tokens[0],C=k?d(k.address,k.symbol):"",N=g.reward_tokens.map(D=>D.symbol),T=N.length>0?`${g.deposit_token.symbol}-${N.join("/")}`:g.deposit_token.symbol,R=k?fr(f,k.decimals):"0",S=k?.symbol??"Reward",E=Gr(y,g.deposit_token.decimals,g.deposit_token.price,r),A=k?Gr(f,k.decimals,k.price,r):null,F=!!x&&n1(f);return(0,Ve.jsxs)("article",{className:"wp-item","data-side":"reward",children:[(0,Ve.jsxs)("div",{className:"wp-item-body",children:[(0,Ve.jsxs)("div",{className:"wp-item-line",children:[(0,Ve.jsxs)("span",{className:"wp-item-label",children:["Pool",(0,Ve.jsx)("span",{className:"wp-item-label-sub",children:" (Deposit - Earn)"})]}),(0,Ve.jsxs)("div",{className:"wp-svc-token",children:[(0,Ve.jsxs)("span",{className:"wp-token-stack","aria-hidden":!0,children:[w&&(0,Ve.jsx)("img",{className:"wp-svc-token-icon",src:w,alt:""}),C&&(0,Ve.jsx)("img",{className:"wp-svc-token-icon",src:C,alt:""})]}),(0,Ve.jsx)("span",{children:T})]})]}),(0,Ve.jsxs)("div",{className:"wp-item-line",children:[(0,Ve.jsx)("span",{className:"wp-item-label",children:"Deposited"}),(0,Ve.jsxs)("div",{className:"wp-svc-token wp-svc-token--amount",children:[w&&(0,Ve.jsx)("img",{className:"wp-svc-token-icon",src:w,alt:""}),(0,Ve.jsxs)("div",{className:"wp-svc-amount",children:[(0,Ve.jsx)("span",{className:"wp-svc-amount-main",children:fr(y,g.deposit_token.decimals)}),E&&(0,Ve.jsx)("span",{className:"wp-item-usd",children:E})]})]})]}),(0,Ve.jsxs)("div",{className:"wp-item-line",children:[(0,Ve.jsxs)("span",{className:"wp-item-label",children:["Claimable (",S,")"]}),(0,Ve.jsxs)("div",{className:"wp-svc-token wp-svc-token--amount",children:[C&&(0,Ve.jsx)("img",{className:"wp-svc-token-icon",src:C,alt:""}),(0,Ve.jsxs)("div",{className:"wp-svc-amount",children:[(0,Ve.jsx)("span",{className:"wp-svc-amount-main",children:R}),A&&(0,Ve.jsx)("span",{className:"wp-item-usd",children:A})]})]})]})]}),(0,Ve.jsxs)("div",{className:"wp-item-tags",children:[(0,Ve.jsxs)("a",{className:"wp-tag wp-tag--muted",href:c,target:"_blank",rel:"noopener noreferrer","data-track":"rewards_withdraw_open",onClick:D=>jt(D,c,{category:"portfolio",origin:"portfolio-rewards",payload:{pool:g,userDeposit:x}},n),children:[(0,Ve.jsx)("span",{className:"wp-tag-label",children:"Withdraw"}),(0,Ve.jsx)(Mn,{size:12,className:"wp-tag-icon"})]}),(0,Ve.jsxs)("a",{className:"wp-tag wp-tag--mint","data-disabled":!F||void 0,"aria-disabled":!F||void 0,href:F?b:void 0,target:F?"_blank":void 0,rel:F?"noopener noreferrer":void 0,onClick:D=>{if(!F){D.preventDefault();return}jt(D,b,{category:"portfolio",origin:"portfolio-rewards",payload:{pool:g,userDeposit:x}},n)},children:[(0,Ve.jsx)("span",{className:"wp-tag-label",children:"Claim"}),(0,Ve.jsx)(Mn,{size:12,className:"wp-tag-icon"})]})]})]},g.pool_address)})})}var Tf=H(require("react"),1);var yf=require("@tanstack/react-query"),Ra=require("react");var r1="0x70a08231",o1="0x18160ddd",a1="0x313ce567",i1=8e3;async function s1(e,t,n,r){let o=new AbortController,a=setTimeout(()=>o.abort(),i1);r&&r.addEventListener("abort",()=>o.abort(),{once:!0});let i=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:t,params:n}),signal:o.signal}).finally(()=>clearTimeout(a));if(!i.ok)throw new Error(`RPC ${t} HTTP ${i.status}`);let s=await i.json();if(s.error)throw new Error(`RPC ${t}: ${s.error.message}`);if(s.result===void 0)throw new Error(`RPC ${t}: empty result`);return s.result}function l1(e){return e.toLowerCase().replace(/^0x/,"").padStart(64,"0")}function ka(e){if(!(!e||e==="0x"))try{return BigInt(e)}catch{return}}async function Er(e,t,n,r,o){try{return await s1(e,"eth_call",[o?{from:o,to:t,data:n}:{to:t,data:n},"latest"],r)}catch{return}}async function d1(e,t,n,r){let[o,a,i]=await Promise.all([Er(e,n,r1+l1(t),r),Er(e,n,o1,r),Er(e,n,a1,r)]),s=ka(o);if(s===void 0)return null;let l=ka(i);return{balance:s,totalSupply:ka(a),decimals:l!==void 0?Number(l):void 0}}async function Ca(e,t){let n=At[e].cross,r=await Be("walletServer",e),o=await fetch(`${r}/v1/public/chain/info/${n}`,{cache:"no-store",signal:t});if(!o.ok)return;let a=await o.json();return("data"in a&&a.data!==void 0?Array.isArray(a.data)?a.data[0]:a.data:a)?.rpc||void 0}async function wf(e,t,n,r){if(!t||n.length===0)return{};let o;try{o=await Ca(e,r)}catch{o=void 0}if(!o)return{};let a=await Promise.all(n.map(async s=>[s.toLowerCase(),await d1(o,t,s,r)])),i={};for(let[s,l]of a)l&&(i[s]=l);return i}var c1="wp:withdraw-token-meta",p1="0xc89039c5",u1="0x95d89b41",f1="0x313ce567";function m1(e){if(!(!e||e==="0x"))try{let t=e.replace(/^0x/,""),n=Number(BigInt("0x"+t.slice(64,128)));if(!Number.isFinite(n)||n<=0||n>64)return;let r=t.slice(128,128+n*2),o="";for(let a=0;a<r.length;a+=2)o+=String.fromCharCode(parseInt(r.slice(a,a+2),16));return o||void 0}catch{return}}function g1(e){if(!e||e==="0x")return;let n="0x"+e.replace(/^0x/,"").padStart(64,"0").slice(24,64);return/^0x[a-f0-9]{40}$/.test(n)&&n!=="0x0000000000000000000000000000000000000000"?n:void 0}async function h1(e,t,n){if(t.length===0)return{};let r;try{r=await Ca(e,n)}catch{r=void 0}if(!r)return{};let o=await Promise.all(t.map(async i=>{let s=g1(await Er(r,i,p1,n));if(!s)return[i.toLowerCase(),null];let[l,d]=await Promise.all([Er(r,s,u1,n),Er(r,s,f1,n)]),p=m1(l),h=ka(d);return p?[i.toLowerCase(),{tokenAddress:s,symbol:p,decimals:h!==void 0?Number(h):18}]:[i.toLowerCase(),null]})),a={};for(let[i,s]of o)s&&(a[i]=s);return a}function xf(e,t,n=!0){let o=n&&!!t,{allPools:a,isLoading:i}=Wo(e,o),{deposits:s,isLoading:l}=ps(e,t,o),d=(0,Ra.useMemo)(()=>{let f=new Map;for(let c of a)f.set(c.pool_address.toLowerCase(),c);return f},[a]),p=(0,Ra.useMemo)(()=>s.filter(f=>{try{return BigInt(f.deposited_amount||"0")>0n}catch{return!1}}),[s]),h=(0,Ra.useMemo)(()=>p.map(f=>f.pool_address.toLowerCase()).filter(f=>!d.has(f)).sort(),[p,d]),{data:u,isLoading:g}=(0,yf.useQuery)({queryKey:[c1,e,h],queryFn:({signal:f})=>h1(e,h,f),enabled:o&&h.length>0,staleTime:1440*60*1e3});return{positions:(0,Ra.useMemo)(()=>{let f=[];for(let c of p){let b=c.pool_address.toLowerCase(),w=d.get(b);if(w){f.push({poolId:c.pool_id,poolAddress:c.pool_address,poolType:w.pool_type,tokenSymbol:w.deposit_token.symbol,tokenAddress:w.deposit_token.address,decimals:w.deposit_token.decimals,price:w.deposit_token.price,depositedRaw:c.deposited_amount});continue}let k=u?.[b];k&&f.push({poolId:c.pool_id,poolAddress:c.pool_address,poolType:"Unknown",tokenSymbol:k.symbol,tokenAddress:k.tokenAddress,decimals:k.decimals,depositedRaw:c.deposited_amount})}return f},[p,d,u]),isLoading:i||l||g}}var hn=H(require("react"),1);var ie=require("react/jsx-runtime"),b1=400;function w1(e,t,n){if(t==="loading")return"Estimating...";if(!e||t==="error"||t==="unavailable")return"Wallet estimate";let r=e.maxFeePerGas??e.gasPrice;return!r||r<=0n||e.gasLimit<=0n?"Wallet estimate":`${is(e.gasLimit*r)} ${n??""}`.trim()}function fd(e,t,n){return n==="loading"?"Estimating...":n==="error"||n==="unavailable"?"-":`${e} ${t}`.trim()}function y1({position:e,size:t}){return e.icon?(0,ie.jsx)("img",{src:e.icon,alt:"",width:t,height:t}):(0,ie.jsx)("span",{children:e.tokenSymbol.slice(0,1)})}function vf({open:e,status:t,positions:n,initialPoolAddress:r,walletAddress:o,txHash:a,error:i,copied:s=!1,estimateWithdraw:l,onClose:d,onConfirm:p,onCopyHash:h,trackFunnel:u,nativeSymbol:g}){let[x,y]=hn.useState(null),[f,c]=hn.useState("idle"),b=hn.useRef(0),w=hn.useRef(void 0),k=hn.useRef(null);hn.useEffect(()=>()=>clearTimeout(w.current),[]);let C=hn.useMemo(()=>{let G=r?.toLowerCase();return n.find(M=>M.poolAddress.toLowerCase()===G)??n[0]??null},[n,r]),N=hn.useMemo(()=>{try{return BigInt(C?.depositedRaw??"0")}catch{return 0n}},[C?.depositedRaw]),T=C?.decimals??18;hn.useEffect(()=>{!e||!C||u?.("position_selected")},[e,C,u]);let R=hn.useCallback(()=>{y(null),c(l?"idle":"unavailable"),b.current+=1,k.current=null},[]);if(hn.useEffect(()=>{e&&R()},[e,R]),hn.useEffect(()=>{if(!e||t!=="confirm"){clearTimeout(w.current);return}if(!l||!C){clearTimeout(w.current),c("unavailable");return}if(N<=0n){clearTimeout(w.current),b.current+=1,k.current=null,y(null),c("idle");return}let G=`${C.poolAddress.toLowerCase()}:${N.toString()}`;if(k.current===G)return;k.current=G,clearTimeout(w.current);let M=b.current+1;b.current=M,c("loading"),w.current=setTimeout(()=>{l(C,N).then(j=>{b.current===M&&(y(j??null),c(j?"ready":"unavailable"))}).catch(()=>{b.current===M&&(y(null),c("error"))})},b1)},[e,t,N,l,C]),!e||!C)return null;let S=t==="submitting",E=Uo(x?.maxPriorityFeePerGas),A=Uo(x?.maxFeePerGas??x?.gasPrice),F=as(x?.gasLimit),D=fr(C.depositedRaw,T);return(0,ie.jsx)("div",{className:"wp-claim-overlay",role:"presentation",onMouseDown:G=>{G.target===G.currentTarget&&!S&&d()},children:(0,ie.jsxs)("section",{className:"wp-claim-sheet",role:"dialog","aria-modal":"true","aria-labelledby":"wp-withdraw-title","aria-label":"Withdraw","data-status":t,"data-vaul-no-drag":!0,children:[(0,ie.jsx)("div",{className:"wp-claim-grabber","aria-hidden":!0,children:(0,ie.jsx)("span",{})}),(0,ie.jsxs)("div",{className:"wp-claim-content wp-withdraw-content",children:[t==="success"&&a?(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)("span",{className:"wp-claim-icon wp-claim-icon--success","aria-hidden":!0,children:(0,ie.jsx)(cs,{})}),(0,ie.jsxs)("div",{className:"wp-claim-copy",children:[(0,ie.jsx)("h3",{id:"wp-withdraw-title",className:"wp-claim-title",children:"Withdraw Submitted!"}),(0,ie.jsx)("p",{className:"wp-claim-desc",children:"Your withdrawal request has been submitted. Balances will update shortly after the transaction settles."})]}),(0,ie.jsx)("div",{className:"wp-claim-list","aria-label":"Withdraw transaction",children:(0,ie.jsxs)("div",{className:"wp-claim-list-item",children:[(0,ie.jsx)("span",{children:"Tx Hash"}),(0,ie.jsxs)("button",{type:"button",className:"wp-claim-hash",onClick:h,"aria-label":"Copy transaction hash","data-track":"withdraw_hash_copy",children:[(0,ie.jsx)("strong",{children:os(a)}),s?(0,ie.jsx)(ds,{}):(0,ie.jsx)(ls,{})]})]})})]}):(0,ie.jsxs)(ie.Fragment,{children:[t==="error"&&(0,ie.jsxs)("div",{className:"wp-claim-heading",children:[(0,ie.jsx)("h3",{id:"wp-withdraw-title",className:"wp-claim-title",children:"Withdraw Failed"}),(0,ie.jsx)("p",{className:"wp-claim-error-message",children:i||"The withdraw request could not be completed."})]}),(0,ie.jsxs)("div",{className:"wp-claim-reward-card","data-fit":wa(C.tokenSymbol,D),"aria-label":"Deposited balance",children:[(0,ie.jsx)("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:(0,ie.jsx)(y1,{position:C,size:28})}),(0,ie.jsx)("strong",{className:"wp-claim-reward-symbol",children:C.tokenSymbol}),(0,ie.jsx)("strong",{className:"wp-claim-reward-amount",children:D})]}),(0,ie.jsxs)("div",{className:"wp-claim-account-card","aria-label":"Withdraw gas fee",children:[(0,ie.jsxs)("div",{className:"wp-claim-account-row",children:[(0,ie.jsxs)("div",{className:"wp-claim-account",children:[(0,ie.jsx)("span",{className:"wp-claim-account-avatar","aria-hidden":!0}),(0,ie.jsxs)("strong",{children:[C.tokenSymbol," Pool"]})]}),(0,ie.jsx)("span",{children:rs(o)})]}),(0,ie.jsx)("span",{className:"wp-claim-divider","aria-hidden":!0}),(0,ie.jsxs)("div",{className:"wp-claim-detail-list",children:[(0,ie.jsxs)("div",{className:"wp-claim-detail-row",children:[(0,ie.jsx)("span",{children:"Est. Tx Fee"}),(0,ie.jsx)("strong",{children:w1(x,f,g)})]}),(0,ie.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ie.jsx)("span",{children:"Priority Fee Per Gas"}),(0,ie.jsx)("strong",{children:fd(E,"Gwei",f)})]}),(0,ie.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ie.jsx)("span",{children:"Max Fee Per Gas"}),(0,ie.jsx)("strong",{children:fd(A,"Gwei",f)})]}),(0,ie.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ie.jsx)("span",{children:"Gas Limit"}),(0,ie.jsx)("strong",{children:fd(F,"",f)})]})]})]})]}),(0,ie.jsxs)("div",{className:"wp-claim-actions","data-count":t==="confirm"||t==="error"?2:1,children:[(t==="confirm"||t==="error")&&(0,ie.jsx)("button",{type:"button",className:"wp-claim-secondary","data-track":"withdraw_cancel",onClick:d,children:t==="error"?"Close":"Cancel"}),(0,ie.jsxs)("button",{type:"button",className:"wp-claim-primary","data-track":"withdraw_confirm",onClick:()=>{if(t==="success"){d();return}C&&N>0n&&p(C,N,x)},disabled:S||(t==="confirm"||t==="error")&&N<=0n,children:[t==="success"&&"Done",t==="submitting"&&(0,ie.jsx)("span",{className:"wp-claim-button-spinner","aria-label":"Waiting"}),t==="error"&&"Try Again",t==="confirm"&&"Withdraw Now"]})]})]}),(0,ie.jsx)("div",{className:"wp-claim-home-indicator","aria-hidden":!0,children:(0,ie.jsx)("span",{})})]})})}var Ht=H(require("react"),1),Nf=require("@tanstack/react-query");var kf=require("@tanstack/react-query");var x1="wp:reward-factory-info";function Cf(e,t=!0){let{data:n,...r}=(0,kf.useQuery)({queryKey:[x1,e],queryFn:async({signal:o})=>{let a=await Be("gameReward",e),i=await fetch(`${a}/v1/factory/info`,{cache:"no-store",signal:o});if(!i.ok)throw new Error(`Factory info fetch failed: ${i.status}`);let s=await i.json();if(s.code!==200)throw new Error(`Factory info API error: ${s.code}`);return s},enabled:t,staleTime:0});return{factoryInfo:n?.data??null,routerAddress:n?.data.router_address??"",...r}}var md="wp:";function Ar(e){return e.invalidateQueries({predicate:t=>typeof t.queryKey[0]=="string"&&t.queryKey[0].startsWith("wp:")})}function Rf(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?e:null}function Sf(e){let{env:t,walletAddress:n,sendTransaction:r,estimateGas:o}=Wt(),a=!!n,i=!!r,s=(0,Nf.useQueryClient)(),{routerAddress:l}=Cf(t,a&&i),d=Rf(l),[p,h]=Ht.useState(!1),[u,g]=Ht.useState(void 0),[x,y]=Ht.useState("confirm"),[f,c]=Ht.useState(),[b,w]=Ht.useState(""),[k,C]=Ht.useState(!1),N=Ht.useRef(void 0);Ht.useEffect(()=>()=>clearTimeout(N.current),[]);let T=Ht.useRef(new Set),R=Ht.useCallback((j,le)=>{T.current.has(j)||(T.current.add(j),Je("withdraw",j,{...le,tags:{section:e,...le?.tags}}))},[e]),S=Ht.useCallback((j,le)=>d?{to:d,value:0n,data:Zu(j,le),chainId:At[t].cross}:null,[t,d]),E=Ht.useCallback(()=>{Ar(s)},[s]),A=Ht.useCallback(j=>{g(j),h(!0),y("confirm"),c(void 0),w(""),C(!1),T.current=new Set,R("opened")},[R]),F=Ht.useCallback(()=>{x!=="submitting"&&(h(!1),g(void 0),y("confirm"),c(void 0),w(""),C(!1),x==="success"&&E())},[x,E]),D=Ht.useCallback(async(j,le)=>{if(!o)return null;let oe=S(j.poolId,le),ne=Rf(n);return!oe||!ne?null:o({...oe,from:ne})},[S,o,n]),G=Ht.useCallback(async()=>{if(!(!f||typeof navigator>"u"||!navigator.clipboard))try{await navigator.clipboard.writeText(f),C(!0),clearTimeout(N.current),N.current=setTimeout(()=>C(!1),1400)}catch{C(!1)}},[f]),M=Ht.useCallback(async(j,le,oe)=>{if(!r){y("error"),w("Withdraw is not available for this wallet.");return}if(!d){y("error"),w("Withdraw contract address is not available.");return}try{y("submitting"),w("");let ne=S(j.poolId,le);if(!ne){y("error"),w("Withdraw contract address is not available.");return}R("submitted");let Q=await r({...ne,gas:oe?.gasLimit&&oe.gasLimit>0n?oe.gasLimit:void 0,maxFeePerGas:oe?.maxFeePerGas&&oe.maxFeePerGas>0n?oe.maxFeePerGas:void 0,maxPriorityFeePerGas:oe?.maxPriorityFeePerGas&&oe.maxPriorityFeePerGas>0n?oe.maxPriorityFeePerGas:void 0});c(Q),y("success"),R("confirmed"),E()}catch(ne){y("error"),w(ya(ne,"Failed to request withdraw.")),R("confirmed",{status:"failure",reason:Nn(ne)})}},[S,E,d,r,R]);return{canWithdrawInline:i,isOpen:p,initialPoolAddress:u,status:x,txHash:f,error:b,copied:k,hasEstimator:!!o,openWithdraw:A,closeWithdraw:F,estimateWithdraw:D,confirmWithdraw:M,copyHash:G,trackFunnelOnce:R}}var ct=require("react/jsx-runtime"),v1="ONEpoints";function If(){let{env:e,walletAddress:t,onOutlink:n}=Wt(),r=Fn(),o=!!t,{getTokenImage:a,getNativeToken:i}=mr(e,o),s=Sf("points"),{positions:l,isLoading:d}=xf(e,t,o),p=Tf.useMemo(()=>l.filter(Ku).map(g=>({...g,icon:a(g.tokenAddress,g.tokenSymbol)})),[l,a]),h=`${Un[e]}/point.png`,u=lf[e];return(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(jn,{sectionKey:"points",title:v1,icon:h,isEmpty:p.length===0,loading:d,children:p.map(g=>{let x=g.price?Gr(g.depositedRaw,g.decimals,g.price,r):null;return(0,ct.jsxs)("article",{className:"wp-item","data-side":"reward",children:[(0,ct.jsxs)("div",{className:"wp-item-body",children:[(0,ct.jsxs)("div",{className:"wp-item-line",children:[(0,ct.jsx)("span",{className:"wp-item-label",children:"Token"}),(0,ct.jsxs)("div",{className:"wp-svc-token",children:[g.icon&&(0,ct.jsx)("img",{className:"wp-svc-token-icon",src:g.icon,alt:""}),(0,ct.jsx)("span",{children:g.tokenSymbol})]})]}),(0,ct.jsxs)("div",{className:"wp-item-line",children:[(0,ct.jsx)("span",{className:"wp-item-label",children:"Deposited"}),(0,ct.jsxs)("div",{className:"wp-svc-token wp-svc-token--amount",children:[g.icon&&(0,ct.jsx)("img",{className:"wp-svc-token-icon",src:g.icon,alt:""}),(0,ct.jsxs)("div",{className:"wp-svc-amount",children:[(0,ct.jsx)("span",{className:"wp-svc-amount-main",children:fr(g.depositedRaw,g.decimals)}),x&&(0,ct.jsx)("span",{className:"wp-item-usd",children:x})]})]})]})]}),(0,ct.jsx)("div",{className:"wp-item-tags",children:s.canWithdrawInline?(0,ct.jsx)("button",{type:"button",className:"wp-tag wp-tag--muted","data-track":"points_withdraw_open",onClick:()=>s.openWithdraw(g.poolAddress),children:(0,ct.jsx)("span",{className:"wp-tag-label",children:"Withdraw"})}):(0,ct.jsxs)("a",{className:"wp-tag wp-tag--muted",href:u,target:"_blank",rel:"noopener noreferrer","data-track":"points_withdraw_open",onClick:y=>jt(y,u,{category:"portfolio",origin:"portfolio-points",payload:{position:g}},n),children:[(0,ct.jsx)("span",{className:"wp-tag-label",children:"Withdraw"}),(0,ct.jsx)(Mn,{size:12,className:"wp-tag-icon"})]})})]},g.poolAddress)})}),(0,ct.jsx)(vf,{open:s.isOpen,status:s.status,positions:p,initialPoolAddress:s.initialPoolAddress,walletAddress:t,txHash:s.txHash,error:s.error,copied:s.copied,estimateWithdraw:s.hasEstimator?s.estimateWithdraw:void 0,onClose:s.closeWithdraw,onConfirm:s.confirmWithdraw,onCopyHash:s.copyHash,trackFunnel:s.trackFunnelOnce,nativeSymbol:i()?.symbol})]})}var hd=H(require("react"),1);var Ef=require("@tanstack/react-query");var k1="wp:stake-info";function Af(e,t,n=!0){let r=n&&!!t,{data:o,...a}=(0,Ef.useQuery)({queryKey:[k1,e,t],queryFn:async({signal:s})=>{let l=await Be("posa",e),d=await fetch(`${l}/stake/${t}`,{cache:"no-store",signal:s});if(!d.ok)throw new Error(`Stake info fetch failed: ${d.status}`);let p=await d.json();if(p.code!==0&&p.code!==200)throw new Error(`Stake info API error: ${p.code}`);return p},enabled:r,staleTime:0});return{stakeInfo:o?.data,...a}}var Mf=require("@tanstack/react-query");var C1="wp:stake-rewards",R1=31;function Lf(e,t,n=!0){let r=n&&!!t,{data:o,...a}=(0,Mf.useQuery)({queryKey:[C1,e,t],queryFn:async({signal:i})=>{let s=await Be("posa",e),l=await fetch(`${s}/rewards/${t}?limit=${R1}`,{cache:"no-store",signal:i});if(!l.ok)throw new Error(`Stake rewards fetch failed: ${l.status}`);let d=await l.json();if(d.code!==0&&d.code!==200)throw new Error(`Stake rewards API error: ${d.code}`);return d.data?.data??[]},enabled:r,staleTime:0});return{latestReward:o?.[0]??null,aprAccrued:Yu(o),...a}}var Df=require("@tanstack/react-query"),N1="wp:staking-onchain";function Pf(e,t,n=!0){let r=n&&!!t&&!!e,{data:o,...a}=(0,Df.useQuery)({queryKey:[N1,e],queryFn:async()=>{if(!t)throw new Error("stakingRewardsReader not provided");return t(e)},enabled:r,staleTime:0});return{onchain:o,...a}}var gd=require("react"),zf=H(require("bignumber.js"),1);function Of(e){return e?.trim().toUpperCase()==="ONE"}function Bf(e){return new zf.default(e||"0").isGreaterThan(0)}function ms(e,t,n=!0){let{allPools:r}=Wo(e,n),o=(0,gd.useMemo)(()=>{for(let d of r)for(let p of[d.deposit_token,...d.reward_tokens])if(Of(p?.symbol)&&Bf(p.price))return p.price},[r]),a=n&&o===void 0,{tokens:i}=Tr(e,t,a),{statsMap:s}=Ir(e,a),l=At[e].cross;return(0,gd.useMemo)(()=>{if(o)return o;let d=i.find(p=>p.chainId===l&&Of(p.symbol));if(d){let p=s.get(ur(d.chainId,d.address));if(p&&Bf(p.price))return p.price}return"0"},[o,i,s,l])}var Mr=H(require("bignumber.js"),1),zt=require("react/jsx-runtime");function S1(e){if(!e)return"\u2014";let t=new Mr.default(e);return t.isFinite()?`${t.toFormat(2,Mr.default.ROUND_DOWN)}%`:"\u2014"}function Ff(){let{env:e,walletAddress:t,onOutlink:n,stakingRewardsReader:r}=Wt(),o=Fn(),a=!!t,{stakeInfo:i,isLoading:s}=Af(e,t,a),{latestReward:l,aprAccrued:d,isLoading:p}=Lf(e,t,a),{onchain:h}=Pf(t,r,a),u=ms(e,t,a),{getNativeToken:g}=mr(e,a),x=g()?.symbol,y="ONEstaking",f=`${Un[e]}/cross-staking.png`,c=cf[e],b=i?.total_stake??"0",w=hd.useMemo(()=>h?new Mr.default(h.earnedWei.toString()).shiftedBy(-18).toString(10):l?.cumulative_earned??i?.rewards_earned??"0",[h,l,i]),k=hd.useMemo(()=>h?new Mr.default(h.stakedWei.toString()).shiftedBy(-18):new Mr.default(b),[h,b]),C=d!==void 0?new Mr.default(d):void 0,N=i?.days_since_first_stake,T=C!==void 0&&C.isFinite()&&k.isGreaterThan(0)&&N!==null&&N!==void 0?C.div(k).times(365).div(Math.max(1,N)).times(100):void 0,R=!(new Mr.default(b).isZero()&&new Mr.default(w).isZero()),S=Gr(b,0,u,o),E=Gr(w,0,u,o);return(0,zt.jsx)(jn,{sectionKey:"staking",title:y,icon:f,iconFit:"contain",isEmpty:!R,loading:s||p,children:(0,zt.jsxs)("article",{className:"wp-item","data-side":"stake",children:[(0,zt.jsxs)("div",{className:"wp-item-body",children:[(0,zt.jsxs)("div",{className:"wp-item-line",children:[(0,zt.jsx)("span",{className:"wp-item-label",children:"Staked"}),(0,zt.jsxs)("div",{className:"wp-svc-amount",children:[(0,zt.jsx)("span",{className:"wp-svc-amount-main",children:`${sd(b)} ${x??""}`.trim()}),S&&(0,zt.jsx)("span",{className:"wp-item-usd",children:S})]})]}),(0,zt.jsxs)("div",{className:"wp-item-line",children:[(0,zt.jsx)("span",{className:"wp-item-label",children:"Rewards Earned"}),(0,zt.jsxs)("div",{className:"wp-svc-amount",children:[(0,zt.jsx)("span",{className:"wp-svc-amount-main",children:`${sd(w)} ${x??""}`.trim()}),E&&(0,zt.jsx)("span",{className:"wp-item-usd",children:E})]})]}),(0,zt.jsxs)("div",{className:"wp-item-line",children:[(0,zt.jsx)("span",{className:"wp-item-label",children:"My APR"}),(0,zt.jsx)("span",{children:S1(T?.toString(10))})]})]}),(0,zt.jsx)("div",{className:"wp-item-tags",children:(0,zt.jsxs)("a",{className:"wp-tag wp-tag--mint",href:c,target:"_blank",rel:"noopener noreferrer","data-track":"stake_outlink",onClick:A=>jt(A,c,{category:"portfolio",origin:"portfolio-stake",payload:{stakeInfo:i}},n),children:[(0,zt.jsx)("span",{className:"wp-tag-label",children:"Manage"}),(0,zt.jsx)(Mn,{size:12,className:"wp-tag-icon"})]})})]})})}var bd=H(require("react"),1);var Uf=require("@tanstack/react-query");var T1="wp:game-swap-pools";function jf(e,t,n=!0){let r=n&&!!t,{data:o,...a}=(0,Uf.useQuery)({queryKey:[T1,e,t],queryFn:async({signal:i})=>{let s=await Be("gameSwap",e),l=await fetch(`${s}/addresses/${t}/portfolio`,{cache:"no-store",signal:i});if(!l.ok)throw new Error(`Game-swap portfolio fetch failed: ${l.status}`);return(await l.json()).pools??[]},enabled:r,staleTime:0});return{pools:o??[],...a}}var Wf=require("@tanstack/react-query");var I1="wp:game-swap-lp-balances";function Gf(e,t,n,r){let o=[...n].map(l=>l.toLowerCase()).sort(),a=!!t&&o.length>0,{data:i,...s}=(0,Wf.useQuery)({queryKey:[I1,e,t,o,!!r],queryFn:async({signal:l})=>{let d=r?await r(o):await wf(e,t,o,l),p={};for(let[h,u]of Object.entries(d))p[h.toLowerCase()]=u;return p},enabled:a,staleTime:0});return{balances:i??{},...s}}var gr=H(require("bignumber.js"),1),Ct=require("react/jsx-runtime"),E1="Gametoken LP",_f=18,A1=new gr.default("0.0001");function Hf(e){return e?.trim().toUpperCase()==="ONE"}function M1(e){return e&&e>0?e:_f}function L1(e){let t=Hf(e.token_a?.symbol)&&!Hf(e.token_b?.symbol),n=t?e.reserve_a:e.reserve_b,r=M1(t?e.token_a?.decimals:e.token_b?.decimals),o=new gr.default(n||"0").shiftedBy(-r);return!o.isFinite()||o.isLessThanOrEqualTo(0)?new gr.default(0):o.times(2)}function D1(e,t,n,r){let o=e.token_a?.symbol?.trim()||"TOKEN",a=e.token_b?.symbol?.trim()||r||"?",i=t?.decimals??_f,s,l;if(t&&t.totalSupply&&t.totalSupply>BigInt(0)){let d=new gr.default(t.balance.toString()),p=new gr.default(t.totalSupply.toString()),h=d.div(p);s=h.times(100);let u=h.times(L1(e));if(u.isGreaterThan(0)){let g=new gr.default(e.quote_usd??e.cross_usd??"0");l=g.isGreaterThan(0)?co(u.times(g),n):`${u.toFormat(4,gr.default.ROUND_DOWN)} ${r??""}`.trim()}}return{pool:e,tokenASymbol:o,tokenBSymbol:a,info:t,lpAmountRaw:t?.balance.toString(),lpDecimals:i,sharePercent:s,valueText:l}}function Vf(){let{env:e,walletAddress:t,onOutlink:n,lpBalanceReader:r}=Wt(),o=Fn(),a=!!t,{pools:i,isLoading:s}=jf(e,t,a),l=bd.useMemo(()=>i.map(c=>c.pair_address).filter(Boolean),[i]),{balances:d,isLoading:p}=Gf(e,t,l,r),{getNativeToken:h}=mr(e,a),u=h()?.symbol,g=`${Un[e]}/game-token.png`,x=Object.keys(d).length>0,y=bd.useMemo(()=>{let c=i.map(b=>D1(b,d[b.pair_address?.toLowerCase()],o,u));return x?c.filter(b=>b.lpAmountRaw?new gr.default(b.lpAmountRaw).shiftedBy(-b.lpDecimals).isGreaterThanOrEqualTo(A1):!1):c},[i,d,x,o,u]),f=c=>{let b=c.token_a?.address??c.pair_address;return`${pf[e]}/gametoken/tokens/${b}?trade=deposit`};return(0,Ct.jsx)(jn,{sectionKey:"gameSwap",title:E1,icon:g,iconFit:"contain",isEmpty:y.length===0,loading:s||p,children:y.map(c=>{let{pool:b}=c,w=f(b),k=`${c.tokenASymbol} / ${c.tokenBSymbol}`,C=b.token_a?.logo_url,N=b.token_b?.logo_url;return(0,Ct.jsxs)("article",{className:"wp-item","data-side":"game-swap",children:[(0,Ct.jsxs)("div",{className:"wp-item-body",children:[(0,Ct.jsxs)("div",{className:"wp-item-line",children:[(0,Ct.jsx)("span",{className:"wp-item-label",children:"Pool"}),(0,Ct.jsxs)("div",{className:"wp-svc-token",children:[(0,Ct.jsxs)("span",{className:"wp-token-stack","aria-hidden":!0,children:[C&&(0,Ct.jsx)("img",{className:"wp-svc-token-icon",src:C,alt:""}),N&&(0,Ct.jsx)("img",{className:"wp-svc-token-icon",src:N,alt:""})]}),(0,Ct.jsx)("span",{children:k})]})]}),c.lpAmountRaw!==void 0&&(0,Ct.jsxs)("div",{className:"wp-item-line",children:[(0,Ct.jsx)("span",{className:"wp-item-label",children:"My LP"}),(0,Ct.jsxs)("span",{children:[fr(c.lpAmountRaw,c.lpDecimals)," LP"]})]}),c.sharePercent!==void 0&&(0,Ct.jsxs)("div",{className:"wp-item-line",children:[(0,Ct.jsx)("span",{className:"wp-item-label",children:"Pool Share"}),(0,Ct.jsxs)("span",{children:[c.sharePercent.toFormat(2,gr.default.ROUND_DOWN),"%"]})]}),c.valueText!==void 0&&(0,Ct.jsxs)("div",{className:"wp-item-line",children:[(0,Ct.jsx)("span",{className:"wp-item-label",children:"Value"}),(0,Ct.jsx)("span",{children:c.valueText})]})]}),(0,Ct.jsx)("div",{className:"wp-item-tags",children:(0,Ct.jsxs)("a",{className:"wp-tag wp-tag--mint",href:w,target:"_blank",rel:"noopener noreferrer","data-track":"gameswap_outlink","data-track-id":k,onClick:T=>jt(T,w,{category:"portfolio",origin:"portfolio-game-swap",payload:{pool:b}},n),children:[(0,Ct.jsx)("span",{className:"wp-tag-label",children:"Manage"}),(0,Ct.jsx)(Mn,{size:12,className:"wp-tag-icon"})]})})]},b.pair_address)})})}var Hr=H(require("bignumber.js"),1),Xf=require("react");var Qf=require("@tanstack/react-query");var P1="wp:forge-pools";function qf(e,t,n=!0){let r=n&&!!t,{data:o,...a}=(0,Qf.useQuery)({queryKey:[P1,e,t],queryFn:async()=>{let s=await Be("bondingCurve",e),l=await fetch(`${s}/v1/users/${t}/pools`,{cache:"no-store"});if(!l.ok)throw new Error(`forge pools fetch failed: ${l.status}`);return(await l.json()).data?.items??[]},enabled:r,staleTime:0}),i=o??[];return{pools:i,isEmpty:i.length===0,...a}}var Yf=require("@tanstack/react-query"),Kf=require("react");var O1="wp:forge-token-detail";async function B1(e,t){let n=await fetch(`${e}/v1/tokens/${t}`,{cache:"no-store"});return n.ok?(await n.json())?.data?.token??null:null}function Zf(e,t,n=!0){let r=(0,Yf.useQueries)({queries:t.map(i=>({queryKey:[O1,e,i],queryFn:async()=>B1(await Be("bondingCurve",e),i),enabled:n&&!!i,staleTime:3e4}))}),o=(0,Kf.useMemo)(()=>{let i=new Map;for(let s=0;s<r.length;s++){let l=r[s]?.data,d=t[s];l&&d&&i.set(d.toLowerCase(),l)}return i},[r,t]),a=r.some(i=>i.isLoading);return{detailMap:o,isLoading:a}}var St=require("react/jsx-runtime"),z1="ONEforge",Jf=18,F1="https://contents.crosstoken.io/wallet/token/images/FT.png";function U1(e){if(!e||e==="0")return"0";let t=new Hr.default(e).shiftedBy(-Jf);return t.isZero()?"0":t.isGreaterThanOrEqualTo(1)?t.toFormat(2,Hr.default.ROUND_DOWN):t.toFormat(4,Hr.default.ROUND_DOWN)}function j1(e){let t=Number(e);return!Number.isFinite(t)||t<=0?"0%":t>=1?`${(Math.floor(t*100)/100).toFixed(2)}%`:`${(Math.floor(t*1e4)/1e4).toFixed(4)}%`}function W1(e,t,n,r){let o=new Hr.default(n||"0");if(!o.isGreaterThan(0))return null;let a=new Hr.default(e.total_supply||"0"),i=new Hr.default(e.lp_balance||"0"),s=new Hr.default(t?.reserve_b||"0").shiftedBy(-Jf);if(!a.isGreaterThan(0)||!i.isGreaterThan(0)||!s.isGreaterThan(0))return null;let l=s.times(2),p=i.div(a).times(l).times(o);return p.isFinite()?co(p,r):null}function $f(){let{env:e,walletAddress:t,onOutlink:n}=Wt(),r=Fn(),o=!!t,{pools:a,isEmpty:i,isLoading:s}=qf(e,t,o),l=(0,Xf.useMemo)(()=>a.map(g=>g.token.address),[a]),{detailMap:d}=Zf(e,l,o&&l.length>0),p=ms(e,t,o),h=g=>`${df[e]}/forge/token/${g.token.address}`,u=`${Un[e]}/forge.png`;return(0,St.jsx)(jn,{sectionKey:"forge",title:z1,icon:u,iconFit:"contain",isEmpty:i,loading:s,children:a.map(g=>{let x=d.get(g.token.address.toLowerCase()),y=x?.image_url||x?.image||g.token.image||F1,f=x?.symbol||g.token.symbol,c=h(g),b=W1(g,x,p,r);return(0,St.jsxs)("a",{className:"wp-item","data-side":"lp",href:c,target:"_blank",rel:"noopener noreferrer","data-track":"forge_outlink","data-track-id":f,onClick:w=>jt(w,c,{category:"portfolio",origin:"portfolio-forge",payload:{pool:g,tokenDetail:x}},n),children:[(0,St.jsxs)("div",{className:"wp-item-body",children:[(0,St.jsxs)("div",{className:"wp-item-line",children:[(0,St.jsx)("span",{className:"wp-item-label",children:"Asset"}),(0,St.jsxs)("div",{className:"wp-svc-token",children:[(0,St.jsx)("img",{className:"wp-svc-token-icon",src:y,alt:""}),(0,St.jsx)("span",{children:f}),x?.name&&(0,St.jsx)("span",{className:"wp-token-subtle",children:x.name})]})]}),(0,St.jsxs)("div",{className:"wp-item-line",children:[(0,St.jsx)("span",{className:"wp-item-label",children:"LP Balance"}),(0,St.jsx)("div",{className:"wp-svc-token wp-svc-token--amount",children:(0,St.jsxs)("div",{className:"wp-svc-amount",children:[(0,St.jsx)("span",{className:"wp-svc-amount-main",children:U1(g.lp_balance)}),b&&(0,St.jsx)("span",{className:"wp-item-usd",children:b})]})})]}),(0,St.jsxs)("div",{className:"wp-item-line",children:[(0,St.jsx)("span",{className:"wp-item-label",children:"Ownership"}),(0,St.jsx)("span",{className:"wp-line-value",children:j1(g.pool_ownership)})]})]}),(0,St.jsx)("div",{className:"wp-item-tags",children:(0,St.jsxs)("span",{className:"wp-tag wp-tag--muted",children:[(0,St.jsx)("span",{className:"wp-tag-label",children:"Withdraw"}),(0,St.jsx)(Mn,{size:12,className:"wp-tag-icon"})]})})]},g.pair_address)})})}var vd=require("react"),hm=H(require("bignumber.js"),1);var em=require("@tanstack/react-query");var G1="wp:crossd-positions";function H1(e){let t=e??{};return(t.positions??t.data?.positions??[]).filter(r=>{if(!r?.token_id||!r.liquidity)return!1;try{return BigInt(r.liquidity)>0n}catch{return!1}})}function tm(e,t,n=!0){let r=n&&!!t,{data:o,...a}=(0,em.useQuery)({queryKey:[G1,e,t],queryFn:async()=>{let s=await fetch(`${us[e]}/api/v1/positions?owner=${t}`,{cache:"no-store"});if(!s.ok)throw new Error(`crossd positions fetch failed: ${s.status}`);return H1(await s.json())},enabled:r,staleTime:0}),i=o??[];return{positions:i,isEmpty:i.length===0,...a}}var nm=require("@tanstack/react-query"),rm=require("react");var _1="wp:crossd-position-details";function V1(e){let t=e??{},n=t.data??t;return n?.token_id||n?.pool?n:null}function om(e,t,n=!0){let r=(0,nm.useQueries)({queries:t.map(a=>({queryKey:[_1,e,a],queryFn:async()=>{let i=await fetch(`${us[e]}/api/v1/positions/${a}`,{cache:"no-store"});if(!i.ok)throw new Error(`crossd position detail failed: ${i.status}`);return V1(await i.json())},enabled:n&&!!a,staleTime:6e4}))});return{detailMap:(0,rm.useMemo)(()=>{let a=new Map;return r.forEach((i,s)=>{let l=i.data,d=t[s];l&&d&&a.set(d,l)}),a},[r,t])}}var Lr=H(require("react"),1);var ce=require("react/jsx-runtime"),Q1=300*1e3,am="https://contents.crosstoken.io/wallet/token/images/Cross.svg";function q1(e,t,n){if(t)return"Estimating...";if(!e)return"Wallet estimate";let r=e.maxFeePerGas??e.gasPrice;return!r||r<=0n||e.gasLimit<=0n?"Wallet estimate":`${is(e.gasLimit*r)} ${n??""}`.trim()}function wd(e,t,n){return n?"Estimating...":`${e} ${t}`.trim()}function im({open:e,status:t,target:n,token0Icon:r,token1Icon:o,token0Symbol:a,token1Symbol:i,nativeSymbol:s,txHash:l,error:d,copied:p=!1,hasEstimator:h,prepareWithdraw:u,confirmWithdraw:g,onClose:x,onCopyHash:y,trackFunnel:f}){let[c,b]=Lr.useState(null),[w,k]=Lr.useState(null),C=Lr.useRef(0);Lr.useEffect(()=>{if(!e||!n)return;let Z=++C.current;b(null),k(null),f?.("dialog_opened"),u().then(pe=>{C.current===Z&&(b(pe),k(pe?Date.now():null))})},[e,n]);let N=t==="submitting",T=t==="estimating"||t==="confirm"&&!c,R=Lr.useCallback(async()=>{let Z=c,pe=!w||Date.now()-w>Q1;if(!Z||pe){let Se=++C.current;if(Z=await u(),C.current!==Se)return;b(Z),k(Z?Date.now():null)}Z&&await g(Z)},[c,w,u,g]);if(!e||!n)return null;let{position:S,detail:E}=n,A=E.pool?.token0,F=E.pool?.token1,D=a||A?.symbol||S.pool?.token0_symbol||"?",G=i||F?.symbol||S.pool?.token1_symbol||"?",M=A?.decimals??18,j=F?.decimals??18,le=r||A?.logo_url||am,oe=o||F?.logo_url||am,ne=`${D}/${G}`,Q=c?zo(c.expectedAmount0.toString(),M):null,ee=c?zo(c.expectedAmount1.toString(),j):null,z=Uo(c?.estimate?.maxPriorityFeePerGas),q=Uo(c?.estimate?.maxFeePerGas??c?.estimate?.gasPrice),ae=as(c?.estimate?.gasLimit);return(0,ce.jsx)("div",{className:"wp-claim-overlay",role:"presentation",onMouseDown:Z=>{Z.target===Z.currentTarget&&!N&&x()},children:(0,ce.jsxs)("section",{className:"wp-claim-sheet",role:"dialog","aria-modal":"true","aria-labelledby":"wp-crossd-withdraw-title","aria-label":"Withdraw position","data-status":t,"data-vaul-no-drag":!0,children:[(0,ce.jsx)("div",{className:"wp-claim-grabber","aria-hidden":!0,children:(0,ce.jsx)("span",{})}),(0,ce.jsxs)("div",{className:"wp-claim-content wp-withdraw-content",children:[t==="success"&&l?(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)("span",{className:"wp-claim-icon wp-claim-icon--success","aria-hidden":!0,children:(0,ce.jsx)(cs,{})}),(0,ce.jsxs)("div",{className:"wp-claim-copy",children:[(0,ce.jsx)("h3",{id:"wp-crossd-withdraw-title",className:"wp-claim-title",children:"Withdraw Submitted!"}),(0,ce.jsxs)("p",{className:"wp-claim-desc",children:["Your ",ne," position withdrawal has been submitted. Balances will update shortly after the transaction settles."]})]}),(0,ce.jsx)("div",{className:"wp-claim-list","aria-label":"Withdraw transaction",children:(0,ce.jsxs)("div",{className:"wp-claim-list-item",children:[(0,ce.jsx)("span",{children:"Tx Hash"}),(0,ce.jsxs)("button",{type:"button",className:"wp-claim-hash",onClick:y,"aria-label":"Copy transaction hash","data-track":"crossd_withdraw_hash_copy",children:[(0,ce.jsx)("strong",{children:os(l)}),p?(0,ce.jsx)(ds,{}):(0,ce.jsx)(ls,{})]})]})})]}):(0,ce.jsxs)(ce.Fragment,{children:[t==="error"&&(0,ce.jsxs)("div",{className:"wp-claim-heading",children:[(0,ce.jsx)("h3",{id:"wp-crossd-withdraw-title",className:"wp-claim-title",children:"Withdraw Failed"}),(0,ce.jsx)("p",{className:"wp-claim-error-message",children:d||"The withdraw request could not be completed."})]}),(0,ce.jsxs)("div",{className:"wp-claim-reward-card","data-fit":wa(D,Q??""),"aria-label":`Expected ${D}`,children:[(0,ce.jsx)("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:(0,ce.jsx)("img",{src:le,alt:"",width:28,height:28})}),(0,ce.jsx)("strong",{className:"wp-claim-reward-symbol",children:D}),(0,ce.jsx)("strong",{className:"wp-claim-reward-amount",children:Q??"Estimating..."})]}),(0,ce.jsxs)("div",{className:"wp-claim-reward-card","data-fit":wa(G,ee??""),"aria-label":`Expected ${G}`,children:[(0,ce.jsx)("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:(0,ce.jsx)("img",{src:oe,alt:"",width:28,height:28})}),(0,ce.jsx)("strong",{className:"wp-claim-reward-symbol",children:G}),(0,ce.jsx)("strong",{className:"wp-claim-reward-amount",children:ee??"Estimating..."})]}),h&&(0,ce.jsx)("div",{className:"wp-claim-account-card","aria-label":"Withdraw gas fee",children:(0,ce.jsxs)("div",{className:"wp-claim-detail-list",children:[(0,ce.jsxs)("div",{className:"wp-claim-detail-row",children:[(0,ce.jsx)("span",{children:"Est. Tx Fee"}),(0,ce.jsx)("strong",{children:q1(c?.estimate,T,s)})]}),(0,ce.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ce.jsx)("span",{children:"Priority Fee Per Gas"}),(0,ce.jsx)("strong",{children:wd(z,"Gwei",T)})]}),(0,ce.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ce.jsx)("span",{children:"Max Fee Per Gas"}),(0,ce.jsx)("strong",{children:wd(q,"Gwei",T)})]}),(0,ce.jsxs)("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[(0,ce.jsx)("span",{children:"Gas Limit"}),(0,ce.jsx)("strong",{children:wd(ae,"",T)})]})]})})]}),(0,ce.jsxs)("div",{className:"wp-claim-actions","data-count":t==="confirm"||t==="error"?2:1,children:[(t==="confirm"||t==="error")&&(0,ce.jsx)("button",{type:"button",className:"wp-claim-secondary","data-track":"crossd_withdraw_cancel",onClick:x,children:t==="error"?"Close":"Cancel"}),(0,ce.jsx)("button",{type:"button",className:"wp-claim-primary","data-track":"crossd_withdraw_confirm",onClick:()=>{if(t==="success"){x();return}N||T||(f?.("confirm_clicked"),R())},disabled:N||T,children:t==="success"?"Done":N?(0,ce.jsx)("span",{className:"wp-claim-button-spinner","aria-label":"Waiting"}):T?(0,ce.jsx)("span",{className:"wp-claim-button-spinner","aria-label":"Estimating"}):t==="error"?"Retry":"Withdraw"})]})]}),(0,ce.jsx)("div",{className:"wp-claim-home-indicator","aria-hidden":!0,children:(0,ce.jsx)("span",{})})]})})}var Lt=H(require("react"),1),fm=require("@tanstack/react-query");var Y1="0x0c49ccbe",K1="0xfc6f7865",Z1="0x49404b7c",X1="0xdf2ab5bb",J1="0xac9650d8",sm=(1n<<128n)-1n,dm=600n,$1=99n,ey=100n;function yd(e){return e*$1/ey}function lm(e,t){return!!e&&!!t&&e.toLowerCase()===t.toLowerCase()}function Sn(e,t){if(e<0n)throw new Error(`${t} must be non-negative`);let n=e.toString(16);if(n.length>64)throw new Error(`${t} exceeds uint256`);return n.padStart(64,"0")}function gs(e,t){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`${t} is not a valid address`);return e.toLowerCase().replace(/^0x/,"").padStart(64,"0")}function xd(e){return Y1+Sn(e.tokenId,"tokenId")+Sn(e.liquidity,"liquidity")+Sn(e.amount0Min,"amount0Min")+Sn(e.amount1Min,"amount1Min")+Sn(e.deadline,"deadline")}function ty(e){return K1+Sn(e.tokenId,"tokenId")+gs(e.recipient,"recipient")+Sn(e.amount0Max,"amount0Max")+Sn(e.amount1Max,"amount1Max")}function ny(e,t){return Z1+Sn(e,"amountMinimum")+gs(t,"recipient")}function ry(e,t,n){return X1+gs(e,"token")+Sn(t,"amountMinimum")+gs(n,"recipient")}function oy(e){if(e.length===0)throw new Error("multicall requires at least one call");let t=e.map(o=>{let a=o.replace(/^0x/,"");if(a.length%2!==0||!/^[0-9a-fA-F]*$/.test(a))throw new Error("multicall element must be valid hex bytes");let i=a.length%64===0?a:a.padEnd(a.length+(64-a.length%64),"0");return Sn(BigInt(a.length/2),"callLength")+i.toLowerCase()}),n=BigInt(e.length)*32n,r=[];for(let o of t)r.push(Sn(n,"callOffset")),n+=BigInt(o.length/2);return J1+Sn(0x20n,"arrayOffset")+Sn(BigInt(e.length),"arrayLength")+r.join("")+t.join("")}function cm(e){if(!e||e==="0x")return null;let t=e.replace(/^0x/,"");return t.length<128||!/^[0-9a-fA-F]+$/.test(t)?null:{amount0:BigInt(`0x${t.slice(0,64)}`),amount1:BigInt(`0x${t.slice(64,128)}`)}}function pm(e){let t=lm(e.token0,e.wcrossAddress),n=lm(e.token1,e.wcrossAddress),r=t||n,o=[xd({tokenId:e.tokenId,liquidity:e.liquidity,amount0Min:e.amount0Min,amount1Min:e.amount1Min,deadline:e.deadline}),ty({tokenId:e.tokenId,recipient:r?e.positionManagerAddress:e.owner,amount0Max:sm,amount1Max:sm})];return r&&(o.push(ny(0n,e.owner)),o.push(ry(t?e.token1:e.token0,0n,e.owner))),oy(o)}async function um(e,t,n){let r;try{r=await Ca(e,n)}catch{r=void 0}if(!r)return null;let o=xd({tokenId:t.tokenId,liquidity:t.liquidity,amount0Min:0n,amount1Min:0n,deadline:t.deadline}),a=await Er(r,t.positionManager,o,n,t.owner);return cm(a)}var ay=[1500,3e3,4500,6e3];function iy(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?e:null}function mm(){let{env:e,walletAddress:t,sendTransaction:n,estimateGas:r}=Wt(),o=!!n,a=(0,fm.useQueryClient)(),[i,s]=Lt.useState(!1),[l,d]=Lt.useState(null),[p,h]=Lt.useState("confirm"),[u,g]=Lt.useState(),[x,y]=Lt.useState(""),[f,c]=Lt.useState(!1),[b,w]=Lt.useState(new Set),k=Lt.useRef(void 0),C=Lt.useRef([]),N=Lt.useRef(0);Lt.useEffect(()=>()=>{clearTimeout(k.current),C.current.forEach(clearTimeout)},[]);let T=Lt.useRef(new Set),R=Lt.useCallback((M,j)=>{T.current.has(M)||(T.current.add(M),Je("withdraw",M,{...j,tags:{section:"crossdPool",...j?.tags}}))},[]),S=Lt.useCallback(()=>{let M=()=>Ar(a);M(),C.current.forEach(clearTimeout),C.current=ay.map(j=>setTimeout(M,j))},[a]),E=Lt.useCallback(M=>{N.current+=1,d(M),s(!0),h("confirm"),g(void 0),y(""),c(!1),T.current=new Set,R("opened")},[R]),A=Lt.useCallback(()=>{p!=="submitting"&&(N.current+=1,s(!1),d(null),h("confirm"),g(void 0),y(""),c(!1))},[p]),F=Lt.useCallback(async()=>{let M=N.current,j=iy(t),le=l?.position.token_id,oe=l?.position.liquidity,ne=l?.detail.pool?.token0?.address,Q=l?.detail.pool?.token1?.address;if(!j||!le||!oe||!ne||!Q)return h("error"),y("Position data is incomplete. Please refresh and retry."),null;try{h("estimating"),y("");let ee=BigInt(le),z=BigInt(oe),q=BigInt(Math.floor(Date.now()/1e3))+dm,ae=ff[e],Z=await um(e,{owner:j,positionManager:ae,tokenId:ee,liquidity:z,deadline:q});if(N.current!==M)return null;if(!Z)return h("error"),y("Failed to estimate withdrawal amounts. Please retry."),null;let pe=pm({tokenId:ee,liquidity:z,amount0Min:yd(Z.amount0),amount1Min:yd(Z.amount1),deadline:q,owner:j,positionManagerAddress:ae,token0:ne,token1:Q,wcrossAddress:mf[e]}),Se={to:ae,value:0n,data:pe,chainId:At[e].cross},Ue=null;if(r){try{Ue=await r({...Se,from:j})}catch{Ue=null}if(N.current!==M)return null}return h("confirm"),{tx:Se,estimate:Ue,expectedAmount0:Z.amount0,expectedAmount1:Z.amount1}}catch(ee){return N.current!==M||(h("error"),y(ya(ee,"Failed to prepare withdraw."))),null}},[e,r,l,t]),D=Lt.useCallback(async M=>{if(!n){h("error"),y("Withdraw is not available for this wallet.");return}try{h("submitting"),y(""),R("submitted");let j=await n({...M.tx,gas:M.estimate?.gasLimit&&M.estimate.gasLimit>0n?M.estimate.gasLimit:void 0,maxFeePerGas:M.estimate?.maxFeePerGas&&M.estimate.maxFeePerGas>0n?M.estimate.maxFeePerGas:void 0,maxPriorityFeePerGas:M.estimate?.maxPriorityFeePerGas&&M.estimate.maxPriorityFeePerGas>0n?M.estimate.maxPriorityFeePerGas:void 0});g(j),h("success");let le=l?.position.token_id;le&&w(oe=>{let ne=new Set(oe);return ne.add(le),ne}),R("confirmed"),S()}catch(j){h("error"),y(ya(j,"Failed to request withdraw.")),R("confirmed",{status:"failure",reason:Nn(j)})}},[S,n,l,R]),G=Lt.useCallback(async()=>{if(!(!u||typeof navigator>"u"||!navigator.clipboard))try{await navigator.clipboard.writeText(u),c(!0),clearTimeout(k.current),k.current=setTimeout(()=>c(!1),1400)}catch{c(!1)}},[u]);return{canWithdrawInline:o,isOpen:i,target:l,withdrawnTokenIds:b,status:p,txHash:u,error:x,copied:f,hasEstimator:!!r,openWithdraw:E,closeWithdraw:A,prepareWithdraw:F,confirmWithdraw:D,copyHash:G,trackFunnelOnce:R}}var gt=require("react/jsx-runtime"),sy="ONEusd Pool",gm="https://contents.crosstoken.io/wallet/token/images/Cross.svg";function bm(){let{env:e,walletAddress:t,onOutlink:n}=Wt(),r=Fn(),o=!!t,{positions:a,isLoading:i}=tm(e,t,o),s=mm(),l=(0,vd.useMemo)(()=>a.filter(R=>!R.token_id||!s.withdrawnTokenIds.has(R.token_id)),[a,s.withdrawnTokenIds]),d=(0,vd.useMemo)(()=>l.map(R=>R.token_id).filter(R=>!!R),[l]),{detailMap:p}=om(e,d,o&&d.length>0),h=`${uf[e]}/pool`,{getTokenImage:u,getTokenSymbol:g,getNativeToken:x}=mr(e,o),y=u("","ONEUSD",{chainOnly:!0})||`${Un[e]}/crossd.png`,f={chainOnly:!0},c=(R,S)=>{let E=id(g(R?.address??"",R?.symbol??S,f));return E==="ONE"?x()?.symbol??"?":E??"?"},b=(R,S)=>{let E=R?.symbol??S,A=id(E);return A==="ONE"?x()?.image||gm:u(R?.address??"",A,f)||R?.logo_url||gm},w=s.target?.detail.pool,k=b(w?.token0,s.target?.position.pool?.token0_symbol),C=b(w?.token1,s.target?.position.pool?.token1_symbol),N=c(w?.token0,s.target?.position.pool?.token0_symbol),T=c(w?.token1,s.target?.position.pool?.token1_symbol);return(0,gt.jsxs)(gt.Fragment,{children:[(0,gt.jsx)(jn,{sectionKey:"crossdPool",title:sy,icon:y,iconFit:"contain",isEmpty:l.length===0,loading:i,children:l.map(R=>{let S=R.token_id?p.get(R.token_id):void 0,E=`${c(S?.pool?.token0,R.pool?.token0_symbol)}/${c(S?.pool?.token1,R.pool?.token1_symbol)}`,A=R.pool?.fee_tier_percentage,F=b(S?.pool?.token0,R.pool?.token0_symbol),D=b(S?.pool?.token1,R.pool?.token1_symbol),G=co(new hm.default(R.position_value_usd??"0"),r),M=s.canWithdrawInline&&!!S?.pool?.token0?.address&&!!S?.pool?.token1?.address;return(0,gt.jsxs)("article",{className:"wp-item","data-side":"crossd",children:[(0,gt.jsxs)("div",{className:"wp-item-body",children:[(0,gt.jsxs)("div",{className:"wp-item-line",children:[(0,gt.jsx)("span",{className:"wp-item-label",children:"Pool"}),(0,gt.jsxs)("div",{className:"wp-svc-token",children:[(0,gt.jsxs)("span",{className:"wp-token-stack","aria-hidden":!0,children:[(0,gt.jsx)("img",{className:"wp-svc-token-icon",src:F,alt:""}),(0,gt.jsx)("img",{className:"wp-svc-token-icon",src:D,alt:""})]}),(0,gt.jsx)("span",{children:E}),A&&(0,gt.jsx)("span",{className:"wp-token-subtle",children:A})]})]}),(0,gt.jsxs)("div",{className:"wp-item-line",children:[(0,gt.jsx)("span",{className:"wp-item-label",children:"Position Value"}),(0,gt.jsx)("span",{className:"wp-line-value",children:G})]})]}),(0,gt.jsx)("div",{className:"wp-item-tags",children:M?(0,gt.jsx)("button",{type:"button",className:"wp-tag wp-tag--muted","data-track":"crossd_pool_withdraw_open","data-track-id":E,onClick:()=>{S&&s.openWithdraw({position:R,detail:S})},children:(0,gt.jsx)("span",{className:"wp-tag-label",children:"Withdraw"})}):(0,gt.jsxs)("a",{className:"wp-tag wp-tag--muted",href:h,target:"_blank",rel:"noopener noreferrer","data-track":"crossd_pool_outlink","data-track-id":E,onClick:j=>jt(j,h,{category:"portfolio",origin:"portfolio-crossd-pool",payload:{position:R,detail:S}},n),children:[(0,gt.jsx)("span",{className:"wp-tag-label",children:"Withdraw"}),(0,gt.jsx)(Mn,{size:12,className:"wp-tag-icon"})]})})]},R.token_id)})}),(0,gt.jsx)(im,{open:s.isOpen,status:s.status,target:s.target,token0Icon:k,token1Icon:C,token0Symbol:N,token1Symbol:T,nativeSymbol:x()?.symbol,txHash:s.txHash,error:s.error,copied:s.copied,hasEstimator:s.hasEstimator,prepareWithdraw:s.prepareWithdraw,confirmWithdraw:s.confirmWithdraw,onClose:s.closeWithdraw,onCopyHash:s.copyHash,trackFunnel:s.trackFunnelOnce})]})}var Na=["rewards","points","staking","gameSwap","forge","crossdPool"];he(`.wp-fullscreen[data-theme=dark],.wp-embed[data-theme=dark]{--wp-bg: var(--ds-bg-dim, #191d27);--wp-header-bg: var(--ds-surface-default, #252b39);--wp-card: var(--ds-surface-default, #1e232e);--wp-control: #292f40;--wp-border: var(--ds-border-default, #292f40);--wp-panel-border: var(--ds-border-medium, rgba(255, 255, 255, .18));--wp-panel-shadow: 0px 4px 30px -1px rgba(0, 0, 0, .28);--wp-text: var(--ds-content-highest, #ffffff);--wp-text-60: var(--ds-content-high, rgba(255, 255, 255, .85));--wp-text-40: var(--ds-content-medium, rgba(255, 255, 255, .65));--wp-text-30: var(--ds-content-low, rgba(255, 255, 255, .4));--wp-chrome-text: #ffffff;--wp-tooltip-bg: #151a23;--wp-tooltip-text: #ffffff;--wp-mint: var(--ds-accent-primary-high, #a392ff);--wp-green: var(--ds-system-green-high, #00a0a2);--wp-accent-soft: var(--ds-accent-primary-low, #2e2854);--wp-red: var(--ds-system-red-default, #e70077);--wp-blue: #0488fc;--wp-purple: #7346f3;--wp-orange: #ff9d00;--wp-claim-primary: #ed0a72;--wp-claim-primary-text: #ffffff;--wp-claim-secondary-bg: var(--wp-control);--wp-claim-success: #00d4aa;--wp-claim-success-soft: rgba(0, 212, 170, .18);--wp-claim-error: #ff3aa3;--wp-claim-error-soft: rgba(255, 58, 163, .16)}.wp-fullscreen[data-theme=light],.wp-embed[data-theme=light]{--wp-bg: var(--ds-bg-dim, #f5f7fa);--wp-header-bg: var(--ds-surface-default, #ffffff);--wp-card: var(--ds-surface-default, #ffffff);--wp-control: var(--ds-surface-medium, #f5f7fa);--wp-border: var(--ds-border-default, rgba(0, 0, 0, .07));--wp-panel-border: var(--ds-border-medium, rgba(0, 0, 0, .18));--wp-panel-shadow: 0px 4px 30px -1px rgba(0, 0, 0, .15);--wp-text: var(--ds-content-highest, #000000);--wp-text-60: var(--ds-content-high, rgba(0, 0, 0, .85));--wp-text-40: var(--ds-content-medium, rgba(0, 0, 0, .65));--wp-text-30: var(--ds-content-low, rgba(0, 0, 0, .4));--wp-chrome-text: var(--ds-content-high, rgba(0, 0, 0, .85));--wp-card-shadow: none;--wp-tooltip-bg: #192023;--wp-tooltip-text: #ffffff;--wp-mint: var(--ds-accent-primary-high, #7346f3);--wp-green: var(--ds-system-green-high, #00a0a2);--wp-accent-soft: var(--ds-accent-primary-low, #f5f3ff);--wp-red: var(--ds-system-red-default, #e70077);--wp-blue: #0488fc;--wp-purple: #7346f3;--wp-orange: #ff9d00;--wp-claim-primary: #ed0a72;--wp-claim-primary-text: #ffffff;--wp-claim-secondary-bg: #ffffff;--wp-claim-success: #019d92;--wp-claim-success-soft: rgba(1, 157, 146, .15);--wp-claim-error: #e70077;--wp-claim-error-soft: rgba(231, 0, 119, .12)}.wp-fullscreen{position:fixed!important;inset:0!important;width:100%!important;height:100dvh!important;max-height:100dvh!important;z-index:50;background:var(--wp-bg);display:flex;flex-direction:column;overflow:hidden;font-family:inherit;font-feature-settings:"calt" 0,"lnum" 1,"pnum" 1;box-sizing:border-box;-webkit-font-smoothing:antialiased;color:var(--wp-chrome-text)}.wp-embed{width:100%;height:100%;min-height:0;background:var(--wp-bg);display:flex;flex-direction:column;overflow:hidden;position:relative;font-family:inherit;font-feature-settings:"calt" 0,"lnum" 1,"pnum" 1;box-sizing:border-box;-webkit-font-smoothing:antialiased;color:var(--wp-chrome-text)}.wp-overlay{position:fixed;inset:0;z-index:49;background:#0009}.wp-header{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:73px;padding:24px;position:relative;border-bottom:1px solid var(--wp-border);background:var(--wp-header-bg);color:var(--wp-chrome-text);flex-shrink:0;box-sizing:border-box}.wp-fullscreen .wp-header{height:60px;min-height:60px;padding:11px 20px;border-bottom:none;background:transparent}.wp-fullscreen .wp-header-btn{width:22px;height:22px;color:var(--wp-chrome-text)}.wp-fullscreen .wp-header-btn:hover{color:var(--wp-chrome-text)}.wp-header-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--ds-content-low, rgba(0, 0, 0, .4));flex-shrink:0;transition:color .15s ease}.wp-header-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wp-header-edge{display:flex;align-items:center;width:24px;min-width:24px}.wp-header-edge--right{justify-content:flex-end}.wp-header-edge--right .wp-header-btn{position:absolute;top:24px;right:24px}.wp-header-spacer{display:block;width:24px;height:24px}.wp-header-avatar{width:38px;height:38px;flex-shrink:0;border-radius:50%;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;background:var(--wp-header-avatar-bg)}.wp-header-avatar-img{width:30px;height:30px;object-fit:cover;display:block}.wp-fullscreen[data-theme=dark] .wp-header-avatar,.wp-embed[data-theme=dark] .wp-header-avatar{--wp-header-avatar-bg: hsl(221.3 24.6% 25.5%)}.wp-fullscreen[data-theme=light] .wp-header-avatar,.wp-embed[data-theme=light] .wp-header-avatar{--wp-header-avatar-bg: rgba(18, 18, 18, .1)}.wp-refresh-btn{position:relative}.wp-refresh-badge{position:absolute;top:-6px;right:-8px;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--wp-mint);color:var(--ds-accent-primary-on, #ffffff);font-size:10px;font-weight:600;line-height:16px;text-align:center}.wp-spin-once{animation:wp-spin-once .6s ease-in-out}@keyframes wp-spin-once{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.wp-header-title{flex:1;font-family:inherit;font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;text-align:center;color:var(--ds-content-highest, #000000);margin:0}.wp-header-account{flex:1;display:flex;align-items:center;gap:12px;min-width:0}.wp-header-account-meta{display:flex;flex-direction:column;justify-content:center;min-width:0;gap:2px}.wp-header-wallet-name{min-width:0;font-family:inherit;font-size:15px;font-weight:600;line-height:1.4;letter-spacing:0;color:var(--wp-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-header-address-btn{display:inline-flex;align-items:center;gap:4px;align-self:flex-start;max-width:100%;padding:0;border:0;background:transparent;cursor:pointer;font:inherit}.wp-header-address{min-width:0;font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;color:var(--wp-text-40);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-header-address-copy{display:inline-flex;align-items:center;flex-shrink:0;color:var(--wp-text-40);transition:color .15s ease}.wp-header-address-btn:hover .wp-header-address-copy{color:var(--wp-text-60)}.wp-header-address-copy[data-copied=true]{color:var(--wp-mint)}.wp-top{flex-shrink:0;padding:0 16px 16px;display:flex;flex-direction:column;gap:16px}.wp-identity{display:flex;flex-direction:column;gap:8px}.wp-address{display:inline-flex;align-items:center;gap:8px}.wp-address-label{font-size:12px;font-weight:400;line-height:1.4;color:var(--wp-text-40)}.wp-address-chevron{display:inline-flex;align-items:center;color:var(--wp-text-40)}.wp-total{font-size:28px;font-weight:600;line-height:1.3;color:var(--wp-text);margin:0}.wp-asset{display:flex;flex-direction:column;gap:8px}.wp-asset-head{display:flex;align-items:center;gap:4px}.wp-asset-head-label{font-size:12px;font-weight:400;line-height:1.4;color:var(--wp-text-40)}.wp-asset-head-icon{display:inline-flex;color:var(--wp-text-40)}.wp-bar{display:flex;height:20px;border-radius:4px;overflow:hidden}.wp-bar-seg{display:flex;align-items:center;justify-content:center;min-width:8px}.wp-bar-seg-pct{font-size:10px;font-weight:400;line-height:1.3;color:#fff;white-space:nowrap}.wp-legend{display:flex;align-items:center;justify-content:center;gap:16px;flex-wrap:wrap}.wp-legend-item{display:flex;align-items:center;gap:4px}.wp-legend-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.wp-legend-label{font-size:12px;font-weight:400;line-height:1.4;color:var(--wp-text-40)}.wp-tabs{flex-shrink:0;padding:8px 16px}.wp-tabs-inner{display:flex;align-items:center;padding:0 2px}.wp-tabs-list{display:flex;gap:20px;flex:1}.wp-tab{display:flex;flex-direction:column;align-items:center;justify-content:space-between;height:44px;padding-top:12px;background:transparent;border:none;cursor:pointer}.wp-tab-text{font-size:14px;font-weight:600;line-height:1.4;color:var(--wp-text-30);white-space:nowrap}.wp-tab[data-active=true] .wp-tab-text{color:var(--wp-mint)}.wp-tab-bar{width:20px;height:4px;border-radius:2px;background:var(--wp-mint);opacity:0}.wp-tab[data-active=true] .wp-tab-bar{opacity:1}.wp-tabs-filter-wrap{position:relative;display:flex;align-items:center;width:44px;height:44px;flex-shrink:0}.wp-tabs-filter-grad{position:absolute;inset:0;background:linear-gradient(to left,var(--wp-bg) 74%,transparent);pointer-events:none}.wp-tabs-filter{position:relative;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--wp-text-40)}.wp-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--wp-border) transparent}.wp-body::-webkit-scrollbar{width:4px}.wp-body::-webkit-scrollbar-track{background:transparent}.wp-body::-webkit-scrollbar-thumb{background:var(--wp-border);border-radius:4px}.wp-body-inner{padding:16px 16px 32px;display:flex;flex-direction:column;gap:32px}.wp-fullscreen .wp-body-inner{padding-top:8px;gap:24px}.wp-summary-card{display:flex;flex-direction:column;gap:8px;width:100%;padding:0;border-radius:0;background:transparent;box-shadow:none;box-sizing:border-box}.wp-summary-head{position:relative;display:flex;align-items:center;justify-content:flex-start;gap:4px}.wp-summary-label{font-size:14px;font-weight:400;line-height:1.5;letter-spacing:0;color:var(--wp-text-40);white-space:nowrap}.wp-address{display:inline-flex;align-items:center;gap:8px;min-width:0}.wp-address-avatar{width:16px;height:16px;border-radius:50%;flex-shrink:0;background:radial-gradient(circle at 68% 34%,#ff78d1 0 18%,transparent 19%),radial-gradient(circle at 34% 66%,#00d4aa 0 20%,transparent 21%),linear-gradient(135deg,#7346f3,#0488fc)}.wp-address-label{font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;color:var(--wp-text-40);white-space:nowrap}.wp-address-chevron{display:inline-flex;align-items:center;color:var(--wp-text-40);flex-shrink:0}.wp-summary-badge{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;border-radius:999px;background:#019d921a;color:var(--wp-mint);font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;white-space:nowrap}.wp-summary-estimate{position:relative;display:inline-flex;align-items:center;gap:6px;flex-shrink:0}.wp-estimate-info{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--wp-text-40);cursor:help}.wp-estimate-tooltip{position:absolute;top:calc(100% + 8px);left:0;right:auto;z-index:3;display:flex;flex-direction:column;gap:8px;width:min(280px,calc(100vw - 48px));padding:12px;border-radius:8px;background:var(--wp-tooltip-bg);box-shadow:0 12px 32px #0000003d;color:var(--wp-tooltip-text);font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0;text-align:left;white-space:normal;opacity:0;pointer-events:none;transform:translateY(-4px);visibility:hidden;transition:opacity .15s ease,transform .15s ease,visibility .15s ease}.wp-estimate-tooltip-title{display:block;font-size:12px;font-weight:600;line-height:1.3}.wp-estimate-tooltip-group{display:flex;flex-direction:column;gap:4px}.wp-estimate-tooltip-item{display:block;color:#ffffffc7}.wp-estimate-tooltip-item:before{content:"- "}.wp-estimate-info:hover .wp-estimate-tooltip,.wp-estimate-info:focus .wp-estimate-tooltip,.wp-estimate-info:focus-visible .wp-estimate-tooltip{opacity:1;transform:translateY(0);visibility:visible}.wp-total{font-family:var( --wp-total-font-family, Sora, Inter, system-ui, -apple-system, sans-serif );font-size:36px;font-weight:600;line-height:1.25;letter-spacing:0;color:var(--wp-text);margin:0}.wp-svc-card{display:flex;flex-direction:column;gap:12px;width:100%}.wp-svc-card-head{display:flex;align-items:center;gap:6px}.wp-svc-card-icon{width:24px;height:24px;border-radius:4px;flex-shrink:0;object-fit:cover}.wp-svc-card-title{font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wp-svc-items{display:flex;flex-direction:column;gap:8px;width:100%;padding:0;border-radius:0;background:transparent;box-shadow:none;box-sizing:border-box}.wp-item{position:relative;display:flex;flex-direction:column;gap:20px;width:100%;padding:12px;border-radius:12px;background:var(--wp-card);box-shadow:var(--wp-card-shadow, none);box-sizing:border-box;color:inherit;text-decoration:none;cursor:pointer;outline:none;transition:opacity .15s ease}.wp-item+.wp-item{padding-top:12px;border-top:0}.wp-item:hover{opacity:.88}.wp-item-body{display:flex;flex-direction:column;gap:12px;min-width:0}.wp-order-head{display:flex;align-items:center;width:100%}.wp-item-line{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:21px;min-width:0}.wp-item-label{flex-shrink:0;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-30);white-space:nowrap}.wp-line-value,.wp-order-side{min-width:0;overflow:hidden;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-order-side--buy{color:var(--wp-mint)}.wp-order-side--sell{color:var(--wp-red)}.wp-svc-token{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0;min-height:21px}.wp-svc-token>span{font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-svc-token-icon{width:16px;height:16px;border-radius:50%;flex-shrink:0;object-fit:cover}.wp-item[data-side=reward] .wp-svc-token-icon{border-radius:0;object-fit:contain}.wp-svc-token--amount{align-items:flex-start}.wp-svc-token--amount>.wp-svc-token-icon{margin-top:2.5px}.wp-token-stack{display:inline-flex;align-items:center;justify-content:flex-end;width:29px;min-width:29px;overflow:visible}.wp-token-stack .wp-svc-token-icon+.wp-svc-token-icon{margin-left:-3.5px}.wp-token-subtle,.wp-item-usd{color:var(--wp-text-30)!important}.wp-svc-amount{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:1px;min-width:0}.wp-svc-amount-main{font-size:14px;font-weight:500;line-height:1.5;letter-spacing:0;color:var(--wp-text-60);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.wp-svc-amount .wp-item-usd{font-size:12px;font-weight:500;line-height:1.35}.wp-order-token{display:flex;align-items:center;gap:8px;min-width:0}.wp-order-token .wp-svc-token-icon{width:32px;height:32px}.wp-order-token-meta{display:flex;min-width:0;flex-direction:column;justify-content:center}.wp-order-token-symbol{overflow:hidden;color:var(--wp-text-60);font-size:14px;font-weight:500;line-height:1.5;text-overflow:ellipsis;white-space:nowrap}.wp-order-token-pair{overflow:hidden;color:var(--wp-text-30);font-size:12px;font-weight:500;line-height:1.5;text-overflow:ellipsis;white-space:nowrap}.wp-item-tags{display:flex;align-items:stretch;gap:8px;width:100%}.wp-tag{appearance:none;display:inline-flex;flex:1 1 0;align-items:center;justify-content:center;gap:0;min-width:0;min-height:33px;padding:6px 10px;border-radius:6px;border:0;background:var(--wp-control);font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:0;color:var(--wp-text-40);text-align:center;text-decoration:none;white-space:nowrap;box-sizing:border-box;transition:background-color .15s ease,border-color .15s ease,color .15s ease,transform .15s ease}a.wp-tag,button.wp-tag{cursor:pointer}.wp-tag:hover{background:var(--wp-control);transform:none}.wp-tag:focus-visible{outline:2px solid var(--wp-mint);outline-offset:2px}.wp-tag[aria-disabled=true],.wp-tag[data-disabled]{cursor:default;opacity:.48;pointer-events:none}.wp-tag-label{display:inline-flex;align-items:center}.wp-tag-icon{display:none}.wp-tag:hover .wp-tag-icon{transform:none}.wp-tag--mint{color:var(--wp-mint);background:var(--wp-accent-soft)}.wp-tag--mint:hover{background:var(--wp-accent-soft)}.wp-tag--muted{color:var(--wp-text-40);background:var(--ds-surface-medium, var(--wp-control))}.wp-body-inner[data-empty]{min-height:100%;box-sizing:border-box;justify-content:center}.wp-portfolio-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:280px;padding:32px 24px;text-align:center}.wp-portfolio-empty-icon{display:flex;align-items:center;justify-content:center;width:56px;height:56px;margin-bottom:6px;border-radius:50%;background:var(--wp-card);box-shadow:var(--wp-card-shadow, none);color:var(--wp-text-30)}.wp-portfolio-empty-title{margin:0;font-size:15px;font-weight:600;line-height:1.3;color:var(--wp-text-60)}.wp-portfolio-empty-desc{margin:0;font-size:13px;font-weight:400;line-height:1.4;color:var(--wp-text-30)}.wp-portfolio-loading{display:flex;align-items:center;justify-content:center;min-height:280px;padding:32px 24px}.wp-portfolio-spinner{width:22px;height:22px;border:2px solid var(--wp-border);border-top-color:var(--wp-mint);border-radius:50%;animation:wp-claim-spin .8s linear infinite}.wp-claim-overlay{position:absolute;inset:0;z-index:8;display:flex;align-items:flex-end;justify-content:center;background:#00000094;box-sizing:border-box}.wp-claim-sheet{display:flex;flex-direction:column;width:100%;max-height:calc(100% - 24px);overflow:hidden;border-radius:24px 24px 0 0;background:var(--wp-bg);color:var(--wp-text);box-shadow:0 -18px 48px #00000042;animation:wp-claim-slide-up .22s ease-out}@keyframes wp-claim-slide-up{0%{transform:translateY(18px);opacity:0}to{transform:translateY(0);opacity:1}}.wi-popover-content .wp-claim-sheet{min-height:min(600px,calc(100% - 24px))}.wi-popover-content .wp-claim-content{flex:1 1 auto}.wi-popover-content .wp-claim-actions{margin-top:auto}.wp-claim-grabber{display:flex;align-items:flex-start;justify-content:center;height:38px;min-height:38px;padding-top:12px;box-sizing:border-box}.wp-claim-grabber span{display:block;width:52px;height:5px;border-radius:999px;background:var(--wp-control)}.wp-claim-content{display:flex;flex-direction:column;align-items:center;gap:16px;width:100%;padding:20px;box-sizing:border-box}.wp-claim-icon{display:inline-flex;align-items:center;justify-content:center;width:64px;height:64px;border-radius:50%;flex-shrink:0}.wp-claim-icon--success{background:var(--wp-claim-success-soft);color:var(--wp-claim-success)}.wp-claim-icon--pending{background:#9b8cef29;color:var(--wp-claim-primary)}.wp-claim-icon--error{background:var(--wp-claim-error-soft);color:var(--wp-claim-error);font-size:30px;font-weight:600;line-height:1}.wp-claim-icon--token{background:#00d4aa29}.wp-claim-icon--token img{width:48px;height:48px;border-radius:50%;object-fit:cover}.wp-claim-icon--token span{display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:50%;background:var(--wp-mint);color:var(--ds-accent-primary-on, #ffffff);font-size:18px;font-weight:600}.wp-claim-spinner{width:36px;height:36px;border-radius:50%;border:3px solid rgba(155,140,239,.28);border-top-color:var(--wp-claim-primary);animation:wp-claim-spin .8s linear infinite}@keyframes wp-claim-spin{to{transform:rotate(360deg)}}.wp-claim-copy{display:flex;flex-direction:column;align-items:center;gap:16px;width:100%;text-align:center}.wp-claim-title{margin:0;font-size:20px;font-weight:600;line-height:1.3;letter-spacing:0;color:var(--wp-text)}.wp-claim-desc{max-width:335px;margin:0;font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0;color:var(--wp-text-40)}.wp-claim-heading{display:flex;flex-direction:column;align-items:flex-start;gap:8px;width:100%}.wp-claim-error-message{margin:0;color:var(--wp-claim-error);font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0}.wp-claim-reward-card{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;min-height:60px;padding:16px 8px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-claim-reward-token{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;flex-shrink:0;overflow:hidden;background:var(--wp-control)}.wp-claim-reward-token img{width:28px;height:28px;object-fit:cover}.wp-claim-reward-token span{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:var(--wp-mint);color:var(--ds-accent-primary-on, #ffffff);font-size:13px;font-weight:600;line-height:1}.wp-claim-reward-symbol{flex:1 1 auto;min-width:0;overflow:hidden;color:var(--wp-text);font-size:18px;font-weight:600;line-height:1.3;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.wp-claim-reward-amount{flex-shrink:0;color:var(--wp-text);font-size:20px;font-weight:600;line-height:1.3;letter-spacing:0;white-space:nowrap}.wp-claim-reward-card[data-fit=sm] .wp-claim-reward-symbol{font-size:14px}.wp-claim-reward-card[data-fit=sm] .wp-claim-reward-amount{font-size:16px}.wp-claim-reward-card[data-fit=xs] .wp-claim-reward-symbol{font-size:12px}.wp-claim-reward-card[data-fit=xs] .wp-claim-reward-amount{font-size:13px}.wp-claim-account-card{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-claim-account-row{display:flex;align-items:center;justify-content:space-between;gap:4px;width:100%;min-height:40px}.wp-claim-account-row>span{flex-shrink:0;color:var(--wp-text-40);font-size:14px;font-weight:400;line-height:1.3;letter-spacing:0;white-space:nowrap}.wp-claim-account{display:flex;align-items:center;gap:8px;min-width:0}.wp-claim-account strong{overflow:hidden;color:var(--wp-text);font-size:15px;font-weight:600;line-height:1.6;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.wp-claim-account-avatar{width:32px;height:32px;border-radius:50%;flex-shrink:0;background:radial-gradient(circle at 30% 28%,#d87aff 0 12%,transparent 13%),radial-gradient(circle at 68% 28%,#f0a1ff 0 12%,transparent 13%),radial-gradient(circle at 32% 70%,#b561e7 0 13%,transparent 14%),radial-gradient(circle at 70% 70%,#d4a2ff 0 13%,transparent 14%),radial-gradient(circle at 50% 50%,#8c4fc4 0 18%,transparent 19%),#4a315f;box-shadow:inset 0 0 0 3.37px var(--wp-control)}.wp-claim-divider{display:block;width:100%;height:1px;background:var(--wp-border)}.wp-claim-detail-list{display:flex;flex-direction:column;gap:8px;width:100%}.wp-claim-detail-row{display:flex;align-items:center;justify-content:space-between;gap:20px;width:100%;min-height:20px}.wp-claim-detail-row>span{min-width:0;color:var(--wp-text-40);font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0;white-space:nowrap}.wp-claim-detail-row--sub>span:before{content:"";display:inline-block;width:3px;height:3px;margin:0 8px 3px;background:currentColor}.wp-claim-detail-row strong{min-width:0;overflow:hidden;color:var(--wp-text);font-size:13px;font-weight:400;line-height:1.3;letter-spacing:0;text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-claim-list{display:flex;flex-direction:column;gap:8px;width:100%;padding-bottom:8px}.wp-claim-list-item{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:56px;padding:8px 16px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-claim-list-item>span{flex-shrink:0;font-size:14px;font-weight:400;line-height:1.3;color:var(--wp-text-40);white-space:nowrap}.wp-claim-list-item strong{display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0;overflow:hidden;color:var(--wp-text);font-size:14px;font-weight:400;line-height:1.3;text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-claim-list-item img{width:16px;height:16px;border-radius:50%;flex-shrink:0}.wp-claim-hash{appearance:none;display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0;padding:0;border:none;background:transparent;color:var(--wp-text);cursor:pointer;font:inherit}.wp-claim-hash svg{flex-shrink:0;color:var(--wp-text-60)}.wp-claim-gas-card{display:flex;flex-direction:column;gap:4px;width:100%;padding:14px 16px;border-radius:8px;border:1px solid var(--wp-border);background:var(--wp-card);box-sizing:border-box}.wp-claim-gas-row{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:28px}.wp-claim-gas-row>span{min-width:0;font-size:12px;font-weight:400;line-height:1.3;color:var(--wp-text-40)}.wp-claim-gas-row strong{min-width:0;overflow:hidden;color:var(--wp-text);font-size:12px;font-weight:400;line-height:1.3;text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-claim-gas-row--primary{min-height:32px}.wp-claim-gas-row--primary>span,.wp-claim-gas-row--primary strong{font-size:14px;color:var(--wp-text)}.wp-claim-fee-label{position:relative;display:inline-flex;align-items:center;text-decoration:underline dotted;text-underline-offset:3px;cursor:help;overflow:visible!important}.wp-claim-fee-tooltip{position:absolute;left:0;bottom:calc(100% + 8px);z-index:2;width:min(260px,calc(100vw - 64px));padding:10px 12px;border-radius:8px;background:var(--wp-tooltip-bg);color:var(--wp-tooltip-text);box-shadow:0 12px 32px #0000003d;font-size:11px;font-weight:400;line-height:1.4;text-align:left;text-decoration:none;white-space:normal;opacity:0;pointer-events:none;transform:translateY(4px);visibility:hidden;transition:opacity .15s ease,transform .15s ease,visibility .15s ease}.wp-claim-fee-label:hover .wp-claim-fee-tooltip,.wp-claim-fee-label:focus .wp-claim-fee-tooltip,.wp-claim-fee-label:focus-visible .wp-claim-fee-tooltip{opacity:1;transform:translateY(0);visibility:visible}.wp-claim-actions{display:flex;align-items:center;gap:8px;width:100%}.wp-claim-primary,.wp-claim-secondary{appearance:none;display:inline-flex;align-items:center;justify-content:center;width:100%;min-width:0;height:52px;padding:0 24px;border:none;border-radius:40px;font-family:inherit;font-size:15px;font-weight:600;line-height:1.3;letter-spacing:0;white-space:nowrap;cursor:pointer}.wp-claim-primary{background:var(--wp-claim-primary);color:var(--wp-claim-primary-text)}.wp-claim-primary:disabled{cursor:default;opacity:.72}.wp-claim-secondary{background:var(--wp-claim-secondary-bg, var(--wp-control));color:var(--wp-claim-primary)}.wp-claim-actions[data-count="2"] .wp-claim-primary{flex:1 1 0}.wp-claim-actions[data-count="2"] .wp-claim-secondary{flex:0 0 120px}.wp-claim-button-spinner{width:16px;height:16px;border-radius:50%;border:2px solid rgba(32,37,48,.28);border-top-color:var(--wp-claim-primary-text);animation:wp-claim-spin .8s linear infinite}.wp-claim-home-indicator{display:flex;align-items:flex-end;justify-content:center;height:34px;min-height:34px;padding-bottom:8px;box-sizing:border-box}.wp-claim-home-indicator span{display:block;width:134px;height:5px;border-radius:16px;background:var(--wp-text-40)}@media(max-width:359px){.wp-header{gap:12px;padding:0 12px}.wp-total{font-size:24px}.wp-body-inner{padding:0 12px 128px;gap:20px}.wp-claim-content{padding:18px 14px}.wp-item-line{gap:10px}.wp-svc-token>span{max-width:168px}}@media(max-width:360px){.wp-item-label-sub{display:none}}.wp-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.wi-drawer-content .wp-header,.wi-portfolio-body .wp-header{padding:16px}.wi-drawer-content .wp-header-edge--right .wp-header-btn,.wi-portfolio-body .wp-header-edge--right .wp-header-btn{top:16px;right:16px}.wp-withdraw-amount-card{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;border-radius:8px;background:var(--wp-card);box-sizing:border-box}.wp-withdraw-amount-row{display:flex;align-items:center;gap:8px;width:100%}.wp-withdraw-input{flex:1 1 auto;min-width:0;padding:0;border:none;background:transparent;color:var(--wp-text);font-family:inherit;font-size:24px;font-weight:600;line-height:1.3;letter-spacing:0;text-align:left;outline:none}.wp-withdraw-input::placeholder{color:var(--wp-text-30)}.wp-withdraw-input[aria-invalid=true]{color:var(--wp-claim-error)}.wp-withdraw-input-symbol{flex-shrink:0;color:var(--wp-text-40);font-size:15px;font-weight:600;line-height:1.3}.wp-withdraw-quick-row{display:flex;align-items:center;gap:8px;width:100%}.wp-withdraw-quick{appearance:none;flex:1 1 0;min-width:0;height:32px;padding:0 10px;border:1px solid var(--wp-border);border-radius:999px;background:transparent;color:var(--wp-text-60);font-family:inherit;font-size:13px;font-weight:600;line-height:1;white-space:nowrap;cursor:pointer}.wp-withdraw-quick:hover:not(:disabled){border-color:var(--wp-claim-primary);color:var(--wp-claim-primary)}.wp-withdraw-quick:disabled{cursor:default;opacity:.5}.wp-withdraw-content{overflow-y:auto}.wp-withdraw-token-list{display:flex;flex-direction:column;gap:8px;width:100%;max-height:216px;overflow-y:auto}.wp-withdraw-token{appearance:none;display:flex;align-items:center;gap:10px;width:100%;min-height:52px;padding:10px 12px;border:1px solid var(--wp-border);border-radius:8px;background:var(--wp-card);color:var(--wp-text);font-family:inherit;text-align:left;cursor:pointer;box-sizing:border-box}.wp-withdraw-token[data-selected]{border-color:var(--wp-claim-primary);box-shadow:inset 0 0 0 1px var(--wp-claim-primary)}.wp-withdraw-token:disabled{cursor:default;opacity:.6}.wp-withdraw-token-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;flex-shrink:0;overflow:hidden;background:var(--wp-control)}.wp-withdraw-token-icon img{width:28px;height:28px;object-fit:cover}.wp-withdraw-token-icon span{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:var(--wp-mint);color:var(--ds-accent-primary-on, #ffffff);font-size:13px;font-weight:600;line-height:1}.wp-withdraw-token-symbol{flex:1 1 auto;min-width:0;overflow:hidden;font-size:15px;font-weight:600;line-height:1.3;text-overflow:ellipsis;white-space:nowrap}.wp-withdraw-token-amount{flex-shrink:0;color:var(--wp-text-40);font-size:13px;font-weight:500;line-height:1.3;white-space:nowrap}
9
+ `);var Ae=require("react/jsx-runtime"),kd=15;function uo({env:e,theme:t="light",walletAddress:n,walletName:r,onBack:o,showHeader:a=!0,autoRefresh:i=!0,variant:s="embed",className:l,onOutlink:d,lpBalanceReader:p,stakingRewardsReader:h,sendTransaction:u,estimateGas:g,conversionRatio:x,currencySymbol:y,sections:f}){let c=it(e),b=_t.useCallback(fe=>!f||f.includes(fe),[f]),w=!!n,k=(0,wm.useQueryClient)(),[C,N]=_t.useState({}),T=_t.useCallback((fe,Re)=>{N(Ce=>{let tt=Ce[fe];return tt&&tt.loading===Re.loading&&tt.empty===Re.empty?Ce:{...Ce,[fe]:Re}})},[]),R=_t.useCallback(fe=>{N(Re=>{if(!(fe in Re))return Re;let Ce={...Re};return delete Ce[fe],Ce})},[]),S=_t.useMemo(()=>({report:T,unregister:R}),[T,R]),[E,A]=_t.useState(kd),[F,D]=_t.useState(!1),[G,M]=_t.useState(!1),j=_t.useRef(void 0),le=_t.useCallback(()=>{Ar(k)},[k]),oe=_t.useCallback(()=>{le(),D(!0),setTimeout(()=>D(!1),600),A(kd)},[le]);_t.useEffect(()=>{if(!w||!i)return;let fe=setInterval(()=>{A(Re=>Re<=1?(oe(),kd):Re-1)},1e3);return()=>clearInterval(fe)},[w,i,oe]);let ne=_t.useCallback(()=>{o?.()},[o]),Q=w?Sr(c,n,{size:64}):void 0,ee=_t.useCallback(async()=>{if(!(G||!n))try{await navigator.clipboard.writeText(n),M(!0),clearTimeout(j.current),j.current=setTimeout(()=>M(!1),2e3)}catch{}},[n,G]);_t.useEffect(()=>()=>clearTimeout(j.current),[]);let z=_t.useMemo(()=>({env:c,theme:t,open:!0,walletAddress:n,close:ne,onOutlink:d,lpBalanceReader:p,stakingRewardsReader:h,sendTransaction:u,estimateGas:g,conversionRatio:x,currencySymbol:y}),[c,t,n,ne,d,p,h,u,g,x,y]),q=Na.filter(b),ae=q.length>0&&q.every(fe=>{let Re=C[fe];return!!Re&&!Re.loading}),Z=ae&&q.every(fe=>C[fe]?.empty),pe=q.some(fe=>{let Re=C[fe];return!!Re&&!Re.empty}),Se=q.length>0&&!ae&&!pe,Ue=(0,Ae.jsxs)(Ae.Fragment,{children:[a&&(0,Ae.jsxs)("div",{className:"wp-header",children:[(0,Ae.jsxs)("div",{className:"wp-header-account",children:[o&&(0,Ae.jsx)("button",{type:"button",className:"wp-header-btn","aria-label":"Back","data-track":"back",onClick:o,children:(0,Ae.jsx)(ef,{})}),(0,Ae.jsx)("span",{className:"wp-header-avatar","aria-hidden":!0,children:Q&&(0,Ae.jsx)("img",{src:Q,alt:"",className:"wp-header-avatar-img",draggable:!1})}),(r||n)&&(0,Ae.jsxs)("div",{className:"wp-header-account-meta",children:[r&&(0,Ae.jsx)("span",{className:"wp-header-wallet-name",title:r,children:r}),n&&(0,Ae.jsxs)("button",{type:"button",className:"wp-header-address-btn",onClick:ee,"aria-label":"Copy wallet address","data-track":"address_copy",children:[(0,Ae.jsx)("span",{className:"wp-header-address",children:rs(n)}),(0,Ae.jsx)("span",{className:"wp-header-address-copy","data-copied":G,children:G?(0,Ae.jsx)(qn,{size:14}):(0,Ae.jsx)(Cr,{size:14})})]})]})]}),(0,Ae.jsxs)("button",{type:"button",className:"wp-header-btn wp-refresh-btn","aria-label":"Refresh portfolio","data-track":"refresh",onClick:oe,children:[(0,Ae.jsx)(tf,{className:F?"wp-spin-once":void 0}),w&&(0,Ae.jsx)("span",{className:"wp-refresh-badge",children:E})]})]}),(0,Ae.jsx)("div",{className:"wp-body",children:(0,Ae.jsxs)("div",{className:"wp-body-inner","data-empty":Z||void 0,children:[b("rewards")&&(0,Ae.jsx)(bf,{}),b("points")&&(0,Ae.jsx)(If,{}),b("staking")&&(0,Ae.jsx)(Ff,{}),b("gameSwap")&&(0,Ae.jsx)(Vf,{}),b("forge")&&(0,Ae.jsx)($f,{}),b("crossdPool")&&(0,Ae.jsx)(bm,{}),Se&&(0,Ae.jsx)("div",{className:"wp-portfolio-loading",role:"status","aria-label":"Loading portfolio",children:(0,Ae.jsx)("span",{className:"wp-portfolio-spinner","aria-hidden":!0})}),Z&&(0,Ae.jsxs)("div",{className:"wp-portfolio-empty",role:"status",children:[(0,Ae.jsx)("span",{className:"wp-portfolio-empty-icon","aria-hidden":!0,children:(0,Ae.jsxs)("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Ae.jsx)("path",{d:"M20 7H5a2 2 0 0 1-2-2 2 2 0 0 1 2-2h13v4M3 5v13a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1"}),(0,Ae.jsx)("circle",{cx:"16.5",cy:"13.5",r:"1",fill:"currentColor",stroke:"none"})]})}),(0,Ae.jsx)("p",{className:"wp-portfolio-empty-title",children:"No assets yet"}),(0,Ae.jsx)("p",{className:"wp-portfolio-empty-desc",children:"Assets you hold across ONE services will appear here."})]})]})})]});return(0,Ae.jsx)(va.Provider,{value:z,children:(0,Ae.jsx)(dd.Provider,{value:S,children:(0,Ae.jsx)(Me,{feature:"wallet_portfolio",children:s==="none"?Ue:(0,Ae.jsx)("div",{className:Ie(s==="fullscreen"?"wp-fullscreen":"wp-embed",l),"data-theme":t,children:Ue})})})})}var fo=require("react/jsx-runtime");function ym({className:e}){let{env:t,theme:n,walletAddress:r,close:o,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s}=Wt();return(0,fo.jsxs)(Sa.Drawer.Portal,{children:[(0,fo.jsx)(Sa.Drawer.Overlay,{className:"wp-overlay"}),(0,fo.jsxs)(Sa.Drawer.Content,{className:Ie("wp-fullscreen",e),"data-theme":n,children:[(0,fo.jsx)(Sa.Drawer.Title,{className:"wp-sr-only",children:"Portfolio"}),(0,fo.jsx)(uo,{env:t,theme:n,walletAddress:r,onBack:o,variant:"none",onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s})]})]})}var Cd=require("react/jsx-runtime");function ly({env:e,theme:t="light",walletAddress:n,open:r,onOpenChange:o,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s,sendTransaction:l,estimateGas:d,conversionRatio:p,currencySymbol:h,children:u}){let g=it(e),x=r!==void 0,[y,f]=mo.useState(!1),c=x?r:y,b=mo.useCallback(C=>{x||f(C),o?.(C)},[x,o]),w=mo.useCallback(()=>b(!1),[b]),k=mo.useMemo(()=>({env:g,theme:t,open:c,walletAddress:n,close:w,onOutlink:a,lpBalanceReader:i,stakingRewardsReader:s,sendTransaction:l,estimateGas:d,conversionRatio:p,currencySymbol:h}),[g,t,c,n,w,a,i,s,l,d,p,h]);return(0,Cd.jsx)(va.Provider,{value:k,children:(0,Cd.jsx)(xm.Drawer.Root,{direction:"bottom",open:c,onOpenChange:b,noBodyStyles:!0,children:u})})}var Rd=Object.assign(ly,{Trigger:Ju,Content:ym});var me=H(require("react"),1),Ho=require("react-dom"),Id=H(require("bignumber.js"),1);var hs=H(require("react"),1),vm=120;function km(e){return e instanceof HTMLElement&&e.matches("input, textarea, select")}function Cm(){let[e,t]=hs.useState(!1);return hs.useEffect(()=>{let n=window.visualViewport,r=()=>n?.height??window.innerHeight,o=r(),a=()=>{let d=r();o=Math.max(o,d),t(o-d>vm)},i=()=>{o=r(),t(!1)},s=d=>{km(d.target)&&o-r()>vm&&t(!0)},l=d=>{km(d.target)&&t(!1)};return a(),n?.addEventListener("resize",a),window.addEventListener("resize",a),window.screen?.orientation?.addEventListener("change",i),document.addEventListener("focusin",s),document.addEventListener("focusout",l),()=>{n?.removeEventListener("resize",a),window.removeEventListener("resize",a),window.screen?.orientation?.removeEventListener("change",i),document.removeEventListener("focusin",s),document.removeEventListener("focusout",l)}},[]),e}var bs=H(require("react"),1);function ws(e,t=160){let[n,r]=bs.useState(e||null);return bs.useEffect(()=>{if(e){r(e);return}let o=window.setTimeout(()=>r(null),t);return()=>window.clearTimeout(o)},[e,t]),[e||n,e?"open":"closed"]}var hr=require("react/jsx-runtime");function Rm({size:e=16,className:t}){return(0,hr.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,hr.jsx)("path",{d:"M2.667 8a5.333 5.333 0 1 0 1.562-3.771L2.667 5.79M2.667 2.667v3.124h3.124M8 5.333V8l1.667 1",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"})})}function Nm({size:e=16,className:t}){return(0,hr.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,hr.jsx)("path",{d:"M2.667 4h4M9.333 4h4M6.667 2.667v2.666M2.667 12h4M9.333 12h4M9.333 10.667v2.666M2.667 8h1.666M7 8h6.333M4.333 6.667v2.666",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"})})}function Nd({size:e=20,className:t}){return(0,hr.jsx)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,hr.jsx)("path",{d:"M10 4.167v11.666M4.167 10 10 15.833 15.833 10",stroke:"currentColor",strokeWidth:1.667,strokeLinecap:"round",strokeLinejoin:"round"})})}function Sm({size:e=16,className:t}){return(0,hr.jsx)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":"true",children:(0,hr.jsx)("path",{d:"M3.333 8h9.334M8.667 4l4 4-4 4",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"})})}var te=H(require("react"),1);var Em=H(require("bignumber.js"),1);function Tm(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function Im(e){return!e.isFinite()||e.isNaN()||e.lte(0)?"":e.decimalPlaces(6,Em.default.ROUND_DOWN).toFixed()}function dy(e){return e.fromToken.symbol.toLowerCase()===e.toToken.symbol.toLowerCase()||e.fromToken.chainId===e.toToken.chainId&&e.fromToken.address.toLowerCase()===e.toToken.address.toLowerCase()}function cy(e){let t=e.fromToken.priceUsd,n=e.toToken.priceUsd,r=e.lastChangedBy==="to"?e.toAmount:e.fromAmount,o=kt(r);return!o||o.lte(0)?{fromAmount:e.fromAmount,toAmount:e.toAmount}:Tm(t)&&Tm(n)?e.lastChangedBy==="to"?{fromAmount:Im(o.multipliedBy(n).dividedBy(t))}:{toAmount:Im(o.multipliedBy(t).dividedBy(n))}:dy(e)?e.lastChangedBy==="to"?{fromAmount:e.toAmount}:{toAmount:e.fromAmount}:{fromAmount:e.lastChangedBy==="to"?"":e.fromAmount,toAmount:e.lastChangedBy==="from"?"":e.toAmount}}function Am({getQuote:e,submitBridge:t}){return{canQuote:!!e,canSubmit:!!t,async getQuote(n){return e?e(n):cy(n)},async submitBridge(n){if(!t)throw new Error("Bridge submit handler is not configured.");return t(n)}}}var Mm=15,py=18,Om="cross_bridge_terms_accepted",uy=3600*24*365;function fy(e){let t=e.replace(/[^\d.]/g,""),n=t.indexOf(".");n!==-1&&(t=t.slice(0,n+1)+t.slice(n+1).replace(/\./g,""));let r=t.indexOf(".");if(r===-1)return t.slice(0,Mm);let o=t.slice(0,r).slice(0,Mm),a=t.slice(r+1).slice(0,py);return`${o}.${a}`}function my(){return typeof document>"u"?!1:document.cookie.split(";").map(e=>e.trim()).some(e=>e===`${Om}=true`)}function gy(){if(typeof document>"u")return;let e=typeof window<"u"&&window.location.protocol==="https:"?"; Secure":"";document.cookie=[`${Om}=true`,"Path=/",`Max-Age=${uy}`,"SameSite=Lax",e].filter(Boolean).join("; ")}function hy(e){let t=Number(e??"0");if(!Number.isFinite(t)||t<.1)return"1";let n=r=>Math.floor(r*100)/100;if(t<3){let r=n(t*3);return String(r<1?1:r)}return"10"}function Lm(e){let t=e.toUpperCase();return t.startsWith("T")&&t.slice(1).startsWith("ONE")?t.slice(1):t}function by(e,t){if(!e||!t||e.chainId!==t.chainId)return!1;let n=new Set([Lm(e.symbol),Lm(t.symbol)]);return n.has("ONE")&&n.has("ONEUSD")}function Xn(e,t){return!!e&&!!t&&e.chainId===t.chainId&&e.address.toLowerCase()===t.address.toLowerCase()}function ys(e){return e[0]}function Sd(e,t,n,r){if(n&&!Xn(n,t))return n;let o=t?r?.(t,e):void 0;if(o?.length)return o[0];if(!t)return e[1]??ys(e);let a=e.findIndex(s=>Xn(s,t)),i=a>=0?e[a+1]:void 0;return i&&!Xn(i,t)?i:e.find(s=>!Xn(s,t))??t}function Dm({fromToken:e,toToken:t,fromAmount:n,toAmount:r,lastChangedBy:o,slippage:a}){return{fromToken:e,toToken:t,fromAmount:n,toAmount:r,lastChangedBy:o,slippage:a}}function xs(e,t=0){if(!e||t>5)return[];if(typeof e=="string")return[e];if(!(e instanceof Error)&&typeof e!="object")return[String(e)];let n=e;return[...[e instanceof Error?e.name:n.name,e instanceof Error?e.message:n.message,n.shortMessage,n.details,n.code].filter(o=>typeof o=="string"||typeof o=="number").map(String),...xs(n.cause,t+1),...xs(n.data,t+1),...xs(n.error,t+1)]}function Td(e){let t=xs(e).join(" ").toLowerCase(),n=t.includes("signature_failed")&&(t.includes("\uD0C0\uC785 \uB370\uC774\uD130 \uC11C\uBA85\uC5D0 \uC2E4\uD328")||t.includes("typed data")||t.includes("signtypeddata"));return t.includes("4001")||t.includes("err_user_rejected")||t.includes("userrejectedrequesterror")||t.includes("user rejected")||t.includes("user denied")||t.includes("user cancelled")||t.includes("user canceled")||t.includes("rejected the request")||t.includes("request rejected")||t.includes("action_rejected")||t.includes("rejected by user")||n}function Pm(e,t){return Td(e)?"Transaction request was rejected.":(e instanceof Error?e.message:typeof e=="string"?e:"").split(`
10
+ `)[0]?.trim()||t}function Bm(e){let{tokens:t,initialFromToken:n,initialToToken:r,getToTokens:o,getApproval:a,approveBridge:i,history:s=[],initialSlippage:l="1",termsUrl:d,getQuote:p,submitBridge:h,onSubmitted:u,onSuccess:g,onFailed:x,onExit:y}=e,f=te.useMemo(()=>Am({getQuote:p,submitBridge:h}),[p,h]),[c,b]=te.useState("form"),[w,k]=te.useState(n??ys(t)),[C,N]=te.useState(()=>Sd(t,n??ys(t),r,o)),[T,R]=te.useState(""),[S,E]=te.useState(""),[A,F]=te.useState("from"),[D,G]=te.useState(l),[M,j]=te.useState(null),le=te.useMemo(()=>by(w,C),[w,C]),oe=te.useMemo(()=>le?"1":D==="auto"?hy(M?.priceImpact):D,[le,D,M?.priceImpact]),[ne,Q]=te.useState(""),[ee,z]=te.useState("idle"),[q,ae]=te.useState(""),[Z,pe]=te.useState(null),[Se,Ue]=te.useState([]),[fe,Re]=te.useState(!1),[Ce,tt]=te.useState(my),[Le,$e]=te.useState(null),[wt,Ge]=te.useState(!1),[Qe,He]=te.useState(null),[Dt,tn]=te.useState(null),[yt,Pt]=te.useState(!1),[Tt,nn]=te.useState(!1),It=te.useRef(0),ut=te.useRef(null),Ot=te.useRef(!1),rt=te.useRef(!1),on=te.useRef(!1),ft=te.useRef(!1),fn=te.useRef(!1),Ze=te.useRef(!1),lt=te.useRef(!1);te.useEffect(()=>{on.current||(on.current=!0,Je("bridge","opened"))},[]);let nt=te.useCallback(()=>{ut.current&&(clearTimeout(ut.current),ut.current=null)},[]),Et=te.useCallback(U=>{nt(),tn(U)},[nt]);te.useEffect(()=>nt,[nt]),te.useEffect(()=>{let U=t.find(Pe=>Xn(Pe,w))??ys(t),Oe=U?o?.(U,t):void 0,$=Oe?.find(Pe=>Xn(Pe,C))??(Oe?void 0:t.find(Pe=>Xn(Pe,C)))??Sd(t,U,void 0,o);k(U),N($)},[o,t,w,C]);let Rt=te.useCallback((U,Oe)=>{let $=fy(U);if(!$){It.current+=1,R(""),E(""),F(Oe),j(null),Q(""),z("idle");return}Oe==="from"?R($):E($),F(Oe),Q(""),!fn.current&&Number($)>0&&(fn.current=!0,Je("bridge","amount_entered"))},[]),Xe=te.useCallback(()=>{It.current+=1,R(""),E(""),F("from"),j(null),Q(""),ae(""),z("idle"),$e(null),Ge(!1),He(null),Pt(!1),Et(null)},[Et]),an=te.useCallback(U=>{Xn(U,w)||(ft.current||(ft.current=!0,Je("bridge","token_selected",{tags:{item_id:`from:${U.symbol}`}})),k(U),N(Sd(t,U,void 0,o)),Xe())},[w,o,Xe,t]),sn=te.useCallback(U=>{Xn(U,C)||Xn(U,w)||(ft.current||(ft.current=!0,Je("bridge","token_selected",{tags:{item_id:`to:${U.symbol}`}})),N(U),Xe())},[w,Xe,C]),Yt=te.useMemo(()=>w?o?.(w,t)??t.filter(U=>!Xn(U,w)):[],[w,o,t]),ln=te.useCallback(()=>{w?.balance&&Rt(w.balance,"from")},[w?.balance,Rt]),V=te.useCallback(()=>{!w||!C||(k(C),N(w),Xe())},[w,Xe,C]),ve=te.useCallback(()=>{It.current+=1,R(""),E(""),F("from"),j(null),Q(""),ae("")},[]);te.useEffect(()=>{if(!w||!C)return;if(!T&&!S){j(null),Q(""),z($=>$==="quoting"?"idle":$);return}let U=++It.current,Oe=Dm({fromToken:w,toToken:C,fromAmount:T,toAmount:S,lastChangedBy:A,slippage:D});z($=>$==="submitting"?$:f.canQuote?"quoting":"idle"),(async()=>{try{let $=await f.getQuote(Oe);if(It.current!==U)return;$.fromAmount!==void 0&&A==="to"&&R($.fromAmount),$.toAmount!==void 0&&A==="from"&&E($.toAmount),j($.summary??null),Q($.error??"")}catch($){if(It.current!==U)return;Q($ instanceof Error?$.message:"Failed to quote bridge.")}finally{It.current===U&&z($=>$==="quoting"?"idle":$)}})()},[T,w,A,f,D,S,C]);let Ne=te.useCallback(()=>!w||!C?null:Dm({fromToken:w,toToken:C,fromAmount:T,toAmount:S,lastChangedBy:A,slippage:oe}),[oe,T,w,A,S,C]),ze=te.useCallback(async(U,Oe)=>{if(!Ot.current){Ot.current=!0,ae(""),Pt(!1),Ge(!1),z("submitting");try{if(!Oe?.skipApprovalCheck&&a){let Pe=await a(U);if(Pe){$e(Pe),He(U),z("idle");return}}$e(null),He(null),Et("processing");let $=await f.submitBridge(U);pe($),z("success"),Ue(Pe=>[{id:$.txHash,timestamp:new Date().toISOString(),txHash:$.txHash,fromToken:$.fromToken,toToken:$.toToken,fromAmount:$.fromAmount,toAmount:$.toAmount,summary:M??void 0,status:"pending"},...Pe.filter(In=>In.txHash!==$.txHash)]),ve(),nn(!0),Et(null),Pt(!0),Je("bridge","confirmed"),Ze.current=!1,lt.current=!1,u?.($),g?.($)}catch($){if(Et(null),Je("bridge","confirmed",{status:"failure",reason:Nn($)}),Ze.current=!1,lt.current=!1,Td($)){z("idle");return}let Pe=Pm($,"Failed to submit bridge.");ae(Pe),z("error"),x?.({message:Pe})}finally{Ot.current=!1}}},[a,x,u,g,f,ve,Et,M]),ot=te.useCallback(async()=>{if(ne)return;let U=Ne();if(U){if(Ze.current||(Ze.current=!0,Je("bridge","submitted")),!Ce){He(U),Re(!0);return}await ze(U)}},[Ne,ne,ze,Ce]),Kt=te.useCallback(async()=>{let U=Qe??Ne();U&&(gy(),tt(!0),Re(!1),await ze(U))},[Ne,Qe,ze]),Bt=te.useCallback(()=>{Re(!1),He(null)},[]),Cn=te.useCallback(async()=>{if(!(rt.current||ee==="submitting"||!Le||!Qe||!i)){rt.current=!0,ae(""),z("submitting");try{await i(Qe,Le),lt.current||(lt.current=!0,Je("bridge","approved")),$e(null),z("idle"),Ge(!0)}catch(U){if(Td(U)){z("idle");return}let Oe=Pm(U,"Failed to approve token.");ae(Oe),z("error"),x?.({message:Oe})}finally{rt.current=!1}}},[Le,i,x,Qe,ze,ee]),Rn=te.useCallback(()=>{ee!=="submitting"&&($e(null),Ge(!1),He(null),z("idle"))},[ee]),O=te.useCallback(async()=>{if(ee==="submitting")return;let U=Qe??Ne();if(!U){Ge(!1),ae("Bridge input is no longer available. Please try again."),z("error");return}Ge(!1),await ze(U,{skipApprovalCheck:!0})},[Ne,Qe,ze,ee]),De=te.useCallback(()=>{Pt(!1)},[]),qe=te.useCallback(U=>{b(U),U==="history"&&nn(!1)},[]),re=te.useCallback(()=>{if(c==="history"){qe("form");return}y?.()},[y,qe,c]),Te=te.useMemo(()=>[...s,...Se.filter(U=>!s.some(Oe=>Oe.txHash===U.txHash))],[s,Se]);return{step:c,setStep:qe,status:ee,error:q,quoteError:ne,fromToken:w,toToken:C,tokens:t,availableToTokens:Yt,fromAmount:T,toAmount:S,lastChangedBy:A,slippage:D,effectiveSlippage:oe,slippageLocked:le,setSlippage:G,summary:M,history:Te,submitted:Z,canSubmit:f.canSubmit,termsOpen:fe,approvalInfo:Le,approvalSuccessOpen:wt,approveBridge:i,pendingSubmitInput:Qe,submitToast:Dt,successDialogOpen:yt,dismissSuccessDialog:De,hasNewHistory:Tt,termsUrl:d,setFromToken:k,setToToken:N,selectFromToken:an,selectToToken:sn,setAmount:Rt,setMax:ln,swapTokens:V,submit:ot,confirmTerms:Kt,cancelTerms:Bt,confirmApproval:Cn,cancelApproval:Rn,continueAfterApproval:O,back:re}}he(`.bf-root{--bf-bg: var(--ds-bg-default, #1e232e);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .08));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .07));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .85));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .65));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .4));--bf-toast-bg: var(--bf-bg);--bf-toast-strong: var(--bf-text-high);--bf-toast-color: var(--bf-text-medium);position:relative;display:flex;flex:1;min-height:0;flex-direction:column;container:bf-flow / inline-size;overflow:hidden;background:var(--bf-bg);color:var(--ds-content-highest, #ffffff);font-family:inherit}[data-theme=dark].wi-popover-content .bf-root,[data-theme=dark].wi-drawer-content .bf-root{--bf-bg: var(--ds-bg-default, #121212);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .1));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .05));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .85));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .7));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .5))}[data-theme=light].wi-popover-content .bf-root,[data-theme=light].wi-drawer-content .bf-root{--bf-bg: var(--ds-bg-default, #ffffff);--bf-surface: var(--ds-surface-medium, rgba(18, 18, 18, .05));--bf-surface-hover: var(--ds-surface-high, rgba(18, 18, 18, .1));--bf-border: var(--ds-border-default, rgba(18, 18, 18, .05));--bf-text-high: var(--ds-content-high, rgba(18, 18, 18, .85));--bf-text-medium: var(--ds-content-medium, rgba(18, 18, 18, .7));--bf-text-low: var(--ds-content-low, rgba(18, 18, 18, .5))}[data-theme=dark].gou-shell .bf-root,.gou-shell[data-theme=dark] .bf-root{--bf-bg: var(--ds-bg-default, #121212);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .1));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .05));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .85));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .7));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .5))}[data-theme=light].gou-shell .bf-root,.gou-shell[data-theme=light] .bf-root{--bf-bg: var(--ds-bg-default, #ffffff);--bf-surface: var(--ds-surface-medium, rgba(18, 18, 18, .05));--bf-surface-hover: var(--ds-surface-high, rgba(18, 18, 18, .1));--bf-border: var(--ds-border-default, rgba(18, 18, 18, .05));--bf-text-high: var(--ds-content-high, rgba(18, 18, 18, .85));--bf-text-medium: var(--ds-content-medium, rgba(18, 18, 18, .7));--bf-text-low: var(--ds-content-low, rgba(18, 18, 18, .5))}.bf-root[data-view=history]{background:var(--ds-bg-dim, #f5f7fa);color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-header{position:relative;display:flex;flex-shrink:0;align-items:center;justify-content:space-between;padding:24px;border-bottom:1px solid var(--bf-border);background:var(--ds-bg-default, var(--bf-bg));box-sizing:border-box}.bf-root[data-view=history] .bf-header{padding:24px;border-bottom-color:var(--ds-border-default, rgba(0, 0, 0, .07));background:var(--ds-surface-default, #ffffff)}.bf-header-btn{display:inline-flex;width:24px;height:24px;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;transition:color .15s ease}.bf-header-spacer{width:24px;height:24px;flex-shrink:0}.bf-header-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-header .bf-header-btn:last-child{position:absolute;top:24px;right:24px}.bf-header-title{position:absolute;left:50%;transform:translate(-50%);font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--bf-text-high);white-space:nowrap}.bf-header-title[data-clickable=true]{cursor:pointer}.bf-root[data-view=history] .bf-header-title{color:var(--ds-content-highest, #000000)}.bf-body,.bf-history-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;box-sizing:border-box}.bf-body{padding:24px}.bf-history-body{display:flex;flex-direction:column;gap:12px;padding:24px;background:var(--ds-bg-dim, #f5f7fa)}.bf-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}.bf-chip{display:inline-flex;align-items:center;gap:4px;min-height:33px;padding:6px 8px;border:0;border-radius:12px;background:var(--bf-surface);color:var(--bf-text-medium);font:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer}.bf-chip:hover:not(:disabled){color:var(--bf-text-high);background:var(--bf-surface-hover)}.bf-chip:disabled{cursor:default}.bf-chip-history{position:relative}.bf-chip-dot{position:absolute;top:4px;right:4px;width:6px;height:6px;border-radius:999px;background:var(--ds-system-red-default, #da0b2e)}.bf-swap-card{position:relative;display:flex;flex-direction:column;gap:12px;margin-bottom:12px}.bf-field-error{margin-top:-4px;color:var(--ds-system-red-default, #ff2b5f);font-size:13px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-amount-panel{display:flex;min-height:110px;flex-direction:column;gap:8px;padding:16px;border:1px solid transparent;border-radius:12px;background:var(--bf-surface);box-sizing:border-box;transition:border-color .2s ease}.bf-amount-panel:hover{border-color:var(--bf-border)}.bf-amount-head{display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--bf-text-high);font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-balance{display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0;color:var(--bf-text-low);font-size:12px;white-space:nowrap}.bf-amount-main{display:flex;align-items:center;justify-content:space-between;gap:12px}.bf-amount-input-wrap{display:flex;min-width:0;flex:1;flex-direction:column;gap:4px}.bf-amount-input{width:100%;min-width:0;padding:0;border:0;background:transparent;color:var(--bf-text-high);font:inherit;font-size:18px;font-size:clamp(15px,4.5cqi,18px);font-weight:600;line-height:1.5;letter-spacing:-.01em;outline:none}.bf-amount-input[data-size=medium]{font-size:16px;font-size:clamp(14px,4cqi,16px)}.bf-amount-input[data-size=small]{font-size:14px;font-size:clamp(12px,3.5cqi,14px)}.bf-amount-input::placeholder{color:var(--ds-content-lowest, rgba(0, 0, 0, .25))}.bf-amount-usd{overflow:hidden;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;white-space:nowrap;text-overflow:ellipsis}.bf-token-pill{display:inline-flex;flex-shrink:0;align-items:center;gap:6px;min-height:33px;padding:6px 8px 6px 6px;border:1px solid var(--bf-border);border-radius:9999px;background:var(--bf-bg);color:var(--bf-text-high);font:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;perspective:220px;overflow:hidden;transition:transform .12s ease,background .15s ease}.bf-token-pill:hover:not(:disabled):not([data-locked=true]){background:var(--bf-surface-hover)}.bf-token-pill:disabled{cursor:default;opacity:.6}.bf-token-pill[data-locked=true]{cursor:default}.bf-token-icon{position:relative;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;overflow:hidden;border-radius:0;background:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-on, #ffffff);font-size:11px;font-weight:700}.bf-token-icon[data-has-image=true]{background:transparent}.bf-token-icon img{width:100%;height:100%;border-radius:0;object-fit:cover}.bf-token-fallback{line-height:1}.bf-token-pill-face{display:inline-flex;align-items:center;gap:6px;transform-origin:center bottom;animation:bf-token-roll-up .32s cubic-bezier(.22,1,.36,1)}@keyframes bf-token-roll-up{0%{opacity:0;transform:translateY(90%) rotateX(-80deg)}60%{opacity:1}}.bf-token-pill:active:not(:disabled),.bf-embedded-token-pill:active:not(:disabled){transform:scale(.96)}.bf-token-search:focus-within{border-color:var(--ds-accent-primary-default, #7e54f4)}.bf-token-search input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:var(--bf-text-high);font:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-token-search input::placeholder{color:var(--bf-text-low)}.bf-token-list{display:flex;min-height:0;flex:1;flex-direction:column;gap:0;overflow-y:auto;overflow-x:hidden;padding:0 24px 24px;scrollbar-width:thin;box-sizing:border-box}.bf-token-row{position:relative;display:flex;width:100%;min-height:69px;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid transparent;border-radius:12px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;box-sizing:border-box}.bf-token-row:hover:not([data-selected=true]){background:var(--ds-surface-medium, rgba(18, 18, 18, .05))}.bf-token-row[data-selected=true]{border-color:var(--ds-accent-primary-default, #7e54f4);background:var(--ds-surface-medium, rgba(18, 18, 18, .05))}.bf-token-row-left{display:inline-flex;min-width:0;align-items:center;gap:16px}.bf-token-meta{display:flex;min-width:0;flex-direction:column}.bf-token-symbol{overflow:hidden;color:var(--bf-text-high);font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.bf-token-name{overflow:hidden;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}.bf-token-row-right{display:flex;min-width:86px;max-width:42%;flex-shrink:0;flex-direction:column;align-items:flex-end}.bf-token-balance,.bf-token-price{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bf-token-balance{color:var(--bf-text-high);font-size:14px;font-weight:600;line-height:1.5;letter-spacing:0}.bf-token-price{color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-token-row[data-selected=true] .bf-token-symbol{color:var(--bf-text-high)}.bf-token-row[data-selected=true] .bf-token-balance{color:var(--bf-text-high);font-size:16px}.bf-token-row[data-selected=true] .bf-token-price{color:var(--bf-text-low);font-size:14px}.bf-token-empty{padding:32px 16px;color:var(--bf-text-low);font-size:14px;font-weight:500;line-height:1.5;text-align:center}.bf-slippage-overlay{position:fixed;inset:0;z-index:100002;display:flex;align-items:center;justify-content:center;padding:24px;background:#00000085;pointer-events:auto;box-sizing:border-box}.bf-slippage-dialog{display:flex;width:min(480px,calc(100vw - 48px));height:auto;min-height:min(316px,calc(100dvh - 48px));max-height:calc(100dvh - 48px);flex-direction:column;overflow:hidden;border:1px solid var(--ds-border-medium, rgba(0, 0, 0, .18));border-radius:24px;background:var(--ds-surface-default, #ffffff);color:var(--ds-content-highest, #000000);box-shadow:var(--ds-shadow-modal, 0 4px 30px -1px rgba(0, 0, 0, .15));box-sizing:border-box}.bf-slippage-head{position:relative;display:flex;min-height:73px;flex-shrink:0;align-items:center;justify-content:flex-start;padding:24px 56px 24px 24px;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));background:var(--ds-surface-default, #ffffff);box-sizing:border-box}.bf-slippage-head h3{margin:0;color:var(--ds-content-highest, #000000);font-size:20px;font-weight:600;line-height:1.25;letter-spacing:0}.bf-slippage-close{position:absolute;top:24px;right:24px;display:inline-flex;width:24px;height:24px;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer}.bf-slippage-close:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-slippage-body{display:flex;flex:1;min-height:0;flex-direction:column;gap:24px;padding:24px;box-sizing:border-box}.bf-slippage-desc{margin:0;color:var(--ds-content-medium, rgba(0, 0, 0, .65));font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-controls{display:flex;flex-direction:column;gap:12px;width:100%}.bf-slippage-presets{display:flex;gap:8px;width:100%}.bf-slippage-preset{appearance:none;display:inline-flex;flex:1 1 0;min-width:0;min-height:48px;align-items:center;justify-content:center;padding:12px 8px;border:1px solid transparent;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-medium, rgba(0, 0, 0, .65));font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;box-sizing:border-box}.bf-slippage-preset:hover,.bf-slippage-preset[data-selected=true]{border-color:var(--ds-accent-primary-default, #7e54f4);background:var(--ds-accent-primary-low, #f5f3ff)}.bf-slippage-custom{display:flex;min-height:48px;align-items:center;gap:8px;padding:12px;border:1px solid transparent;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-high, rgba(0, 0, 0, .85));box-sizing:border-box}.bf-slippage-custom:focus-within,.bf-slippage-custom[data-selected=true]{border-color:var(--ds-accent-primary-default, #7e54f4)}.bf-slippage-custom input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:var(--ds-content-high, rgba(0, 0, 0, .85));font:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-custom input::placeholder{color:var(--ds-content-lowest, rgba(0, 0, 0, .25))}.bf-slippage-custom span:not(.bf-sr-only){flex-shrink:0;color:var(--ds-content-high, rgba(0, 0, 0, .85));font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-apply{appearance:none;margin-top:auto;width:100%;min-height:48px;padding:12px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-on, #ffffff);font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer;box-sizing:border-box}.bf-slippage-apply:hover{filter:brightness(.96)}.bf-slippage-apply:disabled{cursor:not-allowed;opacity:.5;filter:none}.bf-slippage-message{margin:0;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-slippage-message[data-variant=warning]{color:var(--ds-system-orange-high, #e56f00)}.bf-slippage-message[data-variant=error]{color:var(--ds-system-red-default, #da0b2e)}.bf-action-modal-overlay{--bf-bg: var(--ds-bg-default, #1e232e);--bf-surface: var(--ds-surface-medium, rgba(255, 255, 255, .05));--bf-surface-hover: var(--ds-surface-high, rgba(255, 255, 255, .08));--bf-border: var(--ds-border-default, rgba(255, 255, 255, .12));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .92));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .65));--bf-text-low: var(--ds-content-low, rgba(255, 255, 255, .4));position:fixed;inset:0;z-index:100003;display:flex;align-items:center;justify-content:center;padding:24px;background:#040912b8;pointer-events:auto;box-sizing:border-box;animation:bf-overlay-in .18s ease-out}.bf-action-modal-overlay[data-theme=light]{--bf-bg: var(--ds-bg-default, #ffffff);--bf-surface: var(--ds-surface-medium, rgba(18, 18, 18, .05));--bf-surface-hover: var(--ds-surface-high, rgba(18, 18, 18, .1));--bf-border: var(--ds-border-default, rgba(18, 18, 18, .08));--bf-text-high: var(--ds-content-high, rgba(18, 18, 18, .85));--bf-text-medium: var(--ds-content-medium, rgba(18, 18, 18, .65));--bf-text-low: var(--ds-content-low, rgba(18, 18, 18, .4))}.bf-action-modal{display:flex;width:min(480px,calc(100vw - 48px));flex-direction:column;align-items:center;gap:24px;padding:48px 24px 24px;border:1px solid var(--bf-border);border-radius:24px;background:var(--bf-bg);color:#fff;box-shadow:0 24px 80px #00000073;box-sizing:border-box;animation:bf-modal-in .2s cubic-bezier(.16,1,.3,1)}.bf-action-modal-overlay[data-state=closed]{animation:bf-overlay-out .15s ease-in forwards}.bf-action-modal-overlay[data-state=closed] .bf-action-modal{animation:bf-modal-out .15s ease-in forwards}@keyframes bf-overlay-in{0%{opacity:0}}@keyframes bf-overlay-out{to{opacity:0}}@keyframes bf-modal-in{0%{opacity:0;transform:translateY(8px) scale(.96)}}@keyframes bf-modal-out{to{opacity:0;transform:translateY(4px) scale(.98)}}@media(prefers-reduced-motion:reduce){.bf-action-modal-overlay,.bf-action-modal,.bf-action-modal-overlay[data-state=closed],.bf-action-modal-overlay[data-state=closed] .bf-action-modal{animation:none}}.bf-action-modal h3{width:100%;margin:0;color:var(--bf-text-high);font-size:24px;font-weight:700;line-height:1.25;text-align:left;letter-spacing:0}.bf-action-modal-desc{max-width:380px;margin:0;color:var(--bf-text-low);font-size:15px;font-weight:500;line-height:1.45;text-align:center;letter-spacing:0}.bf-terms-modal{--bf-terms-accent: #f3742e;padding:24px;gap:24px}.bf-terms-modal h3{font-size:20px;font-weight:600;line-height:1.6;text-align:center}.bf-terms-modal .bf-action-modal-desc{font-size:14px;line-height:1.45}.bf-terms-check-row{display:grid;width:100%;min-height:56px;grid-template-columns:20px minmax(0,1fr);align-items:center;column-gap:12px;padding:16px;border:1px solid var(--bf-border);border-radius:12px;background:var(--bf-surface);color:var(--bf-text-high);font-size:14px;font-weight:600;line-height:1.4;box-sizing:border-box}.bf-terms-check-button{appearance:none;display:inline-flex;min-width:0;width:20px;height:20px;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;touch-action:manipulation}.bf-terms-copy{display:flex;width:100%;min-width:0;align-items:baseline;justify-content:space-between;column-gap:12px;row-gap:4px;flex-wrap:wrap}.bf-terms-label{min-width:0;cursor:pointer;touch-action:manipulation}.bf-terms-check-button:focus-visible .bf-terms-checkbox{outline:2px solid var(--ds-accent-primary-default, #7e54f4);outline-offset:2px}.bf-terms-checkbox{position:relative;display:inline-flex;width:20px;height:20px;align-items:center;justify-content:center;border:1px solid rgba(124,143,180,.72);border-radius:4px;background:transparent;box-sizing:border-box}.bf-terms-checkbox[data-checked=true]{border-color:var(--ds-accent-primary-default, #7e54f4);background:var(--ds-accent-primary-default, #7e54f4)}.bf-terms-checkbox[data-checked=true]:after{width:8px;height:4px;border:solid #ffffff;border-width:0 0 2px 2px;content:"";transform:rotate(-45deg) translate(1px,-1px)}.bf-terms-check-row a{position:relative;z-index:1;color:var(--ds-accent-primary-default, #7e54f4);font-size:14px;font-weight:700;text-decoration:none;white-space:nowrap}.bf-terms-check-row a:hover{text-decoration:underline}.bf-terms-privacy{max-width:100%;margin:0;color:var(--bf-text-low);font-size:clamp(8px,2.4vw,12px);white-space:nowrap;font-weight:500;line-height:1.45;text-align:center;letter-spacing:0}.bf-action-primary,.bf-action-secondary{display:inline-flex;width:100%;min-height:56px;align-items:center;justify-content:center;padding:14px 16px;border:0;border-radius:12px;font:inherit;font-size:18px;font-weight:700;line-height:1.4;letter-spacing:0;cursor:pointer}.bf-action-primary{background:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-on, #ffffff)}.bf-action-primary:disabled{cursor:not-allowed;opacity:.35}.bf-terms-modal .bf-action-primary{min-height:52px;background:var(--bf-terms-accent);color:#fff;font-size:16px;font-weight:600}.bf-terms-modal .bf-action-primary:disabled{background:var(--bf-surface);color:var(--bf-text-low);opacity:1}.bf-action-primary[aria-busy=true]{gap:8px;opacity:1}.bf-action-button-spinner{width:18px;height:18px;border:2px solid rgba(0,0,0,.22);border-top-color:currentColor;border-right-color:currentColor;border-radius:999px;animation:bf-loading-spin .9s linear infinite}.bf-action-secondary{background:var(--bf-surface);color:var(--bf-text-low)}.bf-action-secondary:disabled{cursor:not-allowed;opacity:.5}.bf-approve-address-box{display:flex;width:100%;flex-direction:column;gap:10px;padding:16px;border:1px solid var(--bf-border);border-radius:12px;background:var(--bf-surface);box-sizing:border-box}.bf-approve-address-box>span{color:var(--bf-text-low);font-size:14px;font-weight:700;line-height:1.4}.bf-approve-address-box>div{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px}.bf-approve-address-box strong{min-width:0;overflow:hidden;color:var(--bf-text-high);font-size:15px;font-weight:500;line-height:1.5;text-overflow:ellipsis;white-space:nowrap}.bf-copy-button{flex-shrink:0;min-width:48px;min-height:32px;padding:6px 10px;border:1px solid rgba(0,206,178,.65);border-radius:8px;background:transparent;color:var(--ds-accent-primary-default, #7e54f4);font:inherit;font-size:12px;font-weight:700;line-height:1.2;cursor:pointer}.bf-copy-button:disabled{cursor:not-allowed;opacity:.45}.bf-action-buttons{display:grid;width:100%;grid-template-columns:1fr 1fr;gap:12px}.bf-approval-success-modal{gap:28px}.bf-success-mark{position:relative;display:inline-flex;width:96px;height:96px;flex-shrink:0;align-items:center;justify-content:center;border:12px solid rgba(0,206,178,.12);border-radius:999px;background:#00ceb2a8;box-shadow:0 0 0 10px #00ceb20f;box-sizing:border-box}.bf-success-mark:after{width:34px;height:18px;border:solid #ffffff;border-width:0 0 6px 6px;content:"";transform:rotate(-45deg) translate(2px,-3px)}.bf-status-toast{position:absolute;right:16px;bottom:14px;left:16px;z-index:5;display:flex;align-items:center;gap:12px;min-height:52px;padding:12px;border:1px solid var(--bf-border);border-radius:12px;background:var(--bf-toast-bg);color:var(--bf-toast-color);box-shadow:0 8px 24px #0000003d;box-sizing:border-box}.bf-status-toast-icon{display:inline-flex;width:28px;height:28px;flex-shrink:0;align-items:center;justify-content:center;border-radius:999px}.bf-status-spinner{width:20px;height:20px;border:3px solid rgba(255,255,255,.18);border-top-color:var(--ds-accent-primary-default, #7e54f4);border-right-color:var(--ds-accent-primary-default, #7e54f4);border-radius:999px;animation:bf-loading-spin .9s linear infinite}.bf-status-check{position:relative;width:20px;height:20px;border-radius:999px;background:var(--ds-system-green-default, #00ceb2)}.bf-status-check:after{position:absolute;top:6px;left:5px;width:8px;height:4px;border:solid var(--ds-system-green-on, #000000);border-width:0 0 2px 2px;content:"";transform:rotate(-45deg)}.bf-status-toast-copy{display:flex;min-width:0;flex:1;flex-direction:column}.bf-status-toast-copy strong,.bf-status-toast-copy span{overflow:hidden;text-overflow:ellipsis}.bf-status-toast-copy strong{color:var(--bf-toast-strong);font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em}.bf-status-toast-copy span{color:var(--bf-toast-color);font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em}.bf-status-toast[data-variant=success] .bf-status-toast-copy span{color:var(--ds-system-green-on-inverted, #00e8c9)}.bf-status-toast[data-variant=error]{border:1px solid rgba(255,43,95,.28);background:var(--bf-toast-bg)}.bf-status-toast[data-variant=error] .bf-status-toast-copy strong{color:var(--bf-toast-strong)}.bf-status-error-mark{display:inline-flex;width:24px;height:24px;align-items:center;justify-content:center;border-radius:999px;background:var(--ds-system-red-default, #ff2b5f);color:#fff;font-size:14px;font-weight:700;line-height:1}.bf-status-toast[data-variant=error] .bf-status-toast-copy span{color:var(--bf-toast-color)}.bf-success-overlay{--bf-bg: var(--ds-bg-default, #1e232e);--bf-border: var(--ds-border-default, rgba(255, 255, 255, .12));--bf-text-high: var(--ds-content-high, rgba(255, 255, 255, .92));--bf-text-medium: var(--ds-content-medium, rgba(255, 255, 255, .65));position:fixed;inset:0;z-index:100003;display:flex;align-items:center;justify-content:center;padding:24px;background:#000000b8;pointer-events:auto;box-sizing:border-box}.bf-success-overlay[data-theme=light]{--bf-bg: #ffffff;--bf-border: rgba(18, 18, 18, .08);--bf-text-high: rgba(18, 18, 18, .85);--bf-text-medium: rgba(18, 18, 18, .65);--bf-text-low: rgba(18, 18, 18, .4)}.bf-success-modal{display:flex;width:min(480px,calc(100vw - 48px));flex-direction:column;overflow:hidden;border:1px solid var(--bf-border);border-radius:24px;background:var(--bf-bg);color:var(--bf-text-high);box-shadow:0 24px 80px #00000073;box-sizing:border-box}.bf-success-head{display:flex;min-height:73px;align-items:center;justify-content:space-between;gap:16px;padding:24px;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));box-sizing:border-box}.bf-success-head h3{min-width:0;margin:0;overflow:hidden;color:var(--ds-content-highest, #000000);font-size:20px;font-weight:600;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.bf-success-close{display:inline-flex;width:24px;height:24px;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer}.bf-success-close:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-success-body{display:flex;flex-direction:column;align-items:center;gap:24px;padding:40px 24px 24px;box-sizing:border-box}.bf-success-copy{display:flex;width:100%;flex-direction:column;align-items:center;gap:4px;color:var(--bf-text-medium);text-align:center}.bf-success-copy strong{color:var(--bf-text-high);font-size:24px;font-weight:700;line-height:1.25;letter-spacing:0}.bf-success-copy span{color:var(--bf-text-medium);font-size:15px;font-weight:500;line-height:1.5;letter-spacing:0}.bf-success-route{display:flex;align-items:center;justify-content:center;gap:12px}.bf-success-route .bf-token-icon{width:48px!important;height:48px!important;background:transparent;font-size:18px}.bf-success-route-arrow{color:var(--bf-text-low);font-size:24px;font-weight:500;line-height:1}.bf-success-ok{display:inline-flex;width:100%;min-height:48px;align-items:center;justify-content:center;padding:12px;border:0;border-radius:12px;background:#00b4b7e0;color:#fff;font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer}@media(max-width:767px){.bf-success-body{padding:40px 24px 24px}.bf-success-copy strong{font-size:22px}.bf-success-copy span{font-size:14px}.bf-success-mark{width:88px;height:88px}.bf-success-route .bf-token-icon{width:44px!important;height:44px!important}}@keyframes bf-loading-spin{to{transform:rotate(360deg)}}.bf-swap-toggle{position:absolute;top:100px;left:50%;z-index:1;display:inline-flex;width:32px;height:32px;align-items:center;justify-content:center;padding:0;border:0;border-radius:9999px;background:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-on, #ffffff);box-shadow:0 1px 5px #0000001f;cursor:pointer}.bf-swap-card[data-has-from-error=true] .bf-swap-toggle{top:132px}.bf-details{display:flex;flex-direction:column;gap:24px}.bf-collapse{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows .22s ease,opacity .14s ease,margin-top .22s ease}.bf-collapse[data-open=true]{grid-template-rows:1fr;opacity:1}.bf-collapse:not([data-open=true]){margin-top:calc(-1 * var(--bf-collapse-gap, 0px))}.bf-collapse-inner{overflow:hidden;min-height:0}@keyframes bf-value-in{0%{opacity:.25;transform:translateY(-2px)}}.bf-info-value,.bf-route-amount-value,.bf-route-meta>span{animation:bf-value-in .24s ease-out}@media(prefers-reduced-motion:reduce){.bf-collapse{transition:none}.bf-info-value,.bf-route-amount-value,.bf-route-meta>span{animation:none}}.bf-exchange-rate{display:flex;width:100%;align-items:center;justify-content:center;gap:4px;padding:0 0 24px;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-detail-section,.bf-history-card{display:flex;flex-direction:column;gap:12px;padding:0;border-radius:12px;background:transparent;box-sizing:border-box}.bf-liquidity{display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:12px;background:var(--bf-surface);box-sizing:border-box}.bf-root[data-view=history] .bf-liquidity,.bf-root[data-view=history] .bf-detail-section,.bf-root[data-view=history] .bf-history-card{background:var(--ds-surface-default, #ffffff)}.bf-detail-section h3{margin:0;color:var(--bf-text-high);font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em}.bf-tx-fee-section{gap:12px}.bf-tx-fee-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.bf-collapse-head{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;margin:0;padding:0;background:none;border:none;color:inherit;font:inherit;text-align:left;cursor:pointer}.bf-detail-section[data-open=true] .bf-collapse-head{padding-bottom:12px;border-bottom:1px solid var(--bf-border)}.bf-collapse-chevron{flex-shrink:0;color:var(--bf-text-low);transition:transform .2s ease}.bf-detail-section[data-open=true] .bf-collapse-chevron{transform:rotate(180deg)}.bf-collapse-body{display:flex;flex-direction:column;gap:14px}.bf-root[data-view=history] .bf-detail-section[data-open=true] .bf-collapse-head{border-bottom-color:var(--ds-border-default, rgba(0, 0, 0, .07))}.bf-root[data-view=history] .bf-collapse-chevron{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.bf-tx-fee-total{display:inline-flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0;color:var(--bf-text-medium);font-size:14px;font-weight:600;line-height:1.4;text-align:right}.bf-tx-fee-total>span[data-delegated=true]{text-decoration:line-through;text-decoration-thickness:2px;text-decoration-color:currentColor}.bf-fee-delegated{display:inline-flex;align-items:center;justify-content:center;min-height:24px;padding:2px 8px;border-radius:6px;background:#379cff2e;color:#4eb3ff;font-size:10px;font-weight:500;line-height:1.3;white-space:nowrap}.bf-tx-fee-token{width:16px;height:16px;flex-shrink:0;border-radius:999px;object-fit:cover}.bf-info-card{gap:14px}.bf-info-section{display:flex;flex-direction:column;gap:10px}.bf-info-section+.bf-info-section{padding-top:2px}.bf-info-section h4{margin:0;color:var(--bf-text-high);font-size:14px;font-weight:600;line-height:1.5}.bf-root[data-view=history] .bf-detail-section h3,.bf-root[data-view=history] .bf-info-section h4{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.bf-route-steps{display:flex;flex-direction:column}.bf-route-step{display:grid;min-width:0;grid-template-columns:18px minmax(0,1fr);column-gap:10px}.bf-route-rail{position:relative;display:flex;justify-content:center}.bf-route-line{position:absolute;top:9px;bottom:-4px;width:1px;background:var(--bf-border)}.bf-route-step[data-last=true] .bf-route-line{display:none}.bf-route-dot{z-index:1;width:9px;height:9px;margin-top:5px;border:2px solid var(--bf-text-low);border-radius:999px;background:var(--bf-bg);box-sizing:border-box}.bf-route-dot[data-final=true]{border-color:var(--ds-accent-primary-default, #7e54f4)}.bf-route-body{display:flex;min-width:0;flex-direction:column;gap:2px;padding-bottom:14px}.bf-route-step[data-last=true] .bf-route-body{padding-bottom:0}.bf-route-head{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px}.bf-route-title{min-width:0;overflow:hidden;color:var(--bf-text-high);font-size:13px;font-weight:620;letter-spacing:-.01em;text-overflow:ellipsis;white-space:nowrap}.bf-route-amount{display:inline-flex;flex-shrink:0;align-items:center;gap:4px;color:var(--bf-text-medium);font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}.bf-route-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;color:var(--bf-text-low);font-size:12px;line-height:1.45;font-variant-numeric:tabular-nums}.bf-route-step[data-kind=hop] .bf-route-title{color:var(--bf-text-medium);font-weight:600}.bf-route-step[data-kind=hop] .bf-route-amount{color:var(--bf-text-low);font-weight:500}.bf-route-step[data-kind=hop] .bf-route-dot{width:7px;height:7px;margin-top:6px;border-width:1px}.bf-route-meta>span[data-tone=accent]{color:var(--ds-accent-primary-default, #7e54f4);font-weight:600}.bf-route-meta>span[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00);font-weight:600}.bf-route-meta>span[data-tone=danger]{color:var(--ds-system-red-default, #da0b2e);font-weight:600}.bf-route-tag{padding:1px 6px;border-radius:5px;background:var(--ds-accent-primary-low, rgba(0, 206, 178, .12));color:var(--ds-accent-primary-high, #7346f3);font-size:10px;font-weight:700;letter-spacing:.01em}.bf-info-rows{display:flex;flex-direction:column;gap:8px}.bf-info-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-liquidity-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em}.bf-info-label{display:inline-flex;align-items:center;gap:6px;min-width:0;color:var(--bf-text-low)}.bf-info-value{display:flex;min-width:0;align-items:center;justify-content:flex-end;gap:4px;color:var(--bf-text-medium);text-align:right}.bf-info-route,.bf-info-value-token{display:inline-flex;align-items:center;gap:4px}.bf-info-route .bf-token-icon,.bf-info-value-token .bf-token-icon{flex-shrink:0}.bf-info-route-arrow{display:inline-flex;align-items:center;color:var(--bf-text-medium);font-size:12px;line-height:1}.bf-root[data-view=history] .bf-info-route-arrow{color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.bf-info-value[data-tone=accent]{color:var(--ds-accent-primary-high, #7346f3)}.bf-info-value[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00)}.bf-info-value[data-tone=danger]{color:var(--ds-system-red-default, #da0b2e)}.bf-root[data-view=history] .bf-info-label,.bf-root[data-view=history] .bf-liquidity-head{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.bf-root[data-view=history] .bf-info-value{color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.bf-root[data-view=history] .bf-info-value[data-tone=accent]{color:var(--ds-accent-primary-high, #7346f3)}.bf-root[data-view=history] .bf-info-value[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00)}.bf-root[data-view=history] .bf-info-value[data-tone=danger]{color:var(--ds-system-red-default, #da0b2e)}.bf-liquidity-status{display:inline-flex;align-items:center;gap:6px;padding:4px 12px;border-radius:999px;font-size:13px;font-weight:600;line-height:1.4;white-space:nowrap}.bf-liquidity-status:before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;flex-shrink:0}.bf-liquidity-status[data-status=normal],.bf-liquidity-status:not([data-status]){background:#00ceb21f;color:var(--ds-accent-primary-default, #7e54f4)}.bf-liquidity-status[data-status=normal]:before,.bf-liquidity-status:not([data-status]):before{background:var(--ds-accent-primary-default, #7e54f4)}.bf-liquidity-status[data-status=low]{background:#e56f001f;color:#e56f00}.bf-liquidity-status[data-status=low]:before{background:#e56f00}.bf-liquidity-status[data-status=rebalancing]{background:#da0b2e1a;color:#da0b2e}.bf-liquidity-status[data-status=rebalancing]:before{background:#da0b2e}.bf-liquidity-track{height:8px;overflow:hidden;border-radius:999px;background:var(--bf-surface-hover)}.bf-liquidity-track span{display:block;height:100%;border-radius:inherit;background:var(--ds-accent-primary-default, #7e54f4)}.bf-error{padding:12px;border-radius:12px;background:#da0b2e1f;color:var(--ds-system-red-default, #da0b2e);font-size:13px;line-height:1.4}.bf-footer{display:flex;flex-shrink:0;flex-direction:column;align-items:center;gap:10px;padding:12px 24px 24px;background:var(--ds-bg-default, var(--bf-bg))}.bf-next{width:100%;min-height:48px;padding:12px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-on, #ffffff);font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;cursor:pointer}.bf-next:disabled{cursor:default;opacity:.6}.bf-powered{display:inline-flex;align-items:center;gap:3px;color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;text-decoration:none}.bf-powered:focus-visible{border-radius:4px;outline:2px solid var(--ds-accent-primary-default, #7e54f4);outline-offset:2px}.bf-powered-brand{text-decoration:underline;text-underline-offset:2px}.bf-history-tabs{display:flex;align-items:center;gap:4px;width:100%}.bf-history-tab{position:relative;display:inline-flex;min-height:37px;align-items:center;justify-content:center;padding:8px 12px;border:0;background:transparent;color:var(--ds-content-lowest, rgba(0, 0, 0, .25));font:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0;cursor:pointer}.bf-history-tab[data-active=true]{color:var(--ds-accent-primary-high, #7346f3)}.bf-history-tab[data-active=true]:after{position:absolute;right:8px;bottom:0;left:8px;height:3px;border-radius:999px;background:var(--ds-accent-primary-high, #7346f3);content:""}.bf-history-tab-dot{position:absolute;top:8px;right:4px;width:6px;height:6px;border-radius:999px;background:var(--ds-system-red-default, #da0b2e)}.bf-history-list{display:flex;flex-direction:column;gap:12px}.bf-history-item{display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:12px;background:var(--ds-surface-default, #ffffff);box-sizing:border-box}.bf-history-item-head,.bf-history-meta,.bf-history-route,.bf-history-route-token{display:inline-flex;align-items:center}.bf-history-item-head{justify-content:space-between;gap:12px;width:100%}.bf-history-status{display:inline-flex;min-height:24px;align-items:center;justify-content:center;padding:3px 8px;border-radius:4px;background:var(--ds-system-orange-low, #fcf5e9);color:var(--ds-system-orange-high, #e56f00);font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;white-space:nowrap}.bf-history-status[data-status=completed]{background:var(--ds-system-green-low, #e7f9f8);color:var(--ds-system-green-high, #00a0a2)}.bf-history-status[data-status=failed]{background:var(--ds-system-red-low, rgba(218, 11, 46, .12));color:var(--ds-system-red-default, #da0b2e)}.bf-history-time{min-width:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;text-align:right;white-space:nowrap}.bf-history-item-body{display:flex;flex-direction:column;gap:4px}.bf-history-amount{color:var(--ds-content-high, rgba(0, 0, 0, .85));font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0}.bf-history-meta{justify-content:space-between;gap:12px;min-width:0}.bf-history-usd{min-width:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-size:12px;font-weight:500;line-height:1.5;letter-spacing:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bf-history-route{justify-content:flex-end;gap:4px;min-width:0;color:var(--ds-content-high, rgba(0, 0, 0, .85));font-size:12px;font-weight:600;line-height:1.5;letter-spacing:0}.bf-history-route-token{gap:4px;min-width:0}.bf-history-route-token span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bf-history-route-arrow{flex-shrink:0;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.bf-empty{padding:32px 16px;text-align:center;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-size:14px}.bf-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:767px){.bf-slippage-overlay{align-items:flex-end;padding:0}.bf-slippage-dialog{width:100%;height:auto;min-height:316px;max-height:82dvh;border-right:0;border-bottom:0;border-left:0;border-radius:24px 24px 0 0}}.wi-drawer-content .bf-header{padding:16px}.wi-drawer-content .bf-header .bf-header-btn:last-child{top:16px;right:16px}.wi-drawer-content .bf-body,.wi-drawer-content .bf-history-body{padding:16px}.bf-root[data-variant=embedded]{--bf-bg: #1c1c1d;--bf-surface: #212224;--bf-surface-hover: rgba(255, 255, 255, .08);--bf-border: rgba(255, 255, 255, .1);--bf-text-high: rgba(255, 255, 255, .85);--bf-text-medium: rgba(255, 255, 255, .65);--bf-text-low: rgba(255, 255, 255, .4);--bf-embedded-primary: #f3742e;--bf-embedded-on-primary: #ffffff;background:var(--bf-bg);color:#fff}.gou-shell[data-theme=light] .bf-root[data-variant=embedded]{--bf-bg: #ffffff;--bf-surface: #ffffff;--bf-surface-hover: rgba(0, 0, 0, .03);--bf-border: rgba(0, 0, 0, .06);--bf-text-high: rgba(0, 0, 0, .85);--bf-text-medium: rgba(0, 0, 0, .65);--bf-text-low: rgba(0, 0, 0, .4);color:#000}.bf-root[data-variant=embedded] .bf-header{min-height:64px;justify-content:flex-start;gap:12px;padding:16px 20px 12px;border-bottom-color:var(--bf-border);background:var(--bf-bg)}.bf-root[data-variant=embedded] .bf-header .bf-header-btn:last-child{top:16px;right:20px}.bf-root[data-variant=embedded] .bf-header-btn{color:var(--bf-text-medium)}.bf-root[data-variant=embedded] .bf-header-title{position:static;flex:1;padding-right:36px;transform:none;color:var(--bf-text-high);font-size:18px;font-weight:600;line-height:1.5;text-align:left}.bf-root[data-variant=embedded] .bf-header-spacer{display:none}.bf-root[data-variant=embedded] .bf-embedded-body{padding:20px}.bf-embedded-form{display:flex;width:100%;min-width:0;flex-direction:column;gap:20px;--bf-collapse-gap: 20px}.bf-embedded-fields{position:relative;display:flex;width:100%;flex-direction:column}.bf-embedded-field-group{display:flex;width:100%;flex-direction:column;gap:8px}.bf-embedded-amount-panel{display:flex;width:100%;min-width:0;flex-direction:column;padding:16px;border:1px solid rgba(255,255,255,.025);border-radius:12px;background:#212224;box-sizing:border-box}.gou-shell[data-theme=light] .bf-embedded-amount-panel{border-color:#00000014;background:#fff}.bf-embedded-amount-head{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.bf-embedded-amount-label{display:inline-flex;min-width:0;align-items:center;gap:8px;white-space:nowrap}.bf-embedded-amount-label strong{color:var(--bf-text-medium);font-size:14px;font-weight:700;line-height:1.5}.bf-embedded-amount-label>span{color:var(--bf-text-low);font-size:12px;font-weight:500;line-height:1.5}.bf-embedded-amount-label em{padding:2px 6px;border-radius:9999px;background:#f3742e1a;color:var(--bf-embedded-primary);font-size:11px;font-style:normal;font-weight:500;line-height:1.25}.bf-embedded-balance{display:inline-flex;min-width:0;max-width:100%;flex-shrink:1;align-items:center;justify-content:flex-end;gap:6px;overflow:hidden;color:var(--bf-text-medium);font-size:12px;font-weight:600;line-height:1.5;text-align:right;white-space:nowrap}.bf-embedded-balance>svg,.bf-embedded-balance>span:not(.bf-embedded-balance-value){flex-shrink:0}.bf-embedded-balance-value{min-width:0;overflow:hidden;text-overflow:ellipsis}.bf-embedded-balance button{flex-shrink:0;padding:2px 8px;border:0;border-radius:9999px;background:#f3742e26;color:var(--bf-embedded-primary);font:inherit;font-size:11px;font-weight:700;line-height:1.4;cursor:pointer}.bf-embedded-balance button:hover{background:#f3742e40}.bf-embedded-amount-main{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px}.bf-embedded-token-pill{display:inline-flex;height:32px;flex-shrink:0;align-items:center;gap:6px;padding:0 12px 0 6px;border:1px solid rgba(255,255,255,.1);border-radius:9999px;background:#ffffff0d;color:#fff;font:inherit;font-size:14px;font-weight:700;line-height:1.5;cursor:pointer;perspective:220px;overflow:hidden;transition:transform .12s ease,background .15s ease}.gou-shell[data-theme=light] .bf-embedded-token-pill{border-color:#0000000f;background:#00000008;color:#000}.bf-embedded-token-pill:disabled{cursor:default;opacity:1}.bf-embedded-input-wrap{display:flex;min-width:0;flex:1}.bf-embedded-amount-input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:#fff;font:inherit;font-size:24px;font-size:clamp(18px,6cqi,24px);font-weight:700;line-height:32px;text-align:right}.gou-shell[data-theme=light] .bf-embedded-amount-input{color:#000}.bf-embedded-amount-input[data-size=medium]{font-size:20px;font-size:clamp(16px,5cqi,20px);line-height:28px}.bf-embedded-amount-input[data-size=small]{font-size:16px;font-size:clamp(14px,4cqi,16px);line-height:24px}.bf-embedded-amount-input::placeholder{color:var(--bf-text-low);opacity:1}.bf-embedded-field-error{color:#ff3c53;font-size:12px;font-weight:400;line-height:1.5}.bf-embedded-direction{position:relative;z-index:10;display:flex;width:100%;align-items:center;justify-content:center;margin:-12px 0}.bf-embedded-direction>span{display:inline-flex;width:36px;height:36px;align-items:center;justify-content:center;border-radius:9999px;background:var(--bf-embedded-primary);color:var(--bf-embedded-on-primary)}.bf-embedded-summary{display:flex;width:100%;flex-direction:column;gap:12px}.bf-embedded-details{display:flex;width:100%;flex-direction:column;gap:16px;padding:0 16px 16px;box-sizing:border-box}.bf-embedded-details .bf-info-section{gap:12px}.bf-embedded-details .bf-info-section+.bf-info-section{padding-top:0}.bf-embedded-details .bf-info-section h4{color:#fffc;font-size:14px;font-weight:700}.gou-shell[data-theme=light] .bf-embedded-details .bf-info-section h4{color:#000c}.bf-embedded-details .bf-info-rows{gap:12px}.bf-embedded-details .bf-info-row{min-height:20px;font-size:13px;font-weight:600}.bf-embedded-details .bf-info-label{gap:6px;color:var(--bf-text-medium);font-size:13px;font-weight:400}.bf-embedded-details .bf-info-value{color:var(--bf-text-medium);font-size:13px;font-weight:600}.bf-embedded-details .bf-info-value[data-tone=accent]{color:var(--bf-embedded-primary)}.bf-embedded-details .bf-info-route-arrow{color:var(--bf-text-medium)}.bf-embedded-liquidity{display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:12px;background:var(--bf-surface)}.bf-embedded-liquidity>div{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--bf-text-medium);font-size:14px}.bf-embedded-liquidity>div>span:last-child{text-transform:capitalize}.bf-embedded-liquidity-track{display:block;height:8px;overflow:hidden;border-radius:9999px;background:var(--bf-surface-hover)}.bf-embedded-liquidity-track>span{display:block;height:100%;border-radius:inherit;background:var(--bf-embedded-primary)}.bf-embedded-liquidity-error{padding:12px 16px;border:1px solid rgba(255,60,83,.3);border-radius:8px;background:#ff3c531a;color:#ff3c53;font-size:14px;line-height:1.5;text-align:center}.bf-embedded-action-footer{width:100%;flex-shrink:0}.bf-embedded-cta{display:flex;width:100%;height:52px;flex-shrink:0;align-items:center;justify-content:center;padding:0 16px;border:0;border-radius:12px;background:var(--bf-embedded-primary);color:var(--bf-embedded-on-primary);font:inherit;font-size:16px;font-weight:600;line-height:1.5;cursor:pointer;transition:opacity .15s ease,background-color .15s ease;box-sizing:border-box}.bf-embedded-cta:hover:not(:disabled){background:#f3742ee6}.bf-embedded-cta:disabled{cursor:not-allowed;opacity:.6}.bf-embedded-spinner{width:20px;height:20px;border:2px solid var(--bf-embedded-on-primary);border-top-color:transparent;border-radius:9999px;animation:bf-loading-spin .9s linear infinite}@media(max-width:767px){.bf-root[data-variant=embedded] .bf-header{min-height:50px;padding:12px 16px 8px;border-bottom:0}.bf-root[data-variant=embedded] .bf-header .bf-header-btn:last-child{display:none}.bf-root[data-variant=embedded] .bf-embedded-body{padding:12px 16px calc(env(safe-area-inset-bottom,0px) + 12px);overscroll-behavior:contain;scroll-padding-bottom:calc(env(safe-area-inset-bottom,0px) + 76px);-webkit-overflow-scrolling:touch}.bf-root[data-variant=embedded] .bf-embedded-action-footer{position:sticky;bottom:0;z-index:20;padding-top:12px;background:var(--bf-bg);isolation:isolate}.bf-root[data-variant=embedded] .bf-embedded-action-footer:after{position:absolute;z-index:-1;top:100%;right:0;left:0;height:calc(env(safe-area-inset-bottom,0px) + 32px);background:var(--bf-bg);box-shadow:0 16px 0 16px var(--bf-bg);content:"";pointer-events:none}.bf-root[data-variant=embedded][data-soft-keyboard-open=true] .bf-embedded-action-footer{position:static;padding-top:0}.bf-root[data-variant=embedded][data-soft-keyboard-open=true] .bf-embedded-action-footer:after{display:none}.bf-root[data-variant=embedded][data-soft-keyboard-open=true] .bf-embedded-body{scroll-padding-bottom:24px}.bf-embedded-amount-head{gap:8px}.bf-embedded-amount-label{gap:6px}.bf-embedded-balance{gap:4px}}
11
+ `);var m=require("react/jsx-runtime"),Gm=me.createContext(void 0);function Ma(){return me.useContext(Gm)}function wy(e){let[t,n]=me.useState(void 0);return me.useEffect(()=>{let r=e.current;if(!r)return;let o=()=>{let i=r.closest("[data-theme]");n(i?.getAttribute("data-theme")??void 0)};o();let a=new MutationObserver(o);return a.observe(document.documentElement,{attributes:!0,subtree:!0,attributeFilter:["data-theme"]}),()=>a.disconnect()},[e]),t}var zm=[{value:"0.1",label:"0.1%"},{value:"0.5",label:"0.5%"},{value:"1",label:"1%"},{value:"5",label:"5%"}],yy=[{value:"all",label:"ALL"},{value:"completed",label:"Completed"},{value:"pending",label:"Pending"}];function xy(e,t){return e==="auto"?t?`Auto ${t}%`:"Auto":e?`${e}%`:"1%"}function Fm(e){let t=e.replace(/[^\d.]/g,""),[n="",...r]=t.split("."),o=r.join("");return r.length===0?n:`${n}.${o.slice(0,2)}`}function Hm(e){return`${e.chainId}:${e.address.toLowerCase()}`}function _m(e){let t=Number(e);return Number.isFinite(t)?t.toLocaleString("en-US",{maximumFractionDigits:t>=1?2:6}):e||"0"}function Um(e,t){let n=Number(e||"0"),r=t?.priceUsd??0;return`\u2248 $${(Number.isFinite(n)?n*r:0).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})} USD`}function vy(e,t=6){if(!e)return e;let[n,r=""]=e.split(".");if(!r)return n;let o=r.slice(0,t).replace(/0+$/,"");return o?`${n}.${o}`:n}function Vm(e,t){if(!t)return!1;let n=kt(e),r=kt(t.balance);return!n||!r?!1:n.isGreaterThan(r)}function Ia(e){if(!e.isFinite()||e.isNaN())return"0";let n=e.decimalPlaces(6,Id.default.ROUND_DOWN).toFixed(6).replace(/\.?0+$/,""),[r="0",o]=n.split("."),a=new Id.default(r||"0").toFormat(0);return o?`${a}.${o}`:a}function ky(e){return e.length<=14?e:`${e.slice(0,6)}...${e.slice(-6)}`}function Cy(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return e;let n=r=>r.toString().padStart(2,"0");return[`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}`,`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`].join(" ")}function Ry(e){let t=kt(e);return t?Ia(t):e||"0"}function Ny(e,t){if(t?.priceUsd===void 0)return null;let n=kt(e);if(!n)return null;let r=n.multipliedBy(t.priceUsd);return r.isFinite()?`$${r.toFormat(2)}`:null}function Ns(e){return e.status==="success"?"completed":e.status==="failed"?"failed":"pending"}function Sy(e,t){return t==="all"?!0:Ns(e)===t}function Ty(e){return e==="completed"?"Completed":e==="failed"?"Failed":"Pending"}function Go(e){return e===56||e===97?"BSC":e===612044||e===612055||e===5555?"ONEchain":`Chain ${e}`}function Qm(e,t){return!!e&&!!t&&e.chainId===t.chainId&&e.address.toLowerCase()===t.address.toLowerCase()}function qm(e,t){if(!(!e||!t))return e.chainId===t.chainId?"swap":Qm(e,t)||e.symbol.toLowerCase()===t.symbol.toLowerCase()?"bridge":"swap-bridge"}function Ym(e){return e==="swap"||e==="deposit-swap"||e==="swap-withdraw"}function vs(e){return!e||e==="0"||Number(e)===0}function Km(e){let t=e.trim().toLowerCase();return t?t.startsWith("minimum ")?{from:e}:t.startsWith("available ")&&t.includes("or more")?{to:e}:t.includes("insufficient balance")||t.includes("not enough balance")||t.includes("exceeds balance")||t.includes("insufficient network fee")?{from:e}:t.includes("insufficient liquidity")||t.includes("not enough liquidity")?{to:e}:{}:{}}function Zm(e){let t=e.fromToken,n=e.toToken,r=qm(t,n),o=e.fromAmount||"0",a=e.toAmount||"0",i=r!==void 0&&!Ym(r),s=r!==void 0&&r!=="bridge";return{pathType:r,bridgeInfo:i?[{label:"Route",value:t&&n?`${Go(t.chainId)} \u2192 ${Go(n.chainId)}`:"-"},{label:"Validator Fee",value:vs(o)?"0":"Free",tone:vs(o)?"default":"accent"},{label:"Network Fee",value:vs(o)?"0":"Free",tone:vs(o)?"default":"accent"}]:void 0,swapInfo:s?[t&&n?{label:"Route",value:"",routeTokens:[{symbol:t.symbol,iconUrl:t.iconUrl},{symbol:n.symbol,iconUrl:n.iconUrl}]}:{label:"Route",value:"-"},{label:"Price Impact",value:"0%"},{label:"In Amount",value:o,valueToken:t?{symbol:t.symbol,iconUrl:t.iconUrl}:void 0},{label:"Swap Fee",value:"0",valueToken:t?{symbol:t.symbol,iconUrl:t.iconUrl}:void 0},{label:"Out Amount",value:a,valueToken:n?{symbol:n.symbol,iconUrl:n.iconUrl}:void 0}]:void 0,txFee:[{label:"Priority Fee Per Gas",value:"0 Gwei"},{label:"Max Fee Per Gas",value:"0 Gwei"},{label:"Gas Limit",value:"0"}],txFeeInfo:{estTxFee:"0",isDelegateFee:!1}}}function Ea({token:e,size:t=20}){let n=e?.iconUrl;return(0,m.jsx)("span",{className:"bf-token-icon","data-has-image":!!n?"true":"false",style:{width:t,height:t},children:n?(0,m.jsx)("img",{src:n,alt:"",width:t,height:t,draggable:!1}):(0,m.jsx)("span",{className:"bf-token-fallback",children:e?.symbol?.slice(0,1)??"?"})})}function ks(e,t){if(e.length===0)return;let n=e.findIndex(r=>Qm(r,t));return e[(n+1)%e.length]}function jm({label:e,token:t,amount:n,usd:r,onAmountChange:o,onTokenClick:a,locked:i=!1}){return(0,m.jsxs)("section",{className:"bf-amount-panel",children:[(0,m.jsxs)("div",{className:"bf-amount-head",children:[(0,m.jsx)("span",{children:e}),(0,m.jsxs)("span",{className:"bf-balance",children:[_m(t?.balance??"0")," ",t?.symbol??""]})]}),(0,m.jsxs)("div",{className:"bf-amount-main",children:[(0,m.jsxs)("label",{className:"bf-amount-input-wrap",children:[(0,m.jsxs)("span",{className:"bf-sr-only",children:[e," amount"]}),(0,m.jsx)("input",{type:"text",inputMode:"decimal",value:n,onChange:s=>o(s.target.value),placeholder:"0",className:"bf-amount-input","data-size":Xm(n)}),(0,m.jsx)("span",{className:"bf-amount-usd",children:r})]}),(0,m.jsxs)("button",{type:"button",className:"bf-token-pill",onClick:i?void 0:a,disabled:!i&&!a,"data-locked":i?"true":void 0,"data-track":i?void 0:"token_switch","data-track-id":e.toLowerCase(),"aria-label":`Switch ${e.toLowerCase()} token`,children:[(0,m.jsxs)("span",{className:"bf-token-pill-face",children:[(0,m.jsx)(Ea,{token:t}),(0,m.jsx)("span",{children:t?.symbol??"Select"})]},t?Hm(t):"none"),!i&&(0,m.jsx)(zn,{size:16})]})]})]})}function Iy(e){if(!e)return"";let[t="",n]=e.replace(/,/g,"").split("."),r=t.replace(/\B(?=(\d{3})+(?!\d))/g,",");return n===void 0?r:`${r}.${n}`}function Xm(e){let t=e.replace(/,/g,"").trim().length;return t>26?"small":t>18?"medium":"large"}function Ey(){return(0,m.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[(0,m.jsx)("path",{d:"M2.333 4.667A1.667 1.667 0 0 1 4 3h7.333A1.667 1.667 0 0 1 13 4.667v6.666A1.667 1.667 0 0 1 11.333 13H4a1.667 1.667 0 0 1-1.667-1.667V4.667Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,m.jsx)("path",{d:"M2.667 5.333h9.666c.737 0 1.334.597 1.334 1.334v2.666c0 .737-.597 1.334-1.334 1.334H9.667A2.667 2.667 0 0 1 7 8a2.667 2.667 0 0 1 2.667-2.667Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,m.jsx)("circle",{cx:"10",cy:"8",r:".75",fill:"currentColor"})]})}function Wm({label:e,token:t,amount:n,onAmountChange:r,onTokenClick:o,onMax:a,locked:i}){return(0,m.jsxs)("section",{className:"bf-embedded-amount-panel",children:[(0,m.jsxs)("div",{className:"bf-embedded-amount-head",children:[(0,m.jsxs)("span",{className:"bf-embedded-amount-label",children:[(0,m.jsx)("strong",{children:e}),!(e==="From")&&(0,m.jsx)("em",{children:"estimated"})]}),t&&(0,m.jsxs)("span",{className:"bf-embedded-balance",children:[(0,m.jsx)(Ey,{}),(0,m.jsx)("span",{className:"bf-embedded-balance-value",children:_m(t.balance)}),(0,m.jsx)("span",{children:t.symbol}),a&&(0,m.jsx)("button",{type:"button",onClick:a,"aria-label":"Use maximum available balance",children:"MAX"})]})]}),(0,m.jsxs)("div",{className:"bf-embedded-amount-main",children:[(0,m.jsxs)("button",{type:"button",className:"bf-embedded-token-pill",onClick:i?void 0:o,disabled:i,"data-locked":i?"true":void 0,"aria-label":`Switch ${e.toLowerCase()} token`,children:[(0,m.jsxs)("span",{className:"bf-token-pill-face",children:[(0,m.jsx)(Ea,{token:t}),(0,m.jsx)("span",{children:t?.symbol??"Select"})]},t?Hm(t):"none"),!i&&(0,m.jsx)(zn,{size:14})]}),(0,m.jsxs)("label",{className:"bf-embedded-input-wrap",children:[(0,m.jsxs)("span",{className:"bf-sr-only",children:[e," amount"]}),(0,m.jsx)("input",{type:"text",inputMode:"decimal",value:Iy(n),onChange:l=>r(l.target.value),placeholder:"0.00",className:"bf-embedded-amount-input","data-size":Xm(n)})]})]})]})}function Ay({flow:e,onClose:t}){let n=me.useId(),[r,o]=me.useState(null),a=zm.find(y=>y.value===e.slippage),[i,s]=me.useState(e.slippage&&!a?e.slippage:""),l=i.trim()!==""&&i.trim()!==".",d=l?Number(i):NaN,p=Number.isFinite(d)&&d>50,h=Number.isFinite(d)&&d>5&&!p,u=y=>{e.setSlippage(y),t()},g=()=>{!l||p||(e.setSlippage(Fm(i)),t())};if(me.useEffect(()=>{o(document.body)},[]),me.useEffect(()=>{let y=f=>{f.key==="Escape"&&t()};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[t]),!r)return null;let x=Ma();return(0,Ho.createPortal)((0,m.jsx)("div",{className:"bf-slippage-overlay","data-theme":x,role:"presentation",onMouseDown:y=>{y.target===y.currentTarget&&t()},children:(0,m.jsxs)("section",{className:"bf-slippage-dialog",role:"dialog","aria-modal":"true","aria-labelledby":n,children:[(0,m.jsxs)("header",{className:"bf-slippage-head",children:[(0,m.jsx)("h3",{id:n,children:"Slippage Settings"}),(0,m.jsx)("button",{type:"button",className:"bf-slippage-close",onClick:t,"aria-label":"Close slippage settings",children:(0,m.jsx)(vn,{size:24})})]}),(0,m.jsxs)("div",{className:"bf-slippage-body",children:[(0,m.jsx)("p",{className:"bf-slippage-desc",children:"The maximum price difference you are willing to accept before the transaction is reverted. Higher slippage increases the chance of execution but may result in a worse price."}),(0,m.jsxs)("div",{className:"bf-slippage-controls",children:[(0,m.jsx)("div",{className:"bf-slippage-presets",children:zm.map(y=>(0,m.jsx)("button",{type:"button",className:"bf-slippage-preset","data-selected":!l&&e.slippage===y.value?"true":"false",onClick:()=>u(y.value),children:y.label},y.value))}),(0,m.jsxs)("label",{className:"bf-slippage-custom","data-selected":l?"true":"false",children:[(0,m.jsx)("span",{className:"bf-sr-only",children:"Custom slippage percent"}),(0,m.jsx)("input",{value:i,onChange:y=>{s(Fm(y.target.value))},onKeyDown:y=>{y.key==="Enter"&&(y.preventDefault(),g())},inputMode:"decimal",placeholder:"Enter custom slippage",autoComplete:"off",spellCheck:!1}),(0,m.jsx)("span",{"aria-hidden":"true",children:"%"})]})]}),p?(0,m.jsx)("p",{className:"bf-slippage-message","data-variant":"error",children:"Slippage cannot exceed 50%."}):h?(0,m.jsx)("p",{className:"bf-slippage-message","data-variant":"warning",children:"Your transaction may be frontrun due to high slippage."}):null,l&&(0,m.jsx)("button",{type:"button",className:"bf-slippage-apply",onClick:g,disabled:p,children:"Apply"})]})]})}),r)}function Jm({flow:e,env:t}){let n=me.useId(),[r,o]=me.useState(!1),[a,i]=me.useState(null),s=Ma(),l=Xt("apps.json",t,u=>Bn(u?.legal?.termsUrl,t)),d=e.termsUrl??l??Ep;me.useEffect(()=>{i(document.body)},[]),me.useEffect(()=>{let u=g=>{g.key==="Escape"&&e.cancelTerms()};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[e]);let[p,h]=ws(e.termsOpen);return!a||!p?null:(0,Ho.createPortal)((0,m.jsx)("div",{className:"bf-action-modal-overlay","data-theme":s,"data-state":h,role:"presentation",onPointerDown:u=>{u.target===u.currentTarget&&e.cancelTerms()},children:(0,m.jsxs)("section",{className:"bf-action-modal bf-terms-modal",role:"dialog","aria-modal":"true","aria-labelledby":n,children:[(0,m.jsx)("h3",{id:n,children:"Agree to Terms of Service"}),(0,m.jsx)("p",{className:"bf-action-modal-desc",children:"Please make sure to review the Terms of Service before using ONEUSD."}),(0,m.jsxs)("div",{className:"bf-terms-check-row","data-checked":r?"true":"false",children:[(0,m.jsx)("button",{type:"button",className:"bf-terms-check-button",role:"checkbox","aria-checked":r,"aria-label":"Agree to Terms of Use","data-track":"terms_check",onClick:()=>o(u=>!u),children:(0,m.jsx)("span",{className:"bf-terms-checkbox","data-checked":r?"true":"false","aria-hidden":"true"})}),(0,m.jsxs)("div",{className:"bf-terms-copy",children:[(0,m.jsx)("span",{className:"bf-terms-label",onClick:()=>o(u=>!u),children:"Agree to Terms of Use"}),d&&(0,m.jsx)("a",{href:d,target:"_blank",rel:"noreferrer",children:"Terms of Service"})]})]}),(0,m.jsx)("p",{className:"bf-terms-privacy",children:"I have read and acknowledged the Privacy Policy to use ONEUSD"}),(0,m.jsx)("button",{type:"button",className:"bf-action-primary",disabled:!r||e.status==="submitting",onClick:e.confirmTerms,"data-track":"terms_confirm",children:"Confirm"})]})}),a)}function My({value:e,disabled:t=!1}){let[n,r]=me.useState(!1);return(0,m.jsx)("button",{type:"button",className:"bf-copy-button","aria-label":"Copy token address",disabled:t,onClick:()=>{t||navigator.clipboard?.writeText(e).then(()=>{r(!0),window.setTimeout(()=>r(!1),1200)})},children:n?"OK":"Copy"})}function $m({flow:e,approval:t}){let n=me.useId(),[r,o]=me.useState(null),a=Ma();me.useEffect(()=>{o(document.body)},[]),me.useEffect(()=>{if(!t)return;let p=h=>{e.status!=="submitting"&&h.key==="Escape"&&e.cancelApproval()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[e,t]);let[i,s]=ws(t);if(!r||!i)return null;let l=e.status==="submitting"||!e.approveBridge,d=e.status==="submitting";return(0,Ho.createPortal)((0,m.jsx)("div",{className:"bf-action-modal-overlay","data-theme":a,"data-state":s,role:"presentation",children:(0,m.jsxs)("section",{className:"bf-action-modal bf-approve-modal",role:"dialog","aria-modal":"true","aria-labelledby":n,children:[(0,m.jsxs)("h3",{id:n,children:["Approve ",i.token.symbol]}),(0,m.jsx)(Ea,{token:i.token,size:72}),(0,m.jsxs)("div",{className:"bf-approve-address-box",children:[(0,m.jsx)("span",{children:"Token Address"}),(0,m.jsxs)("div",{children:[(0,m.jsx)("strong",{children:i.tokenAddress}),(0,m.jsx)(My,{value:i.tokenAddress,disabled:d})]})]}),(0,m.jsxs)("div",{className:"bf-action-buttons",children:[(0,m.jsx)("button",{type:"button",className:"bf-action-secondary",onClick:e.cancelApproval,disabled:e.status==="submitting",children:"Cancel"}),(0,m.jsxs)("button",{type:"button",className:"bf-action-primary",onClick:e.confirmApproval,disabled:l,"aria-busy":d,"data-track":"approve_confirm",children:[d&&(0,m.jsx)("span",{className:"bf-action-button-spinner","aria-hidden":"true"}),(0,m.jsx)("span",{children:d?"Approving...":"Approve"})]})]})]})}),r)}function eg({flow:e}){let t=me.useId(),[n,r]=me.useState(null),o=Ma();me.useEffect(()=>{r(document.body)},[]),me.useEffect(()=>{if(!e.approvalSuccessOpen)return;let l=d=>{d.key==="Escape"&&e.cancelApproval()};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[e]);let[a,i]=ws(e.approvalSuccessOpen);if(!n||!a)return null;let s=e.status==="submitting";return(0,Ho.createPortal)((0,m.jsx)("div",{className:"bf-action-modal-overlay","data-theme":o,"data-state":i,role:"presentation",children:(0,m.jsxs)("section",{className:"bf-action-modal bf-approval-success-modal",role:"dialog","aria-modal":"true","aria-labelledby":t,children:[(0,m.jsx)("h3",{id:t,children:"Approval Success"}),(0,m.jsx)("span",{className:"bf-success-mark","aria-hidden":"true"}),(0,m.jsxs)("p",{className:"bf-action-modal-desc",children:["Token approval confirmed successfully.",(0,m.jsx)("br",{}),"Please continue to the next step."]}),(0,m.jsxs)("div",{className:"bf-action-buttons",children:[(0,m.jsx)("button",{type:"button",className:"bf-action-secondary",onClick:e.cancelApproval,disabled:s,children:"Cancel"}),(0,m.jsxs)("button",{type:"button",className:"bf-action-primary",onClick:e.continueAfterApproval,disabled:s,"aria-busy":s,children:[s&&(0,m.jsx)("span",{className:"bf-action-button-spinner","aria-hidden":"true"}),(0,m.jsx)("span",{children:s?"Continuing...":"Continue"})]})]})]})}),n)}function Ly({fromAmount:e,toAmount:t,fromToken:n,toToken:r}){let o=me.useMemo(()=>{let i=kt(e),s=kt(t);return!i||!s||i.lte(0)||s.lte(0)?null:s.dividedBy(i)},[e,t]),a=!!(o&&n&&r&&n.symbol!==r.symbol);return(0,m.jsx)(Ta,{open:a,children:(0,m.jsxs)("div",{className:"bf-exchange-rate",children:[(0,m.jsxs)("span",{children:["1 ",n?.symbol]}),(0,m.jsx)("span",{"aria-hidden":"true",children:"="}),(0,m.jsxs)("span",{children:[o?Ia(o):""," ",r?.symbol]})]})})}function tg({flow:e}){return e.submitToast?(0,m.jsxs)("div",{className:"bf-status-toast","data-variant":"processing",role:"status","aria-live":"polite",children:[(0,m.jsx)("span",{className:"bf-status-toast-icon","aria-hidden":"true",children:(0,m.jsx)("span",{className:"bf-status-spinner"})}),(0,m.jsxs)("span",{className:"bf-status-toast-copy",children:[(0,m.jsx)("strong",{children:"Transaction Processing"}),(0,m.jsx)("span",{children:"Your transaction is being processed on the blockchain"})]})]}):null}function ng({message:e}){let[t,n]=me.useState(!1);return me.useEffect(()=>{if(!e){n(!1);return}n(!0);let r=window.setTimeout(()=>{n(!1)},3500);return()=>window.clearTimeout(r)},[e]),!e||!t?null:(0,m.jsxs)("div",{className:"bf-status-toast","data-variant":"error",role:"alert","aria-live":"assertive",children:[(0,m.jsx)("span",{className:"bf-status-toast-icon","aria-hidden":"true",children:(0,m.jsx)("span",{className:"bf-status-error-mark",children:"!"})}),(0,m.jsxs)("span",{className:"bf-status-toast-copy",children:[(0,m.jsx)("strong",{children:"Error"}),(0,m.jsx)("span",{children:e})]})]})}function Dy(e){switch(e){case"swap":case"deposit-swap":case"swap-withdraw":return"Swap Transaction Sent";case"bridge":return"Bridge Transaction Sent";case"swap-bridge":return"Swap & Bridge Transaction Sent";case"bridge-swap":return"Bridge & Swap Transaction Sent";default:return"Transaction Sent"}}function rg({flow:e}){let t=me.useId(),[n,r]=me.useState(null),o=e.submitted,a=Ma();return me.useEffect(()=>{r(document.body)},[]),me.useEffect(()=>{if(!e.successDialogOpen)return;let i=s=>{s.key==="Escape"&&e.dismissSuccessDialog()};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[e]),!n||!e.successDialogOpen||!o?null:(0,Ho.createPortal)((0,m.jsx)("div",{className:"bf-success-overlay","data-theme":a,role:"presentation",children:(0,m.jsx)("section",{className:"bf-success-modal",role:"dialog","aria-modal":"true","aria-labelledby":t,children:(0,m.jsxs)("div",{className:"bf-success-body",children:[(0,m.jsx)("span",{className:"bf-success-mark","aria-hidden":"true"}),(0,m.jsxs)("div",{className:"bf-success-copy",children:[(0,m.jsx)("strong",{id:t,children:Dy(o.pathType)}),(0,m.jsx)("span",{children:"Please check the results in the history."})]}),(0,m.jsx)("div",{className:"bf-success-route","aria-hidden":"true",children:(o.routeTokens&&o.routeTokens.length>0?o.routeTokens:[{symbol:o.fromToken.symbol,iconUrl:o.fromToken.iconUrl},{symbol:o.toToken.symbol,iconUrl:o.toToken.iconUrl}]).map((i,s)=>(0,m.jsxs)(me.Fragment,{children:[s>0&&(0,m.jsx)("span",{className:"bf-success-route-arrow",children:"\u2192"}),(0,m.jsx)(Aa,{token:i,size:43})]},`${i.symbol}-${s}`))}),(0,m.jsx)("button",{type:"button",className:"bf-success-ok",onClick:e.dismissSuccessDialog,"data-track":"success_ok",children:"OK"})]})})}),n)}function Aa({token:e,size:t=16}){let n=!!e.iconUrl;return(0,m.jsx)("span",{className:"bf-token-icon","data-has-image":n?"true":"false",style:{width:t,height:t},children:e.iconUrl?(0,m.jsx)("img",{src:e.iconUrl,alt:"",width:t,height:t,draggable:!1}):(0,m.jsx)("span",{className:"bf-token-fallback",children:e.symbol?.slice(0,1)??"?"})})}function Py({row:e}){return e.routeTokens&&e.routeTokens.length>0?(0,m.jsx)("span",{className:"bf-info-route",children:e.routeTokens.map((t,n)=>(0,m.jsxs)(me.Fragment,{children:[n>0&&(0,m.jsx)("span",{className:"bf-info-route-arrow","aria-hidden":"true",children:"\u2192"}),(0,m.jsx)(Aa,{token:t})]},`${t.symbol}-${n}`))}):e.valueToken?(0,m.jsxs)("span",{className:"bf-info-value-token",children:[(0,m.jsx)(Aa,{token:e.valueToken}),(0,m.jsx)("span",{children:e.value})]}):(0,m.jsx)(m.Fragment,{children:e.value})}function og({rows:e}){return!e||e.length===0?null:(0,m.jsx)("div",{className:"bf-info-rows",children:e.map(t=>(0,m.jsxs)("div",{className:"bf-info-row",children:[(0,m.jsx)("span",{className:"bf-info-label",children:t.label}),(0,m.jsx)("span",{className:"bf-info-value","data-tone":t.tone??"default",children:(0,m.jsx)(Py,{row:t})})]},`${t.label}-${t.value}`))})}function Oy(e,t,n){return e.pathType==="bridge"?"Bridge Info":Ym(e.pathType)?"Swap Info":t&&n?"Swap & Bridge Info":t?"Bridge Info":"Swap Info"}function Ta({open:e,className:t,children:n}){let r=me.useRef(null);return e&&(r.current=n),(0,m.jsx)("div",{className:t?`bf-collapse ${t}`:"bf-collapse","data-open":e?"true":"false","aria-hidden":e?void 0:!0,children:(0,m.jsx)("div",{className:"bf-collapse-inner",children:e?n:r.current})})}function By({summary:e,from:t,to:n,feeDelegated:r}){let o=!!e.bridgeInfo?.length,a=!!e.swapInfo?.length,i=!!e.txFee?.length,s=Oy(e,o,a),[l,d]=me.useState(!0),[p,h]=me.useState(!0);return(0,m.jsxs)("div",{className:"bf-details",children:[e.liquidity&&(0,m.jsxs)("section",{className:"bf-liquidity",children:[(0,m.jsxs)("div",{className:"bf-liquidity-head",children:[(0,m.jsx)("span",{children:e.liquidity.label??"Available Liquidity"}),(0,m.jsx)("span",{className:"bf-liquidity-status","data-status":e.liquidity.status,children:e.liquidity.status??"Normal"})]}),(0,m.jsx)("div",{className:"bf-liquidity-track",children:(0,m.jsx)("span",{style:{width:`${e.liquidity.percentage??50}%`}})})]}),(o||a)&&(0,m.jsxs)("section",{className:"bf-detail-section bf-info-card","data-open":l?"true":"false",children:[(0,m.jsxs)("button",{type:"button",className:"bf-collapse-head","aria-expanded":l,onClick:()=>d(u=>!u),"data-track":"details_toggle",children:[(0,m.jsx)("h3",{children:s}),(0,m.jsx)(zn,{size:16,className:"bf-collapse-chevron"})]}),l&&(0,m.jsx)("div",{className:"bf-collapse-body",children:(0,m.jsx)(sg,{summary:e,from:t,to:n,feeDelegated:r})})]}),i&&(0,m.jsxs)("section",{className:"bf-detail-section bf-tx-fee-section","data-open":p?"true":"false",children:[(0,m.jsxs)("button",{type:"button",className:"bf-collapse-head bf-tx-fee-head","aria-expanded":p,onClick:()=>h(u=>!u),"data-track":"details_toggle",children:[(0,m.jsx)("h3",{children:"Est. Tx Fee"}),(0,m.jsxs)("div",{className:"bf-tx-fee-total",children:[e.txFeeInfo?.isDelegateFee&&(0,m.jsx)("span",{className:"bf-fee-delegated",children:"Fee Delegated"}),e.txFeeInfo?.tokenIconUrl&&(0,m.jsx)("img",{className:"bf-tx-fee-token",src:e.txFeeInfo.tokenIconUrl,alt:e.txFeeInfo.tokenSymbol??"",width:16,height:16,draggable:!1}),(0,m.jsx)("span",{"data-delegated":e.txFeeInfo?.isDelegateFee&&Number(e.txFeeInfo?.estTxFee)>0?"true":void 0,children:vy(e.txFeeInfo?.estTxFee??"0")}),(0,m.jsx)(zn,{size:16,className:"bf-collapse-chevron"})]})]}),p&&(0,m.jsx)("div",{className:"bf-collapse-body",children:(0,m.jsx)(og,{rows:e.txFee})})]})]})}function zy(e){return{...e,bridgeInfo:e.bridgeInfo?.map(t=>({...t,value:t.label==="Route"?t.value.replace(/\bCROSS\b/g,"ONEchain"):t.value})),swapInfo:e.swapInfo?.map(t=>({...t,label:t.label.startsWith("Swap Fee")?"Est. Swap Fee":t.label}))}}function Cs(e){let t=kt(e);if(!(!t||t.lte(0)))return Ia(t)}function Fy(e,t,n,r){if(!n||!r)return;let o=kt(e),a=kt(t);if(!o||!a||o.lte(0)||a.lte(0))return;let i=a.dividedBy(o);if(i.gte("0.001"))return`1 ${n.symbol} = ${Ia(i)} ${r.symbol}`;let s=o.dividedBy(a);return`1 ${r.symbol} = ${Ia(s)} ${n.symbol}`}var Uy=1,jy=5;function ag(e){return kt(e)?.toNumber()??null}function ig(e){let t=ag(e);if(t!==null){if(t>=jy)return"danger";if(t>=Uy)return"warning"}}var Wy=/\bin\b.*amount|amount.*\bin\b|^from\b/i,Gy=/\bout\b.*amount|amount.*\bout\b|^to\b|receive/i,Hy=/fee/i,_y=/impact|rate|slippage|minimum|min\.|received/i,Rs=/impact/i,Vy=/^route$/i;function Qy(e,t,n){let r=e.find(p=>Wy.test(p.label)),o=e.find(p=>Gy.test(p.label)),a=new Set;r&&a.add(r),o&&a.add(o);let i=e.find(p=>Vy.test(p.label)||(p.routeTokens?.length??0)>0),s=i?.routeTokens?.length?i.routeTokens:void 0,l=i&&!s?i.value:void 0;i&&a.add(i);let d=[];for(let p of e){if(a.has(p))continue;let h=Hy.test(p.label);if(!h&&!_y.test(p.label))continue;a.add(p);let u=ag(p.value),g=h&&(u===0||/^\s*free\s*$/i.test(String(p.value??"")));g&&t==="swap"||d.push({text:g?`${p.label} Free`:`${p.label} ${p.value}`,tone:g?"accent":Rs.test(p.label)?p.tone==="danger"||p.tone==="warning"?p.tone:ig(p.value):void 0})}return{key:t,label:n,routeText:l,routeTokens:s,inRow:r,outRow:o,meta:d,rest:e.filter(p=>!a.has(p))}}function qy({steps:e}){return(0,m.jsx)("div",{className:"bf-route-steps",children:e.map((t,n)=>(0,m.jsxs)("div",{className:"bf-route-step","data-last":n===e.length-1?"true":"false","data-kind":t.key.startsWith("hop-")?"hop":"endpoint",children:[(0,m.jsxs)("span",{className:"bf-route-rail","aria-hidden":"true",children:[(0,m.jsx)("span",{className:"bf-route-line"}),(0,m.jsx)("span",{className:"bf-route-dot","data-final":n===e.length-1?"true":"false"})]}),(0,m.jsxs)("span",{className:"bf-route-body",children:[(0,m.jsxs)("span",{className:"bf-route-head",children:[(0,m.jsx)("span",{className:"bf-route-title",children:t.title}),(0,m.jsx)("span",{className:"bf-route-amount",children:t.routeTokens?.length?t.routeTokens.map((r,o)=>(0,m.jsxs)(me.Fragment,{children:[o>0&&(0,m.jsx)("span",{className:"bf-info-route-arrow","aria-hidden":"true",children:"\u2192"}),(0,m.jsx)(Aa,{token:r})]},`${r.symbol}-${o}`)):(0,m.jsxs)(m.Fragment,{children:[t.amountToken&&(0,m.jsx)(Aa,{token:t.amountToken}),(0,m.jsx)("span",{className:"bf-route-amount-value",children:t.amount},t.amount)]})})]}),(t.meta.length>0||t.tags.length>0)&&(0,m.jsxs)("span",{className:"bf-route-meta",children:[t.meta.map(r=>(0,m.jsx)("span",{"data-tone":r.tone??"default",children:r.text},r.text)),t.tags.map(r=>(0,m.jsx)("span",{className:"bf-route-tag",children:r},r))]})]})]},t.key))})}function Yy(e){if(!Rs.test(e.label)||e.tone==="danger"||e.tone==="warning")return e;let t=ig(e.value);return t?{...e,tone:t}:e}function sg({summary:e,rateLine:t,from:n,to:r,feeDelegated:o,includeTxFee:a=!1}){let i=!!e.txFeeInfo?.isDelegateFee||!!o,s=me.useMemo(()=>(e.pathType==="bridge-swap"?[["bridge","Bridge"],["swap","Swap"]]:[["swap","Swap"],["bridge","Bridge"]]).map(([C,N])=>{let T=C==="swap"?e.swapInfo:e.bridgeInfo;return T?.length?Qy(T,C,N):null}).filter(C=>C!==null),[e]);if(s.length===0)return null;let l=s[0],d=s[s.length-1],p=l.inRow?.valueToken??(n?.symbol?{symbol:n.symbol,iconUrl:n.iconUrl}:void 0),h=l.inRow?.value??n?.amount,u=d.outRow?.valueToken??(r?.symbol?{symbol:r.symbol,iconUrl:r.iconUrl}:void 0),g=d.outRow?.value??r?.amount;if(!h)return null;let x=e.txFeeInfo,y=a&&x&&!x.isDelegateFee?[{text:`Gas ${x.estTxFee}${x.tokenSymbol?` ${x.tokenSymbol}`:""}`}]:[],f=s.length>1,c=[{key:"send",title:`Send ${p?.symbol??""}`.trim(),amount:h,amountToken:p,routeTokens:f?void 0:l.routeTokens,meta:[...y.length?[{text:"EST."}]:n?.chain?[{text:`on ${n.chain}`}]:[],...y,...f?[]:[...l.routeText?[{text:l.routeText}]:[],...l.meta.filter(k=>!Rs.test(k.text))]],tags:i&&!f?["Fee delegated"]:[]},...f?s.map(k=>({key:`hop-${k.key}`,title:k.label,amount:k.routeText??"",routeTokens:k.routeTokens,meta:k.meta,tags:i&&k.key==="swap"?["Fee delegated"]:[]})):[],{key:"receive",title:`Receive ${u?.symbol??""}`.trim(),amount:g??"\u2014",amountToken:u,meta:[...r?.chain?[{text:`on ${r.chain}`}]:[],...f?[]:l.meta.filter(k=>Rs.test(k.text))],tags:[]}],b=[...s.flatMap(k=>k.rest),...a?e.txFee??[]:[]].map(Yy),w=!!t;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(qy,{steps:c}),(b.length>0||w)&&(0,m.jsx)("div",{className:"bf-info-section",children:(0,m.jsx)(og,{rows:[...w?[{label:"Rate",value:t}]:[],...b]})})]})}function Ky({summary:e,rateLine:t,from:n,to:r,feeDelegated:o}){let a=me.useMemo(()=>zy(e),[e]);return!a.bridgeInfo?.length&&!a.swapInfo?.length?null:(0,m.jsx)("div",{className:"bf-embedded-details",children:(0,m.jsx)(sg,{summary:a,rateLine:t,from:n,to:r,feeDelegated:o,includeTxFee:!0})})}function Zy({flow:e,env:t,toastError:n}){return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(Jm,{flow:e,env:t}),(0,m.jsx)($m,{flow:e,approval:e.approvalInfo??null}),(0,m.jsx)(eg,{flow:e}),(0,m.jsx)(tg,{flow:e}),(0,m.jsx)(ng,{message:e.submitToast?"":n}),(0,m.jsx)(rg,{flow:e})]})}function Xy({flow:e,env:t,isConnected:n,onRequestConnect:r,feeDelegated:o}){let a=Number(e.fromAmount)>0,i=me.useMemo(()=>a?e.summary??Zm(e):null,[a,e]),s=Km(e.quoteError),l=Vm(e.fromAmount,e.fromToken),d=l?"Insufficient balance":s.from,p=/insufficient liquidity|not enough liquidity/i.test(e.quoteError),h=p?void 0:s.to,u=e.quoteError&&!s.from&&!s.to?e.quoteError:"",g=e.error||u,x=e.status==="submitting",y=!a||!e.toAmount||!e.fromToken||!e.toToken||!e.canSubmit||!!e.quoteError||l||x,f=x?"":p&&a?"Insufficient Liquidity":a?"Continue":"Enter Amount";return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("main",{className:"bf-body bf-embedded-body","data-rd-scroll-area":!0,children:(0,m.jsxs)("div",{className:"bf-embedded-form",children:[(0,m.jsxs)("div",{className:"bf-embedded-fields",children:[(0,m.jsxs)("div",{className:"bf-embedded-field-group",children:[(0,m.jsx)(Wm,{label:"From",token:e.fromToken,amount:e.fromAmount,onAmountChange:c=>e.setAmount(c,"from"),onTokenClick:()=>{let c=ks(e.tokens,e.fromToken);c&&e.selectFromToken(c)},onMax:e.setMax,locked:e.tokens.length<=1}),d&&(0,m.jsx)("div",{className:"bf-embedded-field-error",children:d})]}),(0,m.jsx)("div",{className:"bf-embedded-direction","aria-hidden":"true",children:(0,m.jsx)("span",{children:(0,m.jsx)(Nd,{size:16})})}),(0,m.jsxs)("div",{className:"bf-embedded-field-group",children:[(0,m.jsx)(Wm,{label:"To",token:e.toToken,amount:e.toAmount,onAmountChange:c=>e.setAmount(c,"to"),onTokenClick:()=>{let c=ks(e.availableToTokens,e.toToken);c&&e.selectToToken(c)},locked:e.availableToTokens.length<=1}),h&&(0,m.jsx)("div",{className:"bf-embedded-field-error",children:h})]})]}),(0,m.jsx)(Ta,{open:!!i?.liquidity,children:i?.liquidity&&(0,m.jsxs)("section",{className:"bf-embedded-liquidity",children:[(0,m.jsxs)("div",{children:[(0,m.jsx)("span",{children:i.liquidity.label??"Available Liquidity"}),(0,m.jsx)("span",{"data-status":i.liquidity.status,children:i.liquidity.status??"normal"})]}),(0,m.jsx)("span",{className:"bf-embedded-liquidity-track",children:(0,m.jsx)("span",{style:{width:`${i.liquidity.percentage??50}%`}})})]})}),(0,m.jsx)(Ta,{open:p&&a,children:(0,m.jsx)("div",{className:"bf-embedded-liquidity-error",role:"alert",children:"Insufficient liquidity in all pools for this pair and amount."})}),(0,m.jsx)(Ta,{open:!!i,children:i&&(0,m.jsx)("div",{className:"bf-embedded-summary",children:(0,m.jsx)(Ky,{summary:i,feeDelegated:o,rateLine:Fy(e.fromAmount,e.toAmount,e.fromToken,e.toToken),from:{symbol:e.fromToken?.symbol,iconUrl:e.fromToken?.iconUrl,amount:Cs(e.fromAmount),chain:e.fromToken?Go(e.fromToken.chainId):void 0},to:{symbol:e.toToken?.symbol,iconUrl:e.toToken?.iconUrl,amount:Cs(e.toAmount),chain:e.toToken?Go(e.toToken.chainId):void 0}})})}),(0,m.jsx)("div",{className:"bf-embedded-action-footer",children:n?(0,m.jsx)("button",{type:"button",className:"bf-embedded-cta",onClick:e.submit,"data-track":"next",disabled:y,"aria-busy":x,"aria-label":x?"Processing transaction":p?"Insufficient liquidity":"Continue with swap or bridge",children:x?(0,m.jsx)("span",{className:"bf-embedded-spinner","aria-hidden":"true"}):f}):(0,m.jsx)("button",{type:"button",className:"bf-embedded-cta",onClick:r,"data-track":"connect_click","aria-label":"Connect wallet to continue",children:"Connect Wallet"})})]})}),(0,m.jsx)(Zy,{flow:e,env:t,toastError:g})]})}function Jy({item:e}){let t=Ns(e),n=Ny(e.fromAmount,e.fromToken);return(0,m.jsxs)("article",{className:"bf-history-item",children:[(0,m.jsxs)("div",{className:"bf-history-item-head",children:[(0,m.jsx)("span",{className:"bf-history-status","data-status":t,children:Ty(t)}),(0,m.jsx)("time",{className:"bf-history-time",dateTime:e.timestamp,children:Cy(e.timestamp)})]}),(0,m.jsxs)("div",{className:"bf-history-item-body",children:[(0,m.jsxs)("strong",{className:"bf-history-amount",children:[Ry(e.fromAmount)," ",e.fromToken.symbol]}),(0,m.jsxs)("div",{className:"bf-history-meta",children:[(0,m.jsx)("span",{className:"bf-history-usd",children:n??ky(e.txHash)}),(0,m.jsxs)("span",{className:"bf-history-route",children:[(0,m.jsxs)("span",{className:"bf-history-route-token",children:[(0,m.jsx)(Ea,{token:e.fromToken,size:16}),(0,m.jsx)("span",{children:e.fromToken.symbol})]}),(0,m.jsx)(Sm,{size:16,className:"bf-history-route-arrow"}),(0,m.jsxs)("span",{className:"bf-history-route-token",children:[(0,m.jsx)(Ea,{token:e.toToken,size:16}),(0,m.jsx)("span",{children:e.toToken.symbol})]})]})]})]})]})}function $y({flow:e}){let[t,n]=me.useState("all"),r=e.history.some(i=>Ns(i)==="pending"),o=e.history.filter(i=>Sy(i,t)),a=t==="all"?"No bridge history yet.":`No ${t} bridge history.`;return(0,m.jsxs)("main",{className:"bf-history-body",children:[(0,m.jsx)("nav",{className:"bf-history-tabs","aria-label":"Bridge history filters",children:yy.map(i=>(0,m.jsxs)("button",{type:"button",className:"bf-history-tab","data-active":t===i.value?"true":"false",onClick:()=>n(i.value),"data-track":"history_filter","data-track-id":i.value,children:[(0,m.jsx)("span",{children:i.label}),i.value==="pending"&&r&&(0,m.jsx)("span",{className:"bf-history-tab-dot","aria-hidden":"true"})]},i.value))}),o.length>0?(0,m.jsx)("div",{className:"bf-history-list",children:o.map(i=>(0,m.jsx)(Jy,{item:i},i.id||i.txHash))}):(0,m.jsx)("div",{className:"bf-empty",children:a})]})}function ex({flow:e,env:t,feeDelegated:n}){let[r,o]=me.useState(!1),[a,i]=me.useState(0),s=!!(e.fromAmount.trim()||e.toAmount.trim()),l=me.useMemo(()=>s?e.summary??Zm(e):null,[s,e]),d=Xt("apps.json",t,b=>Bn(b?.bridgePoweredBy?.url,t)),p=Km(e.quoteError),h=Vm(e.fromAmount,e.fromToken),u=h?"Insufficient balance":p.from,g=e.quoteError&&!p.from&&!p.to?e.quoteError:"",x=e.error||g,y=e.history.some(b=>Ns(b)==="pending"),c=(l?.pathType??qm(e.fromToken,e.toToken))!=="bridge";return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("main",{className:"bf-body",children:[(0,m.jsxs)("div",{className:"bf-toolbar",children:[(0,m.jsxs)("button",{type:"button",className:"bf-chip bf-chip-history",onClick:()=>e.setStep("history"),"data-track":"history_open",children:[(0,m.jsx)(Rm,{}),(0,m.jsx)("span",{children:"History"}),(y||e.hasNewHistory)&&(0,m.jsx)("span",{className:"bf-chip-dot","aria-hidden":"true"})]}),c&&(0,m.jsxs)("button",{type:"button",className:"bf-chip",onClick:()=>o(!0),"data-track":"slippage_open",disabled:e.slippageLocked,"aria-haspopup":"dialog","aria-expanded":r,children:[(0,m.jsx)(Nm,{}),(0,m.jsx)("span",{children:e.slippageLocked?"Auto 1%":xy(e.slippage,e.effectiveSlippage)})]})]}),(0,m.jsxs)("div",{className:"bf-swap-card","data-has-from-error":u?"true":"false",children:[(0,m.jsx)(jm,{label:"From",token:e.fromToken,amount:e.fromAmount,usd:Um(e.fromAmount,e.fromToken),onAmountChange:b=>e.setAmount(b,"from"),onTokenClick:()=>{let b=ks(e.tokens,e.fromToken);b&&e.selectFromToken(b)},locked:e.tokens.length<=1}),u&&(0,m.jsx)("div",{className:"bf-field-error",children:u}),(0,m.jsx)("button",{type:"button",className:"bf-swap-toggle",onClick:()=>{e.swapTokens(),i(b=>b+360)},"data-track":"token_swap",style:{transform:`translateX(-50%) rotate(${a}deg)`,transition:"transform 0.2s ease"},children:(0,m.jsx)(Nd,{size:22})}),(0,m.jsx)(jm,{label:"To",token:e.toToken,amount:e.toAmount,usd:Um(e.toAmount,e.toToken),onAmountChange:b=>e.setAmount(b,"to"),onTokenClick:()=>{let b=ks(e.availableToTokens,e.toToken);b&&e.selectToToken(b)},locked:e.availableToTokens.length<=1}),p.to&&(0,m.jsx)("div",{className:"bf-field-error",children:p.to})]}),(0,m.jsx)(Ly,{fromAmount:e.fromAmount,toAmount:e.toAmount,fromToken:e.fromToken,toToken:e.toToken}),(0,m.jsx)(Ta,{open:!!l,children:l&&(0,m.jsx)(By,{summary:l,feeDelegated:n,from:{symbol:e.fromToken?.symbol,iconUrl:e.fromToken?.iconUrl,amount:Cs(e.fromAmount),chain:e.fromToken?Go(e.fromToken.chainId):void 0},to:{symbol:e.toToken?.symbol,iconUrl:e.toToken?.iconUrl,amount:Cs(e.toAmount),chain:e.toToken?Go(e.toToken.chainId):void 0}})})]}),(0,m.jsxs)("footer",{className:"bf-footer",children:[(0,m.jsx)("button",{type:"button",className:"bf-next",onClick:e.submit,"data-track":"next",disabled:e.status==="submitting"||!!e.quoteError||h,children:e.status==="submitting"?"Processing...":"Next"}),d&&(0,m.jsxs)("a",{className:"bf-powered",href:d,target:"_blank",rel:"noreferrer",children:["Powered by ",(0,m.jsx)("span",{className:"bf-powered-brand",children:"CROSS DeFi"})]})]}),r&&(0,m.jsx)(Ay,{flow:e,onClose:()=>o(!1)}),(0,m.jsx)(Jm,{flow:e,env:t}),(0,m.jsx)($m,{flow:e,approval:e.approvalInfo??null}),(0,m.jsx)(eg,{flow:e}),(0,m.jsx)(tg,{flow:e}),(0,m.jsx)(ng,{message:e.submitToast?"":x}),(0,m.jsx)(rg,{flow:e})]})}function go({onClose:e,onBackToWallet:t,feeDelegated:n,env:r,variant:o="default",title:a,isConnected:i,onRequestConnect:s,className:l,...d}){let p=me.useMemo(()=>it(r),[r]),h=Cm(),u=Bm({...d,onExit:t}),g=me.useRef(null),x=wy(g),y=u.step==="history"?"History":a??"Swap & Bridge",f=i??!!d.walletAddress,c=o==="embedded"&&u.step==="form"&&!t?null:u.back;return(0,m.jsx)(Me,{feature:"bridge",children:(0,m.jsx)(Gm.Provider,{value:x,children:(0,m.jsxs)("div",{ref:g,className:Ie("bf-root",l),"data-view":u.step,"data-status":u.status,"data-variant":o,"data-soft-keyboard-open":o==="embedded"&&h?"true":"false",children:[(0,m.jsxs)("header",{className:"bf-header",children:[c?(0,m.jsx)("button",{type:"button",className:"bf-header-btn",onClick:c,"aria-label":"Back",children:(0,m.jsx)(En,{size:24})}):(0,m.jsx)("span",{className:"bf-header-spacer","aria-hidden":"true"}),(0,m.jsx)("span",{className:"bf-header-title","data-clickable":c?"true":"false",onClick:c??void 0,children:y}),(0,m.jsx)("button",{type:"button",className:"bf-header-btn",onClick:e,"aria-label":"Close","data-wi-close":!0,children:(0,m.jsx)(vn,{size:24})})]}),u.step==="history"?(0,m.jsx)($y,{flow:u}):o==="embedded"?(0,m.jsx)(Xy,{flow:u,env:p,isConnected:f,onRequestConnect:s,feeDelegated:n}):(0,m.jsx)(ex,{flow:u,env:p,feeDelegated:n})]})})})}var yn=H(require("react"),1),bg=H(require("bignumber.js"),1);var lg=require("@tanstack/react-query");var tx="token-history";function dg(e,t,n,r,o=!0){return(0,lg.useInfiniteQuery)({queryKey:[tx,e,t,n.toLowerCase(),r.toLowerCase()],initialPageParam:void 0,queryFn:async({pageParam:a,signal:i})=>{let s=await Be("walletServer",e),l=new URLSearchParams({chain_id:String(t),token:n,wallet:r}),d=a;d&&(l.set("last_timestamp",String(d.last_timestamp)),l.set("last_log_index",String(d.last_log_index)),l.set("last_tx_index",String(d.last_tx_index)));let p=await fetch(`${s}/v1/public/token/historical?${l}`,{cache:"no-store",signal:i});if(!p.ok)throw new Error(`Failed to fetch token history: ${p.status}`);let h=await p.json();if(h.code!==200)throw new Error(`Token history API error: ${h.code}`);return h.data??[]},getNextPageParam:a=>{if(!a||a.length===0)return;let i=a[a.length-1];return{last_timestamp:i.timestamp,last_log_index:i.log_index,last_tx_index:i.tx_index}},enabled:o&&!!r&&!!n&&t>0,staleTime:1e4})}var Ss=H(require("react"),1);var Ed={chart:!1,balance:!0,overview:!1,social:!1,history:!0},nx=Object.keys(Ed);function cg(e){let[t,n]=Ss.useState({visibility:Ed,isLoaded:!1});return Ss.useEffect(()=>{let r=!0;return kr(gi,e).then(o=>{if(!r)return;let a=o?.tokenDetail?.sections,i={...Ed};if(a)for(let s of nx){let l=a[s];typeof l=="boolean"&&(i[s]=l)}n({visibility:i,isLoaded:!0})}),()=>{r=!1}},[e]),t}var kn=H(require("react"),1);var Ts=require("@tanstack/react-query");var rx="token-price-history";function pg(e,t,n,r,o=!0){return(0,Ts.useQuery)({queryKey:[rx,e,t,n.toLowerCase(),r],queryFn:async({signal:a})=>{let i=await Be("walletServer",e),s=new URLSearchParams({chain_id:String(t),token:n,interval:r}),l=await fetch(`${i}/v1/public/token/price/historical?${s}`,{cache:"no-store",signal:a});if(!l.ok)throw new Error(`Failed to fetch token price history: ${l.status}`);let d=await l.json();if(d.code!==200)throw new Error(`Token price history API error: ${d.code}`);return d.data??[]},enabled:o&&!!n&&t>0,staleTime:3e4,placeholderData:Ts.keepPreviousData})}var pt=require("react/jsx-runtime"),ox="var(--ds-system-green-high, #00a869)",ax="var(--wi-error, #e70077)",ho=150,Is=3,Ad=18,ix=18,sx=[{key:"10m",label:"10m"},{key:"1h",label:"1H"},{key:"1d",label:"1D"},{key:"7d",label:"1W"},{key:"30d",label:"1M"},{key:"1y",label:"1Y"}],lx=new Set(["7d","30d","1y"]);function dx(){let e=kn.useRef(null),[t,n]=kn.useState(0);return kn.useEffect(()=>{let r=e.current;if(!r)return;let o=new ResizeObserver(a=>{n(a[0]?.contentRect.width??0)});return o.observe(r),n(r.clientWidth),()=>o.disconnect()},[]),[e,t]}function cx(e,t){let n=new Date(e*1e3),r=t?{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}:{hour:"numeric",minute:"2-digit"};return new Intl.DateTimeFormat("en-US",r).format(n)}function px(e,t){if(t<=0||e.length===0)return null;let n=e.length===1?[e[0],e[0]]:e,r=n.length,o=n[0],a=n[0],i=0,s=0;for(let b=1;b<r;b++)n[b]>o&&(o=n[b],i=b),n[b]<a&&(a=n[b],s=b);let l=o-a||1,d=Math.max(1,t-Is*2),p=ho-Ad-ix,h=b=>r===1?t/2:Is+b/(r-1)*d,u=b=>Ad+(1-(b-a)/l)*p,g=n.map((b,w)=>({x:h(w),y:u(b)})),x=g.map((b,w)=>`${w===0?"M":"L"}${b.x.toFixed(2)},${b.y.toFixed(2)}`).join(" "),y=g[0],f=g[g.length-1],c=`${x} L${f.x.toFixed(2)},${ho} L${y.x.toFixed(2)},${ho} Z`;return{values:n,points:g,linePath:x,areaPath:c,maxIdx:i,minIdx:s}}function ug({env:e,chainId:t,tokenAddress:n}){let[r,o]=kn.useState("1d"),[a,i]=kn.useState(null),s=kn.useId(),[l,d]=dx(),{data:p,isLoading:h,isError:u}=pg(e,t,n,r,!0),g=kn.useMemo(()=>(p??[]).filter(j=>Number.isFinite(Number(j.price))).slice().sort((j,le)=>j.updated_at-le.updated_at),[p]),x=kn.useMemo(()=>g.map(M=>Number(M.price)),[g]),y=kn.useMemo(()=>px(x,d),[x,d]);kn.useEffect(()=>{i(null)},[r]);let f=g.length>0,c=a!==null&&a<x.length?a:x.length-1,b=f?x[c]:0,w=f?x[0]:0,k=w!==0?(b-w)/w*100:0,C=k>=0,N=C?ox:ax,T=(C?"+":"-")+(Math.floor(Math.abs(k)*100)/100).toFixed(2)+"%",R=a!==null&&g[a]?cx(g[a].updated_at,lx.has(r)):"",S=M=>{if(!y||d<=0)return;let j=M.currentTarget.getBoundingClientRect(),le=M.clientX-j.left;if(y.values.length<=1){i(0);return}let ne=Math.max(1,d-Is*2),Q=Math.min(1,Math.max(0,(le-Is)/ne)),ee=Math.round(Q*(g.length-1));i(Math.min(g.length-1,Math.max(0,ee)))},E=()=>i(null);if(!h&&(u||!f))return null;let A=a!==null&&y&&y.points[a]?y.points[a]:null,F=y?.points[y.maxIdx],D=y?.points[y.minIdx],G=M=>Math.min(Math.max(M,24),Math.max(24,d-24));return(0,pt.jsxs)("section",{className:"wi-td-chart",children:[(0,pt.jsxs)("div",{className:"wi-td-chart-panel",children:[(0,pt.jsx)("span",{className:"wi-td-chart-price",children:f?so(b):"\u2014"}),f&&(0,pt.jsxs)("span",{className:"wi-td-chart-change","data-positive":C,children:[(0,pt.jsx)("span",{children:T}),R&&(0,pt.jsx)("span",{className:"wi-td-chart-when",children:R})]})]}),(0,pt.jsx)("div",{ref:l,className:"wi-td-chart-plot",children:h&&!f?(0,pt.jsx)("div",{className:"wi-skeleton-block wi-td-chart-skeleton"}):y&&d>0&&(0,pt.jsxs)("svg",{className:"wi-td-chart-svg",width:d,height:ho,role:"img","aria-label":"Price chart",children:[(0,pt.jsx)("defs",{children:(0,pt.jsxs)("linearGradient",{id:s,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,pt.jsx)("stop",{offset:"0%",stopColor:N,stopOpacity:.28}),(0,pt.jsx)("stop",{offset:"100%",stopColor:N,stopOpacity:0})]})}),(0,pt.jsx)("path",{d:y.areaPath,fill:`url(#${s})`}),(0,pt.jsx)("path",{d:y.linePath,fill:"none",stroke:N,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),F&&(0,pt.jsx)("text",{className:"wi-td-chart-minmax",x:G(F.x),y:Math.max(11,F.y-7),textAnchor:"middle",children:so(y.values[y.maxIdx])}),D&&y.minIdx!==y.maxIdx&&(0,pt.jsx)("text",{className:"wi-td-chart-minmax",x:G(D.x),y:Math.min(ho-5,D.y+14),textAnchor:"middle",children:so(y.values[y.minIdx])}),A&&(0,pt.jsxs)(pt.Fragment,{children:[(0,pt.jsx)("line",{className:"wi-td-chart-cursor",x1:A.x,y1:Ad-6,x2:A.x,y2:ho}),(0,pt.jsx)("circle",{cx:A.x,cy:A.y,r:4,fill:N,stroke:"var(--wi-surface-bg, #121212)",strokeWidth:2})]}),(0,pt.jsx)("rect",{x:0,y:0,width:d,height:ho,fill:"transparent",style:{touchAction:"none"},onPointerMove:S,onPointerDown:S,onPointerLeave:E,onPointerCancel:E})]})}),(0,pt.jsx)("div",{className:"wi-td-chart-tabs",role:"tablist",children:sx.map(M=>(0,pt.jsx)("button",{type:"button",role:"tab","aria-selected":r===M.key,className:"wi-td-chart-tab","data-active":r===M.key||void 0,onClick:()=>o(M.key),"data-track":"token_detail_interval","data-track-id":M.key,children:M.label},M.key))})]})}var ux="0x0000000000000000000000000000000000000000";function Md(e){return e?.toLowerCase().includes("bridge")??!1}function fg(e,t){return Md(e.to_alias)?"bridge-out":Md(e.from_alias)||e.from?.toLowerCase()===ux&&Md(e.tx_to_alias)?"bridge-in":e.to?.toLowerCase()===t.toLowerCase()?"receive":"send"}function mg(e){return e==="receive"||e==="bridge-in"}var B=require("react/jsx-runtime"),fx="https://contents.crosstoken.io/wallet/token/images/FT.png",mx={receive:"Receive",send:"Send","bridge-in":"Bridge In","bridge-out":"Bridge Out"};function gx(e){return e.length>24?"xs":e.length>18?"sm":"md"}function hx(e){if(!e)return"";let t=e<1e12?e*1e3:e,n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"just now";let r=Math.floor(n/60);if(r<60)return`${r}m`;let o=Math.floor(r/60);if(o<24)return`about ${o}h`;let a=Math.floor(o/24);if(a<30)return`${a}d`;let i=Math.floor(a/30);return i<12?`${i}mo`:`${Math.floor(i/12)}y`}function gg(e){let[t,n]=e.split("."),r="";for(let o=0;o<t.length;o++){let a=t.length-o;o>0&&a%3===0&&(r+=","),r+=t[o]}return n?`${r}.${n}`:r}function hg(e,t){let n=BigInt(e||"0");if(t<=2){let i=10n**BigInt(t),s=n/i,l=n%i*10n**BigInt(2-t);return`${s.toString()}.${l.toString().padStart(2,"0")}`}let r=n/10n**BigInt(t-2),o=r/100n,a=r%100n;return`${o.toString()}.${a.toString().padStart(2,"0")}`}function bx(e,t,n){let r=yn.useRef(null),o=yn.useRef(null),[a,i]=yn.useState(t);return yn.useLayoutEffect(()=>{let s=r.current,l=o.current;if(!s||!l)return;let d=()=>{let h=s.clientWidth;if(!h)return;let u=window.getComputedStyle(l),g=document.createElement("span");g.textContent=l.textContent,g.style.cssText=["position:absolute","left:-9999px","top:-9999px","visibility:hidden","white-space:nowrap",`font-family:${u.fontFamily}`,`font-weight:${u.fontWeight}`,`letter-spacing:${u.letterSpacing}`,`font-size:${t}px`].join(";"),document.body.appendChild(g);let x=g.offsetWidth;if(document.body.removeChild(g),x<=h){i(t);return}let y=Math.max(n,Math.floor(t*h/x));i(y)};d();let p=new ResizeObserver(d);return p.observe(s),()=>p.disconnect()},[e,t,n]),{containerRef:r,textRef:o,fontSize:a}}function wx(e){let t=kt(e);return t?t.decimalPlaces(4,bg.default.ROUND_DOWN).toFormat():"-"}function yx(){return(0,B.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[(0,B.jsx)("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"1.6"}),(0,B.jsx)("path",{d:"M3 12h18M12 3c2.5 2.5 3.8 5.8 3.8 9s-1.3 6.5-3.8 9c-2.5-2.5-3.8-5.8-3.8-9S9.5 5.5 12 3Z",stroke:"currentColor",strokeWidth:"1.6"})]})}function xx(){return(0,B.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,B.jsx)("path",{d:"M21.9 4.3 18.6 20c-.2 1-.9 1.3-1.8.8l-4.9-3.6-2.4 2.3c-.3.3-.5.5-1 .5l.3-4.9 9-8.1c.4-.3-.1-.5-.6-.2L6.2 13.2l-4.8-1.5c-1-.3-1-1 .2-1.5L20.6 3c.9-.3 1.6.2 1.3 1.3Z"})})}function vx(){return(0,B.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,B.jsx)("path",{d:"M18.9 2H22l-7.3 8.3L23.3 22h-6.8l-5.3-6.9L5.1 22H2l7.8-8.9L1 2h6.9l4.8 6.4L18.9 2Zm-1.2 18h1.9L7.2 4H5.2l12.5 16Z"})})}function kx(){return(0,B.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,B.jsx)("path",{d:"M6.9 6.5c0-.2-.1-.5-.3-.6L4.6 3.6V3.3h6.3l4.9 10.7 4.3-10.7H26v.3l-1.8 1.7c-.2.1-.2.3-.2.5v12.4c0 .2 0 .4.2.5l1.7 1.7v.3h-8.7v-.3l1.8-1.7c.2-.2.2-.2.2-.5V8.1l-5 12.6h-.7L7.9 8.1v8.5c0 .3.1.6.3.8l2.3 2.8v.3H4v-.3l2.3-2.8c.2-.2.3-.5.3-.8V6.5Z",transform:"scale(0.85)"})})}function wg({env:e,isMobile:t,token:n,walletAddress:r,stat:o,tokenInfo:a,showBalance:i=!0,onBack:s,onClose:l,onSend:d,onOutlink:p}){let h=n.quantity.decimals,[u,g]=yn.useState(!1),{buildTxUrl:x,chainInfo:y}=Di(e,n.chainId,!0),{visibility:f}=cg(e),{data:c,isLoading:b,isError:w,fetchNextPage:k,hasNextPage:C,isFetchingNextPage:N,refetch:T}=dg(e,n.chainId,n.address,r,!0),R=yn.useMemo(()=>c?.pages?c.pages.flat():[],[c]),S=yn.useRef(null);yn.useEffect(()=>{if(!t)return;let q=S.current;if(!q||!C)return;let ae=new IntersectionObserver(Z=>{Z[0]?.isIntersecting&&!N&&k()},{rootMargin:"120px"});return ae.observe(q),()=>ae.disconnect()},[t,C,N,k]);let E=yn.useCallback(()=>{navigator?.clipboard&&navigator.clipboard.writeText(n.address).then(()=>{g(!0),setTimeout(()=>g(!1),1500)}).catch(()=>{})},[n.address]),A=gg(hg(n.quantity.numeric,h)),F=o?.price?Ai(n.quantity.numeric,h,o.price):null,D=i?A:"\u2022\u2022\u2022\u2022",{containerRef:G,textRef:M,fontSize:j}=bx(D,30,14),oe=Fr(n.chainId,e).name??y?.name??`Chain ${n.chainId}`,ne=y?.explorer_url,Q=a?.deployed??!0,ee=yn.useMemo(()=>{let q=[];return a?.info_url&&q.push({key:"web",label:"Website",url:a.info_url,icon:(0,B.jsx)(yx,{})}),a?.telegram_url&&q.push({key:"tg",label:"Telegram",url:a.telegram_url,icon:(0,B.jsx)(xx,{})}),a?.x_url&&q.push({key:"x",label:"X",url:a.x_url,icon:(0,B.jsx)(vx,{})}),a?.medium_url&&q.push({key:"medium",label:"Medium",url:a.medium_url,icon:(0,B.jsx)(kx,{})}),q},[a]),z=(q,ae,Z,pe)=>{jt(q,ae,{category:"token-detail",origin:Z,payload:{address:n.address,txHash:pe}},p)};return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("div",{className:"wi-sticky-header",children:[(0,B.jsxs)("div",{className:"wi-header wi-header--receive",children:[(0,B.jsx)("button",{type:"button",className:"wi-header-back",onClick:s,"aria-label":"Back",children:(0,B.jsx)(En,{size:24})}),(0,B.jsxs)("span",{className:"wi-td-header-title",children:[(0,B.jsx)("img",{src:n.icon_url,alt:"","aria-hidden":!0,className:"wi-td-header-icon",width:24,height:24,draggable:!1,onError:q=>{q.currentTarget.src=fx}}),(0,B.jsx)("span",{className:"wi-td-header-name",children:n.symbol})]}),(0,B.jsx)("button",{type:"button",className:"wi-header-action",onClick:l,"aria-label":"Close","data-wi-close":!0,children:(0,B.jsx)(vn,{size:24})})]}),(0,B.jsx)("hr",{className:"wi-divider"})]}),(0,B.jsxs)("div",{className:"wi-td-scroll",children:[f.chart&&(0,B.jsx)(ug,{env:e,chainId:n.chainId,tokenAddress:n.address}),f.balance&&(0,B.jsxs)("section",{className:"wi-td-balance-card",children:[(0,B.jsxs)("div",{className:"wi-td-balance-left",ref:G,children:[(0,B.jsx)("span",{className:"wi-td-balance-label",children:"My Balance"}),(0,B.jsx)("span",{className:"wi-td-balance-amount",ref:M,style:{fontSize:j},children:D}),i&&F&&(0,B.jsx)("span",{className:"wi-td-balance-fiat",children:F})]}),(0,B.jsx)("button",{type:"button",className:"wi-td-send-btn",onClick:()=>d(n),"aria-label":`Send ${n.symbol}`,"data-track":"token_detail_send","data-track-id":n.symbol,children:(0,B.jsx)("span",{children:"Send"})})]}),f.overview&&(0,B.jsxs)("section",{className:"wi-td-section",children:[(0,B.jsx)("h3",{className:"wi-td-section-title",children:"Crypto Overview"}),(0,B.jsxs)("div",{className:"wi-td-rows",children:[(0,B.jsxs)("div",{className:"wi-td-row",children:[(0,B.jsx)("span",{className:"wi-td-row-label",children:"Network"}),ne?(0,B.jsxs)("a",{className:"wi-td-row-value wi-td-row-link",href:ne,target:"_blank",rel:"noopener noreferrer",onClick:q=>z(q,ne,"token-network"),children:[(0,B.jsx)("span",{children:oe}),(0,B.jsx)(ua,{className:"wi-td-external-icon"})]}):(0,B.jsx)("span",{className:"wi-td-row-value",children:oe})]}),(0,B.jsxs)("div",{className:"wi-td-row",children:[(0,B.jsx)("span",{className:"wi-td-row-label",children:"Contract Address"}),(0,B.jsxs)("button",{type:"button",className:"wi-td-row-value wi-td-row-copy",onClick:E,"aria-label":"Copy contract address",children:[(0,B.jsx)("span",{children:dn(n.address)}),u?(0,B.jsx)(qn,{size:14}):(0,B.jsx)(Cr,{size:14})]})]}),(0,B.jsxs)("div",{className:"wi-td-row",children:[(0,B.jsx)("span",{className:"wi-td-row-label",children:"Decimals"}),(0,B.jsx)("span",{className:"wi-td-row-value",children:h})]}),(0,B.jsxs)("div",{className:"wi-td-row",children:[(0,B.jsx)("span",{className:"wi-td-row-label",children:"Total Supply"}),(0,B.jsx)("span",{className:"wi-td-row-value",children:wx(o?.circulating_supply)})]})]})]}),f.social&&ee.length>0&&(0,B.jsxs)("section",{className:"wi-td-section",children:[(0,B.jsx)("h3",{className:"wi-td-section-title",children:"Social Media"}),(0,B.jsx)("div",{className:"wi-td-social-row",children:ee.map(q=>(0,B.jsx)("a",{className:"wi-td-social-btn",href:q.url,target:"_blank",rel:"noopener noreferrer","aria-label":q.label,onClick:ae=>z(ae,q.url,"token-social"),children:q.icon},q.key))})]}),f.history&&(0,B.jsxs)("section",{className:"wi-td-section",children:[(0,B.jsx)("h3",{className:"wi-td-section-title",children:"Token History"}),b&&(0,B.jsx)("div",{className:"wi-td-history-list",children:Array.from({length:3},(q,ae)=>(0,B.jsxs)("div",{className:"wi-td-history-skeleton",children:[(0,B.jsx)("div",{className:"wi-skeleton-block",style:{width:90,height:14}}),(0,B.jsx)("div",{className:"wi-skeleton-block",style:{width:60,height:14}})]},`td-sk-${ae}`))}),!b&&w&&(0,B.jsxs)("div",{className:"wi-td-history-empty",children:[(0,B.jsx)("span",{children:"Failed to load history."}),(0,B.jsx)("button",{type:"button",className:"wi-td-retry-btn",onClick:()=>T(),children:"Retry"})]}),!b&&!w&&R.length===0&&(0,B.jsx)("div",{className:"wi-td-history-empty",children:(0,B.jsx)("span",{children:"No transactions found."})}),!b&&!w&&R.length>0&&(0,B.jsxs)("div",{className:"wi-td-history-list",children:[R.map((q,ae)=>{let Z=fg(q,r),pe=mg(Z),Se=pe?q.from:q.to,Ue=gg(hg(q.amount,h)),fe=x(q.tx),Re=hx(q.timestamp),Ce=(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("div",{className:"wi-td-history-top",children:[(0,B.jsx)("span",{className:"wi-td-history-type","data-direction":Z,children:mx[Z]}),(0,B.jsx)("span",{className:"wi-td-history-counter",children:dn(Se??"")})]}),(0,B.jsxs)("div",{className:"wi-td-history-bottom",children:[(0,B.jsxs)("span",{className:"wi-td-history-meta",children:[(0,B.jsx)("span",{className:"wi-td-history-status","data-status":q.status,children:q.status==="success"?"Success":"Failed"}),Re&&(0,B.jsx)("span",{className:"wi-td-history-time",children:Re})]}),(0,B.jsxs)("span",{className:"wi-td-history-amount","data-size":gx(`${pe?"+":"-"}${Ue} ${n.symbol}`),children:[pe?"+":"-",Ue," ",n.symbol]})]})]}),tt=`${q.tx}-${q.log_index}-${ae}`;return fe?(0,B.jsx)("a",{className:"wi-td-history-item wi-td-history-item--link",href:fe,target:"_blank",rel:"noopener noreferrer",onClick:Le=>z(Le,fe,"token-tx",q.tx),children:Ce},tt):(0,B.jsx)("div",{className:"wi-td-history-item",children:Ce},tt)}),C&&(t?(0,B.jsx)("div",{ref:S,className:"wi-td-history-sentinel",children:N&&(0,B.jsx)("span",{className:"wi-td-history-loading",children:"Loading\u2026"})}):(0,B.jsx)("button",{type:"button",className:"wi-td-loadmore-btn",onClick:()=>k(),disabled:N,children:N?"Loading\u2026":"Load more"}))]})]})]})]})}var _r=H(require("react"),1);var Ng=require("@tanstack/react-query");var Cx="https://ipfs.io/ipfs/",Rx=/^0x[0-9a-fA-F]{40}$/,yg=/^\d+$/;function Nx(e,t){return typeof e!="string"||!yg.test(e)?t:BigInt(e)}function xg(e,t){let n=e.token?.address,r=e.token_id;if(typeof n!="string"||!Rx.test(n)||typeof r!="string"||!yg.test(r))return null;let o=t==="ERC1155"?Nx(e.quantity,1n):1n;return o<=0n?null:{contract:n.toLowerCase(),tokenId:r,standard:t,tokenUri:e.token_uri||null,quantity:o,collectionName:e.token?.name||Ex(n),collectionSymbol:e.token?.symbol||"",collectionIconUrl:wo(e.token?.icon_url),collectionNamed:!!(e.token?.name||e.token?.symbol)}}function vg(e){let t=new Map,n=new Set;for(let r of e){let o=`${r.contract}:${r.tokenId}`;if(n.has(o))continue;n.add(o);let a=t.get(r.contract);a||(a={contract:r.contract,standard:r.standard,name:r.collectionName,symbol:r.collectionSymbol,iconUrl:r.collectionIconUrl,items:[]},t.set(r.contract,a)),a.items.push(r)}return[...t.values()].filter(Sx)}function Sx(e){return e.items.some(t=>t.collectionNamed)||!!e.iconUrl||e.items.some(t=>!!t.tokenUri)}function wo(e){if(typeof e!="string")return null;let t=e.trim();if(!t)return null;if(/^ipfs:\/\//i.test(t)){let n=t.replace(/^ipfs:\/\//i,"").replace(/^ipfs\//i,"");return n?`${Cx}${n}`:null}if(/^data:image\//i.test(t))return t;try{let n=new URL(t);return n.protocol!=="https:"&&n.protocol!=="http:"||n.username||n.password?null:n.toString()}catch{return null}}function kg(e){let t=/^data:application\/json(;[^,]*)?,(.*)$/is.exec(e.trim());if(!t)return;let n=t[1]??"",r=t[2]??"";try{let o=/;base64/i.test(n)?Tx(r):decodeURIComponent(r);return JSON.parse(o)}catch{return null}}function Tx(e){let t=atob(e),n=Uint8Array.from(t,r=>r.charCodeAt(0));return new TextDecoder().decode(n)}function bo(e){return typeof e=="string"&&e.trim()?e.trim():null}function Ix(e){return typeof e=="string"?e.trim()||null:typeof e=="number"||typeof e=="boolean"?String(e):null}function Ld(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let t=e,n=bo(t.image_data),r=wo(bo(t.image)??bo(t.image_url))??(n&&n.startsWith("<svg")?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(n)}`:null),o=[];if(Array.isArray(t.attributes))for(let a of t.attributes){if(!a||typeof a!="object")continue;let i=a,s=Ix(i.value);s!==null&&o.push({traitType:bo(i.trait_type),value:s})}return{name:bo(t.name),description:bo(t.description),image:r,animationUrl:wo(bo(t.animation_url)),attributes:o}}function Cg(e){if(!e)return!1;let t=e.split(/[?#]/)[0]?.toLowerCase()??"";return/\.(mp4|webm|ogg|ogv|mov)$/.test(t)}function Dd(e,t){return t?.trim()?t.trim():`#${e}`}function Rg(e,t=12){if(e.length<=t)return`#${e}`;let n=Math.ceil((t-1)/2),r=Math.floor((t-1)/2);return`#${e.slice(0,n)}\u2026${e.slice(-r)}`}function Pd(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function Ex(e){return`${e.slice(0,6)}\u2026${e.slice(-4)}`}var Ax="nft-holdings",Mx=5,Lx=100,Dx=["ERC721","ERC1155"];async function Px(e,t,n,r){let o=[],a=t.toLowerCase();for(let i=1;i<=Mx;i+=1){let s=new URLSearchParams({page:String(i),page_size:String(Lx),sort_by:"updated",sort_order:"desc"}),l=await fetch(`${e}/v1/accounts/${a}/nfts/${n}?${s}`,{cache:"no-store",signal:r});if(!l.ok)throw new Error(`Failed to fetch ${n} holdings: ${l.status}`);let d=await l.json();for(let p of d.data?.nfts??[]){let h=xg(p,n);h&&o.push(h)}if(!d.data?.next_page)break}return o}function Sg(e,t,n=!0){return(0,Ng.useQuery)({queryKey:[Ax,e,t.toLowerCase()],queryFn:async({signal:r})=>{let o=await Be("crossExplorer",e),a=await Promise.all(Dx.map(i=>Px(o,t,i,r)));return vg(a.flat())},enabled:!!t&&n,staleTime:6e4,retry:1})}var Ig=require("@tanstack/react-query");var Ox="nft-metadata",Bx=3e3,zx=4,Od=0,Tg=[];async function Fx(e){Od>=zx&&await new Promise(t=>Tg.push(t)),Od+=1;try{return await e()}finally{Od-=1,Tg.shift()?.()}}async function Ux(e,t){let n=kg(e);if(n!==void 0)return Ld(n);let r=wo(e);return r?Fx(async()=>{let o=new AbortController,a=()=>o.abort();t?.addEventListener("abort",a);let i=setTimeout(a,Bx);try{let s=await fetch(r,{signal:o.signal,credentials:"omit",referrerPolicy:"no-referrer"});return s.ok?Ld(await s.json()):null}catch{return null}finally{clearTimeout(i),t?.removeEventListener("abort",a)}}):null}function Es(e,t=!0){return(0,Ig.useQuery)({queryKey:[Ox,e],queryFn:({signal:n})=>Ux(e,n),enabled:!!e&&t,staleTime:1/0,gcTime:30*6e4,retry:!1})}var Eg=require("@tanstack/react-query");var jx="nft-instance";function Ag(e,t,n,r=!0){return(0,Eg.useQuery)({queryKey:[jx,e,t,n],queryFn:async({signal:o})=>{let a=await Be("crossExplorer",e),i=await fetch(`${a}/v1/tokens/${t}/instances/${n}`,{cache:"no-store",signal:o});if(!i.ok)throw new Error(`Failed to fetch NFT instance: ${i.status}`);return(await i.json()).data?.instance??null},enabled:!!t&&!!n&&r,staleTime:5*6e4,retry:!1})}var L=require("react/jsx-runtime"),Mg={ERC721:"ERC-721",ERC1155:"ERC-1155"};function Bd({src:e,alt:t,className:n}){let[r,o]=_r.useState(!1);return _r.useEffect(()=>o(!1),[e]),!e||r?(0,L.jsx)("div",{className:Ie("wi-nft-media wi-nft-media--fallback",n),role:"img","aria-label":t,"data-nft-fallback":!0,children:(0,L.jsx)(Sp,{className:"wi-nft-media-fallback-icon"})}):(0,L.jsx)("img",{src:e,alt:t,className:Ie("wi-nft-media",n),loading:"lazy",decoding:"async",draggable:!1,referrerPolicy:"no-referrer",onError:()=>o(!0)})}function Wx({collection:e}){let t=e.items[0],{data:n}=Es(t?.tokenUri??null,!e.iconUrl);return(0,L.jsx)(Bd,{src:e.iconUrl??n?.image??null,alt:e.name,className:"wi-nft-thumb"})}function Lg({env:e,walletAddress:t,active:n,onSelectCollection:r}){let{data:o,isLoading:a,isError:i,refetch:s,isFetching:l}=Sg(e,t,n);return a?(0,L.jsx)("div",{className:"wi-token-list","aria-busy":"true",children:Array.from({length:4},(d,p)=>(0,L.jsx)("div",{className:"wi-skeleton-item","data-nft-skeleton":!0,children:(0,L.jsxs)("div",{className:"wi-skeleton-left",children:[(0,L.jsx)("div",{className:"wi-skeleton-block wi-nft-thumb-skeleton"}),(0,L.jsxs)("div",{className:"wi-skeleton-lines",children:[(0,L.jsx)("div",{className:"wi-skeleton-block",style:{width:96,height:14}}),(0,L.jsx)("div",{className:"wi-skeleton-block",style:{width:56,height:12}})]})]})},p))}):i?(0,L.jsxs)("div",{className:"wi-nft-state",role:"alert",children:[(0,L.jsx)("span",{className:"wi-nft-state-text",children:"Couldn\u2019t load NFTs"}),(0,L.jsx)("button",{type:"button",className:"wi-nft-retry",onClick:()=>{s()},disabled:l,"data-track":"nft_retry",children:l?"Retrying\u2026":"Try again"})]}):!o||o.length===0?(0,L.jsxs)("div",{className:"wi-nft-empty",role:"status",children:[(0,L.jsx)("span",{className:"wi-nft-empty-icon","aria-hidden":!0,children:(0,L.jsx)("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:(0,L.jsx)("path",{d:"M18 22H4a2 2 0 0 1-2-2V6M22 13l-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18M14 8a2 2 0 1 1-4 0a2 2 0 1 1 4 0ZM8 2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Z"})})}),(0,L.jsx)("p",{className:"wi-nft-empty-title",children:"No NFTs yet"}),(0,L.jsx)("p",{className:"wi-nft-empty-desc",children:"NFTs you own will appear here."})]}):(0,L.jsx)("div",{className:"wi-token-list",children:o.map(d=>(0,L.jsxs)("button",{type:"button",className:"wi-token-item wi-token-item--button",onClick:()=>r(d),"aria-label":`View ${d.name} NFTs`,"data-track":"nft_collection","data-track-id":d.contract,children:[(0,L.jsxs)("div",{className:"wi-token-left",children:[(0,L.jsx)(Wx,{collection:d}),(0,L.jsxs)("div",{className:"wi-token-info",children:[(0,L.jsx)("span",{className:"wi-token-name",children:d.name}),(0,L.jsx)("div",{className:"wi-token-price-row",children:(0,L.jsx)("span",{className:"wi-token-price",children:Mg[d.standard]})})]})]}),(0,L.jsx)("div",{className:"wi-token-right",children:(0,L.jsx)("span",{className:"wi-token-balance","data-nft-count":!0,children:d.items.length})})]},d.contract))})}function Dg({title:e,onBack:t,onClose:n}){return(0,L.jsxs)("div",{className:"wi-sticky-header",children:[(0,L.jsxs)("div",{className:"wi-header wi-header--receive",children:[(0,L.jsx)("button",{type:"button",className:"wi-header-back",onClick:t,"aria-label":"Back",children:(0,L.jsx)(En,{size:24})}),(0,L.jsx)("span",{className:"wi-td-header-title",children:(0,L.jsx)("span",{className:"wi-td-header-name wi-nft-header-name",children:e})}),(0,L.jsx)("button",{type:"button",className:"wi-header-action",onClick:n,"aria-label":"Close","data-wi-close":!0,children:(0,L.jsx)(vn,{size:24})})]}),(0,L.jsx)("hr",{className:"wi-divider"})]})}function Gx({item:e,onSelect:t}){let{data:n}=Es(e.tokenUri),r=Dd(e.tokenId,n?.name);return(0,L.jsxs)("button",{type:"button",className:"wi-nft-card",onClick:()=>t(e),"aria-label":`View ${r}`,"data-track":"nft_detail","data-track-id":`${e.contract}:${e.tokenId}`,children:[(0,L.jsxs)("span",{className:"wi-nft-card-media",children:[(0,L.jsx)(Bd,{src:n?.image??null,alt:r}),e.standard==="ERC1155"&&e.quantity>1n&&(0,L.jsxs)("span",{className:"wi-nft-card-qty",children:["\xD7",Pd(e.quantity)]})]}),(0,L.jsx)("span",{className:"wi-nft-card-name",children:r}),n?.name&&(0,L.jsx)("span",{className:"wi-nft-card-id",children:Rg(e.tokenId)})]})}function Pg({collection:e,onBack:t,onClose:n,onSelectNft:r}){return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Dg,{title:e.name,onBack:t,onClose:n}),(0,L.jsx)("div",{className:"wi-td-scroll","data-vaul-no-drag":!0,children:(0,L.jsx)("div",{className:"wi-nft-grid",children:e.items.map(o=>(0,L.jsx)(Gx,{item:o,onSelect:r},`${o.contract}:${o.tokenId}`))})})]})}function Hx({image:e,animationUrl:t,alt:n}){let[r,o]=_r.useState(!1);return Cg(t)&&!r?(0,L.jsx)("video",{className:"wi-nft-media wi-nft-detail-media",src:t,poster:e??void 0,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,onError:()=>o(!0),"aria-label":n}):(0,L.jsx)(Bd,{src:e,alt:n,className:"wi-nft-detail-media"})}function Og({env:e,item:t,onBack:n,onClose:r,onOutlink:o}){let{data:a,isLoading:i}=Es(t.tokenUri),{data:s}=Ag(e,t.contract,t.tokenId,!i&&!a),l=Dd(t.tokenId,a?.name??s?.name??null),d=a?.description??s?.description??null,p=a?.image??wo(s?.image_url),h=a?.attributes??[],u=At[e].cross,{chainInfo:g}=Di(e,u),y=Fr(u,e).name??g?.name??`Chain ${u}`,f=g?.explorer_url?.replace(/\/+$/,""),c=f?`${f}/token/${t.contract}/instance/${t.tokenId}`:null,[b,w]=_r.useState(!1),k=_r.useCallback(()=>{navigator?.clipboard&&navigator.clipboard.writeText(t.contract).then(()=>{w(!0),setTimeout(()=>w(!1),1500)}).catch(()=>{})},[t.contract]),C=(N,T,R)=>jt(N,T,{category:"nft-detail",origin:R,payload:{contract:t.contract,tokenId:t.tokenId}},o);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Dg,{title:l,onBack:n,onClose:r}),(0,L.jsxs)("div",{className:"wi-td-scroll","data-vaul-no-drag":!0,children:[(0,L.jsx)("div",{className:"wi-nft-detail-hero",children:(0,L.jsx)(Hx,{image:p,animationUrl:a?.animationUrl??null,alt:l})}),(0,L.jsxs)("section",{className:"wi-td-section",children:[(0,L.jsxs)("div",{className:"wi-nft-detail-titles",children:[(0,L.jsx)("span",{className:"wi-nft-detail-collection",children:t.collectionName}),(0,L.jsx)("h3",{className:"wi-td-section-title wi-nft-detail-name",children:l})]}),d&&(0,L.jsx)("p",{className:"wi-nft-detail-desc",children:d})]}),(0,L.jsxs)("section",{className:"wi-td-section",children:[(0,L.jsx)("h3",{className:"wi-td-section-title",children:"Details"}),(0,L.jsxs)("div",{className:"wi-td-rows",children:[(0,L.jsxs)("div",{className:"wi-td-row",children:[(0,L.jsx)("span",{className:"wi-td-row-label",children:"Token ID"}),(0,L.jsx)("span",{className:"wi-td-row-value",children:t.tokenId})]}),(0,L.jsxs)("div",{className:"wi-td-row",children:[(0,L.jsx)("span",{className:"wi-td-row-label",children:"Token Standard"}),(0,L.jsx)("span",{className:"wi-td-row-value",children:Mg[t.standard]})]}),t.standard==="ERC1155"&&(0,L.jsxs)("div",{className:"wi-td-row",children:[(0,L.jsx)("span",{className:"wi-td-row-label",children:"Quantity"}),(0,L.jsx)("span",{className:"wi-td-row-value",children:Pd(t.quantity)})]}),(0,L.jsxs)("div",{className:"wi-td-row",children:[(0,L.jsx)("span",{className:"wi-td-row-label",children:"Network"}),f?(0,L.jsxs)("a",{className:"wi-td-row-value wi-td-row-link",href:f,target:"_blank",rel:"noopener noreferrer",onClick:N=>C(N,f,"nft-network"),children:[(0,L.jsx)("span",{children:y}),(0,L.jsx)(ua,{className:"wi-td-external-icon"})]}):(0,L.jsx)("span",{className:"wi-td-row-value",children:y})]}),(0,L.jsxs)("div",{className:"wi-td-row",children:[(0,L.jsx)("span",{className:"wi-td-row-label",children:"Contract Address"}),(0,L.jsxs)("button",{type:"button",className:"wi-td-row-value wi-td-row-copy",onClick:k,"aria-label":"Copy contract address",children:[(0,L.jsx)("span",{children:dn(t.contract)}),b?(0,L.jsx)(qn,{size:14}):(0,L.jsx)(Cr,{size:14})]})]})]})]}),h.length>0&&(0,L.jsxs)("section",{className:"wi-td-section",children:[(0,L.jsx)("h3",{className:"wi-td-section-title",children:"Attributes"}),(0,L.jsx)("div",{className:"wi-nft-attrs",children:h.map((N,T)=>(0,L.jsxs)("div",{className:"wi-nft-attr",children:[N.traitType&&(0,L.jsx)("span",{className:"wi-nft-attr-type",children:N.traitType}),(0,L.jsx)("span",{className:"wi-nft-attr-value",children:N.value})]},`${N.traitType??""}-${T}`))})]}),c&&(0,L.jsxs)("a",{className:"wi-nft-explorer-btn",href:c,target:"_blank",rel:"noopener noreferrer",onClick:N=>C(N,c,"nft-explorer"),"data-track":"nft_explorer",children:[(0,L.jsx)("span",{children:"View on Explorer"}),(0,L.jsx)(ua,{className:"wi-td-external-icon"})]})]})]})}var Jn=H(require("react"),1);var Bg={dev:"https://dev.onechain.nexus/pop",stage:"https://stg.onechain.nexus/pop",production:"https://onechain.nexus/pop"};function Fg(e,t){let n=Bg[e]??Bg.production;return t==="send"?n:`${n}/${t}`}var zg={dev:"https://stg.onechain.nexus/gametoken/bridge",stage:"https://stg.onechain.nexus/gametoken/bridge",production:"https://www.onechain.nexus/gametoken/bridge"};function Ug(e){return zg[e]??zg.production}var K=require("react/jsx-runtime");function zd({size:e=20,className:t}){return(0,K.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,K.jsx)("path",{d:"M1.66675 7.91662C1.66677 6.98929 1.94808 6.08377 2.47353 5.31967C2.99898 4.55557 3.74385 3.96883 4.60976 3.63695C5.47567 3.30507 6.42188 3.24366 7.32343 3.46082C8.22497 3.67799 9.03944 4.16352 9.65925 4.85329C9.7029 4.89996 9.75568 4.93718 9.81431 4.96262C9.87294 4.98806 9.93617 5.00119 10.0001 5.00119C10.064 5.00119 10.1272 4.98806 10.1859 4.96262C10.2445 4.93718 10.2973 4.89996 10.3409 4.85329C10.9588 4.15904 11.7734 3.66943 12.6764 3.44962C13.5795 3.22982 14.528 3.29024 15.3958 3.62286C16.2636 3.95547 17.0096 4.5445 17.5343 5.31154C18.0591 6.07858 18.3378 6.98725 18.3334 7.91662C18.3334 9.82495 17.0834 11.25 15.8334 12.5L11.2567 16.9275C11.1015 17.1058 10.91 17.249 10.6951 17.3477C10.4802 17.4464 10.2468 17.4982 10.0103 17.4997C9.77386 17.5012 9.53979 17.4523 9.32365 17.3564C9.10752 17.2605 8.91427 17.1196 8.75675 16.9433L4.16675 12.5C2.91675 11.25 1.66675 9.83329 1.66675 7.91662Z",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),(0,K.jsx)("path",{d:"M8.84839 8.28833H10V13.4938",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"})]})}function jg({size:e=24,className:t}){return(0,K.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,K.jsx)("path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"}),(0,K.jsx)("path",{d:"m21.854 2.147-10.94 10.939",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"})]})}function Wg({size:e=24,className:t}){return(0,K.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,K.jsxs)("g",{stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,K.jsx)("path",{d:"M11 15h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 17"}),(0,K.jsx)("path",{d:"m7 21 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9"}),(0,K.jsx)("path",{d:"m2 16 6 6"}),(0,K.jsx)("circle",{cx:"16",cy:"9",r:"2.9"}),(0,K.jsx)("circle",{cx:"6",cy:"5",r:"3"})]})})}function Gg({size:e=24,className:t}){return(0,K.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,K.jsxs)("g",{stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,K.jsx)("path",{d:"M15 12h-5M15 8h-5"}),(0,K.jsx)("path",{d:"M19 17V5a2 2 0 0 0-2-2H4"}),(0,K.jsx)("path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3"})]})})}function La({size:e=12,className:t}){return(0,K.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,K.jsx)("path",{d:"m9 18 6-6-6-6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Hg({size:e=20,className:t}){return(0,K.jsxs)("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,K.jsx)("rect",{width:"20",height:"20",rx:"4.8",fill:"currentColor"}),(0,K.jsx)("path",{d:"M11.53 9.05 15.7 4.4h-.99l-3.62 4.04L8.2 4.4H4.86l4.37 6.1-4.37 4.87h.99l3.82-4.26 3.05 4.26h3.34zm-1.35 1.51-.44-.61-3.52-4.9h1.52l2.84 3.96.44.61 3.7 5.14h-1.52z",fill:"var(--wi-op-x-glyph, #ffffff)"})]})}function _g({size:e=20,className:t}){return(0,K.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,K.jsxs)("g",{stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,K.jsx)("circle",{cx:"9",cy:"7",r:"3.4"}),(0,K.jsx)("path",{d:"M2.6 20.4a6.4 6.4 0 0 1 10.2-5.15"}),(0,K.jsx)("circle",{cx:"17.5",cy:"17.5",r:"2.1"}),(0,K.jsx)("path",{d:"M19.6 17.5v1.05a1.55 1.55 0 0 0 3.1 0v-1.05a5.2 5.2 0 1 0-2.05 4.14"})]})})}function Vg({size:e=20,className:t}){return(0,K.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,K.jsxs)("g",{stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,K.jsx)("path",{d:"M12.5 3 5 13.5h5.5L10 21l7.5-10.5H12z"}),(0,K.jsx)("path",{d:"M20 4.5 21.5 3M20.5 8h2M17 2.5V1"})]})})}function Qg({size:e=20,className:t}){return(0,K.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,K.jsxs)("g",{stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,K.jsx)("rect",{x:"2.5",y:"5.5",width:"19",height:"13",rx:"2.5"}),(0,K.jsx)("path",{d:"M12 9v6"}),(0,K.jsx)("path",{d:"m9.5 12.5 2.5 2.5 2.5-2.5"})]})})}function qg({className:e}){return(0,K.jsxs)("svg",{width:"116",height:"24",viewBox:"0 0 116 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"ONEpop",className:e,children:[(0,K.jsx)("path",{d:"M38.1949 4.06787C33.7184 4.06787 30.085 7.69479 30.085 12.1647C30.085 16.6346 33.7184 20.2616 38.1949 20.2616C42.6713 20.2616 46.3048 16.6346 46.3048 12.1647C46.3048 7.69479 42.6713 4.06787 38.1949 4.06787ZM38.1949 16.6216C35.7312 16.6216 33.7315 14.6284 33.7315 12.1647C33.7315 9.70103 35.7312 7.70786 38.1949 7.70786C40.6586 7.70786 42.6583 9.70103 42.6583 12.1647C42.6583 14.6284 40.6586 16.6216 38.1949 16.6216Z",fill:"currentColor"}),(0,K.jsx)("path",{d:"M52.0033 4.81283C51.6438 4.40113 51.1537 4.11359 50.5721 4.11359C49.5657 4.11359 48.7554 4.93046 48.7554 5.93031V18.4513C48.7554 19.4577 49.5722 20.2681 50.5721 20.2681C51.5719 20.2681 52.3888 19.4512 52.3888 18.4513V10.7727L60.5837 19.5492C60.9431 19.9609 61.4332 20.2485 62.0148 20.2485C63.0212 20.2485 63.8316 19.4316 63.8316 18.4317C63.8316 17.9351 63.6094 17.5038 63.3153 17.1639L51.9967 4.81936L52.0033 4.81283Z",fill:"currentColor"}),(0,K.jsx)("path",{d:"M61.8643 12.3934C62.9034 12.3934 63.7398 11.5504 63.7398 10.5179V5.96953C63.7398 4.93047 62.8968 4.09399 61.8643 4.09399C60.8318 4.09399 59.9888 4.93701 59.9888 5.96953V10.5179C59.9888 11.5569 60.8318 12.3934 61.8643 12.3934Z",fill:"currentColor"}),(0,K.jsx)("path",{d:"M76.9017 7.74704C77.9081 7.74704 78.7249 6.93016 78.7249 5.93031C78.7249 4.93046 77.9081 4.11359 76.9017 4.11359H68.5108C67.5044 4.11359 66.6875 4.93046 66.6875 5.93031V18.4513C66.6875 19.4577 67.5044 20.2681 68.5108 20.2681H76.9017C77.9081 20.2681 78.7249 19.4512 78.7249 18.4513C78.7249 17.4515 77.9081 16.6346 76.9017 16.6346H70.3275V14.0075H76.2286C77.235 14.0075 78.0518 13.1907 78.0518 12.1908C78.0518 11.191 77.235 10.3741 76.2286 10.3741H70.3275V7.74704H76.9017Z",fill:"currentColor"}),(0,K.jsx)("path",{d:"M84.5951 23.1908C84.3206 23.1908 84.105 23.1124 83.9481 22.9555C83.7913 22.7987 83.7129 22.5765 83.7129 22.2889V10.7416C83.7129 10.441 83.7913 10.2188 83.9481 10.0751C84.105 9.91823 84.3206 9.83981 84.5951 9.83981C84.8827 9.83981 85.0983 9.91823 85.2421 10.0751C85.3989 10.2188 85.4773 10.441 85.4773 10.7416V12.5257L85.2617 12.1728C85.4708 11.4539 85.8825 10.8789 86.4968 10.4476C87.1111 10.0163 87.8495 9.8006 88.7122 9.8006C89.5617 9.8006 90.3002 10.0032 90.9275 10.4084C91.5549 10.8004 92.045 11.369 92.3979 12.114C92.7508 12.8459 92.9272 13.7216 92.9272 14.741C92.9272 15.7474 92.7508 16.6297 92.3979 17.3877C92.0581 18.1327 91.5679 18.7078 90.9275 19.1129C90.3002 19.505 89.5617 19.7011 88.7122 19.7011C87.8626 19.7011 87.1307 19.4854 86.5164 19.0541C85.9021 18.6228 85.4904 18.0543 85.2813 17.3485H85.4969V22.2889C85.4969 22.5765 85.4185 22.7987 85.2617 22.9555C85.1048 23.1124 84.8827 23.1908 84.5951 23.1908ZM88.3004 18.2895C88.8625 18.2895 89.3526 18.1523 89.7708 17.8778C90.2021 17.6034 90.5354 17.2047 90.7707 16.6819C91.0059 16.1591 91.1236 15.5122 91.1236 14.741C91.1236 13.5909 90.8687 12.7152 90.359 12.114C89.8492 11.5128 89.1631 11.2122 88.3004 11.2122C87.7254 11.2122 87.2222 11.3494 86.7909 11.6239C86.3726 11.8853 86.0459 12.2774 85.8106 12.8002C85.5884 13.323 85.4773 13.9699 85.4773 14.741C85.4773 15.8912 85.7322 16.7734 86.2419 17.3877C86.7517 17.9889 87.4378 18.2895 88.3004 18.2895Z",fill:"currentColor"}),(0,K.jsx)("path",{d:"M99.2775 19.7011C98.3365 19.7011 97.5196 19.4985 96.8269 19.0933C96.1342 18.6882 95.5983 18.1131 95.2193 17.3681C94.8403 16.6231 94.6508 15.7474 94.6508 14.741C94.6508 13.983 94.7553 13.3033 94.9644 12.7021C95.1866 12.0878 95.5003 11.565 95.9055 11.1337C96.3106 10.7024 96.7942 10.3757 97.3562 10.1535C97.9313 9.91823 98.5718 9.8006 99.2775 9.8006C100.219 9.8006 101.035 10.0032 101.728 10.4084C102.421 10.8135 102.957 11.3886 103.336 12.1336C103.715 12.8655 103.904 13.7347 103.904 14.741C103.904 15.4991 103.793 16.1853 103.571 16.7996C103.362 17.4139 103.055 17.9366 102.65 18.368C102.244 18.7993 101.754 19.1326 101.179 19.3678C100.617 19.59 99.9833 19.7011 99.2775 19.7011ZM99.2775 18.2895C99.8526 18.2895 100.349 18.1523 100.768 17.8778C101.199 17.6034 101.526 17.2047 101.748 16.6819C101.983 16.1591 102.101 15.5122 102.101 14.741C102.101 13.5909 101.846 12.7152 101.336 12.114C100.826 11.5128 100.14 11.2122 99.2775 11.2122C98.7155 11.2122 98.2189 11.3494 97.7876 11.6239C97.3693 11.8853 97.0426 12.2774 96.8073 12.8002C96.572 13.323 96.4544 13.9699 96.4544 14.741C96.4544 15.8912 96.7093 16.7734 97.219 17.3877C97.7418 17.9889 98.428 18.2895 99.2775 18.2895Z",fill:"currentColor"}),(0,K.jsx)("path",{d:"M107.072 23.1908C106.797 23.1908 106.582 23.1124 106.425 22.9555C106.268 22.7987 106.19 22.5765 106.19 22.2889V10.7416C106.19 10.441 106.268 10.2188 106.425 10.0751C106.582 9.91823 106.797 9.83981 107.072 9.83981C107.359 9.83981 107.575 9.91823 107.719 10.0751C107.876 10.2188 107.954 10.441 107.954 10.7416V12.5257L107.738 12.1728C107.948 11.4539 108.359 10.8789 108.974 10.4476C109.588 10.0163 110.326 9.8006 111.189 9.8006C112.038 9.8006 112.777 10.0032 113.404 10.4084C114.032 10.8004 114.522 11.369 114.875 12.114C115.228 12.8459 115.404 13.7216 115.404 14.741C115.404 15.7474 115.228 16.6297 114.875 17.3877C114.535 18.1327 114.045 18.7078 113.404 19.1129C112.777 19.505 112.038 19.7011 111.189 19.7011C110.339 19.7011 109.607 19.4854 108.993 19.0541C108.379 18.6228 107.967 18.0543 107.758 17.3485H107.974V22.2889C107.974 22.5765 107.895 22.7987 107.738 22.9555C107.582 23.1124 107.359 23.1908 107.072 23.1908ZM110.777 18.2895C111.339 18.2895 111.829 18.1523 112.248 17.8778C112.679 17.6034 113.012 17.2047 113.247 16.6819C113.483 16.1591 113.6 15.5122 113.6 14.741C113.6 13.5909 113.345 12.7152 112.836 12.114C112.326 11.5128 111.64 11.2122 110.777 11.2122C110.202 11.2122 109.699 11.3494 109.268 11.6239C108.849 11.8853 108.523 12.2774 108.287 12.8002C108.065 13.323 107.954 13.9699 107.954 14.741C107.954 15.8912 108.209 16.7734 108.719 17.3877C109.228 17.9889 109.915 18.2895 110.777 18.2895Z",fill:"currentColor"}),(0,K.jsx)("path",{d:"M14.7326 0.727918C12.9726 1.59329 11.6096 4.00482 11.0833 5.59357C9.88384 4.95085 7.89924 3.76837 5.7791 4.00482C3.25593 4.28622 1.16093 5.72223 0.333058 8.59505C-0.616745 11.891 0.425001 15.7904 3.97287 17.5788C7.25977 19.2357 10.3262 21.1047 11.8468 22.2197C13.3673 23.3348 14.6332 24.4164 15.5435 23.8398C17.1655 23.054 20.2401 19.6295 22.4534 16.1013C24.3507 13.0769 25.9439 7.65453 23.3488 3.26211C21.2608 -0.0620856 17.6891 -0.725834 14.7326 0.727918Z",fill:"url(#wi-op-logo-heart)"}),(0,K.jsx)("mask",{id:"wi-op-logo-mask",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"25",height:"24",children:(0,K.jsx)("path",{d:"M14.7326 0.727918C12.9726 1.59329 11.6096 4.00482 11.0833 5.59357C9.88384 4.95085 7.89924 3.76837 5.7791 4.00482C3.25593 4.28622 1.16093 5.72223 0.333058 8.59505C-0.616745 11.891 0.425001 15.7904 3.97287 17.5788C7.25977 19.2357 10.3262 21.1047 11.8468 22.2197C13.3673 23.3348 14.6332 24.4164 15.5435 23.8398C17.1655 23.054 20.2401 19.6295 22.4534 16.1013C24.3507 13.0769 25.9439 7.65453 23.3488 3.26211C21.2608 -0.0620856 17.6891 -0.725834 14.7326 0.727918Z",fill:"white"})}),(0,K.jsxs)("g",{mask:"url(#wi-op-logo-mask)",children:[(0,K.jsx)("path",{d:"M29.5305 -3.85553H-1.43018V24.7597H29.5305V-3.85553Z",fill:"url(#wi-op-logo-base)"}),(0,K.jsx)("path",{d:"M12.7993 24.7597H29.5372V1.58752L12.7993 13.5165V24.7597Z",fill:"url(#wi-op-logo-shine-r)"}),(0,K.jsx)("path",{d:"M12.8037 24.7598H-1.63916V2.94476L12.8037 13.5166V24.7598Z",fill:"url(#wi-op-logo-shine-l)"})]}),(0,K.jsx)("path",{d:"M13.4339 7.58409L9.79429 9.73601C9.1523 10.1136 8.92988 10.962 9.2989 11.6189C9.66791 12.2759 10.4969 12.5035 11.1389 12.1259L14.2174 10.305L12.7515 11.9138V18.2247C12.7515 18.9852 13.3581 19.6059 14.1012 19.6059C14.8442 19.6059 15.4508 18.9852 15.4508 18.2247V8.77903C15.4508 8.51521 15.37 8.25656 15.2689 8.08586C14.8897 7.43407 14.0708 7.20129 13.4288 7.57891L13.4339 7.58409Z",fill:"white"}),(0,K.jsxs)("defs",{children:[(0,K.jsxs)("linearGradient",{id:"wi-op-logo-heart",x1:"12.3679",y1:"-0.18782",x2:"12.3679",y2:"23.9797",gradientUnits:"userSpaceOnUse",children:[(0,K.jsx)("stop",{stopColor:"#F1603C"}),(0,K.jsx)("stop",{offset:"1",stopColor:"#EE2566"})]}),(0,K.jsxs)("linearGradient",{id:"wi-op-logo-base",x1:"-5.01624",y1:"-7.30565",x2:"28.6827",y2:"29.4172",gradientUnits:"userSpaceOnUse",children:[(0,K.jsx)("stop",{stopColor:"#F3752D"}),(0,K.jsx)("stop",{offset:"1",stopColor:"#EC1272"})]}),(0,K.jsxs)("linearGradient",{id:"wi-op-logo-shine-r",x1:"10.2312",y1:"2.71613",x2:"23.8708",y2:"13.2539",gradientUnits:"userSpaceOnUse",children:[(0,K.jsx)("stop",{stopColor:"white",stopOpacity:"0.5"}),(0,K.jsx)("stop",{offset:"1",stopColor:"white",stopOpacity:"0"})]}),(0,K.jsxs)("linearGradient",{id:"wi-op-logo-shine-l",x1:"24.1414",y1:"-2.87687",x2:"12.838",y2:"18.379",gradientUnits:"userSpaceOnUse",children:[(0,K.jsx)("stop",{stopColor:"white",stopOpacity:"0.5"}),(0,K.jsx)("stop",{offset:"1",stopColor:"white",stopOpacity:"0"})]})]})]})}var _x="data:image/webp;base64,UklGRiIfAABXRUJQVlA4WAoAAAAQAAAA9QAA1wAAQUxQSDQJAAABsMf/nzG31uyzu9lNurFtp7Zt27btHtuu3YPatnWM1A2q08bJJmmyu/P7XfSm+2Bm/rsnIiaA/JNAndnDLyQiJi4uNios0MfdIEJ699Dkhv2mLP10zdadu3dsXv7e/HFta0T6GIXG6B/fbPznp9Lz7FjViqzrG+Z1TA4wioolpvOru++WISLCf/8XICAiOh6feKtznEVEvNNG//AYEZFSCviSQBERH+8YmeQhGh415p4vRQQKAOhUAEC0HpmYWE0kTAmTzlUiUgCUFRDLDw8N14uCLqjHvnIECig/IOavauIhBua09x4hUkBlAuLvk0J1AuDT/Tggpajk4i9TjNwXNi8bAVDph9q68Z0ubnk5UkDlp/e38JyU8h1FQBUCZo9w5zd9rd0IgCp9PMrCa1LtIwiAqn08xMxnutSDCKhewIzOBi6L3YmA6v6pDo+FbUBQG+4J5S+PjxwIqHbHm2685TKqGAHVn9NVx1e6RrcRUAvPhfFV8F4E1ETHGy48ZV5mB43AB/V5quUjBNTKNWZ+8tuPFDUzp1EVDGYP36CQ0NDQ4EBvV6OOO6TxFQDagd8Y/8vkG5XSrt+kJe998sWXX3zy9pzBXWrH+Jr4IuJnBNTQR6nELSil16JNpx4VPXfgi23WnGvfLe2VGmzmB/0CB6CWwvt1B394NoeiM3POftwn0ZMXotJRYwr/KkBEoPAyAICIOYem1/LV8YA0n4LGICIFAHQqAGLllYW1PDkg5DekqLEAgPI6Lk2LMzFvrB1Aa5RYvrNHAOOCf0JAFudv7eTCtEHlbAJ0XBnpyTDj9wjI6luLQ9iV9IBh+PTjCGZNt1OGYdHnkYwyH0CKLC/+PIxNyU8QmIbF7/kyabQdGIc5s0wM0q1Ciqy/11PH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:e}){return(0,K.jsx)("svg",{width:"82",height:"72",viewBox:"0 0 82 72",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,className:e,children:(0,K.jsx)("image",{href:_x,width:"82",height:"72",preserveAspectRatio:"xMidYMid meet"})})}he(`.wi-op-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;display:flex;flex-direction:column;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent}[data-theme=light] .wi-op-scroll{scrollbar-color:rgba(0,0,0,.12) transparent}.wi-op-scroll::-webkit-scrollbar{width:4px}.wi-op-scroll::-webkit-scrollbar-track{background:transparent}.wi-op-scroll::-webkit-scrollbar-thumb{background:#ffffff26;border-radius:4px}[data-theme=light] .wi-op-scroll::-webkit-scrollbar-thumb{background:#0000001f}.wi-op-header-title{position:absolute;left:50%;transform:translate(-50%);display:inline-flex;align-items:center;pointer-events:none}.wi-op-logo{display:block;flex-shrink:0;color:var(--ds-content-highest, #000000)}.wi-op-logo-img{height:24px;width:auto;object-fit:contain}.wi-op-hero{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:24px;flex-shrink:0}.wi-op-hero-copy{display:flex;flex-direction:column;gap:6px;min-width:0}.wi-op-hero-title{display:flex;flex-direction:column;margin:0;font-family:inherit;font-size:18px;font-weight:600;line-height:1.25;color:var(--ds-content-highest, #000000)}.wi-op-hero-title-row{display:inline-flex;align-items:center;gap:4px;flex-wrap:wrap}.wi-op-x-badge{flex-shrink:0;color:var(--ds-content-highest, #000000)}[data-theme=light] .wi-op-x-badge{--wi-op-x-glyph: #ffffff}[data-theme=dark] .wi-op-x-badge{--wi-op-x-glyph: #1e232e}.wi-op-hero-sub{margin:0;font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-op-hero-art{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:120px;height:72px}.wi-op-hero-img{max-width:100%;max-height:72px;object-fit:contain}.wi-op-panel{display:flex;flex-direction:column;gap:8px;padding:0 24px;flex-shrink:0}.wi-op-balance-card{display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa)}.wi-op-balance-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.wi-op-balance-label{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.wi-op-balance-body{display:flex;align-items:center;gap:4px;min-width:0}.wi-op-balance-icon{width:24px;height:24px;border-radius:50%;object-fit:cover;flex-shrink:0}.wi-op-balance-value{font-family:inherit;font-size:28px;font-weight:600;line-height:1.25;color:var(--ds-content-highest, #000000);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-op-link-btn{appearance:none;display:inline-flex;align-items:center;gap:4px;padding:0;border:none;background:transparent;font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;flex-shrink:0;transition:color .15s ease}.wi-op-link-btn:hover:not(:disabled){color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-link-btn:disabled{cursor:default;opacity:.5}.wi-op-balance-head>[data-gou-mode=button]{display:contents}.wi-op-action-row{display:flex;align-items:stretch;gap:8px}.wi-op-action-card{appearance:none;display:flex;flex:1 1 0;min-width:0;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 8px;border:none;border-radius:10px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-medium, rgba(0, 0, 0, .65));font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;text-align:center;cursor:pointer;transition:background-color .15s ease,transform .1s ease}.wi-op-action-card>svg{flex-shrink:0}.wi-op-action-card:hover:not(:disabled){background:#2e3544}[data-theme=light] .wi-op-action-card:hover:not(:disabled){background:#e4e8ef}.wi-op-action-card:active:not(:disabled){transform:scale(.95)}.wi-op-action-card:disabled{cursor:default;opacity:.45}.wi-op-cta-row{display:flex;flex-direction:column;gap:10px;padding:24px;flex-shrink:0}.wi-op-cta-skeleton{border-radius:10px}.wi-op-cta{appearance:none;display:flex;align-items:center;justify-content:center;width:100%;padding:12px 16px;border:none;border-radius:10px;font-family:inherit;font-size:16px;font-weight:600;line-height:1;cursor:pointer;transition:filter .15s ease,transform .1s ease,background-color .15s ease}.wi-op-cta:active:not(:disabled){transform:scale(.985)}.wi-op-cta:disabled{cursor:default;opacity:.5}.wi-op-cta--gradient{background:linear-gradient(193.7deg,#f62e61 16.1%,#f7564a 83.9%);color:#fff}.wi-op-cta--gradient:hover:not(:disabled){filter:brightness(1.05)}.wi-op-cta--purple{background:var(--ds-system-purple-high, #7346f3);color:var(--ds-system-purple-on, #ffffff)}.wi-op-cta--purple:hover:not(:disabled){filter:brightness(1.08)}.wi-op-cta--outline{background:transparent;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-cta--outline:hover:not(:disabled){background:var(--ds-surface-medium, #f5f7fa)}.wi-op-features{display:flex;flex-direction:column;padding:0 24px 8px;flex-shrink:0}.wi-op-feature{display:flex;align-items:center;gap:6px;padding:12px 0}.wi-op-feature+.wi-op-feature{border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-op-feature-icon{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;flex-shrink:0;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-accent-primary-high, #7346f3)}.wi-op-feature-copy{display:flex;flex-direction:column;min-width:0}.wi-op-feature-title{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-feature-desc{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-op-activity{display:flex;flex-direction:column;gap:8px;padding:0 24px 8px;flex-shrink:0}.wi-op-activity-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.wi-op-activity-heading{display:flex;flex-direction:column;min-width:0}.wi-op-activity-title{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-op-activity-currency{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-op-activity-list{display:flex;flex-direction:column;margin:0;padding:0;list-style:none}.wi-op-activity-item{display:flex;align-items:flex-start;gap:6px;padding:12px 0}.wi-op-activity-item+.wi-op-activity-item{border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-op-activity-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;overflow:hidden;flex-shrink:0;background:var(--ds-surface-medium, #f5f7fa)}.wi-op-activity-avatar img{width:100%;height:100%;object-fit:cover}.wi-op-activity-initial{font-family:inherit;font-size:13px;font-weight:600;line-height:1;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.wi-op-activity-copy{display:flex;flex-direction:column;flex:1 1 0;min-width:0}.wi-op-activity-meta{display:flex;align-items:center;gap:6px;min-width:0}.wi-op-activity-peer{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-op-activity-sep{width:1px;height:14px;flex-shrink:0;background:var(--ds-border-medium, rgba(0, 0, 0, .18))}.wi-op-activity-time{font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap;flex-shrink:0}.wi-op-activity-amount{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-op-badge{display:inline-flex;align-items:center;justify-content:center;padding:3px 6px;border-radius:4px;flex-shrink:0;font-family:inherit;font-size:12px;font-weight:500;line-height:1}.wi-op-badge--claimed{background:var(--ds-system-green-low, #e7f9f8);color:var(--ds-system-green-high, #00a0a2)}.wi-op-badge--waiting{background:var(--ds-accent-primary-low, #f5f3ff);color:var(--ds-accent-primary-high, #7346f3)}.wi-op-badge--refunded{background:var(--ds-system-red-low, #ffeeee);color:var(--ds-system-red-high, #d20609)}.wi-op-badge--ready{background:var(--ds-system-blue-low, #ecf8fc);color:var(--ds-system-blue-high, #008dca)}.wi-op-footer{display:flex;align-items:center;justify-content:center;padding:16px 24px;flex-shrink:0;border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-drawer-content .wi-op-hero,.wi-drawer-content .wi-op-cta-row,.wi-drawer-content .wi-op-panel,.wi-drawer-content .wi-op-features,.wi-drawer-content .wi-op-activity,.wi-drawer-content .wi-op-footer{padding-left:16px;padding-right:16px}
12
+ `);var P=require("react/jsx-runtime"),Vx=6,Qx={claimed:"Claimed",waiting:"Waiting",refunded:"Refunded",ready:"Ready"};function Kg(e,t){let n;try{n=BigInt(e||"0")}catch{return"0.00"}let r=n<0n;r&&(n=-n);let o,a;if(t<=2){let i=10n**BigInt(t);o=n/i,a=n%i*10n**BigInt(2-t)}else{let i=n/10n**BigInt(t-2);o=i/100n,a=i%100n}return`${r?"-":""}${qx(o.toString())}.${a.toString().padStart(2,"0")}`}function qx(e){let t="";for(let n=0;n<e.length;n++){let r=e.length-n;n>0&&r%3===0&&(t+=","),t+=e[n]}return t}function Yx(e){if(!e)return"";let t=e<1e12?e*1e3:e,n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"just now";let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let o=Math.floor(r/60);if(o<24)return`${o}h ago`;let a=Math.floor(o/24);if(a<30)return`${a}d ago`;let i=Math.floor(a/30);return i<12?`${i}mo ago`:`${Math.floor(i/12)}y ago`}function Kx(e){let t=e.trim();return t?t.startsWith("@")?t:`@${t}`:""}function Da({env:e="production",balanceDisplay:t,balanceIconUrl:n,isBalanceLoading:r,summary:o,logoSrc:a,heroSrc:i,onBack:s,onClose:l,onSend:d,onClaim:p,onActivity:h,onRepliesSeen:u,onBoard:g,onGetToken:x,getTokenSlot:y}){let f=o?.activity??[],c=f.length>0,b=o?.claimableCount??0,w=o?.repliesWaitingCount??0,k=o?.isLoading??!1,C=o?.xConnected??!1,N=Jn.useCallback(M=>{window.open(Fg(e,M),"_blank","noopener,noreferrer")},[e]),T=Jn.useCallback(()=>d?d():N("send"),[d,N]),R=Jn.useCallback(()=>p?p():N("claim"),[p,N]),S=Jn.useCallback(()=>{if(u?.(),h)return h();N("activity")},[h,u,N]),E=Jn.useCallback(()=>g?g():N("board"),[g,N]),A=Jn.useCallback(()=>{if(x)return x();window.open(Ug(e),"_blank","noopener,noreferrer")},[x,e]),F=Jn.useMemo(()=>!o||b<=0?null:Kg(o.claimableTotalRaw,o.claimableDecimals??18),[o,b]),D=Jn.useMemo(()=>f.slice(0,Vx),[f]),G=Jn.useCallback(M=>{M.currentTarget.style.display="none"},[]);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)("div",{className:"wi-sticky-header",children:[(0,P.jsxs)("div",{className:"wi-header wi-header--receive",children:[(0,P.jsx)("button",{type:"button",className:"wi-header-back",onClick:s,"aria-label":"Back",children:(0,P.jsx)(En,{size:24})}),(0,P.jsx)("span",{className:"wi-op-header-title",children:a?(0,P.jsx)("img",{src:a,alt:"ONEpop",className:"wi-op-logo-img",height:24,draggable:!1,onError:G}):(0,P.jsx)(qg,{className:"wi-op-logo"})}),(0,P.jsx)("button",{type:"button",className:"wi-header-action",onClick:l,"aria-label":"Close","data-wi-close":!0,children:(0,P.jsx)(vn,{size:24})})]}),(0,P.jsx)("hr",{className:"wi-divider"})]}),(0,P.jsxs)("div",{className:"wi-op-scroll","data-vaul-no-drag":!0,children:[(0,P.jsxs)("section",{className:"wi-op-hero",children:[(0,P.jsxs)("div",{className:"wi-op-hero-copy",children:[(0,P.jsxs)("h2",{className:"wi-op-hero-title",children:[(0,P.jsx)("span",{children:"Send money with"}),(0,P.jsxs)("span",{className:"wi-op-hero-title-row",children:["just an",(0,P.jsx)(Hg,{size:20,className:"wi-op-x-badge"}),"@handle."]})]}),(0,P.jsx)("p",{className:"wi-op-hero-sub",children:"They don't even need a wallet yet."})]}),(0,P.jsx)("div",{className:"wi-op-hero-art","aria-hidden":!0,children:i?(0,P.jsx)("img",{src:i,alt:"",className:"wi-op-hero-img",draggable:!1,onError:G}):(0,P.jsx)(Yg,{})})]}),(0,P.jsxs)("section",{className:"wi-op-panel",children:[(0,P.jsxs)("div",{className:"wi-op-balance-card",children:[(0,P.jsxs)("div",{className:"wi-op-balance-head",children:[(0,P.jsx)("span",{className:"wi-op-balance-label",children:"Available"}),y??(0,P.jsxs)("button",{type:"button",className:"wi-op-link-btn",onClick:A,"data-track":"onepop_get_token",children:[(0,P.jsx)("span",{children:"Get ONEUSD"}),(0,P.jsx)(La,{size:12})]})]}),(0,P.jsx)("div",{className:"wi-op-balance-body",children:r?(0,P.jsx)("div",{className:"wi-skeleton-block",style:{width:140,height:32}}):(0,P.jsxs)(P.Fragment,{children:[n&&(0,P.jsx)("img",{src:n,alt:"","aria-hidden":!0,className:"wi-op-balance-icon",width:24,height:24,draggable:!1,onError:G}),(0,P.jsx)("span",{className:"wi-op-balance-value",children:t??"0.00"})]})})]}),(0,P.jsxs)("div",{className:"wi-op-action-row","aria-label":"ONEpop actions",children:[(0,P.jsxs)("button",{type:"button",className:"wi-op-action-card",onClick:T,"aria-label":"Send POP","data-track":"onepop_send",children:[(0,P.jsx)(jg,{size:24}),(0,P.jsx)("span",{children:"Send POP"})]}),(0,P.jsxs)("button",{type:"button",className:"wi-op-action-card",onClick:R,"aria-label":"Claim POPs","data-track":"onepop_claim",children:[(0,P.jsx)(Wg,{size:24}),(0,P.jsx)("span",{children:"Claim POPs"})]}),C&&(0,P.jsxs)("button",{type:"button",className:"wi-op-action-card",onClick:S,"aria-label":"Activity","data-track":"onepop_activity",children:[(0,P.jsx)(Gg,{size:24}),(0,P.jsx)("span",{children:"Activity"})]})]})]}),(0,P.jsx)("section",{className:"wi-op-cta-row",children:k?(0,P.jsx)("div",{className:"wi-skeleton-block wi-op-cta-skeleton",style:{height:40}}):(0,P.jsxs)(P.Fragment,{children:[!c&&b<=0&&(0,P.jsx)("button",{type:"button",className:"wi-op-cta wi-op-cta--gradient",onClick:T,"data-track":"onepop_send_first",children:"Send your first POP!"}),b>0?(0,P.jsx)("button",{type:"button",className:"wi-op-cta wi-op-cta--purple",onClick:R,"data-track":"onepop_claim_banner",children:`${b} POP${b===1?"":"s"} waiting to claim (total ${F})`}):!c&&(0,P.jsx)("button",{type:"button",className:"wi-op-cta wi-op-cta--purple",onClick:E,"data-track":"onepop_claim_maybe",children:"You might have POPs waiting"}),w>0&&(0,P.jsx)("button",{type:"button",className:"wi-op-cta wi-op-cta--outline",onClick:S,"data-track":"onepop_replies",children:`${w} ${w===1?"reply":"replies"} waiting`})]})}),c?(0,P.jsxs)("section",{className:"wi-op-activity",children:[(0,P.jsxs)("div",{className:"wi-op-activity-head",children:[(0,P.jsxs)("div",{className:"wi-op-activity-heading",children:[(0,P.jsx)("span",{className:"wi-op-activity-title",children:"Recent activity"}),(0,P.jsx)("span",{className:"wi-op-activity-currency",children:"Currency: ONEUSD"})]}),(0,P.jsxs)("button",{type:"button",className:"wi-op-link-btn",onClick:S,"data-track":"onepop_see_all_activity",children:[(0,P.jsx)("span",{children:"See all activity"}),(0,P.jsx)(La,{size:16})]})]}),(0,P.jsx)("ul",{className:"wi-op-activity-list",children:D.map(M=>(0,P.jsx)(Zx,{item:M},M.id))})]}):(0,P.jsxs)("section",{className:"wi-op-features",children:[(0,P.jsx)(Fd,{icon:(0,P.jsx)(_g,{size:20}),title:"No wallet address needed",desc:"just their @handle"}),(0,P.jsx)(Fd,{icon:(0,P.jsx)(Vg,{size:20}),title:"Claim instantly",desc:"social login, zero gas"}),(0,P.jsx)(Fd,{icon:(0,P.jsx)(Qg,{size:20}),title:"Refund anytime",desc:"get it back if unclaimed"})]})]}),(0,P.jsx)("div",{className:"wi-op-footer",children:(0,P.jsx)("span",{children:"Powered by ONEpop"})})]})}function Fd({icon:e,title:t,desc:n}){return(0,P.jsxs)("div",{className:"wi-op-feature",children:[(0,P.jsx)("span",{className:"wi-op-feature-icon","aria-hidden":!0,children:e}),(0,P.jsxs)("span",{className:"wi-op-feature-copy",children:[(0,P.jsx)("span",{className:"wi-op-feature-title",children:t}),(0,P.jsx)("span",{className:"wi-op-feature-desc",children:n})]})]})}function Zx({item:e}){let t=Kx(e.handle),n=e.direction==="sent"?`Sent to ${t}`:`Claimed from ${t}`,r=t.replace("@","").charAt(0).toUpperCase()||"?";return(0,P.jsxs)("li",{className:"wi-op-activity-item",children:[(0,P.jsx)("span",{className:"wi-op-activity-avatar","aria-hidden":!0,children:e.avatarUrl?(0,P.jsx)("img",{src:e.avatarUrl,alt:"",width:30,height:30,draggable:!1,onError:o=>{o.currentTarget.style.display="none"}}):(0,P.jsx)("span",{className:"wi-op-activity-initial",children:r})}),(0,P.jsxs)("span",{className:"wi-op-activity-copy",children:[(0,P.jsxs)("span",{className:"wi-op-activity-meta",children:[(0,P.jsx)("span",{className:"wi-op-activity-peer",children:n}),(0,P.jsx)("span",{className:"wi-op-activity-sep","aria-hidden":!0}),(0,P.jsx)("span",{className:"wi-op-activity-time",children:Yx(e.timestamp)})]}),(0,P.jsx)("span",{className:"wi-op-activity-amount",children:Kg(e.amountRaw,e.decimals)})]}),(0,P.jsx)("span",{className:Ie("wi-op-badge",`wi-op-badge--${e.status}`),"data-status":e.status,children:Qx[e.status]})]})}var Zg=H(require("react"),1);var Pa=require("react/jsx-runtime"),Ud=Zg.forwardRef(function({className:t,children:n,...r},o){return(0,Pa.jsxs)("button",{...r,ref:o,type:"button",className:"wi-op-link-btn","data-track":"onepop_get_token",children:[(0,Pa.jsx)("span",{children:"Get ONEUSD"}),(0,Pa.jsx)(La,{size:12})]})});var v=require("react/jsx-runtime"),Xg=["tokens","nfts"],Xx="On-ramp is not available in your region.";function Jx(e){if(typeof window>"u"||!e?.length)return!1;let{origin:t,pathname:n}=window.location,r=t+n;return e.some(o=>r===o||r.startsWith(`${o}/`))}function $x(e){let t=e.lastIndexOf(".");return t===-1?{main:e,decimal:""}:{main:e.slice(0,t),decimal:e.slice(t)}}function ev(e){let t=e.toLowerCase().replace(/^0x/,""),n=t.length>=8?t.slice(0,8):t.padEnd(8,"0"),r=parseInt(n.slice(0,4),16)%360,o=(r+60+parseInt(n.slice(4,8),16)%120)%360;return`linear-gradient(135deg, hsl(${r} 85% 65%), hsl(${o} 80% 55%))`}function tv(e,t=.5){let n=J.useRef(null),r=J.useRef(null),[o,a]=J.useState(1);return J.useLayoutEffect(()=>{let i=n.current,s=r.current;if(!i||!s)return;let l=()=>{let p=i.clientWidth;if(!p)return;let h=s.cloneNode(!0);h.style.setProperty("--wi-total-scale","1"),h.style.position="absolute",h.style.left="-9999px",h.style.top="-9999px",h.style.visibility="hidden",h.style.maxWidth="none",h.style.width="max-content",i.appendChild(h);let u=h.offsetWidth;i.removeChild(h);let g=u>p?Math.max(t,p/u):1;a(g)};l();let d=new ResizeObserver(l);return d.observe(i),()=>d.disconnect()},[e,t]),{containerRef:n,valueRef:r,scale:o}}function Ms({align:e="end",sideOffset:t=12,className:n,children:r}){let{presentation:o,env:a,theme:i,isMobile:s,open:l,drawerDirection:d,modal:p,showBalance:h,showForgeToken:u,showGameToken:g,showQR:x,showBridge:y,showNft:f,qrLogoSrc:c,walletAddress:b,accountName:w,sendAccounts:k,profileImageUrl:C,connectorName:N,preferredTokens:T,close:R,onSelectWallet:S,onCopyAddress:E,onBuy:A,onDisconnect:F,disconnectLabel:D,termsUrl:G,termsLabel:M,privacyUrl:j,privacyLabel:le,portalStyle:oe,navContent:ne,navPosition:Q,footerContent:ee,view:z,setView:q,selectedSendToken:ae,setSelectedSendToken:Z,selectedDetailToken:pe,setSelectedDetailToken:Se,selectedNftCollection:Ue,setSelectedNftCollection:fe,selectedNft:Re,setSelectedNft:Ce,showPortfolio:tt,showOnePop:Le,onePopSummary:$e,onOnePopOpen:wt,onOnePopSend:Ge,onOnePopClaim:Qe,onOnePopActivity:He,onOnePopRepliesSeen:Dt,onePopLogoSrc:tn,onePopGetTokenSlot:yt,onePopHeroSrc:Pt,portfolioTitle:Tt,portfolioSections:nn,showTotalAssets:It,totalAssetsLabel:ut,sendTransaction:Ot,getTransactionReceipt:rt,estimateGas:on,onOutlink:ft,lpBalanceReader:fn,stakingRewardsReader:Ze,bridgeTokens:lt,bridgeHistory:nt,getBridgeQuote:Et,getBridgeToTokens:Rt,getBridgeApproval:Xe,approveBridge:an,submitBridge:sn,onReceive:Yt,onSend:ln,onBuyDisabledMessage:V,onBridgeDisabledMessage:ve,onSendDisabledMessage:Ne}=Ur(),ze=o==="page",[ot,Kt]=J.useState();J.useEffect(()=>{Kt(qu()??(Lo()?$g.WALLET_LABELS.default:void 0))},[]);let Bt=w??N??ot??"Account",[Cn,Rn]=J.useState(null),O=J.useRef(void 0),De=J.useCallback(I=>{Rn(I),clearTimeout(O.current),O.current=setTimeout(()=>Rn(null),4e3)},[]);J.useEffect(()=>()=>clearTimeout(O.current),[]);let qe=!!V,re=J.useCallback(()=>{if(qe){De(V);return}let I=A?.();I&&typeof I.then=="function"&&I.catch(()=>{De(V??Xx)})},[qe,V,A,De]),Te=!!ve,U=!!Ne,{tokens:Oe,isLoading:$}=Tr(a,b,l&&h),{statsMap:Pe}=Ir(a,h),{aprPercent:In}=Nu(),{categoryMap:Xr,infoMap:rr}=Tu(a,h),or=h&&It,{displayValue:$o,isLowerBound:wl,isLoading:yl}=Au(a,b,l&&or),[Br,Jr]=J.useState(!1),oi=J.useRef(null),[$r,ai]=J.useState(0),{holdings:eo,isLoading:ii}=yu(a,b,l&&h&&u),xl=J.useMemo(()=>eo.map(I=>I.token),[eo]),{imageMap:Y}=xu(a,xl,u&&eo.length>0),xt=Ou(a),mt=J.useMemo(()=>Du({env:a,tokens:Oe,pinnedTokens:xt,preferredTokens:T,statsMap:Pe,categoryMap:Xr,showGameToken:g}),[Oe,a,Pe,g,Xr,xt,T]),Zt=J.useMemo(()=>{if(!u)return[];let I=new Set(Oe.map(ue=>ue.address.toLowerCase()));return[...eo].filter(ue=>!I.has(ue.token.toLowerCase())).sort((ue,at)=>{let Vn=kt(ue.value)??new jd.default(0);return(kt(at.value)??new jd.default(0)).minus(Vn).toNumber()})},[eo,u,Oe]),Ut=J.useRef(!1),[et,xn]=J.useState(null),_e=J.useRef(void 0),_n=et?.chainId??ae?.chainId??mt[0]?.chainId??0,{transactionUrl:zr}=fa(a,_n,et?.txHash,!!(et?.txHash&&_n)),vt=J.useCallback(I=>{Ut.current=!0,q(I)},[q]),[q0,vl]=J.useState("recipient"),ea=J.useCallback(()=>{Z(null),vl("recipient"),vt("wallet")},[Z,vt]),si=J.useCallback((I,ue="recipient")=>{if(U){De(Ne);return}vl(ue),Z(I),vt("send")},[U,Ne,De,Z,vt]),Y0=J.useCallback(I=>{Se(I),vt("token-detail")},[Se,vt]),K0=J.useCallback(()=>{wt?.(),vt("onepop")},[wt,vt]),Z0=J.useCallback(()=>{Se(null),vt("wallet")},[Se,vt]),[li,X0]=J.useState("tokens"),J0=f&&li==="nfts",{tabsRef:$0,indicatorStyle:yc,slide:kl,select:eb}=Wi(li,X0,Xg,[f,z]),tb=J.useCallback(I=>{fe(I),vt("nft-collection")},[fe,vt]),nb=J.useCallback(I=>{Ce(I),vt("nft-detail")},[Ce,vt]),rb=J.useCallback(()=>{Ce(null),vt("nft-collection")},[Ce,vt]),ob=J.useCallback(()=>{fe(null),vt("wallet")},[fe,vt]),ab=J.useCallback(I=>{si(I,"recipient")},[si]),di=Xt("apps.json",a,I=>Bn(I?.gametokenBridge,a)),xc=Xt("apps.json",a,I=>I?.gametokenSites),ib=J.useCallback(()=>{if(Te){De(ve);return}if(di){if(Jx(xc)){window.location.assign(di);return}window.open(di,"_blank","noopener,noreferrer")}},[Te,ve,di,xc,De]),sb=J.useCallback(I=>{clearTimeout(_e.current),Z(null),vt("wallet"),xn({status:"pending",txHash:I.txHash,chainId:I.chainId,description:`${I.amount} ${I.tokenSymbol} to ${dn(I.recipient)}`})},[Z,vt]),lb=J.useCallback(I=>{let ue=ae?.chainId;Z(null),vt("wallet"),!(!I||!ue)&&(xn(at=>({status:"success",txHash:I,chainId:ue,description:at?.txHash===I?at.description:"Tap to see your transaction"})),clearTimeout(_e.current),_e.current=setTimeout(()=>xn(null),5e3))},[ae?.chainId,Z,vt]),db=J.useCallback(I=>{let ue=I.txHash;ue&&(xn({status:"error",txHash:ue,chainId:I.chainId,description:I.message}),clearTimeout(_e.current),_e.current=setTimeout(()=>xn(null),5e3))},[]),ta=J.useMemo(()=>{if(Yt)return Yt;if(x)return()=>vt("qr")},[Yt,x,vt]),ci=J.useMemo(()=>{if(ln)return ln;if(mt.length===0)return;let I=mt[0];return()=>si(I,"token")},[ln,mt,si]),vc=J.useCallback(()=>{if(U){De(Ne);return}ci?.()},[U,Ne,ci,De]);J.useEffect(()=>{l||(Ut.current=!1,vl("recipient"))},[l]);let Cl=J.useRef(null);J.useEffect(()=>{let I=Cl.current;if(!I||!s)return;let ue=at=>{at.pointerType==="touch"&&at.stopPropagation()};return I.addEventListener("pointerdown",ue),()=>I.removeEventListener("pointerdown",ue)},[s]);let[Io,kc]=J.useState(!1),Rl=J.useRef(void 0),[na,ra]=J.useState(!1);J.useEffect(()=>{if(!na)return;let I=()=>ra(!1),ue=Vn=>{Vn.key==="Escape"&&ra(!1)},at=setTimeout(()=>{document.addEventListener("mousedown",I,!0),document.addEventListener("keydown",ue,!0)},0);return()=>{clearTimeout(at),document.removeEventListener("mousedown",I,!0),document.removeEventListener("keydown",ue,!0)}},[na]),J.useEffect(()=>{ra(!1)},[b]),J.useEffect(()=>()=>clearTimeout(Rl.current),[]),J.useEffect(()=>()=>clearTimeout(_e.current),[]),J.useEffect(()=>{let I=oi.current;if(!I||ee===null){ai(0);return}let ue=()=>{ai(I.offsetHeight)};if(ue(),typeof ResizeObserver>"u")return;let at=new ResizeObserver(ue);return at.observe(I),()=>at.disconnect()},[ee]);let Cc=J.useCallback(async()=>{if(!Io)try{await navigator.clipboard.writeText(b),kc(!0),clearTimeout(Rl.current),Rl.current=setTimeout(()=>kc(!1),2e3),E?.(b,!0)}catch{E?.(b,!1)}},[b,E,Io]),pi=J.useCallback(I=>{I.currentTarget.setAttribute("data-loaded","true")},[]),Rc=J.useMemo(()=>({background:ev(b)}),[b]),ui=J.useMemo(()=>C||Sr(a,b,{size:120,bg:i==="dark"?"1A1A2E":"F3F6F8"}),[C,a,b,i]),Nl=J.useMemo(()=>$x($o),[$o]),{containerRef:cb,valueRef:pb,scale:ub}=tv(Br?"\u2022\u2022\u2022\u2022\u2022\u2022":$o),Nc=G||j?(0,v.jsxs)("div",{className:"wi-legal-links",children:[G&&(0,v.jsx)("a",{className:"wi-legal-link",href:G,target:"_blank",rel:"noopener noreferrer","data-track":"terms_link",onClick:I=>jt(I,G,{category:"terms",origin:"terms"},ft),children:M}),G&&j&&(0,v.jsx)("span",{className:"wi-legal-sep","aria-hidden":!0,children:"\xB7"}),j&&(0,v.jsx)("a",{className:"wi-legal-link",href:j,target:"_blank",rel:"noopener noreferrer","data-track":"privacy_link",onClick:I=>jt(I,j,{category:"privacy",origin:"privacy"},ft),children:le})]}):null,Sc=F?(0,v.jsxs)("button",{type:"button",className:"wi-disconnect-btn","data-track":"disconnect",onClick:()=>{F(),R()},children:[(0,v.jsx)(hp,{size:16}),(0,v.jsx)("span",{className:"wi-disconnect-label",children:D})]}):null,fb=h&&!ne,Tc=!or,Ic=(0,v.jsxs)("button",{type:"button",className:Ie("wi-action-card",U&&"wi-action-card--dimmed"),onClick:vc,disabled:!U&&!ci,"aria-disabled":U||void 0,"aria-label":"Send","data-track":"send_open",children:[(0,v.jsx)(xp,{size:20}),(0,v.jsx)("span",{children:"Send"})]}),mb=fb?ze?Tc?(0,v.jsx)("div",{className:"wi-action-row","aria-label":"Wallet actions",children:Ic}):null:(0,v.jsxs)("div",{className:"wi-action-row","aria-label":"Wallet actions",children:[(0,v.jsxs)("button",{type:"button",className:Ie("wi-action-card",qe&&"wi-action-card--dimmed"),onClick:re,disabled:!A&&!qe,"aria-disabled":qe||void 0,"aria-label":"Buy","data-track":"buy",children:[(0,v.jsx)(Cp,{size:20}),(0,v.jsx)("span",{children:"Buy"})]}),y?(0,v.jsxs)("button",{type:"button",className:Ie("wi-action-card",Te&&"wi-action-card--dimmed"),onClick:ib,"aria-disabled":Te||void 0,"aria-label":"Bridge","data-track":"bridge_open",children:[(0,v.jsx)(Rp,{size:20}),(0,v.jsx)("span",{children:"Bridge"})]}):(0,v.jsxs)("button",{type:"button",className:"wi-action-card",onClick:ta,disabled:!ta,"aria-label":"Receive","data-track":"receive",children:[(0,v.jsx)(Ei,{size:20}),(0,v.jsx)("span",{children:"Receive"})]}),Tc&&Ic,Le&&(0,v.jsxs)("button",{type:"button",className:"wi-action-card",onClick:K0,"aria-label":"Open ONEpop","data-track":"onepop_open",children:[(0,v.jsx)(zd,{size:20}),(0,v.jsx)("span",{children:"ONEpop"})]}),tt?(0,v.jsxs)("button",{type:"button",className:"wi-action-card",onClick:()=>vt("portfolio"),"aria-label":"View portfolio","data-track":"portfolio_open",children:[(0,v.jsx)(kp,{size:20}),(0,v.jsx)("span",{children:"Portfolio"})]}):y?(0,v.jsxs)("button",{type:"button",className:"wi-action-card",onClick:ta,disabled:!ta,"aria-label":"Receive","data-track":"receive",children:[(0,v.jsx)(Ei,{size:20}),(0,v.jsx)("span",{children:"Receive"})]}):null]}):null,gb=(0,v.jsxs)("div",{className:Ie("wi-view-inner",Ut.current&&"wi-view-wallet"),children:[or&&(0,v.jsxs)("div",{className:"wi-total-section",children:[(0,v.jsxs)("div",{className:"wi-total-head",children:[(0,v.jsx)("span",{className:"wi-total-label",children:ut}),(0,v.jsx)("span",{role:"button",tabIndex:0,className:"wi-total-eye",onClick:I=>{I.stopPropagation(),Jr(ue=>!ue)},onKeyDown:I=>{(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),I.stopPropagation(),Jr(ue=>!ue))},"aria-label":Br?"Show balance":"Hide balance","data-track":"balance_toggle",children:Br?(0,v.jsx)(wp,{}):(0,v.jsx)(bp,{})})]}),(0,v.jsxs)("div",{className:"wi-total-body",children:[(0,v.jsx)("div",{className:"wi-total-value-wrap",ref:cb,children:yl?(0,v.jsx)("div",{className:"wi-skeleton-block wi-total-skeleton",style:{width:160,height:42}}):(0,v.jsx)("div",{className:"wi-total-value","data-hidden":Br||void 0,ref:pb,style:{"--wi-total-scale":ub},children:Br?(0,v.jsx)("span",{className:"wi-total-mask",children:"\u2022\u2022\u2022\u2022\u2022\u2022"}):(0,v.jsxs)(v.Fragment,{children:[wl&&(0,v.jsx)("span",{className:"wi-total-lte",children:"\u2264"}),(0,v.jsx)("span",{className:"wi-total-currency",children:"$"}),(0,v.jsx)("span",{className:"wi-total-amount",children:Nl.main}),Nl.decimal&&(0,v.jsx)("span",{className:"wi-total-decimal",children:Nl.decimal})]})})}),(0,v.jsx)("button",{type:"button",className:Ie("wi-total-send",U&&"wi-total-send--dimmed"),onClick:vc,disabled:!U&&!ci,"aria-disabled":U||void 0,"aria-label":"Send","data-track":"send_open",children:(0,v.jsx)(vp,{size:27})})]})]}),Q==="top"&&(ne?(0,v.jsx)("div",{className:"wi-nav-fixed",children:ne}):mb),f&&(0,v.jsxs)("div",{ref:$0,className:"wi-asset-tabs",role:"tablist","aria-label":"Assets",children:[Xg.map(I=>(0,v.jsx)("button",{type:"button",role:"tab",className:"wi-asset-tab","aria-selected":li===I,"data-active":li===I||void 0,onClick:()=>eb(I),"data-track":"asset_tab","data-track-id":I,children:I==="tokens"?"Tokens":"NFTs"},I)),yc&&(0,v.jsx)("span",{className:"wi-asset-tab-indicator","aria-hidden":!0,"data-animate":kl?!0:void 0,style:yc})]}),J0?(0,v.jsx)("div",{ref:Cl,className:"wi-scrollable-body","data-vaul-no-drag":!0,"data-tab-slide":kl??void 0,children:(0,v.jsx)(Lg,{env:a,walletAddress:b,active:l,onSelectCollection:tb})},"nfts"):h&&(0,v.jsx)("div",{ref:Cl,className:"wi-scrollable-body","data-vaul-no-drag":!0,"data-tab-slide":kl??void 0,children:(0,v.jsxs)("div",{className:"wi-token-list",children:[$&&Array.from({length:5},(I,ue)=>(0,v.jsxs)("div",{className:"wi-skeleton-item",children:[(0,v.jsxs)("div",{className:"wi-skeleton-left",children:[(0,v.jsx)("div",{className:"wi-skeleton-block wi-skeleton-icon"}),(0,v.jsxs)("div",{className:"wi-skeleton-lines",children:[(0,v.jsx)("div",{className:"wi-skeleton-block",style:{width:64,height:14}}),(0,v.jsx)("div",{className:"wi-skeleton-block",style:{width:80,height:12}})]})]}),(0,v.jsxs)("div",{className:"wi-skeleton-right",children:[(0,v.jsx)("div",{className:"wi-skeleton-block",style:{width:72,height:14}}),(0,v.jsx)("div",{className:"wi-skeleton-block",style:{width:48,height:12}})]})]},ue)),!$&&mt.length===0&&!u&&(0,v.jsx)("div",{className:"wi-empty",children:"No Tokens Found"}),mt.map(I=>{let ue=Pe.get(ur(I.chainId,I.address)),at=ue?parseFloat(ue.percent_change_24h):null,Vn=at!==null&&at>=0,El=ga(a,I.chainId),Tb=ed(I.address);return(0,v.jsxs)("button",{type:"button",className:"wi-token-item wi-token-item--button",onClick:()=>Y0(I),"aria-label":`View ${I.symbol} detail`,"data-track":"token_detail","data-track-id":I.symbol,children:[(0,v.jsxs)("div",{className:"wi-token-left",children:[(0,v.jsxs)("div",{className:"wi-token-icon-wrap",children:[(0,v.jsx)("img",{src:I.icon_url,alt:I.symbol,className:"wi-token-icon",width:32,height:32,loading:"lazy",draggable:!1,onLoad:pi,onError:Al=>{Al.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),El&&(0,v.jsx)("img",{src:El,alt:"","aria-hidden":!0,className:"wi-token-chain-badge",width:14,height:14,loading:"lazy",draggable:!1,onError:Al=>{Al.currentTarget.style.display="none"}})]}),(0,v.jsxs)("div",{className:"wi-token-info",children:[(0,v.jsxs)("span",{className:"wi-token-name-row",children:[(0,v.jsx)("span",{className:"wi-token-name",children:I.symbol}),Tb&&In!==null&&(0,v.jsx)("span",{className:"wi-token-apr",children:Xi(In)})]}),ue&&(0,v.jsxs)("div",{className:"wi-token-price-row",children:[(0,v.jsx)("span",{className:"wi-token-price",children:so(ue.price)}),(0,v.jsx)("span",{className:"wi-token-change","data-positive":Vn,"data-zero":at===0||void 0,children:at!==null&&(at===0?"0%":`${Vn?"+":"-"}${(Vn?Math.floor:Math.ceil)(Math.abs(at)*100)/100}%`)})]})]})]}),(0,v.jsxs)("div",{className:"wi-token-right",children:[(0,v.jsx)("span",{className:"wi-token-balance",children:Rr(I.quantity.numeric,I.quantity.decimals)}),ue&&(0,v.jsx)("span",{className:"wi-token-value",children:Ai(I.quantity.numeric,I.quantity.decimals,ue.price)})]})]},`${I.address}-${I.chainId}`)}),u&&ii&&Array.from({length:3},(I,ue)=>(0,v.jsxs)("div",{className:"wi-skeleton-item",children:[(0,v.jsxs)("div",{className:"wi-skeleton-left",children:[(0,v.jsx)("div",{className:"wi-skeleton-block wi-skeleton-icon"}),(0,v.jsxs)("div",{className:"wi-skeleton-lines",children:[(0,v.jsx)("div",{className:"wi-skeleton-block",style:{width:64,height:14}}),(0,v.jsx)("div",{className:"wi-skeleton-block",style:{width:80,height:12}})]})]}),(0,v.jsxs)("div",{className:"wi-skeleton-right",children:[(0,v.jsx)("div",{className:"wi-skeleton-block",style:{width:72,height:14}}),(0,v.jsx)("div",{className:"wi-skeleton-block",style:{width:48,height:12}})]})]},`forge-sk-${ue}`)),u&&!ii&&!$&&mt.length===0&&Zt.length===0&&(0,v.jsx)("div",{className:"wi-empty",children:"No Tokens Found"}),u&&Zt.map(I=>{let ue=Y.get(I.token)||"",at=ga(a,At[a].cross);return(0,v.jsxs)("div",{className:"wi-token-item",children:[(0,v.jsxs)("div",{className:"wi-token-left",children:[(0,v.jsxs)("div",{className:"wi-token-icon-wrap",children:[(0,v.jsx)("img",{src:ue||"https://contents.crosstoken.io/wallet/token/images/FT.png",alt:I.token_name,className:"wi-token-icon",width:32,height:32,loading:"lazy",draggable:!1,onLoad:pi,onError:Vn=>{Vn.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),at&&(0,v.jsx)("img",{src:at,alt:"","aria-hidden":!0,className:"wi-token-chain-badge",width:14,height:14,loading:"lazy",draggable:!1,onError:Vn=>{Vn.currentTarget.style.display="none"}})]}),(0,v.jsxs)("div",{className:"wi-token-info",children:[(0,v.jsx)("span",{className:"wi-token-name",children:I.token_name}),(0,v.jsx)("div",{className:"wi-token-price-row",children:(0,v.jsxs)("span",{className:"wi-token-price",children:[Rr(I.current_price,18)," CROSS"]})})]})]}),(0,v.jsxs)("div",{className:"wi-token-right",children:[(0,v.jsx)("span",{className:"wi-token-balance",children:Rr(I.balance,18)}),(0,v.jsx)("span",{className:"wi-token-value",children:so(I.current_value_usd)})]})]},`forge-${I.token}`)})]})},"tokens"),Q==="bottom"&&ne&&(0,v.jsx)("div",{className:"wi-nav-fixed",children:ne}),Sc&&(0,v.jsx)("div",{className:"wi-wallet-disconnect-row",children:Sc})]},"wallet"),hb=tt?(0,v.jsx)("div",{className:Ie("wi-view-inner wi-portfolio-body",Ut.current&&"wi-view-portfolio"),children:(0,v.jsx)(uo,{env:a,theme:i,walletAddress:b,showHeader:!1,onOutlink:ft,lpBalanceReader:fn,stakingRewardsReader:Ze,sendTransaction:Ot,estimateGas:on,sections:nn})},"portfolio"):null,bb=ae?(0,v.jsx)("div",{className:Ie("wi-view-inner wi-send-body",Ut.current&&"wi-view-send"),children:(0,v.jsx)(ha,{env:a,theme:i,walletAddress:b,accountName:Bt,accounts:k,initialStep:q0,token:ae,tokens:mt,onTokenChange:Z,sendTransaction:Ot,getTransactionReceipt:rt,estimateGas:on,getTokenPriceUsd:I=>{let ue=Pe.get(ur(I.chainId,I.address));if(!ue?.price)return;let at=parseFloat(ue.price);return Number.isFinite(at)?at:void 0},onClose:R,onBackToWallet:ea,onSubmitted:sb,onSuccess:lb,onFailed:db,onOutlink:ft})},"send"):null,wb=J.useMemo(()=>lt||mt.map(I=>{let ue=Pe.get(ur(I.chainId,I.address)),at=ue?.price?parseFloat(ue.price):void 0;return{name:I.name,symbol:I.symbol,chainId:I.chainId,address:I.address,decimals:I.quantity.decimals,balance:zo(I.quantity.numeric,I.quantity.decimals),iconUrl:I.icon_url,priceUsd:Number.isFinite(at)?at:void 0}}),[lt,Pe,mt]),yb=(0,v.jsx)("div",{className:Ie("wi-view-inner wi-bridge-body",Ut.current&&"wi-view-send"),children:(0,v.jsx)(go,{env:a,walletAddress:b,tokens:wb,history:nt,termsUrl:G,getQuote:Et,getToTokens:Rt,getApproval:Xe,approveBridge:an,submitBridge:sn,onClose:R,onBackToWallet:ea})},"bridge"),xb=pe?(0,v.jsx)("div",{className:Ie("wi-view-inner wi-token-detail-body",Ut.current&&"wi-view-send"),children:(0,v.jsx)(wg,{env:a,isMobile:s,token:pe,walletAddress:b,stat:Pe.get(ur(pe.chainId,pe.address)),tokenInfo:rr.get(Ji(pe.chainId,pe.address)),showBalance:h,onBack:Z0,onClose:R,onSend:ab,onOutlink:ft})},"token-detail"):null,vb=Ue?(0,v.jsx)("div",{className:Ie("wi-view-inner wi-token-detail-body",Ut.current&&"wi-view-send"),children:(0,v.jsx)(Pg,{collection:Ue,onBack:ob,onClose:R,onSelectNft:nb})},"nft-collection"):null,kb=Re?(0,v.jsx)("div",{className:Ie("wi-view-inner wi-token-detail-body",Ut.current&&"wi-view-send"),children:(0,v.jsx)(Og,{env:a,item:Re,onBack:rb,onClose:R,onOutlink:ft})},"nft-detail"):null,Eo=J.useMemo(()=>{let I=At[a].cross;return mt.find(ue=>ue.chainId===I&&ed(ue.address))??mt.find(ue=>ue.chainId===I&&ue.symbol.toUpperCase().includes("ONEUSD"))},[mt,a]),Cb=J.useMemo(()=>{if(Eo)return Rr(Eo.quantity.numeric,Eo.quantity.decimals)},[Eo]),Rb=Le?(0,v.jsx)("div",{className:Ie("wi-view-inner wi-onepop-body",Ut.current&&"wi-view-send"),children:(0,v.jsx)(Da,{env:a,balanceDisplay:Cb,balanceIconUrl:Eo?.icon_url,isBalanceLoading:$&&!Eo,summary:$e,logoSrc:tn,heroSrc:Pt,getTokenSlot:yt,onBack:ea,onClose:R,onSend:Ge,onClaim:Qe,onActivity:He,onRepliesSeen:Dt})},"onepop"):null,Sl=!!S&&w?.trim().toLowerCase()!=="my wallet",Ec=(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)("span",{className:"wi-receive-avatar",children:[(0,v.jsx)("span",{className:"wi-avatar-fallback",style:Rc}),ui&&(0,v.jsx)("img",{src:ui,alt:"",className:"wi-avatar-img",width:24,height:24,draggable:!1,onLoad:pi,onError:I=>{I.currentTarget.style.display="none"}})]}),(0,v.jsx)("span",{className:"wi-receive-account-name",children:Bt}),Sl&&(0,v.jsx)("span",{className:"wi-receive-chevron","data-open":na,"aria-hidden":"true",children:(0,v.jsx)(zn,{size:16})})]}),Nb=(0,v.jsxs)("div",{className:Ie("wi-view-inner wi-qr-body",Ut.current&&"wi-view-qr"),children:[(0,v.jsxs)("div",{className:"wi-receive-section",children:[Sl?(0,v.jsx)("button",{type:"button",className:"wi-receive-account wi-receive-account--btn",onClick:()=>{ra(!0),S?.()},"aria-label":"Switch account",children:Ec}):(0,v.jsx)("div",{className:"wi-receive-account",children:Ec}),(0,v.jsxs)("div",{className:"wi-qr-block",children:[(0,v.jsxs)("div",{className:"wi-qr-box",children:[(0,v.jsx)(Jg.QRCodeSVG,{value:b,size:180,level:"H",marginSize:2,...c&&{imageSettings:{src:c,height:33,width:33,excavate:!0}}}),!c&&(0,v.jsx)("div",{className:"wi-qr-logo",children:(0,v.jsx)(yp,{size:33})})]}),(0,v.jsx)("p",{className:"wi-qr-address",children:b})]}),(0,v.jsxs)("button",{type:"button",className:"wi-qr-copy-btn",onClick:Cc,"data-track":"address_copy",children:[(0,v.jsx)("span",{className:"wi-qr-copy-icon",children:Io?(0,v.jsx)(qn,{size:16}):(0,v.jsx)(Cr,{size:16})}),(0,v.jsx)("span",{className:"wi-qr-copy-text",children:Io?"Copied!":"Copy address"})]})]}),Nc&&(0,v.jsx)("div",{className:"wi-receive-footer",children:Nc})]},"qr"),Sb=z==="qr"||z==="portfolio"||z==="send"||z==="bridge",Ac=ee!==null?(0,v.jsx)("div",{className:"wi-builtin-footer",children:ee}):null,Mc=(0,v.jsxs)("div",{className:"wi-account-text",children:[Sl?(0,v.jsxs)("button",{type:"button",className:"wi-account-row wi-account-row--btn",onClick:()=>{ra(!0),S?.()},"aria-label":"Switch account","aria-expanded":na,children:[(0,v.jsx)("span",{className:"wi-account-name",children:Bt}),(0,v.jsx)("span",{className:"wi-account-switch","data-open":na,"aria-hidden":"true",children:(0,v.jsx)(zn,{size:20})})]}):(0,v.jsx)("div",{className:"wi-account-row",children:(0,v.jsx)("span",{className:"wi-account-name",children:Bt})}),(0,v.jsxs)("button",{type:"button",className:"wi-address-row-btn",onClick:Cc,"aria-label":"Copy address","data-track":"address_copy",children:[(0,v.jsx)("span",{className:"wi-account-address",children:dn(b)}),(0,v.jsx)("span",{className:"wi-account-copy","data-copied":Io,children:Io?(0,v.jsx)(qn,{size:12}):(0,v.jsx)(Cr,{size:12})})]})]}),Tl=(0,v.jsxs)(v.Fragment,{children:[r,z==="qr"?(0,v.jsx)("div",{className:"wi-sticky-header",children:(0,v.jsxs)("div",{className:"wi-header wi-header--receive",children:[(0,v.jsx)("button",{type:"button",className:"wi-header-back",onClick:ea,"aria-label":"Back",children:(0,v.jsx)(En,{size:24})}),(0,v.jsx)("span",{className:"wi-receive-title",children:"Receive"}),(0,v.jsx)("button",{type:"button",className:"wi-header-action",onClick:R,"aria-label":"Close","data-wi-close":!0,children:(0,v.jsx)(vn,{size:24})})]})}):z==="send"||z==="bridge"||z==="token-detail"||z==="onepop"||z==="nft-collection"||z==="nft-detail"?null:Sb?(0,v.jsxs)("div",{className:"wi-sticky-header",children:[(0,v.jsxs)("div",{className:"wi-header wi-header--wallet wi-header--sub-account",children:[(0,v.jsx)("button",{type:"button",className:"wi-header-back",onClick:ea,"aria-label":"Back",children:(0,v.jsx)(En,{size:24})}),(0,v.jsx)("div",{className:"wi-account-block wi-account-block--sub-account",children:Mc}),(0,v.jsx)("button",{type:"button",className:"wi-header-action",onClick:R,"aria-label":"Close","data-wi-close":!0,children:(0,v.jsx)(vn,{size:24})})]}),(0,v.jsx)("hr",{className:"wi-divider"})]}):(0,v.jsxs)("div",{className:"wi-sticky-header",children:[(0,v.jsxs)("div",{className:"wi-header wi-header--wallet",children:[(0,v.jsxs)("div",{className:"wi-account-block",children:[(0,v.jsxs)("div",{className:"wi-avatar",children:[(0,v.jsx)("div",{className:"wi-avatar-fallback",style:Rc}),ui&&(0,v.jsx)("img",{src:ui,alt:"",className:"wi-avatar-img",width:28,height:28,draggable:!1,onLoad:pi,onError:I=>{I.currentTarget.style.display="none"}})]}),Mc]}),(0,v.jsxs)("div",{className:"wi-header-actions",children:[x&&(y||ze)&&(0,v.jsx)("button",{type:"button",className:"wi-header-action wi-header-action--qr",onClick:ta,"aria-label":"Show QR code","data-track":"receive",children:(0,v.jsx)(Ei,{size:20})}),(0,v.jsx)("button",{type:"button",className:"wi-header-action",onClick:R,"aria-label":"Close","data-wi-close":!0,children:(0,v.jsx)(vn,{size:24})})]})]}),(0,v.jsx)("hr",{className:"wi-divider"})]}),(0,v.jsxs)("div",{className:"wi-view-container",children:[z==="wallet"&&gb,z==="qr"&&Nb,z==="portfolio"&&hb,z==="send"&&bb,z==="bridge"&&yb,z==="token-detail"&&xb,z==="onepop"&&Rb,z==="nft-collection"&&vb,z==="nft-detail"&&kb]}),(z==="wallet"||z==="onepop")&&Cn&&(0,v.jsx)("div",{className:"wi-action-toast",role:"status","aria-live":"polite",children:Cn}),z==="wallet"&&et&&(0,v.jsxs)("a",{className:"wi-send-toast",href:zr??"#",target:"_blank",rel:"noopener noreferrer",onClick:I=>{if(!zr){I.preventDefault();return}jt(I,zr,{category:"send",origin:"send-transaction",payload:{chainId:et.chainId,txHash:et.txHash}},ft)},children:[(0,v.jsx)("span",{className:"wi-send-toast-icon","data-status":et.status,"aria-hidden":!0,children:et.status==="pending"?(0,v.jsx)("span",{className:"wi-send-toast-spinner"}):et.status==="error"?(0,v.jsx)("span",{className:"wi-send-toast-error-dot"}):(0,v.jsx)(Np,{size:20})}),(0,v.jsxs)("span",{className:"wi-send-toast-copy",children:[(0,v.jsx)("span",{className:"wi-send-toast-title",children:et.status==="pending"?"Sending...":et.status==="error"?"Send failed":"Send complete"}),(0,v.jsx)("span",{className:"wi-send-toast-desc",children:et.status==="pending"||et.status==="error"?et.description:"Tap to see your transaction"})]})]}),Ac&&z!=="portfolio"&&z!=="send"&&z!=="token-detail"&&z!=="nft-collection"&&z!=="nft-detail"&&z!=="onepop"&&(0,v.jsx)("div",{className:"wi-sticky-footer",children:(0,v.jsx)("div",{className:"wi-footer",ref:oi,children:Ac})})]}),Il={...oe,...$r>0?{"--wi-footer-height":`${$r}px`}:null},Lc=J.useCallback(I=>{let ue=I.detail.originalEvent.target;ue instanceof Element&&ue.closest("[data-rd-shell]")!==null&&I.preventDefault()},[]);return ze?(0,v.jsx)(Me,{feature:"wallet_info",children:(0,v.jsxs)("div",{className:Ie("wi-drawer-content wi-page-content",n),"data-theme":i,style:Il,"data-no-balance":!h||void 0,"data-has-footer":$r>0||void 0,"data-view":z,children:[(0,v.jsx)("h1",{className:"wi-sr-only",children:"My Wallet"}),Tl]})}):s?(0,v.jsx)(Me,{feature:"wallet_info",children:(0,v.jsxs)(Oa.Drawer.Portal,{children:[p&&(0,v.jsx)(Oa.Drawer.Overlay,{className:"wi-drawer-overlay"}),(0,v.jsxs)(Oa.Drawer.Content,{className:Ie("wi-drawer-content",n),"data-theme":i,"data-vaul-no-drag":d==="left"||d==="right"?!0:void 0,style:Il,"data-direction":d,"data-no-balance":!h||void 0,"data-has-footer":$r>0||void 0,"data-view":z,onInteractOutside:Lc,children:[(0,v.jsx)(Oa.Drawer.Title,{className:"wi-sr-only",children:"My Wallet"}),Tl]})]})}):(0,v.jsxs)(Me,{feature:"wallet_info",children:[p&&l&&(0,v.jsx)("div",{className:"wi-drawer-overlay",onClick:R}),(0,v.jsx)(As.Portal,{children:(0,v.jsx)(As.Content,{align:e,sideOffset:t,className:Ie("wi-popover-content",n),"data-theme":i,style:Il,"data-no-balance":!h||void 0,"data-has-footer":$r>0||void 0,"data-view":z,onInteractOutside:Lc,children:Tl})})]})}var eh=H(require("react"),1);function th({position:e="top",children:t}){let{setNavContent:n,setNavPosition:r}=Ur();return eh.useEffect(()=>(n(t),r(e),()=>n(null)),[t,e,n,r]),null}var nh=H(require("react"),1);function rh({children:e}){let{setFooterContent:t}=Ur();return nh.useEffect(()=>(t(e),()=>t(null)),[e,t]),null}he(`[data-theme=dark].wi-popover-content,[data-theme=dark].wi-drawer-content{--wi-primary: var(--ds-accent-primary-high, #a392ff);--wi-send-solid-from: #ff4d85;--wi-send-solid-to: #ff7f55;--wi-secondary: var(--ds-system-red-default, #e70077);--wi-surface-bg: var(--ds-bg-default, #121212);--wi-surface-default: var(--ds-surface-medium, rgba(255, 255, 255, .05));--wi-surface-subtle: var(--ds-surface-high, rgba(255, 255, 255, .1));--wi-border-default: var(--ds-border-default, rgba(255, 255, 255, .05));--wi-border-subtle: var(--ds-border-medium, rgba(255, 255, 255, .1));--wi-texticon-primary: var(--ds-content-highest, #ffffff);--wi-texticon-secondary: var(--ds-content-medium, rgba(255, 255, 255, .7));--wi-texticon-tertiary: var(--ds-content-low, rgba(255, 255, 255, .5));--wi-on-primary: var(--ds-accent-primary-on, #ffffff);--wi-error: var(--ds-system-red-default, #e70077);--wi-shadow: 0 2px 16px -2px rgba(0, 0, 0, .4)}[data-theme=light].wi-popover-content,[data-theme=light].wi-drawer-content{--wi-primary: var(--ds-accent-primary-high, #7346f3);--wi-send-solid-from: #f62e61;--wi-send-solid-to: #f7564a;--wi-secondary: var(--ds-system-red-default, #e70077);--wi-surface-bg: var(--ds-bg-default, #ffffff);--wi-surface-default: var(--ds-surface-medium, rgba(18, 18, 18, .05));--wi-surface-subtle: var(--ds-surface-high, rgba(18, 18, 18, .1));--wi-border-default: var(--ds-border-default, rgba(18, 18, 18, .05));--wi-border-subtle: var(--ds-border-medium, rgba(18, 18, 18, .1));--wi-texticon-primary: var(--ds-content-highest, #121212);--wi-texticon-secondary: var(--ds-content-medium, rgba(18, 18, 18, .7));--wi-texticon-tertiary: var(--ds-content-low, rgba(18, 18, 18, .5));--wi-on-primary: var(--ds-accent-primary-on, #ffffff);--wi-error: var(--ds-system-red-default, #e70077);--wi-shadow: 0 2px 16px -2px rgba(0, 0, 0, .15)}
13
13
  `);he(`.wi-trigger-btn{display:inline-flex;align-items:center;gap:8px;padding:8px 16px;border:1px solid rgba(255,255,255,.2);background:#1a2332;border-radius:9999px;cursor:pointer;color:#fff;font-family:inherit;font-size:16px;font-weight:500;line-height:24px;letter-spacing:-.3125px;transition:opacity .15s ease}.wi-trigger-btn:hover{opacity:.85}.wi-trigger-btn[data-theme=light]{background:#f3f6f8;border-color:#1212121a;color:#121212}.wi-trigger-btn[data-mobile]{font-size:14px;padding:6px 12px;gap:6px;line-height:20px}.wi-trigger-address{white-space:nowrap}.wi-divider{height:1px;background:var(--wi-border-default);margin:0;border:none;flex-shrink:0}[data-theme=light] .wi-divider{background:#1212121a}[data-theme=dark] .wi-divider{background:#ffffff1a}
14
14
  `);he(`@keyframes wi-fade-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes wi-shimmer{0%{transform:translate(-100%)}to{transform:translate(100%)}}@keyframes wi-slide-in-right{0%{transform:translate(40px);opacity:0}to{transform:translate(0);opacity:1}}@keyframes wi-slide-in-left{0%{transform:translate(-40px);opacity:0}to{transform:translate(0);opacity:1}}
15
- `);he(`.wi-popover-content{-webkit-font-smoothing:antialiased;z-index:100001;width:393px;border-radius:24px;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));background:var(--wi-surface-bg);box-shadow:var(--ds-shadow-modal, var(--wi-shadow));animation:wi-fade-in .15s ease-out;height:min(680px,calc(100dvh - 32px));overflow:hidden;display:flex;flex-direction:column}.wi-popover-content[data-no-balance]{height:auto}.wi-popover-content[data-has-footer]:not([data-no-balance]){height:min(calc(680px + var(--wi-footer-height, 0px)),calc(100dvh - 32px))}.wi-drawer-overlay{position:fixed;inset:0;z-index:100000;background:#0009}.wi-drawer-content{-webkit-font-smoothing:antialiased;position:fixed;top:0;right:0;bottom:0;z-index:100001;width:100vw;max-height:100vh;background:var(--wi-surface-bg);overflow:hidden;display:flex;flex-direction:column;box-sizing:border-box}.wi-drawer-content[data-no-balance]{bottom:auto;max-height:none}.wi-drawer-content[data-no-balance][data-direction=bottom]{bottom:0;top:auto;border-radius:24px 24px 0 0}.wi-drawer-content[data-direction=left]{right:auto;left:0}.wi-drawer-content[data-direction=bottom]{top:0;left:0;right:0;width:100%;max-height:100dvh;margin:0 auto}.wi-drawer-content[data-direction=bottom][data-view=qr]{max-height:100dvh}.wi-popover-content[data-view=qr]{max-height:calc(100dvh - 32px)}.wi-drawer-content.wi-page-content{position:relative;inset:auto;z-index:auto;width:100%;max-width:480px;height:100dvh;max-height:none;margin:0 auto;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)}.wi-page-content [data-wi-close]{visibility:hidden;pointer-events:none}.wi-page-content .wi-header-actions [data-wi-close]{display:none}.wi-sticky-header{flex-shrink:0;position:relative}.wi-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:24px}.wi-header--wallet{align-items:flex-start;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-header--wallet+.wi-divider{display:none}.wi-header--sub-account{align-items:center}.wi-header--sub-account .wi-header-back{width:32px;height:38px}.wi-header--sub-account .wi-header-action{flex-shrink:0}.wi-account-block{display:flex;align-items:center;gap:8px;flex:1;min-width:0}.wi-account-block--sub-account{align-items:center}.wi-avatar{flex-shrink:0;position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border-radius:50%;background:var(--wi-surface-bg);box-sizing:border-box;overflow:hidden}.wi-avatar-fallback{position:absolute;inset:0;border-radius:50%;z-index:0}.wi-avatar-img{position:relative;z-index:1;width:32px;height:32px;border-radius:50%;object-fit:cover;background:transparent}.wi-account-text{display:flex;flex-direction:column;gap:2px;min-width:0}.wi-account-row{display:flex;align-items:center;gap:8px;min-width:0}.wi-account-row--btn{padding:2px;margin:0;width:fit-content;border:none;background:transparent;cursor:pointer;color:inherit;font:inherit;border-radius:6px;transition:background-color .15s ease,opacity .15s ease}.wi-account-row--btn:hover{background:var(--wi-surface-subtle, rgba(255, 255, 255, .06))}.wi-account-row--btn:focus-visible{outline:2px solid var(--wi-primary, #f0640d);outline-offset:2px}.wi-account-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wi-account-switch{display:inline-flex;align-items:center;justify-content:center;padding:2px 0;border:none;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));border-radius:4px;flex-shrink:0;transition:color .15s ease,transform .2s ease}.wi-account-switch[data-open=true]{transform:rotate(180deg)}.wi-account-row--btn:hover .wi-account-switch{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-address-row-btn{display:inline-flex;align-items:center;gap:4px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--ds-content-medium, rgba(0, 0, 0, .65));font:inherit;text-align:left;min-width:0;transition:color .15s ease}.wi-address-row-btn:hover .wi-account-address,.wi-address-row-btn:hover .wi-account-copy{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-account-address{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wi-account-copy{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;color:var(--wi-texticon-tertiary);flex-shrink:0;transition:color .15s ease}.wi-account-copy[data-copied=true]{color:var(--ds-system-green-high, #00a869)}.wi-header-actions{display:flex;align-items:center;gap:16px;flex-shrink:0;margin-top:-4px}.wi-header-action{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;background:transparent;border-radius:0;cursor:pointer;color:var(--ds-content-low, rgba(0, 0, 0, .4));flex-shrink:0;transition:color .15s ease}.wi-header-action:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-header-action--qr{width:32px;height:32px;border-radius:8px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-medium, rgba(0, 0, 0, .65));transition:background-color .15s ease,color .15s ease}.wi-header-action--qr:hover{background:var(--ds-surface-high, rgba(0, 0, 0, .08));color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-header--receive{align-items:center;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-header--receive .wi-header-action,.wi-header--sub-account .wi-header-action{position:absolute;top:24px;right:24px}.wi-receive-title{position:absolute;left:50%;transform:translate(-50%);font-family:inherit;font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);text-align:center;pointer-events:none}.wi-header-info{flex:1;display:flex;flex-direction:column;gap:8px;min-width:0}.wi-header-title{font-family:inherit;font-size:16px;font-weight:600;line-height:1.3;color:var(--wi-texticon-primary);margin:0}.wi-header-close{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;padding:0;border:none;background:var(--wi-surface-default);border-radius:8px;cursor:pointer;color:var(--ds-content-low, #00000066);transition:opacity .15s ease}.wi-header-close:hover{opacity:.7}.wi-total-section{margin:24px 24px 0;padding:0;flex-shrink:0;display:flex;flex-direction:column;gap:8px;border:none;background:transparent;border-radius:12px;color:inherit;font:inherit;text-align:left;width:auto}.wi-action-row{display:flex;align-items:flex-start;gap:8px;width:auto;margin:24px 24px 0}.wi-action-card{appearance:none;display:flex;flex:1 1 0;min-width:0;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 8px;border:none;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-high, rgba(0, 0, 0, .85));font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;text-align:center;cursor:pointer;transition:background-color .15s ease,color .15s ease}.wi-action-card:hover:not(:disabled){background:#2e3544!important;color:var(--ds-content-high, rgba(0, 0, 0, .85))}:root[data-ds-theme=light] .wi-action-card:hover:not(:disabled){background:#e4e8ef!important;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-action-card:disabled{cursor:default}.wi-action-card>svg{flex-shrink:0}.wi-action-card:not(:disabled){transition:background-color .15s ease,transform .1s ease}.wi-action-card:active:not(:disabled){transform:scale(.93)}.wi-total-head{display:flex;align-items:center;gap:4px}.wi-total-body{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}.wi-total-value-wrap{position:relative;flex:1 1 auto;min-width:0}.wi-total-send{appearance:none;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;flex-shrink:0;border:none;border-radius:9px;background:var(--ds-surface-medium, #f5f7fa);cursor:pointer;transition:background-color .15s ease,transform .1s ease}.wi-total-send:hover:not(:disabled){background:#2e3544}:root[data-ds-theme=light] .wi-total-send:hover:not(:disabled){background:#e4e8ef}.wi-total-send:active:not(:disabled){transform:scale(.93)}.wi-total-send:disabled{cursor:default;opacity:.45}.wi-total-send--dimmed{opacity:.4;cursor:pointer}.wi-total-send--dimmed:hover{opacity:.5}.wi-total-label{font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.wi-total-eye{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;transition:color .15s ease;border-radius:4px}.wi-total-eye:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-total-eye:focus-visible{outline:1px solid var(--wi-texticon-secondary);outline-offset:2px}.wi-total-value{display:flex;align-items:baseline;gap:0;font-family:inherit;font-weight:600;line-height:1.25;color:var(--ds-content-highest, #000000);font-variant-numeric:tabular-nums;min-height:45px;white-space:nowrap}.wi-total-currency,.wi-total-amount,.wi-total-decimal{font-size:calc(36px * var(--wi-total-scale, 1));color:var(--ds-content-highest, #000000)}.wi-total-lte{margin-right:2px;font-weight:500;font-size:calc(22px * var(--wi-total-scale, 1));color:var(--wi-texticon-secondary)}.wi-total-mask{letter-spacing:2px;font-size:calc(32px * var(--wi-total-scale, 1));color:var(--wi-texticon-secondary)}.wi-total-skeleton{border-radius:6px}.wi-scrollable-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:8px 0 0;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent;overscroll-behavior:contain}.wi-drawer-content .wi-scrollable-body{touch-action:pan-y}[data-theme=light] .wi-scrollable-body{scrollbar-color:rgba(0,0,0,.12) transparent}.wi-scrollable-body::-webkit-scrollbar{width:4px}.wi-scrollable-body::-webkit-scrollbar-track{background:transparent}.wi-scrollable-body::-webkit-scrollbar-thumb{background:#ffffff26;border-radius:4px}.wi-scrollable-body::-webkit-scrollbar-thumb:hover{background:#ffffff40}[data-theme=light] .wi-scrollable-body::-webkit-scrollbar-thumb{background:#0000001f}[data-theme=light] .wi-scrollable-body::-webkit-scrollbar-thumb:hover{background:#0003}.wi-nav-fixed{flex-shrink:0;padding:0 24px}.wi-token-list{display:flex;flex-direction:column;gap:0;padding:8px 0}.wi-token-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 24px;border:none;background:transparent;text-align:left;font-family:inherit;width:100%;box-sizing:border-box}.wi-token-item--button{cursor:pointer;background:var(--ds-surface-default, #ffffff);transition:none}.wi-token-item--button:hover{background:#252b39!important}:root[data-ds-theme=light] .wi-token-item--button:hover{background:#eff3f8!important}button.wi-token-item:focus-visible{outline:2px solid var(--wi-primary);outline-offset:2px;border-radius:4px}.wi-token-left{display:flex;align-items:center;gap:16px;min-width:0}.wi-token-icon-wrap{position:relative;width:40px;height:40px;flex-shrink:0}.wi-token-icon{width:40px;height:40px;border-radius:0;object-fit:contain;opacity:0;transition:opacity .2s ease}.wi-token-icon[data-loaded=true]{opacity:1}.wi-token-chain-badge{position:absolute;right:0;bottom:0;width:14px;height:14px;border-radius:50%;background:var(--wi-surface-bg);box-shadow:0 0 0 1.5px var(--wi-surface-bg);object-fit:contain}.wi-token-info{display:flex;flex-direction:column;min-width:0}.wi-token-name-row{display:flex;align-items:center;gap:6px;min-width:0}.wi-token-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wi-token-apr{flex-shrink:0;font-family:inherit;font-size:12px;font-weight:600;line-height:1;color:var(--ds-system-purple-high, #9b78ff);background:var(--ds-system-purple-low, #2e2854);padding:4px;border-radius:6px;white-space:nowrap}.wi-token-price-row{display:flex;align-items:center;gap:8px}.wi-token-price{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.wi-token-change{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;white-space:nowrap}.wi-token-change[data-positive=true]{color:var(--ds-system-green-high, #00a0a2)}.wi-token-change[data-positive=false]{color:var(--ds-system-red-high, #a80927)}.wi-token-change[data-zero]{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-token-right{display:flex;flex-direction:column;align-items:flex-end;flex-shrink:0}.wi-token-balance{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);white-space:nowrap}.wi-token-value{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.wi-sticky-footer{flex-shrink:0}.wi-footer{padding:16px 24px 24px}.wi-builtin-footer{display:flex;flex-direction:column;gap:8px;align-items:stretch}.wi-wallet-disconnect-row{display:flex;justify-content:flex-end;flex-shrink:0;padding:16px 24px;border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-send-toast{position:absolute;left:15px;right:15px;bottom:20px;z-index:2;display:flex;align-items:center;gap:12px;min-height:52px;padding:12px;border-radius:12px;background:var(--ds-surface-inverted, #1e232e);color:var(--ds-content-inverted, #ffffff);box-sizing:border-box;text-decoration:none}.wi-action-toast{position:absolute;left:15px;right:15px;bottom:20px;z-index:3;padding:12px 14px;border-radius:12px;background:var(--ds-surface-inverted, #1e232e);color:var(--ds-content-inverted, #ffffff);font-size:14px;line-height:1.4;text-align:center;box-sizing:border-box;animation:wi-action-toast-in .18s ease-out}.wi-popover-content:has(.wi-wallet-disconnect-row) .wi-action-toast,.wi-drawer-content:has(.wi-wallet-disconnect-row) .wi-action-toast{bottom:72px}@keyframes wi-action-toast-in{0%{transform:translateY(8px);opacity:0}to{transform:translateY(0);opacity:1}}.wi-action-card--dimmed{opacity:.4;cursor:pointer}.wi-action-card--dimmed:hover{opacity:.5}.wi-popover-content:has(.wi-wallet-disconnect-row) .wi-send-toast,.wi-drawer-content:has(.wi-wallet-disconnect-row) .wi-send-toast{bottom:72px}.wi-page-content .wi-action-toast,.wi-page-content .wi-send-toast{bottom:calc(20px + env(safe-area-inset-bottom,0px))}.wi-send-toast:hover{opacity:.92}.wi-send-toast-icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;flex-shrink:0;color:var(--ds-accent-primary-high, #f0640d)}.wi-send-toast-spinner{width:18px;height:18px;border:2px solid rgba(255,159,33,.22);border-top-color:var(--ds-accent-primary-on-inverted, #ff8438);border-radius:50%;animation:wi-send-toast-spin .8s linear infinite}.wi-send-toast-error-dot{width:18px;height:18px;border-radius:50%;background:var(--ds-system-red-default, #ff3358)}@keyframes wi-send-toast-spin{to{transform:rotate(360deg)}}.wi-send-toast-copy{display:flex;min-width:0;flex-direction:column}.wi-send-toast-title{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-inverted, #ffffff)}.wi-send-toast-desc{font-family:inherit;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-accent-primary-on-inverted, #ff8438)}.wi-send-toast-icon[data-status=error]+.wi-send-toast-copy .wi-send-toast-desc{color:var(--ds-system-red-default, #ff3358)}.wi-disconnect-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:16px;padding:0;border:none;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;cursor:pointer;transition:color .15s ease}.wi-disconnect-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-disconnect-label{white-space:nowrap}.wi-legal-links{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:100%;flex-shrink:0;font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-receive-avatar .wi-avatar-fallback{position:absolute;inset:0;border-radius:50%;z-index:0}.wi-receive-avatar .wi-avatar-img{width:24px;height:24px}.wi-legal-link{color:var(--ds-content-low, rgba(0, 0, 0, .4));text-decoration:underline;text-underline-offset:2px;transition:color .15s ease}.wi-legal-link:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-legal-sep{color:inherit}.wi-empty{display:flex;align-items:center;justify-content:center;padding:32px 0;font-family:inherit;font-size:16px;color:var(--wi-texticon-secondary)}.wi-skeleton-item{display:flex;align-items:center;justify-content:space-between;padding:4px 0}.wi-skeleton-left{display:flex;align-items:center;gap:12px}.wi-skeleton-block{border-radius:6px;background:var(--wi-border-default);position:relative;overflow:hidden}.wi-skeleton-block:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.06) 50%,transparent 100%);animation:wi-shimmer 1.5s ease-in-out infinite}[data-theme=light] .wi-skeleton-block:after{background:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.04) 50%,transparent 100%)}.wi-skeleton-icon{width:32px;height:32px;border-radius:50%;flex-shrink:0}.wi-skeleton-lines{display:flex;flex-direction:column;gap:6px}.wi-skeleton-right{display:flex;flex-direction:column;align-items:flex-end;gap:6px}.wi-header-back{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--ds-content-low, rgba(0, 0, 0, .4));flex-shrink:0;transition:color .15s ease}.wi-header-back:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-view-container{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.wi-popover-content[data-view=qr] .wi-view-container,.wi-drawer-content[data-view=qr] .wi-view-container{flex:1;min-height:0}.wi-view-inner{display:flex;flex-direction:column;flex:1;min-height:0}.wi-view-wallet{animation:wi-slide-in-left .25s ease-out}.wi-view-qr,.wi-view-portfolio{animation:wi-slide-in-right .25s ease-out}.wi-qr-body{flex:1;min-height:0;display:flex;flex-direction:column}.wi-portfolio-body{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.wi-portfolio-body>.wp-embed{flex:1;min-height:0}.wi-portfolio-body .wp-body-inner{padding:16px 16px 32px;gap:32px}.wi-receive-section{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;padding:24px}.wi-receive-account{display:inline-flex;align-items:center;gap:8px;padding:4px 8px 4px 4px;border:0;background:var(--ds-surface-high, #edf1f2);border-radius:9999px;font-family:inherit;color:inherit}.wi-receive-account--btn{cursor:pointer;transition:none}.wi-receive-account--btn:hover{background:#2e3544}:root[data-ds-theme=light] .wi-receive-account--btn:hover{background:#e4e8ef}.wi-receive-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;overflow:hidden;flex-shrink:0}.wi-receive-account-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wi-receive-account>svg{color:var(--ds-content-medium, rgba(0, 0, 0, .65));flex-shrink:0}.wi-receive-chevron{display:inline-flex;align-items:center;color:var(--ds-content-medium, rgba(0, 0, 0, .65));flex-shrink:0;transition:transform .2s ease}.wi-receive-chevron[data-open=true]{transform:rotate(180deg)}.wi-qr-block{display:flex;flex-direction:column;align-items:center;gap:16px}.wi-qr-box{position:relative;display:flex;align-items:center;justify-content:center;padding:10px;background:#fff;border-radius:6px;overflow:hidden}.wi-qr-logo{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);pointer-events:none}.wi-qr-address{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:16px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));text-align:center;word-break:break-all;max-width:281px;margin:0}.wi-qr-copy-btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:12px 16px;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));background:var(--ds-surface-default, #ffffff);border-radius:12px;cursor:pointer;transition:border-color .15s ease}.wi-qr-copy-btn:hover{border-color:var(--ds-border-medium, rgba(0, 0, 0, .18))}.wi-qr-copy-icon{display:inline-flex;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-qr-copy-text{font-family:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wi-receive-footer{flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:16px 24px;border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-drawer-content .wi-header{padding:16px}.wi-drawer-content .wi-header--receive .wi-header-action,.wi-drawer-content .wi-header--sub-account .wi-header-action{top:16px;right:16px}.wi-drawer-content .wi-total-section,.wi-drawer-content .wi-action-row{margin:16px 16px 0}.wi-drawer-content .wi-nav-fixed{padding:0 16px}.wi-drawer-content .wi-token-item{padding:12px 16px}.wi-drawer-content .wi-wallet-disconnect-row{padding:16px}
16
- `);he(`.wi-td-header-title{position:absolute;left:50%;transform:translate(-50%);display:inline-flex;align-items:center;gap:8px;pointer-events:none}.wi-td-header-icon{width:24px;height:24px;object-fit:contain;flex-shrink:0}.wi-td-header-name{font-family:inherit;font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--wi-texticon-primary, #ffffff)}.wi-td-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;display:flex;flex-direction:column;gap:24px;padding:20px 24px 24px;background:transparent;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent}[data-theme=light] .wi-td-scroll{scrollbar-color:rgba(0,0,0,.12) transparent}.wi-td-scroll::-webkit-scrollbar{width:4px}.wi-td-scroll::-webkit-scrollbar-track{background:transparent}.wi-td-scroll::-webkit-scrollbar-thumb{background:#ffffff26;border-radius:4px}.wi-td-scroll::-webkit-scrollbar-thumb:hover{background:#ffffff40}[data-theme=light] .wi-td-scroll::-webkit-scrollbar-thumb{background:#0000001f}[data-theme=light] .wi-td-scroll::-webkit-scrollbar-thumb:hover{background:#0003}.wi-td-chart{display:flex;flex-direction:column;gap:14px}.wi-td-chart-panel{display:flex;flex-direction:column;gap:4px}.wi-td-chart-price{font-size:26px;font-weight:700;line-height:1.15;color:var(--wi-texticon-primary, #ffffff)}.wi-td-chart-change{display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:600;color:var(--ds-system-green-high, #00a869)}.wi-td-chart-change[data-positive=false]{color:var(--wi-error, #e70077)}.wi-td-chart-when{font-weight:400;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}.wi-td-chart-plot{position:relative;width:100%;height:150px}.wi-td-chart-svg{display:block;width:100%;height:150px;overflow:visible;touch-action:none}.wi-td-chart-minmax{fill:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));font-size:11px;font-family:inherit}.wi-td-chart-cursor{stroke:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));stroke-width:1;stroke-dasharray:3 3}.wi-td-chart-skeleton{width:100%;height:150px;border-radius:12px}.wi-td-chart-tabs{display:flex;gap:6px;justify-content:space-between}.wi-td-chart-tab{flex:1;padding:7px 0;border:none;border-radius:8px;background:transparent;cursor:pointer;font-family:inherit;font-size:13px;font-weight:600;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));transition:background .15s ease,color .15s ease}.wi-td-chart-tab[data-active]{background:var(--wi-surface-subtle, rgba(255, 255, 255, .1));color:var(--wi-texticon-primary, #ffffff)}.wi-td-chart-tab:hover:not([data-active]){color:var(--wi-texticon-primary, #ffffff)}.wi-td-balance-card{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px;border-radius:16px;background:var(--wi-surface-default, rgba(255, 255, 255, .05))}.wi-td-balance-left{display:flex;flex-direction:column;gap:4px;flex:1 1 0;min-width:0}.wi-td-balance-label{font-size:15px;font-weight:600;color:var(--wi-texticon-primary, #ffffff)}.wi-td-balance-amount{font-size:30px;font-weight:700;line-height:1.15;color:var(--wi-texticon-primary, #ffffff);white-space:nowrap;max-width:100%}.wi-td-balance-fiat{font-size:14px;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}.wi-td-send-btn{display:inline-flex;align-items:center;gap:6px;flex-shrink:0;padding:12px 22px;border:none;border-radius:999px;cursor:pointer;font-family:inherit;font-size:15px;font-weight:600;color:var(--wi-on-primary, #ffffff);background:var(--wi-primary, #f0640d);transition:filter .15s ease}.wi-td-send-btn:hover{filter:brightness(1.06)}.wi-td-send-btn:active{filter:brightness(.94)}.wi-td-section{display:flex;flex-direction:column;gap:14px}.wi-td-section-title{margin:0;font-size:18px;font-weight:700;letter-spacing:-.01em;color:var(--wi-texticon-primary, #ffffff)}.wi-td-rows{display:flex;flex-direction:column;gap:12px}.wi-td-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.wi-td-row-label{font-size:15px;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}.wi-td-row-value{font-size:15px;font-weight:500;color:var(--wi-texticon-primary, #ffffff);text-align:right;word-break:break-all}.wi-td-row-link,.wi-td-row-copy{display:inline-flex;align-items:center;gap:6px;border:none;background:transparent;padding:0;cursor:pointer;font-family:inherit;text-decoration:none}.wi-td-row-link:hover,.wi-td-row-copy:hover{opacity:.8}.wi-td-external-icon{color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));flex-shrink:0}.wi-td-row-copy svg{color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));flex-shrink:0}.wi-td-social-row{display:flex;flex-wrap:wrap;gap:10px}.wi-td-social-btn{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;color:var(--wi-texticon-primary, #ffffff);background:var(--wi-surface-default, rgba(255, 255, 255, .05));text-decoration:none;transition:background .15s ease}.wi-td-social-btn:hover{background:var(--wi-surface-subtle, rgba(255, 255, 255, .1))}.wi-td-history-list{display:flex;flex-direction:column;gap:10px}.wi-td-history-item{display:flex;flex-direction:column;gap:8px;padding:16px;border-radius:12px;background:var(--wi-surface-default, rgba(255, 255, 255, .05));text-decoration:none}.wi-td-history-item--link{cursor:pointer;transition:background .15s ease}.wi-td-history-item--link:hover{background:var(--wi-surface-subtle, rgba(255, 255, 255, .1))}.wi-td-history-top,.wi-td-history-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px}.wi-td-history-type{font-size:15px;font-weight:600;color:var(--wi-texticon-primary, #ffffff)}.wi-td-history-type[data-direction=receive],.wi-td-history-type[data-direction=bridge-in]{color:var(--ds-system-green-high, #00a869)}.wi-td-history-counter{font-size:14px;color:var(--wi-primary, #f0640d);font-variant-numeric:tabular-nums}.wi-td-history-meta{display:inline-flex;align-items:center;gap:8px;min-width:0}.wi-td-history-status{font-size:14px;font-weight:500}.wi-td-history-status[data-status=success]{color:var(--ds-system-green-high, #00a869)}.wi-td-history-status[data-status=fail]{color:var(--wi-error, #e70077)}.wi-td-history-time{font-size:14px;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}.wi-td-history-amount{font-size:15px;font-weight:600;color:var(--wi-texticon-primary, #ffffff);text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.wi-td-history-amount[data-size=sm]{font-size:13px}.wi-td-history-amount[data-size=xs]{font-size:11px;white-space:normal;word-break:break-all}.wi-td-history-skeleton{display:flex;align-items:center;justify-content:space-between;padding:16px;border-radius:12px;background:var(--wi-surface-default, rgba(255, 255, 255, .05))}.wi-td-history-empty{display:flex;flex-direction:column;align-items:center;gap:10px;padding:28px 16px;border-radius:12px;background:var(--wi-surface-default, rgba(255, 255, 255, .05));color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));font-size:14px;text-align:center}.wi-td-retry-btn{padding:8px 18px;border:1px solid var(--wi-border-subtle, rgba(255, 255, 255, .1));border-radius:999px;background:transparent;color:var(--wi-texticon-primary, #ffffff);font-family:inherit;font-size:13px;font-weight:600;cursor:pointer}.wi-td-retry-btn:hover{background:var(--wi-surface-subtle, rgba(255, 255, 255, .1))}.wi-td-history-sentinel{display:flex;align-items:center;justify-content:center;min-height:32px}.wi-td-history-loading{font-size:13px;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}.wi-td-loadmore-btn{align-self:center;margin-top:2px;padding:10px 24px;border:1px solid var(--wi-border-subtle, rgba(255, 255, 255, .1));border-radius:999px;background:transparent;color:var(--wi-texticon-primary, #ffffff);font-family:inherit;font-size:14px;font-weight:600;cursor:pointer;transition:background .15s ease}.wi-td-loadmore-btn:hover:not(:disabled){background:var(--wi-surface-subtle, rgba(255, 255, 255, .1))}.wi-td-loadmore-btn:disabled{cursor:default;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}
17
- `);he(`.wi-asset-tabs{display:flex;gap:20px;padding:4px 24px 0;flex-shrink:0}.wi-drawer-content .wi-asset-tabs{padding:4px 16px 0}.wi-asset-tab{position:relative;padding:10px 0 12px;border:none;background:transparent;cursor:pointer;font-family:inherit;font-size:16px;font-weight:600;color:var(--wi-texticon-tertiary);transition:color .15s ease}.wi-asset-tab[data-active]{color:var(--wi-texticon-primary)}.wi-asset-tab[data-active]:after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;border-radius:2px;background:var(--wi-texticon-primary)}.wi-nft-media{display:block;width:100%;height:100%;object-fit:cover;background:var(--wi-surface-subtle)}.wi-nft-media--fallback{display:flex;align-items:center;justify-content:center;overflow:hidden}.wi-nft-media-fallback-text{max-width:100%;padding:0 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:600;color:var(--wi-texticon-tertiary)}.wi-nft-thumb,.wi-nft-thumb-skeleton{width:40px;height:40px;border-radius:8px;flex-shrink:0;overflow:hidden}.wi-nft-thumb .wi-nft-media-fallback-text{font-size:9px}.wi-nft-state{display:flex;flex-direction:column;align-items:center;gap:12px;padding:32px 24px}.wi-nft-state-text{font-size:16px;color:var(--wi-texticon-secondary)}.wi-nft-retry{padding:10px 20px;border:1px solid var(--wi-border-default);border-radius:999px;background:transparent;cursor:pointer;font-family:inherit;font-size:14px;font-weight:600;color:var(--wi-texticon-primary)}.wi-nft-retry:disabled{opacity:.6;cursor:default}.wi-nft-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 12px}.wi-nft-card{display:flex;flex-direction:column;gap:6px;min-width:0;padding:0;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit}.wi-nft-card-media{position:relative;display:block;aspect-ratio:1 / 1;border-radius:12px;overflow:hidden;background:var(--wi-surface-subtle)}.wi-nft-card-media .wi-nft-media{object-fit:contain}.wi-nft-card:hover .wi-nft-card-media{filter:brightness(1.06)}.wi-nft-card-qty{position:absolute;right:6px;bottom:6px;padding:2px 6px;border-radius:999px;font-size:12px;font-weight:600;color:var(--wi-texticon-primary);background:var(--wi-surface-default)}.wi-nft-card-name,.wi-nft-card-id{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-nft-card-name{font-size:14px;font-weight:600;color:var(--wi-texticon-primary)}.wi-nft-card-id{font-size:12px;color:var(--wi-texticon-tertiary)}.wi-nft-header-name{display:block;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-nft-detail-hero{aspect-ratio:1 / 1;width:100%;border-radius:16px;overflow:hidden;background:var(--wi-surface-subtle);flex-shrink:0}.wi-nft-detail-media{object-fit:contain}.wi-nft-detail-media.wi-nft-media--fallback .wi-nft-media-fallback-text{font-size:20px}.wi-nft-detail-titles{display:flex;flex-direction:column;gap:4px;min-width:0}.wi-nft-detail-collection{font-size:14px;color:var(--wi-texticon-tertiary)}.wi-nft-detail-name{word-break:break-word}.wi-nft-detail-desc{margin:0;font-size:15px;line-height:1.5;color:var(--wi-texticon-secondary);white-space:pre-line;word-break:break-word}.wi-nft-attrs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.wi-nft-attr{display:flex;flex-direction:column;gap:2px;min-width:0;padding:10px 12px;border-radius:12px;background:var(--wi-surface-subtle)}.wi-nft-attr-type{font-size:12px;color:var(--wi-texticon-tertiary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-nft-attr-value{font-size:14px;font-weight:600;color:var(--wi-texticon-primary);word-break:break-word}.wi-nft-explorer-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:14px 20px;border:1px solid var(--wi-border-default);border-radius:999px;font-size:15px;font-weight:600;color:var(--wi-texticon-primary);text-decoration:none;flex-shrink:0}.wi-nft-explorer-btn:hover{opacity:.85}
15
+ `);he(`.wi-popover-content{-webkit-font-smoothing:antialiased;z-index:100001;width:393px;border-radius:24px;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));background:var(--wi-surface-bg);box-shadow:var(--ds-shadow-modal, var(--wi-shadow));animation:wi-fade-in .15s ease-out;height:min(680px,calc(100dvh - 32px));overflow:hidden;display:flex;flex-direction:column}.wi-popover-content[data-no-balance]{height:auto}.wi-popover-content[data-has-footer]:not([data-no-balance]){height:min(calc(680px + var(--wi-footer-height, 0px)),calc(100dvh - 32px))}.wi-drawer-overlay{position:fixed;inset:0;z-index:100000;background:#0009}.wi-drawer-content{-webkit-font-smoothing:antialiased;position:fixed;top:0;right:0;bottom:0;z-index:100001;width:100vw;max-height:100vh;background:var(--wi-surface-bg);overflow:hidden;display:flex;flex-direction:column;box-sizing:border-box}.wi-drawer-content[data-no-balance]{bottom:auto;max-height:none}.wi-drawer-content[data-no-balance][data-direction=bottom]{bottom:0;top:auto;border-radius:24px 24px 0 0}.wi-drawer-content[data-direction=left]{right:auto;left:0}.wi-drawer-content[data-direction=bottom]{top:0;left:0;right:0;width:100%;max-height:100dvh;margin:0 auto}.wi-drawer-content[data-direction=bottom][data-view=qr]{max-height:100dvh}.wi-popover-content[data-view=qr]{max-height:calc(100dvh - 32px)}.wi-drawer-content.wi-page-content{position:relative;inset:auto;z-index:auto;width:100%;max-width:480px;height:100dvh;max-height:none;margin:0 auto;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)}.wi-page-content [data-wi-close]{visibility:hidden;pointer-events:none}.wi-page-content .wi-header-actions [data-wi-close]{display:none}.wi-sticky-header{flex-shrink:0;position:relative}.wi-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:24px}.wi-header--wallet{align-items:flex-start;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-header--wallet+.wi-divider{display:none}.wi-header--sub-account{align-items:center}.wi-header--sub-account .wi-header-back{width:32px;height:38px}.wi-header--sub-account .wi-header-action{flex-shrink:0}.wi-account-block{display:flex;align-items:center;gap:8px;flex:1;min-width:0}.wi-account-block--sub-account{align-items:center}.wi-avatar{flex-shrink:0;position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border-radius:50%;background:var(--wi-surface-bg);box-sizing:border-box;overflow:hidden}.wi-avatar-fallback{position:absolute;inset:0;border-radius:50%;z-index:0}.wi-avatar-img{position:relative;z-index:1;width:32px;height:32px;border-radius:50%;object-fit:cover;background:transparent}.wi-account-text{display:flex;flex-direction:column;gap:2px;min-width:0}.wi-account-row{display:flex;align-items:center;gap:8px;min-width:0}.wi-account-row--btn{padding:2px;margin:0;width:fit-content;border:none;background:transparent;cursor:pointer;color:inherit;font:inherit;border-radius:6px;transition:background-color .15s ease,opacity .15s ease}.wi-account-row--btn:hover{background:var(--wi-surface-subtle, rgba(255, 255, 255, .06))}.wi-account-row--btn:focus-visible{outline:2px solid var(--wi-primary, #7346f3);outline-offset:2px}.wi-account-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wi-account-switch{display:inline-flex;align-items:center;justify-content:center;padding:2px 0;border:none;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));border-radius:4px;flex-shrink:0;transition:color .15s ease,transform .2s ease}.wi-account-switch[data-open=true]{transform:rotate(180deg)}.wi-account-row--btn:hover .wi-account-switch{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-address-row-btn{display:inline-flex;align-items:center;gap:4px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--ds-content-medium, rgba(0, 0, 0, .65));font:inherit;text-align:left;min-width:0;transition:color .15s ease}.wi-address-row-btn:hover .wi-account-address,.wi-address-row-btn:hover .wi-account-copy{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-account-address{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wi-account-copy{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;color:var(--wi-texticon-tertiary);flex-shrink:0;transition:color .15s ease}.wi-account-copy[data-copied=true]{color:var(--ds-system-green-high, #00a869)}.wi-header-actions{display:flex;align-items:center;gap:16px;flex-shrink:0;margin-top:-4px}.wi-header-action{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;background:transparent;border-radius:0;cursor:pointer;color:var(--ds-content-low, rgba(0, 0, 0, .4));flex-shrink:0;transition:color .15s ease}.wi-header-action:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-header-action--qr{width:32px;height:32px;border-radius:8px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-medium, rgba(0, 0, 0, .65));transition:background-color .15s ease,color .15s ease}.wi-header-action--qr:hover{background:var(--ds-surface-high, rgba(0, 0, 0, .08));color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-header--receive{align-items:center;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-header--receive .wi-header-action,.wi-header--sub-account .wi-header-action{position:absolute;top:24px;right:24px}.wi-receive-title{position:absolute;left:50%;transform:translate(-50%);font-family:inherit;font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);text-align:center;pointer-events:none}.wi-header-info{flex:1;display:flex;flex-direction:column;gap:8px;min-width:0}.wi-header-title{font-family:inherit;font-size:16px;font-weight:600;line-height:1.3;color:var(--wi-texticon-primary);margin:0}.wi-header-close{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;padding:0;border:none;background:var(--wi-surface-default);border-radius:8px;cursor:pointer;color:var(--ds-content-low, #00000066);transition:opacity .15s ease}.wi-header-close:hover{opacity:.7}.wi-total-section{margin:24px 24px 0;padding:0;flex-shrink:0;display:flex;flex-direction:column;gap:8px;border:none;background:transparent;border-radius:12px;color:inherit;font:inherit;text-align:left;width:auto}.wi-action-row{display:flex;align-items:flex-start;gap:8px;width:auto;margin:24px 24px 0}.wi-action-card{appearance:none;display:flex;flex:1 1 0;min-width:0;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 8px;border:none;border-radius:12px;background:var(--ds-surface-medium, #f5f7fa);color:var(--ds-content-high, rgba(0, 0, 0, .85));font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;text-align:center;cursor:pointer;transition:background-color .15s ease,color .15s ease}.wi-action-card:hover:not(:disabled){background:#2e3544!important;color:var(--ds-content-high, rgba(0, 0, 0, .85))}:root[data-ds-theme=light] .wi-action-card:hover:not(:disabled){background:#e4e8ef!important;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-action-card:disabled{cursor:default}.wi-action-card>svg{flex-shrink:0}.wi-action-card:not(:disabled){transition:background-color .15s ease,transform .1s ease}.wi-action-card:active:not(:disabled){transform:scale(.93)}.wi-total-head{display:flex;align-items:center;gap:4px}.wi-total-body{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}.wi-total-value-wrap{position:relative;flex:1 1 auto;min-width:0}.wi-total-send{appearance:none;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;flex-shrink:0;border:none;border-radius:9px;background:var(--ds-surface-medium, #f5f7fa);cursor:pointer;transition:background-color .15s ease,transform .38s cubic-bezier(.34,1.8,.64,1)}.wi-total-send:hover:not(:disabled){background:#2e3544;transform:scale(1.06)}:root[data-ds-theme=light] .wi-total-send:hover:not(:disabled){background:#e4e8ef}.wi-total-send:active:not(:disabled){transform:scale(.88);transition:background-color .15s ease,transform .08s ease-out}@media(prefers-reduced-motion:reduce){.wi-total-send,.wi-total-send:active:not(:disabled){transition:background-color .15s ease}.wi-total-send:hover:not(:disabled){transform:none}}.wi-total-send:disabled{cursor:default;opacity:.45}.wi-total-send--dimmed{opacity:.4;cursor:pointer}.wi-total-send--dimmed:hover{opacity:.5}.wi-total-label{font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65))}.wi-total-eye{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));cursor:pointer;transition:color .15s ease;border-radius:4px}.wi-total-eye:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-total-eye:focus-visible{outline:1px solid var(--wi-texticon-secondary);outline-offset:2px}.wi-total-value{display:flex;align-items:baseline;gap:0;font-family:inherit;font-weight:600;line-height:1.25;color:var(--ds-content-highest, #000000);font-variant-numeric:tabular-nums;min-height:45px;white-space:nowrap}.wi-total-currency,.wi-total-amount,.wi-total-decimal{font-size:calc(36px * var(--wi-total-scale, 1));color:var(--ds-content-highest, #000000)}.wi-total-lte{margin-right:2px;font-weight:500;font-size:calc(22px * var(--wi-total-scale, 1));color:var(--wi-texticon-secondary)}.wi-total-mask{letter-spacing:2px;font-size:calc(32px * var(--wi-total-scale, 1));color:var(--wi-texticon-secondary)}.wi-total-skeleton{border-radius:6px}.wi-scrollable-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:8px 0 0;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent;overscroll-behavior:contain}.wi-drawer-content .wi-scrollable-body{touch-action:pan-y}[data-theme=light] .wi-scrollable-body{scrollbar-color:rgba(0,0,0,.12) transparent}.wi-scrollable-body::-webkit-scrollbar{width:4px}.wi-scrollable-body::-webkit-scrollbar-track{background:transparent}.wi-scrollable-body::-webkit-scrollbar-thumb{background:#ffffff26;border-radius:4px}.wi-scrollable-body::-webkit-scrollbar-thumb:hover{background:#ffffff40}[data-theme=light] .wi-scrollable-body::-webkit-scrollbar-thumb{background:#0000001f}[data-theme=light] .wi-scrollable-body::-webkit-scrollbar-thumb:hover{background:#0003}.wi-nav-fixed{flex-shrink:0;padding:0 24px}.wi-token-list{display:flex;flex-direction:column;gap:0;padding:8px 0}.wi-token-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 24px;border:none;background:transparent;text-align:left;font-family:inherit;width:100%;box-sizing:border-box}.wi-token-item--button{cursor:pointer;background:var(--ds-surface-default, #ffffff);transition:none}.wi-token-item--button:hover{background:#252b39!important}:root[data-ds-theme=light] .wi-token-item--button:hover{background:#eff3f8!important}button.wi-token-item:focus-visible{outline:2px solid var(--wi-primary);outline-offset:2px;border-radius:4px}.wi-token-left{display:flex;align-items:center;gap:16px;min-width:0}.wi-token-icon-wrap{position:relative;width:36px;height:36px;flex-shrink:0}.wi-token-icon{width:36px;height:36px;border-radius:0;object-fit:contain;opacity:0;transition:opacity .2s ease}.wi-token-icon[data-loaded=true]{opacity:1}.wi-token-chain-badge{position:absolute;right:0;bottom:0;width:14px;height:14px;border-radius:50%;background:var(--wi-surface-bg);box-shadow:0 0 0 1.5px var(--wi-surface-bg);object-fit:contain}.wi-token-info{display:flex;flex-direction:column;min-width:0}.wi-token-name-row{display:flex;align-items:center;gap:6px;min-width:0}.wi-token-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wi-token-apr{flex-shrink:0;font-family:inherit;font-size:12px;font-weight:600;line-height:1;color:var(--ds-system-purple-high, #9b78ff);background:var(--ds-system-purple-low, #2e2854);padding:4px;border-radius:6px;white-space:nowrap}.wi-token-price-row{display:flex;align-items:center;gap:8px}.wi-token-price{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.wi-token-change{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;white-space:nowrap}.wi-token-change[data-positive=true]{color:var(--ds-system-green-high, #00a0a2)}.wi-token-change[data-positive=false]{color:var(--ds-system-red-high, #a80927)}.wi-token-change[data-zero]{color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-token-right{display:flex;flex-direction:column;align-items:flex-end;flex-shrink:0}.wi-token-balance{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-highest, #000000);white-space:nowrap}.wi-token-value{font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.wi-sticky-footer{flex-shrink:0}.wi-footer{padding:16px 24px 24px}.wi-builtin-footer{display:flex;flex-direction:column;gap:8px;align-items:stretch}.wi-wallet-disconnect-row{display:flex;justify-content:flex-end;flex-shrink:0;padding:16px 24px;border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-send-toast{position:absolute;left:15px;right:15px;bottom:20px;z-index:2;display:flex;align-items:center;gap:12px;min-height:52px;padding:12px;border-radius:12px;background:var(--ds-surface-inverted, #1e232e);color:var(--ds-content-inverted, #ffffff);box-sizing:border-box;text-decoration:none}.wi-action-toast{position:absolute;left:15px;right:15px;bottom:20px;z-index:3;padding:12px 14px;border-radius:12px;background:var(--ds-surface-inverted, #1e232e);color:var(--ds-content-inverted, #ffffff);font-size:14px;line-height:1.4;text-align:center;box-sizing:border-box;animation:wi-action-toast-in .18s ease-out}.wi-popover-content:has(.wi-wallet-disconnect-row) .wi-action-toast,.wi-drawer-content:has(.wi-wallet-disconnect-row) .wi-action-toast{bottom:72px}@keyframes wi-action-toast-in{0%{transform:translateY(8px);opacity:0}to{transform:translateY(0);opacity:1}}.wi-action-card--dimmed{opacity:.4;cursor:pointer}.wi-action-card--dimmed:hover{opacity:.5}.wi-popover-content:has(.wi-wallet-disconnect-row) .wi-send-toast,.wi-drawer-content:has(.wi-wallet-disconnect-row) .wi-send-toast{bottom:72px}.wi-page-content .wi-action-toast,.wi-page-content .wi-send-toast{bottom:calc(20px + env(safe-area-inset-bottom,0px))}.wi-send-toast:hover{opacity:.92}.wi-send-toast-icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;flex-shrink:0;color:var(--ds-accent-primary-high, #7346f3)}.wi-send-toast-spinner{width:18px;height:18px;border:2px solid color-mix(in srgb,var(--ds-accent-primary-on-inverted, #7e54f4) 22%,transparent);border-top-color:var(--ds-accent-primary-on-inverted, #7e54f4);border-radius:50%;animation:wi-send-toast-spin .8s linear infinite}.wi-send-toast-error-dot{width:18px;height:18px;border-radius:50%;background:var(--ds-system-red-default, #ff3358)}@keyframes wi-send-toast-spin{to{transform:rotate(360deg)}}.wi-send-toast-copy{display:flex;min-width:0;flex-direction:column}.wi-send-toast-title{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-inverted, #ffffff)}.wi-send-toast-desc{font-family:inherit;font-size:12px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-accent-primary-on-inverted, #7e54f4)}.wi-send-toast-icon[data-status=error]+.wi-send-toast-copy .wi-send-toast-desc{color:var(--ds-system-red-default, #ff3358)}.wi-disconnect-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:16px;padding:0;border:none;background:transparent;color:var(--ds-content-low, rgba(0, 0, 0, .4));font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;letter-spacing:-.01em;cursor:pointer;transition:color .15s ease}.wi-disconnect-btn:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-disconnect-label{white-space:nowrap}.wi-legal-links{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:100%;flex-shrink:0;font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4))}.wi-receive-avatar .wi-avatar-fallback{position:absolute;inset:0;border-radius:50%;z-index:0}.wi-receive-avatar .wi-avatar-img{width:24px;height:24px}.wi-legal-link{color:var(--ds-content-low, rgba(0, 0, 0, .4));text-decoration:underline;text-underline-offset:2px;transition:color .15s ease}.wi-legal-link:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-legal-sep{color:inherit}.wi-empty{display:flex;align-items:center;justify-content:center;padding:32px 0;font-family:inherit;font-size:16px;color:var(--wi-texticon-secondary)}.wi-skeleton-item{display:flex;align-items:center;justify-content:space-between;padding:4px 0}.wi-skeleton-left{display:flex;align-items:center;gap:12px}.wi-skeleton-block{border-radius:6px;background:var(--wi-border-default);position:relative;overflow:hidden}.wi-skeleton-block:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.06) 50%,transparent 100%);animation:wi-shimmer 1.5s ease-in-out infinite}[data-theme=light] .wi-skeleton-block:after{background:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.04) 50%,transparent 100%)}.wi-skeleton-icon{width:32px;height:32px;border-radius:50%;flex-shrink:0}.wi-skeleton-lines{display:flex;flex-direction:column;gap:6px}.wi-skeleton-right{display:flex;flex-direction:column;align-items:flex-end;gap:6px}.wi-header-back{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--ds-content-low, rgba(0, 0, 0, .4));flex-shrink:0;transition:color .15s ease}.wi-header-back:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-view-container{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.wi-popover-content[data-view=qr] .wi-view-container,.wi-drawer-content[data-view=qr] .wi-view-container{flex:1;min-height:0}.wi-view-inner{display:flex;flex-direction:column;flex:1;min-height:0}.wi-view-wallet{animation:wi-slide-in-left .25s ease-out}.wi-view-qr,.wi-view-portfolio{animation:wi-slide-in-right .25s ease-out}.wi-qr-body{flex:1;min-height:0;display:flex;flex-direction:column}.wi-portfolio-body{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.wi-portfolio-body>.wp-embed{flex:1;min-height:0}.wi-portfolio-body .wp-body-inner{padding:16px 16px 32px;gap:32px}.wi-receive-section{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;padding:24px}.wi-receive-account{display:inline-flex;align-items:center;gap:8px;padding:4px 8px 4px 4px;border:0;background:var(--ds-surface-high, #edf1f2);border-radius:9999px;font-family:inherit;color:inherit}.wi-receive-account--btn{cursor:pointer;transition:none}.wi-receive-account--btn:hover{background:#2e3544}:root[data-ds-theme=light] .wi-receive-account--btn:hover{background:#e4e8ef}.wi-receive-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;overflow:hidden;flex-shrink:0}.wi-receive-account-name{font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wi-receive-account>svg{color:var(--ds-content-medium, rgba(0, 0, 0, .65));flex-shrink:0}.wi-receive-chevron{display:inline-flex;align-items:center;color:var(--ds-content-medium, rgba(0, 0, 0, .65));flex-shrink:0;transition:transform .2s ease}.wi-receive-chevron[data-open=true]{transform:rotate(180deg)}.wi-qr-block{display:flex;flex-direction:column;align-items:center;gap:16px}.wi-qr-box{position:relative;display:flex;align-items:center;justify-content:center;padding:10px;background:#fff;border-radius:6px;overflow:hidden}.wi-qr-logo{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);pointer-events:none}.wi-qr-address{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:16px;font-weight:400;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));text-align:center;word-break:break-all;max-width:281px;margin:0}.wi-qr-copy-btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:12px 16px;border:1px solid var(--ds-border-default, rgba(0, 0, 0, .07));background:var(--ds-surface-default, #ffffff);border-radius:12px;cursor:pointer;transition:border-color .15s ease}.wi-qr-copy-btn:hover{border-color:var(--ds-border-medium, rgba(0, 0, 0, .18))}.wi-qr-copy-icon{display:inline-flex;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wi-qr-copy-text{font-family:inherit;font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wi-receive-footer{flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:16px 24px;border-top:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wi-drawer-content .wi-header{padding:16px}.wi-drawer-content .wi-header--receive .wi-header-action,.wi-drawer-content .wi-header--sub-account .wi-header-action{top:16px;right:16px}.wi-drawer-content .wi-total-section,.wi-drawer-content .wi-action-row{margin:16px 16px 0}.wi-drawer-content .wi-nav-fixed{padding:0 16px}.wi-drawer-content .wi-token-item{padding:12px 16px}.wi-drawer-content .wi-wallet-disconnect-row{padding:16px}
16
+ `);he(`.wi-td-header-title{position:absolute;left:50%;transform:translate(-50%);display:inline-flex;align-items:center;gap:8px;pointer-events:none}.wi-td-header-icon{width:24px;height:24px;object-fit:contain;flex-shrink:0}.wi-td-header-name{font-family:inherit;font-size:18px;font-weight:600;line-height:1.5;letter-spacing:-.01em;color:var(--wi-texticon-primary, #ffffff)}.wi-td-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;display:flex;flex-direction:column;gap:24px;padding:20px 24px 24px;background:transparent;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent}[data-theme=light] .wi-td-scroll{scrollbar-color:rgba(0,0,0,.12) transparent}.wi-td-scroll::-webkit-scrollbar{width:4px}.wi-td-scroll::-webkit-scrollbar-track{background:transparent}.wi-td-scroll::-webkit-scrollbar-thumb{background:#ffffff26;border-radius:4px}.wi-td-scroll::-webkit-scrollbar-thumb:hover{background:#ffffff40}[data-theme=light] .wi-td-scroll::-webkit-scrollbar-thumb{background:#0000001f}[data-theme=light] .wi-td-scroll::-webkit-scrollbar-thumb:hover{background:#0003}.wi-td-chart{display:flex;flex-direction:column;gap:14px}.wi-td-chart-panel{display:flex;flex-direction:column;gap:4px}.wi-td-chart-price{font-size:26px;font-weight:700;line-height:1.15;color:var(--wi-texticon-primary, #ffffff)}.wi-td-chart-change{display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:600;color:var(--ds-system-green-high, #00a869)}.wi-td-chart-change[data-positive=false]{color:var(--wi-error, #e70077)}.wi-td-chart-when{font-weight:400;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}.wi-td-chart-plot{position:relative;width:100%;height:150px}.wi-td-chart-svg{display:block;width:100%;height:150px;overflow:visible;touch-action:none}.wi-td-chart-minmax{fill:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));font-size:11px;font-family:inherit}.wi-td-chart-cursor{stroke:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));stroke-width:1;stroke-dasharray:3 3}.wi-td-chart-skeleton{width:100%;height:150px;border-radius:12px}.wi-td-chart-tabs{display:flex;gap:6px;justify-content:space-between}.wi-td-chart-tab{flex:1;padding:7px 0;border:none;border-radius:8px;background:transparent;cursor:pointer;font-family:inherit;font-size:13px;font-weight:600;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));transition:background .15s ease,color .15s ease}.wi-td-chart-tab[data-active]{background:var(--wi-surface-subtle, rgba(255, 255, 255, .1));color:var(--wi-texticon-primary, #ffffff)}.wi-td-chart-tab:hover:not([data-active]){color:var(--wi-texticon-primary, #ffffff)}.wi-td-balance-card{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px;border-radius:16px;background:var(--wi-surface-default, rgba(255, 255, 255, .05))}.wi-td-balance-left{display:flex;flex-direction:column;gap:4px;flex:1 1 0;min-width:0}.wi-td-balance-label{font-size:15px;font-weight:600;color:var(--wi-texticon-primary, #ffffff)}.wi-td-balance-amount{font-size:30px;font-weight:700;line-height:1.15;color:var(--wi-texticon-primary, #ffffff);white-space:nowrap;max-width:100%}.wi-td-balance-fiat{font-size:14px;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}.wi-td-send-btn{display:inline-flex;align-items:center;gap:6px;flex-shrink:0;padding:12px 22px;border:none;border-radius:999px;cursor:pointer;font-family:inherit;font-size:15px;font-weight:600;color:var(--wi-on-primary, #ffffff);background:var(--wi-primary, #7346f3);transition:filter .15s ease}.wi-td-send-btn:hover{filter:brightness(1.06)}.wi-td-send-btn:active{filter:brightness(.94)}.wi-td-section{display:flex;flex-direction:column;gap:14px}.wi-td-section-title{margin:0;font-size:18px;font-weight:700;letter-spacing:-.01em;color:var(--wi-texticon-primary, #ffffff)}.wi-td-rows{display:flex;flex-direction:column;gap:12px}.wi-td-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.wi-td-row-label{font-size:15px;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}.wi-td-row-value{font-size:15px;font-weight:500;color:var(--wi-texticon-primary, #ffffff);text-align:right;word-break:break-all}.wi-td-row-link,.wi-td-row-copy{display:inline-flex;align-items:center;gap:6px;border:none;background:transparent;padding:0;cursor:pointer;font-family:inherit;text-decoration:none}.wi-td-row-link:hover,.wi-td-row-copy:hover{opacity:.8}.wi-td-external-icon{color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));flex-shrink:0}.wi-td-row-copy svg{color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));flex-shrink:0}.wi-td-social-row{display:flex;flex-wrap:wrap;gap:10px}.wi-td-social-btn{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;color:var(--wi-texticon-primary, #ffffff);background:var(--wi-surface-default, rgba(255, 255, 255, .05));text-decoration:none;transition:background .15s ease}.wi-td-social-btn:hover{background:var(--wi-surface-subtle, rgba(255, 255, 255, .1))}.wi-td-history-list{display:flex;flex-direction:column;gap:10px}.wi-td-history-item{display:flex;flex-direction:column;gap:8px;padding:16px;border-radius:12px;background:var(--wi-surface-default, rgba(255, 255, 255, .05));text-decoration:none}.wi-td-history-item--link{cursor:pointer;transition:background .15s ease}.wi-td-history-item--link:hover{background:var(--wi-surface-subtle, rgba(255, 255, 255, .1))}.wi-td-history-top,.wi-td-history-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px}.wi-td-history-type{font-size:15px;font-weight:600;color:var(--wi-texticon-primary, #ffffff)}.wi-td-history-type[data-direction=receive],.wi-td-history-type[data-direction=bridge-in]{color:var(--ds-system-green-high, #00a869)}.wi-td-history-counter{font-size:14px;color:var(--wi-primary, #7346f3);font-variant-numeric:tabular-nums}.wi-td-history-meta{display:inline-flex;align-items:center;gap:8px;min-width:0}.wi-td-history-status{font-size:14px;font-weight:500}.wi-td-history-status[data-status=success]{color:var(--ds-system-green-high, #00a869)}.wi-td-history-status[data-status=fail]{color:var(--wi-error, #e70077)}.wi-td-history-time{font-size:14px;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}.wi-td-history-amount{font-size:15px;font-weight:600;color:var(--wi-texticon-primary, #ffffff);text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.wi-td-history-amount[data-size=sm]{font-size:13px}.wi-td-history-amount[data-size=xs]{font-size:11px;white-space:normal;word-break:break-all}.wi-td-history-skeleton{display:flex;align-items:center;justify-content:space-between;padding:16px;border-radius:12px;background:var(--wi-surface-default, rgba(255, 255, 255, .05))}.wi-td-history-empty{display:flex;flex-direction:column;align-items:center;gap:10px;padding:28px 16px;border-radius:12px;background:var(--wi-surface-default, rgba(255, 255, 255, .05));color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5));font-size:14px;text-align:center}.wi-td-retry-btn{padding:8px 18px;border:1px solid var(--wi-border-subtle, rgba(255, 255, 255, .1));border-radius:999px;background:transparent;color:var(--wi-texticon-primary, #ffffff);font-family:inherit;font-size:13px;font-weight:600;cursor:pointer}.wi-td-retry-btn:hover{background:var(--wi-surface-subtle, rgba(255, 255, 255, .1))}.wi-td-history-sentinel{display:flex;align-items:center;justify-content:center;min-height:32px}.wi-td-history-loading{font-size:13px;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}.wi-td-loadmore-btn{align-self:center;margin-top:2px;padding:10px 24px;border:1px solid var(--wi-border-subtle, rgba(255, 255, 255, .1));border-radius:999px;background:transparent;color:var(--wi-texticon-primary, #ffffff);font-family:inherit;font-size:14px;font-weight:600;cursor:pointer;transition:background .15s ease}.wi-td-loadmore-btn:hover:not(:disabled){background:var(--wi-surface-subtle, rgba(255, 255, 255, .1))}.wi-td-loadmore-btn:disabled{cursor:default;color:var(--wi-texticon-tertiary, rgba(255, 255, 255, .5))}
17
+ `);he(`.wi-asset-tabs{position:relative;display:flex;gap:20px;padding:20px 24px 0;flex-shrink:0}.wi-drawer-content .wi-asset-tabs{padding:20px 16px 0}.wi-scrollable-body[data-tab-slide=from-right]{animation:wi-tab-slide-from-right .24s cubic-bezier(.22,1,.36,1)}.wi-scrollable-body[data-tab-slide=from-left]{animation:wi-tab-slide-from-left .24s cubic-bezier(.22,1,.36,1)}@keyframes wi-tab-slide-from-right{0%{opacity:0;transform:translate(32px)}to{opacity:1;transform:none}}@keyframes wi-tab-slide-from-left{0%{opacity:0;transform:translate(-32px)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.wi-scrollable-body[data-tab-slide]{animation:none}.wi-asset-tab-indicator[data-animate]{transition:none}}.wi-asset-tab{position:relative;padding:10px 0 12px;border:none;background:transparent;cursor:pointer;font-family:inherit;font-size:16px;font-weight:600;color:var(--wi-texticon-tertiary);transition:color .15s ease}.wi-asset-tab[data-active]{color:var(--wi-texticon-primary)}.wi-asset-tab-indicator{position:absolute;left:0;bottom:0;height:3px;border-radius:3px;background:var(--wi-texticon-primary);pointer-events:none}.wi-asset-tab-indicator[data-animate]{transition:transform .24s cubic-bezier(.22,1,.36,1),width .24s cubic-bezier(.22,1,.36,1)}.wi-nft-media{display:block;width:100%;height:100%;object-fit:cover;background:var(--wi-surface-subtle)}.wi-nft-media--fallback{display:flex;align-items:center;justify-content:center;overflow:hidden}.wi-nft-media-fallback-icon{width:100%;height:100%;color:var(--wi-texticon-tertiary)}.wi-nft-thumb,.wi-nft-thumb-skeleton{width:40px;height:40px;border-radius:8px;flex-shrink:0;overflow:hidden}.wi-nft-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:48px 24px;text-align:center}.wi-nft-empty-icon{display:flex;align-items:center;justify-content:center;width:56px;height:56px;margin-bottom:6px;border-radius:50%;background:var(--ds-surface-medium, var(--wi-surface-default));color:var(--wi-texticon-tertiary)}.wi-nft-empty-title{margin:0;font-size:15px;font-weight:600;line-height:1.3;color:var(--ds-content-high, var(--wi-texticon-primary))}.wi-nft-empty-desc{margin:0;font-size:13px;line-height:1.4;color:var(--wi-texticon-tertiary)}.wi-nft-state{display:flex;flex-direction:column;align-items:center;gap:12px;padding:32px 24px}.wi-nft-state-text{font-size:16px;color:var(--wi-texticon-secondary)}.wi-nft-retry{padding:10px 20px;border:1px solid var(--wi-border-default);border-radius:999px;background:transparent;cursor:pointer;font-family:inherit;font-size:14px;font-weight:600;color:var(--wi-texticon-primary)}.wi-nft-retry:disabled{opacity:.6;cursor:default}.wi-nft-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 12px}.wi-nft-card{display:flex;flex-direction:column;gap:6px;min-width:0;padding:0;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit}.wi-nft-card-media{position:relative;display:block;aspect-ratio:1 / 1;border-radius:12px;overflow:hidden;background:var(--wi-surface-subtle)}.wi-nft-card-media .wi-nft-media{object-fit:contain}.wi-nft-card:hover .wi-nft-card-media{filter:brightness(1.06)}.wi-nft-card-qty{position:absolute;right:6px;bottom:6px;padding:2px 6px;border-radius:999px;font-size:12px;font-weight:600;color:var(--wi-texticon-primary);background:var(--wi-surface-default)}.wi-nft-card-name,.wi-nft-card-id{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-nft-card-name{font-size:14px;font-weight:600;color:var(--wi-texticon-primary)}.wi-nft-card-id{font-size:12px;color:var(--wi-texticon-tertiary)}.wi-nft-header-name{display:block;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-nft-detail-hero{aspect-ratio:1 / 1;width:100%;border-radius:16px;overflow:hidden;background:var(--wi-surface-subtle);flex-shrink:0}.wi-nft-detail-media{object-fit:contain}.wi-nft-detail-titles{display:flex;flex-direction:column;gap:4px;min-width:0}.wi-nft-detail-collection{font-size:14px;color:var(--wi-texticon-tertiary)}.wi-nft-detail-name{word-break:break-word}.wi-nft-detail-desc{margin:0;font-size:15px;line-height:1.5;color:var(--wi-texticon-secondary);white-space:pre-line;word-break:break-word}.wi-nft-attrs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.wi-nft-attr{display:flex;flex-direction:column;gap:2px;min-width:0;padding:10px 12px;border-radius:12px;background:var(--wi-surface-subtle)}.wi-nft-attr-type{font-size:12px;color:var(--wi-texticon-tertiary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-nft-attr-value{font-size:14px;font-weight:600;color:var(--wi-texticon-primary);word-break:break-word}.wi-nft-explorer-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:14px 20px;border:1px solid var(--wi-border-default);border-radius:999px;font-size:15px;font-weight:600;color:var(--wi-texticon-primary);text-decoration:none;flex-shrink:0}.wi-nft-explorer-btn:hover{opacity:.85}
18
18
  `);he(`.wi-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}
19
- `);var Es=require("react/jsx-runtime");function Wx({mobileBreakpoint:e=768,drawerDirection:t,modal:n,open:r,onOpenChange:o,children:a,...i}){let s=Do(`(max-width: ${e}px)`),l=t??(i.showBalance?"right":"bottom"),d=l==="left"||l==="right",p=r!==void 0,[w,u]=Oa.useState(!1),h=p?r:w,x=Oa.useCallback(c=>{p||u(c),o?.(c)},[p,o]),y=Oa.useCallback(()=>x(!1),[x]);Vn(h,y);let f=Wi(i,{presentation:"overlay",open:h,isMobile:s,drawerDirection:l,modal:n??!1,close:y});return(0,Es.jsx)(da.Provider,{value:f,children:s?(0,Es.jsx)(Zg.Drawer.Root,{direction:l,open:h,onOpenChange:x,handleOnly:d,noBodyStyles:!0,repositionInputs:!1,children:a},"drawer"):(0,Es.jsx)(Kg.Root,{open:h,onOpenChange:x,children:a},"popover")})}var wo=Object.assign(Wx,{Trigger:iu,Content:Is,Nav:Vg,Footer:Yg});var Xg=_(require("react"),1);var Fd=require("react/jsx-runtime");function Ud({className:e,children:t,...n}){let r=Wi({...n,onDisconnect:void 0,onBuy:void 0,onBuyDisabledMessage:void 0,showBridge:!1,onBridgeDisabledMessage:void 0,showOnePop:!1,showPortfolio:!1,showNft:n.showNft??!0},{presentation:"page",open:!0,isMobile:!0,drawerDirection:"bottom",modal:!1});Vn(r.view!=="wallet",r.close);let{setView:o}=r,a=Xg.useCallback(()=>o("nft-collection"),[o]);return Vn(r.view==="nft-detail",a),(0,Fd.jsx)(da.Provider,{value:r,children:(0,Fd.jsx)(Is,{className:e,children:t})})}var Ke=_(require("react"),1);var Xs=_(require("react"),1);var As=require("react"),jd=(0,As.createContext)(null);function Ba(){let e=(0,As.useContext)(jd);if(!e)throw new Error("RelayDeposit compound components must be used within <RelayDeposit>");return e}var Th=_(require("react"),1);var Ms=require("react"),Ls=(0,Ms.createContext)(null);function $n(){let e=(0,Ms.useContext)(Ls);if(!e)throw new Error("ResponsiveShell compound components must be used within <ResponsiveShell>");return e}var _r=require("react");function Jg(){let e=null,t=new Set;return{getSnapshot:()=>e,publish(n){if(n!==e){e=n;for(let r of[...t])r()}},subscribe(n){return t.add(n),()=>{t.delete(n)}}}}var Wd=(0,_r.createContext)(null);function Gx(){let e=(0,_r.useContext)(Wd);if(!e)throw new Error("RelayDeposit compound components must be used within <RelayDeposit>");return e}function $g(){let e=Gx(),[t,n]=(0,_r.useState)(e.getSnapshot);return(0,_r.useLayoutEffect)(()=>(n(e.getSnapshot()),e.subscribe(()=>n(e.getSnapshot()))),[e]),t}he(`.rd-root{--rd-bg: var(--ds-bg-dim, #f7f8fb);--rd-surface: var(--ds-surface-default, #ffffff);--rd-surface-alt: var(--ds-surface-medium, #f0f1f6);--rd-border: var(--ds-border-default, #e2e4ec);--rd-text: var(--ds-content-highest, #14161f);--rd-text-muted: var(--ds-content-medium, #676b7a);--rd-accent: var(--ds-accent-primary-high, #5b5bf6);--rd-accent-contrast: var(--ds-accent-primary-on, #ffffff);--rd-success: var(--ds-system-green-default, #1e9e6a);--rd-success-bg: var(--ds-system-green-low, #e6f7f0);--rd-warning: #b8860b;--rd-warning-bg: #fdf3d9;--rd-danger: var(--ds-system-red-default, #d1394a);--rd-danger-bg: var(--ds-system-red-low, #fbe8ea);--rd-radius: 14px;--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(20, 22, 31, .04), 0 8px 24px rgba(20, 22, 31, .06));--rd-on-accent: #ffffff;width:100%;max-width:640px;box-sizing:border-box;margin:0 auto;display:flex;flex-direction:column;gap:1.25rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;background:var(--rd-bg);color:var(--rd-text);-webkit-font-smoothing:antialiased;color-scheme:light dark}.rd-root[data-theme=dark]{color-scheme:dark;--rd-bg: var(--ds-bg-default, #0f1117);--rd-surface: var(--ds-surface-default, #171923);--rd-surface-alt: var(--ds-surface-medium, #1e212c);--rd-border: var(--ds-border-default, #2a2d3a);--rd-text: var(--ds-content-highest, #eef0f6);--rd-text-muted: var(--ds-content-medium, #9498a8);--rd-accent: var(--ds-accent-primary-high, #8181ff);--rd-accent-contrast: var(--ds-accent-primary-on, #0f1117);--rd-success: var(--ds-system-green-default, #3fd68f);--rd-success-bg: var(--ds-system-green-low, #123626);--rd-warning: #e0b23c;--rd-warning-bg: #3a2f10;--rd-danger: var(--ds-system-red-default, #ff6b7a);--rd-danger-bg: var(--ds-system-red-low, #3a1418);--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35))}.rd-root[data-theme=light]{color-scheme:light;--rd-bg: var(--ds-bg-dim, #f7f8fb);--rd-surface: var(--ds-surface-default, #ffffff);--rd-surface-alt: var(--ds-surface-medium, #f0f1f6);--rd-border: var(--ds-border-default, #e2e4ec);--rd-text: var(--ds-content-highest, #14161f);--rd-text-muted: var(--ds-content-medium, #676b7a);--rd-accent: var(--ds-accent-primary-high, #5b5bf6);--rd-accent-contrast: var(--ds-accent-primary-on, #ffffff);--rd-success: var(--ds-system-green-default, #1e9e6a);--rd-success-bg: var(--ds-system-green-low, #e6f7f0);--rd-warning: #b8860b;--rd-warning-bg: #fdf3d9;--rd-danger: var(--ds-system-red-default, #d1394a);--rd-danger-bg: var(--ds-system-red-low, #fbe8ea);--rd-radius: 14px;--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(20, 22, 31, .04), 0 8px 24px rgba(20, 22, 31, .06))}.rd-root *{box-sizing:border-box}.rd-card{background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:var(--rd-radius);box-shadow:var(--rd-shadow);padding:1.25rem;display:flex;flex-direction:column;gap:.9rem}.rd-card-header{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem}.rd-card-title{font-size:1rem;font-weight:650;margin:0}.rd-card-hint{font-size:.8rem;color:var(--rd-text-muted)}.rd-token-address{display:flex;flex-direction:column;gap:.1rem}.rd-token-address-addr{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.78rem;color:var(--rd-text);overflow-wrap:anywhere;user-select:all}.rd-token-address-meta{font-size:.72rem;color:var(--rd-text-muted)}.rd-field{display:flex;flex-direction:column;gap:.35rem}.rd-field-label{font-size:.69rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--rd-text-muted)}.rd-root .rd-field-label-row{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem}.rd-root .rd-token-explorer-link{font-size:.75rem;font-weight:500;color:var(--rd-accent);text-decoration:none;white-space:nowrap}.rd-root .rd-token-explorer-link:hover{text-decoration:underline}.rd-field-row{display:grid;grid-template-columns:1fr 1fr;gap:.625rem}.rd-root select,.rd-root input[type=text],.rd-root input[type=number]{width:100%;padding:.6rem .7rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt);color:var(--rd-text);font-size:16px;font-family:inherit}.rd-root select:focus,.rd-root input:focus{outline:2px solid var(--rd-accent);outline-offset:1px}.rd-dropdown{position:relative;min-width:0}.rd-root .rd-dropdown-trigger{width:100%;display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.55rem .7rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt);color:var(--rd-text);font-size:.9rem;font-family:inherit;font-weight:600;text-align:left;cursor:pointer}.rd-root .rd-static-target{display:flex;align-items:center;gap:.55rem;padding:.55rem .7rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt);color:var(--rd-text);font-size:.9rem;font-weight:600;min-width:0;overflow-wrap:anywhere}.rd-root .rd-dropdown-trigger:disabled{cursor:not-allowed}.rd-dropdown-trigger:focus,.rd-dropdown-trigger:focus-visible{outline:2px solid var(--rd-accent);outline-offset:1px}.rd-dropdown-trigger-content{display:flex;align-items:center;gap:.55rem;min-width:0}.rd-dropdown-trigger-label{display:flex;flex-direction:column;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.2}.rd-dropdown-trigger-sub{font-size:.66rem;font-weight:500;line-height:1.3;color:var(--rd-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rd-dropdown-chevron{display:inline-flex;flex:none;color:var(--rd-text-muted);line-height:1}.rd-dropdown-popover{z-index:100002;width:var(--radix-popover-trigger-width);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;--rd-surface: var(--ds-surface-default, #ffffff);--rd-surface-alt: var(--ds-surface-medium, #f0f1f6);--rd-border: var(--ds-border-default, #e2e4ec);--rd-text: var(--ds-content-highest, #14161f);--rd-accent: var(--ds-system-orange-default, #5b5bf6);--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(20, 22, 31, .04), 0 8px 24px rgba(20, 22, 31, .06))}.rd-dropdown-popover[data-theme=dark]{color-scheme:dark;--rd-surface: var(--ds-surface-default, #171923);--rd-surface-alt: var(--ds-surface-medium, #1e212c);--rd-border: var(--ds-border-default, #2a2d3a);--rd-text: var(--ds-content-highest, #eef0f6);--rd-accent: var(--ds-system-orange-default, #8181ff);--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35))}.rd-dropdown-popover *{box-sizing:border-box}.rd-dropdown-listbox{margin:0;padding:.3rem;list-style:none;max-height:min(15rem,var(--radix-popover-content-available-height, 15rem));overflow-y:auto;overscroll-behavior:contain;background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:10px;box-shadow:var(--rd-shadow);font-family:inherit;color:var(--rd-text)}.rd-dropdown-option{display:flex;align-items:center;gap:.55rem;padding:.5rem .6rem;border-radius:8px;font-size:.9rem;color:var(--rd-text);cursor:pointer}.rd-dropdown-option-active{background:var(--rd-surface-alt)}.rd-dropdown-option-selected{font-weight:650}.rd-dropdown-option-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rd-dropdown-option-check{flex:none;color:var(--rd-accent);font-size:.8rem}.rd-amount-input{display:flex;align-items:baseline;gap:.5rem;padding:.6rem .75rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt)}.rd-amount-input:focus-within{outline:2px solid var(--rd-accent);outline-offset:1px}.rd-amount-input[data-rd-invalid]{border-color:var(--rd-danger)}.rd-root .rd-amount-input input[type=text]{flex:1 1 auto;width:auto;min-width:0;padding:0;border:0;border-radius:0;background:none;font-size:22px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.2}.rd-root .rd-amount-input input[type=text]:focus{outline:none}.rd-amount-input-suffix{flex:none;font-size:.8rem;font-weight:700;color:var(--rd-text-muted);pointer-events:none}.rd-root .rd-amount-input-max{flex:none;padding:0;font-size:.69rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--rd-accent);background:transparent;border:0;border-radius:0;cursor:pointer;line-height:1}.rd-amount-input-max:hover:not(:disabled){text-decoration:underline}.rd-amount-input-max:disabled{opacity:.5;cursor:not-allowed}.rd-amount-meta{display:flex;align-items:baseline;justify-content:space-between;gap:.75rem;font-size:.75rem;color:var(--rd-text-muted);padding:0 .15rem;font-variant-numeric:tabular-nums}.rd-root button{font-family:inherit;font-size:.95rem;font-weight:650;border-radius:10px;border:1px solid transparent;padding:.7rem 1.1rem;cursor:pointer;transition:opacity .12s ease,transform .12s ease}.rd-root button:active:not(:disabled){transform:translateY(1px)}.rd-root button:disabled{cursor:not-allowed;opacity:.55}.rd-button-primary{background:var(--rd-accent);color:var(--rd-accent-contrast)}.rd-button-secondary{background:var(--rd-surface-alt);color:var(--rd-text);border-color:var(--rd-border)}.rd-button-block{width:100%}.rd-callout{border-radius:10px;padding:.65rem .85rem;font-size:.85rem;line-height:1.4}.rd-callout-warning{background:var(--rd-warning-bg);color:var(--rd-warning)}.rd-callout-danger{background:var(--rd-danger-bg);color:var(--rd-danger)}.rd-callout-success{background:var(--rd-success-bg);color:var(--rd-success)}.rd-callout-muted{background:var(--rd-surface-alt);color:var(--rd-text-muted)}.rd-quote-strip{display:flex;align-items:center;justify-content:space-between;gap:.625rem;padding:.7rem .85rem;border-radius:14px;background:color-mix(in srgb,var(--rd-accent) 10%,var(--rd-surface));border:1px solid color-mix(in srgb,var(--rd-accent) 35%,transparent)}.rd-quote-strip-side{display:flex;flex-direction:column;min-width:0;gap:.1rem;font-size:.9rem;font-weight:700;color:var(--rd-text);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.rd-quote-strip-end{text-align:right;align-items:flex-end}.rd-quote-strip-side small{font-size:.69rem;font-weight:600;color:var(--rd-text-muted);letter-spacing:.02em}.rd-quote-strip-arrow{flex:none;color:var(--rd-accent);font-weight:800}.rd-quote-strip-hint{font-size:.72rem;line-height:1.45;color:var(--rd-text-muted);padding:0 .15rem}.rd-deposit-address{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto 1fr auto;align-items:start;gap:.7rem;min-height:172px;background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:16px;box-shadow:var(--rd-shadow);padding:.85rem;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12.5px;color:var(--rd-text-muted)}.rd-deposit-address-label{grid-column:1;grid-row:1;position:relative;display:inline-flex;align-items:center;gap:.35rem;width:fit-content;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}.rd-root button.rd-address-term{position:static;width:auto;height:auto;display:inline;padding:0 0 2px;border:0;border-bottom:1px dotted currentColor;border-radius:0;background:transparent;color:var(--rd-text-muted);font:700 .69rem/1 -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;letter-spacing:.08em;text-transform:uppercase}.rd-root button.rd-address-term:hover,.rd-root button.rd-address-term:focus-visible{color:var(--rd-accent);outline:none}.rd-address-tooltip{position:absolute;z-index:20;top:calc(100% + 8px);left:0;width:min(250px,calc(100vw - 48px));padding:9px 11px;border:1px solid var(--rd-border);border-radius:10px;background:var(--rd-surface);box-shadow:var(--rd-shadow);color:var(--rd-text);font-size:11.5px;font-weight:500;line-height:1.45;letter-spacing:normal;text-align:left;text-transform:none;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(-3px);transition:opacity .12s ease,transform .12s ease,visibility .12s ease}.rd-address-term:hover .rd-address-tooltip,.rd-address-term:focus .rd-address-tooltip,.rd-address-term:focus-visible .rd-address-tooltip{opacity:1;visibility:visible;transform:translateY(0)}.rd-address-full{grid-column:1 / -1;grid-row:2;align-self:center;min-width:0;color:var(--rd-text);font-weight:600;line-height:1.55;overflow-wrap:anywhere;word-break:break-all}.rd-root .rd-address-copy{grid-column:1 / -1;grid-row:3;width:100%;min-height:36px;display:inline-flex;align-items:center;justify-content:center;gap:.4rem;margin:0;padding:.5rem .7rem;border-radius:10px;border:0;background:var(--rd-accent);color:var(--rd-accent-contrast);font-family:inherit;font-size:.75rem;font-weight:800;letter-spacing:.03em;line-height:1}.rd-root .rd-address-copy svg{flex:none}.rd-root .rd-address-copy:hover:not(:disabled){opacity:.92}.rd-root button.rd-mobile-qr-toggle,.rd-root button.rd-mobile-address-toggle{display:none;place-items:center;width:34px;height:34px;padding:0;border:1px solid color-mix(in srgb,var(--rd-accent) 24%,var(--rd-border));border-radius:11px;background:color-mix(in srgb,var(--rd-accent) 10%,var(--rd-surface));color:var(--rd-accent);box-shadow:0 1px 2px color-mix(in srgb,var(--rd-text) 8%,transparent);transition:transform .15s ease,background-color .15s ease,border-color .15s ease,box-shadow .15s ease}.rd-root button.rd-mobile-qr-toggle{grid-column:2;grid-row:1;justify-self:end;align-self:start}.rd-root button.rd-mobile-address-toggle{position:absolute;z-index:2;top:.85rem;right:.85rem;background:var(--rd-surface);color:var(--rd-text-muted);box-shadow:0 4px 14px color-mix(in srgb,var(--rd-text) 16%,transparent)}.rd-root button.rd-mobile-qr-toggle:hover:not(:disabled),.rd-root button.rd-mobile-address-toggle:hover:not(:disabled){border-color:color-mix(in srgb,var(--rd-accent) 45%,var(--rd-border));color:var(--rd-accent);background:color-mix(in srgb,var(--rd-accent) 15%,var(--rd-surface));box-shadow:0 5px 16px color-mix(in srgb,var(--rd-accent) 18%,transparent);transform:translateY(-1px)}.rd-root button.rd-mobile-qr-toggle:active:not(:disabled),.rd-root button.rd-mobile-address-toggle:active:not(:disabled){transform:scale(.96)}.rd-deposit-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.9rem;container:rd-deposit-head / inline-size}.rd-deposit-head>.rd-deposit-qr-pane{flex:none}.rd-deposit-head>.rd-deposit-address{flex:1 1 12rem;min-width:0}@container rd-deposit-head (max-width: 23.75rem){.rd-deposit-head>.rd-deposit-address{flex-basis:100%;width:100%}.rd-deposit-head>.rd-skeleton-qr{display:none}.rd-deposit-head>.rd-skeleton-address{flex-basis:100%;width:100%}.rd-root button.rd-mobile-qr-toggle,.rd-root button.rd-mobile-address-toggle{display:grid}.rd-deposit-head[data-compact-view=address]>.rd-deposit-qr-pane,.rd-deposit-head[data-compact-view=qr]>.rd-deposit-address{display:none}.rd-deposit-head[data-compact-view=address]>.rd-deposit-address,.rd-deposit-head[data-compact-view=qr]>.rd-deposit-qr-pane{animation:rd-compact-pane-in .26s cubic-bezier(.22,1,.36,1)}.rd-deposit-head[data-compact-view=qr]>.rd-deposit-qr-pane{width:100%}}@keyframes rd-compact-pane-in{0%{opacity:0;transform:translateY(6px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}.rd-deposit-qr{position:relative;display:grid;place-items:center;width:172px;height:172px;background:#fff;border-radius:16px;border:1px solid var(--rd-border);box-shadow:var(--rd-shadow);margin:0 auto}.rd-deposit-qr-pane{position:relative;display:grid;place-items:center;min-height:172px}.rd-deposit-qr-badge{position:absolute;inset:0;margin:auto;width:36px;height:36px;display:grid;place-items:center;background:#fff;border-radius:50%;pointer-events:none}.rd-stepper{display:flex;flex-direction:column;gap:0}.rd-stepper-item{display:flex;gap:.75rem;position:relative;padding-bottom:1.25rem}.rd-stepper-item:last-child{padding-bottom:0}.rd-stepper-rail{display:flex;flex-direction:column;align-items:center}.rd-stepper-dot{width:22px;height:22px;border-radius:50%;border:2px solid var(--rd-border);background:var(--rd-surface);display:flex;align-items:center;justify-content:center;font-size:.7rem;font-weight:700;flex:none;color:var(--rd-text-muted)}.rd-stepper-item-done .rd-stepper-dot{background:var(--rd-success);border-color:var(--rd-success);color:var(--rd-on-accent)}.rd-stepper-item-active .rd-stepper-dot{border-color:var(--rd-accent);color:var(--rd-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--rd-accent) 20%,transparent)}.rd-stepper-line{flex:1;width:2px;background:var(--rd-border);margin:2px 0}.rd-stepper-item-done .rd-stepper-line{background:var(--rd-success)}.rd-stepper-body{padding-top:1px}.rd-stepper-label{font-weight:600;font-size:.9rem}.rd-stepper-item-pending .rd-stepper-label{color:var(--rd-text-muted)}.rd-stepper-meta{margin-top:.25rem;font-size:.78rem;color:var(--rd-text-muted);display:flex;flex-direction:column;gap:.15rem}.rd-stepper-meta a{color:var(--rd-accent);text-decoration:none}.rd-stepper-meta a:hover{text-decoration:underline}.rd-status-pill{display:inline-flex;align-items:center;gap:.35rem;font-size:.75rem;font-weight:650;padding:.2rem .55rem;border-radius:999px;background:var(--rd-surface-alt);color:var(--rd-text-muted);width:fit-content}.rd-status-pill-success{background:var(--rd-success-bg);color:var(--rd-success)}.rd-status-pill-failure{background:var(--rd-danger-bg);color:var(--rd-danger)}.rd-spinner{display:inline-block;width:1em;height:1em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:rd-spin .7s linear infinite;vertical-align:-.15em}@keyframes rd-spin{to{transform:rotate(360deg)}}.rd-muted{color:var(--rd-text-muted)}.rd-settings-row{display:flex;justify-content:flex-end}.rd-root .rd-icon-button{position:relative;display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0;border-radius:50%;border:1px solid var(--rd-border);background:var(--rd-surface);color:var(--rd-text-muted)}.rd-root .rd-icon-button:hover:not(:disabled){color:var(--rd-text);background:var(--rd-surface-alt)}.rd-recovery-badge{position:absolute;top:-.3rem;right:-.3rem;display:flex;align-items:center;justify-content:center;min-width:1.05rem;height:1.05rem;padding:0 .25rem;border-radius:999px;background:var(--rd-danger, #d1394a);color:#fff;font-size:.65rem;font-weight:700;line-height:1;border:2px solid var(--rd-surface, #ffffff)}.rd-recover-group{display:flex;flex-direction:column;gap:.75rem}.rd-recover-group+.rd-recover-group{border-top:1px solid var(--rd-border);padding-top:1rem;margin-top:.5rem}.rd-recover-group-label{margin:0;font-size:.8rem;color:var(--rd-text-muted)}.rd-recover-made-of{display:block;padding:.65rem .8rem;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:10px}.rd-recover-made-of-label{cursor:pointer;font-size:.72rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--rd-text-muted)}.rd-recover-made-of-body{display:flex;flex-direction:column;gap:.4rem;margin-top:.6rem}.rd-error-details{margin-top:-.4rem;padding:0 .15rem;color:var(--rd-text-muted);font-size:.72rem}.rd-error-details summary{width:max-content;cursor:pointer;list-style:none;font-weight:600}.rd-error-details summary::-webkit-details-marker{display:none}.rd-error-details summary:before{display:inline-block;margin-right:.35rem;content:"\\203a";transition:transform .12s ease}.rd-error-details[open] summary:before{transform:rotate(90deg)}.rd-error-log{position:relative;margin-top:.5rem}.rd-root button.rd-error-copy{position:absolute;z-index:1;top:.45rem;right:.45rem;display:inline-flex;align-items:center;justify-content:center;width:1.65rem;height:1.65rem;padding:0;border:1px solid var(--rd-border);border-radius:6px;background:var(--rd-surface);color:var(--rd-text-muted)}.rd-root button.rd-error-copy:hover:not(:disabled){background:var(--rd-surface-alt);color:var(--rd-text)}.rd-error-details code{display:block;max-height:6rem;overflow:auto;padding:.6rem 2.7rem .6rem .7rem;border:1px solid var(--rd-border);border-radius:8px;background:var(--rd-surface-alt);color:var(--rd-text-muted);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.68rem;line-height:1.45;overflow-wrap:anywhere;scrollbar-color:var(--rd-border) transparent;scrollbar-width:thin;white-space:pre-wrap}.rd-error-details code::-webkit-scrollbar{width:4px;height:4px}.rd-error-details code::-webkit-scrollbar-thumb{border-radius:999px;background:var(--rd-border)}.rd-token-list{display:flex;flex-direction:column;gap:.5rem}.rd-token-row{display:flex;align-items:center;gap:10px;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:12px;padding:12px 14px}.rd-token-row-info{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1;overflow-wrap:anywhere}.rd-token-row-symbol{font-weight:700}.rd-token-row-amount{font-variant-numeric:tabular-nums;font-size:14px;font-weight:700;color:var(--rd-text);white-space:nowrap}.rd-token-row-status{font-size:11.5px;line-height:1.45;color:var(--rd-text-muted)}.rd-token-row-warn{font-size:11.5px;line-height:1.45;color:var(--rd-warning)}.rd-token-row-warn b{font-weight:750;font-variant-numeric:tabular-nums}.rd-token-row-step{font-size:11.5px;line-height:1.45;font-weight:650;color:var(--rd-accent)}.rd-root .rd-token-row-action{flex:none;width:auto;padding:9px 16px;font-size:13px;font-weight:700}.rd-token-row-spinner{flex:none;font-size:18px;color:var(--rd-accent)}.rd-recover-sum{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:12px;padding:16px 14px;container:rd-recover-sum / inline-size}.rd-recover-sum-label{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rd-text-muted)}.rd-recover-sum-value{max-width:100%;overflow:hidden;font-size:22px;font-size:clamp(18px,7cqi,28px);font-weight:800;line-height:1.15;font-variant-numeric:tabular-nums;text-overflow:ellipsis;white-space:nowrap;color:var(--rd-text)}.rd-recover-sum-unit{display:block;margin:.35rem 0 0;font-size:15px;font-weight:700;color:var(--rd-text-muted)}.rd-recover-sum-empty{font-size:17px;font-weight:700;color:var(--rd-text-muted)}.rd-recover-empty{display:flex;min-height:min(20rem,48vh);flex:1 1 auto;flex-direction:column;align-items:center;justify-content:center;gap:.7rem;padding:2.5rem 1.5rem;border:1px solid var(--rd-border);border-radius:16px;background:radial-gradient(circle at 50% 0%,color-mix(in srgb,var(--rd-accent) 11%,transparent),transparent 48%),var(--rd-surface-alt);text-align:center;box-sizing:border-box}.rd-recover-empty-icon{display:grid;width:4.25rem;height:4.25rem;place-items:center;margin-bottom:.2rem;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:50%;background:color-mix(in srgb,var(--rd-accent) 12%,var(--rd-surface));color:var(--rd-accent);box-shadow:0 10px 30px color-mix(in srgb,var(--rd-accent) 12%,transparent)}.rd-recover-empty[data-variant=unavailable] .rd-recover-empty-icon{border-color:var(--rd-border);background:var(--rd-surface);color:var(--rd-text-muted);box-shadow:none}.rd-recover-empty-title,.rd-recover-sum-value.rd-recover-empty-title{max-width:100%;margin:0;overflow:visible;color:var(--rd-text);font-size:1.15rem;font-weight:750;line-height:1.35;white-space:normal}.rd-recover-empty-copy{max-width:23rem;margin:0;color:var(--rd-text-muted);font-size:.82rem;line-height:1.55;text-wrap:balance}.rd-root button.rd-recover-empty-refresh{display:inline-flex;min-height:2.6rem;align-items:center;justify-content:center;gap:.45rem;margin-top:.45rem;padding:.65rem 1rem;color:var(--rd-text);font-size:.82rem}.rd-root button.rd-recover-empty-refresh:hover:not(:disabled){border-color:color-mix(in srgb,var(--rd-accent) 35%,var(--rd-border));background:color-mix(in srgb,var(--rd-accent) 9%,var(--rd-surface));color:var(--rd-accent)}[data-rd-recover-funds].rd-stack{flex:1 1 auto}.rd-recover-foot{margin-top:auto;padding-top:.5rem;text-align:center;font-size:11.5px;line-height:1.45;color:var(--rd-text-muted)}.rd-history-table{display:flex;min-width:0;flex-direction:column;gap:.6rem;font-size:.875rem}.rd-history-empty{display:flex;min-height:min(20rem,48vh);flex:1 1 auto;flex-direction:column;align-items:center;justify-content:center;gap:.7rem;padding:2.5rem 1.5rem;border:1px solid var(--rd-border);border-radius:16px;background:radial-gradient(circle at 50% 0%,color-mix(in srgb,var(--rd-accent) 10%,transparent),transparent 48%),var(--rd-surface-alt);text-align:center;box-sizing:border-box}.rd-history-empty-icon{display:grid;width:4.25rem;height:4.25rem;place-items:center;margin-bottom:.2rem;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:50%;background:color-mix(in srgb,var(--rd-accent) 12%,var(--rd-surface));color:var(--rd-accent);box-shadow:0 10px 30px color-mix(in srgb,var(--rd-accent) 12%,transparent)}.rd-history-empty[data-variant=disconnected] .rd-history-empty-icon{border-color:var(--rd-border);background:var(--rd-surface);color:var(--rd-text-muted);box-shadow:none}.rd-history-empty-title{margin:0;color:var(--rd-text);font-size:1.15rem;font-weight:750;line-height:1.35}.rd-history-empty-copy{max-width:22rem;margin:0;color:var(--rd-text-muted);font-size:.82rem;line-height:1.55;text-wrap:balance}.rd-history-empty-live{display:inline-flex;align-items:center;gap:.4rem;margin-top:.35rem;color:var(--rd-text-muted);font-size:.72rem;font-weight:650}.rd-history-empty-live>span{width:.45rem;height:.45rem;border-radius:50%;background:var(--rd-success);box-shadow:0 0 0 3px color-mix(in srgb,var(--rd-success) 15%,transparent)}.rd-history-group{min-width:0;max-width:100%;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:12px;overflow:hidden}.rd-history-row-button{width:100%;min-width:0;display:flex;flex-direction:column;gap:.75rem;padding:1rem;background:none;border:none;border-radius:inherit;color:inherit;font:inherit;text-align:left;cursor:pointer}.rd-history-row-button[aria-expanded=true]{border-radius:12px 12px 0 0}.rd-history-row-button:hover{background:color-mix(in srgb,var(--rd-border) 30%,transparent)}.rd-history-row-button:focus-visible{outline:2px solid var(--rd-accent);outline-offset:-2px}.rd-history-card-top{display:flex;align-items:center;gap:.5rem;min-width:0}.rd-history-card-top>.rd-status-pill{margin-left:auto;flex:none}.rd-history-card-top>.rd-status-pill:not(.rd-status-pill-success):not(.rd-status-pill-failure){background:color-mix(in srgb,var(--rd-accent) 12%,transparent);color:var(--rd-accent)}.rd-history-asset{font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rd-history-card-amounts{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:.75rem;padding:.75rem;border-radius:10px;background:var(--rd-surface)}.rd-history-amount-block{display:flex;max-width:100%;flex-direction:column;gap:.15rem;min-width:0}.rd-history-amount-block:last-child{align-items:flex-end;text-align:right}.rd-history-amount-label{color:var(--rd-text-muted);font-size:.68rem;font-weight:650;line-height:1.2}.rd-history-num{max-width:100%;overflow:hidden;font-variant-numeric:tabular-nums;font-size:.875rem;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.rd-history-num[data-full-value],.rd-history-step-amount[data-full-value]{cursor:help}[data-rd-history-floating-tooltip]{position:fixed;z-index:100100;width:max-content;max-width:calc(100vw - 1.5rem);padding:.45rem .65rem;border:1px solid;border-radius:8px;font-size:.72rem;font-weight:600;line-height:1.35;text-align:left;white-space:normal;overflow-wrap:anywhere;pointer-events:none}.rd-history-card-arrow{display:inline-flex;align-items:center;justify-content:center;color:var(--rd-text-muted);font-size:.85rem}.rd-history-received{color:var(--rd-success)}.rd-history-received-estimate{color:var(--rd-text-muted);font-weight:600}.rd-history-card-foot{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.rd-history-date{color:var(--rd-text-muted);font-size:.78rem;font-variant-numeric:tabular-nums}.rd-history-chevron{display:inline-flex;flex:none;align-items:center;justify-content:center;color:var(--rd-text-muted);text-align:center;transition:transform .16s ease}.rd-history-row-button[aria-expanded=true] .rd-history-chevron{transform:rotate(180deg)}.rd-history-detail{display:flex;min-width:0;flex-direction:column;gap:.375rem;padding:.65rem .9rem .8rem;border-top:1px solid var(--rd-border)}.rd-history-step{display:grid;min-width:0;grid-template-columns:.5rem auto 1fr auto auto;gap:.5rem;align-items:center}.rd-history-step-dot{width:.5rem;height:.5rem;border-radius:50%;background:var(--rd-border)}.rd-history-step-dot-done{background:var(--rd-success)}.rd-history-step-label{font-weight:600}.rd-history-step-chain{color:var(--rd-text-muted)}.rd-history-step-amount{font-variant-numeric:tabular-nums;color:var(--rd-text-muted)}.rd-history-step-tx{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.rd-history-step-shared{margin-left:.4rem;color:var(--rd-text-muted);font-size:.72rem}.rd-skeleton{border-radius:10px;background:linear-gradient(90deg,var(--rd-surface-alt) 25%,color-mix(in srgb,var(--rd-surface-alt) 55%,var(--rd-surface)) 42%,var(--rd-surface-alt) 60%);background-size:220% 100%;animation:rd-skeleton-wave 1.4s ease-in-out infinite}@keyframes rd-skeleton-wave{0%{background-position:130% 0}to{background-position:-90% 0}}@media(prefers-reduced-motion:reduce){.rd-skeleton,.rd-checklist-status,.rd-deposit-head[data-compact-view=address]>.rd-deposit-address,.rd-deposit-head[data-compact-view=qr]>.rd-deposit-qr-pane,.rd-checklist-status-waiting .rd-checklist-status-dot,.rd-checklist-status-detected .rd-checklist-status-dot{animation:none}}.rd-skeleton-form{display:flex;flex-direction:column;gap:.85rem}.rd-skeleton-qr{flex:none;width:172px;height:172px;border-radius:16px}.rd-skeleton-address{flex:1 1 12rem;min-width:0;height:172px;border-radius:16px}.rd-skeleton-line{height:.9rem;width:40%}.rd-skeleton-field{height:48px}.rd-skeleton-notice{height:96px}.rd-skeleton-cta{height:48px}.rd-wizard{flex:1 1 auto;min-height:0;overflow-y:auto;container:rd-wizard / inline-size;padding:1rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom,0px));scroll-padding:1.5rem 0 calc(1.5rem + env(safe-area-inset-bottom,0px));overscroll-behavior:contain;-webkit-overflow-scrolling:touch;max-width:none;gap:.85rem}.rd-deposit-tabs{--rd-tab-count: 3;--rd-active-tab-index: 0;position:sticky;top:-1rem;z-index:2;display:flex;flex:0 0 auto;justify-content:space-around;margin:-1rem -1.25rem 0;padding:1rem 1.25rem 0;border-bottom:1px solid var(--rd-border);background:var(--rd-surface)}.rd-deposit-tabs[data-active-index="1"]{--rd-active-tab-index: 1}.rd-deposit-tabs[data-active-index="2"]{--rd-active-tab-index: 2}.rd-deposit-tabs:after{position:absolute;bottom:-1px;left:1.25rem;width:calc((100% - 2.5rem) / var(--rd-tab-count));height:2px;background:var(--rd-accent);content:"";pointer-events:none;transform:translate(calc(var(--rd-active-tab-index) * 100%));transition:transform .22s cubic-bezier(.22,1,.36,1),width .18s ease}.rd-root .rd-deposit-tab{position:relative;display:inline-flex;flex:1 1 0;min-width:0;min-height:2.75rem;align-items:center;justify-content:center;gap:.4rem;padding:.85rem .35rem;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:var(--rd-text-muted);font:inherit;font-size:.875rem;font-weight:650;line-height:1.2;transition:border-color .16s ease,background-color .16s ease,color .16s ease}.rd-root .rd-deposit-tab[data-active=true]{color:var(--rd-text)}.rd-root .rd-deposit-tab:hover:not(:disabled),.rd-root .rd-deposit-tab:focus-visible{outline:none;background:color-mix(in srgb,var(--rd-accent) 7%,transparent);color:var(--rd-text)}.rd-deposit-tab>.rd-recovery-badge{position:static;flex:none;min-width:1rem;height:1rem;padding:0 .2rem;border-width:0}.rd-deposit-tab-panel{display:flex;min-width:0;flex:1 1 auto;flex-direction:column;gap:.85rem;transform-origin:top center;animation:rd-deposit-tab-in .18s cubic-bezier(.22,1,.36,1)}@keyframes rd-deposit-tab-in{0%{opacity:0;transform:translateY(.35rem)}to{opacity:1;transform:translateY(0)}}.rd-stack{display:flex;min-width:0;flex-direction:column;gap:.75rem}.rd-wizard-header{display:flex;align-items:center;gap:.5rem;margin-bottom:0}.rd-wizard-heading{font-size:1rem;font-weight:700;color:var(--rd-text);margin:0}.rd-wizard-actions{margin-left:auto;display:flex;align-items:center;gap:.25rem}.rd-min-notice-pending{color:var(--rd-text-muted)}.rd-min-notice-pending b{font-weight:750;color:var(--rd-warning);font-variant-numeric:tabular-nums}.rd-locked-card{display:flex;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;padding:1.5rem 1.25rem;border:1px solid var(--rd-border);border-radius:16px;background:radial-gradient(circle at 50% 0%,color-mix(in srgb,var(--rd-accent) 12%,transparent),transparent 52%),var(--rd-surface-alt);text-align:center;box-sizing:border-box}.rd-locked-glyph{display:grid;width:3rem;height:3rem;place-items:center;margin-bottom:.1rem;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:50%;background:color-mix(in srgb,var(--rd-accent) 12%,var(--rd-surface));color:var(--rd-accent);line-height:0;box-shadow:0 10px 30px color-mix(in srgb,var(--rd-accent) 12%,transparent)}.rd-locked-title{margin:0;color:var(--rd-text);font-size:1rem;font-weight:750;line-height:1.3}.rd-locked-text{max-width:22rem;margin:0;color:var(--rd-text-muted);font-size:.8rem;line-height:1.45}.rd-locked-card>.rd-card-hint{max-width:22rem;margin:-.2rem 0 0;text-wrap:balance}.rd-root button.rd-locked-action{display:inline-flex;width:min(18rem,100%);min-height:2.6rem;align-items:center;justify-content:center;gap:.5rem;margin-top:.25rem}.rd-delivery-recipient{display:flex;flex-direction:column;gap:.3rem;margin-top:.5rem}.rd-checklist-credit{font-size:clamp(10px,2.7vw,11.5px);white-space:nowrap}.rd-checklist{background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:14px;padding:11px 14px;display:flex;flex-direction:column;gap:7px}.rd-checklist-row{display:flex;align-items:flex-start;gap:.5rem;font-size:12.5px;line-height:1.5;color:var(--rd-text)}.rd-checklist-row[data-rd-checklist-only]{align-items:center;white-space:nowrap;font-size:clamp(10.5px,2.8vw,12.5px)}.rd-checklist-mark{flex:none;width:1.05rem;text-align:center;font-weight:800;color:var(--rd-text-muted)}.rd-checklist-mark-warn{color:var(--rd-warning)}.rd-checklist-accent{color:var(--rd-accent);font-weight:750;font-variant-numeric:tabular-nums}.rd-checklist-status{min-height:54px;display:flex;align-items:center;gap:.65rem;padding:10px 12px;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:12px;background:var(--rd-surface-alt);color:var(--rd-text-muted);font-size:12.5px;line-height:1.45;transform-origin:top center;animation:rd-status-enter .48s cubic-bezier(.22,1,.36,1)}.rd-checklist-status-waiting,.rd-checklist-status-detected{border-color:color-mix(in srgb,var(--rd-warning) 42%,var(--rd-border));box-shadow:0 0 0 1px color-mix(in srgb,var(--rd-warning) 10%,transparent)}@keyframes rd-status-enter{0%{opacity:0;transform:translateY(-10px) scale(.985);box-shadow:0 0 color-mix(in srgb,var(--rd-accent) 28%,transparent)}65%{opacity:1;transform:translateY(1px) scale(1);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-accent) 16%,transparent)}to{opacity:1;transform:translateY(0);box-shadow:0 0 0 0 transparent}}.rd-checklist-status-dot{flex:none;width:9px;height:9px;border-radius:50%;background:var(--rd-warning);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-warning) 14%,transparent)}.rd-checklist-status-waiting .rd-checklist-status-dot,.rd-checklist-status-detected .rd-checklist-status-dot{animation:rd-status-breathe 1.8s ease-in-out infinite}@keyframes rd-status-breathe{0%,to{opacity:.82;transform:scale(.96);box-shadow:0 0 0 3px color-mix(in srgb,var(--rd-warning) 10%,transparent)}50%{opacity:1;transform:scale(1);box-shadow:0 0 0 5px color-mix(in srgb,var(--rd-warning) 15%,transparent)}}.rd-checklist-status-funded,.rd-checklist-status-processing{color:var(--rd-text);border-color:color-mix(in srgb,var(--rd-accent) 40%,transparent)}.rd-checklist-status-funded .rd-checklist-status-dot,.rd-checklist-status-processing .rd-checklist-status-dot{background:var(--rd-accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-accent) 14%,transparent)}.rd-checklist-status-completed{border-color:color-mix(in srgb,var(--rd-success) 40%,transparent);background:var(--rd-success-bg);color:var(--rd-success)}.rd-checklist-status-completed .rd-checklist-status-dot{background:var(--rd-success);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-success) 14%,transparent)}.rd-checklist-status-failed{border-color:color-mix(in srgb,var(--rd-danger) 40%,transparent);background:var(--rd-danger-bg);color:var(--rd-danger)}.rd-checklist-status-failed .rd-checklist-status-dot{background:var(--rd-danger);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-danger) 14%,transparent)}@container rd-wizard (max-width: 30rem){.rd-recover-sum{padding-inline:.75rem}.rd-recover-sum-value{font-size:clamp(1rem,6cqi,1.5rem)}[data-rd-recover-funds] .rd-callout,.rd-token-row-status,.rd-token-row-warn,.rd-token-row-step,.rd-recover-foot{overflow-wrap:anywhere}.rd-token-row{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;padding:.875rem}.rd-root .rd-token-row-action{width:100%;min-height:2.75rem;grid-column:1 / -1}.rd-token-row-spinner{grid-column:1 / -1;justify-self:center}}@container rd-wizard (max-width: 24rem){.rd-history-card-top{flex-direction:column;align-items:flex-start}.rd-history-card-top>.rd-status-pill{max-width:100%;margin-left:0;white-space:normal}.rd-history-asset{overflow:visible;text-overflow:clip;white-space:normal}.rd-history-card-amounts{grid-template-columns:minmax(0,1fr);gap:.45rem}.rd-history-amount-block{width:100%}.rd-history-amount-block:last-child{align-items:flex-start;text-align:left}.rd-history-card-arrow{display:inline-flex;justify-self:center;margin:0;transform:rotate(90deg);transform-origin:center}.rd-history-card-foot{align-items:flex-start}.rd-history-date{min-width:0;line-height:1.4;overflow-wrap:anywhere}.rd-history-step{grid-template-columns:.5rem minmax(0,1fr);grid-template-areas:"dot label" ". chain" ". amount" ". tx";column-gap:.5rem;row-gap:.25rem;align-items:start;padding-block:.65rem;line-height:1.35}.rd-history-step+.rd-history-step{border-top:1px solid var(--rd-border)}.rd-history-step-dot{grid-area:dot;margin-top:.35rem}.rd-history-step-label{grid-area:label}.rd-history-step-chain{grid-area:chain}.rd-history-step-amount{grid-area:amount}.rd-history-step-tx{grid-area:tx;min-width:0;max-width:100%}.rd-history-step-tx a{overflow-wrap:anywhere}.rd-history-step-shared{display:block;margin:.15rem 0 0}.rd-history-step>.rd-muted{grid-area:tx}}@container rd-wizard (max-width: 22rem){.rd-root .rd-deposit-tab{gap:.2rem;padding-inline:.15rem;font-size:.8rem}.rd-history-row-button,.rd-history-detail{padding-inline:.75rem}}@media(prefers-reduced-motion:reduce){.rd-deposit-tabs:after,.rd-root .rd-deposit-tab{transition:none}.rd-deposit-tab-panel{animation:none}}
20
- `);var Qt=require("react/jsx-runtime");function eh({minNotice:e,arrivalStatus:t}){let n=t.amount&&t.symbol?`${t.amount} ${t.symbol} arrived`:t.amount?`${t.amount} arrived`:void 0,r=(()=>{switch(t.phase){case"detected":if(e.remaining!==void 0){let o=`${e.remaining} ${e.symbol}`;return n?`${n} at the processing address. Waiting for ${o} more to reach the minimum.`:`Deposit detected. Waiting for ${o} more to reach the minimum.`}return n?`${n} at the processing address. Checking the minimum.`:"Deposit detected. Checking the minimum.";case"funded":return`${e.min} ${e.symbol} received at the processing address. Preparing delivery.`;case"processing":return"Minimum reached. Bridging and delivering to ONEchain.";case"completed":return"Transfer completed. Funds were delivered to ONEchain.";case"failed":return`Transfer needs attention${t.backendStatus?` (${t.backendStatus})`:""}.`;case"unavailable":return e.remaining===void 0?"Live status is temporarily unavailable. Retrying automatically.":void 0;default:return e.remaining===void 0?"Waiting for your deposit.":void 0}})();return r?(0,Qt.jsxs)("div",{className:`rd-checklist-status rd-checklist-status-${t.phase}`,"data-rd-deposit-status":"","data-phase":t.phase,role:"status","aria-live":"polite","aria-atomic":"true",children:[(0,Qt.jsx)("span",{className:"rd-checklist-status-dot","aria-hidden":"true"}),(0,Qt.jsx)("span",{children:r})]},`live:${t.phase}:${r}`):e.remaining!==void 0?(0,Qt.jsxs)("div",{className:"rd-checklist-status rd-checklist-status-waiting rd-min-notice-pending","data-rd-min-notice-pending":"",role:"status","aria-live":"polite","aria-atomic":"true",children:[(0,Qt.jsx)("span",{className:"rd-checklist-status-dot","aria-hidden":"true"}),(0,Qt.jsxs)("span",{children:["Waiting for"," ",(0,Qt.jsxs)("b",{children:[e.remaining," ",e.symbol]})," ","more to arrive at the processing address."]})]},`pending:${e.remaining}:${e.symbol}`):null}function th({minNotice:e,onlySend:t,showWalletCreditNote:n=!1}){return(0,Qt.jsxs)("div",{className:"rd-checklist","data-rd-checklist":"",children:[(0,Qt.jsxs)("div",{className:"rd-checklist-row","data-rd-checklist-only":"",children:[(0,Qt.jsx)("span",{className:"rd-checklist-mark rd-checklist-mark-warn","aria-hidden":"true",children:"!"}),(0,Qt.jsxs)("span",{children:[(0,Qt.jsxs)("b",{children:[t.chainName," ",t.symbol," only"]})," \xB7 ",(0,Qt.jsxs)("b",{className:"rd-checklist-accent",children:[e.min," ",e.symbol," minimum"]})]})]}),(0,Qt.jsxs)("div",{className:"rd-checklist-row",children:[(0,Qt.jsx)("span",{className:"rd-checklist-mark","aria-hidden":"true",children:"\u21BB"}),(0,Qt.jsx)("span",{children:"Reusable \u2014 deposit as many times as you like"})]}),n&&(0,Qt.jsxs)("div",{className:"rd-checklist-row rd-checklist-credit","data-rd-checklist-credit":"",children:[(0,Qt.jsx)("span",{className:"rd-checklist-mark","aria-hidden":"true",children:"\u2192"}),(0,Qt.jsx)("span",{children:"Credited to your ONEchain wallet"})]})]})}var xo=require("react");var za="0x0000000000000000000000000000000000000000",Hx=/^0x[0-9a-fA-F]{40}$/;function bt(e){return Hx.test(e)}function pn(e,t){let n=e<0n,o=(n?-e:e).toString().padStart(t+1,"0"),a=t===0?o:o.slice(0,-t),i=t===0?"":o.slice(-t).replace(/0+$/,""),s=i?`${a}.${i}`:a;return n?`-${s}`:s}function Ds(e,t){let n=e.match(/^(-?)(\d+)(?:\.(\d+))?$/);if(!n)throw new Error(`parseUnits: invalid decimal string "${e}"`);let[,r,o,a=""]=n;if(a.length>t)throw new Error(`parseUnits: too many decimal places for ${t} decimals`);let i=BigInt(o+a.padEnd(t,"0"));return r==="-"?-i:i}var Qr=require("react");var Gd="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTQwIDU0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzc0MDAwXzM4NTkwKSI+CjxtYXNrIGlkPSJtYXNrMF83NDAwMF8zODU5MCIgc3R5bGU9Im1hc2stdHlwZTpsdW1pbmFuY2UiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiIHg9IjAiIHk9IjAiIHdpZHRoPSI1NDAiIGhlaWdodD0iNTQwIj4KPHBhdGggZD0iTTI3MCAwQzU2Ljg1NjMgMCAwIDU2Ljg1NjMgMCAyNzBDMCA0ODMuMTQ0IDU2Ljg1NjMgNTQwIDI3MCA1NDBDNDgzLjE0NCA1NDAgNTQwIDQ4My4xNDQgNTQwIDI3MEM1NDAgNTYuODU2MyA0ODMuMTQ0IDAgMjcwIDBaIiB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RbCiWi44EAYHKRoOXykdMDa5samCp6KoCbTYCbGwpgYG2NkrIyZseuz5u0fuA48I//jsP1f4BDIQ6FEXvnEbzeJJT+SARgLY2JsjNG8MLv/uOjW7xW5hMmnT9t74DZor5CQzgPFCOPaDJnpMw5Og/YNVuyiTaRpelXrJjN94BAuQ1pTFHQsXU72hp+2TjLTB+7gMEjxm4kGN7cuQtMHzoIU2dTrywzKbzLTB44Ude5SbHRN0YpiuNfzltD0eR2OghRRuoOVnCsGHJM3ZKbPGDgJUuSGDa8qW09Sft5Nlsz0gQO4CFLEeb1ecgg11vySmT7YHNsHKQyj/TplrhWf6ARbMtMHG2Nrf9F1qV+7UFaQF2zITB9si42DFP6xfufizWRF+TAeMtMHW2LTIEU+rNwl+wsh70QjMn2wHTYMUuQfCjsWbSn7wFeEqIl/SmT6TMRW2CxIkf+gemaYjNC7JZHpg02wDTYKUrQ+rHVZxVJynXu0PJ8LmXPasZDnYANsgU2CFG0DhVdkCsKMm+J2JOZi5szcgxRt/SKnaPeCTiU3eqrS6r2KKHNjjkGK9of1Lu73r/W79OpQ2KXkHHk+o7G7CGNuKxLxXMbM2JkDc2FOQYoUAOx2049/l4Cd3UQs10mS60vhtfzsPBLxbMbE2BgjY2XMQYoU2UIavS+2XseiDaQQ+d4iovOpeB8W5WkM3YazDIQ7K/zsRn4Xv5PfzRgYC2MKUqSIs1tC4dWZZTl4UVtZ9q7HiUehi/h775H//4aI7z0OZ5LeVJvNw/fyM/wsn8Fn8Zl8Nr+D36Wvsp/if7BfCn8ECvocAAAAAElFTkSuQmCC";function nh(e){switch(e.toUpperCase()){case"ONEUSD":return Gd;case"PONEUSD":return _x;case"USDT":return Qx;case"USDC":return Vx;default:return}}var H=require("react/jsx-runtime");function rh(e){let t=e.trim();return t?t.slice(0,2).toUpperCase():"?"}function qx({size:e,bg:t,fg:n="#ffffff",children:r}){return(0,H.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",style:{display:"block",flex:"none",borderRadius:"50%"},children:[(0,H.jsx)("circle",{cx:"12",cy:"12",r:"12",fill:t}),(0,H.jsx)("g",{fill:n,stroke:n,children:r})]})}function Hd({size:e,bg:t,fg:n="#ffffff",text:r}){return(0,H.jsx)(qx,{size:e,bg:t,fg:n,children:(0,H.jsx)("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",fontSize:"10",fontWeight:700,fontFamily:"inherit",stroke:"none",fill:n,children:r})})}function Ho({size:e,viewBox:t="0 0 24 24",children:n}){return(0,H.jsx)("svg",{width:e,height:e,viewBox:t,"aria-hidden":"true",focusable:"false",style:{display:"block",flex:"none",borderRadius:"50%"},children:n})}function Yx({size:e}){let t=(0,Qr.useId)();return(0,H.jsxs)(Ho,{size:e,children:[(0,H.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,H.jsx)("path",{fill:"#000",d:"M24 0H0v24h24z"}),(0,H.jsx)("path",{fill:"#8FFCF3",d:"M12 4v5.912l5 2.237z"}),(0,H.jsx)("path",{fill:"#CABCF8",d:"m12 4-5 8.148 5-2.235z"}),(0,H.jsx)("path",{fill:"#CBA7F5",d:"M12 15.98V20l5-6.92z"}),(0,H.jsx)("path",{fill:"#74A0F3",d:"M12 20v-4.02l-5-2.9z"}),(0,H.jsx)("path",{fill:"#CBA7F5",d:"m12 15.049 5-2.9-5-2.236z"}),(0,H.jsx)("path",{fill:"#74A0F3",d:"m7 12.149 5 2.9V9.913z"}),(0,H.jsx)("path",{fill:"#202699",fillRule:"evenodd",clipRule:"evenodd",d:"m12 15.048-5-2.9L12 4l5 8.148zm-4.67-3.136 4.588-7.475v5.435zm-.068.204 4.656-2.068v4.768zm4.816-2.068v4.768l4.653-2.7zm0-.176 4.588 2.04-4.588-7.475z"}),(0,H.jsx)("path",{fill:"#202699",fillRule:"evenodd",clipRule:"evenodd",d:"m12 15.917-5-2.84L12 20l5-6.924zm-4.44-2.341 4.36 2.48v3.56zm4.519 2.48v3.56l4.36-6.04z"})]}),(0,H.jsx)("defs",{children:(0,H.jsx)("clipPath",{id:t,children:(0,H.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function Kx({size:e}){let t=(0,Qr.useId)();return(0,H.jsxs)(Ho,{size:e,children:[(0,H.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,H.jsx)("path",{fill:"#F0B90B",d:"M24 0H0v24h24z"}),(0,H.jsx)("path",{fill:"#fff",d:"M7.635 6.449 12 4l4.364 2.449-1.6.907L12 5.809 9.24 7.356zm8.73 3.093-1.6-.906L12 10.182 9.24 8.636l-1.605.906v1.81l2.756 1.546v3.089l1.609.906 1.604-.906v-3.09l2.76-1.546zm0 4.903V12.63l-1.6.907v1.809zm1.141.64-2.76 1.542v1.813l4.365-2.453v-4.898l-1.605.902zm-1.604-7.09 1.6.907v1.81l1.609-.903V7.996l-1.605-.907L15.902 8zm-5.511 9.29v1.808L12 20l1.604-.907V17.29l-1.604.9-1.605-.907zM7.635 14.44l1.6.907v-1.81l-1.6-.906v1.813zm2.756-6.444L12 8.902l1.604-.906L12 7.089 10.395 8zm-3.898.906 1.605-.906-1.6-.907L4.888 8v1.813l1.605.903zm0 3.09-1.604-.903v4.898l4.364 2.453v-1.818L6.498 15.08v-3.093z"})]}),(0,H.jsx)("defs",{children:(0,H.jsx)("clipPath",{id:t,children:(0,H.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function Zx({size:e}){let t=(0,Qr.useId)();return(0,H.jsxs)(Ho,{size:e,viewBox:"0 0 111 111",children:[(0,H.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,H.jsx)("path",{fill:"#fff",d:"M0 0h111v111H0z"}),(0,H.jsx)("path",{fill:"#0052FF",d:"M54.921 110.034C85.359 110.034 110.034 85.402 110.034 55.017C110.034 24.6319 85.359 0 54.921 0C26.0432 0 2.35281 22.1714 0 50.3923H72.8467V59.6416H0C2.35281 87.8625 26.0432 110.034 54.921 110.034Z"})]}),(0,H.jsx)("defs",{children:(0,H.jsx)("clipPath",{id:t,children:(0,H.jsx)("path",{fill:"#fff",d:"M0 0h111v111H0z"})})})]})}function Xx({size:e}){let t=(0,Qr.useId)();return(0,H.jsxs)(Ho,{size:e,children:[(0,H.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,H.jsx)("path",{fill:"#213147",d:"M24 0H0v24h24z"}),(0,H.jsxs)("g",{transform:"translate(12 12) scale(1.28) translate(-12 -12)",children:[(0,H.jsx)("path",{fill:"#fff",d:"m13.203 13.216-.787 2.124a.27.27 0 0 0 0 .183l1.354 3.655 1.565-.89-1.879-5.072c-.042-.117-.21-.117-.253 0m1.577-3.573a.135.135 0 0 0-.253 0l-.787 2.124a.27.27 0 0 0 0 .183l2.217 5.985 1.565-.89z"}),(0,H.jsx)("path",{fill:"#fff",d:"M11.999 4.991a.24.24 0 0 1 .111.03l5.969 3.393a.22.22 0 0 1 .112.19v6.787a.22.22 0 0 1-.112.19l-5.969 3.395a.2.2 0 0 1-.111.029.24.24 0 0 1-.113-.03l-5.968-3.39a.22.22 0 0 1-.112-.19v-6.79a.22.22 0 0 1 .112-.19l5.969-3.393a.23.23 0 0 1 .111-.03m0-.991c-.213 0-.426.054-.616.163L5.416 7.556a1.21 1.21 0 0 0-.616 1.05v6.787c0 .433.234.834.616 1.05l5.968 3.394a1.25 1.25 0 0 0 1.232 0l5.968-3.394a1.21 1.21 0 0 0 .616-1.05V8.606a1.21 1.21 0 0 0-.616-1.05l-5.97-3.393A1.24 1.24 0 0 0 11.998 4"}),(0,H.jsx)("path",{fill:"#fff",d:"m8.052 17.943.55-1.482 1.105.905-1.034.93zm3.445-9.823H9.984a.27.27 0 0 0-.254.175l-3.243 8.757 1.565.89L11.623 8.3a.132.132 0 0 0-.127-.179"}),(0,H.jsx)("path",{fill:"#fff",d:"M14.144 8.12h-1.513a.27.27 0 0 0-.253.175l-3.704 10 1.565.89 4.032-10.886a.133.133 0 0 0-.127-.179"})]})]}),(0,H.jsx)("defs",{children:(0,H.jsx)("clipPath",{id:t,children:(0,H.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function Jx({size:e}){let t=(0,Qr.useId)(),n=(0,Qr.useId)();return(0,H.jsxs)(Ho,{size:e,children:[(0,H.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,H.jsx)("path",{fill:`url(#${n})`,d:"M24 0H0v24h24z"}),(0,H.jsx)("path",{fill:"#fff",d:"m15.88 14.86 3.794-2.165a.64.64 0 0 0 .326-.558v-4.33a.64.64 0 0 0-.326-.556L15.88 5.086a.66.66 0 0 0-.65 0L11.432 7.25a.64.64 0 0 0-.325.557v7.737l-2.662 1.517-2.661-1.517v-3.036l2.661-1.517 1.755 1.001V9.958l-1.43-.816a.66.66 0 0 0-.65 0l-3.796 2.165a.64.64 0 0 0-.325.557v4.33c0 .229.124.442.325.557l3.796 2.165c.2.114.45.114.65 0l3.796-2.165a.64.64 0 0 0 .325-.557V8.455l.048-.026 2.613-1.49 2.661 1.516v3.036l-2.661 1.517-1.753-.999v2.037l1.427.814a.66.66 0 0 0 .651 0z"})]}),(0,H.jsxs)("defs",{children:[(0,H.jsxs)("linearGradient",{id:n,x1:"3.948",x2:"19.217",y1:"16.617",y2:"7.645",gradientUnits:"userSpaceOnUse",children:[(0,H.jsx)("stop",{stopColor:"#A726C1"}),(0,H.jsx)("stop",{offset:".88",stopColor:"#803BDF"}),(0,H.jsx)("stop",{offset:"1",stopColor:"#7B3FE4"})]}),(0,H.jsx)("clipPath",{id:t,children:(0,H.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})]})]})}function $x({size:e}){let t=(0,Qr.useId)();return(0,H.jsxs)(Ho,{size:e,children:[(0,H.jsx)("path",{fill:"#000",d:"M24 0H0v24h24z"}),(0,H.jsx)("g",{transform:"translate(5 5.9) scale(0.1386)",children:(0,H.jsx)("path",{fill:`url(#${t})`,d:"M100.48 69.3817L83.8068 86.8015C83.4444 87.1799 83.0058 87.4816 82.5185 87.6878C82.0312 87.894 81.5055 88.0003 80.9743 88H1.93563C1.55849 88 1.18957 87.8926 0.874202 87.6912C0.558829 87.4897 0.31074 87.2029 0.160416 86.8659C0.0100923 86.529 -0.0359181 86.1566 0.0280382 85.7945C0.0919944 85.4324 0.263131 85.0964 0.520422 84.8278L17.2061 67.408C17.5676 67.0306 18.0047 66.7295 18.4904 66.5234C18.9762 66.3172 19.5002 66.2104 20.0301 66.2095H99.0644C99.4415 66.2095 99.8104 66.3169 100.126 66.5183C100.441 66.7198 100.689 67.0067 100.84 67.3436C100.99 67.6806 101.036 68.0529 100.972 68.415C100.908 68.7771 100.737 69.1131 100.48 69.3817ZM83.8068 34.3032C83.4444 33.9248 83.0058 33.6231 82.5185 33.4169C82.0312 33.2108 81.5055 33.1045 80.9743 33.1048H1.93563C1.55849 33.1048 1.18957 33.2121 0.874202 33.4136C0.558829 33.6151 0.31074 33.9019 0.160416 34.2388C0.0100923 34.5758 -0.0359181 34.9482 0.0280382 35.3103C0.0919944 35.6723 0.263131 36.0083 0.520422 36.277L17.2061 53.6968C17.5676 54.0742 18.0047 54.3752 18.4904 54.5814C18.9762 54.7875 19.5002 54.8944 20.0301 54.8952H99.0644C99.4415 54.8952 99.8104 54.7879 100.126 54.5864C100.441 54.3849 100.689 54.0981 100.84 53.7612C100.99 53.4242 101.036 53.0518 100.972 52.6897C100.908 52.3277 100.737 51.9917 100.48 51.723L83.8068 34.3032ZM1.93563 21.7905H80.9743C81.5055 21.7907 82.0312 21.6845 82.5185 21.4783C83.0058 21.2721 83.4444 20.9704 83.8068 20.592L100.48 3.17219C100.737 2.90357 100.908 2.56758 100.972 2.2055C101.036 1.84342 100.99 1.47103 100.84 1.13408C100.689 0.79713 100.441 0.510296 100.126 0.308823C99.8104 0.107349 99.4415 1.24074e-05 99.0644 0L20.0301 0C19.5002 0.000878397 18.9762 0.107699 18.4904 0.313848C18.0047 0.519998 17.5676 0.821087 17.2061 1.19848L0.524723 18.6183C0.267681 18.8866 0.0966198 19.2223 0.0325185 19.5839C-0.0315829 19.9456 0.0140624 20.3177 0.163856 20.6545C0.31365 20.9913 0.561081 21.2781 0.875804 21.4799C1.19053 21.6817 1.55886 21.7896 1.93563 21.7905Z"})}),(0,H.jsx)("defs",{children:(0,H.jsxs)("linearGradient",{id:t,x1:"8.52558",y1:"90.0973",x2:"88.9933",y2:"-3.01622",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(5 5.9) scale(0.1386)",children:[(0,H.jsx)("stop",{offset:"0.08",stopColor:"#9945FF"}),(0,H.jsx)("stop",{offset:"0.3",stopColor:"#8752F3"}),(0,H.jsx)("stop",{offset:"0.5",stopColor:"#5497D5"}),(0,H.jsx)("stop",{offset:"0.6",stopColor:"#43B4CA"}),(0,H.jsx)("stop",{offset:"0.72",stopColor:"#28E0B9"}),(0,H.jsx)("stop",{offset:"0.97",stopColor:"#19FB9B"})]})})]})}function Ps({chainId:e,chainName:t,size:n=20}){switch(e){case 1:return(0,H.jsx)(Yx,{size:n});case 56:return(0,H.jsx)(Kx,{size:n});case 8453:return(0,H.jsx)(Zx,{size:n});case 42161:return(0,H.jsx)(Xx,{size:n});case 137:return(0,H.jsx)(Jx,{size:n});case 792703809:return(0,H.jsx)($x,{size:n});case 612055:return(0,H.jsx)(Hd,{size:n,bg:"#0b1f3a",text:"CR"});default:return(0,H.jsx)(Hd,{size:n,bg:"#676b7a",text:rh(t??String(e))})}}function yo({symbol:e,logoUrl:t,size:n=20}){let r=t&&t.trim().length>0?t.trim():nh(e);return r?(0,H.jsx)("img",{src:r,alt:"","aria-hidden":"true",width:n,height:n,style:{display:"block",flex:"none",borderRadius:"50%",objectFit:"cover"}}):(0,H.jsx)(Hd,{size:n,bg:"#676b7a",text:rh(e)})}var oh=require("qrcode.react"),we=require("react/jsx-runtime");function Os(){return(0,we.jsxs)("div",{className:"rd-deposit-head","data-testid":"rd-address-skeleton","aria-hidden":"true",children:[(0,we.jsx)("span",{className:"rd-skeleton rd-skeleton-qr"}),(0,we.jsx)("span",{className:"rd-skeleton rd-skeleton-address"})]})}function ev(e){let{depositAddress:t,originChainId:n,originCurrency:r,amountWei:o,isNative:a}=e;if(a)return o!==void 0?`ethereum:${t}@${n}?value=${o.toString()}`:`ethereum:${t}@${n}`;let i=new URLSearchParams({address:t});return o!==void 0&&i.set("uint256",o.toString()),`ethereum:${r}@${n}/transfer?${i.toString()}`}function tv(e){let{depositAddress:t,splMint:n,humanAmount:r}=e,o=new URLSearchParams;return r&&o.set("amount",r),o.set("spl-token",n),`solana:${t}?${o.toString()}`}function ah({depositAddress:e,originChainId:t,originChainName:n,originCurrency:r,amount:o,tokenSymbol:a,tokenDecimals:i,kind:s="evm",depositState:l,onDeposit:d,canDeposit:p,oneClickEnabled:w=!0}){let[u,h]=(0,xo.useState)(!1),[x,y]=(0,xo.useState)("address"),f=(0,xo.useId)();(0,xo.useEffect)(()=>{y("address")},[e]);let c=r.toLowerCase()===za,b=s==="svm";async function g(){try{await navigator.clipboard.writeText(e),h(!0),setTimeout(()=>h(!1),1500)}catch{}}let v;if(o)try{let A=BigInt(o);A>0n&&(v=A)}catch{}let C=v!==void 0,N;if(C)try{N=pn(v,i)}catch{N=o}let I=b?tv({depositAddress:e,splMint:r,humanAmount:N??""}):ev({depositAddress:e,originChainId:t,originCurrency:r,amountWei:v,isNative:c}),{isSubmitting:R,isConfirming:S,isConfirmed:E,needsSwitch:M,txHash:z,reverted:L,error:G}=l;return(0,we.jsxs)("section",{className:"rd-stack",children:[(0,we.jsxs)("div",{className:"rd-deposit-head","data-compact-view":x,children:[(0,we.jsxs)("div",{className:"rd-deposit-qr-pane",children:[(0,we.jsxs)("div",{className:"rd-deposit-qr",children:[(0,we.jsx)(oh.QRCodeSVG,{value:I,size:144,level:"H"}),(0,we.jsx)("span",{className:"rd-deposit-qr-badge","aria-hidden":"true",children:(0,we.jsx)(Ps,{chainId:t,chainName:n,size:28})})]}),(0,we.jsx)("button",{type:"button",className:"rd-mobile-address-toggle","aria-label":"Show address and copy",onClick:()=>y("address"),children:(0,we.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,we.jsx)("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2.25",stroke:"currentColor",strokeWidth:"1.8"}),(0,we.jsx)("path",{d:"M16 8V6.25A2.25 2.25 0 0 0 13.75 4h-7.5A2.25 2.25 0 0 0 4 6.25v7.5A2.25 2.25 0 0 0 6.25 16H8",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]})})]}),(0,we.jsxs)("div",{className:"rd-deposit-address",children:[(0,we.jsx)("span",{className:"rd-deposit-address-label",children:(0,we.jsxs)("button",{type:"button",className:"rd-address-term","aria-describedby":f,children:["Deposit address",(0,we.jsx)("span",{id:f,className:"rd-address-tooltip",role:"tooltip",children:"This is a reusable, open deposit address. A wrong token or wrong chain will not be processed automatically, and recovery has weaker guarantees than a one-time order address and may require a manual request."})]})}),(0,we.jsx)("button",{type:"button",className:"rd-mobile-qr-toggle","aria-label":"Show deposit QR code","aria-pressed":x==="qr",onClick:()=>y("qr"),children:(0,we.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:(0,we.jsx)("path",{d:"M7.913 10.833c.69 0 1.25.56 1.25 1.25v4.163c0 .69-.56 1.25-1.25 1.25H3.75c-.69 0-1.25-.56-1.25-1.25v-4.163c0-.69.56-1.25 1.25-1.25h4.163Zm6.255 6.663h-1.665V15.83h1.665v1.666Zm3.332 0h-1.666V15.83H17.5v1.666Zm-13.334-5v3.334h3.331v-3.333H4.166Zm8.337 3.334h-1.666v-1.666h1.666v1.666Zm3.331 0h-1.666v-1.666h1.666v1.666Zm-1.666-1.666h-1.665v-1.667h1.665v1.667Zm3.332 0h-1.666v-1.667H17.5v1.667Zm-4.997-1.667h-1.666v-1.664h1.666v1.664Zm3.331 0h-1.666v-1.664h1.666v1.664ZM7.913 2.504c.69 0 1.25.56 1.25 1.25v4.163c0 .69-.56 1.25-1.25 1.25H3.75c-.69 0-1.25-.56-1.25-1.25V3.754c0-.69.56-1.25 1.25-1.25h4.163Zm8.329 0c.69 0 1.25.56 1.25 1.25v4.163c0 .69-.56 1.25-1.25 1.25h-4.163c-.69 0-1.25-.56-1.25-1.25V3.754c0-.69.56-1.25 1.25-1.25h4.163ZM4.166 4.17V7.5h3.331V4.17H4.166Zm8.329 0V7.5h3.331V4.17h-3.331Z",fill:"currentColor"})})}),(0,we.jsx)("span",{className:"rd-address-full",title:e,children:e}),(0,we.jsxs)("button",{type:"button",className:"rd-address-copy",onClick:g,"aria-label":`Copy deposit address ${e}`,children:[u?(0,we.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,we.jsx)("path",{d:"m5 12 4 4L19 6",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}):(0,we.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,we.jsx)("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.8"}),(0,we.jsx)("path",{d:"M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]}),(0,we.jsx)("span",{"aria-live":"polite",children:u?"Copied":"Copy address"})]})]})]}),!b&&p&&(0,we.jsxs)(we.Fragment,{children:[(0,we.jsx)("button",{type:"button",className:"rd-button-primary rd-button-block",onClick:d,disabled:R||S||E&&!L,children:E&&!L?"Deposit sent":S?"Confirming...":R?M?"Switching network...":"Confirm in wallet...":`One-click deposit ${a}${M?` (switch to ${n})`:""}`}),G&&(0,we.jsx)("div",{className:"rd-callout rd-callout-danger",children:G}),z&&(0,we.jsxs)("p",{className:"rd-card-hint",children:["Tx: ",(0,we.jsx)("span",{style:{fontFamily:"monospace"},children:z})]}),E&&L&&(0,we.jsx)("div",{className:"rd-callout rd-callout-danger",children:"The deposit transaction reverted on-chain. Please check your wallet and try again."}),E&&!L&&(0,we.jsx)("div",{className:"rd-callout rd-callout-success",children:"Deposit confirmed on-chain. Waiting for it to be swept..."})]}),b&&(0,we.jsxs)("div",{className:"rd-callout rd-callout-muted",children:["Pay from a Solana wallet (e.g. Phantom). Scan the QR or copy the address above and send"," ",C?(0,we.jsxs)(we.Fragment,{children:["exactly"," ",(0,we.jsxs)("strong",{children:[N," ",a]})]}):(0,we.jsxs)(we.Fragment,{children:["any amount of ",(0,we.jsx)("strong",{children:a})]}),"."]}),(C||!b&&!p&&w)&&(0,we.jsxs)("p",{className:"rd-card-hint",children:[C&&(0,we.jsxs)(we.Fragment,{children:["Send exactly"," ",(0,we.jsxs)("strong",{children:[N," ",a]})," ","on ",n," to this address."]}),!b&&!p&&w&&!C&&"Enter an amount to deposit in one click."]})]})}var er=require("react"),Vr=_(require("@radix-ui/react-popover"),1);var bn=require("react/jsx-runtime");function Fa({value:e,options:t,onChange:n,disabled:r,ariaLabel:o,id:a}){let i=(0,er.useId)(),s=a??i,l=`${s}-listbox`,[d,p]=(0,er.useState)(!1),w=t.findIndex(E=>E.value===e),[u,h]=(0,er.useState)(w>=0?w:0),x=(0,er.useRef)(null),y=(0,er.useRef)([]),f=!!r||t.length===0,c=w>=0?t[w]:void 0;(0,er.useEffect)(()=>{d&&y.current[u]?.scrollIntoView?.({block:"nearest"})},[d,u]);let[b,g]=(0,er.useState)(null);function v(){f||(g(x.current?.closest("[data-theme]")?.getAttribute("data-theme")??null),h(w>=0?w:0),p(!0))}function C(E){p(!1),E&&x.current?.focus()}function N(E){let M=t[E];M&&(n(M.value),C(!0))}function I(){f||(d?C(!1):v())}function R(E){if(!f)switch(E.key){case"ArrowDown":E.preventDefault(),d?h(M=>Math.min(M+1,t.length-1)):v();break;case"ArrowUp":E.preventDefault(),d?h(M=>Math.max(M-1,0)):v();break;case"Enter":case" ":E.preventDefault(),d?N(u):v();break;case"Escape":d&&(E.preventDefault(),C(!0));break;case"Tab":d&&p(!1);break;default:break}}let S=d&&t[u]?`${s}-option-${u}`:void 0;return(0,bn.jsx)(Vr.Root,{open:d,onOpenChange:E=>E?v():C(!1),children:(0,bn.jsxs)("div",{className:"rd-dropdown",children:[(0,bn.jsx)(Vr.Trigger,{asChild:!0,children:(0,bn.jsxs)("button",{type:"button",id:s,ref:x,className:"rd-dropdown-trigger","aria-haspopup":"listbox","aria-expanded":d,"aria-controls":l,"aria-activedescendant":S,"aria-label":o,disabled:f,onClick:I,onKeyDown:R,children:[(0,bn.jsxs)("span",{className:"rd-dropdown-trigger-content",children:[c?.icon,(0,bn.jsxs)("span",{className:"rd-dropdown-trigger-label",children:[c?.label??"",c?.subLabel&&(0,bn.jsx)("small",{className:"rd-dropdown-trigger-sub",children:c.subLabel})]})]}),(0,bn.jsx)("span",{className:"rd-dropdown-chevron","aria-hidden":"true",children:(0,bn.jsx)(zn,{size:16})})]})}),d&&(0,bn.jsx)(Vr.Portal,{children:(0,bn.jsx)(Vr.Content,{className:"rd-dropdown-popover","data-theme":b??void 0,side:"bottom",align:"start",sideOffset:5,collisionPadding:12,onOpenAutoFocus:E=>E.preventDefault(),onCloseAutoFocus:E=>E.preventDefault(),children:(0,bn.jsx)("ul",{className:"rd-dropdown-listbox",role:"listbox",id:l,"aria-label":o,tabIndex:-1,"data-vaul-no-drag":!0,children:t.map((E,M)=>{let z=E.value===e,L=M===u;return(0,bn.jsxs)("li",{id:`${s}-option-${M}`,role:"option","aria-selected":z,ref:G=>{y.current[M]=G},className:["rd-dropdown-option",L?"rd-dropdown-option-active":"",z?"rd-dropdown-option-selected":""].filter(Boolean).join(" "),onPointerEnter:()=>h(M),onClick:G=>{G.preventDefault(),N(M)},children:[E.icon,(0,bn.jsx)("span",{className:"rd-dropdown-option-label",children:E.label}),z&&(0,bn.jsx)("span",{className:"rd-dropdown-option-check","aria-hidden":"true",children:"\u2713"})]},E.value)})})})})]})})}var wt=require("react/jsx-runtime");function nv(e,t){if(!e)return"--";try{return pn(BigInt(e),t)}catch{return"--"}}function ih({quote:e,isLoading:t,error:n,humanAmount:r,originSymbol:o,destination:a}){return(0,wt.jsxs)("div",{className:"rd-stack","data-rd-quote-preview":"",children:[t&&(0,wt.jsxs)("div",{className:"rd-quote-strip","data-testid":"rd-quote-skeleton",children:[(0,wt.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"30%"},"aria-hidden":"true"}),(0,wt.jsx)("span",{className:"rd-quote-strip-arrow","aria-hidden":"true",children:"\u2192"}),(0,wt.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"30%"},"aria-hidden":"true"})]}),!t&&n&&(0,wt.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Couldn't fetch a quote: ",n.message]}),!t&&!n&&e&&o&&(0,wt.jsxs)(wt.Fragment,{children:[(0,wt.jsxs)("div",{className:"rd-quote-strip",children:[(0,wt.jsxs)("span",{className:"rd-quote-strip-side",children:[(0,wt.jsxs)("b",{children:[r," ",o]}),(0,wt.jsx)("small",{children:"You send"})]}),(0,wt.jsx)("span",{className:"rd-quote-strip-arrow","aria-hidden":"true",children:"\u2192"}),(0,wt.jsxs)("span",{className:"rd-quote-strip-side rd-quote-strip-end",children:[(0,wt.jsxs)("b",{children:["~",nv(e.expectedCrossd,a.decimals)," ",a.symbol]}),(0,wt.jsx)("small",{children:"You receive"})]})]}),e.belowMin&&(0,wt.jsx)("div",{className:"rd-callout rd-callout-warning",children:"This amount is below the minimum the bridge will accept. Increase the amount to continue."}),(e.assumesParity||e.feeUsd)&&(0,wt.jsxs)("p",{className:"rd-quote-strip-hint",children:[e.feeUsd&&(0,wt.jsxs)(wt.Fragment,{children:["Bridge fee: $",e.feeUsd,", already deducted from the amount above. You also pay your own network fee to send the deposit."," "]}),e.assumesParity&&(0,wt.jsxs)(wt.Fragment,{children:["Assumes 1:1 parity between bridged USDT and ",a.symbol,"; the final amount may differ slightly."]})]})]}),!t&&!n&&!e&&(0,wt.jsx)("p",{className:"rd-muted",children:"Enter an amount to see a quote."})]})}var _d=require("react");var sh={1:{base:"https://etherscan.io",name:"Etherscan",kind:"evm"},56:{base:"https://bscscan.com",name:"BscScan",kind:"evm"},137:{base:"https://polygonscan.com",name:"PolygonScan",kind:"evm"},8453:{base:"https://basescan.org",name:"BaseScan",kind:"evm"},42161:{base:"https://arbiscan.io",name:"Arbiscan",kind:"evm"},612055:{base:"https://scan.crosstoken.io",name:"ONEchain Scan",kind:"evm"},792703809:{base:"https://solscan.io",name:"Solscan",kind:"svm"}};function lh(e,t){let n=sh[e];if(!(!n||!t))return{url:`${n.base}/token/${t}`,name:n.name}}var rv={1:"Ethereum",56:"BNB Smart Chain",137:"Polygon",8453:"Base",42161:"Arbitrum",612055:"ONEchain",792703809:"Solana"};function _o(e){return rv[e]??`Chain ${e}`}function Bs(e,t){let n=sh[e];if(!(!n||!t))return{url:`${n.base}/tx/${t}`,name:n.name}}var Ft=require("react/jsx-runtime");function ov(e){let t=new Map;for(let n of e.origins)t.has(n.chainId)||t.set(n.chainId,n.chainName);return Array.from(t,([n,r])=>({chainId:n,chainName:r}))}function dh(e,t){return t===void 0?[]:e.origins.filter(n=>n.chainId===t)}function av(e,t){let n=pn(e,t),r=n.indexOf(".");return r===-1?n:`${n.slice(0,r)}.${n.slice(r+1,r+1+4)}`.replace(/\.?0+$/,"")||n.slice(0,r)}function ch({catalog:e,origin:t,onChangeOrigin:n,amount:r,onChangeAmount:o,showAmountInput:a=!0,balance:i,balanceLoading:s,insufficientBalance:l,onMax:d,disabled:p}){let w=(0,_d.useMemo)(()=>ov(e),[e]),u=(0,_d.useMemo)(()=>dh(e,t?.chainId),[e,t?.chainId]);function h(c){let b=Number(c),g=dh(e,b)[0];g&&n(g)}function x(c){let b=u.find(g=>g.token.address.toLowerCase()===c.toLowerCase());b&&n(b)}let y=i?`${av(i.value,i.decimals)} ${i.symbol}`:void 0,f=l?`Amount exceeds your balance${y?` (${y})`:""}`:void 0;return(0,Ft.jsxs)("section",{className:"rd-stack","data-rd-source-form":"",children:[(0,Ft.jsxs)("div",{className:"rd-field",children:[(0,Ft.jsxs)("div",{className:"rd-field-label-row",children:[(0,Ft.jsx)("span",{className:"rd-field-label",children:"From"}),t&&(()=>{let c=lh(t.chainId,t.token.address);return c?(0,Ft.jsxs)("a",{className:"rd-token-explorer-link",href:c.url,target:"_blank",rel:"noopener noreferrer",title:`View ${t.token.symbol} on ${c.name}`,children:[c.name," \u2197"]}):null})()]}),(0,Ft.jsxs)("div",{className:"rd-field-row",children:[(0,Ft.jsx)(Fa,{ariaLabel:"Origin chain",value:t?String(t.chainId):"",onChange:h,disabled:p,options:w.map(c=>({value:String(c.chainId),label:c.chainName,subLabel:"Network",icon:(0,Ft.jsx)(Ps,{chainId:c.chainId,chainName:c.chainName,size:22})}))}),(0,Ft.jsx)(Fa,{ariaLabel:"Token",value:t?.token.address??"",onChange:x,disabled:p||u.length===0,options:u.map(c=>({value:c.token.address,label:c.token.symbol,subLabel:`${c.token.decimals} decimals`,icon:(0,Ft.jsx)(yo,{symbol:c.token.symbol,logoUrl:c.token.logoUrl,size:22})}))})]})]}),a&&(0,Ft.jsxs)("label",{className:"rd-field",children:[(0,Ft.jsx)("span",{className:"rd-field-label",children:"Amount (optional)"}),(0,Ft.jsxs)("div",{className:"rd-amount-input","data-rd-invalid":f?"":void 0,children:[(0,Ft.jsx)("input",{type:"text",inputMode:"decimal",placeholder:"0.0",value:r,onChange:c=>{let b=c.target.value;if(b===""){o(b);return}b.startsWith(".")&&(b=`0${b}`),/^\d*\.?\d{0,4}$/.test(b)&&(b=b.replace(/^0+(?=\d)/,""),!((b.split(".")[0]??"").length>12)&&o(b))},disabled:p||!t,"data-vaul-no-drag":!0}),t&&(0,Ft.jsx)("span",{className:"rd-amount-input-suffix",children:t.token.symbol}),d&&!p&&(0,Ft.jsx)("button",{type:"button",className:"rd-amount-input-max",onClick:d,disabled:p||!t,children:"Max"})]}),(y||s)&&(0,Ft.jsxs)("span",{className:"rd-amount-meta",children:[(0,Ft.jsx)("span",{}),(0,Ft.jsx)("span",{children:s?"Balance: \u2026":y?`Balance: ${y}`:""})]}),f&&(0,Ft.jsx)("span",{className:"rd-callout rd-callout-danger",children:f})]})]})}var fe=require("react/jsx-runtime");function ph({catalog:e,origin:t,onChangeOrigin:n,amount:r,onChangeAmount:o,showAmountInput:a,minNotice:i,amountHint:s,onMax:l,recipient:d,onChangeRecipient:p,showRecipientInput:w,recipientValid:u,balance:h,balanceLoading:x,insufficientBalance:y,targetOptions:f,selectedTarget:c,onChangeTarget:b,showTargetSelector:g,quote:v,quoteLoading:C,quoteError:N,depositAddress:I,depositAddressLoading:R,depositAddressError:S,arrivalStatus:E,amountSmallestUnits:M,depositState:z,onDeposit:L,canDeposit:G,oneClickEnabled:A,locked:j,onRequestConnect:le}){let oe=f.length>1&&g,{phase:ne,isSubmitting:V,isConfirming:ee,isConfirmed:F,needsSwitch:q,reverted:ae,error:X}=z,me=c?.symbol??e.destination.symbol;return(0,fe.jsxs)(fe.Fragment,{children:[i&&(0,fe.jsx)(eh,{minNotice:i,arrivalStatus:E}),j?(0,fe.jsxs)("section",{className:"rd-locked-card","data-rd-locked":"",children:[(0,fe.jsx)("span",{className:"rd-locked-glyph","aria-hidden":"true",children:(0,fe.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[(0,fe.jsx)("path",{d:"M4 7.5A2.5 2.5 0 0 1 6.5 5h10A2.5 2.5 0 0 1 19 7.5v9a2.5 2.5 0 0 1-2.5 2.5h-10A2.5 2.5 0 0 1 4 16.5v-9Z",stroke:"currentColor",strokeWidth:"1.7"}),(0,fe.jsx)("path",{d:"M4 9h15",stroke:"currentColor",strokeWidth:"1.7"}),(0,fe.jsx)("path",{d:"M15 11.5h5v4h-5a2 2 0 0 1 0-4Z",fill:"currentColor",opacity:"0.18",stroke:"currentColor",strokeWidth:"1.5"}),(0,fe.jsx)("circle",{cx:"15.7",cy:"13.5",r:"0.8",fill:"currentColor"})]})}),(0,fe.jsx)("h3",{className:"rd-locked-title",children:"Connect your wallet"}),(0,fe.jsx)("p",{className:"rd-locked-text",children:"Connect to get your personal deposit address."}),w&&(0,fe.jsx)("p",{className:"rd-card-hint",children:"Or enter a recipient address to get one without connecting."}),le&&(0,fe.jsxs)("button",{type:"button",className:"rd-button-primary rd-locked-action","data-track":"connect",onClick:le,children:[(0,fe.jsxs)("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,fe.jsx)("path",{d:"M5 6.5h11.5A2.5 2.5 0 0 1 19 9v8.5H7A3 3 0 0 1 4 14.5v-8A2.5 2.5 0 0 1 6.5 4H16",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"}),(0,fe.jsx)("path",{d:"M15 10.5h5v4h-5a2 2 0 0 1 0-4Z",stroke:"currentColor",strokeWidth:"1.8"})]}),"Connect Wallet"]})]}):I?(0,fe.jsx)(ah,{depositAddress:I,originChainId:t.chainId,originChainName:t.chainName,originCurrency:t.token.address,amount:M,tokenSymbol:t.token.symbol,tokenDecimals:t.token.decimals,depositState:z,onDeposit:L,canDeposit:G,oneClickEnabled:A}):R?(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(Os,{}),A&&M&&(0,fe.jsx)("span",{className:"rd-skeleton rd-skeleton-cta","aria-hidden":"true"}),(0,fe.jsx)("p",{className:"rd-sr-only",role:"status",children:"Preparing your deposit address..."})]}):S?(0,fe.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Couldn't fetch a deposit address: ",S.message]}):null,(0,fe.jsx)(ch,{catalog:e,origin:t,onChangeOrigin:n,amount:r,onChangeAmount:o,showAmountInput:a,balance:h,balanceLoading:x,insufficientBalance:y,onMax:l}),(0,fe.jsxs)("div",{className:"rd-field","data-rd-delivery":"",children:[(0,fe.jsx)("span",{className:"rd-field-label",children:"Deliver as"}),oe?(0,fe.jsx)(Fa,{ariaLabel:"Delivery token",value:c?.symbol??"",onChange:b,options:f.map(ke=>({value:ke.symbol,label:ke.symbol,subLabel:"on ONEchain",icon:(0,fe.jsx)(yo,{symbol:ke.symbol,size:22})}))}):(0,fe.jsxs)("div",{className:"rd-static-target",children:[(0,fe.jsx)(yo,{symbol:me,size:22}),(0,fe.jsx)("span",{children:me})]}),w&&(0,fe.jsxs)("label",{className:"rd-delivery-recipient",children:[(0,fe.jsx)("input",{type:"text",placeholder:"0x...","aria-label":"ONEchain recipient address",value:d,onChange:ke=>p(ke.target.value),"data-vaul-no-drag":!0}),(0,fe.jsx)("span",{className:"rd-card-hint",children:"Defaults to your connected wallet. It can differ from the address you deposit from, and is also used as the refund address if anything goes wrong."}),!u&&(0,fe.jsx)("span",{className:"rd-callout rd-callout-danger",children:"Not a valid address"})]})]}),c?.external&&(0,fe.jsxs)("div",{className:"rd-callout rd-callout-muted",children:["Delivered as ",c.symbol," via an external adapter."]}),s&&(0,fe.jsx)("div",{className:"rd-callout rd-callout-warning","data-rd-amount-hint":"",children:s}),r.trim()&&(0,fe.jsx)(ih,{quote:v,isLoading:C,error:N,humanAmount:r,originSymbol:t.token.symbol,destination:e.destination}),i&&(0,fe.jsx)(th,{minNotice:i,onlySend:{symbol:t.token.symbol,chainName:t.chainName},showWalletCreditNote:!w&&u}),A&&ne!=="idle"&&!G&&(0,fe.jsxs)("div",{className:"rd-card",children:[V&&(0,fe.jsxs)("p",{className:"rd-muted",children:[(0,fe.jsx)("span",{className:"rd-spinner"})," ",q?"Switching network...":"Confirm in wallet..."]}),ee&&(0,fe.jsxs)("p",{className:"rd-muted",children:[(0,fe.jsx)("span",{className:"rd-spinner"})," Confirming..."]}),z.txHash&&(0,fe.jsxs)("p",{className:"rd-card-hint",children:["Tx: ",(0,fe.jsx)("span",{style:{fontFamily:"monospace"},children:z.txHash})]}),F&&ae&&(0,fe.jsx)("div",{className:"rd-callout rd-callout-danger",children:"The deposit transaction reverted on-chain. Please check your wallet and try again."}),F&&!ae&&(0,fe.jsx)("div",{className:"rd-callout rd-callout-success",children:"Deposit confirmed on-chain. Waiting for it to be swept..."}),X&&(0,fe.jsx)("div",{className:"rd-callout rd-callout-danger",children:X})]})]})}var tr=require("react"),fh=require("react-dom");var Z=require("react/jsx-runtime");function ja({requiresIdentity:e=!1}){return(0,Z.jsxs)("div",{className:"rd-history-empty",role:"status","data-variant":e?"disconnected":"empty","data-testid":e?"rd-history-empty-state":"rd-history-no-transfers",children:[(0,Z.jsx)("span",{className:"rd-history-empty-icon","aria-hidden":"true",children:(0,Z.jsxs)("svg",{width:"34",height:"34",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[(0,Z.jsx)("path",{d:"M7 3.8h7l3 3V12M7 3.8A2.2 2.2 0 0 0 4.8 6v12A2.2 2.2 0 0 0 7 20.2h5",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Z.jsx)("path",{d:"M14 3.8V7h3",stroke:"currentColor",strokeWidth:"1.7",strokeLinejoin:"round"}),(0,Z.jsx)("circle",{cx:"16.5",cy:"16.5",r:"3.7",stroke:"currentColor",strokeWidth:"1.7"}),(0,Z.jsx)("path",{d:"M16.5 14.5v2.2l1.4.8",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,Z.jsx)("h3",{className:"rd-history-empty-title",children:e?"Connect to view history":"No transfers yet"}),(0,Z.jsx)("p",{className:"rd-history-empty-copy",children:e?"Connect a wallet or provide an address to see transfer history.":"Your deposits and their delivery progress will appear here."}),!e&&(0,Z.jsxs)("span",{className:"rd-history-empty-live",children:[(0,Z.jsx)("span",{"aria-hidden":"true"}),"Updates automatically"]})]})}var Ua=56;function mh(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function iv(e){let t=e.trim().toUpperCase(),r={AWAITING_DEPOSIT:"Waiting for deposit",BSC_FUNDED:"Deposit confirmed",RELAY_PENDING:"Bridging",RELAY_SUBMITTED:"Bridging",BRIDGING:"Bridging",CROSS_PENDING:"Delivering",FINALIZING:"Delivering",EXECUTING:"Delivering",COMPLETED:"Completed",RELAY_REFUNDED:"Refunded",REFUNDED:"Refunded",EXPIRED:"Expired",FAILED:"Failed"}[t];if(r)return r;let o=t.toLowerCase().replace(/_/g," ").trim();return o?`${o[0].toUpperCase()}${o.slice(1)}`:"Processing"}function sv(e){return e==="COMPLETED"?"rd-status-pill rd-status-pill-success":mh(e)?"rd-status-pill rd-status-pill-failure":"rd-status-pill"}function zs(e,t){if(e){if(t===void 0)return e;try{return pn(BigInt(e),t)}catch{return e}}}function lv(e,t=4){let n=e.indexOf(".");if(n<0)return e;let r=e.slice(0,n+1+t).replace(/0+$/,"").replace(/\.$/,"");return r===""?"0":r}function dv(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function uh(e){return e.length>14?`${e.slice(0,8)}...${e.slice(-4)}`:e}function Qd({amount:e,symbol:t,className:n}){let r=e?`${e}${t?` ${t}`:""}`:"",o=(0,tr.useId)(),a=(0,tr.useRef)(null),i=(0,tr.useRef)(null),[s,l]=(0,tr.useState)(!1),[d,p]=(0,tr.useState)({top:-9999,left:-9999,visibility:"hidden"});return(0,tr.useEffect)(()=>{if(!s)return;let w=()=>{let u=a.current,h=i.current;if(!u||!h)return;let x=u.getBoundingClientRect(),y=h.getBoundingClientRect(),f=12,c=8,b=Math.max(f,window.innerWidth-y.width-f),g=Math.min(Math.max(x.left+x.width/2-y.width/2,f),b),v=x.top-y.height-c,C=v>=f?v:x.bottom+c,N=Math.max(f,window.innerHeight-y.height-f),I=Math.min(Math.max(C,f),N),R=window.getComputedStyle(u);p({top:I,left:g,visibility:"visible",backgroundColor:R.getPropertyValue("--rd-text").trim()||"#eef0f6",borderColor:R.getPropertyValue("--rd-border").trim()||"#2a2d3a",boxShadow:R.getPropertyValue("--rd-shadow").trim()||"0 8px 24px rgba(0, 0, 0, 0.35)",color:R.getPropertyValue("--rd-surface").trim()||"#171923"})};return w(),window.addEventListener("resize",w),window.addEventListener("scroll",w,!0),()=>{window.removeEventListener("resize",w),window.removeEventListener("scroll",w,!0)}},[s]),e?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)("span",{ref:a,className:n,"aria-label":r,"aria-describedby":s?o:void 0,"data-full-value":r,onMouseEnter:()=>{p({top:-9999,left:-9999,visibility:"hidden"}),l(!0)},onMouseLeave:()=>l(!1),children:[lv(e),t?` ${t}`:""]}),s&&typeof document<"u"&&(0,fh.createPortal)((0,Z.jsx)("span",{ref:i,id:o,role:"tooltip","data-rd-history-floating-tooltip":"",style:d,children:r}),document.body)]}):(0,Z.jsx)("span",{className:n,children:"-"})}function cv(e){let t=(e.deposits??[]).filter(r=>r.originChainId),n=new Set(t.map(r=>`${r.originChainId}:${(r.originCurrency??"").toLowerCase()}`));if(t.length>0){let r=t[0];return{chainId:r.originChainId,currency:r.originCurrency??"",routes:n.size}}return{chainId:e.originChainId,currency:e.originCurrency,routes:1}}function pv(e,t){if(!e)return;let n,r;try{n=BigInt(e),r=t.map(s=>BigInt(s.amount))}catch{return}let o=r.reduce((s,l)=>s+l,0n);if(o<=0n)return;let a=r.map(s=>n*s/o),i=a.reduce((s,l)=>s+l,0n);return a[a.length-1]+=n-i,a}function Fs({label:e,chainId:t,txHash:n,amount:r,shared:o,missingLabel:a="Pending"}){let i=n?Bs(t,n):void 0;return(0,Z.jsxs)("div",{className:"rd-history-step",children:[(0,Z.jsx)("span",{className:`rd-history-step-dot${n?" rd-history-step-dot-done":""}`}),(0,Z.jsx)("span",{className:"rd-history-step-label",children:e}),(0,Z.jsx)("span",{className:"rd-history-step-chain",children:_o(t)}),r&&(0,Z.jsx)(Qd,{amount:r,className:"rd-history-step-amount"}),(0,Z.jsxs)("span",{className:"rd-history-step-tx",children:[i?(0,Z.jsx)("a",{href:i.url,target:"_blank",rel:"noreferrer",title:n,"aria-label":`${e} transaction on ${_o(t)}`,children:uh(n)}):n?(0,Z.jsx)("span",{title:n,children:uh(n)}):(0,Z.jsx)("span",{className:"rd-muted",children:a}),o&&n&&(0,Z.jsx)("span",{className:"rd-history-step-shared",title:"Shared by deposits processed together",children:"combined transfer"})]})]})}function uv(e){let t=e.deposits??[],n=e.amountOut||e.expectedOut||void 0;if(t.length>=2){let i=pv(n,t);if(i)return t.map((s,l)=>({key:`${e.orderId}:${s.txHash}:${s.blockNumber}`,order:e,chainId:s.originChainId??Ua,currency:s.originCurrency??"",routes:1,sentRaw:s.amount,receivedRaw:i[l].toString(),receivedIsEstimate:!0,deposit:s,sharedLegs:!0}))}let{chainId:r,currency:o,routes:a}=cv(e);return[{key:e.orderId,order:e,chainId:r,currency:o,routes:a,sentRaw:e.amountIn,receivedRaw:n,receivedIsEstimate:!e.amountOut&&!!e.expectedOut,sharedLegs:!1}]}function Us({orders:e,isLoading:t,error:n,catalog:r,showTitle:o=!0}){let[a,i]=(0,tr.useState)({}),s=l=>i(d=>({...d,[l]:!d[l]}));return(0,Z.jsxs)("section",{className:o?"rd-card":"rd-stack","data-rd-orders-list":"",children:[o&&(0,Z.jsx)("div",{className:"rd-card-header",children:(0,Z.jsx)("h2",{className:"rd-card-title",children:"Transfer history"})}),t&&e.length===0&&(0,Z.jsxs)("p",{className:"rd-muted",role:"status","aria-live":"polite",children:[(0,Z.jsx)("span",{className:"rd-spinner"})," Loading orders..."]}),n&&(0,Z.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Couldn't load your orders: ",n.message]}),!t&&!n&&e.length===0&&(0,Z.jsx)(ja,{}),e.length>0&&(0,Z.jsx)("div",{className:"rd-history-table","data-vaul-no-drag":!0,children:e.flatMap(uv).map(l=>{let{order:d}=l,p=r?.origins.find(S=>S.chainId===l.chainId&&S.token.address.toLowerCase()===l.currency.toLowerCase()),w=(d.target?r?.targets.find(S=>S.symbol.toLowerCase()===d.target.toLowerCase()):void 0)??r?.targets.find(S=>S.isDefault),u=w?.symbol??r?.destination.symbol??"",h=w?.decimals??r?.destination.decimals,x=r?.origins.find(S=>S.chainId===Ua),y=zs(l.sentRaw,x?.token.decimals),f=x?.token.symbol??"USDT",c=zs(l.receivedRaw,h),b=d.deposits??[],g=!!a[l.key],v=dv(d.completedAt??d.createdAt),C=iv(d.status),I=d.status==="COMPLETED"||mh(d.status)?"Details unavailable":"Pending",R=l.receivedIsEstimate?"Estimated on ONEchain":"Received on ONEchain";return(0,Z.jsxs)("div",{className:"rd-history-group",children:[(0,Z.jsxs)("button",{type:"button",className:"rd-history-row-button",onClick:()=>s(l.key),"aria-expanded":g,"aria-label":`Toggle transfer details: ${C}, ${v}`,children:[(0,Z.jsxs)("span",{className:"rd-history-card-top",children:[(0,Z.jsx)("span",{className:"rd-history-asset",children:l.routes>1?(0,Z.jsxs)(Z.Fragment,{children:["Multiple deposits ",(0,Z.jsxs)("span",{className:"rd-muted",children:["\xB7 ",l.routes," chains"]})]}):(0,Z.jsxs)(Z.Fragment,{children:[p?.token.symbol??u," ",(0,Z.jsxs)("span",{className:"rd-muted",children:["from ",_o(l.chainId)]})]})}),(0,Z.jsx)("span",{className:sv(d.status),title:d.status,children:C})]}),(0,Z.jsxs)("span",{className:"rd-history-card-amounts",children:[(0,Z.jsxs)("span",{className:"rd-history-amount-block",children:[(0,Z.jsx)("span",{className:"rd-history-amount-label",children:"Processing address"}),(0,Z.jsx)(Qd,{amount:y,symbol:f,className:"rd-history-num"})]}),(0,Z.jsx)("span",{className:"rd-history-card-arrow","aria-hidden":"true",children:"\u2192"}),(0,Z.jsxs)("span",{className:"rd-history-amount-block",children:[(0,Z.jsx)("span",{className:"rd-history-amount-label",children:R}),(0,Z.jsx)(Qd,{amount:c,symbol:u,className:`rd-history-num rd-history-received${l.receivedIsEstimate?" rd-history-received-estimate":""}`})]})]}),(0,Z.jsxs)("span",{className:"rd-history-card-foot",children:[(0,Z.jsxs)("span",{className:"rd-history-date",children:[d.completedAt?"Completed":"Started"," \xB7 ",v]}),(0,Z.jsx)("span",{className:"rd-history-chevron","aria-hidden":"true",children:(0,Z.jsx)(zn,{size:16})})]})]}),g&&(0,Z.jsxs)("div",{className:"rd-history-detail",children:[l.deposit?(0,Z.jsx)(Fs,{label:"Deposit confirmed",chainId:l.deposit.originChainId??Ua,txHash:l.deposit.originTxHash||l.deposit.txHash,amount:zs(l.deposit.amount,x?.token.decimals)}):b.length>0?b.map(S=>(0,Z.jsx)(Fs,{label:"Deposit confirmed",chainId:S.originChainId??Ua,txHash:S.originTxHash||S.txHash,amount:zs(S.amount,x?.token.decimals)},`${S.txHash}-${S.blockNumber}`)):(0,Z.jsxs)("div",{className:"rd-history-step",children:[(0,Z.jsx)("span",{className:"rd-history-step-dot"}),(0,Z.jsx)("span",{className:"rd-history-step-label",children:"Deposit confirmed"}),(0,Z.jsx)("span",{className:"rd-muted",children:"Details unavailable"})]}),(0,Z.jsx)(Fs,{label:"Bridge",chainId:Ua,txHash:d.bscBridgeTx,shared:l.sharedLegs,missingLabel:I}),(0,Z.jsx)(Fs,{label:"ONEchain delivery",chainId:r?.destination.chainId??612055,txHash:d.deliveryTxHash,shared:l.sharedLegs,missingLabel:I})]})]},l.key)})})]})}var ko=require("react");var Jt=require("react");var Wn=class extends Error{constructor(t,n,r){super(n),this.name="RelayApiError",this.status=t,this.body=r}};function rn(e){let t=e.baseUrl.replace(/\/+$/,"");async function n(r,o){let a={...o?.headers};o?.body!=null&&(a["Content-Type"]="application/json");let i;try{i=await fetch(`${t}${r}`,{...o,headers:a})}catch(l){throw new Wn(0,`network error calling ${r}: ${l.message}`)}let s=await i.text();if(!i.ok){let l=`request to ${r} failed with status ${i.status}`,d;try{d=JSON.parse(s);let p=d;p?.error&&(l=p.error)}catch{d=s||void 0}throw new Wn(i.status,l,d)}try{return JSON.parse(s)}catch{throw new Wn(i.status,`expected a JSON response from ${r} but got ${s?"a non-JSON body":"an empty body"}`,s||void 0)}}return{getConfig(){return n("/v1/config").then(r=>({...r,targets:r.targets??[]}))},getQuote(r){return n("/v1/quote",{method:"POST",body:JSON.stringify(r)})},getDepositAddress(r,o){let a=new URLSearchParams({user:r.user,originChainId:String(r.originChainId),originCurrency:r.originCurrency});return o&&a.set("target",o),n(`/v1/deposit-address?${a.toString()}`)},getOrder(r){return n(`/v1/orders/${encodeURIComponent(r)}`)},listOrders(r){let o=new URLSearchParams({user:r});return n(`/v1/orders?${o.toString()}`).then(a=>a.orders??[])},ordersStreamUrl(r){return`${t}/v1/orders/stream?user=${encodeURIComponent(r)}`},getRecovery(r){let o=new URLSearchParams({user:r.user});return r.target&&o.set("target",r.target),n(`/v1/recovery?${o.toString()}`)}}}var gh=[{type:"function",name:"deploy",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"version",type:"uint256"}],outputs:[{name:"",type:"address"}]}],Vd=[{type:"function",name:"execute",stateMutability:"nonpayable",inputs:[],outputs:[]},{type:"function",name:"sweepToUser",stateMutability:"nonpayable",inputs:[{name:"tokenAddr",type:"address"}],outputs:[]}],qd=[{type:"function",name:"computeAddress",stateMutability:"view",inputs:[{name:"recipient",type:"address"},{name:"version",type:"uint256"}],outputs:[{name:"",type:"address"}]}];var vo=["0x486BEEc35A9a9915213Ea02AD3709738335F7702","0x3438735303911aBe113AdF14b18eE730cC24893b","0xA3B548Ab23043e6B24A087515fe1306379683533","0x44317d07378390543d99Ee76374E86C1Ef6cF832"];function js(e,t){return!e||!t?!1:e.toLowerCase()===t.toLowerCase()}function fv(e,t){return t.some(n=>js(n,e))}function Ws(e){if(!e||e.length===0)return vo;let t=new Set,n=[];for(let r of e){if(typeof r!="string"||!bt(r))continue;let o=r.toLowerCase();t.has(o)||(t.add(o),n.push(r))}return n.length>0?n:vo}async function hh(e,t,{factory:n,forwarder:r,recipient:o,version:a,trusted:i=vo}){if(!n||!r||!o||a===void 0)return{ok:!1,reason:"address verification is missing inputs (factory/forwarder/recipient/version)"};if(!fv(n,i))return{ok:!1,reason:`factory ${n} is not a recognized deposit-address factory -- refusing to sign against it`};if(!e)return{ok:!1,reason:"no chain connection available to verify the forwarder address"};let s;try{s=await e({chainId:t,address:n,abi:qd,functionName:"computeAddress",args:[o,BigInt(a)]})}catch(l){return{ok:!1,reason:`could not verify the forwarder address on-chain: ${l instanceof Error?l.message:String(l)}`}}return js(s,r)?{ok:!0}:{ok:!1,reason:`forwarder address mismatch: the API returned ${r}, but factory ${n} derives ${s} for this account -- refusing to sign`}}async function bh(e,t,{forwarder:n,recipient:r,version:o,trusted:a=vo}){if(!n||!r||o===void 0)return{ok:!1,reason:"address verification is missing inputs (forwarder/recipient/version)"};if(!e)return{ok:!1,reason:"no BSC chain connection available to verify the deposit forwarder -- add BNB Smart Chain (chain 56) to your wagmi config"};let i=await Promise.all(a.map(async s=>{try{return await e({chainId:t,address:s,abi:qd,functionName:"computeAddress",args:[r,BigInt(o)]})}catch{return}}));return i.some(s=>js(s,n))?{ok:!0}:i.every(s=>s===void 0)?{ok:!1,reason:"could not reach any deposit-address factory on BSC to verify the forwarder"}:{ok:!1,reason:`forwarder address mismatch: ${n} is not the address any known factory derives for this account -- refusing to deposit`}}function wh(e,t){return js(e,t)}var qr=56,Yd={step:"idle"};function mv(e){return e.tokens?.find(t=>t.recoverable)?.address??e.token}function Wa(e={}){let t=(0,Jt.useRef)(e);t.current=e;let n=e.wallet,r=n?.walletChainId,o=e.recipient,a=o&&bt(o)?o:void 0,[i,s]=(0,Jt.useState)({}),l=(0,Jt.useCallback)((u,h)=>{s(x=>({...x,[u.toLowerCase()]:h}))},[]),d=(0,Jt.useCallback)(u=>u?i[u.toLowerCase()]??Yd:Yd,[i]),p=(0,Jt.useMemo)(()=>Object.values(i).some(u=>u.step==="switching"||u.step==="deploying"||u.step==="recovering"),[i]);return{recover:(0,Jt.useCallback)(async(u,h,x)=>{if(!a||!u?.forwarder)return;let y=u.forwarder;l(y,{step:"switching"});try{if(r!==qr){if(!n?.switchChain)throw new Error("wallet cannot switch chains");await n.switchChain(qr)}if(!n?.writeContract||!n?.readContract||!n?.waitForReceipt)throw new Error("wallet is missing contract capabilities required for recovery");let f=await hh(n.readContract,qr,{factory:u.factory,forwarder:u.forwarder,recipient:a,version:u.version,trusted:t.current.trustedFactories});if(!f.ok)throw new Error(`address verification failed: ${f.reason}`);let c;if(!u.isDeployed){if(l(y,{step:"deploying"}),c=await n.writeContract({address:u.factory,abi:gh,functionName:"deploy",args:[a,BigInt(u.version)],chainId:qr}),l(y,{step:"deploying",deployTxHash:c}),(await n.waitForReceipt({chainId:qr,hash:c})).status==="reverted")throw new Error(`forwarder deploy reverted on-chain (tx ${c})`);t.current.onChanged?.()}l(y,{step:"recovering",deployTxHash:c});let b=h==="execute"?await n.writeContract({address:u.forwarder,abi:Vd,functionName:"execute",args:[],chainId:qr}):await n.writeContract({address:u.forwarder,abi:Vd,functionName:"sweepToUser",args:[x??mv(u)],chainId:qr});if(l(y,{step:"recovering",deployTxHash:c,actionTxHash:b}),(await n.waitForReceipt({chainId:qr,hash:b})).status==="reverted")throw new Error(`recovery transaction reverted on-chain (tx ${b})`);l(y,{step:"done",deployTxHash:c,actionTxHash:b}),t.current.onRecoverySuccess?.({action:h,forwarder:u.forwarder,actionTxHash:b,...c?{deployTxHash:c}:{}}),t.current.onChanged?.()}catch(f){let c=f instanceof Error?f:new Error(String(f));s(b=>{let g=y.toLowerCase();return{...b,[g]:{...b[g]??Yd,step:"error",error:c.message}}}),t.current.onError?.(c)}},[a,r,n,l]),stateFor:d,busy:p}}function yh(e={}){let t=(0,Jt.useRef)(e);t.current=e;let n=(0,Jt.useMemo)(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRecovery: either `client` or `apiBaseUrl` must be provided");return rn({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),r=e.recipient,o=r&&bt(r)?r:void 0,[a,i]=(0,Jt.useState)(),[s,l]=(0,Jt.useState)(!1),[d,p]=(0,Jt.useState)(),[w,u]=(0,Jt.useState)(0),h=e.target,x=e.enabled??!0,y=e.refetchInterval;(0,Jt.useEffect)(()=>{if(!o||!x){i(void 0),p(void 0),l(!1);return}let v=!1,C=!1,N=!0;async function I(){if(!(v||C)){C=!0,N&&l(!0);try{let S=await n.getRecovery({user:o,target:h});if(v)return;i(S),p(void 0)}catch(S){if(v)return;let E=S instanceof Error?S:new Error(String(S));p(E),t.current.onError?.(E),E instanceof Wn&&E.status===401&&t.current.onUnauthorized?.()}finally{C=!1,!v&&N&&l(!1),N=!1}}}I();let R=typeof y=="number"&&Number.isFinite(y)&&y>0?setInterval(()=>{I()},y):void 0;return()=>{v=!0,R&&clearInterval(R)}},[n,o,w,h,x,y]);let f=(0,Jt.useCallback)(()=>u(v=>v+1),[]),c=Wa({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:f}),b=(0,Jt.useCallback)(async(v,C)=>{a&&await c.recover(a,v,C)},[c,a]),g=c.stateFor(a?.forwarder);return{info:a,loading:s,error:d,refresh:f,recover:b,recoveryState:g}}var gv="BSC_FUNDED";function xh(e){if(!e)return 0n;try{let t=BigInt(e);return t>0n?t:0n}catch{return 0n}}function hv(e,t){return e.target||t}function Qo(e,t=[]){let n=e.find(o=>o.isDefault)?.symbol,r=new Map;for(let o of e){if(!o.info?.forwarder)continue;let a=o.info.forwarder.toLowerCase(),i=r.get(a);if(i){i.targets.push(o.symbol);continue}r.set(a,{forwarder:o.info.forwarder,targets:[o.symbol],info:o.info,deposits:[],depositsTotal:0n})}for(let o of r.values()){let a=new Set(o.targets);for(let i of t){if(i.status!==gv)continue;let s=hv(i,n);if(!(!s||!a.has(s)))for(let l of i.deposits??[])o.deposits.push({amount:l.amount,originChainId:l.originChainId,originTxHash:l.originTxHash,txHash:l.txHash,blockNumber:l.blockNumber}),o.depositsTotal+=xh(l.amount)}o.deposits.sort((i,s)=>i.blockNumber-s.blockNumber)}return[...r.values()]}function vh(e){return e.filter(t=>(t.info.tokens??[]).some(n=>n.recoverable)?!0:xh(t.info.balance)>0n&&t.info.suggestedAction!=="none")}function Gs(e){return e.reduce((t,n)=>t+(n.info.tokens??[]).filter(r=>r.recoverable).length,0)}var W=require("react/jsx-runtime"),bv=56;function wv(e){return{client:e.client,apiBaseUrl:e.apiBaseUrl,recipient:e.recipient,target:e.target,enabled:e.targets===void 0,wallet:e.wallet,trustedFactories:e.trustedFactories,onUnauthorized:e.onUnauthorized,onError:e.onError}}var yv="This balance may already be processing. Recover only if it remains stuck.",Hs="USDT",kh="primary";function xv(e){return`${e} more recoverable under other delivery tokens -- switch the delivery token above to recover ${e===1?"it":"them"}.`}function vv(e){let t=e.toLowerCase();return t.includes("insufficient funds")||t.includes("insufficientfunds")||t.includes("exceeds the balance of the account")||t.includes("insufficient balance for transfer")?"Not enough BNB for the network fee. Add BNB to your connected wallet and try again.":t.includes("user rejected")||t.includes("userrejected")||t.includes("user denied")||t.includes("user cancelled")||t.includes("user canceled")||t.includes("action_rejected")||t.includes("rejected by user")?"Transaction cancelled in your wallet.":"Recovery couldn't be completed. Check your wallet and try again."}function Rh({message:e}){let[t,n]=(0,ko.useState)("idle");(0,ko.useEffect)(()=>{if(t==="idle")return;let a=window.setTimeout(()=>n("idle"),1500);return()=>window.clearTimeout(a)},[t]);async function r(){if(typeof navigator>"u"||!navigator.clipboard){n("failed");return}try{await navigator.clipboard.writeText(e),n("copied")}catch{n("failed")}}let o=t==="copied"?"Copied technical details":t==="failed"?"Copy failed":"Copy technical details";return(0,W.jsxs)("details",{className:"rd-error-details",children:[(0,W.jsx)("summary",{children:"View technical details"}),(0,W.jsxs)("div",{className:"rd-error-log",children:[(0,W.jsx)("button",{type:"button",className:"rd-error-copy",onClick:()=>{r()},"aria-label":o,"aria-live":"polite",title:o,children:t==="copied"?(0,W.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,W.jsx)("path",{d:"m5 12 4 4L19 6",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}):(0,W.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,W.jsx)("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.8"}),(0,W.jsx)("path",{d:"M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]})}),(0,W.jsx)("code",{children:e})]})]})}function Ga(e){if(!e)return 0n;try{return BigInt(e)}catch{return 0n}}function Lr(e,t){try{return pn(e,t)}catch{return e.toString()}}function Ch(e){return e.length>14?`${e.slice(0,8)}...${e.slice(-4)}`:e}function kv(e){let t=Ga(e.bridgeMinWei),n=[];for(let a of e.tokens??[]){let i=Ga(a.balance);if(!(i<=0n)){if(a.suggestedAction==="execute"){n.push({key:a.address,symbol:a.symbol,decimals:a.decimals,balance:i,action:{kind:"execute"}});continue}if(a.recoverable){n.push({key:a.address,symbol:a.symbol,decimals:a.decimals,balance:i,action:{kind:"sweep",tokenAddress:a.address}});continue}n.push({key:a.address,symbol:a.symbol,decimals:a.decimals,balance:i,...t>i?{shortfall:t-i,minimum:t}:{}})}}let r=Ga(e.balance),o=n.some(a=>a.action?.kind==="execute");return r>0n&&e.suggestedAction==="execute"&&!o?n.unshift({key:kh,symbol:Hs,decimals:e.decimals,balance:r,action:{kind:"execute"}}):n.length===0&&r>0n&&e.suggestedAction!=="none"&&n.push({key:kh,symbol:Hs,decimals:e.decimals,balance:r,action:{kind:"sweep"}}),n}function Cv({deposit:e,decimals:t}){let n=e.originChainId??bv,r=e.originTxHash||e.txHash,o=r?Bs(n,r):void 0;return(0,W.jsxs)("div",{className:"rd-history-step","data-testid":"recovery-deposit-row",children:[(0,W.jsx)("span",{className:"rd-history-step-dot rd-history-step-dot-done"}),(0,W.jsx)("span",{className:"rd-history-step-chain",children:_o(n)}),(0,W.jsx)("span",{className:"rd-history-step-amount",children:Lr(Ga(e.amount),t)}),(0,W.jsx)("span",{className:"rd-history-step-tx",children:o?(0,W.jsx)("a",{href:o.url,target:"_blank",rel:"noreferrer",title:r,children:Ch(r)}):r?(0,W.jsx)("span",{title:r,children:Ch(r)}):null})]})}function Rv({group:e,showTargetLabel:t,busy:n,state:r,onRecover:o,actingRowKey:a,rowKeyOf:i}){let{info:s}=e,l=kv(s),d=Ga(s.balance),p=l.length===1?`${Lr(l[0].balance,l[0].decimals)}`:`${l.length} assets`,w=e.deposits.length>0&&e.depositsTotal>=d,u=d>e.depositsTotal?d-e.depositsTotal:0n,h=r.step==="switching"||r.step==="deploying"||r.step==="recovering",y=l.find(c=>i(c)===a)?.action?.kind;function f(){if(r.step==="switching")return"Switching to BNB Chain\u2026";if(r.step==="deploying")return"Confirm in wallet\u2026 (1/2 \u2014 preparing your deposit address)";let c=y==="execute"?"continuing ONEchain delivery":"returning funds";return r.deployTxHash?`Confirm in wallet\u2026 (2/2 \u2014 ${c})`:`Confirm in wallet\u2026 (${c})`}return(0,W.jsxs)("div",{className:"rd-recover-group","data-testid":"forwarder-section",children:[t&&(0,W.jsxs)("p",{className:"rd-recover-group-label",children:["Delivery target \xB7 ",(0,W.jsx)("b",{children:e.targets.join(", ")})]}),(0,W.jsxs)("div",{className:"rd-recover-sum",children:[(0,W.jsx)("span",{className:"rd-recover-sum-label",children:"Funds awaiting processing"}),(0,W.jsxs)("span",{className:"rd-recover-sum-value",title:l.length===1?`${p} ${l[0].symbol}`:p,children:[p,l.length===1&&(0,W.jsxs)(W.Fragment,{children:[" ",(0,W.jsx)("span",{className:"rd-recover-sum-unit",children:l[0].symbol})]})]})]}),e.deposits.length>0&&(0,W.jsxs)("details",{className:"rd-recover-made-of",children:[(0,W.jsxs)("summary",{className:"rd-recover-made-of-label",children:["Deposit history \xB7 ",e.deposits.length," ",e.deposits.length===1?"transfer":"transfers"]}),(0,W.jsxs)("div",{className:"rd-recover-made-of-body",children:[e.deposits.map(c=>(0,W.jsx)(Cv,{deposit:c,decimals:s.decimals},`${c.txHash}-${c.blockNumber}`)),!w&&(0,W.jsxs)("p",{className:"rd-token-row-status","data-testid":"deposits-incomplete-note",children:["These transfers explain ",Lr(e.depositsTotal,s.decimals)," of"," ",Lr(d,s.decimals)," ",Hs,". The remaining"," ",Lr(u,s.decimals)," ",Hs," is still included when you act."]})]})]}),(0,W.jsx)("div",{className:"rd-token-list",children:l.map(c=>{let b=i(c),g=h&&a===b;return(0,W.jsxs)("div",{className:"rd-token-row","data-token-symbol":c.symbol,children:[(0,W.jsx)(yo,{symbol:c.symbol,size:26}),(0,W.jsxs)("div",{className:"rd-token-row-info",children:[l.length>1&&(0,W.jsxs)("span",{className:"rd-token-row-amount",children:[Lr(c.balance,c.decimals)," ",(0,W.jsx)("span",{className:"rd-token-row-symbol",children:c.symbol})]}),g?(0,W.jsx)("span",{className:"rd-token-row-step",role:"status","aria-live":"polite",children:f()}):c.shortfall!==void 0&&c.minimum!==void 0?(0,W.jsxs)("span",{className:"rd-token-row-warn",children:["Needs ",(0,W.jsxs)("b",{children:[Lr(c.shortfall,c.decimals)," ",c.symbol]})," more to reach the"," ",Lr(c.minimum,c.decimals)," ",c.symbol," minimum. Add it through"," ",(0,W.jsx)("b",{children:"Deposit to CROSS"})," and both amounts will process together."]}):c.action?(0,W.jsx)("span",{className:"rd-token-row-status",children:c.action.kind==="execute"?"Ready to continue delivery to ONEchain":"Ready to return to your BNB Chain wallet"}):(0,W.jsx)("span",{className:"rd-token-row-status",children:"Waiting for processing"})]}),g?(0,W.jsx)("span",{className:"rd-spinner rd-token-row-spinner"}):c.action&&(0,W.jsx)("button",{type:"button",className:"rd-button-primary rd-token-row-action",onClick:()=>o(c),disabled:n,children:c.action.kind==="execute"?"Continue delivery":"Return to wallet"})]},c.key)})}),!s.isDeployed&&r.step==="idle"&&(0,W.jsxs)("div",{className:"rd-callout rd-callout-warning","data-testid":"two-tx-notice",children:["The first action from this address needs ",(0,W.jsx)("b",{children:"two wallet confirmations"}),": prepare the address, then move the funds. Later actions need one."]}),s.inFlight&&(0,W.jsx)("p",{className:"rd-muted rd-token-row-status",children:s.inFlightReason||yv}),r.step==="done"&&(0,W.jsx)("div",{className:"rd-callout rd-callout-success",role:"status","aria-live":"polite",children:y==="execute"?"ONEchain delivery restarted.":"Funds returned to your connected BNB Chain wallet."}),r.step==="error"&&r.error&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)("div",{className:"rd-callout rd-callout-danger",role:"alert",children:vv(r.error)}),(0,W.jsx)(Rh,{message:r.error})]})]})}function _s(e){let{info:t,loading:n,error:r,refresh:o}=yh(wv(e)),a=n||e.targets!==void 0&&e.targetsLoading===!0,i=Wa({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:e.targets!==void 0?e.onRecovered:o}),[s,l]=(0,ko.useState)(),d=e.targets!==void 0?[...e.targets]:t?[{symbol:e.target??"",isDefault:!0,info:t}]:[],p=vh(Qo(d,e.orders??[])),w=p.length>0,u=e.targets!==void 0?e.onRecovered:o,h=e.wallet?.walletAddress,x=e.wallet?.getBalance,[y,f]=(0,ko.useState)();return(0,ko.useEffect)(()=>{if(!w||!x||!h){f(void 0);return}let c=!1;return x({chainId:56,address:h}).then(b=>{c||f({value:b.value,decimals:b.decimals})}).catch(()=>{c||f(void 0)}),()=>{c=!0}},[w,x,h]),(0,W.jsxs)("section",{className:e.showTitle??!0?"rd-card":"rd-stack","data-rd-recover-funds":"",children:[(e.showTitle??!0)&&(0,W.jsx)("div",{className:"rd-card-header",children:(0,W.jsx)("h2",{className:"rd-card-title",children:"Recover stuck funds"})}),typeof e.otherTargetsRecoverable=="number"&&e.otherTargetsRecoverable>0&&(0,W.jsx)("div",{className:"rd-callout rd-callout-muted","data-testid":"other-targets-recoverable-note",children:xv(e.otherTargetsRecoverable)}),a&&(0,W.jsxs)("p",{className:"rd-muted",role:"status","aria-live":"polite",children:[(0,W.jsx)("span",{className:"rd-spinner"})," Checking for recoverable funds\u2026"]}),r&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)("div",{className:"rd-callout rd-callout-danger",role:"alert",children:"Couldn't check recoverable funds. Please try again."}),(0,W.jsx)(Rh,{message:r.message})]}),!a&&!r&&!w&&(0,W.jsxs)("div",{className:"rd-recover-empty",role:"status","data-testid":"rd-recover-empty-state",children:[(0,W.jsx)("span",{className:"rd-recover-empty-icon","aria-hidden":"true",children:(0,W.jsxs)("svg",{width:"34",height:"34",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[(0,W.jsx)("path",{d:"M5 11.5V8.8A2.8 2.8 0 0 1 7.8 6h8.4A2.8 2.8 0 0 1 19 8.8v6.4a2.8 2.8 0 0 1-2.8 2.8H7.8A2.8 2.8 0 0 1 5 15.2v-3.7Z",stroke:"currentColor",strokeWidth:"1.7"}),(0,W.jsx)("path",{d:"M5 10h14",stroke:"currentColor",strokeWidth:"1.7"}),(0,W.jsx)("path",{d:"m9.2 14 1.7 1.7 3.9-4",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,W.jsx)("h3",{className:"rd-recover-sum-value rd-recover-sum-empty rd-recover-empty-title",children:"Nothing to recover"}),(0,W.jsx)("p",{className:"rd-recover-empty-copy",children:"No funds are waiting at your deposit addresses. If funds become stuck, they will appear here."}),u&&(0,W.jsxs)("button",{type:"button",className:"rd-button-secondary rd-recover-empty-refresh",onClick:u,"data-track":"refresh_recovery",children:[(0,W.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,W.jsx)("path",{d:"M20 7v5h-5M4 17v-5h5M6.1 9A7 7 0 0 1 18.6 7M5.4 17A7 7 0 0 0 17.9 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),"Check again"]})]}),!a&&!r&&p.map(c=>(0,W.jsx)(Rv,{group:c,showTargetLabel:p.length>1||c.targets.length>1,busy:i.busy,state:i.stateFor(c.forwarder),actingRowKey:s,rowKeyOf:b=>`${c.forwarder.toLowerCase()}:${b.key}`,onRecover:b=>{b.action&&(l(`${c.forwarder.toLowerCase()}:${b.key}`),i.recover(c.info,b.action.kind,b.action.tokenAddress))}},c.forwarder.toLowerCase())),!a&&!r&&w&&(0,W.jsxs)("div",{className:"rd-callout rd-callout-muted","data-testid":"rd-recover-gas-note",children:["You submit this transaction from your connected wallet and pay the BNB Chain network fee in BNB. Available balance:",y&&(0,W.jsxs)(W.Fragment,{children:[" ",(0,W.jsxs)("b",{children:[Lr(y.value,y.decimals)," BNB"]})]}),!y&&" unavailable","."]}),!a&&!r&&w&&(0,W.jsx)("p",{className:"rd-recover-foot",children:"Delivery continues to ONEchain; returned funds go to your connected BNB Chain wallet."})]})}var $t=_(require("react"),1),Tn=_(require("@radix-ui/react-dialog"),1),Co=require("vaul");he(`html body[data-scroll-locked]{overflow-y:auto!important;margin-right:0!important}.rd-overlay{position:fixed;inset:0;z-index:100000;background:var(--ds-overlay-dim, rgba(0, 0, 0, .5));-webkit-backdrop-filter:var(--ds-bg-blur-7, blur(3.5px));backdrop-filter:var(--ds-bg-blur-7, blur(3.5px))}.rd-dialog-content{-webkit-font-smoothing:antialiased;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:100001;width:var(--rd-dialog-width, 480px);max-height:90vh;overflow:hidden;display:flex;flex-direction:column;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, #00000012);border-radius:24px;box-shadow:var(--ds-shadow-modal, 0 4px 30px -1px rgba(0, 0, 0, .15));outline:none;font-family:inherit}.rd-dialog-content.rd-deposit-shell{height:min(40rem,90vh)}.rd-drawer-content{-webkit-font-smoothing:antialiased;position:fixed;bottom:0;left:0;right:0;z-index:100001;width:100%;max-width:var(--rd-drawer-max-width, none);min-width:var(--rd-drawer-min-width, 0);max-height:min(85dvh,calc(100svh - env(safe-area-inset-top,0px)));margin:0 auto;display:flex;flex-direction:column;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, #00000012);border-top-left-radius:16px;border-top-right-radius:16px;outline:none;font-family:inherit;box-sizing:border-box;overscroll-behavior:contain}.rd-drawer-content.rd-deposit-shell[data-vaul-drawer-direction=bottom],.rd-drawer-content.rd-deposit-shell[data-vaul-drawer-direction=top]{height:min(40rem,85dvh,calc(100svh - env(safe-area-inset-top,0px)))}.rd-drawer-content[data-vaul-drawer-direction=right]{inset:0 0 0 auto;max-height:100vh;width:var(--rd-drawer-max-width, 400px);max-width:100vw;border-radius:16px 0 0 16px}.rd-drawer-content[data-vaul-drawer-direction=left]{inset:0 auto 0 0;max-height:100vh;width:var(--rd-drawer-max-width, 400px);max-width:100vw;border-radius:0 16px 16px 0}.rd-drawer-content[data-vaul-drawer-direction=top]{inset:0 0 auto;border-radius:0 0 16px 16px}.rd-drawer-handle{width:60px;height:4px;border-radius:999px;background:var(--ds-border-medium, rgba(0, 0, 0, .18));margin:12px auto 8px;flex-shrink:0}.rd-drawer-content[data-vaul-drawer-direction=left] .rd-drawer-handle,.rd-drawer-content[data-vaul-drawer-direction=right] .rd-drawer-handle{display:none}.rd-overlay{animation:rd-overlay-show .18s ease-out}.rd-overlay[data-state=closed]{animation:rd-overlay-hide .15s ease-in}.rd-dialog-content{animation:rd-dialog-show .2s ease-out}.rd-dialog-content[data-state=closed]{animation:rd-dialog-hide .15s ease-in}@keyframes rd-overlay-show{0%{opacity:0}}@keyframes rd-overlay-hide{to{opacity:0}}@keyframes rd-dialog-show{0%{opacity:0;transform:translate(-50%,-48%) scale(.96)}}@keyframes rd-dialog-hide{to{opacity:0;transform:translate(-50%,-48%) scale(.96)}}@media(prefers-reduced-motion:reduce){.rd-overlay,.rd-overlay[data-state=closed],.rd-dialog-content,.rd-dialog-content[data-state=closed]{animation:none}}.rd-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}
21
- `);var un=require("react/jsx-runtime"),Nh=24;function Sh(e){return e instanceof HTMLElement&&e.matches("input, textarea, select")}function Nv(e,t,n){let r=n?.offsetTop??t.top,o=n?n.offsetTop+n.height:t.bottom,a=Math.max(t.top,r)+Nh,i=Math.min(t.bottom,o)-Nh;return e.top<a?e.top-a:e.bottom>i?e.bottom-i:0}function Sv(){let e=$t.useRef(0),[t,n]=$t.useState({keyboardHeight:0,keyboardOverlap:0,viewportHeight:0});return $t.useEffect(()=>{let r=window.visualViewport;if(!r)return;let o=()=>{let a=Math.max(window.innerHeight,document.documentElement.clientHeight);e.current=Math.max(e.current,a,r.height+r.offsetTop);let i=Math.max(0,e.current-r.height-r.offsetTop),s=Math.max(0,e.current-a),l=Math.max(0,i-s),d=r.height;n(p=>p.keyboardHeight===i&&p.keyboardOverlap===l&&p.viewportHeight===d?p:{keyboardHeight:i,keyboardOverlap:l,viewportHeight:d})};return o(),r.addEventListener("resize",o),r.addEventListener("scroll",o),()=>{r.removeEventListener("resize",o),r.removeEventListener("scroll",o)}},[]),t}function Tv(e){let t=`(max-width: ${e}px)`,[n,r]=$t.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(t).matches);return $t.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;let o=window.matchMedia(t);r(o.matches);let a=i=>r(i.matches);return o.addEventListener("change",a),()=>o.removeEventListener("change",a)},[t]),n}function hr({theme:e="dark",mobileBreakpoint:t=768,drawerDirection:n="bottom",dialogWidth:r,drawerMaxWidth:o,drawerMinWidth:a,style:i,open:s,onOpenChange:l,children:d}){let p=Tv(t),[w,u]=$t.useState(!1),h=s!==void 0,x=h?s:w,y=$t.useCallback(g=>{h||u(g),l?.(g)},[h,l]);Vn(x,$t.useCallback(()=>y(!1),[y]));let f=$t.useMemo(()=>{let g={};return r&&(g["--rd-dialog-width"]=r),o&&(g["--rd-drawer-max-width"]=o),a&&(g["--rd-drawer-min-width"]=a),{...g,...i}},[r,o,a,i]),c=$t.useMemo(()=>({open:x,setOpen:y,isMobile:p,theme:e,drawerDirection:n,portalStyle:f}),[x,y,p,e,n,f]),b=(0,un.jsx)("div",{"data-theme":e,style:f,children:d});return p?(0,un.jsx)(Ls.Provider,{value:c,children:(0,un.jsx)(Co.Drawer.Root,{direction:n,open:x,onOpenChange:y,noBodyStyles:!0,children:b},"drawer")}):(0,un.jsx)(Ls.Provider,{value:c,children:(0,un.jsx)(Tn.Root,{open:x,onOpenChange:y,children:b})})}function Vo({asChild:e,children:t,dataAttributes:n}){let{isMobile:r}=$n(),o=r?Co.Drawer.Trigger:Tn.Trigger;return(0,un.jsx)(o,{asChild:e,...n,children:t})}function br({className:e,ariaTitle:t,children:n}){let{open:r,isMobile:o,theme:a,drawerDirection:i,portalStyle:s}=$n(),{keyboardHeight:l,keyboardOverlap:d,viewportHeight:p}=Sv(),w=Mo(),u=$t.useRef(null),h=$t.useRef(null);$t.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]),$t.useEffect(()=>{h.current&&clearTimeout(h.current);let c=document.activeElement;!r&&Sh(c)&&u.current?.contains(c)&&c.blur(),u.current?.querySelectorAll("[data-rd-scroll-area]").forEach(b=>{b.scrollTo?.({top:0,behavior:"auto"})})},[r]);let x=o&&i==="bottom"&&l>0,y=x?{bottom:d,maxHeight:`min(85dvh, calc(${p}px - env(safe-area-inset-top, 0px)))`}:void 0,f=$t.useCallback(c=>{if(!o||i!=="bottom"||!Sh(c.target))return;let b=c.target,g=b.closest("[data-rd-scroll-area]");g&&(h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{let v=Nv(b.getBoundingClientRect(),g.getBoundingClientRect(),window.visualViewport);Math.abs(v)>=1&&g.scrollBy?.({top:v,behavior:"auto"}),h.current=null},280))},[i,o]);return o?(0,un.jsxs)(Co.Drawer.Portal,{children:[(0,un.jsx)(Co.Drawer.Overlay,{className:"rd-overlay"}),(0,un.jsxs)(Co.Drawer.Content,{ref:u,className:Ee("rd-drawer-content",e),"data-theme":a,"data-rd-shell":"drawer","data-rd-in-app":w?"true":"false","data-rd-keyboard-adjusted":x?"true":"false",style:{...s,...y},onFocusCapture:f,children:[(0,un.jsx)(Co.Drawer.Title,{className:"rd-sr-only",children:t}),(0,un.jsx)("div",{className:"rd-drawer-handle"}),n]})]}):(0,un.jsxs)(Tn.Portal,{children:[(0,un.jsx)(Tn.Overlay,{className:"rd-overlay"}),(0,un.jsxs)(Tn.Content,{className:Ee("rd-dialog-content",e),"data-theme":a,"data-rd-shell":"dialog",style:s,children:[(0,un.jsx)(Tn.Title,{className:"rd-sr-only",children:t}),(0,un.jsx)(Tn.Description,{className:"rd-sr-only",children:t}),n]})]})}var ye=require("react/jsx-runtime");function Iv({id:e,activeView:t,recoverableCount:n,onChange:r}){let o=["deposit","history","recover"];return(0,ye.jsx)("div",{className:"rd-deposit-tabs",role:"tablist","aria-label":"Deposit navigation","data-tab-count":o.length,"data-active-index":o.indexOf(t),children:o.map(a=>{let i=a==="deposit"?"Deposit":a==="history"?"History":"Recover";return(0,ye.jsxs)("button",{type:"button",id:`${e}-${a}-tab`,className:"rd-deposit-tab",role:"tab","aria-selected":t===a,"aria-controls":`${e}-${a}-panel`,tabIndex:t===a?0:-1,"data-active":t===a?"true":"false","data-track":`${a}_tab`,onClick:()=>r(a),onKeyDown:s=>{if(!["ArrowLeft","ArrowRight","Home","End"].includes(s.key))return;s.preventDefault();let l=o.indexOf(a),d=s.key==="Home"?0:s.key==="End"?o.length-1:(l+(s.key==="ArrowRight"?1:-1)+o.length)%o.length,p=o[d];r(p),document.getElementById(`${e}-${p}-tab`)?.focus()},children:[(0,ye.jsx)("span",{children:i}),a==="recover"&&n>0&&(0,ye.jsx)("span",{className:"rd-recovery-badge","data-testid":"recovery-badge",children:n})]},a)})})}function Ih({className:e}){let t=Ba();return(0,ye.jsx)(Le,{feature:"relay",children:(0,ye.jsx)(br,{ariaTitle:"Deposit",className:["rd-deposit-shell",e??t.className].filter(Boolean).join(" "),children:(0,ye.jsx)(Ev,{})})})}function Ev(){let e=Ba(),{theme:t}=$n(),n=$g(),r=Th.useId();if(!n)return null;let{activeView:o,setActiveView:a,recoveryOpen:i,resolvedApiBaseUrl:s,wallet:l,catalog:d,catalogLoading:p,catalogError:w,origin:u,setOrigin:h,amount:x,setAmount:y,recipient:f,setRecipient:c,recipientValid:b,balance:g,balanceLoading:v,insufficientBalance:C,depositAddress:N,depositAddressLoading:I,depositAddressError:R,arrivalStatus:S,quote:E,quoteLoading:M,quoteError:z,canDeposit:L,deposit:G,depositState:A,targetOptions:j,selectedTarget:le,setSelectedTarget:oe,showAmountInput:ne,minNotice:V,showRecipientInput:ee,showTargetSelector:F,showOneClick:q,showConnectPrompt:ae,showRecipientHint:X,canRecover:me,recoverableCount:ke,recoveryTargetsLoading:ze,recoveryTargets:ge,recoveryOrders:Ne,historyOrdersLoading:Ce,historyOrdersError:tt,refreshRecovery:Me,trustedFactories:Qe,amountHint:lt,amountSmallestUnits:We,onMax:Ve}=n;return(0,ye.jsxs)("div",{className:"rd-root rd-wizard","data-theme":t,"data-rd-scroll-area":!0,children:[(0,ye.jsx)(Iv,{id:r,activeView:o,recoverableCount:ke,onChange:a}),i&&(0,ye.jsx)("div",{className:"rd-deposit-tab-panel",id:`${r}-recover-panel`,role:"tabpanel","aria-labelledby":`${r}-recover-tab`,children:me?(0,ye.jsx)(_s,{client:e.client,apiBaseUrl:s,recipient:f,target:le?.symbol,wallet:l,trustedFactories:Qe,targets:(d?.targets.length??0)>0?ge:void 0,targetsLoading:ze,orders:Ne,onRecovered:Me,onRecoverySuccess:e.onRecoverySuccess,onError:e.onError,showTitle:!1}):(0,ye.jsxs)("div",{className:"rd-recover-empty",role:"status","data-variant":"unavailable","data-testid":"rd-recovery-unavailable-note",children:[(0,ye.jsx)("span",{className:"rd-recover-empty-icon","aria-hidden":"true",children:(0,ye.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[(0,ye.jsx)("rect",{x:"5",y:"10",width:"14",height:"10",rx:"2.5",stroke:"currentColor",strokeWidth:"1.7"}),(0,ye.jsx)("path",{d:"M8 10V7.5a4 4 0 0 1 8 0V10",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),(0,ye.jsx)("circle",{cx:"12",cy:"15",r:"1.2",fill:"currentColor"})]})}),(0,ye.jsx)("h3",{className:"rd-recover-empty-title",children:"Recovery unavailable"}),(0,ye.jsx)("p",{className:"rd-recover-empty-copy",children:"Connect a wallet that supports recovery transactions to continue."})]})}),o==="history"&&(0,ye.jsx)("div",{className:"rd-deposit-tab-panel",id:`${r}-history-panel`,role:"tabpanel","aria-labelledby":`${r}-history-tab`,children:b&&f.trim()?(0,ye.jsx)(Us,{orders:Ne,isLoading:p||Ce,error:w??tt,catalog:d,showTitle:!1}):(0,ye.jsx)(ja,{requiresIdentity:!0})}),o==="deposit"&&(0,ye.jsxs)("div",{className:"rd-deposit-tab-panel",id:`${r}-deposit-panel`,role:"tabpanel","aria-labelledby":`${r}-deposit-tab`,children:[p&&(0,ye.jsxs)("div",{className:"rd-skeleton-form","data-testid":"rd-source-skeleton","aria-hidden":"true",children:[(0,ye.jsx)(Os,{}),ae&&e.onRequestConnect&&(0,ye.jsx)("span",{className:"rd-skeleton rd-skeleton-cta"}),(0,ye.jsxs)("section",{className:"rd-stack",children:[(0,ye.jsxs)("div",{className:"rd-field",children:[(0,ye.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"18%"}}),(0,ye.jsxs)("div",{className:"rd-field-row",children:[(0,ye.jsx)("span",{className:"rd-skeleton rd-skeleton-field"}),(0,ye.jsx)("span",{className:"rd-skeleton rd-skeleton-field"})]})]}),ne&&(0,ye.jsxs)("div",{className:"rd-field",children:[(0,ye.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"34%"}}),(0,ye.jsx)("span",{className:"rd-skeleton rd-skeleton-field"})]})]}),(0,ye.jsxs)("div",{className:"rd-field",children:[(0,ye.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"24%"}}),(0,ye.jsx)("span",{className:"rd-skeleton rd-skeleton-field"}),(ee||f.trim().length>0)&&(0,ye.jsxs)(ye.Fragment,{children:[(0,ye.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"58%",marginTop:"0.5rem"}}),(0,ye.jsx)("span",{className:"rd-skeleton rd-skeleton-field"}),ee&&(0,ye.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"82%"}})]})]}),(0,ye.jsx)("span",{className:"rd-skeleton rd-skeleton-notice"})]}),p&&(0,ye.jsx)("p",{className:"rd-sr-only",role:"status",children:"Loading deposit options..."}),w&&(0,ye.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Failed to load configuration: ",w.message]}),X&&(0,ye.jsx)("div",{className:"rd-callout rd-callout-muted",children:ee?"Connect a wallet or provide a recipient address to fetch your deposit address.":"Connect a wallet to fetch your deposit address."}),d&&u&&(0,ye.jsx)(ph,{catalog:d,origin:u,onChangeOrigin:h,amount:x,onChangeAmount:y,showAmountInput:ne,minNotice:V,amountHint:lt,onMax:Ve,recipient:f,onChangeRecipient:c,showRecipientInput:ee,recipientValid:b,balance:g,balanceLoading:v,insufficientBalance:C,targetOptions:j,selectedTarget:le,onChangeTarget:oe,showTargetSelector:F,quote:E,quoteLoading:M,quoteError:z,depositAddress:N,depositAddressLoading:I,depositAddressError:R,arrivalStatus:S,amountSmallestUnits:We,depositState:A,onDeposit:()=>{G()},canDeposit:L&&q,oneClickEnabled:q,locked:ae,onRequestConnect:e.onRequestConnect})]})]})}var Qs=require("react/jsx-runtime");function Eh({asChild:e,children:t}){return(0,Qs.jsx)(Le,{feature:"relay",children:(0,Qs.jsx)(Vo,{asChild:e??t!=null,children:t??(0,Qs.jsx)("button",{type:"button","data-track":"open",children:"Deposit"})})})}var je=_(require("react"),1);var ve=require("react");var Vs=require("react");function Ah(e,t){let[n,r]=(0,Vs.useState)(e);return(0,Vs.useEffect)(()=>{let o=setTimeout(()=>r(e),t);return()=>clearTimeout(o)},[e,t]),n}var Av=500,Lh=56,Mh={chainId:Lh,token:"0x55d398326f99059fF775485246999027B3197955"},Dh=3e4,Mv=5e3;function Lv(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?Dh:Math.max(Mv,e*1e3)}var Dv=[{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}];function Kd(e,t){let n=e.trim();if(!n)return null;try{let r=Ds(n,t);return r>0n?r:null}catch{return null}}function Ph(e={}){let t=(0,ve.useRef)(e);t.current=e;let n=(0,ve.useMemo)(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useDepositAddress: either `client` or `apiBaseUrl` must be provided");return rn({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),r=e.wallet,o=r?.walletAddress,a=!!o,i=r?.walletChainId,[s,l]=(0,ve.useState)(),[d,p]=(0,ve.useState)(!0),[w,u]=(0,ve.useState)();(0,ve.useEffect)(()=>{let re=!1;return p(!0),n.getConfig().then(Ie=>{re||(l(Ie),u(void 0))}).catch(Ie=>{re||u(Ie instanceof Error?Ie:new Error(String(Ie)))}).finally(()=>{re||p(!1)}),()=>{re=!0}},[n]);let h=e.chains,x=(0,ve.useMemo)(()=>{if(!s)return[];if(!h||h.length===0)return s.origins;let re=new Set(h);return s.origins.filter(Ie=>re.has(Ie.chainId))},[s,h]),y=(0,ve.useMemo)(()=>s?{...s,origins:x}:void 0,[s,x]),[f,c]=(0,ve.useState)();(0,ve.useEffect)(()=>{if(f||x.length===0)return;let re=t.current.defaultToken,Ie=re?x.find(U=>U.chainId===re.chainId&&U.token.address.toLowerCase()===re.address.toLowerCase()):void 0;c(Ie??x[0])},[x,f]);let[b,g]=(0,ve.useState)(),v=(0,ve.useCallback)(()=>{nt(void 0),an(!1),Yt(!1),Q(!1),Rt(void 0)},[]),C=(0,ve.useCallback)(re=>{c(re),g(void 0),v()},[v]),N=f?.kind==="svm",[I,R]=(0,ve.useState)(""),S=e.amount!==void 0?e.amount:I,E=(0,ve.useCallback)(re=>{R(re),g(void 0),v()},[v]),M=Ah(S,Av),z=f?Kd(M,f.token.decimals):null,L=f?Kd(S,f.token.decimals):null,[G,A]=(0,ve.useState)(""),[j,le]=(0,ve.useState)(!1),oe=e.recipient!==void 0?e.recipient:G,ne=(0,ve.useCallback)(re=>{A(re),le(!0),g(void 0),v()},[v]);(0,ve.useEffect)(()=>{e.recipient===void 0&&o&&!j&&A(o)},[o,j,e.recipient]);let V=oe.length===0||bt(oe),ee=oe.length>0&&bt(oe)?oe:void 0,[F,q]=(0,ve.useState)(),[ae,X]=(0,ve.useState)(!1),[me,ke]=(0,ve.useState)(0),ze=r?.getBalance;(0,ve.useEffect)(()=>{if(!ze||!o||!f||N){q(void 0),X(!1);return}let re=!1;X(!0);let Ie=f.token.address.toLowerCase()===za?void 0:f.token.address;return ze({chainId:f.chainId,address:o,token:Ie}).then(U=>{re||q({...U,formatted:pn(U.value,U.decimals)})}).catch(()=>{re||q(void 0)}).finally(()=>{re||X(!1)}),()=>{re=!0}},[ze,o,f,N,me]);let ge=F?.value??null,Ne=!N&&L!==null&&ge!==null&&L>ge,[Ce,tt]=(0,ve.useState)(),[Me,Qe]=(0,ve.useState)(!1),[lt,We]=(0,ve.useState)(),Ve=f?.chainId,Ge=f?.token.address,Dt=e.target;(0,ve.useEffect)(()=>{if(!ee||!Ve||!Ge){tt(void 0),We(void 0),Qe(!1);return}let re=!1;return tt(void 0),We(void 0),Qe(!0),(Dt?n.getDepositAddress({user:ee,originChainId:Ve,originCurrency:Ge},Dt):n.getDepositAddress({user:ee,originChainId:Ve,originCurrency:Ge})).then(U=>{re||(tt(U),We(void 0),t.current.onDepositAddress?.(U))}).catch(U=>{if(re)return;tt(void 0);let Oe=U instanceof Error?U:new Error(String(U));We(Oe),t.current.onError?.(Oe)}).finally(()=>{re||Qe(!1)}),()=>{re=!0}},[n,ee,Ve,Ge,Dt]);let tn=[Ve??"",(Ge??"").toLowerCase(),(ee??"").toLowerCase(),Dt??"",S.trim()].join("|"),yt=(0,ve.useRef)(tn);(0,ve.useEffect)(()=>{yt.current!==tn&&(yt.current=tn,g(void 0),v())},[tn,v]);let[Pt,Tt]=(0,ve.useState)(),[nn,It]=(0,ve.useState)(!1),[ft,Ot]=(0,ve.useState)(),rt=z?.toString();(0,ve.useEffect)(()=>{if(!Ve||!Ge||!rt){Tt(void 0),Ot(void 0),It(!1);return}let re=!1,Ie,U=!0;async function Oe(){U&&It(!0);let $=Dh;try{let Pe=await n.getQuote({originChainId:Ve,originCurrency:Ge,amount:rt});if(re)return;Tt(Pe),Ot(void 0),$=Lv(Pe.ttl)}catch(Pe){if(re)return;Tt(void 0),Ot(Pe instanceof Error?Pe:new Error(String(Pe)))}finally{re||It(!1),U=!1}re||(Ie=setTimeout(Oe,$))}return Oe(),()=>{re=!0,Ie&&clearTimeout(Ie)}},[n,Ve,Ge,rt]);let[on,mt]=(0,ve.useState)(!1),[fn,Ze]=(0,ve.useState)(!1),[dt,nt]=(0,ve.useState)(),[Et,Rt]=(0,ve.useState)(),[Xe,an]=(0,ve.useState)(!1),[sn,Yt]=(0,ve.useState)(!1),[ln,Q]=(0,ve.useState)(!1),xe=r?.waitForReceipt,Se=(0,ve.useRef)(void 0);(0,ve.useEffect)(()=>{if(!dt||!f||!xe)return;let re=!1;return an(!0),Yt(!1),Q(!1),xe({chainId:f.chainId,hash:dt}).then(Ie=>{re||(Yt(!0),Q(Ie.status==="reverted"),ke(U=>U+1),Ie.status!=="reverted"&&dt!==Se.current&&(Se.current=dt,t.current.onDeposited?.(dt)))}).catch(Ie=>{re||Rt(Ie instanceof Error?Ie.message:String(Ie))}).finally(()=>{re||an(!1)}),()=>{re=!0}},[dt,xe]);let Fe=i!==void 0&&f!==void 0&&i!==f.chainId,ot=on||fn,Kt=b??Et,Bt="idle";Kt?Bt="error":sn?Bt="confirmed":Xe?Bt="confirming":ot&&(Bt=on?"switching":"pending");let Cn={phase:Bt,isSubmitting:ot,isConfirming:Xe,isConfirmed:sn,needsSwitch:Fe,txHash:dt,reverted:sn&&ln,error:Kt},Rn=!!(f&&Ce&&Ce.originChainId===f.chainId&&Ce.originCurrency.toLowerCase()===f.token.address.toLowerCase()),O=!!(r?.sendTransaction&&r?.writeContract&&r?.readContract&&r?.waitForReceipt),De=!!(a&&O&&f&&!N&&Ce&&Rn&&L&&L>0n&&!Ne&&!ot&&!Xe),qe=(0,ve.useCallback)(async()=>{if(N||!f||!Ce||!r?.sendTransaction||!r?.writeContract)return;g(void 0);let re=Kd(S,f.token.decimals);if(!re||re<=0n){g("enter an amount to use the one-click deposit");return}let Ie=f.token.address.toLowerCase()===za,U=Ce.depositAddress,Oe=await bh(r?.readContract,Lh,{forwarder:Ce.forwarder,recipient:ee,version:Ce.version,trusted:t.current.trustedFactories});if(!Oe.ok){g(`address verification failed: ${Oe.reason}`);return}if(f.chainId===Mh.chainId&&f.token.address.toLowerCase()===Mh.token.toLowerCase()&&!wh(U,Ce.forwarder)){g("address verification failed: deposit address does not match the verified forwarder (expected them to be identical on this route; check the backend's direct_same_token setting)");return}try{if(Fe){if(!r?.switchChain)throw new Error("wallet cannot switch chains");mt(!0);try{await r.switchChain(f.chainId)}finally{mt(!1)}}v(),Ze(!0);try{let Pe=Ie?await r.sendTransaction({chainId:f.chainId,to:U,value:re}):await r.writeContract({chainId:f.chainId,address:f.token.address,abi:Dv,functionName:"transfer",args:[U,re]});nt(Pe)}finally{Ze(!1)}}catch(Pe){g(Pe.message)}},[N,f,Ce,S,Fe,r,ee,v]);return{address:o,isConnected:a,catalog:y,catalogLoading:d,catalogError:w,origin:f,setOrigin:C,recipient:oe,setRecipient:ne,recipientValid:V,amount:S,setAmount:E,balance:F,balanceLoading:ae,insufficientBalance:Ne,isSvmOrigin:N,depositAddress:Ce?.depositAddress,depositAddressResult:Ce,depositAddressLoading:Me,depositAddressError:lt,quote:Pt,quoteLoading:nn,quoteError:ft,canDeposit:De,deposit:qe,depositState:Cn}}var nr=require("react");var Pv=3e4,Ov=300;function Dr(e){let t=(0,nr.useRef)(e);t.current=e;let{client:n,enabled:r=!0,live:o=!0}=e,a=e.refetchInterval??e.fallbackPollMs??Pv,i=e.recipient&&bt(e.recipient)?e.recipient:void 0,[s,l]=(0,nr.useState)([]),[d,p]=(0,nr.useState)(!1),[w,u]=(0,nr.useState)(),[h,x]=(0,nr.useState)(!1),[y,f]=(0,nr.useState)(),[c,b]=(0,nr.useState)(0);return(0,nr.useEffect)(()=>{if(!i){l([]),u(void 0),p(!1),x(!1),f(void 0),b(0);return}if(!r){l([]),u(void 0),p(!1),x(!1),f(void 0),b(0);return}let g=!1,v=!0,C,N=0,I=0;async function R(){let z=++N;I+=1,v&&p(!0);try{let L=await n.listOrders(i);if(g)return;z===N&&(l(L),u(void 0))}catch(L){if(g)return;let G=L instanceof Error?L:new Error(String(L));z===N&&(u(G),t.current.onError?.(G))}finally{I-=1,!g&&z===N&&(p(!1),x(!0),f(i),b(L=>L+1)),v=!1}}function S(){C&&clearTimeout(C),C=setTimeout(()=>{C=void 0,g||R()},Ov)}R();let E;o&&typeof EventSource<"u"&&(E=new EventSource(n.ordersStreamUrl(i)),E.addEventListener("orders-changed",S),E.onopen=()=>{S()});let M=o&&Number.isFinite(a)&&a>0?setInterval(()=>{I===0&&R()},a):void 0;return()=>{g=!0,C&&clearTimeout(C),M&&clearInterval(M),E?.close()}},[n,i,r,o,a]),{orders:s,ordersLoading:d,ordersError:w,ordersInitialized:h,ordersForRecipient:y,ordersRevision:c}}var qs=require("react");function Oh(e,t){if(t){let n=e.find(r=>r.symbol===t);if(n)return n}return e.find(n=>n.isDefault)??e[0]}function Bh({catalogTargets:e,filter:t,defaultTarget:n}){let r=(0,qs.useMemo)(()=>{if(!t||t.length===0)return e;let l=new Set(t);return e.filter(d=>l.has(d.symbol))},[e,t]),[o,a]=(0,qs.useState)(()=>Oh(r,n)?.symbol),i=(o!==void 0?r.find(l=>l.symbol===o):void 0)??Oh(r,n);function s(l){r.some(d=>d.symbol===l)&&a(l)}return{options:r,selected:i,setSelected:s}}var Bv={dev:"https://dev-relay-protocol-api.onechain.nexus",stage:"https://dev-relay-protocol-api.onechain.nexus",production:"https://relay-protocol-api.onechain.nexus"};function Yr(e){return e.apiBaseUrl?e.apiBaseUrl:Bv[it(e.environment)]}var Ks=require("react/jsx-runtime"),zh=1e3;function zv(e,t,n,r,o){let a=e.requireWalletConnection??e.showRecipientInput===!1,i=n.walletAddress&&bt(n.walletAddress)?n.walletAddress:void 0;return{client:e.client,apiBaseUrl:r,wallet:n,chains:e.chains,recipient:a?i??"":e.recipient,amount:a&&!i?"":e.amount,defaultToken:e.defaultToken,target:t,trustedFactories:o,onDepositAddress:e.onDepositAddress,onDeposited:e.onDeposited,onError:e.onError}}function Ys(e,t){let n=e.trim();if(!n)return 0n;try{let r=Ds(n,t);return r>0n?r:0n}catch{return 0n}}function Fv(e,t,n,r){if(t!==void 0&&e.forwarderVersion!==t)return!1;let o=e.target?.trim();return o?!!(n&&o.toLowerCase()===n.toLowerCase()):r}function Fh(e,t,n){return`${e}:${t.toLowerCase()}:${n}`}function Uv(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function Uh({open:e,children:t}){let[n]=je.useState(Jg);return(0,Ks.jsxs)(Wd.Provider,{value:n,children:[e&&(0,Ks.jsx)(jv,{store:n}),t]})}function jv({store:e}){let t=Ba(),{showTargetSelector:n=!0}=t,r=t.requireWalletConnection??t.showRecipientInput===!1,o=!!(t.walletAddress&&bt(t.walletAddress)),[a,i]=je.useState("deposit"),s=a==="recover",l=je.useCallback(Y=>{i(xt=>(typeof Y=="function"?Y(xt==="recover"):Y)?"recover":"deposit")},[]);je.useEffect(()=>{Je("relay","opened")},[]);let[d,p]=je.useState(void 0),w=je.useMemo(()=>Yr({apiBaseUrl:t.apiBaseUrl,environment:t.environment}),[t.apiBaseUrl,t.environment]),u=je.useMemo(()=>({walletAddress:t.walletAddress,walletChainId:t.walletChainId,sendTransaction:t.sendTransaction,writeContract:t.writeContract,readContract:t.readContract,switchChain:t.switchChain,waitForReceipt:t.waitForReceipt,getBalance:t.getBalance}),[t.walletAddress,t.walletChainId,t.sendTransaction,t.writeContract,t.readContract,t.switchChain,t.waitForReceipt,t.getBalance]),h=it(t.environment),x=Xt("apps.json",h,Y=>({min:Bn(Y?.relay?.minDepositAmount,h),max:Bn(Y?.relay?.maxDepositAmount,h),trustedFactories:mi(Y,h)})),y=je.useMemo(()=>t.trustedFactories??Ws(x?.trustedFactories),[t.trustedFactories,x?.trustedFactories]),{isConnected:f,catalog:c,catalogLoading:b,catalogError:g,origin:v,setOrigin:C,amount:N,setAmount:I,recipient:R,setRecipient:S,recipientValid:E,balance:M,balanceLoading:z,insufficientBalance:L,depositAddress:G,depositAddressResult:A,depositAddressLoading:j,depositAddressError:le,quote:oe,quoteLoading:ne,quoteError:V,canDeposit:ee,deposit:F,depositState:q}=Ph(zv(t,d,u,w,y)),{options:ae,selected:X,setSelected:me}=Bh({catalogTargets:c?.targets??[],filter:t.targetTokens,defaultTarget:t.defaultTarget});je.useEffect(()=>{p(X?.symbol)},[X?.symbol]);let ke=t.amount===void 0&&!t.hideAmount,ze=!r&&(t.showRecipientInput??!0)&&t.recipient===void 0,ge=E&&R.trim().length>0&&bt(R),Ne=!r&&t.recipient!==void 0&&t.recipient.trim().length>0,Ce=r?!o||!ge:!f&&!Ne&&!ge,tt=!!c&&!ge&&!Ce,Me=(t.showRecovery??!1)&&o&&!!(u.writeContract&&u.readContract&&u.waitForReceipt),Qe=je.useMemo(()=>t.client?t.client:rn({baseUrl:w}),[t.client,w]),[lt,We]=je.useState({}),[Ve,Ge]=je.useState(!1),[Dt,tn]=je.useState(0),yt=je.useCallback(()=>tn(Y=>Y+1),[]),Pt=q.isConfirmed,Tt=ge&&(!!A||a!=="deposit"),{orders:nn,ordersLoading:It,ordersError:ft,ordersInitialized:Ot,ordersForRecipient:rt}=Dr({client:Qe,recipient:Tt?R:void 0,enabled:Tt,refetchInterval:zh}),on=nn,mt=X??c?.targets.find(Y=>Y.isDefault),fn=mt?.symbol??c?.destination.symbol,Ze=mt?.isDefault??!0,dt=A?.version,nt=je.useMemo(()=>nn.filter(Y=>Fv(Y,dt,fn,Ze)),[nn,dt,fn,Ze]),Et=je.useRef(void 0),[Rt,Xe]=je.useState(),[an,sn]=je.useState(),Yt=`${R.toLowerCase()}:${fn?.toLowerCase()??""}:${dt??""}`;je.useEffect(()=>{let Y=rt?.toLowerCase()===R.toLowerCase();if(!Tt||!Ot||!Y||ft){Tt||(Et.current=void 0,Xe(void 0),sn(void 0));return}let xt=new Set(nt.map(He=>He.orderId)),gt=new Set(nt.flatMap(He=>(He.deposits??[]).map(_n=>Fh(He.orderId,_n.txHash,_n.blockNumber)))),Zt=Et.current;if(!Zt||Zt.key!==Yt){Et.current={key:Yt,orderIds:xt,depositKeys:gt,statuses:new Map(nt.map(He=>[He.orderId,He.status]))},Xe(void 0),sn(void 0);return}let Ut,et=0n,xn=!1;for(let He of nt)for(let _n of He.deposits??[]){let Br=Fh(He.orderId,_n.txHash,_n.blockNumber);if(!Zt.depositKeys.has(Br)){Ut??(Ut=He);try{et+=BigInt(_n.amount),xn=!0}catch{}}}Ut??(Ut=nt.find(He=>!Zt.orderIds.has(He.orderId))),Ut??(Ut=nt.find(He=>Zt.statuses.get(He.orderId)!==He.status));for(let He of xt)Zt.orderIds.add(He);for(let He of gt)Zt.depositKeys.add(He);for(let He of nt)Zt.statuses.set(He.orderId,He.status);Ut&&(Xe(Ut.orderId),xn&&sn(et))},[Yt,nt,rt,Tt,R,ft,Ot]),je.useEffect(()=>{let Y=c?.targets??[];if(!Me||!ge||Y.length===0){We({}),Ge(!1);return}let xt=!1;return Ge(!0),Promise.all(Y.map(gt=>Qe.getRecovery({user:R,target:gt.symbol}).catch(()=>{}))).then(gt=>{if(xt)return;let Zt={};Y.forEach((Ut,et)=>{let xn=gt[et];xn&&(Zt[Ut.symbol]=xn)}),We(Zt),Ge(!1)}),()=>{xt=!0}},[Qe,Me,ge,R,c,Pt,Dt]);let ln=je.useMemo(()=>(c?.targets??[]).map(Y=>({symbol:Y.symbol,isDefault:Y.isDefault,info:lt[Y.symbol]})).filter(Y=>Y.info!==void 0),[c,lt]),Q=je.useMemo(()=>Gs(Qo(ln)),[ln]),[xe,Se]=je.useState(void 0),[Fe,ot]=je.useState(),Kt=!!c&&(c?.targets.length??0)>0&&!d;je.useEffect(()=>{if(!ge||!v||!A||Kt){Se(void 0),ot(void 0);return}let Y=!1,xt=!1,gt=A.forwarder.toLowerCase();Se(void 0),ot(void 0);async function Zt(){if(!(Y||xt)){xt=!0;try{let et=await Qe.getRecovery({user:R,target:d||void 0});if(Y)return;if(et?.forwarder&&et.forwarder.toLowerCase()!==gt){Se(void 0),ot(void 0);return}if(ot(et),!et||et.suggestedAction!=="sweep"){Se(void 0);return}let xn;try{xn=BigInt(et.balance)}catch{Se(void 0);return}let He=Number(et.decimals);if(xn<=0n||!Number.isInteger(He)||He<0){Se(void 0);return}let _n=et.tokens?.find(Br=>Br.address?.toLowerCase()===et.token?.toLowerCase()&&Br.symbol)?.symbol;Se({balance:xn,decimals:He,symbol:_n})}catch{}finally{xt=!1}}}Zt();let Ut=setInterval(()=>{Zt()},zh);return()=>{Y=!0,clearInterval(Ut)}},[Qe,ge,R,d,Kt,v,A,Pt]);let Bt=je.useCallback(()=>{!v||!M||I(pn(M.value,v.token.decimals))},[v,M,I]),Cn=je.useRef(!1),Rn=!!G;je.useEffect(()=>{!Rn||Cn.current||(Cn.current=!0,Je("relay","deposit_address_shown"))},[Rn]);let O=q.txHash;je.useEffect(()=>{O&&Je("relay","deposit_submitted")},[O]);let De=(()=>{let Y=Number(x?.min);return Number.isFinite(Y)&&Y>=0?String(x?.min):"6"})(),qe=(()=>{let Y=Number(x?.max);return Number.isFinite(Y)&&Y>0?String(x?.max):void 0})(),re=(()=>{if(!v)return 0n;let Y=Ys(De,v.token.decimals),xt=BigInt(v.minAmount);return Y>xt?Y:xt})(),Ie=v?pn(re,v.token.decimals):De,U=(()=>{if(!v||!xe||re<=0n)return;let Y=v.token.decimals,xt=xe.decimals,gt=Y>=xt?xe.balance*10n**BigInt(Y-xt):xe.balance/10n**BigInt(xt-Y);if(gt>=re)return;let Zt=re-gt;return{pending:pn(xe.balance,xt),pendingSymbol:xe.symbol,remaining:pn(Zt,Y)}})(),Oe=c?.origins.find(Y=>Y.chainId===56&&!!(Fe?.token&&Y.token.address.toLowerCase()===Fe.token.toLowerCase()))??c?.origins.find(Y=>Y.chainId===56&&Y.token.symbol.toUpperCase()==="USDT"),$=Number.isInteger(Fe?.decimals)&&(Fe?.decimals??-1)>=0?Fe.decimals:Oe?.token.decimals,Pe=Fe?.tokens?.find(Y=>Y.address?.toLowerCase()===Fe.token?.toLowerCase()&&Y.symbol)?.symbol??Oe?.token.symbol,In=an!==void 0&&$!==void 0?pn(an,$):void 0,Zr=(()=>{if(!v||$===void 0)return;let Y=v.token.decimals;if($>=Y)return re*10n**BigInt($-Y);let xt=10n**BigInt(Y-$);return(re+xt-1n)/xt})(),rr=Rt?nt.find(Y=>Y.orderId===Rt):void 0,or=rr??nt.find(Y=>Y.status==="BSC_FUNDED"||Y.status==="BRIDGE_INITIATED"||Y.status==="BRIDGE_PENDING"),Jo=(()=>{if(!or||Zr===void 0)return!1;try{return BigInt(or.amountIn)>=Zr}catch{return!1}})(),gl=(()=>{if(!Fe||Zr===void 0)return!1;try{return BigInt(Fe.balance)>0n&&BigInt(Fe.balance)>=Zr}catch{return!1}})(),hl=(()=>{let Y={amount:In,symbol:Pe,backendStatus:or?.status};return!A||!Tt||!Ot?{phase:"connecting",...Y}:rt?.toLowerCase()!==R.toLowerCase()||ft?{phase:"unavailable",...Y}:rr?.status==="COMPLETED"?{phase:"completed",...Y,backendStatus:rr.status}:rr&&Uv(rr.status)?{phase:"failed",...Y,backendStatus:rr.status}:or?.status==="BRIDGE_INITIATED"||or?.status==="BRIDGE_PENDING"?{phase:"processing",...Y}:or?.status==="BSC_FUNDED"&&Jo||gl?{phase:"funded",...Y}:rr?{phase:"detected",...Y,backendStatus:rr.status}:{phase:"waiting",...Y}})(),Or=v&&qe?Ys(qe,v.token.decimals):void 0,Xr=v&&N.trim()?Ys(N,v.token.decimals):0n,ri=!!(v&&Xr>0n&&Xr<re),Jr=!!(v&&Or!==void 0&&Xr>0n&&Xr>Or),oi=(()=>{if(v){if(ri)return`Amount is below the ${Ie} ${v.token.symbol} minimum.`;if(Jr)return`Amount is above the ${qe} ${v.token.symbol} maximum.`}})(),$r=t.showOneClickDeposit??!1,ai=v&&N.trim()?Ys(N,v.token.decimals).toString():void 0,bl={activeView:a,setActiveView:i,recoveryOpen:s,setRecoveryOpen:l,resolvedApiBaseUrl:w,wallet:u,catalog:c,catalogLoading:b,catalogError:g,origin:v,setOrigin:C,amount:N,setAmount:I,recipient:R,setRecipient:S,recipientValid:E,balance:M,balanceLoading:z,insufficientBalance:L,depositAddress:G,depositAddressLoading:j,depositAddressError:le,arrivalStatus:hl,quote:oe,quoteLoading:ne,quoteError:V,canDeposit:ee,deposit:F,depositState:q,targetOptions:ae,selectedTarget:X,setSelectedTarget:me,showAmountInput:ke,minNotice:v?{min:Ie,symbol:v.token.symbol,...U}:void 0,showRecipientInput:ze,showTargetSelector:n,showOneClick:$r,showConnectPrompt:Ce,showRecipientHint:tt,canRecover:Me,recoverableCount:Q,recoveryTargetsLoading:Ve,recoveryTargets:ln,recoveryOrders:on,historyOrdersLoading:It,historyOrdersError:ft,refreshRecovery:yt,trustedFactories:y,amountHint:oi,amountSmallestUnits:ai,onMax:ke&&M&&M.value>0n?Bt:void 0};return je.useLayoutEffect(()=>{e.publish(bl)}),je.useLayoutEffect(()=>()=>e.publish(null),[e]),null}var Zs=require("react/jsx-runtime");function Wv(e){let{theme:t="dark",mobileBreakpoint:n,drawerDirection:r,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:p}=e,[w,u]=Xs.useState(!1),h=l!==void 0,x=h?l:w,y=Xs.useCallback(f=>{h||u(f),d?.(f)},[h,d]);return(0,Zs.jsx)(jd.Provider,{value:e,children:(0,Zs.jsx)(Uh,{open:x,children:(0,Zs.jsx)(hr,{theme:t,mobileBreakpoint:n,drawerDirection:r,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:x,onOpenChange:y,children:p})})})}var qo=Object.assign(Wv,{Trigger:Eh,Content:Ih});var Js=require("react"),Zd=(0,Js.createContext)(null);function Xd(){let e=(0,Js.useContext)(Zd);if(!e)throw new Error("RelayHistory compound components must be used within <RelayHistory>");return e}var Ln=_(require("react"),1);var Kr=require("react/jsx-runtime");function jh({className:e}){let t=Xd(),{open:n}=$n();return Ln.useEffect(()=>{n&&Je("relay","history_opened")},[n]),(0,Kr.jsx)(Le,{feature:"relay",children:(0,Kr.jsx)(br,{ariaTitle:"Transfer history",className:e??t.className,children:(0,Kr.jsx)(Gv,{})})})}function Gv(){let e=Xd(),{theme:t}=$n(),n=Ln.useMemo(()=>{if(e.client)return e.client;let f=Yr({apiBaseUrl:e.apiBaseUrl,environment:e.environment});return rn({baseUrl:f})},[e.client,e.apiBaseUrl,e.environment]),r=e.recipient??e.walletAddress,o=!!(r&&bt(r)),[a,i]=Ln.useState(),[s,l]=Ln.useState(!1),[d,p]=Ln.useState(),w=Ln.useRef(e.onError);w.current=e.onError,Ln.useEffect(()=>{if(!o){i(void 0),l(!1),p(void 0);return}let f=!1;return i(void 0),l(!0),p(void 0),n.getConfig().then(c=>{f||i(c)}).catch(c=>{if(f)return;let b=c instanceof Error?c:new Error(String(c));p(b),w.current?.(b)}).finally(()=>{f||l(!1)}),()=>{f=!0}},[n,o]);let{orders:u,ordersLoading:h,ordersError:x}=Dr({client:n,recipient:o?r:void 0,enabled:!!a,onError:e.onError}),y=Ln.useCallback(f=>{if(!e.onOutlink)return;let b=f.target.closest?.('a[target="_blank"]');b?.href&&e.onOutlink(b.href)},[e.onOutlink]);return(0,Kr.jsx)("div",{className:"rd-root rd-wizard","data-theme":t,children:o?(0,Kr.jsx)("div",{onClick:y,children:(0,Kr.jsx)(Us,{orders:u,isLoading:s||h,error:d??x,catalog:a,showTitle:!1})}):(0,Kr.jsx)(ja,{requiresIdentity:!0})})}var $s=require("react/jsx-runtime");function Wh({asChild:e,children:t}){return(0,$s.jsx)(Le,{feature:"relay",children:(0,$s.jsx)(Vo,{asChild:e??t!=null,children:t??(0,$s.jsx)("button",{type:"button","data-track":"open",children:"History"})})})}var Jd=require("react/jsx-runtime");function Hv(e){let{theme:t="dark",mobileBreakpoint:n,drawerDirection:r,dialogWidth:o="min(640px, calc(100vw - 32px))",drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:p}=e;return(0,Jd.jsx)(Zd.Provider,{value:e,children:(0,Jd.jsx)(hr,{theme:t,mobileBreakpoint:n,drawerDirection:r,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:p})})}var $d=Object.assign(Hv,{Trigger:Wh,Content:jh});var Gn=_(require("react"),1);var Dn=_(require("react"),1);var el=[],_v=3e4;function Gh({client:e,recipient:t}){let[n,r]=Dn.useState({targets:el}),[o,a]=Dn.useState(0),i=Dn.useRef(void 0),s=Dn.useRef(void 0),l=t&&bt(t)?t.toLowerCase():void 0;Dn.useEffect(()=>{if(!l){r({targets:el});return}let y=!1,f=i.current;if(!f||f.client!==e||f.recipientKey!==l||f.generation!==o){let c=(async()=>{let b,g=[];try{g=(await e.getConfig()).targets}catch(R){b=R instanceof Error?R:new Error(String(R))}let v=g.length===0?[()=>e.getRecovery({user:l})]:g.map(R=>()=>e.getRecovery({user:l,target:R.symbol})),C=await Promise.all(v.map(async R=>{try{return{info:await R()}}catch(S){return{error:S instanceof Error?S:new Error(String(S))}}})),N=g.length===0?C[0]?.info?[{symbol:"",isDefault:!0,info:C[0].info}]:[]:g.flatMap((R,S)=>C[S]?.info?[{symbol:R.symbol,isDefault:R.isDefault,info:C[S].info}]:[]),I=C.find(R=>R.error)?.error;return{targets:N,badgeFailed:!!(b||I&&N.length===0),error:b??I}})().catch(b=>({targets:el,badgeFailed:!0,error:b instanceof Error?b:new Error(String(b))}));f={client:e,recipientKey:l,generation:o,promise:c},i.current=f,c.finally(()=>{s.current={client:e,recipientKey:l,at:Date.now()},i.current?.promise===c&&(i.current=void 0)})}return f.promise.then(c=>{y||r({recipientKey:l,targets:c.targets,badgeFailed:c.badgeFailed,error:c.error})}),()=>{y=!0}},[e,l,o]);let d=Dn.useCallback(()=>a(y=>y+1),[]),p=Dn.useCallback(()=>{if(!l)return;let y=i.current;if(y?.client===e&&y.recipientKey===l)return;let f=s.current;f?.client===e&&f.recipientKey===l&&Date.now()-f.at<_v||a(c=>c+1)},[e,l]),w=l&&n.recipientKey===l?n.targets:el,u=l&&n.recipientKey===l?n.error:void 0,h=!!(l&&n.recipientKey!==l),x=!!(l&&n.recipientKey===l&&n.badgeFailed);return Dn.useMemo(()=>({count:x?0:Gs(Qo(w)),targets:w,loading:h,error:u,refresh:d,refreshIfStale:p}),[w,h,x,u,d,p])}var tl=require("react"),ec=(0,tl.createContext)(null);function tc(){let e=(0,tl.useContext)(ec);if(!e)throw new Error("RelayRecovery compound components must be used within <RelayRecovery>");return e}function nc(){return tc().props}function Hh(){return tc().recovery}function _h(){return tc().recovery.count}var Ro=_(require("react"),1);var wr=require("react/jsx-runtime");function Qh({className:e}){let t=nc(),{open:n}=$n();return Ro.useEffect(()=>{n&&Je("relay","recovery_opened")},[n]),(0,wr.jsx)(Le,{feature:"relay",children:(0,wr.jsx)(br,{ariaTitle:"Recover stuck funds",className:e??t.className,children:(0,wr.jsx)(Qv,{})})})}function Qv(){let e=nc(),{targets:t,loading:n,refresh:r}=Hh(),{theme:o}=$n(),a=Ro.useMemo(()=>Yr({apiBaseUrl:e.apiBaseUrl,environment:e.environment}),[e.apiBaseUrl,e.environment]),i=Ro.useMemo(()=>e.client?e.client:rn({baseUrl:a}),[e.client,a]),s=Ro.useMemo(()=>({walletAddress:e.walletAddress,walletChainId:e.walletChainId,sendTransaction:e.sendTransaction,writeContract:e.writeContract,readContract:e.readContract,switchChain:e.switchChain,waitForReceipt:e.waitForReceipt,getBalance:e.getBalance}),[e.walletAddress,e.walletChainId,e.sendTransaction,e.writeContract,e.readContract,e.switchChain,e.waitForReceipt,e.getBalance]),l=e.walletAddress&&bt(e.walletAddress)?e.walletAddress:void 0,d=!!(l&&(!e.recipient||bt(e.recipient)&&e.recipient.toLowerCase()===l.toLowerCase())),p=d?l:void 0,w=it(e.environment),u=Xt("apps.json",w,b=>mi(b,w)),h=Ro.useMemo(()=>e.trustedFactories??Ws(u),[e.trustedFactories,u]),x=!!(e.writeContract&&e.readContract&&e.waitForReceipt),y=!!p&&x,f=p,{orders:c}=Dr({client:i,recipient:y?f:void 0,enabled:y,live:!1});return(0,wr.jsxs)("div",{className:"rd-root rd-wizard","data-theme":o,children:[!l&&(0,wr.jsx)("p",{className:"rd-muted","data-testid":"rd-recovery-connect-note",children:"Connect a wallet to check recoverable funds."}),l&&!d&&(0,wr.jsx)("p",{className:"rd-muted","data-testid":"rd-recovery-recipient-note",children:"Recovery is only available for the connected wallet."}),d&&!x&&(0,wr.jsx)("p",{className:"rd-muted","data-testid":"rd-recovery-unsupported-note",children:"This wallet can't sign recovery transactions."}),y&&(0,wr.jsx)(_s,{client:e.client,apiBaseUrl:a,recipient:p,wallet:s,trustedFactories:h,targets:t,targetsLoading:n,orders:c,onRecovered:r,onRecoverySuccess:e.onRecoverySuccess,showTitle:!1,onError:e.onError})]})}var nl=require("react/jsx-runtime");function Vh({asChild:e,children:t}){let n=_h();return(0,nl.jsx)(Le,{feature:"relay",children:(0,nl.jsx)(Vo,{asChild:e??t!=null,dataAttributes:{"data-rd-recovery-count":n},children:t??(0,nl.jsx)("button",{type:"button","data-track":"open",children:"Recover"})})})}var rc=require("react/jsx-runtime");function Vv(e){let{theme:t="dark",mobileBreakpoint:n,drawerDirection:r,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:p}=e,[w,u]=Gn.useState(!1),h=l!==void 0,x=h?l:w,y=Gn.useCallback(N=>{h||u(N),d?.(N)},[h,d]),f=Gn.useMemo(()=>{if(e.client)return e.client;let N=Yr({apiBaseUrl:e.apiBaseUrl,environment:e.environment});return rn({baseUrl:N})},[e.client,e.apiBaseUrl,e.environment]),c=e.walletAddress&&bt(e.walletAddress)?e.walletAddress:void 0,b=c&&(!e.recipient||bt(e.recipient)&&e.recipient.toLowerCase()===c.toLowerCase())?c:void 0,g=Gh({client:f,recipient:b});Gn.useEffect(()=>{x&&g.refreshIfStale()},[x,g.refreshIfStale]);let v=Gn.useRef(void 0);Gn.useEffect(()=>{!x||!g.error||v.current===g.error||(v.current=g.error,e.onError?.(g.error))},[x,g.error,e.onError]);let C=Gn.useMemo(()=>({props:e,recovery:g}),[e,g]);return(0,rc.jsx)(ec.Provider,{value:C,children:(0,rc.jsx)(hr,{theme:t,mobileBreakpoint:n,drawerDirection:r,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:x,onOpenChange:y,children:p})})}var oc=Object.assign(Vv,{Trigger:Vh,Content:Qh});var Pn=require("react");function ac(e={}){let t=(0,Pn.useRef)(e);t.current=e;let n=(0,Pn.useMemo)(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRelayConfig: either `client` or `apiBaseUrl` must be provided");return rn({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),r=e.enabled??!0,o=e.refetchInterval,[a,i]=(0,Pn.useState)(),[s,l]=(0,Pn.useState)(!1),[d,p]=(0,Pn.useState)(),[w,u]=(0,Pn.useState)(0);(0,Pn.useEffect)(()=>{if(!r){i(void 0),l(!1),p(void 0);return}let x=!1,y=!1;i(void 0),l(!0),p(void 0);async function f(){if(!(x||y)){y=!0;try{let b=await n.getConfig();if(x)return;i(b),p(void 0)}catch(b){if(x)return;let g=b instanceof Error?b:new Error(String(b));p(g),t.current.onError?.(g)}finally{y=!1,x||l(!1)}}}f();let c=typeof o=="number"&&Number.isFinite(o)&&o>0?setInterval(()=>{f()},o):void 0;return()=>{x=!0,c&&clearInterval(c)}},[n,r,w,o]);let h=(0,Pn.useCallback)(()=>u(x=>x+1),[]);return{config:a,loading:s,error:d,refresh:h}}var Yh=require("@tanstack/react-query"),Hn=require("react");var qv=1,qh=new WeakMap;function Yv(e){let t=qh.get(e);if(t!==void 0)return t;let n=qv++;return qh.set(e,n),n}function ic(e={}){let t=(0,Hn.useRef)(e);t.current=e;let n=(0,Hn.useMemo)(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRelayRecovery: either `client` or `apiBaseUrl` must be provided");return rn({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),r=e.recipient,o=r&&bt(r)?r:void 0,a=e.target,i=e.query,s=(0,Hn.useMemo)(()=>Yv(n),[n]),l=(0,Hn.useMemo)(()=>["relay","recovery",s,o??null,a??null],[s,o,a]),d=(0,Yh.useQuery)({retry:!1,...i,queryKey:l,queryFn:async()=>{if(!o)throw new Error("useRelayRecovery: a valid EVM recipient is required");return n.getRecovery({user:o,target:a})},enabled:o?i?.enabled:!1}),p=(0,Hn.useRef)(0);(0,Hn.useEffect)(()=>{let y=d.error,f=d.errorUpdatedAt;!y||f===p.current||(p.current=f,t.current.onError?.(y),y instanceof Wn&&y.status===401&&t.current.onUnauthorized?.())},[d.error,d.errorUpdatedAt]);let w=(0,Hn.useCallback)(()=>{d.refetch()},[d.refetch]),u=Wa({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:w}),h=d.data,x=(0,Hn.useCallback)(async(y,f)=>{h&&await u.recover(h,y,f)},[u,h]);return{info:h,loading:d.isLoading,error:d.error??void 0,isFetching:d.isFetching,refresh:w,recover:x,recoveryState:u.stateFor(h?.forwarder)}}var st=require("react/jsx-runtime"),Kv={bscBridge:"https://bscscan.com/tx/",crossFinalize:"https://scan.crosstoken.io/tx/",crossExecute:"https://scan.crosstoken.io/tx/"},Zv={bscBridge:"Bridge tx (BSC)",crossFinalize:"Finalize tx (CROSS)",crossExecute:"Execute tx (CROSS)"};function Xv(e){return e==="done"?"\u2713":e==="active"?"\u25CF":""}function Kh(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function Jv(e){return e==="done"?"rd-stepper-item rd-stepper-item-done":e==="active"?"rd-stepper-item rd-stepper-item-active":"rd-stepper-item rd-stepper-item-pending"}function lc({orderId:e,order:t,error:n}){let r=!t&&!n;return(0,st.jsxs)("section",{className:"rd-card",children:[(0,st.jsxs)("div",{className:"rd-card-header",children:[(0,st.jsx)("h2",{className:"rd-card-title",children:"4. Status"}),t&&(0,st.jsx)("span",{className:`rd-status-pill${t.status==="COMPLETED"?" rd-status-pill-success":Kh(t.status)?" rd-status-pill-failure":""}`,children:t.status})]}),(0,st.jsxs)("p",{className:"rd-card-hint",children:["Order ",e]}),r&&(0,st.jsxs)("p",{className:"rd-muted",children:[(0,st.jsx)("span",{className:"rd-spinner"})," Loading status..."]}),n&&(0,st.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Couldn't load order status: ",n.message]}),t&&(0,st.jsxs)(st.Fragment,{children:[(0,st.jsx)("ol",{className:"rd-stepper",children:t.steps.map((o,a)=>(0,st.jsxs)("li",{className:Jv(o.status),children:[(0,st.jsxs)("div",{className:"rd-stepper-rail",children:[(0,st.jsx)("span",{className:"rd-stepper-dot",children:Xv(o.status)}),a<t.steps.length-1&&(0,st.jsx)("span",{className:"rd-stepper-line"})]}),(0,st.jsxs)("div",{className:"rd-stepper-body",children:[(0,st.jsx)("div",{className:"rd-stepper-label",children:o.label}),o.key==="bridge"&&t.txs.bscBridge&&(0,st.jsx)("div",{className:"rd-stepper-meta",children:(0,st.jsx)(sc,{orderTxs:t.txs,txKey:"bscBridge"})}),o.key==="deliver"&&(t.txs.crossFinalize||t.txs.crossExecute)&&(0,st.jsxs)("div",{className:"rd-stepper-meta",children:[t.txs.crossFinalize&&(0,st.jsx)(sc,{orderTxs:t.txs,txKey:"crossFinalize"}),t.txs.crossExecute&&(0,st.jsx)(sc,{orderTxs:t.txs,txKey:"crossExecute"})]})]})]},o.key))}),Kh(t.status)&&(0,st.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["This order did not complete successfully (status: ",t.status,"). If funds were deposited, refer to the refund address on the order for recovery."]}),t.status==="COMPLETED"&&(0,st.jsx)("div",{className:"rd-callout rd-callout-success",children:"crossd delivered. This order is complete."})]})]})}function sc({orderTxs:e,txKey:t}){let n=e[t];return n?(0,st.jsxs)("a",{href:`${Kv[t]}${n}`,target:"_blank",rel:"noreferrer",children:[Zv[t],": ",n.slice(0,10),"..."]}):null}function Ha(e){return`${e.chainId}:${e.address.toLowerCase()}`}function rl(e,t){return Ha(e)===Ha(t)}function _a(e,t){if(t)return e.find(n=>rl(n,t))}function Yo(e,t,n){return t?{fromTokens:(n==="swap"?[t.swap.from]:t.bridge.from).map(o=>_a(e,o)).filter(o=>!!o),targetToken:_a(e,t.target)}:{fromTokens:[],targetToken:void 0}}function Qa(e,t){return e.some(n=>n.chainId===t.chainId&&n.address.toLowerCase()===t.address.toLowerCase())}function Zh(e){let t=/^v?(\d+(?:\.\d+)*)(?:-([0-9A-Za-z.-]+))?$/.exec(e.trim());return t?{parts:t[1].split(".").map(n=>Number(n)),prerelease:t[2]??null}:null}function $v(e,t){let n=Zh(e),r=Zh(t);if(!n||!r)return null;let o=Math.max(n.parts.length,r.parts.length);for(let a=0;a<o;a+=1){let i=(n.parts[a]??0)-(r.parts[a]??0);if(i!==0)return i<0?-1:1}return n.prerelease===r.prerelease?0:n.prerelease===null?1:r.prerelease===null||n.prerelease<r.prerelease?-1:1}function Xh(e,t=to){if(!e)return!0;let n=$v(t,e);return n===null?!0:n>=0}var Jh={swap:"swap",bridge:"bridge",transfer:"transferCrypto",stake:"stake"};function Ko(e,t){return t?.[Jh[e]]??e!=="transfer"}function Zo(e,t){return Xh(t?.[Jh[e]])}function Va(e,t,n){return Ko(e,t)&&Zo(e,n)}var $h={dev:"https://stg.oneusd.money/",stage:"https://stg.oneusd.money/",production:"https://www.oneusd.money/"};function e0(e){let t=e.trim().toLowerCase().replace(/\.$/,"");return t==="oneusd.money"||t.endsWith(".oneusd.money")}function t0(e,t){return e?.items?.find(({id:r,type:o})=>r.toLowerCase()==="oneusd"||o.toLowerCase()==="oneusd")?.url[t]}var ol=_(require("react"),1);var e2="contracts.json",t2=/^0x[0-9a-fA-F]{40}$/;function n0(e){return typeof e=="string"&&t2.test(e)?e:void 0}function n2(e,t,n){let r=n0(n);if(r)return r;let o=e?.envToNetwork?.[t]??(t==="production"?"mainnet":"testnet"),a=e?.soneusd?.VAULT;return n0(typeof a=="string"?a:a?.[o])}function r0(e,t){let[n,r]=ol.useState(void 0);ol.useEffect(()=>{let a=!0;return r(void 0),vr(e2,e).then(i=>{a&&r(i)}),()=>{a=!1}},[e]);let o=n2(n,e,t);return{loading:n===void 0&&!o,address:o}}var o0=(1n<<256n)-1n,dc=[{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],al=[{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"previewDeposit",stateMutability:"view",inputs:[{name:"assets",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"paused",stateMutability:"view",inputs:[],outputs:[{name:"",type:"bool"}]},{type:"function",name:"deposit",stateMutability:"nonpayable",inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"}],outputs:[{name:"shares",type:"uint256"}]}];function qa(e){if(typeof e=="bigint")return e;if(typeof e=="number"&&Number.isSafeInteger(e)||typeof e=="string"&&/^(0x[0-9a-fA-F]+|\d+)$/.test(e))return BigInt(e);throw new Error("Unexpected contract read result")}var il=_(require("react"),1);function a0(e){let[t,n]=il.useState(null);return il.useEffect(()=>{if(!e)return;let r=!0;return Jl().then(o=>{r&&n(o)}).catch(()=>{}),()=>{r=!1}},[e]),t}function i0(e,t){return t==="bridge"?!0:e==="bridge"||e==="bridge-swap"||e==="swap-bridge"}function r2(e){if(!e)return"";let[t="0",n=""]=e.replace(/,/g,"").split("."),o=(t.replace(/^0+(?=\d)/,"")||"0").replace(/\B(?=(\d{3})+(?!\d))/g,","),a=n.slice(0,6).replace(/0+$/,"");return a?`${o}.${a}`:o}function o2(e){return e===56||e===97?"BSC":e===612044||e===612055||e===5555?"ONEchain":`Chain ${e}`}function s0(e,t){return i0(e.pathType,t)?"Bridging":"Swapping"}function l0(e,t){let n=r2(e.toAmount);if(i0(e.pathType,t)){let r=`arriving on ${o2(e.toToken.chainId)}`;return n?`${n} ${r}`:r}return n?`${n} Swapped`:"Transaction completed"}var Vt=require("react/jsx-runtime");function d0(e){return(0,Vt.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:(0,Vt.jsx)("path",{d:"m7 3-3 3 3 3M4 6h13a3 3 0 0 1 3 3v1M17 21l3-3-3-3m3 3H7a3 3 0 0 1-3-3v-1",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})}function c0(e){return(0,Vt.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[(0,Vt.jsx)("path",{d:"M10 13a4 4 0 0 0 5.66 0l2.83-2.83a4 4 0 0 0-5.66-5.66L11.4 5.94",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),(0,Vt.jsx)("path",{d:"M14 11a4 4 0 0 0-5.66 0L5.51 13.8a4 4 0 0 0 5.66 5.66l1.42-1.41",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})]})}function p0(e){return(0,Vt.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[(0,Vt.jsx)("rect",{x:"4",y:"4",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),(0,Vt.jsx)("rect",{x:"14",y:"4",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),(0,Vt.jsx)("rect",{x:"4",y:"14",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),(0,Vt.jsx)("path",{d:"M14 14h2v2h-2zM18 18h2v2h-2z",fill:"currentColor"})]})}function u0(e){return(0,Vt.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[(0,Vt.jsx)("ellipse",{cx:"12",cy:"6.5",rx:"7",ry:"2.5",stroke:"currentColor",strokeWidth:"1.7"}),(0,Vt.jsx)("path",{d:"M5 6.5v4c0 1.38 3.13 2.5 7 2.5s7-1.12 7-2.5v-4",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),(0,Vt.jsx)("path",{d:"M5 10.5v4c0 1.38 3.13 2.5 7 2.5s7-1.12 7-2.5v-4",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),(0,Vt.jsx)("path",{d:"M5 14.5v3c0 1.38 3.13 2.5 7 2.5s7-1.12 7-2.5v-3",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})]})}function sl(e){return(0,Vt.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:(0,Vt.jsx)("path",{d:"m9 6 6 6-6 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function ll(e){return(0,Vt.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:(0,Vt.jsx)("path",{d:"m6 6 12 12M18 6 6 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}var en=_(require("react"),1);var dl=_(require("react"),1),a2={dev:"https://stg-crossd-dashboard-api.crossdefi.io/api/v1/earnings/overview",stage:"https://stg-crossd-dashboard-api.crossdefi.io/api/v1/earnings/overview",production:"https://crossd-dashboard-api.crossdefi.io/api/v1/earnings/overview"},i2=6e4,f0=new Map,cc=new Map;function s2(e){let t=a2[e],n=f0.get(t);if(n&&n.expiresAt>Date.now())return Promise.resolve(n.value);let r=cc.get(t);if(r)return r;let o=(async()=>{let a=await fetch(t,{cache:"no-store"});if(!a.ok)throw new Error(`Failed to fetch sONEUSD yield: ${a.status}`);let i=await a.json();if(i.code!==200)throw new Error(`sONEUSD yield API error: ${i.code}`);let s=i.data?.yield,l=s?.available&&Number.isFinite(s.apr_bps)&&Number.isFinite(s.apy_bps)?{aprBps:s.apr_bps,apyBps:s.apy_bps}:null;return f0.set(t,{value:l,expiresAt:Date.now()+i2}),l})().finally(()=>{cc.delete(t)});return cc.set(t,o),o}function m0(e){let t=Math.trunc(e/100),n=Math.abs(Math.trunc(e%100));return`${t}.${String(n).padStart(2,"0")}`}function g0(e,t){let[n,r]=dl.useState(void 0);return dl.useEffect(()=>{if(!t)return;let o=!0;return s2(e).then(a=>{o&&r(a)}).catch(()=>{o&&r(null)}),()=>{o=!1}},[t,e]),n}var Ye=require("react/jsx-runtime"),No="sONEUSD",l2=300,cl=6,h0=[25,50,75,100];function b0(e,t){return t>=100?e:e*BigInt(t)/100n}function w0(e){return e instanceof Error?e.message:typeof e=="string"?e:"Transaction failed"}function d2(e,t){let n=e.replace(/[^\d.]/g,""),[r="",...o]=n.split(".");return o.length===0?r:`${r}.${o.join("").slice(0,t)}`}function c2(e,t,n,r){let[o,a]=en.useState(null),[i,s]=en.useState(null),[l,d]=en.useState(0),p=en.useCallback(()=>d(u=>u+1),[]),{readContract:w}=e;return en.useEffect(()=>{if(!r){a(null);return}let u=!1;s(null);let h=r,x={chainId:t.chainId,address:t.address,abi:dc},y={chainId:t.chainId,address:n,abi:al};return Promise.all([w({...x,functionName:"balanceOf",args:[h]}),w({...x,functionName:"allowance",args:[h,n]}),w({...y,functionName:"balanceOf",args:[h]}),w({...y,functionName:"paused",args:[]})]).then(([f,c,b,g])=>{u||a({balance:qa(f),allowance:qa(c),shares:qa(b),paused:g===!0})}).catch(f=>{u||s(w0(f))}),()=>{u=!0}},[w,t.address,t.chainId,n,r,l]),{position:o,error:i,refetch:p}}function p2(e,t,n,r){let[o,a]=en.useState(null);return en.useEffect(()=>{if(r===null){a(null);return}let i=!1,s=setTimeout(()=>{e({chainId:t.chainId,address:n,abi:al,functionName:"previewDeposit",args:[r]}).then(l=>{i||a(qa(l))}).catch(()=>{i||a(null)})},l2);return()=>{i=!0,clearTimeout(s)}},[r,e,t.chainId,n]),o}function y0({env:e,walletAddress:t,walletChainId:n,token:r,vaultAddress:o,ports:a,locked:i,onRequestConnect:s,onBack:l,onClose:d,onSubmitted:p,onFailed:w}){let[u,h]=en.useState(""),[x,y]=en.useState("idle"),[f,c]=en.useState(null),b=en.useRef(!0);en.useEffect(()=>(b.current=!0,()=>{b.current=!1}),[]);let{position:g,error:v,refetch:C}=c2(a,r,o,t),N=g0(e,!0),I=en.useMemo(()=>u.trim()?Rr(u,r.decimals):null,[u,r.decimals]),R=I&&"value"in I?I.value:null,S=R!==null&&g!==null&&R>g.balance,E=I&&"error"in I?I.error:S?`Exceeds your ${r.symbol} balance.`:null,M=p2(a.readContract,r,o,R!==null&&!S?R:null),z=x!=="idle",L=R!==null&&g!==null&&g.allowance<R,G=!z&&!i&&!!t&&g!==null&&!g.paused&&R!==null&&!S,A=en.useCallback(V=>{if(!g||z)return;let ee=b0(g.balance,V);h(ee>0n?dr(ee,r.decimals,r.decimals):""),c(null)},[z,g,r.decimals]),j=R!==null&&g!==null&&g.balance>0n?h0.find(V=>b0(g.balance,V)===R)??null:null,le=en.useCallback(async()=>{if(!G||!t||R===null||!g)return;let V=t;c(null);try{if(n!==void 0&&n!==r.chainId){if(!a.switchChain)throw new Error(`Switch your wallet to chain ${r.chainId} first.`);y("switching"),await a.switchChain(r.chainId)}if(g.allowance<R){y("approving");let F=await a.writeContract({chainId:r.chainId,address:r.address,abi:dc,functionName:"approve",args:[o,o0]});if(a.waitForReceipt&&(y("confirming-approval"),(await a.waitForReceipt({chainId:r.chainId,hash:F})).status!=="success"))throw new Error("Approval reverted.");if(!b.current)return;C()}y("staking");let ee=await a.writeContract({chainId:r.chainId,address:o,abi:al,functionName:"deposit",args:[R,V]});if(!b.current)return;y("idle"),h(""),p({txHash:ee,chainId:r.chainId,amount:R,amountText:dr(R,r.decimals,cl)})}catch(ee){if(!b.current)return;let F=w0(ee);y("idle"),c(F),w(F)}},[R,G,w,p,a,g,C,r.address,r.chainId,r.decimals,o,t,n]),oe=x==="switching"?"Switching network...":x==="approving"?`Approve ${r.symbol} in your wallet...`:x==="confirming-approval"?"Confirming approval...":x==="staking"?"Confirm in your wallet...":L?`Approve ${r.symbol}`:"Stake",ne=f??E??v;return(0,Ye.jsxs)("div",{className:"gou-chooser-body gou-stake","data-busy":z?"true":"false",children:[(0,Ye.jsx)("button",{type:"button",className:"gou-close",onClick:d,disabled:z,"aria-label":"Close",children:(0,Ye.jsx)(ll,{})}),(0,Ye.jsxs)("header",{className:"gou-intro gou-stake-header",children:[(0,Ye.jsx)("button",{type:"button",className:"gou-stake-back",onClick:l,disabled:z,"aria-label":"Back",children:(0,Ye.jsx)(sl,{})}),(0,Ye.jsxs)("h2",{children:["Stake ",r.symbol]})]}),(0,Ye.jsxs)("form",{className:"gou-stake-form",onSubmit:V=>{V.preventDefault(),le()},children:[(0,Ye.jsxs)("div",{className:"gou-stake-row",children:[(0,Ye.jsx)("label",{htmlFor:"gou-stake-amount",children:"Amount"}),(0,Ye.jsxs)("span",{children:["Balance:"," ",(0,Ye.jsxs)("strong",{className:"gou-stake-balance",children:[g?dr(g.balance,r.decimals,cl):t?"\u2026":"0"," ",r.symbol]})]})]}),(0,Ye.jsxs)("div",{className:"gou-stake-input","data-invalid":ne?"true":"false",children:[(0,Ye.jsx)("input",{id:"gou-stake-amount",type:"text",inputMode:"decimal",autoComplete:"off",placeholder:"0",value:u,disabled:z,onChange:V=>{h(d2(V.target.value,r.decimals)),c(null)}}),(0,Ye.jsx)("span",{children:r.symbol})]}),(0,Ye.jsx)("div",{className:"gou-stake-quick",role:"group","aria-label":"Quick amount",children:h0.map(V=>(0,Ye.jsx)("button",{type:"button","aria-pressed":j===V,disabled:z||!g||g.balance===0n,onClick:()=>A(V),"data-track":"stake_quick_amount","data-track-id":String(V),children:V>=100?"MAX":`${V}%`},V))}),ne&&(0,Ye.jsx)("p",{className:"gou-stake-error",role:"alert",children:ne}),(0,Ye.jsxs)("dl",{className:"gou-stake-estimate",children:[N&&(0,Ye.jsxs)("div",{children:[(0,Ye.jsx)("dt",{title:"Annualized without compounding. Trailing 7-day vault yield.",children:"APR"}),(0,Ye.jsxs)("dd",{className:"gou-stake-apr",children:[m0(N.aprBps),"%"]})]}),(0,Ye.jsxs)("div",{children:[(0,Ye.jsx)("dt",{children:"You receive"}),(0,Ye.jsx)("dd",{children:M!==null?`\u2248 ${dr(M,r.decimals,cl)} ${No}`:`0 ${No}`})]}),(0,Ye.jsxs)("div",{children:[(0,Ye.jsxs)("dt",{children:["Your ",No]}),(0,Ye.jsx)("dd",{className:"gou-stake-shares",children:g?`${dr(g.shares,r.decimals,cl)} ${No}`:t?"\u2026":`0 ${No}`})]})]}),g?.paused&&(0,Ye.jsx)("p",{className:"gou-stake-error",role:"alert",children:"Staking is paused right now. Try again later."}),t?(0,Ye.jsx)("button",{type:"submit",className:"gou-stake-submit",disabled:!G,"data-track":"stake_submit",children:oe}):(0,Ye.jsx)("button",{type:"button",className:"gou-stake-submit",onClick:s,"data-track":"connect_click","aria-label":"Connect wallet to continue",children:"Connect Wallet"})]})]})}he(`.gou-fab{--gou-collapse-duration: .24s;--gou-collapse-ease: cubic-bezier(.32, .72, 0, 1);position:fixed;right:var(--gou-right, 2rem);bottom:calc(env(safe-area-inset-bottom,0px) + var(--gou-bottom, 2rem));z-index:var(--gou-z-index, 40);display:inline-flex;width:max-content;align-items:center;gap:8px;padding:4px 20px 4px 4px;border:0;border-radius:9999px;background:#fff;color:#121212;box-shadow:0 4px 20px #00000073;font:inherit;cursor:pointer;transition:gap var(--gou-collapse-duration) var(--gou-collapse-ease),padding var(--gou-collapse-duration) var(--gou-collapse-ease),transform .15s ease,background .15s ease;-webkit-tap-highlight-color:transparent}[data-theme=light] .gou-fab{background:#121212;color:#fff;box-shadow:0 4px 20px #00000040}.gou-fab:active:not(:disabled){transform:scale(.96)}.gou-fab:focus-visible{outline:3px solid #f3742e;outline-offset:3px}.gou-fab[data-icon-only=true]{gap:0;padding:0}.gou-fab:disabled{cursor:default}.gou-fab[data-trigger-mode=button]{position:relative;right:auto;bottom:auto;z-index:auto;vertical-align:middle}[data-gou-mode=button]{display:inline-block}.gou-fab-status{pointer-events:none;cursor:default}.gou-fab-icon-frame{position:relative;display:inline-flex;width:38px;height:38px;flex-shrink:0;border-radius:9999px;transition:width var(--gou-collapse-duration) var(--gou-collapse-ease),height var(--gou-collapse-duration) var(--gou-collapse-ease)}.gou-fab-icon{display:block;width:100%;height:100%;border-radius:inherit;object-fit:contain}.gou-fab[data-icon-only=true] .gou-fab-icon-frame{width:52px;height:52px}.gou-fab-progress-ring{position:absolute;inset:-2px;border:2px solid rgba(243,116,46,.25);border-top-color:#f3742e;border-radius:9999px;animation:gou-spin .9s linear infinite}.gou-fab-label{overflow:hidden;max-width:180px;opacity:1;font-size:14px;font-weight:600;line-height:1.5;white-space:nowrap;transition:max-width var(--gou-collapse-duration) var(--gou-collapse-ease),opacity calc(var(--gou-collapse-duration) * .6) var(--gou-collapse-ease)}.gou-fab[data-icon-only=true] .gou-fab-label{max-width:0;opacity:0}.gou-fab[data-tx-phase] .gou-fab-label{max-width:260px}.gou-fab-trigger-copy{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;line-height:1.25}.gou-fab-apr{color:var(--ds-system-orange-high, #ff7a3d);font-size:11px;font-weight:600;line-height:1.25}.gou-fab[data-tx-phase=success]{animation:gou-result-success 1.2s ease-out}.gou-fab[data-tx-phase=failure]{animation:gou-result-failure 1.2s ease-out}.gou-fab-dots>span{animation:gou-status-dot 1.4s ease-in-out infinite}.gou-fab-dots>span:nth-child(2){animation-delay:.2s}.gou-fab-dots>span:nth-child(3){animation-delay:.4s}.gou-tooltip{position:absolute;right:0;bottom:calc(100% + 8px);pointer-events:none;padding:6px 10px;border-radius:8px;background:#121212;color:#fff;box-shadow:0 8px 24px #0000002e;font-size:12px;font-weight:500;opacity:0;white-space:nowrap;transition:opacity .2s ease}[data-theme=dark] .gou-tooltip{background:#f5f5f5;color:#121212}.gou-fab:hover .gou-tooltip{opacity:1}.gou-shell{--ds-bg-default: #1c1c1d;--ds-bg-dim: #181819;--ds-surface-default: #1c1c1d;--ds-surface-medium: #212224;--ds-surface-high: rgba(255, 255, 255, .08);--ds-border-default: rgba(255, 255, 255, .1);--ds-content-highest: #ffffff;--ds-content-high: rgba(255, 255, 255, .85);--ds-content-medium: rgba(255, 255, 255, .65);--ds-content-low: rgba(255, 255, 255, .4);--ds-accent-primary-default: #f3742e;--ds-accent-primary-high: #f3742e;--ds-accent-primary-low: rgba(243, 116, 46, .1);--ds-accent-primary-on: #ffffff;--gou-bg: #1c1c1d;--gou-card: #212224;--gou-card-hover: rgba(255, 255, 255, .08);--gou-border: rgba(255, 255, 255, .1);--gou-text: #ffffff;--gou-muted: rgba(255, 255, 255, .65);background:var(--gou-bg);color:var(--gou-text)}.gou-shell[data-theme=light]{--ds-bg-default: #ffffff;--ds-bg-dim: #fafbfd;--ds-surface-default: #ffffff;--ds-surface-medium: rgba(0, 0, 0, .01);--ds-surface-high: rgba(0, 0, 0, .03);--ds-border-default: rgba(0, 0, 0, .06);--ds-content-highest: #000000;--ds-content-high: rgba(0, 0, 0, .85);--ds-content-medium: rgba(0, 0, 0, .65);--ds-content-low: rgba(0, 0, 0, .4);--gou-bg: #ffffff;--gou-card: #ffffff;--gou-card-hover: rgba(0, 0, 0, .03);--gou-border: rgba(0, 0, 0, .06);--gou-text: #000000;--gou-muted: rgba(0, 0, 0, .65)}.gou-chooser{overflow:hidden}.gou-chooser-body{position:relative;display:flex;flex-direction:column;gap:28px;padding:32px}.gou-close{position:absolute;top:24px;right:24px;display:inline-flex;width:32px;height:32px;align-items:center;justify-content:center;padding:0;border:0;border-radius:9999px;background:transparent;color:var(--gou-muted);cursor:pointer}.gou-close:hover{background:var(--gou-card-hover);color:var(--gou-text)}.gou-close svg{width:20px;height:20px}.gou-intro{display:flex;flex-direction:column;gap:6px;padding:0 32px 0 0;text-align:left}.gou-intro h2{margin:0;color:var(--gou-text);font-size:20px;font-weight:650;line-height:1.6}.gou-intro-link{display:inline-flex;width:fit-content;align-items:center;gap:4px;color:var(--ds-accent-primary-default, #f3742e);font-size:14px;font-weight:600;line-height:1.5;text-decoration:none}.gou-intro-link-icon{flex-shrink:0}.gou-intro-link>span{text-decoration:underline;text-underline-offset:3px}.gou-intro-link:focus-visible{outline:2px solid #f3742e;outline-offset:3px;border-radius:4px}.gou-actions{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none}.gou-action{display:flex;width:100%;min-width:0;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--gou-border);border-radius:12px;background:var(--gou-card);color:var(--gou-text);font:inherit;text-align:left;cursor:pointer;transition:border-color .15s ease,background .15s ease}.gou-action:hover:not(:disabled){border-color:#f3742e;background:var(--gou-card-hover)}.gou-action:disabled{cursor:not-allowed;opacity:.5}.gou-action:focus-visible{outline:2px solid #f3742e;outline-offset:2px}.gou-action-icon{display:inline-flex;width:32px;height:32px;flex-shrink:0;align-items:center;justify-content:center;border:1px solid var(--gou-border);border-radius:9px;color:var(--gou-text);transition:border-color .15s ease,color .15s ease}.gou-action:hover:not(:disabled) .gou-action-icon{border-color:var(--ds-accent-primary-default, #f3742e);color:var(--ds-accent-primary-default, #f3742e)}.gou-action-icon svg{width:17px;height:17px}.gou-action-copy{display:flex;min-width:0;flex:1;flex-direction:column;gap:2px}.gou-action-title{display:flex;min-width:0;align-items:center;gap:6px;font-size:16px;font-weight:650}.gou-action-description{color:var(--gou-muted);font-size:14px;line-height:1.45}.gou-action-chevron{width:18px;height:18px;flex-shrink:0;color:var(--gou-muted)}.gou-badge{flex-shrink:0;padding:2px 6px;border-radius:5px;background:#f3742e24;color:#f3742e;font-size:10px;font-weight:650}.gou-badge[data-tone=muted]{background:var(--gou-card-hover);color:var(--gou-muted)}.gou-stake-header{flex-direction:row;align-items:center;gap:8px}.gou-stake-estimate .gou-stake-apr{color:var(--ds-accent-primary-default, #f3742e)}.gou-stake-back{display:inline-flex;width:32px;height:32px;flex-shrink:0;align-items:center;justify-content:center;margin-left:-8px;padding:0;border:0;border-radius:9999px;background:transparent;color:var(--gou-muted);cursor:pointer}.gou-stake-back svg{width:20px;height:20px;transform:rotate(180deg)}.gou-stake-back:hover:not(:disabled){background:var(--gou-card-hover);color:var(--gou-text)}.gou-stake-back:disabled,.gou-stake[data-busy=true] .gou-close{cursor:default;opacity:.4}.gou-stake-form{display:flex;flex-direction:column;gap:12px}.gou-stake-row{display:flex;align-items:baseline;justify-content:space-between;gap:8px;color:var(--gou-muted);font-size:13px}.gou-stake-row label{font-weight:600}.gou-stake-balance{color:var(--gou-text);font-weight:600}.gou-stake-quick{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.gou-stake-quick button{height:32px;padding:0;border:1px solid var(--gou-border);border-radius:8px;background:transparent;color:var(--gou-muted);font:inherit;font-size:13px;font-weight:600;cursor:pointer;transition:border-color .15s ease,color .15s ease}.gou-stake-quick button:hover:not(:disabled){border-color:var(--ds-accent-primary-default, #f3742e);color:var(--gou-text)}.gou-stake-quick button[aria-pressed=true]{border-color:var(--ds-accent-primary-default, #f3742e);background:var(--ds-accent-primary-low, rgba(243, 116, 46, .1));color:var(--ds-accent-primary-default, #f3742e)}.gou-stake-quick button:disabled{cursor:default;opacity:.4}.gou-stake-input{display:flex;align-items:center;gap:8px;padding:0 14px;border:1px solid var(--gou-border);border-radius:12px;background:var(--gou-card);transition:border-color .15s ease}.gou-stake-input:focus-within{border-color:var(--ds-accent-primary-default, #f3742e)}.gou-stake-input[data-invalid=true]{border-color:var(--ds-status-error-default, #ff3c53)}.gou-stake-input input{min-width:0;flex:1;height:48px;border:0;background:transparent;color:var(--gou-text);font:inherit;font-size:18px;font-weight:650;outline:none}.gou-stake-input input::placeholder{color:var(--ds-content-low)}.gou-stake-input input:disabled{opacity:.6}.gou-stake-input>span{flex-shrink:0;color:var(--gou-muted);font-size:14px;font-weight:600}.gou-stake-error{margin:0;color:var(--ds-status-error-default, #ff3c53);font-size:13px;line-height:1.45}.gou-stake-estimate{display:flex;flex-direction:column;gap:8px;margin:0;padding:12px 14px;border:1px solid var(--gou-border);border-radius:12px;color:var(--gou-muted);font-size:14px}.gou-stake-estimate>div{display:flex;justify-content:space-between;gap:8px}.gou-stake-estimate dd{margin:0;color:var(--gou-text);font-weight:600}.gou-stake-estimate .gou-stake-shares{color:var(--gou-muted);font-weight:500}.gou-stake-submit{width:100%;margin-top:4px;padding:14px 16px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #f3742e);color:var(--ds-accent-primary-on, #ffffff);font:inherit;font-size:16px;font-weight:650;cursor:pointer}.gou-stake-submit:disabled{cursor:not-allowed;opacity:.45}.gou-stake-submit:focus-visible{outline:2px solid #f3742e;outline-offset:2px}.gou-execution{height:auto;max-height:90dvh;overflow:hidden}.gou-execution .bf-root{width:100%;max-height:90dvh}.gou-connect-required,.gou-route-state{display:flex;min-height:360px;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:32px;text-align:center}.gou-connect-required h3,.gou-route-state h3{margin:0;color:var(--gou-text);font-size:18px}.gou-connect-required p,.gou-route-state p{max-width:320px;margin:0;color:var(--gou-muted);font-size:14px;line-height:1.5}.gou-lock{font-size:28px}.gou-connect-required button{width:100%;max-width:320px;margin-top:10px;padding:12px 16px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #00ceb2);color:var(--ds-accent-primary-on, #001b18);font:inherit;font-size:16px;font-weight:650;cursor:pointer}.gou-spinner{width:28px;height:28px;border:3px solid var(--gou-border);border-top-color:var(--ds-accent-primary-default, #00ceb2);border-radius:9999px;animation:gou-spin .8s linear infinite}@keyframes gou-spin{to{transform:rotate(360deg)}}@keyframes gou-status-dot{0%,60%,to{opacity:.2}30%{opacity:1}}@keyframes gou-result-success{0%{outline:0 solid rgba(30,202,119,0)}30%{outline:3px solid rgba(30,202,119,.75)}to{outline:0 solid rgba(30,202,119,0)}}@keyframes gou-result-failure{0%{outline:0 solid rgba(255,60,83,0)}30%{outline:3px solid rgba(255,60,83,.75)}to{outline:0 solid rgba(255,60,83,0)}}@media(max-width:767px){.gou-fab{right:var(--gou-right-mobile, 1rem)}.gou-fab-icon-frame{width:32px;height:32px}.gou-fab[data-icon-only=true] .gou-fab-icon-frame{width:40px;height:40px}.gou-chooser-body{padding:24px 16px 28px}.gou-close{top:16px;right:16px}.gou-execution{height:auto;max-height:70dvh}.gou-execution .bf-root{max-height:calc(70dvh - 24px)}}@media(prefers-reduced-motion:reduce){.gou-fab,.gou-fab-icon-frame,.gou-fab-label,.gou-tooltip{transition:none}.gou-spinner,.gou-fab-progress-ring{animation-duration:1.6s}.gou-fab[data-tx-phase=success],.gou-fab[data-tx-phase=failure],.gou-fab-dots>span{animation:none}}
22
- `);var se=require("react/jsx-runtime"),u2=[{id:"swap",label:"Swap",eta:"Instant",Icon:d0},{id:"bridge",label:"Bridge",Icon:c0},{id:"transfer",label:"Transfer Crypto",eta:"QR deposit",Icon:p0},{id:"stake",label:"Stake",eta:"Earn yield",Icon:u0}],f2=4e3;function x0(e){return e instanceof Error?e.message:typeof e=="string"?e:"Unknown error"}function pl(e,t){try{e?.(t)}catch{}}function m2({compactTrigger:e,collapseOnScroll:t,scrollThreshold:n}){let[r,o]=Ke.useState(!1);return Ke.useEffect(()=>{if(t===!1){o(!1);return}let a=n??200,i=a+24,s=Math.max(0,a-24),l=0,d=window.scrollY>a;o(d);let p=()=>{l=0;let u=d?window.scrollY>s:window.scrollY>i;u!==d&&(d=u,o(u))},w=()=>{l||(l=requestAnimationFrame(p))};return window.addEventListener("scroll",w,{passive:!0}),()=>{l&&cancelAnimationFrame(l),window.removeEventListener("scroll",w)}},[t,n]),!!(e||r)}function v0({loading:e}){return(0,se.jsxs)("div",{className:"gou-route-state",role:"status",children:[e&&(0,se.jsx)("span",{className:"gou-spinner","aria-hidden":"true"}),(0,se.jsx)("h3",{children:e?"Preparing route":"Route unavailable"}),(0,se.jsx)("p",{children:e?"Loading token and contract configuration.":"The configured ONEUSD route is not available in this environment."})]})}function pc({walletAddress:e,tokens:t,pairs:n,loading:r=!1,bridge:o,relay:a,stake:i,env:s,targetSymbol:l,relayTargetSymbol:d="ONEUSD",targetIconUrl:p,mode:w="floating",buttonComponent:u,theme:h="dark",mobileBreakpoint:x=768,drawerDirection:y="bottom",dialogWidth:f="560px",drawerMaxWidth:c,drawerMinWidth:b,style:g,className:v,contentClassName:C,hidden:N=!1,compactTrigger:I,collapseOnScroll:R=!0,scrollThreshold:S=200,waitForTransaction:E,transactionResultDurationMs:M=f2,onRequestConnect:z,onEvent:L}){let[G,A]=Ke.useState(!1),[j,le]=Ke.useState(null),[oe,ne]=Ke.useState(!1),[V,ee]=Ke.useState(null),[F,q]=Ke.useState(!1),ae=Ke.useRef(0),X=Ke.useRef(!1),me=Ke.useRef(null),ke=Ke.useRef(!0),ze=m2({compactTrigger:I,collapseOnScroll:R,scrollThreshold:S}),ge=Ke.useMemo(()=>it(s),[s]),Ne=Xt("apps.json",ge,O=>O?.getOneUsd?.modes),Ce=Xt("apps.json",ge,O=>O?.getOneUsd?.minVersions),Me=Xt("app-launcher-v2.json",ge,O=>t0(O,ge))??$h[ge],Qe=Ke.useMemo(()=>Yo(t,n,"swap"),[n,t]),lt=Ke.useMemo(()=>Yo(t,n,"bridge"),[n,t]),We=Qe.targetToken??lt.targetToken,Ve=i?.readContract??a?.readContract,Ge=i?.writeContract??a?.writeContract,Dt=i?.switchChain??a?.switchChain,tn=i?.waitForReceipt??a?.waitForReceipt,yt=Ke.useMemo(()=>Ve&&Ge?{readContract:Ve,writeContract:Ge,switchChain:Dt,waitForReceipt:tn}:null,[Ve,Dt,tn,Ge]),{address:Pt,loading:Tt}=r0(ge,i?.vaultAddress),nn=!!(yt&&Pt&&We),It=Ke.useMemo(()=>u2.filter(({id:O})=>Ko(O,Ne)),[Ne]),ft=It.length>0,Ot=a0(!N&&ft),rt=l??We?.symbol??"ONEUSD",on=p??We?.iconUrl??Gd,mt=w==="floating"&&ze,fn=w==="button"&&u?u:"button";Ke.useEffect(()=>(ke.current=!0,()=>{ke.current=!1,me.current&&clearTimeout(me.current)}),[]),Ke.useEffect(()=>{q(!e0(window.location.hostname))},[]),Ke.useEffect(()=>{ft||A(!1)},[ft]);let Ze=Ke.useCallback(O=>L?.(O),[L]),dt=Ke.useCallback(()=>{V||!ft||(Ze({name:"fab_click",state:mt?"icon_only":"expanded"}),A(!0))},[Ze,ft,V,mt]),nt=Ke.useCallback(O=>{V||!Va(O,Ne,Ce)||O==="stake"&&!nn||(Ze({name:"action_select",action:O}),A(!1),O==="transfer"&&ne(!0),le(O))},[Ze,Ne,Ce,nn,V]),Et=Ke.useCallback(O=>{Ze({name:"connect_click",action:O}),Promise.resolve(z?.()).catch(De=>{Ze({name:"failure",action:O,message:x0(De)})})},[Ze,z]),Rt=j==="swap"||j==="bridge"?j:null,Xe=Rt==="swap"?Qe:lt,an=!!(n&&Xe.targetToken&&Xe.fromTokens.length>0),sn=Ke.useMemo(()=>{if(!Xe.targetToken)return;let O=Xe.targetToken;return De=>{let qe=o.getToTokens?.(De,t);return qe&&!Qa(qe,O)?[]:[O]}},[o.getToTokens,Xe.targetToken,t]),{onSubmitted:Yt,onSuccess:ln,onFailed:Q,...xe}=o,{onDeposited:Se,onError:Fe,...ot}=a??{},Kt=Ke.useCallback((O,De,qe,re,Ie)=>{!ke.current||ae.current!==O||(ee({id:O,phase:De,action:qe,label:re,txHash:Ie}),me.current&&clearTimeout(me.current),me.current=setTimeout(()=>{!ke.current||ae.current!==O||(X.current=!1,ee(null),me.current=null)},Math.max(0,M)))},[M]),Bt=Ke.useCallback(O=>{if(X.current)return!1;X.current=!0;let{action:De,txHash:qe,pendingLabel:re,successNote:Ie,wait:U,onFailed:Oe}=O,$=++ae.current;return ee({id:$,phase:"pending",action:De,label:re,txHash:qe}),A(!1),le(null),Promise.resolve().then(U).then(()=>{!ke.current||ae.current!==$||(Kt($,"success",De,Ie,qe),Ze({name:"success",action:De,txHash:qe}))}).catch(Pe=>{if(!ke.current||ae.current!==$)return;let In=x0(Pe);Kt($,"failure",De,"Transaction failed",qe),Oe?.(In),Ze({name:"failure",action:De,message:In})}),!0},[Ze,Kt]),Cn=Ke.useCallback((O,De)=>{Bt({action:De,txHash:O.txHash,pendingLabel:s0(O,De),successNote:l0(O,De),wait:async()=>{await E?.(O)},onFailed:re=>pl(Q,{message:re,txHash:O.txHash})})&&pl(Yt,O)},[Q,Yt,Bt,E]),Rn=Ke.useCallback(O=>{let De=yt?.waitForReceipt;Bt({action:"stake",txHash:O.txHash,pendingLabel:"Staking",successNote:`${O.amountText} ${We?.symbol??"ONEUSD"} staked`,wait:async()=>{if(!De)return;if((await De({chainId:O.chainId,hash:O.txHash})).status!=="success")throw new Error("Transaction reverted.")}})},[yt,We?.symbol,Bt]);return(0,se.jsx)(Le,{feature:"get_one_usd",children:(0,se.jsxs)("div",{className:v,"data-theme":h,"data-gou-mode":w,children:[(0,se.jsxs)(hr,{theme:h,mobileBreakpoint:x,drawerDirection:y,dialogWidth:f,drawerMaxWidth:c,drawerMinWidth:b,open:G,onOpenChange:A,children:[!N&&ft&&(w==="button"||!V)&&(0,se.jsxs)(fn,{type:"button",className:"gou-fab",style:g,"data-trigger-mode":w,"data-icon-only":mt?"true":"false",onClick:dt,disabled:!!V,"aria-label":`Get ${rt}`,"data-track":"fab_click",children:[w==="floating"&&(0,se.jsxs)("span",{className:"gou-tooltip",children:["Choose how to get ",rt]}),(0,se.jsx)("span",{className:"gou-fab-icon-frame",children:(0,se.jsx)("img",{className:"gou-fab-icon",src:on,alt:""})}),(0,se.jsxs)("span",{className:"gou-fab-label gou-fab-trigger-copy",children:[(0,se.jsxs)("span",{children:["Get ",rt]}),Ot!==null&&(0,se.jsx)("span",{className:"gou-fab-apr",children:Yi(Ot)})]})]}),V&&(0,se.jsxs)("div",{className:"gou-fab gou-fab-status",style:w==="floating"?g:void 0,"data-floating-status":"true","data-icon-only":"false","data-tx-phase":V.phase,role:"status","aria-live":"polite","aria-label":V.phase==="pending"?`${V.label} transaction in progress`:V.label,children:[(0,se.jsxs)("span",{className:"gou-fab-icon-frame",children:[(0,se.jsx)("img",{className:"gou-fab-icon",src:on,alt:""}),V.phase==="pending"&&(0,se.jsx)("span",{className:"gou-fab-progress-ring","aria-hidden":"true"})]}),(0,se.jsx)("span",{className:"gou-fab-label",children:V.phase==="pending"?(0,se.jsxs)(se.Fragment,{children:[V.label,(0,se.jsxs)("span",{className:"gou-fab-dots","aria-hidden":"true",children:[(0,se.jsx)("span",{children:"."}),(0,se.jsx)("span",{children:"."}),(0,se.jsx)("span",{children:"."})]})]}):V.label})]}),(0,se.jsx)(br,{ariaTitle:`Get ${rt}`,className:`gou-shell gou-chooser ${C??""}`,children:(0,se.jsxs)("div",{className:"gou-chooser-body",children:[(0,se.jsx)("button",{type:"button",className:"gou-close",onClick:()=>A(!1),"aria-label":"Close",children:(0,se.jsx)(ll,{})}),(0,se.jsxs)("header",{className:"gou-intro",children:[(0,se.jsxs)("h2",{children:["Get ",rt]}),F&&(0,se.jsxs)("a",{className:"gou-intro-link",href:Me,target:"_blank",rel:"noopener noreferrer","aria-label":"What is ONEUSD? Opens in a new tab","data-track":"oneusd_learn_more",children:[(0,se.jsx)(Xu,{size:16,className:"gou-intro-link-icon"}),(0,se.jsx)("span",{children:"What is ONEUSD?"})]})]}),(0,se.jsx)("ul",{className:"gou-actions",children:It.map(({id:O,label:De,eta:qe,Icon:re})=>{let Ie=O==="swap"?`Swap the ${Qe.fromTokens[0]?.symbol??"ONE"} you already hold`:O==="bridge"?`Bridge USDT to ${rt}`:O==="stake"?`Deposit ${rt} to receive ${No}`:"Deposit from any chain or exchange",U=O==="swap"?n?.swap.feeDelegated:O==="bridge"?n?.bridge.feeDelegated:!1,Oe=Zo(O,Ce),$=O==="stake"&&Tt,Pe=O==="stake"&&Oe&&!$&&!nn,In=Oe&&!Pe&&!$;return(0,se.jsx)("li",{children:(0,se.jsxs)("button",{type:"button",className:"gou-action",onClick:()=>nt(O),disabled:!In,"data-supported":In?"true":"false","data-track":"action_select","data-track-id":O,children:[(0,se.jsx)("span",{className:"gou-action-icon",children:(0,se.jsx)(re,{})}),(0,se.jsxs)("span",{className:"gou-action-copy",children:[(0,se.jsxs)("span",{className:"gou-action-title",children:[(0,se.jsx)("span",{children:De}),U&&In&&(0,se.jsx)("span",{className:"gou-badge",children:"Fee Delegated"}),!Oe&&(0,se.jsx)("span",{className:"gou-badge","data-tone":"muted",children:"Update required"}),Pe&&(0,se.jsx)("span",{className:"gou-badge","data-tone":"muted",children:"Coming soon"})]}),(0,se.jsx)("span",{className:"gou-action-description",children:Oe?Pe?"Staking is not available in this environment yet":qe?`${Ie} \xB7 ${qe}`:Ie:"Update the app to use this option"})]}),(0,se.jsx)(sl,{className:"gou-action-chevron"})]})},O)})})]})})]}),(0,se.jsx)(hr,{theme:h,mobileBreakpoint:x,drawerDirection:y,dialogWidth:f,drawerMaxWidth:c,drawerMinWidth:b,open:!!Rt,onOpenChange:O=>{O||le(null)},children:(0,se.jsx)(br,{ariaTitle:`${Rt==="bridge"?"Bridge":"Swap"} to ${rt}`,className:`gou-shell gou-execution ${C??""}`,children:an?(0,se.jsx)(mo,{...xe,env:s,variant:"embedded",title:Rt==="bridge"?"Bridge":"Swap",feeDelegated:n?.swap.feeDelegated,walletAddress:e??"",isConnected:!!e,onRequestConnect:()=>Et(Rt??"swap"),tokens:Xe.fromTokens,initialFromToken:Xe.fromTokens[0],initialToToken:Xe.targetToken,getToTokens:sn,onClose:()=>le(null),onBackToWallet:()=>{le(null),A(!0)},onSubmitted:O=>{Cn(O,Rt??"swap")},onSuccess:O=>{pl(ln,O)},onFailed:O=>{pl(Q,O),Ze({name:"failure",action:Rt??"swap",message:O.message})}},`${Rt}:${Xe.fromTokens.map(O=>`${O.chainId}:${O.address}`).join(",")}`):(0,se.jsx)(v0,{loading:r||!n})})}),(0,se.jsx)(hr,{theme:h,mobileBreakpoint:x,drawerDirection:y,dialogWidth:f,drawerMaxWidth:c,drawerMinWidth:b,open:j==="stake",onOpenChange:O=>{O||le(null)},children:(0,se.jsx)(br,{ariaTitle:`Stake ${rt}`,className:`gou-shell gou-chooser ${C??""}`,children:j==="stake"&&yt&&Pt&&We?(0,se.jsx)(y0,{env:ge,walletAddress:e,walletChainId:i?.walletChainId??a?.walletChainId,token:We,vaultAddress:Pt,ports:yt,locked:!!V,onRequestConnect:()=>Et("stake"),onBack:()=>{le(null),A(!0)},onClose:()=>le(null),onSubmitted:Rn,onFailed:O=>Ze({name:"failure",action:"stake",message:O})}):(0,se.jsx)(v0,{loading:r||!n})})}),oe&&(0,se.jsx)(qo,{...ot,environment:ot.environment??s,theme:ot.theme??h,mobileBreakpoint:ot.mobileBreakpoint??x,drawerDirection:ot.drawerDirection??y,dialogWidth:ot.dialogWidth??f,drawerMaxWidth:ot.drawerMaxWidth??c,drawerMinWidth:ot.drawerMinWidth??b,walletAddress:e,open:j==="transfer",onOpenChange:O=>{O||le(null)},requireWalletConnection:!0,showRecovery:ot.showRecovery??!0,showRecipientInput:!1,hideAmount:!0,targetTokens:[d],defaultTarget:d,onRequestConnect:()=>Et("transfer"),onDeposited:O=>{Se?.(O),Ze({name:"success",action:"transfer",txHash:O})},onError:O=>{Fe?.(O),Ze({name:"failure",action:"transfer",message:O.message})},children:(0,se.jsx)(qo.Content,{})})]})})}var xr=_(require("react"),1),M0=_(require("@radix-ui/react-dialog"),1),L0=require("vaul");var ul=require("react"),fl=(0,ul.createContext)(null);function Ya(){let e=(0,ul.useContext)(fl);if(!e)throw new Error("WalletConnectModal compound components must be used within <WalletConnectModal>");return e}var So=require("react");function Ka(){let[e,t]=(0,So.useState)([]),[n,r]=(0,So.useState)(!0);(0,So.useEffect)(()=>{if(typeof window>"u"){r(!1);return}let a=[],i=l=>{let{info:d}=l.detail;d?.rdns&&!a.some(p=>p.rdns===d.rdns)&&(a.push({rdns:d.rdns,name:d.name,icon:d.icon}),t([...a]))};window.addEventListener("eip6963:announceProvider",i),window.addEventListener("eip6963:crossAnnounceProvider",i),window.dispatchEvent(new Event("eip6963:requestProvider")),window.dispatchEvent(new Event("eip6963:crossRequestProvider"));let s=setTimeout(()=>r(!1),500);return()=>{window.removeEventListener("eip6963:announceProvider",i),window.removeEventListener("eip6963:crossAnnounceProvider",i),clearTimeout(s)}},[]);let o=(0,So.useCallback)(a=>e.some(i=>i.rdns===a),[e]);return{wallets:e,isDetected:o,isLoading:n}}var k0=_(require("@radix-ui/react-dialog"),1),C0=require("vaul");var ml=require("react/jsx-runtime");function R0({asChild:e,children:t}){let{isMobile:n}=Ya(),r=n?C0.Drawer.Trigger:k0.Trigger;return(0,ml.jsx)(Le,{feature:"wallet_connect",children:(0,ml.jsx)(r,{asChild:e??t!=null,children:t??(0,ml.jsx)("button",{type:"button","data-track":"open",children:"Connect Wallet"})})})}var I0=require("react"),E0=require("@nexus-cross/crossx-design-system"),yr=_(require("@radix-ui/react-dialog"),1),Za=require("vaul");var de=require("react/jsx-runtime");function N0(e,t){Je("connect","wallet_selected",{tags:{item_id:e}}),Wu(e);let n=t?.();n instanceof Promise&&n.then(()=>Je("connect","connected"),r=>Je("connect","connected",{status:"failure",reason:Nn(r)}))}function g2({wallet:e,detected:t,onConnect:n}){let r=()=>{if(e.installUrl&&!t){window.open(e.installUrl,"_blank","noopener,noreferrer");return}n()},o=e.icon,a=e.featured===!0;return(0,de.jsxs)("button",{type:"button",className:Ee("wcm-wallet-item",a&&"wcm-wallet-item--featured"),"data-track":"wallet_item_click","data-track-id":e.id,onClick:r,children:[(0,de.jsxs)("div",{className:"wcm-wallet-item-left",children:[(0,de.jsx)("div",{className:"wcm-wallet-icon",children:(0,de.jsx)(o,{})}),(0,de.jsxs)("div",{className:"wcm-wallet-name-row",children:[(0,de.jsx)("span",{className:"wcm-wallet-name",children:e.name}),e.badge&&(0,de.jsx)("span",{className:"wcm-wallet-badge",children:e.badge})]})]}),e.installUrl&&(t?(0,de.jsx)("span",{className:"wcm-installed-label",children:"Installed"}):(0,de.jsx)("span",{className:"wcm-install-btn",children:"Install"}))]})}function h2({social:e,onSignIn:t}){let n=e.icon,r=`Sign in with ${e.name}`;return(0,de.jsxs)("button",{type:"button",className:"wcm-social-item","data-provider":e.id,"data-track":"social_provider_click","data-track-id":e.id,onClick:t,"aria-label":r,children:[(0,de.jsx)("span",{className:"wcm-social-icon",children:(0,de.jsx)(n,{})}),(0,de.jsx)("span",{className:"wcm-social-name",children:r})]})}function S0(){let{wallets:e,activeWalletIds:t,socialProviders:n,activeSocialIds:r,termsUrl:o,privacyUrl:a,isDetected:i,close:s,isMobile:l}=Ya(),d=t.filter(u=>{let h=nd(u).visibility;return!h||h==="always"?!0:h==="desktop-only"?!l:h==="mobile-only"?l:!0}),p=r.length>0,w=d.length>0;return(0,de.jsxs)(de.Fragment,{children:[(0,de.jsxs)("div",{className:"wcm-header",children:[(0,de.jsxs)("div",{className:"wcm-header-text",children:[(0,de.jsx)("h2",{className:"wcm-title",children:E0.WALLET_LABELS.default}),!l&&(0,de.jsx)("p",{className:"wcm-subtitle",children:"Sign in instantly with your social account"})]}),(0,de.jsx)("button",{type:"button",className:"wcm-close-btn","data-track":"close",onClick:s,"aria-label":"Close",children:(0,de.jsx)(zu,{})})]}),(0,de.jsxs)("div",{className:"wcm-body",children:[p&&(0,de.jsxs)(de.Fragment,{children:[!l&&(0,de.jsxs)("div",{className:"wcm-section-header",children:[(0,de.jsx)("span",{className:"wcm-section-title",children:"Social Account Wallet Connect"}),(0,de.jsx)("span",{className:"wcm-recommended-badge",children:"Recommended"})]}),(0,de.jsx)("div",{className:"wcm-social-grid",children:r.map(u=>{let h=Fu(u);return(0,de.jsx)(h2,{social:h,onSignIn:()=>{N0(u,n[u]),s()}},u)})}),w&&(0,de.jsxs)("div",{className:"wcm-separator",children:[(0,de.jsx)("div",{className:"wcm-separator-line"}),(0,de.jsx)("span",{className:"wcm-separator-text",children:"Other Wallets"}),(0,de.jsx)("div",{className:"wcm-separator-line"})]})]}),w&&(0,de.jsx)("div",{className:"wcm-wallet-list",children:d.map(u=>{let h=nd(u),x=h.rdns?i(h.rdns):!1;return(0,de.jsx)(g2,{wallet:h,detected:x,onConnect:()=>{N0(u,e[u]),s()}},u)})}),(0,de.jsxs)("p",{className:"wcm-terms",children:["By continuing, you agree to NEXUS"," ",(0,de.jsx)(T0,{href:o,track:"terms_link",children:"Terms of Service"})," ","and consent to its"," ",(0,de.jsx)(T0,{href:a,track:"privacy_link",children:"Privacy Policy"}),"."]})]})]})}function T0({href:e,track:t,children:n}){return e?(0,de.jsx)("a",{className:"wcm-terms-link",href:e,target:"_blank",rel:"noopener noreferrer","data-track":t,children:n}):(0,de.jsx)("span",{className:"wcm-terms-link",children:n})}function A0({className:e}){let{isMobile:t,theme:n,portalStyle:r,open:o}=Ya();return(0,I0.useEffect)(()=>{o&&Je("connect","opened")},[o]),t?(0,de.jsx)(Le,{feature:"wallet_connect",children:(0,de.jsxs)(Za.Drawer.Portal,{children:[(0,de.jsx)(Za.Drawer.Overlay,{className:"wcm-overlay"}),(0,de.jsxs)(Za.Drawer.Content,{className:Ee("wcm-drawer-content",e),"data-theme":n,style:r,children:[(0,de.jsx)(Za.Drawer.Title,{className:"wcm-sr-only",children:"Connect Wallet"}),(0,de.jsx)("div",{className:"wcm-drawer-handle"}),(0,de.jsx)("div",{className:"wcm-drawer-body",children:(0,de.jsx)(S0,{})})]})]})}):(0,de.jsx)(Le,{feature:"wallet_connect",children:(0,de.jsxs)(yr.Portal,{children:[(0,de.jsx)(yr.Overlay,{className:"wcm-overlay"}),(0,de.jsxs)(yr.Content,{className:Ee("wcm-dialog-content",e),"data-theme":n,style:r,children:[(0,de.jsx)(yr.Title,{className:"wcm-sr-only",children:"Connect Wallet"}),(0,de.jsx)(yr.Description,{className:"wcm-sr-only",children:"Sign in with a social provider or pick a wallet to connect."}),(0,de.jsx)("div",{className:"wcm-dialog-body",children:(0,de.jsx)(S0,{})})]})]})})}he(`.wcm-overlay{position:fixed;inset:0;z-index:100000;background:var(--ds-overlay-dim, rgba(0, 0, 0, .5));-webkit-backdrop-filter:var(--ds-bg-blur-7, blur(3.5px));backdrop-filter:var(--ds-bg-blur-7, blur(3.5px))}.wcm-dialog-content{-webkit-font-smoothing:antialiased;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:100001;width:var(--wcm-dialog-width, 480px);max-height:90vh;overflow:hidden;display:flex;flex-direction:column;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, #00000012);border-radius:24px;box-shadow:var(--ds-shadow-modal, 0 4px 30px -1px rgba(0, 0, 0, .15));outline:none;animation:wcm-dialog-show .2s ease-out;font-family:inherit}.wcm-dialog-content[data-state=closed]{animation:wcm-dialog-hide .15s ease-in}.wcm-dialog-body,.wcm-drawer-body{scrollbar-width:thin;scrollbar-color:var(--ds-border-medium, rgba(0, 0, 0, .18)) transparent}.wcm-dialog-body::-webkit-scrollbar,.wcm-drawer-body::-webkit-scrollbar{width:4px}.wcm-dialog-body::-webkit-scrollbar-track,.wcm-drawer-body::-webkit-scrollbar-track{background:transparent}.wcm-dialog-body::-webkit-scrollbar-thumb,.wcm-drawer-body::-webkit-scrollbar-thumb{background:var(--ds-border-medium, rgba(0, 0, 0, .18));border-radius:4px}.wcm-drawer-content{-webkit-font-smoothing:antialiased;position:fixed;bottom:0;left:0;right:0;z-index:100001;width:100%;max-width:var(--wcm-drawer-max-width, none);min-width:var(--wcm-drawer-min-width, 0);max-height:85dvh;margin:0 auto;display:flex;flex-direction:column;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, #00000012);border-top-left-radius:16px;border-top-right-radius:16px;outline:none;font-family:inherit;box-sizing:border-box}.wcm-drawer-content[data-vaul-drawer-direction=right]{inset:0 0 0 auto;max-height:100vh;width:var(--wcm-drawer-max-width, 400px);max-width:100vw;border-radius:16px 0 0 16px}.wcm-drawer-content[data-vaul-drawer-direction=left]{inset:0 auto 0 0;max-height:100vh;width:var(--wcm-drawer-max-width, 400px);max-width:100vw;border-radius:0 16px 16px 0}.wcm-drawer-content[data-vaul-drawer-direction=top]{inset:0 0 auto;border-radius:0 0 16px 16px}.wcm-drawer-handle{width:60px;height:4px;border-radius:999px;background:var(--ds-border-medium, rgba(0, 0, 0, .18));margin:12px auto 8px;flex-shrink:0}.wcm-drawer-content[data-vaul-drawer-direction=left] .wcm-drawer-handle,.wcm-drawer-content[data-vaul-drawer-direction=right] .wcm-drawer-handle{display:none}.wcm-dialog-body,.wcm-drawer-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}.wcm-drawer-body{overscroll-behavior:contain}.wcm-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:24px;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wcm-header-text{display:flex;flex-direction:column;gap:4px;min-width:0}.wcm-title{font-family:Inter,sans-serif;font-weight:600;font-size:20px;line-height:1.25;letter-spacing:0;color:var(--ds-content-highest, #000000);margin:0}.wcm-subtitle{font-family:Inter,sans-serif;font-weight:400;font-size:14px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));margin:0}.wcm-close-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;border:none;background:transparent;color:var(--ds-content-low, #00000066);cursor:pointer;padding:0;transition:opacity .15s ease}.wcm-close-btn:hover{opacity:.6}.wcm-close-btn>svg{width:24px;height:24px}.wcm-divider{display:none}.wcm-body{display:flex;flex-direction:column;gap:16px;padding:24px}.wcm-section-header{display:flex;align-items:center;gap:8px;width:100%}.wcm-section-title{font-family:Inter,sans-serif;font-weight:600;font-size:16px;line-height:1;letter-spacing:0;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wcm-recommended-badge{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;background:var(--ds-accent-primary-low, #fff5ee);border-radius:9999px;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:var(--ds-accent-primary-high, #f0640d);white-space:nowrap}.wcm-social-grid{display:grid;gap:8px;width:100%}.wcm-dialog-body .wcm-social-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.wcm-drawer-body .wcm-social-grid{grid-template-columns:1fr}.wcm-social-item{display:flex;background:var(--ds-surface-medium, #f5f7fa);border:none;border-radius:12px;cursor:pointer;transition:none;font-family:inherit;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wcm-social-item:hover{background:#2e3544!important}:root[data-ds-theme=light] .wcm-social-item:hover{background:#eff3f8!important}.wcm-social-item[data-provider=apple] .wcm-social-icon{color:#000}[data-theme=dark] .wcm-social-item[data-provider=apple] .wcm-social-icon{color:#fff}.wcm-dialog-body .wcm-social-item{flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:16px}.wcm-drawer-body .wcm-social-item{flex-direction:row;align-items:center;justify-content:flex-start;gap:12px;padding:16px}.wcm-social-icon{flex-shrink:0;width:32px;height:32px;display:flex;align-items:center;justify-content:center}.wcm-social-icon>svg{width:32px;height:32px}.wcm-social-name{font-family:Inter,sans-serif;font-weight:600;font-size:14px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wcm-separator{display:flex;align-items:center;gap:12px;width:100%}.wcm-separator-line{flex:1;height:1px;background:var(--ds-border-default, rgba(0, 0, 0, .07))}.wcm-separator-text{font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.wcm-wallet-list{display:flex;flex-direction:column;gap:8px}.wcm-wallet-item{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:20px 16px;background:var(--ds-surface-medium, #f5f7fa);border:none;border-radius:12px;cursor:pointer;text-align:left;transition:none;font-family:inherit}.wcm-wallet-item:hover{background:#2e3544!important}:root[data-ds-theme=light] .wcm-wallet-item:hover{background:#eff3f8!important}.wcm-wallet-item-left{display:flex;align-items:center;gap:8px;flex:1;min-width:0}.wcm-wallet-icon{flex-shrink:0;width:28px;height:28px;display:flex;align-items:center;justify-content:center}.wcm-wallet-icon>svg,.wcm-wallet-icon>img{width:28px;height:28px;border-radius:0;object-fit:cover}.wcm-wallet-name-row{display:flex;align-items:center;gap:8px;min-width:0}.wcm-wallet-name{font-family:Inter,sans-serif;font-weight:600;font-size:16px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wcm-wallet-badge{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;background:var(--ds-system-purple-low, #f5f3ff);border:.5px solid var(--ds-system-purple-default, #7e54f4);border-radius:9999px;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:var(--ds-system-purple-high, #7346f3);white-space:nowrap}.wcm-install-btn{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;background:#ff8438;border-radius:6px;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:#fff;white-space:nowrap}.wcm-installed-label{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.wcm-terms{font-family:Inter,sans-serif;font-weight:400;font-size:12px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));text-align:center;margin:0}.wcm-terms-link{color:var(--ds-content-high, rgba(0, 0, 0, .85));text-decoration:underline;text-underline-position:from-font}.wcm-terms-link:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85));text-decoration:underline}.wcm-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}
19
+ `);var Ls=require("react/jsx-runtime");function nv({mobileBreakpoint:e=768,drawerDirection:t,modal:n,open:r,onOpenChange:o,children:a,...i}){let s=Po(`(max-width: ${e}px)`),l=t??(i.showBalance?"right":"bottom"),d=l==="left"||l==="right",p=r!==void 0,[h,u]=Ba.useState(!1),g=p?r:h,x=Ba.useCallback(c=>{p||u(c),o?.(c)},[p,o]),y=Ba.useCallback(()=>x(!1),[x]);Qn(g,y);let f=_i(i,{presentation:"overlay",open:g,isMobile:s,drawerDirection:l,modal:n??!1,close:y});return(0,Ls.jsx)(ca.Provider,{value:f,children:s?(0,Ls.jsx)(ah.Drawer.Root,{direction:l,open:g,onOpenChange:x,handleOnly:d,noBodyStyles:!0,repositionInputs:!1,children:a},"drawer"):(0,Ls.jsx)(oh.Root,{open:g,onOpenChange:x,children:a},"popover")})}var yo=Object.assign(nv,{Trigger:pu,Content:Ms,Nav:th,Footer:rh});var ih=H(require("react"),1);var Wd=require("react/jsx-runtime");function Gd({className:e,children:t,...n}){let r=_i({...n,onDisconnect:void 0,onBuy:void 0,onBuyDisabledMessage:void 0,showBridge:!1,onBridgeDisabledMessage:void 0,showOnePop:!1,showPortfolio:!1,showNft:n.showNft??!0},{presentation:"page",open:!0,isMobile:!0,drawerDirection:"bottom",modal:!1});Qn(r.view!=="wallet",r.close);let{setView:o}=r,a=ih.useCallback(()=>o("nft-collection"),[o]);return Qn(r.view==="nft-detail",a),(0,Wd.jsx)(ca.Provider,{value:r,children:(0,Wd.jsx)(Ms,{className:e,children:t})})}var Ke=H(require("react"),1);var el=H(require("react"),1);var Ds=require("react"),Hd=(0,Ds.createContext)(null);function za(){let e=(0,Ds.useContext)(Hd);if(!e)throw new Error("RelayDeposit compound components must be used within <RelayDeposit>");return e}var Bh=H(require("react"),1);var Ps=require("react"),Os=(0,Ps.createContext)(null);function $n(){let e=(0,Ps.useContext)(Os);if(!e)throw new Error("ResponsiveShell compound components must be used within <ResponsiveShell>");return e}var Vr=require("react");function sh(){let e=null,t=new Set;return{getSnapshot:()=>e,publish(n){if(n!==e){e=n;for(let r of[...t])r()}},subscribe(n){return t.add(n),()=>{t.delete(n)}}}}var _d=(0,Vr.createContext)(null);function rv(){let e=(0,Vr.useContext)(_d);if(!e)throw new Error("RelayDeposit compound components must be used within <RelayDeposit>");return e}function lh(){let e=rv(),[t,n]=(0,Vr.useState)(e.getSnapshot);return(0,Vr.useLayoutEffect)(()=>(n(e.getSnapshot()),e.subscribe(()=>n(e.getSnapshot()))),[e]),t}he(`.rd-root{--rd-bg: var(--ds-bg-dim, #f7f8fb);--rd-surface: var(--ds-surface-default, #ffffff);--rd-surface-alt: var(--ds-surface-medium, #f0f1f6);--rd-border: var(--ds-border-default, #e2e4ec);--rd-text: var(--ds-content-highest, #14161f);--rd-text-muted: var(--ds-content-medium, #676b7a);--rd-accent: var(--ds-accent-primary-high, #7346f3);--rd-accent-contrast: var(--ds-accent-primary-on, #ffffff);--rd-success: var(--ds-system-green-default, #1e9e6a);--rd-success-bg: var(--ds-system-green-low, #e6f7f0);--rd-warning: #b8860b;--rd-warning-bg: #fdf3d9;--rd-danger: var(--ds-system-red-default, #d1394a);--rd-danger-bg: var(--ds-system-red-low, #fbe8ea);--rd-radius: 14px;--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(20, 22, 31, .04), 0 8px 24px rgba(20, 22, 31, .06));--rd-on-accent: #ffffff;width:100%;max-width:640px;box-sizing:border-box;margin:0 auto;display:flex;flex-direction:column;gap:1.25rem;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;background:var(--rd-bg);color:var(--rd-text);-webkit-font-smoothing:antialiased;color-scheme:light dark}.rd-root[data-theme=dark]{color-scheme:dark;--rd-bg: var(--ds-bg-default, #0f1117);--rd-surface: var(--ds-surface-default, #171923);--rd-surface-alt: var(--ds-surface-medium, #1e212c);--rd-border: var(--ds-border-default, #2a2d3a);--rd-text: var(--ds-content-highest, #eef0f6);--rd-text-muted: var(--ds-content-medium, #9498a8);--rd-accent: var(--ds-accent-primary-high, #a392ff);--rd-accent-contrast: var(--ds-accent-primary-on, #000000);--rd-success: var(--ds-system-green-default, #3fd68f);--rd-success-bg: var(--ds-system-green-low, #123626);--rd-warning: #e0b23c;--rd-warning-bg: #3a2f10;--rd-danger: var(--ds-system-red-default, #ff6b7a);--rd-danger-bg: var(--ds-system-red-low, #3a1418);--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35))}.rd-root[data-theme=light]{color-scheme:light;--rd-bg: var(--ds-bg-dim, #f7f8fb);--rd-surface: var(--ds-surface-default, #ffffff);--rd-surface-alt: var(--ds-surface-medium, #f0f1f6);--rd-border: var(--ds-border-default, #e2e4ec);--rd-text: var(--ds-content-highest, #14161f);--rd-text-muted: var(--ds-content-medium, #676b7a);--rd-accent: var(--ds-accent-primary-high, #7346f3);--rd-accent-contrast: var(--ds-accent-primary-on, #ffffff);--rd-success: var(--ds-system-green-default, #1e9e6a);--rd-success-bg: var(--ds-system-green-low, #e6f7f0);--rd-warning: #b8860b;--rd-warning-bg: #fdf3d9;--rd-danger: var(--ds-system-red-default, #d1394a);--rd-danger-bg: var(--ds-system-red-low, #fbe8ea);--rd-radius: 14px;--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(20, 22, 31, .04), 0 8px 24px rgba(20, 22, 31, .06))}.rd-root *{box-sizing:border-box}.rd-card{background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:var(--rd-radius);box-shadow:var(--rd-shadow);padding:1.25rem;display:flex;flex-direction:column;gap:.9rem}.rd-card-header{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem}.rd-card-title{font-size:1rem;font-weight:650;margin:0}.rd-card-hint{font-size:.8rem;color:var(--rd-text-muted)}.rd-token-address{display:flex;flex-direction:column;gap:.1rem}.rd-token-address-addr{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.78rem;color:var(--rd-text);overflow-wrap:anywhere;user-select:all}.rd-token-address-meta{font-size:.72rem;color:var(--rd-text-muted)}.rd-field{display:flex;flex-direction:column;gap:.35rem}.rd-field-label{font-size:.69rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--rd-text-muted)}.rd-root .rd-field-label-row{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem}.rd-root .rd-token-explorer-link{font-size:.75rem;font-weight:500;color:var(--rd-accent);text-decoration:none;white-space:nowrap}.rd-root .rd-token-explorer-link:hover{text-decoration:underline}.rd-field-row{display:grid;grid-template-columns:1fr 1fr;gap:.625rem}.rd-root select,.rd-root input[type=text],.rd-root input[type=number]{width:100%;padding:.6rem .7rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt);color:var(--rd-text);font-size:16px;font-family:inherit}.rd-root select:focus,.rd-root input:focus{outline:2px solid var(--rd-accent);outline-offset:1px}.rd-dropdown{position:relative;min-width:0}.rd-root .rd-dropdown-trigger{width:100%;display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.55rem .7rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt);color:var(--rd-text);font-size:.9rem;font-family:inherit;font-weight:600;text-align:left;cursor:pointer}.rd-root .rd-static-target{display:flex;align-items:center;gap:.55rem;padding:.55rem .7rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt);color:var(--rd-text);font-size:.9rem;font-weight:600;min-width:0;overflow-wrap:anywhere}.rd-root .rd-dropdown-trigger:disabled{cursor:not-allowed}.rd-dropdown-trigger:focus,.rd-dropdown-trigger:focus-visible{outline:2px solid var(--rd-accent);outline-offset:1px}.rd-dropdown-trigger-content{display:flex;align-items:center;gap:.55rem;min-width:0}.rd-dropdown-trigger-label{display:flex;flex-direction:column;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.2}.rd-dropdown-trigger-sub{font-size:.66rem;font-weight:500;line-height:1.3;color:var(--rd-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rd-dropdown-chevron{display:inline-flex;flex:none;color:var(--rd-text-muted);line-height:1}.rd-dropdown-popover{z-index:100002;width:var(--radix-popover-trigger-width);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;--rd-surface: var(--ds-surface-default, #ffffff);--rd-surface-alt: var(--ds-surface-medium, #f0f1f6);--rd-border: var(--ds-border-default, #e2e4ec);--rd-text: var(--ds-content-highest, #14161f);--rd-accent: var(--ds-system-orange-default, #5b5bf6);--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(20, 22, 31, .04), 0 8px 24px rgba(20, 22, 31, .06))}.rd-dropdown-popover[data-theme=dark]{color-scheme:dark;--rd-surface: var(--ds-surface-default, #171923);--rd-surface-alt: var(--ds-surface-medium, #1e212c);--rd-border: var(--ds-border-default, #2a2d3a);--rd-text: var(--ds-content-highest, #eef0f6);--rd-accent: var(--ds-system-orange-default, #8181ff);--rd-shadow: var(--ds-shadow-modal, 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35))}.rd-dropdown-popover *{box-sizing:border-box}.rd-dropdown-listbox{margin:0;padding:.3rem;list-style:none;max-height:min(15rem,var(--radix-popover-content-available-height, 15rem));overflow-y:auto;overscroll-behavior:contain;background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:10px;box-shadow:var(--rd-shadow);font-family:inherit;color:var(--rd-text)}.rd-dropdown-option{display:flex;align-items:center;gap:.55rem;padding:.5rem .6rem;border-radius:8px;font-size:.9rem;color:var(--rd-text);cursor:pointer}.rd-dropdown-option-active{background:var(--rd-surface-alt)}.rd-dropdown-option-selected{font-weight:650}.rd-dropdown-option-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rd-dropdown-option-check{flex:none;color:var(--rd-accent);font-size:.8rem}.rd-amount-input{display:flex;align-items:baseline;gap:.5rem;padding:.6rem .75rem;border-radius:12px;border:1px solid var(--rd-border);background:var(--rd-surface-alt)}.rd-amount-input:focus-within{outline:2px solid var(--rd-accent);outline-offset:1px}.rd-amount-input[data-rd-invalid]{border-color:var(--rd-danger)}.rd-root .rd-amount-input input[type=text]{flex:1 1 auto;width:auto;min-width:0;padding:0;border:0;border-radius:0;background:none;font-size:22px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.2}.rd-root .rd-amount-input input[type=text]:focus{outline:none}.rd-amount-input-suffix{flex:none;font-size:.8rem;font-weight:700;color:var(--rd-text-muted);pointer-events:none}.rd-root .rd-amount-input-max{flex:none;padding:0;font-size:.69rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--rd-accent);background:transparent;border:0;border-radius:0;cursor:pointer;line-height:1}.rd-amount-input-max:hover:not(:disabled){text-decoration:underline}.rd-amount-input-max:disabled{opacity:.5;cursor:not-allowed}.rd-amount-meta{display:flex;align-items:baseline;justify-content:space-between;gap:.75rem;font-size:.75rem;color:var(--rd-text-muted);padding:0 .15rem;font-variant-numeric:tabular-nums}.rd-root button{font-family:inherit;font-size:.95rem;font-weight:650;border-radius:10px;border:1px solid transparent;padding:.7rem 1.1rem;cursor:pointer;transition:opacity .12s ease,transform .12s ease}.rd-root button:active:not(:disabled){transform:translateY(1px)}.rd-root button:disabled{cursor:not-allowed;opacity:.55}.rd-button-primary{background:var(--rd-accent);color:var(--rd-accent-contrast)}.rd-button-secondary{background:var(--rd-surface-alt);color:var(--rd-text);border-color:var(--rd-border)}.rd-button-block{width:100%}.rd-callout{border-radius:10px;padding:.65rem .85rem;font-size:.85rem;line-height:1.4}.rd-callout-warning{background:var(--rd-warning-bg);color:var(--rd-warning)}.rd-callout-danger{background:var(--rd-danger-bg);color:var(--rd-danger)}.rd-callout-success{background:var(--rd-success-bg);color:var(--rd-success)}.rd-callout-muted{background:var(--rd-surface-alt);color:var(--rd-text-muted)}.rd-quote-strip{display:flex;align-items:center;justify-content:space-between;gap:.625rem;padding:.7rem .85rem;border-radius:14px;background:color-mix(in srgb,var(--rd-accent) 10%,var(--rd-surface));border:1px solid color-mix(in srgb,var(--rd-accent) 35%,transparent)}.rd-quote-strip-side{display:flex;flex-direction:column;min-width:0;gap:.1rem;font-size:.9rem;font-weight:700;color:var(--rd-text);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.rd-quote-strip-end{text-align:right;align-items:flex-end}.rd-quote-strip-side small{font-size:.69rem;font-weight:600;color:var(--rd-text-muted);letter-spacing:.02em}.rd-quote-strip-arrow{flex:none;color:var(--rd-accent);font-weight:800}.rd-quote-strip-hint{font-size:.72rem;line-height:1.45;color:var(--rd-text-muted);padding:0 .15rem}.rd-deposit-address{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto 1fr auto;align-items:start;gap:.7rem;min-height:172px;background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:16px;box-shadow:var(--rd-shadow);padding:.85rem;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12.5px;color:var(--rd-text-muted)}.rd-deposit-address-label{grid-column:1;grid-row:1;position:relative;display:inline-flex;align-items:center;gap:.35rem;width:fit-content;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}.rd-root button.rd-address-term{position:static;width:auto;height:auto;display:inline;padding:0 0 2px;border:0;border-bottom:1px dotted currentColor;border-radius:0;background:transparent;color:var(--rd-text-muted);font:700 .69rem/1 -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;letter-spacing:.08em;text-transform:uppercase}.rd-root button.rd-address-term:hover,.rd-root button.rd-address-term:focus-visible{color:var(--rd-accent);outline:none}.rd-address-tooltip{position:absolute;z-index:20;top:calc(100% + 8px);left:0;width:min(250px,calc(100vw - 48px));padding:9px 11px;border:1px solid var(--rd-border);border-radius:10px;background:var(--rd-surface);box-shadow:var(--rd-shadow);color:var(--rd-text);font-size:11.5px;font-weight:500;line-height:1.45;letter-spacing:normal;text-align:left;text-transform:none;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(-3px);transition:opacity .12s ease,transform .12s ease,visibility .12s ease}.rd-address-term:hover .rd-address-tooltip,.rd-address-term:focus .rd-address-tooltip,.rd-address-term:focus-visible .rd-address-tooltip{opacity:1;visibility:visible;transform:translateY(0)}.rd-address-full{grid-column:1 / -1;grid-row:2;align-self:center;min-width:0;color:var(--rd-text);font-weight:600;line-height:1.55;overflow-wrap:anywhere;word-break:break-all}.rd-root .rd-address-copy{grid-column:1 / -1;grid-row:3;width:100%;min-height:36px;display:inline-flex;align-items:center;justify-content:center;gap:.4rem;margin:0;padding:.5rem .7rem;border-radius:10px;border:0;background:var(--rd-accent);color:var(--rd-accent-contrast);font-family:inherit;font-size:.75rem;font-weight:800;letter-spacing:.03em;line-height:1}.rd-root .rd-address-copy svg{flex:none}.rd-root .rd-address-copy:hover:not(:disabled){opacity:.92}.rd-root button.rd-mobile-qr-toggle,.rd-root button.rd-mobile-address-toggle{display:none;place-items:center;width:34px;height:34px;padding:0;border:1px solid color-mix(in srgb,var(--rd-accent) 24%,var(--rd-border));border-radius:11px;background:color-mix(in srgb,var(--rd-accent) 10%,var(--rd-surface));color:var(--rd-accent);box-shadow:0 1px 2px color-mix(in srgb,var(--rd-text) 8%,transparent);transition:transform .15s ease,background-color .15s ease,border-color .15s ease,box-shadow .15s ease}.rd-root button.rd-mobile-qr-toggle{grid-column:2;grid-row:1;justify-self:end;align-self:start}.rd-root button.rd-mobile-address-toggle{position:absolute;z-index:2;top:.85rem;right:.85rem;background:var(--rd-surface);color:var(--rd-text-muted);box-shadow:0 4px 14px color-mix(in srgb,var(--rd-text) 16%,transparent)}.rd-root button.rd-mobile-qr-toggle:hover:not(:disabled),.rd-root button.rd-mobile-address-toggle:hover:not(:disabled){border-color:color-mix(in srgb,var(--rd-accent) 45%,var(--rd-border));color:var(--rd-accent);background:color-mix(in srgb,var(--rd-accent) 15%,var(--rd-surface));box-shadow:0 5px 16px color-mix(in srgb,var(--rd-accent) 18%,transparent);transform:translateY(-1px)}.rd-root button.rd-mobile-qr-toggle:active:not(:disabled),.rd-root button.rd-mobile-address-toggle:active:not(:disabled){transform:scale(.96)}.rd-deposit-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.9rem;container:rd-deposit-head / inline-size}.rd-deposit-head>.rd-deposit-qr-pane{flex:none}.rd-deposit-head>.rd-deposit-address{flex:1 1 12rem;min-width:0}@container rd-deposit-head (max-width: 23.75rem){.rd-deposit-head>.rd-deposit-address{flex-basis:100%;width:100%}.rd-deposit-head>.rd-skeleton-qr{display:none}.rd-deposit-head>.rd-skeleton-address{flex-basis:100%;width:100%}.rd-root button.rd-mobile-qr-toggle,.rd-root button.rd-mobile-address-toggle{display:grid}.rd-deposit-head[data-compact-view=address]>.rd-deposit-qr-pane,.rd-deposit-head[data-compact-view=qr]>.rd-deposit-address{display:none}.rd-deposit-head[data-compact-view=address]>.rd-deposit-address,.rd-deposit-head[data-compact-view=qr]>.rd-deposit-qr-pane{animation:rd-compact-pane-in .26s cubic-bezier(.22,1,.36,1)}.rd-deposit-head[data-compact-view=qr]>.rd-deposit-qr-pane{width:100%}}@keyframes rd-compact-pane-in{0%{opacity:0;transform:translateY(6px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}.rd-deposit-qr{position:relative;display:grid;place-items:center;width:172px;height:172px;background:#fff;border-radius:16px;border:1px solid var(--rd-border);box-shadow:var(--rd-shadow);margin:0 auto}.rd-deposit-qr-pane{position:relative;display:grid;place-items:center;min-height:172px}.rd-deposit-qr-badge{position:absolute;inset:0;margin:auto;width:36px;height:36px;display:grid;place-items:center;background:#fff;border-radius:50%;pointer-events:none}.rd-stepper{display:flex;flex-direction:column;gap:0}.rd-stepper-item{display:flex;gap:.75rem;position:relative;padding-bottom:1.25rem}.rd-stepper-item:last-child{padding-bottom:0}.rd-stepper-rail{display:flex;flex-direction:column;align-items:center}.rd-stepper-dot{width:22px;height:22px;border-radius:50%;border:2px solid var(--rd-border);background:var(--rd-surface);display:flex;align-items:center;justify-content:center;font-size:.7rem;font-weight:700;flex:none;color:var(--rd-text-muted)}.rd-stepper-item-done .rd-stepper-dot{background:var(--rd-success);border-color:var(--rd-success);color:var(--rd-on-accent)}.rd-stepper-item-active .rd-stepper-dot{border-color:var(--rd-accent);color:var(--rd-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--rd-accent) 20%,transparent)}.rd-stepper-line{flex:1;width:2px;background:var(--rd-border);margin:2px 0}.rd-stepper-item-done .rd-stepper-line{background:var(--rd-success)}.rd-stepper-body{padding-top:1px}.rd-stepper-label{font-weight:600;font-size:.9rem}.rd-stepper-item-pending .rd-stepper-label{color:var(--rd-text-muted)}.rd-stepper-meta{margin-top:.25rem;font-size:.78rem;color:var(--rd-text-muted);display:flex;flex-direction:column;gap:.15rem}.rd-stepper-meta a{color:var(--rd-accent);text-decoration:none}.rd-stepper-meta a:hover{text-decoration:underline}.rd-status-pill{display:inline-flex;align-items:center;gap:.35rem;font-size:.75rem;font-weight:650;padding:.2rem .55rem;border-radius:999px;background:var(--rd-surface-alt);color:var(--rd-text-muted);width:fit-content}.rd-status-pill-success{background:var(--rd-success-bg);color:var(--rd-success)}.rd-status-pill-failure{background:var(--rd-danger-bg);color:var(--rd-danger)}.rd-spinner{display:inline-block;width:1em;height:1em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:rd-spin .7s linear infinite;vertical-align:-.15em}@keyframes rd-spin{to{transform:rotate(360deg)}}.rd-muted{color:var(--rd-text-muted)}.rd-settings-row{display:flex;justify-content:flex-end}.rd-root .rd-icon-button{position:relative;display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0;border-radius:50%;border:1px solid var(--rd-border);background:var(--rd-surface);color:var(--rd-text-muted)}.rd-root .rd-icon-button:hover:not(:disabled){color:var(--rd-text);background:var(--rd-surface-alt)}.rd-recovery-badge{position:absolute;top:-.3rem;right:-.3rem;display:flex;align-items:center;justify-content:center;min-width:1.05rem;height:1.05rem;padding:0 .25rem;border-radius:999px;background:var(--rd-danger, #d1394a);color:#fff;font-size:.65rem;font-weight:700;line-height:1;border:2px solid var(--rd-surface, #ffffff)}.rd-recover-group{display:flex;flex-direction:column;gap:.75rem}.rd-recover-group+.rd-recover-group{border-top:1px solid var(--rd-border);padding-top:1rem;margin-top:.5rem}.rd-recover-group-label{margin:0;font-size:.8rem;color:var(--rd-text-muted)}.rd-recover-made-of{display:block;padding:.65rem .8rem;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:10px}.rd-recover-made-of-label{cursor:pointer;font-size:.72rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--rd-text-muted)}.rd-recover-made-of-body{display:flex;flex-direction:column;gap:.4rem;margin-top:.6rem}.rd-error-details{margin-top:-.4rem;padding:0 .15rem;color:var(--rd-text-muted);font-size:.72rem}.rd-error-details summary{width:max-content;cursor:pointer;list-style:none;font-weight:600}.rd-error-details summary::-webkit-details-marker{display:none}.rd-error-details summary:before{display:inline-block;margin-right:.35rem;content:"\\203a";transition:transform .12s ease}.rd-error-details[open] summary:before{transform:rotate(90deg)}.rd-error-log{position:relative;margin-top:.5rem}.rd-root button.rd-error-copy{position:absolute;z-index:1;top:.45rem;right:.45rem;display:inline-flex;align-items:center;justify-content:center;width:1.65rem;height:1.65rem;padding:0;border:1px solid var(--rd-border);border-radius:6px;background:var(--rd-surface);color:var(--rd-text-muted)}.rd-root button.rd-error-copy:hover:not(:disabled){background:var(--rd-surface-alt);color:var(--rd-text)}.rd-error-details code{display:block;max-height:6rem;overflow:auto;padding:.6rem 2.7rem .6rem .7rem;border:1px solid var(--rd-border);border-radius:8px;background:var(--rd-surface-alt);color:var(--rd-text-muted);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.68rem;line-height:1.45;overflow-wrap:anywhere;scrollbar-color:var(--rd-border) transparent;scrollbar-width:thin;white-space:pre-wrap}.rd-error-details code::-webkit-scrollbar{width:4px;height:4px}.rd-error-details code::-webkit-scrollbar-thumb{border-radius:999px;background:var(--rd-border)}.rd-token-list{display:flex;flex-direction:column;gap:.5rem}.rd-token-row{display:flex;align-items:center;gap:10px;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:12px;padding:12px 14px}.rd-token-row-info{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1;overflow-wrap:anywhere}.rd-token-row-symbol{font-weight:700}.rd-token-row-amount{font-variant-numeric:tabular-nums;font-size:14px;font-weight:700;color:var(--rd-text);white-space:nowrap}.rd-token-row-status{font-size:11.5px;line-height:1.45;color:var(--rd-text-muted)}.rd-token-row-warn{font-size:11.5px;line-height:1.45;color:var(--rd-warning)}.rd-token-row-warn b{font-weight:750;font-variant-numeric:tabular-nums}.rd-token-row-step{font-size:11.5px;line-height:1.45;font-weight:650;color:var(--rd-accent)}.rd-root .rd-token-row-action{flex:none;width:auto;padding:9px 16px;font-size:13px;font-weight:700}.rd-token-row-spinner{flex:none;font-size:18px;color:var(--rd-accent)}.rd-recover-sum{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:12px;padding:16px 14px;container:rd-recover-sum / inline-size}.rd-recover-sum-label{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rd-text-muted)}.rd-recover-sum-value{max-width:100%;overflow:hidden;font-size:22px;font-size:clamp(18px,7cqi,28px);font-weight:800;line-height:1.15;font-variant-numeric:tabular-nums;text-overflow:ellipsis;white-space:nowrap;color:var(--rd-text)}.rd-recover-sum-unit{display:block;margin:.35rem 0 0;font-size:15px;font-weight:700;color:var(--rd-text-muted)}.rd-recover-sum-empty{font-size:17px;font-weight:700;color:var(--rd-text-muted)}.rd-recover-empty{display:flex;min-height:min(20rem,48vh);flex:1 1 auto;flex-direction:column;align-items:center;justify-content:center;gap:.7rem;padding:2.5rem 1.5rem;border:1px solid var(--rd-border);border-radius:16px;background:radial-gradient(circle at 50% 0%,color-mix(in srgb,var(--rd-accent) 11%,transparent),transparent 48%),var(--rd-surface-alt);text-align:center;box-sizing:border-box}.rd-recover-empty-icon{display:grid;width:4.25rem;height:4.25rem;place-items:center;margin-bottom:.2rem;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:50%;background:color-mix(in srgb,var(--rd-accent) 12%,var(--rd-surface));color:var(--rd-accent);box-shadow:0 10px 30px color-mix(in srgb,var(--rd-accent) 12%,transparent)}.rd-recover-empty[data-variant=unavailable] .rd-recover-empty-icon{border-color:var(--rd-border);background:var(--rd-surface);color:var(--rd-text-muted);box-shadow:none}.rd-recover-empty-title,.rd-recover-sum-value.rd-recover-empty-title{max-width:100%;margin:0;overflow:visible;color:var(--rd-text);font-size:1.15rem;font-weight:750;line-height:1.35;white-space:normal}.rd-recover-empty-copy{max-width:23rem;margin:0;color:var(--rd-text-muted);font-size:.82rem;line-height:1.55;text-wrap:balance}.rd-root button.rd-recover-empty-refresh{display:inline-flex;min-height:2.6rem;align-items:center;justify-content:center;gap:.45rem;margin-top:.45rem;padding:.65rem 1rem;color:var(--rd-text);font-size:.82rem}.rd-root button.rd-recover-empty-refresh:hover:not(:disabled){border-color:color-mix(in srgb,var(--rd-accent) 35%,var(--rd-border));background:color-mix(in srgb,var(--rd-accent) 9%,var(--rd-surface));color:var(--rd-accent)}[data-rd-recover-funds].rd-stack{flex:1 1 auto}.rd-recover-foot{margin-top:auto;padding-top:.5rem;text-align:center;font-size:11.5px;line-height:1.45;color:var(--rd-text-muted)}.rd-history-table{display:flex;min-width:0;flex-direction:column;gap:.6rem;font-size:.875rem}.rd-history-empty{display:flex;min-height:min(20rem,48vh);flex:1 1 auto;flex-direction:column;align-items:center;justify-content:center;gap:.7rem;padding:2.5rem 1.5rem;border:1px solid var(--rd-border);border-radius:16px;background:radial-gradient(circle at 50% 0%,color-mix(in srgb,var(--rd-accent) 10%,transparent),transparent 48%),var(--rd-surface-alt);text-align:center;box-sizing:border-box}.rd-history-empty-icon{display:grid;width:4.25rem;height:4.25rem;place-items:center;margin-bottom:.2rem;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:50%;background:color-mix(in srgb,var(--rd-accent) 12%,var(--rd-surface));color:var(--rd-accent);box-shadow:0 10px 30px color-mix(in srgb,var(--rd-accent) 12%,transparent)}.rd-history-empty[data-variant=disconnected] .rd-history-empty-icon{border-color:var(--rd-border);background:var(--rd-surface);color:var(--rd-text-muted);box-shadow:none}.rd-history-empty-title{margin:0;color:var(--rd-text);font-size:1.15rem;font-weight:750;line-height:1.35}.rd-history-empty-copy{max-width:22rem;margin:0;color:var(--rd-text-muted);font-size:.82rem;line-height:1.55;text-wrap:balance}.rd-history-empty-live{display:inline-flex;align-items:center;gap:.4rem;margin-top:.35rem;color:var(--rd-text-muted);font-size:.72rem;font-weight:650}.rd-history-empty-live>span{width:.45rem;height:.45rem;border-radius:50%;background:var(--rd-success);box-shadow:0 0 0 3px color-mix(in srgb,var(--rd-success) 15%,transparent)}.rd-history-group{min-width:0;max-width:100%;background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:12px;overflow:hidden}.rd-history-row-button{width:100%;min-width:0;display:flex;flex-direction:column;gap:.75rem;padding:1rem;background:none;border:none;border-radius:inherit;color:inherit;font:inherit;text-align:left;cursor:pointer}.rd-history-row-button[aria-expanded=true]{border-radius:12px 12px 0 0}.rd-history-row-button:hover{background:color-mix(in srgb,var(--rd-border) 30%,transparent)}.rd-history-row-button:focus-visible{outline:2px solid var(--rd-accent);outline-offset:-2px}.rd-history-card-top{display:flex;align-items:center;gap:.5rem;min-width:0}.rd-history-card-top>.rd-status-pill{margin-left:auto;flex:none}.rd-history-card-top>.rd-status-pill:not(.rd-status-pill-success):not(.rd-status-pill-failure){background:color-mix(in srgb,var(--rd-accent) 12%,transparent);color:var(--rd-accent)}.rd-history-asset{font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rd-history-card-amounts{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:.75rem;padding:.75rem;border-radius:10px;background:var(--rd-surface)}.rd-history-amount-block{display:flex;max-width:100%;flex-direction:column;gap:.15rem;min-width:0}.rd-history-amount-block:last-child{align-items:flex-end;text-align:right}.rd-history-amount-label{color:var(--rd-text-muted);font-size:.68rem;font-weight:650;line-height:1.2}.rd-history-num{max-width:100%;overflow:hidden;font-variant-numeric:tabular-nums;font-size:.875rem;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.rd-history-num[data-full-value],.rd-history-step-amount[data-full-value]{cursor:help}[data-rd-history-floating-tooltip]{position:fixed;z-index:100100;width:max-content;max-width:calc(100vw - 1.5rem);padding:.45rem .65rem;border:1px solid;border-radius:8px;font-size:.72rem;font-weight:600;line-height:1.35;text-align:left;white-space:normal;overflow-wrap:anywhere;pointer-events:none}.rd-history-card-arrow{display:inline-flex;align-items:center;justify-content:center;color:var(--rd-text-muted);font-size:.85rem}.rd-history-received{color:var(--rd-success)}.rd-history-received-estimate{color:var(--rd-text-muted);font-weight:600}.rd-history-card-foot{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.rd-history-date{color:var(--rd-text-muted);font-size:.78rem;font-variant-numeric:tabular-nums}.rd-history-chevron{display:inline-flex;flex:none;align-items:center;justify-content:center;color:var(--rd-text-muted);text-align:center;transition:transform .16s ease}.rd-history-row-button[aria-expanded=true] .rd-history-chevron{transform:rotate(180deg)}.rd-history-detail{display:flex;min-width:0;flex-direction:column;gap:.375rem;padding:.65rem .9rem .8rem;border-top:1px solid var(--rd-border)}.rd-history-step{display:grid;min-width:0;grid-template-columns:.5rem auto 1fr auto auto;gap:.5rem;align-items:center}.rd-history-step-dot{width:.5rem;height:.5rem;border-radius:50%;background:var(--rd-border)}.rd-history-step-dot-done{background:var(--rd-success)}.rd-history-step-label{font-weight:600}.rd-history-step-chain{color:var(--rd-text-muted)}.rd-history-step-amount{font-variant-numeric:tabular-nums;color:var(--rd-text-muted)}.rd-history-step-tx{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.rd-history-step-shared{margin-left:.4rem;color:var(--rd-text-muted);font-size:.72rem}.rd-skeleton{border-radius:10px;background:linear-gradient(90deg,var(--rd-surface-alt) 25%,color-mix(in srgb,var(--rd-surface-alt) 55%,var(--rd-surface)) 42%,var(--rd-surface-alt) 60%);background-size:220% 100%;animation:rd-skeleton-wave 1.4s ease-in-out infinite}@keyframes rd-skeleton-wave{0%{background-position:130% 0}to{background-position:-90% 0}}@media(prefers-reduced-motion:reduce){.rd-skeleton,.rd-checklist-status,.rd-deposit-head[data-compact-view=address]>.rd-deposit-address,.rd-deposit-head[data-compact-view=qr]>.rd-deposit-qr-pane,.rd-checklist-status-waiting .rd-checklist-status-dot,.rd-checklist-status-detected .rd-checklist-status-dot{animation:none}}.rd-skeleton-form{display:flex;flex-direction:column;gap:.85rem}.rd-skeleton-qr{flex:none;width:172px;height:172px;border-radius:16px}.rd-skeleton-address{flex:1 1 12rem;min-width:0;height:172px;border-radius:16px}.rd-skeleton-line{height:.9rem;width:40%}.rd-skeleton-field{height:48px}.rd-skeleton-notice{height:96px}.rd-skeleton-cta{height:48px}.rd-wizard{flex:1 1 auto;min-height:0;overflow-y:auto;container:rd-wizard / inline-size;padding:1rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom,0px));scroll-padding:1.5rem 0 calc(1.5rem + env(safe-area-inset-bottom,0px));overscroll-behavior:contain;-webkit-overflow-scrolling:touch;max-width:none;gap:.85rem}.rd-deposit-tabs{--rd-tab-count: 3;--rd-active-tab-index: 0;position:sticky;top:-1rem;z-index:2;display:flex;flex:0 0 auto;justify-content:space-around;margin:-1rem -1.25rem 0;padding:1rem 1.25rem 0;border-bottom:1px solid var(--rd-border);background:var(--rd-surface)}.rd-deposit-tabs[data-active-index="1"]{--rd-active-tab-index: 1}.rd-deposit-tabs[data-active-index="2"]{--rd-active-tab-index: 2}.rd-deposit-tabs:after{position:absolute;bottom:-1px;left:1.25rem;width:calc((100% - 2.5rem) / var(--rd-tab-count));height:2px;background:var(--rd-accent);content:"";pointer-events:none;transform:translate(calc(var(--rd-active-tab-index) * 100%));transition:transform .22s cubic-bezier(.22,1,.36,1),width .18s ease}.rd-root .rd-deposit-tab{position:relative;display:inline-flex;flex:1 1 0;min-width:0;min-height:2.75rem;align-items:center;justify-content:center;gap:.4rem;padding:.85rem .35rem;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:var(--rd-text-muted);font:inherit;font-size:.875rem;font-weight:650;line-height:1.2;transition:border-color .16s ease,background-color .16s ease,color .16s ease}.rd-root .rd-deposit-tab[data-active=true]{color:var(--rd-text)}.rd-root .rd-deposit-tab:hover:not(:disabled),.rd-root .rd-deposit-tab:focus-visible{outline:none;background:color-mix(in srgb,var(--rd-accent) 7%,transparent);color:var(--rd-text)}.rd-deposit-tab>.rd-recovery-badge{position:static;flex:none;min-width:1rem;height:1rem;padding:0 .2rem;border-width:0}.rd-deposit-tab-panel{display:flex;min-width:0;flex:1 1 auto;flex-direction:column;gap:.85rem;transform-origin:top center;animation:rd-deposit-tab-in .18s cubic-bezier(.22,1,.36,1)}@keyframes rd-deposit-tab-in{0%{opacity:0;transform:translateY(.35rem)}to{opacity:1;transform:translateY(0)}}.rd-stack{display:flex;min-width:0;flex-direction:column;gap:.75rem}.rd-wizard-header{display:flex;align-items:center;gap:.5rem;margin-bottom:0}.rd-wizard-heading{font-size:1rem;font-weight:700;color:var(--rd-text);margin:0}.rd-wizard-actions{margin-left:auto;display:flex;align-items:center;gap:.25rem}.rd-min-notice-pending{color:var(--rd-text-muted)}.rd-min-notice-pending b{font-weight:750;color:var(--rd-warning);font-variant-numeric:tabular-nums}.rd-locked-card{display:flex;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;padding:1.5rem 1.25rem;border:1px solid var(--rd-border);border-radius:16px;background:radial-gradient(circle at 50% 0%,color-mix(in srgb,var(--rd-accent) 12%,transparent),transparent 52%),var(--rd-surface-alt);text-align:center;box-sizing:border-box}.rd-locked-glyph{display:grid;width:3rem;height:3rem;place-items:center;margin-bottom:.1rem;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:50%;background:color-mix(in srgb,var(--rd-accent) 12%,var(--rd-surface));color:var(--rd-accent);line-height:0;box-shadow:0 10px 30px color-mix(in srgb,var(--rd-accent) 12%,transparent)}.rd-locked-title{margin:0;color:var(--rd-text);font-size:1rem;font-weight:750;line-height:1.3}.rd-locked-text{max-width:22rem;margin:0;color:var(--rd-text-muted);font-size:.8rem;line-height:1.45}.rd-locked-card>.rd-card-hint{max-width:22rem;margin:-.2rem 0 0;text-wrap:balance}.rd-root button.rd-locked-action{display:inline-flex;width:min(18rem,100%);min-height:2.6rem;align-items:center;justify-content:center;gap:.5rem;margin-top:.25rem}.rd-delivery-recipient{display:flex;flex-direction:column;gap:.3rem;margin-top:.5rem}.rd-checklist-credit{font-size:clamp(10px,2.7vw,11.5px);white-space:nowrap}.rd-checklist{background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:14px;padding:11px 14px;display:flex;flex-direction:column;gap:7px}.rd-checklist-row{display:flex;align-items:flex-start;gap:.5rem;font-size:12.5px;line-height:1.5;color:var(--rd-text)}.rd-checklist-row[data-rd-checklist-only]{align-items:center;white-space:nowrap;font-size:clamp(10.5px,2.8vw,12.5px)}.rd-checklist-mark{flex:none;width:1.05rem;text-align:center;font-weight:800;color:var(--rd-text-muted)}.rd-checklist-mark-warn{color:var(--rd-warning)}.rd-checklist-accent{color:var(--rd-accent);font-weight:750;font-variant-numeric:tabular-nums}.rd-checklist-status{min-height:54px;display:flex;align-items:center;gap:.65rem;padding:10px 12px;border:1px solid color-mix(in srgb,var(--rd-accent) 30%,var(--rd-border));border-radius:12px;background:var(--rd-surface-alt);color:var(--rd-text-muted);font-size:12.5px;line-height:1.45;transform-origin:top center;animation:rd-status-enter .48s cubic-bezier(.22,1,.36,1)}.rd-checklist-status-waiting,.rd-checklist-status-detected{border-color:color-mix(in srgb,var(--rd-warning) 42%,var(--rd-border));box-shadow:0 0 0 1px color-mix(in srgb,var(--rd-warning) 10%,transparent)}@keyframes rd-status-enter{0%{opacity:0;transform:translateY(-10px) scale(.985);box-shadow:0 0 color-mix(in srgb,var(--rd-accent) 28%,transparent)}65%{opacity:1;transform:translateY(1px) scale(1);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-accent) 16%,transparent)}to{opacity:1;transform:translateY(0);box-shadow:0 0 0 0 transparent}}.rd-checklist-status-dot{flex:none;width:9px;height:9px;border-radius:50%;background:var(--rd-warning);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-warning) 14%,transparent)}.rd-checklist-status-waiting .rd-checklist-status-dot,.rd-checklist-status-detected .rd-checklist-status-dot{animation:rd-status-breathe 1.8s ease-in-out infinite}@keyframes rd-status-breathe{0%,to{opacity:.82;transform:scale(.96);box-shadow:0 0 0 3px color-mix(in srgb,var(--rd-warning) 10%,transparent)}50%{opacity:1;transform:scale(1);box-shadow:0 0 0 5px color-mix(in srgb,var(--rd-warning) 15%,transparent)}}.rd-checklist-status-funded,.rd-checklist-status-processing{color:var(--rd-text);border-color:color-mix(in srgb,var(--rd-accent) 40%,transparent)}.rd-checklist-status-funded .rd-checklist-status-dot,.rd-checklist-status-processing .rd-checklist-status-dot{background:var(--rd-accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-accent) 14%,transparent)}.rd-checklist-status-completed{border-color:color-mix(in srgb,var(--rd-success) 40%,transparent);background:var(--rd-success-bg);color:var(--rd-success)}.rd-checklist-status-completed .rd-checklist-status-dot{background:var(--rd-success);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-success) 14%,transparent)}.rd-checklist-status-failed{border-color:color-mix(in srgb,var(--rd-danger) 40%,transparent);background:var(--rd-danger-bg);color:var(--rd-danger)}.rd-checklist-status-failed .rd-checklist-status-dot{background:var(--rd-danger);box-shadow:0 0 0 4px color-mix(in srgb,var(--rd-danger) 14%,transparent)}@container rd-wizard (max-width: 30rem){.rd-recover-sum{padding-inline:.75rem}.rd-recover-sum-value{font-size:clamp(1rem,6cqi,1.5rem)}[data-rd-recover-funds] .rd-callout,.rd-token-row-status,.rd-token-row-warn,.rd-token-row-step,.rd-recover-foot{overflow-wrap:anywhere}.rd-token-row{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;padding:.875rem}.rd-root .rd-token-row-action{width:100%;min-height:2.75rem;grid-column:1 / -1}.rd-token-row-spinner{grid-column:1 / -1;justify-self:center}}@container rd-wizard (max-width: 24rem){.rd-history-card-top{flex-direction:column;align-items:flex-start}.rd-history-card-top>.rd-status-pill{max-width:100%;margin-left:0;white-space:normal}.rd-history-asset{overflow:visible;text-overflow:clip;white-space:normal}.rd-history-card-amounts{grid-template-columns:minmax(0,1fr);gap:.45rem}.rd-history-amount-block{width:100%}.rd-history-amount-block:last-child{align-items:flex-start;text-align:left}.rd-history-card-arrow{display:inline-flex;justify-self:center;margin:0;transform:rotate(90deg);transform-origin:center}.rd-history-card-foot{align-items:flex-start}.rd-history-date{min-width:0;line-height:1.4;overflow-wrap:anywhere}.rd-history-step{grid-template-columns:.5rem minmax(0,1fr);grid-template-areas:"dot label" ". chain" ". amount" ". tx";column-gap:.5rem;row-gap:.25rem;align-items:start;padding-block:.65rem;line-height:1.35}.rd-history-step+.rd-history-step{border-top:1px solid var(--rd-border)}.rd-history-step-dot{grid-area:dot;margin-top:.35rem}.rd-history-step-label{grid-area:label}.rd-history-step-chain{grid-area:chain}.rd-history-step-amount{grid-area:amount}.rd-history-step-tx{grid-area:tx;min-width:0;max-width:100%}.rd-history-step-tx a{overflow-wrap:anywhere}.rd-history-step-shared{display:block;margin:.15rem 0 0}.rd-history-step>.rd-muted{grid-area:tx}}@container rd-wizard (max-width: 22rem){.rd-root .rd-deposit-tab{gap:.2rem;padding-inline:.15rem;font-size:.8rem}.rd-history-row-button,.rd-history-detail{padding-inline:.75rem}}@media(prefers-reduced-motion:reduce){.rd-deposit-tabs:after,.rd-root .rd-deposit-tab{transition:none}.rd-deposit-tab-panel{animation:none}}
20
+ `);var Vt=require("react/jsx-runtime");function dh({minNotice:e,arrivalStatus:t}){let n=t.amount&&t.symbol?`${t.amount} ${t.symbol} arrived`:t.amount?`${t.amount} arrived`:void 0,r=(()=>{switch(t.phase){case"detected":if(e.remaining!==void 0){let o=`${e.remaining} ${e.symbol}`;return n?`${n} at the processing address. Waiting for ${o} more to reach the minimum.`:`Deposit detected. Waiting for ${o} more to reach the minimum.`}return n?`${n} at the processing address. Checking the minimum.`:"Deposit detected. Checking the minimum.";case"funded":return`${e.min} ${e.symbol} received at the processing address. Preparing delivery.`;case"processing":return"Minimum reached. Bridging and delivering to ONEchain.";case"completed":return"Transfer completed. Funds were delivered to ONEchain.";case"failed":return`Transfer needs attention${t.backendStatus?` (${t.backendStatus})`:""}.`;case"unavailable":return e.remaining===void 0?"Live status is temporarily unavailable. Retrying automatically.":void 0;default:return e.remaining===void 0?"Waiting for your deposit.":void 0}})();return r?(0,Vt.jsxs)("div",{className:`rd-checklist-status rd-checklist-status-${t.phase}`,"data-rd-deposit-status":"","data-phase":t.phase,role:"status","aria-live":"polite","aria-atomic":"true",children:[(0,Vt.jsx)("span",{className:"rd-checklist-status-dot","aria-hidden":"true"}),(0,Vt.jsx)("span",{children:r})]},`live:${t.phase}:${r}`):e.remaining!==void 0?(0,Vt.jsxs)("div",{className:"rd-checklist-status rd-checklist-status-waiting rd-min-notice-pending","data-rd-min-notice-pending":"",role:"status","aria-live":"polite","aria-atomic":"true",children:[(0,Vt.jsx)("span",{className:"rd-checklist-status-dot","aria-hidden":"true"}),(0,Vt.jsxs)("span",{children:["Waiting for"," ",(0,Vt.jsxs)("b",{children:[e.remaining," ",e.symbol]})," ","more to arrive at the processing address."]})]},`pending:${e.remaining}:${e.symbol}`):null}function ch({minNotice:e,onlySend:t,showWalletCreditNote:n=!1}){return(0,Vt.jsxs)("div",{className:"rd-checklist","data-rd-checklist":"",children:[(0,Vt.jsxs)("div",{className:"rd-checklist-row","data-rd-checklist-only":"",children:[(0,Vt.jsx)("span",{className:"rd-checklist-mark rd-checklist-mark-warn","aria-hidden":"true",children:"!"}),(0,Vt.jsxs)("span",{children:[(0,Vt.jsxs)("b",{children:[t.chainName," ",t.symbol," only"]})," \xB7 ",(0,Vt.jsxs)("b",{className:"rd-checklist-accent",children:[e.min," ",e.symbol," minimum"]})]})]}),(0,Vt.jsxs)("div",{className:"rd-checklist-row",children:[(0,Vt.jsx)("span",{className:"rd-checklist-mark","aria-hidden":"true",children:"\u21BB"}),(0,Vt.jsx)("span",{children:"Reusable \u2014 deposit as many times as you like"})]}),n&&(0,Vt.jsxs)("div",{className:"rd-checklist-row rd-checklist-credit","data-rd-checklist-credit":"",children:[(0,Vt.jsx)("span",{className:"rd-checklist-mark","aria-hidden":"true",children:"\u2192"}),(0,Vt.jsx)("span",{children:"Credited to your ONEchain wallet"})]})]})}var vo=require("react");var Fa="0x0000000000000000000000000000000000000000",ov=/^0x[0-9a-fA-F]{40}$/;function ht(e){return ov.test(e)}function pn(e,t){let n=e<0n,o=(n?-e:e).toString().padStart(t+1,"0"),a=t===0?o:o.slice(0,-t),i=t===0?"":o.slice(-t).replace(/0+$/,""),s=i?`${a}.${i}`:a;return n?`-${s}`:s}function Bs(e,t){let n=e.match(/^(-?)(\d+)(?:\.(\d+))?$/);if(!n)throw new Error(`parseUnits: invalid decimal string "${e}"`);let[,r,o,a=""]=n;if(a.length>t)throw new Error(`parseUnits: too many decimal places for ${t} decimals`);let i=BigInt(o+a.padEnd(t,"0"));return r==="-"?-i:i}var Qr=require("react");var Vd="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTQwIDU0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh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2049/l4Cd3UQs10mS60vhtfzsPBLxbMbE2BgjY2XMQYoU2UIavS+2XseiDaQQ+d4iovOpeB8W5WkM3YazDIQ7K/zsRn4Xv5PfzRgYC2MKUqSIs1tC4dWZZTl4UVtZ9q7HiUehi/h775H//4aI7z0OZ5LeVJvNw/fyM/wsn8Fn8Zl8Nr+D36Wvsp/if7BfCn8ECvocAAAAAElFTkSuQmCC";function ph(e){switch(e.toUpperCase()){case"ONEUSD":return Vd;case"PONEUSD":return av;case"USDT":return iv;case"USDC":return sv;default:return}}var _=require("react/jsx-runtime");function uh(e){let t=e.trim();return t?t.slice(0,2).toUpperCase():"?"}function lv({size:e,bg:t,fg:n="#ffffff",children:r}){return(0,_.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",style:{display:"block",flex:"none",borderRadius:"50%"},children:[(0,_.jsx)("circle",{cx:"12",cy:"12",r:"12",fill:t}),(0,_.jsx)("g",{fill:n,stroke:n,children:r})]})}function Qd({size:e,bg:t,fg:n="#ffffff",text:r}){return(0,_.jsx)(lv,{size:e,bg:t,fg:n,children:(0,_.jsx)("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",fontSize:"10",fontWeight:700,fontFamily:"inherit",stroke:"none",fill:n,children:r})})}function _o({size:e,viewBox:t="0 0 24 24",children:n}){return(0,_.jsx)("svg",{width:e,height:e,viewBox:t,"aria-hidden":"true",focusable:"false",style:{display:"block",flex:"none",borderRadius:"50%"},children:n})}function dv({size:e}){let t=(0,Qr.useId)();return(0,_.jsxs)(_o,{size:e,children:[(0,_.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,_.jsx)("path",{fill:"#000",d:"M24 0H0v24h24z"}),(0,_.jsx)("path",{fill:"#8FFCF3",d:"M12 4v5.912l5 2.237z"}),(0,_.jsx)("path",{fill:"#CABCF8",d:"m12 4-5 8.148 5-2.235z"}),(0,_.jsx)("path",{fill:"#CBA7F5",d:"M12 15.98V20l5-6.92z"}),(0,_.jsx)("path",{fill:"#74A0F3",d:"M12 20v-4.02l-5-2.9z"}),(0,_.jsx)("path",{fill:"#CBA7F5",d:"m12 15.049 5-2.9-5-2.236z"}),(0,_.jsx)("path",{fill:"#74A0F3",d:"m7 12.149 5 2.9V9.913z"}),(0,_.jsx)("path",{fill:"#202699",fillRule:"evenodd",clipRule:"evenodd",d:"m12 15.048-5-2.9L12 4l5 8.148zm-4.67-3.136 4.588-7.475v5.435zm-.068.204 4.656-2.068v4.768zm4.816-2.068v4.768l4.653-2.7zm0-.176 4.588 2.04-4.588-7.475z"}),(0,_.jsx)("path",{fill:"#202699",fillRule:"evenodd",clipRule:"evenodd",d:"m12 15.917-5-2.84L12 20l5-6.924zm-4.44-2.341 4.36 2.48v3.56zm4.519 2.48v3.56l4.36-6.04z"})]}),(0,_.jsx)("defs",{children:(0,_.jsx)("clipPath",{id:t,children:(0,_.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function cv({size:e}){let t=(0,Qr.useId)();return(0,_.jsxs)(_o,{size:e,children:[(0,_.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,_.jsx)("path",{fill:"#F0B90B",d:"M24 0H0v24h24z"}),(0,_.jsx)("path",{fill:"#fff",d:"M7.635 6.449 12 4l4.364 2.449-1.6.907L12 5.809 9.24 7.356zm8.73 3.093-1.6-.906L12 10.182 9.24 8.636l-1.605.906v1.81l2.756 1.546v3.089l1.609.906 1.604-.906v-3.09l2.76-1.546zm0 4.903V12.63l-1.6.907v1.809zm1.141.64-2.76 1.542v1.813l4.365-2.453v-4.898l-1.605.902zm-1.604-7.09 1.6.907v1.81l1.609-.903V7.996l-1.605-.907L15.902 8zm-5.511 9.29v1.808L12 20l1.604-.907V17.29l-1.604.9-1.605-.907zM7.635 14.44l1.6.907v-1.81l-1.6-.906v1.813zm2.756-6.444L12 8.902l1.604-.906L12 7.089 10.395 8zm-3.898.906 1.605-.906-1.6-.907L4.888 8v1.813l1.605.903zm0 3.09-1.604-.903v4.898l4.364 2.453v-1.818L6.498 15.08v-3.093z"})]}),(0,_.jsx)("defs",{children:(0,_.jsx)("clipPath",{id:t,children:(0,_.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function pv({size:e}){let t=(0,Qr.useId)();return(0,_.jsxs)(_o,{size:e,viewBox:"0 0 111 111",children:[(0,_.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,_.jsx)("path",{fill:"#fff",d:"M0 0h111v111H0z"}),(0,_.jsx)("path",{fill:"#0052FF",d:"M54.921 110.034C85.359 110.034 110.034 85.402 110.034 55.017C110.034 24.6319 85.359 0 54.921 0C26.0432 0 2.35281 22.1714 0 50.3923H72.8467V59.6416H0C2.35281 87.8625 26.0432 110.034 54.921 110.034Z"})]}),(0,_.jsx)("defs",{children:(0,_.jsx)("clipPath",{id:t,children:(0,_.jsx)("path",{fill:"#fff",d:"M0 0h111v111H0z"})})})]})}function uv({size:e}){let t=(0,Qr.useId)();return(0,_.jsxs)(_o,{size:e,children:[(0,_.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,_.jsx)("path",{fill:"#213147",d:"M24 0H0v24h24z"}),(0,_.jsxs)("g",{transform:"translate(12 12) scale(1.28) translate(-12 -12)",children:[(0,_.jsx)("path",{fill:"#fff",d:"m13.203 13.216-.787 2.124a.27.27 0 0 0 0 .183l1.354 3.655 1.565-.89-1.879-5.072c-.042-.117-.21-.117-.253 0m1.577-3.573a.135.135 0 0 0-.253 0l-.787 2.124a.27.27 0 0 0 0 .183l2.217 5.985 1.565-.89z"}),(0,_.jsx)("path",{fill:"#fff",d:"M11.999 4.991a.24.24 0 0 1 .111.03l5.969 3.393a.22.22 0 0 1 .112.19v6.787a.22.22 0 0 1-.112.19l-5.969 3.395a.2.2 0 0 1-.111.029.24.24 0 0 1-.113-.03l-5.968-3.39a.22.22 0 0 1-.112-.19v-6.79a.22.22 0 0 1 .112-.19l5.969-3.393a.23.23 0 0 1 .111-.03m0-.991c-.213 0-.426.054-.616.163L5.416 7.556a1.21 1.21 0 0 0-.616 1.05v6.787c0 .433.234.834.616 1.05l5.968 3.394a1.25 1.25 0 0 0 1.232 0l5.968-3.394a1.21 1.21 0 0 0 .616-1.05V8.606a1.21 1.21 0 0 0-.616-1.05l-5.97-3.393A1.24 1.24 0 0 0 11.998 4"}),(0,_.jsx)("path",{fill:"#fff",d:"m8.052 17.943.55-1.482 1.105.905-1.034.93zm3.445-9.823H9.984a.27.27 0 0 0-.254.175l-3.243 8.757 1.565.89L11.623 8.3a.132.132 0 0 0-.127-.179"}),(0,_.jsx)("path",{fill:"#fff",d:"M14.144 8.12h-1.513a.27.27 0 0 0-.253.175l-3.704 10 1.565.89 4.032-10.886a.133.133 0 0 0-.127-.179"})]})]}),(0,_.jsx)("defs",{children:(0,_.jsx)("clipPath",{id:t,children:(0,_.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function fv({size:e}){let t=(0,Qr.useId)(),n=(0,Qr.useId)();return(0,_.jsxs)(_o,{size:e,children:[(0,_.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,_.jsx)("path",{fill:`url(#${n})`,d:"M24 0H0v24h24z"}),(0,_.jsx)("path",{fill:"#fff",d:"m15.88 14.86 3.794-2.165a.64.64 0 0 0 .326-.558v-4.33a.64.64 0 0 0-.326-.556L15.88 5.086a.66.66 0 0 0-.65 0L11.432 7.25a.64.64 0 0 0-.325.557v7.737l-2.662 1.517-2.661-1.517v-3.036l2.661-1.517 1.755 1.001V9.958l-1.43-.816a.66.66 0 0 0-.65 0l-3.796 2.165a.64.64 0 0 0-.325.557v4.33c0 .229.124.442.325.557l3.796 2.165c.2.114.45.114.65 0l3.796-2.165a.64.64 0 0 0 .325-.557V8.455l.048-.026 2.613-1.49 2.661 1.516v3.036l-2.661 1.517-1.753-.999v2.037l1.427.814a.66.66 0 0 0 .651 0z"})]}),(0,_.jsxs)("defs",{children:[(0,_.jsxs)("linearGradient",{id:n,x1:"3.948",x2:"19.217",y1:"16.617",y2:"7.645",gradientUnits:"userSpaceOnUse",children:[(0,_.jsx)("stop",{stopColor:"#A726C1"}),(0,_.jsx)("stop",{offset:".88",stopColor:"#803BDF"}),(0,_.jsx)("stop",{offset:"1",stopColor:"#7B3FE4"})]}),(0,_.jsx)("clipPath",{id:t,children:(0,_.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})]})]})}function mv({size:e}){let t=(0,Qr.useId)();return(0,_.jsxs)(_o,{size:e,children:[(0,_.jsx)("path",{fill:"#000",d:"M24 0H0v24h24z"}),(0,_.jsx)("g",{transform:"translate(5 5.9) scale(0.1386)",children:(0,_.jsx)("path",{fill:`url(#${t})`,d:"M100.48 69.3817L83.8068 86.8015C83.4444 87.1799 83.0058 87.4816 82.5185 87.6878C82.0312 87.894 81.5055 88.0003 80.9743 88H1.93563C1.55849 88 1.18957 87.8926 0.874202 87.6912C0.558829 87.4897 0.31074 87.2029 0.160416 86.8659C0.0100923 86.529 -0.0359181 86.1566 0.0280382 85.7945C0.0919944 85.4324 0.263131 85.0964 0.520422 84.8278L17.2061 67.408C17.5676 67.0306 18.0047 66.7295 18.4904 66.5234C18.9762 66.3172 19.5002 66.2104 20.0301 66.2095H99.0644C99.4415 66.2095 99.8104 66.3169 100.126 66.5183C100.441 66.7198 100.689 67.0067 100.84 67.3436C100.99 67.6806 101.036 68.0529 100.972 68.415C100.908 68.7771 100.737 69.1131 100.48 69.3817ZM83.8068 34.3032C83.4444 33.9248 83.0058 33.6231 82.5185 33.4169C82.0312 33.2108 81.5055 33.1045 80.9743 33.1048H1.93563C1.55849 33.1048 1.18957 33.2121 0.874202 33.4136C0.558829 33.6151 0.31074 33.9019 0.160416 34.2388C0.0100923 34.5758 -0.0359181 34.9482 0.0280382 35.3103C0.0919944 35.6723 0.263131 36.0083 0.520422 36.277L17.2061 53.6968C17.5676 54.0742 18.0047 54.3752 18.4904 54.5814C18.9762 54.7875 19.5002 54.8944 20.0301 54.8952H99.0644C99.4415 54.8952 99.8104 54.7879 100.126 54.5864C100.441 54.3849 100.689 54.0981 100.84 53.7612C100.99 53.4242 101.036 53.0518 100.972 52.6897C100.908 52.3277 100.737 51.9917 100.48 51.723L83.8068 34.3032ZM1.93563 21.7905H80.9743C81.5055 21.7907 82.0312 21.6845 82.5185 21.4783C83.0058 21.2721 83.4444 20.9704 83.8068 20.592L100.48 3.17219C100.737 2.90357 100.908 2.56758 100.972 2.2055C101.036 1.84342 100.99 1.47103 100.84 1.13408C100.689 0.79713 100.441 0.510296 100.126 0.308823C99.8104 0.107349 99.4415 1.24074e-05 99.0644 0L20.0301 0C19.5002 0.000878397 18.9762 0.107699 18.4904 0.313848C18.0047 0.519998 17.5676 0.821087 17.2061 1.19848L0.524723 18.6183C0.267681 18.8866 0.0966198 19.2223 0.0325185 19.5839C-0.0315829 19.9456 0.0140624 20.3177 0.163856 20.6545C0.31365 20.9913 0.561081 21.2781 0.875804 21.4799C1.19053 21.6817 1.55886 21.7896 1.93563 21.7905Z"})}),(0,_.jsx)("defs",{children:(0,_.jsxs)("linearGradient",{id:t,x1:"8.52558",y1:"90.0973",x2:"88.9933",y2:"-3.01622",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(5 5.9) scale(0.1386)",children:[(0,_.jsx)("stop",{offset:"0.08",stopColor:"#9945FF"}),(0,_.jsx)("stop",{offset:"0.3",stopColor:"#8752F3"}),(0,_.jsx)("stop",{offset:"0.5",stopColor:"#5497D5"}),(0,_.jsx)("stop",{offset:"0.6",stopColor:"#43B4CA"}),(0,_.jsx)("stop",{offset:"0.72",stopColor:"#28E0B9"}),(0,_.jsx)("stop",{offset:"0.97",stopColor:"#19FB9B"})]})})]})}function zs({chainId:e,chainName:t,size:n=20}){switch(e){case 1:return(0,_.jsx)(dv,{size:n});case 56:return(0,_.jsx)(cv,{size:n});case 8453:return(0,_.jsx)(pv,{size:n});case 42161:return(0,_.jsx)(uv,{size:n});case 137:return(0,_.jsx)(fv,{size:n});case 792703809:return(0,_.jsx)(mv,{size:n});case 612055:return(0,_.jsx)(Qd,{size:n,bg:"#0b1f3a",text:"CR"});default:return(0,_.jsx)(Qd,{size:n,bg:"#676b7a",text:uh(t??String(e))})}}function xo({symbol:e,logoUrl:t,size:n=20}){let r=t&&t.trim().length>0?t.trim():ph(e);return r?(0,_.jsx)("img",{src:r,alt:"","aria-hidden":"true",width:n,height:n,style:{display:"block",flex:"none",borderRadius:"50%",objectFit:"cover"}}):(0,_.jsx)(Qd,{size:n,bg:"#676b7a",text:uh(e)})}var fh=require("qrcode.react"),ye=require("react/jsx-runtime");function Fs(){return(0,ye.jsxs)("div",{className:"rd-deposit-head","data-testid":"rd-address-skeleton","aria-hidden":"true",children:[(0,ye.jsx)("span",{className:"rd-skeleton rd-skeleton-qr"}),(0,ye.jsx)("span",{className:"rd-skeleton rd-skeleton-address"})]})}function gv(e){let{depositAddress:t,originChainId:n,originCurrency:r,amountWei:o,isNative:a}=e;if(a)return o!==void 0?`ethereum:${t}@${n}?value=${o.toString()}`:`ethereum:${t}@${n}`;let i=new URLSearchParams({address:t});return o!==void 0&&i.set("uint256",o.toString()),`ethereum:${r}@${n}/transfer?${i.toString()}`}function hv(e){let{depositAddress:t,splMint:n,humanAmount:r}=e,o=new URLSearchParams;return r&&o.set("amount",r),o.set("spl-token",n),`solana:${t}?${o.toString()}`}function mh({depositAddress:e,originChainId:t,originChainName:n,originCurrency:r,amount:o,tokenSymbol:a,tokenDecimals:i,kind:s="evm",depositState:l,onDeposit:d,canDeposit:p,oneClickEnabled:h=!0}){let[u,g]=(0,vo.useState)(!1),[x,y]=(0,vo.useState)("address"),f=(0,vo.useId)();(0,vo.useEffect)(()=>{y("address")},[e]);let c=r.toLowerCase()===Fa,b=s==="svm";async function w(){try{await navigator.clipboard.writeText(e),g(!0),setTimeout(()=>g(!1),1500)}catch{}}let k;if(o)try{let M=BigInt(o);M>0n&&(k=M)}catch{}let C=k!==void 0,N;if(C)try{N=pn(k,i)}catch{N=o}let T=b?hv({depositAddress:e,splMint:r,humanAmount:N??""}):gv({depositAddress:e,originChainId:t,originCurrency:r,amountWei:k,isNative:c}),{isSubmitting:R,isConfirming:S,isConfirmed:E,needsSwitch:A,txHash:F,reverted:D,error:G}=l;return(0,ye.jsxs)("section",{className:"rd-stack",children:[(0,ye.jsxs)("div",{className:"rd-deposit-head","data-compact-view":x,children:[(0,ye.jsxs)("div",{className:"rd-deposit-qr-pane",children:[(0,ye.jsxs)("div",{className:"rd-deposit-qr",children:[(0,ye.jsx)(fh.QRCodeSVG,{value:T,size:144,level:"H"}),(0,ye.jsx)("span",{className:"rd-deposit-qr-badge","aria-hidden":"true",children:(0,ye.jsx)(zs,{chainId:t,chainName:n,size:28})})]}),(0,ye.jsx)("button",{type:"button",className:"rd-mobile-address-toggle","aria-label":"Show address and copy",onClick:()=>y("address"),children:(0,ye.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,ye.jsx)("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2.25",stroke:"currentColor",strokeWidth:"1.8"}),(0,ye.jsx)("path",{d:"M16 8V6.25A2.25 2.25 0 0 0 13.75 4h-7.5A2.25 2.25 0 0 0 4 6.25v7.5A2.25 2.25 0 0 0 6.25 16H8",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]})})]}),(0,ye.jsxs)("div",{className:"rd-deposit-address",children:[(0,ye.jsx)("span",{className:"rd-deposit-address-label",children:(0,ye.jsxs)("button",{type:"button",className:"rd-address-term","aria-describedby":f,children:["Deposit address",(0,ye.jsx)("span",{id:f,className:"rd-address-tooltip",role:"tooltip",children:"This is a reusable, open deposit address. A wrong token or wrong chain will not be processed automatically, and recovery has weaker guarantees than a one-time order address and may require a manual request."})]})}),(0,ye.jsx)("button",{type:"button",className:"rd-mobile-qr-toggle","aria-label":"Show deposit QR code","aria-pressed":x==="qr",onClick:()=>y("qr"),children:(0,ye.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:(0,ye.jsx)("path",{d:"M7.913 10.833c.69 0 1.25.56 1.25 1.25v4.163c0 .69-.56 1.25-1.25 1.25H3.75c-.69 0-1.25-.56-1.25-1.25v-4.163c0-.69.56-1.25 1.25-1.25h4.163Zm6.255 6.663h-1.665V15.83h1.665v1.666Zm3.332 0h-1.666V15.83H17.5v1.666Zm-13.334-5v3.334h3.331v-3.333H4.166Zm8.337 3.334h-1.666v-1.666h1.666v1.666Zm3.331 0h-1.666v-1.666h1.666v1.666Zm-1.666-1.666h-1.665v-1.667h1.665v1.667Zm3.332 0h-1.666v-1.667H17.5v1.667Zm-4.997-1.667h-1.666v-1.664h1.666v1.664Zm3.331 0h-1.666v-1.664h1.666v1.664ZM7.913 2.504c.69 0 1.25.56 1.25 1.25v4.163c0 .69-.56 1.25-1.25 1.25H3.75c-.69 0-1.25-.56-1.25-1.25V3.754c0-.69.56-1.25 1.25-1.25h4.163Zm8.329 0c.69 0 1.25.56 1.25 1.25v4.163c0 .69-.56 1.25-1.25 1.25h-4.163c-.69 0-1.25-.56-1.25-1.25V3.754c0-.69.56-1.25 1.25-1.25h4.163ZM4.166 4.17V7.5h3.331V4.17H4.166Zm8.329 0V7.5h3.331V4.17h-3.331Z",fill:"currentColor"})})}),(0,ye.jsx)("span",{className:"rd-address-full",title:e,children:e}),(0,ye.jsxs)("button",{type:"button",className:"rd-address-copy",onClick:w,"aria-label":`Copy deposit address ${e}`,children:[u?(0,ye.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,ye.jsx)("path",{d:"m5 12 4 4L19 6",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}):(0,ye.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,ye.jsx)("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.8"}),(0,ye.jsx)("path",{d:"M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]}),(0,ye.jsx)("span",{"aria-live":"polite",children:u?"Copied":"Copy address"})]})]})]}),!b&&p&&(0,ye.jsxs)(ye.Fragment,{children:[(0,ye.jsx)("button",{type:"button",className:"rd-button-primary rd-button-block",onClick:d,disabled:R||S||E&&!D,children:E&&!D?"Deposit sent":S?"Confirming...":R?A?"Switching network...":"Confirm in wallet...":`One-click deposit ${a}${A?` (switch to ${n})`:""}`}),G&&(0,ye.jsx)("div",{className:"rd-callout rd-callout-danger",children:G}),F&&(0,ye.jsxs)("p",{className:"rd-card-hint",children:["Tx: ",(0,ye.jsx)("span",{style:{fontFamily:"monospace"},children:F})]}),E&&D&&(0,ye.jsx)("div",{className:"rd-callout rd-callout-danger",children:"The deposit transaction reverted on-chain. Please check your wallet and try again."}),E&&!D&&(0,ye.jsx)("div",{className:"rd-callout rd-callout-success",children:"Deposit confirmed on-chain. Waiting for it to be swept..."})]}),b&&(0,ye.jsxs)("div",{className:"rd-callout rd-callout-muted",children:["Pay from a Solana wallet (e.g. Phantom). Scan the QR or copy the address above and send"," ",C?(0,ye.jsxs)(ye.Fragment,{children:["exactly"," ",(0,ye.jsxs)("strong",{children:[N," ",a]})]}):(0,ye.jsxs)(ye.Fragment,{children:["any amount of ",(0,ye.jsx)("strong",{children:a})]}),"."]}),(C||!b&&!p&&h)&&(0,ye.jsxs)("p",{className:"rd-card-hint",children:[C&&(0,ye.jsxs)(ye.Fragment,{children:["Send exactly"," ",(0,ye.jsxs)("strong",{children:[N," ",a]})," ","on ",n," to this address."]}),!b&&!p&&h&&!C&&"Enter an amount to deposit in one click."]})]})}var er=require("react"),qr=H(require("@radix-ui/react-popover"),1);var bn=require("react/jsx-runtime");function Ua({value:e,options:t,onChange:n,disabled:r,ariaLabel:o,id:a}){let i=(0,er.useId)(),s=a??i,l=`${s}-listbox`,[d,p]=(0,er.useState)(!1),h=t.findIndex(E=>E.value===e),[u,g]=(0,er.useState)(h>=0?h:0),x=(0,er.useRef)(null),y=(0,er.useRef)([]),f=!!r||t.length===0,c=h>=0?t[h]:void 0;(0,er.useEffect)(()=>{d&&y.current[u]?.scrollIntoView?.({block:"nearest"})},[d,u]);let[b,w]=(0,er.useState)(null);function k(){f||(w(x.current?.closest("[data-theme]")?.getAttribute("data-theme")??null),g(h>=0?h:0),p(!0))}function C(E){p(!1),E&&x.current?.focus()}function N(E){let A=t[E];A&&(n(A.value),C(!0))}function T(){f||(d?C(!1):k())}function R(E){if(!f)switch(E.key){case"ArrowDown":E.preventDefault(),d?g(A=>Math.min(A+1,t.length-1)):k();break;case"ArrowUp":E.preventDefault(),d?g(A=>Math.max(A-1,0)):k();break;case"Enter":case" ":E.preventDefault(),d?N(u):k();break;case"Escape":d&&(E.preventDefault(),C(!0));break;case"Tab":d&&p(!1);break;default:break}}let S=d&&t[u]?`${s}-option-${u}`:void 0;return(0,bn.jsx)(qr.Root,{open:d,onOpenChange:E=>E?k():C(!1),children:(0,bn.jsxs)("div",{className:"rd-dropdown",children:[(0,bn.jsx)(qr.Trigger,{asChild:!0,children:(0,bn.jsxs)("button",{type:"button",id:s,ref:x,className:"rd-dropdown-trigger","aria-haspopup":"listbox","aria-expanded":d,"aria-controls":l,"aria-activedescendant":S,"aria-label":o,disabled:f,onClick:T,onKeyDown:R,children:[(0,bn.jsxs)("span",{className:"rd-dropdown-trigger-content",children:[c?.icon,(0,bn.jsxs)("span",{className:"rd-dropdown-trigger-label",children:[c?.label??"",c?.subLabel&&(0,bn.jsx)("small",{className:"rd-dropdown-trigger-sub",children:c.subLabel})]})]}),(0,bn.jsx)("span",{className:"rd-dropdown-chevron","aria-hidden":"true",children:(0,bn.jsx)(zn,{size:16})})]})}),d&&(0,bn.jsx)(qr.Portal,{children:(0,bn.jsx)(qr.Content,{className:"rd-dropdown-popover","data-theme":b??void 0,side:"bottom",align:"start",sideOffset:5,collisionPadding:12,onOpenAutoFocus:E=>E.preventDefault(),onCloseAutoFocus:E=>E.preventDefault(),children:(0,bn.jsx)("ul",{className:"rd-dropdown-listbox",role:"listbox",id:l,"aria-label":o,tabIndex:-1,"data-vaul-no-drag":!0,children:t.map((E,A)=>{let F=E.value===e,D=A===u;return(0,bn.jsxs)("li",{id:`${s}-option-${A}`,role:"option","aria-selected":F,ref:G=>{y.current[A]=G},className:["rd-dropdown-option",D?"rd-dropdown-option-active":"",F?"rd-dropdown-option-selected":""].filter(Boolean).join(" "),onPointerEnter:()=>g(A),onClick:G=>{G.preventDefault(),N(A)},children:[E.icon,(0,bn.jsx)("span",{className:"rd-dropdown-option-label",children:E.label}),F&&(0,bn.jsx)("span",{className:"rd-dropdown-option-check","aria-hidden":"true",children:"\u2713"})]},E.value)})})})})]})})}var bt=require("react/jsx-runtime");function bv(e,t){if(!e)return"--";try{return pn(BigInt(e),t)}catch{return"--"}}function gh({quote:e,isLoading:t,error:n,humanAmount:r,originSymbol:o,destination:a}){return(0,bt.jsxs)("div",{className:"rd-stack","data-rd-quote-preview":"",children:[t&&(0,bt.jsxs)("div",{className:"rd-quote-strip","data-testid":"rd-quote-skeleton",children:[(0,bt.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"30%"},"aria-hidden":"true"}),(0,bt.jsx)("span",{className:"rd-quote-strip-arrow","aria-hidden":"true",children:"\u2192"}),(0,bt.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"30%"},"aria-hidden":"true"})]}),!t&&n&&(0,bt.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Couldn't fetch a quote: ",n.message]}),!t&&!n&&e&&o&&(0,bt.jsxs)(bt.Fragment,{children:[(0,bt.jsxs)("div",{className:"rd-quote-strip",children:[(0,bt.jsxs)("span",{className:"rd-quote-strip-side",children:[(0,bt.jsxs)("b",{children:[r," ",o]}),(0,bt.jsx)("small",{children:"You send"})]}),(0,bt.jsx)("span",{className:"rd-quote-strip-arrow","aria-hidden":"true",children:"\u2192"}),(0,bt.jsxs)("span",{className:"rd-quote-strip-side rd-quote-strip-end",children:[(0,bt.jsxs)("b",{children:["~",bv(e.expectedCrossd,a.decimals)," ",a.symbol]}),(0,bt.jsx)("small",{children:"You receive"})]})]}),e.belowMin&&(0,bt.jsx)("div",{className:"rd-callout rd-callout-warning",children:"This amount is below the minimum the bridge will accept. Increase the amount to continue."}),(e.assumesParity||e.feeUsd)&&(0,bt.jsxs)("p",{className:"rd-quote-strip-hint",children:[e.feeUsd&&(0,bt.jsxs)(bt.Fragment,{children:["Bridge fee: $",e.feeUsd,", already deducted from the amount above. You also pay your own network fee to send the deposit."," "]}),e.assumesParity&&(0,bt.jsxs)(bt.Fragment,{children:["Assumes 1:1 parity between bridged USDT and ",a.symbol,"; the final amount may differ slightly."]})]})]}),!t&&!n&&!e&&(0,bt.jsx)("p",{className:"rd-muted",children:"Enter an amount to see a quote."})]})}var qd=require("react");var hh={1:{base:"https://etherscan.io",name:"Etherscan",kind:"evm"},56:{base:"https://bscscan.com",name:"BscScan",kind:"evm"},137:{base:"https://polygonscan.com",name:"PolygonScan",kind:"evm"},8453:{base:"https://basescan.org",name:"BaseScan",kind:"evm"},42161:{base:"https://arbiscan.io",name:"Arbiscan",kind:"evm"},612055:{base:"https://scan.crosstoken.io",name:"ONEchain Scan",kind:"evm"},792703809:{base:"https://solscan.io",name:"Solscan",kind:"svm"}};function bh(e,t){let n=hh[e];if(!(!n||!t))return{url:`${n.base}/token/${t}`,name:n.name}}var wv={1:"Ethereum",56:"BNB Smart Chain",137:"Polygon",8453:"Base",42161:"Arbitrum",612055:"ONEchain",792703809:"Solana"};function Vo(e){return wv[e]??`Chain ${e}`}function Us(e,t){let n=hh[e];if(!(!n||!t))return{url:`${n.base}/tx/${t}`,name:n.name}}var Ft=require("react/jsx-runtime");function yv(e){let t=new Map;for(let n of e.origins)t.has(n.chainId)||t.set(n.chainId,n.chainName);return Array.from(t,([n,r])=>({chainId:n,chainName:r}))}function wh(e,t){return t===void 0?[]:e.origins.filter(n=>n.chainId===t)}function xv(e,t){let n=pn(e,t),r=n.indexOf(".");return r===-1?n:`${n.slice(0,r)}.${n.slice(r+1,r+1+4)}`.replace(/\.?0+$/,"")||n.slice(0,r)}function yh({catalog:e,origin:t,onChangeOrigin:n,amount:r,onChangeAmount:o,showAmountInput:a=!0,balance:i,balanceLoading:s,insufficientBalance:l,onMax:d,disabled:p}){let h=(0,qd.useMemo)(()=>yv(e),[e]),u=(0,qd.useMemo)(()=>wh(e,t?.chainId),[e,t?.chainId]);function g(c){let b=Number(c),w=wh(e,b)[0];w&&n(w)}function x(c){let b=u.find(w=>w.token.address.toLowerCase()===c.toLowerCase());b&&n(b)}let y=i?`${xv(i.value,i.decimals)} ${i.symbol}`:void 0,f=l?`Amount exceeds your balance${y?` (${y})`:""}`:void 0;return(0,Ft.jsxs)("section",{className:"rd-stack","data-rd-source-form":"",children:[(0,Ft.jsxs)("div",{className:"rd-field",children:[(0,Ft.jsxs)("div",{className:"rd-field-label-row",children:[(0,Ft.jsx)("span",{className:"rd-field-label",children:"From"}),t&&(()=>{let c=bh(t.chainId,t.token.address);return c?(0,Ft.jsxs)("a",{className:"rd-token-explorer-link",href:c.url,target:"_blank",rel:"noopener noreferrer",title:`View ${t.token.symbol} on ${c.name}`,children:[c.name," \u2197"]}):null})()]}),(0,Ft.jsxs)("div",{className:"rd-field-row",children:[(0,Ft.jsx)(Ua,{ariaLabel:"Origin chain",value:t?String(t.chainId):"",onChange:g,disabled:p,options:h.map(c=>({value:String(c.chainId),label:c.chainName,subLabel:"Network",icon:(0,Ft.jsx)(zs,{chainId:c.chainId,chainName:c.chainName,size:22})}))}),(0,Ft.jsx)(Ua,{ariaLabel:"Token",value:t?.token.address??"",onChange:x,disabled:p||u.length===0,options:u.map(c=>({value:c.token.address,label:c.token.symbol,subLabel:`${c.token.decimals} decimals`,icon:(0,Ft.jsx)(xo,{symbol:c.token.symbol,logoUrl:c.token.logoUrl,size:22})}))})]})]}),a&&(0,Ft.jsxs)("label",{className:"rd-field",children:[(0,Ft.jsx)("span",{className:"rd-field-label",children:"Amount (optional)"}),(0,Ft.jsxs)("div",{className:"rd-amount-input","data-rd-invalid":f?"":void 0,children:[(0,Ft.jsx)("input",{type:"text",inputMode:"decimal",placeholder:"0.0",value:r,onChange:c=>{let b=c.target.value;if(b===""){o(b);return}b.startsWith(".")&&(b=`0${b}`),/^\d*\.?\d{0,4}$/.test(b)&&(b=b.replace(/^0+(?=\d)/,""),!((b.split(".")[0]??"").length>12)&&o(b))},disabled:p||!t,"data-vaul-no-drag":!0}),t&&(0,Ft.jsx)("span",{className:"rd-amount-input-suffix",children:t.token.symbol}),d&&!p&&(0,Ft.jsx)("button",{type:"button",className:"rd-amount-input-max",onClick:d,disabled:p||!t,children:"Max"})]}),(y||s)&&(0,Ft.jsxs)("span",{className:"rd-amount-meta",children:[(0,Ft.jsx)("span",{}),(0,Ft.jsx)("span",{children:s?"Balance: \u2026":y?`Balance: ${y}`:""})]}),f&&(0,Ft.jsx)("span",{className:"rd-callout rd-callout-danger",children:f})]})]})}var ge=require("react/jsx-runtime");function xh({catalog:e,origin:t,onChangeOrigin:n,amount:r,onChangeAmount:o,showAmountInput:a,minNotice:i,amountHint:s,onMax:l,recipient:d,onChangeRecipient:p,showRecipientInput:h,recipientValid:u,balance:g,balanceLoading:x,insufficientBalance:y,targetOptions:f,selectedTarget:c,onChangeTarget:b,showTargetSelector:w,quote:k,quoteLoading:C,quoteError:N,depositAddress:T,depositAddressLoading:R,depositAddressError:S,arrivalStatus:E,amountSmallestUnits:A,depositState:F,onDeposit:D,canDeposit:G,oneClickEnabled:M,locked:j,onRequestConnect:le}){let oe=f.length>1&&w,{phase:ne,isSubmitting:Q,isConfirming:ee,isConfirmed:z,needsSwitch:q,reverted:ae,error:Z}=F,pe=c?.symbol??e.destination.symbol;return(0,ge.jsxs)(ge.Fragment,{children:[i&&(0,ge.jsx)(dh,{minNotice:i,arrivalStatus:E}),j?(0,ge.jsxs)("section",{className:"rd-locked-card","data-rd-locked":"",children:[(0,ge.jsx)("span",{className:"rd-locked-glyph","aria-hidden":"true",children:(0,ge.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[(0,ge.jsx)("path",{d:"M4 7.5A2.5 2.5 0 0 1 6.5 5h10A2.5 2.5 0 0 1 19 7.5v9a2.5 2.5 0 0 1-2.5 2.5h-10A2.5 2.5 0 0 1 4 16.5v-9Z",stroke:"currentColor",strokeWidth:"1.7"}),(0,ge.jsx)("path",{d:"M4 9h15",stroke:"currentColor",strokeWidth:"1.7"}),(0,ge.jsx)("path",{d:"M15 11.5h5v4h-5a2 2 0 0 1 0-4Z",fill:"currentColor",opacity:"0.18",stroke:"currentColor",strokeWidth:"1.5"}),(0,ge.jsx)("circle",{cx:"15.7",cy:"13.5",r:"0.8",fill:"currentColor"})]})}),(0,ge.jsx)("h3",{className:"rd-locked-title",children:"Connect your wallet"}),(0,ge.jsx)("p",{className:"rd-locked-text",children:"Connect to get your personal deposit address."}),h&&(0,ge.jsx)("p",{className:"rd-card-hint",children:"Or enter a recipient address to get one without connecting."}),le&&(0,ge.jsxs)("button",{type:"button",className:"rd-button-primary rd-locked-action","data-track":"connect",onClick:le,children:[(0,ge.jsxs)("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,ge.jsx)("path",{d:"M5 6.5h11.5A2.5 2.5 0 0 1 19 9v8.5H7A3 3 0 0 1 4 14.5v-8A2.5 2.5 0 0 1 6.5 4H16",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"}),(0,ge.jsx)("path",{d:"M15 10.5h5v4h-5a2 2 0 0 1 0-4Z",stroke:"currentColor",strokeWidth:"1.8"})]}),"Connect Wallet"]})]}):T?(0,ge.jsx)(mh,{depositAddress:T,originChainId:t.chainId,originChainName:t.chainName,originCurrency:t.token.address,amount:A,tokenSymbol:t.token.symbol,tokenDecimals:t.token.decimals,depositState:F,onDeposit:D,canDeposit:G,oneClickEnabled:M}):R?(0,ge.jsxs)(ge.Fragment,{children:[(0,ge.jsx)(Fs,{}),M&&A&&(0,ge.jsx)("span",{className:"rd-skeleton rd-skeleton-cta","aria-hidden":"true"}),(0,ge.jsx)("p",{className:"rd-sr-only",role:"status",children:"Preparing your deposit address..."})]}):S?(0,ge.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Couldn't fetch a deposit address: ",S.message]}):null,(0,ge.jsx)(yh,{catalog:e,origin:t,onChangeOrigin:n,amount:r,onChangeAmount:o,showAmountInput:a,balance:g,balanceLoading:x,insufficientBalance:y,onMax:l}),(0,ge.jsxs)("div",{className:"rd-field","data-rd-delivery":"",children:[(0,ge.jsx)("span",{className:"rd-field-label",children:"Deliver as"}),oe?(0,ge.jsx)(Ua,{ariaLabel:"Delivery token",value:c?.symbol??"",onChange:b,options:f.map(Se=>({value:Se.symbol,label:Se.symbol,subLabel:"on ONEchain",icon:(0,ge.jsx)(xo,{symbol:Se.symbol,size:22})}))}):(0,ge.jsxs)("div",{className:"rd-static-target",children:[(0,ge.jsx)(xo,{symbol:pe,size:22}),(0,ge.jsx)("span",{children:pe})]}),h&&(0,ge.jsxs)("label",{className:"rd-delivery-recipient",children:[(0,ge.jsx)("input",{type:"text",placeholder:"0x...","aria-label":"ONEchain recipient address",value:d,onChange:Se=>p(Se.target.value),"data-vaul-no-drag":!0}),(0,ge.jsx)("span",{className:"rd-card-hint",children:"Defaults to your connected wallet. It can differ from the address you deposit from, and is also used as the refund address if anything goes wrong."}),!u&&(0,ge.jsx)("span",{className:"rd-callout rd-callout-danger",children:"Not a valid address"})]})]}),c?.external&&(0,ge.jsxs)("div",{className:"rd-callout rd-callout-muted",children:["Delivered as ",c.symbol," via an external adapter."]}),s&&(0,ge.jsx)("div",{className:"rd-callout rd-callout-warning","data-rd-amount-hint":"",children:s}),r.trim()&&(0,ge.jsx)(gh,{quote:k,isLoading:C,error:N,humanAmount:r,originSymbol:t.token.symbol,destination:e.destination}),i&&(0,ge.jsx)(ch,{minNotice:i,onlySend:{symbol:t.token.symbol,chainName:t.chainName},showWalletCreditNote:!h&&u}),M&&ne!=="idle"&&!G&&(0,ge.jsxs)("div",{className:"rd-card",children:[Q&&(0,ge.jsxs)("p",{className:"rd-muted",children:[(0,ge.jsx)("span",{className:"rd-spinner"})," ",q?"Switching network...":"Confirm in wallet..."]}),ee&&(0,ge.jsxs)("p",{className:"rd-muted",children:[(0,ge.jsx)("span",{className:"rd-spinner"})," Confirming..."]}),F.txHash&&(0,ge.jsxs)("p",{className:"rd-card-hint",children:["Tx: ",(0,ge.jsx)("span",{style:{fontFamily:"monospace"},children:F.txHash})]}),z&&ae&&(0,ge.jsx)("div",{className:"rd-callout rd-callout-danger",children:"The deposit transaction reverted on-chain. Please check your wallet and try again."}),z&&!ae&&(0,ge.jsx)("div",{className:"rd-callout rd-callout-success",children:"Deposit confirmed on-chain. Waiting for it to be swept..."}),Z&&(0,ge.jsx)("div",{className:"rd-callout rd-callout-danger",children:Z})]})]})}var tr=require("react"),kh=require("react-dom");var X=require("react/jsx-runtime");function Wa({requiresIdentity:e=!1}){return(0,X.jsxs)("div",{className:"rd-history-empty",role:"status","data-variant":e?"disconnected":"empty","data-testid":e?"rd-history-empty-state":"rd-history-no-transfers",children:[(0,X.jsx)("span",{className:"rd-history-empty-icon","aria-hidden":"true",children:(0,X.jsxs)("svg",{width:"34",height:"34",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[(0,X.jsx)("path",{d:"M7 3.8h7l3 3V12M7 3.8A2.2 2.2 0 0 0 4.8 6v12A2.2 2.2 0 0 0 7 20.2h5",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"}),(0,X.jsx)("path",{d:"M14 3.8V7h3",stroke:"currentColor",strokeWidth:"1.7",strokeLinejoin:"round"}),(0,X.jsx)("circle",{cx:"16.5",cy:"16.5",r:"3.7",stroke:"currentColor",strokeWidth:"1.7"}),(0,X.jsx)("path",{d:"M16.5 14.5v2.2l1.4.8",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,X.jsx)("h3",{className:"rd-history-empty-title",children:e?"Connect to view history":"No transfers yet"}),(0,X.jsx)("p",{className:"rd-history-empty-copy",children:e?"Connect a wallet or provide an address to see transfer history.":"Your deposits and their delivery progress will appear here."}),!e&&(0,X.jsxs)("span",{className:"rd-history-empty-live",children:[(0,X.jsx)("span",{"aria-hidden":"true"}),"Updates automatically"]})]})}var ja=56;function Ch(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function vv(e){let t=e.trim().toUpperCase(),r={AWAITING_DEPOSIT:"Waiting for deposit",BSC_FUNDED:"Deposit confirmed",RELAY_PENDING:"Bridging",RELAY_SUBMITTED:"Bridging",BRIDGING:"Bridging",CROSS_PENDING:"Delivering",FINALIZING:"Delivering",EXECUTING:"Delivering",COMPLETED:"Completed",RELAY_REFUNDED:"Refunded",REFUNDED:"Refunded",EXPIRED:"Expired",FAILED:"Failed"}[t];if(r)return r;let o=t.toLowerCase().replace(/_/g," ").trim();return o?`${o[0].toUpperCase()}${o.slice(1)}`:"Processing"}function kv(e){return e==="COMPLETED"?"rd-status-pill rd-status-pill-success":Ch(e)?"rd-status-pill rd-status-pill-failure":"rd-status-pill"}function js(e,t){if(e){if(t===void 0)return e;try{return pn(BigInt(e),t)}catch{return e}}}function Cv(e,t=4){let n=e.indexOf(".");if(n<0)return e;let r=e.slice(0,n+1+t).replace(/0+$/,"").replace(/\.$/,"");return r===""?"0":r}function Rv(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function vh(e){return e.length>14?`${e.slice(0,8)}...${e.slice(-4)}`:e}function Yd({amount:e,symbol:t,className:n}){let r=e?`${e}${t?` ${t}`:""}`:"",o=(0,tr.useId)(),a=(0,tr.useRef)(null),i=(0,tr.useRef)(null),[s,l]=(0,tr.useState)(!1),[d,p]=(0,tr.useState)({top:-9999,left:-9999,visibility:"hidden"});return(0,tr.useEffect)(()=>{if(!s)return;let h=()=>{let u=a.current,g=i.current;if(!u||!g)return;let x=u.getBoundingClientRect(),y=g.getBoundingClientRect(),f=12,c=8,b=Math.max(f,window.innerWidth-y.width-f),w=Math.min(Math.max(x.left+x.width/2-y.width/2,f),b),k=x.top-y.height-c,C=k>=f?k:x.bottom+c,N=Math.max(f,window.innerHeight-y.height-f),T=Math.min(Math.max(C,f),N),R=window.getComputedStyle(u);p({top:T,left:w,visibility:"visible",backgroundColor:R.getPropertyValue("--rd-text").trim()||"#eef0f6",borderColor:R.getPropertyValue("--rd-border").trim()||"#2a2d3a",boxShadow:R.getPropertyValue("--rd-shadow").trim()||"0 8px 24px rgba(0, 0, 0, 0.35)",color:R.getPropertyValue("--rd-surface").trim()||"#171923"})};return h(),window.addEventListener("resize",h),window.addEventListener("scroll",h,!0),()=>{window.removeEventListener("resize",h),window.removeEventListener("scroll",h,!0)}},[s]),e?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)("span",{ref:a,className:n,"aria-label":r,"aria-describedby":s?o:void 0,"data-full-value":r,onMouseEnter:()=>{p({top:-9999,left:-9999,visibility:"hidden"}),l(!0)},onMouseLeave:()=>l(!1),children:[Cv(e),t?` ${t}`:""]}),s&&typeof document<"u"&&(0,kh.createPortal)((0,X.jsx)("span",{ref:i,id:o,role:"tooltip","data-rd-history-floating-tooltip":"",style:d,children:r}),document.body)]}):(0,X.jsx)("span",{className:n,children:"-"})}function Nv(e){let t=(e.deposits??[]).filter(r=>r.originChainId),n=new Set(t.map(r=>`${r.originChainId}:${(r.originCurrency??"").toLowerCase()}`));if(t.length>0){let r=t[0];return{chainId:r.originChainId,currency:r.originCurrency??"",routes:n.size}}return{chainId:e.originChainId,currency:e.originCurrency,routes:1}}function Sv(e,t){if(!e)return;let n,r;try{n=BigInt(e),r=t.map(s=>BigInt(s.amount))}catch{return}let o=r.reduce((s,l)=>s+l,0n);if(o<=0n)return;let a=r.map(s=>n*s/o),i=a.reduce((s,l)=>s+l,0n);return a[a.length-1]+=n-i,a}function Ws({label:e,chainId:t,txHash:n,amount:r,shared:o,missingLabel:a="Pending"}){let i=n?Us(t,n):void 0;return(0,X.jsxs)("div",{className:"rd-history-step",children:[(0,X.jsx)("span",{className:`rd-history-step-dot${n?" rd-history-step-dot-done":""}`}),(0,X.jsx)("span",{className:"rd-history-step-label",children:e}),(0,X.jsx)("span",{className:"rd-history-step-chain",children:Vo(t)}),r&&(0,X.jsx)(Yd,{amount:r,className:"rd-history-step-amount"}),(0,X.jsxs)("span",{className:"rd-history-step-tx",children:[i?(0,X.jsx)("a",{href:i.url,target:"_blank",rel:"noreferrer",title:n,"aria-label":`${e} transaction on ${Vo(t)}`,children:vh(n)}):n?(0,X.jsx)("span",{title:n,children:vh(n)}):(0,X.jsx)("span",{className:"rd-muted",children:a}),o&&n&&(0,X.jsx)("span",{className:"rd-history-step-shared",title:"Shared by deposits processed together",children:"combined transfer"})]})]})}function Tv(e){let t=e.deposits??[],n=e.amountOut||e.expectedOut||void 0;if(t.length>=2){let i=Sv(n,t);if(i)return t.map((s,l)=>({key:`${e.orderId}:${s.txHash}:${s.blockNumber}`,order:e,chainId:s.originChainId??ja,currency:s.originCurrency??"",routes:1,sentRaw:s.amount,receivedRaw:i[l].toString(),receivedIsEstimate:!0,deposit:s,sharedLegs:!0}))}let{chainId:r,currency:o,routes:a}=Nv(e);return[{key:e.orderId,order:e,chainId:r,currency:o,routes:a,sentRaw:e.amountIn,receivedRaw:n,receivedIsEstimate:!e.amountOut&&!!e.expectedOut,sharedLegs:!1}]}function Gs({orders:e,isLoading:t,error:n,catalog:r,showTitle:o=!0}){let[a,i]=(0,tr.useState)({}),s=l=>i(d=>({...d,[l]:!d[l]}));return(0,X.jsxs)("section",{className:o?"rd-card":"rd-stack","data-rd-orders-list":"",children:[o&&(0,X.jsx)("div",{className:"rd-card-header",children:(0,X.jsx)("h2",{className:"rd-card-title",children:"Transfer history"})}),t&&e.length===0&&(0,X.jsxs)("p",{className:"rd-muted",role:"status","aria-live":"polite",children:[(0,X.jsx)("span",{className:"rd-spinner"})," Loading orders..."]}),n&&(0,X.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Couldn't load your orders: ",n.message]}),!t&&!n&&e.length===0&&(0,X.jsx)(Wa,{}),e.length>0&&(0,X.jsx)("div",{className:"rd-history-table","data-vaul-no-drag":!0,children:e.flatMap(Tv).map(l=>{let{order:d}=l,p=r?.origins.find(S=>S.chainId===l.chainId&&S.token.address.toLowerCase()===l.currency.toLowerCase()),h=(d.target?r?.targets.find(S=>S.symbol.toLowerCase()===d.target.toLowerCase()):void 0)??r?.targets.find(S=>S.isDefault),u=h?.symbol??r?.destination.symbol??"",g=h?.decimals??r?.destination.decimals,x=r?.origins.find(S=>S.chainId===ja),y=js(l.sentRaw,x?.token.decimals),f=x?.token.symbol??"USDT",c=js(l.receivedRaw,g),b=d.deposits??[],w=!!a[l.key],k=Rv(d.completedAt??d.createdAt),C=vv(d.status),T=d.status==="COMPLETED"||Ch(d.status)?"Details unavailable":"Pending",R=l.receivedIsEstimate?"Estimated on ONEchain":"Received on ONEchain";return(0,X.jsxs)("div",{className:"rd-history-group",children:[(0,X.jsxs)("button",{type:"button",className:"rd-history-row-button",onClick:()=>s(l.key),"aria-expanded":w,"aria-label":`Toggle transfer details: ${C}, ${k}`,children:[(0,X.jsxs)("span",{className:"rd-history-card-top",children:[(0,X.jsx)("span",{className:"rd-history-asset",children:l.routes>1?(0,X.jsxs)(X.Fragment,{children:["Multiple deposits ",(0,X.jsxs)("span",{className:"rd-muted",children:["\xB7 ",l.routes," chains"]})]}):(0,X.jsxs)(X.Fragment,{children:[p?.token.symbol??u," ",(0,X.jsxs)("span",{className:"rd-muted",children:["from ",Vo(l.chainId)]})]})}),(0,X.jsx)("span",{className:kv(d.status),title:d.status,children:C})]}),(0,X.jsxs)("span",{className:"rd-history-card-amounts",children:[(0,X.jsxs)("span",{className:"rd-history-amount-block",children:[(0,X.jsx)("span",{className:"rd-history-amount-label",children:"Processing address"}),(0,X.jsx)(Yd,{amount:y,symbol:f,className:"rd-history-num"})]}),(0,X.jsx)("span",{className:"rd-history-card-arrow","aria-hidden":"true",children:"\u2192"}),(0,X.jsxs)("span",{className:"rd-history-amount-block",children:[(0,X.jsx)("span",{className:"rd-history-amount-label",children:R}),(0,X.jsx)(Yd,{amount:c,symbol:u,className:`rd-history-num rd-history-received${l.receivedIsEstimate?" rd-history-received-estimate":""}`})]})]}),(0,X.jsxs)("span",{className:"rd-history-card-foot",children:[(0,X.jsxs)("span",{className:"rd-history-date",children:[d.completedAt?"Completed":"Started"," \xB7 ",k]}),(0,X.jsx)("span",{className:"rd-history-chevron","aria-hidden":"true",children:(0,X.jsx)(zn,{size:16})})]})]}),w&&(0,X.jsxs)("div",{className:"rd-history-detail",children:[l.deposit?(0,X.jsx)(Ws,{label:"Deposit confirmed",chainId:l.deposit.originChainId??ja,txHash:l.deposit.originTxHash||l.deposit.txHash,amount:js(l.deposit.amount,x?.token.decimals)}):b.length>0?b.map(S=>(0,X.jsx)(Ws,{label:"Deposit confirmed",chainId:S.originChainId??ja,txHash:S.originTxHash||S.txHash,amount:js(S.amount,x?.token.decimals)},`${S.txHash}-${S.blockNumber}`)):(0,X.jsxs)("div",{className:"rd-history-step",children:[(0,X.jsx)("span",{className:"rd-history-step-dot"}),(0,X.jsx)("span",{className:"rd-history-step-label",children:"Deposit confirmed"}),(0,X.jsx)("span",{className:"rd-muted",children:"Details unavailable"})]}),(0,X.jsx)(Ws,{label:"Bridge",chainId:ja,txHash:d.bscBridgeTx,shared:l.sharedLegs,missingLabel:T}),(0,X.jsx)(Ws,{label:"ONEchain delivery",chainId:r?.destination.chainId??612055,txHash:d.deliveryTxHash,shared:l.sharedLegs,missingLabel:T})]})]},l.key)})})]})}var Co=require("react");var Jt=require("react");var Wn=class extends Error{constructor(t,n,r){super(n),this.name="RelayApiError",this.status=t,this.body=r}};function rn(e){let t=e.baseUrl.replace(/\/+$/,"");async function n(r,o){let a={...o?.headers};o?.body!=null&&(a["Content-Type"]="application/json");let i;try{i=await fetch(`${t}${r}`,{...o,headers:a})}catch(l){throw new Wn(0,`network error calling ${r}: ${l.message}`)}let s=await i.text();if(!i.ok){let l=`request to ${r} failed with status ${i.status}`,d;try{d=JSON.parse(s);let p=d;p?.error&&(l=p.error)}catch{d=s||void 0}throw new Wn(i.status,l,d)}try{return JSON.parse(s)}catch{throw new Wn(i.status,`expected a JSON response from ${r} but got ${s?"a non-JSON body":"an empty body"}`,s||void 0)}}return{getConfig(){return n("/v1/config").then(r=>({...r,targets:r.targets??[]}))},getQuote(r){return n("/v1/quote",{method:"POST",body:JSON.stringify(r)})},getDepositAddress(r,o){let a=new URLSearchParams({user:r.user,originChainId:String(r.originChainId),originCurrency:r.originCurrency});return o&&a.set("target",o),n(`/v1/deposit-address?${a.toString()}`)},getOrder(r){return n(`/v1/orders/${encodeURIComponent(r)}`)},listOrders(r){let o=new URLSearchParams({user:r});return n(`/v1/orders?${o.toString()}`).then(a=>a.orders??[])},ordersStreamUrl(r){return`${t}/v1/orders/stream?user=${encodeURIComponent(r)}`},getRecovery(r){let o=new URLSearchParams({user:r.user});return r.target&&o.set("target",r.target),n(`/v1/recovery?${o.toString()}`)}}}var Rh=[{type:"function",name:"deploy",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"version",type:"uint256"}],outputs:[{name:"",type:"address"}]}],Kd=[{type:"function",name:"execute",stateMutability:"nonpayable",inputs:[],outputs:[]},{type:"function",name:"sweepToUser",stateMutability:"nonpayable",inputs:[{name:"tokenAddr",type:"address"}],outputs:[]}],Zd=[{type:"function",name:"computeAddress",stateMutability:"view",inputs:[{name:"recipient",type:"address"},{name:"version",type:"uint256"}],outputs:[{name:"",type:"address"}]}];var ko=["0x486BEEc35A9a9915213Ea02AD3709738335F7702","0x3438735303911aBe113AdF14b18eE730cC24893b","0xA3B548Ab23043e6B24A087515fe1306379683533","0x44317d07378390543d99Ee76374E86C1Ef6cF832"];function Hs(e,t){return!e||!t?!1:e.toLowerCase()===t.toLowerCase()}function Iv(e,t){return t.some(n=>Hs(n,e))}function _s(e){if(!e||e.length===0)return ko;let t=new Set,n=[];for(let r of e){if(typeof r!="string"||!ht(r))continue;let o=r.toLowerCase();t.has(o)||(t.add(o),n.push(r))}return n.length>0?n:ko}async function Nh(e,t,{factory:n,forwarder:r,recipient:o,version:a,trusted:i=ko}){if(!n||!r||!o||a===void 0)return{ok:!1,reason:"address verification is missing inputs (factory/forwarder/recipient/version)"};if(!Iv(n,i))return{ok:!1,reason:`factory ${n} is not a recognized deposit-address factory -- refusing to sign against it`};if(!e)return{ok:!1,reason:"no chain connection available to verify the forwarder address"};let s;try{s=await e({chainId:t,address:n,abi:Zd,functionName:"computeAddress",args:[o,BigInt(a)]})}catch(l){return{ok:!1,reason:`could not verify the forwarder address on-chain: ${l instanceof Error?l.message:String(l)}`}}return Hs(s,r)?{ok:!0}:{ok:!1,reason:`forwarder address mismatch: the API returned ${r}, but factory ${n} derives ${s} for this account -- refusing to sign`}}async function Sh(e,t,{forwarder:n,recipient:r,version:o,trusted:a=ko}){if(!n||!r||o===void 0)return{ok:!1,reason:"address verification is missing inputs (forwarder/recipient/version)"};if(!e)return{ok:!1,reason:"no BSC chain connection available to verify the deposit forwarder -- add BNB Smart Chain (chain 56) to your wagmi config"};let i=await Promise.all(a.map(async s=>{try{return await e({chainId:t,address:s,abi:Zd,functionName:"computeAddress",args:[r,BigInt(o)]})}catch{return}}));return i.some(s=>Hs(s,n))?{ok:!0}:i.every(s=>s===void 0)?{ok:!1,reason:"could not reach any deposit-address factory on BSC to verify the forwarder"}:{ok:!1,reason:`forwarder address mismatch: ${n} is not the address any known factory derives for this account -- refusing to deposit`}}function Th(e,t){return Hs(e,t)}var Yr=56,Xd={step:"idle"};function Ev(e){return e.tokens?.find(t=>t.recoverable)?.address??e.token}function Ga(e={}){let t=(0,Jt.useRef)(e);t.current=e;let n=e.wallet,r=n?.walletChainId,o=e.recipient,a=o&&ht(o)?o:void 0,[i,s]=(0,Jt.useState)({}),l=(0,Jt.useCallback)((u,g)=>{s(x=>({...x,[u.toLowerCase()]:g}))},[]),d=(0,Jt.useCallback)(u=>u?i[u.toLowerCase()]??Xd:Xd,[i]),p=(0,Jt.useMemo)(()=>Object.values(i).some(u=>u.step==="switching"||u.step==="deploying"||u.step==="recovering"),[i]);return{recover:(0,Jt.useCallback)(async(u,g,x)=>{if(!a||!u?.forwarder)return;let y=u.forwarder;l(y,{step:"switching"});try{if(r!==Yr){if(!n?.switchChain)throw new Error("wallet cannot switch chains");await n.switchChain(Yr)}if(!n?.writeContract||!n?.readContract||!n?.waitForReceipt)throw new Error("wallet is missing contract capabilities required for recovery");let f=await Nh(n.readContract,Yr,{factory:u.factory,forwarder:u.forwarder,recipient:a,version:u.version,trusted:t.current.trustedFactories});if(!f.ok)throw new Error(`address verification failed: ${f.reason}`);let c;if(!u.isDeployed){if(l(y,{step:"deploying"}),c=await n.writeContract({address:u.factory,abi:Rh,functionName:"deploy",args:[a,BigInt(u.version)],chainId:Yr}),l(y,{step:"deploying",deployTxHash:c}),(await n.waitForReceipt({chainId:Yr,hash:c})).status==="reverted")throw new Error(`forwarder deploy reverted on-chain (tx ${c})`);t.current.onChanged?.()}l(y,{step:"recovering",deployTxHash:c});let b=g==="execute"?await n.writeContract({address:u.forwarder,abi:Kd,functionName:"execute",args:[],chainId:Yr}):await n.writeContract({address:u.forwarder,abi:Kd,functionName:"sweepToUser",args:[x??Ev(u)],chainId:Yr});if(l(y,{step:"recovering",deployTxHash:c,actionTxHash:b}),(await n.waitForReceipt({chainId:Yr,hash:b})).status==="reverted")throw new Error(`recovery transaction reverted on-chain (tx ${b})`);l(y,{step:"done",deployTxHash:c,actionTxHash:b}),t.current.onRecoverySuccess?.({action:g,forwarder:u.forwarder,actionTxHash:b,...c?{deployTxHash:c}:{}}),t.current.onChanged?.()}catch(f){let c=f instanceof Error?f:new Error(String(f));s(b=>{let w=y.toLowerCase();return{...b,[w]:{...b[w]??Xd,step:"error",error:c.message}}}),t.current.onError?.(c)}},[a,r,n,l]),stateFor:d,busy:p}}function Ih(e={}){let t=(0,Jt.useRef)(e);t.current=e;let n=(0,Jt.useMemo)(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRecovery: either `client` or `apiBaseUrl` must be provided");return rn({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),r=e.recipient,o=r&&ht(r)?r:void 0,[a,i]=(0,Jt.useState)(),[s,l]=(0,Jt.useState)(!1),[d,p]=(0,Jt.useState)(),[h,u]=(0,Jt.useState)(0),g=e.target,x=e.enabled??!0,y=e.refetchInterval;(0,Jt.useEffect)(()=>{if(!o||!x){i(void 0),p(void 0),l(!1);return}let k=!1,C=!1,N=!0;async function T(){if(!(k||C)){C=!0,N&&l(!0);try{let S=await n.getRecovery({user:o,target:g});if(k)return;i(S),p(void 0)}catch(S){if(k)return;let E=S instanceof Error?S:new Error(String(S));p(E),t.current.onError?.(E),E instanceof Wn&&E.status===401&&t.current.onUnauthorized?.()}finally{C=!1,!k&&N&&l(!1),N=!1}}}T();let R=typeof y=="number"&&Number.isFinite(y)&&y>0?setInterval(()=>{T()},y):void 0;return()=>{k=!0,R&&clearInterval(R)}},[n,o,h,g,x,y]);let f=(0,Jt.useCallback)(()=>u(k=>k+1),[]),c=Ga({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:f}),b=(0,Jt.useCallback)(async(k,C)=>{a&&await c.recover(a,k,C)},[c,a]),w=c.stateFor(a?.forwarder);return{info:a,loading:s,error:d,refresh:f,recover:b,recoveryState:w}}var Av="BSC_FUNDED";function Eh(e){if(!e)return 0n;try{let t=BigInt(e);return t>0n?t:0n}catch{return 0n}}function Mv(e,t){return e.target||t}function Qo(e,t=[]){let n=e.find(o=>o.isDefault)?.symbol,r=new Map;for(let o of e){if(!o.info?.forwarder)continue;let a=o.info.forwarder.toLowerCase(),i=r.get(a);if(i){i.targets.push(o.symbol);continue}r.set(a,{forwarder:o.info.forwarder,targets:[o.symbol],info:o.info,deposits:[],depositsTotal:0n})}for(let o of r.values()){let a=new Set(o.targets);for(let i of t){if(i.status!==Av)continue;let s=Mv(i,n);if(!(!s||!a.has(s)))for(let l of i.deposits??[])o.deposits.push({amount:l.amount,originChainId:l.originChainId,originTxHash:l.originTxHash,txHash:l.txHash,blockNumber:l.blockNumber}),o.depositsTotal+=Eh(l.amount)}o.deposits.sort((i,s)=>i.blockNumber-s.blockNumber)}return[...r.values()]}function Ah(e){return e.filter(t=>(t.info.tokens??[]).some(n=>n.recoverable)?!0:Eh(t.info.balance)>0n&&t.info.suggestedAction!=="none")}function Vs(e){return e.reduce((t,n)=>t+(n.info.tokens??[]).filter(r=>r.recoverable).length,0)}var W=require("react/jsx-runtime"),Lv=56;function Dv(e){return{client:e.client,apiBaseUrl:e.apiBaseUrl,recipient:e.recipient,target:e.target,enabled:e.targets===void 0,wallet:e.wallet,trustedFactories:e.trustedFactories,onUnauthorized:e.onUnauthorized,onError:e.onError}}var Pv="This balance may already be processing. Recover only if it remains stuck.",Qs="USDT",Mh="primary";function Ov(e){return`${e} more recoverable under other delivery tokens -- switch the delivery token above to recover ${e===1?"it":"them"}.`}function Bv(e){let t=e.toLowerCase();return t.includes("insufficient funds")||t.includes("insufficientfunds")||t.includes("exceeds the balance of the account")||t.includes("insufficient balance for transfer")?"Not enough BNB for the network fee. Add BNB to your connected wallet and try again.":t.includes("user rejected")||t.includes("userrejected")||t.includes("user denied")||t.includes("user cancelled")||t.includes("user canceled")||t.includes("action_rejected")||t.includes("rejected by user")?"Transaction cancelled in your wallet.":"Recovery couldn't be completed. Check your wallet and try again."}function Dh({message:e}){let[t,n]=(0,Co.useState)("idle");(0,Co.useEffect)(()=>{if(t==="idle")return;let a=window.setTimeout(()=>n("idle"),1500);return()=>window.clearTimeout(a)},[t]);async function r(){if(typeof navigator>"u"||!navigator.clipboard){n("failed");return}try{await navigator.clipboard.writeText(e),n("copied")}catch{n("failed")}}let o=t==="copied"?"Copied technical details":t==="failed"?"Copy failed":"Copy technical details";return(0,W.jsxs)("details",{className:"rd-error-details",children:[(0,W.jsx)("summary",{children:"View technical details"}),(0,W.jsxs)("div",{className:"rd-error-log",children:[(0,W.jsx)("button",{type:"button",className:"rd-error-copy",onClick:()=>{r()},"aria-label":o,"aria-live":"polite",title:o,children:t==="copied"?(0,W.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,W.jsx)("path",{d:"m5 12 4 4L19 6",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}):(0,W.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,W.jsx)("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.8"}),(0,W.jsx)("path",{d:"M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]})}),(0,W.jsx)("code",{children:e})]})]})}function Ha(e){if(!e)return 0n;try{return BigInt(e)}catch{return 0n}}function Dr(e,t){try{return pn(e,t)}catch{return e.toString()}}function Lh(e){return e.length>14?`${e.slice(0,8)}...${e.slice(-4)}`:e}function zv(e){let t=Ha(e.bridgeMinWei),n=[];for(let a of e.tokens??[]){let i=Ha(a.balance);if(!(i<=0n)){if(a.suggestedAction==="execute"){n.push({key:a.address,symbol:a.symbol,decimals:a.decimals,balance:i,action:{kind:"execute"}});continue}if(a.recoverable){n.push({key:a.address,symbol:a.symbol,decimals:a.decimals,balance:i,action:{kind:"sweep",tokenAddress:a.address}});continue}n.push({key:a.address,symbol:a.symbol,decimals:a.decimals,balance:i,...t>i?{shortfall:t-i,minimum:t}:{}})}}let r=Ha(e.balance),o=n.some(a=>a.action?.kind==="execute");return r>0n&&e.suggestedAction==="execute"&&!o?n.unshift({key:Mh,symbol:Qs,decimals:e.decimals,balance:r,action:{kind:"execute"}}):n.length===0&&r>0n&&e.suggestedAction!=="none"&&n.push({key:Mh,symbol:Qs,decimals:e.decimals,balance:r,action:{kind:"sweep"}}),n}function Fv({deposit:e,decimals:t}){let n=e.originChainId??Lv,r=e.originTxHash||e.txHash,o=r?Us(n,r):void 0;return(0,W.jsxs)("div",{className:"rd-history-step","data-testid":"recovery-deposit-row",children:[(0,W.jsx)("span",{className:"rd-history-step-dot rd-history-step-dot-done"}),(0,W.jsx)("span",{className:"rd-history-step-chain",children:Vo(n)}),(0,W.jsx)("span",{className:"rd-history-step-amount",children:Dr(Ha(e.amount),t)}),(0,W.jsx)("span",{className:"rd-history-step-tx",children:o?(0,W.jsx)("a",{href:o.url,target:"_blank",rel:"noreferrer",title:r,children:Lh(r)}):r?(0,W.jsx)("span",{title:r,children:Lh(r)}):null})]})}function Uv({group:e,showTargetLabel:t,busy:n,state:r,onRecover:o,actingRowKey:a,rowKeyOf:i}){let{info:s}=e,l=zv(s),d=Ha(s.balance),p=l.length===1?`${Dr(l[0].balance,l[0].decimals)}`:`${l.length} assets`,h=e.deposits.length>0&&e.depositsTotal>=d,u=d>e.depositsTotal?d-e.depositsTotal:0n,g=r.step==="switching"||r.step==="deploying"||r.step==="recovering",y=l.find(c=>i(c)===a)?.action?.kind;function f(){if(r.step==="switching")return"Switching to BNB Chain\u2026";if(r.step==="deploying")return"Confirm in wallet\u2026 (1/2 \u2014 preparing your deposit address)";let c=y==="execute"?"continuing ONEchain delivery":"returning funds";return r.deployTxHash?`Confirm in wallet\u2026 (2/2 \u2014 ${c})`:`Confirm in wallet\u2026 (${c})`}return(0,W.jsxs)("div",{className:"rd-recover-group","data-testid":"forwarder-section",children:[t&&(0,W.jsxs)("p",{className:"rd-recover-group-label",children:["Delivery target \xB7 ",(0,W.jsx)("b",{children:e.targets.join(", ")})]}),(0,W.jsxs)("div",{className:"rd-recover-sum",children:[(0,W.jsx)("span",{className:"rd-recover-sum-label",children:"Funds awaiting processing"}),(0,W.jsxs)("span",{className:"rd-recover-sum-value",title:l.length===1?`${p} ${l[0].symbol}`:p,children:[p,l.length===1&&(0,W.jsxs)(W.Fragment,{children:[" ",(0,W.jsx)("span",{className:"rd-recover-sum-unit",children:l[0].symbol})]})]})]}),e.deposits.length>0&&(0,W.jsxs)("details",{className:"rd-recover-made-of",children:[(0,W.jsxs)("summary",{className:"rd-recover-made-of-label",children:["Deposit history \xB7 ",e.deposits.length," ",e.deposits.length===1?"transfer":"transfers"]}),(0,W.jsxs)("div",{className:"rd-recover-made-of-body",children:[e.deposits.map(c=>(0,W.jsx)(Fv,{deposit:c,decimals:s.decimals},`${c.txHash}-${c.blockNumber}`)),!h&&(0,W.jsxs)("p",{className:"rd-token-row-status","data-testid":"deposits-incomplete-note",children:["These transfers explain ",Dr(e.depositsTotal,s.decimals)," of"," ",Dr(d,s.decimals)," ",Qs,". The remaining"," ",Dr(u,s.decimals)," ",Qs," is still included when you act."]})]})]}),(0,W.jsx)("div",{className:"rd-token-list",children:l.map(c=>{let b=i(c),w=g&&a===b;return(0,W.jsxs)("div",{className:"rd-token-row","data-token-symbol":c.symbol,children:[(0,W.jsx)(xo,{symbol:c.symbol,size:26}),(0,W.jsxs)("div",{className:"rd-token-row-info",children:[l.length>1&&(0,W.jsxs)("span",{className:"rd-token-row-amount",children:[Dr(c.balance,c.decimals)," ",(0,W.jsx)("span",{className:"rd-token-row-symbol",children:c.symbol})]}),w?(0,W.jsx)("span",{className:"rd-token-row-step",role:"status","aria-live":"polite",children:f()}):c.shortfall!==void 0&&c.minimum!==void 0?(0,W.jsxs)("span",{className:"rd-token-row-warn",children:["Needs ",(0,W.jsxs)("b",{children:[Dr(c.shortfall,c.decimals)," ",c.symbol]})," more to reach the"," ",Dr(c.minimum,c.decimals)," ",c.symbol," minimum. Add it through"," ",(0,W.jsx)("b",{children:"Deposit to CROSS"})," and both amounts will process together."]}):c.action?(0,W.jsx)("span",{className:"rd-token-row-status",children:c.action.kind==="execute"?"Ready to continue delivery to ONEchain":"Ready to return to your BNB Chain wallet"}):(0,W.jsx)("span",{className:"rd-token-row-status",children:"Waiting for processing"})]}),w?(0,W.jsx)("span",{className:"rd-spinner rd-token-row-spinner"}):c.action&&(0,W.jsx)("button",{type:"button",className:"rd-button-primary rd-token-row-action",onClick:()=>o(c),disabled:n,children:c.action.kind==="execute"?"Continue delivery":"Return to wallet"})]},c.key)})}),!s.isDeployed&&r.step==="idle"&&(0,W.jsxs)("div",{className:"rd-callout rd-callout-warning","data-testid":"two-tx-notice",children:["The first action from this address needs ",(0,W.jsx)("b",{children:"two wallet confirmations"}),": prepare the address, then move the funds. Later actions need one."]}),s.inFlight&&(0,W.jsx)("p",{className:"rd-muted rd-token-row-status",children:s.inFlightReason||Pv}),r.step==="done"&&(0,W.jsx)("div",{className:"rd-callout rd-callout-success",role:"status","aria-live":"polite",children:y==="execute"?"ONEchain delivery restarted.":"Funds returned to your connected BNB Chain wallet."}),r.step==="error"&&r.error&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)("div",{className:"rd-callout rd-callout-danger",role:"alert",children:Bv(r.error)}),(0,W.jsx)(Dh,{message:r.error})]})]})}function qs(e){let{info:t,loading:n,error:r,refresh:o}=Ih(Dv(e)),a=n||e.targets!==void 0&&e.targetsLoading===!0,i=Ga({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:e.targets!==void 0?e.onRecovered:o}),[s,l]=(0,Co.useState)(),d=e.targets!==void 0?[...e.targets]:t?[{symbol:e.target??"",isDefault:!0,info:t}]:[],p=Ah(Qo(d,e.orders??[])),h=p.length>0,u=e.targets!==void 0?e.onRecovered:o,g=e.wallet?.walletAddress,x=e.wallet?.getBalance,[y,f]=(0,Co.useState)();return(0,Co.useEffect)(()=>{if(!h||!x||!g){f(void 0);return}let c=!1;return x({chainId:56,address:g}).then(b=>{c||f({value:b.value,decimals:b.decimals})}).catch(()=>{c||f(void 0)}),()=>{c=!0}},[h,x,g]),(0,W.jsxs)("section",{className:e.showTitle??!0?"rd-card":"rd-stack","data-rd-recover-funds":"",children:[(e.showTitle??!0)&&(0,W.jsx)("div",{className:"rd-card-header",children:(0,W.jsx)("h2",{className:"rd-card-title",children:"Recover stuck funds"})}),typeof e.otherTargetsRecoverable=="number"&&e.otherTargetsRecoverable>0&&(0,W.jsx)("div",{className:"rd-callout rd-callout-muted","data-testid":"other-targets-recoverable-note",children:Ov(e.otherTargetsRecoverable)}),a&&(0,W.jsxs)("p",{className:"rd-muted",role:"status","aria-live":"polite",children:[(0,W.jsx)("span",{className:"rd-spinner"})," Checking for recoverable funds\u2026"]}),r&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)("div",{className:"rd-callout rd-callout-danger",role:"alert",children:"Couldn't check recoverable funds. Please try again."}),(0,W.jsx)(Dh,{message:r.message})]}),!a&&!r&&!h&&(0,W.jsxs)("div",{className:"rd-recover-empty",role:"status","data-testid":"rd-recover-empty-state",children:[(0,W.jsx)("span",{className:"rd-recover-empty-icon","aria-hidden":"true",children:(0,W.jsxs)("svg",{width:"34",height:"34",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[(0,W.jsx)("path",{d:"M5 11.5V8.8A2.8 2.8 0 0 1 7.8 6h8.4A2.8 2.8 0 0 1 19 8.8v6.4a2.8 2.8 0 0 1-2.8 2.8H7.8A2.8 2.8 0 0 1 5 15.2v-3.7Z",stroke:"currentColor",strokeWidth:"1.7"}),(0,W.jsx)("path",{d:"M5 10h14",stroke:"currentColor",strokeWidth:"1.7"}),(0,W.jsx)("path",{d:"m9.2 14 1.7 1.7 3.9-4",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,W.jsx)("h3",{className:"rd-recover-sum-value rd-recover-sum-empty rd-recover-empty-title",children:"Nothing to recover"}),(0,W.jsx)("p",{className:"rd-recover-empty-copy",children:"No funds are waiting at your deposit addresses. If funds become stuck, they will appear here."}),u&&(0,W.jsxs)("button",{type:"button",className:"rd-button-secondary rd-recover-empty-refresh",onClick:u,"data-track":"refresh_recovery",children:[(0,W.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,W.jsx)("path",{d:"M20 7v5h-5M4 17v-5h5M6.1 9A7 7 0 0 1 18.6 7M5.4 17A7 7 0 0 0 17.9 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),"Check again"]})]}),!a&&!r&&p.map(c=>(0,W.jsx)(Uv,{group:c,showTargetLabel:p.length>1||c.targets.length>1,busy:i.busy,state:i.stateFor(c.forwarder),actingRowKey:s,rowKeyOf:b=>`${c.forwarder.toLowerCase()}:${b.key}`,onRecover:b=>{b.action&&(l(`${c.forwarder.toLowerCase()}:${b.key}`),i.recover(c.info,b.action.kind,b.action.tokenAddress))}},c.forwarder.toLowerCase())),!a&&!r&&h&&(0,W.jsxs)("div",{className:"rd-callout rd-callout-muted","data-testid":"rd-recover-gas-note",children:["You submit this transaction from your connected wallet and pay the BNB Chain network fee in BNB. Available balance:",y&&(0,W.jsxs)(W.Fragment,{children:[" ",(0,W.jsxs)("b",{children:[Dr(y.value,y.decimals)," BNB"]})]}),!y&&" unavailable","."]}),!a&&!r&&h&&(0,W.jsx)("p",{className:"rd-recover-foot",children:"Delivery continues to ONEchain; returned funds go to your connected BNB Chain wallet."})]})}var $t=H(require("react"),1),Tn=H(require("@radix-ui/react-dialog"),1),Ro=require("vaul");he(`html body[data-scroll-locked]{overflow-y:auto!important;margin-right:0!important}.rd-overlay{position:fixed;inset:0;z-index:100000;background:var(--ds-overlay-dim, rgba(0, 0, 0, .5));-webkit-backdrop-filter:var(--ds-bg-blur-7, blur(3.5px));backdrop-filter:var(--ds-bg-blur-7, blur(3.5px))}.rd-dialog-content{-webkit-font-smoothing:antialiased;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:100001;width:var(--rd-dialog-width, 480px);max-height:90vh;overflow:hidden;display:flex;flex-direction:column;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, #00000012);border-radius:24px;box-shadow:var(--ds-shadow-modal, 0 4px 30px -1px rgba(0, 0, 0, .15));outline:none;font-family:inherit}.rd-dialog-content.rd-deposit-shell{height:min(40rem,90vh)}.rd-drawer-content{-webkit-font-smoothing:antialiased;position:fixed;bottom:0;left:0;right:0;z-index:100001;width:100%;max-width:var(--rd-drawer-max-width, none);min-width:var(--rd-drawer-min-width, 0);max-height:min(85dvh,calc(100svh - env(safe-area-inset-top,0px)));margin:0 auto;display:flex;flex-direction:column;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, #00000012);border-top-left-radius:16px;border-top-right-radius:16px;outline:none;font-family:inherit;box-sizing:border-box;overscroll-behavior:contain}.rd-drawer-content.rd-deposit-shell[data-vaul-drawer-direction=bottom],.rd-drawer-content.rd-deposit-shell[data-vaul-drawer-direction=top]{height:min(40rem,85dvh,calc(100svh - env(safe-area-inset-top,0px)))}.rd-drawer-content[data-vaul-drawer-direction=right]{inset:0 0 0 auto;max-height:100vh;width:var(--rd-drawer-max-width, 400px);max-width:100vw;border-radius:16px 0 0 16px}.rd-drawer-content[data-vaul-drawer-direction=left]{inset:0 auto 0 0;max-height:100vh;width:var(--rd-drawer-max-width, 400px);max-width:100vw;border-radius:0 16px 16px 0}.rd-drawer-content[data-vaul-drawer-direction=top]{inset:0 0 auto;border-radius:0 0 16px 16px}.rd-drawer-handle{width:60px;height:4px;border-radius:999px;background:var(--ds-border-medium, rgba(0, 0, 0, .18));margin:12px auto 8px;flex-shrink:0}.rd-drawer-content[data-vaul-drawer-direction=left] .rd-drawer-handle,.rd-drawer-content[data-vaul-drawer-direction=right] .rd-drawer-handle{display:none}.rd-overlay{animation:rd-overlay-show .18s ease-out}.rd-overlay[data-state=closed]{animation:rd-overlay-hide .15s ease-in}.rd-dialog-content{animation:rd-dialog-show .2s ease-out}.rd-dialog-content[data-state=closed]{animation:rd-dialog-hide .15s ease-in}@keyframes rd-overlay-show{0%{opacity:0}}@keyframes rd-overlay-hide{to{opacity:0}}@keyframes rd-dialog-show{0%{opacity:0;transform:translate(-50%,-48%) scale(.96)}}@keyframes rd-dialog-hide{to{opacity:0;transform:translate(-50%,-48%) scale(.96)}}@media(prefers-reduced-motion:reduce){.rd-overlay,.rd-overlay[data-state=closed],.rd-dialog-content,.rd-dialog-content[data-state=closed]{animation:none}}.rd-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}
21
+ `);var un=require("react/jsx-runtime"),Ph=24;function Oh(e){return e instanceof HTMLElement&&e.matches("input, textarea, select")}function jv(e,t,n){let r=n?.offsetTop??t.top,o=n?n.offsetTop+n.height:t.bottom,a=Math.max(t.top,r)+Ph,i=Math.min(t.bottom,o)-Ph;return e.top<a?e.top-a:e.bottom>i?e.bottom-i:0}function Wv(){let e=$t.useRef(0),[t,n]=$t.useState({keyboardHeight:0,keyboardOverlap:0,viewportHeight:0});return $t.useEffect(()=>{let r=window.visualViewport;if(!r)return;let o=()=>{let a=Math.max(window.innerHeight,document.documentElement.clientHeight);e.current=Math.max(e.current,a,r.height+r.offsetTop);let i=Math.max(0,e.current-r.height-r.offsetTop),s=Math.max(0,e.current-a),l=Math.max(0,i-s),d=r.height;n(p=>p.keyboardHeight===i&&p.keyboardOverlap===l&&p.viewportHeight===d?p:{keyboardHeight:i,keyboardOverlap:l,viewportHeight:d})};return o(),r.addEventListener("resize",o),r.addEventListener("scroll",o),()=>{r.removeEventListener("resize",o),r.removeEventListener("scroll",o)}},[]),t}function Gv(e){let t=`(max-width: ${e}px)`,[n,r]=$t.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(t).matches);return $t.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;let o=window.matchMedia(t);r(o.matches);let a=i=>r(i.matches);return o.addEventListener("change",a),()=>o.removeEventListener("change",a)},[t]),n}function br({theme:e="dark",mobileBreakpoint:t=768,drawerDirection:n="bottom",dialogWidth:r,drawerMaxWidth:o,drawerMinWidth:a,style:i,open:s,onOpenChange:l,children:d}){let p=Gv(t),[h,u]=$t.useState(!1),g=s!==void 0,x=g?s:h,y=$t.useCallback(w=>{g||u(w),l?.(w)},[g,l]);Qn(x,$t.useCallback(()=>y(!1),[y]));let f=$t.useMemo(()=>{let w={};return r&&(w["--rd-dialog-width"]=r),o&&(w["--rd-drawer-max-width"]=o),a&&(w["--rd-drawer-min-width"]=a),{...w,...i}},[r,o,a,i]),c=$t.useMemo(()=>({open:x,setOpen:y,isMobile:p,theme:e,drawerDirection:n,portalStyle:f}),[x,y,p,e,n,f]),b=(0,un.jsx)("div",{"data-theme":e,style:f,children:d});return p?(0,un.jsx)(Os.Provider,{value:c,children:(0,un.jsx)(Ro.Drawer.Root,{direction:n,open:x,onOpenChange:y,noBodyStyles:!0,children:b},"drawer")}):(0,un.jsx)(Os.Provider,{value:c,children:(0,un.jsx)(Tn.Root,{open:x,onOpenChange:y,children:b})})}function qo({asChild:e,children:t,dataAttributes:n}){let{isMobile:r}=$n(),o=r?Ro.Drawer.Trigger:Tn.Trigger;return(0,un.jsx)(o,{asChild:e,...n,children:t})}function wr({className:e,ariaTitle:t,children:n}){let{open:r,isMobile:o,theme:a,drawerDirection:i,portalStyle:s}=$n(),{keyboardHeight:l,keyboardOverlap:d,viewportHeight:p}=Wv(),h=Lo(),u=$t.useRef(null),g=$t.useRef(null);$t.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]),$t.useEffect(()=>{g.current&&clearTimeout(g.current);let c=document.activeElement;!r&&Oh(c)&&u.current?.contains(c)&&c.blur(),u.current?.querySelectorAll("[data-rd-scroll-area]").forEach(b=>{b.scrollTo?.({top:0,behavior:"auto"})})},[r]);let x=o&&i==="bottom"&&l>0,y=x?{bottom:d,maxHeight:`min(85dvh, calc(${p}px - env(safe-area-inset-top, 0px)))`}:void 0,f=$t.useCallback(c=>{if(!o||i!=="bottom"||!Oh(c.target))return;let b=c.target,w=b.closest("[data-rd-scroll-area]");w&&(g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{let k=jv(b.getBoundingClientRect(),w.getBoundingClientRect(),window.visualViewport);Math.abs(k)>=1&&w.scrollBy?.({top:k,behavior:"auto"}),g.current=null},280))},[i,o]);return o?(0,un.jsxs)(Ro.Drawer.Portal,{children:[(0,un.jsx)(Ro.Drawer.Overlay,{className:"rd-overlay"}),(0,un.jsxs)(Ro.Drawer.Content,{ref:u,className:Ie("rd-drawer-content",e),"data-theme":a,"data-rd-shell":"drawer","data-rd-in-app":h?"true":"false","data-rd-keyboard-adjusted":x?"true":"false",style:{...s,...y},onFocusCapture:f,children:[(0,un.jsx)(Ro.Drawer.Title,{className:"rd-sr-only",children:t}),(0,un.jsx)("div",{className:"rd-drawer-handle"}),n]})]}):(0,un.jsxs)(Tn.Portal,{children:[(0,un.jsx)(Tn.Overlay,{className:"rd-overlay"}),(0,un.jsxs)(Tn.Content,{className:Ie("rd-dialog-content",e),"data-theme":a,"data-rd-shell":"dialog",style:s,children:[(0,un.jsx)(Tn.Title,{className:"rd-sr-only",children:t}),(0,un.jsx)(Tn.Description,{className:"rd-sr-only",children:t}),n]})]})}var xe=require("react/jsx-runtime");function Hv({id:e,activeView:t,recoverableCount:n,onChange:r}){let o=["deposit","history","recover"];return(0,xe.jsx)("div",{className:"rd-deposit-tabs",role:"tablist","aria-label":"Deposit navigation","data-tab-count":o.length,"data-active-index":o.indexOf(t),children:o.map(a=>{let i=a==="deposit"?"Deposit":a==="history"?"History":"Recover";return(0,xe.jsxs)("button",{type:"button",id:`${e}-${a}-tab`,className:"rd-deposit-tab",role:"tab","aria-selected":t===a,"aria-controls":`${e}-${a}-panel`,tabIndex:t===a?0:-1,"data-active":t===a?"true":"false","data-track":`${a}_tab`,onClick:()=>r(a),onKeyDown:s=>{if(!["ArrowLeft","ArrowRight","Home","End"].includes(s.key))return;s.preventDefault();let l=o.indexOf(a),d=s.key==="Home"?0:s.key==="End"?o.length-1:(l+(s.key==="ArrowRight"?1:-1)+o.length)%o.length,p=o[d];r(p),document.getElementById(`${e}-${p}-tab`)?.focus()},children:[(0,xe.jsx)("span",{children:i}),a==="recover"&&n>0&&(0,xe.jsx)("span",{className:"rd-recovery-badge","data-testid":"recovery-badge",children:n})]},a)})})}function zh({className:e}){let t=za();return(0,xe.jsx)(Me,{feature:"relay",children:(0,xe.jsx)(wr,{ariaTitle:"Deposit",className:["rd-deposit-shell",e??t.className].filter(Boolean).join(" "),children:(0,xe.jsx)(_v,{})})})}function _v(){let e=za(),{theme:t}=$n(),n=lh(),r=Bh.useId();if(!n)return null;let{activeView:o,setActiveView:a,recoveryOpen:i,resolvedApiBaseUrl:s,wallet:l,catalog:d,catalogLoading:p,catalogError:h,origin:u,setOrigin:g,amount:x,setAmount:y,recipient:f,setRecipient:c,recipientValid:b,balance:w,balanceLoading:k,insufficientBalance:C,depositAddress:N,depositAddressLoading:T,depositAddressError:R,arrivalStatus:S,quote:E,quoteLoading:A,quoteError:F,canDeposit:D,deposit:G,depositState:M,targetOptions:j,selectedTarget:le,setSelectedTarget:oe,showAmountInput:ne,minNotice:Q,showRecipientInput:ee,showTargetSelector:z,showOneClick:q,showConnectPrompt:ae,showRecipientHint:Z,canRecover:pe,recoverableCount:Se,recoveryTargetsLoading:Ue,recoveryTargets:fe,recoveryOrders:Re,historyOrdersLoading:Ce,historyOrdersError:tt,refreshRecovery:Le,trustedFactories:$e,amountHint:wt,amountSmallestUnits:Ge,onMax:Qe}=n;return(0,xe.jsxs)("div",{className:"rd-root rd-wizard","data-theme":t,"data-rd-scroll-area":!0,children:[(0,xe.jsx)(Hv,{id:r,activeView:o,recoverableCount:Se,onChange:a}),i&&(0,xe.jsx)("div",{className:"rd-deposit-tab-panel",id:`${r}-recover-panel`,role:"tabpanel","aria-labelledby":`${r}-recover-tab`,children:pe?(0,xe.jsx)(qs,{client:e.client,apiBaseUrl:s,recipient:f,target:le?.symbol,wallet:l,trustedFactories:$e,targets:(d?.targets.length??0)>0?fe:void 0,targetsLoading:Ue,orders:Re,onRecovered:Le,onRecoverySuccess:e.onRecoverySuccess,onError:e.onError,showTitle:!1}):(0,xe.jsxs)("div",{className:"rd-recover-empty",role:"status","data-variant":"unavailable","data-testid":"rd-recovery-unavailable-note",children:[(0,xe.jsx)("span",{className:"rd-recover-empty-icon","aria-hidden":"true",children:(0,xe.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[(0,xe.jsx)("rect",{x:"5",y:"10",width:"14",height:"10",rx:"2.5",stroke:"currentColor",strokeWidth:"1.7"}),(0,xe.jsx)("path",{d:"M8 10V7.5a4 4 0 0 1 8 0V10",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),(0,xe.jsx)("circle",{cx:"12",cy:"15",r:"1.2",fill:"currentColor"})]})}),(0,xe.jsx)("h3",{className:"rd-recover-empty-title",children:"Recovery unavailable"}),(0,xe.jsx)("p",{className:"rd-recover-empty-copy",children:"Connect a wallet that supports recovery transactions to continue."})]})}),o==="history"&&(0,xe.jsx)("div",{className:"rd-deposit-tab-panel",id:`${r}-history-panel`,role:"tabpanel","aria-labelledby":`${r}-history-tab`,children:b&&f.trim()?(0,xe.jsx)(Gs,{orders:Re,isLoading:p||Ce,error:h??tt,catalog:d,showTitle:!1}):(0,xe.jsx)(Wa,{requiresIdentity:!0})}),o==="deposit"&&(0,xe.jsxs)("div",{className:"rd-deposit-tab-panel",id:`${r}-deposit-panel`,role:"tabpanel","aria-labelledby":`${r}-deposit-tab`,children:[p&&(0,xe.jsxs)("div",{className:"rd-skeleton-form","data-testid":"rd-source-skeleton","aria-hidden":"true",children:[(0,xe.jsx)(Fs,{}),ae&&e.onRequestConnect&&(0,xe.jsx)("span",{className:"rd-skeleton rd-skeleton-cta"}),(0,xe.jsxs)("section",{className:"rd-stack",children:[(0,xe.jsxs)("div",{className:"rd-field",children:[(0,xe.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"18%"}}),(0,xe.jsxs)("div",{className:"rd-field-row",children:[(0,xe.jsx)("span",{className:"rd-skeleton rd-skeleton-field"}),(0,xe.jsx)("span",{className:"rd-skeleton rd-skeleton-field"})]})]}),ne&&(0,xe.jsxs)("div",{className:"rd-field",children:[(0,xe.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"34%"}}),(0,xe.jsx)("span",{className:"rd-skeleton rd-skeleton-field"})]})]}),(0,xe.jsxs)("div",{className:"rd-field",children:[(0,xe.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"24%"}}),(0,xe.jsx)("span",{className:"rd-skeleton rd-skeleton-field"}),(ee||f.trim().length>0)&&(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"58%",marginTop:"0.5rem"}}),(0,xe.jsx)("span",{className:"rd-skeleton rd-skeleton-field"}),ee&&(0,xe.jsx)("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"82%"}})]})]}),(0,xe.jsx)("span",{className:"rd-skeleton rd-skeleton-notice"})]}),p&&(0,xe.jsx)("p",{className:"rd-sr-only",role:"status",children:"Loading deposit options..."}),h&&(0,xe.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Failed to load configuration: ",h.message]}),Z&&(0,xe.jsx)("div",{className:"rd-callout rd-callout-muted",children:ee?"Connect a wallet or provide a recipient address to fetch your deposit address.":"Connect a wallet to fetch your deposit address."}),d&&u&&(0,xe.jsx)(xh,{catalog:d,origin:u,onChangeOrigin:g,amount:x,onChangeAmount:y,showAmountInput:ne,minNotice:Q,amountHint:wt,onMax:Qe,recipient:f,onChangeRecipient:c,showRecipientInput:ee,recipientValid:b,balance:w,balanceLoading:k,insufficientBalance:C,targetOptions:j,selectedTarget:le,onChangeTarget:oe,showTargetSelector:z,quote:E,quoteLoading:A,quoteError:F,depositAddress:N,depositAddressLoading:T,depositAddressError:R,arrivalStatus:S,amountSmallestUnits:Ge,depositState:M,onDeposit:()=>{G()},canDeposit:D&&q,oneClickEnabled:q,locked:ae,onRequestConnect:e.onRequestConnect})]})]})}var Ys=require("react/jsx-runtime");function Fh({asChild:e,children:t}){return(0,Ys.jsx)(Me,{feature:"relay",children:(0,Ys.jsx)(qo,{asChild:e??t!=null,children:t??(0,Ys.jsx)("button",{type:"button","data-track":"open",children:"Deposit"})})})}var We=H(require("react"),1);var ke=require("react");var Ks=require("react");function Uh(e,t){let[n,r]=(0,Ks.useState)(e);return(0,Ks.useEffect)(()=>{let o=setTimeout(()=>r(e),t);return()=>clearTimeout(o)},[e,t]),n}var Vv=500,Wh=56,jh={chainId:Wh,token:"0x55d398326f99059fF775485246999027B3197955"},Gh=3e4,Qv=5e3;function qv(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?Gh:Math.max(Qv,e*1e3)}var Yv=[{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}];function Jd(e,t){let n=e.trim();if(!n)return null;try{let r=Bs(n,t);return r>0n?r:null}catch{return null}}function Hh(e={}){let t=(0,ke.useRef)(e);t.current=e;let n=(0,ke.useMemo)(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useDepositAddress: either `client` or `apiBaseUrl` must be provided");return rn({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),r=e.wallet,o=r?.walletAddress,a=!!o,i=r?.walletChainId,[s,l]=(0,ke.useState)(),[d,p]=(0,ke.useState)(!0),[h,u]=(0,ke.useState)();(0,ke.useEffect)(()=>{let re=!1;return p(!0),n.getConfig().then(Te=>{re||(l(Te),u(void 0))}).catch(Te=>{re||u(Te instanceof Error?Te:new Error(String(Te)))}).finally(()=>{re||p(!1)}),()=>{re=!0}},[n]);let g=e.chains,x=(0,ke.useMemo)(()=>{if(!s)return[];if(!g||g.length===0)return s.origins;let re=new Set(g);return s.origins.filter(Te=>re.has(Te.chainId))},[s,g]),y=(0,ke.useMemo)(()=>s?{...s,origins:x}:void 0,[s,x]),[f,c]=(0,ke.useState)();(0,ke.useEffect)(()=>{if(f||x.length===0)return;let re=t.current.defaultToken,Te=re?x.find(U=>U.chainId===re.chainId&&U.token.address.toLowerCase()===re.address.toLowerCase()):void 0;c(Te??x[0])},[x,f]);let[b,w]=(0,ke.useState)(),k=(0,ke.useCallback)(()=>{nt(void 0),an(!1),Yt(!1),V(!1),Rt(void 0)},[]),C=(0,ke.useCallback)(re=>{c(re),w(void 0),k()},[k]),N=f?.kind==="svm",[T,R]=(0,ke.useState)(""),S=e.amount!==void 0?e.amount:T,E=(0,ke.useCallback)(re=>{R(re),w(void 0),k()},[k]),A=Uh(S,Vv),F=f?Jd(A,f.token.decimals):null,D=f?Jd(S,f.token.decimals):null,[G,M]=(0,ke.useState)(""),[j,le]=(0,ke.useState)(!1),oe=e.recipient!==void 0?e.recipient:G,ne=(0,ke.useCallback)(re=>{M(re),le(!0),w(void 0),k()},[k]);(0,ke.useEffect)(()=>{e.recipient===void 0&&o&&!j&&M(o)},[o,j,e.recipient]);let Q=oe.length===0||ht(oe),ee=oe.length>0&&ht(oe)?oe:void 0,[z,q]=(0,ke.useState)(),[ae,Z]=(0,ke.useState)(!1),[pe,Se]=(0,ke.useState)(0),Ue=r?.getBalance;(0,ke.useEffect)(()=>{if(!Ue||!o||!f||N){q(void 0),Z(!1);return}let re=!1;Z(!0);let Te=f.token.address.toLowerCase()===Fa?void 0:f.token.address;return Ue({chainId:f.chainId,address:o,token:Te}).then(U=>{re||q({...U,formatted:pn(U.value,U.decimals)})}).catch(()=>{re||q(void 0)}).finally(()=>{re||Z(!1)}),()=>{re=!0}},[Ue,o,f,N,pe]);let fe=z?.value??null,Re=!N&&D!==null&&fe!==null&&D>fe,[Ce,tt]=(0,ke.useState)(),[Le,$e]=(0,ke.useState)(!1),[wt,Ge]=(0,ke.useState)(),Qe=f?.chainId,He=f?.token.address,Dt=e.target;(0,ke.useEffect)(()=>{if(!ee||!Qe||!He){tt(void 0),Ge(void 0),$e(!1);return}let re=!1;return tt(void 0),Ge(void 0),$e(!0),(Dt?n.getDepositAddress({user:ee,originChainId:Qe,originCurrency:He},Dt):n.getDepositAddress({user:ee,originChainId:Qe,originCurrency:He})).then(U=>{re||(tt(U),Ge(void 0),t.current.onDepositAddress?.(U))}).catch(U=>{if(re)return;tt(void 0);let Oe=U instanceof Error?U:new Error(String(U));Ge(Oe),t.current.onError?.(Oe)}).finally(()=>{re||$e(!1)}),()=>{re=!0}},[n,ee,Qe,He,Dt]);let tn=[Qe??"",(He??"").toLowerCase(),(ee??"").toLowerCase(),Dt??"",S.trim()].join("|"),yt=(0,ke.useRef)(tn);(0,ke.useEffect)(()=>{yt.current!==tn&&(yt.current=tn,w(void 0),k())},[tn,k]);let[Pt,Tt]=(0,ke.useState)(),[nn,It]=(0,ke.useState)(!1),[ut,Ot]=(0,ke.useState)(),rt=F?.toString();(0,ke.useEffect)(()=>{if(!Qe||!He||!rt){Tt(void 0),Ot(void 0),It(!1);return}let re=!1,Te,U=!0;async function Oe(){U&&It(!0);let $=Gh;try{let Pe=await n.getQuote({originChainId:Qe,originCurrency:He,amount:rt});if(re)return;Tt(Pe),Ot(void 0),$=qv(Pe.ttl)}catch(Pe){if(re)return;Tt(void 0),Ot(Pe instanceof Error?Pe:new Error(String(Pe)))}finally{re||It(!1),U=!1}re||(Te=setTimeout(Oe,$))}return Oe(),()=>{re=!0,Te&&clearTimeout(Te)}},[n,Qe,He,rt]);let[on,ft]=(0,ke.useState)(!1),[fn,Ze]=(0,ke.useState)(!1),[lt,nt]=(0,ke.useState)(),[Et,Rt]=(0,ke.useState)(),[Xe,an]=(0,ke.useState)(!1),[sn,Yt]=(0,ke.useState)(!1),[ln,V]=(0,ke.useState)(!1),ve=r?.waitForReceipt,Ne=(0,ke.useRef)(void 0);(0,ke.useEffect)(()=>{if(!lt||!f||!ve)return;let re=!1;return an(!0),Yt(!1),V(!1),ve({chainId:f.chainId,hash:lt}).then(Te=>{re||(Yt(!0),V(Te.status==="reverted"),Se(U=>U+1),Te.status!=="reverted"&&lt!==Ne.current&&(Ne.current=lt,t.current.onDeposited?.(lt)))}).catch(Te=>{re||Rt(Te instanceof Error?Te.message:String(Te))}).finally(()=>{re||an(!1)}),()=>{re=!0}},[lt,ve]);let ze=i!==void 0&&f!==void 0&&i!==f.chainId,ot=on||fn,Kt=b??Et,Bt="idle";Kt?Bt="error":sn?Bt="confirmed":Xe?Bt="confirming":ot&&(Bt=on?"switching":"pending");let Cn={phase:Bt,isSubmitting:ot,isConfirming:Xe,isConfirmed:sn,needsSwitch:ze,txHash:lt,reverted:sn&&ln,error:Kt},Rn=!!(f&&Ce&&Ce.originChainId===f.chainId&&Ce.originCurrency.toLowerCase()===f.token.address.toLowerCase()),O=!!(r?.sendTransaction&&r?.writeContract&&r?.readContract&&r?.waitForReceipt),De=!!(a&&O&&f&&!N&&Ce&&Rn&&D&&D>0n&&!Re&&!ot&&!Xe),qe=(0,ke.useCallback)(async()=>{if(N||!f||!Ce||!r?.sendTransaction||!r?.writeContract)return;w(void 0);let re=Jd(S,f.token.decimals);if(!re||re<=0n){w("enter an amount to use the one-click deposit");return}let Te=f.token.address.toLowerCase()===Fa,U=Ce.depositAddress,Oe=await Sh(r?.readContract,Wh,{forwarder:Ce.forwarder,recipient:ee,version:Ce.version,trusted:t.current.trustedFactories});if(!Oe.ok){w(`address verification failed: ${Oe.reason}`);return}if(f.chainId===jh.chainId&&f.token.address.toLowerCase()===jh.token.toLowerCase()&&!Th(U,Ce.forwarder)){w("address verification failed: deposit address does not match the verified forwarder (expected them to be identical on this route; check the backend's direct_same_token setting)");return}try{if(ze){if(!r?.switchChain)throw new Error("wallet cannot switch chains");ft(!0);try{await r.switchChain(f.chainId)}finally{ft(!1)}}k(),Ze(!0);try{let Pe=Te?await r.sendTransaction({chainId:f.chainId,to:U,value:re}):await r.writeContract({chainId:f.chainId,address:f.token.address,abi:Yv,functionName:"transfer",args:[U,re]});nt(Pe)}finally{Ze(!1)}}catch(Pe){w(Pe.message)}},[N,f,Ce,S,ze,r,ee,k]);return{address:o,isConnected:a,catalog:y,catalogLoading:d,catalogError:h,origin:f,setOrigin:C,recipient:oe,setRecipient:ne,recipientValid:Q,amount:S,setAmount:E,balance:z,balanceLoading:ae,insufficientBalance:Re,isSvmOrigin:N,depositAddress:Ce?.depositAddress,depositAddressResult:Ce,depositAddressLoading:Le,depositAddressError:wt,quote:Pt,quoteLoading:nn,quoteError:ut,canDeposit:De,deposit:qe,depositState:Cn}}var nr=require("react");var Kv=3e4,Zv=300;function Pr(e){let t=(0,nr.useRef)(e);t.current=e;let{client:n,enabled:r=!0,live:o=!0}=e,a=e.refetchInterval??e.fallbackPollMs??Kv,i=e.recipient&&ht(e.recipient)?e.recipient:void 0,[s,l]=(0,nr.useState)([]),[d,p]=(0,nr.useState)(!1),[h,u]=(0,nr.useState)(),[g,x]=(0,nr.useState)(!1),[y,f]=(0,nr.useState)(),[c,b]=(0,nr.useState)(0);return(0,nr.useEffect)(()=>{if(!i){l([]),u(void 0),p(!1),x(!1),f(void 0),b(0);return}if(!r){l([]),u(void 0),p(!1),x(!1),f(void 0),b(0);return}let w=!1,k=!0,C,N=0,T=0;async function R(){let F=++N;T+=1,k&&p(!0);try{let D=await n.listOrders(i);if(w)return;F===N&&(l(D),u(void 0))}catch(D){if(w)return;let G=D instanceof Error?D:new Error(String(D));F===N&&(u(G),t.current.onError?.(G))}finally{T-=1,!w&&F===N&&(p(!1),x(!0),f(i),b(D=>D+1)),k=!1}}function S(){C&&clearTimeout(C),C=setTimeout(()=>{C=void 0,w||R()},Zv)}R();let E;o&&typeof EventSource<"u"&&(E=new EventSource(n.ordersStreamUrl(i)),E.addEventListener("orders-changed",S),E.onopen=()=>{S()});let A=o&&Number.isFinite(a)&&a>0?setInterval(()=>{T===0&&R()},a):void 0;return()=>{w=!0,C&&clearTimeout(C),A&&clearInterval(A),E?.close()}},[n,i,r,o,a]),{orders:s,ordersLoading:d,ordersError:h,ordersInitialized:g,ordersForRecipient:y,ordersRevision:c}}var Zs=require("react");function _h(e,t){if(t){let n=e.find(r=>r.symbol===t);if(n)return n}return e.find(n=>n.isDefault)??e[0]}function Vh({catalogTargets:e,filter:t,defaultTarget:n}){let r=(0,Zs.useMemo)(()=>{if(!t||t.length===0)return e;let l=new Set(t);return e.filter(d=>l.has(d.symbol))},[e,t]),[o,a]=(0,Zs.useState)(()=>_h(r,n)?.symbol),i=(o!==void 0?r.find(l=>l.symbol===o):void 0)??_h(r,n);function s(l){r.some(d=>d.symbol===l)&&a(l)}return{options:r,selected:i,setSelected:s}}var Xv={dev:"https://dev-relay-protocol-api.onechain.nexus",stage:"https://dev-relay-protocol-api.onechain.nexus",production:"https://relay-protocol-api.onechain.nexus"};function Kr(e){return e.apiBaseUrl?e.apiBaseUrl:Xv[it(e.environment)]}var Js=require("react/jsx-runtime"),Qh=1e3;function Jv(e,t,n,r,o){let a=e.requireWalletConnection??e.showRecipientInput===!1,i=n.walletAddress&&ht(n.walletAddress)?n.walletAddress:void 0;return{client:e.client,apiBaseUrl:r,wallet:n,chains:e.chains,recipient:a?i??"":e.recipient,amount:a&&!i?"":e.amount,defaultToken:e.defaultToken,target:t,trustedFactories:o,onDepositAddress:e.onDepositAddress,onDeposited:e.onDeposited,onError:e.onError}}function Xs(e,t){let n=e.trim();if(!n)return 0n;try{let r=Bs(n,t);return r>0n?r:0n}catch{return 0n}}function $v(e,t,n,r){if(t!==void 0&&e.forwarderVersion!==t)return!1;let o=e.target?.trim();return o?!!(n&&o.toLowerCase()===n.toLowerCase()):r}function qh(e,t,n){return`${e}:${t.toLowerCase()}:${n}`}function e2(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function Yh({open:e,children:t}){let[n]=We.useState(sh);return(0,Js.jsxs)(_d.Provider,{value:n,children:[e&&(0,Js.jsx)(t2,{store:n}),t]})}function t2({store:e}){let t=za(),{showTargetSelector:n=!0}=t,r=t.requireWalletConnection??t.showRecipientInput===!1,o=!!(t.walletAddress&&ht(t.walletAddress)),[a,i]=We.useState("deposit"),s=a==="recover",l=We.useCallback(Y=>{i(xt=>(typeof Y=="function"?Y(xt==="recover"):Y)?"recover":"deposit")},[]);We.useEffect(()=>{Je("relay","opened")},[]);let[d,p]=We.useState(void 0),h=We.useMemo(()=>Kr({apiBaseUrl:t.apiBaseUrl,environment:t.environment}),[t.apiBaseUrl,t.environment]),u=We.useMemo(()=>({walletAddress:t.walletAddress,walletChainId:t.walletChainId,sendTransaction:t.sendTransaction,writeContract:t.writeContract,readContract:t.readContract,switchChain:t.switchChain,waitForReceipt:t.waitForReceipt,getBalance:t.getBalance}),[t.walletAddress,t.walletChainId,t.sendTransaction,t.writeContract,t.readContract,t.switchChain,t.waitForReceipt,t.getBalance]),g=it(t.environment),x=Xt("apps.json",g,Y=>({min:Bn(Y?.relay?.minDepositAmount,g),max:Bn(Y?.relay?.maxDepositAmount,g),trustedFactories:hi(Y,g)})),y=We.useMemo(()=>t.trustedFactories??_s(x?.trustedFactories),[t.trustedFactories,x?.trustedFactories]),{isConnected:f,catalog:c,catalogLoading:b,catalogError:w,origin:k,setOrigin:C,amount:N,setAmount:T,recipient:R,setRecipient:S,recipientValid:E,balance:A,balanceLoading:F,insufficientBalance:D,depositAddress:G,depositAddressResult:M,depositAddressLoading:j,depositAddressError:le,quote:oe,quoteLoading:ne,quoteError:Q,canDeposit:ee,deposit:z,depositState:q}=Hh(Jv(t,d,u,h,y)),{options:ae,selected:Z,setSelected:pe}=Vh({catalogTargets:c?.targets??[],filter:t.targetTokens,defaultTarget:t.defaultTarget});We.useEffect(()=>{p(Z?.symbol)},[Z?.symbol]);let Se=t.amount===void 0&&!t.hideAmount,Ue=!r&&(t.showRecipientInput??!0)&&t.recipient===void 0,fe=E&&R.trim().length>0&&ht(R),Re=!r&&t.recipient!==void 0&&t.recipient.trim().length>0,Ce=r?!o||!fe:!f&&!Re&&!fe,tt=!!c&&!fe&&!Ce,Le=(t.showRecovery??!1)&&o&&!!(u.writeContract&&u.readContract&&u.waitForReceipt),$e=We.useMemo(()=>t.client?t.client:rn({baseUrl:h}),[t.client,h]),[wt,Ge]=We.useState({}),[Qe,He]=We.useState(!1),[Dt,tn]=We.useState(0),yt=We.useCallback(()=>tn(Y=>Y+1),[]),Pt=q.isConfirmed,Tt=fe&&(!!M||a!=="deposit"),{orders:nn,ordersLoading:It,ordersError:ut,ordersInitialized:Ot,ordersForRecipient:rt}=Pr({client:$e,recipient:Tt?R:void 0,enabled:Tt,refetchInterval:Qh}),on=nn,ft=Z??c?.targets.find(Y=>Y.isDefault),fn=ft?.symbol??c?.destination.symbol,Ze=ft?.isDefault??!0,lt=M?.version,nt=We.useMemo(()=>nn.filter(Y=>$v(Y,lt,fn,Ze)),[nn,lt,fn,Ze]),Et=We.useRef(void 0),[Rt,Xe]=We.useState(),[an,sn]=We.useState(),Yt=`${R.toLowerCase()}:${fn?.toLowerCase()??""}:${lt??""}`;We.useEffect(()=>{let Y=rt?.toLowerCase()===R.toLowerCase();if(!Tt||!Ot||!Y||ut){Tt||(Et.current=void 0,Xe(void 0),sn(void 0));return}let xt=new Set(nt.map(_e=>_e.orderId)),mt=new Set(nt.flatMap(_e=>(_e.deposits??[]).map(_n=>qh(_e.orderId,_n.txHash,_n.blockNumber)))),Zt=Et.current;if(!Zt||Zt.key!==Yt){Et.current={key:Yt,orderIds:xt,depositKeys:mt,statuses:new Map(nt.map(_e=>[_e.orderId,_e.status]))},Xe(void 0),sn(void 0);return}let Ut,et=0n,xn=!1;for(let _e of nt)for(let _n of _e.deposits??[]){let zr=qh(_e.orderId,_n.txHash,_n.blockNumber);if(!Zt.depositKeys.has(zr)){Ut??(Ut=_e);try{et+=BigInt(_n.amount),xn=!0}catch{}}}Ut??(Ut=nt.find(_e=>!Zt.orderIds.has(_e.orderId))),Ut??(Ut=nt.find(_e=>Zt.statuses.get(_e.orderId)!==_e.status));for(let _e of xt)Zt.orderIds.add(_e);for(let _e of mt)Zt.depositKeys.add(_e);for(let _e of nt)Zt.statuses.set(_e.orderId,_e.status);Ut&&(Xe(Ut.orderId),xn&&sn(et))},[Yt,nt,rt,Tt,R,ut,Ot]),We.useEffect(()=>{let Y=c?.targets??[];if(!Le||!fe||Y.length===0){Ge({}),He(!1);return}let xt=!1;return He(!0),Promise.all(Y.map(mt=>$e.getRecovery({user:R,target:mt.symbol}).catch(()=>{}))).then(mt=>{if(xt)return;let Zt={};Y.forEach((Ut,et)=>{let xn=mt[et];xn&&(Zt[Ut.symbol]=xn)}),Ge(Zt),He(!1)}),()=>{xt=!0}},[$e,Le,fe,R,c,Pt,Dt]);let ln=We.useMemo(()=>(c?.targets??[]).map(Y=>({symbol:Y.symbol,isDefault:Y.isDefault,info:wt[Y.symbol]})).filter(Y=>Y.info!==void 0),[c,wt]),V=We.useMemo(()=>Vs(Qo(ln)),[ln]),[ve,Ne]=We.useState(void 0),[ze,ot]=We.useState(),Kt=!!c&&(c?.targets.length??0)>0&&!d;We.useEffect(()=>{if(!fe||!k||!M||Kt){Ne(void 0),ot(void 0);return}let Y=!1,xt=!1,mt=M.forwarder.toLowerCase();Ne(void 0),ot(void 0);async function Zt(){if(!(Y||xt)){xt=!0;try{let et=await $e.getRecovery({user:R,target:d||void 0});if(Y)return;if(et?.forwarder&&et.forwarder.toLowerCase()!==mt){Ne(void 0),ot(void 0);return}if(ot(et),!et||et.suggestedAction!=="sweep"){Ne(void 0);return}let xn;try{xn=BigInt(et.balance)}catch{Ne(void 0);return}let _e=Number(et.decimals);if(xn<=0n||!Number.isInteger(_e)||_e<0){Ne(void 0);return}let _n=et.tokens?.find(zr=>zr.address?.toLowerCase()===et.token?.toLowerCase()&&zr.symbol)?.symbol;Ne({balance:xn,decimals:_e,symbol:_n})}catch{}finally{xt=!1}}}Zt();let Ut=setInterval(()=>{Zt()},Qh);return()=>{Y=!0,clearInterval(Ut)}},[$e,fe,R,d,Kt,k,M,Pt]);let Bt=We.useCallback(()=>{!k||!A||T(pn(A.value,k.token.decimals))},[k,A,T]),Cn=We.useRef(!1),Rn=!!G;We.useEffect(()=>{!Rn||Cn.current||(Cn.current=!0,Je("relay","deposit_address_shown"))},[Rn]);let O=q.txHash;We.useEffect(()=>{O&&Je("relay","deposit_submitted")},[O]);let De=(()=>{let Y=Number(x?.min);return Number.isFinite(Y)&&Y>=0?String(x?.min):"6"})(),qe=(()=>{let Y=Number(x?.max);return Number.isFinite(Y)&&Y>0?String(x?.max):void 0})(),re=(()=>{if(!k)return 0n;let Y=Xs(De,k.token.decimals),xt=BigInt(k.minAmount);return Y>xt?Y:xt})(),Te=k?pn(re,k.token.decimals):De,U=(()=>{if(!k||!ve||re<=0n)return;let Y=k.token.decimals,xt=ve.decimals,mt=Y>=xt?ve.balance*10n**BigInt(Y-xt):ve.balance/10n**BigInt(xt-Y);if(mt>=re)return;let Zt=re-mt;return{pending:pn(ve.balance,xt),pendingSymbol:ve.symbol,remaining:pn(Zt,Y)}})(),Oe=c?.origins.find(Y=>Y.chainId===56&&!!(ze?.token&&Y.token.address.toLowerCase()===ze.token.toLowerCase()))??c?.origins.find(Y=>Y.chainId===56&&Y.token.symbol.toUpperCase()==="USDT"),$=Number.isInteger(ze?.decimals)&&(ze?.decimals??-1)>=0?ze.decimals:Oe?.token.decimals,Pe=ze?.tokens?.find(Y=>Y.address?.toLowerCase()===ze.token?.toLowerCase()&&Y.symbol)?.symbol??Oe?.token.symbol,In=an!==void 0&&$!==void 0?pn(an,$):void 0,Xr=(()=>{if(!k||$===void 0)return;let Y=k.token.decimals;if($>=Y)return re*10n**BigInt($-Y);let xt=10n**BigInt(Y-$);return(re+xt-1n)/xt})(),rr=Rt?nt.find(Y=>Y.orderId===Rt):void 0,or=rr??nt.find(Y=>Y.status==="BSC_FUNDED"||Y.status==="BRIDGE_INITIATED"||Y.status==="BRIDGE_PENDING"),$o=(()=>{if(!or||Xr===void 0)return!1;try{return BigInt(or.amountIn)>=Xr}catch{return!1}})(),wl=(()=>{if(!ze||Xr===void 0)return!1;try{return BigInt(ze.balance)>0n&&BigInt(ze.balance)>=Xr}catch{return!1}})(),yl=(()=>{let Y={amount:In,symbol:Pe,backendStatus:or?.status};return!M||!Tt||!Ot?{phase:"connecting",...Y}:rt?.toLowerCase()!==R.toLowerCase()||ut?{phase:"unavailable",...Y}:rr?.status==="COMPLETED"?{phase:"completed",...Y,backendStatus:rr.status}:rr&&e2(rr.status)?{phase:"failed",...Y,backendStatus:rr.status}:or?.status==="BRIDGE_INITIATED"||or?.status==="BRIDGE_PENDING"?{phase:"processing",...Y}:or?.status==="BSC_FUNDED"&&$o||wl?{phase:"funded",...Y}:rr?{phase:"detected",...Y,backendStatus:rr.status}:{phase:"waiting",...Y}})(),Br=k&&qe?Xs(qe,k.token.decimals):void 0,Jr=k&&N.trim()?Xs(N,k.token.decimals):0n,oi=!!(k&&Jr>0n&&Jr<re),$r=!!(k&&Br!==void 0&&Jr>0n&&Jr>Br),ai=(()=>{if(k){if(oi)return`Amount is below the ${Te} ${k.token.symbol} minimum.`;if($r)return`Amount is above the ${qe} ${k.token.symbol} maximum.`}})(),eo=t.showOneClickDeposit??!1,ii=k&&N.trim()?Xs(N,k.token.decimals).toString():void 0,xl={activeView:a,setActiveView:i,recoveryOpen:s,setRecoveryOpen:l,resolvedApiBaseUrl:h,wallet:u,catalog:c,catalogLoading:b,catalogError:w,origin:k,setOrigin:C,amount:N,setAmount:T,recipient:R,setRecipient:S,recipientValid:E,balance:A,balanceLoading:F,insufficientBalance:D,depositAddress:G,depositAddressLoading:j,depositAddressError:le,arrivalStatus:yl,quote:oe,quoteLoading:ne,quoteError:Q,canDeposit:ee,deposit:z,depositState:q,targetOptions:ae,selectedTarget:Z,setSelectedTarget:pe,showAmountInput:Se,minNotice:k?{min:Te,symbol:k.token.symbol,...U}:void 0,showRecipientInput:Ue,showTargetSelector:n,showOneClick:eo,showConnectPrompt:Ce,showRecipientHint:tt,canRecover:Le,recoverableCount:V,recoveryTargetsLoading:Qe,recoveryTargets:ln,recoveryOrders:on,historyOrdersLoading:It,historyOrdersError:ut,refreshRecovery:yt,trustedFactories:y,amountHint:ai,amountSmallestUnits:ii,onMax:Se&&A&&A.value>0n?Bt:void 0};return We.useLayoutEffect(()=>{e.publish(xl)}),We.useLayoutEffect(()=>()=>e.publish(null),[e]),null}var $s=require("react/jsx-runtime");function n2(e){let{theme:t="dark",mobileBreakpoint:n,drawerDirection:r,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:p}=e,[h,u]=el.useState(!1),g=l!==void 0,x=g?l:h,y=el.useCallback(f=>{g||u(f),d?.(f)},[g,d]);return(0,$s.jsx)(Hd.Provider,{value:e,children:(0,$s.jsx)(Yh,{open:x,children:(0,$s.jsx)(br,{theme:t,mobileBreakpoint:n,drawerDirection:r,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:x,onOpenChange:y,children:p})})})}var Yo=Object.assign(n2,{Trigger:Fh,Content:zh});var tl=require("react"),$d=(0,tl.createContext)(null);function ec(){let e=(0,tl.useContext)($d);if(!e)throw new Error("RelayHistory compound components must be used within <RelayHistory>");return e}var Ln=H(require("react"),1);var Zr=require("react/jsx-runtime");function Kh({className:e}){let t=ec(),{open:n}=$n();return Ln.useEffect(()=>{n&&Je("relay","history_opened")},[n]),(0,Zr.jsx)(Me,{feature:"relay",children:(0,Zr.jsx)(wr,{ariaTitle:"Transfer history",className:e??t.className,children:(0,Zr.jsx)(r2,{})})})}function r2(){let e=ec(),{theme:t}=$n(),n=Ln.useMemo(()=>{if(e.client)return e.client;let f=Kr({apiBaseUrl:e.apiBaseUrl,environment:e.environment});return rn({baseUrl:f})},[e.client,e.apiBaseUrl,e.environment]),r=e.recipient??e.walletAddress,o=!!(r&&ht(r)),[a,i]=Ln.useState(),[s,l]=Ln.useState(!1),[d,p]=Ln.useState(),h=Ln.useRef(e.onError);h.current=e.onError,Ln.useEffect(()=>{if(!o){i(void 0),l(!1),p(void 0);return}let f=!1;return i(void 0),l(!0),p(void 0),n.getConfig().then(c=>{f||i(c)}).catch(c=>{if(f)return;let b=c instanceof Error?c:new Error(String(c));p(b),h.current?.(b)}).finally(()=>{f||l(!1)}),()=>{f=!0}},[n,o]);let{orders:u,ordersLoading:g,ordersError:x}=Pr({client:n,recipient:o?r:void 0,enabled:!!a,onError:e.onError}),y=Ln.useCallback(f=>{if(!e.onOutlink)return;let b=f.target.closest?.('a[target="_blank"]');b?.href&&e.onOutlink(b.href)},[e.onOutlink]);return(0,Zr.jsx)("div",{className:"rd-root rd-wizard","data-theme":t,children:o?(0,Zr.jsx)("div",{onClick:y,children:(0,Zr.jsx)(Gs,{orders:u,isLoading:s||g,error:d??x,catalog:a,showTitle:!1})}):(0,Zr.jsx)(Wa,{requiresIdentity:!0})})}var nl=require("react/jsx-runtime");function Zh({asChild:e,children:t}){return(0,nl.jsx)(Me,{feature:"relay",children:(0,nl.jsx)(qo,{asChild:e??t!=null,children:t??(0,nl.jsx)("button",{type:"button","data-track":"open",children:"History"})})})}var tc=require("react/jsx-runtime");function o2(e){let{theme:t="dark",mobileBreakpoint:n,drawerDirection:r,dialogWidth:o="min(640px, calc(100vw - 32px))",drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:p}=e;return(0,tc.jsx)($d.Provider,{value:e,children:(0,tc.jsx)(br,{theme:t,mobileBreakpoint:n,drawerDirection:r,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:p})})}var nc=Object.assign(o2,{Trigger:Zh,Content:Kh});var Gn=H(require("react"),1);var Dn=H(require("react"),1);var rl=[],a2=3e4;function Xh({client:e,recipient:t}){let[n,r]=Dn.useState({targets:rl}),[o,a]=Dn.useState(0),i=Dn.useRef(void 0),s=Dn.useRef(void 0),l=t&&ht(t)?t.toLowerCase():void 0;Dn.useEffect(()=>{if(!l){r({targets:rl});return}let y=!1,f=i.current;if(!f||f.client!==e||f.recipientKey!==l||f.generation!==o){let c=(async()=>{let b,w=[];try{w=(await e.getConfig()).targets}catch(R){b=R instanceof Error?R:new Error(String(R))}let k=w.length===0?[()=>e.getRecovery({user:l})]:w.map(R=>()=>e.getRecovery({user:l,target:R.symbol})),C=await Promise.all(k.map(async R=>{try{return{info:await R()}}catch(S){return{error:S instanceof Error?S:new Error(String(S))}}})),N=w.length===0?C[0]?.info?[{symbol:"",isDefault:!0,info:C[0].info}]:[]:w.flatMap((R,S)=>C[S]?.info?[{symbol:R.symbol,isDefault:R.isDefault,info:C[S].info}]:[]),T=C.find(R=>R.error)?.error;return{targets:N,badgeFailed:!!(b||T&&N.length===0),error:b??T}})().catch(b=>({targets:rl,badgeFailed:!0,error:b instanceof Error?b:new Error(String(b))}));f={client:e,recipientKey:l,generation:o,promise:c},i.current=f,c.finally(()=>{s.current={client:e,recipientKey:l,at:Date.now()},i.current?.promise===c&&(i.current=void 0)})}return f.promise.then(c=>{y||r({recipientKey:l,targets:c.targets,badgeFailed:c.badgeFailed,error:c.error})}),()=>{y=!0}},[e,l,o]);let d=Dn.useCallback(()=>a(y=>y+1),[]),p=Dn.useCallback(()=>{if(!l)return;let y=i.current;if(y?.client===e&&y.recipientKey===l)return;let f=s.current;f?.client===e&&f.recipientKey===l&&Date.now()-f.at<a2||a(c=>c+1)},[e,l]),h=l&&n.recipientKey===l?n.targets:rl,u=l&&n.recipientKey===l?n.error:void 0,g=!!(l&&n.recipientKey!==l),x=!!(l&&n.recipientKey===l&&n.badgeFailed);return Dn.useMemo(()=>({count:x?0:Vs(Qo(h)),targets:h,loading:g,error:u,refresh:d,refreshIfStale:p}),[h,g,x,u,d,p])}var ol=require("react"),rc=(0,ol.createContext)(null);function oc(){let e=(0,ol.useContext)(rc);if(!e)throw new Error("RelayRecovery compound components must be used within <RelayRecovery>");return e}function ac(){return oc().props}function Jh(){return oc().recovery}function $h(){return oc().recovery.count}var No=H(require("react"),1);var yr=require("react/jsx-runtime");function e0({className:e}){let t=ac(),{open:n}=$n();return No.useEffect(()=>{n&&Je("relay","recovery_opened")},[n]),(0,yr.jsx)(Me,{feature:"relay",children:(0,yr.jsx)(wr,{ariaTitle:"Recover stuck funds",className:e??t.className,children:(0,yr.jsx)(i2,{})})})}function i2(){let e=ac(),{targets:t,loading:n,refresh:r}=Jh(),{theme:o}=$n(),a=No.useMemo(()=>Kr({apiBaseUrl:e.apiBaseUrl,environment:e.environment}),[e.apiBaseUrl,e.environment]),i=No.useMemo(()=>e.client?e.client:rn({baseUrl:a}),[e.client,a]),s=No.useMemo(()=>({walletAddress:e.walletAddress,walletChainId:e.walletChainId,sendTransaction:e.sendTransaction,writeContract:e.writeContract,readContract:e.readContract,switchChain:e.switchChain,waitForReceipt:e.waitForReceipt,getBalance:e.getBalance}),[e.walletAddress,e.walletChainId,e.sendTransaction,e.writeContract,e.readContract,e.switchChain,e.waitForReceipt,e.getBalance]),l=e.walletAddress&&ht(e.walletAddress)?e.walletAddress:void 0,d=!!(l&&(!e.recipient||ht(e.recipient)&&e.recipient.toLowerCase()===l.toLowerCase())),p=d?l:void 0,h=it(e.environment),u=Xt("apps.json",h,b=>hi(b,h)),g=No.useMemo(()=>e.trustedFactories??_s(u),[e.trustedFactories,u]),x=!!(e.writeContract&&e.readContract&&e.waitForReceipt),y=!!p&&x,f=p,{orders:c}=Pr({client:i,recipient:y?f:void 0,enabled:y,live:!1});return(0,yr.jsxs)("div",{className:"rd-root rd-wizard","data-theme":o,children:[!l&&(0,yr.jsx)("p",{className:"rd-muted","data-testid":"rd-recovery-connect-note",children:"Connect a wallet to check recoverable funds."}),l&&!d&&(0,yr.jsx)("p",{className:"rd-muted","data-testid":"rd-recovery-recipient-note",children:"Recovery is only available for the connected wallet."}),d&&!x&&(0,yr.jsx)("p",{className:"rd-muted","data-testid":"rd-recovery-unsupported-note",children:"This wallet can't sign recovery transactions."}),y&&(0,yr.jsx)(qs,{client:e.client,apiBaseUrl:a,recipient:p,wallet:s,trustedFactories:g,targets:t,targetsLoading:n,orders:c,onRecovered:r,onRecoverySuccess:e.onRecoverySuccess,showTitle:!1,onError:e.onError})]})}var al=require("react/jsx-runtime");function t0({asChild:e,children:t}){let n=$h();return(0,al.jsx)(Me,{feature:"relay",children:(0,al.jsx)(qo,{asChild:e??t!=null,dataAttributes:{"data-rd-recovery-count":n},children:t??(0,al.jsx)("button",{type:"button","data-track":"open",children:"Recover"})})})}var ic=require("react/jsx-runtime");function s2(e){let{theme:t="dark",mobileBreakpoint:n,drawerDirection:r,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:l,onOpenChange:d,children:p}=e,[h,u]=Gn.useState(!1),g=l!==void 0,x=g?l:h,y=Gn.useCallback(N=>{g||u(N),d?.(N)},[g,d]),f=Gn.useMemo(()=>{if(e.client)return e.client;let N=Kr({apiBaseUrl:e.apiBaseUrl,environment:e.environment});return rn({baseUrl:N})},[e.client,e.apiBaseUrl,e.environment]),c=e.walletAddress&&ht(e.walletAddress)?e.walletAddress:void 0,b=c&&(!e.recipient||ht(e.recipient)&&e.recipient.toLowerCase()===c.toLowerCase())?c:void 0,w=Xh({client:f,recipient:b});Gn.useEffect(()=>{x&&w.refreshIfStale()},[x,w.refreshIfStale]);let k=Gn.useRef(void 0);Gn.useEffect(()=>{!x||!w.error||k.current===w.error||(k.current=w.error,e.onError?.(w.error))},[x,w.error,e.onError]);let C=Gn.useMemo(()=>({props:e,recovery:w}),[e,w]);return(0,ic.jsx)(rc.Provider,{value:C,children:(0,ic.jsx)(br,{theme:t,mobileBreakpoint:n,drawerDirection:r,dialogWidth:o,drawerMaxWidth:a,drawerMinWidth:i,style:s,open:x,onOpenChange:y,children:p})})}var sc=Object.assign(s2,{Trigger:t0,Content:e0});var Pn=require("react");function lc(e={}){let t=(0,Pn.useRef)(e);t.current=e;let n=(0,Pn.useMemo)(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRelayConfig: either `client` or `apiBaseUrl` must be provided");return rn({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),r=e.enabled??!0,o=e.refetchInterval,[a,i]=(0,Pn.useState)(),[s,l]=(0,Pn.useState)(!1),[d,p]=(0,Pn.useState)(),[h,u]=(0,Pn.useState)(0);(0,Pn.useEffect)(()=>{if(!r){i(void 0),l(!1),p(void 0);return}let x=!1,y=!1;i(void 0),l(!0),p(void 0);async function f(){if(!(x||y)){y=!0;try{let b=await n.getConfig();if(x)return;i(b),p(void 0)}catch(b){if(x)return;let w=b instanceof Error?b:new Error(String(b));p(w),t.current.onError?.(w)}finally{y=!1,x||l(!1)}}}f();let c=typeof o=="number"&&Number.isFinite(o)&&o>0?setInterval(()=>{f()},o):void 0;return()=>{x=!0,c&&clearInterval(c)}},[n,r,h,o]);let g=(0,Pn.useCallback)(()=>u(x=>x+1),[]);return{config:a,loading:s,error:d,refresh:g}}var r0=require("@tanstack/react-query"),Hn=require("react");var l2=1,n0=new WeakMap;function d2(e){let t=n0.get(e);if(t!==void 0)return t;let n=l2++;return n0.set(e,n),n}function dc(e={}){let t=(0,Hn.useRef)(e);t.current=e;let n=(0,Hn.useMemo)(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRelayRecovery: either `client` or `apiBaseUrl` must be provided");return rn({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),r=e.recipient,o=r&&ht(r)?r:void 0,a=e.target,i=e.query,s=(0,Hn.useMemo)(()=>d2(n),[n]),l=(0,Hn.useMemo)(()=>["relay","recovery",s,o??null,a??null],[s,o,a]),d=(0,r0.useQuery)({retry:!1,...i,queryKey:l,queryFn:async()=>{if(!o)throw new Error("useRelayRecovery: a valid EVM recipient is required");return n.getRecovery({user:o,target:a})},enabled:o?i?.enabled:!1}),p=(0,Hn.useRef)(0);(0,Hn.useEffect)(()=>{let y=d.error,f=d.errorUpdatedAt;!y||f===p.current||(p.current=f,t.current.onError?.(y),y instanceof Wn&&y.status===401&&t.current.onUnauthorized?.())},[d.error,d.errorUpdatedAt]);let h=(0,Hn.useCallback)(()=>{d.refetch()},[d.refetch]),u=Ga({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:h}),g=d.data,x=(0,Hn.useCallback)(async(y,f)=>{g&&await u.recover(g,y,f)},[u,g]);return{info:g,loading:d.isLoading,error:d.error??void 0,isFetching:d.isFetching,refresh:h,recover:x,recoveryState:u.stateFor(g?.forwarder)}}var st=require("react/jsx-runtime"),c2={bscBridge:"https://bscscan.com/tx/",crossFinalize:"https://scan.crosstoken.io/tx/",crossExecute:"https://scan.crosstoken.io/tx/"},p2={bscBridge:"Bridge tx (BSC)",crossFinalize:"Finalize tx (CROSS)",crossExecute:"Execute tx (CROSS)"};function u2(e){return e==="done"?"\u2713":e==="active"?"\u25CF":""}function o0(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function f2(e){return e==="done"?"rd-stepper-item rd-stepper-item-done":e==="active"?"rd-stepper-item rd-stepper-item-active":"rd-stepper-item rd-stepper-item-pending"}function pc({orderId:e,order:t,error:n}){let r=!t&&!n;return(0,st.jsxs)("section",{className:"rd-card",children:[(0,st.jsxs)("div",{className:"rd-card-header",children:[(0,st.jsx)("h2",{className:"rd-card-title",children:"4. Status"}),t&&(0,st.jsx)("span",{className:`rd-status-pill${t.status==="COMPLETED"?" rd-status-pill-success":o0(t.status)?" rd-status-pill-failure":""}`,children:t.status})]}),(0,st.jsxs)("p",{className:"rd-card-hint",children:["Order ",e]}),r&&(0,st.jsxs)("p",{className:"rd-muted",children:[(0,st.jsx)("span",{className:"rd-spinner"})," Loading status..."]}),n&&(0,st.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["Couldn't load order status: ",n.message]}),t&&(0,st.jsxs)(st.Fragment,{children:[(0,st.jsx)("ol",{className:"rd-stepper",children:t.steps.map((o,a)=>(0,st.jsxs)("li",{className:f2(o.status),children:[(0,st.jsxs)("div",{className:"rd-stepper-rail",children:[(0,st.jsx)("span",{className:"rd-stepper-dot",children:u2(o.status)}),a<t.steps.length-1&&(0,st.jsx)("span",{className:"rd-stepper-line"})]}),(0,st.jsxs)("div",{className:"rd-stepper-body",children:[(0,st.jsx)("div",{className:"rd-stepper-label",children:o.label}),o.key==="bridge"&&t.txs.bscBridge&&(0,st.jsx)("div",{className:"rd-stepper-meta",children:(0,st.jsx)(cc,{orderTxs:t.txs,txKey:"bscBridge"})}),o.key==="deliver"&&(t.txs.crossFinalize||t.txs.crossExecute)&&(0,st.jsxs)("div",{className:"rd-stepper-meta",children:[t.txs.crossFinalize&&(0,st.jsx)(cc,{orderTxs:t.txs,txKey:"crossFinalize"}),t.txs.crossExecute&&(0,st.jsx)(cc,{orderTxs:t.txs,txKey:"crossExecute"})]})]})]},o.key))}),o0(t.status)&&(0,st.jsxs)("div",{className:"rd-callout rd-callout-danger",children:["This order did not complete successfully (status: ",t.status,"). If funds were deposited, refer to the refund address on the order for recovery."]}),t.status==="COMPLETED"&&(0,st.jsx)("div",{className:"rd-callout rd-callout-success",children:"crossd delivered. This order is complete."})]})]})}function cc({orderTxs:e,txKey:t}){let n=e[t];return n?(0,st.jsxs)("a",{href:`${c2[t]}${n}`,target:"_blank",rel:"noreferrer",children:[p2[t],": ",n.slice(0,10),"..."]}):null}function _a(e){return`${e.chainId}:${e.address.toLowerCase()}`}function il(e,t){return _a(e)===_a(t)}function Va(e,t){if(t)return e.find(n=>il(n,t))}function Ko(e,t,n){return t?{fromTokens:(n==="swap"?[t.swap.from]:t.bridge.from).map(o=>Va(e,o)).filter(o=>!!o),targetToken:Va(e,t.target)}:{fromTokens:[],targetToken:void 0}}function Qa(e,t){return e.some(n=>n.chainId===t.chainId&&n.address.toLowerCase()===t.address.toLowerCase())}function a0(e){let t=/^v?(\d+(?:\.\d+)*)(?:-([0-9A-Za-z.-]+))?$/.exec(e.trim());return t?{parts:t[1].split(".").map(n=>Number(n)),prerelease:t[2]??null}:null}function m2(e,t){let n=a0(e),r=a0(t);if(!n||!r)return null;let o=Math.max(n.parts.length,r.parts.length);for(let a=0;a<o;a+=1){let i=(n.parts[a]??0)-(r.parts[a]??0);if(i!==0)return i<0?-1:1}return n.prerelease===r.prerelease?0:n.prerelease===null?1:r.prerelease===null||n.prerelease<r.prerelease?-1:1}function i0(e,t=no){if(!e)return!0;let n=m2(t,e);return n===null?!0:n>=0}var s0={swap:"swap",bridge:"bridge",transfer:"transferCrypto",stake:"stake"};function Zo(e,t){return t?.[s0[e]]??e!=="transfer"}function Xo(e,t){return i0(t?.[s0[e]])}function qa(e,t,n){return Zo(e,t)&&Xo(e,n)}var l0={dev:"https://stg.oneusd.money/",stage:"https://stg.oneusd.money/",production:"https://www.oneusd.money/"};function d0(e){let t=e.trim().toLowerCase().replace(/\.$/,"");return t==="oneusd.money"||t.endsWith(".oneusd.money")}function c0(e,t){return e?.items?.find(({id:r,type:o})=>r.toLowerCase()==="oneusd"||o.toLowerCase()==="oneusd")?.url[t]}var sl=H(require("react"),1);var g2="contracts.json",h2=/^0x[0-9a-fA-F]{40}$/;function p0(e){return typeof e=="string"&&h2.test(e)?e:void 0}function b2(e,t,n){let r=p0(n);if(r)return r;let o=e?.envToNetwork?.[t]??(t==="production"?"mainnet":"testnet"),a=e?.soneusd?.VAULT;return p0(typeof a=="string"?a:a?.[o])}function u0(e,t){let[n,r]=sl.useState(void 0);sl.useEffect(()=>{let a=!0;return r(void 0),kr(g2,e).then(i=>{a&&r(i)}),()=>{a=!1}},[e]);let o=b2(n,e,t);return{loading:n===void 0&&!o,address:o}}var f0=(1n<<256n)-1n,uc=[{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],ll=[{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"previewDeposit",stateMutability:"view",inputs:[{name:"assets",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"paused",stateMutability:"view",inputs:[],outputs:[{name:"",type:"bool"}]},{type:"function",name:"deposit",stateMutability:"nonpayable",inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"}],outputs:[{name:"shares",type:"uint256"}]}];function Ya(e){if(typeof e=="bigint")return e;if(typeof e=="number"&&Number.isSafeInteger(e)||typeof e=="string"&&/^(0x[0-9a-fA-F]+|\d+)$/.test(e))return BigInt(e);throw new Error("Unexpected contract read result")}var dl=H(require("react"),1);function m0(e){let[t,n]=dl.useState(null);return dl.useEffect(()=>{if(!e)return;let r=!0;return td().then(o=>{r&&n(o)}).catch(()=>{}),()=>{r=!1}},[e]),t}function g0(e,t){return t==="bridge"?!0:e==="bridge"||e==="bridge-swap"||e==="swap-bridge"}function w2(e){if(!e)return"";let[t="0",n=""]=e.replace(/,/g,"").split("."),o=(t.replace(/^0+(?=\d)/,"")||"0").replace(/\B(?=(\d{3})+(?!\d))/g,","),a=n.slice(0,6).replace(/0+$/,"");return a?`${o}.${a}`:o}function y2(e){return e===56||e===97?"BSC":e===612044||e===612055||e===5555?"ONEchain":`Chain ${e}`}function h0(e,t){return g0(e.pathType,t)?"Bridging":"Swapping"}function b0(e,t){let n=w2(e.toAmount);if(g0(e.pathType,t)){let r=`arriving on ${y2(e.toToken.chainId)}`;return n?`${n} ${r}`:r}return n?`${n} Swapped`:"Transaction completed"}var Qt=require("react/jsx-runtime");function w0(e){return(0,Qt.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:(0,Qt.jsx)("path",{d:"m7 3-3 3 3 3M4 6h13a3 3 0 0 1 3 3v1M17 21l3-3-3-3m3 3H7a3 3 0 0 1-3-3v-1",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})}function y0(e){return(0,Qt.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[(0,Qt.jsx)("path",{d:"M10 13a4 4 0 0 0 5.66 0l2.83-2.83a4 4 0 0 0-5.66-5.66L11.4 5.94",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),(0,Qt.jsx)("path",{d:"M14 11a4 4 0 0 0-5.66 0L5.51 13.8a4 4 0 0 0 5.66 5.66l1.42-1.41",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})]})}function x0(e){return(0,Qt.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[(0,Qt.jsx)("rect",{x:"4",y:"4",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),(0,Qt.jsx)("rect",{x:"14",y:"4",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),(0,Qt.jsx)("rect",{x:"4",y:"14",width:"6",height:"6",rx:"1.4",stroke:"currentColor",strokeWidth:"1.7"}),(0,Qt.jsx)("path",{d:"M14 14h2v2h-2zM18 18h2v2h-2z",fill:"currentColor"})]})}function v0(e){return(0,Qt.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[(0,Qt.jsx)("ellipse",{cx:"12",cy:"6.5",rx:"7",ry:"2.5",stroke:"currentColor",strokeWidth:"1.7"}),(0,Qt.jsx)("path",{d:"M5 6.5v4c0 1.38 3.13 2.5 7 2.5s7-1.12 7-2.5v-4",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),(0,Qt.jsx)("path",{d:"M5 10.5v4c0 1.38 3.13 2.5 7 2.5s7-1.12 7-2.5v-4",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),(0,Qt.jsx)("path",{d:"M5 14.5v3c0 1.38 3.13 2.5 7 2.5s7-1.12 7-2.5v-3",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})]})}function cl(e){return(0,Qt.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:(0,Qt.jsx)("path",{d:"m9 6 6 6-6 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function pl(e){return(0,Qt.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:(0,Qt.jsx)("path",{d:"m6 6 12 12M18 6 6 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}var en=H(require("react"),1);var ul=H(require("react"),1),x2={dev:"https://stg-crossd-dashboard-api.crossdefi.io/api/v1/earnings/overview",stage:"https://stg-crossd-dashboard-api.crossdefi.io/api/v1/earnings/overview",production:"https://crossd-dashboard-api.crossdefi.io/api/v1/earnings/overview"},v2=6e4,k0=new Map,fc=new Map;function k2(e){let t=x2[e],n=k0.get(t);if(n&&n.expiresAt>Date.now())return Promise.resolve(n.value);let r=fc.get(t);if(r)return r;let o=(async()=>{let a=await fetch(t,{cache:"no-store"});if(!a.ok)throw new Error(`Failed to fetch sONEUSD yield: ${a.status}`);let i=await a.json();if(i.code!==200)throw new Error(`sONEUSD yield API error: ${i.code}`);let s=i.data?.yield,l=s?.available&&Number.isFinite(s.apr_bps)&&Number.isFinite(s.apy_bps)?{aprBps:s.apr_bps,apyBps:s.apy_bps}:null;return k0.set(t,{value:l,expiresAt:Date.now()+v2}),l})().finally(()=>{fc.delete(t)});return fc.set(t,o),o}function C0(e){let t=Math.trunc(e/100),n=Math.abs(Math.trunc(e%100));return`${t}.${String(n).padStart(2,"0")}`}function R0(e,t){let[n,r]=ul.useState(void 0);return ul.useEffect(()=>{if(!t)return;let o=!0;return k2(e).then(a=>{o&&r(a)}).catch(()=>{o&&r(null)}),()=>{o=!1}},[t,e]),n}var Ye=require("react/jsx-runtime"),So="sONEUSD",C2=300,fl=6,N0=[25,50,75,100];function S0(e,t){return t>=100?e:e*BigInt(t)/100n}function T0(e){return e instanceof Error?e.message:typeof e=="string"?e:"Transaction failed"}function R2(e,t){let n=e.replace(/[^\d.]/g,""),[r="",...o]=n.split(".");return o.length===0?r:`${r}.${o.join("").slice(0,t)}`}function N2(e,t,n,r){let[o,a]=en.useState(null),[i,s]=en.useState(null),[l,d]=en.useState(0),p=en.useCallback(()=>d(u=>u+1),[]),{readContract:h}=e;return en.useEffect(()=>{if(!r){a(null);return}let u=!1;s(null);let g=r,x={chainId:t.chainId,address:t.address,abi:uc},y={chainId:t.chainId,address:n,abi:ll};return Promise.all([h({...x,functionName:"balanceOf",args:[g]}),h({...x,functionName:"allowance",args:[g,n]}),h({...y,functionName:"balanceOf",args:[g]}),h({...y,functionName:"paused",args:[]})]).then(([f,c,b,w])=>{u||a({balance:Ya(f),allowance:Ya(c),shares:Ya(b),paused:w===!0})}).catch(f=>{u||s(T0(f))}),()=>{u=!0}},[h,t.address,t.chainId,n,r,l]),{position:o,error:i,refetch:p}}function S2(e,t,n,r){let[o,a]=en.useState(null);return en.useEffect(()=>{if(r===null){a(null);return}let i=!1,s=setTimeout(()=>{e({chainId:t.chainId,address:n,abi:ll,functionName:"previewDeposit",args:[r]}).then(l=>{i||a(Ya(l))}).catch(()=>{i||a(null)})},C2);return()=>{i=!0,clearTimeout(s)}},[r,e,t.chainId,n]),o}function I0({env:e,walletAddress:t,walletChainId:n,token:r,vaultAddress:o,ports:a,locked:i,onRequestConnect:s,onBack:l,onClose:d,onSubmitted:p,onFailed:h}){let[u,g]=en.useState(""),[x,y]=en.useState("idle"),[f,c]=en.useState(null),b=en.useRef(!0);en.useEffect(()=>(b.current=!0,()=>{b.current=!1}),[]);let{position:w,error:k,refetch:C}=N2(a,r,o,t),N=R0(e,!0),T=en.useMemo(()=>u.trim()?Nr(u,r.decimals):null,[u,r.decimals]),R=T&&"value"in T?T.value:null,S=R!==null&&w!==null&&R>w.balance,E=T&&"error"in T?T.error:S?`Exceeds your ${r.symbol} balance.`:null,A=S2(a.readContract,r,o,R!==null&&!S?R:null),F=x!=="idle",D=R!==null&&w!==null&&w.allowance<R,G=!F&&!i&&!!t&&w!==null&&!w.paused&&R!==null&&!S,M=en.useCallback(Q=>{if(!w||F)return;let ee=S0(w.balance,Q);g(ee>0n?cr(ee,r.decimals,r.decimals):""),c(null)},[F,w,r.decimals]),j=R!==null&&w!==null&&w.balance>0n?N0.find(Q=>S0(w.balance,Q)===R)??null:null,le=en.useCallback(async()=>{if(!G||!t||R===null||!w)return;let Q=t;c(null);try{if(n!==void 0&&n!==r.chainId){if(!a.switchChain)throw new Error(`Switch your wallet to chain ${r.chainId} first.`);y("switching"),await a.switchChain(r.chainId)}if(w.allowance<R){y("approving");let z=await a.writeContract({chainId:r.chainId,address:r.address,abi:uc,functionName:"approve",args:[o,f0]});if(a.waitForReceipt&&(y("confirming-approval"),(await a.waitForReceipt({chainId:r.chainId,hash:z})).status!=="success"))throw new Error("Approval reverted.");if(!b.current)return;C()}y("staking");let ee=await a.writeContract({chainId:r.chainId,address:o,abi:ll,functionName:"deposit",args:[R,Q]});if(!b.current)return;y("idle"),g(""),p({txHash:ee,chainId:r.chainId,amount:R,amountText:cr(R,r.decimals,fl)})}catch(ee){if(!b.current)return;let z=T0(ee);y("idle"),c(z),h(z)}},[R,G,h,p,a,w,C,r.address,r.chainId,r.decimals,o,t,n]),oe=x==="switching"?"Switching network...":x==="approving"?`Approve ${r.symbol} in your wallet...`:x==="confirming-approval"?"Confirming approval...":x==="staking"?"Confirm in your wallet...":D?`Approve ${r.symbol}`:"Stake",ne=f??E??k;return(0,Ye.jsxs)("div",{className:"gou-chooser-body gou-stake","data-busy":F?"true":"false",children:[(0,Ye.jsx)("button",{type:"button",className:"gou-close",onClick:d,disabled:F,"aria-label":"Close",children:(0,Ye.jsx)(pl,{})}),(0,Ye.jsxs)("header",{className:"gou-intro gou-stake-header",children:[(0,Ye.jsx)("button",{type:"button",className:"gou-stake-back",onClick:l,disabled:F,"aria-label":"Back",children:(0,Ye.jsx)(cl,{})}),(0,Ye.jsxs)("h2",{children:["Stake ",r.symbol]})]}),(0,Ye.jsxs)("form",{className:"gou-stake-form",onSubmit:Q=>{Q.preventDefault(),le()},children:[(0,Ye.jsxs)("div",{className:"gou-stake-row",children:[(0,Ye.jsx)("label",{htmlFor:"gou-stake-amount",children:"Amount"}),(0,Ye.jsxs)("span",{children:["Balance:"," ",(0,Ye.jsxs)("strong",{className:"gou-stake-balance",children:[w?cr(w.balance,r.decimals,fl):t?"\u2026":"0"," ",r.symbol]})]})]}),(0,Ye.jsxs)("div",{className:"gou-stake-input","data-invalid":ne?"true":"false",children:[(0,Ye.jsx)("input",{id:"gou-stake-amount",type:"text",inputMode:"decimal",autoComplete:"off",placeholder:"0",value:u,disabled:F,onChange:Q=>{g(R2(Q.target.value,r.decimals)),c(null)}}),(0,Ye.jsx)("span",{children:r.symbol})]}),(0,Ye.jsx)("div",{className:"gou-stake-quick",role:"group","aria-label":"Quick amount",children:N0.map(Q=>(0,Ye.jsx)("button",{type:"button","aria-pressed":j===Q,disabled:F||!w||w.balance===0n,onClick:()=>M(Q),"data-track":"stake_quick_amount","data-track-id":String(Q),children:Q>=100?"MAX":`${Q}%`},Q))}),ne&&(0,Ye.jsx)("p",{className:"gou-stake-error",role:"alert",children:ne}),(0,Ye.jsxs)("dl",{className:"gou-stake-estimate",children:[N&&(0,Ye.jsxs)("div",{children:[(0,Ye.jsx)("dt",{title:"Annualized without compounding. Trailing 7-day vault yield.",children:"APR"}),(0,Ye.jsxs)("dd",{className:"gou-stake-apr",children:[C0(N.aprBps),"%"]})]}),(0,Ye.jsxs)("div",{children:[(0,Ye.jsx)("dt",{children:"You receive"}),(0,Ye.jsx)("dd",{children:A!==null?`\u2248 ${cr(A,r.decimals,fl)} ${So}`:`0 ${So}`})]}),(0,Ye.jsxs)("div",{children:[(0,Ye.jsxs)("dt",{children:["Your ",So]}),(0,Ye.jsx)("dd",{className:"gou-stake-shares",children:w?`${cr(w.shares,r.decimals,fl)} ${So}`:t?"\u2026":`0 ${So}`})]})]}),w?.paused&&(0,Ye.jsx)("p",{className:"gou-stake-error",role:"alert",children:"Staking is paused right now. Try again later."}),t?(0,Ye.jsx)("button",{type:"submit",className:"gou-stake-submit",disabled:!G,"data-track":"stake_submit",children:oe}):(0,Ye.jsx)("button",{type:"button",className:"gou-stake-submit",onClick:s,"data-track":"connect_click","aria-label":"Connect wallet to continue",children:"Connect Wallet"})]})]})}he(`.gou-fab{--gou-collapse-duration: .24s;--gou-collapse-ease: cubic-bezier(.32, .72, 0, 1);position:fixed;right:var(--gou-right, 2rem);bottom:calc(env(safe-area-inset-bottom,0px) + var(--gou-bottom, 2rem));z-index:var(--gou-z-index, 40);display:inline-flex;width:max-content;align-items:center;gap:8px;padding:4px 20px 4px 4px;border:0;border-radius:9999px;background:#fff;color:#121212;box-shadow:0 4px 20px #00000073;font:inherit;cursor:pointer;transition:gap var(--gou-collapse-duration) var(--gou-collapse-ease),padding var(--gou-collapse-duration) var(--gou-collapse-ease),transform .15s ease,background .15s ease;-webkit-tap-highlight-color:transparent}[data-theme=light] .gou-fab{background:#121212;color:#fff;box-shadow:0 4px 20px #00000040}.gou-fab:active:not(:disabled){transform:scale(.96)}.gou-fab:focus-visible{outline:3px solid #f3742e;outline-offset:3px}.gou-fab[data-icon-only=true]{gap:0;padding:0}.gou-fab:disabled{cursor:default}.gou-fab[data-trigger-mode=button]{position:relative;right:auto;bottom:auto;z-index:auto;vertical-align:middle}[data-gou-mode=button]{display:inline-block}.gou-fab-status{pointer-events:none;cursor:default}.gou-fab-icon-frame{position:relative;display:inline-flex;width:38px;height:38px;flex-shrink:0;border-radius:9999px;transition:width var(--gou-collapse-duration) var(--gou-collapse-ease),height var(--gou-collapse-duration) var(--gou-collapse-ease)}.gou-fab-icon{display:block;width:100%;height:100%;border-radius:inherit;object-fit:contain}.gou-fab[data-icon-only=true] .gou-fab-icon-frame{width:52px;height:52px}.gou-fab-progress-ring{position:absolute;inset:-2px;border:2px solid rgba(243,116,46,.25);border-top-color:#f3742e;border-radius:9999px;animation:gou-spin .9s linear infinite}.gou-fab-label{overflow:hidden;max-width:180px;opacity:1;font-size:14px;font-weight:600;line-height:1.5;white-space:nowrap;transition:max-width var(--gou-collapse-duration) var(--gou-collapse-ease),opacity calc(var(--gou-collapse-duration) * .6) var(--gou-collapse-ease)}.gou-fab[data-icon-only=true] .gou-fab-label{max-width:0;opacity:0}.gou-fab[data-tx-phase] .gou-fab-label{max-width:260px}.gou-fab-trigger-copy{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;line-height:1.25}.gou-fab-apr{color:var(--ds-system-orange-high, #ff7a3d);font-size:11px;font-weight:600;line-height:1.25}.gou-fab[data-tx-phase=success]{animation:gou-result-success 1.2s ease-out}.gou-fab[data-tx-phase=failure]{animation:gou-result-failure 1.2s ease-out}.gou-fab-dots>span{animation:gou-status-dot 1.4s ease-in-out infinite}.gou-fab-dots>span:nth-child(2){animation-delay:.2s}.gou-fab-dots>span:nth-child(3){animation-delay:.4s}.gou-tooltip{position:absolute;right:0;bottom:calc(100% + 8px);pointer-events:none;padding:6px 10px;border-radius:8px;background:#121212;color:#fff;box-shadow:0 8px 24px #0000002e;font-size:12px;font-weight:500;opacity:0;white-space:nowrap;transition:opacity .2s ease}[data-theme=dark] .gou-tooltip{background:#f5f5f5;color:#121212}.gou-fab:hover .gou-tooltip{opacity:1}.gou-shell{--ds-bg-default: #1c1c1d;--ds-bg-dim: #181819;--ds-surface-default: #1c1c1d;--ds-surface-medium: #212224;--ds-surface-high: rgba(255, 255, 255, .08);--ds-border-default: rgba(255, 255, 255, .1);--ds-content-highest: #ffffff;--ds-content-high: rgba(255, 255, 255, .85);--ds-content-medium: rgba(255, 255, 255, .65);--ds-content-low: rgba(255, 255, 255, .4);--ds-accent-primary-default: #f3742e;--ds-accent-primary-high: #f3742e;--ds-accent-primary-low: rgba(243, 116, 46, .1);--ds-accent-primary-on: #ffffff;--gou-bg: #1c1c1d;--gou-card: #212224;--gou-card-hover: rgba(255, 255, 255, .08);--gou-border: rgba(255, 255, 255, .1);--gou-text: #ffffff;--gou-muted: rgba(255, 255, 255, .65);background:var(--gou-bg);color:var(--gou-text)}.gou-shell[data-theme=light]{--ds-bg-default: #ffffff;--ds-bg-dim: #fafbfd;--ds-surface-default: #ffffff;--ds-surface-medium: rgba(0, 0, 0, .01);--ds-surface-high: rgba(0, 0, 0, .03);--ds-border-default: rgba(0, 0, 0, .06);--ds-content-highest: #000000;--ds-content-high: rgba(0, 0, 0, .85);--ds-content-medium: rgba(0, 0, 0, .65);--ds-content-low: rgba(0, 0, 0, .4);--gou-bg: #ffffff;--gou-card: #ffffff;--gou-card-hover: rgba(0, 0, 0, .03);--gou-border: rgba(0, 0, 0, .06);--gou-text: #000000;--gou-muted: rgba(0, 0, 0, .65)}.gou-chooser{overflow:hidden}.gou-chooser-body{position:relative;display:flex;flex-direction:column;gap:28px;padding:32px}.gou-close{position:absolute;top:24px;right:24px;display:inline-flex;width:32px;height:32px;align-items:center;justify-content:center;padding:0;border:0;border-radius:9999px;background:transparent;color:var(--gou-muted);cursor:pointer}.gou-close:hover{background:var(--gou-card-hover);color:var(--gou-text)}.gou-close svg{width:20px;height:20px}.gou-intro{display:flex;flex-direction:column;gap:6px;padding:0 32px 0 0;text-align:left}.gou-intro h2{margin:0;color:var(--gou-text);font-size:20px;font-weight:650;line-height:1.6}.gou-intro-link{display:inline-flex;width:fit-content;align-items:center;gap:4px;color:var(--ds-accent-primary-default, #7e54f4);font-size:14px;font-weight:600;line-height:1.5;text-decoration:none}.gou-intro-link-icon{flex-shrink:0}.gou-intro-link>span{text-decoration:underline;text-underline-offset:3px}.gou-intro-link:focus-visible{outline:2px solid #f3742e;outline-offset:3px;border-radius:4px}.gou-actions{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none}.gou-action{display:flex;width:100%;min-width:0;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--gou-border);border-radius:12px;background:var(--gou-card);color:var(--gou-text);font:inherit;text-align:left;cursor:pointer;transition:border-color .15s ease,background .15s ease}.gou-action:hover:not(:disabled){border-color:#f3742e;background:var(--gou-card-hover)}.gou-action:disabled{cursor:not-allowed;opacity:.5}.gou-action:focus-visible{outline:2px solid #f3742e;outline-offset:2px}.gou-action-icon{display:inline-flex;width:32px;height:32px;flex-shrink:0;align-items:center;justify-content:center;border:1px solid var(--gou-border);border-radius:9px;color:var(--gou-text);transition:border-color .15s ease,color .15s ease}.gou-action:hover:not(:disabled) .gou-action-icon{border-color:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-default, #7e54f4)}.gou-action-icon svg{width:17px;height:17px}.gou-action-copy{display:flex;min-width:0;flex:1;flex-direction:column;gap:2px}.gou-action-title{display:flex;min-width:0;align-items:center;gap:6px;font-size:16px;font-weight:650}.gou-action-description{color:var(--gou-muted);font-size:14px;line-height:1.45}.gou-action-chevron{width:18px;height:18px;flex-shrink:0;color:var(--gou-muted)}.gou-badge{flex-shrink:0;padding:2px 6px;border-radius:5px;background:#f3742e24;color:#f3742e;font-size:10px;font-weight:650}.gou-badge[data-tone=muted]{background:var(--gou-card-hover);color:var(--gou-muted)}.gou-stake-header{flex-direction:row;align-items:center;gap:8px}.gou-stake-estimate .gou-stake-apr{color:var(--ds-accent-primary-default, #7e54f4)}.gou-stake-back{display:inline-flex;width:32px;height:32px;flex-shrink:0;align-items:center;justify-content:center;margin-left:-8px;padding:0;border:0;border-radius:9999px;background:transparent;color:var(--gou-muted);cursor:pointer}.gou-stake-back svg{width:20px;height:20px;transform:rotate(180deg)}.gou-stake-back:hover:not(:disabled){background:var(--gou-card-hover);color:var(--gou-text)}.gou-stake-back:disabled,.gou-stake[data-busy=true] .gou-close{cursor:default;opacity:.4}.gou-stake-form{display:flex;flex-direction:column;gap:12px}.gou-stake-row{display:flex;align-items:baseline;justify-content:space-between;gap:8px;color:var(--gou-muted);font-size:13px}.gou-stake-row label{font-weight:600}.gou-stake-balance{color:var(--gou-text);font-weight:600}.gou-stake-quick{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.gou-stake-quick button{height:32px;padding:0;border:1px solid var(--gou-border);border-radius:8px;background:transparent;color:var(--gou-muted);font:inherit;font-size:13px;font-weight:600;cursor:pointer;transition:border-color .15s ease,color .15s ease}.gou-stake-quick button:hover:not(:disabled){border-color:var(--ds-accent-primary-default, #7e54f4);color:var(--gou-text)}.gou-stake-quick button[aria-pressed=true]{border-color:var(--ds-accent-primary-default, #7e54f4);background:var(--ds-accent-primary-low, #f5f3ff);color:var(--ds-accent-primary-default, #7e54f4)}.gou-stake-quick button:disabled{cursor:default;opacity:.4}.gou-stake-input{display:flex;align-items:center;gap:8px;padding:0 14px;border:1px solid var(--gou-border);border-radius:12px;background:var(--gou-card);transition:border-color .15s ease}.gou-stake-input:focus-within{border-color:var(--ds-accent-primary-default, #7e54f4)}.gou-stake-input[data-invalid=true]{border-color:var(--ds-status-error-default, #ff3c53)}.gou-stake-input input{min-width:0;flex:1;height:48px;border:0;background:transparent;color:var(--gou-text);font:inherit;font-size:18px;font-weight:650;outline:none}.gou-stake-input input::placeholder{color:var(--ds-content-low)}.gou-stake-input input:disabled{opacity:.6}.gou-stake-input>span{flex-shrink:0;color:var(--gou-muted);font-size:14px;font-weight:600}.gou-stake-error{margin:0;color:var(--ds-status-error-default, #ff3c53);font-size:13px;line-height:1.45}.gou-stake-estimate{display:flex;flex-direction:column;gap:8px;margin:0;padding:12px 14px;border:1px solid var(--gou-border);border-radius:12px;color:var(--gou-muted);font-size:14px}.gou-stake-estimate>div{display:flex;justify-content:space-between;gap:8px}.gou-stake-estimate dd{margin:0;color:var(--gou-text);font-weight:600}.gou-stake-estimate .gou-stake-shares{color:var(--gou-muted);font-weight:500}.gou-stake-submit{width:100%;margin-top:4px;padding:14px 16px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-on, #ffffff);font:inherit;font-size:16px;font-weight:650;cursor:pointer}.gou-stake-submit:disabled{cursor:not-allowed;opacity:.45}.gou-stake-submit:focus-visible{outline:2px solid #f3742e;outline-offset:2px}.gou-execution{height:auto;max-height:90dvh;overflow:hidden}.gou-execution .bf-root{width:100%;max-height:90dvh}.gou-connect-required,.gou-route-state{display:flex;min-height:360px;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:32px;text-align:center}.gou-connect-required h3,.gou-route-state h3{margin:0;color:var(--gou-text);font-size:18px}.gou-connect-required p,.gou-route-state p{max-width:320px;margin:0;color:var(--gou-muted);font-size:14px;line-height:1.5}.gou-lock{font-size:28px}.gou-connect-required button{width:100%;max-width:320px;margin-top:10px;padding:12px 16px;border:0;border-radius:12px;background:var(--ds-accent-primary-default, #7e54f4);color:var(--ds-accent-primary-on, #ffffff);font:inherit;font-size:16px;font-weight:650;cursor:pointer}.gou-spinner{width:28px;height:28px;border:3px solid var(--gou-border);border-top-color:var(--ds-accent-primary-default, #7e54f4);border-radius:9999px;animation:gou-spin .8s linear infinite}@keyframes gou-spin{to{transform:rotate(360deg)}}@keyframes gou-status-dot{0%,60%,to{opacity:.2}30%{opacity:1}}@keyframes gou-result-success{0%{outline:0 solid rgba(30,202,119,0)}30%{outline:3px solid rgba(30,202,119,.75)}to{outline:0 solid rgba(30,202,119,0)}}@keyframes gou-result-failure{0%{outline:0 solid rgba(255,60,83,0)}30%{outline:3px solid rgba(255,60,83,.75)}to{outline:0 solid rgba(255,60,83,0)}}@media(max-width:767px){.gou-fab{right:var(--gou-right-mobile, 1rem)}.gou-fab-icon-frame{width:32px;height:32px}.gou-fab[data-icon-only=true] .gou-fab-icon-frame{width:40px;height:40px}.gou-chooser-body{padding:24px 16px 28px}.gou-close{top:16px;right:16px}.gou-execution{height:auto;max-height:70dvh}.gou-execution .bf-root{max-height:calc(70dvh - 24px)}}@media(prefers-reduced-motion:reduce){.gou-fab,.gou-fab-icon-frame,.gou-fab-label,.gou-tooltip{transition:none}.gou-spinner,.gou-fab-progress-ring{animation-duration:1.6s}.gou-fab[data-tx-phase=success],.gou-fab[data-tx-phase=failure],.gou-fab-dots>span{animation:none}}
22
+ `);var se=require("react/jsx-runtime"),T2=[{id:"swap",label:"Swap",eta:"Instant",Icon:w0},{id:"bridge",label:"Bridge",Icon:y0},{id:"transfer",label:"Transfer Crypto",eta:"QR deposit",Icon:x0},{id:"stake",label:"Stake",eta:"Earn yield",Icon:v0}],I2=4e3;function E0(e){return e instanceof Error?e.message:typeof e=="string"?e:"Unknown error"}function ml(e,t){try{e?.(t)}catch{}}function E2({compactTrigger:e,collapseOnScroll:t,scrollThreshold:n}){let[r,o]=Ke.useState(!1);return Ke.useEffect(()=>{if(t===!1){o(!1);return}let a=n??200,i=a+24,s=Math.max(0,a-24),l=0,d=window.scrollY>a;o(d);let p=()=>{l=0;let u=d?window.scrollY>s:window.scrollY>i;u!==d&&(d=u,o(u))},h=()=>{l||(l=requestAnimationFrame(p))};return window.addEventListener("scroll",h,{passive:!0}),()=>{l&&cancelAnimationFrame(l),window.removeEventListener("scroll",h)}},[t,n]),!!(e||r)}function A0({loading:e}){return(0,se.jsxs)("div",{className:"gou-route-state",role:"status",children:[e&&(0,se.jsx)("span",{className:"gou-spinner","aria-hidden":"true"}),(0,se.jsx)("h3",{children:e?"Preparing route":"Route unavailable"}),(0,se.jsx)("p",{children:e?"Loading token and contract configuration.":"The configured ONEUSD route is not available in this environment."})]})}function mc({walletAddress:e,tokens:t,pairs:n,loading:r=!1,bridge:o,relay:a,stake:i,env:s,targetSymbol:l,relayTargetSymbol:d="ONEUSD",targetIconUrl:p,mode:h="floating",buttonComponent:u,theme:g="dark",mobileBreakpoint:x=768,drawerDirection:y="bottom",dialogWidth:f="560px",drawerMaxWidth:c,drawerMinWidth:b,style:w,className:k,contentClassName:C,hidden:N=!1,compactTrigger:T,collapseOnScroll:R=!0,scrollThreshold:S=200,waitForTransaction:E,transactionResultDurationMs:A=I2,onRequestConnect:F,onEvent:D}){let[G,M]=Ke.useState(!1),[j,le]=Ke.useState(null),[oe,ne]=Ke.useState(!1),[Q,ee]=Ke.useState(null),[z,q]=Ke.useState(!1),ae=Ke.useRef(0),Z=Ke.useRef(!1),pe=Ke.useRef(null),Se=Ke.useRef(!0),Ue=E2({compactTrigger:T,collapseOnScroll:R,scrollThreshold:S}),fe=Ke.useMemo(()=>it(s),[s]),Re=Xt("apps.json",fe,O=>O?.getOneUsd?.modes),Ce=Xt("apps.json",fe,O=>O?.getOneUsd?.minVersions),Le=Xt("app-launcher-v2.json",fe,O=>c0(O,fe))??l0[fe],$e=Ke.useMemo(()=>Ko(t,n,"swap"),[n,t]),wt=Ke.useMemo(()=>Ko(t,n,"bridge"),[n,t]),Ge=$e.targetToken??wt.targetToken,Qe=i?.readContract??a?.readContract,He=i?.writeContract??a?.writeContract,Dt=i?.switchChain??a?.switchChain,tn=i?.waitForReceipt??a?.waitForReceipt,yt=Ke.useMemo(()=>Qe&&He?{readContract:Qe,writeContract:He,switchChain:Dt,waitForReceipt:tn}:null,[Qe,Dt,tn,He]),{address:Pt,loading:Tt}=u0(fe,i?.vaultAddress),nn=!!(yt&&Pt&&Ge),It=Ke.useMemo(()=>T2.filter(({id:O})=>Zo(O,Re)),[Re]),ut=It.length>0,Ot=m0(!N&&ut),rt=l??Ge?.symbol??"ONEUSD",on=p??Ge?.iconUrl??Vd,ft=h==="floating"&&Ue,fn=h==="button"&&u?u:"button";Ke.useEffect(()=>(Se.current=!0,()=>{Se.current=!1,pe.current&&clearTimeout(pe.current)}),[]),Ke.useEffect(()=>{q(!d0(window.location.hostname))},[]),Ke.useEffect(()=>{ut||M(!1)},[ut]);let Ze=Ke.useCallback(O=>D?.(O),[D]),lt=Ke.useCallback(()=>{Q||!ut||(Ze({name:"fab_click",state:ft?"icon_only":"expanded"}),M(!0))},[Ze,ut,Q,ft]),nt=Ke.useCallback(O=>{Q||!qa(O,Re,Ce)||O==="stake"&&!nn||(Ze({name:"action_select",action:O}),M(!1),O==="transfer"&&ne(!0),le(O))},[Ze,Re,Ce,nn,Q]),Et=Ke.useCallback(O=>{Ze({name:"connect_click",action:O}),Promise.resolve(F?.()).catch(De=>{Ze({name:"failure",action:O,message:E0(De)})})},[Ze,F]),Rt=j==="swap"||j==="bridge"?j:null,Xe=Rt==="swap"?$e:wt,an=!!(n&&Xe.targetToken&&Xe.fromTokens.length>0),sn=Ke.useMemo(()=>{if(!Xe.targetToken)return;let O=Xe.targetToken;return De=>{let qe=o.getToTokens?.(De,t);return qe&&!Qa(qe,O)?[]:[O]}},[o.getToTokens,Xe.targetToken,t]),{onSubmitted:Yt,onSuccess:ln,onFailed:V,...ve}=o,{onDeposited:Ne,onError:ze,...ot}=a??{},Kt=Ke.useCallback((O,De,qe,re,Te)=>{!Se.current||ae.current!==O||(ee({id:O,phase:De,action:qe,label:re,txHash:Te}),pe.current&&clearTimeout(pe.current),pe.current=setTimeout(()=>{!Se.current||ae.current!==O||(Z.current=!1,ee(null),pe.current=null)},Math.max(0,A)))},[A]),Bt=Ke.useCallback(O=>{if(Z.current)return!1;Z.current=!0;let{action:De,txHash:qe,pendingLabel:re,successNote:Te,wait:U,onFailed:Oe}=O,$=++ae.current;return ee({id:$,phase:"pending",action:De,label:re,txHash:qe}),M(!1),le(null),Promise.resolve().then(U).then(()=>{!Se.current||ae.current!==$||(Kt($,"success",De,Te,qe),Ze({name:"success",action:De,txHash:qe}))}).catch(Pe=>{if(!Se.current||ae.current!==$)return;let In=E0(Pe);Kt($,"failure",De,"Transaction failed",qe),Oe?.(In),Ze({name:"failure",action:De,message:In})}),!0},[Ze,Kt]),Cn=Ke.useCallback((O,De)=>{Bt({action:De,txHash:O.txHash,pendingLabel:h0(O,De),successNote:b0(O,De),wait:async()=>{await E?.(O)},onFailed:re=>ml(V,{message:re,txHash:O.txHash})})&&ml(Yt,O)},[V,Yt,Bt,E]),Rn=Ke.useCallback(O=>{let De=yt?.waitForReceipt;Bt({action:"stake",txHash:O.txHash,pendingLabel:"Staking",successNote:`${O.amountText} ${Ge?.symbol??"ONEUSD"} staked`,wait:async()=>{if(!De)return;if((await De({chainId:O.chainId,hash:O.txHash})).status!=="success")throw new Error("Transaction reverted.")}})},[yt,Ge?.symbol,Bt]);return(0,se.jsx)(Me,{feature:"get_one_usd",children:(0,se.jsxs)("div",{className:k,"data-theme":g,"data-gou-mode":h,children:[(0,se.jsxs)(br,{theme:g,mobileBreakpoint:x,drawerDirection:y,dialogWidth:f,drawerMaxWidth:c,drawerMinWidth:b,open:G,onOpenChange:M,children:[!N&&ut&&(h==="button"||!Q)&&(0,se.jsxs)(fn,{type:"button",className:"gou-fab",style:w,"data-trigger-mode":h,"data-icon-only":ft?"true":"false",onClick:lt,disabled:!!Q,"aria-label":`Get ${rt}`,"data-track":"fab_click",children:[h==="floating"&&(0,se.jsxs)("span",{className:"gou-tooltip",children:["Choose how to get ",rt]}),(0,se.jsx)("span",{className:"gou-fab-icon-frame",children:(0,se.jsx)("img",{className:"gou-fab-icon",src:on,alt:""})}),(0,se.jsxs)("span",{className:"gou-fab-label gou-fab-trigger-copy",children:[(0,se.jsxs)("span",{children:["Get ",rt]}),Ot!==null&&(0,se.jsx)("span",{className:"gou-fab-apr",children:Xi(Ot)})]})]}),Q&&(0,se.jsxs)("div",{className:"gou-fab gou-fab-status",style:h==="floating"?w:void 0,"data-floating-status":"true","data-icon-only":"false","data-tx-phase":Q.phase,role:"status","aria-live":"polite","aria-label":Q.phase==="pending"?`${Q.label} transaction in progress`:Q.label,children:[(0,se.jsxs)("span",{className:"gou-fab-icon-frame",children:[(0,se.jsx)("img",{className:"gou-fab-icon",src:on,alt:""}),Q.phase==="pending"&&(0,se.jsx)("span",{className:"gou-fab-progress-ring","aria-hidden":"true"})]}),(0,se.jsx)("span",{className:"gou-fab-label",children:Q.phase==="pending"?(0,se.jsxs)(se.Fragment,{children:[Q.label,(0,se.jsxs)("span",{className:"gou-fab-dots","aria-hidden":"true",children:[(0,se.jsx)("span",{children:"."}),(0,se.jsx)("span",{children:"."}),(0,se.jsx)("span",{children:"."})]})]}):Q.label})]}),(0,se.jsx)(wr,{ariaTitle:`Get ${rt}`,className:`gou-shell gou-chooser ${C??""}`,children:(0,se.jsxs)("div",{className:"gou-chooser-body",children:[(0,se.jsx)("button",{type:"button",className:"gou-close",onClick:()=>M(!1),"aria-label":"Close",children:(0,se.jsx)(pl,{})}),(0,se.jsxs)("header",{className:"gou-intro",children:[(0,se.jsxs)("h2",{children:["Get ",rt]}),z&&(0,se.jsxs)("a",{className:"gou-intro-link",href:Le,target:"_blank",rel:"noopener noreferrer","aria-label":"What is ONEUSD? Opens in a new tab","data-track":"oneusd_learn_more",children:[(0,se.jsx)(nf,{size:16,className:"gou-intro-link-icon"}),(0,se.jsx)("span",{children:"What is ONEUSD?"})]})]}),(0,se.jsx)("ul",{className:"gou-actions",children:It.map(({id:O,label:De,eta:qe,Icon:re})=>{let Te=O==="swap"?`Swap the ${$e.fromTokens[0]?.symbol??"ONE"} you already hold`:O==="bridge"?`Bridge USDT to ${rt}`:O==="stake"?`Deposit ${rt} to receive ${So}`:"Deposit from any chain or exchange",U=O==="swap"?n?.swap.feeDelegated:O==="bridge"?n?.bridge.feeDelegated:!1,Oe=Xo(O,Ce),$=O==="stake"&&Tt,Pe=O==="stake"&&Oe&&!$&&!nn,In=Oe&&!Pe&&!$;return(0,se.jsx)("li",{children:(0,se.jsxs)("button",{type:"button",className:"gou-action",onClick:()=>nt(O),disabled:!In,"data-supported":In?"true":"false","data-track":"action_select","data-track-id":O,children:[(0,se.jsx)("span",{className:"gou-action-icon",children:(0,se.jsx)(re,{})}),(0,se.jsxs)("span",{className:"gou-action-copy",children:[(0,se.jsxs)("span",{className:"gou-action-title",children:[(0,se.jsx)("span",{children:De}),U&&In&&(0,se.jsx)("span",{className:"gou-badge",children:"Fee Delegated"}),!Oe&&(0,se.jsx)("span",{className:"gou-badge","data-tone":"muted",children:"Update required"}),Pe&&(0,se.jsx)("span",{className:"gou-badge","data-tone":"muted",children:"Coming soon"})]}),(0,se.jsx)("span",{className:"gou-action-description",children:Oe?Pe?"Staking is not available in this environment yet":qe?`${Te} \xB7 ${qe}`:Te:"Update the app to use this option"})]}),(0,se.jsx)(cl,{className:"gou-action-chevron"})]})},O)})})]})})]}),(0,se.jsx)(br,{theme:g,mobileBreakpoint:x,drawerDirection:y,dialogWidth:f,drawerMaxWidth:c,drawerMinWidth:b,open:!!Rt,onOpenChange:O=>{O||le(null)},children:(0,se.jsx)(wr,{ariaTitle:`${Rt==="bridge"?"Bridge":"Swap"} to ${rt}`,className:`gou-shell gou-execution ${C??""}`,children:an?(0,se.jsx)(go,{...ve,env:s,variant:"embedded",title:Rt==="bridge"?"Bridge":"Swap",feeDelegated:n?.swap.feeDelegated,walletAddress:e??"",isConnected:!!e,onRequestConnect:()=>Et(Rt??"swap"),tokens:Xe.fromTokens,initialFromToken:Xe.fromTokens[0],initialToToken:Xe.targetToken,getToTokens:sn,onClose:()=>le(null),onBackToWallet:()=>{le(null),M(!0)},onSubmitted:O=>{Cn(O,Rt??"swap")},onSuccess:O=>{ml(ln,O)},onFailed:O=>{ml(V,O),Ze({name:"failure",action:Rt??"swap",message:O.message})}},`${Rt}:${Xe.fromTokens.map(O=>`${O.chainId}:${O.address}`).join(",")}`):(0,se.jsx)(A0,{loading:r||!n})})}),(0,se.jsx)(br,{theme:g,mobileBreakpoint:x,drawerDirection:y,dialogWidth:f,drawerMaxWidth:c,drawerMinWidth:b,open:j==="stake",onOpenChange:O=>{O||le(null)},children:(0,se.jsx)(wr,{ariaTitle:`Stake ${rt}`,className:`gou-shell gou-chooser ${C??""}`,children:j==="stake"&&yt&&Pt&&Ge?(0,se.jsx)(I0,{env:fe,walletAddress:e,walletChainId:i?.walletChainId??a?.walletChainId,token:Ge,vaultAddress:Pt,ports:yt,locked:!!Q,onRequestConnect:()=>Et("stake"),onBack:()=>{le(null),M(!0)},onClose:()=>le(null),onSubmitted:Rn,onFailed:O=>Ze({name:"failure",action:"stake",message:O})}):(0,se.jsx)(A0,{loading:r||!n})})}),oe&&(0,se.jsx)(Yo,{...ot,environment:ot.environment??s,theme:ot.theme??g,mobileBreakpoint:ot.mobileBreakpoint??x,drawerDirection:ot.drawerDirection??y,dialogWidth:ot.dialogWidth??f,drawerMaxWidth:ot.drawerMaxWidth??c,drawerMinWidth:ot.drawerMinWidth??b,walletAddress:e,open:j==="transfer",onOpenChange:O=>{O||le(null)},requireWalletConnection:!0,showRecovery:ot.showRecovery??!0,showRecipientInput:!1,hideAmount:!0,targetTokens:[d],defaultTarget:d,onRequestConnect:()=>Et("transfer"),onDeposited:O=>{Ne?.(O),Ze({name:"success",action:"transfer",txHash:O})},onError:O=>{ze?.(O),Ze({name:"failure",action:"transfer",message:O.message})},children:(0,se.jsx)(Yo.Content,{})})]})})}var vr=H(require("react"),1),j0=H(require("@radix-ui/react-dialog"),1),W0=require("vaul");var gl=require("react"),hl=(0,gl.createContext)(null);function Ka(){let e=(0,gl.useContext)(hl);if(!e)throw new Error("WalletConnectModal compound components must be used within <WalletConnectModal>");return e}var To=require("react");function Za(){let[e,t]=(0,To.useState)([]),[n,r]=(0,To.useState)(!0);(0,To.useEffect)(()=>{if(typeof window>"u"){r(!1);return}let a=[],i=l=>{let{info:d}=l.detail;d?.rdns&&!a.some(p=>p.rdns===d.rdns)&&(a.push({rdns:d.rdns,name:d.name,icon:d.icon}),t([...a]))};window.addEventListener("eip6963:announceProvider",i),window.addEventListener("eip6963:crossAnnounceProvider",i),window.dispatchEvent(new Event("eip6963:requestProvider")),window.dispatchEvent(new Event("eip6963:crossRequestProvider"));let s=setTimeout(()=>r(!1),500);return()=>{window.removeEventListener("eip6963:announceProvider",i),window.removeEventListener("eip6963:crossAnnounceProvider",i),clearTimeout(s)}},[]);let o=(0,To.useCallback)(a=>e.some(i=>i.rdns===a),[e]);return{wallets:e,isDetected:o,isLoading:n}}var M0=H(require("@radix-ui/react-dialog"),1),L0=require("vaul");var bl=require("react/jsx-runtime");function D0({asChild:e,children:t}){let{isMobile:n}=Ka(),r=n?L0.Drawer.Trigger:M0.Trigger;return(0,bl.jsx)(Me,{feature:"wallet_connect",children:(0,bl.jsx)(r,{asChild:e??t!=null,children:t??(0,bl.jsx)("button",{type:"button","data-track":"open",children:"Connect Wallet"})})})}var z0=require("react"),F0=require("@nexus-cross/crossx-design-system"),xr=H(require("@radix-ui/react-dialog"),1),Xa=require("vaul");var de=require("react/jsx-runtime");function P0(e,t){Je("connect","wallet_selected",{tags:{item_id:e}}),Qu(e);let n=t?.();n instanceof Promise&&n.then(()=>Je("connect","connected"),r=>Je("connect","connected",{status:"failure",reason:Nn(r)}))}function A2({wallet:e,detected:t,onConnect:n}){let r=()=>{if(e.installUrl&&!t){window.open(e.installUrl,"_blank","noopener,noreferrer");return}n()},o=e.icon,a=e.featured===!0;return(0,de.jsxs)("button",{type:"button",className:Ie("wcm-wallet-item",a&&"wcm-wallet-item--featured"),"data-track":"wallet_item_click","data-track-id":e.id,onClick:r,children:[(0,de.jsxs)("div",{className:"wcm-wallet-item-left",children:[(0,de.jsx)("div",{className:"wcm-wallet-icon",children:(0,de.jsx)(o,{})}),(0,de.jsxs)("div",{className:"wcm-wallet-name-row",children:[(0,de.jsx)("span",{className:"wcm-wallet-name",children:e.name}),e.badge&&(0,de.jsx)("span",{className:"wcm-wallet-badge",children:e.badge})]})]}),e.installUrl&&(t?(0,de.jsx)("span",{className:"wcm-installed-label",children:"Installed"}):(0,de.jsx)("span",{className:"wcm-install-btn",children:"Install"}))]})}function M2({social:e,onSignIn:t}){let n=e.icon,r=`Sign in with ${e.name}`;return(0,de.jsxs)("button",{type:"button",className:"wcm-social-item","data-provider":e.id,"data-track":"social_provider_click","data-track-id":e.id,onClick:t,"aria-label":r,children:[(0,de.jsx)("span",{className:"wcm-social-icon",children:(0,de.jsx)(n,{})}),(0,de.jsx)("span",{className:"wcm-social-name",children:r})]})}function O0(){let{wallets:e,activeWalletIds:t,socialProviders:n,activeSocialIds:r,termsUrl:o,privacyUrl:a,isDetected:i,close:s,isMobile:l}=Ka(),d=t.filter(u=>{let g=ad(u).visibility;return!g||g==="always"?!0:g==="desktop-only"?!l:g==="mobile-only"?l:!0}),p=r.length>0,h=d.length>0;return(0,de.jsxs)(de.Fragment,{children:[(0,de.jsxs)("div",{className:"wcm-header",children:[(0,de.jsxs)("div",{className:"wcm-header-text",children:[(0,de.jsx)("h2",{className:"wcm-title",children:F0.WALLET_LABELS.default}),!l&&(0,de.jsx)("p",{className:"wcm-subtitle",children:"Sign in instantly with your social account"})]}),(0,de.jsx)("button",{type:"button",className:"wcm-close-btn","data-track":"close",onClick:s,"aria-label":"Close",children:(0,de.jsx)(Gu,{})})]}),(0,de.jsxs)("div",{className:"wcm-body",children:[p&&(0,de.jsxs)(de.Fragment,{children:[!l&&(0,de.jsxs)("div",{className:"wcm-section-header",children:[(0,de.jsx)("span",{className:"wcm-section-title",children:"Social Account Wallet Connect"}),(0,de.jsx)("span",{className:"wcm-recommended-badge",children:"Recommended"})]}),(0,de.jsx)("div",{className:"wcm-social-grid",children:r.map(u=>{let g=Hu(u);return(0,de.jsx)(M2,{social:g,onSignIn:()=>{P0(u,n[u]),s()}},u)})}),h&&(0,de.jsxs)("div",{className:"wcm-separator",children:[(0,de.jsx)("div",{className:"wcm-separator-line"}),(0,de.jsx)("span",{className:"wcm-separator-text",children:"Other Wallets"}),(0,de.jsx)("div",{className:"wcm-separator-line"})]})]}),h&&(0,de.jsx)("div",{className:"wcm-wallet-list",children:d.map(u=>{let g=ad(u),x=g.rdns?i(g.rdns):!1;return(0,de.jsx)(A2,{wallet:g,detected:x,onConnect:()=>{P0(u,e[u]),s()}},u)})}),(0,de.jsxs)("p",{className:"wcm-terms",children:["By continuing, you agree to NEXUS"," ",(0,de.jsx)(B0,{href:o,track:"terms_link",children:"Terms of Service"})," ","and consent to its"," ",(0,de.jsx)(B0,{href:a,track:"privacy_link",children:"Privacy Policy"}),"."]})]})]})}function B0({href:e,track:t,children:n}){return e?(0,de.jsx)("a",{className:"wcm-terms-link",href:e,target:"_blank",rel:"noopener noreferrer","data-track":t,children:n}):(0,de.jsx)("span",{className:"wcm-terms-link",children:n})}function U0({className:e}){let{isMobile:t,theme:n,portalStyle:r,open:o}=Ka();return(0,z0.useEffect)(()=>{o&&Je("connect","opened")},[o]),t?(0,de.jsx)(Me,{feature:"wallet_connect",children:(0,de.jsxs)(Xa.Drawer.Portal,{children:[(0,de.jsx)(Xa.Drawer.Overlay,{className:"wcm-overlay"}),(0,de.jsxs)(Xa.Drawer.Content,{className:Ie("wcm-drawer-content",e),"data-theme":n,style:r,children:[(0,de.jsx)(Xa.Drawer.Title,{className:"wcm-sr-only",children:"Connect Wallet"}),(0,de.jsx)("div",{className:"wcm-drawer-handle"}),(0,de.jsx)("div",{className:"wcm-drawer-body",children:(0,de.jsx)(O0,{})})]})]})}):(0,de.jsx)(Me,{feature:"wallet_connect",children:(0,de.jsxs)(xr.Portal,{children:[(0,de.jsx)(xr.Overlay,{className:"wcm-overlay"}),(0,de.jsxs)(xr.Content,{className:Ie("wcm-dialog-content",e),"data-theme":n,style:r,children:[(0,de.jsx)(xr.Title,{className:"wcm-sr-only",children:"Connect Wallet"}),(0,de.jsx)(xr.Description,{className:"wcm-sr-only",children:"Sign in with a social provider or pick a wallet to connect."}),(0,de.jsx)("div",{className:"wcm-dialog-body",children:(0,de.jsx)(O0,{})})]})]})})}he(`.wcm-overlay{position:fixed;inset:0;z-index:100000;background:var(--ds-overlay-dim, rgba(0, 0, 0, .5));-webkit-backdrop-filter:var(--ds-bg-blur-7, blur(3.5px));backdrop-filter:var(--ds-bg-blur-7, blur(3.5px))}.wcm-dialog-content{-webkit-font-smoothing:antialiased;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:100001;width:var(--wcm-dialog-width, 480px);max-height:90vh;overflow:hidden;display:flex;flex-direction:column;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, #00000012);border-radius:24px;box-shadow:var(--ds-shadow-modal, 0 4px 30px -1px rgba(0, 0, 0, .15));outline:none;animation:wcm-dialog-show .2s ease-out;font-family:inherit}.wcm-dialog-content[data-state=closed]{animation:wcm-dialog-hide .15s ease-in}.wcm-dialog-body,.wcm-drawer-body{scrollbar-width:thin;scrollbar-color:var(--ds-border-medium, rgba(0, 0, 0, .18)) transparent}.wcm-dialog-body::-webkit-scrollbar,.wcm-drawer-body::-webkit-scrollbar{width:4px}.wcm-dialog-body::-webkit-scrollbar-track,.wcm-drawer-body::-webkit-scrollbar-track{background:transparent}.wcm-dialog-body::-webkit-scrollbar-thumb,.wcm-drawer-body::-webkit-scrollbar-thumb{background:var(--ds-border-medium, rgba(0, 0, 0, .18));border-radius:4px}.wcm-drawer-content{-webkit-font-smoothing:antialiased;position:fixed;bottom:0;left:0;right:0;z-index:100001;width:100%;max-width:var(--wcm-drawer-max-width, none);min-width:var(--wcm-drawer-min-width, 0);max-height:85dvh;margin:0 auto;display:flex;flex-direction:column;background:var(--ds-surface-default, #ffffff);border:1px solid var(--ds-border-default, #00000012);border-top-left-radius:16px;border-top-right-radius:16px;outline:none;font-family:inherit;box-sizing:border-box}.wcm-drawer-content[data-vaul-drawer-direction=right]{inset:0 0 0 auto;max-height:100vh;width:var(--wcm-drawer-max-width, 400px);max-width:100vw;border-radius:16px 0 0 16px}.wcm-drawer-content[data-vaul-drawer-direction=left]{inset:0 auto 0 0;max-height:100vh;width:var(--wcm-drawer-max-width, 400px);max-width:100vw;border-radius:0 16px 16px 0}.wcm-drawer-content[data-vaul-drawer-direction=top]{inset:0 0 auto;border-radius:0 0 16px 16px}.wcm-drawer-handle{width:60px;height:4px;border-radius:999px;background:var(--ds-border-medium, rgba(0, 0, 0, .18));margin:12px auto 8px;flex-shrink:0}.wcm-drawer-content[data-vaul-drawer-direction=left] .wcm-drawer-handle,.wcm-drawer-content[data-vaul-drawer-direction=right] .wcm-drawer-handle{display:none}.wcm-dialog-body,.wcm-drawer-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}.wcm-drawer-body{overscroll-behavior:contain}.wcm-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:24px;border-bottom:1px solid var(--ds-border-default, rgba(0, 0, 0, .07))}.wcm-header-text{display:flex;flex-direction:column;gap:4px;min-width:0}.wcm-title{font-family:Inter,sans-serif;font-weight:600;font-size:20px;line-height:1.25;letter-spacing:0;color:var(--ds-content-highest, #000000);margin:0}.wcm-subtitle{font-family:Inter,sans-serif;font-weight:400;font-size:14px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));margin:0}.wcm-close-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;border:none;background:transparent;color:var(--ds-content-low, #00000066);cursor:pointer;padding:0;transition:opacity .15s ease}.wcm-close-btn:hover{opacity:.6}.wcm-close-btn>svg{width:24px;height:24px}.wcm-divider{display:none}.wcm-body{display:flex;flex-direction:column;gap:16px;padding:24px}.wcm-section-header{display:flex;align-items:center;gap:8px;width:100%}.wcm-section-title{font-family:Inter,sans-serif;font-weight:600;font-size:16px;line-height:1;letter-spacing:0;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wcm-recommended-badge{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;background:var(--ds-accent-primary-low, #f5f3ff);border-radius:9999px;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:var(--ds-accent-primary-high, #7346f3);white-space:nowrap}.wcm-social-grid{display:grid;gap:8px;width:100%}.wcm-dialog-body .wcm-social-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.wcm-drawer-body .wcm-social-grid{grid-template-columns:1fr}.wcm-social-item{display:flex;background:var(--ds-surface-medium, #f5f7fa);border:none;border-radius:12px;cursor:pointer;transition:none;font-family:inherit;color:var(--ds-content-high, rgba(0, 0, 0, .85))}.wcm-social-item:hover{background:#2e3544!important}:root[data-ds-theme=light] .wcm-social-item:hover{background:#eff3f8!important}.wcm-social-item[data-provider=apple] .wcm-social-icon{color:#000}[data-theme=dark] .wcm-social-item[data-provider=apple] .wcm-social-icon{color:#fff}.wcm-dialog-body .wcm-social-item{flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:16px}.wcm-drawer-body .wcm-social-item{flex-direction:row;align-items:center;justify-content:flex-start;gap:12px;padding:16px}.wcm-social-icon{flex-shrink:0;width:32px;height:32px;display:flex;align-items:center;justify-content:center}.wcm-social-icon>svg{width:32px;height:32px}.wcm-social-name{font-family:Inter,sans-serif;font-weight:600;font-size:14px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wcm-separator{display:flex;align-items:center;gap:12px;width:100%}.wcm-separator-line{flex:1;height:1px;background:var(--ds-border-default, rgba(0, 0, 0, .07))}.wcm-separator-text{font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.wcm-wallet-list{display:flex;flex-direction:column;gap:8px}.wcm-wallet-item{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:20px 16px;background:var(--ds-surface-medium, #f5f7fa);border:none;border-radius:12px;cursor:pointer;text-align:left;transition:none;font-family:inherit}.wcm-wallet-item:hover{background:#2e3544!important}:root[data-ds-theme=light] .wcm-wallet-item:hover{background:#eff3f8!important}.wcm-wallet-item-left{display:flex;align-items:center;gap:8px;flex:1;min-width:0}.wcm-wallet-icon{flex-shrink:0;width:28px;height:28px;display:flex;align-items:center;justify-content:center}.wcm-wallet-icon>svg,.wcm-wallet-icon>img{width:28px;height:28px;border-radius:0;object-fit:cover}.wcm-wallet-name-row{display:flex;align-items:center;gap:8px;min-width:0}.wcm-wallet-name{font-family:Inter,sans-serif;font-weight:600;font-size:16px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-high, rgba(0, 0, 0, .85));white-space:nowrap}.wcm-wallet-badge{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;background:var(--ds-system-purple-low, #f5f3ff);border:.5px solid var(--ds-system-purple-default, #7e54f4);border-radius:9999px;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:var(--ds-system-purple-high, #7346f3);white-space:nowrap}.wcm-install-btn{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;background:var(--ds-accent-primary-default, #7e54f4);border-radius:6px;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:var(--ds-accent-primary-on, #ffffff);white-space:nowrap}.wcm-installed-label{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:1;letter-spacing:0;color:var(--ds-content-low, rgba(0, 0, 0, .4));white-space:nowrap}.wcm-terms{font-family:Inter,sans-serif;font-weight:400;font-size:12px;line-height:1.5;letter-spacing:-.01em;color:var(--ds-content-medium, rgba(0, 0, 0, .65));text-align:center;margin:0}.wcm-terms-link{color:var(--ds-content-high, rgba(0, 0, 0, .85));text-decoration:underline;text-underline-position:from-font}.wcm-terms-link:hover{color:var(--ds-content-high, rgba(0, 0, 0, .85));text-decoration:underline}.wcm-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}
23
23
  `);he(`@keyframes wcm-overlay-show{0%{opacity:0}to{opacity:1}}@keyframes wcm-overlay-hide{0%{opacity:1}to{opacity:0}}@keyframes wcm-dialog-show{0%{opacity:0;transform:translate(-50%,-48%) scale(.96)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}@keyframes wcm-dialog-hide{0%{opacity:1;transform:translate(-50%,-50%) scale(1)}to{opacity:0;transform:translate(-50%,-48%) scale(.96)}}
24
- `);var Xo=require("react/jsx-runtime"),b2={};function w2({wallets:e,socialProviders:t=b2,termsUrl:n,privacyUrl:r,theme:o="dark",mobileBreakpoint:a=768,drawerDirection:i="bottom",dialogWidth:s,drawerMaxWidth:l,drawerMinWidth:d,style:p,open:w,onOpenChange:u,children:h}){let x=Do(`(max-width: ${a}px)`),[y,f]=xr.useState(!1),c=w!==void 0,b=c?w:y,g=xr.useCallback(M=>{c||f(M),u?.(M)},[c,u]),v=xr.useCallback(()=>g(!1),[g]);Vn(b,v);let{isDetected:C}=Ka(),N=xr.useMemo(()=>Object.keys(e),[e]),I=xr.useMemo(()=>Object.keys(t),[t]),R=xr.useMemo(()=>{let M={};return s&&(M["--wcm-dialog-width"]=s),l&&(M["--wcm-drawer-max-width"]=l),d&&(M["--wcm-drawer-min-width"]=d),{...M,...p}},[s,l,d,p]),S=xr.useMemo(()=>({theme:o,isMobile:x,open:b,setOpen:g,close:v,wallets:e,activeWalletIds:N,socialProviders:t,activeSocialIds:I,termsUrl:n??Ei,privacyUrl:r??Ai,isDetected:C,portalStyle:R}),[o,x,b,g,v,e,N,t,I,n,r,C,R]),E=(0,Xo.jsx)("div",{"data-theme":o,style:R,children:h});return x?(0,Xo.jsx)(fl.Provider,{value:S,children:(0,Xo.jsx)(L0.Drawer.Root,{direction:i,open:b,onOpenChange:g,noBodyStyles:!0,children:E},"drawer")}):(0,Xo.jsx)(fl.Provider,{value:S,children:(0,Xo.jsx)(M0.Root,{open:b,onOpenChange:g,children:E})})}var uc=Object.assign(w2,{Trigger:R0,Content:A0});var P0=require("@nexus-cross/crossx-design-system"),O0=_(require("react"),1);he(`.cb-button{--cb-bg: var(--ds-accent-gradient, linear-gradient(196deg, #ff2589 16%, #ff823d 84%));--cb-bg-hover: var(--cb-bg);--cb-color: #ffffff;--cb-border: none;--cb-radius: 8px;--cb-height: 36px;--cb-padding: 8px 16px;--cb-font-family: Inter, system-ui, -apple-system, sans-serif;--cb-font-size: 14px;--cb-font-weight: 500;--cb-line-height: 1.5;--cb-letter-spacing: -.01em;--cb-gap: 8px;--cb-transition: opacity .15s;--cb-loading-opacity: .7;--cb-press-scale: .95;--cb-icon-size: 18px;--cb-spinner-size: 18px;--cb-spinner-thumb: currentColor;--cb-spinner-track: color-mix(in srgb, currentColor 20%, transparent)}.cb-pill{--cb-pill-bg: var(--ds-surface-default, #ffffff);--cb-pill-bg-hover: var(--cb-pill-bg);--cb-pill-color: var(--ds-content-high, rgba(0, 0, 0, .85));--cb-pill-border: 1px solid var(--ds-border-default, rgba(0, 0, 0, .07));--cb-pill-border-hover: 1px solid var(--ds-border-medium, rgba(0, 0, 0, .18));--cb-pill-radius: 8px;--cb-pill-height: 36px;--cb-pill-padding: 1px 13px;--cb-pill-press-scale: .95;--cb-pill-font-family: Inter, system-ui, -apple-system, sans-serif;--cb-pill-font-size: 14px;--cb-pill-font-weight: 500;--cb-pill-line-height: 1.5;--cb-pill-gap: 8px;--cb-pill-icon-size: 18px;--cb-pill-icon-placeholder-bg: var(--ds-surface-medium, #f5f7fa);--cb-pill-address-font: Inter, system-ui, -apple-system, sans-serif;--cb-pill-address-font-size: 14px;--cb-pill-address-letter-spacing: -.01em}
24
+ `);var Jo=require("react/jsx-runtime"),L2={};function D2({wallets:e,socialProviders:t=L2,termsUrl:n,privacyUrl:r,theme:o="dark",mobileBreakpoint:a=768,drawerDirection:i="bottom",dialogWidth:s,drawerMaxWidth:l,drawerMinWidth:d,style:p,open:h,onOpenChange:u,children:g}){let x=Po(`(max-width: ${a}px)`),[y,f]=vr.useState(!1),c=h!==void 0,b=c?h:y,w=vr.useCallback(A=>{c||f(A),u?.(A)},[c,u]),k=vr.useCallback(()=>w(!1),[w]);Qn(b,k);let{isDetected:C}=Za(),N=vr.useMemo(()=>Object.keys(e),[e]),T=vr.useMemo(()=>Object.keys(t),[t]),R=vr.useMemo(()=>{let A={};return s&&(A["--wcm-dialog-width"]=s),l&&(A["--wcm-drawer-max-width"]=l),d&&(A["--wcm-drawer-min-width"]=d),{...A,...p}},[s,l,d,p]),S=vr.useMemo(()=>({theme:o,isMobile:x,open:b,setOpen:w,close:k,wallets:e,activeWalletIds:N,socialProviders:t,activeSocialIds:T,termsUrl:n??Mi,privacyUrl:r??Li,isDetected:C,portalStyle:R}),[o,x,b,w,k,e,N,t,T,n,r,C,R]),E=(0,Jo.jsx)("div",{"data-theme":o,style:R,children:g});return x?(0,Jo.jsx)(hl.Provider,{value:S,children:(0,Jo.jsx)(W0.Drawer.Root,{direction:i,open:b,onOpenChange:w,noBodyStyles:!0,children:E},"drawer")}):(0,Jo.jsx)(hl.Provider,{value:S,children:(0,Jo.jsx)(j0.Root,{open:b,onOpenChange:w,children:E})})}var gc=Object.assign(D2,{Trigger:D0,Content:U0});var H0=require("@nexus-cross/crossx-design-system"),_0=H(require("react"),1);he(`.cb-button{--cb-bg: var(--ds-accent-primary-default, #7e54f4);--cb-bg-hover: var(--ds-accent-primary-high, #7346f3);--cb-color: var(--ds-accent-primary-on, #ffffff);--cb-border: none;--cb-radius: 8px;--cb-height: 36px;--cb-padding: 8px 16px;--cb-font-family: Inter, system-ui, -apple-system, sans-serif;--cb-font-size: 14px;--cb-font-weight: 500;--cb-line-height: 1.5;--cb-letter-spacing: -.01em;--cb-gap: 8px;--cb-transition: opacity .15s;--cb-loading-opacity: .7;--cb-press-scale: .95;--cb-icon-size: 18px;--cb-spinner-size: 18px;--cb-spinner-thumb: currentColor;--cb-spinner-track: color-mix(in srgb, currentColor 20%, transparent)}.cb-pill{--cb-pill-bg: var(--ds-surface-default, #ffffff);--cb-pill-bg-hover: var(--cb-pill-bg);--cb-pill-color: var(--ds-content-high, rgba(0, 0, 0, .85));--cb-pill-border: 1px solid var(--ds-border-default, rgba(0, 0, 0, .07));--cb-pill-border-hover: 1px solid var(--ds-border-medium, rgba(0, 0, 0, .18));--cb-pill-radius: 8px;--cb-pill-height: 36px;--cb-pill-padding: 1px 13px;--cb-pill-press-scale: .95;--cb-pill-font-family: Inter, system-ui, -apple-system, sans-serif;--cb-pill-font-size: 14px;--cb-pill-font-weight: 500;--cb-pill-line-height: 1.5;--cb-pill-gap: 8px;--cb-pill-icon-size: 18px;--cb-pill-icon-placeholder-bg: var(--ds-surface-medium, #f5f7fa);--cb-pill-address-font: Inter, system-ui, -apple-system, sans-serif;--cb-pill-address-font-size: 14px;--cb-pill-address-letter-spacing: -.01em}
25
25
  `);he(`.cb-button{-webkit-font-smoothing:antialiased;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;height:var(--cb-height);gap:var(--cb-gap);padding:var(--cb-padding);border-radius:var(--cb-radius);border:var(--cb-border);background:var(--cb-bg);color:var(--cb-color);font-family:var(--cb-font-family);font-size:var(--cb-font-size);font-weight:var(--cb-font-weight);line-height:var(--cb-line-height);letter-spacing:var(--cb-letter-spacing);cursor:pointer;transition:var(--cb-transition)}.cb-button:hover:not(:disabled){background:var(--cb-bg-hover)}.cb-button:active:not(:disabled){transform:scale(var(--cb-press-scale))}.cb-button:disabled,.cb-button[aria-busy=true]{cursor:default;opacity:var(--cb-loading-opacity)}.cb-spinner{display:inline-block;width:var(--cb-spinner-size);height:var(--cb-spinner-size);border:2px solid var(--cb-spinner-track);border-top-color:var(--cb-spinner-thumb);border-radius:50%;animation:cb-spin .6s linear infinite;flex-shrink:0}.cb-button-icon{width:var(--cb-icon-size);height:var(--cb-icon-size);flex-shrink:0}.cb-button-label{white-space:nowrap}.cb-pill{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;height:var(--cb-pill-height);gap:var(--cb-pill-gap);padding:var(--cb-pill-padding);border-radius:var(--cb-pill-radius);border:var(--cb-pill-border);background:var(--cb-pill-bg);color:var(--cb-pill-color);font-family:var(--cb-pill-font-family);font-size:var(--cb-pill-font-size);font-weight:var(--cb-pill-font-weight);line-height:var(--cb-pill-line-height);cursor:pointer}.cb-pill:hover{background:var(--cb-pill-bg-hover)}.cb-pill:active:not(:disabled){transform:scale(var(--cb-pill-press-scale))}.cb-pill-icon{width:var(--cb-pill-icon-size);height:var(--cb-pill-icon-size);border-radius:50%;object-fit:contain;flex-shrink:0;background:transparent}[data-theme=dark] .cb-pill-icon[data-provider=apple]{filter:invert(1)}.cb-pill-icon-placeholder{display:inline-block;width:var(--cb-pill-icon-size);height:var(--cb-pill-icon-size);border-radius:50%;background:var(--cb-pill-icon-placeholder-bg);flex-shrink:0}.cb-pill-address{font-family:var(--cb-pill-address-font);font-size:var(--cb-pill-address-font-size);letter-spacing:var(--cb-pill-address-letter-spacing);white-space:nowrap}@media(max-width:767.98px){.cb-button,.cb-pill{width:36px;min-width:36px;padding:0}.cb-button{height:36px}.cb-button-label,.cb-pill-address{display:none}}@keyframes cb-spin{to{transform:rotate(360deg)}}
26
- `);var y2='<svg preserveAspectRatio="xMidYMid meet" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_72837_24069)"><mask id="mask0_72837_24069" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="100" height="100"><path d="M50 0C10.5289 0 0 10.5289 0 50C0 89.4711 10.5289 100 50 100C89.4711 100 100 89.4711 100 50C100 10.5289 89.4711 0 50 0Z" fill="white"/></mask><g mask="url(#mask0_72837_24069)"><path d="M99.9501 0.0499268H0V100H99.9501V0.0499268Z" fill="url(#paint0_linear_72837_24069)"/><path d="M34.9302 100H99.9751V19.0619L34.9302 60.7286V100Z" fill="url(#paint1_linear_72837_24069)"/><path d="M34.9301 100H0V23.8024L34.9301 60.7285V100Z" fill="url(#paint2_linear_72837_24069)"/></g><g filter="url(#filter0_d_72837_24069)"><path d="M49.9503 21.4821L31.9862 31.8613C28.8176 33.6827 27.7198 37.7745 29.5411 40.9432C31.3625 44.1118 35.4543 45.2096 38.623 43.3883L53.8176 34.6058L46.582 42.3653V72.8044C46.582 76.4721 49.576 79.4661 53.2437 79.4661C56.9114 79.4661 59.9054 76.4721 59.9054 72.8044V27.2455C59.9054 25.9731 59.5062 24.7256 59.0072 23.9022C57.1359 20.7585 53.094 19.6358 49.9254 21.4571L49.9503 21.4821Z" fill="white"/></g></g><defs><filter id="filter0_d_72837_24069" x="7.4286" y="-0.650014" width="87.831" height="115.47" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dx="7.06088" dy="7.06088"/><feGaussianBlur stdDeviation="14.1467"/><feColorMatrix type="matrix" values="0 0 0 0 0.831373 0 0 0 0 0.113725 0 0 0 0 0.356863 0 0 0 0.3 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_72837_24069"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_72837_24069" result="shape"/></filter><linearGradient id="paint0_linear_72837_24069" x1="-11.5768" y1="-12.001" x2="106.562" y2="106.986" gradientUnits="userSpaceOnUse"><stop stop-color="#F3752D"/><stop offset="1" stop-color="#EC1272"/></linearGradient><linearGradient id="paint1_linear_72837_24069" x1="24.9501" y1="23.004" x2="73.6278" y2="64.8453" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><linearGradient id="paint2_linear_72837_24069" x1="62.3503" y1="3.46804" x2="16.3423" y2="63.3732" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><clipPath id="clip0_72837_24069"><rect width="100" height="100" fill="white"/></clipPath></defs></svg>',x2='<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 28 28" fill="none"><g clip-path="url(#m0)"><path d="M26.07 26.93L20.06 25.07L15.53 27.88L12.37 27.88L7.83 25.07L1.83 26.93L0 20.53L1.83 13.44L0 7.44L1.83 0L11.21 5.81H16.69L26.07 0L27.9 7.44L26.07 13.44L27.9 20.53Z" fill="#FF5C16"/><path d="M7.83 20.54L11.96 23.8L7.83 25.07V20.54Z" fill="#FF5C16"/><path d="M20.06 20.54L15.93 23.8L20.06 25.07L20.06 20.54Z" fill="#FF5C16"/><path d="M11.63 15.14L12.78 22.85L11.19 18.56L5.77 17.17L7.83 15.14H11.63Z" fill="#E34807"/><path d="M16.27 15.14L15.12 22.85L16.71 18.56L22.13 17.17L20.07 15.14H16.27Z" fill="#E34807"/><path d="M0 20.53L1.83 13.44H5.76L5.77 17.17L11.19 18.56L12.78 22.85L11.96 23.79L7.83 20.53H0Z" fill="#FF8D5D"/><path d="M27.9 20.53L26.07 13.44H22.14L22.13 17.17L16.71 18.56L15.12 22.85L15.94 23.79L20.07 20.53H27.9Z" fill="#FF8D5D"/><path d="M16.69 5.81H11.21L10.84 9.81L12.78 22.85H15.12L17.06 9.81L16.69 5.81Z" fill="#FF8D5D"/><path d="M15.53 25.34V27.88H12.37V25.34H15.53Z" fill="#C0C4CD"/><path d="M7.83 25.07L12.37 27.88V25.34L11.96 23.79L7.83 25.07Z" fill="#E7EBF6"/><path d="M20.07 25.07L15.53 27.88V25.34L15.94 23.79L20.07 25.07Z" fill="#E7EBF6"/></g><defs><clipPath id="m0"><rect width="28" height="28" fill="#fff"/></clipPath></defs></svg>',v2='<svg width="100%" height="100%" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.23 16.81L20 9.04L27.77 16.81L32.29 12.29L20 0L7.71 12.29L12.23 16.81Z" fill="#F3BA2F"/><path d="M9.04 20L4.52 15.48L0 20L4.52 24.52L9.04 20Z" fill="#F3BA2F"/><path d="M12.23 23.19L20 30.96L27.77 23.19L32.29 27.71L20 40L7.71 27.71L12.23 23.19Z" fill="#F3BA2F"/><path d="M35.48 24.52L40 20L35.48 15.48L30.96 20L35.48 24.52Z" fill="#F3BA2F"/><path d="M24.58 20L20 15.41L16.61 18.8L16.22 19.19L15.42 19.99L20 24.59L24.59 20L24.58 20Z" fill="#F3BA2F"/></svg>',k2='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path fill="#FFC107" d="M43.6 20.5H42V20H24v8h11.3A12 12 0 1 1 24 12c3 0 5.8 1.2 7.9 3l5.7-5.7A20 20 0 1 0 44 24c0-1.2-.1-2.4-.4-3.5z"/><path fill="#FF3D00" d="M6.3 14.7l6.6 4.8A12 12 0 0 1 24 12c3 0 5.8 1.2 7.9 3l5.7-5.7A20 20 0 0 0 6.3 14.7z"/><path fill="#4CAF50" d="M24 44c5.2 0 10-2 13.6-5.2l-6.3-5.3A12 12 0 0 1 12.7 28l-6.5 5A20 20 0 0 0 24 44z"/><path fill="#1976D2" d="M43.6 20.5H42V20H24v8h11.3a12 12 0 0 1-4.1 5.5l6.3 5.3C41 35.7 44 30.3 44 24c0-1.2-.1-2.4-.4-3.5z"/></svg>',C2='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000"><path d="M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.53 4.08zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"/></svg>';function Xa(e){return`data:image/svg+xml,${encodeURIComponent(e)}`}var Ja=Xa(y2),$a=Xa(x2),ei=Xa(v2),ti=Xa(k2),ni=Xa(C2);var qt=require("react/jsx-runtime");function fc({isConnecting:e,address:t,provider:n,providerName:r,accountName:o,sendAccounts:a,onConnect:i,onDisconnect:s,onCopy:l,onSelectWallet:d,onBuy:p,onBuyDisabledMessage:w,label:u="Connect Wallet",connectingLabel:h="Connecting...",disconnectLabel:x,className:y,theme:f="dark",env:c,showBalance:b=!0,showPortfolio:g,drawerDirection:v,modal:C,connectorId:N,style:I,walletInfoStyle:R,sendTransaction:S,getTransactionReceipt:E,estimateGas:M,onReceive:z,onBridge:L,onSend:G,bridgeTokens:A,bridgeHistory:j,getBridgeQuote:le,getBridgeToTokens:oe,getBridgeApproval:ne,approveBridge:V,submitBridge:ee}){let F=y?`cb-button ${y}`:"cb-button",q=y?`cb-pill ${y}`:"cb-pill";if(O0.useEffect(()=>{no(t)},[t]),e)return(0,qt.jsxs)("button",{type:"button",disabled:!0,className:F,style:I,"aria-busy":"true",children:[(0,qt.jsx)("span",{className:"cb-spinner","aria-hidden":"true"}),(0,qt.jsx)("span",{className:"cb-button-label",children:h})]});if(t){let ae=r??S2(n),X=n?N2[n]:void 0;return(0,qt.jsx)(Le,{feature:"connect_button",children:(0,qt.jsxs)(wo,{env:c,theme:f,drawerDirection:v,modal:C,showBalance:b,showPortfolio:g,walletAddress:t,accountName:o,sendAccounts:a,connectorName:r??(n?B0[n]:void 0),connectorId:N,onSelectWallet:d,onCopyAddress:l?(me,ke)=>{ke&&l()}:void 0,onDisconnect:s,disconnectLabel:x,style:R,sendTransaction:S,getTransactionReceipt:E,estimateGas:M,onReceive:z,onBridge:L,onBuy:p,onBuyDisabledMessage:w,onSend:G,bridgeTokens:A,bridgeHistory:j,getBridgeQuote:le,getBridgeToTokens:oe,getBridgeApproval:ne,approveBridge:V,submitBridge:ee,children:[(0,qt.jsx)(wo.Trigger,{asChild:!0,children:(0,qt.jsxs)("button",{type:"button",className:q,"data-track":"wallet_pill_open",style:I,"aria-label":`Connected with ${ae}: ${D0(t)}`,children:[X?(0,qt.jsx)("img",{src:X,alt:"",width:18,height:18,className:"cb-pill-icon","data-provider":n}):(0,qt.jsx)("span",{className:"cb-pill-icon-placeholder","aria-hidden":"true"}),(0,qt.jsx)("span",{className:"cb-pill-address",children:D0(t)})]})}),(0,qt.jsx)(wo.Content,{align:"end",sideOffset:8})]})})}return(0,qt.jsx)(Le,{feature:"connect_button",children:(0,qt.jsxs)("button",{type:"button",onClick:i,className:F,"data-track":"connect_click",style:I,"aria-label":typeof u=="string"?u:"Connect Wallet",children:[(0,qt.jsx)(R2,{}),(0,qt.jsx)("span",{className:"cb-button-label",children:u})]})})}function R2(){return(0,qt.jsxs)("svg",{className:"cb-button-icon",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,qt.jsx)("path",{d:"M3.75 5.25H14.25C15.0784 5.25 15.75 5.92157 15.75 6.75V13.5C15.75 14.3284 15.0784 15 14.25 15H3.75C2.92157 15 2.25 14.3284 2.25 13.5V4.5C2.25 3.67157 2.92157 3 3.75 3H13.5",stroke:"currentColor",strokeWidth:"1.35",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M12 9.75H15.75V12.75H12C11.1716 12.75 10.5 12.0784 10.5 11.25C10.5 10.4216 11.1716 9.75 12 9.75Z",stroke:"currentColor",strokeWidth:"1.35",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M12.75 11.25H12.7575",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}var N2={google:ti,apple:ni,cross:Ja,metamask:$a,binance:ei},B0={google:"Google",apple:"Apple",cross:P0.WALLET_LABELS.default,metamask:"MetaMask",binance:"Binance Wallet"};function S2(e){return e?B0[e]:"Wallet"}function D0(e){return e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`}var z0=_(require("react"),1);he(`.sb-button{--sb-bg: var(--ds-surface-default, #ffffff);--sb-border: var(--ds-border-default, rgba(0, 0, 0, .07));--sb-border-hover: var(--ds-border-default, rgba(0, 0, 0, .07));--sb-color: var(--ds-content-medium, rgba(0, 0, 0, .65));--sb-color-hover: var(--ds-content-high, rgba(0, 0, 0, .85));--sb-radius: 8px;--sb-height: 36px;--sb-padding: 1px 11px;--sb-gap: 4px;--sb-font-size: 14px;--sb-font-weight: 500;--sb-line-height: 21px;--sb-letter-spacing: 0;--sb-blur: 0px;--sb-border-width: 1px;--sb-icon-size: 18px;--sb-icon-hover-rotation: 180deg;--sb-spinner-size: 18px;--sb-spinner-thumb: currentColor;--sb-spinner-track: color-mix(in srgb, currentColor 20%, transparent);--sb-disabled-opacity: .6;--sb-press-scale: .95;--sb-hover-duration: .2s;--sb-icon-duration: .3s;--sb-easing: ease}.sb-button[data-theme=dark]{--sb-bg: var(--ds-surface-default, #1e232e);--sb-border: var(--ds-border-default, #ffffff12);--sb-border-hover: var(--ds-border-medium, #ffffff2e);--sb-color: var(--ds-content-medium, #ffffffa6);--sb-color-hover: var(--ds-content-high, #ffffffd9)}.sb-button[data-theme=light]{--sb-bg: var(--ds-surface-default, #ffffff);--sb-border: var(--ds-border-default, #00000012);--sb-border-hover: var(--ds-border-medium, #0000002e);--sb-color: var(--ds-content-medium, #000000a6);--sb-color-hover: var(--ds-content-high, #000000d9)}
26
+ `);var P2='<svg preserveAspectRatio="xMidYMid meet" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_72837_24069)"><mask id="mask0_72837_24069" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="100" height="100"><path d="M50 0C10.5289 0 0 10.5289 0 50C0 89.4711 10.5289 100 50 100C89.4711 100 100 89.4711 100 50C100 10.5289 89.4711 0 50 0Z" fill="white"/></mask><g mask="url(#mask0_72837_24069)"><path d="M99.9501 0.0499268H0V100H99.9501V0.0499268Z" fill="url(#paint0_linear_72837_24069)"/><path d="M34.9302 100H99.9751V19.0619L34.9302 60.7286V100Z" fill="url(#paint1_linear_72837_24069)"/><path d="M34.9301 100H0V23.8024L34.9301 60.7285V100Z" fill="url(#paint2_linear_72837_24069)"/></g><g filter="url(#filter0_d_72837_24069)"><path d="M49.9503 21.4821L31.9862 31.8613C28.8176 33.6827 27.7198 37.7745 29.5411 40.9432C31.3625 44.1118 35.4543 45.2096 38.623 43.3883L53.8176 34.6058L46.582 42.3653V72.8044C46.582 76.4721 49.576 79.4661 53.2437 79.4661C56.9114 79.4661 59.9054 76.4721 59.9054 72.8044V27.2455C59.9054 25.9731 59.5062 24.7256 59.0072 23.9022C57.1359 20.7585 53.094 19.6358 49.9254 21.4571L49.9503 21.4821Z" fill="white"/></g></g><defs><filter id="filter0_d_72837_24069" x="7.4286" y="-0.650014" width="87.831" height="115.47" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dx="7.06088" dy="7.06088"/><feGaussianBlur stdDeviation="14.1467"/><feColorMatrix type="matrix" values="0 0 0 0 0.831373 0 0 0 0 0.113725 0 0 0 0 0.356863 0 0 0 0.3 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_72837_24069"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_72837_24069" result="shape"/></filter><linearGradient id="paint0_linear_72837_24069" x1="-11.5768" y1="-12.001" x2="106.562" y2="106.986" gradientUnits="userSpaceOnUse"><stop stop-color="#F3752D"/><stop offset="1" stop-color="#EC1272"/></linearGradient><linearGradient id="paint1_linear_72837_24069" x1="24.9501" y1="23.004" x2="73.6278" y2="64.8453" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><linearGradient id="paint2_linear_72837_24069" x1="62.3503" y1="3.46804" x2="16.3423" y2="63.3732" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><clipPath id="clip0_72837_24069"><rect width="100" height="100" fill="white"/></clipPath></defs></svg>',O2='<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 28 28" fill="none"><g clip-path="url(#m0)"><path d="M26.07 26.93L20.06 25.07L15.53 27.88L12.37 27.88L7.83 25.07L1.83 26.93L0 20.53L1.83 13.44L0 7.44L1.83 0L11.21 5.81H16.69L26.07 0L27.9 7.44L26.07 13.44L27.9 20.53Z" fill="#FF5C16"/><path d="M7.83 20.54L11.96 23.8L7.83 25.07V20.54Z" fill="#FF5C16"/><path d="M20.06 20.54L15.93 23.8L20.06 25.07L20.06 20.54Z" fill="#FF5C16"/><path d="M11.63 15.14L12.78 22.85L11.19 18.56L5.77 17.17L7.83 15.14H11.63Z" fill="#E34807"/><path d="M16.27 15.14L15.12 22.85L16.71 18.56L22.13 17.17L20.07 15.14H16.27Z" fill="#E34807"/><path d="M0 20.53L1.83 13.44H5.76L5.77 17.17L11.19 18.56L12.78 22.85L11.96 23.79L7.83 20.53H0Z" fill="#FF8D5D"/><path d="M27.9 20.53L26.07 13.44H22.14L22.13 17.17L16.71 18.56L15.12 22.85L15.94 23.79L20.07 20.53H27.9Z" fill="#FF8D5D"/><path d="M16.69 5.81H11.21L10.84 9.81L12.78 22.85H15.12L17.06 9.81L16.69 5.81Z" fill="#FF8D5D"/><path d="M15.53 25.34V27.88H12.37V25.34H15.53Z" fill="#C0C4CD"/><path d="M7.83 25.07L12.37 27.88V25.34L11.96 23.79L7.83 25.07Z" fill="#E7EBF6"/><path d="M20.07 25.07L15.53 27.88V25.34L15.94 23.79L20.07 25.07Z" fill="#E7EBF6"/></g><defs><clipPath id="m0"><rect width="28" height="28" fill="#fff"/></clipPath></defs></svg>',B2='<svg width="100%" height="100%" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.23 16.81L20 9.04L27.77 16.81L32.29 12.29L20 0L7.71 12.29L12.23 16.81Z" fill="#F3BA2F"/><path d="M9.04 20L4.52 15.48L0 20L4.52 24.52L9.04 20Z" fill="#F3BA2F"/><path d="M12.23 23.19L20 30.96L27.77 23.19L32.29 27.71L20 40L7.71 27.71L12.23 23.19Z" fill="#F3BA2F"/><path d="M35.48 24.52L40 20L35.48 15.48L30.96 20L35.48 24.52Z" fill="#F3BA2F"/><path d="M24.58 20L20 15.41L16.61 18.8L16.22 19.19L15.42 19.99L20 24.59L24.59 20L24.58 20Z" fill="#F3BA2F"/></svg>',z2='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path fill="#FFC107" d="M43.6 20.5H42V20H24v8h11.3A12 12 0 1 1 24 12c3 0 5.8 1.2 7.9 3l5.7-5.7A20 20 0 1 0 44 24c0-1.2-.1-2.4-.4-3.5z"/><path fill="#FF3D00" d="M6.3 14.7l6.6 4.8A12 12 0 0 1 24 12c3 0 5.8 1.2 7.9 3l5.7-5.7A20 20 0 0 0 6.3 14.7z"/><path fill="#4CAF50" d="M24 44c5.2 0 10-2 13.6-5.2l-6.3-5.3A12 12 0 0 1 12.7 28l-6.5 5A20 20 0 0 0 24 44z"/><path fill="#1976D2" d="M43.6 20.5H42V20H24v8h11.3a12 12 0 0 1-4.1 5.5l6.3 5.3C41 35.7 44 30.3 44 24c0-1.2-.1-2.4-.4-3.5z"/></svg>',F2='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000"><path d="M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.53 4.08zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"/></svg>';function Ja(e){return`data:image/svg+xml,${encodeURIComponent(e)}`}var $a=Ja(P2),ei=Ja(O2),ti=Ja(B2),ni=Ja(z2),ri=Ja(F2);var qt=require("react/jsx-runtime");function hc({isConnecting:e,address:t,provider:n,providerName:r,accountName:o,sendAccounts:a,onConnect:i,onDisconnect:s,onCopy:l,onSelectWallet:d,onBuy:p,onBuyDisabledMessage:h,label:u="Connect Wallet",connectingLabel:g="Connecting...",disconnectLabel:x,className:y,theme:f="dark",env:c,showBalance:b=!0,showPortfolio:w,drawerDirection:k,modal:C,connectorId:N,style:T,walletInfoStyle:R,sendTransaction:S,getTransactionReceipt:E,estimateGas:A,onReceive:F,onBridge:D,onSend:G,bridgeTokens:M,bridgeHistory:j,getBridgeQuote:le,getBridgeToTokens:oe,getBridgeApproval:ne,approveBridge:Q,submitBridge:ee}){let z=y?`cb-button ${y}`:"cb-button",q=y?`cb-pill ${y}`:"cb-pill";if(_0.useEffect(()=>{ro(t)},[t]),e)return(0,qt.jsxs)("button",{type:"button",disabled:!0,className:z,style:T,"aria-busy":"true",children:[(0,qt.jsx)("span",{className:"cb-spinner","aria-hidden":"true"}),(0,qt.jsx)("span",{className:"cb-button-label",children:g})]});if(t){let ae=r??W2(n),Z=n?j2[n]:void 0;return(0,qt.jsx)(Me,{feature:"connect_button",children:(0,qt.jsxs)(yo,{env:c,theme:f,drawerDirection:k,modal:C,showBalance:b,showPortfolio:w,walletAddress:t,accountName:o,sendAccounts:a,connectorName:r??(n?V0[n]:void 0),connectorId:N,onSelectWallet:d,onCopyAddress:l?(pe,Se)=>{Se&&l()}:void 0,onDisconnect:s,disconnectLabel:x,style:R,sendTransaction:S,getTransactionReceipt:E,estimateGas:A,onReceive:F,onBridge:D,onBuy:p,onBuyDisabledMessage:h,onSend:G,bridgeTokens:M,bridgeHistory:j,getBridgeQuote:le,getBridgeToTokens:oe,getBridgeApproval:ne,approveBridge:Q,submitBridge:ee,children:[(0,qt.jsx)(yo.Trigger,{asChild:!0,children:(0,qt.jsxs)("button",{type:"button",className:q,"data-track":"wallet_pill_open",style:T,"aria-label":`Connected with ${ae}: ${G0(t)}`,children:[Z?(0,qt.jsx)("img",{src:Z,alt:"",width:18,height:18,className:"cb-pill-icon","data-provider":n}):(0,qt.jsx)("span",{className:"cb-pill-icon-placeholder","aria-hidden":"true"}),(0,qt.jsx)("span",{className:"cb-pill-address",children:G0(t)})]})}),(0,qt.jsx)(yo.Content,{align:"end",sideOffset:8})]})})}return(0,qt.jsx)(Me,{feature:"connect_button",children:(0,qt.jsxs)("button",{type:"button",onClick:i,className:z,"data-track":"connect_click",style:T,"aria-label":typeof u=="string"?u:"Connect Wallet",children:[(0,qt.jsx)(U2,{}),(0,qt.jsx)("span",{className:"cb-button-label",children:u})]})})}function U2(){return(0,qt.jsxs)("svg",{className:"cb-button-icon",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,qt.jsx)("path",{d:"M3.75 5.25H14.25C15.0784 5.25 15.75 5.92157 15.75 6.75V13.5C15.75 14.3284 15.0784 15 14.25 15H3.75C2.92157 15 2.25 14.3284 2.25 13.5V4.5C2.25 3.67157 2.92157 3 3.75 3H13.5",stroke:"currentColor",strokeWidth:"1.35",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M12 9.75H15.75V12.75H12C11.1716 12.75 10.5 12.0784 10.5 11.25C10.5 10.4216 11.1716 9.75 12 9.75Z",stroke:"currentColor",strokeWidth:"1.35",strokeLinecap:"round",strokeLinejoin:"round"}),(0,qt.jsx)("path",{d:"M12.75 11.25H12.7575",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}var j2={google:ni,apple:ri,cross:$a,metamask:ei,binance:ti},V0={google:"Google",apple:"Apple",cross:H0.WALLET_LABELS.default,metamask:"MetaMask",binance:"Binance Wallet"};function W2(e){return e?V0[e]:"Wallet"}function G0(e){return e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`}var Q0=H(require("react"),1);he(`.sb-button{--sb-bg: var(--ds-surface-default, #ffffff);--sb-border: var(--ds-border-default, rgba(0, 0, 0, .07));--sb-border-hover: var(--ds-border-default, rgba(0, 0, 0, .07));--sb-color: var(--ds-content-medium, rgba(0, 0, 0, .65));--sb-color-hover: var(--ds-content-high, rgba(0, 0, 0, .85));--sb-radius: 8px;--sb-height: 36px;--sb-padding: 1px 11px;--sb-gap: 4px;--sb-font-size: 14px;--sb-font-weight: 500;--sb-line-height: 21px;--sb-letter-spacing: 0;--sb-blur: 0px;--sb-border-width: 1px;--sb-icon-size: 18px;--sb-icon-hover-rotation: 180deg;--sb-spinner-size: 18px;--sb-spinner-thumb: currentColor;--sb-spinner-track: color-mix(in srgb, currentColor 20%, transparent);--sb-disabled-opacity: .6;--sb-press-scale: .95;--sb-hover-duration: .2s;--sb-icon-duration: .3s;--sb-easing: ease}.sb-button[data-theme=dark]{--sb-bg: var(--ds-surface-default, #1e232e);--sb-border: var(--ds-border-default, #ffffff12);--sb-border-hover: var(--ds-border-medium, #ffffff2e);--sb-color: var(--ds-content-medium, #ffffffa6);--sb-color-hover: var(--ds-content-high, #ffffffd9)}.sb-button[data-theme=light]{--sb-bg: var(--ds-surface-default, #ffffff);--sb-border: var(--ds-border-default, #00000012);--sb-border-hover: var(--ds-border-medium, #0000002e);--sb-color: var(--ds-content-medium, #000000a6);--sb-color-hover: var(--ds-content-high, #000000d9)}
27
27
  `);he(`.sb-button{-webkit-font-smoothing:antialiased;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;height:var(--sb-height);gap:var(--sb-gap);padding:var(--sb-padding);border-radius:var(--sb-radius);border:var(--sb-border-width) solid var(--sb-border);background:var(--sb-bg);backdrop-filter:blur(var(--sb-blur));-webkit-backdrop-filter:blur(var(--sb-blur));color:var(--sb-color);font-family:Inter,system-ui,-apple-system,sans-serif;font-weight:var(--sb-font-weight);font-size:var(--sb-font-size);line-height:var(--sb-line-height);letter-spacing:var(--sb-letter-spacing);cursor:pointer;transition:border-color var(--sb-hover-duration) var(--sb-easing),color var(--sb-hover-duration) var(--sb-easing)}@media(hover:hover){.sb-button:hover:not(:disabled){border-color:var(--sb-border-hover);color:var(--sb-color-hover)}.sb-button:hover:not(:disabled) .sb-button-icon{transform:rotate(var(--sb-icon-hover-rotation))}}.sb-button:active:not(:disabled){transform:scale(var(--sb-press-scale))}.sb-button:disabled,.sb-button[aria-busy=true]{cursor:default;opacity:var(--sb-disabled-opacity)}.sb-button-icon{width:var(--sb-icon-size);height:var(--sb-icon-size);flex-shrink:0;color:inherit;transition:transform var(--sb-icon-duration) var(--sb-easing),color var(--sb-icon-duration) var(--sb-easing)}.sb-spinner{display:inline-block;width:var(--sb-spinner-size);height:var(--sb-spinner-size);border:2px solid var(--sb-spinner-track);border-top-color:var(--sb-spinner-thumb);border-radius:50%;animation:sb-spin .6s linear infinite;flex-shrink:0}.sb-label{white-space:nowrap}@keyframes sb-spin{to{transform:rotate(360deg)}}
28
- `);var Pr=require("react/jsx-runtime"),mc="https://www.onechain.nexus/skills";function gc({label:e="Skills",href:t,onClick:n,className:r,style:o,theme:a,disabled:i=!1,isLoading:s=!1,loadingLabel:l="Loading...",openInNewTab:d=!1,type:p="button"}){let[w,u]=z0.useState(!1),h=it(),x=Xt("apps.json",h,C=>Bn(C?.skills,h)),y=t??x,f=async C=>{if(y&&!n){d?window.open(y,"_blank","noopener,noreferrer"):window.location.href=y;return}if(n)try{u(!0),await n()}finally{u(!1)}},c=i||s||w,b=s||w,g=b?l:e,v=r?`sb-button ${r}`:"sb-button";return(0,Pr.jsx)(Le,{feature:"skills",children:(0,Pr.jsxs)("button",{type:p,onClick:f,disabled:c,className:v,"data-theme":a,"data-track":"click",style:o,"aria-busy":b,children:[b?(0,Pr.jsx)("span",{className:"sb-spinner","aria-hidden":"true"}):(0,Pr.jsx)(T2,{}),(0,Pr.jsx)("span",{className:"sb-label",children:g})]})})}function T2(){return(0,Pr.jsx)("svg",{className:"sb-button-icon",viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,Pr.jsx)("path",{d:"M15.5879 3.95142C16.0211 2.78097 17.6761 2.78099 18.1094 3.95142L19.6221 8.03833C20.6569 10.8348 22.8618 13.0396 25.6582 14.0745L29.7451 15.5872C30.9157 16.0204 30.9157 17.6754 29.7451 18.1086L25.6582 19.6213C22.8618 20.6562 20.657 22.861 19.6221 25.6575L18.1094 29.7444C17.6762 30.9149 16.0211 30.9149 15.5879 29.7444L14.0752 25.6575C13.0403 22.861 10.8355 20.6562 8.03906 19.6213L3.95215 18.1086C2.78172 17.6754 2.7817 16.0204 3.95215 15.5872L8.03906 14.0745C10.8355 13.0396 13.0403 10.8348 14.0752 8.03833L15.5879 3.95142Z",stroke:"currentColor",strokeWidth:"1.93556"})})}bi({mode:"dapp-ui"});0&&(module.exports={APPLE_ICON,AppLauncher,AppLauncherContent,AppLauncherTrigger,BINANCE_ICON,BridgeFlow,CHAINS_CONFIG_FILE,CONNECTOR_REGISTRY,CROSSX_ICON,ConnectButton,ConnectorId,DEFAULT_SKILLS_HREF,DEFAULT_TRUSTED_FACTORIES,DappUiErrorBoundary,GOOGLE_ICON,GetOneUsd,METAMASK_ICON,OnePopBody,OnePopGetTokenTrigger,PORTFOLIO_SECTIONS,RelayApiError,RelayDeposit,RelayHistory,RelayRecovery,SOCIAL_REGISTRY,SendFlow,SkillsButton,StatusTracker,TOKEN_STATS_QUERY_KEY,USER_BALANCE_QUERY_KEY,WALLET_PORTFOLIO_QUERY_PREFIX,WALLET_REGISTRY,WalletConnectModal,WalletInfo,WalletInfoPage,WalletPortfolio,WalletPortfolioBody,announceAppLauncherUsage,captureDappUiException,createRelayClient,findGetOneUsdToken,getChainDisplay,getDappUiSentryScope,getOneUsdTokenKey,initDappUiSentry,invalidateWalletPortfolioQueries,isGetOneUsdActionEnabled,isGetOneUsdActionSupported,isGetOneUsdActionVisible,isGetOneUsdTargetAvailable,matchesGetOneUsdToken,normalizeFailureReason,resolveEnvironment,resolveGetOneUsdRoute,selectChainMeta,setDappUiAnalyticsUser,trackDappUiEvent,trackDappUiFunnel,useChainDisplay,useChainsConfig,useGlobalMenu,useRelayConfig,useRelayOrders,useRelayRecovery,useTokenBalance,useTokenStats,useWalletDetect});
28
+ `);var Or=require("react/jsx-runtime"),bc="https://www.onechain.nexus/skills";function wc({label:e="Skills",href:t,onClick:n,className:r,style:o,theme:a,disabled:i=!1,isLoading:s=!1,loadingLabel:l="Loading...",openInNewTab:d=!1,type:p="button"}){let[h,u]=Q0.useState(!1),g=it(),x=Xt("apps.json",g,C=>Bn(C?.skills,g)),y=t??x,f=async C=>{if(y&&!n){d?window.open(y,"_blank","noopener,noreferrer"):window.location.href=y;return}if(n)try{u(!0),await n()}finally{u(!1)}},c=i||s||h,b=s||h,w=b?l:e,k=r?`sb-button ${r}`:"sb-button";return(0,Or.jsx)(Me,{feature:"skills",children:(0,Or.jsxs)("button",{type:p,onClick:f,disabled:c,className:k,"data-theme":a,"data-track":"click",style:o,"aria-busy":b,children:[b?(0,Or.jsx)("span",{className:"sb-spinner","aria-hidden":"true"}):(0,Or.jsx)(G2,{}),(0,Or.jsx)("span",{className:"sb-label",children:w})]})})}function G2(){return(0,Or.jsx)("svg",{className:"sb-button-icon",viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,Or.jsx)("path",{d:"M15.5879 3.95142C16.0211 2.78097 17.6761 2.78099 18.1094 3.95142L19.6221 8.03833C20.6569 10.8348 22.8618 13.0396 25.6582 14.0745L29.7451 15.5872C30.9157 16.0204 30.9157 17.6754 29.7451 18.1086L25.6582 19.6213C22.8618 20.6562 20.657 22.861 19.6221 25.6575L18.1094 29.7444C17.6762 30.9149 16.0211 30.9149 15.5879 29.7444L14.0752 25.6575C13.0403 22.861 10.8355 20.6562 8.03906 19.6213L3.95215 18.1086C2.78172 17.6754 2.7817 16.0204 3.95215 15.5872L8.03906 14.0745C10.8355 13.0396 13.0403 10.8348 14.0752 8.03833L15.5879 3.95142Z",stroke:"currentColor",strokeWidth:"1.93556"})})}yi({mode:"dapp-ui"});0&&(module.exports={APPLE_ICON,AppLauncher,AppLauncherContent,AppLauncherTrigger,BINANCE_ICON,BridgeFlow,CHAINS_CONFIG_FILE,CONNECTOR_REGISTRY,CROSSX_ICON,ConnectButton,ConnectorId,DEFAULT_SKILLS_HREF,DEFAULT_TRUSTED_FACTORIES,DappUiErrorBoundary,GOOGLE_ICON,GetOneUsd,METAMASK_ICON,OnePopBody,OnePopGetTokenTrigger,PORTFOLIO_SECTIONS,RelayApiError,RelayDeposit,RelayHistory,RelayRecovery,SOCIAL_REGISTRY,SendFlow,SkillsButton,StatusTracker,TOKEN_STATS_QUERY_KEY,USER_BALANCE_QUERY_KEY,WALLET_PORTFOLIO_QUERY_PREFIX,WALLET_REGISTRY,WalletConnectModal,WalletInfo,WalletInfoPage,WalletPortfolio,WalletPortfolioBody,announceAppLauncherUsage,captureDappUiException,createRelayClient,findGetOneUsdToken,getChainDisplay,getDappUiSentryScope,getOneUsdTokenKey,initDappUiSentry,invalidateWalletPortfolioQueries,isGetOneUsdActionEnabled,isGetOneUsdActionSupported,isGetOneUsdActionVisible,isGetOneUsdTargetAvailable,matchesGetOneUsdToken,normalizeFailureReason,resolveEnvironment,resolveGetOneUsdRoute,selectChainMeta,setDappUiAnalyticsUser,trackDappUiEvent,trackDappUiFunnel,useChainDisplay,useChainsConfig,useGlobalMenu,useRelayConfig,useRelayOrders,useRelayRecovery,useTokenBalance,useTokenStats,useWalletDetect});
29
29
  //# sourceMappingURL=index.cjs.map