PageSourceSearch

https://aiw3.ai/_next/static/chunks/async-components-a3b03420-36892bbe3547e3d1.js

js aiw3.ai collected 2026-10-05 11:50:21 UTC 144,152 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[72086,903],{93172:function(e,s,t){var a=t(57437);t(2265);var l=t(38355);s.Z=()=>(0,a.jsx)("div",{className:"border-t border-black/10",children:(0,a.jsx)(l.Z,{hasMask:!0,type:"meme"})})},89584:function(e,s,t){t.r(s);var a=t(57437),l=t(34029),r=t(48651),n=t(53743),i=t(53982),c=t(2265),o=t(29116),d=t(41725),x=t(83983),m=t(61936),F=t(76390),p=t(69587),u=t(97871),h=t(38706),f=t(23659);s.default=e=>{var s,t,v,g,b,j,w,N,y,_,k,S,C,T;let{id:Z,tradeType:M,symbolInfo:P,isMinimized:D,isMaximized:B,onRestore:L,onDragStart:H,onMinimize:z,onMaximize:I}=e,{userInfo:O,isLogin:A,setShowLoginModal:E}=(0,m.a)(),{isMobile:K}=(0,i.Z)(),U=(0,h.T_)("meme.tradeList"),q=[{id:3,name:U("tabs.myTrades")},{id:1,name:U("tabs.transactions")},{id:4,name:U("tabs.holders")}],[$,R]=(0,c.useState)(1);U("dateAge.date"),U("dateAge.age");let[J,G]=(0,c.useState)(2),[W,Y]=(0,c.useState)(!1),[V,X]=(0,c.useState)(1),[Q,ee]=(0,c.useState)([]),[es,et]=(0,c.useState)(!1),[ea,el]=(0,c.useState)(!1),[er,en]=(0,c.useState)(!1),[ei,ec]=(0,c.useState)(1),[eo,ed]=(0,c.useState)(!1),[ex,em]=(0,c.useState)([]),[eF,ep]=(0,c.useState)(!1),[eu,eh]=(0,c.useState)(1),[ef,ev]=(0,c.useState)(!1),[eg,eb]=(0,c.useState)([]),[ej,ew]=(0,c.useState)({}),[eN,ey]=(0,c.useState)(0),e_=async()=>{et(!0);try{let e=(await o.ZP.get("/api/meme-contest/token-transactions/".concat(Z,"?page=").concat(V,"&size=20"))).data.data.transactions||[];Y(20===e.length),ee(s=>[...new Map([...s,...e||[]].map(e=>[null==e?void 0:e.id,e])).values()])}catch(e){console.error("error-======",e)}finally{et(!1)}};(0,c.useEffect)(()=>{X(1),ee([])},[M,Z]);let ek=async()=>{ev(!0);try{var e;let s=await o.ZP.get("/api/meme-contest/transactions?page=".concat(eu,"&page_size=10&token_address=").concat(Z)),t=(null===(e=s.data.data)||void 0===e?void 0:e.transactions)||[];console.log(t,"resultresult"),ep(10===t.length),eb(e=>[...new Map([...e,...t||[]].map(e=>[null==e?void 0:e.id,e])).values()])}catch(e){console.error("error-======",e)}finally{ev(!1)}},eS=async()=>{try{let n=await o.ZP.get("/api/meme-contest/account");if(200===n.data.code){var e,s,t,a,l,r;ey(null!==(r=null==n?void 0:null===(t=n.data)||void 0===t?void 0:null===(s=t.data.accountDetails)||void 0===s?void 0:null===(e=s.account)||void 0===e?void 0:e.available_balance)&&void 0!==r?r:0),ew((null==n?void 0:null===(l=n.data)||void 0===l?void 0:null===(a=l.data.accountDetails)||void 0===a?void 0:a.statistics)||{})}}catch(e){console.error("error-======",e)}finally{}};(0,c.useEffect)(()=>{3===$&&(ek(),eS())},[eu,$,Z]);let eC=async()=>{ed(!0);try{let e=(await o.ZP.get("/api/meme-contest/token-holders/".concat(Z,"?page=").concat(ei,"&page_size=50"))).data.data.holders||[];en(50===e.length),1===ei?em(e):em(s=>[...s,...e])}catch(e){console.error("error-======",e)}finally{ed(!1)}};return(0,c.useEffect)(()=>{if(4===$||1===$){e_();let e=setInterval(e_,1e4);return()=>{e&&clearInterval(e)}}},[V,$,Z]),(0,c.useEffect)(()=>{4===$?(ec(1),em([])):3===$&&(eh(1),ew({}),eb([]))},[Z]),(0,c.useEffect)(()=>{4===$&&eC()},[ei,$,Z]),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col  bg-[#FFFFFF]/5 h-full",children:[(0,a.jsxs)("div",{className:"flex gap-6 items-center w-[calc(100%-24px)] overflow-x-auto py-3 mx-3 border-b border-[#FFFFFF]/10",children:[q.map((e,s)=>(0,a.jsx)("div",{className:"whitespace-nowrap flex text-[14px] cursor-pointer relative rounded-[4px] h-[24px]  items-center justify-center\n                ".concat($===e.id?"font-semibold text-[#FFFFFF] after:absolute after:bottom-[-10px] after:bg-[#FFFFFF] after:left-0 after:h-1 after:w-full  after:rounded ":"text-[#FFFFFF]/40 "),onClick:()=>{if(!A&&3===e.id)return E(!0);[0,1,3,4].includes(e.id)?(R(e.id),3!==e.id&&(eh(1),ew({}),eb([])),1!==e.id&&(X(1),ee([]))):l.ZP.info(U("comingSoon"))},children:e.name},e.id)),(0,a.jsxs)("div",{className:"flex sm:justify-end items-center sm:flex-1 gap-2",children:[(0,a.jsx)("img",{src:"/image/meme/power.png",className:"w-[18px] h-[18px] cursor-pointer",onClick:()=>{el(!0)},alt:""}),(0,a.jsx)("button",{onClick:e=>{e.stopPropagation(),D||B?L():z()},className:"flex items-center justify-center w-4 h-4",children:D?(0,a.jsx)(F.Z,{className:" text-white"}):(0,a.jsx)("div",{className:"w-3 h-[1.5px] bg-white rounded-md"})}),(0,a.jsx)("button",{onClick:e=>{e.stopPropagation(),B?L():I()},className:"flex items-center justify-center w-4 h-4",children:B?(0,a.jsx)(p.Z,{className:" text-white"}):(0,a.jsx)(u.Z,{className:" text-white"})})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 ",children:[1===$&&(0,a.jsxs)("div",{className:"w-full overflow-x-auto p-3",children:[(0,a.jsxs)("div",{className:"flex   gap-[20px] justify-between items-center",children:[(0,a.jsx)("div",{className:"text-[10px] sm: flex items-center w-[100px] min-w-[100px] sm:flex-1 text-[#FFFFFF]/40",children:U("transactionHeaders.age")}),(0,a.jsxs)("div",{className:"flex items-center  gap-1 w-[100px] min-w-[100px] sm:flex-1",children:[(0,a.jsx)("span",{className:"text-[10px] sm:text-[12px] text-[#FFFFFF]/40",children:U("transactionHeaders.type")}),(0,a.jsx)("img",{src:"/image/meme/trade_filter.svg",className:"w-[12px] h-[12px]",alt:""})]}),(0,a.jsxs)("div",{className:"flex items-center  gap-1 w-[100px] min-w-[100px] sm:flex-1",children:[(0,a.jsx)("span",{className:"text-[10px] sm:text-[12px] text-[#FFFFFF]/40",children:U("transactionHeaders.totalUsd")}),(0,a.jsx)("img",{src:"/image/meme/trade_filter.svg",className:"w-[12px] h-[12px]",alt:""})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 w-[100px] min-w-[100px] sm:flex-1",children:[(0,a.jsx)("span",{className:"text-[10px] sm:text-[12px] text-[#FFFFFF]/40",children:U("transactionHeaders.amount")}),(0,a.jsx)("img",{src:"/image/meme/trade_filter.svg",className:"w-[12px] h-[12px]",alt:""})]}),(0,a.jsx)("div",{className:"flex items-center gap-1 w-[100px] min-w-[100px] sm:flex-1",children:(0,a.jsx)("span",{className:"text-[10px] sm:text-[12px] text-[#FFFFFF]/40",children:U("transactionHeaders.price")})})]}),(0,a.jsx)("div",{className:"flex flex-col w-fit sm:w-auto",children:Q.length>0?(0,a.jsx)("div",{className:"h-[600px] sm:h-[35vh] overflow-y-auto mt-4",id:"scrollablemp2",children:(0,a.jsx)(x.Z,{dataLength:(null==Q?void 0:Q.length)||0,next:()=>{W&&X(V+1)},hasMore:W,loader:W&&(0,a.jsx)("div",{className:"flex justify-center items-center mt-4  bgblack-spin",children:(0,a.jsx)(r.Z,{size:"large"})}),scrollableTarget:"scrollablemp2",children:(0,a.jsx)("div",{children:Q.map((e,s)=>{var t;return(0,a.jsxs)("div",{className:"flex justify-between items-center py-[16px] gap-[20px]",children:[(0,a.jsx)("span",{className:"flex items-center text-[14px] text-[#FFFFFF]/90 w-[100px] min-w-[100px] sm:flex-1",children:(0,d.tK)(e.created_at)}),(0,a.jsx)("span",{className:"flex items-center text-[14px] w-[100px] min-w-[100px] sm:flex-1  ".concat("sell"===e.side?"text-[#FF4D4F]":"text-[#11B382]/90"),children:e.side}),(0,a.jsxs)("span",{className:"flex items-center text-[14px] w-[100px] min-w-[100px] sm:flex-1 text-[#FFFFFF]/90",children:[(0,d.uf)(null!==(t=e.total_amount)&&void 0!==t?t:0)," USDT"]}),(0,a.jsx)("span",{className:"flex  sm:flex-1 items-center w-[100px] min-w-[100px]  gap-1 text-[14px] text-[#FFFFFF]/90",children:(0,d.uf)(e.quantity)}),(0,a.jsxs)("div",{className:"flex sm:flex-1 items-center w-[100px] min-w-[100px] gap-1 text-[14px] text-[#FFFFFF]/90",children:[(0,d.uf)(e.price)," USDT"]})]},s)})})})}):!es&&(0,a.jsx)("div",{className:"flex items-center h-full mt-6",children:(0,a.jsx)(f.Z,{isDarkMode:!0})})})]}),3===$&&(0,a.jsxs)("div",{className:"w-full overflow-x-auto h-full p-3",children:[K?(0,a.jsxs)("div",{className:"bg-[#FFFFFF]/5 rounded-[8px] p-3  mb-4 w-full",children:[(0,a.jsxs)("div",{className:"flex flex-col mb-10 ",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center w-full text-[10px]",children:[(0,a.jsx)("div",{className:"flex items-center flex-1 min-w-[120px] text-[#FFFFFF]/40 whitespace-nowrap",children:U("myTradesHeaders.balanceUsdt")}),(0,a.jsx)("div",{className:"flex items-center flex-1 min-w-[120px] text-[#FFFFFF]/40 whitespace-nowrap",children:U("myTradesHeaders.unrealizedProfits")}),(0,a.jsx)("div",{className:"flex items-center w-[80px] min-w-[80px] text-[#FFFFFF]/40 whitespace-nowrap",children:U("myTradesHeaders.realizedProfit")})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center w-full  text-[#FFFFFF]/90 font-semibold text-[12px] mt-3",children:[(0,a.jsxs)("span",{className:"flex items-center flex-1 min-w-[120px] cursor-pointer hover:opacity-80",children:[(0,d.uf)(null!=eN?eN:0),"USDT"]}
1),(0,a.jsxs)("span",{className:"flex items-center flex-1 min-w-[120px] cursor-pointer hover:opacity-80 text-[#FF4D4F]",children:[(0,d.uf)(null!==(s=ej.unrealized_pnl)&&void 0!==s?s:0),"USDT"]}),(0,a.jsxs)("span",{className:"flex items-center w-[80px] min-w-[80px] cursor-pointer hover:opacity-80",children:[(0,d.uf)(null!==(t=ej.realized_pnl)&&void 0!==t?t:0),"USDT"]})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center w-full  text-[#FFFFFF]/90 font-semibold text-[10px] mt-1",children:[(0,a.jsx)("span",{className:"flex items-center flex-1 min-w-[120px] cursor-pointer hover:opacity-80",children:"-"}),(0,a.jsx)("span",{className:"flex items-center flex-1 min-w-[120px] cursor-pointer hover:opacity-80 text-[#FF4D4F]",children:ej.unrealized_pnl_rate||0}),(0,a.jsxs)("span",{className:"flex items-center w-[80px] min-w-[80px] cursor-pointer hover:opacity-80",children:[ej.realized_pnl_rate||0,"%"]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center w-full text-[10px]",children:[(0,a.jsx)("div",{className:"flex items-center flex-1 min-w-[120px] text-[#FFFFFF]/40 whitespace-nowrap",children:U("myTradesHeaders.totalBuyAvg")}),(0,a.jsx)("div",{className:"flex items-center flex-1 min-w-[120px] text-[#FFFFFF]/40 whitespace-nowrap",children:U("myTradesHeaders.totalSoldAvg")}),(0,a.jsx)("div",{className:"flex items-center w-[80px] min-w-[80px] text-[#FFFFFF]/40 whitespace-nowrap",children:U("myTradesHeaders.totalProfit")})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center w-full  text-[#FFFFFF]/90 font-semibold text-[12px] mt-3",children:[(0,a.jsxs)("span",{className:"flex items-center flex-1 min-w-[120px] cursor-pointer hover:opacity-80",children:[(0,d.uf)(null!==(v=ej.total_buy_cost)&&void 0!==v?v:0),"USDT"]}),(0,a.jsxs)("span",{className:"flex items-center flex-1 min-w-[120px] cursor-pointer hover:opacity-80",children:[(0,d.uf)(null!==(g=ej.total_sell_amount)&&void 0!==g?g:0),"USDT"]}),(0,a.jsxs)("span",{className:"flex items-center w-[80px] min-w-[80px] cursor-pointer hover:opacity-80 text-[#FF4D4F]",children:[(0,d.uf)(null!==(b=ej.total_pnl)&&void 0!==b?b:0),"USDT"]})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center w-full  text-[#FFFFFF]/90 font-semibold text-[10px] mt-1",children:[(0,a.jsxs)("span",{className:"flex items-center flex-1 min-w-[120px] cursor-pointer hover:opacity-80",children:["$",(0,d.uf)(null!==(j=ej.avg_buy_cost)&&void 0!==j?j:0)]}),(0,a.jsxs)("span",{className:"flex items-center flex-1 min-w-[120px] cursor-pointer hover:opacity-80",children:["$",(0,d.uf)(null!==(w=ej.avg_sell_amount)&&void 0!==w?w:0)]}),(0,a.jsx)("span",{className:"flex items-center w-[80px] min-w-[80px] cursor-pointer hover:opacity-80 text-[#FF4D4F]",children:Number(ej.total_pnl_rate||0).toFixed(2)})]})]})]}):(0,a.jsxs)("div",{className:"flex flex-col bg-[#FFFFFF]/5 rounded-[8px] p-4 mb-4 w-full",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center w-full ",children:[(0,a.jsx)("div",{className:"flex items-center sm:w-[100px] sm:min-w-[100px] text-[#FFFFFF]/40 whitespace-nowrap",children:U("myTradesHeaders.balanceUsdt")}),(0,a.jsx)("div",{className:"flex items-center sm:w-[126px] sm:min-w-[126px] text-[#FFFFFF]/40 whitespace-nowrap",children:U("myTradesHeaders.unrealizedProfits")}),(0,a.jsx)("div",{className:"flex items-center sm:w-[100px] sm:min-w-[100px] text-[#FFFFFF]/40 whitespace-nowrap",children:U("myTradesHeaders.realizedProfit")}),(0,a.jsx)("div",{className:"flex items-center sm:w-[100px] sm:min-w-[100px] text-[#FFFFFF]/40 whitespace-nowrap",children:U("myTradesHeaders.totalBuyAvg")}),(0,a.jsx)("div",{className:"flex items-center sm:w-[100px] sm:min-w-[100px] text-[#FFFFFF]/40 whitespace-nowrap",children:U("myTradesHeaders.totalSoldAvg")}),(0,a.jsx)("div",{className:"flex items-center sm:w-[100px] sm:min-w-[100px] text-[#FFFFFF]/40 whitespace-nowrap",children:U("myTradesHeaders.totalProfit")})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center w-full  text-[#FFFFFF]/90 font-semibold text-[14px] mt-6",children:[(0,a.jsxs)("span",{className:"sm:w-[100px] sm:min-w-[100px] flex items-center cursor-pointer hover:opacity-80",children:[(0,d.uf)(null!=eN?eN:0),"USDT"]}
1),(0,a.jsxs)("span",{className:"flex items-center sm:w-[126px] sm:min-w-[126px] cursor-pointer hover:opacity-80 text-[#FF4D4F]",children:[(0,d.uf)(null!==(N=ej.unrealized_pnl)&&void 0!==N?N:0),"USDT"]}),(0,a.jsxs)("span",{className:"sm:w-[100px] sm:min-w-[100px] flex items-center cursor-pointer hover:opacity-80",children:[(0,d.uf)(null!==(y=ej.realized_pnl)&&void 0!==y?y:0),"USDT"]}),(0,a.jsxs)("span",{className:"sm:w-[100px] sm:min-w-[100px] flex items-center cursor-pointer hover:opacity-80",children:[(0,d.uf)(null!==(_=ej.total_buy_cost)&&void 0!==_?_:0),"USDT"]}),(0,a.jsxs)("span",{className:"sm:w-[100px] sm:min-w-[100px] flex items-center cursor-pointer hover:opacity-80",children:[(0,d.uf)(null!==(k=ej.total_sell_amount)&&void 0!==k?k:0),"USDT"]}),(0,a.jsxs)("span",{className:"sm:w-[100px] sm:min-w-[100px] flex items-center cursor-pointer hover:opacity-80 text-[#FF4D4F]",children:[(0,d.uf)(null!==(S=ej.total_pnl)&&void 0!==S?S:0),"USDT"]})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center w-full  text-[#FFFFFF]/90 font-semibold text-[14px] mt-4",children:[(0,a.jsx)("span",{className:"sm:w-[100px] sm:min-w-[100px] flex items-center cursor-pointer hover:opacity-80",children:"-"}),(0,a.jsx)("span",{className:"flex items-center sm:w-[126px] sm:min-w-[126px] cursor-pointer hover:opacity-80 text-[#FF4D4F]",children:ej.unrealized_pnl_rate||0}),(0,a.jsxs)("span",{className:"sm:w-[100px] sm:min-w-[100px] flex items-center cursor-pointer hover:opacity-80",children:[ej.realized_pnl_rate||0,"%"]}),(0,a.jsxs)("span",{className:"sm:w-[100px] sm:min-w-[100px] flex items-center cursor-pointer hover:opacity-80",children:["$",(0,d.uf)(null!==(C=ej.avg_buy_cost)&&void 0!==C?C:0)]}),(0,a.jsxs)("span",{className:"sm:w-[100px] sm:min-w-[100px] flex items-center cursor-pointer hover:opacity-80",children:["$",(0,d.uf)(null!==(T=ej.avg_sell_amount)&&void 0!==T?T:0)]}),(0,a.jsx)("span",{className:"sm:w-[100px] sm:min-w-[100px] flex items-center cursor-pointer hover:opacity-80 text-[#FF4D4F]",children:Number(ej.total_pnl_rate||0).toFixed(2)})]})]}),(0,a.jsxs)("div",{className:"grid min-w-[500px] grid-cols-5 sm:grid-cols-10 items-center",children:[(0,a.jsx)("div",{className:"flex items-center min-w-[100px] col-span-1 sm:col-span-2 text-[#FFFFFF]/40",children:U("myTradesHeaders.time")}),(0,a.jsx)("div",{className:"flex items-center min-w-[100px] col-span-1 sm:col-span-2 text-[#FFFFFF]/40",children:U("myTradesHeaders.type")}),(0,a.jsx)("div",{className:"flex items-center min-w-[100px] col-span-1 sm:col-span-2 text-[#FFFFFF]/40",children:U("myTradesHeaders.totalUsdt")}),(0,a.jsx)("div",{className:"flex items-center min-w-[100px] col-span-1 sm:col-span-2 text-[#FFFFFF]/40",children:U("myTradesHeaders.number")}),(0,a.jsx)("div",{className:"flex items-center min-w-[100px] col-span-1 sm:col-span-2 text-[#FFFFFF]/40",children:U("myTradesHeaders.price")})]}),(0,a.jsx)("div",{className:"flex flex-col h-[600px] sm:h-full",children:eg.length>0?(0,a.jsx)("div",{className:"h-[calc(35vh-152px)] overflow-y-auto mt-4",id:"scrollablemp4",children:(0,a.jsx)(x.Z,{dataLength:(null==eg?void 0:eg.length)||0,next:()=>{eF&&eh(eu+1)},hasMore:eF,loader:eF&&(0,a.jsx)("div",{className:"flex justify-center items-center mt-4 bgblack-spin",children:(0,a.jsx)(r.Z,{size:"large"})}),style:{overflow:"hidden"},scrollableTarget:"scrollablemp4",children:(0,a.jsx)("div",{className:"flex flex-col gap-4 sm:gap-8 text-sm",children:eg.map((e,s)=>(0,a.jsxs)("div",{className:"grid min-w-[500px] grid-cols-5 sm:grid-cols-10 items-center text-[#FFFFFF]",children:[(0,a.jsx)("span",{className:"min-w-[100px] col-span-1 sm:col-span-2 flex items-center cursor-pointer hover:opacity-80",children:(0,d.tK)(e.createdAt)}),(0,a.jsx)("span",{className:"min-w-[100px] col-span-1 sm:col-span-2 flex items-center cursor-pointer hover:opacity-80 ".concat("sell"===e.side?"text-red-500":"text-[#20c10e]"),children:"buy"===e.side?U("tradeTypes.buy"):U("tradeTypes.sell")}),(0,a.jsxs)("span",{className:"min-w-[100px] col-span-1 sm:col-span-2 flex items-center cursor-pointer hover:opacity-80",children:[(0,d.uf)(e.total_amount)," USDT"]}),(0,a.jsx)("span",{className:"min-w-[100px] col-span-1 sm:col-span-2 flex items-center cursor-pointer hover:opacity-80",children:(0,d.uf)(e.quantity)}),(0,a.jsxs)("span",{className:"min-w-[100px] col-span-1 sm:col-span-2 flex items-center cursor-pointer hover:opacity-80",children:[(0,d.uf)(e.price)," USDT"]})]},s))})})}):!ef&&(0,a.jsx)("div",{className:"flex items-center h-full mt-6",children:(0,a.jsx)(f.Z,{isDarkMode:!0})})})]}),4===$&&(0,a.jsxs)("div",{className:"w-full overflow-x-auto p-3",children:[(0,a.jsxs)("div",{className:"grid grid-cols-4 sm:grid-cols-8 items-cente gap-5 text-[10px] sm:text-[14px]",children:[(0,a.jsx)("div",{className:"flex items-center col-span-1 sm:col-span-2 text-[#FFFFFF]/40",children:U("holdersHeaders.holder")}),(0,a.jsx)("div",{className:"flex items-center col-span-1 sm:col-span-2 text-[#FFFFFF]/40",children:U("holdersHeaders.holdingAmou
1nt")}),(0,a.jsx)("div",{className:"flex items-center min-w-[90px] col-span-1 sm:col-span-2 text-[#FFFFFF]/40",children:U("holdersHeaders.holdingValue")})]}),(0,a.jsx)("div",{className:"flex flex-col",children:ex.length>0?(0,a.jsx)("div",{className:"h-[600px] sm:h-[35vh] overflow-y-auto mt-4",id:"scrollablemp3",children:(0,a.jsx)(x.Z,{dataLength:(null==ex?void 0:ex.length)||0,next:()=>{er&&ec(ei+1)},hasMore:er,loader:er&&(0,a.jsx)("div",{className:"flex justify-center items-center mt-4  bgblack-spin",children:(0,a.jsx)(r.Z,{size:"large"})}),style:{overflow:"hidden"},scrollableTarget:"scrollablemp3",children:(0,a.jsx)("div",{className:"flex flex-col gap-4 sm:gap-8 text-sm",children:ex.map(e=>(0,a.jsxs)("div",{className:"grid grid-cols-4 sm:grid-cols-8 items-center text-[#FFFFFF] gap-5 text-[12px] sm:text-[14px]",children:[(0,a.jsx)("span",{className:"col-span-1 sm:col-span-2 flex items-center cursor-pointer hover:opacity-80",children:e.nickname}),(0,a.jsx)("span",{className:"col-span-1 sm:col-span-2 flex items-center cursor-pointer hover:opacity-80",children:(0,d.SO)(e.quantity)}),(0,a.jsx)("span",{className:"col-span-1 min-w-[90px] sm:col-span-2 flex items-center cursor-pointer hover:opacity-80",children:(0,d.SO)(e.market_value)})]},e.mint))})})}):!eo&&(0,a.jsx)("div",{className:"flex items-center h-full mt-6",children:(0,a.jsx)(f.Z,{isDarkMode:!0})})})]})]})]}),(0,a.jsx)(n.Z,{open:ea,onCancel:()=>el(!1),footer:null,centered:!0,closeIcon:!1,maskClosable:!1,className:"meme-modal ".concat(K?"w-[80%]":"!w-[80%]"," !rounded-[8px] !px-0"),children:(0,a.jsxs)("div",{className:"h-full",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,a.jsx)("span",{className:"text-[20px] font-bold text-[#FFFFFF]",children:U("holderBubble")}),(0,a.jsx)("img",{src:"/icon/close.svg",className:"w-5 h-5 cursor-pointer",alt:"close",onClick:()=>el(!1)})]}),(0,a.jsx)("div",{className:"h-[calc(100%-16px)] rounded-b-[8px]",children:(0,a.jsx)("iframe",{className:"rounded-b-[8px]",height:"100%",width:"100%",src:"https://faster100x.com/en/lite/embedded?tokenChain=sol&tokenAddress=".concat(Z,"&platform=aiw3"),allow:"clipboard-write",allowFullScreen:!0})})]})})]})}},83524:function(e,s,t){t.d(s,{Z:function(){return P}});var a=t(57437),l=t(2265),r=t(4260),n=t(48651),i=t(53743),c=t(29967),o=t(83983),d=t(61936),x=t(74294),m=t(41725),F=t(15408),p=t(32747),u=t(97932),h=t(34029),f=t(10868),v=t(53982),g=t(29116),b=t(95008),j=t(38706),w=t(7310),N=t.n(w);function y(e){var s,t,r,n,c;let{amt:o,tokenItem:m,resultCallback:w,customClass:y="",tradeType:_}=e,k=(0,j.T_)("meme.tradeBuyButton"),S=(0,F.O)(),[C,T]=(0,l.useState)([]),{buyToken:Z,buyTokenPumpFun:M,buyTokenJupiter:P,getTransactionStatus:D,calculateBuyAmount:B,calculateBuyAmountJupiter:L,calculateBuyAmountPumpFun:H}=(0,p.l)(T,_),{isLogin:z,loading:I,setShowLoginModal:O,userInfo:A,solanaWallet:E}=(0,d.a)(),[K,U]=(0,l.useState)(!1),q=(0,l.useRef)(2),$=(0,l.useRef)(.003),[R,J]=(0,l.useState)(!1),[G,W]=(0,l.useState)(0),[Y,V]=(0,l.useState)(""),{isMobile:X}=(0,v.Z)(),{mode:Q}=(0,b.y)(),[ee,es]=(0,l.useState)(100===m.coin.in_progress?2:1===_?0:1),[et,ea]=(0,l.useState)(0);(0,l.useEffect)(()=>{(null==A?void 0:A.isThridAuth)&&(null==E?void 0:E.address)&&!S.connected&&(S.publicKey=new u.PublicKey(null==E?void 0:E.address),S.connected=!0,S.wallet={name:"circle"})},[A,S]);let el={0:{icon:"fPending",btn:k("processing"),text:k("confirmingTransaction"),statusColor:"#FFA940"},1:{icon:"fSuccess",btn:k("done"),text:k("transactionSuccess"),statusColor:"rgba(17, 179, 130, 0.9)"},2:{icon:"fFail",btn:k("back"),text:k("transactionFailed"),statusColor:"#FF4D4F"}},er=async()=>{if(o<=0)return h.ZP.error(k("pleaseEnterValidAmount"));if(o<.00204)return h.ZP.error(k("purchaseBelowMinimum"));if(!z){O(!0);return}try{var e,s;if(U(!0),A.isThridAuth){let s=await g.dJ.post("Meme"===Q?"/api/trades/circleBuy":"/api/agent/circleBuy",{amount:o,tokenAddress:null==m?void 0:null===(e=m.coin)||void 0===e?void 0:e.mint});if(200===s.code)await ei({txid:s.data.signature||"",status:!0});else throw await ei({status:!1}),Error(s.message||"Transaction failed")}else{let e=ed?P:1===_?M:Z,t=await e(null==m?void 0:null===(s=m.coin)||void 0===s?void 0:s.mint,o,new u.PublicKey((null==S?void 0:S.publicKey)||""),q.current,$.current);await ei(t)}}catch(e){console.error("Buy error:",e)}finally{U(!1),ei({status:!1})}};(0,l.useEffect)(()=>{let e=async()=>
1{if(!o||0>=Number(o)){ea(0);return}try{var e,s,t;let a=null;(a=0===ee?await H(null==m?void 0:null===(e=m.coin)||void 0===e?void 0:e.mint,Number(o),!0):2===ee?await L(null==m?void 0:null===(s=m.coin)||void 0===s?void 0:s.mint,Number(o),!0,q.current):await B(null==m?void 0:null===(t=m.coin)||void 0===t?void 0:t.mint,Number(o),!0))&&a.success&&!a.error&&ea(a.amount||0)}catch(e){console.error("Calculation error:",e),ea(0)}},s=N()(e,500);return s(),()=>{s.cancel()}},[o,null==m?void 0:null===(s=m.coin)||void 0===s?void 0:s.mint,B,L,H,q.current,ee]);let en=async e=>{try{var s;await g.dJ.post("/api/usertrades/addMyTrades",{type:ee,txtype:0,tokenaddress:null==m?void 0:null===(s=m.coin)||void 0===s?void 0:s.mint,amount:o,volume:Number(et),hash:e})}catch(e){}},ei=async e=>{W(0),J(!0),e.status?(en(e.txid),V(e.txid),await ec(e.txid)):W(2)},ec=async e=>{try{await eo(e)}catch(e){console.error("Notification failed",e)}},eo=async e=>{try{await D(e,e),setTimeout(async()=>{W(1),w(1)},300)}catch(s){setTimeout(async()=>{await eo(e)},400)}},ed=(null==m?void 0:null===(t=m.coin)||void 0===t?void 0:t.in_progress)===100||100===m.inprogress;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.Z,{className:"".concat(null!=y?y:"","                    \n                    rounded-md gap-2"),align:"center",justify:"center",onClick:e=>{er()},children:K?(0,a.jsxs)("svg",{className:"animate-spin h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-4 h-4 rounded-full",children:(0,a.jsx)(x.Z,{src:"/image/meme/sol.svg",alt:"Avatar",imgCls:"w-full h-full object-cover"})}),(0,a.jsx)("p",{className:" text-sm ".concat("text-[#FFFFFF]"," max-w-[60px] overflow-x-scroll"),children:o})]})}),R&&(0,a.jsx)(i.Z,{open:R,destroyOnClose:!0,closeIcon:!1,footer:null,centered:!0,className:"antModelContent",style:{width:X?"80%":"480px",height:"auto"},children:(0,a.jsxs)("div",{className:"w-full bg-[#FFFFFF] p-6 pt-4 shadow-lg flex flex-col justify-between gap-3 rounded-[8px]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("p",{className:"text-[#000000]/90 text-xl font-semibold leading-loose mr-9",children:k("buyTokenFor",{tokenName:null==m?void 0:null===(r=m.coin)||void 0===r?void 0:r.name,amount:o})}),(0,a.jsx)("img",{src:"/image/agent/knowledge/close.svg",alt:"knowledge",className:"w-4 h-4 cursor-pointer",onClick:()=>J(!1)})]}),(0,a.jsxs)(f.Z,{align:"end",justify:"space-between",children:[(0,a.jsxs)(f.Z,{align:"center",className:"gap-4",children:[(0,a.jsx)("img",{src:"/icon/".concat(null===(n=el[G])||void 0===n?void 0:n.icon,".svg"),className:"h-5 w-5 ".concat(0===G?"animate-spin":"")}),(0,a.jsx)("p",{className:"text-center text-base font-normal",style:{color:null===(c=el[G])||void 0===c?void 0:c.statusColor},children:el[G].text})]}),Y&&(0,a.jsx)("button",{onClick:()=>window.open("https://solscan.io/tx/".concat(Y).concat("https://mainnet.helius-rpc.com/?api-key=7408ef4f-db76-49cf-b0fa-76592ad87d2a".match(/devnet/)?"?cluster=devnet":""),"_blank"),className:"text-white text-sm font-semibold hover:text-white h-8 px-8 bg-[--color-main] flex rounded-md justify-center items-center",children:k("viewTx")})]})]})})]})}var _=t(8087),k=t(27648);function S(e){var s,t,r;let{sqlList:n,activeTab:i,item:c}=e,o=(0,j.T_)("meme.pulseCard"),{solUSDValue:d}=(0,l.useContext)(_.X);return(0,a.jsxs)("div",{className:"w-full border border-[#FFFFFF]/10 rounded-lg shadow-sm",children:[(0,a.jsx)("div",{className:"p-4 ",children:(0,a.jsxs)("div",{className:"flex  gap-2",children:[(0,a.jsx)("div",{className:"w-16 h-16",children:(0,a.jsx)(x.Z,{src:c.logo,alt:"Meme Image",imgCls:"w-16 h-16 min-w-16 rounded-lg "},c.address)}),(0,a.jsxs)("div",{className:"flex flex-col justify-between items-baseline gap-2 w-full h-16 min-h-16",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 leading-4 justify-between flex-wrap w-full",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"text-[16px] font-semibold text-[#FFFFFF]",children:c.symbol}),(0,a.jsx)("span",{className:"text-[12px] text-[#FFFFFF]/40",children:c.address?c.address.slice(0,4)+"..."+c.address.slice(-4):""}
1),(0,a.jsx)("img",{src:"/image/home/copy.svg",className:"w-4 h-4 cursor-pointer",alt:"copy",onClick:e=>{e.stopPropagation(),e.preventDefault(),(0,m.r0)(c.address)}})]})}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-[#FFFFFF]/40",children:1===i?(0,m.tK)(1e3*c.createdtimestamp):(0,m.tK)(null==c?void 0:null===(s=c.coin)||void 0===s?void 0:s.createdAt)}),(0,a.jsx)("div",{className:"w-[14px] h-[14px] rounded-sm overflow-hidden",children:(0,a.jsx)(x.Z,{src:1===i?"/image/meme/pump.png":"/image/smile.png",alt:"Twitter",imgCls:"w-full h-full object-cover"})}),c.twitter&&(0,a.jsx)(k.default,{href:c.twitter,target:"_blank",className:"w-[14px] h-[14px] rounded-sm overflow-hidden",children:(0,a.jsx)(x.Z,{src:"/icon/x.svg",alt:"Telegram",imgCls:"w-full h-full object-cover"})}),c.telegram&&(0,a.jsx)(k.default,{href:c.telegram,target:"_blank",className:"w-[14px] h-[14px] rounded-sm overflow-hidden",children:(0,a.jsx)(x.Z,{src:"/icon/telegram.svg",alt:"Discord",imgCls:"w-full h-full object-cover"})}),c.website&&(0,a.jsx)(k.default,{href:c.website,target:"_blank",className:"w-[16px] h-[16px] rounded-sm overflow-hidden",children:(0,a.jsx)(x.Z,{src:"/icon/website.svg",alt:"Twitter",imgCls:"w-full h-full object-cover"})}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-16 h-2 rounded-full bg-[#FFFFFF]/10 overflow-hidden",children:(0,a.jsx)("div",{style:{width:"".concat(c.inprogress,"%")},className:"h-full bg-[#2C7CF5] rounded-full"})}),(0,a.jsxs)("span",{className:"text-[8px] text-[#FFFFFF]",children:[c.inprogress,"%"]})]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-[10px]",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsxs)("span",{className:"text-[#FFFFFF]/40",children:[o("top10"),": "]}),(0,a.jsxs)("span",{className:"text-[#FF4D4F] ml-[4px]",children:[null!==(t=c.top)&&void 0!==t?t:0,"%"]})]}),(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsxs)("span",{className:"text-[#FFFFFF]/40",children:[o("holder"),": "]}),(0,a.jsx)("span",{className:"text-[#FFFFFF] ml-[4px]",children:null!==(r=c.holders)&&void 0!==r?r:0})]}),(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsxs)("span",{className:"text-[#FFFFFF]/40",children:[o("volume24h"),": "]}),(0,a.jsx)("span",{className:"text-[#FFFFFF] ml-[4px]",children:c["24hvol"]})]}),(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsxs)("span",{className:"text-[#FFFFFF]/40",children:[o("marketCap"),": "]}),(0,a.jsxs)("span",{className:"text-[#FFFFFF] ml-[4px]",children:["$",Number(c.marketcap*d).toFixed(2)]})]})]}),c.txhash&&(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsx)("a",{href:"https://solscan.io/tx/".concat(c.txhash).concat("https://mainnet.helius-rpc.com/?api-key=7408ef4f-db76-49cf-b0fa-76592ad87d2a".match(/devnet/)?"?cluster=devnet":""),target:"_blank",rel:"noopener noreferrer",className:"text-xs text-gray-400 hover:text-gray-600",children:o("viewOnSolscan")})})]})]})}),(0,a.jsxs)("div",{className:"flex border-t border-[#FFFFFF]/10",children:[(0,a.jsx)("button",{className:"flex-1 flex items-center justify-center gap-1.5 py-2.5 text-xs text-[#FFFFFF] border-r border-[#FFFFFF]/10",onClick:e=>{e.stopPropagation(),e.preventDefault()},children:(0,a.jsx)(y,{tradeType:i,amt:n.sqlAmount1,tokenItem:{coin:{in_progress:c.inprogress,name:c.name,mint:c.address}},resultCallback:e=>{console.log("buy result",e)}})}),(0,a.jsx)("button",{className:"flex-1 flex items-center justify-center gap-1.5 py-2.5 text-xs text-[#FFFFFF] border-r border-[#FFFFFF]/10",onClick:e=>{e.stopPropagation(),e.preventDefault()},children:(0,a.jsx)(y,{tradeType:i,amt:n.sqlAmount2,tokenItem:{coin:{in_progress:c.inprogress,name:c.name,mint:c.address}},resultCallback:e=>{console.log("buy result",e)}})}),(0,a.jsx)("button",{className:"flex-1 flex items-center justify-center gap-1.5 py-2.5 text-xs text-[#FFFFFF] border-r border-[#FFFFFF]/10",onClick:e=>{e.stopPropagation(),e.preventDefault()},children:(0,a.jsx)(y,{tradeType:i,amt:n.sqlAmount3,tokenItem:{coin:{in_progress:c.inprogress,name:c.name,mint:c.address}},resultCallback:e=>{console.log("buy result",e)}})}),(0,a.jsx)("button",{className:"flex-1 flex items-center justify-center gap-1.5 py-2.5 text-xs text-[#FFFFFF]",onClick:e=>{e.stopPropagation(),e.preventDefault()},children:(0,a.jsx)(y,{tradeType:i,amt:n.sqlAmount4,tokenItem:{coin:{in_progress:c.inprogress,name:c.name,mint:c.address}},resultCallback:e=>{console.log("buy result",e)}})})]})]})}var C=t(29917),T=t(61994);function Z(e){let{showFilter:s,setShowFilter:t,onFilterContentChange:n}=e,c=(0,j.T_)("meme.filterModal"),{solUSDValue:o}=(0,l.useContext)(_.X),{isMobile:d}=(0,v.Z)(),[x,m]=(0,l.useState)({media:[],minCreatTime:"",maxCreatTime:"",mcbegin:"",mcend:"",holderbegin:"",holderend:""}),F=()=>{n&&n({...x,mcbegin:x.mcbegin?Number(x.mcbegin)*o:"",mcend:x.mcend?Number(x.mcend)*
1o:""}),t(!1)};return(0,a.jsx)(i.Z,{open:s,onCancel:()=>t(),footer:null,centered:!0,closeIcon:!1,maskClosable:!1,className:"add-symbol-modal ".concat(d?"w-[80%]":"!w-[504px]"," h-auto !rounded-[8px] !px-0"),children:(0,a.jsxs)("div",{className:"",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-[20px] font-bold text-[#FFFFFF]",children:c("title")}),(0,a.jsx)("img",{src:"/icon/close.svg",className:"w-4 h-4 cursor-pointer",alt:"close",onClick:()=>t(!1)})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-8 mt-8",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-5 text-[#FFFFFF]",children:[(0,a.jsx)("span",{className:"w-[160px] text-[14px]",children:c("socialMedia")}),(0,a.jsx)(T.Z.Group,{className:"flex justify-between meme-checkbox",options:[{label:"Twitter",value:"1"},{label:"Telegram",value:"2"},{label:"Website",value:"3"}],defaultValue:[""],onChange:e=>{m({...x,media:e})}})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 ",children:[(0,a.jsx)("span",{className:"text-[#FFFFFF] w-[160px] text-[14px]",children:c("createTime")}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.default,{className:"meme-input focus-within:border-[#FFFFFF]/10 flex-1 h-12 text-sm px-4  text-[#000000]/90 text-[#FFFFFF] bg-transparent focus-within:bg-transparent hover:bg-transparent  border border-[#FFFFFF]/10 hover:border-[#FFFFFF]/10",value:x.minCreatTime,suffix:(0,a.jsx)("span",{children:"m"}),onChange:e=>{m({...x,minCreatTime:e.target.value})}}),(0,a.jsx)("span",{className:"text-[#FFFFFF] mx-4 flex items-center ",children:c("to")}),(0,a.jsx)(r.default,{className:"meme-input focus-within:border-[#FFFFFF]/10 flex-1 h-12 text-sm px-4  text-[#000000]/90 text-[#FFFFFF] bg-transparent focus-within:bg-transparent hover:bg-transparent  border border-[#FFFFFF]/10 hover:border-[#FFFFFF]/10",value:x.maxCreatTime,suffix:(0,a.jsx)("span",{children:"m"}),onChange:e=>{m({...x,maxCreatTime:e.target.value})}})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 ",children:[(0,a.jsx)("span",{className:"text-[#FFFFFF] w-[160px] text-[14px]",children:c("marketCap")}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.default,{className:"meme-input focus-within:border-[#FFFFFF]/10 flex-1 h-12 text-sm px-4  text-[#000000]/90 text-[#FFFFFF] bg-transparent focus-within:bg-transparent hover:bg-transparent  border border-[#FFFFFF]/10 hover:border-[#FFFFFF]/10",value:x.mcbegin,suffix:(0,a.jsx)("span",{children:"$"}),onChange:e=>{m({...x,mcbegin:e.target.value})}}),(0,a.jsx)("span",{className:"text-[#FFFFFF] mx-4 flex items-center ",children:c("to")}),(0,a.jsx)(r.default,{className:"meme-input focus-within:border-[#FFFFFF]/10 flex-1 h-12 text-sm px-4  text-[#000000]/90 text-[#FFFFFF] bg-transparent focus-within:bg-transparent hover:bg-transparent  border border-[#FFFFFF]/10 hover:border-[#FFFFFF]/10",value:x.mcend,suffix:(0,a.jsx)("span",{children:"$"}),onChange:e=>{m({...x,mcend:e.target.value})}})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 ",children:[(0,a.jsx)("span",{className:"text-[#FFFFFF] w-[160px] text-[14px]",children:c("holdersNumber")}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.default,{className:"meme-input focus-within:border-[#FFFFFF]/10 flex-1 h-12 text-sm px-4  text-[#000000]/90 text-[#FFFFFF] bg-transparent focus-within:bg-transparent hover:bg-transparent  border border-[#FFFFFF]/10 hover:border-[#FFFFFF]/10",value:x.holderbegin,onChange:e=>{m({...x,holderbegin:e.target.value})}}),(0,a.jsx)("span",{className:"text-[#FFFFFF] mx-4 flex items-center ",children:c("to")}),(0,a.jsx)(r.default,{className:"meme-input focus-within:border-[#FFFFFF]/10 flex-1 h-12 text-sm px-4  text-[#000000]/90 text-[#FFFFFF] bg-transparent focus-within:bg-transparent hover:bg-transparent  border border-[#FFFFFF]/10 hover:border-[#FFFFFF]/10",value:x.holderend,onChange:e=>{m({...x,holderend:e.target.value})}})]})]}),(0,a.jsxs)("div",{className:"flex gap-6 items-center justify-center",children:[(0,a.jsx)("div",{className:"flex-1 border border-[#FFFFFF] text-[#FFFFFF] text-[16px] font-semibold rounded-[6px] h-12 flex items-center justify-center cursor-pointer",onClick:()=>t(!1),children:c("cancel")}),(0,a.jsx)("div",{className:"flex-1 bg-[#2C7CF5] rounded-[6px] h-12 text-[#FFFFFF] text-[16px] font-semibold flex items-center justify-center cursor-pointer",onClick:()=>F(),children:c("confirm")})]})]})]})})}var M=t(23659);
1function P(e){let{setTabIndex:s,setSymbol:t}=e,m=(0,j.T_)("meme.pulse"),{solUSDValue:F}=(0,l.useContext)(_.X),{isMobile:p}=(0,v.Z)(),{userInfo:u}=(0,d.a)(),[h,f]=(0,l.useState)(1),[g,b]=(0,l.useState)({sqlAmount1:"0.1",sqlAmount2:"0.2",sqlAmount3:"0.5",sqlAmount4:"1"}),[w,N]=(0,l.useState)(!1),[y,k]=(0,l.useState)(!1),[T,P]=(0,l.useState)(!1),[D,B]=(0,l.useState)({}),[L,H]=(0,l.useState)({}),[z,I]=(0,l.useState)({}),[O,A]=(0,l.useState)(!1),[E,K]=(0,l.useState)({mode:1,slippage:"50",tradeFee:"0.01"}),[U,q]=(0,l.useState)({mode:1,slippage:"50",tradeFee:"0.01"}),[$,R]=(0,l.useState)(1),[J,G]=(0,l.useState)(!1),[W,Y]=(0,l.useState)(!1),[V,X]=(0,l.useState)([]),[Q,ee]=(0,l.useState)([]),[es,et]=(0,l.useState)(1),[ea,el]=(0,l.useState)(!1),[er,en]=(0,l.useState)(!1),[ei,ec]=(0,l.useState)([]),[eo,ed]=(0,l.useState)([]),[ex,em]=(0,l.useState)(1),[eF,ep]=(0,l.useState)(!1),[eu,eh]=(0,l.useState)(!1),[ef,ev]=(0,l.useState)([]),[eg,eb]=(0,l.useState)([]),ej=()=>{q(E),A(!1)},ew=()=>{W&&R($+1)},eN=async()=>{G(!0);let e={keyword:"",type:1,page:$,size:1===h?50:10,...D};try{let s=1===h?C.r:C.n,t=(await s(e)).list||[];2===h&&(t=t.map(e=>({...e,logo:e.coin.photo,symbol:e.coin.symbol,address:e.coin.mint,inprogress:e.coin.in_progress,top:Number(e.coin.t10).toFixed(2),holders:e.coin.holder,"24hvol":e.coin.volume,marketcap:e.coin.mc,name:e.coin.name,telegram:e.medias.telegram,twitter:e.medias.twitter,website:e.medias.website}))),Y(1===h?50===t.length:10===t.length),2===h?ee(e=>[...new Map([...e,...t||[]].map(e=>[null==e?void 0:e.address,e])).values()]):X(e=>{let s=new Map(t.map(e=>[null==e?void 0:e.address,e]));return e.forEach(e=>{s.has(null==e?void 0:e.address)||s.set(null==e?void 0:e.address,e)}),Array.from(s.values())})}catch(e){console.error("fetchTokensSortedBy failed:",e)}finally{G(!1)}};(0,l.useEffect)(()=>{let e=null;return(async()=>{await eN(),1===h&&(e=setInterval(eN,2e3))})(),()=>{e&&clearInterval(e)}},[h,$,D]);let ey=()=>{er&&et(es+1)},e_=async()=>{el(!0);let e={keyword:"",type:2,page:es,size:1===h?50:10,...L};try{let s=1===h?C.r:C.n,t=(await s(e)).list||[];2===h&&(t=t.map(e=>{var s;return{...e,logo:e.image_url,symbol:e.ticker_symbol,address:e.contract_address,inprogress:e.in_progress,top:Number(null!==(s=e.t10)&&void 0!==s?s:0).toFixed(2),holders:e.holder,"24hvol":e.volume,marketcap:e.market_cap,name:e.token_name,telegram:e.medias.telegram,twitter:e.medias.twitter,website:e.medias.website}})),en(1===h?50===t.length:10===t.length),2===h?ed(e=>[...new Map([...e,...t||[]].map(e=>[null==e?void 0:e.address,e])).values()]):ec(e=>{let s=new Map(t.map(e=>[null==e?void 0:e.address,e]));return e.forEach(e=>{s.has(null==e?void 0:e.address)||s.set(null==e?void 0:e.address,e)}),Array.from(s.values())})}catch(e){console.error("fetchTokensSortedBy failed:",e)}finally{el(!1)}};(0,l.useEffect)(()=>{let e=null;return(async()=>{await e_(),1===h&&(e=setInterval(e_,1e4))})(),()=>{e&&clearInterval(e)}},[h,es,L]);let ek=()=>{eu&&em(ex+1)},eS=async()=>{ep(!0);let e={keyword:"",type:3,page:ex,size:1===h?50:10,...z};try{let s=1===h?C.r:C.n,t=(await s(e)).list||[];2===h&&(t=t.map(e=>({...e,logo:e.coin.photo,symbol:e.coin.symbol,address:e.coin.mint,inprogress:e.coin.in_progress,top:Number(e.coin.t10).toFixed(2),holders:e.coin.holder,"24hvol":e.coin.volume,marketcap:e.coin.mc,name:e.coin.name,telegram:e.medias.telegram,twitter:e.medias.twitter,website:e.medias.website}))),eh(1===h?50===t.length:10===t.length),2===h?eb(e=>[...new Map([...e,...t||[]].map(e=>[null==e?void 0:e.address,e])).values()]):ev(e=>{let s=new Map(t.map(e=>[null==e?void 0:e.address,e]));return e.forEach(e=>{s.has(null==e?void 0:e.address)||s.set(null==e?void 0:e.address,e)}),Array.from(s.values())})}catch(e){console.error("fetchTokensSortedBy failed:",e)}finally{ep(!1)}};return(0,l.useEffect)(()=>{let e=null;return(async()=>{await eS(),1===h&&(e=setInterval(eS,2e3))})(),()=>{e&&clearInterval(e)}},[h,ex,z]),(0,a.jsxs)("section",{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full mt-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-16",children:[(0,a.jsx)("div",{className:"flex items-center ",children:[{id:1,name:"Pump",src:"/image/meme/pump.png"},{id:2,name:"Moonpump",src:"/image/smile.png"}].map(e=>(0,a.jsxs)("div",{className:"".concat(e.id===h?"bg-[#FFFFFF]/10 text-white":"bg-[#FFFFFF]/5 text-[#FFFFFF]/40"," \n                    ").concat(1===e.id?"rounded-l-[8px]":"rounded-r-[8px]","\n                    w-[115px] flex items-center justify-center py-[9px] gap-1 cursor-pointer"),onClick:()=>{e.id!==h&&(2===h?(X([]),ec([]),ev([])):(ee([]),ed([]),eb([])),R(1),et(1),em(1),f(e.id))},children:[(0,a.jsx)(x.Z,{src:e.src,alt:e.name,imgCls:"w-[14px] h-[14px]"}),(0,a.jsx)("span",{className:" text-[12px] ",children:e.name})]}))}),(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs",children:m("quicklyBuy")}),(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)(r.default,{className:"w-[66px] text-sm pl-4 pr-1 text-[#000000]/90 text-[#FFFFFF] bg-[#FFFFFF]/5 focus-within:bg-[#FFFFFF]/5 hover:bg-[#FFFFFF]/5 border-none",value:g.sqlAmount1,onChange:e=>{(""===e.target.value||"."===e.target.value||/^\d*\.?\d*$/.test(e.target.value))&&b({...g,sqlAmount1:e.target.value})},prefix:(0,a.jsx)("img",{className:"w-[14px] h-[14px] object-cover",src:"/image/meme/sol.svg"})}),(0,a.jsx)(r.default,{className:"w-[66px] text-sm pl-4 pr-1 text-[#000000]/90 text-[#FFFFFF] bg-[#FFFFFF]/5 focus-within:bg-[#FFFFFF]/5 hover:bg-[#FFFFFF]/5  border-none",value:g.sqlAmount2,onCh
1ange:e=>{(""===e.target.value||"."===e.target.value||/^\d*\.?\d*$/.test(e.target.value))&&b({...g,sqlAmount2:e.target.value})},prefix:(0,a.jsx)("img",{className:"w-[14px] h-[14px] object-cover",src:"/image/meme/sol.svg"})}),(0,a.jsx)(r.default,{className:"w-[66px] text-sm pl-4 pr-1 text-[#000000]/90 text-[#FFFFFF] bg-[#FFFFFF]/5 focus-within:bg-[#FFFFFF]/5 hover:bg-[#FFFFFF]/5 border-none",value:g.sqlAmount3,onChange:e=>{(""===e.target.value||"."===e.target.value||/^\d*\.?\d*$/.test(e.target.value))&&b({...g,sqlAmount3:e.target.value})},prefix:(0,a.jsx)("img",{className:"w-[14px] h-[14px] object-cover",src:"/image/meme/sol.svg"})}),(0,a.jsx)(r.default,{className:"w-[66px] text-sm pl-4 pr-1 text-[#000000]/90 text-[#FFFFFF] bg-[#FFFFFF]/5 focus-within:bg-[#FFFFFF]/5 hover:bg-[#FFFFFF]/5 border-none",value:g.sqlAmount4,onChange:e=>{(""===e.target.value||"."===e.target.value||/^\d*\.?\d*$/.test(e.target.value))&&b({...g,sqlAmount4:e.target.value})},prefix:(0,a.jsx)("img",{className:"w-[14px] h-[14px] object-cover",src:"/image/meme/sol.svg"})})]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-6",children:[(0,a.jsxs)("div",{className:"flex gap-6",children:[(0,a.jsxs)("div",{className:" text-[12px]",children:[(0,a.jsxs)("span",{className:"text-[#FFFFFF]/40",children:[m("tradingMode")," "]}),(0,a.jsx)("span",{className:"text-[#FFFFFF]",children:m(1===U.mode?"turbo":"antiMev")})]}),(0,a.jsxs)("div",{className:" text-[12px]",children:[(0,a.jsxs)("span",{className:"text-[#FFFFFF]/40",children:[m("tradingFee")," "]}),(0,a.jsx)("span",{className:"text-[#FFFFFF]",children:U.tradeFee||m("auto")})]}),(0,a.jsxs)("div",{className:" text-[12px]",children:[(0,a.jsxs)("span",{className:"text-[#FFFFFF]/40",children:[m("slippage")," "]}),(0,a.jsx)("span",{className:"text-[#FFFFFF]",children:U.slippage?U.slippage+"%":m("auto")})]})]}),(0,a.jsx)("img",{src:"/image/meme/setting3.png",alt:"setting",className:"w-5 h-5 cursor-pointer",onClick:()=>A(!0)})]})]}),(0,a.jsx)("div",{className:"flex gap-2",children:(0,a.jsx)("div",{className:"flex-1 h-[calc(100vh-110px)] overflow-y-hidden",children:(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2 mt-2 h-full",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 h-[calc(100vh-60px)] bg-[#FFFFFF]/5 rounded-[4px] p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-[14px] font-semibold text-[#FFFFFF]",children:m("newCreate")}),(0,a.jsx)("img",{src:"/image/meme/trade_filter.svg",alt:"filter",className:"w-4 h-4 cursor-pointer",onClick:()=>{N(!0)}})]}),1==h?(0,a.jsx)("div",{className:"flex flex-col gap-4 h-[calc(100%-80px)] overflow-y-auto ".concat((null==V?void 0:V.length)>0?"":"rounded-[8px] border border-[#000000]/10"),id:"scrollable_newTab",children:(null==V?void 0:V.length)>0?(0,a.jsx)(o.Z,{dataLength:(null==V?void 0:V.length)||0,next:ew,hasMore:W,loader:W&&(0,a.jsx)("div",{className:"flex justify-center items-center mt-4 bgblack-spin",children:(0,a.jsx)(n.Z,{size:"large"})}),style:{overflow:"hidden"},scrollableTarget:"scrollable_newTab",children:(0,a.jsx)("div",{className:"flex flex-col gap-4",children:V.map((e,l)=>(0,a.jsx)("div",{className:"cursor-pointer",onClick:()=>{s(2),t({...e,symbol:e.symbol,contract_address:e.address,isPumpFun:1==h})},children:(0,a.jsx)(S,{sqlList:g,activeTab:h,item:e},l)}))})}):J?(0,a.jsx)("div",{className:"py-6 flex justify-center items-center h-full bgblack-spin",children:(0,a.jsx)(n.Z,{size:"large"})}):(0,a.jsx)("div",{className:"flex items-center h-full ",children:(0,a.jsx)(M.Z,{isDarkMode:!0})})}):(0,a.jsx)("div",{className:"flex flex-col gap-4 h-[calc(100%-80px)] overflow-y-auto ".concat((null==Q?void 0:Q.length)>0?"":"rounded-[8px] border border-[#000000]/10"),id:"scrollable_newTab",children:(null==Q?void 0:Q.length)>0?(0,a.jsx)(o.Z,{dataLength:(null==Q?void 0:Q.length)||0,next:ew,hasMore:W,loader:W&&(0,a.jsx)("div",{className:"flex justify-center items-center mt-4 bgblack-spin",children:(0,a.jsx)(n.Z,{size:"large"})}),style:{overflow:"hidden"},scrollableTarget:"scrollable_newTab",children:(0,a.jsx)("div",{className:"flex flex-col gap-4",children:Q.map((e,l)=>(0,a.jsx)("div",{className:"cursor-pointer",onClick:()=>{s(2),t({...e,symbol:e.symbol,contract_address:e.address,isPumpFun:1==h})},children:(0,a.jsx)(S,{sqlList:g,activeTab:h,item:e},l)}))})}):J?(0,a.jsx)("div",{className:"py-6 flex justify-center items-center h-full bgblack-spin",children:(0,a.jsx)(n.Z,{size:"large"})}):(0,a.jsx)("div",{className:"flex items-center h-full ",children:(0,a.jsx)(M.Z,{isDarkMode:!0})})})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4 h-[calc(100vh-60px)] bg-[#FFFFFF]/5 rounded-[4px] p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-[14px] font-semibold text-[#FFFFFF]",children:m("completing")}),(0,a.jsx)("img",{src:"/image/meme/trade_filter.svg",alt:"filter",className:"w-4 h-4 cursor-pointer",onClick:()=>{k(!0)}})]}),1==h?(0,a.jsx)("div",{className:"flex flex-col gap-4 h-[calc(100%-80p
1x)] overflow-y-auto ".concat((null==ei?void 0:ei.length)>0?"":"rounded-[8px] border border-[#000000]/10"),id:"scrollable_fillTab",children:(null==ei?void 0:ei.length)>0?(0,a.jsx)(o.Z,{dataLength:(null==ei?void 0:ei.length)||0,next:ey,hasMore:er,loader:er&&(0,a.jsx)("div",{className:"flex justify-center items-center mt-4 bgblack-spin",children:(0,a.jsx)(n.Z,{size:"large"})}),style:{overflow:"hidden"},scrollableTarget:"scrollable_fillTab",children:(0,a.jsx)("div",{className:"flex flex-col gap-4",children:ei.map((e,l)=>(0,a.jsx)("div",{className:"cursor-pointer",onClick:()=>{s(2),t({...e,symbol:e.symbol,contract_address:e.address,isPumpFun:1==h})},children:(0,a.jsx)(S,{sqlList:g,activeTab:h,item:e},l)}))})}):ea?(0,a.jsx)("div",{className:"py-6 flex justify-center items-center h-full bgblack-spin",children:(0,a.jsx)(n.Z,{size:"large"})}):(0,a.jsx)("div",{className:"flex items-center h-full ",children:(0,a.jsx)(M.Z,{isDarkMode:!0})})}):(0,a.jsx)("div",{className:"flex flex-col gap-4 h-[calc(100%-80px)] overflow-y-auto ".concat((null==eo?void 0:eo.length)>0?"":"rounded-[8px] border border-[#000000]/10"),id:"scrollable_fillTab",children:(null==eo?void 0:eo.length)>0?(0,a.jsx)(o.Z,{dataLength:(null==eo?void 0:eo.length)||0,next:ey,hasMore:er,loader:er&&(0,a.jsx)("div",{className:"flex justify-center items-center mt-4 bgblack-spin",children:(0,a.jsx)(n.Z,{size:"large"})}),style:{overflow:"hidden"},scrollableTarget:"scrollable_fillTab",children:(0,a.jsx)("div",{className:"flex flex-col gap-4",children:eo.map((e,l)=>(0,a.jsx)("div",{className:"cursor-pointer",onClick:()=>{s(2),t({...e,symbol:e.symbol,contract_address:e.address,isPumpFun:1==h})},children:(0,a.jsx)(S,{sqlList:g,activeTab:h,item:e},l)}))})}):ea?(0,a.jsx)("div",{className:"py-6 flex justify-center items-center h-full bgblack-spin",children:(0,a.jsx)(n.Z,{size:"large"})}):(0,a.jsx)("div",{className:"flex items-center h-full ",children:(0,a.jsx)(M.Z,{isDarkMode:!0})})})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4 h-[calc(100vh-60px)] bg-[#FFFFFF]/5 rounded-[4px] p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-[14px] font-semibold text-[#FFFFFF]",children:m("completed")}),(0,a.jsx)("img",{src:"/image/meme/trade_filter.svg",alt:"filter",className:"w-4 h-4 cursor-pointer",onClick:()=>{P(!0)}})]}),1==h?(0,a.jsx)("div",{className:"flex flex-col gap-4 h-[calc(100%-80px)] overflow-y-auto ".concat((null==ef?void 0:ef.length)>0?"":"rounded-[8px] border border-[#000000]/10"),id:"scrollable_openTab",children:(null==ef?void 0:ef.length)>0?(0,a.jsx)(o.Z,{dataLength:(null==ef?void 0:ef.length)||0,next:ek,hasMore:eu,loader:eu&&(0,a.jsx)("div",{className:"flex justify-center items-center mt-4 bgblack-spin",children:(0,a.jsx)(n.Z,{size:"large"})}),style:{overflow:"hidden"},scrollableTarget:"scrollable_openTab",children:(0,a.jsx)("div",{className:"flex flex-col gap-4",children:ef.map((e,l)=>(0,a.jsx)("div",{className:"cursor-pointer",onClick:()=>{s(2),t({...e,symbol:e.symbol,contract_address:e.address,isPumpFun:1==h})},children:(0,a.jsx)(S,{sqlList:g,activeTab:h,item:e},l)}))})}):eF?(0,a.jsx)("div",{className:"py-6 flex justify-center items-center h-full bgblack-spin",children:(0,a.jsx)(n.Z,{size:"large"})}):(0,a.jsx)("div",{className:"flex items-center h-full ",children:(0,a.jsx)(M.Z,{isDarkMode:!0})})}):(0,a.jsx)("div",{className:"flex flex-col gap-4 h-[calc(100%-80px)] overflow-y-auto ".concat((null==eg?void 0:eg.length)>0?"":"rounded-[8px] border border-[#000000]/10"),id:"scrollable_openTab",children:(null==eg?void 0:eg.length)>0?(0,a.jsx)(o.Z,{dataLength:(null==eg?void 0:eg.length)||0,next:ek,hasMore:eu,loader:eu&&(0,a.jsx)("div",{className:"flex justify-center items-center mt-4 bgblack-spin",children:(0,a.jsx)(n.Z,{size:"large"})}),style:{overflow:"hidden"},scrollableTarget:"scrollable_openTab",children:(0,a.jsx)("div",{className:"flex flex-col gap-4",children:eg.map((e,l)=>(0,a.jsx)("div",{className:"cursor-pointer",onClick:()=>{s(2),t({...e,symbol:e.symbol,contract_address:e.address,isPumpFun:1==h})},children:(0,a.jsx)(S,{sqlList:g,activeTab:h,item:e},l)}))})}):eF?(0,a.jsx)("div",{className:"py-6 flex justify-center items-center h-full bgblack-spin",children:(0,a.jsx)(n.Z,{size:"large"})}):(0,a.jsx)("div",{className:"flex items-center h-full ",children:(0,a.jsx)(M.Z,{isDarkMode:!0})})})]})]})})}),(0,a.jsx)(Z,{showFilter:w,setShowFilter:()=>{N(!1)},onFilterContentChange:e=>{R(1),1===h?X([]):ee([]),B(e)}}),(0,a.jsx)(Z,{showFilter:y,setShowFilter:()=>{k(!1)},onFilterContentChange:e=>{et(1),1===h?ec([]):ed([]),H(e)}}),(0,a.jsx)(Z,{showFilter:T,setShowFilter:()=>{P(!1)},onFilterContentChange:e=>{em(1),1===h?ev([]):eb([]),I(e)}}),(0,a.jsx)(i.Z,{open:O,onCancel:()=>A(!1),footer:null,centered:!0,closeIcon:!1,maskClosable:!1,className:"add-symbol-modal ".concat(p?"w-[80%]":"!w-[480px]"," h-auto !rounded-[8px] !px-0"),children:(0,a.jsxs)("div",{className:"",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-[20px] font-bold text-[#FFFFFF]",children:m("settings")}),(0,a.jsx)("img",{src:"/icon/close.svg",className:"w-4 h-4 cursor-pointer",alt:"close",onClick:()=>A(!1)})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 mt-6",children:[(0,a.jsx)("span",{className:"text-[14px] text-[#FFFFFF]",children:m("tradingMode")}),(0,a.jsx)(c.ZP.Group,{className:"flex gap-6 text-white meme-radio",value:E.mode,options:[{value:1,label:m("turbo")},{value:2,label:m("antiMev")}],onChange:e=>{K({...E,mode:e.target.value})}})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 ",children:[(0,a.jsx)("span",{className:"text-[#FFFFFF] w-[160px] text-[14px]",children:m("slippage")}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"flex items-center justify-center w-[160px]  px-4 h-12 text-sm  text-[#FFFFFF] bg-[#FFFFFF]/5 rounded-[8px] gap-1\n                  ".concat(E.slippage?"":"border border-[#FFFFFF]"),children:(0,a.jsx)("span",{children:m("auto")})}),(0,a.jsx)(r.default,{className:"meme-input focus-within:border-[#FFFFFF]/10 flex-1 h-12 text-sm px-4  text-[#000000]/90 text-[#FFFFFF] bg-transparent focus-within:bg-transparent hover:bg-transparent               \n                    border border-[#FFFFFF]/10 hover:border-[#FFFFFF]/10\n                    ".concat(E.slippage?"":"border border-[#FFFFFF]"),value:E.slippage,suffix:(0,a.jsx)("span",{children:"%"}),onChange:e=>{let s=e.target.value;if(""===s||"."===s||/^\d*\.?\d*$/.test(s)){let e=parseFloat(s);e>=0&&e<=100?K({...E,slippage:s}):""===s&&K({...E,slippage:s})}}})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 ",children:[(0,a.jsx)("span",{className:"text-[#FFFFFF] w-[160px] text-[14px]",children:m("tradingFee")}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"flex items-center justify-center w-[160px] px-4 h-12 text-sm  text-[#FFFFFF] bg-[#FFFFFF]/5 rounded-[8px] gap-1   \n                  ".concat(E.tradeFee?"":"border border-[#FFFFFF]"),children:(0,a.jsx)("span",{children:m("auto")})}),(0,a.jsx)(r.default,{className:"meme-input focus-within:border-[#FFFFFF]/10 flex-1 h-12 text-sm px-4  text-[#000000]/90 text-[#FFFFFF] bg-transparent\n                    focus-within:bg-transparent hover:bg-transparent  hover:border-[#FFFFFF]/10                  \n                    border border-[#FFFFFF]/10\n                    ".concat(E.tradeFee?"border border-[#FFFFFF]":""),value:E.tradeFee,suffix:(0,a.jsx)("span",{children:"SOL"}),onChange:e=>{let s=e.target.value;(""===e.target.value||"."===e.target.value||/^\d*\.?\d*$/.test(e.target.value))&&K({...E,tradeFee:s})}})]})]})]}),(0,a.jsxs)("div",{className:"flex gap-6 items-center justify-center mt-6",children:[(0,a.jsx)("div",{className:"flex-1 border border-[#00000]/90 text-[#FFFFFF] text-[16px] font-semibold rounded-[6px] h-12 flex items-center justify-center cursor-pointer",onClick:()=>A(!1),children:m("cancel")}),(0,a.jsx)("div",{className:"flex-1 bg-[#2C7CF5] rounded-[6px] h-12 text-[#FFFFFF] text-[16px] font-semibold flex items-center justify-center cursor-pointer",onClick:()=>ej(),children:m("confirm")})]})]})})]})}},34848:function(e,s,t){t.d(s,{Z:function(){return i}});var a=t(57437);t(2265);
1var l=t(38706),r=t(41725),n=t(74294);function i(e){var s;let{item:t,tabIndex:i,setSymbol:c,setIsFocused:o,setTabIndex:d}=e,x=(0,l.T_)("meme.searchCard"),m=e=>{let s=[];if(localStorage.getItem("history-meme-search")){let e=JSON.parse(localStorage.getItem("history-meme-search"));e.some(e=>e.address===t.address)?s=[...e]:(s=[...e,t]).length>10&&s.shift()}else s=[t];d(2),c({symbol:t.symbol,contract_address:t.address,isPumpFun:t.supply,inprogress:t.supply?100:0,isResponseBirdeye:!0}),localStorage.setItem("history-meme-search",JSON.stringify(s)),o(!1)};return(0,a.jsx)("div",{className:"rounded-[8px] p-4 flex justify-between border border-[#000000]/10 mt-4 ".concat([4,5].includes(i)?"":"bg-[#FFFFFF]/5"),onClick:e=>{m(e)},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex gap-4",children:[(0,a.jsx)(n.Z,{customCls:"h-14 w-14 rounded-[8px]",alt:"avatar",src:t.logo||""}),(0,a.jsxs)("div",{className:"flex flex-col justify-between",children:[(0,a.jsx)("div",{className:"flex items-center",children:(0,a.jsx)("span",{className:"text-[16px] font-bold  ".concat([4,5].includes(i)?"text-[#000000]/90":"text-[#FFFFFF]"),children:t.symbol})}),(0,a.jsx)("div",{className:"flex items-center gap-2 text-[14px]  ".concat([4,5].includes(i)?"text-[#000000]/60":"text-[#FFFFFF]/60"),children:(0,a.jsx)("span",{children:t.name})})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsxs)("div",{className:"text-[12px]",children:[(0,a.jsxs)("span",{className:"".concat([4,5].includes(i)?"text-[#000000]/40":"text-[#FFFFFF]/40"),children:[x("chain")," "]}),(0,a.jsx)("span",{className:"".concat([4,5].includes(i)?"text-[#000000]/90":"text-[#FFFFFF]"),children:t.network})]}),(0,a.jsxs)("div",{className:"text-[12px]",children:[(0,a.jsxs)("span",{className:"".concat([4,5].includes(i)?"text-[#000000]/40":"text-[#FFFFFF]/40"),children:[x("price")," "]}),(0,a.jsxs)("span",{className:"".concat([4,5].includes(i)?"text-[#000000]/90":"text-[#FFFFFF]"),children:["$",(0,r.uf)(null!==(s=t.price)&&void 0!==s?s:0)]})]}),(0,a.jsxs)("div",{className:"text-[12px]",children:[(0,a.jsxs)("span",{className:"".concat([4,5].includes(i)?"text-[#000000]/40":"text-[#FFFFFF]/40"),children:[x("mc")," "]}),(0,a.jsxs)("span",{className:"".concat([4,5].includes(i)?"text-[#000000]/90":"text-[#FFFFFF]"),children:["$",(0,r.SO)(t.marketcap)]})]}),(0,a.jsxs)("div",{className:"text-[12px]",children:[(0,a.jsxs)("span",{className:"".concat([4,5].includes(i)?"text-[#000000]/40":"text-[#FFFFFF]/40"),children:[x("liquidity")," "]}),(0,a.jsxs)("span",{className:"".concat([4,5].includes(i)?"text-[#000000]/90":"text-[#FFFFFF]"),children:["$",(0,r.SO)(t.liquidity)]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-6",children:[(0,a.jsxs)("div",{className:"text-[12px]",children:[(0,a.jsxs)("span",{className:"".concat([4,5].includes(i)?"text-[#000000]/40":"text-[#FFFFFF]/40"),children:[x("created"),"  "]}),(0,a.jsx)("span",{className:"".concat([4,5].includes(i)?"text-[#000000]/90":"text-[#FFFFFF]"),children:t.creationtime})]}),(0,a.jsxs)("div",{className:"text-[12px]",children:[(0,a.jsxs)("span",{className:"".concat([4,5].includes(i)?"text-[#000000]/40":"text-[#FFFFFF]/40"),children:[x("token")," "]}),(0,a.jsx)("span",{className:"".concat([4,5].includes(i)?"text-[#000000]/90":"text-[#FFFFFF]"),children:t.address.slice(0,3)+"..."+t.address.slice(-3)})]})]})]})})}},93986:function(e,s,t){var a=t(57437);t(2265);var l=t(38706);s.Z=()=>{let e=(0,l.T_)("meme.tools"),s=[{id:1,name:"CoinMarketCap",content:e("toolsList.coinMarketCapDesc"),src:"/image/meme/tools/coinmarketcap.png",link:"https://coinmarketcap.com/"},{id:2,name:"CoinGecko",content:e("toolsList.coinGeckoDesc"),src:"/image/meme/tools/coingecko.png",link:"https://www.coingecko.com/"},{id:3,name:"DexScreener",content:e("toolsList.dexScreenerDesc"),src:"/image/meme/tools/dexscreener.png",link:"https://dexscreener.com/"},{id:4,name:"Nansen",content:e("toolsList.nansenDesc"),src:"/image/meme/tools/nansen.png",link:"https://app.nansen.ai/"},{id:5,name:"Fear & Greed Index",content:e("toolsList.fearGreedIndexDesc"),src:"/image/meme/tools/feargreed.png",link:"https://alternative.me/crypto/fear-and-greed-index/"},{id:6,name:"DexTools",content:e("toolsList.dexToolsDesc"),src:"/image/meme/tools/dextools.png",link:"https://www.dextools.io/app/cn/pairs"},{id:7,name:"GMGN.AI",content:e("toolsList.gmgnDesc"),src:"/image/meme/tools/gmgn.png",link:"https://gmgn.ai/?chain=sol&ref=auyYt6eo"},{id:8,name:"BubbleMaps",content:e("toolsList.bubbleMapsDesc"),src:"/image/meme/tools/bubblemaps.png",link:"https://app.bubblemaps.io/sol/"}],t=e=>{window.open(e,"_blank","noopener,noreferrer")};return(0,a.jsxs)("section",{className:"bg-white sm:h-[100vh] pb-4 sm:pb-0 border-t border-black/10",children:[(0,a.jsx)("h5",{className:"text-[18px] font-semibold text-[#000000]/90 pt-3 sm:pt-6 mb-4",children:e("title")}),(0,a.jsx)("div",{className:"flex flex-wrap gap-6",children:s.map((e,s)=>(0,a.jsxs)("div",{className:"bg-white rounded-[8px] p-4 shadow-[0px_2px_10px_2px_rgba(0,0,0,0.1)] flex items-center gap-2 cursor-pointer hover:shadow-lg transition-shadow duration-200  w-full sm:w-[calc(50%-12px)] md:w-[calc(33.333%-16px)] lg:w-[calc(25%-18px)] xl:w-[calc(20%-19.2px)]",onClick:()=>t(e.link),children:[(0,a.jsx)("img",{src:e.src,className:"w-[44px] h-[44px] object-contain flex-shrink-0 rounded-full",alt:e.name}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 flex-1 min-w-0",children:[(0,a.jsx)("span",{className:"text-[14px] font-semibold text-[#000000] truncate",style:{fontFamily:"Inter"},children:e.name}),(0,a.jsx)("span",{className:"text-[12px] font-medium text-[rgba(19,19,20,0.35)] line-clamp-2",style:{fontFamily:"PingFang SC"},children:e.content})]})]},s))})]})}},64897:function(e,s,t){t.r(s),t.d(s,{default:function(){return X}});var a=t(57437),l=t(2265),r=t(36760),n=t.n(r),i=t(48651),c=t(40740),o=t(54194),d=t(83983),x=t(41725),m=t(23374),F=t(53982),p=(0,l.memo)(function(e){let{symbol:s}=e;return(0,a.jsx)("div",{className:"h-full w-full",children:(0,a.jsx)("iframe",{src:"https://birdeye.so/tv-widget/".concat(s,"?chain=solana&chartInterval=1d&viewMode=pair&theme=dark&chartType=Candle&chartLeftToolbar=show"),width:"100%",height:"100%",frameBorder:"0",allowFullScreen:!0,allow:"fullscreen"})})}),u=t(94766),h=t(30166);let f=(0,h.default)(()=>Promise.all([t.e(79695),t.e(84353),t.e(35292),t.e(22676),t.e(49621),t.e(33262),t.e(42152),t.e(73256),t.e(95840),t.e(72086),t.e(42992),t.e(37545),t.e(29256),t.e(1491)]).then(t.bind(t,31002)),{ssr:!1}),v=(0,h.default)(()=>Promise.all([t.e(79695),t.e(84353),t.e(35292),t.e(22676),t.e(49621),t.e(33262),t.e(42152),t.e(73256),t.e(95840),t.e(72086),t.e(42992),t.e(37545),t.e(29256),t.e(23311)]).then(t.bind(t,89584)),{loadableGenerated:{webpack:()=>[89584]},ssr:!1});function g(e){let{id:s,geckoPoold:t,symbolInfo:r,tradeType:n,showLeft:i,tokenInfo:c}=e,o=(0,l.useRef)(null),[d,x]=(0,l.useState)(!0),[h,g]=(0,l.useState)(!1),[b,j]=(0,l.useState)(!1),[w,N]=(0,l.useState)(!1),y=(0,l.useRef)(null),_=(0,l.useRef)(null),[k,S]=(0,l.useState)(402),[C,T]=(0,l.useState)(402),{isMobile:Z}=(0,F.Z)();(0,l.useEffect)(()=>{setTimeout(()=>{x(!1)},2e3)},[r]);let M=()=>{j(!1),g(!1),o.current.setLayout([50,50])},P=(0,l.useCallback)(e=>{h||b||(N(!0),y.current=e.clientY,_.current=k,document.body.style.cursor="ns-resize",document.body.style.userSelect="none")},[k,h,b]),D=(0,l.useCallback)(()=>1*window.innerHeight,[]),B=(0,l.useCallback)(e=>{if(!w||null===y.current||null===_.current)return;let s=e.clientY-y.current,t=_.current-s;S(t=Math.max(100,Math.min(t,D()))),h&&g(!1)}
1,[w,D,h]),L=(0,l.useCallback)(()=>{w&&(N(!1),T(k),y.current=null,_.current=null,document.body.style.cursor="default",document.body.style.userSelect="auto")},[w,k]),H=()=>{g(!0),o.current&&o.current.setLayout([100,0])},z=()=>{j(!0),o.current&&o.current.setLayout([0,100])};return(0,l.useEffect)(()=>{if(w)return document.addEventListener("mousemove",B),document.addEventListener("mouseup",L),()=>{document.removeEventListener("mousemove",B),document.removeEventListener("mouseup",L)}},[w,B,L]),(0,a.jsx)("section",{className:"w-full  sm:min-w-[400px] sm:h-full ".concat(i?"sm:w-[calc(100%-600px)] sm:px-[4px]":"sm:w-[calc(100%-300px)] sm:pr-[10px]"),children:(0,a.jsx)("div",{className:"flex w-full flex-col h-full",children:Z?(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex flex-col gap-2 relative h-[500px] sm:h-full   w-full rounded-lg ",children:(0,a.jsxs)("div",{className:" flex-1 chart-container ",children:[d&&(0,a.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-[#131722]",children:(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,a.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-[--color-main] border-t-transparent"}),(0,a.jsx)("span",{className:"text-sm text-gray-400",children:"Loading..."})]})}),(0,a.jsx)(p,{symbol:c.address})]})}),(0,a.jsx)("div",{className:"sm:min-h-[660px]",children:u.J.isLiveTrade?(0,a.jsx)(f,{id:s,tradeType:n,symbolInfo:r,isMinimized:h,isMaximized:b,onDragStart:P,onMinimize:H,onMaximize:z,onRestore:M}):(0,a.jsx)(v,{id:s,tradeType:n,symbolInfo:r,isMinimized:h,isMaximized:b,onDragStart:P,onMinimize:H,onMaximize:z,onRestore:M})})]}):(0,a.jsxs)(m.eh,{direction:"vertical",ref:o,children:[(0,a.jsx)(m.s_,{defaultSize:50,children:(0,a.jsx)("div",{className:"flex flex-col gap-2 relative h-full   w-full rounded-lg ",children:(0,a.jsxs)("div",{className:" flex-1 chart-container ",children:[d&&(0,a.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-[#131722]",children:(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,a.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-[--color-main] border-t-transparent"}),(0,a.jsx)("span",{className:"text-sm text-gray-400",children:"Loading..."})]})}),(0,a.jsx)(p,{symbol:c.address})]})})}),(0,a.jsx)(m.OT,{className:"h-[8px] hover:bg-black/20 transition-colors ",children:(0,a.jsx)("div",{className:"w-full h-full flex items-center justify-center",children:(0,a.jsx)("div",{className:"w-8 h-[2px] bg-[#FFFFFF]/40 rounded-full"})})}),(0,a.jsx)(m.s_,{defaultSize:50,minSize:8,children:u.J.isLiveTrade?(0,a.jsx)(f,{id:s,tradeType:n,symbolInfo:r,isMinimized:h,isMaximized:b,onDragStart:P,onMinimize:H,onMaximize:z,onRestore:M}):(0,a.jsx)(v,{id:s,tradeType:n,symbolInfo:r,isMinimized:h,isMaximized:b,onDragStart:P,onMinimize:H,onMaximize:z,onRestore:M})})]})})})}var b=t(34029),j=t(27648),w=t(38706),N=t(61936);function y(e){var s,t,r,n,i,c,d,m,F,p,u,h,f,v,g;let{tokenInfo:y,tabTradeIndex:_,searchHome:k,setAdvPage:S,setTabData:C,favoriteType:T,tradeViewSymbolInfo:Z}=e;Z.address&&Z.isClickMp&&(y=Z);let[M,P]=(0,l.useState)(!1),D=(0,w.T_)("trading.tokenHeader"),{isLogin:B,setShowLoginModal:L}=(0,N.a)(),H=async e=>{try{if(""===e.trim())return;await navigator.clipboard.writeText(e),b.ZP.success(D("copiedToClipboard"))}catch(e){console.error("Failed to copy text: ",e),b.ZP.error(D("failedToCopy"))}finally{}};(0,l.useEffect)(()=>{y.address&&B&&z()},[y.address,B]);let z=async()=>{try{let e={tokenaddress:y.address},s=await (0,o.ox)(e);200===s.code&&P(1===s.data.isfavorite)}catch(e){console.error("Failed to copy text: ",e)}finally{}},I=async(e,s)=>{if(!B)return L(!0);try{let t=await (0,o.qi)({tokenaddress:e,type:s?1:0,tokentype:T});200===t.code&&(b.ZP.success(s?D("unsavedSuccessfully"):D("savedSuccessfully")),P(!s),1==_&&(S(1),C([]),k()))}catch(e){console.error("Failed to copy text: ",e)}finally{}};return(0,a.jsxs)("section",{className:"border border-[#000000]/5",children:[(0,a.jsxs)("div",{className:"w-full h-[120px] rounded-t-[8px] relative flex justify-center",children:[(0,a.jsx)("img",{src:"/image/meme/meme_bg.png",className:"w-full h-[120px] object-cover",alt:""}),((null==y?void 0:null===(s=y.extensions)||void 0===s?void 0:s.twitter)||(null==y?void 0:null===(t=y.extensions)||void 0===t?void 0:t.telegram)||(null==y?void 0:null===(r=y.extensions)||void 0===r?void 0:r.website))&&(0,a.jsxs)("div",{className:"absolute top-[80px]  h-6 w-fit bg-[#1C1C1C] rounded-[4px] px-8 flex items-center gap-4",children:[(null==y?void 0:null===(n=y.extensions)||void 0===n?void 0:n.twitter)&&(0,a.jsx)(j.default,{href:"".concat(null==y?void 0:null===(i=y.extensions)||void 0===i?void 0:i.twitter),target:"_blank",children:(0,a.jsx)("img",{src:"/image/meme/x.svg",className:"w-4 h-4",alt:"x"})}),(null==y?void 0:null===(c=y.extensions)||void 0===c?void 0:c.telegram)&&(0,a.jsx)(j.default,{href:"".concat(null==y?void 0:null===(d=y.extensions)||void 0===d?void 0:d.telegram),target:"_blank",children:(0,a.jsx)("img",{src:"/image/meme/telegram.svg",className:"w-4 h-4",alt:"telegram"})}),(null==y?void 0:null===(m=y.extensions)||void 0===m?void 0:m.website)&&(0,a.jsx)(j.default,{href:"".concat(null==y?void 0:null===(F=y.extensions)||void 0===F?void 0:F.website),target:"_blank",children:(0,a.jsx)("img",{src:"/image/meme/website.svg",className:"w-4 h-4",alt:"website"})}),(null==y?void 0:null===(p=y.extensions)||void 0===p?void 0:p.twitter)&&(0,a.jsxs)(j.default,{href:"https://x.com/search?q=$".concat(y.symbol),target:"_blank",className:"flex items-center",children:[(0,a.jsx)("img",{src:"/image/meme/x.svg",className:"w-4 h-4",alt:"x"}),(0,a.jsx)("span",{className:"text-[10px] text-[#FFFFFF] whitespace-nowrap",children:D("searchName")})]}),(null==y?void 0:null===(u=y.extensions)||void 0===u?void 0:u.twitter)&&(0,a.jsxs)(j.default,{href:"https://x.com/search?q=".concat(y.address),target:"_blank",className:"flex items-center",children:[(0,a.jsx)("img",{src:"/image/meme/x.svg",className:"w-4 h-4",alt:"x"}),(0,a.jsx)("span",{className:"text-[10px] text-[#FFFFFF] whitespace-nowrap",children:D("searchCA")})]})]})]}),(0,a.jsxs)("div",{className:"p-3 bg-[#FFFFFF]/5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:y.logoURI,className:"w-12 h-12 rounded-[8px]",alt:"avatar"}),(0,a.jsxs)("div",{className:"flex flex-col ",children:[(0,a.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,a.jsx)("span",{className:"text-[16px] font-semibold text-[#FFFFFF]",children:y.symbol}),(0,a.jsx)("img",{src:"/image/meme/R.svg",className:"w-3 h-3",alt:"radium"}),(0,a.jsx)("span",{className:"text-[10px] text-[#FFFFFF]/40",children:D("exchange")})]}),(0,a.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,a.jsx)("span",{className:"text-[16px] text-[#FFFFFF]/40 font-semibold w-[100px] truncate",children:y.name}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"text-[10px] text-[#FFFFFF]/40",children:y.address?y.address.slice(0,4)+"..."+y.address.slice(-4):"-"}
1),(0,a.jsx)("img",{src:"/image/home/copy.svg",className:"w-[10px] h-[10px] cursor-pointer",alt:"copy",onClick:()=>{H(y.address)}})]})]})]})]}),(0,a.jsx)("img",{src:M?"/image/meme/collect-acitve.png":"/image/meme/collect.png",className:"w-4 h-4 cursor-pointer",alt:"",onClick:()=>{I(y.address,M)}})]}),(0,a.jsxs)("div",{className:"mt-4 flex justify-between sm:justify-start",children:[(0,a.jsxs)("div",{className:"sm:flex-1  flex flex-col gap-2",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#FFFFFF]/40 ",children:D("fields.priceUsd")}),(0,a.jsxs)("span",{className:"text-[14px] font-medium text-[#FFFFFF]",children:["$",(0,x.uf)(null!==(h=y.price)&&void 0!==h?h:0)]})]}),(0,a.jsxs)("div",{className:"sm:flex-1  flex flex-col gap-2",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#FFFFFF]/40",children:D("fields.marketCap")}),(0,a.jsxs)("span",{className:"text-[14px] font-medium text-[#FFFFFF]",children:["$",(0,x.SO)(null!==(f=y.marketCap)&&void 0!==f?f:0)]})]}),(0,a.jsxs)("div",{className:"sm:flex-1 flex flex-col gap-2",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#FFFFFF]/40",children:D("fields.volume24h")}),(0,a.jsxs)("span",{className:"text-[14px] font-medium text-[#FFFFFF]",children:["$",(0,x.SO)(null!==(v=y.v24hUSD)&&void 0!==v?v:0)]})]}),(0,a.jsxs)("div",{className:"sm:flex-1 flex flex-col gap-2",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#FFFFFF]/40",children:D("fields.holders")}),(0,a.jsx)("span",{className:"text-[14px] font-medium text-[#FFFFFF]",children:null!==(g=y.holder)&&void 0!==g?g:0})]})]})]})]})}var _=t(29116),k=t(85156),S=t(97932),C=t(44373),T=t.n(C),Z=t(7310),M=t.n(Z),P=t(29967),D=t(93834),B=t(32747),L=t(59717),H=t(96854),z=t(1604),I=t(81278),O=t(42149),A=t(95008),E=t(68726),K=t(75107),U=t(75180),q=t(44856),$=t(81221);function R(e){let{tokenInfo:s,disabled:t,setTokenInfo:r,tabName:n,showBuySell:i,isUseJupiter:c,isPumpFun:o,tradeType:d=2,favoriteType:x}=e,[m,p]=(0,l.useState)(""),[u,h]=(0,l.useState)(n||"Buy"),[f,v]=(0,l.useState)(2),[g,j]=(0,l.useState)("0.003"),[y,C]=(0,l.useState)(!1),[Z,R]=(0,l.useState)(!1),[J,G]=(0,l.useState)(0),[W,Y]=(0,l.useState)("0"),[V,X]=(0,l.useState)([]),[Q,ee]=(0,l.useState)("0"),[es,et]=(0,l.useState)(!0),[ea,el]=(0,l.useState)(!0),[er,en]=(0,l.useState)(!1),[ei,ec]=(0,l.useState)(""),[eo,ed]=(0,l.useState)("Buy"),[ex,em]=(0,l.useState)(!1),{solBalance:eF}=(0,q.K)(),ep=(0,k.Os)(),{buyToken:eu,buyTokenRaydium:eh,buyTokenJupiter:ef,buyTokenPumpFun:ev,sellToken:eg,sellTokenRaydium:eb,sellTokenJupiter:ej,sellTokenPumpFun:ew,getBalance:eN,getTransactionStatus:ey,calculateBuyAmount:e_,calculateBuyAmountRaydium:ek,calculateBuyAmountJupiter:eS,calculateBuyAmountPumpFun:eC,calculateSellAmount:eT,calculateSellAmountRaydium:eZ,calculateSellAmountJupiter:eM,calculateSellAmountPumpFun:eP,getToken2022Balance:eD}=(0,B.l)(X),{setShowLoginModal:eB,userInfo:eL,solanaWallet:eH,isLogin:ez}=(0,N.a)(),{isMobile:eI}=(0,F.Z)(),{isAgentMode:eO,mode:eA}=(0,A.y)(),{isReadOnly:eE,handleReadOnlyClick:eK}=(0,E.E)(),eU=(0,w.T_)("meme.trading"),[eq,e$]=(0,l.useState)({}),[eR,eJ]=(0,l.useState)(!1),[eG,eW]=(0,l.useState)(1),[eY,eV]=(0,l.useState)(1),[eX,eQ]=(0,l.useState)(!1),[e0,e1]=(0,l.useState)(1),[e4,e2]=(0,l.useState)("0.003"),[e5,e3]=(0,l.useState)("0.003"),[e8,e6]=(0,l.useState)(1),[e9,e7]=(0,l.useState)("MC Down by MC"),[se,ss]=(0,l.useState)("Percent %"),[st,sa]=(0,l.useState)(0),[sl,sr]=(0,l.useState)(""),sn={0:{icon:"pending",btn:"Processing",text:"Your transaction is being processed"},1:{icon:"success",btn:"Done",text:"Your transaction succeeded"},2:{icon:"fail",btn:"Back",text:"Your transaction failed"}};(0,l.useEffect)(()=>{h(n||"Buy")},[n]),(0,l.useEffect)(()=>{eI&&!i&&X([])},[i]);let si=e=>{let s=e.match(/Simulation failed\. Message: ([^.]+)\./);if(s)return s[1];let t=e.match(/WalletSignTransactionError: ([^.]+)/);if(t)return t[1];let a=e.match(/Left: (\d+)/),l=e.match(/Right: (\d+)/);if(a&&l){let e=Number(l[1])/1e9;return"Minimum buy amount is ".concat(e.toFixed(9)," SOL")}let r=e.match(/Error Message: ([^.]+)/);if(r)return r[1];let n=e.match(/Message: Transaction simulation failed: ([^.]+)/);if(n)return n[1];let i=e.match(/Message: ([^.]+)/);return i?i[1]:e},sc=new S.Connection("https://mainnet.helius-rpc.com/?api-key=7408ef4f-db76-49cf-b0fa-76592ad87d2a"),so="Meme"===eA||2===d?new L.nC(new S.PublicKey("2Poh8gF6PJhjNAa5bxPZHZgpYZbFvD8JQwyUyE48Q5cL")):new H.Cs(new S.PublicKey("98rtueC8WNAYZs5fHwiy1k4CXCZC7xYANPTXgwNhtRs9")),sd=(0,l.useCallback)(async()=>!!ez&&(eH&&!eH.isCircle?!!ep.connected||(await ep.connect(),!1):!!eH&&!!eH.address||(em(!0),!1)),[ez,eH,ep]),sx=e=>{if(""===e||"."===e||/^\d*\.?\d*$/.test(e)){if(p(e),"Buy"===u&&es){let s=Number(e);s>0&&s<0?(en(!0),ec("Min ".concat(0," SOL"))):(en(!1),ec(""))}else en(!1),ec("")}},sm=async e=>{if(""===e||"."===e||/^\d*\.?\d*$/.test(e)){sr(e);let t=Number((Number(Q)*(Number(e)/100)).toFixed(6));if(se.includes("Percent")){sb(t);let e=await eT(null==s?void 0:s.contract_address,t);e.success&&G(e.amount),en(!1),ec("")}else{p(e);let a=await eT(null==s?void 0:s.contract_address,t);a.success&&G(a.amount),en(!1),ec("")}}},sF=async e=>{window.history.pushState({},"","/token/".concat(e))},sp=async()=>{var e,t,a,l,r;if(!ez){(0,z.H)("click_buy",{user_id:(null==eL?void 0:eL.walletaddress)||(null===(a=ep.publicKey)||void 0===a?void 0:a.toString())||"",token_ca:null==s?void 0:s.contract_address,amount:m}),eB(!0);return}if(!await sd())return;if((es?"So11111111111111111111111111111111111111112":null==s?void 0:s.contract_address)===(es?null==s?void 0:s.contract_address:"So11111111111111111111111111111111111111112")){b.ZP.error("Input and output token cannot be the same");return}if((0,z.H)("click_buy",{user_id:(null==eL?void 0:eL.walletaddress)||(null===(e=ep.publicKey)||void 0===e?void 0:e.toString())||"",token_ca:null==s?void 0:s.contract_address,amount:m}),0>=Number(m))return b.ZP.error("Please enter a valid amount");if(es&&0>Number(m))return b.ZP.error("Minimum amount is ".concat(0," SOL"));let n=Number(m);if(es||(n=J),n>Number(W))return(0,z.H)("insufficient_balance_alert",{user_id:(null==eL?void 0:eL.walletaddress)||(null===(l=ep.publicKey)||void 0===l?void 0:l.toString())||"",required_amount:n,current_balance:W}),b.ZP.error("Insufficient SOL balance");(0,z.H)("click_buy_start",{user_id:(null==eL?void 0:eL.walletaddress)||(null===(t=ep.publicKey)||void 0===t?void 0:t.toString())||"",token_ca:null==s?void 0:s.contract_address,amount:n});let i=(0,O.mr)(new Date().getTime());try{if(R(!0),null==eH?void 0:eH.isCircle){let e=await _.dJ.post("api/traders/memeTransaction",{amount:es?Number(m):Number(J),mint:s.contract_address,slippage:f/100,gas_fee:Number(g),is_buy:!0});if(200===e.code){let t=Math.random().toString(36).substr(2,9);X(a=>[{id:t,status:0,txhash:e.data.signature,showHash:!0,details:"Buy ".concat(m," ").concat(es?"SOL":null==s?void 0:s.ticker_symbol," of ").concat(null==s?void 0:s.ticker_symbol)},...a]),e.data.mint&&await sF(e.data.mint),sf(e.data.signature,t)}else throw Error(e.message||"Transaction failed")}else if(s.on_chain){let e;e=c&&s.amm_pool_id?await eh(null==s?void 0:s.contract_address,(null==s?void 0:s.amm_pool_id)||"",n,ep.publicKey,f,Number(g)):c?await ef(null==s?void 0:s.contract_address,n,ep.publicKey,f,Number(g)):o?await ev(null==s?void 0:s.contract_address,n,ep.publicKey,f,Number(g),es?void 0:Number(m)):await eu(null==s?void 0:s.contract_address,n,ep.publicKey,f,Number(g),Number(m)),await sv("string"==typeof e?{msg:e}:e)}else try{let e=new S.PublicKey(s.contract_address),t=new S.PublicKey(s.seed_pubkey),a=new S.Transaction,{blockhash:l,lastValidBlockHeight:r}=await sc.getLatestBlockhash("confirmed");console.log("获取区块信息",l,r),a.recentBlockhash=l,a.lastValidBlockHeight=r,a.feePayer=ep.publicKey,console.log("---transaction信息",a);let i=await so.vanityPump(sc,ep.publicKey,t.toBytes(),s.token_name,s.ticker_symbol,s.metadata_uri);console.log("--pumpIx信息",i);let c=await so.buy(sc,ep.publicKey,e,new(T())(n*S.LAMPORTS_PER_SOL),new(T())(Math.floor(n*S.LAMPORTS_PER_SOL*(1-f/100))));console.log("--buyIx",c),a.add(i),a.add(c);let o=await ep.sendTransaction(a,sc,{skipPreflight:!0,maxRetries:5,preflightCommitment:"confirmed"}),d={status:!0,txid:o};console.log("--发送交易结果",d),await sc.confirmTransaction(o,"confirmed"),console.log("--等待交易确认",d),await sv(d),console.log("--处理交易结果",d),await new Promise(e=>setTimeout(e,1e3)),console.log("--等待一下确保交易完全确认",d);let x=await (0,I.V3)({token_name:s.token_name,ticker_symbol:s.ticker_symbol,description:s.description,image_url:s.image_url,metadata_uri:s.metadata_uri,market_cap:"0",token_price:"0",category:s.category,twitter:s.twitter,website:s.website,telegram:s.telegram,contract_address:e.toString(),on_chain:1,launch_by_ai:s.lau
1nch_by_ai?1:0,creator_wallet_address:t.toString()});if(console.log("--tokenResponse",x),!x||200!==x.code)throw Error("Failed to save token information");let m=e.toString();await sF(m),console.log("--更新mint信息",m)}catch(e){throw console.log("--error--",e),e}let e=(0,O.mr)(new Date().getTime());(0,z.H)("transaction_duration",{user_id:(null==eL?void 0:eL.walletaddress)||(null===(r=ep.publicKey)||void 0===r?void 0:r.toString())||"",transaction_type:"buy",transaction_start_time:i,transaction_end_time:e})}catch(e){console.log("Buy error:",e),await sv({msg:"string"==typeof e?e:e.message})}finally{R(!1)}},su=async(e,s,t)=>{try{return await (0,K.fT)({contract_address:e,wallet_address:s,hash:t})}catch(e){throw console.error("Failed to get share trade:",e),e}},sh=async()=>{var e,t,a,l;if(!ez){(0,z.H)("click_sell",{user_id:(null==eL?void 0:eL.walletaddress)||(null===(a=ep.publicKey)||void 0===a?void 0:a.toString())||"",token_ca:null==s?void 0:s.contract_address,amount:m}),eB(!0);return}if(!await sd())return;if((es?"So11111111111111111111111111111111111111112":null==s?void 0:s.contract_address)===(es?null==s?void 0:s.contract_address:"So11111111111111111111111111111111111111112")){b.ZP.error("Input and output token cannot be the same");return}if((0,z.H)("click_sell",{user_id:(null==eL?void 0:eL.walletaddress)||(null===(e=ep.publicKey)||void 0===e?void 0:e.toString())||"",token_ca:null==s?void 0:s.contract_address,amount:m}),0>=Number(m))return b.ZP.error("Please enter a valid amount");if(Number(m)>Number(Q))return b.ZP.error("Insufficient token balance");(0,z.H)("click_sell_start",{user_id:(null==eL?void 0:eL.walletaddress)||(null===(t=ep.publicKey)||void 0===t?void 0:t.toString())||"",token_ca:null==s?void 0:s.contract_address,amount:m});let r=(0,O.mr)(new Date().getTime());try{if(R(!0),null==eH?void 0:eH.isCircle){let e=await _.dJ.post("api/traders/memeTransaction",{amount:es?Number(J):Number(m),mint:s.contract_address,slippage:f/100,gas_fee:Number(g),is_buy:!1});if(200===e.code){let t=Math.random().toString(36).substr(2,9);X(a=>[{id:t,status:0,txhash:e.data.signature,showHash:!0,details:"Sell ".concat(m," ").concat(es?"SOL":null==s?void 0:s.ticker_symbol)},...a]),sf(e.data.signature,t)}else throw Error(e.message||"Transaction failed")}else{let e;if(c&&s.amm_pool_id)e=await eb(null==s?void 0:s.contract_address,(null==s?void 0:s.amm_pool_id)||"",Number(m),new S.PublicKey((null==ep?void 0:ep.publicKey)||""),f,Number(g));else if(c)e=await ej(null==s?void 0:s.contract_address,Number(m),new S.PublicKey((null==ep?void 0:ep.publicKey)||""),f,Number(g));else if(o)e=await ew(null==s?void 0:s.contract_address,Number(m),new S.PublicKey((null==ep?void 0:ep.publicKey)||""),f,Number(g));else{let t=await so.bondingCurve(sc,new S.PublicKey(null==s?void 0:s.contract_address));if(!t)throw Error("Failed to fetch bonding curve information");let a=await eT(null==s?void 0:s.contract_address,es?Number(m):Number(J),es);if(!a.success)throw Error("Failed to calculate sell amount");let l=new(T())(Math.floor((es?Number(m):a.amount)*S.LAMPORTS_PER_SOL));if(new(T())(Math.floor(l.toNumber()*(1-f/100))).gt(new(T())(t.realSolReserves.toString())))throw Error("Insufficient SOL in pool to complete this transaction");e=await eg(null==s?void 0:s.contract_address,Number(m),new S.PublicKey((null==ep?void 0:ep.publicKey)||""),f,Number(g),es)}if(!e.status&&e.msg){if(e.msg.includes("insufficient funds")){b.ZP.error("Insufficient SOL in pool. Please try again later or reduce the amount");return}b.ZP.error(e.msg);return}await sv(e)}let e=(0,O.mr)(new Date().getTime());(0,z.H)("transaction_duration",{user_id:(null==eL?void 0:eL.walletaddress)||(null===(l=ep.publicKey)||void 0===l?void 0:l.toString())||"",transaction_type:"sell",transaction_start_time:r,transaction_end_time:e})}catch(a){console.error("Sell error:",{message:a instanceof Error?a.message:String(a),stack:a instanceof Error?a.stack:"No stack trace available"});let e=Math.random().toString(36).substr(2,9),t=es?"Sell ".concat(m," SOL worth of ").concat(null==s?void 0:s.ticker_symbol):"Sell ".concat(m," ").concat(null==s?void 0:s.ticker_symbol);X(s=>[...s,{id:e,status:2,txhash:"",showHash:!1,details:t,errorMessage:a instanceof Error?"".concat(a.message,"\n").concat(a.stack):String(a)}])}finally{R(!1)}},sf=async(e,t)=>{try{let a=setInterval(async()=>{let l=await ey(e,t);if(void 0===l){if("Sell"===u&&s.in_progress<100){var r,n;let t=await su(null==s?void 0:s.contract_address,eL.walletaddress,e);e$({...t.data,...null===(r=t.data)||void 0===r?void 0:r.holderDate,image_url:null===(n=t.data)||void 0===n?void 0:n.token_img}),eJ(!0)}clearInterval(a)}},3e3);setTimeout(async()=>{clearInterval(a);let l=ey(e,t);if(void 0===l&&"Sell"===u&&s.in_progress<100){var r,n;let t=await su(null==s?void 0:s.contract_address,eL.walletaddress,e);e$({...t.data,...null===(r=t.data)||void 0===r?void 0:r.holderDate,image_url:null===(n=t.data)||void 0===n?void 0:n.token_img}),eJ(!0)}},6e4)}
1catch(e){console.error("Check transaction status error:",e),X(e=>e.map(e=>e.id===t?{...e,status:2,errorMessage:"Failed to check transaction status"}:e))}},sv=async e=>{var t,a;console.log("errorresult: ",e);let l=Math.random().toString(36).substr(2,9),r="Buy"===u?es?"Buy ".concat(m," SOL of ").concat(null==s?void 0:s.ticker_symbol):"Buy ".concat(m," ").concat(null==s?void 0:s.ticker_symbol):es?"Sell ".concat(m," SOL worth of ").concat(null==s?void 0:s.ticker_symbol):"Sell ".concat(m," ").concat(null==s?void 0:s.ticker_symbol);e.status?((0,z.H)("Buy"===u?"buy_success":"sell_success",{user_id:(null==eL?void 0:eL.walletaddress)||(null===(t=ep.publicKey)||void 0===t?void 0:t.toString())||"",token_id:null==s?void 0:s.contract_address,amount:m}),X(s=>[{id:l,status:0,txhash:e.txid,showHash:!0,details:r},...s]),sg(e.txid),sf(e.txid,l)):((0,z.H)("Buy"===u?"buy_failed":"sell_failed",{user_id:(null==eL?void 0:eL.walletaddress)||(null===(a=ep.publicKey)||void 0===a?void 0:a.toString())||"",token_id:null==s?void 0:s.contract_address,amount:m,failure_reason:si(e.msg||"Unknown error")}),X(s=>[{id:l,status:2,txhash:e.txid,showHash:!0,details:r,errorMessage:si(e.msg||"Unknown error")},...s]))},sg=async e=>{try{await _.dJ.post("/api/usertrades/addMyTrades",{type:x,txtype:"Buy"===u?0:1,tokenaddress:null==s?void 0:s.contract_address,amount:"Buy"===u?m:Number(J),volume:"Buy"===u?Number(J):m,hash:e})}catch(e){}};(0,l.useEffect)(()=>{eH&&el((null==eH?void 0:eH.isCircle)||!1),eF&&Y(eF)},[eH,eF]),(0,l.useEffect)(()=>{let e=async()=>{if(!m||0>=Number(m)){G(0);return}try{let e=null;(e=o?"Buy"===u?await eC(null==s?void 0:s.contract_address,Number(m),es):await eP(null==s?void 0:s.contract_address,Number(m),es):c&&s.amm_pool_id?"Buy"===u?await ek(null==s?void 0:s.contract_address,(null==s?void 0:s.amm_pool_id)||"",Number(m),es,f):await eZ(null==s?void 0:s.contract_address,(null==s?void 0:s.amm_pool_id)||"",Number(m),es,f):c?"Buy"===u?await eS(null==s?void 0:s.contract_address,Number(m),es,f):await eM(null==s?void 0:s.contract_address,Number(m),es,f):"Buy"===u?await e_(null==s?void 0:s.contract_address,Number(m),es):await eT(null==s?void 0:s.contract_address,Number(m),es))&&e.success&&!e.error&&G(e.amount||0)}catch(e){console.error("Calculation error:",e),G(0)}},t=M()(e,500);return t(),()=>{t.cancel()}},[m,u,null==s?void 0:s.contract_address,null==s?void 0:s.amm_pool_id,e_,eT,ek,eZ,eS,eM,eC,eP,es,f,c,o]);let sb=e=>{p(Number(e.toFixed(2)).toString()),"Buy"===u&&es&&e>0&&e<0?(en(!0),ec("Min ".concat(0," SOL"))):(en(!1),ec(""))},sj=async()=>{if(!ez){var e;(0,z.H)("Buy"===u?"click_buy":"click_sell",{user_id:(null==eL?void 0:eL.walletaddress)||(null===(e=ep.publicKey)||void 0===e?void 0:e.toString())||"",token_ca:null==s?void 0:s.contract_address,amount:m}),eB(!0);return}"Buy"===u?(await sp(),(0,z.H)("click_quick_buy")):(await sh(),(0,z.H)("click_quick_sell"))};function sw(){let e=null==s?void 0:s.token_name,t=null==s?void 0:s.ticker_symbol,a=null==s?void 0:s.image_url,l="I just bought ".concat(e," (").concat(t,") on aiw3.ai! Check it out!");window.open("https://twitter.com/intent/tweet?text=".concat(encodeURIComponent(l),"&url=").concat(encodeURIComponent(location.origin+"/token/"+s.contract_address||""),"&image=").concat(encodeURIComponent(a||"")),"_blank")}return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex flex-col bg-[--bgc-primary-100] light:bg-[#FFFFFF]/5 p-3",children:[(0,a.jsxs)("div",{className:"mb-6 flex gap-5 rounded-md bg-white/5 light:bg-[#FFFFFF]/5 p-1",children:[(0,a.jsx)("button",{className:"w-1/2 rounded-md p-1 transition-all duration-300 ".concat("Buy"===u?"bg-[#11B382]/90 font-bold text-black light:text-white hover:shadow-[0_0_15px_rgba(156,255,30,0.5)] hover:brightness-110":"text-[#FFFFFF]/40"),disabled:!(null==s?void 0:s.ticker_symbol)||eE,onClick:()=>{!eE&&(h("Buy"),p(""),et(!0),eI&&X([]))},children:eU("tabs.buy")}),(0,a.jsx)("button",{className:"w-1/2 rounded-md p-1 transition-all duration-300 ".concat("Sell"===u?"bg-[#FF4D4F] font-bold text-black light:text-white hover:shadow-[0_0_15px_rgba(248,113,113,0.5)] hover:brightness-110":"text-[#FFFFFF]/40"),disabled:!(null==s?void 0:s.ticker_symbol)||eE,onClick:()=>{!eE&&(h("Sell"),p(""),sr(""),et(!1),en(!1),ec(""),eI&&X([]))},children:eU("tabs.sell")})]}),(0,a.jsx)("div",{className:"mb-4",children:"Buy"===u?(0,a.jsx)(P.ZP.Group,{className:"flex gap-6 meme-radio",value:eG,options:[{value:1,label:eU("buyModes.buyNow")},{value:2,label:eU("buyModes.buyDip")}],onChange:e=>{eW(e.target.value)}}):(0,a.jsx)(P.ZP.Group,{className:"flex gap-6 text-white meme-radio",value:eY,options:[{value:1,label:eU("sellModes.sellNow")},{value:2,label:eU("sellModes.autoSell"),disabled:!0}],onChange:e=>{eV(e.target.value)}})}),"Buy"===u?(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-1 rounded-lg border ".concat(er?"border-red-500":"border-white/10"," "),children:[(0,a.jsxs)("div",{className:"flex items-center rounded-lg p-4",children:[(0,a.jsx)("input",{value:m,type:"number",step:"0.00001",className:"w-full bg-transparent text-white focus:outline-none text-[20px] placeholder:text-[14px] placeholder:font-normal font-bold [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none ".concat(er?"text-red-500":""),placeholder:eU("inputs.amountToBuySOL"),onChange:e=>sx(e.target.value)}),(0,a.jsx)("div",{className:"flex items-center",children:(0,a.jsx)("span",{className:"ml-2 text-white",children:es?"SOL":null==s?void 0:s.ticker_symbol})})]}),(0,a.jsxs)("div",{className:"border-t border-[#FFFFFF]/10 h-[31px] grid grid-cols-6",children:[(0,a.jsx)("button",{className:"text-[#FFFFFF] border-r border-[#FFFFFF]/10",onClick:()=>sb(.25),children:"0.25"}),(0,a.jsx)("button",{className:"text-[#FFFFFF] border-r border-[#FFFFFF]/10",onClick:()=>sb(.5),children:"0.5"}),(0,a.jsx)("button",{className:"text-[#FFFFFF] border-r border-[#FFFFFF]/10",onClick:()=>sb(1),children:"1"}),(0,a.jsx)("button",{className:"text-[#FFFFFF] border-r border-[#FFFFFF]/10",onClick:()=>sb(2),children:"2"}),(0,a.jsx)("button",{className:"text-[#FFFFFF] border-r border-[#FFFFFF]/10",onClick:()=>sb(5),children:"5"}),(0,a.jsx)("button",{className:"text-[#FFFFFF]",onClick:()=>sb(10),children:"10"})]})]}),er&&ei&&(0,a.jsx)("div",{className:"text-sm text-red-500 mt-2",children:ei})]}):(0,a.jsxs)("div",{className:"mb-6 flex flex-col",children:[(0,a.jsx)("div",{className:"flex justify-between gap-4 h-12",children:[{id:1,name:25},{id:2,name:50},{id:3,name:100}].map((e,t)=>(0,a.jsxs)("div",{className:"text-[14px] rounded-[8px] flex items-center flex-1 cursor-pointer px-4\n                     ".concat(st===e.name?"bg-[#2C7CF5] text-[#FFFFFF]":"border border-[#FFFFFF]/10 text-[#FFFFFF]"),onClick:async()=>{ss("Percent"),sa(e.name),sr(String(e.name));let t=100===e.name?Number(Q):Number((Number(Q)*(e.name/100)).toFixed(6));if(es){let a=await eT(null==s?void 0:s.contract_address,t);a.success&&(sb(Number(a.amount.toFixed(6))),25===e.name&&G(Number(t.toFixed(6))))}else if(sb(t),25===e.name){let e=await eT(null==s?void 0:s.contract_address,t);e.success&&G(e.amount)}},children:[e.name," %"]},t))}),(0,a.jsx)("span",{className:"text-[14px] text-[#FFFFFF] my-4",children:"Or"}),(0,a.jsxs)("div",{className:"flex h-12 py-[14px] rounded-[8px] border border-[#FFFFFF]/10",children:[(0,a.jsx)(D.default,{defaultActiveFirstOption:!1,onChange:e=>{ss(e),sr(""),p("")},popupClassName:"custom-select-dropdown",dropdownStyle:{color:"#ffffff"},options:[{title:"Percent %",id:"Percent"}].map(e=>({value:e.id,label:e.title})).filter(e=>void 0!==e),value:se,className:"FilterDialog-meme-tansparent !bg-transparent text-sm font-normal w-[121px] h-full rounded-lg   "}),(0,a.jsx)("div",{className:"w-[1px] h-full bg-[#FFFFFF]/10"}),(0,a.jsxs)("div",{className:"flex relative",children:[(0,a.jsx)("input",{placeholder:eU("inputs.amountToSellPercentage"),type:"number",step:"0.0001",className:"w-full h-[46px] border border-[#FFFFFF]/10 rounded-[8px] outline-none border-none pl-6 pr-12 mt-[-14px] bg-transparent text-[#FFFFFF]",value:sl,onChange:e=>sm(e.target.value)}),se.includes("Percent")&&(0,a.jsx)("span",{className:"absolute top-[0] right-[16px] text-[14px] text-[#FFFFFF]/40",children:"%"})]})]})]}),("Buy"===u&&2===eG||"Sell"===u&&2===eY)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex h-12 py-[14px] rounded-[8px] border border-[#FFFFFF]/10 text-[#FFFFFF]",children:[(0,a.jsx)(D.default,{defaultActiveFirstOption:!1,onChange:e=>e7("MC Down by "+e),popupClassName:"custom-select-dropdown",dropdownStyle:{color:"#FFFFFF"}
1,options:[{title:"MC is",id:"MC"},{title:"Price is",id:"Price"}].map(e=>({value:e.id,label:e.title})).filter(e=>void 0!==e),value:e9,className:"FilterDialog-meme-tansparent !bg-transparent text-sm font-normal w-[121px] h-full rounded-lg   "}),(0,a.jsx)("div",{className:"w-[1px] h-full bg-[#FFFFFF]/10"}),(0,a.jsxs)("div",{className:"flex relative",children:[(0,a.jsx)("input",{type:"number",step:"0.0001",className:"w-full h-[46px] border border-[#FFFFFF]/10 rounded-[8px] outline-none border-none pl-6 pr-12 mt-[-14px] bg-transparent",value:e5,onChange:e=>{let s=e.target.value;(""===s||"."===s||/^\d*\.?\d*$/.test(s))&&e3(s)}}),(0,a.jsx)("span",{className:"absolute top-[0] right-[16px] text-[14px] text-[#FFFFFF]/40",children:"%"})]})]}),(0,a.jsx)("div",{className:"mt-2 mb-6 text-[12px] leading-[12px] text-[#FFFFFF]/40",children:"Triggers on: ".concat("MC Down by MC"===e9?"MC<= $".concat(e5):"Price<=$".concat(e5)," ")})]}),(0,a.jsxs)("div",{className:"flex flex-col p-4 py-2 rounded-[8px] border border-[#FFFFFF]/10 mb-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:"/image/meme/setting2.png",className:"w-4 h-4",alt:""}),(0,a.jsx)("span",{className:"text-white",children:eU("settings.advancedSettings")})]}),(0,a.jsx)("span",{className:"text-[20px] text-[#FFFFFF]/40 cursor-pointer",onClick:()=>{eQ(!eX)},children:"⌵"})]}),eX&&(0,a.jsxs)("div",{className:"flex flex-col mt-4 gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 ",children:[(0,a.jsx)("span",{className:"text-[14px] text-[#FFFFFF]",children:eU("settings.slippage")}),(0,a.jsx)("input",{type:"text",className:"h-12 border border-[#FFFFFF]/10 rounded-[8px] outline-none px-4 text-white bg-transparent",value:f,onChange:e=>v(Number(e.target.value))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 ",children:[(0,a.jsx)("span",{className:"text-[14px] text-[#FFFFFF]",children:eU("settings.smartMevProtection")}),(0,a.jsx)(P.ZP.Group,{className:"flex gap-6 text-white meme-radio",value:e0,options:[{value:1,label:eU("settings.fast")},{value:2,label:eU("settings.secure")}],onChange:e=>{e1(e.target.value)}})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 ",children:[(0,a.jsx)("span",{className:"text-[14px] text-[#FFFFFF]",children:eU("settings.setSpeed")}),(0,a.jsx)("div",{className:"flex items-center gap-3",children:[{id:1,name:"Auto"},{id:2,name:"Custom"}].map((e,s)=>(0,a.jsxs)("div",{className:"flex justify-center items-center h-12 flex-1 cursor-pointer\n                        gap-2 text-[14px] rounded-[8px] ".concat(e8===e.id?"bg-[#2C7CF5] text-[#FFFFFF]":"border border-[#FFFFFF]/10 text-[#FFFFFF]"),onClick:()=>{e6(e.id)},children:[e8===e.id&&(0,a.jsx)("img",{src:"/image/meme/finsh.png",className:"w-4 h-4",alt:""}),(0,a.jsx)("span",{children:e.name})]},s))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 ",children:[(0,a.jsx)("span",{className:"text-[14px] text-[#FFFFFF]",children:eU("settings.priorityFee")}),(0,a.jsxs)("div",{className:"flex relative",children:[(0,a.jsx)("input",{type:"number",step:"0.0001",className:"w-full h-12 border border-[#FFFFFF]/10 text-white rounded-[8px] outline-none pl-4 pr-12 bg-transparent",value:g,onChange:e=>{let s=e.target.value;(""===s||"."===s||/^\d*\.?\d*$/.test(s))&&j(s)}}),(0,a.jsx)("span",{className:"absolute top-[13px] right-[16px] text-[14px] text-[#FFFFFF]/40",children:"SOL"})]}),.003>Number(g)&&(0,a.jsx)("p",{className:"text-xs text-orange-400 ",children:eU("warnings.priorityFeeWarning")})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 ",children:[(0,a.jsx)("span",{className:"text-[14px] text-[#FFFFFF]",children:eU("settings.briberyAmount")}),(0,a.jsxs)("div",{className:"flex relative",children:[(0,a.jsx)("input",{type:"number",step:"0.0001",className:"w-full h-12 border border-[#FFFFFF]/10 text-white rounded-[8px] outline-none pl-4 pr-12 bg-transparent",value:e4,onChange:e=>{let s=e.target.value;(""===s||"."===s||/^\d*\.?\d*$/.test(s))&&e2(s)}}),(0,a.jsx)("span",{className:"absolute top-[13px] right-[16px] text-[14px] text-[#FFFFFF]/40",children:"SOL"})]})]})]})]}),"Buy"===u?(0,a.jsx)("button",{className:"rounded-lg py-2 font-bold text-black light:text-[#FFFFFF] h-12 ".concat(eE?"bg-gray-400 cursor-not-allowed opacity-50":t?"bg-gray-400 cursor-not-allowed opacity-50":"bg-[#11B382]/90 hover:bg-[#11B382]/90 hover:brightness-110 hover:shadow-[0_0_20px_rgba(156,255,30,0.5)]"," \n            ").concat(Z?"o
1pacity-70 cursor-not-allowed":""),onClick:()=>eK(sj),disabled:t||Z||eE,children:ez?Z?(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("div",{className:"w-4 h-4 border-2 border-black border-t-transparent rounded-full animate-spin"}),eU("buttons.processing")]}):eU("buttons.quickBuy"):eU("buttons.connectWallet")}):(0,a.jsx)("button",{className:"rounded-lg py-2 font-bold text-black light:text-[#FFFFFF] h-12 ".concat(eE?"bg-gray-400 cursor-not-allowed opacity-50":t?"bg-gray-400 cursor-not-allowed opacity-50":"bg-[#FF4D4F] hover:bg-[#FF4D4F] hover:brightness-110 hover:shadow-[0_0_20px_rgba(248,113,113,0.5)]","\n            ").concat(Z?"opacity-70 cursor-not-allowed":""),onClick:()=>eK(sj),disabled:t||Z||eE,children:ez?Z?(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("div",{className:"w-4 h-4 border-2 border-black border-t-transparent rounded-full animate-spin"}),eU("buttons.processing")]}):eU("buttons.quickSell"):eU("buttons.connectWallet")})]}),(0,a.jsx)("div",{className:"fixed -bottom-[1px] right-0 sm:bottom-4 sm:right-4 z-50 flex flex-col gap-2 shadow-[0_0_10px_rgba(0,0,0,0.5)]",children:V.map((e,s)=>{var t,l,r;return(0,a.jsxs)("div",{className:"relative w-[100vw] max-w-[400px] sm:rounded-lg bg-[#1E2329] p-4 sm:w-[400px]",children:[(0,a.jsx)("button",{onClick:()=>X(s=>s.filter(s=>s.id!==e.id)),className:"absolute top-2 right-4 text-gray-400 hover:text-white",children:"✕"}),(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)("img",{src:"/icon/".concat(null===(t=sn[e.status])||void 0===t?void 0:t.icon,".svg"),className:"h-[30px] w-[30px] ".concat(0===e.status?"animate-spin":"")}),(0,a.jsxs)("div",{className:"flex-1",children:[e.details&&(0,a.jsxs)("p",{className:"text-sm text-white",children:[(0,a.jsx)("span",{className:e.details.startsWith("Buy")?"text-[#11B382]/90":"text-[#FF4D4F]",children:e.details.startsWith("Buy")?eU("tabs.buy"):eU("tabs.sell")}),e.details.slice(e.details.startsWith("Buy")?3:4)]}),2===e.status&&e.errorMessage&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-600",children:e.errorMessage}),e.showHash&&2!==e.status&&(0,a.jsxs)("a",{href:"https://solscan.io/tx/".concat(e.txhash).concat("https://mainnet.helius-rpc.com/?api-key=7408ef4f-db76-49cf-b0fa-76592ad87d2a".match(/devnet/)?"?cluster=devnet":""),className:"mt-1 block text-sm text-gray-400 hover:text-white",target:"_blank",rel:"noopener noreferrer",children:["".concat(null===(l=e.txhash)||void 0===l?void 0:l.slice(0,8),"...").concat(null===(r=e.txhash)||void 0===r?void 0:r.slice(-8))," ↗"]})]})]}),1===e.status&&(0,a.jsx)("button",{className:"mt-4 w-full h-10 bg-[--color-main] rounded-lg sm:hidden",onClick:sw,children:(0,a.jsx)("span",{className:"text-sm font-bold text-black/90",children:eU("buttons.shareToTwitter")})})]},e.id)})}),(0,a.jsx)(U.Z,{shareItem:eq,open:eR,onClose:()=>eJ(!1),onConfirm:()=>eJ(!1)}),(0,a.jsx)($.Z,{open:ex,onOpenChange:em,onSuccess:()=>{console.log("Wallet generated successfully")}})]})}var J=t(74294),G=t(8087),W=t(23659),Y=t(68651),V=function(e){let{tokenInfo:s,disabled:t,setTokenInfo:r,tabName:n,showBuySell:i,isUseJupiter:c,isPumpFun:o,tradeType:d=2,favoriteType:x}=e,[m,F]=(0,l.useState)(n||"Buy"),p=(0,w.T_)("meme.trading"),[h,f]=(0,l.useState)(""),[v,g]=(0,l.useState)(""),[j,y]=(0,l.useState)("Percent %"),[k,S]=(0,l.useState)(!1),{isLogin:C,setShowLoginModal:T}=(0,N.a)(),Z=e=>{(""===e||"."===e||/^\d*\.?\d*$/.test(e))&&f(e)},M=async e=>{(""===e||"."===e||/^\d*\.?\d*$/.test(e))&&g(e)},P=async()=>{if(!C)return T(!0);if("Buy"===m&&0>=Number(h)||"Sell"===m&&(0>=Number(v)||Number(v)>100))return b.ZP.error(p("errors.invalidAmount"));try{S(!0);let e=await _.dJ.post("/api/meme-contest/trade",{quantity:"Buy"===m?h:new Y.Z(v).div(100).toString(),token_address:s.address,side:"Buy"===m?"buy":"sell"});console.log(e,"responseresponse"),200===e.code&&(await u.J.fetchBalance(),b.ZP.success("Buy"===m?p("messages.buySuccess"):p("messages.sellSuccess"))),S(!1)}catch(e){b.ZP.error(e.response.data.message),S(!1)}};return(0,a.jsxs)("div",{className:"flex flex-col bg-[--bgc-primary-100] light:bg-[#FFFFFF]/5 p-3",children:[(0,a.jsxs)("div",{className:"mb-6 flex gap-5 rounded-md bg-white/5 light:bg-[#FFFFFF]/5 p-1",children:[(0,a.jsx)("button",{className:"w-1/2 roun
1ded-md p-1 transition-all duration-300 ".concat("Buy"===m?"bg-[#11B382]/90 font-bold text-black light:text-white hover:shadow-[0_0_15px_rgba(156,255,30,0.5)] hover:brightness-110":"text-[#FFFFFF]/40"),disabled:!(null==s?void 0:s.ticker_symbol),onClick:()=>{F("Buy")},children:p("tabs.buy")}),(0,a.jsx)("button",{className:"w-1/2 rounded-md p-1 transition-all duration-300 ".concat("Sell"===m?"bg-[#FF4D4F] font-bold text-black light:text-white hover:shadow-[0_0_15px_rgba(248,113,113,0.5)] hover:brightness-110":"text-[#FFFFFF]/40"),disabled:!(null==s?void 0:s.ticker_symbol),onClick:()=>{F("Sell")},children:p("tabs.sell")})]}),"Buy"===m?(0,a.jsx)("div",{className:"mb-6",children:(0,a.jsxs)("div",{className:"flex flex-col gap-1 rounded-lg border border-white/10",children:[(0,a.jsxs)("div",{className:"flex items-center rounded-lg p-4",children:[(0,a.jsx)("input",{value:h,type:"number",step:"0.00001",className:"w-full bg-transparent text-white focus:outline-none text-[20px] placeholder:text-[14px] placeholder:font-normal font-bold [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none ",placeholder:p("inputs.amountToBuyUSDT"),onChange:e=>Z(e.target.value)}),(0,a.jsx)("div",{className:"flex items-center",children:(0,a.jsx)("span",{className:"ml-2 text-white",children:"USDT"})})]}),(0,a.jsxs)("div",{className:"border-t border-[#FFFFFF]/10 h-[31px] grid grid-cols-6",children:[(0,a.jsx)("button",{className:"text-[#FFFFFF] border-r border-[#FFFFFF]/10",onClick:()=>f("10"),children:"10"}),(0,a.jsx)("button",{className:"text-[#FFFFFF] border-r border-[#FFFFFF]/10",onClick:()=>f("50"),children:"50"}),(0,a.jsx)("button",{className:"text-[#FFFFFF] border-r border-[#FFFFFF]/10",onClick:()=>f("100"),children:"100"}),(0,a.jsx)("button",{className:"text-[#FFFFFF] border-r border-[#FFFFFF]/10",onClick:()=>f("500"),children:"500"}),(0,a.jsx)("button",{className:"text-[#FFFFFF] border-r border-[#FFFFFF]/10",onClick:()=>f("1000"),children:"1000"}),(0,a.jsx)("button",{className:"text-[#FFFFFF]",onClick:()=>f("5000"),children:"5000"})]})]})}):(0,a.jsxs)("div",{className:"mb-6 flex flex-col",children:[(0,a.jsx)("div",{className:"flex justify-between gap-4 h-12",children:[{id:1,name:"25"},{id:2,name:"50"},{id:3,name:"100"}].map((e,s)=>(0,a.jsxs)("div",{className:"text-[14px] rounded-[8px] flex items-center flex-1 cursor-pointer px-4\n                    ".concat(v===e.name?"bg-[#2C7CF5] text-[#FFFFFF]":"border border-[#FFFFFF]/10 text-[#FFFFFF]"),onClick:async()=>{y("Percent"),g(String(e.name))},children:[e.name," %"]},s))}),(0,a.jsx)("span",{className:"text-[14px] text-[#FFFFFF] my-4",children:"Or"}),(0,a.jsxs)("div",{className:"flex h-12 py-[14px] rounded-[8px] border border-[#FFFFFF]/10",children:[(0,a.jsx)(D.default,{defaultActiveFirstOption:!1,onChange:e=>{y(e),g("")},popupClassName:"custom-select-dropdown",dropdownStyle:{color:"#ffffff"},options:[{title:"Percent %",id:"Percent"}].map(e=>({value:e.id,label:e.title})).filter(e=>void 0!==e),value:j,className:"FilterDialog-meme-tansparent !bg-transparent text-sm font-normal w-[121px] h-full rounded-lg   "}),(0,a.jsx)("div",{className:"w-[1px] h-full bg-[#FFFFFF]/10"}),(0,a.jsxs)("div",{className:"flex relative",children:[(0,a.jsx)("input",{placeholder:p("inputs.amountToSellPercentage"),type:"number",step:"0.0001",className:"w-full h-[46px] border border-[#FFFFFF]/10 rounded-[8px] outline-none border-none pl-6 pr-12 mt-[-14px] bg-transparent text-[#FFFFFF]",value:v,onChange:e=>M(e.target.value)}),j.includes("Percent")&&(0,a.jsx)("span",{className:"absolute top-[0] right-[16px] text-[14px] text-[#FFFFFF]/40",children:"%"})]})]})]}),"Buy"===m?(0,a.jsx)("button",{className:"rounded-lg py-2 font-bold text-black light:text-[#FFFFFF] h-12 ".concat(t?"bg-gray-400 cursor-not-allowed opacity-50":"bg-[#11B382]/90 hover:bg-[#11B382]/90 hover:brightness-110 hover:shadow-[0_0_20px_rgba(156,255,30,0.5)]","\n              ").concat(k?"opacity-70 cursor-not-allowed":""),onClick:P,disabled:t||k,children:k?(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("div",{className:"w-4 h-4 border-2 border-black border-t-transparent roun
1ded-full animate-spin"}),p("buttons.processing")]}):p("buttons.quickBuy")}):(0,a.jsx)("button",{className:"rounded-lg py-2 font-bold text-black light:text-[#FFFFFF] h-12\n            ".concat(t?"bg-gray-400 cursor-not-allowed opacity-50":"bg-[#FF4D4F] hover:bg-[#FF4D4F] hover:brightness-110 hover:shadow-[0_0_20px_rgba(248,113,113,0.5)]"," \n            ").concat(k?"opacity-70 cursor-not-allowed":""),onClick:P,disabled:t,children:k?(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("div",{className:"w-4 h-4 border-2 border-black border-t-transparent rounded-full animate-spin"}),p("buttons.processing")]}):p("buttons.quickSell")}),(0,a.jsx)("div",{className:"text-[12px] text-[#B36B00] font-medium mt-3 leading-3",children:p("messages.simulatedTransactionNotice")})]})};function X(e){let{symbolInfo:s}=e,t=(0,w.T_)("meme.trade"),{solUSDValue:r}=(0,l.useContext)(G.X),{userInfo:m,isLogin:p,setShowLoginModal:h}=(0,N.a)(),[f,v]=(0,l.useState)(2),[b,j]=(0,l.useState)([{title:t("trending"),id:2},{title:t("favorite"),id:1}]),{isMobile:k}=(0,F.Z)(),[S,C]=(0,l.useState)(1),T=[{title:t("aiRecommendation"),id:1}],[Z,M]=(0,l.useState)(1),[P,D]=(0,l.useState)([]),[B,L]=(0,l.useState)(!1),[H,z]=(0,l.useState)(!1),[I,O]=(0,l.useState)(1),[A,E]=(0,l.useState)(1),[K,U]=(0,l.useState)([]),[q,$]=(0,l.useState)(!1),[Y,X]=(0,l.useState)(!1),[Q,ee]=(0,l.useState)(s.contract_address?s.contract_address:"7GCihgDB8fe6KNjn2MYtkzZcRjQy3t9GHdC8uHYmW2hr"),[es,et]=(0,l.useState)(""),[ea,el]=(0,l.useState)({}),[er,en]=(0,l.useState)(!1),[ei,ec]=(0,l.useState)("Buy"),[eo,ed]=(0,l.useState)(s),[ex,em]=(0,l.useState)(s.contract_address?100===s.inprogress?2:s.isPumpFun?3:4:2),[eF,ep]=(0,l.useState)(s.contract_address?s.isPumpFun?0:1:2),[eu,eh]=(0,l.useState)(!0),[ef,ev]=(0,l.useState)({}),eg=async()=>{$(!0);try{let e={1:o.oK,2:o.bU,3:o.Uu,5:o.q2}[f],s=await e({1:{page:A,size:10},2:{keyword:"Raydium",limit:20,offset:(A-1)*20,sort_by:1===f?"fdv":"trade_24h",markets:"Raydium"},3:{sorttype:2,sortby:1},5:{}}[f]);if(200===s.code&&s.data){let e=1===f?s.data.list||[]:5===f?s.data.positions||[]:s.data||[];5===f&&(e=e.map(e=>({...e,balance:Number((null==e?void 0:e.current_price)||0)*Number((null==e?void 0:e.quantity)||0)}))),X(3!==f&&5!==f&&(1===f?10===e.length:20===e.length)),1===f||2===f||5===f?U(s=>[...new Map([...s,...e||[]].map(e=>[null==e?void 0:e.address,e])).values()]):U(s=>{let t=new Map(e.map(e=>[null==e?void 0:e.address,e]));return s.forEach(e=>{t.has(null==e?void 0:e.address)||t.set(null==e?void 0:e.address,e)}),Array.from(t.values())})}}catch(e){console.error("fetchTokensSortedBy failed:",e)}finally{$(!1)}};(0,l.useEffect)(()=>{u.J.isLiveTrade?j(b.filter(e=>5!==e.id)):j([{title:t("trending"),id:2},{title:t("holding"),id:5},{title:t("favorite"),id:1}]),v(2)},[u.J.isLiveTrade]),(0,l.useEffect)(()=>{let e=null;return(async()=>{await eg(),(3===f||5===f)&&(e=setInterval(eg,3===f?5e3:1e4))})(),()=>{e&&clearInterval(e)}},[f,A]);let eb=async()=>{try{let e=await _.ZP.post("/api/birdeye/tokenInfo",{action:"tokenDetail",address:Q});el({...e.data.data.token_overview,...e.data.data.token_security,contract_address:Q,amm_pool_id:e.data.data.market.address,ticker_symbol:e.data.data.token_overview.symbol,on_chain:!0,image_url:e.data.data.token_overview.logoURI}),et(e.data.data.market.geckoPoold)}catch(e){console.error("Error fetching data:",e)}finally{}};(0,l.useEffect)(()=>{if(4!==ex||s.isResponseBirdeye){eb();let e=setInterval(eb,3e3);return()=>{e&&clearInterval(e)}}if(ef.address){let e={address:ef.address,symbol:ef.symbol,name:ef.name,logoURI:ef.logo,contract_address:ef.address,amm_pool_id:"",ticker_symbol:ef.symbol,image_url:ef.logo,price:ef.price,marketCap:ef.marketcap,v24hUSD:ef["24hvol"],holder:ef.holders,extensions:{...s.medias},on_chain:!0};ed({...e,isClickMp:!0}),el(e)}else el({...s,contract_address:s.contract_address,amm_pool_id:"",ticker_symbol:s.symbol,image_url:s.image_url||s.logo,logoURI:s.image_url||s.logo,price:s.price,marketCap:s.marketcap,v24hUSD:s["24hvol"],holder:s.holders,extensions:{...s.medias},on_chain:!0});et("")},[Q,ef]);let ej=async()=>{L(!0);try{let e={1:o.ud,2:o.qf}[S],s=await e({1:{},2:{}}[S]);if(200===s.code&&s.data){let e=s.data||[];z(!1),D(s=>{let t=new Map(e.map(e=>[null==e?void 0:e.address,e]));
1return s.forEach(e=>{t.has(null==e?void 0:e.address)||t.set(null==e?void 0:e.address,e)}),Array.from(t.values())})}}catch(e){console.error("fetchTokensSortedBy failed:",e)}finally{L(!1)}};return(0,l.useEffect)(()=>{let e=null;return(async()=>{await ej(),1===S&&(e=setInterval(ej,5e3))})(),()=>{e&&clearInterval(e)}},[S]),(0,a.jsxs)("section",{className:"py-[4px] flex flex-col gap-1 sm:gap-0 sm:flex-row  w-full sm:min-w-[1200px] sm:h-[calc(100vh-58px)] sm:overflow-hidden",children:[eu?(0,a.jsxs)("div",{className:"flex flex-col gap-1 w-full sm:max-w-[300px] sm:w-[300px] h-full",children:[(0,a.jsxs)("div",{className:"h-[550px] sm:h-[calc(50%)] bg-[#FFFFFF]/5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between border-b border-[#FFFFFF]/10 pl-3 pt-2",children:[(0,a.jsx)("div",{className:"flex gap-4",children:b.map((e,s)=>(0,a.jsx)("div",{className:n()("text-center text-[12px] pb-[12px] relative cursor-pointer whitespace-nowrap ",f===e.id?"font-semibold text-white after:absolute after:bottom-0 after:left-0 after:h-1 after:w-full after:bg-white after:rounded":"text-white/40"),onClick:()=>{if((1===e.id||5===e.id)&&!p)return h(!0);f!==e.id&&(v(e.id),U([]),E(1))},children:e.title},"tab-"+s))}),!k&&(0,a.jsx)("img",{src:"/image/meme/unFold.png",className:"w-3 h-4 cursor-pointer mt-[-12px]",onClick:()=>{eh(!eu)},alt:""})]}),(0,a.jsxs)("div",{className:"flex flex-col py-4 px-3 h-full",children:[(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("div",{className:"flex items-center gap-4 w-[120px]",children:5===f?(0,a.jsx)("span",{className:"text-[12px] text-[#FFFFFF]/40",children:t("currencyBalance")}):(0,a.jsx)("span",{className:"text-[12px] text-[#FFFFFF]/40",children:t("token")})}),3===f&&(0,a.jsx)("span",{className:"text-[12px] leading-3 text-[#FFFFFF]/40",children:t("time")}),(0,a.jsx)("span",{className:"text-[12px] leading-3 text-[#FFFFFF]/40 ".concat(3===f?"w-[52px]":"w-fit"),children:3===f?t("progress"):5===f?t("profit"):t("price24h")})]}),(0,a.jsx)("div",{className:"h-[calc(100%-60px)] overflow-y-auto mt-2",id:"scrollableDiv_main2",children:(null==K?void 0:K.length)>0?(0,a.jsx)(d.Z,{dataLength:(null==K?void 0:K.length)||0,next:()=>{Y&&E(A+1)},hasMore:Y,loader:Y&&(0,a.jsx)("div",{className:"flex justify-center items-center mt-4  bgblack-spin",children:(0,a.jsx)(i.Z,{size:"large"})}),style:{overflow:"hidden"},scrollableTarget:"scrollableDiv_main2",children:(0,a.jsx)("div",{children:K.map((e,s)=>{var t;return(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2 cursor-pointer h-9",onClick:()=>{if(Q!==e.address){if(ed({}),1===f){let s=2;100===e.inprogress?s=2:0===e.type?s=3:1===e.type&&(s=4,ev(e)),em(s)}else em(3===f?3:2);ep(1===f?e.type:3===f?0:2),ee(e.address)}},children:[(0,a.jsxs)("div",{className:"flex gap-2 w-[120px] min-w-[120px]",children:[(0,a.jsx)("div",{className:"w-9 h-9 rounded-[8px]",children:(0,a.jsx)(J.Z,{customCls:"size-9 rounded-[8px]",alt:"avatar",src:e.logo_uri||e.logo},e.address)}),(0,a.jsxs)("div",{className:"flex flex-col justify-between",children:[(0,a.jsx)("span",{className:"text-[14px] font-semibold text-[#FFFFFF] whitespace-nowrap",children:e.symbol}),5===f?(0,a.jsxs)("span",{className:"text-[12px] text-[#FFFFFF]/40 whitespace-nowrap leading-[12px]",children:["$",(0,x.uf)(e.balance)]}):(0,a.jsxs)("span",{className:"text-[12px] text-[#FFFFFF]/40 whitespace-nowrap leading-[12px]",children:["MC:  $",3===f||1===f?(0,x.SO)(e.marketcap*r):(0,x.SO)(null==e?void 0:e.market_cap)]})]})]}),3===f&&(0,a.jsx)("span",{className:"text-[12px] text-[#FFFFFF]/40 ",children:(0,x.tK)(1e3*e.createdtimestamp)}),3===f?(0,a.jsxs)("div",{className:"text-[14px] text-[#FFFFFF] w-[52px] text-right",children:[null!==(t=e.inprogress)&&void 0!==t?t:0,"%"]}):1===f?(0,a.jsxs)("div",{className:"flex flex-col justify-between items-end",children:[(0,a.jsxs)("span",{className:"text-[14px] text-[#FFFFFF]",children:["$",e.price?(0,x.uf)(e.price):0]}),(0,a.jsx)("span",{className:"text-[12px]  ".concat(e.changepercent?e.changepercent>0?"text-[#11B382]/90":"text-[#FF4D4F]":"text-[#FFFFFF]"),children:e.changepercent?Number(e.changepercent).toFixed(2)+"%":"-"})]}):5===f?(0,a.jsxs)("div",{className:"flex flex-col justify-between items-end",children:[(0,a.jsxs)("span",{className:"text-[14px] text-[#FFFFFF]",children:["$",e.unrealized_pnl?(0,x.uf)(e.unrealized_pnl):0]}),(0,a.jsx)("span",{className:"text-[12px]  ".concat(e.unrealized_pnl_rate?e.unrealized_pnl_rate>0?"text-[#11B382]/90":"text-[#FF4D4F]":"text-[#FFFFFF]"),children:e.unrealized_pnl_rate?Number(e.unrealized_pnl_rate).toFixed(2)+"%":"-"})]}):(0,a.jsxs)("div",{className:"flex flex-col justify-between items-end",children:[(0,a.jsxs)("span",{className:"text-[14px] text-[#FFFFFF]/90",children:["$",e.price?(0,x.uf)(e.price):0]}),(0,a.jsxs)("span",{className:"text-[12px]  ".concat(e.volume_24h_change_percent>0?"text-[#11B382]/90":"text-[#FF4D4F]"),children:[Number(e.volume_24h_change_percent).toFixed(2),"%"]})]})]},s)})})}):q?(0,a.jsx)("div",{className:"py-6 flex justify-center items-center  bgblack-spin",children:(0,a.jsx)(i.Z,{size:"large"})}):(0,a.jsx)("div",{className:"flex  items-center h-full",children:(0,a.jsx)(W.Z,{isDarkMode:!0})})},f)]})]}
1),(0,a.jsxs)("div",{className:"h-[550px] sm:h-[calc(50%)] bg-[#FFFFFF]/5",children:[(0,a.jsx)("div",{className:"flex items-center justify-between border-b border-[#FFFFFF]/10 pl-3 pt-2",children:(0,a.jsx)("div",{className:"flex gap-4",children:T.map((e,s)=>(0,a.jsx)("div",{className:n()("text-center text-[12px] pb-[12px] relative cursor-pointer whitespace-nowrap ",S===e.id?"font-semibold text-white after:absolute after:bottom-0 after:left-0 after:h-1 after:w-full after:bg-white after:rounded":"text-white/40"),onClick:()=>{S!==e.id&&(C(e.id),D([]),M(1))},children:e.title},"tab-"+s))})}),(0,a.jsxs)("div",{className:"flex flex-col py-4 px-3 h-full",children:[(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("div",{className:"flex items-center gap-4 w-[120px]",children:(0,a.jsx)("span",{className:"text-[12px] text-[#FFFFFF]/40",children:t("token")})}),(0,a.jsx)("span",{className:"text-[12px] text-[#FFFFFF]/40 w-fit",children:t("price24h")})]}),(0,a.jsx)("div",{className:"h-[calc(100%-60px)] overflow-y-auto mt-2",id:"scrollableDiv_main3",children:(null==P?void 0:P.length)>0?(0,a.jsx)(d.Z,{dataLength:(null==P?void 0:P.length)||0,next:()=>{H&&M(Z+1)},hasMore:H,loader:H&&(0,a.jsx)("div",{className:"flex justify-center items-center mt-4  bgblack-spin",children:(0,a.jsx)(i.Z,{size:"large"})}),style:{overflow:"hidden"},scrollableTarget:"scrollableDiv_main3",children:(0,a.jsx)("div",{children:P.map((e,s)=>(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2 cursor-pointer h-9",onClick:()=>{if(Q!==e.address){if(ed({}),1===f){let s=2;100===e.inprogress?s=2:0===e.type?s=3:1===e.type&&(s=4),em(s)}else em(3===f?3:2);ep(1===f?e.type:3===f?0:2),ee(e.address)}},children:[(0,a.jsxs)("div",{className:"flex gap-2 w-[120px] min-w-[120px]",children:[(0,a.jsxs)("div",{className:"w-9 h-9 rounded-[8px] relative",children:[(0,a.jsx)(J.Z,{customCls:"size-9 rounded-[8px]",alt:"avatar",src:e.logo_uri||e.logo},e.address),(0,a.jsx)("img",{src:"".concat(1===S?"/image/meme/ai.png":"/image/meme/x.png"),className:"w-3 h-3 absolute right-0 bottom-0 z-9",alt:""})]}),(0,a.jsxs)("div",{className:"flex flex-col justify-between",children:[(0,a.jsx)("div",{className:"flex items-center gap-1",children:(0,a.jsx)("span",{className:"text-[14px] font-semibold text-[#FFFFFF] whitespace-nowrap",children:e.symbol})}),(0,a.jsxs)("span",{className:"text-[12px] text-[#FFFFFF]/40 whitespace-nowrap leading-[12px]",children:["MC:  $",1===f?(0,x.SO)(e.marketcap*r):(0,x.SO)(null==e?void 0:e.marketcap)]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col justify-between items-end",children:[(0,a.jsxs)("span",{className:"text-[14px] text-[#FFFFFF]",children:["$",e.price?(0,x.uf)(e.price):0]}),(0,a.jsxs)("span",{className:"text-[12px]  ".concat(e.changepercent>0?"text-[#11B382]/90":"text-[#FF4D4F]"),children:[Number(e.changepercent).toFixed(2),"%"]})]})]},s))})}):B?(0,a.jsx)("div",{className:"py-6 flex justify-center items-center  bgblack-spin",children:(0,a.jsx)(i.Z,{size:"large"})}):(0,a.jsx)("div",{className:"flex items-center h-full",children:(0,a.jsx)(W.Z,{isDarkMode:!0})})},S)]})]})]}):(0,a.jsx)("div",{className:"flex z-[99] items-center justify-center w-3 h-4 rounded-r-[4px] fixed left-[72px] top-[73px] cursor-pointer bg-[#FFFFFF]/5 ",children:(0,a.jsx)("img",{src:"/image/meme/fold.png",className:"w-3 h-4 cursor-pointer",onClick:()=>{eh(!eu)},alt:""})}),(0,a.jsx)(g,{id:Q,geckoPoold:es,symbolInfo:eo,tradeType:ex,showLeft:eu,tokenInfo:ea}),(0,a.jsxs)("div",{className:"w-full sm:max-w-[400px] sm:w-[360px]  sm:min-w-[360px]  sm:h-[calc(100vh-70px)] sm:pb-[2px]  overflow-y-auto flex flex-col gap-[4px]",children:[(0,a.jsx)(y,{tokenInfo:ea,searchHome:eg,setAdvPage:E,setTabData:U,tabTradeIndex:f,favoriteType:eF,tradeViewSymbolInfo:eo}),(0,a.jsx)("div",{className:"block border border-[#000000]/10 rounded-[8px]",children:u.J.isLiveTrade?(0,a.jsx)("div",{children:2!=ex?(0,a.jsx)(R,{tokenInfo:ea,setTokenInfo:el,showBuySell:er,tabName:ei,isPumpFun:3==ex,favoriteType:eF}):(0,a.jsx)(R,{tokenInfo:ea,disabled:!ea.amm_pool_id&&!1,setTokenInfo:el,showBuySell:er,tabName:ei,isUseJupiter:!0,favoriteType:eF})}):(0,a.jsx)(V,{tokenInfo:ea,disabled:!ea.amm_pool_id&&!1,setTokenInfo:el,showBuySell:er,tabName:ei,isUseJupiter:!0,favoriteType:eF})})]}),(0,a.jsx)(c.Z,{placement:"bottom",width:"100vw",height:"auto",zIndex:999,onClose:e=>{e.preventDefault(),e.stopPropagation(),en(!1)},open:er,closeIcon:!1,className:"!bg-[--color-primary] light:!bg-white",styles:{body:{padding:0}},children:2!=ex?(0,a.jsx)(R,{tokenInfo:ea,setTokenInfo:el,tabName:ei,showBuySell:er,isPumpFun:3==ex,favoriteType:eF}):(0,a.jsx)(R,{tokenInfo:ea,disabled:!ea.amm_pool_id&&!1,setTokenInfo:el,tabName:ei,showBuySell:er,isUseJupiter:!0,favoriteType:eF})})]})}},31002:function(e,s,t){t.r(s);var a=t(57437),l=t(34029),r=t(48651),n=t(53743),i=t(53982),c=t(27648),o=t(2265),d=t(29116),x=t(41725),m=t(83983),F=t(74294),p=t(61936),u=t(76390),h=t(69587),f=t(97871),v=t(38706),g=t(23659);s.default=e=>{var s,t,b,j,w,N,y,_,k,S,C,T,Z,M,P,D;let{id:B,tradeType:L,symbolInfo:H,isMinimized:z,isMaximized:I,onRestore:O,onDragStart:A,onMinimize:E,onMaximize:K}=e,{userInfo:U,isLogin:q,setShowLoginModal:$}=(0,p.a)(),{isMobile:R}=(0,i.Z)(),J=(0,v.T_)("meme.tradeList"),G=[{id:3,name:J("tabs.myTrades")},{id:1,name:J("tabs.transactions")},{id:4,name:J("tabs.holders")},{id:6,name:J("tabs.orders")}],[W,Y]=(0,o.useState)(1);J("dateAge.date"),J("dateAge.age");let[V,X]=(0,o.useState)(2),[Q,ee]=(0,o.useState)(!1),[es,et]=(0,o.useState)(1),[ea,el]=(0,o.useState)([]),[er,en]=(0,o.useState)([]),[ei,ec]=(0,o.useState)(!1),[eo,ed]=(0,o.useState)(!1),[ex,em]=(0,o.useState)(!1),[eF,ep]=(0,o.useState)(1),[eu,eh]=(0,o.useState)(!1),[ef,ev]=(0,o.useState)([]),[eg,eb]=(0,o.useState)(!1),[ej,ew]=(0,o.useState)(1),[eN,ey]=(0,o.useState)(!1),[e_,ek]=(0,o.useState)([]),[eS,eC]=(0,o.useState)({}),eT=async()=>{ec(!0);try{let e={1:4===L||2===L&&100===H.inprogress?"/api/meme/getMoonpumpMarketTradesData":"/api/birdeye/tokenInfov2",4:"/api/meme/getHolderList?address=".concat(B)},s=await d.ZP[({1:"post",4:"get"})[W]](e[W],1===W&&4===L||2===L&&100===H.inprogress?{page:es,size:20,address:B}:{action:"tokenTrades",address:B,limit:10,offset:(es-1)*10}),t=4===L||2===L&&100===H.inprogress?s.data.data.list:s.data.data||[];ee(4===L||2===L&&100===H.inprogress?20===t.length:10===t.length),4===L||2===L&&100===H.inprogress?en(e=>[...new Map([...e,...t||[]].map(e=>[null==e?void 0:e.hash,e])).values()]):el(e=>[...new Map([...e,...t||[]].map(e=>[null==e?void 0:e.txhash,e])).values()])}catch(e){console.error("error-======",e)}finally{ec(!1)}};(0,o.useEffect)(()=>{et(1),el([]),en([])},[L,B]);let eZ=async()=>{ey(!0);try{var e;let s=await d.ZP.post("/api/usertrades/getMyTrades",{page:ej,size:10,tokenaddress:B}),t=(null===(e=s.data.data)||void 0===e?void 0:e.list)||[];eb(10===t.length),ek(e=>[...new Map([...e,...t||[]].map(e=>[null==e?void 0:e.id,e])).values()])}catch(e){console.error("error-======",e)}finally{ey(!1)}},eM=async()=>{try{let e=await d.ZP.post("/api/usertrades/getMyTradesData",{tokena
1ddress:B});eC(e.data.data||{})}catch(e){console.error("error-======",e)}finally{}};(0,o.useEffect)(()=>{3===W&&(eZ(),eM())},[ej,W,B]);let eP=async()=>{eh(!0);try{let e=(await d.ZP.get("/api/meme/getHolderList?address=".concat(B))).data.data||[];em(!1),ev(s=>[...new Map([...s,...e||[]].map(e=>[null==e?void 0:e.mint,e])).values()])}catch(e){console.error("error-======",e)}finally{eh(!1)}};(0,o.useEffect)(()=>{if(4===W||1===W){eT();let e=setInterval(eT,1e4);return()=>{e&&clearInterval(e)}}},[es,W,B]),(0,o.useEffect)(()=>{4===W?(ep(1),ev([])):3===W&&(ew(1),eC({}),ek([]))},[B]),(0,o.useEffect)(()=>{4===W&&eP()},[eF,W,B]);let eD=()=>{Q&&et(es+1)};return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col  bg-[#FFFFFF]/5 h-full",children:[(0,a.jsxs)("div",{className:"flex gap-6 items-center w-[calc(100%-24px)] overflow-x-auto py-3 mx-3 border-b border-[#FFFFFF]/10",children:[G.map((e,s)=>(0,a.jsx)("div",{className:"whitespace-nowrap flex text-[14px] cursor-pointer relative rounded-[4px] h-[24px]  items-center justify-center\n                ".concat(W===e.id?"font-semibold text-[#FFFFFF] after:absolute after:bottom-[-10px] after:bg-[#FFFFFF] after:left-0 after:h-1 after:w-full  after:rounded ":"text-[#FFFFFF]/40 "),onClick:()=>{if(!q&&3===e.id)return $(!0);[0,1,3,4].includes(e.id)?(Y(e.id),3!==e.id&&(ew(1),eC({}),ek([]))):l.ZP.info(J("comingSoon"))},children:e.name},e.id)),(0,a.jsxs)("div",{className:"flex sm:justify-end items-center sm:flex-1 gap-2",children:[(0,a.jsx)("img",{src:"/image/meme/power.png",className:"w-[18px] h-[18px] cursor-pointer",onClick:()=>{ed(!0)},alt:""}),(0,a.jsx)("button",{onClick:e=>{e.stopPropagation(),z||I?O():E()},className:"flex items-center justify-center w-4 h-4",children:z?(0,a.jsx)(u.Z,{className:" text-white"}):(0,a.jsx)("div",{className:"w-3 h-[1.5px] bg-white rounded-md"})}),(0,a.jsx)("button",{onClick:e=>{e.stopPropagation(),I?O():K()},className:"flex items-center justify-center w-4 h-4",children:I?(0,a.jsx)(h.Z,{className:" text-white"}):(0,a.jsx)(f.Z,{className:" text-white"})})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 ",children:[1===W&&(0,a.jsxs)("div",{className:"w-full overflow-x-auto p-3",children:[4===L||2===L&&100===H.inprogress?(0,a.jsxs)("div",{className:"mb-6 grid grid-cols-12 text-gray-500 text-xs sm:text-sm",children:[(0,a.jsx)("span",{className:"col-span-1 sm:col-span-2",children:J("transactionHeaders.user")}),(0,a.jsx)("span",{className:"col-span-2 text-center",children:J("transactionHeaders.amount")}),(0,a.jsx)("span",{className:"col-span-1 text-center",children:J("transactionHeaders.trade")}),(0,a.jsx)("span",{className:"col-span-4 sm:col-span-2 text-center",children:J("transactionHeaders.price")}),(0,a.jsx)("span",{className:"col-span-2 text-center",children:J("transactionHeaders.total")}),(0,a.jsx)("span",{className:"hidden sm:block sm:col-span-2 text-center",children:J("transactionHeaders.time")}),(0,a.jsx)("span",{className:"col-span-2 sm:col-span-1 text-right",children:J("transactionHeaders.tx")})]}):(0,a.jsxs)("div",{className:"flex   gap-[20px] justify-between items-center",children:[(0,a.jsx)("div",{className:"text-[10px] sm: flex items-center w-[100px] min-w-[100px] sm:flex-1 text-[#FFFFFF]/40",children:J("transactionHeaders.age")}),(0,a.jsxs)("div",{className:"flex items-center  gap-1 w-[100px] min-w-[100px] sm:flex-1",children:[(0,a.jsx)("span",{className:"text-[10px] sm:text-[12px] text-[#FFFFFF]/40",children:J("transactionHeaders.type")}),(0,a.jsx)("img",{src:"/image/meme/trade_filter.svg",className:"w-[12px] h-[12px]",alt:""})]}),(0,a.jsxs)("div",{className:"flex items-center  gap-1 w-[100px] min-w-[100px] sm:flex-1",children:[(0,a.jsx)("span",{className:"text-[10px] sm:text-[12px] text-[#FFFFFF]/40",children:J("transactionHeaders.totalUsd")}),(0,a.jsx)("img",{src:"/image/meme/trade_filter.svg",className:"w-[12px] h-[12px]",alt:""})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 w-[100px] min-w-[100px] sm:flex-1",children:[(0,a.jsx)("span",{className:"text-[10px] sm:text-[12px] text-[#FFFFFF]/40",children:J("transactionHeaders.amount")}),(0,a.jsx)("img",{src:"/image/meme/trade_filter.svg",className:"w-[12px] h-[12px]",alt:""})]}),(0,a.jsx)("div",{className:"flex items-center gap-1 w-[100px] min-w-[100px] sm:flex-1",children:(0,a.jsx)("span",{className:"text-[10px] sm:text-[12px] text-[#FFFFFF]/40",children:J("transactionHeaders.price")})}),(0,a.jsxs)("div",{className:"flex items-center gap-1 w-[100px] min-w-[100px] sm:flex-1",children:[(0,a.jsx)("span",{className:"text-[10px] sm:flex justify-between items-center w-full  font-semibold  mt-6text-[12px] text-[#FFFFFF]/40",children:J("transactionHeaders.maker")}),(0,a.jsx)("img",{src:"/image/meme/trade_filter.svg",className:"w-[12px] h-[12px]",alt:""})]})]}),(0,a.jsx)("div",{className:"flex flex-col w-fit sm:w-auto",children:4===L||2===L&&100===H.inprogress?er.length>0?(0,a.jsx)("div",{className:"h-[600px] sm:h-[35vh] overflow-y-auto mt-4",id:"scrollablemp1",children:(0,a.jsx)(m.Z,{dataLength:(null==er?void 0:er.length)||0,next:eD,hasMore:Q,loader:Q&&(0,a.jsx)("div",{className:"flex justify-center items-center mt-4  bgblack-spin",children:(0,a.jsx)(r.Z,{size:"large"})}),scrollableTarget:"scrollablemp1",children:(0,a.jsx)("div",{className:"flex flex-col gap-4 sm:gap-8 text-sm",children:er.map(e=>{var s,t;return(0,a.jsxs)("div",{className:"grid grid-cols-12 items-center text-[#FFFFFF] ".concat("just now"===(0,x.tK)(e.createdAt)?"animate-flash":""),children:[(0,a.jsxs)("span",{className:"col-span-1 sm:col-span-2 flex items-center cursor-pointer hover:opacity-80",children:[(0,a.jsx)(F.Z,{src:e.profile_photo_url||"",alt:"",customCls:"w-4 h-4 sm:w-5 sm:h-5 sm:min-w-5 sm:min-h-5 rounded-full"}),(0,a.jsx)("span",{className:"hidden sm:block ml-2 text-[10px] sm:text-xs bg-[#FFA39E] px-1 rounded text-black",children:e.nickname||""})]}),(0,a.jsx)("span",{className:"col-span-2 text-center text-[10px] sm:text-sm",children:(0,x.SO)(e.amount)}),(0,a.jsx)("span",{className:"col-span-1 text-center text-[10px] sm:text-sm ".concat((null==e?void 0:null===(s=e.trade_type)||void 0===s?void 0:s.toLowerCase())==="sell"?"text-red-500":"text-[#9cff1e] light:text-[#20c10e]"),children:null==e?void 0:null===(t=e.trade_type)||void 0===t?void 0:t.toUpperCase()}),(0,a.jsxs)("span",{className:"col-span-4 sm:col-span-2 text-center text-[10px] sm:text-sm",children:[(0,x.uf)(e.price_per_token||0)," SOL"]}),(0,a.jsxs)("span",{className:"col-span-2 text-center text-[10px] sm:text-sm",children:[(0,x.SO)(Number(e.total_price.toFixed(4)))," SOL"]}),(0,a.jsx)("span",{className:"hidden sm:block sm:col-span-2 text-center whitespace-nowrap",children:(0,x.tK)(e.createdAt)}),(0,a.jsx)(c.default,{href:"https://solscan.io/tx/".concat(e.hash).concat("https://mainnet.helius-rpc.com/?api-key=7408ef4f-db76-49cf-b0fa-76592ad87d2a".match(/devnet/)?"?cluster=devnet":""),target:"_blank",rel:"noopener noreferrer",className:"col-span-2 sm:col-span-1 text-right text-[#FFFFFF] hover:text-[--color-main] text-[10px] sm:text-sm",children:e.hash.slice(0,6)})]},e.id)})})})}):!ei&&(0,a.jsx)("div",{className:"flex items-center h-full mt-6",children:(0,a.jsx)(g.Z,{isDarkMode:!0})}):ea.length>0?(0,a.jsx)("div",{className:"h-[600px] sm:h-[35vh] overflow-y-auto mt-4",id:"scrollablemp2",children:(0,a.jsx)(m.Z,{dataLength:(null==ea?void 0:ea.length)||0,next:eD,hasMore:Q,loader:Q&&(0,a.jsx)("div",{className:"flex justify-center items-center mt-4  bgblack-spin",children:(0,a.jsx)(r.Z,{size:"large"})}),scrollableTarget:"scrollablemp2",children:(0,a.jsx)("div",{children:ea.map((e,s)=>{var t;return(0,a.jsxs)("div",{className:"flex justify-between items-center py-[16px] gap-[20px]",children:[(0,a.jsx)("span",{className:"flex items-center text-[14px] text-[#FFFFFF]/90 w-[100px] min-w-[100px] sm:flex-1",children:(0,x.tK)(1e3*e.blockunixtime)}),(0,a.jsx)("span",{className:"flex items-center text-[14px] w-[100px] min-w-[100px] sm:flex-1  ".concat("sell"===e.txtype?"text-[#FF4D4F]":"text-[#11B382]/90"),children:e.txtype}),(0,a.jsxs)("span",{className:"flex items-center text-[14px] w-[100px] min-w-[100px] sm:flex-1 text-[#FFFFFF]/90",children:["$",(0,x.uf)(null!==(t=e.volumeusd)&&void 0!==t?t:0)]}),(0,a.jsx)("span",{className:"flex  sm:flex-1 items-center w-[100px] min-w-[100px]  gap-1 text-[14px] text-[#FFFFFF]/90",children:(0,x.uf)(e.volume)}),(0,a.jsxs)("div",{className:"flex sm:flex-1 items-center w-[100px] min-w-[100px] gap-1 text-[14px] text-[#FFFFFF]/90",children:["$",(0,x.uf)(e.volumeusd/e.volume)]}),(0,a.jsx)("div",{className:"flex sm:flex-1 items-center w-[100px] min-w-[100px] gap-[16px]",children:(0,a.jsx)(c.default,{className:"flex items-center  text-[14px] w-[62px] text-[#FFFFFF]/90",href:"https://solscan.io/account/".concat(null==e?void 0:e.txhash),target:"_blank",children:(0,a.jsx)("span",{children:e.txhash?e.txhash.slice(0,3)+"..."+e.txhash.slice(-3):"-"})})})]},s)})})})}):!ei&&(0,a.jsx)("div",{className:"flex items-center h-full mt-6",children:(0,a.jsx)(g.Z,{isDarkMode:!0})})})]}),3===W&&(0,a.jsxs)("div",{className:"w-full overflow-x-auto h-full p-3",children:[R?(0,a.jsxs)("div",{className:"bg-[#FFFFFF]/5 rounded-[8px] p-3  mb-4 w-full",children:[(0,a.jsxs)("div",{className:"flex flex-col mb-10 ",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center w-full text-[10px]",children:[(0,a.jsx)("div",{className:"flex items-center flex-1 min-w-[120px] text-[#FFFFFF]/40 whitespace-nowrap",children:J("myTradesHeaders.balanceSol")}),(0,a.jsx)("div",{className:"flex items-center flex-1 min-w-[120px] text-[#FFFFFF]/40 whitespace-nowrap",children:J("myTradesHeaders.unrealizedProfits")}),(0,a.jsx)("div",{className:"flex items-center w-[80px] min-w-[80px] text-[#FFFFFF]/40 whitespace-nowrap",children:J("myTradesHeaders.realizedProfit")})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center w-full  text-[#FFFFFF]/90 font-semibold text-[12px] mt-3",children:[(0,a.jsxs)("span",{className:"flex items-center flex-1 min-w-[120px] cursor-pointer hover:opacity-80",children:[(0,x.uf)(null!==(s=eS.solamount)&&void 0!==s?s:0),"SOL"]}),(0,a.jsxs)("span",{className:"flex items-center flex-1 min-w-[120px] cursor-pointer hover:opacity-80 text-[#FF4D4F]",children:[(0,x.uf)(null!==(t=eS.futureprofit)&&void 0!==t?t:0),"SOL"]}),(0,a.jsxs)("span",{className:"flex items-center w-[80px] min-w-[80px] cursor-pointer hover:opacity-80",children:[(0,x.uf)(null!==(b=e
1S.nowprofit)&&void 0!==b?b:0),"SOL"]})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center w-full  text-[#FFFFFF]/90 font-semibold text-[10px] mt-1",children:[(0,a.jsx)("span",{className:"flex items-center flex-1 min-w-[120px] cursor-pointer hover:opacity-80",children:Number(eS.amount||0).toFixed(2)}),(0,a.jsx)("span",{className:"flex items-center flex-1 min-w-[120px] cursor-pointer hover:opacity-80 text-[#FF4D4F]",children:eS.futureprofitrate||0}),(0,a.jsxs)("span",{className:"flex items-center w-[80px] min-w-[80px] cursor-pointer hover:opacity-80",children:[eS.nowprofitrate||0,"%"]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center w-full text-[10px]",children:[(0,a.jsx)("div",{className:"flex items-center flex-1 min-w-[120px] text-[#FFFFFF]/40 whitespace-nowrap",children:J("myTradesHeaders.totalBuyAvg")}),(0,a.jsx)("div",{className:"flex items-center flex-1 min-w-[120px] text-[#FFFFFF]/40 whitespace-nowrap",children:J("myTradesHeaders.totalSoldAvg")}),(0,a.jsx)("div",{className:"flex items-center w-[80px] min-w-[80px] text-[#FFFFFF]/40 whitespace-nowrap",children:J("myTradesHeaders.totalProfit")})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center w-full  text-[#FFFFFF]/90 font-semibold text-[12px] mt-3",children:[(0,a.jsxs)("span",{className:"flex items-center flex-1 min-w-[120px] cursor-pointer hover:opacity-80",children:[(0,x.uf)(null!==(j=eS.buyavprice)&&void 0!==j?j:0),"SOL"]}),(0,a.jsxs)("span",{className:"flex items-center flex-1 min-w-[120px] cursor-pointer hover:opacity-80",children:[(0,x.uf)(null!==(w=eS.sellavprice)&&void 0!==w?w:0),"SOL"]}),(0,a.jsxs)("span",{className:"flex items-center w-[80px] min-w-[80px] cursor-pointer hover:opacity-80 text-[#FF4D4F]",children:[(0,x.uf)(null!==(N=eS.profit)&&void 0!==N?N:0),"SOL"]})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center w-full  text-[#FFFFFF]/90 font-semibold text-[10px] mt-1",children:[(0,a.jsxs)("span",{className:"flex items-center flex-1 min-w-[120px] cursor-pointer hover:opacity-80",children:["$",(0,x.uf)(null!==(y=eS.buyavpricesol)&&void 0!==y?y:0)]}),(0,a.jsxs)("span",{className:"flex items-center flex-1 min-w-[120px] cursor-pointer hover:opacity-80",children:["$",(0,x.uf)(null!==(_=eS.sellavpricesol)&&void 0!==_?_:0)]}),(0,a.jsx)("span",{className:"flex items-center w-[80px] min-w-[80px] cursor-pointer hover:opacity-80 text-[#FF4D4F]",children:Number(eS.profitrate||0).toFixed(2)})]})]})]}):(0,a.jsxs)("div",{className:"flex flex-col bg-[#FFFFFF]/5 rounded-[8px] p-4 mb-4 w-full",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center w-full ",children:[(0,a.jsx)("div",{className:"flex items-center sm:w-[100px] sm:min-w-[100px] text-[#FFFFFF]/40 whitespace-nowrap",children:J("myTradesHeaders.balanceSol")}),(0,a.jsx)("div",{className:"flex items-center sm:w-[126px] sm:min-w-[126px] text-[#FFFFFF]/40 whitespace-nowrap",children:J("myTradesHeaders.unrealizedProfits")}),(0,a.jsx)("div",{className:"flex items-center sm:w-[100px] sm:min-w-[100px] text-[#FFFFFF]/40 whitespace-nowrap",children:J("myTradesHeaders.realizedProfit")}),(0,a.jsx)("div",{className:"flex items-center sm:w-[100px] sm:min-w-[100px] text-[#FFFFFF]/40 whitespace-nowrap",children:J("myTradesHeaders.totalBuyAvg")}),(0,a.jsx)("div",{className:"flex items-center sm:w-[100px] sm:min-w-[100px] text-[#FFFFFF]/40 whitespace-nowrap",children:J("myTradesHeaders.totalSoldAvg")}),(0,a.jsx)("div",{className:"flex items-center sm:w-[100px] sm:min-w-[100px] text-[#FFFFFF]/40 whitespace-nowrap",children:J("myTradesHeaders.totalProfit")})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center w-full  text-[#FFFFFF]/90 font-semibold text-[14px] mt-6",children:[(0,a.jsxs)("span",{className:"sm:w-[100px] sm:min-w-[100px] flex items-center cursor-pointer hover:opacity-80",children:[(0,x.uf)(null!==(k=eS.solamount)&&void 0!==k?k:0),"SOL"]}),(0,a.jsxs)("span",{className:"flex items-center sm:w-[126px] sm:min-w-[126px] cursor-pointer hover:opacity-80 text-[#FF4D4F]",children:[(0,x.uf)(null!==(S=eS.futureprofit)&&void 0!==S?S:0),"SOL"]}),(0,a.jsxs)("span",{className:"sm:w-[100px] sm:min-w-[100px] flex items-center cursor-pointer hover:opacity-80",children:[(0,x.uf)(null!==(C=eS.nowprofit)&&void 0!==C?C:0),"SOL"]}),(0,a.jsxs)("span",{className:"sm:w-[100px] sm:min-w-[100px] flex items-center cursor-pointer hover:opacity-80",children:[(0,x.uf)(null!==(T=eS.buyavprice)&&void 0!==T?T:0),"SOL"]}),(0,a.jsxs)("span",{className:"sm:w-[100px] sm:min-w-[100px] flex items-center cursor-pointer hover:opacity-80",children:[(0,x.uf)(null!==(Z=eS.sellavprice)&&void 0!==Z?Z:0),"SOL"]}),(0,a.jsxs)("span",{className:"sm:w-[100px] sm:min-w-[100px] flex items-center cursor-pointer hover:opacity-80 text-[#FF4D4F]",children:[(0,x.uf)(null!==(M=eS.profit)&&void 0!==M?M:0),"SOL"]})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center w-full  text-[#FFFFFF]/90 font-semibold text-[14px] mt-4",children:[(0,a.jsx)("span",{className:"sm:w-[100px] sm:min-w-[100px] flex items-center cursor-pointer hover:opacity-80",children:Number(eS.amount||0).toFixed(2)}),(0,a.jsx)("span",{className:"flex items-center sm:w-[126px] sm:min-w-[126px] cursor-pointer hover:opacity-80 text-[#FF4D4F]",children:eS.futureprofitrate||0}),(0,a.jsxs)("span",{className:"sm:w-[100px] sm:min-w-[100px] flex items-center cursor-pointer hover:opacity-80",children:[eS.nowprofitrate||0,"%"]}),(0,a.jsxs)("span",{className:"sm:w-[100px] sm:min-w-[100px] flex items-center cursor-pointer hover:opacity-80",children:["$",(0,x.uf)(null!==(P=eS.buyavpricesol)&&void 0!==P?P:0)]}),(0,a.jsxs)("span",{className:"sm:w-[100px] sm:min-w-[100px] flex items-center cursor-pointer hover:opacity-80",children:["$",(0,x.uf)(null!==(D=eS.sellavpricesol)&&void 0!==D?D:0)]}),(0,a.jsx)("span",{className:"sm:w-[100px] sm:min-w-[100px] flex items-center cursor-pointer hover:opacity-80 text-[#FF4D4F]",children:Number(eS.profitrate||0).toFixed(2)})]})]}),(0,a.jsxs)("div",{className:"grid min-w-[500px] grid-cols-5 sm:grid-cols-10 items-center",children:[(0,a.jsx)("div",{className:"flex items-center min-w-[100px] col-span-1 sm:col-span-2 text-[#FFFFFF]/40",children:J("myTradesHeaders.time")}
1),(0,a.jsx)("div",{className:"flex items-center min-w-[100px] col-span-1 sm:col-span-2 text-[#FFFFFF]/40",children:J("myTradesHeaders.type")}),(0,a.jsx)("div",{className:"flex items-center min-w-[100px] col-span-1 sm:col-span-2 text-[#FFFFFF]/40",children:J("myTradesHeaders.totalSol")}),(0,a.jsx)("div",{className:"flex items-center min-w-[100px] col-span-1 sm:col-span-2 text-[#FFFFFF]/40",children:J("myTradesHeaders.number")}),(0,a.jsx)("div",{className:"flex items-center min-w-[100px] col-span-1 sm:col-span-2 text-[#FFFFFF]/40",children:J("myTradesHeaders.price")})]}),(0,a.jsx)("div",{className:"flex flex-col h-[600px] sm:h-full",children:e_.length>0?(0,a.jsx)("div",{className:"h-[calc(35vh-152px)] overflow-y-auto mt-4",id:"scrollablemp4",children:(0,a.jsx)(m.Z,{dataLength:(null==e_?void 0:e_.length)||0,next:()=>{eg&&ew(ej+1)},hasMore:eg,loader:eg&&(0,a.jsx)("div",{className:"flex justify-center items-center mt-4 bgblack-spin",children:(0,a.jsx)(r.Z,{size:"large"})}),style:{overflow:"hidden"},scrollableTarget:"scrollablemp4",children:(0,a.jsx)("div",{className:"flex flex-col gap-4 sm:gap-8 text-sm",children:e_.map((e,s)=>(0,a.jsxs)("div",{className:"grid min-w-[500px] grid-cols-5 sm:grid-cols-10 items-center text-[#FFFFFF]",children:[(0,a.jsx)("span",{className:"min-w-[100px] col-span-1 sm:col-span-2 flex items-center cursor-pointer hover:opacity-80",children:(0,x.tK)(1e3*e.createdat)}),(0,a.jsx)("span",{className:"min-w-[100px] col-span-1 sm:col-span-2 flex items-center cursor-pointer hover:opacity-80 ".concat(1===e.txtype?"text-red-500":"text-[#20c10e]"),children:0===e.txtype?J("tradeTypes.buy"):J("tradeTypes.sell")}),(0,a.jsxs)("span",{className:"min-w-[100px] col-span-1 sm:col-span-2 flex items-center cursor-pointer hover:opacity-80",children:[e.amount," SOL"]}),(0,a.jsx)("span",{className:"min-w-[100px] col-span-1 sm:col-span-2 flex items-center cursor-pointer hover:opacity-80",children:e.volume}),(0,a.jsxs)("span",{className:"min-w-[100px] col-span-1 sm:col-span-2 flex items-center cursor-pointer hover:opacity-80",children:[(0,x.uf)(e.price)," SOL"]})]},s))})})}):!eN&&(0,a.jsx)("div",{className:"flex items-center h-full mt-6",children:(0,a.jsx)(g.Z,{isDarkMode:!0})})})]}),4===W&&(0,a.jsxs)("div",{className:"w-full overflow-x-auto p-3",children:[(0,a.jsxs)("div",{className:"grid grid-cols-4 sm:grid-cols-8 items-cente gap-5 text-[10px] sm:text-[14px]",children:[(0,a.jsx)("div",{className:"flex items-center col-span-1 sm:col-span-2 text-[#FFFFFF]/40",children:J("holdersHeaders.holder")}),(0,a.jsx)("div",{className:"flex items-center col-span-1 sm:col-span-2 text-[#FFFFFF]/40",children:J("holdersHeaders.holdingAmount")}),(0,a.jsx)("div",{className:"flex items-center min-w-[90px] col-span-1 sm:col-span-2 text-[#FFFFFF]/40",children:J("holdersHeaders.holdingValueSol")}),(0,a.jsx)("div",{className:"flex items-center col-span-1 sm:col-span-2 text-[#FFFFFF]/40",children:J("holdersHeaders.holdingRatio")})]}),(0,a.jsx)("div",{className:"flex flex-col",children:ef.length>0?(0,a.jsx)("div",{className:"h-[600px] sm:h-[35vh] overflow-y-auto mt-4",id:"scrollablemp3",children:(0,a.jsx)(m.Z,{dataLength:(null==ef?void 0:ef.length)||0,next:()=>{ex&&ep(eF+1)},hasMore:ex,loader:ex&&(0,a.jsx)("div",{className:"flex justify-center items-center mt-4  bgblack-spin",children:(0,a.jsx)(r.Z,{size:"large"})}),style:{overflow:"hidden"},scrollableTarget:"scrollablemp3",children:(0,a.jsx)("div",{className:"flex flex-col gap-4 sm:gap-8 text-sm",children:ef.map(e=>(0,a.jsxs)("div",{className:"grid grid-cols-4 sm:grid-cols-8 items-center text-[#FFFFFF] gap-5 text-[12px] sm:text-[14px]",children:[(0,a.jsx)("span",{className:"col-span-1 sm:col-span-2 flex items-center cursor-pointer hover:opacity-80",children:(0,x._1)(e.tokenaccount)}),(0,a.jsx)("span",{className:"col-span-1 sm:col-span-2 flex items-center cursor-pointer hover:opacity-80",children:(0,x.SO)(e.amount)}),(0,a.jsx)("span",{className:"col-span-1 min-w-[90px] sm:col-span-2 flex items-center cursor-pointer hover:opacity-80",children:(0,x.SO)(e.valuesol)}),(0,a.jsx)("span",{className:"col-span-1 sm:col-span-2 flex items-center cursor-pointer hover:opacity-80",children:e.ratio})]},e.mint))})})}):!eu&&(0,a.jsx)("div",{className:"flex items-center h-full mt-6",children:(0,a.jsx)(g.Z,{isDarkMode:!0})})})]})]})]}),(0,a.jsx)(n.Z,{open:eo,onCancel:()=>ed(!1),footer:null,centered:!0,closeIcon:!1,maskClosable:!1,className:"meme-modal ".concat(R?"w-[80%]":"!w-[80%]"," !rounded-[8px] !px-0"),children:(0,a.jsxs)("div",{className:"h-full",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,a.jsx)("span",{className:"text-[20px] font-bold text-[#FFFFFF]",children:J("holderBubble")}),(0,a.jsx)("img",{src:"/icon/close.svg",className:"w-5 h-5 cursor-pointer",alt:"close",onClick:()=>ed(!1)})]}),(0,a.jsx)("div",{className:"h-[calc(100%-16px)] rounded-b-[8px]",children:(0,a.jsx)("iframe",{className:"rounded-b-[8px]",height:"100%",width:"100%",src:"https://faster100x.com/en/lite/embedded?tokenChain=sol&tokenAddress=".concat(B,"&platform=aiw3"),allow:"clipboard-write",allowFullScreen:!0})})]})})]})}}}]);

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.