1import{o as e,r as t,t as n}from"./jsx-runtime-DbPMZkE_.js";import{t as r}from"./router-compat-C5kxkR2U.js";import{a as i,t as a}from"./button-DgoZYN2M.js";import{t as o}from"./useQuery-CEWPOS8q.js";import{t as ee}from"./use-toast-CVJ8fjZM.js";import{t as s}from"./chevron-down-0cZxvkn9.js";import{t as c}from"./chevron-up-RvcFQIXQ.js";import{t as te}from"./sliders-horizontal-e-GcnPf0.js";import{t as ne}from"./tag-BluDJBe4.js";import{t as l}from"./badge-D60nG5Qb.js";import{$t as re,C as u,Et as ie,In as ae,Jt as d,Mn as oe,Pn as se,Wt as ce,bn as f,in as le,jn as p,r as ue,rn as m,tn as h,un as de,xn as g}from"./index-BMPwgS7W.js";import{a as _,i as v,n as y,o as b,r as x,s as S,t as C}from"./tradelocker-BPL1jmql.js";var w=e(t(),1),T=n(),E={TradingView:S,cTrader:b,CTrader:b,DXTrade:_,DXtrade:_,MT4:v,"MetaTrader 4":v,MT5:x,"MetaTrader 5":x,MatchTrader:y,"Match-Trader":y,TradeLocker:C},D=e=>E[e],O=15,fe=()=>(0,T.jsx)(`div`,{className:`space-y-1 p-2 sm:p-4`,children:[...Array(8)].map((e,t)=>(0,T.jsxs)(`div`,{className:`flex items-center gap-2 sm:gap-4 py-2 px-2 sm:px-3`,children:[(0,T.jsx)(u,{className:`h-7 w-7 sm:h-8 sm:w-8 rounded`}),(0,T.jsx)(u,{className:`h-4 w-20 sm:w-24`}),(0,T.jsx)(u,{className:`h-4 w-16 sm:w-20`}),(0,T.jsx)(u,{className:`h-4 w-12`}),(0,T.jsx)(u,{className:`h-4 w-14 hidden sm:block`}),(0,T.jsx)(`div`,{className:`flex-1`}),(0,T.jsx)(u,{className:`h-7 w-14 sm:w-16`})]},t))}),pe=()=>(0,T.jsx)(`div`,{className:`space-y-3 p-3`,children:[...[,,,,,]].map((e,t)=>(0,T.jsxs)(`div`,{className:`rounded-xl border border-border p-4 space-y-3`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,T.jsx)(u,{className:`h-10 w-10 rounded-lg`}),(0,T.jsxs)(`div`,{className:`space-y-1.5 flex-1`,children:[(0,T.jsx)(u,{className:`h-4 w-24`}),(0,T.jsx)(u,{className:`h-3 w-16`})]}),(0,T.jsx)(u,{className:`h-8 w-16 rounded-md`})]}),(0,T.jsxs)(`div`,{className:`grid grid-cols-3 gap-2`,children:[(0,T.jsx)(u,{className:`h-12 rounded-lg`}),(0,T.jsx)(u,{className:`h-12 rounded-lg`}),(0,T.jsx)(u,{className:`h-12 rounded-lg`})]})]},t))}),k=({label:e,sortKey:t,currentSort:n,currentDir:r,onSort:a,className:o})=>(0,T.jsx)(`th`,{className:i(`py-2.5 px-3 font-semibold text-[11px] uppercase tracking-wider cursor-pointer hover:bg-muted/50 transition-colors select-none text-muted-foreground whitespace-nowrap`,o),onClick:()=>a(t),children:(0,T.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,T.jsx)(`span`,{children:e}),n===t&&(r===`asc`?(0,T.jsx)(c,{className:`h-3 w-3 text-primary`}):(0,T.jsx)(s,{className:`h-3 w-3 text-primary`}))]})}),me=({challenge:e,trackClick:t})=>(0,T.jsxs)(`div`,{className:`rounded-xl border border-border bg-card p-3.5 space-y-3 hover:border-primary/30 transition-colors`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-3`,children:[e.firm_logo_url?(0,T.jsx)(`img`,{src:e.firm_logo_url,alt:e.firm_name,className:`h-10 w-10 object-contain rounded-lg border border-border/50 flex-shrink-0`}):(0,T.jsx)(`div`,{className:`h-10 w-10 bg-muted rounded-lg flex items-center justify-center flex-shrink-0`,children:(0,T.jsx)(`span`,{className:`text-sm font-bold`,children:e.firm_name[0]})}),(0,T.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,T.jsx)(r,{to:`/firms/${e.firm_slug}`,className:`font-semibold text-sm text-foreground hover:text-primary block truncate`,children:e.firm_name}),(0,T.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,T.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.program_name}),(0,T.jsx)(`span`,{className:`text-muted-foreground/50`,children:`·`}),(0,T.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`$`,e.account_size>=1e3?`${e.account_size/1e3}k`:e.account_size]})]})]}),(0,T.jsxs)(a,{size:`sm`,className:`h-9 px-4 text-xs font-semibold shrink-0`,onClick:()=>{t(e.firm_id,e.firm_name,`hero-challenges-mobile-card`,e.affiliate_link)},children:[`Get`,(0,T.jsx)(f,{className:`h-3 w-3 ml-1`})]})]}),(0,T.jsxs)(`div`,{className:`grid grid-cols-3 gap-2`,children:[(0,T.jsxs)(`div`,{className:`bg-muted/40 rounded-lg px-2.5 py-2 text-center`,children:[(0,T.jsx)(`span`,{className:`text-[10px] text-muted-foreground uppercase tracking-wider block`,children:`Fee`}),(0,T.jsxs)(`span`,{className:`text-sm font-bold text-foreground`,children:[`$`,e.fee]})]}),(0,T.jsxs)(`div`,{className:`bg-muted/40 rounded-lg px-2.5 py-2 text-center`,children:[(0,T.jsx)(`span`,{className:`text-[10px] text-muted-foreground uppercase tracking-wider block`,children:`Split`}),(0,T.jsxs)(`span`,{className:i(`text-sm font-bold`,e.profit_split>=90?`text-success`:`text-foreground`),children:[e.profit_split,`%`]})]}),(0,T.jsxs)(`div`,{className:`bg-success/10 rounded-lg px-2.5 py-2 text-center`,children:[(0,T.jsx)(`span`,{className:`text-[10px] text-muted-foreground uppercase tracking-wider block`,children:`Cashback`}),(0,T.jsxs)(`span`,{className:`text-sm font-bold text-success`,children:[e.cashback_percent,`%`]})]}),(0,T.jsxs)(`div`,{className:`bg-muted/40 rounded-lg px-2.5 py-2 text-center`,children:[(0,T.jsx)(`span`,{className:`text-[10px] text-muted-foreground uppercase tracking-wider block`,children:`Score`}),(0,T.jsxs)(`div`,{className:`flex items-center justify-center gap-1`,children:[(0,T.jsx)(h,{className:`h-3 w-3 fill-warning text-warning`}),(0,T.jsx)(`span`,{className:`text-sm font-bold`,children:e.pfs_score})]})]}),(0,T.jsxs)(`div`,{className:`bg-muted/40 rounded-lg px-2.5 py-2 text-center`,children:[(0,T.jsx)(`span`,{className:`text-[10px] text-muted-foreground uppercase tracking-wider block`,children:`Targets`}),(0,T.jsxs)(`span`,{className:`text-xs font-medium`,children:[e.phase1_target?`${e.ph
1ase1_target}%`:`â`,` / `,e.phase2_target?`${e.phase2_target}%`:`â`]})]}),(0,T.jsxs)(`div`,{className:`bg-muted/40 rounded-lg px-2.5 py-2 text-center`,children:[(0,T.jsx)(`span`,{className:`text-[10px] text-muted-foreground uppercase tracking-wider block`,children:`Drawdown`}),(0,T.jsxs)(`span`,{className:`text-xs font-medium text-destructive/80`,children:[e.max_daily_drawdown,`% / `,e.max_total_drawdown,`%`]})]})]}),(0,T.jsxs)(`div`,{className:`flex items-center justify-between pt-0.5`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[e.platforms?.slice(0,4).map(e=>D(e)?(0,T.jsx)(`img`,{src:D(e),alt:e,className:`w-4 h-4 object-contain rounded-sm`},e):(0,T.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:e},e)),(e.platforms?.length||0)>4&&(0,T.jsxs)(`span`,{className:`text-[10px] text-muted-foreground`,children:[`+`,e.platforms.length-4]})]}),(0,T.jsx)(r,{to:`/firms/${e.firm_slug}`,className:`text-[11px] text-primary font-medium hover:underline`,children:`View details â`})]})]}),A=({showHero:e=!0})=>{let{toast:t}=ee(),{trackClick:n}=ue(),{data:u,isPending:_}=o(ie()),v=u??[],[y,b]=(0,w.useState)(!1),[x,S]=(0,w.useState)(``),[C,E]=(0,w.useState)(!1),[A,j]=(0,w.useState)(`all`),[M,N]=(0,w.useState)([25e3]),[P,F]=(0,w.useState)([]),[I,L]=(0,w.useState)([]),[R,z]=(0,w.useState)([]),[B,V]=(0,w.useState)(`price`),[H,U]=(0,w.useState)(`asc`),[he,W]=(0,w.useState)(null),G=(0,w.useMemo)(()=>_e(),[v,A,M,P,I,R,B,H,x]);(0,w.useEffect)(()=>{b(!1)},[A,M,P,I,R,B,H,x]);let K=e=>{N(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),W(null)},ge=e=>{z(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),W(null)};function _e(){let e=[...v];if(x.trim()){let t=x.toLowerCase();e=e.filter(e=>e.firm_name.toLowerCase().includes(t)||e.program_name.toLowerCase().includes(t))}return A!==`all`&&(e=e.filter(e=>e.computed_type===A)),M.length>0&&(e=e.filter(e=>M.includes(e.account_size))),P.length>0&&(e=e.filter(e=>P.some(t=>e.platforms?.includes(t)))),I.length>0&&(e=e.filter(e=>!(I.includes(`news`)&&!e.news_trading_allowed||I.includes(`ea`)&&!e.ea_allowed||I.includes(`copy`)&&!e.copy_trading_allowed))),R.length>0&&(e=e.filter(e=>R.includes(e.firm_id))),e.sort((e,t)=>{let n=0;switch(B){case`firm_name`:n=e.firm_name.localeCompare(t.firm_name);break;case`account_size`:n=e.account_size-t.account_size;break;case`pfs_score`:n=(e.pfs_score||0)-(t.pfs_score||0);break;case`cashback`:n=(e.cashback_percent||0)-(t.cashback_percent||0);break;case`price`:n=e.fee-t.fee;break;case`profit_split`:n=(e.profit_split||0)-(t.profit_split||0);break;case`max_allocation`:n=(e.max_allocation||0)-(t.max_allocation||0);break;case`years`:n=2026-(e.founded_year||2026)-(2026-(t.founded_year||2026));break;case`payouts`:n=(e.total_payouts||0)-(t.total_payouts||0);break;default:return 0}return H===`asc`?n:-n}),e}let q=e=>{B===e?U(e=>e===`asc`?`desc`:`asc`):(V(e),U(e===`price`||e===`account_size`||e===`firm_name`?`asc`:`desc`)),W(null)},J=()=>{j(`all`),N([]),F([]),L([]),S(``),W(null)},Y=e=>{F(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),W(null)},X=e=>{L(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),W(null)},ve=e=>{switch(J(),W(e),e){case`best-value`:V(`pfs_score`),U(`desc`);break;case`cheapest`:V(`price`),U(`asc`);break;case`high-profit`:V(`profit_split`),U(`desc`);break;case`instant`:j(`instant`)}},ye=(0,w.useMemo)(()=>{let e=new Set;return v.forEach(t=>{t.platforms?.forEach(t=>e.add(t))}),Array.from(e).sort()},[v]),be=(0,w.useMemo)(()=>{let e=new Set;return v.forEach(t=>e.add(t.account_size)),Array.from(e).sort((e,t)=>e-t)},[v]),xe=(0,w.useMemo)(()=>{let e=new Map;return v.forEach(t=>{e.has(t.firm_id)||e.set(t.firm_id,{id:t.firm_id,name:t.firm_name,logo:t.firm_logo_url})}),Array.from(e.values()).sort((e,t)=>e.name.localeCompare(t.name))},[v]),Z=A!==`all`||P.length>0||I.length>0||M.length>0||R.length>0||x.trim()!==``,Q=(A===`all`?0:1)+M.length+P.length+I.length+R.length,Se=G,$=(0,w.useMemo)(()=>new Set(v.map(e=>e.firm_id)).size,[v]);return(0,w.useMemo)(()=>{let e=v.filter(e=>e.pfs_score>0);return e.length===0?`4.5`:(e.reduce((e,t)=>e+t.pfs_score,0)/e.length).toFixed(1)},[v]),(0,T.jsxs)(`section`,{className:`w-full`,id:`challenges-section`,children:[e&&(0,T.jsx)(`div`,{className:`relative py-7 sm:py-10 md:py-14 px-3 sm:px-4`,children:(0,T.jsxs)(`div`,{className:`relative max-w-[1400px] mx-auto
1space-y-6 sm:space-y-8 md:space-y-10`,children:[(0,T.jsxs)(`div`,{className:`text-center space-y-4 sm:space-y-5`,children:[(0,T.jsxs)(`h1`,{className:`text-[26px] leading-[1.15] sm:text-4xl md:text-5xl lg:text-6xl font-bold tracking-tight text-foreground max-w-4xl mx-auto text-balance`,children:[`Get`,` `,(0,T.jsx)(`span`,{className:`bg-gradient-to-r from-[hsl(var(--gold-light))] via-[hsl(var(--gold))] to-[hsl(var(--gold-dark))] bg-clip-text text-transparent`,children:`2% Cashback`}),` `,`on Your Next Prop Firm Challenge`]}),(0,T.jsx)(`p`,{className:`text-sm sm:text-base md:text-lg text-muted-foreground max-w-2xl mx-auto leading-relaxed`,children:`Compare every verified firm side by side â fees, rules, payouts â and never pay full price again.`})]}),(0,T.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-3 sm:gap-4 max-w-5xl mx-auto`,children:[{icon:g,title:`Save Money`,line:`bg-success/50`,chip:`bg-success/10 border-success/25`,iconColor:`text-success`,body:`Stack 2% cashback on top of exclusive discount codes. Even with no active promo, you always pay less than the listed price.`},{icon:p,title:`Make Smarter Choices`,line:`bg-info/50`,chip:`bg-info/10 border-info/25`,iconColor:`text-info`,body:`Compare fees, rules, profit splits and payout speeds across ${$}+ firms â all in one view.`},{icon:m,title:`Trade With Confidence`,line:`bg-warning/50`,chip:`bg-warning/10 border-warning/25`,iconColor:`text-warning`,body:`Every firm is scored, reviewed and vetted. Red flags are surfaced up front so you don't get burned.`}].map(e=>(0,T.jsxs)(`div`,{className:`group relative overflow-hidden rounded-2xl border border-border/60 bg-card/50 backdrop-blur-xs px-4 sm:px-5 py-4 sm:py-5 text-left transition-all duration-300 hover:-translate-y-1 hover:border-primary/40 hover:shadow-lg`,children:[(0,T.jsx)(`span`,{className:i(`absolute inset-x-0 top-0 h-px`,e.line)}),(0,T.jsxs)(`div`,{className:`flex items-center gap-2.5 mb-2`,children:[(0,T.jsx)(`div`,{className:i(`flex h-9 w-9 items-center justify-center rounded-xl border`,e.chip),children:(0,T.jsx)(e.icon,{className:i(`w-[18px] h-[18px]`,e.iconColor)})}),(0,T.jsx)(`h3`,{className:`text-sm sm:text-base font-bold text-foreground`,children:e.title})]}),(0,T.jsx)(`p`,{className:`text-xs sm:text-[13px] text-muted-foreground leading-relaxed`,children:e.body})]},e.title))}),(0,T.jsxs)(`div`,{className:`max-w-3xl mx-auto text-center rounded-2xl border border-border/50 bg-background/40 backdrop-blur-xs py-4 sm:py-5 px-3`,children:[(0,T.jsx)(`div`,{className:`flex flex-wrap items-center justify-center gap-3 sm:gap-4 md:gap-6`,children:[{icon:m,label:`Signals`,href:`/signals`,color:`text-destructive`,bg:`bg-destructive/10`,hoverBg:`hover:bg-destructive/20`},{icon:oe,label:`Calculators`,href:`/tools`,color:`text-primary`,bg:`bg-primary/10`,hoverBg:`hover:bg-primary/20`},{icon:se,label:`Guides`,href:`/guides`,color:`text-secondary`,bg:`bg-secondary/10`,hoverBg:`hover:bg-secondary/20`},{icon:p,label:`Firms`,href:`/firms`,color:`text-info`,bg:`bg-info/10`,hoverBg:`hover:bg-info/20`},{icon:de,label:`News`,href:`/news`,color:`text-warning`,bg:`bg-warning/10`,hoverBg:`hover:bg-warning/20`},{icon:ne,label:`Deals`,href:`/deals`,color:`text-success`,bg:`bg-success/10`,hoverBg:`hover:bg-success/20`}].map(e=>(0,T.jsxs)(r,{to:e.href,className:`group flex flex-col items-center gap-1`,children:[(0,T.jsx)(`div`,{className:`w-10 h-10 sm:w-11 sm:h-11 rounded-full ${e.bg} ${e.hoverBg} flex items-center justify-center transition-all duration-200 group-hover:scale-110 group-hover:shadow-md`,children:(0,T.jsx)(e.icon,{className:`w-4 h-4 sm:w-[18px] sm:h-[18px] ${e.color}`})}),(0,T.jsx)(`span`,{className:`text-[10px] sm:text-[11px] font-medium text-muted-foreground group-hover:text-foreground transition-colors`,children:e.label})]},e.href))}),(0,T.jsx)(`p`,{className:`text-[10px] sm:text-xs text-muted-foreground/50 mt-3 italic`,children:`Everything you need â from your first challenge to your first payout.`})]})]})}),(0,T.jsx)(`div`,{className:`max-w-[1400px] mx-auto px-3 sm:px-4 pb-3`,children:(0,T.jsxs)(`div`,{className:`flex items-baseline gap-3`,children:[(0,T.jsx)(`h2`,{className:`text-base sm:text-lg font-semibold tracking-tight text-foreground`,children:`Compare Prop Firms`}),(0,T.jsx)(`span`,{className:`hidden sm:block h-px flex-1 bg-border/60`}),(0,T.jsxs)(`span`,{className:`text-[11px] sm:text-xs text-muted-foreground`,children:[$,`+ verified firms`]})]})}),(0,T.jsx)(`div`,{className:i(`bg-background/95 backdrop-blur-xs border-y border-border z-20`,`md:sticky md:top-16`),children:(0,T.jsxs)(`div`,{className:`max-w-[1400px] mx-auto`,children:[(0,T.jsxs)(`div`,{className:`px-3 sm:px-4 py-2.5 border-b border-border/50`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsxs)(`div`,{className:`relative flex-1 sm:max-w-xs`,children:[(0,T.jsx)(le,{className:`absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground`}
1),(0,T.jsx)(ce,{placeholder:`Search firms...`,value:x,onChange:e=>S(e.target.value),className:`pl-9 h-10 md:h-9 text-sm bg-muted/30 border-border/50 rounded-lg`})]}),(0,T.jsxs)(a,{variant:C?`secondary`:`outline`,size:`sm`,className:`md:hidden h-10 gap-1.5 shrink-0 px-3`,onClick:()=>E(!C),children:[(0,T.jsx)(te,{className:`h-4 w-4`}),`Filters`,Q>0&&(0,T.jsx)(`span`,{className:`bg-primary text-primary-foreground text-[10px] font-bold rounded-full h-5 w-5 flex items-center justify-center`,children:Q})]}),(0,T.jsxs)(`span`,{className:`text-xs text-muted-foreground whitespace-nowrap hidden sm:inline ml-auto`,children:[G.length,` of `,v.length]}),Z&&(0,T.jsxs)(a,{variant:`ghost`,size:`sm`,onClick:J,className:`h-8 text-xs text-destructive shrink-0 hidden sm:flex`,children:[(0,T.jsx)(d,{className:`h-3 w-3 mr-1`}),`Clear`]})]}),Z&&(0,T.jsxs)(`div`,{className:`flex items-center gap-2 mt-2.5 overflow-x-auto scrollbar-hide sm:hidden pb-0.5`,children:[(0,T.jsxs)(`span`,{className:`text-[11px] text-muted-foreground shrink-0 font-medium`,children:[G.length,` results`]}),A!==`all`&&(0,T.jsxs)(l,{variant:`secondary`,className:`text-[11px] shrink-0 gap-1.5 h-7 px-2.5 rounded-lg`,children:[A,(0,T.jsx)(d,{className:`h-3 w-3 cursor-pointer`,onClick:()=>j(`all`)})]}),M.map(e=>(0,T.jsxs)(l,{variant:`secondary`,className:`text-[11px] shrink-0 gap-1.5 h-7 px-2.5 rounded-lg`,children:[`$`,e>=1e3?`${e/1e3}k`:e,(0,T.jsx)(d,{className:`h-3 w-3 cursor-pointer`,onClick:()=>K(e)})]},e)),P.map(e=>(0,T.jsxs)(l,{variant:`secondary`,className:`text-[11px] shrink-0 gap-1.5 h-7 px-2.5 rounded-lg`,children:[e,(0,T.jsx)(d,{className:`h-3 w-3 cursor-pointer`,onClick:()=>Y(e)})]},e)),I.map(e=>(0,T.jsxs)(l,{variant:`secondary`,className:`text-[11px] shrink-0 gap-1.5 h-7 px-2.5 rounded-lg`,children:[e,(0,T.jsx)(d,{className:`h-3 w-3 cursor-pointer`,onClick:()=>X(e)})]},e)),(0,T.jsx)(`button`,{onClick:J,className:`text-[11px] text-destructive font-medium shrink-0 ml-1`,children:`Clear all`})]})]}),(0,T.jsxs)(`div`,{className:`relative`,children:[(0,T.jsx)(`div`,{className:`absolute left-0 top-0 bottom-0 w-4 bg-gradient-to-r from-background to-transparent z-10 pointer-events-none md:hidden`}),(0,T.jsx)(`div`,{className:`absolute right-0 top-0 bottom-0 w-4 bg-gradient-to-l from-background to-transparent z-10 pointer-events-none md:hidden`}),(0,T.jsxs)(`div`,{className:`flex items-center gap-1.5 px-3 sm:px-4 py-2 md:py-1.5 border-b border-border/30 overflow-x-auto scrollbar-hide`,children:[(0,T.jsx)(`div`,{className:`flex bg-muted/60 rounded-lg p-0.5 shrink-0`,children:[{value:`all`,label:`All`},{value:`1-step`,label:`1-Step`},{value:`2-step`,label:`2-Step`},{value:`instant`,label:`Instant`}].map(e=>(0,T.jsx)(`button`,{className:i(`px-3 sm:px-3.5 py-2 md:py-1.5 text-xs font-medium rounded-md transition-all whitespace-nowrap min-h-[36px] md:min-h-0`,A===e.value?`bg-background shadow-xs text-foreground`:`text-muted-foreground hover:text-foreground`),onClick:()=>{j(e.value),W(null)},children:e.label},e.value))}),(0,T.jsx)(`div`,{className:`w-px h-5 bg-border mx-1 shrink-0`}),[{id:`best-value`,label:`Best Rated`,icon:ae},{id:`cheapest`,label:`Cheapest`,icon:g},{id:`high-profit`,label:`90%+ Split`,icon:re}].map(e=>(0,T.jsxs)(`button`,{className:i(`flex items-center gap-1.5 px-3 py-2 md:py-1.5 rounded-md text-xs font-medium transition-all whitespace-nowrap shrink-0 min-h-[36px] md:min-h-0`,he===e.id?`bg-primary/10 text-primary`:`text-muted-foreground hover:text-foreground hover:bg-muted/50`),onClick:()=>ve(e.id),children:[(0,T.jsx)(e.icon,{className:`h-3.5 w-3.5`}),(0,T.jsx)(`span`,{children:e.label})]},e.id)),(0,T.jsx)(`div`,{className:`w-4 shrink-0 md:hidden`})]})]}),(0,T.jsx)(`div`,{className:i(`overflow-hidden transition-all duration-300`,C?`max-h-[600px] opacity-100`:`max-h-0 opacity-0 md:max-h-[500px] md:opacity-100`),children:(0,T.jsx)(`div`,{className:`px-3 sm:px-4 py-3 bg-muted/10 border-b border-border/20`,children:(0,T.jsx)(()=>(0,T.jsxs)(`div`,{className:`flex flex-col gap-3 md:flex-row md:flex-wrap md:items-center md:gap-x-5 md:gap-y-2`,children:[(0,T.jsxs)(`div`,{className:`flex flex-col gap-1.5 md:flex-row md:items-center md:gap-2`,children:[(0,T.jsx)(`span`,{className:`text-xs font-semibold text-muted-foreground uppercase tracking-wider shrink-0`,children:`Firm`}),(0,T.jsxs)(`div`,{className:`flex gap-1.5 overflow-x-auto scrollbar-hide pb-1 md:pb-0`,children:[(0,T.jsx)(`button`,{className:i(`px-2.5 py-2 md:px-2 md:py-1 rounded-lg md:rounded text-xs md:text-[11px] font-medium border transition-all whitespace-nowrap shrink-0 min-h-[36px] md:min-
1h-0`,R.length===0?`bg-primary text-primary-foreground border-primary`:`bg-background border-border text-muted-foreground hover:border-primary/50`),onClick:()=>z([]),children:`All`}),xe.map(e=>(0,T.jsxs)(`button`,{className:i(`px-2.5 py-2 md:px-2 md:py-1 rounded-lg md:rounded text-xs md:text-[11px] font-medium border transition-all whitespace-nowrap shrink-0 flex items-center gap-1.5 min-h-[36px] md:min-h-0`,R.includes(e.id)?`bg-primary text-primary-foreground border-primary`:`bg-background border-border text-muted-foreground hover:border-primary/50`),onClick:()=>ge(e.id),children:[e.logo&&(0,T.jsx)(`img`,{src:e.logo,alt:``,className:`w-4 h-4 md:w-3.5 md:h-3.5 rounded-sm object-contain`}),e.name]},e.id))]})]}),(0,T.jsx)(`div`,{className:`w-px h-6 bg-border hidden md:block shrink-0`}),(0,T.jsxs)(`div`,{className:`flex flex-col gap-1.5 md:flex-row md:items-center md:gap-2`,children:[(0,T.jsx)(`span`,{className:`text-xs font-semibold text-muted-foreground uppercase tracking-wider shrink-0`,children:`Size`}),(0,T.jsxs)(`div`,{className:`flex gap-1.5 overflow-x-auto scrollbar-hide pb-1 md:pb-0`,children:[(0,T.jsx)(`button`,{className:i(`px-2.5 py-2 md:px-2 md:py-1 rounded-lg md:rounded text-xs md:text-[11px] font-medium border transition-all whitespace-nowrap shrink-0 min-h-[36px] md:min-h-0`,M.length===0?`bg-primary text-primary-foreground border-primary`:`bg-background border-border text-muted-foreground hover:border-primary/50`),onClick:()=>N([]),children:`All`}),be.map(e=>(0,T.jsxs)(`button`,{className:i(`px-2.5 py-2 md:px-2 md:py-1 rounded-lg md:rounded text-xs md:text-[11px] font-medium border transition-all whitespace-nowrap shrink-0 min-h-[36px] md:min-h-0`,M.includes(e)?`bg-primary text-primary-foreground border-primary`:`bg-background border-border text-muted-foreground hover:border-primary/50`),onClick:()=>K(e),children:[`$`,e>=1e3?`${e/1e3}k`:e]},e))]})]}),(0,T.jsx)(`div`,{className:`w-px h-6 bg-border hidden md:block shrink-0`}),(0,T.jsxs)(`div`,{className:`flex flex-col gap-1.5 md:flex-row md:items-center md:gap-2`,children:[(0,T.jsx)(`span`,{className:`text-xs font-semibold text-muted-foreground uppercase tracking-wider shrink-0`,children:`Platform`}),(0,T.jsx)(`div`,{className:`flex gap-1.5 overflow-x-auto scrollbar-hide pb-1 md:pb-0`,children:ye.map(e=>(0,T.jsxs)(`button`,{className:i(`px-2.5 py-2 md:px-2 md:py-1 rounded-lg md:rounded text-xs md:text-[11px] font-medium border transition-all whitespace-nowrap shrink-0 flex items-center gap-1.5 min-h-[36px] md:min-h-0`,P.includes(e)?`bg-primary text-primary-foreground border-primary`:`bg-background border-border text-muted-foreground hover:border-primary/50`),onClick:()=>Y(e),children:[D(e)&&(0,T.jsx)(`img`,{src:D(e),alt:``,className:`w-4 h-4 md:w-3.5 md:h-3.5 object-contain rounded-sm`}),e]},e))})]}),(0,T.jsx)(`div`,{className:`w-px h-6 bg-border hidden md:block shrink-0`}),(0,T.jsxs)(`div`,{className:`flex flex-col gap-1.5 md:flex-row md:items-center md:gap-2`,children:[(0,T.jsx)(`span`,{className:`text-xs font-semibold text-muted-foreground uppercase tracking-wider shrink-0`,children:`Features`}),(0,T.jsx)(`div`,{className:`flex gap-1.5 overflow-x-auto scrollbar-hide pb-1 md:pb-0`,children:[{id:`news`,label:`News Trading`},{id:`ea`,label:`EA/Bots`},{id:`copy`,label:`Copy Trading`}].map(e=>(0,T.jsx)(`button`,{className:i(`px-2.5 py-2 md:px-2 md:py-1 rounded-lg md:rounded text-xs md:text-[11px] font-medium border transition-all whitespace-nowrap shrink-0 min-h-[36px] md:min-h-0`,I.includes(e.id)?`bg-primary text-primary-foreground border-primary`:`bg-background border-border text-muted-foreground hover:border-primary/50`),onClick:()=>X(e.id),children:e.label},e.id))})]}),(0,T.jsxs)(`div`,{className:`md:hidden pt-2 border-t border-border/30 flex items-center justify-between gap-3`,children:[(0,T.jsxs)(`span`,{className:`text-xs text-muted-foreground font-medium`,children:[G.length,` results found`]}),(0,T.jsx)(a,{size:`sm`,className:`h-9 px-5`,onClick:()=>E(!1),children:`Apply Filters`})]})]}),{})})})]})}),(0,T.jsx)(`div`,{className:`md:hidden`,children:(0,T.jsxs)(`div`,{className:i(`px-3 py-3 transition-all`,!y&&G.length>O&&`max-h-[1400px] overflow-hidden relative`),children:[!y&&G.length>O&&(0,T.jsx)(`div`,{className:`absolute bottom-0 left-0 right-0 h-32 bg-gradient-to-t from-background via-background/80 to-transparent z-10 pointer-events-none`}),_?(0,T.jsx)(pe,{}):(0,T.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,T.jsxs)(`div`,{className:`flex items-center justify-between px-1 py-1`,children:[(0,T.jsxs)(`span`,{className:`text-xs text-muted-foreground font-medium`,children:[G.length,` challenges`]}),(0,T.jsxs)(`button`,{onClick:()=>q(B),className:`text-xs text-primary font-medium flex items-center gap-1`,children:[`Sort: `,B===`price`?`Fee`:B===`pfs_score`?`Score`:B===`profit_split`?`Split`:B===`cashback`?`
1Cashback`:B,H===`asc`?(0,T.jsx)(c,{className:`h-3 w-3`}):(0,T.jsx)(s,{className:`h-3 w-3`})]})]}),Se.map(e=>(0,T.jsx)(me,{challenge:e,trackClick:n},e.id)),G.length===0&&(0,T.jsxs)(`div`,{className:`text-center py-12`,children:[(0,T.jsx)(`p`,{className:`text-muted-foreground mb-4`,children:`No challenges match your filters`}),(0,T.jsx)(a,{variant:`outline`,size:`sm`,onClick:J,children:`Clear Filters`})]})]})]})}),(0,T.jsxs)(`div`,{className:i(`hidden md:block max-w-[1400px] mx-auto px-0 sm:px-2 lg:px-4 py-2 sm:py-4 transition-all`,!y&&G.length>O&&`max-h-[1200px] overflow-hidden relative`),children:[!y&&G.length>O&&(0,T.jsx)(`div`,{className:`absolute bottom-0 left-0 right-0 h-32 bg-gradient-to-t from-background via-background/80 to-transparent z-10 pointer-events-none`}),_?(0,T.jsx)(fe,{}):(0,T.jsxs)(`div`,{className:`bg-card rounded-lg border border-border overflow-hidden`,children:[(0,T.jsx)(`div`,{className:`overflow-x-auto`,children:(0,T.jsxs)(`table`,{className:`w-full text-sm`,style:{minWidth:`900px`},children:[(0,T.jsx)(`thead`,{children:(0,T.jsxs)(`tr`,{className:`border-b bg-muted/30`,children:[(0,T.jsx)(`th`,{className:`py-2.5 px-3 font-semibold text-[11px] uppercase tracking-wider text-muted-foreground text-left min-w-[140px]`,children:(0,T.jsxs)(`div`,{className:`flex items-center gap-1 cursor-pointer`,onClick:()=>q(`firm_name`),children:[`Firm`,B===`firm_name`&&(H===`asc`?(0,T.jsx)(c,{className:`h-3 w-3 text-primary`}):(0,T.jsx)(s,{className:`h-3 w-3 text-primary`}))]})}),(0,T.jsx)(k,{label:`Challenge`,sortKey:`account_size`,currentSort:B,currentDir:H,onSort:q,className:`min-w-[120px]`}),(0,T.jsx)(k,{label:`Score`,sortKey:`pfs_score`,currentSort:B,currentDir:H,onSort:q}),(0,T.jsx)(k,{label:`Cashback`,sortKey:`cashback`,currentSort:B,currentDir:H,onSort:q}),(0,T.jsx)(k,{label:`Fee`,sortKey:`price`,currentSort:B,currentDir:H,onSort:q}),(0,T.jsx)(k,{label:`Split`,sortKey:`profit_split`,currentSort:B,currentDir:H,onSort:q}),(0,T.jsx)(`th`,{className:`py-2.5 px-3 font-semibold text-[11px] uppercase tracking-wider text-muted-foreground text-left whitespace-nowrap`,children:`Daily DD`}),(0,T.jsx)(`th`,{className:`py-2.5 px-3 font-semibold text-[11px] uppercase tracking-wider text-muted-foreground text-left whitespace-nowrap`,children:`Total DD`}),(0,T.jsxs)(`th`,{className:`py-2.5 px-3 font-semibold text-[11px] uppercase tracking-wider text-muted-foreground text-left whitespace-nowrap`,children:[(0,T.jsx)(`span`,{className:`block`,children:`Targets`}),(0,T.jsx)(`span`,{className:`text-[9px] font-normal normal-case tracking-normal text-muted-foreground/60`,children:`P1 / P2`})]}),(0,T.jsx)(k,{label:`Max Alloc`,sortKey:`max_allocation`,currentSort:B,currentDir:H,onSort:q,className:`hidden lg:table-cell`}),(0,T.jsx)(k,{label:`Years`,sortKey:`years`,currentSort:B,currentDir:H,onSort:q,className:`hidden lg:table-cell`}),(0,T.jsx)(k,{label:`Payouts`,sortKey:`payouts`,currentSort:B,currentDir:H,onSort:q,className:`hidden lg:table-cell`}),(0,T.jsx)(`th`,{className:`py-2.5 px-3 font-semibold text-[11px] uppercase tracking-wider text-muted-foreground text-left whitespace-nowrap`,children:`Platforms`}),(0,T.jsx)(`th`,{className:`py-2.5 px-3 font-semibold text-[11px] uppercase tracking-wider text-muted-foreground text-right whitespace-nowrap sticky right-0 bg-muted/30 z-10 min-w-[80px]`,children:`Action`})]})}),(0,T.jsx)(`tbody`,{children:Se.map(e=>(0,T.jsxs)(`tr`,{className:`border-b hover:bg-muted/30 transition-colors group`,children:[(0,T.jsx)(`td`,{className:`py-2.5 px-3 min-w-[140px]`,children:(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[e.firm_logo_url?(0,T.jsx)(`img`,{src:e.firm_logo_url,alt:e.firm_name,className:`h-7 w-7 object-contain flex-shrink-0 rounded`}):(0,T.jsx)(`div`,{className:`h-7 w-7 bg-muted rounded flex items-center justify-center flex-shrink-0`,children:(0,T.jsx)(`span`,{className:`text-[10px] font-bold`,children:e.firm_name[0]})}),(0,T.jsx)(`div`,{className:`min-w-0`,children:(0,T.jsx)(r,{to:`/firms/${e.firm_slug}`,className:`font-semibold text-xs hover:text-primary block truncate max-w-[100px]`,onClick:e=>e.stopPropagation(),children:e.firm_name})})]})}),(0,T.jsx)(`td`,{className:`py-2.5 px-3`,children:(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`span`,{className:`text-xs font-medium block`,children:e.program_name}),(0,T.jsxs)(`span`,{className:`text-[10px] text-muted-foreground`,children:[`$`,e.account_size>=1e3?`${e.account_size/1e3}k`:e.account_size]})]})}),(0,T.jsx)(`td`,{className:`py-2.5 px-3`,children:(0,T.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,T.jsx)(h,{className:`h-3 w-3 fill-warning text-warning`}),(0,T.jsx)(`span`,{className:`font-bold text-xs`,children:e.pfs_score})]})}),(0,T.jsx)(`td`,{className:`py-2.5 px-3`,children:(0,T.jsxs)(l,{className:`bg-success/15 text-success border-success/30 font-bold text-xs`,children:[e.cashback_percent,`%`]})}),(0,T.jsx)(`td`,{className:`py-2.5 px-3`,children:(0,T.jsxs)(`span`,{className:`text-xs font-semibold`,children:[`$`,e.fee]})}),(0,T.jsx)(`td`,{className:`py-2.5 px-3`,children:(0,T.jsxs)(`span`,{className:i(`text-xs font-bold`,e.profit_split>=90?`text-success`:`text-foreground`),children:[e.profit_split,`%`]})}),(0,T.jsx)(`td`,{className:`py-2.5 px-3`,children:(0,T.jsxs)(`span`,{className:`text-xs text-destructive/80 font-medium`,children:[e.max_daily_drawdown,`%`]})}),(0,T.jsx)(`td`,{className:`py-2.5 px-3`,children:(0,T.jsxs)(`span`,{className:`text-xs text-destructive/80 font-medium`,children:[e.max_total_drawdown,`%`]})}),(0,T.jsx)(`td`,{className:`py-2.5 px-3`,children:(0,T.jsxs)(`span`,{className:`text-xs font-medium`,children:[e.phase1_target?`${e.ph
1ase1_target}%`:`â`,` / `,e.phase2_target?`${e.phase2_target}%`:`â`]})}),(0,T.jsx)(`td`,{className:`py-2.5 px-3 hidden lg:table-cell`,children:e.max_allocation?(0,T.jsxs)(`span`,{className:`text-xs font-medium`,children:[`$`,(e.max_allocation/1e6).toFixed(1),`M`]}):(0,T.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`â`})}),(0,T.jsx)(`td`,{className:`py-2.5 px-3 hidden lg:table-cell`,children:e.founded_year?(0,T.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[2026-e.founded_year,`yr`]}):(0,T.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`â`})}),(0,T.jsx)(`td`,{className:`py-2.5 px-3 hidden lg:table-cell`,children:(Number(e.total_payouts)??0)>0?(0,T.jsxs)(`span`,{className:`text-xs font-medium`,children:[`$`,(Number(e.total_payouts)/1e6).toFixed(0),`M+`]}):(0,T.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`â`})}),(0,T.jsx)(`td`,{className:`py-2.5 px-3`,children:(0,T.jsx)(`div`,{className:`flex items-center gap-1.5 flex-wrap`,children:e.platforms?.length?e.platforms.map(e=>(0,T.jsxs)(`span`,{className:`relative group/platform inline-flex`,children:[D(e)?(0,T.jsx)(`img`,{src:D(e),alt:e,className:`w-4 h-4 object-contain rounded-sm cursor-pointer`}):(0,T.jsx)(`span`,{className:`text-[10px] text-muted-foreground cursor-pointer`,children:e}),(0,T.jsx)(`span`,{className:`absolute bottom-full left-1/2 -translate-x-1/2 mb-1.5 px-2 py-0.5 rounded bg-foreground text-background text-[10px] font-semibold whitespace-nowrap opacity-0 scale-90 group-hover/platform:opacity-100 group-hover/platform:scale-100 transition-all duration-150 pointer-events-none z-50 shadow-lg`,children:e})]},e)):(0,T.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:`â`})})}),(0,T.jsx)(`td`,{className:`py-2.5 px-3 text-right sticky right-0 z-10 bg-card group-hover:bg-muted/30 min-w-[80px]`,children:(0,T.jsxs)(`div`,{className:`flex items-center justify-end gap-1`,children:[(0,T.jsx)(r,{to:`/firms/${e.firm_slug}`,className:`hidden lg:block`,children:(0,T.jsx)(a,{variant:`ghost`,size:`sm`,className:`h-7 text-xs`,children:`Details`})}),(0,T.jsxs)(a,{size:`sm`,className:`h-7 text-xs`,onClick:t=>{t.stopPropagation(),n(e.firm_id,e.firm_name,`hero-challenges-table`,e.affiliate_link)},children:[`Get`,(0,T.jsx)(f,{className:`h-3 w-3 ml-1`})]})]})})]},e.id))})]})}),G.length===0&&(0,T.jsxs)(`div`,{className:`text-center py-12`,children:[(0,T.jsx)(`p`,{className:`text-muted-foreground mb-4`,children:`No challenges match your filters`}),(0,T.jsx)(a,{variant:`outline`,size:`sm`,onClick:J,children:`Clear Filters`})]})]})]}),G.length>O&&!y&&(0,T.jsx)(`div`,{className:`text-center py-4 px-3 max-w-[1400px] mx-auto`,children:(0,T.jsxs)(a,{variant:`outline`,onClick:()=>b(!0),className:`gap-2 w-full md:w-auto h-11 md:h-9`,children:[`Show all `,G.length,` challenges`,(0,T.jsx)(s,{className:`h-4 w-4`})]})}),y&&G.length>O&&(0,T.jsx)(`div`,{className:`text-center py-4 max-w-[1400px] mx-auto`,children:(0,T.jsxs)(a,{variant:`ghost`,size:`sm`,onClick:()=>b(!1),className:`gap-2 text-muted-foreground`,children:[`Show less`,(0,T.jsx)(c,{className:`h-4 w-4`})]})})]})};export{A as t};
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.