@nexus-cross/dapp-ui 1.3.11 → 1.3.12-beta.2
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/AI_INTEGRATION.md +55 -0
- package/README.md +10 -1
- package/dist/index.cjs +26 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1403 -1224
- package/dist/index.d.ts +1403 -1224
- package/dist/index.js +26 -25
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
function
|
|
2
|
-
`);
|
|
3
|
-
`);
|
|
4
|
-
`);
|
|
5
|
-
`);ae("");import{jsx as ns}from"react/jsx-runtime";function _l({env:e,theme:t="dark",mobileBreakpoint:r=768,domain:n,children:o}){let i=ao(`(max-width: ${r}px)`),[a,s]=so.useState(!1),l=so.useCallback(()=>s(!1),[]),c=qe(e),p=so.useMemo(()=>({env:c,theme:t,isMobile:i,open:a,domain:n,close:l}),[c,t,i,a,n,l]);return ns(rs.Provider,{value:p,children:i?ns(xm.Root,{direction:"right",open:a,onOpenChange:s,noBodyStyles:!0,children:o},"drawer"):ns(Wl.Root,{open:a,onOpenChange:s,children:o},"popover")})}import*as Vl from"@radix-ui/react-popover";import{Drawer as km}from"vaul";import{jsx as fr,jsxs as vm}from"react/jsx-runtime";function Gl({size:e=18}){return vm("svg",{className:"al-trigger-icon",width:e,height:e,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[fr("rect",{width:"4",height:"4",rx:"2",fill:"currentColor"}),fr("rect",{x:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),fr("rect",{x:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),fr("rect",{y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),fr("rect",{x:"7",y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),fr("rect",{x:"14",y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),fr("rect",{y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),fr("rect",{x:"7",y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),fr("rect",{x:"14",y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"})]})}function Hl(){return fr("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:fr("path",{d:"M12 19L5 12M5 12L12 5M5 12H19",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function Ql(){return fr("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:fr("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}import{jsx as lo}from"react/jsx-runtime";function ql({asChild:e,children:t,className:r,style:n}){let{isMobile:o,theme:i}=Si(),a=t!=null,s=e??!0,l=r?`al-trigger-btn ${r}`:"al-trigger-btn",c=a?t:lo("button",{type:"button",className:l,"data-theme":i,"data-track":"open",style:n,children:lo(Gl,{size:18})});return o?lo(fe,{feature:"app_launcher",children:lo(km.Trigger,{asChild:s,children:c})}):lo(fe,{feature:"app_launcher",children:lo(Vl.Trigger,{asChild:s,children:c})})}import*as zn from"react";import*as Ni from"@radix-ui/react-popover";import{Drawer as co}from"vaul";import{useQuery as Cm}from"@tanstack/react-query";var Yl={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 Rm="https://stg-contents.crosstoken.io/frontend/common/app-launcher/icons",Sm="https://contents.crosstoken.io/frontend/common/app-launcher/icons";function jr(e,t){return`${e==="production"?Sm:Rm}/${t}.png`}function Kl(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:jr(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:jr(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:jr(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:jr(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:jr(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:jr(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:jr(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:jr(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:jr(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:jr(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:jr(t,"wave"),order:11e4,type:"wave",badge:null,isNew:!1,serviceStatus:"available"}]}}function Ci(e){let t=qe(e);return Cm({queryKey:["global-menu",t],queryFn:async()=>{try{let r=await fetch(Yl[t],{cache:"no-store"});if(!r.ok)throw new Error(`Failed to fetch global menu: ${r.status}`);return r.json()}catch{return Kl(t)}},staleTime:300*1e3,gcTime:600*1e3,retry:!1,refetchOnMount:!0})}function os(e){return e.serviceStatus==="ending"||e.serviceStatus==="comingSoon"?e.serviceStatus:"available"}function Xl(e,t){return typeof e=="string"?e:e[t]??e.production??e.stage??e.dev}function Jl(e){return[...e].sort((t,r)=>{let n=Zl(t)-Zl(r);return n!==0?n:t.order-r.order})}function Zl(e){let t=os(e);return t==="comingSoon"?0:t==="ending"?2:1}import{jsx as vt,jsxs as po}from"react/jsx-runtime";function Nm(e){return e.id==="cross-staking"||e.type==="cross-staking"}function ec({align:e="end",sideOffset:t=8,className:r}){let{env:n,theme:o,isMobile:i,domain:a,close:s}=Si(),{data:l}=Ci(n),c=zn.useMemo(()=>Jl(l?.items??[]),[l?.items]),p=8,b=zn.useRef(null),h=zn.useCallback(u=>{b.current={x:u.clientX,y:u.clientY}},[]),d=typeof window<"u"?window.location.pathname:"",y=zn.useCallback((u,w)=>{if(b.current){let x=u.clientX-b.current.x,S=u.clientY-b.current.y;if(b.current=null,Math.abs(x)>p||Math.abs(S)>p)return}let f=w.url[n]??w.url.production,R=$l(f,a);if(!R)try{let x=new URL(f).pathname;if(d===x||d.startsWith(x+"/")){s();return}}catch{}R?window.open(f,"_blank","noopener,noreferrer"):window.location.href=f,s()},[n,a,s,d]),m=u=>{let w=u.url[n]??u.url.production,f=$l(w,a),R=os(u),x=R==="ending",S=Xl(u.iconUrl,n),M=!1;if(!f)try{let C=new URL(w).pathname;M=d===C||d.startsWith(C+"/")}catch{M=!1}return vt("button",{type:"button",className:"al-grid-item","data-track":"menu_item_click","data-track-id":u.id,"data-active":M||void 0,"data-service-status":R,onPointerDown:h,onClick:C=>y(C,u),children:po("div",{className:"al-grid-item-left",children:[po("div",{className:"al-grid-item-icon",children:[vt("img",{src:S,alt:u.label,width:24,height:24,loading:"lazy"}),u.isNew&&vt("span",{className:"al-status-ribbon al-status-ribbon-new",children:"N"})]}),po("span",{className:"al-grid-item-text",children:[vt("span",{className:"al-grid-item-label",children:u.label}),x&&vt("span",{className:"al-grid-item-status-text",children:"(End Soon)"}),u.badge&&!Nm(u)&&vt("span",{className:"al-badge al-badge-list",children:u.badge})]})]})},u.id)},g=vt("div",{className:"al-menu","data-theme":o,children:vt("div",{className:"al-grid",children:c.map(m)})});return i?vt(fe,{feature:"app_launcher",children:po(co.Portal,{children:[vt(co.Overlay,{className:"al-drawer-overlay"}),po(co.Content,{className:ve("al-drawer-content",r),"data-theme":o,children:[po("div",{className:"al-drawer-header",children:[vt(co.Close,{className:"al-drawer-close","data-track":"close",children:vt(Hl,{})}),vt(co.Title,{className:"al-drawer-title",children:"CROSS Services"}),vt(co.Close,{className:"al-drawer-close","data-track":"close",children:vt(Ql,{})})]}),vt("div",{className:"al-drawer-body",children:g})]})]})}):vt(fe,{feature:"app_launcher",children:vt(Ni.Portal,{children:vt(Ni.Content,{align:e,sideOffset:t,className:ve("al-popover-content",r),"data-theme":o,children:g})})})}function $l(e,t){try{let r=new URL(e).hostname;return typeof window>"u"?!0:r!==(t??window.location.hostname)}catch{return!1}}import*as zt from"react";import*as Jp from"@radix-ui/react-popover";import{Drawer as Qb}from"vaul";import{createContext as Tm,useContext as Im}from"react";var is=Tm(null);function bn(){let e=Im(is);if(!e)throw new Error("WalletInfo compound components must be used within <WalletInfo>");return e}import{WALLET_LABELS as Mm}from"@nexus-cross/crossx-design-system";var as=(n=>(n.CROSSx="crossx",n.MetaMask="io.metamask",n.Binance="com.binance.wallet",n))(as||{}),Ti={crossx:{name:Mm.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"}};import*as Vc from"react";import{jsx as Ne,jsxs as Uo}from"react/jsx-runtime";function tc({size:e=16,className:t}){return Uo("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Ne("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"}),Ne("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 Un({size:e=16,className:t}){return Ne("svg",{width:e,height:e,viewBox:"4 4 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Ne("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 sn({size:e=16,className:t}){return Ne("svg",{width:e,height:e,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Ne("path",{d:"M11.6667 3.5L5.25 9.91667L2.33334 7",stroke:"currentColor",strokeWidth:1.16667,strokeLinecap:"round",strokeLinejoin:"round"})})}function yr({size:e=24,className:t}){return Ne("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Ne("path",{d:"M18 6L6 18M6 6l12 12",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function rc({size:e=20,className:t}){return Uo("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Ne("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"}),Ne("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 Ii({size:e=20,className:t}){return Ne("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,children:Ne("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 ln({size:e=20,className:t}){return Ne("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Ne("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor",strokeWidth:1.67,strokeLinecap:"round",strokeLinejoin:"round"})})}function jn({size:e=20,className:t}){return Ne("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Ne("path",{d:"M5 8L10 13L15 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function nc({size:e=16,className:t}){return Uo("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Ne("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"}),Ne("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 oc({size:e=16,className:t}){return Uo("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Ne("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"}),Ne("path",{d:"M1.667 1.667l16.666 16.666",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})]})}var Em='<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>',Am=`data:image/svg+xml,${encodeURIComponent(Em)}`;function ic({size:e=42,className:t}){return Ne("img",{src:Am,width:e,height:e,alt:"",className:t,style:{display:"block"}})}function ac({size:e=20,className:t}){return Ne("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Ne("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 sc({size:e=20,className:t}){return Ne("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Ne("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 lc({size:e=20,className:t}){return Ne("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Ne("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 cc({size:e=20,className:t}){return Ne("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Ne("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 dc({size:e=20,className:t}){return Uo("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Ne("circle",{cx:"10",cy:"10",r:"10",fill:"currentColor"}),Ne("path",{d:"M6 10.2L8.6 12.8L14 7.2",stroke:"var(--ds-accent-primary-on, #ffffff)",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"})]})}import*as re from"react";import Wn from"bignumber.js";function Lm(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 wn(e,t){if(!e||e==="0")return"0.00";let r=new Wn(e).shiftedBy(-t),n=r.isGreaterThanOrEqualTo(1)?2:4;return r.toFormat(n,Wn.ROUND_DOWN)}function qt(e){return e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`}function _n(e){let t=typeof e=="string"?parseFloat(e):e;if(Number.isNaN(t)||t===0)return"$0.00";let r=t>=1?2:4,n=Math.pow(10,r);return`$${(Math.floor(t*n)/n).toLocaleString("en-US",{minimumFractionDigits:r,maximumFractionDigits:r})}`}function Mi(e,t,r){let o=new Wn(e).shiftedBy(-t).multipliedBy(new Wn(r));return o.isZero()||o.isNaN()?"$0.00":`$${(o.integerValue(Wn.ROUND_DOWN).isGreaterThanOrEqualTo(1)?o.decimalPlaces(2,Wn.ROUND_DOWN):o.decimalPlaces(4,Wn.ROUND_DOWN)).toFormat()}`}function pc(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 r=t;if(r.includes("e")||r.includes("E")){let a=Number(r);if(!Number.isFinite(a)||a===0)return{displayValue:"0",isLowerBound:!1};r=Lm(a.toFixed(18))}let[n="0",o=""]=r.split(".");if(Number(n)>=1){let a=o.slice(0,2).padEnd(2,"0");return{displayValue:`${Number(n).toLocaleString("en-US")}.${a}`,isLowerBound:!1}}return o.length<4?{displayValue:`${n}.${o}`,isLowerBound:!1}:o.slice(0,4)==="0000"?{displayValue:"0.0001",isLowerBound:!0}:{displayValue:`0.${o.slice(0,4)}`,isLowerBound:!1}}import{useMemo as uc}from"react";import{useQuery as Dm}from"@tanstack/react-query";var at={dev:{cross:612044,bsc:97},stage:{cross:612044,bsc:97},production:{cross:612055,bsc:56}},uo="https://terms.onechain.nexus/docs/terms-july-23-2026",Ei="https://terms.onechain.nexus/docs/pp-july-23-2026";var Pm="send:chain-info";function Bm(e){if("data"in e&&e.data!==void 0){let t=e.data;if(Array.isArray(t)){let r=t[0];if(!r)throw new Error("Chain info payload is empty.");return r}return t}return e}function ss(e,...t){let r=e.replace(/\/+$/,""),n=t.map(o=>o.replace(/^\/+|\/+$/g,"")).filter(Boolean);return[r,...n].join("/")}function fc(e,t,r,n){if(n)return t===at[e].cross?mc(t,n):r?.explorer_url?ss(r.explorer_url,r.explorer_postfix?.transaction??"tx",n):Fm(e,t,n)}function mc(e,t){return ss("https://explorer.onechain.nexus",String(e),"tx",t)}function Fm(e,t,r){let n=at[e];if(t===n.cross)return mc(t,r);if(t===n.bsc)return ss(e==="production"?"https://bscscan.com":"https://testnet.bscscan.com","tx",r)}function jo(e,t,r,n=!0){let o=Dm({queryKey:[Pm,e,t],queryFn:async({signal:s})=>{let l=await we("walletServer",e),c=await fetch(`${l}/v1/public/chain/info/${t}`,{cache:"no-store",signal:s});if(!c.ok)throw new Error(`Failed to fetch chain info: ${c.status}`);let p=await c.json();if("code"in p&&p.code!==void 0&&p.code!==200)throw new Error(`Chain info API error: ${p.code}`);return Bm(p)},enabled:n,staleTime:3e5}),i=o.data;return{transactionUrl:uc(()=>fc(e,t,i,r),[t,i,e,r]),chainInfo:i,...o}}function gc(e,t,r=!0){let{chainInfo:n}=jo(e,t,void 0,r);return{buildTxUrl:uc(()=>i=>fc(e,t,n,i),[e,t,n]),chainInfo:n}}var hc="0x0000000000000000000000000000000000000001";var Om="0xa9059cbb",zm=/^0x[a-fA-F0-9]{40}$/,Um="nexus-cross:dapp-ui:send:recent:",bc=10;function jm(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===48;)t--;return e.slice(0,t)}function Wo(e){return e.toLowerCase()}function Kr(e){return zm.test(e)}function yn(e){return Wo(e.address)===hc}function ls(e){return`${Um}${e.toLowerCase()}`}function fo(e){if(typeof window>"u")return[];try{let t=window.localStorage.getItem(ls(e));if(!t)return[];let r=JSON.parse(t);return Array.isArray(r)?r.filter(n=>n!==null&&typeof n=="object"&&Kr(n.address)&&typeof n.updatedAt=="number").slice(0,bc):[]}catch{return[]}}function cs(e,t){if(typeof window>"u")return[];let r=Wo(t),n=[{address:r,updatedAt:Date.now()},...fo(e).filter(o=>o.address!==r)].slice(0,bc);try{window.localStorage.setItem(ls(e),JSON.stringify(n))}catch{return fo(e)}return n}function ds(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(ls(e))}catch{}}function Gn(e,t){let r=e.trim();if(!r)return{error:"Enter an amount."};if(!/^\d+(\.\d*)?$/.test(r))return{error:"Enter a valid amount."};let[n="0",o=""]=r.split(".");if(o.length>t)return{error:`Max ${t} decimal places.`};let i=BigInt(n||"0"),a=o.padEnd(t,"0"),s=a?BigInt(a):0n,l=10n**BigInt(t),c=i*l+s;return c<=0n?{error:"Amount must be greater than 0."}:{value:c}}function mo(e,t){let r=BigInt(e||"0"),n=10n**BigInt(t),o=r/n,i=r%n;if(i===0n)return o.toString();let a=jm(i.toString().padStart(t,"0"));return`${o.toString()}.${a}`}function ps(e,t){let r=e.replace(/^0x/,"").toLowerCase().padStart(64,"0"),n=t.toString(16).padStart(64,"0");return`${Om}${r}${n}`}function Ai(e,t,r=10){if(t<=0)return e.toString();let n=10n**BigInt(t),o=e/n,i=e%n;if(i===0n)return o.toString();let s=i.toString().padStart(t,"0").slice(0,Math.max(0,Math.min(r,t)));return s=s.replace(/0+$/,""),s?`${o.toString()}.${s}`:o.toString()}function us(e,t){return Ai(e,t,6)}function wc(e){return Ai(e,9,2)}function yc(e){return e.toLocaleString("en-US")}function Li(e){return e===56||e===97}function Di(e){return e.gasPrice??e.maxFeePerGas}function xc(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 r=Di(e);return r!==void 0?e.gasLimit*r:null}return e.maxFeePerGas!==void 0?e.gasLimit*e.maxFeePerGas:e.gasPrice!==void 0?e.gasLimit*e.gasPrice:null}function Bi(e){return!Number.isFinite(e)||e<=0?"$0.00":`$${e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`}function vc(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 r=e,n=[];return typeof r.name=="string"&&n.push(r.name),typeof r.shortMessage=="string"&&n.push(r.shortMessage),typeof r.message=="string"&&n.push(r.message),typeof r.details=="string"&&n.push(r.details),r.cause!==void 0&&n.push(vc(r.cause,t+1)),n.join(`
|
|
6
|
-
`).toLowerCase()}function Wm(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 fs(e,t={},r="Failed to send transaction."){let n=vc(e);if(!n)return r;let o=t.nativeSymbol?.trim()||"gas token",i=t.networkName?.trim();if(n.includes("user rejected")||n.includes("userrejected")||n.includes("user denied")||n.includes("user cancelled")||n.includes("user canceled")||n.includes("action_rejected")||n.includes("rejected by user"))return"Transaction was cancelled.";if(n.includes("insufficientfunds")||n.includes("insufficient funds")||n.includes("exceeds the balance of the account")||n.includes("insufficient balance for transfer")){let a=i?` on ${i}`:"";return`Not enough ${o} to cover the gas fee.Please top up your ${o} balance and try again.`}return n.includes("transaction underpriced")||n.includes("replacement transaction underpriced")||n.includes("fee too low")?"Gas fee was too low for the network. Please try again.":n.includes("nonce too low")||n.includes("nonce has already been used")||n.includes("nonce too high")?"Pending transactions are out of order. Refresh the page and try again.":n.includes("execution reverted")||n.includes("contractfunctionrevertederror")||n.includes("contractfunctionexecutionerror")?"The transaction was rejected by the contract. The recipient or token may be invalid.":n.match(/chain \d+ is not configured/)?"This network is not registered in the app. Contact support.":n.includes("http request failed")||n.includes("failed to fetch")||n.includes("network request failed")||n.includes("timeout")||n.includes("econnreset")||n.includes("rpc error")||n.includes("429")?"Network connection failed. Check your internet and try again.":n.includes("estimategas")||n.includes("gas estimation failed")?"Could not estimate the gas fee. The recipient address or amount may be invalid.":Wm(e)||r}var _m=2000000000n,Gm=1000000000n;async function Fi(e,t,r){let n=new AbortController,o=setTimeout(()=>n.abort(),8e3),i=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:t,params:r}),signal:n.signal}).finally(()=>clearTimeout(o));if(!i.ok)throw new Error(`RPC ${t} HTTP ${i.status}`);let a=await i.json();if(a.error)throw new Error(`RPC ${t}: ${a.error.message}`);if(a.result===void 0)throw new Error(`RPC ${t}: empty result`);return a.result}function Oi(e){return BigInt(e)}function Hm(e){return`0x${e.toString(16)}`}function Qm(e){let t={to:e.to};return e.from&&(t.from=e.from),e.value!==void 0&&e.value>0n&&(t.value=Hm(e.value)),e.data&&(t.data=e.data),t}function Vm(e){return e===56||e===97}async function kc(e){try{let t=await Fi(e,"eth_gasPrice",[]);return{gasPrice:Oi(t)}}catch{return{gasPrice:_m}}}async function qm(e,t){let r=Gm;try{let n=await Fi(e,"eth_maxPriorityFeePerGas",[]);r=Oi(n)}catch{}return{maxFeePerGas:t+r,maxPriorityFeePerGas:r}}async function Ym(e,t){if(t)return kc(e);let r;try{r=(await Fi(e,"eth_getBlockByNumber",["latest",!1]))?.baseFeePerGas}catch{}return r?qm(e,Oi(r)):kc(e)}async function Rc(e,t){let r=Vm(t.chainId),n=Qm(t),[o,i]=await Promise.all([Fi(e,"eth_estimateGas",[n]),Ym(e,r)]);return{gasLimit:Oi(o),gasPrice:i.gasPrice,maxFeePerGas:i.maxFeePerGas,maxPriorityFeePerGas:i.maxPriorityFeePerGas}}function Sc(e){let{estimateGas:t,sendTransaction:r,getTransactionReceipt:n}=e;return{canSend:!!r,canEstimateGas(o){return!!t||!!o},async estimateGas(o,i){if(t)return t(o);if(i)return Rc(i,o);throw new Error("Gas estimation is not available.")},async sendTransaction(o){if(!r)throw new Error("Sending is not available for this wallet.");return r(o)},getTransactionReceipt:n}}var Km=1500,Zm=120;function Cc(e){return!!(e.token||e.recipient||e.amount)}function ms({recipient:e,amount:t,token:r,balanceRaw:n}){let o={},i=e.trim(),a=Gn(t,r.quantity.decimals),s;return i?Kr(i)||(o.recipient="Enter a valid EVM recipient address."):o.recipient="Enter a recipient address.","error"in a?o.amount=a.error:(s=a.value,s>n&&(o.amount="Amount exceeds available balance.")),!yn(r)&&!Kr(r.address)&&(o.token="Token contract address is invalid."),{errors:o,rawAmount:o.amount?void 0:s,recipient:i&&Kr(i)?i:void 0}}function gs({token:e,walletAddress:t,recipient:r,rawAmount:n}){let o=t;return yn(e)?{to:r,value:n,chainId:e.chainId,from:o}:{to:Wo(e.address),data:ps(r,n),value:0n,chainId:e.chainId,from:o}}function Xm(e){let{status:t}=e;return t==="reverted"||t==="0x0"||t===0||t===0n||t===!1}var Jm=e=>new Promise(t=>setTimeout(t,e));async function Nc({repository:e,args:t,chainId:r,onSubmitted:n,pollIntervalMs:o=Km,pollMaxAttempts:i=Zm}){let a=await e.sendTransaction(t);n(a);let{getTransactionReceipt:s}=e;if(!s)return"success";for(let l=0;l<i;l+=1){let c=await s({hash:a,chainId:r}).catch(()=>null);if(c)return Xm(c)?"reverted":"success";await Jm(o)}return"timeout"}var Tc=["token","recipient","amount","review"];function Ic(e){let{env:t,walletAddress:r,accountName:n,accounts:o=[],initialStep:i="recipient",token:a,tokens:s=[],onTokenChange:l,sendTransaction:c,getTransactionReceipt:p,estimateGas:b,getTokenPriceUsd:h,onSubmitted:d,onSuccess:y,onFailed:m,onExit:g,onOutlink:u}=e,w=re.useMemo(()=>Sc({sendTransaction:c,getTransactionReceipt:p,estimateGas:b}),[c,p,b]),[f,R]=re.useState(a);re.useEffect(()=>{R(a)},[a.address,a.chainId]);let[x,S]=re.useState(i),[M,C]=re.useState(""),[v,E]=re.useState(""),[D,B]=re.useState({}),[I,K]=re.useState("idle"),[L,P]=re.useState(""),[ne,V]=re.useState(""),[U,ce]=re.useState(null),[Z,G]=re.useState(!1),[z,ee]=re.useState(""),J=re.useRef(0),[pe,se]=re.useState(null),[te,be]=re.useState(""),[Le,ge]=re.useState(()=>fo(r)),De=re.useRef(new Set),le=re.useCallback((F,ie)=>{De.current.has(F)||(De.current.add(F),Te("send",F,ie))},[]);re.useEffect(()=>{le("opened"),i!=="token"&&le("token_selected",{tags:{item_id:a.symbol}})},[le,i,a.symbol]);let _e=re.useMemo(()=>qe(t),[t]),{transactionUrl:Ke,chainInfo:Se}=jo(_e,f.chainId,L||void 0,!0),Ue=Fo(f.chainId,_e),Me=Ue.nativeSymbol??Se?.currency_symbol??"",Ze=Ue.name??Se?.name??`Chain ID ${f.chainId}`,Nt=re.useRef({nativeSymbol:Me||void 0,networkName:Ze,tokenSymbol:f.symbol});Nt.current={nativeSymbol:Me||void 0,networkName:Ze,tokenSymbol:f.symbol};let st=re.useMemo(()=>BigInt(f.quantity.numeric||"0"),[f.quantity.numeric]),yt=re.useMemo(()=>wn(f.quantity.numeric,f.quantity.decimals),[f.quantity.numeric,f.quantity.decimals]),lt=h?.(f),jt=re.useMemo(()=>{if(lt===void 0)return;let F=parseFloat(v.replace(/,/g,""));return Number.isFinite(F)?F*lt:0},[v,lt]);re.useEffect(()=>{E(""),B({})},[f.address,f.chainId]),re.useEffect(()=>{J.current+=1,ce(null),ee(""),G(!1)},[f.address,f.chainId,M,v]),re.useEffect(()=>{ge(fo(r))},[r]);let je=re.useCallback(F=>{C(F),B(ie=>({...ie,recipient:void 0}))},[]),Dt=re.useCallback(F=>{E(F),B(ie=>({...ie,amount:void 0}))},[]),mt=re.useCallback(()=>{E(yt.replace(/,/g,"")),B(F=>({...F,amount:void 0}))},[yt]),ct=re.useCallback(F=>{R(F),l?.(F),le("token_selected",{tags:{item_id:F.symbol}}),S("recipient")},[l,le]),rt=re.useCallback(()=>S("token"),[]),xt=re.useCallback(()=>{S(F=>{if(F==="result")return"review";if(F===i)return g?.(),F;let ie=Tc.indexOf(F);return ie<=0?(g?.(),F):Tc[ie-1]})},[i,g]),Pe=re.useCallback(()=>{let{errors:F}=ms({recipient:M,amount:"1",token:f,balanceRaw:st});if(F.recipient){B(ie=>({...ie,recipient:F.recipient}));return}B(ie=>({...ie,recipient:void 0})),le("recipient_entered"),S("amount")},[M,f,st,le]),Xe=re.useCallback(F=>{C(F),B(ie=>({...ie,recipient:void 0})),le("recipient_entered"),S("amount")},[le]),Je=re.useCallback(()=>{let F=ms({recipient:M,amount:v,token:f,balanceRaw:st});B(F.errors),!(Cc(F.errors)||F.rawAmount===void 0||!F.recipient)&&(se(F.rawAmount),be(F.recipient),ce(null),ee(""),K("idle"),le("amount_entered"),S("review"))},[M,v,f,st,le]);re.useEffect(()=>{if(x!=="review"||!te||pe===null||U!==null||Z||z||!w.canEstimateGas(Se?.rpc))return;let F=++J.current;G(!0),ee(""),(async()=>{try{let ie=gs({token:f,walletAddress:r,recipient:te,rawAmount:pe}),Fe=await w.estimateGas(ie,Se?.rpc);if(J.current!==F)return;ce(Fe)}catch(ie){if(J.current!==F)return;ee(fs(ie,Nt.current,"Failed to estimate gas."))}finally{J.current===F&&G(!1)}})()},[x,te,pe,U,Z,z,w,Se?.rpc,f,r]);let ot=re.useMemo(()=>{if(!yn(f)||!U||pe===null)return!1;let F=Pi(U,Li(f.chainId));return F===null?!1:pe+F>st},[f,U,pe,st]),$e=re.useCallback(async()=>{if(!(!te||pe===null)&&!ot){V(""),P(""),K("submitting"),le("submitted");try{let F="",ie=await Nc({repository:w,args:gs({token:f,walletAddress:r,recipient:te,rawAmount:pe}),chainId:f.chainId,onSubmitted:Fe=>{F=Fe,P(Fe),K("confirming"),ge(cs(r,te)),d?.({txHash:Fe,chainId:f.chainId,amount:v,tokenSymbol:f.symbol,recipient:te})}});if(ie==="success")K("success"),le("confirmed"),F&&y?y?.(F):S("result");else if(ie==="reverted"){let Fe="Transaction reverted on-chain.";K("error"),V(Fe),le("confirmed",{status:"failure",reason:ur(new Error(Fe))}),F&&m?m({txHash:F,chainId:f.chainId,message:Fe}):S("result")}else{let Fe="Transaction receipt was not found. Please check again later.";K("error"),V(Fe),le("confirmed",{status:"failure",reason:"timeout"}),F&&m?m({txHash:F,chainId:f.chainId,message:Fe}):S("result")}}catch(F){K("error"),le("confirmed",{status:"failure",reason:ur(F)}),V(fs(F,{nativeSymbol:Me||void 0,networkName:Ze,tokenSymbol:f.symbol})),S("result")}}},[w,te,pe,ot,f,v,r,d,y,m,Me,Ze,le]),[Tt,Wt]=re.useState(!1),Be=re.useRef(void 0);re.useEffect(()=>()=>clearTimeout(Be.current),[]);let it=re.useCallback(async()=>{if(L)try{await navigator.clipboard.writeText(L),Wt(!0),clearTimeout(Be.current),Be.current=setTimeout(()=>Wt(!1),2e3)}catch{}},[L]),et=re.useCallback(()=>{if(!Ke||!L)return;let F=gt=>{typeof window<"u"&&window.open(gt,"_blank","noopener,noreferrer")};if(!u){F(Ke);return}let ie=u(Ke,{category:"send",origin:"send-transaction",payload:{chainId:f.chainId,txHash:L}});if(ie&&typeof ie.then=="function"){let gt=typeof window<"u"?window.open("","_blank","noopener,noreferrer"):null;ie.then(ht=>{if(ht===null){gt?.close();return}let Gt=ht??Ke;if(gt)try{gt.location.href=Gt}catch{gt.close(),F(Gt)}else F(Gt)});return}let Fe=ie;Fe!==null&&F(Fe??Ke)},[u,f.chainId,Ke,L]),_t=re.useCallback(()=>{V(""),P(""),K("idle"),ce(null),ee(""),De.current.delete("submitted"),De.current.delete("confirmed"),S("review")},[]);return{step:x,status:I,token:f,tokens:s.length>0?s:[f],recipient:M,amount:v,amountUsd:jt,fieldErrors:D,error:ne,txHash:L,gasEstimate:U,gasLoading:Z,gasError:z,insufficientGas:ot,reviewRawAmount:pe,reviewRecipient:te,recentAddresses:Le,accounts:o,accountName:n,walletAddress:r,resolvedEnv:_e,transactionUrl:Ke,networkName:Ze,nativeSymbol:Me,nativeDecimals:Se?.currency_decimals??f.quantity.decimals,balanceRaw:st,balanceText:yt,priceUsd:lt,canSelectToken:(s.length>0?s:[f]).length>1,canSend:w.canSend,getTokenPriceUsd:h,setRecipient:je,setAmount:Dt,setMax:mt,selectToken:ct,goToTokenSelect:rt,selectRecipient:Xe,submitRecipient:Pe,submitAmount:Je,confirmSend:$e,retry:_t,back:xt,hashCopied:Tt,copyHash:it,openTransaction:et}}import*as Wr from"react";import{jsx as _o,jsxs as hs}from"react/jsx-runtime";function Mc({flow:e}){let{amount:t,setAmount:r,amountUsd:n,balanceText:o,balanceRaw:i,token:a,setMax:s}=e,l=Wr.useRef(null),c=Wr.useCallback(()=>{requestAnimationFrame(()=>{let m=l.current;if(!m)return;let g=m.value.length;m.setSelectionRange(g,g)})},[]);Wr.useEffect(()=>{l.current?.focus(),c()},[c]),Wr.useEffect(()=>{t===""&&(h(!1),c())},[t,c]);let p=Wr.useMemo(()=>{let m=Gn(t,a.quantity.decimals);return"value"in m&&m.value>i},[t,a.quantity.decimals,i]),[b,h]=Wr.useState(!1),d=!b&&t===""?"0.00":t,y=t.trim()===""||t.trim()==="0";return _o("div",{className:"sf-body sf-amount",children:hs("div",{className:"sf-amount-center",children:[_o("span",{className:"sf-amount-usd",children:n!==void 0?Bi(n):"\xA0"}),_o("div",{className:"sf-amount-input-wrap","data-over":p||void 0,"data-empty":y||void 0,onClick:()=>l.current?.focus(),children:_o("input",{ref:l,className:"sf-amount-input",value:d,onChange:m=>{let g=m.target.value;if(b)r(g);else if(t===""){if(g.length<4)return;h(!0);let u=g.startsWith("0.00")?g.slice(4):g;r(u)}else h(!0),r(g)},placeholder:"0.00",inputMode:"decimal",autoComplete:"off","aria-label":`Amount in ${a.symbol}`,size:1})}),hs("div",{className:"sf-amount-balance",children:[_o("span",{children:"Balance:"}),hs("button",{type:"button",className:"sf-amount-max",onClick:s,"data-track":"amount_max",children:[o," ",a.symbol]})]})]})})}import*as _r from"react";var eg=new Set(["0xff42c13d927a6b9265236619161accb227b6d452","0x9364ea6790f6e0ecfaa5164085f2a7de34ec55fb"].map(e=>e.toLowerCase()));function Ac(e){return eg.has(e.toLowerCase())}var Ec={cross:"https://contents.crosstoken.io/wallet/token/images/CROSS.svg",bsc:"https://contents.crosstoken.io/wallet/token/images/BSC.svg"};function Go(e,t){let r=at[e];if(t===r.cross)return Ec.cross;if(t===r.bsc)return Ec.bsc}var tg={dev:"https://dev-portrait.crosstoken.io",stage:"https://dev-portrait.crosstoken.io",production:"https://portrait.crosstoken.io"};function cn(e,t,r={}){if(!t||!t.startsWith("0x"))return;let{size:n=120,bg:o,format:i="png"}=r,a=tg[e],s=o?`&bg=${o}`:"";return`${a}/portrait/evm/${t}.${i}?size=${n}${s}`}import{jsx as xr,jsxs as zi}from"react/jsx-runtime";function Lc({size:e=20,className:t}){return zi("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,"aria-hidden":"true",children:[xr("circle",{cx:"9",cy:"9",r:"6",stroke:"currentColor",strokeWidth:"1.7"}),xr("path",{d:"m17 17-3.2-3.2",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})]})}function Dc({size:e=20,className:t}){return xr("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":"true",children:xr("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 Pc({size:e=20,className:t}){return zi("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,"aria-hidden":"true",children:[xr("circle",{cx:"10",cy:"10",r:"10",fill:"currentColor",opacity:"0.12"}),xr("path",{d:"M7 7l6 6M13 7l-6 6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]})}function Bc({size:e=16,className:t}){return xr("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",className:t,"aria-hidden":"true",children:xr("path",{d:"M8 3v10m0 0 4-4m-4 4-4-4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function Fc({size:e=56,className:t}){return zi("svg",{width:e,height:e,viewBox:"0 0 56 56",fill:"none",className:t,"aria-hidden":"true",children:[xr("circle",{cx:"28",cy:"28",r:"28",fill:"var(--ds-accent-primary-default, #00b4b7)"}),xr("path",{d:"M17 28.5 24.2 35.5 39 20.5",stroke:"var(--ds-accent-primary-on, #ffffff)",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Oc({size:e=56,className:t}){return zi("svg",{width:e,height:e,viewBox:"0 0 56 56",fill:"none",className:t,"aria-hidden":"true",children:[xr("circle",{cx:"28",cy:"28",r:"28",fill:"var(--ds-system-red-default, #da0b2e)"}),xr("path",{d:"M20 20 36 36m0-16L20 36",stroke:"#ffffff",strokeWidth:"4",strokeLinecap:"round"})]})}import{jsx as kt,jsxs as Zr}from"react/jsx-runtime";function zc(e,t){return e.name||`Account ${(e.index??t)+1}`}function Uc(e){return e.trim().slice(0,1).toUpperCase()||"A"}function jc(e){return e.toLowerCase()}function Wc({flow:e}){let{recipient:t,setRecipient:r,fieldErrors:n,recentAddresses:o,accounts:i,walletAddress:a,resolvedEnv:s,selectRecipient:l}=e,c=_r.useMemo(()=>i.filter(f=>f.address.toLowerCase()!==a.toLowerCase()),[i,a]),p=c.length>0,b=_r.useMemo(()=>new Map(c.map((f,R)=>[jc(f.address),{account:f,index:R}])),[c]),[h,d]=_r.useState("recent"),y=_r.useRef(null);_r.useEffect(()=>{y.current?.focus()},[]);let m="1A1A2E",g=_r.useCallback(async()=>{try{let f=await navigator.clipboard.readText();f&&r(f.trim())}catch{}},[r]),u=t.trim().length>0,w=Kr(t.trim());return Zr("div",{className:"sf-recipient",children:[Zr("div",{className:"sf-recipient-top",children:[Zr("div",{className:"sf-address-field","data-filled":u||void 0,"data-invalid":n.recipient||void 0,children:[kt("textarea",{ref:y,className:"sf-address-input",value:t,onChange:f=>r(f.target.value),placeholder:"Enter the recipient's address",autoComplete:"off",spellCheck:!1,"aria-label":"Recipient address",rows:u?2:1}),u?kt("button",{type:"button",className:"sf-address-action",onClick:()=>r(""),"aria-label":"Clear","data-track":"recipient_clear",children:kt(Pc,{size:20})}):kt("button",{type:"button",className:"sf-address-action",onClick:g,"aria-label":"Paste from clipboard","data-track":"recipient_paste",children:kt(Dc,{size:20})})]}),n.recipient&&kt("p",{className:"sf-field-error",role:"alert",children:n.recipient}),Zr("div",{className:"sf-tabs",role:"tablist",children:[kt("button",{type:"button",role:"tab",className:"sf-tab","data-active":h==="recent"||void 0,"aria-selected":h==="recent",onClick:()=>d("recent"),"data-track":"recipient_tab","data-track-id":"recent",children:"Recent"}),p&&kt("button",{type:"button",role:"tab",className:"sf-tab","data-active":h==="account"||void 0,"aria-selected":h==="account",onClick:()=>d("account"),"data-track":"recipient_tab","data-track-id":"account",children:"My Account"})]})]}),kt("div",{className:"sf-address-list",children:h==="account"&&p?c.map((f,R)=>{let x=zc(f,R),S=cn(s,f.address,{size:56,bg:m});return Zr("button",{type:"button",className:"sf-address-row",onClick:()=>l(f.address),"data-track":"recipient_item",children:[Zr("span",{className:"sf-address-avatar",children:[S&&kt("img",{src:S,alt:"",width:40,height:40,draggable:!1,onError:M=>{M.currentTarget.style.display="none"}}),kt("span",{className:"sf-address-avatar-fallback",children:Uc(x)})]}),Zr("span",{className:"sf-address-meta",children:[kt("span",{className:"sf-address-name",children:x}),kt("span",{className:"sf-address-value",children:qt(f.address)})]})]},f.address)}):o.length>0?o.map(f=>{let R=b.get(jc(f.address)),x=R?zc(R.account,R.index):qt(f.address),S=cn(s,f.address,{size:56,bg:m});return Zr("button",{type:"button",className:"sf-address-row",onClick:()=>l(f.address),"data-track":"recipient_item",children:[Zr("span",{className:"sf-address-avatar",children:[S&&kt("img",{src:S,alt:"",width:40,height:40,draggable:!1,onError:M=>{M.currentTarget.style.display="none"}}),kt("span",{className:"sf-address-avatar-fallback",children:Uc(x)})]}),Zr("span",{className:"sf-address-meta",children:[kt("span",{className:"sf-address-name",children:x}),kt("span",{className:"sf-address-value",children:qt(f.address)})]})]},f.address)}):kt("div",{className:"sf-empty",children:"No send history"})}),u&&!w&&!n.recipient&&kt("p",{className:"sf-field-error",role:"alert",children:"Enter a valid EVM recipient address."})]})}import{jsx as $t,jsxs as go}from"react/jsx-runtime";function Gc({flow:e}){let{status:t,txHash:r,error:n,copyHash:o,hashCopied:i,openTransaction:a}=e,s=t==="error",l=t==="success";return s?go("div",{className:"sf-body sf-result sf-result--error",children:[$t("span",{className:"sf-result-icon",children:$t(Oc,{size:56})}),go("div",{className:"sf-result-copy",children:[$t("h3",{className:"sf-result-title",children:"Transaction Failed"}),$t("p",{className:"sf-result-desc",children:n||"Something went wrong. Please try again."})]}),r&&$t(_c,{txHash:r,hashCopied:i,onCopy:o,onOpen:a})]}):go("div",{className:"sf-body sf-result",children:[$t("span",{className:"sf-result-icon","data-pending":!l||void 0,children:l?$t(Fc,{size:56}):$t("span",{className:"sf-result-spinner"})}),go("div",{className:"sf-result-copy",children:[$t("h3",{className:"sf-result-title",children:l?"Transaction Complete":"Transaction in Progress"}),$t("p",{className:"sf-result-desc",children:l?"Your transfer was sent successfully.":"Transfer in progress. Waiting for confirmation."})]}),r&&$t(_c,{txHash:r,hashCopied:i,onCopy:o,onOpen:a})]})}function _c({txHash:e,hashCopied:t,onCopy:r,onOpen:n}){return go("div",{className:"sf-result-hash-card",children:[$t("span",{className:"sf-result-hash-label",children:"Transaction Hash"}),go("div",{className:"sf-result-hash-row",children:[$t("button",{type:"button",className:"sf-result-hash-link",onClick:n,"aria-label":"Open transaction in explorer","data-track":"tx_link_open",children:qt(e)}),$t("button",{type:"button",className:"sf-result-copy-btn",onClick:r,"aria-label":"Copy transaction hash","data-track":"tx_hash_copy",children:t?$t(sn,{size:16}):"Copy"})]})]})}import{jsx as dt,jsxs as er}from"react/jsx-runtime";var Ui="\u2014";function Hc({flow:e}){let{token:t,reviewRawAmount:r,reviewRecipient:n,accountName:o,accounts:i,walletAddress:a,networkName:s,nativeSymbol:l,nativeDecimals:c,gasEstimate:p,gasLoading:b,gasError:h,insufficientGas:d,error:y,resolvedEnv:m}=e,g=yn(t),u=r!==null?Ai(r,t.quantity.decimals):"",w=o?.trim()||`Account ${(i[0]?.index??0)+1}`,f=cn(m,a,{size:56,bg:"1A1A2E"}),R=l||(g?t.symbol:""),x=Li(t.chainId),S=p?xc(p,x):null,M=p?Pi(p,x):null,C=I=>I!==null&&R?`${us(I,c)} ${R}`:Ui,v=I=>I!==void 0?`${wc(I)} Gwei`:Ui,E=(()=>{if(!g||!p||M===null||r===null)return Ui;let I=r+M;return`${us(I,c)} ${R||t.symbol}`})(),D=I=>b?"\u2026":I,B=[{label:"Est. Tx Fee",value:D(C(M))},...S==="dynamic"?[{label:"Max Priority Fee",value:D(v(p?.maxPriorityFeePerGas))},{label:"Max Gas Fee",value:D(v(p?.maxFeePerGas))}]:S==="legacy"?[{label:"Gas Price",value:D(v(p?Di(p):void 0))}]:[],{label:"Gas Limit",value:D(p?yc(p.gasLimit):Ui)}];return er("div",{className:"sf-body sf-review",children:[er("div",{className:"sf-review-amount",children:[dt("img",{className:"sf-review-amount-icon",src:t.icon_url,alt:"",width:40,height:40,draggable:!1,onError:I=>{I.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),er("span",{className:"sf-review-amount-value",children:[u,dt("span",{className:"sf-review-amount-symbol",children:t.symbol})]})]}),er("div",{className:"sf-review-parties",children:[er("div",{className:"sf-review-card sf-review-party",children:[dt("span",{className:"sf-review-party-label",children:"From"}),er("div",{className:"sf-review-party-head",children:[dt("span",{className:"sf-review-party-avatar",children:f&&dt("img",{src:f,alt:"",width:28,height:28,draggable:!1,onError:I=>{I.currentTarget.style.display="none"}})}),dt("span",{className:"sf-review-party-name",children:w})]}),dt("span",{className:"sf-review-party-addr",children:a})]}),dt("span",{className:"sf-review-arrow","aria-hidden":!0,children:dt(Bc,{size:16})}),er("div",{className:"sf-review-card sf-review-party",children:[dt("span",{className:"sf-review-party-label",children:"To"}),dt("span",{className:"sf-review-party-addr",children:n})]})]}),er("section",{className:"sf-review-card",children:[dt("h3",{className:"sf-review-section-title",children:"Summary"}),er("div",{className:"sf-review-row",children:[dt("span",{className:"sf-review-row-label",children:"Network"}),dt("span",{className:"sf-review-row-value",children:s})]}),B.map(I=>er("div",{className:"sf-review-row",children:[dt("span",{className:"sf-review-row-label",children:I.label}),dt("span",{className:"sf-review-row-value",children:I.value})]},I.label))]}),er("section",{className:"sf-review-card",children:[dt("h3",{className:"sf-review-section-title",children:"Total"}),er("div",{className:"sf-review-row",children:[dt("span",{className:"sf-review-row-label",children:"Total Amount"}),er("span",{className:"sf-review-row-value",children:[u," ",t.symbol]})]}),g&&er("div",{className:"sf-review-row",children:[dt("span",{className:"sf-review-row-label",children:"Max. Total Amount"}),dt("span",{className:"sf-review-row-value",children:D(E)})]})]}),d&&!h&&!y&&er("div",{className:"sf-message sf-message--error",role:"alert",children:["Not enough ",R||t.symbol," to cover the amount plus the network fee. Reduce the amount and try again."]}),(h||y)&&dt("div",{className:"sf-message sf-message--error",role:"alert",children:h||y})]})}import*as ji from"react";import{jsx as xn,jsxs as Hn}from"react/jsx-runtime";function Qc({flow:e}){let[t,r]=ji.useState(""),n=t.trim().toLowerCase(),o=ji.useMemo(()=>n?e.tokens.filter(i=>i.symbol.toLowerCase().includes(n)||i.name.toLowerCase().includes(n)):e.tokens,[e.tokens,n]);return Hn("div",{className:"sf-body sf-token-select",children:[Hn("div",{className:"sf-search",children:[xn(Lc,{size:20}),xn("input",{className:"sf-search-input",value:t,onChange:i=>r(i.target.value),placeholder:"Search Tokens",autoComplete:"off",spellCheck:!1,"aria-label":"Search tokens"})]}),Hn("div",{className:"sf-token-list",children:[o.map(i=>{let a=`${i.chainId}:${i.address.toLowerCase()}`,s=Go(e.resolvedEnv,i.chainId),l=e.getTokenPriceUsd?.(i);return Hn("button",{type:"button",className:"sf-token-row",onClick:()=>e.selectToken(i),"data-track":"token_item","data-track-id":i.symbol,children:[Hn("span",{className:"sf-token-left",children:[Hn("span",{className:"sf-token-icon-wrap",children:[xn("img",{className:"sf-token-icon",src:i.icon_url,alt:"",width:40,height:40,loading:"lazy",draggable:!1,onError:c=>{c.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),s&&xn("img",{className:"sf-token-chain-badge",src:s,alt:"","aria-hidden":!0,width:16,height:16,loading:"lazy",draggable:!1,onError:c=>{c.currentTarget.style.display="none"}})]}),xn("span",{className:"sf-token-name",children:i.symbol})]}),Hn("span",{className:"sf-token-right",children:[xn("span",{className:"sf-token-balance",children:wn(i.quantity.numeric,i.quantity.decimals)}),l!==void 0&&xn("span",{className:"sf-token-price",children:Bi(l)})]})]},a)}),o.length===0&&xn("div",{className:"sf-empty",children:"No tokens found"})]})]})}ae(`.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-system-orange-default, #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-system-orange-default, #f0640d)}.sf-address-field[data-filled]{border-color:var(--ds-system-orange-default, #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-system-orange-high, #e56f00)}.sf-tab[data-active]:after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:3px;border-radius:9999px;background:var(--ds-system-orange-high, #e56f00)}.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-system-orange-default, #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-system-orange-high, #e56f00)}.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
|
-
`);import{jsx as
|
|
8
|
-
`).map(i=>i.trim()).find(i=>i.length>0)||t}var Cg="0xe00e8bf3";function nd(e,t){let r=typeof e=="bigint"?e:BigInt(e);if(r<0n)throw new Error("poolId must be non-negative");if(t<0n)throw new Error("amount must be non-negative");let n=r.toString(16).padStart(64,"0"),o=t.toString(16).padStart(64,"0");return`${Cg}${n}${o}`}function ho(e){return!e||e<=0n?"0":new kr(e.toString()).shiftedBy(-9).toFormat(2,kr.ROUND_DOWN).replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"")}function Vi(e){return!e||e<=0n?"0":new kr(e.toString()).toFormat(0,kr.ROUND_DOWN)}function qi(e){if(!e||e<=0n)return"0";let t=new kr(e.toString()).shiftedBy(-18),r=t.isLessThan(1e-4)?7:4;return t.toFormat(r,kr.ROUND_DOWN).replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"")}function Xr(e,t){let r=new kr(e).shiftedBy(-t);return!r.isFinite()||r.isZero()?"0":r.isGreaterThanOrEqualTo(1)?r.toFormat(2,kr.ROUND_DOWN):r.toFormat(4,kr.ROUND_DOWN)}function vs(e){return Xr(e,0)}var qo={rate:1,symbol:"$"};function Qn(e,t=qo){let r=Number.isFinite(t.rate)&&t.rate>0?t.rate:1;return`${t.symbol||"$"}${e.times(r).toFormat(2,kr.ROUND_DOWN)}`}function Rn(e,t,r,n=qo){let o=new kr(r||"0");if(!o.isFinite()||o.isLessThanOrEqualTo(0))return null;let i=new kr(e||"0").shiftedBy(-t).times(o);return i.isFinite()?Qn(i,n):null}var Yo=Ng(null);function pt(){let e=Tg(Yo);if(!e)throw new Error("WalletPortfolio compound components must be used within <WalletPortfolio>");return e}function Rr(){let{conversionRatio:e,currencySymbol:t}=pt();return Ig(()=>({rate:typeof e=="number"&&e>0?e:qo.rate,symbol:t||qo.symbol}),[e,t])}import{Drawer as Mg}from"vaul";import{jsx as od}from"react/jsx-runtime";function id({asChild:e,children:t}){let{walletAddress:r}=pt(),n=t!=null,o=e??!0,i=n?t:od("button",{type:"button",children:qt(r)});return od(Mg.Trigger,{asChild:o,children:i})}import{Drawer as oa}from"vaul";import*as ft from"react";import{useQueryClient as h0}from"@tanstack/react-query";import{createContext as Eg,useContext as Ag}from"react";var ks=Eg(null);function ad(){return Ag(ks)}import{jsx as mr,jsxs as Xi}from"react/jsx-runtime";function sd({size:e=22,className:t}){return mr("svg",{width:e,height:e,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:mr("path",{d:"M14 4L7 11L14 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function ld({size:e=22,className:t}){return Xi("svg",{width:e,height:e,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[mr("path",{d:"M18.333 3.667v5.5h-5.5",stroke:"currentColor",strokeWidth:1.833,strokeLinecap:"round",strokeLinejoin:"round"}),mr("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 Yi({size:e=16,className:t}){return Xi("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[mr("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"}),mr("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 Ki({size:e=16,className:t}){return mr("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:mr("path",{d:"M13.333 4L6 11.333 2.667 8",stroke:"currentColor",strokeWidth:1.667,strokeLinecap:"round",strokeLinejoin:"round"})})}function Zi({size:e=48,className:t}){return Xi("svg",{width:e,height:e,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[mr("circle",{cx:"24",cy:"24",r:"24",fill:"currentColor"}),mr("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 gr({size:e=12,className:t}){return Xi("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:[mr("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"}),mr("path",{d:"M7 1H11V5",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),mr("path",{d:"M11 1L6 6",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})]})}import{useQuery as Lg}from"@tanstack/react-query";import{useMemo as cd}from"react";var Dg="wp:reward-pools";function bo(e,t=!0){let{data:r,...n}=Lg({queryKey:[Dg,e],queryFn:async({signal:a})=>{let s=await we("gameReward",e),l=await fetch(`${s}/v1/pools`,{cache:"no-store",signal:a});if(!l.ok)throw new Error(`Failed to fetch pools: ${l.status}`);let c=await l.json();if(c.code!==200)throw new Error(`Pools API error: ${c.code}`);return c},enabled:t,staleTime:0}),o=cd(()=>r?.data.pools.filter(a=>a.pool_type==="CrossPool")??[],[r]),i=cd(()=>r?.data.pools.filter(a=>a.pool_type==="GamePool")??[],[r]);return{crossPools:o,gamePools:i,allPools:r?.data.pools??[],...n}}import{useQuery as Pg}from"@tanstack/react-query";import{useMemo as Bg}from"react";var Fg="wp:user-deposits";function Ji(e,t,r=!0){let n=r&&!!t,{data:o,...i}=Pg({queryKey:[Fg,e,t],queryFn:async({signal:s})=>{let l=await we("gameReward",e),c=await fetch(`${l}/v1/users/${t}/deposits`,{cache:"no-store",signal:s});if(!c.ok)throw new Error(`Deposits fetch failed: ${c.status}`);let p=await c.json();if(p.code!==200)throw new Error(`Deposits API error: ${p.code}`);return p},enabled:n,staleTime:0});return{depositMap:Bg(()=>{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??[],...i}}import{useQuery as Og}from"@tanstack/react-query";import{useMemo as zg}from"react";var dd={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"},pd={dev:"https://stg.onechain.nexus/points",stage:"https://stg.onechain.nexus/points",production:"https://www.onechain.nexus/points"};var ud={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"};var Rs={dev:"https://dev-stake.ogfcorp.com",stage:"https://stg-stake.ogfcorp.com",production:"https://stake.ogfcorp.com"},fd={dev:`${Rs.dev}/portfolio`,stage:`${Rs.stage}/portfolio`,production:`${Rs.production}/portfolio`};var md={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"},Sr={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"},$i={dev:"https://stg-swap-api.crossdefi.io",stage:"https://stg-swap-api.crossdefi.io",production:"https://swap-api.crossdefi.io"},gd={dev:"https://stg.crossdefi.io",stage:"https://stg.crossdefi.io",production:"https://www.crossdefi.io"},hd={dev:"0x1Fa8C0bc5B754E82d55D60f0d6151903FD995b1B",stage:"0x1Fa8C0bc5B754E82d55D60f0d6151903FD995b1B",production:"0xEFd871aF7D695A0c1709e46b565761F4cd1Ef5ba"},bd={dev:"0xda37a3B60E6b97E8CB44b460130d40331efc566b",stage:"0xda37a3B60E6b97E8CB44b460130d40331efc566b",production:"0x731a104a4461ae45bfef520468b43c262d35e682"};var Ug="wp:token-info",jg="0x0000000000000000000000000000000000000001";function Jr(e,t=!0){let r=at[e].cross,{data:n,...o}=Og({queryKey:[Ug,e],queryFn:async({signal:p})=>{let b=await we("walletServer",e),h=await fetch(`${b}/v1/public/token/info`,{cache:"no-store",signal:p});if(!h.ok)throw new Error(`Failed to fetch token info: ${h.status}`);let d=await h.json();if(d.code!==200)throw new Error(`Token info API error: ${d.code}`);return d},enabled:t,staleTime:300*1e3}),{byChainAddr:i,byChainSym:a}=zg(()=>{let p=new Map,b=new Map;if(!n?.data)return{byChainAddr:p,byChainSym:b};for(let h of n.data){let d=h.address.toLowerCase();p.set(`${h.chain_id}:${d}`,h),p.set(d,h);let y=h.symbol.replace(/^t/,"").toUpperCase(),m=`${h.chain_id}:${y}`;b.has(m)||b.set(m,h),b.has(y)||b.set(y,h)}return{byChainAddr:p,byChainSym:b}},[n]);return{getTokenImage:(p,b,h)=>{let d=p.toLowerCase(),y=!!h?.chainOnly,m=i.get(`${r}:${d}`);if(m?.image)return m.image;if(!y){let g=i.get(d);if(g?.image)return g.image}if(b){let g=b.replace(/^t/,"").toUpperCase(),u=a.get(`${r}:${g}`);if(u?.image)return u.image;if(!y){let w=a.get(g);if(w?.image)return w.image}}return""},getTokenSymbol:(p,b,h)=>{let d=p.toLowerCase();return(i.get(`${r}:${d}`)??(h?.chainOnly?void 0:i.get(d)))?.symbol||b},getNativeToken:()=>i.get(`${r}:${jg}`),...o}}import*as Cs from"react";import{jsx as Ss,jsxs as wd}from"react/jsx-runtime";function Cr({sectionKey:e,title:t,icon:r,iconFit:n="cover",isEmpty:o,loading:i=!1,children:a}){let s=ad();return Cs.useEffect(()=>{s?.report(e,{loading:i,empty:o})},[s,e,i,o]),Cs.useEffect(()=>()=>s?.unregister(e),[s,e]),o?null:wd("div",{className:"wp-svc-card",children:[wd("div",{className:"wp-svc-card-head",children:[Ss("img",{className:"wp-svc-card-icon",src:r,alt:"",style:{objectFit:n}}),Ss("span",{className:"wp-svc-card-title",children:t})]}),Ss("div",{className:"wp-svc-items",children:a})]})}import Ns from"bignumber.js";import{jsx as Yt,jsxs as tr}from"react/jsx-runtime";var Wg="ONErewards";function _g(e){return new Ns(e||"0").isGreaterThan(0)}function yd(){let{env:e,walletAddress:t,onOutlink:r}=pt(),n=Rr(),o=!!t,{allPools:i,isLoading:a}=bo(e,o),{depositMap:s,isLoading:l}=Ji(e,t,o),{getTokenImage:c}=Jr(e,o),p=(d,y)=>`${dd[e]}/gametoken/tokens/${d.deposit_token.address}?mode=rewards${y==="withdraw"?"&trade=withdraw":""}`,b=`${Sr[e]}/reward.png`,h=i.filter(d=>{let y=s.get(d.pool_address.toLowerCase()),m=y?.deposited_amount??"0",g=y?.claimable_reward??"0";return!(new Ns(m).isZero()&&new Ns(g).isZero())});return Yt(Cr,{sectionKey:"rewards",title:Wg,icon:b,isEmpty:h.length===0,loading:a||l,children:h.map(d=>{let y=s.get(d.pool_address.toLowerCase()),m=y?.deposited_amount??"0",g=y?.claimable_reward??"0",u=p(d,"withdraw"),w=p(d,"claim"),f=c(d.deposit_token.address,d.deposit_token.symbol),R=d.reward_tokens[0],x=R?c(R.address,R.symbol):"",S=d.reward_tokens.map(I=>I.symbol),M=S.length>0?`${d.deposit_token.symbol}-${S.join("/")}`:d.deposit_token.symbol,C=R?Xr(g,R.decimals):"0",v=R?.symbol??"Reward",E=Rn(m,d.deposit_token.decimals,d.deposit_token.price,n),D=R?Rn(g,R.decimals,R.price,n):null,B=!!y&&_g(g);return tr("article",{className:"wp-item","data-side":"reward",children:[tr("div",{className:"wp-item-body",children:[tr("div",{className:"wp-item-line",children:[Yt("span",{className:"wp-item-label",children:"Pool (Deposit - Earn)"}),tr("div",{className:"wp-svc-token",children:[tr("span",{className:"wp-token-stack","aria-hidden":!0,children:[f&&Yt("img",{className:"wp-svc-token-icon",src:f,alt:""}),x&&Yt("img",{className:"wp-svc-token-icon",src:x,alt:""})]}),Yt("span",{children:M})]})]}),tr("div",{className:"wp-item-line",children:[Yt("span",{className:"wp-item-label",children:"Deposited"}),tr("div",{className:"wp-svc-token wp-svc-token--amount",children:[f&&Yt("img",{className:"wp-svc-token-icon",src:f,alt:""}),tr("div",{className:"wp-svc-amount",children:[Yt("span",{className:"wp-svc-amount-main",children:Xr(m,d.deposit_token.decimals)}),E&&Yt("span",{className:"wp-item-usd",children:E})]})]})]}),tr("div",{className:"wp-item-line",children:[tr("span",{className:"wp-item-label",children:["Claimable (",v,")"]}),tr("div",{className:"wp-svc-token wp-svc-token--amount",children:[x&&Yt("img",{className:"wp-svc-token-icon",src:x,alt:""}),tr("div",{className:"wp-svc-amount",children:[Yt("span",{className:"wp-svc-amount-main",children:C}),D&&Yt("span",{className:"wp-item-usd",children:D})]})]})]})]}),tr("div",{className:"wp-item-tags",children:[tr("a",{className:"wp-tag wp-tag--muted",href:u,target:"_blank",rel:"noopener noreferrer","data-track":"rewards_withdraw_open",onClick:I=>Rt(I,u,{category:"portfolio",origin:"portfolio-rewards",payload:{pool:d,userDeposit:y}},r),children:[Yt("span",{className:"wp-tag-label",children:"Withdraw"}),Yt(gr,{size:12,className:"wp-tag-icon"})]}),tr("a",{className:"wp-tag wp-tag--mint","data-disabled":!B||void 0,"aria-disabled":!B||void 0,href:B?w:void 0,target:B?"_blank":void 0,rel:B?"noopener noreferrer":void 0,onClick:I=>{if(!B){I.preventDefault();return}Rt(I,w,{category:"portfolio",origin:"portfolio-rewards",payload:{pool:d,userDeposit:y}},r)},children:[Yt("span",{className:"wp-tag-label",children:"Claim"}),Yt(gr,{size:12,className:"wp-tag-icon"})]})]})]},d.pool_address)})})}import*as Td from"react";import{useQuery as Zg}from"@tanstack/react-query";import{useMemo as ea}from"react";var Gg="0x70a08231",Hg="0x18160ddd",Qg="0x313ce567",Vg=8e3;async function qg(e,t,r,n){let o=new AbortController,i=setTimeout(()=>o.abort(),Vg);n&&n.addEventListener("abort",()=>o.abort(),{once:!0});let a=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:t,params:r}),signal:o.signal}).finally(()=>clearTimeout(i));if(!a.ok)throw new Error(`RPC ${t} HTTP ${a.status}`);let s=await a.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 Yg(e){return e.toLowerCase().replace(/^0x/,"").padStart(64,"0")}function Ko(e){if(!(!e||e==="0x"))try{return BigInt(e)}catch{return}}async function dn(e,t,r,n,o){try{return await qg(e,"eth_call",[o?{from:o,to:t,data:r}:{to:t,data:r},"latest"],n)}catch{return}}async function Kg(e,t,r,n){let[o,i,a]=await Promise.all([dn(e,r,Gg+Yg(t),n),dn(e,r,Hg,n),dn(e,r,Qg,n)]),s=Ko(o);if(s===void 0)return null;let l=Ko(a);return{balance:s,totalSupply:Ko(i),decimals:l!==void 0?Number(l):void 0}}async function Zo(e,t){let r=at[e].cross,n=await we("walletServer",e),o=await fetch(`${n}/v1/public/chain/info/${r}`,{cache:"no-store",signal:t});if(!o.ok)return;let i=await o.json();return("data"in i&&i.data!==void 0?Array.isArray(i.data)?i.data[0]:i.data:i)?.rpc||void 0}async function xd(e,t,r,n){if(!t||r.length===0)return{};let o;try{o=await Zo(e,n)}catch{o=void 0}if(!o)return{};let i=await Promise.all(r.map(async s=>[s.toLowerCase(),await Kg(o,t,s,n)])),a={};for(let[s,l]of i)l&&(a[s]=l);return a}var Xg="wp:withdraw-token-meta",Jg="0xc89039c5",$g="0x95d89b41",eh="0x313ce567";function th(e){if(!(!e||e==="0x"))try{let t=e.replace(/^0x/,""),r=Number(BigInt("0x"+t.slice(64,128)));if(!Number.isFinite(r)||r<=0||r>64)return;let n=t.slice(128,128+r*2),o="";for(let i=0;i<n.length;i+=2)o+=String.fromCharCode(parseInt(n.slice(i,i+2),16));return o||void 0}catch{return}}function rh(e){if(!e||e==="0x")return;let r="0x"+e.replace(/^0x/,"").padStart(64,"0").slice(24,64);return/^0x[a-f0-9]{40}$/.test(r)&&r!=="0x0000000000000000000000000000000000000000"?r:void 0}async function nh(e,t,r){if(t.length===0)return{};let n;try{n=await Zo(e,r)}catch{n=void 0}if(!n)return{};let o=await Promise.all(t.map(async a=>{let s=rh(await dn(n,a,Jg,r));if(!s)return[a.toLowerCase(),null];let[l,c]=await Promise.all([dn(n,s,$g,r),dn(n,s,eh,r)]),p=th(l),b=Ko(c);return p?[a.toLowerCase(),{tokenAddress:s,symbol:p,decimals:b!==void 0?Number(b):18}]:[a.toLowerCase(),null]})),i={};for(let[a,s]of o)s&&(i[a]=s);return i}function vd(e,t,r=!0){let o=r&&!!t,{allPools:i,isLoading:a}=bo(e,o),{deposits:s,isLoading:l}=Ji(e,t,o),c=ea(()=>{let g=new Map;for(let u of i)g.set(u.pool_address.toLowerCase(),u);return g},[i]),p=ea(()=>s.filter(g=>{try{return BigInt(g.deposited_amount||"0")>0n}catch{return!1}}),[s]),b=ea(()=>p.map(g=>g.pool_address.toLowerCase()).filter(g=>!c.has(g)).sort(),[p,c]),{data:h,isLoading:d}=Zg({queryKey:[Xg,e,b],queryFn:({signal:g})=>nh(e,b,g),enabled:o&&b.length>0,staleTime:1440*60*1e3});return{positions:ea(()=>{let g=[];for(let u of p){let w=u.pool_address.toLowerCase(),f=c.get(w);if(f){g.push({poolId:u.pool_id,poolAddress:u.pool_address,poolType:f.pool_type,tokenSymbol:f.deposit_token.symbol,tokenAddress:f.deposit_token.address,decimals:f.deposit_token.decimals,price:f.deposit_token.price,depositedRaw:u.deposited_amount});continue}let R=h?.[w];R&&g.push({poolId:u.pool_id,poolAddress:u.pool_address,poolType:"Unknown",tokenSymbol:R.symbol,tokenAddress:R.tokenAddress,decimals:R.decimals,depositedRaw:u.deposited_amount})}return g},[p,c,h]),isLoading:a||l||d}}import*as Bt from"react";import{Fragment as kd,jsx as ye,jsxs as wt}from"react/jsx-runtime";var oh=400;function ih(e,t,r){if(t==="loading")return"Estimating...";if(!e||t==="error"||t==="unavailable")return"Wallet estimate";let n=e.maxFeePerGas??e.gasPrice;return!n||n<=0n||e.gasLimit<=0n?"Wallet estimate":`${qi(e.gasLimit*n)} ${r??""}`.trim()}function Ts(e,t,r){return r==="loading"?"Estimating...":r==="error"||r==="unavailable"?"-":`${e} ${t}`.trim()}function ah({position:e,size:t}){return e.icon?ye("img",{src:e.icon,alt:"",width:t,height:t}):ye("span",{children:e.tokenSymbol.slice(0,1)})}function Rd({open:e,status:t,positions:r,initialPoolAddress:n,walletAddress:o,txHash:i,error:a,copied:s=!1,estimateWithdraw:l,onClose:c,onConfirm:p,onCopyHash:b,trackFunnel:h,nativeSymbol:d}){let[y,m]=Bt.useState(null),[g,u]=Bt.useState("idle"),w=Bt.useRef(0),f=Bt.useRef(void 0),R=Bt.useRef(null);Bt.useEffect(()=>()=>clearTimeout(f.current),[]);let x=Bt.useMemo(()=>{let K=n?.toLowerCase();return r.find(L=>L.poolAddress.toLowerCase()===K)??r[0]??null},[r,n]),S=Bt.useMemo(()=>{try{return BigInt(x?.depositedRaw??"0")}catch{return 0n}},[x?.depositedRaw]),M=x?.decimals??18;Bt.useEffect(()=>{!e||!x||h?.("position_selected")},[e,x,h]);let C=Bt.useCallback(()=>{m(null),u(l?"idle":"unavailable"),w.current+=1,R.current=null},[]);if(Bt.useEffect(()=>{e&&C()},[e,C]),Bt.useEffect(()=>{if(!e||t!=="confirm"){clearTimeout(f.current);return}if(!l||!x){clearTimeout(f.current),u("unavailable");return}if(S<=0n){clearTimeout(f.current),w.current+=1,R.current=null,m(null),u("idle");return}let K=`${x.poolAddress.toLowerCase()}:${S.toString()}`;if(R.current===K)return;R.current=K,clearTimeout(f.current);let L=w.current+1;w.current=L,u("loading"),f.current=setTimeout(()=>{l(x,S).then(P=>{w.current===L&&(m(P??null),u(P?"ready":"unavailable"))}).catch(()=>{w.current===L&&(m(null),u("error"))})},oh)},[e,t,S,l,x]),!e||!x)return null;let v=t==="submitting",E=ho(y?.maxPriorityFeePerGas),D=ho(y?.maxFeePerGas??y?.gasPrice),B=Vi(y?.gasLimit),I=Xr(x.depositedRaw,M);return ye("div",{className:"wp-claim-overlay",role:"presentation",onMouseDown:K=>{K.target===K.currentTarget&&!v&&c()},children:wt("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:[ye("div",{className:"wp-claim-grabber","aria-hidden":!0,children:ye("span",{})}),wt("div",{className:"wp-claim-content wp-withdraw-content",children:[t==="success"&&i?wt(kd,{children:[ye("span",{className:"wp-claim-icon wp-claim-icon--success","aria-hidden":!0,children:ye(Zi,{})}),wt("div",{className:"wp-claim-copy",children:[ye("h3",{id:"wp-withdraw-title",className:"wp-claim-title",children:"Withdraw Submitted!"}),ye("p",{className:"wp-claim-desc",children:"Your withdrawal request has been submitted. Balances will update shortly after the transaction settles."})]}),ye("div",{className:"wp-claim-list","aria-label":"Withdraw transaction",children:wt("div",{className:"wp-claim-list-item",children:[ye("span",{children:"Tx Hash"}),wt("button",{type:"button",className:"wp-claim-hash",onClick:b,"aria-label":"Copy transaction hash","data-track":"withdraw_hash_copy",children:[ye("strong",{children:Qi(i)}),s?ye(Ki,{}):ye(Yi,{})]})]})})]}):wt(kd,{children:[t==="error"&&wt("div",{className:"wp-claim-heading",children:[ye("h3",{id:"wp-withdraw-title",className:"wp-claim-title",children:"Withdraw Failed"}),ye("p",{className:"wp-claim-error-message",children:a||"The withdraw request could not be completed."})]}),wt("div",{className:"wp-claim-reward-card","data-fit":Qo(x.tokenSymbol,I),"aria-label":"Deposited balance",children:[ye("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:ye(ah,{position:x,size:28})}),ye("strong",{className:"wp-claim-reward-symbol",children:x.tokenSymbol}),ye("strong",{className:"wp-claim-reward-amount",children:I})]}),wt("div",{className:"wp-claim-account-card","aria-label":"Withdraw gas fee",children:[wt("div",{className:"wp-claim-account-row",children:[wt("div",{className:"wp-claim-account",children:[ye("span",{className:"wp-claim-account-avatar","aria-hidden":!0}),wt("strong",{children:[x.tokenSymbol," Pool"]})]}),ye("span",{children:Hi(o)})]}),ye("span",{className:"wp-claim-divider","aria-hidden":!0}),wt("div",{className:"wp-claim-detail-list",children:[wt("div",{className:"wp-claim-detail-row",children:[ye("span",{children:"Est. Tx Fee"}),ye("strong",{children:ih(y,g,d)})]}),wt("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[ye("span",{children:"Priority Fee Per Gas"}),ye("strong",{children:Ts(E,"Gwei",g)})]}),wt("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[ye("span",{children:"Max Fee Per Gas"}),ye("strong",{children:Ts(D,"Gwei",g)})]}),wt("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[ye("span",{children:"Gas Limit"}),ye("strong",{children:Ts(B,"",g)})]})]})]})]}),wt("div",{className:"wp-claim-actions","data-count":t==="confirm"||t==="error"?2:1,children:[(t==="confirm"||t==="error")&&ye("button",{type:"button",className:"wp-claim-secondary","data-track":"withdraw_cancel",onClick:c,children:t==="error"?"Close":"Cancel"}),wt("button",{type:"button",className:"wp-claim-primary","data-track":"withdraw_confirm",onClick:()=>{if(t==="success"){c();return}x&&S>0n&&p(x,S,y)},disabled:v||(t==="confirm"||t==="error")&&S<=0n,children:[t==="success"&&"Done",t==="submitting"&&ye("span",{className:"wp-claim-button-spinner","aria-label":"Waiting"}),t==="error"&&"Try Again",t==="confirm"&&"Withdraw Now"]})]})]}),ye("div",{className:"wp-claim-home-indicator","aria-hidden":!0,children:ye("span",{})})]})})}import*as ut from"react";import{useQueryClient as ch}from"@tanstack/react-query";import{useQuery as sh}from"@tanstack/react-query";var lh="wp:reward-factory-info";function Sd(e,t=!0){let{data:r,...n}=sh({queryKey:[lh,e],queryFn:async({signal:o})=>{let i=await we("gameReward",e),a=await fetch(`${i}/v1/factory/info`,{cache:"no-store",signal:o});if(!a.ok)throw new Error(`Factory info fetch failed: ${a.status}`);let s=await a.json();if(s.code!==200)throw new Error(`Factory info API error: ${s.code}`);return s},enabled:t,staleTime:0});return{factoryInfo:r?.data??null,routerAddress:r?.data.router_address??"",...n}}var dh="wp:";function Cd(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?e:null}function Nd(e){let{env:t,walletAddress:r,sendTransaction:n,estimateGas:o}=pt(),i=!!r,a=!!n,s=ch(),{routerAddress:l}=Sd(t,i&&a),c=Cd(l),[p,b]=ut.useState(!1),[h,d]=ut.useState(void 0),[y,m]=ut.useState("confirm"),[g,u]=ut.useState(),[w,f]=ut.useState(""),[R,x]=ut.useState(!1),S=ut.useRef(void 0);ut.useEffect(()=>()=>clearTimeout(S.current),[]);let M=ut.useRef(new Set),C=ut.useCallback((P,ne)=>{M.current.has(P)||(M.current.add(P),Te("withdraw",P,{...ne,tags:{section:e,...ne?.tags}}))},[e]),v=ut.useCallback((P,ne)=>c?{to:c,value:0n,data:nd(P,ne),chainId:at[t].cross}:null,[t,c]),E=ut.useCallback(()=>{s.invalidateQueries({predicate:P=>typeof P.queryKey[0]=="string"&&P.queryKey[0].startsWith(dh)})},[s]),D=ut.useCallback(P=>{d(P),b(!0),m("confirm"),u(void 0),f(""),x(!1),M.current=new Set,C("opened")},[C]),B=ut.useCallback(()=>{y!=="submitting"&&(b(!1),d(void 0),m("confirm"),u(void 0),f(""),x(!1),y==="success"&&E())},[y,E]),I=ut.useCallback(async(P,ne)=>{if(!o)return null;let V=v(P.poolId,ne),U=Cd(r);return!V||!U?null:o({...V,from:U})},[v,o,r]),K=ut.useCallback(async()=>{if(!(!g||typeof navigator>"u"||!navigator.clipboard))try{await navigator.clipboard.writeText(g),x(!0),clearTimeout(S.current),S.current=setTimeout(()=>x(!1),1400)}catch{x(!1)}},[g]),L=ut.useCallback(async(P,ne,V)=>{if(!n){m("error"),f("Withdraw is not available for this wallet.");return}if(!c){m("error"),f("Withdraw contract address is not available.");return}try{m("submitting"),f("");let U=v(P.poolId,ne);if(!U){m("error"),f("Withdraw contract address is not available.");return}C("submitted");let ce=await n({...U,gas:V?.gasLimit&&V.gasLimit>0n?V.gasLimit:void 0,maxFeePerGas:V?.maxFeePerGas&&V.maxFeePerGas>0n?V.maxFeePerGas:void 0,maxPriorityFeePerGas:V?.maxPriorityFeePerGas&&V.maxPriorityFeePerGas>0n?V.maxPriorityFeePerGas:void 0});u(ce),m("success"),C("confirmed"),E()}catch(U){m("error"),f(Vo(U,"Failed to request withdraw.")),C("confirmed",{status:"failure",reason:ur(U)})}},[v,E,c,n,C]);return{canWithdrawInline:a,isOpen:p,initialPoolAddress:h,status:y,txHash:g,error:w,copied:R,hasEstimator:!!o,openWithdraw:D,closeWithdraw:B,estimateWithdraw:I,confirmWithdraw:L,copyHash:K,trackFunnelOnce:C}}import{Fragment as uh,jsx as or,jsxs as pn}from"react/jsx-runtime";var ph="ONEpoints";function Id(){let{env:e,walletAddress:t,onOutlink:r}=pt(),n=Rr(),o=!!t,{getTokenImage:i,getNativeToken:a}=Jr(e,o),s=Nd("points"),{positions:l,isLoading:c}=vd(e,t,o),p=Td.useMemo(()=>l.filter(rd).map(d=>({...d,icon:i(d.tokenAddress,d.tokenSymbol)})),[l,i]),b=`${Sr[e]}/point.png`,h=pd[e];return pn(uh,{children:[or(Cr,{sectionKey:"points",title:ph,icon:b,isEmpty:p.length===0,loading:c,children:p.map(d=>{let y=d.price?Rn(d.depositedRaw,d.decimals,d.price,n):null;return pn("article",{className:"wp-item","data-side":"reward",children:[pn("div",{className:"wp-item-body",children:[pn("div",{className:"wp-item-line",children:[or("span",{className:"wp-item-label",children:"Token"}),pn("div",{className:"wp-svc-token",children:[d.icon&&or("img",{className:"wp-svc-token-icon",src:d.icon,alt:""}),or("span",{children:d.tokenSymbol})]})]}),pn("div",{className:"wp-item-line",children:[or("span",{className:"wp-item-label",children:"Deposited"}),pn("div",{className:"wp-svc-token wp-svc-token--amount",children:[d.icon&&or("img",{className:"wp-svc-token-icon",src:d.icon,alt:""}),pn("div",{className:"wp-svc-amount",children:[or("span",{className:"wp-svc-amount-main",children:Xr(d.depositedRaw,d.decimals)}),y&&or("span",{className:"wp-item-usd",children:y})]})]})]})]}),or("div",{className:"wp-item-tags",children:s.canWithdrawInline?or("button",{type:"button",className:"wp-tag wp-tag--muted","data-track":"points_withdraw_open",onClick:()=>s.openWithdraw(d.poolAddress),children:or("span",{className:"wp-tag-label",children:"Withdraw"})}):pn("a",{className:"wp-tag wp-tag--muted",href:h,target:"_blank",rel:"noopener noreferrer","data-track":"points_withdraw_open",onClick:m=>Rt(m,h,{category:"portfolio",origin:"portfolio-points",payload:{position:d}},r),children:[or("span",{className:"wp-tag-label",children:"Withdraw"}),or(gr,{size:12,className:"wp-tag-icon"})]})})]},d.poolAddress)})}),or(Rd,{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:a()?.symbol})]})}import*as Is from"react";import{useQuery as fh}from"@tanstack/react-query";var mh="wp:stake-info";function Md(e,t,r=!0){let n=r&&!!t,{data:o,...i}=fh({queryKey:[mh,e,t],queryFn:async({signal:s})=>{let l=await we("posa",e),c=await fetch(`${l}/stake/${t}`,{cache:"no-store",signal:s});if(!c.ok)throw new Error(`Stake info fetch failed: ${c.status}`);let p=await c.json();if(p.code!==0&&p.code!==200)throw new Error(`Stake info API error: ${p.code}`);return p},enabled:n,staleTime:0});return{stakeInfo:o?.data,...i}}import{useQuery as gh}from"@tanstack/react-query";var hh="wp:stake-rewards",bh=31;function Ed(e,t,r=!0){let n=r&&!!t,{data:o,...i}=gh({queryKey:[hh,e,t],queryFn:async({signal:a})=>{let s=await we("posa",e),l=await fetch(`${s}/rewards/${t}?limit=${bh}`,{cache:"no-store",signal:a});if(!l.ok)throw new Error(`Stake rewards fetch failed: ${l.status}`);let c=await l.json();if(c.code!==0&&c.code!==200)throw new Error(`Stake rewards API error: ${c.code}`);return c.data?.data??[]},enabled:n,staleTime:0});return{latestReward:o?.[0]??null,aprAccrued:td(o),...i}}import{useQuery as wh}from"@tanstack/react-query";var yh="wp:staking-onchain";function Ad(e,t,r=!0){let n=r&&!!t&&!!e,{data:o,...i}=wh({queryKey:[yh,e],queryFn:async()=>{if(!t)throw new Error("stakingRewardsReader not provided");return t(e)},enabled:n,staleTime:0});return{onchain:o,...i}}import{useMemo as Ld}from"react";import xh from"bignumber.js";function Dd(e){return e?.trim().toUpperCase()==="ONE"}function Pd(e){return new xh(e||"0").isGreaterThan(0)}function ta(e,t,r=!0){let{allPools:n}=bo(e,r),o=Ld(()=>{for(let c of n)for(let p of[c.deposit_token,...c.reward_tokens])if(Dd(p?.symbol)&&Pd(p.price))return p.price},[n]),i=r&&o===void 0,{tokens:a}=vn(e,t,i),{statsMap:s}=kn(e,i),l=at[e].cross;return Ld(()=>{if(o)return o;let c=a.find(p=>p.chainId===l&&Dd(p.symbol));if(c){let p=s.get(vr(c.chainId,c.address));if(p&&Pd(p.price))return p.price}return"0"},[o,a,s,l])}import Cn from"bignumber.js";import{jsx as Nr,jsxs as Sn}from"react/jsx-runtime";function vh(e){if(!e)return"\u2014";let t=new Cn(e);return t.isFinite()?`${t.toFormat(2,Cn.ROUND_DOWN)}%`:"\u2014"}function Bd(){let{env:e,walletAddress:t,onOutlink:r,stakingRewardsReader:n}=pt(),o=Rr(),i=!!t,{stakeInfo:a,isLoading:s}=Md(e,t,i),{latestReward:l,aprAccrued:c,isLoading:p}=Ed(e,t,i),{onchain:b}=Ad(t,n,i),h=ta(e,t,i),{getNativeToken:d}=Jr(e,i),y=d()?.symbol,m="ONEstaking",g=`${Sr[e]}/cross-staking.png`,u=fd[e],w=a?.total_stake??"0",f=Is.useMemo(()=>b?new Cn(b.earnedWei.toString()).shiftedBy(-18).toString(10):l?.cumulative_earned??a?.rewards_earned??"0",[b,l,a]),R=Is.useMemo(()=>b?new Cn(b.stakedWei.toString()).shiftedBy(-18):new Cn(w),[b,w]),x=c!==void 0?new Cn(c):void 0,S=a?.days_since_first_stake,M=x!==void 0&&x.isFinite()&&R.isGreaterThan(0)&&S!==null&&S!==void 0?x.div(R).times(365).div(Math.max(1,S)).times(100):void 0,C=!(new Cn(w).isZero()&&new Cn(f).isZero()),v=Rn(w,0,h,o),E=Rn(f,0,h,o);return Nr(Cr,{sectionKey:"staking",title:m,icon:g,iconFit:"contain",isEmpty:!C,loading:s||p,children:Sn("article",{className:"wp-item","data-side":"stake",children:[Sn("div",{className:"wp-item-body",children:[Sn("div",{className:"wp-item-line",children:[Nr("span",{className:"wp-item-label",children:"Staked"}),Sn("div",{className:"wp-svc-amount",children:[Nr("span",{className:"wp-svc-amount-main",children:`${vs(w)} ${y??""}`.trim()}),v&&Nr("span",{className:"wp-item-usd",children:v})]})]}),Sn("div",{className:"wp-item-line",children:[Nr("span",{className:"wp-item-label",children:"Rewards Earned"}),Sn("div",{className:"wp-svc-amount",children:[Nr("span",{className:"wp-svc-amount-main",children:`${vs(f)} ${y??""}`.trim()}),E&&Nr("span",{className:"wp-item-usd",children:E})]})]}),Sn("div",{className:"wp-item-line",children:[Nr("span",{className:"wp-item-label",children:"My APR"}),Nr("span",{children:vh(M?.toString(10))})]})]}),Nr("div",{className:"wp-item-tags",children:Sn("a",{className:"wp-tag wp-tag--mint",href:u,target:"_blank",rel:"noopener noreferrer","data-track":"stake_outlink",onClick:D=>Rt(D,u,{category:"portfolio",origin:"portfolio-stake",payload:{stakeInfo:a}},r),children:[Nr("span",{className:"wp-tag-label",children:"Manage"}),Nr(gr,{size:12,className:"wp-tag-icon"})]})})]})})}import*as Ms from"react";import{useQuery as kh}from"@tanstack/react-query";var Rh="wp:game-swap-pools";function Fd(e,t,r=!0){let n=r&&!!t,{data:o,...i}=kh({queryKey:[Rh,e,t],queryFn:async({signal:a})=>{let s=await we("gameSwap",e),l=await fetch(`${s}/addresses/${t}/portfolio`,{cache:"no-store",signal:a});if(!l.ok)throw new Error(`Game-swap portfolio fetch failed: ${l.status}`);return(await l.json()).pools??[]},enabled:n,staleTime:0});return{pools:o??[],...i}}import{useQuery as Sh}from"@tanstack/react-query";var Ch="wp:game-swap-lp-balances";function Od(e,t,r,n){let o=[...r].map(l=>l.toLowerCase()).sort(),i=!!t&&o.length>0,{data:a,...s}=Sh({queryKey:[Ch,e,t,o,!!n],queryFn:async({signal:l})=>{let c=n?await n(o):await xd(e,t,o,l),p={};for(let[b,h]of Object.entries(c))p[b.toLowerCase()]=h;return p},enabled:i,staleTime:0});return{balances:a??{},...s}}import un from"bignumber.js";import{jsx as Tr,jsxs as Gr}from"react/jsx-runtime";var Nh="Gametoken LP",Ud=18,Th=new un("0.0001");function zd(e){return e?.trim().toUpperCase()==="ONE"}function Ih(e){return e&&e>0?e:Ud}function Mh(e){let t=zd(e.token_a?.symbol)&&!zd(e.token_b?.symbol),r=t?e.reserve_a:e.reserve_b,n=Ih(t?e.token_a?.decimals:e.token_b?.decimals),o=new un(r||"0").shiftedBy(-n);return!o.isFinite()||o.isLessThanOrEqualTo(0)?new un(0):o.times(2)}function Eh(e,t,r,n){let o=e.token_a?.symbol?.trim()||"TOKEN",i=e.token_b?.symbol?.trim()||n||"?",a=t?.decimals??Ud,s,l;if(t&&t.totalSupply&&t.totalSupply>BigInt(0)){let c=new un(t.balance.toString()),p=new un(t.totalSupply.toString()),b=c.div(p);s=b.times(100);let h=b.times(Mh(e));if(h.isGreaterThan(0)){let d=new un(e.quote_usd??e.cross_usd??"0");l=d.isGreaterThan(0)?Qn(h.times(d),r):`${h.toFormat(4,un.ROUND_DOWN)} ${n??""}`.trim()}}return{pool:e,tokenASymbol:o,tokenBSymbol:i,info:t,lpAmountRaw:t?.balance.toString(),lpDecimals:a,sharePercent:s,valueText:l}}function jd(){let{env:e,walletAddress:t,onOutlink:r,lpBalanceReader:n}=pt(),o=Rr(),i=!!t,{pools:a,isLoading:s}=Fd(e,t,i),l=Ms.useMemo(()=>a.map(u=>u.pair_address).filter(Boolean),[a]),{balances:c,isLoading:p}=Od(e,t,l,n),{getNativeToken:b}=Jr(e,i),h=b()?.symbol,d=`${Sr[e]}/game-token.png`,y=Object.keys(c).length>0,m=Ms.useMemo(()=>{let u=a.map(w=>Eh(w,c[w.pair_address?.toLowerCase()],o,h));return y?u.filter(w=>w.lpAmountRaw?new un(w.lpAmountRaw).shiftedBy(-w.lpDecimals).isGreaterThanOrEqualTo(Th):!1):u},[a,c,y,o,h]),g=u=>{let w=u.token_a?.address??u.pair_address;return`${md[e]}/gametoken/tokens/${w}?trade=deposit`};return Tr(Cr,{sectionKey:"gameSwap",title:Nh,icon:d,iconFit:"contain",isEmpty:m.length===0,loading:s||p,children:m.map(u=>{let{pool:w}=u,f=g(w),R=`${u.tokenASymbol} / ${u.tokenBSymbol}`,x=w.token_a?.logo_url,S=w.token_b?.logo_url;return Gr("article",{className:"wp-item","data-side":"game-swap",children:[Gr("div",{className:"wp-item-body",children:[Gr("div",{className:"wp-item-line",children:[Tr("span",{className:"wp-item-label",children:"Pool"}),Gr("div",{className:"wp-svc-token",children:[Gr("span",{className:"wp-token-stack","aria-hidden":!0,children:[x&&Tr("img",{className:"wp-svc-token-icon",src:x,alt:""}),S&&Tr("img",{className:"wp-svc-token-icon",src:S,alt:""})]}),Tr("span",{children:R})]})]}),u.lpAmountRaw!==void 0&&Gr("div",{className:"wp-item-line",children:[Tr("span",{className:"wp-item-label",children:"My LP"}),Gr("span",{children:[Xr(u.lpAmountRaw,u.lpDecimals)," LP"]})]}),u.sharePercent!==void 0&&Gr("div",{className:"wp-item-line",children:[Tr("span",{className:"wp-item-label",children:"Pool Share"}),Gr("span",{children:[u.sharePercent.toFormat(2,un.ROUND_DOWN),"%"]})]}),u.valueText!==void 0&&Gr("div",{className:"wp-item-line",children:[Tr("span",{className:"wp-item-label",children:"Value"}),Tr("span",{children:u.valueText})]})]}),Tr("div",{className:"wp-item-tags",children:Gr("a",{className:"wp-tag wp-tag--mint",href:f,target:"_blank",rel:"noopener noreferrer","data-track":"gameswap_outlink","data-track-id":R,onClick:M=>Rt(M,f,{category:"portfolio",origin:"portfolio-game-swap",payload:{pool:w}},r),children:[Tr("span",{className:"wp-tag-label",children:"Manage"}),Tr(gr,{size:12,className:"wp-tag-icon"})]})})]},w.pair_address)})})}import Vn from"bignumber.js";import{useMemo as Oh}from"react";import{useQuery as Ah}from"@tanstack/react-query";var Lh="wp:forge-pools";function Wd(e,t,r=!0){let n=r&&!!t,{data:o,...i}=Ah({queryKey:[Lh,e,t],queryFn:async()=>{let s=await we("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:n,staleTime:0}),a=o??[];return{pools:a,isEmpty:a.length===0,...i}}import{useQueries as Dh}from"@tanstack/react-query";import{useMemo as Ph}from"react";var Bh="wp:forge-token-detail";async function Fh(e,t){let r=await fetch(`${e}/v1/tokens/${t}`,{cache:"no-store"});return r.ok?(await r.json())?.data?.token??null:null}function _d(e,t,r=!0){let n=Dh({queries:t.map(a=>({queryKey:[Bh,e,a],queryFn:async()=>Fh(await we("bondingCurve",e),a),enabled:r&&!!a,staleTime:3e4}))}),o=Ph(()=>{let a=new Map;for(let s=0;s<n.length;s++){let l=n[s]?.data,c=t[s];l&&c&&a.set(c.toLowerCase(),l)}return a},[n,t]),i=n.some(a=>a.isLoading);return{detailMap:o,isLoading:i}}import{jsx as ir,jsxs as Nn}from"react/jsx-runtime";var zh="ONEforge",Gd=18,Uh="https://contents.crosstoken.io/wallet/token/images/FT.png";function jh(e){if(!e||e==="0")return"0";let t=new Vn(e).shiftedBy(-Gd);return t.isZero()?"0":t.isGreaterThanOrEqualTo(1)?t.toFormat(2,Vn.ROUND_DOWN):t.toFormat(4,Vn.ROUND_DOWN)}function Wh(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 _h(e,t,r,n){let o=new Vn(r||"0");if(!o.isGreaterThan(0))return null;let i=new Vn(e.total_supply||"0"),a=new Vn(e.lp_balance||"0"),s=new Vn(t?.reserve_b||"0").shiftedBy(-Gd);if(!i.isGreaterThan(0)||!a.isGreaterThan(0)||!s.isGreaterThan(0))return null;let l=s.times(2),p=a.div(i).times(l).times(o);return p.isFinite()?Qn(p,n):null}function Hd(){let{env:e,walletAddress:t,onOutlink:r}=pt(),n=Rr(),o=!!t,{pools:i,isEmpty:a,isLoading:s}=Wd(e,t,o),l=Oh(()=>i.map(d=>d.token.address),[i]),{detailMap:c}=_d(e,l,o&&l.length>0),p=ta(e,t,o),b=d=>`${ud[e]}/forge/token/${d.token.address}`,h=`${Sr[e]}/forge.png`;return ir(Cr,{sectionKey:"forge",title:zh,icon:h,iconFit:"contain",isEmpty:a,loading:s,children:i.map(d=>{let y=c.get(d.token.address.toLowerCase()),m=y?.image_url||y?.image||d.token.image||Uh,g=y?.symbol||d.token.symbol,u=b(d),w=_h(d,y,p,n);return Nn("a",{className:"wp-item","data-side":"lp",href:u,target:"_blank",rel:"noopener noreferrer","data-track":"forge_outlink","data-track-id":g,onClick:f=>Rt(f,u,{category:"portfolio",origin:"portfolio-forge",payload:{pool:d,tokenDetail:y}},r),children:[Nn("div",{className:"wp-item-body",children:[Nn("div",{className:"wp-item-line",children:[ir("span",{className:"wp-item-label",children:"Asset"}),Nn("div",{className:"wp-svc-token",children:[ir("img",{className:"wp-svc-token-icon",src:m,alt:""}),ir("span",{children:g}),y?.name&&ir("span",{className:"wp-token-subtle",children:y.name})]})]}),Nn("div",{className:"wp-item-line",children:[ir("span",{className:"wp-item-label",children:"LP Balance"}),ir("div",{className:"wp-svc-token wp-svc-token--amount",children:Nn("div",{className:"wp-svc-amount",children:[ir("span",{className:"wp-svc-amount-main",children:jh(d.lp_balance)}),w&&ir("span",{className:"wp-item-usd",children:w})]})})]}),Nn("div",{className:"wp-item-line",children:[ir("span",{className:"wp-item-label",children:"Ownership"}),ir("span",{className:"wp-line-value",children:Wh(d.pool_ownership)})]})]}),ir("div",{className:"wp-item-tags",children:Nn("span",{className:"wp-tag wp-tag--muted",children:[ir("span",{className:"wp-tag-label",children:"Withdraw"}),ir(gr,{size:12,className:"wp-tag-icon"})]})})]},d.pair_address)})})}import{useMemo as np}from"react";import f0 from"bignumber.js";import{useQuery as Gh}from"@tanstack/react-query";var Hh="wp:crossd-positions";function Qh(e){let t=e??{};return(t.positions??t.data?.positions??[]).filter(n=>{if(!n?.token_id||!n.liquidity)return!1;try{return BigInt(n.liquidity)>0n}catch{return!1}})}function Qd(e,t,r=!0){let n=r&&!!t,{data:o,...i}=Gh({queryKey:[Hh,e,t],queryFn:async()=>{let s=await fetch(`${$i[e]}/api/v1/positions?owner=${t}`,{cache:"no-store"});if(!s.ok)throw new Error(`crossd positions fetch failed: ${s.status}`);return Qh(await s.json())},enabled:n,staleTime:0}),a=o??[];return{positions:a,isEmpty:a.length===0,...i}}import{useQueries as Vh}from"@tanstack/react-query";import{useMemo as qh}from"react";var Yh="wp:crossd-position-details";function Kh(e){let t=e??{},r=t.data??t;return r?.token_id||r?.pool?r:null}function Vd(e,t,r=!0){let n=Vh({queries:t.map(i=>({queryKey:[Yh,e,i],queryFn:async()=>{let a=await fetch(`${$i[e]}/api/v1/positions/${i}`,{cache:"no-store"});if(!a.ok)throw new Error(`crossd position detail failed: ${a.status}`);return Kh(await a.json())},enabled:r&&!!i,staleTime:6e4}))});return{detailMap:qh(()=>{let i=new Map;return n.forEach((a,s)=>{let l=a.data,c=t[s];l&&c&&i.set(c,l)}),i},[n,t])}}import*as fn from"react";import{Fragment as Yd,jsx as he,jsxs as Ft}from"react/jsx-runtime";var Zh=300*1e3,qd="https://contents.crosstoken.io/wallet/token/images/Cross.svg";function Xh(e,t,r){if(t)return"Estimating...";if(!e)return"Wallet estimate";let n=e.maxFeePerGas??e.gasPrice;return!n||n<=0n||e.gasLimit<=0n?"Wallet estimate":`${qi(e.gasLimit*n)} ${r??""}`.trim()}function Es(e,t,r){return r?"Estimating...":`${e} ${t}`.trim()}function Kd({open:e,status:t,target:r,token0Icon:n,token1Icon:o,token0Symbol:i,token1Symbol:a,nativeSymbol:s,txHash:l,error:c,copied:p=!1,hasEstimator:b,prepareWithdraw:h,confirmWithdraw:d,onClose:y,onCopyHash:m,trackFunnel:g}){let[u,w]=fn.useState(null),[f,R]=fn.useState(null),x=fn.useRef(0);fn.useEffect(()=>{if(!e||!r)return;let J=++x.current;w(null),R(null),g?.("dialog_opened"),h().then(pe=>{x.current===J&&(w(pe),R(pe?Date.now():null))})},[e,r]);let S=t==="submitting",M=t==="estimating"||t==="confirm"&&!u,C=fn.useCallback(async()=>{let J=u,pe=!f||Date.now()-f>Zh;if(!J||pe){let se=++x.current;if(J=await h(),x.current!==se)return;w(J),R(J?Date.now():null)}J&&await d(J)},[u,f,h,d]);if(!e||!r)return null;let{position:v,detail:E}=r,D=E.pool?.token0,B=E.pool?.token1,I=i||D?.symbol||v.pool?.token0_symbol||"?",K=a||B?.symbol||v.pool?.token1_symbol||"?",L=D?.decimals??18,P=B?.decimals??18,ne=n||D?.logo_url||qd,V=o||B?.logo_url||qd,U=`${I}/${K}`,ce=u?mo(u.expectedAmount0.toString(),L):null,Z=u?mo(u.expectedAmount1.toString(),P):null,G=ho(u?.estimate?.maxPriorityFeePerGas),z=ho(u?.estimate?.maxFeePerGas??u?.estimate?.gasPrice),ee=Vi(u?.estimate?.gasLimit);return he("div",{className:"wp-claim-overlay",role:"presentation",onMouseDown:J=>{J.target===J.currentTarget&&!S&&y()},children:Ft("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:[he("div",{className:"wp-claim-grabber","aria-hidden":!0,children:he("span",{})}),Ft("div",{className:"wp-claim-content wp-withdraw-content",children:[t==="success"&&l?Ft(Yd,{children:[he("span",{className:"wp-claim-icon wp-claim-icon--success","aria-hidden":!0,children:he(Zi,{})}),Ft("div",{className:"wp-claim-copy",children:[he("h3",{id:"wp-crossd-withdraw-title",className:"wp-claim-title",children:"Withdraw Submitted!"}),Ft("p",{className:"wp-claim-desc",children:["Your ",U," position withdrawal has been submitted. Balances will update shortly after the transaction settles."]})]}),he("div",{className:"wp-claim-list","aria-label":"Withdraw transaction",children:Ft("div",{className:"wp-claim-list-item",children:[he("span",{children:"Tx Hash"}),Ft("button",{type:"button",className:"wp-claim-hash",onClick:m,"aria-label":"Copy transaction hash","data-track":"crossd_withdraw_hash_copy",children:[he("strong",{children:Qi(l)}),p?he(Ki,{}):he(Yi,{})]})]})})]}):Ft(Yd,{children:[t==="error"&&Ft("div",{className:"wp-claim-heading",children:[he("h3",{id:"wp-crossd-withdraw-title",className:"wp-claim-title",children:"Withdraw Failed"}),he("p",{className:"wp-claim-error-message",children:c||"The withdraw request could not be completed."})]}),Ft("div",{className:"wp-claim-reward-card","data-fit":Qo(I,ce??""),"aria-label":`Expected ${I}`,children:[he("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:he("img",{src:ne,alt:"",width:28,height:28})}),he("strong",{className:"wp-claim-reward-symbol",children:I}),he("strong",{className:"wp-claim-reward-amount",children:ce??"Estimating..."})]}),Ft("div",{className:"wp-claim-reward-card","data-fit":Qo(K,Z??""),"aria-label":`Expected ${K}`,children:[he("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:he("img",{src:V,alt:"",width:28,height:28})}),he("strong",{className:"wp-claim-reward-symbol",children:K}),he("strong",{className:"wp-claim-reward-amount",children:Z??"Estimating..."})]}),b&&he("div",{className:"wp-claim-account-card","aria-label":"Withdraw gas fee",children:Ft("div",{className:"wp-claim-detail-list",children:[Ft("div",{className:"wp-claim-detail-row",children:[he("span",{children:"Est. Tx Fee"}),he("strong",{children:Xh(u?.estimate,M,s)})]}),Ft("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[he("span",{children:"Priority Fee Per Gas"}),he("strong",{children:Es(G,"Gwei",M)})]}),Ft("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[he("span",{children:"Max Fee Per Gas"}),he("strong",{children:Es(z,"Gwei",M)})]}),Ft("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[he("span",{children:"Gas Limit"}),he("strong",{children:Es(ee,"",M)})]})]})})]}),Ft("div",{className:"wp-claim-actions","data-count":t==="confirm"||t==="error"?2:1,children:[(t==="confirm"||t==="error")&&he("button",{type:"button",className:"wp-claim-secondary","data-track":"crossd_withdraw_cancel",onClick:y,children:t==="error"?"Close":"Cancel"}),he("button",{type:"button",className:"wp-claim-primary","data-track":"crossd_withdraw_confirm",onClick:()=>{if(t==="success"){y();return}S||M||(g?.("confirm_clicked"),C())},disabled:S||M,children:t==="success"?"Done":S?he("span",{className:"wp-claim-button-spinner","aria-label":"Waiting"}):M?he("span",{className:"wp-claim-button-spinner","aria-label":"Estimating"}):t==="error"?"Retry":"Withdraw"})]})]}),he("div",{className:"wp-claim-home-indicator","aria-hidden":!0,children:he("span",{})})]})})}import*as nt from"react";import{useQueryClient as c0}from"@tanstack/react-query";var Jh="0x0c49ccbe",$h="0xfc6f7865",e0="0x49404b7c",t0="0xdf2ab5bb",r0="0xac9650d8",Zd=(1n<<128n)-1n,Jd=600n,n0=99n,o0=100n;function As(e){return e*n0/o0}function Xd(e,t){return!!e&&!!t&&e.toLowerCase()===t.toLowerCase()}function ar(e,t){if(e<0n)throw new Error(`${t} must be non-negative`);let r=e.toString(16);if(r.length>64)throw new Error(`${t} exceeds uint256`);return r.padStart(64,"0")}function ra(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 Ls(e){return Jh+ar(e.tokenId,"tokenId")+ar(e.liquidity,"liquidity")+ar(e.amount0Min,"amount0Min")+ar(e.amount1Min,"amount1Min")+ar(e.deadline,"deadline")}function i0(e){return $h+ar(e.tokenId,"tokenId")+ra(e.recipient,"recipient")+ar(e.amount0Max,"amount0Max")+ar(e.amount1Max,"amount1Max")}function a0(e,t){return e0+ar(e,"amountMinimum")+ra(t,"recipient")}function s0(e,t,r){return t0+ra(e,"token")+ar(t,"amountMinimum")+ra(r,"recipient")}function l0(e){if(e.length===0)throw new Error("multicall requires at least one call");let t=e.map(o=>{let i=o.replace(/^0x/,"");if(i.length%2!==0||!/^[0-9a-fA-F]*$/.test(i))throw new Error("multicall element must be valid hex bytes");let a=i.length%64===0?i:i.padEnd(i.length+(64-i.length%64),"0");return ar(BigInt(i.length/2),"callLength")+a.toLowerCase()}),r=BigInt(e.length)*32n,n=[];for(let o of t)n.push(ar(r,"callOffset")),r+=BigInt(o.length/2);return r0+ar(0x20n,"arrayOffset")+ar(BigInt(e.length),"arrayLength")+n.join("")+t.join("")}function $d(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 ep(e){let t=Xd(e.token0,e.wcrossAddress),r=Xd(e.token1,e.wcrossAddress),n=t||r,o=[Ls({tokenId:e.tokenId,liquidity:e.liquidity,amount0Min:e.amount0Min,amount1Min:e.amount1Min,deadline:e.deadline}),i0({tokenId:e.tokenId,recipient:n?e.positionManagerAddress:e.owner,amount0Max:Zd,amount1Max:Zd})];return n&&(o.push(a0(0n,e.owner)),o.push(s0(t?e.token1:e.token0,0n,e.owner))),l0(o)}async function tp(e,t,r){let n;try{n=await Zo(e,r)}catch{n=void 0}if(!n)return null;let o=Ls({tokenId:t.tokenId,liquidity:t.liquidity,amount0Min:0n,amount1Min:0n,deadline:t.deadline}),i=await dn(n,t.positionManager,o,r,t.owner);return $d(i)}var d0="wp:",p0=[1500,3e3,4500,6e3];function u0(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?e:null}function rp(){let{env:e,walletAddress:t,sendTransaction:r,estimateGas:n}=pt(),o=!!r,i=c0(),[a,s]=nt.useState(!1),[l,c]=nt.useState(null),[p,b]=nt.useState("confirm"),[h,d]=nt.useState(),[y,m]=nt.useState(""),[g,u]=nt.useState(!1),[w,f]=nt.useState(new Set),R=nt.useRef(void 0),x=nt.useRef([]),S=nt.useRef(0);nt.useEffect(()=>()=>{clearTimeout(R.current),x.current.forEach(clearTimeout)},[]);let M=nt.useRef(new Set),C=nt.useCallback((L,P)=>{M.current.has(L)||(M.current.add(L),Te("withdraw",L,{...P,tags:{section:"crossdPool",...P?.tags}}))},[]),v=nt.useCallback(()=>{let L=()=>i.invalidateQueries({predicate:P=>typeof P.queryKey[0]=="string"&&P.queryKey[0].startsWith(d0)});L(),x.current.forEach(clearTimeout),x.current=p0.map(P=>setTimeout(L,P))},[i]),E=nt.useCallback(L=>{S.current+=1,c(L),s(!0),b("confirm"),d(void 0),m(""),u(!1),M.current=new Set,C("opened")},[C]),D=nt.useCallback(()=>{p!=="submitting"&&(S.current+=1,s(!1),c(null),b("confirm"),d(void 0),m(""),u(!1))},[p]),B=nt.useCallback(async()=>{let L=S.current,P=u0(t),ne=l?.position.token_id,V=l?.position.liquidity,U=l?.detail.pool?.token0?.address,ce=l?.detail.pool?.token1?.address;if(!P||!ne||!V||!U||!ce)return b("error"),m("Position data is incomplete. Please refresh and retry."),null;try{b("estimating"),m("");let Z=BigInt(ne),G=BigInt(V),z=BigInt(Math.floor(Date.now()/1e3))+Jd,ee=hd[e],J=await tp(e,{owner:P,positionManager:ee,tokenId:Z,liquidity:G,deadline:z});if(S.current!==L)return null;if(!J)return b("error"),m("Failed to estimate withdrawal amounts. Please retry."),null;let pe=ep({tokenId:Z,liquidity:G,amount0Min:As(J.amount0),amount1Min:As(J.amount1),deadline:z,owner:P,positionManagerAddress:ee,token0:U,token1:ce,wcrossAddress:bd[e]}),se={to:ee,value:0n,data:pe,chainId:at[e].cross},te=null;if(n){try{te=await n({...se,from:P})}catch{te=null}if(S.current!==L)return null}return b("confirm"),{tx:se,estimate:te,expectedAmount0:J.amount0,expectedAmount1:J.amount1}}catch(Z){return S.current!==L||(b("error"),m(Vo(Z,"Failed to prepare withdraw."))),null}},[e,n,l,t]),I=nt.useCallback(async L=>{if(!r){b("error"),m("Withdraw is not available for this wallet.");return}try{b("submitting"),m(""),C("submitted");let P=await r({...L.tx,gas:L.estimate?.gasLimit&&L.estimate.gasLimit>0n?L.estimate.gasLimit:void 0,maxFeePerGas:L.estimate?.maxFeePerGas&&L.estimate.maxFeePerGas>0n?L.estimate.maxFeePerGas:void 0,maxPriorityFeePerGas:L.estimate?.maxPriorityFeePerGas&&L.estimate.maxPriorityFeePerGas>0n?L.estimate.maxPriorityFeePerGas:void 0});d(P),b("success");let ne=l?.position.token_id;ne&&f(V=>{let U=new Set(V);return U.add(ne),U}),C("confirmed"),v()}catch(P){b("error"),m(Vo(P,"Failed to request withdraw.")),C("confirmed",{status:"failure",reason:ur(P)})}},[v,r,l,C]),K=nt.useCallback(async()=>{if(!(!h||typeof navigator>"u"||!navigator.clipboard))try{await navigator.clipboard.writeText(h),u(!0),clearTimeout(R.current),R.current=setTimeout(()=>u(!1),1400)}catch{u(!1)}},[h]);return{canWithdrawInline:o,isOpen:a,target:l,withdrawnTokenIds:w,status:p,txHash:h,error:y,copied:g,hasEstimator:!!n,openWithdraw:E,closeWithdraw:D,prepareWithdraw:B,confirmWithdraw:I,copyHash:K,trackFunnelOnce:C}}import{Fragment as g0,jsx as sr,jsxs as Tn}from"react/jsx-runtime";var m0="ONEusd Pool",op="https://contents.crosstoken.io/wallet/token/images/Cross.svg";function ip(){let{env:e,walletAddress:t,onOutlink:r}=pt(),n=Rr(),o=!!t,{positions:i,isLoading:a}=Qd(e,t,o),s=rp(),l=np(()=>i.filter(C=>!C.token_id||!s.withdrawnTokenIds.has(C.token_id)),[i,s.withdrawnTokenIds]),c=np(()=>l.map(C=>C.token_id).filter(C=>!!C),[l]),{detailMap:p}=Vd(e,c,o&&c.length>0),b=`${gd[e]}/pool`,{getTokenImage:h,getTokenSymbol:d,getNativeToken:y}=Jr(e,o),m=h("","ONEUSD",{chainOnly:!0})||`${Sr[e]}/crossd.png`,g={chainOnly:!0},u=(C,v)=>{let E=xs(d(C?.address??"",C?.symbol??v,g));return E==="ONE"?y()?.symbol??"?":E??"?"},w=(C,v)=>{let E=C?.symbol??v,D=xs(E);return D==="ONE"?y()?.image||op:h(C?.address??"",D,g)||C?.logo_url||op},f=s.target?.detail.pool,R=w(f?.token0,s.target?.position.pool?.token0_symbol),x=w(f?.token1,s.target?.position.pool?.token1_symbol),S=u(f?.token0,s.target?.position.pool?.token0_symbol),M=u(f?.token1,s.target?.position.pool?.token1_symbol);return Tn(g0,{children:[sr(Cr,{sectionKey:"crossdPool",title:m0,icon:m,iconFit:"contain",isEmpty:l.length===0,loading:a,children:l.map(C=>{let v=C.token_id?p.get(C.token_id):void 0,E=`${u(v?.pool?.token0,C.pool?.token0_symbol)}/${u(v?.pool?.token1,C.pool?.token1_symbol)}`,D=C.pool?.fee_tier_percentage,B=w(v?.pool?.token0,C.pool?.token0_symbol),I=w(v?.pool?.token1,C.pool?.token1_symbol),K=Qn(new f0(C.position_value_usd??"0"),n),L=s.canWithdrawInline&&!!v?.pool?.token0?.address&&!!v?.pool?.token1?.address;return Tn("article",{className:"wp-item","data-side":"crossd",children:[Tn("div",{className:"wp-item-body",children:[Tn("div",{className:"wp-item-line",children:[sr("span",{className:"wp-item-label",children:"Pool"}),Tn("div",{className:"wp-svc-token",children:[Tn("span",{className:"wp-token-stack","aria-hidden":!0,children:[sr("img",{className:"wp-svc-token-icon",src:B,alt:""}),sr("img",{className:"wp-svc-token-icon",src:I,alt:""})]}),sr("span",{children:E}),D&&sr("span",{className:"wp-token-subtle",children:D})]})]}),Tn("div",{className:"wp-item-line",children:[sr("span",{className:"wp-item-label",children:"Position Value"}),sr("span",{className:"wp-line-value",children:K})]})]}),sr("div",{className:"wp-item-tags",children:L?sr("button",{type:"button",className:"wp-tag wp-tag--muted","data-track":"crossd_pool_withdraw_open","data-track-id":E,onClick:()=>{v&&s.openWithdraw({position:C,detail:v})},children:sr("span",{className:"wp-tag-label",children:"Withdraw"})}):Tn("a",{className:"wp-tag wp-tag--muted",href:b,target:"_blank",rel:"noopener noreferrer","data-track":"crossd_pool_outlink","data-track-id":E,onClick:P=>Rt(P,b,{category:"portfolio",origin:"portfolio-crossd-pool",payload:{position:C,detail:v}},r),children:[sr("span",{className:"wp-tag-label",children:"Withdraw"}),sr(gr,{size:12,className:"wp-tag-icon"})]})})]},C.token_id)})}),sr(Kd,{open:s.isOpen,status:s.status,target:s.target,token0Icon:R,token1Icon:x,token0Symbol:S,token1Symbol:M,nativeSymbol:y()?.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"];ae(`.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-system-orange-default, #f0640d);--wp-green: var(--ds-accent-primary-default, #00a0a2);--wp-accent-soft: var(--ds-system-orange-lowest, #2e2820);--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-system-orange-default, #f0640d);--wp-green: var(--ds-accent-primary-default, #00a0a2);--wp-accent-soft: var(--ds-system-orange-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-svc-items,.wp-claim-content{padding:18px 14px}.wp-item-line{gap:10px}.wp-svc-token>span{max-width:168px}}.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
|
-
`);import{Fragment as w0,jsx as Ie,jsxs as mn}from"react/jsx-runtime";var Ds=15,b0="wp:";function wo({env:e,theme:t="light",walletAddress:r,walletName:n,onBack:o,showHeader:i=!0,variant:a="embed",className:s,onOutlink:l,lpBalanceReader:c,stakingRewardsReader:p,sendTransaction:b,estimateGas:h,conversionRatio:d,currencySymbol:y,sections:m}){let g=qe(e),u=ft.useCallback(te=>!m||m.includes(te),[m]),w=!!r,f=h0(),[R,x]=ft.useState({}),S=ft.useCallback((te,be)=>{x(Le=>{let ge=Le[te];return ge&&ge.loading===be.loading&&ge.empty===be.empty?Le:{...Le,[te]:be}})},[]),M=ft.useCallback(te=>{x(be=>{if(!(te in be))return be;let Le={...be};return delete Le[te],Le})},[]),C=ft.useMemo(()=>({report:S,unregister:M}),[S,M]),[v,E]=ft.useState(Ds),[D,B]=ft.useState(!1),[I,K]=ft.useState(!1),L=ft.useRef(void 0),P=ft.useCallback(()=>{f.invalidateQueries({predicate:te=>typeof te.queryKey[0]=="string"&&te.queryKey[0].startsWith(b0)})},[f]),ne=ft.useCallback(()=>{P(),B(!0),setTimeout(()=>B(!1),600),E(Ds)},[P]);ft.useEffect(()=>{if(!w)return;let te=setInterval(()=>{E(be=>be<=1?(ne(),Ds):be-1)},1e3);return()=>clearInterval(te)},[w,ne]);let V=ft.useCallback(()=>{o?.()},[o]),U=w?cn(g,r,{size:64}):void 0,ce=ft.useCallback(async()=>{if(!(I||!r))try{await navigator.clipboard.writeText(r),K(!0),clearTimeout(L.current),L.current=setTimeout(()=>K(!1),2e3)}catch{}},[r,I]);ft.useEffect(()=>()=>clearTimeout(L.current),[]);let Z=ft.useMemo(()=>({env:g,theme:t,open:!0,walletAddress:r,close:V,onOutlink:l,lpBalanceReader:c,stakingRewardsReader:p,sendTransaction:b,estimateGas:h,conversionRatio:d,currencySymbol:y}),[g,t,r,V,l,c,p,b,h,d,y]),G=na.filter(u),z=G.length>0&&G.every(te=>{let be=R[te];return!!be&&!be.loading}),ee=z&&G.every(te=>R[te]?.empty),J=G.some(te=>{let be=R[te];return!!be&&!be.empty}),pe=G.length>0&&!z&&!J,se=mn(w0,{children:[i&&mn("div",{className:"wp-header",children:[mn("div",{className:"wp-header-account",children:[o&&Ie("button",{type:"button",className:"wp-header-btn","aria-label":"Back","data-track":"back",onClick:o,children:Ie(sd,{})}),Ie("span",{className:"wp-header-avatar","aria-hidden":!0,children:U&&Ie("img",{src:U,alt:"",className:"wp-header-avatar-img",draggable:!1})}),(n||r)&&mn("div",{className:"wp-header-account-meta",children:[n&&Ie("span",{className:"wp-header-wallet-name",title:n,children:n}),r&&mn("button",{type:"button",className:"wp-header-address-btn",onClick:ce,"aria-label":"Copy wallet address","data-track":"address_copy",children:[Ie("span",{className:"wp-header-address",children:Hi(r)}),Ie("span",{className:"wp-header-address-copy","data-copied":I,children:I?Ie(sn,{size:14}):Ie(Un,{size:14})})]})]})]}),mn("button",{type:"button",className:"wp-header-btn wp-refresh-btn","aria-label":"Refresh portfolio","data-track":"refresh",onClick:ne,children:[Ie(ld,{className:D?"wp-spin-once":void 0}),w&&Ie("span",{className:"wp-refresh-badge",children:v})]})]}),Ie("div",{className:"wp-body",children:mn("div",{className:"wp-body-inner","data-empty":ee||void 0,children:[u("rewards")&&Ie(yd,{}),u("points")&&Ie(Id,{}),u("staking")&&Ie(Bd,{}),u("gameSwap")&&Ie(jd,{}),u("forge")&&Ie(Hd,{}),u("crossdPool")&&Ie(ip,{}),pe&&Ie("div",{className:"wp-portfolio-loading",role:"status","aria-label":"Loading portfolio",children:Ie("span",{className:"wp-portfolio-spinner","aria-hidden":!0})}),ee&&mn("div",{className:"wp-portfolio-empty",role:"status",children:[Ie("span",{className:"wp-portfolio-empty-icon","aria-hidden":!0,children:mn("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[Ie("path",{d:"M20 7H5a2 2 0 0 1-2-2 2 2 0 0 1 2-2h13v4"}),Ie("path",{d:"M3 5v13a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1"}),Ie("circle",{cx:"16.5",cy:"13.5",r:"1",fill:"currentColor",stroke:"none"})]})}),Ie("p",{className:"wp-portfolio-empty-title",children:"No assets yet"}),Ie("p",{className:"wp-portfolio-empty-desc",children:"Assets you hold across ONE services will appear here."})]})]})})]});return Ie(Yo.Provider,{value:Z,children:Ie(ks.Provider,{value:C,children:Ie(fe,{feature:"wallet_portfolio",children:a==="none"?se:Ie("div",{className:ve(a==="fullscreen"?"wp-fullscreen":"wp-embed",s),"data-theme":t,children:se})})})})}import{jsx as Ps,jsxs as ap}from"react/jsx-runtime";function sp({className:e}){let{env:t,theme:r,walletAddress:n,close:o,onOutlink:i,lpBalanceReader:a,stakingRewardsReader:s}=pt();return ap(oa.Portal,{children:[Ps(oa.Overlay,{className:"wp-overlay"}),ap(oa.Content,{className:ve("wp-fullscreen",e),"data-theme":r,children:[Ps(oa.Title,{className:"wp-sr-only",children:"Portfolio"}),Ps(wo,{env:t,theme:r,walletAddress:n,onBack:o,variant:"none",onOutlink:i,lpBalanceReader:a,stakingRewardsReader:s})]})]})}import{jsx as lp}from"react/jsx-runtime";function x0({env:e,theme:t="light",walletAddress:r,open:n,onOpenChange:o,onOutlink:i,lpBalanceReader:a,stakingRewardsReader:s,sendTransaction:l,estimateGas:c,conversionRatio:p,currencySymbol:b,children:h}){let d=qe(e),y=n!==void 0,[m,g]=qn.useState(!1),u=y?n:m,w=qn.useCallback(x=>{y||g(x),o?.(x)},[y,o]),f=qn.useCallback(()=>w(!1),[w]),R=qn.useMemo(()=>({env:d,theme:t,open:u,walletAddress:r,close:f,onOutlink:i,lpBalanceReader:a,stakingRewardsReader:s,sendTransaction:l,estimateGas:c,conversionRatio:p,currencySymbol:b}),[d,t,u,r,f,i,a,s,l,c,p,b]);return lp(Yo.Provider,{value:R,children:lp(y0.Root,{direction:"bottom",open:u,onOpenChange:w,noBodyStyles:!0,children:h})})}var cp=Object.assign(x0,{Trigger:id,Content:sp});import*as q from"react";import{createPortal as yo}from"react-dom";import $r from"bignumber.js";import{jsx as Ir,jsxs as v0}from"react/jsx-runtime";function dp({size:e=20,className:t}){return v0("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":"true",children:[Ir("circle",{cx:"9",cy:"9",r:"6",stroke:"currentColor",strokeWidth:1.7}),Ir("path",{d:"m17 17-3.2-3.2",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round"})]})}function pp({size:e=16,className:t}){return Ir("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Ir("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 up({size:e=16,className:t}){return Ir("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Ir("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 fp({size:e=20,className:t}){return Ir("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Ir("path",{d:"M10 4.167v11.666M4.167 10 10 15.833 15.833 10",stroke:"currentColor",strokeWidth:1.667,strokeLinecap:"round",strokeLinejoin:"round"})})}function mp({size:e=16,className:t}){return Ir("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:Ir("path",{d:"M3.333 8h9.334M8.667 4l4 4-4 4",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"})})}function gp({size:e=12,className:t}){return Ir("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Ir("path",{d:"M3.5 2 1.5 4l2 2M1.5 4h9M8.5 10l2-2-2-2M10.5 8h-9",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})})}import*as _ from"react";import wp from"bignumber.js";function hp(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function bp(e){return!e.isFinite()||e.isNaN()||e.lte(0)?"":e.decimalPlaces(6,wp.ROUND_DOWN).toFixed()}function k0(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 R0(e){let t=e.fromToken.priceUsd,r=e.toToken.priceUsd,n=e.lastChangedBy==="to"?e.toAmount:e.fromAmount,o=new wp(n||"0");return!o.isFinite()||o.isNaN()||o.lte(0)?{fromAmount:e.fromAmount,toAmount:e.toAmount}:hp(t)&&hp(r)?e.lastChangedBy==="to"?{fromAmount:bp(o.multipliedBy(r).dividedBy(t))}:{toAmount:bp(o.multipliedBy(t).dividedBy(r))}:k0(e)?e.lastChangedBy==="to"?{fromAmount:e.toAmount}:{toAmount:e.fromAmount}:{fromAmount:e.lastChangedBy==="to"?"":e.fromAmount,toAmount:e.lastChangedBy==="from"?"":e.toAmount}}function yp({getQuote:e,submitBridge:t}){return{canQuote:!!e,canSubmit:!!t,async getQuote(r){return e?e(r):R0(r)},async submitBridge(r){if(!t)throw new Error("Bridge submit handler is not configured.");return t(r)}}}var xp=15,S0=18,Sp="cross_bridge_terms_accepted",C0=3600*24*365;function N0(e){let t=e.replace(/[^\d.]/g,""),r=t.indexOf(".");r!==-1&&(t=t.slice(0,r+1)+t.slice(r+1).replace(/\./g,""));let n=t.indexOf(".");if(n===-1)return t.slice(0,xp);let o=t.slice(0,n).slice(0,xp),i=t.slice(n+1).slice(0,S0);return`${o}.${i}`}function T0(){return typeof document>"u"?!1:document.cookie.split(";").map(e=>e.trim()).some(e=>e===`${Sp}=true`)}function I0(){if(typeof document>"u")return;let e=typeof window<"u"&&window.location.protocol==="https:"?"; Secure":"";document.cookie=[`${Sp}=true`,"Path=/",`Max-Age=${C0}`,"SameSite=Lax",e].filter(Boolean).join("; ")}function M0(e){let t=Number(e??"0");if(!Number.isFinite(t)||t<.1)return"1";let r=n=>Math.floor(n*100)/100;if(t<3){let n=r(t*3);return String(n<1?1:n)}return"10"}function vp(e){let t=e.toUpperCase();return t.startsWith("T")&&t.slice(1).startsWith("ONE")?t.slice(1):t}function E0(e,t){if(!e||!t||e.chainId!==t.chainId)return!1;let r=new Set([vp(e.symbol),vp(t.symbol)]);return r.has("ONE")&&r.has("ONEUSD")}function Hr(e,t){return!!e&&!!t&&e.chainId===t.chainId&&e.address.toLowerCase()===t.address.toLowerCase()}function ia(e){return e[0]}function Bs(e,t,r,n){if(r&&!Hr(r,t))return r;let o=t?n?.(t,e):void 0;if(o?.length)return o[0];if(!t)return e[1]??ia(e);let i=e.findIndex(s=>Hr(s,t)),a=i>=0?e[i+1]:void 0;return a&&!Hr(a,t)?a:e.find(s=>!Hr(s,t))??t}function kp({fromToken:e,toToken:t,fromAmount:r,toAmount:n,lastChangedBy:o,slippage:i}){return{fromToken:e,toToken:t,fromAmount:r,toAmount:n,lastChangedBy:o,slippage:i}}function aa(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 r=e;return[...[e instanceof Error?e.name:r.name,e instanceof Error?e.message:r.message,r.shortMessage,r.details,r.code].filter(o=>typeof o=="string"||typeof o=="number").map(String),...aa(r.cause,t+1),...aa(r.data,t+1),...aa(r.error,t+1)]}function Fs(e){let t=aa(e).join(" ").toLowerCase(),r=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")||r}function Rp(e,t){return Fs(e)?"Transaction request was rejected.":(e instanceof Error?e.message:typeof e=="string"?e:"").split(`
|
|
10
|
-
`)[0]?.trim()||t}function Cp(e){let{tokens:t,initialFromToken:r,initialToToken:n,getToTokens:o,getApproval:i,approveBridge:a,history:s=[],initialSlippage:l="1",termsUrl:c=uo,getQuote:p,submitBridge:b,onSubmitted:h,onSuccess:d,onFailed:y,onExit:m}=e,g=_.useMemo(()=>yp({getQuote:p,submitBridge:b}),[p,b]),[u,w]=_.useState("form"),[f,R]=_.useState(r??ia(t)),[x,S]=_.useState(()=>Bs(t,r??ia(t),n,o)),[M,C]=_.useState(""),[v,E]=_.useState(""),[D,B]=_.useState("from"),[I,K]=_.useState(l),[L,P]=_.useState(null),ne=_.useMemo(()=>E0(f,x),[f,x]),V=_.useMemo(()=>ne?"1":I==="auto"?M0(L?.priceImpact):I,[ne,I,L?.priceImpact]),[U,ce]=_.useState(""),[Z,G]=_.useState("idle"),[z,ee]=_.useState(""),[J,pe]=_.useState(null),[se,te]=_.useState([]),[be,Le]=_.useState(!1),[ge,De]=_.useState(T0),[le,_e]=_.useState(null),[Ke,Se]=_.useState(!1),[Ue,Me]=_.useState(null),[Ze,Nt]=_.useState(null),[st,yt]=_.useState(!1),[lt,jt]=_.useState(!1),je=_.useRef(0),Dt=_.useRef(null),mt=_.useRef(!1),ct=_.useRef(!1),rt=_.useRef(!1),xt=_.useRef(!1),Pe=_.useRef(!1);_.useEffect(()=>{mt.current||(mt.current=!0,Te("bridge","opened"))},[]);let Xe=_.useCallback(()=>{Dt.current&&(clearTimeout(Dt.current),Dt.current=null)},[]),Je=_.useCallback(A=>{Xe(),Nt(A)},[Xe]);_.useEffect(()=>Xe,[Xe]),_.useEffect(()=>{let A=t.find(ue=>Hr(ue,f))??ia(t),$=A?o?.(A,t):void 0,j=$?.find(ue=>Hr(ue,x))??($?void 0:t.find(ue=>Hr(ue,x)))??Bs(t,A,void 0,o);R(A),S(j)},[o,t,f,x]);let ot=_.useCallback((A,$)=>{let j=N0(A);if(!j){je.current+=1,C(""),E(""),B($),P(null),ce(""),G("idle");return}$==="from"?C(j):E(j),B($),ce(""),!rt.current&&Number(j)>0&&(rt.current=!0,Te("bridge","amount_entered"))},[]),$e=_.useCallback(()=>{je.current+=1,C(""),E(""),B("from"),P(null),ce(""),ee(""),G("idle"),_e(null),Se(!1),Me(null),yt(!1),Je(null)},[Je]),Tt=_.useCallback(A=>{Hr(A,f)||(ct.current||(ct.current=!0,Te("bridge","token_selected",{tags:{item_id:`from:${A.symbol}`}})),R(A),S(Bs(t,A,void 0,o)),$e())},[f,o,$e,t]),Wt=_.useCallback(A=>{Hr(A,x)||Hr(A,f)||(ct.current||(ct.current=!0,Te("bridge","token_selected",{tags:{item_id:`to:${A.symbol}`}})),S(A),$e())},[f,$e,x]),Be=_.useMemo(()=>f?o?.(f,t)??t.filter(A=>!Hr(A,f)):[],[f,o,t]),it=_.useCallback(()=>{f?.balance&&ot(f.balance,"from")},[f?.balance,ot]),et=_.useCallback(()=>{!f||!x||(R(x),S(f),$e())},[f,$e,x]),_t=_.useCallback(()=>{je.current+=1,C(""),E(""),B("from"),P(null),ce(""),ee("")},[]);_.useEffect(()=>{if(!f||!x)return;if(!M&&!v){P(null),ce(""),G(j=>j==="quoting"?"idle":j);return}let A=++je.current,$=kp({fromToken:f,toToken:x,fromAmount:M,toAmount:v,lastChangedBy:D,slippage:I});G(j=>j==="submitting"?j:g.canQuote?"quoting":"idle"),(async()=>{try{let j=await g.getQuote($);if(je.current!==A)return;j.fromAmount!==void 0&&D==="to"&&C(j.fromAmount),j.toAmount!==void 0&&D==="from"&&E(j.toAmount),P(j.summary??null),ce(j.error??"")}catch(j){if(je.current!==A)return;ce(j instanceof Error?j.message:"Failed to quote bridge.")}finally{je.current===A&&G(j=>j==="quoting"?"idle":j)}})()},[M,f,D,g,I,v,x]);let F=_.useCallback(()=>!f||!x?null:kp({fromToken:f,toToken:x,fromAmount:M,toAmount:v,lastChangedBy:D,slippage:V}),[V,M,f,D,v,x]),ie=_.useCallback(async(A,$)=>{ee(""),yt(!1),Se(!1),G("submitting");try{if(!$?.skipApprovalCheck&&i){let ue=await i(A);if(ue){_e(ue),Me(A),G("idle");return}}_e(null),Me(null),Je("processing");let j=await g.submitBridge(A);pe(j),G("success"),te(ue=>[{id:j.txHash,timestamp:new Date().toISOString(),txHash:j.txHash,fromToken:j.fromToken,toToken:j.toToken,fromAmount:j.fromAmount,toAmount:j.toAmount,summary:L??void 0,status:"pending"},...ue.filter(Oe=>Oe.txHash!==j.txHash)]),_t(),jt(!0),Je(null),yt(!0),Te("bridge","confirmed"),xt.current=!1,Pe.current=!1,h?.(j),d?.(j)}catch(j){if(Je(null),Te("bridge","confirmed",{status:"failure",reason:ur(j)}),xt.current=!1,Pe.current=!1,Fs(j)){G("idle");return}let ue=Rp(j,"Failed to submit bridge.");ee(ue),G("error"),y?.({message:ue})}},[i,y,h,d,g,_t,Je,L]),Fe=_.useCallback(async()=>{if(U)return;let A=F();if(A){if(xt.current||(xt.current=!0,Te("bridge","submitted")),!ge){Me(A),Le(!0);return}await ie(A)}},[F,U,ie,ge]),gt=_.useCallback(async()=>{let A=Ue??F();A&&(I0(),De(!0),Le(!1),await ie(A))},[F,Ue,ie]),ht=_.useCallback(()=>{Le(!1),Me(null)},[]),Gt=_.useCallback(async()=>{if(!(Z==="submitting"||!le||!Ue||!a)){ee(""),G("submitting");try{await a(Ue,le),Pe.current||(Pe.current=!0,Te("bridge","approved")),_e(null),G("idle"),Se(!0)}catch(A){if(Fs(A)){G("idle");return}let $=Rp(A,"Failed to approve token.");ee($),G("error"),y?.({message:$})}}},[le,a,y,Ue,ie,Z]),Pt=_.useCallback(()=>{Z!=="submitting"&&(_e(null),Se(!1),Me(null),G("idle"))},[Z]),Ht=_.useCallback(async()=>{if(Z==="submitting")return;let A=Ue??F();if(!A){Se(!1),ee("Bridge input is no longer available. Please try again."),G("error");return}Se(!1),await ie(A,{skipApprovalCheck:!0})},[F,Ue,ie,Z]),on=_.useCallback(()=>{yt(!1)},[]),pr=_.useCallback(A=>{w(A),A==="history"&&jt(!1)},[]),an=_.useCallback(()=>{if(u==="history"){pr("form");return}m?.()},[m,pr,u]),br=_.useMemo(()=>[...s,...se.filter(A=>!s.some($=>$.txHash===A.txHash))],[s,se]);return{step:u,setStep:pr,status:Z,error:z,quoteError:U,fromToken:f,toToken:x,tokens:t,availableToTokens:Be,fromAmount:M,toAmount:v,lastChangedBy:D,slippage:I,effectiveSlippage:V,slippageLocked:ne,setSlippage:K,summary:L,history:br,submitted:J,canSubmit:g.canSubmit,termsOpen:be,approvalInfo:le,approvalSuccessOpen:Ke,approveBridge:a,pendingSubmitInput:Ue,submitToast:Ze,successDialogOpen:st,dismissSuccessDialog:on,hasNewHistory:lt,termsUrl:c,setFromToken:R,setToToken:S,selectFromToken:Tt,selectToToken:Wt,setAmount:ot,setMax:it,swapTokens:et,submit:Fe,confirmTerms:gt,cancelTerms:ht,confirmApproval:Gt,cancelApproval:Pt,continueAfterApproval:Ht,back:an}}ae(`.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: #1e232e;--bf-toast-color: rgba(255, 255, 255, .85);position:relative;display:flex;flex:1;min-height:0;flex-direction:column;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))}.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-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-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-weight:600;line-height:1.5;letter-spacing:-.01em;outline:none}.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}.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, #00ceb2);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-picker-overlay{--bf-bg: #1e232e;--bf-surface: rgba(255, 255, 255, .05);--bf-surface-hover: rgba(255, 255, 255, .08);--bf-border: rgba(255, 255, 255, .07);--bf-text-high: rgba(255, 255, 255, .85);--bf-text-medium: rgba(255, 255, 255, .65);--bf-text-low: rgba(255, 255, 255, .4);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-token-picker-overlay[data-theme=light]{--bf-bg: #ffffff;--bf-surface: rgba(18, 18, 18, .05);--bf-surface-hover: rgba(18, 18, 18, .08);--bf-border: rgba(18, 18, 18, .07);--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-token-picker{display:flex;width:min(480px,calc(100vw - 48px));height:min(466px,calc(100dvh - 48px));max-height:calc(100dvh - 48px);min-height:0;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 #0006;box-sizing:border-box}.bf-token-picker-handle{display:none}.bf-token-picker-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(--bf-border);box-sizing:border-box}.bf-token-picker-head h3{margin:0;color:var(--bf-text-high);font-size:20px;font-weight:600;line-height:1.25;letter-spacing:0}.bf-token-picker-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(--bf-text-medium);cursor:pointer}.bf-token-picker-close:hover{color:var(--bf-text-high)}.bf-token-search{display:flex;min-height:48px;flex-shrink:0;align-items:center;gap:8px;margin:16px 24px;padding:12px 16px;border:1px solid transparent;border-radius:12px;background:var(--ds-surface-medium, rgba(18, 18, 18, .05));color:var(--bf-text-low);box-sizing:border-box}.bf-token-search:focus-within{border-color:var(--ds-accent-primary-default, #00ceb2)}.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, #00b4b7);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, #00b4b7);background:var(--ds-accent-primary-low, #e7f9f8)}.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, #00b4b7)}.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, #00b4b7);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}.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}.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:center;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-check-row{display:grid;width:100%;min-height:56px;grid-template-columns:20px minmax(0,1fr);align-items:center;column-gap:12px;padding:14px 16px;border:none;border-radius:12px;background:var(--bf-surface);color:var(--bf-text-medium);font-size:16px;font-weight:700;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}.bf-terms-check-button:focus-visible .bf-terms-checkbox{outline:2px solid var(--ds-accent-primary-default, #00ceb2);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:5px;background:transparent;box-sizing:border-box}.bf-terms-checkbox[data-checked=true]{border-color:var(--ds-accent-primary-default, #00ceb2);background:var(--ds-accent-primary-default, #00ceb2)}.bf-terms-checkbox[data-checked=true]:after{width:8px;height:4px;border:solid var(--ds-accent-primary-on, #000000);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, #00ceb2);font-size:14px;font-weight:700;text-decoration:none;white-space:nowrap}.bf-terms-privacy{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-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, #00ceb2);color:var(--ds-accent-primary-on, #000000)}.bf-action-primary:disabled{cursor:not-allowed;opacity:.35}.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, #00ceb2);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-radius:12px;background:var(--bf-toast-bg, #1e232e);color:var(--bf-toast-color, rgba(255, 255, 255, .85));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, #00ceb2);border-right-color:var(--ds-accent-primary-default, #00ceb2);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-accent-primary-default, #00ceb2)}.bf-status-check:after{position:absolute;top:6px;left:5px;width:8px;height:4px;border:solid var(--ds-accent-primary-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:#fff;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em}.bf-status-toast-copy span{color:var(--bf-toast-color, rgba(255, 255, 255, .85));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-accent-primary-on-inverted, #00e8c9)}.bf-status-toast[data-variant=error]{border:1px solid rgba(255,43,95,.28);background:var(--bf-toast-bg, #1e232e)}.bf-status-toast[data-variant=error] .bf-status-toast-copy strong{color:#fff}.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:#ffffffe0}.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, #00ceb2);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-exchange-rate{display:flex;width:100%;align-items:center;justify-content:center;gap:4px;padding:0 0 24px;border:0;background:transparent;color:var(--bf-text-low);font:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;cursor:pointer}.bf-exchange-rate:hover{color:var(--bf-text-medium)}.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-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-tree-marker{width:10px;flex-shrink:0;color:var(--bf-text-low)}.bf-info-value{min-width:0;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{color:var(--bf-text-medium)}.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, #00a0a2)}.bf-info-value[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00)}.bf-root[data-view=history] .bf-info-label,.bf-root[data-view=history] .bf-liquidity-head,.bf-root[data-view=history] .bf-tree-marker{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, #00a0a2)}.bf-root[data-view=history] .bf-info-value[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00)}.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, #00ceb2)}.bf-liquidity-status[data-status=normal]:before,.bf-liquidity-status:not([data-status]):before{background:var(--ds-accent-primary-default, #00ceb2)}.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, #00ceb2)}.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, #00ceb2);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, #00ceb2);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, #00a0a2)}.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, #00a0a2);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-token-picker-overlay{align-items:flex-end;padding:0}.bf-token-picker{width:100%;max-height:82dvh;min-height:min(520px,82dvh);border-right:0;border-bottom:0;border-left:0;border-radius:24px 24px 0 0}.bf-token-picker-handle{display:block;width:40px;height:4px;flex-shrink:0;align-self:center;margin:10px 0 0;border-radius:999px;background:#ffffff38}.bf-token-picker-head{min-height:55px;padding:12px 56px 16px 24px;border-bottom:0}.bf-token-picker-close{top:13px}.bf-token-search{margin:0 16px 12px}.bf-token-list{padding:0 16px 16px}.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}
|
|
11
|
-
`);import{Fragment as zs,jsx as k,jsxs as O}from"react/jsx-runtime";var Ap=q.createContext(void 0);function xo(){return q.useContext(Ap)}function A0(e){let[t,r]=q.useState(void 0);return q.useEffect(()=>{let n=e.current;if(!n)return;let o=()=>{let a=n.closest("[data-theme]");r(a?.getAttribute("data-theme")??void 0)};o();let i=new MutationObserver(o);return i.observe(document.documentElement,{attributes:!0,subtree:!0,attributeFilter:["data-theme"]}),()=>i.disconnect()},[e]),t}var Np=[{value:"0.1",label:"0.1%"},{value:"0.5",label:"0.5%"},{value:"1",label:"1%"},{value:"5",label:"5%"}],L0=[{value:"all",label:"ALL"},{value:"completed",label:"Completed"},{value:"pending",label:"Pending"}];function D0(e,t){return e==="auto"?t?`Auto ${t}%`:"Auto":e?`${e}%`:"1%"}function Tp(e){let t=e.replace(/[^\d.]/g,""),[r="",...n]=t.split("."),o=n.join("");return n.length===0?r:`${r}.${o.slice(0,2)}`}function P0(e){return`${e.chainId}:${e.address.toLowerCase()}`}function Lp(e){let t=Number(e);return Number.isFinite(t)?t.toLocaleString("en-US",{maximumFractionDigits:t>=1?2:6}):e||"0"}function Ip(e,t){let r=Number(e||"0"),n=t?.priceUsd??0;return`\u2248 $${(Number.isFinite(r)?r*n:0).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})} USD`}function B0(e,t=6){if(!e)return e;let[r,n=""]=e.split(".");if(!n)return r;let o=n.slice(0,t).replace(/0+$/,"");return o?`${r}.${o}`:r}function F0(e,t){if(!t)return!1;let r=new $r(e||"0"),n=new $r(t.balance||"0");return!r.isFinite()||!n.isFinite()?!1:r.isGreaterThan(n)}function O0(e){if(e.priceUsd===void 0)return null;let t=new $r(e.balance||"0");return t.isFinite()?`\u2248 $${t.multipliedBy(e.priceUsd).toFormat(2)} USD`:null}function z0(e){if(e.priceUsd===void 0)return null;let t=new $r(e.priceUsd);return t.isFinite()?`$${t.toFormat(t.isLessThan(1)?4:2)}`:null}function Dp(e){if(!e.isFinite()||e.isNaN())return"0";let r=e.decimalPlaces(6,$r.ROUND_DOWN).toFixed(6).replace(/\.?0+$/,""),[n="0",o]=r.split("."),i=new $r(n||"0").toFormat(0);return o?`${i}.${o}`:i}function U0(e){return e.length<=14?e:`${e.slice(0,6)}...${e.slice(-6)}`}function j0(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return e;let r=n=>n.toString().padStart(2,"0");return[`${t.getFullYear()}-${r(t.getMonth()+1)}-${r(t.getDate())}`,`${r(t.getHours())}:${r(t.getMinutes())}:${r(t.getSeconds())}`].join(" ")}function W0(e){let t=new $r(e||"0");return!t.isFinite()||t.isNaN()?e||"0":Dp(t)}function _0(e,t){if(t?.priceUsd===void 0)return null;let r=new $r(e||"0").multipliedBy(t.priceUsd);return!r.isFinite()||r.isNaN()?null:`$${r.toFormat(2)}`}function la(e){return e.status==="success"?"completed":e.status==="failed"?"failed":"pending"}function G0(e,t){return t==="all"?!0:la(e)===t}function H0(e){return e==="completed"?"Completed":e==="failed"?"Failed":"Pending"}function Mp(e){return e===56||e===97?"BSC":e===612044||e===5555?"CROSS":`Chain ${e}`}function Pp(e,t){return!!e&&!!t&&e.chainId===t.chainId&&e.address.toLowerCase()===t.address.toLowerCase()}function Bp(e,t){if(!(!e||!t))return e.chainId===t.chainId?"swap":Pp(e,t)||e.symbol.toLowerCase()===t.symbol.toLowerCase()?"bridge":"swap-bridge"}function Fp(e){return e==="swap"||e==="deposit-swap"||e==="swap-withdraw"}function sa(e){return!e||e==="0"||Number(e)===0}function Q0(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 V0(e){let t=e.fromToken,r=e.toToken,n=Bp(t,r),o=e.fromAmount||"0",i=e.toAmount||"0",a=n!==void 0&&!Fp(n),s=n!==void 0&&n!=="bridge";return{pathType:n,bridgeInfo:a?[{label:"Route",value:t&&r?`${Mp(t.chainId)} \u2192 ${Mp(r.chainId)}`:"-"},{label:"Validator Fee",value:sa(o)?"0":"Free",tone:sa(o)?"default":"accent"},{label:"Network Fee",value:sa(o)?"0":"Free",tone:sa(o)?"default":"accent"}]:void 0,swapInfo:s?[t&&r?{label:"Route",value:"",routeTokens:[{symbol:t.symbol,iconUrl:t.iconUrl},{symbol:r.symbol,iconUrl:r.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:i,valueToken:r?{symbol:r.symbol,iconUrl:r.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 Xo({token:e,size:t=20}){let r=e?.iconUrl;return k("span",{className:"bf-token-icon","data-has-image":!!r?"true":"false",style:{width:t,height:t},children:r?k("img",{src:r,alt:"",width:t,height:t,draggable:!1}):k("span",{className:"bf-token-fallback",children:e?.symbol?.slice(0,1)??"?"})})}function Ep({label:e,token:t,amount:r,usd:n,onAmountChange:o,onTokenClick:i,locked:a=!1}){return O("section",{className:"bf-amount-panel",children:[O("div",{className:"bf-amount-head",children:[k("span",{children:e}),O("span",{className:"bf-balance",children:[Lp(t?.balance??"0")," ",t?.symbol??""]})]}),O("div",{className:"bf-amount-main",children:[O("label",{className:"bf-amount-input-wrap",children:[O("span",{className:"bf-sr-only",children:[e," amount"]}),k("input",{type:"text",inputMode:"decimal",value:r,onChange:s=>o(s.target.value),placeholder:"0",className:"bf-amount-input"}),k("span",{className:"bf-amount-usd",children:n})]}),O("button",{type:"button",className:"bf-token-pill",onClick:a?void 0:i,disabled:!a&&!i,"data-locked":a?"true":void 0,"data-track":a?void 0:"token_select_open","data-track-id":e.toLowerCase(),"aria-label":`Select ${e.toLowerCase()} token`,children:[k(Xo,{token:t}),k("span",{children:t?.symbol??"Select"}),!a&&k(jn,{size:16})]})]})]})}function q0({flow:e,side:t,onClose:r}){let n=q.useId(),[o,i]=q.useState(""),[a,s]=q.useState(null),l=xo(),c=t==="from"?e.fromToken:e.toToken;q.useEffect(()=>{s(document.body)},[]),q.useEffect(()=>{let d=y=>{y.key==="Escape"&&r()};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[r]);let p=q.useMemo(()=>t==="from"?e.tokens:e.availableToTokens,[e.availableToTokens,e.tokens,t]),b=q.useMemo(()=>{let d=o.trim().toLowerCase();return d?p.filter(y=>y.symbol.toLowerCase().includes(d)||y.name.toLowerCase().includes(d)):p},[o,p]),h=q.useCallback(d=>{t==="from"?e.selectFromToken(d):e.selectToToken(d),r()},[e,r,t]);return a?yo(k("div",{className:"bf-token-picker-overlay","data-theme":l,role:"presentation",onMouseDown:d=>{d.target===d.currentTarget&&r()},children:O("section",{className:"bf-token-picker",role:"dialog","aria-modal":"true","aria-labelledby":n,children:[k("span",{className:"bf-token-picker-handle","aria-hidden":"true"}),O("header",{className:"bf-token-picker-head",children:[k("h3",{id:n,children:"Select a token"}),k("button",{type:"button",className:"bf-token-picker-close",onClick:r,"aria-label":"Close token selector",children:k(yr,{size:24})})]}),O("label",{className:"bf-token-search",children:[k(dp,{size:20}),k("span",{className:"bf-sr-only",children:"Search tokens"}),k("input",{value:o,onChange:d=>i(d.target.value),placeholder:"Search Tokens",autoComplete:"off",spellCheck:!1})]}),O("div",{className:"bf-token-list",children:[b.map(d=>{let y=Pp(d,c),m=y?z0(d):O0(d);return O("button",{type:"button",className:"bf-token-row","data-selected":y?"true":"false",onClick:()=>h(d),children:[O("span",{className:"bf-token-row-left",children:[k(Xo,{token:d,size:40}),O("span",{className:"bf-token-meta",children:[k("span",{className:"bf-token-symbol",children:d.symbol}),!y&&k("span",{className:"bf-token-name",children:d.name})]})]}),O("span",{className:"bf-token-row-right",children:[O("span",{className:"bf-token-balance",children:[Lp(d.balance),y?null:` ${d.symbol}`]}),m&&k("span",{className:"bf-token-price",children:m})]})]},P0(d))}),b.length===0&&k("div",{className:"bf-token-empty",children:"No tokens found"})]})]})}),a):null}function Y0({flow:e,onClose:t}){let r=q.useId(),[n,o]=q.useState(null),i=Np.find(m=>m.value===e.slippage),[a,s]=q.useState(e.slippage&&!i?e.slippage:""),l=a.trim()!==""&&a.trim()!==".",c=l?Number(a):NaN,p=Number.isFinite(c)&&c>50,b=Number.isFinite(c)&&c>5&&!p,h=m=>{e.setSlippage(m),t()},d=()=>{!l||p||(e.setSlippage(Tp(a)),t())};if(q.useEffect(()=>{o(document.body)},[]),q.useEffect(()=>{let m=g=>{g.key==="Escape"&&t()};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[t]),!n)return null;let y=xo();return yo(k("div",{className:"bf-slippage-overlay","data-theme":y,role:"presentation",onMouseDown:m=>{m.target===m.currentTarget&&t()},children:O("section",{className:"bf-slippage-dialog",role:"dialog","aria-modal":"true","aria-labelledby":r,children:[O("header",{className:"bf-slippage-head",children:[k("h3",{id:r,children:"Slippage Settings"}),k("button",{type:"button",className:"bf-slippage-close",onClick:t,"aria-label":"Close slippage settings",children:k(yr,{size:24})})]}),O("div",{className:"bf-slippage-body",children:[k("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."}),O("div",{className:"bf-slippage-controls",children:[k("div",{className:"bf-slippage-presets",children:Np.map(m=>k("button",{type:"button",className:"bf-slippage-preset","data-selected":!l&&e.slippage===m.value?"true":"false",onClick:()=>h(m.value),children:m.label},m.value))}),O("label",{className:"bf-slippage-custom","data-selected":l?"true":"false",children:[k("span",{className:"bf-sr-only",children:"Custom slippage percent"}),k("input",{value:a,onChange:m=>{s(Tp(m.target.value))},onKeyDown:m=>{m.key==="Enter"&&(m.preventDefault(),d())},inputMode:"decimal",placeholder:"Enter custom slippage",autoComplete:"off",spellCheck:!1}),k("span",{"aria-hidden":"true",children:"%"})]})]}),p?k("p",{className:"bf-slippage-message","data-variant":"error",children:"Slippage cannot exceed 50%."}):b?k("p",{className:"bf-slippage-message","data-variant":"warning",children:"Your transaction may be frontrun due to high slippage."}):null,l&&k("button",{type:"button",className:"bf-slippage-apply",onClick:d,disabled:p,children:"Apply"})]})]})}),n)}function K0({flow:e}){let t=q.useId(),[r,n]=q.useState(!1),[o,i]=q.useState(null),a=xo();return q.useEffect(()=>{i(document.body)},[]),q.useEffect(()=>{let s=l=>{l.key==="Escape"&&e.cancelTerms()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e]),!o||!e.termsOpen?null:yo(k("div",{className:"bf-action-modal-overlay","data-theme":a,role:"presentation",onPointerDown:s=>{s.target===s.currentTarget&&e.cancelTerms()},children:O("section",{className:"bf-action-modal bf-terms-modal",role:"dialog","aria-modal":"true","aria-labelledby":t,children:[k("h3",{id:t,children:"Agree to Terms of Service"}),k("p",{className:"bf-action-modal-desc",children:"Please make sure to review the Terms of Service before using CROSSD."}),O("div",{className:"bf-terms-check-row","data-checked":r?"true":"false",children:[k("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:()=>n(s=>!s),children:k("span",{className:"bf-terms-checkbox","data-checked":r?"true":"false","aria-hidden":"true"})}),O("div",{className:"bf-terms-copy",children:[k("span",{className:"bf-terms-label",children:"Agree to Terms of Use"}),e.termsUrl&&k("a",{href:e.termsUrl,target:"_blank",rel:"noreferrer",children:"Terms of Service"})]})]}),k("p",{className:"bf-terms-privacy",children:"I have read and acknowledged the Privacy Policy to use CROSSD"}),k("button",{type:"button",className:"bf-action-primary",disabled:!r||e.status==="submitting",onClick:e.confirmTerms,"data-track":"terms_confirm",children:"Confirm"})]})}),o)}function Z0({value:e,disabled:t=!1}){let[r,n]=q.useState(!1);return k("button",{type:"button",className:"bf-copy-button","aria-label":"Copy token address",disabled:t,onClick:()=>{t||navigator.clipboard?.writeText(e).then(()=>{n(!0),window.setTimeout(()=>n(!1),1200)})},children:r?"OK":"Copy"})}function X0({flow:e,approval:t}){let r=q.useId(),[n,o]=q.useState(null),i=xo();if(q.useEffect(()=>{o(document.body)},[]),q.useEffect(()=>{let l=c=>{e.status!=="submitting"&&c.key==="Escape"&&e.cancelApproval()};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[e]),!n)return null;let a=e.status==="submitting"||!e.approveBridge,s=e.status==="submitting";return yo(k("div",{className:"bf-action-modal-overlay","data-theme":i,role:"presentation",children:O("section",{className:"bf-action-modal bf-approve-modal",role:"dialog","aria-modal":"true","aria-labelledby":r,children:[O("h3",{id:r,children:["Approve ",t.token.symbol]}),k(Xo,{token:t.token,size:72}),O("div",{className:"bf-approve-address-box",children:[k("span",{children:"Token Address"}),O("div",{children:[k("strong",{children:t.tokenAddress}),k(Z0,{value:t.tokenAddress,disabled:s})]})]}),O("div",{className:"bf-action-buttons",children:[k("button",{type:"button",className:"bf-action-secondary",onClick:e.cancelApproval,disabled:e.status==="submitting",children:"Cancel"}),O("button",{type:"button",className:"bf-action-primary",onClick:e.confirmApproval,disabled:a,"aria-busy":s,"data-track":"approve_confirm",children:[s&&k("span",{className:"bf-action-button-spinner","aria-hidden":"true"}),k("span",{children:s?"Approving...":"Approve"})]})]})]})}),n)}function J0({flow:e}){let t=q.useId(),[r,n]=q.useState(null),o=xo();if(q.useEffect(()=>{n(document.body)},[]),q.useEffect(()=>{if(!e.approvalSuccessOpen)return;let a=s=>{s.key==="Escape"&&e.cancelApproval()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[e]),!r||!e.approvalSuccessOpen)return null;let i=e.status==="submitting";return yo(k("div",{className:"bf-action-modal-overlay","data-theme":o,role:"presentation",children:O("section",{className:"bf-action-modal bf-approval-success-modal",role:"dialog","aria-modal":"true","aria-labelledby":t,children:[k("h3",{id:t,children:"Approval Success"}),k("span",{className:"bf-success-mark","aria-hidden":"true"}),O("p",{className:"bf-action-modal-desc",children:["Token approval confirmed successfully.",k("br",{}),"Please continue to the next step."]}),O("div",{className:"bf-action-buttons",children:[k("button",{type:"button",className:"bf-action-secondary",onClick:e.cancelApproval,disabled:i,children:"Cancel"}),O("button",{type:"button",className:"bf-action-primary",onClick:e.continueAfterApproval,disabled:i,"aria-busy":i,children:[i&&k("span",{className:"bf-action-button-spinner","aria-hidden":"true"}),k("span",{children:i?"Continuing...":"Continue"})]})]})]})}),r)}function $0({fromAmount:e,toAmount:t,fromToken:r,toToken:n}){let[o,i]=q.useState(!1),a=q.useMemo(()=>{let c=new $r(e||"0"),p=new $r(t||"0");return!c.isFinite()||!p.isFinite()||c.lte(0)||p.lte(0)?null:o?c.dividedBy(p):p.dividedBy(c)},[e,o,t]);if(!a||!r||!n||r.symbol===n.symbol)return null;let s=o?n.symbol:r.symbol,l=o?r.symbol:n.symbol;return O("button",{type:"button",className:"bf-exchange-rate",onClick:()=>i(c=>!c),"data-track":"rate_reverse",children:[O("span",{children:["1 ",s]}),k(gp,{size:12}),O("span",{children:[Dp(a)," ",l]})]})}function eb({flow:e}){return e.submitToast?O("div",{className:"bf-status-toast","data-variant":"processing",role:"status","aria-live":"polite",children:[k("span",{className:"bf-status-toast-icon","aria-hidden":"true",children:k("span",{className:"bf-status-spinner"})}),O("span",{className:"bf-status-toast-copy",children:[k("strong",{children:"Transaction Processing"}),k("span",{children:"Your transaction is being processed on the blockchain"})]})]}):null}function tb({message:e}){let[t,r]=q.useState(!1);return q.useEffect(()=>{if(!e){r(!1);return}r(!0);let n=window.setTimeout(()=>{r(!1)},3500);return()=>window.clearTimeout(n)},[e]),!e||!t?null:O("div",{className:"bf-status-toast","data-variant":"error",role:"alert","aria-live":"assertive",children:[k("span",{className:"bf-status-toast-icon","aria-hidden":"true",children:k("span",{className:"bf-status-error-mark",children:"!"})}),O("span",{className:"bf-status-toast-copy",children:[k("strong",{children:"Error"}),k("span",{children:e})]})]})}function rb(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 nb({flow:e}){let t=q.useId(),[r,n]=q.useState(null),o=e.submitted,i=xo();return q.useEffect(()=>{n(document.body)},[]),q.useEffect(()=>{if(!e.successDialogOpen)return;let a=s=>{s.key==="Escape"&&e.dismissSuccessDialog()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[e]),!r||!e.successDialogOpen||!o?null:yo(k("div",{className:"bf-success-overlay","data-theme":i,role:"presentation",children:k("section",{className:"bf-success-modal",role:"dialog","aria-modal":"true","aria-labelledby":t,children:O("div",{className:"bf-success-body",children:[k("span",{className:"bf-success-mark","aria-hidden":"true"}),O("div",{className:"bf-success-copy",children:[k("strong",{id:t,children:rb(o.pathType)}),k("span",{children:"Please check the results in the history."})]}),k("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((a,s)=>O(q.Fragment,{children:[s>0&&k("span",{className:"bf-success-route-arrow",children:"\u2192"}),k(Os,{token:a,size:43})]},`${a.symbol}-${s}`))}),k("button",{type:"button",className:"bf-success-ok",onClick:e.dismissSuccessDialog,"data-track":"success_ok",children:"OK"})]})})}),r)}function Os({token:e,size:t=16}){let r=!!e.iconUrl;return k("span",{className:"bf-token-icon","data-has-image":r?"true":"false",style:{width:t,height:t},children:e.iconUrl?k("img",{src:e.iconUrl,alt:"",width:t,height:t,draggable:!1}):k("span",{className:"bf-token-fallback",children:e.symbol?.slice(0,1)??"?"})})}function ob({row:e}){return e.routeTokens&&e.routeTokens.length>0?k("span",{className:"bf-info-route",children:e.routeTokens.map((t,r)=>O(q.Fragment,{children:[r>0&&k("span",{className:"bf-info-route-arrow","aria-hidden":"true",children:"\u2192"}),k(Os,{token:t})]},`${t.symbol}-${r}`))}):e.valueToken?O("span",{className:"bf-info-value-token",children:[k(Os,{token:e.valueToken}),k("span",{children:e.value})]}):k(zs,{children:e.value})}function Op({rows:e}){return!e||e.length===0?null:k("div",{className:"bf-info-rows",children:e.map((t,r)=>O("div",{className:"bf-info-row",children:[O("span",{className:"bf-info-label",children:[k("span",{className:"bf-tree-marker",children:r===e.length-1?"\u2514":"\u251C"}),k("span",{children:t.label})]}),k("span",{className:"bf-info-value","data-tone":t.tone??"default",children:k(ob,{row:t})})]},`${t.label}-${t.value}`))})}function ib(e,t,r){return e.pathType==="bridge"?"Bridge Info":Fp(e.pathType)?"Swap Info":t&&r?"Swap & Bridge Info":t?"Bridge Info":"Swap Info"}function ab({summary:e}){let t=!!e.bridgeInfo?.length,r=!!e.swapInfo?.length,n=t&&r,o=e.pathType==="bridge-swap"?["bridge","swap"]:["swap","bridge"];return k(zs,{children:o.map(i=>{let a=i==="swap"?e.swapInfo:e.bridgeInfo;return a?.length?O("div",{className:"bf-info-section",children:[n&&k("h4",{children:i==="swap"?"Swap Info":"Bridge Info"}),k(Op,{rows:a})]},i):null})})}function sb({summary:e}){let t=!!e.bridgeInfo?.length,r=!!e.swapInfo?.length,n=!!e.txFee?.length,o=ib(e,t,r),[i,a]=q.useState(!0),[s,l]=q.useState(!0);return O("div",{className:"bf-details",children:[e.liquidity&&O("section",{className:"bf-liquidity",children:[O("div",{className:"bf-liquidity-head",children:[k("span",{children:e.liquidity.label??"Available Liquidity"}),k("span",{className:"bf-liquidity-status","data-status":e.liquidity.status,children:e.liquidity.status??"Normal"})]}),k("div",{className:"bf-liquidity-track",children:k("span",{style:{width:`${e.liquidity.percentage??50}%`}})})]}),(t||r)&&O("section",{className:"bf-detail-section bf-info-card","data-open":i?"true":"false",children:[O("button",{type:"button",className:"bf-collapse-head","aria-expanded":i,onClick:()=>a(c=>!c),"data-track":"details_toggle",children:[k("h3",{children:o}),k(jn,{size:16,className:"bf-collapse-chevron"})]}),i&&k("div",{className:"bf-collapse-body",children:k(ab,{summary:e})})]}),n&&O("section",{className:"bf-detail-section bf-tx-fee-section","data-open":s?"true":"false",children:[O("button",{type:"button",className:"bf-collapse-head bf-tx-fee-head","aria-expanded":s,onClick:()=>l(c=>!c),"data-track":"details_toggle",children:[k("h3",{children:"Est. Tx Fee"}),O("div",{className:"bf-tx-fee-total",children:[e.txFeeInfo?.isDelegateFee&&k("span",{className:"bf-fee-delegated",children:"Fee Delegated"}),e.txFeeInfo?.tokenIconUrl&&k("img",{className:"bf-tx-fee-token",src:e.txFeeInfo.tokenIconUrl,alt:e.txFeeInfo.tokenSymbol??"",width:16,height:16,draggable:!1}),k("span",{"data-delegated":e.txFeeInfo?.isDelegateFee&&Number(e.txFeeInfo?.estTxFee)>0?"true":void 0,children:B0(e.txFeeInfo?.estTxFee??"0")}),k(jn,{size:16,className:"bf-collapse-chevron"})]})]}),s&&k("div",{className:"bf-collapse-body",children:k(Op,{rows:e.txFee})})]})]})}function lb({item:e}){let t=la(e),r=_0(e.fromAmount,e.fromToken);return O("article",{className:"bf-history-item",children:[O("div",{className:"bf-history-item-head",children:[k("span",{className:"bf-history-status","data-status":t,children:H0(t)}),k("time",{className:"bf-history-time",dateTime:e.timestamp,children:j0(e.timestamp)})]}),O("div",{className:"bf-history-item-body",children:[O("strong",{className:"bf-history-amount",children:[W0(e.fromAmount)," ",e.fromToken.symbol]}),O("div",{className:"bf-history-meta",children:[k("span",{className:"bf-history-usd",children:r??U0(e.txHash)}),O("span",{className:"bf-history-route",children:[O("span",{className:"bf-history-route-token",children:[k(Xo,{token:e.fromToken,size:16}),k("span",{children:e.fromToken.symbol})]}),k(mp,{size:16,className:"bf-history-route-arrow"}),O("span",{className:"bf-history-route-token",children:[k(Xo,{token:e.toToken,size:16}),k("span",{children:e.toToken.symbol})]})]})]})]})]})}function cb({flow:e}){let[t,r]=q.useState("all"),n=e.history.some(a=>la(a)==="pending"),o=e.history.filter(a=>G0(a,t)),i=t==="all"?"No bridge history yet.":`No ${t} bridge history.`;return O("main",{className:"bf-history-body",children:[k("nav",{className:"bf-history-tabs","aria-label":"Bridge history filters",children:L0.map(a=>O("button",{type:"button",className:"bf-history-tab","data-active":t===a.value?"true":"false",onClick:()=>r(a.value),"data-track":"history_filter","data-track-id":a.value,children:[k("span",{children:a.label}),a.value==="pending"&&n&&k("span",{className:"bf-history-tab-dot","aria-hidden":"true"})]},a.value))}),o.length>0?k("div",{className:"bf-history-list",children:o.map(a=>k(lb,{item:a},a.id||a.txHash))}):k("div",{className:"bf-empty",children:i})]})}function db({flow:e,env:t}){let[r,n]=q.useState(null),[o,i]=q.useState(!1),[a,s]=q.useState(0),c=!!(e.fromAmount.trim()||e.toAmount.trim())?e.summary??V0(e):null,p=Ur("apps.json",t,f=>zr(f?.bridgePoweredBy?.url,t)),b=Q0(e.quoteError),h=F0(e.fromAmount,e.fromToken),d=h?"Insufficient balance":b.from,y=e.quoteError&&!b.from&&!b.to?e.quoteError:"",m=e.error||y,g=e.history.some(f=>la(f)==="pending"),w=(c?.pathType??Bp(e.fromToken,e.toToken))!=="bridge";return O(zs,{children:[O("main",{className:"bf-body",children:[O("div",{className:"bf-toolbar",children:[O("button",{type:"button",className:"bf-chip bf-chip-history",onClick:()=>e.setStep("history"),"data-track":"history_open",children:[k(pp,{}),k("span",{children:"History"}),(g||e.hasNewHistory)&&k("span",{className:"bf-chip-dot","aria-hidden":"true"})]}),w&&O("button",{type:"button",className:"bf-chip",onClick:()=>i(!0),"data-track":"slippage_open",disabled:e.slippageLocked,"aria-haspopup":"dialog","aria-expanded":o,children:[k(up,{}),k("span",{children:e.slippageLocked?"Auto 1%":D0(e.slippage,e.effectiveSlippage)})]})]}),O("div",{className:"bf-swap-card","data-has-from-error":d?"true":"false",children:[k(Ep,{label:"From",token:e.fromToken,amount:e.fromAmount,usd:Ip(e.fromAmount,e.fromToken),onAmountChange:f=>e.setAmount(f,"from"),onTokenClick:()=>n("from")}),d&&k("div",{className:"bf-field-error",children:d}),k("button",{type:"button",className:"bf-swap-toggle",onClick:()=>{e.swapTokens(),s(f=>f+360)},"data-track":"token_swap",style:{transform:`translateX(-50%) rotate(${a}deg)`,transition:"transform 0.2s ease"},children:k(fp,{size:22})}),k(Ep,{label:"To",token:e.toToken,amount:e.toAmount,usd:Ip(e.toAmount,e.toToken),onAmountChange:f=>e.setAmount(f,"to"),onTokenClick:()=>n("to"),locked:e.availableToTokens.length<=1}),b.to&&k("div",{className:"bf-field-error",children:b.to})]}),k($0,{fromAmount:e.fromAmount,toAmount:e.toAmount,fromToken:e.fromToken,toToken:e.toToken}),c&&k(sb,{summary:c})]}),O("footer",{className:"bf-footer",children:[k("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"}),p&&O("a",{className:"bf-powered",href:p,target:"_blank",rel:"noreferrer",children:["Powered by ",k("span",{className:"bf-powered-brand",children:"CROSS DeFi"})]})]}),r&&k(q0,{flow:e,side:r,onClose:()=>n(null)}),o&&k(Y0,{flow:e,onClose:()=>i(!1)}),k(K0,{flow:e}),e.approvalInfo&&k(X0,{flow:e,approval:e.approvalInfo}),k(J0,{flow:e}),k(eb,{flow:e}),k(tb,{message:e.submitToast?"":m}),k(nb,{flow:e})]})}function ca({onClose:e,onBackToWallet:t,env:r,className:n,...o}){let i=q.useMemo(()=>qe(r),[r]),a=Cp({...o,onExit:t}),s=q.useRef(null),l=A0(s),c=a.step==="history"?"History":"Swap & Bridge";return k(fe,{feature:"bridge",children:k(Ap.Provider,{value:l,children:O("div",{ref:s,className:ve("bf-root",n),"data-view":a.step,"data-status":a.status,children:[O("header",{className:"bf-header",children:[k("button",{type:"button",className:"bf-header-btn",onClick:a.back,"aria-label":"Back",children:k(ln,{size:24})}),k("span",{className:"bf-header-title",children:c}),k("button",{type:"button",className:"bf-header-btn",onClick:e,"aria-label":"Close",children:k(yr,{size:24})})]}),a.step==="history"?k(cb,{flow:a}):k(db,{flow:a,env:i})]})})})}import*as Kt from"react";import _p from"bignumber.js";import{useInfiniteQuery as pb}from"@tanstack/react-query";var ub="token-history";function zp(e,t,r,n,o=!0){return pb({queryKey:[ub,e,t,r.toLowerCase(),n.toLowerCase()],initialPageParam:void 0,queryFn:async({pageParam:i,signal:a})=>{let s=await we("walletServer",e),l=new URLSearchParams({chain_id:String(t),token:r,wallet:n}),c=i;c&&(l.set("last_timestamp",String(c.last_timestamp)),l.set("last_log_index",String(c.last_log_index)),l.set("last_tx_index",String(c.last_tx_index)));let p=await fetch(`${s}/v1/public/token/historical?${l}`,{cache:"no-store",signal:a});if(!p.ok)throw new Error(`Failed to fetch token history: ${p.status}`);let b=await p.json();if(b.code!==200)throw new Error(`Token history API error: ${b.code}`);return b.data??[]},getNextPageParam:i=>{if(!i||i.length===0)return;let a=i[i.length-1];return{last_timestamp:a.timestamp,last_log_index:a.log_index,last_tx_index:a.tx_index}},enabled:o&&!!n&&!!r&&t>0,staleTime:1e4})}import*as da from"react";var Us={chart:!1,balance:!0,overview:!1,social:!1,history:!0},fb=Object.keys(Us),mb="apps.json";function Up(e){let[t,r]=da.useState({visibility:Us,isLoaded:!1});return da.useEffect(()=>{let n=!0;return On(mb,e).then(o=>{if(!n)return;let i=o?.tokenDetail?.sections,a={...Us};if(i)for(let s of fb){let l=i[s];typeof l=="boolean"&&(a[s]=l)}r({visibility:a,isLoaded:!0})}),()=>{n=!1}},[e]),t}import*as rr from"react";import{useQuery as gb,keepPreviousData as hb}from"@tanstack/react-query";var bb="token-price-history";function jp(e,t,r,n,o=!0){return gb({queryKey:[bb,e,t,r.toLowerCase(),n],queryFn:async({signal:i})=>{let a=await we("walletServer",e),s=new URLSearchParams({chain_id:String(t),token:r,interval:n}),l=await fetch(`${a}/v1/public/token/price/historical?${s}`,{cache:"no-store",signal:i});if(!l.ok)throw new Error(`Failed to fetch token price history: ${l.status}`);let c=await l.json();if(c.code!==200)throw new Error(`Token price history API error: ${c.code}`);return c.data??[]},enabled:o&&!!r&&t>0,staleTime:3e4,placeholderData:hb})}import{Fragment as Nb,jsx as Ot,jsxs as vo}from"react/jsx-runtime";var wb="var(--ds-system-green-high, #00a869)",yb="var(--wi-error, #e70077)",Yn=150,pa=3,js=18,xb=18,vb=[{key:"10m",label:"10m"},{key:"1h",label:"1H"},{key:"1d",label:"1D"},{key:"7d",label:"1W"},{key:"30d",label:"1M"},{key:"1y",label:"1Y"}],kb=new Set(["7d","30d","1y"]);function Rb(){let e=rr.useRef(null),[t,r]=rr.useState(0);return rr.useEffect(()=>{let n=e.current;if(!n)return;let o=new ResizeObserver(i=>{r(i[0]?.contentRect.width??0)});return o.observe(n),r(n.clientWidth),()=>o.disconnect()},[]),[e,t]}function Sb(e,t){let r=new Date(e*1e3),n=t?{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}:{hour:"numeric",minute:"2-digit"};return new Intl.DateTimeFormat("en-US",n).format(r)}function Cb(e,t){if(t<=0||e.length===0)return null;let r=e.length===1?[e[0],e[0]]:e,n=r.length,o=r[0],i=r[0],a=0,s=0;for(let w=1;w<n;w++)r[w]>o&&(o=r[w],a=w),r[w]<i&&(i=r[w],s=w);let l=o-i||1,c=Math.max(1,t-pa*2),p=Yn-js-xb,b=w=>n===1?t/2:pa+w/(n-1)*c,h=w=>js+(1-(w-i)/l)*p,d=r.map((w,f)=>({x:b(f),y:h(w)})),y=d.map((w,f)=>`${f===0?"M":"L"}${w.x.toFixed(2)},${w.y.toFixed(2)}`).join(" "),m=d[0],g=d[d.length-1],u=`${y} L${g.x.toFixed(2)},${Yn} L${m.x.toFixed(2)},${Yn} Z`;return{values:r,points:d,linePath:y,areaPath:u,maxIdx:a,minIdx:s}}function Wp({env:e,chainId:t,tokenAddress:r}){let[n,o]=rr.useState("1d"),[i,a]=rr.useState(null),s=rr.useId(),[l,c]=Rb(),{data:p,isLoading:b,isError:h}=jp(e,t,r,n,!0),d=rr.useMemo(()=>(p??[]).filter(P=>Number.isFinite(Number(P.price))).slice().sort((P,ne)=>P.updated_at-ne.updated_at),[p]),y=rr.useMemo(()=>d.map(L=>Number(L.price)),[d]),m=rr.useMemo(()=>Cb(y,c),[y,c]);rr.useEffect(()=>{a(null)},[n]);let g=d.length>0,u=i!==null&&i<y.length?i:y.length-1,w=g?y[u]:0,f=g?y[0]:0,R=f!==0?(w-f)/f*100:0,x=R>=0,S=x?wb:yb,M=(x?"+":"-")+(Math.floor(Math.abs(R)*100)/100).toFixed(2)+"%",C=i!==null&&d[i]?Sb(d[i].updated_at,kb.has(n)):"",v=L=>{if(!m||c<=0)return;let P=L.currentTarget.getBoundingClientRect(),ne=L.clientX-P.left;if(m.values.length<=1){a(0);return}let U=Math.max(1,c-pa*2),ce=Math.min(1,Math.max(0,(ne-pa)/U)),Z=Math.round(ce*(d.length-1));a(Math.min(d.length-1,Math.max(0,Z)))},E=()=>a(null);if(!b&&(h||!g))return null;let D=i!==null&&m&&m.points[i]?m.points[i]:null,B=m?.points[m.maxIdx],I=m?.points[m.minIdx],K=L=>Math.min(Math.max(L,24),Math.max(24,c-24));return vo("section",{className:"wi-td-chart",children:[vo("div",{className:"wi-td-chart-panel",children:[Ot("span",{className:"wi-td-chart-price",children:g?_n(w):"\u2014"}),g&&vo("span",{className:"wi-td-chart-change","data-positive":x,children:[Ot("span",{children:M}),C&&Ot("span",{className:"wi-td-chart-when",children:C})]})]}),Ot("div",{ref:l,className:"wi-td-chart-plot",children:b&&!g?Ot("div",{className:"wi-skeleton-block wi-td-chart-skeleton"}):m&&c>0&&vo("svg",{className:"wi-td-chart-svg",width:c,height:Yn,role:"img","aria-label":"Price chart",children:[Ot("defs",{children:vo("linearGradient",{id:s,x1:"0",y1:"0",x2:"0",y2:"1",children:[Ot("stop",{offset:"0%",stopColor:S,stopOpacity:.28}),Ot("stop",{offset:"100%",stopColor:S,stopOpacity:0})]})}),Ot("path",{d:m.areaPath,fill:`url(#${s})`}),Ot("path",{d:m.linePath,fill:"none",stroke:S,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),B&&Ot("text",{className:"wi-td-chart-minmax",x:K(B.x),y:Math.max(11,B.y-7),textAnchor:"middle",children:_n(m.values[m.maxIdx])}),I&&m.minIdx!==m.maxIdx&&Ot("text",{className:"wi-td-chart-minmax",x:K(I.x),y:Math.min(Yn-5,I.y+14),textAnchor:"middle",children:_n(m.values[m.minIdx])}),D&&vo(Nb,{children:[Ot("line",{className:"wi-td-chart-cursor",x1:D.x,y1:js-6,x2:D.x,y2:Yn}),Ot("circle",{cx:D.x,cy:D.y,r:4,fill:S,stroke:"var(--wi-surface-bg, #121212)",strokeWidth:2})]}),Ot("rect",{x:0,y:0,width:c,height:Yn,fill:"transparent",style:{touchAction:"none"},onPointerMove:v,onPointerDown:v,onPointerLeave:E,onPointerCancel:E})]})}),Ot("div",{className:"wi-td-chart-tabs",role:"tablist",children:vb.map(L=>Ot("button",{type:"button",role:"tab","aria-selected":n===L.key,className:"wi-td-chart-tab","data-active":n===L.key||void 0,onClick:()=>o(L.key),"data-track":"token_detail_interval","data-track-id":L.key,children:L.label},L.key))})]})}import{Fragment as Qp,jsx as H,jsxs as Ge}from"react/jsx-runtime";var Tb="https://contents.crosstoken.io/wallet/token/images/FT.png",Ib={receive:"Receive",send:"Send","bridge-in":"Bridge In","bridge-out":"Bridge Out"};function Mb(e){return e.length>24?"xs":e.length>18?"sm":"md"}function Eb(e){if(!e)return"";let t=e<1e12?e*1e3:e,r=Math.max(0,Math.floor((Date.now()-t)/1e3));if(r<60)return"just now";let n=Math.floor(r/60);if(n<60)return`${n}m`;let o=Math.floor(n/60);if(o<24)return`about ${o}h`;let i=Math.floor(o/24);if(i<30)return`${i}d`;let a=Math.floor(i/30);return a<12?`${a}mo`:`${Math.floor(a/12)}y`}function Gp(e){let[t,r]=e.split("."),n="";for(let o=0;o<t.length;o++){let i=t.length-o;o>0&&i%3===0&&(n+=","),n+=t[o]}return r?`${n}.${r}`:n}function Hp(e,t){let r=BigInt(e||"0");if(t<=2){let a=10n**BigInt(t),s=r/a,l=r%a*10n**BigInt(2-t);return`${s.toString()}.${l.toString().padStart(2,"0")}`}let n=r/10n**BigInt(t-2),o=n/100n,i=n%100n;return`${o.toString()}.${i.toString().padStart(2,"0")}`}function Ab(e,t,r){let n=Kt.useRef(null),o=Kt.useRef(null),[i,a]=Kt.useState(t);return Kt.useLayoutEffect(()=>{let s=n.current,l=o.current;if(!s||!l)return;let c=()=>{let b=s.clientWidth;if(!b)return;let h=window.getComputedStyle(l),d=document.createElement("span");d.textContent=l.textContent,d.style.cssText=["position:absolute","left:-9999px","top:-9999px","visibility:hidden","white-space:nowrap",`font-family:${h.fontFamily}`,`font-weight:${h.fontWeight}`,`letter-spacing:${h.letterSpacing}`,`font-size:${t}px`].join(";"),document.body.appendChild(d);let y=d.offsetWidth;if(document.body.removeChild(d),y<=b){a(t);return}let m=Math.max(r,Math.floor(t*b/y));a(m)};c();let p=new ResizeObserver(c);return p.observe(s),()=>p.disconnect()},[e,t,r]),{containerRef:n,textRef:o,fontSize:i}}function Lb(e){if(!e)return"-";let t=new _p(e);return t.isNaN()?"-":t.decimalPlaces(4,_p.ROUND_DOWN).toFormat()}function Db(){return Ge("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[H("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"1.6"}),H("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 Pb(){return H("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:H("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 Bb(){return H("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:H("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 Fb(){return H("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:H("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 Vp({env:e,isMobile:t,token:r,walletAddress:n,stat:o,tokenInfo:i,showBalance:a=!0,onBack:s,onClose:l,onSend:c,onOutlink:p}){let b=r.quantity.decimals,[h,d]=Kt.useState(!1),{buildTxUrl:y,chainInfo:m}=gc(e,r.chainId,!0),{visibility:g}=Up(e),{data:u,isLoading:w,isError:f,fetchNextPage:R,hasNextPage:x,isFetchingNextPage:S,refetch:M}=zp(e,r.chainId,r.address,n,!0),C=Kt.useMemo(()=>u?.pages?u.pages.flat():[],[u]),v=Kt.useRef(null);Kt.useEffect(()=>{if(!t)return;let z=v.current;if(!z||!x)return;let ee=new IntersectionObserver(J=>{J[0]?.isIntersecting&&!S&&R()},{rootMargin:"120px"});return ee.observe(z),()=>ee.disconnect()},[t,x,S,R]);let E=Kt.useCallback(()=>{navigator?.clipboard&&navigator.clipboard.writeText(r.address).then(()=>{d(!0),setTimeout(()=>d(!1),1500)}).catch(()=>{})},[r.address]),D=Gp(Hp(r.quantity.numeric,b)),B=o?.price?Mi(r.quantity.numeric,b,o.price):null,I=a?D:"\u2022\u2022\u2022\u2022",{containerRef:K,textRef:L,fontSize:P}=Ab(I,30,14),V=Fo(r.chainId,e).name??m?.name??`Chain ${r.chainId}`,U=m?.explorer_url,ce=i?.deployed??!0,Z=Kt.useMemo(()=>{let z=[];return i?.info_url&&z.push({key:"web",label:"Website",url:i.info_url,icon:H(Db,{})}),i?.telegram_url&&z.push({key:"tg",label:"Telegram",url:i.telegram_url,icon:H(Pb,{})}),i?.x_url&&z.push({key:"x",label:"X",url:i.x_url,icon:H(Bb,{})}),i?.medium_url&&z.push({key:"medium",label:"Medium",url:i.medium_url,icon:H(Fb,{})}),z},[i]),G=(z,ee,J,pe)=>{Rt(z,ee,{category:"token-detail",origin:J,payload:{address:r.address,txHash:pe}},p)};return Ge(Qp,{children:[Ge("div",{className:"wi-sticky-header",children:[Ge("div",{className:"wi-header wi-header--receive",children:[H("button",{type:"button",className:"wi-header-back",onClick:s,"aria-label":"Back",children:H(ln,{size:24})}),Ge("span",{className:"wi-td-header-title",children:[H("img",{src:r.icon_url,alt:"","aria-hidden":!0,className:"wi-td-header-icon",width:24,height:24,draggable:!1,onError:z=>{z.currentTarget.src=Tb}}),H("span",{className:"wi-td-header-name",children:r.symbol})]}),H("button",{type:"button",className:"wi-header-action",onClick:l,"aria-label":"Close",children:H(yr,{size:24})})]}),H("hr",{className:"wi-divider"})]}),Ge("div",{className:"wi-td-scroll",children:[g.chart&&H(Wp,{env:e,chainId:r.chainId,tokenAddress:r.address}),g.balance&&Ge("section",{className:"wi-td-balance-card",children:[Ge("div",{className:"wi-td-balance-left",ref:K,children:[H("span",{className:"wi-td-balance-label",children:"My Balance"}),H("span",{className:"wi-td-balance-amount",ref:L,style:{fontSize:P},children:I}),a&&B&&H("span",{className:"wi-td-balance-fiat",children:B})]}),H("button",{type:"button",className:"wi-td-send-btn",onClick:()=>c(r),"aria-label":`Send ${r.symbol}`,"data-track":"token_detail_send","data-track-id":r.symbol,children:H("span",{children:"Send"})})]}),g.overview&&Ge("section",{className:"wi-td-section",children:[H("h3",{className:"wi-td-section-title",children:"Crypto Overview"}),Ge("div",{className:"wi-td-rows",children:[Ge("div",{className:"wi-td-row",children:[H("span",{className:"wi-td-row-label",children:"Network"}),U?Ge("a",{className:"wi-td-row-value wi-td-row-link",href:U,target:"_blank",rel:"noopener noreferrer",onClick:z=>G(z,U,"token-network"),children:[H("span",{children:V}),H(Ob,{})]}):H("span",{className:"wi-td-row-value",children:V})]}),Ge("div",{className:"wi-td-row",children:[H("span",{className:"wi-td-row-label",children:"Contract Address"}),Ge("button",{type:"button",className:"wi-td-row-value wi-td-row-copy",onClick:E,"aria-label":"Copy contract address",children:[H("span",{children:qt(r.address)}),h?H(sn,{size:14}):H(Un,{size:14})]})]}),Ge("div",{className:"wi-td-row",children:[H("span",{className:"wi-td-row-label",children:"Decimals"}),H("span",{className:"wi-td-row-value",children:b})]}),Ge("div",{className:"wi-td-row",children:[H("span",{className:"wi-td-row-label",children:"Total Supply"}),H("span",{className:"wi-td-row-value",children:Lb(o?.circulating_supply)})]})]})]}),g.social&&Z.length>0&&Ge("section",{className:"wi-td-section",children:[H("h3",{className:"wi-td-section-title",children:"Social Media"}),H("div",{className:"wi-td-social-row",children:Z.map(z=>H("a",{className:"wi-td-social-btn",href:z.url,target:"_blank",rel:"noopener noreferrer","aria-label":z.label,onClick:ee=>G(ee,z.url,"token-social"),children:z.icon},z.key))})]}),g.history&&Ge("section",{className:"wi-td-section",children:[H("h3",{className:"wi-td-section-title",children:"Token History"}),w&&H("div",{className:"wi-td-history-list",children:Array.from({length:3},(z,ee)=>Ge("div",{className:"wi-td-history-skeleton",children:[H("div",{className:"wi-skeleton-block",style:{width:90,height:14}}),H("div",{className:"wi-skeleton-block",style:{width:60,height:14}})]},`td-sk-${ee}`))}),!w&&f&&Ge("div",{className:"wi-td-history-empty",children:[H("span",{children:"Failed to load history."}),H("button",{type:"button",className:"wi-td-retry-btn",onClick:()=>M(),children:"Retry"})]}),!w&&!f&&C.length===0&&H("div",{className:"wi-td-history-empty",children:H("span",{children:"No transactions found."})}),!w&&!f&&C.length>0&&Ge("div",{className:"wi-td-history-list",children:[C.map((z,ee)=>{let J=z.to_alias?.toLowerCase().includes("bridge")??!1,pe=z.from_alias?.toLowerCase().includes("bridge")??!1,se=J?"bridge-out":pe?"bridge-in":z.to?.toLowerCase()===n.toLowerCase()?"receive":"send",te=se==="receive"||se==="bridge-in",be=te?z.from:z.to,Le=Gp(Hp(z.amount,b)),ge=y(z.tx),De=Eb(z.timestamp),le=Ge(Qp,{children:[Ge("div",{className:"wi-td-history-top",children:[H("span",{className:"wi-td-history-type","data-direction":se,children:Ib[se]}),H("span",{className:"wi-td-history-counter",children:qt(be??"")})]}),Ge("div",{className:"wi-td-history-bottom",children:[Ge("span",{className:"wi-td-history-meta",children:[H("span",{className:"wi-td-history-status","data-status":z.status,children:z.status==="success"?"Success":"Failed"}),De&&H("span",{className:"wi-td-history-time",children:De})]}),Ge("span",{className:"wi-td-history-amount","data-size":Mb(`${te?"+":"-"}${Le} ${r.symbol}`),children:[te?"+":"-",Le," ",r.symbol]})]})]}),_e=`${z.tx}-${z.log_index}-${ee}`;return ge?H("a",{className:"wi-td-history-item wi-td-history-item--link",href:ge,target:"_blank",rel:"noopener noreferrer",onClick:Ke=>G(Ke,ge,"token-tx",z.tx),children:le},_e):H("div",{className:"wi-td-history-item",children:le},_e)}),x&&(t?H("div",{ref:v,className:"wi-td-history-sentinel",children:S&&H("span",{className:"wi-td-history-loading",children:"Loading\u2026"})}):H("button",{type:"button",className:"wi-td-loadmore-btn",onClick:()=>R(),disabled:S,children:S?"Loading\u2026":"Load more"}))]})]})]})]})}function Ob(){return H("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",className:ve("wi-td-external-icon"),"aria-hidden":!0,children:H("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"})})}import{Fragment as _s,jsx as N,jsxs as Q}from"react/jsx-runtime";var Ub="On-ramp is not available in your region.";function Ws(e,t,r){let n=at[e],o=r.toUpperCase();if(t===n.cross&&o.includes("ONEUSD"))return 0;if(t===n.cross&&o==="ONE")return 1;if(t===n.bsc&&o==="ONE")return 2}function jb(e){return parseInt(e.split(":")[1],10)}function Wb(e){if(typeof window>"u"||!e?.length)return!1;let{origin:t,pathname:r}=window.location,n=t+r;return e.some(o=>n===o||n.startsWith(`${o}/`))}function _b(e){let t=e.lastIndexOf(".");return t===-1?{main:e,decimal:""}:{main:e.slice(0,t),decimal:e.slice(t)}}function Gb(e){let t=e.toLowerCase().replace(/^0x/,""),r=t.length>=8?t.slice(0,8):t.padEnd(8,"0"),n=parseInt(r.slice(0,4),16)%360,o=(n+60+parseInt(r.slice(4,8),16)%120)%360;return`linear-gradient(135deg, hsl(${n} 85% 65%), hsl(${o} 80% 55%))`}function Hb(e,t=.5){let r=X.useRef(null),n=X.useRef(null),[o,i]=X.useState(1);return X.useLayoutEffect(()=>{let a=r.current,s=n.current;if(!a||!s)return;let l=()=>{let p=a.clientWidth;if(!p)return;let b=s.cloneNode(!0);b.style.setProperty("--wi-total-scale","1"),b.style.position="absolute",b.style.left="-9999px",b.style.top="-9999px",b.style.visibility="hidden",b.style.maxWidth="none",b.style.width="max-content",a.appendChild(b);let h=b.offsetWidth;a.removeChild(b);let d=h>p?Math.max(t,p/h):1;i(d)};l();let c=new ResizeObserver(l);return c.observe(a),()=>c.disconnect()},[e,t]),{containerRef:r,valueRef:n,scale:o}}function qp({align:e="end",sideOffset:t=12,className:r,children:n}){let{env:o,theme:i,isMobile:a,open:s,drawerDirection:l,modal:c,showBalance:p,showForgeToken:b,showGameToken:h,showQR:d,showBridge:y,qrLogoSrc:m,walletAddress:g,accountName:u,sendAccounts:w,profileImageUrl:f,preferredTokens:R,close:x,onSelectWallet:S,onCopyAddress:M,onBuy:C,onDisconnect:v,disconnectLabel:E,termsUrl:D,termsLabel:B,privacyUrl:I,privacyLabel:K,portalStyle:L,navContent:P,navPosition:ne,footerContent:V,view:U,setView:ce,selectedSendToken:Z,setSelectedSendToken:G,selectedDetailToken:z,setSelectedDetailToken:ee,showPortfolio:J,portfolioTitle:pe,portfolioSections:se,showTotalAssets:te,totalAssetsLabel:be,sendTransaction:Le,getTransactionReceipt:ge,estimateGas:De,onOutlink:le,lpBalanceReader:_e,stakingRewardsReader:Ke,bridgeTokens:Se,bridgeHistory:Ue,getBridgeQuote:Me,getBridgeToTokens:Ze,getBridgeApproval:Nt,approveBridge:st,submitBridge:yt,onReceive:lt,onSend:jt,onBuyDisabledMessage:je,onBridgeDisabledMessage:Dt,onSendDisabledMessage:mt}=bn(),[ct,rt]=X.useState(null),xt=X.useRef(void 0),Pe=X.useCallback(T=>{rt(T),clearTimeout(xt.current),xt.current=setTimeout(()=>rt(null),4e3)},[]);X.useEffect(()=>()=>clearTimeout(xt.current),[]);let Xe=!!je,Je=X.useCallback(()=>{if(Xe){Pe(je);return}let T=C?.();T&&typeof T.then=="function"&&T.catch(()=>{Pe(je??Ub)})},[Xe,je,C,Pe]),ot=!!Dt,$e=!!mt,{tokens:Tt,isLoading:Wt}=vn(o,g,s&&p),{statsMap:Be}=kn(o,p),{aprPercent:it}=Xc(),{categoryMap:et,infoMap:_t}=$c(o,p),F=p&&te,{displayValue:ie,isLowerBound:Fe,isLoading:gt}=ed(o,g,s&&F),[ht,Gt]=X.useState(!1),Pt=X.useRef(null),[Ht,on]=X.useState(0),{holdings:pr,isLoading:an}=Kc(o,g,s&&p&&b),br=X.useMemo(()=>pr.map(T=>T.token),[pr]),{imageMap:A}=Zc(o,br,b&&pr.length>0),$=X.useMemo(()=>{let T=[],oe=[],Ce=[],Jt=new Map((R??[]).map((Ee,Vt)=>[`${jb(Ee.chainId)}:${Ee.address.toLowerCase()}`,Vt]));for(let Ee of Tt){let Vt=Ws(o,Ee.chainId,Ee.symbol)!==void 0,Or=`${Ee.chainId}:${Ee.address.toLowerCase()}`,Fn=Jt.get(Or),Za=new Jo(Ee.quantity.numeric).shiftedBy(-Ee.quantity.decimals);if(Vt)T.push(Ee);else if(Fn!==void 0)oe.push(Ee);else if(Za.isGreaterThan(0)){if(!h&&et.get(Ho(Ee.chainId,Ee.address))==="game")continue;Ce.push(Ee)}}return T.sort((Ee,Vt)=>{let Or=Ws(o,Ee.chainId,Ee.symbol)??99,Fn=Ws(o,Vt.chainId,Vt.symbol)??99;return Or-Fn}),oe.sort((Ee,Vt)=>{let Or=Jt.get(`${Ee.chainId}:${Ee.address.toLowerCase()}`)??99,Fn=Jt.get(`${Vt.chainId}:${Vt.address.toLowerCase()}`)??99;return Or-Fn}),Ce.sort((Ee,Vt)=>{let Or=Be.get(vr(Ee.chainId,Ee.address)),Fn=Be.get(vr(Vt.chainId,Vt.address)),Za=new Jo(Ee.quantity.numeric).shiftedBy(-Ee.quantity.decimals).multipliedBy(Or?.price??0);return new Jo(Vt.quantity.numeric).shiftedBy(-Vt.quantity.decimals).multipliedBy(Fn?.price??0).minus(Za).toNumber()}),[...T,...oe,...Ce]},[Tt,o,Be,h,et,R]),j=X.useMemo(()=>{if(!b)return[];let T=new Set(Tt.map(oe=>oe.address.toLowerCase()));return[...pr].filter(oe=>!T.has(oe.token.toLowerCase())).sort((oe,Ce)=>{let Jt=new Jo(oe.value);return new Jo(Ce.value).minus(Jt).toNumber()})},[pr,b,Tt]),ue=X.useRef(!1),[Oe,It]=X.useState(null),hn=X.useRef(void 0),mi=Oe?.chainId??Z?.chainId??$[0]?.chainId??0,{transactionUrl:$n}=jo(o,mi,Oe?.txHash,!!(Oe?.txHash&&mi)),bt=X.useCallback(T=>{ue.current=!0,ce(T)},[ce]),[Ha,Do]=X.useState("recipient"),eo=X.useCallback(()=>{G(null),Do("recipient"),bt("wallet")},[G,bt]),to=X.useCallback((T,oe="recipient")=>{if($e){Pe(mt);return}Do(oe),G(T),bt("send")},[$e,mt,Pe,G,bt]),Qa=X.useCallback(T=>{ee(T),bt("token-detail")},[ee,bt]),Va=X.useCallback(()=>{ee(null),bt("wallet")},[ee,bt]),W=X.useCallback(T=>{to(T,"recipient")},[to]),Ve=Ur("apps.json",o,T=>zr(T?.gametokenBridge,o)),nr=Ur("apps.json",o,T=>T?.gametokenSites),Mt=X.useCallback(()=>{if(ot){Pe(Dt);return}if(Ve){if(Wb(nr)){window.location.assign(Ve);return}window.open(Ve,"_blank","noopener,noreferrer")}},[ot,Dt,Ve,nr,Pe]),Br=X.useCallback(T=>{clearTimeout(hn.current),G(null),bt("wallet"),It({status:"pending",txHash:T.txHash,chainId:T.chainId,description:`${T.amount} ${T.tokenSymbol} to ${qt(T.recipient)}`})},[G,bt]),Qt=X.useCallback(T=>{let oe=Z?.chainId;G(null),bt("wallet"),!(!T||!oe)&&(It(Ce=>({status:"success",txHash:T,chainId:oe,description:Ce?.txHash===T?Ce.description:"Tap to see your transaction"})),clearTimeout(hn.current),hn.current=setTimeout(()=>It(null),5e3))},[Z?.chainId,G,bt]),Fr=X.useCallback(T=>{let oe=T.txHash;oe&&(It({status:"error",txHash:oe,chainId:T.chainId,description:T.message}),clearTimeout(hn.current),hn.current=setTimeout(()=>It(null),5e3))},[]),ke=X.useMemo(()=>{if(lt)return lt;if(d)return()=>bt("qr")},[lt,d,bt]),wr=X.useMemo(()=>{if(jt)return jt;if($.length===0)return;let T=$[0];return()=>to(T,"token")},[jt,$,to]),ro=X.useCallback(()=>{if($e){Pe(mt);return}wr?.()},[$e,mt,wr,Pe]);X.useEffect(()=>{s||(ue.current=!1,Do("recipient"))},[s]);let wl=X.useRef(null);X.useEffect(()=>{let T=wl.current;if(!T||!a)return;let oe=Ce=>{Ce.pointerType==="touch"&&Ce.stopPropagation()};return T.addEventListener("pointerdown",oe),()=>T.removeEventListener("pointerdown",oe)},[a]);let[no,yl]=X.useState(!1),qa=X.useRef(void 0),[Po,Bo]=X.useState(!1);X.useEffect(()=>{if(!Po)return;let T=()=>Bo(!1),oe=Jt=>{Jt.key==="Escape"&&Bo(!1)},Ce=setTimeout(()=>{document.addEventListener("mousedown",T,!0),document.addEventListener("keydown",oe,!0)},0);return()=>{clearTimeout(Ce),document.removeEventListener("mousedown",T,!0),document.removeEventListener("keydown",oe,!0)}},[Po]),X.useEffect(()=>{Bo(!1)},[g]),X.useEffect(()=>()=>clearTimeout(qa.current),[]),X.useEffect(()=>()=>clearTimeout(hn.current),[]),X.useEffect(()=>{let T=Pt.current;if(!T||V===null){on(0);return}let oe=()=>{on(T.offsetHeight)};if(oe(),typeof ResizeObserver>"u")return;let Ce=new ResizeObserver(oe);return Ce.observe(T),()=>Ce.disconnect()},[V]);let xl=X.useCallback(async()=>{if(!no)try{await navigator.clipboard.writeText(g),yl(!0),clearTimeout(qa.current),qa.current=setTimeout(()=>yl(!1),2e3),M?.(g,!0)}catch{M?.(g,!1)}},[g,M,no]),gi=X.useCallback(T=>{T.currentTarget.setAttribute("data-loaded","true")},[]),vl=X.useMemo(()=>({background:Gb(g)}),[g]),hi=X.useMemo(()=>f||cn(o,g,{size:120,bg:i==="dark"?"1A1A2E":"F3F6F8"}),[f,o,g,i]),Ya=X.useMemo(()=>_b(ie),[ie]),{containerRef:Ff,valueRef:Of,scale:zf}=Hb(ht?"\u2022\u2022\u2022\u2022\u2022\u2022":ie),kl=D||I?Q("div",{className:"wi-legal-links",children:[D&&N("a",{className:"wi-legal-link",href:D,target:"_blank",rel:"noopener noreferrer","data-track":"terms_link",onClick:T=>Rt(T,D,{category:"terms",origin:"terms"},le),children:B}),D&&I&&N("span",{className:"wi-legal-sep","aria-hidden":!0,children:"\xB7"}),I&&N("a",{className:"wi-legal-link",href:I,target:"_blank",rel:"noopener noreferrer","data-track":"privacy_link",onClick:T=>Rt(T,I,{category:"privacy",origin:"privacy"},le),children:K})]}):null,Rl=v?Q("button",{type:"button",className:"wi-disconnect-btn","data-track":"disconnect",onClick:()=>{v(),x()},children:[N(rc,{size:16}),N("span",{className:"wi-disconnect-label",children:E})]}):null,Uf=p&&!P?Q("div",{className:"wi-action-row","aria-label":"Wallet actions",children:[Q("button",{type:"button",className:ve("wi-action-card",Xe&&"wi-action-card--dimmed"),onClick:Je,disabled:!C&&!Xe,"aria-disabled":Xe||void 0,"aria-label":"Buy","data-track":"buy",children:[N(lc,{size:20}),N("span",{children:"Buy"})]}),y?Q("button",{type:"button",className:ve("wi-action-card",ot&&"wi-action-card--dimmed"),onClick:Mt,"aria-disabled":ot||void 0,"aria-label":"Bridge","data-track":"bridge_open",children:[N(cc,{size:20}),N("span",{children:"Bridge"})]}):Q("button",{type:"button",className:"wi-action-card",onClick:ke,disabled:!ke,"aria-label":"Receive","data-track":"receive",children:[N(Ii,{size:20}),N("span",{children:"Receive"})]}),Q("button",{type:"button",className:ve("wi-action-card",$e&&"wi-action-card--dimmed"),onClick:ro,disabled:!$e&&!wr,"aria-disabled":$e||void 0,"aria-label":"Send","data-track":"send_open",children:[N(ac,{size:20}),N("span",{children:"Send"})]}),J?Q("button",{type:"button",className:"wi-action-card",onClick:()=>bt("portfolio"),"aria-label":"View portfolio","data-track":"portfolio_open",children:[N(sc,{size:20}),N("span",{children:"Portfolio"})]}):y?Q("button",{type:"button",className:"wi-action-card",onClick:ke,disabled:!ke,"aria-label":"Receive","data-track":"receive",children:[N(Ii,{size:20}),N("span",{children:"Receive"})]}):null]}):null,jf=Q("div",{className:ve("wi-view-inner",ue.current&&"wi-view-wallet"),children:[F&&Q("div",{className:"wi-total-section",children:[Q("div",{className:"wi-total-head",children:[N("span",{className:"wi-total-label",children:be}),N("span",{role:"button",tabIndex:0,className:"wi-total-eye",onClick:T=>{T.stopPropagation(),Gt(oe=>!oe)},onKeyDown:T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),T.stopPropagation(),Gt(oe=>!oe))},"aria-label":ht?"Show balance":"Hide balance","data-track":"balance_toggle",children:ht?N(oc,{}):N(nc,{})})]}),N("div",{className:"wi-total-body",ref:Ff,children:gt?N("div",{className:"wi-skeleton-block wi-total-skeleton",style:{width:160,height:42}}):N("div",{className:"wi-total-value","data-hidden":ht||void 0,ref:Of,style:{"--wi-total-scale":zf},children:ht?N("span",{className:"wi-total-mask",children:"\u2022\u2022\u2022\u2022\u2022\u2022"}):Q(_s,{children:[Fe&&N("span",{className:"wi-total-lte",children:"\u2264"}),N("span",{className:"wi-total-currency",children:"$"}),N("span",{className:"wi-total-amount",children:Ya.main}),Ya.decimal&&N("span",{className:"wi-total-decimal",children:Ya.decimal})]})})})]}),ne==="top"&&(P?N("div",{className:"wi-nav-fixed",children:P}):Uf),p&&N("div",{ref:wl,className:"wi-scrollable-body","data-vaul-no-drag":!0,children:Q("div",{className:"wi-token-list",children:[Wt&&Array.from({length:5},(T,oe)=>Q("div",{className:"wi-skeleton-item",children:[Q("div",{className:"wi-skeleton-left",children:[N("div",{className:"wi-skeleton-block wi-skeleton-icon"}),Q("div",{className:"wi-skeleton-lines",children:[N("div",{className:"wi-skeleton-block",style:{width:64,height:14}}),N("div",{className:"wi-skeleton-block",style:{width:80,height:12}})]})]}),Q("div",{className:"wi-skeleton-right",children:[N("div",{className:"wi-skeleton-block",style:{width:72,height:14}}),N("div",{className:"wi-skeleton-block",style:{width:48,height:12}})]})]},oe)),!Wt&&$.length===0&&!b&&N("div",{className:"wi-empty",children:"No Tokens Found"}),$.map(T=>{let oe=Be.get(vr(T.chainId,T.address)),Ce=oe?parseFloat(oe.percent_change_24h):null,Jt=Ce!==null&&Ce>=0,Ee=Go(o,T.chainId),Vt=Ac(T.address);return Q("button",{type:"button",className:"wi-token-item wi-token-item--button",onClick:()=>Qa(T),"aria-label":`View ${T.symbol} detail`,"data-track":"token_detail","data-track-id":T.symbol,children:[Q("div",{className:"wi-token-left",children:[Q("div",{className:"wi-token-icon-wrap",children:[N("img",{src:T.icon_url,alt:T.symbol,className:"wi-token-icon",width:32,height:32,loading:"lazy",draggable:!1,onLoad:gi,onError:Or=>{Or.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),Ee&&N("img",{src:Ee,alt:"","aria-hidden":!0,className:"wi-token-chain-badge",width:14,height:14,loading:"lazy",draggable:!1,onError:Or=>{Or.currentTarget.style.display="none"}})]}),Q("div",{className:"wi-token-info",children:[Q("span",{className:"wi-token-name-row",children:[N("span",{className:"wi-token-name",children:T.symbol}),Vt&&it!==null&&N("span",{className:"wi-token-apr",children:`APR ${it>=0?"+":"-"}${(it>=0?Math.floor:Math.ceil)(Math.abs(it)*100)/100}%`})]}),oe&&Q("div",{className:"wi-token-price-row",children:[N("span",{className:"wi-token-price",children:_n(oe.price)}),N("span",{className:"wi-token-change","data-positive":Jt,"data-zero":Ce===0||void 0,children:Ce!==null&&(Ce===0?"0%":`${Jt?"+":"-"}${(Jt?Math.floor:Math.ceil)(Math.abs(Ce)*100)/100}%`)})]})]})]}),Q("div",{className:"wi-token-right",children:[N("span",{className:"wi-token-balance",children:wn(T.quantity.numeric,T.quantity.decimals)}),oe&&N("span",{className:"wi-token-value",children:Mi(T.quantity.numeric,T.quantity.decimals,oe.price)})]})]},`${T.address}-${T.chainId}`)}),b&&an&&Array.from({length:3},(T,oe)=>Q("div",{className:"wi-skeleton-item",children:[Q("div",{className:"wi-skeleton-left",children:[N("div",{className:"wi-skeleton-block wi-skeleton-icon"}),Q("div",{className:"wi-skeleton-lines",children:[N("div",{className:"wi-skeleton-block",style:{width:64,height:14}}),N("div",{className:"wi-skeleton-block",style:{width:80,height:12}})]})]}),Q("div",{className:"wi-skeleton-right",children:[N("div",{className:"wi-skeleton-block",style:{width:72,height:14}}),N("div",{className:"wi-skeleton-block",style:{width:48,height:12}})]})]},`forge-sk-${oe}`)),b&&!an&&!Wt&&$.length===0&&j.length===0&&N("div",{className:"wi-empty",children:"No Tokens Found"}),b&&j.map(T=>{let oe=A.get(T.token)||"",Ce=Go(o,at[o].cross);return Q("div",{className:"wi-token-item",children:[Q("div",{className:"wi-token-left",children:[Q("div",{className:"wi-token-icon-wrap",children:[N("img",{src:oe||"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:gi,onError:Jt=>{Jt.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),Ce&&N("img",{src:Ce,alt:"","aria-hidden":!0,className:"wi-token-chain-badge",width:14,height:14,loading:"lazy",draggable:!1,onError:Jt=>{Jt.currentTarget.style.display="none"}})]}),Q("div",{className:"wi-token-info",children:[N("span",{className:"wi-token-name",children:T.token_name}),N("div",{className:"wi-token-price-row",children:Q("span",{className:"wi-token-price",children:[wn(T.current_price,18)," CROSS"]})})]})]}),Q("div",{className:"wi-token-right",children:[N("span",{className:"wi-token-balance",children:wn(T.balance,18)}),N("span",{className:"wi-token-value",children:_n(T.current_value_usd)})]})]},`forge-${T.token}`)})]})}),ne==="bottom"&&P&&N("div",{className:"wi-nav-fixed",children:P}),Rl&&N("div",{className:"wi-wallet-disconnect-row",children:Rl})]},"wallet"),Wf=J?N("div",{className:ve("wi-view-inner wi-portfolio-body",ue.current&&"wi-view-portfolio"),children:N(wo,{env:o,theme:i,walletAddress:g,showHeader:!1,onOutlink:le,lpBalanceReader:_e,stakingRewardsReader:Ke,sendTransaction:Le,estimateGas:De,sections:se})},"portfolio"):null,_f=Z?N("div",{className:ve("wi-view-inner wi-send-body",ue.current&&"wi-view-send"),children:N(_i,{env:o,theme:i,walletAddress:g,accountName:u,accounts:w,initialStep:Ha,token:Z,tokens:$,onTokenChange:G,sendTransaction:Le,getTransactionReceipt:ge,estimateGas:De,getTokenPriceUsd:T=>{let oe=Be.get(vr(T.chainId,T.address));if(!oe?.price)return;let Ce=parseFloat(oe.price);return Number.isFinite(Ce)?Ce:void 0},onClose:x,onBackToWallet:eo,onSubmitted:Br,onSuccess:Qt,onFailed:Fr,onOutlink:le})},"send"):null,Gf=X.useMemo(()=>Se||$.map(T=>{let oe=Be.get(vr(T.chainId,T.address)),Ce=oe?.price?parseFloat(oe.price):void 0;return{name:T.name,symbol:T.symbol,chainId:T.chainId,address:T.address,decimals:T.quantity.decimals,balance:mo(T.quantity.numeric,T.quantity.decimals),iconUrl:T.icon_url,priceUsd:Number.isFinite(Ce)?Ce:void 0}}),[Se,Be,$]),Hf=N("div",{className:ve("wi-view-inner wi-bridge-body",ue.current&&"wi-view-send"),children:N(ca,{env:o,walletAddress:g,tokens:Gf,history:Ue,termsUrl:D,getQuote:Me,getToTokens:Ze,getApproval:Nt,approveBridge:st,submitBridge:yt,onClose:x,onBackToWallet:eo})},"bridge"),Qf=z?N("div",{className:ve("wi-view-inner wi-token-detail-body",ue.current&&"wi-view-send"),children:N(Vp,{env:o,isMobile:a,token:z,walletAddress:g,stat:Be.get(vr(z.chainId,z.address)),tokenInfo:_t.get(Ho(z.chainId,z.address)),showBalance:p,onBack:Va,onClose:x,onSend:W,onOutlink:le})},"token-detail"):null,Ka=!!S&&u?.trim().toLowerCase()!=="my wallet",Sl=Q(_s,{children:[Q("span",{className:"wi-receive-avatar",children:[N("span",{className:"wi-avatar-fallback",style:vl}),hi&&N("img",{src:hi,alt:"",className:"wi-avatar-img",width:24,height:24,draggable:!1,onLoad:gi,onError:T=>{T.currentTarget.style.display="none"}})]}),N("span",{className:"wi-receive-account-name",children:u??"Account 1"}),Ka&&N("span",{className:"wi-receive-chevron","data-open":Po,"aria-hidden":"true",children:N(jn,{size:16})})]}),Vf=Q("div",{className:ve("wi-view-inner wi-qr-body",ue.current&&"wi-view-qr"),children:[Q("div",{className:"wi-receive-section",children:[Ka?N("button",{type:"button",className:"wi-receive-account wi-receive-account--btn",onClick:()=>{Bo(!0),S?.()},"aria-label":"Switch account",children:Sl}):N("div",{className:"wi-receive-account",children:Sl}),Q("div",{className:"wi-qr-block",children:[Q("div",{className:"wi-qr-box",children:[N(zb,{value:g,size:180,level:"H",marginSize:2,...m&&{imageSettings:{src:m,height:33,width:33,excavate:!0}}}),!m&&N("div",{className:"wi-qr-logo",children:N(ic,{size:33})})]}),N("p",{className:"wi-qr-address",children:g})]}),Q("button",{type:"button",className:"wi-qr-copy-btn",onClick:xl,"data-track":"address_copy",children:[N("span",{className:"wi-qr-copy-icon",children:no?N(sn,{size:16}):N(Un,{size:16})}),N("span",{className:"wi-qr-copy-text",children:no?"Copied!":"Copy address"})]})]}),kl&&N("div",{className:"wi-receive-footer",children:kl})]},"qr"),qf=U==="qr"||U==="portfolio"||U==="send"||U==="bridge",Cl=V!==null?N("div",{className:"wi-builtin-footer",children:V}):null,Nl=Q("div",{className:"wi-account-text",children:[Ka?Q("button",{type:"button",className:"wi-account-row wi-account-row--btn",onClick:()=>{Bo(!0),S?.()},"aria-label":"Switch account","aria-expanded":Po,children:[N("span",{className:"wi-account-name",children:u??"Account 1"}),N("span",{className:"wi-account-switch","data-open":Po,"aria-hidden":"true",children:N(jn,{size:20})})]}):N("div",{className:"wi-account-row",children:N("span",{className:"wi-account-name",children:u??"Account 1"})}),Q("button",{type:"button",className:"wi-address-row-btn",onClick:xl,"aria-label":"Copy address","data-track":"address_copy",children:[N("span",{className:"wi-account-address",children:qt(g)}),N("span",{className:"wi-account-copy","data-copied":no,children:no?N(sn,{size:12}):N(Un,{size:12})})]})]}),Tl=Q(_s,{children:[n,U==="qr"?N("div",{className:"wi-sticky-header",children:Q("div",{className:"wi-header wi-header--receive",children:[N("button",{type:"button",className:"wi-header-back",onClick:eo,"aria-label":"Back",children:N(ln,{size:24})}),N("span",{className:"wi-receive-title",children:"Receive"}),N("button",{type:"button",className:"wi-header-action",onClick:x,"aria-label":"Close",children:N(yr,{size:24})})]})}):U==="send"||U==="bridge"||U==="token-detail"?null:qf?Q("div",{className:"wi-sticky-header",children:[Q("div",{className:"wi-header wi-header--wallet wi-header--sub-account",children:[N("button",{type:"button",className:"wi-header-back",onClick:eo,"aria-label":"Back",children:N(ln,{size:24})}),N("div",{className:"wi-account-block wi-account-block--sub-account",children:Nl}),N("button",{type:"button",className:"wi-header-action",onClick:x,"aria-label":"Close",children:N(yr,{size:24})})]}),N("hr",{className:"wi-divider"})]}):Q("div",{className:"wi-sticky-header",children:[Q("div",{className:"wi-header wi-header--wallet",children:[Q("div",{className:"wi-account-block",children:[Q("div",{className:"wi-avatar",children:[N("div",{className:"wi-avatar-fallback",style:vl}),hi&&N("img",{src:hi,alt:"",className:"wi-avatar-img",width:28,height:28,draggable:!1,onLoad:gi,onError:T=>{T.currentTarget.style.display="none"}})]}),Nl]}),Q("div",{className:"wi-header-actions",children:[d&&y&&N("button",{type:"button",className:"wi-header-action wi-header-action--qr",onClick:ke,"aria-label":"Show QR code","data-track":"receive",children:N(Ii,{size:20})}),N("button",{type:"button",className:"wi-header-action",onClick:x,"aria-label":"Close",children:N(yr,{size:24})})]})]}),N("hr",{className:"wi-divider"})]}),Q("div",{className:"wi-view-container",children:[U==="wallet"&&jf,U==="qr"&&Vf,U==="portfolio"&&Wf,U==="send"&&_f,U==="bridge"&&Hf,U==="token-detail"&&Qf]}),U==="wallet"&&ct&&N("div",{className:"wi-action-toast",role:"status","aria-live":"polite",children:ct}),U==="wallet"&&Oe&&Q("a",{className:"wi-send-toast",href:$n??"#",target:"_blank",rel:"noopener noreferrer",onClick:T=>{if(!$n){T.preventDefault();return}Rt(T,$n,{category:"send",origin:"send-transaction",payload:{chainId:Oe.chainId,txHash:Oe.txHash}},le)},children:[N("span",{className:"wi-send-toast-icon","data-status":Oe.status,"aria-hidden":!0,children:Oe.status==="pending"?N("span",{className:"wi-send-toast-spinner"}):Oe.status==="error"?N("span",{className:"wi-send-toast-error-dot"}):N(dc,{size:20})}),Q("span",{className:"wi-send-toast-copy",children:[N("span",{className:"wi-send-toast-title",children:Oe.status==="pending"?"Sending...":Oe.status==="error"?"Send failed":"Send complete"}),N("span",{className:"wi-send-toast-desc",children:Oe.status==="pending"||Oe.status==="error"?Oe.description:"Tap to see your transaction"})]})]}),Cl&&U!=="portfolio"&&U!=="send"&&U!=="token-detail"&&N("div",{className:"wi-sticky-footer",children:N("div",{className:"wi-footer",ref:Pt,children:Cl})})]}),Il={...L,...Ht>0?{"--wi-footer-height":`${Ht}px`}:null};return a?N(fe,{feature:"wallet_info",children:Q(ua.Portal,{children:[c&&N(ua.Overlay,{className:"wi-drawer-overlay"}),Q(ua.Content,{className:ve("wi-drawer-content",r),"data-theme":i,"data-vaul-no-drag":l==="left"||l==="right"?!0:void 0,style:Il,"data-direction":l,"data-no-balance":!p||void 0,"data-has-footer":Ht>0||void 0,"data-view":U,children:[N(ua.Title,{className:"wi-sr-only",children:"My Wallet"}),Tl]})]})}):Q(fe,{feature:"wallet_info",children:[c&&s&&N("div",{className:"wi-drawer-overlay",onClick:x}),N(fa.Portal,{children:N(fa.Content,{align:e,sideOffset:t,className:ve("wi-popover-content",r),"data-theme":i,style:Il,"data-no-balance":!p||void 0,"data-has-footer":Ht>0||void 0,"data-view":U,children:Tl})})]})}import*as Yp from"react";function Kp({position:e="top",children:t}){let{setNavContent:r,setNavPosition:n}=bn();return Yp.useEffect(()=>(r(t),n(e),()=>r(null)),[t,e,r,n]),null}import*as Zp from"react";function Xp({children:e}){let{setFooterContent:t}=bn();return Zp.useEffect(()=>(t(e),()=>t(null)),[e,t]),null}ae(`[data-theme=dark].wi-popover-content,[data-theme=dark].wi-drawer-content{--wi-primary: var(--ds-system-orange-default, #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-system-orange-default, #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)}
|
|
12
|
-
`);
|
|
13
|
-
`);
|
|
14
|
-
`);ae(`.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-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, #00d5aa);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-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-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-system-orange-default, #f0640d)}.wi-send-toast-spinner{width:18px;height:18px;border:2px solid rgba(255,159,33,.22);border-top-color:var(--ds-system-orange-on-inverted, #ff9f21);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-system-orange-on-inverted, #ff9f21)}.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}
|
|
15
|
-
`);
|
|
16
|
-
`);
|
|
17
|
-
`);import{jsx as Gs}from"react/jsx-runtime";function Vb({env:e,theme:t="dark",mobileBreakpoint:r=768,drawerDirection:n,modal:o,showBalance:i=!1,showForgeToken:a=!1,showGameToken:s=!0,showQR:l=!0,showBridge:c=!0,qrLogoSrc:p,walletAddress:b,accountName:h,sendAccounts:d,profileImageUrl:y,connectorId:m,connectorName:g,connectorIconUrl:u,preferredTokens:w=[],onSelectWallet:f,onCopyAddress:R,onBuy:x,onBuyDisabledMessage:S,onBridgeDisabledMessage:M,onSendDisabledMessage:C,onDisconnect:v,disconnectLabel:E="Disconnect",termsUrl:D=uo,termsLabel:B="Terms of Service",privacyUrl:I=Ei,privacyLabel:K="Privacy Policy",open:L,onOpenChange:P,showPortfolio:ne=!1,portfolioTitle:V="My Portfolio",portfolioSections:U,showTotalAssets:ce=!0,totalAssetsLabel:Z="Total Assets USD",sendTransaction:G,getTransactionReceipt:z,estimateGas:ee,onOutlink:J,lpBalanceReader:pe,stakingRewardsReader:se,bridgeTokens:te,bridgeHistory:be,getBridgeQuote:Le,getBridgeToTokens:ge,getBridgeApproval:De,approveBridge:le,submitBridge:_e,onReceive:Ke,onBridge:Se,onSend:Ue,style:Me,children:Ze}){let Nt=qe(e),st=m?Ti[m]:void 0,yt=g??st?.name,lt=u??st?.iconUrl,jt=ao(`(max-width: ${r}px)`),je=n??(i?"right":"bottom"),Dt=je==="left"||je==="right",mt=o??!1,ct=L!==void 0,[rt,xt]=zt.useState(!1),Pe=ct?L:rt,Xe=zt.useCallback(Pt=>{ct||xt(Pt),P?.(Pt)},[ct,P]),Je=zt.useCallback(()=>Xe(!1),[Xe]),[ot,$e]=zt.useState(null),[Tt,Wt]=zt.useState("top"),[Be,it]=zt.useState(null),[et,_t]=zt.useState("wallet"),[F,ie]=zt.useState(null),[Fe,gt]=zt.useState(null);zt.useEffect(()=>{Pe||(_t("wallet"),ie(null),gt(null))},[Pe]),zt.useEffect(()=>{io(b)},[b]);let ht=zt.useCallback(()=>{ds(b),v?.()},[v,b]),Gt=zt.useMemo(()=>({env:Nt,theme:t,isMobile:jt,open:Pe,drawerDirection:je,modal:mt,showBalance:i,showForgeToken:a,showGameToken:s,showQR:l,showBridge:c,qrLogoSrc:p,walletAddress:b,accountName:h,sendAccounts:d,profileImageUrl:y,connectorName:yt,connectorIconUrl:lt,preferredTokens:w,close:Je,onSelectWallet:f,onCopyAddress:R,onBuy:x,onBuyDisabledMessage:S,onBridgeDisabledMessage:M,onSendDisabledMessage:C,onDisconnect:v?ht:void 0,disconnectLabel:E,termsUrl:D,termsLabel:B,privacyUrl:I,privacyLabel:K,portalStyle:Me,navContent:ot,navPosition:Tt,setNavContent:$e,setNavPosition:Wt,footerContent:Be,setFooterContent:it,view:et,setView:_t,selectedSendToken:F,setSelectedSendToken:ie,selectedDetailToken:Fe,setSelectedDetailToken:gt,showPortfolio:ne,portfolioTitle:V,portfolioSections:U,showTotalAssets:ce,totalAssetsLabel:Z,sendTransaction:G,getTransactionReceipt:z,estimateGas:ee,onOutlink:J,lpBalanceReader:pe,stakingRewardsReader:se,bridgeTokens:te,bridgeHistory:be,getBridgeQuote:Le,getBridgeToTokens:ge,getBridgeApproval:De,approveBridge:le,submitBridge:_e,onReceive:Ke,onBridge:Se,onSend:Ue}),[Nt,t,jt,Pe,je,mt,i,a,s,l,c,p,b,h,d,y,yt,lt,w,Je,f,R,x,S,M,C,v,ht,E,D,B,I,K,Me,ot,Tt,Be,et,F,Fe,ne,V,U,ce,Z,G,z,ee,J,pe,se,te,be,Le,ge,De,le,_e,Ke,Se,Ue]);return Gs(is.Provider,{value:Gt,children:jt?Gs(Qb.Root,{direction:je,open:Pe,onOpenChange:Xe,handleOnly:Dt,noBodyStyles:!0,repositionInputs:!1,children:Ze},"drawer"):Gs(Jp.Root,{open:Pe,onOpenChange:Xe,children:Ze},"popover")})}var ko=Object.assign(Vb,{Trigger:Yc,Content:qp,Nav:Kp,Footer:Xp});import*as tn from"react";import*as gu from"@radix-ui/react-dialog";import{Drawer as ow}from"vaul";import{createContext as qb,useContext as Yb}from"react";var ma=qb(null);function $o(){let e=Yb(ma);if(!e)throw new Error("WalletConnectModal compound components must be used within <WalletConnectModal>");return e}import{useState as $p,useEffect as Kb,useCallback as Zb}from"react";function ga(){let[e,t]=$p([]),[r,n]=$p(!0);Kb(()=>{if(typeof window>"u"){n(!1);return}let i=[],a=l=>{let{info:c}=l.detail;c?.rdns&&!i.some(p=>p.rdns===c.rdns)&&(i.push({rdns:c.rdns,name:c.name,icon:c.icon}),t([...i]))};window.addEventListener("eip6963:announceProvider",a),window.addEventListener("eip6963:crossAnnounceProvider",a),window.dispatchEvent(new Event("eip6963:requestProvider")),window.dispatchEvent(new Event("eip6963:crossRequestProvider"));let s=setTimeout(()=>n(!1),500);return()=>{window.removeEventListener("eip6963:announceProvider",a),window.removeEventListener("eip6963:crossAnnounceProvider",a),clearTimeout(s)}},[]);let o=Zb(i=>e.some(a=>a.rdns===i),[e]);return{wallets:e,isDetected:o,isLoading:r}}import*as eu from"@radix-ui/react-dialog";import{Drawer as Xb}from"vaul";import{jsx as Hs}from"react/jsx-runtime";function tu({asChild:e,children:t}){let{isMobile:r}=$o(),n=r?Xb.Trigger:eu.Trigger;return Hs(fe,{feature:"wallet_connect",children:Hs(n,{asChild:e??t!=null,children:t??Hs("button",{type:"button","data-track":"open",children:"Connect Wallet"})})})}import{useEffect as ew}from"react";import{WALLET_LABELS as tw}from"@nexus-cross/crossx-design-system";import*as en from"@radix-ui/react-dialog";import{Drawer as ba}from"vaul";import{WALLET_LABELS as Qs}from"@nexus-cross/crossx-design-system";import{jsx as Re,jsxs as Kn}from"react/jsx-runtime";var Jb='<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>',$b=`data:image/svg+xml,${encodeURIComponent(Jb)}`;function ha(){return Re("img",{src:$b,width:40,height:40,alt:"",style:{display:"block"}})}function ru(){return Kn("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[Kn("g",{clipPath:"url(#clip0_1331_27065)",children:[Re("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"}),Re("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"}),Re("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"}),Re("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"}),Re("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"}),Re("path",{d:"M22.1857 36.1951V39.831H17.6699V36.1951H22.1857Z",fill:"#C0C4CD"}),Re("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"})]}),Re("defs",{children:Re("clipPath",{id:"clip0_1331_27065",children:Re("rect",{width:"40",height:"40",fill:"white"})})})]})}function nu(){return Kn("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Re("path",{d:"M12.23 16.81L20 9.04L27.77 16.81L32.29 12.29L20 0L7.71 12.29L12.23 16.81Z",fill:"#F3BA2F"}),Re("path",{d:"M9.04 20L4.52 15.48L0 20L4.52 24.52L9.04 20Z",fill:"#F3BA2F"}),Re("path",{d:"M12.23 23.19L20 30.96L27.77 23.19L32.29 27.71L20 40L7.71 27.71L12.23 23.19Z",fill:"#F3BA2F"}),Re("path",{d:"M35.48 24.52L40 20L35.48 15.48L30.96 20L35.48 24.52Z",fill:"#F3BA2F"}),Re("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 ou(){return Kn("svg",{xmlns:"http://www.w3.org/2000/svg",width:"247",height:"246",viewBox:"0 0 247 246",fill:"none",children:[Re("rect",{width:"247.005",height:"245.105",rx:"36",fill:"#121212"}),Re("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"}),Re("path",{d:"M59.8364 99.8915V59.7551H12.0414L30.4787 77.8377V99.8915H59.8364Z",fill:"#2FD7FF"}),Re("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 iu(){return Kn("svg",{width:"40",height:"40",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Kn("g",{clipPath:"url(#clip0_1185_7785)",children:[Re("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"}),Re("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"})]}),Re("defs",{children:Re("clipPath",{id:"clip0_1185_7785",children:Re("rect",{width:"28",height:"28",fill:"white"})})})]})}function au(){return Kn("svg",{width:"40",height:"40",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",children:[Re("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"}),Re("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"}),Re("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"}),Re("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 su(){return Re("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:Re("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 lu(){return Re("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Re("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}var Vs={cross_embedded:{id:"cross_embedded",name:Qs.social,description:"Sign in with Google or Apple",icon:ha},cross_wallet:{id:"cross_wallet",name:Qs.app,description:"App approval is required",icon:ha,featured:!0},cross_extension:{id:"cross_extension",name:Qs.extension,description:"Browser extension approval is required",icon:ha,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:ru,rdns:"io.metamask"},binance:{id:"binance",name:"Binance",description:"Mobile app only \u2014 Add CROSS network first",icon:nu},verse8:{id:"verse8",name:"Verse8 Wallet",description:"Optimized for Forge and Verse8 ecosystem",icon:ou,badge:"For Forge"},tron:{id:"tron",name:"Tron Wallet",description:"Dedicated for Tron-based transactions and assets",icon:iu,badge:"For SHOP"}};function qs(e){return Vs[e]}var Ys={google:{id:"google",name:"Google",icon:au},apple:{id:"apple",name:"Apple",icon:su}};function cu(e){return Ys[e]}import{Fragment as fu,jsx as me,jsxs as Zt}from"react/jsx-runtime";function du(e,t){Te("connect","wallet_selected",{tags:{item_id:e}});let r=t?.();r instanceof Promise&&r.then(()=>Te("connect","connected"),n=>Te("connect","connected",{status:"failure",reason:ur(n)}))}function rw({wallet:e,detected:t,onConnect:r}){let n=()=>{if(e.installUrl&&!t){window.open(e.installUrl,"_blank","noopener,noreferrer");return}r()},o=e.icon,i=e.featured===!0;return Zt("button",{type:"button",className:ve("wcm-wallet-item",i&&"wcm-wallet-item--featured"),"data-track":"wallet_item_click","data-track-id":e.id,onClick:n,children:[Zt("div",{className:"wcm-wallet-item-left",children:[me("div",{className:"wcm-wallet-icon",children:me(o,{})}),Zt("div",{className:"wcm-wallet-name-row",children:[me("span",{className:"wcm-wallet-name",children:e.name}),e.badge&&me("span",{className:"wcm-wallet-badge",children:e.badge})]})]}),e.installUrl&&(t?me("span",{className:"wcm-installed-label",children:"Installed"}):me("span",{className:"wcm-install-btn",children:"Install"}))]})}function nw({social:e,onSignIn:t}){let r=e.icon,n=`Sign in with ${e.name}`;return Zt("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":n,children:[me("span",{className:"wcm-social-icon",children:me(r,{})}),me("span",{className:"wcm-social-name",children:n})]})}function pu(){let{wallets:e,activeWalletIds:t,socialProviders:r,activeSocialIds:n,termsUrl:o,privacyUrl:i,isDetected:a,close:s,isMobile:l}=$o(),c=t.filter(h=>{let d=qs(h).visibility;return!d||d==="always"?!0:d==="desktop-only"?!l:d==="mobile-only"?l:!0}),p=n.length>0,b=c.length>0;return Zt(fu,{children:[Zt("div",{className:"wcm-header",children:[Zt("div",{className:"wcm-header-text",children:[me("h2",{className:"wcm-title",children:tw.default}),!l&&me("p",{className:"wcm-subtitle",children:"Sign in instantly with your social account"})]}),me("button",{type:"button",className:"wcm-close-btn","data-track":"close",onClick:s,"aria-label":"Close",children:me(lu,{})})]}),Zt("div",{className:"wcm-body",children:[p&&Zt(fu,{children:[!l&&Zt("div",{className:"wcm-section-header",children:[me("span",{className:"wcm-section-title",children:"Social Account Wallet Connect"}),me("span",{className:"wcm-recommended-badge",children:"Recommended"})]}),me("div",{className:"wcm-social-grid",children:n.map(h=>{let d=cu(h);return me(nw,{social:d,onSignIn:()=>{du(h,r[h]),s()}},h)})}),b&&Zt("div",{className:"wcm-separator",children:[me("div",{className:"wcm-separator-line"}),me("span",{className:"wcm-separator-text",children:"Other Wallets"}),me("div",{className:"wcm-separator-line"})]})]}),b&&me("div",{className:"wcm-wallet-list",children:c.map(h=>{let d=qs(h),y=d.rdns?a(d.rdns):!1;return me(rw,{wallet:d,detected:y,onConnect:()=>{du(h,e[h]),s()}},h)})}),Zt("p",{className:"wcm-terms",children:["By continuing, you agree to NEXUS"," ",me(uu,{href:o,track:"terms_link",children:"Terms of Service"})," ","and consent to its"," ",me(uu,{href:i,track:"privacy_link",children:"Privacy Policy"}),"."]})]})]})}function uu({href:e,track:t,children:r}){return e?me("a",{className:"wcm-terms-link",href:e,target:"_blank",rel:"noopener noreferrer","data-track":t,children:r}):me("span",{className:"wcm-terms-link",children:r})}function mu({className:e}){let{isMobile:t,theme:r,portalStyle:n,open:o}=$o();return ew(()=>{o&&Te("connect","opened")},[o]),t?me(fe,{feature:"wallet_connect",children:Zt(ba.Portal,{children:[me(ba.Overlay,{className:"wcm-overlay"}),Zt(ba.Content,{className:ve("wcm-drawer-content",e),"data-theme":r,style:n,children:[me(ba.Title,{className:"wcm-sr-only",children:"Connect Wallet"}),me("div",{className:"wcm-drawer-handle"}),me("div",{className:"wcm-drawer-body",children:me(pu,{})})]})]})}):me(fe,{feature:"wallet_connect",children:Zt(en.Portal,{children:[me(en.Overlay,{className:"wcm-overlay"}),Zt(en.Content,{className:ve("wcm-dialog-content",e),"data-theme":r,style:n,children:[me(en.Title,{className:"wcm-sr-only",children:"Connect Wallet"}),me(en.Description,{className:"wcm-sr-only",children:"Sign in with a social provider or pick a wallet to connect."}),me("div",{className:"wcm-dialog-body",children:me(pu,{})})]})]})})}ae(`.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-system-orange-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-system-orange-high, #e56f00);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}
|
|
18
|
-
`);ae(`@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)}}
|
|
19
|
-
`);import{jsx as ei}from"react/jsx-runtime";var iw={};function aw({wallets:e,socialProviders:t=iw,termsUrl:r,privacyUrl:n,theme:o="dark",mobileBreakpoint:i=768,drawerDirection:a="bottom",dialogWidth:s,drawerMaxWidth:l,drawerMinWidth:c,style:p,open:b,onOpenChange:h,children:d}){let y=ao(`(max-width: ${i}px)`),[m,g]=tn.useState(!1),u=b!==void 0,w=u?b:m,f=tn.useCallback(D=>{u||g(D),h?.(D)},[u,h]),R=tn.useCallback(()=>f(!1),[f]),{isDetected:x}=ga(),S=tn.useMemo(()=>Object.keys(e),[e]),M=tn.useMemo(()=>Object.keys(t),[t]),C=tn.useMemo(()=>{let D={};return s&&(D["--wcm-dialog-width"]=s),l&&(D["--wcm-drawer-max-width"]=l),c&&(D["--wcm-drawer-min-width"]=c),{...D,...p}},[s,l,c,p]),v=tn.useMemo(()=>({theme:o,isMobile:y,open:w,setOpen:f,close:R,wallets:e,activeWalletIds:S,socialProviders:t,activeSocialIds:M,termsUrl:r??uo,privacyUrl:n??Ei,isDetected:x,portalStyle:C}),[o,y,w,f,R,e,S,t,M,r,n,x,C]),E=ei("div",{"data-theme":o,style:C,children:d});return y?ei(ma.Provider,{value:v,children:ei(ow.Root,{direction:a,open:w,onOpenChange:f,noBodyStyles:!0,children:E},"drawer")}):ei(ma.Provider,{value:v,children:ei(gu.Root,{open:w,onOpenChange:f,children:E})})}var hu=Object.assign(aw,{Trigger:tu,Content:mu});import{WALLET_LABELS as uw}from"@nexus-cross/crossx-design-system";import*as wu from"react";ae(`.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}
|
|
20
|
-
`);ae(`.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)}}
|
|
21
|
-
`);var sw='<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>',lw='<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>',cw='<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>',dw='<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>',pw='<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 ti(e){return`data:image/svg+xml,${encodeURIComponent(e)}`}var wa=ti(sw),ya=ti(lw),xa=ti(cw),va=ti(dw),ka=ti(pw);import{jsx as lr,jsxs as ri}from"react/jsx-runtime";function yu({isConnecting:e,address:t,provider:r,providerName:n,accountName:o,sendAccounts:i,onConnect:a,onDisconnect:s,onCopy:l,onSelectWallet:c,onBuy:p,onBuyDisabledMessage:b,label:h="Connect Wallet",connectingLabel:d="Connecting...",disconnectLabel:y,className:m,theme:g="dark",env:u,showBalance:w=!0,showPortfolio:f,drawerDirection:R,modal:x,connectorId:S,style:M,walletInfoStyle:C,sendTransaction:v,getTransactionReceipt:E,estimateGas:D,onReceive:B,onBridge:I,onSend:K,bridgeTokens:L,bridgeHistory:P,getBridgeQuote:ne,getBridgeToTokens:V,getBridgeApproval:U,approveBridge:ce,submitBridge:Z}){let G=m?`cb-button ${m}`:"cb-button",z=m?`cb-pill ${m}`:"cb-pill";if(wu.useEffect(()=>{io(t)},[t]),e)return ri("button",{type:"button",disabled:!0,className:G,style:M,"aria-busy":"true",children:[lr("span",{className:"cb-spinner","aria-hidden":"true"}),lr("span",{className:"cb-button-label",children:d})]});if(t){let ee=n??hw(r),J=r?mw[r]:void 0;return lr(fe,{feature:"connect_button",children:ri(ko,{env:u,theme:g,drawerDirection:R,modal:x,showBalance:w,showPortfolio:f,walletAddress:t,accountName:o,sendAccounts:i,connectorId:S,onSelectWallet:c,onCopyAddress:l?(pe,se)=>{se&&l()}:void 0,onDisconnect:s,disconnectLabel:y,style:C,sendTransaction:v,getTransactionReceipt:E,estimateGas:D,onReceive:B,onBridge:I,onBuy:p,onBuyDisabledMessage:b,onSend:K,bridgeTokens:L,bridgeHistory:P,getBridgeQuote:ne,getBridgeToTokens:V,getBridgeApproval:U,approveBridge:ce,submitBridge:Z,children:[lr(ko.Trigger,{asChild:!0,children:ri("button",{type:"button",className:z,"data-track":"wallet_pill_open",style:M,"aria-label":`Connected with ${ee}: ${bu(t)}`,children:[J?lr("img",{src:J,alt:"",width:18,height:18,className:"cb-pill-icon","data-provider":r}):lr("span",{className:"cb-pill-icon-placeholder","aria-hidden":"true"}),lr("span",{className:"cb-pill-address",children:bu(t)})]})}),lr(ko.Content,{align:"end",sideOffset:8})]})})}return lr(fe,{feature:"connect_button",children:ri("button",{type:"button",onClick:a,className:G,"data-track":"connect_click",style:M,"aria-label":typeof h=="string"?h:"Connect Wallet",children:[lr(fw,{}),lr("span",{className:"cb-button-label",children:h})]})})}function fw(){return ri("svg",{className:"cb-button-icon",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[lr("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"}),lr("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"}),lr("path",{d:"M12.75 11.25H12.7575",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}var mw={google:va,apple:ka,cross:wa,metamask:ya,binance:xa},gw={google:"Google",apple:"Apple",cross:uw.default,metamask:"MetaMask",binance:"Binance Wallet"};function hw(e){return e?gw[e]:"Wallet"}function bu(e){return e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`}import*as xu from"react";ae(`.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)}
|
|
22
|
-
`);
|
|
23
|
-
`);import{jsx as Ro,jsxs as ww}from"react/jsx-runtime";var vu="https://www.onechain.nexus/skills";function ku({label:e="Skills",href:t,onClick:r,className:n,style:o,theme:i,disabled:a=!1,isLoading:s=!1,loadingLabel:l="Loading...",openInNewTab:c=!1,type:p="button"}){let[b,h]=xu.useState(!1),d=qe(),y=Ur("apps.json",d,x=>zr(x?.skills,d)),m=t??y,g=async x=>{if(m&&!r){c?window.open(m,"_blank","noopener,noreferrer"):window.location.href=m;return}if(r)try{h(!0),await r()}finally{h(!1)}},u=a||s||b,w=s||b,f=w?l:e,R=n?`sb-button ${n}`:"sb-button";return Ro(fe,{feature:"skills",children:ww("button",{type:p,onClick:g,disabled:u,className:R,"data-theme":i,"data-track":"click",style:o,"aria-busy":w,children:[w?Ro("span",{className:"sb-spinner","aria-hidden":"true"}):Ro(bw,{}),Ro("span",{className:"sb-label",children:f})]})})}function bw(){return Ro("svg",{className:"sb-button-icon",viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:Ro("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"})})}import*as Oa from"react";import{createContext as yw,useContext as xw}from"react";var Ks=yw(null);function ni(){let e=xw(Ks);if(!e)throw new Error("RelayDeposit compound components must be used within <RelayDeposit>");return e}import*as $u from"react";import{createContext as vw,useContext as kw}from"react";var Ra=vw(null);function Qr(){let e=kw(Ra);if(!e)throw new Error("ResponsiveShell compound components must be used within <ResponsiveShell>");return e}import{createContext as Rw,useContext as Sw,useLayoutEffect as Cw,useState as Nw}from"react";function Ru(){let e=null,t=new Set;return{getSnapshot:()=>e,publish(r){if(r!==e){e=r;for(let n of[...t])n()}},subscribe(r){return t.add(r),()=>{t.delete(r)}}}}var Zs=Rw(null);function Tw(){let e=Sw(Zs);if(!e)throw new Error("RelayDeposit compound components must be used within <RelayDeposit>");return e}function Su(){let e=Tw(),[t,r]=Nw(e.getSnapshot);return Cw(()=>(r(e.getSnapshot()),e.subscribe(()=>r(e.getSnapshot()))),[e]),t}ae(`.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-system-orange-default, #5b5bf6);--rd-accent-contrast: var(--ds-system-orange-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-system-orange-default, #8181ff);--rd-accent-contrast: var(--ds-system-orange-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-system-orange-default, #5b5bf6);--rd-accent-contrast: var(--ds-system-orange-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{flex:none;color:var(--rd-text-muted);font-size:.7rem;line-height:1}.rd-dropdown-listbox{position:absolute;z-index:20;top:calc(100% + .3rem);left:0;right:0;margin:0;padding:.3rem;list-style:none;max-height:15rem;overflow-y:auto;background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:10px;box-shadow:var(--rd-shadow)}.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}.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}.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{font-size:28px;font-weight:800;line-height:1.15;font-variant-numeric:tabular-nums;color:var(--rd-text)}.rd-recover-sum-unit{margin-left:1px;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-foot{text-align:center;font-size:11.5px;line-height:1.45;color:var(--rd-text-muted)}.rd-history-table{display:flex;flex-direction:column;gap:.6rem;font-size:.875rem}.rd-history-group{background:var(--rd-surface-alt);border:1px solid var(--rd-border);border-radius:12px;overflow:hidden}.rd-history-row-button{width:100%;display:flex;flex-direction:column;gap:.55rem;padding:.8rem .9rem;background:none;border:none;color:inherit;font:inherit;text-align:left;cursor:pointer}.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-asset{font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rd-history-card-amounts{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.rd-history-amount-block{display:flex;flex-direction:column;gap:.15rem;min-width:0}.rd-history-amount-label{color:var(--rd-text-muted);font-size:.68rem;font-weight:650;line-height:1.2}.rd-history-num{font-variant-numeric:tabular-nums;font-size:.875rem;font-weight:700;white-space:nowrap}.rd-history-card-arrow{color:var(--rd-text-muted);font-size:.85rem;flex:none}.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{color:var(--rd-text-muted);text-align:center}.rd-history-detail{display:flex;flex-direction:column;gap:.375rem;padding:.65rem .9rem .8rem;border-top:1px solid var(--rd-border)}.rd-history-step{display:grid;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;padding:1rem 1.25rem 1.25rem;max-width:none;gap:.85rem}.rd-stack{display:flex;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{width:172px;min-height:172px;margin:0 auto;padding:14px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.4rem;text-align:center;background:var(--rd-surface-alt);border:1px dashed var(--rd-border);border-radius:16px}.rd-locked-glyph{color:var(--rd-text-muted);line-height:0}.rd-locked-text{font-size:12px;line-height:1.5;color:var(--rd-text-muted)}.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)}
|
|
24
|
-
`);import{jsx as In,jsxs as Vr}from"react/jsx-runtime";function Cu({minNotice:e,arrivalStatus:t}){let r=t.amount&&t.symbol?`${t.amount} ${t.symbol} arrived`:t.amount?`${t.amount} arrived`:void 0,n=(()=>{switch(t.phase){case"detected":if(e.remaining!==void 0){let o=`${e.remaining} ${e.symbol}`;return r?`${r} at the processing address. Waiting for ${o} more to reach the minimum.`:`Deposit detected. Waiting for ${o} more to reach the minimum.`}return r?`${r} 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}})();return n?Vr("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:[In("span",{className:"rd-checklist-status-dot","aria-hidden":"true"}),In("span",{children:n})]},`live:${t.phase}:${n}`):e.remaining!==void 0?Vr("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:[In("span",{className:"rd-checklist-status-dot","aria-hidden":"true"}),Vr("span",{children:["Waiting for"," ",Vr("b",{children:[e.remaining," ",e.symbol]})," ","more to arrive at the processing address."]})]},`pending:${e.remaining}:${e.symbol}`):null}function Nu({minNotice:e,onlySend:t,showWalletCreditNote:r=!1}){return Vr("div",{className:"rd-checklist","data-rd-checklist":"",children:[Vr("div",{className:"rd-checklist-row","data-rd-checklist-only":"",children:[In("span",{className:"rd-checklist-mark rd-checklist-mark-warn","aria-hidden":"true",children:"!"}),Vr("span",{children:[Vr("b",{children:[t.chainName," ",t.symbol," only"]})," \xB7 ",Vr("b",{className:"rd-checklist-accent",children:[e.min," ",e.symbol," minimum"]})]})]}),Vr("div",{className:"rd-checklist-row",children:[In("span",{className:"rd-checklist-mark","aria-hidden":"true",children:"\u21BB"}),In("span",{children:"Reusable \u2014 deposit as many times as you like"})]}),r&&Vr("div",{className:"rd-checklist-row rd-checklist-credit","data-rd-checklist-credit":"",children:[In("span",{className:"rd-checklist-mark","aria-hidden":"true",children:"\u2192"}),In("span",{children:"Credited to your ONEchain wallet"})]})]})}import{useEffect as jw,useId as Ww,useState as Mu}from"react";var oi="0x0000000000000000000000000000000000000000",Iw=/^0x[0-9a-fA-F]{40}$/;function He(e){return Iw.test(e)}function At(e,t){let r=e<0n,o=(r?-e:e).toString().padStart(t+1,"0"),i=t===0?o:o.slice(0,-t),a=t===0?"":o.slice(-t).replace(/0+$/,""),s=a?`${i}.${a}`:i;return r?`-${s}`:s}function Sa(e,t){let r=e.match(/^(-?)(\d+)(?:\.(\d+))?$/);if(!r)throw new Error(`parseUnits: invalid decimal string "${e}"`);let[,n,o,i=""]=r;if(i.length>t)throw new Error(`parseUnits: too many decimal places for ${t} decimals`);let a=BigInt(o+i.padEnd(t,"0"));return n==="-"?-a:a}import{useId as Mn}from"react";var Mw="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTQwIDU0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzc0MDAwXzM4NTkwKSI+CjxtYXNrIGlkPSJtYXNrMF83NDAwMF8zODU5MCIgc3R5bGU9Im1hc2stdHlwZTpsdW1pbmFuY2UiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiIHg9IjAiIHk9IjAiIHdpZHRoPSI1NDAiIGhlaWdodD0iNTQwIj4KPHBhdGggZD0iTTI3MCAwQzU2Ljg1NjMgMCAwIDU2Ljg1NjMgMCAyNzBDMCA0ODMuMTQ0IDU2Ljg1NjMgNTQwIDI3MCA1NDBDNDgzLjE0NCA1NDAgNTQwIDQ4My4xNDQgNTQwIDI3MEM1NDAgNTYuODU2MyA0ODMuMTQ0IDAgMjcwIDBaIiBmaWxsPSJ3aGl0ZSIvPgo8L21hc2s+CjxnIG1hc2s9InVybCgjbWFzazBfNzQwMDBfMzg1OTApIj4KPHBhdGggZD0iTTUzOS43MzEgMC4yNzA1MDhIMFY1NDAuMDAxSDUzOS43MzFWMC4yNzA1MDhaIiBmaWxsPSJ1cmwoI3B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1pTFHQsXU72hp+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 Tu(e){switch(e.toUpperCase()){case"ONEUSD":return Mw;case"PONEUSD":return Ew;case"USDT":return Aw;case"USDC":return Lw;default:return}}import{jsx as Y,jsxs as Ut}from"react/jsx-runtime";function Iu(e){let t=e.trim();return t?t.slice(0,2).toUpperCase():"?"}function Dw({size:e,bg:t,fg:r="#ffffff",children:n}){return Ut("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",style:{display:"block",flex:"none",borderRadius:"50%"},children:[Y("circle",{cx:"12",cy:"12",r:"12",fill:t}),Y("g",{fill:r,stroke:r,children:n})]})}function Xs({size:e,bg:t,fg:r="#ffffff",text:n}){return Y(Dw,{size:e,bg:t,fg:r,children:Y("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",fontSize:"10",fontWeight:700,fontFamily:"inherit",stroke:"none",fill:r,children:n})})}function So({size:e,viewBox:t="0 0 24 24",children:r}){return Y("svg",{width:e,height:e,viewBox:t,"aria-hidden":"true",focusable:"false",style:{display:"block",flex:"none",borderRadius:"50%"},children:r})}function Pw({size:e}){let t=Mn();return Ut(So,{size:e,children:[Ut("g",{clipPath:`url(#${t})`,children:[Y("path",{fill:"#000",d:"M24 0H0v24h24z"}),Y("path",{fill:"#8FFCF3",d:"M12 4v5.912l5 2.237z"}),Y("path",{fill:"#CABCF8",d:"m12 4-5 8.148 5-2.235z"}),Y("path",{fill:"#CBA7F5",d:"M12 15.98V20l5-6.92z"}),Y("path",{fill:"#74A0F3",d:"M12 20v-4.02l-5-2.9z"}),Y("path",{fill:"#CBA7F5",d:"m12 15.049 5-2.9-5-2.236z"}),Y("path",{fill:"#74A0F3",d:"m7 12.149 5 2.9V9.913z"}),Y("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"}),Y("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"})]}),Y("defs",{children:Y("clipPath",{id:t,children:Y("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function Bw({size:e}){let t=Mn();return Ut(So,{size:e,children:[Ut("g",{clipPath:`url(#${t})`,children:[Y("path",{fill:"#F0B90B",d:"M24 0H0v24h24z"}),Y("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"})]}),Y("defs",{children:Y("clipPath",{id:t,children:Y("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function Fw({size:e}){let t=Mn();return Ut(So,{size:e,viewBox:"0 0 111 111",children:[Ut("g",{clipPath:`url(#${t})`,children:[Y("path",{fill:"#fff",d:"M0 0h111v111H0z"}),Y("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"})]}),Y("defs",{children:Y("clipPath",{id:t,children:Y("path",{fill:"#fff",d:"M0 0h111v111H0z"})})})]})}function Ow({size:e}){let t=Mn();return Ut(So,{size:e,children:[Ut("g",{clipPath:`url(#${t})`,children:[Y("path",{fill:"#213147",d:"M24 0H0v24h24z"}),Y("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"}),Y("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"}),Y("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"}),Y("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"})]}),Y("defs",{children:Y("clipPath",{id:t,children:Y("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function zw({size:e}){let t=Mn(),r=Mn();return Ut(So,{size:e,children:[Ut("g",{clipPath:`url(#${t})`,children:[Y("path",{fill:`url(#${r})`,d:"M24 0H0v24h24z"}),Y("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"})]}),Ut("defs",{children:[Ut("linearGradient",{id:r,x1:"3.948",x2:"19.217",y1:"16.617",y2:"7.645",gradientUnits:"userSpaceOnUse",children:[Y("stop",{stopColor:"#A726C1"}),Y("stop",{offset:".88",stopColor:"#803BDF"}),Y("stop",{offset:"1",stopColor:"#7B3FE4"})]}),Y("clipPath",{id:t,children:Y("path",{fill:"#fff",d:"M0 0h24v24H0z"})})]})]})}function Uw({size:e}){let t=Mn(),r=Mn();return Ut(So,{size:e,children:[Ut("g",{clipPath:`url(#${t})`,children:[Y("path",{fill:`url(#${r})`,d:"M24 0H0v24h24z"}),Y("path",{fill:"#fff",d:"M17.7 8.358a.55.55 0 0 1-.365.145H4.515c-.455 0-.684-.52-.37-.825l2.106-2.03a.54.54 0 0 1 .364-.15h12.87c.46 0 .685.524.365.83zm0 10.005c-.1.09-.23.14-.365.14H4.515c-.455 0-.684-.516-.37-.82l2.106-2.036a.53.53 0 0 1 .364-.145h12.87c.46 0 .685.52.365.825zm0-7.72a.55.55 0 0 0-.365-.14H4.515c-.455 0-.684.515-.37.82l2.106 2.035c.1.091.23.143.364.144h12.87c.46 0 .685-.52.365-.824z"})]}),Ut("defs",{children:[Ut("linearGradient",{id:r,x1:"4.001",x2:"20.408",y1:"50.258",y2:"50.108",gradientUnits:"userSpaceOnUse",children:[Y("stop",{stopColor:"#599DB0"}),Y("stop",{offset:"1",stopColor:"#47F8C3"})]}),Y("clipPath",{id:t,children:Y("path",{fill:"#fff",d:"M0 0h24v24H0z"})})]})]})}function Ca({chainId:e,chainName:t,size:r=20}){switch(e){case 1:return Y(Pw,{size:r});case 56:return Y(Bw,{size:r});case 8453:return Y(Fw,{size:r});case 42161:return Y(Ow,{size:r});case 137:return Y(zw,{size:r});case 792703809:return Y(Uw,{size:r});case 612055:return Y(Xs,{size:r,bg:"#0b1f3a",text:"CR"});default:return Y(Xs,{size:r,bg:"#676b7a",text:Iu(t??String(e))})}}function Zn({symbol:e,logoUrl:t,size:r=20}){let n=t&&t.trim().length>0?t.trim():Tu(e);return n?Y("img",{src:n,alt:"","aria-hidden":"true",width:r,height:r,style:{display:"block",flex:"none",borderRadius:"50%",objectFit:"cover"}}):Y(Xs,{size:r,bg:"#676b7a",text:Iu(e)})}import{QRCodeSVG as _w}from"qrcode.react";import{Fragment as Na,jsx as Ye,jsxs as St}from"react/jsx-runtime";function Ta(){return St("div",{className:"rd-deposit-head","data-testid":"rd-address-skeleton","aria-hidden":"true",children:[Ye("span",{className:"rd-skeleton rd-skeleton-qr"}),Ye("span",{className:"rd-skeleton rd-skeleton-address"})]})}function Gw(e){let{depositAddress:t,originChainId:r,originCurrency:n,amountWei:o,isNative:i}=e;if(i)return o!==void 0?`ethereum:${t}@${r}?value=${o.toString()}`:`ethereum:${t}@${r}`;let a=new URLSearchParams({address:t});return o!==void 0&&a.set("uint256",o.toString()),`ethereum:${n}@${r}/transfer?${a.toString()}`}function Hw(e){let{depositAddress:t,splMint:r,humanAmount:n}=e,o=new URLSearchParams;return n&&o.set("amount",n),o.set("spl-token",r),`solana:${t}?${o.toString()}`}function Eu({depositAddress:e,originChainId:t,originChainName:r,originCurrency:n,amount:o,tokenSymbol:i,tokenDecimals:a,kind:s="evm",depositState:l,onDeposit:c,canDeposit:p,oneClickEnabled:b=!0}){let[h,d]=Mu(!1),[y,m]=Mu("address"),g=Ww();jw(()=>{m("address")},[e]);let u=n.toLowerCase()===oi,w=s==="svm";async function f(){try{await navigator.clipboard.writeText(e),d(!0),setTimeout(()=>d(!1),1500)}catch{}}let R;if(o)try{let L=BigInt(o);L>0n&&(R=L)}catch{}let x=R!==void 0,S;if(x)try{S=At(R,a)}catch{S=o}let M=w?Hw({depositAddress:e,splMint:n,humanAmount:S??""}):Gw({depositAddress:e,originChainId:t,originCurrency:n,amountWei:R,isNative:u}),{isSubmitting:C,isConfirming:v,isConfirmed:E,needsSwitch:D,txHash:B,reverted:I,error:K}=l;return St("section",{className:"rd-stack",children:[St("div",{className:"rd-deposit-head","data-compact-view":y,children:[St("div",{className:"rd-deposit-qr-pane",children:[St("div",{className:"rd-deposit-qr",children:[Ye(_w,{value:M,size:144,level:"H"}),Ye("span",{className:"rd-deposit-qr-badge","aria-hidden":"true",children:Ye(Ca,{chainId:t,chainName:r,size:28})})]}),Ye("button",{type:"button",className:"rd-mobile-address-toggle","aria-label":"Show address and copy",onClick:()=>m("address"),children:St("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[Ye("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2.25",stroke:"currentColor",strokeWidth:"1.8"}),Ye("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"})]})})]}),St("div",{className:"rd-deposit-address",children:[Ye("span",{className:"rd-deposit-address-label",children:St("button",{type:"button",className:"rd-address-term","aria-describedby":g,children:["Deposit address",Ye("span",{id:g,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."})]})}),Ye("button",{type:"button",className:"rd-mobile-qr-toggle","aria-label":"Show deposit QR code","aria-pressed":y==="qr",onClick:()=>m("qr"),children:Ye("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:Ye("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"})})}),Ye("span",{className:"rd-address-full",title:e,children:e}),St("button",{type:"button",className:"rd-address-copy",onClick:f,"aria-label":`Copy deposit address ${e}`,children:[h?Ye("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:Ye("path",{d:"m5 12 4 4L19 6",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}):St("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[Ye("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.8"}),Ye("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"})]}),Ye("span",{"aria-live":"polite",children:h?"Copied":"Copy address"})]})]})]}),!w&&p&&St(Na,{children:[Ye("button",{type:"button",className:"rd-button-primary rd-button-block",onClick:c,disabled:C||v||E&&!I,children:E&&!I?"Deposit sent":v?"Confirming...":C?D?"Switching network...":"Confirm in wallet...":`One-click deposit ${i}${D?` (switch to ${r})`:""}`}),K&&Ye("div",{className:"rd-callout rd-callout-danger",children:K}),B&&St("p",{className:"rd-card-hint",children:["Tx: ",Ye("span",{style:{fontFamily:"monospace"},children:B})]}),E&&I&&Ye("div",{className:"rd-callout rd-callout-danger",children:"The deposit transaction reverted on-chain. Please check your wallet and try again."}),E&&!I&&Ye("div",{className:"rd-callout rd-callout-success",children:"Deposit confirmed on-chain. Waiting for it to be swept..."})]}),w&&St("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"," ",x?St(Na,{children:["exactly"," ",St("strong",{children:[S," ",i]})]}):St(Na,{children:["any amount of ",Ye("strong",{children:i})]}),"."]}),(x||!w&&!p&&b)&&St("p",{className:"rd-card-hint",children:[x&&St(Na,{children:["Send exactly"," ",St("strong",{children:[S," ",i]})," ","on ",r," to this address."]}),!w&&!p&&b&&!x&&"Enter an amount to deposit in one click."]})]})}import{useEffect as Au,useId as Qw,useRef as Js,useState as Lu}from"react";import{jsx as ii,jsxs as ai}from"react/jsx-runtime";function si({value:e,options:t,onChange:r,disabled:n,ariaLabel:o,id:i}){let a=Qw(),s=i??a,l=`${s}-listbox`,[c,p]=Lu(!1),b=t.findIndex(v=>v.value===e),[h,d]=Lu(b>=0?b:0),y=Js(null),m=Js(null),g=Js([]),u=!!n||t.length===0,w=b>=0?t[b]:void 0;Au(()=>{if(!c)return;function v(E){y.current&&!y.current.contains(E.target)&&p(!1)}return document.addEventListener("pointerdown",v),()=>document.removeEventListener("pointerdown",v)},[c]),Au(()=>{c&&g.current[h]?.scrollIntoView?.({block:"nearest"})},[c,h]);function f(){u||(d(b>=0?b:0),p(!0))}function R(v){p(!1),v&&m.current?.focus()}function x(v){let E=t[v];E&&(r(E.value),R(!0))}function S(){u||(c?R(!1):f())}function M(v){if(!u)switch(v.key){case"ArrowDown":v.preventDefault(),c?d(E=>Math.min(E+1,t.length-1)):f();break;case"ArrowUp":v.preventDefault(),c?d(E=>Math.max(E-1,0)):f();break;case"Enter":case" ":v.preventDefault(),c?x(h):f();break;case"Escape":c&&(v.preventDefault(),R(!0));break;case"Tab":c&&p(!1);break;default:break}}let C=c&&t[h]?`${s}-option-${h}`:void 0;return ai("div",{className:"rd-dropdown",ref:y,children:[ai("button",{type:"button",id:s,ref:m,className:"rd-dropdown-trigger","aria-haspopup":"listbox","aria-expanded":c,"aria-controls":l,"aria-activedescendant":C,"aria-label":o,disabled:u,onClick:S,onKeyDown:M,children:[ai("span",{className:"rd-dropdown-trigger-content",children:[w?.icon,ai("span",{className:"rd-dropdown-trigger-label",children:[w?.label??"",w?.subLabel&&ii("small",{className:"rd-dropdown-trigger-sub",children:w.subLabel})]})]}),ii("span",{className:"rd-dropdown-chevron","aria-hidden":"true",children:"\u25BE"})]}),c&&ii("ul",{className:"rd-dropdown-listbox",role:"listbox",id:l,"aria-label":o,tabIndex:-1,"data-vaul-no-drag":!0,children:t.map((v,E)=>{let D=v.value===e,B=E===h;return ai("li",{id:`${s}-option-${E}`,role:"option","aria-selected":D,ref:I=>{g.current[E]=I},className:["rd-dropdown-option",B?"rd-dropdown-option-active":"",D?"rd-dropdown-option-selected":""].filter(Boolean).join(" "),onPointerEnter:()=>d(E),onClick:I=>{I.preventDefault(),x(E)},children:[v.icon,ii("span",{className:"rd-dropdown-option-label",children:v.label}),D&&ii("span",{className:"rd-dropdown-option-check","aria-hidden":"true",children:"\u2713"})]},v.value)})})]})}import{Fragment as $s,jsx as En,jsxs as Mr}from"react/jsx-runtime";function Vw(e,t){if(!e)return"--";try{return At(BigInt(e),t)}catch{return"--"}}function Du({quote:e,isLoading:t,error:r,humanAmount:n,originSymbol:o,destination:i}){return Mr("div",{className:"rd-stack","data-rd-quote-preview":"",children:[t&&Mr("div",{className:"rd-quote-strip","data-testid":"rd-quote-skeleton",children:[En("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"30%"},"aria-hidden":"true"}),En("span",{className:"rd-quote-strip-arrow","aria-hidden":"true",children:"\u2192"}),En("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"30%"},"aria-hidden":"true"})]}),!t&&r&&Mr("div",{className:"rd-callout rd-callout-danger",children:["Couldn't fetch a quote: ",r.message]}),!t&&!r&&e&&o&&Mr($s,{children:[Mr("div",{className:"rd-quote-strip",children:[Mr("span",{className:"rd-quote-strip-side",children:[Mr("b",{children:[n," ",o]}),En("small",{children:"You send"})]}),En("span",{className:"rd-quote-strip-arrow","aria-hidden":"true",children:"\u2192"}),Mr("span",{className:"rd-quote-strip-side rd-quote-strip-end",children:[Mr("b",{children:["~",Vw(e.expectedCrossd,i.decimals)," ",i.symbol]}),En("small",{children:"You receive"})]})]}),e.belowMin&&En("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)&&Mr("p",{className:"rd-quote-strip-hint",children:[e.feeUsd&&Mr($s,{children:["Bridge fee: $",e.feeUsd,", already deducted from the amount above. You also pay your own network fee to send the deposit."," "]}),e.assumesParity&&Mr($s,{children:["Assumes 1:1 parity between bridged USDT and ",i.symbol,"; the final amount may differ slightly."]})]})]}),!t&&!r&&!e&&En("p",{className:"rd-muted",children:"Enter an amount to see a quote."})]})}import{useMemo as Fu}from"react";var Pu={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 Bu(e,t){let r=Pu[e];if(!(!r||!t))return{url:`${r.base}/token/${t}`,name:r.name}}var qw={1:"Ethereum",56:"BNB Smart Chain",137:"Polygon",8453:"Base",42161:"Arbitrum",612055:"ONEchain",792703809:"Solana"};function Co(e){return qw[e]??`Chain ${e}`}function Ia(e,t){let r=Pu[e];if(!(!r||!t))return{url:`${r.base}/tx/${t}`,name:r.name}}import{jsx as Er,jsxs as An}from"react/jsx-runtime";function Yw(e){let t=new Map;for(let r of e.origins)t.has(r.chainId)||t.set(r.chainId,r.chainName);return Array.from(t,([r,n])=>({chainId:r,chainName:n}))}function Ou(e,t){return t===void 0?[]:e.origins.filter(r=>r.chainId===t)}function Kw(e,t){let r=At(e,t),n=r.indexOf(".");return n===-1?r:`${r.slice(0,n)}.${r.slice(n+1,n+1+4)}`.replace(/\.?0+$/,"")||r.slice(0,n)}function zu({catalog:e,origin:t,onChangeOrigin:r,amount:n,onChangeAmount:o,showAmountInput:i=!0,balance:a,balanceLoading:s,insufficientBalance:l,onMax:c,disabled:p}){let b=Fu(()=>Yw(e),[e]),h=Fu(()=>Ou(e,t?.chainId),[e,t?.chainId]);function d(u){let w=Number(u),f=Ou(e,w)[0];f&&r(f)}function y(u){let w=h.find(f=>f.token.address.toLowerCase()===u.toLowerCase());w&&r(w)}let m=a?`${Kw(a.value,a.decimals)} ${a.symbol}`:void 0,g=l?`Amount exceeds your balance${m?` (${m})`:""}`:void 0;return An("section",{className:"rd-stack","data-rd-source-form":"",children:[An("div",{className:"rd-field",children:[An("div",{className:"rd-field-label-row",children:[Er("span",{className:"rd-field-label",children:"From"}),t&&(()=>{let u=Bu(t.chainId,t.token.address);return u?An("a",{className:"rd-token-explorer-link",href:u.url,target:"_blank",rel:"noopener noreferrer",title:`View ${t.token.symbol} on ${u.name}`,children:[u.name," \u2197"]}):null})()]}),An("div",{className:"rd-field-row",children:[Er(si,{ariaLabel:"Origin chain",value:t?String(t.chainId):"",onChange:d,disabled:p,options:b.map(u=>({value:String(u.chainId),label:u.chainName,subLabel:"Network",icon:Er(Ca,{chainId:u.chainId,chainName:u.chainName,size:22})}))}),Er(si,{ariaLabel:"Token",value:t?.token.address??"",onChange:y,disabled:p||h.length===0,options:h.map(u=>({value:u.token.address,label:u.token.symbol,subLabel:`${u.token.decimals} decimals`,icon:Er(Zn,{symbol:u.token.symbol,logoUrl:u.token.logoUrl,size:22})}))})]})]}),i&&An("label",{className:"rd-field",children:[Er("span",{className:"rd-field-label",children:"Amount (optional)"}),An("div",{className:"rd-amount-input","data-rd-invalid":g?"":void 0,children:[Er("input",{type:"text",inputMode:"decimal",placeholder:"0.0",value:n,onChange:u=>{let w=u.target.value;if(w===""){o(w);return}w.startsWith(".")&&(w=`0${w}`),/^\d*\.?\d{0,4}$/.test(w)&&(w=w.replace(/^0+(?=\d)/,""),!((w.split(".")[0]??"").length>12)&&o(w))},disabled:p||!t,"data-vaul-no-drag":!0}),t&&Er("span",{className:"rd-amount-input-suffix",children:t.token.symbol}),c&&!p&&Er("button",{type:"button",className:"rd-amount-input-max",onClick:c,disabled:p||!t,children:"Max"})]}),(m||s)&&An("span",{className:"rd-amount-meta",children:[Er("span",{}),Er("span",{children:s?"Balance: \u2026":m?`Balance: ${m}`:""})]}),g&&Er("span",{className:"rd-callout rd-callout-danger",children:g})]})]})}import{Fragment as el,jsx as Ae,jsxs as cr}from"react/jsx-runtime";function Uu({catalog:e,origin:t,onChangeOrigin:r,amount:n,onChangeAmount:o,showAmountInput:i,minNotice:a,amountHint:s,onMax:l,recipient:c,onChangeRecipient:p,showRecipientInput:b,recipientValid:h,balance:d,balanceLoading:y,insufficientBalance:m,targetOptions:g,selectedTarget:u,onChangeTarget:w,showTargetSelector:f,quote:R,quoteLoading:x,quoteError:S,depositAddress:M,depositAddressLoading:C,depositAddressError:v,arrivalStatus:E,amountSmallestUnits:D,depositState:B,onDeposit:I,canDeposit:K,oneClickEnabled:L,locked:P,onRequestConnect:ne}){let V=g.length>1&&f,{phase:U,isSubmitting:ce,isConfirming:Z,isConfirmed:G,needsSwitch:z,reverted:ee,error:J}=B,pe=u?.symbol??e.destination.symbol;return cr(el,{children:[a&&Ae(Cu,{minNotice:a,arrivalStatus:E}),P?cr(el,{children:[cr("section",{className:"rd-locked-card","data-rd-locked":"",children:[Ae("span",{className:"rd-locked-glyph","aria-hidden":"true",children:cr("svg",{width:"26",height:"26",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[Ae("path",{d:"M6 10.5V8a6 6 0 1 1 12 0v2.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),Ae("rect",{x:"4",y:"10.5",width:"16",height:"10.5",rx:"2.5",fill:"currentColor"})]})}),Ae("span",{className:"rd-locked-text",children:"Connect to get your personal deposit address"}),b&&Ae("span",{className:"rd-card-hint",children:"Or enter a recipient address to get one without connecting."})]}),ne&&Ae("button",{type:"button",className:"rd-button-primary rd-button-block","data-track":"connect",onClick:ne,children:"Connect Wallet"})]}):M?Ae(Eu,{depositAddress:M,originChainId:t.chainId,originChainName:t.chainName,originCurrency:t.token.address,amount:D,tokenSymbol:t.token.symbol,tokenDecimals:t.token.decimals,depositState:B,onDeposit:I,canDeposit:K,oneClickEnabled:L}):C?cr(el,{children:[Ae(Ta,{}),L&&D&&Ae("span",{className:"rd-skeleton rd-skeleton-cta","aria-hidden":"true"}),Ae("p",{className:"rd-sr-only",role:"status",children:"Preparing your deposit address..."})]}):v?cr("div",{className:"rd-callout rd-callout-danger",children:["Couldn't fetch a deposit address: ",v.message]}):null,Ae(zu,{catalog:e,origin:t,onChangeOrigin:r,amount:n,onChangeAmount:o,showAmountInput:i,balance:d,balanceLoading:y,insufficientBalance:m,onMax:l}),cr("div",{className:"rd-field","data-rd-delivery":"",children:[Ae("span",{className:"rd-field-label",children:"Deliver as"}),V?Ae(si,{ariaLabel:"Delivery token",value:u?.symbol??"",onChange:w,options:g.map(se=>({value:se.symbol,label:se.symbol,subLabel:"on ONEchain",icon:Ae(Zn,{symbol:se.symbol,size:22})}))}):cr("div",{className:"rd-static-target",children:[Ae(Zn,{symbol:pe,size:22}),Ae("span",{children:pe})]}),b&&cr("label",{className:"rd-delivery-recipient",children:[Ae("input",{type:"text",placeholder:"0x...","aria-label":"ONEchain recipient address",value:c,onChange:se=>p(se.target.value),"data-vaul-no-drag":!0}),Ae("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."}),!h&&Ae("span",{className:"rd-callout rd-callout-danger",children:"Not a valid address"})]})]}),u?.external&&cr("div",{className:"rd-callout rd-callout-muted",children:["Delivered as ",u.symbol," via an external adapter."]}),s&&Ae("div",{className:"rd-callout rd-callout-warning","data-rd-amount-hint":"",children:s}),n.trim()&&Ae(Du,{quote:R,isLoading:x,error:S,humanAmount:n,originSymbol:t.token.symbol,destination:e.destination}),a&&Ae(Nu,{minNotice:a,onlySend:{symbol:t.token.symbol,chainName:t.chainName},showWalletCreditNote:!b&&h}),L&&U!=="idle"&&!K&&cr("div",{className:"rd-card",children:[ce&&cr("p",{className:"rd-muted",children:[Ae("span",{className:"rd-spinner"})," ",z?"Switching network...":"Confirm in wallet..."]}),Z&&cr("p",{className:"rd-muted",children:[Ae("span",{className:"rd-spinner"})," Confirming..."]}),B.txHash&&cr("p",{className:"rd-card-hint",children:["Tx: ",Ae("span",{style:{fontFamily:"monospace"},children:B.txHash})]}),G&&ee&&Ae("div",{className:"rd-callout rd-callout-danger",children:"The deposit transaction reverted on-chain. Please check your wallet and try again."}),G&&!ee&&Ae("div",{className:"rd-callout rd-callout-success",children:"Deposit confirmed on-chain. Waiting for it to be swept..."}),J&&Ae("div",{className:"rd-callout rd-callout-danger",children:J})]})]})}import{useEffect as Xu,useState as ol}from"react";import{useCallback as ci,useEffect as Xw,useMemo as Hu,useRef as Qu,useState as li}from"react";var qr=class extends Error{constructor(t,r,n){super(r),this.name="RelayApiError",this.status=t,this.body=n}};function Lt(e){let t=e.baseUrl.replace(/\/+$/,"");async function r(n,o){let i={...o?.headers};o?.body!=null&&(i["Content-Type"]="application/json");let a;try{a=await fetch(`${t}${n}`,{...o,headers:i})}catch(l){throw new qr(0,`network error calling ${n}: ${l.message}`)}let s=await a.text();if(!a.ok){let l=`request to ${n} failed with status ${a.status}`,c;try{c=JSON.parse(s);let p=c;p?.error&&(l=p.error)}catch{c=s||void 0}throw new qr(a.status,l,c)}try{return JSON.parse(s)}catch{throw new qr(a.status,`expected a JSON response from ${n} but got ${s?"a non-JSON body":"an empty body"}`,s||void 0)}}return{getConfig(){return r("/v1/config").then(n=>({...n,targets:n.targets??[]}))},getQuote(n){return r("/v1/quote",{method:"POST",body:JSON.stringify(n)})},getDepositAddress(n,o){let i=new URLSearchParams({user:n.user,originChainId:String(n.originChainId),originCurrency:n.originCurrency});return o&&i.set("target",o),r(`/v1/deposit-address?${i.toString()}`)},getOrder(n){return r(`/v1/orders/${encodeURIComponent(n)}`)},listOrders(n){let o=new URLSearchParams({user:n});return r(`/v1/orders?${o.toString()}`).then(i=>i.orders??[])},ordersStreamUrl(n){return`${t}/v1/orders/stream?user=${encodeURIComponent(n)}`},getRecovery(n){let o=new URLSearchParams({user:n.user});return n.target&&o.set("target",n.target),r(`/v1/recovery?${o.toString()}`)}}}var ju=[{type:"function",name:"deploy",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"version",type:"uint256"}],outputs:[{name:"",type:"address"}]}],tl=[{type:"function",name:"execute",stateMutability:"nonpayable",inputs:[],outputs:[]},{type:"function",name:"sweepToUser",stateMutability:"nonpayable",inputs:[{name:"tokenAddr",type:"address"}],outputs:[]}],rl=[{type:"function",name:"computeAddress",stateMutability:"view",inputs:[{name:"recipient",type:"address"},{name:"version",type:"uint256"}],outputs:[{name:"",type:"address"}]}];var No=["0x486BEEc35A9a9915213Ea02AD3709738335F7702","0x3438735303911aBe113AdF14b18eE730cC24893b","0xA3B548Ab23043e6B24A087515fe1306379683533","0x44317d07378390543d99Ee76374E86C1Ef6cF832"];function Ma(e,t){return!e||!t?!1:e.toLowerCase()===t.toLowerCase()}function Zw(e,t){return t.some(r=>Ma(r,e))}function Ea(e){if(!e||e.length===0)return No;let t=new Set,r=[];for(let n of e){if(typeof n!="string"||!He(n))continue;let o=n.toLowerCase();t.has(o)||(t.add(o),r.push(n))}return r.length>0?r:No}async function Wu(e,t,{factory:r,forwarder:n,recipient:o,version:i,trusted:a=No}){if(!r||!n||!o||i===void 0)return{ok:!1,reason:"address verification is missing inputs (factory/forwarder/recipient/version)"};if(!Zw(r,a))return{ok:!1,reason:`factory ${r} 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:r,abi:rl,functionName:"computeAddress",args:[o,BigInt(i)]})}catch(l){return{ok:!1,reason:`could not verify the forwarder address on-chain: ${l instanceof Error?l.message:String(l)}`}}return Ma(s,n)?{ok:!0}:{ok:!1,reason:`forwarder address mismatch: the API returned ${n}, but factory ${r} derives ${s} for this account -- refusing to sign`}}async function _u(e,t,{forwarder:r,recipient:n,version:o,trusted:i=No}){if(!r||!n||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 a=await Promise.all(i.map(async s=>{try{return await e({chainId:t,address:s,abi:rl,functionName:"computeAddress",args:[n,BigInt(o)]})}catch{return}}));return a.some(s=>Ma(s,r))?{ok:!0}:a.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: ${r} is not the address any known factory derives for this account -- refusing to deposit`}}function Gu(e,t){return Ma(e,t)}var Ln=56,nl={step:"idle"};function Jw(e){return e.tokens?.find(t=>t.recoverable)?.address??e.token}function di(e={}){let t=Qu(e);t.current=e;let r=e.wallet,n=r?.walletChainId,o=e.recipient,i=o&&He(o)?o:void 0,[a,s]=li({}),l=ci((h,d)=>{s(y=>({...y,[h.toLowerCase()]:d}))},[]),c=ci(h=>h?a[h.toLowerCase()]??nl:nl,[a]),p=Hu(()=>Object.values(a).some(h=>h.step==="switching"||h.step==="deploying"||h.step==="recovering"),[a]);return{recover:ci(async(h,d,y)=>{if(!i||!h?.forwarder)return;let m=h.forwarder;l(m,{step:"switching"});try{if(n!==Ln){if(!r?.switchChain)throw new Error("wallet cannot switch chains");await r.switchChain(Ln)}if(!r?.writeContract||!r?.readContract||!r?.waitForReceipt)throw new Error("wallet is missing contract capabilities required for recovery");let g=await Wu(r.readContract,Ln,{factory:h.factory,forwarder:h.forwarder,recipient:i,version:h.version,trusted:t.current.trustedFactories});if(!g.ok)throw new Error(`address verification failed: ${g.reason}`);let u;if(!h.isDeployed){if(l(m,{step:"deploying"}),u=await r.writeContract({address:h.factory,abi:ju,functionName:"deploy",args:[i,BigInt(h.version)],chainId:Ln}),l(m,{step:"deploying",deployTxHash:u}),(await r.waitForReceipt({chainId:Ln,hash:u})).status==="reverted")throw new Error(`forwarder deploy reverted on-chain (tx ${u})`);t.current.onChanged?.()}l(m,{step:"recovering",deployTxHash:u});let w=d==="execute"?await r.writeContract({address:h.forwarder,abi:tl,functionName:"execute",args:[],chainId:Ln}):await r.writeContract({address:h.forwarder,abi:tl,functionName:"sweepToUser",args:[y??Jw(h)],chainId:Ln});if(l(m,{step:"recovering",deployTxHash:u,actionTxHash:w}),(await r.waitForReceipt({chainId:Ln,hash:w})).status==="reverted")throw new Error(`recovery transaction reverted on-chain (tx ${w})`);l(m,{step:"done",deployTxHash:u,actionTxHash:w}),t.current.onRecoverySuccess?.({action:d,forwarder:h.forwarder,actionTxHash:w,...u?{deployTxHash:u}:{}}),t.current.onChanged?.()}catch(g){let u=g instanceof Error?g:new Error(String(g));s(w=>{let f=m.toLowerCase();return{...w,[f]:{...w[f]??nl,step:"error",error:u.message}}}),t.current.onError?.(u)}},[i,n,r,l]),stateFor:c,busy:p}}function Vu(e={}){let t=Qu(e);t.current=e;let r=Hu(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRecovery: either `client` or `apiBaseUrl` must be provided");return Lt({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.recipient,o=n&&He(n)?n:void 0,[i,a]=li(),[s,l]=li(!1),[c,p]=li(),[b,h]=li(0),d=e.target,y=e.enabled??!0,m=e.refetchInterval;Xw(()=>{if(!o||!y){a(void 0),p(void 0),l(!1);return}let R=!1,x=!1,S=!0;async function M(){if(!(R||x)){x=!0,S&&l(!0);try{let v=await r.getRecovery({user:o,target:d});if(R)return;a(v),p(void 0)}catch(v){if(R)return;let E=v instanceof Error?v:new Error(String(v));p(E),t.current.onError?.(E),E instanceof qr&&E.status===401&&t.current.onUnauthorized?.()}finally{x=!1,!R&&S&&l(!1),S=!1}}}M();let C=typeof m=="number"&&Number.isFinite(m)&&m>0?setInterval(()=>{M()},m):void 0;return()=>{R=!0,C&&clearInterval(C)}},[r,o,b,d,y,m]);let g=ci(()=>h(R=>R+1),[]),u=di({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:g}),w=ci(async(R,x)=>{i&&await u.recover(i,R,x)},[u,i]),f=u.stateFor(i?.forwarder);return{info:i,loading:s,error:c,refresh:g,recover:w,recoveryState:f}}var $w="BSC_FUNDED";function qu(e){if(!e)return 0n;try{let t=BigInt(e);return t>0n?t:0n}catch{return 0n}}function ey(e,t){return e.target||t}function To(e,t=[]){let r=e.find(o=>o.isDefault)?.symbol,n=new Map;for(let o of e){if(!o.info?.forwarder)continue;let i=o.info.forwarder.toLowerCase(),a=n.get(i);if(a){a.targets.push(o.symbol);continue}n.set(i,{forwarder:o.info.forwarder,targets:[o.symbol],info:o.info,deposits:[],depositsTotal:0n})}for(let o of n.values()){let i=new Set(o.targets);for(let a of t){if(a.status!==$w)continue;let s=ey(a,r);if(!(!s||!i.has(s)))for(let l of a.deposits??[])o.deposits.push({amount:l.amount,originChainId:l.originChainId,originTxHash:l.originTxHash,txHash:l.txHash,blockNumber:l.blockNumber}),o.depositsTotal+=qu(l.amount)}o.deposits.sort((a,s)=>a.blockNumber-s.blockNumber)}return[...n.values()]}function Yu(e){return e.filter(t=>(t.info.tokens??[]).some(r=>r.recoverable)?!0:qu(t.info.balance)>0n&&t.info.suggestedAction!=="none")}function Aa(e){return e.reduce((t,r)=>t+(r.info.tokens??[]).filter(n=>n.recoverable).length,0)}import{Fragment as Da,jsx as de,jsxs as We}from"react/jsx-runtime";var ty=56;function ry(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 ny="This balance may already be processing. Recover only if it remains stuck.",La="USDT",Ku="primary";function oy(e){return`${e} more recoverable under other delivery tokens -- switch the delivery token above to recover ${e===1?"it":"them"}.`}function iy(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 Ju({message:e}){let[t,r]=ol("idle");Xu(()=>{if(t==="idle")return;let i=window.setTimeout(()=>r("idle"),1500);return()=>window.clearTimeout(i)},[t]);async function n(){if(typeof navigator>"u"||!navigator.clipboard){r("failed");return}try{await navigator.clipboard.writeText(e),r("copied")}catch{r("failed")}}let o=t==="copied"?"Copied technical details":t==="failed"?"Copy failed":"Copy technical details";return We("details",{className:"rd-error-details",children:[de("summary",{children:"View technical details"}),We("div",{className:"rd-error-log",children:[de("button",{type:"button",className:"rd-error-copy",onClick:()=>{n()},"aria-label":o,"aria-live":"polite",title:o,children:t==="copied"?de("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:de("path",{d:"m5 12 4 4L19 6",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}):We("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[de("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.8"}),de("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"})]})}),de("code",{children:e})]})]})}function pi(e){if(!e)return 0n;try{return BigInt(e)}catch{return 0n}}function gn(e,t){try{return At(e,t)}catch{return e.toString()}}function Zu(e){return e.length>14?`${e.slice(0,8)}...${e.slice(-4)}`:e}function ay(e){let t=pi(e.bridgeMinWei),r=[];for(let i of e.tokens??[]){let a=pi(i.balance);if(!(a<=0n)){if(i.suggestedAction==="execute"){r.push({key:i.address,symbol:i.symbol,decimals:i.decimals,balance:a,action:{kind:"execute"}});continue}if(i.recoverable){r.push({key:i.address,symbol:i.symbol,decimals:i.decimals,balance:a,action:{kind:"sweep",tokenAddress:i.address}});continue}r.push({key:i.address,symbol:i.symbol,decimals:i.decimals,balance:a,...t>a?{shortfall:t-a,minimum:t}:{}})}}let n=pi(e.balance),o=r.some(i=>i.action?.kind==="execute");return n>0n&&e.suggestedAction==="execute"&&!o?r.unshift({key:Ku,symbol:La,decimals:e.decimals,balance:n,action:{kind:"execute"}}):r.length===0&&n>0n&&e.suggestedAction!=="none"&&r.push({key:Ku,symbol:La,decimals:e.decimals,balance:n,action:{kind:"sweep"}}),r}function sy({deposit:e,decimals:t}){let r=e.originChainId??ty,n=e.originTxHash||e.txHash,o=n?Ia(r,n):void 0;return We("div",{className:"rd-history-step","data-testid":"recovery-deposit-row",children:[de("span",{className:"rd-history-step-dot rd-history-step-dot-done"}),de("span",{className:"rd-history-step-chain",children:Co(r)}),de("span",{className:"rd-history-step-amount",children:gn(pi(e.amount),t)}),de("span",{className:"rd-history-step-tx",children:o?de("a",{href:o.url,target:"_blank",rel:"noreferrer",title:n,children:Zu(n)}):n?de("span",{title:n,children:Zu(n)}):null})]})}function ly({group:e,showTargetLabel:t,busy:r,state:n,onRecover:o,actingRowKey:i,rowKeyOf:a}){let{info:s}=e,l=ay(s),c=pi(s.balance),p=l.length===1?`${gn(l[0].balance,l[0].decimals)}`:`${l.length} assets`,b=e.deposits.length>0&&e.depositsTotal>=c,h=c>e.depositsTotal?c-e.depositsTotal:0n,d=n.step==="switching"||n.step==="deploying"||n.step==="recovering",m=l.find(u=>a(u)===i)?.action?.kind;function g(){if(n.step==="switching")return"Switching to BNB Chain\u2026";if(n.step==="deploying")return"Confirm in wallet\u2026 (1/2 \u2014 preparing your deposit address)";let u=m==="execute"?"continuing ONEchain delivery":"returning funds";return n.deployTxHash?`Confirm in wallet\u2026 (2/2 \u2014 ${u})`:`Confirm in wallet\u2026 (${u})`}return We("div",{className:"rd-recover-group","data-testid":"forwarder-section",children:[t&&We("p",{className:"rd-recover-group-label",children:["Delivery target \xB7 ",de("b",{children:e.targets.join(", ")})]}),We("div",{className:"rd-recover-sum",children:[de("span",{className:"rd-recover-sum-label",children:"Funds awaiting processing"}),We("span",{className:"rd-recover-sum-value",children:[p,l.length===1&&We(Da,{children:[" ",de("span",{className:"rd-recover-sum-unit",children:l[0].symbol})]})]})]}),e.deposits.length>0&&We("details",{className:"rd-recover-made-of",children:[We("summary",{className:"rd-recover-made-of-label",children:["Deposit history \xB7 ",e.deposits.length," ",e.deposits.length===1?"transfer":"transfers"]}),We("div",{className:"rd-recover-made-of-body",children:[e.deposits.map(u=>de(sy,{deposit:u,decimals:s.decimals},`${u.txHash}-${u.blockNumber}`)),!b&&We("p",{className:"rd-token-row-status","data-testid":"deposits-incomplete-note",children:["These transfers explain ",gn(e.depositsTotal,s.decimals)," of"," ",gn(c,s.decimals)," ",La,". The remaining"," ",gn(h,s.decimals)," ",La," is still included when you act."]})]})]}),de("div",{className:"rd-token-list",children:l.map(u=>{let w=a(u),f=d&&i===w;return We("div",{className:"rd-token-row",children:[de(Zn,{symbol:u.symbol,size:26}),We("div",{className:"rd-token-row-info",children:[We("span",{className:"rd-token-row-amount",children:[gn(u.balance,u.decimals)," ",de("span",{className:"rd-token-row-symbol",children:u.symbol})]}),f?de("span",{className:"rd-token-row-step",role:"status","aria-live":"polite",children:g()}):u.shortfall!==void 0&&u.minimum!==void 0?We("span",{className:"rd-token-row-warn",children:["Needs ",We("b",{children:[gn(u.shortfall,u.decimals)," ",u.symbol]})," more to reach the"," ",gn(u.minimum,u.decimals)," ",u.symbol," minimum. Add it through"," ",de("b",{children:"Deposit to CROSS"})," and both amounts will process together."]}):u.action?de("span",{className:"rd-token-row-status",children:u.action.kind==="execute"?"Ready to continue delivery to ONEchain":"Ready to return to your BNB Chain wallet"}):de("span",{className:"rd-token-row-status",children:"Waiting for processing"})]}),f?de("span",{className:"rd-spinner rd-token-row-spinner"}):u.action&&de("button",{type:"button",className:"rd-button-primary rd-token-row-action",onClick:()=>o(u),disabled:r,children:u.action.kind==="execute"?"Continue delivery":"Return to wallet"})]},u.key)})}),!s.isDeployed&&n.step==="idle"&&We("div",{className:"rd-callout rd-callout-warning","data-testid":"two-tx-notice",children:["The first action from this address needs ",de("b",{children:"two wallet confirmations"}),": prepare the address, then move the funds. Later actions need one."]}),s.inFlight&&de("p",{className:"rd-muted rd-token-row-status",children:s.inFlightReason||ny}),n.step==="done"&&de("div",{className:"rd-callout rd-callout-success",role:"status","aria-live":"polite",children:m==="execute"?"ONEchain delivery restarted.":"Funds returned to your connected BNB Chain wallet."}),n.step==="error"&&n.error&&We(Da,{children:[de("div",{className:"rd-callout rd-callout-danger",role:"alert",children:iy(n.error)}),de(Ju,{message:n.error})]})]})}function Pa(e){let{info:t,loading:r,error:n,refresh:o}=Vu(ry(e)),i=di({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:e.targets!==void 0?e.onRecovered:o}),[a,s]=ol(),l=e.targets!==void 0?[...e.targets]:t?[{symbol:e.target??"",isDefault:!0,info:t}]:[],c=Yu(To(l,e.orders??[])),p=c.length>0,b=e.wallet?.walletAddress,h=e.wallet?.getBalance,[d,y]=ol();return Xu(()=>{if(!p||!h||!b){y(void 0);return}let m=!1;return h({chainId:56,address:b}).then(g=>{m||y({value:g.value,decimals:g.decimals})}).catch(()=>{m||y(void 0)}),()=>{m=!0}},[p,h,b]),We("section",{className:e.showTitle??!0?"rd-card":"rd-stack","data-rd-recover-funds":"",children:[(e.showTitle??!0)&&de("div",{className:"rd-card-header",children:de("h2",{className:"rd-card-title",children:"Recover stuck funds"})}),typeof e.otherTargetsRecoverable=="number"&&e.otherTargetsRecoverable>0&&de("div",{className:"rd-callout rd-callout-muted","data-testid":"other-targets-recoverable-note",children:oy(e.otherTargetsRecoverable)}),r&&We("p",{className:"rd-muted",role:"status","aria-live":"polite",children:[de("span",{className:"rd-spinner"})," Checking for recoverable funds\u2026"]}),n&&We(Da,{children:[de("div",{className:"rd-callout rd-callout-danger",role:"alert",children:"Couldn't check recoverable funds. Please try again."}),de(Ju,{message:n.message})]}),!r&&!n&&l.length>0&&!p&&We("div",{className:"rd-recover-sum",children:[de("span",{className:"rd-recover-sum-label",children:"Deposit address status"}),de("span",{className:"rd-recover-sum-value rd-recover-sum-empty",children:"Nothing to recover"})]}),!r&&!n&&c.map(m=>de(ly,{group:m,showTargetLabel:c.length>1||m.targets.length>1,busy:i.busy,state:i.stateFor(m.forwarder),actingRowKey:a,rowKeyOf:g=>`${m.forwarder.toLowerCase()}:${g.key}`,onRecover:g=>{g.action&&(s(`${m.forwarder.toLowerCase()}:${g.key}`),i.recover(m.info,g.action.kind,g.action.tokenAddress))}},m.forwarder.toLowerCase())),!r&&!n&&p&&We("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:",d&&We(Da,{children:[" ",We("b",{children:[gn(d.value,d.decimals)," BNB"]})]}),!d&&" unavailable","."]}),!r&&!n&&p&&de("p",{className:"rd-recover-foot",children:"Delivery continues to ONEchain; returned funds go to your connected BNB Chain wallet."})]})}import*as rn from"react";import*as dr from"@radix-ui/react-dialog";import{Drawer as Io}from"vaul";ae(`.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-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: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}.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-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}
|
|
25
|
-
`);import{jsx as Ar,jsxs as Ba}from"react/jsx-runtime";function cy(e){let t=`(max-width: ${e}px)`,[r,n]=rn.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(t).matches);return rn.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;let o=window.matchMedia(t);n(o.matches);let i=a=>n(a.matches);return o.addEventListener("change",i),()=>o.removeEventListener("change",i)},[t]),r}function Mo({theme:e="dark",mobileBreakpoint:t=768,drawerDirection:r="bottom",dialogWidth:n,drawerMaxWidth:o,drawerMinWidth:i,style:a,open:s,onOpenChange:l,children:c}){let p=cy(t),[b,h]=rn.useState(!1),d=s!==void 0,y=d?s:b,m=rn.useCallback(f=>{d||h(f),l?.(f)},[d,l]),g=rn.useMemo(()=>{let f={};return n&&(f["--rd-dialog-width"]=n),o&&(f["--rd-drawer-max-width"]=o),i&&(f["--rd-drawer-min-width"]=i),{...f,...a}},[n,o,i,a]),u=rn.useMemo(()=>({open:y,setOpen:m,isMobile:p,theme:e,portalStyle:g}),[y,m,p,e,g]),w=Ar("div",{"data-theme":e,style:g,children:c});return p?Ar(Ra.Provider,{value:u,children:Ar(Io.Root,{direction:r,open:y,onOpenChange:m,noBodyStyles:!0,children:w},"drawer")}):Ar(Ra.Provider,{value:u,children:Ar(dr.Root,{open:y,onOpenChange:m,children:w})})}function Eo({asChild:e,children:t,dataAttributes:r}){let{isMobile:n}=Qr(),o=n?Io.Trigger:dr.Trigger;return Ar(o,{asChild:e,...r,children:t})}function Ao({className:e,ariaTitle:t,children:r}){let{isMobile:n,theme:o,portalStyle:i}=Qr();return n?Ba(Io.Portal,{children:[Ar(Io.Overlay,{className:"rd-overlay"}),Ba(Io.Content,{className:ve("rd-drawer-content",e),"data-theme":o,"data-rd-shell":"drawer",style:i,children:[Ar(Io.Title,{className:"rd-sr-only",children:t}),Ar("div",{className:"rd-drawer-handle"}),r]})]}):Ba(dr.Portal,{children:[Ar(dr.Overlay,{className:"rd-overlay"}),Ba(dr.Content,{className:ve("rd-dialog-content",e),"data-theme":o,"data-rd-shell":"dialog",style:i,children:[Ar(dr.Title,{className:"rd-sr-only",children:t}),Ar(dr.Description,{className:"rd-sr-only",children:t}),r]})]})}import{Fragment as uy,jsx as Qe,jsxs as nn}from"react/jsx-runtime";function dy(){return Qe("svg",{width:18,height:18,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:Qe("path",{d:"M19.14 12.94c.04-.31.06-.62.06-.94 0-.32-.02-.63-.06-.94l2.03-1.58a.5.5 0 0 0 .12-.64l-1.92-3.32a.5.5 0 0 0-.6-.22l-2.39.96a7.03 7.03 0 0 0-1.62-.94l-.36-2.54a.5.5 0 0 0-.5-.42h-3.84a.5.5 0 0 0-.5.42l-.36 2.54c-.59.24-1.13.56-1.62.94l-2.39-.96a.5.5 0 0 0-.6.22L2.71 8.84a.5.5 0 0 0 .12.64l2.03 1.58c-.04.31-.06.63-.06.94 0 .32.02.63.06.94l-2.03 1.58a.5.5 0 0 0-.12.64l1.92 3.32c.14.24.42.32.6.22l2.39-.96c.49.38 1.03.7 1.62.94l.36 2.54c.05.24.26.42.5.42h3.84c.24 0 .45-.18.5-.42l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.24.1.5 0 .6-.22l1.92-3.32a.5.5 0 0 0-.12-.64zM12 15.5a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7",fill:"currentColor"})})}function ef({className:e}){let t=ni();return Qe(fe,{feature:"relay",children:Qe(Ao,{ariaTitle:"Deposit",className:e??t.className,children:Qe(py,{})})})}function py(){let e=ni(),{theme:t,isMobile:r}=Qr(),n=Su(),o=$u.useCallback(Ke=>{if(!r)return;let Se=Ke.target;Se instanceof HTMLElement&&(Se.tagName!=="INPUT"&&Se.tagName!=="TEXTAREA"||window.setTimeout(()=>{Se.scrollIntoView({block:"center",behavior:"smooth"})},250))},[r]);if(!n)return null;let{recoveryOpen:i,setRecoveryOpen:a,resolvedApiBaseUrl:s,wallet:l,catalog:c,catalogLoading:p,catalogError:b,origin:h,setOrigin:d,amount:y,setAmount:m,recipient:g,setRecipient:u,recipientValid:w,balance:f,balanceLoading:R,insufficientBalance:x,depositAddress:S,depositAddressLoading:M,depositAddressError:C,arrivalStatus:v,quote:E,quoteLoading:D,quoteError:B,canDeposit:I,deposit:K,depositState:L,targetOptions:P,selectedTarget:ne,setSelectedTarget:V,showAmountInput:U,minNotice:ce,showRecipientInput:Z,showTargetSelector:G,showOneClick:z,showConnectPrompt:ee,showRecipientHint:J,canRecover:pe,recoverableCount:se,recoveryTargets:te,recoveryOrders:be,refreshRecovery:Le,trustedFactories:ge,amountHint:De,amountSmallestUnits:le,onMax:_e}=n;return nn("div",{className:"rd-root rd-wizard","data-theme":t,onFocusCapture:o,children:[pe&&Qe("div",{className:"rd-wizard-header",children:Qe("div",{className:"rd-wizard-actions",children:nn("button",{type:"button",className:"rd-icon-button","aria-label":"Recovery settings","aria-expanded":i,"data-track":"recovery_toggle",onClick:()=>a(Ke=>!Ke),children:[Qe(dy,{}),se>0&&Qe("span",{className:"rd-recovery-badge","data-testid":"recovery-badge",children:se})]})})}),pe&&i&&Qe(Pa,{client:e.client,apiBaseUrl:s,recipient:g,target:ne?.symbol,wallet:l,trustedFactories:ge,targets:te.length>0?te:void 0,orders:be,onRecovered:Le,onRecoverySuccess:e.onRecoverySuccess,onError:e.onError}),p&&nn("div",{className:"rd-skeleton-form","data-testid":"rd-source-skeleton","aria-hidden":"true",children:[Qe(Ta,{}),ee&&e.onRequestConnect&&Qe("span",{className:"rd-skeleton rd-skeleton-cta"}),nn("section",{className:"rd-stack",children:[nn("div",{className:"rd-field",children:[Qe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"18%"}}),nn("div",{className:"rd-field-row",children:[Qe("span",{className:"rd-skeleton rd-skeleton-field"}),Qe("span",{className:"rd-skeleton rd-skeleton-field"})]})]}),U&&nn("div",{className:"rd-field",children:[Qe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"34%"}}),Qe("span",{className:"rd-skeleton rd-skeleton-field"})]})]}),nn("div",{className:"rd-field",children:[Qe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"24%"}}),Qe("span",{className:"rd-skeleton rd-skeleton-field"}),(Z||g.trim().length>0)&&nn(uy,{children:[Qe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"58%",marginTop:"0.5rem"}}),Qe("span",{className:"rd-skeleton rd-skeleton-field"}),Z&&Qe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"82%"}})]})]}),Qe("span",{className:"rd-skeleton rd-skeleton-notice"})]}),p&&Qe("p",{className:"rd-sr-only",role:"status",children:"Loading deposit options..."}),b&&nn("div",{className:"rd-callout rd-callout-danger",children:["Failed to load configuration: ",b.message]}),J&&Qe("div",{className:"rd-callout rd-callout-muted",children:Z?"Connect a wallet or provide a recipient address to fetch your deposit address.":"Connect a wallet to fetch your deposit address."}),c&&h&&Qe(Uu,{catalog:c,origin:h,onChangeOrigin:d,amount:y,onChangeAmount:m,showAmountInput:U,minNotice:ce,amountHint:De,onMax:_e,recipient:g,onChangeRecipient:u,showRecipientInput:Z,recipientValid:w,balance:f,balanceLoading:R,insufficientBalance:x,targetOptions:P,selectedTarget:ne,onChangeTarget:V,showTargetSelector:G,quote:E,quoteLoading:D,quoteError:B,depositAddress:S,depositAddressLoading:M,depositAddressError:C,arrivalStatus:v,amountSmallestUnits:le,depositState:L,onDeposit:()=>{K()},canDeposit:I&&z,oneClickEnabled:z,locked:ee,onRequestConnect:e.onRequestConnect})]})}import{jsx as il}from"react/jsx-runtime";function tf({asChild:e,children:t}){return il(fe,{feature:"relay",children:il(Eo,{asChild:e??t!=null,children:t??il("button",{type:"button","data-track":"open",children:"Deposit"})})})}import*as xe from"react";import{useCallback as ui,useEffect as Dn,useMemo as al,useRef as sl,useState as tt}from"react";import{useEffect as fy,useState as my}from"react";function rf(e,t){let[r,n]=my(e);return fy(()=>{let o=setTimeout(()=>n(e),t);return()=>clearTimeout(o)},[e,t]),r}var gy=500,of=56,nf={chainId:of,token:"0x55d398326f99059fF775485246999027B3197955"},af=3e4,hy=5e3;function by(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?af:Math.max(hy,e*1e3)}var wy=[{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}];function ll(e,t){let r=e.trim();if(!r)return null;try{let n=Sa(r,t);return n>0n?n:null}catch{return null}}function sf(e={}){let t=sl(e);t.current=e;let r=al(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useDepositAddress: either `client` or `apiBaseUrl` must be provided");return Lt({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.wallet,o=n?.walletAddress,i=!!o,a=n?.walletChainId,[s,l]=tt(),[c,p]=tt(!0),[b,h]=tt();Dn(()=>{let A=!1;return p(!0),r.getConfig().then($=>{A||(l($),h(void 0))}).catch($=>{A||h($ instanceof Error?$:new Error(String($)))}).finally(()=>{A||p(!1)}),()=>{A=!0}},[r]);let d=e.chains,y=al(()=>{if(!s)return[];if(!d||d.length===0)return s.origins;let A=new Set(d);return s.origins.filter($=>A.has($.chainId))},[s,d]),m=al(()=>s?{...s,origins:y}:void 0,[s,y]),[g,u]=tt();Dn(()=>{if(g||y.length===0)return;let A=t.current.defaultToken,$=A?y.find(j=>j.chainId===A.chainId&&j.token.address.toLowerCase()===A.address.toLowerCase()):void 0;u($??y[0])},[y,g]);let[w,f]=tt(),R=ui(()=>{ot(void 0),Be(!1),et(!1),F(!1),Tt(void 0)},[]),x=ui(A=>{u(A),f(void 0),R()},[R]),S=g?.kind==="svm",[M,C]=tt(""),v=e.amount!==void 0?e.amount:M,E=ui(A=>{C(A),f(void 0),R()},[R]),D=rf(v,gy),B=g?ll(D,g.token.decimals):null,I=g?ll(v,g.token.decimals):null,[K,L]=tt(""),[P,ne]=tt(!1),V=e.recipient!==void 0?e.recipient:K,U=ui(A=>{L(A),ne(!0),f(void 0),R()},[R]);Dn(()=>{e.recipient===void 0&&o&&!P&&L(o)},[o,P,e.recipient]);let ce=V.length===0||He(V),Z=V.length>0&&He(V)?V:void 0,[G,z]=tt(),[ee,J]=tt(!1),[pe,se]=tt(0),te=n?.getBalance;Dn(()=>{if(!te||!o||!g||S){z(void 0),J(!1);return}let A=!1;J(!0);let $=g.token.address.toLowerCase()===oi?void 0:g.token.address;return te({chainId:g.chainId,address:o,token:$}).then(j=>{A||z({...j,formatted:At(j.value,j.decimals)})}).catch(()=>{A||z(void 0)}).finally(()=>{A||J(!1)}),()=>{A=!0}},[te,o,g,S,pe]);let be=G?.value??null,Le=!S&&I!==null&&be!==null&&I>be,[ge,De]=tt(),[le,_e]=tt(!1),[Ke,Se]=tt(),Ue=g?.chainId,Me=g?.token.address,Ze=e.target;Dn(()=>{if(!Z||!Ue||!Me){De(void 0),Se(void 0),_e(!1);return}let A=!1;return De(void 0),Se(void 0),_e(!0),(Ze?r.getDepositAddress({user:Z,originChainId:Ue,originCurrency:Me},Ze):r.getDepositAddress({user:Z,originChainId:Ue,originCurrency:Me})).then(j=>{A||(De(j),Se(void 0),t.current.onDepositAddress?.(j))}).catch(j=>{if(A)return;De(void 0);let ue=j instanceof Error?j:new Error(String(j));Se(ue),t.current.onError?.(ue)}).finally(()=>{A||_e(!1)}),()=>{A=!0}},[r,Z,Ue,Me,Ze]);let Nt=[Ue??"",(Me??"").toLowerCase(),(Z??"").toLowerCase(),Ze??"",v.trim()].join("|"),st=sl(Nt);Dn(()=>{st.current!==Nt&&(st.current=Nt,f(void 0),R())},[Nt,R]);let[yt,lt]=tt(),[jt,je]=tt(!1),[Dt,mt]=tt(),ct=B?.toString();Dn(()=>{if(!Ue||!Me||!ct){lt(void 0),mt(void 0),je(!1);return}let A=!1,$,j=!0;async function ue(){j&&je(!0);let Oe=af;try{let It=await r.getQuote({originChainId:Ue,originCurrency:Me,amount:ct});if(A)return;lt(It),mt(void 0),Oe=by(It.ttl)}catch(It){if(A)return;lt(void 0),mt(It instanceof Error?It:new Error(String(It)))}finally{A||je(!1),j=!1}A||($=setTimeout(ue,Oe))}return ue(),()=>{A=!0,$&&clearTimeout($)}},[r,Ue,Me,ct]);let[rt,xt]=tt(!1),[Pe,Xe]=tt(!1),[Je,ot]=tt(),[$e,Tt]=tt(),[Wt,Be]=tt(!1),[it,et]=tt(!1),[_t,F]=tt(!1),ie=n?.waitForReceipt,Fe=sl(void 0);Dn(()=>{if(!Je||!g||!ie)return;let A=!1;return Be(!0),et(!1),F(!1),ie({chainId:g.chainId,hash:Je}).then($=>{A||(et(!0),F($.status==="reverted"),se(j=>j+1),$.status!=="reverted"&&Je!==Fe.current&&(Fe.current=Je,t.current.onDeposited?.(Je)))}).catch($=>{A||Tt($ instanceof Error?$.message:String($))}).finally(()=>{A||Be(!1)}),()=>{A=!0}},[Je,ie]);let gt=a!==void 0&&g!==void 0&&a!==g.chainId,ht=rt||Pe,Gt=w??$e,Pt="idle";Gt?Pt="error":it?Pt="confirmed":Wt?Pt="confirming":ht&&(Pt=rt?"switching":"pending");let Ht={phase:Pt,isSubmitting:ht,isConfirming:Wt,isConfirmed:it,needsSwitch:gt,txHash:Je,reverted:it&&_t,error:Gt},on=!!(g&&ge&&ge.originChainId===g.chainId&&ge.originCurrency.toLowerCase()===g.token.address.toLowerCase()),pr=!!(n?.sendTransaction&&n?.writeContract&&n?.readContract&&n?.waitForReceipt),an=!!(i&&pr&&g&&!S&&ge&&on&&I&&I>0n&&!Le&&!ht&&!Wt),br=ui(async()=>{if(S||!g||!ge||!n?.sendTransaction||!n?.writeContract)return;f(void 0);let A=ll(v,g.token.decimals);if(!A||A<=0n){f("enter an amount to use the one-click deposit");return}let $=g.token.address.toLowerCase()===oi,j=ge.depositAddress,ue=await _u(n?.readContract,of,{forwarder:ge.forwarder,recipient:Z,version:ge.version,trusted:t.current.trustedFactories});if(!ue.ok){f(`address verification failed: ${ue.reason}`);return}if(g.chainId===nf.chainId&&g.token.address.toLowerCase()===nf.token.toLowerCase()&&!Gu(j,ge.forwarder)){f("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(gt){if(!n?.switchChain)throw new Error("wallet cannot switch chains");xt(!0);try{await n.switchChain(g.chainId)}finally{xt(!1)}}R(),Xe(!0);try{let It=$?await n.sendTransaction({chainId:g.chainId,to:j,value:A}):await n.writeContract({chainId:g.chainId,address:g.token.address,abi:wy,functionName:"transfer",args:[j,A]});ot(It)}finally{Xe(!1)}}catch(It){f(It.message)}},[S,g,ge,v,gt,n,Z,R]);return{address:o,isConnected:i,catalog:m,catalogLoading:c,catalogError:b,origin:g,setOrigin:x,recipient:V,setRecipient:U,recipientValid:ce,amount:v,setAmount:E,balance:G,balanceLoading:ee,insufficientBalance:Le,isSvmOrigin:S,depositAddress:ge?.depositAddress,depositAddressResult:ge,depositAddressLoading:le,depositAddressError:Ke,quote:yt,quoteLoading:jt,quoteError:Dt,canDeposit:an,deposit:br,depositState:Ht}}import{useEffect as yy,useRef as xy,useState as Lo}from"react";var vy=3e4,ky=300;function Pn(e){let t=xy(e);t.current=e;let{client:r,enabled:n=!0}=e,o=e.refetchInterval??e.fallbackPollMs??vy,i=e.recipient&&He(e.recipient)?e.recipient:void 0,[a,s]=Lo([]),[l,c]=Lo(!1),[p,b]=Lo(),[h,d]=Lo(!1),[y,m]=Lo(),[g,u]=Lo(0);return yy(()=>{if(!i){s([]),b(void 0),c(!1),d(!1),m(void 0),u(0);return}if(!n){s([]),b(void 0),c(!1),d(!1),m(void 0),u(0);return}let w=!1,f=!0,R,x=0,S=0;async function M(){let D=++x;S+=1,f&&c(!0);try{let B=await r.listOrders(i);if(w)return;D===x&&(s(B),b(void 0))}catch(B){if(w)return;let I=B instanceof Error?B:new Error(String(B));D===x&&(b(I),t.current.onError?.(I))}finally{S-=1,!w&&D===x&&(c(!1),d(!0),m(i),u(B=>B+1)),f=!1}}function C(){R&&clearTimeout(R),R=setTimeout(()=>{R=void 0,w||M()},ky)}M();let v;typeof EventSource<"u"&&(v=new EventSource(r.ordersStreamUrl(i)),v.addEventListener("orders-changed",C),v.onopen=()=>{C()});let E=Number.isFinite(o)&&o>0?setInterval(()=>{S===0&&M()},o):void 0;return()=>{w=!0,R&&clearTimeout(R),E&&clearInterval(E),v?.close()}},[r,i,n,o]),{orders:a,ordersLoading:l,ordersError:p,ordersInitialized:h,ordersForRecipient:y,ordersRevision:g}}import{useMemo as Ry,useState as Sy}from"react";function lf(e,t){if(t){let r=e.find(n=>n.symbol===t);if(r)return r}return e.find(r=>r.isDefault)??e[0]}function cf({catalogTargets:e,filter:t,defaultTarget:r}){let n=Ry(()=>{if(!t||t.length===0)return e;let l=new Set(t);return e.filter(c=>l.has(c.symbol))},[e,t]),[o,i]=Sy(()=>lf(n,r)?.symbol),a=(o!==void 0?n.find(l=>l.symbol===o):void 0)??lf(n,r);function s(l){n.some(c=>c.symbol===l)&&i(l)}return{options:n,selected:a,setSelected:s}}var Cy={dev:"https://dev-relay-protocol-api.onechain.nexus",stage:"https://dev-relay-protocol-api.onechain.nexus",production:"https://relay-protocol-api.onechain.nexus"};function Bn(e){return e.apiBaseUrl?e.apiBaseUrl:Cy[qe(e.environment)]}import{jsx as Ey,jsxs as Ay}from"react/jsx-runtime";var df=1e3;function Ny(e,t,r,n,o){let i=e.requireWalletConnection??e.showRecipientInput===!1,a=r.walletAddress&&He(r.walletAddress)?r.walletAddress:void 0;return{client:e.client,apiBaseUrl:n,wallet:r,chains:e.chains,recipient:i?a??"":e.recipient,amount:i&&!a?"":e.amount,defaultToken:e.defaultToken,target:t,trustedFactories:o,onDepositAddress:e.onDepositAddress,onDeposited:e.onDeposited,onError:e.onError}}function Fa(e,t){let r=e.trim();if(!r)return 0n;try{let n=Sa(r,t);return n>0n?n:0n}catch{return 0n}}function Ty(e,t,r,n){if(t!==void 0&&e.forwarderVersion!==t)return!1;let o=e.target?.trim();return o?!!(r&&o.toLowerCase()===r.toLowerCase()):n}function pf(e,t,r){return`${e}:${t.toLowerCase()}:${r}`}function Iy(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function uf({open:e,children:t}){let[r]=xe.useState(Ru);return Ay(Zs.Provider,{value:r,children:[e&&Ey(My,{store:r}),t]})}function My({store:e}){let t=ni(),{showTargetSelector:r=!0}=t,n=t.requireWalletConnection??t.showRecipientInput===!1,o=!!(t.walletAddress&&He(t.walletAddress)),[i,a]=xe.useState(!1);xe.useEffect(()=>{Te("relay","opened")},[]);let[s,l]=xe.useState(void 0),c=xe.useMemo(()=>Bn({apiBaseUrl:t.apiBaseUrl,environment:t.environment}),[t.apiBaseUrl,t.environment]),p=xe.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]),b=qe(t.environment),h=Ur("apps.json",b,W=>({min:zr(W?.relay?.minDepositAmount,b),max:zr(W?.relay?.maxDepositAmount,b),trustedFactories:bi(W,b)})),d=xe.useMemo(()=>t.trustedFactories??Ea(h?.trustedFactories),[t.trustedFactories,h?.trustedFactories]),{isConnected:y,catalog:m,catalogLoading:g,catalogError:u,origin:w,setOrigin:f,amount:R,setAmount:x,recipient:S,setRecipient:M,recipientValid:C,balance:v,balanceLoading:E,insufficientBalance:D,depositAddress:B,depositAddressResult:I,depositAddressLoading:K,depositAddressError:L,quote:P,quoteLoading:ne,quoteError:V,canDeposit:U,deposit:ce,depositState:Z}=sf(Ny(t,s,p,c,d)),{options:G,selected:z,setSelected:ee}=cf({catalogTargets:m?.targets??[],filter:t.targetTokens,defaultTarget:t.defaultTarget});xe.useEffect(()=>{l(z?.symbol)},[z?.symbol]);let J=t.amount===void 0&&!t.hideAmount,pe=!n&&(t.showRecipientInput??!0)&&t.recipient===void 0,se=C&&S.trim().length>0&&He(S),te=!n&&t.recipient!==void 0&&t.recipient.trim().length>0,be=n?!o||!se:!y&&!te&&!se,Le=!!m&&!se&&!be,ge=(t.showRecovery??!1)&&o&&!!(p.writeContract&&p.readContract&&p.waitForReceipt),De=xe.useMemo(()=>t.client?t.client:Lt({baseUrl:c}),[t.client,c]),[le,_e]=xe.useState({}),[Ke,Se]=xe.useState(0),Ue=xe.useCallback(()=>Se(W=>W+1),[]),Me=Z.isConfirmed,Ze=se&&(!!I||i),{orders:Nt,ordersError:st,ordersInitialized:yt,ordersForRecipient:lt}=Pn({client:De,recipient:Ze?S:void 0,enabled:Ze,refetchInterval:df}),jt=Nt,je=z??m?.targets.find(W=>W.isDefault),Dt=je?.symbol??m?.destination.symbol,mt=je?.isDefault??!0,ct=I?.version,rt=xe.useMemo(()=>Nt.filter(W=>Ty(W,ct,Dt,mt)),[Nt,ct,Dt,mt]),xt=xe.useRef(void 0),[Pe,Xe]=xe.useState(),[Je,ot]=xe.useState(),$e=`${S.toLowerCase()}:${Dt?.toLowerCase()??""}:${ct??""}`;xe.useEffect(()=>{let W=lt?.toLowerCase()===S.toLowerCase();if(!Ze||!yt||!W||st){Ze||(xt.current=void 0,Xe(void 0),ot(void 0));return}let Ve=new Set(rt.map(ke=>ke.orderId)),nr=new Set(rt.flatMap(ke=>(ke.deposits??[]).map(wr=>pf(ke.orderId,wr.txHash,wr.blockNumber)))),Mt=xt.current;if(!Mt||Mt.key!==$e){xt.current={key:$e,orderIds:Ve,depositKeys:nr,statuses:new Map(rt.map(ke=>[ke.orderId,ke.status]))},Xe(void 0),ot(void 0);return}let Br,Qt=0n,Fr=!1;for(let ke of rt)for(let wr of ke.deposits??[]){let ro=pf(ke.orderId,wr.txHash,wr.blockNumber);if(!Mt.depositKeys.has(ro)){Br??(Br=ke);try{Qt+=BigInt(wr.amount),Fr=!0}catch{}}}Br??(Br=rt.find(ke=>!Mt.orderIds.has(ke.orderId))),Br??(Br=rt.find(ke=>Mt.statuses.get(ke.orderId)!==ke.status));for(let ke of Ve)Mt.orderIds.add(ke);for(let ke of nr)Mt.depositKeys.add(ke);for(let ke of rt)Mt.statuses.set(ke.orderId,ke.status);Br&&(Xe(Br.orderId),Fr&&ot(Qt))},[$e,rt,lt,Ze,S,st,yt]),xe.useEffect(()=>{let W=m?.targets??[];if(!ge||!se||W.length===0){_e({});return}let Ve=!1;return Promise.all(W.map(nr=>De.getRecovery({user:S,target:nr.symbol}).catch(()=>{}))).then(nr=>{if(Ve)return;let Mt={};W.forEach((Br,Qt)=>{let Fr=nr[Qt];Fr&&(Mt[Br.symbol]=Fr)}),_e(Mt)}),()=>{Ve=!0}},[De,ge,se,S,m,Me,Ke]);let Tt=xe.useMemo(()=>(m?.targets??[]).map(W=>({symbol:W.symbol,isDefault:W.isDefault,info:le[W.symbol]})).filter(W=>W.info!==void 0),[m,le]),Wt=xe.useMemo(()=>Aa(To(Tt)),[Tt]),[Be,it]=xe.useState(void 0),[et,_t]=xe.useState(),F=!!m&&(m?.targets.length??0)>0&&!s;xe.useEffect(()=>{if(!se||!w||!I||F){it(void 0),_t(void 0);return}let W=!1,Ve=!1,nr=I.forwarder.toLowerCase();it(void 0),_t(void 0);async function Mt(){if(!(W||Ve)){Ve=!0;try{let Qt=await De.getRecovery({user:S,target:s||void 0});if(W)return;if(Qt?.forwarder&&Qt.forwarder.toLowerCase()!==nr){it(void 0),_t(void 0);return}if(_t(Qt),!Qt||Qt.suggestedAction!=="sweep"){it(void 0);return}let Fr;try{Fr=BigInt(Qt.balance)}catch{it(void 0);return}let ke=Number(Qt.decimals);if(Fr<=0n||!Number.isInteger(ke)||ke<0){it(void 0);return}let wr=Qt.tokens?.find(ro=>ro.address?.toLowerCase()===Qt.token?.toLowerCase()&&ro.symbol)?.symbol;it({balance:Fr,decimals:ke,symbol:wr})}catch{}finally{Ve=!1}}}Mt();let Br=setInterval(()=>{Mt()},df);return()=>{W=!0,clearInterval(Br)}},[De,se,S,s,F,w,I,Me]);let ie=xe.useCallback(()=>{!w||!v||x(At(v.value,w.token.decimals))},[w,v,x]),Fe=xe.useRef(!1),gt=!!B;xe.useEffect(()=>{!gt||Fe.current||(Fe.current=!0,Te("relay","deposit_address_shown"))},[gt]);let ht=Z.txHash;xe.useEffect(()=>{ht&&Te("relay","deposit_submitted")},[ht]);let Gt=(()=>{let W=Number(h?.min);return Number.isFinite(W)&&W>=0?String(h?.min):"6"})(),Pt=(()=>{let W=Number(h?.max);return Number.isFinite(W)&&W>0?String(h?.max):void 0})(),Ht=(()=>{if(!w)return 0n;let W=Fa(Gt,w.token.decimals),Ve=BigInt(w.minAmount);return W>Ve?W:Ve})(),on=w?At(Ht,w.token.decimals):Gt,pr=(()=>{if(!w||!Be||Ht<=0n)return;let W=w.token.decimals,Ve=Be.decimals,nr=W>=Ve?Be.balance*10n**BigInt(W-Ve):Be.balance/10n**BigInt(Ve-W);if(nr>=Ht)return;let Mt=Ht-nr;return{pending:At(Be.balance,Ve),pendingSymbol:Be.symbol,remaining:At(Mt,W)}})(),an=m?.origins.find(W=>W.chainId===56&&!!(et?.token&&W.token.address.toLowerCase()===et.token.toLowerCase()))??m?.origins.find(W=>W.chainId===56&&W.token.symbol.toUpperCase()==="USDT"),br=Number.isInteger(et?.decimals)&&(et?.decimals??-1)>=0?et.decimals:an?.token.decimals,A=et?.tokens?.find(W=>W.address?.toLowerCase()===et.token?.toLowerCase()&&W.symbol)?.symbol??an?.token.symbol,$=Je!==void 0&&br!==void 0?At(Je,br):void 0,j=(()=>{if(!w||br===void 0)return;let W=w.token.decimals;if(br>=W)return Ht*10n**BigInt(br-W);let Ve=10n**BigInt(W-br);return(Ht+Ve-1n)/Ve})(),ue=Pe?rt.find(W=>W.orderId===Pe):void 0,Oe=ue??rt.find(W=>W.status==="BSC_FUNDED"||W.status==="BRIDGE_INITIATED"||W.status==="BRIDGE_PENDING"),It=(()=>{if(!Oe||j===void 0)return!1;try{return BigInt(Oe.amountIn)>=j}catch{return!1}})(),hn=(()=>{if(!et||j===void 0)return!1;try{return BigInt(et.balance)>0n&&BigInt(et.balance)>=j}catch{return!1}})(),mi=(()=>{let W={amount:$,symbol:A,backendStatus:Oe?.status};return!I||!Ze||!yt?{phase:"connecting",...W}:lt?.toLowerCase()!==S.toLowerCase()||st?{phase:"unavailable",...W}:ue?.status==="COMPLETED"?{phase:"completed",...W,backendStatus:ue.status}:ue&&Iy(ue.status)?{phase:"failed",...W,backendStatus:ue.status}:Oe?.status==="BRIDGE_INITIATED"||Oe?.status==="BRIDGE_PENDING"?{phase:"processing",...W}:Oe?.status==="BSC_FUNDED"&&It||hn?{phase:"funded",...W}:ue?{phase:"detected",...W,backendStatus:ue.status}:{phase:"waiting",...W}})(),$n=w&&Pt?Fa(Pt,w.token.decimals):void 0,bt=w&&R.trim()?Fa(R,w.token.decimals):0n,Ha=!!(w&&bt>0n&&bt<Ht),Do=!!(w&&$n!==void 0&&bt>0n&&bt>$n),eo=(()=>{if(w){if(Ha)return`Amount is below the ${on} ${w.token.symbol} minimum.`;if(Do)return`Amount is above the ${Pt} ${w.token.symbol} maximum.`}})(),to=t.showOneClickDeposit??!1,Qa=w&&R.trim()?Fa(R,w.token.decimals).toString():void 0,Va={recoveryOpen:i,setRecoveryOpen:a,resolvedApiBaseUrl:c,wallet:p,catalog:m,catalogLoading:g,catalogError:u,origin:w,setOrigin:f,amount:R,setAmount:x,recipient:S,setRecipient:M,recipientValid:C,balance:v,balanceLoading:E,insufficientBalance:D,depositAddress:B,depositAddressLoading:K,depositAddressError:L,arrivalStatus:mi,quote:P,quoteLoading:ne,quoteError:V,canDeposit:U,deposit:ce,depositState:Z,targetOptions:G,selectedTarget:z,setSelectedTarget:ee,showAmountInput:J,minNotice:w?{min:on,symbol:w.token.symbol,...pr}:void 0,showRecipientInput:pe,showTargetSelector:r,showOneClick:to,showConnectPrompt:be,showRecipientHint:Le,canRecover:ge,recoverableCount:Wt,recoveryTargets:Tt,recoveryOrders:jt,refreshRecovery:Ue,trustedFactories:d,amountHint:eo,amountSmallestUnits:Qa,onMax:J&&v&&v.value>0n?ie:void 0};return xe.useLayoutEffect(()=>{e.publish(Va)}),xe.useLayoutEffect(()=>()=>e.publish(null),[e]),null}import{jsx as cl}from"react/jsx-runtime";function Ly(e){let{theme:t="dark",mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:i,drawerMinWidth:a,style:s,open:l,onOpenChange:c,children:p}=e,[b,h]=Oa.useState(!1),d=l!==void 0,y=d?l:b,m=Oa.useCallback(g=>{d||h(g),c?.(g)},[d,c]);return cl(Ks.Provider,{value:e,children:cl(uf,{open:y,children:cl(Mo,{theme:t,mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:i,drawerMinWidth:a,style:s,open:y,onOpenChange:m,children:p})})})}var ff=Object.assign(Ly,{Trigger:tf,Content:ef});import{createContext as Dy,useContext as Py}from"react";var dl=Dy(null);function pl(){let e=Py(dl);if(!e)throw new Error("RelayHistory compound components must be used within <RelayHistory>");return e}import*as hr from"react";import{useState as By}from"react";import{Fragment as gf,jsx as ze,jsxs as Ct}from"react/jsx-runtime";var fi=56;function hf(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function Fy(e){let t=e.trim().toUpperCase(),n={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(n)return n;let o=t.toLowerCase().replace(/_/g," ").trim();return o?`${o[0].toUpperCase()}${o.slice(1)}`:"Processing"}function Oy(e){return e==="COMPLETED"?"rd-status-pill rd-status-pill-success":hf(e)?"rd-status-pill rd-status-pill-failure":"rd-status-pill"}function za(e,t){if(e){if(t===void 0)return e;try{return At(BigInt(e),t)}catch{return e}}}function Ua(e,t=6){let r=e.indexOf(".");if(r<0)return e;let n=e.slice(0,r+1+t).replace(/0+$/,"").replace(/\.$/,"");return n===""?"0":n}function zy(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function mf(e){return e.length>14?`${e.slice(0,8)}...${e.slice(-4)}`:e}function Uy(e){let t=(e.deposits??[]).filter(n=>n.originChainId),r=new Set(t.map(n=>`${n.originChainId}:${(n.originCurrency??"").toLowerCase()}`));if(t.length>0){let n=t[0];return{chainId:n.originChainId,currency:n.originCurrency??"",routes:r.size}}return{chainId:e.originChainId,currency:e.originCurrency,routes:1}}function jy(e,t){if(!e)return;let r,n;try{r=BigInt(e),n=t.map(s=>BigInt(s.amount))}catch{return}let o=n.reduce((s,l)=>s+l,0n);if(o<=0n)return;let i=n.map(s=>r*s/o),a=i.reduce((s,l)=>s+l,0n);return i[i.length-1]+=r-a,i}function ja({label:e,chainId:t,txHash:r,amount:n,shared:o,missingLabel:i="Pending"}){let a=r?Ia(t,r):void 0;return Ct("div",{className:"rd-history-step",children:[ze("span",{className:`rd-history-step-dot${r?" rd-history-step-dot-done":""}`}),ze("span",{className:"rd-history-step-label",children:e}),ze("span",{className:"rd-history-step-chain",children:Co(t)}),n&&ze("span",{className:"rd-history-step-amount",children:n}),Ct("span",{className:"rd-history-step-tx",children:[a?ze("a",{href:a.url,target:"_blank",rel:"noreferrer",title:r,"aria-label":`${e} transaction on ${Co(t)}`,children:mf(r)}):r?ze("span",{title:r,children:mf(r)}):ze("span",{className:"rd-muted",children:i}),o&&r&&ze("span",{className:"rd-history-step-shared",title:"Shared by deposits processed together",children:"combined transfer"})]})]})}function Wy(e){let t=e.deposits??[],r=e.amountOut||e.expectedOut||void 0;if(t.length>=2){let a=jy(r,t);if(a)return t.map((s,l)=>({key:`${e.orderId}:${s.txHash}:${s.blockNumber}`,order:e,chainId:s.originChainId??fi,currency:s.originCurrency??"",routes:1,sentRaw:s.amount,receivedRaw:a[l].toString(),receivedIsEstimate:!0,deposit:s,sharedLegs:!0}))}let{chainId:n,currency:o,routes:i}=Uy(e);return[{key:e.orderId,order:e,chainId:n,currency:o,routes:i,sentRaw:e.amountIn,receivedRaw:r,receivedIsEstimate:!e.amountOut&&!!e.expectedOut,sharedLegs:!1}]}function bf({orders:e,isLoading:t,error:r,catalog:n,showTitle:o=!0}){let[i,a]=By({}),s=l=>a(c=>({...c,[l]:!c[l]}));return Ct("section",{className:o?"rd-card":"rd-stack","data-rd-orders-list":"",children:[o&&ze("div",{className:"rd-card-header",children:ze("h2",{className:"rd-card-title",children:"Transfer history"})}),t&&e.length===0&&Ct("p",{className:"rd-muted",role:"status","aria-live":"polite",children:[ze("span",{className:"rd-spinner"})," Loading orders..."]}),r&&Ct("div",{className:"rd-callout rd-callout-danger",children:["Couldn't load your orders: ",r.message]}),!t&&!r&&e.length===0&&ze("p",{className:"rd-muted",children:"No transfers yet."}),e.length>0&&ze("div",{className:"rd-history-table","data-vaul-no-drag":!0,children:e.flatMap(Wy).map(l=>{let{order:c}=l,p=n?.origins.find(v=>v.chainId===l.chainId&&v.token.address.toLowerCase()===l.currency.toLowerCase()),b=(c.target?n?.targets.find(v=>v.symbol.toLowerCase()===c.target.toLowerCase()):void 0)??n?.targets.find(v=>v.isDefault),h=b?.symbol??n?.destination.symbol??"",d=b?.decimals??n?.destination.decimals,y=n?.origins.find(v=>v.chainId===fi),m=za(l.sentRaw,y?.token.decimals),g=y?.token.symbol??"USDT",u=za(l.receivedRaw,d),w=c.deposits??[],f=!!i[l.key],R=zy(c.completedAt??c.createdAt),x=Fy(c.status),M=c.status==="COMPLETED"||hf(c.status)?"Details unavailable":"Pending",C=l.receivedIsEstimate?"Estimated on ONEchain":"Received on ONEchain";return Ct("div",{className:"rd-history-group",children:[Ct("button",{type:"button",className:"rd-history-row-button",onClick:()=>s(l.key),"aria-expanded":f,"aria-label":`Toggle transfer details: ${x}, ${R}`,children:[Ct("span",{className:"rd-history-card-top",children:[ze("span",{className:"rd-history-asset",children:l.routes>1?Ct(gf,{children:["Multiple deposits ",Ct("span",{className:"rd-muted",children:["\xB7 ",l.routes," chains"]})]}):Ct(gf,{children:[p?.token.symbol??h," ",Ct("span",{className:"rd-muted",children:["from ",Co(l.chainId)]})]})}),ze("span",{className:Oy(c.status),title:c.status,children:x})]}),Ct("span",{className:"rd-history-card-amounts",children:[Ct("span",{className:"rd-history-amount-block",children:[ze("span",{className:"rd-history-amount-label",children:"Processing address"}),ze("span",{className:"rd-history-num",title:m,children:m?`${Ua(m)} ${g}`:"-"})]}),ze("span",{className:"rd-history-card-arrow","aria-hidden":"true",children:"\u2192"}),Ct("span",{className:"rd-history-amount-block",children:[ze("span",{className:"rd-history-amount-label",children:C}),ze("span",{className:`rd-history-num rd-history-received${l.receivedIsEstimate?" rd-history-received-estimate":""}`,title:u,children:u?`${Ua(u)} ${h}`.trimEnd():"-"})]})]}),Ct("span",{className:"rd-history-card-foot",children:[Ct("span",{className:"rd-history-date",children:[c.completedAt?"Completed":"Started"," \xB7 ",R]}),ze("span",{className:"rd-history-chevron","aria-hidden":"true",children:f?"\u2303":"\u2304"})]})]}),f&&Ct("div",{className:"rd-history-detail",children:[l.deposit?ze(ja,{label:"Deposit confirmed",chainId:l.deposit.originChainId??fi,txHash:l.deposit.originTxHash||l.deposit.txHash,amount:(()=>{let v=za(l.deposit.amount,y?.token.decimals);return v?Ua(v):void 0})()}):w.length>0?w.map(v=>ze(ja,{label:"Deposit confirmed",chainId:v.originChainId??fi,txHash:v.originTxHash||v.txHash,amount:(()=>{let E=za(v.amount,y?.token.decimals);return E?Ua(E):void 0})()},`${v.txHash}-${v.blockNumber}`)):Ct("div",{className:"rd-history-step",children:[ze("span",{className:"rd-history-step-dot"}),ze("span",{className:"rd-history-step-label",children:"Deposit confirmed"}),ze("span",{className:"rd-muted",children:"Details unavailable"})]}),ze(ja,{label:"Bridge",chainId:fi,txHash:c.bscBridgeTx,shared:l.sharedLegs,missingLabel:M}),ze(ja,{label:"ONEchain delivery",chainId:n?.destination.chainId??612055,txHash:c.deliveryTxHash,shared:l.sharedLegs,missingLabel:M})]})]},l.key)})})]})}import{jsx as Xn}from"react/jsx-runtime";function wf({className:e}){let t=pl(),{open:r}=Qr();return hr.useEffect(()=>{r&&Te("relay","history_opened")},[r]),Xn(fe,{feature:"relay",children:Xn(Ao,{ariaTitle:"Transfer history",className:e??t.className,children:Xn(_y,{})})})}function _y(){let e=pl(),{theme:t}=Qr(),r=hr.useMemo(()=>{if(e.client)return e.client;let g=Bn({apiBaseUrl:e.apiBaseUrl,environment:e.environment});return Lt({baseUrl:g})},[e.client,e.apiBaseUrl,e.environment]),n=e.recipient??e.walletAddress,o=!!(n&&He(n)),[i,a]=hr.useState(),[s,l]=hr.useState(!1),[c,p]=hr.useState(),b=hr.useRef(e.onError);b.current=e.onError,hr.useEffect(()=>{if(!o){a(void 0),l(!1),p(void 0);return}let g=!1;return a(void 0),l(!0),p(void 0),r.getConfig().then(u=>{g||a(u)}).catch(u=>{if(g)return;let w=u instanceof Error?u:new Error(String(u));p(w),b.current?.(w)}).finally(()=>{g||l(!1)}),()=>{g=!0}},[r,o]);let{orders:h,ordersLoading:d,ordersError:y}=Pn({client:r,recipient:o?n:void 0,enabled:!!i,onError:e.onError}),m=hr.useCallback(g=>{if(!e.onOutlink)return;let w=g.target.closest?.('a[target="_blank"]');w?.href&&e.onOutlink(w.href)},[e.onOutlink]);return Xn("div",{className:"rd-root rd-wizard","data-theme":t,children:o?Xn("div",{onClick:m,children:Xn(bf,{orders:h,isLoading:s||d,error:c??y,catalog:i,showTitle:!1})}):Xn("p",{className:"rd-muted","data-testid":"rd-history-empty-state",children:"Connect a wallet or provide an address to see transfer history."})})}import{jsx as ul}from"react/jsx-runtime";function yf({asChild:e,children:t}){return ul(fe,{feature:"relay",children:ul(Eo,{asChild:e??t!=null,children:t??ul("button",{type:"button","data-track":"open",children:"History"})})})}import{jsx as xf}from"react/jsx-runtime";function Gy(e){let{theme:t="dark",mobileBreakpoint:r,drawerDirection:n,dialogWidth:o="min(640px, calc(100vw - 32px))",drawerMaxWidth:i,drawerMinWidth:a,style:s,open:l,onOpenChange:c,children:p}=e;return xf(dl.Provider,{value:e,children:xf(Mo,{theme:t,mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:i,drawerMinWidth:a,style:s,open:l,onOpenChange:c,children:p})})}var vf=Object.assign(Gy,{Trigger:yf,Content:wf});import*as Lr from"react";import*as Wa from"react";function kf({client:e,recipient:t,refreshKey:r=0}){let[n,o]=Wa.useState(0),i=t&&He(t)?t:void 0;return Wa.useEffect(()=>{if(!i){o(0);return}let a=!1;return(async()=>{try{let l=(await e.getConfig()).targets,c=l.length===0?[e.getRecovery({user:i})]:l.map(h=>e.getRecovery({user:i,target:h.symbol})),p=await Promise.all(c.map(h=>h.catch(()=>{})));if(a)return;let b=l.length===0?p[0]?[{symbol:"",isDefault:!0,info:p[0]}]:[]:l.flatMap((h,d)=>p[d]?[{symbol:h.symbol,isDefault:h.isDefault,info:p[d]}]:[]);o(Aa(To(b)))}catch{a||o(0)}})(),()=>{a=!0}},[e,i,r]),n}import{createContext as Hy,useContext as Qy}from"react";var fl=Hy(null);function Rf(){let e=Qy(fl);if(!e)throw new Error("RelayRecovery compound components must be used within <RelayRecovery>");return e}function ml(){return Rf().props}function Sf(){return Rf().recoverableCount}import*as Xt from"react";import{jsx as Jn,jsxs as qy}from"react/jsx-runtime";var _a=[];function Cf({className:e}){let t=ml(),{open:r}=Qr();return Xt.useEffect(()=>{r&&Te("relay","recovery_opened")},[r]),Jn(fe,{feature:"relay",children:Jn(Ao,{ariaTitle:"Recover stuck funds",className:e??t.className,children:Jn(Vy,{})})})}function Vy(){let e=ml(),{theme:t}=Qr(),r=Xt.useMemo(()=>Bn({apiBaseUrl:e.apiBaseUrl,environment:e.environment}),[e.apiBaseUrl,e.environment]),n=Xt.useMemo(()=>e.client?e.client:Lt({baseUrl:r}),[e.client,r]),o=Xt.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]),i=e.walletAddress&&He(e.walletAddress)?e.walletAddress:void 0,a=!!(i&&(!e.recipient||He(e.recipient)&&e.recipient.toLowerCase()===i.toLowerCase())),s=a?i:void 0,l=qe(e.environment),c=Ur("apps.json",l,C=>bi(C,l)),p=Xt.useMemo(()=>e.trustedFactories??Ea(c),[e.trustedFactories,c]),b=!!(e.writeContract&&e.readContract&&e.waitForReceipt),h=!!s&&b,[d,y]=Xt.useState(_a),m=e.onError;Xt.useEffect(()=>{if(!h){y(_a);return}let C=!1;return n.getConfig().then(v=>{C||y(v.targets.length>0?v.targets:_a)}).catch(v=>{C||(y(_a),m?.(v instanceof Error?v:new Error(String(v))))}),()=>{C=!0}},[n,h,m]);let[g,u]=Xt.useState({}),[w,f]=Xt.useState(0),R=Xt.useCallback(()=>f(C=>C+1),[]),x=s;Xt.useEffect(()=>{if(!h||!x||d.length===0){u({});return}let C=!1;return Promise.all(d.map(v=>n.getRecovery({user:x,target:v.symbol}).catch(()=>{}))).then(v=>{if(C)return;let E={};d.forEach((D,B)=>{let I=v[B];I&&(E[D.symbol]=I)}),u(E)}),()=>{C=!0}},[n,h,x,d,w]);let S=Xt.useMemo(()=>d.map(C=>({symbol:C.symbol,isDefault:C.isDefault,info:g[C.symbol]})).filter(C=>C.info!==void 0),[d,g]),{orders:M}=Pn({client:n,recipient:h?x:void 0,enabled:h});return qy("div",{className:"rd-root rd-wizard","data-theme":t,children:[!i&&Jn("p",{className:"rd-muted","data-testid":"rd-recovery-connect-note",children:"Connect a wallet to check recoverable funds."}),i&&!a&&Jn("p",{className:"rd-muted","data-testid":"rd-recovery-recipient-note",children:"Recovery is only available for the connected wallet."}),a&&!b&&Jn("p",{className:"rd-muted","data-testid":"rd-recovery-unsupported-note",children:"This wallet can't sign recovery transactions."}),h&&Jn(Pa,{client:e.client,apiBaseUrl:r,recipient:s,wallet:o,trustedFactories:p,targets:S.length>0?S:void 0,orders:M,onRecovered:R,onRecoverySuccess:e.onRecoverySuccess,showTitle:!1,onError:e.onError})]})}import{jsx as gl}from"react/jsx-runtime";function Nf({asChild:e,children:t}){let r=Sf();return gl(fe,{feature:"relay",children:gl(Eo,{asChild:e??t!=null,dataAttributes:{"data-rd-recovery-count":r},children:t??gl("button",{type:"button","data-track":"open",children:"Recover"})})})}import{jsx as Tf}from"react/jsx-runtime";function Yy(e){let{theme:t="dark",mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:i,drawerMinWidth:a,style:s,open:l,onOpenChange:c,children:p}=e,[b,h]=Lr.useState(!1),d=l!==void 0,y=d?l:b,m=Lr.useCallback(C=>{d||h(C),c?.(C)},[d,c]),g=Lr.useMemo(()=>{if(e.client)return e.client;let C=Bn({apiBaseUrl:e.apiBaseUrl,environment:e.environment});return Lt({baseUrl:C})},[e.client,e.apiBaseUrl,e.environment]),[u,w]=Lr.useState(0),f=Lr.useRef(y);Lr.useEffect(()=>{f.current&&!y&&w(C=>C+1),f.current=y},[y]);let R=e.walletAddress&&He(e.walletAddress)?e.walletAddress:void 0,x=R&&(!e.recipient||He(e.recipient)&&e.recipient.toLowerCase()===R.toLowerCase())?R:void 0,S=kf({client:g,recipient:x,refreshKey:u}),M=Lr.useMemo(()=>({props:e,recoverableCount:S}),[e,S]);return Tf(fl.Provider,{value:M,children:Tf(Mo,{theme:t,mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:i,drawerMinWidth:a,style:s,open:y,onOpenChange:m,children:p})})}var If=Object.assign(Yy,{Trigger:Nf,Content:Cf});import{useCallback as Ky,useEffect as Zy,useMemo as Xy,useRef as Jy,useState as Ga}from"react";function Mf(e={}){let t=Jy(e);t.current=e;let r=Xy(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRelayConfig: either `client` or `apiBaseUrl` must be provided");return Lt({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.enabled??!0,o=e.refetchInterval,[i,a]=Ga(),[s,l]=Ga(!1),[c,p]=Ga(),[b,h]=Ga(0);Zy(()=>{if(!n){a(void 0),l(!1),p(void 0);return}let y=!1,m=!1;a(void 0),l(!0),p(void 0);async function g(){if(!(y||m)){m=!0;try{let w=await r.getConfig();if(y)return;a(w),p(void 0)}catch(w){if(y)return;let f=w instanceof Error?w:new Error(String(w));p(f),t.current.onError?.(f)}finally{m=!1,y||l(!1)}}}g();let u=typeof o=="number"&&Number.isFinite(o)&&o>0?setInterval(()=>{g()},o):void 0;return()=>{y=!0,u&&clearInterval(u)}},[r,n,b,o]);let d=Ky(()=>h(y=>y+1),[]);return{config:i,loading:s,error:c,refresh:d}}import{useQuery as $y}from"@tanstack/react-query";import{useCallback as Ef,useEffect as ex,useMemo as hl,useRef as Af}from"react";var tx=1,Lf=new WeakMap;function rx(e){let t=Lf.get(e);if(t!==void 0)return t;let r=tx++;return Lf.set(e,r),r}function Df(e={}){let t=Af(e);t.current=e;let r=hl(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRelayRecovery: either `client` or `apiBaseUrl` must be provided");return Lt({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.recipient,o=n&&He(n)?n:void 0,i=e.target,a=e.query,s=hl(()=>rx(r),[r]),l=hl(()=>["relay","recovery",s,o??null,i??null],[s,o,i]),c=$y({retry:!1,...a,queryKey:l,queryFn:async()=>{if(!o)throw new Error("useRelayRecovery: a valid EVM recipient is required");return r.getRecovery({user:o,target:i})},enabled:o?a?.enabled:!1}),p=Af(0);ex(()=>{let m=c.error,g=c.errorUpdatedAt;!m||g===p.current||(p.current=g,t.current.onError?.(m),m instanceof qr&&m.status===401&&t.current.onUnauthorized?.())},[c.error,c.errorUpdatedAt]);let b=Ef(()=>{c.refetch()},[c.refetch]),h=di({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:b}),d=c.data,y=Ef(async(m,g)=>{d&&await h.recover(d,m,g)},[h,d]);return{info:d,loading:c.isLoading,error:c.error??void 0,isFetching:c.isFetching,refresh:b,recover:y,recoveryState:h.stateFor(d?.forwarder)}}import{Fragment as sx,jsx as Dr,jsxs as Pr}from"react/jsx-runtime";var nx={bscBridge:"https://bscscan.com/tx/",crossFinalize:"https://scan.crosstoken.io/tx/",crossExecute:"https://scan.crosstoken.io/tx/"},ox={bscBridge:"Bridge tx (BSC)",crossFinalize:"Finalize tx (CROSS)",crossExecute:"Execute tx (CROSS)"};function ix(e){return e==="done"?"\u2713":e==="active"?"\u25CF":""}function Pf(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function ax(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 Bf({orderId:e,order:t,error:r}){let n=!t&&!r;return Pr("section",{className:"rd-card",children:[Pr("div",{className:"rd-card-header",children:[Dr("h2",{className:"rd-card-title",children:"4. Status"}),t&&Dr("span",{className:`rd-status-pill${t.status==="COMPLETED"?" rd-status-pill-success":Pf(t.status)?" rd-status-pill-failure":""}`,children:t.status})]}),Pr("p",{className:"rd-card-hint",children:["Order ",e]}),n&&Pr("p",{className:"rd-muted",children:[Dr("span",{className:"rd-spinner"})," Loading status..."]}),r&&Pr("div",{className:"rd-callout rd-callout-danger",children:["Couldn't load order status: ",r.message]}),t&&Pr(sx,{children:[Dr("ol",{className:"rd-stepper",children:t.steps.map((o,i)=>Pr("li",{className:ax(o.status),children:[Pr("div",{className:"rd-stepper-rail",children:[Dr("span",{className:"rd-stepper-dot",children:ix(o.status)}),i<t.steps.length-1&&Dr("span",{className:"rd-stepper-line"})]}),Pr("div",{className:"rd-stepper-body",children:[Dr("div",{className:"rd-stepper-label",children:o.label}),o.key==="bridge"&&t.txs.bscBridge&&Dr("div",{className:"rd-stepper-meta",children:Dr(bl,{orderTxs:t.txs,txKey:"bscBridge"})}),o.key==="deliver"&&(t.txs.crossFinalize||t.txs.crossExecute)&&Pr("div",{className:"rd-stepper-meta",children:[t.txs.crossFinalize&&Dr(bl,{orderTxs:t.txs,txKey:"crossFinalize"}),t.txs.crossExecute&&Dr(bl,{orderTxs:t.txs,txKey:"crossExecute"})]})]})]},o.key))}),Pf(t.status)&&Pr("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"&&Dr("div",{className:"rd-callout rd-callout-success",children:"crossd delivered. This order is complete."})]})]})}function bl({orderTxs:e,txKey:t}){let r=e[t];return r?Pr("a",{href:`${nx[t]}${r}`,target:"_blank",rel:"noreferrer",children:[ox[t],": ",r.slice(0,10),"..."]}):null}Ja({mode:"dapp-ui"});export{ka as APPLE_ICON,_l as AppLauncher,ec as AppLauncherContent,ql as AppLauncherTrigger,xa as BINANCE_ICON,ca as BridgeFlow,wi as CHAINS_CONFIG_FILE,Ti as CONNECTOR_REGISTRY,wa as CROSSX_ICON,yu as ConnectButton,as as ConnectorId,vu as DEFAULT_SKILLS_HREF,No as DEFAULT_TRUSTED_FACTORIES,ki as DappUiErrorBoundary,va as GOOGLE_ICON,ya as METAMASK_ICON,na as PORTFOLIO_SECTIONS,qr as RelayApiError,ff as RelayDeposit,vf as RelayHistory,If as RelayRecovery,Ys as SOCIAL_REGISTRY,_i as SendFlow,ku as SkillsButton,Bf as StatusTracker,ws as TOKEN_STATS_QUERY_KEY,bs as USER_BALANCE_QUERY_KEY,Vs as WALLET_REGISTRY,hu as WalletConnectModal,ko as WalletInfo,cp as WalletPortfolio,wo as WalletPortfolioBody,Ja as announceAppLauncherUsage,vi as captureDappUiException,Lt as createRelayClient,Jf as getChainDisplay,xi as getDappUiSentryScope,zo as initDappUiSentry,ur as normalizeFailureReason,qe as resolveEnvironment,io as setDappUiAnalyticsUser,Ri as trackDappUiEvent,Te as trackDappUiFunnel,Fo as useChainDisplay,$f as useChainsConfig,Ci as useGlobalMenu,Mf as useRelayConfig,Pn as useRelayOrders,Df as useRelayRecovery,vn as useTokenBalance,kn as useTokenStats,ga as useWalletDetect};
|
|
1
|
+
function od(e){try{return import.meta.env?.[e]}catch{return}}function id(e){if(!(typeof process>"u"))return process.env?.[e]}function nt(e){if(e)return ad(e);let t=od("VITE_CROSSX_ENVIRONMENT")??od("NEXT_PUBLIC_CROSSX_ENVIRONMENT")??id("NEXT_PUBLIC_CROSSX_ENVIRONMENT")??id("CROSSX_ENVIRONMENT");return ad(t)}function ad(e){switch(e?.toLowerCase()){case"dev":case"development":return"dev";case"stage":case"staging":case"stg":return"stage";default:return"production"}}import*as on from"react";var Ym={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"},Km=3e3;function Vr(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 bs=new Map;function Yn(e,t){let r=`${Ym[t]}/${e}`,n=bs.get(r);return n||(n=(async()=>{let o=new AbortController,i=setTimeout(()=>o.abort(),Km);try{let a=await fetch(r,{cache:"no-store",signal:o.signal});return a.ok?await a.json():null}catch{return null}finally{clearTimeout(i)}})().then(o=>(o===null&&bs.delete(r),o)),bs.set(r,n)),n}function Zm(e){return typeof e=="string"&&e.startsWith("https://")}async function Re(e,t){let r=await Yn("endpoints.json",t),n=Vr(r?.apis?.[e],t);if(!Zm(n))throw new Error(`[remote-config] endpoints.json missing or invalid api base: ${e} (${t})`);return n}function Mi(e,t){let r=Vr(e?.relay?.forwarderFactories,t),n=[r?.standingForwarderFactory,r?.depositorForwarderFactory].filter(o=>typeof o=="string");return n.length>0?n:void 0}var Ai="chains.json";async function Xm(e,t){return(await Yn(Ai,t))?.chains?.[String(e)]??{}}function Vo(e,t){let[r,n]=on.useState({});return on.useEffect(()=>{if(e==null){n({});return}let o=!0;return Yn(Ai,t).then(i=>{o&&n(i?.chains?.[String(e)]??{})}),()=>{o=!1}},[e,t]),r}function Jm(e){let[t,r]=on.useState({});return on.useEffect(()=>{let n=!0;return Yn(Ai,e).then(o=>{n&&r(o?.chains??{})}),()=>{n=!1}},[e]),t}function sr(e,t,r){let[n,o]=on.useState(void 0),i=on.useRef(r);return i.current=r,on.useEffect(()=>{let a=!0;return Yn(e,t).then(s=>{if(!a)return;let l=i.current(s);l!==void 0&&o(l)}),()=>{a=!1}},[e,t]),n}var qo="1.3.12-beta.2";var Li="__nexusCrossAppLauncherRuntime";function $m(){if(typeof window>"u")return null;let e=window;return e[Li]??(e[Li]={mode:"dapp-ui"}),e[Li]}function eg(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 r=e.connectKitVersion??"unknown";console.info(`[CROSSx App Launcher] connect-kit-react v${r} \uCD08\uAE30\uD654 \uC644\uB8CC (dapp-ui v${qo}, \uC0AC\uC6A9 \uBAA8\uB4DC: connect-kit)`)}else console.info(`[CROSSx App Launcher] dapp-ui v${qo} \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 ws(e){let t=$m();t&&(e?.mode==="connect-kit-react"?t.mode="connect-kit-react":t.mode||(t.mode="dapp-ui"),e?.connectKitVersion&&(t.connectKitVersion=e.connectKitVersion),eg(t))}import{BrowserClient as tg,Scope as rg,defaultStackParser as ng,linkedErrorsIntegration as og,makeFetchTransport as ig}from"@sentry/react";var ag="https://5c82aeb32da33b5a0a14b7c5393992ca@o4511668907081728.ingest.de.sentry.io/4511705324126289",sg=`dapp-ui@${qo}`,mo=null,sd=.1;function ld(){return sd}function lg(e){switch(e){case"dev":return"dev";case"stage":return"stg";default:return"prod"}}function Yo(e){if(mo)return mo;if(typeof window>"u")return null;let t=lg(nt(e?.environment));typeof e?.analyticsSampleRate=="number"&&(sd=Math.min(1,Math.max(0,e.analyticsSampleRate)));let r=new tg({dsn:e?.dsn??ag,transport:ig,stackParser:ng,integrations:[og()],environment:t,release:sg,enabled:e?.enabled??t==="prod"}),n=new rg;return n.setClient(r),n.setTags({package:"dapp-ui",framework:"react",source:"dapp-ui"}),r.init(),mo=n,mo}function Di(){return mo}function Pi(e,t){let r=mo??Yo();if(r)return r.captureException(e,t?{captureContext:{extra:t}}:void 0)}import{Component as dg}from"react";var Oi=class extends dg{constructor(){super(...arguments);this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(r,n){Pi(r,{componentStack:n.componentStack??void 0,boundary:this.props.name??"dapp-ui"})}render(){return this.state.hasError?this.props.fallback??null:this.props.children}};function Ne(...e){return e.filter(Boolean).join(" ")}var cg=/CROSSx|ONE\s?wallet|ONE\s?pocket/i;function go(){return typeof window>"u"?!1:cg.test(window.navigator.userAgent)}var dd="__nexus_dapp_ui_uid",ys=null;function pg(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():Array.from({length:32},()=>Math.floor(Math.random()*16).toString(16)).join("")}function xs(){if(ys)return ys;let e=null;try{e=window.localStorage.getItem(dd)}catch{}if(!e||!e.startsWith("anon_")){e=`anon_${pg()}`;try{window.localStorage.setItem(dd,e)}catch{}}return ys=e,e}async function cd(e){if(typeof crypto>"u"||!crypto.subtle)return null;try{let t=new TextEncoder().encode(e.trim().toLowerCase()),r=await crypto.subtle.digest("SHA-256",t);return`wallet_${Array.from(new Uint8Array(r),o=>o.toString(16).padStart(2,"0")).join("").slice(0,16)}`}catch{return null}}function ug(){let e=window.navigator.userAgent;return/ipad|tablet|(android(?!.*mobile))/i.test(e)?"tablet":/mobile|iphone|ipod|android/i.test(e)?"mobile":"desktop"}function fd(){return{host:window.location.hostname,device_type:ug(),is_cross_inapp:String(go())}}var pd=!1;function vs(){if(typeof window>"u")return null;let e=Di()??Yo();return e?(pd||(pd=!0,e.setUser({id:xs()})),e):null}function md(){return Math.random()>=ld()}var ud=0;function ho(e){let t=vs();if(!t)return;let r=++ud;if(!e){t.setUser({id:xs()});return}cd(e).then(n=>{n&&r===ud&&t.setUser({id:n})})}function Bi(e,t,r){let n=vs();!n||md()||n.captureMessage(`ui: ${e}_${t}`,"info",{captureContext:{tags:{...fd(),feature:e,action:t,...r}}})}function _e(e,t,r){let n=vs();if(!n||md())return;let o=r?.status??"success";n.captureMessage(`funnel: ${e}_${t}`,"info",{captureContext:{tags:{...fd(),flow:e,funnel_step:`${e}_${t}`,funnel_status:o,...o==="failure"?{failure_reason:r?.reason??"unknown"}:{},...r?.tags}}})}function gr(e){let t=e,r=String((t&&typeof t=="object"&&"message"in t?t.message:e)??"").toLowerCase();return t?.code===4001||/reject|denied|declin|cancel/i.test(r)?"user-rejected":/insufficient (funds|gas|balance)|exceeds balance/i.test(r)?"insufficient-gas":/timeout|timed out|deadline/i.test(r)?"timeout":/revert|execution failed/i.test(r)?"contract-reverted":/network|fetch|connection|disconnected|offline/i.test(r)?"network":"unknown"}import{useCallback as fg}from"react";import{jsx as mg}from"react/jsx-runtime";function ge({feature:e,children:t}){let r=fg(n=>{let o=n.nativeEvent;if(o.__dappUiTracked)return;let a=n.target?.closest?.("[data-track]");if(!a)return;let s=a.getAttribute("data-track");if(!s)return;o.__dappUiTracked=!0;let l=a.getAttribute("data-track-id");Bi(e,s,l?{item_id:l}:void 0)},[e]);return mg("div",{style:{display:"contents"},onClick:r,children:t})}import*as wo from"react";import*as gd from"@radix-ui/react-popover";import{Drawer as yg}from"vaul";import{createContext as gg,useContext as hg}from"react";var ks=gg(null);function zi(){let e=hg(ks);if(!e)throw new Error("AppLauncher compound components must be used within <AppLauncher>");return e}import{useState as bg,useEffect as wg}from"react";function bo(e){let[t,r]=bg(!1);return wg(()=>{let n=window.matchMedia(e);r(n.matches);let o=i=>r(i.matches);return n.addEventListener("change",o),()=>n.removeEventListener("change",o)},[e]),t}function de(e,{insertAt:t}={}){if(!e||typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}de(`[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, #123235);--al-badge-text: var(--ds-accent-primary-default, #00ceb2);--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, #e7f9f8);--al-badge-text: var(--ds-accent-primary-default, #00b4b7);--al-drawer-overlay: var(--ds-overlay-dim, #00000080)}
|
|
2
|
+
`);de(`.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
|
+
`);de(`@keyframes al-fade-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
|
|
4
|
+
`);de(`.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
|
+
`);de("");import{jsx as Rs}from"react/jsx-runtime";function hd({env:e,theme:t="dark",mobileBreakpoint:r=768,domain:n,children:o}){let i=bo(`(max-width: ${r}px)`),[a,s]=wo.useState(!1),l=wo.useCallback(()=>s(!1),[]),d=nt(e),p=wo.useMemo(()=>({env:d,theme:t,isMobile:i,open:a,domain:n,close:l}),[d,t,i,a,n,l]);return Rs(ks.Provider,{value:p,children:i?Rs(yg.Root,{direction:"right",open:a,onOpenChange:s,noBodyStyles:!0,children:o},"drawer"):Rs(gd.Root,{open:a,onOpenChange:s,children:o},"popover")})}import*as xd from"@radix-ui/react-popover";import{Drawer as vg}from"vaul";import{jsx as hr,jsxs as xg}from"react/jsx-runtime";function bd({size:e=18}){return xg("svg",{className:"al-trigger-icon",width:e,height:e,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[hr("rect",{width:"4",height:"4",rx:"2",fill:"currentColor"}),hr("rect",{x:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),hr("rect",{x:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),hr("rect",{y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),hr("rect",{x:"7",y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),hr("rect",{x:"14",y:"7",width:"4",height:"4",rx:"2",fill:"currentColor"}),hr("rect",{y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),hr("rect",{x:"7",y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"}),hr("rect",{x:"14",y:"14",width:"4",height:"4",rx:"2",fill:"currentColor"})]})}function wd(){return hr("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:hr("path",{d:"M12 19L5 12M5 12L12 5M5 12H19",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function yd(){return hr("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:hr("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}import{jsx as yo}from"react/jsx-runtime";function vd({asChild:e,children:t,className:r,style:n}){let{isMobile:o,theme:i}=zi(),a=t!=null,s=e??!0,l=r?`al-trigger-btn ${r}`:"al-trigger-btn",d=a?t:yo("button",{type:"button",className:l,"data-theme":i,"data-track":"open",style:n,children:yo(bd,{size:18})});return o?yo(ge,{feature:"app_launcher",children:yo(vg.Trigger,{asChild:s,children:d})}):yo(ge,{feature:"app_launcher",children:yo(xd.Trigger,{asChild:s,children:d})})}import*as Kn from"react";import*as Ui from"@radix-ui/react-popover";import{Drawer as xo}from"vaul";import{useQuery as Sg}from"@tanstack/react-query";var kd={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 kg="https://stg-contents.crosstoken.io/frontend/common/app-launcher/icons",Rg="https://contents.crosstoken.io/frontend/common/app-launcher/icons";function qr(e,t){return`${e==="production"?Rg:kg}/${t}.png`}function Rd(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:qr(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:qr(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:qr(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:qr(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:qr(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:qr(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:qr(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:qr(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:qr(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:qr(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:qr(t,"wave"),order:11e4,type:"wave",badge:null,isNew:!1,serviceStatus:"available"}]}}function Fi(e){let t=nt(e);return Sg({queryKey:["global-menu",t],queryFn:async()=>{try{let r=await fetch(kd[t],{cache:"no-store"});if(!r.ok)throw new Error(`Failed to fetch global menu: ${r.status}`);return r.json()}catch{return Rd(t)}},staleTime:300*1e3,gcTime:600*1e3,retry:!1,refetchOnMount:!0})}function Ss(e){return e.serviceStatus==="ending"||e.serviceStatus==="comingSoon"?e.serviceStatus:"available"}function Cd(e,t){return typeof e=="string"?e:e[t]??e.production??e.stage??e.dev}function Nd(e){return[...e].sort((t,r)=>{let n=Sd(t)-Sd(r);return n!==0?n:t.order-r.order})}function Sd(e){let t=Ss(e);return t==="comingSoon"?0:t==="ending"?2:1}import{jsx as Lt,jsxs as vo}from"react/jsx-runtime";function Cg(e){return e.id==="cross-staking"||e.type==="cross-staking"}function Id({align:e="end",sideOffset:t=8,className:r}){let{env:n,theme:o,isMobile:i,domain:a,close:s}=zi(),{data:l}=Fi(n),d=Kn.useMemo(()=>Nd(l?.items??[]),[l?.items]),p=8,h=Kn.useRef(null),b=Kn.useCallback(c=>{h.current={x:c.clientX,y:c.clientY}},[]),m=typeof window<"u"?window.location.pathname:"",w=Kn.useCallback((c,y)=>{if(h.current){let k=c.clientX-h.current.x,R=c.clientY-h.current.y;if(h.current=null,Math.abs(k)>p||Math.abs(R)>p)return}let g=y.url[n]??y.url.production,v=Td(g,a);if(!v)try{let k=new URL(g).pathname;if(m===k||m.startsWith(k+"/")){s();return}}catch{}v?window.open(g,"_blank","noopener,noreferrer"):window.location.href=g,s()},[n,a,s,m]),f=c=>{let y=c.url[n]??c.url.production,g=Td(y,a),v=Ss(c),k=v==="ending",R=Cd(c.iconUrl,n),I=!1;if(!g)try{let C=new URL(y).pathname;I=m===C||m.startsWith(C+"/")}catch{I=!1}return Lt("button",{type:"button",className:"al-grid-item","data-track":"menu_item_click","data-track-id":c.id,"data-active":I||void 0,"data-service-status":v,onPointerDown:b,onClick:C=>w(C,c),children:vo("div",{className:"al-grid-item-left",children:[vo("div",{className:"al-grid-item-icon",children:[Lt("img",{src:R,alt:c.label,width:24,height:24,loading:"lazy"}),c.isNew&&Lt("span",{className:"al-status-ribbon al-status-ribbon-new",children:"N"})]}),vo("span",{className:"al-grid-item-text",children:[Lt("span",{className:"al-grid-item-label",children:c.label}),k&&Lt("span",{className:"al-grid-item-status-text",children:"(End Soon)"}),c.badge&&!Cg(c)&&Lt("span",{className:"al-badge al-badge-list",children:c.badge})]})]})},c.id)},u=Lt("div",{className:"al-menu","data-theme":o,children:Lt("div",{className:"al-grid",children:d.map(f)})});return i?Lt(ge,{feature:"app_launcher",children:vo(xo.Portal,{children:[Lt(xo.Overlay,{className:"al-drawer-overlay"}),vo(xo.Content,{className:Ne("al-drawer-content",r),"data-theme":o,children:[vo("div",{className:"al-drawer-header",children:[Lt(xo.Close,{className:"al-drawer-close","data-track":"close",children:Lt(wd,{})}),Lt(xo.Title,{className:"al-drawer-title",children:"CROSS Services"}),Lt(xo.Close,{className:"al-drawer-close","data-track":"close",children:Lt(yd,{})})]}),Lt("div",{className:"al-drawer-body",children:u})]})]})}):Lt(ge,{feature:"app_launcher",children:Lt(Ui.Portal,{children:Lt(Ui.Content,{align:e,sideOffset:t,className:Ne("al-popover-content",r),"data-theme":o,children:u})})})}function Td(e,t){try{let r=new URL(e).hostname;return typeof window>"u"?!0:r!==(t??window.location.hostname)}catch{return!1}}import*as Qt from"react";import*as Uu from"@radix-ui/react-popover";import{Drawer as jw}from"vaul";import{createContext as Ng,useContext as Tg}from"react";var Cs=Ng(null);function Cn(){let e=Tg(Cs);if(!e)throw new Error("WalletInfo compound components must be used within <WalletInfo>");return e}import{WALLET_LABELS as Ig}from"@nexus-cross/crossx-design-system";var Ns=(n=>(n.CROSSx="crossx",n.MetaMask="io.metamask",n.Binance="com.binance.wallet",n))(Ns||{}),ji={crossx:{name:Ig.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"}};import*as xc from"react";import{jsx as Fe,jsxs as Ko}from"react/jsx-runtime";function Ed({size:e=16,className:t}){return Ko("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Fe("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"}),Fe("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 Zn({size:e=16,className:t}){return Fe("svg",{width:e,height:e,viewBox:"4 4 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Fe("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 mn({size:e=16,className:t}){return Fe("svg",{width:e,height:e,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Fe("path",{d:"M11.6667 3.5L5.25 9.91667L2.33334 7",stroke:"currentColor",strokeWidth:1.16667,strokeLinecap:"round",strokeLinejoin:"round"})})}function Sr({size:e=24,className:t}){return Fe("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Fe("path",{d:"M18 6L6 18M6 6l12 12",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Md({size:e=20,className:t}){return Ko("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Fe("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"}),Fe("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 Wi({size:e=20,className:t}){return Fe("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,children:Fe("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 gn({size:e=20,className:t}){return Fe("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Fe("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor",strokeWidth:1.67,strokeLinecap:"round",strokeLinejoin:"round"})})}function Cr({size:e=20,className:t}){return Fe("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Fe("path",{d:"M5 8L10 13L15 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Ad({size:e=16,className:t}){return Ko("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Fe("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"}),Fe("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 Ld({size:e=16,className:t}){return Ko("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Fe("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"}),Fe("path",{d:"M1.667 1.667l16.666 16.666",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})]})}var Eg='<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>',Mg=`data:image/svg+xml,${encodeURIComponent(Eg)}`;function Dd({size:e=42,className:t}){return Fe("img",{src:Mg,width:e,height:e,alt:"",className:t,style:{display:"block"}})}function Pd({size:e=20,className:t}){return Fe("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Fe("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 Od({size:e=20,className:t}){return Fe("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Fe("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 Bd({size:e=20,className:t}){return Fe("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Fe("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 zd({size:e=20,className:t}){return Fe("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Fe("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 Fd({size:e=20,className:t}){return Ko("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[Fe("circle",{cx:"10",cy:"10",r:"10",fill:"currentColor"}),Fe("path",{d:"M6 10.2L8.6 12.8L14 7.2",stroke:"var(--ds-accent-primary-on, #ffffff)",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"})]})}import*as ae from"react";import Xn from"bignumber.js";function Ag(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 Nn(e,t){if(!e||e==="0")return"0.00";let r=new Xn(e).shiftedBy(-t),n=r.isGreaterThanOrEqualTo(1)?2:4;return r.toFormat(n,Xn.ROUND_DOWN)}function Xt(e){return e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`}function Jn(e){let t=typeof e=="string"?parseFloat(e):e;if(Number.isNaN(t)||t===0)return"$0.00";let r=t>=1?2:4,n=Math.pow(10,r);return`$${(Math.floor(t*n)/n).toLocaleString("en-US",{minimumFractionDigits:r,maximumFractionDigits:r})}`}function Gi(e,t,r){let o=new Xn(e).shiftedBy(-t).multipliedBy(new Xn(r));return o.isZero()||o.isNaN()?"$0.00":`$${(o.integerValue(Xn.ROUND_DOWN).isGreaterThanOrEqualTo(1)?o.decimalPlaces(2,Xn.ROUND_DOWN):o.decimalPlaces(4,Xn.ROUND_DOWN)).toFormat()}`}function Ud(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 r=t;if(r.includes("e")||r.includes("E")){let a=Number(r);if(!Number.isFinite(a)||a===0)return{displayValue:"0",isLowerBound:!1};r=Ag(a.toFixed(18))}let[n="0",o=""]=r.split(".");if(Number(n)>=1){let a=o.slice(0,2).padEnd(2,"0");return{displayValue:`${Number(n).toLocaleString("en-US")}.${a}`,isLowerBound:!1}}return o.length<4?{displayValue:`${n}.${o}`,isLowerBound:!1}:o.slice(0,4)==="0000"?{displayValue:"0.0001",isLowerBound:!0}:{displayValue:`0.${o.slice(0,4)}`,isLowerBound:!1}}import{useMemo as jd}from"react";import{useQuery as Lg}from"@tanstack/react-query";var xt={dev:{cross:612044,bsc:97},stage:{cross:612044,bsc:97},production:{cross:612055,bsc:56}},ko="https://terms.onechain.nexus/docs/terms-july-23-2026",_i="https://terms.onechain.nexus/docs/pp-july-23-2026";var Dg="send:chain-info";function Pg(e){if("data"in e&&e.data!==void 0){let t=e.data;if(Array.isArray(t)){let r=t[0];if(!r)throw new Error("Chain info payload is empty.");return r}return t}return e}function Ts(e,...t){let r=e.replace(/\/+$/,""),n=t.map(o=>o.replace(/^\/+|\/+$/g,"")).filter(Boolean);return[r,...n].join("/")}function Wd(e,t,r,n){if(n)return t===xt[e].cross?Gd(t,n):r?.explorer_url?Ts(r.explorer_url,r.explorer_postfix?.transaction??"tx",n):Og(e,t,n)}function Gd(e,t){return Ts("https://explorer.onechain.nexus",String(e),"tx",t)}function Og(e,t,r){let n=xt[e];if(t===n.cross)return Gd(t,r);if(t===n.bsc)return Ts(e==="production"?"https://bscscan.com":"https://testnet.bscscan.com","tx",r)}function Zo(e,t,r,n=!0){let o=Lg({queryKey:[Dg,e,t],queryFn:async({signal:s})=>{let l=await Re("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 Pg(p)},enabled:n,staleTime:3e5}),i=o.data;return{transactionUrl:jd(()=>Wd(e,t,i,r),[t,i,e,r]),chainInfo:i,...o}}function _d(e,t,r=!0){let{chainInfo:n}=Zo(e,t,void 0,r);return{buildTxUrl:jd(()=>i=>Wd(e,t,n,i),[e,t,n]),chainInfo:n}}var Hd="0x0000000000000000000000000000000000000001";var Bg="0xa9059cbb",zg=/^0x[a-fA-F0-9]{40}$/,Fg="nexus-cross:dapp-ui:send:recent:",Qd=10;function Ug(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===48;)t--;return e.slice(0,t)}function Xo(e){return e.toLowerCase()}function an(e){return zg.test(e)}function Tn(e){return Xo(e.address)===Hd}function Is(e){return`${Fg}${e.toLowerCase()}`}function Ro(e){if(typeof window>"u")return[];try{let t=window.localStorage.getItem(Is(e));if(!t)return[];let r=JSON.parse(t);return Array.isArray(r)?r.filter(n=>n!==null&&typeof n=="object"&&an(n.address)&&typeof n.updatedAt=="number").slice(0,Qd):[]}catch{return[]}}function Es(e,t){if(typeof window>"u")return[];let r=Xo(t),n=[{address:r,updatedAt:Date.now()},...Ro(e).filter(o=>o.address!==r)].slice(0,Qd);try{window.localStorage.setItem(Is(e),JSON.stringify(n))}catch{return Ro(e)}return n}function Ms(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(Is(e))}catch{}}function $n(e,t){let r=e.trim();if(!r)return{error:"Enter an amount."};if(!/^\d+(\.\d*)?$/.test(r))return{error:"Enter a valid amount."};let[n="0",o=""]=r.split(".");if(o.length>t)return{error:`Max ${t} decimal places.`};let i=BigInt(n||"0"),a=o.padEnd(t,"0"),s=a?BigInt(a):0n,l=10n**BigInt(t),d=i*l+s;return d<=0n?{error:"Amount must be greater than 0."}:{value:d}}function So(e,t){let r=BigInt(e||"0"),n=10n**BigInt(t),o=r/n,i=r%n;if(i===0n)return o.toString();let a=Ug(i.toString().padStart(t,"0"));return`${o.toString()}.${a}`}function As(e,t){let r=e.replace(/^0x/,"").toLowerCase().padStart(64,"0"),n=t.toString(16).padStart(64,"0");return`${Bg}${r}${n}`}function Hi(e,t,r=10){if(t<=0)return e.toString();let n=10n**BigInt(t),o=e/n,i=e%n;if(i===0n)return o.toString();let s=i.toString().padStart(t,"0").slice(0,Math.max(0,Math.min(r,t)));return s=s.replace(/0+$/,""),s?`${o.toString()}.${s}`:o.toString()}function Ls(e,t){return Hi(e,t,6)}function Vd(e){return Hi(e,9,2)}function qd(e){return e.toLocaleString("en-US")}function Qi(e){return e===56||e===97}function Vi(e){return e.gasPrice??e.maxFeePerGas}function Yd(e,t=!1){return t?Vi(e)!==void 0?"legacy":null:e.maxFeePerGas!==void 0?"dynamic":e.gasPrice!==void 0?"legacy":null}function qi(e,t=!1){if(t){let r=Vi(e);return r!==void 0?e.gasLimit*r:null}return e.maxFeePerGas!==void 0?e.gasLimit*e.maxFeePerGas:e.gasPrice!==void 0?e.gasLimit*e.gasPrice:null}function Yi(e){return!Number.isFinite(e)||e<=0?"$0.00":`$${e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`}function Kd(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 r=e,n=[];return typeof r.name=="string"&&n.push(r.name),typeof r.shortMessage=="string"&&n.push(r.shortMessage),typeof r.message=="string"&&n.push(r.message),typeof r.details=="string"&&n.push(r.details),r.cause!==void 0&&n.push(Kd(r.cause,t+1)),n.join(`
|
|
6
|
+
`).toLowerCase()}function jg(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 Ds(e,t={},r="Failed to send transaction."){let n=Kd(e);if(!n)return r;let o=t.nativeSymbol?.trim()||"gas token",i=t.networkName?.trim();if(n.includes("user rejected")||n.includes("userrejected")||n.includes("user denied")||n.includes("user cancelled")||n.includes("user canceled")||n.includes("action_rejected")||n.includes("rejected by user"))return"Transaction was cancelled.";if(n.includes("insufficientfunds")||n.includes("insufficient funds")||n.includes("exceeds the balance of the account")||n.includes("insufficient balance for transfer")){let a=i?` on ${i}`:"";return`Not enough ${o} to cover the gas fee.Please top up your ${o} balance and try again.`}return n.includes("transaction underpriced")||n.includes("replacement transaction underpriced")||n.includes("fee too low")?"Gas fee was too low for the network. Please try again.":n.includes("nonce too low")||n.includes("nonce has already been used")||n.includes("nonce too high")?"Pending transactions are out of order. Refresh the page and try again.":n.includes("execution reverted")||n.includes("contractfunctionrevertederror")||n.includes("contractfunctionexecutionerror")?"The transaction was rejected by the contract. The recipient or token may be invalid.":n.match(/chain \d+ is not configured/)?"This network is not registered in the app. Contact support.":n.includes("http request failed")||n.includes("failed to fetch")||n.includes("network request failed")||n.includes("timeout")||n.includes("econnreset")||n.includes("rpc error")||n.includes("429")?"Network connection failed. Check your internet and try again.":n.includes("estimategas")||n.includes("gas estimation failed")?"Could not estimate the gas fee. The recipient address or amount may be invalid.":jg(e)||r}var Wg=2000000000n,Gg=1000000000n;async function Ki(e,t,r){let n=new AbortController,o=setTimeout(()=>n.abort(),8e3),i=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:t,params:r}),signal:n.signal}).finally(()=>clearTimeout(o));if(!i.ok)throw new Error(`RPC ${t} HTTP ${i.status}`);let a=await i.json();if(a.error)throw new Error(`RPC ${t}: ${a.error.message}`);if(a.result===void 0)throw new Error(`RPC ${t}: empty result`);return a.result}function Zi(e){return BigInt(e)}function _g(e){return`0x${e.toString(16)}`}function Hg(e){let t={to:e.to};return e.from&&(t.from=e.from),e.value!==void 0&&e.value>0n&&(t.value=_g(e.value)),e.data&&(t.data=e.data),t}function Qg(e){return e===56||e===97}async function Zd(e){try{let t=await Ki(e,"eth_gasPrice",[]);return{gasPrice:Zi(t)}}catch{return{gasPrice:Wg}}}async function Vg(e,t){let r=Gg;try{let n=await Ki(e,"eth_maxPriorityFeePerGas",[]);r=Zi(n)}catch{}return{maxFeePerGas:t+r,maxPriorityFeePerGas:r}}async function qg(e,t){if(t)return Zd(e);let r;try{r=(await Ki(e,"eth_getBlockByNumber",["latest",!1]))?.baseFeePerGas}catch{}return r?Vg(e,Zi(r)):Zd(e)}async function Xd(e,t){let r=Qg(t.chainId),n=Hg(t),[o,i]=await Promise.all([Ki(e,"eth_estimateGas",[n]),qg(e,r)]);return{gasLimit:Zi(o),gasPrice:i.gasPrice,maxFeePerGas:i.maxFeePerGas,maxPriorityFeePerGas:i.maxPriorityFeePerGas}}function Jd(e){let{estimateGas:t,sendTransaction:r,getTransactionReceipt:n}=e;return{canSend:!!r,canEstimateGas(o){return!!t||!!o},async estimateGas(o,i){if(t)return t(o);if(i)return Xd(i,o);throw new Error("Gas estimation is not available.")},async sendTransaction(o){if(!r)throw new Error("Sending is not available for this wallet.");return r(o)},getTransactionReceipt:n}}var Yg=1500,Kg=120;function $d(e){return!!(e.token||e.recipient||e.amount)}function Ps({recipient:e,amount:t,token:r,balanceRaw:n}){let o={},i=e.trim(),a=$n(t,r.quantity.decimals),s;return i?an(i)||(o.recipient="Enter a valid EVM recipient address."):o.recipient="Enter a recipient address.","error"in a?o.amount=a.error:(s=a.value,s>n&&(o.amount="Amount exceeds available balance.")),!Tn(r)&&!an(r.address)&&(o.token="Token contract address is invalid."),{errors:o,rawAmount:o.amount?void 0:s,recipient:i&&an(i)?i:void 0}}function Os({token:e,walletAddress:t,recipient:r,rawAmount:n}){let o=t;return Tn(e)?{to:r,value:n,chainId:e.chainId,from:o}:{to:Xo(e.address),data:As(r,n),value:0n,chainId:e.chainId,from:o}}function Zg(e){let{status:t}=e;return t==="reverted"||t==="0x0"||t===0||t===0n||t===!1}var Xg=e=>new Promise(t=>setTimeout(t,e));async function ec({repository:e,args:t,chainId:r,onSubmitted:n,pollIntervalMs:o=Yg,pollMaxAttempts:i=Kg}){let a=await e.sendTransaction(t);n(a);let{getTransactionReceipt:s}=e;if(!s)return"success";for(let l=0;l<i;l+=1){let d=await s({hash:a,chainId:r}).catch(()=>null);if(d)return Zg(d)?"reverted":"success";await Xg(o)}return"timeout"}var tc=["token","recipient","amount","review"];function rc(e){let{env:t,walletAddress:r,accountName:n,accounts:o=[],initialStep:i="recipient",token:a,tokens:s=[],onTokenChange:l,sendTransaction:d,getTransactionReceipt:p,estimateGas:h,getTokenPriceUsd:b,onSubmitted:m,onSuccess:w,onFailed:f,onExit:u,onOutlink:c}=e,y=ae.useMemo(()=>Jd({sendTransaction:d,getTransactionReceipt:p,estimateGas:h}),[d,p,h]),[g,v]=ae.useState(a);ae.useEffect(()=>{v(a)},[a.address,a.chainId]);let[k,R]=ae.useState(i),[I,C]=ae.useState(""),[S,A]=ae.useState(""),[D,U]=ae.useState({}),[M,G]=ae.useState("idle"),[E,O]=ae.useState(""),[ie,Y]=ae.useState(""),[P,pe]=ae.useState(null),[$,Q]=ae.useState(!1),[B,J]=ae.useState(""),V=ae.useRef(0),[le,he]=ae.useState(null),[ee,ce]=ae.useState(""),[We,we]=ae.useState(()=>Ro(r)),Je=ae.useRef(new Set),oe=ae.useCallback((F,ne)=>{Je.current.has(F)||(Je.current.add(F),_e("send",F,ne))},[]);ae.useEffect(()=>{oe("opened"),i!=="token"&&oe("token_selected",{tags:{item_id:a.symbol}})},[oe,i,a.symbol]);let Me=ae.useMemo(()=>nt(t),[t]),{transactionUrl:$e,chainInfo:Te}=Zo(Me,g.chainId,E||void 0,!0),Ae=Vo(g.chainId,Me),be=Ae.nativeSymbol??Te?.currency_symbol??"",ht=Ae.name??Te?.name??`Chain ID ${g.chainId}`,Et=ae.useRef({nativeSymbol:be||void 0,networkName:ht,tokenSymbol:g.symbol});Et.current={nativeSymbol:be||void 0,networkName:ht,tokenSymbol:g.symbol};let vt=ae.useMemo(()=>BigInt(g.quantity.numeric||"0"),[g.quantity.numeric]),Le=ae.useMemo(()=>Nn(g.quantity.numeric,g.quantity.decimals),[g.quantity.numeric,g.quantity.decimals]),it=b?.(g),Mt=ae.useMemo(()=>{if(it===void 0)return;let F=parseFloat(S.replace(/,/g,""));return Number.isFinite(F)?F*it:0},[S,it]);ae.useEffect(()=>{A(""),U({})},[g.address,g.chainId]),ae.useEffect(()=>{V.current+=1,pe(null),J(""),Q(!1)},[g.address,g.chainId,I,S]),ae.useEffect(()=>{we(Ro(r))},[r]);let Qe=ae.useCallback(F=>{C(F),U(ne=>({...ne,recipient:void 0}))},[]),et=ae.useCallback(F=>{A(F),U(ne=>({...ne,amount:void 0}))},[]),De=ae.useCallback(()=>{A(Le.replace(/,/g,"")),U(F=>({...F,amount:void 0}))},[Le]),bt=ae.useCallback(F=>{v(F),l?.(F),oe("token_selected",{tags:{item_id:F.symbol}}),R("recipient")},[l,oe]),qt=ae.useCallback(()=>R("token"),[]),kt=ae.useCallback(()=>{R(F=>{if(F==="result")return"review";if(F===i)return u?.(),F;let ne=tc.indexOf(F);return ne<=0?(u?.(),F):tc[ne-1]})},[i,u]),Ve=ae.useCallback(()=>{let{errors:F}=Ps({recipient:I,amount:"1",token:g,balanceRaw:vt});if(F.recipient){U(ne=>({...ne,recipient:F.recipient}));return}U(ne=>({...ne,recipient:void 0})),oe("recipient_entered"),R("amount")},[I,g,vt,oe]),tt=ae.useCallback(F=>{C(F),U(ne=>({...ne,recipient:void 0})),oe("recipient_entered"),R("amount")},[oe]),ct=ae.useCallback(()=>{let F=Ps({recipient:I,amount:S,token:g,balanceRaw:vt});U(F.errors),!($d(F.errors)||F.rawAmount===void 0||!F.recipient)&&(he(F.rawAmount),ce(F.recipient),pe(null),J(""),G("idle"),oe("amount_entered"),R("review"))},[I,S,g,vt,oe]);ae.useEffect(()=>{if(k!=="review"||!ee||le===null||P!==null||$||B||!y.canEstimateGas(Te?.rpc))return;let F=++V.current;Q(!0),J(""),(async()=>{try{let ne=Os({token:g,walletAddress:r,recipient:ee,rawAmount:le}),ue=await y.estimateGas(ne,Te?.rpc);if(V.current!==F)return;pe(ue)}catch(ne){if(V.current!==F)return;J(Ds(ne,Et.current,"Failed to estimate gas."))}finally{V.current===F&&Q(!1)}})()},[k,ee,le,P,$,B,y,Te?.rpc,g,r]);let Pe=ae.useMemo(()=>{if(!Tn(g)||!P||le===null)return!1;let F=qi(P,Qi(g.chainId));return F===null?!1:le+F>vt},[g,P,le,vt]),at=ae.useCallback(async()=>{if(!(!ee||le===null)&&!Pe){Y(""),O(""),G("submitting"),oe("submitted");try{let F="",ne=await ec({repository:y,args:Os({token:g,walletAddress:r,recipient:ee,rawAmount:le}),chainId:g.chainId,onSubmitted:ue=>{F=ue,O(ue),G("confirming"),we(Es(r,ee)),m?.({txHash:ue,chainId:g.chainId,amount:S,tokenSymbol:g.symbol,recipient:ee})}});if(ne==="success")G("success"),oe("confirmed"),F&&w?w?.(F):R("result");else if(ne==="reverted"){let ue="Transaction reverted on-chain.";G("error"),Y(ue),oe("confirmed",{status:"failure",reason:gr(new Error(ue))}),F&&f?f({txHash:F,chainId:g.chainId,message:ue}):R("result")}else{let ue="Transaction receipt was not found. Please check again later.";G("error"),Y(ue),oe("confirmed",{status:"failure",reason:"timeout"}),F&&f?f({txHash:F,chainId:g.chainId,message:ue}):R("result")}}catch(F){G("error"),oe("confirmed",{status:"failure",reason:gr(F)}),Y(Ds(F,{nativeSymbol:be||void 0,networkName:ht,tokenSymbol:g.symbol})),R("result")}}},[y,ee,le,Pe,g,S,r,m,w,f,be,ht,oe]),[qe,rt]=ae.useState(!1),st=ae.useRef(void 0);ae.useEffect(()=>()=>clearTimeout(st.current),[]);let z=ae.useCallback(async()=>{if(E)try{await navigator.clipboard.writeText(E),rt(!0),clearTimeout(st.current),st.current=setTimeout(()=>rt(!1),2e3)}catch{}},[E]),Ie=ae.useCallback(()=>{if(!$e||!E)return;let F=Ce=>{typeof window<"u"&&window.open(Ce,"_blank","noopener,noreferrer")};if(!c){F($e);return}let ne=c($e,{category:"send",origin:"send-transaction",payload:{chainId:g.chainId,txHash:E}});if(ne&&typeof ne.then=="function"){let Ce=typeof window<"u"?window.open("","_blank","noopener,noreferrer"):null;ne.then(wt=>{if(wt===null){Ce?.close();return}let Yt=wt??$e;if(Ce)try{Ce.location.href=Yt}catch{Ce.close(),F(Yt)}else F(Yt)});return}let ue=ne;ue!==null&&F(ue??$e)},[c,g.chainId,$e,E]),Ze=ae.useCallback(()=>{Y(""),O(""),G("idle"),pe(null),J(""),Je.current.delete("submitted"),Je.current.delete("confirmed"),R("review")},[]);return{step:k,status:M,token:g,tokens:s.length>0?s:[g],recipient:I,amount:S,amountUsd:Mt,fieldErrors:D,error:ie,txHash:E,gasEstimate:P,gasLoading:$,gasError:B,insufficientGas:Pe,reviewRawAmount:le,reviewRecipient:ee,recentAddresses:We,accounts:o,accountName:n,walletAddress:r,resolvedEnv:Me,transactionUrl:$e,networkName:ht,nativeSymbol:be,nativeDecimals:Te?.currency_decimals??g.quantity.decimals,balanceRaw:vt,balanceText:Le,priceUsd:it,canSelectToken:(s.length>0?s:[g]).length>1,canSend:y.canSend,getTokenPriceUsd:b,setRecipient:Qe,setAmount:et,setMax:De,selectToken:bt,goToTokenSelect:qt,selectRecipient:tt,submitRecipient:Ve,submitAmount:ct,confirmSend:at,retry:Ze,back:kt,hashCopied:qe,copyHash:z,openTransaction:Ie}}import*as Yr from"react";import{jsx as Jo,jsxs as Bs}from"react/jsx-runtime";function nc({flow:e}){let{amount:t,setAmount:r,amountUsd:n,balanceText:o,balanceRaw:i,token:a,setMax:s}=e,l=Yr.useRef(null),d=Yr.useCallback(()=>{requestAnimationFrame(()=>{let f=l.current;if(!f)return;let u=f.value.length;f.setSelectionRange(u,u)})},[]);Yr.useEffect(()=>{l.current?.focus(),d()},[d]),Yr.useEffect(()=>{t===""&&(b(!1),d())},[t,d]);let p=Yr.useMemo(()=>{let f=$n(t,a.quantity.decimals);return"value"in f&&f.value>i},[t,a.quantity.decimals,i]),[h,b]=Yr.useState(!1),m=!h&&t===""?"0.00":t,w=t.trim()===""||t.trim()==="0";return Jo("div",{className:"sf-body sf-amount",children:Bs("div",{className:"sf-amount-center",children:[Jo("span",{className:"sf-amount-usd",children:n!==void 0?Yi(n):"\xA0"}),Jo("div",{className:"sf-amount-input-wrap","data-over":p||void 0,"data-empty":w||void 0,onClick:()=>l.current?.focus(),children:Jo("input",{ref:l,className:"sf-amount-input",value:m,onChange:f=>{let u=f.target.value;if(h)r(u);else if(t===""){if(u.length<4)return;b(!0);let c=u.startsWith("0.00")?u.slice(4):u;r(c)}else b(!0),r(u)},placeholder:"0.00",inputMode:"decimal",autoComplete:"off","aria-label":`Amount in ${a.symbol}`,size:1})}),Bs("div",{className:"sf-amount-balance",children:[Jo("span",{children:"Balance:"}),Bs("button",{type:"button",className:"sf-amount-max",onClick:s,"data-track":"amount_max",children:[o," ",a.symbol]})]})]})})}import*as Kr from"react";var $g=new Set(["0xff42c13d927a6b9265236619161accb227b6d452","0x9364ea6790f6e0ecfaa5164085f2a7de34ec55fb"].map(e=>e.toLowerCase()));function ic(e){return $g.has(e.toLowerCase())}var oc={cross:"https://contents.crosstoken.io/wallet/token/images/CROSS.svg",bsc:"https://contents.crosstoken.io/wallet/token/images/BSC.svg"};function $o(e,t){let r=xt[e];if(t===r.cross)return oc.cross;if(t===r.bsc)return oc.bsc}var eh={dev:"https://dev-portrait.crosstoken.io",stage:"https://dev-portrait.crosstoken.io",production:"https://portrait.crosstoken.io"};function hn(e,t,r={}){if(!t||!t.startsWith("0x"))return;let{size:n=120,bg:o,format:i="png"}=r,a=eh[e],s=o?`&bg=${o}`:"";return`${a}/portrait/evm/${t}.${i}?size=${n}${s}`}import{jsx as Nr,jsxs as Xi}from"react/jsx-runtime";function ac({size:e=20,className:t}){return Xi("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,"aria-hidden":"true",children:[Nr("circle",{cx:"9",cy:"9",r:"6",stroke:"currentColor",strokeWidth:"1.7"}),Nr("path",{d:"m17 17-3.2-3.2",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})]})}function sc({size:e=20,className:t}){return Nr("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":"true",children:Nr("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 lc({size:e=20,className:t}){return Xi("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,"aria-hidden":"true",children:[Nr("circle",{cx:"10",cy:"10",r:"10",fill:"currentColor",opacity:"0.12"}),Nr("path",{d:"M7 7l6 6M13 7l-6 6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]})}function dc({size:e=16,className:t}){return Nr("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",className:t,"aria-hidden":"true",children:Nr("path",{d:"M8 3v10m0 0 4-4m-4 4-4-4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function cc({size:e=56,className:t}){return Xi("svg",{width:e,height:e,viewBox:"0 0 56 56",fill:"none",className:t,"aria-hidden":"true",children:[Nr("circle",{cx:"28",cy:"28",r:"28",fill:"var(--ds-accent-primary-default, #00b4b7)"}),Nr("path",{d:"M17 28.5 24.2 35.5 39 20.5",stroke:"var(--ds-accent-primary-on, #ffffff)",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"})]})}function pc({size:e=56,className:t}){return Xi("svg",{width:e,height:e,viewBox:"0 0 56 56",fill:"none",className:t,"aria-hidden":"true",children:[Nr("circle",{cx:"28",cy:"28",r:"28",fill:"var(--ds-system-red-default, #da0b2e)"}),Nr("path",{d:"M20 20 36 36m0-16L20 36",stroke:"#ffffff",strokeWidth:"4",strokeLinecap:"round"})]})}import{jsx as Dt,jsxs as sn}from"react/jsx-runtime";function uc(e,t){return e.name||`Account ${(e.index??t)+1}`}function fc(e){return e.trim().slice(0,1).toUpperCase()||"A"}function mc(e){return e.toLowerCase()}function gc({flow:e}){let{recipient:t,setRecipient:r,fieldErrors:n,recentAddresses:o,accounts:i,walletAddress:a,resolvedEnv:s,selectRecipient:l}=e,d=Kr.useMemo(()=>i.filter(g=>g.address.toLowerCase()!==a.toLowerCase()),[i,a]),p=d.length>0,h=Kr.useMemo(()=>new Map(d.map((g,v)=>[mc(g.address),{account:g,index:v}])),[d]),[b,m]=Kr.useState("recent"),w=Kr.useRef(null);Kr.useEffect(()=>{w.current?.focus()},[]);let f="1A1A2E",u=Kr.useCallback(async()=>{try{let g=await navigator.clipboard.readText();g&&r(g.trim())}catch{}},[r]),c=t.trim().length>0,y=an(t.trim());return sn("div",{className:"sf-recipient",children:[sn("div",{className:"sf-recipient-top",children:[sn("div",{className:"sf-address-field","data-filled":c||void 0,"data-invalid":n.recipient||void 0,children:[Dt("textarea",{ref:w,className:"sf-address-input",value:t,onChange:g=>r(g.target.value),placeholder:"Enter the recipient's address",autoComplete:"off",spellCheck:!1,"aria-label":"Recipient address",rows:c?2:1}),c?Dt("button",{type:"button",className:"sf-address-action",onClick:()=>r(""),"aria-label":"Clear","data-track":"recipient_clear",children:Dt(lc,{size:20})}):Dt("button",{type:"button",className:"sf-address-action",onClick:u,"aria-label":"Paste from clipboard","data-track":"recipient_paste",children:Dt(sc,{size:20})})]}),n.recipient&&Dt("p",{className:"sf-field-error",role:"alert",children:n.recipient}),sn("div",{className:"sf-tabs",role:"tablist",children:[Dt("button",{type:"button",role:"tab",className:"sf-tab","data-active":b==="recent"||void 0,"aria-selected":b==="recent",onClick:()=>m("recent"),"data-track":"recipient_tab","data-track-id":"recent",children:"Recent"}),p&&Dt("button",{type:"button",role:"tab",className:"sf-tab","data-active":b==="account"||void 0,"aria-selected":b==="account",onClick:()=>m("account"),"data-track":"recipient_tab","data-track-id":"account",children:"My Account"})]})]}),Dt("div",{className:"sf-address-list",children:b==="account"&&p?d.map((g,v)=>{let k=uc(g,v),R=hn(s,g.address,{size:56,bg:f});return sn("button",{type:"button",className:"sf-address-row",onClick:()=>l(g.address),"data-track":"recipient_item",children:[sn("span",{className:"sf-address-avatar",children:[R&&Dt("img",{src:R,alt:"",width:40,height:40,draggable:!1,onError:I=>{I.currentTarget.style.display="none"}}),Dt("span",{className:"sf-address-avatar-fallback",children:fc(k)})]}),sn("span",{className:"sf-address-meta",children:[Dt("span",{className:"sf-address-name",children:k}),Dt("span",{className:"sf-address-value",children:Xt(g.address)})]})]},g.address)}):o.length>0?o.map(g=>{let v=h.get(mc(g.address)),k=v?uc(v.account,v.index):Xt(g.address),R=hn(s,g.address,{size:56,bg:f});return sn("button",{type:"button",className:"sf-address-row",onClick:()=>l(g.address),"data-track":"recipient_item",children:[sn("span",{className:"sf-address-avatar",children:[R&&Dt("img",{src:R,alt:"",width:40,height:40,draggable:!1,onError:I=>{I.currentTarget.style.display="none"}}),Dt("span",{className:"sf-address-avatar-fallback",children:fc(k)})]}),sn("span",{className:"sf-address-meta",children:[Dt("span",{className:"sf-address-name",children:k}),Dt("span",{className:"sf-address-value",children:Xt(g.address)})]})]},g.address)}):Dt("div",{className:"sf-empty",children:"No send history"})}),c&&!y&&!n.recipient&&Dt("p",{className:"sf-field-error",role:"alert",children:"Enter a valid EVM recipient address."})]})}import{jsx as nr,jsxs as Co}from"react/jsx-runtime";function bc({flow:e}){let{status:t,txHash:r,error:n,copyHash:o,hashCopied:i,openTransaction:a}=e,s=t==="error",l=t==="success";return s?Co("div",{className:"sf-body sf-result sf-result--error",children:[nr("span",{className:"sf-result-icon",children:nr(pc,{size:56})}),Co("div",{className:"sf-result-copy",children:[nr("h3",{className:"sf-result-title",children:"Transaction Failed"}),nr("p",{className:"sf-result-desc",children:n||"Something went wrong. Please try again."})]}),r&&nr(hc,{txHash:r,hashCopied:i,onCopy:o,onOpen:a})]}):Co("div",{className:"sf-body sf-result",children:[nr("span",{className:"sf-result-icon","data-pending":!l||void 0,children:l?nr(cc,{size:56}):nr("span",{className:"sf-result-spinner"})}),Co("div",{className:"sf-result-copy",children:[nr("h3",{className:"sf-result-title",children:l?"Transaction Complete":"Transaction in Progress"}),nr("p",{className:"sf-result-desc",children:l?"Your transfer was sent successfully.":"Transfer in progress. Waiting for confirmation."})]}),r&&nr(hc,{txHash:r,hashCopied:i,onCopy:o,onOpen:a})]})}function hc({txHash:e,hashCopied:t,onCopy:r,onOpen:n}){return Co("div",{className:"sf-result-hash-card",children:[nr("span",{className:"sf-result-hash-label",children:"Transaction Hash"}),Co("div",{className:"sf-result-hash-row",children:[nr("button",{type:"button",className:"sf-result-hash-link",onClick:n,"aria-label":"Open transaction in explorer","data-track":"tx_link_open",children:Xt(e)}),nr("button",{type:"button",className:"sf-result-copy-btn",onClick:r,"aria-label":"Copy transaction hash","data-track":"tx_hash_copy",children:t?nr(mn,{size:16}):"Copy"})]})]})}import{jsx as St,jsxs as or}from"react/jsx-runtime";var Ji="\u2014";function wc({flow:e}){let{token:t,reviewRawAmount:r,reviewRecipient:n,accountName:o,accounts:i,walletAddress:a,networkName:s,nativeSymbol:l,nativeDecimals:d,gasEstimate:p,gasLoading:h,gasError:b,insufficientGas:m,error:w,resolvedEnv:f}=e,u=Tn(t),c=r!==null?Hi(r,t.quantity.decimals):"",y=o?.trim()||`Account ${(i[0]?.index??0)+1}`,g=hn(f,a,{size:56,bg:"1A1A2E"}),v=l||(u?t.symbol:""),k=Qi(t.chainId),R=p?Yd(p,k):null,I=p?qi(p,k):null,C=M=>M!==null&&v?`${Ls(M,d)} ${v}`:Ji,S=M=>M!==void 0?`${Vd(M)} Gwei`:Ji,A=(()=>{if(!u||!p||I===null||r===null)return Ji;let M=r+I;return`${Ls(M,d)} ${v||t.symbol}`})(),D=M=>h?"\u2026":M,U=[{label:"Est. Tx Fee",value:D(C(I))},...R==="dynamic"?[{label:"Max Priority Fee",value:D(S(p?.maxPriorityFeePerGas))},{label:"Max Gas Fee",value:D(S(p?.maxFeePerGas))}]:R==="legacy"?[{label:"Gas Price",value:D(S(p?Vi(p):void 0))}]:[],{label:"Gas Limit",value:D(p?qd(p.gasLimit):Ji)}];return or("div",{className:"sf-body sf-review",children:[or("div",{className:"sf-review-amount",children:[St("img",{className:"sf-review-amount-icon",src:t.icon_url,alt:"",width:40,height:40,draggable:!1,onError:M=>{M.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),or("span",{className:"sf-review-amount-value",children:[c,St("span",{className:"sf-review-amount-symbol",children:t.symbol})]})]}),or("div",{className:"sf-review-parties",children:[or("div",{className:"sf-review-card sf-review-party",children:[St("span",{className:"sf-review-party-label",children:"From"}),or("div",{className:"sf-review-party-head",children:[St("span",{className:"sf-review-party-avatar",children:g&&St("img",{src:g,alt:"",width:28,height:28,draggable:!1,onError:M=>{M.currentTarget.style.display="none"}})}),St("span",{className:"sf-review-party-name",children:y})]}),St("span",{className:"sf-review-party-addr",children:a})]}),St("span",{className:"sf-review-arrow","aria-hidden":!0,children:St(dc,{size:16})}),or("div",{className:"sf-review-card sf-review-party",children:[St("span",{className:"sf-review-party-label",children:"To"}),St("span",{className:"sf-review-party-addr",children:n})]})]}),or("section",{className:"sf-review-card",children:[St("h3",{className:"sf-review-section-title",children:"Summary"}),or("div",{className:"sf-review-row",children:[St("span",{className:"sf-review-row-label",children:"Network"}),St("span",{className:"sf-review-row-value",children:s})]}),U.map(M=>or("div",{className:"sf-review-row",children:[St("span",{className:"sf-review-row-label",children:M.label}),St("span",{className:"sf-review-row-value",children:M.value})]},M.label))]}),or("section",{className:"sf-review-card",children:[St("h3",{className:"sf-review-section-title",children:"Total"}),or("div",{className:"sf-review-row",children:[St("span",{className:"sf-review-row-label",children:"Total Amount"}),or("span",{className:"sf-review-row-value",children:[c," ",t.symbol]})]}),u&&or("div",{className:"sf-review-row",children:[St("span",{className:"sf-review-row-label",children:"Max. Total Amount"}),St("span",{className:"sf-review-row-value",children:D(A)})]})]}),m&&!b&&!w&&or("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."]}),(b||w)&&St("div",{className:"sf-message sf-message--error",role:"alert",children:b||w})]})}import*as $i from"react";import{jsx as In,jsxs as eo}from"react/jsx-runtime";function yc({flow:e}){let[t,r]=$i.useState(""),n=t.trim().toLowerCase(),o=$i.useMemo(()=>n?e.tokens.filter(i=>i.symbol.toLowerCase().includes(n)||i.name.toLowerCase().includes(n)):e.tokens,[e.tokens,n]);return eo("div",{className:"sf-body sf-token-select",children:[eo("div",{className:"sf-search",children:[In(ac,{size:20}),In("input",{className:"sf-search-input",value:t,onChange:i=>r(i.target.value),placeholder:"Search Tokens",autoComplete:"off",spellCheck:!1,"aria-label":"Search tokens"})]}),eo("div",{className:"sf-token-list",children:[o.map(i=>{let a=`${i.chainId}:${i.address.toLowerCase()}`,s=$o(e.resolvedEnv,i.chainId),l=e.getTokenPriceUsd?.(i);return eo("button",{type:"button",className:"sf-token-row",onClick:()=>e.selectToken(i),"data-track":"token_item","data-track-id":i.symbol,children:[eo("span",{className:"sf-token-left",children:[eo("span",{className:"sf-token-icon-wrap",children:[In("img",{className:"sf-token-icon",src:i.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&&In("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"}})]}),In("span",{className:"sf-token-name",children:i.symbol})]}),eo("span",{className:"sf-token-right",children:[In("span",{className:"sf-token-balance",children:Nn(i.quantity.numeric,i.quantity.decimals)}),l!==void 0&&In("span",{className:"sf-token-price",children:Yi(l)})]})]},a)}),o.length===0&&In("div",{className:"sf-empty",children:"No tokens found"})]})]})}de(`.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-system-orange-default, #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-system-orange-default, #f0640d)}.sf-address-field[data-filled]{border-color:var(--ds-system-orange-default, #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-system-orange-high, #e56f00)}.sf-tab[data-active]:after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:3px;border-radius:9999px;background:var(--ds-system-orange-high, #e56f00)}.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-system-orange-default, #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-system-orange-high, #e56f00)}.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
|
+
`);import{jsx as zt,jsxs as ea}from"react/jsx-runtime";var th={token:"Send",recipient:"Send",amount:"Send",review:"Sign Transaction",result:""};function ta({onClose:e,onBackToWallet:t,onConfirmSuccess:r,onSuccess:n,className:o,...i}){let a=xc.useCallback(c=>{n?.(c),r?.(c)},[r,n]),l=rc({...i,onSuccess:n||r?a:void 0,onExit:t}),{step:d,status:p}=l,h=an(l.recipient.trim()),b=$n(l.amount,l.token.quantity.decimals),m="value"in b&&b.value<=l.balanceRaw,w=p==="submitting"||p==="confirming",f=d!=="result",u=th[d]??"";return zt(ge,{feature:"send",children:ea("div",{className:Ne("sf-root",o),"data-step":d,children:[ea("header",{className:"sf-header",children:[f?zt("button",{type:"button",className:"sf-header-btn",onClick:l.back,"aria-label":"Back","data-track":"back",children:zt(gn,{size:24})}):zt("span",{className:"sf-header-btn","aria-hidden":!0}),zt("span",{className:"sf-header-title",children:u}),zt("button",{type:"button",className:"sf-header-btn",onClick:e,"aria-label":"Close","data-track":"close",children:zt(Sr,{size:24})})]}),d==="token"&&zt(yc,{flow:l}),d==="recipient"&&zt(gc,{flow:l}),d==="amount"&&zt(nc,{flow:l}),d==="review"&&zt(wc,{flow:l}),d==="result"&&zt(bc,{flow:l}),ea("footer",{className:"sf-footer","data-step":d,children:[d==="recipient"&&zt("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"&&zt("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.submitAmount,"data-disabled":!m||void 0,"aria-disabled":!m,"data-track":"amount_next",children:"Next"}),d==="review"&&ea("div",{className:"sf-footer-row",children:[zt("button",{type:"button",className:"sf-btn sf-btn--secondary",onClick:l.back,disabled:w,"data-track":"review_cancel",children:"Cancel"}),zt("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.confirmSend,disabled:w||!l.canSend||l.insufficientGas,"data-track":"review_send",children:w?"Sending...":"Send"})]}),d==="result"&&p==="success"&&zt("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:()=>r?.(l.txHash||void 0),"data-track":"result_ok",children:"All done"}),d==="result"&&p==="error"&&zt("button",{type:"button",className:"sf-btn sf-btn--primary",onClick:l.retry,"data-track":"result_retry",children:"Try Again"})]})]})})}import*as vc from"@radix-ui/react-popover";import{Drawer as rh}from"vaul";import{jsx as ra,jsxs as nh}from"react/jsx-runtime";function kc({asChild:e,className:t,children:r}){let{isMobile:n,theme:o,walletAddress:i}=Cn(),a=r!=null,s=e??!0,l=a?r:nh("button",{type:"button",className:Ne("wi-trigger-btn",t),"data-theme":o,"data-mobile":n||void 0,children:[ra(Ed,{size:n?14:16}),ra("span",{className:"wi-trigger-address",children:Xt(i)})]});return n?ra(rh.Trigger,{asChild:s,children:l}):ra(vc.Trigger,{asChild:s,children:l})}import*as te from"react";import*as Ia from"@radix-ui/react-popover";import{Drawer as Ta}from"vaul";import di from"bignumber.js";import{useQueries as oh}from"@tanstack/react-query";import{useMemo as ih}from"react";var zs="user-balance";async function ah(e,t,r,n){let o=new URLSearchParams({networkId:`eip155:${t}`,account:r}),i=await fetch(`${e}/v1/public/token/balance?${o}`,{cache:"no-store",signal:n});if(!i.ok)throw new Error(`Failed to fetch token balance: ${i.status}`);let a=await i.json();if(a.code!==200)throw new Error(`Token balance API error: ${a.code}`);return a.data}function En(e,t,r=!0){let n=xt[e],o=[n.cross,n.bsc],i=oh({queries:o.map(d=>({queryKey:[zs,e,t,d],queryFn:async({signal:p})=>ah(await Re("walletServer",e),d,t,p),enabled:!!t&&r,staleTime:0,refetchInterval:r?5e3:!1}))}),a=i.some(d=>d.isLoading),s=i.some(d=>d.isError);return{tokens:ih(()=>{let d=[];for(let p of i)p.data&&d.push(...p.data);return d},[i]),isLoading:a,isError:s}}import{useQuery as sh,useQueries as lh}from"@tanstack/react-query";import{useMemo as dh}from"react";var ch="forge-holdings",ph="forge-token-image";async function uh(e,t,r){let n=await fetch(`${e}/v1/users/${t}/holdings`,{cache:"no-store",signal:r});if(!n.ok)throw new Error(`Failed to fetch forge holdings: ${n.status}`);let o=await n.json();if(!o.success)throw new Error("Forge holdings API error");return o.data.items}async function fh(e,t,r){let n=await fetch(`${e}/v1/tokens/${t}`,{cache:"no-store",signal:r});if(!n.ok)return{address:t,image_url:""};let o=await n.json();return o.success?{address:t,image_url:o.data.token.image_url}:{address:t,image_url:""}}function Rc(e,t,r=!0){let{data:n,...o}=sh({queryKey:[ch,e,t],queryFn:async({signal:i})=>uh(await Re("bondingCurve",e),t,i),enabled:!!t&&r,staleTime:0,refetchInterval:r?5e3:!1});return{holdings:n??[],...o}}function Sc(e,t,r=!0){let n=lh({queries:t.map(i=>({queryKey:[ph,e,i],queryFn:async({signal:a})=>fh(await Re("bondingCurve",e),i,a),enabled:r,staleTime:1/0}))});return{imageMap:dh(()=>{let i=new Map;for(let a of n)a.data&&i.set(a.data.address,a.data.image_url);return i},[n])}}import{useQuery as mh}from"@tanstack/react-query";import{useMemo as gh}from"react";var Fs="token-stats";function Tr(e,t){return`${e}:${t.toLowerCase()}`}function Mn(e,t=!0){let{data:r,...n}=mh({queryKey:[Fs,e],queryFn:async({signal:i})=>{let a=await Re("walletServer",e),s=await fetch(`${a}/v1/public/token/stats`,{cache:"no-store",signal:i});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:gh(()=>{let i=new Map;if(!r?.data)return i;for(let a of r.data){let s=Tr(a.chain_id,a.address);i.set(s,a)}return i},[r]),...n}}import{useQuery as hh}from"@tanstack/react-query";var bh="crossd-apr",Cc=6e4,wh="https://crossd-dashboard-api.crossdefi.io/api/v1/overview",na,ei;function Us(){return na&&na.expiresAt>Date.now()?Promise.resolve(na.value):ei||(ei=(async()=>{let e=await fetch(wh,{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 r=parseFloat(t.data.est_last_epoch_apy);if(!Number.isFinite(r))throw new Error("CROSSD overview returned a non-numeric APR");let n=r*100;return na={value:n,expiresAt:Date.now()+Cc},n})().finally(()=>{ei=void 0}),ei)}function oa(e){let t=Math.abs(e),r=(e>=0?Math.floor:Math.ceil)(t*100)/100;return`APR ${e>=0?"+":"-"}${r}%`}function Nc(){let{data:e,...t}=hh({queryKey:[bh],queryFn:Us,staleTime:Cc});return{aprPercent:e??null,...t}}import{useQuery as yh}from"@tanstack/react-query";import{useMemo as Tc}from"react";var xh="token-info";function ti(e,t){return`${t.toLowerCase()}_${e}`}function Ic(e,t=!0){let{data:r,...n}=yh({queryKey:[xh,e],queryFn:async({signal:a})=>{let s=await Re("walletServer",e),l=await fetch(`${s}/v1/public/token/info`,{cache:"no-store",signal:a});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=Tc(()=>{let a=new Map;if(!r?.data)return a;for(let s of r.data){let l=ti(s.chain_id,s.address);a.set(l,s.category)}return a},[r]),i=Tc(()=>{let a=new Map;if(!r?.data)return a;for(let s of r.data)a.set(ti(s.chain_id,s.address),s);return a},[r]);return{categoryMap:o,infoMap:i,...n}}import{useMemo as vh}from"react";import js from"bignumber.js";function Ec(e,t,r){let{tokens:n,isLoading:o}=En(e,t,r),{statsMap:i}=Mn(e,r);return vh(()=>{let a=new js(0);for(let p of n){let h=i.get(Tr(p.chainId,p.address));if(!h)continue;let m=new js(p.quantity.numeric).shiftedBy(-p.quantity.decimals).multipliedBy(new js(h.price));m.isNaN()||(a=a.plus(m))}let s=a.toFixed(),{displayValue:l,isLowerBound:d}=Ud(s);return{totalUsd:s,displayValue:l,isLowerBound:d,isLoading:o}},[n,i,o])}import{QRCodeSVG as Dw}from"qrcode.react";function Pt(e,t,r,n){if(!n||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.defaultPrevented)return;e.preventDefault();let o;try{o=n(t,r)}catch(d){console.error("[dapp-ui] onOutlink threw:",d);return}let i=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 b=h??t;if(d)try{d.location.href=b}catch{d.close(),i(b)}else i(b)};o.then(p,h=>{console.error("[dapp-ui] onOutlink rejected:",h),d?.close()});return}let s=o;if(s===null)return;i(s??t)}import*as no from"react";import{Drawer as w0}from"vaul";import{createContext as Ch,useContext as Nh,useMemo as Th}from"react";import Ir from"bignumber.js";var kh=/^(\d{4}-\d{2}-\d{2})/;function Mc(e){if(!e||e.length===0)return;let t=new Map,r;for(let{key:o,cumulative:i}of e.map(a=>({key:kh.exec(a.reference_date)?.[1],cumulative:a.cumulative_earned})).filter(a=>!!a.key&&a.cumulative!=null).sort((a,s)=>a.key<s.key?-1:a.key>s.key?1:0))t.set(o,i),r=o;if(r===void 0)return;let n=new Date().toISOString().slice(0,10);return t.get(n)??t.get(r)}function Ac(e){return e.poolType==="Unknown"}function ia(e){return e.length<=12?e:`${e.slice(0,6)}...${e.slice(-4)}`}function aa(e){return e.length<=13?e:`${e.slice(0,6)}...${e.slice(-4)}`}function ri(e,t){let r=e.length+t.length;if(r>32)return"xs";if(r>24)return"sm"}function Ws(e){return e?.toUpperCase()==="WONE"?"ONE":e}var Rh=["Request Arguments:","Details:","Docs:","Version:","Contract Call:"];function ni(e,t){console.error("[wallet-portfolio] withdraw failed:",e);let n=e instanceof Error?e.message:"";for(let i of Rh){let a=n.indexOf(i);a>=0&&(n=n.slice(0,a))}return n.split(`
|
|
8
|
+
`).map(i=>i.trim()).find(i=>i.length>0)||t}var Sh="0xe00e8bf3";function Lc(e,t){let r=typeof e=="bigint"?e:BigInt(e);if(r<0n)throw new Error("poolId must be non-negative");if(t<0n)throw new Error("amount must be non-negative");let n=r.toString(16).padStart(64,"0"),o=t.toString(16).padStart(64,"0");return`${Sh}${n}${o}`}function No(e){return!e||e<=0n?"0":new Ir(e.toString()).shiftedBy(-9).toFormat(2,Ir.ROUND_DOWN).replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"")}function sa(e){return!e||e<=0n?"0":new Ir(e.toString()).toFormat(0,Ir.ROUND_DOWN)}function la(e){if(!e||e<=0n)return"0";let t=new Ir(e.toString()).shiftedBy(-18),r=t.isLessThan(1e-4)?7:4;return t.toFormat(r,Ir.ROUND_DOWN).replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"")}function ln(e,t){let r=new Ir(e).shiftedBy(-t);return!r.isFinite()||r.isZero()?"0":r.isGreaterThanOrEqualTo(1)?r.toFormat(2,Ir.ROUND_DOWN):r.toFormat(4,Ir.ROUND_DOWN)}function Gs(e){return ln(e,0)}var oi={rate:1,symbol:"$"};function to(e,t=oi){let r=Number.isFinite(t.rate)&&t.rate>0?t.rate:1;return`${t.symbol||"$"}${e.times(r).toFormat(2,Ir.ROUND_DOWN)}`}function An(e,t,r,n=oi){let o=new Ir(r||"0");if(!o.isFinite()||o.isLessThanOrEqualTo(0))return null;let i=new Ir(e||"0").shiftedBy(-t).times(o);return i.isFinite()?to(i,n):null}var ii=Ch(null);function Ct(){let e=Nh(ii);if(!e)throw new Error("WalletPortfolio compound components must be used within <WalletPortfolio>");return e}function Er(){let{conversionRatio:e,currencySymbol:t}=Ct();return Th(()=>({rate:typeof e=="number"&&e>0?e:oi.rate,symbol:t||oi.symbol}),[e,t])}import{Drawer as Ih}from"vaul";import{jsx as Dc}from"react/jsx-runtime";function Pc({asChild:e,children:t}){let{walletAddress:r}=Ct(),n=t!=null,o=e??!0,i=n?t:Dc("button",{type:"button",children:Xt(r)});return Dc(Ih.Trigger,{asChild:o,children:i})}import{Drawer as ya}from"vaul";import*as Tt from"react";import{useQueryClient as g0}from"@tanstack/react-query";import{createContext as Eh,useContext as Mh}from"react";var _s=Eh(null);function Oc(){return Mh(_s)}import{jsx as br,jsxs as ua}from"react/jsx-runtime";function Bc({size:e=22,className:t}){return br("svg",{width:e,height:e,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:br("path",{d:"M14 4L7 11L14 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function zc({size:e=22,className:t}){return ua("svg",{width:e,height:e,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[br("path",{d:"M18.333 3.667v5.5h-5.5",stroke:"currentColor",strokeWidth:1.833,strokeLinecap:"round",strokeLinejoin:"round"}),br("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 da({size:e=16,className:t}){return ua("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[br("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"}),br("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 ca({size:e=16,className:t}){return br("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:br("path",{d:"M13.333 4L6 11.333 2.667 8",stroke:"currentColor",strokeWidth:1.667,strokeLinecap:"round",strokeLinejoin:"round"})})}function pa({size:e=48,className:t}){return ua("svg",{width:e,height:e,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[br("circle",{cx:"24",cy:"24",r:"24",fill:"currentColor"}),br("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 wr({size:e=12,className:t}){return ua("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:[br("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"}),br("path",{d:"M7 1H11V5",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),br("path",{d:"M11 1L6 6",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})]})}import{useQuery as Ah}from"@tanstack/react-query";import{useMemo as Fc}from"react";var Lh="wp:reward-pools";function To(e,t=!0){let{data:r,...n}=Ah({queryKey:[Lh,e],queryFn:async({signal:a})=>{let s=await Re("gameReward",e),l=await fetch(`${s}/v1/pools`,{cache:"no-store",signal:a});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=Fc(()=>r?.data.pools.filter(a=>a.pool_type==="CrossPool")??[],[r]),i=Fc(()=>r?.data.pools.filter(a=>a.pool_type==="GamePool")??[],[r]);return{crossPools:o,gamePools:i,allPools:r?.data.pools??[],...n}}import{useQuery as Dh}from"@tanstack/react-query";import{useMemo as Ph}from"react";var Oh="wp:user-deposits";function fa(e,t,r=!0){let n=r&&!!t,{data:o,...i}=Dh({queryKey:[Oh,e,t],queryFn:async({signal:s})=>{let l=await Re("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:n,staleTime:0});return{depositMap:Ph(()=>{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??[],...i}}import{useQuery as Bh}from"@tanstack/react-query";import{useMemo as zh}from"react";var Uc={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"},jc={dev:"https://stg.onechain.nexus/points",stage:"https://stg.onechain.nexus/points",production:"https://www.onechain.nexus/points"};var Wc={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"};var Hs={dev:"https://dev-stake.ogfcorp.com",stage:"https://stg-stake.ogfcorp.com",production:"https://stake.ogfcorp.com"},Gc={dev:`${Hs.dev}/portfolio`,stage:`${Hs.stage}/portfolio`,production:`${Hs.production}/portfolio`};var _c={dev:"https://stg.onechain.nexus",stage:"https://stg.onechain.nexus",production:"https://onechain.nexus"},Mr={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"},ma={dev:"https://stg-swap-api.crossdefi.io",stage:"https://stg-swap-api.crossdefi.io",production:"https://swap-api.crossdefi.io"},Hc={dev:"https://stg.crossdefi.io",stage:"https://stg.crossdefi.io",production:"https://www.crossdefi.io"},Qc={dev:"0x1Fa8C0bc5B754E82d55D60f0d6151903FD995b1B",stage:"0x1Fa8C0bc5B754E82d55D60f0d6151903FD995b1B",production:"0xEFd871aF7D695A0c1709e46b565761F4cd1Ef5ba"},Vc={dev:"0xda37a3B60E6b97E8CB44b460130d40331efc566b",stage:"0xda37a3B60E6b97E8CB44b460130d40331efc566b",production:"0x731a104a4461ae45bfef520468b43c262d35e682"};var Fh="wp:token-info",Uh="0x0000000000000000000000000000000000000001";function dn(e,t=!0){let r=xt[e].cross,{data:n,...o}=Bh({queryKey:[Fh,e],queryFn:async({signal:p})=>{let h=await Re("walletServer",e),b=await fetch(`${h}/v1/public/token/info`,{cache:"no-store",signal:p});if(!b.ok)throw new Error(`Failed to fetch token info: ${b.status}`);let m=await b.json();if(m.code!==200)throw new Error(`Token info API error: ${m.code}`);return m},enabled:t,staleTime:300*1e3}),{byChainAddr:i,byChainSym:a}=zh(()=>{let p=new Map,h=new Map;if(!n?.data)return{byChainAddr:p,byChainSym:h};for(let b of n.data){let m=b.address.toLowerCase();p.set(`${b.chain_id}:${m}`,b),p.set(m,b);let w=b.symbol.replace(/^t/,"").toUpperCase(),f=`${b.chain_id}:${w}`;h.has(f)||h.set(f,b),h.has(w)||h.set(w,b)}return{byChainAddr:p,byChainSym:h}},[n]);return{getTokenImage:(p,h,b)=>{let m=p.toLowerCase(),w=!!b?.chainOnly,f=i.get(`${r}:${m}`);if(f?.image)return f.image;if(!w){let u=i.get(m);if(u?.image)return u.image}if(h){let u=h.replace(/^t/,"").toUpperCase(),c=a.get(`${r}:${u}`);if(c?.image)return c.image;if(!w){let y=a.get(u);if(y?.image)return y.image}}return""},getTokenSymbol:(p,h,b)=>{let m=p.toLowerCase();return(i.get(`${r}:${m}`)??(b?.chainOnly?void 0:i.get(m)))?.symbol||h},getNativeToken:()=>i.get(`${r}:${Uh}`),...o}}import*as Vs from"react";import{jsx as Qs,jsxs as qc}from"react/jsx-runtime";function Ar({sectionKey:e,title:t,icon:r,iconFit:n="cover",isEmpty:o,loading:i=!1,children:a}){let s=Oc();return Vs.useEffect(()=>{s?.report(e,{loading:i,empty:o})},[s,e,i,o]),Vs.useEffect(()=>()=>s?.unregister(e),[s,e]),o?null:qc("div",{className:"wp-svc-card",children:[qc("div",{className:"wp-svc-card-head",children:[Qs("img",{className:"wp-svc-card-icon",src:r,alt:"",style:{objectFit:n}}),Qs("span",{className:"wp-svc-card-title",children:t})]}),Qs("div",{className:"wp-svc-items",children:a})]})}import qs from"bignumber.js";import{jsx as Jt,jsxs as ir}from"react/jsx-runtime";var jh="ONErewards";function Wh(e){return new qs(e||"0").isGreaterThan(0)}function Yc(){let{env:e,walletAddress:t,onOutlink:r}=Ct(),n=Er(),o=!!t,{allPools:i,isLoading:a}=To(e,o),{depositMap:s,isLoading:l}=fa(e,t,o),{getTokenImage:d}=dn(e,o),p=(m,w)=>`${Uc[e]}/gametoken/tokens/${m.deposit_token.address}?mode=rewards${w==="withdraw"?"&trade=withdraw":""}`,h=`${Mr[e]}/reward.png`,b=i.filter(m=>{let w=s.get(m.pool_address.toLowerCase()),f=w?.deposited_amount??"0",u=w?.claimable_reward??"0";return!(new qs(f).isZero()&&new qs(u).isZero())});return Jt(Ar,{sectionKey:"rewards",title:jh,icon:h,isEmpty:b.length===0,loading:a||l,children:b.map(m=>{let w=s.get(m.pool_address.toLowerCase()),f=w?.deposited_amount??"0",u=w?.claimable_reward??"0",c=p(m,"withdraw"),y=p(m,"claim"),g=d(m.deposit_token.address,m.deposit_token.symbol),v=m.reward_tokens[0],k=v?d(v.address,v.symbol):"",R=m.reward_tokens.map(M=>M.symbol),I=R.length>0?`${m.deposit_token.symbol}-${R.join("/")}`:m.deposit_token.symbol,C=v?ln(u,v.decimals):"0",S=v?.symbol??"Reward",A=An(f,m.deposit_token.decimals,m.deposit_token.price,n),D=v?An(u,v.decimals,v.price,n):null,U=!!w&&Wh(u);return ir("article",{className:"wp-item","data-side":"reward",children:[ir("div",{className:"wp-item-body",children:[ir("div",{className:"wp-item-line",children:[Jt("span",{className:"wp-item-label",children:"Pool (Deposit - Earn)"}),ir("div",{className:"wp-svc-token",children:[ir("span",{className:"wp-token-stack","aria-hidden":!0,children:[g&&Jt("img",{className:"wp-svc-token-icon",src:g,alt:""}),k&&Jt("img",{className:"wp-svc-token-icon",src:k,alt:""})]}),Jt("span",{children:I})]})]}),ir("div",{className:"wp-item-line",children:[Jt("span",{className:"wp-item-label",children:"Deposited"}),ir("div",{className:"wp-svc-token wp-svc-token--amount",children:[g&&Jt("img",{className:"wp-svc-token-icon",src:g,alt:""}),ir("div",{className:"wp-svc-amount",children:[Jt("span",{className:"wp-svc-amount-main",children:ln(f,m.deposit_token.decimals)}),A&&Jt("span",{className:"wp-item-usd",children:A})]})]})]}),ir("div",{className:"wp-item-line",children:[ir("span",{className:"wp-item-label",children:["Claimable (",S,")"]}),ir("div",{className:"wp-svc-token wp-svc-token--amount",children:[k&&Jt("img",{className:"wp-svc-token-icon",src:k,alt:""}),ir("div",{className:"wp-svc-amount",children:[Jt("span",{className:"wp-svc-amount-main",children:C}),D&&Jt("span",{className:"wp-item-usd",children:D})]})]})]})]}),ir("div",{className:"wp-item-tags",children:[ir("a",{className:"wp-tag wp-tag--muted",href:c,target:"_blank",rel:"noopener noreferrer","data-track":"rewards_withdraw_open",onClick:M=>Pt(M,c,{category:"portfolio",origin:"portfolio-rewards",payload:{pool:m,userDeposit:w}},r),children:[Jt("span",{className:"wp-tag-label",children:"Withdraw"}),Jt(wr,{size:12,className:"wp-tag-icon"})]}),ir("a",{className:"wp-tag wp-tag--mint","data-disabled":!U||void 0,"aria-disabled":!U||void 0,href:U?y:void 0,target:U?"_blank":void 0,rel:U?"noopener noreferrer":void 0,onClick:M=>{if(!U){M.preventDefault();return}Pt(M,y,{category:"portfolio",origin:"portfolio-rewards",payload:{pool:m,userDeposit:w}},r)},children:[Jt("span",{className:"wp-tag-label",children:"Claim"}),Jt(wr,{size:12,className:"wp-tag-icon"})]})]})]},m.pool_address)})})}import*as rp from"react";import{useQuery as Kh}from"@tanstack/react-query";import{useMemo as ga}from"react";var Gh="0x70a08231",_h="0x18160ddd",Hh="0x313ce567",Qh=8e3;async function Vh(e,t,r,n){let o=new AbortController,i=setTimeout(()=>o.abort(),Qh);n&&n.addEventListener("abort",()=>o.abort(),{once:!0});let a=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:t,params:r}),signal:o.signal}).finally(()=>clearTimeout(i));if(!a.ok)throw new Error(`RPC ${t} HTTP ${a.status}`);let s=await a.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 qh(e){return e.toLowerCase().replace(/^0x/,"").padStart(64,"0")}function ai(e){if(!(!e||e==="0x"))try{return BigInt(e)}catch{return}}async function bn(e,t,r,n,o){try{return await Vh(e,"eth_call",[o?{from:o,to:t,data:r}:{to:t,data:r},"latest"],n)}catch{return}}async function Yh(e,t,r,n){let[o,i,a]=await Promise.all([bn(e,r,Gh+qh(t),n),bn(e,r,_h,n),bn(e,r,Hh,n)]),s=ai(o);if(s===void 0)return null;let l=ai(a);return{balance:s,totalSupply:ai(i),decimals:l!==void 0?Number(l):void 0}}async function si(e,t){let r=xt[e].cross,n=await Re("walletServer",e),o=await fetch(`${n}/v1/public/chain/info/${r}`,{cache:"no-store",signal:t});if(!o.ok)return;let i=await o.json();return("data"in i&&i.data!==void 0?Array.isArray(i.data)?i.data[0]:i.data:i)?.rpc||void 0}async function Kc(e,t,r,n){if(!t||r.length===0)return{};let o;try{o=await si(e,n)}catch{o=void 0}if(!o)return{};let i=await Promise.all(r.map(async s=>[s.toLowerCase(),await Yh(o,t,s,n)])),a={};for(let[s,l]of i)l&&(a[s]=l);return a}var Zh="wp:withdraw-token-meta",Xh="0xc89039c5",Jh="0x95d89b41",$h="0x313ce567";function eb(e){if(!(!e||e==="0x"))try{let t=e.replace(/^0x/,""),r=Number(BigInt("0x"+t.slice(64,128)));if(!Number.isFinite(r)||r<=0||r>64)return;let n=t.slice(128,128+r*2),o="";for(let i=0;i<n.length;i+=2)o+=String.fromCharCode(parseInt(n.slice(i,i+2),16));return o||void 0}catch{return}}function tb(e){if(!e||e==="0x")return;let r="0x"+e.replace(/^0x/,"").padStart(64,"0").slice(24,64);return/^0x[a-f0-9]{40}$/.test(r)&&r!=="0x0000000000000000000000000000000000000000"?r:void 0}async function rb(e,t,r){if(t.length===0)return{};let n;try{n=await si(e,r)}catch{n=void 0}if(!n)return{};let o=await Promise.all(t.map(async a=>{let s=tb(await bn(n,a,Xh,r));if(!s)return[a.toLowerCase(),null];let[l,d]=await Promise.all([bn(n,s,Jh,r),bn(n,s,$h,r)]),p=eb(l),h=ai(d);return p?[a.toLowerCase(),{tokenAddress:s,symbol:p,decimals:h!==void 0?Number(h):18}]:[a.toLowerCase(),null]})),i={};for(let[a,s]of o)s&&(i[a]=s);return i}function Zc(e,t,r=!0){let o=r&&!!t,{allPools:i,isLoading:a}=To(e,o),{deposits:s,isLoading:l}=fa(e,t,o),d=ga(()=>{let u=new Map;for(let c of i)u.set(c.pool_address.toLowerCase(),c);return u},[i]),p=ga(()=>s.filter(u=>{try{return BigInt(u.deposited_amount||"0")>0n}catch{return!1}}),[s]),h=ga(()=>p.map(u=>u.pool_address.toLowerCase()).filter(u=>!d.has(u)).sort(),[p,d]),{data:b,isLoading:m}=Kh({queryKey:[Zh,e,h],queryFn:({signal:u})=>rb(e,h,u),enabled:o&&h.length>0,staleTime:1440*60*1e3});return{positions:ga(()=>{let u=[];for(let c of p){let y=c.pool_address.toLowerCase(),g=d.get(y);if(g){u.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=b?.[y];v&&u.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 u},[p,d,b]),isLoading:a||l||m}}import*as Gt from"react";import{Fragment as Xc,jsx as Se,jsxs as At}from"react/jsx-runtime";var nb=400;function ob(e,t,r){if(t==="loading")return"Estimating...";if(!e||t==="error"||t==="unavailable")return"Wallet estimate";let n=e.maxFeePerGas??e.gasPrice;return!n||n<=0n||e.gasLimit<=0n?"Wallet estimate":`${la(e.gasLimit*n)} ${r??""}`.trim()}function Ys(e,t,r){return r==="loading"?"Estimating...":r==="error"||r==="unavailable"?"-":`${e} ${t}`.trim()}function ib({position:e,size:t}){return e.icon?Se("img",{src:e.icon,alt:"",width:t,height:t}):Se("span",{children:e.tokenSymbol.slice(0,1)})}function Jc({open:e,status:t,positions:r,initialPoolAddress:n,walletAddress:o,txHash:i,error:a,copied:s=!1,estimateWithdraw:l,onClose:d,onConfirm:p,onCopyHash:h,trackFunnel:b,nativeSymbol:m}){let[w,f]=Gt.useState(null),[u,c]=Gt.useState("idle"),y=Gt.useRef(0),g=Gt.useRef(void 0),v=Gt.useRef(null);Gt.useEffect(()=>()=>clearTimeout(g.current),[]);let k=Gt.useMemo(()=>{let G=n?.toLowerCase();return r.find(E=>E.poolAddress.toLowerCase()===G)??r[0]??null},[r,n]),R=Gt.useMemo(()=>{try{return BigInt(k?.depositedRaw??"0")}catch{return 0n}},[k?.depositedRaw]),I=k?.decimals??18;Gt.useEffect(()=>{!e||!k||b?.("position_selected")},[e,k,b]);let C=Gt.useCallback(()=>{f(null),c(l?"idle":"unavailable"),y.current+=1,v.current=null},[]);if(Gt.useEffect(()=>{e&&C()},[e,C]),Gt.useEffect(()=>{if(!e||t!=="confirm"){clearTimeout(g.current);return}if(!l||!k){clearTimeout(g.current),c("unavailable");return}if(R<=0n){clearTimeout(g.current),y.current+=1,v.current=null,f(null),c("idle");return}let G=`${k.poolAddress.toLowerCase()}:${R.toString()}`;if(v.current===G)return;v.current=G,clearTimeout(g.current);let E=y.current+1;y.current=E,c("loading"),g.current=setTimeout(()=>{l(k,R).then(O=>{y.current===E&&(f(O??null),c(O?"ready":"unavailable"))}).catch(()=>{y.current===E&&(f(null),c("error"))})},nb)},[e,t,R,l,k]),!e||!k)return null;let S=t==="submitting",A=No(w?.maxPriorityFeePerGas),D=No(w?.maxFeePerGas??w?.gasPrice),U=sa(w?.gasLimit),M=ln(k.depositedRaw,I);return Se("div",{className:"wp-claim-overlay",role:"presentation",onMouseDown:G=>{G.target===G.currentTarget&&!S&&d()},children:At("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:[Se("div",{className:"wp-claim-grabber","aria-hidden":!0,children:Se("span",{})}),At("div",{className:"wp-claim-content wp-withdraw-content",children:[t==="success"&&i?At(Xc,{children:[Se("span",{className:"wp-claim-icon wp-claim-icon--success","aria-hidden":!0,children:Se(pa,{})}),At("div",{className:"wp-claim-copy",children:[Se("h3",{id:"wp-withdraw-title",className:"wp-claim-title",children:"Withdraw Submitted!"}),Se("p",{className:"wp-claim-desc",children:"Your withdrawal request has been submitted. Balances will update shortly after the transaction settles."})]}),Se("div",{className:"wp-claim-list","aria-label":"Withdraw transaction",children:At("div",{className:"wp-claim-list-item",children:[Se("span",{children:"Tx Hash"}),At("button",{type:"button",className:"wp-claim-hash",onClick:h,"aria-label":"Copy transaction hash","data-track":"withdraw_hash_copy",children:[Se("strong",{children:aa(i)}),s?Se(ca,{}):Se(da,{})]})]})})]}):At(Xc,{children:[t==="error"&&At("div",{className:"wp-claim-heading",children:[Se("h3",{id:"wp-withdraw-title",className:"wp-claim-title",children:"Withdraw Failed"}),Se("p",{className:"wp-claim-error-message",children:a||"The withdraw request could not be completed."})]}),At("div",{className:"wp-claim-reward-card","data-fit":ri(k.tokenSymbol,M),"aria-label":"Deposited balance",children:[Se("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:Se(ib,{position:k,size:28})}),Se("strong",{className:"wp-claim-reward-symbol",children:k.tokenSymbol}),Se("strong",{className:"wp-claim-reward-amount",children:M})]}),At("div",{className:"wp-claim-account-card","aria-label":"Withdraw gas fee",children:[At("div",{className:"wp-claim-account-row",children:[At("div",{className:"wp-claim-account",children:[Se("span",{className:"wp-claim-account-avatar","aria-hidden":!0}),At("strong",{children:[k.tokenSymbol," Pool"]})]}),Se("span",{children:ia(o)})]}),Se("span",{className:"wp-claim-divider","aria-hidden":!0}),At("div",{className:"wp-claim-detail-list",children:[At("div",{className:"wp-claim-detail-row",children:[Se("span",{children:"Est. Tx Fee"}),Se("strong",{children:ob(w,u,m)})]}),At("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[Se("span",{children:"Priority Fee Per Gas"}),Se("strong",{children:Ys(A,"Gwei",u)})]}),At("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[Se("span",{children:"Max Fee Per Gas"}),Se("strong",{children:Ys(D,"Gwei",u)})]}),At("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[Se("span",{children:"Gas Limit"}),Se("strong",{children:Ys(U,"",u)})]})]})]})]}),At("div",{className:"wp-claim-actions","data-count":t==="confirm"||t==="error"?2:1,children:[(t==="confirm"||t==="error")&&Se("button",{type:"button",className:"wp-claim-secondary","data-track":"withdraw_cancel",onClick:d,children:t==="error"?"Close":"Cancel"}),At("button",{type:"button",className:"wp-claim-primary","data-track":"withdraw_confirm",onClick:()=>{if(t==="success"){d();return}k&&R>0n&&p(k,R,w)},disabled:S||(t==="confirm"||t==="error")&&R<=0n,children:[t==="success"&&"Done",t==="submitting"&&Se("span",{className:"wp-claim-button-spinner","aria-label":"Waiting"}),t==="error"&&"Try Again",t==="confirm"&&"Withdraw Now"]})]})]}),Se("div",{className:"wp-claim-home-indicator","aria-hidden":!0,children:Se("span",{})})]})})}import*as Nt from"react";import{useQueryClient as lb}from"@tanstack/react-query";import{useQuery as ab}from"@tanstack/react-query";var sb="wp:reward-factory-info";function $c(e,t=!0){let{data:r,...n}=ab({queryKey:[sb,e],queryFn:async({signal:o})=>{let i=await Re("gameReward",e),a=await fetch(`${i}/v1/factory/info`,{cache:"no-store",signal:o});if(!a.ok)throw new Error(`Factory info fetch failed: ${a.status}`);let s=await a.json();if(s.code!==200)throw new Error(`Factory info API error: ${s.code}`);return s},enabled:t,staleTime:0});return{factoryInfo:r?.data??null,routerAddress:r?.data.router_address??"",...n}}var db="wp:";function ep(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?e:null}function tp(e){let{env:t,walletAddress:r,sendTransaction:n,estimateGas:o}=Ct(),i=!!r,a=!!n,s=lb(),{routerAddress:l}=$c(t,i&&a),d=ep(l),[p,h]=Nt.useState(!1),[b,m]=Nt.useState(void 0),[w,f]=Nt.useState("confirm"),[u,c]=Nt.useState(),[y,g]=Nt.useState(""),[v,k]=Nt.useState(!1),R=Nt.useRef(void 0);Nt.useEffect(()=>()=>clearTimeout(R.current),[]);let I=Nt.useRef(new Set),C=Nt.useCallback((O,ie)=>{I.current.has(O)||(I.current.add(O),_e("withdraw",O,{...ie,tags:{section:e,...ie?.tags}}))},[e]),S=Nt.useCallback((O,ie)=>d?{to:d,value:0n,data:Lc(O,ie),chainId:xt[t].cross}:null,[t,d]),A=Nt.useCallback(()=>{s.invalidateQueries({predicate:O=>typeof O.queryKey[0]=="string"&&O.queryKey[0].startsWith(db)})},[s]),D=Nt.useCallback(O=>{m(O),h(!0),f("confirm"),c(void 0),g(""),k(!1),I.current=new Set,C("opened")},[C]),U=Nt.useCallback(()=>{w!=="submitting"&&(h(!1),m(void 0),f("confirm"),c(void 0),g(""),k(!1),w==="success"&&A())},[w,A]),M=Nt.useCallback(async(O,ie)=>{if(!o)return null;let Y=S(O.poolId,ie),P=ep(r);return!Y||!P?null:o({...Y,from:P})},[S,o,r]),G=Nt.useCallback(async()=>{if(!(!u||typeof navigator>"u"||!navigator.clipboard))try{await navigator.clipboard.writeText(u),k(!0),clearTimeout(R.current),R.current=setTimeout(()=>k(!1),1400)}catch{k(!1)}},[u]),E=Nt.useCallback(async(O,ie,Y)=>{if(!n){f("error"),g("Withdraw is not available for this wallet.");return}if(!d){f("error"),g("Withdraw contract address is not available.");return}try{f("submitting"),g("");let P=S(O.poolId,ie);if(!P){f("error"),g("Withdraw contract address is not available.");return}C("submitted");let pe=await n({...P,gas:Y?.gasLimit&&Y.gasLimit>0n?Y.gasLimit:void 0,maxFeePerGas:Y?.maxFeePerGas&&Y.maxFeePerGas>0n?Y.maxFeePerGas:void 0,maxPriorityFeePerGas:Y?.maxPriorityFeePerGas&&Y.maxPriorityFeePerGas>0n?Y.maxPriorityFeePerGas:void 0});c(pe),f("success"),C("confirmed"),A()}catch(P){f("error"),g(ni(P,"Failed to request withdraw.")),C("confirmed",{status:"failure",reason:gr(P)})}},[S,A,d,n,C]);return{canWithdrawInline:a,isOpen:p,initialPoolAddress:b,status:w,txHash:u,error:y,copied:v,hasEstimator:!!o,openWithdraw:D,closeWithdraw:U,estimateWithdraw:M,confirmWithdraw:E,copyHash:G,trackFunnelOnce:C}}import{Fragment as pb,jsx as lr,jsxs as wn}from"react/jsx-runtime";var cb="ONEpoints";function np(){let{env:e,walletAddress:t,onOutlink:r}=Ct(),n=Er(),o=!!t,{getTokenImage:i,getNativeToken:a}=dn(e,o),s=tp("points"),{positions:l,isLoading:d}=Zc(e,t,o),p=rp.useMemo(()=>l.filter(Ac).map(m=>({...m,icon:i(m.tokenAddress,m.tokenSymbol)})),[l,i]),h=`${Mr[e]}/point.png`,b=jc[e];return wn(pb,{children:[lr(Ar,{sectionKey:"points",title:cb,icon:h,isEmpty:p.length===0,loading:d,children:p.map(m=>{let w=m.price?An(m.depositedRaw,m.decimals,m.price,n):null;return wn("article",{className:"wp-item","data-side":"reward",children:[wn("div",{className:"wp-item-body",children:[wn("div",{className:"wp-item-line",children:[lr("span",{className:"wp-item-label",children:"Token"}),wn("div",{className:"wp-svc-token",children:[m.icon&&lr("img",{className:"wp-svc-token-icon",src:m.icon,alt:""}),lr("span",{children:m.tokenSymbol})]})]}),wn("div",{className:"wp-item-line",children:[lr("span",{className:"wp-item-label",children:"Deposited"}),wn("div",{className:"wp-svc-token wp-svc-token--amount",children:[m.icon&&lr("img",{className:"wp-svc-token-icon",src:m.icon,alt:""}),wn("div",{className:"wp-svc-amount",children:[lr("span",{className:"wp-svc-amount-main",children:ln(m.depositedRaw,m.decimals)}),w&&lr("span",{className:"wp-item-usd",children:w})]})]})]})]}),lr("div",{className:"wp-item-tags",children:s.canWithdrawInline?lr("button",{type:"button",className:"wp-tag wp-tag--muted","data-track":"points_withdraw_open",onClick:()=>s.openWithdraw(m.poolAddress),children:lr("span",{className:"wp-tag-label",children:"Withdraw"})}):wn("a",{className:"wp-tag wp-tag--muted",href:b,target:"_blank",rel:"noopener noreferrer","data-track":"points_withdraw_open",onClick:f=>Pt(f,b,{category:"portfolio",origin:"portfolio-points",payload:{position:m}},r),children:[lr("span",{className:"wp-tag-label",children:"Withdraw"}),lr(wr,{size:12,className:"wp-tag-icon"})]})})]},m.poolAddress)})}),lr(Jc,{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:a()?.symbol})]})}import*as Ks from"react";import{useQuery as ub}from"@tanstack/react-query";var fb="wp:stake-info";function op(e,t,r=!0){let n=r&&!!t,{data:o,...i}=ub({queryKey:[fb,e,t],queryFn:async({signal:s})=>{let l=await Re("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:n,staleTime:0});return{stakeInfo:o?.data,...i}}import{useQuery as mb}from"@tanstack/react-query";var gb="wp:stake-rewards",hb=31;function ip(e,t,r=!0){let n=r&&!!t,{data:o,...i}=mb({queryKey:[gb,e,t],queryFn:async({signal:a})=>{let s=await Re("posa",e),l=await fetch(`${s}/rewards/${t}?limit=${hb}`,{cache:"no-store",signal:a});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:n,staleTime:0});return{latestReward:o?.[0]??null,aprAccrued:Mc(o),...i}}import{useQuery as bb}from"@tanstack/react-query";var wb="wp:staking-onchain";function ap(e,t,r=!0){let n=r&&!!t&&!!e,{data:o,...i}=bb({queryKey:[wb,e],queryFn:async()=>{if(!t)throw new Error("stakingRewardsReader not provided");return t(e)},enabled:n,staleTime:0});return{onchain:o,...i}}import{useMemo as sp}from"react";import yb from"bignumber.js";function lp(e){return e?.trim().toUpperCase()==="ONE"}function dp(e){return new yb(e||"0").isGreaterThan(0)}function ha(e,t,r=!0){let{allPools:n}=To(e,r),o=sp(()=>{for(let d of n)for(let p of[d.deposit_token,...d.reward_tokens])if(lp(p?.symbol)&&dp(p.price))return p.price},[n]),i=r&&o===void 0,{tokens:a}=En(e,t,i),{statsMap:s}=Mn(e,i),l=xt[e].cross;return sp(()=>{if(o)return o;let d=a.find(p=>p.chainId===l&&lp(p.symbol));if(d){let p=s.get(Tr(d.chainId,d.address));if(p&&dp(p.price))return p.price}return"0"},[o,a,s,l])}import Dn from"bignumber.js";import{jsx as Lr,jsxs as Ln}from"react/jsx-runtime";function xb(e){if(!e)return"\u2014";let t=new Dn(e);return t.isFinite()?`${t.toFormat(2,Dn.ROUND_DOWN)}%`:"\u2014"}function cp(){let{env:e,walletAddress:t,onOutlink:r,stakingRewardsReader:n}=Ct(),o=Er(),i=!!t,{stakeInfo:a,isLoading:s}=op(e,t,i),{latestReward:l,aprAccrued:d,isLoading:p}=ip(e,t,i),{onchain:h}=ap(t,n,i),b=ha(e,t,i),{getNativeToken:m}=dn(e,i),w=m()?.symbol,f="ONEstaking",u=`${Mr[e]}/cross-staking.png`,c=Gc[e],y=a?.total_stake??"0",g=Ks.useMemo(()=>h?new Dn(h.earnedWei.toString()).shiftedBy(-18).toString(10):l?.cumulative_earned??a?.rewards_earned??"0",[h,l,a]),v=Ks.useMemo(()=>h?new Dn(h.stakedWei.toString()).shiftedBy(-18):new Dn(y),[h,y]),k=d!==void 0?new Dn(d):void 0,R=a?.days_since_first_stake,I=k!==void 0&&k.isFinite()&&v.isGreaterThan(0)&&R!==null&&R!==void 0?k.div(v).times(365).div(Math.max(1,R)).times(100):void 0,C=!(new Dn(y).isZero()&&new Dn(g).isZero()),S=An(y,0,b,o),A=An(g,0,b,o);return Lr(Ar,{sectionKey:"staking",title:f,icon:u,iconFit:"contain",isEmpty:!C,loading:s||p,children:Ln("article",{className:"wp-item","data-side":"stake",children:[Ln("div",{className:"wp-item-body",children:[Ln("div",{className:"wp-item-line",children:[Lr("span",{className:"wp-item-label",children:"Staked"}),Ln("div",{className:"wp-svc-amount",children:[Lr("span",{className:"wp-svc-amount-main",children:`${Gs(y)} ${w??""}`.trim()}),S&&Lr("span",{className:"wp-item-usd",children:S})]})]}),Ln("div",{className:"wp-item-line",children:[Lr("span",{className:"wp-item-label",children:"Rewards Earned"}),Ln("div",{className:"wp-svc-amount",children:[Lr("span",{className:"wp-svc-amount-main",children:`${Gs(g)} ${w??""}`.trim()}),A&&Lr("span",{className:"wp-item-usd",children:A})]})]}),Ln("div",{className:"wp-item-line",children:[Lr("span",{className:"wp-item-label",children:"My APR"}),Lr("span",{children:xb(I?.toString(10))})]})]}),Lr("div",{className:"wp-item-tags",children:Ln("a",{className:"wp-tag wp-tag--mint",href:c,target:"_blank",rel:"noopener noreferrer","data-track":"stake_outlink",onClick:D=>Pt(D,c,{category:"portfolio",origin:"portfolio-stake",payload:{stakeInfo:a}},r),children:[Lr("span",{className:"wp-tag-label",children:"Manage"}),Lr(wr,{size:12,className:"wp-tag-icon"})]})})]})})}import*as Zs from"react";import{useQuery as vb}from"@tanstack/react-query";var kb="wp:game-swap-pools";function pp(e,t,r=!0){let n=r&&!!t,{data:o,...i}=vb({queryKey:[kb,e,t],queryFn:async({signal:a})=>{let s=await Re("gameSwap",e),l=await fetch(`${s}/addresses/${t}/portfolio`,{cache:"no-store",signal:a});if(!l.ok)throw new Error(`Game-swap portfolio fetch failed: ${l.status}`);return(await l.json()).pools??[]},enabled:n,staleTime:0});return{pools:o??[],...i}}import{useQuery as Rb}from"@tanstack/react-query";var Sb="wp:game-swap-lp-balances";function up(e,t,r,n){let o=[...r].map(l=>l.toLowerCase()).sort(),i=!!t&&o.length>0,{data:a,...s}=Rb({queryKey:[Sb,e,t,o,!!n],queryFn:async({signal:l})=>{let d=n?await n(o):await Kc(e,t,o,l),p={};for(let[h,b]of Object.entries(d))p[h.toLowerCase()]=b;return p},enabled:i,staleTime:0});return{balances:a??{},...s}}import yn from"bignumber.js";import{jsx as Dr,jsxs as Zr}from"react/jsx-runtime";var Cb="Gametoken LP",mp=18,Nb=new yn("0.0001");function fp(e){return e?.trim().toUpperCase()==="ONE"}function Tb(e){return e&&e>0?e:mp}function Ib(e){let t=fp(e.token_a?.symbol)&&!fp(e.token_b?.symbol),r=t?e.reserve_a:e.reserve_b,n=Tb(t?e.token_a?.decimals:e.token_b?.decimals),o=new yn(r||"0").shiftedBy(-n);return!o.isFinite()||o.isLessThanOrEqualTo(0)?new yn(0):o.times(2)}function Eb(e,t,r,n){let o=e.token_a?.symbol?.trim()||"TOKEN",i=e.token_b?.symbol?.trim()||n||"?",a=t?.decimals??mp,s,l;if(t&&t.totalSupply&&t.totalSupply>BigInt(0)){let d=new yn(t.balance.toString()),p=new yn(t.totalSupply.toString()),h=d.div(p);s=h.times(100);let b=h.times(Ib(e));if(b.isGreaterThan(0)){let m=new yn(e.quote_usd??e.cross_usd??"0");l=m.isGreaterThan(0)?to(b.times(m),r):`${b.toFormat(4,yn.ROUND_DOWN)} ${n??""}`.trim()}}return{pool:e,tokenASymbol:o,tokenBSymbol:i,info:t,lpAmountRaw:t?.balance.toString(),lpDecimals:a,sharePercent:s,valueText:l}}function gp(){let{env:e,walletAddress:t,onOutlink:r,lpBalanceReader:n}=Ct(),o=Er(),i=!!t,{pools:a,isLoading:s}=pp(e,t,i),l=Zs.useMemo(()=>a.map(c=>c.pair_address).filter(Boolean),[a]),{balances:d,isLoading:p}=up(e,t,l,n),{getNativeToken:h}=dn(e,i),b=h()?.symbol,m=`${Mr[e]}/game-token.png`,w=Object.keys(d).length>0,f=Zs.useMemo(()=>{let c=a.map(y=>Eb(y,d[y.pair_address?.toLowerCase()],o,b));return w?c.filter(y=>y.lpAmountRaw?new yn(y.lpAmountRaw).shiftedBy(-y.lpDecimals).isGreaterThanOrEqualTo(Nb):!1):c},[a,d,w,o,b]),u=c=>{let y=c.token_a?.address??c.pair_address;return`${_c[e]}/gametoken/tokens/${y}?trade=deposit`};return Dr(Ar,{sectionKey:"gameSwap",title:Cb,icon:m,iconFit:"contain",isEmpty:f.length===0,loading:s||p,children:f.map(c=>{let{pool:y}=c,g=u(y),v=`${c.tokenASymbol} / ${c.tokenBSymbol}`,k=y.token_a?.logo_url,R=y.token_b?.logo_url;return Zr("article",{className:"wp-item","data-side":"game-swap",children:[Zr("div",{className:"wp-item-body",children:[Zr("div",{className:"wp-item-line",children:[Dr("span",{className:"wp-item-label",children:"Pool"}),Zr("div",{className:"wp-svc-token",children:[Zr("span",{className:"wp-token-stack","aria-hidden":!0,children:[k&&Dr("img",{className:"wp-svc-token-icon",src:k,alt:""}),R&&Dr("img",{className:"wp-svc-token-icon",src:R,alt:""})]}),Dr("span",{children:v})]})]}),c.lpAmountRaw!==void 0&&Zr("div",{className:"wp-item-line",children:[Dr("span",{className:"wp-item-label",children:"My LP"}),Zr("span",{children:[ln(c.lpAmountRaw,c.lpDecimals)," LP"]})]}),c.sharePercent!==void 0&&Zr("div",{className:"wp-item-line",children:[Dr("span",{className:"wp-item-label",children:"Pool Share"}),Zr("span",{children:[c.sharePercent.toFormat(2,yn.ROUND_DOWN),"%"]})]}),c.valueText!==void 0&&Zr("div",{className:"wp-item-line",children:[Dr("span",{className:"wp-item-label",children:"Value"}),Dr("span",{children:c.valueText})]})]}),Dr("div",{className:"wp-item-tags",children:Zr("a",{className:"wp-tag wp-tag--mint",href:g,target:"_blank",rel:"noopener noreferrer","data-track":"gameswap_outlink","data-track-id":v,onClick:I=>Pt(I,g,{category:"portfolio",origin:"portfolio-game-swap",payload:{pool:y}},r),children:[Dr("span",{className:"wp-tag-label",children:"Manage"}),Dr(wr,{size:12,className:"wp-tag-icon"})]})})]},y.pair_address)})})}import ro from"bignumber.js";import{useMemo as Bb}from"react";import{useQuery as Mb}from"@tanstack/react-query";var Ab="wp:forge-pools";function hp(e,t,r=!0){let n=r&&!!t,{data:o,...i}=Mb({queryKey:[Ab,e,t],queryFn:async()=>{let s=await Re("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:n,staleTime:0}),a=o??[];return{pools:a,isEmpty:a.length===0,...i}}import{useQueries as Lb}from"@tanstack/react-query";import{useMemo as Db}from"react";var Pb="wp:forge-token-detail";async function Ob(e,t){let r=await fetch(`${e}/v1/tokens/${t}`,{cache:"no-store"});return r.ok?(await r.json())?.data?.token??null:null}function bp(e,t,r=!0){let n=Lb({queries:t.map(a=>({queryKey:[Pb,e,a],queryFn:async()=>Ob(await Re("bondingCurve",e),a),enabled:r&&!!a,staleTime:3e4}))}),o=Db(()=>{let a=new Map;for(let s=0;s<n.length;s++){let l=n[s]?.data,d=t[s];l&&d&&a.set(d.toLowerCase(),l)}return a},[n,t]),i=n.some(a=>a.isLoading);return{detailMap:o,isLoading:i}}import{jsx as dr,jsxs as Pn}from"react/jsx-runtime";var zb="ONEforge",wp=18,Fb="https://contents.crosstoken.io/wallet/token/images/FT.png";function Ub(e){if(!e||e==="0")return"0";let t=new ro(e).shiftedBy(-wp);return t.isZero()?"0":t.isGreaterThanOrEqualTo(1)?t.toFormat(2,ro.ROUND_DOWN):t.toFormat(4,ro.ROUND_DOWN)}function jb(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 Wb(e,t,r,n){let o=new ro(r||"0");if(!o.isGreaterThan(0))return null;let i=new ro(e.total_supply||"0"),a=new ro(e.lp_balance||"0"),s=new ro(t?.reserve_b||"0").shiftedBy(-wp);if(!i.isGreaterThan(0)||!a.isGreaterThan(0)||!s.isGreaterThan(0))return null;let l=s.times(2),p=a.div(i).times(l).times(o);return p.isFinite()?to(p,n):null}function yp(){let{env:e,walletAddress:t,onOutlink:r}=Ct(),n=Er(),o=!!t,{pools:i,isEmpty:a,isLoading:s}=hp(e,t,o),l=Bb(()=>i.map(m=>m.token.address),[i]),{detailMap:d}=bp(e,l,o&&l.length>0),p=ha(e,t,o),h=m=>`${Wc[e]}/forge/token/${m.token.address}`,b=`${Mr[e]}/forge.png`;return dr(Ar,{sectionKey:"forge",title:zb,icon:b,iconFit:"contain",isEmpty:a,loading:s,children:i.map(m=>{let w=d.get(m.token.address.toLowerCase()),f=w?.image_url||w?.image||m.token.image||Fb,u=w?.symbol||m.token.symbol,c=h(m),y=Wb(m,w,p,n);return Pn("a",{className:"wp-item","data-side":"lp",href:c,target:"_blank",rel:"noopener noreferrer","data-track":"forge_outlink","data-track-id":u,onClick:g=>Pt(g,c,{category:"portfolio",origin:"portfolio-forge",payload:{pool:m,tokenDetail:w}},r),children:[Pn("div",{className:"wp-item-body",children:[Pn("div",{className:"wp-item-line",children:[dr("span",{className:"wp-item-label",children:"Asset"}),Pn("div",{className:"wp-svc-token",children:[dr("img",{className:"wp-svc-token-icon",src:f,alt:""}),dr("span",{children:u}),w?.name&&dr("span",{className:"wp-token-subtle",children:w.name})]})]}),Pn("div",{className:"wp-item-line",children:[dr("span",{className:"wp-item-label",children:"LP Balance"}),dr("div",{className:"wp-svc-token wp-svc-token--amount",children:Pn("div",{className:"wp-svc-amount",children:[dr("span",{className:"wp-svc-amount-main",children:Ub(m.lp_balance)}),y&&dr("span",{className:"wp-item-usd",children:y})]})})]}),Pn("div",{className:"wp-item-line",children:[dr("span",{className:"wp-item-label",children:"Ownership"}),dr("span",{className:"wp-line-value",children:jb(m.pool_ownership)})]})]}),dr("div",{className:"wp-item-tags",children:Pn("span",{className:"wp-tag wp-tag--muted",children:[dr("span",{className:"wp-tag-label",children:"Withdraw"}),dr(wr,{size:12,className:"wp-tag-icon"})]})})]},m.pair_address)})})}import{useMemo as Lp}from"react";import u0 from"bignumber.js";import{useQuery as Gb}from"@tanstack/react-query";var _b="wp:crossd-positions";function Hb(e){let t=e??{};return(t.positions??t.data?.positions??[]).filter(n=>{if(!n?.token_id||!n.liquidity)return!1;try{return BigInt(n.liquidity)>0n}catch{return!1}})}function xp(e,t,r=!0){let n=r&&!!t,{data:o,...i}=Gb({queryKey:[_b,e,t],queryFn:async()=>{let s=await fetch(`${ma[e]}/api/v1/positions?owner=${t}`,{cache:"no-store"});if(!s.ok)throw new Error(`crossd positions fetch failed: ${s.status}`);return Hb(await s.json())},enabled:n,staleTime:0}),a=o??[];return{positions:a,isEmpty:a.length===0,...i}}import{useQueries as Qb}from"@tanstack/react-query";import{useMemo as Vb}from"react";var qb="wp:crossd-position-details";function Yb(e){let t=e??{},r=t.data??t;return r?.token_id||r?.pool?r:null}function vp(e,t,r=!0){let n=Qb({queries:t.map(i=>({queryKey:[qb,e,i],queryFn:async()=>{let a=await fetch(`${ma[e]}/api/v1/positions/${i}`,{cache:"no-store"});if(!a.ok)throw new Error(`crossd position detail failed: ${a.status}`);return Yb(await a.json())},enabled:r&&!!i,staleTime:6e4}))});return{detailMap:Vb(()=>{let i=new Map;return n.forEach((a,s)=>{let l=a.data,d=t[s];l&&d&&i.set(d,l)}),i},[n,t])}}import*as xn from"react";import{Fragment as Rp,jsx as ke,jsxs as _t}from"react/jsx-runtime";var Kb=300*1e3,kp="https://contents.crosstoken.io/wallet/token/images/Cross.svg";function Zb(e,t,r){if(t)return"Estimating...";if(!e)return"Wallet estimate";let n=e.maxFeePerGas??e.gasPrice;return!n||n<=0n||e.gasLimit<=0n?"Wallet estimate":`${la(e.gasLimit*n)} ${r??""}`.trim()}function Xs(e,t,r){return r?"Estimating...":`${e} ${t}`.trim()}function Sp({open:e,status:t,target:r,token0Icon:n,token1Icon:o,token0Symbol:i,token1Symbol:a,nativeSymbol:s,txHash:l,error:d,copied:p=!1,hasEstimator:h,prepareWithdraw:b,confirmWithdraw:m,onClose:w,onCopyHash:f,trackFunnel:u}){let[c,y]=xn.useState(null),[g,v]=xn.useState(null),k=xn.useRef(0);xn.useEffect(()=>{if(!e||!r)return;let V=++k.current;y(null),v(null),u?.("dialog_opened"),b().then(le=>{k.current===V&&(y(le),v(le?Date.now():null))})},[e,r]);let R=t==="submitting",I=t==="estimating"||t==="confirm"&&!c,C=xn.useCallback(async()=>{let V=c,le=!g||Date.now()-g>Kb;if(!V||le){let he=++k.current;if(V=await b(),k.current!==he)return;y(V),v(V?Date.now():null)}V&&await m(V)},[c,g,b,m]);if(!e||!r)return null;let{position:S,detail:A}=r,D=A.pool?.token0,U=A.pool?.token1,M=i||D?.symbol||S.pool?.token0_symbol||"?",G=a||U?.symbol||S.pool?.token1_symbol||"?",E=D?.decimals??18,O=U?.decimals??18,ie=n||D?.logo_url||kp,Y=o||U?.logo_url||kp,P=`${M}/${G}`,pe=c?So(c.expectedAmount0.toString(),E):null,$=c?So(c.expectedAmount1.toString(),O):null,Q=No(c?.estimate?.maxPriorityFeePerGas),B=No(c?.estimate?.maxFeePerGas??c?.estimate?.gasPrice),J=sa(c?.estimate?.gasLimit);return ke("div",{className:"wp-claim-overlay",role:"presentation",onMouseDown:V=>{V.target===V.currentTarget&&!R&&w()},children:_t("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:[ke("div",{className:"wp-claim-grabber","aria-hidden":!0,children:ke("span",{})}),_t("div",{className:"wp-claim-content wp-withdraw-content",children:[t==="success"&&l?_t(Rp,{children:[ke("span",{className:"wp-claim-icon wp-claim-icon--success","aria-hidden":!0,children:ke(pa,{})}),_t("div",{className:"wp-claim-copy",children:[ke("h3",{id:"wp-crossd-withdraw-title",className:"wp-claim-title",children:"Withdraw Submitted!"}),_t("p",{className:"wp-claim-desc",children:["Your ",P," position withdrawal has been submitted. Balances will update shortly after the transaction settles."]})]}),ke("div",{className:"wp-claim-list","aria-label":"Withdraw transaction",children:_t("div",{className:"wp-claim-list-item",children:[ke("span",{children:"Tx Hash"}),_t("button",{type:"button",className:"wp-claim-hash",onClick:f,"aria-label":"Copy transaction hash","data-track":"crossd_withdraw_hash_copy",children:[ke("strong",{children:aa(l)}),p?ke(ca,{}):ke(da,{})]})]})})]}):_t(Rp,{children:[t==="error"&&_t("div",{className:"wp-claim-heading",children:[ke("h3",{id:"wp-crossd-withdraw-title",className:"wp-claim-title",children:"Withdraw Failed"}),ke("p",{className:"wp-claim-error-message",children:d||"The withdraw request could not be completed."})]}),_t("div",{className:"wp-claim-reward-card","data-fit":ri(M,pe??""),"aria-label":`Expected ${M}`,children:[ke("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:ke("img",{src:ie,alt:"",width:28,height:28})}),ke("strong",{className:"wp-claim-reward-symbol",children:M}),ke("strong",{className:"wp-claim-reward-amount",children:pe??"Estimating..."})]}),_t("div",{className:"wp-claim-reward-card","data-fit":ri(G,$??""),"aria-label":`Expected ${G}`,children:[ke("span",{className:"wp-claim-reward-token","aria-hidden":!0,children:ke("img",{src:Y,alt:"",width:28,height:28})}),ke("strong",{className:"wp-claim-reward-symbol",children:G}),ke("strong",{className:"wp-claim-reward-amount",children:$??"Estimating..."})]}),h&&ke("div",{className:"wp-claim-account-card","aria-label":"Withdraw gas fee",children:_t("div",{className:"wp-claim-detail-list",children:[_t("div",{className:"wp-claim-detail-row",children:[ke("span",{children:"Est. Tx Fee"}),ke("strong",{children:Zb(c?.estimate,I,s)})]}),_t("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[ke("span",{children:"Priority Fee Per Gas"}),ke("strong",{children:Xs(Q,"Gwei",I)})]}),_t("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[ke("span",{children:"Max Fee Per Gas"}),ke("strong",{children:Xs(B,"Gwei",I)})]}),_t("div",{className:"wp-claim-detail-row wp-claim-detail-row--sub",children:[ke("span",{children:"Gas Limit"}),ke("strong",{children:Xs(J,"",I)})]})]})})]}),_t("div",{className:"wp-claim-actions","data-count":t==="confirm"||t==="error"?2:1,children:[(t==="confirm"||t==="error")&&ke("button",{type:"button",className:"wp-claim-secondary","data-track":"crossd_withdraw_cancel",onClick:w,children:t==="error"?"Close":"Cancel"}),ke("button",{type:"button",className:"wp-claim-primary","data-track":"crossd_withdraw_confirm",onClick:()=>{if(t==="success"){w();return}R||I||(u?.("confirm_clicked"),C())},disabled:R||I,children:t==="success"?"Done":R?ke("span",{className:"wp-claim-button-spinner","aria-label":"Waiting"}):I?ke("span",{className:"wp-claim-button-spinner","aria-label":"Estimating"}):t==="error"?"Retry":"Withdraw"})]})]}),ke("div",{className:"wp-claim-home-indicator","aria-hidden":!0,children:ke("span",{})})]})})}import*as gt from"react";import{useQueryClient as l0}from"@tanstack/react-query";var Xb="0x0c49ccbe",Jb="0xfc6f7865",$b="0x49404b7c",e0="0xdf2ab5bb",t0="0xac9650d8",Cp=(1n<<128n)-1n,Tp=600n,r0=99n,n0=100n;function Js(e){return e*r0/n0}function Np(e,t){return!!e&&!!t&&e.toLowerCase()===t.toLowerCase()}function cr(e,t){if(e<0n)throw new Error(`${t} must be non-negative`);let r=e.toString(16);if(r.length>64)throw new Error(`${t} exceeds uint256`);return r.padStart(64,"0")}function ba(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 $s(e){return Xb+cr(e.tokenId,"tokenId")+cr(e.liquidity,"liquidity")+cr(e.amount0Min,"amount0Min")+cr(e.amount1Min,"amount1Min")+cr(e.deadline,"deadline")}function o0(e){return Jb+cr(e.tokenId,"tokenId")+ba(e.recipient,"recipient")+cr(e.amount0Max,"amount0Max")+cr(e.amount1Max,"amount1Max")}function i0(e,t){return $b+cr(e,"amountMinimum")+ba(t,"recipient")}function a0(e,t,r){return e0+ba(e,"token")+cr(t,"amountMinimum")+ba(r,"recipient")}function s0(e){if(e.length===0)throw new Error("multicall requires at least one call");let t=e.map(o=>{let i=o.replace(/^0x/,"");if(i.length%2!==0||!/^[0-9a-fA-F]*$/.test(i))throw new Error("multicall element must be valid hex bytes");let a=i.length%64===0?i:i.padEnd(i.length+(64-i.length%64),"0");return cr(BigInt(i.length/2),"callLength")+a.toLowerCase()}),r=BigInt(e.length)*32n,n=[];for(let o of t)n.push(cr(r,"callOffset")),r+=BigInt(o.length/2);return t0+cr(0x20n,"arrayOffset")+cr(BigInt(e.length),"arrayLength")+n.join("")+t.join("")}function Ip(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 Ep(e){let t=Np(e.token0,e.wcrossAddress),r=Np(e.token1,e.wcrossAddress),n=t||r,o=[$s({tokenId:e.tokenId,liquidity:e.liquidity,amount0Min:e.amount0Min,amount1Min:e.amount1Min,deadline:e.deadline}),o0({tokenId:e.tokenId,recipient:n?e.positionManagerAddress:e.owner,amount0Max:Cp,amount1Max:Cp})];return n&&(o.push(i0(0n,e.owner)),o.push(a0(t?e.token1:e.token0,0n,e.owner))),s0(o)}async function Mp(e,t,r){let n;try{n=await si(e,r)}catch{n=void 0}if(!n)return null;let o=$s({tokenId:t.tokenId,liquidity:t.liquidity,amount0Min:0n,amount1Min:0n,deadline:t.deadline}),i=await bn(n,t.positionManager,o,r,t.owner);return Ip(i)}var d0="wp:",c0=[1500,3e3,4500,6e3];function p0(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?e:null}function Ap(){let{env:e,walletAddress:t,sendTransaction:r,estimateGas:n}=Ct(),o=!!r,i=l0(),[a,s]=gt.useState(!1),[l,d]=gt.useState(null),[p,h]=gt.useState("confirm"),[b,m]=gt.useState(),[w,f]=gt.useState(""),[u,c]=gt.useState(!1),[y,g]=gt.useState(new Set),v=gt.useRef(void 0),k=gt.useRef([]),R=gt.useRef(0);gt.useEffect(()=>()=>{clearTimeout(v.current),k.current.forEach(clearTimeout)},[]);let I=gt.useRef(new Set),C=gt.useCallback((E,O)=>{I.current.has(E)||(I.current.add(E),_e("withdraw",E,{...O,tags:{section:"crossdPool",...O?.tags}}))},[]),S=gt.useCallback(()=>{let E=()=>i.invalidateQueries({predicate:O=>typeof O.queryKey[0]=="string"&&O.queryKey[0].startsWith(d0)});E(),k.current.forEach(clearTimeout),k.current=c0.map(O=>setTimeout(E,O))},[i]),A=gt.useCallback(E=>{R.current+=1,d(E),s(!0),h("confirm"),m(void 0),f(""),c(!1),I.current=new Set,C("opened")},[C]),D=gt.useCallback(()=>{p!=="submitting"&&(R.current+=1,s(!1),d(null),h("confirm"),m(void 0),f(""),c(!1))},[p]),U=gt.useCallback(async()=>{let E=R.current,O=p0(t),ie=l?.position.token_id,Y=l?.position.liquidity,P=l?.detail.pool?.token0?.address,pe=l?.detail.pool?.token1?.address;if(!O||!ie||!Y||!P||!pe)return h("error"),f("Position data is incomplete. Please refresh and retry."),null;try{h("estimating"),f("");let $=BigInt(ie),Q=BigInt(Y),B=BigInt(Math.floor(Date.now()/1e3))+Tp,J=Qc[e],V=await Mp(e,{owner:O,positionManager:J,tokenId:$,liquidity:Q,deadline:B});if(R.current!==E)return null;if(!V)return h("error"),f("Failed to estimate withdrawal amounts. Please retry."),null;let le=Ep({tokenId:$,liquidity:Q,amount0Min:Js(V.amount0),amount1Min:Js(V.amount1),deadline:B,owner:O,positionManagerAddress:J,token0:P,token1:pe,wcrossAddress:Vc[e]}),he={to:J,value:0n,data:le,chainId:xt[e].cross},ee=null;if(n){try{ee=await n({...he,from:O})}catch{ee=null}if(R.current!==E)return null}return h("confirm"),{tx:he,estimate:ee,expectedAmount0:V.amount0,expectedAmount1:V.amount1}}catch($){return R.current!==E||(h("error"),f(ni($,"Failed to prepare withdraw."))),null}},[e,n,l,t]),M=gt.useCallback(async E=>{if(!r){h("error"),f("Withdraw is not available for this wallet.");return}try{h("submitting"),f(""),C("submitted");let O=await r({...E.tx,gas:E.estimate?.gasLimit&&E.estimate.gasLimit>0n?E.estimate.gasLimit:void 0,maxFeePerGas:E.estimate?.maxFeePerGas&&E.estimate.maxFeePerGas>0n?E.estimate.maxFeePerGas:void 0,maxPriorityFeePerGas:E.estimate?.maxPriorityFeePerGas&&E.estimate.maxPriorityFeePerGas>0n?E.estimate.maxPriorityFeePerGas:void 0});m(O),h("success");let ie=l?.position.token_id;ie&&g(Y=>{let P=new Set(Y);return P.add(ie),P}),C("confirmed"),S()}catch(O){h("error"),f(ni(O,"Failed to request withdraw.")),C("confirmed",{status:"failure",reason:gr(O)})}},[S,r,l,C]),G=gt.useCallback(async()=>{if(!(!b||typeof navigator>"u"||!navigator.clipboard))try{await navigator.clipboard.writeText(b),c(!0),clearTimeout(v.current),v.current=setTimeout(()=>c(!1),1400)}catch{c(!1)}},[b]);return{canWithdrawInline:o,isOpen:a,target:l,withdrawnTokenIds:y,status:p,txHash:b,error:w,copied:u,hasEstimator:!!n,openWithdraw:A,closeWithdraw:D,prepareWithdraw:U,confirmWithdraw:M,copyHash:G,trackFunnelOnce:C}}import{Fragment as m0,jsx as pr,jsxs as On}from"react/jsx-runtime";var f0="ONEusd Pool",Dp="https://contents.crosstoken.io/wallet/token/images/Cross.svg";function Pp(){let{env:e,walletAddress:t,onOutlink:r}=Ct(),n=Er(),o=!!t,{positions:i,isLoading:a}=xp(e,t,o),s=Ap(),l=Lp(()=>i.filter(C=>!C.token_id||!s.withdrawnTokenIds.has(C.token_id)),[i,s.withdrawnTokenIds]),d=Lp(()=>l.map(C=>C.token_id).filter(C=>!!C),[l]),{detailMap:p}=vp(e,d,o&&d.length>0),h=`${Hc[e]}/pool`,{getTokenImage:b,getTokenSymbol:m,getNativeToken:w}=dn(e,o),f=b("","ONEUSD",{chainOnly:!0})||`${Mr[e]}/crossd.png`,u={chainOnly:!0},c=(C,S)=>{let A=Ws(m(C?.address??"",C?.symbol??S,u));return A==="ONE"?w()?.symbol??"?":A??"?"},y=(C,S)=>{let A=C?.symbol??S,D=Ws(A);return D==="ONE"?w()?.image||Dp:b(C?.address??"",D,u)||C?.logo_url||Dp},g=s.target?.detail.pool,v=y(g?.token0,s.target?.position.pool?.token0_symbol),k=y(g?.token1,s.target?.position.pool?.token1_symbol),R=c(g?.token0,s.target?.position.pool?.token0_symbol),I=c(g?.token1,s.target?.position.pool?.token1_symbol);return On(m0,{children:[pr(Ar,{sectionKey:"crossdPool",title:f0,icon:f,iconFit:"contain",isEmpty:l.length===0,loading:a,children:l.map(C=>{let S=C.token_id?p.get(C.token_id):void 0,A=`${c(S?.pool?.token0,C.pool?.token0_symbol)}/${c(S?.pool?.token1,C.pool?.token1_symbol)}`,D=C.pool?.fee_tier_percentage,U=y(S?.pool?.token0,C.pool?.token0_symbol),M=y(S?.pool?.token1,C.pool?.token1_symbol),G=to(new u0(C.position_value_usd??"0"),n),E=s.canWithdrawInline&&!!S?.pool?.token0?.address&&!!S?.pool?.token1?.address;return On("article",{className:"wp-item","data-side":"crossd",children:[On("div",{className:"wp-item-body",children:[On("div",{className:"wp-item-line",children:[pr("span",{className:"wp-item-label",children:"Pool"}),On("div",{className:"wp-svc-token",children:[On("span",{className:"wp-token-stack","aria-hidden":!0,children:[pr("img",{className:"wp-svc-token-icon",src:U,alt:""}),pr("img",{className:"wp-svc-token-icon",src:M,alt:""})]}),pr("span",{children:A}),D&&pr("span",{className:"wp-token-subtle",children:D})]})]}),On("div",{className:"wp-item-line",children:[pr("span",{className:"wp-item-label",children:"Position Value"}),pr("span",{className:"wp-line-value",children:G})]})]}),pr("div",{className:"wp-item-tags",children:E?pr("button",{type:"button",className:"wp-tag wp-tag--muted","data-track":"crossd_pool_withdraw_open","data-track-id":A,onClick:()=>{S&&s.openWithdraw({position:C,detail:S})},children:pr("span",{className:"wp-tag-label",children:"Withdraw"})}):On("a",{className:"wp-tag wp-tag--muted",href:h,target:"_blank",rel:"noopener noreferrer","data-track":"crossd_pool_outlink","data-track-id":A,onClick:O=>Pt(O,h,{category:"portfolio",origin:"portfolio-crossd-pool",payload:{position:C,detail:S}},r),children:[pr("span",{className:"wp-tag-label",children:"Withdraw"}),pr(wr,{size:12,className:"wp-tag-icon"})]})})]},C.token_id)})}),pr(Sp,{open:s.isOpen,status:s.status,target:s.target,token0Icon:v,token1Icon:k,token0Symbol:R,token1Symbol:I,nativeSymbol:w()?.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 wa=["rewards","points","staking","gameSwap","forge","crossdPool"];de(`.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-system-orange-default, #f0640d);--wp-green: var(--ds-accent-primary-default, #00a0a2);--wp-accent-soft: var(--ds-system-orange-lowest, #2e2820);--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-system-orange-default, #f0640d);--wp-green: var(--ds-accent-primary-default, #00a0a2);--wp-accent-soft: var(--ds-system-orange-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-svc-items,.wp-claim-content{padding:18px 14px}.wp-item-line{gap:10px}.wp-svc-token>span{max-width:168px}}.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
|
+
`);import{Fragment as b0,jsx as He,jsxs as vn}from"react/jsx-runtime";var el=15,h0="wp:";function Io({env:e,theme:t="light",walletAddress:r,walletName:n,onBack:o,showHeader:i=!0,variant:a="embed",className:s,onOutlink:l,lpBalanceReader:d,stakingRewardsReader:p,sendTransaction:h,estimateGas:b,conversionRatio:m,currencySymbol:w,sections:f}){let u=nt(e),c=Tt.useCallback(ee=>!f||f.includes(ee),[f]),y=!!r,g=g0(),[v,k]=Tt.useState({}),R=Tt.useCallback((ee,ce)=>{k(We=>{let we=We[ee];return we&&we.loading===ce.loading&&we.empty===ce.empty?We:{...We,[ee]:ce}})},[]),I=Tt.useCallback(ee=>{k(ce=>{if(!(ee in ce))return ce;let We={...ce};return delete We[ee],We})},[]),C=Tt.useMemo(()=>({report:R,unregister:I}),[R,I]),[S,A]=Tt.useState(el),[D,U]=Tt.useState(!1),[M,G]=Tt.useState(!1),E=Tt.useRef(void 0),O=Tt.useCallback(()=>{g.invalidateQueries({predicate:ee=>typeof ee.queryKey[0]=="string"&&ee.queryKey[0].startsWith(h0)})},[g]),ie=Tt.useCallback(()=>{O(),U(!0),setTimeout(()=>U(!1),600),A(el)},[O]);Tt.useEffect(()=>{if(!y)return;let ee=setInterval(()=>{A(ce=>ce<=1?(ie(),el):ce-1)},1e3);return()=>clearInterval(ee)},[y,ie]);let Y=Tt.useCallback(()=>{o?.()},[o]),P=y?hn(u,r,{size:64}):void 0,pe=Tt.useCallback(async()=>{if(!(M||!r))try{await navigator.clipboard.writeText(r),G(!0),clearTimeout(E.current),E.current=setTimeout(()=>G(!1),2e3)}catch{}},[r,M]);Tt.useEffect(()=>()=>clearTimeout(E.current),[]);let $=Tt.useMemo(()=>({env:u,theme:t,open:!0,walletAddress:r,close:Y,onOutlink:l,lpBalanceReader:d,stakingRewardsReader:p,sendTransaction:h,estimateGas:b,conversionRatio:m,currencySymbol:w}),[u,t,r,Y,l,d,p,h,b,m,w]),Q=wa.filter(c),B=Q.length>0&&Q.every(ee=>{let ce=v[ee];return!!ce&&!ce.loading}),J=B&&Q.every(ee=>v[ee]?.empty),V=Q.some(ee=>{let ce=v[ee];return!!ce&&!ce.empty}),le=Q.length>0&&!B&&!V,he=vn(b0,{children:[i&&vn("div",{className:"wp-header",children:[vn("div",{className:"wp-header-account",children:[o&&He("button",{type:"button",className:"wp-header-btn","aria-label":"Back","data-track":"back",onClick:o,children:He(Bc,{})}),He("span",{className:"wp-header-avatar","aria-hidden":!0,children:P&&He("img",{src:P,alt:"",className:"wp-header-avatar-img",draggable:!1})}),(n||r)&&vn("div",{className:"wp-header-account-meta",children:[n&&He("span",{className:"wp-header-wallet-name",title:n,children:n}),r&&vn("button",{type:"button",className:"wp-header-address-btn",onClick:pe,"aria-label":"Copy wallet address","data-track":"address_copy",children:[He("span",{className:"wp-header-address",children:ia(r)}),He("span",{className:"wp-header-address-copy","data-copied":M,children:M?He(mn,{size:14}):He(Zn,{size:14})})]})]})]}),vn("button",{type:"button",className:"wp-header-btn wp-refresh-btn","aria-label":"Refresh portfolio","data-track":"refresh",onClick:ie,children:[He(zc,{className:D?"wp-spin-once":void 0}),y&&He("span",{className:"wp-refresh-badge",children:S})]})]}),He("div",{className:"wp-body",children:vn("div",{className:"wp-body-inner","data-empty":J||void 0,children:[c("rewards")&&He(Yc,{}),c("points")&&He(np,{}),c("staking")&&He(cp,{}),c("gameSwap")&&He(gp,{}),c("forge")&&He(yp,{}),c("crossdPool")&&He(Pp,{}),le&&He("div",{className:"wp-portfolio-loading",role:"status","aria-label":"Loading portfolio",children:He("span",{className:"wp-portfolio-spinner","aria-hidden":!0})}),J&&vn("div",{className:"wp-portfolio-empty",role:"status",children:[He("span",{className:"wp-portfolio-empty-icon","aria-hidden":!0,children:vn("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[He("path",{d:"M20 7H5a2 2 0 0 1-2-2 2 2 0 0 1 2-2h13v4"}),He("path",{d:"M3 5v13a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1"}),He("circle",{cx:"16.5",cy:"13.5",r:"1",fill:"currentColor",stroke:"none"})]})}),He("p",{className:"wp-portfolio-empty-title",children:"No assets yet"}),He("p",{className:"wp-portfolio-empty-desc",children:"Assets you hold across ONE services will appear here."})]})]})})]});return He(ii.Provider,{value:$,children:He(_s.Provider,{value:C,children:He(ge,{feature:"wallet_portfolio",children:a==="none"?he:He("div",{className:Ne(a==="fullscreen"?"wp-fullscreen":"wp-embed",s),"data-theme":t,children:he})})})})}import{jsx as tl,jsxs as Op}from"react/jsx-runtime";function Bp({className:e}){let{env:t,theme:r,walletAddress:n,close:o,onOutlink:i,lpBalanceReader:a,stakingRewardsReader:s}=Ct();return Op(ya.Portal,{children:[tl(ya.Overlay,{className:"wp-overlay"}),Op(ya.Content,{className:Ne("wp-fullscreen",e),"data-theme":r,children:[tl(ya.Title,{className:"wp-sr-only",children:"Portfolio"}),tl(Io,{env:t,theme:r,walletAddress:n,onBack:o,variant:"none",onOutlink:i,lpBalanceReader:a,stakingRewardsReader:s})]})]})}import{jsx as zp}from"react/jsx-runtime";function y0({env:e,theme:t="light",walletAddress:r,open:n,onOpenChange:o,onOutlink:i,lpBalanceReader:a,stakingRewardsReader:s,sendTransaction:l,estimateGas:d,conversionRatio:p,currencySymbol:h,children:b}){let m=nt(e),w=n!==void 0,[f,u]=no.useState(!1),c=w?n:f,y=no.useCallback(k=>{w||u(k),o?.(k)},[w,o]),g=no.useCallback(()=>y(!1),[y]),v=no.useMemo(()=>({env:m,theme:t,open:c,walletAddress:r,close:g,onOutlink:i,lpBalanceReader:a,stakingRewardsReader:s,sendTransaction:l,estimateGas:d,conversionRatio:p,currencySymbol:h}),[m,t,c,r,g,i,a,s,l,d,p,h]);return zp(ii.Provider,{value:v,children:zp(w0.Root,{direction:"bottom",open:c,onOpenChange:y,noBodyStyles:!0,children:b})})}var Fp=Object.assign(y0,{Trigger:Pc,Content:Bp});import*as q from"react";import{createPortal as Mo}from"react-dom";import Or from"bignumber.js";import*as xa from"react";var Up=120;function jp(e){return e instanceof HTMLElement&&e.matches("input, textarea, select")}function Wp(){let[e,t]=xa.useState(!1);return xa.useEffect(()=>{let r=window.visualViewport,n=()=>r?.height??window.innerHeight,o=n(),i=()=>{let d=n();o=Math.max(o,d),t(o-d>Up)},a=()=>{o=n(),t(!1)},s=d=>{jp(d.target)&&o-n()>Up&&t(!0)},l=d=>{jp(d.target)&&t(!1)};return i(),r?.addEventListener("resize",i),window.addEventListener("resize",i),window.screen?.orientation?.addEventListener("change",a),document.addEventListener("focusin",s),document.addEventListener("focusout",l),()=>{r?.removeEventListener("resize",i),window.removeEventListener("resize",i),window.screen?.orientation?.removeEventListener("change",a),document.removeEventListener("focusin",s),document.removeEventListener("focusout",l)}},[]),e}import{jsx as Pr,jsxs as x0}from"react/jsx-runtime";function Gp({size:e=20,className:t}){return x0("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":"true",children:[Pr("circle",{cx:"9",cy:"9",r:"6",stroke:"currentColor",strokeWidth:1.7}),Pr("path",{d:"m17 17-3.2-3.2",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round"})]})}function _p({size:e=16,className:t}){return Pr("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Pr("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 Hp({size:e=16,className:t}){return Pr("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Pr("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 rl({size:e=20,className:t}){return Pr("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Pr("path",{d:"M10 4.167v11.666M4.167 10 10 15.833 15.833 10",stroke:"currentColor",strokeWidth:1.667,strokeLinecap:"round",strokeLinejoin:"round"})})}function Qp({size:e=16,className:t}){return Pr("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:Pr("path",{d:"M3.333 8h9.334M8.667 4l4 4-4 4",stroke:"currentColor",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"})})}function nl({size:e=12,className:t}){return Pr("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:Pr("path",{d:"M3.5 2 1.5 4l2 2M1.5 4h9M8.5 10l2-2-2-2M10.5 8h-9",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})})}import*as H from"react";import Yp from"bignumber.js";function Vp(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function qp(e){return!e.isFinite()||e.isNaN()||e.lte(0)?"":e.decimalPlaces(6,Yp.ROUND_DOWN).toFixed()}function v0(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 k0(e){let t=e.fromToken.priceUsd,r=e.toToken.priceUsd,n=e.lastChangedBy==="to"?e.toAmount:e.fromAmount,o=new Yp(n||"0");return!o.isFinite()||o.isNaN()||o.lte(0)?{fromAmount:e.fromAmount,toAmount:e.toAmount}:Vp(t)&&Vp(r)?e.lastChangedBy==="to"?{fromAmount:qp(o.multipliedBy(r).dividedBy(t))}:{toAmount:qp(o.multipliedBy(t).dividedBy(r))}:v0(e)?e.lastChangedBy==="to"?{fromAmount:e.toAmount}:{toAmount:e.fromAmount}:{fromAmount:e.lastChangedBy==="to"?"":e.fromAmount,toAmount:e.lastChangedBy==="from"?"":e.toAmount}}function Kp({getQuote:e,submitBridge:t}){return{canQuote:!!e,canSubmit:!!t,async getQuote(r){return e?e(r):k0(r)},async submitBridge(r){if(!t)throw new Error("Bridge submit handler is not configured.");return t(r)}}}var Zp=15,R0=18,eu="cross_bridge_terms_accepted",S0=3600*24*365;function C0(e){let t=e.replace(/[^\d.]/g,""),r=t.indexOf(".");r!==-1&&(t=t.slice(0,r+1)+t.slice(r+1).replace(/\./g,""));let n=t.indexOf(".");if(n===-1)return t.slice(0,Zp);let o=t.slice(0,n).slice(0,Zp),i=t.slice(n+1).slice(0,R0);return`${o}.${i}`}function N0(){return typeof document>"u"?!1:document.cookie.split(";").map(e=>e.trim()).some(e=>e===`${eu}=true`)}function T0(){if(typeof document>"u")return;let e=typeof window<"u"&&window.location.protocol==="https:"?"; Secure":"";document.cookie=[`${eu}=true`,"Path=/",`Max-Age=${S0}`,"SameSite=Lax",e].filter(Boolean).join("; ")}function I0(e){let t=Number(e??"0");if(!Number.isFinite(t)||t<.1)return"1";let r=n=>Math.floor(n*100)/100;if(t<3){let n=r(t*3);return String(n<1?1:n)}return"10"}function Xp(e){let t=e.toUpperCase();return t.startsWith("T")&&t.slice(1).startsWith("ONE")?t.slice(1):t}function E0(e,t){if(!e||!t||e.chainId!==t.chainId)return!1;let r=new Set([Xp(e.symbol),Xp(t.symbol)]);return r.has("ONE")&&r.has("ONEUSD")}function Xr(e,t){return!!e&&!!t&&e.chainId===t.chainId&&e.address.toLowerCase()===t.address.toLowerCase()}function va(e){return e[0]}function ol(e,t,r,n){if(r&&!Xr(r,t))return r;let o=t?n?.(t,e):void 0;if(o?.length)return o[0];if(!t)return e[1]??va(e);let i=e.findIndex(s=>Xr(s,t)),a=i>=0?e[i+1]:void 0;return a&&!Xr(a,t)?a:e.find(s=>!Xr(s,t))??t}function Jp({fromToken:e,toToken:t,fromAmount:r,toAmount:n,lastChangedBy:o,slippage:i}){return{fromToken:e,toToken:t,fromAmount:r,toAmount:n,lastChangedBy:o,slippage:i}}function ka(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 r=e;return[...[e instanceof Error?e.name:r.name,e instanceof Error?e.message:r.message,r.shortMessage,r.details,r.code].filter(o=>typeof o=="string"||typeof o=="number").map(String),...ka(r.cause,t+1),...ka(r.data,t+1),...ka(r.error,t+1)]}function il(e){let t=ka(e).join(" ").toLowerCase(),r=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")||r}function $p(e,t){return il(e)?"Transaction request was rejected.":(e instanceof Error?e.message:typeof e=="string"?e:"").split(`
|
|
10
|
+
`)[0]?.trim()||t}function tu(e){let{tokens:t,initialFromToken:r,initialToToken:n,getToTokens:o,getApproval:i,approveBridge:a,history:s=[],initialSlippage:l="1",termsUrl:d=ko,getQuote:p,submitBridge:h,onSubmitted:b,onSuccess:m,onFailed:w,onExit:f}=e,u=H.useMemo(()=>Kp({getQuote:p,submitBridge:h}),[p,h]),[c,y]=H.useState("form"),[g,v]=H.useState(r??va(t)),[k,R]=H.useState(()=>ol(t,r??va(t),n,o)),[I,C]=H.useState(""),[S,A]=H.useState(""),[D,U]=H.useState("from"),[M,G]=H.useState(l),[E,O]=H.useState(null),ie=H.useMemo(()=>E0(g,k),[g,k]),Y=H.useMemo(()=>ie?"1":M==="auto"?I0(E?.priceImpact):M,[ie,M,E?.priceImpact]),[P,pe]=H.useState(""),[$,Q]=H.useState("idle"),[B,J]=H.useState(""),[V,le]=H.useState(null),[he,ee]=H.useState([]),[ce,We]=H.useState(!1),[we,Je]=H.useState(N0),[oe,Me]=H.useState(null),[$e,Te]=H.useState(!1),[Ae,be]=H.useState(null),[ht,Et]=H.useState(null),[vt,Le]=H.useState(!1),[it,Mt]=H.useState(!1),Qe=H.useRef(0),et=H.useRef(null),De=H.useRef(!1),bt=H.useRef(!1),qt=H.useRef(!1),kt=H.useRef(!1),Ve=H.useRef(!1),tt=H.useRef(!1),ct=H.useRef(!1);H.useEffect(()=>{qt.current||(qt.current=!0,_e("bridge","opened"))},[]);let Pe=H.useCallback(()=>{et.current&&(clearTimeout(et.current),et.current=null)},[]),at=H.useCallback(j=>{Pe(),Et(j)},[Pe]);H.useEffect(()=>Pe,[Pe]),H.useEffect(()=>{let j=t.find(Oe=>Xr(Oe,g))??va(t),ve=j?o?.(j,t):void 0,_=ve?.find(Oe=>Xr(Oe,k))??(ve?void 0:t.find(Oe=>Xr(Oe,k)))??ol(t,j,void 0,o);v(j),R(_)},[o,t,g,k]);let qe=H.useCallback((j,ve)=>{let _=C0(j);if(!_){Qe.current+=1,C(""),A(""),U(ve),O(null),pe(""),Q("idle");return}ve==="from"?C(_):A(_),U(ve),pe(""),!Ve.current&&Number(_)>0&&(Ve.current=!0,_e("bridge","amount_entered"))},[]),rt=H.useCallback(()=>{Qe.current+=1,C(""),A(""),U("from"),O(null),pe(""),J(""),Q("idle"),Me(null),Te(!1),be(null),Le(!1),at(null)},[at]),st=H.useCallback(j=>{Xr(j,g)||(kt.current||(kt.current=!0,_e("bridge","token_selected",{tags:{item_id:`from:${j.symbol}`}})),v(j),R(ol(t,j,void 0,o)),rt())},[g,o,rt,t]),z=H.useCallback(j=>{Xr(j,k)||Xr(j,g)||(kt.current||(kt.current=!0,_e("bridge","token_selected",{tags:{item_id:`to:${j.symbol}`}})),R(j),rt())},[g,rt,k]),Ie=H.useMemo(()=>g?o?.(g,t)??t.filter(j=>!Xr(j,g)):[],[g,o,t]),Ze=H.useCallback(()=>{g?.balance&&qe(g.balance,"from")},[g?.balance,qe]),F=H.useCallback(()=>{!g||!k||(v(k),R(g),rt())},[g,rt,k]),ne=H.useCallback(()=>{Qe.current+=1,C(""),A(""),U("from"),O(null),pe(""),J("")},[]);H.useEffect(()=>{if(!g||!k)return;if(!I&&!S){O(null),pe(""),Q(_=>_==="quoting"?"idle":_);return}let j=++Qe.current,ve=Jp({fromToken:g,toToken:k,fromAmount:I,toAmount:S,lastChangedBy:D,slippage:M});Q(_=>_==="submitting"?_:u.canQuote?"quoting":"idle"),(async()=>{try{let _=await u.getQuote(ve);if(Qe.current!==j)return;_.fromAmount!==void 0&&D==="to"&&C(_.fromAmount),_.toAmount!==void 0&&D==="from"&&A(_.toAmount),O(_.summary??null),pe(_.error??"")}catch(_){if(Qe.current!==j)return;pe(_ instanceof Error?_.message:"Failed to quote bridge.")}finally{Qe.current===j&&Q(_=>_==="quoting"?"idle":_)}})()},[I,g,D,u,M,S,k]);let ue=H.useCallback(()=>!g||!k?null:Jp({fromToken:g,toToken:k,fromAmount:I,toAmount:S,lastChangedBy:D,slippage:Y}),[Y,I,g,D,S,k]),Ce=H.useCallback(async(j,ve)=>{if(!De.current){De.current=!0,J(""),Le(!1),Te(!1),Q("submitting");try{if(!ve?.skipApprovalCheck&&i){let Oe=await i(j);if(Oe){Me(Oe),be(j),Q("idle");return}}Me(null),be(null),at("processing");let _=await u.submitBridge(j);le(_),Q("success"),ee(Oe=>[{id:_.txHash,timestamp:new Date().toISOString(),txHash:_.txHash,fromToken:_.fromToken,toToken:_.toToken,fromAmount:_.fromAmount,toAmount:_.toAmount,summary:E??void 0,status:"pending"},...Oe.filter(rn=>rn.txHash!==_.txHash)]),ne(),Mt(!0),at(null),Le(!0),_e("bridge","confirmed"),tt.current=!1,ct.current=!1,b?.(_),m?.(_)}catch(_){if(at(null),_e("bridge","confirmed",{status:"failure",reason:gr(_)}),tt.current=!1,ct.current=!1,il(_)){Q("idle");return}let Oe=$p(_,"Failed to submit bridge.");J(Oe),Q("error"),w?.({message:Oe})}finally{De.current=!1}}},[i,w,b,m,u,ne,at,E]),wt=H.useCallback(async()=>{if(P)return;let j=ue();if(j){if(tt.current||(tt.current=!0,_e("bridge","submitted")),!we){be(j),We(!0);return}await Ce(j)}},[ue,P,Ce,we]),Yt=H.useCallback(async()=>{let j=Ae??ue();j&&(T0(),Je(!0),We(!1),await Ce(j))},[ue,Ae,Ce]),tr=H.useCallback(()=>{We(!1),be(null)},[]),Gr=H.useCallback(async()=>{if(!(bt.current||$==="submitting"||!oe||!Ae||!a)){bt.current=!0,J(""),Q("submitting");try{await a(Ae,oe),ct.current||(ct.current=!0,_e("bridge","approved")),Me(null),Q("idle"),Te(!0)}catch(j){if(il(j)){Q("idle");return}let ve=$p(j,"Failed to approve token.");J(ve),Q("error"),w?.({message:ve})}finally{bt.current=!1}}},[oe,a,w,Ae,Ce,$]),un=H.useCallback(()=>{$!=="submitting"&&(Me(null),Te(!1),be(null),Q("idle"))},[$]),vr=H.useCallback(async()=>{if($==="submitting")return;let j=Ae??ue();if(!j){Te(!1),J("Bridge input is no longer available. Please try again."),Q("error");return}Te(!1),await Ce(j,{skipApprovalCheck:!0})},[ue,Ae,Ce,$]),fn=H.useCallback(()=>{Le(!1)},[]),_r=H.useCallback(j=>{y(j),j==="history"&&Mt(!1)},[]),re=H.useCallback(()=>{if(c==="history"){_r("form");return}f?.()},[f,_r,c]),fe=H.useMemo(()=>[...s,...he.filter(j=>!s.some(ve=>ve.txHash===j.txHash))],[s,he]);return{step:c,setStep:_r,status:$,error:B,quoteError:P,fromToken:g,toToken:k,tokens:t,availableToTokens:Ie,fromAmount:I,toAmount:S,lastChangedBy:D,slippage:M,effectiveSlippage:Y,slippageLocked:ie,setSlippage:G,summary:E,history:fe,submitted:V,canSubmit:u.canSubmit,termsOpen:ce,approvalInfo:oe,approvalSuccessOpen:$e,approveBridge:a,pendingSubmitInput:Ae,submitToast:ht,successDialogOpen:vt,dismissSuccessDialog:fn,hasNewHistory:it,termsUrl:d,setFromToken:v,setToToken:R,selectFromToken:st,selectToToken:z,setAmount:qe,setMax:Ze,swapTokens:F,submit:wt,confirmTerms:Yt,cancelTerms:tr,confirmApproval:Gr,cancelApproval:un,continueAfterApproval:vr,back:re}}de(`.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: #1e232e;--bf-toast-color: rgba(255, 255, 255, .85);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-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}.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, #00ceb2);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-picker-overlay{--bf-bg: #1e232e;--bf-surface: rgba(255, 255, 255, .05);--bf-surface-hover: rgba(255, 255, 255, .08);--bf-border: rgba(255, 255, 255, .07);--bf-text-high: rgba(255, 255, 255, .85);--bf-text-medium: rgba(255, 255, 255, .65);--bf-text-low: rgba(255, 255, 255, .4);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-token-picker-overlay[data-theme=light]{--bf-bg: #ffffff;--bf-surface: rgba(18, 18, 18, .05);--bf-surface-hover: rgba(18, 18, 18, .08);--bf-border: rgba(18, 18, 18, .07);--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-token-picker{display:flex;width:min(480px,calc(100vw - 48px));height:min(466px,calc(100dvh - 48px));max-height:calc(100dvh - 48px);min-height:0;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 #0006;box-sizing:border-box}.bf-token-picker-handle{display:none}.bf-token-picker-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(--bf-border);box-sizing:border-box}.bf-token-picker-head h3{margin:0;color:var(--bf-text-high);font-size:20px;font-weight:600;line-height:1.25;letter-spacing:0}.bf-token-picker-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(--bf-text-medium);cursor:pointer}.bf-token-picker-close:hover{color:var(--bf-text-high)}.bf-token-search{display:flex;min-height:48px;flex-shrink:0;align-items:center;gap:8px;margin:16px 24px;padding:12px 16px;border:1px solid transparent;border-radius:12px;background:var(--ds-surface-medium, rgba(18, 18, 18, .05));color:var(--bf-text-low);box-sizing:border-box}.bf-token-search:focus-within{border-color:var(--ds-accent-primary-default, #00ceb2)}.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, #00b4b7);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, #00b4b7);background:var(--ds-accent-primary-low, #e7f9f8)}.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, #00b4b7)}.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, #00b4b7);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}.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}.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-check-row{display:grid;width:100%;min-height:56px;grid-template-columns:20px minmax(0,1fr);align-items:center;column-gap:12px;padding:14px 16px;border:none;border-radius:12px;background:var(--bf-surface);color:var(--bf-text-medium);font-size:16px;font-weight:700;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}.bf-terms-check-button:focus-visible .bf-terms-checkbox{outline:2px solid var(--ds-accent-primary-default, #00ceb2);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:5px;background:transparent;box-sizing:border-box}.bf-terms-checkbox[data-checked=true]{border-color:var(--ds-accent-primary-default, #00ceb2);background:var(--ds-accent-primary-default, #00ceb2)}.bf-terms-checkbox[data-checked=true]:after{width:8px;height:4px;border:solid var(--ds-accent-primary-on, #000000);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, #00ceb2);font-size:14px;font-weight:700;text-decoration:none;white-space:nowrap}.bf-terms-privacy{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-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, #00ceb2);color:var(--ds-accent-primary-on, #000000)}.bf-action-primary:disabled{cursor:not-allowed;opacity:.35}.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, #00ceb2);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-radius:12px;background:var(--bf-toast-bg, #1e232e);color:var(--bf-toast-color, rgba(255, 255, 255, .85));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, #00ceb2);border-right-color:var(--ds-accent-primary-default, #00ceb2);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-accent-primary-default, #00ceb2)}.bf-status-check:after{position:absolute;top:6px;left:5px;width:8px;height:4px;border:solid var(--ds-accent-primary-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:#fff;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:-.01em}.bf-status-toast-copy span{color:var(--bf-toast-color, rgba(255, 255, 255, .85));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-accent-primary-on-inverted, #00e8c9)}.bf-status-toast[data-variant=error]{border:1px solid rgba(255,43,95,.28);background:var(--bf-toast-bg, #1e232e)}.bf-status-toast[data-variant=error] .bf-status-toast-copy strong{color:#fff}.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:#ffffffe0}.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, #00ceb2);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-exchange-rate{display:flex;width:100%;align-items:center;justify-content:center;gap:4px;padding:0 0 24px;border:0;background:transparent;color:var(--bf-text-low);font:inherit;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:-.01em;cursor:pointer}.bf-exchange-rate:hover{color:var(--bf-text-medium)}.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-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-tree-marker{width:10px;flex-shrink:0;color:var(--bf-text-low)}.bf-info-value{min-width:0;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{color:var(--bf-text-medium)}.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, #00a0a2)}.bf-info-value[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00)}.bf-root[data-view=history] .bf-info-label,.bf-root[data-view=history] .bf-liquidity-head,.bf-root[data-view=history] .bf-tree-marker{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, #00a0a2)}.bf-root[data-view=history] .bf-info-value[data-tone=warning]{color:var(--ds-system-orange-high, #e56f00)}.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, #00ceb2)}.bf-liquidity-status[data-status=normal]:before,.bf-liquidity-status:not([data-status]):before{background:var(--ds-accent-primary-default, #00ceb2)}.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, #00ceb2)}.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, #00ceb2);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, #00ceb2);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, #00a0a2)}.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, #00a0a2);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-token-picker-overlay{align-items:flex-end;padding:0}.bf-token-picker{width:100%;max-height:82dvh;min-height:min(520px,82dvh);border-right:0;border-bottom:0;border-left:0;border-radius:24px 24px 0 0}.bf-token-picker-handle{display:block;width:40px;height:4px;flex-shrink:0;align-self:center;margin:10px 0 0;border-radius:999px;background:#ffffff38}.bf-token-picker-head{min-height:55px;padding:12px 56px 16px 24px;border-bottom:0}.bf-token-picker-close{top:13px}.bf-token-search{margin:0 16px 12px}.bf-token-list{padding:0 16px 16px}.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-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}.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-exchange-rate{display:flex;width:100%;align-items:center;justify-content:flex-end;gap:4px;padding:0;border:0;background:transparent;color:var(--bf-text-medium);font:inherit;font-size:12px;font-weight:400;line-height:1.5;cursor:pointer;transition:opacity .15s ease}.bf-embedded-exchange-rate:hover{opacity:.8}.bf-embedded-rate-icon{display:inline-flex;flex-shrink:0;transition:transform .3s ease-out}.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{font-size:14px;font-weight:600}.bf-embedded-details .bf-info-label{gap:6px;color:var(--bf-text-medium);font-size:12px;font-weight:400}.bf-embedded-details .bf-tree-marker{color:var(--bf-text-low)}.bf-embedded-details .bf-info-value{color:var(--bf-text-medium);font-size:14px;font-weight:600}.bf-embedded-details .bf-info-value[data-tone=accent]{color:var(--bf-embedded-primary)}.bf-embedded-details .bf-info-route-arrow{width:10px;height:7px;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)}.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-body{scroll-padding-bottom:24px}.bf-embedded-amount-head{gap:8px}.bf-embedded-amount-label{gap:6px}.bf-embedded-balance{gap:4px}}
|
|
11
|
+
`);import{Fragment as li,jsx as x,jsxs as L}from"react/jsx-runtime";var lu=q.createContext(void 0);function Ao(){return q.useContext(lu)}function M0(e){let[t,r]=q.useState(void 0);return q.useEffect(()=>{let n=e.current;if(!n)return;let o=()=>{let a=n.closest("[data-theme]");r(a?.getAttribute("data-theme")??void 0)};o();let i=new MutationObserver(o);return i.observe(document.documentElement,{attributes:!0,subtree:!0,attributeFilter:["data-theme"]}),()=>i.disconnect()},[e]),t}var ru=[{value:"0.1",label:"0.1%"},{value:"0.5",label:"0.5%"},{value:"1",label:"1%"},{value:"5",label:"5%"}],A0=[{value:"all",label:"ALL"},{value:"completed",label:"Completed"},{value:"pending",label:"Pending"}];function L0(e,t){return e==="auto"?t?`Auto ${t}%`:"Auto":e?`${e}%`:"1%"}function nu(e){let t=e.replace(/[^\d.]/g,""),[r="",...n]=t.split("."),o=n.join("");return n.length===0?r:`${r}.${o.slice(0,2)}`}function D0(e){return`${e.chainId}:${e.address.toLowerCase()}`}function sl(e){let t=Number(e);return Number.isFinite(t)?t.toLocaleString("en-US",{maximumFractionDigits:t>=1?2:6}):e||"0"}function ou(e,t){let r=Number(e||"0"),n=t?.priceUsd??0;return`\u2248 $${(Number.isFinite(r)?r*n:0).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})} USD`}function P0(e,t=6){if(!e)return e;let[r,n=""]=e.split(".");if(!n)return r;let o=n.slice(0,t).replace(/0+$/,"");return o?`${r}.${o}`:r}function du(e,t){if(!t)return!1;let r=new Or(e||"0"),n=new Or(t.balance||"0");return!r.isFinite()||!n.isFinite()?!1:r.isGreaterThan(n)}function O0(e){if(e.priceUsd===void 0)return null;let t=new Or(e.balance||"0");return t.isFinite()?`\u2248 $${t.multipliedBy(e.priceUsd).toFormat(2)} USD`:null}function B0(e){if(e.priceUsd===void 0)return null;let t=new Or(e.priceUsd);return t.isFinite()?`$${t.toFormat(t.isLessThan(1)?4:2)}`:null}function ll(e){if(!e.isFinite()||e.isNaN())return"0";let r=e.decimalPlaces(6,Or.ROUND_DOWN).toFixed(6).replace(/\.?0+$/,""),[n="0",o]=r.split("."),i=new Or(n||"0").toFormat(0);return o?`${i}.${o}`:i}function z0(e){return e.length<=14?e:`${e.slice(0,6)}...${e.slice(-6)}`}function F0(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return e;let r=n=>n.toString().padStart(2,"0");return[`${t.getFullYear()}-${r(t.getMonth()+1)}-${r(t.getDate())}`,`${r(t.getHours())}:${r(t.getMinutes())}:${r(t.getSeconds())}`].join(" ")}function U0(e){let t=new Or(e||"0");return!t.isFinite()||t.isNaN()?e||"0":ll(t)}function j0(e,t){if(t?.priceUsd===void 0)return null;let r=new Or(e||"0").multipliedBy(t.priceUsd);return!r.isFinite()||r.isNaN()?null:`$${r.toFormat(2)}`}function Sa(e){return e.status==="success"?"completed":e.status==="failed"?"failed":"pending"}function W0(e,t){return t==="all"?!0:Sa(e)===t}function G0(e){return e==="completed"?"Completed":e==="failed"?"Failed":"Pending"}function iu(e){return e===56||e===97?"BSC":e===612044||e===612055||e===5555?"ONEchain":`Chain ${e}`}function cu(e,t){return!!e&&!!t&&e.chainId===t.chainId&&e.address.toLowerCase()===t.address.toLowerCase()}function pu(e,t){if(!(!e||!t))return e.chainId===t.chainId?"swap":cu(e,t)||e.symbol.toLowerCase()===t.symbol.toLowerCase()?"bridge":"swap-bridge"}function uu(e){return e==="swap"||e==="deposit-swap"||e==="swap-withdraw"}function Ra(e){return!e||e==="0"||Number(e)===0}function fu(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 mu(e){let t=e.fromToken,r=e.toToken,n=pu(t,r),o=e.fromAmount||"0",i=e.toAmount||"0",a=n!==void 0&&!uu(n),s=n!==void 0&&n!=="bridge";return{pathType:n,bridgeInfo:a?[{label:"Route",value:t&&r?`${iu(t.chainId)} \u2192 ${iu(r.chainId)}`:"-"},{label:"Validator Fee",value:Ra(o)?"0":"Free",tone:Ra(o)?"default":"accent"},{label:"Network Fee",value:Ra(o)?"0":"Free",tone:Ra(o)?"default":"accent"}]:void 0,swapInfo:s?[t&&r?{label:"Route",value:"",routeTokens:[{symbol:t.symbol,iconUrl:t.iconUrl},{symbol:r.symbol,iconUrl:r.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:i,valueToken:r?{symbol:r.symbol,iconUrl:r.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 Eo({token:e,size:t=20}){let r=e?.iconUrl;return x("span",{className:"bf-token-icon","data-has-image":!!r?"true":"false",style:{width:t,height:t},children:r?x("img",{src:r,alt:"",width:t,height:t,draggable:!1}):x("span",{className:"bf-token-fallback",children:e?.symbol?.slice(0,1)??"?"})})}function au({label:e,token:t,amount:r,usd:n,onAmountChange:o,onTokenClick:i,locked:a=!1}){return L("section",{className:"bf-amount-panel",children:[L("div",{className:"bf-amount-head",children:[x("span",{children:e}),L("span",{className:"bf-balance",children:[sl(t?.balance??"0")," ",t?.symbol??""]})]}),L("div",{className:"bf-amount-main",children:[L("label",{className:"bf-amount-input-wrap",children:[L("span",{className:"bf-sr-only",children:[e," amount"]}),x("input",{type:"text",inputMode:"decimal",value:r,onChange:s=>o(s.target.value),placeholder:"0",className:"bf-amount-input","data-size":gu(r)}),x("span",{className:"bf-amount-usd",children:n})]}),L("button",{type:"button",className:"bf-token-pill",onClick:a?void 0:i,disabled:!a&&!i,"data-locked":a?"true":void 0,"data-track":a?void 0:"token_select_open","data-track-id":e.toLowerCase(),"aria-label":`Select ${e.toLowerCase()} token`,children:[x(Eo,{token:t}),x("span",{children:t?.symbol??"Select"}),!a&&x(Cr,{size:16})]})]})]})}function _0(e){if(!e)return"";let[t="",r]=e.replace(/,/g,"").split("."),n=t.replace(/\B(?=(\d{3})+(?!\d))/g,",");return r===void 0?n:`${n}.${r}`}function gu(e){let t=e.replace(/,/g,"").trim().length;return t>26?"small":t>18?"medium":"large"}function H0(){return L("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[x("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"}),x("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"}),x("circle",{cx:"10",cy:"8",r:".75",fill:"currentColor"})]})}function su({label:e,token:t,amount:r,onAmountChange:n,onTokenClick:o,onMax:i,locked:a}){return L("section",{className:"bf-embedded-amount-panel",children:[L("div",{className:"bf-embedded-amount-head",children:[L("span",{className:"bf-embedded-amount-label",children:[x("strong",{children:e}),!(e==="From")&&x("em",{children:"estimated"})]}),t&&L("span",{className:"bf-embedded-balance",children:[x(H0,{}),x("span",{className:"bf-embedded-balance-value",children:sl(t.balance)}),x("span",{children:t.symbol}),i&&x("button",{type:"button",onClick:i,"aria-label":"Use maximum available balance",children:"MAX"})]})]}),L("div",{className:"bf-embedded-amount-main",children:[L("button",{type:"button",className:"bf-embedded-token-pill",onClick:a?void 0:o,disabled:a,"data-locked":a?"true":void 0,"aria-label":`Select ${e.toLowerCase()} token`,children:[x(Eo,{token:t}),x("span",{children:t?.symbol??"Select"}),!a&&x(Cr,{size:14})]}),L("label",{className:"bf-embedded-input-wrap",children:[L("span",{className:"bf-sr-only",children:[e," amount"]}),x("input",{type:"text",inputMode:"decimal",value:_0(r),onChange:l=>n(l.target.value),placeholder:"0.00",className:"bf-embedded-amount-input","data-size":gu(r)})]})]})]})}function hu({flow:e,side:t,onClose:r,hideSearch:n=!1,maxTokens:o}){let i=q.useId(),[a,s]=q.useState(""),[l,d]=q.useState(null),p=Ao(),h=t==="from"?e.fromToken:e.toToken;q.useEffect(()=>{d(document.body)},[]),q.useEffect(()=>{let f=u=>{u.key==="Escape"&&r()};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[r]);let b=q.useMemo(()=>t==="from"?e.tokens:e.availableToTokens,[e.availableToTokens,e.tokens,t]),m=q.useMemo(()=>{let f=a.trim().toLowerCase(),u=f?b.filter(c=>c.symbol.toLowerCase().includes(f)||c.name.toLowerCase().includes(f)):b;return o===void 0?u:u.slice(0,o)},[o,a,b]),w=q.useCallback(f=>{t==="from"?e.selectFromToken(f):e.selectToToken(f),r()},[e,r,t]);return l?Mo(x("div",{className:"bf-token-picker-overlay","data-theme":p,role:"presentation",onMouseDown:f=>{f.target===f.currentTarget&&r()},children:L("section",{className:"bf-token-picker",role:"dialog","aria-modal":"true","aria-labelledby":i,children:[x("span",{className:"bf-token-picker-handle","aria-hidden":"true"}),L("header",{className:"bf-token-picker-head",children:[x("h3",{id:i,children:"Select a token"}),x("button",{type:"button",className:"bf-token-picker-close",onClick:r,"aria-label":"Close token selector",children:x(Sr,{size:24})})]}),!n&&L("label",{className:"bf-token-search",children:[x(Gp,{size:20}),x("span",{className:"bf-sr-only",children:"Search tokens"}),x("input",{value:a,onChange:f=>s(f.target.value),placeholder:"Search Tokens",autoComplete:"off",spellCheck:!1})]}),L("div",{className:"bf-token-list",children:[m.map(f=>{let u=cu(f,h),c=u?B0(f):O0(f);return L("button",{type:"button",className:"bf-token-row","data-selected":u?"true":"false",onClick:()=>w(f),children:[L("span",{className:"bf-token-row-left",children:[x(Eo,{token:f,size:40}),L("span",{className:"bf-token-meta",children:[x("span",{className:"bf-token-symbol",children:f.symbol}),!u&&x("span",{className:"bf-token-name",children:f.name})]})]}),L("span",{className:"bf-token-row-right",children:[L("span",{className:"bf-token-balance",children:[sl(f.balance),u?null:` ${f.symbol}`]}),c&&x("span",{className:"bf-token-price",children:c})]})]},D0(f))}),m.length===0&&x("div",{className:"bf-token-empty",children:"No tokens found"})]})]})}),l):null}function Q0({flow:e,onClose:t}){let r=q.useId(),[n,o]=q.useState(null),i=ru.find(f=>f.value===e.slippage),[a,s]=q.useState(e.slippage&&!i?e.slippage:""),l=a.trim()!==""&&a.trim()!==".",d=l?Number(a):NaN,p=Number.isFinite(d)&&d>50,h=Number.isFinite(d)&&d>5&&!p,b=f=>{e.setSlippage(f),t()},m=()=>{!l||p||(e.setSlippage(nu(a)),t())};if(q.useEffect(()=>{o(document.body)},[]),q.useEffect(()=>{let f=u=>{u.key==="Escape"&&t()};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[t]),!n)return null;let w=Ao();return Mo(x("div",{className:"bf-slippage-overlay","data-theme":w,role:"presentation",onMouseDown:f=>{f.target===f.currentTarget&&t()},children:L("section",{className:"bf-slippage-dialog",role:"dialog","aria-modal":"true","aria-labelledby":r,children:[L("header",{className:"bf-slippage-head",children:[x("h3",{id:r,children:"Slippage Settings"}),x("button",{type:"button",className:"bf-slippage-close",onClick:t,"aria-label":"Close slippage settings",children:x(Sr,{size:24})})]}),L("div",{className:"bf-slippage-body",children:[x("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."}),L("div",{className:"bf-slippage-controls",children:[x("div",{className:"bf-slippage-presets",children:ru.map(f=>x("button",{type:"button",className:"bf-slippage-preset","data-selected":!l&&e.slippage===f.value?"true":"false",onClick:()=>b(f.value),children:f.label},f.value))}),L("label",{className:"bf-slippage-custom","data-selected":l?"true":"false",children:[x("span",{className:"bf-sr-only",children:"Custom slippage percent"}),x("input",{value:a,onChange:f=>{s(nu(f.target.value))},onKeyDown:f=>{f.key==="Enter"&&(f.preventDefault(),m())},inputMode:"decimal",placeholder:"Enter custom slippage",autoComplete:"off",spellCheck:!1}),x("span",{"aria-hidden":"true",children:"%"})]})]}),p?x("p",{className:"bf-slippage-message","data-variant":"error",children:"Slippage cannot exceed 50%."}):h?x("p",{className:"bf-slippage-message","data-variant":"warning",children:"Your transaction may be frontrun due to high slippage."}):null,l&&x("button",{type:"button",className:"bf-slippage-apply",onClick:m,disabled:p,children:"Apply"})]})]})}),n)}function bu({flow:e}){let t=q.useId(),[r,n]=q.useState(!1),[o,i]=q.useState(null),a=Ao();return q.useEffect(()=>{i(document.body)},[]),q.useEffect(()=>{let s=l=>{l.key==="Escape"&&e.cancelTerms()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e]),!o||!e.termsOpen?null:Mo(x("div",{className:"bf-action-modal-overlay","data-theme":a,role:"presentation",onPointerDown:s=>{s.target===s.currentTarget&&e.cancelTerms()},children:L("section",{className:"bf-action-modal bf-terms-modal",role:"dialog","aria-modal":"true","aria-labelledby":t,children:[x("h3",{id:t,children:"Agree to Terms of Service"}),x("p",{className:"bf-action-modal-desc",children:"Please make sure to review the Terms of Service before using CROSSD."}),L("div",{className:"bf-terms-check-row","data-checked":r?"true":"false",children:[x("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:()=>n(s=>!s),children:x("span",{className:"bf-terms-checkbox","data-checked":r?"true":"false","aria-hidden":"true"})}),L("div",{className:"bf-terms-copy",children:[x("span",{className:"bf-terms-label",children:"Agree to Terms of Use"}),e.termsUrl&&x("a",{href:e.termsUrl,target:"_blank",rel:"noreferrer",children:"Terms of Service"})]})]}),x("p",{className:"bf-terms-privacy",children:"I have read and acknowledged the Privacy Policy to use CROSSD"}),x("button",{type:"button",className:"bf-action-primary",disabled:!r||e.status==="submitting",onClick:e.confirmTerms,"data-track":"terms_confirm",children:"Confirm"})]})}),o)}function V0({value:e,disabled:t=!1}){let[r,n]=q.useState(!1);return x("button",{type:"button",className:"bf-copy-button","aria-label":"Copy token address",disabled:t,onClick:()=>{t||navigator.clipboard?.writeText(e).then(()=>{n(!0),window.setTimeout(()=>n(!1),1200)})},children:r?"OK":"Copy"})}function wu({flow:e,approval:t}){let r=q.useId(),[n,o]=q.useState(null),i=Ao();if(q.useEffect(()=>{o(document.body)},[]),q.useEffect(()=>{let l=d=>{e.status!=="submitting"&&d.key==="Escape"&&e.cancelApproval()};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[e]),!n)return null;let a=e.status==="submitting"||!e.approveBridge,s=e.status==="submitting";return Mo(x("div",{className:"bf-action-modal-overlay","data-theme":i,role:"presentation",children:L("section",{className:"bf-action-modal bf-approve-modal",role:"dialog","aria-modal":"true","aria-labelledby":r,children:[L("h3",{id:r,children:["Approve ",t.token.symbol]}),x(Eo,{token:t.token,size:72}),L("div",{className:"bf-approve-address-box",children:[x("span",{children:"Token Address"}),L("div",{children:[x("strong",{children:t.tokenAddress}),x(V0,{value:t.tokenAddress,disabled:s})]})]}),L("div",{className:"bf-action-buttons",children:[x("button",{type:"button",className:"bf-action-secondary",onClick:e.cancelApproval,disabled:e.status==="submitting",children:"Cancel"}),L("button",{type:"button",className:"bf-action-primary",onClick:e.confirmApproval,disabled:a,"aria-busy":s,"data-track":"approve_confirm",children:[s&&x("span",{className:"bf-action-button-spinner","aria-hidden":"true"}),x("span",{children:s?"Approving...":"Approve"})]})]})]})}),n)}function yu({flow:e}){let t=q.useId(),[r,n]=q.useState(null),o=Ao();if(q.useEffect(()=>{n(document.body)},[]),q.useEffect(()=>{if(!e.approvalSuccessOpen)return;let a=s=>{s.key==="Escape"&&e.cancelApproval()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[e]),!r||!e.approvalSuccessOpen)return null;let i=e.status==="submitting";return Mo(x("div",{className:"bf-action-modal-overlay","data-theme":o,role:"presentation",children:L("section",{className:"bf-action-modal bf-approval-success-modal",role:"dialog","aria-modal":"true","aria-labelledby":t,children:[x("h3",{id:t,children:"Approval Success"}),x("span",{className:"bf-success-mark","aria-hidden":"true"}),L("p",{className:"bf-action-modal-desc",children:["Token approval confirmed successfully.",x("br",{}),"Please continue to the next step."]}),L("div",{className:"bf-action-buttons",children:[x("button",{type:"button",className:"bf-action-secondary",onClick:e.cancelApproval,disabled:i,children:"Cancel"}),L("button",{type:"button",className:"bf-action-primary",onClick:e.continueAfterApproval,disabled:i,"aria-busy":i,children:[i&&x("span",{className:"bf-action-button-spinner","aria-hidden":"true"}),x("span",{children:i?"Continuing...":"Continue"})]})]})]})}),r)}function q0({fromAmount:e,toAmount:t,fromToken:r,toToken:n}){let[o,i]=q.useState(!1),a=q.useMemo(()=>{let d=new Or(e||"0"),p=new Or(t||"0");return!d.isFinite()||!p.isFinite()||d.lte(0)||p.lte(0)?null:o?d.dividedBy(p):p.dividedBy(d)},[e,o,t]);if(!a||!r||!n||r.symbol===n.symbol)return null;let s=o?n.symbol:r.symbol,l=o?r.symbol:n.symbol;return L("button",{type:"button",className:"bf-exchange-rate",onClick:()=>i(d=>!d),"data-track":"rate_reverse",children:[L("span",{children:["1 ",s]}),x(nl,{size:12}),L("span",{children:[ll(a)," ",l]})]})}function xu({flow:e}){return e.submitToast?L("div",{className:"bf-status-toast","data-variant":"processing",role:"status","aria-live":"polite",children:[x("span",{className:"bf-status-toast-icon","aria-hidden":"true",children:x("span",{className:"bf-status-spinner"})}),L("span",{className:"bf-status-toast-copy",children:[x("strong",{children:"Transaction Processing"}),x("span",{children:"Your transaction is being processed on the blockchain"})]})]}):null}function vu({message:e}){let[t,r]=q.useState(!1);return q.useEffect(()=>{if(!e){r(!1);return}r(!0);let n=window.setTimeout(()=>{r(!1)},3500);return()=>window.clearTimeout(n)},[e]),!e||!t?null:L("div",{className:"bf-status-toast","data-variant":"error",role:"alert","aria-live":"assertive",children:[x("span",{className:"bf-status-toast-icon","aria-hidden":"true",children:x("span",{className:"bf-status-error-mark",children:"!"})}),L("span",{className:"bf-status-toast-copy",children:[x("strong",{children:"Error"}),x("span",{children:e})]})]})}function Y0(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 ku({flow:e}){let t=q.useId(),[r,n]=q.useState(null),o=e.submitted,i=Ao();return q.useEffect(()=>{n(document.body)},[]),q.useEffect(()=>{if(!e.successDialogOpen)return;let a=s=>{s.key==="Escape"&&e.dismissSuccessDialog()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[e]),!r||!e.successDialogOpen||!o?null:Mo(x("div",{className:"bf-success-overlay","data-theme":i,role:"presentation",children:x("section",{className:"bf-success-modal",role:"dialog","aria-modal":"true","aria-labelledby":t,children:L("div",{className:"bf-success-body",children:[x("span",{className:"bf-success-mark","aria-hidden":"true"}),L("div",{className:"bf-success-copy",children:[x("strong",{id:t,children:Y0(o.pathType)}),x("span",{children:"Please check the results in the history."})]}),x("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((a,s)=>L(q.Fragment,{children:[s>0&&x("span",{className:"bf-success-route-arrow",children:"\u2192"}),x(al,{token:a,size:43})]},`${a.symbol}-${s}`))}),x("button",{type:"button",className:"bf-success-ok",onClick:e.dismissSuccessDialog,"data-track":"success_ok",children:"OK"})]})})}),r)}function al({token:e,size:t=16}){let r=!!e.iconUrl;return x("span",{className:"bf-token-icon","data-has-image":r?"true":"false",style:{width:t,height:t},children:e.iconUrl?x("img",{src:e.iconUrl,alt:"",width:t,height:t,draggable:!1}):x("span",{className:"bf-token-fallback",children:e.symbol?.slice(0,1)??"?"})})}function K0({row:e}){return e.routeTokens&&e.routeTokens.length>0?x("span",{className:"bf-info-route",children:e.routeTokens.map((t,r)=>L(q.Fragment,{children:[r>0&&x("span",{className:"bf-info-route-arrow","aria-hidden":"true",children:"\u2192"}),x(al,{token:t})]},`${t.symbol}-${r}`))}):e.valueToken?L("span",{className:"bf-info-value-token",children:[x(al,{token:e.valueToken}),x("span",{children:e.value})]}):x(li,{children:e.value})}function Ru({rows:e}){return!e||e.length===0?null:x("div",{className:"bf-info-rows",children:e.map((t,r)=>L("div",{className:"bf-info-row",children:[L("span",{className:"bf-info-label",children:[x("span",{className:"bf-tree-marker",children:r===e.length-1?"\u2514":"\u251C"}),x("span",{children:t.label})]}),x("span",{className:"bf-info-value","data-tone":t.tone??"default",children:x(K0,{row:t})})]},`${t.label}-${t.value}`))})}function Z0(e,t,r){return e.pathType==="bridge"?"Bridge Info":uu(e.pathType)?"Swap Info":t&&r?"Swap & Bridge Info":t?"Bridge Info":"Swap Info"}function Su({summary:e}){let t=!!e.bridgeInfo?.length,r=!!e.swapInfo?.length,n=t&&r,o=e.pathType==="bridge-swap"?["bridge","swap"]:["swap","bridge"];return x(li,{children:o.map(i=>{let a=i==="swap"?e.swapInfo:e.bridgeInfo;return a?.length?L("div",{className:"bf-info-section",children:[n&&x("h4",{children:i==="swap"?"Swap Info":"Bridge Info"}),x(Ru,{rows:a})]},i):null})})}function X0({summary:e}){let t=!!e.bridgeInfo?.length,r=!!e.swapInfo?.length,n=!!e.txFee?.length,o=Z0(e,t,r),[i,a]=q.useState(!0),[s,l]=q.useState(!0);return L("div",{className:"bf-details",children:[e.liquidity&&L("section",{className:"bf-liquidity",children:[L("div",{className:"bf-liquidity-head",children:[x("span",{children:e.liquidity.label??"Available Liquidity"}),x("span",{className:"bf-liquidity-status","data-status":e.liquidity.status,children:e.liquidity.status??"Normal"})]}),x("div",{className:"bf-liquidity-track",children:x("span",{style:{width:`${e.liquidity.percentage??50}%`}})})]}),(t||r)&&L("section",{className:"bf-detail-section bf-info-card","data-open":i?"true":"false",children:[L("button",{type:"button",className:"bf-collapse-head","aria-expanded":i,onClick:()=>a(d=>!d),"data-track":"details_toggle",children:[x("h3",{children:o}),x(Cr,{size:16,className:"bf-collapse-chevron"})]}),i&&x("div",{className:"bf-collapse-body",children:x(Su,{summary:e})})]}),n&&L("section",{className:"bf-detail-section bf-tx-fee-section","data-open":s?"true":"false",children:[L("button",{type:"button",className:"bf-collapse-head bf-tx-fee-head","aria-expanded":s,onClick:()=>l(d=>!d),"data-track":"details_toggle",children:[x("h3",{children:"Est. Tx Fee"}),L("div",{className:"bf-tx-fee-total",children:[e.txFeeInfo?.isDelegateFee&&x("span",{className:"bf-fee-delegated",children:"Fee Delegated"}),e.txFeeInfo?.tokenIconUrl&&x("img",{className:"bf-tx-fee-token",src:e.txFeeInfo.tokenIconUrl,alt:e.txFeeInfo.tokenSymbol??"",width:16,height:16,draggable:!1}),x("span",{"data-delegated":e.txFeeInfo?.isDelegateFee&&Number(e.txFeeInfo?.estTxFee)>0?"true":void 0,children:P0(e.txFeeInfo?.estTxFee??"0")}),x(Cr,{size:16,className:"bf-collapse-chevron"})]})]}),s&&x("div",{className:"bf-collapse-body",children:x(Ru,{rows:e.txFee})})]})]})}function J0(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 $0({fromAmount:e,toAmount:t,fromToken:r,toToken:n}){let[o,i]=q.useState(!1),[a,s]=q.useState(0),l=q.useMemo(()=>{let h=new Or(e||"0"),b=new Or(t||"0");return!h.isFinite()||!b.isFinite()||h.lte(0)||b.lte(0)?null:o?h.dividedBy(b):b.dividedBy(h)},[e,o,t]);if(!l||!r||!n)return null;let d=o?n.symbol:r.symbol,p=o?r.symbol:n.symbol;return L("button",{type:"button",className:"bf-embedded-exchange-rate",onClick:()=>{i(h=>!h),s(h=>h+180)},"data-track":"rate_reverse",children:[L("span",{children:["1 ",d]}),x("span",{className:"bf-embedded-rate-icon",style:{transform:`rotate(${a}deg)`},children:x(nl,{size:16})}),L("span",{children:[ll(l)," ",p]})]})}function ew({summary:e}){let t=q.useMemo(()=>J0(e),[e]);return!t.bridgeInfo?.length&&!t.swapInfo?.length?null:x("div",{className:"bf-embedded-details",children:x(Su,{summary:t})})}function tw({flow:e,tokenPickerSide:t,setTokenPickerSide:r,toastError:n}){return L(li,{children:[t&&x(hu,{flow:e,side:t,onClose:()=>r(null),hideSearch:!0,maxTokens:2}),x(bu,{flow:e}),e.approvalInfo&&x(wu,{flow:e,approval:e.approvalInfo}),x(yu,{flow:e}),x(xu,{flow:e}),x(vu,{message:e.submitToast?"":n}),x(ku,{flow:e})]})}function rw({flow:e,isConnected:t,onRequestConnect:r}){let[n,o]=q.useState(null),i=Number(e.fromAmount)>0,a=i?e.summary??mu(e):null,s=fu(e.quoteError),l=du(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,b=e.quoteError&&!s.from&&!s.to?e.quoteError:"",m=e.error||b,w=e.status==="submitting",f=!i||!e.toAmount||!e.fromToken||!e.toToken||!e.canSubmit||!!e.quoteError||l||w,u=w?"":p&&i?"Insufficient Liquidity":i?"Continue":"Enter Amount";return L(li,{children:[x("main",{className:"bf-body bf-embedded-body","data-rd-scroll-area":!0,children:L("div",{className:"bf-embedded-form",children:[L("div",{className:"bf-embedded-fields",children:[L("div",{className:"bf-embedded-field-group",children:[x(su,{label:"From",token:e.fromToken,amount:e.fromAmount,onAmountChange:c=>e.setAmount(c,"from"),onTokenClick:()=>o("from"),onMax:e.setMax,locked:e.tokens.length<=1}),d&&x("div",{className:"bf-embedded-field-error",children:d})]}),x("div",{className:"bf-embedded-direction","aria-hidden":"true",children:x("span",{children:x(rl,{size:16})})}),L("div",{className:"bf-embedded-field-group",children:[x(su,{label:"To",token:e.toToken,amount:e.toAmount,onAmountChange:c=>e.setAmount(c,"to"),onTokenClick:()=>o("to"),locked:e.availableToTokens.length<=1}),h&&x("div",{className:"bf-embedded-field-error",children:h})]})]}),a?.liquidity&&L("section",{className:"bf-embedded-liquidity",children:[L("div",{children:[x("span",{children:a.liquidity.label??"Available Liquidity"}),x("span",{"data-status":a.liquidity.status,children:a.liquidity.status??"normal"})]}),x("span",{className:"bf-embedded-liquidity-track",children:x("span",{style:{width:`${a.liquidity.percentage??50}%`}})})]}),p&&i&&x("div",{className:"bf-embedded-liquidity-error",role:"alert",children:"Insufficient liquidity in all pools for this pair and amount."}),a&&L("div",{className:"bf-embedded-summary",children:[x($0,{fromAmount:e.fromAmount,toAmount:e.toAmount,fromToken:e.fromToken,toToken:e.toToken}),x(ew,{summary:a})]}),x("div",{className:"bf-embedded-action-footer",children:t?x("button",{type:"button",className:"bf-embedded-cta",onClick:e.submit,"data-track":"next",disabled:f,"aria-busy":w,"aria-label":w?"Processing transaction":p?"Insufficient liquidity":"Continue with swap or bridge",children:w?x("span",{className:"bf-embedded-spinner","aria-hidden":"true"}):u}):x("button",{type:"button",className:"bf-embedded-cta",onClick:r,"data-track":"connect_click","aria-label":"Connect wallet to continue",children:"Connect Wallet"})})]})}),x(tw,{flow:e,tokenPickerSide:n,setTokenPickerSide:o,toastError:m})]})}function nw({item:e}){let t=Sa(e),r=j0(e.fromAmount,e.fromToken);return L("article",{className:"bf-history-item",children:[L("div",{className:"bf-history-item-head",children:[x("span",{className:"bf-history-status","data-status":t,children:G0(t)}),x("time",{className:"bf-history-time",dateTime:e.timestamp,children:F0(e.timestamp)})]}),L("div",{className:"bf-history-item-body",children:[L("strong",{className:"bf-history-amount",children:[U0(e.fromAmount)," ",e.fromToken.symbol]}),L("div",{className:"bf-history-meta",children:[x("span",{className:"bf-history-usd",children:r??z0(e.txHash)}),L("span",{className:"bf-history-route",children:[L("span",{className:"bf-history-route-token",children:[x(Eo,{token:e.fromToken,size:16}),x("span",{children:e.fromToken.symbol})]}),x(Qp,{size:16,className:"bf-history-route-arrow"}),L("span",{className:"bf-history-route-token",children:[x(Eo,{token:e.toToken,size:16}),x("span",{children:e.toToken.symbol})]})]})]})]})]})}function ow({flow:e}){let[t,r]=q.useState("all"),n=e.history.some(a=>Sa(a)==="pending"),o=e.history.filter(a=>W0(a,t)),i=t==="all"?"No bridge history yet.":`No ${t} bridge history.`;return L("main",{className:"bf-history-body",children:[x("nav",{className:"bf-history-tabs","aria-label":"Bridge history filters",children:A0.map(a=>L("button",{type:"button",className:"bf-history-tab","data-active":t===a.value?"true":"false",onClick:()=>r(a.value),"data-track":"history_filter","data-track-id":a.value,children:[x("span",{children:a.label}),a.value==="pending"&&n&&x("span",{className:"bf-history-tab-dot","aria-hidden":"true"})]},a.value))}),o.length>0?x("div",{className:"bf-history-list",children:o.map(a=>x(nw,{item:a},a.id||a.txHash))}):x("div",{className:"bf-empty",children:i})]})}function iw({flow:e,env:t}){let[r,n]=q.useState(null),[o,i]=q.useState(!1),[a,s]=q.useState(0),d=!!(e.fromAmount.trim()||e.toAmount.trim())?e.summary??mu(e):null,p=sr("apps.json",t,g=>Vr(g?.bridgePoweredBy?.url,t)),h=fu(e.quoteError),b=du(e.fromAmount,e.fromToken),m=b?"Insufficient balance":h.from,w=e.quoteError&&!h.from&&!h.to?e.quoteError:"",f=e.error||w,u=e.history.some(g=>Sa(g)==="pending"),y=(d?.pathType??pu(e.fromToken,e.toToken))!=="bridge";return L(li,{children:[L("main",{className:"bf-body",children:[L("div",{className:"bf-toolbar",children:[L("button",{type:"button",className:"bf-chip bf-chip-history",onClick:()=>e.setStep("history"),"data-track":"history_open",children:[x(_p,{}),x("span",{children:"History"}),(u||e.hasNewHistory)&&x("span",{className:"bf-chip-dot","aria-hidden":"true"})]}),y&&L("button",{type:"button",className:"bf-chip",onClick:()=>i(!0),"data-track":"slippage_open",disabled:e.slippageLocked,"aria-haspopup":"dialog","aria-expanded":o,children:[x(Hp,{}),x("span",{children:e.slippageLocked?"Auto 1%":L0(e.slippage,e.effectiveSlippage)})]})]}),L("div",{className:"bf-swap-card","data-has-from-error":m?"true":"false",children:[x(au,{label:"From",token:e.fromToken,amount:e.fromAmount,usd:ou(e.fromAmount,e.fromToken),onAmountChange:g=>e.setAmount(g,"from"),onTokenClick:()=>n("from"),locked:e.tokens.length<=1}),m&&x("div",{className:"bf-field-error",children:m}),x("button",{type:"button",className:"bf-swap-toggle",onClick:()=>{e.swapTokens(),s(g=>g+360)},"data-track":"token_swap",style:{transform:`translateX(-50%) rotate(${a}deg)`,transition:"transform 0.2s ease"},children:x(rl,{size:22})}),x(au,{label:"To",token:e.toToken,amount:e.toAmount,usd:ou(e.toAmount,e.toToken),onAmountChange:g=>e.setAmount(g,"to"),onTokenClick:()=>n("to"),locked:e.availableToTokens.length<=1}),h.to&&x("div",{className:"bf-field-error",children:h.to})]}),x(q0,{fromAmount:e.fromAmount,toAmount:e.toAmount,fromToken:e.fromToken,toToken:e.toToken}),d&&x(X0,{summary:d})]}),L("footer",{className:"bf-footer",children:[x("button",{type:"button",className:"bf-next",onClick:e.submit,"data-track":"next",disabled:e.status==="submitting"||!!e.quoteError||b,children:e.status==="submitting"?"Processing...":"Next"}),p&&L("a",{className:"bf-powered",href:p,target:"_blank",rel:"noreferrer",children:["Powered by ",x("span",{className:"bf-powered-brand",children:"CROSS DeFi"})]})]}),r&&x(hu,{flow:e,side:r,onClose:()=>n(null)}),o&&x(Q0,{flow:e,onClose:()=>i(!1)}),x(bu,{flow:e}),e.approvalInfo&&x(wu,{flow:e,approval:e.approvalInfo}),x(yu,{flow:e}),x(xu,{flow:e}),x(vu,{message:e.submitToast?"":f}),x(ku,{flow:e})]})}function Lo({onClose:e,onBackToWallet:t,env:r,variant:n="default",title:o,isConnected:i,onRequestConnect:a,className:s,...l}){let d=q.useMemo(()=>nt(r),[r]),p=Wp(),h=tu({...l,onExit:t}),b=q.useRef(null),m=M0(b),w=h.step==="history"?"History":o??"Swap & Bridge",f=i??!!l.walletAddress;return x(ge,{feature:"bridge",children:x(lu.Provider,{value:m,children:L("div",{ref:b,className:Ne("bf-root",s),"data-view":h.step,"data-status":h.status,"data-variant":n,"data-soft-keyboard-open":n==="embedded"&&p?"true":"false",children:[L("header",{className:"bf-header",children:[n==="embedded"&&h.step==="form"?x("span",{className:"bf-header-spacer","aria-hidden":"true"}):x("button",{type:"button",className:"bf-header-btn",onClick:h.back,"aria-label":"Back",children:x(gn,{size:24})}),x("span",{className:"bf-header-title",children:w}),x("button",{type:"button",className:"bf-header-btn",onClick:e,"aria-label":"Close",children:x(Sr,{size:24})})]}),h.step==="history"?x(ow,{flow:h}):n==="embedded"?x(rw,{flow:h,isConnected:f,onRequestConnect:a}):x(iw,{flow:h,env:d})]})})})}import*as $t from"react";import Eu from"bignumber.js";import{useInfiniteQuery as aw}from"@tanstack/react-query";var sw="token-history";function Cu(e,t,r,n,o=!0){return aw({queryKey:[sw,e,t,r.toLowerCase(),n.toLowerCase()],initialPageParam:void 0,queryFn:async({pageParam:i,signal:a})=>{let s=await Re("walletServer",e),l=new URLSearchParams({chain_id:String(t),token:r,wallet:n}),d=i;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:a});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:i=>{if(!i||i.length===0)return;let a=i[i.length-1];return{last_timestamp:a.timestamp,last_log_index:a.log_index,last_tx_index:a.tx_index}},enabled:o&&!!n&&!!r&&t>0,staleTime:1e4})}import*as Ca from"react";var dl={chart:!1,balance:!0,overview:!1,social:!1,history:!0},lw=Object.keys(dl),dw="apps.json";function Nu(e){let[t,r]=Ca.useState({visibility:dl,isLoaded:!1});return Ca.useEffect(()=>{let n=!0;return Yn(dw,e).then(o=>{if(!n)return;let i=o?.tokenDetail?.sections,a={...dl};if(i)for(let s of lw){let l=i[s];typeof l=="boolean"&&(a[s]=l)}r({visibility:a,isLoaded:!0})}),()=>{n=!1}},[e]),t}import*as ar from"react";import{useQuery as cw,keepPreviousData as pw}from"@tanstack/react-query";var uw="token-price-history";function Tu(e,t,r,n,o=!0){return cw({queryKey:[uw,e,t,r.toLowerCase(),n],queryFn:async({signal:i})=>{let a=await Re("walletServer",e),s=new URLSearchParams({chain_id:String(t),token:r,interval:n}),l=await fetch(`${a}/v1/public/token/price/historical?${s}`,{cache:"no-store",signal:i});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&&!!r&&t>0,staleTime:3e4,placeholderData:pw})}import{Fragment as vw,jsx as Ht,jsxs as Do}from"react/jsx-runtime";var fw="var(--ds-system-green-high, #00a869)",mw="var(--wi-error, #e70077)",oo=150,Na=3,cl=18,gw=18,hw=[{key:"10m",label:"10m"},{key:"1h",label:"1H"},{key:"1d",label:"1D"},{key:"7d",label:"1W"},{key:"30d",label:"1M"},{key:"1y",label:"1Y"}],bw=new Set(["7d","30d","1y"]);function ww(){let e=ar.useRef(null),[t,r]=ar.useState(0);return ar.useEffect(()=>{let n=e.current;if(!n)return;let o=new ResizeObserver(i=>{r(i[0]?.contentRect.width??0)});return o.observe(n),r(n.clientWidth),()=>o.disconnect()},[]),[e,t]}function yw(e,t){let r=new Date(e*1e3),n=t?{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}:{hour:"numeric",minute:"2-digit"};return new Intl.DateTimeFormat("en-US",n).format(r)}function xw(e,t){if(t<=0||e.length===0)return null;let r=e.length===1?[e[0],e[0]]:e,n=r.length,o=r[0],i=r[0],a=0,s=0;for(let y=1;y<n;y++)r[y]>o&&(o=r[y],a=y),r[y]<i&&(i=r[y],s=y);let l=o-i||1,d=Math.max(1,t-Na*2),p=oo-cl-gw,h=y=>n===1?t/2:Na+y/(n-1)*d,b=y=>cl+(1-(y-i)/l)*p,m=r.map((y,g)=>({x:h(g),y:b(y)})),w=m.map((y,g)=>`${g===0?"M":"L"}${y.x.toFixed(2)},${y.y.toFixed(2)}`).join(" "),f=m[0],u=m[m.length-1],c=`${w} L${u.x.toFixed(2)},${oo} L${f.x.toFixed(2)},${oo} Z`;return{values:r,points:m,linePath:w,areaPath:c,maxIdx:a,minIdx:s}}function Iu({env:e,chainId:t,tokenAddress:r}){let[n,o]=ar.useState("1d"),[i,a]=ar.useState(null),s=ar.useId(),[l,d]=ww(),{data:p,isLoading:h,isError:b}=Tu(e,t,r,n,!0),m=ar.useMemo(()=>(p??[]).filter(O=>Number.isFinite(Number(O.price))).slice().sort((O,ie)=>O.updated_at-ie.updated_at),[p]),w=ar.useMemo(()=>m.map(E=>Number(E.price)),[m]),f=ar.useMemo(()=>xw(w,d),[w,d]);ar.useEffect(()=>{a(null)},[n]);let u=m.length>0,c=i!==null&&i<w.length?i:w.length-1,y=u?w[c]:0,g=u?w[0]:0,v=g!==0?(y-g)/g*100:0,k=v>=0,R=k?fw:mw,I=(k?"+":"-")+(Math.floor(Math.abs(v)*100)/100).toFixed(2)+"%",C=i!==null&&m[i]?yw(m[i].updated_at,bw.has(n)):"",S=E=>{if(!f||d<=0)return;let O=E.currentTarget.getBoundingClientRect(),ie=E.clientX-O.left;if(f.values.length<=1){a(0);return}let P=Math.max(1,d-Na*2),pe=Math.min(1,Math.max(0,(ie-Na)/P)),$=Math.round(pe*(m.length-1));a(Math.min(m.length-1,Math.max(0,$)))},A=()=>a(null);if(!h&&(b||!u))return null;let D=i!==null&&f&&f.points[i]?f.points[i]:null,U=f?.points[f.maxIdx],M=f?.points[f.minIdx],G=E=>Math.min(Math.max(E,24),Math.max(24,d-24));return Do("section",{className:"wi-td-chart",children:[Do("div",{className:"wi-td-chart-panel",children:[Ht("span",{className:"wi-td-chart-price",children:u?Jn(y):"\u2014"}),u&&Do("span",{className:"wi-td-chart-change","data-positive":k,children:[Ht("span",{children:I}),C&&Ht("span",{className:"wi-td-chart-when",children:C})]})]}),Ht("div",{ref:l,className:"wi-td-chart-plot",children:h&&!u?Ht("div",{className:"wi-skeleton-block wi-td-chart-skeleton"}):f&&d>0&&Do("svg",{className:"wi-td-chart-svg",width:d,height:oo,role:"img","aria-label":"Price chart",children:[Ht("defs",{children:Do("linearGradient",{id:s,x1:"0",y1:"0",x2:"0",y2:"1",children:[Ht("stop",{offset:"0%",stopColor:R,stopOpacity:.28}),Ht("stop",{offset:"100%",stopColor:R,stopOpacity:0})]})}),Ht("path",{d:f.areaPath,fill:`url(#${s})`}),Ht("path",{d:f.linePath,fill:"none",stroke:R,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),U&&Ht("text",{className:"wi-td-chart-minmax",x:G(U.x),y:Math.max(11,U.y-7),textAnchor:"middle",children:Jn(f.values[f.maxIdx])}),M&&f.minIdx!==f.maxIdx&&Ht("text",{className:"wi-td-chart-minmax",x:G(M.x),y:Math.min(oo-5,M.y+14),textAnchor:"middle",children:Jn(f.values[f.minIdx])}),D&&Do(vw,{children:[Ht("line",{className:"wi-td-chart-cursor",x1:D.x,y1:cl-6,x2:D.x,y2:oo}),Ht("circle",{cx:D.x,cy:D.y,r:4,fill:R,stroke:"var(--wi-surface-bg, #121212)",strokeWidth:2})]}),Ht("rect",{x:0,y:0,width:d,height:oo,fill:"transparent",style:{touchAction:"none"},onPointerMove:S,onPointerDown:S,onPointerLeave:A,onPointerCancel:A})]})}),Ht("div",{className:"wi-td-chart-tabs",role:"tablist",children:hw.map(E=>Ht("button",{type:"button",role:"tab","aria-selected":n===E.key,className:"wi-td-chart-tab","data-active":n===E.key||void 0,onClick:()=>o(E.key),"data-track":"token_detail_interval","data-track-id":E.key,children:E.label},E.key))})]})}import{Fragment as Lu,jsx as K,jsxs as lt}from"react/jsx-runtime";var kw="https://contents.crosstoken.io/wallet/token/images/FT.png",Rw={receive:"Receive",send:"Send","bridge-in":"Bridge In","bridge-out":"Bridge Out"};function Sw(e){return e.length>24?"xs":e.length>18?"sm":"md"}function Cw(e){if(!e)return"";let t=e<1e12?e*1e3:e,r=Math.max(0,Math.floor((Date.now()-t)/1e3));if(r<60)return"just now";let n=Math.floor(r/60);if(n<60)return`${n}m`;let o=Math.floor(n/60);if(o<24)return`about ${o}h`;let i=Math.floor(o/24);if(i<30)return`${i}d`;let a=Math.floor(i/30);return a<12?`${a}mo`:`${Math.floor(a/12)}y`}function Mu(e){let[t,r]=e.split("."),n="";for(let o=0;o<t.length;o++){let i=t.length-o;o>0&&i%3===0&&(n+=","),n+=t[o]}return r?`${n}.${r}`:n}function Au(e,t){let r=BigInt(e||"0");if(t<=2){let a=10n**BigInt(t),s=r/a,l=r%a*10n**BigInt(2-t);return`${s.toString()}.${l.toString().padStart(2,"0")}`}let n=r/10n**BigInt(t-2),o=n/100n,i=n%100n;return`${o.toString()}.${i.toString().padStart(2,"0")}`}function Nw(e,t,r){let n=$t.useRef(null),o=$t.useRef(null),[i,a]=$t.useState(t);return $t.useLayoutEffect(()=>{let s=n.current,l=o.current;if(!s||!l)return;let d=()=>{let h=s.clientWidth;if(!h)return;let b=window.getComputedStyle(l),m=document.createElement("span");m.textContent=l.textContent,m.style.cssText=["position:absolute","left:-9999px","top:-9999px","visibility:hidden","white-space:nowrap",`font-family:${b.fontFamily}`,`font-weight:${b.fontWeight}`,`letter-spacing:${b.letterSpacing}`,`font-size:${t}px`].join(";"),document.body.appendChild(m);let w=m.offsetWidth;if(document.body.removeChild(m),w<=h){a(t);return}let f=Math.max(r,Math.floor(t*h/w));a(f)};d();let p=new ResizeObserver(d);return p.observe(s),()=>p.disconnect()},[e,t,r]),{containerRef:n,textRef:o,fontSize:i}}function Tw(e){if(!e)return"-";let t=new Eu(e);return t.isNaN()?"-":t.decimalPlaces(4,Eu.ROUND_DOWN).toFormat()}function Iw(){return lt("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[K("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"1.6"}),K("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 Ew(){return K("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:K("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 Mw(){return K("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:K("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 Aw(){return K("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:K("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 Du({env:e,isMobile:t,token:r,walletAddress:n,stat:o,tokenInfo:i,showBalance:a=!0,onBack:s,onClose:l,onSend:d,onOutlink:p}){let h=r.quantity.decimals,[b,m]=$t.useState(!1),{buildTxUrl:w,chainInfo:f}=_d(e,r.chainId,!0),{visibility:u}=Nu(e),{data:c,isLoading:y,isError:g,fetchNextPage:v,hasNextPage:k,isFetchingNextPage:R,refetch:I}=Cu(e,r.chainId,r.address,n,!0),C=$t.useMemo(()=>c?.pages?c.pages.flat():[],[c]),S=$t.useRef(null);$t.useEffect(()=>{if(!t)return;let B=S.current;if(!B||!k)return;let J=new IntersectionObserver(V=>{V[0]?.isIntersecting&&!R&&v()},{rootMargin:"120px"});return J.observe(B),()=>J.disconnect()},[t,k,R,v]);let A=$t.useCallback(()=>{navigator?.clipboard&&navigator.clipboard.writeText(r.address).then(()=>{m(!0),setTimeout(()=>m(!1),1500)}).catch(()=>{})},[r.address]),D=Mu(Au(r.quantity.numeric,h)),U=o?.price?Gi(r.quantity.numeric,h,o.price):null,M=a?D:"\u2022\u2022\u2022\u2022",{containerRef:G,textRef:E,fontSize:O}=Nw(M,30,14),Y=Vo(r.chainId,e).name??f?.name??`Chain ${r.chainId}`,P=f?.explorer_url,pe=i?.deployed??!0,$=$t.useMemo(()=>{let B=[];return i?.info_url&&B.push({key:"web",label:"Website",url:i.info_url,icon:K(Iw,{})}),i?.telegram_url&&B.push({key:"tg",label:"Telegram",url:i.telegram_url,icon:K(Ew,{})}),i?.x_url&&B.push({key:"x",label:"X",url:i.x_url,icon:K(Mw,{})}),i?.medium_url&&B.push({key:"medium",label:"Medium",url:i.medium_url,icon:K(Aw,{})}),B},[i]),Q=(B,J,V,le)=>{Pt(B,J,{category:"token-detail",origin:V,payload:{address:r.address,txHash:le}},p)};return lt(Lu,{children:[lt("div",{className:"wi-sticky-header",children:[lt("div",{className:"wi-header wi-header--receive",children:[K("button",{type:"button",className:"wi-header-back",onClick:s,"aria-label":"Back",children:K(gn,{size:24})}),lt("span",{className:"wi-td-header-title",children:[K("img",{src:r.icon_url,alt:"","aria-hidden":!0,className:"wi-td-header-icon",width:24,height:24,draggable:!1,onError:B=>{B.currentTarget.src=kw}}),K("span",{className:"wi-td-header-name",children:r.symbol})]}),K("button",{type:"button",className:"wi-header-action",onClick:l,"aria-label":"Close",children:K(Sr,{size:24})})]}),K("hr",{className:"wi-divider"})]}),lt("div",{className:"wi-td-scroll",children:[u.chart&&K(Iu,{env:e,chainId:r.chainId,tokenAddress:r.address}),u.balance&<("section",{className:"wi-td-balance-card",children:[lt("div",{className:"wi-td-balance-left",ref:G,children:[K("span",{className:"wi-td-balance-label",children:"My Balance"}),K("span",{className:"wi-td-balance-amount",ref:E,style:{fontSize:O},children:M}),a&&U&&K("span",{className:"wi-td-balance-fiat",children:U})]}),K("button",{type:"button",className:"wi-td-send-btn",onClick:()=>d(r),"aria-label":`Send ${r.symbol}`,"data-track":"token_detail_send","data-track-id":r.symbol,children:K("span",{children:"Send"})})]}),u.overview&<("section",{className:"wi-td-section",children:[K("h3",{className:"wi-td-section-title",children:"Crypto Overview"}),lt("div",{className:"wi-td-rows",children:[lt("div",{className:"wi-td-row",children:[K("span",{className:"wi-td-row-label",children:"Network"}),P?lt("a",{className:"wi-td-row-value wi-td-row-link",href:P,target:"_blank",rel:"noopener noreferrer",onClick:B=>Q(B,P,"token-network"),children:[K("span",{children:Y}),K(Lw,{})]}):K("span",{className:"wi-td-row-value",children:Y})]}),lt("div",{className:"wi-td-row",children:[K("span",{className:"wi-td-row-label",children:"Contract Address"}),lt("button",{type:"button",className:"wi-td-row-value wi-td-row-copy",onClick:A,"aria-label":"Copy contract address",children:[K("span",{children:Xt(r.address)}),b?K(mn,{size:14}):K(Zn,{size:14})]})]}),lt("div",{className:"wi-td-row",children:[K("span",{className:"wi-td-row-label",children:"Decimals"}),K("span",{className:"wi-td-row-value",children:h})]}),lt("div",{className:"wi-td-row",children:[K("span",{className:"wi-td-row-label",children:"Total Supply"}),K("span",{className:"wi-td-row-value",children:Tw(o?.circulating_supply)})]})]})]}),u.social&&$.length>0&<("section",{className:"wi-td-section",children:[K("h3",{className:"wi-td-section-title",children:"Social Media"}),K("div",{className:"wi-td-social-row",children:$.map(B=>K("a",{className:"wi-td-social-btn",href:B.url,target:"_blank",rel:"noopener noreferrer","aria-label":B.label,onClick:J=>Q(J,B.url,"token-social"),children:B.icon},B.key))})]}),u.history&<("section",{className:"wi-td-section",children:[K("h3",{className:"wi-td-section-title",children:"Token History"}),y&&K("div",{className:"wi-td-history-list",children:Array.from({length:3},(B,J)=>lt("div",{className:"wi-td-history-skeleton",children:[K("div",{className:"wi-skeleton-block",style:{width:90,height:14}}),K("div",{className:"wi-skeleton-block",style:{width:60,height:14}})]},`td-sk-${J}`))}),!y&&g&<("div",{className:"wi-td-history-empty",children:[K("span",{children:"Failed to load history."}),K("button",{type:"button",className:"wi-td-retry-btn",onClick:()=>I(),children:"Retry"})]}),!y&&!g&&C.length===0&&K("div",{className:"wi-td-history-empty",children:K("span",{children:"No transactions found."})}),!y&&!g&&C.length>0&<("div",{className:"wi-td-history-list",children:[C.map((B,J)=>{let V=B.to_alias?.toLowerCase().includes("bridge")??!1,le=B.from_alias?.toLowerCase().includes("bridge")??!1,he=V?"bridge-out":le?"bridge-in":B.to?.toLowerCase()===n.toLowerCase()?"receive":"send",ee=he==="receive"||he==="bridge-in",ce=ee?B.from:B.to,We=Mu(Au(B.amount,h)),we=w(B.tx),Je=Cw(B.timestamp),oe=lt(Lu,{children:[lt("div",{className:"wi-td-history-top",children:[K("span",{className:"wi-td-history-type","data-direction":he,children:Rw[he]}),K("span",{className:"wi-td-history-counter",children:Xt(ce??"")})]}),lt("div",{className:"wi-td-history-bottom",children:[lt("span",{className:"wi-td-history-meta",children:[K("span",{className:"wi-td-history-status","data-status":B.status,children:B.status==="success"?"Success":"Failed"}),Je&&K("span",{className:"wi-td-history-time",children:Je})]}),lt("span",{className:"wi-td-history-amount","data-size":Sw(`${ee?"+":"-"}${We} ${r.symbol}`),children:[ee?"+":"-",We," ",r.symbol]})]})]}),Me=`${B.tx}-${B.log_index}-${J}`;return we?K("a",{className:"wi-td-history-item wi-td-history-item--link",href:we,target:"_blank",rel:"noopener noreferrer",onClick:$e=>Q($e,we,"token-tx",B.tx),children:oe},Me):K("div",{className:"wi-td-history-item",children:oe},Me)}),k&&(t?K("div",{ref:S,className:"wi-td-history-sentinel",children:R&&K("span",{className:"wi-td-history-loading",children:"Loading\u2026"})}):K("button",{type:"button",className:"wi-td-loadmore-btn",onClick:()=>v(),disabled:R,children:R?"Loading\u2026":"Load more"}))]})]})]})]})}function Lw(){return K("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",className:Ne("wi-td-external-icon"),"aria-hidden":!0,children:K("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"})})}import{Fragment as ul,jsx as N,jsxs as Z}from"react/jsx-runtime";var Pw="On-ramp is not available in your region.";function pl(e,t,r){let n=xt[e],o=r.toUpperCase();if(t===n.cross&&o.includes("ONEUSD"))return 0;if(t===n.cross&&o==="ONE")return 1;if(t===n.bsc&&o==="ONE")return 2}function Ow(e){return parseInt(e.split(":")[1],10)}function Bw(e){if(typeof window>"u"||!e?.length)return!1;let{origin:t,pathname:r}=window.location,n=t+r;return e.some(o=>n===o||n.startsWith(`${o}/`))}function zw(e){let t=e.lastIndexOf(".");return t===-1?{main:e,decimal:""}:{main:e.slice(0,t),decimal:e.slice(t)}}function Fw(e){let t=e.toLowerCase().replace(/^0x/,""),r=t.length>=8?t.slice(0,8):t.padEnd(8,"0"),n=parseInt(r.slice(0,4),16)%360,o=(n+60+parseInt(r.slice(4,8),16)%120)%360;return`linear-gradient(135deg, hsl(${n} 85% 65%), hsl(${o} 80% 55%))`}function Uw(e,t=.5){let r=te.useRef(null),n=te.useRef(null),[o,i]=te.useState(1);return te.useLayoutEffect(()=>{let a=r.current,s=n.current;if(!a||!s)return;let l=()=>{let p=a.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",a.appendChild(h);let b=h.offsetWidth;a.removeChild(h);let m=b>p?Math.max(t,p/b):1;i(m)};l();let d=new ResizeObserver(l);return d.observe(a),()=>d.disconnect()},[e,t]),{containerRef:r,valueRef:n,scale:o}}function Pu({align:e="end",sideOffset:t=12,className:r,children:n}){let{env:o,theme:i,isMobile:a,open:s,drawerDirection:l,modal:d,showBalance:p,showForgeToken:h,showGameToken:b,showQR:m,showBridge:w,qrLogoSrc:f,walletAddress:u,accountName:c,sendAccounts:y,profileImageUrl:g,preferredTokens:v,close:k,onSelectWallet:R,onCopyAddress:I,onBuy:C,onDisconnect:S,disconnectLabel:A,termsUrl:D,termsLabel:U,privacyUrl:M,privacyLabel:G,portalStyle:E,navContent:O,navPosition:ie,footerContent:Y,view:P,setView:pe,selectedSendToken:$,setSelectedSendToken:Q,selectedDetailToken:B,setSelectedDetailToken:J,showPortfolio:V,portfolioTitle:le,portfolioSections:he,showTotalAssets:ee,totalAssetsLabel:ce,sendTransaction:We,getTransactionReceipt:we,estimateGas:Je,onOutlink:oe,lpBalanceReader:Me,stakingRewardsReader:$e,bridgeTokens:Te,bridgeHistory:Ae,getBridgeQuote:be,getBridgeToTokens:ht,getBridgeApproval:Et,approveBridge:vt,submitBridge:Le,onReceive:it,onSend:Mt,onBuyDisabledMessage:Qe,onBridgeDisabledMessage:et,onSendDisabledMessage:De}=Cn(),[bt,qt]=te.useState(null),kt=te.useRef(void 0),Ve=te.useCallback(T=>{qt(T),clearTimeout(kt.current),kt.current=setTimeout(()=>qt(null),4e3)},[]);te.useEffect(()=>()=>clearTimeout(kt.current),[]);let tt=!!Qe,ct=te.useCallback(()=>{if(tt){Ve(Qe);return}let T=C?.();T&&typeof T.then=="function"&&T.catch(()=>{Ve(Qe??Pw)})},[tt,Qe,C,Ve]),Pe=!!et,at=!!De,{tokens:qe,isLoading:rt}=En(o,u,s&&p),{statsMap:st}=Mn(o,p),{aprPercent:z}=Nc(),{categoryMap:Ie,infoMap:Ze}=Ic(o,p),F=p&&ee,{displayValue:ne,isLowerBound:ue,isLoading:Ce}=Ec(o,u,s&&F),[wt,Yt]=te.useState(!1),tr=te.useRef(null),[Gr,un]=te.useState(0),{holdings:vr,isLoading:fn}=Rc(o,u,s&&p&&h),_r=te.useMemo(()=>vr.map(T=>T.token),[vr]),{imageMap:re}=Sc(o,_r,h&&vr.length>0),fe=te.useMemo(()=>{let T=[],se=[],Be=[],rr=new Map((v??[]).map((Ye,Zt)=>[`${Ow(Ye.chainId)}:${Ye.address.toLowerCase()}`,Zt]));for(let Ye of qe){let Zt=pl(o,Ye.chainId,Ye.symbol)!==void 0,Qr=`${Ye.chainId}:${Ye.address.toLowerCase()}`,qn=rr.get(Qr),hs=new di(Ye.quantity.numeric).shiftedBy(-Ye.quantity.decimals);if(Zt)T.push(Ye);else if(qn!==void 0)se.push(Ye);else if(hs.isGreaterThan(0)){if(!b&&Ie.get(ti(Ye.chainId,Ye.address))==="game")continue;Be.push(Ye)}}return T.sort((Ye,Zt)=>{let Qr=pl(o,Ye.chainId,Ye.symbol)??99,qn=pl(o,Zt.chainId,Zt.symbol)??99;return Qr-qn}),se.sort((Ye,Zt)=>{let Qr=rr.get(`${Ye.chainId}:${Ye.address.toLowerCase()}`)??99,qn=rr.get(`${Zt.chainId}:${Zt.address.toLowerCase()}`)??99;return Qr-qn}),Be.sort((Ye,Zt)=>{let Qr=st.get(Tr(Ye.chainId,Ye.address)),qn=st.get(Tr(Zt.chainId,Zt.address)),hs=new di(Ye.quantity.numeric).shiftedBy(-Ye.quantity.decimals).multipliedBy(Qr?.price??0);return new di(Zt.quantity.numeric).shiftedBy(-Zt.quantity.decimals).multipliedBy(qn?.price??0).minus(hs).toNumber()}),[...T,...se,...Be]},[qe,o,st,b,Ie,v]),j=te.useMemo(()=>{if(!h)return[];let T=new Set(qe.map(se=>se.address.toLowerCase()));return[...vr].filter(se=>!T.has(se.token.toLowerCase())).sort((se,Be)=>{let rr=new di(se.value);return new di(Be.value).minus(rr).toNumber()})},[vr,h,qe]),ve=te.useRef(!1),[_,Oe]=te.useState(null),rn=te.useRef(void 0),Qn=_?.chainId??$?.chainId??fe[0]?.chainId??0,{transactionUrl:kr}=Zo(o,Qn,_?.txHash,!!(_?.txHash&&Qn)),yt=te.useCallback(T=>{ve.current=!0,pe(T)},[pe]),[ds,Ho]=te.useState("recipient"),po=te.useCallback(()=>{Q(null),Ho("recipient"),yt("wallet")},[Q,yt]),Vn=te.useCallback((T,se="recipient")=>{if(at){Ve(De);return}Ho(se),Q(T),yt("send")},[at,De,Ve,Q,yt]),uo=te.useCallback(T=>{J(T),yt("token-detail")},[J,yt]),cs=te.useCallback(()=>{J(null),yt("wallet")},[J,yt]),ps=te.useCallback(T=>{Vn(T,"recipient")},[Vn]),fo=sr("apps.json",o,T=>Vr(T?.gametokenBridge,o)),Ti=sr("apps.json",o,T=>T?.gametokenSites),us=te.useCallback(()=>{if(Pe){Ve(et);return}if(fo){if(Bw(Ti)){window.location.assign(fo);return}window.open(fo,"_blank","noopener,noreferrer")}},[Pe,et,fo,Ti,Ve]),fs=te.useCallback(T=>{clearTimeout(rn.current),Q(null),yt("wallet"),Oe({status:"pending",txHash:T.txHash,chainId:T.chainId,description:`${T.amount} ${T.tokenSymbol} to ${Xt(T.recipient)}`})},[Q,yt]),W=te.useCallback(T=>{let se=$?.chainId;Q(null),yt("wallet"),!(!T||!se)&&(Oe(Be=>({status:"success",txHash:T,chainId:se,description:Be?.txHash===T?Be.description:"Tap to see your transaction"})),clearTimeout(rn.current),rn.current=setTimeout(()=>Oe(null),5e3))},[$?.chainId,Q,yt]),ut=te.useCallback(T=>{let se=T.txHash;se&&(Oe({status:"error",txHash:se,chainId:T.chainId,description:T.message}),clearTimeout(rn.current),rn.current=setTimeout(()=>Oe(null),5e3))},[]),Bt=te.useMemo(()=>{if(it)return it;if(m)return()=>yt("qr")},[it,m,yt]),Rt=te.useMemo(()=>{if(Mt)return Mt;if(fe.length===0)return;let T=fe[0];return()=>Vn(T,"token")},[Mt,fe,Vn]),Hr=te.useCallback(()=>{if(at){Ve(De);return}Rt?.()},[at,De,Rt,Ve]);te.useEffect(()=>{s||(ve.current=!1,Ho("recipient"))},[s]);let Wt=te.useRef(null);te.useEffect(()=>{let T=Wt.current;if(!T||!a)return;let se=Be=>{Be.pointerType==="touch"&&Be.stopPropagation()};return T.addEventListener("pointerdown",se),()=>T.removeEventListener("pointerdown",se)},[a]);let[Kt,Ge]=te.useState(!1),Rr=te.useRef(void 0),[nn,Qo]=te.useState(!1);te.useEffect(()=>{if(!nn)return;let T=()=>Qo(!1),se=rr=>{rr.key==="Escape"&&Qo(!1)},Be=setTimeout(()=>{document.addEventListener("mousedown",T,!0),document.addEventListener("keydown",se,!0)},0);return()=>{clearTimeout(Be),document.removeEventListener("mousedown",T,!0),document.removeEventListener("keydown",se,!0)}},[nn]),te.useEffect(()=>{Qo(!1)},[u]),te.useEffect(()=>()=>clearTimeout(Rr.current),[]),te.useEffect(()=>()=>clearTimeout(rn.current),[]),te.useEffect(()=>{let T=tr.current;if(!T||Y===null){un(0);return}let se=()=>{un(T.offsetHeight)};if(se(),typeof ResizeObserver>"u")return;let Be=new ResizeObserver(se);return Be.observe(T),()=>Be.disconnect()},[Y]);let Kl=te.useCallback(async()=>{if(!Kt)try{await navigator.clipboard.writeText(u),Ge(!0),clearTimeout(Rr.current),Rr.current=setTimeout(()=>Ge(!1),2e3),I?.(u,!0)}catch{I?.(u,!1)}},[u,I,Kt]),Ii=te.useCallback(T=>{T.currentTarget.setAttribute("data-loaded","true")},[]),Zl=te.useMemo(()=>({background:Fw(u)}),[u]),Ei=te.useMemo(()=>g||hn(o,u,{size:120,bg:i==="dark"?"1A1A2E":"F3F6F8"}),[g,o,u,i]),ms=te.useMemo(()=>zw(ne),[ne]),{containerRef:Om,valueRef:Bm,scale:zm}=Uw(wt?"\u2022\u2022\u2022\u2022\u2022\u2022":ne),Xl=D||M?Z("div",{className:"wi-legal-links",children:[D&&N("a",{className:"wi-legal-link",href:D,target:"_blank",rel:"noopener noreferrer","data-track":"terms_link",onClick:T=>Pt(T,D,{category:"terms",origin:"terms"},oe),children:U}),D&&M&&N("span",{className:"wi-legal-sep","aria-hidden":!0,children:"\xB7"}),M&&N("a",{className:"wi-legal-link",href:M,target:"_blank",rel:"noopener noreferrer","data-track":"privacy_link",onClick:T=>Pt(T,M,{category:"privacy",origin:"privacy"},oe),children:G})]}):null,Jl=S?Z("button",{type:"button",className:"wi-disconnect-btn","data-track":"disconnect",onClick:()=>{S(),k()},children:[N(Md,{size:16}),N("span",{className:"wi-disconnect-label",children:A})]}):null,Fm=p&&!O?Z("div",{className:"wi-action-row","aria-label":"Wallet actions",children:[Z("button",{type:"button",className:Ne("wi-action-card",tt&&"wi-action-card--dimmed"),onClick:ct,disabled:!C&&!tt,"aria-disabled":tt||void 0,"aria-label":"Buy","data-track":"buy",children:[N(Bd,{size:20}),N("span",{children:"Buy"})]}),w?Z("button",{type:"button",className:Ne("wi-action-card",Pe&&"wi-action-card--dimmed"),onClick:us,"aria-disabled":Pe||void 0,"aria-label":"Bridge","data-track":"bridge_open",children:[N(zd,{size:20}),N("span",{children:"Bridge"})]}):Z("button",{type:"button",className:"wi-action-card",onClick:Bt,disabled:!Bt,"aria-label":"Receive","data-track":"receive",children:[N(Wi,{size:20}),N("span",{children:"Receive"})]}),Z("button",{type:"button",className:Ne("wi-action-card",at&&"wi-action-card--dimmed"),onClick:Hr,disabled:!at&&!Rt,"aria-disabled":at||void 0,"aria-label":"Send","data-track":"send_open",children:[N(Pd,{size:20}),N("span",{children:"Send"})]}),V?Z("button",{type:"button",className:"wi-action-card",onClick:()=>yt("portfolio"),"aria-label":"View portfolio","data-track":"portfolio_open",children:[N(Od,{size:20}),N("span",{children:"Portfolio"})]}):w?Z("button",{type:"button",className:"wi-action-card",onClick:Bt,disabled:!Bt,"aria-label":"Receive","data-track":"receive",children:[N(Wi,{size:20}),N("span",{children:"Receive"})]}):null]}):null,Um=Z("div",{className:Ne("wi-view-inner",ve.current&&"wi-view-wallet"),children:[F&&Z("div",{className:"wi-total-section",children:[Z("div",{className:"wi-total-head",children:[N("span",{className:"wi-total-label",children:ce}),N("span",{role:"button",tabIndex:0,className:"wi-total-eye",onClick:T=>{T.stopPropagation(),Yt(se=>!se)},onKeyDown:T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),T.stopPropagation(),Yt(se=>!se))},"aria-label":wt?"Show balance":"Hide balance","data-track":"balance_toggle",children:wt?N(Ld,{}):N(Ad,{})})]}),N("div",{className:"wi-total-body",ref:Om,children:Ce?N("div",{className:"wi-skeleton-block wi-total-skeleton",style:{width:160,height:42}}):N("div",{className:"wi-total-value","data-hidden":wt||void 0,ref:Bm,style:{"--wi-total-scale":zm},children:wt?N("span",{className:"wi-total-mask",children:"\u2022\u2022\u2022\u2022\u2022\u2022"}):Z(ul,{children:[ue&&N("span",{className:"wi-total-lte",children:"\u2264"}),N("span",{className:"wi-total-currency",children:"$"}),N("span",{className:"wi-total-amount",children:ms.main}),ms.decimal&&N("span",{className:"wi-total-decimal",children:ms.decimal})]})})})]}),ie==="top"&&(O?N("div",{className:"wi-nav-fixed",children:O}):Fm),p&&N("div",{ref:Wt,className:"wi-scrollable-body","data-vaul-no-drag":!0,children:Z("div",{className:"wi-token-list",children:[rt&&Array.from({length:5},(T,se)=>Z("div",{className:"wi-skeleton-item",children:[Z("div",{className:"wi-skeleton-left",children:[N("div",{className:"wi-skeleton-block wi-skeleton-icon"}),Z("div",{className:"wi-skeleton-lines",children:[N("div",{className:"wi-skeleton-block",style:{width:64,height:14}}),N("div",{className:"wi-skeleton-block",style:{width:80,height:12}})]})]}),Z("div",{className:"wi-skeleton-right",children:[N("div",{className:"wi-skeleton-block",style:{width:72,height:14}}),N("div",{className:"wi-skeleton-block",style:{width:48,height:12}})]})]},se)),!rt&&fe.length===0&&!h&&N("div",{className:"wi-empty",children:"No Tokens Found"}),fe.map(T=>{let se=st.get(Tr(T.chainId,T.address)),Be=se?parseFloat(se.percent_change_24h):null,rr=Be!==null&&Be>=0,Ye=$o(o,T.chainId),Zt=ic(T.address);return Z("button",{type:"button",className:"wi-token-item wi-token-item--button",onClick:()=>uo(T),"aria-label":`View ${T.symbol} detail`,"data-track":"token_detail","data-track-id":T.symbol,children:[Z("div",{className:"wi-token-left",children:[Z("div",{className:"wi-token-icon-wrap",children:[N("img",{src:T.icon_url,alt:T.symbol,className:"wi-token-icon",width:32,height:32,loading:"lazy",draggable:!1,onLoad:Ii,onError:Qr=>{Qr.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),Ye&&N("img",{src:Ye,alt:"","aria-hidden":!0,className:"wi-token-chain-badge",width:14,height:14,loading:"lazy",draggable:!1,onError:Qr=>{Qr.currentTarget.style.display="none"}})]}),Z("div",{className:"wi-token-info",children:[Z("span",{className:"wi-token-name-row",children:[N("span",{className:"wi-token-name",children:T.symbol}),Zt&&z!==null&&N("span",{className:"wi-token-apr",children:oa(z)})]}),se&&Z("div",{className:"wi-token-price-row",children:[N("span",{className:"wi-token-price",children:Jn(se.price)}),N("span",{className:"wi-token-change","data-positive":rr,"data-zero":Be===0||void 0,children:Be!==null&&(Be===0?"0%":`${rr?"+":"-"}${(rr?Math.floor:Math.ceil)(Math.abs(Be)*100)/100}%`)})]})]})]}),Z("div",{className:"wi-token-right",children:[N("span",{className:"wi-token-balance",children:Nn(T.quantity.numeric,T.quantity.decimals)}),se&&N("span",{className:"wi-token-value",children:Gi(T.quantity.numeric,T.quantity.decimals,se.price)})]})]},`${T.address}-${T.chainId}`)}),h&&fn&&Array.from({length:3},(T,se)=>Z("div",{className:"wi-skeleton-item",children:[Z("div",{className:"wi-skeleton-left",children:[N("div",{className:"wi-skeleton-block wi-skeleton-icon"}),Z("div",{className:"wi-skeleton-lines",children:[N("div",{className:"wi-skeleton-block",style:{width:64,height:14}}),N("div",{className:"wi-skeleton-block",style:{width:80,height:12}})]})]}),Z("div",{className:"wi-skeleton-right",children:[N("div",{className:"wi-skeleton-block",style:{width:72,height:14}}),N("div",{className:"wi-skeleton-block",style:{width:48,height:12}})]})]},`forge-sk-${se}`)),h&&!fn&&!rt&&fe.length===0&&j.length===0&&N("div",{className:"wi-empty",children:"No Tokens Found"}),h&&j.map(T=>{let se=re.get(T.token)||"",Be=$o(o,xt[o].cross);return Z("div",{className:"wi-token-item",children:[Z("div",{className:"wi-token-left",children:[Z("div",{className:"wi-token-icon-wrap",children:[N("img",{src:se||"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:Ii,onError:rr=>{rr.currentTarget.src="https://contents.crosstoken.io/wallet/token/images/FT.png"}}),Be&&N("img",{src:Be,alt:"","aria-hidden":!0,className:"wi-token-chain-badge",width:14,height:14,loading:"lazy",draggable:!1,onError:rr=>{rr.currentTarget.style.display="none"}})]}),Z("div",{className:"wi-token-info",children:[N("span",{className:"wi-token-name",children:T.token_name}),N("div",{className:"wi-token-price-row",children:Z("span",{className:"wi-token-price",children:[Nn(T.current_price,18)," CROSS"]})})]})]}),Z("div",{className:"wi-token-right",children:[N("span",{className:"wi-token-balance",children:Nn(T.balance,18)}),N("span",{className:"wi-token-value",children:Jn(T.current_value_usd)})]})]},`forge-${T.token}`)})]})}),ie==="bottom"&&O&&N("div",{className:"wi-nav-fixed",children:O}),Jl&&N("div",{className:"wi-wallet-disconnect-row",children:Jl})]},"wallet"),jm=V?N("div",{className:Ne("wi-view-inner wi-portfolio-body",ve.current&&"wi-view-portfolio"),children:N(Io,{env:o,theme:i,walletAddress:u,showHeader:!1,onOutlink:oe,lpBalanceReader:Me,stakingRewardsReader:$e,sendTransaction:We,estimateGas:Je,sections:he})},"portfolio"):null,Wm=$?N("div",{className:Ne("wi-view-inner wi-send-body",ve.current&&"wi-view-send"),children:N(ta,{env:o,theme:i,walletAddress:u,accountName:c,accounts:y,initialStep:ds,token:$,tokens:fe,onTokenChange:Q,sendTransaction:We,getTransactionReceipt:we,estimateGas:Je,getTokenPriceUsd:T=>{let se=st.get(Tr(T.chainId,T.address));if(!se?.price)return;let Be=parseFloat(se.price);return Number.isFinite(Be)?Be:void 0},onClose:k,onBackToWallet:po,onSubmitted:fs,onSuccess:W,onFailed:ut,onOutlink:oe})},"send"):null,Gm=te.useMemo(()=>Te||fe.map(T=>{let se=st.get(Tr(T.chainId,T.address)),Be=se?.price?parseFloat(se.price):void 0;return{name:T.name,symbol:T.symbol,chainId:T.chainId,address:T.address,decimals:T.quantity.decimals,balance:So(T.quantity.numeric,T.quantity.decimals),iconUrl:T.icon_url,priceUsd:Number.isFinite(Be)?Be:void 0}}),[Te,st,fe]),_m=N("div",{className:Ne("wi-view-inner wi-bridge-body",ve.current&&"wi-view-send"),children:N(Lo,{env:o,walletAddress:u,tokens:Gm,history:Ae,termsUrl:D,getQuote:be,getToTokens:ht,getApproval:Et,approveBridge:vt,submitBridge:Le,onClose:k,onBackToWallet:po})},"bridge"),Hm=B?N("div",{className:Ne("wi-view-inner wi-token-detail-body",ve.current&&"wi-view-send"),children:N(Du,{env:o,isMobile:a,token:B,walletAddress:u,stat:st.get(Tr(B.chainId,B.address)),tokenInfo:Ze.get(ti(B.chainId,B.address)),showBalance:p,onBack:cs,onClose:k,onSend:ps,onOutlink:oe})},"token-detail"):null,gs=!!R&&c?.trim().toLowerCase()!=="my wallet",$l=Z(ul,{children:[Z("span",{className:"wi-receive-avatar",children:[N("span",{className:"wi-avatar-fallback",style:Zl}),Ei&&N("img",{src:Ei,alt:"",className:"wi-avatar-img",width:24,height:24,draggable:!1,onLoad:Ii,onError:T=>{T.currentTarget.style.display="none"}})]}),N("span",{className:"wi-receive-account-name",children:c??"Account 1"}),gs&&N("span",{className:"wi-receive-chevron","data-open":nn,"aria-hidden":"true",children:N(Cr,{size:16})})]}),Qm=Z("div",{className:Ne("wi-view-inner wi-qr-body",ve.current&&"wi-view-qr"),children:[Z("div",{className:"wi-receive-section",children:[gs?N("button",{type:"button",className:"wi-receive-account wi-receive-account--btn",onClick:()=>{Qo(!0),R?.()},"aria-label":"Switch account",children:$l}):N("div",{className:"wi-receive-account",children:$l}),Z("div",{className:"wi-qr-block",children:[Z("div",{className:"wi-qr-box",children:[N(Dw,{value:u,size:180,level:"H",marginSize:2,...f&&{imageSettings:{src:f,height:33,width:33,excavate:!0}}}),!f&&N("div",{className:"wi-qr-logo",children:N(Dd,{size:33})})]}),N("p",{className:"wi-qr-address",children:u})]}),Z("button",{type:"button",className:"wi-qr-copy-btn",onClick:Kl,"data-track":"address_copy",children:[N("span",{className:"wi-qr-copy-icon",children:Kt?N(mn,{size:16}):N(Zn,{size:16})}),N("span",{className:"wi-qr-copy-text",children:Kt?"Copied!":"Copy address"})]})]}),Xl&&N("div",{className:"wi-receive-footer",children:Xl})]},"qr"),Vm=P==="qr"||P==="portfolio"||P==="send"||P==="bridge",ed=Y!==null?N("div",{className:"wi-builtin-footer",children:Y}):null,td=Z("div",{className:"wi-account-text",children:[gs?Z("button",{type:"button",className:"wi-account-row wi-account-row--btn",onClick:()=>{Qo(!0),R?.()},"aria-label":"Switch account","aria-expanded":nn,children:[N("span",{className:"wi-account-name",children:c??"Account 1"}),N("span",{className:"wi-account-switch","data-open":nn,"aria-hidden":"true",children:N(Cr,{size:20})})]}):N("div",{className:"wi-account-row",children:N("span",{className:"wi-account-name",children:c??"Account 1"})}),Z("button",{type:"button",className:"wi-address-row-btn",onClick:Kl,"aria-label":"Copy address","data-track":"address_copy",children:[N("span",{className:"wi-account-address",children:Xt(u)}),N("span",{className:"wi-account-copy","data-copied":Kt,children:Kt?N(mn,{size:12}):N(Zn,{size:12})})]})]}),rd=Z(ul,{children:[n,P==="qr"?N("div",{className:"wi-sticky-header",children:Z("div",{className:"wi-header wi-header--receive",children:[N("button",{type:"button",className:"wi-header-back",onClick:po,"aria-label":"Back",children:N(gn,{size:24})}),N("span",{className:"wi-receive-title",children:"Receive"}),N("button",{type:"button",className:"wi-header-action",onClick:k,"aria-label":"Close",children:N(Sr,{size:24})})]})}):P==="send"||P==="bridge"||P==="token-detail"?null:Vm?Z("div",{className:"wi-sticky-header",children:[Z("div",{className:"wi-header wi-header--wallet wi-header--sub-account",children:[N("button",{type:"button",className:"wi-header-back",onClick:po,"aria-label":"Back",children:N(gn,{size:24})}),N("div",{className:"wi-account-block wi-account-block--sub-account",children:td}),N("button",{type:"button",className:"wi-header-action",onClick:k,"aria-label":"Close",children:N(Sr,{size:24})})]}),N("hr",{className:"wi-divider"})]}):Z("div",{className:"wi-sticky-header",children:[Z("div",{className:"wi-header wi-header--wallet",children:[Z("div",{className:"wi-account-block",children:[Z("div",{className:"wi-avatar",children:[N("div",{className:"wi-avatar-fallback",style:Zl}),Ei&&N("img",{src:Ei,alt:"",className:"wi-avatar-img",width:28,height:28,draggable:!1,onLoad:Ii,onError:T=>{T.currentTarget.style.display="none"}})]}),td]}),Z("div",{className:"wi-header-actions",children:[m&&w&&N("button",{type:"button",className:"wi-header-action wi-header-action--qr",onClick:Bt,"aria-label":"Show QR code","data-track":"receive",children:N(Wi,{size:20})}),N("button",{type:"button",className:"wi-header-action",onClick:k,"aria-label":"Close",children:N(Sr,{size:24})})]})]}),N("hr",{className:"wi-divider"})]}),Z("div",{className:"wi-view-container",children:[P==="wallet"&&Um,P==="qr"&&Qm,P==="portfolio"&&jm,P==="send"&&Wm,P==="bridge"&&_m,P==="token-detail"&&Hm]}),P==="wallet"&&bt&&N("div",{className:"wi-action-toast",role:"status","aria-live":"polite",children:bt}),P==="wallet"&&_&&Z("a",{className:"wi-send-toast",href:kr??"#",target:"_blank",rel:"noopener noreferrer",onClick:T=>{if(!kr){T.preventDefault();return}Pt(T,kr,{category:"send",origin:"send-transaction",payload:{chainId:_.chainId,txHash:_.txHash}},oe)},children:[N("span",{className:"wi-send-toast-icon","data-status":_.status,"aria-hidden":!0,children:_.status==="pending"?N("span",{className:"wi-send-toast-spinner"}):_.status==="error"?N("span",{className:"wi-send-toast-error-dot"}):N(Fd,{size:20})}),Z("span",{className:"wi-send-toast-copy",children:[N("span",{className:"wi-send-toast-title",children:_.status==="pending"?"Sending...":_.status==="error"?"Send failed":"Send complete"}),N("span",{className:"wi-send-toast-desc",children:_.status==="pending"||_.status==="error"?_.description:"Tap to see your transaction"})]})]}),ed&&P!=="portfolio"&&P!=="send"&&P!=="token-detail"&&N("div",{className:"wi-sticky-footer",children:N("div",{className:"wi-footer",ref:tr,children:ed})})]}),nd={...E,...Gr>0?{"--wi-footer-height":`${Gr}px`}:null};return a?N(ge,{feature:"wallet_info",children:Z(Ta.Portal,{children:[d&&N(Ta.Overlay,{className:"wi-drawer-overlay"}),Z(Ta.Content,{className:Ne("wi-drawer-content",r),"data-theme":i,"data-vaul-no-drag":l==="left"||l==="right"?!0:void 0,style:nd,"data-direction":l,"data-no-balance":!p||void 0,"data-has-footer":Gr>0||void 0,"data-view":P,children:[N(Ta.Title,{className:"wi-sr-only",children:"My Wallet"}),rd]})]})}):Z(ge,{feature:"wallet_info",children:[d&&s&&N("div",{className:"wi-drawer-overlay",onClick:k}),N(Ia.Portal,{children:N(Ia.Content,{align:e,sideOffset:t,className:Ne("wi-popover-content",r),"data-theme":i,style:nd,"data-no-balance":!p||void 0,"data-has-footer":Gr>0||void 0,"data-view":P,children:rd})})]})}import*as Ou from"react";function Bu({position:e="top",children:t}){let{setNavContent:r,setNavPosition:n}=Cn();return Ou.useEffect(()=>(r(t),n(e),()=>r(null)),[t,e,r,n]),null}import*as zu from"react";function Fu({children:e}){let{setFooterContent:t}=Cn();return zu.useEffect(()=>(t(e),()=>t(null)),[e,t]),null}de(`[data-theme=dark].wi-popover-content,[data-theme=dark].wi-drawer-content{--wi-primary: var(--ds-system-orange-default, #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-system-orange-default, #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)}
|
|
12
|
+
`);de(`.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}
|
|
13
|
+
`);de(`@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}}
|
|
14
|
+
`);de(`.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-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, #00d5aa);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-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-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-system-orange-default, #f0640d)}.wi-send-toast-spinner{width:18px;height:18px;border:2px solid rgba(255,159,33,.22);border-top-color:var(--ds-system-orange-on-inverted, #ff9f21);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-system-orange-on-inverted, #ff9f21)}.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}
|
|
15
|
+
`);de(`.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, #019d92);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))}
|
|
16
|
+
`);de(`.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}
|
|
17
|
+
`);import{jsx as fl}from"react/jsx-runtime";function Ww({env:e,theme:t="dark",mobileBreakpoint:r=768,drawerDirection:n,modal:o,showBalance:i=!1,showForgeToken:a=!1,showGameToken:s=!0,showQR:l=!0,showBridge:d=!0,qrLogoSrc:p,walletAddress:h,accountName:b,sendAccounts:m,profileImageUrl:w,connectorId:f,connectorName:u,connectorIconUrl:c,preferredTokens:y=[],onSelectWallet:g,onCopyAddress:v,onBuy:k,onBuyDisabledMessage:R,onBridgeDisabledMessage:I,onSendDisabledMessage:C,onDisconnect:S,disconnectLabel:A="Disconnect",termsUrl:D=ko,termsLabel:U="Terms of Service",privacyUrl:M=_i,privacyLabel:G="Privacy Policy",open:E,onOpenChange:O,showPortfolio:ie=!1,portfolioTitle:Y="My Portfolio",portfolioSections:P,showTotalAssets:pe=!0,totalAssetsLabel:$="Total Assets USD",sendTransaction:Q,getTransactionReceipt:B,estimateGas:J,onOutlink:V,lpBalanceReader:le,stakingRewardsReader:he,bridgeTokens:ee,bridgeHistory:ce,getBridgeQuote:We,getBridgeToTokens:we,getBridgeApproval:Je,approveBridge:oe,submitBridge:Me,onReceive:$e,onBridge:Te,onSend:Ae,style:be,children:ht}){let Et=nt(e),vt=f?ji[f]:void 0,Le=u??vt?.name,it=c??vt?.iconUrl,Mt=bo(`(max-width: ${r}px)`),Qe=n??(i?"right":"bottom"),et=Qe==="left"||Qe==="right",De=o??!1,bt=E!==void 0,[qt,kt]=Qt.useState(!1),Ve=bt?E:qt,tt=Qt.useCallback(tr=>{bt||kt(tr),O?.(tr)},[bt,O]),ct=Qt.useCallback(()=>tt(!1),[tt]),[Pe,at]=Qt.useState(null),[qe,rt]=Qt.useState("top"),[st,z]=Qt.useState(null),[Ie,Ze]=Qt.useState("wallet"),[F,ne]=Qt.useState(null),[ue,Ce]=Qt.useState(null);Qt.useEffect(()=>{Ve||(Ze("wallet"),ne(null),Ce(null))},[Ve]),Qt.useEffect(()=>{ho(h)},[h]);let wt=Qt.useCallback(()=>{Ms(h),S?.()},[S,h]),Yt=Qt.useMemo(()=>({env:Et,theme:t,isMobile:Mt,open:Ve,drawerDirection:Qe,modal:De,showBalance:i,showForgeToken:a,showGameToken:s,showQR:l,showBridge:d,qrLogoSrc:p,walletAddress:h,accountName:b,sendAccounts:m,profileImageUrl:w,connectorName:Le,connectorIconUrl:it,preferredTokens:y,close:ct,onSelectWallet:g,onCopyAddress:v,onBuy:k,onBuyDisabledMessage:R,onBridgeDisabledMessage:I,onSendDisabledMessage:C,onDisconnect:S?wt:void 0,disconnectLabel:A,termsUrl:D,termsLabel:U,privacyUrl:M,privacyLabel:G,portalStyle:be,navContent:Pe,navPosition:qe,setNavContent:at,setNavPosition:rt,footerContent:st,setFooterContent:z,view:Ie,setView:Ze,selectedSendToken:F,setSelectedSendToken:ne,selectedDetailToken:ue,setSelectedDetailToken:Ce,showPortfolio:ie,portfolioTitle:Y,portfolioSections:P,showTotalAssets:pe,totalAssetsLabel:$,sendTransaction:Q,getTransactionReceipt:B,estimateGas:J,onOutlink:V,lpBalanceReader:le,stakingRewardsReader:he,bridgeTokens:ee,bridgeHistory:ce,getBridgeQuote:We,getBridgeToTokens:we,getBridgeApproval:Je,approveBridge:oe,submitBridge:Me,onReceive:$e,onBridge:Te,onSend:Ae}),[Et,t,Mt,Ve,Qe,De,i,a,s,l,d,p,h,b,m,w,Le,it,y,ct,g,v,k,R,I,C,S,wt,A,D,U,M,G,be,Pe,qe,st,Ie,F,ue,ie,Y,P,pe,$,Q,B,J,V,le,he,ee,ce,We,we,Je,oe,Me,$e,Te,Ae]);return fl(Cs.Provider,{value:Yt,children:Mt?fl(jw.Root,{direction:Qe,open:Ve,onOpenChange:tt,handleOnly:et,noBodyStyles:!0,repositionInputs:!1,children:ht},"drawer"):fl(Uu.Root,{open:Ve,onOpenChange:tt,children:ht},"popover")})}var Po=Object.assign(Ww,{Trigger:kc,Content:Pu,Nav:Bu,Footer:Fu});import*as ze from"react";import*as Va from"react";import{createContext as Gw,useContext as _w}from"react";var ml=Gw(null);function ci(){let e=_w(ml);if(!e)throw new Error("RelayDeposit compound components must be used within <RelayDeposit>");return e}import*as vf from"react";import{createContext as Hw,useContext as Qw}from"react";var Ea=Hw(null);function Jr(){let e=Qw(Ea);if(!e)throw new Error("ResponsiveShell compound components must be used within <ResponsiveShell>");return e}import{createContext as Vw,useContext as qw,useLayoutEffect as Yw,useState as Kw}from"react";function ju(){let e=null,t=new Set;return{getSnapshot:()=>e,publish(r){if(r!==e){e=r;for(let n of[...t])n()}},subscribe(r){return t.add(r),()=>{t.delete(r)}}}}var gl=Vw(null);function Zw(){let e=qw(gl);if(!e)throw new Error("RelayDeposit compound components must be used within <RelayDeposit>");return e}function Wu(){let e=Zw(),[t,r]=Kw(e.getSnapshot);return Yw(()=>(r(e.getSnapshot()),e.subscribe(()=>r(e.getSnapshot()))),[e]),t}de(`.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-system-orange-default, #5b5bf6);--rd-accent-contrast: var(--ds-system-orange-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-system-orange-default, #8181ff);--rd-accent-contrast: var(--ds-system-orange-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-system-orange-default, #5b5bf6);--rd-accent-contrast: var(--ds-system-orange-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-listbox{position:absolute;z-index:20;top:calc(100% + .3rem);left:0;right:0;margin:0;padding:.3rem;list-style:none;max-height:15rem;overflow-y:auto;background:var(--rd-surface);border:1px solid var(--rd-border);border-radius:10px;box-shadow:var(--rd-shadow)}.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-foot{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-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: 2;--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-tab-count="3"]{--rd-tab-count: 3}.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:0 0 auto;min-width:0;align-items:center;justify-content:center;gap:.4rem;padding:.7rem .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-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{width:172px;min-height:172px;margin:0 auto;padding:14px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.4rem;text-align:center;background:var(--rd-surface-alt);border:1px dashed var(--rd-border);border-radius:16px}.rd-locked-glyph{color:var(--rd-text-muted);line-height:0}.rd-locked-text{font-size:12px;line-height:1.5;color:var(--rd-text-muted)}.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}}
|
|
18
|
+
`);import{jsx as Bn,jsxs as $r}from"react/jsx-runtime";function Gu({minNotice:e,arrivalStatus:t}){let r=t.amount&&t.symbol?`${t.amount} ${t.symbol} arrived`:t.amount?`${t.amount} arrived`:void 0,n=(()=>{switch(t.phase){case"detected":if(e.remaining!==void 0){let o=`${e.remaining} ${e.symbol}`;return r?`${r} at the processing address. Waiting for ${o} more to reach the minimum.`:`Deposit detected. Waiting for ${o} more to reach the minimum.`}return r?`${r} 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}})();return n?$r("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:[Bn("span",{className:"rd-checklist-status-dot","aria-hidden":"true"}),Bn("span",{children:n})]},`live:${t.phase}:${n}`):e.remaining!==void 0?$r("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:[Bn("span",{className:"rd-checklist-status-dot","aria-hidden":"true"}),$r("span",{children:["Waiting for"," ",$r("b",{children:[e.remaining," ",e.symbol]})," ","more to arrive at the processing address."]})]},`pending:${e.remaining}:${e.symbol}`):null}function _u({minNotice:e,onlySend:t,showWalletCreditNote:r=!1}){return $r("div",{className:"rd-checklist","data-rd-checklist":"",children:[$r("div",{className:"rd-checklist-row","data-rd-checklist-only":"",children:[Bn("span",{className:"rd-checklist-mark rd-checklist-mark-warn","aria-hidden":"true",children:"!"}),$r("span",{children:[$r("b",{children:[t.chainName," ",t.symbol," only"]})," \xB7 ",$r("b",{className:"rd-checklist-accent",children:[e.min," ",e.symbol," minimum"]})]})]}),$r("div",{className:"rd-checklist-row",children:[Bn("span",{className:"rd-checklist-mark","aria-hidden":"true",children:"\u21BB"}),Bn("span",{children:"Reusable \u2014 deposit as many times as you like"})]}),r&&$r("div",{className:"rd-checklist-row rd-checklist-credit","data-rd-checklist-credit":"",children:[Bn("span",{className:"rd-checklist-mark","aria-hidden":"true",children:"\u2192"}),Bn("span",{children:"Credited to your ONEchain wallet"})]})]})}import{useEffect as ly,useId as dy,useState as Vu}from"react";var pi="0x0000000000000000000000000000000000000000",Xw=/^0x[0-9a-fA-F]{40}$/;function dt(e){return Xw.test(e)}function Ft(e,t){let r=e<0n,o=(r?-e:e).toString().padStart(t+1,"0"),i=t===0?o:o.slice(0,-t),a=t===0?"":o.slice(-t).replace(/0+$/,""),s=a?`${i}.${a}`:i;return r?`-${s}`:s}function Ma(e,t){let r=e.match(/^(-?)(\d+)(?:\.(\d+))?$/);if(!r)throw new Error(`parseUnits: invalid decimal string "${e}"`);let[,n,o,i=""]=r;if(i.length>t)throw new Error(`parseUnits: too many decimal places for ${t} decimals`);let a=BigInt(o+i.padEnd(t,"0"));return n==="-"?-a:a}import{useId as zn}from"react";var hl="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTQwIDU0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzc0MDAwXzM4NTkwKSI+CjxtYXNrIGlkPSJtYXNrMF83NDAwMF8zODU5MCIgc3R5bGU9Im1hc2stdHlwZTpsdW1pbmFuY2UiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiIHg9IjAiIHk9IjAiIHdpZHRoPSI1NDAiIGhlaWdodD0iNTQwIj4KPHBhdGggZD0iTTI3MCAwQzU2Ljg1NjMgMCAwIDU2Ljg1NjMgMCAyNzBDMCA0ODMuMTQ0IDU2Ljg1NjMgNTQwIDI3MCA1NDBDNDgzLjE0NCA1NDAgNTQwIDQ4My4xNDQgNTQwIDI3MEM1NDAgNTYuODU2MyA0ODMuMTQ0IDAgMjcwIDBaIiBmaWxsPSJ3aGl0ZSIvPgo8L21hc2s+CjxnIG1hc2s9InVybCgjbWFzazBfNzQwMDBfMzg1OTApIj4KPHBhdGggZD0iTTUzOS43MzEgMC4yNzA1MDhIMFY1NDAuMDAxSDUzOS43MzFWMC4yNzA1MDhaIiBmaWxsPSJ1cmwoI3BhaW50MF9saW5lYXJfNzQwMDBfMzg1OTApIi8+CjxwYXRoIGQ9Ik0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B44Ude5SbHRN0YpiuNfzltD0eR2OghRRuoOVnCsGHJM3ZKbPGDgJUuSGDa8qW09Sft5Nlsz0gQO4CFLEeb1ecgg11vySmT7YHNsHKQyj/TplrhWf6ARbMtMHG2Nrf9F1qV+7UFaQF2zITB9si42DFP6xfufizWRF+TAeMtMHW2LTIEU+rNwl+wsh70QjMn2wHTYMUuQfCjsWbSn7wFeEqIl/SmT6TMRW2CxIkf+gemaYjNC7JZHpg02wDTYKUrQ+rHVZxVJynXu0PJ8LmXPasZDnYANsgU2CFG0DhVdkCsKMm+J2JOZi5szcgxRt/SKnaPeCTiU3eqrS6r2KKHNjjkGK9of1Lu73r/W79OpQ2KXkHHk+o7G7CGNuKxLxXMbM2JkDc2FOQYoUAOx2049/l4Cd3UQs10mS60vhtfzsPBLxbMbE2BgjY2XMQYoU2UIavS+2XseiDaQQ+d4iovOpeB8W5WkM3YazDIQ7K/zsRn4Xv5PfzRgYC2MKUqSIs1tC4dWZZTl4UVtZ9q7HiUehi/h775H//4aI7z0OZ5LeVJvNw/fyM/wsn8Fn8Zl8Nr+D36Wvsp/if7BfCn8ECvocAAAAAElFTkSuQmCC";function Hu(e){switch(e.toUpperCase()){case"ONEUSD":return hl;case"PONEUSD":return Jw;case"USDT":return $w;case"USDC":return ey;default:return}}import{jsx as X,jsxs as Vt}from"react/jsx-runtime";function Qu(e){let t=e.trim();return t?t.slice(0,2).toUpperCase():"?"}function ty({size:e,bg:t,fg:r="#ffffff",children:n}){return Vt("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",style:{display:"block",flex:"none",borderRadius:"50%"},children:[X("circle",{cx:"12",cy:"12",r:"12",fill:t}),X("g",{fill:r,stroke:r,children:n})]})}function bl({size:e,bg:t,fg:r="#ffffff",text:n}){return X(ty,{size:e,bg:t,fg:r,children:X("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",fontSize:"10",fontWeight:700,fontFamily:"inherit",stroke:"none",fill:r,children:n})})}function Oo({size:e,viewBox:t="0 0 24 24",children:r}){return X("svg",{width:e,height:e,viewBox:t,"aria-hidden":"true",focusable:"false",style:{display:"block",flex:"none",borderRadius:"50%"},children:r})}function ry({size:e}){let t=zn();return Vt(Oo,{size:e,children:[Vt("g",{clipPath:`url(#${t})`,children:[X("path",{fill:"#000",d:"M24 0H0v24h24z"}),X("path",{fill:"#8FFCF3",d:"M12 4v5.912l5 2.237z"}),X("path",{fill:"#CABCF8",d:"m12 4-5 8.148 5-2.235z"}),X("path",{fill:"#CBA7F5",d:"M12 15.98V20l5-6.92z"}),X("path",{fill:"#74A0F3",d:"M12 20v-4.02l-5-2.9z"}),X("path",{fill:"#CBA7F5",d:"m12 15.049 5-2.9-5-2.236z"}),X("path",{fill:"#74A0F3",d:"m7 12.149 5 2.9V9.913z"}),X("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"}),X("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"})]}),X("defs",{children:X("clipPath",{id:t,children:X("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function ny({size:e}){let t=zn();return Vt(Oo,{size:e,children:[Vt("g",{clipPath:`url(#${t})`,children:[X("path",{fill:"#F0B90B",d:"M24 0H0v24h24z"}),X("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"})]}),X("defs",{children:X("clipPath",{id:t,children:X("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function oy({size:e}){let t=zn();return Vt(Oo,{size:e,viewBox:"0 0 111 111",children:[Vt("g",{clipPath:`url(#${t})`,children:[X("path",{fill:"#fff",d:"M0 0h111v111H0z"}),X("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"})]}),X("defs",{children:X("clipPath",{id:t,children:X("path",{fill:"#fff",d:"M0 0h111v111H0z"})})})]})}function iy({size:e}){let t=zn();return Vt(Oo,{size:e,children:[Vt("g",{clipPath:`url(#${t})`,children:[X("path",{fill:"#213147",d:"M24 0H0v24h24z"}),X("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"}),X("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"}),X("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"}),X("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"})]}),X("defs",{children:X("clipPath",{id:t,children:X("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}function ay({size:e}){let t=zn(),r=zn();return Vt(Oo,{size:e,children:[Vt("g",{clipPath:`url(#${t})`,children:[X("path",{fill:`url(#${r})`,d:"M24 0H0v24h24z"}),X("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"})]}),Vt("defs",{children:[Vt("linearGradient",{id:r,x1:"3.948",x2:"19.217",y1:"16.617",y2:"7.645",gradientUnits:"userSpaceOnUse",children:[X("stop",{stopColor:"#A726C1"}),X("stop",{offset:".88",stopColor:"#803BDF"}),X("stop",{offset:"1",stopColor:"#7B3FE4"})]}),X("clipPath",{id:t,children:X("path",{fill:"#fff",d:"M0 0h24v24H0z"})})]})]})}function sy({size:e}){let t=zn(),r=zn();return Vt(Oo,{size:e,children:[Vt("g",{clipPath:`url(#${t})`,children:[X("path",{fill:`url(#${r})`,d:"M24 0H0v24h24z"}),X("path",{fill:"#fff",d:"M17.7 8.358a.55.55 0 0 1-.365.145H4.515c-.455 0-.684-.52-.37-.825l2.106-2.03a.54.54 0 0 1 .364-.15h12.87c.46 0 .685.524.365.83zm0 10.005c-.1.09-.23.14-.365.14H4.515c-.455 0-.684-.516-.37-.82l2.106-2.036a.53.53 0 0 1 .364-.145h12.87c.46 0 .685.52.365.825zm0-7.72a.55.55 0 0 0-.365-.14H4.515c-.455 0-.684.515-.37.82l2.106 2.035c.1.091.23.143.364.144h12.87c.46 0 .685-.52.365-.824z"})]}),Vt("defs",{children:[Vt("linearGradient",{id:r,x1:"4.001",x2:"20.408",y1:"50.258",y2:"50.108",gradientUnits:"userSpaceOnUse",children:[X("stop",{stopColor:"#599DB0"}),X("stop",{offset:"1",stopColor:"#47F8C3"})]}),X("clipPath",{id:t,children:X("path",{fill:"#fff",d:"M0 0h24v24H0z"})})]})]})}function Aa({chainId:e,chainName:t,size:r=20}){switch(e){case 1:return X(ry,{size:r});case 56:return X(ny,{size:r});case 8453:return X(oy,{size:r});case 42161:return X(iy,{size:r});case 137:return X(ay,{size:r});case 792703809:return X(sy,{size:r});case 612055:return X(bl,{size:r,bg:"#0b1f3a",text:"CR"});default:return X(bl,{size:r,bg:"#676b7a",text:Qu(t??String(e))})}}function io({symbol:e,logoUrl:t,size:r=20}){let n=t&&t.trim().length>0?t.trim():Hu(e);return n?X("img",{src:n,alt:"","aria-hidden":"true",width:r,height:r,style:{display:"block",flex:"none",borderRadius:"50%",objectFit:"cover"}}):X(bl,{size:r,bg:"#676b7a",text:Qu(e)})}import{QRCodeSVG as cy}from"qrcode.react";import{Fragment as La,jsx as pt,jsxs as Ot}from"react/jsx-runtime";function Da(){return Ot("div",{className:"rd-deposit-head","data-testid":"rd-address-skeleton","aria-hidden":"true",children:[pt("span",{className:"rd-skeleton rd-skeleton-qr"}),pt("span",{className:"rd-skeleton rd-skeleton-address"})]})}function py(e){let{depositAddress:t,originChainId:r,originCurrency:n,amountWei:o,isNative:i}=e;if(i)return o!==void 0?`ethereum:${t}@${r}?value=${o.toString()}`:`ethereum:${t}@${r}`;let a=new URLSearchParams({address:t});return o!==void 0&&a.set("uint256",o.toString()),`ethereum:${n}@${r}/transfer?${a.toString()}`}function uy(e){let{depositAddress:t,splMint:r,humanAmount:n}=e,o=new URLSearchParams;return n&&o.set("amount",n),o.set("spl-token",r),`solana:${t}?${o.toString()}`}function qu({depositAddress:e,originChainId:t,originChainName:r,originCurrency:n,amount:o,tokenSymbol:i,tokenDecimals:a,kind:s="evm",depositState:l,onDeposit:d,canDeposit:p,oneClickEnabled:h=!0}){let[b,m]=Vu(!1),[w,f]=Vu("address"),u=dy();ly(()=>{f("address")},[e]);let c=n.toLowerCase()===pi,y=s==="svm";async function g(){try{await navigator.clipboard.writeText(e),m(!0),setTimeout(()=>m(!1),1500)}catch{}}let v;if(o)try{let E=BigInt(o);E>0n&&(v=E)}catch{}let k=v!==void 0,R;if(k)try{R=Ft(v,a)}catch{R=o}let I=y?uy({depositAddress:e,splMint:n,humanAmount:R??""}):py({depositAddress:e,originChainId:t,originCurrency:n,amountWei:v,isNative:c}),{isSubmitting:C,isConfirming:S,isConfirmed:A,needsSwitch:D,txHash:U,reverted:M,error:G}=l;return Ot("section",{className:"rd-stack",children:[Ot("div",{className:"rd-deposit-head","data-compact-view":w,children:[Ot("div",{className:"rd-deposit-qr-pane",children:[Ot("div",{className:"rd-deposit-qr",children:[pt(cy,{value:I,size:144,level:"H"}),pt("span",{className:"rd-deposit-qr-badge","aria-hidden":"true",children:pt(Aa,{chainId:t,chainName:r,size:28})})]}),pt("button",{type:"button",className:"rd-mobile-address-toggle","aria-label":"Show address and copy",onClick:()=>f("address"),children:Ot("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[pt("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2.25",stroke:"currentColor",strokeWidth:"1.8"}),pt("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"})]})})]}),Ot("div",{className:"rd-deposit-address",children:[pt("span",{className:"rd-deposit-address-label",children:Ot("button",{type:"button",className:"rd-address-term","aria-describedby":u,children:["Deposit address",pt("span",{id:u,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."})]})}),pt("button",{type:"button",className:"rd-mobile-qr-toggle","aria-label":"Show deposit QR code","aria-pressed":w==="qr",onClick:()=>f("qr"),children:pt("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:pt("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"})})}),pt("span",{className:"rd-address-full",title:e,children:e}),Ot("button",{type:"button",className:"rd-address-copy",onClick:g,"aria-label":`Copy deposit address ${e}`,children:[b?pt("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:pt("path",{d:"m5 12 4 4L19 6",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}):Ot("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[pt("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.8"}),pt("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"})]}),pt("span",{"aria-live":"polite",children:b?"Copied":"Copy address"})]})]})]}),!y&&p&&Ot(La,{children:[pt("button",{type:"button",className:"rd-button-primary rd-button-block",onClick:d,disabled:C||S||A&&!M,children:A&&!M?"Deposit sent":S?"Confirming...":C?D?"Switching network...":"Confirm in wallet...":`One-click deposit ${i}${D?` (switch to ${r})`:""}`}),G&&pt("div",{className:"rd-callout rd-callout-danger",children:G}),U&&Ot("p",{className:"rd-card-hint",children:["Tx: ",pt("span",{style:{fontFamily:"monospace"},children:U})]}),A&&M&&pt("div",{className:"rd-callout rd-callout-danger",children:"The deposit transaction reverted on-chain. Please check your wallet and try again."}),A&&!M&&pt("div",{className:"rd-callout rd-callout-success",children:"Deposit confirmed on-chain. Waiting for it to be swept..."})]}),y&&Ot("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"," ",k?Ot(La,{children:["exactly"," ",Ot("strong",{children:[R," ",i]})]}):Ot(La,{children:["any amount of ",pt("strong",{children:i})]}),"."]}),(k||!y&&!p&&h)&&Ot("p",{className:"rd-card-hint",children:[k&&Ot(La,{children:["Send exactly"," ",Ot("strong",{children:[R," ",i]})," ","on ",r," to this address."]}),!y&&!p&&h&&!k&&"Enter an amount to deposit in one click."]})]})}import{useEffect as Yu,useId as fy,useRef as wl,useState as Ku}from"react";import{jsx as Bo,jsxs as ui}from"react/jsx-runtime";function fi({value:e,options:t,onChange:r,disabled:n,ariaLabel:o,id:i}){let a=fy(),s=i??a,l=`${s}-listbox`,[d,p]=Ku(!1),h=t.findIndex(S=>S.value===e),[b,m]=Ku(h>=0?h:0),w=wl(null),f=wl(null),u=wl([]),c=!!n||t.length===0,y=h>=0?t[h]:void 0;Yu(()=>{if(!d)return;function S(A){w.current&&!w.current.contains(A.target)&&p(!1)}return document.addEventListener("pointerdown",S),()=>document.removeEventListener("pointerdown",S)},[d]),Yu(()=>{d&&u.current[b]?.scrollIntoView?.({block:"nearest"})},[d,b]);function g(){c||(m(h>=0?h:0),p(!0))}function v(S){p(!1),S&&f.current?.focus()}function k(S){let A=t[S];A&&(r(A.value),v(!0))}function R(){c||(d?v(!1):g())}function I(S){if(!c)switch(S.key){case"ArrowDown":S.preventDefault(),d?m(A=>Math.min(A+1,t.length-1)):g();break;case"ArrowUp":S.preventDefault(),d?m(A=>Math.max(A-1,0)):g();break;case"Enter":case" ":S.preventDefault(),d?k(b):g();break;case"Escape":d&&(S.preventDefault(),v(!0));break;case"Tab":d&&p(!1);break;default:break}}let C=d&&t[b]?`${s}-option-${b}`:void 0;return ui("div",{className:"rd-dropdown",ref:w,children:[ui("button",{type:"button",id:s,ref:f,className:"rd-dropdown-trigger","aria-haspopup":"listbox","aria-expanded":d,"aria-controls":l,"aria-activedescendant":C,"aria-label":o,disabled:c,onClick:R,onKeyDown:I,children:[ui("span",{className:"rd-dropdown-trigger-content",children:[y?.icon,ui("span",{className:"rd-dropdown-trigger-label",children:[y?.label??"",y?.subLabel&&Bo("small",{className:"rd-dropdown-trigger-sub",children:y.subLabel})]})]}),Bo("span",{className:"rd-dropdown-chevron","aria-hidden":"true",children:Bo(Cr,{size:16})})]}),d&&Bo("ul",{className:"rd-dropdown-listbox",role:"listbox",id:l,"aria-label":o,tabIndex:-1,"data-vaul-no-drag":!0,children:t.map((S,A)=>{let D=S.value===e,U=A===b;return ui("li",{id:`${s}-option-${A}`,role:"option","aria-selected":D,ref:M=>{u.current[A]=M},className:["rd-dropdown-option",U?"rd-dropdown-option-active":"",D?"rd-dropdown-option-selected":""].filter(Boolean).join(" "),onPointerEnter:()=>m(A),onClick:M=>{M.preventDefault(),k(A)},children:[S.icon,Bo("span",{className:"rd-dropdown-option-label",children:S.label}),D&&Bo("span",{className:"rd-dropdown-option-check","aria-hidden":"true",children:"\u2713"})]},S.value)})})]})}import{Fragment as yl,jsx as Fn,jsxs as Br}from"react/jsx-runtime";function my(e,t){if(!e)return"--";try{return Ft(BigInt(e),t)}catch{return"--"}}function Zu({quote:e,isLoading:t,error:r,humanAmount:n,originSymbol:o,destination:i}){return Br("div",{className:"rd-stack","data-rd-quote-preview":"",children:[t&&Br("div",{className:"rd-quote-strip","data-testid":"rd-quote-skeleton",children:[Fn("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"30%"},"aria-hidden":"true"}),Fn("span",{className:"rd-quote-strip-arrow","aria-hidden":"true",children:"\u2192"}),Fn("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"30%"},"aria-hidden":"true"})]}),!t&&r&&Br("div",{className:"rd-callout rd-callout-danger",children:["Couldn't fetch a quote: ",r.message]}),!t&&!r&&e&&o&&Br(yl,{children:[Br("div",{className:"rd-quote-strip",children:[Br("span",{className:"rd-quote-strip-side",children:[Br("b",{children:[n," ",o]}),Fn("small",{children:"You send"})]}),Fn("span",{className:"rd-quote-strip-arrow","aria-hidden":"true",children:"\u2192"}),Br("span",{className:"rd-quote-strip-side rd-quote-strip-end",children:[Br("b",{children:["~",my(e.expectedCrossd,i.decimals)," ",i.symbol]}),Fn("small",{children:"You receive"})]})]}),e.belowMin&&Fn("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)&&Br("p",{className:"rd-quote-strip-hint",children:[e.feeUsd&&Br(yl,{children:["Bridge fee: $",e.feeUsd,", already deducted from the amount above. You also pay your own network fee to send the deposit."," "]}),e.assumesParity&&Br(yl,{children:["Assumes 1:1 parity between bridged USDT and ",i.symbol,"; the final amount may differ slightly."]})]})]}),!t&&!r&&!e&&Fn("p",{className:"rd-muted",children:"Enter an amount to see a quote."})]})}import{useMemo as $u}from"react";var Xu={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 Ju(e,t){let r=Xu[e];if(!(!r||!t))return{url:`${r.base}/token/${t}`,name:r.name}}var gy={1:"Ethereum",56:"BNB Smart Chain",137:"Polygon",8453:"Base",42161:"Arbitrum",612055:"ONEchain",792703809:"Solana"};function zo(e){return gy[e]??`Chain ${e}`}function Pa(e,t){let r=Xu[e];if(!(!r||!t))return{url:`${r.base}/tx/${t}`,name:r.name}}import{jsx as zr,jsxs as Un}from"react/jsx-runtime";function hy(e){let t=new Map;for(let r of e.origins)t.has(r.chainId)||t.set(r.chainId,r.chainName);return Array.from(t,([r,n])=>({chainId:r,chainName:n}))}function ef(e,t){return t===void 0?[]:e.origins.filter(r=>r.chainId===t)}function by(e,t){let r=Ft(e,t),n=r.indexOf(".");return n===-1?r:`${r.slice(0,n)}.${r.slice(n+1,n+1+4)}`.replace(/\.?0+$/,"")||r.slice(0,n)}function tf({catalog:e,origin:t,onChangeOrigin:r,amount:n,onChangeAmount:o,showAmountInput:i=!0,balance:a,balanceLoading:s,insufficientBalance:l,onMax:d,disabled:p}){let h=$u(()=>hy(e),[e]),b=$u(()=>ef(e,t?.chainId),[e,t?.chainId]);function m(c){let y=Number(c),g=ef(e,y)[0];g&&r(g)}function w(c){let y=b.find(g=>g.token.address.toLowerCase()===c.toLowerCase());y&&r(y)}let f=a?`${by(a.value,a.decimals)} ${a.symbol}`:void 0,u=l?`Amount exceeds your balance${f?` (${f})`:""}`:void 0;return Un("section",{className:"rd-stack","data-rd-source-form":"",children:[Un("div",{className:"rd-field",children:[Un("div",{className:"rd-field-label-row",children:[zr("span",{className:"rd-field-label",children:"From"}),t&&(()=>{let c=Ju(t.chainId,t.token.address);return c?Un("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})()]}),Un("div",{className:"rd-field-row",children:[zr(fi,{ariaLabel:"Origin chain",value:t?String(t.chainId):"",onChange:m,disabled:p,options:h.map(c=>({value:String(c.chainId),label:c.chainName,subLabel:"Network",icon:zr(Aa,{chainId:c.chainId,chainName:c.chainName,size:22})}))}),zr(fi,{ariaLabel:"Token",value:t?.token.address??"",onChange:w,disabled:p||b.length===0,options:b.map(c=>({value:c.token.address,label:c.token.symbol,subLabel:`${c.token.decimals} decimals`,icon:zr(io,{symbol:c.token.symbol,logoUrl:c.token.logoUrl,size:22})}))})]})]}),i&&Un("label",{className:"rd-field",children:[zr("span",{className:"rd-field-label",children:"Amount (optional)"}),Un("div",{className:"rd-amount-input","data-rd-invalid":u?"":void 0,children:[zr("input",{type:"text",inputMode:"decimal",placeholder:"0.0",value:n,onChange:c=>{let y=c.target.value;if(y===""){o(y);return}y.startsWith(".")&&(y=`0${y}`),/^\d*\.?\d{0,4}$/.test(y)&&(y=y.replace(/^0+(?=\d)/,""),!((y.split(".")[0]??"").length>12)&&o(y))},disabled:p||!t,"data-vaul-no-drag":!0}),t&&zr("span",{className:"rd-amount-input-suffix",children:t.token.symbol}),d&&!p&&zr("button",{type:"button",className:"rd-amount-input-max",onClick:d,disabled:p||!t,children:"Max"})]}),(f||s)&&Un("span",{className:"rd-amount-meta",children:[zr("span",{}),zr("span",{children:s?"Balance: \u2026":f?`Balance: ${f}`:""})]}),u&&zr("span",{className:"rd-callout rd-callout-danger",children:u})]})]})}import{Fragment as xl,jsx as Ke,jsxs as ur}from"react/jsx-runtime";function rf({catalog:e,origin:t,onChangeOrigin:r,amount:n,onChangeAmount:o,showAmountInput:i,minNotice:a,amountHint:s,onMax:l,recipient:d,onChangeRecipient:p,showRecipientInput:h,recipientValid:b,balance:m,balanceLoading:w,insufficientBalance:f,targetOptions:u,selectedTarget:c,onChangeTarget:y,showTargetSelector:g,quote:v,quoteLoading:k,quoteError:R,depositAddress:I,depositAddressLoading:C,depositAddressError:S,arrivalStatus:A,amountSmallestUnits:D,depositState:U,onDeposit:M,canDeposit:G,oneClickEnabled:E,locked:O,onRequestConnect:ie}){let Y=u.length>1&&g,{phase:P,isSubmitting:pe,isConfirming:$,isConfirmed:Q,needsSwitch:B,reverted:J,error:V}=U,le=c?.symbol??e.destination.symbol;return ur(xl,{children:[a&&Ke(Gu,{minNotice:a,arrivalStatus:A}),O?ur(xl,{children:[ur("section",{className:"rd-locked-card","data-rd-locked":"",children:[Ke("span",{className:"rd-locked-glyph","aria-hidden":"true",children:ur("svg",{width:"26",height:"26",viewBox:"0 0 24 24",fill:"none",focusable:"false",children:[Ke("path",{d:"M6 10.5V8a6 6 0 1 1 12 0v2.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),Ke("rect",{x:"4",y:"10.5",width:"16",height:"10.5",rx:"2.5",fill:"currentColor"})]})}),Ke("span",{className:"rd-locked-text",children:"Connect to get your personal deposit address"}),h&&Ke("span",{className:"rd-card-hint",children:"Or enter a recipient address to get one without connecting."})]}),ie&&Ke("button",{type:"button",className:"rd-button-primary rd-button-block","data-track":"connect",onClick:ie,children:"Connect Wallet"})]}):I?Ke(qu,{depositAddress:I,originChainId:t.chainId,originChainName:t.chainName,originCurrency:t.token.address,amount:D,tokenSymbol:t.token.symbol,tokenDecimals:t.token.decimals,depositState:U,onDeposit:M,canDeposit:G,oneClickEnabled:E}):C?ur(xl,{children:[Ke(Da,{}),E&&D&&Ke("span",{className:"rd-skeleton rd-skeleton-cta","aria-hidden":"true"}),Ke("p",{className:"rd-sr-only",role:"status",children:"Preparing your deposit address..."})]}):S?ur("div",{className:"rd-callout rd-callout-danger",children:["Couldn't fetch a deposit address: ",S.message]}):null,Ke(tf,{catalog:e,origin:t,onChangeOrigin:r,amount:n,onChangeAmount:o,showAmountInput:i,balance:m,balanceLoading:w,insufficientBalance:f,onMax:l}),ur("div",{className:"rd-field","data-rd-delivery":"",children:[Ke("span",{className:"rd-field-label",children:"Deliver as"}),Y?Ke(fi,{ariaLabel:"Delivery token",value:c?.symbol??"",onChange:y,options:u.map(he=>({value:he.symbol,label:he.symbol,subLabel:"on ONEchain",icon:Ke(io,{symbol:he.symbol,size:22})}))}):ur("div",{className:"rd-static-target",children:[Ke(io,{symbol:le,size:22}),Ke("span",{children:le})]}),h&&ur("label",{className:"rd-delivery-recipient",children:[Ke("input",{type:"text",placeholder:"0x...","aria-label":"ONEchain recipient address",value:d,onChange:he=>p(he.target.value),"data-vaul-no-drag":!0}),Ke("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."}),!b&&Ke("span",{className:"rd-callout rd-callout-danger",children:"Not a valid address"})]})]}),c?.external&&ur("div",{className:"rd-callout rd-callout-muted",children:["Delivered as ",c.symbol," via an external adapter."]}),s&&Ke("div",{className:"rd-callout rd-callout-warning","data-rd-amount-hint":"",children:s}),n.trim()&&Ke(Zu,{quote:v,isLoading:k,error:R,humanAmount:n,originSymbol:t.token.symbol,destination:e.destination}),a&&Ke(_u,{minNotice:a,onlySend:{symbol:t.token.symbol,chainName:t.chainName},showWalletCreditNote:!h&&b}),E&&P!=="idle"&&!G&&ur("div",{className:"rd-card",children:[pe&&ur("p",{className:"rd-muted",children:[Ke("span",{className:"rd-spinner"})," ",B?"Switching network...":"Confirm in wallet..."]}),$&&ur("p",{className:"rd-muted",children:[Ke("span",{className:"rd-spinner"})," Confirming..."]}),U.txHash&&ur("p",{className:"rd-card-hint",children:["Tx: ",Ke("span",{style:{fontFamily:"monospace"},children:U.txHash})]}),Q&&J&&Ke("div",{className:"rd-callout rd-callout-danger",children:"The deposit transaction reverted on-chain. Please check your wallet and try again."}),Q&&!J&&Ke("div",{className:"rd-callout rd-callout-success",children:"Deposit confirmed on-chain. Waiting for it to be swept..."}),V&&Ke("div",{className:"rd-callout rd-callout-danger",children:V})]})]})}import{useEffect as wy,useId as yy,useRef as nf,useState as vl}from"react";import{createPortal as xy}from"react-dom";import{Fragment as Rl,jsx as Ue,jsxs as It}from"react/jsx-runtime";var mi=56;function af(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function vy(e){let t=e.trim().toUpperCase(),n={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(n)return n;let o=t.toLowerCase().replace(/_/g," ").trim();return o?`${o[0].toUpperCase()}${o.slice(1)}`:"Processing"}function ky(e){return e==="COMPLETED"?"rd-status-pill rd-status-pill-success":af(e)?"rd-status-pill rd-status-pill-failure":"rd-status-pill"}function Oa(e,t){if(e){if(t===void 0)return e;try{return Ft(BigInt(e),t)}catch{return e}}}function Ry(e,t=4){let r=e.indexOf(".");if(r<0)return e;let n=e.slice(0,r+1+t).replace(/0+$/,"").replace(/\.$/,"");return n===""?"0":n}function Sy(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function of(e){return e.length>14?`${e.slice(0,8)}...${e.slice(-4)}`:e}function kl({amount:e,symbol:t,className:r}){let n=e?`${e}${t?` ${t}`:""}`:"",o=yy(),i=nf(null),a=nf(null),[s,l]=vl(!1),[d,p]=vl({top:-9999,left:-9999,visibility:"hidden"});return wy(()=>{if(!s)return;let h=()=>{let b=i.current,m=a.current;if(!b||!m)return;let w=b.getBoundingClientRect(),f=m.getBoundingClientRect(),u=12,c=8,y=Math.max(u,window.innerWidth-f.width-u),g=Math.min(Math.max(w.left+w.width/2-f.width/2,u),y),v=w.top-f.height-c,k=v>=u?v:w.bottom+c,R=Math.max(u,window.innerHeight-f.height-u),I=Math.min(Math.max(k,u),R),C=window.getComputedStyle(b);p({top:I,left:g,visibility:"visible",backgroundColor:C.getPropertyValue("--rd-text").trim()||"#eef0f6",borderColor:C.getPropertyValue("--rd-border").trim()||"#2a2d3a",boxShadow:C.getPropertyValue("--rd-shadow").trim()||"0 8px 24px rgba(0, 0, 0, 0.35)",color:C.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?It(Rl,{children:[It("span",{ref:i,className:r,"aria-label":n,"aria-describedby":s?o:void 0,"data-full-value":n,onMouseEnter:()=>{p({top:-9999,left:-9999,visibility:"hidden"}),l(!0)},onMouseLeave:()=>l(!1),children:[Ry(e),t?` ${t}`:""]}),s&&typeof document<"u"&&xy(Ue("span",{ref:a,id:o,role:"tooltip","data-rd-history-floating-tooltip":"",style:d,children:n}),document.body)]}):Ue("span",{className:r,children:"-"})}function Cy(e){let t=(e.deposits??[]).filter(n=>n.originChainId),r=new Set(t.map(n=>`${n.originChainId}:${(n.originCurrency??"").toLowerCase()}`));if(t.length>0){let n=t[0];return{chainId:n.originChainId,currency:n.originCurrency??"",routes:r.size}}return{chainId:e.originChainId,currency:e.originCurrency,routes:1}}function Ny(e,t){if(!e)return;let r,n;try{r=BigInt(e),n=t.map(s=>BigInt(s.amount))}catch{return}let o=n.reduce((s,l)=>s+l,0n);if(o<=0n)return;let i=n.map(s=>r*s/o),a=i.reduce((s,l)=>s+l,0n);return i[i.length-1]+=r-a,i}function Ba({label:e,chainId:t,txHash:r,amount:n,shared:o,missingLabel:i="Pending"}){let a=r?Pa(t,r):void 0;return It("div",{className:"rd-history-step",children:[Ue("span",{className:`rd-history-step-dot${r?" rd-history-step-dot-done":""}`}),Ue("span",{className:"rd-history-step-label",children:e}),Ue("span",{className:"rd-history-step-chain",children:zo(t)}),n&&Ue(kl,{amount:n,className:"rd-history-step-amount"}),It("span",{className:"rd-history-step-tx",children:[a?Ue("a",{href:a.url,target:"_blank",rel:"noreferrer",title:r,"aria-label":`${e} transaction on ${zo(t)}`,children:of(r)}):r?Ue("span",{title:r,children:of(r)}):Ue("span",{className:"rd-muted",children:i}),o&&r&&Ue("span",{className:"rd-history-step-shared",title:"Shared by deposits processed together",children:"combined transfer"})]})]})}function Ty(e){let t=e.deposits??[],r=e.amountOut||e.expectedOut||void 0;if(t.length>=2){let a=Ny(r,t);if(a)return t.map((s,l)=>({key:`${e.orderId}:${s.txHash}:${s.blockNumber}`,order:e,chainId:s.originChainId??mi,currency:s.originCurrency??"",routes:1,sentRaw:s.amount,receivedRaw:a[l].toString(),receivedIsEstimate:!0,deposit:s,sharedLegs:!0}))}let{chainId:n,currency:o,routes:i}=Cy(e);return[{key:e.orderId,order:e,chainId:n,currency:o,routes:i,sentRaw:e.amountIn,receivedRaw:r,receivedIsEstimate:!e.amountOut&&!!e.expectedOut,sharedLegs:!1}]}function za({orders:e,isLoading:t,error:r,catalog:n,showTitle:o=!0}){let[i,a]=vl({}),s=l=>a(d=>({...d,[l]:!d[l]}));return It("section",{className:o?"rd-card":"rd-stack","data-rd-orders-list":"",children:[o&&Ue("div",{className:"rd-card-header",children:Ue("h2",{className:"rd-card-title",children:"Transfer history"})}),t&&e.length===0&&It("p",{className:"rd-muted",role:"status","aria-live":"polite",children:[Ue("span",{className:"rd-spinner"})," Loading orders..."]}),r&&It("div",{className:"rd-callout rd-callout-danger",children:["Couldn't load your orders: ",r.message]}),!t&&!r&&e.length===0&&Ue("p",{className:"rd-muted",children:"No transfers yet."}),e.length>0&&Ue("div",{className:"rd-history-table","data-vaul-no-drag":!0,children:e.flatMap(Ty).map(l=>{let{order:d}=l,p=n?.origins.find(S=>S.chainId===l.chainId&&S.token.address.toLowerCase()===l.currency.toLowerCase()),h=(d.target?n?.targets.find(S=>S.symbol.toLowerCase()===d.target.toLowerCase()):void 0)??n?.targets.find(S=>S.isDefault),b=h?.symbol??n?.destination.symbol??"",m=h?.decimals??n?.destination.decimals,w=n?.origins.find(S=>S.chainId===mi),f=Oa(l.sentRaw,w?.token.decimals),u=w?.token.symbol??"USDT",c=Oa(l.receivedRaw,m),y=d.deposits??[],g=!!i[l.key],v=Sy(d.completedAt??d.createdAt),k=vy(d.status),I=d.status==="COMPLETED"||af(d.status)?"Details unavailable":"Pending",C=l.receivedIsEstimate?"Estimated on ONEchain":"Received on ONEchain";return It("div",{className:"rd-history-group",children:[It("button",{type:"button",className:"rd-history-row-button",onClick:()=>s(l.key),"aria-expanded":g,"aria-label":`Toggle transfer details: ${k}, ${v}`,children:[It("span",{className:"rd-history-card-top",children:[Ue("span",{className:"rd-history-asset",children:l.routes>1?It(Rl,{children:["Multiple deposits ",It("span",{className:"rd-muted",children:["\xB7 ",l.routes," chains"]})]}):It(Rl,{children:[p?.token.symbol??b," ",It("span",{className:"rd-muted",children:["from ",zo(l.chainId)]})]})}),Ue("span",{className:ky(d.status),title:d.status,children:k})]}),It("span",{className:"rd-history-card-amounts",children:[It("span",{className:"rd-history-amount-block",children:[Ue("span",{className:"rd-history-amount-label",children:"Processing address"}),Ue(kl,{amount:f,symbol:u,className:"rd-history-num"})]}),Ue("span",{className:"rd-history-card-arrow","aria-hidden":"true",children:"\u2192"}),It("span",{className:"rd-history-amount-block",children:[Ue("span",{className:"rd-history-amount-label",children:C}),Ue(kl,{amount:c,symbol:b,className:`rd-history-num rd-history-received${l.receivedIsEstimate?" rd-history-received-estimate":""}`})]})]}),It("span",{className:"rd-history-card-foot",children:[It("span",{className:"rd-history-date",children:[d.completedAt?"Completed":"Started"," \xB7 ",v]}),Ue("span",{className:"rd-history-chevron","aria-hidden":"true",children:Ue(Cr,{size:16})})]})]}),g&&It("div",{className:"rd-history-detail",children:[l.deposit?Ue(Ba,{label:"Deposit confirmed",chainId:l.deposit.originChainId??mi,txHash:l.deposit.originTxHash||l.deposit.txHash,amount:Oa(l.deposit.amount,w?.token.decimals)}):y.length>0?y.map(S=>Ue(Ba,{label:"Deposit confirmed",chainId:S.originChainId??mi,txHash:S.originTxHash||S.txHash,amount:Oa(S.amount,w?.token.decimals)},`${S.txHash}-${S.blockNumber}`)):It("div",{className:"rd-history-step",children:[Ue("span",{className:"rd-history-step-dot"}),Ue("span",{className:"rd-history-step-label",children:"Deposit confirmed"}),Ue("span",{className:"rd-muted",children:"Details unavailable"})]}),Ue(Ba,{label:"Bridge",chainId:mi,txHash:d.bscBridgeTx,shared:l.sharedLegs,missingLabel:I}),Ue(Ba,{label:"ONEchain delivery",chainId:n?.destination.chainId??612055,txHash:d.deliveryTxHash,shared:l.sharedLegs,missingLabel:I})]})]},l.key)})})]})}import{useEffect as wf,useState as Tl}from"react";import{useCallback as hi,useEffect as Ey,useMemo as pf,useRef as uf,useState as gi}from"react";var en=class extends Error{constructor(t,r,n){super(r),this.name="RelayApiError",this.status=t,this.body=n}};function Ut(e){let t=e.baseUrl.replace(/\/+$/,"");async function r(n,o){let i={...o?.headers};o?.body!=null&&(i["Content-Type"]="application/json");let a;try{a=await fetch(`${t}${n}`,{...o,headers:i})}catch(l){throw new en(0,`network error calling ${n}: ${l.message}`)}let s=await a.text();if(!a.ok){let l=`request to ${n} failed with status ${a.status}`,d;try{d=JSON.parse(s);let p=d;p?.error&&(l=p.error)}catch{d=s||void 0}throw new en(a.status,l,d)}try{return JSON.parse(s)}catch{throw new en(a.status,`expected a JSON response from ${n} but got ${s?"a non-JSON body":"an empty body"}`,s||void 0)}}return{getConfig(){return r("/v1/config").then(n=>({...n,targets:n.targets??[]}))},getQuote(n){return r("/v1/quote",{method:"POST",body:JSON.stringify(n)})},getDepositAddress(n,o){let i=new URLSearchParams({user:n.user,originChainId:String(n.originChainId),originCurrency:n.originCurrency});return o&&i.set("target",o),r(`/v1/deposit-address?${i.toString()}`)},getOrder(n){return r(`/v1/orders/${encodeURIComponent(n)}`)},listOrders(n){let o=new URLSearchParams({user:n});return r(`/v1/orders?${o.toString()}`).then(i=>i.orders??[])},ordersStreamUrl(n){return`${t}/v1/orders/stream?user=${encodeURIComponent(n)}`},getRecovery(n){let o=new URLSearchParams({user:n.user});return n.target&&o.set("target",n.target),r(`/v1/recovery?${o.toString()}`)}}}var sf=[{type:"function",name:"deploy",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"version",type:"uint256"}],outputs:[{name:"",type:"address"}]}],Sl=[{type:"function",name:"execute",stateMutability:"nonpayable",inputs:[],outputs:[]},{type:"function",name:"sweepToUser",stateMutability:"nonpayable",inputs:[{name:"tokenAddr",type:"address"}],outputs:[]}],Cl=[{type:"function",name:"computeAddress",stateMutability:"view",inputs:[{name:"recipient",type:"address"},{name:"version",type:"uint256"}],outputs:[{name:"",type:"address"}]}];var Fo=["0x486BEEc35A9a9915213Ea02AD3709738335F7702","0x3438735303911aBe113AdF14b18eE730cC24893b","0xA3B548Ab23043e6B24A087515fe1306379683533","0x44317d07378390543d99Ee76374E86C1Ef6cF832"];function Fa(e,t){return!e||!t?!1:e.toLowerCase()===t.toLowerCase()}function Iy(e,t){return t.some(r=>Fa(r,e))}function Ua(e){if(!e||e.length===0)return Fo;let t=new Set,r=[];for(let n of e){if(typeof n!="string"||!dt(n))continue;let o=n.toLowerCase();t.has(o)||(t.add(o),r.push(n))}return r.length>0?r:Fo}async function lf(e,t,{factory:r,forwarder:n,recipient:o,version:i,trusted:a=Fo}){if(!r||!n||!o||i===void 0)return{ok:!1,reason:"address verification is missing inputs (factory/forwarder/recipient/version)"};if(!Iy(r,a))return{ok:!1,reason:`factory ${r} 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:r,abi:Cl,functionName:"computeAddress",args:[o,BigInt(i)]})}catch(l){return{ok:!1,reason:`could not verify the forwarder address on-chain: ${l instanceof Error?l.message:String(l)}`}}return Fa(s,n)?{ok:!0}:{ok:!1,reason:`forwarder address mismatch: the API returned ${n}, but factory ${r} derives ${s} for this account -- refusing to sign`}}async function df(e,t,{forwarder:r,recipient:n,version:o,trusted:i=Fo}){if(!r||!n||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 a=await Promise.all(i.map(async s=>{try{return await e({chainId:t,address:s,abi:Cl,functionName:"computeAddress",args:[n,BigInt(o)]})}catch{return}}));return a.some(s=>Fa(s,r))?{ok:!0}:a.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: ${r} is not the address any known factory derives for this account -- refusing to deposit`}}function cf(e,t){return Fa(e,t)}var jn=56,Nl={step:"idle"};function My(e){return e.tokens?.find(t=>t.recoverable)?.address??e.token}function bi(e={}){let t=uf(e);t.current=e;let r=e.wallet,n=r?.walletChainId,o=e.recipient,i=o&&dt(o)?o:void 0,[a,s]=gi({}),l=hi((b,m)=>{s(w=>({...w,[b.toLowerCase()]:m}))},[]),d=hi(b=>b?a[b.toLowerCase()]??Nl:Nl,[a]),p=pf(()=>Object.values(a).some(b=>b.step==="switching"||b.step==="deploying"||b.step==="recovering"),[a]);return{recover:hi(async(b,m,w)=>{if(!i||!b?.forwarder)return;let f=b.forwarder;l(f,{step:"switching"});try{if(n!==jn){if(!r?.switchChain)throw new Error("wallet cannot switch chains");await r.switchChain(jn)}if(!r?.writeContract||!r?.readContract||!r?.waitForReceipt)throw new Error("wallet is missing contract capabilities required for recovery");let u=await lf(r.readContract,jn,{factory:b.factory,forwarder:b.forwarder,recipient:i,version:b.version,trusted:t.current.trustedFactories});if(!u.ok)throw new Error(`address verification failed: ${u.reason}`);let c;if(!b.isDeployed){if(l(f,{step:"deploying"}),c=await r.writeContract({address:b.factory,abi:sf,functionName:"deploy",args:[i,BigInt(b.version)],chainId:jn}),l(f,{step:"deploying",deployTxHash:c}),(await r.waitForReceipt({chainId:jn,hash:c})).status==="reverted")throw new Error(`forwarder deploy reverted on-chain (tx ${c})`);t.current.onChanged?.()}l(f,{step:"recovering",deployTxHash:c});let y=m==="execute"?await r.writeContract({address:b.forwarder,abi:Sl,functionName:"execute",args:[],chainId:jn}):await r.writeContract({address:b.forwarder,abi:Sl,functionName:"sweepToUser",args:[w??My(b)],chainId:jn});if(l(f,{step:"recovering",deployTxHash:c,actionTxHash:y}),(await r.waitForReceipt({chainId:jn,hash:y})).status==="reverted")throw new Error(`recovery transaction reverted on-chain (tx ${y})`);l(f,{step:"done",deployTxHash:c,actionTxHash:y}),t.current.onRecoverySuccess?.({action:m,forwarder:b.forwarder,actionTxHash:y,...c?{deployTxHash:c}:{}}),t.current.onChanged?.()}catch(u){let c=u instanceof Error?u:new Error(String(u));s(y=>{let g=f.toLowerCase();return{...y,[g]:{...y[g]??Nl,step:"error",error:c.message}}}),t.current.onError?.(c)}},[i,n,r,l]),stateFor:d,busy:p}}function ff(e={}){let t=uf(e);t.current=e;let r=pf(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRecovery: either `client` or `apiBaseUrl` must be provided");return Ut({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.recipient,o=n&&dt(n)?n:void 0,[i,a]=gi(),[s,l]=gi(!1),[d,p]=gi(),[h,b]=gi(0),m=e.target,w=e.enabled??!0,f=e.refetchInterval;Ey(()=>{if(!o||!w){a(void 0),p(void 0),l(!1);return}let v=!1,k=!1,R=!0;async function I(){if(!(v||k)){k=!0,R&&l(!0);try{let S=await r.getRecovery({user:o,target:m});if(v)return;a(S),p(void 0)}catch(S){if(v)return;let A=S instanceof Error?S:new Error(String(S));p(A),t.current.onError?.(A),A instanceof en&&A.status===401&&t.current.onUnauthorized?.()}finally{k=!1,!v&&R&&l(!1),R=!1}}}I();let C=typeof f=="number"&&Number.isFinite(f)&&f>0?setInterval(()=>{I()},f):void 0;return()=>{v=!0,C&&clearInterval(C)}},[r,o,h,m,w,f]);let u=hi(()=>b(v=>v+1),[]),c=bi({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:u}),y=hi(async(v,k)=>{i&&await c.recover(i,v,k)},[c,i]),g=c.stateFor(i?.forwarder);return{info:i,loading:s,error:d,refresh:u,recover:y,recoveryState:g}}var Ay="BSC_FUNDED";function mf(e){if(!e)return 0n;try{let t=BigInt(e);return t>0n?t:0n}catch{return 0n}}function Ly(e,t){return e.target||t}function Uo(e,t=[]){let r=e.find(o=>o.isDefault)?.symbol,n=new Map;for(let o of e){if(!o.info?.forwarder)continue;let i=o.info.forwarder.toLowerCase(),a=n.get(i);if(a){a.targets.push(o.symbol);continue}n.set(i,{forwarder:o.info.forwarder,targets:[o.symbol],info:o.info,deposits:[],depositsTotal:0n})}for(let o of n.values()){let i=new Set(o.targets);for(let a of t){if(a.status!==Ay)continue;let s=Ly(a,r);if(!(!s||!i.has(s)))for(let l of a.deposits??[])o.deposits.push({amount:l.amount,originChainId:l.originChainId,originTxHash:l.originTxHash,txHash:l.txHash,blockNumber:l.blockNumber}),o.depositsTotal+=mf(l.amount)}o.deposits.sort((a,s)=>a.blockNumber-s.blockNumber)}return[...n.values()]}function gf(e){return e.filter(t=>(t.info.tokens??[]).some(r=>r.recoverable)?!0:mf(t.info.balance)>0n&&t.info.suggestedAction!=="none")}function ja(e){return e.reduce((t,r)=>t+(r.info.tokens??[]).filter(n=>n.recoverable).length,0)}import{Fragment as Ga,jsx as me,jsxs as ot}from"react/jsx-runtime";var Dy=56;function Py(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 Oy="This balance may already be processing. Recover only if it remains stuck.",Wa="USDT",hf="primary";function By(e){return`${e} more recoverable under other delivery tokens -- switch the delivery token above to recover ${e===1?"it":"them"}.`}function zy(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 yf({message:e}){let[t,r]=Tl("idle");wf(()=>{if(t==="idle")return;let i=window.setTimeout(()=>r("idle"),1500);return()=>window.clearTimeout(i)},[t]);async function n(){if(typeof navigator>"u"||!navigator.clipboard){r("failed");return}try{await navigator.clipboard.writeText(e),r("copied")}catch{r("failed")}}let o=t==="copied"?"Copied technical details":t==="failed"?"Copy failed":"Copy technical details";return ot("details",{className:"rd-error-details",children:[me("summary",{children:"View technical details"}),ot("div",{className:"rd-error-log",children:[me("button",{type:"button",className:"rd-error-copy",onClick:()=>{n()},"aria-label":o,"aria-live":"polite",title:o,children:t==="copied"?me("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:me("path",{d:"m5 12 4 4L19 6",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}):ot("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[me("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.8"}),me("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"})]})}),me("code",{children:e})]})]})}function wi(e){if(!e)return 0n;try{return BigInt(e)}catch{return 0n}}function kn(e,t){try{return Ft(e,t)}catch{return e.toString()}}function bf(e){return e.length>14?`${e.slice(0,8)}...${e.slice(-4)}`:e}function Fy(e){let t=wi(e.bridgeMinWei),r=[];for(let i of e.tokens??[]){let a=wi(i.balance);if(!(a<=0n)){if(i.suggestedAction==="execute"){r.push({key:i.address,symbol:i.symbol,decimals:i.decimals,balance:a,action:{kind:"execute"}});continue}if(i.recoverable){r.push({key:i.address,symbol:i.symbol,decimals:i.decimals,balance:a,action:{kind:"sweep",tokenAddress:i.address}});continue}r.push({key:i.address,symbol:i.symbol,decimals:i.decimals,balance:a,...t>a?{shortfall:t-a,minimum:t}:{}})}}let n=wi(e.balance),o=r.some(i=>i.action?.kind==="execute");return n>0n&&e.suggestedAction==="execute"&&!o?r.unshift({key:hf,symbol:Wa,decimals:e.decimals,balance:n,action:{kind:"execute"}}):r.length===0&&n>0n&&e.suggestedAction!=="none"&&r.push({key:hf,symbol:Wa,decimals:e.decimals,balance:n,action:{kind:"sweep"}}),r}function Uy({deposit:e,decimals:t}){let r=e.originChainId??Dy,n=e.originTxHash||e.txHash,o=n?Pa(r,n):void 0;return ot("div",{className:"rd-history-step","data-testid":"recovery-deposit-row",children:[me("span",{className:"rd-history-step-dot rd-history-step-dot-done"}),me("span",{className:"rd-history-step-chain",children:zo(r)}),me("span",{className:"rd-history-step-amount",children:kn(wi(e.amount),t)}),me("span",{className:"rd-history-step-tx",children:o?me("a",{href:o.url,target:"_blank",rel:"noreferrer",title:n,children:bf(n)}):n?me("span",{title:n,children:bf(n)}):null})]})}function jy({group:e,showTargetLabel:t,busy:r,state:n,onRecover:o,actingRowKey:i,rowKeyOf:a}){let{info:s}=e,l=Fy(s),d=wi(s.balance),p=l.length===1?`${kn(l[0].balance,l[0].decimals)}`:`${l.length} assets`,h=e.deposits.length>0&&e.depositsTotal>=d,b=d>e.depositsTotal?d-e.depositsTotal:0n,m=n.step==="switching"||n.step==="deploying"||n.step==="recovering",f=l.find(c=>a(c)===i)?.action?.kind;function u(){if(n.step==="switching")return"Switching to BNB Chain\u2026";if(n.step==="deploying")return"Confirm in wallet\u2026 (1/2 \u2014 preparing your deposit address)";let c=f==="execute"?"continuing ONEchain delivery":"returning funds";return n.deployTxHash?`Confirm in wallet\u2026 (2/2 \u2014 ${c})`:`Confirm in wallet\u2026 (${c})`}return ot("div",{className:"rd-recover-group","data-testid":"forwarder-section",children:[t&&ot("p",{className:"rd-recover-group-label",children:["Delivery target \xB7 ",me("b",{children:e.targets.join(", ")})]}),ot("div",{className:"rd-recover-sum",children:[me("span",{className:"rd-recover-sum-label",children:"Funds awaiting processing"}),ot("span",{className:"rd-recover-sum-value",title:l.length===1?`${p} ${l[0].symbol}`:p,children:[p,l.length===1&&ot(Ga,{children:[" ",me("span",{className:"rd-recover-sum-unit",children:l[0].symbol})]})]})]}),e.deposits.length>0&&ot("details",{className:"rd-recover-made-of",children:[ot("summary",{className:"rd-recover-made-of-label",children:["Deposit history \xB7 ",e.deposits.length," ",e.deposits.length===1?"transfer":"transfers"]}),ot("div",{className:"rd-recover-made-of-body",children:[e.deposits.map(c=>me(Uy,{deposit:c,decimals:s.decimals},`${c.txHash}-${c.blockNumber}`)),!h&&ot("p",{className:"rd-token-row-status","data-testid":"deposits-incomplete-note",children:["These transfers explain ",kn(e.depositsTotal,s.decimals)," of"," ",kn(d,s.decimals)," ",Wa,". The remaining"," ",kn(b,s.decimals)," ",Wa," is still included when you act."]})]})]}),me("div",{className:"rd-token-list",children:l.map(c=>{let y=a(c),g=m&&i===y;return ot("div",{className:"rd-token-row","data-token-symbol":c.symbol,children:[me(io,{symbol:c.symbol,size:26}),ot("div",{className:"rd-token-row-info",children:[l.length>1&&ot("span",{className:"rd-token-row-amount",children:[kn(c.balance,c.decimals)," ",me("span",{className:"rd-token-row-symbol",children:c.symbol})]}),g?me("span",{className:"rd-token-row-step",role:"status","aria-live":"polite",children:u()}):c.shortfall!==void 0&&c.minimum!==void 0?ot("span",{className:"rd-token-row-warn",children:["Needs ",ot("b",{children:[kn(c.shortfall,c.decimals)," ",c.symbol]})," more to reach the"," ",kn(c.minimum,c.decimals)," ",c.symbol," minimum. Add it through"," ",me("b",{children:"Deposit to CROSS"})," and both amounts will process together."]}):c.action?me("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"}):me("span",{className:"rd-token-row-status",children:"Waiting for processing"})]}),g?me("span",{className:"rd-spinner rd-token-row-spinner"}):c.action&&me("button",{type:"button",className:"rd-button-primary rd-token-row-action",onClick:()=>o(c),disabled:r,children:c.action.kind==="execute"?"Continue delivery":"Return to wallet"})]},c.key)})}),!s.isDeployed&&n.step==="idle"&&ot("div",{className:"rd-callout rd-callout-warning","data-testid":"two-tx-notice",children:["The first action from this address needs ",me("b",{children:"two wallet confirmations"}),": prepare the address, then move the funds. Later actions need one."]}),s.inFlight&&me("p",{className:"rd-muted rd-token-row-status",children:s.inFlightReason||Oy}),n.step==="done"&&me("div",{className:"rd-callout rd-callout-success",role:"status","aria-live":"polite",children:f==="execute"?"ONEchain delivery restarted.":"Funds returned to your connected BNB Chain wallet."}),n.step==="error"&&n.error&&ot(Ga,{children:[me("div",{className:"rd-callout rd-callout-danger",role:"alert",children:zy(n.error)}),me(yf,{message:n.error})]})]})}function _a(e){let{info:t,loading:r,error:n,refresh:o}=ff(Py(e)),i=r||e.targets!==void 0&&e.targetsLoading===!0,a=bi({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]=Tl(),d=e.targets!==void 0?[...e.targets]:t?[{symbol:e.target??"",isDefault:!0,info:t}]:[],p=gf(Uo(d,e.orders??[])),h=p.length>0,b=e.wallet?.walletAddress,m=e.wallet?.getBalance,[w,f]=Tl();return wf(()=>{if(!h||!m||!b){f(void 0);return}let u=!1;return m({chainId:56,address:b}).then(c=>{u||f({value:c.value,decimals:c.decimals})}).catch(()=>{u||f(void 0)}),()=>{u=!0}},[h,m,b]),ot("section",{className:e.showTitle??!0?"rd-card":"rd-stack","data-rd-recover-funds":"",children:[(e.showTitle??!0)&&me("div",{className:"rd-card-header",children:me("h2",{className:"rd-card-title",children:"Recover stuck funds"})}),typeof e.otherTargetsRecoverable=="number"&&e.otherTargetsRecoverable>0&&me("div",{className:"rd-callout rd-callout-muted","data-testid":"other-targets-recoverable-note",children:By(e.otherTargetsRecoverable)}),i&&ot("p",{className:"rd-muted",role:"status","aria-live":"polite",children:[me("span",{className:"rd-spinner"})," Checking for recoverable funds\u2026"]}),n&&ot(Ga,{children:[me("div",{className:"rd-callout rd-callout-danger",role:"alert",children:"Couldn't check recoverable funds. Please try again."}),me(yf,{message:n.message})]}),!i&&!n&&d.length>0&&!h&&ot("div",{className:"rd-recover-sum",children:[me("span",{className:"rd-recover-sum-label",children:"Deposit address status"}),me("span",{className:"rd-recover-sum-value rd-recover-sum-empty",children:"Nothing to recover"})]}),!i&&!n&&p.map(u=>me(jy,{group:u,showTargetLabel:p.length>1||u.targets.length>1,busy:a.busy,state:a.stateFor(u.forwarder),actingRowKey:s,rowKeyOf:c=>`${u.forwarder.toLowerCase()}:${c.key}`,onRecover:c=>{c.action&&(l(`${u.forwarder.toLowerCase()}:${c.key}`),a.recover(u.info,c.action.kind,c.action.tokenAddress))}},u.forwarder.toLowerCase())),!i&&!n&&h&&ot("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:",w&&ot(Ga,{children:[" ",ot("b",{children:[kn(w.value,w.decimals)," BNB"]})]}),!w&&" unavailable","."]}),!i&&!n&&h&&me("p",{className:"rd-recover-foot",children:"Delivery continues to ONEchain; returned funds go to your connected BNB Chain wallet."})]})}import*as ft from"react";import*as fr from"@radix-ui/react-dialog";import{Drawer as jo}from"vaul";de(`.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-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
|
+
`);import{jsx as Fr,jsxs as Ha}from"react/jsx-runtime";var xf=24;function Il(e){return e instanceof HTMLElement&&e.matches("input, textarea, select")}function Wy(e,t,r){let n=r?.offsetTop??t.top,o=r?r.offsetTop+r.height:t.bottom,i=Math.max(t.top,n)+xf,a=Math.min(t.bottom,o)-xf;return e.top<i?e.top-i:e.bottom>a?e.bottom-a:0}function Gy(){let e=ft.useRef(0),[t,r]=ft.useState({keyboardHeight:0,viewportHeight:0});return ft.useEffect(()=>{let n=window.visualViewport;if(!n)return;let o=()=>{e.current=Math.max(e.current,window.innerHeight,document.documentElement.clientHeight,n.height+n.offsetTop);let i=Math.max(0,e.current-n.height-n.offsetTop),a=n.height;r(s=>s.keyboardHeight===i&&s.viewportHeight===a?s:{keyboardHeight:i,viewportHeight:a})};return o(),n.addEventListener("resize",o),n.addEventListener("scroll",o),()=>{n.removeEventListener("resize",o),n.removeEventListener("scroll",o)}},[]),t}function _y(e){let t=`(max-width: ${e}px)`,[r,n]=ft.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(t).matches);return ft.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;let o=window.matchMedia(t);n(o.matches);let i=a=>n(a.matches);return o.addEventListener("change",i),()=>o.removeEventListener("change",i)},[t]),r}function Rn({theme:e="dark",mobileBreakpoint:t=768,drawerDirection:r="bottom",dialogWidth:n,drawerMaxWidth:o,drawerMinWidth:i,style:a,open:s,onOpenChange:l,children:d}){let p=_y(t),[h,b]=ft.useState(!1),m=s!==void 0,w=m?s:h,f=ft.useCallback(g=>{m||b(g),l?.(g)},[m,l]),u=ft.useMemo(()=>{let g={};return n&&(g["--rd-dialog-width"]=n),o&&(g["--rd-drawer-max-width"]=o),i&&(g["--rd-drawer-min-width"]=i),{...g,...a}},[n,o,i,a]),c=ft.useMemo(()=>({open:w,setOpen:f,isMobile:p,theme:e,drawerDirection:r,portalStyle:u}),[w,f,p,e,r,u]),y=Fr("div",{"data-theme":e,style:u,children:d});return p?Fr(Ea.Provider,{value:c,children:Fr(jo.Root,{direction:r,open:w,onOpenChange:f,noBodyStyles:!0,children:y},"drawer")}):Fr(Ea.Provider,{value:c,children:Fr(fr.Root,{open:w,onOpenChange:f,children:y})})}function Wo({asChild:e,children:t,dataAttributes:r}){let{isMobile:n}=Jr(),o=n?jo.Trigger:fr.Trigger;return Fr(o,{asChild:e,...r,children:t})}function Sn({className:e,ariaTitle:t,children:r}){let{open:n,isMobile:o,theme:i,drawerDirection:a,portalStyle:s}=Jr(),{keyboardHeight:l,viewportHeight:d}=Gy(),p=go(),h=ft.useRef(null),b=ft.useRef(null),m=ft.useRef(null),w=ft.useRef(null),f=ft.useRef(!1),u=ft.useRef(!1);ft.useEffect(()=>()=>{b.current&&clearTimeout(b.current),m.current&&clearTimeout(m.current)},[]),ft.useEffect(()=>{b.current&&clearTimeout(b.current),m.current&&clearTimeout(m.current);let v=document.activeElement;!n&&Il(v)&&h.current?.contains(v)&&v.blur(),w.current=null,f.current=!1,u.current=!1,h.current?.querySelectorAll("[data-rd-scroll-area]").forEach(k=>{k.scrollTo?.({top:0,behavior:"auto"})})},[n]),ft.useEffect(()=>{if(l>0){u.current=!0;return}if(!u.current||!f.current)return;let v=w.current;v&&(m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{let k=document.activeElement;if(Il(k)&&v.contains(k)){m.current=null;return}v.scrollTo?.({top:0,behavior:"smooth"}),w.current=null,f.current=!1,u.current=!1,m.current=null},80))},[l]);let c=o&&a==="bottom"&&l>0&&!p,y=c?{bottom:l,maxHeight:`min(85dvh, calc(${d}px - env(safe-area-inset-top, 0px)))`}:void 0,g=ft.useCallback(v=>{if(!o||a!=="bottom"||!Il(v.target))return;let k=v.target,R=k.closest("[data-rd-scroll-area]");R&&(w.current=R,f.current=!0,b.current&&clearTimeout(b.current),m.current&&clearTimeout(m.current),b.current=setTimeout(()=>{let I=Wy(k.getBoundingClientRect(),R.getBoundingClientRect(),window.visualViewport);Math.abs(I)>=1&&R.scrollBy?.({top:I,behavior:"auto"}),b.current=null},280))},[a,o]);return o?Ha(jo.Portal,{children:[Fr(jo.Overlay,{className:"rd-overlay"}),Ha(jo.Content,{ref:h,className:Ne("rd-drawer-content",e),"data-theme":i,"data-rd-shell":"drawer","data-rd-in-app":p?"true":"false","data-rd-keyboard-adjusted":c?"true":"false",style:{...s,...y},onFocusCapture:g,children:[Fr(jo.Title,{className:"rd-sr-only",children:t}),Fr("div",{className:"rd-drawer-handle"}),r]})]}):Ha(fr.Portal,{children:[Fr(fr.Overlay,{className:"rd-overlay"}),Ha(fr.Content,{className:Ne("rd-dialog-content",e),"data-theme":i,"data-rd-shell":"dialog",style:s,children:[Fr(fr.Title,{className:"rd-sr-only",children:t}),Fr(fr.Description,{className:"rd-sr-only",children:t}),r]})]})}import{Fragment as Vy,jsx as Xe,jsxs as tn}from"react/jsx-runtime";function Hy({id:e,activeView:t,canRecover:r,recoverableCount:n,onChange:o}){let i=r?["deposit","history","recover"]:["deposit","history"];return Xe("div",{className:"rd-deposit-tabs",role:"tablist","aria-label":"Deposit navigation","data-tab-count":i.length,"data-active-index":i.indexOf(t),children:i.map(a=>{let s=a==="deposit"?"Deposit":a==="history"?"History":"Recover";return tn("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:()=>o(a),onKeyDown:l=>{if(!["ArrowLeft","ArrowRight","Home","End"].includes(l.key))return;l.preventDefault();let d=i.indexOf(a),p=l.key==="Home"?0:l.key==="End"?i.length-1:(d+(l.key==="ArrowRight"?1:-1)+i.length)%i.length,h=i[p];o(h),document.getElementById(`${e}-${h}-tab`)?.focus()},children:[Xe("span",{children:s}),a==="recover"&&n>0&&Xe("span",{className:"rd-recovery-badge","data-testid":"recovery-badge",children:n})]},a)})})}function kf({className:e}){let t=ci();return Xe(ge,{feature:"relay",children:Xe(Sn,{ariaTitle:"Deposit",className:["rd-deposit-shell",e??t.className].filter(Boolean).join(" "),children:Xe(Qy,{})})})}function Qy(){let e=ci(),{theme:t}=Jr(),r=Wu(),n=vf.useId();if(!r)return null;let{activeView:o,setActiveView:i,recoveryOpen:a,resolvedApiBaseUrl:s,wallet:l,catalog:d,catalogLoading:p,catalogError:h,origin:b,setOrigin:m,amount:w,setAmount:f,recipient:u,setRecipient:c,recipientValid:y,balance:g,balanceLoading:v,insufficientBalance:k,depositAddress:R,depositAddressLoading:I,depositAddressError:C,arrivalStatus:S,quote:A,quoteLoading:D,quoteError:U,canDeposit:M,deposit:G,depositState:E,targetOptions:O,selectedTarget:ie,setSelectedTarget:Y,showAmountInput:P,minNotice:pe,showRecipientInput:$,showTargetSelector:Q,showOneClick:B,showConnectPrompt:J,showRecipientHint:V,canRecover:le,recoverableCount:he,recoveryTargetsLoading:ee,recoveryTargets:ce,recoveryOrders:We,historyOrdersLoading:we,historyOrdersError:Je,refreshRecovery:oe,trustedFactories:Me,amountHint:$e,amountSmallestUnits:Te,onMax:Ae}=r;return tn("div",{className:"rd-root rd-wizard","data-theme":t,"data-rd-scroll-area":!0,children:[Xe(Hy,{id:n,activeView:o,canRecover:le,recoverableCount:he,onChange:i}),le&&a&&Xe("div",{className:"rd-deposit-tab-panel",id:`${n}-recover-panel`,role:"tabpanel","aria-labelledby":`${n}-recover-tab`,children:Xe(_a,{client:e.client,apiBaseUrl:s,recipient:u,target:ie?.symbol,wallet:l,trustedFactories:Me,targets:(d?.targets.length??0)>0?ce:void 0,targetsLoading:ee,orders:We,onRecovered:oe,onRecoverySuccess:e.onRecoverySuccess,onError:e.onError,showTitle:!1})}),o==="history"&&Xe("div",{className:"rd-deposit-tab-panel",id:`${n}-history-panel`,role:"tabpanel","aria-labelledby":`${n}-history-tab`,children:y&&u.trim()?Xe(za,{orders:We,isLoading:p||we,error:h??Je,catalog:d,showTitle:!1}):Xe("p",{className:"rd-muted","data-testid":"rd-history-empty-state",children:"Connect a wallet or provide an address to see transfer history."})}),o==="deposit"&&tn("div",{className:"rd-deposit-tab-panel",id:`${n}-deposit-panel`,role:"tabpanel","aria-labelledby":`${n}-deposit-tab`,children:[p&&tn("div",{className:"rd-skeleton-form","data-testid":"rd-source-skeleton","aria-hidden":"true",children:[Xe(Da,{}),J&&e.onRequestConnect&&Xe("span",{className:"rd-skeleton rd-skeleton-cta"}),tn("section",{className:"rd-stack",children:[tn("div",{className:"rd-field",children:[Xe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"18%"}}),tn("div",{className:"rd-field-row",children:[Xe("span",{className:"rd-skeleton rd-skeleton-field"}),Xe("span",{className:"rd-skeleton rd-skeleton-field"})]})]}),P&&tn("div",{className:"rd-field",children:[Xe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"34%"}}),Xe("span",{className:"rd-skeleton rd-skeleton-field"})]})]}),tn("div",{className:"rd-field",children:[Xe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"24%"}}),Xe("span",{className:"rd-skeleton rd-skeleton-field"}),($||u.trim().length>0)&&tn(Vy,{children:[Xe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"58%",marginTop:"0.5rem"}}),Xe("span",{className:"rd-skeleton rd-skeleton-field"}),$&&Xe("span",{className:"rd-skeleton rd-skeleton-line",style:{width:"82%"}})]})]}),Xe("span",{className:"rd-skeleton rd-skeleton-notice"})]}),p&&Xe("p",{className:"rd-sr-only",role:"status",children:"Loading deposit options..."}),h&&tn("div",{className:"rd-callout rd-callout-danger",children:["Failed to load configuration: ",h.message]}),V&&Xe("div",{className:"rd-callout rd-callout-muted",children:$?"Connect a wallet or provide a recipient address to fetch your deposit address.":"Connect a wallet to fetch your deposit address."}),d&&b&&Xe(rf,{catalog:d,origin:b,onChangeOrigin:m,amount:w,onChangeAmount:f,showAmountInput:P,minNotice:pe,amountHint:$e,onMax:Ae,recipient:u,onChangeRecipient:c,showRecipientInput:$,recipientValid:y,balance:g,balanceLoading:v,insufficientBalance:k,targetOptions:O,selectedTarget:ie,onChangeTarget:Y,showTargetSelector:Q,quote:A,quoteLoading:D,quoteError:U,depositAddress:R,depositAddressLoading:I,depositAddressError:C,arrivalStatus:S,amountSmallestUnits:Te,depositState:E,onDeposit:()=>{G()},canDeposit:M&&B,oneClickEnabled:B,locked:J,onRequestConnect:e.onRequestConnect})]})]})}import{jsx as El}from"react/jsx-runtime";function Rf({asChild:e,children:t}){return El(ge,{feature:"relay",children:El(Wo,{asChild:e??t!=null,children:t??El("button",{type:"button","data-track":"open",children:"Deposit"})})})}import*as ye from"react";import{useCallback as yi,useEffect as Wn,useMemo as Ml,useRef as Al,useState as mt}from"react";import{useEffect as qy,useState as Yy}from"react";function Sf(e,t){let[r,n]=Yy(e);return qy(()=>{let o=setTimeout(()=>n(e),t);return()=>clearTimeout(o)},[e,t]),r}var Ky=500,Nf=56,Cf={chainId:Nf,token:"0x55d398326f99059fF775485246999027B3197955"},Tf=3e4,Zy=5e3;function Xy(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?Tf:Math.max(Zy,e*1e3)}var Jy=[{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}];function Ll(e,t){let r=e.trim();if(!r)return null;try{let n=Ma(r,t);return n>0n?n:null}catch{return null}}function If(e={}){let t=Al(e);t.current=e;let r=Ml(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useDepositAddress: either `client` or `apiBaseUrl` must be provided");return Ut({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.wallet,o=n?.walletAddress,i=!!o,a=n?.walletChainId,[s,l]=mt(),[d,p]=mt(!0),[h,b]=mt();Wn(()=>{let re=!1;return p(!0),r.getConfig().then(fe=>{re||(l(fe),b(void 0))}).catch(fe=>{re||b(fe instanceof Error?fe:new Error(String(fe)))}).finally(()=>{re||p(!1)}),()=>{re=!0}},[r]);let m=e.chains,w=Ml(()=>{if(!s)return[];if(!m||m.length===0)return s.origins;let re=new Set(m);return s.origins.filter(fe=>re.has(fe.chainId))},[s,m]),f=Ml(()=>s?{...s,origins:w}:void 0,[s,w]),[u,c]=mt();Wn(()=>{if(u||w.length===0)return;let re=t.current.defaultToken,fe=re?w.find(j=>j.chainId===re.chainId&&j.token.address.toLowerCase()===re.address.toLowerCase()):void 0;c(fe??w[0])},[w,u]);let[y,g]=mt(),v=yi(()=>{Pe(void 0),st(!1),Ie(!1),F(!1),qe(void 0)},[]),k=yi(re=>{c(re),g(void 0),v()},[v]),R=u?.kind==="svm",[I,C]=mt(""),S=e.amount!==void 0?e.amount:I,A=yi(re=>{C(re),g(void 0),v()},[v]),D=Sf(S,Ky),U=u?Ll(D,u.token.decimals):null,M=u?Ll(S,u.token.decimals):null,[G,E]=mt(""),[O,ie]=mt(!1),Y=e.recipient!==void 0?e.recipient:G,P=yi(re=>{E(re),ie(!0),g(void 0),v()},[v]);Wn(()=>{e.recipient===void 0&&o&&!O&&E(o)},[o,O,e.recipient]);let pe=Y.length===0||dt(Y),$=Y.length>0&&dt(Y)?Y:void 0,[Q,B]=mt(),[J,V]=mt(!1),[le,he]=mt(0),ee=n?.getBalance;Wn(()=>{if(!ee||!o||!u||R){B(void 0),V(!1);return}let re=!1;V(!0);let fe=u.token.address.toLowerCase()===pi?void 0:u.token.address;return ee({chainId:u.chainId,address:o,token:fe}).then(j=>{re||B({...j,formatted:Ft(j.value,j.decimals)})}).catch(()=>{re||B(void 0)}).finally(()=>{re||V(!1)}),()=>{re=!0}},[ee,o,u,R,le]);let ce=Q?.value??null,We=!R&&M!==null&&ce!==null&&M>ce,[we,Je]=mt(),[oe,Me]=mt(!1),[$e,Te]=mt(),Ae=u?.chainId,be=u?.token.address,ht=e.target;Wn(()=>{if(!$||!Ae||!be){Je(void 0),Te(void 0),Me(!1);return}let re=!1;return Je(void 0),Te(void 0),Me(!0),(ht?r.getDepositAddress({user:$,originChainId:Ae,originCurrency:be},ht):r.getDepositAddress({user:$,originChainId:Ae,originCurrency:be})).then(j=>{re||(Je(j),Te(void 0),t.current.onDepositAddress?.(j))}).catch(j=>{if(re)return;Je(void 0);let ve=j instanceof Error?j:new Error(String(j));Te(ve),t.current.onError?.(ve)}).finally(()=>{re||Me(!1)}),()=>{re=!0}},[r,$,Ae,be,ht]);let Et=[Ae??"",(be??"").toLowerCase(),($??"").toLowerCase(),ht??"",S.trim()].join("|"),vt=Al(Et);Wn(()=>{vt.current!==Et&&(vt.current=Et,g(void 0),v())},[Et,v]);let[Le,it]=mt(),[Mt,Qe]=mt(!1),[et,De]=mt(),bt=U?.toString();Wn(()=>{if(!Ae||!be||!bt){it(void 0),De(void 0),Qe(!1);return}let re=!1,fe,j=!0;async function ve(){j&&Qe(!0);let _=Tf;try{let Oe=await r.getQuote({originChainId:Ae,originCurrency:be,amount:bt});if(re)return;it(Oe),De(void 0),_=Xy(Oe.ttl)}catch(Oe){if(re)return;it(void 0),De(Oe instanceof Error?Oe:new Error(String(Oe)))}finally{re||Qe(!1),j=!1}re||(fe=setTimeout(ve,_))}return ve(),()=>{re=!0,fe&&clearTimeout(fe)}},[r,Ae,be,bt]);let[qt,kt]=mt(!1),[Ve,tt]=mt(!1),[ct,Pe]=mt(),[at,qe]=mt(),[rt,st]=mt(!1),[z,Ie]=mt(!1),[Ze,F]=mt(!1),ne=n?.waitForReceipt,ue=Al(void 0);Wn(()=>{if(!ct||!u||!ne)return;let re=!1;return st(!0),Ie(!1),F(!1),ne({chainId:u.chainId,hash:ct}).then(fe=>{re||(Ie(!0),F(fe.status==="reverted"),he(j=>j+1),fe.status!=="reverted"&&ct!==ue.current&&(ue.current=ct,t.current.onDeposited?.(ct)))}).catch(fe=>{re||qe(fe instanceof Error?fe.message:String(fe))}).finally(()=>{re||st(!1)}),()=>{re=!0}},[ct,ne]);let Ce=a!==void 0&&u!==void 0&&a!==u.chainId,wt=qt||Ve,Yt=y??at,tr="idle";Yt?tr="error":z?tr="confirmed":rt?tr="confirming":wt&&(tr=qt?"switching":"pending");let Gr={phase:tr,isSubmitting:wt,isConfirming:rt,isConfirmed:z,needsSwitch:Ce,txHash:ct,reverted:z&&Ze,error:Yt},un=!!(u&&we&&we.originChainId===u.chainId&&we.originCurrency.toLowerCase()===u.token.address.toLowerCase()),vr=!!(n?.sendTransaction&&n?.writeContract&&n?.readContract&&n?.waitForReceipt),fn=!!(i&&vr&&u&&!R&&we&&un&&M&&M>0n&&!We&&!wt&&!rt),_r=yi(async()=>{if(R||!u||!we||!n?.sendTransaction||!n?.writeContract)return;g(void 0);let re=Ll(S,u.token.decimals);if(!re||re<=0n){g("enter an amount to use the one-click deposit");return}let fe=u.token.address.toLowerCase()===pi,j=we.depositAddress,ve=await df(n?.readContract,Nf,{forwarder:we.forwarder,recipient:$,version:we.version,trusted:t.current.trustedFactories});if(!ve.ok){g(`address verification failed: ${ve.reason}`);return}if(u.chainId===Cf.chainId&&u.token.address.toLowerCase()===Cf.token.toLowerCase()&&!cf(j,we.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(Ce){if(!n?.switchChain)throw new Error("wallet cannot switch chains");kt(!0);try{await n.switchChain(u.chainId)}finally{kt(!1)}}v(),tt(!0);try{let Oe=fe?await n.sendTransaction({chainId:u.chainId,to:j,value:re}):await n.writeContract({chainId:u.chainId,address:u.token.address,abi:Jy,functionName:"transfer",args:[j,re]});Pe(Oe)}finally{tt(!1)}}catch(Oe){g(Oe.message)}},[R,u,we,S,Ce,n,$,v]);return{address:o,isConnected:i,catalog:f,catalogLoading:d,catalogError:h,origin:u,setOrigin:k,recipient:Y,setRecipient:P,recipientValid:pe,amount:S,setAmount:A,balance:Q,balanceLoading:J,insufficientBalance:We,isSvmOrigin:R,depositAddress:we?.depositAddress,depositAddressResult:we,depositAddressLoading:oe,depositAddressError:$e,quote:Le,quoteLoading:Mt,quoteError:et,canDeposit:fn,deposit:_r,depositState:Gr}}import{useEffect as $y,useRef as ex,useState as Go}from"react";var tx=3e4,rx=300;function Gn(e){let t=ex(e);t.current=e;let{client:r,enabled:n=!0,live:o=!0}=e,i=e.refetchInterval??e.fallbackPollMs??tx,a=e.recipient&&dt(e.recipient)?e.recipient:void 0,[s,l]=Go([]),[d,p]=Go(!1),[h,b]=Go(),[m,w]=Go(!1),[f,u]=Go(),[c,y]=Go(0);return $y(()=>{if(!a){l([]),b(void 0),p(!1),w(!1),u(void 0),y(0);return}if(!n){l([]),b(void 0),p(!1),w(!1),u(void 0),y(0);return}let g=!1,v=!0,k,R=0,I=0;async function C(){let U=++R;I+=1,v&&p(!0);try{let M=await r.listOrders(a);if(g)return;U===R&&(l(M),b(void 0))}catch(M){if(g)return;let G=M instanceof Error?M:new Error(String(M));U===R&&(b(G),t.current.onError?.(G))}finally{I-=1,!g&&U===R&&(p(!1),w(!0),u(a),y(M=>M+1)),v=!1}}function S(){k&&clearTimeout(k),k=setTimeout(()=>{k=void 0,g||C()},rx)}C();let A;o&&typeof EventSource<"u"&&(A=new EventSource(r.ordersStreamUrl(a)),A.addEventListener("orders-changed",S),A.onopen=()=>{S()});let D=o&&Number.isFinite(i)&&i>0?setInterval(()=>{I===0&&C()},i):void 0;return()=>{g=!0,k&&clearTimeout(k),D&&clearInterval(D),A?.close()}},[r,a,n,o,i]),{orders:s,ordersLoading:d,ordersError:h,ordersInitialized:m,ordersForRecipient:f,ordersRevision:c}}import{useMemo as nx,useState as ox}from"react";function Ef(e,t){if(t){let r=e.find(n=>n.symbol===t);if(r)return r}return e.find(r=>r.isDefault)??e[0]}function Mf({catalogTargets:e,filter:t,defaultTarget:r}){let n=nx(()=>{if(!t||t.length===0)return e;let l=new Set(t);return e.filter(d=>l.has(d.symbol))},[e,t]),[o,i]=ox(()=>Ef(n,r)?.symbol),a=(o!==void 0?n.find(l=>l.symbol===o):void 0)??Ef(n,r);function s(l){n.some(d=>d.symbol===l)&&i(l)}return{options:n,selected:a,setSelected:s}}var ix={dev:"https://dev-relay-protocol-api.onechain.nexus",stage:"https://dev-relay-protocol-api.onechain.nexus",production:"https://relay-protocol-api.onechain.nexus"};function _n(e){return e.apiBaseUrl?e.apiBaseUrl:ix[nt(e.environment)]}import{jsx as cx,jsxs as px}from"react/jsx-runtime";var Af=1e3;function ax(e,t,r,n,o){let i=e.requireWalletConnection??e.showRecipientInput===!1,a=r.walletAddress&&dt(r.walletAddress)?r.walletAddress:void 0;return{client:e.client,apiBaseUrl:n,wallet:r,chains:e.chains,recipient:i?a??"":e.recipient,amount:i&&!a?"":e.amount,defaultToken:e.defaultToken,target:t,trustedFactories:o,onDepositAddress:e.onDepositAddress,onDeposited:e.onDeposited,onError:e.onError}}function Qa(e,t){let r=e.trim();if(!r)return 0n;try{let n=Ma(r,t);return n>0n?n:0n}catch{return 0n}}function sx(e,t,r,n){if(t!==void 0&&e.forwarderVersion!==t)return!1;let o=e.target?.trim();return o?!!(r&&o.toLowerCase()===r.toLowerCase()):n}function Lf(e,t,r){return`${e}:${t.toLowerCase()}:${r}`}function lx(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function Df({open:e,children:t}){let[r]=ye.useState(ju);return px(gl.Provider,{value:r,children:[e&&cx(dx,{store:r}),t]})}function dx({store:e}){let t=ci(),{showTargetSelector:r=!0}=t,n=t.requireWalletConnection??t.showRecipientInput===!1,o=!!(t.walletAddress&&dt(t.walletAddress)),[i,a]=ye.useState("deposit"),s=i==="recover",l=ye.useCallback(W=>{a(ut=>(typeof W=="function"?W(ut==="recover"):W)?"recover":"deposit")},[]);ye.useEffect(()=>{_e("relay","opened")},[]);let[d,p]=ye.useState(void 0),h=ye.useMemo(()=>_n({apiBaseUrl:t.apiBaseUrl,environment:t.environment}),[t.apiBaseUrl,t.environment]),b=ye.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]),m=nt(t.environment),w=sr("apps.json",m,W=>({min:Vr(W?.relay?.minDepositAmount,m),max:Vr(W?.relay?.maxDepositAmount,m),trustedFactories:Mi(W,m)})),f=ye.useMemo(()=>t.trustedFactories??Ua(w?.trustedFactories),[t.trustedFactories,w?.trustedFactories]),{isConnected:u,catalog:c,catalogLoading:y,catalogError:g,origin:v,setOrigin:k,amount:R,setAmount:I,recipient:C,setRecipient:S,recipientValid:A,balance:D,balanceLoading:U,insufficientBalance:M,depositAddress:G,depositAddressResult:E,depositAddressLoading:O,depositAddressError:ie,quote:Y,quoteLoading:P,quoteError:pe,canDeposit:$,deposit:Q,depositState:B}=If(ax(t,d,b,h,f)),{options:J,selected:V,setSelected:le}=Mf({catalogTargets:c?.targets??[],filter:t.targetTokens,defaultTarget:t.defaultTarget});ye.useEffect(()=>{p(V?.symbol)},[V?.symbol]);let he=t.amount===void 0&&!t.hideAmount,ee=!n&&(t.showRecipientInput??!0)&&t.recipient===void 0,ce=A&&C.trim().length>0&&dt(C),We=!n&&t.recipient!==void 0&&t.recipient.trim().length>0,we=n?!o||!ce:!u&&!We&&!ce,Je=!!c&&!ce&&!we,oe=(t.showRecovery??!1)&&o&&!!(b.writeContract&&b.readContract&&b.waitForReceipt);ye.useEffect(()=>{i==="recover"&&!oe&&a("deposit")},[i,oe]);let Me=ye.useMemo(()=>t.client?t.client:Ut({baseUrl:h}),[t.client,h]),[$e,Te]=ye.useState({}),[Ae,be]=ye.useState(!1),[ht,Et]=ye.useState(0),vt=ye.useCallback(()=>Et(W=>W+1),[]),Le=B.isConfirmed,it=ce&&(!!E||i!=="deposit"),{orders:Mt,ordersLoading:Qe,ordersError:et,ordersInitialized:De,ordersForRecipient:bt}=Gn({client:Me,recipient:it?C:void 0,enabled:it,refetchInterval:Af}),qt=Mt,kt=V??c?.targets.find(W=>W.isDefault),Ve=kt?.symbol??c?.destination.symbol,tt=kt?.isDefault??!0,ct=E?.version,Pe=ye.useMemo(()=>Mt.filter(W=>sx(W,ct,Ve,tt)),[Mt,ct,Ve,tt]),at=ye.useRef(void 0),[qe,rt]=ye.useState(),[st,z]=ye.useState(),Ie=`${C.toLowerCase()}:${Ve?.toLowerCase()??""}:${ct??""}`;ye.useEffect(()=>{let W=bt?.toLowerCase()===C.toLowerCase();if(!it||!De||!W||et){it||(at.current=void 0,rt(void 0),z(void 0));return}let ut=new Set(Pe.map(Ge=>Ge.orderId)),Bt=new Set(Pe.flatMap(Ge=>(Ge.deposits??[]).map(Rr=>Lf(Ge.orderId,Rr.txHash,Rr.blockNumber)))),Rt=at.current;if(!Rt||Rt.key!==Ie){at.current={key:Ie,orderIds:ut,depositKeys:Bt,statuses:new Map(Pe.map(Ge=>[Ge.orderId,Ge.status]))},rt(void 0),z(void 0);return}let Hr,Wt=0n,Kt=!1;for(let Ge of Pe)for(let Rr of Ge.deposits??[]){let nn=Lf(Ge.orderId,Rr.txHash,Rr.blockNumber);if(!Rt.depositKeys.has(nn)){Hr??(Hr=Ge);try{Wt+=BigInt(Rr.amount),Kt=!0}catch{}}}Hr??(Hr=Pe.find(Ge=>!Rt.orderIds.has(Ge.orderId))),Hr??(Hr=Pe.find(Ge=>Rt.statuses.get(Ge.orderId)!==Ge.status));for(let Ge of ut)Rt.orderIds.add(Ge);for(let Ge of Bt)Rt.depositKeys.add(Ge);for(let Ge of Pe)Rt.statuses.set(Ge.orderId,Ge.status);Hr&&(rt(Hr.orderId),Kt&&z(Wt))},[Ie,Pe,bt,it,C,et,De]),ye.useEffect(()=>{let W=c?.targets??[];if(!oe||!ce||W.length===0){Te({}),be(!1);return}let ut=!1;return be(!0),Promise.all(W.map(Bt=>Me.getRecovery({user:C,target:Bt.symbol}).catch(()=>{}))).then(Bt=>{if(ut)return;let Rt={};W.forEach((Hr,Wt)=>{let Kt=Bt[Wt];Kt&&(Rt[Hr.symbol]=Kt)}),Te(Rt),be(!1)}),()=>{ut=!0}},[Me,oe,ce,C,c,Le,ht]);let Ze=ye.useMemo(()=>(c?.targets??[]).map(W=>({symbol:W.symbol,isDefault:W.isDefault,info:$e[W.symbol]})).filter(W=>W.info!==void 0),[c,$e]),F=ye.useMemo(()=>ja(Uo(Ze)),[Ze]),[ne,ue]=ye.useState(void 0),[Ce,wt]=ye.useState(),Yt=!!c&&(c?.targets.length??0)>0&&!d;ye.useEffect(()=>{if(!ce||!v||!E||Yt){ue(void 0),wt(void 0);return}let W=!1,ut=!1,Bt=E.forwarder.toLowerCase();ue(void 0),wt(void 0);async function Rt(){if(!(W||ut)){ut=!0;try{let Wt=await Me.getRecovery({user:C,target:d||void 0});if(W)return;if(Wt?.forwarder&&Wt.forwarder.toLowerCase()!==Bt){ue(void 0),wt(void 0);return}if(wt(Wt),!Wt||Wt.suggestedAction!=="sweep"){ue(void 0);return}let Kt;try{Kt=BigInt(Wt.balance)}catch{ue(void 0);return}let Ge=Number(Wt.decimals);if(Kt<=0n||!Number.isInteger(Ge)||Ge<0){ue(void 0);return}let Rr=Wt.tokens?.find(nn=>nn.address?.toLowerCase()===Wt.token?.toLowerCase()&&nn.symbol)?.symbol;ue({balance:Kt,decimals:Ge,symbol:Rr})}catch{}finally{ut=!1}}}Rt();let Hr=setInterval(()=>{Rt()},Af);return()=>{W=!0,clearInterval(Hr)}},[Me,ce,C,d,Yt,v,E,Le]);let tr=ye.useCallback(()=>{!v||!D||I(Ft(D.value,v.token.decimals))},[v,D,I]),Gr=ye.useRef(!1),un=!!G;ye.useEffect(()=>{!un||Gr.current||(Gr.current=!0,_e("relay","deposit_address_shown"))},[un]);let vr=B.txHash;ye.useEffect(()=>{vr&&_e("relay","deposit_submitted")},[vr]);let fn=(()=>{let W=Number(w?.min);return Number.isFinite(W)&&W>=0?String(w?.min):"6"})(),_r=(()=>{let W=Number(w?.max);return Number.isFinite(W)&&W>0?String(w?.max):void 0})(),re=(()=>{if(!v)return 0n;let W=Qa(fn,v.token.decimals),ut=BigInt(v.minAmount);return W>ut?W:ut})(),fe=v?Ft(re,v.token.decimals):fn,j=(()=>{if(!v||!ne||re<=0n)return;let W=v.token.decimals,ut=ne.decimals,Bt=W>=ut?ne.balance*10n**BigInt(W-ut):ne.balance/10n**BigInt(ut-W);if(Bt>=re)return;let Rt=re-Bt;return{pending:Ft(ne.balance,ut),pendingSymbol:ne.symbol,remaining:Ft(Rt,W)}})(),ve=c?.origins.find(W=>W.chainId===56&&!!(Ce?.token&&W.token.address.toLowerCase()===Ce.token.toLowerCase()))??c?.origins.find(W=>W.chainId===56&&W.token.symbol.toUpperCase()==="USDT"),_=Number.isInteger(Ce?.decimals)&&(Ce?.decimals??-1)>=0?Ce.decimals:ve?.token.decimals,Oe=Ce?.tokens?.find(W=>W.address?.toLowerCase()===Ce.token?.toLowerCase()&&W.symbol)?.symbol??ve?.token.symbol,rn=st!==void 0&&_!==void 0?Ft(st,_):void 0,Qn=(()=>{if(!v||_===void 0)return;let W=v.token.decimals;if(_>=W)return re*10n**BigInt(_-W);let ut=10n**BigInt(W-_);return(re+ut-1n)/ut})(),kr=qe?Pe.find(W=>W.orderId===qe):void 0,yt=kr??Pe.find(W=>W.status==="BSC_FUNDED"||W.status==="BRIDGE_INITIATED"||W.status==="BRIDGE_PENDING"),ds=(()=>{if(!yt||Qn===void 0)return!1;try{return BigInt(yt.amountIn)>=Qn}catch{return!1}})(),Ho=(()=>{if(!Ce||Qn===void 0)return!1;try{return BigInt(Ce.balance)>0n&&BigInt(Ce.balance)>=Qn}catch{return!1}})(),po=(()=>{let W={amount:rn,symbol:Oe,backendStatus:yt?.status};return!E||!it||!De?{phase:"connecting",...W}:bt?.toLowerCase()!==C.toLowerCase()||et?{phase:"unavailable",...W}:kr?.status==="COMPLETED"?{phase:"completed",...W,backendStatus:kr.status}:kr&&lx(kr.status)?{phase:"failed",...W,backendStatus:kr.status}:yt?.status==="BRIDGE_INITIATED"||yt?.status==="BRIDGE_PENDING"?{phase:"processing",...W}:yt?.status==="BSC_FUNDED"&&ds||Ho?{phase:"funded",...W}:kr?{phase:"detected",...W,backendStatus:kr.status}:{phase:"waiting",...W}})(),Vn=v&&_r?Qa(_r,v.token.decimals):void 0,uo=v&&R.trim()?Qa(R,v.token.decimals):0n,cs=!!(v&&uo>0n&&uo<re),ps=!!(v&&Vn!==void 0&&uo>0n&&uo>Vn),fo=(()=>{if(v){if(cs)return`Amount is below the ${fe} ${v.token.symbol} minimum.`;if(ps)return`Amount is above the ${_r} ${v.token.symbol} maximum.`}})(),Ti=t.showOneClickDeposit??!1,us=v&&R.trim()?Qa(R,v.token.decimals).toString():void 0,fs={activeView:i,setActiveView:a,recoveryOpen:s,setRecoveryOpen:l,resolvedApiBaseUrl:h,wallet:b,catalog:c,catalogLoading:y,catalogError:g,origin:v,setOrigin:k,amount:R,setAmount:I,recipient:C,setRecipient:S,recipientValid:A,balance:D,balanceLoading:U,insufficientBalance:M,depositAddress:G,depositAddressLoading:O,depositAddressError:ie,arrivalStatus:po,quote:Y,quoteLoading:P,quoteError:pe,canDeposit:$,deposit:Q,depositState:B,targetOptions:J,selectedTarget:V,setSelectedTarget:le,showAmountInput:he,minNotice:v?{min:fe,symbol:v.token.symbol,...j}:void 0,showRecipientInput:ee,showTargetSelector:r,showOneClick:Ti,showConnectPrompt:we,showRecipientHint:Je,canRecover:oe,recoverableCount:F,recoveryTargetsLoading:Ae,recoveryTargets:Ze,recoveryOrders:qt,historyOrdersLoading:Qe,historyOrdersError:et,refreshRecovery:vt,trustedFactories:f,amountHint:fo,amountSmallestUnits:us,onMax:he&&D&&D.value>0n?tr:void 0};return ye.useLayoutEffect(()=>{e.publish(fs)}),ye.useLayoutEffect(()=>()=>e.publish(null),[e]),null}import{jsx as Dl}from"react/jsx-runtime";function ux(e){let{theme:t="dark",mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:i,drawerMinWidth:a,style:s,open:l,onOpenChange:d,children:p}=e,[h,b]=Va.useState(!1),m=l!==void 0,w=m?l:h,f=Va.useCallback(u=>{m||b(u),d?.(u)},[m,d]);return Dl(ml.Provider,{value:e,children:Dl(Df,{open:w,children:Dl(Rn,{theme:t,mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:i,drawerMinWidth:a,style:s,open:w,onOpenChange:f,children:p})})})}var xi=Object.assign(ux,{Trigger:Rf,Content:kf});import{createContext as fx,useContext as mx}from"react";var Pl=fx(null);function Ol(){let e=mx(Pl);if(!e)throw new Error("RelayHistory compound components must be used within <RelayHistory>");return e}import*as yr from"react";import{jsx as ao}from"react/jsx-runtime";function Pf({className:e}){let t=Ol(),{open:r}=Jr();return yr.useEffect(()=>{r&&_e("relay","history_opened")},[r]),ao(ge,{feature:"relay",children:ao(Sn,{ariaTitle:"Transfer history",className:e??t.className,children:ao(gx,{})})})}function gx(){let e=Ol(),{theme:t}=Jr(),r=yr.useMemo(()=>{if(e.client)return e.client;let u=_n({apiBaseUrl:e.apiBaseUrl,environment:e.environment});return Ut({baseUrl:u})},[e.client,e.apiBaseUrl,e.environment]),n=e.recipient??e.walletAddress,o=!!(n&&dt(n)),[i,a]=yr.useState(),[s,l]=yr.useState(!1),[d,p]=yr.useState(),h=yr.useRef(e.onError);h.current=e.onError,yr.useEffect(()=>{if(!o){a(void 0),l(!1),p(void 0);return}let u=!1;return a(void 0),l(!0),p(void 0),r.getConfig().then(c=>{u||a(c)}).catch(c=>{if(u)return;let y=c instanceof Error?c:new Error(String(c));p(y),h.current?.(y)}).finally(()=>{u||l(!1)}),()=>{u=!0}},[r,o]);let{orders:b,ordersLoading:m,ordersError:w}=Gn({client:r,recipient:o?n:void 0,enabled:!!i,onError:e.onError}),f=yr.useCallback(u=>{if(!e.onOutlink)return;let y=u.target.closest?.('a[target="_blank"]');y?.href&&e.onOutlink(y.href)},[e.onOutlink]);return ao("div",{className:"rd-root rd-wizard","data-theme":t,children:o?ao("div",{onClick:f,children:ao(za,{orders:b,isLoading:s||m,error:d??w,catalog:i,showTitle:!1})}):ao("p",{className:"rd-muted","data-testid":"rd-history-empty-state",children:"Connect a wallet or provide an address to see transfer history."})})}import{jsx as Bl}from"react/jsx-runtime";function Of({asChild:e,children:t}){return Bl(ge,{feature:"relay",children:Bl(Wo,{asChild:e??t!=null,children:t??Bl("button",{type:"button","data-track":"open",children:"History"})})})}import{jsx as Bf}from"react/jsx-runtime";function hx(e){let{theme:t="dark",mobileBreakpoint:r,drawerDirection:n,dialogWidth:o="min(640px, calc(100vw - 32px))",drawerMaxWidth:i,drawerMinWidth:a,style:s,open:l,onOpenChange:d,children:p}=e;return Bf(Pl.Provider,{value:e,children:Bf(Rn,{theme:t,mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:i,drawerMinWidth:a,style:s,open:l,onOpenChange:d,children:p})})}var zf=Object.assign(hx,{Trigger:Of,Content:Pf});import*as Ur from"react";import*as xr from"react";var qa=[],bx=3e4;function Ff({client:e,recipient:t}){let[r,n]=xr.useState({targets:qa}),[o,i]=xr.useState(0),a=xr.useRef(void 0),s=xr.useRef(void 0),l=t&&dt(t)?t.toLowerCase():void 0;xr.useEffect(()=>{if(!l){n({targets:qa});return}let f=!1,u=a.current;if(!u||u.client!==e||u.recipientKey!==l||u.generation!==o){let c=(async()=>{let y,g=[];try{g=(await e.getConfig()).targets}catch(C){y=C instanceof Error?C:new Error(String(C))}let v=g.length===0?[()=>e.getRecovery({user:l})]:g.map(C=>()=>e.getRecovery({user:l,target:C.symbol})),k=await Promise.all(v.map(async C=>{try{return{info:await C()}}catch(S){return{error:S instanceof Error?S:new Error(String(S))}}})),R=g.length===0?k[0]?.info?[{symbol:"",isDefault:!0,info:k[0].info}]:[]:g.flatMap((C,S)=>k[S]?.info?[{symbol:C.symbol,isDefault:C.isDefault,info:k[S].info}]:[]),I=k.find(C=>C.error)?.error;return{targets:R,badgeFailed:!!(y||I&&R.length===0),error:y??I}})().catch(y=>({targets:qa,badgeFailed:!0,error:y instanceof Error?y:new Error(String(y))}));u={client:e,recipientKey:l,generation:o,promise:c},a.current=u,c.finally(()=>{s.current={client:e,recipientKey:l,at:Date.now()},a.current?.promise===c&&(a.current=void 0)})}return u.promise.then(c=>{f||n({recipientKey:l,targets:c.targets,badgeFailed:c.badgeFailed,error:c.error})}),()=>{f=!0}},[e,l,o]);let d=xr.useCallback(()=>i(f=>f+1),[]),p=xr.useCallback(()=>{if(!l)return;let f=a.current;if(f?.client===e&&f.recipientKey===l)return;let u=s.current;u?.client===e&&u.recipientKey===l&&Date.now()-u.at<bx||i(c=>c+1)},[e,l]),h=l&&r.recipientKey===l?r.targets:qa,b=l&&r.recipientKey===l?r.error:void 0,m=!!(l&&r.recipientKey!==l),w=!!(l&&r.recipientKey===l&&r.badgeFailed);return xr.useMemo(()=>({count:w?0:ja(Uo(h)),targets:h,loading:m,error:b,refresh:d,refreshIfStale:p}),[h,m,w,b,d,p])}import{createContext as wx,useContext as yx}from"react";var zl=wx(null);function Fl(){let e=yx(zl);if(!e)throw new Error("RelayRecovery compound components must be used within <RelayRecovery>");return e}function Ul(){return Fl().props}function Uf(){return Fl().recovery}function jf(){return Fl().recovery.count}import*as so from"react";import{jsx as lo,jsxs as vx}from"react/jsx-runtime";function Wf({className:e}){let t=Ul(),{open:r}=Jr();return so.useEffect(()=>{r&&_e("relay","recovery_opened")},[r]),lo(ge,{feature:"relay",children:lo(Sn,{ariaTitle:"Recover stuck funds",className:e??t.className,children:lo(xx,{})})})}function xx(){let e=Ul(),{targets:t,loading:r,refresh:n}=Uf(),{theme:o}=Jr(),i=so.useMemo(()=>_n({apiBaseUrl:e.apiBaseUrl,environment:e.environment}),[e.apiBaseUrl,e.environment]),a=so.useMemo(()=>e.client?e.client:Ut({baseUrl:i}),[e.client,i]),s=so.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&&dt(e.walletAddress)?e.walletAddress:void 0,d=!!(l&&(!e.recipient||dt(e.recipient)&&e.recipient.toLowerCase()===l.toLowerCase())),p=d?l:void 0,h=nt(e.environment),b=sr("apps.json",h,y=>Mi(y,h)),m=so.useMemo(()=>e.trustedFactories??Ua(b),[e.trustedFactories,b]),w=!!(e.writeContract&&e.readContract&&e.waitForReceipt),f=!!p&&w,u=p,{orders:c}=Gn({client:a,recipient:f?u:void 0,enabled:f,live:!1});return vx("div",{className:"rd-root rd-wizard","data-theme":o,children:[!l&&lo("p",{className:"rd-muted","data-testid":"rd-recovery-connect-note",children:"Connect a wallet to check recoverable funds."}),l&&!d&&lo("p",{className:"rd-muted","data-testid":"rd-recovery-recipient-note",children:"Recovery is only available for the connected wallet."}),d&&!w&&lo("p",{className:"rd-muted","data-testid":"rd-recovery-unsupported-note",children:"This wallet can't sign recovery transactions."}),f&&lo(_a,{client:e.client,apiBaseUrl:i,recipient:p,wallet:s,trustedFactories:m,targets:t,targetsLoading:r,orders:c,onRecovered:n,onRecoverySuccess:e.onRecoverySuccess,showTitle:!1,onError:e.onError})]})}import{jsx as jl}from"react/jsx-runtime";function Gf({asChild:e,children:t}){let r=jf();return jl(ge,{feature:"relay",children:jl(Wo,{asChild:e??t!=null,dataAttributes:{"data-rd-recovery-count":r},children:t??jl("button",{type:"button","data-track":"open",children:"Recover"})})})}import{jsx as _f}from"react/jsx-runtime";function kx(e){let{theme:t="dark",mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:i,drawerMinWidth:a,style:s,open:l,onOpenChange:d,children:p}=e,[h,b]=Ur.useState(!1),m=l!==void 0,w=m?l:h,f=Ur.useCallback(R=>{m||b(R),d?.(R)},[m,d]),u=Ur.useMemo(()=>{if(e.client)return e.client;let R=_n({apiBaseUrl:e.apiBaseUrl,environment:e.environment});return Ut({baseUrl:R})},[e.client,e.apiBaseUrl,e.environment]),c=e.walletAddress&&dt(e.walletAddress)?e.walletAddress:void 0,y=c&&(!e.recipient||dt(e.recipient)&&e.recipient.toLowerCase()===c.toLowerCase())?c:void 0,g=Ff({client:u,recipient:y});Ur.useEffect(()=>{w&&g.refreshIfStale()},[w,g.refreshIfStale]);let v=Ur.useRef(void 0);Ur.useEffect(()=>{!w||!g.error||v.current===g.error||(v.current=g.error,e.onError?.(g.error))},[w,g.error,e.onError]);let k=Ur.useMemo(()=>({props:e,recovery:g}),[e,g]);return _f(zl.Provider,{value:k,children:_f(Rn,{theme:t,mobileBreakpoint:r,drawerDirection:n,dialogWidth:o,drawerMaxWidth:i,drawerMinWidth:a,style:s,open:w,onOpenChange:f,children:p})})}var Hf=Object.assign(kx,{Trigger:Gf,Content:Wf});import{useCallback as Rx,useEffect as Sx,useMemo as Cx,useRef as Nx,useState as Ya}from"react";function Qf(e={}){let t=Nx(e);t.current=e;let r=Cx(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRelayConfig: either `client` or `apiBaseUrl` must be provided");return Ut({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.enabled??!0,o=e.refetchInterval,[i,a]=Ya(),[s,l]=Ya(!1),[d,p]=Ya(),[h,b]=Ya(0);Sx(()=>{if(!n){a(void 0),l(!1),p(void 0);return}let w=!1,f=!1;a(void 0),l(!0),p(void 0);async function u(){if(!(w||f)){f=!0;try{let y=await r.getConfig();if(w)return;a(y),p(void 0)}catch(y){if(w)return;let g=y instanceof Error?y:new Error(String(y));p(g),t.current.onError?.(g)}finally{f=!1,w||l(!1)}}}u();let c=typeof o=="number"&&Number.isFinite(o)&&o>0?setInterval(()=>{u()},o):void 0;return()=>{w=!0,c&&clearInterval(c)}},[r,n,h,o]);let m=Rx(()=>b(w=>w+1),[]);return{config:i,loading:s,error:d,refresh:m}}import{useQuery as Tx}from"@tanstack/react-query";import{useCallback as Vf,useEffect as Ix,useMemo as Wl,useRef as qf}from"react";var Ex=1,Yf=new WeakMap;function Mx(e){let t=Yf.get(e);if(t!==void 0)return t;let r=Ex++;return Yf.set(e,r),r}function Kf(e={}){let t=qf(e);t.current=e;let r=Wl(()=>{if(e.client)return e.client;if(!e.apiBaseUrl)throw new Error("useRelayRecovery: either `client` or `apiBaseUrl` must be provided");return Ut({baseUrl:e.apiBaseUrl})},[e.client,e.apiBaseUrl]),n=e.recipient,o=n&&dt(n)?n:void 0,i=e.target,a=e.query,s=Wl(()=>Mx(r),[r]),l=Wl(()=>["relay","recovery",s,o??null,i??null],[s,o,i]),d=Tx({retry:!1,...a,queryKey:l,queryFn:async()=>{if(!o)throw new Error("useRelayRecovery: a valid EVM recipient is required");return r.getRecovery({user:o,target:i})},enabled:o?a?.enabled:!1}),p=qf(0);Ix(()=>{let f=d.error,u=d.errorUpdatedAt;!f||u===p.current||(p.current=u,t.current.onError?.(f),f instanceof en&&f.status===401&&t.current.onUnauthorized?.())},[d.error,d.errorUpdatedAt]);let h=Vf(()=>{d.refetch()},[d.refetch]),b=bi({recipient:e.recipient,wallet:e.wallet,trustedFactories:e.trustedFactories,onError:e.onError,onRecoverySuccess:e.onRecoverySuccess,onChanged:h}),m=d.data,w=Vf(async(f,u)=>{m&&await b.recover(m,f,u)},[b,m]);return{info:m,loading:d.isLoading,error:d.error??void 0,isFetching:d.isFetching,refresh:h,recover:w,recoveryState:b.stateFor(m?.forwarder)}}import{Fragment as Ox,jsx as jr,jsxs as Wr}from"react/jsx-runtime";var Ax={bscBridge:"https://bscscan.com/tx/",crossFinalize:"https://scan.crosstoken.io/tx/",crossExecute:"https://scan.crosstoken.io/tx/"},Lx={bscBridge:"Bridge tx (BSC)",crossFinalize:"Finalize tx (CROSS)",crossExecute:"Execute tx (CROSS)"};function Dx(e){return e==="done"?"\u2713":e==="active"?"\u25CF":""}function Zf(e){return e==="FAILED"||e==="REFUNDED"||e==="RELAY_REFUNDED"||e==="EXPIRED"}function Px(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 Xf({orderId:e,order:t,error:r}){let n=!t&&!r;return Wr("section",{className:"rd-card",children:[Wr("div",{className:"rd-card-header",children:[jr("h2",{className:"rd-card-title",children:"4. Status"}),t&&jr("span",{className:`rd-status-pill${t.status==="COMPLETED"?" rd-status-pill-success":Zf(t.status)?" rd-status-pill-failure":""}`,children:t.status})]}),Wr("p",{className:"rd-card-hint",children:["Order ",e]}),n&&Wr("p",{className:"rd-muted",children:[jr("span",{className:"rd-spinner"})," Loading status..."]}),r&&Wr("div",{className:"rd-callout rd-callout-danger",children:["Couldn't load order status: ",r.message]}),t&&Wr(Ox,{children:[jr("ol",{className:"rd-stepper",children:t.steps.map((o,i)=>Wr("li",{className:Px(o.status),children:[Wr("div",{className:"rd-stepper-rail",children:[jr("span",{className:"rd-stepper-dot",children:Dx(o.status)}),i<t.steps.length-1&&jr("span",{className:"rd-stepper-line"})]}),Wr("div",{className:"rd-stepper-body",children:[jr("div",{className:"rd-stepper-label",children:o.label}),o.key==="bridge"&&t.txs.bscBridge&&jr("div",{className:"rd-stepper-meta",children:jr(Gl,{orderTxs:t.txs,txKey:"bscBridge"})}),o.key==="deliver"&&(t.txs.crossFinalize||t.txs.crossExecute)&&Wr("div",{className:"rd-stepper-meta",children:[t.txs.crossFinalize&&jr(Gl,{orderTxs:t.txs,txKey:"crossFinalize"}),t.txs.crossExecute&&jr(Gl,{orderTxs:t.txs,txKey:"crossExecute"})]})]})]},o.key))}),Zf(t.status)&&Wr("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"&&jr("div",{className:"rd-callout rd-callout-success",children:"crossd delivered. This order is complete."})]})]})}function Gl({orderTxs:e,txKey:t}){let r=e[t];return r?Wr("a",{href:`${Ax[t]}${r}`,target:"_blank",rel:"noreferrer",children:[Lx[t],": ",r.slice(0,10),"..."]}):null}function Ka(e){return`${e.chainId}:${e.address.toLowerCase()}`}function _l(e,t){return Ka(e)===Ka(t)}function Za(e,t){if(t)return e.find(r=>_l(r,t))}function vi(e,t,r){return t?{fromTokens:(r==="swap"?[t.swap.from]:t.bridge.from).map(o=>Za(e,o)).filter(o=>!!o),targetToken:Za(e,t.target)}:{fromTokens:[],targetToken:void 0}}function Xa(e,t){return e.some(r=>r.chainId===t.chainId&&r.address.toLowerCase()===t.address.toLowerCase())}var Bx={swap:"swap",bridge:"bridge",transfer:"transferCrypto"};function ki(e,t){return t?.[Bx[e]]??e!=="transfer"}var Jf={dev:"https://stg.oneusd.money/",stage:"https://stg.oneusd.money/",production:"https://www.oneusd.money/"};function $f(e){let t=e.trim().toLowerCase().replace(/\.$/,"");return t==="oneusd.money"||t.endsWith(".oneusd.money")}function em(e,t){return e?.items?.find(({id:n,type:o})=>n.toLowerCase()==="oneusd"||o.toLowerCase()==="oneusd")?.url[t]}import*as Ja from"react";function tm(e){let[t,r]=Ja.useState(null);return Ja.useEffect(()=>{if(!e)return;let n=!0;return Us().then(o=>{n&&r(o)}).catch(()=>{}),()=>{n=!1}},[e]),t}function rm(e,t){return t==="bridge"?!0:e==="bridge"||e==="bridge-swap"||e==="swap-bridge"}function zx(e){if(!e)return"";let[t="0",r=""]=e.replace(/,/g,"").split("."),o=(t.replace(/^0+(?=\d)/,"")||"0").replace(/\B(?=(\d{3})+(?!\d))/g,","),i=r.slice(0,6).replace(/0+$/,"");return i?`${o}.${i}`:o}function Fx(e){return e===56||e===97?"BSC":e===612044||e===612055||e===5555?"ONEchain":`Chain ${e}`}function nm(e,t){return rm(e.pathType,t)?"Bridging":"Swapping"}function om(e,t){let r=zx(e.toAmount);if(rm(e.pathType,t)){let n=`arriving on ${Fx(e.toToken.chainId)}`;return r?`${r} ${n}`:n}return r?`${r} Swapped`:"Transaction completed"}import{jsx as Hn,jsxs as Ux}from"react/jsx-runtime";function im(e){return Hn("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:Hn("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 am(e){return Hn("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:Hn("path",{d:"M7 7h13m0 0-3-3m3 3-3 3M17 17H4m0 0 3 3m-3-3 3-3",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})}function sm(e){return Ux("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[Hn("path",{d:"m21 3-7.2 18-4.1-7.7L2 9.2 21 3Z",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"}),Hn("path",{d:"m9.7 13.3 4.1-4.1",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]})}function lm(e){return Hn("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:Hn("path",{d:"m6 6 12 12M18 6 6 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}de(`.gou-fab{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 .25s ease,padding .25s 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 .25s ease,height .25s 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 .2s ease,opacity .2s 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-purple-high, #9b78ff);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:24px;padding:24px}.gou-close{position:absolute;top:16px;right:16px;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:hover{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{border-color:#f3742e;background:var(--gou-card-hover)}.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-radius:9999px;background:#f3742e1f;color:var(--ds-accent-primary-default, #f3742e);transition:background .15s ease,color .15s ease}.gou-action:hover .gou-action-icon{background:var(--ds-accent-primary-default, #f3742e);color:var(--ds-accent-primary-on, #ffffff)}.gou-action-icon svg{width:18px;height:18px}.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{overflow:hidden;color:var(--gou-muted);font-size:14px;line-height:1.5;text-overflow:ellipsis;white-space:nowrap}.gou-action-eta{flex-shrink:0;color:var(--gou-muted);font-size:12px}.gou-badge{flex-shrink:0;padding:2px 6px;border-radius:5px;background:#f3742e24;color:#f3742e;font-size:10px;font-weight:650}.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-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}}
|
|
20
|
+
`);import{Fragment as Hx,jsx as je,jsxs as jt}from"react/jsx-runtime";var jx=[{id:"swap",label:"Swap",eta:"Instant",Icon:im},{id:"bridge",label:"Bridge",Icon:am},{id:"transfer",label:"Transfer Crypto",eta:"QR deposit",Icon:sm}],Wx=4e3;function dm(e){return e instanceof Error?e.message:typeof e=="string"?e:"Unknown error"}function $a(e,t){try{e?.(t)}catch{}}function Gx({compactTrigger:e,collapseOnScroll:t,scrollThreshold:r}){let[n,o]=ze.useState(!1),[i,a]=ze.useState(!1);return ze.useEffect(()=>{o(go())},[]),ze.useEffect(()=>{if(t===!1){a(!1);return}let s=()=>a(window.scrollY>(r??200));return s(),window.addEventListener("scroll",s,{passive:!0}),()=>window.removeEventListener("scroll",s)},[t,r]),!!(e||n||i)}function _x({loading:e}){return jt("div",{className:"gou-route-state",role:"status",children:[e&&je("span",{className:"gou-spinner","aria-hidden":"true"}),je("h3",{children:e?"Preparing route":"Route unavailable"}),je("p",{children:e?"Loading token and contract configuration.":"The configured ONEUSD route is not available in this environment."})]})}function cm({walletAddress:e,tokens:t,pairs:r,loading:n=!1,bridge:o,relay:i,env:a,targetSymbol:s,relayTargetSymbol:l="ONEUSD",targetIconUrl:d,mode:p="floating",buttonComponent:h,theme:b="dark",mobileBreakpoint:m=768,drawerDirection:w="bottom",dialogWidth:f="480px",drawerMaxWidth:u,drawerMinWidth:c,style:y,className:g,contentClassName:v,hidden:k=!1,compactTrigger:R,collapseOnScroll:I=!0,scrollThreshold:C=200,waitForTransaction:S,transactionResultDurationMs:A=Wx,onRequestConnect:D,onEvent:U}){let[M,G]=ze.useState(!1),[E,O]=ze.useState(null),[ie,Y]=ze.useState(!1),[P,pe]=ze.useState(null),[$,Q]=ze.useState(!1),B=ze.useRef(0),J=ze.useRef(!1),V=ze.useRef(null),le=ze.useRef(!0),he=Gx({compactTrigger:R,collapseOnScroll:I,scrollThreshold:C}),ee=ze.useMemo(()=>nt(a),[a]),ce=sr("apps.json",ee,z=>z?.getOneUsd?.modes),we=sr("app-launcher-v2.json",ee,z=>em(z,ee))??Jf[ee],Je=ze.useMemo(()=>jx.filter(({id:z})=>ki(z,ce)),[ce]),oe=Je.length>0,Me=tm(!k&&oe),$e=ze.useMemo(()=>vi(t,r,"swap"),[r,t]),Te=ze.useMemo(()=>vi(t,r,"bridge"),[r,t]),Ae=$e.targetToken??Te.targetToken,be=s??Ae?.symbol??"ONEUSD",ht=d??Ae?.iconUrl??hl,Et=p==="floating"&&he,vt=p==="button"&&h?h:"button";ze.useEffect(()=>(le.current=!0,()=>{le.current=!1,V.current&&clearTimeout(V.current)}),[]),ze.useEffect(()=>{Q(!$f(window.location.hostname))},[]),ze.useEffect(()=>{oe||G(!1)},[oe]);let Le=ze.useCallback(z=>U?.(z),[U]),it=ze.useCallback(()=>{P||!oe||(Le({name:"fab_click",state:Et?"icon_only":"expanded"}),G(!0))},[Le,oe,P,Et]),Mt=ze.useCallback(z=>{P||!ki(z,ce)||(Le({name:"action_select",action:z}),G(!1),z==="transfer"&&Y(!0),O(z))},[Le,ce,P]),Qe=ze.useCallback(z=>{Le({name:"connect_click",action:z}),Promise.resolve(D?.()).catch(Ie=>{Le({name:"failure",action:z,message:dm(Ie)})})},[Le,D]),et=E==="swap"||E==="bridge"?E:null,De=et==="swap"?$e:Te,bt=!!(r&&De.targetToken&&De.fromTokens.length>0),qt=ze.useMemo(()=>{if(!De.targetToken)return;let z=De.targetToken;return Ie=>{let Ze=o.getToTokens?.(Ie,t);return Ze&&!Xa(Ze,z)?[]:[z]}},[o.getToTokens,De.targetToken,t]),{onSubmitted:kt,onSuccess:Ve,onFailed:tt,...ct}=o,{onDeposited:Pe,onError:at,...qe}=i??{},rt=ze.useCallback((z,Ie,Ze,F,ne)=>{!le.current||B.current!==z||(pe({id:z,phase:Ie,action:Ze,label:F,txHash:ne}),V.current&&clearTimeout(V.current),V.current=setTimeout(()=>{!le.current||B.current!==z||(J.current=!1,pe(null),V.current=null)},Math.max(0,A)))},[A]),st=ze.useCallback((z,Ie)=>{if(J.current)return;J.current=!0;let Ze=++B.current,F=nm(z,Ie);pe({id:Ze,phase:"pending",action:Ie,label:F,txHash:z.txHash}),G(!1),O(null),$a(kt,z),Promise.resolve().then(()=>S?.(z)).then(()=>{!le.current||B.current!==Ze||(rt(Ze,"success",Ie,om(z,Ie),z.txHash),Le({name:"success",action:Ie,txHash:z.txHash}))}).catch(ne=>{if(!le.current||B.current!==Ze)return;let ue=dm(ne);rt(Ze,"failure",Ie,"Transaction failed",z.txHash),$a(tt,{message:ue,txHash:z.txHash}),Le({name:"failure",action:Ie,message:ue})})},[Le,tt,kt,rt,S]);return je(ge,{feature:"get_one_usd",children:jt("div",{className:g,"data-theme":b,"data-gou-mode":p,children:[jt(Rn,{theme:b,mobileBreakpoint:m,drawerDirection:w,dialogWidth:f,drawerMaxWidth:u,drawerMinWidth:c,open:M,onOpenChange:G,children:[!k&&oe&&(p==="button"||!P)&&jt(vt,{type:"button",className:"gou-fab",style:y,"data-trigger-mode":p,"data-icon-only":Et?"true":"false",onClick:it,disabled:!!P,"aria-label":`Get ${be}`,"data-track":"fab_click",children:[p==="floating"&&jt("span",{className:"gou-tooltip",children:["Choose how to get ",be]}),je("span",{className:"gou-fab-icon-frame",children:je("img",{className:"gou-fab-icon",src:ht,alt:""})}),jt("span",{className:"gou-fab-label gou-fab-trigger-copy",children:[jt("span",{children:["Get ",be]}),Me!==null&&je("span",{className:"gou-fab-apr",children:oa(Me)})]})]}),P&&jt("div",{className:"gou-fab gou-fab-status",style:p==="floating"?y:void 0,"data-floating-status":"true","data-icon-only":"false","data-tx-phase":P.phase,role:"status","aria-live":"polite","aria-label":P.phase==="pending"?`${P.label} transaction in progress`:P.label,children:[jt("span",{className:"gou-fab-icon-frame",children:[je("img",{className:"gou-fab-icon",src:ht,alt:""}),P.phase==="pending"&&je("span",{className:"gou-fab-progress-ring","aria-hidden":"true"})]}),je("span",{className:"gou-fab-label",children:P.phase==="pending"?jt(Hx,{children:[P.label,jt("span",{className:"gou-fab-dots","aria-hidden":"true",children:[je("span",{children:"."}),je("span",{children:"."}),je("span",{children:"."})]})]}):P.label})]}),je(Sn,{ariaTitle:`Get ${be}`,className:`gou-shell gou-chooser ${v??""}`,children:jt("div",{className:"gou-chooser-body",children:[je("button",{type:"button",className:"gou-close",onClick:()=>G(!1),"aria-label":"Close",children:je(lm,{})}),jt("header",{className:"gou-intro",children:[jt("h2",{children:["Get ",be]}),$&&jt("a",{className:"gou-intro-link",href:we,target:"_blank",rel:"noopener noreferrer","aria-label":"What is ONEUSD? Opens in a new tab","data-track":"oneusd_learn_more",children:["What is ONEUSD? ",je("span",{"aria-hidden":"true",children:"\u2197"})]})]}),je("ul",{className:"gou-actions",children:Je.map(({id:z,label:Ie,eta:Ze,Icon:F})=>{let ne=z==="swap"?`Swap the ${$e.fromTokens[0]?.symbol??"ONE"} you already hold`:z==="bridge"?`Bridge USDT to ${be}`:"Deposit from any chain or exchange",ue=z==="swap"?r?.swap.feeDelegated:z==="bridge"?r?.bridge.feeDelegated:!1;return je("li",{children:jt("button",{type:"button",className:"gou-action",onClick:()=>Mt(z),"data-track":"action_select","data-track-id":z,children:[je("span",{className:"gou-action-icon",children:je(F,{})}),jt("span",{className:"gou-action-copy",children:[jt("span",{className:"gou-action-title",children:[je("span",{children:Ie}),ue&&je("span",{className:"gou-badge",children:"Fee Delegated"})]}),je("span",{className:"gou-action-description",children:ne})]}),Ze&&je("span",{className:"gou-action-eta",children:Ze})]})},z)})})]})})]}),je(Rn,{theme:b,mobileBreakpoint:m,drawerDirection:w,dialogWidth:f,drawerMaxWidth:u,drawerMinWidth:c,open:!!et,onOpenChange:z=>{z||O(null)},children:je(Sn,{ariaTitle:`${et==="bridge"?"Bridge":"Swap"} to ${be}`,className:`gou-shell gou-execution ${v??""}`,children:bt?je(Lo,{...ct,env:a,variant:"embedded",title:`${et==="bridge"?"Bridge":"Swap"} to ${be}`,walletAddress:e??"",isConnected:!!e,onRequestConnect:()=>Qe(et??"swap"),tokens:De.fromTokens,initialFromToken:De.fromTokens[0],initialToToken:De.targetToken,getToTokens:qt,onClose:()=>O(null),onBackToWallet:()=>O(null),onSubmitted:z=>{st(z,et??"swap")},onSuccess:z=>{$a(Ve,z)},onFailed:z=>{$a(tt,z),Le({name:"failure",action:et??"swap",message:z.message})}},`${et}:${De.fromTokens.map(z=>`${z.chainId}:${z.address}`).join(",")}`):je(_x,{loading:n||!r})})}),ie&&je(xi,{...qe,environment:qe.environment??a,theme:qe.theme??b,mobileBreakpoint:qe.mobileBreakpoint??m,drawerDirection:qe.drawerDirection??w,dialogWidth:qe.dialogWidth??f,drawerMaxWidth:qe.drawerMaxWidth??u,drawerMinWidth:qe.drawerMinWidth??c,walletAddress:e,open:E==="transfer",onOpenChange:z=>{z||O(null)},requireWalletConnection:!0,showRecovery:qe.showRecovery??!0,showRecipientInput:!1,hideAmount:!0,targetTokens:[l],defaultTarget:l,onRequestConnect:()=>Qe("transfer"),onDeposited:z=>{Pe?.(z),Le({name:"success",action:"transfer",txHash:z})},onError:z=>{at?.(z),Le({name:"failure",action:"transfer",message:z.message})},children:je(xi.Content,{})})]})})}import*as pn from"react";import*as Tm from"@radix-ui/react-dialog";import{Drawer as rv}from"vaul";import{createContext as Qx,useContext as Vx}from"react";var es=Qx(null);function Ri(){let e=Vx(es);if(!e)throw new Error("WalletConnectModal compound components must be used within <WalletConnectModal>");return e}import{useState as pm,useEffect as qx,useCallback as Yx}from"react";function ts(){let[e,t]=pm([]),[r,n]=pm(!0);qx(()=>{if(typeof window>"u"){n(!1);return}let i=[],a=l=>{let{info:d}=l.detail;d?.rdns&&!i.some(p=>p.rdns===d.rdns)&&(i.push({rdns:d.rdns,name:d.name,icon:d.icon}),t([...i]))};window.addEventListener("eip6963:announceProvider",a),window.addEventListener("eip6963:crossAnnounceProvider",a),window.dispatchEvent(new Event("eip6963:requestProvider")),window.dispatchEvent(new Event("eip6963:crossRequestProvider"));let s=setTimeout(()=>n(!1),500);return()=>{window.removeEventListener("eip6963:announceProvider",a),window.removeEventListener("eip6963:crossAnnounceProvider",a),clearTimeout(s)}},[]);let o=Yx(i=>e.some(a=>a.rdns===i),[e]);return{wallets:e,isDetected:o,isLoading:r}}import*as um from"@radix-ui/react-dialog";import{Drawer as Kx}from"vaul";import{jsx as Hl}from"react/jsx-runtime";function fm({asChild:e,children:t}){let{isMobile:r}=Ri(),n=r?Kx.Trigger:um.Trigger;return Hl(ge,{feature:"wallet_connect",children:Hl(n,{asChild:e??t!=null,children:t??Hl("button",{type:"button","data-track":"open",children:"Connect Wallet"})})})}import{useEffect as Jx}from"react";import{WALLET_LABELS as $x}from"@nexus-cross/crossx-design-system";import*as cn from"@radix-ui/react-dialog";import{Drawer as ns}from"vaul";import{WALLET_LABELS as Ql}from"@nexus-cross/crossx-design-system";import{jsx as Ee,jsxs as co}from"react/jsx-runtime";var Zx='<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>',Xx=`data:image/svg+xml,${encodeURIComponent(Zx)}`;function rs(){return Ee("img",{src:Xx,width:40,height:40,alt:"",style:{display:"block"}})}function mm(){return co("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[co("g",{clipPath:"url(#clip0_1331_27065)",children:[Ee("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"}),Ee("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"}),Ee("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"}),Ee("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"}),Ee("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"}),Ee("path",{d:"M22.1857 36.1951V39.831H17.6699V36.1951H22.1857Z",fill:"#C0C4CD"}),Ee("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"})]}),Ee("defs",{children:Ee("clipPath",{id:"clip0_1331_27065",children:Ee("rect",{width:"40",height:"40",fill:"white"})})})]})}function gm(){return co("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Ee("path",{d:"M12.23 16.81L20 9.04L27.77 16.81L32.29 12.29L20 0L7.71 12.29L12.23 16.81Z",fill:"#F3BA2F"}),Ee("path",{d:"M9.04 20L4.52 15.48L0 20L4.52 24.52L9.04 20Z",fill:"#F3BA2F"}),Ee("path",{d:"M12.23 23.19L20 30.96L27.77 23.19L32.29 27.71L20 40L7.71 27.71L12.23 23.19Z",fill:"#F3BA2F"}),Ee("path",{d:"M35.48 24.52L40 20L35.48 15.48L30.96 20L35.48 24.52Z",fill:"#F3BA2F"}),Ee("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 hm(){return co("svg",{xmlns:"http://www.w3.org/2000/svg",width:"247",height:"246",viewBox:"0 0 247 246",fill:"none",children:[Ee("rect",{width:"247.005",height:"245.105",rx:"36",fill:"#121212"}),Ee("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"}),Ee("path",{d:"M59.8364 99.8915V59.7551H12.0414L30.4787 77.8377V99.8915H59.8364Z",fill:"#2FD7FF"}),Ee("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 bm(){return co("svg",{width:"40",height:"40",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[co("g",{clipPath:"url(#clip0_1185_7785)",children:[Ee("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"}),Ee("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"})]}),Ee("defs",{children:Ee("clipPath",{id:"clip0_1185_7785",children:Ee("rect",{width:"28",height:"28",fill:"white"})})})]})}function wm(){return co("svg",{width:"40",height:"40",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",children:[Ee("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"}),Ee("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"}),Ee("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"}),Ee("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 ym(){return Ee("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:Ee("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 xm(){return Ee("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ee("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}var Vl={cross_embedded:{id:"cross_embedded",name:Ql.social,description:"Sign in with Google or Apple",icon:rs},cross_wallet:{id:"cross_wallet",name:Ql.app,description:"App approval is required",icon:rs,featured:!0},cross_extension:{id:"cross_extension",name:Ql.extension,description:"Browser extension approval is required",icon:rs,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:mm,rdns:"io.metamask"},binance:{id:"binance",name:"Binance",description:"Mobile app only \u2014 Add CROSS network first",icon:gm},verse8:{id:"verse8",name:"Verse8 Wallet",description:"Optimized for Forge and Verse8 ecosystem",icon:hm,badge:"For Forge"},tron:{id:"tron",name:"Tron Wallet",description:"Dedicated for Tron-based transactions and assets",icon:bm,badge:"For SHOP"}};function ql(e){return Vl[e]}var Yl={google:{id:"google",name:"Google",icon:wm},apple:{id:"apple",name:"Apple",icon:ym}};function vm(e){return Yl[e]}import{Fragment as Cm,jsx as xe,jsxs as er}from"react/jsx-runtime";function km(e,t){_e("connect","wallet_selected",{tags:{item_id:e}});let r=t?.();r instanceof Promise&&r.then(()=>_e("connect","connected"),n=>_e("connect","connected",{status:"failure",reason:gr(n)}))}function ev({wallet:e,detected:t,onConnect:r}){let n=()=>{if(e.installUrl&&!t){window.open(e.installUrl,"_blank","noopener,noreferrer");return}r()},o=e.icon,i=e.featured===!0;return er("button",{type:"button",className:Ne("wcm-wallet-item",i&&"wcm-wallet-item--featured"),"data-track":"wallet_item_click","data-track-id":e.id,onClick:n,children:[er("div",{className:"wcm-wallet-item-left",children:[xe("div",{className:"wcm-wallet-icon",children:xe(o,{})}),er("div",{className:"wcm-wallet-name-row",children:[xe("span",{className:"wcm-wallet-name",children:e.name}),e.badge&&xe("span",{className:"wcm-wallet-badge",children:e.badge})]})]}),e.installUrl&&(t?xe("span",{className:"wcm-installed-label",children:"Installed"}):xe("span",{className:"wcm-install-btn",children:"Install"}))]})}function tv({social:e,onSignIn:t}){let r=e.icon,n=`Sign in with ${e.name}`;return er("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":n,children:[xe("span",{className:"wcm-social-icon",children:xe(r,{})}),xe("span",{className:"wcm-social-name",children:n})]})}function Rm(){let{wallets:e,activeWalletIds:t,socialProviders:r,activeSocialIds:n,termsUrl:o,privacyUrl:i,isDetected:a,close:s,isMobile:l}=Ri(),d=t.filter(b=>{let m=ql(b).visibility;return!m||m==="always"?!0:m==="desktop-only"?!l:m==="mobile-only"?l:!0}),p=n.length>0,h=d.length>0;return er(Cm,{children:[er("div",{className:"wcm-header",children:[er("div",{className:"wcm-header-text",children:[xe("h2",{className:"wcm-title",children:$x.default}),!l&&xe("p",{className:"wcm-subtitle",children:"Sign in instantly with your social account"})]}),xe("button",{type:"button",className:"wcm-close-btn","data-track":"close",onClick:s,"aria-label":"Close",children:xe(xm,{})})]}),er("div",{className:"wcm-body",children:[p&&er(Cm,{children:[!l&&er("div",{className:"wcm-section-header",children:[xe("span",{className:"wcm-section-title",children:"Social Account Wallet Connect"}),xe("span",{className:"wcm-recommended-badge",children:"Recommended"})]}),xe("div",{className:"wcm-social-grid",children:n.map(b=>{let m=vm(b);return xe(tv,{social:m,onSignIn:()=>{km(b,r[b]),s()}},b)})}),h&&er("div",{className:"wcm-separator",children:[xe("div",{className:"wcm-separator-line"}),xe("span",{className:"wcm-separator-text",children:"Other Wallets"}),xe("div",{className:"wcm-separator-line"})]})]}),h&&xe("div",{className:"wcm-wallet-list",children:d.map(b=>{let m=ql(b),w=m.rdns?a(m.rdns):!1;return xe(ev,{wallet:m,detected:w,onConnect:()=>{km(b,e[b]),s()}},b)})}),er("p",{className:"wcm-terms",children:["By continuing, you agree to NEXUS"," ",xe(Sm,{href:o,track:"terms_link",children:"Terms of Service"})," ","and consent to its"," ",xe(Sm,{href:i,track:"privacy_link",children:"Privacy Policy"}),"."]})]})]})}function Sm({href:e,track:t,children:r}){return e?xe("a",{className:"wcm-terms-link",href:e,target:"_blank",rel:"noopener noreferrer","data-track":t,children:r}):xe("span",{className:"wcm-terms-link",children:r})}function Nm({className:e}){let{isMobile:t,theme:r,portalStyle:n,open:o}=Ri();return Jx(()=>{o&&_e("connect","opened")},[o]),t?xe(ge,{feature:"wallet_connect",children:er(ns.Portal,{children:[xe(ns.Overlay,{className:"wcm-overlay"}),er(ns.Content,{className:Ne("wcm-drawer-content",e),"data-theme":r,style:n,children:[xe(ns.Title,{className:"wcm-sr-only",children:"Connect Wallet"}),xe("div",{className:"wcm-drawer-handle"}),xe("div",{className:"wcm-drawer-body",children:xe(Rm,{})})]})]})}):xe(ge,{feature:"wallet_connect",children:er(cn.Portal,{children:[xe(cn.Overlay,{className:"wcm-overlay"}),er(cn.Content,{className:Ne("wcm-dialog-content",e),"data-theme":r,style:n,children:[xe(cn.Title,{className:"wcm-sr-only",children:"Connect Wallet"}),xe(cn.Description,{className:"wcm-sr-only",children:"Sign in with a social provider or pick a wallet to connect."}),xe("div",{className:"wcm-dialog-body",children:xe(Rm,{})})]})]})})}de(`.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-system-orange-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-system-orange-high, #e56f00);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}
|
|
21
|
+
`);de(`@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)}}
|
|
22
|
+
`);import{jsx as Si}from"react/jsx-runtime";var nv={};function ov({wallets:e,socialProviders:t=nv,termsUrl:r,privacyUrl:n,theme:o="dark",mobileBreakpoint:i=768,drawerDirection:a="bottom",dialogWidth:s,drawerMaxWidth:l,drawerMinWidth:d,style:p,open:h,onOpenChange:b,children:m}){let w=bo(`(max-width: ${i}px)`),[f,u]=pn.useState(!1),c=h!==void 0,y=c?h:f,g=pn.useCallback(D=>{c||u(D),b?.(D)},[c,b]),v=pn.useCallback(()=>g(!1),[g]),{isDetected:k}=ts(),R=pn.useMemo(()=>Object.keys(e),[e]),I=pn.useMemo(()=>Object.keys(t),[t]),C=pn.useMemo(()=>{let D={};return s&&(D["--wcm-dialog-width"]=s),l&&(D["--wcm-drawer-max-width"]=l),d&&(D["--wcm-drawer-min-width"]=d),{...D,...p}},[s,l,d,p]),S=pn.useMemo(()=>({theme:o,isMobile:w,open:y,setOpen:g,close:v,wallets:e,activeWalletIds:R,socialProviders:t,activeSocialIds:I,termsUrl:r??ko,privacyUrl:n??_i,isDetected:k,portalStyle:C}),[o,w,y,g,v,e,R,t,I,r,n,k,C]),A=Si("div",{"data-theme":o,style:C,children:m});return w?Si(es.Provider,{value:S,children:Si(rv.Root,{direction:a,open:y,onOpenChange:g,noBodyStyles:!0,children:A},"drawer")}):Si(es.Provider,{value:S,children:Si(Tm.Root,{open:y,onOpenChange:g,children:A})})}var Im=Object.assign(ov,{Trigger:fm,Content:Nm});import{WALLET_LABELS as cv}from"@nexus-cross/crossx-design-system";import*as Mm from"react";de(`.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}
|
|
23
|
+
`);de(`.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)}}
|
|
24
|
+
`);var iv='<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>',av='<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>',sv='<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>',lv='<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>',dv='<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 Ci(e){return`data:image/svg+xml,${encodeURIComponent(e)}`}var os=Ci(iv),is=Ci(av),as=Ci(sv),ss=Ci(lv),ls=Ci(dv);import{jsx as mr,jsxs as Ni}from"react/jsx-runtime";function Am({isConnecting:e,address:t,provider:r,providerName:n,accountName:o,sendAccounts:i,onConnect:a,onDisconnect:s,onCopy:l,onSelectWallet:d,onBuy:p,onBuyDisabledMessage:h,label:b="Connect Wallet",connectingLabel:m="Connecting...",disconnectLabel:w,className:f,theme:u="dark",env:c,showBalance:y=!0,showPortfolio:g,drawerDirection:v,modal:k,connectorId:R,style:I,walletInfoStyle:C,sendTransaction:S,getTransactionReceipt:A,estimateGas:D,onReceive:U,onBridge:M,onSend:G,bridgeTokens:E,bridgeHistory:O,getBridgeQuote:ie,getBridgeToTokens:Y,getBridgeApproval:P,approveBridge:pe,submitBridge:$}){let Q=f?`cb-button ${f}`:"cb-button",B=f?`cb-pill ${f}`:"cb-pill";if(Mm.useEffect(()=>{ho(t)},[t]),e)return Ni("button",{type:"button",disabled:!0,className:Q,style:I,"aria-busy":"true",children:[mr("span",{className:"cb-spinner","aria-hidden":"true"}),mr("span",{className:"cb-button-label",children:m})]});if(t){let J=n??mv(r),V=r?uv[r]:void 0;return mr(ge,{feature:"connect_button",children:Ni(Po,{env:c,theme:u,drawerDirection:v,modal:k,showBalance:y,showPortfolio:g,walletAddress:t,accountName:o,sendAccounts:i,connectorId:R,onSelectWallet:d,onCopyAddress:l?(le,he)=>{he&&l()}:void 0,onDisconnect:s,disconnectLabel:w,style:C,sendTransaction:S,getTransactionReceipt:A,estimateGas:D,onReceive:U,onBridge:M,onBuy:p,onBuyDisabledMessage:h,onSend:G,bridgeTokens:E,bridgeHistory:O,getBridgeQuote:ie,getBridgeToTokens:Y,getBridgeApproval:P,approveBridge:pe,submitBridge:$,children:[mr(Po.Trigger,{asChild:!0,children:Ni("button",{type:"button",className:B,"data-track":"wallet_pill_open",style:I,"aria-label":`Connected with ${J}: ${Em(t)}`,children:[V?mr("img",{src:V,alt:"",width:18,height:18,className:"cb-pill-icon","data-provider":r}):mr("span",{className:"cb-pill-icon-placeholder","aria-hidden":"true"}),mr("span",{className:"cb-pill-address",children:Em(t)})]})}),mr(Po.Content,{align:"end",sideOffset:8})]})})}return mr(ge,{feature:"connect_button",children:Ni("button",{type:"button",onClick:a,className:Q,"data-track":"connect_click",style:I,"aria-label":typeof b=="string"?b:"Connect Wallet",children:[mr(pv,{}),mr("span",{className:"cb-button-label",children:b})]})})}function pv(){return Ni("svg",{className:"cb-button-icon",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[mr("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"}),mr("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"}),mr("path",{d:"M12.75 11.25H12.7575",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}var uv={google:ss,apple:ls,cross:os,metamask:is,binance:as},fv={google:"Google",apple:"Apple",cross:cv.default,metamask:"MetaMask",binance:"Binance Wallet"};function mv(e){return e?fv[e]:"Wallet"}function Em(e){return e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`}import*as Lm from"react";de(`.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)}
|
|
25
|
+
`);de(`.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)}}
|
|
26
|
+
`);import{jsx as _o,jsxs as hv}from"react/jsx-runtime";var Dm="https://www.onechain.nexus/skills";function Pm({label:e="Skills",href:t,onClick:r,className:n,style:o,theme:i,disabled:a=!1,isLoading:s=!1,loadingLabel:l="Loading...",openInNewTab:d=!1,type:p="button"}){let[h,b]=Lm.useState(!1),m=nt(),w=sr("apps.json",m,k=>Vr(k?.skills,m)),f=t??w,u=async k=>{if(f&&!r){d?window.open(f,"_blank","noopener,noreferrer"):window.location.href=f;return}if(r)try{b(!0),await r()}finally{b(!1)}},c=a||s||h,y=s||h,g=y?l:e,v=n?`sb-button ${n}`:"sb-button";return _o(ge,{feature:"skills",children:hv("button",{type:p,onClick:u,disabled:c,className:v,"data-theme":i,"data-track":"click",style:o,"aria-busy":y,children:[y?_o("span",{className:"sb-spinner","aria-hidden":"true"}):_o(gv,{}),_o("span",{className:"sb-label",children:g})]})})}function gv(){return _o("svg",{className:"sb-button-icon",viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:_o("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"})})}ws({mode:"dapp-ui"});export{ls as APPLE_ICON,hd as AppLauncher,Id as AppLauncherContent,vd as AppLauncherTrigger,as as BINANCE_ICON,Lo as BridgeFlow,Ai as CHAINS_CONFIG_FILE,ji as CONNECTOR_REGISTRY,os as CROSSX_ICON,Am as ConnectButton,Ns as ConnectorId,Dm as DEFAULT_SKILLS_HREF,Fo as DEFAULT_TRUSTED_FACTORIES,Oi as DappUiErrorBoundary,ss as GOOGLE_ICON,cm as GetOneUsd,is as METAMASK_ICON,wa as PORTFOLIO_SECTIONS,en as RelayApiError,xi as RelayDeposit,zf as RelayHistory,Hf as RelayRecovery,Yl as SOCIAL_REGISTRY,ta as SendFlow,Pm as SkillsButton,Xf as StatusTracker,Fs as TOKEN_STATS_QUERY_KEY,zs as USER_BALANCE_QUERY_KEY,Vl as WALLET_REGISTRY,Im as WalletConnectModal,Po as WalletInfo,Fp as WalletPortfolio,Io as WalletPortfolioBody,ws as announceAppLauncherUsage,Pi as captureDappUiException,Ut as createRelayClient,Za as findGetOneUsdToken,Xm as getChainDisplay,Di as getDappUiSentryScope,Ka as getOneUsdTokenKey,Yo as initDappUiSentry,ki as isGetOneUsdActionEnabled,Xa as isGetOneUsdTargetAvailable,_l as matchesGetOneUsdToken,gr as normalizeFailureReason,nt as resolveEnvironment,vi as resolveGetOneUsdRoute,ho as setDappUiAnalyticsUser,Bi as trackDappUiEvent,_e as trackDappUiFunnel,Vo as useChainDisplay,Jm as useChainsConfig,Fi as useGlobalMenu,Qf as useRelayConfig,Gn as useRelayOrders,Kf as useRelayRecovery,En as useTokenBalance,Mn as useTokenStats,ts as useWalletDetect};
|
|
26
27
|
//# sourceMappingURL=index.js.map
|