@rango-dev/ui 0.22.1-next.15 → 0.22.1-next.17
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 +2 -2
- package/dist/widget/ui/src/components/SwapListItem/mock.d.ts +1 -1
- package/dist/widget/ui/src/components/SwapListItem/mock.d.ts.map +1 -1
- package/dist/widget/ui/src/components/TokenAmount/TokenAmount.d.ts.map +1 -1
- package/dist/widget/ui/src/containers/SwapHistory/SwapHistory.d.ts +1 -1
- package/dist/widget/ui/src/containers/SwapHistory/SwapHistory.d.ts.map +1 -1
- package/dist/widget/ui/src/containers/SwapHistory/SwapHistory.stories.d.ts +2 -2
- package/dist/widget/ui/src/containers/SwapHistory/SwapHistory.stories.d.ts.map +1 -1
- package/dist/widget/ui/src/containers/SwapHistory/mock.d.ts +1 -1
- package/dist/widget/ui/src/containers/SwapHistory/mock.d.ts.map +1 -1
- package/dist/widget/ui/src/types/index.d.ts +0 -1
- package/dist/widget/ui/src/types/index.d.ts.map +1 -1
- package/dist/widget/ui/src/types/swaps.d.ts +1 -27
- package/dist/widget/ui/src/types/swaps.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/components/SwapListItem/mock.ts +21 -6
- package/src/components/TokenAmount/TokenAmount.tsx +17 -15
- package/src/containers/SwapHistory/SwapHistory.stories.tsx +5 -2
- package/src/containers/SwapHistory/SwapHistory.tsx +1 -1
- package/src/containers/SwapHistory/mock.ts +24 -8
- package/src/types/index.ts +0 -1
- package/src/types/swaps.ts +0 -38
- package/dist/widget/ui/src/containers/History/types.d.ts +0 -2
- package/dist/widget/ui/src/containers/History/types.d.ts.map +0 -1
- package/src/containers/History/types.tsx +0 -1
package/dist/index.js
CHANGED
|
@@ -16,5 +16,5 @@ var d3=Object.defineProperty;var e=(o,r)=>d3(o,"name",{value:r,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`}),$1.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");Vt.toString=()=>"._icon";var M5=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 P5(o){if(!o.routes)return null;let r=o.routes.result?.swaps;return n1.createElement(M5,null,n1.createElement("div",{className:"routes"},r?.map((t,n)=>{let l=n+1==r.length,a=`swap-${n}`;return n1.createElement(n1.Fragment,{key:a},n1.createElement("div",{className:"route"},t.from.symbol),n1.createElement(R2,{size:12}),l?n1.createElement("div",{className:"route"},t.to.symbol):null)})),o.totalFee?n1.createElement("div",{className:"fee"},n1.createElement(G1,{size:12}),n1.createElement(f,{size:4,direction:"horizontal"}),"$",o.totalFee):null)}e(P5,"RoutesOverview");import L1,{useState as W5}from"react";import a1 from"react";var Et=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"}}}]}),_t=i("input",{flexGrow:1,color:"$foreground",fontSize:"$14",lineHeight:"$20",fontWeight:400,border:"none",outline:"none",fontFamily:"inherit",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"}}),qt=i("label",{display:"inline-block"});function B5(o,r){let{label:t,prefix:n,suffix:l,size:a="small",style:p,variant:u,fullWidth:g,...y}=o;return a1.createElement(a1.Fragment,null,t&&a1.createElement(a1.Fragment,null,a1.createElement(qt,{className:"_text",...y.id&&{htmlFor:y.id}},a1.createElement(s,{variant:"label",size:"large"},t)),a1.createElement(f,{direction:"vertical",size:4})),a1.createElement(Et,{disabled:y.disabled,fullWidth:g,variant:u,size:a,style:p,className:"_text"},n||null,a1.createElement(_t,{className:"_text",...y,spellCheck:!1,suffix:!!l,ref:r}),l||null))}e(B5,"TextFieldComponent");var w1=a1.forwardRef(B5);w1.displayName="TextField";var Z5=i("div",{overflow:"hidden",display:"flex",flexDirection:"column",flex:"1",padding:"0 $4"}),D5=i("div",{padding:"1px"});function m1(o){let{title:r,Footer:t,TopButton:n,hasHeader:l=!0}=o,[a,p]=W5("");return L1.createElement(L1.Fragment,null,l&&L1.createElement(S2,{title:r||"",suffix:n}),L1.createElement(Z5,null,o.textField&&L1.createElement(D5,null,L1.createElement(w1,{size:"large",prefix:L1.createElement(Q2,{size:24}),placeholder:o.textFieldPlaceholder,onChange:u=>p(u.target.value),value:a,autoFocus:!0}),L1.createElement(f,{size:16})),o.textField&&o.children?.(a),!o.textField&&o.children),t)}e(m1,"SecondaryPage");import A1,{useEffect as H5,useState as z5}from"react";function N1(o,r){return o.toLowerCase().indexOf(r.toLowerCase())>-1}e(N1,"containsText");function jt(o,r=8,t=3){if(!o)return null;if(o.length<2*r+t)return o;let n=Math.ceil((o.length-r)/2),l=o.length-r;return`${o.substr(n,r)}${".".repeat(t)}${o.substr(l)}`}e(jt,"getConciseAddress");var F5=i("div",{display:"flex",flexWrap:"wrap"}),N5=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"}}}}),A5=i("div",{width:6,margin:"20% auto",height:6,borderRadius:3,variants:{checked:{true:{backgroundColor:"$success"},false:{backgroundColor:"$neutral400"}}}}),V5=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 E5({list:o,onChange:r}){let[t,n]=z5(o.find(a=>a.selected)?.walletType||""),l=e(a=>{n(a.walletType),r(a)},"onClick");return H5(()=>{n(o.find(a=>a.selected)?.walletType||"")},[o]),A1.createElement(F5,null,o.map((a,p)=>{let u=t===a.walletType;return A1.createElement(V5,{checked:u,onClick:l.bind(null,a),key:p},A1.createElement(I,{src:a.image,alt:a.walletType,size:24}),A1.createElement(s,{variant:"body",size:"small"},a.name),A1.createElement(s,{variant:"body",size:"xsmall"},jt(a.address)),A1.createElement(N5,{checked:u},u&&A1.createElement(A5,{checked:u})))}))}e(E5,"SelectableWalletList");import{detectInstallLink as j5}from"@rango-dev/wallets-shared";import G from"react";import q5 from"react";var _5=R({"0%":{backgroundPosition:"-468px 0"},"100%":{backgroundPosition:"468px 0"}}),Ot=i("div",{$$background:"linear-gradient(90deg, $colors$info300 20%, rgba(200, 226, 255, 0.20) 70%, $colors$info300 100%)",[`.${c} &`]:{$$background:"linear-gradient(90deg, $colors$secondary600 0%,rgba(43, 52, 98, 0.20) 70%, $colors$secondary600 100%)"},background:"$$background",backgroundSize:"800px 100px",animation:`${_5} 2s infinite ease-out`,variants:{variant:{text:{borderRadius:"$sm"},circular:{borderRadius:"$lg"},rectangular:{},rounded:{borderRadius:"$sm"}},size:{small:{},medium:{},large:{}}},compoundVariants:[{size:"small",variant:"text",css:{height:"$8"}},{size:"medium",variant:"text",css:{height:"$12"}},{size:"large",variant:"text",css:{height:"$16"}}]});function T(o){let r=o.variant!=="text"?{width:o.width,height:o.height}:{width:o.width};return q5.createElement(Ot,{css:r,...o})}e(T,"Skeleton");import*as b1 from"@radix-ui/react-tooltip";import S1 from"react";import*as io from"@radix-ui/react-tooltip";var Ut=i(io.Content,{zIndex:"999999"}),Yt=i(io.Arrow,{fill:"$neutral100"}),Gt=i(s,{borderRadius:"$md",padding:"$5 $10",boxShadow:"5px 5px 10px 0px rgba(0, 0, 0, 0.10)",backgroundColor:"$neutral100"});function ae(o){let{children:r,content:t,color:n,sideOffset:l,container:a,open:p,side:u="top"}=o;return S1.createElement(b1.Provider,{delayDuration:0},S1.createElement(b1.Root,{open:p},S1.createElement(b1.Trigger,{asChild:!0},S1.createElement("div",null,r)),S1.createElement(b1.Portal,{container:a},S1.createElement(Ut,{side:u,sideOffset:l},S1.createElement(Gt,{variant:"label",size:"medium",color:n},t),S1.createElement(Yt,null)))))}e(ae,"Tooltip");import{i18n as u1}from"@lingui/core";var T2=(l=>(l.NOT_INSTALLED="not_installed",l.DISCONNECTED="disconnected",l.CONNECTING="connecting",l.CONNECTED="connected",l))(T2||{});function no(o){switch(o){case"connected":return{color:"success500",description:u1.t("Connected"),tooltipText:u1.t("Disconnect")};case"not_installed":return{color:"info500",description:u1.t("Install"),tooltipText:u1.t("Install")};case"connecting":return{color:"neutral600",description:u1.t("Connecting..."),tooltipText:u1.t("Connecting")};case"disconnected":return{color:"neutral600",description:u1.t("Disconnected"),tooltipText:u1.t("Connect")};default:throw new Error(u1.t("you need to pass a correct state to Wallet."))}}e(no,"makeInfo");var ao=i("div",{"& img":{borderRadius:"50%"}}),lo=i(s,{textTransform:"capitalize"}),so=i("div",{display:"flex",flexDirection:"column",marginTop:"$10"}),po=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:110,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},variants:{selected:{true:{outlineWidth:1,$$outline:"$colors$secondary500",[`.${c} &`]:{$$outline:"$colors$secondary400"},outlineColor:"$$outline",outlineStyle:"solid"}}}}),Xt=i("div",{borderRadius:"$xm",padding:"$10 0",border:"0",display:"flex",flexDirection:"column",backgroundColor:"$neutral100",alignItems:"center",justifyContent:"center",width:110});function O5(o){let{title:r,type:t,image:n,onClick:l,isLoading:a}=o,p=no(o.state);return a?G.createElement(Xt,null,G.createElement(T,{variant:"circular",width:35,height:35}),G.createElement(f,{size:12}),G.createElement(T,{variant:"text",width:85,size:"medium"}),G.createElement(f,{size:4}),G.createElement(T,{variant:"text",width:64,size:"medium"})):G.createElement(ae,{container:o.container,content:p.tooltipText,side:"top"},G.createElement(po,{disabled:o.state=="connecting",onClick:()=>{o.state==="not_installed"?window.open(j5(o.link),"_blank"):l(t)}},G.createElement(ao,null,G.createElement(I,{src:n,size:35})),G.createElement(so,null,G.createElement(lo,{variant:"label",size:"medium",noWrap:!1},r),G.createElement(s,{variant:"body",size:"xsmall",noWrap:!1,color:p.color},p.description))))}e(O5,"Wallet");var le=O5;import{detectInstallLink as U5}from"@rango-dev/wallets-shared";import R1 from"react";function Y5(o){let{title:r,type:t,image:n,onClick:l,selected:a,description:p,state:u}=o,g=no(o.state);return R1.createElement(po,{selected:a,disabled:o.state=="connecting",onClick:()=>{o.state==="not_installed"?window.open(U5(o.link),"_blank"):l(t)}},R1.createElement(ao,null,R1.createElement(I,{src:n,size:35})),R1.createElement(so,null,R1.createElement(lo,{variant:"label",size:"medium",noWrap:!1},r),R1.createElement(s,{variant:"body",size:"xsmall",noWrap:!1,color:u==="connected"?"neutral700":g.color},p||g.description)))}e(Y5,"SelectableWallet");import{i18n as X5}from"@lingui/core";import k1 from"react";import{TransactionType as co}from"rango-sdk";var o2=(a=>(a.ALL="ALL",a.EVM="EVM",a.COSMOS="COSMOS",a.UTXO="UTXO",a.OTHER="OTHER",a))(o2||{});var Jt={["EVM"]:Lo,["COSMOS"]:$o,["UTXO"]:Wo,["OTHER"]:To},Kt={["ALL"]:"All",["EVM"]:"EVM",["COSMOS"]:"Cosmos",["UTXO"]:"UTXO",["OTHER"]:"Other"},Qt=e((o,r)=>{switch(r){case"ALL":return!0;case"UTXO":return o.type===co.TRANSFER;case"OTHER":return o.type!==co.TRANSFER&&o.type!==co.COSMOS&&o.type!==co.EVM;default:return o.type===r}},"filterByType"),Rt=e((o,r)=>o.some(t=>Qt(t,r)),"hasAnyCategory"),G5=e(o=>Object.values(o2).filter(n=>n!=="ALL").reduce((n,l)=>{let a=o.some(p=>Qt(p,l));return n+(a?1:0)},0),"getCountCategories");var o0=i("div",{display:"grid",gap:"$10",gridTemplateColumns:"auto 1fr 1fr 1fr 1fr"}),Jg=i("div",{display:"flex",position:"relative",alignItems:"center",justifyContent:"center",paddingTop:"$10"}),Kg=i("img",{position:"absolute",top:-2,width:15,height:15});function J5(o){let{setCategory:r,category:t,isLoading:n,blockchains:l}=o,a=Object.keys(o2);return k1.createElement(o0,null,n&&Array.from(Array(5),(p,u)=>k1.createElement(T,{key:u,variant:"rounded",height:70,width:u===0?45:65})),!n&&a.map(p=>{let u=p!=="ALL"?Jt[p]:null;return Rt(l,p)&&k1.createElement(Zo,{selected:t===p,key:p,onClick:()=>r(p)},u&&k1.createElement(k1.Fragment,null,k1.createElement(u,{size:28}),k1.createElement(f,{size:12})),k1.createElement(s,{size:"xsmall",variant:"body",color:p==="ALL"?"secondary500":void 0},X5.t({id:"{blockchainCategory}",values:{blockchainCategory:Kt[p]}})))}))}e(J5,"SelectableCategoryList");import l1 from"react";var K5=i("div",{position:"relative",width:"$28",height:"$28",variants:{direction:{vertical:{margin:"auto"},horizontal:{}}}}),Q5=i("img",{width:"$28",height:"$28",borderRadius:"50%"}),R5=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"}}),oi=i("div",{display:"flex",variants:{direction:{horizontal:{alignItems:"center"},vertical:{flexDirection:"column",textAlign:"center",justifyContent:"center"}},success:{true:{filter:"none"},false:{filter:"grayscale(100%)"}}}}),ei=i("div",{variants:{pl:{true:{paddingLeft:"$4","@lg":{paddingLeft:"$8"}},false:{paddingTop:"$8"}}}}),ri=i(s,{color:"$neutral800",display:"block",paddingLeft:"$8"});function mo(o){let{logo:r,chainLogo:t,amount:n,symbol:l,blockchain:a,estimatedAmount:p,success:u=!0,direction:g="horizontal"}=o;return l1.createElement(oi,{direction:g,success:u},l1.createElement(K5,{direction:g},l1.createElement(Q5,{src:r,alt:l}),l1.createElement(R5,null,l1.createElement("img",{src:t,alt:a}))),l1.createElement(ei,{pl:g==="horizontal"},n&&l1.createElement(s,{noWrap:!0,variant:g==="vertical"?"body":"title",size:"medium"},n),!n&&p&&l1.createElement(s,{noWrap:!0,variant:g==="vertical"?"body":"title",size:"medium",color:"$neutral800"},p),"\xA0",l1.createElement(s,{variant:g==="vertical"?"body":"title",size:"medium",noWrap:!0},l),l1.createElement(ri,{noWrap:!0,variant:"body",size:"xsmall",color:"$neutral600"},"on ",a)))}e(mo,"StepDetail");import ti from"react";var ii=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"},variants:{fixedHeight:{true:{height:"633px",maxHeight:"633px"},false:{height:"auto"}}}});function ni(o){let{children:r,style:t,fixedHeight:n=!0}=o;return ti.createElement(ii,{style:t,id:"swap-box",fixedHeight:n},r)}e(ni,"SwapContainer");import J from"react";import{i18n as se}from"@lingui/core";function e0(o){switch(o){case"failed":return se.t("Failed");case"success":return se.t("Complete");default:return se.t("In progress")}}e(e0,"getStatus");function r0(o,r){if(!o)return"";let t=new Date(Number(o)),n=12,l=10;if(!r){let v={year:"numeric",month:"long",day:"numeric"};return t.toLocaleDateString(void 0,v)}let a=t.getHours(),p=t.getMinutes(),u=a>=n?"pm":"am",g=a%n===0?n:a%n,y=p<l?`0${p}`:p;return`${g}:${y} ${u}`}e(r0,"formattedDateAndTime");var t0=i("div",{display:"flex",justifyContent:"space-between",alignItems:"flex-start",flexDirection:"column",gap:10}),pe=i("div",{display:"flex",padding:0,justifyContent:"space-between",alignItems:"center",alignSelf:"stretch"}),i0=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"}}),n0=i("div",{display:"flex",padding:"$2",alignItems:"flex-start"}),a0=i("div",{$$color:"$colors$neutral100",[`.${c} &`]:{$$color:"$colors$neutral300"},backgroundColor:"$$color",border:"none",width:"100%",borderRadius:"$xm",gap:10,padding:15}),l0=i("div",{display:"flex",justifyContent:"space-between",alignItems:"flex-start",flexDirection:"column",gap:25});var s0={failed:"error500",running:"info500",success:"success500"};import{i18n as ai}from"@lingui/core";import $ from"react";import e2 from"react";var C1={small:{token:17,chain:10},medium:{token:27,chain:10},large:{token:30,chain:15}};var p0=i("div",{position:"relative",display:"flex",[`& ${I}`]:{borderRadius:"100%"}}),c0=i("div",{position:"absolute",border:"0.5px solid $background",borderRadius:"100%",backgroundColor:"$background",variants:{size:{small:{right:"-3px",bottom:"-3px"},medium:{right:"0",bottom:"0"},large:{right:"-5px",bottom:"-5px"}}}});var X=e(o=>{let{tokenImage:r,chainImage:t,size:n,useAsPlaceholder:l,loading:a}=o;return e2.createElement(p0,{css:a?{}:{width:C1[n].token,height:C1[n].token}},a?e2.createElement(T,{variant:"circular",height:C1[n].token,width:C1[n].token}):e2.createElement(I,{size:C1[n].token,src:r,type:"circular",...(l||!r)&&{useAsPlaceholder:!0}}),e2.createElement(c0,{size:n},a?e2.createElement(T,{variant:"circular",height:C1[n].chain,width:C1[n].chain}):e2.createElement(I,{size:C1[n].chain,src:t,type:"circular",...(l||!t)&&{useAsPlaceholder:!0,backgroundColor:"$secondary300"}})))},"ChainToken");var ce=i("div",{display:"flex",padding:0,alignItems:"center",gap:10}),de=i("div",{display:"flex",padding:0,alignItems:"center",alignSelf:"stretch"}),me=i("div",{display:"flex",alignItems:"flex-start",variants:{direction:{column:{flexDirection:"column",flex:"1 0 0"},row:{padding:0}}}}),d0=i("div",{display:"flex",alignItems:"center",alignSelf:"stretch"}),M2=i("div",{display:"flex",padding:0,flexDirection:"column",justifyContent:"center",alignItems:"flex-start"}),ue=i("div",{display:"flex",padding:"$4",width:"$32",height:"$32",justifyContent:"center",alignItems:"center"}),m0=i("div",{display:"flex",alignItems:"center",justifyContent:"center"}),u0=i("div",{display:"flex",width:"$24",height:"$24",justifyContent:"center",alignItems:"center"}),Uf=i("div",{display:"flex",padding:0,alignItems:"center",gap:25});function Ce(o){if("isLoading"in o)return $.createElement(ce,null,$.createElement(de,null,$.createElement("div",null,$.createElement(X,{tokenImage:"",chainImage:"",size:"medium",loading:!0})),$.createElement("div",{style:{transform:"translateX(-5px)"}},$.createElement(X,{tokenImage:"",chainImage:"",size:"medium",loading:!0}))),$.createElement(m0,null,$.createElement(M2,null,$.createElement(T,{variant:"text",size:"medium",width:76}),$.createElement(f,{size:8}),$.createElement(T,{variant:"text",size:"medium",width:60})),$.createElement(u0,null,$.createElement(M1,{size:12,color:"gray"})),$.createElement(M2,null,$.createElement(T,{variant:"text",size:"medium",width:76}),$.createElement(f,{size:8}),$.createElement(T,{variant:"text",size:"medium",width:60}))));let{data:{from:{token:r,amount:t,blockchain:n},to:{estimatedAmount:l,token:a,amount:p,blockchain:u}},status:g}=o;return $.createElement(ce,null,$.createElement(de,null,$.createElement("div",null,$.createElement(X,{tokenImage:r.image,chainImage:n.image,size:"large"})),$.createElement("div",{style:{transform:"translateX(-10px)"}},$.createElement(X,{tokenImage:a.image,chainImage:u.image,size:"large"}))),g==="running"?$.createElement(me,{direction:"column"},$.createElement(d0,null,$.createElement(s,{size:"medium",variant:"title"},r.displayName),$.createElement(ue,null,$.createElement(M1,{size:24,color:"black"})),$.createElement(s,{size:"medium",variant:"title"},a.displayName)),$.createElement(s,{size:"small",variant:"body",color:"neutral700"},ai.t("Waiting for bridge transaction"))):$.createElement(me,{direction:"row"},$.createElement(M2,null,$.createElement(s,{size:"medium",variant:"title"},r.displayName),!!t&&$.createElement(s,{size:"small",variant:"body",color:"neutral700"},t)),$.createElement(ue,null,$.createElement(M1,{size:24,color:"black"})),$.createElement(M2,null,$.createElement(s,{size:"medium",variant:"title"},a.displayName),$.createElement(s,{size:"small",variant:"body",color:"neutral700"},p||l))))}e(Ce,"SwapToken");function li(o){if("isLoading"in o)return J.createElement(a0,null,J.createElement(l0,null,J.createElement(pe,null,J.createElement(T,{variant:"text",size:"medium",width:76}),J.createElement(T,{variant:"text",size:"medium",width:76})),J.createElement(Ce,{isLoading:!0})));let{onClick:r,requestId:t,creationTime:n,onlyShowTime:l,status:a,swapTokenData:p}=o;return J.createElement(i0,{onClick:r.bind(null,t)},J.createElement(t0,null,J.createElement(pe,null,J.createElement(n0,null,J.createElement(s,{variant:"label",size:"medium",color:"neutral600"},r0(n,l))),J.createElement(s,{variant:"label",size:"medium",color:s0[a]},e0(a))),J.createElement(Ce,{data:p,status:a})))}e(li,"SwapListItem");import{i18n as C0}from"@lingui/core";import P2 from"react";var si=i("div",{height:"450px"}),pi=i("div",{display:"flex",justifyContent:"center",width:"100%",paddingTop:"33%",flex:1});function ci(o){let{requestId:r,loading:t,onBack:n}=o;return P2.createElement(m1,{title:C0.t("Swap Details"),textField:!1,onBack:n},P2.createElement(si,null,t?P2.createElement(pi,null,P2.createElement(E,{size:24})):P2.createElement(A,{type:"error",title:C0.t({id:"Swap with request ID = {requestId} not found.",values:{requestId:r}})})))}e(ci,"SwapDetailsPlaceholder");import f0 from"react";import*as uo from"@radix-ui/react-switch";var h0=i(uo.Root,{boxSizing:"border-box",boxShadow:"none",borderStyle:"solid",width:"24px",height:"16px",$$color:"$colors$neutral600",[`.${c} &`]:{$$color:"$colors$neutral700"},backgroundColor:"$$color",borderColor:"$$color",borderRadius:"99999px",position:"relative",padding:"0",cursor:"pointer",transition:"all 0.35s",'&[data-state="checked"]':{$$color:"$colors$secondary500",[`.${c} &`]:{$$color:"$colors$secondary400"},backgroundColor:"$$color",borderColor:"$$color"},"-webkit-tap-highlight-color":"rgba(0, 0, 0, 0)"}),g0=i(uo.Thumb,{position:"absolute",top:"0",boxSizing:"border-box",display:"block",width:"12px",height:"12px",backgroundColor:"$background",borderColor:"$secondary100",transition:" transform 300ms",borderRadius:"999999px",willChange:"transform",'&[data-state="checked"]':{transform:"translateX(8px)"}});function di(o){let{checked:r,onChange:t}=o;return f0.createElement(h0,{checked:r,onCheckedChange:t},f0.createElement(g0,null))}e(di,"Switch");import ge,{forwardRef as yi,useEffect as v0,useState as fe}from"react";import Co from"react";import mi from"react-virtualized-auto-sizer";import{VariableSizeList as ui}from"react-window";import Ci from"react-window-infinite-loader";function he(o){let{itemCount:r,hasNextPage:t,loadNextPage:n,Item:l,innerElementType:a,size:p}=o,u=e(g=>!t||g<r,"isItemLoaded");return Co.createElement(mi,null,({width:g,height:y})=>Co.createElement(Ci,{isItemLoaded:u,itemCount:t?r+1:r,loadMoreItems:n,threshold:1},({onItemsRendered:b,ref:v})=>Co.createElement(ui,{innerElementType:a,ref:v,itemSize:()=>p,itemCount:r,height:y||0,width:g||0,onItemsRendered:b},({index:M,style:j})=>u(M)?Co.createElement(l,{index:M,style:j}):null)))}e(he,"VirtualizedList");import s1 from"react";var hi=i("div",{paddingRight:"$16"}),gi=i("div",{display:"flex",flexDirection:"column"}),fi=i("div",{display:"flex",flexDirection:"column",alignItems:"flex-end"});function y0(o){let{token:r,style:t,onClick:n,selected:l}=o;return s1.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",...t,height:"48px",top:`${parseFloat(t?.top)+0}px`,padding:"0 4px"}},s1.createElement(k,{variant:"outlined",size:"large",onClick:n.bind(null,r),type:l?"primary":void 0,prefix:s1.createElement(hi,null,s1.createElement(I,{src:r.image,size:32})),suffix:r.balance?.amount&&s1.createElement(fi,null,s1.createElement(s,{variant:"body",size:"small"},r.balance.amount),s1.createElement(s,{variant:"body",size:"xsmall"},`${r.balance.usdValue}$`))},s1.createElement(gi,null,s1.createElement(s,{variant:"body",size:"medium"},r.symbol),s1.createElement(s,{variant:"body",size:"xsmall",color:"neutral800"},r.name))))}e(y0,"TokenItem");var x0=20;function ye(o){let{list:r,searchedText:t,onChange:n,multiSelect:l,selectedList:a}=o,[p,u]=fe(o.selected),g=e(B=>{u(B),n(B)},"changeSelected"),y=e(B=>l&&a?a.map(F=>F.symbol+F.address).indexOf(B.symbol+B.address)>-1:p?.symbol===B.symbol&&p?.address===B.address,"isSelected"),[b,v]=fe(!0),[M,j]=fe(r),O=e(()=>{j(r.slice(0,M.length+x0))},"loadNextPage");v0(()=>{j(r.slice(0,x0))},[t,r]),v0(()=>{v(r.length>M.length)},[M.length]);let Q=yi(({style:B,...F},U)=>ge.createElement("div",{ref:U,style:{...B,height:`${parseFloat(B?.height)+8*2}px`},...F}));return ge.createElement(he,{Item:({index:B,style:F})=>ge.createElement(y0,{token:M[B],style:F,onClick:g,selected:y(M[B])}),hasNextPage:b,itemCount:M.length,loadNextPage:O,innerElementType:Q,size:56})}e(ye,"TokenList");import{i18n as $0}from"@lingui/core";import Z from"react";var vi=i("div",{display:"flex",flexDirection:"column",width:"100%",overflow:"hidden"}),xi=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%"}}}),w0=i("span",{width:"24px",height:"24px",backgroundColor:"$background",borderRadius:"99999px"}),$i=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 wi(o){let{chain:r,token:t,loadingStatus:n,percentageChange:l}=o,a=Z.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"}},n==="failed"&&Z.createElement(v1,{color:"error",size:24}));return Z.createElement(vi,null,Z.createElement(xi,{type:"outlined"},Z.createElement("div",{className:"head"},Z.createElement(s,{variant:"body",size:"small",color:"neutral600"},o.label),Z.createElement("div",null,l,o.usdValue&&Z.createElement(s,{variant:"body",size:"xsmall",color:"neutral800",className:"usd-value"},`$${o.usdValue}`))),Z.createElement("div",{className:"form"},Z.createElement(k,{className:"selectors",variant:"outlined",loading:n==="loading",prefix:n==="success"&&r?Z.createElement(I,{src:r.logo,size:24}):Z.createElement(w0,null),suffix:a,size:"large"},n==="success"&&r?r.displayName:$0.t("Chain")),Z.createElement(f,{size:12,direction:"horizontal"}),Z.createElement(k,{className:"selectors",variant:"outlined",loading:n==="loading",prefix:n==="success"&&t?Z.createElement(I,{src:t.image,size:24}):Z.createElement(w0,null),suffix:a,size:"large"},n==="success"&&t?t.symbol:$0.t("Token")),Z.createElement(f,{size:12,direction:"horizontal"}),Z.createElement("div",{className:"amount"},Z.createElement($i,null,Z.createElement(s,{variant:"title",size:"medium"},o.amount))))))}e(wi,"TokenPreview");import ve from"react";var L0=i("div",{display:"flex",justifyContent:"center",alignItems:"center"});function B2(o){let{size:r,outputUsdValue:t,percentageChange:n,warningLevel:l,error:a}=o,p="$neutral600";return!t||l==="low"?p="$warning500":l==="high"&&(p="$error500"),ve.createElement(L0,null,t&&ve.createElement(s,{size:r==="small"?"small":"medium",variant:"body",color:"$neutral600"},`~$${t}`),(t&&n||!t)&&ve.createElement(s,{size:r==="small"?"small":"medium",variant:"body",ml:4,color:p},t&&n&&`(${n.includes("-")?n:`-${n}`}${n?"%":"-"})`,!t&&a))}e(B2,"PriceImpact");import k0 from"react";import r2 from"react";var S0=i("li",{width:"100%",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"},variants:{hasDivider:{true:{borderBottom:"1px solid",$$color:"$colors$neutral300",[`.${c} &`]:{$$color:"$colors$neutral400"},borderColor:"$$color",borderBottomRightRadius:0,borderBottomLeftRadius:0}}}});function W2(o){let{start:r,title:t,description:n,end:l,onClick:a,hasDivider:p,...u}=o;return r2.createElement(S0,{hasDivider:p,onClick:a,...u},r&&r2.createElement("div",{className:"item-start-container"},r),r2.createElement("div",{className:"item-text-container"},t&&r2.createElement("div",{className:"item-text-title"},t),n&&r2.createElement(s,{variant:"body",className:"_description",size:"small"},n)),l&&r2.createElement("div",{className:"item-end-container"},l))}e(W2,"ListItem");var b0=i("button",{transition:"all 0.35s",border:0,width:"100%",backgroundColor:"transparent",fontFamily:"inherit","&: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 Li(o){let{onClick:r,id:t,style:n,hasDivider:l,selected:a,...p}=o;return k0.createElement(b0,{hasDivider:l,selected:a,onClick:e(()=>{r&&r(t)},"onClickWithKey"),style:n},k0.createElement(W2,{...p}))}e(Li,"ListItemButton");import xe from"react";var I0=i("ul",{padding:0,margin:0,listStyle:"none"});function Si(o){let r=o.type;return xe.createElement(I0,{as:o.as},o.items.map(t=>{let{id:n,...l}=t;return r?xe.cloneElement(r,{...l,key:n,id:n}):xe.createElement(W2,{key:n,...l})}))}e(Si,"List");import Z2 from"react";var T0=i("div",{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"});function bi(o){return Z2.createElement(T0,null,Z2.createElement(Po,{color:"secondary",size:26}),Z2.createElement(f,{size:4}),Z2.createElement(s,{variant:"title",size:"medium"},o.title),Z2.createElement(s,{variant:"body",size:"medium",color:"neutral700"},o.description))}e(bi,"NotFound");import q from"react";var M0=i("div",{borderRadius:"$xs",display:"flex",justifyContent:"start",alignItems:"center",paddingBottom:"$10","& .item":{display:"flex",alignItems:"center"},"& .icon":{width:"$16",height:"$16",display:"flex",justifyContent:"center",alignItems:"center"}}),$e=i("div",{height:"$12",marginLeft:"$10",marginRight:"$10",borderLeft:"1px solid $foreground"});function ki(o){let{fee:r,time:t,steps:n}=o;return q.createElement(M0,null,q.createElement("div",{className:"item"},q.createElement("div",{className:"icon"},q.createElement(So,{size:12,color:"gray"})),q.createElement(s,{ml:2,align:"center",variant:"body",size:"small"},"$",r)),q.createElement($e,null),q.createElement("div",{className:"item"},q.createElement("div",{className:"icon"},q.createElement(Bo,{size:12,color:"gray"})),q.createElement(s,{ml:2,align:"center",variant:"body",size:"small"},t)),q.createElement($e,null),q.createElement("div",{className:"item"},q.createElement("div",{className:"icon"},q.createElement(Io,{size:16,color:"gray"})),q.createElement(s,{ml:2,align:"center",variant:"body",size:"small"},n)))}e(ki,"QuoteCost");import t1 from"react";import{styled as Ii}from"@stitches/react";var P0=Ii("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"}}},"& .token-amount":{display:"flex",justifyContent:"center",alignItems:"center"},"& .usd-value":{display:"flex",paddingTop:"$5"}});function Ti(o){return t1.createElement(P0,{direction:o.direction,centerAlign:o.centerAlign},t1.createElement("div",{className:"token-amount"},t1.createElement(X,{chainImage:o.chain.image,tokenImage:o.token.image,size:"medium"}),t1.createElement("div",null,o.label&&t1.createElement(s,{ml:4,size:"xsmall",variant:"body",color:"$neutral700"},o.label),t1.createElement("div",{title:`${o.price.value} ${o.token.displayName}`},t1.createElement(s,{ml:4,size:"medium",variant:"title",style:{fontWeight:600}},o.price.value),t1.createElement(s,{ml:8,size:"medium",variant:"title",style:{fontWeight:400}},o.token.displayName)))),t1.createElement("div",{className:"usd-value"},o.type==="input"&&t1.createElement(s,{mr:4,size:"small",variant:"body",color:"$neutral700"},`~$${o.price.usdValue}`),o.type==="output"&&t1.createElement(B2,{size:"small",outputUsdValue:o.price.usdValue,percentageChange:o.percentageChange,warningLevel:o.warningLevel})))}e(Ti,"TokenAmount");import{i18n as Mi}from"@lingui/core";import V,{forwardRef as Pi,memo as Bi,useEffect as Wi,useRef as Zi}from"react";var B0=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":{$$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"}}},"& .swapper":{display:"flex",alignItems:"center"},"& .swapper__description":{fontWeight:"$medium"},"& .step-info":{display:"flex",flex:"1",width:"100%",alignItems:"start",variants:{tx:{true:{paddingLeft:"36px"}}}},"& div:nth-child(3)":{display:"flex",flexDirection:"column",flex:1},"& .tokens-container":{width:"100%"},"& .tokens":{display:"flex",paddingTop:"$5",paddingBottom:"$10",alignItems:"center"}}),W0=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"}}}}),Z0=i("div",{width:"100%",variants:{pb:{true:{paddingBottom:"35px"}}}}),D0=i("div",{borderLeft:"1px dashed black",minHeight:"64px",margin:"0 11.5px",alignSelf:"stretch",variants:{invisible:{true:{visibility:"hidden",minHeight:"unset"}}}}),H0=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"}}}});var z0=Pi((o,r)=>{let{step:t,hasSeparator:n,type:l,state:a,isFocused:p,tabIndex:u}=o,g=Zi(null),y=a==="completed"||a==="error";return Wi(()=>{let b=r?.current,v=g.current;p&&v&&b&&(b.scrollTop=v.offsetTop-b.offsetTop)},[p]),V.createElement(B0,{type:l,state:a,ref:g,tabIndex:u},V.createElement("div",{className:"swapper"},l==="swap-progress"&&n&&V.createElement(H0,{state:a}),V.createElement(W0,{state:a},V.createElement(I,{size:22,src:t.swapper.image})),V.createElement(s,{className:"swapper__description",ml:8,size:"small",variant:"body"},Mi.t({id:"Swap on {fromChain} via {swapper}",values:{fromChain:t.from.chain.displayName,swapper:t.swapper.displayName}}))),V.createElement("div",{className:"step-info"},V.createElement(D0,{invisible:!n||l==="swap-progress"}),V.createElement("div",{className:"tokens-container"},V.createElement("div",{className:"tokens"},V.createElement(X,{chainImage:t.from.chain.image,tokenImage:t.from.token.image,size:"small"}),V.createElement(s,{ml:4,mr:4,size:"small",color:"$neutral700",variant:"body"},`${t.from.price.value} ${t.from.token.displayName}`),V.createElement(M1,{color:"gray"}),V.createElement(f,{size:4,direction:"horizontal"}),V.createElement(X,{chainImage:t.to.chain.image,tokenImage:t.to.token.image,size:"small"}),V.createElement(s,{ml:4,size:"small",color:"$neutral700",variant:"body"},`${y?"":"~"}${t.to.price.value} ${t.to.token.displayName}`)),V.createElement(Z0,{pb:n&&l==="quote-details"},t.alerts))))});z0.displayName="StepDetailsComponent";var Di=Bi(z0);import*as t2 from"@radix-ui/react-popover";import V1 from"react";import*as ho from"@radix-ui/react-popover";var F0=i(ho.Content,{borderRadius:"$sm",filter:"drop-shadow(0px 5px 20px rgba(130, 130, 130, 0.20))",backgroundColor:"$neutral100"}),N0=i(ho.Arrow,{fill:"$neutral100",width:"$16",height:"$8"});var Hi=0,zi=0,Fi=e((o,r)=>{let{container:t,children:n,...l}=o;return V1.createElement(t2.Portal,{container:t},V1.createElement(F0,{...l,ref:r},n,V1.createElement(N0,null)))},"PopoverContentComponent"),A0=V1.forwardRef(Fi);A0.displayName="PopoverContent";function Ni(o){let{children:r,content:t,side:n="bottom",sideOffset:l=Hi,alignOffset:a=zi,align:p="center",collisionBoundary:u=[],collisionPadding:g=0,container:y=document.body}=o;return V1.createElement(t2.Root,null,V1.createElement(t2.Trigger,{asChild:!0},r),V1.createElement(A0,{align:p,alignOffset:a,collisionBoundary:u,collisionPadding:g,side:n,sideOffset:l,container:y},t))}e(Ni,"Popover");import E1 from"react";var I1="1em";function V0(o){let{size:r=I1}=o;return E1.createElement("svg",{width:r,height:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},E1.createElement("mask",{id:"a"},E1.createElement("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})),E1.createElement("g",{mask:"url(#a)"},E1.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"}),E1.createElement("path",{fill:"#0052b4",d:"M336 0v108L444 0Zm176 68L404 176h108zM0 176h108L0 68ZM68 0l108 108V0Zm108 512V404L68 512ZM0 444l108-108H0Zm512-108H404l108 108Zm-68 176L336 404v108z"}),E1.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(V0,"English");import _1 from"react";function E0(o){let{size:r=I1}=o;return _1.createElement("svg",{width:r,height:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},_1.createElement("mask",{id:"a"},_1.createElement("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})),_1.createElement("g",{mask:"url(#a)"},_1.createElement("path",{fill:"#eee",d:"M167 0h178l25.9 252.3L345 512H167l-29.8-253.4z"}),_1.createElement("path",{fill:"#0052b4",d:"M0 0h167v512H0z"}),_1.createElement("path",{fill:"#d80027",d:"M345 0h167v512H345z"})))}e(E0,"French");import i2 from"react";function _0(o){let{size:r=I1}=o;return i2.createElement("svg",{width:r,height:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},i2.createElement("mask",{id:"a"},i2.createElement("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})),i2.createElement("g",{mask:"url(#a)"},i2.createElement("path",{fill:"#eee",d:"M0 0h512v512H0z"}),i2.createElement("circle",{cx:"256",cy:"256",r:"111.3",fill:"#d80027"})))}e(_0,"Japanese");import w from"react";function q0(o){let{size:r=I1}=o;return w.createElement("svg",{width:r,height:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},w.createElement("mask",{id:"a"},w.createElement("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})),w.createElement("g",{mask:"url(#a)"},w.createElement("path",{fill:"#ffda44",d:"m0 128 256-32 256 32v256l-256 32L0 384Z"}),w.createElement("path",{fill:"#d80027",d:"M0 0h512v128H0zm0 384h512v128H0z"}),w.createElement("g",{fill:"#eee"},w.createElement("path",{d:"M144 304h-16v-80h16zm128 0h16v-80h-16z"}),w.createElement("ellipse",{cx:"208",cy:"296",rx:"48",ry:"32"})),w.createElement("g",{fill:"#d80027"},w.createElement("rect",{width:"16",height:"24",x:"128",y:"192",rx:"8"}),w.createElement("rect",{width:"16",height:"24",x:"272",y:"192",rx:"8"}),w.createElement("path",{d:"M208 272v24a24 24 0 0 0 24 24 24 24 0 0 0 24-24v-24h-24z"})),w.createElement("rect",{width:"32",height:"16",x:"120",y:"208",fill:"#ff9811",ry:"8"}),w.createElement("rect",{width:"32",height:"16",x:"264",y:"208",fill:"#ff9811",ry:"8"}),w.createElement("rect",{width:"32",height:"16",x:"120",y:"304",fill:"#ff9811",rx:"8"}),w.createElement("rect",{width:"32",height:"16",x:"264",y:"304",fill:"#ff9811",rx:"8"}),w.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"}),w.createElement("path",{d:"M122 252h172m-172 24h28m116 0h28"}),w.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"}),w.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"}),w.createElement("path",{fill:"none",d:"M220 284v12c0 7 5 12 12 12s12-5 12-12v-12z"}),w.createElement("path",{fill:"#ff9811",d:"M200 160h16v32h-16z"}),w.createElement("path",{fill:"#eee",d:"M208 224h48v48h-48z"}),w.createElement("path",{fill:"#d80027",d:"m248 208-8 8h-64l-8-8c0-13 18-24 40-24s40 11 40 24zm-88 16h48v48h-48z"}),w.createElement("rect",{width:"20",height:"32",x:"222",y:"232",fill:"#d80027",rx:"10",ry:"10"}),w.createElement("path",{fill:"#ff9811",d:"M168 232v8h8v16h-8v8h32v-8h-8v-16h8v-8zm8-16h64v8h-64z"}),w.createElement("g",{fill:"#ffda44"},w.createElement("circle",{cx:"186",cy:"202",r:"6"}),w.createElement("circle",{cx:"208",cy:"202",r:"6"}),w.createElement("circle",{cx:"230",cy:"202",r:"6"})),w.createElement("path",{fill:"#d80027",d:"M169 272v43a24 24 0 0 0 10 4v-47h-10zm20 0v47a24 24 0 0 0 10-4v-43h-10z"}),w.createElement("g",{fill:"#338af3"},w.createElement("circle",{cx:"208",cy:"272",r:"16"}),w.createElement("rect",{width:"32",height:"16",x:"264",y:"320",ry:"8"}),w.createElement("rect",{width:"32",height:"16",x:"120",y:"320",ry:"8"}))))}e(q0,"Spanish");import{i18n as Ai}from"@lingui/core";import D from"react";var Vi=i("div",{display:"flex",flexDirection:"column"}),Ei=i("div",{position:"relative",paddingBottom:"$12"}),_i=i("div",{width:"100%",paddingTop:"$16"}),qi=i("div",{width:"100%",paddingTop:"$16"}),ji=i("div",{display:"flex",flexDirection:"column",width:"100%",paddingTop:"$16"});function Oi({bestRoute:o,fromBlockchain:r,toBlockchain:t,fromToken:n,toToken:l,setInputAmount:a,outputAmount:p,inputAmount:u,loadingStatus:g,showBestRoute:y,fetchingBestRoute:b,outputUsdValue:v,inputUsdValue:M,swapButtonTitle:j,swapButtonDisabled:O,swapButtonClick:Q,onChainClick:B,onTokenClick:F,connectedWallets:U,errorMessage:l2,hasLimitError:s2,swap:Pe,fromAmountRangeError:n3,recommendation:a3,swithFromAndToComponent:l3,percentageChange:s3,tokenBalanceReal:Be,tokenBalance:We,swapFromAmount:p3,showPercentageChange:c3}){return D.createElement(Vi,null,D.createElement(S2,{title:Ai.t("SWAP"),suffix:D.createElement(D.Fragment,null)}),D.createElement(Ei,null,D.createElement(D.Fragment,null,D.createElement(go,{type:"From",chain:r,token:n,onAmountChange:a,inputAmount:u,fromBlockchain:r,toBlockchain:t,loadingStatus:g,inputUsdValue:M,fromToken:n,setInputAmount:a,connectedWallets:U,bestRoute:o,fetchingBestRoute:b,onChainClick:()=>B("from-chain"),onTokenClick:()=>F("from-token"),tokenBalanceReal:Be,tokenBalance:We}),l3)),D.createElement(go,{type:"To",chain:t,token:l,outputAmount:p,percentageChange:s3,outputUsdValue:v,fromBlockchain:r,toBlockchain:t,loadingStatus:g,inputUsdValue:M,fromToken:n,setInputAmount:a,connectedWallets:U,inputAmount:u,bestRoute:o,fetchingBestRoute:b,onChainClick:()=>B("to-chain"),onTokenClick:()=>F("to-token"),tokenBalanceReal:Be,tokenBalance:We,showPercentageChange:c3}),y&&D.createElement(_i,null),(l2||s2(o))&&D.createElement(qi,null,l2&&D.createElement(A,{type:"error"},l2),s2(o)&&D.createElement(A,{type:"error",title:`${Pe?.swapperId} Limit`},D.createElement(D.Fragment,null,D.createElement(s,{variant:"body",size:"small"},`${n3}, Yours: ${p3} ${Pe?.from.symbol}`),D.createElement(s,{variant:"body",size:"small"},a3)))),D.createElement(ji,null,D.createElement(k,{type:"primary",size:"large",disabled:O,onClick:Q},j),D.createElement(w2,null)))}e(Oi,"HomePanel");import C,{useState as Xi}from"react";import H,{useState as Ui}from"react";var Yi=e(o=>!o||o==="info"?"info":o,"getAlertType"),Gi=i("div",{width:"90%",overflowWrap:"break-word",color:"$error500 !important"}),we=i(s,{color:"$success500 !important"}),j0=e(o=>{let{shortMessage:r,detailedMessage:t,currentStepBlockchain:n,type:l,lastConvertedTokenInFailedSwap:a}=o,[p,u]=Ui(!1),g=t.long?0:150,y=!p&&t.content.length>g;return H.createElement(A,{type:Yi(l),title:r,...y&&{footer:H.createElement(k,{variant:"outlined",type:"primary",onClick:u.bind(null,b=>!b)},"Show more details")},...!!o.switchNetwork&&{footer:H.createElement(k,{variant:"outlined",type:"primary",onClick:()=>{o?.switchNetwork&&o.switchNetwork().catch(b=>{console.log(b)})}},"Change network to ",n)}},t.content?H.createElement(Gi,null,H.createElement(s,{variant:"body",size:"small"},y&&!p?t.content.substring(0,g)+(g>0?"...":""):t.content)):null,!!a&&H.createElement(H.Fragment,null,H.createElement("p",null,H.createElement(s,{variant:"body",size:"small"},"Do not worry, your fund is\xA0"),H.createElement(we,{variant:"body",size:"small"},H.createElement("b",null,"Safe"))),H.createElement("p",null,H.createElement(s,{variant:"body",size:"small"},"It is converted to \xA0",H.createElement("u",null,a.outputAmount),"\xA0"),H.createElement(we,{variant:"body",size:"small"},H.createElement("b",null,a.symbol,"\xA0")),H.createElement(s,{variant:"body",size:"small"},"on your\xA0"),H.createElement(we,{variant:"body",size:"small"},H.createElement("b",null,a.blockchain,"\xA0")),H.createElement(s,{variant:"body",size:"small"},"wallet"))))},"SwapMessages");var Ji=R({"0%":{opacity:1},"50%":{opacity:.3},"100%":{opacity:1}}),Ki=i("div",{display:"flex",alignItems:"center",paddingLeft:"$4",variants:{created:{true:{filter:"grayscale(100%)"}},running:{true:{animation:`${Ji} 2s ease-in-out infinite`}}}}),Mw=i("div",{height:"100%",display:"flex",justifyContent:"center",alignItems:"center"}),Pw=i(s,{color:"$error500"}),Qi=i("div",{paddingLeft:"$16",color:"$neutral600"}),Ri=i("div",{display:"flex",alignItems:"center"}),on=i("div",{position:"relative"}),Bw=i("div",{display:"flex",alignItems:"center"}),en=i("div",{width:"$8",height:"$8",backgroundColor:"$foreground",borderRadius:"4px",marginLeft:"11px"}),rn=i("div",{width:"0px",height:"0px",borderLeft:"5px solid transparent",borderRight:"5px solid transparent",borderTop:"5px solid $foreground",marginLeft:"$10"}),tn=i("a",{color:"$primary500",fontWeight:"$600"}),nn=i("div",{display:"flex",flexDirection:"column",paddingBottom:"$16",borderBottom:"1px solid $background"}),an=i("div",{display:"flex",".details":{padding:"$8 0"}}),O0=i("div",{display:"flex",margin:"$12 0 $12 $20"}),U0=i("div",{display:"flex",alignItems:"center"}),Y0=i(s,{color:"$success500",paddingLeft:"$4"}),G0=i("div",{width:"0",minHeight:"$16",marginLeft:"14px",border:"1px dashed $foreground",borderRadius:"inherit"}),ln=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"}}),sn=i("div",{width:"150px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","@md":{width:"auto"}}),pn=i("div",{padding:"0",color:"$neutral800",fontSize:"$10"}),cn=i("div",{overflowY:"auto",padding:"$8 $4 $2 $4"});function dn(o){let{pendingSwap:r,onBack:t,onCopy:n,isCopied:l,onCancel:a,date:p,onRetry:u,...g}=o,[y,b]=Xi(!1);return C.createElement(m1,{title:"Swap Details",textField:!1,onBack:t,Footer:C.createElement(C.Fragment,null,r?.status==="running"&&C.createElement(k,{variant:"outlined",fullWidth:!0,type:"error",onClick:b.bind(null,!0)},"Cancel"),!!u&&C.createElement(k,{variant:"contained",fullWidth:!0,type:"primary",onClick:u},"Try again"))},C.createElement("div",null,C.createElement(nn,null,C.createElement(ln,null,C.createElement("div",{className:"name"},"Request Id:",C.createElement("span",{className:"value requestId",onClick:n.bind(null,r?.requestId)},C.createElement(sn,null,r?.requestId),C.createElement(f,{size:4,direction:"horizontal"}),C.createElement(k,{type:"primary",variant:"ghost",size:"small"},l?"Copied!":"Copy"))),C.createElement("div",{className:"name"},C.createElement("span",{className:`value status ${r?.status||""}`},r?.status,r?.status==="running"&&C.createElement(E,{size:16,color:"primary"})),C.createElement(pn,null,p))))),C.createElement(cn,null,g.shortMessage&&C.createElement(j0,{...g}),C.createElement(f,{size:16}),r?.steps.map((v,M)=>{let j=`step-${M}`;return C.createElement("div",{key:j},M===0&&C.createElement(on,null,C.createElement(mo,{logo:v.fromLogo,symbol:v.fromSymbol,chainLogo:v.fromBlockchainLogo||"",blockchain:v.fromBlockchain,amount:r.inputAmount}),C.createElement(en,null)),C.createElement(G0,null),C.createElement(Ki,{created:v.status==="created",running:!["created","success","failed"].includes(v.status)},C.createElement(I,{src:v.swapperLogo||"",alt:v.swapperId,size:20}),C.createElement(Qi,null,C.createElement(s,{variant:"body",size:"small"},v.swapperType==="DEX"?"Swap":"Bridge"," via"," ",v.swapperId),C.createElement(Ri,null,C.createElement(G1,null),C.createElement(s,{variant:"body",size:"small"},"\xA0 $",v.feeInUsd," estimated gas fee")))),C.createElement("div",{style:{display:"flex"}},C.createElement(an,null,C.createElement(G0,null),C.createElement("div",{className:"details"},!!v.explorerUrl&&C.createElement("div",null,v.explorerUrl.map((O,Q)=>{let B=`internal-${Q}`,F=`anchor-${Q}`;return C.createElement(O0,{key:B},C.createElement(U0,null,C.createElement(f,{size:4}),C.createElement(G2,{color:"primary"}),C.createElement(Y0,{variant:"body",size:"small"},C.createElement(tn,{href:O.url,target:"_blank",rel:"noreferrer",key:F},O.description?C.createElement("b",null,O.description.substring(0,1).toUpperCase(),O.description.substring(1)," Tx"):C.createElement("b",null,"View transaction")))))})),v.status==="failed"&&C.createElement(O0,null,C.createElement(U0,null,C.createElement(v1,{color:"error"}),C.createElement(Y0,{variant:"body",size:"small",color:"$error500"},"Step failed")))))),M+1===r.steps.length&&C.createElement(rn,null),C.createElement(mo,{logo:v.toLogo,symbol:v.toSymbol,chainLogo:v.toBlockchainLogo||"",blockchain:v.toBlockchain,amount:v.outputAmount||"",estimatedAmount:v.expectedOutputAmountHumanReadable||"",success:v.status==="success"}))}),C.createElement(f,{size:32})),C.createElement(zo,{onClose:b.bind(null,!1),open:y,anchor:"bottom",title:"Cancel Progress",footer:C.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"}},C.createElement(k,{variant:"contained",type:"success",onClick:b.bind(null,!1)},"Skip"),C.createElement(f,{size:16,direction:"horizontal"}),C.createElement(k,{variant:"contained",type:"error",onClick:()=>{a(r.requestId),b(!1)}},"Cancel progress")),container:document.getElementById("swap-box")},C.createElement(A,{type:"warning"},C.createElement(s,{variant:"body",size:"small"},"Warning: Cancel ",C.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(dn,"SwapHistory");import i1 from"react";import n2,{useState as mn}from"react";var un=i("div",{display:"grid",gap:".5rem",gridTemplateColumns:" repeat(2, minmax(0, 1fr))",alignContent:"baseline",width:"100%",height:"100%"}),Cn=i("div",{paddingRight:"$4"});function Le(o){let{list:r,onChange:t,multiSelect:n,selectedList:l}=o,[a,p]=mn(o.selected),u=e(y=>{p(y),t(y)},"changeSelectedBlockchain"),g=e(y=>n&&l?l==="all"||l.findIndex(v=>y===v.name)>-1:y===a?.name,"isSelect");return n2.createElement(un,null,r.map((y,b)=>{let v=`item-${b}`;return n2.createElement(k,{type:g(y.name)?"primary":void 0,variant:"outlined",size:"large",prefix:n2.createElement(Cn,null,n2.createElement(I,{size:24,src:y.logo})),suffix:g(y.name)?n2.createElement(Ho,null):void 0,onClick:u.bind(null,y),key:v},n2.createElement(s,{variant:"body",size:"small"},y.displayName))}))}e(Le,"BlockchainsList");import a2 from"react";var Se=i("div",{display:"flex",justifyContent:"center",width:"100%",paddingTop:"33%",flex:1}),hn=e((o,r)=>o.filter(t=>N1(t.symbol,r)||N1(t.address||"",r)||N1(t.name||"",r)),"filterTokens");function gn(o){let{list:r,type:t,selected:n,hasHeader:l,onChange:a,onBack:p,loadingStatus:u}=o;return a2.createElement(m1,{textField:!0,hasHeader:l,title:`Select ${t} token`,onBack:p,textFieldPlaceholder:"Search tokens by name"},g=>{let y=hn(r,g);return u==="loading"?a2.createElement(Se,null,a2.createElement(E,{size:24})):u==="failed"?a2.createElement(v2,null):y.length?a2.createElement(ye,{searchedText:g,list:y,selected:n,onChange:a}):a2.createElement(x2,{catergory:"Token",searchedFor:g})})}e(gn,"TokenSelector");var fn=i("div",{overflowY:"auto",padding:"0 $4"}),yn=e((o,r)=>o.filter(t=>N1(t.name,r)||N1(t.displayName,r)),"filterBlockchains");function vn(o){let{type:r,list:t,onChange:n,selected:l,onBack:a,loadingStatus:p,hasHeader:u,listContainerStyle:g,multiSelect:y,selectedList:b}=o;return i1.createElement(m1,{textField:!0,hasHeader:u,textFieldPlaceholder:"Search blockchains by name",title:`Select ${r} Blockchain`,onBack:a},v=>{let M=yn(t,v);return i1.createElement(i1.Fragment,null,p==="loading"&&i1.createElement(Se,null,i1.createElement(E,{size:24})),i1.createElement(fn,{style:g,key:"1"},p==="failed"&&i1.createElement(v2,null),p==="success"&&i1.createElement(i1.Fragment,null,M.length?i1.createElement(Le,{list:M,selected:l,multiSelect:y,selectedList:b,onChange:n}):i1.createElement(x2,{catergory:"Blockchain",searchedFor:v}))))})}e(vn,"BlockchainSelector");import{i18n as xn}from"@lingui/core";import be from"react";var $n=i("div",{display:"grid",gap:"$8",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",overflow:"auto"});function wn(o){let{open:r,list:t,onSelect:n,onClose:l}=o;return be.createElement(Ao,{title:xn.t("Connect Wallets"),open:r,onClose:l,containerStyle:{width:"75%",maxWidth:"30rem",height:"60%"}},be.createElement($n,null,t.map(a=>be.createElement(le,{...a,key:a.title,onClick:n}))))}e(wn,"ConnectWalletsModal");import{i18n as ke}from"@lingui/core";import{Trans as Ie}from"@lingui/react";import L from"react";var Ln=i("div",{display:"flex",flexDirection:"column",width:"100%",overflow:"hidden"}),Sn=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"}}}),bn=i("div",{display:"flex",justifyContent:"flex-end",".balance":{display:"flex",alignItems:"center"}}),X0=i("span",{width:"24px",height:"24px",backgroundColor:"$background",borderRadius:"99999px"}),kn=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 go(o){let{type:r,chain:t,token:n,loadingStatus:l,fromBlockchain:a,toBlockchain:p,fromToken:u,setInputAmount:g,inputUsdValue:y,inputAmount:b,bestRoute:v,fetchingBestRoute:M,onChainClick:j,onTokenClick:O,tokenBalanceReal:Q,tokenBalance:B}=o,F=L.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"}},l==="failed"&&L.createElement(v1,{color:"error",size:24}),L.createElement(X1,null));return L.createElement(Ln,null,L.createElement(Sn,{type:r==="From"?"filled":"outlined"},L.createElement("div",{className:"head"},L.createElement(s,{variant:"body",size:"small",color:"neutral600"},r==="From"?L.createElement(Ie,{id:"swap from",message:"From"}):L.createElement(Ie,{id:"swap to",message:"To"})),r==="From"?L.createElement(bn,null,L.createElement("div",{className:"balance",onClick:()=>{B!=="0"&&g(Q.split(",").join(""))}},L.createElement(s,{variant:"body",size:"small",color:"neutral800"},ke.t("Balance"),": ",B," ",u?.symbol||""),L.createElement(f,{size:4}),L.createElement(k,{type:"primary",variant:"ghost",size:"small"},L.createElement(Ie,{id:"maximum amount of asset",message:"Max"})))):L.createElement("div",{className:"output-usd"},L.createElement(_o,{percentageChange:o.percentageChange,showPercentageChange:o.showPercentageChange}),L.createElement("div",null,L.createElement(s,{variant:"body",size:"xsmall",color:"neutral800"},`$${o.outputUsdValue}`)))),L.createElement("div",{className:"form"},L.createElement(k,{className:"selectors",onClick:j,variant:"outlined",disabled:l==="failed",loading:l==="loading",prefix:l==="success"&&t?L.createElement(I,{src:t.logo,size:24}):L.createElement(X0,null),suffix:F,size:"large"},l==="success"&&t?t.displayName:ke.t("Chain")),L.createElement(f,{size:12,direction:"horizontal"}),L.createElement(k,{className:"selectors",onClick:O,variant:"outlined",disabled:l==="failed"||r==="From"&&!a||r==="To"&&!p,loading:l==="loading",prefix:l==="success"&&n?L.createElement(I,{src:n.image,size:24}):L.createElement(X0,null),suffix:F,size:"large"},l==="success"&&n?n.symbol:ke.t("Token")),L.createElement(f,{size:12,direction:"horizontal"}),L.createElement("div",{className:"amount"},r==="From"?L.createElement(w1,{type:"number",size:"large",autoFocus:!0,placeholder:"0",style:{position:"relative",backgroundColor:"$background !important"},suffix:L.createElement("span",{style:{position:"absolute",right:"4px",bottom:"2px"}},L.createElement(s,{variant:"body",size:"xsmall",color:"neutral600"},`$${y}`)),value:b||"",min:0,onChange:r==="From"?U=>{o.onAmountChange(U.target.value)}:void 0}):L.createElement(kn,null,L.createElement(s,{variant:"title",size:"medium"},M&&"?",!!v?.result&&`\u2248 ${o.outputAmount}`,(!b||b==="0")&&"0"))))))}e(go,"TokenInfo");import{i18n as In}from"@lingui/core";import fo from"react";function Tn(o){let{highSlippage:r,selectedSlippage:t,changeSlippage:n}=o;return fo.createElement(fo.Fragment,null,r&&fo.createElement(A,{type:"warning",footer:fo.createElement(L2,{onClick:n})},In.t({id:" Caution, your slippage is high (={selectedSlippage}). Your trade may be front run.",values:{selectedSlippage:t}})))}e(Tn,"HighSlippageWarning");import{i18n as Mn}from"@lingui/core";import Te from"react";var Pn=i(s,{color:"$error500 !important"});function Bn({minRequiredSlippage:o,changeSlippage:r}){return Te.createElement(Pn,{variant:"body",size:"small"},Mn.t({id:"We recommend you to increase slippage to at least {minRequiredSlippage} for this route.",values:{minRequiredSlippage:o}}),Te.createElement(f,{size:8}),Te.createElement(L2,{onClick:r}))}e(Bn,"MinRequiredSlippage");import D2 from"react";var Wn=i("ul",{padding:"$0 $0 $40 $0",margin:0}),Zn=i("li",{paddingBottom:"$10"}),Dn=i(s,{display:"block"});function Hn({messages:o}){return D2.createElement(D2.Fragment,null,D2.createElement(Wn,null,o.map((r,t)=>{let n=t+r;return D2.createElement(Zn,{key:n},D2.createElement(Dn,{variant:"body",size:"medium",color:"$neutral700"},r))})))}e(Hn,"BalanceErrors");import{i18n as i3}from"@lingui/core";import P from"react";var J0=i("div",{$$color:"$colors$neutral100",[`.${c} &`]:{$$color:"$colors$neutral300"},backgroundColor:"$$color",borderRadius:"$xm",padding:"$15",variants:{sharpBottomStyle:{true:{borderBottomLeftRadius:"$0",borderBottomRightRadius:"$0"}}},"& .gray-text":{$$color:"$colors$neutral600",[`.${c} &`]:{$$color:"$colors$neutral700"},color:"$$color"},"& .label__container":{paddingBottom:"$5"},"& .label":{display:"flex",justifyContent:"space-between",alignItems:"center"},"& .balance":{display:"flex",justifyContent:"center",alignItems:"center"},"& .form":{display:"flex",justifyContent:"space-between",alignItems:"center"},"& .amount":{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"end",flexGrow:1}}),K0=i(w1,{padding:"0",fontSize:"$18",lineHeight:"$26",fontWeight:"$medium",textAlign:"right",width:140,"&:disabled":{cursor:"unset"}}),Q0=i(k,{$$color:"$colors$info300",[`.${c} &`]:{$$color:"$colors$secondary800"},backgroundColor:"$$color"}),R0=i("div",{width:140,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"}}}}});import{i18n as r3}from"@lingui/core";import K from"react";var o3=i(k,{maxWidth:"180px",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"}}),e3=i("div",{width:"10.625rem",padding:"$2 $5",display:"flex",borderRadius:"$xs",justifyContent:"start",boxSizing:"border-box",alignItems:"center","& .blockchain-name":{$$color:"$colors$neutral600",[`.${c} &`]:{$$color:"$colors$neutral700"},color:"$$color"},"& .token-chain-name":{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"start",paddingLeft:"$10"},"& .token-chain-name__skeleton":{padding:"$5 $0"}});function t3(o){let{error:r,chainImage:t,tokenImage:n,tokenSymbol:l,chain:a,onClick:p,loading:u}=o;return K.createElement(o3,{variant:"default",disabled:r||u,onClick:p},K.createElement(e3,null,K.createElement(X,{size:"large",useAsPlaceholder:r,chainImage:t,tokenImage:n,loading:u}),K.createElement("div",{className:"token-chain-name"},u?K.createElement("div",{className:"token-chain-name__skeleton"},K.createElement(T,{variant:"text",size:"large",width:92}),K.createElement(f,{size:8}),K.createElement(T,{variant:"text",size:"medium",width:92})):K.createElement(K.Fragment,null,K.createElement(s,{variant:"title",size:"medium"},r||!u&&!l?r3.t("Token"):l),K.createElement(s,{variant:"body",size:"medium",className:"blockchain-name"},r||!u&&!a?r3.t("Chain"):a)))))}e(t3,"TokenSection");function zn(o){return P.createElement(J0,{sharpBottomStyle:o.sharpBottomStyle},P.createElement("div",{className:"label__container"},P.createElement("div",{className:"label"},P.createElement(s,{variant:"body",size:"small",className:"gray-text"},o.label),"balance"in o&&!o.loading&&P.createElement("div",{className:"balance"},P.createElement(s,{className:"gray-text",mr:4,variant:"body",size:"xsmall"},i3.t("Balance"),": ",o.balance),P.createElement(Q0,{variant:"default",size:"xsmall",onClick:o.onSelectMaxBalance},P.createElement(s,{variant:"body",size:"xsmall",color:"secondary500"},i3.t("Max")))),o.loading&&P.createElement("div",{className:"balance"},P.createElement(T,{variant:"text",size:"large",width:105})))),P.createElement("div",{className:"form"},P.createElement(t3,{chain:o.chain.displayName,tokenSymbol:o.token.displayName,error:o.error,chainImage:o.chain.image,tokenImage:o.token.image,onClick:o.onClickToken,loading:o.loading}),P.createElement("div",{className:"amount"},o.loading||o.mode==="To"&&o.fetchingQuote?P.createElement(P.Fragment,null,P.createElement(T,{variant:"text",size:"large",width:92}),P.createElement(f,{size:8}),P.createElement(T,{variant:"text",size:"medium",width:92})):P.createElement(P.Fragment,null,P.createElement(K0,{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:r=>o.onInputChange(r.target.value)}}),"percentageChange"in o?P.createElement(B2,{size:"large",outputUsdValue:o.price.usdValue,error:o.price.error,percentageChange:o.percentageChange,warningLevel:o.warningLevel}):P.createElement(R0,{hasWarning:!!o.price.error},P.createElement(s,{variant:"body",size:"medium"},o.price.usdValue?`~$${o.price.usdValue}`:o.price.error))))))}e(zn,"SwapInput");import Me from"react";import Fn from"copy-to-clipboard";function Nn(o){let[r,t]=Me.useState(!1),n=Me.useCallback(l=>{Fn(l.toString()),t(!0)},[]);return Me.useEffect(()=>{let l;return r&&o&&(l=setTimeout(()=>t(!1),o)),()=>{clearTimeout(l)}},[r,o]),[r,n]}e(Nn,"useCopyToClipboard");export{A as Alert,M3 as AutoThemeIcon,Hn as BalanceErrors,o2 as BlockchainCategories,vn as BlockchainSelector,Zo as BlockchainsChip,W3 as BorderRadiusIcon,w2 as BottomLogo,k as Button,X as ChainToken,N6 as ChainsIcon,L2 as ChangeSlippageButton,h5 as Checkbox,vo as ChevronDownIcon,F3 as ChevronLeftIcon,V3 as ChevronRightIcon,xo as ChevronUpIcon,g5 as Chip,c2 as CloseIcon,m5 as Collapsible,k5 as CollapsibleMessageBox,E6 as ColorsIcon,d2 as CompleteIcon,wn as ConnectWalletsModal,X3 as CopyIcon,$o as CosmosCategoryIcon,o4 as CustomColorsIcon,t4 as DarkModeIcon,a4 as DeleteIcon,p4 as DesktopIcon,f as Divider,wo as DoneIcon,zo as Drawer,V0 as English,m2 as ErrorIcon,Lo as EvmCategoryIcon,y4 as ExternalLinkIcon,Ho as FilledCircle,$4 as FontIcon,E0 as French,So as GasIcon,S2 as Header,Tn as HighSlippageWarning,Oi as HomePanel,g3 as I18nManager,d1 as IconButton,I as Image,k4 as InProgressIcon,C2 as InfoErrorIcon,B4 as InfoIcon,_0 as Japanese,D4 as LanguageIcon,F4 as LightModeIcon,V4 as LinkIcon,Si as List,W2 as ListItem,Li as ListItemButton,v2 as LoadingFailedAlert,bo as LoadingIcon,O4 as LogoWithTextIcon,Vo as MessageBox,Bn as MinRequiredSlippage,Ao as Modal,No as ModalHeader,M1 as NextIcon,R4 as NoNotificationIcon,G4 as NoRouteIcon,bi as NotFound,x2 as NotFoundAlert,r6 as NotificationNumberIcon,n6 as NotificationsIcon,Io as NumberIcon,To as OtherCategoryIcon,_o as PercentageChange,m6 as PinIcon,Ni as Popover,B2 as PriceImpact,ki as QuoteCost,qo as Radio,I5 as RadioGroup,jo as RadioRoot,h6 as RefreshIcon,y6 as ReverseIcon,$6 as RouteIcon,P5 as RoutesOverview,Po as SearchIcon,m1 as SecondaryPage,J5 as SelectableCategoryList,Y5 as SelectableWallet,E5 as SelectableWalletList,j6 as SettingsIcon,T as Skeleton,q0 as Spanish,E as Spinner,mo as StepDetail,Di as StepDetails,Y6 as StyleIcon,ni as SwapContainer,ci as SwapDetailsPlaceholder,dn as SwapHistory,zn as SwapInput,li as SwapListItem,di as Switch,w1 as TextField,Bo as TimeIcon,Ti as TokenAmount,go as TokenInfo,ye as TokenList,wi as TokenPreview,gn as TokenSelector,ae as Tooltip,T6 as TransactionIcon,s as Typography,Wo as UtxoCategoryIcon,he as VirtualizedList,le as Wallet,Z6 as WalletIcon,T2 as WalletState,f2 as WarningIcon,i7 as config,Ne as createTheme,r7 as css,$3 as darkColors,c as darkTheme,G5 as getCountCategories,t7 as globalCss,R as keyframes,n7 as lightTheme,i as styled,y3 as theme,Nn as useCopyToClipboard};
|
|
19
|
+
S29.0059509,37.5872993,28.4444485,37.5872993z`}))),"CopyIcon");Vt.toString=()=>"._icon";var M5=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 P5(o){if(!o.routes)return null;let r=o.routes.result?.swaps;return n1.createElement(M5,null,n1.createElement("div",{className:"routes"},r?.map((t,n)=>{let l=n+1==r.length,a=`swap-${n}`;return n1.createElement(n1.Fragment,{key:a},n1.createElement("div",{className:"route"},t.from.symbol),n1.createElement(R2,{size:12}),l?n1.createElement("div",{className:"route"},t.to.symbol):null)})),o.totalFee?n1.createElement("div",{className:"fee"},n1.createElement(G1,{size:12}),n1.createElement(f,{size:4,direction:"horizontal"}),"$",o.totalFee):null)}e(P5,"RoutesOverview");import L1,{useState as W5}from"react";import a1 from"react";var Et=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"}}}]}),_t=i("input",{flexGrow:1,color:"$foreground",fontSize:"$14",lineHeight:"$20",fontWeight:400,border:"none",outline:"none",fontFamily:"inherit",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"}}),qt=i("label",{display:"inline-block"});function B5(o,r){let{label:t,prefix:n,suffix:l,size:a="small",style:p,variant:u,fullWidth:g,...y}=o;return a1.createElement(a1.Fragment,null,t&&a1.createElement(a1.Fragment,null,a1.createElement(qt,{className:"_text",...y.id&&{htmlFor:y.id}},a1.createElement(s,{variant:"label",size:"large"},t)),a1.createElement(f,{direction:"vertical",size:4})),a1.createElement(Et,{disabled:y.disabled,fullWidth:g,variant:u,size:a,style:p,className:"_text"},n||null,a1.createElement(_t,{className:"_text",...y,spellCheck:!1,suffix:!!l,ref:r}),l||null))}e(B5,"TextFieldComponent");var w1=a1.forwardRef(B5);w1.displayName="TextField";var Z5=i("div",{overflow:"hidden",display:"flex",flexDirection:"column",flex:"1",padding:"0 $4"}),D5=i("div",{padding:"1px"});function m1(o){let{title:r,Footer:t,TopButton:n,hasHeader:l=!0}=o,[a,p]=W5("");return L1.createElement(L1.Fragment,null,l&&L1.createElement(S2,{title:r||"",suffix:n}),L1.createElement(Z5,null,o.textField&&L1.createElement(D5,null,L1.createElement(w1,{size:"large",prefix:L1.createElement(Q2,{size:24}),placeholder:o.textFieldPlaceholder,onChange:u=>p(u.target.value),value:a,autoFocus:!0}),L1.createElement(f,{size:16})),o.textField&&o.children?.(a),!o.textField&&o.children),t)}e(m1,"SecondaryPage");import A1,{useEffect as H5,useState as z5}from"react";function N1(o,r){return o.toLowerCase().indexOf(r.toLowerCase())>-1}e(N1,"containsText");function jt(o,r=8,t=3){if(!o)return null;if(o.length<2*r+t)return o;let n=Math.ceil((o.length-r)/2),l=o.length-r;return`${o.substr(n,r)}${".".repeat(t)}${o.substr(l)}`}e(jt,"getConciseAddress");var F5=i("div",{display:"flex",flexWrap:"wrap"}),N5=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"}}}}),A5=i("div",{width:6,margin:"20% auto",height:6,borderRadius:3,variants:{checked:{true:{backgroundColor:"$success"},false:{backgroundColor:"$neutral400"}}}}),V5=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 E5({list:o,onChange:r}){let[t,n]=z5(o.find(a=>a.selected)?.walletType||""),l=e(a=>{n(a.walletType),r(a)},"onClick");return H5(()=>{n(o.find(a=>a.selected)?.walletType||"")},[o]),A1.createElement(F5,null,o.map((a,p)=>{let u=t===a.walletType;return A1.createElement(V5,{checked:u,onClick:l.bind(null,a),key:p},A1.createElement(I,{src:a.image,alt:a.walletType,size:24}),A1.createElement(s,{variant:"body",size:"small"},a.name),A1.createElement(s,{variant:"body",size:"xsmall"},jt(a.address)),A1.createElement(N5,{checked:u},u&&A1.createElement(A5,{checked:u})))}))}e(E5,"SelectableWalletList");import{detectInstallLink as j5}from"@rango-dev/wallets-shared";import G from"react";import q5 from"react";var _5=R({"0%":{backgroundPosition:"-468px 0"},"100%":{backgroundPosition:"468px 0"}}),Ot=i("div",{$$background:"linear-gradient(90deg, $colors$info300 20%, rgba(200, 226, 255, 0.20) 70%, $colors$info300 100%)",[`.${c} &`]:{$$background:"linear-gradient(90deg, $colors$secondary600 0%,rgba(43, 52, 98, 0.20) 70%, $colors$secondary600 100%)"},background:"$$background",backgroundSize:"800px 100px",animation:`${_5} 2s infinite ease-out`,variants:{variant:{text:{borderRadius:"$sm"},circular:{borderRadius:"$lg"},rectangular:{},rounded:{borderRadius:"$sm"}},size:{small:{},medium:{},large:{}}},compoundVariants:[{size:"small",variant:"text",css:{height:"$8"}},{size:"medium",variant:"text",css:{height:"$12"}},{size:"large",variant:"text",css:{height:"$16"}}]});function T(o){let r=o.variant!=="text"?{width:o.width,height:o.height}:{width:o.width};return q5.createElement(Ot,{css:r,...o})}e(T,"Skeleton");import*as b1 from"@radix-ui/react-tooltip";import S1 from"react";import*as io from"@radix-ui/react-tooltip";var Ut=i(io.Content,{zIndex:"999999"}),Yt=i(io.Arrow,{fill:"$neutral100"}),Gt=i(s,{borderRadius:"$md",padding:"$5 $10",boxShadow:"5px 5px 10px 0px rgba(0, 0, 0, 0.10)",backgroundColor:"$neutral100"});function ae(o){let{children:r,content:t,color:n,sideOffset:l,container:a,open:p,side:u="top"}=o;return S1.createElement(b1.Provider,{delayDuration:0},S1.createElement(b1.Root,{open:p},S1.createElement(b1.Trigger,{asChild:!0},S1.createElement("div",null,r)),S1.createElement(b1.Portal,{container:a},S1.createElement(Ut,{side:u,sideOffset:l},S1.createElement(Gt,{variant:"label",size:"medium",color:n},t),S1.createElement(Yt,null)))))}e(ae,"Tooltip");import{i18n as u1}from"@lingui/core";var T2=(l=>(l.NOT_INSTALLED="not_installed",l.DISCONNECTED="disconnected",l.CONNECTING="connecting",l.CONNECTED="connected",l))(T2||{});function no(o){switch(o){case"connected":return{color:"success500",description:u1.t("Connected"),tooltipText:u1.t("Disconnect")};case"not_installed":return{color:"info500",description:u1.t("Install"),tooltipText:u1.t("Install")};case"connecting":return{color:"neutral600",description:u1.t("Connecting..."),tooltipText:u1.t("Connecting")};case"disconnected":return{color:"neutral600",description:u1.t("Disconnected"),tooltipText:u1.t("Connect")};default:throw new Error(u1.t("you need to pass a correct state to Wallet."))}}e(no,"makeInfo");var ao=i("div",{"& img":{borderRadius:"50%"}}),lo=i(s,{textTransform:"capitalize"}),so=i("div",{display:"flex",flexDirection:"column",marginTop:"$10"}),po=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:110,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},variants:{selected:{true:{outlineWidth:1,$$outline:"$colors$secondary500",[`.${c} &`]:{$$outline:"$colors$secondary400"},outlineColor:"$$outline",outlineStyle:"solid"}}}}),Xt=i("div",{borderRadius:"$xm",padding:"$10 0",border:"0",display:"flex",flexDirection:"column",backgroundColor:"$neutral100",alignItems:"center",justifyContent:"center",width:110});function O5(o){let{title:r,type:t,image:n,onClick:l,isLoading:a}=o,p=no(o.state);return a?G.createElement(Xt,null,G.createElement(T,{variant:"circular",width:35,height:35}),G.createElement(f,{size:12}),G.createElement(T,{variant:"text",width:85,size:"medium"}),G.createElement(f,{size:4}),G.createElement(T,{variant:"text",width:64,size:"medium"})):G.createElement(ae,{container:o.container,content:p.tooltipText,side:"top"},G.createElement(po,{disabled:o.state=="connecting",onClick:()=>{o.state==="not_installed"?window.open(j5(o.link),"_blank"):l(t)}},G.createElement(ao,null,G.createElement(I,{src:n,size:35})),G.createElement(so,null,G.createElement(lo,{variant:"label",size:"medium",noWrap:!1},r),G.createElement(s,{variant:"body",size:"xsmall",noWrap:!1,color:p.color},p.description))))}e(O5,"Wallet");var le=O5;import{detectInstallLink as U5}from"@rango-dev/wallets-shared";import R1 from"react";function Y5(o){let{title:r,type:t,image:n,onClick:l,selected:a,description:p,state:u}=o,g=no(o.state);return R1.createElement(po,{selected:a,disabled:o.state=="connecting",onClick:()=>{o.state==="not_installed"?window.open(U5(o.link),"_blank"):l(t)}},R1.createElement(ao,null,R1.createElement(I,{src:n,size:35})),R1.createElement(so,null,R1.createElement(lo,{variant:"label",size:"medium",noWrap:!1},r),R1.createElement(s,{variant:"body",size:"xsmall",noWrap:!1,color:u==="connected"?"neutral700":g.color},p||g.description)))}e(Y5,"SelectableWallet");import{i18n as X5}from"@lingui/core";import k1 from"react";import{TransactionType as co}from"rango-sdk";var o2=(a=>(a.ALL="ALL",a.EVM="EVM",a.COSMOS="COSMOS",a.UTXO="UTXO",a.OTHER="OTHER",a))(o2||{});var Jt={["EVM"]:Lo,["COSMOS"]:$o,["UTXO"]:Wo,["OTHER"]:To},Kt={["ALL"]:"All",["EVM"]:"EVM",["COSMOS"]:"Cosmos",["UTXO"]:"UTXO",["OTHER"]:"Other"},Qt=e((o,r)=>{switch(r){case"ALL":return!0;case"UTXO":return o.type===co.TRANSFER;case"OTHER":return o.type!==co.TRANSFER&&o.type!==co.COSMOS&&o.type!==co.EVM;default:return o.type===r}},"filterByType"),Rt=e((o,r)=>o.some(t=>Qt(t,r)),"hasAnyCategory"),G5=e(o=>Object.values(o2).filter(n=>n!=="ALL").reduce((n,l)=>{let a=o.some(p=>Qt(p,l));return n+(a?1:0)},0),"getCountCategories");var o0=i("div",{display:"grid",gap:"$10",gridTemplateColumns:"auto 1fr 1fr 1fr 1fr"}),Jg=i("div",{display:"flex",position:"relative",alignItems:"center",justifyContent:"center",paddingTop:"$10"}),Kg=i("img",{position:"absolute",top:-2,width:15,height:15});function J5(o){let{setCategory:r,category:t,isLoading:n,blockchains:l}=o,a=Object.keys(o2);return k1.createElement(o0,null,n&&Array.from(Array(5),(p,u)=>k1.createElement(T,{key:u,variant:"rounded",height:70,width:u===0?45:65})),!n&&a.map(p=>{let u=p!=="ALL"?Jt[p]:null;return Rt(l,p)&&k1.createElement(Zo,{selected:t===p,key:p,onClick:()=>r(p)},u&&k1.createElement(k1.Fragment,null,k1.createElement(u,{size:28}),k1.createElement(f,{size:12})),k1.createElement(s,{size:"xsmall",variant:"body",color:p==="ALL"?"secondary500":void 0},X5.t({id:"{blockchainCategory}",values:{blockchainCategory:Kt[p]}})))}))}e(J5,"SelectableCategoryList");import l1 from"react";var K5=i("div",{position:"relative",width:"$28",height:"$28",variants:{direction:{vertical:{margin:"auto"},horizontal:{}}}}),Q5=i("img",{width:"$28",height:"$28",borderRadius:"50%"}),R5=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"}}),oi=i("div",{display:"flex",variants:{direction:{horizontal:{alignItems:"center"},vertical:{flexDirection:"column",textAlign:"center",justifyContent:"center"}},success:{true:{filter:"none"},false:{filter:"grayscale(100%)"}}}}),ei=i("div",{variants:{pl:{true:{paddingLeft:"$4","@lg":{paddingLeft:"$8"}},false:{paddingTop:"$8"}}}}),ri=i(s,{color:"$neutral800",display:"block",paddingLeft:"$8"});function mo(o){let{logo:r,chainLogo:t,amount:n,symbol:l,blockchain:a,estimatedAmount:p,success:u=!0,direction:g="horizontal"}=o;return l1.createElement(oi,{direction:g,success:u},l1.createElement(K5,{direction:g},l1.createElement(Q5,{src:r,alt:l}),l1.createElement(R5,null,l1.createElement("img",{src:t,alt:a}))),l1.createElement(ei,{pl:g==="horizontal"},n&&l1.createElement(s,{noWrap:!0,variant:g==="vertical"?"body":"title",size:"medium"},n),!n&&p&&l1.createElement(s,{noWrap:!0,variant:g==="vertical"?"body":"title",size:"medium",color:"$neutral800"},p),"\xA0",l1.createElement(s,{variant:g==="vertical"?"body":"title",size:"medium",noWrap:!0},l),l1.createElement(ri,{noWrap:!0,variant:"body",size:"xsmall",color:"$neutral600"},"on ",a)))}e(mo,"StepDetail");import ti from"react";var ii=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"},variants:{fixedHeight:{true:{height:"633px",maxHeight:"633px"},false:{height:"auto"}}}});function ni(o){let{children:r,style:t,fixedHeight:n=!0}=o;return ti.createElement(ii,{style:t,id:"swap-box",fixedHeight:n},r)}e(ni,"SwapContainer");import J from"react";import{i18n as se}from"@lingui/core";function e0(o){switch(o){case"failed":return se.t("Failed");case"success":return se.t("Complete");default:return se.t("In progress")}}e(e0,"getStatus");function r0(o,r){if(!o)return"";let t=new Date(Number(o)),n=12,l=10;if(!r){let v={year:"numeric",month:"long",day:"numeric"};return t.toLocaleDateString(void 0,v)}let a=t.getHours(),p=t.getMinutes(),u=a>=n?"pm":"am",g=a%n===0?n:a%n,y=p<l?`0${p}`:p;return`${g}:${y} ${u}`}e(r0,"formattedDateAndTime");var t0=i("div",{display:"flex",justifyContent:"space-between",alignItems:"flex-start",flexDirection:"column",gap:10}),pe=i("div",{display:"flex",padding:0,justifyContent:"space-between",alignItems:"center",alignSelf:"stretch"}),i0=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"}}),n0=i("div",{display:"flex",padding:"$2",alignItems:"flex-start"}),a0=i("div",{$$color:"$colors$neutral100",[`.${c} &`]:{$$color:"$colors$neutral300"},backgroundColor:"$$color",border:"none",width:"100%",borderRadius:"$xm",gap:10,padding:15}),l0=i("div",{display:"flex",justifyContent:"space-between",alignItems:"flex-start",flexDirection:"column",gap:25});var s0={failed:"error500",running:"info500",success:"success500"};import{i18n as ai}from"@lingui/core";import $ from"react";import e2 from"react";var C1={small:{token:17,chain:10},medium:{token:27,chain:10},large:{token:30,chain:15}};var p0=i("div",{position:"relative",display:"flex",[`& ${I}`]:{borderRadius:"100%"}}),c0=i("div",{position:"absolute",border:"0.5px solid $background",borderRadius:"100%",backgroundColor:"$background",variants:{size:{small:{right:"-3px",bottom:"-3px"},medium:{right:"0",bottom:"0"},large:{right:"-5px",bottom:"-5px"}}}});var X=e(o=>{let{tokenImage:r,chainImage:t,size:n,useAsPlaceholder:l,loading:a}=o;return e2.createElement(p0,{css:a?{}:{width:C1[n].token,height:C1[n].token}},a?e2.createElement(T,{variant:"circular",height:C1[n].token,width:C1[n].token}):e2.createElement(I,{size:C1[n].token,src:r,type:"circular",...(l||!r)&&{useAsPlaceholder:!0}}),e2.createElement(c0,{size:n},a?e2.createElement(T,{variant:"circular",height:C1[n].chain,width:C1[n].chain}):e2.createElement(I,{size:C1[n].chain,src:t,type:"circular",...(l||!t)&&{useAsPlaceholder:!0,backgroundColor:"$secondary300"}})))},"ChainToken");var ce=i("div",{display:"flex",padding:0,alignItems:"center",gap:10}),de=i("div",{display:"flex",padding:0,alignItems:"center",alignSelf:"stretch"}),me=i("div",{display:"flex",alignItems:"flex-start",variants:{direction:{column:{flexDirection:"column",flex:"1 0 0"},row:{padding:0}}}}),d0=i("div",{display:"flex",alignItems:"center",alignSelf:"stretch"}),M2=i("div",{display:"flex",padding:0,flexDirection:"column",justifyContent:"center",alignItems:"flex-start"}),ue=i("div",{display:"flex",padding:"$4",width:"$32",height:"$32",justifyContent:"center",alignItems:"center"}),m0=i("div",{display:"flex",alignItems:"center",justifyContent:"center"}),u0=i("div",{display:"flex",width:"$24",height:"$24",justifyContent:"center",alignItems:"center"}),Uf=i("div",{display:"flex",padding:0,alignItems:"center",gap:25});function Ce(o){if("isLoading"in o)return $.createElement(ce,null,$.createElement(de,null,$.createElement("div",null,$.createElement(X,{tokenImage:"",chainImage:"",size:"medium",loading:!0})),$.createElement("div",{style:{transform:"translateX(-5px)"}},$.createElement(X,{tokenImage:"",chainImage:"",size:"medium",loading:!0}))),$.createElement(m0,null,$.createElement(M2,null,$.createElement(T,{variant:"text",size:"medium",width:76}),$.createElement(f,{size:8}),$.createElement(T,{variant:"text",size:"medium",width:60})),$.createElement(u0,null,$.createElement(M1,{size:12,color:"gray"})),$.createElement(M2,null,$.createElement(T,{variant:"text",size:"medium",width:76}),$.createElement(f,{size:8}),$.createElement(T,{variant:"text",size:"medium",width:60}))));let{data:{from:{token:r,amount:t,blockchain:n},to:{estimatedAmount:l,token:a,amount:p,blockchain:u}},status:g}=o;return $.createElement(ce,null,$.createElement(de,null,$.createElement("div",null,$.createElement(X,{tokenImage:r.image,chainImage:n.image,size:"large"})),$.createElement("div",{style:{transform:"translateX(-10px)"}},$.createElement(X,{tokenImage:a.image,chainImage:u.image,size:"large"}))),g==="running"?$.createElement(me,{direction:"column"},$.createElement(d0,null,$.createElement(s,{size:"medium",variant:"title"},r.displayName),$.createElement(ue,null,$.createElement(M1,{size:24,color:"black"})),$.createElement(s,{size:"medium",variant:"title"},a.displayName)),$.createElement(s,{size:"small",variant:"body",color:"neutral700"},ai.t("Waiting for bridge transaction"))):$.createElement(me,{direction:"row"},$.createElement(M2,null,$.createElement(s,{size:"medium",variant:"title"},r.displayName),!!t&&$.createElement(s,{size:"small",variant:"body",color:"neutral700"},t)),$.createElement(ue,null,$.createElement(M1,{size:24,color:"black"})),$.createElement(M2,null,$.createElement(s,{size:"medium",variant:"title"},a.displayName),$.createElement(s,{size:"small",variant:"body",color:"neutral700"},p||l))))}e(Ce,"SwapToken");function li(o){if("isLoading"in o)return J.createElement(a0,null,J.createElement(l0,null,J.createElement(pe,null,J.createElement(T,{variant:"text",size:"medium",width:76}),J.createElement(T,{variant:"text",size:"medium",width:76})),J.createElement(Ce,{isLoading:!0})));let{onClick:r,requestId:t,creationTime:n,onlyShowTime:l,status:a,swapTokenData:p}=o;return J.createElement(i0,{onClick:r.bind(null,t)},J.createElement(t0,null,J.createElement(pe,null,J.createElement(n0,null,J.createElement(s,{variant:"label",size:"medium",color:"neutral600"},r0(n,l))),J.createElement(s,{variant:"label",size:"medium",color:s0[a]},e0(a))),J.createElement(Ce,{data:p,status:a})))}e(li,"SwapListItem");import{i18n as C0}from"@lingui/core";import P2 from"react";var si=i("div",{height:"450px"}),pi=i("div",{display:"flex",justifyContent:"center",width:"100%",paddingTop:"33%",flex:1});function ci(o){let{requestId:r,loading:t,onBack:n}=o;return P2.createElement(m1,{title:C0.t("Swap Details"),textField:!1,onBack:n},P2.createElement(si,null,t?P2.createElement(pi,null,P2.createElement(E,{size:24})):P2.createElement(A,{type:"error",title:C0.t({id:"Swap with request ID = {requestId} not found.",values:{requestId:r}})})))}e(ci,"SwapDetailsPlaceholder");import f0 from"react";import*as uo from"@radix-ui/react-switch";var h0=i(uo.Root,{boxSizing:"border-box",boxShadow:"none",borderStyle:"solid",width:"24px",height:"16px",$$color:"$colors$neutral600",[`.${c} &`]:{$$color:"$colors$neutral700"},backgroundColor:"$$color",borderColor:"$$color",borderRadius:"99999px",position:"relative",padding:"0",cursor:"pointer",transition:"all 0.35s",'&[data-state="checked"]':{$$color:"$colors$secondary500",[`.${c} &`]:{$$color:"$colors$secondary400"},backgroundColor:"$$color",borderColor:"$$color"},"-webkit-tap-highlight-color":"rgba(0, 0, 0, 0)"}),g0=i(uo.Thumb,{position:"absolute",top:"0",boxSizing:"border-box",display:"block",width:"12px",height:"12px",backgroundColor:"$background",borderColor:"$secondary100",transition:" transform 300ms",borderRadius:"999999px",willChange:"transform",'&[data-state="checked"]':{transform:"translateX(8px)"}});function di(o){let{checked:r,onChange:t}=o;return f0.createElement(h0,{checked:r,onCheckedChange:t},f0.createElement(g0,null))}e(di,"Switch");import ge,{forwardRef as yi,useEffect as v0,useState as fe}from"react";import Co from"react";import mi from"react-virtualized-auto-sizer";import{VariableSizeList as ui}from"react-window";import Ci from"react-window-infinite-loader";function he(o){let{itemCount:r,hasNextPage:t,loadNextPage:n,Item:l,innerElementType:a,size:p}=o,u=e(g=>!t||g<r,"isItemLoaded");return Co.createElement(mi,null,({width:g,height:y})=>Co.createElement(Ci,{isItemLoaded:u,itemCount:t?r+1:r,loadMoreItems:n,threshold:1},({onItemsRendered:b,ref:v})=>Co.createElement(ui,{innerElementType:a,ref:v,itemSize:()=>p,itemCount:r,height:y||0,width:g||0,onItemsRendered:b},({index:M,style:j})=>u(M)?Co.createElement(l,{index:M,style:j}):null)))}e(he,"VirtualizedList");import s1 from"react";var hi=i("div",{paddingRight:"$16"}),gi=i("div",{display:"flex",flexDirection:"column"}),fi=i("div",{display:"flex",flexDirection:"column",alignItems:"flex-end"});function y0(o){let{token:r,style:t,onClick:n,selected:l}=o;return s1.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",...t,height:"48px",top:`${parseFloat(t?.top)+0}px`,padding:"0 4px"}},s1.createElement(k,{variant:"outlined",size:"large",onClick:n.bind(null,r),type:l?"primary":void 0,prefix:s1.createElement(hi,null,s1.createElement(I,{src:r.image,size:32})),suffix:r.balance?.amount&&s1.createElement(fi,null,s1.createElement(s,{variant:"body",size:"small"},r.balance.amount),s1.createElement(s,{variant:"body",size:"xsmall"},`${r.balance.usdValue}$`))},s1.createElement(gi,null,s1.createElement(s,{variant:"body",size:"medium"},r.symbol),s1.createElement(s,{variant:"body",size:"xsmall",color:"neutral800"},r.name))))}e(y0,"TokenItem");var x0=20;function ye(o){let{list:r,searchedText:t,onChange:n,multiSelect:l,selectedList:a}=o,[p,u]=fe(o.selected),g=e(B=>{u(B),n(B)},"changeSelected"),y=e(B=>l&&a?a.map(F=>F.symbol+F.address).indexOf(B.symbol+B.address)>-1:p?.symbol===B.symbol&&p?.address===B.address,"isSelected"),[b,v]=fe(!0),[M,j]=fe(r),O=e(()=>{j(r.slice(0,M.length+x0))},"loadNextPage");v0(()=>{j(r.slice(0,x0))},[t,r]),v0(()=>{v(r.length>M.length)},[M.length]);let Q=yi(({style:B,...F},U)=>ge.createElement("div",{ref:U,style:{...B,height:`${parseFloat(B?.height)+8*2}px`},...F}));return ge.createElement(he,{Item:({index:B,style:F})=>ge.createElement(y0,{token:M[B],style:F,onClick:g,selected:y(M[B])}),hasNextPage:b,itemCount:M.length,loadNextPage:O,innerElementType:Q,size:56})}e(ye,"TokenList");import{i18n as $0}from"@lingui/core";import Z from"react";var vi=i("div",{display:"flex",flexDirection:"column",width:"100%",overflow:"hidden"}),xi=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%"}}}),w0=i("span",{width:"24px",height:"24px",backgroundColor:"$background",borderRadius:"99999px"}),$i=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 wi(o){let{chain:r,token:t,loadingStatus:n,percentageChange:l}=o,a=Z.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"}},n==="failed"&&Z.createElement(v1,{color:"error",size:24}));return Z.createElement(vi,null,Z.createElement(xi,{type:"outlined"},Z.createElement("div",{className:"head"},Z.createElement(s,{variant:"body",size:"small",color:"neutral600"},o.label),Z.createElement("div",null,l,o.usdValue&&Z.createElement(s,{variant:"body",size:"xsmall",color:"neutral800",className:"usd-value"},`$${o.usdValue}`))),Z.createElement("div",{className:"form"},Z.createElement(k,{className:"selectors",variant:"outlined",loading:n==="loading",prefix:n==="success"&&r?Z.createElement(I,{src:r.logo,size:24}):Z.createElement(w0,null),suffix:a,size:"large"},n==="success"&&r?r.displayName:$0.t("Chain")),Z.createElement(f,{size:12,direction:"horizontal"}),Z.createElement(k,{className:"selectors",variant:"outlined",loading:n==="loading",prefix:n==="success"&&t?Z.createElement(I,{src:t.image,size:24}):Z.createElement(w0,null),suffix:a,size:"large"},n==="success"&&t?t.symbol:$0.t("Token")),Z.createElement(f,{size:12,direction:"horizontal"}),Z.createElement("div",{className:"amount"},Z.createElement($i,null,Z.createElement(s,{variant:"title",size:"medium"},o.amount))))))}e(wi,"TokenPreview");import ve from"react";var L0=i("div",{display:"flex",justifyContent:"center",alignItems:"center"});function B2(o){let{size:r,outputUsdValue:t,percentageChange:n,warningLevel:l,error:a}=o,p="$neutral600";return!t||l==="low"?p="$warning500":l==="high"&&(p="$error500"),ve.createElement(L0,null,t&&ve.createElement(s,{size:r==="small"?"small":"medium",variant:"body",color:"$neutral600"},`~$${t}`),(t&&n||!t)&&ve.createElement(s,{size:r==="small"?"small":"medium",variant:"body",ml:4,color:p},t&&n&&`(${n.includes("-")?n:`-${n}`}${n?"%":"-"})`,!t&&a))}e(B2,"PriceImpact");import k0 from"react";import r2 from"react";var S0=i("li",{width:"100%",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"},variants:{hasDivider:{true:{borderBottom:"1px solid",$$color:"$colors$neutral300",[`.${c} &`]:{$$color:"$colors$neutral400"},borderColor:"$$color",borderBottomRightRadius:0,borderBottomLeftRadius:0}}}});function W2(o){let{start:r,title:t,description:n,end:l,onClick:a,hasDivider:p,...u}=o;return r2.createElement(S0,{hasDivider:p,onClick:a,...u},r&&r2.createElement("div",{className:"item-start-container"},r),r2.createElement("div",{className:"item-text-container"},t&&r2.createElement("div",{className:"item-text-title"},t),n&&r2.createElement(s,{variant:"body",className:"_description",size:"small"},n)),l&&r2.createElement("div",{className:"item-end-container"},l))}e(W2,"ListItem");var b0=i("button",{transition:"all 0.35s",border:0,width:"100%",backgroundColor:"transparent",fontFamily:"inherit","&: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 Li(o){let{onClick:r,id:t,style:n,hasDivider:l,selected:a,...p}=o;return k0.createElement(b0,{hasDivider:l,selected:a,onClick:e(()=>{r&&r(t)},"onClickWithKey"),style:n},k0.createElement(W2,{...p}))}e(Li,"ListItemButton");import xe from"react";var I0=i("ul",{padding:0,margin:0,listStyle:"none"});function Si(o){let r=o.type;return xe.createElement(I0,{as:o.as},o.items.map(t=>{let{id:n,...l}=t;return r?xe.cloneElement(r,{...l,key:n,id:n}):xe.createElement(W2,{key:n,...l})}))}e(Si,"List");import Z2 from"react";var T0=i("div",{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"});function bi(o){return Z2.createElement(T0,null,Z2.createElement(Po,{color:"secondary",size:26}),Z2.createElement(f,{size:4}),Z2.createElement(s,{variant:"title",size:"medium"},o.title),Z2.createElement(s,{variant:"body",size:"medium",color:"neutral700"},o.description))}e(bi,"NotFound");import q from"react";var M0=i("div",{borderRadius:"$xs",display:"flex",justifyContent:"start",alignItems:"center",paddingBottom:"$10","& .item":{display:"flex",alignItems:"center"},"& .icon":{width:"$16",height:"$16",display:"flex",justifyContent:"center",alignItems:"center"}}),$e=i("div",{height:"$12",marginLeft:"$10",marginRight:"$10",borderLeft:"1px solid $foreground"});function ki(o){let{fee:r,time:t,steps:n}=o;return q.createElement(M0,null,q.createElement("div",{className:"item"},q.createElement("div",{className:"icon"},q.createElement(So,{size:12,color:"gray"})),q.createElement(s,{ml:2,align:"center",variant:"body",size:"small"},"$",r)),q.createElement($e,null),q.createElement("div",{className:"item"},q.createElement("div",{className:"icon"},q.createElement(Bo,{size:12,color:"gray"})),q.createElement(s,{ml:2,align:"center",variant:"body",size:"small"},t)),q.createElement($e,null),q.createElement("div",{className:"item"},q.createElement("div",{className:"icon"},q.createElement(Io,{size:16,color:"gray"})),q.createElement(s,{ml:2,align:"center",variant:"body",size:"small"},n)))}e(ki,"QuoteCost");import t1 from"react";import{styled as Ii}from"@stitches/react";var P0=Ii("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"}}},"& .token-amount":{display:"flex",justifyContent:"center",alignItems:"center"},"& .usd-value":{display:"flex",paddingTop:"$5"}});function Ti(o){return t1.createElement(P0,{direction:o.direction,centerAlign:o.centerAlign},t1.createElement("div",{className:"token-amount"},t1.createElement(X,{chainImage:o.chain.image,tokenImage:o.token.image,size:"medium"}),t1.createElement("div",null,o.label&&t1.createElement(s,{ml:4,size:"xsmall",variant:"body",color:"$neutral700"},o.label),t1.createElement("div",{title:`${o.price.value} ${o.token.displayName}`},t1.createElement(s,{ml:4,size:"medium",variant:"title",style:{fontWeight:600}},o.price.value),t1.createElement(s,{ml:8,size:"medium",variant:"title",style:{fontWeight:400}},o.token.displayName)))),o.price.usdValue&&o.price.usdValue!=="0"&&t1.createElement("div",{className:"usd-value"},o.type==="input"&&t1.createElement(s,{mr:4,size:"small",variant:"body",color:"$neutral700"},`~$${o.price.usdValue}`),o.type==="output"&&t1.createElement(B2,{size:"small",outputUsdValue:o.price.usdValue,percentageChange:o.percentageChange,warningLevel:o.warningLevel})))}e(Ti,"TokenAmount");import{i18n as Mi}from"@lingui/core";import V,{forwardRef as Pi,memo as Bi,useEffect as Wi,useRef as Zi}from"react";var B0=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":{$$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"}}},"& .swapper":{display:"flex",alignItems:"center"},"& .swapper__description":{fontWeight:"$medium"},"& .step-info":{display:"flex",flex:"1",width:"100%",alignItems:"start",variants:{tx:{true:{paddingLeft:"36px"}}}},"& div:nth-child(3)":{display:"flex",flexDirection:"column",flex:1},"& .tokens-container":{width:"100%"},"& .tokens":{display:"flex",paddingTop:"$5",paddingBottom:"$10",alignItems:"center"}}),W0=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"}}}}),Z0=i("div",{width:"100%",variants:{pb:{true:{paddingBottom:"35px"}}}}),D0=i("div",{borderLeft:"1px dashed black",minHeight:"64px",margin:"0 11.5px",alignSelf:"stretch",variants:{invisible:{true:{visibility:"hidden",minHeight:"unset"}}}}),H0=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"}}}});var z0=Pi((o,r)=>{let{step:t,hasSeparator:n,type:l,state:a,isFocused:p,tabIndex:u}=o,g=Zi(null),y=a==="completed"||a==="error";return Wi(()=>{let b=r?.current,v=g.current;p&&v&&b&&(b.scrollTop=v.offsetTop-b.offsetTop)},[p]),V.createElement(B0,{type:l,state:a,ref:g,tabIndex:u},V.createElement("div",{className:"swapper"},l==="swap-progress"&&n&&V.createElement(H0,{state:a}),V.createElement(W0,{state:a},V.createElement(I,{size:22,src:t.swapper.image})),V.createElement(s,{className:"swapper__description",ml:8,size:"small",variant:"body"},Mi.t({id:"Swap on {fromChain} via {swapper}",values:{fromChain:t.from.chain.displayName,swapper:t.swapper.displayName}}))),V.createElement("div",{className:"step-info"},V.createElement(D0,{invisible:!n||l==="swap-progress"}),V.createElement("div",{className:"tokens-container"},V.createElement("div",{className:"tokens"},V.createElement(X,{chainImage:t.from.chain.image,tokenImage:t.from.token.image,size:"small"}),V.createElement(s,{ml:4,mr:4,size:"small",color:"$neutral700",variant:"body"},`${t.from.price.value} ${t.from.token.displayName}`),V.createElement(M1,{color:"gray"}),V.createElement(f,{size:4,direction:"horizontal"}),V.createElement(X,{chainImage:t.to.chain.image,tokenImage:t.to.token.image,size:"small"}),V.createElement(s,{ml:4,size:"small",color:"$neutral700",variant:"body"},`${y?"":"~"}${t.to.price.value} ${t.to.token.displayName}`)),V.createElement(Z0,{pb:n&&l==="quote-details"},t.alerts))))});z0.displayName="StepDetailsComponent";var Di=Bi(z0);import*as t2 from"@radix-ui/react-popover";import V1 from"react";import*as ho from"@radix-ui/react-popover";var F0=i(ho.Content,{borderRadius:"$sm",filter:"drop-shadow(0px 5px 20px rgba(130, 130, 130, 0.20))",backgroundColor:"$neutral100"}),N0=i(ho.Arrow,{fill:"$neutral100",width:"$16",height:"$8"});var Hi=0,zi=0,Fi=e((o,r)=>{let{container:t,children:n,...l}=o;return V1.createElement(t2.Portal,{container:t},V1.createElement(F0,{...l,ref:r},n,V1.createElement(N0,null)))},"PopoverContentComponent"),A0=V1.forwardRef(Fi);A0.displayName="PopoverContent";function Ni(o){let{children:r,content:t,side:n="bottom",sideOffset:l=Hi,alignOffset:a=zi,align:p="center",collisionBoundary:u=[],collisionPadding:g=0,container:y=document.body}=o;return V1.createElement(t2.Root,null,V1.createElement(t2.Trigger,{asChild:!0},r),V1.createElement(A0,{align:p,alignOffset:a,collisionBoundary:u,collisionPadding:g,side:n,sideOffset:l,container:y},t))}e(Ni,"Popover");import E1 from"react";var I1="1em";function V0(o){let{size:r=I1}=o;return E1.createElement("svg",{width:r,height:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},E1.createElement("mask",{id:"a"},E1.createElement("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})),E1.createElement("g",{mask:"url(#a)"},E1.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"}),E1.createElement("path",{fill:"#0052b4",d:"M336 0v108L444 0Zm176 68L404 176h108zM0 176h108L0 68ZM68 0l108 108V0Zm108 512V404L68 512ZM0 444l108-108H0Zm512-108H404l108 108Zm-68 176L336 404v108z"}),E1.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(V0,"English");import _1 from"react";function E0(o){let{size:r=I1}=o;return _1.createElement("svg",{width:r,height:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},_1.createElement("mask",{id:"a"},_1.createElement("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})),_1.createElement("g",{mask:"url(#a)"},_1.createElement("path",{fill:"#eee",d:"M167 0h178l25.9 252.3L345 512H167l-29.8-253.4z"}),_1.createElement("path",{fill:"#0052b4",d:"M0 0h167v512H0z"}),_1.createElement("path",{fill:"#d80027",d:"M345 0h167v512H345z"})))}e(E0,"French");import i2 from"react";function _0(o){let{size:r=I1}=o;return i2.createElement("svg",{width:r,height:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},i2.createElement("mask",{id:"a"},i2.createElement("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})),i2.createElement("g",{mask:"url(#a)"},i2.createElement("path",{fill:"#eee",d:"M0 0h512v512H0z"}),i2.createElement("circle",{cx:"256",cy:"256",r:"111.3",fill:"#d80027"})))}e(_0,"Japanese");import w from"react";function q0(o){let{size:r=I1}=o;return w.createElement("svg",{width:r,height:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},w.createElement("mask",{id:"a"},w.createElement("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})),w.createElement("g",{mask:"url(#a)"},w.createElement("path",{fill:"#ffda44",d:"m0 128 256-32 256 32v256l-256 32L0 384Z"}),w.createElement("path",{fill:"#d80027",d:"M0 0h512v128H0zm0 384h512v128H0z"}),w.createElement("g",{fill:"#eee"},w.createElement("path",{d:"M144 304h-16v-80h16zm128 0h16v-80h-16z"}),w.createElement("ellipse",{cx:"208",cy:"296",rx:"48",ry:"32"})),w.createElement("g",{fill:"#d80027"},w.createElement("rect",{width:"16",height:"24",x:"128",y:"192",rx:"8"}),w.createElement("rect",{width:"16",height:"24",x:"272",y:"192",rx:"8"}),w.createElement("path",{d:"M208 272v24a24 24 0 0 0 24 24 24 24 0 0 0 24-24v-24h-24z"})),w.createElement("rect",{width:"32",height:"16",x:"120",y:"208",fill:"#ff9811",ry:"8"}),w.createElement("rect",{width:"32",height:"16",x:"264",y:"208",fill:"#ff9811",ry:"8"}),w.createElement("rect",{width:"32",height:"16",x:"120",y:"304",fill:"#ff9811",rx:"8"}),w.createElement("rect",{width:"32",height:"16",x:"264",y:"304",fill:"#ff9811",rx:"8"}),w.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"}),w.createElement("path",{d:"M122 252h172m-172 24h28m116 0h28"}),w.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"}),w.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"}),w.createElement("path",{fill:"none",d:"M220 284v12c0 7 5 12 12 12s12-5 12-12v-12z"}),w.createElement("path",{fill:"#ff9811",d:"M200 160h16v32h-16z"}),w.createElement("path",{fill:"#eee",d:"M208 224h48v48h-48z"}),w.createElement("path",{fill:"#d80027",d:"m248 208-8 8h-64l-8-8c0-13 18-24 40-24s40 11 40 24zm-88 16h48v48h-48z"}),w.createElement("rect",{width:"20",height:"32",x:"222",y:"232",fill:"#d80027",rx:"10",ry:"10"}),w.createElement("path",{fill:"#ff9811",d:"M168 232v8h8v16h-8v8h32v-8h-8v-16h8v-8zm8-16h64v8h-64z"}),w.createElement("g",{fill:"#ffda44"},w.createElement("circle",{cx:"186",cy:"202",r:"6"}),w.createElement("circle",{cx:"208",cy:"202",r:"6"}),w.createElement("circle",{cx:"230",cy:"202",r:"6"})),w.createElement("path",{fill:"#d80027",d:"M169 272v43a24 24 0 0 0 10 4v-47h-10zm20 0v47a24 24 0 0 0 10-4v-43h-10z"}),w.createElement("g",{fill:"#338af3"},w.createElement("circle",{cx:"208",cy:"272",r:"16"}),w.createElement("rect",{width:"32",height:"16",x:"264",y:"320",ry:"8"}),w.createElement("rect",{width:"32",height:"16",x:"120",y:"320",ry:"8"}))))}e(q0,"Spanish");import{i18n as Ai}from"@lingui/core";import D from"react";var Vi=i("div",{display:"flex",flexDirection:"column"}),Ei=i("div",{position:"relative",paddingBottom:"$12"}),_i=i("div",{width:"100%",paddingTop:"$16"}),qi=i("div",{width:"100%",paddingTop:"$16"}),ji=i("div",{display:"flex",flexDirection:"column",width:"100%",paddingTop:"$16"});function Oi({bestRoute:o,fromBlockchain:r,toBlockchain:t,fromToken:n,toToken:l,setInputAmount:a,outputAmount:p,inputAmount:u,loadingStatus:g,showBestRoute:y,fetchingBestRoute:b,outputUsdValue:v,inputUsdValue:M,swapButtonTitle:j,swapButtonDisabled:O,swapButtonClick:Q,onChainClick:B,onTokenClick:F,connectedWallets:U,errorMessage:l2,hasLimitError:s2,swap:Pe,fromAmountRangeError:n3,recommendation:a3,swithFromAndToComponent:l3,percentageChange:s3,tokenBalanceReal:Be,tokenBalance:We,swapFromAmount:p3,showPercentageChange:c3}){return D.createElement(Vi,null,D.createElement(S2,{title:Ai.t("SWAP"),suffix:D.createElement(D.Fragment,null)}),D.createElement(Ei,null,D.createElement(D.Fragment,null,D.createElement(go,{type:"From",chain:r,token:n,onAmountChange:a,inputAmount:u,fromBlockchain:r,toBlockchain:t,loadingStatus:g,inputUsdValue:M,fromToken:n,setInputAmount:a,connectedWallets:U,bestRoute:o,fetchingBestRoute:b,onChainClick:()=>B("from-chain"),onTokenClick:()=>F("from-token"),tokenBalanceReal:Be,tokenBalance:We}),l3)),D.createElement(go,{type:"To",chain:t,token:l,outputAmount:p,percentageChange:s3,outputUsdValue:v,fromBlockchain:r,toBlockchain:t,loadingStatus:g,inputUsdValue:M,fromToken:n,setInputAmount:a,connectedWallets:U,inputAmount:u,bestRoute:o,fetchingBestRoute:b,onChainClick:()=>B("to-chain"),onTokenClick:()=>F("to-token"),tokenBalanceReal:Be,tokenBalance:We,showPercentageChange:c3}),y&&D.createElement(_i,null),(l2||s2(o))&&D.createElement(qi,null,l2&&D.createElement(A,{type:"error"},l2),s2(o)&&D.createElement(A,{type:"error",title:`${Pe?.swapperId} Limit`},D.createElement(D.Fragment,null,D.createElement(s,{variant:"body",size:"small"},`${n3}, Yours: ${p3} ${Pe?.from.symbol}`),D.createElement(s,{variant:"body",size:"small"},a3)))),D.createElement(ji,null,D.createElement(k,{type:"primary",size:"large",disabled:O,onClick:Q},j),D.createElement(w2,null)))}e(Oi,"HomePanel");import C,{useState as Xi}from"react";import H,{useState as Ui}from"react";var Yi=e(o=>!o||o==="info"?"info":o,"getAlertType"),Gi=i("div",{width:"90%",overflowWrap:"break-word",color:"$error500 !important"}),we=i(s,{color:"$success500 !important"}),j0=e(o=>{let{shortMessage:r,detailedMessage:t,currentStepBlockchain:n,type:l,lastConvertedTokenInFailedSwap:a}=o,[p,u]=Ui(!1),g=t.long?0:150,y=!p&&t.content.length>g;return H.createElement(A,{type:Yi(l),title:r,...y&&{footer:H.createElement(k,{variant:"outlined",type:"primary",onClick:u.bind(null,b=>!b)},"Show more details")},...!!o.switchNetwork&&{footer:H.createElement(k,{variant:"outlined",type:"primary",onClick:()=>{o?.switchNetwork&&o.switchNetwork().catch(b=>{console.log(b)})}},"Change network to ",n)}},t.content?H.createElement(Gi,null,H.createElement(s,{variant:"body",size:"small"},y&&!p?t.content.substring(0,g)+(g>0?"...":""):t.content)):null,!!a&&H.createElement(H.Fragment,null,H.createElement("p",null,H.createElement(s,{variant:"body",size:"small"},"Do not worry, your fund is\xA0"),H.createElement(we,{variant:"body",size:"small"},H.createElement("b",null,"Safe"))),H.createElement("p",null,H.createElement(s,{variant:"body",size:"small"},"It is converted to \xA0",H.createElement("u",null,a.outputAmount),"\xA0"),H.createElement(we,{variant:"body",size:"small"},H.createElement("b",null,a.symbol,"\xA0")),H.createElement(s,{variant:"body",size:"small"},"on your\xA0"),H.createElement(we,{variant:"body",size:"small"},H.createElement("b",null,a.blockchain,"\xA0")),H.createElement(s,{variant:"body",size:"small"},"wallet"))))},"SwapMessages");var Ji=R({"0%":{opacity:1},"50%":{opacity:.3},"100%":{opacity:1}}),Ki=i("div",{display:"flex",alignItems:"center",paddingLeft:"$4",variants:{created:{true:{filter:"grayscale(100%)"}},running:{true:{animation:`${Ji} 2s ease-in-out infinite`}}}}),Mw=i("div",{height:"100%",display:"flex",justifyContent:"center",alignItems:"center"}),Pw=i(s,{color:"$error500"}),Qi=i("div",{paddingLeft:"$16",color:"$neutral600"}),Ri=i("div",{display:"flex",alignItems:"center"}),on=i("div",{position:"relative"}),Bw=i("div",{display:"flex",alignItems:"center"}),en=i("div",{width:"$8",height:"$8",backgroundColor:"$foreground",borderRadius:"4px",marginLeft:"11px"}),rn=i("div",{width:"0px",height:"0px",borderLeft:"5px solid transparent",borderRight:"5px solid transparent",borderTop:"5px solid $foreground",marginLeft:"$10"}),tn=i("a",{color:"$primary500",fontWeight:"$600"}),nn=i("div",{display:"flex",flexDirection:"column",paddingBottom:"$16",borderBottom:"1px solid $background"}),an=i("div",{display:"flex",".details":{padding:"$8 0"}}),O0=i("div",{display:"flex",margin:"$12 0 $12 $20"}),U0=i("div",{display:"flex",alignItems:"center"}),Y0=i(s,{color:"$success500",paddingLeft:"$4"}),G0=i("div",{width:"0",minHeight:"$16",marginLeft:"14px",border:"1px dashed $foreground",borderRadius:"inherit"}),ln=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"}}),sn=i("div",{width:"150px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","@md":{width:"auto"}}),pn=i("div",{padding:"0",color:"$neutral800",fontSize:"$10"}),cn=i("div",{overflowY:"auto",padding:"$8 $4 $2 $4"});function dn(o){let{pendingSwap:r,onBack:t,onCopy:n,isCopied:l,onCancel:a,date:p,onRetry:u,...g}=o,[y,b]=Xi(!1);return C.createElement(m1,{title:"Swap Details",textField:!1,onBack:t,Footer:C.createElement(C.Fragment,null,r?.status==="running"&&C.createElement(k,{variant:"outlined",fullWidth:!0,type:"error",onClick:b.bind(null,!0)},"Cancel"),!!u&&C.createElement(k,{variant:"contained",fullWidth:!0,type:"primary",onClick:u},"Try again"))},C.createElement("div",null,C.createElement(nn,null,C.createElement(ln,null,C.createElement("div",{className:"name"},"Request Id:",C.createElement("span",{className:"value requestId",onClick:n.bind(null,r?.requestId)},C.createElement(sn,null,r?.requestId),C.createElement(f,{size:4,direction:"horizontal"}),C.createElement(k,{type:"primary",variant:"ghost",size:"small"},l?"Copied!":"Copy"))),C.createElement("div",{className:"name"},C.createElement("span",{className:`value status ${r?.status||""}`},r?.status,r?.status==="running"&&C.createElement(E,{size:16,color:"primary"})),C.createElement(pn,null,p))))),C.createElement(cn,null,g.shortMessage&&C.createElement(j0,{...g}),C.createElement(f,{size:16}),r?.steps.map((v,M)=>{let j=`step-${M}`;return C.createElement("div",{key:j},M===0&&C.createElement(on,null,C.createElement(mo,{logo:v.fromLogo,symbol:v.fromSymbol,chainLogo:v.fromBlockchainLogo||"",blockchain:v.fromBlockchain,amount:r.inputAmount}),C.createElement(en,null)),C.createElement(G0,null),C.createElement(Ki,{created:v.status==="created",running:!["created","success","failed"].includes(v.status)},C.createElement(I,{src:v.swapperLogo||"",alt:v.swapperId,size:20}),C.createElement(Qi,null,C.createElement(s,{variant:"body",size:"small"},v.swapperType==="DEX"?"Swap":"Bridge"," via"," ",v.swapperId),C.createElement(Ri,null,C.createElement(G1,null),C.createElement(s,{variant:"body",size:"small"},"\xA0 $",v.feeInUsd," estimated gas fee")))),C.createElement("div",{style:{display:"flex"}},C.createElement(an,null,C.createElement(G0,null),C.createElement("div",{className:"details"},!!v.explorerUrl&&C.createElement("div",null,v.explorerUrl.map((O,Q)=>{let B=`internal-${Q}`,F=`anchor-${Q}`;return C.createElement(O0,{key:B},C.createElement(U0,null,C.createElement(f,{size:4}),C.createElement(G2,{color:"primary"}),C.createElement(Y0,{variant:"body",size:"small"},C.createElement(tn,{href:O.url,target:"_blank",rel:"noreferrer",key:F},O.description?C.createElement("b",null,O.description.substring(0,1).toUpperCase(),O.description.substring(1)," Tx"):C.createElement("b",null,"View transaction")))))})),v.status==="failed"&&C.createElement(O0,null,C.createElement(U0,null,C.createElement(v1,{color:"error"}),C.createElement(Y0,{variant:"body",size:"small",color:"$error500"},"Step failed")))))),M+1===r.steps.length&&C.createElement(rn,null),C.createElement(mo,{logo:v.toLogo,symbol:v.toSymbol,chainLogo:v.toBlockchainLogo||"",blockchain:v.toBlockchain,amount:v.outputAmount||"",estimatedAmount:v.expectedOutputAmountHumanReadable||"",success:v.status==="success"}))}),C.createElement(f,{size:32})),C.createElement(zo,{onClose:b.bind(null,!1),open:y,anchor:"bottom",title:"Cancel Progress",footer:C.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"}},C.createElement(k,{variant:"contained",type:"success",onClick:b.bind(null,!1)},"Skip"),C.createElement(f,{size:16,direction:"horizontal"}),C.createElement(k,{variant:"contained",type:"error",onClick:()=>{a(r.requestId),b(!1)}},"Cancel progress")),container:document.getElementById("swap-box")},C.createElement(A,{type:"warning"},C.createElement(s,{variant:"body",size:"small"},"Warning: Cancel ",C.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(dn,"SwapHistory");import i1 from"react";import n2,{useState as mn}from"react";var un=i("div",{display:"grid",gap:".5rem",gridTemplateColumns:" repeat(2, minmax(0, 1fr))",alignContent:"baseline",width:"100%",height:"100%"}),Cn=i("div",{paddingRight:"$4"});function Le(o){let{list:r,onChange:t,multiSelect:n,selectedList:l}=o,[a,p]=mn(o.selected),u=e(y=>{p(y),t(y)},"changeSelectedBlockchain"),g=e(y=>n&&l?l==="all"||l.findIndex(v=>y===v.name)>-1:y===a?.name,"isSelect");return n2.createElement(un,null,r.map((y,b)=>{let v=`item-${b}`;return n2.createElement(k,{type:g(y.name)?"primary":void 0,variant:"outlined",size:"large",prefix:n2.createElement(Cn,null,n2.createElement(I,{size:24,src:y.logo})),suffix:g(y.name)?n2.createElement(Ho,null):void 0,onClick:u.bind(null,y),key:v},n2.createElement(s,{variant:"body",size:"small"},y.displayName))}))}e(Le,"BlockchainsList");import a2 from"react";var Se=i("div",{display:"flex",justifyContent:"center",width:"100%",paddingTop:"33%",flex:1}),hn=e((o,r)=>o.filter(t=>N1(t.symbol,r)||N1(t.address||"",r)||N1(t.name||"",r)),"filterTokens");function gn(o){let{list:r,type:t,selected:n,hasHeader:l,onChange:a,onBack:p,loadingStatus:u}=o;return a2.createElement(m1,{textField:!0,hasHeader:l,title:`Select ${t} token`,onBack:p,textFieldPlaceholder:"Search tokens by name"},g=>{let y=hn(r,g);return u==="loading"?a2.createElement(Se,null,a2.createElement(E,{size:24})):u==="failed"?a2.createElement(v2,null):y.length?a2.createElement(ye,{searchedText:g,list:y,selected:n,onChange:a}):a2.createElement(x2,{catergory:"Token",searchedFor:g})})}e(gn,"TokenSelector");var fn=i("div",{overflowY:"auto",padding:"0 $4"}),yn=e((o,r)=>o.filter(t=>N1(t.name,r)||N1(t.displayName,r)),"filterBlockchains");function vn(o){let{type:r,list:t,onChange:n,selected:l,onBack:a,loadingStatus:p,hasHeader:u,listContainerStyle:g,multiSelect:y,selectedList:b}=o;return i1.createElement(m1,{textField:!0,hasHeader:u,textFieldPlaceholder:"Search blockchains by name",title:`Select ${r} Blockchain`,onBack:a},v=>{let M=yn(t,v);return i1.createElement(i1.Fragment,null,p==="loading"&&i1.createElement(Se,null,i1.createElement(E,{size:24})),i1.createElement(fn,{style:g,key:"1"},p==="failed"&&i1.createElement(v2,null),p==="success"&&i1.createElement(i1.Fragment,null,M.length?i1.createElement(Le,{list:M,selected:l,multiSelect:y,selectedList:b,onChange:n}):i1.createElement(x2,{catergory:"Blockchain",searchedFor:v}))))})}e(vn,"BlockchainSelector");import{i18n as xn}from"@lingui/core";import be from"react";var $n=i("div",{display:"grid",gap:"$8",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",overflow:"auto"});function wn(o){let{open:r,list:t,onSelect:n,onClose:l}=o;return be.createElement(Ao,{title:xn.t("Connect Wallets"),open:r,onClose:l,containerStyle:{width:"75%",maxWidth:"30rem",height:"60%"}},be.createElement($n,null,t.map(a=>be.createElement(le,{...a,key:a.title,onClick:n}))))}e(wn,"ConnectWalletsModal");import{i18n as ke}from"@lingui/core";import{Trans as Ie}from"@lingui/react";import L from"react";var Ln=i("div",{display:"flex",flexDirection:"column",width:"100%",overflow:"hidden"}),Sn=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"}}}),bn=i("div",{display:"flex",justifyContent:"flex-end",".balance":{display:"flex",alignItems:"center"}}),X0=i("span",{width:"24px",height:"24px",backgroundColor:"$background",borderRadius:"99999px"}),kn=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 go(o){let{type:r,chain:t,token:n,loadingStatus:l,fromBlockchain:a,toBlockchain:p,fromToken:u,setInputAmount:g,inputUsdValue:y,inputAmount:b,bestRoute:v,fetchingBestRoute:M,onChainClick:j,onTokenClick:O,tokenBalanceReal:Q,tokenBalance:B}=o,F=L.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"}},l==="failed"&&L.createElement(v1,{color:"error",size:24}),L.createElement(X1,null));return L.createElement(Ln,null,L.createElement(Sn,{type:r==="From"?"filled":"outlined"},L.createElement("div",{className:"head"},L.createElement(s,{variant:"body",size:"small",color:"neutral600"},r==="From"?L.createElement(Ie,{id:"swap from",message:"From"}):L.createElement(Ie,{id:"swap to",message:"To"})),r==="From"?L.createElement(bn,null,L.createElement("div",{className:"balance",onClick:()=>{B!=="0"&&g(Q.split(",").join(""))}},L.createElement(s,{variant:"body",size:"small",color:"neutral800"},ke.t("Balance"),": ",B," ",u?.symbol||""),L.createElement(f,{size:4}),L.createElement(k,{type:"primary",variant:"ghost",size:"small"},L.createElement(Ie,{id:"maximum amount of asset",message:"Max"})))):L.createElement("div",{className:"output-usd"},L.createElement(_o,{percentageChange:o.percentageChange,showPercentageChange:o.showPercentageChange}),L.createElement("div",null,L.createElement(s,{variant:"body",size:"xsmall",color:"neutral800"},`$${o.outputUsdValue}`)))),L.createElement("div",{className:"form"},L.createElement(k,{className:"selectors",onClick:j,variant:"outlined",disabled:l==="failed",loading:l==="loading",prefix:l==="success"&&t?L.createElement(I,{src:t.logo,size:24}):L.createElement(X0,null),suffix:F,size:"large"},l==="success"&&t?t.displayName:ke.t("Chain")),L.createElement(f,{size:12,direction:"horizontal"}),L.createElement(k,{className:"selectors",onClick:O,variant:"outlined",disabled:l==="failed"||r==="From"&&!a||r==="To"&&!p,loading:l==="loading",prefix:l==="success"&&n?L.createElement(I,{src:n.image,size:24}):L.createElement(X0,null),suffix:F,size:"large"},l==="success"&&n?n.symbol:ke.t("Token")),L.createElement(f,{size:12,direction:"horizontal"}),L.createElement("div",{className:"amount"},r==="From"?L.createElement(w1,{type:"number",size:"large",autoFocus:!0,placeholder:"0",style:{position:"relative",backgroundColor:"$background !important"},suffix:L.createElement("span",{style:{position:"absolute",right:"4px",bottom:"2px"}},L.createElement(s,{variant:"body",size:"xsmall",color:"neutral600"},`$${y}`)),value:b||"",min:0,onChange:r==="From"?U=>{o.onAmountChange(U.target.value)}:void 0}):L.createElement(kn,null,L.createElement(s,{variant:"title",size:"medium"},M&&"?",!!v?.result&&`\u2248 ${o.outputAmount}`,(!b||b==="0")&&"0"))))))}e(go,"TokenInfo");import{i18n as In}from"@lingui/core";import fo from"react";function Tn(o){let{highSlippage:r,selectedSlippage:t,changeSlippage:n}=o;return fo.createElement(fo.Fragment,null,r&&fo.createElement(A,{type:"warning",footer:fo.createElement(L2,{onClick:n})},In.t({id:" Caution, your slippage is high (={selectedSlippage}). Your trade may be front run.",values:{selectedSlippage:t}})))}e(Tn,"HighSlippageWarning");import{i18n as Mn}from"@lingui/core";import Te from"react";var Pn=i(s,{color:"$error500 !important"});function Bn({minRequiredSlippage:o,changeSlippage:r}){return Te.createElement(Pn,{variant:"body",size:"small"},Mn.t({id:"We recommend you to increase slippage to at least {minRequiredSlippage} for this route.",values:{minRequiredSlippage:o}}),Te.createElement(f,{size:8}),Te.createElement(L2,{onClick:r}))}e(Bn,"MinRequiredSlippage");import D2 from"react";var Wn=i("ul",{padding:"$0 $0 $40 $0",margin:0}),Zn=i("li",{paddingBottom:"$10"}),Dn=i(s,{display:"block"});function Hn({messages:o}){return D2.createElement(D2.Fragment,null,D2.createElement(Wn,null,o.map((r,t)=>{let n=t+r;return D2.createElement(Zn,{key:n},D2.createElement(Dn,{variant:"body",size:"medium",color:"$neutral700"},r))})))}e(Hn,"BalanceErrors");import{i18n as i3}from"@lingui/core";import P from"react";var J0=i("div",{$$color:"$colors$neutral100",[`.${c} &`]:{$$color:"$colors$neutral300"},backgroundColor:"$$color",borderRadius:"$xm",padding:"$15",variants:{sharpBottomStyle:{true:{borderBottomLeftRadius:"$0",borderBottomRightRadius:"$0"}}},"& .gray-text":{$$color:"$colors$neutral600",[`.${c} &`]:{$$color:"$colors$neutral700"},color:"$$color"},"& .label__container":{paddingBottom:"$5"},"& .label":{display:"flex",justifyContent:"space-between",alignItems:"center"},"& .balance":{display:"flex",justifyContent:"center",alignItems:"center"},"& .form":{display:"flex",justifyContent:"space-between",alignItems:"center"},"& .amount":{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"end",flexGrow:1}}),K0=i(w1,{padding:"0",fontSize:"$18",lineHeight:"$26",fontWeight:"$medium",textAlign:"right",width:140,"&:disabled":{cursor:"unset"}}),Q0=i(k,{$$color:"$colors$info300",[`.${c} &`]:{$$color:"$colors$secondary800"},backgroundColor:"$$color"}),R0=i("div",{width:140,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"}}}}});import{i18n as r3}from"@lingui/core";import K from"react";var o3=i(k,{maxWidth:"180px",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"}}),e3=i("div",{width:"10.625rem",padding:"$2 $5",display:"flex",borderRadius:"$xs",justifyContent:"start",boxSizing:"border-box",alignItems:"center","& .blockchain-name":{$$color:"$colors$neutral600",[`.${c} &`]:{$$color:"$colors$neutral700"},color:"$$color"},"& .token-chain-name":{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"start",paddingLeft:"$10"},"& .token-chain-name__skeleton":{padding:"$5 $0"}});function t3(o){let{error:r,chainImage:t,tokenImage:n,tokenSymbol:l,chain:a,onClick:p,loading:u}=o;return K.createElement(o3,{variant:"default",disabled:r||u,onClick:p},K.createElement(e3,null,K.createElement(X,{size:"large",useAsPlaceholder:r,chainImage:t,tokenImage:n,loading:u}),K.createElement("div",{className:"token-chain-name"},u?K.createElement("div",{className:"token-chain-name__skeleton"},K.createElement(T,{variant:"text",size:"large",width:92}),K.createElement(f,{size:8}),K.createElement(T,{variant:"text",size:"medium",width:92})):K.createElement(K.Fragment,null,K.createElement(s,{variant:"title",size:"medium"},r||!u&&!l?r3.t("Token"):l),K.createElement(s,{variant:"body",size:"medium",className:"blockchain-name"},r||!u&&!a?r3.t("Chain"):a)))))}e(t3,"TokenSection");function zn(o){return P.createElement(J0,{sharpBottomStyle:o.sharpBottomStyle},P.createElement("div",{className:"label__container"},P.createElement("div",{className:"label"},P.createElement(s,{variant:"body",size:"small",className:"gray-text"},o.label),"balance"in o&&!o.loading&&P.createElement("div",{className:"balance"},P.createElement(s,{className:"gray-text",mr:4,variant:"body",size:"xsmall"},i3.t("Balance"),": ",o.balance),P.createElement(Q0,{variant:"default",size:"xsmall",onClick:o.onSelectMaxBalance},P.createElement(s,{variant:"body",size:"xsmall",color:"secondary500"},i3.t("Max")))),o.loading&&P.createElement("div",{className:"balance"},P.createElement(T,{variant:"text",size:"large",width:105})))),P.createElement("div",{className:"form"},P.createElement(t3,{chain:o.chain.displayName,tokenSymbol:o.token.displayName,error:o.error,chainImage:o.chain.image,tokenImage:o.token.image,onClick:o.onClickToken,loading:o.loading}),P.createElement("div",{className:"amount"},o.loading||o.mode==="To"&&o.fetchingQuote?P.createElement(P.Fragment,null,P.createElement(T,{variant:"text",size:"large",width:92}),P.createElement(f,{size:8}),P.createElement(T,{variant:"text",size:"medium",width:92})):P.createElement(P.Fragment,null,P.createElement(K0,{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:r=>o.onInputChange(r.target.value)}}),"percentageChange"in o?P.createElement(B2,{size:"large",outputUsdValue:o.price.usdValue,error:o.price.error,percentageChange:o.percentageChange,warningLevel:o.warningLevel}):P.createElement(R0,{hasWarning:!!o.price.error},P.createElement(s,{variant:"body",size:"medium"},o.price.usdValue?`~$${o.price.usdValue}`:o.price.error))))))}e(zn,"SwapInput");import Me from"react";import Fn from"copy-to-clipboard";function Nn(o){let[r,t]=Me.useState(!1),n=Me.useCallback(l=>{Fn(l.toString()),t(!0)},[]);return Me.useEffect(()=>{let l;return r&&o&&(l=setTimeout(()=>t(!1),o)),()=>{clearTimeout(l)}},[r,o]),[r,n]}e(Nn,"useCopyToClipboard");export{A as Alert,M3 as AutoThemeIcon,Hn as BalanceErrors,o2 as BlockchainCategories,vn as BlockchainSelector,Zo as BlockchainsChip,W3 as BorderRadiusIcon,w2 as BottomLogo,k as Button,X as ChainToken,N6 as ChainsIcon,L2 as ChangeSlippageButton,h5 as Checkbox,vo as ChevronDownIcon,F3 as ChevronLeftIcon,V3 as ChevronRightIcon,xo as ChevronUpIcon,g5 as Chip,c2 as CloseIcon,m5 as Collapsible,k5 as CollapsibleMessageBox,E6 as ColorsIcon,d2 as CompleteIcon,wn as ConnectWalletsModal,X3 as CopyIcon,$o as CosmosCategoryIcon,o4 as CustomColorsIcon,t4 as DarkModeIcon,a4 as DeleteIcon,p4 as DesktopIcon,f as Divider,wo as DoneIcon,zo as Drawer,V0 as English,m2 as ErrorIcon,Lo as EvmCategoryIcon,y4 as ExternalLinkIcon,Ho as FilledCircle,$4 as FontIcon,E0 as French,So as GasIcon,S2 as Header,Tn as HighSlippageWarning,Oi as HomePanel,g3 as I18nManager,d1 as IconButton,I as Image,k4 as InProgressIcon,C2 as InfoErrorIcon,B4 as InfoIcon,_0 as Japanese,D4 as LanguageIcon,F4 as LightModeIcon,V4 as LinkIcon,Si as List,W2 as ListItem,Li as ListItemButton,v2 as LoadingFailedAlert,bo as LoadingIcon,O4 as LogoWithTextIcon,Vo as MessageBox,Bn as MinRequiredSlippage,Ao as Modal,No as ModalHeader,M1 as NextIcon,R4 as NoNotificationIcon,G4 as NoRouteIcon,bi as NotFound,x2 as NotFoundAlert,r6 as NotificationNumberIcon,n6 as NotificationsIcon,Io as NumberIcon,To as OtherCategoryIcon,_o as PercentageChange,m6 as PinIcon,Ni as Popover,B2 as PriceImpact,ki as QuoteCost,qo as Radio,I5 as RadioGroup,jo as RadioRoot,h6 as RefreshIcon,y6 as ReverseIcon,$6 as RouteIcon,P5 as RoutesOverview,Po as SearchIcon,m1 as SecondaryPage,J5 as SelectableCategoryList,Y5 as SelectableWallet,E5 as SelectableWalletList,j6 as SettingsIcon,T as Skeleton,q0 as Spanish,E as Spinner,mo as StepDetail,Di as StepDetails,Y6 as StyleIcon,ni as SwapContainer,ci as SwapDetailsPlaceholder,dn as SwapHistory,zn as SwapInput,li as SwapListItem,di as Switch,w1 as TextField,Bo as TimeIcon,Ti as TokenAmount,go as TokenInfo,ye as TokenList,wi as TokenPreview,gn as TokenSelector,ae as Tooltip,T6 as TransactionIcon,s as Typography,Wo as UtxoCategoryIcon,he as VirtualizedList,le as Wallet,Z6 as WalletIcon,T2 as WalletState,f2 as WarningIcon,i7 as config,Ne as createTheme,r7 as css,$3 as darkColors,c as darkTheme,G5 as getCountCategories,t7 as globalCss,R as keyframes,n7 as lightTheme,i as styled,y3 as theme,Nn as useCopyToClipboard};
|
|
20
20
|
//# sourceMappingURL=index.js.map
|