1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GLTFLoader-DPV8zZL8.js","assets/three-vendor-C5Tu9S6t.js","assets/RoomEnvironment-BCyMDyAK.js"])))=>i.map(i=>d[i]); 2import{r as i,j as e}from"./framer-vendor-BQFVqQmJ.js";import{u as nr}from"./usePresenceSection-CXjt1671.js";import{y as Pl,s as X,_ as es,z as rr,H as ir,c as Ul,aw as or,i as cr,d as dr,F as xr}from"./index-CjIeyhK0.js";import{e as mr}from"./newsService-BQgcVFO6.js";import{p as Nt,C as pr}from"./quantum3dCamera-XaZFqiva.js";import{D as hr}from"./database-D989o2A5.js";import{O as ur}from"./orbit-CyQNO8FT.js";import{F as br}from"./footprints-zKef0unS.js";import{G as fr}from"./git-branch-DNQr8lCf.js";import{T as gr}from"./tag-D-OU4Gob.js";import{R as jr}from"./rotate-ccw-CjH9-cAc.js";import{L as Nr}from"./loader-2-2t0eZCiY.js";import{C as yr}from"./CardHelp-Dudye4uY.js";import{S as wr}from"./AnimatedFigures-pFn5dpuj.js";import{S as Vs,a as vr}from"./SignalLeaderDetail-C70hiaDA.js";import{m as _r}from"./modelAssets-Cve_j_kn.js";import{R as kr,P as Sr,a as Cr}from"./FootprintLeaderDetail-zNby6yp6.js";import{R as $r}from"./ReferralShareModal-CMcx4fSQ.js";import{Q as Il,A as Ol,H as Bl,D as Wl,a as Hl,b as ql,r as Mr,M as Ar}from"./advancedStats-CX6M1zkz.js";import{k as Dr,r as Gl,q as zl}from"./liveCoreSignal-BVn0TuoH.js";import{g as Lr,e as Tr,u as Rr}from"./portfolioOptimizer-Cs4lTlXA.js";import"./attentionPresence-CEDwXfSq.js";import"./userProfile-p6pv0ku8.js";import"./chart-vendor-D7KebX4S.js";import"./supabase-vendor-DJa18kbt.js";import"./help-circle-CMLbn46g.js";import"./trending-up-CBXZ7X3x.js";import"./shield-alert-CkS9T0F3.js";import"./award-uG-zyCxI.js";import"./flame-BIukEp-6.js";import"./trf-BqOrmo5D.js";import"./crown-DOUSA71V.js";import"./coins-DRRmiirH.js";import"./star-D6yVohWT.js";import"./gift-DFLVEdfq.js";import"./check-BwVKdKV7.js";import"./copy-DbEAbvhP.js";import"./chevron-right-n19QyBXg.js";import"./image-BwkzZyWG.js";import"./assetRanking-kutTatfc.js";import"./arrow-up-down-BajiIHyv.js";import"./arrow-up-DS2RQfLR.js";import"./arrow-down-BorHiYDD.js";const Vl={planeHalf:11,heightBand:7,heightMetric:"auto",edgeK:3,edgeThreshold:.55,maxEdges:420,maxFaces:140},Me={win:"250, 204, 21",loss:"52, 211, 153",pending:"148, 163, 184",breakeven:"96, 165, 250"};function Fr(a){return Me[a]??Me.pending}function Er(a){return a==="win"||a==="loss"||a==="breakeven"?a:"pending"}function jt(a){if(a==null)return null;const n=typeof a=="string"?Number.parseFloat(a):a;return Number.isFinite(n)?n:null}function Ge(a,n,r){return Math.min(r,Math.max(n,a))}function Pr(a){if(Array.isArray(a)){const n=a.map(r=>typeof r=="string"?Number.parseFloat(r):r);return n.every(r=>Number.isFinite(r))?n:null}if(typeof a=="string"){const n=a.trim();if(!n)return null;const r=n.replace(/^[[(]/,"").replace(/[\])]$/,"");if(!r)return null;const x=r.split(",").map(o=>Number.parseFloat(o));return x.length>0&&x.every(o=>Number.isFinite(o))?x:null}return null}function Ur(a){const n=new Array(a);let r=0;for(let o=0;o<a;o+=1){const d=Math.sin(o*1.37+.5)+.5*Math.cos(o*.71+1.1);n[o]=d,r+=d*d}const x=r>0?1/Math.sqrt(r):1;for(let o=0;o<a;o+=1)n[o]*=x;return n}function Ir(a,n,r=160){let x=Ur(n);for(let d=0;d<r;d+=1){const u=new Array(n).fill(0);for(let p=0;p<n;p+=1){const w=a[p];let C=0;for(let c=0;c<n;c+=1)C+=w[c]*x[c];u[p]=C}let f=0;for(let p=0;p<n;p+=1)f+=u[p]*u[p];if(f<1e-18)break;const y=1/Math.sqrt(f);for(let p=0;p<n;p+=1)u[p]*=y;x=u}let o=0;for(let d=0;d<n;d+=1){let u=0;for(let f=0;f<n;f+=1)u+=a[d][f]*x[f];o+=x[d]*u}return{vector:x,value:o}}function Or(a){const n=a.length,r=n>0?a[0].length:0;if(n<2||r===0)return{coords:a.map(()=>[0,0,0]),variance:[0,0,0]};const x=new Array(r).fill(0);for(const c of a)for(let N=0;N<r;N+=1)x[N]+=c[N];for(let c=0;c<r;c+=1)x[c]/=n;const o=a.map(c=>c.map((N,v)=>N-x[v])),d=Array.from({length:r},()=>new Array(r).fill(0));for(const c of o)for(let N=0;N<r;N+=1){const v=c[N];if(v===0)continue;const M=d[N];for(let F=N;F<r;F+=1)M[F]+=v*c[F]}for(let c=0;c<r;c+=1)for(let N=c;N<r;N+=1){const v=d[c][N]/n;d[c][N]=v,d[N][c]=v}let u=0;for(let c=0;c<r;c+=1)u+=d[c][c];u=u||1;const f=[],y=[],p=d.map(c=>c.slice());for(let c=0;c<3;c+=1){const{vector:N,value:v}=Ir(p,r);f.push(N),y.push(Math.max(v,0));for(let M=0;M<r;M+=1){const F=N[M];for(let B=0;B<r;B+=1)p[M][B]-=v*F*N[B]}}const w=o.map(c=>f.map(N=>{let v=0;for(let M=0;M<r;M+=1)v+=c[M]*N[M];return v})),C=[y[0]/u,y[1]/u,y[2]/u];return{coords:w,variance:C}}function Yl(a,n){if(a.length===0)return 0;if(a.length===1)return a[0];const r=(a.length-1)*n,x=Math.floor(r),o=r-x,d=a[x+1];return d===void 0?a[x]:a[x]+o*(d-a[x])}function Xl(a){const n=a.length;if(n<=1)return a.map(()=>.5);const r=a.map((o,d)=>[o,d]).sort((o,d)=>o[0]-d[0]),x=new Array(n);return r.forEach(([,o],d)=>{x[o]=d/(n-1)}),x}function ts(a,n){if(a.length===0)return[];const r=a.slice().sort((f,y)=>f-y),x=Yl(r,.05),o=Yl(r,.95),d=(x+o)/2,u=(o-x)/2||1;return a.map(f=>Ge((f-d)/u,-1.2,1.2)*n)}function Br(a,n){const r=a.market_state;if(r&&typeof r=="object"){const x=jt(r.volatilityTemp);if(x!==null)return Ge(x/100,0,1);const o=jt(r.atrPercent);if(o!==null)return Ge(o/5,0,1);const d=jt(r.volatility);if(d!==null)return Ge(d<=1?d:d/100,0,1);const u=jt(r.atr);if(u!==null)return Ge(u/50,0,1)}return n!==null?Ge(Math.abs(n)/10,.05,1):.35}function Wr(a,n,r,x){const o=Math.min(a.length,n.length);let d=0;for(let p=0;p<o;p+=1)d+=a[p]*n[p];const u=r??Math.sqrt(a.reduce((p,w)=>p+w*w,0)),f=x??Math.sqrt(n.reduce((p,w)=>p+w*w,0)),y=u*f;return y>1e-12?d/y:0}function Hr(a,n,r,x){const o=a.length;if(o<2)return[];const d=a.map(p=>Math.sqrt(p.reduce((w,C)=>w+C*C,0))),u=[];for(let p=0;p<o;p+=1)for(let w=p+1;w<o;w+=1){const C=Wr(a[p],a[w],d[p],d[w]);C>=r&&u.push({a:p,b:w,similarity:C})}u.sort((p,w)=>w.similarity-p.similarity);const f=new Array(o).fill(0),y=[];for(const p of u){if(y.length>=x)break;f[p.a]>=n||f[p.b]>=n||(y.push(p),f[p.a]+=1,f[p.b]+=1)}return y}function qr(a,n){if(n<=0||a.length<3)return[];const r=new Map,x=(u,f,y)=>{let p=r.get(u);p||(p=new Map,r.set(u,p)),p.set(f,y)};for(const u of a)x(u.a,u.b,u.similarity),x(u.b,u.a,u.similarity);const o=new Set,d=[];for(const u of a){const f=r.get(u.a),y=r.get(u.b);if(!(!f||!y))for(const[p,w]of f){if(p===u.b)continue;const C=y.get(p);if(C===void 0)continue;const c=[u.a,u.b,p].sort((v,M)=>v-M),N=`${c[0]}-${c[1]}-${c[2]}`;o.has(N)||(o.add(N),d.push({a:c[0],b:c[1],c:c[2],strength:(u.similarity+w+C)/3}))}}return d.sort((u,f)=>f.strength-u.strength),d.slice(0,n)}function Zl(a,n={},r="live"){const x={...Vl,...n},o=[];let d=0;for(const R of a){const j=Pr(R.embedding);
2j&&(d===0&&(d=j.length),j.length===d&&o.push({row:R,vec:j}))}if(o.length<2)return{points:[],edges:[],faces:[],variance:[0,0,0],source:r,count:o.length};const u=o.map(R=>R.vec),{coords:f,variance:y}=Or(u),p=ts(f.map(R=>R[0]),x.planeHalf),w=ts(f.map(R=>R[1]),x.planeHalf),C=o.map(R=>jt(R.row.pnl_percent)),c=o.map(R=>Er(R.row.outcome)),N=c.filter(R=>R==="win"||R==="loss").length/c.length,v=x.heightMetric==="auto"?N>=.15?"outcome":"pca3":x.heightMetric,M=ts(f.map(R=>R[2]),1);let F;if(v==="pnl"){const R=C.map(j=>j??0);F=ts(R,x.heightBand).map((j,b)=>C[b]===null?0:j)}else if(v==="outcome"){const R=x.heightBand,j=[],b=[];c.forEach(($,L)=>{$==="win"?j.push(L):$==="loss"&&b.push(L)});const D=($,L)=>C[$]!==null?L*C[$]:Math.abs(M[$]),g=Xl(j.map($=>D($,1))),U=Xl(b.map($=>D($,-1))),O=new Map;j.forEach(($,L)=>O.set($,g[L])),b.forEach(($,L)=>O.set($,U[L])),F=c.map(($,L)=>{const W=.18*M[L]*R;return $==="win"?Ge((.22+.7*(O.get(L)??.5))*R+W,-1.25*R,1.25*R):$==="loss"?Ge(-(.22+.7*(O.get(L)??.5))*R+W,-1.25*R,1.25*R):.5*M[L]*R})}else F=M.map(R=>R*x.heightBand);const B=o.map((R,j)=>{const b=c[j],D=C[j],g=D!==null?D:p[j]/x.planeHalf,U=D!==null?`${D>=0?"+":""}${D.toFixed(2)}%`:g.toFixed(4),O=R.row.created_at?Date.parse(R.row.created_at):Number.NaN;return{id:R.row.id,symbol:R.row.symbol,x:p[j],y:F[j],z:w[j],outcome:b,pnlPercent:D,labelValue:g,label:U,volatility:Br(R.row,D),color:Fr(b),createdAt:Number.isFinite(O)?O:0}}),T=Hr(u,x.edgeK,x.edgeThreshold,x.maxEdges),J=qr(T,x.maxFaces??Vl.maxFaces);return{points:B,edges:T,faces:J,variance:y,source:r,count:B.length}}async function Gr(a,{symbol:n=null,limit:r=300}={}){try{const{data:x,error:o}=await a.rpc("get_constellation_embeddings",{p_limit:r,p_symbol:n});if(!o&&Array.isArray(x)&&x.length>0)return x}catch{}try{let x=a.from("trade_embeddings").select("id, symbol, embedding, outcome, pnl_percent, market_state, similarity_score, created_at").order("created_at",{ascending:!1}).limit(r);n&&(x=x.eq("symbol",n));const{data:o,error:d}=await x;if(!d&&Array.isArray(o))return o}catch{}return[]}async function zr(a,n={},r={}){const x=await Gr(a,n);if(x.length>=2){const o=Zl(x,r,"live");if(o.points.length>=2)return o}return Zl(Yr({symbol:n.symbol??"BTCUSDT"}),r,"synthetic")}function Vr(a){let n=a>>>0;return()=>{n|=0,n=n+1831565813|0;let r=Math.imul(n^n>>>15,1|n);return r=r+Math.imul(r^r>>>7,61|r)^r,((r^r>>>14)>>>0)/4294967296}}function Yr(a={}){const{symbol:n="BTCUSDT",clusters:r=4,perCluster:x=34,dim:o=64,seed:d=1337}=a,u=Vr(d),f=()=>{const w=Math.max(u(),1e-9),C=u();return Math.sqrt(-2*Math.log(w))*Math.cos(2*Math.PI*C)},y=[],p=Date.now();for(let w=0;w<r;w+=1){const C=new Array(o).fill(0);for(let N=0;N<8;N+=1)C[(w*11+N*7)%o]=f()*.9;const c=(w%2===0?.62:.34)+w/r*.08;for(let N=0;N<x;N+=1){const v=C.map(J=>J+f()*.32),M=u()<c,F=u()<.82,B=F?M?"win":"loss":"pending",T=F?M?.4+u()*4.6:-(.4+u()*3.8):null;y.push({id:`syn-${w}-${N}`,symbol:n,embedding:v,outcome:B,pnl_percent:T,market_state:{volatilityTemp:24+w*14+u()*22},created_at:new Date(p-(y.length+1)*6e4).toISOString()})}}return y}const Ys={yaw:.55,pitch:-.42,zoom:1.05,panX:0,dolly:0},Kl={yaw:0,pitch:-.16,zoom:1,panX:0,dolly:0},Xr=-7.8,Zr=12,Qs=28,Kr=5,Jr=.12,Qr=14,Jl=46,Fe=-pr*.55;function et(a,n,r){return Math.min(r,Math.max(n,a))}function Xs(a){const n=a.split(",");return[parseInt(n[0],10)||0,parseInt(n[1],10)||0,parseInt(n[2],10)||0]}function rn(a){let n=a>>>0;return()=>{n|=0,n=n+1831565813|0;let r=Math.imul(n^n>>>15,1|n);return r=r+Math.imul(r^r>>>7,61|r)^r,((r^r>>>14)>>>0)/4294967296}}const ei=(()=>{const a=rn(987654321),n=[],r=Zr,x=(o,d)=>{const u=Xr+(a()*2-1)*.7,f=Math.pow(et(1-Math.abs(o)/r,0,1),1.6);n.push({x:o,y:u,z:d,t:f,tw:a()})};for(let o=0;o<1100;o+=1)x((a()*2-1)*r,(a()*2-1)*r);for(let o=0;o<520;o+=1)x((a()*2-1)*3.2,(a()*2-1)*r);return n})();function ti(a,n,r,x,o,d,u){for(const f of o)for(const y of ei){const p=Nt(y.x,y.y,y.z+f,n,r,x);if(p.depth<=Fe)continue;const w=d(p.depth);if(w<.03)continue;const C=.78+.22*Math.sin(u*.7+y.tw*6.283),c=(.05+.32*y.t)*w*C,N=Math.round(70+140*y.t),v=Math.round(150+15*y.t),M=Math.round(80-25*y.t);a.fillStyle=`rgba(${N}, ${v}, ${M}, ${c})`;const F=Math.max(.7,1.3*p.scale);a.fillRect(p.x-F/2,p.y-F/2,F,F)}}const si=(()=>{const a=rn(424242),n=[[120,70,200],[80,110,230],[205,90,185],[95,195,225],[228,228,250]],r=()=>{const o=a();return o<.42?n[0]:o<.7?n[1]:o<.85?n[2]:o<.95?n[3]:n[4]},x=[];for(let o=0;o<900;o+=1)x.push({x:(a()*2-1)*20,y:8+a()*16,z:(a()*2-1)*20,c:r(),b:.3+a()*.6,tw:a(),big:a()<.06});for(let o=0;o<420;o+=1){const d=a()*2-1;
2x.push({x:d*22+(a()*2-1)*3,y:10+a()*12+d*4,z:d*10+(a()*2-1)*3,c:r(),b:.5+a()*.5,tw:a(),big:a()<.1})}return x})();function ai(a,n,r,x,o,d){a.save(),a.globalCompositeOperation="lighter";for(const u of o)for(const f of si){const y=Nt(f.x,f.y,f.z+u,n,r,x);if(y.depth<=Fe)continue;const p=.6+.4*Math.sin(d*1.3+f.tw*6.283),w=et(.35+y.scale*.9,0,1),C=f.b*.5*p*w;if(C<.02)continue;a.fillStyle=`rgba(${f.c[0]}, ${f.c[1]}, ${f.c[2]}, ${C})`;const c=f.big?Math.max(1.4,2.4*y.scale):Math.max(.7,1.3*y.scale);f.big&&(a.shadowColor=`rgba(${f.c[0]}, ${f.c[1]}, ${f.c[2]}, ${C})`,a.shadowBlur=6),a.fillRect(y.x-c/2,y.y-c/2,c,c),f.big&&(a.shadowBlur=0)}a.restore()}function Zs(a,n,r,x,o,d,u,f,y){if(a.clearRect(0,0,n,r),!o||o.points.length===0)return;const p=o.points,w=p.reduce((j,b)=>j+b.volatility,0)/Math.max(p.length,1),C=-70-r*.04;a.save(),a.translate(0,C);const c=u==="fly"?[0,-Qs,Qs]:[0];ai(a,n,r,x,c,f);const N=p.map(j=>Nt(j.x,j.y,j.z,n,r,x)),v=[];for(const j of c)for(let b=0;b<p.length;b+=1){const D=j===0?N[b]:Nt(p[b].x,p[b].y,p[b].z+j,n,r,x);D.depth>Fe&&v.push({i:b,pr:D})}if(v.length===0){a.restore();return}let M=1/0,F=-1/0;for(const j of v)j.pr.depth<M&&(M=j.pr.depth),j.pr.depth>F&&(F=j.pr.depth);const B=F-M||1,T=j=>et(1-(j-M)/B,0,1);if(ti(a,n,r,x,c,T,f),d.showFaces&&o.faces.length>0){a.save(),a.globalCompositeOperation="lighter";for(const j of o.faces){const b=N[j.a],D=N[j.b],g=N[j.c];if(b.depth<=Fe||D.depth<=Fe||g.depth<=Fe)continue;const U=(T(b.depth)+T(D.depth)+T(g.depth))/3;if(U<.12)continue;const[O,$,L]=Xs(p[j.a].color),[W,ee,ce]=Xs(p[j.b].color),[Z,Y,je]=Xs(p[j.c].color),Be=Math.round((O+W+Z)/3),Ee=Math.round(($+ee+Y)/3),xe=Math.round((L+ce+je)/3),le=(.015+.07*j.strength)*U;a.fillStyle=`rgba(${Be}, ${Ee}, ${xe}, ${le})`,a.beginPath(),a.moveTo(b.x,b.y),a.lineTo(D.x,D.y),a.lineTo(g.x,g.y),a.closePath(),a.fill()}a.restore()}if(d.showEdges)for(const j of o.edges){const b=N[j.a],D=N[j.b];if(b.depth<=Fe||D.depth<=Fe)continue;const g=(T(b.depth)+T(D.depth))/2;a.strokeStyle=`rgba(150, 197, 214, ${.05+.3*j.similarity*g})`,a.lineWidth=.6+.5*g,a.beginPath(),a.moveTo(b.x,b.y),a.lineTo(D.x,D.y),a.stroke()}v.sort((j,b)=>b.pr.depth-j.pr.depth),a.lineJoin="round";for(const j of v){const b=j.pr,D=p[j.i],g=T(b.depth),U=D.pnlPercent!==null?et(Math.abs(D.pnlPercent)/5,0,1):.4,O=et((2.3+U*3.4)*b.scale,1,16),$=(.18+.82*g)*(1-.42*D.volatility);a.save(),a.globalCompositeOperation="lighter";const L=O*(2.1+1.3*D.volatility);a.fillStyle=`rgba(${D.color}, ${.09*$})`,a.beginPath(),a.arc(b.x,b.y,L,0,Math.PI*2),a.fill(),a.fillStyle=`rgba(${D.color}, ${.2*$})`,a.beginPath(),a.arc(b.x,b.y,O*1.5,0,Math.PI*2),a.fill(),a.fillStyle=`rgba(${D.color}, ${$})`,a.beginPath(),a.arc(b.x,b.y,O,0,Math.PI*2),a.fill(),a.fillStyle=`rgba(255, 255, 255, ${.5*$})`,a.beginPath(),a.arc(b.x,b.y,Math.max(O*.3,.6),0,Math.PI*2),a.fill(),a.restore()}if(d.showLabels){const j=new Map;for(const g of v){const U=j.get(g.i);(!U||g.pr.depth<U.depth)&&j.set(g.i,g.pr)}const b=[...j.entries()].map(([g,U])=>({p:p[g],pr:U})).filter(g=>T(g.pr.depth)>.42).sort((g,U)=>Math.abs(U.p.labelValue)-Math.abs(g.p.labelValue)),D=[];a.font="600 11px ui-monospace, SFMono-Regular, Menlo, monospace",a.textBaseline="middle",a.textAlign="left";for(const g of b){if(D.length>=Qr)break;D.some(U=>Math.abs(U.x-g.pr.x)<Jl&&Math.abs(U.y-g.pr.y)<Jl)||(D.push(g.pr),a.fillStyle=`rgba(${g.p.color}, ${.82*T(g.pr.depth)})`,a.fillText(g.p.label,g.pr.x+8,g.pr.y-8))}if(y===""){const g=new Map;for(let $=0;$<p.length;$+=1){const L=N[$];if(L.depth<=Fe||T(L.depth)<.25)continue;const W=g.get(p[$].symbol)??{sx:0,sy:0,n:0};W.sx+=L.x,W.sy+=L.y,W.n+=1,g.set(p[$].symbol,W)}const U=[...g.entries()].map(([$,L])=>({sym:$,x:L.sx/L.n,y:L.sy/L.n,n:L.n})).sort(($,L)=>L.n-$.n).slice(0,12);a.font="700 12px ui-sans-serif, system-ui, sans-serif";const O=[];for(const $ of U){if(O.some(W=>Math.abs(W.x-$.x)<84&&Math.abs(W.y-$.y)<22))continue;O.push($);const L=a.measureText($.sym).width;a.fillStyle="rgba(0, 0, 0, 0.5)",a.fillRect($.x-5,$.y-9,L+10,18),a.fillStyle="rgba(255, 255, 255, 0.92)",a.fillText($.sym,$.x,$.y+.5)}}}a.restore();const J=.06+.22*w,R=a.createLinearGradient(0,r*.52,0,r);R.addColorStop(0,"rgba(120, 150, 120, 0)"),R.addColorStop(1,`rgba(120, 150, 120, ${J})`),a.fillStyle=R,a.fillRect(0,r*.52,n,r*.48)}
2function li({symbol:a,height:n=540}){const r=i.useRef(null),x=i.useRef(null),o=i.useRef({...Ys}),d=i.useRef(null),u=i.useRef({w:800,h:n}),f=i.useRef(0),y=i.useRef(0),p=i.useRef(0),w=i.useRef(null),C=i.useRef(!0),c=i.useRef("orbit"),N=i.useRef({showEdges:!0,showLabels:!0,showFaces:!0}),v=i.useRef(a??""),[M,F]=i.useState(null),[B,T]=i.useState(!0),[J,R]=i.useState(!0),[j,b]=i.useState(!0),[D,g]=i.useState(!0),[U,O]=i.useState(!0),[$,L]=i.useState("orbit"),[W,ee]=i.useState(a??""),[ce,Z]=i.useState([]),[Y,je]=i.useState(null);i.useEffect(()=>{C.current=U},[U]),i.useEffect(()=>{N.current={showEdges:J,showLabels:j,showFaces:D}},[J,j,D]),i.useEffect(()=>{c.current=$,o.current={...$==="fly"?Kl:Ys},p.current=0},[$]),i.useEffect(()=>{v.current=W},[W]),i.useEffect(()=>{let A=!0;return T(!0),zr(X,{symbol:W||null,limit:320}).then(G=>{if(A&&(d.current=G,F(G),W===""&&G.points.length>0)){const te=new Map;for(const K of G.points)te.set(K.symbol,(te.get(K.symbol)??0)+1);Z([...te.entries()].map(([K,re])=>({s:K,n:re})).sort((K,re)=>re.n-K.n))}}).catch(()=>{A&&(d.current=null,F(null))}).finally(()=>{A&&T(!1)}),()=>{A=!1}},[W]),i.useEffect(()=>{const A=x.current,G=r.current;if(!A||!G)return;const te=()=>{const ie=A.getBoundingClientRect();if(ie.width===0||ie.height===0)return!1;const ge=Math.min(window.devicePixelRatio||1,2);u.current={w:ie.width,h:ie.height},G.width=Math.round(ie.width*ge),G.height=Math.round(ie.height*ge),G.style.width=`${ie.width}px`,G.style.height=`${ie.height}px`;const _e=G.getContext("2d");return _e&&(_e.setTransform(ge,0,0,ge,0,0),Zs(_e,ie.width,ie.height,o.current,d.current,N.current,c.current,performance.now()/1e3,v.current)),!0};let K=0;const re=()=>{te()||(K=requestAnimationFrame(re))};re();const ae=new ResizeObserver(()=>te());return ae.observe(A),()=>{ae.disconnect(),K&&cancelAnimationFrame(K)}},[]),i.useEffect(()=>{const A=r.current,G=A==null?void 0:A.getContext("2d");if(!G)return;const te=K=>{const re=y.current?Math.min((K-y.current)/1e3,.05):.016;y.current=K;const{w:ae,h:ie}=u.current,ge=o.current;c.current==="fly"?(p.current+=Kr*re,ge.dolly=p.current%Qs):(ge.dolly=0,C.current&&!w.current&&(ge.yaw+=Jr*re)),Zs(G,ae,ie,ge,d.current,N.current,c.current,K/1e3,v.current),f.current=requestAnimationFrame(te)};return f.current=requestAnimationFrame(te),()=>cancelAnimationFrame(f.current)},[]),i.useEffect(()=>{var G;const A=(G=r.current)==null?void 0:G.getContext("2d");A&&Zs(A,u.current.w,u.current.h,o.current,d.current,N.current,c.current,performance.now()/1e3,v.current)},[M,$,J,j,D,W]),i.useEffect(()=>{const A=r.current;if(!A)return;const G=te=>{te.preventDefault();const K=o.current;K.zoom=et(K.zoom*(1-te.deltaY*.001),.45,3.2)};return A.addEventListener("wheel",G,{passive:!1}),()=>A.removeEventListener("wheel",G)},[]);const Be=A=>{w.current={x:A.clientX,y:A.clientY},A.currentTarget.setPointerCapture(A.pointerId)},Ee=A=>{const G=w.current;if(G){const Ne=A.clientX-G.x,We=A.clientY-G.y,He=o.current;He.yaw+=Ne*.005,He.pitch=et(He.pitch+We*.005,-1.25,-.02),w.current={x:A.clientX,y:A.clientY};return}const te=r.current,K=d.current;if(!te||!K)return;const re=te.getBoundingClientRect(),ae=A.clientX-re.left,ie=A.clientY-re.top,{w:ge,h:_e}=u.current,ls=o.current,ns=-70-_e*.04;let Te=null,ct=18*18;for(const Ne of K.points){const We=Nt(Ne.x,Ne.y,Ne.z,ge,_e,ls);if(We.depth<=Fe)continue;const He=We.x-ae,wt=We.y+ns-ie,ze=He*He+wt*wt;ze<ct&&(ct=ze,Te=Ne)}je(Te?{symbol:Te.symbol,outcome:Te.outcome,label:Te.label,pnl:Te.pnlPercent,x:ae,y:ie}:Ne=>Ne&&null)},xe=A=>{w.current=null,je(null);try{A.currentTarget.releasePointerCapture(A.pointerId)}catch{}},le=()=>{o.current={...c.current==="fly"?Kl:Ys},p.current=0},fe=M==null?void 0:M.source,Ae=M?Math.round((M.variance[0]+M.variance[1]+M.variance[2])*100):0,De=M?M.points.reduce((A,G)=>(A[G.outcome]=(A[G.outcome]??0)+1,A),{}):null,ne=A=>`inline-flex items-center gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs font-bold transition ${A?"border-cyan-400/60 bg-cyan-500/15 text-cyan-100":"border-white/10 bg-white/5 text-slate-400 hover:text-slate-200"}`,Le=A=>`rounded-lg border px-2.5 py-1 text-xs font-bold transition ${A?"border-cyan-400/60 bg-cyan-500/15 text-cyan-100":"border-white/10 bg-white/5 text-slate-400 hover:text-slate-200"}`;return e.jsxs("div",{className:"relative",children:[ce.length>1?e.jsxs("div",{className:"mb-2 flex flex-wrap items-center gap-1.5",children:[e.jsx("span",{className:"mr-0.5 text-xs font-semibold text-slate-400",children:"สิà¸à¸à¸£à¸±à¸à¸¢à¹à¸à¸µà¹à¹à¸à¸£à¸:"}),e.jsx("button",{className:Le(W===""),onClick:()=>ee(""),children:"à¸à¸±à¹à¸à¸«à¸¡à¸"}),ce.map(({s:A,n:G})=>e.jsxs("button",{className:Le(W===A),onClick:()=>ee(A),children:[A,e.jsx("span",{className:"ml-1 text-[10px] opacity-60",children:G})]},A))]}):null,e.jsxs("div",{ref:x,className:"relative overflow-hidden rounded-3xl border border-cyan-500/20 bg-[radial-gradient(ellipse_at_50%_45%,#08080f,#000000)] shadow-2xl shadow-black/40",style:{height:n},children:[e.jsx("canvas",{ref:r,className:"h-full w-full touch-none cursor-grab active:cursor-grabbing",onPointerDown:Be,onPointerMove:Ee,onPointerUp:xe,onPointerLeave:xe}),Y?e.jsxs("div",{className:"pointer-events-none absolute z-30 -translate-y-full rounded-lg border border-white/15 bg-black/85 px-2.5 py-1 text-[11px] font-medium text-slate-100 shadow-lg backdrop-blur",style:{left:Y.x+10,top:Y.y-2},children:[e.jsx("span",{className:"font-bold text-white",children:Y.symbol})," ",e.jsx("span",{style:{color:Y.outcome==="win"?`rgb(${Me.win})`:Y.outcome==="loss"?`rgb(${Me.loss})`:`rgb(${Me.pending})`},children:Y.outcome==="win"?"à¸à¸à¸°":Y.outcome==="loss"?"à¹à¸à¹":"รà¸à¸à¸¥"}),Y.pnl!=null?e.jsxs("span",{className:"text-slate-300",children:[" · ",Y.label]}):null]}):null,e.jsxs("div",{className:"pointer-events-none absolute left-4 top-4 flex flex-col gap-2",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full border border-white/10 bg-black/55 px-3 py-1.5 text-xs font-bold text-slate-100 backdrop-blur",children:[fe==="synthetic"?e.jsx(Pl,{className:"h-3.5 w-3.5 text-amber-300"}):e.jsx(hr,{className:"h-3.5 w-3.5 text-emerald-300"}),fe==="synthetic"?"Demo cloud (no live embeddings)":"Live trade_embeddings",M?e.jsxs("span",{className:"text-slate-400",children:["· ",M.count," pts"]}):null]}),De?e.jsxs("div",{className:"inline-flex w-fit items-center gap-2 rounded-full border border-white/10 bg-black/45 px-3 py-1 text-[11px] font-medium text-slate-300 backdrop-blur",children:[e.jsxs("span",{style:{color:`rgb(${Me.win})`},children:[De.win??0," à¸à¸à¸°"]}),e.jsxs("span",{style:{color:`rgb(${Me.loss})`},children:[De.loss??0," à¹à¸à¹"]}),e.jsxs("span",{style:{color:`rgb(${Me.pending})`},children:[De.pending??0," รà¸"]}),e.jsxs("span",{className:"text-slate-500",children:["· PCA ",Ae,"%"]})]}):null]}),e.jsxs("div",{className:"absolute right-4 top-4 flex flex-wrap items-center justify-end gap-2",children:[e.jsxs("div",{className:"flex rounded-lg border border-white/10 bg-white/5 p-0.5",children:[e.jsxs("button",{className:`inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs font-bold transition ${$==="orbit"?"bg-cyan-500 text-slate-950":"text-slate-300 hover:bg-white/10"}`,onClick:()=>L("orbit"),children:[e.jsx(ur,{className:"h-3.5 w-3.5"})," หมุà¸à¸£à¸à¸"]}),e.jsxs("button",{className:`inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs font-bold transition ${$==="fly"?"bg-cyan-500 text-slate-950":"text-slate-300 hover:bg-white/10"}`,onClick:()=>L("fly"),children:[e.jsx(br,{className:"h-3.5 w-3.5"})," à¹à¸à¸´à¸à¸à¸°à¸¥à¸¸"]})]}),e.jsxs("button",{className:ne(J),onClick:()=>R(A=>!A),children:[e.jsx(fr,{className:"h-3.5 w-3.5"})," Links"]}),e.jsxs("button",{className:ne(D),onClick:()=>g(A=>!A),children:[e.jsx(Pl,{className:"h-3.5 w-3.5"})," Mesh"]}),e.jsxs("button",{className:ne(j),onClick:()=>b(A=>!A),children:[e.jsx(gr,{className:"h-3.5 w-3.5"})," Labels"]}),$==="orbit"?e.jsxs("button",{className:ne(U),onClick:()=>O(A=>!A),children:[e.jsx(jr,{className:"h-3.5 w-3.5"})," Auto"]}):null,e.jsx("button",{className:"inline-flex items-center gap-1.5 rounded-lg border border-white/10 bg-white/5 px-2.5 py-1.5 text-xs font-bold text-slate-300 transition hover:text-white",onClick:le,children:"Reset"})]}),e.jsxs("div",{className:"pointer-events-none absolute bottom-4 left-4 flex flex-wrap items-center gap-3 rounded-xl border border-white/10 bg-black/50 px-3 py-2 text-[11px] font-semibold text-slate-200 backdrop-blur",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2.5 w-2.5 rounded-full",style:{background:`rgb(${Me.win})`}})," à¸à¸à¸°"]}),e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2.5 w-2.5 rounded-full",style:{background:`rgb(${Me.loss})`}})," à¹à¸à¹"]}),e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2.5 w-2.5 rounded-full",style:{background:`rgb(${Me.pending})`}})," รà¸à¸à¸¥"]}),e.jsx("span",{className:"text-slate-500",children:"สูà¸=à¸à¸à¸° · à¸à¹à¸³=à¹à¸à¹ · หมà¸à¸=volatility · à¹à¸ªà¹à¸=similarity"})]}),e.jsx("div",{className:"pointer-events-none absolute bottom-4 right-4 rounded-lg border border-white/10 bg-black/45 px-3 py-1.5 text-[11px] text-slate-400 backdrop-blur",children:$==="fly"?"à¸à¸¥à¹à¸à¸à¹à¸«à¸¥à¹à¸à¸à¹à¸²à¸à¸«à¸à¹à¸² · ลาà¸à¹à¸à¸·à¹à¸à¸¡à¸à¸à¸£à¸à¸":"ลาà¸à¹à¸à¸·à¹à¸à¸«à¸¡à¸¸à¸ · scroll à¹à¸à¸·à¹à¸à¸à¸¹à¸¡"}),B?e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-slate-950/40 backdrop-blur-sm",children:e.jsxs("div",{className:"inline-flex items-center gap-2 text-sm font-bold text-cyan-200",children:[e.jsx(Nr,{className:"h-5 w-5 animate-spin"})," à¸à¸³à¸¥à¸±à¸à¸ªà¸£à¹à¸²à¸à¹à¸¥à¸à¸à¸²à¸£à¹à¸à¸´à¸â¦"]})}):null]})]})}const ni=_r("footprint-lab-molecule.glb"),ri="Material.006";function Ql({size:a=40,className:n="",label:r="Footprint Lab"}){const x=i.useRef(null),[o,d]=i.useState(!1),[u,f]=i.useState(!1);return i.useEffect(()=>{const y=x.current;if(!y)return;let p=!1,w=null;return(async()=>{var Ee;let C;try{C=await Promise.all([es(()=>import("./three-vendor-C5Tu9S6t.js"),[]),es(()=>import("./GLTFLoader-DPV8zZL8.js"),__vite__mapDeps([0,1])),es(()=>import("./meshopt_decoder.module-CkuQsJa_.js"),[]),es(()=>
2import("./RoomEnvironment-BCyMDyAK.js"),__vite__mapDeps([2,1]))])}catch{p||d(!0);return}if(p)return;const[c,{GLTFLoader:N},{MeshoptDecoder:v},{RoomEnvironment:M}]=C;let F;try{F=new c.WebGLRenderer({alpha:!0,antialias:!0,powerPreference:"low-power"})}catch{p||d(!0);return}F.setPixelRatio(Math.min(window.devicePixelRatio||1,2)),F.setSize(a,a),F.toneMapping=c.ACESFilmicToneMapping,F.toneMappingExposure=1.15,F.domElement.style.display="block",y.appendChild(F.domElement);const B=new c.Scene,T=new c.PerspectiveCamera(32,1,.1,100);T.position.set(0,.28,2.55),T.lookAt(0,0,0);const J=new c.PMREMGenerator(F),R=J.fromScene(new M,.04);B.environment=R.texture;const j=new c.DirectionalLight(16777215,1.6);j.position.set(2,3,2.5);const b=new c.DirectionalLight(16096779,1.1);b.position.set(-2.5,.5,-2),B.add(j,b,new c.AmbientLight(16777215,.35));const D=new c.Group;D.rotation.x=.12,B.add(D);const g=((Ee=window.matchMedia)==null?void 0:Ee.call(window,"(prefers-reduced-motion: reduce)").matches)??!1;let U=!0,O=document.visibilityState==="visible";const $=()=>!g&&U&&O;let L=0,W=0;const ee=xe=>{const le=W?Math.min((xe-W)/1e3,.1):0;W=xe,D.rotation.y+=le*.55,F.render(B,T),L=$()?requestAnimationFrame(ee):0},ce=()=>{!L&&$()&&(W=0,L=requestAnimationFrame(ee))},Z=()=>{L||F.render(B,T)},Y=new IntersectionObserver(([xe])=>{U=xe.isIntersecting,ce()},{threshold:0});Y.observe(y);const je=()=>{O=document.visibilityState==="visible",ce()};if(document.addEventListener("visibilitychange",je),w=()=>{cancelAnimationFrame(L),Y.disconnect(),document.removeEventListener("visibilitychange",je),F.dispose(),B.traverse(xe=>{const le=xe;le.geometry&&le.geometry.dispose(),le.material&&(Array.isArray(le.material)?le.material:[le.material]).forEach(fe=>fe.dispose())}),R.texture.dispose(),J.dispose();try{F.forceContextLoss()}catch{}F.domElement.remove()},p){w();return}const Be=new N;Be.setMeshoptDecoder(v),Be.load(ni,xe=>{if(p)return;const le=xe.scene;le.traverse(te=>{const K=te;if(K.isMesh)for(const re of Array.isArray(K.material)?K.material:[K.material]){const ae=re;ae.envMapIntensity=1,ae.name===ri&&(ae.metalness=.15,ae.roughness=.1,ae.transparent=!0,ae.opacity=.42,ae.depthWrite=!1)}});const fe=new c.Box3().setFromObject(le),Ae=fe.getSize(new c.Vector3),De=fe.getCenter(new c.Vector3),ne=1/(Math.max(Ae.x,Ae.y,Ae.z)||1);le.position.sub(De).multiplyScalar(ne),le.scale.setScalar(ne);const Le=Ae.y*ne/2,A=Math.hypot(Ae.x*ne,Ae.z*ne)/2,G=T.fov*Math.PI/360;T.position.set(0,Le*.12,Math.max(Le,A)/Math.tan(G)*1.1),T.lookAt(0,0,0),D.add(le),f(!0),Z(),ce()},void 0,()=>{p||d(!0)})})(),()=>{p=!0,w==null||w()}},[a]),o?e.jsx("span",{className:n,style:{fontSize:a*.8,lineHeight:1},children:"ð§ª"}):e.jsxs("span",{className:`relative inline-block shrink-0 align-middle ${n}`,style:{width:a,height:a},role:"img","aria-label":r,children:[!u&&e.jsx("span",{className:"absolute inset-0 grid place-items-center",style:{fontSize:a*.8,lineHeight:1},"aria-hidden":!0,children:"ð§ª"}),e.jsx("span",{ref:x,"aria-hidden":!0,className:"transition-opacity duration-500",style:{display:"block",width:a,height:a,opacity:u?1:0}})]})}function ss(a){const n=a||"";return/10015|Unknown Webhook/i.test(n)?"Webhook à¸à¸¹à¸à¸¥à¸à¸«à¸£à¸·à¸à¹à¸¡à¹à¸¡à¸µà¸à¸¢à¸¹à¹à¹à¸¥à¹à¸§ (Unknown Webhook)":/50027|Invalid Webhook Token/i.test(n)?"Webhook URL à¹à¸¡à¹à¸à¸¹à¸à¸à¹à¸à¸":n?`Discord à¸à¸à¸: ${n.slice(0,80)}`:"สà¹à¸à¹à¸¡à¹à¸ªà¸³à¹à¸£à¹à¸"}const yt=[{group:"Crypto",symbols:["BTCUSD","ETHUSD","SOLUSD","XRPUSD","BNBUSD","LTCUSD","LINKUSD","AVAXUSD","DOGEUSD","ADAUSD"]},{group:"Metals",symbols:["XAUUSD","XAGUSD"]},{group:"Forex",symbols:["EURUSD","GBPUSD","AUDUSD","USDJPY","USDCAD","EURJPY","EURCAD"]},{group:"Indices",symbols:["US30","US500","USTEC","NASCOMP","US2000","DE40","UK100","FRA40","ESP35","EU50","JP225","HK50","CN50","AUS200","IN50","SET"]},{group:"Stocks",symbols:["WMT","PTG"]}],ii=yt.flatMap(a=>a.symbols),oi=[{group:"Crypto",icon:"â¿",symbols:["BTCUSD","ETHUSD","SOLUSD","BNBUSD","LTCUSD","LINKUSD","DOGEUSD","AVAXUSD","ADAUSD","XRPUSD"]},{group:"Metals",icon:"ð¥",symbols:["XAUUSD","XAGUSD"],note:"XAUUSD à¸à¹à¸²à¸ order flow à¸à¸²à¸ PAXG (à¸à¸à¸à¹à¸à¹à¸à¸) â à¹à¸«à¸¥à¹à¸à¸£à¸²à¸à¸²à¸à¸à¸à¹à¸à¸µà¸¢à¸§à¸à¸±à¸à¸à¸µà¹à¸£à¸°à¸à¸à¹à¸à¹ · XAGUSD ยัà¸à¹à¸¡à¹à¸¡à¸µà¹à¸«à¸¥à¹à¸à¸à¹à¸à¸¡à¸¹à¸¥"},{group:"Forex",icon:"ð±",symbols:["EURUSD","GBPUSD","USDJPY","AUDUSD"],note:"EURUSD à¸à¸³à¸¥à¸±à¸à¹à¸à¹à¸à¸ªà¸à¸´à¸à¸´à¸à¸²à¸ EURUSDT · à¸à¸¹à¹à¸à¸·à¹à¸à¹à¸¡à¹à¸¡à¸µ order book สาà¸à¸²à¸£à¸à¸°"}],ci=yt.map(a=>a.group),en=new Set(["BTCUSD","ETHUSD","SOLUSD","XRPUSD","BNBUSD","LTCUSD","LINKUSD","AVAXUSD","DOGEUSD","ADAUSD","XAUUSD"]);function di({assets:a,onSet:n}){const[r,x]=i.useState(null),[o,d]=i.useState("broker");i.useEffect(()=>{let c=!0;return Dr().then(N=>{c&&x(N)}),()=>{c=!1}},[]);const u=i.useMemo(()=>r?[...r.values()].map(c=>({r:c,cost:zl(c,o),net:Gl(c,o)})).sort((c,N)=>c.net==null!=(N.net==null)?c.net==null?1:-1:(N.net??-1/0)-(c.net??-1/0)):[],[r,o]),f=u.filter(c=>c.net!=null),y=new Set(a.map(c=>c.toUpperCase())),p=a.filter(c=>{const N=r==null?void 0:r.get(c.toUpperCase());return!N||Gl(N,o)==null}),w=()=>{const c=y.size===0?f.map(v=>v.r.asset):a.map(v=>v.toUpperCase()),N=new Set(c.map(v=>({a:v,cost:zl(r==null?void 0:r.get(v),o)})).filter(v=>v.cost!=null).sort((v,M)=>
2(M.cost??0)-(v.cost??0)).slice(0,3).map(v=>v.a));n(c.filter(v=>!N.has(v)))},C=(c,N=3)=>c==null||!Number.isFinite(c)?"â":`${c>=0?"+":""}${c.toFixed(N)}`;return e.jsxs("div",{className:"mt-4 rounded-xl border border-slate-700/60 bg-slate-900/40 p-3",children:[e.jsxs("div",{className:"mb-2 flex flex-wrap items-center gap-x-3 gap-y-1.5",children:[e.jsx("span",{className:"text-xs font-semibold text-slate-200",children:"à¸à¸±à¸à¸à¸à¸£à¹à¸à¸à¹à¸§à¸¢à¸à¹à¸à¸à¸¸à¸à¸à¸£à¸´à¸"}),e.jsx("div",{className:"flex items-center gap-0.5 rounded border border-slate-700 bg-slate-950/60 p-0.5",children:["broker","exchange"].map(c=>e.jsx("button",{onClick:()=>d(c),className:`rounded px-2 py-0.5 text-[10px] transition-colors ${o===c?"bg-cyan-500/20 text-cyan-300":"text-slate-500 hover:text-slate-300"}`,children:c==="broker"?"à¹à¸à¸£à¸ CFD":"Exchange"},c))}),e.jsx("button",{onClick:w,disabled:f.length<3,className:"rounded-lg border border-emerald-500/40 bg-emerald-500/10 px-2.5 py-1 text-[11px] font-semibold text-emerald-200 transition-colors hover:bg-emerald-500/20 disabled:opacity-40",children:"à¸à¸±à¸ 3 à¸à¸¹à¹à¸à¸µà¹à¸à¹à¸à¸à¸¸à¸à¹à¸à¸à¸à¸µà¹à¸ªà¸¸à¸"})]}),e.jsxs("p",{className:"mb-2 text-[11px] leading-relaxed text-slate-400",children:["à¸à¸à¸à¸à¸µà¹à¸à¹à¸à¸à¸à¸µà¹à¸£à¸±à¸"," ",e.jsx("b",{className:"text-slate-200",children:a.length===0?"à¸à¸¸à¸à¸à¸¹à¹":`${a.length} à¸à¸¹à¹`})," · ","วัà¸à¸à¸à¸à¸à¸±à¸§à¸à¸¢à¹à¸²à¸à¹à¸¥à¹à¸§ à¸à¸²à¸£à¸à¸±à¸à¸à¸¹à¹à¸à¸µà¹à¸à¹à¸à¸à¸¸à¸à¹à¸à¸à¸à¸à¸à¸¥à¸ drawdown à¸à¸²à¸"," ",e.jsxs("b",{className:"tabular-nums text-slate-300",children:[Lr.toFixed(3),"R"]})," à¹à¸«à¸¥à¸·à¸"," ",e.jsxs("b",{className:"tabular-nums text-emerald-300",children:[Tr.toFixed(3),"R"]})," ","(",e.jsxs("b",{children:["â",Rr,"%"]}),") â à¹à¸à¹à¸à¸à¸²à¸£à¸¥à¸",e.jsx("b",{className:"text-slate-300",children:"à¸à¸§à¸²à¸¡à¹à¸ªà¸µà¹à¸¢à¸à¸à¸²à¸¥à¸"})," à¹à¸¡à¹à¹à¸à¹à¹à¸à¸´à¹à¸¡à¸à¸³à¹à¸£"]}),r?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"max-h-64 overflow-auto rounded border border-slate-800",children:e.jsxs("table",{className:"w-full min-w-[400px] text-[11px]",children:[e.jsx("thead",{className:"sticky top-0 bg-slate-900",children:e.jsxs("tr",{className:"text-[10px] uppercase tracking-wide text-slate-500",children:[e.jsx("th",{className:"py-1 pl-2 pr-2 text-left font-medium",children:"รัà¸"}),e.jsx("th",{className:"py-1 pr-2 text-left font-medium",children:"à¸à¸¹à¹"}),e.jsx("th",{className:"py-1 pr-2 text-right font-medium",children:"à¹à¸¡à¹"}),e.jsx("th",{className:"py-1 pr-2 text-right font-medium",children:"à¸à¸à¸°"}),e.jsx("th",{className:"py-1 pr-2 text-right font-medium",children:"à¸à¸¸à¸"}),e.jsx("th",{className:"py-1 pr-2 text-right font-medium",children:"net R"})]})}),e.jsx("tbody",{children:u.map(({r:c,cost:N,net:v})=>{const M=y.size===0||y.has(c.asset);return e.jsxs("tr",{className:`border-t border-slate-800/70 ${v==null?"opacity-60":""}`,children:[e.jsx("td",{className:"py-1 pl-2 pr-2",children:e.jsx("input",{type:"checkbox",checked:y.has(c.asset),"aria-label":`สà¹à¸ ${c.asset} à¹à¸à¹à¸²à¸à¹à¸à¸à¸à¸µà¹`,onChange:F=>{const B=new Set(y);F.target.checked?B.add(c.asset):B.delete(c.asset),n([...B])},className:"h-3 w-3 accent-cyan-500"})}),e.jsx("td",{className:`py-1 pr-2 font-medium ${M?"text-slate-200":"text-slate-500"}`,children:c.asset}),e.jsx("td",{className:"py-1 pr-2 text-right tabular-nums text-slate-400",children:c.n.toLocaleString()}),e.jsx("td",{className:"py-1 pr-2 text-right tabular-nums text-slate-400",title:"à¸à¸¸à¸à¸à¸¸à¹à¸¡à¸à¸¸à¸ 60% à¸à¸µà¹ RR 0.667 â à¸à¹à¸³à¸à¸§à¹à¸²à¸à¸µà¹à¸à¸·à¸à¸à¸²à¸à¸à¸¸à¸à¹à¸¡à¹à¸à¸à¸°à¸à¹à¸à¸¢",children:c.winPct==null?"â":`${c.winPct}%`}),e.jsx("td",{className:"py-1 pr-2 text-right tabular-nums text-slate-500",children:N==null?"â":`â${N.toFixed(3)}`}),e.jsx("td",{className:`py-1 pr-2 text-right font-semibold tabular-nums ${v==null?"text-slate-600":v>0?"text-emerald-300":v>-.05?"text-amber-300":"text-rose-300"}
2`,children:v==null?"à¹à¸¡à¹à¸¡à¸µà¸ªà¹à¸à¸£à¸":C(v)})]},c.asset)})})]})}),e.jsxs("p",{className:"mt-2 text-[10px] leading-relaxed text-slate-500",children:["à¹à¸£à¸µà¸¢à¸à¸à¸²à¸¡ ",e.jsx("b",{className:"text-slate-400",children:"net R"})," (à¸à¸³à¹à¸£à¸à¹à¸à¹à¸¡à¹à¸«à¸¥à¸±à¸à¸«à¸±à¸à¸ªà¹à¸à¸£à¸à¸à¸µà¹à¸§à¸±à¸à¸à¸£à¸´à¸) à¹à¸¡à¹à¹à¸à¹ Win % â à¸à¸µà¹ RR 0.667 à¸à¸¸à¸à¸à¸¸à¹à¸¡à¸à¸¸à¸à¸à¸·à¸ 60% à¹à¸¥à¸°à¸à¸¹à¹à¸à¸µà¹à¸à¸à¸°à¸à¹à¸à¸¢à¸à¸µà¹à¸ªà¸¸à¸à¸¡à¸±à¸à¹à¸¡à¹à¹à¸à¹à¸à¸¹à¹à¸à¸µà¹à¹à¸«à¸¥à¸·à¸à¹à¸à¸´à¸à¸¡à¸²à¸à¸à¸µà¹à¸ªà¸¸à¸ · สà¸à¸´à¸à¸´à¸¡à¸²à¸à¸²à¸à¸à¸¸à¹à¸",e.jsx("b",{className:"text-slate-400",children:"à¸à¸±à¹à¸à¹à¸à¸à¸à¸´à¸"})," à¹à¸¡à¹à¹à¸à¹à¸à¸²à¸à¸à¹à¸à¸à¸à¸µà¹ à¹à¸à¸£à¸²à¸°à¹à¸¡à¹à¸à¹à¸à¸à¸¹à¹à¸à¸à¸à¸à¹à¸à¸à¹à¸à¸µà¸¢à¸§à¸¢à¸±à¸à¸à¹à¸à¸¢à¹à¸à¸´à¸à¸à¸§à¹à¸²à¸à¸°à¸à¸±à¸à¸à¸±à¸à¸à¸±à¸à¹à¸à¹"]}),p.length>0&&e.jsxs("p",{className:"mt-1.5 rounded border border-amber-500/30 bg-amber-500/5 px-2 py-1.5 text-[10px] leading-relaxed text-amber-200/85",children:["â ï¸ ",p.length," à¸à¸¹à¹à¸à¸µà¹à¹à¸¥à¸·à¸à¸à¹à¸§à¹à¸¢à¸±à¸à¹à¸¡à¹à¸¡à¸µà¸ªà¹à¸à¸£à¸à¸à¸µà¹à¸§à¸±à¸à¸à¸£à¸´à¸à¸à¸à¹à¸§à¸à¸´à¸§à¸à¸µà¹ (",p.slice(0,6).join(", "),p.length>6?"â¦":"",") â à¸à¸´à¸ net R à¹à¸«à¹à¹à¸¡à¹à¹à¸à¹ à¸à¸¶à¸à¹à¸¡à¹à¹à¸à¸²à¹à¸«à¹ สà¹à¸à¹à¸à¹à¸à¸²à¸¡à¸à¸à¸à¸´à¹à¸à¹à¸¢à¸±à¸à¹à¸¡à¹à¸£à¸¹à¹à¸à¹à¸à¸à¸¸à¸"]}),a.length>0&&e.jsxs("p",{className:"mt-1.5 text-[10px] leading-relaxed text-slate-500",children:["หมายà¹à¸«à¸à¸¸: à¸à¸±à¸§à¸à¸£à¸à¸à¸à¸µà¹à¹à¸à¹à¸",e.jsx("b",{className:"text-slate-400",children:"รายà¸à¸²à¸£à¸à¸µà¹à¸à¸à¸¸à¸à¸²à¸"})," â à¸à¹à¸²à¹à¸£à¸²à¹à¸à¸´à¹à¸¡à¸à¸¹à¹à¹à¸«à¸¡à¹à¸à¸µà¸«à¸¥à¸±à¸ à¸à¹à¸à¸à¸à¸µà¹à¸à¸°",e.jsx("b",{className:"text-slate-400",children:"à¹à¸¡à¹à¹à¸à¹à¸£à¸±à¸"}),"à¸à¸à¸à¸§à¹à¸²à¸à¸¸à¸à¸à¸°à¸à¸¥à¸±à¸à¸¡à¸²à¹à¸à¸´à¹à¸¡à¹à¸à¸ (à¹à¸§à¹à¸à¸§à¹à¸²à¸à¹à¸§à¹ = รัà¸à¸à¸¸à¸à¸à¸¹à¹à¹à¸ªà¸¡à¸)"]})]}):e.jsx("p",{className:"py-3 text-center text-[11px] text-slate-500",children:"à¸à¸³à¸¥à¸±à¸à¹à¸«à¸¥à¸à¸à¹à¸à¸¡à¸¹à¸¥à¸à¹à¸à¸à¸¸à¸â¦"})]})}var nn;const xi=new Set(((nn=yt.find(a=>a.group==="Crypto"))==null?void 0:nn.symbols)||[]),mi={XAUUSD:"à¸à¸à¸à¸à¸³",XAGUSD:"à¹à¸à¸´à¸",US30:"Dow Jones",US500:"S&P 500",USTEC:"Nasdaq 100",NASCOMP:"Nasdaq Composite",US2000:"Russell 2000",DE40:"DAX",UK100:"FTSE 100",FRA40:"CAC 40",ESP35:"IBEX 35",EU50:"Euro Stoxx 50",JP225:"Nikkei 225",HK50:"Hang Seng",CN50:"China (HSCEI)",AUS200:"ASX 200",IN50:"Nifty 50",SET:"SET à¹à¸à¸¢",WMT:"Walmart",PTG:"PTG"},ve=a=>mi[a]||"";function tn({tfs:a,onTfs:n,pattern:r,onPattern:x}){return e.jsxs("div",{className:"rounded-xl border border-white/10 bg-white/[0.02] px-3.5 py-3","data-pa-tf-filter":!0,children:[e.jsx("p",{className:"text-xs text-slate-400",children:"à¸à¸¹ Price Action à¸à¸²à¸à¹à¸à¸¡à¹à¹à¸à¸£à¸¡ (à¹à¸¥à¸·à¸à¸à¹à¸à¹à¸«à¸¥à¸²à¸¢à¸à¸±à¸ · à¸à¹à¸²à¸à¸à¹à¸²à¹à¸à¸à¹à¸ TF à¹à¸à¸à¹à¹à¸à¹)"}),e.jsx("div",{className:"mt-1.5 flex flex-wrap gap-2",children:[{v:"15m",l:"M15"},{v:"1h",l:"H1"},{v:"4h",l:"H4"},{v:"1d",l:"D1"}].map(o=>e.jsx("button",{type:"button",onClick:()=>n(d=>d.includes(o.v)?d.filter(u=>u!==o.v):[...d,o.v]),className:`rounded-lg border px-3 py-1.5 text-xs ${a.includes(o.v)?"border-cyan-500 bg-cyan-500/10 text-cyan-300":"border-white/10 text-slate-400 hover:bg-white/5"}`,children:o.l},o.v))}),a.length===0?e.jsx("p",{className:"mt-1.5 text-[11px] leading-relaxed text-slate-500",children:"ยัà¸à¹à¸¡à¹à¹à¸¥à¸·à¸à¸ TF = à¹à¸à¹ pattern à¸à¸µà¹ engine à¸à¸£à¸§à¸à¸à¸à¹à¸à¹à¸ 15m à¸à¸à¸à¸ªà¸±à¸à¸à¸²à¸à¹à¸à¸ (à¹à¸à¸à¹à¸à¸´à¸¡ â à¹à¸à¸à¹à¸¡à¹à¸¡à¸µà¸ªà¸³à¸«à¸£à¸±à¸à¸à¸à¸/forex/indices)"}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mt-3 text-xs text-slate-400",children:"à¸à¸à¸´à¸ pattern"}),e.jsx("div",{className:"mt-1.5 flex flex-wrap gap-2",children:[{v:"any",label:"à¸à¸¸à¸ pattern",hint:"Engulfing, Hammer, Morning Star, Pin bar ฯลฯ à¸à¸µà¹à¸à¸µà¹à¸à¸´à¸¨à¹à¸à¸µà¸¢à¸§à¸à¸±à¸à¸ªà¸±à¸à¸à¸²à¸"},{v:"engulfing",label:"Engulfing à¹à¸à¹à¸²à¸à¸±à¹à¸",hint:"à¹à¸à¹à¸à¸à¸¥à¸·à¸à¸à¸´à¸ â Bullish Engulfing สำหรัภBUY · Bearish Engulfing สำหรัภSELL"}].map(o=>e.jsx("button",{type:"button",onClick:()=>x(o.v),title:o.hint,className:`rounded-lg border px-2.5 py-1.5 text-xs ${r===o.v?"border-cyan-500 bg-cyan-500/10 text-cyan-300":"border-white/10 text-slate-400 hover:bg-white/5"}`,children:o.label},o.v))}),e.jsxs("p",{className:"mt-2 text-[11px] leading-relaxed text-slate-500",children:["สà¹à¸à¹à¸¡à¸·à¹à¸",e.jsx("span",{className:"text-slate-300",children:"à¹à¸à¹à¸à¸à¸µà¹à¸à¸´à¸à¸¥à¹à¸²à¸ªà¸¸à¸"}),"à¸à¸à¸ ",a.map(o=>({"15m":"M15","1h":"H1","4h":"H4","1d":"D1"})[o]).join(" / ")," มี ",r==="engulfing"?"Engulfing":"pattern"," à¸à¸´à¸¨à¹à¸à¸µà¸¢à¸§à¸à¸±à¸à¸ªà¸±à¸à¸à¸²à¸ (BUY à¸à¹à¸à¸à¹à¸à¹à¸à¸à¸²à¸à¸¶à¹à¸ · SELL à¸à¹à¸à¸à¹à¸à¹à¸à¸à¸²à¸¥à¸) · à¹à¸à¹à¹à¸à¹à¸à¸¸à¸à¸ªà¸´à¸à¸à¸£à¸±à¸à¸¢à¹à¸£à¸§à¸¡à¸à¸à¸/forex/indices"," · ","à¸à¸·à¹à¸ pattern à¸à¸±à¸ TF à¸à¸µà¹à¹à¸
2à¸à¸à¸°à¹à¸ªà¸à¸à¸à¸à¸à¸²à¸£à¹à¸à¸ªà¸±à¸à¸à¸²à¸"]}),e.jsxs("p",{className:"mt-1 text-[11px] leading-relaxed text-amber-400/80",children:["สัà¸à¸à¸²à¸à¸à¸°à¸à¹à¸à¸¢à¸¥à¸à¸¡à¸²à¸: à¸à¹à¸ 1 TF à¸à¹à¸²à¸à¸£à¸²à¸§ ",r==="engulfing"?"1 à¹à¸ 11":"1 à¹à¸ 5"," à¸à¸à¸à¸ªà¸±à¸à¸à¸²à¸ (วัà¸à¸à¸²à¸à¹à¸à¹à¸à¸à¸£à¸´à¸ 3,876 à¹à¸à¹à¸à¸à¹à¸ TF)"," · ","à¹à¸à¹à¸à¸à¸±à¸§à¸à¸£à¸à¸à¹à¸à¸·à¹à¸à¹à¸¥à¸·à¸à¸à¸ªà¸±à¸à¸à¸²à¸à¸à¸²à¸¡à¸ªà¹à¸à¸¥à¹ ยัà¸à¹à¸¡à¹à¸¡à¸µà¸à¸²à¸£à¸§à¸±à¸à¸§à¹à¸²à¸à¸³à¹à¸«à¹à¸à¸±à¸à¸£à¸²à¸à¸à¸°à¸ªà¸¹à¸à¸à¸¶à¹à¸"]})]})]})}const sn=[{v:"7d",l:"7 วัà¸"},{v:"30d",l:"30 วัà¸"},{v:"90d",l:"90 วัà¸"},{v:"all",l:"à¸à¸±à¹à¸à¸«à¸¡à¸"}],pi=a=>{var n;return((n=yt.find(r=>r.symbols.includes(a)))==null?void 0:n.group)||"à¸à¸·à¹à¸à¹"};function an(a){const n=(a||"").trim(),r=n.match(/(\d{5,}:[A-Za-z0-9_-]{20,})/);return r?r[1]:n}const Ks=({off:a})=>e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:a?e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M3 3l18 18"}),e.jsx("path",{d:"M10.6 10.6a3 3 0 004.2 4.2"}),e.jsx("path",{d:"M9.9 4.2A10 10 0 0112 5c6.5 0 10 7 10 7a18 18 0 01-2.4 3.3M6.1 6.1A18 18 0 002 12s3.5 7 10 7a10 10 0 003.3-.5"})]}):e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7z"}),e.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}),Js=[{label:"1 à¸à¸²à¸à¸µ",value:1},{label:"5 à¸à¸²à¸à¸µ",value:5},{label:"10 à¸à¸²à¸à¸µ",value:10},{label:"15 à¸à¸²à¸à¸µ",value:15},{label:"30 à¸à¸²à¸à¸µ",value:30},{label:"1 à¸à¸±à¹à¸§à¹à¸¡à¸",value:60},{label:"2 à¸à¸±à¹à¸§à¹à¸¡à¸",value:120},{label:"4 à¸à¸±à¹à¸§à¹à¸¡à¸",value:240},{label:"1 วัà¸",value:1440},{label:"1 สัà¸à¸à¸²à¸«à¹",value:10080},{label:"1 à¹à¸à¸·à¸à¸",value:43200}],hi=[{label:"à¸à¸£à¸¸à¸à¹à¸à¸ (GMT+7)",value:"Asia/Bangkok"},{label:"สิà¸à¸à¹à¸à¸£à¹ / ฮà¹à¸à¸à¸à¸ (GMT+8)",value:"Asia/Singapore"},{label:"à¹à¸à¹à¸à¸µà¸¢à¸§ (GMT+9)",value:"Asia/Tokyo"},{label:"à¸à¸¹à¹à¸ (GMT+4)",value:"Asia/Dubai"},{label:"ลà¸à¸à¸à¸à¸ (GMT+0/1)",value:"Europe/London"},{label:"ยุà¹à¸£à¸à¸à¸¥à¸²à¸ (GMT+1/2)",value:"Europe/Paris"},{label:"à¸à¸´à¸§à¸¢à¸à¸£à¹à¸ (GMT-5/4)",value:"America/New_York"},{label:"ลà¸à¸ªà¹à¸à¸à¹à¸à¸¥à¸´à¸ª (GMT-8/7)",value:"America/Los_Angeles"},{label:"UTC",value:"UTC"}],q="rounded-2xl border border-white/[0.06] bg-white/[0.02] backdrop-blur p-5",$e="text-xs font-medium text-slate-400",oe="w-full rounded-xl border border-white/10 bg-slate-950/50 px-3.5 py-2.5 text-sm text-slate-100 outline-none transition focus:border-cyan-500/70 focus:ring-2 focus:ring-cyan-500/20";function ui({values:a,color:n="#22d3ee"}){if(a.length<2)return e.jsx("div",{className:"h-8"});const r=120,x=32,o=Math.min(...a),d=Math.max(...a),u=d-o||1,f=a.map((y,p)=>`${p/(a.length-1)*r},${x-(y-o)/u*(x-4)-2}`);return e.jsx("svg",{viewBox:`0 0 ${r} ${x}`,className:"mt-2 h-8 w-full",preserveAspectRatio:"none",children:e.jsx("polyline",{fill:"none",stroke:n,strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",points:f.join(" "),opacity:"0.9",pathLength:1,strokeDasharray:"1",strokeDashoffset:1,style:{animation:"tgDraw 1.1s ease .15s forwards"}})})}function bi({points:a,netPct:n,wins:r,losses:x}){const o=n>=0,d=o?"#34d399":"#f87171",u=Z=>new Date(Z+"T00:00:00").toLocaleDateString("th-TH",{day:"2-digit",month:"short"}),f=a.length,y=r+x>0?Math.round(r/(r+x)*100):null;if(f<2)return e.jsx("div",{className:"flex h-40 items-center justify-center rounded-xl border border-white/5 bg-black/20 px-6 text-center text-sm text-slate-500",children:f===0?"ยัà¸à¹à¸¡à¹à¸¡à¸µà¹à¸¡à¹à¸à¸µà¹à¸à¸´à¸à¸à¸¥ â รà¸à¸ªà¸±à¸à¸à¸²à¸à¹à¸à¹à¸² WIN/LOSS à¸à¹à¸à¸ à¹à¸ªà¹à¸à¸à¸¸à¸à¸à¸°à¹à¸£à¸´à¹à¸¡à¸§à¸²à¸":"มีà¸à¹à¸à¸¡à¸¹à¸¥à¸§à¸±à¸à¹à¸à¸µà¸¢à¸§ â à¹à¸ªà¹à¸à¸à¸¸à¸à¸à¸°à¹à¸ªà¸à¸à¹à¸¡à¸·à¹à¸à¸¡à¸µà¸à¸¢à¹à¸²à¸à¸à¹à¸à¸¢ 2 วัà¸"});
2const p=760,w=220,C=8,c=8,N=20,v=10,M=p-C-c,F=w-N-v,B=a.map(Z=>Number(Z.cum)),T=Math.min(0,...B),R=Math.max(0,...B)-T||1,j=a.length,b=Z=>C+Z/(j-1)*M,D=Z=>N+(1-(Z-T)/R)*F,g=D(0),U=a.map((Z,Y)=>`${b(Y).toFixed(1)},${D(Number(Z.cum)).toFixed(1)}`).join(" "),O=`M ${b(0).toFixed(1)},${g.toFixed(1)} `+a.map((Z,Y)=>`L ${b(Y).toFixed(1)},${D(Number(Z.cum)).toFixed(1)}`).join(" ")+` L ${b(j-1).toFixed(1)},${g.toFixed(1)} Z`,$=a.reduce((Z,Y)=>Number(Y.cum)>Number(Z.cum)?Y:Z),L=a.reduce((Z,Y)=>Number(Y.cum)<Number(Z.cum)?Y:Z),W=a[j-1],ee=b(j-1),ce=D(Number(W.cum));return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-3 flex flex-wrap items-end justify-between gap-3",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsxs("span",{className:"text-4xl font-bold tracking-tight",style:{color:d},children:[o?"+":"",n,"%"]}),e.jsx("span",{className:"text-xs text-slate-500",children:"à¸à¸³à¹à¸£à¸ªà¸°à¸ªà¸¡ (Net)"})]}),e.jsxs("p",{className:"mt-1 text-[11px] text-slate-500",children:[f," วัà¸à¹à¸à¸£à¸ · ",u(a[0].d)," â ",u(W.d)," · ",e.jsxs("span",{className:"text-emerald-400/90",children:[r," à¸à¸à¸°"]})," / ",e.jsxs("span",{className:"text-rose-400/90",children:[x," à¹à¸à¹"]}),y!=null?` · ${y}% winrate`:""]})]}),e.jsxs("div",{className:"flex gap-2 text-[11px]",children:[e.jsxs("span",{className:"rounded-lg border border-emerald-500/25 bg-emerald-500/[0.06] px-2.5 py-1 text-emerald-300",children:["â² à¸à¸µà¸ +",$.cum,"%"]}),e.jsxs("span",{className:"rounded-lg border border-rose-500/25 bg-rose-500/[0.06] px-2.5 py-1 text-rose-300",children:["â¼ à¸à¹à¸³à¸ªà¸¸à¸ ",L.cum,"%"]})]})]}),e.jsxs("svg",{viewBox:`0 0 ${p} ${w}`,className:"block w-full",children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"eqGreen",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:"#34d399",stopOpacity:"0.38"}),e.jsx("stop",{offset:"100%",stopColor:"#34d399",stopOpacity:"0"})]}),e.jsxs("linearGradient",{id:"eqRed",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:"#f87171",stopOpacity:"0"}),e.jsx("stop",{offset:"100%",stopColor:"#f87171",stopOpacity:"0.38"})]}),e.jsx("clipPath",{id:"eqAbove",children:e.jsx("rect",{x:"0",y:"0",width:p,height:Math.max(0,g)})}),e.jsx("clipPath",{id:"eqBelow",children:e.jsx("rect",{x:"0",y:g,width:p,height:Math.max(0,w-g)})})]}),e.jsx("path",{d:O,fill:"url(#eqGreen)",clipPath:"url(#eqAbove)"}),e.jsx("path",{d:O,fill:"url(#eqRed)",clipPath:"url(#eqBelow)"}),e.jsx("line",{x1:C,y1:g,x2:p-c,y2:g,stroke:"#64748b",strokeWidth:"1",strokeDasharray:"4 4",opacity:"0.5"}),e.jsx("text",{x:C+2,y:Math.min(w-3,g+12),fill:"#64748b",fontSize:"9",children:"à¹à¸à¹à¸²à¸à¸¸à¸ 0%"}),e.jsx("polyline",{points:U,fill:"none",stroke:d,strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"}),a.map((Z,Y)=>e.jsx("circle",{cx:b(Y),cy:D(Number(Z.cum)),r:"2.4",fill:Number(Z.net)>=0?"#34d399":"#f87171",opacity:"0.9"},Y)),e.jsx("circle",{cx:ee,cy:ce,r:"6",fill:d,opacity:"0.22",children:e.jsx("animate",{attributeName:"r",values:"6;9;6",dur:"2.4s",repeatCount:"indefinite"})}),e.jsx("circle",{cx:ee,cy:ce,r:"3.2",fill:d})]}),e.jsxs("div",{className:"mt-1.5 flex justify-between text-[10px] text-slate-500",children:[e.jsx("span",{children:u(a[0].d)}),f>4&&e.jsx("span",{children:u(a[Math.floor((j-1)/2)].d)}),e.jsx("span",{children:u(W.d)})]})]})}const on=["ม.à¸.","à¸.à¸.","มี.à¸.","à¹à¸¡.ย.","à¸.à¸.","มิ.ย.","à¸.à¸.","ส.à¸.","à¸.ย.","à¸.à¸.","à¸.ย.","à¸.à¸."];function cn({text:a}){const n=o=>a.split(/(-?\d+(?:\.\d+)?)/).map(d=>/^-?\d+(?:\.\d+)?$/.test(d)?(parseFloat(d)*o).toFixed((d.split(".")[1]||"").length):d).join(""),[r,x]=i.useState(()=>n(0));return i.useEffect(()=>{let o=0;const d=performance.now(),u=f=>{const y=Math.min(1,(f-d)/900);x(n(1-Math.pow(1-y,3))),y<1&&(o=requestAnimationFrame(u))};return o=requestAnimationFrame(u),()=>cancelAnimationFrame(o)},[a]),e.jsx(e.Fragment,{children:r})}const fi="@keyframes tgReveal{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}@keyframes tgDraw{to{stroke-dashoffset:0}}@keyframes tgPop{from{opacity:0;transform:scale(.85)}to{opacity:1;transform:none}}@keyframes tgFade{from{opacity:0}
2to{opacity:1}}.tg-reveal{animation:tgReveal .5s ease both}",gi="@keyframes calIn{from{opacity:0;transform:scale(.86)}to{opacity:1;transform:scale(1)}}@keyframes calRingUp{0%{box-shadow:0 0 0 0 rgba(52,211,153,.5)}100%{box-shadow:0 0 0 8px rgba(52,211,153,0)}}@keyframes calRingDown{0%{box-shadow:0 0 0 0 rgba(248,113,113,.5)}100%{box-shadow:0 0 0 8px rgba(248,113,113,0)}}.cal-cell{transition:transform .14s ease}.cal-cell:hover{transform:translateY(-2px) scale(1.05);z-index:1}";function ji({equity:a}){const n=i.useMemo(()=>{const g=new Map;for(const U of a)g.set(U.d,{net:Number(U.net),w:Number(U.w)||0,l:Number(U.l)||0});return g},[a]),r=i.useMemo(()=>{const g=new Set;for(const U of a)g.add(U.d.slice(0,7));return Array.from(g).sort()},[a]),[x,o]=i.useState(r.length-1);if(i.useEffect(()=>{o(r.length-1)},[r.length]),!r.length)return null;const d=Math.min(Math.max(x,0),r.length-1),u=r[d],[f,y]=u.split("-").map(Number),p=new Date(f,y,0).getDate(),w=(new Date(f,y-1,1).getDay()+6)%7,C=g=>g?n.get(`${u}-${String(g).padStart(2,"0")}`):void 0;let c=0,N=0,v=0,M=0,F=.5,B=0;for(let g=1;g<=p;g++){const U=C(g);U&&(c+=U.net,N+=U.w,v+=U.l,M++,B=g,F=Math.max(F,Math.abs(U.net)))}const T=N+v>0?Math.round(N/(N+v)*100):null,J=[];for(let g=0;g<w;g++)J.push(null);for(let g=1;g<=p;g++)J.push(g);for(;J.length%7!==0;)J.push(null);const R=[];for(let g=0;g<J.length;g+=7)R.push(J.slice(g,g+7));const j=g=>g>=0?"+":"",b=g=>`rgba(${g>=0?"52,211,153":"248,113,113"},${(.14+.5*Math.min(1,Math.abs(g)/F)).toFixed(3)})`,D=["à¸","à¸","à¸","à¸à¸¤","ศ","ส","à¸à¸²"];return e.jsxs("div",{children:[e.jsx("style",{children:gi}),e.jsxs("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[11px]",children:[e.jsxs("span",{className:"rounded-lg border px-2.5 py-1 font-semibold",style:{color:c>=0?"#34d399":"#f87171",borderColor:c>=0?"rgba(52,211,153,0.3)":"rgba(248,113,113,0.3)",background:c>=0?"rgba(52,211,153,0.06)":"rgba(248,113,113,0.06)"},children:[j(c),c.toFixed(2),"% à¹à¸à¸·à¸à¸à¸à¸µà¹"]}),e.jsxs("span",{className:"text-slate-500",children:[M," วัà¸à¹à¸à¸£à¸ · ",e.jsxs("span",{className:"text-emerald-400/90",children:[N," à¸à¸à¸°"]})," / ",e.jsxs("span",{className:"text-rose-400/90",children:[v," à¹à¸à¹"]}),T!=null?` · ${T}% winrate`:""]})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("button",{onClick:()=>o(d-1),disabled:d<=0,className:"rounded-lg border border-white/10 px-2.5 py-1 text-sm text-slate-300 transition hover:bg-white/5 disabled:cursor-not-allowed disabled:opacity-30",children:"â¹"}),e.jsxs("span",{className:"min-w-[92px] text-center text-sm font-medium text-slate-200",children:[on[y-1]," ",f+543]}),e.jsx("button",{onClick:()=>o(d+1),disabled:d>=r.length-1,className:"rounded-lg border border-white/10 px-2.5 py-1 text-sm text-slate-300 transition hover:bg-white/5 disabled:cursor-not-allowed disabled:opacity-30",children:"âº"})]})]}),e.jsxs("div",{className:"mb-1 grid grid-cols-8 gap-1 text-center text-[10px] font-medium text-slate-500",children:[D.map(g=>e.jsx("div",{children:g},g)),e.jsx("div",{className:"text-cyan-400/70",children:"รวม"})]}),e.jsx("div",{className:"space-y-1",children:R.map((g,U)=>{let O=0,$=0;for(const L of g){const W=C(L);W&&(O+=W.net,$++)}return e.jsxs("div",{className:"grid grid-cols-8 gap-1",children:[g.map((L,W)=>{if(L==null)return e.jsx("div",{},W);const ee=C(L),ce=Math.min((L-1)*10,320),Z=ee&&L===B?`, ${ee.net>=0?"calRingUp":"calRingDown"} 1.9s ease-out ${ce+450}ms infinite`:"";return e.jsxs("div",{style:{background:ee?b(ee.net):void 0,borderColor:ee?ee.net>=0?"rgba(52,211,153,0.4)":"rgba(248,113,113,0.4)":"rgba(255,255,255,0.06)",animation:`calIn .45s ease ${ce}ms both${Z}`},className:"cal-cell flex min-h-[54px] flex-col rounded-lg border p-1.5",children:[e.jsx("span",{className:"text-[10px] leading-none text-slate-300/70",children:L}),ee&&e.jsxs("span",{className:"mt-auto text-center",children:[e.jsxs("span",{className:"block text-[12px] font-bold leading-tight",style:{color:ee.net>=0?"#6ee7b7":"#fca5a5"},children:[j(ee.net),ee.net.toFixed(2),"%"]}),e.jsxs("span",{className:"block text-[9px] leading-tight text-white/50",children:[ee.
2w,"W · ",ee.l,"L"]})]})]},W)}),e.jsx("div",{className:"flex min-h-[54px] flex-col items-center justify-center rounded-lg border border-white/5 bg-white/[0.02] p-1",children:$>0?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"text-[12px] font-bold leading-tight",style:{color:O>=0?"#34d399":"#f87171"},children:[j(O),O.toFixed(2),"%"]}),e.jsxs("span",{className:"mt-0.5 text-[9px] text-slate-500",children:[$," วัà¸"]})]}):e.jsx("span",{className:"text-[11px] text-slate-600",children:"â"})})]},U)})},u)]})}function Ni({data:a}){if(!a.length)return e.jsx("p",{className:"text-xs text-slate-500",children:"ยัà¸à¹à¸¡à¹à¸¡à¸µà¸à¹à¸à¸¡à¸¹à¸¥"});const n=a.map(T=>({...T,net:Number(T.net)})),r=360,x=152,o=12,d=12,u=22,f=116,y=f-u,p=r-o-d,w=Math.max(0,...n.map(T=>T.net)),C=Math.max(0,...n.map(T=>-T.net)),c=w+C||1,N=u+w/c*y,v=n.length,M=p/v,F=Math.min(46,M*.52),B=T=>`${on[parseInt(T.slice(5,7),10)-1]||T.slice(5)} ${T.slice(2,4)}`;return e.jsxs("div",{children:[e.jsxs("svg",{viewBox:`0 0 ${r} ${x}`,className:"block w-full",children:[e.jsx("line",{x1:o,y1:N,x2:r-d,y2:N,stroke:"#64748b",strokeWidth:"1",strokeDasharray:"4 4",opacity:"0.5"}),e.jsx("text",{x:o,y:N-3,fill:"#64748b",fontSize:"8",children:"0%"}),n.map((T,J)=>{const R=o+M*J+M/2,j=Math.max(1.5,Math.abs(T.net)/c*y),b=T.net>=0,D=b?N-j:N,g=b?"#34d399":"#f87171",U=b?Math.max(9,D-4):Math.min(x-20,D+j+11);return e.jsxs("g",{children:[e.jsx("title",{children:`${B(T.m)} · ${T.net>0?"+":""}${T.net}% · ${T.total} สัà¸à¸à¸²à¸`}),e.jsx("rect",{x:R-F/2,y:D,width:F,height:j,rx:"3",fill:g,opacity:"0.85"}),e.jsxs("text",{x:R,y:U,textAnchor:"middle",fontSize:"9.5",fontWeight:"600",fill:g,children:[T.net>0?"+":"",T.net,"%"]}),e.jsx("text",{x:R,y:x-5,textAnchor:"middle",fontSize:"9",fill:"#94a3b8",children:B(T.m)})]},T.m)})]}),e.jsx("p",{className:"mt-1.5 text-[11px] text-slate-500",children:"à¹à¸à¹à¸à¹à¸à¸µà¸¢à¸§ = à¹à¸à¸·à¸à¸à¸à¸³à¹à¸£ · à¹à¸à¹à¸à¹à¸à¸ = à¹à¸à¸·à¸à¸à¸à¸²à¸à¸à¸¸à¸ · à¹à¸à¸µà¸¢à¸à¹à¸ªà¹à¸ 0% (à¹à¸à¹à¸²à¸à¸¸à¸)"})]})}function yi({win:a,loss:n,expired:r,pending:x}){const o=a+n+r+x,d=[{v:a,c:"#34d399",label:"Win"},{v:n,c:"#f87171",label:"Loss"},{v:r,c:"#94a3b8",label:"Expired"},{v:x,c:"#22d3ee",label:"รà¸à¸à¸¥"}].filter(w=>w.v>0),u=56,f=2*Math.PI*u,y=a+n>0?Math.round(a/(a+n)*100):null;let p=0;return e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsxs("svg",{viewBox:"0 0 150 150",className:"h-40 w-40",style:{animation:"tgPop .6s ease-out both"},children:[e.jsx("circle",{cx:"75",cy:"75",r:u,fill:"none",stroke:"#1b2740",strokeWidth:"14"}),o>0&&d.map((w,C)=>{const c=w.v/o,N=`${(c*f).toFixed(2)} ${(f-c*f).toFixed(2)}`,v=-p*f;return p+=c,e.jsx("circle",{cx:"75",cy:"75",r:u,fill:"none",stroke:w.c,strokeWidth:"14",strokeDasharray:N,strokeDashoffset:v.toFixed(2),transform:"rotate(-90 75 75)",style:{animation:"tgFade .5s ease both",animationDelay:`${250+C*140}ms`}},C)}),e.jsx("text",{x:"75",y:"70",textAnchor:"middle",className:"fill-white",fontSize:"26",fontWeight:"700",children:e.jsx(cn,{text:y==null?"â":`${y}%`})}),e.jsx("text",{x:"75",y:"90",textAnchor:"middle",fill:"#64748b",fontSize:"11",children:"Win Rate"})]}),e.jsx("div",{className:"mt-3 grid w-full grid-cols-2 gap-x-4 gap-y-1.5 text-xs",children:[{v:a,c:"#34d399",l:"Win"},{v:n,c:"#f87171",l:"Loss"},{v:r,c:"#94a3b8",l:"Expired"},{v:x,c:"#22d3ee",l:"รà¸à¸à¸¥"}].map(w=>e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"flex items-center gap-1.5 text-slate-400",children:[e.jsx("span",{className:"h-2.5 w-2.5 rounded-sm",style:{background:w.c}}),w.l]}),e.jsx("span",{className:"font-medium text-slate-200",children:w.v})]},w.l))})]})}function as({label:a,frac:n,color:r,right:x,outOfFilter:o}){return e.jsxs("div",{className:`flex items-center gap-2 text-xs ${o?"opacity-55":""}`,children:[e.jsxs("span",{className:"flex w-24 shrink-0 items-center gap-1 text-slate-400",children:[e.jsx("span",{className:"truncate",children:a}),o&&e.jsx("span",{className:"shrink-0 rounded bg-amber-500/15 px-1 py-0.5 text-[9px] font-medium text-amber-300/90",children:"à¸à¸à¸à¹à¸¥à¹à¸§"})]}),e.jsx("div",{className:"h-2.5 flex-1 overflow-hidden rounded-full bg-white/5",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${Math.max(2,Math.min(100,n
2*100))}%`,background:r}})}),e.jsx("span",{className:"w-16 shrink-0 text-right text-slate-300",children:x})]})}function wi({label:a,sub:n,net:r,win:x,loss:o,maxAbs:d,outOfFilter:u}){const f=r>=0,y=d>0?Math.min(1,Math.abs(r)/d):0,p=x+o>0?Math.round(x/(x+o)*100):null;return e.jsxs("div",{className:`flex items-center gap-2.5 text-xs ${u?"opacity-55":""}`,children:[e.jsxs("div",{className:"w-24 shrink-0",children:[e.jsxs("span",{className:"flex items-center gap-1 font-medium text-slate-200",children:[e.jsx("span",{className:"truncate",children:a}),u&&e.jsx("span",{className:"shrink-0 rounded bg-amber-500/15 px-1 py-0.5 text-[9px] font-medium text-amber-300/90",children:"à¸à¸à¸à¹à¸¥à¹à¸§"})]}),n&&e.jsx("span",{className:"block truncate text-[10px] text-slate-500",children:n})]}),e.jsxs("div",{className:"relative h-2.5 flex-1",children:[e.jsx("div",{className:"absolute inset-0 rounded-full bg-white/[0.04]"}),e.jsx("div",{className:"absolute left-1/2 top-0 h-full w-px bg-white/15"}),e.jsx("div",{className:"absolute top-0 h-full rounded-full",style:f?{left:"50%",width:`${y*50}%`,background:"#34d399"}:{right:"50%",width:`${y*50}%`,background:"#f87171"}})]}),e.jsxs("span",{className:"w-14 shrink-0 text-right font-semibold",style:{color:f?"#34d399":"#f87171"},children:[r>0?"+":"",r,"%"]}),e.jsxs("span",{className:"w-20 shrink-0 text-right text-slate-400",children:[x,"-",o,p!=null?` · ${p}%`:""]})]})}function vi({rank:a,label:n,sub:r,net:x,win:o,loss:d,closed:u,coverage:f,maxAbs:y}){const p=x>=0,w=y>0?Math.min(1,Math.abs(x)/y):0,C=u>0?Math.round(o/u*100):null,c=a===1?"border-amber-400/40 bg-amber-400/20 text-amber-300":a===2?"border-slate-300/30 bg-slate-300/15 text-slate-200":a===3?"border-orange-400/30 bg-orange-400/15 text-orange-300":"border-white/10 bg-white/5 text-slate-400";return e.jsxs("div",{className:"flex items-center gap-2.5 text-xs",children:[e.jsx("span",{className:`grid h-6 w-6 shrink-0 place-items-center rounded-lg border text-[11px] font-bold ${c}`,children:a}),e.jsxs("div",{className:"w-20 shrink-0 sm:w-24",children:[e.jsx("span",{className:"block truncate font-medium text-slate-200",children:n}),r&&e.jsx("span",{className:"block truncate text-[10px] text-slate-500",children:r})]}),e.jsxs("div",{className:"relative h-2.5 flex-1",children:[e.jsx("div",{className:"absolute inset-0 rounded-full bg-white/[0.04]"}),e.jsx("div",{className:"absolute left-1/2 top-0 h-full w-px bg-white/15"}),e.jsx("div",{className:"absolute top-0 h-full rounded-full",style:p?{left:"50%",width:`${w*50}%`,background:"#34d399"}:{right:"50%",width:`${w*50}%`,background:"#f87171"}})]}),e.jsxs("span",{className:"w-14 shrink-0 text-right font-semibold",style:{color:p?"#34d399":"#f87171"},children:[x>0?"+":"",x,"%"]}),e.jsxs("span",{className:"hidden w-20 shrink-0 text-right text-slate-400 sm:block",children:[o,"-",d,C!=null?` · ${C}%`:""]}),e.jsxs("span",{className:"hidden w-24 shrink-0 justify-end gap-1.5 text-right text-[10px] text-slate-500 md:flex",children:[e.jsxs("span",{children:[u," à¹à¸¡à¹"]}),e.jsxs("span",{className:f<50?"rounded bg-amber-500/15 px-1 py-0.5 text-amber-300/90":"",title:`à¸à¸´à¸à¸à¸¥à¹à¸¥à¹à¸§ ${f}% à¸à¸à¸à¸ªà¸±à¸à¸à¸²à¸à¸à¸¹à¹à¸à¸µà¹ â à¸à¸µà¹à¹à¸«à¸¥à¸·à¸à¸¢à¸±à¸à¸£à¸à¸à¸¥`,children:["à¸à¸´à¸ ",f,"%"]})]})]})}const ln=a=>a?a>=60?`${(a/60).toFixed(1)} à¸à¸¡.`:`${Math.round(a)} à¸.`:"â";function _i(a,n,r,x){if(a==="telegram")return e.jsxs("g",{children:[e.jsx("circle",{cx:n,cy:r,r:"11",fill:"#229ED9"}),e.jsxs("g",{fill:"none",stroke:"#ffffff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",transform:`translate(${n-7},${r-7}) scale(0.58)`,children:[e.jsx("path",{d:"M22 3 L11 14"}),e.jsx("path",{d:"M22 3 L15 21 L11 14 L3 10 Z"})]})]});let o;switch(a){case"ai":o=e.jsxs(e.Fragment,{children:[e.jsx("line",{x1:"5",y1:"8",x2:"12",y2:"12"}),e.jsx("line",{x1:"5",y1:"16",x2:"12",y2:"12"}),e.jsx("line",{x1:"12",y1:"12",x2:"19",y2:"8"}),e.jsx("line",{x1:"12",y1:"12",x2:"19",y2:"16"}),e.jsx("circle",{cx:"5",cy:"8",r:"2.1"}),e.jsx("circle",{cx:"5",cy:"16",r:"2.1"}),e.jsx("circle",{cx:"12",cy:"12",r:"2.4"}),e.jsx("circle",{cx:"19",cy:"8",r:"2.1"}),e.jsx("circle",{cx:"19",cy:"16",r:"2.1"})]});break;case"filter":o=e.jsx("path",{d:"M3 5 H21 L14 13 V20 L10 18 V13 Z"});break;case"gauge":o=e.jsxs(e.Fragment,{children:[e.jsx("circle",{cx:"12",cy:"12",r:"8"}),e.jsx("circle",{cx:"12",cy:"12",r:"3.6"})]});break;case"risk":o=e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M12 3 L19 6 V11 C19 16 16 19 12 21 C8 19 5 16 5 11 V6 Z"}),e.jsx("path",{d:"M9 12 l2 2 l4 -4"})]});break;case"clock":o=e.jsxs(e.Fragment,{children:[e.jsx("circle",{cx:"12",cy:"12",r:"8"}),e.jsx("path",{d:"M12 8 V12 L15 14"})]});break;case"report":o=e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M4 20 H20"}),e.jsx("path",{d:"M7 20 V14"}),e.jsx("path",{d:"M12 20 V8"}),e.jsx("path",{d:"M17 20 V11"})]});break;default:o=e.jsx(e.Fragment,{})}return e.jsxs("g",{children:[e.jsx("circle",{cx:n,cy:r,r:"11",fill:x,fillOpacity:"0.16"}),e.jsx("g",{fill:"none",stroke:x,strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",transform:`translate(${n-7},${r-7}) scale(0.58)`,children:o})]})}function ki(a){const n=(r,x,o,d,u,f,y,p,w,C)=>e.jsxs("g",{className:"pf-node",onClick:()=>a.onNav(p),children:[e.jsx("rect",{className:"pf-card",x:r,y:x,width:o,height:d,rx:"13",fill:"#15120a",stroke:u,strokeOpacity:"0.45"}),e.jsx("rect",{x:r,y:x,width:"4",height:d,rx:"2",fill:u}),_i(w,r+26,x+d/2,u),e.jsx("text",{x:r+46,y:x+d/2-3,fill:"#f3ecd9",fontSize:"14",fontWeight:"600",children:f}),e.jsx("text",{x:r+46,y:x+d/2+15,fill:"#9a8c66",fontSize:"11",children:y}
2),C&&e.jsx("circle",{className:"pf-pulse",cx:r+o-16,cy:x+16,r:"3.6",fill:C})]});return e.jsxs("svg",{width:"100%",viewBox:"0 0 1000 600",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"Signal pipeline",style:{display:"block"},children:[e.jsxs("defs",{children:[e.jsxs("radialGradient",{id:"pf-orb",cx:"50%",cy:"45%",r:"60%",children:[e.jsx("stop",{offset:"0",stopColor:"#fff3cf"}),e.jsx("stop",{offset:"0.35",stopColor:"#f5c451"}),e.jsx("stop",{offset:"0.8",stopColor:"#b8860b"}),e.jsx("stop",{offset:"1",stopColor:"#6b4e08"})]}),e.jsxs("radialGradient",{id:"pf-halo",cx:"50%",cy:"50%",r:"50%",children:[e.jsx("stop",{offset:"0",stopColor:"#f5c451",stopOpacity:"0.3"}),e.jsx("stop",{offset:"1",stopColor:"#f5c451",stopOpacity:"0"})]}),e.jsxs("linearGradient",{id:"pf-wire",x1:"0",y1:"0",x2:"1",y2:"0",children:[e.jsx("stop",{offset:"0",stopColor:"#8a6a14"}),e.jsx("stop",{offset:"1",stopColor:"#f5c451"})]}),e.jsxs("filter",{id:"pf-glow",x:"-60%",y:"-60%",width:"220%",height:"220%",children:[e.jsx("feGaussianBlur",{stdDeviation:"2.6",result:"b"}),e.jsxs("feMerge",{children:[e.jsx("feMergeNode",{in:"b"}),e.jsx("feMergeNode",{in:"SourceGraphic"})]})]}),e.jsx("style",{children:` 3 .pf-node{cursor:pointer;transition:opacity .15s} 4 .pf-node:hover{opacity:.92} 5 .pf-node:hover .pf-card{stroke-opacity:.95} 6 .pf-pulse{animation:pfpulse 1.6s ease-in-out infinite;transform-box:fill-box;transform-origin:center} 7 @keyframes pfpulse{0%,100%{opacity:1}50%{opacity:.3}} 8 @keyframes pfhalo{0%,100%{opacity:.5}50%{opacity:.9}} 9 `})]}),e.jsx("rect",{x:"0",y:"0",width:"1000",height:"600",rx:"14",fill:"#0a0a0d"}),e.jsx("ellipse",{cx:"520",cy:"300",rx:"320",ry:"240",fill:"url(#pf-halo)"}),e.jsx("text",{x:"120",y:"74",fill:"#c79a2e",fontSize:"11",fontWeight:"700",letterSpacing:"2",children:"â à¹à¸«à¸¥à¹à¸à¸ªà¸±à¸à¸à¸²à¸à¹à¸¥à¸°à¸à¸£à¸à¸"}),e.jsx("text",{x:"486",y:"74",fill:"#c79a2e",fontSize:"11",fontWeight:"700",letterSpacing:"2",children:"⡠สมà¸à¸ AI"}),e.jsx("text",{x:"772",y:"74",fill:"#c79a2e",fontSize:"11",fontWeight:"700",letterSpacing:"2",children:"⢠สà¹à¸à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡"}),e.jsxs("g",{filter:"url(#pf-glow)",children:[e.jsx("path",{d:"M280 201 C 366 201, 400 296, 462 297",fill:"none",stroke:"url(#pf-wire)",strokeWidth:"2",opacity:"0.8"}),e.jsx("path",{d:"M280 301 C 372 301, 400 300, 462 300",fill:"none",stroke:"url(#pf-wire)",strokeWidth:"2",opacity:"0.8"}),e.jsx("path",{d:"M280 401 C 366 401, 402 304, 462 303",fill:"none",stroke:"url(#pf-wire)",strokeWidth:"2",opacity:"0.8"}),e.jsx("path",{d:"M578 292 C 648 286, 662 240, 700 240",fill:"none",stroke:"url(#pf-wire)",strokeWidth:"2",opacity:"0.8"}),e.jsx("path",{d:"M800 270 C 800 296, 800 306, 800 330",fill:"none",stroke:"url(#pf-wire)",strokeWidth:"2",opacity:"0.8"}),e.jsx("path",{d:"M524 360 C 518 412, 514 442, 512 470",fill:"none",stroke:a.reportStroke,strokeWidth:"2",opacity:"0.7"})]}),e.jsx("path",{d:"M700 360 C 560 430, 590 360, 512 352",fill:"none",stroke:"#a98a3a",strokeWidth:"1.6",strokeOpacity:"0.6",strokeDasharray:"2 8"}),e.jsx("circle",{r:"2.6",fill:"#ffe9a8",filter:"url(#pf-glow)",children:e.jsx("animateMotion",{dur:"2.5s",repeatCount:"indefinite",path:"M280 301 C 372 301, 400 300, 462 300"})}),e.jsx("circle",{r:"2.6",fill:"#ffe9a8",filter:"url(#pf-glow)",children:e.jsx("animateMotion",{dur:"2.7s",repeatCount:"indefinite",path:"M578 292 C 648 286, 662 240, 700 240"})}),e.jsx("text",{x:"372",y:"250",fill:"#caa94a",fontSize:"10",fontWeight:"600",children:"วิà¹à¸à¸£à¸²à¸°à¸«à¹"}),e.jsx("text",{x:"628",y:"232",fill:"#caa94a",fontSize:"10",fontWeight:"600",children:"à¸à¸±à¹à¸à¹à¸§à¸¥à¸²"}),e.jsx("text",{x:"396",y:"430",fill:"#caa94a",fontSize:"10",fontWeight:"600",children:"à¸à¹à¸à¸à¸à¸¥à¸±à¸ · ยิà¹à¸à¸ªà¹à¸à¸¢à¸´à¹à¸à¹à¸¡à¹à¸"}),n(70,170,210,62,"#f5c451","Asset Filter",a.assetSub,"signals","filter"),n(70,270,210,62,"#f5c451","Confidence Gate",a.confLabel,"signals","gauge"),n(70,370,210,62,"#f5c451","Risk + Card",a.riskSub,"signals","risk"),e.jsxs("g",{className:"pf-node",onClick:()=>a.onNav("top"),children:[e.jsx("circle",{cx:"520",cy:"300",r:"92",fill:"url(#pf-halo)",style:{animation:"pfhalo 3s ease-in-out infinite"}}),e.jsx("circle",{cx:"520",cy:"300",r:"62",fill:"none",stroke:"#f5c451",strokeOpacity:"0.35",strokeDasharray:"3 6",children:e.jsx("animateTransform",{attributeName:"transform",type:"rotate",from:"0 520 300",to:"360 520 300",dur:"26s",repeatCount:"indef
9inite"})}),e.jsx("circle",{cx:"520",cy:"300",r:"50",fill:"url(#pf-orb)",filter:"url(#pf-glow)"}),e.jsx("text",{x:"520",y:"296",textAnchor:"middle",fill:"#1a1304",fontSize:"17",fontWeight:"800",children:"Alpha AI"}),e.jsx("text",{x:"520",y:"314",textAnchor:"middle",fill:"#5a430a",fontSize:"9.5",fontWeight:"700",children:"Signal Engine · 24/7"})]}),n(700,210,200,60,"#f5c451","Schedule",a.schedSub,"signals","clock"),n(700,330,200,60,a.tgStroke,"Telegram Group",a.tgSub,"setup","telegram",a.tgDot),n(412,470,200,58,a.reportStroke,"Win/Loss Report",a.reportSub,"feed","report"),e.jsxs("g",{transform:"translate(360,556)",children:[e.jsx("rect",{x:"0",y:"0",width:"280",height:"30",rx:"15",fill:"#15120a",stroke:"#d4a017",strokeOpacity:"0.4"}),e.jsx("text",{x:"140",y:"20",textAnchor:"middle",fill:"#caa94a",fontSize:"11",children:"à¸à¸¸à¸à¸ªà¸±à¸à¸à¸²à¸à¸à¹à¸à¸à¸à¸¥à¸±à¸à¹à¸à¹à¸²à¸ªà¸¡à¸à¸ â ยิà¹à¸à¸ªà¹à¸à¸¢à¸´à¹à¸à¹à¸¡à¹à¸"})]})]})}function de({on:a,onChange:n}){return e.jsx("button",{type:"button",role:"switch","aria-checked":a,onClick:()=>n(!a),className:`inline-flex h-6 w-11 shrink-0 items-center rounded-full px-0.5 transition-colors ${a?"bg-emerald-500":"bg-slate-600"}`,children:e.jsx("span",{className:`inline-block h-5 w-5 transform rounded-full bg-white shadow-sm transition-transform ${a?"translate-x-5":"translate-x-0"}`})})}function bo(){var _l,kl,Sl,Cl,$l,Ml,Al,Dl,Ll,Tl,Rl,Fl,El;nr("section:signal-control");const a=i.useMemo(()=>new URLSearchParams(window.location.search).get("token")||"",[]),[n,r]=i.useState(""),[x,o]=i.useState("init"),[d,u]=i.useState({balance:0,cost:50,expires_at:null,discordHasAccess:!1,discordExpiresAt:null,discordCost:50}),[f,y]=i.useState(!1),[p,w]=i.useState(null),C=!a,[c,N]=i.useState("overview"),[v,M]=i.useState(null),[F,B]=i.useState(!1),[T,J]=i.useState(!1),[R,j]=i.useState(null),[b,D]=i.useState(null),[g,U]=i.useState(null),[O,$]=i.useState(null),[L,W]=i.useState("30d"),[ee,ce]=i.useState(!1),[Z,Y]=i.useState(!1),[je,Be]=i.useState(""),[Ee,xe]=i.useState(null),[le,fe]=i.useState(!1),[Ae,De]=i.useState(!1),[ne,Le]=i.useState(null),[A,G]=i.useState(null),[te,K]=i.useState(!1),[re,ae]=i.useState(null),[ie,ge]=i.useState([]),[_e,ls]=i.useState("all"),[ns,Te]=i.useState(!1),[ct,Ne]=i.useState(null),[We,He]=i.useState({}),[wt,ze]=i.useState(!0),[tt,Pe]=i.useState(null),[h,dn]=i.useState(null),[z,xn]=i.useState(null),[Ve,mn]=i.useState([]),[pn,rs]=i.useState(1),[hn,vt]=i.useState(null),[_t,ea]=i.useState("chart"),[un,bn]=i.useState(""),[st,is]=i.useState(""),[os,fn]=i.useState(!1),[cs,gn]=i.useState(!1),[ds,jn]=i.useState(!1),[Ye,xs]=i.useState(""),[ke,ta]=i.useState(!1),[ms,sa]=i.useState(!0),[me,dt]=i.useState([]),[at,aa]=i.useState(""),[xt,la]=i.useState(70),[mt,na]=i.useState(1),[Xe,ps]=i.useState(5),[be,ra]=i.useState("Asia/Bangkok"),[kt,ia]=i.useState(!0),[oa,ca]=i.useState(!1),[hs,da]=i.useState(!0),[xa,ma]=i.useState(!1),[St,pa]=i.useState(!1),[lt,ha]=i.useState(9),[nt,ua]=i.useState(0),[Ct,ba]=i.useState(!0),[$t,fa]=i.useState(!1),[ga,Mt]=i.useState(null),[ja,Na]=i.useState(!0),[At,ya]=i.useState(""),[wa,va]=i.useState(!0),[us,_a]=i.useState(!1),[Dt,ka]=i.useState("fade"),[bs,Sa]=i.useState(["1h","4h"]),[fs,Ca]=i.useState(!1),[gs,$a]=i.useState(["1h","4h"]),[js,Ma]=i.useState(!1),[Ns,Aa]=i.useState(!1),[pt,ys]=i.useState(!1),[Lt,ws]=i.useState([]),[vs,_s]=i.useState("any"),[ks,Da]=i.useState(!1),[Ss,La]=i.useState(!1),[ht,Cs]=i.useState(""),[Tt,$s]=i.useState(120),[Ta,Ra]=i.useState([]),[Rt,Fa]=i.useState(""),[Ea,Pa]=i.useState(!0),[Ua,Ia]=i.useState(""),[Oa,Ba]=i.useState(85),[rt,ut]=i.useState([]),[Ft,Nn]=i.useState({}),[Ms,Wa]=i.useState(null),[Et,Ha]=i.useState("telegram"),[As,qa]=i.useState(!1),[Pt,bt]=i.useState(null),[Ds,Ze]=i.useState(!1),[Ga,pe]=i.useState(null),[Ut,It]=i.useState([]),[qe,za]=i.useState(!1),[Ot,Ls]=i.useState(!1),[V,yn]=i.useState(null),[Va,Ya]=i.useState(!1),[Xa,Bt]=i.useState(null),[k,wn]=i.useState(null),[it,Ts]=i.useState([]),[Wt,Za]=i.useState(""),[Rs,Ka]=i.useState(!1),[Fs,Ht]=i.useState(1),[Se,Ke]=i.useState(!1),[Ja,he]=i.useState(null),[Qa,el]=i.useState(""),[Es,tl]=i.useState(!1),[Q,vn]=i.useState(null),[qt,_n]=i.useState("all"),[Gt,kn]=i.useState("lab"),[zt,Ps]=i.useState(!1),[Ue,Sn]=i.useState(null),[Vt,Cn]=i.useState("30d"),[$n,Us]=i.useState(!1),[sl,al]=i.useState(null),Yt=i.useCallback(t=>{const s=t.channel;dn(s),xn(t.stats),mn(t.feed||[]),bn(s.customer_name||""),xs(s.chat_id||""),ta(s.enabled),sa(s.telegram_signals_enabled!==!1),dt(s.filter_assets||[]),la(s.min_confidence),na(Number(s.risk_per_trade_pct)),ps(s.send_interval_minutes),ra(s.timezone||"Asia/Bangkok"),ia(s.send_results),da(s.send_images),ma(s.send_calendar),va(s.send_mtf!==!1),pa(s.brief_enabled===!0),ha(s.brief_hour??9),ua(s.brief_minute??0),ba(s.week_pin!==!1),Na(s.news_guard!==!1),ya(s.custom_footer||""),ca(s.digest_split_by_category===!0),_a(s.swing_enabled===!0),ka(s.swing_mode==="breakout"||s.swing_mode==="both"?s.swing_mode:"fade"),Sa(Array.isArray(s.swing_tfs)&&s.swing_tfs.length?s.swing_tfs:["1h","4h"]),Ca(s.liqsweep_enabled===!0),$a(Array.isArray(s.liqsweep_tfs)&&s.liqsweep_tfs.length?s.liqsweep_tfs:["1h","4h"]),Ma(s.require_mtf),Aa(s.require_smc),ys(s.require_pa),ws(Array.isArray(s.pa_tfs)?s.pa_tfs:[]),_s(s.pa_pattern==="engulfing"?"engulfing":"any"),Da(s.auto_news),$s(s.news_interval_minutes||120),Ra(s.news_categories||[]),Cs(s.news_chat_id||""),La(!!s.news_chat_id),Fa(""),Pa(s.discord_enabled!==!1),Ia(s.discord_ping_role_id||""),Ba(s.discord_ping_min_confidence??85),ut((s.discord_routes||[]).map(m=>({id:m.id,label:m.label||"",kind:m.kind==="news"||m.kind==="footprint"?m.kind:"signals",groups:Array.isArray(m.groups)?m.groups:[],enabled:m.enabled!==!1,webhook:"",webhook_set:!!m.webhook_set,webhook_masked:m.webhook_masked||""})));const l={};for(const m of s.discord_routes||[])l[m.id]={last_ok_at:m.last_ok_at??null,fail_streak:m.fail_streak??0,last_fail_at:m.last_fail_at??null,last_error:m.last_error??null,dead:m.dead===!0||(m.fail_streak??0)>=3};Nn(l)},[]),Ie=i.useCallback(async t=>{ze(!0),Pe(null);const{data:s,error:l}=await X.rpc("tg_portal_get",{p_token:t});if(ze(!1),l){Pe(l.message);return}
9if(!s||s.error){Pe((s==null?void 0:s.error)==="not_found"?"à¹à¸¡à¹à¸à¸à¸¥à¸´à¸à¸à¹à¸à¸µà¹ (token à¹à¸¡à¹à¸à¸¹à¸à¸à¹à¸à¸)":"token à¹à¸¡à¹à¸à¸¹à¸à¸à¹à¸à¸");return}Yt(s)},[Yt]);i.useEffect(()=>{(async()=>{if(a){r(a),o("ready"),Ie(a);const{data:s}=await X.rpc("tg_user_get");s!=null&&s.logged_in&&u({balance:s.balance??0,cost:s.cost??50,expires_at:s.expires_at??null,discordHasAccess:!!s.discord_has_access,discordExpiresAt:s.discord_expires_at??null,discordCost:s.discord_cost??50});return}const{data:t}=await X.rpc("tg_user_get");if(!t||!t.logged_in){o("need_login"),ze(!1);return}u({balance:t.balance??0,cost:t.cost??50,expires_at:t.expires_at??null,discordHasAccess:!!t.discord_has_access,discordExpiresAt:t.discord_expires_at??null,discordCost:t.discord_cost??50}),t.has_access&&t.manage_token?(r(t.manage_token),o("ready"),Ie(t.manage_token)):(o("paywall"),ze(!1))})()},[a,Ie]),i.useEffect(()=>{if(x!=="ready")return;const t=rr();if(!t)return;Be(t);let s=!0;if(ir().then(l=>{s&&(l==null?void 0:l.commission_rate)!=null&&xe(Number(l.commission_rate))}),!Ul.getItem("tg_partner_invite_seen"))return(async()=>{const l=await or(t);s&&(l&&l.directNewCustomers>0||setTimeout(()=>{s&&(Ul.setItem("tg_partner_invite_seen","1"),fe(!0))},1200))})(),()=>{s=!1}},[x]),i.useEffect(()=>{c!=="overview"||!n||X.rpc("tg_portal_analytics",{p_token:n}).then(({data:t})=>{t&&!t.error&&D(t)})},[c,n]);const Je=i.useCallback(t=>{wn({on:!!t.footprint_lab,vipActive:!!t.vip_active,hasRoom:!!t.has_footprint_room,hasTg:!!t.has_telegram,supported:t.supported_assets||[],mainChat:t.main_chat_id||null,tgOn:t.footprint_tg_enabled!==!1,dcOn:!!t.footprint_dc_enabled,paid:!!t.footprint_paid,unlimited:!!t.footprint_unlimited,expiresAt:t.footprint_expires_at||null,cost:Number(t.footprint_cost)||50}),Ts(Array.isArray(t.footprint_assets)?t.footprint_assets:[]),Za(t.footprint_chat_id||"")},[]);i.useEffect(()=>{c!=="footprint"&&c!=="overview"||!n||X.rpc("tg_portal_footprint",{p_token:n,p_action:"get"}).then(({data:t})=>{t!=null&&t.ok&&Je(t)})},[c,n,Je]);
9const ft=(t,s)=>(t==null?void 0:t.error)==="vip_expired"?"â VIP หมà¸à¸à¸²à¸¢à¸¸ â à¸à¹à¸à¸à¸²à¸¢à¸¸à¸à¹à¸à¸à¹à¸à¸´à¸à¹à¸à¹ Add-On":(t==null?void 0:t.error)==="payment_required"?`â à¸à¹à¸à¸à¹à¸à¸´à¸à¹à¸à¹à¸à¸²à¸à¸à¹à¸§à¸¢ ${(t==null?void 0:t.cost)??50} à¹à¸à¸£à¸à¸´à¸à¸à¹à¸à¸`:(t==null?void 0:t.error)==="insufficient"?`â à¹à¸à¸£à¸à¸´à¸à¹à¸¡à¹à¸à¸ (มี ${(t==null?void 0:t.balance)??0} · à¸à¹à¸à¸à¹à¸à¹ ${(t==null?void 0:t.cost)??50})`:(t==null?void 0:t.error)==="no_channel"?"â ยัà¸à¹à¸¡à¹à¸¡à¸µà¸à¹à¸à¸ Signal Control":(t==null?void 0:t.error)==="no_vip"?"â à¸à¹à¸à¸à¹à¸à¹à¸²à¸ªà¸¹à¹à¸£à¸°à¸à¸à¸à¹à¸§à¸¢à¸£à¸«à¸±à¸ª VIP à¸à¹à¸à¸":`à¹à¸¡à¹à¸ªà¸³à¹à¸£à¹à¸: ${(s==null?void 0:s.message)||(t==null?void 0:t.error)||"ลà¸à¸à¹à¸«à¸¡à¹à¸à¸µà¸à¸à¸£à¸±à¹à¸"}`,Mn=async()=>{if(!n||Se)return;Ke(!0),he(null);const{data:t,error:s}=await X.rpc("tg_user_unlock_footprint");if(s||!(t!=null&&t.ok)){Ke(!1),he(ft(t,s));return}const{data:l}=await X.rpc("tg_portal_footprint",{p_token:n,p_action:"get"});Ke(!1),l!=null&&l.ok&&Je(l),u(m=>({...m,balance:Number(t.balance)??m.balance})),he(`â
à¹à¸à¸´à¸à¹à¸à¹à¸à¸²à¸à¹à¸¥à¹à¸§ â หัภ${t.cost} à¹à¸à¸£à¸à¸´à¸ · à¹à¸à¹à¹à¸à¹à¸à¸¶à¸ ${new Date(t.footprint_expires_at).toLocaleDateString("th-TH",{day:"2-digit",month:"short",year:"numeric"})} · à¹à¸à¸£à¸à¸´à¸à¸à¸à¹à¸«à¸¥à¸·à¸ ${t.balance}`)},ll=async t=>{if(!n||Se)return;Ke(!0),he(null);const s=Qa.trim(),{data:l,error:m}=await X.rpc("tg_portal_footprint",{p_token:n,p_action:t?"on":"off",p_webhook:t&&s?s:null,p_assets:null,p_chat_id:null});if(Ke(!1),m||!(l!=null&&l.ok)){he(ft(l,m));return}Je(l),he(t?"â
à¹à¸à¸´à¸à¸£à¸±à¸à¹à¸¥à¹à¸§ â สัà¸à¸à¸²à¸ Footprint + สรุà¸à¸à¸¥à¸£à¸²à¸¢à¸§à¸±à¸à¸à¸°à¹à¸£à¸´à¹à¸¡à¹à¸à¹à¸²à¸«à¹à¸à¸à¸à¸à¸à¸à¸¸à¸":"à¸à¸´à¸à¸à¸²à¸£à¸£à¸±à¸à¸ªà¸±à¸à¸à¸²à¸ Footprint à¹à¸¥à¹à¸§"),t&&s&&(el(""),Ie(n))},An=async()=>{var l;if(!n||Es)return;tl(!0),he(null);const{data:t,error:s}=await X.rpc("tg_portal_footprint",{p_token:n,p_action:"assets",p_webhook:null,p_assets:it,p_chat_id:null});if(tl(!1),s||!(t!=null&&t.ok)){he(ft(t,s));return}Je(t),he((l=t.footprint_assets)!=null&&l.length?`â
à¸à¸±à¸à¸à¸¶à¸à¹à¸¥à¹à¸§ â รัภ${t.footprint_assets.length} à¸à¸¹à¹`:"â
à¸à¸±à¸à¸à¸¶à¸à¹à¸¥à¹à¸§ â รัà¸à¸à¸¸à¸à¸à¸¹à¹à¸à¸µà¹à¸£à¸à¸à¸£à¸±à¸")},Dn=async()=>{if(!n||Rs)return;Ka(!0),he(null);const{data:t,error:s}=await X.rpc("tg_portal_footprint",{p_token:n,p_action:"chat",p_webhook:null,p_assets:null,p_chat_id:Wt.trim(),p_tg_enabled:null,p_dc_enabled:null});if(Ka(!1),s||!(t!=null&&t.ok)){he(ft(t,s));return}Je(t),he(t.footprint_chat_id?"â
à¸à¸±à¸à¸à¸¶à¸à¹à¸¥à¹à¸§ â Footprint à¸à¸°à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡à¹à¸¢à¸à¸à¸µà¹":"â
ลà¹à¸²à¸à¹à¸¥à¹à¸§ â Footprint à¸à¸°à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡à¸ªà¸±à¸à¸à¸²à¸à¸«à¸¥à¸±à¸")},nl=async(t,s)=>{if(!n||Se)return;Ke(!0),he(null);const{data:l,error:m}=await X.rpc("tg_portal_footprint",{p_token:n,p_action:"targets",p_webhook:null,p_assets:null,p_chat_id:null,p_tg_enabled:t==="tg"?s:null,p_dc_enabled:t==="dc"?s:null});if(Ke(!1),m||!(l!=null&&l.ok)){he(ft(l,m));return}Je(l);const E=t==="tg"?"Telegram":"Discord";he(s?`â
à¹à¸à¸´à¸à¸ªà¹à¸à¹à¸à¹à¸² ${E} à¹à¸¥à¹à¸§`:`⸠หยุà¸à¸ªà¹à¸à¹à¸à¹à¸² ${E} à¹à¸¥à¹à¸§ (à¸à¸±à¹à¸à¸à¹à¸²à¸à¸·à¹à¸à¸¢à¸±à¸à¸à¸¢à¸¹à¹à¸à¸£à¸)`)},Ln=t=>Ts(s=>s.includes(t)?s.filter(l=>l!==t):[...s,t]),Is=(t,s)=>(t==null?void 0:t.error)==="vip_expired"?"â VIP หมà¸à¸à¸²à¸¢à¸¸ â à¸à¹à¸à¸à¸²à¸¢à¸¸à¸à¹à¸à¸à¹à¸à¸´à¸à¹à¸à¹ Add-On":(t==null?void 0:t.error)==="payment_required"?`â à¸à¹à¸à¸à¸à¸¥à¸à¸¥à¹à¸à¸à¸à¹à¸§à¸¢ ${(t==null?void 0:t.cost)??50} à¹à¸à¸£à¸à¸´à¸à¸à¹à¸à¸`:(t==null?void 0:t.error)==="insufficient"?`â à¹à¸à¸£à¸à¸´à¸à¹à¸¡à¹à¸à¸ (มี ${(t==null?void 0:t.balance)??0} · à¸à¹à¸à¸à¹à¸à¹ ${(t==null?void 0:t.cost)??50})`:(t==null?void 0:t.error)==="no_channel"?"â ยัà¸à¹à¸¡à¹à¸¡à¸µà¸à¹à¸à¸ Signal Control":(t==null?void 0:t.error)==="no_vip"?"â à¸à¹à¸à¸à¹à¸à¹à¸²à¸ªà¸¹à¹à¸£à¸°à¸à¸à¸à¹à¸§à¸¢à¸£à¸«à¸±à¸ª VIP à¸à¹à¸à¸":(t==null?void 0:t.error)==="bad_course"?"â à¹à¸¡à¹à¸à¸à¸à¸à¸£à¹à¸ªà¸à¸µà¹à¹à¸¥à¸·à¸à¸":`à¹à¸¡à¹à¸ªà¸³à¹à¸£à¹à¸: ${(s==null?void 0:s.message)||(t==null?void 0:t.error)||"ลà¸à¸à¹à¸«à¸¡à¹à¸à¸µà¸à¸à¸£à¸±à¹à¸"}`,Xt=i.useCallback(async t=>{const{data:s}=await X.rpc("tg_portal_academy",{p_token:t,p_action:"get"});s!=null&&s.ok&&M(s)},[]);i.useEffect(()=>{c!=="academy"||!n||Xt(n)},[c,n,Xt]);const Tn=async()=>
9{if(!n||F)return;B(!0),j(null);const{data:t,error:s}=await X.rpc("tg_user_unlock_academy");if(s||!(t!=null&&t.ok)){B(!1),j(Is(t,s));return}await Xt(n),B(!1),u(l=>({...l,balance:Number(t.balance)??l.balance})),j(`â
à¸à¸¥à¸à¸¥à¹à¸à¸à¹à¸¥à¹à¸§ â หัภ${t.cost} à¹à¸à¸£à¸à¸´à¸ · à¹à¸à¹à¹à¸à¹à¸à¸¶à¸ ${new Date(t.academy_expires_at).toLocaleDateString("th-TH",{day:"2-digit",month:"short",year:"numeric"})} · à¸à¸à¹à¸«à¸¥à¸·à¸ ${t.balance}`)},Rn=async t=>{if(!n||F)return;B(!0),j(null);const{data:s,error:l}=await X.rpc("tg_portal_academy",{p_token:n,p_action:t?"on":"off"});if(B(!1),l||!(s!=null&&s.ok)){j(Is(s,l));return}M(s),j(t?"â
à¹à¸à¸´à¸ drip à¹à¸¥à¹à¸§ â à¸à¸à¹à¸£à¸µà¸¢à¸à¸à¸°à¸à¸¢à¸à¸¢à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡à¸à¸à¸à¸à¸¸à¸à¸à¸±à¸à¹à¸à¸¡à¸±à¸à¸´":"à¸à¸´à¸ drip à¹à¸¥à¹à¸§ (à¸à¸±à¹à¸à¸à¹à¸²à¸à¸·à¹à¸à¸¢à¸±à¸à¸à¸¢à¸¹à¹à¸à¸£à¸)")},rl=async t=>{if(!n)return;j(null);const{data:s,error:l}=await X.rpc("tg_portal_academy",{p_token:n,p_action:"save",p_course:t.course??null,p_interval_hours:t.interval??null});if(l||!(s!=null&&s.ok)){j(Is(s,l));return}M(s),j("â
à¸à¸±à¸à¸à¸¶à¸à¹à¸¥à¹à¸§")},Fn=async()=>{if(!(!n||T)){J(!0),j(null);try{const l=await(await fetch("https://abqqlurckfumqjjkihef.supabase.co/functions/v1/academy-drip",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({token:n})})).json(),m=Array.isArray(l==null?void 0:l.results)?l.results[0]:null;m!=null&&m.sent&&(m.sent.tg||m.sent.dc)?(j("â
สà¹à¸à¸à¸à¹à¸£à¸µà¸¢à¸à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡à¹à¸¥à¹à¸§"),Xt(n)):m!=null&&m.skipped?j(`ยัà¸à¸ªà¹à¸à¹à¸¡à¹à¹à¸à¹: ${m.skipped==="unpaid"?"ยัà¸à¹à¸¡à¹à¹à¸à¹à¸à¸¥à¸à¸¥à¹à¸à¸":m.skipped==="no_course"?"ยัà¸à¹à¸¡à¹à¹à¸à¹à¹à¸¥à¸·à¸à¸à¸à¸à¸£à¹à¸ª":m.skipped==="no_lessons"?"à¸à¸à¸£à¹à¸ªà¸¢à¸±à¸à¹à¸¡à¹à¸¡à¸µà¸à¸":m.skipped}`):j("สà¹à¸à¹à¸¡à¹à¸ªà¸³à¹à¸£à¹à¸ â à¸à¸£à¸§à¸à¸§à¹à¸²à¸à¸±à¹à¸à¸à¹à¸²à¸à¸à¸/à¸à¸¥à¸¸à¹à¸¡à¹à¸¥à¹à¸§")}catch{j("สà¹à¸à¹à¸¡à¹à¸ªà¸³à¹à¸£à¹à¸ ลà¸à¸à¹à¸«à¸¡à¹à¸à¸µà¸à¸à¸£à¸±à¹à¸")}J(!1)}};i.useEffect(()=>{Ht(1)},[qt,Gt]),i.useEffect(()=>{c!=="footprint"||!n||(Ps(!0),X.rpc("tg_portal_footprint_stats",{p_token:n,p_range:qt,p_scope:Gt,p_page:Fs,p_page_size:10}).then(({data:t})=>{t&&!t.error&&vn(t)}).then(()=>Ps(!1),()=>Ps(!1)))},[c,n,qt,Gt,Fs]),i.useEffect(()=>{c!=="footprint"||!n||(Us(!0),X.rpc("footprint_lab_leaderboard",{p_range:Vt,p_token:n}).then(({data:t})=>{t&&!t.error&&Sn(t)}).then(()=>Us(!1),()=>Us(!1)))},[c,n,Vt]),i.useEffect(()=>{c!=="leaderboard"||!n||(ce(!0),X.rpc("signal_control_leaderboard",{p_token:n,p_range:L}).then(({data:t})=>{t&&!t.error&&U(t)}).finally(()=>ce(!1)))},[c,n,L]),i.useEffect(()=>{c!=="leaderboard"||!n||(Y(!0),X.rpc("signal_control_user_leaderboard",{p_range:L,p_token:n}).then(({data:t})=>{t&&!t.error&&$(t)}).finally(()=>Y(!1)))},[c,n,L]);const Zt=i.useCallback(async t=>{const{data:s}=await X.rpc("tg_portal_health",{p_token:t});s&&!s.error&&yn(s)},[]);i.useEffect(()=>{c!=="overview"||!n||Zt(n)},[c,n,Zt]);async function En(){var l;Ya(!0),Bt(null);const{data:t,error:s}=await X.functions.invoke("telegram-broadcast",{body:{action:"flush",manage_token:n}});if(Ya(!1),s){Bt("â ลà¹à¸²à¸à¹à¸¡à¹à¸ªà¸³à¹à¸£à¹à¸: "+s.message);return}Wa(Array.isArray((l=t==null?void 0:t.discord)==null?void 0:l.rooms)?t.discord.rooms:null),Bt(t!=null&&t.ok?`â
ลà¹à¸²à¸à¸à¹à¸à¹à¸¥à¹à¸§ â à¸à¸à¸ @${(t==null?void 0:t.bot_username)??"?"} à¸à¸£à¹à¸à¸¡à¸ªà¹à¸ สัà¸à¸à¸²à¸à¸£à¸à¸à¸à¸±à¸à¹à¸à¸à¸°à¸à¸¹à¸à¸ªà¹à¸à¸à¸±à¸à¸à¸µ`:"â ï¸ à¸¥à¹à¸²à¸à¹à¸¥à¹à¸§à¹à¸à¹à¸¢à¸±à¸à¸¡à¸µà¸à¸±à¸à¸«à¸²: "+((t==null?void 0:t.error)||"à¸à¸£à¸§à¸ token/à¸à¸¥à¸¸à¹à¸¡à¸à¸à¸à¸à¸à¸")),await Promise.all([Zt(n),Ie(n)]),setTimeout(()=>Bt(null),6e3),setTimeout(()=>Wa(null),6e4)}i.useEffect(()=>{if(c!=="news")return;let t=!0;return Te(!0),mr(_e).then(s=>{t&&(ge(s||[]),Te(!1))}).catch(()=>{t&&Te(!1)}),()=>{t=!1}},[c,_e]);async function Pn(t){Ne(t.id);const{data:s,error:l}=await X.functions.invoke("telegram-broadcast",{body:{action:"news",manage_token:n,news:{headline:t.headline,summary:t.summary,source:t.source,url:t.url,image:t.image,sentiment:t.sentiment}}});Ne(null),He(m=>({...m,[t.id]:l||!(s!=null&&s.ok)?"err":"ok"}))}async function Un(){y(!0),Pe(null);const{data:t,error:s}=await X.rpc("tg_user_subscribe");if(y(!1),s){Pe(s.message);return}if(!(t!=null&&t.ok)){Pe((t==null?void 0:t.error)==="insufficient"?"à¹à¸à¸£à¸à¸´à¸à¹à¸¡à¹à¸à¸ (à¸à¹à¸à¸à¸¡à¸µà¸à¸¢à¹à¸²à¸à¸à¹à¸à¸¢ 50) â à¹à¸à¸´à¸¡à¹à¸à¸£à¸à¸´à¸à¸à¹à¸à¸":(t==null?void 0:t.error)==="no_vip"?"à¸à¹à¸à¸à¹à¸à¹à¸²à¸ªà¸¹à¹à¸£à¸°à¸à¸ VIP à¸à¹à¸à¸":"สมัà¸à¸£à¹à¸¡à¹à¸ªà¸³à¹à¸£à¹à¸");return}r(t.manage_token),o("ready"),Ie(t.manage_token)}async function In(){y(!0),w(null),Pe(null);const{data:t,error:s}=await X.rpc("tg_user_subscribe");if(y(!1),s){w("à¸à¹à¸à¸à¸²à¸¢à¸¸à¹à¸¡à¹à¸ªà¸³à¹à¸£à¹à¸: "+s.message);return}if(!(t!=null&&t.ok)){w((t==null?void 0:t.error)==="insufficient"?"à¹à¸à¸£à¸à¸´à¸à¹à¸¡à¹à¸à¸ (à¸à¹à¸à¸à¸¡à¸µà¸à¸¢à¹à¸²à¸à¸à¹à¸à¸¢ 50)":(t==null?void 0:t.error)==="no_vip"?"à¸à¹à¸à¸à¹à¸à¹à¸²à¸ªà¸¹à¹à¸£à¸°à¸à¸ VIP à¸à¹à¸à¸":"à¸à¹à¸à¸à¸²à¸¢à¸¸à¹à¸¡à¹à¸ªà¸³à¹à¸£à¹à¸");return}u(l=>({...l,balance:t.balance??l.balance,expires_at:t.expires_at??l.expires_at})),w("â à¸à¹à¸à¸à¸²à¸¢à¸¸à¸à¸µà¸ 30 วัà¸à¹à¸¥à¹à¸§"),setTimeout(()=>w(null),3500),Ie(t.manage_token||n)}async function il(){qa(!0),bt(null);const{data:t,error:s}=await X.rpc("tg_user_unlock_discord");if(qa(!1),s){bt("à¸à¸¥à¸à¸¥à¹à¸à¸à¹à¸¡à¹à¸ªà¸³à¹à¸£à¹à¸: "+s.message);return}if(!(t!=null&&t.ok)){bt((t==null?void 0:t.error)==="insufficient"?"à¹à¸à¸£à¸à¸´à¸à¹à¸¡à¹à¸à¸ (à¸à¹à¸à¸à¸¡à¸µà¸à¸¢à¹à¸²à¸à¸à¹à¸à¸¢ 50)":(t==null?void 0:t.error)==="no_channel"?"à¸à¹à¸à¸à¸ªà¸¡à¸±à¸à¸£ Signal Control (à¹à¸à¹à¸à¸à¸²à¸) à¸à¹à¸à¸":(t==null?void 0:t.error)==="no_vip"?"à¸à¹à¸à¸à¹à¸à¹à¸²à¸ªà¸¹à¹à¸£à¸°à¸à¸ VIP à¸à¹à¸à¸":"à¸à¸¥à¸à¸¥à¹à¸à¸à¹à¸¡à¹à¸ªà¸³à¹à¸£à¹à¸");return}u(l=>({...l,balance:t.balance??l.balance,discordHasAccess:!0,discordExpiresAt:t.discord_expires_at??l.discordExpiresAt})),bt("â à¸à¸¥à¸à¸¥à¹à¸à¸ Discord à¹à¸¥à¹à¸§ (30 วัà¸) â à¹à¸ªà¹ Webhook URL à¹à¸à¹à¹à¸¥à¸¢"),setTimeout(()=>bt(null),4e3),Ie(n)}async function On(){var E,_;Ze(!0),pe(null),It([]);const{data:t,error:s}=await X.functions.invoke("telegram-broadcast",{body:{action:"bot_probe",manage_token:n}});if(Ze(!1),s||!(t!=null&&t.ok)){pe((t==null?void 0:t.error)==="no_bot_token"?"â ยัà¸à¹à¸¡à¹à¸¡à¸µ Bot Token à¸à¸µà¹à¸à¸±à¸à¸à¸¶à¸à¹à¸§à¹ â วาภtoken à¹à¸¥à¹à¸§à¸à¸à¸à¸à¸ªà¸à¸à¸à¸µà¸à¸à¸£à¸±à¹à¸":`â ${(t==null?void 0:t.error)||(s==null?void 0:s.message)||"à¸à¸à¸ªà¸à¸à¹à¸¡à¹à¸ªà¸³à¹à¸£à¹à¸"}`);return}It(t.chats||[]);const l=t.chat_check&&!t.chat_check.ok,m=((E=t.chat_check)==null?void 0:E.ok)&&!["group","supergroup","channel"].includes(String(t.chat_check.type));pe(`â
à¸à¸à¸ @${t.username} à¹à¸à¹à¸à¸²à¸à¹à¸à¹`+((_=t.chats)!=null&&_.length?` â à¹à¸à¸ ${t.chats.length} à¸à¸¥à¸¸à¹à¸¡ à¸à¸à¹à¸¥à¸·à¸à¸à¹à¸à¸·à¹à¸à¹à¸ªà¹ chat_id`:" â ยัà¸à¹à¸¡à¹à¹à¸
9à¸à¸à¸¥à¸¸à¹à¸¡ (à¹à¸à¸´à¹à¸¡à¸à¸à¸à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡à¹à¸à¹à¸ admin à¹à¸¥à¹à¸§à¸à¸´à¸¡à¸à¹à¹à¸à¸à¸¥à¸¸à¹à¸¡ 1 à¸à¸£à¸±à¹à¸ à¹à¸¥à¹à¸§à¸à¸à¸à¸à¸ªà¸à¸à¹à¸«à¸¡à¹)")+(m?` · â ï¸ chat_id à¸à¸µà¹à¸à¸±à¸à¸à¸¶à¸à¹à¸§à¹à¹à¸à¹à¸ "${t.chat_check.type}" à¹à¸¡à¹à¹à¸à¹à¸à¸¥à¸¸à¹à¸¡ â สัà¸à¸à¸²à¸à¸à¸°à¹à¸¡à¹à¸à¸¹à¸à¸ªà¹à¸`:"")+(l?` · â ï¸ chat_id à¸à¸µà¹à¸à¸±à¸à¸à¸¶à¸à¹à¸§à¹à¹à¸à¹à¹à¸¡à¹à¹à¸à¹: ${t.chat_check.error}`:""))}async function Bn(){const t=an(st);if(t&&t!==st&&is(t),!t){if(h!=null&&h.has_bot){await On();return}pe("à¸à¸£à¸¸à¸à¸²à¸§à¸²à¸ Bot Token à¸à¹à¸à¸à¸à¸à¸à¸à¸ªà¸à¸");return}if(!/^\d{5,}:[A-Za-z0-9_-]{20,}$/.test(t)){pe("â รูà¸à¹à¸à¸ Bot Token à¹à¸¡à¹à¸à¸¹à¸à¸à¹à¸à¸ â วาà¸à¹à¸à¸à¸²à¸° token à¹à¸à¹à¸ 123456789:AAExampleTokenDoNotUse...");return}Ze(!0),pe(null),It([]);try{const s=await fetch(`https://api.telegram.org/bot${t}/getMe`).then(_=>_.json());if(!s.ok){pe("â Bot Token à¹à¸¡à¹à¸à¸¹à¸à¸à¹à¸à¸"),Ze(!1);return}const l=await fetch(`https://api.telegram.org/bot${t}/getUpdates`).then(_=>_.json()),m=new Map;for(const _ of l.result||[]){const P=(_.message||_.channel_post||_.my_chat_member||{}).chat;(P==null?void 0:P.id)!=null&&(P.type==="group"||P.type==="supergroup"||P.type==="channel")&&m.set(String(P.id),P.title||P.username||String(P.id))}const E=[...m.entries()].map(([_,I])=>({id:_,title:I}));It(E),pe(`â
à¸à¸à¸ @${s.result.username} à¹à¸à¹à¸à¸²à¸à¹à¸à¹`+(E.length?` â à¹à¸à¸ ${E.length} à¸à¸¥à¸¸à¹à¸¡ à¸à¸à¹à¸¥à¸·à¸à¸à¹à¸à¸·à¹à¸à¹à¸ªà¹ chat_id`:" â ยัà¸à¹à¸¡à¹à¹à¸à¸à¸à¸¥à¸¸à¹à¸¡ (à¹à¸à¸´à¹à¸¡à¸à¸à¸à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡à¹à¸à¹à¸ admin à¹à¸¥à¹à¸§à¸à¸´à¸¡à¸à¹à¹à¸à¸à¸¥à¸¸à¹à¸¡ 1 à¸à¸£à¸±à¹à¸ à¹à¸¥à¹à¸§à¸à¸à¸à¸à¸ªà¸à¸à¹à¸«à¸¡à¹)"))}catch{pe("â à¹à¸à¸·à¹à¸à¸¡à¸à¹à¸ Telegram à¹à¸¡à¹à¹à¸à¹ â à¸à¸£à¸à¸ chat_id à¹à¸à¸à¹à¸à¹")}Ze(!1)}async function Wn(){var E,_;const t=!!(h!=null&&h.chat_id&&String(h.chat_id).trim()),s=!!(h!=null&&h.has_discord)&&(h==null?void 0:h.discord_enabled)!==!1;if(!t&&!s){pe('â ยัà¸à¹à¸¡à¹à¸¡à¸µà¸à¹à¸à¸à¸à¸²à¸à¸à¸µà¹à¸à¸±à¸à¸à¸¶à¸à¹à¸§à¹ â à¸à¸±à¹à¸à¸à¹à¸² Telegram (chat_id) หรืภDiscord (webhook) à¹à¸¥à¹à¸§à¸à¸ "à¸à¸±à¸à¸à¸¶à¸" à¸à¹à¸à¸');return}if(Ye.trim()&&Ye.trim()!==((h==null?void 0:h.chat_id)||"")){pe('â ï¸ chat_id ยัà¸à¹à¸¡à¹à¸à¸¹à¸à¸à¸±à¸à¸à¸¶à¸ â à¸à¸ "à¸à¸±à¸à¸à¸¶à¸" à¸à¹à¸à¸ à¹à¸¥à¹à¸§à¸à¹à¸à¸¢à¸ªà¹à¸à¸à¸²à¸£à¹à¸à¸à¸à¸ªà¸à¸');return}Ze(!0),pe(null);const{data:l,error:m}=await X.functions.invoke("telegram-broadcast",{body:{action:"test",manage_token:n}});if(Ze(!1),m){pe("â สà¹à¸à¹à¸¡à¹à¸ªà¸³à¹à¸£à¹à¸: "+m.message);return}if(l!=null&&l.ok){const I=[((E=l==null?void 0:l.telegram)==null?void 0:E.ok)&&"Telegram",((_=l==null?void 0:l.discord)==null?void 0:_.ok)&&"Discord"].filter(Boolean).join(" + ");pe(`â
สà¹à¸à¸à¸²à¸£à¹à¸à¸à¸à¸ªà¸à¸à¹à¸¥à¹à¸§ â à¹à¸à¹à¸à¹à¸ ${I||"à¸à¹à¸à¸à¸à¸²à¸à¸à¸µà¹à¸à¸±à¹à¸à¸à¹à¸²"}`)}else{const I=[l==null?void 0:l.error,(l==null?void 0:l.telegram)&&!l.telegram.ok&&`TG: ${l.telegram.description||"fail"}`,(l==null?void 0:l.discord)&&!l.discord.ok&&`Discord: ${l.discord.error||"fail"}`].filter(Boolean).join(" · ");pe("â สà¹à¸à¹à¸¡à¹à¸ªà¸³à¹à¸£à¹à¸: "+(I||"unknown"))}}const ol=i.useMemo(()=>{var m,E;let t=0,s=0;try{const _=new Intl.DateTimeFormat("en-US",{timeZone:be||"Asia/Bangkok",hour:"2-digit",minute:"2-digit",hour12:!1}).formatToParts(new Date);t=Number(((m=_.find(I=>I.type==="hour"))==null?void 0:m.value)??0)%24,s=Number(((E=_.find(I=>I.type==="minute"))==null?void 0:E.value)??0)}catch{}const l=`${String(lt).padStart(2,"0")}:${String(nt).padStart(2,"0")} à¸.`;return t*60+s<lt*60+nt?`วัà¸à¸à¸µà¹ ${l}`:`à¸à¸£à¸¸à¹à¸à¸à¸µà¹ ${l}`},[be,lt,nt]),Hn=!!h&&(St!==(h.brief_enabled===!0)||lt!==(h.brief_hour??9)||nt!==(h.brief_minute??0)||Ct!==(h.week_pin!==!1));async function cl(t="day"){fa(!0),Mt(null);const{data:s,error:l}=await X.functions.invoke("telegram-broadcast",{body:{action:"brief_test",manage_token:n,kind:t}});if(fa(!1),l){Mt("â "+l.message);return}if(s!=null&&s.ok){const m=(s.telegram||[]).some(_=>_==="pinned"),E=(s.telegram||[]).find(_=>String(_).startsWith("pin failed"));Mt(`â
สà¹à¸à¹à¸¥à¹à¸§ ${s.sent} à¸à¸µà¹ · à¸à¹à¸²à¸§ ${s.events} รายà¸à¸²à¸£`+(t==="week"?m?" · à¸à¸±à¸à¸«à¸¡à¸¸à¸à¹à¸¥à¹à¸§":E?` · à¸à¸±à¸à¸«à¸¡à¸¸à¸à¹à¸¡à¹à¹à¸à¹ (${E.replace("pin failed: ","")})`:"":""))}else{const m=[s==null?void 0:s.error,...(s==null?void 0:s.telegram)||[],...(s==null?void 0:s.discord)||[]].filter(
9Boolean).join(" · ");Mt("â สà¹à¸à¹à¸¡à¹à¸ªà¸³à¹à¸£à¹à¸: "+(m||"unknown"))}}async function Kt(){za(!0),Ls(!1),Pe(null);const t={customer_name:un,chat_id:Ye.trim(),enabled:ke,telegram_signals_enabled:ms,filter_assets:me,min_confidence:xt,risk_per_trade_pct:mt,send_interval_minutes:Math.max(1,Math.round(Xe)),timezone:be,send_results:kt,send_images:hs,send_calendar:xa,send_mtf:wa,brief_enabled:St,brief_hour:lt,brief_minute:nt,week_pin:Ct,news_guard:ja,custom_footer:At.trim(),digest_split_by_category:oa,swing_enabled:us,swing_mode:Dt,swing_tfs:bs,liqsweep_enabled:fs,liqsweep_tfs:gs,require_mtf:js,require_smc:Ns,require_pa:pt,pa_tfs:Lt,pa_pattern:vs,auto_news:ks,news_interval_minutes:Math.max(5,Math.round(Tt)),news_categories:Ta,news_chat_id:Ss?ht.trim():"",discord_enabled:Ea,discord_ping_role_id:Ua.trim(),discord_ping_min_confidence:Math.min(95,Math.max(50,Math.round(Oa)))};st.trim()&&(t.bot_token=an(st)),Rt.trim()&&(t.discord_webhook_url=Rt.trim()),t.discord_routes=rt.filter(m=>m.label.trim()||m.webhook.trim()||m.webhook_set).map(m=>({id:m.id,label:m.label.trim(),kind:m.kind,groups:m.groups,enabled:m.enabled,webhook:m.webhook.trim()}));const{data:s,error:l}=await X.rpc("tg_portal_save",{p_token:n,p_patch:t});if(za(!1),l||s!=null&&s.error){Pe((l==null?void 0:l.message)||(s==null?void 0:s.error));return}Yt(s),is(""),Ls(!0),setTimeout(()=>Ls(!1),2500)}async function qn(t){K(!0),ae(null);const{data:s,error:l}=await X.rpc("signal_control_copy_preset",{p_token:n,p_source:t.pid});K(!1);const m=(l==null?void 0:l.message)||(s==null?void 0:s.error);if(m){ae("â "+({same_channel:"à¸à¸µà¹à¸à¸·à¸à¸ªà¸¹à¸à¸£à¸à¸à¸à¸à¸¸à¸à¹à¸à¸à¸à¸¢à¸¹à¹à¹à¸¥à¹à¸§",source_not_found:"à¹à¸¡à¹à¸à¸à¸ªà¸¹à¸à¸£à¸à¸à¸à¸à¸¹à¹à¹à¸à¹à¸à¸à¸à¸µà¹à¹à¸¥à¹à¸§ (à¸à¸²à¸à¸à¸´à¸à¸à¸²à¸£à¸ªà¹à¸à¹à¸)",invalid_source:"à¸à¹à¸²à¸à¸à¸´à¸à¸ªà¸¹à¸à¸£à¹à¸¡à¹à¸à¸¹à¸à¸à¹à¸à¸",invali
9d_token:"ลิà¸à¸à¹à¸à¸±à¸à¸à¸²à¸£à¸«à¸¡à¸à¸à¸²à¸¢à¸¸ â à¹à¸«à¸¥à¸à¸«à¸à¹à¸²à¹à¸«à¸¡à¹",not_found:"à¹à¸¡à¹à¸à¸à¸à¹à¸à¸à¸à¸à¸à¸à¸¸à¸"}[m]||m));return}Yt(s),Le(null),ae(`â
à¹à¸à¹à¸ªà¸¹à¸à¸£à¸à¸à¸ ${t.name} à¹à¸¥à¹à¸§ â à¸à¸±à¸à¸à¸¶à¸à¸à¸±à¸à¹à¸à¸¡à¸±à¸à¸´ à¸à¸¹à¹à¸à¹à¸à¸µà¹à¹à¸à¹à¸ âà¸à¸±à¹à¸à¸à¹à¸²à¸à¸à¸â`),setTimeout(()=>ae(null),6e3)}const Os=t=>{const s=t.toUpperCase().trim();s&&!me.includes(s)&&dt(l=>[...l,s]),aa("")},dl=t=>dt(s=>s.filter(l=>l!==t)),Gn=()=>ut(t=>[...t,{id:typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2),label:"",kind:"signals",groups:[],enabled:!0,webhook:"",webhook_set:!1,webhook_masked:""}]),zn=t=>ut(s=>s.filter(l=>l.id!==t)),Jt=(t,s)=>ut(l=>l.map(m=>m.id===t?{...m,...s}:m)),Vn=(t,s)=>ut(l=>l.map(m=>m.id!==t?m:{...m,groups:m.groups.includes(s)?m.groups.filter(E=>E!==s):[...m.groups,s]})),xl=i.useMemo(()=>{const t=at.toUpperCase().trim();return ii.filter(s=>!me.includes(s)&&(t===""||s.includes(t)||ve(s).toUpperCase().includes(t))).slice(0,8)},[at,me]),Qt=i.useMemo(()=>{const t=[...Ve].reverse(),s=[],l=[],m=[],E=[];let _=0,I=0,P=0,S=0;for(const ye of t){_++;const ue=(ye.outcome||"").toUpperCase();ue==="WIN"?I++:ue==="LOSS"&&P++,(ue==="WIN"||ue==="LOSS")&&(S+=Number(ye.profit_percent||0)),s.push(_),m.push(I-P),E.push(S),l.push(I+P?I/(I+P)*100:0)}return{sTotal:s,sWin:l,sWL:m,sNet:E}},[Ve]);if(x==="need_login")return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[#070b16] px-6 text-center text-slate-300",children:e.jsxs("div",{className:"max-w-sm space-y-3",children:[e.jsx("div",{className:"mx-auto grid h-12 w-12 place-items-center rounded-2xl bg-cyan-500/15 text-2xl text-cyan-400 font-bold",children:"α"}),e.jsx("h1",{className:"text-xl font-bold text-white",children:"Signal Control"}),e.jsx("p",{className:"text-sm text-slate-400",children:"à¸à¹à¸à¸à¹à¸à¹à¸²à¸ªà¸¹à¹à¸£à¸°à¸à¸à¸à¹à¸§à¸¢à¸£à¸«à¸±à¸ª VIP à¸à¹à¸à¸à¸à¸¶à¸à¸à¸°à¹à¸à¹à¸à¸²à¸à¹à¸à¹"}),e.jsx("a",{href:"/",className:"inline-block rounded-xl bg-cyan-600 px-5 py-2.5 text-sm font-semibold text-white hover:bg-cyan-500",children:"à¹à¸à¸«à¸à¹à¸²à¹à¸à¹à¸²à¸ªà¸¹à¹à¸£à¸°à¸à¸"})]})});if(x==="paywall"&&cr(dr()))return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[#070b16] px-6",style:{backgroundImage:"radial-gradient(60rem 40rem at 80% -10%, rgba(34,211,238,0.06), transparent)"},children:e.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-white/[0.08] bg-white/[0.02] p-7 text-center",children:[e.jsx("div",{className:"mx-auto mb-3 grid h-12 w-12 place-items-center rounded-2xl bg-cyan-500/15 text-cyan-400 font-bold text-2xl",children:"α"}),e.jsx("h1",{className:"text-xl font-bold text-white",children:"Signal Control à¹à¸à¹à¸à¸ªà¸´à¸à¸à¸´à¹à¸à¸à¸à¸ªà¸¡à¸²à¸à¸´à¸ VIP"}),e.jsx("p",{className:"mt-1 text-sm text-slate-400",children:"สà¹à¸à¸ªà¸±à¸à¸à¸²à¸ AI à¹à¸à¸à¹à¸à¹à¸¡ (ราà¸à¸²à¹à¸à¹à¸² · SL · TP) à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡ Telegram à¸à¸à¸à¸à¸¸à¸à¹à¸à¸ â à¸à¸±à¸à¸à¸µà¸ªà¸¡à¸²à¸à¸´à¸à¸à¸£à¸µà¸¢à¸±à¸à¹à¸à¹à¸ªà¹à¸§à¸à¸à¸µà¹à¹à¸¡à¹à¹à¸à¹"}),e.jsxs("div",{className:"my-5 rounded-xl bg-slate-950/50 px-4 py-4 text-left text-sm text-slate-300",children:[e.jsx("p",{className:"font-semibold text-white",children:"à¹à¸ªà¹à¸à¸à¸²à¸à¸à¸¥à¸à¸¥à¹à¸à¸"}),e.jsx("p",{className:"mt-1.5",children:"1. à¸à¸±à¸à¹à¸à¸£à¸à¹à¸à¹à¸à¸ªà¸¡à¸²à¸à¸´à¸ VIP"}),e.jsx("p",{className:"mt-1",children:"2. à¸à¸¥à¸à¸¥à¹à¸à¸ Signal Control à¸à¹à¸§à¸¢ 50 à¹à¸à¸£à¸à¸´à¸ / 30 วัà¸"})]}),e.jsx("a",{href:"/products",className:"block w-full rounded-xl bg-cyan-600 px-5 py-3 text-sm font-semibold text-white hover:bg-cyan-500",children:"à¸à¸¹à¹à¸à¹à¸à¹à¸à¸ VIP"}),e.jsx("button",{onClick:()=>{window.location.href="/"},className:"mt-4 text-sm text-slate-400 transition hover:text-cyan-300",children:"â à¸à¸¥à¸±à¸ Dashboard"})]})});if(x==="paywall")return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[#070b16] px-6",style:{backgroundImage:"radial-gradient(60rem 40rem at 80% -10%, rgba(34,211,238,0.06), transparent)"},children:e.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-white/[0.08] bg-white/[0.02] p-7 text-center",children:[e.jsx("div",{className:"mx-auto mb-3 grid h-12 w-12 place-items-center rounded-2xl bg-cyan-500/15 text-cyan-400 font-bold text-2xl",children:"α"}),e.jsx("h1",{className:"text-xl font-bold text-white",children:"à¸à¸¥à¸à¸¥à¹à¸à¸ Signal Control"}),e.jsx("p",{className:"mt-1 text-sm text-slate-400",children:"สà¹à¸à¸ªà¸±à¸à¸à¸²à¸ AI à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡ Telegram à¸à¸à¸à¸à¸¸à¸à¹à¸à¸ â à¹à¸¥à¸·à¸à¸à¸ªà¸´à¸à¸à¸£à¸±à¸à¸¢à¹/à¸à¸§à¸²à¸¡à¸à¸µà¹/à¸à¸§à¸²à¸¡à¹à¸ªà¸µà¹à¸¢à¸à¹à¸à¹à¹à¸à¹à¸¡à¸à¸µà¹"}),e.jsxs("div",{className:"my-5 rounded-xl bg-slate-950/50 py-5",children:[e.jsxs("p",{className:"text-3xl font-bold text-cyan-300",children:["50 ",e.jsx("span",{className:"text-base font-normal text-slate-400",children:"credits / à¹à¸à¸·à¸à¸"})]}),e.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"â 180 à¸à¸²à¸ à¸à¹à¸ 30 วัà¸"})]}),e.jsxs("p",{className:"mb-4 text-sm text-slate-400",children:["à¹à¸à¸£à¸à¸´à¸à¸à¸à¹à¸«à¸¥à¸·à¸à¸à¸à¸à¸à¸¸à¸: ",e.jsx("span",{className:`font-semibold ${d.balance>=d.cost?"text-emerald-400":"text-rose-400"}`,children:d.balance})]}),d.expires_at&&e.jsxs("p",{className:"mb-3 text-xs text-amber-400/80",children:["à¹à¸à¹à¸à¹à¸à¸à¸«à¸¡à¸à¸à¸²à¸¢à¸¸à¹à¸¡à¸·à¹à¸ ",new Date(d.expires_at).toLocaleStr
9ing("th-TH",{day:"2-digit",month:"short",year:"2-digit"})," â à¸à¹à¸à¸à¸²à¸¢à¸¸à¹à¸à¸·à¹à¸à¹à¸à¹à¸à¸²à¸à¸à¹à¸"]}),tt&&e.jsx("p",{className:"mb-3 text-sm text-rose-400",children:tt}),d.balance>=d.cost?e.jsx("button",{onClick:Un,disabled:f,className:"w-full rounded-xl bg-emerald-600 px-5 py-3 text-sm font-semibold text-white hover:bg-emerald-500 disabled:opacity-50",children:f?"à¸à¸³à¸¥à¸±à¸à¸à¸³à¹à¸à¸´à¸à¸à¸²à¸£â¦":"à¸à¹à¸²à¸¢ 50 credits à¹à¸à¸·à¹à¸à¹à¸à¹à¸à¸²à¸ 30 วัà¸"}):e.jsx("a",{href:"/?buy=credits",className:"block w-full rounded-xl bg-cyan-600 px-5 py-3 text-sm font-semibold text-white hover:bg-cyan-500",children:"à¹à¸à¸´à¸¡à¹à¸à¸£à¸à¸´à¸"}),e.jsx("p",{className:"mt-3 text-xs text-slate-600",children:"หัà¸à¸à¸²à¸à¹à¸à¸£à¸à¸´à¸à¹à¸à¹à¸à¸ · à¹à¸à¹à¸à¸²à¸à¹à¸à¹à¸à¸±à¸à¸à¸µ"}),e.jsx("button",{onClick:()=>{window.location.href="/"},className:"mt-4 text-sm text-slate-400 transition hover:text-cyan-300",children:"â à¸à¸¥à¸±à¸ Dashboard"})]})});if(wt)return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[#070b16] text-slate-400",children:"à¸à¸³à¸¥à¸±à¸à¹à¸«à¸¥à¸â¦"});if(tt&&!h)return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[#070b16] px-6 text-center text-rose-400",children:tt});const ml=z&&z.win+z.loss>0?Math.round(z.win/(z.win+z.loss)*100):null,pl=new Set(((h==null?void 0:h.filter_assets)||[]).map(t=>t.toUpperCase())),Bs=t=>pl.size>0&&!pl.has(String(t).toUpperCase()),Yn=(h==null?void 0:h.status)==="online"?"text-emerald-400":(h==null?void 0:h.status)==="error"?"text-rose-400":"text-slate-400",hl=Js.some(t=>t.value===Xe),Xn=h!=null&&h.last_sent_at?new Date(h.last_sent_at).toLocaleString("th-TH",{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit",timeZone:be}):"â",Oe=h!=null&&h.access_expires_at?new Date(h.access_expires_at).getTime():null,Ws=!(h!=null&&h.owner_vip_code)&&Oe==null,ot=Oe!=null&&Oe<=Date.now(),Re=Oe!=null?Math.max(0,Math.ceil((Oe-Date.now())/864e5)):null,Hs=Oe!=null?new Date(Oe).toLocaleDateString("th-TH",{day:"2-digit",month:"short",year:"2-digit",timeZone:be}):null,qs=ot||Re!=null&&Re<=3?"rose":Re!=null&&Re<=7?"amber":"emerald",ul={rose:"border-rose-500/30 bg-rose-500/[0.07] text-rose-300",amber:"border-amber-500/30 bg-amber-500/[0.07] text-amber-300",emerald:"border-emerald-500/25 bg-emerald-500/[0.06] text-emerald-300"},bl=C&&!Ws,fl=Array.isArray(b==null?void 0:b.equity)?b.equity.map(t=>Number(t.cum)):[],Zn=[{k:"สà¹à¸à¸à¸±à¹à¸à¸«à¸¡à¸",v:String((z==null?void 0:z.total)??0),s:Qt.sTotal,c:"#22d3ee"},{k:"Win Rate",v:ml==null?"â":`${ml}%`,s:Qt.sWin,c:"#34d399"},{k:"W / L",v:`${(z==null?void 0:z.win)??0} / ${(z==null?void 0:z.loss)??0}`,s:Qt.sWL,c:"#a78bfa"},{k:"Net %",v:z?`${z.net_pct>0?"+":""}${z.net_pct}%`:"â",s:fl.length>=2?fl:Qt.sNet,c:((z==null?void 0:z.net_pct)??0)>=0?"#34d399":"#f87171"}],Kn=t=>{N(t==="top"?"overview":t==="feed"?"history":t),window.scrollTo({top:0,behavior:"smooth"})},Gs=!!(h!=null&&h.has_bot&&Ye.trim()&&ke),zs=!!(h!=null&&h.has_bot&&Ye.trim()&&!ke),Jn={assetSub:me.length?`${me.length} สิà¸à¸à¸£à¸±à¸à¸¢à¹`:"à¸à¸¸à¸à¸ªà¸´à¸à¸à¸£à¸±à¸à¸¢à¹",confLabel:`⥠${xt}%`,riskSub:`à¹à¸ªà¸µà¹à¸¢à¸ ${mt}%${hs?" · à¸à¸²à¸£à¹à¸à¸£à¸¹à¸":""}`,schedSub:((_l=Js.find(t=>t.value===Xe))==null?void 0:_l.label)||`${Xe} à¸à¸²à¸à¸µ`,tgStroke:Gs?"#34d399":zs?"#fbbf24":"#64748b",tgDot:Gs?"#34d399":zs?"#fbbf24":"#475569",tgSub:Gs?"สà¹à¸à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡":zs?"à¸à¸£à¹à¸à¸¡ (à¸à¸´à¸à¸à¸¢à¸¹à¹)":"ยัà¸à¹à¸¡à¹à¸à¸±à¹à¸à¸à¹à¸²",reportStroke:kt?"#a78bfa":"#475569",reportSub:kt?"à¹à¸à¸´à¸à¸£à¸²à¸¢à¸à¸²à¸":"à¸à¸´à¸",onNav:Kn},gl=[{id:"overview",label:"ภาà¸à¸£à¸§à¸¡"},{id:"setup",label:"à¸à¸±à¹à¸à¸à¹à¸²à¸à¸à¸"},{id:"signals",label:"à¸à¸²à¸£à¸ªà¹à¸à¸ªà¸±à¸à¸à¸²à¸"},{id:"footprint",label:"𧪠Footprint Lab"},{id:"news",label:"Alpha News"},{id:"history",label:"à¸à¸£à¸°à¸§à¸±à¸à¸´"},{id:"leaderboard",label:"à¸à¸±à¸à¸à¸±à¸"},{id:"constellation",label:"Signal Constellation"}],jl={overview:["ภาà¸à¸£à¸§à¸¡","สรุà¸à¸ªà¸à¸²à¸à¸°à¸à¸²à¸£à¸ªà¹à¸à¸ªà¸±à¸à¸à¸²à¸à¸à¸à¸à¸à¸¸à¸"],setup:["à¸à¸±à¹à¸à¸à¹à¸²à¸à¸à¸","à¹à¸à¸·à¹à¸à¸¡à¸à¹à¸à¸à¸à¸à¹à¸¥à¸°à¸à¸¥à¸¸à¹à¸¡ Telegram"],signals:["à¸à¸²à¸£à¸ªà¹à¸à¸ªà¸±à¸à¸à¸²à¸","à¹à¸¥à¸·à¸à¸à¸ªà¸´à¸à¸à¸£à¸±à¸à¸¢à¹ · à¸à¸§à¸²à¸¡à¸à¸µà¹
9· à¸à¸§à¸²à¸¡à¹à¸ªà¸µà¹à¸¢à¸"],footprint:["Footprint Lab","Add-On · สัà¸à¸à¸²à¸ order flow à¸à¸²à¸ tape à¸à¸£à¸´à¸ · à¸à¸±à¸à¸à¸±à¸à¸à¸¥à¸¸à¹à¸¡"],news:["Alpha News","à¸à¹à¸²à¸§à¹à¸£à¸µà¸¢à¸¥à¹à¸à¸¡à¹ â à¹à¸¥à¸·à¸à¸à¸ªà¹à¸à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡ Telegram"],history:["à¸à¸£à¸°à¸§à¸±à¸à¸´à¸à¸²à¸£à¸ªà¹à¸","สัà¸à¸à¸²à¸à¹à¸¥à¸°à¸à¸¥à¸¥à¹à¸²à¸ªà¸¸à¸"],leaderboard:["à¸à¸±à¸à¸à¸±à¸","à¸à¸±à¸à¸à¸±à¸à¸à¸¹à¹à¹à¸à¹ · à¸à¸±à¸à¸à¸±à¸à¸à¸¹à¹à¸à¸³à¸à¸³à¹à¸£"],constellation:["Signal Constellation","à¹à¸¥à¸ 3D à¸à¸à¸à¸ªà¸±à¸à¸à¸²à¸à¸à¸£à¸´à¸ â à¹à¸¥à¸·à¸à¸à¸à¸¹à¸£à¸²à¸¢à¸ªà¸´à¸à¸à¸£à¸±à¸à¸¢à¹"],academy:["Academy","à¹à¸ªà¸´à¸£à¹à¸à¸à¸à¹à¸£à¸µà¸¢à¸à¹à¸«à¹à¸ªà¸¡à¸²à¸à¸´à¸ + สà¹à¸à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡à¸à¸±à¸à¹à¸à¸¡à¸±à¸à¸´"]},Qn=[{id:"all",label:"à¸à¸±à¹à¸à¸«à¸¡à¸"},{id:"crypto",label:"Crypto"},{id:"forex",label:"Forex"},{id:"stocks",label:"US Stocks"},{id:"thai",label:"หุà¹à¸à¹à¸à¸¢"},{id:"commodities",label:"Commodities"}],Nl=[{v:30,l:"30 à¸à¸²à¸à¸µ"},{v:60,l:"1 à¸à¸±à¹à¸§à¹à¸¡à¸"},{v:120,l:"2 à¸à¸±à¹à¸§à¹à¸¡à¸"},{v:240,l:"4 à¸à¸±à¹à¸§à¹à¸¡à¸"},{v:360,l:"6 à¸à¸±à¹à¸§à¹à¸¡à¸"},{v:720,l:"12 à¸à¸±à¹à¸§à¹à¸¡à¸"},{v:1440,l:"1 วัà¸"}],er=[{id:"crypto",label:"Crypto"},{id:"forex",label:"Forex"},{id:"commodities",label:"Commodities"},{id:"general",label:"à¸à¸±à¹à¸§à¹à¸"}],yl=Nl.some(t=>t.v===Tt),wl=pt&&Lt.length===0&&me.length>0&&!me.some(t=>xi.has(t)),tr=(h==null?void 0:h.status)==="online"&&ke?"bg-emerald-400":(h==null?void 0:h.status)==="error"?"bg-rose-400":ke?"bg-amber-400":"bg-slate-500",vl=e.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-white/[0.06] bg-white/[0.02] px-4 py-3",children:[e.jsx("button",{onClick:Kt,disabled:qe,className:"rounded-xl bg-emerald-600 px-6 py-2.5 text-sm font-semibold text-white hover:bg-emerald-500 disabled:opacity-50",children:qe?"à¸à¸³à¸¥à¸±à¸à¸à¸±à¸à¸à¸¶à¸â¦":"à¸à¸±à¸à¸à¸¶à¸à¸à¸²à¸£à¸à¸±à¹à¸à¸à¹à¸²"}),Ot&&e.jsx("span",{className:"text-sm text-emerald-400",children:"â à¸à¸±à¸à¸à¸¶à¸à¹à¸¥à¹à¸§"}),tt&&e.jsx("span",{className:"text-sm text-rose-400",children:tt}),e.jsxs("span",{className:"ml-auto text-xs text-slate-500",children:["สà¹à¸à¸¥à¹à¸²à¸ªà¸¸à¸: ",Xn]})]}),sr=e.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[e.jsx("button",{onClick:()=>Ie(n),className:"shrink-0 rounded-xl border border-white/10 px-3.5 py-2 text-sm text-slate-300 hover:bg-white/5",children:"รีà¹à¸à¸£à¸"}),((h==null?void 0:h.has_bot)||(h==null?void 0:h.has_discord))&&e.jsx("button",{onClick:Wn,disabled:Ds,className:"shrink-0 rounded-xl border border-cyan-500/40 bg-cyan-500/10 px-3.5 py-2 text-sm text-cyan-300 hover:bg-cyan-500/20 disabled:opacity-50",children:"สà¹à¸à¸à¸²à¸£à¹à¸à¸à¸à¸ªà¸à¸"}),e.jsxs("label",{className:"flex shrink-0 cursor-pointer items-center gap-2 whitespace-nowrap rounded-xl border border-white/10 px-3.5 py-2 text-sm",children:[e.jsx("span",{className:ke?"text-emerald-400":"text-slate-400",children:ke?"à¹à¸à¸´à¸à¸ªà¹à¸":"à¸à¸´à¸"}),e.jsx(de,{on:ke,onChange:ta})]})]}),ar=bl&&e.jsx("button",{onClick:In,disabled:f,className:`shrink-0 rounded-lg px-3.5 py-1.5 text-xs font-semibold text-white disabled:opacity-50 ${ot||Re!=null&&Re<=7?"bg-emerald-600 hover:bg-emerald-500":"border border-white/15 bg-white/5 hover:bg-white/10"}`,children:f?"à¸à¸³à¸¥à¸±à¸à¸à¹à¸à¸à¸²à¸¢à¸¸â¦":`à¸à¹à¸à¸à¸²à¸¢à¸¸ +30 วัภ(${d.cost} à¹à¸à¸£à¸à¸´à¸)`}),lr=Ws?e.jsxs("div",{className:"flex items-center gap-2 rounded-2xl border border-white/[0.06] bg-white/[0.02] px-4 py-2.5 text-xs text-slate-400",children:[e.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-400"})," à¹à¸à¹à¸à¸²à¸à¹à¸à¹à¹à¸¡à¹à¸à¸³à¸à¸±à¸ (à¸à¹à¸à¸à¸à¸à¸à¹à¸à¸à¸¡à¸´à¸)"]}):Oe!=null?e.jsxs("div",{className:`flex flex-wrap items-center gap-x-3 gap-y-2 rounded-2xl border px-4 py-3 ${ul[qs]}`,children:[e.jsx("span",{className:"text-lg leading-none",children:ot?"â":qs==="amber"?"â³":"ð¢"}),e.jsxs("div",{className:"min-w-0",children:[ot?e.jsxs("p",{className:"text-sm font-semibold",children:["หมà¸à¸à¸²à¸¢à¸¸à¹à¸¥à¹à¸§ â ระà¸à¸",e.jsx("span",{className:"underline",children:"หยุà¸à¸ªà¹à¸à¸ªà¸±à¸à¸à¸²à¸"}),"à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡ Telegram"]}):e.jsxs("p",{className:"text-sm font-semibold",children:["à¸à¸²à¸¢à¸¸à¸à¸²à¸£à¹à¸à¹à¸à¸²à¸à¹à¸«à¸¥à¸·à¸ ",Re," วัà¸"]}),e.jsx("p",{className:"text-xs opacity-80",children:ot?`หมà¸à¸à¸²à¸¢à¸¸à¹à¸¡à¸·à¹à¸ ${Hs} · à¸à¹à¸à¸à¸²à¸¢à¸¸à¸à¹à¸§à¸¢à¹à¸à¸£à¸à¸´à¸à¹à¸à¸·à¹à¸à¸ªà¹à¸à¸ªà¸±à¸à¸à¸²à¸à¸à¹à¸`:`หมà¸à¸à¸²à¸¢à¸¸ ${Hs}${Re!=null&&Re<=7?" · à¹à¸à¸°à¸à¸³à¹à¸«à¹à¸à¹à¸à¸à¸²à¸¢à¸¸à¸à¹à¸à¸à¸«à¸¡à¸":""}`})]}),e.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[p&&e.jsx("span",{className:"text-xs font-medium text-emerald-300",children:p}),bl&&d.balance<d.cost?e.jsxs("a",{href:"/?buy=credits",className:"shrink-0 rounded-lg bg-cyan-600 px-3.5 py-1.5 text-xs font-semibold text-white hover:bg-cyan-500",children:["à¹à¸à¸´à¸¡à¹à¸à¸£à¸à¸´à¸ (",d.balance,")"]}):ar]})]}):null;return e.jsx("div",{className:"min-h-screen bg-[#070b16] text-slate-100",style:{backgroundImage:"radial-gradient(60rem 40rem at 90% -10%, rgba(34,211,238,0.06), transparent), radial-gradient(50rem 40rem at -10% 10%, rgba(16,185,129,0.05), transparent)"},children:e.jsxs("div",{className:"mx-auto flex w-full max-w-[1400px]",children:[e.jsxs("aside",{className:"sticky top-0 hidden h-screen w-60 shrink-0 flex-col border-r border-white/[0.06] bg-white/[0.02] p-4 md:flex",children:[e.jsxs("div",{className:"mb-6 flex items-center gap-3 px-1",children:[e.jsx("div",{className:"grid h-10 w-10 place-items-center rounded-xl bg-cyan-500/15 text-cyan-400 font-bold",children:"α"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold leading-tight",children:"Alpha AI"}),e.jsx("p",{className:"text-xs text-slate-400",children:"Signal Control"})]})]}),e.jsx("nav",{className:"flex flex-col gap-1",children:gl.map(t=>e.jsxs("button",{onClick:()=>N(t.id),className:`flex items-center gap-2.5 rounded-xl px-3 py-2.5 text-sm transition ${c===t.id?"bg-cyan-500/15 font-medium text-cyan-300":"text-slate-400 hover:bg-white/5 hover:text-slate-200"}`,children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${c===t.id?"bg-cyan-400":"bg-slate-600"}`}),t.label]},t.id))}),e.jsxs("div",{className:"mt-auto space-y-2 pt-4",children:[e.jsxs("div",{className:"flex items-center gap-2 rounded-xl border border-white/10 px-3 py-2",children:[e.jsx("span",{className:`h-2 w-2 rounded-full ${tr}`}),e.jsx("span",{className:`text-xs font-medium ${Yn}`,children:ke?h==null?void 0:h.status:"à¸à¸´à¸à¸à¸¢à¸¹à¹"})]}),!Ws&&Oe!=null&&e.jsxs("button",{onClick:()=>N("overview"),className:`w-full rounded-xl border px-3 py-2 text-left text-xs font-medium transition ${ul[qs]}`,children:[ot?"â หมà¸à¸à¸²à¸¢à¸¸à¹à¸¥à¹à¸§":`â³ à¹à¸«à¸¥à¸·à¸ ${Re} วัà¸`,e.jsxs("span",{className:"block text-[10px] font-normal opacity-70",children:["หมà¸à¸à¸²à¸¢à¸¸ ",Hs]})]}),e.jsx("button",{onClick:()=>{window.location.href="/"},className:"w-full rounded-xl border border-white/10 px-3 py-2 text-left text-sm text-slate-400 transition hover:text-cyan-300",children:"â à¸à¸¥à¸±à¸ Dashboard"})]})]}),e.jsxs("main",{className:"min-w-0 flex-1 px-4 py-6 lg:px-8",children:[e.jsxs("div",{className:"mb-6 flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"flex items-center gap-2.5 text-2xl font-bold tracking-tight",children:[c==="footprint"&&e.jsx(Ql,{size:38}),jl[c][0]]}),e.jsx("p",{className:"text-sm text-slate-400",children:jl[c][1]})]}),sr]}),e.jsx("div",{className:"mb-5 flex gap-1 overflow-x-auto rounded-xl border border-white/10 p-1 md:hidden",children:gl.map(t=>e.jsx("button",{onClick:()=>N(t.id),className:`shrink-0 whitespace-nowrap rounded-lg px-3 py-1.5 text-sm transition ${c===t.id?"bg-cyan-500/15 text-cyan-300":"text-slate-400"}`,children:t.label},t.id))}),c==="overview"&&e.jsxs("div",{className:"space-y-5",children:[e.jsx("style",{children:fi}),e.jsx("div",{className:"tg-reveal",children:lr}),(()=>{var _,I;const t=((_=V==null?void 0:V.clog)==null?void 0:_.level)??(ke?"ok":"off"),s=t==="blocked"?{dot:"bg-rose-400",ring:"border-rose-500/40 bg-rose-500/5",txt:"text-rose-300",label:"ð´ à¸à¸¸à¸à¸à¸±à¸"}
9:t==="warn"?{dot:"bg-amber-400",ring:"border-amber-500/40 bg-amber-500/5",txt:"text-amber-300",label:"ð¡ มีà¸à¸²à¸£à¸«à¸à¹à¸§à¸"}:t==="off"?{dot:"bg-slate-500",ring:"border-slate-600/40 bg-white/5",txt:"text-slate-300",label:"⪠à¸à¸´à¸à¸à¸²à¸£à¸ªà¹à¸à¸à¸¢à¸¹à¹"}:{dot:"bg-emerald-400",ring:"border-emerald-500/40 bg-emerald-500/5",txt:"text-emerald-300",label:"ð¢ à¸à¸à¸à¸´"},l=P=>P?new Date(P).toLocaleString("th-TH",{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit",timeZone:be}):"â",m=(V==null?void 0:V.deliveries)??{},E=P=>P==="sent"?{cls:"bg-emerald-500/15 text-emerald-300 border-emerald-500/30",txt:"â
สà¹à¸à¹à¸¥à¹à¸§"}:P==="waiting"?{cls:"bg-amber-500/15 text-amber-300 border-amber-500/30",txt:"Ⳡรà¸à¸ªà¸±à¸à¸à¸²à¸"}:{cls:"bg-slate-600/20 text-slate-400 border-slate-500/30",txt:"ð ยัà¸à¹à¸¡à¹à¸¡à¸µà¸ªà¸±à¸à¸à¸²à¸"};return e.jsxs("section",{className:`tg-reveal ${q} border ${s.ring}`,style:{animationDelay:"60ms"},children:[e.jsxs("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`h-2.5 w-2.5 rounded-full ${s.dot} ${t==="blocked"?"animate-pulse":""}`}),e.jsx("h2",{className:"text-base font-semibold",children:"𩺠Health Check · สุà¸à¸ าà¸à¸à¸²à¸£à¸ªà¹à¸à¸ªà¸±à¸à¸à¸²à¸"}),e.jsx("span",{className:`rounded-full border px-2 py-0.5 text-xs font-medium ${s.ring} ${s.txt}`,children:s.label})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>n&&Zt(n),className:"rounded-lg border border-white/10 px-2.5 py-1.5 text-xs text-slate-300 hover:bg-white/5",children:"รีà¹à¸à¸£à¸"}),e.jsx("button",{onClick:En,disabled:Va,className:"rounded-lg bg-cyan-500/90 px-3 py-1.5 text-xs font-semibold text-slate-950 hover:bg-cyan-400 disabled:opacity-50",children:Va?"à¸à¸³à¸¥à¸±à¸à¸¥à¹à¸²à¸â¦":"𧹠ลà¹à¸²à¸à¸à¹à¸à¸à¸¸à¸à¸à¸±à¸"})]})]}),e.jsx("p",{className:`mb-3 text-sm ${s.txt}`,children:((I=V==null?void 0:V.clog)==null?void 0:I.reason)??(ke?"à¸à¸³à¸¥à¸±à¸à¹à¸«à¸¥à¸à¸ªà¸à¸²à¸à¸°â¦":'à¸à¸²à¸£à¸ªà¹à¸à¸à¸¹à¸à¸à¸´à¸à¸à¸¢à¸¹à¹ â à¹à¸à¸´à¸à¸ªà¸§à¸´à¸à¸à¹ "à¹à¸à¸´à¸à¸ªà¹à¸" à¹à¸à¸·à¹à¸à¹à¸£à¸´à¹à¸¡')}),Xa&&e.jsx("p",{className:"mb-3 rounded-lg bg-black/30 px-3 py-2 text-xs text-slate-200",children:Xa}),Ms&&Ms.length>0&&e.jsxs("div",{className:"mb-3 rounded-lg bg-black/30 px-3 py-2 text-xs text-slate-200",children:[e.jsx("p",{className:"mb-1 text-[11px] text-slate-400",children:"à¸à¸¥à¸à¸£à¸§à¸ Webhook รายหà¹à¸à¸ (à¸à¸£à¸§à¸à¸ªà¸ à¹à¸¡à¹à¸¡à¸µà¸à¹à¸à¸à¸§à¸²à¸¡à¹à¸à¹à¸²à¸«à¹à¸à¸)"}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:Ms.map(P=>{const S=rt.find(ue=>`discord:${ue.id}`===P.platform),ye=(S==null?void 0:S.label)||(P.platform==="discord"?"Webhook à¹à¸à¸µà¹à¸¢à¸§":P.platform.replace(/^discord:/,"").slice(0,8));return e.jsxs("span",{className:`rounded-md border px-2 py-0.5 ${P.ok?"border-emerald-500/30 bg-emerald-500/10 text-emerald-300":"border-rose-500/30 bg-rose-500/10 text-rose-300"}`,children:[P.ok?"â
":"â"," ",ye,!P.ok&&` · ${ss(P.error)}`]},P.platform)})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] text-slate-400",children:"à¸à¸à¸"}),e.jsx("p",{className:`mt-0.5 text-sm font-semibold ${(V==null?void 0:V.status)==="online"?"text-emerald-300":(V==null?void 0:V.status)==="error"?"text-rose-300":"text-slate-300"}`,children:(V==null?void 0:V.status)??"â"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] text-slate-400",children:"สà¹à¸à¸¥à¹à¸²à¸ªà¸¸à¸"}),e.jsx("p",{className:"mt-0.5 text-sm font-semibold text-slate-200",children:l(V==null?void 0:V.last_sent_at)})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] text-slate-400",children:"สà¹à¸à¸ªà¸³à¹à¸£à¹à¸ 24 à¸à¸¡."}),e.jsx("p",{className:"mt-0.5 text-sm font-semibold text-emerald-300",children:m.sent_24h??0})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] text-slate-400",children:"สà¹à¸à¹à¸¡à¹à¸à¹à¸²à¸ 24 à¸à¸¡."}),e.jsx("p",{className:`mt-0.5 text-sm font-semibold ${(m.failed_24h??0)>0?"text-rose-300":"text-slate-300"}`,children:m.failed_24h??0})]})]}),(V==null?void 0:V.last_error)&&e.jsxs("p",{className:"mt-3 rounded-lg border border-rose-500/30 bg-rose-500/5 px-3 py-2 text-xs text-rose-300",children:["â ï¸ ",V.last_error]}),Array.isArray(V==null?void 0:V.assets)&&V.assets.length>0&&e.jsxs("div",{className:"mt-3",children:[e.jsx("p",{className:"mb-1.5 text-[11px] text-slate-400",children:"สà¸à¸²à¸à¸°à¸£à¸²à¸¢à¸ªà¸´à¸à¸à¸£à¸±à¸à¸¢à¹à¸à¸µà¹à¸à¸´à¹à¸à¸ªà¹à¸"}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:V.assets.map((P,S)=>{const ye=E(P.delivery_status);return e.jsxs("span",{className:`rounded-md border px-2 py-1 text-[11px] ${ye.cls}`,style:{animation:"tgFade .4s ease both",animationDelay:`${S*60}ms`},title:P.last_delivered_at?`สà¹à¸à¸¥à¹à¸²à¸ªà¸¸à¸ ${l(P.last_delivered_at)}`:P.last_signal_at?`à¹à¸à¸à¸à¸´à¸à¸¡à¸µà¸ªà¸±à¸à¸à¸²à¸à¸¥à¹à¸²à¸ªà¸¸à¸ ${l(P.last_signal_at)}`:"à¹à¸à¸à¸à¸´à¸à¸¢à¸±à¸à¹à¸¡à¹à¹à¸à¸¢à¸à¸à¸à¸ªà¸±à¸à¸à¸²à¸à¸à¸±à¸§à¸à¸µà¹",children:[P.asset," · ",ye.txt]},P.asset)})})]}),V&&Array.isArray(V.assets)&&V.assets.length===0&&e.jsx("p",{className:"mt-3 text-[11px] text-slate-500",children:"สà¹à¸à¸à¸¸à¸à¸ªà¸´à¸à¸à¸£à¸±à¸à¸¢à¹ (à¹à¸¡à¹à¹à¸à¹à¸à¸³à¸à¸±à¸à¸£à¸²à¸¢à¸à¸±à¸§)"})]})})(),e.jsx("section",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:Zn.map((t,s)=>e.jsxs("div",{className:`tg-reveal ${q}`,style:{animationDelay:`${100+s*70}ms`},children:[e.jsx("p",{className:"text-xs text-slate-400",children:t.k}),e.jsx("p",{className:"mt-1 text-3xl font-bold",style:{color:t.c},children:e.jsx(cn,{text:t.v})}),e.jsx(ui,{values:t.s,color:t.c})]},t.k))}),e.jsxs("button",{type:"button",onClick:()=>N("footprint"),className:`tg-reveal ${q} flex w-full items-center gap-3 border !border-amber-500/25 text-left transition hover:!border-amber-500/50`,style:{animationDelay:"180ms"},children:[e.jsx("span",{className:"text-2xl",children:"ð§ª"}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsxs("span",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:"text-sm font-semibold text-slate-100",children:"Footprint Lab"}),e.jsx("span",{className:"rounded-full border border-amber-500/40 bg-amber-500/10 px-2 py-0.5 text-[10px] font-bold text-amber-300",children:"Add-On à¹à¸«à¸¡à¹"}),(k==null?void 0:k.on)&&k.paid&&e.jsx("span",{className:"rounded-full border border-emerald-500/40 bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium text-emerald-300",children:"â
à¹à¸à¸´à¸à¸£à¸±à¸à¸à¸¢à¸¹à¹"}),(k==null?void 0:k.on)&&!k.paid&&e.jsx("span",{className:"rounded-full border border-amber-500/40 bg-amber-500/10 px-2 py-0.5 text-[10px] font-medium text-amber-300",children:"Ⳡหมà¸à¸à¸²à¸¢à¸¸"})]}),e.jsxs("span",{className:"mt-0.5 block text-xs text-slate-400",children:["สัà¸à¸à¸²à¸ order flow à¸à¸²à¸ tape à¸à¸£à¸´à¸ · ",k!=null&&k.unlimited?"à¸à¹à¸à¸à¹à¸à¸à¸¡à¸´à¸ (à¹à¸¡à¹à¸à¸³à¸à¸±à¸)":`${(k==null?void 0:k.cost)??50} à¹à¸à¸£à¸à¸´à¸ / 30 วัà¸`]})]}),e.jsx("span",{className:"shrink-0 text-xs font-medium text-amber-300",children:"à¸à¸±à¹à¸à¸à¹à¸² â"})]}),je&&e.jsxs("button",{type:"button",onClick:()=>De(!0),className:`tg-reveal ${q} flex w-full items-center gap-3 border !border-emerald-500/25 text-left transition hover:!border-emerald-500/50`,style:{animationDelay:"210ms"},children:[e.jsx("span",{className:"text-2xl",children:"ð¤"}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsxs("span",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:"text-sm font-semibold text-slate-100",children:"Partner IB â à¹à¸à¸¥à¸µà¹à¸¢à¸à¸à¸¥à¸¸à¹à¸¡à¸à¸à¸à¸à¸¸à¸à¹à¸à¹à¸à¸£à¸²à¸¢à¹à¸à¹"}),e.jsxs("span",{className:"rounded-full border border-emerald-500/40 bg-emerald-500/10 px-2 py-0.5 text-[10px] font-bold text-emerald-300",children:["à¸à¸à¸¡à¸¡à¸´à¸à¸à¸±à¹à¸ ",Ee??20,"%"]})]}),e.jsx("span",{className:"mt-0.5 block text-xs text-slate-400",children:"สมาà¸à¸´à¸à¹à¸à¸à¸¥à¸¸à¹à¸¡à¸ªà¸¡à¸±à¸à¸£ VIP à¸à¹à¸²à¸à¸¥à¸´à¸à¸à¹à¸à¸à¸à¸à¸¸à¸ = à¸à¹à¸²à¸à¸à¸¡à¸à¸²à¸à¸¢à¸à¸à¸à¸²à¸¢à¸à¸£à¸´à¸ · à¹à¸¡à¹à¸¡à¸µà¸à¹à¸²à¸ªà¸¡à¸±à¸à¸£ · à¸à¸±à¸à¹à¸à¸ªà¸à¸²à¸à¸° 4 à¸à¸±à¹à¸à¸à¸¶à¸ Master IB"})]}),e.jsx("span",{className:"shrink-0 text-xs font-medium text-emerald-300",children:"รัà¸à¸¥à¸´à¸à¸à¹ â"})]}),Array.isArray(b==null?void 0:b.equity)&&b.equity.length>0&&e.jsxs("section",{className:`tg-reveal ${q}`,children:[e.jsxs("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[e.jsx("button",{onClick:()=>ea("chart"),className:`rounded-xl px-3.5 py-2 text-sm font-semibold transition ${_t==="chart"?"bg-cyan-500/15 text-cyan-300 ring-1 ring-cyan-500/40":"text-slate-400 hover:bg-white/5"}`,children:"ð à¸à¸£à¸²à¸à¸à¸³à¹à¸£à¸ªà¸°à¸ªà¸¡"}),e.jsx("button",{onClick:()=>ea("calendar"),className:`rounded-xl px-3.5 py-2 text-sm font-semibold transition ${_t==="calendar"?"bg-cyan-500/15 text-cyan-300 ring-1 ring-cyan-500/40":"text-slate-400 hover:bg-white/5"}`,children:"ðï¸ à¸à¸à¸´à¸à¸´à¸à¸à¸³à¹à¸£âà¸à¸²à¸à¸à¸¸à¸"})]}),e.jsx("span",{className:"text-[11px] text-slate-500",children:_t==="chart"?`à¸à¹à¸²à¸à¸à¸´à¸à¸à¸¥à¸à¸£à¸´à¸à¸à¸à¸à¸à¸¸à¸à¹à¸¡à¹à¸à¸µà¹à¸à¸´à¸à¹à¸¥à¹à¸§ · à¸à¸¥à¸à¸à¸à¹à¸§à¸à¸à¸µà¹à¸£à¸±à¸ (${b.equity.length} วัà¸)`:"à¸à¸¥à¸à¸£à¸´à¸à¸£à¸²à¸¢à¸§à¸±à¸ · สà¹à¸à¸¥à¹ FTMO"})]}),_t==="chart"?e.jsx(bi,{points:b.equity,netPct:Number(((kl=b.totals)==null?void 0:kl.net_pct)??0),wins:Number(((Sl=b.totals)==null?void 0:Sl.win)??0),losses:Number(((Cl=b.totals)==null?void 0:Cl.loss)??0)}):e.jsx(ji,{equity:b.equity})]}),e.jsxs("div",{className:"tg-reveal grid grid-cols-1 gap-5 lg:grid-cols-3",children:[e.jsxs("section",{className:`${q} lg:col-span-2`,children:[e.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[e.jsx("h2",{className:"text-base font-semibold",children:"Pipeline"}),e.jsx("p",{className:"text-xs text-slate-500",children:"à¸à¸¥à¸´à¸à¹à¸«à¸à¸à¹à¸à¸·à¹à¸à¸à¸±à¹à¸à¸à¹à¸² step à¸à¸±à¹à¸"})]}),e.jsx(ki,{...Jn})]}),e.jsxs("section",{className:q,children:[e.jsx("h2",{className:"mb-3 text-base font-semibold",children:"à¸à¸¥à¹à¸à¹/à¸à¸à¸°"}),e.jsx(yi,{win:(z==null?void 0:z.win)??0,loss:(z==null?void 0:z.loss)??0,expired:(z==null?void 0:z.expired)??0,pe
9nding:(z==null?void 0:z.pending)??0})]})]}),b&&(($l=b.totals)==null?void 0:$l.total)>0&&e.jsxs(e.Fragment,{children:[e.jsx("section",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[{k:"Avg R:R",v:b.totals.avg_rr?`1 : ${b.totals.avg_rr}`:"â",c:"#22d3ee"},{k:"à¸à¸§à¸²à¸¡à¸¡à¸±à¹à¸à¹à¸à¹à¸à¸¥à¸µà¹à¸¢",v:`${b.totals.avg_conf}%`,c:"#34d399"},{k:"à¸à¸·à¸à¹à¸à¸¥à¸µà¹à¸¢ · Long",v:ln((Ml=b.holding)==null?void 0:Ml.long_min),c:"#a78bfa"},{k:"à¸à¸·à¸à¹à¸à¸¥à¸µà¹à¸¢ · Short",v:ln((Al=b.holding)==null?void 0:Al.short_min),c:"#f87171"}].map(t=>e.jsxs("div",{className:q,children:[e.jsx("p",{className:"text-xs text-slate-400",children:t.k}),e.jsx("p",{className:"mt-1 text-xl font-semibold",style:{color:t.c},children:t.v})]},t.k))}),b.adv&&(b.adv.closed??0)>0&&e.jsxs("section",{className:q,children:[e.jsxs("div",{className:"mb-3 flex items-baseline justify-between gap-2",children:[e.jsx("h2",{className:"text-base font-semibold",children:"สà¸à¸´à¸à¸´à¹à¸à¸´à¸à¸¥à¸¶à¸à¹à¸à¸ Myfxbook"}),e.jsx("span",{className:"text-[11px] text-slate-500",children:"à¹à¸¡à¹à¸à¸µà¹à¸à¸´à¸à¸à¸¥à¹à¸¥à¹à¸§ · à¸à¸¥à¸à¸à¸à¹à¸§à¸à¸à¸µà¹à¸£à¸±à¸"})]}),e.jsxs("div",{className:"mb-3 rounded-xl border border-white/10 bg-black/20 p-3",children:[e.jsx("div",{className:"mb-1 text-xs text-slate-400",children:"à¸à¸¸à¸à¸ าà¸à¸£à¸°à¸à¸ · 5 มิà¸à¸´"}),e.jsx(Il,{adv:b.adv,days:b.equity,lowSampleAt:100})]}),e.jsx(Ol,{adv:b.adv})]}),(Dl=b.hourly)!=null&&Dl.length||(Ll=b.daily)!=null&&Ll.length?e.jsxs("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-2",children:[e.jsxs("section",{className:q,children:[e.jsx("h2",{className:"mb-3 text-base font-semibold",children:"à¸à¸à¸° vs à¹à¸à¹ · รายà¸à¸±à¹à¸§à¹à¸¡à¸"}),e.jsx(Bl,{data:b.hourly??[]})]}),e.jsxs("section",{className:q,children:[e.jsx("h2",{className:"mb-3 text-base font-semibold",children:"à¸à¸à¸° vs à¹à¸à¹ · รายวัà¸à¹à¸à¸ªà¸±à¸à¸à¸²à¸«à¹"}),e.jsx(Wl,{data:b.daily??[]})]})]}):null,Array.isArray(b.points)&&b.points.length>0&&e.jsxs("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-2",children:[e.jsxs("section",{className:q,children:[e.jsx("h2",{className:"mb-1 text-base font-semibold",children:"Duration · ระยะà¹à¸§à¸¥à¸²à¸à¸·à¸ vs à¸à¸¥"}),e.jsx(Hl,{data:b.points})]}),e.jsxs("section",{className:q,children:[e.jsx("h2",{className:"mb-1 text-base font-semibold",children:"MAE · à¸à¸²à¸£à¸à¸²à¸à¸à¸¸à¸à¸ªà¸§à¸à¸à¸²à¸à¸ªà¸¹à¸à¸ªà¸¸à¸"}),e.jsx(ql,{data:b.points})]})]}),e.jsxs("section",{className:q,children:[e.jsxs("div",{className:"mb-1 flex items-baseline justify-between gap-2",children:[e.jsx("h2",{className:"text-base font-semibold",children:"à¸à¸³à¹à¸£/à¸à¸²à¸à¸à¸¸à¸ รายà¸à¸¹à¹ (Net %)"}),e.jsx("span",{className:"text-[11px] text-slate-500",children:"à¹à¸£à¸µà¸¢à¸à¸à¸²à¸à¸à¸³à¹à¸£à¸¡à¸²à¸à¸ªà¸¸à¸ â à¸à¸²à¸à¸à¸¸à¸à¸¡à¸²à¸à¸ªà¸¸à¸"})]}),e.jsxs("p",{className:"mb-3 text-[11px] text-slate-500",children:["ð¢ à¸à¸¥à¸£à¸§à¸¡à¹à¸à¹à¸à¸à¸§à¸ · ð´ à¸à¸¥à¸£à¸§à¸¡à¹à¸à¹à¸à¸¥à¸ â à¸à¸±à¸§à¹à¸¥à¸à¸à¸§à¸² = à¸à¸³à¹à¸£à¸ªà¸°à¸ªà¸¡ % · สà¸à¸´à¸à¸´ à¸à¸à¸°-à¹à¸à¹ · win rate (à¸à¸±à¸à¹à¸à¸à¸²à¸°à¹à¸¡à¹à¸à¸µà¹à¸à¸´à¸à¸à¸¥à¹à¸¥à¹à¸§) · ",e.jsx("span",{className:"text-amber-300/90",children:"à¸à¸à¸à¹à¸¥à¹à¸§"})," = ยà¸à¸à¹à¸à¹à¸²à¸à¸à¸à¸à¸¹à¹à¸à¸µà¹à¹à¸¡à¹à¸à¸¢à¸¹à¹à¹à¸à¸¥à¸´à¸ªà¸à¹à¸à¸µà¹à¸à¸´à¹à¸à¹à¸¥à¹à¸§ · ",e.jsx("span",{className:"text-amber-300/90",children:"ยัà¸à¹à¸¡à¹à¸«à¸±à¸à¸ªà¹à¸à¸£à¸/à¸à¹à¸²à¸à¸à¸¡"})," â à¸à¸¹à¹à¹à¸à¸´à¸à¸«à¸¥à¸±à¸à¸¡à¸µà¸£à¸°à¸¢à¸° TP à¹à¸à¸¥à¸µà¹à¸¢à¸£à¸²à¸§ 0.05% à¸à¸à¸à¸£à¸²à¸à¸² à¸à¹à¸à¸à¸¸à¸à¸à¸¶à¸à¸¡à¸µà¸à¸¥à¸¡à¸²à¸"]}),(()=>{const t=[...b.by_asset].filter(l=>l.win+l.loss>0).sort((l,m)=>m.net-l.net);if(!t.length)return e.jsx("p",{className:"text-xs text-slate-500",children:"ยัà¸à¹à¸¡à¹à¸¡à¸µà¸à¸¹à¹à¸à¸µà¹à¸à¸´à¸à¸à¸¥à¹à¸¥à¹à¸§ â รà¸à¸ªà¸±à¸à¸à¸²à¸à¹à¸à¹à¸² WIN/LOSS à¸à¹à¸à¸"});const s=Math.max(...t.map(l=>Math.abs(l.net)),1);return e.jsx("div",{className:"space-y-2.5",children:t.map(l=>e.jsx(wi,{label:l.asset,sub:ve(l.asset),net:l.net,win:l.win,loss:l.loss,maxAbs:s,outOfFilter:Bs(l.asset)},l.asset))})})()]}),e.jsxs("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-2",children:[e.jsxs("section",{className:q,children:[e.jsx("h2",{className:"mb-3 text-base font-semibold",children:"สิà¸à¸à¸£à¸±à¸à¸¢à¹à¸à¸µà¹à¸ªà¹à¸à¸à¹à¸à¸¢"}),e.jsx("div",{className:"space-y-2.5",children:(()=>{const t=Math.max(...b.by_asset.map(s=>s.total),1);return b.by_asset.map(s=>e.jsx(as,{label:s.asset,frac:s.total/t,color:"#22d3ee",right:`${s.total} à¸à¸£à¸±à¹à¸`,outOfFilter:Bs(s.asset)},s.asset))})()})]}),e.jsxs("section",{className:q,children:[e.jsx("h2",{className:"mb-3 text-base font-semibold",children:"Reward : Risk à¸à¹à¸à¸à¸¹à¹"}),e.jsx("div",{className:"space-y-2.5",children:(()=>{const t=b.by_asset.filter(l=>l.rr),s=Math.max(...t.map(l=>l.rr),2);return t.length?t.map(l=>e.jsx(as,{label:l.asset,frac:l.rr/s,color:"#34d399",right:`1 : ${l.rr}`,outOfFilter:Bs(l.asset)},l.asset)):e.jsx("p",{className:"text-xs text-slate-500",children:"ยัà¸à¹à¸¡à¹à¸¡à¸µà¸à¹à¸à¸¡à¸¹à¸¥ R:R"})})()})]}),e.jsxs("section",{className:q,children:[e.jsx("h2",{className:"mb-3 text-base font-semibold",children:"Long vs Short"}),e.jsx("div",{className:"space-y-2.5",children:(()=>{const t=b.direction,s=Math.max(t.long,t.short,1);return e.jsxs(e.Fragment,{children:[e.jsx(as,{label:"Long",frac:t.long/s,color:"#34d399",right:`${t.long} · ${t.long?Math.round(t.long_win/t.long*100):0}%`}),e.jsx(as,{label:"Short",frac:t.short/s,color:"#f87171",right:`${t.short} · ${t.short?Math.round(t.short_win/t.short*100):0}
9%`})]})})()}),e.jsx("p",{className:"mt-2 text-[11px] text-slate-500",children:"à¸à¸±à¸§à¹à¸¥à¸ % = win rate à¸à¸à¸à¸à¸´à¸¨à¸à¸²à¸à¸à¸±à¹à¸"})]}),e.jsxs("section",{className:q,children:[e.jsx("h2",{className:"mb-3 text-base font-semibold",children:"à¸à¸³à¹à¸£à¸£à¸²à¸¢à¹à¸à¸·à¸à¸ (Net %)"}),e.jsx(Ni,{data:b.monthly})]})]})]})]}),c==="setup"&&e.jsxs("div",{className:"space-y-5",children:[e.jsxs("section",{className:q,children:[e.jsxs("h2",{className:"mb-4 flex items-center gap-2 text-base font-semibold",children:[e.jsx("span",{className:"grid h-6 w-6 place-items-center rounded-lg bg-cyan-500/15 text-xs text-cyan-400",children:"1"})," à¸à¸±à¹à¸à¸à¹à¸²à¸à¹à¸à¸à¸à¸²à¸à¸ªà¹à¸à¸ªà¸±à¸à¸à¸²à¸"]}),e.jsxs("div",{className:"mb-5 flex flex-wrap gap-1.5 border-b border-white/10 pb-3",children:[e.jsxs("button",{onClick:()=>Ha("telegram"),className:`rounded-xl px-4 py-2 text-sm font-medium transition ${Et==="telegram"?"bg-cyan-500/15 text-cyan-300 ring-1 ring-cyan-500/40":"text-slate-400 hover:bg-white/5"}`,children:["âï¸ Telegram ",(h==null?void 0:h.has_bot)&&e.jsx("span",{className:"ml-1 text-emerald-400",children:"â"})]}),e.jsxs("button",{onClick:()=>Ha("discord"),className:`rounded-xl px-4 py-2 text-sm font-medium transition ${Et==="discord"?"bg-indigo-500/15 text-indigo-300 ring-1 ring-indigo-500/40":"text-slate-400 hover:bg-white/5"}`,children:["ð® Discord ",(h==null?void 0:h.has_discord)&&(h==null?void 0:h.discord_active)&&e.jsx("span",{className:"ml-1 text-emerald-400",children:"â"}),(h==null?void 0:h.discord_active)===!1&&e.jsx("span",{className:"ml-1 text-amber-400",children:"ð"})]}),e.jsxs("button",{disabled:!0,title:"à¹à¸£à¹à¸§à¹ à¸à¸µà¹",className:"cursor-not-allowed rounded-xl px-4 py-2 text-sm font-medium text-slate-600",children:["ð© Line ",e.jsx("span",{className:"ml-1 rounded-md bg-white/5 px-1.5 py-0.5 text-[10px] text-slate-500",children:"à¹à¸£à¹à¸§à¹ à¸à¸µà¹"})]})]}),Et==="telegram"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-4 rounded-xl border border-cyan-500/20 bg-cyan-500/[0.04] p-3.5 text-xs leading-relaxed",children:[e.jsx("p",{className:"mb-1.5 font-medium text-cyan-300",children:"วิà¸à¸µà¸à¸±à¹à¸à¸à¹à¸² (à¸à¸³à¸à¸²à¸¡à¸à¸µà¹à¹à¸à¹à¹à¸¥à¸¢)"}),e.jsxs("ol",{className:"list-inside list-decimal space-y-1 text-slate-400",children:[e.jsxs("li",{children:["วาภ",e.jsx("span",{className:"text-slate-200",children:"à¹à¸à¸à¸²à¸° Bot Token"})," à¹à¸à¹à¸ ",e.jsx("span",{className:"font-mono text-slate-200",children:"123456789:AAExampleTokenDoNotUseâ¦"})," ",e.jsx("span",{className:"text-slate-500",children:"(à¹à¸¡à¹à¸à¹à¸à¸à¹à¸ªà¹ URL หรืภ/getUpdates â à¸à¹à¸²à¸§à¸²à¸ URL à¹à¸à¹à¸¡à¸¡à¸² ระà¸à¸à¸à¸°à¸à¸±à¸à¹à¸«à¹)"})]}),e.jsxs("li",{children:["à¸à¸ ",e.jsx("span",{className:"text-cyan-300",children:"âà¸à¸à¸ªà¸à¸à¸à¸à¸ & à¸à¸¶à¸ chat_idâ"})," à¹à¸¥à¹à¸§à¹à¸¥à¸·à¸à¸à¸à¸¥à¸¸à¹à¸¡à¸à¸µà¹à¸à¸à¸à¹à¸à¹à¸à¹à¸à¸à¸¡à¸´à¸"]}),e.jsxs("li",{children:["à¸à¸ ",e.jsx("span",{className:"text-emerald-300",children:"âà¸à¸±à¸à¸à¸¶à¸à¸à¸²à¸£à¸à¸±à¹à¸à¸à¹à¸²â"})]}),e.jsxs("li",{children:["à¹à¸à¸´à¸à¸ªà¸§à¸´à¸à¸à¹ ",e.jsx("span",{className:"text-emerald-300",children:"âà¹à¸à¸´à¸à¸ªà¹à¸â"})," à¸à¹à¸²à¸à¸à¸ â à¹à¸£à¸´à¹à¸¡à¸ªà¹à¸à¸ªà¸±à¸à¸à¸²à¸à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡"]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:$e,children:"Bot Token (à¸à¸²à¸ @BotFather)"}),e.jsxs("div",{className:"relative mt-1",children:[e.jsx("input",{className:oe+" pr-11",type:os?"text":"password",autoComplete:"off",placeholder:h!=null&&h.has_bot?`à¸à¸±à¸à¸à¸¶à¸à¹à¸§à¹à¹à¸¥à¹à¸§ (${h.bot_token_masked}) â à¹à¸§à¹à¸à¸§à¹à¸²à¸à¸à¹à¸²à¹à¸¡à¹à¹à¸à¸¥à¸µà¹à¸¢à¸`:"วาภbot token à¸à¸µà¹à¸à¸µà¹",value:st,onChange:t=>is(t.target.value)}),e.jsx("button",{type:"button",onClick:()=>fn(t=>!t),"aria-label":os?"à¸à¹à¸à¸ token":"à¹à¸ªà¸à¸ token",className:"absolute right-1.5 top-1/2 -translate-y-1/2 roun
9ded-md p-1.5 text-slate-400 transition hover:text-cyan-300",children:e.jsx(Ks,{off:os})})]}),e.jsxs("p",{className:"mt-1 text-xs text-slate-500",children:["วาà¸à¹à¸à¸à¸²à¸° token à¹à¸à¹à¸ ",e.jsx("span",{className:"text-slate-400",children:"123456789:AAExampleTokenDoNotUseâ¦"})," (à¸à¹à¸²à¸§à¸²à¸ URL à¹à¸à¹à¸¡ ระà¸à¸à¸à¸°à¸à¸±à¸ token à¹à¸«à¹à¸à¸±à¸à¹à¸à¸¡à¸±à¸à¸´)"]}),(h==null?void 0:h.has_bot)&&!st.trim()&&e.jsxs("p",{className:"mt-1.5 flex items-center gap-1 text-xs text-emerald-400",children:["â à¸à¸±à¸à¸à¸¶à¸ Bot Token à¹à¸§à¹à¹à¸¥à¹à¸§ (",h.bot_token_masked,") â à¹à¸§à¹à¸à¸à¹à¸à¸à¸à¸µà¹à¸§à¹à¸²à¸à¹à¸à¹ ระà¸à¸à¸à¸³à¸à¹à¸²à¹à¸§à¹à¹à¸«à¹"]})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:e.jsx("button",{onClick:Bn,disabled:Ds,className:"rounded-xl bg-cyan-600 px-4 py-2 text-sm font-medium text-white hover:bg-cyan-500 disabled:opacity-50",children:Ds?"à¸à¸³à¸¥à¸±à¸à¸à¸à¸ªà¸à¸â¦":"à¸à¸à¸ªà¸à¸à¸à¸à¸ & à¸à¸¶à¸ chat_id"})}),Ga&&e.jsx("p",{className:"text-sm text-slate-300",children:Ga}),Ut.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:Ut.map(t=>e.jsxs("button",{onClick:()=>xs(t.id),className:`rounded-lg border px-3 py-1.5 text-xs ${Ye===t.id?"border-cyan-500 bg-cyan-500/10 text-cyan-300":"border-white/10 text-slate-300 hover:bg-white/5"}`,children:[t.title," ",e.jsxs("span",{className:"text-slate-500",children:["(",t.id,")"]})]},t.id))}),e.jsxs("div",{children:[e.jsx("p",{className:$e,children:"Chat ID à¸à¸à¸à¸à¸¥à¸¸à¹à¸¡"}),e.jsxs("div",{className:"relative mt-1",children:[e.jsx("input",{className:oe+" pr-11",type:cs?"text":"password",autoComplete:"off",placeholder:"-100...",value:Ye,onChange:t=>xs(t.target.value)}),e.jsx("button",{type:"button",onClick:()=>gn(t=>!t),"aria-label":cs?"à¸à¹à¸à¸ Chat ID":"à¹à¸ªà¸à¸ Chat ID",className:"absolute right-1.5 top-1/2 -translate-y-1/2 rounded-md p-1.5 text-slate-400 transition hover:text-cyan-300",children:e.jsx(Ks,{off:cs})})]}),e.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"à¸à¸à¸à¸à¹à¸à¸à¹à¸à¹à¸ admin à¸à¸à¸à¸à¸¥à¸¸à¹à¸¡"})]}),e.jsxs("div",{className:"rounded-xl border border-white/10 bg-white/[0.02] p-3.5",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"flex items-center gap-2 text-sm font-semibold text-slate-200",children:"ð สà¹à¸à¸ªà¸±à¸à¸à¸²à¸à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡à¸à¸µà¹"}),e.jsxs("p",{className:"mt-1 text-xs leading-relaxed text-slate-500",children:["à¸à¸´à¸ = à¸à¸¥à¸¸à¹à¸¡à¸à¸µà¹à¸à¸°",e.jsx("span",{className:"text-slate-300",children:"à¹à¸¡à¹à¸£à¸±à¸à¸ªà¸±à¸à¸à¸²à¸"})," à¹à¸à¹à¸¢à¸±à¸",e.jsx("span",{className:"text-slate-300",children:"รัà¸à¸à¹à¸²à¸§/à¸à¸à¸´à¸à¸´à¸"}),"à¹à¸à¹à¸à¸²à¸¡à¸à¸à¸à¸´ (à¸à¹à¸²à¹à¸à¸´à¸à¸à¹à¸²à¸§à¸à¸±à¸à¹à¸à¸¡à¸±à¸à¸´à¹à¸§à¹) â à¹à¸«à¸¡à¸²à¸°à¸à¸±à¸à¸à¸à¸à¸µà¹à¸à¸¢à¸²à¸à¸ªà¹à¸à¸à¸´à¸à¹à¸à¹à¸² Discord à¸à¸¢à¹à¸²à¸à¹à¸à¸µà¸¢à¸§ à¹à¸¥à¹à¸§à¹à¸à¹ Telegram à¹à¸§à¹à¹à¸à¸£à¹à¸à¹à¸²à¸§"]})]}),e.jsx(de,{on:ms,onChange:sa})]}),!ms&&e.jsx("p",{className:"mt-2 rounded-lg border border-amber-500/20 bg-amber-500/[0.06] px-3 py-2 text-xs text-amber-300",children:"â¸ï¸ à¸à¸´à¸à¸ªà¹à¸à¸ªà¸±à¸à¸à¸²à¸à¹à¸à¹à¸² Telegram à¸à¸¢à¸¹à¹ â à¸à¸´à¸à¸à¸°à¹à¸à¹à¸²à¹à¸à¸à¸²à¸° Discord (à¸à¹à¸²à¹à¸à¸´à¸à¹à¸§à¹) · à¸à¹à¸²à¸§à¸¢à¸±à¸à¸ªà¹à¸à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡à¸à¸µà¹à¸à¸²à¸¡à¸à¸à¸à¸´"})]})]})]}),Et==="discord"&&e.jsxs("div",{className:"space-y-3",children:[(()=>{var l;const t=rt.filter(m=>{var E;return(E=Ft[m.id])==null?void 0:E.dead});if(t.length===0)return null;const s=t.reduce((m,E)=>{var _;return m+(((_=Ft[E.id])==null?void 0:_.fail_streak)??0)},0);return e.jsxs("div",{className:"rounded-xl border border-rose-500/40 bg-rose-500/[0.07] p-3.5 text-xs leading-relaxed",children:[e.jsxs("p",{className:"text-sm font-semibold text-rose-300",children:["ð´ ",t.length," หà¹à¸à¸à¸ªà¹à¸à¹à¸¡à¹à¸à¸à¸: ",t.map(m=>
9m.label||"หà¹à¸à¸à¹à¸¡à¹à¸¡à¸µà¸à¸·à¹à¸").join(", ")]}),e.jsxs("p",{className:"mt-1 text-slate-300",children:[ss((l=Ft[t[0].id])==null?void 0:l.last_error)," â ระà¸à¸à¸à¸¢à¸²à¸¢à¸²à¸¡à¸ªà¹à¸à¹à¸¥à¹à¸§à¸¥à¹à¸¡à¸à¸´à¸à¸à¸±à¸ ",s.toLocaleString()," à¸à¸£à¸±à¹à¸"]}),e.jsxs("p",{className:"mt-1 text-slate-400",children:["วิà¸à¸µà¹à¸à¹: à¹à¸ Discord สรà¹à¸²à¸ Webhook à¹à¸«à¸¡à¹ (Server Settings â Integrations â Webhooks â New Webhook â Copy Webhook URL) à¹à¸¥à¹à¸§à¸§à¸²à¸ URL à¹à¸«à¸¡à¹à¹à¸à¸à¸à¸µà¹à¹à¸à¸«à¹à¸à¸à¹à¸à¸´à¸¡à¸à¹à¸²à¸à¸¥à¹à¸²à¸ à¸à¸²à¸à¸à¸±à¹à¸à¸à¸ ",e.jsx("span",{className:"text-emerald-300",children:"à¸à¸±à¸à¸à¸¶à¸"})," â à¸à¸²à¸£à¸à¹à¸à¸à¸²à¸¢à¸¸à¸à¸¢à¹à¸²à¸à¹à¸à¸µà¸¢à¸§à¹à¸¡à¹à¸à¸³à¹à¸«à¹à¸«à¹à¸à¸à¸à¸¥à¸±à¸à¸¡à¸²à¸ªà¹à¸à¹à¸à¹"]})]})})(),e.jsxs("div",{className:"rounded-xl border border-indigo-500/20 bg-indigo-500/[0.04] p-3.5 text-xs leading-relaxed",children:[e.jsx("p",{className:"mb-1.5 font-medium text-indigo-300",children:"วิà¸à¸µà¸à¹à¸ Discord (à¹à¸¡à¹à¸à¹à¸à¸à¸ªà¸£à¹à¸²à¸à¸à¸à¸)"}),e.jsxs("ol",{className:"list-inside list-decimal space-y-1 text-slate-400",children:[e.jsxs("li",{children:["à¹à¸à¹à¸à¸´à¸£à¹à¸à¹à¸§à¸à¸£à¹ Discord: ",e.jsx("span",{className:"text-slate-200",children:"Server Settings â Integrations â Webhooks â New Webhook"})]}),e.jsxs("li",{children:["à¹à¸¥à¸·à¸à¸à¸«à¹à¸à¸à¸à¸µà¹à¸à¸°à¹à¸«à¹à¸ªà¸±à¸à¸à¸²à¸à¹à¸à¹à¸² à¹à¸¥à¹à¸§à¸à¸ ",e.jsx("span",{className:"text-slate-200",children:"Copy Webhook URL"})]}),e.jsxs("li",{children:["วาภURL à¸à¹à¸²à¸à¸¥à¹à¸²à¸ â ",e.jsx("span",{className:"text-emerald-300",children:"à¸à¸±à¸à¸à¸¶à¸"})," â à¸à¸ ",e.jsx("span",{className:"text-indigo-300",children:"âสà¹à¸à¸à¸²à¸£à¹à¸à¸à¸à¸ªà¸à¸â"})]})]}),e.jsx("p",{className:"mt-1.5 text-slate-500",children:"à¸à¸°à¹à¸à¹à¸à¸²à¸£à¹à¸à¸ªà¸±à¸à¸à¸²à¸ (embed) + ภาภSMC/PA หลายà¹à¸à¸¡à¹à¹à¸à¸£à¸¡ à¹à¸«à¸¡à¸·à¸à¸à¸à¸µà¹à¸ªà¹à¸à¹à¸à¹à¸² Telegram"})]}),(h==null?void 0:h.discord_active)===!1&&C?e.jsxs("div",{className:"rounded-xl border border-amber-500/25 bg-amber-500/[0.05] p-4",children:[e.jsx("p",{className:"text-sm font-semibold text-amber-300",children:"ð สà¹à¸à¹à¸à¹à¸² Discord à¹à¸à¹à¸à¸à¸µà¹à¸à¸à¸£à¹à¹à¸ªà¸£à¸´à¸¡"}),e.jsxs("p",{className:"mt-1 text-xs leading-relaxed text-slate-400",children:["à¸à¸¥à¸à¸¥à¹à¸à¸à¸à¸²à¸£à¸ªà¹à¸à¸ªà¸±à¸à¸à¸²à¸à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡ Discord â ",e.jsx("span",{className:"text-slate-200",children:"50 à¹à¸à¸£à¸à¸´à¸ (180฿) / 30 วัà¸"})," à¸à¹à¸à¸à¸²à¸¢à¸¸à¹à¸«à¸¡à¸·à¸à¸à¹à¸à¹à¸à¸«à¸¥à¸±à¸ · à¸à¸£à¸±à¹à¸à¹à¸à¸µà¸¢à¸§à¹à¸à¹à¹à¸à¹à¸à¸±à¹à¸à¸à¸²à¸£à¹à¸à¸ªà¸±à¸à¸à¸²à¸ + ภาภMTF"]}),e.jsxs("p",{className:"mt-2 text-xs text-slate-400",children:["à¹à¸à¸£à¸à¸´à¸à¸à¸à¹à¸«à¸¥à¸·à¸: ",e.jsx("span",{className:`font-semibold ${d.balance>=d.discordCost?"text-emerald-400":"text-rose-400"}`,children:d.balance})]}),d.balance>=d.discordCost?e.jsx("button",{onClick:il,disabled:As,className:"mt-3 rounded-xl bg-indigo-600 px-4 py-2 text-sm font-semibold text-white hover:bg-indigo-500 disabled:opacity-50",children:As?"à¸à¸³à¸¥à¸±à¸à¸à¸¥à¸à¸¥à¹à¸à¸â¦":"ð à¸à¸¥à¸à¸¥à¹à¸à¸ Discord · 50 à¹à¸à¸£à¸à¸´à¸"}):e.jsxs("a",{href:"/?buy=credits",className:"mt-3 inline-block rounded-xl bg-cyan-600 px-4 py-2 text-sm font-semibold text-white hover:bg-cyan-500",children:["à¹à¸à¸´à¸¡à¹à¸à¸£à¸à¸´à¸ (",d.balance,")"]}),Pt&&e.jsx("p",{className:"mt-2 text-xs text-slate-300",children:Pt})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("p",{className:"flex items-center gap-2 text-sm font-semibold text-indigo-300",children:["ð® Webhook URL ",e.jsx("span",{className:"text-xs font-normal text-slate-500",children:"(สà¹à¸à¸à¸£à¹à¸à¸¡ Telegram)"})]}),e.jsxs("label",{className:"flex shrink-0 items-center gap-2 text-xs text-slate-400",children:[e.jsx("input",{type:"checkbox",checked:Ea,onChange:t=>Pa(t.target.checked),className:"accent-indigo-500"}),"à¹à¸à¸´à¸à¸ªà¹à¸"]})]}),C&&d.discordExpiresAt&&e.jsxs("p",{className:"text-xs text-emerald-400",children:["â à¹à¸à¹à¸à¸²à¸à¹à¸à¹ · à¹à¸«à¸¥à¸·à¸ ",Math.max(0,Math.ceil((new Date(d.discordExpiresAt).getTime()-Date.now())/864e5))," วัà¸",d.balance>=d.discordCost&&e.jsx("button",{onClick:il,disabled:As,className:"ml-2 roun
9ded-lg border border-indigo-500/40 px-2 py-0.5 text-[11px] text-indigo-300 hover:bg-indigo-500/10 disabled:opacity-50",children:"+30 วัà¸"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{className:oe+" pr-11",type:ds?"text":"password",autoComplete:"off",placeholder:h!=null&&h.has_discord?`à¸à¸±à¸à¸à¸¶à¸à¹à¸§à¹à¹à¸¥à¹à¸§ (${h.discord_webhook_masked}) â à¹à¸§à¹à¸à¸§à¹à¸²à¸à¸à¹à¸²à¹à¸¡à¹à¹à¸à¸¥à¸µà¹à¸¢à¸`:"https://discord.com/api/webhooks/â¦",value:Rt,onChange:t=>Fa(t.target.value)}),e.jsx("button",{type:"button",onClick:()=>jn(t=>!t),"aria-label":ds?"à¸à¹à¸à¸ webhook":"à¹à¸ªà¸à¸ webhook",className:"absolute right-1.5 top-1/2 -translate-y-1/2 rounded-md p-1.5 text-slate-400 transition hover:text-indigo-300",children:e.jsx(Ks,{off:ds})})]}),(h==null?void 0:h.has_discord)&&!Rt.trim()&&e.jsxs("p",{className:"mt-1 flex items-center gap-1 text-xs text-emerald-400",children:["â à¸à¸±à¸à¸à¸¶à¸ Webhook à¹à¸§à¹à¹à¸¥à¹à¸§ (",h.discord_webhook_masked,") â à¹à¸§à¹à¸à¸à¹à¸à¸à¸à¸µà¹à¸§à¹à¸²à¸à¹à¸à¹"]}),Pt&&e.jsx("p",{className:"text-xs text-slate-300",children:Pt}),e.jsxs("div",{className:"mt-2 rounded-xl border border-white/10 bg-white/[0.02] p-3.5",children:[e.jsxs("p",{className:"flex items-center gap-2 text-sm font-semibold text-slate-200",children:["ð Ping @role à¸à¸à¸à¸ªà¸±à¸à¸à¸²à¸à¸¡à¸±à¹à¸à¹à¸à¸ªà¸¹à¸ ",e.jsx("span",{className:"text-xs font-normal text-slate-500",children:"(à¹à¸¡à¹à¸à¸±à¸à¸à¸±à¸)"})]}),e.jsxs("p",{className:"mt-1 text-xs leading-relaxed text-slate-500",children:["à¹à¸ªà¹ ",e.jsx("span",{className:"text-slate-300",children:"Role ID"})," à¹à¸à¸·à¹à¸à¹à¸«à¹à¸à¸à¸à¹à¸à¹à¸à¹à¸à¸·à¸à¸à¸ªà¸¡à¸²à¸à¸´à¸à¸à¸µà¹à¸¡à¸µ role à¸à¸±à¹à¸à¹à¸¡à¸·à¹à¸à¸à¸§à¸²à¸¡à¸¡à¸±à¹à¸à¹à¸ ⥠à¹à¸à¸à¸à¹ â วิà¸à¸µà¹à¸à¸² ID: à¹à¸à¸´à¸ ",e.jsx("span",{className:"text-slate-300",children:"User Settings â Advanced â Developer Mode"})," à¹à¸¥à¹à¸§à¸à¸¥à¸´à¸à¸à¸§à¸²à¸à¸µà¹ role â ",e.jsx("span",{className:"text-slate-300",children:"Copy Role ID"})," (à¹à¸§à¹à¸à¸§à¹à¸²à¸ = à¹à¸¡à¹ ping)"]}),e.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[e.jsx("input",{className:oe+" flex-1 min-w-[180px]",inputMode:"numeric",placeholder:"Role ID à¹à¸à¹à¸ 123456789012345678",value:Ua,onChange:t=>Ia(t.target.value.replace(/[^0-9]/g,""))}),e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-slate-400",children:[e.jsx("span",{children:"ping à¹à¸¡à¸·à¹à¸ â¥"}),e.jsx("input",{type:"number",min:50,max:95,className:oe+" w-16 text-center",value:Oa,onChange:t=>Ba(Number(t.target.value)||85)}),e.jsx("span",{children:"%"})]})]})]}),e.jsxs("div",{className:"mt-2 rounded-xl border border-white/10 bg-white/[0.02] p-3.5",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("p",{className:"flex items-center gap-2 text-sm font-semibold text-slate-200",children:["ðï¸ à¹à¸¢à¸à¸«à¹à¸à¸à¸à¸²à¸¡à¸«à¸¡à¸§à¸ ",e.jsx("span",{className:"text-xs font-normal text-slate-500",children:"(มีหลายà¸à¸¥à¸¸à¹à¸¡)"})]}),e.jsx("button",{type:"button",onClick:Gn,className:"shrink-0 rounded-lg border border-indigo-500/40 px-2.5 py-1 text-xs font-medium text-indigo-300 hover:bg-indigo-500/10",children:"â à¹à¸à¸´à¹à¸¡à¸«à¹à¸à¸"})]}),e.jsxs("p",{className:"mt-1 text-xs leading-relaxed text-slate-500",children:["à¹à¸ªà¹ Webhook à¹à¸¢à¸à¹à¸à¹à¸¥à¸°à¸«à¹à¸à¸ à¹à¸¥à¹à¸§à¹à¸¥à¸·à¸à¸à¸«à¸¡à¸§à¸à¸à¸µà¹à¸«à¹à¸à¸à¸à¸±à¹à¸à¸à¸°à¸£à¸±à¸ (à¹à¸à¹à¸ Crypto à¹à¸à¹à¸²à¸«à¹à¸à¸à¸«à¸à¸¶à¹à¸ · Forex à¸à¸µà¸à¸«à¹à¸à¸) â à¹à¸¥à¸·à¸à¸ âà¸à¹à¸²à¸§â สำหรัà¸à¸«à¹à¸à¸à¸£à¸±à¸à¸à¹à¸²à¸§/à¸à¸à¸´à¸à¸´à¸",rt.length>0&&e.jsx("span",{className:"text-amber-300/80",children:" · à¹à¸¡à¸·à¹à¸à¸¡à¸µà¸«à¹à¸à¸à¸à¹à¸²à¸à¸¥à¹à¸²à¸ ระà¸à¸à¸à¸°à¹à¸à¹à¸«à¹à¸à¸à¹à¸«à¸¥à¹à¸²à¸à¸µà¹à¹à¸à¸ Webhook à¹à¸à¸µà¹à¸¢à¸§à¸à¹à¸²à¸à¸à¸"})]}),rt.length===0?e.jsx("p",{className:"mt-3 rounded-lg border border-dashed border-white/10 px-3 py-4 text-center text-xs text-slate-500",children:"ยัà¸à¹à¸¡à¹à¸¡à¸µà¸«à¹à¸à¸à¹à¸¢à¸ â à¹à¸à¹ Webhook à¹à¸à¸µà¹à¸¢à¸§à¸à¹à¸²à¸à¸à¸ หรืà¸à¸à¸ âà¹à¸à¸´à¹à¸¡à¸«à¹à¸à¸â à¹à¸à¸·à¹à¸à¹à¸¢à¸à¸ªà¹à¸à¸à¸²à¸¡à¸«à¸¡à¸§à¸"}):e.jsx("div",{className:"mt-3 space-y-3",children:rt.map(t=>e.jsxs("div",{className:"rounded-xl border border-white/10 bg-slate-950/40 p-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{className:oe+" flex-1",placeholder:"à¸à¸·à¹à¸à¸«à¹à¸à¸ à¹à¸à¹à¸ Crypto / Forex / à¸à¹à¸²à¸§",value:t.label,onChange:s=>Jt(t.id,{label:s.target.value})}),e.jsxs("label",{className:"flex shrink-0 items-center gap-1.5 text-xs text-slate-400",children:[e.jsx("input",{type:"checkbox",checked:t.enabled,onChange:s=>Jt(t.id,{enabled:s.target.checked}),className:"accent-indigo-500"})," à¹à¸à¸´à¸"]}),e.jsx("button",{type:"button",onClick:()=>zn(t.id),"aria-label":"ลà¸à¸«à¹à¸à¸",className:"shrink-0 rounded-md px-2 py-1 text-xs text-rose-400/70 hover:bg-rose-500/10 hover:text-rose-300",children:"â"})]}),e.jsx("input",{className:oe+" mt-2",type:"text",autoComplete:"off",placeholder:t.webhook_set?`à¸à¸±à¸à¸à¸¶à¸à¹à¸§à¹à¹à¸¥à¹à¸§ (${t.webhook_masked}) â à¹à¸§à¹à¸à¸§à¹à¸²à¸à¸à¹à¸²à¹à¸¡à¹à¹à¸à¸¥à¸µà¹à¸¢à¸`:"https://discord.com/api/webhooks/â¦",value:t.webhook,onChange:s=>Jt(t.id,{webhook:s.target.value})}),(()=>{const s=Ft[t.id];if(!s||!s.last_ok_at&&!s.last_fail_at)return t.kind==="footprint"||!t.webhook_set?null:e.jsx("p",{className:"mt-1.5 text-[11px] text-slate-500",children:"⪠ยัà¸à¹à¸¡à¹à¸¡à¸µà¸à¸²à¸£à¸ªà¹à¸à¹à¸à¹à¸²à¸«à¹à¸à¸à¸à¸µà¹"});const l=m=>
9m?new Date(m).toLocaleString("th-TH",{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit",timeZone:be}):"â";return s.dead?e.jsxs("p",{className:"mt-1.5 rounded-md border border-rose-500/30 bg-rose-500/10 px-2 py-1 text-[11px] text-rose-300",children:["ð´ สà¹à¸à¹à¸¡à¹à¸à¸à¸ · ลà¹à¸¡ ",s.fail_streak.toLocaleString()," à¸à¸£à¸±à¹à¸à¸à¸´à¸ (ลà¹à¸²à¸ªà¸¸à¸ ",l(s.last_fail_at),") · ",ss(s.last_error)," â วาภWebhook à¹à¸«à¸¡à¹à¸à¹à¸²à¸à¸à¸à¹à¸¥à¹à¸§à¸à¸±à¸à¸à¸¶à¸"]}):s.fail_streak>0?e.jsxs("p",{className:"mt-1.5 text-[11px] text-amber-300",children:["ð¡ ลà¹à¸¡ ",s.fail_streak," à¸à¸£à¸±à¹à¸à¸¥à¹à¸²à¸ªà¸¸à¸ (",ss(s.last_error),") · สà¹à¸à¸ªà¸³à¹à¸£à¹à¸à¸¥à¹à¸²à¸ªà¸¸à¸ ",l(s.last_ok_at)]}):e.jsxs("p",{className:"mt-1.5 text-[11px] text-emerald-400/80",children:["ð¢ สà¹à¸à¸¥à¹à¸²à¸ªà¸¸à¸ ",l(s.last_ok_at)]})})(),e.jsx("div",{className:"mt-2 flex items-center gap-1.5",children:["signals","news","footprint"].map(s=>e.jsx("button",{type:"button",onClick:()=>Jt(t.id,{kind:s}),className:`rounded-lg px-2.5 py-1 text-xs font-medium ${t.kind===s?"bg-indigo-500/15 text-indigo-300 ring-1 ring-indigo-500/40":"text-slate-400 hover:bg-white/5"}`,children:s==="signals"?"ð à¸à¸´à¸à¹à¸à¸¥":s==="news"?"ð° à¸à¹à¸²à¸§/à¸à¸à¸´à¸à¸´à¸":"𧪠Footprint"},s))}),t.kind==="footprint"&&e.jsx("p",{className:"mt-1.5 text-[11px] text-amber-300/70",children:"หà¹à¸à¸à¸à¸µà¹à¸£à¸±à¸à¸ªà¸±à¸à¸à¸²à¸ Footprint Lab (Add-On) â à¸à¹à¸à¸à¹à¸à¸´à¸à¸£à¸±à¸à¹à¸à¸«à¸à¹à¸² âภาà¸à¸£à¸§à¸¡â à¸à¹à¸§à¸¢"}),t.kind==="signals"&&e.jsxs("div",{className:"mt-2",children:[e.jsxs("p",{className:"text-[11px] text-slate-500",children:["หมวà¸à¸à¸µà¹à¸«à¹à¸à¸à¸à¸µà¹à¸£à¸±à¸ ",e.jsx("span",{className:"text-slate-600",children:"(à¹à¸¡à¹à¹à¸¥à¸·à¸à¸ = à¸à¸¸à¸à¸«à¸¡à¸§à¸)"})]}),e.jsx("div",{className:"mt-1 flex flex-wrap gap-1.5",children:ci.map(s=>e.jsx("button",{type:"button",onClick:()=>Vn(t.id,s),className:`rounded-md border px-2 py-1 text-[11px] ${t.groups.includes(s)?"border-cyan-500 bg-cyan-500/10 text-cyan-300":"border-white/10 text-slate-400 hover:bg-white/5"}`,children:s},s))})]})]},t.id))})]})]})]})]}),vl]}),c==="signals"&&e.jsxs("div",{className:"space-y-5",children:[e.jsxs("section",{className:q,children:[e.jsxs("h2",{className:"mb-4 flex items-center gap-2 text-base font-semibold",children:[e.jsx("span",{className:"grid h-6 w-6 place-items-center rounded-lg bg-cyan-500/15 text-xs text-cyan-400",children:"2"})," à¸à¸²à¸£à¸ªà¹à¸à¸ªà¸±à¸à¸à¸²à¸"]}),e.jsxs("div",{className:"mb-5",children:[e.jsxs("p",{className:$e,children:["สิà¸à¸à¸£à¸±à¸à¸¢à¹à¸à¸µà¹à¸à¸°à¸ªà¹à¸ ",e.jsx("span",{className:"text-slate-500",children:"(à¹à¸¡à¹à¹à¸¥à¸·à¸à¸ = สà¹à¸à¸à¸¸à¸à¸à¸±à¸§)"})]}),e.jsxs("div",{className:"relative mt-1",children:[e.jsx("input",{className:oe,placeholder:"à¸à¹à¸à¸«à¸²/à¸à¸´à¸¡à¸à¹à¸ªà¸´à¸à¸à¸£à¸±à¸à¸¢à¹ à¹à¸à¹à¸ BTC, XAU, EURUSD à¹à¸¥à¹à¸§à¸à¸ Enter",value:at,onChange:t=>aa(t.target.value),onKeyDown:t=>{t.key==="Enter"&&at.trim()&&(t.preventDefault(),Os(at))}}),at&&xl.length>0&&e.jsx("div",{className:"absolute z-10 mt-1 w-full overflow-hidden rounded-xl border border-white/10 bg-slate-900 shadow-xl",children:xl.map(t=>e.jsxs("button",{onClick:()=>Os(t),className:"flex w-full items-center justify-between px-3.5 py-2 text-left text-sm hover:bg-white/5",children:[e.jsxs("span",{children:[t,ve(t)&&e.jsxs("span",{className:"ml-1.5 text-slate-400",children:["· ",ve(t)]}),!en.has(t)&&e.jsx("span",{className:"ml-1 text-amber-500/70",children:"*"})]}),e.jsx("span",{className:"text-xs text-slate-500",children:pi(t)})]},t))})]}),e.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[me.length===0?e.jsx("span",{className:"rounded-lg border border-emerald-500/30 bg-emerald-500/10 px-3 py-1.5 text-xs text-emerald-300",children:"สà¹à¸à¸à¸¸à¸à¸ªà¸´à¸à¸à¸£à¸±à¸à¸¢à¹"}):me.map(t=>e.jsxs("span",{title:ve(t),className:"flex items-center gap-1.5 rounded-lg border border-cyan-500/30 bg-cyan-500/10 px-3 py-1.5 text-xs text-cyan-200",children:[t,!en.has(t)&&e.jsx("span",{className:"text-amber-400/80",children:"*"}),e.jsx("button",{onClick:()=>dl(t),className:"text-cyan-400/60 hover:text-cyan-200",children:"â"})]},t)),me.length>0&&e.jsx("button",{onClick:()=>dt([]),className:"rounded-lg px-2 py-1.5 text-xs text-slate-400 hover:text-slate-200",children:"ลà¹à¸²à¸à¸à¸±à¹à¸à¸«à¸¡à¸"})]}),e.jsx("div",{className:"mt-3 space-y-1.5",children:yt.map(t=>e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[e.jsx("span",{className:"w-14 text-[11px] text-slate-500",children:t.group}),t.symbols.map(s=>e.jsxs("button",{title:ve(s),onClick:()=>me.includes(s)?dl(s):Os(s),className:`rounded-md border px-2 py-1 text-[11px] ${me.includes(s)?"border-cyan-500 bg-cyan-500/10 text-cyan-300":"border-white/10 text-slate-400 hover:bg-white/5"}`,children:[s,ve(s)&&e.jsxs("span",{className:"ml-1 opacity-60",children:["· ",ve(s)]})]},s))]},t.group))}),e.jsx(di,{assets:me,onSet:t=>dt(t)})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:$e,children:"à¸à¸§à¸²à¸¡à¸à¸µà¹à¸à¸²à¸£à¸ªà¹à¸"}),e.jsxs("select",{className:oe+" mt-1",value:hl?Xe:"custom",onChange:t=>{t.target.value!=="custom"&&ps(Number(t.target.value))},children:[Js.map(t=>e.jsx("option",{value:t.value,children:t.label},t.value)),e.jsx("option",{value:"custom",children:"à¸à¸³à¸«à¸à¸à¹à¸à¸â¦"})]}),!hl&&e.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[e.jsx("input",{className:oe,type:"number",min:1,value:Xe,onChange:t=>ps(Number(t.target.value))}),e.jsx("span",{className:"text-xs text-slate-400",children:"à¸à¸²à¸à¸µ"})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:$e,children:"à¹à¸à¸à¹à¸§à¸¥à¸² (Timezone)"}),e.jsx("select",{className:oe+" mt-1",value:be,onChange:t=>ra(t.target.value),children:hi.map(t=>e.jsx("option",{value:t.value,children:t.label},t.value))})]}),e.jsxs("div",{children:[e.jsxs("p",{className:$e,children:["à¸à¸£à¸à¸à¸à¹à¸§à¸¢à¸à¸°à¹à¸à¸à¸à¸§à¸²à¸¡à¸¡à¸±à¹à¸à¹à¸: ",e.jsxs("span",{className:"text-slate-200",children:["⥠",xt,"%"]}),e.jsxs("span",{className:"ml-1 font-normal text-slate-500",children:["â à¸à¸±à¸§à¸à¸£à¸±à¸",e.jsx("b",{className:"text-slate-400",children:"à¸à¸£à¸´à¸¡à¸²à¸"})," à¹à¸¡à¹à¹à¸à¹à¸à¸¸à¸à¸ าà¸"]})]}),e.jsx("input",{type:"range",min:70,max:95,value:xt,onChange:t=>la(Number(t.target.value)),className:"mt-2 w-full accent-cyan-500","aria-describedby":"
9conf-evidence"}),e.jsxs("div",{id:"conf-evidence",className:"mt-1.5 rounded border border-slate-700/60 bg-slate-900/40 px-2 py-1.5",children:[e.jsxs("p",{className:"text-[10px] leading-relaxed text-slate-400",children:["วัà¸à¸à¸£à¸´à¸ 6,843 à¸à¸¸à¸à¸ªà¸±à¸à¸à¸²à¸ â ",e.jsx("b",{className:"text-amber-300",children:"à¸à¸°à¹à¸à¸à¸¢à¸´à¹à¸à¸ªà¸¹à¸ à¸à¸¥à¸¢à¸´à¹à¸à¹à¸¢à¹"})," à¹à¸¡à¹à¹à¸à¹à¸¢à¸´à¹à¸à¸à¸µ:"]}),e.jsx("div",{className:"mt-1 grid grid-cols-4 gap-1 text-center text-[10px] tabular-nums",children:[{b:"70â75",w:"59.6%",r:"â0.006"},{b:"76â83",w:"56.1%",r:"â0.065"},{b:"84â92",w:"54.5%",r:"â0.092"},{b:"93â99",w:"57.1%",r:"â0.048"}].map(t=>e.jsxs("div",{className:"rounded bg-slate-950/60 px-1 py-0.5",children:[e.jsx("div",{className:"text-slate-500",children:t.b}),e.jsx("div",{className:"text-slate-300",children:t.w}),e.jsxs("div",{className:"text-rose-300",children:[t.r,"R"]})]},t.b))}),e.jsxs("p",{className:"mt-1 text-[10px] leading-relaxed text-slate-500",children:["à¹à¸¥à¸·à¹à¸à¸à¸à¸¶à¹à¸à¹à¸à¸·à¹à¸",e.jsx("b",{className:"text-slate-400",children:"รัà¸à¸à¹à¸à¸¢à¸¥à¸"}),"à¹à¸à¹ à¹à¸à¹à¸à¸¢à¹à¸²à¹à¸¥à¸·à¹à¸à¸à¸à¸¶à¹à¸à¹à¸à¸£à¸²à¸°à¸à¸´à¸à¸§à¹à¸²à¸à¸°à¹à¸à¹à¹à¸¡à¹à¸à¸µà¹à¸à¸µà¸à¸¶à¹à¸ à¸à¹à¸²à¸à¸°à¸à¸±à¸à¸à¸£à¸´à¸ à¹à¸«à¹à¸à¸±à¸à¸à¸µà¹",e.jsx("b",{className:"text-slate-400",children:"à¸à¸¹à¹à¹à¸à¸´à¸"}),"à¸à¸²à¸¡à¸à¹à¸à¸à¸¸à¸à¸à¸à¸à¹à¸à¸£à¸à¸à¸¸à¸"]})]})]}),e.jsxs("div",{children:[e.jsxs("p",{className:$e,children:["à¸à¸§à¸²à¸¡à¹à¸ªà¸µà¹à¸¢à¸à¸à¹à¸à¹à¸¡à¹ (à¹à¸ªà¸à¸à¹à¸à¸à¹à¸à¸à¸§à¸²à¸¡): ",e.jsxs("span",{className:"text-slate-200",children:[mt,"%"]})]}),e.jsx("input",{type:"range",min:.25,max:5,step:.25,value:mt,onChange:t=>na(Number(t.target.value)),className:"mt-2 w-full accent-cyan-500"})]})]}),e.jsxs("div",{className:"mt-4 flex flex-wrap gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2.5 rounded-xl border border-white/10 px-3.5 py-2.5",children:[e.jsx(de,{on:hs,onChange:da}),e.jsx("span",{className:"text-sm text-slate-300",children:"à¹à¸à¸à¸à¸²à¸£à¹à¸à¸£à¸¹à¸"})]}),e.jsxs("div",{className:"flex items-center gap-2.5 rounded-xl border border-white/10 px-3.5 py-2.5",children:[e.jsx(de,{on:kt,onChange:ia}),e.jsx("span",{className:"text-sm text-slate-300",children:"à¹à¸à¹à¸à¸à¸¥ Win/Loss"})]}),e.jsxs("div",{className:"flex items-center gap-2.5 rounded-xl border border-white/10 px-3.5 py-2.5",children:[e.jsx(de,{on:xa,onChange:ma}),e.jsx("span",{className:"text-sm text-slate-300",children:"à¹à¸à¹à¸à¸à¹à¸²à¸§ Economic Calendar ð "})]}),e.jsxs("div",{className:"flex items-center gap-2.5 rounded-xl border border-white/10 px-3.5 py-2.5",title:"สà¹à¸à¸à¹à¸à¸à¸§à¸²à¸¡ SMC Trend + Price Action หลายà¹à¸à¸¡à¹à¹à¸à¸£à¸¡ (M15/H1/H4/D1) à¸à¸à¸à¹à¸à¹à¸ªà¸±à¸à¸à¸²à¸à¹à¸à¹à¸¥à¸°à¸à¸±à¸",children:[e.jsx(de,{on:wa,onChange:va}),e.jsx("span",{className:"text-sm text-slate-300",children:"à¹à¸à¸ SMC/PA หลายà¹à¸à¸¡à¹à¹à¸à¸£à¸¡ ð§"})]}),e.jsxs("div",{className:"flex items-center gap-2.5 rounded-xl border border-white/10 px-3.5 py-2.5",title:"à¹à¸¡à¸·à¹à¸à¸¡à¸µà¸à¹à¸²à¸§à¹à¸£à¸à¸ ายà¹à¸ 4 à¸à¸±à¹à¸§à¹à¸¡à¸à¸à¹à¸²à¸à¸«à¸à¹à¸²à¸à¸µà¹à¹à¸à¸µà¹à¸¢à¸§à¸à¸±à¸à¸à¸¹à¹à¸à¸±à¹à¸ à¸à¸°à¹à¸à¸´à¹à¸¡à¸à¸£à¸£à¸à¸±à¸à¹à¸à¸·à¸à¸à¹à¸à¹à¸ªà¸±à¸à¸à¸²à¸ วà¹à¸²à¹à¸«à¹à¸à¸à¹à¸à¹à¸²à¹à¸¡à¹ 15 à¸à¸²à¸à¸µà¸à¹à¸à¸âหลัà¸à¸à¹à¸²à¸§ (à¹à¸¡à¹à¹à¸à¹à¸à¸¥à¹à¸à¸à¸ªà¸±à¸à¸à¸²à¸)",children:[e.jsx(de,{on:ja,onChange:Na}),e.jsx("span",{className:"text-sm text-slate-300",children:"à¹à¸à¸·à¸à¸à¸à¹à¸§à¸à¸à¹à¸²à¸§à¹à¸£à¸à¹à¸à¹à¸ªà¸±à¸à¸à¸²à¸ â ï¸"})]})]}),e.jsxs("div",{className:"mt-4 rounded-xl border border-white/10 p-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsx("p",{className:"text-sm font-medium text-slate-200",children:"à¸à¹à¸à¸à¸§à¸²à¸¡à¸à¹à¸²à¸¢à¹à¸à¸ªà¸à¹à¸à¸à¸à¸à¸¸à¸ âï¸"}),e.jsxs("span",{className:`text-xs ${At.length>300?"text-rose-400":"text-slate-500"}`,children:[At.length,"/300"]})]}),e.jsxs("p",{className:"mb-2.5 text-xs leading-relaxed text-slate-500",children:["à¸à¹à¸à¸à¸§à¸²à¸¡à¸à¸µà¹à¸à¸°à¸à¹à¸à¸à¹à¸²à¸¢à¸à¸¸à¸à¹à¸à¸ªà¸à¹ (สัà¸à¸à¸²à¸ · à¸à¹à¸²à¸§ · à¸à¸à¸´à¸à¸´à¸ · à¸à¹à¸²à¸§à¹à¸à¹à¸²) à¹à¸«à¸à¸·à¸à¸à¸£à¸£à¸à¸±à¸à¹à¸à¸£à¸à¸à¹ â à¹à¸ªà¹à¸à¸·à¹à¸à¸à¸¥à¸¸à¹à¸¡ ลิà¸à¸à¹à¸à¸´à¸à¸à¹à¸ หรืà¸à¹à¸à¸·à¹à¸à¸à¹à¸à¸à¸à¸à¸à¸¸à¸à¹à¸à¹"," · ","ลิà¸à¸à¹à¸à¸µà¹à¸à¸´à¸¡à¸à¹à¹à¸à¹à¸à¸à¹à¸à¸à¸§à¸²à¸¡à¸à¸£à¸£à¸¡à¸à¸²à¸à¸°à¸à¸à¹à¸à¹à¹à¸à¸"," · ","ระà¸à¸à¸à¸±à¸à¹à¸à¹à¸ HTML à¸à¸à¸à¹à¸à¸·à¹à¸à¹à¸¡à¹à¹à¸«à¹ Telegram à¸à¸à¸´à¹à¸ªà¸à¸à¹à¸à¸à¸§à¸²à¸¡à¸à¸±à¹à¸à¹à¸à¸ªà¸à¹"]}),e.jsx("textarea",{value:At,onChange:t=>ya(t.target.value.slice(0,300)),rows:3,placeholder:`à¸à¸±à¸§à¸à¸¢à¹à¸²à¸: 10สà¸à¸à¸à¸²à¸¡/สมัà¸à¸£à¸ªà¸¡à¸²à¸à¸´à¸ â @yourname 11à¸à¸¥à¸¸à¹à¸¡à¸à¸µà¹à¹à¸à¹à¸à¸à¹à¸à¸¡à¸¹à¸¥à¸à¸£à¸°à¸à¸à¸à¸à¸²à¸£à¸à¸±à¸à¸ªà¸´à¸à¹à¸ à¹à¸¡à¹à¹à¸à¹à¸à¸³à¹à¸à¸°à¸à¸³à¸à¸²à¸£à¸¥à¸à¸à¸¸à¸`,className:"w-full resize-y rounded-xl border border-white/10 bg-black/30 px-3 py-2 text-sm text-slate-200 placeholder:text-slate-600 focus:border-cyan-500/60 focus:outline-none"}),e.jsxs("p",{className:"mt-2 text-[11px] leading-relaxed text-slate-600",children:["หมายà¹à¸«à¸à¸¸: à¸à¸£à¸£à¸à¸±à¸ âAlpha AI Signalsâ ยัà¸à¸à¸¢à¸¹à¹à¸à¹à¸²à¸à¸¥à¹à¸²à¸à¹à¸ªà¸¡à¸ à¹à¸¥à¸°à¸à¸²à¸£à¹à¸à¸£à¸¹à¸à¸¢à¸±à¸à¸¡à¸µà¹à¸¥à¹à¸à¹à¸à¸à¸à¸£à¸°à¸à¸ â à¸à¹à¸à¸à¸§à¸²à¸¡à¸à¸à¸à¸à¸¸à¸à¹à¸à¹à¸à¸ªà¹à¸§à¸",e.
11jsx("span",{className:"text-slate-400",children:"à¹à¸à¸´à¹à¸¡"})," à¹à¸¡à¹à¹à¸à¹à¸à¸²à¸£à¹à¸à¸¥à¸µà¹à¸¢à¸à¹à¸à¸£à¸à¸à¹"]})]}),e.jsxs("div",{className:"mt-3 flex items-start gap-3 rounded-xl border border-white/10 bg-white/[0.02] px-3.5 py-3",children:[e.jsx(de,{on:oa,onChange:ca}),e.jsxs("div",{className:"text-sm",children:[e.jsx("p",{className:"text-slate-200",children:"à¹à¸¢à¸à¸ªà¸£à¸¸à¸à¸à¸¥à¸à¸²à¸¡à¸«à¸¡à¸§à¸ ðï¸"}),e.jsxs("p",{className:"mt-0.5 text-xs leading-relaxed text-slate-500",children:["สรุà¸à¸à¸¥à¸£à¸²à¸¢à¸§à¸±à¸/รายสัà¸à¸à¸²à¸«à¹à¸à¸°à¹à¸¢à¸à¹à¸à¹à¸à¸à¸²à¸£à¹à¸à¸à¹à¸à¸«à¸¡à¸§à¸ (à¸à¸£à¸´à¸à¹à¸ · à¸à¸à¹à¸£à¹à¸à¸à¹ · à¹à¸¥à¸«à¸° · à¸à¸±à¸à¸à¸µ · หุà¹à¸) à¹à¸à¸à¸à¸²à¸£à¸£à¸§à¸¡à¹à¸à¹à¸à¸µà¸¢à¸§"," · ","à¸à¸±à¹à¸ Discord สà¹à¸à¹à¸à¹à¸²à¸«à¹à¸à¸à¸ªà¸±à¸à¸à¸²à¸à¸à¸²à¸¡à¸«à¸¡à¸§à¸à¸à¸à¸à¹à¸à¹à¸¥à¸°à¸«à¹à¸à¸à¹à¸«à¹à¸à¸±à¸à¹à¸à¸¡à¸±à¸à¸´"," · ","à¸à¸³à¸à¸²à¸à¹à¸¡à¸·à¹à¸à¹à¸à¸´à¸ âà¹à¸à¹à¸à¸à¸¥ Win/Lossâ"]})]})]}),e.jsx("div",{className:"mt-3 rounded-xl border border-white/10 bg-white/[0.02] px-3.5 py-3",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(de,{on:us,onChange:_a}),e.jsxs("div",{className:"min-w-0 flex-1 text-sm",children:[e.jsxs("p",{className:"text-slate-200",children:["สัà¸à¸à¸²à¸ Swing High/Low · à¸à¸à¹à¸à¸à¸£à¹à¸à¸±à¹à¸à¸£à¸ ðª¤",e.jsx("span",{className:"ml-1.5 rounded-md border border-amber-500/40 bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-300 align-middle",children:"Beta"})]}),e.jsxs("p",{className:"mt-0.5 text-xs leading-relaxed text-slate-500",children:["à¹à¸¡à¸·à¹à¸à¹à¸à¸´à¸ Swing High/Low à¹à¸«à¸¡à¹ (fractal 5 à¹à¸à¹à¸ ยืà¸à¸¢à¸±à¸à¸«à¸¥à¸±à¸à¹à¸à¹à¸à¸à¸´à¸) ระà¸à¸à¸à¸°à¸ªà¹à¸à¸£à¸°à¸à¸±à¸à¸£à¸²à¸à¸² + à¹à¸à¸à¸à¸±à¹à¸à¸à¸à¹à¸à¸à¸£à¹à¸£à¸à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡"," · ","à¹à¸à¹à¸à¸¸à¸à¸ªà¸´à¸à¸à¸£à¸±à¸à¸¢à¹à¹à¸à¸µà¸¢à¸§à¸à¸±à¸à¸à¸µà¹à¹à¸¥à¸·à¸à¸à¸à¹à¸²à¸à¸à¸"," · ","à¹à¸£à¸´à¹à¸¡à¸ªà¹à¸à¹à¸¡à¸·à¹à¸à¹à¸à¸´à¸ Swing à¹à¸«à¸¡à¹à¸à¸±à¸§à¹à¸£à¸à¸«à¸¥à¸±à¸à¹à¸à¸´à¸à¹à¸à¹"]}),us&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mt-3",children:[e.jsx("p",{className:"text-xs text-slate-400",children:"à¹à¸«à¸¡à¸à¸à¸²à¸£à¸à¸±à¸ â ระà¸à¸±à¸à¹à¸à¸µà¸¢à¸§à¸à¸±à¸à¹à¸à¹à¹à¸à¸£à¸à¸à¸à¸¥à¸°à¸à¸´à¸¨ à¹à¸¥à¸·à¸à¸à¸à¸²à¸¡à¸ªà¹à¸à¸¥à¹à¸à¸à¸à¸à¸¸à¸"}),e.jsx("div",{className:"mt-1.5 flex flex-wrap gap-2",children:[{v:"fade",label:"𪤠à¸à¸±à¸à¸à¸¥à¸±à¸à¸à¸±à¸§ (Fade)",hint:"Sell Limit @ Swing High · Buy Limit @ Swing Low"},{v:"breakout",label:"ð à¸à¸²à¸¡à¸à¸°à¸¥à¸¸ (Breakout)",hint:"Buy Stop @ Swing High · Sell Stop @ Swing Low"},{v:"both",label:"ð¦ สà¹à¸à¸à¸±à¹à¸à¸ªà¸à¸à¹à¸à¸",hint:"สà¸à¸à¹à¸à¸à¹à¸à¸à¹à¸à¸à¸§à¸²à¸¡à¹à¸à¸µà¸¢à¸§"}].map(t=>e.jsx("button",{onClick:()=>ka(t.v),title:t.hint,className:`rounded-lg border px-2.5 py-1.5 text-xs ${Dt===t.v?"border-cyan-500 bg-cyan-500/10 text-cyan-300":"border-white/10 text-slate-400 hover:bg-white/5"}`,children:t.label},t.v))}),e.jsx("p",{className:"mt-1 text-[11px] text-slate-600",children:Dt==="fade"?"Sell Limit à¸à¸±à¸à¸à¸µà¹ Swing High · Buy Limit à¸à¸±à¸à¸à¸µà¹ Swing Low":Dt==="breakout"?"Buy Stop รà¸à¸à¸°à¸¥à¸¸ Swing High · Sell Stop รà¸à¸«à¸¥à¸¸à¸ Swing Low":"สà¹à¸à¸à¸±à¹à¸à¹à¸à¸à¸à¸±à¸à¸à¸¥à¸±à¸à¸à¸±à¸§ (Limit) à¹à¸¥à¸°à¹à¸à¸à¸à¸²à¸¡à¸à¸°à¸¥à¸¸ (Stop) à¸à¸à¸à¸£à¸°à¸à¸±à¸à¹à¸à¸µà¸¢à¸§à¸à¸±à¸à¹à¸à¸à¹à¸à¸à¸§à¸²à¸¡à¹à¸à¸µà¸¢à¸§"})]}),e.jsxs("div",{className:"mt-3",children:[e.jsx("p",{className:"text-xs text-slate-400",children:"à¹à¸à¸¡à¹à¹à¸à¸£à¸¡à¸à¸µà¹à¸à¸°à¸ªà¹à¸ (à¹à¸¥à¸·à¸à¸à¹à¸à¹à¸«à¸¥à¸²à¸¢à¸à¹à¸²)"}),e.jsx("div",{className:"mt-1.5 flex flex-wrap gap-2",children:[{v:"15m",l:"M15"},{v:"1h",l:"H1"},{v:"4h",l:"H4"},{v:"1d",l:"D1"}].map(t=>e.jsx("button",{onClick:()=>Sa(s=>s.includes(t.v)?s.length>1?s.filter(l=>l!==t.v):s:[...s,t.v]),className:`rounded-lg border px-3 py-1.5 text-xs ${bs.includes(t.v)?"border-cyan-500 bg-cyan-500/10 text-cyan-300":"border-white/10 text-slate-400 hover:bg-white/5"}`,children:t.l},t.v))}),bs.includes("15m")&&e.jsx("p",{className:"mt-1 text-[11px] text-amber-400/80",children:"M15 à¹à¸
11ิภSwing à¹à¸«à¸¡à¹à¸à¹à¸à¸¢ â à¸à¹à¸²à¹à¸¥à¸·à¸à¸à¸«à¸¥à¸²à¸¢à¸ªà¸´à¸à¸à¸£à¸±à¸à¸¢à¹ à¸à¹à¸à¸à¸§à¸²à¸¡à¸à¸°à¸à¸µà¹à¸à¸¶à¹à¸à¸¡à¸²à¸ à¹à¸à¸°à¸à¸³ H1/H4 à¹à¸à¹à¸à¸«à¸¥à¸±à¸"})]}),e.jsxs("p",{className:"mt-3 text-[11px] leading-relaxed text-slate-600",children:["𧪠Beta â à¹à¸à¸£à¸·à¹à¸à¸à¸¡à¸·à¸à¹à¸à¹à¸à¸£à¸°à¸à¸±à¸à¸£à¸²à¸à¸²à¸à¸²à¸¡à¹à¸«à¸¡à¸à¸à¸µà¹à¸à¸¸à¸à¸à¸±à¹à¸à¹à¸à¸ à¹à¸¡à¹à¹à¸à¹à¸à¸³à¸à¸³à¸à¸²à¸¢à¸à¸à¸ AI · à¸à¸à¹à¸à¸à¸£à¹à¸à¸±à¹à¸à¸£à¸à¸à¸²à¸à¹à¸¡à¹à¸à¸¹à¸ fill"," · ","ระà¸à¸à¸à¸´à¸à¸à¸²à¸¡à¸à¸¥à¹à¸à¸à¸£à¸¹à¹ fill: à¹à¸à¹à¸à¹à¸¡à¸·à¹à¸à¸£à¸²à¸à¸²à¹à¸à¸°à¸£à¸°à¸à¸±à¸ / à¸à¸¶à¸ TP1 / à¹à¸à¸ SL (à¸à¸²à¸¡à¸ªà¸§à¸´à¸à¸à¹ âà¹à¸à¹à¸à¸à¸¥ Win/Lossâ) à¸à¸£à¹à¸à¸¡à¸ªà¸£à¸¸à¸à¸£à¸²à¸¢à¸§à¸±à¸à¸à¸¹à¹à¸à¸±à¸ fill rate"," · ","à¸à¸¥à¸«à¸¡à¸§à¸à¸à¸µà¹à¹à¸¢à¸à¸à¸²à¸à¸ªà¸à¸´à¸à¸´à¹à¸¥à¸°à¸à¸±à¸à¸à¸±à¸à¸«à¸¥à¸±à¸à¹à¸ªà¸¡à¸"," · ","à¹à¸¡à¹à¹à¸à¹à¸à¸³à¹à¸à¸°à¸à¸³à¸à¸²à¸£à¸¥à¸à¸à¸¸à¸"]})]})]})]})}),e.jsx("div",{className:"mt-3 rounded-xl border border-white/10 bg-white/[0.02] px-3.5 py-3",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(de,{on:fs,onChange:Ca}),e.jsxs("div",{className:"min-w-0 flex-1 text-sm",children:[e.jsxs("p",{className:"text-slate-200",children:["สัà¸à¸à¸²à¸à¸¥à¹à¸²à¸ªà¸ าà¸à¸à¸¥à¹à¸à¸ · Liquidity Sweep ð§¹",e.jsx("span",{className:"ml-1.5 rounded-md border border-amber-500/40 bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-300",children:"Beta"})]}),e.jsxs("p",{className:"mt-0.5 text-xs leading-relaxed text-slate-500",children:["à¹à¸¡à¸·à¹à¸à¸£à¸²à¸à¸²à¸à¸§à¸²à¸à¸£à¸°à¸à¸±à¸à¸ªà¸ าà¸à¸à¸¥à¹à¸à¸ (swing à¹à¸à¸´à¸¡ หรืภEqual High/Low) à¹à¸¥à¹à¸§",e.jsx("span",{className:"text-slate-300",children:"à¸à¸´à¸à¸à¸¥à¸±à¸à¹à¸à¹à¸²à¸¡à¸²"})," ระà¸à¸à¸à¸°à¸ªà¹à¸à¸£à¸°à¸à¸±à¸à¸à¸µà¹à¸à¸¹à¸à¸à¸§à¸²à¸ à¸à¸¥à¸²à¸¢à¹à¸ªà¹ à¹à¸¥à¸°à¸£à¸²à¸à¸²à¸à¸´à¸à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡"," · ","à¹à¸à¹à¸à¸¸à¸à¸ªà¸´à¸à¸à¸£à¸±à¸à¸¢à¹à¹à¸à¸µà¸¢à¸§à¸à¸±à¸à¸à¸µà¹à¹à¸¥à¸·à¸à¸à¸à¹à¸²à¸à¸à¸"]}),fs&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mt-3",children:[e.jsx("p",{className:"text-xs text-slate-400",children:"à¹à¸à¸¡à¹à¹à¸à¸£à¸¡à¸à¸µà¹à¸à¸°à¸ªà¹à¸ (à¹à¸¥à¸·à¸à¸à¹à¸à¹à¸«à¸¥à¸²à¸¢à¸à¸±à¸)"}),e.jsx("div",{className:"mt-1.5 flex flex-wrap gap-2",children:[{v:"15m",l:"M15"},{v:"1h",l:"H1"},{v:"4h",l:"H4"},{v:"1d",l:"D1"}].map(t=>e.jsx("button",{onClick:()=>$a(s=>s.includes(t.v)?s.length>1?s.filter(l=>l!==t.v):s:[...s,t.v]),className:`rounded-lg border px-3 py-1.5 text-xs ${gs.includes(t.v)?"border-cyan-500 bg-cyan-500/10 text-cyan-300":"border-white/10 text-slate-400 hover:bg-white/5"}`,children:t.l},t.v))}),gs.includes("15m")&&e.jsx("p",{className:"mt-1 text-[11px] text-amber-400/80",children:"M15 à¹à¸à¸´à¸à¸à¸²à¸£à¸à¸§à¸²à¸à¸à¹à¸à¸¢à¸à¸§à¹à¸²à¸¡à¸²à¸ â à¸à¹à¸²à¹à¸¥à¸·à¸à¸à¹à¸§à¹ à¸à¸¥à¸¸à¹à¸¡à¸à¸°à¹à¸à¹à¸à¹à¸à¸à¸§à¸²à¸¡à¸à¸µà¹à¸à¸¶à¹à¸"})]}),e.jsxs("p",{className:"mt-3 text-[11px] leading-relaxed text-amber-400/80",children:["𧪠Beta â สà¸à¸´à¸à¸´à¸à¸à¸à¸ªà¸±à¸à¸à¸²à¸à¸à¸¥à¸¸à¹à¸¡à¸à¸µà¹à¸§à¸±à¸à¹à¸à¹ ",e.jsx("span",{className:"font-semibold",children:"59%"})," à¹à¸ 90 วัà¸à¸¥à¹à¸²à¸ªà¸¸à¸ à¸à¸à¸°à¸à¸µà¹à¸à¹à¸à¸à¸à¸à¸°à¹à¸à¸´à¸ ",e.jsx("span",{className:"font-semibold",children:"60%"})," à¸à¸¶à¸à¸à¸°à¸à¸¸à¹à¸¡à¸à¸¸à¸"," · ","à¸à¸±à¸§à¹à¸¥à¸à¸à¸µà¹à¸à¸´à¸à¹à¸à¹à¸à¸à¸¸à¸à¸à¹à¸à¸à¸§à¸²à¸¡à¸à¸µà¹à¸ªà¹à¸à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡"]}),e.jsxs("p",{className:"mt-1 text-[11px] leading-relaxed text-slate-600",children:["à¸à¹à¸à¸à¸§à¸²à¸¡à¸£à¸²à¸¢à¸à¸²à¸",e.jsx("span",{className:"text-slate-400",children:"à¹à¸«à¸à¸¸à¸à¸²à¸£à¸à¹à¸à¸µà¹à¹à¸à¸´à¸à¸à¸¶à¹à¸à¹à¸¥à¹à¸§"})," à¸à¸£à¹à¸à¸¡à¸à¸¸à¸à¸à¸µà¹à¸à¸·à¸à¸§à¹à¸²à¸à¸´à¸à¸à¸²à¸ (à¸à¸¥à¸²à¸¢à¹à¸ªà¹) à¹à¸¥à¸°à¸à¸²à¸£à¸²à¸à¸§à¹à¸²à¸à¹à¸²à¸à¸±à¹à¸à¹à¸à¹à¸²à¸à¸µà¹ R à¹à¸à¹à¸²à¹à¸£à¸à¹à¸à¸à¸à¸à¸°à¸à¸µà¹ % à¸à¸¶à¸à¸à¸¸à¹à¸¡à¸à¸¸à¸"," · ","ระà¸à¸à¹à¸¡à¹à¹à¸à¹à¸à¸±à¹à¸à¹à¸à¹à¸²à¹à¸«à¹ à¹à¸¥à¸°à¹à¸¡à¹à¹à¸à¹à¸à¸³à¸à¸²à¸¢à¸§à¹à¸²à¸£à¸²à¸à¸²à¸à¸°à¹à¸à¸à¸¶à¸à¹à¸«à¸"," · ","à¸à¸¥à¸«à¸¡à¸§à¸à¸à¸µà¹à¹à¸¢à¸à¸à¸²à¸à¸ªà¸à¸´à¸à¸´à¹à¸¥à¸°à¸à¸±à¸à¸à¸±à¸à¸«à¸¥à¸±à¸à¹à¸ªà¸¡à¸"]})]})]})]})}),(h==null?void 0:h.pa_alert_only)&&e.jsxs("div",{className:"mt-5 rounded-xl border border-emerald-500/30 bg-emerald-500/5 p-4","data-pa-alert-mode":!0,children:[e.jsx("p",{className:"text-sm font-medium text-emerald-300",children:"à¹à¸«à¸¡à¸à¹à¸à¹à¸à¹à¸à¸·à¸à¸ Price Action"}),e.jsxs("p",{className:"mb-3 mt-1 text-xs leading-relaxed text-slate-400",children:["à¸à¹à¸à¸à¸à¸µà¹à¸ªà¹à¸",e.jsx("span",{className:"text-slate-200",children:"à¹à¸à¸à¸²à¸°à¸à¸²à¸£à¹à¸à¹à¸à¹à¸à¸·à¸à¸à¸£à¸¹à¸à¹à¸à¸à¹à¸à¹à¸à¹à¸à¸µà¸¢à¸"})," â à¸à¸¸à¸à¸à¸£à¸±à¹à¸à¸à¸µà¹à¹à¸à¹à¸à¸à¸à¸à¹à¸à¸¡à¹à¹à¸à¸£à¸¡à¸à¸µà¹à¹à¸¥à¸·à¸à¸à¸à¸´à¸ ระà¸à¸à¸ªà¹à¸à¸à¸à¸¹à¹à¹à¸à¸´à¸à¹à¸à¸à¸à¸£à¹à¸à¹à¸¥à¸°à¹à¸à¹à¸à¸à¸¸à¸à¸à¸¹à¹à¸à¸µà¹à¹à¸à¸´à¸ pattern (à¹à¸¡à¹à¸ªà¹à¸à¸ªà¸±à¸à¸à¸²à¸ AI · à¸à¸±à¸§à¸à¸£à¸à¸à¸ªà¸±à¸à¸à¸²à¸à¸à¹à¸²à¸à¸¥à¹à¸²à¸à¹à¸¡à¹à¸¡à¸µà¸à¸¥à¸à¸±à¸à¸à¹à¸à¸à¸à¸µà¹) · à¹à¸¡à¹à¹à¸¥à¸·à¸à¸à¸à¸¹à¹ = 28 à¸à¸¹à¹ forex หลัภ· รà¸à¸à¸£à¸±à¸ M15 / H1 / H4 (D1 à¹à¸¡à¹à¹à¸à¹à¸)"]}),e.jsx(tn,{tfs:Lt,onTfs:ws,pattern:vs,onPattern:_s}),e.jsx("p",{className:"mt-2 text-[11px] text-slate-600",children:"à¹à¸à¹à¸à¸£à¸¹à¸à¹à¸à¸à¸à¸µà¹à¹à¸à¸´à¸à¸à¸¶à¹à¸à¹à¸¥à¹à¸§ à¹à¸¡à¹à¹à¸à¹à¸ªà¸±à¸à¸à¸²à¸à¹à¸à¹à¸²à¹à¸à¸£à¸ à¹à¸¥à¸°à¸¢à¸±à¸à¹à¸¡à¹à¸¡à¸µà¸à¸²à¸£à¸§à¸±à¸à¸à¸¥à¸§à¹à¸²à¸à¹à¸§à¸¢à¹à¸«à¹à¸à¸à¸°à¸¡à¸²à¸à¸à¸¶à¹à¸"})]}),e.jsxs("div",{className:"mt-5 rounded-xl border border-white/10 p-4",children:[e.jsx("p",{className:"text-sm font-medium text-slate-200",children:"à¸à¸±à¸§à¸à¸£à¸à¸à¸à¸à¸´à¸à¸ªà¸±à¸à¸à¸²à¸"}),e.jsxs("p",{className:"mb-3 text-xs text-slate-500",children:["à¸à¸´à¹à¸à¹à¸à¸·à¹à¸à¸ªà¹à¸",e.jsx("span",{className:"text-slate-300",children:"à¹à¸à¸à¸²à¸°"}),"สัà¸à¸à¸²à¸à¸à¸µà¹à¸à¹à¸²à¸à¸à¸²à¸£à¸¢à¸·à¸à¸¢à¸±à¸à¸à¸±à¹à¸ (à¸à¸¸à¸à¸ªà¸±à¸à¸à¸²à¸à¸¡à¸²à¸à¸²à¸ engine à¹à¸à¸µà¸¢à¸§ à¹à¸à¹à¸à¸£à¸à¸à¸à¸²à¸¡à¸à¸à¸§à¸´à¹à¸à¸£à¸²à¸°à¸«à¹à¸à¸µà¹à¸à¸¢à¸¹à¹à¹à¸à¸ªà¸±à¸à¸à¸²à¸) â à¹à¸¡à¹à¸à¸´à¹à¸ = สà¹à¸à¸à¸¸à¸à¸ªà¸±à¸à¸à¸²à¸"]}),e.jsxs("div",{className:"flex flex-wrap gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2.5 rounded-xl border border-white/10 px-3.5 py-2.5",children:[e.jsx(de,{on:js,onChange:Ma}),e.jsx("span",{className:"text-sm text-slate-300",children:"Multi-Timeframe à¸à¸£à¸à¸à¸±à¸"})]}),e.jsxs("div",{className:"flex items-center gap-2.5 rounded-xl border border-white/10 px-3.5 py-2.5",children:[e.jsx(de,{on:Ns,onChange:Aa}),e.jsx("span",{className:"text-sm text-slate-300",children:"มีà¹à¸à¸£à¸à¸ªà¸£à¹à¸²à¸ SMC (OB/FVG/BOS)"})]}),e.jsxs("div",{className:`flex items-center gap-2.5 rounded-xl border px-3.5 py-2.5 ${wl?"border-amber-500/50":"border-white/10"}`,title:"สà¹à¸à¹à¸à¸à¸²à¸°à¸ªà¸±à¸à¸à¸²à¸à¸à¸µà¹à¸¡à¸µ candlestick pattern à¸à¸´à¸¨à¹à¸à¸µà¸¢à¸§à¸à¸±à¸à¸ªà¸±à¸à¸à¸²à¸ â à¹à¸¥à¸·à¸à¸à¹à¸à¸¡à¹à¹à¸à¸£à¸¡à¸à¹à¸²à¸à¸¥à¹à¸²à¸à¹à¸à¹",children:[e.jsx(de,{on:pt,onChange:ys}),e.jsx("span",{className:"text-sm text-slate-300",children:"มี Price Action pattern"})]})]}),pt&&e.jsx("div",{className:"mt-3",children:e.jsx(tn,{tfs:Lt,onTfs:ws,pattern:vs,onPattern:_s})}),wl&&e.jsxs("div",{className:"mt-3 flex items-start gap-2 rounded-xl border border-amber-500/40 bg-amber-500/10 px-3.5 py-2.5",children:[e.jsx("span",{"aria-hidden":!0,
11className:"text-amber-400",children:"â ï¸"}),e.jsxs("div",{className:"text-xs leading-relaxed text-amber-200/90",children:[e.jsx("span",{className:"font-medium text-amber-300",children:"à¸à¸±à¸§à¸à¸£à¸à¸ âมี Price Action patternâ à¸à¸°à¸à¸¥à¹à¸à¸à¸ªà¸±à¸à¸à¸²à¸à¹à¸à¸·à¸à¸à¸à¸±à¹à¸à¸«à¸¡à¸à¸ªà¸³à¸«à¸£à¸±à¸à¸à¸à¸£à¹à¸à¸à¸µà¹"})," â ระà¸à¸à¸à¸£à¸§à¸ candlestick pattern à¹à¸«à¹à¹à¸à¸à¸²à¸°à¸à¸£à¸´à¸à¹à¸à¹à¸à¹à¸à¸«à¸¥à¸±à¸ (à¹à¸à¸ 0% สำหรัà¸à¸à¸à¸/forex/indices) à¹à¸à¸°à¸à¸³",e.jsx("button",{type:"button",onClick:()=>ys(!1),className:"mx-1 rounded-md border border-amber-400/50 px-2 py-0.5 font-medium text-amber-200 hover:bg-amber-500/20",children:"à¸à¸´à¸à¸à¸±à¸§à¸à¸£à¸à¸à¸à¸µà¹"}),"หรืà¸à¹à¸à¸´à¹à¸¡à¸à¸£à¸´à¸à¹à¸à¹à¸à¸à¸à¸£à¹à¸"]})]})]})]}),vl]}),c==="history"&&(()=>{const s=Math.max(1,Math.ceil(Ve.length/15)),l=Math.min(Math.max(pn,1),s),m=Ve.slice((l-1)*15,l*15),E=[];if(s<=7)for(let _=1;_<=s;_+=1)E.push(_);else{E.push(1);const _=Math.max(2,l-1),I=Math.min(s-1,l+1);_>2&&E.push("â¦");for(let P=_;P<=I;P+=1)E.push(P);I<s-1&&E.push("â¦"),E.push(s)}return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("section",{className:`relative ${q}`,children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between gap-2",children:[e.jsxs("h2",{className:"flex items-center gap-2 text-base font-semibold",children:[e.jsx("span",{className:"grid h-6 w-6 place-items-center rounded-lg bg-cyan-500/15 text-xs text-cyan-400",children:"3"})," à¸à¸£à¸°à¸§à¸±à¸à¸´à¸à¸²à¸£à¸ªà¹à¸à¸¥à¹à¸²à¸ªà¸¸à¸"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[Ve.length>0&&e.jsxs("span",{className:"text-xs text-slate-500",children:[Ve.length," รายà¸à¸²à¸£ · หà¸à¹à¸² ",l,"/",s]}),e.jsxs(yr,{figure:e.jsx(wr,{}),title:'à¸à¸à¸¥à¸±à¸¡à¸à¹ "สภาวะà¸à¸¥à¹à¸²à¸¢" à¸à¸·à¸à¸à¸°à¹à¸£',children:[e.jsxs("p",{children:["à¸à¸à¸à¸à¸µà¹à¸ªà¸±à¸à¸à¸²à¸à¸à¸¹à¸à¸ªà¹à¸ ระà¸à¸à¸à¸°à¸¢à¹à¸à¸à¸à¸¹à¸ªà¸±à¸à¸à¸²à¸à¹à¸à¹à¸²à¸à¸à¸à¸à¸¹à¹à¹à¸à¸µà¸¢à¸§à¸à¸±à¸à¸à¸µà¹ ",e.jsx("span",{className:"text-gray-100",children:"สภาà¸à¸à¸¥à¸²à¸à¹à¸à¸¥à¹à¹à¸à¸µà¸¢à¸à¸à¸±à¸"})," à¹à¸¥à¹à¸§à¸à¸±à¸à¸§à¹à¸²à¸à¸à¸à¸à¸±à¹à¸à¸à¸à¸°à¸à¸µà¹à¸à¸£à¸±à¹à¸"]}),e.jsxs("p",{children:[e.jsx("span",{className:"text-gray-400",children:"à¸à¸±à¸§à¹à¸¥à¸ %"})," = à¸à¸±à¸à¸£à¸²à¸à¸à¸°à¸à¸à¸à¸ªà¸ าวะà¸à¸¥à¹à¸²à¸¢à¹à¸à¸à¸à¸µà¸ · ",e.jsx("span",{className:"text-gray-400",children:"n"})," = à¸à¸±à¸à¸à¸²à¸à¸à¸µà¹à¸à¸£à¸±à¹à¸ (à¸à¹à¸³à¸à¸§à¹à¸² 5 à¸à¸£à¸±à¹à¸à¸à¸°à¹à¸¡à¹à¹à¸ªà¸à¸)"]}),e.jsxs("p",{children:["à¸à¸à¸à¸µà¹à¹à¸à¸à¹à¸à¸·à¹à¸à¸à¸¹à¸§à¹à¸²à¸à¸¥à¹à¸²à¸¢à¸à¸±à¸à¸ªà¸±à¸à¸à¸²à¸à¸à¸à¸ ",e.jsx("span",{className:"text-gray-100",children:"วัà¸à¹à¸«à¸à¸à¹à¸²à¸"})," à¹à¸¥à¸°à¸à¸à¸à¸à¸±à¹à¸à¸à¸¥à¸à¸à¸à¸¡à¸²à¸à¸¢à¹à¸²à¸à¹à¸£"]}),e.jsx("p",{className:"text-gray-500",children:'à¹à¸à¹à¸à¸ªà¸à¸´à¸à¸´à¸¢à¹à¸à¸à¸«à¸¥à¸±à¸ à¹à¸¡à¹à¹à¸à¹à¸à¸³à¸à¸³à¸à¸²à¸¢ â à¹à¸¥à¸°à¹à¸¡à¹à¹à¸à¹à¸à¸¹à¸à¹à¸à¹à¸à¸£à¸à¸à¸§à¹à¸²à¸à¸°à¸ªà¹à¸à¸ªà¸±à¸à¸à¸²à¸à¹à¸«à¸ สัà¸à¸à¸²à¸à¹à¸à¹à¸²à¸à¸§à¹à¸²à¸£à¸°à¸à¸à¸à¸µà¹à¸à¸°à¸à¸¶à¹à¸à¹à¸à¹à¸ "â"'})]})]})]}),Ve.length===0?e.jsx("p",{className:"text-sm text-slate-500",children:"ยัà¸à¹à¸¡à¹à¸¡à¸µà¸à¸²à¸£à¸ªà¹à¸"}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-left text-xs text-slate-500",children:[e.jsx("th",{className:"py-1.5",children:"à¹à¸§à¸¥à¸²"}),e.jsx("th",{children:"สิà¸à¸à¸£à¸±à¸à¸¢à¹"}),e.jsx("th",{children:"à¸à¸´à¸¨à¸à¸²à¸"}),e.jsx("th",{children:"Conf"}),e.jsx("th",{children:"สภาวะà¸à¸¥à¹à¸²à¸¢"}),e.jsx("th",{children:"à¸à¸¥"})]})}),e.jsx("tbody",{children:m.map((_,I)=>{const P=new Date(_.created_at).toLocaleString("th-TH",{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit",timeZone:be}),S=(_.outcome||"PENDING").toUpperCase(),ye=S==="WIN"?"text-emerald-400":S==="LOSS"?"text-rose-400":"text-slate-400",ue=S==="WIN"?`WIN${_.profit_percent!=null?` +${Number(_.profit_percent).toFixed(1)}%`:""}`:S==="LOSS"?`LOSS${_.profit_percent!=null?` ${Number(_.profit_percent).toFixed(1)}%`:""}`:S==="UNSUPPORTED"?"à¹à¸¡à¹à¸¡à¸µà¸à¸¥à¸à¸à¹à¸à¹":S==="EXPIRED"?"หมà¸à¹à¸§à¸¥à¸²":"รà¸à¸à¸¥",se=_.similar_trades,we=se&&se.n>=5?Math.round(se.win_rate*100):null,Ce=we!=null&&Array.isArray(se==null?void 0:se.top)&&se.top.length>0,Qe=hn===I;return e.jsxs(i.Fragment,{children:[e.jsxs("tr",{className:"border-t border-white/5",children:[e.jsx("td",{className:"py-2.5 text-slate-400",children:P}),e.jsx("td",{className:"font-medium",children:_.asset}),e.jsx("td",{className:_.direction==="BUY"?"text-emerald-400":"text-rose-400",children:_.direction==="BUY"?"LONG":"SHORT"}),e.jsxs("td",{className:"text-slate-300",children:[Math.round(Number(_.confidence)),"%"]}),e.jsx("td",{children:we==null?e.jsx("span",{className:"text-slate-600",children:"â"}):e.jsxs("button",{type:"button",onClick:()=>
11Ce&&vt(Qe?null:I),className:`inline-flex items-center gap-1.5 ${Ce?"cursor-pointer":"cursor-default"}`,title:`ภà¸à¸à¸à¸ªà¹à¸à¸ªà¸±à¸à¸à¸²à¸ ระà¸à¸à¸à¸à¸ªà¸ าวะà¸à¸¥à¸²à¸à¸à¸¥à¹à¸²à¸¢à¸à¸±à¸ ${se.n} à¸à¸£à¸±à¹à¸à¹à¸à¸à¸à¸µà¸ à¸à¸à¸° ${we}% (P/L à¹à¸à¸¥à¸µà¹à¸¢ ${se.avg_pnl>=0?"+":""}${se.avg_pnl}%) â สà¸à¸´à¸à¸´à¸¢à¹à¸à¸à¸«à¸¥à¸±à¸ à¹à¸¡à¹à¹à¸à¹à¸à¸³à¸à¸³à¸à¸²à¸¢${Ce?" · à¸à¸à¹à¸à¸·à¹à¸à¸à¸¹à¸§à¹à¸²à¸à¸¥à¹à¸²à¸¢à¸§à¸±à¸à¹à¸«à¸":""}`,children:[e.jsx("span",{className:"h-1.5 w-10 overflow-hidden rounded-full bg-white/10",children:e.jsx("span",{className:`block h-full rounded-full ${we>=55?"bg-emerald-400":we>=45?"bg-amber-400":"bg-rose-400"}`,style:{width:`${we}%`}})}),e.jsxs("span",{className:`text-xs ${we>=55?"text-emerald-300":we>=45?"text-amber-300":"text-rose-300"}`,children:[we,"%"]}),e.jsxs("span",{className:"text-[10px] text-slate-500",children:["n=",se.n]}),Ce&&e.jsx("span",{className:"text-[10px] text-cyan-400",children:Qe?"â´":"â¾"})]})}),e.jsx("td",{className:ye,children:ue})]}),Qe&&Ce&&e.jsx("tr",{className:"border-t border-white/5 bg-white/[0.02]",children:e.jsxs("td",{colSpan:6,className:"px-3 py-2.5",children:[e.jsxs("p",{className:"mb-1.5 text-[11px] text-slate-400",children:["สัà¸à¸à¸²à¸à¹à¸à¸à¸à¸µà¸à¸à¸µà¹à¸ªà¸ าà¸à¸à¸¥à¸²à¸à¸à¸¥à¹à¸²à¸¢à¸à¸µà¹à¸ªà¸¸à¸ (",se.n," à¸à¸£à¸±à¹à¸à¸à¸µà¹à¸à¸±à¸à¸£à¸§à¸¡à¹à¸à¸ªà¸à¸´à¸à¸´ · à¹à¸à¸§à¹ 5 à¸à¸±à¸à¸à¸±à¸à¹à¸£à¸):"]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:se.top.map((H,gt)=>e.jsxs("span",{className:`inline-flex items-center gap-1.5 rounded-lg border px-2 py-1 text-[11px] ${H.outcome==="win"?"border-emerald-500/25 bg-emerald-500/10 text-emerald-300":"border-rose-500/25 bg-rose-500/10 text-rose-300"}`,children:[e.jsx("span",{className:"text-slate-400",children:H.day}),H.dir&&e.jsx("span",{children:H.dir==="BUY"?"LONG":"SHORT"}),e.jsx("span",{className:"font-medium",children:H.outcome==="win"?"WIN":"LOSS"}),e.jsxs("span",{children:[H.pnl>=0?"+":"",Number(H.pnl).toFixed(2),"%"]}),e.jsxs("span",{className:"text-slate-500",children:["à¸à¸¥à¹à¸²à¸¢ ",Math.round(H.sim*100),"%"]})]},gt))}),e.jsx("p",{className:"mt-1.5 text-[10px] text-slate-500",children:'"à¸à¸¥à¹à¸²à¸¢" วัà¸à¸à¸²à¸à¸à¸´à¸à¸à¸´à¹à¸à¹à¸à¸à¸£à¹+à¹à¸à¸£à¸à¸ªà¸£à¹à¸²à¸à¸à¸¥à¸²à¸ ภà¸à¸à¸à¸ªà¹à¸ (vector similarity) â สà¸à¸´à¸à¸´à¸¢à¹à¸à¸à¸«à¸¥à¸±à¸ à¹à¸¡à¹à¹à¸à¹à¸à¸³à¸à¸³à¸à¸²à¸¢'})]})})]},`${_.created_at}-${_.asset}-${I}`)})})]})}),s>1&&e.jsxs("div",{className:"mt-4 flex flex-wrap items-center justify-center gap-1.5",children:[e.jsx("button",{onClick:()=>{rs(l-1),vt(null)},disabled:l<=1,className:"rounded-lg border border-white/10 px-2.5 py-1.5 text-xs text-slate-300 transition hover:bg-white/5 disabled:opacity-40",children:"à¸à¹à¸à¸à¸«à¸à¹à¸²"}),E.map((_,I)=>_==="â¦"?e.jsx("span",{className:"px-1.5 text-xs text-slate-600",children:"â¦"},`ellipsis-${I}`):e.jsx("button",{onClick:()=>{rs(_),vt(null)},className:`min-w-[2rem] rounded-lg border px-2.5 py-1.5 text-xs transition ${_===l?"border-cyan-500 bg-cyan-500/15 font-semibold text-cyan-300":"border-white/10 text-slate-300 hover:bg-white/5"}`,children:_},_)),e.jsx("button",{onClick:()=>{rs(l+1),vt(null)},disabled:l>=s,className:"rounded-lg border border-white/10 px-2.5 py-1.5 text-xs text-slate-300 transition hover:bg-white/5 disabled:opacity-40",children:"à¸à¸±à¸à¹à¸"})]})]})]}),e.jsx("p",{className:"pt-2 text-center text-xs text-slate-600",children:"* Forex / Silver / Indices / Stocks สà¹à¸à¸ªà¸±à¸à¸à¸²à¸à¹à¸à¹ à¹à¸à¹à¹à¸¡à¹à¸¡à¸µà¸£à¸²à¸¢à¸à¸²à¸à¸à¸¥ Win/Loss à¸à¸±à¸à¹à¸à¸¡à¸±à¸à¸´"}),e.jsx("p",{className:"text-center text-xs text-slate-600",children:'"สภาวะà¸à¸¥à¹à¸²à¸¢" = win-rate à¸à¸à¸à¸ªà¸±à¸à¸à¸²à¸à¹à¸à¸à¸à¸µà¸à¸à¸µà¹à¸ªà¸ าà¸à¸à¸¥à¸²à¸à¸à¸¥à¹à¸²à¸¢à¸à¸±à¸ ภà¸à¸à¸à¸ªà¹à¸ (à¸à¸³à¸à¸§à¸à¸à¹à¸§à¸¢ vector similarity) â à¹à¸à¹à¸à¸ªà¸à¸´à¸à¸´à¸¢à¹à¸à¸à¸«à¸¥à¸±à¸ à¹à¸¡à¹à¹à¸à¹à¸à¸³à¸à¸³à¸à¸²à¸¢ · มีà¹à¸à¸à¸²à¸°à¸ªà¸±à¸à¸à¸²à¸à¸à¹à¸§à¸à¸«à¸¥à¸±à¸'})]})})(),c==="constellation"&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("details",{open:!0,className:`${q} group`,children:[e.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-2 text-base font-semibold [&::-webkit-details-marker]:hidden",children:[e.jsx("span",{children:"ð Signal Constellation à¸à¸·à¸à¸à¸°à¹à¸£ â à¸à¹à¸²à¸à¹à¸à¸à¸à¸µà¹à¸à¸µà¹à¸¢à¸±à¸à¹à¸"}),e.jsx("span",{className:"ml-auto text-xs font-normal text-cyan-300/70 group-open:hidden",children:"à¹à¸à¸°à¹à¸à¸·à¹à¸à¸à¸¹ â¾"}),e.jsx("span",{className:"ml-auto hidden text-xs font-normal text-slate-500 group-open:inline",children:"à¸à¹à¸à¸ â´"})]}),e.jsxs("div",{className:"mt-4 grid gap-5 md:grid-cols-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"mb-1.5 text-sm font-semibold text-cyan-300",children:"à¸à¸µà¹à¸à¸·à¸à¸à¸°à¹à¸£?"}),e.jsxs("p",{className:"text-xs leading-relaxed text-slate-400",children:["à¹à¸à¸à¸à¸µà¹ 3 มิà¸à¸´à¸à¸à¸à¸ªà¸±à¸à¸à¸²à¸ AI à¸à¸£à¸´à¸ ",e.jsx("b",{className:"text-slate-200",children:"à¸à¸¸à¸à¸à¸±à¸§à¹à¸à¸à¸à¸µà¸"})," â à¹à¸à¹à¸¥à¸°à¸à¸¸à¸à¸à¸·à¸ 1 สัà¸à¸à¸²à¸ วาà¸à¸à¸³à¹à¸«à¸à¹à¸à¸à¸²à¸¡ âสภาà¸à¸à¸¥à¸²à¸à¸à¸à¸à¸à¸à¸à¸ªà¸±à¸à¸à¸²à¸â สัà¸à¸à¸²à¸à¸à¸µà¹à¸à¸£à¸´à¸à¸à¸à¸¥à¹à¸²à¸¢à¸à¸±à¸à¸à¸°à¸à¸¢à¸¹à¹à¹à¸à¸¥à¹à¸à¸±à¸ à¸à¹à¸§à¸¢à¹à¸«à¹à¹à¸«à¹à¸à¸ าà¸à¸§à¹à¸² setup à¹à¸à¸à¹à¸«à¸ AI ",e.jsx("b",{className:"text-amber-300",children:"à¸à¸à¸°"})," หรืภ",e.jsx("b",{className:"text-emerald-300",children:"à¹à¸à¹"})," à¸à¹à¸à¸¢"]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1.5 text-sm font-semibold text-cyan-300",children:"à¸à¸§à¸²à¸¡à¸«à¸¡à¸²à¸¢à¸à¸à¸à¹à¸à¹à¸¥à¸°à¸à¸¢à¹à¸²à¸"}),e.jsxs("ul",{className:"space-y-1.5 text-xs text-slate-400",children:[e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"mt-1 inline-block h-2.5 w-2.5 shrink-0 rounded-full",style:{background:"#FACC15"}}),e.jsxs("span",{children:[e.jsx("b",{className:"text-slate-200",children:"à¸
11ุà¸à¸à¸à¸ = à¸à¸à¸°"})," · ลà¸à¸¢à¸à¸¢à¸¹à¹à¸à¹à¸²à¸à¸à¸ (ยิà¹à¸à¸à¸³à¹à¸£à¸¡à¸²à¸à¸¢à¸´à¹à¸à¸ªà¸¹à¸)"]})]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"mt-1 inline-block h-2.5 w-2.5 shrink-0 rounded-full",style:{background:"#34D399"}}),e.jsxs("span",{children:[e.jsx("b",{className:"text-slate-200",children:"à¸à¸¸à¸à¹à¸à¸µà¸¢à¸§ = à¹à¸à¹"})," · à¸à¸¡à¸à¸¢à¸¹à¹à¸à¹à¸²à¸à¸¥à¹à¸²à¸ (ยิà¹à¸à¸à¸²à¸à¸à¸¸à¸à¸¢à¸´à¹à¸à¸¥à¸¶à¸)"]})]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"mt-1 inline-block h-2.5 w-2.5 shrink-0 rounded-full",style:{background:"#94A3B8"}}),e.jsxs("span",{children:[e.jsx("b",{className:"text-slate-200",children:"à¸à¸¸à¸à¹à¸à¸² = รà¸à¸à¸¥"})," · ยัà¸à¹à¸¡à¹à¸à¸´à¸à¸ªà¸±à¸à¸à¸²à¸"]})]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"mt-1 inline-block h-0.5 w-3 shrink-0 rounded bg-cyan-300/70"}),e.jsxs("span",{children:[e.jsx("b",{className:"text-slate-200",children:"à¹à¸ªà¹à¸à¹à¸à¸·à¹à¸à¸¡"})," = สัà¸à¸à¸²à¸à¸à¸µà¹à¸ªà¸ าà¸à¸à¸¥à¸²à¸à¸à¸¥à¹à¸²à¸¢à¸à¸±à¸"]})]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"mt-0.5 shrink-0",children:"ð«ï¸"}),e.jsxs("span",{children:[e.jsx("b",{className:"text-slate-200",children:"หมà¸à¸à¸à¸¸à¹à¸"})," = à¸à¸¥à¸²à¸à¸à¸±à¸à¸à¸§à¸à¸ªà¸¹à¸ (à¹à¸¡à¹à¹à¸à¹à¸à¸à¸)"]})]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"mt-0.5 shrink-0",children:"ð¢"}),e.jsxs("span",{children:[e.jsx("b",{className:"text-slate-200",children:"à¸à¸±à¸§à¹à¸¥à¸à¸¥à¸à¸¢"})," = % à¸à¸³à¹à¸£/à¸à¸²à¸à¸à¸¸à¸à¸à¸à¸à¸ªà¸±à¸à¸à¸²à¸à¸à¸±à¹à¸"]})]})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1.5 text-sm font-semibold text-cyan-300",children:"วิà¸à¸µà¹à¸à¹"}),e.jsxs("ul",{className:"space-y-1.5 text-xs text-slate-400",children:[e.jsxs("li",{children:["⢠à¹à¸¥à¸·à¸à¸ ",e.jsx("b",{className:"text-slate-200",children:"âสิà¸à¸à¸£à¸±à¸à¸¢à¹à¸à¸µà¹à¹à¸à¸£à¸â"})," à¸à¹à¸²à¸à¸à¸à¹à¸à¸·à¹à¸à¹à¸à¸à¸±à¸ªà¸£à¸²à¸¢à¸à¸¹à¹ หรืภâà¸à¸±à¹à¸à¸«à¸¡à¸â"]}),e.jsxs("li",{children:["⢠à¸à¸¸à¹à¸¡ ",e.jsx("b",{className:"text-slate-200",children:"หมุà¸à¸£à¸à¸"})," / ",e.jsx("b",{className:"text-slate-200",children:"à¹à¸à¸´à¸à¸à¸°à¸¥à¸¸"})," สลัà¸à¸¡à¸¸à¸¡à¸à¸¥à¹à¸à¸"]}),e.jsxs("li",{children:["⢠",e.jsx("b",{className:"text-slate-200",children:"ลาà¸à¹à¸¡à¸²à¸ªà¹"})," = หมุภ· ",e.jsx("b",{className:"text-slate-200",children:"scroll"})," = à¸à¸¹à¸¡"]}),e.jsxs("li",{children:["⢠",e.jsx("b",{className:"text-slate-200",children:"Links / Labels"})," à¹à¸à¸´à¸-à¸à¸´à¸à¹à¸ªà¹à¸à¹à¸à¸·à¹à¸à¸¡/à¸à¸±à¸§à¹à¸¥à¸"]})]})]})]}),e.jsxs("p",{className:"mt-4 rounded-lg border border-cyan-500/15 bg-cyan-500/[0.05] px-3 py-2 text-xs leading-relaxed text-slate-300",children:["ð¡ ",e.jsx("b",{className:"text-cyan-200",children:"à¹à¸à¸¥à¹à¸à¸¥à¸±à¸:"})," à¸à¹à¸²à¹à¸«à¹à¸",e.jsx("b",{className:"text-amber-300",children:" à¸à¸£à¸°à¸à¸¸à¸à¸à¸¸à¸à¸à¸à¸"}),"หà¸à¸²à¹à¸à¹à¸ = setup à¸à¸µà¹ AI à¸à¸³à¹à¸à¹à¸à¸µà¹à¸à¸à¸à¸µà¸ · à¹à¸à¸à¸à¸µà¹ ",e.jsx("b",{children:"หมà¸à¸à¸«à¸à¸²"})," = à¸à¸¥à¸²à¸à¸à¸±à¸à¸à¸§à¸ ระวัà¸à¸ªà¸±à¸à¸à¸²à¸à¸«à¸¥à¸à¸ · à¸à¸±à¸§à¹à¸¥à¸à¹à¸à¸§à¸à¹à¸¥à¹à¸à¸à¹à¸²à¸à¸à¸·à¹à¸à¸à¸¹à¹ = à¸à¸³à¸à¸§à¸à¸ªà¸±à¸à¸à¸²à¸à¸à¸à¸à¸à¸¹à¹à¸à¸±à¹à¸"]})]}),e.jsx(li,{height:640})]}),c==="academy"&&e.jsxs("div",{className:"space-y-4",children:[e.jsx("section",{className:q,children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"grid h-10 w-10 flex-none place-items-center rounded-xl bg-cyan-500/15 text-xl text-cyan-300",children:"ð"}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-semibold",children:"หà¹à¸à¸à¹à¸£à¸µà¸¢à¸ Academy à¸à¸£à¹à¸à¸¡à¹à¸ªà¸´à¸£à¹à¸à¹à¸«à¹à¸ªà¸¡à¸²à¸à¸´à¸à¸à¸à¸à¸à¸¸à¸"}),e.jsx("p",{className:"mt-1 text-sm text-slate-400",children:"สมาà¸à¸´à¸à¸à¸¸à¸à¸à¸à¹à¸à¹à¸²à¹à¸£à¸µà¸¢à¸à¹à¸à¹à¸à¸µà¹à¸«à¸à¹à¸² Ac
11ademy â à¸à¸à¸£à¹à¸ªà¸à¸·à¹à¸à¸à¸²à¸à¹à¸à¸´à¸à¹à¸«à¹à¹à¸£à¸µà¸¢à¸ à¸à¸à¸¥à¸¶à¸à¸à¸¥à¸à¸à¹à¸§à¸¢à¹à¸à¸£à¸à¸´à¸/VIP"}),e.jsx("a",{href:"/academy",target:"_blank",rel:"noreferrer",className:"mt-2 inline-flex items-center gap-1.5 text-sm font-semibold text-cyan-400 hover:text-cyan-300",children:"à¹à¸à¸´à¸à¸«à¸à¹à¸² Academy â"})]})]})}),e.jsxs("section",{className:q,children:[e.jsxs("div",{className:"mb-1 flex flex-wrap items-center justify-between gap-2",children:[e.jsx("h2",{className:"text-base font-semibold",children:"ð¡ สà¹à¸à¸à¸à¹à¸£à¸µà¸¢à¸à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡à¸à¸±à¸à¹à¸à¸¡à¸±à¸à¸´ (Drip)"}),v&&(v.academy_unlimited?e.jsx("span",{className:"rounded-full bg-emerald-500/14 px-2.5 py-0.5 text-[11px] text-emerald-300",children:"à¹à¸¡à¹à¸à¸³à¸à¸±à¸"}):v.academy_paid?e.jsxs("span",{className:"rounded-full bg-emerald-500/14 px-2.5 py-0.5 text-[11px] text-emerald-300",children:["à¹à¸à¹à¸à¸²à¸à¹à¸à¹",v.academy_expires_at?` · หมà¸à¸à¸²à¸¢à¸¸ ${new Date(v.academy_expires_at).toLocaleDateString("th-TH",{day:"2-digit",month:"short"})}`:""]}):e.jsx("span",{className:"rounded-full bg-amber-500/14 px-2.5 py-0.5 text-[11px] text-amber-300",children:"ยัà¸à¹à¸¡à¹à¸à¸¥à¸à¸¥à¹à¸à¸"}))]}),e.jsx("p",{className:"text-sm text-slate-400",children:"à¹à¸¥à¸·à¸à¸à¸à¸à¸£à¹à¸ª à¹à¸¥à¹à¸§à¸£à¸°à¸à¸à¸à¸°à¸à¸¢à¸à¸¢à¸ªà¹à¸à¸à¸à¹à¸£à¸µà¸¢à¸ (หัวà¸à¹à¸ + ลิà¸à¸à¹à¸à¹à¸²à¸à¹à¸à¹à¸¡) à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡ Telegram/Discord à¸à¸à¸à¸à¸¸à¸à¸à¸²à¸¡à¸£à¸à¸à¹à¸§à¸¥à¸²"}),v?v.academy_paid?e.jsxs("div",{className:"mt-4 space-y-4",children:[e.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[e.jsx("input",{type:"checkbox",checked:!!v.drip_enabled,onChange:t=>Rn(t.target.checked),disabled:F}),"à¹à¸à¸´à¸à¸ªà¹à¸à¸à¸±à¸à¹à¸à¸¡à¸±à¸à¸´"]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-slate-400",children:"à¸à¸à¸£à¹à¸ªà¸à¸µà¹à¸à¸°à¸ªà¹à¸"}),e.jsxs("select",{value:v.drip_course||"",onChange:t=>rl({course:t.target.value}),className:"w-full max-w-xs rounded-lg border border-white/10 bg-white/[0.03] px-3 py-2 text-sm text-slate-200",children:[e.jsx("option",{value:"",children:"â à¹à¸¥à¸·à¸à¸à¸à¸à¸£à¹à¸ª â"}),(v.courses||[]).map(t=>e.jsxs("option",{value:t.slug,className:"bg-slate-900",children:[t.title," (",t.lessons," à¸à¸)"]},t.slug))]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-slate-400",children:"รà¸à¸à¸à¸²à¸£à¸ªà¹à¸"}),e.jsx("select",{value:v.drip_interval_hours||24,onChange:t=>rl({interval:Number(t.target.value)}),className:"w-full max-w-xs rounded-lg border border-white/10 bg-white/[0.03] px-3 py-2 text-sm text-slate-200",children:[6,12,24,48,72,168].map(t=>e.jsx("option",{value:t,className:"bg-slate-900",children:t===168?"à¸à¸¸à¸ 7 วัà¸":t===24?"à¸à¸¸à¸à¸§à¸±à¸":`à¸à¸¸à¸ ${t} à¸à¸¡.`},t))})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-t border-white/[0.06] pt-3",children:[e.jsx("button",{onClick:Fn,disabled:T||!v.drip_course,className:"inline-flex items-center gap-2 rounded-lg bg-cyan-600 px-4 py-2 text-sm font-semibold text-cyan-50 transition hover:bg-cyan-500 disabled:opacity-60",children:T?"à¸à¸³à¸¥à¸±à¸à¸ªà¹à¸â¦":"สà¹à¸à¸à¸à¹à¸£à¸µà¸¢à¸à¸à¸à¸à¸à¸µà¹"}),e.jsxs("span",{className:"text-xs text-slate-500",children:["à¸à¸¥à¸²à¸¢à¸à¸²à¸: ",v.has_telegram?"Telegram":"â",v.has_discord?" · Discord":""]})]})]}):e.jsx("div",{className:"mt-3",children:e.jsx("button",{onClick:Tn,disabled:F,className:"inline-flex items-center gap-2 rounded-lg bg-amber-500 px-4 py-2 text-sm font-semibold text-amber-950 transition hover:bg-amber-400 disabled:opacity-60",children:"à¸à¸¥à¸à¸¥à¹à¸à¸ Drip â 50 à¹à¸à¸£à¸à¸´à¸ / 30 วัà¸"})}):e.jsx("p",{className:"mt-3 text-sm text-slate-500",children:"à¸à¸³à¸¥à¸±à¸à¹à¸«à¸¥à¸â¦"}),R&&e.jsx("p",{className:"mt-3 text-sm font-medium text-cyan-300",children:R})]})]}),c==="leaderboard"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("section",{className:q,children:[e.jsxs("div",{className:"mb-1 flex flex-wrap items-center justify-between gap-2",children:[e.jsx("h2",{className:"text-base font-semibold",children:"ð¥ à¸à¸±à¸à¸à¸±à¸à¸à¸¹à¹à¹à¸à¹ Signal Control (Net %)"}),e.jsx("div",{className:"flex gap-0.5 rounded-lg border border-white/10 p-0.5",children:sn.map(t=>e.jsx("button",{onClick:()=>W(t.v),className:`rounded-md px-2.5 py-1 text-xs transition ${L===t.v?"bg-cyan-500/15 text-cyan-300":"text-slate-400 hover:text-slate-200"}`,children:t.l},t.v))})]}),e.jsxs("p",{className:"mb-4 text-[11px] leading-relaxed text-slate-500",children:["à¹à¸à¸µà¸¢à¸",e.jsx("b",{className:"text-slate-300",children:" à¸à¸³à¹à¸£à¸ªà¸°à¸ªà¸¡à¸à¸£à¸´à¸"}),"à¸à¸à¸à¸à¸¹à¹à¹à¸à¹à¸à¸¸à¸à¸à¸ (à¸à¸²à¸à¹à¸¡à¹à¸à¸µà¹ AI สà¹à¸à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡à¸à¸£à¸´à¸) · à¹à¸à¹à¸à¸²à¸¡à¹à¸à¸à¹à¸à¸·à¹à¸à¸à¸§à¸²à¸¡à¹à¸à¹à¸à¸ªà¹à¸§à¸à¸à¸±à¸§ ·",e.jsx("span",{className:"text-emerald-300/90",children:" à¹à¸à¸§à¸à¸à¸à¸à¸¸à¸à¹à¸®à¹à¸¥à¸à¹à¸ªà¸µà¹à¸à¸µà¸¢à¸§ + à¸à¹à¸²à¸¢ âà¸à¸¸à¸â"})," ·",e.jsx("b",{className:"text-slate-300",children:" à¸à¸¹ âสูà¸à¸£â
11 à¹à¸à¹à¸à¸·à¹à¸à¹à¸à¹à¸¥à¸°à¸à¸"})," (à¸à¹à¸à¸à¸à¸²à¸à¸à¸µà¹à¸ªà¹à¸ · à¸à¸¹à¹ · à¸à¸§à¸²à¸¡à¸¡à¸±à¹à¸à¹à¸ · à¸à¸§à¸²à¸¡à¹à¸ªà¸µà¹à¸¢à¸ · à¸à¸§à¸²à¸¡à¸à¸µà¹ · à¸à¸±à¸§à¸à¸£à¸à¸) ·",e.jsx("span",{className:"text-cyan-300/90",children:" à¸à¸ âð à¸à¹à¸à¸à¸ªà¸¹à¸à¸£à¸à¸µà¹â à¹à¸à¸·à¹à¸à¸à¸±à¹à¸à¸à¹à¸²à¸à¸²à¸¡à¸à¸à¸à¸±à¹à¸à¸à¸±à¸à¸à¸µ"})," · à¹à¸ªà¸à¸à¹à¸à¸à¸²à¸°à¸à¸¹à¹à¹à¸à¹à¸à¸µà¹à¸¡à¸µ ⥠20 à¹à¸¡à¹à¸à¸´à¸à¸à¸¥"]}),Z&&!O?e.jsx("p",{className:"text-xs text-slate-500",children:"à¸à¸³à¸¥à¸±à¸à¹à¸«à¸¥à¸â¦"}):(Tl=O==null?void 0:O.channels)!=null&&Tl.length?(()=>{const t=O.channels,s=Math.max(...t.map(l=>Math.abs(Number(l.net_pct))),1);return e.jsx("div",{className:"space-y-2.5",children:t.map(l=>{const m=Number(l.net_pct)>=0,E=Math.min(1,Math.abs(Number(l.net_pct))/s),_=l.rank===1?"border-amber-400/40 bg-amber-400/20 text-amber-300":l.rank===2?"border-slate-300/30 bg-slate-300/15 text-slate-200":l.rank===3?"border-orange-400/30 bg-orange-400/15 text-orange-300":"border-white/10 bg-white/5 text-slate-400";return e.jsxs("div",{className:`rounded-xl px-2 py-1.5 ${l.is_you?"bg-emerald-500/10 ring-1 ring-emerald-500/40":""}`,children:[e.jsxs("div",{className:"flex items-center gap-2.5 text-xs",children:[e.jsx("span",{className:`grid h-6 w-6 shrink-0 place-items-center rounded-lg border text-[11px] font-bold ${_}`,children:l.rank}),e.jsx("div",{className:"w-24 shrink-0 sm:w-28",children:e.jsxs("span",{className:"block truncate font-medium text-slate-200",children:[l.name,l.is_you&&e.jsx("span",{className:"ml-1 rounded bg-emerald-500/20 px-1 py-0.5 text-[9px] font-semibold text-emerald-300",children:"à¸à¸¸à¸"})]})}),e.jsxs("div",{className:"relative h-2.5 flex-1",children:[e.jsx("div",{className:"absolute inset-0 rounded-full bg-white/[0.04]"}),e.jsx("div",{className:"absolute left-1/2 top-0 h-full w-px bg-white/15"}),e.jsx("div",{className:"absolute top-0 h-full rounded-full",style:m?{left:"50%",width:`${E*50}%`,background:"#34d399"}:{right:"50%",width:`${E*50}%`,background:"#f87171"}})]}),e.jsxs("span",{className:"w-14 shrink-0 text-right font-semibold",style:{color:m?"#34d399":"#f87171"},children:[Number(l.net_pct)>0?"+":"",l.net_pct,"%"]}),e.jsxs("span",{className:"hidden w-20 shrink-0 text-right text-slate-400 sm:block",children:[l.win,"-",l.loss,l.win_rate!=null?` · ${l.win_rate}%`:""]})]}),e.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-1.5 pl-8",children:[l.cfg&&e.jsx(Vs,{cfg:l.cfg,platforms:l.platforms}),l.pid&&e.jsx("button",{onClick:()=>G({pid:l.pid,name:l.name,net_pct:Number(l.net_pct),win:Number(l.win),loss:Number(l.loss),win_rate:l.win_rate==null?0:Number(l.win_rate),rank:Number(l.rank),cfg:l.cfg,platforms:l.platforms}),className:"rounded-md border border-amber-500/40 bg-amber-500/10 px-1.5 py-0.5 text-[10px] font-medium text-amber-300 transition hover:bg-amber-500/20",children:"ð สà¸à¸´à¸à¸´à¹à¸à¸´à¸à¸¥à¸¶à¸"}),!l.is_you&&l.pid&&e.jsx("button",{onClick:()=>{ae(null),Le(l)},className:"rounded-md border border-cyan-500/40 bg-cyan-500/10 px-1.5 py-0.5 text-[10px] font-medium text-cyan-300 transition hover:bg-cyan-500/20",children:"ð à¸à¹à¸à¸à¸ªà¸¹à¸à¸£à¸à¸µà¹"})]})]},l.rank)})})})():e.jsx("p",{className:"text-xs text-slate-500",children:"ยัà¸à¹à¸¡à¹à¸¡à¸µà¸à¹à¸à¸¡à¸¹à¸¥à¸à¸à¹à¸à¸à¹à¸§à¸à¹à¸§à¸¥à¸²à¸à¸µà¹"}),re&&e.jsx("p",{className:`mt-3 text-xs ${re.startsWith("â
")?"text-emerald-400":"text-rose-400"}`,children:re}),e.jsxs("p",{className:"mt-3 text-[10px] text-slate-600",children:[O!=null&&O.generated_at?`à¸à¸±à¸à¹à¸à¸à¸¥à¹à¸²à¸ªà¸¸à¸ ${new Date(O.generated_at).toLocaleString("th-TH",{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit",timeZone:be})} · `:"","Net % = à¸à¸¥à¸£à¸§à¸¡à¸à¸³à¹à¸£/à¸à¸²à¸à¸à¸¸à¸à¸à¸£à¸´à¸à¸à¸à¸à¹à¸¡à¹à¸à¸µà¹à¸à¸´à¸à¸à¸¥ (à¸à¸à¸°+à¹à¸à¹) à¸à¸µà¹à¸ªà¹à¸à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡à¸à¸à¸à¸à¸¹à¹à¹à¸à¹à¹à¸à¹à¸¥à¸°à¸à¸ · à¸à¸¥à¸¢à¹à¸à¸à¸«à¸¥à¸±à¸à¹à¸¡à¹à¸à¸²à¸£à¸±à¸à¸à¸µà¸à¸¥à¸à¸à¸²à¸à¸"]})]}),e.jsxs("section",{className:q,children:[e.jsx("div",{className:"mb-1 flex flex-wrap items-center justify-between gap-2",children:e.jsx("h2",{className:"text-base font-semibold",children:"ð à¸à¸±à¸à¸à¸±à¸à¸à¸¹à¹à¸à¸³à¸à¸³à¹à¸£ (Net %)"})}),e.jsxs("p",{className:"mb-4 text-[11px] leading-relaxed text-slate-500",children:["à¸à¸±à¸à¸à¸±à¸à¸à¸±à¸à¸à¸²à¸",e.jsx("b",{className:"text-slate-300",children:" สัà¸à¸à¸²à¸ AI à¸à¸±à¹à¸à¸«à¸¡à¸"})," (รวมà¸à¸¸à¸ channel â à¹à¸¡à¹à¹à¸à¹à¹à¸à¸à¸²à¸°à¸à¸µà¹à¸à¸¸à¸à¸à¸´à¹à¸) ·",e.jsx("span",{className:"text-emerald-300/90",children:" Net % = à¸à¸³à¹à¸£à¸ªà¸°à¸ªà¸¡à¸à¹à¸²à¸£à¸±à¸à¸à¸¸à¸à¹à¸¡à¹à¸à¸µà¹à¸à¸´à¸à¸à¸¥à¹à¸¥à¹à¸§"})," · à¹à¸£à¸µà¸¢à¸à¸¡à¸²à¸âà¸à¹à¸à¸¢ ·",e.jsx("span",{className:"text-amber-300/90",children:" à¸à¸´à¸ X%"})," = à¸à¸¹à¹à¸à¸µà¹à¸¢à¸±à¸à¸à¸´à¸à¸à¸¥à¹à¸¡à¹à¸à¸£à¸ à¸à¸±à¸§à¹à¸¥à¸à¸à¸²à¸à¸¢à¸±à¸à¹à¸¡à¹à¸à¸´à¹à¸ · à¹à¸à¹à¹à¸à¹à¸à¹à¸à¸à¹à¹à¸¥à¸·à¸à¸à¸à¸´à¹à¸à¸ªà¹à¸ (à¸à¸à¸ªà¸¸à¸ = AI à¸à¸³à¹à¸à¹à¸à¸µ · ลà¹à¸²à¸à¸ªà¸¸à¸ = à¸à¸§à¸£à¹à¸¥à¸µà¹à¸¢à¸)"]}),ee&&!g?e.jsx("p",{className:"text-xs text-slate-500",children:"à¸à¸³à¸¥à¸±à¸à¹à¸«à¸¥à¸â¦"}):(Rl=g==null?void 0:g.assets)!=null&&Rl.length?(()=>{const t=g.assets,s=Math.max(...t.map(l=>Math.abs(Number(l.net_pct))),1);return e.jsx("div",{className:"space-y-2.5",children:t.map((l,m)=>e.jsx(vi,{rank:m+1,label:l.asset,sub:ve(l.asset),net:Number(l.net_pct),win:l.win,loss:l.loss,closed:l.closed,coverage:Number(l.coverage),maxAbs:s},l.asset))})})():e.jsx("p",{className:"text-xs text-slate-500",children:"ยัà¸à¹à¸¡à¹à¸¡à¸µà¸à¹à¸à¸¡à¸¹à¸¥à¸à¸à¹à¸à¸à¹à¸§à¸à¹à¸§à¸¥à¸²à¸à¸µà¹"}),e.jsxs("p",{className:"mt-3 text-[10px] text-slate-600",children:[g!=null&&g.generated_at?`à¸à¸±à¸à¹à¸à¸à¸¥à¹à¸²à¸ªà¸¸à¸ ${new Date(g.generated_at).toLocaleStr
11ing("th-TH",{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit",timeZone:be})} · `:"","à¸à¸¹à¹à¸à¸µà¹à¸¡à¸µà¹à¸¡à¹à¸à¸´à¸à¸à¸¥à¸à¹à¸à¸¢à¸à¸§à¹à¸² 10 à¹à¸¡à¹à¸à¸°à¹à¸¡à¹à¹à¸ªà¸à¸ · à¸à¸¥à¸¢à¹à¸à¸à¸«à¸¥à¸±à¸à¹à¸¡à¹à¸à¸²à¸£à¸±à¸à¸à¸µà¸à¸¥à¸à¸à¸²à¸à¸"]})]}),ne&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 p-4",onClick:()=>!te&&Le(null),children:e.jsxs("div",{className:"w-full max-w-lg rounded-2xl border border-white/10 bg-[#0e1420] p-5",onClick:t=>t.stopPropagation(),children:[e.jsxs("h3",{className:"text-base font-semibold",children:["ð à¹à¸à¹à¸ªà¸¹à¸à¸£à¸à¸à¸ ",ne.name]}),e.jsxs("p",{className:"mt-1 text-xs text-slate-400",children:["Net ",Number(ne.net_pct)>0?"+":"",ne.net_pct,"% · ",ne.win,"-",ne.loss," à¹à¸¡à¹ (",ne.win_rate,"%) à¹à¸à¸à¹à¸§à¸ ",(Fl=sn.find(t=>t.v===L))==null?void 0:Fl.l]}),e.jsx("p",{className:"mt-4 text-[11px] text-slate-500",children:"สูà¸à¸£à¹à¸«à¸¡à¹à¸à¸µà¹à¸à¸°à¹à¸à¹"}),e.jsx("div",{className:"mt-1 rounded-xl border border-cyan-500/25 bg-cyan-500/[0.06] p-2.5",children:e.jsx(Vs,{cfg:{...ne.cfg,tz:null}})}),e.jsx("p",{className:"mt-3 text-[11px] text-slate-500",children:"สูà¸à¸£à¹à¸à¸´à¸¡à¸à¸à¸à¸à¸¸à¸ (à¸à¸°à¸à¸¹à¸à¸à¸±à¸)"}),e.jsx("div",{className:"mt-1 rounded-xl border border-white/10 bg-white/[0.02] p-2.5 opacity-70",children:e.jsx(Vs,{cfg:{pairs:me,conf:xt,risk:mt,interval_min:Xe,mtf:js,smc:Ns,pa:pt}})}),e.jsxs("p",{className:"mt-4 rounded-lg border border-white/10 bg-white/[0.03] px-3 py-2 text-[11px] leading-relaxed text-slate-400",children:["à¸à¹à¸à¸à¹à¸à¸à¸²à¸°",e.jsx("b",{className:"text-slate-300",children:" à¸à¸¹à¹à¹à¸à¸´à¸ · à¸à¸§à¸²à¸¡à¸¡à¸±à¹à¸à¹à¸ · à¸à¸§à¸²à¸¡à¹à¸ªà¸µà¹à¸¢à¸ · à¸à¸§à¸²à¸¡à¸à¸µà¹ · à¸à¸±à¸§à¸à¸£à¸à¸"})," à¹à¸à¹à¸²à¸à¸±à¹à¸ · à¸à¸à¸/à¸à¸¥à¸¸à¹à¸¡/Discord webhook à¹à¸¥à¸°à¹à¸à¸à¹à¸§à¸¥à¸²à¸à¸à¸à¸à¸¸à¸",e.jsx("b",{className:"text-slate-300",children:" à¹à¸¡à¹à¸à¸¹à¸à¹à¸à¸°"})," · à¸à¸±à¸à¸à¸¶à¸à¸à¸±à¸à¸à¸µà¹à¸¡à¸·à¹à¸à¸à¸à¸¢à¸·à¸à¸¢à¸±à¸ · ",e.jsx("span",{className:"text-amber-300/90",children:"à¸à¸¥à¸¢à¹à¸à¸à¸«à¸¥à¸±à¸à¹à¸¡à¹à¸à¸²à¸£à¸±à¸à¸à¸µà¸à¸¥à¸à¸à¸²à¸à¸"})]}),e.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[e.jsx("button",{onClick:()=>Le(null),disabled:te,className:"rounded-xl border border-white/10 px-3.5 py-2 text-sm text-slate-300 hover:bg-white/5 disabled:opacity-50",children:"ยà¸à¹à¸¥à¸´à¸"}),e.jsx("button",{onClick:()=>qn(ne),disabled:te,className:"rounded-xl border border-cyan-500/40 bg-cyan-500/15 px-3.5 py-2 text-sm font-medium text-cyan-300 hover:bg-cyan-500/25 disabled:opacity-50",children:te?"à¸à¸³à¸¥à¸±à¸à¹à¸à¹à¸ªà¸¹à¸à¸£â¦":"ยืà¸à¸¢à¸±à¸à¹à¸à¹à¸ªà¸¹à¸à¸£à¸à¸µà¹"})]})]})}),A&&e.jsx(vr,{summary:A,range:L,onClose:()=>G(null)})]}),c==="footprint"&&e.jsxs("div",{className:"space-y-5",children:[e.jsxs("section",{className:`${q} border !border-amber-500/25`,children:[e.jsxs("div",{className:"mb-2 flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ql,{size:26}),e.jsx("h2",{className:"text-base font-semibold",children:"Footprint Lab"}),e.jsx("span",{className:"rounded-full border border-amber-500/40 bg-amber-500/10 px-2 py-0.5 text-xs font-bold text-amber-300",children:"Add-On à¹à¸«à¸¡à¹"}),(k==null?void 0:k.on)&&e.jsx("span",{className:"rounded-full border border-emerald-500/40 bg-emerald-500/10 px-2 py-0.5 text-xs font-medium text-emerald-300",children:"â
à¹à¸à¸´à¸à¸£à¸±à¸à¸à¸¢à¸¹à¹"})]}),e.jsxs("div",{className:"text-right",children:[e.jsxs("p",{className:"text-sm font-bold text-amber-300",children:[(k==null?void 0:k.cost)??50," à¹à¸à¸£à¸à¸´à¸ / 30 วัà¸"]}),(k==null?void 0:k.paid)&&!k.unlimited&&k.expiresAt&&e.jsxs("p",{className:"text-[11px] text-emerald-300",children:["à¹à¸à¹à¹à¸à¹à¸à¸¶à¸ ",new Date(k.expiresAt).toLocaleDateString("th-TH",{day:"2-digit",month:"short",year:"numeric"})," · à¹à¸«à¸¥à¸·à¸ ",Math.max(0,Math.ceil((new Date(k.expiresAt).getTime()-Date.now())/864e5))," วัà¸"]}),(k==null?void 0:k.unlimited)&&e.jsx("p",{className:"text-[11px] text-slate-500",children:"à¸à¹à¸à¸à¸à¸à¸à¹à¸à¸à¸¡à¸´à¸ · à¹à¸¡à¹à¸à¸³à¸à¸±à¸"})]})]}),e.jsx("p",{className:"text-sm leading-relaxed text-slate-400",children:"สัà¸à¸à¸²à¸ order flow à¸à¸²à¸ tape à¸à¸£à¸´à¸ â bidÃask footprint, CVD divergence, absorption, à¸à¸³à¹à¸à¸ orderbook à¸à¸£à¹à¸à¸¡à¸à¸£à¸§à¸ spoof â à¸à¸à¸¥à¸°à¹à¸à¸à¸à¸´à¸à¸à¸±à¸à¸ªà¸±à¸à¸à¸²à¸à¸«à¸¥à¸±à¸ à¸à¸¸à¸à¹à¸¡à¹à¹à¸à¸§à¹à¸ªà¸à¸´à¸à¸´à¸ªà¸à¹à¸à¸à¹à¸à¸à¸§à¸²à¸¡ à¹à¸¥à¸°à¸¡à¸µà¸ªà¸£à¸¸à¸à¸à¸¥à¸£à¸²à¸¢à¸§à¸±à¸/รายสัà¸à¸à¸²à¸«à¹à¹à¸à¹à¸²à¸«à¹à¸à¸à¸à¸±à¸à¹à¸à¸¡à¸±à¸à¸´"}),e.jsx("p",{className:"mt-1.5 text-[11px] text-amber-300/80",children:"â ï¸ Beta à¸à¸³à¸¥à¸±à¸à¹à¸à¹à¸à¸ªà¸à¸´à¸à¸´ â à¸à¸¢à¹à¸²à¹à¸à¸£à¸à¸à¸²à¸¡à¸à¹à¸§à¸¢à¹à¸à¸à¹à¸à¸£à¸´à¸à¸à¸à¸à¸§à¹à¸²à¸ªà¸à¸´à¸à¸´à¸à¸°à¸à¹à¸²à¸à¹à¸à¸à¸à¹ (à¹à¸£à¸²à¹
11à¸à¸§à¹à¸à¸¥à¸à¸£à¸´à¸à¸à¸¸à¸à¹à¸¡à¹ à¹à¸¡à¹à¸¡à¸µà¸à¸±à¸à¸à¸à¸)"}),k===null?e.jsx("p",{className:"mt-3 text-xs text-slate-500",children:"à¸à¸³à¸¥à¸±à¸à¹à¸«à¸¥à¸à¸ªà¸à¸²à¸à¸°â¦"}):k.paid?k.on?e.jsxs("div",{className:"mt-3 space-y-2",children:[e.jsxs("div",{className:"flex flex-wrap gap-1.5 text-[11px]",children:[k.hasTg&&k.tgOn&&e.jsxs("span",{className:"rounded-md border border-emerald-500/30 bg-emerald-500/10 px-2 py-1 text-emerald-300",children:["ð¨ Telegram · ",Wt.trim()?"à¸à¸¥à¸¸à¹à¸¡à¹à¸¢à¸":"à¸à¸¥à¸¸à¹à¸¡à¸ªà¸±à¸à¸à¸²à¸à¸«à¸¥à¸±à¸"]}),k.hasRoom&&k.dcOn&&e.jsx("span",{className:"rounded-md border border-emerald-500/30 bg-emerald-500/10 px-2 py-1 text-emerald-300",children:"ð¬ à¹à¸à¹à¸²à¸«à¹à¸à¸ Discord (Footprint Lab)"}),k.hasTg&&!k.tgOn&&e.jsx("span",{className:"rounded-md border border-slate-600/40 bg-white/5 px-2 py-1 text-slate-400",children:"⸠Telegram à¸à¸´à¸à¸à¸¢à¸¹à¹"}),k.hasRoom&&!k.dcOn&&e.jsx("span",{className:"rounded-md border border-slate-600/40 bg-white/5 px-2 py-1 text-slate-400",children:"⸠Discord à¸à¸´à¸à¸à¸¢à¸¹à¹"}),!k.hasTg&&!k.hasRoom&&e.jsx("span",{className:"rounded-md border border-amber-500/30 bg-amber-500/10 px-2 py-1 text-amber-300",children:"â ï¸ à¸¢à¸±à¸à¹à¸¡à¹à¸¡à¸µà¸à¸¥à¸²à¸¢à¸à¸²à¸ â à¹à¸à¸·à¹à¸à¸¡ Telegram à¹à¸à¹à¸à¹à¸ âà¸à¸±à¹à¸à¸à¹à¸²à¸à¸à¸â หรืà¸à¹à¸à¸´à¹à¸¡à¸«à¹à¸à¸ Discord à¹à¸à¸ 𧪠Footprint"}),(k.hasTg||k.hasRoom)&&!(k.hasTg&&k.tgOn)&&!(k.hasRoom&&k.dcOn)&&e.jsx("span",{className:"rounded-md border border-amber-500/30 bg-amber-500/10 px-2 py-1 text-amber-300",children:"â ï¸ à¸à¸´à¸à¸à¸¸à¸à¸à¸¥à¸²à¸¢à¸à¸²à¸ â à¹à¸à¸´à¸à¸£à¸±à¸à¸à¸¢à¸¹à¹à¹à¸à¹à¹à¸¡à¹à¸¡à¸µà¸à¸°à¹à¸£à¸à¸¹à¸à¸ªà¹à¸à¸à¸à¸"})]}),e.jsx("button",{type:"button",onClick:()=>ll(!1),disabled:Se,className:"rounded-lg border border-white/10 px-3 py-1.5 text-xs text-slate-400 hover:bg-white/5 disabled:opacity-50",children:Se?"à¸à¸³à¸¥à¸±à¸à¸à¸±à¸à¸à¸¶à¸â¦":"à¸à¸´à¸à¸à¸²à¸£à¸£à¸±à¸"})]}):e.jsxs("div",{className:"mt-3 space-y-2",children:[e.jsx("input",{className:oe,type:"text",autoComplete:"off",placeholder:"(à¸à¹à¸²à¹à¸à¹ Discord) วาภWebhook หà¹à¸à¸à¸à¸µà¹à¸à¸°à¸£à¸±à¸ Footprint â à¹à¸§à¹à¸à¸§à¹à¸²à¸à¹à¸à¹à¸à¹à¸²à¸£à¸±à¸à¸à¸²à¸ Telegram",value:Qa,onChange:t=>el(t.target.value)}),e.jsx("button",{type:"button",onClick:()=>ll(!0),disabled:Se||!k.vipActive,className:"rounded-xl bg-amber-500/90 px-4 py-2 text-sm font-semibold text-slate-950 hover:bg-amber-400 disabled:opacity-50",children:Se?"à¸à¸³à¸¥à¸±à¸à¹à¸à¸´à¸â¦":"𧪠à¹à¸à¸´à¸à¸£à¸±à¸à¸ªà¸±à¸à¸à¸²à¸"}),e.jsx("p",{className:"text-[11px] text-emerald-300/80",children:"â
à¸à¹à¸²à¸¢à¹à¸¥à¹à¸§à¹à¸à¸£à¸à¸à¸à¸µà¹ â à¹à¸à¸´à¸à¸à¸¥à¸±à¸à¹à¸¡à¹à¹à¸ªà¸µà¸¢à¹à¸à¸£à¸à¸´à¸à¹à¸à¸´à¹à¸¡"}),!k.vipActive&&e.jsx("p",{className:"text-[11px] text-rose-300",children:"â VIP หมà¸à¸à¸²à¸¢à¸¸ â à¸à¹à¸à¸à¸²à¸¢à¸¸à¸à¹à¸à¸à¹à¸à¸´à¸à¹à¸à¹ Add-On"})]}):e.jsxs("div",{className:"mt-3 space-y-2",children:[k.on&&e.jsx("p",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-200",children:"Ⳡสิà¸à¸à¸´à¹ Add-On หมà¸à¸à¸²à¸¢à¸¸à¹à¸¥à¹à¸§ â ระà¸à¸à¸«à¸¢à¸¸à¸à¸ªà¹à¸à¸ªà¸±à¸à¸à¸²à¸ Footprint à¹à¸à¹à¸à¸±à¹à¸à¸à¹à¸²à¸à¸±à¹à¸à¸«à¸¡à¸à¸à¸à¸à¸à¸¸à¸à¸¢à¸±à¸à¸à¸¢à¸¹à¹à¸à¸£à¸ à¸à¹à¸à¸à¸²à¸¢à¸¸à¹à¸¥à¹à¸§à¸ªà¹à¸à¸à¹à¸à¸à¸±à¸à¸à¸µ"}),d.balance<(k.cost??50)?e.jsxs(e.Fragment,{children:[e.jsxs("a",{href:"/?buy=credits",className:"inline-block rounded-xl bg-cyan-600 px-4 py-2 text-sm font-semibold text-white hover:bg-cyan-500",children:["à¹à¸à¸´à¸¡à¹à¸à¸£à¸à¸´à¸ (มี ",d.balance," · à¸à¹à¸à¸à¹à¸à¹ ",k.cost,")"]}),e.jsx("p",{className:"text-[11px] text-slate-500",children:"à¹à¸à¸£à¸à¸´à¸à¹à¸¡à¹à¸à¸à¸ªà¸³à¸«à¸£à¸±à¸à¹à¸à¸´à¸à¹à¸à¹à¸à¸²à¸ Add-On à¸à¸µà¹"})]}):e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:Mn,disabled:Se||!k.vipActive,className:"rounded-xl bg-amber-500/90 px-4 py-2 text-sm font-semibold text-slate-950 hover:bg-amber-400 disabled:opacity-50",children:Se?"à¸à¸³à¸¥à¸±à¸à¸à¸³à¹à¸à¸´à¸à¸à¸²à¸£â¦":`𧪠${k.on?"à¸à¹à¸à¸à¸²à¸¢à¸¸":"à¹à¸à¸´à¸à¹à¸à¹à¸à¸²à¸"} · หัภ${k.cost} à¹à¸à¸£à¸à¸´à¸ (30 วัà¸)`}),e.jsxs("p",{className:"text-[11px] text-slate-500",children:["à¹à¸à¸£à¸à¸´à¸à¸à¸à¹à¸«à¸¥à¸·à¸ ",d.balance," · หัà¸à¸à¸£à¸±à¹à¸à¹à¸à¸µà¸¢à¸§ à¹à¸à¹à¹à¸à¹ 30 วัภà¸à¹à¸à¸à¸²à¸¢à¸¸à¸à¹à¸à¸à¸«à¸¡à¸à¸à¸°à¸à¸§à¸à¸§à¸±à¸à¸ªà¸°à¸ªà¸¡à¹à¸«à¹"]})]}),!k.vipActive&&e.jsx("p",{className:"text-[11px] text-rose-300",children:"â VIP หมà¸à¸à¸²à¸¢à¸¸ â à¸à¹à¸à¸à¸²à¸¢à¸¸ VIP à¸à¹à¸à¸à¹à¸à¸´à¸à¹à¸à¹ Add-On"})]}),Ja&&e.jsx("p",{className:"mt-2 rounded-lg bg-black/30 px-3 py-2 text-xs text-slate-200",children:Ja})]}),(k==null?void 0:k.on)&&e.jsxs("section",{className:q,children:[e.jsx("h2",{className:"mb-1 flex items-center gap-2 text-base font-semibold",children:"ð¨ à¸à¸¥à¸²à¸¢à¸à¸²à¸à¸à¸µà¹à¸à¸°à¸ªà¹à¸"}),e.jsx("p",{className:"mb-4 text-xs text-slate-500",children:"Footprint สà¹à¸à¹à¸à¹à¸à¸±à¹à¸ Telegram à¹à¸¥à¸° Discord â à¹à¸¥à¸·à¸à¸à¸à¸¢à¹à¸²à¸à¹à¸à¸à¸¢à¹à¸²à¸à¸«à¸à¸¶à¹à¸à¸«à¸£à¸·à¸à¸à¸±à¹à¸à¸à¸¹à¹à¸à¹à¹à¸à¹"}),(()=>{const t=({on:s,disabled:l,onChange:m})=>e.jsx("button",{type:"button",role:"switch","aria-checked":s,disabled:l,onClick:()=>m(!s),className:`relative h-5 w-9 shrink-0 rounded-full transition disabled:opacity-40 ${s?"bg-emerald-500/80":"bg-slate-600/60"}`,children:e.jsx("span",{className:`absolute top-0.5 h-4 w-4 roun
11ded-full bg-white transition-all ${s?"left-[1.15rem]":"left-0.5"}`})});return e.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[e.jsxs("div",{className:`rounded-xl border p-3 transition ${k.hasTg&&k.tgOn?"border-emerald-500/25 bg-emerald-500/[0.03]":"border-white/10 bg-slate-950/40"}`,children:[e.jsxs("div",{className:"mb-1 flex items-center justify-between gap-2",children:[e.jsx("p",{className:"text-sm font-medium text-slate-200",children:"ð¨ Telegram"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`text-[11px] ${k.tgOn?"text-emerald-300":"text-slate-500"}`,children:k.tgOn?"à¹à¸à¸´à¸à¸ªà¹à¸":"à¸à¸´à¸à¸à¸¢à¸¹à¹"}),e.jsx(t,{on:k.tgOn,disabled:!(h!=null&&h.has_bot)||Se,onChange:s=>nl("tg",s)})]})]}),h!=null&&h.has_bot?e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"mb-2 text-[11px] leading-relaxed text-slate-500",children:["à¹à¸§à¹à¸à¸§à¹à¸²à¸ = สà¹à¸à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡à¸ªà¸±à¸à¸à¸²à¸à¸«à¸¥à¸±à¸",k.mainChat?` (${k.mainChat})`:""," · à¹à¸ªà¹ chat_id à¹à¸à¸·à¹à¸à¹à¸¢à¸à¸à¸¥à¸¸à¹à¸¡ Footprint à¸à¸à¸à¸¡à¸² (à¸à¸à¸à¸à¹à¸à¸à¹à¸à¹à¸à¹à¸à¸à¸¡à¸´à¸à¹à¸à¸à¸¥à¸¸à¹à¸¡à¸à¸±à¹à¸)"]}),e.jsx("input",{className:oe,type:"text",autoComplete:"off",placeholder:"chat_id à¸à¸à¸à¸à¸¥à¸¸à¹à¸¡ Footprint à¹à¸à¹à¸ -1001234567890",value:Wt,onChange:s=>Za(s.target.value)}),e.jsx("button",{type:"button",onClick:Dn,disabled:Rs,className:"mt-2 rounded-lg border border-white/10 px-3 py-1.5 text-xs text-slate-300 hover:bg-white/5 disabled:opacity-50",children:Rs?"à¸à¸³à¸¥à¸±à¸à¸à¸±à¸à¸à¸¶à¸â¦":Wt.trim()?"à¸à¸±à¸à¸à¸¶à¸à¸à¸¥à¸¸à¹à¸¡à¹à¸¢à¸":"à¹à¸à¹à¸à¸¥à¸¸à¹à¸¡à¸«à¸¥à¸±à¸"})]}):e.jsx("p",{className:"text-xs text-amber-300/80",children:"ยัà¸à¹à¸¡à¹à¹à¸à¹à¹à¸à¸·à¹à¸à¸¡à¸à¸à¸ â à¹à¸à¸à¸µà¹à¹à¸à¹à¸ âà¸à¸±à¹à¸à¸à¹à¸²à¸à¸à¸â à¸à¹à¸à¸"})]}),e.jsxs("div",{className:`rounded-xl border p-3 transition ${k.hasRoom&&k.dcOn?"border-emerald-500/25 bg-emerald-500/[0.03]":"border-white/10 bg-slate-950/40"}`,children:[e.jsxs("div",{className:"mb-1 flex items-center justify-between gap-2",children:[e.jsx("p",{className:"text-sm font-medium text-slate-200",children:"ð¬ Discord"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`text-[11px] ${k.dcOn?"text-emerald-300":"text-slate-500"}`,children:k.dcOn?"à¹à¸à¸´à¸à¸ªà¹à¸":"à¸à¸´à¸à¸à¸¢à¸¹à¹"}),e.jsx(t,{on:k.dcOn,disabled:!k.hasRoom||Se,onChange:s=>nl("dc",s)})]})]}),k.hasRoom?e.jsx("p",{className:"text-[11px] leading-relaxed text-slate-500",children:"à¸à¸´à¸à¸ªà¸§à¸´à¸à¸à¹ = หยุà¸à¸ªà¹à¸à¸à¸±à¹à¸§à¸à¸£à¸²à¸§ à¹à¸à¹ webhook ยัà¸à¸à¸¹à¸à¹à¸à¹à¸à¹à¸§à¹ · à¹à¸à¹ webhook à¹à¸à¹à¸à¸µà¹à¹à¸à¹à¸ âà¸à¸±à¹à¸à¸à¹à¸²à¸à¸à¸â â Discord"}):e.jsx("p",{className:"text-[11px] leading-relaxed text-slate-500",children:"ยัà¸à¹à¸¡à¹à¸¡à¸µà¸«à¹à¸à¸ â à¹à¸à¸´à¹à¸¡à¸«à¹à¸à¸à¹à¸à¸ 𧪠Footprint à¸à¸µà¹à¹à¸à¹à¸ âà¸à¸±à¹à¸à¸à¹à¸²à¸à¸à¸â â Discord"})]})]})})()]}),(k==null?void 0:k.on)&&e.jsxs("section",{className:q,children:[e.jsx("h2",{className:"mb-1 flex items-center gap-2 text-base font-semibold",children:"ð สิà¸à¸à¸£à¸±à¸à¸¢à¹à¸à¸µà¹à¸à¸°à¸£à¸±à¸"}),e.jsx("p",{className:"mb-4 text-xs text-slate-500",children:"à¹à¸¡à¹à¹à¸¥à¸·à¸à¸à¹à¸¥à¸¢ = รัà¸à¸à¸¸à¸à¸à¸¹à¹à¸à¸µà¹à¸£à¸à¸à¸£à¸±à¸ · สัà¸à¸à¸²à¸à¹à¸¥à¸°à¸ªà¸£à¸¸à¸à¸à¸¥à¸£à¸²à¸¢à¸§à¸±à¸à¸à¸°à¸à¸±à¸à¹à¸à¸à¸²à¸°à¸à¸¹à¹à¸à¸µà¹à¸à¸¸à¸à¹à¸¥à¸·à¸à¸"}),oi.map(t=>{const s=k.supported||[],l=t.symbols.filter(_=>s.includes(_)),m=l.length>0,E=m&&l.every(_=>it.includes(_));return e.jsxs("div",{className:`mb-3 rounded-xl border p-3 ${m?"border-white/10 bg-slate-950/40":"border-white/[0.06] bg-white/[0.01]"}`,children:[e.jsxs("div",{className:"mb-2 flex flex-wrap items-center gap-2",children:[e.jsxs("span",{className:"text-sm font-medium text-slate-200",children:[t.icon," ",t.group]}),m?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"rounded-full border border-emerald-500/30 bg-emerald-500/10 px-2 py-0.5 text-[10px] text-emerald-300",children:["à¸à¸£à¹à¸à¸¡à¹à¸à¹à¸à¸²à¸ · ",l.length," à¸à¸¹à¹"]}),e.jsx("button",{type:"button",onClick:()=>Ts(_=>E?_.filter(I=>!l.includes(I)):[...new Set([..._,...l])]),className:"ml-auto rounded-lg border border-white/10 px-2.5 py-1 text-[11px] text-slate-300 hover:bg-white/5",children:E?"à¹à¸à¸²à¸à¸à¸à¸à¸±à¹à¸à¸«à¸¡à¸":"à¹à¸¥à¸·à¸à¸à¸à¸±à¹à¸à¸«à¸¡à¸"})]}):e.jsx("span",{className:"rounded-full border border-slate-600/40 bg-white/5 px-2 py-0.5 text-[10px] text-slate-400",children:"à¹à¸£à¹à¸§à¹ à¸à¸µà¹"})]}),t.note&&e.jsxs("p",{className:"mb-2 text-[10px] leading-relaxed text-amber-300/70",children:["ð ",t.note]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.symbols.map(_=>{const I=s.includes(_);return e.jsxs("button",{type:"button",disabled:!I,onClick:()=>Ln(_),title:I?ve(_):"ยัà¸à¹à¸¡à¹à¸£à¸à¸à¸£à¸±à¸",className:`rounded-md border px-2 py-1 text-[11px] transition ${I?it.includes(_)?"border-amber-500 bg-amber-500/10 text-amber-300":"border-white/10 text-slate-400 hover:bg-white/5":"cursor-not-allowed border-white/[0.06] text-slate-600 line-through"}`,children:[_,ve(_)&&e.jsxs("span",{className:"ml-1 opacity-60",children:["· ",ve(_)]})]},_)})})]},t.group)}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("button",{type:"button",onClick:An,disabled:Es,className:"rounded-xl bg-cyan-600 px-4 py-2 text-sm font-semibold text-white hover:bg-cyan-500 disabled:opacity-50",children:Es?"à¸à¸³à¸¥à¸±à¸à¸à¸±à¸à¸à¸¶à¸â¦":"à¸à¸±à¸à¸à¸¶à¸à¸ªà¸´à¸à¸à¸£à¸±à¸à¸¢à¹"}),e.jsx("span",{className:"text-xs text-slate-500",children:it.length===0?"à¸à¸à¸à¸à¸µà¹: รัà¸à¸à¸¸à¸à¸à¸¹à¹à¸à¸µà¹à¸£à¸à¸à¸£à¸±à¸":`à¸à¸à¸à¸à¸µà¹: รัภ${it.length} à¸à¸¹à¹`})]})]}),(()=>{const t=Q==null?void 0:Q.overall,s=S=>S==null?null:Number(S),l=S=>S==null?"â":`${Number(S)>=0?"+":""}${Number(S).toFixed(2)}R`,m=S=>S==null?"text-slate-300":Number(S)>=0?"text-emerald-300":"text-rose-300";s(t==null?void 0:t.net_r);const E=s(t==null?void 0:t.win_rate),_=s(t==null?void 0:t.avg_win_r),I=s(t==null?void 0:t.avg_loss_r),P=_&&I?Math.abs(I)/(_+Math.abs(I))*100:null;return e.jsxs("section",{className:q,children:[e.jsxs("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-2",children:[e.jsx("h2",{className:"flex items-center gap-2 text-base font-semibold",children:"ð สà¸à¸´à¸à¸´à¸¥à¸°à¹à¸à¸µà¸¢à¸ · à¸à¸³à¹à¸£-à¸à¸²à¸à¸à¸¸à¸"}),e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[it.length>0&&["lab","mine"].map(S=>e.jsx("button",{onClick:()=>kn(S),className:`rounded-lg px-2.5 py-1 text-xs ${Gt===S?"bg-cyan-500/15 text-cyan-300 ring-1 ring-cyan-500/40":"text-slate-400 hover:bg-white/5"}`,children:S==="lab"?"à¸à¸±à¹à¸ Lab":"à¹à¸à¸à¸²à¸°à¸à¸¹à¹à¸à¸à¸à¸à¸±à¸"},S)),e.jsx("span",{className:"mx-1 h-4 w-px bg-white/10"}),["7d","30d","all"].map(S=>e.jsx("button",{onClick:()=>_n(S),className:`rounded-lg px-2.5 py-1 text-xs ${qt===S?"bg-cyan-500/15 text-cyan-300 ring-1 ring-cyan-500/40":"text-slate-400 hover:bg-white/5"}`,children:S==="7d"?"7 วัà¸":S==="30d"?"30 วัà¸":"à¸à¸±à¹à¸à¸«à¸¡à¸"},S))]})]}),zt&&!Q?e.jsx("p",{className:"py-6 text-center text-xs text-slate-500",children:"à¸à¸³à¸¥à¸±à¸à¹à¸«à¸¥à¸à¸ªà¸à¸´à¸à¸´â¦"}):!t||!Number(t.trades)?e.jsx("p",{className:"py-6 text-center text-xs text-slate-500",children:"ยัà¸à¹à¸¡à¹à¸¡à¸µà¹à¸¡à¹à¸à¸µà¹à¸à¸´à¸à¹à¸à¸à¹à¸§à¸à¸à¸µà¹"}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[{k:"à¸à¸¥à¸£à¸§à¸¡ R",v:l(t.net_r),c:m(t.net_r),s:"à¸à¸£à¸±à¸à¸à¸²à¸¡à¸£à¸°à¸¢à¸° SL"},{k:"Winrate",v:E==null?"â":`${E.toFixed(1)}%`,c:"text-cyan-300",s:`à¸à¸à¸° ${t.wins} · à¹à¸à¹ ${t.losses}`},{k:"Profit Factor",v:t.profit_factor==null?"â":Number(t.profit_factor).toFixed(2),c:Number(t.profit_factor)>=1?"text-emerald-300":"text-rose-300",s:">1 = à¸à¸³à¹à¸£"}
11,{k:"à¸à¸¥à¸£à¸§à¸¡à¸£à¸²à¸à¸²",v:`${Number(t.net_pct)>=0?"+":""}${Number(t.net_pct).toFixed(2)}%`,c:m(t.net_pct),s:"à¸à¸¥à¸à¹à¸²à¸à¸£à¸²à¸à¸²à¸à¸´à¸"}].map(S=>e.jsxs("div",{className:"rounded-xl border border-white/10 bg-slate-950/40 p-3",children:[e.jsx("p",{className:"text-[11px] text-slate-400",children:S.k}),e.jsx("p",{className:`mt-0.5 text-2xl font-bold ${S.c}`,children:S.v}),e.jsx("p",{className:"text-[10px] text-slate-500",children:S.s})]},S.k))}),P!=null&&E!=null&&e.jsxs("div",{className:`mt-3 rounded-xl border px-3 py-2.5 text-xs leading-relaxed ${E>=P?"border-emerald-500/30 bg-emerald-500/5 text-emerald-200":"border-amber-500/30 bg-amber-500/5 text-amber-200"}`,children:["à¹à¸¡à¹à¸à¸à¸°à¹à¸à¸¥à¸µà¹à¸¢ ",e.jsx("b",{children:l(_)})," · à¹à¸¡à¹à¹à¸à¹à¹à¸à¸¥à¸µà¹à¸¢ ",e.jsx("b",{children:l(I)})," â à¸à¹à¸à¸à¸à¸à¸°à¸à¸¢à¹à¸²à¸à¸à¹à¸à¸¢"," ",e.jsxs("b",{children:[P.toFixed(1),"%"]})," à¸à¸¶à¸à¸à¸°à¹à¸ªà¸¡à¸à¸à¸±à¸§ · à¸à¸à¸à¸à¸µà¹à¸à¸à¸° ",e.jsxs("b",{children:[E.toFixed(1),"%"]})," ",E>=P?"â à¸à¸¢à¸¹à¹à¹à¸«à¸à¸·à¸à¸à¸¸à¸à¸à¸¸à¹à¸¡à¸à¸¸à¸":"â ยัà¸à¸à¹à¸³à¸à¸§à¹à¸²à¸à¸¸à¸à¸à¸¸à¹à¸¡à¸à¸¸à¸ (winrate สวยà¹à¸à¹à¸à¸²à¸à¸à¸¸à¸)"]}),e.jsx("div",{className:"mt-4 grid grid-cols-2 gap-3 sm:grid-cols-4",children:[{k:"Expectancy",v:t.expectancy_r==null?"â":`${Number(t.expectancy_r)>=0?"+":""}${Number(t.expectancy_r).toFixed(3)}R`,c:m(t.expectancy_r),s:"à¸à¹à¸à¹à¸¡à¹"},{k:"Max Drawdown",v:`-${Number(Q.max_drawdown_r).toFixed(2)}R`,c:"text-rose-300",s:"à¸à¸¸à¸à¸ªà¸¹à¸à¸ªà¸¸à¸âà¸à¹à¸³à¸ªà¸¸à¸"},{k:"à¹à¸¡à¹à¸à¸µà¸ªà¸¸à¸ / à¹à¸¢à¹à¸ªà¸¸à¸",v:`${l(t.best_r)} / ${l(t.worst_r)}`,c:"text-slate-200",s:`หมà¸à¹à¸§à¸¥à¸² ${t.expired} à¹à¸¡à¹`},{k:"à¸à¸´à¸à¸à¸±à¹à¸à¸«à¸¡à¸",v:`${t.trades} à¹à¸¡à¹`,c:"text-slate-200",s:`conf à¹à¸à¸¥à¸µà¹à¸¢ ${t.avg_conf}%`}].map(S=>e.jsxs("div",{className:"rounded-xl border border-white/10 bg-slate-950/40 p-3",children:[e.jsx("p",{className:"text-[11px] text-slate-400",children:S.k}),e.jsx("p",{className:`mt-0.5 text-base font-bold ${S.c}`,children:S.v}),e.jsx("p",{className:"text-[10px] text-slate-500",children:S.s})]},S.k))}),e.jsxs("div",{className:"mt-4",children:[e.jsx("p",{className:"mb-1 text-xs text-slate-400",children:"à¸à¸£à¸²à¸ R สะสม (à¸à¸¸à¸à¹à¸¡à¹à¸à¸µà¹à¸à¸´à¸ à¹à¸£à¸µà¸¢à¸à¸à¸²à¸¡à¹à¸§à¸¥à¸²)"}),e.jsx(kr,{points:Q.equity||[]}),(()=>{const S=Mr(Q.equity);return S.length>0?e.jsxs("div",{className:"mt-3 border-t border-white/10 pt-3",children:[e.jsx(Sr,{points:S,unit:"R"}),e.jsxs("p",{className:"mt-2 text-[10px] leading-relaxed text-slate-500",children:["Net R รายวัภ= à¸à¸¥à¸£à¸§à¸¡ R à¸à¸à¸à¹à¸¡à¹à¸à¸µà¹",e.jsx("b",{className:"text-slate-400",children:"à¸à¸´à¸à¸§à¸±à¸à¸à¸±à¹à¸"})," · วัà¸à¸à¸±à¸à¸à¸¥à¸¸à¹à¸¡à¸à¸²à¸¡à¹à¸§à¸¥à¸²à¹à¸à¸¢ · W/L à¸à¸±à¸à¸à¸²à¸à¹à¸à¸£à¸·à¹à¸à¸à¸«à¸¡à¸²à¸¢à¸à¸à¸ R"]})]}):null})()]}),Q.adv&&(Q.adv.closed??0)>0&&e.jsxs("div",{className:"mt-5 space-y-4 border-t border-white/10 pt-4",children:[e.jsx("p",{className:"flex items-center gap-1.5 text-xs font-medium text-slate-300",children:"ð สà¸à¸´à¸à¸´à¹à¸à¸´à¸à¸¥à¸¶à¸à¹à¸à¸ Myfxbook (à¸à¸´à¸à¸à¸¥à¸£à¸²à¸à¸² %)"}),e.jsxs("div",{className:"rounded-xl border border-white/10 bg-slate-950/40 p-3",children:[e.jsx("p",{className:"mb-1 text-xs text-slate-400",children:"à¸à¸¸à¸à¸ าà¸à¸£à¸°à¸à¸ · 4 มิà¸à¸´"}),e.jsx(Il,{adv:Q.adv,lowSampleAt:100,basisNote:e.jsxs(e.Fragment,{children:["à¹à¸£à¸à¸²à¸£à¹à¸à¸µà¹à¸à¹à¸²à¸à¸à¸²à¸",e.jsx("b",{children:"à¸à¸¥à¸£à¸²à¸à¸² %"})," â Footprint à¸à¸±à¸à¸ªà¸´à¸à¸à¸£à¸´à¸à¸à¸µà¹ ",e.jsx("b",{children:"R"})," (à¸à¸¹à¸à¸¥à¹à¸à¸ R à¸à¹à¸²à¸à¸à¸)"]})})]}),e.jsx(Ol,{adv:Q.adv}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[e.jsxs("div",{className:"rounded-xl border border-white/10 bg-slate-950/40 p-3",children:[e.jsx("p",{className:"mb-1 text-xs text-slate-400",children:"à¸à¸à¸° vs à¹à¸à¹ · รายà¸à¸±à¹à¸§à¹à¸¡à¸"}),e.jsx(Bl,{data:Q.hourly??[]})]}),e.jsxs("div",{className:"rounded-xl border border-white/10 bg-slate-950/40 p-3",children:[e.jsx("p",{className:"mb-1 text-xs text-slate-400",children:"à¸à¸à¸° vs à¹à¸à¹ · รายวัà¸à¹à¸à¸ªà¸±à¸à¸à¸²à¸«à¹"}),e.jsx(Wl,{data:Q.daily??[]})]})]}),Array.isArray(Q.monthly)&&Q.monthly.length>0&&e.jsxs("div",{className:"rounded-xl border border-white/10 bg-slate-950/40 p-3",children:[e.jsx("p",{className:"mb-1 text-xs text-slate-400",children:"à¸à¸³à¹à¸£à¸£à¸²à¸¢à¹à¸à¸·à¸à¸ (Net %)"}),e.jsx(Ar,{data:Q.monthly})]}),Array.isArray(Q.points)&&Q.points.length>0&&e.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[e.jsxs("div",{className:"rounded-xl border border-white/10 bg-slate-950/40 p-3",children:[e.jsx("p",{className:"mb-1 text-xs text-slate-400",children:"Duration · ระยะà¹à¸§à¸¥à¸²à¸à¸·à¸ vs à¸à¸¥"}),e.jsx(Hl,{data:Q.points})]}),e.jsxs("div",{className:"rounded-xl border border-white/10 bg-slate-950/40 p-3",children:[e.jsx("p",{className:"mb-1 text-xs text-slate-400",children:"MAE · à¸à¸²à¸£à¸à¸²à¸à¸à¸¸à¸à¸ªà¸§à¸à¸à¸²à¸à¸ªà¸¹à¸à¸ªà¸¸à¸"}),e.jsx(ql,{data:Q.points})]})]}),e.jsxs("p",{className:"text-[10px] leading-relaxed text-slate-500",children:["à¸à¸¥à¹à¸à¸à¸à¸µà¹à¸à¸´à¸",e.jsx("b",{className:"text-slate-400",children:"à¸à¸¥à¸£à¸²à¸à¸² %"})," (à¹à¸ªà¸£à¸´à¸¡à¸à¸²à¸à¸¡à¸¸à¸¡à¸¡à¸à¸ R à¸à¹à¸²à¸à¸à¸ â Footprint Lab à¸à¸±à¸à¸ªà¸´à¸à¸à¸µà¹ R à¹à¸à¹à¸à¸«à¸¥à¸±à¸) · Sharpe/StdDev/AHPR/GHPR à¹à¸à¹à¸à¸à¹à¸²",e.jsx("b",{className:"text-slate-400",children:"à¸à¹à¸à¹à¸¡à¹"})," วัà¸à¸à¸¸à¸à¸ าà¸à¸£à¸°à¸à¸ à¹à¸¡à¹à¹à¸à¹ % à¸à¸à¸£à¹à¸à¸à¸£à¸´à¸ · MAE à¸à¸³à¸à¸§à¸à¸à¸²à¸à¸£à¸²à¸à¸² OHLC à¸à¸£à¸´à¸à¸£à¸°à¸«à¸§à¹à¸²à¸à¸à¸·à¸à¹à¸¡à¹"]})]}),e.jsxs("div",{className:"mt-4 grid gap-4 lg:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"mb-1.5 text-xs font-medium text-slate-300",children:"รายà¸à¸¹à¹"}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left text-xs",children:[e.jsx("thead",{className:"text-slate-500",children:e.jsxs("tr",{children:[e.jsx("th",{className:"py-1",children:"à¸à¸¹à¹"}),e.jsx("th",{children:"à¹à¸¡à¹"}),e.jsx("th",{children:"Winrate"}),e.jsx("th",{className:"text-right",children:"R"})]})}),e.jsx("tbody",{children:(Q.by_asset||[]).map(S=>e.jsxs("tr",{className:"border-t border-white/[0.04]",children:[e.jsx("td",{className:"py-1.5 font-medium text-slate-200",children:S.asset}),e.jsx("td",{className:"text-slate-400",children:S.trades}),e.jsx("td",{className:"text-slate-400",children:S.win_rate==null?"â":`${S.win_rate}%`}),e.jsx("td",{className:`text-right font-semibold ${m(S.net_r)}`,children:l(S.net_r)})]},S.asset))})]})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"mb-1.5 text-xs font-medium text-slate-300",children:"à¸à¸²à¸¡à¸à¸´à¸¨à¸à¸²à¸"}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:(Q.by_direction||[]).map(S=>e.jsxs("div",{className:"rounded-lg border border-white/10 bg-slate-950/40 p-2.5",children:[e.jsx("p",{className:`text-xs font-semibold ${S.direction==="BUY"?"text-emerald-300":"text-rose-300"}`,children:S.direction}),e.jsx("p",{className:`text-lg font-bold ${m(S.net_r)}`,children:l(S.net_r)}),e.jsxs("p",{className:"text-[10px] text-slate-500",children:[S.trades," à¹à¸¡à¹ · ",S.win_rate??"â","%"]})]},S.direction))})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1.5 text-xs font-medium text-slate-300",children:"à¸à¸²à¸¡à¸£à¸¹à¸à¹à¸à¸ setup"}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:(Q.by_setup||[]).map(S=>e.jsxs("div",{className:"rounded-lg border border-white/10 bg-slate-950/40 p-2.5",children:[e.jsx("p",{className:"text-xs font-semibold text-slate-300",children:S.setup}),e.jsx("p",{className:`text-lg font-bold ${m(S.net_r)}`,children:l(S.net_r)}),e.jsxs("p",{className:"text-[10px] text-slate-500",children:[S.trades," à¹à¸¡à¹ · ",S.win_rate??"â","%"]})]},S.setup))})]})]})]}),(()=>{const S=Number(Q.page_size)||10,ye=Number(Q.recent_total)||0,ue=Math.max(1,Math.ceil(ye/S)),se=Math.min(Fs,ue),we=2,Ce=[];for(let H=1;H<=ue;H++)H===1||H===ue||H>=se-we&&H<=se+we?Ce.push(H):Ce[Ce.length-1]!=="â¦"&&Ce.push("â¦");const Qe="rounded-md px-2.5 py-1 text-xs transition disabled:opacity-40";return e.jsxs("div",{className:"mt-4 rounded-xl border border-white/10 bg-slate-950/40 p-3",children:[e.jsxs("div",{className:"mb-2 flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("p",{className:"text-xs font-medium text-slate-300",children:["à¹à¸¡à¹à¸à¸µà¹à¸à¸´à¸à¹à¸¥à¹à¸§ (",ye," à¹à¸¡à¹)"]}),e.jsxs("p",{className:"text-[11px] text-slate-500",children:["หà¸à¹à¸² ",se," / ",ue]})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left text-xs",children:[e.jsx("thead",{className:"text-slate-500",children:e.jsxs("tr",{children:[e.jsx("th",{className:"py-1",children:"à¹à¸§à¸¥à¸²"}),e.jsx("th",{children:"à¸à¸¹à¹"}),e.jsx("th",{children:"à¸à¸´à¸¨"}),e.jsx("th",{children:"à¸à¸¥"}),e.jsx("th",{children:"setup"}),e.jsx("th",{className:"text-right",children:"%"}),e.jsx("th",{className:"text-right",children:"R"})]})}),e.jsx("tbody",{children:(Q.recent||[]).map((H,gt)=>e.jsxs("tr",{className:"border-t border-white/[0.04]",children:[e.jsx("td",{className:"py-1.5 text-slate-500",children:new Date(H.closed_at).toLocaleStr
11ing("th-TH",{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit",timeZone:be})}),e.jsx("td",{className:"font-medium text-slate-200",children:H.asset}),e.jsx("td",{className:H.direction==="BUY"?"text-emerald-300":"text-rose-300",children:H.direction}),e.jsx("td",{children:H.outcome==="WIN"?"â
":H.outcome==="LOSS"?"â":"â±"}),e.jsx("td",{className:"text-slate-500",children:H.setup}),e.jsxs("td",{className:`text-right ${m(H.pct)}`,children:[Number(H.pct)>=0?"+":"",Number(H.pct).toFixed(2),"%"]}),e.jsx("td",{className:`text-right font-semibold ${m(H.r)}`,children:l(H.r)})]},`${H.closed_at}-${H.asset}-${gt}`))})]})}),ue>1&&e.jsxs("div",{className:"mt-3 flex flex-wrap items-center justify-center gap-1",children:[e.jsx("button",{className:`${Qe} text-slate-400 hover:bg-white/5`,disabled:se<=1||zt,onClick:()=>Ht(se-1),children:"â à¸à¹à¸à¸à¸«à¸à¹à¸²"}),Ce.map((H,gt)=>H==="â¦"?e.jsx("span",{className:"px-1 text-xs text-slate-600",children:"â¦"},`e${gt}`):e.jsx("button",{disabled:zt,onClick:()=>Ht(H),className:`${Qe} ${H===se?"bg-cyan-500/15 font-semibold text-cyan-300 ring-1 ring-cyan-500/40":"text-slate-400 hover:bg-white/5"}`,children:H},H)),e.jsx("button",{className:`${Qe} text-slate-400 hover:bg-white/5`,disabled:se>=ue||zt,onClick:()=>Ht(se+1),children:"à¸à¸±à¸à¹à¸ â"})]})]})})(),e.jsx("p",{className:"mt-3 text-[11px] text-slate-500",children:"à¸à¸±à¸à¹à¸à¸à¸²à¸°à¹à¸¡à¹à¸à¸µà¹à¸ªà¹à¸à¹à¸à¹à¸²à¸«à¹à¸à¸à¸à¸£à¸´à¸ (à¹à¸¡à¹à¸£à¸§à¸¡à¹à¸¡à¹ shadow à¸à¸µà¹à¹à¸à¹à¸§à¸±à¸à¸à¸¥à¸ ายà¹à¸) · R = à¸à¸³à¹à¸£/à¸à¸²à¸à¸à¸¸à¸ หารà¸à¹à¸§à¸¢à¸£à¸°à¸¢à¸° SL à¸à¸à¸à¹à¸¡à¹à¸à¸±à¹à¸"})]})]})})(),e.jsxs("section",{className:q,children:[e.jsxs("div",{className:"mb-1 flex flex-wrap items-center justify-between gap-2",children:[e.jsx("h2",{className:"text-base font-semibold",children:"ð¥ à¸à¸±à¸à¸à¸±à¸à¸à¸¥à¸¸à¹à¸¡ Footprint Lab (Net R)"}),e.jsx("div",{className:"flex gap-0.5 rounded-lg border border-white/10 p-0.5",children:["7d","30d","all"].map(t=>e.jsx("button",{onClick:()=>Cn(t),className:`rounded-md px-2.5 py-1 text-xs transition ${Vt===t?"bg-cyan-500/15 text-cyan-300":"text-slate-400 hover:text-slate-200"}`,children:t==="7d"?"7 วัà¸":t==="30d"?"30 วัà¸":"à¸à¸±à¹à¸à¸«à¸¡à¸"},t))})]}),e.jsxs("p",{className:"mb-4 text-[11px] leading-relaxed text-slate-500",children:["à¹à¸à¸µà¸¢à¸",e.jsx("b",{className:"text-slate-300",children:" à¸à¸¥à¸£à¸§à¸¡ R à¸à¸£à¸´à¸"}),"à¸à¸à¸à¸à¸¸à¸à¸à¸¥à¸¸à¹à¸¡à¸à¸µà¹à¹à¸à¸´à¸ Footprint Lab â à¸à¸±à¸à¹à¸à¸à¸²à¸°à¹à¸¡à¹à¸à¸µà¹à¸ªà¹à¸à¹à¸à¹à¸²à¸«à¹à¸à¸à¸à¸±à¹à¸à¸à¸£à¸´à¸ · à¹à¸à¹à¸à¸²à¸¡à¹à¸à¸à¹à¸à¸·à¹à¸à¸à¸§à¸²à¸¡à¹à¸à¹à¸à¸ªà¹à¸§à¸à¸à¸±à¸§ · ",e.jsx("span",{className:"text-emerald-300/90",children:"à¹à¸à¸§à¸à¸à¸à¸à¸¸à¸à¹à¸®à¹à¸¥à¸à¹à¸ªà¸µà¹à¸à¸µà¸¢à¸§ + à¸à¹à¸²à¸¢ âà¸à¸¸à¸â"})," · à¸à¸±à¸à¸à¸±à¸à¸à¹à¸²à¸à¸à¸±à¸à¹à¸à¸£à¸²à¸°à¹à¸à¹à¸¥à¸°à¸à¸¥à¸¸à¹à¸¡",e.jsx("b",{className:"text-slate-300",children:"à¹à¸¥à¸·à¸à¸à¸à¸¹à¹"}),"à¹à¸¥à¸°",e.jsx("b",{className:"text-slate-300",children:"à¹à¸£à¸´à¹à¸¡à¸£à¸±à¸"}),"à¹à¸¡à¹à¸à¸£à¹à¸à¸¡à¸à¸±à¸ · à¹à¸ªà¸à¸à¹à¸à¸à¸²à¸°à¸à¸¥à¸¸à¹à¸¡à¸à¸µà¹à¸¡à¸µà¹à¸¡à¹à¸à¸´à¸à¸à¸¥ ⥠10 à¹à¸¡à¹"]}),$n&&!Ue?e.jsx("p",{className:"text-xs text-slate-500",children:"à¸à¸³à¸¥à¸±à¸à¹à¸«à¸¥à¸â¦"}):(El=Ue==null?void 0:Ue.channels)!=null&&El.length?(()=>{const t=Ue.channels,s=Math.max(...t.map(l=>Math.abs(Number(l.net_r))),.1);return e.jsx("div",{className:"space-y-2.5",children:t.map(l=>{const m=Number(l.net_r)>=0,E=Math.min(1,Math.abs(Number(l.net_r))/s),_=l.rank===1?"border-amber-400/40 bg-amber-400/20 text-amber-300":l.rank===2?"border-slate-300/30 bg-slate-300/15 text-slate-200":l.rank===3?"border-orange-400/30 bg-orange-400/15 text-orange-300":"border-white/10 bg-white/5 text-slate-400";return e.jsxs("div",{className:`rounded-xl px-2 py-1.5 ${l.is_you?"bg-emerald-500/10 ring-1 ring-emerald-500/40":""}`,children:[e.jsxs("div",{className:"flex items-center gap-2.5 text-xs",children:[e.jsx("span",{className:`grid h-6 w-6 shrink-0 place-items-center rounded-lg border text-[11px] font-bold ${_}`,children:l.rank}),e.jsx("div",{className:"w-24 shrink-0 sm:w-28",children:e.jsxs("span",{className:"block truncate font-medium text-slate-200",children:[l.name,l.is_you&&e.jsx("span",{className:"ml-1 rounded bg-emerald-500/20 px-1 py-0.5 text-[9px] font-semibold text-emerald-300",children:"à¸à¸¸à¸"})]})}),e.jsxs("div",{className:"relative h-2.5 flex-1",children:[e.jsx("div",{className:"absolute inset-0 rounded-full bg-white/[0.04]"}),e.jsx("div",{className:"absolute left-1/2 top-0 h-full w-px bg-white/15"}),e.jsx("div",{className:"absolute top-0 h-full rounded-full",style:m?{left:"50%",width:`${E*50}%`,background:"#34d399"}:{right:"50%",width:`${E*50}%`,background:"#f87171"}})]}),e.jsxs("span",{className:"w-16 shrink-0 text-right font-semibold",style:{color:m?"#34d399":"#f87171"},children:[Number(l.net_r)>0?"+":"",Number(l.net_r).toFixed(2),"R"]}),e.jsxs("span",{className:"hidden w-24 shrink-0 text-right text-slate-400 sm:block",children:[l.win,"-",l.loss,l.win_rate!=null?` · ${l.win_rate}%`:""]})]}),e.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-1 pl-8 text-[10px] text-slate-500",children:[e.jsxs("span",{className:Number(l.net_pct)>=0?"text-emerald-400/80":"text-rose-400/80",children:["ราà¸à¸² ",Number(l.net_pct)>0?"+":"",l.net_pct,"%"]}),e.jsxs("span",{children:["· ",l.trades," à¹à¸¡à¹"]}),e.jsx("span",{children:"· รัà¸:"}),Array.isArray(l.assets)&&l.assets.length?e.jsxs(e.Fragment,{children:[l.assets.slice(0,6).map(I=>e.jsx("span",{className:"rounded border border-white/10 bg-white/5 px-1 py-px text-slate-400",children:I},I)),l.assets.length>6&&e.jsxs("span",{children:["+",l.assets.length-6," à¸à¸¹à¹"]})]}):e.jsx("span",{className:"text-slate-400",children:"à¸à¸¸à¸à¸à¸¹à¹à¸à¸µà¹à¸£à¸à¸à¸£à¸±à¸"}),l.pid&&e.jsx("button",{onClick:()=>al({pid:l.pid,name:l.name,rank:Number(l.rank),net_r:Number(l.net_r),net_pct:Number(l.net_pct),win:Number(l.win),loss:Number(l.loss),win_rate:l.win_rate==null?0:Number(l.win_rate),assets:Array.isArray(l.assets)?l.assets:null}),className:"ml-1 rounded-md border border-amber-500/40 bg-amber-500/10 px-1.5 py-0.5 text-[10px] font-medium text-amber-300 transition hover:bg-amber-500/20",children:"ð สà¸à¸´à¸à¸´à¹à¸à¸´à¸à¸¥à¸¶à¸"})]})]},l.rank)})})})():e.jsx("p",{className:"text-xs text-slate-500",children:"ยัà¸à¹à¸¡à¹à¸¡à¸µà¸à¸¥à¸¸à¹à¸¡à¸à¸µà¹à¸¡à¸µà¹à¸¡à¹à¸à¸´à¸à¸à¸¥à¸à¸£à¸ 10 à¹à¸¡à¹à¹à¸à¸à¹à¸§à¸à¸à¸µà¹"}),e.jsxs("p",{className:"mt-3 text-[10px] text-slate-600",children:[Ue!=null&&Ue.generated_at?`à¸à¸±à¸à¹à¸à¸à¸¥à¹à¸²à¸ªà¸¸à¸ ${new Date(Ue.generated_at).toLocaleStr
11ing("th-TH",{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit",timeZone:be})} · `:"","Net R = à¸à¸¥à¸£à¸§à¸¡à¸à¸³à¹à¸£/à¸à¸²à¸à¸à¸¸à¸à¸à¸à¸à¹à¸¡à¹à¸à¸µà¹à¸ªà¹à¸à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡à¸à¸±à¹à¸ หารà¸à¹à¸§à¸¢à¸£à¸°à¸¢à¸° SL à¸à¸à¸à¹à¸à¹à¸¥à¸°à¹à¸¡à¹ · à¸à¸¥à¸¢à¹à¸à¸à¸«à¸¥à¸±à¸à¹à¸¡à¹à¸à¸²à¸£à¸±à¸à¸à¸µà¸à¸¥à¸à¸à¸²à¸à¸"]})]}),sl&&e.jsx(Cr,{summary:sl,range:Vt,onClose:()=>al(null)})]}),c==="news"&&e.jsxs("div",{className:"space-y-4",children:[!(h!=null&&h.has_bot)&&e.jsx("p",{className:"rounded-xl border border-amber-500/20 bg-amber-500/[0.06] px-3.5 py-2.5 text-xs text-amber-300",children:"à¸à¸±à¹à¸à¸à¹à¸²à¸à¸à¸ + à¸à¸¥à¸¸à¹à¸¡à¸à¹à¸à¸ à¸à¸¶à¸à¸à¸°à¸ªà¹à¸à¸à¹à¸²à¸§à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡à¹à¸à¹"}),e.jsxs("section",{className:q,children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-semibold",children:"à¸à¹à¸²à¸§à¹à¸à¹à¸²à¸à¸£à¸°à¸à¸³à¸§à¸±à¸ ð"}),e.jsx("p",{className:"text-xs text-slate-400",children:"à¹à¸à¸ªà¸à¹à¸ªà¸£à¸¸à¸à¸à¸à¸´à¸à¸´à¸à¸à¹à¸²à¸§à¹à¸¨à¸£à¸©à¸à¸à¸´à¸à¸§à¸±à¸à¸à¸µà¹ + à¹à¸à¸§à¹à¸à¹à¸¡à¸£à¸²à¸¢à¸ªà¸´à¸à¸à¸£à¸±à¸à¸¢à¹ + à¸à¸à¸à¸²à¸£à¹à¸à¸£à¸à¸«à¸à¸¶à¹à¸à¸à¹à¸ à¸à¸£à¹à¸à¸¡à¸à¸²à¸£à¹à¸à¸£à¸¹à¸ â วัà¸à¸¥à¸°à¸à¸£à¸±à¹à¸ à¸à¸²à¸¡à¹à¸§à¸¥à¸²à¸à¸µà¹à¸à¸¸à¸à¹à¸¥à¸·à¸à¸"})]}),e.jsx(de,{on:St,onChange:pa})]}),St?e.jsxs("div",{className:"mt-4 space-y-3",children:[e.jsx("div",{className:"flex flex-wrap items-end gap-3",children:e.jsxs("div",{children:[e.jsx("p",{className:$e,children:"à¹à¸§à¸¥à¸²à¸ªà¹à¸ (à¹à¸§à¸¥à¸²à¸à¹à¸à¸à¸à¸´à¹à¸à¸à¸à¸à¸à¸¸à¸)"}),e.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[e.jsx("select",{value:lt,onChange:t=>ha(Number(t.target.value)),className:oe+" w-20",children:Array.from({length:24},(t,s)=>e.jsx("option",{value:s,children:String(s).padStart(2,"0")},s))}),e.jsx("span",{className:"text-slate-500",children:":"}),e.jsx("select",{value:nt,onChange:t=>ua(Number(t.target.value)),className:oe+" w-20",children:[0,15,30,45].map(t=>e.jsx("option",{value:t,children:String(t).padStart(2,"0")},t))}),e.jsxs("span",{className:"text-xs text-slate-500",children:["à¸. · ",be]})]})]})}),e.jsx("div",{className:"rounded-xl border border-white/10 bg-white/[0.02] px-3.5 py-2.5 text-xs",children:Hn?e.jsx("p",{className:"text-amber-300",children:"â ï¸ à¸¢à¸±à¸à¹à¸¡à¹à¹à¸à¹à¸à¸±à¸à¸à¸¶à¸ â à¸à¸ âà¸à¸±à¸à¸à¸¶à¸â à¸à¹à¸à¸ à¸à¸²à¸£à¸à¸±à¹à¸à¸à¹à¸²à¸à¸µà¹à¸à¸¶à¸à¸à¸°à¸¡à¸µà¸à¸¥"}):h!=null&&h.brief_enabled?e.jsxs("p",{className:"text-slate-300",children:["ð® à¹à¸à¸ªà¸à¹à¸à¸±à¸à¹à¸: ",e.jsx("b",{className:"text-emerald-300",children:ol}),e.jsx("span",{className:"text-slate-500",children:" · ระà¸à¸à¸ªà¹à¸à¹à¸à¸à¸à¸±à¸à¹à¸à¸¡à¸±à¸à¸´ วัà¸à¸¥à¸°à¸à¸£à¸±à¹à¸ à¹à¸¡à¹à¸à¹à¸à¸à¸à¸à¸à¸°à¹à¸£"})]}):e.jsxs("p",{className:"text-slate-400",children:["à¹à¸à¸´à¸à¸ªà¸§à¸´à¸à¸à¹à¹à¸¥à¹à¸§à¸à¸ âà¸à¸±à¸à¸à¸¶à¸â â à¹à¸à¸ªà¸à¹à¹à¸£à¸à¸à¸°à¹à¸à¹à¸ ",e.jsx("b",{className:"text-slate-200",children:ol}),e.jsx("span",{className:"text-slate-500",children:" · à¸à¹à¸²à¹à¸à¸´à¸à¸«à¸¥à¸±à¸à¹à¸§à¸¥à¸²à¸à¸µà¹à¸à¸±à¹à¸à¹à¸§à¹ ระà¸à¸à¸à¸°à¹à¸£à¸´à¹à¸¡à¹à¸«à¹à¸à¸£à¸¸à¹à¸à¸à¸µà¹ à¹à¸¡à¹à¸ªà¹à¸à¸¢à¹à¸à¸à¸à¸±à¸à¸à¸µ"})]})}),e.jsxs("div",{className:"rounded-xl border border-cyan-500/20 bg-cyan-500/[0.04] p-3.5 text-xs leading-relaxed text-slate-400",children:[e.jsx("p",{className:"mb-1.5 font-medium text-cyan-300",children:"à¹à¸à¸ªà¸à¹à¸à¸µà¹à¸¡à¸µà¸à¸°à¹à¸£à¸à¹à¸²à¸"}),e.jsxs("ul",{className:"list-inside list-disc space-y-1",children:[e.jsx("li",{children:"à¸à¸à¸´à¸à¸´à¸à¸à¹à¸²à¸§à¸§à¸±à¸à¸à¸µà¹ â à¹à¸§à¸¥à¸²à¹à¸à¸¢ à¸à¸£à¹à¸à¸¡à¸à¹à¸²à¸à¸²à¸/à¸à¸£à¸±à¹à¸à¸à¹à¸à¸ (à¸à¹à¸²à¸§à¸à¸µà¹à¸à¸à¸à¸à¸£à¹à¸à¸¡à¸à¸±à¸à¸£à¸§à¸¡à¹à¸à¹à¸à¸à¸£à¸£à¸à¸±à¸à¹à¸à¸µà¸¢à¸§)"}),e.jsxs("li",{children:["à¸à¸à¸§à¸´à¹à¸à¸£à¸²à¸°à¸«à¹ + à¹à¸à¸§à¹à¸à¹à¸¡à¸à¸µà¹à¸à¹à¸à¸à¸£à¸°à¸§à¸±à¸ à¹à¸à¸à¸²à¸°à¸ªà¸´à¸à¸à¸£à¸±à¸à¸¢à¹à¸à¸µà¹",e.jsx("span",{className:"text-slate-300",children:"à¸à¹à¸à¸à¸à¸¸à¸à¸ªà¹à¸à¸à¸¢à¸¹à¹"})]}),e.jsx("li",{children:"à¸à¸à¸à¸²à¸£à¹à¸à¸£à¸à¸«à¸à¸¶à¹à¸à¸à¹à¸à¸ªà¸³à¸«à¸£à¸±à¸à¸§à¸±à¸à¸à¸±à¹à¸"})]}),e.jsxs("p",{className:"mt-2 text-slate-500",children:["à¸à¸¸à¸à¸à¸£à¸°à¹à¸¢à¸à¹à¸à¹à¸à¹à¸à¸·à¹à¸à¸à¹à¸ (âà¸à¹à¸²â¦ à¸à¸²à¸â¦â) à¹à¸¡à¹à¸à¸±à¸à¸à¸à¸à¸´à¸¨à¸à¸²à¸ à¹à¸¥à¸°à¹à¸¡à¹à¸¡à¸µà¸à¸¸à¸à¹à¸à¹à¸²/à¸à¸¸à¸à¸à¸±à¸à¸à¸²à¸à¸à¸¸à¸"," · ","à¸à¹à¸²à¹à¸à¸´à¸ âà¹à¸¢à¸à¸à¸¥à¸¸à¹à¸¡à¸à¹à¸²à¸§â à¹à¸§à¹ à¹à¸à¸ªà¸à¹à¸à¸µà¹à¸à¸°à¹à¸à¸à¸¥à¸¸à¹à¸¡à¸à¹à¸²à¸§"]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("button",{onClick:Kt,disabled:qe,className:"rounded-xl bg-emerald-600 px-5 py-2 text-sm font-semibold text-white hover:bg-emerald-500 disabled:opacity-50",children:qe?"à¸à¸³à¸¥à¸±à¸à¸à¸±à¸à¸à¸¶à¸â¦":"à¸à¸±à¸à¸à¸¶à¸"}),e.jsx("button",{onClick:()=>cl("day"),disabled:$t||!(h!=null&&h.has_bot),title:"สà¹à¸à¸à¹à¸²à¸§à¹à¸à¹à¸²à¸à¸à¸à¸§à¸±à¸à¸à¸µà¹à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡à¸à¸±à¸à¸à¸µ à¹à¸à¸·à¹à¸à¸à¸¹à¸«à¸à¹à¸²à¸à¸²à¸à¸£à¸´à¸ (à¹à¸¡à¹à¸à¸£à¸°à¸à¸à¸£à¸à¸à¸ªà¹à¸à¸à¸±à¸à¹à¸à¸¡à¸±à¸à¸´à¸à¸à¸à¸§à¸±à¸à¸à¸µà¹)",className:"rounded-xl border border-cyan-500/40 bg-cyan-500/10 px-4 py-2 text-sm font-medium text-cyan-300 hover:bg-cyan-500/20 disabled:opacity-40",children:$t?"à¸à¸³à¸¥à¸±à¸à¸ªà¹à¸â¦":"สà¹à¸à¸à¸±à¸§à¸à¸¢à¹à¸²à¸à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡à¹à¸¥à¸¢"}),Ot&&e.jsx("span",{className:"text-sm text-emerald-400",children:"â à¸à¸±à¸à¸à¸¶à¸à¹à¸¥à¹à¸§"})]}),ga&&e.jsx("p",{className:"text-xs text-slate-300",children:ga}),e.jsxs("div",{className:"rounded-xl border border-white/10 p-3.5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-slate-200",children:"à¸à¸±à¸à¸«à¸¡à¸¸à¸à¸à¸à¸´à¸à¸´à¸à¸ªà¸±à¸à¸à¸²à¸«à¹ à¸à¸¸à¸à¸§à¸±à¸à¸à¸±à¸à¸à¸£à¹ ð"}),e.jsxs("p",{className:"mt-0.5 text-xs leading-relaxed text-slate-500",children:["à¹à¸à¹à¸²à¸§à¸±à¸à¸à¸±à¸à¸à¸£à¹à¸à¸°à¹à¸à¸ªà¸à¹à¸à¸à¸´à¸à¸´à¸à¸à¹à¸²à¸§à¹à¸£à¸à¸à¸±à¹à¸à¸ªà¸±à¸à¸à¸²à¸«à¹à¹à¸à¸´à¹à¸¡à¸à¸µà¸à¸«à¸à¸¶à¹à¸à¹à¸à¸ªà¸à¹ à¹à¸¥à¹à¸§",e.jsx("span",{className:"text-slate-300",children:"à¸à¸±à¸à¸«à¸¡à¸¸à¸"}),"à¹à¸§à¹à¸à¸à¸ªà¸¸à¸à¸à¸à¸à¸à¸¥à¸¸à¹à¸¡"," · ","à¸à¸à¸à¸à¹à¸à¸à¹à¸à¹à¸à¹à¸à¸à¸¡à¸´à¸à¹à¸¥à¸°à¸¡à¸µà¸ªà¸´à¸à¸à¸´à¹à¸à¸±à¸à¸«à¸¡à¸¸à¸ à¸à¹à¸²à¹à¸¡à¹à¸¡à¸µà¸ªà¸´à¸à¸à¸´à¹ à¹à¸à¸ªà¸à¹à¸¢à¸±à¸à¸ªà¹à¸à¸à¸à¸à¸´à¹à¸à¹à¸à¸°à¹à¸¡à¹à¸à¸¹à¸à¸à¸±à¸à¸«à¸¡à¸¸à¸"," · ","à¸à¸±à¹à¸ Discord à¸à¸±à¸à¸«à¸¡à¸¸à¸à¸à¹à¸²à¸ webhook à¹à¸¡à¹à¹à¸à¹ à¸à¸°à¸ªà¹à¸à¹à¸à¹à¸à¹à¸à¸ªà¸à¹à¸à¸£à¸£à¸¡à¸à¸²"]})]}),e.jsx(de,{on:Ct,onChange:ba})]}),Ct&&e.jsx("button",{onClick:()=>cl("week"),disabled:$t||!(h!=null&&h.has_bot),className:"mt-3 rounded-xl border border-emerald-500/40 bg-emerald-500/10 px-4 py-2 text-sm font-medium text-emerald-300 hover:bg-emerald-500/20 disabled:opacity-40",children:$t?"à¸à¸³à¸¥à¸±à¸à¸ªà¹à¸â¦":"à¸à¸¹à¸à¸±à¸§à¸à¸¢à¹à¸²à¸à¹à¸à¸ªà¸à¹à¸à¸±à¸à¸«à¸¡à¸¸à¸"})]})]}):e.jsx("p",{className:"mt-3 text-xs text-slate-500",children:"à¸à¸´à¸à¸à¸¢à¸¹à¹ â à¹à¸à¸´à¸à¹à¸à¸·à¹à¸à¹à¸«à¹à¸à¸¥à¸¸à¹à¸¡à¸¡à¸µà¹à¸à¸ªà¸à¹à¸à¸£à¸°à¸à¸³à¸à¸¸à¸à¹à¸à¹à¸² à¹à¸¡à¹à¹à¸à¹à¸à¸§à¸±à¸à¸à¸µà¹à¸¢à¸±à¸à¹à¸¡à¹à¸¡à¸µà¸ªà¸±à¸à¸à¸²à¸"})]}),e.jsxs("section",{className:q,children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-semibold",children:"à¹à¸¢à¸à¸à¸¥à¸¸à¹à¸¡à¸à¹à¸²à¸§ ð°"}),e.jsx("p",{className:"text-xs text-slate-400",children:"สà¹à¸à¸à¹à¸²à¸§ (+ à¸à¸à¸´à¸à¸´à¸à¹à¸¨à¸£à¸©à¸à¸à¸´à¸) à¹à¸à¹à¸²à¸à¸µà¸à¸à¸¥à¸¸à¹à¸¡à¸«à¸à¸¶à¹à¸ à¹à¸¢à¸à¸à¸²à¸à¸à¸¥à¸¸à¹à¸¡à¸ªà¸±à¸à¸à¸²à¸ â à¸à¸´à¸ = สà¹à¸à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡à¸ªà¸±à¸à¸à¸²à¸à¹à¸«à¸¡à¸·à¸à¸à¹à¸à¸´à¸¡"})]}),e.jsx(de,{on:Ss,onChange:La})]}),Ss?e.jsxs("div",{className:"mt-4 space-y-3",children:[e.jsxs("div",{className:"rounded-xl border border-cyan-500/20 bg-cyan-500/[0.04] p-3.5 text-xs leading-relaxed",children:[e.jsx("p",{className:"mb-1.5 font-medium text-cyan-300",children:"วิà¸à¸µà¸à¸±à¹à¸à¸à¸¥à¸¸à¹à¸¡à¸à¹à¸²à¸§ (à¸à¸³à¸à¸²à¸¡à¸à¸µà¹à¹à¸à¹à¹à¸¥à¸¢)"}),e.jsxs("ol",{className:"list-inside list-decimal space-y-1 text-slate-400",children:[e.jsxs("li",{children:["สรà¹à¸²à¸à¸à¸¥à¸¸à¹à¸¡ Telegram à¹à¸«à¸¡à¹à¸ªà¸³à¸«à¸£à¸±à¸à¸à¹à¸²à¸§ à¹à¸¥à¹à¸§à¹à¸à¸´à¹à¸¡",e.jsx("span",{className:"text-slate-200",children:"à¸à¸à¸à¸à¸±à¸§à¹à¸à¸´à¸¡"}),"à¹à¸à¹à¸²à¹à¸ à¸à¸±à¹à¸à¹à¸à¹à¸",e.jsx("span",{className:"text-slate-200",children:"à¹à¸à¸à¸¡à¸´à¸"})]}),e.jsxs("li",{children:["à¸à¸´à¸¡à¸à¹à¸à¸°à¹à¸£à¸à¹à¹à¸à¹à¹à¸à¸à¸¥à¸¸à¹à¸¡à¸à¹à¸²à¸§ ",e.jsx("span",{className:"text-slate-200",children:"1 à¸à¸£à¸±à¹à¸"})," (à¹à¸«à¹à¸à¸à¸à¸¡à¸à¸à¹à¸«à¹à¸à¸à¸¥à¸¸à¹à¸¡)"]}),e.jsxs("li",{children:["à¹à¸à¹à¸à¹à¸ ",e.jsx("span",{className:"text-cyan-300",children:"âà¸à¸±à¹à¸à¸à¹à¸²à¸à¸à¸â"})," à¸à¸ ",e.jsx("span",{className:"text-cyan-300",children:"âà¸à¸à¸ªà¸à¸à¸à¸à¸ & à¸à¸¶à¸ chat_idâ"})," à¸à¸°à¹à¸«à¹à¸à¸à¸¸à¸à¸à¸¥à¸¸à¹à¸¡à¸à¸µà¹à¸à¸à¸à¸à¸¢à¸¹à¹"]}),e.jsxs("li",{children:["à¸à¸¥à¸±à¸à¸¡à¸²à¸à¸µà¹à¸à¸µà¹ à¹à¸ªà¹/à¸à¸à¹à¸¥à¸·à¸à¸ ",e.jsx("span",{className:"text-slate-200",children:"chat_id à¸à¸à¸à¸à¸¥à¸¸à¹à¸¡à¸à¹à¸²à¸§"})," à¹à¸¥à¹à¸§à¸à¸ ",e.jsx("span",{className:"text-emerald-300",children:"âà¸à¸±à¸à¸à¸¶à¸â"})]})]}),e.jsx("p",{className:"mt-2 text-slate-500",children:"à¸à¹à¸²à¸§ + à¸à¸à¸´à¸à¸´à¸à¹à¸¨à¸£à¸©à¸à¸à¸´à¸à¸à¸°à¹à¸à¸à¸¥à¸¸à¹à¸¡à¸à¸µà¹ · สัà¸à¸à¸²à¸ (à¸à¸´à¸) ยัà¸à¸à¸¢à¸¹à¹à¸à¸¥à¸¸à¹à¸¡à¹à¸à¸´à¸¡ · à¸à¸´à¸à¸ªà¸§à¸´à¸à¸à¹à¹à¸¡à¸·à¹à¸à¹à¸«à¸£à¹ à¸à¹à¸²à¸§à¸à¸¥à¸±à¸à¹à¸à¸£à¸§à¸¡à¸à¸±à¸à¸à¸¥à¸¸à¹à¸¡à¸ªà¸±à¸à¸à¸²à¸"})]}),e.jsxs("div",{children:[e.jsx("p",{className:$e,children:"Chat ID à¸à¸à¸à¸à¸¥à¸¸à¹à¸¡à¸à¹à¸²à¸§"}),e.jsx("input",{className:oe+" mt-1",placeholder:"-100...",value:ht,onChange:t=>Cs(t.target.value)})]}),Ut.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"mb-1.5 text-[11px] text-slate-500",children:"à¸à¸¥à¸¸à¹à¸¡à¸à¸µà¹à¸à¸à¸à¸à¸¢à¸¹à¹ (à¸à¸à¹à¸à¸·à¹à¸à¹à¸ªà¹):"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:Ut.map(t=>e.jsxs("button",{onClick:()=>Cs(t.id),className:`rounded-lg border px-3 py-1.5 text-xs ${ht===t.id?"border-cyan-500 bg-cyan-500/10 text-cyan-300":"border-white/10 text-slate-300 hover:bg-white/5"}`,children:[t.title," ",e.jsxs("span",{className:"text-slate-500",children:["(",t.id,")"]})]},t.id))})]}),ht.trim()&&ht.trim()===((h==null?void 0:h.chat_id)||"")&&e.jsx("p",{className:"text-[11px] text-amber-400",children:"â ï¸ chat_id à¸à¸µà¹à¹à¸«à¸¡à¸·à¸à¸à¸à¸¥à¸¸à¹à¸¡à¸ªà¸±à¸à¸à¸²à¸ â à¸à¹à¸²à¸§à¸à¸°à¹à¸à¸à¸à¸à¸£à¸§à¸¡à¸à¸±à¸à¸à¸´à¸à¹à¸«à¸¡à¸·à¸à¸à¹à¸à¸´à¸¡"})]}):e.jsxs("p",{className:"mt-3 text-xs text-slate-500",children:["à¸à¸à¸à¸à¸µà¹à¸à¹à¸²à¸§à¸ªà¹à¸à¹à¸à¹à¸²",e.jsx("span",{className:"text-slate-300",children:"à¸à¸¥à¸¸à¹à¸¡à¸ªà¸±à¸à¸à¸²à¸"}),"à¹à¸à¸µà¸¢à¸§à¸à¸±à¸à¸à¸´à¸"]}
11),e.jsxs("div",{className:"mt-4 flex items-center gap-3",children:[e.jsx("button",{onClick:Kt,disabled:qe,className:"rounded-xl bg-emerald-600 px-5 py-2 text-sm font-semibold text-white hover:bg-emerald-500 disabled:opacity-50",children:qe?"à¸à¸³à¸¥à¸±à¸à¸à¸±à¸à¸à¸¶à¸â¦":"à¸à¸±à¸à¸à¸¶à¸"}),Ot&&e.jsx("span",{className:"text-sm text-emerald-400",children:"â à¸à¸±à¸à¸à¸¶à¸à¹à¸¥à¹à¸§"})]})]}),e.jsxs("section",{className:q,children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-semibold",children:"สà¹à¸à¸à¹à¸²à¸§à¸à¸±à¸à¹à¸à¸¡à¸±à¸à¸´ ð¤"}),e.jsx("p",{className:"text-xs text-slate-400",children:"ระà¸à¸à¸ªà¹à¸à¸à¹à¸²à¸§à¹à¸«à¸¡à¹à¸¥à¹à¸²à¸ªà¸¸à¸à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡à¹à¸à¸à¸à¸²à¸¡à¸£à¸à¸à¹à¸§à¸¥à¸² (à¹à¸¡à¹à¸à¹à¸à¸à¸à¸à¹à¸à¸)"})]}),e.jsx(de,{on:ks,onChange:Da})]}),ks&&e.jsxs("div",{className:"mt-4 grid grid-cols-1 gap-4 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:$e,children:"à¸à¸§à¸²à¸¡à¸à¸µà¹"}),e.jsxs("select",{className:oe+" mt-1",value:yl?Tt:"custom",onChange:t=>{t.target.value!=="custom"&&$s(Number(t.target.value))},children:[Nl.map(t=>e.jsx("option",{value:t.v,children:t.l},t.v)),e.jsx("option",{value:"custom",children:"à¸à¸³à¸«à¸à¸à¹à¸à¸â¦"})]}),!yl&&e.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[e.jsx("input",{className:oe,type:"number",min:5,value:Tt,onChange:t=>$s(Number(t.target.value))}),e.jsx("span",{className:"whitespace-nowrap text-xs text-slate-400",children:"à¸à¸²à¸à¸µ (à¸à¸±à¹à¸à¸à¹à¸³ 5)"})]})]}),e.jsxs("div",{children:[e.jsxs("p",{className:$e,children:["หมวà¸à¸à¹à¸²à¸§ ",e.jsx("span",{className:"text-slate-500",children:"(à¹à¸¡à¹à¹à¸¥à¸·à¸à¸ = à¸à¸¸à¸à¸«à¸¡à¸§à¸)"})]}),e.jsx("div",{className:"mt-1.5 flex flex-wrap gap-2",children:er.map(t=>e.jsx("button",{onClick:()=>Ra(s=>s.includes(t.id)?s.filter(l=>l!==t.id):[...s,t.id]),className:`rounded-lg border px-3 py-1.5 text-xs ${Ta.includes(t.id)?"border-cyan-500 bg-cyan-500/10 text-cyan-300":"border-white/10 text-slate-400 hover:bg-white/5"}`,children:t.label},t.id))})]})]}),e.jsxs("div",{className:"mt-4 flex items-center gap-3",children:[e.jsx("button",{onClick:Kt,disabled:qe,className:"rounded-xl bg-emerald-600 px-5 py-2 text-sm font-semibold text-white hover:bg-emerald-500 disabled:opacity-50",children:qe?"à¸à¸³à¸¥à¸±à¸à¸à¸±à¸à¸à¸¶à¸â¦":"à¸à¸±à¸à¸à¸¶à¸"}),Ot&&e.jsx("span",{className:"text-sm text-emerald-400",children:"â à¸à¸±à¸à¸à¸¶à¸à¹à¸¥à¹à¸§"})]})]}),e.jsx("p",{className:"text-xs font-medium text-slate-400",children:"หรืà¸à¹à¸¥à¸·à¸à¸à¸ªà¹à¸à¹à¸à¸à¸à¸µà¸¥à¸°à¸à¹à¸²à¸§ â"}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:Qn.map(t=>e.jsx("button",{onClick:()=>ls(t.id),className:`rounded-lg px-3 py-1.5 text-xs transition ${_e===t.id?"bg-cyan-500/15 text-cyan-300":"border border-white/10 text-slate-400 hover:bg-white/5"}`,children:t.label},t.id))}),ns?e.jsx("p",{className:"text-sm text-slate-500",children:"à¸à¸³à¸¥à¸±à¸à¹à¸«à¸¥à¸à¸à¹à¸²à¸§â¦"}):ie.length===0?e.jsx("p",{className:"text-sm text-slate-500",children:"ยัà¸à¹à¸¡à¹à¸¡à¸µà¸à¹à¸²à¸§"}):e.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:ie.map(t=>{const s=t.sentiment==="bullish"?"text-emerald-300 bg-emerald-500/10 border-emerald-500/30":t.sentiment==="bearish"?"text-rose-300 bg-rose-500/10 border-rose-500/30":"text-slate-300 bg-white/5 border-white/10";return e.jsxs("div",{className:`${q} flex flex-col`,children:[t.image&&/^https?:/.test(t.image)&&e.jsx("img",{src:t.image,alt:"",className:"mb-3 h-32 w-full rounded-lg object-cover",loading:"lazy"}),e.jsx("p",{className:"line-clamp-2 font-medium text-slate-100",children:t.headline}),e.jsx("p",{className:"mt-1 line-clamp-2 text-xs text-slate-400",children:t.summary}),e.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[e.jsx("span",{className:`rounded-md border px-2 py-0.5 text-[11px] ${s}`,children:t.sentiment}),e.jsx("span",{className:"truncate text-xs text-slate-500",children:t.source})]}),e.jsxs("div",{className:"mt-3 flex items-center justify-between pt-1",children:[e.jsx("span",{className:"text-xs text-slate-500",children:t.datetime?new Date(t.datetime).toLocaleDateString("th-TH",{day:"2-digit",month:"short"}):""}),e.jsx("button",{onClick:()=>Pn(t),disabled:!(h!=null&&h.has_bot)||ct===t.id,className:"rounded-lg bg-cyan-600 px-3.5 py-1.5 text-xs font-medium text-white transition hover:bg-cyan-500 disabled:opacity-50",children:ct===t.id?"à¸à¸³à¸¥à¸±à¸à¸ªà¹à¸â¦":We[t.id]==="ok"?"â สà¹à¸à¹à¸¥à¹à¸§":We[t.id]==="err"?"ลà¸à¸à¹à¸«à¸¡à¹":"สà¹à¸à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡"})]})]},t.id)})})]}),le&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 p-4",onClick:()=>fe(!1),children:e.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-emerald-500/25 bg-[#0e1420] p-5 shadow-2xl shadow-emerald-900/30",onClick:t=>t.stopPropagation(),children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"grid h-10 w-10 shrink-0 place-items-center rounded-xl bg-emerald-500/15 text-xl",children:"ð¤"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold text-white",children:"à¸à¸¥à¸¸à¹à¸¡à¸à¸à¸à¸à¸¸à¸ à¸à¹à¸à¸¢à¸à¸à¹à¸à¹à¸à¸£à¸²à¸¢à¹à¸à¹à¹à¸à¹à¹à¸¥à¸¢"}),e.jsx("p",{className:"text-xs text-slate-400",children:"à¹à¸à¸£à¹à¸à¸£à¸¡à¸à¸²à¸£à¹à¸à¹à¸à¸à¸£à¹ IB สำหรัà¸à¹à¸à¹à¸²à¸à¸à¸à¸à¸¥à¸¸à¹à¸¡ Signal Control"})]})]}),e.jsx("button",{onClick:()=>fe(!1),"aria-label":"à¸à¸´à¸",className:"rounded-lg p-1.5 text-slate-400 transition hover:bg-white/10 hover:text-white",children:"â"})]}),e.jsxs("p",{className:"mt-4 text-[13px] leading-relaxed text-slate-200",children:["à¸à¸¸à¸à¸ªà¹à¸à¸ªà¸±à¸à¸à¸²à¸à¹à¸à¹à¸²à¸à¸¥à¸¸à¹à¸¡ Telegram/Discord à¸à¸à¸à¸à¸±à¸§à¹à¸à¸à¸à¸¢à¸¹à¹à¹à¸¥à¹à¸§ â สมาà¸à¸´à¸à¸à¸µà¹à¸ªà¸¡à¸±à¸à¸£ VIP à¸à¹à¸²à¸",e.jsx("b",{className:"text-emerald-300",children:"ลิà¸à¸à¹à¹à¸à¸°à¸à¸³à¸à¸à¸à¸à¸¸à¸"})," à¸à¸°à¸à¸¥à¸²à¸¢à¹à¸à¹à¸à¸à¹à¸²à¸à¸à¸¡à¸¡à¸´à¸à¸à¸±à¹à¸à¸à¸à¸à¸à¸¸à¸à¸à¸±à¸à¸à¸µ"]}),e.jsxs("ul",{className:"mt-3 space-y-1.5 rounded-xl border border-white/[0.06] bg-white/[0.02] p-3 text-[12.5px] text-slate-300",children:[e.jsxs("li",{children:["â
à¸à¹à¸²à¸à¸à¸¡ ",e.jsxs("b",{className:"text-white",children:[Ee??20,"%"]})," à¸à¸²à¸à¸à¸¸à¸à¸¢à¸à¸à¸ªà¸¡à¸±à¸à¸£à¹à¸«à¸¡à¹"]}),e.jsx("li",{children:"â
à¸à¸§à¸à¸à¸²à¸£à¹à¸à¹à¸à¸à¸£à¹à¸à¹à¸à¹à¸à¹à¸ Sub-IB à¹à¸à¹ (à¹à¸à¸£à¸à¸ªà¸£à¹à¸²à¸à¸ªà¸à¸à¸à¸±à¹à¸ à¸à¸)"}),e.jsx("li",{children:"â
à¸à¸±à¸à¹à¸à¸ªà¸à¸²à¸à¸° 4 à¸à¸±à¹à¸ Partner â Master IB"}),e.jsx("li",{children:"â
à¹à¸¡à¹à¸¡à¸µà¸à¹à¸²à¸ªà¸¡à¸±à¸à¸£ à¹à¸¡à¹à¸à¸±à¸à¸à¸±à¸à¸¢à¸à¸"})]}),e.jsx("p",{className:"mt-2 text-[11px] text-slate-500",children:"à¸
11à¹à¸²à¸¢à¸à¸²à¸à¸¢à¸à¸à¸à¸²à¸¢à¸à¸µà¹à¹à¸à¸´à¸à¸à¸¶à¹à¸à¸à¸£à¸´à¸à¹à¸à¹à¸²à¸à¸±à¹à¸ à¹à¸¡à¹à¸¡à¸µà¸à¹à¸²à¸à¸à¸à¹à¸à¸à¸à¸²à¸à¸à¸²à¸£à¸à¸§à¸à¸à¸à¹à¸à¹à¸²à¸£à¸°à¸à¸ · à¹à¸¡à¹à¹à¸à¹à¸à¸²à¸£à¸à¸²à¸£à¸±à¸à¸à¸µà¸£à¸²à¸¢à¹à¸à¹"}),e.jsxs("div",{className:"mt-4 flex flex-col gap-2 sm:flex-row",children:[e.jsx("button",{onClick:()=>{fe(!1),De(!0)},className:"flex-1 rounded-xl bg-emerald-600 px-4 py-2.5 text-sm font-semibold text-white transition hover:bg-emerald-500",children:"รัà¸à¸¥à¸´à¸à¸à¹à¹à¸à¸°à¸à¸³à¸à¸à¸à¸à¸±à¸"}),e.jsx("button",{onClick:()=>{fe(!1),xr("/partner")},className:"flex-1 rounded-xl border border-emerald-500/30 bg-emerald-500/[0.06] px-4 py-2.5 text-sm font-medium text-emerald-300 transition hover:bg-emerald-500/15",children:"à¸à¸¹à¹à¸à¸à¸à¸²à¸£à¹à¸à¹à¸à¸à¸£à¹ 4 à¸à¸±à¹à¸"})]})]})}),je&&e.jsx($r,{isOpen:Ae,onClose:()=>De(!1),vipCode:je})]})]})})}export{tn as PaTimeframePicker,di as PairCostPanel,bo as default};
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.