PageSourceSearch

https://files-pro.coinswitch.co/cspro/1790767973354/build/routes/__common-layout/pro.smart-invest-C5CQLP67.js

js coinswitch.co collected 2026-10-01 10:40:05 UTC 95,763 bytes, 1 lines download raw bytes

1import{A as Ze,a as Rt,d as We,e as Ye,f as Bt,g as Ht,h as Wt,i as Yt,j as $t,k as Pt,l as Ct,m as kt,o as gt,u as $e,v as Ke,w as qe,x as ze,y as Xe,z as Qe}from"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-PDW6K67P.js";import{a as st,b as _,g as Ot,h as Be,i as He,j as Vt,l as jt,m as Gt}from"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-KIZRAHUH.js";import{i as Le,j as Oe,k as Re,l as De,m as Fe,n as Me,o as Ve,p as je,q as Ge}from"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-TIU7I2M2.js";import{r as St}from"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-UDLLOAYI.js";import{a as Ue}from"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-EA5KB6OO.js";import"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-6NPMCTWJ.js";import"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-R5QCCW3E.js";import"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-OYF47S6C.js";import"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-KWJSV6U3.js";import"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-ZBA2I3MB.js";import"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-JYONJ5ZG.js";import"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-ZJNZU5MR.js";import"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-DAE2KFH6.js";import"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-EGCHAW3Q.js";import"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-GV7QGYLV.js";import"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-WBLP4DXD.js";import"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-NU2MC7SH.js";import"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-2FAZQJSZ.js";import"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-4MBNA5MZ.js";import{b as Ee}from"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-LWO4GXEQ.js";import{b as Ie,c as _e}from"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-LEHVONFA.js";import{$d as ye,$g as he,$h as fs,Ah as Te,Fg as Lt,Fh as ht,Ih as ds,Jm as Ce,Mh as Mt,Qa as bt,Qh as xs,Ra as ls,Tj as Tt,Vh as Ae,W
1n as L,Xm as ke,Xn as ut,a as ns,be as ps,dj as Q,gj as Y,kj as Se,mj as Pe,mn as At,rf as be,tf as cs}from"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-I7IEEDYB.js";import"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-ALMPO2SG.js";import{e as yt,f as Ft,h as ve}from"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-DKQD472P.js";import{e as Ne,f as ms,g as b,h as rt}from"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-HAS4PDZR.js";import{b as q,d as ft,p as U,wa as ct}from"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-EERLKPTV.js";import{c as Ut,d as it,x as xt,y as R}from"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-WHNMQWGZ.js";import{a as tt}from"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-AQ6Q6WWQ.js";import{e as S}from"https://files-pro.coinswitch.co/cspro/1790767973354/build/_shared/chunk-OCHB5LEJ.js";xt();ve();var I=S(tt());xt();var zt=S(tt());rt();var vt=S(tt()),Je=S(R()),us=({originalStartTime:n,defaultText:p,startAfterDurationInHr:T})=>{let c=T*60*60*1e3,[v,x]=(0,vt.useState)(Date.now()),o=(0,vt.useMemo)(()=>{let e=v-new Date(n).getTime();return Math.max(c-e,0)},[v,n,c]);return(0,vt.useEffect)(()=>{let e=setInterval(()=>{x(Date.now())},1e3);return()=>clearInterval(e)},[]),(0,Je.jsx)("span",{children:o===0?p:(e=>{let m=Math.floor(e/1e3),s=Math.floor(m/3600),A=Math.floor(m%3600/60),u=m%60;return`${s.toString().padStart(2,"0")}:${A.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}`})(o)})},Kt=us;var It=S(tt());rt();Tt();var F=S(R());function gs({children:n,variant:p="gold"}){return(0,F.jsxs)("div",{className:"tw-group tw-relative",children:[(0,F.jsx)(b,{name:p==="gray"?"exclamation-gray":"exclamation-mark-info-gold",width:"tw-w-4",height:"tw-h-4"}),(0,F.jsxs)("div",{className:"tw-absolute -tw-top-3 tw-left-2 tw-z-20 tw-hidden tw-h-fit tw-w-[240px] -tw-translate-x-1/2 -tw-translate-y-full tw-rounded-lg tw-bg-highligh-gray tw-shadow-sm group-hover:tw-block",children:[(0,F.jsx)("div",{className:"tw-absolute -tw-bottom-1.5 tw-right-1/2 -tw-z-10 tw-size-3 tw-translate-x-1/2 tw-rotate-45 tw-bg-highligh-gray"}),n]})]})}function ts({children:n}){let[p,T]=(0,It.useState)(!1);return(0,It.useEffect)(()=>{var v,x;let c=document.body;return c&&p?(v=c==null?void 0:c.style)==null||v.setProperty("pointer-events","auto","important"):(x=c==null?void 0:c.style)==null||x.removeProperty("pointer-events"),()=>{var o;(o=c==null?void 0:c.style)==null||o.removeProperty("pointer-events")}},[p]),(0,F.jsxs)("div",{onClick:()=>{T(!0)},className:"tw-group tw-relative",children:[(0,F.jsx)(b,{name:"exclamation-mark-info-gold",width:"tw-w-4",height:"tw-h-4"}),(0,F.jsxs)(Y,{isOpen:p,onOpenChange:()=>{T(!1)},children:[(0,F.jsx)(Y.Overlay,{className:"tw-z-50 tw-bg-black-02 tw-opacity-80"}),(0,F.jsxs)(Y.Content,{className:"tw-mx-4 tw-h-fit tw-min-h-[150px] tw-w-full tw-border tw-border-highligh-gray tw-bg-black-01 tw-p-3",children:[(0,F.jsx)("div",{children:n}),(0,F.jsx)("button",{onClick:c=>{c.stopPropagation(),T(!1)},className:"tw-mt-4 tw-flex tw-h-9 tw-w-full tw-items-center tw-justify-center tw-rounded tw-bg-gold-500 tw-text-xs tw-font-medium tw-uppercase tw-text-black-01",children:"OKAY"})]})]})]})}function nt({children:n,variant:p="gold",title:T,classname:c=""}){let[v,x]=(0,It.useState)(!1);return(0,F.jsxs)("div",{children:[v&&(0,F.jsxs)(Q,{open:v,onOpenChange:x,dismissible:!1,children:[(0,F.jsx)(Q.Overlay,{className:"tw-bg-black-01/70"}),(0,F.jsxs)(Q.Content,{className:"tw-h-fit tw-min-h-[150px] tw-w-full tw-rounded tw-border tw-border-highligh-gray tw-bg-black-01",children:[(0,F.jsxs)("div",{className:"tw-flex tw-h-14 tw-w-full tw-items-center tw-justify-between tw-border-b tw-border-pro-gray-200 tw-p-4",children:[(0,F.jsx)("p",{className:"tw-text-lg tw-font-semibold tw-text-gray-200",children:T}),(0,F.jsx)("div",{className:"tw-h-fit tw-w-fit tw-cursor-pointer",onClick:()=>{x(!1)},children:(0,F.jsx)(b,{width:"tw-w-5",height:"tw-h-5",name:"cross-gray"})})]}),n]})]}),(0,F.jsx)("div",{onClick:()=>{x(!0)},className:"tw-group tw-relative",children:(0,F.jsx)(b,{name:p==="gray"?"exclamation-gray":"exclamation-mark-info-gold",width:"tw-w-3",height:"tw-h-3",className:`${c}`})})]})}var lt=gs;var a=S(R());function qt(n,p){return(0,a.jsxs)("div",{className:"tw-flex tw-w-full",children:[(0,a.jsx)("img",{src:n,alt:"strategy_type",className:"tw-h-[20px] tw-w-[20px]"}),(0,a.jsx)("p",{className:"tw-ml-1 tw-whitespace-nowrap tw-pr-4 tw-text-sm tw-text-[#A0AEC0]",children:p})]})}function Xt({data:{tab_data:n,aggregated_data:p},is_data_loading:T,setSelectedTab:c}){let v=it(),{is_mobile:x}=v,o=(0,zt.useMemo)(()=>{let e=st(p.netPnL*100/p.netInvestedValue,2);return{...p,isNetPnLPositive:p.netPnL>=0,netPnL:isNaN(p.netPnL)?"--":_(p.netPnL),netPnLPercentage:!isNaN(e)&&isFinite(e)?`${e==null?void 0:e.toFixed(2)}%`:"--",netCurrentValue:_(p.netCurrentValue),netInvestedValue:_(p.netInvestedValue)}}
1,[p]),N=(0,zt.useMemo)(()=>n.map(e=>{var s,A,u,E;let m=st(e.pnL*100/e.investedValue,2);return{...e,isPnlPositive:e.pnL>=0,pnL:isNaN(e.pnL)?"--":_(e.pnL),pnlPercentage:!isNaN(m)&&isFinite(m)?`${m==null?void 0:m.toFixed(2)}%`:"--",investedValue:(s=_(e.investedValue))!=null?s:"--",currentValue:(A=_(e.currentValue))!=null?A:"--",isFirstTraded:(e==null?void 0:e.strategyType)==="HIGH_RISK_NO_TDS"?!!(e!=null&&e.firstTradedAt):(e==null?void 0:e.firstTradedAt)||(e==null?void 0:e.investedValue)!==(e==null?void 0:e.currentValue),tdsPaid:(u=_(e.tdsPaid))!=null?u:"--",estCreatorFee:(E=_(e.estCreatorFee))!=null?E:"--",subscriptionId:Ot(e.subscriptionId)}}),[n]);return T?(0,a.jsx)("div",{}):(N==null?void 0:N.length)>0?x?(0,a.jsxs)("div",{className:"tw-w-full tw-px-4 tw-py-3",children:[(0,a.jsxs)("div",{className:`tw-w-full tw-rounded-lg tw-bg-pro-black-200 tw-bg-gradient-to-r tw-p-3 tw-shadow ${o.isNetPnLPositive?"tw-from-pro-green-500/0 tw-to-pro-green-500/50":"tw-from-pro-red-500/0 tw-to-pro-red-500/50"}`,children:[(0,a.jsxs)("div",{className:"tw-flex tw-w-full tw-items-center tw-justify-between tw-text-xs tw-text-gray-600",children:[(0,a.jsxs)("p",{className:"tw-text-gray-500",children:[(0,a.jsx)("span",{className:"tw-text-sm",children:"Net P & L"})," (Excl. Fee)"]}),(0,a.jsxs)("p",{className:`tw-max-w-[60%] tw-truncate tw-text-sm tw-font-medium ${o.isNetPnLPositive?"tw-text-pro-green-500":"tw-text-pro-red-500"}`,children:[o==null?void 0:o.netPnL," ",(0,a.jsx)("span",{className:"tw-text-gray-700",children:"/"})," ",o==null?void 0:o.netPnLPercentage]})]}),(0,a.jsxs)("div",{className:"tw-mt-2 tw-flex tw-w-full tw-items-center tw-justify-between tw-text-xs tw-text-gray-600",children:[(0,a.jsx)("p",{children:"Net Invested Value"}),(0,a.jsx)("p",{className:"tw-font-medium tw-text-gray-400",children:o==null?void 0:o.netInvestedValue})]}),(0,a.jsxs)("div",{className:"tw-mt-1 tw-flex tw-w-full tw-items-center tw-justify-between tw-text-xs tw-text-gray-600",children:[(0,a.jsx)("p",{children:"Net Current Value"}),(0,a.jsx)("p",{className:"tw-font-medium tw-text-gray-400",children:o==null?void 0:o.netCurrentValue})]})]}),(0,a.jsx)("p",{className:"tw-mb-3 tw-mt-4 tw-text-sm tw-font-medium",children:"Strategies"}),(0,a.jsx)("div",{className:"tw-flex tw-w-full tw-flex-col tw-gap-y-4",children:N==null?void 0:N.map((e,m)=>{var s,A,u,E,f;return(0,a.jsxs)("div",{className:"tw-w-full tw-rounded-lg tw-border tw-border-black-02 tw-bg-black-01 tw-shadow-lg",children:[(0,a.jsxs)("div",{className:"tw-flex tw-w-full tw-items-center tw-justify-between tw-px-4 tw-py-3",children:[(0,a.jsxs)("div",{className:"tw-flex tw-w-2/3 tw-gap-x-2",children:[(0,a.jsx)("div",{className:"tw-h-8 tw-w-8 tw-flex-none",children:e!=null&&e.botLogo?(0,a.jsx)("img",{className:"tw-w-full",src:e==null?void 0:e.botLogo,alt:""}):(0,a.jsx)(b,{width:"tw-w-full",height:"tw-h-full",name:"profile-gold-icon"})}),(0,a.jsxs)("div",{className:"tw-w-[calc(100%-40px)] tw-flex-1",children:[(0,a.jsxs)("div",{className:"tw-flex tw-gap-x-0.5",children:[(0,a.jsx)("p",{className:"tw-text-sm tw-font-medium tw-text-[#F4F4F6]",children:e==null?void 0:e.botName}),(0,a.jsx)("div",{className:"tw-mt-1",children:(0,a.jsx)(nt,{title:e==null?void 0:e.botName,children:(0,a.jsxs)("div",{className:"tw-flex tw-w-full tw-flex-col tw-gap-y-3 tw-p-4 tw-text-sm tw-font-medium tw-text-gray-500",children:[(0,a.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,a.jsx)("p",{children:"Creator"}),(0,a.jsx)("p",{className:"tw-text-gray-400",children:(s=e==null?void 0:e.details)==null?void 0:s.botCreator})]}),(0,a.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,a.jsx)("p",{children:"Historical Profit"}),(0,a.jsx)("p",{className:"tw-text-pro-green-500",children:(A=e==null?void 0:e.details)==null?void 0:A.historicalProfit})]}),(0,a.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,a.jsx)("p",{children:"Min. Deposit"}),(0,a.jsx)("p",{className:"tw-text-gray-400",children:(u=e==null?void 0:e.details)==null?void 0:u.minDeposit})]}),(0,a.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,a.jsx)("p",{children:"Profit Sharing"}),(0,a.jsx)("p",{className:"tw-text-gray-400",children:(E=e==null?void 0:e.details)==null?void 0:E.profitSharing})]}),(0,a.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,a.jsx)("p",{children:"Net Traded Vol."}),(0,a.jsx)("p",{className:"tw-text-gray-400",children:(f=e==null?void 0:e.details)==null?void 0:f.netTradedVol})]})]})})})]}),(0,a.jsxs)("p",{className:"tw-truncate tw-text-xs tw-text-gray-600 ",children:["ID: ",e.subscriptionId]})]})]}),(0,a.jsx)("div",{className:"tw-w-1/2 tw-text-right",children:e!=null&&e.isFirstTraded?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("p",{className:`tw-truncate tw-text-sm tw-font-medium ${e!=null&&e.isPnlPositive?"tw-text-pro-green-500":"tw-text-pro-red-500"}`,children:[e.pnL," ",(0,a.jsx)("span",{className:"tw-text-gray-700",children:"/"})," ",e==null?void 0:e.pnlPercentage]}),(0,a.jsx)("p",{className:"tw-text-xs tw-text-gray-600",children:"P & L (Excl. Fee)"})]}):(0,a.jsx)("div",{className:"tw-flex tw-w-full tw-justify-end",children:(0,a.jsxs)("div",{className:"tw-flex tw-min-w-24 tw-max-w-fit tw-items-center tw-gap-x-1 tw-rounded-full tw-bg-pro-black-200 tw-px-2 tw-py-1 tw-text-xxs tw-font-medium tw-text-gray-500",children:[(0,a.jsx)(b,{width:"tw-w-4",height:"tw-h-4",name:"countdown-timer"}),(0,a.jsx)(Kt,{defaultText:"Starts soon",originalStartTime:e==null?void 0:e.createdAt,startAfterDurationInHr:e==null?void 0:e.startAfterDuration})]})})})]}),(0,a.jsx)("div",{className:"tw-px-4",children:(0,a.jsx)("div",{className:"tw-min-h-[1px] tw-w-full tw-bg-highligh-gray"})}),(0,a.jsxs)("div",{className:"tw-grid tw-w-full tw-grid-cols-3 tw-gap-x-2 tw-gap-y-4 tw-px-4 tw-py-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"tw-w-full tw-truncate tw-text-xs tw-text-gray-600",children:"Current Value"}),(0,a.jsx)("p",{className:"tw-mt-1 tw-w-full tw-truncate tw-text-sm tw-font-medium tw-text-gray-500",children:e==null?void 0:e.currentValue})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"tw-w-full tw-truncate tw-text-xs tw-text-gray-600",children:"Invested Value"}),(0,a.jsx)("p",{className:"tw-mt-1 tw-w-full tw-truncate tw-text-sm tw-font-medium tw-text-gray-500",children:e==null?void 0:e.investedValue})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"tw-w-full tw-truncate tw-text-xs tw-text-gray-600",children:"TDS Paid"}),(0,a.jsx)("p",{className:"tw-mt-1 tw-w-full tw-truncate tw-text-sm tw-font-medium tw-text-gray-500",children:e==null?void 0:e.tdsPaid})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"tw-w-full tw-truncate tw-text-xs tw-text-gray-600",children:"Est. Creator Fee"}),(0,a.jsx)("p",{className:"tw-mt-1 tw-w-full tw-truncate tw-text-sm tw-font-medium tw-text-gray-500",children:e==null?void 0:e.estCreatorFee})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"tw-w-full tw-text-xs tw-text-gray-600",children:"Risk Factor"})," ",(0,a.jsxs)("div",{className:"tw-mt-1 tw-flex tw-items-center tw-gap-x-1",children:[(0,a.jsx)("img",{src:(e==null?void 0:e.strategyType)==="LOW_RISK_HIGH_TDS"?Pt:(e==null?void 0:e.strategyType)==="MODERATE_RISK_LOW_TDS"?Ct:kt,alt:"strategy_type",className:"tw-h-[20px] tw-w-[20px]"}),(0,a.jsx)("p",{className:"tw-ml-1 tw-w-full tw-whitespace-nowrap tw-text-sm tw-font-medium tw-text-gray-500",children:(e==null?void 0:e.strategyType)==="HIGH_RISK_NO_TDS"?"High Risk":(e==null?void 0:e.strategyType)==="LOW_RISK_HIGH_TDS"?"Low Risk":(e==null?void 0:e.strategyType)==="MODERATE_RISK_LOW_TDS"?"Moderate Risk":""})]})]})]})]},`all-strategies-card-${m}`)})})]}):(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:`tw-flex tw-h-[90px] tw-w-full tw-rounded tw-bg-gradient-to-r tw-px-6 tw-py-4 ${o.isNetPnLPositive?"tw-from-pro-green-500/40 tw-to-pro-green-500/0":"tw-from-pro-red-500/40 tw-to-pro-red-500/0"}`,children:[(0,a.jsxs)("div",{className:"tw-flex tw-h-full tw-w-[240px] tw-flex-col tw-justify-between tw-font-medium",children:[(0,a.jsx)("p",{className:"tw-text-gray-500",children:"Net P & L"}),(0,a.jsxs)("p",{className:`tw-truncate tw-text-xl ${o.isNetPnLPositive?"tw-text-pro-green-500":"tw-text-pro-red-500"}`,children:[o==null?void 0:o.netPnL," ",(0,a.jsx)("span",{className:"tw-text-gray-700",children:"/"})," ",o==null?void 0:o.netPnLPercentage]})]}),(0,a.jsxs)("div",{className:"tw-flex tw-h-full tw-w-[170px] tw-flex-col tw-justify-between tw-font-medium",children:[(0,a.jsx)("p",{className:"tw-text-gray-500",children:"Net Invested Value"}),(0,a.jsx)("p",{className:"tw-truncate tw-text-xl tw-text-gray-400",children:o==null?void 0:o.netInvestedValue})]}),(0,a.jsxs)("div",{className:"tw-flex tw-h-full tw-w-[170px] tw-flex-col tw-justify-between tw-font-medium",children:[(0,a.jsx)("p",{className:"tw-text-gray-500",children:"Net Current Value"}),(0,a.jsx)("p",{className:"tw-truncate tw-text-xl tw-text-gray-400",children:o==null?void 0:o.netCurrentValue})]})]}),(0,a.jsx)("div",{className:"tw-mt-10 tw-flex tw-w-full tw-flex-col tw-gap-y-4",children:N==null?void 0:N.map((e,m)=>{var s,A,u,E,f;return(0,a.jsx)("div",{className:"tw-rounded tw-bg-black-01",children:(0,a.jsxs)("div",{className:"tw-flex tw-min-h-[84px] tw-w-full tw-gap-x-6 tw-px-6 tw-py-4 tw-font-medium *:tw-flex *:tw-flex-col *:tw-gap-y-1",children:[(0,a.jsx)("div",{className:"tw-w-[293px]",children:(0,a.jsxs)("div",{className:"tw-flex tw-h-full tw-w-full tw-items-center tw-gap-x-4",children:[(0,a.jsx)("div",{className:"tw-h-10 tw-w-10 tw-flex-none tw-rounded-full",children:e!=null&&e.botLogo?(0,a.jsx)("img",{className:"tw-w-full",src:e==null?void 0:e.botLogo,alt:""}):(0,a.jsx)(b,{width:"tw-w-full",height:"tw-h-full",name:"profile-gold-icon"})}),(0,a.jsxs)("div",{className:"tw-flex tw-h-full tw-max-w-[70%] tw-flex-col tw-justify-between",children:[(0,a.jsxs)("div",{className:"tw-flex tw-gap-x-1",children:[(0,a.jsx)("p",{className:"tw-left-7 tw-mb-1 tw-max-w-[229px] tw-text-xl tw-font-medium tw-text-[#F4F4F6]",children:e.botName}),(0,a.jsx)("div",{className:"tw-mt-2",children:(0,a.jsx)(lt,{children:(0,a.jsxs)("div",{className:"tw-flex tw-w-full tw-flex-col tw-gap-y-3 tw-p-4 tw-text-sm tw-font-medium tw-text-gray-500",children:[(0,a.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,a.jsx)("p",{children:"Strategy"}),(0,a.jsx)("p",{className:"tw-text-gray-400",children:e.botName})]}),(0,a.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,a.jsx)("p",{children:"Creator"}),(0,a.jsx)("p",{className:"tw-text-gray-400",children:(s=e==null?void 0:e.details)==null?void 0:s.botCreator})]}),(0,a.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,a.jsx)("p",{children:"Historical Profit"}),(0,a.jsx)("p",{className:"tw-text-pro-green-500",children:(A=e==null?void 0:e.details)==null?void 0:A.historicalProfit})]}),(0,a.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,a.jsx)("p",{children:"Min. Deposit"}),(0,a.jsx)("p",{className:"tw-text-gray-400",children:(u=e==null?void 0:e.details)==null?void 0:u.minDeposit})]}),(0,a.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,a.jsx)("p",{children:"Profit Sharing"}),(0,a.jsx)("p",{className:"tw-text-gray-400",children:(E=e==null?void 0:e.details)==null?void 0:E.profitSharing})]}),(0,a.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,a.jsx)("p",{children:"Net Traded Vol."}),(0,a.jsx)("p",{className:"tw-text-gray-400",children:(f=e==null?void 0:e.details)==null?void 0:f.netTradedVol})]})]})})})]}),(0,a.jsxs)("div",{children:[e.strategyType==="LOW_RISK_HIGH_TDS"?qt(Pt,"Low Risk"):e.strategyType==="HIGH_RISK_NO_TDS"?qt(kt,"High Risk"):qt(Ct,"Moderate Risk"),(0,a.jsxs)("p",{className:"tw-mt-1 tw-whitespace-nowrap tw-text-sm tw-text-gray-700",children:["ID: ",e.subscriptionId]})]})]})]})}),(0,a.jsx)("div",{className:"tw-mt-2 tw-w-[192px]",children:e!=null&&e.isFirstTraded?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("p",{className:`tw-truncate tw-font-medium ${e!=null&&e.isPnlPositive?"tw-text-pro-green-500":"tw-text-pro-red-500"}`,children:[e.pnL," ",(0,a.jsx)("span",{className:"tw-text-gray-700",children:"/"})," ",e==null?void 0:e.pnlPercentage]}),(0,a.jsx)("p",{className:"tw-text-sm tw-text-gray-700",children:"P & L (Excl. Fee)"})]}):(0,a.jsxs)("div",{className:"tw-flex tw-min-w-28 tw-max-w-fit tw-items-center tw-gap-x-1 tw-rounded-full tw-bg-pro-gold-1100 tw-px-2 tw-py-1 tw-text-sm tw-text-gray-500",children:[(0,a.jsx)(b,{width:"tw-w-4",height:"tw-h-4",name:"countdown-timer"}),(0,a.jsx)(Kt,{defaultText:"Starts soon",originalStartTime:e==null?void 0:e.createdAt,startAfterDurationInHr:e==null?void 0:e.startAfterDuration})]})}),(0,a.jsxs)("div",{className:"tw-mt-2 tw-w-[108px]",children:[(0,a.jsxs)("p",{className:"tw-text-gray-500",children:[" ",e.currentValue]}),(0,a.jsx)("p",{className:"tw-text-sm tw-text-gray-700",children:"Current Value"})]}),(0,a.jsxs)("div",{className:"tw-mt-2 tw-w-[108px]",children:[(0,a.jsxs)("p",{className:"tw-text-gray-500",children:[" ",e.investedValue]}),(0,a.jsx)("p",{className:"tw-text-sm tw-text-gray-700",children:"Invested Value"})]}),(0,a.jsxs)("div",{className:"tw-mt-2 tw-w-[108px]",children:[(0,a.jsx)("p",{className:"tw-text-gray-500",children:e.tdsPaid}),(0,a.jsx)("p",{className:"tw-text-sm tw-text-gray-700",children:"TDS Paid"})]}),(0,a.jsxs)("div",{className:"tw-mt-2 tw-w-[108px]",children:[(0,a.jsx)("p",{className:"tw-text-gray-500",children:e.estCreatorFee}),(0,a.jsx)("p",{className:"tw-text-sm tw-text-gray-700",children:"Est. Creator Fee"})]})]})},`all-strategies-card-${m}`)})})]}):(0,a.jsxs)("div",{children:[(0,a.jsx)(gt,{}),(0,a.jsx)("div",{onClick:()=>{},className:"tw-flex tw-w-full tw-items-center tw-justify-center",children:(0,a.jsx)("button",{onClick:()=>{c("strategies")},className:"tw-flex tw-h-9 tw-w-[300px] tw-items-center tw-justify-center tw-rounded tw-border tw-border-highligh-gray tw-text-xs tw-font-medium tw-text-gold-500",children:"Explore All Strategies"})})]})}xt();Tt();ve();var W=S(tt());rt();ct();Te();ut();xt();var z=S(tt()),Dt=S(ns());cs();At();rt();ct();ut();var h=S(R());function vs({wallet_balance:n,strategy_data:p,handleSubscribeStrategy:T,closePopup:c,updatePopupStage:v}){let x=Ut(),[o,N]=(0,z.useState)(!1),[e,m]=(0,z.useState)(""),[s,A]=(0,z.useState)(!1),u=(0,z.useCallback)(C=>(C=C==null?void 0:C.toString(),C.replace(/[^0-9.]/g,"")),[]),E=(0,z.useCallback)(async()=>{N(!0);try{let C=st(u(e),2);if(isNaN(C))throw new Error("Invalid Amount");L(U.SmartInvestUserStartStrategyClicked),await T(p.botStrategyId,C,p.marketType,()=>{v("subscription_success")}),N(!1)}catch{}N(!1)},[T,e,u,p.botStrategyId,p.marketType,v]),f=(0,z.useCallback)(C=>{var K;let B=u(C);if(B===""){m("");return}let j=B.split("."),V=j==null?void 0:j[0],g=j==null?void 0:j[1],Z=(K=Number(V))==null?void 0:K.toLocaleStr
1ing("en-IN",{style:"currency",currency:"INR",minimumFractionDigits:0,maximumFractionDigits:2});(j==null?void 0:j.length)>1&&(Z=Z+"."+g.slice(0,2)),m(Z)},[u]),D=(0,z.useCallback)(C=>{C!=="default"&&(C==="add_money"?!Dt.isMobile&&!Ce()?(L(U.ProDepositCTAClicked,{Page:be.smartInvest}),A(!0)):x(ft.wallet_page.url):C==="use_min"?f(p.minDeposit):C==="use_max"?f(p.maxDeposit):C==="use_available"&&f(st(n,2)))},[f,x,p.maxDeposit,p.minDeposit,n]),y=(0,z.useMemo)(()=>({walletBalance:_(n),minDeposit:_(p.minDeposit),maxDeposit:_(p.maxDeposit),botName:p.botName}),[p.botName,p.maxDeposit,p.minDeposit,n]),O=(0,z.useMemo)(()=>{let C=Number(p.minDeposit),B=Number(p.maxDeposit),j=Number(n),V=st(u(e),2);return j<C?"add_money":V<C?"use_min":V>j?"use_available":V>B?"use_max":"default"},[e,u,p.maxDeposit,p.minDeposit,n]);return(0,z.useEffect)(()=>{L(U.SmartInvestUserDepositPopupShown)},[]),(0,h.jsxs)("div",{className:"tw-flex tw-h-full tw-w-full tw-flex-col tw-justify-between",children:[s&&(0,h.jsx)(Ue,{onClose:()=>A(!1)}),(0,h.jsxs)("div",{children:[(0,h.jsxs)("div",{className:"tw-flex tw-h-14 tw-w-full tw-items-center tw-justify-between tw-px-4",children:[(0,h.jsx)("p",{className:"tw-text-lg tw-font-medium tw-text-gray-100",children:"Deposit"}),(0,h.jsx)("div",{className:"tw-h-fit tw-w-fit tw-cursor-pointer",onClick:c,children:(0,h.jsx)(b,{width:"tw-w-5",height:"tw-h-5",name:"cross-gray"})})]}),(0,h.jsxs)("p",{className:"tw-w-[80%] tw-truncate tw-px-4 tw-text-xs tw-font-medium tw-text-gray-500",children:["To ",y==null?void 0:y.botName]}),(0,h.jsxs)("div",{className:"tw-mt-12 tw-flex tw-flex-col tw-items-center tw-px-4",children:[(0,h.jsxs)("div",{className:"tw-flex tw-items-center tw-gap-x-1 tw-text-xs tw-font-medium",children:[(0,h.jsx)(b,{width:"tw-w-4",height:"tw-h-4",name:"wallet-gray-icon"}),(0,h.jsx)("span",{className:"tw-text-gray-500",children:"Available :"}),(0,h.jsx)("span",{className:"tw-text-gray-300",children:y==null?void 0:y.walletBalance})]}),(0,h.jsxs)("div",{className:"tw-mt-2 tw-flex tw-items-center tw-justify-center tw-gap-x-1 tw-border-t tw-border-highligh-gray tw-pt-2 tw-text-xs tw-font-medium tw-text-gray-600",children:[(0,h.jsxs)("span",{children:["Min : ",y==null?void 0:y.minDeposit]}),(0,h.jsx)("span",{className:"tw-w-fit tw-flex-none",children:"\u2022"}),(0,h.jsxs)("span",{children:["Max : ",y==null?void 0:y.maxDeposit]})]}),(0,h.jsx)("div",{className:"tw-mt-6 tw-flex tw-w-full tw-justify-center",children:(0,h.jsx)("input",{type:"text",inputMode:"decimal",autoFocus:!Dt.isIOS,onChange:C=>{f(C.target.value)},onPaste:C=>{f(C.value)},onFocus:()=>{L(U.SmartInvestUserDepositInputFocus)},maxLength:12,value:e,placeholder:"Enter Amount",className:"tw-w-full tw-bg-transparent tw-text-center tw-text-3xl tw-font-medium tw-text-gray-300 tw-outline-none placeholder:tw-text-gray-700"})}),(0,h.jsx)("div",{className:"tw-mt-2 tw-w-[80%] tw-text-center tw-text-xs tw-font-medium",children:e===""?null:O==="default"?(0,h.jsx)("p",{className:"tw-text-grey-01",children:He(e)}):O==="add_money"?(0,h.jsxs)("div",{children:[(0,h.jsx)("p",{className:"tw-text-pro-red-500",children:"You don't have the minimum required amount. Please add money to your wallet"}),(0,h.jsx)("p",{onClick:()=>{L(U.SmartInvestUserAddMoneyClicked),D("add_money")},className:"tw-mx-auto tw-mt-3 tw-w-fit tw-cursor-pointer tw-rounded-full tw-border tw-border-highligh-gray tw-px-3 tw-py-1.5 tw-text-pro-gold-500",children:"Add Money"})]}):O==="use_min"?(0,h.jsxs)("div",{children:[(0,h.jsxs)("p",{className:"tw-text-pro-red-500",children:["Minimum Deposit is ",y.minDeposit]}),(0,h.jsx)("p",{onClick:()=>{L(U.SmartInvestUserUseMinClicked),D("use_min")},className:"tw-mx-auto tw-mt-3 tw-w-fit tw-cursor-pointer tw-rounded-full tw-border tw-border-highligh-gray tw-px-3 tw-py-1.5 tw-text-pro-gold-500",children:"Use Minimum"})]}):O==="use_available"?(0,h.jsxs)("div",{children:[(0,h.jsx)("p",{className:"tw-text-pro-red-500",children:"Deposit amount exceeds the wallet balance"}),(0,h.jsxs)("div",{className:"tw-mt-3 tw-flex tw-items-center tw-justify-center tw-gap-x-2",children:[(0,h.jsx)("p",{onClick:()=>{L(U.SmartInvestUserUseAvaClicked),D("use_available")},className:"tw-cursor-pointer tw-rounded-full tw-border tw-border-highligh-gray tw-px-3 tw-py-1.5 tw-text-pro-gold-500",children:"Use Available"}),(0,h.jsx)("p",{onClick:()=>{L(U.SmartInvestUserAddMoneyClicked),D("add_money")},className:"tw-cursor-pointer tw-rounded-full tw-border tw-border-highligh-gray tw-px-3 tw-py-1.5 tw-text-pro-gold-500",children:"Add Money"})]})]}):O==="use_max"?(0,h.jsxs)("div",{children:[(0,h.jsxs)("p",{className:"tw-text-pro-red-500",children:["Maximun Deposit is ",y.maxDeposit]}),(0,h.jsx)("p",{onClick:()=>{D("use_max")}
1,className:"tw-mx-auto tw-mt-3 tw-w-fit tw-cursor-pointer tw-rounded-full tw-border tw-border-highligh-gray tw-px-3 tw-py-1.5 tw-text-pro-gold-500",children:"Use Maximum"})]}):null}),(0,h.jsx)("div",{className:"tw-flex-gap-x-2 tw-mt-3 tw-flex tw-items-center"})]})]}),(0,h.jsx)("div",{className:"tw-w-full tw-p-4",children:(0,h.jsx)("button",{disabled:o||O!=="default",onClick:E,className:"tw-flex tw-h-10 tw-w-full tw-items-center tw-justify-center tw-rounded tw-bg-gold-500 tw-text-sm tw-font-medium tw-text-black-01 disabled:tw-cursor-not-allowed disabled:tw-bg-gold-1000",children:o?(0,h.jsx)(_e,{type:Ie}):"Start Strategy"})})]})}var Qt=vs;Tt();var _t=S(tt());ct();ut();var $=S(R());function Ns({closePopup:n,updatePopupStage:p,handleUpdateUserConsent:T}){let[c,v]=(0,_t.useState)(!1),[x,o]=(0,_t.useState)(!1),N=(0,_t.useCallback)(async()=>{o(!0),L(U.SmartInvestUserConsentClicked),await T(()=>{p("deposit")}),o(!1)},[T,p]);return(0,$.jsxs)("div",{className:"tw-flex tw-h-full tw-w-full tw-flex-col tw-justify-between",children:[(0,$.jsxs)("div",{children:[(0,$.jsx)("div",{className:"tw-flex tw-h-14 tw-w-full tw-items-center tw-justify-between tw-border-b tw-border-pro-gray-200 tw-px-4",children:(0,$.jsx)("p",{className:"tw-text-lg tw-font-semibold tw-text-gray-200",children:"Terms & Conditions"})}),(0,$.jsxs)("div",{className:"tw-px-4 tw-pt-6 tw-text-xs tw-text-gray-500",children:[(0,$.jsxs)("p",{className:"tw-text-base tw-text-gray-200",children:["Before investing, it is important that you read our"," ",(0,$.jsx)("a",{className:"tw-text-gold-500 tw-underline",target:"_blank",href:St,rel:"noreferrer",children:"Terms & Conditions"})]}),(0,$.jsx)("div",{className:"tw-mt-6 tw-flex tw-gap-x-1",children:(0,$.jsx)("div",{className:"",children:(0,$.jsx)(Pe,{checked:c,onChange:()=>{v(e=>!e)},label:(0,$.jsx)("p",{className:"tw-text-sm tw-font-medium tw-text-gray-600",children:"I agree to the terms and conditions stated above"}),size:"sm",containerClass:"tw-items-start",lableClass:"tw-ml-[11px]",checkboxClass:"tw-mt-1"})})})]})]}),(0,$.jsx)("div",{className:"tw-w-full tw-p-4",children:(0,$.jsx)("button",{disabled:x||!c,onClick:N,className:"tw-flex tw-h-10 tw-w-full tw-items-center tw-justify-center tw-rounded tw-bg-gold-500 tw-text-sm tw-font-medium tw-text-black-01 disabled:tw-cursor-not-allowed disabled:tw-bg-gold-1000",children:"Agree & Continue"})})]})}var Zt=Ns;xt();var es=S(tt());rt();ct();At();var X=S(R());function ys({closePopup:n,updatePopupStage:p}){let T=Ut(),c=(0,es.useCallback)(async()=>{T(`${ft.profile_page.url}?section=re-kyc`),n()},[n,T]);return(0,X.jsxs)("div",{className:"tw-flex tw-h-full tw-w-full tw-flex-col tw-justify-between",children:[(0,X.jsxs)("div",{children:[(0,X.jsxs)("div",{className:"tw-flex tw-h-14 tw-w-full tw-items-center tw-justify-between tw-border-b tw-border-pro-gray-200 tw-px-4",children:[(0,X.jsx)("p",{className:"tw-text-base tw-font-medium tw-text-white",children:"KYC verification pending"}),(0,X.jsx)("div",{className:"tw-h-fit tw-w-fit tw-cursor-pointer",onClick:n,children:(0,X.jsx)(b,{width:"tw-w-5",height:"tw-h-5",name:"cross-gray"})})]}),(0,X.jsxs)("div",{className:"tw-flex tw-flex-col tw-items-center tw-gap-y-4 tw-pt-4",children:[(0,X.jsx)("div",{className:"tw-flex tw-h-20 tw-w-20 tw-flex-none tw-items-center",children:(0,X.jsx)("img",{width:"100%",src:q("/pro/assets/images/algo-trading/atu-kyc-pending.png"),alt:""})}),(0,X.jsx)("p",{className:"tw-text-center tw-text-sm tw-font-medium tw-text-gray-500",children:"Please complete your KYC verification to proceed."})]})]}),(0,X.jsx)("div",{className:"tw-w-full tw-p-4",children:(0,X.jsx)("button",{onClick:c,className:"tw-flex tw-h-10 tw-w-full tw-items-center tw-justify-center tw-rounded tw-bg-gold-500 tw-text-sm tw-font-medium tw-text-black-01 disabled:tw-cursor-not-allowed disabled:tw-bg-gold-1000",children:"COMPLETE KYC"})})]})}var Jt=ys;var ss=S(tt());ct();ut();At();var wt=S(R());function bs({closePopup:n,setSelectedTab:p}){let T=(0,ss.useCallback)(async()=>{L(U.SmartInvestUserStartStrategyClicked),n(),p("active")},[n,p]);return(0,wt.jsxs)("div",{className:"tw-flex tw-h-full tw-w-full tw-flex-col tw-justify-between",children:[(0,wt.jsxs)("div",{className:"tw-flex tw-flex-col tw-items-center tw-px-6 tw-pt-8",children:[(0,wt.jsx)("div",{className:"tw-h-[140px] tw-w-[128px]",children:(0,wt.jsx)("img",{width:"100%",src:q("/pro/assets/images/algo-trading/atu-subscribe-success.png"),alt:""})}),(0,wt.jsx)("p",{className:"tw-mt-3 tw-text-lg tw-font-medium tw-text-gray-100",children:"Congratulations!"}),(0,wt.jsx)("p",{className:"tw-text-center tw-text-sm tw-text-gray-500",children:"You're all set! We'll reach out to you once your strategy is ready to use."})]}),(0,wt.jsx)("div",{className:"tw-w-full tw-p-4",children:(0,wt.jsx)("button",{onClick:T,className:"tw-flex tw-h-10 tw-w-full tw-items-center tw-justify-center tw-rounded tw-bg-gold-500 tw-text-sm tw-font-medium tw-text-black-01 disabled:tw-cursor-not-allowed disabled:tw-bg-gold-1000",children:"OKAY"})})]})}var te=bs;var t=S(R());function ee({strategyType:n,variant:p="default"}){let T=n==="LOW_RISK_HIGH_TDS"?Pt:n==="MODERATE_RISK_LOW_TDS"?Ct:kt,c=n==="LOW_RISK_HIGH_TDS"?"Low Risk":n==="MODERATE_RISK_LOW_TDS"?"Moderate Risk":"High Risk";return(0,t.jsxs)("div",{className:p==="drawer"?"tw-mt-3 tw-flex tw-w-fit tw-items-center tw-gap-x-1 tw-rounded-lg tw-bg-pro-black-200 tw-px-2 tw-py-1":p==="mobile"?"tw-z-20 tw-flex tw-h-5 tw-items-center tw-justify-center tw-gap-x-1 tw-rounded-lg tw-bg-highligh-gray tw-px-2":"tw-flex tw-w-fit tw-items-center tw-gap-x-1 tw-rounded-lg tw-bg-black-04 tw-px-2 tw-py-1",children:[(0,t.jsx)("img",{src:T,alt:"strategy_type",className:p==="default"?"tw-h-[20px] tw-w-[20px]":"tw-h-[16px] tw-w-[16px]"}),(0,t.jsx)("p",{className:"tw-text-xs tw-text-gray-500",children:c})]})}function ws({data:n}){let p=it(),{is_mobile:T}=p,[c,v]=(0,W.useState)(Number(n==null?void 0:n.minDeposit)),x=(0,W.useMemo)(()=>{let N=Number(n==null?void 0:n.minDeposit),e=Number(n==null?void 0:n.maxDeposit),m=(()=>e===N||c<N?0:c>e?100:(c-N)*100/(e-N))();return{min:N,max:e,depositRatio:m}},[n==null?void 0:n.maxDeposit,n==null?void 0:n.minDeposit,c]),o=(0,W.useMemo)(()=>{function N(u){u=String(u);let E=u.match(/(\d+(\.\d+)?)/);return E?parseFloat(parseFloat(E[1]).toFixed(2)):0}let e=Number(n==null?void 0:n.profitSharing),m=N(n==null?void 0:n.historicalProfit),s=c+c*m/100,A=(s-c)*e/100;return{deposit:_(c,0),min:_(n==null?void 0:n.minDeposit,0),max:_(n==null?void 0:n.maxDeposit,0),estReturn:_(s,0),creatorFeePercentage:`${n==null?void 0:n.profitSharing}%`,creatorFee:_(A,0)}},[n==null?void 0:n.historicalProfit,n==null?void 0:n.maxDeposit,n==null?void 0:n.minDeposit,n==null?void 0:n.profitSharing,c]);return T?(0,t.jsxs)("div",{className:"tw-flex tw-flex-col tw-gap-y-3 tw-rounded-t-lg tw-bg-pro-black-200 tw-px-3 tw-py-4 tw-text-sm tw-font-medium tw-text-gray-500",children:[(0,t.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{children:"Deposit"}),(0,t.jsxs)("span",{className:"tw-text-gray-600",children:[" ","| Min : ",o.min]})]}),(0,t.jsx)("span",{className:"tw-text-gold-500",children:o.deposit})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("input",{type:"range",min:x==null?void 0:x.min,max:x==null?void 0:x.max,step:Bt,value:c,onChange:N=>{v(Number(N.target.value))},className:"tw-algo-slider",style:{backgroundSize:`${x==null?void 0:x.depositRatio}% 100%`}}),(0,t.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between tw-text-xs tw-font-medium tw-text-gray-600",children:[(0,t.jsx)("p",{children:o==null?void 0:o.min}),(0,t.jsx)("p",{children:o==null?void 0:o.max})]})]}),(0,t.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{children:"Est. Return "}),(0,t.jsx)("span",{className:"tw-text-gray-600",children:"(Excl. Fee)"})]}),(0,t.jsxs)("span",{className:"tw-text-pro-green-500",children:["~ ",o.estReturn]})]}),(0,t.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{children:"Creator fee "}),(0,t.jsxs)("span",{className:"tw-text-gray-600",children:["(",o==null?void 0:o.creatorFeePercentage," of profit)"]})]}),(0,t.jsxs)("span",{className:"tw-text-gray-400",children:["~ ",o.creatorFee]})]})]}):(0,t.jsxs)("div",{className:"tw-flex tw-h-full tw-w-full tw-justify-between",children:[(0,t.jsxs)("div",{className:"tw-h-full tw-w-[350px]",children:[(0,t.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,t.jsx)("p",{className:"tw-text-sm tw-text-gray-500",children:"Deposit"}),(0,t.jsx)("p",{className:"tw-font-medium tw-text-gold-500",children:o==null?void 0:o.deposit})]}),(0,t.jsxs)("div",{className:"tw-mt-5",children:[(0,t.jsx)("input",{type:"range",min:x==null?void 0:x.min,max:x==null?void 0:x.max,step:Bt,value:c,onChange:N=>{v(Number(N.target.value))},className:"tw-algo-slider",style:{backgroundSize:`${x==null?void 0:x.depositRatio}% 100%`}}),(0,t.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between tw-text-xs tw-font-medium tw-text-gray-600",children:[(0,t.jsx)("p",{children:o==null?void 0:o.min}),(0,t.jsx)("p",{children:o==null?void 0:o.max})]})]})]}),(0,t.jsxs)("div",{className:"tw-h-full tw-w-[220px]",children:[(0,t.jsxs)("div",{className:"tw-flex tw-justify-between",children:[(0,t.jsxs)("p",{className:"tw-w-24 tw-text-wrap tw-text-sm tw-text-gray-500",children:["Est. Return"," ",(0,t.jsx)("span",{className:"tw-text-xs tw-text-gray-600",children:"(Excl. Fee)"})]}),(0,t.jsxs)("p",{className:"tw-text-pro-green-500",children:["~ ",o==null?void 0:o.estReturn]})]}),(0,t.jsxs)("div",{className:"tw-flex tw-justify-between",children:[(0,t.jsxs)("p",{className:"tw-w-24 tw-text-wrap tw-text-sm tw-text-gray-500",children:["Creator fee"," ",(0,t.jsxs)("span",{className:"tw-text-xs tw-text-gray-600",children:["(",o==null?void 0:o.creatorFeePercentage," of profit)"]})]}),(0,t.jsxs)("p",{className:"tw-text-gray-500",children:["~ ",o==null?void 0:o.creatorFee]})]})]})]})}function hs({strategy_data:n,is_data_loading:p,wallet_balance:T,user_consent:c,setSelectedTab:v,handleUpdateUserConsent:x,handleSubscribeStrategy:o}){var K;let N=it(),{is_mobile:e}=N,m=yt(Lt),s=Ft(he),A=Ft(Ee),[u,E]=(0,W.useState)(-1),[f,D]=(0,W.useState)({isOpen:!1,stage:""}),y=(0,W.useCallback)(r=>{r===""?D({stage:"",isOpen:!1}):D({stage:r,isOpen:!0})},[]),O=(0,W.useCallback)(()=>{e&&E(-1),D({stage:"",isOpen:!1})},[e]),C=(0,W.useCallback)((r,M)=>{E(et=>et===r?(L(U.SmartInvestUserHideClicked,{strategy:M}),-1):(L(U.SmartInvestUserExploreClicked,{strategy:M}),r))},[]),B=(0,W.useCallback)(r=>u===r,[u]),j=(0,W.useCallback)(r=>{var M;if(!(m!=null&&m.is_logged_in)){s(),e&&E(-1);return}L(U.SmartInvestUserInvestNowClicked,{strategy:r,user_uuid:m==null?void 0:m.user_uuid}),!(m!=null&&m.is_kyc_complete)||!(m!=null&&m.is_bank_linked)||(m==null?void 0:m.is_pmla_done)===!1||!(m!=null&&m.is_verified_email)&&((M=m==null?void 0:m.total_buy_count)!=null?M:0)>0?A():y(c?"deposit":"consent")},[e,A,s,y,c,m==null?void 0:m.is_bank_linked,m==null?void 0:m.is_kyc_complete,m==null?void 0:m.is_logged_in,m==null?void 0:m.is_pmla_done,m==null?void 0:m.is_verified_email,m==null?void 0:m.total_buy_count,m==null?void 0:m.user_uuid]),V=(0,W.useMemo)(()=>n.map(r=>({...r,minDeposit:_(r.minDeposit,0),profitSharing:`${r.profitSharing}%`,historicalProfit:`${r.historicalProfit}%`,netTradedVol:Be(r.netTradedVol),slots:`${r.slotsLeft}/${r.totalSlots}`,details:{...r.details,netTradedVol:_(r.details.totalTradeVol,0)},originalData:r,startDate:r.startDate})),[n]),g=(0,W.useMemo)(()=>V[u],[u,V]),Z=(0,W.useMemo)(()=>(f==null?void 0:f.isOpen)||u!=-1,[u,f==null?void 0:f.isOpen]);return(n==null?void 0:n.length)>0||p?e?(0,t.jsxs)("div",{className:"tw-flex tw-w-full tw-flex-col tw-gap-y-4 tw-px-4 tw-py-3",children:[Z&&(0,t.jsxs)(Q,{open:Z,onOpenChange:r=>{r||O()}
1,dismissible:!1,children:[(0,t.jsx)(Q.Overlay,{className:"tw-bg-black-01/70"}),(f==null?void 0:f.stage)==="consent"?(0,t.jsx)(Q.Content,{className:"tw-h-[280px] tw-rounded tw-border-t tw-border-pro-gray-200 tw-bg-[#121319]",children:(0,t.jsx)(Zt,{closePopup:O,updatePopupStage:y,handleUpdateUserConsent:x})}):(f==null?void 0:f.stage)==="kyc_pending"?(0,t.jsx)(Q.Content,{className:"tw-h-[260px] tw-rounded tw-border-t tw-border-pro-gray-200 tw-bg-[#121319]",children:(0,t.jsx)(Jt,{closePopup:O,updatePopupStage:y})}):(f==null?void 0:f.stage)==="deposit"?(0,t.jsx)(Q.Content,{className:"tw-h-[440px] tw-rounded tw-border-t tw-border-pro-gray-200 tw-bg-[#121319]",children:(0,t.jsx)(Qt,{wallet_balance:T,strategy_data:n[u],handleSubscribeStrategy:o,closePopup:O,updatePopupStage:y})}):(f==null?void 0:f.stage)==="subscription_success"?(0,t.jsx)(Q.Content,{className:"tw-h-[340px] tw-rounded tw-border-t tw-border-pro-gray-200 tw-bg-[#121319]",children:(0,t.jsx)(te,{closePopup:O,setSelectedTab:v})}):u!=-1?(0,t.jsxs)(Q.Content,{className:"tw-flex tw-max-h-[90vh] tw-flex-col tw-justify-between tw-rounded tw-border-t tw-border-pro-gray-200 tw-bg-[#121319]",children:[(0,t.jsxs)("div",{className:"tw-w-full tw-border-b tw-border-pro-gray-200 tw-p-4",children:[(0,t.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,t.jsx)("p",{className:"tw-text-xl tw-font-medium tw-text-white",children:g==null?void 0:g.botName}),(0,t.jsx)("button",{type:"button",className:"tw-h-fit tw-w-fit tw-cursor-pointer tw-border-none tw-bg-transparent tw-p-0",onClick:O,children:(0,t.jsx)(b,{width:"tw-w-5",height:"tw-h-5",name:"cross-gray"})})]}),(0,t.jsxs)("div",{className:"tw-flex tw-items-center tw-gap-x-1",children:[(0,t.jsx)(ee,{strategyType:g==null?void 0:g.strategyType,variant:"drawer"}),(g==null?void 0:g.startDate)&&(0,t.jsxs)("div",{className:"tw-mt-3 tw-flex tw-w-fit tw-items-center tw-gap-x-1 tw-rounded-lg tw-bg-pro-black-200 tw-px-2 tw-py-1",children:[(0,t.jsx)(b,{width:"tw-w-4",height:"tw-h-4",name:"countdown-timer"}),(0,t.jsxs)("p",{className:"tw-text-xs tw-text-gray-500",children:[jt(g==null?void 0:g.startDate)," ",g==null?void 0:g.startDate]})]})]})]}),(0,t.jsxs)("div",{className:"no-scrollbar tw-flex-1 tw-overflow-y-auto tw-px-4",children:[(0,t.jsxs)("div",{className:"tw-flex tw-w-full tw-items-center tw-justify-between tw-py-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"tw-flex tw-items-center tw-gap-x-1",children:[(0,t.jsx)("p",{className:"tw-text-xs tw-text-gray-600",children:"Historical Profit"}),(0,t.jsx)(ts,{children:(0,t.jsxs)("div",{className:"tw-text-base tw-font-medium tw-text-white",children:[(0,t.jsx)("p",{children:"Historical Profit"}),(0,t.jsx)("p",{className:"tw-mt-4 tw-text-sm tw-text-gray-500",children:"Expected Profits maybe subject to change depending on the existing market conditions. We shall not be liable for any losses or notional losses that are attributable to the Creator not delivering the Historical Profits."})]})})]}),(0,t.jsx)("p",{className:"tw-text-sm tw-font-medium tw-text-pro-green-500",children:g.historicalProfit})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"tw-text-xs tw-text-gray-600",children:"Min. Deposit"}),(0,t.jsx)("p",{className:"tw-text-sm tw-font-medium tw-text-gray-400",children:g.minDeposit})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"tw-text-xs tw-text-gray-600",children:"Net Traded Vol."}),(0,t.jsx)("p",{className:"tw-text-sm tw-font-medium tw-text-gray-400",children:g.netTradedVol})]})]}),(0,t.jsxs)("div",{className:"tw-w-full tw-pt-2",children:[(0,t.jsx)(ws,{data:g==null?void 0:g.originalData}),(0,t.jsxs)("div",{className:"tw-rounded-b-lg tw-border tw-border-pro-black-200 tw-px-2 tw-py-3",children:[(0,t.jsx)("p",{className:"tw-w-fit tw-rounded tw-bg-gold-500 tw-bg-gradient-to-r tw-from-[#7C6227] tw-to-[#3E3625] tw-px-2 tw-py-1 tw-text-xxs tw-font-medium tw-text-white",children:"IMPORTANT"}),(g==null?void 0:g.strategyType)==="HIGH_RISK_NO_TDS"?(0,t.jsxs)("div",{className:"tw-pt-3 tw-text-xs",children:[(0,t.jsxs)("span",{className:"tw-text-gray-600",children:["Your loss will be capped at"," ",(0,t.jsx)("span",{className:"tw-text-pro-red-400",children:"-20%"})," to reduce risk."]})," ",(0,t.jsx)("br",{}),(0,t.jsx)("a",{onClick:()=>{L(U.SmartInvestUserReadMoreClicked)},target:"_blank",href:St,className:"tw-w-fit tw-cursor-pointer tw-text-gold-500",rel:"noreferrer",children:"*T&C apply"})," "]}):(0,t.jsxs)("p",{className:"tw-mt-2.5 tw-text-xs tw-font-medium tw-text-gray-600",children:["1% TDS is deducted with every sell order, therefore a significant portion of the investment and profit is locked in TDS."," ",(0,t.jsx)("a",{onClick:()=>{L(U.SmartInvestUserReadMoreClicked)},target:"_blank",href:"https://coinswitch.co/building-blocks/unlock-the-power-of-algo-trading-on-coinswitch-pro/",className:"tw-w-fit tw-cursor-pointer tw-text-gold-500 tw-u
1nderline",rel:"noreferrer",children:"Read More"})]})]})]}),(0,t.jsxs)("div",{className:"tw-w-full tw-py-4",children:[(0,t.jsx)("p",{className:"tw-mt-2 tw-font-medium tw-text-[#F4F4F6]",children:g==null?void 0:g.botCreator}),(0,t.jsxs)("div",{className:"tw-mt-3 tw-flex tw-items-center tw-gap-x-5 tw-text-xs tw-font-medium",children:[(0,t.jsx)("div",{className:"tw-h-8 tw-w-8 tw-flex-none tw-rounded-full",children:g!=null&&g.botLogo?(0,t.jsx)("img",{className:"tw-w-full",src:g==null?void 0:g.botLogo,alt:""}):(0,t.jsx)(b,{width:"tw-w-full",height:"tw-h-full",name:"profile-gold-icon"})}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"tw-flex tw-items-center tw-gap-x-0.5",children:[(0,t.jsx)("p",{className:"tw-text-gray-500",children:g.details.rating}),(0,t.jsx)(b,{name:"gold-star",width:"tw-w-3",height:"tw-h-3"})]}),(0,t.jsx)("p",{className:"tw-text-xxs tw-text-gray-600",children:"Rated"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"tw-text-gray-500",children:g.details.netTradedVol}),(0,t.jsx)("p",{className:"tw-text-xxs tw-text-gray-600",children:"Total Traded Vol."})]})]}),(0,t.jsx)("p",{className:"tw-mt-3 tw-text-xs tw-text-gray-600",children:(K=g==null?void 0:g.details)==null?void 0:K.description})]})]}),(0,t.jsx)("div",{className:"tw-w-full tw-flex-none tw-p-4",children:(0,t.jsxs)("button",{disabled:(g==null?void 0:g.slotsLeft)<=0,onClick:()=>j(g==null?void 0:g.botName),className:"tw-flex tw-h-11 tw-w-full tw-items-center tw-justify-center tw-gap-x-2 tw-rounded tw-bg-gold-500 tw-text-sm tw-font-medium tw-text-black-01 disabled:tw-cursor-not-allowed disabled:tw-bg-gold-1000",children:["Invest Now",(0,t.jsx)(b,{width:"tw-w-5",height:"tw-h-5",name:"futures-transfer-arrow"})]})})]}):null]}),V==null?void 0:V.map((r,M)=>{var et;return(0,t.jsxs)("div",{className:"tw-w-full tw-rounded-lg tw-border tw-border-black-02 tw-bg-black-01 tw-shadow-lg",children:[Gt(r==null?void 0:r.startDate)&&(0,t.jsx)("div",{className:"tw-flex tw-h-[24px] tw-w-full tw-items-center tw-justify-center tw-rounded-t-lg tw-bg-[#524422B2] tw-text-center tw-text-xs tw-text-gold-500",children:"Newly Added"}),(0,t.jsxs)("div",{className:"tw-flex tw-w-full tw-items-center tw-justify-between tw-px-4 tw-py-3",children:[(0,t.jsxs)("div",{className:"tw-flex tw-w-[65%] tw-items-center tw-gap-x-2",children:[(0,t.jsx)("div",{className:"tw-h-8 tw-w-8 tw-flex-none tw-rounded-full",children:r!=null&&r.botLogo?(0,t.jsx)("img",{className:"tw-w-full",src:r==null?void 0:r.botLogo,alt:""}):(0,t.jsx)(b,{width:"tw-w-full",height:"tw-h-full",name:"profile-gold-icon"})}),(0,t.jsxs)("div",{className:"tw-flex-1",children:[(0,t.jsx)("div",{className:"tw-flex tw-gap-x-2",children:(0,t.jsx)("p",{className:"tw-w-[150px] tw-text-sm tw-font-medium tw-text-[#F4F4F6]",children:r==null?void 0:r.botName})}),(0,t.jsxs)("p",{className:"tw-max-w-[80%] tw-truncate tw-text-xs tw-text-gray-600 ",children:["By ",r==null?void 0:r.botCreator]})]})]}),(0,t.jsxs)("div",{className:"tw-text-right",children:[(0,t.jsx)("p",{className:"tw-text-sm tw-font-medium tw-text-pro-green-500",children:r==null?void 0:r.historicalProfit}),(0,t.jsx)("p",{className:"tw-text-xs tw-text-gray-600",children:"Historical Profit"})]})]}),(0,t.jsxs)("div",{className:"tw-relative tw-flex tw-justify-center",children:[(0,t.jsx)("div",{className:"tw-absolute tw-top-[10px] tw-z-10 tw-mx-3 tw-h-[1px] tw-w-full tw-rounded-lg tw-bg-[#494B57]"}),(0,t.jsx)(ee,{strategyType:r==null?void 0:r.strategyType,variant:"mobile"})]}),(0,t.jsxs)("div",{className:"tw-grid tw-w-full tw-grid-cols-3 tw-gap-x-2 tw-gap-y-4 tw-px-4 tw-py-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"tw-w-full tw-truncate tw-text-xs tw-text-gray-600",children:"Min. Deposit"}),(0,t.jsx)("p",{className:"tw-mt-1 tw-w-full tw-truncate tw-text-sm tw-font-medium tw-text-gray-500",children:r==null?void 0:r.minDeposit})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"tw-w-full tw-truncate tw-text-xs tw-text-gray-600",children:"Profit Sharing"}),(0,t.jsx)("p",{className:"tw-mt-1 tw-w-full tw-truncate tw-text-sm tw-font-medium tw-text-gray-500",children:r==null?void 0:r.profitSharing})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"tw-w-full tw-truncate tw-text-xs tw-text-gray-600",children:"Net Traded Vol."}),(0,t.jsx)("p",{className:"tw-mt-1 tw-w-full tw-truncate tw-text-sm tw-font-medium tw-text-gray-500",children:r==null?void 0:r.netTradedVol})]})]}),(r==null?void 0:r.strategyType)==="HIGH_RISK_NO_TDS"&&(0,t.jsxs)("div",{className:"tw-pb-4 tw-pl-4 tw-pt-3 tw-text-xs tw-text-gold-500",children:["NOTE"," ",(0,t.jsxs)("span",{className:"tw-text-gray-600",children:[": Your loss will be capped at"," "]})," ",(0,t.jsx)("span",{className:"tw-text-pro-red-400",children:"-20%"})]}),(0,t.jsxs)("div",{className:"tw-flex tw-w-full tw-items-center tw-justify-between tw-rounded-b-lg tw-bg-pro-black-200 tw-px-3 tw-py-3 tw-text-xs",children:[r.slotsLeft<1?(0,t.jsxs)("p",{className:"tw-rounded-full tw-bg-black-01 tw-px-2 tw-py-1 tw-text-gray-500",children:["All ",((et=r==null?void 0:r.originalData)==null?void 0:et.totalSlots)||""," Slots Booked"]}):r.slotsLeft<5?(0,t.jsxs)("p",{className:"tw-rounded-full tw-bg-black-01 tw-px-2 tw-py-1 tw-text-pro-gold-500",children:["\u{1F525} Filling Fast - Only ",r.slotsLeft," Left"]}):(0,t.jsxs)("p",{className:"tw-rounded-full tw-bg-black-01 tw-px-2 tw-py-1 tw-font-medium tw-text-[#26D08D]",children:[r.slots," Slots Left"]}),(0,t.jsx)("div",{onClick:()=>{C(M,r==null?void 0:r.botName)},className:"tw-flex tw-items-center tw-gap-x-1 tw-text-xs tw-font-medium tw-text-gold-500",children:(0,t.jsx)("span",{children:"View Details"})})]})]},`all-strategies-card-${M}`)})]}):(0,t.jsxs)("div",{className:"tw-flex tw-w-full tw-flex-col tw-gap-y-4",children:[(0,t.jsxs)(Y,{isOpen:f.isOpen,onOpenChange:O,children:[(0,t.jsx)(Y.Overlay,{className:"tw-bg-black-02 tw-opacity-80"}),(0,t.jsx)(Y.Content,{className:"tw-border tw-border-pro-gray-200 tw-bg-black-01 tw-p-0",children:(f==null?void 0:f.stage)==="consent"?(0,t.jsx)("div",{className:"tw-h-[280px] tw-w-[360px]",children:(0,t.jsx)(Zt,{closePopup:O,updatePopupStage:y,handleUpdateUserConsent:x})}):(f==null?void 0:f.stage)==="kyc_pending"?(0,t.jsx)("div",{className:"tw-h-[280px] tw-w-[320px]",children:(0,t.jsx)(Jt,{closePopup:O,updatePopupStage:y})}):(f==null?void 0:f.stage)==="deposit"?(0,t.jsx)("div",{className:"tw-h-[440px] tw-w-[360px]",children:(0,t.jsx)(Qt,{wallet_balance:T,strategy_data:n[u],handleSubscribeStrategy:o,closePopup:O,updatePopupStage:y})}):(f==null?void 0:f.stage)==="subscription_success"?(0,t.jsx)("div",{className:"tw-h-[340px] tw-w-[360px]",children:(0,t.jsx)(te,{closePopup:O,setSelectedTab:v})}):null})]}),V==null?void 0:V.map((r,M)=>{var Nt;let et=jt(r==null?void 0:r.startDate);return(0,t.jsx)("div",{className:`tw-rounded ${B(M)?"tw-border tw-border-highligh-gray tw-bg-pro-black-200":"tw-bg-black-01"}`,children:(0,t.jsx)("div",{className:"tw-flex tw-flex-col",children:(0,t.jsx)("div",{className:`tw-flex tw-transition-all tw-duration-200 tw-ease-in-out ${B(M)?"tw-h-[407px]":"tw-h-[155px]"} tw-w-full tw-justify-between tw-px-6 tw-py-4 tw-font-medium`,children:(0,t.jsxs)("div",{className:"tw-flex tw-h-full tw-gap-x-6 *:tw-flex *:tw-justify-between",children:[(0,t.jsxs)("div",{className:"tw-w-[449px] tw-flex-col",children:[(0,t.jsxs)("div",{className:"tw-flex tw-h-full tw-w-full tw-gap-x-4",children:[(0,t.jsx)("div",{className:"tw-h-10 tw-w-10 tw-flex-none tw-rounded-full",children:r!=null&&r.botLogo?(0,t.jsx)("img",{className:"tw-w-full",src:r==null?void 0:r.botLogo,alt:""}):(0,t.jsx)(b,{width:"tw-w-full",height:"tw-h-full",name:"profile-gold-icon"})}),(0,t.jsxs)("div",{className:"tw-flex tw-max-w-[70%] tw-flex-col",children:[(0,t.jsxs)("div",{className:"tw-flex tw-items-center tw-gap-x-2",children:[(0,t.jsx)("p",{className:"tw-truncate tw-text-xl tw-font-medium tw-text-[#F4F4F6]",children:r.botName}),Gt(r==null?void 0:r.startDate)&&(0,t.jsx)("div",{className:"tw-flex tw-h-[24px] tw-w-[94px] tw-min-w-[94px] tw-items-center tw-justify-center tw-text-nowrap tw-rounded-lg tw-bg-[#524422B2] tw-text-center tw-text-xs tw-text-gold-500",children:"Newly Added"})]}),(0,t.jsxs)("p",{className:"tw-text-sm tw-text-gray-700",children:[" ","By ",r.botCreator]}),(0,t.jsxs)("div",{className:"tw-mt-4 tw-flex tw-items-center tw-gap-x-4",children:[(0,t.jsx)(ee,{strategyType:r==null?void 0:r.strategyType}),et&&(0,t.jsxs)("div",{className:"tw-flex tw-w-fit tw-items-center tw-gap-x-1 tw-rounded-lg tw-bg-black-02 tw-px-2 tw-py-1",children:[(0,t.jsx)(b,{width:"tw-w-5",height:"tw-h-5",name:"countdown-timer"}),(0,t.jsxs)("p",{className:"tw-text-xs tw-text-gray-500",children:[et," ",r==null?void 0:r.startDate]})]})]}),(0,t.jsx)("p",{className:`${B(M)?"":"tw-line-clamp-3"} tw-mt-4 tw-w-[390px] tw-overflow-hidden tw-pb-4 tw-text-sm tw-text-gray-700`,children:(Nt=r==null?void 0:r.details)==null?void 0:Nt.description})]})]}),B(M)&&(0,t.jsxs)("div",{className:"tw-ml-14 tw-h-full tw-w-[408px]",children:[(0,t.jsxs)("p",{className:"tw-font-medium tw-text-[#F4F4F6]",children:["About ",r.botName]}),(0,t.jsxs)("div",{className:"tw-mt-5 tw-flex tw-gap-x-6 tw-font-medium",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"tw-flex tw-items-center tw-gap-x-0.5",children:[(0,t.jsx)("p",{className:"tw-text-gray-500",children:r.details.rating}),(0,t.jsx)(b,{name:"gold-star",width:"tw-w-3",height:"tw-h-3"})]}),(0,t.jsx)("p",{className:"tw-text-xxs tw-text-gray-600",children:"Rated"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"tw-text-gray-500",children:r.details.netTradedVol}),(0,t.jsx)("p",{className:"tw-text-xxs tw-text-gray-600",children:"Total Traded Vol."})]})]})]})]}),(0,t.jsxs)("div",{className:"tw-flex-col",children:[(0,t.jsxs)("div",{className:"tw-flex tw-w-[605px] tw-justify-between",children:[(0,t.jsxs)("div",{className:"tw-flex tw-h-[122px] tw-w-fit tw-flex-col tw-justify-between tw-gap-y-5",children:[(0,t.jsxs)("div",{className:"tw-flex tw-justify-between tw-gap-x-8",children:[(0,t.jsxs)("div",{className:"tw-w-[135px]",children:[(0,t.jsx)("p",{className:"tw-truncate tw-text-xl tw-font-medium tw-text-pro-green-500",children:r.historicalProfit}),(0,t.jsxs)("div",{className:"tw-flex tw-items-center tw-gap-x-0.5",children:[(0,t.jsx)("p",{className:"tw-text-sm tw-text-gray-700",children:"Historical Profit"}),(0,t.jsx)(lt,{variant:"gray",children:(0,t.jsx)("div",{className:"tw-p-4 tw-text-sm tw-font-medium tw-text-gray-500",children:"Expected Profits maybe subject to change depending on the existing market conditions. We shall not be liable for any losses or notional losses that are attributable to the Creator not delivering the Historical Profits."})})]})]}),(0,t.jsxs)("div",{className:"tw-w-[135px]",children:[(0,t.jsxs)("p",{className:"tw-text-gray-500",children:[" ",r.minDeposit]}),(0,t.jsx)("p",{className:"tw-text-sm tw-text-gray-700",children:"Min. Deposit"})]})]}),(0,t.jsxs)("div",{className:"tw-flex tw-justify-between",children:[(0,t.jsxs)("div",{className:"tw-w-[135px]",children:[(0,t.jsxs)("p",{className:"tw-text-gray-500",children:[" ",r.profitSharing]}),(0,t.jsx)("p",{className:"tw-text-sm tw-text-gray-700",children:"Profit Sharing"})]}),(0,t.jsxs)("div",{className:"tw-w-[135px]",children:[(0,t.jsx)("p",{className:"tw-text-gray-500",children:r.netTradedVol}),(0,t.jsx)("p",{className:"tw-text-sm tw-text-gray-700",children:"Net Traded Vol."})]})]})]}),(0,t.jsxs)("div",{className:"tw-flex tw-h-[122px] tw-w-fit tw-flex-col tw-justify-between tw-gap-y-5 tw-text-xs tw-font-medium",children:[(0,t.jsx)("div",{className:"tw-w-[108px]",children:r.slotsLeft<1?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"tw-text-sm tw-text-gray-700",children:"All Slots"}),(0,t.jsx)("p",{className:"tw-text-sm tw-text-gray-700",children:"Booked"})]}):r.slotsLeft<5?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"tw-text-gold-700",children:["\u{1F525} ",r.slots]}),(0,t.jsx)("p",{className:"tw-text-sm tw-text-gray-700",children:"Slots Left"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"tw-text-[#26D08D]",children:r.slots}),(0,t.jsx)("p",{className:"tw-text-sm tw-text-gray-700",children:"Slots Left"})]})}),(0,t.jsxs)("button",{onClick:()=>{C(M,r==null?void 0:r.botName)},className:"tw-flex tw-h-8 tw-w-[124px] tw-items-center tw-justify-center tw-gap-x-2 tw-rounded tw-border tw-border-gold-500 tw-text-gold-500",children:[(0,t.jsx)("p",{children:B(M)?"Hide Details":"View Details"}),(0,t.jsx)(b,{width:"tw-w-4",height:"tw-h-4",name:B(M)?"download-csv-up-arrow":"download-csv-down-arrow"})]})]})]}),B(M)&&(0,t.jsxs)("div",{className:"tw-mt-5 tw-w-[605px]",children:[(0,t.jsx)("p",{className:"tw-font-medium tw-text-[#F4F4F6]",children:"Calculate your returns"}),(0,t.jsx)("div",{className:"tw-mt-5 tw-h-[92px] tw-w-full",children:(0,t.jsx)(ws,{data:r==null?void 0:r.originalData})}),(0,t.jsx)("div",{className:"tw-mt-5 tw-h-[1px] tw-w-full tw-bg-highligh-gray"}),(0,t.jsxs)("div",{className:"tw-mt-5 tw-flex tw-w-full tw-justify-between",children:[(r==null?void 0:r.strategyType)!=="HIGH_RISK_NO_TDS"?(0,t.jsxs)("p",{className:"tw-w-[360px] tw-rounded tw-bg-highligh-gray tw-px-3 tw-py-1 tw-text-xs tw-font-medium tw-text-gray-600",children:[(0,t.jsx)("span",{className:"tw-text-gold-500",children:"IMPORTANT :"})," ","1% TDS is deducted with every sell order, therefore a significant portion of the investment and profit is locked in TDS."," ",(0,t.jsx)("a",{onClick:()=>{L(U.SmartInvestUserReadMoreClicked)},target:"_blank",href:"https://coinswitch.co/building-blocks/unlock-the-power-of-algo-trading-on-coinswitch-pro/",className:"tw-w-fit tw-cursor-pointer tw-text-gold-500 tw-u
1nderline",rel:"noreferrer",children:"Read More"})]}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("p",{className:"tw-w-[360px] tw-rounded tw-bg-highligh-gray tw-px-3 tw-py-1 tw-text-xs tw-font-medium tw-text-gray-600",children:[(0,t.jsx)("span",{className:"tw-text-gold-500",children:"IMPORTANT :"})," ","Your loss will be capped at"," ",(0,t.jsxs)("span",{className:"tw-text-pro-red-400",children:["-20%"," "]})," ","to reduce risk.",(0,t.jsx)("br",{}),(0,t.jsxs)("a",{onClick:()=>{L(U.SmartInvestUserReadMoreClicked)},target:"_blank",href:St,className:"tw-w-fit tw-cursor-pointer tw-text-gold-500",rel:"noreferrer",children:["*T&C"," "]}),"apply"]})}),(0,t.jsxs)("button",{disabled:(r==null?void 0:r.slotsLeft)<=0,onClick:()=>j(r==null?void 0:r.botName),className:"tw-flex tw-h-11 tw-w-[220px] tw-items-center tw-justify-center tw-gap-x-2 tw-rounded tw-bg-gold-500 tw-text-sm tw-font-medium tw-text-black-01 disabled:tw-cursor-not-allowed disabled:tw-bg-gold-1000",children:["Invest Now",(0,t.jsx)(b,{width:"tw-w-5",height:"tw-h-5",name:"black-right-arrow"})]})]})]})]})]})})})},`all-strategies-card-${M}`)})]}):(0,t.jsx)(gt,{})}var se=hs;rt();At();var Et=S(tt());xt();var w=S(R());function we({data:{tab_data:n,aggregated_data:p},is_data_loading:T,setSelectedTab:c,handleDownloadInvoice:v}){let x=it(),{is_mobile:o}=x,N=(0,Et.useCallback)(s=>{s&&typeof s=="string"&&v(s)},[v]),e=(0,Et.useMemo)(()=>{let s=st(p.netPnL*100/p.netInvestedValue,2);return{...p,isNetPnLPositive:p.netPnL>=0,netPnL:isNaN(p.netPnL)?"--":_(p.netPnL),netPnLPercentage:!isNaN(s)&&isFinite(s)?`${s==null?void 0:s.toFixed(2)}%`:"--",netCurrentValue:_(p.netCurrentValue),netInvestedValue:_(p.netInvestedValue)}},[p]),m=(0,Et.useMemo)(()=>n.map(s=>{var u,E,f,D,y,O;let A=st(s.pnL*100/s.investedValue,2);return{...s,isPnlPositive:s.pnL>=0,pnL:isNaN(s.pnL)?"--":_(s.pnL),pnlPercentage:!isNaN(A)&&isFinite(A)?`${A==null?void 0:A.toFixed(2)}%`:"--",investedValue:(u=_(s.investedValue))!=null?u:"--",currentValue:(E=_(s.currentValue))!=null?E:"--",unUsedValue:s.isSettled&&(f=_(s.unUsedValue))!=null?f:"--",tdsPaid:(D=_(s.tdsPaid))!=null?D:"--",estCreatorFee:(y=_(s.estCreatorFee))!=null?y:"--",subscriptionId:Ot(s.subscriptionId),originalSubscriptionId:(O=s.subscriptionId)!=null?O:""}}),[n]);return T?(0,w.jsx)("div",{}):(m==null?void 0:m.length)>0?o?(0,w.jsxs)("div",{className:"tw-w-full tw-px-4 tw-py-3",children:[(0,w.jsxs)("div",{className:`tw-w-full tw-rounded-lg tw-bg-pro-black-200 tw-bg-gradient-to-r tw-p-3 tw-shadow ${e.isNetPnLPositive?"tw-from-pro-green-500/0 tw-to-pro-green-500/50":"tw-from-pro-red-500/0 tw-to-pro-red-500/50"}`,children:[(0,w.jsxs)("div",{className:"tw-flex tw-w-full tw-items-center tw-justify-between tw-text-xs tw-text-gray-600",children:[(0,w.jsxs)("p",{className:"tw-text-gray-500",children:[(0,w.jsx)("span",{className:"tw-text-sm",children:"Net P & L"})," (Excl. Fee)"]}),(0,w.jsxs)("p",{className:`tw-max-w-[60%] tw-truncate tw-text-sm tw-font-medium ${e.isNetPnLPositive?"tw-text-pro-green-500":"tw-text-pro-red-500"}`,children:[e==null?void 0:e.netPnL," ",(0,w.jsx)("span",{className:"tw-text-gray-700",children:"/"})," ",e==null?void 0:e.netPnLPercentage]})]}),(0,w.jsxs)("div",{className:"tw-mt-2 tw-flex tw-w-full tw-items-center tw-justify-between tw-text-xs tw-text-gray-600",children:[(0,w.jsx)("p",{children:"Net Invested Value"}),(0,w.jsx)("p",{className:"tw-font-medium tw-text-gray-400",children:e==null?void 0:e.netInvestedValue})]}),(0,w.jsxs)("div",{className:"tw-mt-1 tw-flex tw-w-full tw-items-center tw-justify-between tw-text-xs tw-text-gray-600",children:[(0,w.jsx)("p",{children:"Net Final Value"}),(0,w.jsx)("p",{className:"tw-font-medium tw-text-gray-400",children:e==null?void 0:e.netCurrentValue})]})]}),(0,w.jsx)("p",{className:"tw-mb-3 tw-mt-4 tw-text-sm tw-font-medium",children:"Strategies"}),(0,w.jsx)("div",{className:"tw-flex tw-w-full tw-flex-col tw-gap-y-4",children:m==null?void 0:m.map((s,A)=>{var u,E,f,D,y,O;return(0,w.jsxs)("div",{className:"tw-w-full tw-rounded-lg tw-border tw-border-black-02 tw-bg-black-01 tw-shadow-lg",children:[(0,w.jsxs)("div",{className:"tw-flex tw-w-full tw-items-center tw-justify-between tw-px-4 tw-py-3",children:[(0,w.jsxs)("div",{className:"tw-flex tw-w-2/3 tw-items-center tw-gap-x-2",children:[(0,w.jsx)("div",{className:"tw-h-8 tw-w-8 tw-flex-none tw-rounded-full",children:s!=null&&s.botLogo?(0,w.jsx)("img",{className:"tw-w-full",src:s==null?void 0:s.botLogo,alt:""}):(0,w.jsx)(b,{width:"tw-w-full",height:"tw-h-full",name:"profile-gold-icon"})}),(0,w.jsxs)("div",{className:"tw-w-[calc(100%-40px)] tw-flex-1",children:[(0,w.jsxs)("div",{className:"tw-flex tw-gap-x-0.5",children:[(0,w.jsx)("p",{className:"tw-text-sm tw-font-medium tw-text-[#F4F4F6]",children:s==null?void 0:s.botName}),(0,w.jsx)("div",{className:"tw-mt-1",children:(0,w.jsx)(nt,{title:s==null?void 0:s.botName,children:(0,w.jsxs)("div",{className:"tw-flex tw-w-full tw-flex-col tw-gap-y-3 tw-p-4 tw-text-sm tw-font-medium tw-text-gray-500",children:[(0,w.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,w.jsx)("p",{children:"Creator"}),(0,w.jsx)("p",{className:"tw-text-gray-400",children:(u=s==null?void 0:s.details)==null?void 0:u.botCreator})]}),(0,w.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,w.jsx)("p",{children:"Historical Profit"}),(0,w.jsx)("p",{className:"tw-text-pro-green-500",children:(E=s==null?void 0:s.details)==null?void 0:E.historicalProfit})]}),(0,w.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,w.jsx)("p",{children:"Min. Deposit"}),(0,w.jsx)("p",{className:"tw-text-gray-400",children:(f=s==null?void 0:s.details)==null?void 0:f.minDeposit})]}),(0,w.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,w.jsx)("p",{children:"Profit Sharing"}),(0,w.jsx)("p",{className:"tw-text-gray-400",children:(D=s==null?void 0:s.details)==null?void 0:D.profitSharing})]}),(0,w.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,w.jsx)("p",{children:"Net Traded Vol."}),(0,w.jsx)("p",{className:"tw-text-gray-400",children:(y=s==null?void 0:s.details)==null?void 0:y.netTradedVol})]})]})})})]}),(0,w.jsxs)("p",{className:"tw-truncate tw-text-xs tw-text-gray-600 ",children:["ID: ",s.subscriptionId]})]})]}),(0,w.jsxs)("div",{className:"tw-w-1/2 tw-text-right",children:[(0,w.jsxs)("p",{className:`tw-truncate tw-text-sm tw-font-medium ${s!=null&&s.isPnlPositive?"tw-text-pro-green-500":"tw-text-pro-red-500"}`,children:[s.pnL," ",(0,w.jsx)("span",{className:"tw-text-gray-700",children:"/"})," ",s==null?void 0:s.pnlPercentage]}),(0,w.jsx)("p",{className:"tw-text-xs tw-text-gray-600",children:"P & L (Excl. Fee)"})]})]}),(0,w.jsx)("div",{className:"tw-px-4",children:(0,w.jsx)("div",{className:"tw-min-h-[1px] tw-w-full tw-bg-highligh-gray"})}),(0,w.jsxs)("div",{className:"tw-grid tw-w-full tw-grid-cols-3 tw-gap-x-2 tw-gap-y-4 tw-px-4 tw-py-4",children:[(0,w.jsxs)("div",{children:[(0,w.jsx)("p",{className:"tw-w-full tw-truncate tw-text-xs tw-text-gray-600",children:"Invested"}),(0,w.jsx)("p",{className:"tw-mt-1 tw-w-full tw-truncate tw-text-sm tw-font-medium tw-text-gray-500",children:s==null?void 0:s.investedValue})]}),(0,w.jsxs)("div",{children:[(0,w.jsx)("p",{className:"tw-w-full tw-truncate tw-text-xs tw-text-gray-600",children:"TDS Paid"}),(0,w.jsx)("p",{className:"tw-mt-1 tw-w-full tw-truncate tw-text-sm tw-font-medium tw-text-gray-500",children:s==null?void 0:s.tdsPaid})]}),(0,w.jsxs)("div",{children:[(0,w.jsxs)("p",{className:"tw-w-full tw-truncate tw-text-xs tw-text-gray-600",children:["Creator Fee ",(O=s==null?void 0:s.details)==null?void 0:O.profitSharing]}),(0,w.jsx)("p",{className:"tw-mt-1 tw-w-full tw-truncate tw-text-sm tw-font-medium tw-text-gray-500",children:s==null?void 0:s.estCreatorFee})]}),(0,w.jsxs)("div",{children:[(0,w.jsxs)("div",{className:"tw-flex tw-items-center tw-gap-x-0.5",children:[(0,w.jsx)("p",{className:"tw-w-fit tw-truncate tw-text-xs tw-text-gray-600",children:"Unused Bal."}),(0,w.jsx)(nt,{title:"Unused Bal.",variant:"gray",children:(0,w.jsx)("div",{className:"tw-p-4 tw-text-sm tw-font-medium tw-text-gray-500",children:Yt(s==null?void 0:s.isSettled)})})]}),(0,w.jsx)("p",{className:"tw-mt-1 tw-w-full tw-truncate tw-text-sm tw-font-medium tw-text-gray-500",children:s==null?void 0:s.unUsedValue})]}),(0,w.jsxs)("div",{children:[(0,w.jsxs)("div",{className:"tw-flex tw-items-center tw-gap-x-0.5",children:[(0,w.jsx)("p",{className:"tw-w-fit tw-truncate tw-text-xs tw-text-gray-600",children:"Status"}),(0,w.jsx)(nt,{title:"Status",variant:"gray",children:(0,w.jsx)("div",{className:"tw-p-4 tw-text-sm tw-font-medium tw-text-gray-500",children:"Your strategy has been ended by the creator. It will take up to 24 hours to credit the P&L. All the current data in processing stage are estimated values"})})]}),(0,w.jsx)("p",{className:"tw-mt-1 tw-w-full tw-truncate tw-text-sm tw-font-medium tw-text-gray-500",children:s!=null&&s.isSettled?"Completed":"Processing"})]}),(s==null?void 0:s.isInvoiced)&&(0,w.jsx)("div",{className:"tw-flex tw-h-full tw-w-full tw-items-center tw-justify-center",children:(0,w.jsxs)("button",{onClick:()=>{N(s==null?void 0:s.originalSubscriptionId)},className:"tw-flex tw-h-8 tw-w-[88px] tw-flex-none tw-items-center tw-justify-between tw-rounded tw-border tw-border-gold-500 tw-px-3 tw-py-2 tw-text-xs tw-font-medium tw-text-gold-500",children:[(0,w.jsx)("span",{children:"Invoice"}),(0,w.jsx)("img",{className:"tw-inline-block tw-h-4 tw-w-4 tw-cursor-pointer",src:q("/pro/assets/images/invoice.svg"),alt:"invoice"})]})})]})]},`all-strategies-card-${A}`)})})]}):(0,w.jsxs)("div",{children:[(0,w.jsxs)("div",{className:`tw-flex tw-h-[90px] tw-w-full tw-rounded tw-bg-gradient-to-r tw-px-6 tw-py-4 ${e.
1isNetPnLPositive?"tw-from-pro-green-500/40 tw-to-pro-green-500/0":"tw-from-pro-red-500/40 tw-to-pro-red-500/0"}`,children:[(0,w.jsxs)("div",{className:"tw-flex tw-h-full tw-w-[240px] tw-flex-col tw-justify-between tw-font-medium",children:[(0,w.jsx)("p",{className:"tw-text-gray-500",children:"Net P & L"}),(0,w.jsxs)("p",{className:`tw-truncate tw-text-xl ${e.isNetPnLPositive?"tw-text-pro-green-500":"tw-text-pro-red-500"}`,children:[e==null?void 0:e.netPnL," ",(0,w.jsx)("span",{className:"tw-text-gray-700",children:"/"})," ",e==null?void 0:e.netPnLPercentage]})]}),(0,w.jsxs)("div",{className:"tw-flex tw-h-full tw-w-[170px] tw-flex-col tw-justify-between tw-font-medium",children:[(0,w.jsx)("p",{className:"tw-text-gray-500",children:"Net Invested Value"}),(0,w.jsx)("p",{className:"tw-truncate  tw-text-xl tw-text-gray-400",children:e==null?void 0:e.netInvestedValue})]}),(0,w.jsxs)("div",{className:"tw-flex tw-h-full tw-w-[170px] tw-flex-col tw-justify-between tw-font-medium",children:[(0,w.jsx)("p",{className:"tw-text-gray-500",children:"Net Final Value"}),(0,w.jsx)("p",{className:"tw-truncate tw-text-xl tw-text-gray-400",children:e==null?void 0:e.netCurrentValue})]})]}),(0,w.jsx)("div",{className:"tw-mt-10 tw-flex tw-w-full tw-flex-col tw-gap-y-4",children:m==null?void 0:m.map((s,A)=>{var u,E,f,D,y;return(0,w.jsx)("div",{className:"tw-rounded tw-bg-black-01",children:(0,w.jsxs)("div",{className:"tw-flex tw-min-h-[84px] tw-w-full tw-gap-x-4 tw-px-6 tw-py-4 tw-font-medium *:tw-flex *:tw-flex-col *:tw-justify-between",children:[(0,w.jsx)("div",{className:"tw-mr-[14px] tw-w-[310px]",children:(0,w.jsxs)("div",{className:"tw-flex tw-h-full tw-w-full tw-items-center tw-gap-x-4",children:[(0,w.jsx)("div",{className:"tw-h-10 tw-w-10 tw-flex-none tw-rounded-full",children:s!=null&&s.botLogo?(0,w.jsx)("img",{className:"tw-w-full",src:s==null?void 0:s.botLogo,alt:""}):(0,w.jsx)(b,{width:"tw-w-full",height:"tw-h-full",name:"profile-gold-icon"})}),(0,w.jsxs)("div",{className:"tw-flex tw-h-full tw-max-w-[70%] tw-flex-col tw-justify-between",children:[(0,w.jsxs)("div",{className:"tw-flex tw-w-[250px] tw-gap-x-1",children:[(0,w.jsx)("p",{className:"tw-text-xl tw-font-medium tw-text-[#F4F4F6]",children:s.botName}),(0,w.jsx)("div",{className:"tw-mt-2",children:(0,w.jsx)(lt,{children:(0,w.jsxs)("div",{className:"tw-flex tw-w-full tw-flex-col tw-gap-y-3 tw-p-4 tw-text-sm tw-font-medium tw-text-gray-500",children:[(0,w.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,w.jsx)("p",{children:"Strategy"}),(0,w.jsx)("p",{className:"tw-text-gray-400",children:s.botName})]}),(0,w.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,w.jsx)("p",{children:"Creator"}),(0,w.jsx)("p",{className:"tw-text-gray-400",children:(u=s==null?void 0:s.details)==null?void 0:u.botCreator})]}),(0,w.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,w.jsx)("p",{children:"Historical Profit"}),(0,w.jsx)("p",{className:"tw-text-pro-green-500",children:(E=s==null?void 0:s.details)==null?void 0:E.historicalProfit})]}),(0,w.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,w.jsx)("p",{children:"Min. Deposit"}),(0,w.jsx)("p",{className:"tw-text-gray-400",children:(f=s==null?void 0:s.details)==null?void 0:f.minDeposit})]}),(0,w.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,w.jsx)("p",{children:"Profit Sharing"}),(0,w.jsx)("p",{className:"tw-text-gray-400",children:(D=s==null?void 0:s.details)==null?void 0:D.profitSharing})]}),(0,w.jsxs)("div",{className:"tw-flex tw-items-center tw-justify-between",children:[(0,w.jsx)("p",{children:"Net Traded Vol."}),(0,w.jsx)("p",{className:"tw-text-gray-400",children:(y=s==null?void 0:s.details)==null?void 0:y.netTradedVol})]})]})})})]}),(0,w.jsxs)("div",{className:"tw-mt-2 tw-flex tw-items-center",children:[(0,w.jsxs)("p",{className:"tw-whitespace-nowrap tw-text-sm tw-text-gray-700",children:["ID: ",s.subscriptionId]}),(0,w.jsxs)("div",{className:"tw-ml-4 tw-flex tw-w-fit tw-items-center tw-gap-x-1 tw-rounded-full tw-bg-pro-black-200 tw-px-2 tw-py-1 tw-text-sm tw-text-gray-500",children:[(0,w.jsx)("p",{children:s!=null&&s.isSettled?"Completed":"Processing"}),s!=null&&s.isSettled?(0,w.jsx)(b,{width:"tw-w-4",height:"tw-h-4",name:"gray-tick"}):(0,w.jsx)(lt,{children:(0,w.jsx)("div",{className:"tw-p-4 tw-text-sm tw-font-medium tw-text-gray-500",children:"Your strategy has been ended by the creator. It will take up to 24 hours to credit the P&L. All the current data are estimated values"})})]})]})]})]})}),(0,w.jsxs)("div",{className:"tw-w-[192px]",children:[(0,w.jsxs)("p",{className:`tw-truncate tw-font-medium ${s!=null&&s.isPnlPositive?"tw-text-pro-green-500":"tw-text-pro-red-500"}`,children:[s.pnL," ",(0,w.jsx)("span",{className:"tw-text-gray-700",children:"/"})," ",s==null?void 0:s.pnlPercentage]}),(0,w.jsx)("p",{className:"tw-text-sm tw-text-gray-700",children:"P & L (Excl. Fee)"})]}),(0,w.jsxs)("div",{className:"tw-w-[108px]",children:[(0,w.jsxs)("p",{className:"tw-text-gray-500",children:[" ",s.investedValue]}),(0,w.jsx)("p",{className:"tw-text-sm tw-text-gray-700",children:"Invested Value"})]}),(0,w.jsxs)("div",{className:"tw-w-[108px]",children:[(0,w.jsxs)("p",{className:"tw-text-gray-500",children:[" ",s.unUsedValue]}),(0,w.jsxs)("div",{className:"tw-flex tw-items-center tw-gap-x-1",children:[(0,w.jsx)("p",{className:"tw-text-sm tw-text-gray-700",children:"Unused Bal."}),(0,w.jsx)(lt,{variant:"gray",children:(0,w.jsx)("div",{className:"tw-p-4 tw-text-sm tw-font-medium tw-text-gray-500",children:Yt(s==null?void 0:s.isSettled)})})]})]}),(0,w.jsxs)("div",{className:"tw-w-[108px]",children:[(0,w.jsx)("p",{className:"tw-text-gray-500",children:s.tdsPaid}),(0,w.jsx)("p",{className:"tw-text-sm tw-text-gray-700",children:"TDS Paid"})]}),(0,w.jsxs)("div",{className:"tw-w-[108px]",children:[(0,w.jsx)("p",{className:"tw-text-gray-500",children:s.estCreatorFee}),(0,w.jsx)("p",{className:"tw-text-sm tw-text-gray-700",children:"Est. Creator Fee"})]}),(s==null?void 0:s.isInvoiced)&&(0,w.jsx)("div",{onClick:()=>{N(s==null?void 0:s.originalSubscriptionId)},className:"tw-w-[18px] tw-flex-none tw-items-center tw-justify-center",children:(0,w.jsxs)("div",{className:"tw-group tw-relative tw-h-fit tw-w-fit",children:[(0,w.jsx)("img",{className:"tw-inline-block tw-h-[18px] tw-w-[18px] tw-cursor-pointer",src:q("/pro/assets/images/invoice.svg"),alt:"invoice"}),(0,w.jsx)("div",{className:"tw-absolute -tw-right-4 tw-top-2.5 tw-hidden  tw-h-fit tw-w-fit tw-translate-y-full tw-text-nowrap tw-rounded-md tw-bg-black-02 tw-px-2 tw-text-xxs tw-text-gray-500 group-hover:tw-block",children:"Download Invoice"})]})})]})},`all-strategies-card-${A}`)})})]}):(0,w.jsxs)("div",{children:[(0,w.jsx)(gt,{}),(0,w.jsx)("div",{onClick:()=>{},className:"tw-flex tw-w-full tw-items-center tw-justify-center",children:(0,w.jsx)("button",{onClick:()=>{c("strategies")},className:"tw-flex tw-h-9 tw-w-[300px] tw-items-center tw-justify-center tw-rounded tw-border tw-border-highligh-gray tw-text-xs tw-font-medium tw-text-gold-500",children:"Explore All Strategies"})})]})}xs();rt();ct();Te();ds();ls();ps();Tt();rt();var ot=S(R());function Ts({closePopup:n}){return(0,ot.jsxs)("div",{className:"tw-h-full tw-w-full tw-p-4",children:[(0,ot.jsxs)("div",{className:"tw-flex  tw-w-full tw-items-center tw-justify-between",children:[(0,ot.jsx)("p",{className:"tw-text-lg tw-font-semibold tw-text-gray-200",children:"How SmartInvest Works"}),(0,ot.jsx)("div",{className:"tw-h-fit tw-w-fit tw-cursor-pointer",onClick:n,children:(0,ot.jsx)(b,{width:"tw-w-5",height:"tw-h-5",name:"cross-gray"})})]}),(0,ot.jsx)("div",{className:"tw-relative tw-mt-4 tw-flex tw-h-0 tw-w-full tw-items-center tw-justify-center tw-pb-[56.25%] tw-text-gray-300",children:(0,ot.jsx)("iframe",{className:"tw-absolute tw-left-0 tw-top-0 tw-h-full tw-w-full",src:"https://www.youtube.com/embed/epvrx27e9h0?si=aRjGZGHB0UsNNSRA",title:"Algo trading",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture;",allowFullScreen:!0})})]})}var as=Ts;ut();fs();At();var mt=S(tt());rt();ut();ct();ms();Tt();var k=S(R()),is=()=>{var x;let[n,p]=(0,mt.useState)(!1),[T,c]=(0,mt.useState)(!1);return(0,k.jsxs)("div",{className:"tw-mt-0.5 tw-flex tw-w-full tw-items-center tw-justify-between",children:[(0,k.jsx)(Se,{id:"filterTooltip",isOpenControlled:T,setIsOpenControlled:c,placement:"right",WrapperContentClass:"tw-bg-black tw-border-pro-gray-200",arrowColor:"#2d3443",content:(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("p",{children:"Moderate Risk: Offers controlled exposure to market movements, aiming for stable returns with some risk of losses."}),(0,k.jsx)("span",{className:"tw-ml-1 tw-cursor-pointer tw-text-gold-500 tw-u
1nderline",onClick:()=>{p(!0),c(!1)},children:"Read More"})]}),children:(0,k.jsx)(b,{width:"tw-w-5",height:"tw-h-5",name:"exclamation-gray"})}),(0,k.jsxs)(Y,{isOpen:n,onOpenChange:p,children:[(0,k.jsx)(Y.Overlay,{className:"tw-bg-pro-black-200 tw-opacity-60"}),(0,k.jsx)("div",{className:"tw-fixed tw-inset-0 tw-flex tw-items-center tw-justify-center",children:(0,k.jsxs)("div",{className:"tw-min-h-[300px] tw-w-[360px] tw-rounded-2xl tw-border tw-border-pro-gray-200 tw-bg-[#121319] tw-p-4 tw-text-gray-200",children:[(0,k.jsxs)("div",{className:"tw-mb-4 tw-flex tw-w-full tw-justify-between tw-text-base",children:[(0,k.jsx)("span",{id:"modal-title",children:"Read more for Risk Impact on Strategies:"}),(0,k.jsx)("div",{onClick:()=>p(!1),children:(0,k.jsx)(b,{name:"cross-gray",width:"tw-w-5",height:"tw-h-5"})})]}),(0,k.jsx)("div",{className:"tw-space-y-4 tw-text-sm tw-font-normal tw-leading-[22px] tw-text-[#A0AEC0]",children:(x=$t)==null?void 0:x.map(({title:o,content:N},e)=>(0,k.jsx)("div",{className:"tw-flex tw-gap-x-2",children:(0,k.jsxs)("p",{children:[(0,k.jsx)("span",{className:"tw-font-semibold tw-text-[#C7D2E0]",children:o}),N]})},e))})]})})]})]})},rs=({tabs:n,handleTabClick:p,currentTab:T,classname:c})=>{var N;let[v,x]=(0,mt.useState)(0),o=(0,mt.useRef)(null);return(0,mt.useEffect)(()=>{if(o.current!==null){let e=o.current,m=e.children[v];if(m){let s=e.offsetWidth,A=m.offsetLeft,u=m.offsetWidth,E=A-(s-u)/2;e.scrollTo({left:E,behavior:"smooth"})}}},[v]),(0,k.jsx)("div",{className:"tw-relative",children:(0,k.jsxs)("div",{ref:o,className:"tw-flex tw-items-center tw-gap-4 tw-overflow-x-auto tw-scrollbar-hide",children:[n.map((e,m)=>(0,k.jsxs)("div",{onClick:()=>{L(U.SmartInvestStrategyClicked,{tab:e.title}),x(m),p(e.id)},className:Ne("tw-flex tw-h-[28px] tw-cursor-pointer tw-items-center tw-justify-center tw-rounded-t-lg tw-border tw-border-[#494B57] tw-bg-inherit tw-px-3 tw-py-1 tw-text-xs tw-font-medium tw-text-gray-400",c,{"tw-cursor-default tw-border tw-border-gold-500 tw-bg-gold-500 tw-text-black-01":T===e.id}),children:["img"in e&&e.img?(0,k.jsx)("img",{src:e.img,alt:e.img,className:"tw-mr-2 tw-h-5 tw-w-5"}):null,(0,k.jsx)("p",{className:"tw-text-xs tw-font-medium",children:e==null?void 0:e.title})]},e==null?void 0:e.id)),(0,k.jsx)("div",{className:"tw-pr-4",children:(0,k.jsx)(nt,{variant:"gray",title:"Risk  Impact on Strategies :",classname:"tw-w-5 tw-h-5",children:(0,k.jsx)("div",{className:"tw-pb-4",children:(N=$t)==null?void 0:N.map(({title:e,content:m},s)=>(0,k.jsx)("div",{className:"tw-flex tw-gap-x-2",children:(0,k.jsxs)("p",{className:"tw-space-y-4 tw-px-4 tw-pt-3 tw-text-sm tw-font-normal tw-leading-[22px] tw-text-gray-400",children:[(0,k.jsx)("span",{className:"tw-font-semibold tw-text-[#C7D2E0]",children:e}),m]})},s))})})})]})})};var i=S(R()),As={page_info:ft.algo_trading},Ss=()=>[{rel:"canonical",href:"https://coinswitch.co/pro/smart-invest"}],Ps=()=>[{title:"Algo Trading | Crypto Algo Trading in India | CoinSwitch Pro"},{name:"description",content:"Crypto Algo Trading Platform \xB7 Want to start Crypto Trading with Zero Knowledge? CoinSwitch Pro provides you with an algorithm-backed Trading. Sign Up Today!"},{name:"robots",content:"index"}];function Cs(){var le,me,pe,ce,de,xe,fe,ue,ge;let n=it(),{is_mobile:p}=n,T=yt(Ae),c=yt(Lt),[v,x]=(0,I.useState)(null),[o,N]=(0,I.useState)(Ye),[e,m]=(0,I.useState)([]),[s,A]=(0,I.useState)(!1),[u,E]=(0,I.useState)({}),[f,D]=(0,I.useState)(!1),[y,O]=(0,I.useState)(!0),[C,B]=(0,I.useState)("ALL"),j=(0,I.useMemo)(()=>{var d;let l=(d=ke(T,"algo_creator_page"))!=null?d:{};return!!(l!=null&&l.is_test_user)},[T]),V=(0,I.useCallback)((l,d)=>{N(P=>{var G;return{...P,[l]:{...P[l],tab_data:Array.isArray(d)?d:Array.isArray(d==null?void 0:d.data)?d==null?void 0:d.data:[],aggregated_data:(G=d==null?void 0:d.net_values)!=null?G:{},is_loading:!1,is_error:!1}}})},[]),g=(0,I.useCallback)(l=>{N(d=>{var P,G;return((G=(P=d[l])==null?void 0:P.tab_data)==null?void 0:G.length)>0?d:{...d,[l]:{...d[l],tab_data:[],aggregated_data:{},is_loading:!1,is_error:!0}}})},[]),Z=(0,I.useCallback)(async()=>{var l;try{let{data:d,success:P,msg:G}=await ye();if(!P)throw new Error(G);if(!Array.isArray(d)||d.length===0)throw new Error("Error with Data");let H=pt=>pt.currency==="inr",J=(l=d==null?void 0:d.filter(H))==null?void 0:l[0];E(J)}catch(d){console.log(d)}},[]),K=(0,I.useCallback)(async l=>{try{let d;switch(l){case"strategies":d=j?Re:Oe;break;case"active":d=De;break;case"Completed":d=Fe;break;default:return}let{success:P,data:G,msg:H}=await d();if(P)V(l,G);else throw new Error(H)}catch{g(l)}},[V,g,j]),r=(0,I.useCallback)(async()=>{try{let{success:l,data:d,msg:P}=await Le();if(!l)throw new Error(P);Array.isArray(d)?m(d):m([])}catch{m([])}},[]),M=(0,I.useCallback)(async()=>{try{let{success:l,data:d,msg:P}=await Me();if(!l)throw new Error(P);A(!!d)}catch{A(!1)}},[]),et=(0,I.useCallback)(async(l=()=>{})=>{var d;try{let{success:P,data:G,msg:H}=await Ve();if(!P||!G)throw new Error(H);A(!0),l()}catch(P){ht(bt({type:"failure",header:"Something Went Wrong",content:(d=P==null?void 0:P.message)!=null?d:"Please Try Again"}))}},[]),Nt=(0,I.useCallback)(async(l,d,P,G=()=>{})=>{var H;try{let{success:J,data:pt,msg:os}=await je({strategy_id:l,amount:d,market_type:P});if(!J||!pt)throw new Error(os);K("active"),K("strategies"),Z(),G()}catch(J){ht(bt({type:"failure",header:"Something Went Wrong",content:(H=J==null?void 0:J.message)!=null?H:"Please Try Again"}))}},[Z,K]),ae=(0,I.useCallback)(async l=>{try{let{success:d,data:P,msg:G}=await Ge(l);
1if(!d||!P)throw new Error(G);let H=P==null?void 0:P.link;if(H&&H!=="invoice_creation_pending"){if(/iPad|iPhone|iPod/.test(navigator.userAgent))window.open(H,"_blank");else{let pt=document.createElement("a");pt.href=H,pt.download="invoice.pdf",pt.dispatchEvent(new MouseEvent("click"))}ht(bt({type:"success",header:"Invoice downloaded successfully!",content:"Your Invoice has been successfully downloaded"}))}else throw new Error("Invoice creation pending")}catch(d){ht(bt({type:"failure",header:"Invoice download failed.",content:(d==null?void 0:d.message)||"Please try again later"}))}},[]),dt=(0,I.useMemo)(()=>(c!=null&&c.is_logged_in?["strategies","active","Completed"]:["strategies"]).map(P=>{var G,H,J;return{...We[P],key:P,count:P!=="strategies"&&!y?(J=(H=(G=o[P])==null?void 0:G.tab_data)==null?void 0:H.length)!=null?J:0:""}}),[o,c==null?void 0:c.is_logged_in,y]),at=(0,I.useMemo)(()=>Qe(e),[e]),ie=(0,I.useMemo)(()=>{let l=Ze(C,$e(o.strategies.tab_data));return l&&l.sort((d,P)=>d.slotsLeft<=0&&P.slotsLeft>0?1:d.slotsLeft>0&&P.slotsLeft<=0?-1:Vt(P.historicalProfit)-Vt(d.historicalProfit)),l},[o.strategies.tab_data,C]),re=(0,I.useMemo)(()=>{let l=Ke(o.active.tab_data),d=qe(o.active.aggregated_data);return{tab_data:l,aggregated_data:d}},[o.active.aggregated_data,o.active.tab_data]),oe=(0,I.useMemo)(()=>{let l=ze(o.Completed.tab_data),d=Xe(o.Completed.aggregated_data);return{tab_data:l,aggregated_data:d}},[o.Completed.aggregated_data,o.Completed.tab_data]),ne=(0,I.useMemo)(()=>c!=null&&c.is_logged_in?o.active.tab_data.length>0?"active":"strategies":"strategies",[c==null?void 0:c.is_logged_in,o.active.tab_data.length]);return(0,I.useEffect)(()=>{(async()=>{O(!0),x(null),c!=null&&c.is_logged_in?await Promise.all([K("active"),K("Completed"),M(),Z()]):(x("strategies"),V("active",[]),V("Completed",[])),O(!1)})()},[c==null?void 0:c.is_logged_in,K,M,Z,V]),(0,I.useEffect)(()=>{y||(x(ne),B("ALL"))},[y,ne]),(0,I.useEffect)(()=>{v!==null&&K(v)},[v]),(0,I.useEffect)(()=>{r()},[r,K]),(0,I.useEffect)(()=>{L(U.SmartInvestUserPageLoaded)},[]),(0,i.jsxs)("div",{children:[(0,i.jsxs)(Y,{isOpen:f,onOpenChange:()=>{D(!1)},children:[(0,i.jsx)(Y.Overlay,{className:"tw-bg-black-02 tw-opacity-80"}),(0,i.jsx)(Y.Content,{className:"tw-border tw-border-pro-gray-200 tw-bg-black-01 tw-p-0 max-lg:tw-mx-2 max-lg:tw-w-full",children:(0,i.jsx)("div",{className:"tw-h-[525px] tw-w-[832px] max-lg:tw-h-fit max-lg:tw-w-full",children:(0,i.jsx)(as,{closePopup:()=>{D(!1)}})})})]}),p?(0,i.jsxs)("div",{className:"tw-min-h-[calc(100vh-80px)]",children:[(0,i.jsx)("div",{id:"atu-hero-mweb",style:{background:"radial-gradient(52.22% 100% at 50% 100%, rgba(139, 116, 57, 0.04) 0%, rgba(139, 121, 57, 0.3) 0.01%, rgba(229, 154, 41, 0) 100%)"},className:"tw-h-fit tw-p-4",children:(0,i.jsxs)("div",{className:"tw-w-full",children:[(0,i.jsxs)("p",{className:"tw-mx-auto tw-mt-4 tw-w-fit tw-max-w-[300px] tw-text-center tw-text-xl tw-font-bold tw-text-gold-500",children:["Multiply your profits ",(0,i.jsx)("br",{})," the smart way"]}),(0,i.jsxs)("div",{className:"tw-mt-4 tw-flex tw-w-full tw-gap-x-3 tw-text-xxs tw-text-gray-400",children:[(0,i.jsxs)("div",{className:"tw-flex tw-w-1/3 tw-flex-col tw-items-center tw-gap-y-1",children:[(0,i.jsx)("div",{className:"tw-h-8 tw-w-8 tw-flex-none",children:(0,i.jsx)("img",{width:"100%",src:q("/pro/assets/images/algo-trading/atu-hero-one.png"),alt:""})}),(0,i.jsx)("p",{className:"tw-text-center tw-font-medium tw-text-gray-400",children:"Beginner-friendly, no prior experience required"})]}),(0,i.jsxs)("div",{className:"tw-flex tw-w-1/3 tw-flex-col tw-items-center tw-gap-y-1",children:[(0,i.jsx)("div",{className:"tw-h-8 tw-w-8 tw-flex-none",children:(0,i.jsx)("img",{width:"100%",src:q("/pro/assets/images/algo-trading/atu-hero-two.png"),alt:""})}),(0,i.jsx)("p",{className:"tw-text-center tw-font-medium tw-text-gray-400",children:"Choose from a wide range of strategies"})]}),(0,i.jsxs)("div",{className:"tw-flex tw-w-1/3 tw-flex-col tw-items-center tw-gap-y-1",children:[(0,i.jsx)("div",{className:"tw-h-8 tw-w-8 tw-flex-none",children:(0,i.jsx)("img",{width:"100%",src:q("/pro/assets/images/algo-trading/atu-hero-three.png"),alt:""})}),(0,i.jsx)("p",{className:"tw-text-center tw-font-medium tw-text-gray-400",children:"Earn bigger rewards in our trading leagues"})]})]}),(0,i.jsx)("div",{className:"tw-mt-6 tw-text-center",children:(0,i.jsx)("span",{onClick:()=>{L(U.SmartInvestUserHowItWorksClicked),D(!0)},className:"tw-w-fit tw-text-center tw-text-sm tw-font-medium tw-text-pro-gold-500 tw-u
1nderline",children:"See How it Works"})})]})}),(0,i.jsxs)("div",{id:"atu-strategies-mweb",className:"tw-min-h-[400px] tw-w-full",children:[(0,i.jsx)("div",{className:"tw-border-b tw-border-pro-black-200 tw-pb-3",children:c!=null&&c.is_logged_in?(0,i.jsx)("div",{className:"tw-flex tw-h-[40px] tw-w-full tw-items-center tw-overflow-x-auto tw-bg-pro-black-200",children:dt==null?void 0:dt.map(l=>(0,i.jsx)(Rt,{data:l,handleTabClick:()=>{L(U.SmartInvestUserTabClicked,{tab:l.key}),!y&&x(l.key)},is_selected:v===l.key},l.id))}):(0,i.jsx)("p",{className:"tw-ml-4 tw-mt-4 tw-text-xs tw-font-medium tw-text-gray-400",children:"Explore Strategies"})}),v==="strategies"?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"tw-ml-4 tw-mt-3",children:(0,i.jsx)(rs,{tabs:Wt,currentTab:C,handleTabClick:l=>B(l),classname:"tw-rounded-full tw-w-auto tw-px-6 tw-whitespace-nowrap tw-bg-[#1B1E2D] tw-text-[#DCDCDD]"})}),(0,i.jsx)(se,{strategy_data:ie,user_consent:s,wallet_balance:(xe=u==null?void 0:u.main_balance)!=null?xe:0,is_data_loading:(fe=o==null?void 0:o.strategies)==null?void 0:fe.is_loading,setSelectedTab:x,handleUpdateUserConsent:et,handleSubscribeStrategy:Nt})]}):v==="active"?(0,i.jsx)(Xt,{data:re,is_data_loading:(ue=o==null?void 0:o.active)==null?void 0:ue.is_loading,setSelectedTab:x}):v==="Completed"?(0,i.jsx)(we,{data:oe,is_data_loading:(ge=o==null?void 0:o.Completed)==null?void 0:ge.is_loading,setSelectedTab:x,handleDownloadInvoice:ae}):null]}),(0,i.jsxs)("div",{id:"atu-creator-mweb",className:"tw-w-full tw-p-4",children:[(0,i.jsx)("p",{className:"tw-text-sm tw-font-medium tw-text-gray-400",children:"Meet our Strategy Architects"}),(0,i.jsx)("div",{className:"no-scrollbar tw-mt-4 tw-flex tw-h-fit tw-w-full tw-items-stretch tw-gap-x-5 tw-overflow-x-auto tw-overflow-y-hidden",children:at==null?void 0:at.map((l,d)=>(0,i.jsxs)("div",{className:`tw-w-[200px] tw-flex-none tw-pr-3 ${d!==(at==null?void 0:at.length)-1?"tw-border-r tw-border-pro-black-200":""}`,children:[(0,i.jsxs)("div",{className:"tw-flex tw-w-full tw-items-center tw-gap-x-3",children:[(0,i.jsx)("div",{className:"tw-h-10 tw-w-10 tw-flex-none tw-rounded-full",children:l!=null&&l.logo?(0,i.jsx)("img",{className:"tw-w-full",src:l==null?void 0:l.logo,alt:""}):(0,i.jsx)(b,{width:"tw-w-full",height:"tw-h-full",name:"profile-gold-icon"})}),(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:"tw-flex tw-gap-x-2 tw-text-xs",children:(0,i.jsx)("p",{className:"tw-w-[80%] tw-truncate tw-font-medium tw-text-gray-300",children:l.name})}),(0,i.jsxs)("div",{className:"tw-mt-0.5 tw-flex tw-items-center tw-gap-x-2 tw-text-xxs tw-font-medium",children:[(0,i.jsx)("p",{className:"tw-text-gray-700",children:l.tag}),(0,i.jsxs)("div",{className:"tw-flex tw-items-center tw-gap-x-0.5",children:[(0,i.jsx)("p",{className:"tw-text-gray-500",children:l==null?void 0:l.rating})," ",(0,i.jsx)(b,{name:"gold-star",width:"tw-w-2.5",height:"tw-h-2.5"})]})]})]})]}),(0,i.jsx)("p",{className:"no-scrollbar tw-mt-2 tw-max-h-[200px] tw-overflow-y-auto tw-text-justify tw-text-xxs tw-text-gray-600",children:l.info})]},l.id))})]}),(0,i.jsxs)("div",{id:"atu-faq-mweb",className:"tw-w-full tw-bg-black tw-px-6 tw-py-6",children:[(0,i.jsx)("p",{className:"tw-mb-4 tw-text-xl tw-font-medium tw-text-gray-400",children:"Frequently asked questions"}),(0,i.jsx)(Mt,{className:"",items:Ht})]})]}):(0,i.jsxs)("div",{className:"tw-min-h-[calc(100vh-60px)] tw-w-full",children:[(0,i.jsx)("div",{id:"atu-hero",style:{background:"radial-gradient(52.22% 100% at 50% 100%, rgba(139, 116, 57, 0.04) 0%, rgba(139, 121, 57, 0.3) 0.01%, rgba(229, 154, 41, 0) 100%)"},className:"tw-h-[330px] tw-w-full tw-font-nexa",children:(0,i.jsxs)("div",{className:"tw-mx-auto tw-flex tw-w-[1120px] tw-pt-10",children:[(0,i.jsxs)("div",{className:"tw-w-[650px]",children:[(0,i.jsx)("p",{className:"tw-text-5xl tw-font-extrabold",children:"SmartInvest"}),(0,i.jsx)("p",{className:"tw-mt-4 tw-w-fit tw-text-3xl tw-font-bold tw-text-gold-500",children:"Multiply your profits the smart way"}),(0,i.jsx)("button",{onClick:()=>{L(U.SmartInvestUserHowItWorksClicked),D(!0)},className:"tw-mt-10 tw-flex tw-h-11 tw-w-[204px] tw-items-center tw-justify-center tw-rounded tw-border tw-border-gold-500 tw-uppercase tw-text-gold-500",children:"how it works"})]}),(0,i.jsxs)("div",{className:"tw-flex tw-w-[350px] tw-flex-col tw-gap-y-5",children:[(0,i.jsxs)("div",{className:"tw-flex tw-items-center tw-gap-x-3",children:[(0,i.jsx)("div",{className:"tw-h-12 tw-w-12 tw-flex-none",children:(0,i.jsx)("img",{width:"100%",src:q("/pro/assets/images/algo-trading/atu-hero-one.png"),alt:""})}),(0,i.jsx)("p",{className:"tw-font-medium tw-text-gray-400",children:"Beginner-friendly, no prior experience required"})]}),(0,i.jsxs)("div",{className:"tw-flex tw-items-center tw-gap-x-3",children:[(0,i.jsx)("div",{className:"tw-h-12 tw-w-12 tw-flex-none",children:(0,i.jsx)("img",{width:"100%",src:q("/pro/assets/images/algo-trading/atu-hero-two.png"),alt:""})}),(0,i.jsx)("p",{className:"tw-font-medium tw-text-gray-400",children:"Choose from a wide range of strategies"})]}),(0,i.jsxs)("div",{className:"tw-flex tw-items-center tw-gap-x-3",children:[(0,i.jsx)("div",{className:"tw-h-12 tw-w-12 tw-flex-none",children:(0,i.jsx)("img",{width:"100%",src:q("/pro/assets/images/algo-trading/atu-hero-three.png"),alt:""})}),(0,i.jsx)("p",{className:"tw-font-medium tw-text-gray-400",children:"Earn bigger rewards in our trading leagues"})]})]})]})}),(0,i.jsx)("div",{id:"atu-strategies",className:"no-scrollbar tw-w-full tw-overflow-x-auto tw-px-2 tw-pb-12 tw-pt-16",children:(0,i.jsxs)("div",{className:"tw-mx-auto tw-min-h-[576px] tw-w-[1120px]",children:[(0,i.jsxs)("div",{className:"tw-flex tw-h-12 tw-w-full tw-items-center",children:[dt==null?void 0:dt.map(l=>(0,i.jsx)(Rt,{data:l,handleTabClick:()=>{L(U.SmartInvestUserTabClicked,{tab:l.key}),!y&&x(l.key)},is_selected:v===l.key},l.id)),(0,i.jsx)("div",{className:"tw-h-full tw-flex-1 tw-border-b-2 tw-border-pro-black-200"})]}),(0,i.jsx)("div",{className:"tw-mt-10 tw-w-full",children:v==="strategies"?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"tw-mb-10 tw-flex tw-w-full tw-items-center tw-gap-5",children:[(0,i.jsx)("div",{className:"tw-flex tw-h-12 tw-items-center tw-gap-x-5",children:(le=Wt)==null?void 0:le.map(l=>(0,i.jsx)(Rt,{data:l,handleTabClick:()=>{L(U.SmartInvestStrategyClicked,{tab:l.title}),!y&&B(l.id)},is_selected:C===l.id,classname:"tw-rounded-full tw-w-auto tw-px-6 tw-border tw-whitespace-nowrap"},l.id))}),(0,i.jsx)(is,{})]}),(0,i.jsx)(se,{strategy_data:ie,user_consent:s,wallet_balance:(me=Number(u==null?void 0:u.main_balance))!=null?me:0,is_data_loading:(pe=o==null?void 0:o.strategies)==null?void 0:pe.is_loading,setSelectedTab:
1x,handleUpdateUserConsent:et,handleSubscribeStrategy:Nt})]}):v==="active"?(0,i.jsx)(Xt,{data:re,is_data_loading:(ce=o==null?void 0:o.active)==null?void 0:ce.is_loading,setSelectedTab:x}):v==="Completed"?(0,i.jsx)(we,{data:oe,is_data_loading:(de=o==null?void 0:o.Completed)==null?void 0:de.is_loading,setSelectedTab:x,handleDownloadInvoice:ae}):null})]})}),(0,i.jsx)("div",{id:"atu-creator",className:"tw-w-full tw-bg-black-01 tw-py-12",children:(0,i.jsxs)("div",{className:"tw-mx-auto tw-w-[1120px]",children:[(0,i.jsx)("p",{className:"tw-text-3xl tw-font-medium tw-text-white",children:"Meet our Strategy Architects"}),(0,i.jsx)("div",{className:"tw-mt-10 tw-grid tw-grid-cols-3 tw-gap-x-9 tw-gap-y-[70px]",children:at==null?void 0:at.map(l=>(0,i.jsxs)("div",{className:"tw-h-[240px]",children:[(0,i.jsxs)("div",{className:"tw-flex tw-items-center tw-gap-x-5",children:[(0,i.jsx)("div",{className:"tw-h-16 tw-w-16 tw-flex-none tw-rounded-full",children:l!=null&&l.logo?(0,i.jsx)("img",{className:"tw-w-full",src:l==null?void 0:l.logo,alt:""}):(0,i.jsx)(b,{width:"tw-w-full",height:"tw-h-full",name:"profile-gold-icon"})}),(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:"tw-flex tw-gap-x-2",children:[(0,i.jsx)("p",{className:"tw-max-w-[140px] tw-truncate tw-font-medium tw-text-gray-300",children:l.name}),(0,i.jsx)("p",{className:"tw-text-gray-700",children:l.tag})]}),(0,i.jsxs)("div",{className:"tw-mt-2 tw-flex tw-gap-x-5 tw-font-medium",children:[(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:"tw-flex tw-items-center tw-gap-x-0.5",children:[(0,i.jsx)("p",{className:"tw-text-sm tw-text-gray-500",children:l==null?void 0:l.rating}),(0,i.jsx)(b,{name:"gold-star",width:"tw-w-3",height:"tw-h-3"})]}),(0,i.jsx)("p",{className:"tw-text-xs tw-text-gray-700",children:"Rated"})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("p",{className:"tw-text-sm tw-text-gray-500",children:l==null?void 0:l.totalTradedVolume}),(0,i.jsx)("p",{className:"tw-text-xs tw-text-gray-700",children:"Traded Vol."})]})]})]})]}),(0,i.jsx)("p",{className:"tw-mt-4 tw-text-justify tw-text-sm tw-text-gray-600",children:l.info})]},l.id))})]})}),(0,i.jsx)("div",{id:"atu-faq",className:"tw-w-full tw-bg-black-01 tw-py-12",children:(0,i.jsxs)("div",{className:"tw-mx-auto tw-w-[1120px]",children:[(0,i.jsx)("p",{className:"tw-mb-6 tw-text-3xl tw-font-medium tw-text-white",children:"FAQ"}),(0,i.jsx)(Mt,{className:"",items:Ht})]})})]})]})}var ks=Cs;export{ks as default,As as handle,Ss as links,Ps as meta};

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.