1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2777],{5741:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/curve-healthy",function(){return a(52350)}])},7389:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var o=a(37876),s=a(14232),l=a(15039),n=a.n(l),r=a(79940),i=a(23252),d=a(69114),c=a(45714),u=a.n(c);let m=e=>{let{selectedIndex:t=0,selectOptions:a,setSelected:l=e=>{},title:c,tooltip:m,className:_,inputClassName:h}=e,k=(0,s.useRef)(null),[x,p]=(0,s.useState)(!1);(0,d.A)(k,()=>{p(!1)});let g=async e=>{l(Number(e)),p(!1)};return(0,o.jsxs)("section",{className:n()(u().container,_),ref:k,children:[(0,o.jsxs)("div",{className:"flex-col gap-16",children:[(c||m)&&(0,o.jsxs)("div",{className:n()("flex-row gap-4"),children:[(0,o.jsxs)("p",{children:[c," "]}),m&&(0,o.jsx)(i.A,{id:"select-drop-down",content:m})]}),(0,o.jsxs)("div",{className:n()(u().profitInput,h,"flex-row justify-between"),onClick:()=>p(!x),children:[(0,o.jsxs)("div",{className:"flex-center gap-4",children:[t>=0&&(0,o.jsx)("img",{src:a[t].icon,width:25,height:25,alt:""}),t>=0?a[t].name:"Select ".concat(c||"Token")]}),a.length>1&&(0,o.jsx)("img",{src:"/assets/images/Below.svg",alt:""})]})]}),a.length>1&&x&&(0,o.jsx)(r.A,{showSelectModal:x,handleSelect:g,selectableList:a,selected:t>=0?a[t].name:"",className:c||m?u().selector:u().selector2})]})}},15308:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var o=a(37876),s=a(25158),l=a.n(s),n=a(82019),r=a(74574),i=a(15039),d=a.n(i),c=a(72482),u=a(67329),m=a(14232),_=a(26796),h=a(36536),k=a(12448),x=a(7389);let p=e=>{let{label:t,subLabel:a,botType:s,token:i,tokenBalance:p,exchangeRate:g,amount:w,listedTokens:v,showMyToken:b=!0,canAddFund:B,canRemoveToken:f=!1,onInputAmount:T,onClickMaxTokenBalance:j,onSelectToken:N,isDropdown:S=!1,isTokenSelectable:A=!0,isCustomTokens:C=!1,isTokenLoading:y=!0,selectedIndex:I,selectOptions:D,setSelected:L,className:E}=e,R=c.Uq[s].supportNetworks,H=c.Uq[s].defaultChain,{networkSelect:P}=(0,u.vT)(),[V,M]=(0,m.useState)(!1),[U,F]=(0,m.useState)(!1),W=async()=>{await P(H,R)&&M(!0)},Y=e=>{M(!1),N(e)},G=e=>{T&&T(e)},O=(0,m.useCallback)(()=>p&&w&&w.raw.comparedTo(0)>0&&-1===p.raw.comparedTo(w.raw)?l().errorColor:"",[p,w]);return(0,o.jsxs)("section",{className:d()(l().container,E),children:[(t||""!==i.symbol)&&(0,o.jsxs)("div",{className:"flex-row justify-between",children:[(0,o.jsx)("p",{children:t}),a?(0,o.jsx)("p",{className:l().subLabel,children:a}):""!==i.symbol&&p&&(0,o.jsxs)("div",{className:l().walletBalance,children:["Wallet Balance: ",p.format," ",(0,o.jsx)("div",{className:l().max,onClick:j,children:"MAX"})]})]}),(0,o.jsxs)("div",{className:d()(l().tradingInfo,A?"":l().notSelectable,O()),children:[S?(0,o.jsx)(x.A,{selectedIndex:I,selectOptions:D,setSelected:L,className:l().dropdown,inputClassName:l().dropdownInputClass}):(0,o.jsxs)("div",{className:l().token,onClick:()=>A&&W(),children:[(0,o.jsxs)("div",{className:"flex-center gap-4",children:[(0,o.jsx)("img",{src:""===i.icon?"/assets/images/Empty_ellipse.svg":i.icon,width:25,height:25}),""===i.symbol?"?":(0,o.jsx)("div",{className:d()(l().symbol,"bold"),children:i.symbol})]}),A&&(0,o.jsx)("img",{className:l().selectIcon,src:"/assets/images/Below.svg",alt:""})]}),(0,o.jsxs)("div",{className:l().tokenValueInfo,children:[(0,o.jsxs)("div",{className:l().tokenValue,children:[(0,o.jsx)(n.DebounceInput,{placeholder:"0.0",debounceTimeout:300,onChange:e=>G(e.target.value),type:"number",className:l().tokenAmount,value:parseFloat(Number(w.format).toFixed(8)),disabled:""===i.address||!T}),(0,o.jsxs)("p",{className:l().usdPrice,children:["US$",r.A.convertToDollar(w.format,g)]})]}),f&&(0,o.jsx)("img",{src:"/assets/images/Close_circle.svg",width:15,height:15,onClick:()=>Y(k.A.getEmptyToken())})]})]}),V&&(0,o.jsx)(_.A,{show:V,onBack:()=>M(!1),tokens:v,onSelectToken:Y,showMyToken:b,onAddFundBot:B?()=>F(!0):void 0,isLoading:y,isCustomTokens:C}),(0,o.jsx)(h.A,{show:U,onBack:()=>F(!1)})]})}},19439:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var o=a(37876),s=a(71579),l=a(40887),n=a(71816);a(14232);let r=e=>{let{children:t,isHide:a,isCurve:r=!0}=e;return l.n7.isDisableDeposit||a?(0,o.jsx)(n.default,{}):(0,o.jsxs)(o.Fragment,{children:[t,(0,o.jsx)(s.A,{isCurve:r})]})}},23252:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var o=a(37876);a(14232);var s=a(76717);let l=e=>{let{id:t,content:a="",icon:l,width:n=12,height:r=12,className:i}=e;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("img",{src:l||"/assets/images/Information_white.svg",width:n,height:r,"data-tooltip-id":t,"data-tooltip-content":a,className:i}),(0,o.jsx)(s.m_,{id:t,style:{maxWidth:"240px",background:"#5D5D5E",filter:"drop-shadow(0px 4px 4px rgba(0, 0, 0))",color:"#fff",textAlign:"center",fontSize:"10px",fontWeight:400,lineHeight:"11.5px",padding:"6px"}})]})}},25158:e=>{e.exports={container:"TokenSelector_container__vPQbS",subLabel:"TokenSelector_subLabel__S_x4S",walletBalance:"TokenSelector_walletBalance__kS1q8",max:"TokenSelector_max__pkIgR",notSelectable:"TokenSelector_notSelectable__Iek0N",tradingInfo:"TokenSelector_tradingInfo__GmZ32",token:"TokenSelector_token__ZMHmJ",tokenValueInfo:"TokenSelector_tokenValueInfo__TZLgj",tokenValue:"TokenSelector_tokenValue__npI7H",tokenAmount:"TokenSelector_tokenAmount__vK67R",usdPrice:"TokenSelector_usdPrice__3PVWG",errorColor:"TokenSelector_errorColor__LgT_4",dropdown:"TokenSelector_dropdown__ukWYn",dropdownInputClass:"TokenSelector_dropdownInputClass__pgndl"}},31549:e=>{e.exports={container:"error_container__r3ceG",errorMark:"error_errorMark__SftFL",pigeonDead:"error_pigeonDead__NzmmT",link:"error_link__eMGfB"}},33284:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var o=a(37876),s=a(15039),l=a.n(s),n=a(43399),r=a.n(n);let i=e=>{let{header:t,icon:a,className:s,children:n}=e;return(0,o.jsxs)("section",{className:l()(r().container,s),children:[a&&(0,o.jsx)("div",{className:r().circleIcon,children:(0,o.jsx)("img",{src:a,alt:"",width:70,height:70})}),t&&(0,o.jsx)("div",{className:r().header,children:t}),(0,o.jsx)("div",{className:r().body,children:n})]})}},43399:e=>{e.exports={container:"BotViewCard_container__6XXG_",circleIcon:"BotViewCard_circleIcon__SqR7T",header:"BotViewCard_header__NztKv",body:"BotViewCard_body__wSIEQ"}},45714:e=>{e.exports={container:"SelectDropDown_container__N_OH7",mb16:"SelectDropDown_mb16__qRZ31",intervalTrades:"SelectDropDown_intervalTrades__ORDa4",profitInput:"SelectDropDown_profitInput__pJYgY",selector:"SelectDropDown_selector__JFXlJ",selector2:"SelectDropDown_selector2__HePJY"}},52350:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>q});var o=a(37876),s=a(72482),l=a(33284),n=a(28239),r=a(7426),i=a(23252),d=a(79632),c=a(40887),u=a(89351),m=a(51757),_=a(27952),h=a(48670),k=a(13086),x=a(49051),p=a(43804),g=a(92715),w=a(67329),v=a(19891),b=a(11228),B=a(30941),f=a(73218),T=a(74574),j=a(12448),N=a(2661),S=a(18935),A=a(25763),C=a(15039),y=a.n(C),I=a(48230),D=a.n(I),L=a(14232),E=a(82019),R=a(53366),H=a(7389),P=a(70502),V=a(12566),M=a(53685),U=a.n(M);let F=e=>{let{chainId:t,targetChain:a,botChain:s,full:l,isValidTokenAmount:n,isAmountInputLoading:r,isTxLoading:i,toTokenBalance:u,outputAmount:m,health:_,profitTaking:h,deleverageLevel:k,deleveragePercent:x,bandsNumber:p,leverage:g,leverageZap:v,callbackArgs:b,selectedCollateralIndex:B,selectedSettlementIndex:f,className:T,onClickStartBot:j,buttonText:N="Start Bot"}=e,{openConnectionModal:S,requestSwitchNetwork:A}=(0,w.vT)(),C=c.n7.isDisableDeposit,I=(0,L.useMemo)(()=>t?a&&(null==a?void 0:a.chainId.toString())!==d.E7&&(null==a?void 0:a.chainId.toString())===s?r?{disabled:!0,text:"Fetching Prices",style:U().disabled,isLoading:!0,onClick:()=>{}}:n?B<0?{disabled:!0,text:"Select Collateral Token",style:U().disabled,onClick:()=>{}}:f<0?{disabled:!0,text:"Select Settlement Token",style:U().disabled,onClick:()=>{}}:0===m.raw.comparedTo(0)?{disabled:!0,text:"Enter Borrow Token Amount",style:U().disabled,onClick:()=>{}}:m.raw.comparedTo(0)>0&&-1===u.raw.comparedTo(m.raw)?{disabled:!0,text:"Borrow token amount is greater than Maximum",style:U().error,onClick:()=>{}}:!x||0>=+x?{disabled:!0,text:"Enter Deleverage Percentage",style:U().disabled,onClick:()=>{}}:1>+x||+x>100?{disabled:!0,text:"Invalid Repay percentage",style:U().error,onClick:()=>{}}:0>=+g||void 0===v?{disabled:!0,text:"Invalid Leverage",style:U().disabled,onClick:()=>{}}:h&&""!==h&&0!=+h?i?{disabled:!0,text:"Loading...",style:U().disabled,isLoading:!0,onClick:()=>{}}:{disabled:!1,text:N,style:U().success,onClick:j}:{disabled:!0,text:"Enter Profit Taking",style:U().disabled,onClick:()=>{}}:{disabled:!0,text:"Input Deposit Token Amount",style:U().disabled,onClick:()=>{}}:{disabled:!0,text:"Select Correct Chain",style:U().disabled,onClick:async()=>{await A(s)}}:{disabled:!1,text:"Connect Wallet",style:"",onClick:()=>{S()}},[n,r,i,u,m,t,a,s,_,h,k,x,p,C,g,v,b,B,f]);return(0,o.jsx)(V.A,{type:"blue",className:y()(U().container,T,I.style,I.disabled?void 0:U().cursor),full:l,onClick:()=>I.onClick(),disabled:I.disabled,children:(0,o.jsxs)(o.Fragment,{children:[I.isLoading&&(0,o.jsx)("img",{src:"/assets/images/Loading_circle.svg",alt:"loading",width:40,height:36,style:{marginTop:"6px"}}),(0,o.jsx)("span",{children:I.text})]})})};var W=a(97381),Y=a.n(W);let G=()=>{var e;
1let{wallet:t,requestAddNetwork:a,requestSwitchNetwork:C,openConnectionModal:I}=(0,w.vT)(),V=(0,g.A)(t),M=s.Uq[s.vi.CURVE_HEALTHY].supportNetworks,U=s.Uq[s.vi.CURVE_HEALTHY].defaultChain,[W,G]=(0,L.useState)(),{buildNewBot:O}=(0,x.A)({provider:V,wallet:t}),{createLoanCollateral:q,getQuoteAmount:X,getMaxBorrowableAmount:Z,getHealth:z,getBorrowRate:J}=(0,p.A)(),[Q]=(0,v.dt)(),{getTokenBalance:$}=(0,k.A)({provider:V}),{selectedChainId:K,targetChain:ee}=(0,L.useMemo)(()=>{let e=t.network?d.ex[S.A.parseIntString(t.network)]:j.A.getMockChain();return{selectedChainId:null==e?void 0:e.chainId,targetChain:e}},[t]),[et,ea]=(0,L.useState)([j.A.getEmptySelectToken()]),[eo,es]=(0,L.useState)(-1),[el,en]=(0,L.useState)(-1),er=_.UH,[ei,ed]=(0,L.useState)(new A.A(1)),[ec,eu]=(0,L.useState)({raw:new A.A(0),format:""}),[em,e_]=(0,L.useState)({raw:new A.A(0),format:""}),[eh,ek]=(0,L.useState)(!1),[ex,ep]=(0,L.useState)(!1),[eg,ew]=(0,L.useState)(!1),[ev,eb]=(0,L.useState)(""),[eB,ef]=(0,L.useState)(""),[eT,ej]=(0,L.useState)(""),[eN,eS]=(0,L.useState)(!1),[eA,eC]=(0,L.useState)("-"),[ey,eI]=(0,L.use
1State)(""),[eD,eL]=(0,L.useState)("-"),[eE,eR]=(0,L.useState)(""),[eH,eP]=(0,L.useState)("50"),[eV,eM]=(0,L.useState)("-"),[eU,eF]=(0,L.useState)(void 0),[eW,eY]=(0,L.useState)(void 0),[eG,eO]=(0,L.useState)("44"),eq=c.Gd,eX=(0,L.useCallback)(()=>eo>=0&&et.reduce((e,t)=>{var a,o,s,l;return(S.A.isSameContract(t.token.token.address,_.gs[eo].address)?Number(null==t||null==(o=t.swapPath)||null==(a=o.amount)?void 0:a.format):.98*Number(null==t||null==(l=t.swapPath)||null==(s=l.amount)?void 0:s.format))+e},0),[et,eo]),eZ=(0,L.useCallback)(()=>et.reduce((e,t)=>{var a,o,s;return Number(null!=(s=null==t||null==(o=t.token)||null==(a=o.token)?void 0:a.usdAmount)?s:0)+e},0),[et]),ez=(0,L.useCallback)(()=>(54-Number(eG)).toString(),[eG]);(0,L.useEffect)(()=>{!V||(null==t?void 0:t.account)||(null==t?void 0:t.network)||I()},[V]),(0,L.useEffect)(()=>{V&&(null==t?void 0:t.account)&&(null==t?void 0:t.network)!==U&&C(U)},[V,t]),(0,L.useEffect)(()=>{if(t.network){let e=S.A.parseIntString(t.network);e in M?G(e):G("")}else G("")},[t.network]),(0,L.useEffect)(()=>{eo<0||(async()=>{let e=setTimeout(async()=>{eL(await J(_.gs[eo].displayName.toLowerCase()))},100);return()=>clearTimeout(e)})()},[eo]),(0,L.useEffect)(()=>{let e=setTimeout(async()=>{let e=eX();if(eo>=0&&e>0){ek(!0);let t=await Z({llammaId:_.gs[eo].displayName.toLowerCase(),userCollateral:e,range:ez()});t&&e_({raw:T.A.convertToWei(t),format:T.A.toFixed(t,5)}),ek(!1)}},100);return()=>clearTimeout(e)},[eG,et,eo]);let eJ=async(e,t,a)=>{if(ek(!0),e_({raw:new A.A(0),format:""}),et[a].amount=e,et[a].token.token.usdAmount=t,et[a].swapPath.routes=[],et[a].swapPath.amount=(0,m.hU)(),ea([...et]),e.raw.comparedTo(0)>0&&eo>=0){var o,s,l,n;if(S.A.isSameContract(null==(s=et[a])||null==(o=s.token)?void 0:o.token.address,_.gs[eo].address))et[a].swapPath={routes:[_.gs[eo].address],amount:e};else{let t=await X(null==(n=et[a])||null==(l=n.token)?void 0:l.token,_.gs[eo],e,1);et[a].swapPath={routes:t.routes?t.routes:[],amount:t.amount}}ea([...et])}ek(!1)},eQ=async e=>{eM("-");let t=eX();if(eo>=0&&t>0&&+e>0){ek(!0);let{leverageZap:a,leverage:o,callback_args:s}=await q({llammaId:_.gs[eo].displayName.toLowerCase(),userCollateral:t,debt:e,decimals:_.gs[eo].decimals});eM(o.toString()),eF(a),eY(s),ek(!1)}},e$=async e=>{isNaN(e)||(eu({raw:T.A.convertToWei(Number(e),er.decimals),format:e}),await eQ(e))};(0,L.useEffect)(()=>{eu({raw:new A.A(0),format:""}),e_({raw:new A.A(0),format:""}),ed(new A.A(1)),eL("-"),eM("-")},[ee]);let{listedTokens:eK}=(0,b.xl)({},{selectFromResult:e=>({listedTokens:(0,f.C)(e.data,K)})}),e0=async e=>{let{hash:t}=e;ep(!1),eb(""),ew(!0)},e1=()=>{ew(!1)},e7=e=>{let{txHash:t,txTitle:a,txText:o,txProcessing:s=!1}=e;void 0!==a&&ef(a),void 0!==o&&ej(o),void 0!==t&&eb(t),eS(s)},e2=e=>{(0,N.w)(e),ep(!1)},e3=async e=>{ek(!0);let t=et[e],a=t.token.balance,o=(0,m.hU)(),s="0";if(t.token.token.address===h.R9){let e=0+c.YR;Number(a.format)>e&&(o={raw:T.A.convertToWei(Number(a.format)-e,t.token.token.decimals),format:(Number(a.format)-e).toString()},s=T.A.convertToDollar((Number(a.format)-e).toString(),t.token.exchangeRate))}else o=a,s=T.A.convertToDollar(a.format,t.token.exchangeRate);await eJ(o,s,e)},e5=async(e,t)=>{if(isNaN(e))return;ek(!0);let a=et[t],o={raw:T.A.convertToWei(Number(e),a.token.token.decimals),format:e},s=T.A.convertToDollar(e,a.token.exchangeRate);await eJ(o,s,t)},e4=async(e,a)=>{if(""===e.address)et.splice(a,1),ea([...et]);else{if(et[a].token.token.address===e.address)return;let o=await Q({network:1,token:e.address===h.R9?h.tb[ee.chainId.toString()].weth:e.address}).unwrap(),s=(0,B.h)(o),l=T.A.convertToDollar(et[a].amount.format,s),n=await $(e,t.account);et[a].token.token=e,et[a].token.balance=n,et[a].token={token:e,balance:n,exchangeRate:s},ea([...et]),await eJ(et[a].amount,l,a)}eL("-"),eM("-")};(0,L.useEffect)(()=>{if(eo>=0&&Number(ec.format)>0&&Number(em.format)>0){let e=eX();if(e>0){let t=setTimeout(async()=>{let t=await z({llammaId:_.gs[eo].displayName.toLowerCase(),userCollateral:e,debt:ec.format,range:ez(),isFull:ec.format/em.format<c.vG,isLeverage:!0});eC(t);let a=t-5;eR(a>3?a.toFixed(2):"3")},500);return()=>clearTimeout(t)}}},[ec,em,eo,eG]),(0,L.useEffect)(()=>{eo>=0&&e8&&et.map(async(e,t)=>await eJ(e.amount,e.token.token.usdAmount,t))},[eo]);let e6=async()=>{eu(em),await eQ(em.format)},e8=(0,L.useMemo)(()=>{for(let e of et)if(!e.amount||0>=Number(e.amount.format))return!1;else if(1===e.amount.raw.comparedTo(e.token.balance.raw))return!1;return!0},[et]),e9=(0,L.useCallback)(()=>(100*ey/eZ()).toFixed(2),[ey,et]),te=(0,L.useCallback)(()=>ec&&em&&ec.raw.comparedTo(0)>0&&-1===em.raw.comparedTo(ec.raw)?Y().errorColor:"",[em,ec]),tt=async()=>{await a(ee.chainId),ep(!0);try{await O(et,ec,eU,eW,eV,ez(),eH,eE,ey,eq,"30",e0,e2,e7,_.gs[eo],_.UL[el].address)}catch(e){console.log(e),ep(!1)}},ta=_.gs.map((e,t)=>({name:e.symbol,icon:e.icon,id:t}));return(0,o.jsx)("div",{className:Y().container,children:(0,o.jsxs)("div",{className:Y().content,children:[(0,o.jsx)(D(),{href:u.Xc.Home,className:Y().goBack,children:(0,o.jsx)("img",{src:"/assets/images/Back.svg",alt:"back",width:25,height:12,className:Y().backImage})}),(0,o.jsx)("h1",{className:Y().title,children:s.Uq[s.vi.CURVE_HEALTHY].buildTitle}),(0,o.jsx)("p",{className:Y().description,children:s.Uq[s.vi.CURVE_HEALTHY].buildDescription}),(0,o.jsxs)("div",{className:Y().tradingWrapper,children:[(0,o.jsxs)(l.A,{header:"Select your Tokens",children:[(0,o.jsxs)("div",{className:"flex-col gap-12",children:[et.map((e,t)=>(0,o.jsx)(P.A,{index:t,label:0===t?"Deposit Token":"",botType:s.vi.CURVE_HEALTHY,selectToken:e,listedTokens:eK,onInputAmount:e5,onClickMaxTokenBalance:e3,onSelectToken:e4},t)),et.length>0&&et.length<5&&(0,o.jsx)("div",{className:Y().addToken,onClick:()=>{et[et.length]={token:{token:j.A.getEmptyToken(),balance:{raw:new A.A(0),format:""},exchangeRate:new A.A(0)},amount:{raw:new A.A(0),format:""}}
1,ea([...et])},children:"+ Add Token"})]}),(0,o.jsx)(H.A,{selectedIndex:eo,selectOptions:ta,setSelected:e=>es(e),title:"Collateral Token"}),(0,o.jsxs)("div",{className:"flex-row justify-between",children:[(0,o.jsx)("div",{children:"crvUSD Borrow Token"}),(0,o.jsxs)("div",{className:Y().walletBalance,children:["Max borrow amount: ",Number(em.format)>0?em.format:"-",Number(em.format)>0&&(0,o.jsx)("div",{className:Y().max,onClick:e6,children:"MAX"})]})]}),(0,o.jsxs)("div",{className:y()(Y().tradingInfo,te()),children:[(0,o.jsx)("div",{className:Y().token,children:(0,o.jsxs)("div",{className:"flex-center gap-4",children:[(0,o.jsx)("img",{src:""===er.icon?"/assets/images/Empty_ellipse.svg":er.icon,width:25,height:25}),""===er.symbol?"?":(0,o.jsx)("div",{className:y()(Y().symbol,"bold"),children:er.symbol})]})}),(0,o.jsxs)("div",{className:Y().tokenValue,children:[(0,o.jsx)(E.DebounceInput,{placeholder:"0.0",debounceTimeout:300,onChange:e=>e$(e.target.value),type:"number",className:Y().tokenAmount,value:ec.format}),(0,o.jsxs)("p",{className:Y().usdPrice,children:["US$",T.A.convertToDollar(ec.format,ei)]})]})]}),(0,o.jsx)(H.A,{selectedIndex:el,selectOptions:_.UL,setSelected:e=>en(e),title:"Settlement Token",tooltip:"Token which will be deposited to your wallet when loan is repaid partially or in full."})]}),(0,o.jsxs)(l.A,{header:"Select your Bot Details",children:[(0,o.jsx)("div",{className:"flex-row justify-between",children:(0,o.jsx)("div",{className:"flex-row center gap-4",children:"Select Your Leverage Level"})}),(0,o.jsxs)("div",{className:"flex-col gap-8",children:[(0,o.jsx)("input",{type:"range",required:!0,value:eG,min:4,max:50,onChange:e=>eO(e.target.value)}),(0,o.jsxs)("div",{className:"flex-row justify-between",children:[(0,o.jsx)("div",{className:"bold",children:"Low Leverage"}),(0,o.jsx)("div",{className:"bold",children:"Maximum Leverage"})]})]}),(0,o.jsxs)("div",{className:Y().loanInfos,children:[(0,o.jsxs)("div",{className:Y().loanInfo,children:[(0,o.jsx)("p",{children:"Leverage:"}),(0,o.jsxs)("p",{children:[Number(eV)>=0?Math.ceil(Number(eV)):eV,"x"]})]}),(0,o.jsxs)("div",{className:Y().loanInfo,children:[(0,o.jsx)("p",{children:"Current Health:"}),(0,o.jsxs)("p",{className:"flex-row center gap-4",children:[eA,"%",(0,o.jsx)(i.A,{id:"health-tooltip",content:"This metric indicates the current health of your position."})]})]}),(0,o.jsxs)("div",{className:Y().loanInfo,children:[(0,o.jsx)("p",{children:"Interest Rate:"}),(0,o.jsxs)("p",{children:[eD,"%"]})]})]}),(0,o.jsx)("div",{className:"flex-col",children:(0,o.jsx)("div",{children:"Profit Taking"})}),(0,o.jsxs)("div",{className:Y().tradesInfo,children:[(0,o.jsxs)("div",{className:Y().profitTaking,children:[(0,o.jsx)("p",{children:"$"}),(0,o.jsx)(E.DebounceInput,{placeholder:"0",debounceTimeout:300,onChange:e=>eI(e.target.value),type:"number",value:ey,className:Y().tokenAmount})]}),(0,o.jsx)("div",{className:"h-full",children:(0,o.jsxs)("div",{className:Y().trade,children:[+e9()>0?e9()+"% ":"-"," Target Return"]})})]}),(0,o.jsx)(R.A,{contractAddress:null==(e=h.tb[ee.chainId.toString()])?void 0:e.healthy_curve_curve,tokens:et.map(e=>({token:e.token.token,amount:e.amount})),bot:"Healthy Bot Gas",showOnlyTotal:!0}),(0,o.jsx)(F,{chainId:t?t.network:null,targetChain:ee,botChain:W,full:!0,onClickStartBot:()=>tt(),isValidTokenAmount:e8,isAmountInputLoading:eh,isTxLoading:ex,toTokenBalance:em,outputAmount:ec,health:eA,profitTaking:ey,deleverageLevel:eE,deleveragePercent:eH,bandsNumber:eG,leverage:eV,leverageZap:eU,callbackArgs:eW,selectedCollateralIndex:eo,selectedSettlementIndex:el,className:Y().swapButton,buttonText:s.Uq[s.vi.CURVE_HEALTHY].buttonText})]})]}),(0,o.jsx)(n.A,{show:ex,onClose:()=>ep(!1),title:eB,text:eT,txHash:ev,isProcessing:eN,blockExplorer:(0,u.ND)(null==ee?void 0:ee.chainId)}),(0,o.jsx)(r.A,{show:eg,onClose:()=>e1()})]})})};var O=a(19439);function q(){return(0,o.jsx)(O.A,{isHide:s.$D.CURVE_HEALTHY.hide,children:(0,o.jsx)(G,{})})}},53685:e=>{e.exports={container:"StartBotButton_container__FpZgB",cursor:"StartBotButton_cursor__2iP5b",error:"StartBotButton_error__kLNkp",disabled:"StartBotButton_disabled__41lZv",success:"StartBotButton_success__7Ig0s",loadingBtn:"StartBotButton_loadingBtn__Fjd3T",errorMark:"StartBotButton_errorMark__n9p9A"}},58876:e=>{e.exports={selectList:"Selector_selectList__Rpp8Y",selectOption:"Selector_selectOption__Jmz3x",selectNetwork:"Selector_selectNetwork__ZH3Aw",disabled:"Selector_disabled__zuwmc",thirdwebConnect:"Selector_thirdwebConnect__q1HT0"}},70502:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var o=a(37876),s=a(15308);let l=e=>{let{index:t,label:a,botType:l,selectToken:n,listedTokens:r,onInputAmount:i,onClickMaxTokenBalance:d,onSelectToken:c,className:u}=e,m=e=>{c(e,t)};return(0,o.jsx)(s.A,{label:a,botType:l,token:n.token.token,tokenBalance:n.token.balance,exchangeRate:n.token.exchangeRate,amount:n.amount,listedTokens:r,canRemoveToken:0!==t,onInputAmount:e=>{isNaN(e)||i(e,t)},onClickMaxTokenBalance:()=>{d(t)},onSelectToken:e=>m({...e}),className:u},t)}},71816:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>i});var o=a(37876),s=a(48230),l=a.n(s),n=a(31549),r=a.n(n);let i=function(e){let{display:t=!0}=e;return t&&(0,o.jsxs)("section",{className:r().container,children:[(0,o.jsx)("img",{src:"/assets/images/404.svg",className:r().errorMark,alt:"404"}),(0,o.jsx)("img",{src:"/assets/images/Pigeon_dead.svg",className:r().pigeonDead,alt:"404"}),(0,o.jsx)("h1",{children:"SORRY, PAGE NOT FOUND"}),(0,o.jsx)("p",{children:"The link you followed is probably broken or the page has been removed"}),(0,o.jsx)(l(),{href:"/",className:r().link,children:"Return to Home Page"})]})}},79940:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var o=a(37876);a(14232);var s=a(15039),l=a.n(s),n=a(58876),r=a.n(n),i=a(67329),d=a(67120);let c=e=>{let{selectableList:t,showSelectModal:a,handleSelect:s,selected:n,className:c}=e,{wallet:u}=(0,i.vT)();return a&&t&&t.length>0&&(0,o.jsx)("div",{className:l()(r().selectList,c),children:(0,o.jsx)("div",{children:t.map((e,t)=>(0,o.jsxs)("div",{className:l()(r().selectOption,String(n)!==e.name?r().disabled:""),onClick:()=>s(e.id),children:[e&&e.icon&&(0,o.jsx)("img",{src:e.icon,width:25,height:25,alt:""}),u&&u.network?(0,o.jsx)("span",{children:e.name}):(0,o.jsx)(d.Up$,{className:r().thirdwebConnect,btnTitle:e.name,showThirdwebBranding:!1,modalTitle:"Connect"})]},t))})})}},97381:e=>{e.exports={container:"BuildBot_container__vVMca",symbol:"BuildBot_symbol__06_tV",content:"BuildBot_content__LWK_U",goBack:"BuildBot_goBack__fzV6R",title:"BuildBot_title__u4xGk",description:"BuildBot_description__pdO7P",tradingWrapper:"BuildBot_tradingWrapper__5dZ6z",feesView:"BuildBot_feesView__WJFym",botDetails:"BuildBot_botDetails__ue_pt",divide:"BuildBot_divide__pukVT",botDetailsInfo:"BuildBot_botDetailsInfo__Lp64s",selectOptions:"BuildBot_selectOptions__5Prnb",walletBalance:"BuildBot_walletBalance__FxqsD",max:"BuildBot_max__XtEAH",toTokenValue:"BuildBot_toTokenValue___vU6L",maxTo:"BuildBot_maxTo__1F2DT",profit:"BuildBot_profit__HgWAt",mb16:"BuildBot_mb16__eo7SB",intervalTrades:"BuildBot_intervalTrades__zQaEA",addToken:"BuildBot_addToken__Z1GTm",profitInput:"BuildBot_profitInput__7Myes",tradingInfo:"BuildBot_tradingInfo__oC0cV",token:"BuildBot_token__yUF_Y",tokenValue:"BuildBot_tokenValue__VGp7x",tokenAmount:"BuildBot_tokenAmount__Weiw8",usdPrice:"BuildBot_usdPrice__5cEp1",limitRatio:"BuildBot_limitRatio__mxuPp",limitRatioValue:"BuildBot_limitRatioValue__FRcCB",limitRatioPer:"BuildBot_limitRatioPer__GP2Da",tradesInfo:"BuildBot_tradesInfo__TxIGI",profitTaking:"BuildBot_profitTaking__tYtYQ",trade:"BuildBot_trade__RvqG1",checkbox:"BuildBot_checkbox__IRg4U",switch:"BuildBot_switch__drH3o",roundSl
1ider:"BuildBot_roundSlider__Wk2Sq",disclaimer:"BuildBot_disclaimer__Ix1Hk",blue:"BuildBot_blue__CXkMQ","react-datepicker":"BuildBot_react-datepicker__nkbBc",selector:"BuildBot_selector__fjTvM",loanInfos:"BuildBot_loanInfos__W8avD",loanInfo:"BuildBot_loanInfo__dkHoH",healthPower:"BuildBot_healthPower__BzbZe",riskMethods:"BuildBot_riskMethods__7IHNk",riskMethod:"BuildBot_riskMethod__GQzi7",selectedMethod:"BuildBot_selectedMethod__dTBQ7",errorColor:"BuildBot_errorColor__oSGXL",errorText:"BuildBot_errorText__2IemB",twapTransaction:"BuildBot_twapTransaction__bM3JX",swapButton:"BuildBot_swapButton__w_xkd",p1:"BuildBot_p1__J6Jfi"}}},e=>{var t=t=>e(e.s=t);e.O(0,[5763,9088,1579,6717,2458,1922,691,3366,197,9051,636,6593,8792],()=>t(5741)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.