@rango-dev/ui 0.29.1-next.0 → 0.29.1-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/widget/ui/src/theme.d.ts +6 -6
- package/package.json +2 -5
package/dist/index.js
CHANGED
|
@@ -16,5 +16,5 @@ var n3=Object.defineProperty;var e=(o,t)=>n3(o,"name",{value:t,configurable:!0})
|
|
|
16
16
|
s0.4544001,1.0158997,1.0159006,1.0158997h22.3491974c0.5615005,0,1.0158997-0.4543991,1.0158997-1.0158997
|
|
17
17
|
S39.16465,29.4603004,38.6031494,29.4603004z`}),z1.createElement("path",{d:`M28.4444485,37.5872993H16.253952c-0.5615005,0-1.0159006,0.4543991-1.0159006,1.0158997
|
|
18
18
|
s0.4544001,1.0158997,1.0159006,1.0158997h12.1904964c0.5615025,0,1.0158005-0.4543991,1.0158005-1.0158997
|
|
19
|
-
S29.0059509,37.5872993,28.4444485,37.5872993z`}))),"CopyIcon");ui.toString=()=>"._icon";var w7=i("div",{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"$8",borderRadius:"$xs",backgroundColor:"$background",$$color:"$colors$neutral600",[`.${c} &`]:{$$color:"$colors$neutral700"},color:"$$color",fontSize:"$12",".routes":{display:"flex",alignItems:"center"},".fee":{display:"flex",alignItems:"center"}});function $7(o){if(!o.routes)return null;let t=o.routes.result?.swaps;return C1.createElement(w7,null,C1.createElement("div",{className:"routes"},t?.map((r,n)=>{let a=n+1==t.length,l=`swap-${n}`;return C1.createElement(C1.Fragment,{key:l},C1.createElement("div",{className:"route"},r.from.symbol),C1.createElement(Ze,{size:12}),a?C1.createElement("div",{className:"route"},r.to.symbol):null)})),o.totalFee?C1.createElement("div",{className:"fee"},C1.createElement(xo,{size:12}),C1.createElement(f,{size:4,direction:"horizontal"}),"$",o.totalFee):null)}e($7,"RoutesOverview");import F1,{useState as b7}from"react";import h1 from"react";var Ci=i("div",{borderRadius:"$xs",display:"flex",justifyContent:"center",alignItems:"center",variants:{fullWidth:{true:{width:"100%"},false:{width:"fit-content"}},size:{small:{padding:"$5 $15"},large:{padding:"$10",borderRadius:"$xl"}},variant:{contained:{$$color:"$colors$neutral100",[`.${c} &`]:{$$color:"$colors$neutral300"},backgroundColor:"$$color","&:hover":{$$color:"$colors$info100",[`.${c} &`]:{$$color:"$colors$neutral100"},backgroundColor:"$$color"}},outlined:{backgroundColor:"transparent",border:"1px solid $neutral100","&:hover":{$$color:"$colors$info100",[`.${c} &`]:{$$color:"$colors$neutral400"},borderColor:"$$color"}},ghost:{background:"transparent"}},disabled:{true:{},false:{}}},compoundVariants:[{variant:"contained",disabled:!0,css:{"&:hover":{backgroundColor:"$neutral100"}}},{variant:"outlined",disabled:!0,css:{"&:hover":{borderColor:"$neutral100"}}}]}),hi=i("input",{flexGrow:1,color:"$foreground",fontSize:"$14",lineHeight:"$20",fontWeight:400,border:"none",outline:"none",fontFamily:"inherit",maxWidth:"100%",variants:{suffix:{true:{marginRight:"$10"}}},backgroundColor:"transparent","-webkit-appearance":"none",margin:0,"&:disabled":{cursor:"not-allowed"},"&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{"-webkit-appearance":"none",margin:0},'&[type="number"]':{"-moz-appearance":"textfield"},"&::placeholder, &::-webkit-input-placeholder":{color:"$neutral700"},"&:focus-visible":{outline:"none"}}),gi=i("label",{display:"inline-block"});function S7(o,t){let{label:r,prefix:n,suffix:a,size:l="small",style:d,variant:m,fullWidth:C,labelProps:h,...y}=o;return h1.createElement(h1.Fragment,null,r&&h1.createElement(h1.Fragment,null,h1.createElement(gi,{className:"_text",...y.id&&{htmlFor:y.id}},h1.createElement(s,{variant:"label",size:"large",...h},r)),h1.createElement(f,{direction:"vertical",size:4})),h1.createElement(Ci,{disabled:y.disabled,fullWidth:C,variant:m,size:l,style:d,className:"_text-field"},n||null,h1.createElement(hi,{...y,spellCheck:!1,suffix:!!a,ref:t}),a||null))}e(S7,"TextFieldComponent");var S1=h1.forwardRef(S7);S1.displayName="TextField";S1.toString=()=>"._text-field";var L7=i("div",{overflow:"hidden",display:"flex",flexDirection:"column",flex:"1",padding:"0 $4"}),k7=i("div",{padding:"1px"});function b1(o){let{title:t,Footer:r,TopButton:n,hasHeader:a=!0}=o,[l,d]=b7("");return F1.createElement(F1.Fragment,null,a&&F1.createElement(Ko,{title:t||"",suffix:n}),F1.createElement(L7,null,o.textField&&F1.createElement(k7,null,F1.createElement(S1,{size:"large",prefix:F1.createElement(Ae,{size:24}),placeholder:o.textFieldPlaceholder,onChange:m=>d(m.target.value),value:l,autoFocus:!0}),F1.createElement(f,{size:16})),o.textField&&o.children?.(l),!o.textField&&o.children),r)}e(b1,"SecondaryPage");import no,{useEffect as I7,useState as T7}from"react";function io(o,t){return o.toLowerCase().indexOf(t.toLowerCase())>-1}e(io,"containsText");function fi(o,t=8,r=3){if(!o)return null;if(o.length<2*t+r)return o;let n=Math.ceil((o.length-t)/2),a=o.length-t;return`${o.substr(n,t)}${".".repeat(r)}${o.substr(a)}`}e(fi,"getConciseAddress");var P7=i("div",{display:"flex",flexWrap:"wrap"}),M7=i("div",{width:12,height:12,borderRadius:6,border:"1px solid $neutral400",position:"absolute",top:12,right:12,variants:{checked:{true:{borderColor:"$success"},false:{borderColor:"$neutral400"}}}}),D7=i("div",{width:6,margin:"20% auto",height:6,borderRadius:3,variants:{checked:{true:{backgroundColor:"$success"},false:{backgroundColor:"$neutral400"}}}}),W7=i("div",{border:"1.5px solid",borderRadius:"$xs",padding:"$12",flexBasis:"calc(33.33% - 10px)",margin:5,display:"flex",flexDirection:"column",justifyContent:"space-between",width:124,height:92,cursor:"pointer",position:"relative",variants:{checked:{true:{borderColor:"$success",color:"$success"},false:{borderColor:"$neutral400",color:"$neutral400"}}}});function B7({list:o,onChange:t}){let[r,n]=T7(o.find(l=>l.selected)?.walletType||""),a=e(l=>{n(l.walletType),t(l)},"onClick");return I7(()=>{n(o.find(l=>l.selected)?.walletType||"")},[o]),no.createElement(P7,null,o.map((l,d)=>{let m=r===l.walletType;return no.createElement(W7,{checked:m,onClick:a.bind(null,l),key:d},no.createElement(M,{src:l.image,alt:l.walletType,size:24}),no.createElement(s,{variant:"body",size:"small"},l.name),no.createElement(s,{variant:"body",size:"xsmall"},fi(l.address)),no.createElement(M7,{checked:m},m&&no.createElement(D7,{checked:m})))}))}e(B7,"SelectableWalletList");import{i18n as A7}from"@lingui/core";import N1 from"react";import{TransactionType as Ee}from"rango-sdk";var Lo=(l=>(l.ALL="ALL",l.EVM="EVM",l.COSMOS="COSMOS",l.UTXO="UTXO",l.OTHER="OTHER",l))(Lo||{});var yi={["EVM"]:r2,["COSMOS"]:e2,["UTXO"]:u2,["OTHER"]:p2},vi={["ALL"]:"All",["EVM"]:"EVM",["COSMOS"]:"Cosmos",["UTXO"]:"UTXO",["OTHER"]:"Other"},xi=e((o,t)=>{switch(t){case"ALL":return!0;case"UTXO":return o.type===Ee.TRANSFER;case"OTHER":return o.type!==Ee.TRANSFER&&o.type!==Ee.COSMOS&&o.type!==Ee.EVM;default:return o.type===t}},"filterByType"),wi=e((o,t)=>o.some(r=>xi(r,t)),"hasAnyCategory"),H7=e(o=>Object.values(Lo).filter(n=>n!=="ALL").reduce((n,a)=>{let l=o.some(d=>xi(d,a));return n+(l?1:0)},0),"getCountCategories");var $i=i("div",{display:"grid",gap:"$10",gridTemplateColumns:"auto 1fr 1fr 1fr 1fr"}),Gw=i("div",{display:"flex",position:"relative",alignItems:"center",justifyContent:"center",paddingTop:"$10"}),Xw=i("img",{position:"absolute",top:-2,width:15,height:15});function Z7(o){let{setCategory:t,category:r,isLoading:n,blockchains:a}=o,l=Object.keys(Lo);return N1.createElement($i,null,n&&Array.from(Array(5),(d,m)=>N1.createElement(H,{key:m,variant:"rounded",height:70,width:m===0?45:65})),!n&&l.map(d=>{let m=d!=="ALL"?yi[d]:null;return wi(a,d)&&N1.createElement(h2,{selected:r===d,key:d,onClick:()=>t(d)},m&&N1.createElement(N1.Fragment,null,N1.createElement(m,{size:28}),N1.createElement(f,{size:12})),N1.createElement(s,{size:"xsmall",variant:"body",color:d==="ALL"?"secondary500":void 0},A7.t({id:"{blockchainCategory}",values:{blockchainCategory:vi[d]}})))}))}e(Z7,"SelectableCategoryList");import g1 from"react";var z7=i("div",{position:"relative",width:"$28",height:"$28",variants:{direction:{vertical:{margin:"auto"},horizontal:{}}}}),F7=i("img",{width:"$28",height:"$28",borderRadius:"50%"}),N7=i("div",{position:"absolute",right:-4,bottom:-4,width:"$16",height:"$16",padding:"$2",borderRadius:"50%",backgroundColor:"$background",border:"1px solid $neutral400",img:{width:"100%",display:"block"}}),V7=i("div",{display:"flex",variants:{direction:{horizontal:{alignItems:"center"},vertical:{flexDirection:"column",textAlign:"center",justifyContent:"center"}},success:{true:{filter:"none"},false:{filter:"grayscale(100%)"}}}}),E7=i("div",{variants:{pl:{true:{paddingLeft:"$4","@lg":{paddingLeft:"$8"}},false:{paddingTop:"$8"}}}}),_7=i(s,{color:"$neutral800",display:"block",paddingLeft:"$8"});function _e(o){let{logo:t,chainLogo:r,amount:n,symbol:a,blockchain:l,estimatedAmount:d,success:m=!0,direction:C="horizontal"}=o;return g1.createElement(V7,{direction:C,success:m},g1.createElement(z7,{direction:C},g1.createElement(F7,{src:t,alt:a}),g1.createElement(N7,null,g1.createElement("img",{src:r,alt:l}))),g1.createElement(E7,{pl:C==="horizontal"},n&&g1.createElement(s,{noWrap:!0,variant:C==="vertical"?"body":"title",size:"medium"},n),!n&&d&&g1.createElement(s,{noWrap:!0,variant:C==="vertical"?"body":"title",size:"medium",color:"$neutral800"},d),"\xA0",g1.createElement(s,{variant:C==="vertical"?"body":"title",size:"medium",noWrap:!0},a),g1.createElement(_7,{noWrap:!0,variant:"body",size:"xsmall",color:"$neutral600"},"on ",l)))}e(_e,"StepDetail");import q7 from"react";var O7=i("div",{position:"relative",display:"flex",flexDirection:"column",width:"100%",borderRadius:"$xl",boxShadow:"15px 15px 15px 0px rgba(0, 0, 0, 0.05)",minWidth:"375px",maxWidth:"390px",boxSizing:"border-box",backgroundColor:"$neutral100",overflow:"hidden","& *":{boxSizing:"border-box",listStyleType:"none"}});function U7(o){let{children:t,style:r}=o;return q7.createElement(O7,{style:r,id:"swap-box"},t)}e(U7,"SwapContainer");import t1 from"react";import{i18n as U2}from"@lingui/core";function Si(o){switch(o){case"failed":return U2.t("Failed");case"success":return U2.t("Complete");default:return U2.t("In progress")}}e(Si,"getStatus");function bi(o,t){if(!o)return"";let r=new Date(Number(o)),n=12,a=10;if(!t){let x={year:"numeric",month:"long",day:"numeric"};return r.toLocaleDateString(void 0,x)}let l=r.getHours(),d=r.getMinutes(),m=l>=n?"pm":"am",C=l%n===0?n:l%n,h=d<a?`0${d}`:d;return`${C}:${h} ${m}`}e(bi,"formattedDateAndTime");var Li=i("div",{display:"flex",justifyContent:"space-between",alignItems:"flex-start",flexDirection:"column",gap:10}),j2=i("div",{display:"flex",padding:0,justifyContent:"space-between",alignItems:"center",alignSelf:"stretch"}),ki=i("button",{$$color:"$colors$neutral100",[`.${c} &`]:{$$color:"$colors$neutral300"},backgroundColor:"$$color",border:"none",width:"100%",borderRadius:"$xm",gap:10,padding:15,cursor:"pointer",fontFamily:"inherit","&:hover":{$$color:"$colors$info100",[`.${c} &`]:{$$color:"$colors$neutral100"},backgroundColor:"$$color"},"&:focus-visible":{$$color:"$colors$info100",[`.${c} &`]:{$$color:"$colors$info700"},backgroundColor:"$$color",outline:"none"}}),Ii=i("div",{display:"flex",padding:"$2",alignItems:"flex-start"}),Ti=i("div",{$$color:"$colors$neutral100",[`.${c} &`]:{$$color:"$colors$neutral300"},backgroundColor:"$$color",border:"none",width:"100%",borderRadius:"$xm",gap:10,padding:15}),Pi=i("div",{display:"flex",justifyContent:"space-between",alignItems:"flex-start",flexDirection:"column",gap:25});var Mi={failed:"error500",running:"info500",success:"success500"};import{i18n as j7}from"@lingui/core";import b from"react";var Y2=i("div",{display:"flex",padding:0,alignItems:"center",gap:10}),G2=i("div",{display:"flex",padding:0,alignItems:"center",alignSelf:"stretch"}),X2=i("div",{display:"flex",alignItems:"flex-start",variants:{direction:{column:{flexDirection:"column",flex:"1 0 0"},row:{padding:0}}}}),Di=i("div",{display:"flex",alignItems:"center",alignSelf:"stretch"}),ee=i("div",{display:"flex",padding:0,flexDirection:"column",justifyContent:"center",alignItems:"flex-start"}),J2=i("div",{display:"flex",padding:"$4",width:"$32",height:"$32",justifyContent:"center",alignItems:"center"}),Wi=i("div",{display:"flex",alignItems:"center",justifyContent:"center"}),Bi=i("div",{display:"flex",width:"$24",height:"$24",justifyContent:"center",alignItems:"center"}),M$=i("div",{display:"flex",padding:0,alignItems:"center",gap:25});function K2(o){if("isLoading"in o)return b.createElement(Y2,null,b.createElement(G2,null,b.createElement("div",null,b.createElement(J,{tokenImage:"",chainImage:"",size:"medium",loading:!0})),b.createElement("div",{style:{transform:"translateX(-5px)"}},b.createElement(J,{tokenImage:"",chainImage:"",size:"medium",loading:!0}))),b.createElement(Wi,null,b.createElement(ee,null,b.createElement(H,{variant:"text",size:"medium",width:76}),b.createElement(f,{size:8}),b.createElement(H,{variant:"text",size:"medium",width:60})),b.createElement(Bi,null,b.createElement(O1,{size:12,color:"gray"})),b.createElement(ee,null,b.createElement(H,{variant:"text",size:"medium",width:76}),b.createElement(f,{size:8}),b.createElement(H,{variant:"text",size:"medium",width:60}))));let{data:{from:{token:t,amount:r,blockchain:n,realAmount:a},to:{token:l,amount:d,blockchain:m,realAmount:C}},status:h,tooltipContainer:y}=o;return b.createElement(Y2,null,b.createElement(G2,null,b.createElement("div",null,b.createElement(J,{tokenImage:t.image,chainImage:n.image,size:"large"})),b.createElement("div",{style:{transform:"translateX(-10px)"}},b.createElement(J,{tokenImage:l.image,chainImage:m.image,size:"large"}))),h==="running"?b.createElement(X2,{direction:"column"},b.createElement(Di,null,b.createElement(s,{size:"medium",variant:"title"},t.displayName),b.createElement(J2,null,b.createElement(O1,{size:24,color:"black"})),b.createElement(s,{size:"medium",variant:"title"},l.displayName)),b.createElement(s,{size:"small",variant:"body",color:"neutral700"},j7.t("Waiting for bridge transaction"))):b.createElement(X2,{direction:"row"},b.createElement(ee,null,b.createElement(s,{size:"medium",variant:"title"},t.displayName),!!r&&b.createElement(z,{content:a,container:y},b.createElement(s,{size:"small",variant:"body",color:"neutral700"},r))),b.createElement(J2,null,b.createElement(O1,{size:24,color:"black"})),b.createElement(ee,null,b.createElement(s,{size:"medium",variant:"title"},l.displayName),b.createElement(z,{content:C,container:y},b.createElement(s,{size:"small",variant:"body",color:"neutral700"},d)))))}e(K2,"SwapToken");function Y7(o){if("isLoading"in o)return t1.createElement(Ti,null,t1.createElement(Pi,null,t1.createElement(j2,null,t1.createElement(H,{variant:"text",size:"medium",width:76}),t1.createElement(H,{variant:"text",size:"medium",width:76})),t1.createElement(K2,{isLoading:!0})));let{onClick:t,requestId:r,creationTime:n,onlyShowTime:a,status:l,swapTokenData:d,tooltipContainer:m}=o;return t1.createElement(ki,{onClick:t.bind(null,r)},t1.createElement(Li,null,t1.createElement(j2,null,t1.createElement(Ii,null,t1.createElement(s,{variant:"label",size:"medium",color:"neutral600"},bi(n,a))),t1.createElement(s,{variant:"label",size:"medium",color:Mi[l]},Si(l))),t1.createElement(K2,{data:d,status:l,tooltipContainer:m})))}e(Y7,"SwapListItem");import{i18n as Hi}from"@lingui/core";import te from"react";var G7=i("div",{height:"450px"}),X7=i("div",{display:"flex",justifyContent:"center",width:"100%",paddingTop:"33%",flex:1});function J7(o){let{requestId:t,loading:r,onBack:n}=o;return te.createElement(b1,{title:Hi.t("Swap Details"),textField:!1,onBack:n},te.createElement(G7,null,r?te.createElement(X7,null,te.createElement(Q,{size:24})):te.createElement(U,{type:"error",title:Hi.t({id:"Swap with request ID = {requestId} not found.",values:{requestId:t}})})))}e(J7,"SwapDetailsPlaceholder");import zi from"react";import*as qe from"@radix-ui/react-switch";var Ai=i(qe.Root,{boxSizing:"border-box",boxShadow:"none",width:"24px",height:"16px",$$color:"$colors$neutral600",[`.${c} &`]:{$$color:"$colors$neutral700"},backgroundColor:"$$color",border:"none",borderRadius:"99999px",padding:"0",cursor:"pointer",transition:"all 0.35s",overflow:"hidden",'&[data-state="checked"]':{$$color:"$colors$secondary500",[`.${c} &`]:{$$color:"$colors$secondary400"},backgroundColor:"$$color",borderColor:"$$color"},"-webkit-tap-highlight-color":"rgba(0, 0, 0, 0)"}),Zi=i(qe.Thumb,{boxSizing:"border-box",position:"relative",left:"$2",display:"block",width:"12px",height:"12px",backgroundColor:"$background",borderColor:"$secondary100",transition:" transform 300ms",borderRadius:"999999px",willChange:"transform","&:hover":{boxShadow:"rgba(0, 0, 0, 0.6) 0px 3px 8px","-moz-box-shadow":"rgba(0, 0, 0, 0.6) 0px 3px 8px","-webkit-box-shadow":"rgba(0, 0, 0, 0.6) 0px 3px 8px","-o-box-shadow":"rgba(0, 0, 0, 0.6) 0px 3px 8px"},'&[data-state="checked"]':{transform:"translateX(8px)"}});function K7(o){let{checked:t,onChange:r}=o;return zi.createElement(Ai,{checked:t,onCheckedChange:r},zi.createElement(Zi,null))}e(K7,"Switch");import c1,{useEffect as Xi,useState as Ji}from"react";function Fi(){let o=1;return()=>(o++,o)}e(Fi,"idGenerator");var Ni=500,V1=300,Vi=200,Ei=200;import ao,{createContext as Q7,useContext as R7,useMemo as oa,useState as ko}from"react";import{createPortal as ea}from"react-dom";var _i=A({transition:`transform ${Vi}ms ease-in-out`,"&:hover":{transform:"scale(0.99)"}}),qi=i("div",{transition:`transform ${V1}ms cubic-bezier(0, 0, 0.75, 1.25)`,cursor:"pointer",variants:{isActive:{true:{}},isVisible:{true:{}},position:{"right-top":{},"right-bottom":{},"left-top":{},"left-bottom":{},"center-top":{},"center-bottom":{}}},compoundVariants:[{position:"right-top",isActive:!0,isVisible:!0,css:{transform:"translateX(0)",maxHeight:"200px"}},{position:"right-top",isActive:!1,isVisible:!0,css:{maxHeight:"200px",transform:"translateX(100%)"}},{position:"right-top",isActive:!1,isVisible:!1,css:{maxHeight:"0px",transform:"translateX(100%)",transition:`max-height ${V1}ms ease-in-out`}},{position:"right-bottom",isActive:!0,isVisible:!0,css:{transform:"translateX(0)",maxHeight:"200px"}},{position:"right-bottom",isActive:!1,isVisible:!0,css:{transform:"translateX(100%)",maxHeight:"200px"}},{position:"right-bottom",isActive:!1,isVisible:!1,css:{transform:"translateX(100%)",maxHeight:"0px",transition:`max-height ${V1}ms ease-in-out`}},{position:"left-top",isActive:!0,isVisible:!0,css:{transform:"translateX(0)",maxHeight:"200px"}},{position:"left-top",isActive:!1,isVisible:!0,css:{transform:"translateX(-100%)",maxHeight:"200px"}},{position:"left-top",isActive:!1,isVisible:!1,css:{transform:"translateX(-100%)",maxHeight:"0px",transition:`max-height ${V1}ms ease-in-out`}},{position:"left-bottom",isActive:!0,isVisible:!0,css:{transform:"translateX(0)",maxHeight:"200px"}},{position:"left-bottom",isActive:!1,isVisible:!0,css:{transform:"translateX(-100%)",maxHeight:"200px"}},{position:"left-bottom",isActive:!1,isVisible:!1,css:{transform:"translateX(-100%)",maxHeight:"0px",transition:`max-height ${V1}ms ease-in-out`}},{position:"center-top",isActive:!0,isVisible:!0,css:{maxHeight:"200px",transform:"translateY(0)",opacity:1}},{position:"center-top",isActive:!1,isVisible:!0,css:{maxHeight:"200px",transform:"translateY(-1000%)",opacity:0}},{position:"center-top",isActive:!1,isVisible:!1,css:{maxHeight:"0px",opacity:0,transform:"translateY(-1000%)",transition:`max-height ${V1}ms ease-in-out`}},{position:"center-bottom",isActive:!0,isVisible:!0,css:{transform:"translateY(0)",maxHeight:"200px",opacity:1}},{position:"center-bottom",isActive:!1,isVisible:!0,css:{transform:"translateY(1000%)",maxHeight:"200px",opacity:0}},{position:"center-bottom",isActive:!1,isVisible:!1,css:{transform:"translateY(1000%)",maxHeight:"0px",opacity:0,transition:`max-height ${V1}ms ease-in-out`}}]}),Oi=i("div",{overflow:"hidden",position:"absolute",zIndex:9999,display:"flex",gap:"$4",flexDirection:"column",variants:{position:{"right-top":{right:12,top:2},"right-bottom":{right:12,bottom:2,flexDirection:"column-reverse"},"left-top":{left:12,top:2},"left-bottom":{left:12,bottom:2,flexDirection:"column-reverse"},"center-top":{left:"50%",transform:"translateX(-50%)",top:2},"center-bottom":{left:"50%",transform:"translateX(-50%)",bottom:2,flexDirection:"column-reverse"}}}}),Ui=i("div",{display:"flex",borderRadius:"$sm",width:"292px",minHeight:"52px",variants:{variant:{custom:{backgroundColor:"$background",borderRight:"1px solid","&:hover":{backgroundColor:"$info100",[`.${c} &`]:{backgroundColor:"$neutral300"}}},standard:{"& ._alert":{padding:"$10",width:"100%",justifyContent:"center",alignItems:"center"}}},type:{error:{},success:{},warning:{},info:{},loading:{}}},compoundVariants:[{variant:"custom",type:"error",css:{borderRightColor:"$error500"}},{variant:"custom",type:"success",css:{borderRightColor:"$success500"}},{variant:"custom",type:"warning",css:{borderRightColor:"$warning500"}},{variant:"custom",type:"info",css:{borderRightColor:"$info500"}},{variant:"custom",type:"loading",css:{borderRightColor:"$info500"}}]}),ji=i("div",{display:"flex",padding:"$10",alignItems:"center"}),Yi=i(s,{variants:{hasColor:{false:{[`.${It} &`]:{color:"$neutral700"},[`.${c} &`]:{color:"$neutral900"}}}}}),wS=i("div",{display:"flex",alignItems:"center"});var Gi=Q7(void 0),Io=e((o,t)=>ao.createElement(ao.Fragment,null,o.length>0&&ao.createElement(Oi,{style:o[0].containerStyle,position:t},o.map(r=>ao.createElement(R2,{...r,key:r.id})))),"renderToastContainer"),ta=e(o=>{let t=oa(()=>Fi(),[]),{children:r,container:n}=o,[a,l]=ko([]),[d,m]=ko([]),[C,h]=ko([]),[y,x]=ko([]),[$,N]=ko([]),[F,S]=ko([]),B=e(Z=>{switch(Z){case"right-top":return h;case"right-bottom":return x;case"left-top":return l;case"left-bottom":return m;case"center-top":return N;default:return S}},"getToastSetter"),X=e(Z=>{e(()=>B(Z.position),"addToasts")()(m1=>m1.find(Ao=>Ao.id===Z.id)?(console.warn("Trying to send a toast with an existing ID. Please update the toast ID or use it after the toast is hidden"),m1):[...m1,{...Z,id:Z.id||t()}])},"handleAddToast"),I1=e((Z,v1)=>{e(()=>B(v1),"removeFromToasts")()(pe=>pe.filter(Ao=>Ao.id!==Z))},"handleRemoveToast"),T1={addToast:Z=>X(Z),removeToast:(Z,v1)=>I1(Z,v1)};return ao.createElement(Gi.Provider,{value:T1},r,n&&ea(ao.createElement(ao.Fragment,null,Io(C,"right-top"),Io(a,"left-top"),Io($,"center-top"),Io(y,"right-bottom"),Io(d,"left-bottom"),Io(F,"center-bottom")),n))},"ToastProvider");function Q2(){let o=R7(Gi);if(!o)throw new Error("useToast can only be used within the ToastProvider component");return o}e(Q2,"useToast");var R2=e(o=>{let{id:t,autoHideDuration:r,onClose:n,type:a,title:l,position:d,hasCloseIcon:m=!0,hideOnTap:C=!0,variant:h="standard"}=o,[y,x]=Ji(!1),[$,N]=Ji(!1),{removeToast:F}=Q2();Xi(()=>{let B;if(r){let X=setTimeout(()=>{S()},r);B=e(()=>clearTimeout(X),"cleanup")}return B},[t]);let S=e(()=>{x(!1),setTimeout(()=>{N(!1)},Ei),setTimeout(()=>{F(t,d),n?.()},Ni)},"handleClose");return Xi(()=>{N(!0),setTimeout(()=>{x(!0)},0)},[]),c1.createElement(qi,{isActive:y,position:d,isVisible:$},c1.createElement("div",{className:_i()},c1.createElement(Ui,{onClick:C?S:void 0,variant:h,type:a},h==="custom"?c1.createElement(ji,null,c1.createElement(ce,{type:a,align:"center"},c1.createElement(ve,{type:a})),c1.createElement(f,{direction:"horizontal",size:10}),c1.createElement(Yi,{variant:"body",size:"small",align:"left"},o.title)):c1.createElement(U,{title:l,type:a,variant:"alarm",titleAlign:"left",action:m?c1.createElement(s1,{variant:"ghost",size:"xsmall",onClick:S},c1.createElement(E1,{size:12})):void 0}))))},"Toast");import Qi,{useEffect as Ri,useState as et}from"react";import{GroupedVirtuoso as ra,Virtuoso as ot}from"react-virtuoso";import f1 from"react";var ia=i("div",{paddingRight:"$16"}),na=i("div",{display:"flex",flexDirection:"column"}),aa=i("div",{display:"flex",flexDirection:"column",alignItems:"flex-end"});function Ki(o){let{token:t,style:r,onClick:n,selected:a}=o;return f1.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",...r,height:"48px",top:`${parseFloat(r?.top)+0}px`,padding:"0 4px"}},f1.createElement(T,{variant:"outlined",size:"large",onClick:n.bind(null,t),type:a?"primary":void 0,prefix:f1.createElement(ia,null,f1.createElement(M,{src:t.image,size:32})),suffix:t.balance?.amount&&f1.createElement(aa,null,f1.createElement(s,{variant:"body",size:"small"},t.balance.amount),f1.createElement(s,{variant:"body",size:"xsmall"},`${t.balance.usdValue}$`))},f1.createElement(na,null,f1.createElement(s,{variant:"body",size:"medium"},t.symbol),f1.createElement(s,{variant:"body",size:"xsmall",color:"neutral800"},t.name))))}e(Ki,"TokenItem");var on=20;function tt(o){let{list:t,searchedText:r,onChange:n,multiSelect:a,selectedList:l}=o,[d,m]=et(o.selected),C=e(S=>{m(S),n(S)},"changeSelected"),h=e(S=>a&&l?l.map(B=>B.symbol+B.address).indexOf(S.symbol+S.address)>-1:d?.symbol===S.symbol&&d?.address===S.address,"isSelected"),[y,x]=et(!0),[$,N]=et(t),F=e(()=>{N(t.slice(0,$.length+on))},"loadNextPage");return Ri(()=>{N(t.slice(0,on))},[r,t]),Ri(()=>{x(t.length>$.length)},[$.length]),Qi.createElement(ot,{itemContent:S=>Qi.createElement(Ki,{token:$[S],onClick:C,selected:h($[S])}),totalCount:$.length,endReached:y?F:void 0})}e(tt,"TokenList");import{i18n as en}from"@lingui/core";import E from"react";var la=i("div",{display:"flex",flexDirection:"column",width:"100%",overflow:"hidden"}),sa=i("div",{boxSizing:"border-box",borderRadius:"$xs",padding:"$8 $16 $16 $16",variants:{type:{filled:{backgroundColor:"$background"},outlined:{border:"1px solid $background"}}},defaultVariants:{type:"filled"},".head":{display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:"32px",".usd-value":{paddingLeft:"$8"}},".form":{display:"flex",width:"100%",padding:"$2 0",".selectors":{width:"35%","._text":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},".amount":{width:"30%"}}}),tn=i("span",{width:"24px",height:"24px",backgroundColor:"$background",borderRadius:"99999px"}),pa=i("div",{windth:"100%",height:"$48",borderRadius:"$xs",backgroundColor:"$surface",border:"1px solid transparent",position:"relative",display:"flex",alignItems:"center",paddingLeft:"$8",paddingRight:"$8"});function ca(o){let{chain:t,token:r,loadingStatus:n,percentageChange:a}=o,l=E.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"}},n==="failed"&&E.createElement(A1,{color:"error",size:24}));return E.createElement(la,null,E.createElement(sa,{type:"outlined"},E.createElement("div",{className:"head"},E.createElement(s,{variant:"body",size:"small",color:"neutral600"},o.label),E.createElement("div",null,a,o.usdValue&&E.createElement(s,{variant:"body",size:"xsmall",color:"neutral800",className:"usd-value"},`$${o.usdValue}`))),E.createElement("div",{className:"form"},E.createElement(T,{className:"selectors",variant:"outlined",loading:n==="loading",prefix:n==="success"&&t?E.createElement(M,{src:t.logo,size:24}):E.createElement(tn,null),suffix:l,size:"large"},n==="success"&&t?t.displayName:en.t("Chain")),E.createElement(f,{size:12,direction:"horizontal"}),E.createElement(T,{className:"selectors",variant:"outlined",loading:n==="loading",prefix:n==="success"&&r?E.createElement(M,{src:r.image,size:24}):E.createElement(tn,null),suffix:l,size:"large"},n==="success"&&r?r.symbol:en.t("Token")),E.createElement(f,{size:12,direction:"horizontal"}),E.createElement("div",{className:"amount"},E.createElement(pa,null,E.createElement(s,{variant:"title",size:"medium"},o.amount))))))}e(ca,"TokenPreview");import{detectInstallLink as da}from"@rango-dev/wallets-shared";import r1,{Fragment as ma}from"react";import{i18n as L1}from"@lingui/core";var re=(a=>(a.NOT_INSTALLED="not_installed",a.DISCONNECTED="disconnected",a.CONNECTING="connecting",a.CONNECTED="connected",a))(re||{});function Oe(o){switch(o){case"connected":return{color:"success500",description:L1.t("Connected"),tooltipText:L1.t("Disconnect")};case"not_installed":return{color:"info500",description:L1.t("Install"),tooltipText:L1.t("Install")};case"connecting":return{color:"neutral600",description:L1.t("Connecting..."),tooltipText:L1.t("Connecting")};case"disconnected":return{color:"neutral600",description:L1.t("Disconnected"),tooltipText:L1.t("Connect")};default:throw new Error(L1.t("you need to pass a correct state to Wallet."))}}e(Oe,"makeInfo");var Ue=i("div",{"& img":{borderRadius:"50%"}}),je=i(s,{textTransform:"capitalize"}),Ye=i("div",{display:"flex",flexDirection:"column",marginTop:"$10"}),Ge=i("button",{borderRadius:"$xm",padding:"$10",border:"0",display:"flex",flexDirection:"column",$$color:"$colors$neutral100",[`.${c} &`]:{$$color:"$colors$neutral300"},backgroundColor:"$$color",alignItems:"center",cursor:"pointer",width:100,position:"relative",fontFamily:"inherit","&:hover":{$$color:"$colors$info100",[`.${c} &`]:{$$color:"$colors$neutral100"},backgroundColor:"$$color"},"&:focus-visible":{$$color:"$colors$info100",[`.${c} &`]:{$$color:"$colors$info700"},backgroundColor:"$$color",outline:0},"&:disabled":{filter:"grayscale(1)",pointerEvents:"none"},variants:{selected:{true:{outlineWidth:1,$$outline:"$colors$secondary500",[`.${c} &`]:{$$outline:"$colors$secondary400"},outlineColor:"$$outline",outlineStyle:"solid"}}}}),rn=i("div",{borderRadius:"$xm",padding:"$10 0",border:"0",display:"flex",flexDirection:"column",backgroundColor:"$neutral100",alignItems:"center",justifyContent:"center",width:100});function ua(o){let{title:t,type:r,image:n,onClick:a,isLoading:l,disabled:d=!1}=o,m=Oe(o.state);return l?r1.createElement(rn,null,r1.createElement(H,{variant:"circular",width:35,height:35}),r1.createElement(f,{size:12}),r1.createElement(H,{variant:"text",width:85,size:"medium"}),r1.createElement(f,{size:4}),r1.createElement(H,{variant:"text",width:64,size:"medium"})):r1.createElement(d?ma:z,{container:o.container,content:m.tooltipText,side:"top"},r1.createElement(Ge,{disabled:o.state=="connecting"||d,onClick:()=>{o.state==="not_installed"?window.open(da(o.link),"_blank"):a(r)}},r1.createElement(Ue,null,r1.createElement(M,{src:n,size:35})),r1.createElement(Ye,null,r1.createElement(je,{variant:"label",size:"medium",noWrap:!1},t),r1.createElement(s,{variant:"body",size:"xsmall",noWrap:!1,color:m.color},m.description))))}e(ua,"Wallet");var rt=ua;import{detectInstallLink as Ca}from"@rango-dev/wallets-shared";import To from"react";function ha(o){let{title:t,type:r,image:n,onClick:a,selected:l,description:d,state:m,disabled:C=!1}=o,h=Oe(o.state);return To.createElement(Ge,{selected:l,disabled:o.state=="connecting"||C,onClick:()=>{o.state==="not_installed"?window.open(Ca(o.link),"_blank"):a(r)}},To.createElement(Ue,null,To.createElement(M,{src:n,size:35})),To.createElement(Ye,null,To.createElement(je,{variant:"label",size:"medium",noWrap:!1},t),To.createElement(s,{variant:"body",size:"xsmall",noWrap:!1,color:m==="connected"?"neutral700":h.color},d||h.description)))}e(ha,"SelectableWallet");import ln from"react";import Po from"react";var nn=i("li",{width:"100%",overflow:"hidden",borderRadius:"$xs",display:"flex",alignItems:"center",padding:"$10 $5",border:0,backgroundColor:"transparent",".item-start-container":{paddingRight:"$10",flexShrink:0,"& svg":{display:"block"}},".item-text-container":{flexGrow:1,flexShrink:1,flexBasis:"auto",textAlign:"left","._description":{$$color:"$colors$neutral600",[`.${c} &`]:{$$color:"$colors$neutral700"},color:"$$color"},".item-text-title":{fontWeight:"bold",display:"flex",alignItems:"center"}},".item-end-container":{display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"$10",overflow:"hidden"},variants:{hasDivider:{true:{borderBottom:"1px solid",$$color:"$colors$neutral300",[`.${c} &`]:{$$color:"$colors$neutral400"},borderColor:"$$color",borderBottomRightRadius:0,borderBottomLeftRadius:0}}}});function ie(o){let{start:t,title:r,description:n,end:a,onClick:l,hasDivider:d,...m}=o;return Po.createElement(nn,{hasDivider:d,onClick:l,...m},t&&Po.createElement("div",{className:"item-start-container"},t),Po.createElement("div",{className:"item-text-container"},r&&Po.createElement("div",{className:"item-text-title"},r),n&&Po.createElement(s,{variant:"body",className:"_description",size:"small"},n)),a&&Po.createElement("div",{className:"item-end-container"},a))}e(ie,"ListItem");var an=i("button",{transition:"all 0.35s",border:0,width:"100%",backgroundColor:"transparent",fontFamily:"inherit",padding:"unset","&:focus-visible":{borderRadius:"$xs",outline:0,$$color:"$colors$info100",[`.${c} &`]:{$$color:"$colors$info700"},backgroundColor:"$$color"},"&:hover":{$$color:"$colors$info100",borderRadius:"$xs",[`.${c} &`]:{$$color:"$colors$neutral100"},backgroundColor:"$$color",cursor:"pointer"},"&:active":{transform:"scale(0.99)"},variants:{hasDivider:{true:{borderBottom:"1px solid",$$color:"$colors$neutral300",[`.${c} &`]:{$$color:"$colors$neutral400"},borderColor:"$$color",borderBottomRightRadius:0,borderBottomLeftRadius:0}},selected:{true:{outline:"1px solid $secondary500"},false:{outline:0}}}});function ga(o){let{onClick:t,id:r,style:n,hasDivider:a,selected:l,...d}=o;return ln.createElement(an,{hasDivider:a,selected:l,onClick:e(()=>{t&&t(r)},"onClickWithKey"),style:n},ln.createElement(ie,{...d}))}e(ga,"ListItemButton");import it from"react";var sn=i("ul",{padding:0,margin:0,listStyle:"none"});function fa(o){let t=o.type;return it.createElement(sn,{as:o.as},o.items.map(r=>{let{id:n,...a}=r;return t?it.cloneElement(t,{...a,key:n,id:n}):it.createElement(ie,{key:n,...a})}))}e(fa,"List");import ne from"react";var pn=i("div",{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",textAlign:"center"});function ya(o){return ne.createElement(pn,null,ne.createElement(d2,{color:"secondary",size:26}),ne.createElement(f,{size:4}),ne.createElement(s,{variant:"title",size:"medium"},o.title),ne.createElement(s,{variant:"body",size:"medium",color:"neutral700"},o.description))}e(ya,"NotFound");import i1 from"react";var cn=i("div",{display:"flex",justifyContent:"space-between",variants:{direction:{vertical:{flexDirection:"column",alignItems:"start"},horizontal:{flexDirection:"row",width:"100%",alignItems:"end"}},centerAlign:{true:{alignItems:"center",justifyContent:"center"}}}}),dn=A({display:"flex",justifyContent:"center",alignItems:"center"}),mn=A({display:"flex",paddingTop:"$5"});function va(o){return i1.createElement(cn,{direction:o.direction,centerAlign:o.centerAlign},i1.createElement("div",{className:dn()},i1.createElement(J,{chainImage:o.chain.image,tokenImage:o.token.image,size:"medium"}),i1.createElement("div",null,o.label&&i1.createElement(s,{ml:4,size:"xsmall",variant:"body",color:"$neutral700"},o.label),i1.createElement("div",null,i1.createElement(z,{content:o.price.realValue,open:o.price.realValue?void 0:!1,container:o.tooltipContainer},i1.createElement(s,{ml:4,size:"medium",variant:"title",style:{fontWeight:600}},o.price.value),i1.createElement(s,{ml:8,size:"medium",variant:"title",style:{fontWeight:400}},o.token.displayName))))),o.price.usdValue&&o.price.usdValue!=="0"&&i1.createElement("div",{className:mn()},i1.createElement(z,{content:o.price.realUsdValue,container:o.tooltipContainer},o.type==="input"&&i1.createElement(s,{mr:4,size:"small",variant:"body",color:"$neutral700"},`~$${o.price.usdValue}`)),o.type==="output"&&i1.createElement(Q1,{size:"small",tooltipProps:{container:o.tooltipContainer,side:"top"},outputUsdValue:o.price.usdValue,percentageChange:o.percentageChange,warningLevel:o.warningLevel,realOutputUsdValue:o.price.realUsdValue})))}e(va,"TokenAmount");import{i18n as lt}from"@lingui/core";import D,{forwardRef as xa,Fragment as wa,memo as $a,useEffect as Sa,useRef as ba}from"react";import{css as ae}from"@stitches/react";var un=i("div",{width:"100%",position:"relative",padding:"0 0.5rem",boxSizing:"border-box",border:"1px solid transparent",variants:{type:{"quote-details":{border:"none"},"swap-progress":{backgroundColor:"$neutral100",$$color:"$colors$neutral100",[`.${c} &`]:{$$color:"$colors$neutral300"},borderRadius:"$xm",padding:"$10 $15",marginBottom:"15px"}},state:{default:{borderColor:"transparent"},"in-progress":{borderColor:"$info500"},completed:{borderColor:"$success500"},warning:{borderColor:"$warning500"},error:{borderColor:"$error500"}}}}),nt=i("div",{borderRadius:"100%",width:"24px",height:"24px",overflow:"hidden",border:"1.5px solid transparent",variants:{state:{default:{borderColor:"transparent"},"in-progress":{borderColor:"$info500"},completed:{borderColor:"$success500"},warning:{borderColor:"$warning500"},error:{borderColor:"$error500"}}}}),Cn=i("div",{width:"100%",variants:{pb:{true:{paddingBottom:"35px"}}}}),hn=i("div",{borderLeft:"1px dashed black",minHeight:"64px",margin:"0 11.5px",alignSelf:"stretch",variants:{invisible:{true:{visibility:"hidden",minHeight:"unset"}}}}),gn=i("div",{borderLeft:"1px solid transparent",margin:"0 $12",display:"block",height:"8px",variants:{state:{default:{borderColor:"transparent"},"in-progress":{borderColor:"$info500"},completed:{borderColor:"$success500"},warning:{borderColor:"$warning500"},error:{borderColor:"$error500"}}}}),fn=i("div",{borderLeft:"1px dashed transparent",margin:"0 $10",alignSelf:"stretch",display:"block",height:"15px",position:"absolute",top:"-16px",left:"16px",variants:{state:{default:{borderColor:"transparent"},"in-progress":{borderColor:"$info500"},completed:{borderColor:"$success500"},warning:{borderColor:"$warning500"},error:{borderColor:"$error500"}}}}),yn=ae({width:"100%"}),vn=ae({display:"flex",flexDirection:"column",justifyContent:"center"}),at=ae({display:"flex",alignItems:"center"}),xn=ae({display:"flex",flex:"1",width:"100%",alignItems:"start",variants:{tx:{true:{paddingLeft:"36px"}}}}),wn=ae({display:"flex",paddingTop:"$5",paddingBottom:"$10",alignItems:"center"});var $n=xa((o,t)=>{let{step:r,hasSeparator:n,type:a,state:l,isFocused:d,tabIndex:m,tooltipContainer:C}=o,{from:h,to:y,swapper:x}=r,$=ba(null),N=l==="completed"||l==="error",F=r.internalSwaps?.length?r.internalSwaps:[{from:{blockchain:h.chain.displayName},to:{blockchain:y.chain.displayName},swapper:x}];return Sa(()=>{let S=t?.current,B=$.current;d&&B&&S&&(S.scrollTop=B.offsetTop-S.offsetTop)},[d]),D.createElement(un,{type:a,state:l,ref:$,tabIndex:m},a==="quote-details"&&D.createElement("div",{className:at()},D.createElement(nt,{state:l},D.createElement(M,{size:22,src:r.swapper.image})),D.createElement(s,{ml:8,size:"medium",variant:"label"},lt.t({id:"Swap on {fromChain} via {swapper}",values:{fromChain:r.from.chain.displayName,swapper:r.swapper.displayName}}))),a==="swap-progress"&&D.createElement("div",{className:vn()},n&&D.createElement(fn,{state:l}),F.map((S,B)=>{let X=`${S.swapper.displayName}-${B}`;return D.createElement(wa,{key:X},D.createElement("div",{id:S.swapper.displayName,className:at()},D.createElement(nt,{state:l},D.createElement(M,{size:22,src:S.swapper.image})),D.createElement(s,{ml:8,size:"medium",variant:"label"},S?.swapper.type==="DEX"?lt.t({id:"Swap on {fromChain} via {swapper}",values:{fromChain:S.from.blockchain,swapper:S.swapper.displayName}}):lt.t({id:"Bridge to {toChain} via {swapper}",values:{toChain:S.to.blockchain,swapper:S.swapper.displayName}}))),B!==F.length-1&&D.createElement(gn,{state:l}))})),D.createElement("div",{className:xn()},D.createElement(hn,{invisible:!n||a==="swap-progress"}),D.createElement("div",{className:yn()},D.createElement("div",{className:wn()},D.createElement(J,{chainImage:r.from.chain.image,tokenImage:r.from.token.image,size:"small"}),D.createElement(z,{content:r.from.price.realValue,container:C},D.createElement(s,{ml:4,mr:4,size:"small",color:"$neutral700",variant:"body"},`${r.from.price.value} ${r.from.token.displayName}`)),D.createElement(O1,{color:"gray"}),D.createElement(f,{size:4,direction:"horizontal"}),D.createElement(J,{chainImage:r.to.chain.image,tokenImage:r.to.token.image,size:"small"}),D.createElement(z,{content:r.to.price.realValue,container:C},D.createElement(s,{ml:4,size:"small",color:"$neutral700",variant:"body"},`${N?"":"~"}${r.to.price.value} ${r.to.token.displayName}`))),D.createElement(Cn,{pb:n&&a==="quote-details"},r.alerts))))});$n.displayName="StepDetailsComponent";var La=$a($n);import*as Mo from"@radix-ui/react-popover";import lo from"react";import*as Xe from"@radix-ui/react-popover";var Sn=i(Xe.Content,{borderRadius:"$sm",filter:"drop-shadow(0px 5px 20px rgba(130, 130, 130, 0.20))",backgroundColor:"$neutral100"}),bn=i(Xe.Arrow,{fill:"$neutral100",width:"$16",height:"$8"});var ka=0,Ia=0,Ta=e((o,t)=>{let{container:r,children:n,styles:a,...l}=o;return lo.createElement(Mo.Portal,{container:r},lo.createElement(Sn,{...l,ref:t},n,lo.createElement(bn,{css:a?.arrowStyles})))},"PopoverContentComponent"),Ln=lo.forwardRef(Ta);Ln.displayName="PopoverContent";function Pa(o){let{children:t,content:r,side:n="bottom",sideOffset:a=ka,alignOffset:l=Ia,align:d="center",collisionBoundary:m=[],collisionPadding:C=0,container:h=document.body,...y}=o;return lo.createElement(Mo.Root,null,lo.createElement(Mo.Trigger,{asChild:!0},t),lo.createElement(Ln,{align:d,alignOffset:l,collisionBoundary:m,collisionPadding:C,side:n,sideOffset:a,container:h,...y},r))}e(Pa,"Popover");import so from"react";var y1="1em";function kn(o){let{size:t=y1}=o;return so.createElement("svg",{width:t,height:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},so.createElement("mask",{id:"a"},so.createElement("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})),so.createElement("g",{mask:"url(#a)"},so.createElement("path",{fill:"#eee",d:"m0 0 8 22-8 23v23l32 54-32 54v32l32 48-32 48v32l32 54-32 54v68l22-8 23 8h23l54-32 54 32h32l48-32 48 32h32l54-32 54 32h68l-8-22 8-23v-23l-32-54 32-54v-32l-32-48 32-48v-32l-32-54 32-54V0l-22 8-23-8h-23l-54 32-54-32h-32l-48 32-48-32h-32l-54 32L68 0H0z"}),so.createElement("path",{fill:"#0052b4",d:"M336 0v108L444 0Zm176 68L404 176h108zM0 176h108L0 68ZM68 0l108 108V0Zm108 512V404L68 512ZM0 444l108-108H0Zm512-108H404l108 108Zm-68 176L336 404v108z"}),so.createElement("path",{fill:"#d80027",d:"M0 0v45l131 131h45L0 0zm208 0v208H0v96h208v208h96V304h208v-96H304V0h-96zm259 0L336 131v45L512 0h-45zM176 336 0 512h45l131-131v-45zm160 0 176 176v-45L381 336h-45z"})))}e(kn,"English");import po from"react";function In(o){let{size:t=y1}=o;return po.createElement("svg",{width:t,height:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},po.createElement("mask",{id:"a"},po.createElement("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})),po.createElement("g",{mask:"url(#a)"},po.createElement("path",{fill:"#eee",d:"M167 0h178l25.9 252.3L345 512H167l-29.8-253.4z"}),po.createElement("path",{fill:"#0052b4",d:"M0 0h167v512H0z"}),po.createElement("path",{fill:"#d80027",d:"M345 0h167v512H345z"})))}e(In,"French");import Do from"react";function Tn(o){let{size:t=y1}=o;return Do.createElement("svg",{width:t,height:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Do.createElement("mask",{id:"a"},Do.createElement("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})),Do.createElement("g",{mask:"url(#a)"},Do.createElement("path",{fill:"#eee",d:"M0 0h512v512H0z"}),Do.createElement("circle",{cx:"256",cy:"256",r:"111.3",fill:"#d80027"})))}e(Tn,"Japanese");import k1 from"react";function Pn(o){let{size:t=y1}=o;return k1.createElement("svg",{width:t,height:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},k1.createElement("mask",{id:"a"},k1.createElement("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})),k1.createElement("g",{mask:"url(#a)"},k1.createElement("path",{fill:"#6da544",d:"M0 512h167l37.9-260.3L167 0H0z"}),k1.createElement("path",{fill:"#d80027",d:"M512 0H167v512h345z"}),k1.createElement("circle",{cx:"167",cy:"256",r:"89",fill:"#ffda44"}),k1.createElement("path",{fill:"#d80027",d:"M116.9 211.5V267a50 50 0 1 0 100.1 0v-55.6H117z"}),k1.createElement("path",{fill:"#eee",d:"M167 283.8c-9.2 0-16.7-7.5-16.7-16.7V245h33.4v22c0 9.2-7.5 16.7-16.7 16.7z"})))}e(Pn,"Portuguese");import L from"react";function Mn(o){let{size:t=y1}=o;return L.createElement("svg",{width:t,height:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},L.createElement("mask",{id:"a"},L.createElement("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})),L.createElement("g",{mask:"url(#a)"},L.createElement("path",{fill:"#ffda44",d:"m0 128 256-32 256 32v256l-256 32L0 384Z"}),L.createElement("path",{fill:"#d80027",d:"M0 0h512v128H0zm0 384h512v128H0z"}),L.createElement("g",{fill:"#eee"},L.createElement("path",{d:"M144 304h-16v-80h16zm128 0h16v-80h-16z"}),L.createElement("ellipse",{cx:"208",cy:"296",rx:"48",ry:"32"})),L.createElement("g",{fill:"#d80027"},L.createElement("rect",{width:"16",height:"24",x:"128",y:"192",rx:"8"}),L.createElement("rect",{width:"16",height:"24",x:"272",y:"192",rx:"8"}),L.createElement("path",{d:"M208 272v24a24 24 0 0 0 24 24 24 24 0 0 0 24-24v-24h-24z"})),L.createElement("rect",{width:"32",height:"16",x:"120",y:"208",fill:"#ff9811",ry:"8"}),L.createElement("rect",{width:"32",height:"16",x:"264",y:"208",fill:"#ff9811",ry:"8"}),L.createElement("rect",{width:"32",height:"16",x:"120",y:"304",fill:"#ff9811",rx:"8"}),L.createElement("rect",{width:"32",height:"16",x:"264",y:"304",fill:"#ff9811",rx:"8"}),L.createElement("path",{fill:"#ff9811",d:"M160 272v24c0 8 4 14 9 19l5-6 5 10a21 21 0 0 0 10 0l5-10 5 6c6-5 9-11 9-19v-24h-9l-5 8-5-8h-10l-5 8-5-8z"}),L.createElement("path",{d:"M122 252h172m-172 24h28m116 0h28"}),L.createElement("path",{fill:"#d80027",d:"M122 248a4 4 0 0 0-4 4 4 4 0 0 0 4 4h172a4 4 0 0 0 4-4 4 4 0 0 0-4-4zm0 24a4 4 0 0 0-4 4 4 4 0 0 0 4 4h28a4 4 0 0 0 4-4 4 4 0 0 0-4-4zm144 0a4 4 0 0 0-4 4 4 4 0 0 0 4 4h28a4 4 0 0 0 4-4 4 4 0 0 0-4-4z"}),L.createElement("path",{fill:"#eee",d:"M196 168c-7 0-13 5-15 11l-5-1c-9 0-16 7-16 16s7 16 16 16c7 0 13-4 15-11a16 16 0 0 0 17-4 16 16 0 0 0 17 4 16 16 0 1 0 10-20 16 16 0 0 0-27-5c-3-4-7-6-12-6zm0 8c5 0 8 4 8 8 0 5-3 8-8 8-4 0-8-3-8-8 0-4 4-8 8-8zm24 0c5 0 8 4 8 8 0 5-3 8-8 8-4 0-8-3-8-8 0-4 4-8 8-8zm-44 10 4 1 4 8c0 4-4 7-8 7s-8-3-8-8c0-4 4-8 8-8zm64 0c5 0 8 4 8 8 0 5-3 8-8 8-4 0-8-3-8-7l4-8z"}),L.createElement("path",{fill:"none",d:"M220 284v12c0 7 5 12 12 12s12-5 12-12v-12z"}),L.createElement("path",{fill:"#ff9811",d:"M200 160h16v32h-16z"}),L.createElement("path",{fill:"#eee",d:"M208 224h48v48h-48z"}),L.createElement("path",{fill:"#d80027",d:"m248 208-8 8h-64l-8-8c0-13 18-24 40-24s40 11 40 24zm-88 16h48v48h-48z"}),L.createElement("rect",{width:"20",height:"32",x:"222",y:"232",fill:"#d80027",rx:"10",ry:"10"}),L.createElement("path",{fill:"#ff9811",d:"M168 232v8h8v16h-8v8h32v-8h-8v-16h8v-8zm8-16h64v8h-64z"}),L.createElement("g",{fill:"#ffda44"},L.createElement("circle",{cx:"186",cy:"202",r:"6"}),L.createElement("circle",{cx:"208",cy:"202",r:"6"}),L.createElement("circle",{cx:"230",cy:"202",r:"6"})),L.createElement("path",{fill:"#d80027",d:"M169 272v43a24 24 0 0 0 10 4v-47h-10zm20 0v47a24 24 0 0 0 10-4v-43h-10z"}),L.createElement("g",{fill:"#338af3"},L.createElement("circle",{cx:"208",cy:"272",r:"16"}),L.createElement("rect",{width:"32",height:"16",x:"264",y:"320",ry:"8"}),L.createElement("rect",{width:"32",height:"16",x:"120",y:"320",ry:"8"}))))}e(Mn,"Spanish");import*as Y from"@radix-ui/react-select";import j,{useEffect as Da,useRef as Wa,useState as Ba}from"react";import*as Wo from"@radix-ui/react-select";var Ma=300,Dn=i(Wo.Trigger,{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",backgroundColor:"$secondary",padding:"$5 $10",border:0,whiteSpace:"nowrap","& svg":{transition:`all ${Ma}ms ease`},variants:{open:{true:{borderTopLeftRadius:"$sm",borderTopRightRadius:"$sm","& ._typography, & svg":{color:"$secondary"},"& svg":{transform:"rotate(180deg)"},backgroundColor:"$neutral100",[`.${c} &`]:{backgroundColor:"$neutral300"}},false:{borderRadius:"$md","& ._typography, & svg":{color:"$background",[`.${c} &`]:{color:"$foreground"}},"& svg":{transform:"rotate(0)"}}}},width:"100%","& ._typography":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",width:"52px","@xs":{width:"auto"}}}),Wn=i(Wo.Content,{padding:"$5 $10",width:"100%",position:"absolute",top:"38px",maxHeight:"146px",overflowY:"auto",borderBottomLeftRadius:"$sm",borderBottomRightRadius:"$sm",boxShadow:"-5px 5px 10px 0px rgba(86, 86, 86, 0.10)",backgroundColor:"$neutral100",[`.${c} &`]:{backgroundColor:"$neutral300"}}),Bn=i(Wo.Item,{padding:"$10 0",borderTop:"1px solid",borderColor:"$neutral300",[`.${c} &`]:{borderColor:"$neutral400"},listStyleType:"none",cursor:"pointer","&:hover":{"& ._typography":{color:"$colors$secondary"}},"&:focus":{outline:"none","& ._typography":{color:"$colors$secondary"}}});function Ha(o){let[t,r]=Ba(!1),n=Wa(null),{options:a,value:l,container:d,handleItemClick:m}=o,C=e(()=>{r(y=>!y)},"handleToggle"),h=e(y=>{n.current&&!n.current.contains(y.target)&&r(!1)},"handleClickOutside");return Da(()=>(document.addEventListener("click",h),()=>{document.removeEventListener("click",h)}),[]),j.createElement("div",{ref:n},j.createElement(Y.Root,{value:l.value,open:t},j.createElement(Dn,{onKeyDown:y=>y.key==="Enter"&&C(),onClick:C,open:t,"aria-label":l.label},j.createElement(Y.Value,null,j.createElement(s,{variant:"body",size:"small"},l.label)),j.createElement(Y.Icon,{className:"SelectIcon"},j.createElement(co,{size:12}))),j.createElement(Y.Portal,{container:d},j.createElement(Wn,null,j.createElement(Y.ScrollUpButton,{className:"SelectScrollButton"},j.createElement(zo,null)),j.createElement(Y.Viewport,{className:"SelectViewport"},j.createElement(Y.Group,null,a.map(y=>y.value!==l?.value&&j.createElement(Bn,{onClick:()=>{m&&m(y),C()},key:y.value,value:y.value},j.createElement(Y.ItemText,null,j.createElement(s,{variant:"body",size:"small"},y.label)))))),j.createElement(Y.ScrollDownButton,{className:"SelectScrollButton"},j.createElement(co,null))))))}e(Ha,"SelectComponent");import{i18n as Aa}from"@lingui/core";import _ from"react";var Za=i("div",{display:"flex",flexDirection:"column"}),za=i("div",{position:"relative",paddingBottom:"$12"}),Fa=i("div",{width:"100%",paddingTop:"$16"}),Na=i("div",{width:"100%",paddingTop:"$16"}),Va=i("div",{display:"flex",flexDirection:"column",width:"100%",paddingTop:"$16"});function Ea({bestRoute:o,fromBlockchain:t,toBlockchain:r,fromToken:n,toToken:a,setInputAmount:l,outputAmount:d,inputAmount:m,loadingStatus:C,showBestRoute:h,fetchingBestRoute:y,outputUsdValue:x,inputUsdValue:$,swapButtonTitle:N,swapButtonDisabled:F,swapButtonClick:S,onChainClick:B,onTokenClick:X,connectedWallets:I1,errorMessage:T1,hasLimitError:Z,swap:v1,fromAmountRangeError:m1,recommendation:pe,swithFromAndToComponent:Ao,percentageChange:t3,tokenBalanceReal:yt,tokenBalance:vt,swapFromAmount:r3,showPercentageChange:i3}){return _.createElement(Za,null,_.createElement(Ko,{title:Aa.t("SWAP"),suffix:_.createElement(_.Fragment,null)}),_.createElement(za,null,_.createElement(_.Fragment,null,_.createElement(Je,{type:"From",chain:t,token:n,onAmountChange:l,inputAmount:m,fromBlockchain:t,toBlockchain:r,loadingStatus:C,inputUsdValue:$,fromToken:n,setInputAmount:l,connectedWallets:I1,bestRoute:o,fetchingBestRoute:y,onChainClick:()=>B("from-chain"),onTokenClick:()=>X("from-token"),tokenBalanceReal:yt,tokenBalance:vt}),Ao)),_.createElement(Je,{type:"To",chain:r,token:a,outputAmount:d,percentageChange:t3,outputUsdValue:x,fromBlockchain:t,toBlockchain:r,loadingStatus:C,inputUsdValue:$,fromToken:n,setInputAmount:l,connectedWallets:I1,inputAmount:m,bestRoute:o,fetchingBestRoute:y,onChainClick:()=>B("to-chain"),onTokenClick:()=>X("to-token"),tokenBalanceReal:yt,tokenBalance:vt,showPercentageChange:i3}),h&&_.createElement(Fa,null),(T1||Z(o))&&_.createElement(Na,null,T1&&_.createElement(U,{type:"error"},T1),Z(o)&&_.createElement(U,{type:"error",title:`${v1?.swapperId} Limit`},_.createElement(_.Fragment,null,_.createElement(s,{variant:"body",size:"small"},`${m1}, Yours: ${r3} ${v1?.from.symbol}`),_.createElement(s,{variant:"body",size:"small"},pe)))),_.createElement(Va,null,_.createElement(T,{type:"primary",size:"large",disabled:F,onClick:S},N),_.createElement(Go,null)))}e(Ea,"HomePanel");import g,{useState as Ua}from"react";import q,{useState as _a}from"react";var qa=e(o=>!o||o==="info"?"info":o,"getAlertType"),Oa=i("div",{width:"90%",overflowWrap:"break-word",color:"$error500 !important"}),st=i(s,{color:"$success500 !important"}),Hn=e(o=>{let{shortMessage:t,detailedMessage:r,currentStepBlockchain:n,type:a,lastConvertedTokenInFailedSwap:l}=o,[d,m]=_a(!1),C=r.long?0:150,h=!d&&r.content.length>C;return q.createElement(U,{type:qa(a),title:t,...h&&{footer:q.createElement(T,{variant:"outlined",type:"primary",onClick:m.bind(null,y=>!y)},"Show more details")},...!!o.switchNetwork&&{footer:q.createElement(T,{variant:"outlined",type:"primary",onClick:()=>{o?.switchNetwork&&o.switchNetwork().catch(y=>{console.log(y)})}},"Change network to ",n)}},r.content?q.createElement(Oa,null,q.createElement(s,{variant:"body",size:"small"},h&&!d?r.content.substring(0,C)+(C>0?"...":""):r.content)):null,!!l&&q.createElement(q.Fragment,null,q.createElement("p",null,q.createElement(s,{variant:"body",size:"small"},"Do not worry, your fund is\xA0"),q.createElement(st,{variant:"body",size:"small"},q.createElement("b",null,"Safe"))),q.createElement("p",null,q.createElement(s,{variant:"body",size:"small"},"It is converted to \xA0",q.createElement("u",null,l.outputAmount),"\xA0"),q.createElement(st,{variant:"body",size:"small"},q.createElement("b",null,l.symbol,"\xA0")),q.createElement(s,{variant:"body",size:"small"},"on your\xA0"),q.createElement(st,{variant:"body",size:"small"},q.createElement("b",null,l.blockchain,"\xA0")),q.createElement(s,{variant:"body",size:"small"},"wallet"))))},"SwapMessages");var ja=o1({"0%":{opacity:1},"50%":{opacity:.3},"100%":{opacity:1}}),Ya=i("div",{display:"flex",alignItems:"center",paddingLeft:"$4",variants:{created:{true:{filter:"grayscale(100%)"}},running:{true:{animation:`${ja} 2s ease-in-out infinite`}}}}),ST=i("div",{height:"100%",display:"flex",justifyContent:"center",alignItems:"center"}),bT=i(s,{color:"$error500"}),Ga=i("div",{paddingLeft:"$16",color:"$neutral600"}),Xa=i("div",{display:"flex",alignItems:"center"}),Ja=i("div",{position:"relative"}),LT=i("div",{display:"flex",alignItems:"center"}),Ka=i("div",{width:"$8",height:"$8",backgroundColor:"$foreground",borderRadius:"4px",marginLeft:"11px"}),Qa=i("div",{width:"0px",height:"0px",borderLeft:"5px solid transparent",borderRight:"5px solid transparent",borderTop:"5px solid $foreground",marginLeft:"$10"}),Ra=i("a",{color:"$primary500",fontWeight:"$600"}),o9=i("div",{display:"flex",flexDirection:"column",paddingBottom:"$16",borderBottom:"1px solid $background"}),e9=i("div",{display:"flex",".details":{padding:"$8 0"}}),An=i("div",{display:"flex",margin:"$12 0 $12 $20"}),Zn=i("div",{display:"flex",alignItems:"center"}),zn=i(s,{color:"$success500",paddingLeft:"$4"}),Fn=i("div",{width:"0",minHeight:"$16",marginLeft:"14px",border:"1px dashed $foreground",borderRadius:"inherit"}),t9=i("div",{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"$14",padding:"$8 0",".name":{color:"$neutral800"},".value":{display:"flex",alignItems:"center",color:"$neutral600",justifyContent:"flex-end"},".status":{fontWeight:"bold",textTransform:"uppercase"},".status.failed":{color:"$error500"},".status.success":{color:"$success500"}}),r9=i("div",{width:"150px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","@md":{width:"auto"}}),i9=i("div",{padding:"0",color:"$neutral800",fontSize:"$10"}),n9=i("div",{overflowY:"auto",padding:"$8 $4 $2 $4"});function a9(o){let{pendingSwap:t,onBack:r,onCopy:n,isCopied:a,onCancel:l,date:d,onRetry:m,...C}=o,[h,y]=Ua(!1);return g.createElement(b1,{title:"Swap Details",textField:!1,onBack:r,Footer:g.createElement(g.Fragment,null,t?.status==="running"&&g.createElement(T,{variant:"outlined",fullWidth:!0,type:"error",onClick:y.bind(null,!0)},"Cancel"),!!m&&g.createElement(T,{variant:"contained",fullWidth:!0,type:"primary",onClick:m},"Try again"))},g.createElement("div",null,g.createElement(o9,null,g.createElement(t9,null,g.createElement("div",{className:"name"},"Request Id:",g.createElement("span",{className:"value requestId",onClick:n.bind(null,t?.requestId)},g.createElement(r9,null,t?.requestId),g.createElement(f,{size:4,direction:"horizontal"}),g.createElement(T,{type:"primary",variant:"ghost",size:"small"},a?"Copied!":"Copy"))),g.createElement("div",{className:"name"},g.createElement("span",{className:`value status ${t?.status||""}`},t?.status,t?.status==="running"&&g.createElement(Q,{size:16,color:"primary"})),g.createElement(i9,null,d))))),g.createElement(n9,null,C.shortMessage&&g.createElement(Hn,{...C}),g.createElement(f,{size:16}),t?.steps.map((x,$)=>{let N=`step-${$}`;return g.createElement("div",{key:N},$===0&&g.createElement(Ja,null,g.createElement(_e,{logo:x.fromLogo,symbol:x.fromSymbol,chainLogo:x.fromBlockchainLogo||"",blockchain:x.fromBlockchain,amount:t.inputAmount}),g.createElement(Ka,null)),g.createElement(Fn,null),g.createElement(Ya,{created:x.status==="created",running:!["created","success","failed"].includes(x.status)},g.createElement(M,{src:x.swapperLogo||"",alt:x.swapperId,size:20}),g.createElement(Ga,null,g.createElement(s,{variant:"body",size:"small"},x.swapperType==="DEX"?"Swap":"Bridge"," via"," ",x.swapperId),g.createElement(Xa,null,g.createElement(xo,null),g.createElement(s,{variant:"body",size:"small"},"\xA0 $",x.feeInUsd," estimated gas fee")))),g.createElement("div",{style:{display:"flex"}},g.createElement(e9,null,g.createElement(Fn,null),g.createElement("div",{className:"details"},!!x.explorerUrl&&g.createElement("div",null,x.explorerUrl.map((F,S)=>{let B=`internal-${S}`,X=`anchor-${S}`;return g.createElement(An,{key:B},g.createElement(Zn,null,g.createElement(f,{size:4}),g.createElement(De,{color:"primary"}),g.createElement(zn,{variant:"body",size:"small"},g.createElement(Ra,{href:F.url,target:"_blank",rel:"noreferrer",key:X},F.description?g.createElement("b",null,F.description.substring(0,1).toUpperCase(),F.description.substring(1)," Tx"):g.createElement("b",null,"View transaction")))))})),x.status==="failed"&&g.createElement(An,null,g.createElement(Zn,null,g.createElement(A1,{color:"error"}),g.createElement(zn,{variant:"body",size:"small",color:"$error500"},"Step failed")))))),$+1===t.steps.length&&g.createElement(Qa,null),g.createElement(_e,{logo:x.toLogo,symbol:x.toSymbol,chainLogo:x.toBlockchainLogo||"",blockchain:x.toBlockchain,amount:x.outputAmount||"",estimatedAmount:x.expectedOutputAmountHumanReadable||"",success:x.status==="success"}))}),g.createElement(f,{size:32})),g.createElement(f2,{onClose:y.bind(null,!1),open:h,anchor:"bottom",title:"Cancel Progress",footer:g.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"}},g.createElement(T,{variant:"contained",type:"success",onClick:y.bind(null,!1)},"Skip"),g.createElement(f,{size:16,direction:"horizontal"}),g.createElement(T,{variant:"contained",type:"error",onClick:()=>{l(t.requestId),y(!1)}},"Cancel progress")),container:document.getElementById("swap-box")},g.createElement(U,{type:"warning"},g.createElement(s,{variant:"body",size:"small"},"Warning: Cancel ",g.createElement("u",null,"doesn't revert")," your transaction if you've already signed and sent a transaction to the blockchain. It only stops next steps from being executed."))))}e(a9,"SwapHistory");import d1 from"react";import Bo,{useState as l9}from"react";var s9=i("div",{display:"grid",gap:".5rem",gridTemplateColumns:" repeat(2, minmax(0, 1fr))",alignContent:"baseline",width:"100%",height:"100%"}),p9=i("div",{paddingRight:"$4"});function pt(o){let{list:t,onChange:r,multiSelect:n,selectedList:a}=o,[l,d]=l9(o.selected),m=e(h=>{d(h),r(h)},"changeSelectedBlockchain"),C=e(h=>n&&a?a==="all"||a.findIndex(x=>h===x.name)>-1:h===l?.name,"isSelect");return Bo.createElement(s9,null,t.map((h,y)=>{let x=`item-${y}`;return Bo.createElement(T,{type:C(h.name)?"primary":void 0,variant:"outlined",size:"large",prefix:Bo.createElement(p9,null,Bo.createElement(M,{size:24,src:h.logo})),suffix:C(h.name)?Bo.createElement(C2,null):void 0,onClick:m.bind(null,h),key:x},Bo.createElement(s,{variant:"body",size:"small"},h.displayName))}))}e(pt,"BlockchainsList");import Ho from"react";var ct=i("div",{display:"flex",justifyContent:"center",width:"100%",paddingTop:"33%",flex:1}),c9=e((o,t)=>o.filter(r=>io(r.symbol,t)||io(r.address||"",t)||io(r.name||"",t)),"filterTokens");function d9(o){let{list:t,type:r,selected:n,hasHeader:a,onChange:l,onBack:d,loadingStatus:m}=o;return Ho.createElement(b1,{textField:!0,hasHeader:a,title:`Select ${r} token`,onBack:d,textFieldPlaceholder:"Search tokens by name"},C=>{let h=c9(t,C);return m==="loading"?Ho.createElement(ct,null,Ho.createElement(Q,{size:24})):m==="failed"?Ho.createElement(Uo,null):h.length?Ho.createElement(tt,{searchedText:C,list:h,selected:n,onChange:l}):Ho.createElement(jo,{catergory:"Token",searchedFor:C})})}e(d9,"TokenSelector");var m9=i("div",{overflowY:"auto",padding:"0 $4"}),u9=e((o,t)=>o.filter(r=>io(r.name,t)||io(r.displayName,t)),"filterBlockchains");function C9(o){let{type:t,list:r,onChange:n,selected:a,onBack:l,loadingStatus:d,hasHeader:m,listContainerStyle:C,multiSelect:h,selectedList:y}=o;return d1.createElement(b1,{textField:!0,hasHeader:m,textFieldPlaceholder:"Search blockchains by name",title:`Select ${t} Blockchain`,onBack:l},x=>{let $=u9(r,x);return d1.createElement(d1.Fragment,null,d==="loading"&&d1.createElement(ct,null,d1.createElement(Q,{size:24})),d1.createElement(m9,{style:C,key:"1"},d==="failed"&&d1.createElement(Uo,null),d==="success"&&d1.createElement(d1.Fragment,null,$.length?d1.createElement(pt,{list:$,selected:a,multiSelect:h,selectedList:y,onChange:n}):d1.createElement(jo,{catergory:"Blockchain",searchedFor:x}))))})}e(C9,"BlockchainSelector");import{i18n as h9}from"@lingui/core";import dt from"react";var g9=i("div",{display:"grid",gap:"$8",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",overflow:"auto"});function f9(o){let{open:t,list:r,onSelect:n,onClose:a}=o;return dt.createElement(S2,{title:h9.t("Connect Wallets"),open:t,onClose:a,styles:{container:{width:"75%",maxWidth:"30rem",height:"60%"}}},dt.createElement(g9,null,r.map(l=>dt.createElement(rt,{...l,key:l.title,onClick:n}))))}e(f9,"ConnectWalletsModal");import{i18n as mt}from"@lingui/core";import{Trans as ut}from"@lingui/react";import k from"react";var y9=i("div",{display:"flex",flexDirection:"column",width:"100%",overflow:"hidden"}),v9=i("div",{boxSizing:"border-box",borderRadius:"$xs",padding:"$8 $16 $16 $16",variants:{type:{filled:{backgroundColor:"$background"},outlined:{border:"1px solid $background",backgroundColor:"$surface"}}},defaultVariants:{type:"filled"},".head":{display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:"32px"},".form":{display:"flex",width:"100%",padding:"$2 0",".selectors":{width:"35%","._text":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},".amount":{width:"30%"}},".output-usd":{display:"flex",div:{display:"flex",paddingLeft:"$8"}}}),x9=i("div",{display:"flex",justifyContent:"flex-end",".balance":{display:"flex",alignItems:"center"}}),Nn=i("span",{width:"24px",height:"24px",backgroundColor:"$background",borderRadius:"99999px"}),w9=i("div",{windth:"100%",height:"$48",borderRadius:"$xs",backgroundColor:"$surface",border:"1px solid transparent",position:"relative",display:"flex",alignItems:"center",paddingLeft:"$8",paddingRight:"$8"});function Je(o){let{type:t,chain:r,token:n,loadingStatus:a,fromBlockchain:l,toBlockchain:d,fromToken:m,setInputAmount:C,inputUsdValue:h,inputAmount:y,bestRoute:x,fetchingBestRoute:$,onChainClick:N,onTokenClick:F,tokenBalanceReal:S,tokenBalance:B}=o,X=k.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"}},a==="failed"&&k.createElement(A1,{color:"error",size:24}),k.createElement(wo,null));return k.createElement(y9,null,k.createElement(v9,{type:t==="From"?"filled":"outlined"},k.createElement("div",{className:"head"},k.createElement(s,{variant:"body",size:"small",color:"neutral600"},t==="From"?k.createElement(ut,{id:"swap from",message:"From"}):k.createElement(ut,{id:"swap to",message:"To"})),t==="From"?k.createElement(x9,null,k.createElement("div",{className:"balance",onClick:()=>{B!=="0"&&C(S.split(",").join(""))}},k.createElement(s,{variant:"body",size:"small",color:"neutral800"},mt.t("Balance"),": ",B," ",m?.symbol||""),k.createElement(f,{size:4}),k.createElement(T,{type:"primary",variant:"ghost",size:"small"},k.createElement(ut,{id:"maximum amount of asset",message:"Max"})))):k.createElement("div",{className:"output-usd"},k.createElement(k2,{percentageChange:o.percentageChange,showPercentageChange:o.showPercentageChange}),k.createElement("div",null,k.createElement(s,{variant:"body",size:"xsmall",color:"neutral800"},`$${o.outputUsdValue}`)))),k.createElement("div",{className:"form"},k.createElement(T,{className:"selectors",onClick:N,variant:"outlined",disabled:a==="failed",loading:a==="loading",prefix:a==="success"&&r?k.createElement(M,{src:r.logo,size:24}):k.createElement(Nn,null),suffix:X,size:"large"},a==="success"&&r?r.displayName:mt.t("Chain")),k.createElement(f,{size:12,direction:"horizontal"}),k.createElement(T,{className:"selectors",onClick:F,variant:"outlined",disabled:a==="failed"||t==="From"&&!l||t==="To"&&!d,loading:a==="loading",prefix:a==="success"&&n?k.createElement(M,{src:n.image,size:24}):k.createElement(Nn,null),suffix:X,size:"large"},a==="success"&&n?n.symbol:mt.t("Token")),k.createElement(f,{size:12,direction:"horizontal"}),k.createElement("div",{className:"amount"},t==="From"?k.createElement(S1,{type:"number",size:"large",autoFocus:!0,placeholder:"0",style:{position:"relative",backgroundColor:"$background !important"},suffix:k.createElement("span",{style:{position:"absolute",right:"4px",bottom:"2px"}},k.createElement(s,{variant:"body",size:"xsmall",color:"neutral600"},`$${h}`)),value:y||"",min:0,onChange:t==="From"?I1=>{o.onAmountChange(I1.target.value)}:void 0}):k.createElement(w9,null,k.createElement(s,{variant:"title",size:"medium"},$&&"?",!!x?.result&&`\u2248 ${o.outputAmount}`,(!y||y==="0")&&"0"))))))}e(Je,"TokenInfo");import{i18n as $9}from"@lingui/core";import Ke from"react";function S9(o){let{highSlippage:t,selectedSlippage:r,changeSlippage:n}=o;return Ke.createElement(Ke.Fragment,null,t&&Ke.createElement(U,{type:"warning",footer:Ke.createElement(Xo,{onClick:n})},$9.t({id:" Caution, your slippage is high (={selectedSlippage}). Your trade may be front run.",values:{selectedSlippage:r}})))}e(S9,"HighSlippageWarning");import{i18n as b9}from"@lingui/core";import Ct from"react";var L9=i(s,{color:"$error500 !important"});function k9({minRequiredSlippage:o,changeSlippage:t}){return Ct.createElement(L9,{variant:"body",size:"small"},b9.t({id:"We recommend you to increase slippage to at least {minRequiredSlippage} for this route.",values:{minRequiredSlippage:o}}),Ct.createElement(f,{size:8}),Ct.createElement(Xo,{onClick:t}))}e(k9,"MinRequiredSlippage");import le from"react";var I9=i("ul",{padding:"$0 $0 $40 $0",margin:0}),T9=i("li",{paddingBottom:"$10"}),P9=i(s,{display:"block"});function M9({messages:o}){return le.createElement(le.Fragment,null,le.createElement(I9,null,o.map((t,r)=>{let n=r+t;return le.createElement(T9,{key:n},le.createElement(P9,{variant:"body",size:"medium",color:"$neutral700"},t))})))}e(M9,"BalanceErrors");import{i18n as e3}from"@lingui/core";import W from"react";var se={SWAP_FROM_INPUT_CONTAINER_ID:"rango-swap-from-input-container",SWAP_TO_INPUT_CONTAINER_ID:"rango-swap-to-input-container",SWAP_FROM_CHAIN_IMAGE_ID:"rango-swap-from-chain-image",SWAP_TO_CHAIN_IMAGE_ID:"rango-swap-to-chain-image"};var Qe=A(),Vn=i("div",{$$color:"$colors$neutral100",[`.${c} &`]:{$$color:"$colors$neutral300"},backgroundColor:"$$color",borderRadius:"$xm",padding:"$15",variants:{sharpBottomStyle:{true:{borderBottomLeftRadius:"$0",borderBottomRightRadius:"$0"}}},[`& .${Qe}`]:{$$color:"$colors$neutral600",[`.${c} &`]:{$$color:"$colors$neutral700"},color:"$$color"}}),En=i(S1,{width:"100%",padding:"0",fontSize:"$18",lineHeight:"$26",fontWeight:"$medium",textAlign:"right","&:disabled":{cursor:"unset"}}),_n=i(T,{$$color:"$colors$info300",[`.${c} &`]:{$$color:"$colors$secondary800"},backgroundColor:"$$color"}),qn=i("div",{display:"flex",width:"100%",textAlign:"right",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",variants:{hasWarning:{true:{"& ._typography":{color:"$warning500"}},false:{"& ._typography":{$$color:"$colors$neutral600",[`.${c} &`]:{$$color:"$colors$neutral700"},color:"$$color"}}}}}),On=A({display:"flex",justifyContent:"space-between",alignItems:"center"}),Un=A({display:"flex",justifyContent:"space-between",alignItems:"center"}),ht=A({display:"flex",justifyContent:"center",alignItems:"center"}),jn=A({width:"45%",maxWidth:"170px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"end",flexGrow:1}),Yn=A({paddingBottom:"$5"}),Gn=i(s,{width:"100%",textAlign:"right",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"});import{i18n as Rn}from"@lingui/core";import n1 from"react";var Xn=i(T,{maxWidth:"180px",minWidth:"130px",flexGrow:1,backgroundColor:"transparent",color:"$neutral700","&:disabled":{color:"$neutral600"},"&:focus-visible":{$$color:"$colors$info100",[`.${c} &`]:{$$color:"$colors$info700"},backgroundColor:"$$color !important",outline:0},"&:disabled:hover":{backgroundColor:"transparent"},"&:hover":{$$color:"$colors$info100",[`.${c} &`]:{$$color:"$colors$neutral400"},backgroundColor:"$$color !important"}}),gt=A(),Jn=i("div",{maxWidth:"170px",padding:"$2 $5",display:"flex",borderRadius:"$xs",justifyContent:"start",boxSizing:"border-box",alignItems:"center",[`& .${gt}`]:{$$color:"$colors$neutral600",[`.${c} &`]:{$$color:"$colors$neutral700"},color:"$$color"}}),Kn=A({display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"start",paddingLeft:"$10",flexGrow:1,textAlign:"left"}),Qn=A({width:"100%",padding:"$5 $0"});function o3(o){let{error:t,chainImage:r,tokenImage:n,tokenSymbol:a,chain:l,chianImageId:d,onClick:m,loading:C}=o;return n1.createElement(Xn,{variant:"default",disabled:t||C,onClick:m},n1.createElement(Jn,null,n1.createElement(J,{chianImageId:d,size:"large",useAsPlaceholder:t,chainImage:r,tokenImage:n,loading:C}),n1.createElement("div",{className:Kn()},C?n1.createElement("div",{className:Qn()},n1.createElement(H,{variant:"text",size:"large"}),n1.createElement(f,{size:8}),n1.createElement(H,{variant:"text",size:"medium"})):n1.createElement(n1.Fragment,null,n1.createElement(s,{variant:"title",size:"medium"},t||!C&&!a?Rn.t("Token"):a),n1.createElement(s,{variant:"body",size:"medium",className:gt()},t||!C&&!l?Rn.t("Chain"):l)))))}e(o3,"TokenSection");function D9(o){let t="balance"in o&&!o.loading&&!o.loadingBalance,r="balance"in o&&(o.loading||o.loadingBalance);return W.createElement(Vn,{id:o.mode==="To"?se.SWAP_TO_INPUT_CONTAINER_ID:se.SWAP_FROM_INPUT_CONTAINER_ID,sharpBottomStyle:o.sharpBottomStyle},W.createElement("div",{className:Yn()},W.createElement("div",{className:Un()},W.createElement(s,{variant:"body",size:"small",className:Qe()},o.label),t&&W.createElement("div",{className:ht()},W.createElement(s,{className:Qe(),mr:4,variant:"body",size:"xsmall"},e3.t("Balance"),": ",o.balance),W.createElement(_n,{variant:"default",size:"xsmall",onClick:o.onSelectMaxBalance},W.createElement(s,{variant:"body",size:"xsmall",color:"secondary500"},e3.t("Max")))),r&&W.createElement("div",{className:ht()},W.createElement(H,{variant:"text",size:"large",width:105})))),W.createElement("div",{className:On()},W.createElement(o3,{chain:o.chain.displayName,chianImageId:o.mode==="To"?se.SWAP_TO_CHAIN_IMAGE_ID:se.SWAP_FROM_CHAIN_IMAGE_ID,tokenSymbol:o.token.displayName,error:o.error,chainImage:o.chain.image,tokenImage:o.token.image,onClick:o.onClickToken,loading:o.loading}),W.createElement("div",{className:jn()},o.loading||o.mode==="To"&&o.fetchingQuote?W.createElement(W.Fragment,null,W.createElement(H,{variant:"text",size:"large"}),W.createElement(f,{size:8}),W.createElement(H,{variant:"text",size:"medium"})):W.createElement(W.Fragment,null,W.createElement(z,{content:o.price.realValue,container:o.tooltipContainer,open:!o.price.realValue||o.price.realValue==="0"?!1:void 0},W.createElement(En,{disabled:o.disabled||o.mode==="To",style:{padding:0},value:o.price.value,type:"onInputChange"in o?"number":"text",size:"large",placeholder:"0",variant:"ghost",min:0,..."onInputChange"in o&&{onChange:n=>o.onInputChange(n.target.value)}})),"percentageChange"in o?W.createElement(Q1,{size:"medium",tooltipProps:{container:o.tooltipContainer,side:"bottom"},outputUsdValue:o.price.usdValue,realOutputUsdValue:o.price.realUsdValue,error:o.price.error,percentageChange:o.percentageChange,warningLevel:o.warningLevel}):W.createElement(z,{content:o.price.realUsdValue,container:o.tooltipContainer,open:!o.price.realUsdValue||o.price.realUsdValue==="0"?!1:void 0,side:"bottom"},W.createElement(qn,{hasWarning:!!o.price.error},W.createElement(Gn,{variant:"body",size:"medium"},o.price.usdValue?`~$${o.price.usdValue}`:o.price.error)))))))}e(D9,"SwapInput");import ft from"react";import W9 from"copy-to-clipboard";function B9(o){let[t,r]=ft.useState(!1),n=ft.useCallback(a=>{W9(a.toString()),r(!0)},[]);return ft.useEffect(()=>{let a;return t&&o&&(a=setTimeout(()=>r(!1),o)),()=>{clearTimeout(a)}},[t,o]),[t,n]}e(B9,"useCopyToClipboard");export{b3 as AddIcon,U as Alert,I3 as AutoThemeIcon,M3 as AutorenewIcon,M9 as BalanceErrors,Lo as BlockchainCategories,C9 as BlockchainSelector,h2 as BlockchainsChip,B3 as BorderRadiusIcon,Go as BottomLogo,T as Button,J as ChainToken,r6 as ChainsIcon,Xo as ChangeSlippageButton,X6 as Checkbox,co as ChevronDownIcon,F3 as ChevronLeftIcon,E3 as ChevronRightIcon,zo as ChevronUpIcon,J6 as Chip,E1 as CloseIcon,j6 as Collapsible,c7 as CollapsibleMessageBox,a6 as ColorsIcon,Fo as CompleteIcon,f9 as ConnectWalletsModal,J3 as CopyIcon,e2 as CosmosCategoryIcon,e5 as CustomColorsIcon,i5 as DarkModeIcon,l5 as DeleteIcon,c5 as DesktopIcon,p6 as DiscordIcon,f as Divider,t2 as DoneIcon,f2 as Drawer,kn as English,_1 as ErrorIcon,r2 as EvmCategoryIcon,v5 as ExitIcon,e7 as ExpandedRoute,$5 as ExternalLinkIcon,C2 as FilledCircle,L5 as FontIcon,In as French,i2 as GasIcon,ra as GroupedVirtualizedList,u1 as HEADER_CORNDER_RADIUS,Ko as Header,M5 as HeightIcon,S9 as HighSlippageWarning,Ea as HomePanel,c3 as I18nManager,s1 as IconButton,M as Image,xe as ImageContainer,B5 as InProgressIcon,Vo as InfoErrorIcon,F5 as InfoIcon,Tn as Japanese,m6 as KeyIcon,E5 as LanguageIcon,O5 as LightModeIcon,Y5 as LinkIcon,fa as List,ie as ListItem,ga as ListItemButton,Uo as LoadingFailedAlert,a2 as LoadingIcon,Q5 as LogoWithTextIcon,h6 as MediumIcon,e4 as MenuIcon,b2 as MessageBox,k9 as MinRequiredSlippage,S2 as Modal,$2 as ModalHeader,O1 as NextIcon,p4 as NoNotificationIcon,i4 as NoRouteIcon,ya as NotFound,jo as NotFoundAlert,x3 as NotSelectableTypography,m4 as NotificationNumberIcon,h4 as NotificationsIcon,s2 as NumberIcon,p2 as OtherCategoryIcon,k2 as PercentageChange,$4 as PinIcon,Pa as Popover,Pn as Portuguese,Q1 as PriceImpact,v2 as QuoteCost,x2 as QuoteTag,I2 as Radio,d7 as RadioGroup,T2 as RadioRoot,L4 as RefreshIcon,v7 as RefreshProgressButton,T4 as ReverseIcon,D4 as RouteIcon,$7 as RoutesOverview,d2 as SearchIcon,b1 as SecondaryPage,Ha as Select,Z7 as SelectableCategoryList,ha as SelectableWallet,B7 as SelectableWalletList,y6 as SettingsIcon,H as Skeleton,Mn as Spanish,Q as Spinner,_e as StepDetail,La as StepDetails,w6 as StyleIcon,U7 as SwapContainer,J7 as SwapDetailsPlaceholder,a9 as SwapHistory,Z4 as SwapIcon,D9 as SwapInput,Y7 as SwapListItem,K7 as Switch,b6 as TelegramIcon,S1 as TextField,m2 as TimeIcon,R2 as Toast,ta as ToastProvider,va as TokenAmount,Je as TokenInfo,tt as TokenList,ca as TokenPreview,d9 as TokenSelector,z as Tooltip,E4 as TransactionIcon,O4 as TuneIcon,s as Typography,se as UI_ID,u2 as UtxoCategoryIcon,ot as VirtualizedList,rt as Wallet,X4 as WalletIcon,re as WalletState,j1 as WarningIcon,o6 as WidthIcon,I6 as XIcon,o8 as config,kt as createTheme,A as css,h3 as darkColors,c as darkTheme,H7 as getCountCategories,R9 as globalCss,o1 as keyframes,It as lightTheme,i as styled,m3 as theme,B9 as useCopyToClipboard,Q2 as useToast};
|
|
19
|
+
S29.0059509,37.5872993,28.4444485,37.5872993z`}))),"CopyIcon");ui.toString=()=>"._icon";var w7=i("div",{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"$8",borderRadius:"$xs",backgroundColor:"$background",$$color:"$colors$neutral600",[`.${c} &`]:{$$color:"$colors$neutral700"},color:"$$color",fontSize:"$12",".routes":{display:"flex",alignItems:"center"},".fee":{display:"flex",alignItems:"center"}});function $7(o){if(!o.routes)return null;let t=o.routes.result?.swaps;return C1.createElement(w7,null,C1.createElement("div",{className:"routes"},t?.map((r,n)=>{let a=n+1==t.length,l=`swap-${n}`;return C1.createElement(C1.Fragment,{key:l},C1.createElement("div",{className:"route"},r.from.symbol),C1.createElement(Ze,{size:12}),a?C1.createElement("div",{className:"route"},r.to.symbol):null)})),o.totalFee?C1.createElement("div",{className:"fee"},C1.createElement(xo,{size:12}),C1.createElement(f,{size:4,direction:"horizontal"}),"$",o.totalFee):null)}e($7,"RoutesOverview");import F1,{useState as b7}from"react";import h1 from"react";var Ci=i("div",{borderRadius:"$xs",display:"flex",justifyContent:"center",alignItems:"center",variants:{fullWidth:{true:{width:"100%"},false:{width:"fit-content"}},size:{small:{padding:"$5 $15"},large:{padding:"$10",borderRadius:"$xl"}},variant:{contained:{$$color:"$colors$neutral100",[`.${c} &`]:{$$color:"$colors$neutral300"},backgroundColor:"$$color","&:hover":{$$color:"$colors$info100",[`.${c} &`]:{$$color:"$colors$neutral100"},backgroundColor:"$$color"}},outlined:{backgroundColor:"transparent",border:"1px solid $neutral100","&:hover":{$$color:"$colors$info100",[`.${c} &`]:{$$color:"$colors$neutral400"},borderColor:"$$color"}},ghost:{background:"transparent"}},disabled:{true:{},false:{}}},compoundVariants:[{variant:"contained",disabled:!0,css:{"&:hover":{backgroundColor:"$neutral100"}}},{variant:"outlined",disabled:!0,css:{"&:hover":{borderColor:"$neutral100"}}}]}),hi=i("input",{flexGrow:1,color:"$foreground",fontSize:"$14",lineHeight:"$20",fontWeight:400,border:"none",outline:"none",fontFamily:"inherit",maxWidth:"100%",variants:{suffix:{true:{marginRight:"$10"}}},backgroundColor:"transparent","-webkit-appearance":"none",margin:0,"&:disabled":{cursor:"not-allowed"},"&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{"-webkit-appearance":"none",margin:0},'&[type="number"]':{"-moz-appearance":"textfield"},"&::placeholder, &::-webkit-input-placeholder":{color:"$neutral700"},"&:focus-visible":{outline:"none"}}),gi=i("label",{display:"inline-block"});function S7(o,t){let{label:r,prefix:n,suffix:a,size:l="small",style:d,variant:m,fullWidth:C,labelProps:h,...y}=o;return h1.createElement(h1.Fragment,null,r&&h1.createElement(h1.Fragment,null,h1.createElement(gi,{className:"_text",...y.id&&{htmlFor:y.id}},h1.createElement(s,{variant:"label",size:"large",...h},r)),h1.createElement(f,{direction:"vertical",size:4})),h1.createElement(Ci,{disabled:y.disabled,fullWidth:C,variant:m,size:l,style:d,className:"_text-field"},n||null,h1.createElement(hi,{...y,spellCheck:!1,suffix:!!a,ref:t}),a||null))}e(S7,"TextFieldComponent");var S1=h1.forwardRef(S7);S1.displayName="TextField";S1.toString=()=>"._text-field";var L7=i("div",{overflow:"hidden",display:"flex",flexDirection:"column",flex:"1",padding:"0 $4"}),k7=i("div",{padding:"1px"});function b1(o){let{title:t,Footer:r,TopButton:n,hasHeader:a=!0}=o,[l,d]=b7("");return F1.createElement(F1.Fragment,null,a&&F1.createElement(Ko,{title:t||"",suffix:n}),F1.createElement(L7,null,o.textField&&F1.createElement(k7,null,F1.createElement(S1,{size:"large",prefix:F1.createElement(Ae,{size:24}),placeholder:o.textFieldPlaceholder,onChange:m=>d(m.target.value),value:l,autoFocus:!0}),F1.createElement(f,{size:16})),o.textField&&o.children?.(l),!o.textField&&o.children),r)}e(b1,"SecondaryPage");import no,{useEffect as I7,useState as T7}from"react";function io(o,t){return o.toLowerCase().indexOf(t.toLowerCase())>-1}e(io,"containsText");function fi(o,t=8,r=3){if(!o)return null;if(o.length<2*t+r)return o;let n=Math.ceil((o.length-t)/2),a=o.length-t;return`${o.substr(n,t)}${".".repeat(r)}${o.substr(a)}`}e(fi,"getConciseAddress");var P7=i("div",{display:"flex",flexWrap:"wrap"}),M7=i("div",{width:12,height:12,borderRadius:6,border:"1px solid $neutral400",position:"absolute",top:12,right:12,variants:{checked:{true:{borderColor:"$success"},false:{borderColor:"$neutral400"}}}}),D7=i("div",{width:6,margin:"20% auto",height:6,borderRadius:3,variants:{checked:{true:{backgroundColor:"$success"},false:{backgroundColor:"$neutral400"}}}}),W7=i("div",{border:"1.5px solid",borderRadius:"$xs",padding:"$12",flexBasis:"calc(33.33% - 10px)",margin:5,display:"flex",flexDirection:"column",justifyContent:"space-between",width:124,height:92,cursor:"pointer",position:"relative",variants:{checked:{true:{borderColor:"$success",color:"$success"},false:{borderColor:"$neutral400",color:"$neutral400"}}}});function B7({list:o,onChange:t}){let[r,n]=T7(o.find(l=>l.selected)?.walletType||""),a=e(l=>{n(l.walletType),t(l)},"onClick");return I7(()=>{n(o.find(l=>l.selected)?.walletType||"")},[o]),no.createElement(P7,null,o.map((l,d)=>{let m=r===l.walletType;return no.createElement(W7,{checked:m,onClick:a.bind(null,l),key:d},no.createElement(M,{src:l.image,alt:l.walletType,size:24}),no.createElement(s,{variant:"body",size:"small"},l.name),no.createElement(s,{variant:"body",size:"xsmall"},fi(l.address)),no.createElement(M7,{checked:m},m&&no.createElement(D7,{checked:m})))}))}e(B7,"SelectableWalletList");import{i18n as A7}from"@lingui/core";import N1 from"react";import{TransactionType as Ee}from"rango-sdk";var Lo=(l=>(l.ALL="ALL",l.EVM="EVM",l.COSMOS="COSMOS",l.UTXO="UTXO",l.OTHER="OTHER",l))(Lo||{});var yi={EVM:r2,COSMOS:e2,UTXO:u2,OTHER:p2},vi={ALL:"All",EVM:"EVM",COSMOS:"Cosmos",UTXO:"UTXO",OTHER:"Other"},xi=e((o,t)=>{switch(t){case"ALL":return!0;case"UTXO":return o.type===Ee.TRANSFER;case"OTHER":return o.type!==Ee.TRANSFER&&o.type!==Ee.COSMOS&&o.type!==Ee.EVM;default:return o.type===t}},"filterByType"),wi=e((o,t)=>o.some(r=>xi(r,t)),"hasAnyCategory"),H7=e(o=>Object.values(Lo).filter(n=>n!=="ALL").reduce((n,a)=>{let l=o.some(d=>xi(d,a));return n+(l?1:0)},0),"getCountCategories");var $i=i("div",{display:"grid",gap:"$10",gridTemplateColumns:"auto 1fr 1fr 1fr 1fr"}),Gw=i("div",{display:"flex",position:"relative",alignItems:"center",justifyContent:"center",paddingTop:"$10"}),Xw=i("img",{position:"absolute",top:-2,width:15,height:15});function Z7(o){let{setCategory:t,category:r,isLoading:n,blockchains:a}=o,l=Object.keys(Lo);return N1.createElement($i,null,n&&Array.from(Array(5),(d,m)=>N1.createElement(H,{key:m,variant:"rounded",height:70,width:m===0?45:65})),!n&&l.map(d=>{let m=d!=="ALL"?yi[d]:null;return wi(a,d)&&N1.createElement(h2,{selected:r===d,key:d,onClick:()=>t(d)},m&&N1.createElement(N1.Fragment,null,N1.createElement(m,{size:28}),N1.createElement(f,{size:12})),N1.createElement(s,{size:"xsmall",variant:"body",color:d==="ALL"?"secondary500":void 0},A7.t({id:"{blockchainCategory}",values:{blockchainCategory:vi[d]}})))}))}e(Z7,"SelectableCategoryList");import g1 from"react";var z7=i("div",{position:"relative",width:"$28",height:"$28",variants:{direction:{vertical:{margin:"auto"},horizontal:{}}}}),F7=i("img",{width:"$28",height:"$28",borderRadius:"50%"}),N7=i("div",{position:"absolute",right:-4,bottom:-4,width:"$16",height:"$16",padding:"$2",borderRadius:"50%",backgroundColor:"$background",border:"1px solid $neutral400",img:{width:"100%",display:"block"}}),V7=i("div",{display:"flex",variants:{direction:{horizontal:{alignItems:"center"},vertical:{flexDirection:"column",textAlign:"center",justifyContent:"center"}},success:{true:{filter:"none"},false:{filter:"grayscale(100%)"}}}}),E7=i("div",{variants:{pl:{true:{paddingLeft:"$4","@lg":{paddingLeft:"$8"}},false:{paddingTop:"$8"}}}}),_7=i(s,{color:"$neutral800",display:"block",paddingLeft:"$8"});function _e(o){let{logo:t,chainLogo:r,amount:n,symbol:a,blockchain:l,estimatedAmount:d,success:m=!0,direction:C="horizontal"}=o;return g1.createElement(V7,{direction:C,success:m},g1.createElement(z7,{direction:C},g1.createElement(F7,{src:t,alt:a}),g1.createElement(N7,null,g1.createElement("img",{src:r,alt:l}))),g1.createElement(E7,{pl:C==="horizontal"},n&&g1.createElement(s,{noWrap:!0,variant:C==="vertical"?"body":"title",size:"medium"},n),!n&&d&&g1.createElement(s,{noWrap:!0,variant:C==="vertical"?"body":"title",size:"medium",color:"$neutral800"},d),"\xA0",g1.createElement(s,{variant:C==="vertical"?"body":"title",size:"medium",noWrap:!0},a),g1.createElement(_7,{noWrap:!0,variant:"body",size:"xsmall",color:"$neutral600"},"on ",l)))}e(_e,"StepDetail");import q7 from"react";var O7=i("div",{position:"relative",display:"flex",flexDirection:"column",width:"100%",borderRadius:"$xl",boxShadow:"15px 15px 15px 0px rgba(0, 0, 0, 0.05)",minWidth:"375px",maxWidth:"390px",boxSizing:"border-box",backgroundColor:"$neutral100",overflow:"hidden","& *":{boxSizing:"border-box",listStyleType:"none"}});function U7(o){let{children:t,style:r}=o;return q7.createElement(O7,{style:r,id:"swap-box"},t)}e(U7,"SwapContainer");import t1 from"react";import{i18n as U2}from"@lingui/core";function Si(o){switch(o){case"failed":return U2.t("Failed");case"success":return U2.t("Complete");default:return U2.t("In progress")}}e(Si,"getStatus");function bi(o,t){if(!o)return"";let r=new Date(Number(o)),n=12,a=10;if(!t){let x={year:"numeric",month:"long",day:"numeric"};return r.toLocaleDateString(void 0,x)}let l=r.getHours(),d=r.getMinutes(),m=l>=n?"pm":"am",C=l%n===0?n:l%n,h=d<a?`0${d}`:d;return`${C}:${h} ${m}`}e(bi,"formattedDateAndTime");var Li=i("div",{display:"flex",justifyContent:"space-between",alignItems:"flex-start",flexDirection:"column",gap:10}),j2=i("div",{display:"flex",padding:0,justifyContent:"space-between",alignItems:"center",alignSelf:"stretch"}),ki=i("button",{$$color:"$colors$neutral100",[`.${c} &`]:{$$color:"$colors$neutral300"},backgroundColor:"$$color",border:"none",width:"100%",borderRadius:"$xm",gap:10,padding:15,cursor:"pointer",fontFamily:"inherit","&:hover":{$$color:"$colors$info100",[`.${c} &`]:{$$color:"$colors$neutral100"},backgroundColor:"$$color"},"&:focus-visible":{$$color:"$colors$info100",[`.${c} &`]:{$$color:"$colors$info700"},backgroundColor:"$$color",outline:"none"}}),Ii=i("div",{display:"flex",padding:"$2",alignItems:"flex-start"}),Ti=i("div",{$$color:"$colors$neutral100",[`.${c} &`]:{$$color:"$colors$neutral300"},backgroundColor:"$$color",border:"none",width:"100%",borderRadius:"$xm",gap:10,padding:15}),Pi=i("div",{display:"flex",justifyContent:"space-between",alignItems:"flex-start",flexDirection:"column",gap:25});var Mi={failed:"error500",running:"info500",success:"success500"};import{i18n as j7}from"@lingui/core";import b from"react";var Y2=i("div",{display:"flex",padding:0,alignItems:"center",gap:10}),G2=i("div",{display:"flex",padding:0,alignItems:"center",alignSelf:"stretch"}),X2=i("div",{display:"flex",alignItems:"flex-start",variants:{direction:{column:{flexDirection:"column",flex:"1 0 0"},row:{padding:0}}}}),Di=i("div",{display:"flex",alignItems:"center",alignSelf:"stretch"}),ee=i("div",{display:"flex",padding:0,flexDirection:"column",justifyContent:"center",alignItems:"flex-start"}),J2=i("div",{display:"flex",padding:"$4",width:"$32",height:"$32",justifyContent:"center",alignItems:"center"}),Wi=i("div",{display:"flex",alignItems:"center",justifyContent:"center"}),Bi=i("div",{display:"flex",width:"$24",height:"$24",justifyContent:"center",alignItems:"center"}),M$=i("div",{display:"flex",padding:0,alignItems:"center",gap:25});function K2(o){if("isLoading"in o)return b.createElement(Y2,null,b.createElement(G2,null,b.createElement("div",null,b.createElement(J,{tokenImage:"",chainImage:"",size:"medium",loading:!0})),b.createElement("div",{style:{transform:"translateX(-5px)"}},b.createElement(J,{tokenImage:"",chainImage:"",size:"medium",loading:!0}))),b.createElement(Wi,null,b.createElement(ee,null,b.createElement(H,{variant:"text",size:"medium",width:76}),b.createElement(f,{size:8}),b.createElement(H,{variant:"text",size:"medium",width:60})),b.createElement(Bi,null,b.createElement(O1,{size:12,color:"gray"})),b.createElement(ee,null,b.createElement(H,{variant:"text",size:"medium",width:76}),b.createElement(f,{size:8}),b.createElement(H,{variant:"text",size:"medium",width:60}))));let{data:{from:{token:t,amount:r,blockchain:n,realAmount:a},to:{token:l,amount:d,blockchain:m,realAmount:C}},status:h,tooltipContainer:y}=o;return b.createElement(Y2,null,b.createElement(G2,null,b.createElement("div",null,b.createElement(J,{tokenImage:t.image,chainImage:n.image,size:"large"})),b.createElement("div",{style:{transform:"translateX(-10px)"}},b.createElement(J,{tokenImage:l.image,chainImage:m.image,size:"large"}))),h==="running"?b.createElement(X2,{direction:"column"},b.createElement(Di,null,b.createElement(s,{size:"medium",variant:"title"},t.displayName),b.createElement(J2,null,b.createElement(O1,{size:24,color:"black"})),b.createElement(s,{size:"medium",variant:"title"},l.displayName)),b.createElement(s,{size:"small",variant:"body",color:"neutral700"},j7.t("Waiting for bridge transaction"))):b.createElement(X2,{direction:"row"},b.createElement(ee,null,b.createElement(s,{size:"medium",variant:"title"},t.displayName),!!r&&b.createElement(z,{content:a,container:y},b.createElement(s,{size:"small",variant:"body",color:"neutral700"},r))),b.createElement(J2,null,b.createElement(O1,{size:24,color:"black"})),b.createElement(ee,null,b.createElement(s,{size:"medium",variant:"title"},l.displayName),b.createElement(z,{content:C,container:y},b.createElement(s,{size:"small",variant:"body",color:"neutral700"},d)))))}e(K2,"SwapToken");function Y7(o){if("isLoading"in o)return t1.createElement(Ti,null,t1.createElement(Pi,null,t1.createElement(j2,null,t1.createElement(H,{variant:"text",size:"medium",width:76}),t1.createElement(H,{variant:"text",size:"medium",width:76})),t1.createElement(K2,{isLoading:!0})));let{onClick:t,requestId:r,creationTime:n,onlyShowTime:a,status:l,swapTokenData:d,tooltipContainer:m}=o;return t1.createElement(ki,{onClick:t.bind(null,r)},t1.createElement(Li,null,t1.createElement(j2,null,t1.createElement(Ii,null,t1.createElement(s,{variant:"label",size:"medium",color:"neutral600"},bi(n,a))),t1.createElement(s,{variant:"label",size:"medium",color:Mi[l]},Si(l))),t1.createElement(K2,{data:d,status:l,tooltipContainer:m})))}e(Y7,"SwapListItem");import{i18n as Hi}from"@lingui/core";import te from"react";var G7=i("div",{height:"450px"}),X7=i("div",{display:"flex",justifyContent:"center",width:"100%",paddingTop:"33%",flex:1});function J7(o){let{requestId:t,loading:r,onBack:n}=o;return te.createElement(b1,{title:Hi.t("Swap Details"),textField:!1,onBack:n},te.createElement(G7,null,r?te.createElement(X7,null,te.createElement(Q,{size:24})):te.createElement(U,{type:"error",title:Hi.t({id:"Swap with request ID = {requestId} not found.",values:{requestId:t}})})))}e(J7,"SwapDetailsPlaceholder");import zi from"react";import*as qe from"@radix-ui/react-switch";var Ai=i(qe.Root,{boxSizing:"border-box",boxShadow:"none",width:"24px",height:"16px",$$color:"$colors$neutral600",[`.${c} &`]:{$$color:"$colors$neutral700"},backgroundColor:"$$color",border:"none",borderRadius:"99999px",padding:"0",cursor:"pointer",transition:"all 0.35s",overflow:"hidden",'&[data-state="checked"]':{$$color:"$colors$secondary500",[`.${c} &`]:{$$color:"$colors$secondary400"},backgroundColor:"$$color",borderColor:"$$color"},"-webkit-tap-highlight-color":"rgba(0, 0, 0, 0)"}),Zi=i(qe.Thumb,{boxSizing:"border-box",position:"relative",left:"$2",display:"block",width:"12px",height:"12px",backgroundColor:"$background",borderColor:"$secondary100",transition:" transform 300ms",borderRadius:"999999px",willChange:"transform","&:hover":{boxShadow:"rgba(0, 0, 0, 0.6) 0px 3px 8px","-moz-box-shadow":"rgba(0, 0, 0, 0.6) 0px 3px 8px","-webkit-box-shadow":"rgba(0, 0, 0, 0.6) 0px 3px 8px","-o-box-shadow":"rgba(0, 0, 0, 0.6) 0px 3px 8px"},'&[data-state="checked"]':{transform:"translateX(8px)"}});function K7(o){let{checked:t,onChange:r}=o;return zi.createElement(Ai,{checked:t,onCheckedChange:r},zi.createElement(Zi,null))}e(K7,"Switch");import c1,{useEffect as Xi,useState as Ji}from"react";function Fi(){let o=1;return()=>(o++,o)}e(Fi,"idGenerator");var Ni=500,V1=300,Vi=200,Ei=200;import ao,{createContext as Q7,useContext as R7,useMemo as oa,useState as ko}from"react";import{createPortal as ea}from"react-dom";var _i=A({transition:`transform ${Vi}ms ease-in-out`,"&:hover":{transform:"scale(0.99)"}}),qi=i("div",{transition:`transform ${V1}ms cubic-bezier(0, 0, 0.75, 1.25)`,cursor:"pointer",variants:{isActive:{true:{}},isVisible:{true:{}},position:{"right-top":{},"right-bottom":{},"left-top":{},"left-bottom":{},"center-top":{},"center-bottom":{}}},compoundVariants:[{position:"right-top",isActive:!0,isVisible:!0,css:{transform:"translateX(0)",maxHeight:"200px"}},{position:"right-top",isActive:!1,isVisible:!0,css:{maxHeight:"200px",transform:"translateX(100%)"}},{position:"right-top",isActive:!1,isVisible:!1,css:{maxHeight:"0px",transform:"translateX(100%)",transition:`max-height ${V1}ms ease-in-out`}},{position:"right-bottom",isActive:!0,isVisible:!0,css:{transform:"translateX(0)",maxHeight:"200px"}},{position:"right-bottom",isActive:!1,isVisible:!0,css:{transform:"translateX(100%)",maxHeight:"200px"}},{position:"right-bottom",isActive:!1,isVisible:!1,css:{transform:"translateX(100%)",maxHeight:"0px",transition:`max-height ${V1}ms ease-in-out`}},{position:"left-top",isActive:!0,isVisible:!0,css:{transform:"translateX(0)",maxHeight:"200px"}},{position:"left-top",isActive:!1,isVisible:!0,css:{transform:"translateX(-100%)",maxHeight:"200px"}},{position:"left-top",isActive:!1,isVisible:!1,css:{transform:"translateX(-100%)",maxHeight:"0px",transition:`max-height ${V1}ms ease-in-out`}},{position:"left-bottom",isActive:!0,isVisible:!0,css:{transform:"translateX(0)",maxHeight:"200px"}},{position:"left-bottom",isActive:!1,isVisible:!0,css:{transform:"translateX(-100%)",maxHeight:"200px"}},{position:"left-bottom",isActive:!1,isVisible:!1,css:{transform:"translateX(-100%)",maxHeight:"0px",transition:`max-height ${V1}ms ease-in-out`}},{position:"center-top",isActive:!0,isVisible:!0,css:{maxHeight:"200px",transform:"translateY(0)",opacity:1}},{position:"center-top",isActive:!1,isVisible:!0,css:{maxHeight:"200px",transform:"translateY(-1000%)",opacity:0}},{position:"center-top",isActive:!1,isVisible:!1,css:{maxHeight:"0px",opacity:0,transform:"translateY(-1000%)",transition:`max-height ${V1}ms ease-in-out`}},{position:"center-bottom",isActive:!0,isVisible:!0,css:{transform:"translateY(0)",maxHeight:"200px",opacity:1}},{position:"center-bottom",isActive:!1,isVisible:!0,css:{transform:"translateY(1000%)",maxHeight:"200px",opacity:0}},{position:"center-bottom",isActive:!1,isVisible:!1,css:{transform:"translateY(1000%)",maxHeight:"0px",opacity:0,transition:`max-height ${V1}ms ease-in-out`}}]}),Oi=i("div",{overflow:"hidden",position:"absolute",zIndex:9999,display:"flex",gap:"$4",flexDirection:"column",variants:{position:{"right-top":{right:12,top:2},"right-bottom":{right:12,bottom:2,flexDirection:"column-reverse"},"left-top":{left:12,top:2},"left-bottom":{left:12,bottom:2,flexDirection:"column-reverse"},"center-top":{left:"50%",transform:"translateX(-50%)",top:2},"center-bottom":{left:"50%",transform:"translateX(-50%)",bottom:2,flexDirection:"column-reverse"}}}}),Ui=i("div",{display:"flex",borderRadius:"$sm",width:"292px",minHeight:"52px",variants:{variant:{custom:{backgroundColor:"$background",borderRight:"1px solid","&:hover":{backgroundColor:"$info100",[`.${c} &`]:{backgroundColor:"$neutral300"}}},standard:{"& ._alert":{padding:"$10",width:"100%",justifyContent:"center",alignItems:"center"}}},type:{error:{},success:{},warning:{},info:{},loading:{}}},compoundVariants:[{variant:"custom",type:"error",css:{borderRightColor:"$error500"}},{variant:"custom",type:"success",css:{borderRightColor:"$success500"}},{variant:"custom",type:"warning",css:{borderRightColor:"$warning500"}},{variant:"custom",type:"info",css:{borderRightColor:"$info500"}},{variant:"custom",type:"loading",css:{borderRightColor:"$info500"}}]}),ji=i("div",{display:"flex",padding:"$10",alignItems:"center"}),Yi=i(s,{variants:{hasColor:{false:{[`.${It} &`]:{color:"$neutral700"},[`.${c} &`]:{color:"$neutral900"}}}}}),wS=i("div",{display:"flex",alignItems:"center"});var Gi=Q7(void 0),Io=e((o,t)=>ao.createElement(ao.Fragment,null,o.length>0&&ao.createElement(Oi,{style:o[0].containerStyle,position:t},o.map(r=>ao.createElement(R2,{...r,key:r.id})))),"renderToastContainer"),ta=e(o=>{let t=oa(()=>Fi(),[]),{children:r,container:n}=o,[a,l]=ko([]),[d,m]=ko([]),[C,h]=ko([]),[y,x]=ko([]),[$,N]=ko([]),[F,S]=ko([]),B=e(Z=>{switch(Z){case"right-top":return h;case"right-bottom":return x;case"left-top":return l;case"left-bottom":return m;case"center-top":return N;default:return S}},"getToastSetter"),X=e(Z=>{e(()=>B(Z.position),"addToasts")()(m1=>m1.find(Ao=>Ao.id===Z.id)?(console.warn("Trying to send a toast with an existing ID. Please update the toast ID or use it after the toast is hidden"),m1):[...m1,{...Z,id:Z.id||t()}])},"handleAddToast"),I1=e((Z,v1)=>{e(()=>B(v1),"removeFromToasts")()(pe=>pe.filter(Ao=>Ao.id!==Z))},"handleRemoveToast"),T1={addToast:Z=>X(Z),removeToast:(Z,v1)=>I1(Z,v1)};return ao.createElement(Gi.Provider,{value:T1},r,n&&ea(ao.createElement(ao.Fragment,null,Io(C,"right-top"),Io(a,"left-top"),Io($,"center-top"),Io(y,"right-bottom"),Io(d,"left-bottom"),Io(F,"center-bottom")),n))},"ToastProvider");function Q2(){let o=R7(Gi);if(!o)throw new Error("useToast can only be used within the ToastProvider component");return o}e(Q2,"useToast");var R2=e(o=>{let{id:t,autoHideDuration:r,onClose:n,type:a,title:l,position:d,hasCloseIcon:m=!0,hideOnTap:C=!0,variant:h="standard"}=o,[y,x]=Ji(!1),[$,N]=Ji(!1),{removeToast:F}=Q2();Xi(()=>{let B;if(r){let X=setTimeout(()=>{S()},r);B=e(()=>clearTimeout(X),"cleanup")}return B},[t]);let S=e(()=>{x(!1),setTimeout(()=>{N(!1)},Ei),setTimeout(()=>{F(t,d),n?.()},Ni)},"handleClose");return Xi(()=>{N(!0),setTimeout(()=>{x(!0)},0)},[]),c1.createElement(qi,{isActive:y,position:d,isVisible:$},c1.createElement("div",{className:_i()},c1.createElement(Ui,{onClick:C?S:void 0,variant:h,type:a},h==="custom"?c1.createElement(ji,null,c1.createElement(ce,{type:a,align:"center"},c1.createElement(ve,{type:a})),c1.createElement(f,{direction:"horizontal",size:10}),c1.createElement(Yi,{variant:"body",size:"small",align:"left"},o.title)):c1.createElement(U,{title:l,type:a,variant:"alarm",titleAlign:"left",action:m?c1.createElement(s1,{variant:"ghost",size:"xsmall",onClick:S},c1.createElement(E1,{size:12})):void 0}))))},"Toast");import Qi,{useEffect as Ri,useState as et}from"react";import{GroupedVirtuoso as ra,Virtuoso as ot}from"react-virtuoso";import f1 from"react";var ia=i("div",{paddingRight:"$16"}),na=i("div",{display:"flex",flexDirection:"column"}),aa=i("div",{display:"flex",flexDirection:"column",alignItems:"flex-end"});function Ki(o){let{token:t,style:r,onClick:n,selected:a}=o;return f1.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",...r,height:"48px",top:`${parseFloat(r?.top)+0}px`,padding:"0 4px"}},f1.createElement(T,{variant:"outlined",size:"large",onClick:n.bind(null,t),type:a?"primary":void 0,prefix:f1.createElement(ia,null,f1.createElement(M,{src:t.image,size:32})),suffix:t.balance?.amount&&f1.createElement(aa,null,f1.createElement(s,{variant:"body",size:"small"},t.balance.amount),f1.createElement(s,{variant:"body",size:"xsmall"},`${t.balance.usdValue}$`))},f1.createElement(na,null,f1.createElement(s,{variant:"body",size:"medium"},t.symbol),f1.createElement(s,{variant:"body",size:"xsmall",color:"neutral800"},t.name))))}e(Ki,"TokenItem");var on=20;function tt(o){let{list:t,searchedText:r,onChange:n,multiSelect:a,selectedList:l}=o,[d,m]=et(o.selected),C=e(S=>{m(S),n(S)},"changeSelected"),h=e(S=>a&&l?l.map(B=>B.symbol+B.address).indexOf(S.symbol+S.address)>-1:d?.symbol===S.symbol&&d?.address===S.address,"isSelected"),[y,x]=et(!0),[$,N]=et(t),F=e(()=>{N(t.slice(0,$.length+on))},"loadNextPage");return Ri(()=>{N(t.slice(0,on))},[r,t]),Ri(()=>{x(t.length>$.length)},[$.length]),Qi.createElement(ot,{itemContent:S=>Qi.createElement(Ki,{token:$[S],onClick:C,selected:h($[S])}),totalCount:$.length,endReached:y?F:void 0})}e(tt,"TokenList");import{i18n as en}from"@lingui/core";import E from"react";var la=i("div",{display:"flex",flexDirection:"column",width:"100%",overflow:"hidden"}),sa=i("div",{boxSizing:"border-box",borderRadius:"$xs",padding:"$8 $16 $16 $16",variants:{type:{filled:{backgroundColor:"$background"},outlined:{border:"1px solid $background"}}},defaultVariants:{type:"filled"},".head":{display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:"32px",".usd-value":{paddingLeft:"$8"}},".form":{display:"flex",width:"100%",padding:"$2 0",".selectors":{width:"35%","._text":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},".amount":{width:"30%"}}}),tn=i("span",{width:"24px",height:"24px",backgroundColor:"$background",borderRadius:"99999px"}),pa=i("div",{windth:"100%",height:"$48",borderRadius:"$xs",backgroundColor:"$surface",border:"1px solid transparent",position:"relative",display:"flex",alignItems:"center",paddingLeft:"$8",paddingRight:"$8"});function ca(o){let{chain:t,token:r,loadingStatus:n,percentageChange:a}=o,l=E.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"}},n==="failed"&&E.createElement(A1,{color:"error",size:24}));return E.createElement(la,null,E.createElement(sa,{type:"outlined"},E.createElement("div",{className:"head"},E.createElement(s,{variant:"body",size:"small",color:"neutral600"},o.label),E.createElement("div",null,a,o.usdValue&&E.createElement(s,{variant:"body",size:"xsmall",color:"neutral800",className:"usd-value"},`$${o.usdValue}`))),E.createElement("div",{className:"form"},E.createElement(T,{className:"selectors",variant:"outlined",loading:n==="loading",prefix:n==="success"&&t?E.createElement(M,{src:t.logo,size:24}):E.createElement(tn,null),suffix:l,size:"large"},n==="success"&&t?t.displayName:en.t("Chain")),E.createElement(f,{size:12,direction:"horizontal"}),E.createElement(T,{className:"selectors",variant:"outlined",loading:n==="loading",prefix:n==="success"&&r?E.createElement(M,{src:r.image,size:24}):E.createElement(tn,null),suffix:l,size:"large"},n==="success"&&r?r.symbol:en.t("Token")),E.createElement(f,{size:12,direction:"horizontal"}),E.createElement("div",{className:"amount"},E.createElement(pa,null,E.createElement(s,{variant:"title",size:"medium"},o.amount))))))}e(ca,"TokenPreview");import{detectInstallLink as da}from"@rango-dev/wallets-shared";import r1,{Fragment as ma}from"react";import{i18n as L1}from"@lingui/core";var re=(a=>(a.NOT_INSTALLED="not_installed",a.DISCONNECTED="disconnected",a.CONNECTING="connecting",a.CONNECTED="connected",a))(re||{});function Oe(o){switch(o){case"connected":return{color:"success500",description:L1.t("Connected"),tooltipText:L1.t("Disconnect")};case"not_installed":return{color:"info500",description:L1.t("Install"),tooltipText:L1.t("Install")};case"connecting":return{color:"neutral600",description:L1.t("Connecting..."),tooltipText:L1.t("Connecting")};case"disconnected":return{color:"neutral600",description:L1.t("Disconnected"),tooltipText:L1.t("Connect")};default:throw new Error(L1.t("you need to pass a correct state to Wallet."))}}e(Oe,"makeInfo");var Ue=i("div",{"& img":{borderRadius:"50%"}}),je=i(s,{textTransform:"capitalize"}),Ye=i("div",{display:"flex",flexDirection:"column",marginTop:"$10"}),Ge=i("button",{borderRadius:"$xm",padding:"$10",border:"0",display:"flex",flexDirection:"column",$$color:"$colors$neutral100",[`.${c} &`]:{$$color:"$colors$neutral300"},backgroundColor:"$$color",alignItems:"center",cursor:"pointer",width:100,position:"relative",fontFamily:"inherit","&:hover":{$$color:"$colors$info100",[`.${c} &`]:{$$color:"$colors$neutral100"},backgroundColor:"$$color"},"&:focus-visible":{$$color:"$colors$info100",[`.${c} &`]:{$$color:"$colors$info700"},backgroundColor:"$$color",outline:0},"&:disabled":{filter:"grayscale(1)",pointerEvents:"none"},variants:{selected:{true:{outlineWidth:1,$$outline:"$colors$secondary500",[`.${c} &`]:{$$outline:"$colors$secondary400"},outlineColor:"$$outline",outlineStyle:"solid"}}}}),rn=i("div",{borderRadius:"$xm",padding:"$10 0",border:"0",display:"flex",flexDirection:"column",backgroundColor:"$neutral100",alignItems:"center",justifyContent:"center",width:100});function ua(o){let{title:t,type:r,image:n,onClick:a,isLoading:l,disabled:d=!1}=o,m=Oe(o.state);return l?r1.createElement(rn,null,r1.createElement(H,{variant:"circular",width:35,height:35}),r1.createElement(f,{size:12}),r1.createElement(H,{variant:"text",width:85,size:"medium"}),r1.createElement(f,{size:4}),r1.createElement(H,{variant:"text",width:64,size:"medium"})):r1.createElement(d?ma:z,{container:o.container,content:m.tooltipText,side:"top"},r1.createElement(Ge,{disabled:o.state=="connecting"||d,onClick:()=>{o.state==="not_installed"?window.open(da(o.link),"_blank"):a(r)}},r1.createElement(Ue,null,r1.createElement(M,{src:n,size:35})),r1.createElement(Ye,null,r1.createElement(je,{variant:"label",size:"medium",noWrap:!1},t),r1.createElement(s,{variant:"body",size:"xsmall",noWrap:!1,color:m.color},m.description))))}e(ua,"Wallet");var rt=ua;import{detectInstallLink as Ca}from"@rango-dev/wallets-shared";import To from"react";function ha(o){let{title:t,type:r,image:n,onClick:a,selected:l,description:d,state:m,disabled:C=!1}=o,h=Oe(o.state);return To.createElement(Ge,{selected:l,disabled:o.state=="connecting"||C,onClick:()=>{o.state==="not_installed"?window.open(Ca(o.link),"_blank"):a(r)}},To.createElement(Ue,null,To.createElement(M,{src:n,size:35})),To.createElement(Ye,null,To.createElement(je,{variant:"label",size:"medium",noWrap:!1},t),To.createElement(s,{variant:"body",size:"xsmall",noWrap:!1,color:m==="connected"?"neutral700":h.color},d||h.description)))}e(ha,"SelectableWallet");import ln from"react";import Po from"react";var nn=i("li",{width:"100%",overflow:"hidden",borderRadius:"$xs",display:"flex",alignItems:"center",padding:"$10 $5",border:0,backgroundColor:"transparent",".item-start-container":{paddingRight:"$10",flexShrink:0,"& svg":{display:"block"}},".item-text-container":{flexGrow:1,flexShrink:1,flexBasis:"auto",textAlign:"left","._description":{$$color:"$colors$neutral600",[`.${c} &`]:{$$color:"$colors$neutral700"},color:"$$color"},".item-text-title":{fontWeight:"bold",display:"flex",alignItems:"center"}},".item-end-container":{display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"$10",overflow:"hidden"},variants:{hasDivider:{true:{borderBottom:"1px solid",$$color:"$colors$neutral300",[`.${c} &`]:{$$color:"$colors$neutral400"},borderColor:"$$color",borderBottomRightRadius:0,borderBottomLeftRadius:0}}}});function ie(o){let{start:t,title:r,description:n,end:a,onClick:l,hasDivider:d,...m}=o;return Po.createElement(nn,{hasDivider:d,onClick:l,...m},t&&Po.createElement("div",{className:"item-start-container"},t),Po.createElement("div",{className:"item-text-container"},r&&Po.createElement("div",{className:"item-text-title"},r),n&&Po.createElement(s,{variant:"body",className:"_description",size:"small"},n)),a&&Po.createElement("div",{className:"item-end-container"},a))}e(ie,"ListItem");var an=i("button",{transition:"all 0.35s",border:0,width:"100%",backgroundColor:"transparent",fontFamily:"inherit",padding:"unset","&:focus-visible":{borderRadius:"$xs",outline:0,$$color:"$colors$info100",[`.${c} &`]:{$$color:"$colors$info700"},backgroundColor:"$$color"},"&:hover":{$$color:"$colors$info100",borderRadius:"$xs",[`.${c} &`]:{$$color:"$colors$neutral100"},backgroundColor:"$$color",cursor:"pointer"},"&:active":{transform:"scale(0.99)"},variants:{hasDivider:{true:{borderBottom:"1px solid",$$color:"$colors$neutral300",[`.${c} &`]:{$$color:"$colors$neutral400"},borderColor:"$$color",borderBottomRightRadius:0,borderBottomLeftRadius:0}},selected:{true:{outline:"1px solid $secondary500"},false:{outline:0}}}});function ga(o){let{onClick:t,id:r,style:n,hasDivider:a,selected:l,...d}=o;return ln.createElement(an,{hasDivider:a,selected:l,onClick:e(()=>{t&&t(r)},"onClickWithKey"),style:n},ln.createElement(ie,{...d}))}e(ga,"ListItemButton");import it from"react";var sn=i("ul",{padding:0,margin:0,listStyle:"none"});function fa(o){let t=o.type;return it.createElement(sn,{as:o.as},o.items.map(r=>{let{id:n,...a}=r;return t?it.cloneElement(t,{...a,key:n,id:n}):it.createElement(ie,{key:n,...a})}))}e(fa,"List");import ne from"react";var pn=i("div",{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",textAlign:"center"});function ya(o){return ne.createElement(pn,null,ne.createElement(d2,{color:"secondary",size:26}),ne.createElement(f,{size:4}),ne.createElement(s,{variant:"title",size:"medium"},o.title),ne.createElement(s,{variant:"body",size:"medium",color:"neutral700"},o.description))}e(ya,"NotFound");import i1 from"react";var cn=i("div",{display:"flex",justifyContent:"space-between",variants:{direction:{vertical:{flexDirection:"column",alignItems:"start"},horizontal:{flexDirection:"row",width:"100%",alignItems:"end"}},centerAlign:{true:{alignItems:"center",justifyContent:"center"}}}}),dn=A({display:"flex",justifyContent:"center",alignItems:"center"}),mn=A({display:"flex",paddingTop:"$5"});function va(o){return i1.createElement(cn,{direction:o.direction,centerAlign:o.centerAlign},i1.createElement("div",{className:dn()},i1.createElement(J,{chainImage:o.chain.image,tokenImage:o.token.image,size:"medium"}),i1.createElement("div",null,o.label&&i1.createElement(s,{ml:4,size:"xsmall",variant:"body",color:"$neutral700"},o.label),i1.createElement("div",null,i1.createElement(z,{content:o.price.realValue,open:o.price.realValue?void 0:!1,container:o.tooltipContainer},i1.createElement(s,{ml:4,size:"medium",variant:"title",style:{fontWeight:600}},o.price.value),i1.createElement(s,{ml:8,size:"medium",variant:"title",style:{fontWeight:400}},o.token.displayName))))),o.price.usdValue&&o.price.usdValue!=="0"&&i1.createElement("div",{className:mn()},i1.createElement(z,{content:o.price.realUsdValue,container:o.tooltipContainer},o.type==="input"&&i1.createElement(s,{mr:4,size:"small",variant:"body",color:"$neutral700"},`~$${o.price.usdValue}`)),o.type==="output"&&i1.createElement(Q1,{size:"small",tooltipProps:{container:o.tooltipContainer,side:"top"},outputUsdValue:o.price.usdValue,percentageChange:o.percentageChange,warningLevel:o.warningLevel,realOutputUsdValue:o.price.realUsdValue})))}e(va,"TokenAmount");import{i18n as lt}from"@lingui/core";import D,{forwardRef as xa,Fragment as wa,memo as $a,useEffect as Sa,useRef as ba}from"react";import{css as ae}from"@stitches/react";var un=i("div",{width:"100%",position:"relative",padding:"0 0.5rem",boxSizing:"border-box",border:"1px solid transparent",variants:{type:{"quote-details":{border:"none"},"swap-progress":{backgroundColor:"$neutral100",$$color:"$colors$neutral100",[`.${c} &`]:{$$color:"$colors$neutral300"},borderRadius:"$xm",padding:"$10 $15",marginBottom:"15px"}},state:{default:{borderColor:"transparent"},"in-progress":{borderColor:"$info500"},completed:{borderColor:"$success500"},warning:{borderColor:"$warning500"},error:{borderColor:"$error500"}}}}),nt=i("div",{borderRadius:"100%",width:"24px",height:"24px",overflow:"hidden",border:"1.5px solid transparent",variants:{state:{default:{borderColor:"transparent"},"in-progress":{borderColor:"$info500"},completed:{borderColor:"$success500"},warning:{borderColor:"$warning500"},error:{borderColor:"$error500"}}}}),Cn=i("div",{width:"100%",variants:{pb:{true:{paddingBottom:"35px"}}}}),hn=i("div",{borderLeft:"1px dashed black",minHeight:"64px",margin:"0 11.5px",alignSelf:"stretch",variants:{invisible:{true:{visibility:"hidden",minHeight:"unset"}}}}),gn=i("div",{borderLeft:"1px solid transparent",margin:"0 $12",display:"block",height:"8px",variants:{state:{default:{borderColor:"transparent"},"in-progress":{borderColor:"$info500"},completed:{borderColor:"$success500"},warning:{borderColor:"$warning500"},error:{borderColor:"$error500"}}}}),fn=i("div",{borderLeft:"1px dashed transparent",margin:"0 $10",alignSelf:"stretch",display:"block",height:"15px",position:"absolute",top:"-16px",left:"16px",variants:{state:{default:{borderColor:"transparent"},"in-progress":{borderColor:"$info500"},completed:{borderColor:"$success500"},warning:{borderColor:"$warning500"},error:{borderColor:"$error500"}}}}),yn=ae({width:"100%"}),vn=ae({display:"flex",flexDirection:"column",justifyContent:"center"}),at=ae({display:"flex",alignItems:"center"}),xn=ae({display:"flex",flex:"1",width:"100%",alignItems:"start",variants:{tx:{true:{paddingLeft:"36px"}}}}),wn=ae({display:"flex",paddingTop:"$5",paddingBottom:"$10",alignItems:"center"});var $n=xa((o,t)=>{let{step:r,hasSeparator:n,type:a,state:l,isFocused:d,tabIndex:m,tooltipContainer:C}=o,{from:h,to:y,swapper:x}=r,$=ba(null),N=l==="completed"||l==="error",F=r.internalSwaps?.length?r.internalSwaps:[{from:{blockchain:h.chain.displayName},to:{blockchain:y.chain.displayName},swapper:x}];return Sa(()=>{let S=t?.current,B=$.current;d&&B&&S&&(S.scrollTop=B.offsetTop-S.offsetTop)},[d]),D.createElement(un,{type:a,state:l,ref:$,tabIndex:m},a==="quote-details"&&D.createElement("div",{className:at()},D.createElement(nt,{state:l},D.createElement(M,{size:22,src:r.swapper.image})),D.createElement(s,{ml:8,size:"medium",variant:"label"},lt.t({id:"Swap on {fromChain} via {swapper}",values:{fromChain:r.from.chain.displayName,swapper:r.swapper.displayName}}))),a==="swap-progress"&&D.createElement("div",{className:vn()},n&&D.createElement(fn,{state:l}),F.map((S,B)=>{let X=`${S.swapper.displayName}-${B}`;return D.createElement(wa,{key:X},D.createElement("div",{id:S.swapper.displayName,className:at()},D.createElement(nt,{state:l},D.createElement(M,{size:22,src:S.swapper.image})),D.createElement(s,{ml:8,size:"medium",variant:"label"},S?.swapper.type==="DEX"?lt.t({id:"Swap on {fromChain} via {swapper}",values:{fromChain:S.from.blockchain,swapper:S.swapper.displayName}}):lt.t({id:"Bridge to {toChain} via {swapper}",values:{toChain:S.to.blockchain,swapper:S.swapper.displayName}}))),B!==F.length-1&&D.createElement(gn,{state:l}))})),D.createElement("div",{className:xn()},D.createElement(hn,{invisible:!n||a==="swap-progress"}),D.createElement("div",{className:yn()},D.createElement("div",{className:wn()},D.createElement(J,{chainImage:r.from.chain.image,tokenImage:r.from.token.image,size:"small"}),D.createElement(z,{content:r.from.price.realValue,container:C},D.createElement(s,{ml:4,mr:4,size:"small",color:"$neutral700",variant:"body"},`${r.from.price.value} ${r.from.token.displayName}`)),D.createElement(O1,{color:"gray"}),D.createElement(f,{size:4,direction:"horizontal"}),D.createElement(J,{chainImage:r.to.chain.image,tokenImage:r.to.token.image,size:"small"}),D.createElement(z,{content:r.to.price.realValue,container:C},D.createElement(s,{ml:4,size:"small",color:"$neutral700",variant:"body"},`${N?"":"~"}${r.to.price.value} ${r.to.token.displayName}`))),D.createElement(Cn,{pb:n&&a==="quote-details"},r.alerts))))});$n.displayName="StepDetailsComponent";var La=$a($n);import*as Mo from"@radix-ui/react-popover";import lo from"react";import*as Xe from"@radix-ui/react-popover";var Sn=i(Xe.Content,{borderRadius:"$sm",filter:"drop-shadow(0px 5px 20px rgba(130, 130, 130, 0.20))",backgroundColor:"$neutral100"}),bn=i(Xe.Arrow,{fill:"$neutral100",width:"$16",height:"$8"});var ka=0,Ia=0,Ta=e((o,t)=>{let{container:r,children:n,styles:a,...l}=o;return lo.createElement(Mo.Portal,{container:r},lo.createElement(Sn,{...l,ref:t},n,lo.createElement(bn,{css:a?.arrowStyles})))},"PopoverContentComponent"),Ln=lo.forwardRef(Ta);Ln.displayName="PopoverContent";function Pa(o){let{children:t,content:r,side:n="bottom",sideOffset:a=ka,alignOffset:l=Ia,align:d="center",collisionBoundary:m=[],collisionPadding:C=0,container:h=document.body,...y}=o;return lo.createElement(Mo.Root,null,lo.createElement(Mo.Trigger,{asChild:!0},t),lo.createElement(Ln,{align:d,alignOffset:l,collisionBoundary:m,collisionPadding:C,side:n,sideOffset:a,container:h,...y},r))}e(Pa,"Popover");import so from"react";var y1="1em";function kn(o){let{size:t=y1}=o;return so.createElement("svg",{width:t,height:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},so.createElement("mask",{id:"a"},so.createElement("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})),so.createElement("g",{mask:"url(#a)"},so.createElement("path",{fill:"#eee",d:"m0 0 8 22-8 23v23l32 54-32 54v32l32 48-32 48v32l32 54-32 54v68l22-8 23 8h23l54-32 54 32h32l48-32 48 32h32l54-32 54 32h68l-8-22 8-23v-23l-32-54 32-54v-32l-32-48 32-48v-32l-32-54 32-54V0l-22 8-23-8h-23l-54 32-54-32h-32l-48 32-48-32h-32l-54 32L68 0H0z"}),so.createElement("path",{fill:"#0052b4",d:"M336 0v108L444 0Zm176 68L404 176h108zM0 176h108L0 68ZM68 0l108 108V0Zm108 512V404L68 512ZM0 444l108-108H0Zm512-108H404l108 108Zm-68 176L336 404v108z"}),so.createElement("path",{fill:"#d80027",d:"M0 0v45l131 131h45L0 0zm208 0v208H0v96h208v208h96V304h208v-96H304V0h-96zm259 0L336 131v45L512 0h-45zM176 336 0 512h45l131-131v-45zm160 0 176 176v-45L381 336h-45z"})))}e(kn,"English");import po from"react";function In(o){let{size:t=y1}=o;return po.createElement("svg",{width:t,height:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},po.createElement("mask",{id:"a"},po.createElement("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})),po.createElement("g",{mask:"url(#a)"},po.createElement("path",{fill:"#eee",d:"M167 0h178l25.9 252.3L345 512H167l-29.8-253.4z"}),po.createElement("path",{fill:"#0052b4",d:"M0 0h167v512H0z"}),po.createElement("path",{fill:"#d80027",d:"M345 0h167v512H345z"})))}e(In,"French");import Do from"react";function Tn(o){let{size:t=y1}=o;return Do.createElement("svg",{width:t,height:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Do.createElement("mask",{id:"a"},Do.createElement("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})),Do.createElement("g",{mask:"url(#a)"},Do.createElement("path",{fill:"#eee",d:"M0 0h512v512H0z"}),Do.createElement("circle",{cx:"256",cy:"256",r:"111.3",fill:"#d80027"})))}e(Tn,"Japanese");import k1 from"react";function Pn(o){let{size:t=y1}=o;return k1.createElement("svg",{width:t,height:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},k1.createElement("mask",{id:"a"},k1.createElement("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})),k1.createElement("g",{mask:"url(#a)"},k1.createElement("path",{fill:"#6da544",d:"M0 512h167l37.9-260.3L167 0H0z"}),k1.createElement("path",{fill:"#d80027",d:"M512 0H167v512h345z"}),k1.createElement("circle",{cx:"167",cy:"256",r:"89",fill:"#ffda44"}),k1.createElement("path",{fill:"#d80027",d:"M116.9 211.5V267a50 50 0 1 0 100.1 0v-55.6H117z"}),k1.createElement("path",{fill:"#eee",d:"M167 283.8c-9.2 0-16.7-7.5-16.7-16.7V245h33.4v22c0 9.2-7.5 16.7-16.7 16.7z"})))}e(Pn,"Portuguese");import L from"react";function Mn(o){let{size:t=y1}=o;return L.createElement("svg",{width:t,height:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},L.createElement("mask",{id:"a"},L.createElement("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})),L.createElement("g",{mask:"url(#a)"},L.createElement("path",{fill:"#ffda44",d:"m0 128 256-32 256 32v256l-256 32L0 384Z"}),L.createElement("path",{fill:"#d80027",d:"M0 0h512v128H0zm0 384h512v128H0z"}),L.createElement("g",{fill:"#eee"},L.createElement("path",{d:"M144 304h-16v-80h16zm128 0h16v-80h-16z"}),L.createElement("ellipse",{cx:"208",cy:"296",rx:"48",ry:"32"})),L.createElement("g",{fill:"#d80027"},L.createElement("rect",{width:"16",height:"24",x:"128",y:"192",rx:"8"}),L.createElement("rect",{width:"16",height:"24",x:"272",y:"192",rx:"8"}),L.createElement("path",{d:"M208 272v24a24 24 0 0 0 24 24 24 24 0 0 0 24-24v-24h-24z"})),L.createElement("rect",{width:"32",height:"16",x:"120",y:"208",fill:"#ff9811",ry:"8"}),L.createElement("rect",{width:"32",height:"16",x:"264",y:"208",fill:"#ff9811",ry:"8"}),L.createElement("rect",{width:"32",height:"16",x:"120",y:"304",fill:"#ff9811",rx:"8"}),L.createElement("rect",{width:"32",height:"16",x:"264",y:"304",fill:"#ff9811",rx:"8"}),L.createElement("path",{fill:"#ff9811",d:"M160 272v24c0 8 4 14 9 19l5-6 5 10a21 21 0 0 0 10 0l5-10 5 6c6-5 9-11 9-19v-24h-9l-5 8-5-8h-10l-5 8-5-8z"}),L.createElement("path",{d:"M122 252h172m-172 24h28m116 0h28"}),L.createElement("path",{fill:"#d80027",d:"M122 248a4 4 0 0 0-4 4 4 4 0 0 0 4 4h172a4 4 0 0 0 4-4 4 4 0 0 0-4-4zm0 24a4 4 0 0 0-4 4 4 4 0 0 0 4 4h28a4 4 0 0 0 4-4 4 4 0 0 0-4-4zm144 0a4 4 0 0 0-4 4 4 4 0 0 0 4 4h28a4 4 0 0 0 4-4 4 4 0 0 0-4-4z"}),L.createElement("path",{fill:"#eee",d:"M196 168c-7 0-13 5-15 11l-5-1c-9 0-16 7-16 16s7 16 16 16c7 0 13-4 15-11a16 16 0 0 0 17-4 16 16 0 0 0 17 4 16 16 0 1 0 10-20 16 16 0 0 0-27-5c-3-4-7-6-12-6zm0 8c5 0 8 4 8 8 0 5-3 8-8 8-4 0-8-3-8-8 0-4 4-8 8-8zm24 0c5 0 8 4 8 8 0 5-3 8-8 8-4 0-8-3-8-8 0-4 4-8 8-8zm-44 10 4 1 4 8c0 4-4 7-8 7s-8-3-8-8c0-4 4-8 8-8zm64 0c5 0 8 4 8 8 0 5-3 8-8 8-4 0-8-3-8-7l4-8z"}),L.createElement("path",{fill:"none",d:"M220 284v12c0 7 5 12 12 12s12-5 12-12v-12z"}),L.createElement("path",{fill:"#ff9811",d:"M200 160h16v32h-16z"}),L.createElement("path",{fill:"#eee",d:"M208 224h48v48h-48z"}),L.createElement("path",{fill:"#d80027",d:"m248 208-8 8h-64l-8-8c0-13 18-24 40-24s40 11 40 24zm-88 16h48v48h-48z"}),L.createElement("rect",{width:"20",height:"32",x:"222",y:"232",fill:"#d80027",rx:"10",ry:"10"}),L.createElement("path",{fill:"#ff9811",d:"M168 232v8h8v16h-8v8h32v-8h-8v-16h8v-8zm8-16h64v8h-64z"}),L.createElement("g",{fill:"#ffda44"},L.createElement("circle",{cx:"186",cy:"202",r:"6"}),L.createElement("circle",{cx:"208",cy:"202",r:"6"}),L.createElement("circle",{cx:"230",cy:"202",r:"6"})),L.createElement("path",{fill:"#d80027",d:"M169 272v43a24 24 0 0 0 10 4v-47h-10zm20 0v47a24 24 0 0 0 10-4v-43h-10z"}),L.createElement("g",{fill:"#338af3"},L.createElement("circle",{cx:"208",cy:"272",r:"16"}),L.createElement("rect",{width:"32",height:"16",x:"264",y:"320",ry:"8"}),L.createElement("rect",{width:"32",height:"16",x:"120",y:"320",ry:"8"}))))}e(Mn,"Spanish");import*as Y from"@radix-ui/react-select";import j,{useEffect as Da,useRef as Wa,useState as Ba}from"react";import*as Wo from"@radix-ui/react-select";var Ma=300,Dn=i(Wo.Trigger,{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",backgroundColor:"$secondary",padding:"$5 $10",border:0,whiteSpace:"nowrap","& svg":{transition:`all ${Ma}ms ease`},variants:{open:{true:{borderTopLeftRadius:"$sm",borderTopRightRadius:"$sm","& ._typography, & svg":{color:"$secondary"},"& svg":{transform:"rotate(180deg)"},backgroundColor:"$neutral100",[`.${c} &`]:{backgroundColor:"$neutral300"}},false:{borderRadius:"$md","& ._typography, & svg":{color:"$background",[`.${c} &`]:{color:"$foreground"}},"& svg":{transform:"rotate(0)"}}}},width:"100%","& ._typography":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",width:"52px","@xs":{width:"auto"}}}),Wn=i(Wo.Content,{padding:"$5 $10",width:"100%",position:"absolute",top:"38px",maxHeight:"146px",overflowY:"auto",borderBottomLeftRadius:"$sm",borderBottomRightRadius:"$sm",boxShadow:"-5px 5px 10px 0px rgba(86, 86, 86, 0.10)",backgroundColor:"$neutral100",[`.${c} &`]:{backgroundColor:"$neutral300"}}),Bn=i(Wo.Item,{padding:"$10 0",borderTop:"1px solid",borderColor:"$neutral300",[`.${c} &`]:{borderColor:"$neutral400"},listStyleType:"none",cursor:"pointer","&:hover":{"& ._typography":{color:"$colors$secondary"}},"&:focus":{outline:"none","& ._typography":{color:"$colors$secondary"}}});function Ha(o){let[t,r]=Ba(!1),n=Wa(null),{options:a,value:l,container:d,handleItemClick:m}=o,C=e(()=>{r(y=>!y)},"handleToggle"),h=e(y=>{n.current&&!n.current.contains(y.target)&&r(!1)},"handleClickOutside");return Da(()=>(document.addEventListener("click",h),()=>{document.removeEventListener("click",h)}),[]),j.createElement("div",{ref:n},j.createElement(Y.Root,{value:l.value,open:t},j.createElement(Dn,{onKeyDown:y=>y.key==="Enter"&&C(),onClick:C,open:t,"aria-label":l.label},j.createElement(Y.Value,null,j.createElement(s,{variant:"body",size:"small"},l.label)),j.createElement(Y.Icon,{className:"SelectIcon"},j.createElement(co,{size:12}))),j.createElement(Y.Portal,{container:d},j.createElement(Wn,null,j.createElement(Y.ScrollUpButton,{className:"SelectScrollButton"},j.createElement(zo,null)),j.createElement(Y.Viewport,{className:"SelectViewport"},j.createElement(Y.Group,null,a.map(y=>y.value!==l?.value&&j.createElement(Bn,{onClick:()=>{m&&m(y),C()},key:y.value,value:y.value},j.createElement(Y.ItemText,null,j.createElement(s,{variant:"body",size:"small"},y.label)))))),j.createElement(Y.ScrollDownButton,{className:"SelectScrollButton"},j.createElement(co,null))))))}e(Ha,"SelectComponent");import{i18n as Aa}from"@lingui/core";import _ from"react";var Za=i("div",{display:"flex",flexDirection:"column"}),za=i("div",{position:"relative",paddingBottom:"$12"}),Fa=i("div",{width:"100%",paddingTop:"$16"}),Na=i("div",{width:"100%",paddingTop:"$16"}),Va=i("div",{display:"flex",flexDirection:"column",width:"100%",paddingTop:"$16"});function Ea({bestRoute:o,fromBlockchain:t,toBlockchain:r,fromToken:n,toToken:a,setInputAmount:l,outputAmount:d,inputAmount:m,loadingStatus:C,showBestRoute:h,fetchingBestRoute:y,outputUsdValue:x,inputUsdValue:$,swapButtonTitle:N,swapButtonDisabled:F,swapButtonClick:S,onChainClick:B,onTokenClick:X,connectedWallets:I1,errorMessage:T1,hasLimitError:Z,swap:v1,fromAmountRangeError:m1,recommendation:pe,swithFromAndToComponent:Ao,percentageChange:t3,tokenBalanceReal:yt,tokenBalance:vt,swapFromAmount:r3,showPercentageChange:i3}){return _.createElement(Za,null,_.createElement(Ko,{title:Aa.t("SWAP"),suffix:_.createElement(_.Fragment,null)}),_.createElement(za,null,_.createElement(_.Fragment,null,_.createElement(Je,{type:"From",chain:t,token:n,onAmountChange:l,inputAmount:m,fromBlockchain:t,toBlockchain:r,loadingStatus:C,inputUsdValue:$,fromToken:n,setInputAmount:l,connectedWallets:I1,bestRoute:o,fetchingBestRoute:y,onChainClick:()=>B("from-chain"),onTokenClick:()=>X("from-token"),tokenBalanceReal:yt,tokenBalance:vt}),Ao)),_.createElement(Je,{type:"To",chain:r,token:a,outputAmount:d,percentageChange:t3,outputUsdValue:x,fromBlockchain:t,toBlockchain:r,loadingStatus:C,inputUsdValue:$,fromToken:n,setInputAmount:l,connectedWallets:I1,inputAmount:m,bestRoute:o,fetchingBestRoute:y,onChainClick:()=>B("to-chain"),onTokenClick:()=>X("to-token"),tokenBalanceReal:yt,tokenBalance:vt,showPercentageChange:i3}),h&&_.createElement(Fa,null),(T1||Z(o))&&_.createElement(Na,null,T1&&_.createElement(U,{type:"error"},T1),Z(o)&&_.createElement(U,{type:"error",title:`${v1?.swapperId} Limit`},_.createElement(_.Fragment,null,_.createElement(s,{variant:"body",size:"small"},`${m1}, Yours: ${r3} ${v1?.from.symbol}`),_.createElement(s,{variant:"body",size:"small"},pe)))),_.createElement(Va,null,_.createElement(T,{type:"primary",size:"large",disabled:F,onClick:S},N),_.createElement(Go,null)))}e(Ea,"HomePanel");import g,{useState as Ua}from"react";import q,{useState as _a}from"react";var qa=e(o=>!o||o==="info"?"info":o,"getAlertType"),Oa=i("div",{width:"90%",overflowWrap:"break-word",color:"$error500 !important"}),st=i(s,{color:"$success500 !important"}),Hn=e(o=>{let{shortMessage:t,detailedMessage:r,currentStepBlockchain:n,type:a,lastConvertedTokenInFailedSwap:l}=o,[d,m]=_a(!1),C=r.long?0:150,h=!d&&r.content.length>C;return q.createElement(U,{type:qa(a),title:t,...h&&{footer:q.createElement(T,{variant:"outlined",type:"primary",onClick:m.bind(null,y=>!y)},"Show more details")},...!!o.switchNetwork&&{footer:q.createElement(T,{variant:"outlined",type:"primary",onClick:()=>{o?.switchNetwork&&o.switchNetwork().catch(y=>{console.log(y)})}},"Change network to ",n)}},r.content?q.createElement(Oa,null,q.createElement(s,{variant:"body",size:"small"},h&&!d?r.content.substring(0,C)+(C>0?"...":""):r.content)):null,!!l&&q.createElement(q.Fragment,null,q.createElement("p",null,q.createElement(s,{variant:"body",size:"small"},"Do not worry, your fund is\xA0"),q.createElement(st,{variant:"body",size:"small"},q.createElement("b",null,"Safe"))),q.createElement("p",null,q.createElement(s,{variant:"body",size:"small"},"It is converted to \xA0",q.createElement("u",null,l.outputAmount),"\xA0"),q.createElement(st,{variant:"body",size:"small"},q.createElement("b",null,l.symbol,"\xA0")),q.createElement(s,{variant:"body",size:"small"},"on your\xA0"),q.createElement(st,{variant:"body",size:"small"},q.createElement("b",null,l.blockchain,"\xA0")),q.createElement(s,{variant:"body",size:"small"},"wallet"))))},"SwapMessages");var ja=o1({"0%":{opacity:1},"50%":{opacity:.3},"100%":{opacity:1}}),Ya=i("div",{display:"flex",alignItems:"center",paddingLeft:"$4",variants:{created:{true:{filter:"grayscale(100%)"}},running:{true:{animation:`${ja} 2s ease-in-out infinite`}}}}),ST=i("div",{height:"100%",display:"flex",justifyContent:"center",alignItems:"center"}),bT=i(s,{color:"$error500"}),Ga=i("div",{paddingLeft:"$16",color:"$neutral600"}),Xa=i("div",{display:"flex",alignItems:"center"}),Ja=i("div",{position:"relative"}),LT=i("div",{display:"flex",alignItems:"center"}),Ka=i("div",{width:"$8",height:"$8",backgroundColor:"$foreground",borderRadius:"4px",marginLeft:"11px"}),Qa=i("div",{width:"0px",height:"0px",borderLeft:"5px solid transparent",borderRight:"5px solid transparent",borderTop:"5px solid $foreground",marginLeft:"$10"}),Ra=i("a",{color:"$primary500",fontWeight:"$600"}),o9=i("div",{display:"flex",flexDirection:"column",paddingBottom:"$16",borderBottom:"1px solid $background"}),e9=i("div",{display:"flex",".details":{padding:"$8 0"}}),An=i("div",{display:"flex",margin:"$12 0 $12 $20"}),Zn=i("div",{display:"flex",alignItems:"center"}),zn=i(s,{color:"$success500",paddingLeft:"$4"}),Fn=i("div",{width:"0",minHeight:"$16",marginLeft:"14px",border:"1px dashed $foreground",borderRadius:"inherit"}),t9=i("div",{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"$14",padding:"$8 0",".name":{color:"$neutral800"},".value":{display:"flex",alignItems:"center",color:"$neutral600",justifyContent:"flex-end"},".status":{fontWeight:"bold",textTransform:"uppercase"},".status.failed":{color:"$error500"},".status.success":{color:"$success500"}}),r9=i("div",{width:"150px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","@md":{width:"auto"}}),i9=i("div",{padding:"0",color:"$neutral800",fontSize:"$10"}),n9=i("div",{overflowY:"auto",padding:"$8 $4 $2 $4"});function a9(o){let{pendingSwap:t,onBack:r,onCopy:n,isCopied:a,onCancel:l,date:d,onRetry:m,...C}=o,[h,y]=Ua(!1);return g.createElement(b1,{title:"Swap Details",textField:!1,onBack:r,Footer:g.createElement(g.Fragment,null,t?.status==="running"&&g.createElement(T,{variant:"outlined",fullWidth:!0,type:"error",onClick:y.bind(null,!0)},"Cancel"),!!m&&g.createElement(T,{variant:"contained",fullWidth:!0,type:"primary",onClick:m},"Try again"))},g.createElement("div",null,g.createElement(o9,null,g.createElement(t9,null,g.createElement("div",{className:"name"},"Request Id:",g.createElement("span",{className:"value requestId",onClick:n.bind(null,t?.requestId)},g.createElement(r9,null,t?.requestId),g.createElement(f,{size:4,direction:"horizontal"}),g.createElement(T,{type:"primary",variant:"ghost",size:"small"},a?"Copied!":"Copy"))),g.createElement("div",{className:"name"},g.createElement("span",{className:`value status ${t?.status||""}`},t?.status,t?.status==="running"&&g.createElement(Q,{size:16,color:"primary"})),g.createElement(i9,null,d))))),g.createElement(n9,null,C.shortMessage&&g.createElement(Hn,{...C}),g.createElement(f,{size:16}),t?.steps.map((x,$)=>{let N=`step-${$}`;return g.createElement("div",{key:N},$===0&&g.createElement(Ja,null,g.createElement(_e,{logo:x.fromLogo,symbol:x.fromSymbol,chainLogo:x.fromBlockchainLogo||"",blockchain:x.fromBlockchain,amount:t.inputAmount}),g.createElement(Ka,null)),g.createElement(Fn,null),g.createElement(Ya,{created:x.status==="created",running:!["created","success","failed"].includes(x.status)},g.createElement(M,{src:x.swapperLogo||"",alt:x.swapperId,size:20}),g.createElement(Ga,null,g.createElement(s,{variant:"body",size:"small"},x.swapperType==="DEX"?"Swap":"Bridge"," via"," ",x.swapperId),g.createElement(Xa,null,g.createElement(xo,null),g.createElement(s,{variant:"body",size:"small"},"\xA0 $",x.feeInUsd," estimated gas fee")))),g.createElement("div",{style:{display:"flex"}},g.createElement(e9,null,g.createElement(Fn,null),g.createElement("div",{className:"details"},!!x.explorerUrl&&g.createElement("div",null,x.explorerUrl.map((F,S)=>{let B=`internal-${S}`,X=`anchor-${S}`;return g.createElement(An,{key:B},g.createElement(Zn,null,g.createElement(f,{size:4}),g.createElement(De,{color:"primary"}),g.createElement(zn,{variant:"body",size:"small"},g.createElement(Ra,{href:F.url,target:"_blank",rel:"noreferrer",key:X},F.description?g.createElement("b",null,F.description.substring(0,1).toUpperCase(),F.description.substring(1)," Tx"):g.createElement("b",null,"View transaction")))))})),x.status==="failed"&&g.createElement(An,null,g.createElement(Zn,null,g.createElement(A1,{color:"error"}),g.createElement(zn,{variant:"body",size:"small",color:"$error500"},"Step failed")))))),$+1===t.steps.length&&g.createElement(Qa,null),g.createElement(_e,{logo:x.toLogo,symbol:x.toSymbol,chainLogo:x.toBlockchainLogo||"",blockchain:x.toBlockchain,amount:x.outputAmount||"",estimatedAmount:x.expectedOutputAmountHumanReadable||"",success:x.status==="success"}))}),g.createElement(f,{size:32})),g.createElement(f2,{onClose:y.bind(null,!1),open:h,anchor:"bottom",title:"Cancel Progress",footer:g.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"}},g.createElement(T,{variant:"contained",type:"success",onClick:y.bind(null,!1)},"Skip"),g.createElement(f,{size:16,direction:"horizontal"}),g.createElement(T,{variant:"contained",type:"error",onClick:()=>{l(t.requestId),y(!1)}},"Cancel progress")),container:document.getElementById("swap-box")},g.createElement(U,{type:"warning"},g.createElement(s,{variant:"body",size:"small"},"Warning: Cancel ",g.createElement("u",null,"doesn't revert")," your transaction if you've already signed and sent a transaction to the blockchain. It only stops next steps from being executed."))))}e(a9,"SwapHistory");import d1 from"react";import Bo,{useState as l9}from"react";var s9=i("div",{display:"grid",gap:".5rem",gridTemplateColumns:" repeat(2, minmax(0, 1fr))",alignContent:"baseline",width:"100%",height:"100%"}),p9=i("div",{paddingRight:"$4"});function pt(o){let{list:t,onChange:r,multiSelect:n,selectedList:a}=o,[l,d]=l9(o.selected),m=e(h=>{d(h),r(h)},"changeSelectedBlockchain"),C=e(h=>n&&a?a==="all"||a.findIndex(x=>h===x.name)>-1:h===l?.name,"isSelect");return Bo.createElement(s9,null,t.map((h,y)=>{let x=`item-${y}`;return Bo.createElement(T,{type:C(h.name)?"primary":void 0,variant:"outlined",size:"large",prefix:Bo.createElement(p9,null,Bo.createElement(M,{size:24,src:h.logo})),suffix:C(h.name)?Bo.createElement(C2,null):void 0,onClick:m.bind(null,h),key:x},Bo.createElement(s,{variant:"body",size:"small"},h.displayName))}))}e(pt,"BlockchainsList");import Ho from"react";var ct=i("div",{display:"flex",justifyContent:"center",width:"100%",paddingTop:"33%",flex:1}),c9=e((o,t)=>o.filter(r=>io(r.symbol,t)||io(r.address||"",t)||io(r.name||"",t)),"filterTokens");function d9(o){let{list:t,type:r,selected:n,hasHeader:a,onChange:l,onBack:d,loadingStatus:m}=o;return Ho.createElement(b1,{textField:!0,hasHeader:a,title:`Select ${r} token`,onBack:d,textFieldPlaceholder:"Search tokens by name"},C=>{let h=c9(t,C);return m==="loading"?Ho.createElement(ct,null,Ho.createElement(Q,{size:24})):m==="failed"?Ho.createElement(Uo,null):h.length?Ho.createElement(tt,{searchedText:C,list:h,selected:n,onChange:l}):Ho.createElement(jo,{catergory:"Token",searchedFor:C})})}e(d9,"TokenSelector");var m9=i("div",{overflowY:"auto",padding:"0 $4"}),u9=e((o,t)=>o.filter(r=>io(r.name,t)||io(r.displayName,t)),"filterBlockchains");function C9(o){let{type:t,list:r,onChange:n,selected:a,onBack:l,loadingStatus:d,hasHeader:m,listContainerStyle:C,multiSelect:h,selectedList:y}=o;return d1.createElement(b1,{textField:!0,hasHeader:m,textFieldPlaceholder:"Search blockchains by name",title:`Select ${t} Blockchain`,onBack:l},x=>{let $=u9(r,x);return d1.createElement(d1.Fragment,null,d==="loading"&&d1.createElement(ct,null,d1.createElement(Q,{size:24})),d1.createElement(m9,{style:C,key:"1"},d==="failed"&&d1.createElement(Uo,null),d==="success"&&d1.createElement(d1.Fragment,null,$.length?d1.createElement(pt,{list:$,selected:a,multiSelect:h,selectedList:y,onChange:n}):d1.createElement(jo,{catergory:"Blockchain",searchedFor:x}))))})}e(C9,"BlockchainSelector");import{i18n as h9}from"@lingui/core";import dt from"react";var g9=i("div",{display:"grid",gap:"$8",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",overflow:"auto"});function f9(o){let{open:t,list:r,onSelect:n,onClose:a}=o;return dt.createElement(S2,{title:h9.t("Connect Wallets"),open:t,onClose:a,styles:{container:{width:"75%",maxWidth:"30rem",height:"60%"}}},dt.createElement(g9,null,r.map(l=>dt.createElement(rt,{...l,key:l.title,onClick:n}))))}e(f9,"ConnectWalletsModal");import{i18n as mt}from"@lingui/core";import{Trans as ut}from"@lingui/react";import k from"react";var y9=i("div",{display:"flex",flexDirection:"column",width:"100%",overflow:"hidden"}),v9=i("div",{boxSizing:"border-box",borderRadius:"$xs",padding:"$8 $16 $16 $16",variants:{type:{filled:{backgroundColor:"$background"},outlined:{border:"1px solid $background",backgroundColor:"$surface"}}},defaultVariants:{type:"filled"},".head":{display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:"32px"},".form":{display:"flex",width:"100%",padding:"$2 0",".selectors":{width:"35%","._text":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},".amount":{width:"30%"}},".output-usd":{display:"flex",div:{display:"flex",paddingLeft:"$8"}}}),x9=i("div",{display:"flex",justifyContent:"flex-end",".balance":{display:"flex",alignItems:"center"}}),Nn=i("span",{width:"24px",height:"24px",backgroundColor:"$background",borderRadius:"99999px"}),w9=i("div",{windth:"100%",height:"$48",borderRadius:"$xs",backgroundColor:"$surface",border:"1px solid transparent",position:"relative",display:"flex",alignItems:"center",paddingLeft:"$8",paddingRight:"$8"});function Je(o){let{type:t,chain:r,token:n,loadingStatus:a,fromBlockchain:l,toBlockchain:d,fromToken:m,setInputAmount:C,inputUsdValue:h,inputAmount:y,bestRoute:x,fetchingBestRoute:$,onChainClick:N,onTokenClick:F,tokenBalanceReal:S,tokenBalance:B}=o,X=k.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"}},a==="failed"&&k.createElement(A1,{color:"error",size:24}),k.createElement(wo,null));return k.createElement(y9,null,k.createElement(v9,{type:t==="From"?"filled":"outlined"},k.createElement("div",{className:"head"},k.createElement(s,{variant:"body",size:"small",color:"neutral600"},t==="From"?k.createElement(ut,{id:"swap from",message:"From"}):k.createElement(ut,{id:"swap to",message:"To"})),t==="From"?k.createElement(x9,null,k.createElement("div",{className:"balance",onClick:()=>{B!=="0"&&C(S.split(",").join(""))}},k.createElement(s,{variant:"body",size:"small",color:"neutral800"},mt.t("Balance"),": ",B," ",m?.symbol||""),k.createElement(f,{size:4}),k.createElement(T,{type:"primary",variant:"ghost",size:"small"},k.createElement(ut,{id:"maximum amount of asset",message:"Max"})))):k.createElement("div",{className:"output-usd"},k.createElement(k2,{percentageChange:o.percentageChange,showPercentageChange:o.showPercentageChange}),k.createElement("div",null,k.createElement(s,{variant:"body",size:"xsmall",color:"neutral800"},`$${o.outputUsdValue}`)))),k.createElement("div",{className:"form"},k.createElement(T,{className:"selectors",onClick:N,variant:"outlined",disabled:a==="failed",loading:a==="loading",prefix:a==="success"&&r?k.createElement(M,{src:r.logo,size:24}):k.createElement(Nn,null),suffix:X,size:"large"},a==="success"&&r?r.displayName:mt.t("Chain")),k.createElement(f,{size:12,direction:"horizontal"}),k.createElement(T,{className:"selectors",onClick:F,variant:"outlined",disabled:a==="failed"||t==="From"&&!l||t==="To"&&!d,loading:a==="loading",prefix:a==="success"&&n?k.createElement(M,{src:n.image,size:24}):k.createElement(Nn,null),suffix:X,size:"large"},a==="success"&&n?n.symbol:mt.t("Token")),k.createElement(f,{size:12,direction:"horizontal"}),k.createElement("div",{className:"amount"},t==="From"?k.createElement(S1,{type:"number",size:"large",autoFocus:!0,placeholder:"0",style:{position:"relative",backgroundColor:"$background !important"},suffix:k.createElement("span",{style:{position:"absolute",right:"4px",bottom:"2px"}},k.createElement(s,{variant:"body",size:"xsmall",color:"neutral600"},`$${h}`)),value:y||"",min:0,onChange:t==="From"?I1=>{o.onAmountChange(I1.target.value)}:void 0}):k.createElement(w9,null,k.createElement(s,{variant:"title",size:"medium"},$&&"?",!!x?.result&&`\u2248 ${o.outputAmount}`,(!y||y==="0")&&"0"))))))}e(Je,"TokenInfo");import{i18n as $9}from"@lingui/core";import Ke from"react";function S9(o){let{highSlippage:t,selectedSlippage:r,changeSlippage:n}=o;return Ke.createElement(Ke.Fragment,null,t&&Ke.createElement(U,{type:"warning",footer:Ke.createElement(Xo,{onClick:n})},$9.t({id:" Caution, your slippage is high (={selectedSlippage}). Your trade may be front run.",values:{selectedSlippage:r}})))}e(S9,"HighSlippageWarning");import{i18n as b9}from"@lingui/core";import Ct from"react";var L9=i(s,{color:"$error500 !important"});function k9({minRequiredSlippage:o,changeSlippage:t}){return Ct.createElement(L9,{variant:"body",size:"small"},b9.t({id:"We recommend you to increase slippage to at least {minRequiredSlippage} for this route.",values:{minRequiredSlippage:o}}),Ct.createElement(f,{size:8}),Ct.createElement(Xo,{onClick:t}))}e(k9,"MinRequiredSlippage");import le from"react";var I9=i("ul",{padding:"$0 $0 $40 $0",margin:0}),T9=i("li",{paddingBottom:"$10"}),P9=i(s,{display:"block"});function M9({messages:o}){return le.createElement(le.Fragment,null,le.createElement(I9,null,o.map((t,r)=>{let n=r+t;return le.createElement(T9,{key:n},le.createElement(P9,{variant:"body",size:"medium",color:"$neutral700"},t))})))}e(M9,"BalanceErrors");import{i18n as e3}from"@lingui/core";import W from"react";var se={SWAP_FROM_INPUT_CONTAINER_ID:"rango-swap-from-input-container",SWAP_TO_INPUT_CONTAINER_ID:"rango-swap-to-input-container",SWAP_FROM_CHAIN_IMAGE_ID:"rango-swap-from-chain-image",SWAP_TO_CHAIN_IMAGE_ID:"rango-swap-to-chain-image"};var Qe=A(),Vn=i("div",{$$color:"$colors$neutral100",[`.${c} &`]:{$$color:"$colors$neutral300"},backgroundColor:"$$color",borderRadius:"$xm",padding:"$15",variants:{sharpBottomStyle:{true:{borderBottomLeftRadius:"$0",borderBottomRightRadius:"$0"}}},[`& .${Qe}`]:{$$color:"$colors$neutral600",[`.${c} &`]:{$$color:"$colors$neutral700"},color:"$$color"}}),En=i(S1,{width:"100%",padding:"0",fontSize:"$18",lineHeight:"$26",fontWeight:"$medium",textAlign:"right","&:disabled":{cursor:"unset"}}),_n=i(T,{$$color:"$colors$info300",[`.${c} &`]:{$$color:"$colors$secondary800"},backgroundColor:"$$color"}),qn=i("div",{display:"flex",width:"100%",textAlign:"right",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",variants:{hasWarning:{true:{"& ._typography":{color:"$warning500"}},false:{"& ._typography":{$$color:"$colors$neutral600",[`.${c} &`]:{$$color:"$colors$neutral700"},color:"$$color"}}}}}),On=A({display:"flex",justifyContent:"space-between",alignItems:"center"}),Un=A({display:"flex",justifyContent:"space-between",alignItems:"center"}),ht=A({display:"flex",justifyContent:"center",alignItems:"center"}),jn=A({width:"45%",maxWidth:"170px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"end",flexGrow:1}),Yn=A({paddingBottom:"$5"}),Gn=i(s,{width:"100%",textAlign:"right",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"});import{i18n as Rn}from"@lingui/core";import n1 from"react";var Xn=i(T,{maxWidth:"180px",minWidth:"130px",flexGrow:1,backgroundColor:"transparent",color:"$neutral700","&:disabled":{color:"$neutral600"},"&:focus-visible":{$$color:"$colors$info100",[`.${c} &`]:{$$color:"$colors$info700"},backgroundColor:"$$color !important",outline:0},"&:disabled:hover":{backgroundColor:"transparent"},"&:hover":{$$color:"$colors$info100",[`.${c} &`]:{$$color:"$colors$neutral400"},backgroundColor:"$$color !important"}}),gt=A(),Jn=i("div",{maxWidth:"170px",padding:"$2 $5",display:"flex",borderRadius:"$xs",justifyContent:"start",boxSizing:"border-box",alignItems:"center",[`& .${gt}`]:{$$color:"$colors$neutral600",[`.${c} &`]:{$$color:"$colors$neutral700"},color:"$$color"}}),Kn=A({display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"start",paddingLeft:"$10",flexGrow:1,textAlign:"left"}),Qn=A({width:"100%",padding:"$5 $0"});function o3(o){let{error:t,chainImage:r,tokenImage:n,tokenSymbol:a,chain:l,chianImageId:d,onClick:m,loading:C}=o;return n1.createElement(Xn,{variant:"default",disabled:t||C,onClick:m},n1.createElement(Jn,null,n1.createElement(J,{chianImageId:d,size:"large",useAsPlaceholder:t,chainImage:r,tokenImage:n,loading:C}),n1.createElement("div",{className:Kn()},C?n1.createElement("div",{className:Qn()},n1.createElement(H,{variant:"text",size:"large"}),n1.createElement(f,{size:8}),n1.createElement(H,{variant:"text",size:"medium"})):n1.createElement(n1.Fragment,null,n1.createElement(s,{variant:"title",size:"medium"},t||!C&&!a?Rn.t("Token"):a),n1.createElement(s,{variant:"body",size:"medium",className:gt()},t||!C&&!l?Rn.t("Chain"):l)))))}e(o3,"TokenSection");function D9(o){let t="balance"in o&&!o.loading&&!o.loadingBalance,r="balance"in o&&(o.loading||o.loadingBalance);return W.createElement(Vn,{id:o.mode==="To"?se.SWAP_TO_INPUT_CONTAINER_ID:se.SWAP_FROM_INPUT_CONTAINER_ID,sharpBottomStyle:o.sharpBottomStyle},W.createElement("div",{className:Yn()},W.createElement("div",{className:Un()},W.createElement(s,{variant:"body",size:"small",className:Qe()},o.label),t&&W.createElement("div",{className:ht()},W.createElement(s,{className:Qe(),mr:4,variant:"body",size:"xsmall"},e3.t("Balance"),": ",o.balance),W.createElement(_n,{variant:"default",size:"xsmall",onClick:o.onSelectMaxBalance},W.createElement(s,{variant:"body",size:"xsmall",color:"secondary500"},e3.t("Max")))),r&&W.createElement("div",{className:ht()},W.createElement(H,{variant:"text",size:"large",width:105})))),W.createElement("div",{className:On()},W.createElement(o3,{chain:o.chain.displayName,chianImageId:o.mode==="To"?se.SWAP_TO_CHAIN_IMAGE_ID:se.SWAP_FROM_CHAIN_IMAGE_ID,tokenSymbol:o.token.displayName,error:o.error,chainImage:o.chain.image,tokenImage:o.token.image,onClick:o.onClickToken,loading:o.loading}),W.createElement("div",{className:jn()},o.loading||o.mode==="To"&&o.fetchingQuote?W.createElement(W.Fragment,null,W.createElement(H,{variant:"text",size:"large"}),W.createElement(f,{size:8}),W.createElement(H,{variant:"text",size:"medium"})):W.createElement(W.Fragment,null,W.createElement(z,{content:o.price.realValue,container:o.tooltipContainer,open:!o.price.realValue||o.price.realValue==="0"?!1:void 0},W.createElement(En,{disabled:o.disabled||o.mode==="To",style:{padding:0},value:o.price.value,type:"onInputChange"in o?"number":"text",size:"large",placeholder:"0",variant:"ghost",min:0,..."onInputChange"in o&&{onChange:n=>o.onInputChange(n.target.value)}})),"percentageChange"in o?W.createElement(Q1,{size:"medium",tooltipProps:{container:o.tooltipContainer,side:"bottom"},outputUsdValue:o.price.usdValue,realOutputUsdValue:o.price.realUsdValue,error:o.price.error,percentageChange:o.percentageChange,warningLevel:o.warningLevel}):W.createElement(z,{content:o.price.realUsdValue,container:o.tooltipContainer,open:!o.price.realUsdValue||o.price.realUsdValue==="0"?!1:void 0,side:"bottom"},W.createElement(qn,{hasWarning:!!o.price.error},W.createElement(Gn,{variant:"body",size:"medium"},o.price.usdValue?`~$${o.price.usdValue}`:o.price.error)))))))}e(D9,"SwapInput");import ft from"react";import W9 from"copy-to-clipboard";function B9(o){let[t,r]=ft.useState(!1),n=ft.useCallback(a=>{W9(a.toString()),r(!0)},[]);return ft.useEffect(()=>{let a;return t&&o&&(a=setTimeout(()=>r(!1),o)),()=>{clearTimeout(a)}},[t,o]),[t,n]}e(B9,"useCopyToClipboard");export{b3 as AddIcon,U as Alert,I3 as AutoThemeIcon,M3 as AutorenewIcon,M9 as BalanceErrors,Lo as BlockchainCategories,C9 as BlockchainSelector,h2 as BlockchainsChip,B3 as BorderRadiusIcon,Go as BottomLogo,T as Button,J as ChainToken,r6 as ChainsIcon,Xo as ChangeSlippageButton,X6 as Checkbox,co as ChevronDownIcon,F3 as ChevronLeftIcon,E3 as ChevronRightIcon,zo as ChevronUpIcon,J6 as Chip,E1 as CloseIcon,j6 as Collapsible,c7 as CollapsibleMessageBox,a6 as ColorsIcon,Fo as CompleteIcon,f9 as ConnectWalletsModal,J3 as CopyIcon,e2 as CosmosCategoryIcon,e5 as CustomColorsIcon,i5 as DarkModeIcon,l5 as DeleteIcon,c5 as DesktopIcon,p6 as DiscordIcon,f as Divider,t2 as DoneIcon,f2 as Drawer,kn as English,_1 as ErrorIcon,r2 as EvmCategoryIcon,v5 as ExitIcon,e7 as ExpandedRoute,$5 as ExternalLinkIcon,C2 as FilledCircle,L5 as FontIcon,In as French,i2 as GasIcon,ra as GroupedVirtualizedList,u1 as HEADER_CORNDER_RADIUS,Ko as Header,M5 as HeightIcon,S9 as HighSlippageWarning,Ea as HomePanel,c3 as I18nManager,s1 as IconButton,M as Image,xe as ImageContainer,B5 as InProgressIcon,Vo as InfoErrorIcon,F5 as InfoIcon,Tn as Japanese,m6 as KeyIcon,E5 as LanguageIcon,O5 as LightModeIcon,Y5 as LinkIcon,fa as List,ie as ListItem,ga as ListItemButton,Uo as LoadingFailedAlert,a2 as LoadingIcon,Q5 as LogoWithTextIcon,h6 as MediumIcon,e4 as MenuIcon,b2 as MessageBox,k9 as MinRequiredSlippage,S2 as Modal,$2 as ModalHeader,O1 as NextIcon,p4 as NoNotificationIcon,i4 as NoRouteIcon,ya as NotFound,jo as NotFoundAlert,x3 as NotSelectableTypography,m4 as NotificationNumberIcon,h4 as NotificationsIcon,s2 as NumberIcon,p2 as OtherCategoryIcon,k2 as PercentageChange,$4 as PinIcon,Pa as Popover,Pn as Portuguese,Q1 as PriceImpact,v2 as QuoteCost,x2 as QuoteTag,I2 as Radio,d7 as RadioGroup,T2 as RadioRoot,L4 as RefreshIcon,v7 as RefreshProgressButton,T4 as ReverseIcon,D4 as RouteIcon,$7 as RoutesOverview,d2 as SearchIcon,b1 as SecondaryPage,Ha as Select,Z7 as SelectableCategoryList,ha as SelectableWallet,B7 as SelectableWalletList,y6 as SettingsIcon,H as Skeleton,Mn as Spanish,Q as Spinner,_e as StepDetail,La as StepDetails,w6 as StyleIcon,U7 as SwapContainer,J7 as SwapDetailsPlaceholder,a9 as SwapHistory,Z4 as SwapIcon,D9 as SwapInput,Y7 as SwapListItem,K7 as Switch,b6 as TelegramIcon,S1 as TextField,m2 as TimeIcon,R2 as Toast,ta as ToastProvider,va as TokenAmount,Je as TokenInfo,tt as TokenList,ca as TokenPreview,d9 as TokenSelector,z as Tooltip,E4 as TransactionIcon,O4 as TuneIcon,s as Typography,se as UI_ID,u2 as UtxoCategoryIcon,ot as VirtualizedList,rt as Wallet,X4 as WalletIcon,re as WalletState,j1 as WarningIcon,o6 as WidthIcon,I6 as XIcon,o8 as config,kt as createTheme,A as css,h3 as darkColors,c as darkTheme,H7 as getCountCategories,R9 as globalCss,o1 as keyframes,It as lightTheme,i as styled,m3 as theme,B9 as useCopyToClipboard,Q2 as useToast};
|
|
20
20
|
//# sourceMappingURL=index.js.map
|