PageSourceSearch

https://pynyx.com/assets/index-D1lVQEEY.js

js pynyx.com collected 2026-09-30 17:40:13 UTC 765,495 bytes, 2,463 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AboutUsPage-BxNKipby.js","assets/vendor-CdjaocVk.js","assets/vendor-D2UeF-_q.css","assets/StudentAmbassador-lMOdOa8i.js","assets/label-CV2Vcvrz.js","assets/PricingPage-BNB1TzMl.js","assets/CollegeDemoPage-CkdrJ0pg.js","assets/card-XB5chznh.js","assets/CollegeSignupPage-B0ZzQ-Ir.js","assets/CollegeLoginPage-CFDoCAt_.js","assets/separator-DfgpvgWZ.js","assets/CollegeForgotPasswordPage-CCSO4LjB.js","assets/CollegeResetPasswordPage-DvzVTc_e.js","assets/CollegeStudentRegistration-D0ImCWG3.js","assets/RecruiterLoginPage-B8ATxfZg.js","assets/RecruiterDemoPage-D-gYpnZk.js","assets/RecruiterAccessPage-D_3lLqus.js","assets/SharedJobPipeline-BAL8Z5bh.js","assets/badge-CpYnPibP.js","assets/vendor-excel-Br0mC-JZ.js","assets/SharedCandidateProfile-D1Zhairj.js","assets/SharedLayout-DPSn_u3N.js","assets/MobileProctorPage-CdUnRQui.js","assets/RecruiterLayout-CCpSyFKg.js","assets/RecruiterDashboard-BI58pFcs.js","assets/RecruiterJobPost-2CcmkBTD.js","assets/skills-0DeT7AdX.js","assets/RecruiterJobDetail-BHyAzsAn.js","assets/dropdown-menu-icbmaKLu.js","assets/CreateOnlineAssessmentModal-aaXAYYOs.js","assets/slider-BYa89ucH.js","assets/RecruiterCandidateProfile-CCqiQbSK.js","assets/RecruiterCandidateView-DUDvjKaI.js","assets/RecruiterProjectAnalysis-C7ynXrR8.js","assets/RecruiterSimilarCandidates-BtpI2bYe.js","assets/RecruiterSearch-CiNE5_Tr.js","assets/RecruiterProfile-DuNqeO-S.js","assets/LogoCropModal-DqlquLEN.js","assets/CollegeLayout-BzhmkzWy.js","assets/CollegeDashboard-CVEPZBq_.js","assets/CollegeStudentsList-ClUMSxNb.js","assets/CollegeProfile-D6WxYsc3.js","assets/CollegeCampus-CwCU5P_B.js","assets/CollegeJobPost-CuwtwTe1.js","assets/CollegeJobDetail-BoPQVVkG.js","assets/CollegePlacements-D4Z7UAs3.js","assets/CollegeStudentProfile-CtbOm8j-.js","assets/CollegeSimilarStudents-C0F3xqBa.js","assets/CollegeStudentProjectAnalysis-SgLn1zvj.js","assets/DimensionGrid-QmX9rvKV.js","assets/CollegeJobMatches-DCgxOEp3.js","assets/SortingPage-_Y2Yk_V1.js","assets/ResourceComponents-B8njlzzY.js","assets/DivideConquerVisualizer-CQluOzyP.js","assets/MasterNotesLayout-CIe6TqV2.js","assets/HashingPage-S8f5_a2Z.js","assets/TwoPointersPage-lhAAvJEK.js","assets/SlidingWindowPage-deMocxxh.js","assets/PrefixSumPage-CPpppBVE.js","assets/BinarySearchPage-E-X5hCp7.js","assets/BinarySearchVisualizer-By2twi0p.js","assets/BoyerMooreMajorityPage-2lYsnB9V.js","assets/MonotonicStackPage-BST3Sb0Q.js","assets/MonotonicQueuePage-DOpBfkVC.js","assets/HeapPage-7h4S04Qc.js","assets/HeapVisualizer-Cu24_uj7.js","assets/TwoHeapsPage-WME17KrO.js","assets/LinkedListPage-Dco3URQB.js","assets/DummyNodeMutationPage-BwSS6e_O.js","assets/RecursionPage-BjMJPYE_.js","assets/RecursionVisualizer-zIQ01fDJ.js","assets/BacktrackingPage-_LAUK3Rs.js","assets/CombinatoricsPage-DsjmR3ra.js","assets/GreedyPage-DepnOwkH.js","assets/DivideConquerPage-BQIch5Eu.js","assets/QuickselectPage-C2WGRqzy.js","assets/KadanesPage-Dy1TLf3N.js","assets/MergeIntervalsPage-DW_0FcWD.js","assets/KWayMergePage-Dlzn1nr5.js","assets/TreeTraversalPage-VA71dPCR.js","assets/TreeTraversalVisualizer-BsF0xsHB.js","assets/TreeDPPage-Jp7BYeXt.js","assets/GraphFundamentalsPage-CWZNQqW0.js","assets/GraphTraversalVisualizer-CjiS0izM.js","assets/GridTraversalPage-KZ5qd8q2.js","assets/MultiSourceBFSPage-CToyzOvw.js","assets/UnionFindPage-Cjb-cs7h.js","assets/TopologicalSortPage-D6Q9hMv0.js","assets/ShortestPathPage-OTYGfQ_p.js","assets/ShortestPathVisualizer-k_gA8Wb1.js","assets/BipartiteColoringPage-CclNNIAF.js","assets/TarjanBridgesPage-C0u34t-L.js","assets/HierholzerEulerianPage-C1ZTWzKn.js","assets/GridDPPage-D2gqy7Fc.js","assets/DynamicProgrammingPage-C2PT4dAW.js","assets/StockDPPage-BJtr1r9K.js","assets/AlignmentDPPage-Byb_7Epy.js","assets/IntervalDPPage-D52fqqye.js","assets/BitmaskDPPage-pN-curzv.js","assets/DigitDPPage-DMFnwXYk.js","assets/BitManipulationPage-B-CPHh9J.js","assets/BinaryExponentiationPage-RktnJ_ss.js","assets/SievePrimesPage-wCXoC-0H.js","assets/TriePage-D0HA03FT.js","assets/SegmentTreePage-B4X58oZ0.js","assets/FenwickTreePage-bYuYhwvq.js","assets/KMPPage-Dge-mOCz.js","assets/LineSweepPage-Dhintubj.js","assets/BinaryLiftingPage-Cm3Ht-TY.js","assets/RollingHashPage-C6m3AQJt.js","assets/CycleDetectionGraphsPage-B1Iqne2t.js","assets/QuantDetailPage-CVf5d7IA.js","assets/LogicalDetailPage-B
1dIGWS2I.js","assets/DSATopicDetailPage-ORxHT-aC.js","assets/ProblemDetail-ByDMU2S2.js","assets/resizable-DDA2n6hh.js","assets/vendor-monaco-BTHLLeOQ.js","assets/ProctoringWidget-7KbyjN2T.js","assets/FreeVersionPage-cPlBM5_e.js","assets/BeginnerRoadmap-L3f0rgla.js","assets/alert-dialog-Cns8Bo9k.js","assets/IntermediateRoadmap-Chv6X34B.js","assets/ProRoadmap-BAsdZuEa.js","assets/FoundationRoadmap-BVauhq_s.js","assets/BeginnerProblemRoadmap-DusnVSlv.js","assets/IntermediateProblemRoadmap-Cg-Zfri2.js","assets/RevisitRoadmap-DPQf-LKQ.js","assets/DiscussPage-B9nYwt8O.js","assets/CampusPage-Ci9EOopP.js","assets/student-BDXiOLlP.js","assets/AssessmentPage-D4dFs32o.js","assets/CameraCheckModal-DodT3itj.js","assets/RoadmapsPage-BhA732t6.js","assets/StudentResume-Cng4b244.js","assets/vendor-pdf-2ju9asfQ.js","assets/StudentDashboard-DtdAaS0l.js","assets/AssessmentResultsPage-zop16I1j.js","assets/AIInterviewPage-CwT4OA5Z.js","assets/OnlineAssessmentPage-Ba5Z9bxP.js","assets/ProjectsPage-CbrhUyv_.js","assets/RepoAnalysisPage-BX8sFwfY.js","assets/ComingSoon-D2-zrU9U.js","assets/JobsPage-BhB9hLby.js","assets/sheet-_dkzFS5y.js","assets/ContestPage-xniYaK5m.js","assets/WorkshopPage-Bdfb6SGM.js","assets/AdminLayout-D_vKXBte.js","assets/AdminDashboard-DPJFrC5b.js","assets/AdminStudents-Ck6q6AA8.js","assets/AdminRecruiters-C6g1cous.js","assets/AdminColleges-D4gdSXdq.js","assets/AdminJobs-B73YPDf9.js","assets/AdminWorkshopsPage-Cf3n59AX.js","assets/AdminLoginPage-BdgDJpkq.js","assets/AdminContentStudioPage-H8gaxwsj.js","assets/StudentLayout-CLfFrKP0.js"])))=>i.map(i=>d[i]);
2var Wi=Object.defineProperty;var Gi=(t,i,s)=>i in t?Wi(t,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[i]=s;var Pt=(t,i,s)=>Gi(t,typeof i!="symbol"?i+"":i,s);import{r as a,U as Ui,V as Qi,X as e,Y as ba,$ as ya,a0 as va,a1 as wa,a2 as ja,a3 as Na,a4 as ka,a5 as Sa,a6 as Yi,a7 as rt,a8 as Ji,a9 as Ta,aa as Xi,ab as Ki,ac as Zi,ad as St,ae as za,af as Ca,ag as er,ah as ce,ai as tr,aj as ut,ak as _a,al as A,am as nt,an as fe,ao as Ae,ap as He,aq as Aa,ar as ve,as as $a,at as Ia,au as Be,av as Pa,aw as De,ax as Ea,ay as qe,az as Zt,aA as ps,aB as sr,aC as Da,aD as Oa,aE as Me,aF as ar,aG as ir,aH as $e,aI as rr,aJ as Ra,aK as La,aL as Fa,aM as Ba,aN as Ts,aO as Gt,aP as nr,aQ as Ge,aR as xt,aS as Ma,aT as qa,aU as or,aV as lr,aW as st,aX as cr,aY as Os,aZ as zt,a_ as Ha,a$ as dr,b0 as Rs,b1 as mr,b2 as Va,b3 as ht,b4 as hr,b5 as Wa,b6 as Ue,b7 as pr,b8 as ur,b9 as xr,ba as gr,bb as fr,bc as br,bd as us,be as Et,bf as Ls,bg as Fs,bh as zs,bi as yr,bj as Ga,bk as vr,bl as Xe,bm as Cs,bn as Ua,bo as _s,bp as wr,bq as jr,br as S,bs as x,bt as Qa,bu as Nr,bv as Ya,bw as kr,bx as Ja,by as Sr,bz as Xa,bA as Tr,bB as Ka,bC as Za,bD as zr,bE as Cr,bF as ei,bG as _r,bH as Ar,bI as $r,bJ as es,bK as Bs,bL as xs,bM as ti,bN as Ir,bO as Pr,bP as si,bQ as Er,bR as Ms,bS as ai,bT as Dr,bU as Or,bV as Rr,bW as ii,bX as ri,bY as Nt,bZ as kt,b_ as vt,b$ as Lr,c0 as Fr,c1 as Br,c2 as Mr,c3 as qr,c4 as Hr,c5 as Vr,c6 as Wr,c7 as Gr,c8 as qs,c9 as Ur,ca as Qr,cb as ni,cc as oi,cd as li,ce as Yr,cf as ci,cg as di,ch as Jr,ci as Xr,cj as Kr,ck as gs,cl as Hs,cm as Vs,cn as Ws,co as Zr,cp as en,cq as tn,cr as Gs,cs as ts,ct as ss,cu as as,cv as sn,cw as an,cx as rn,cy as nn,cz as on}from"./vendor-CdjaocVk.js";(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))l(h);new MutationObserver(h=>{for(const u of h)if(u.type==="childList")for(const o of u.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&l(o)}).observe(document,{childList:!0,subtree:!0});function s(h){const u={};return h.integrity&&(u.integrity=h.integrity),h.referrerPolicy&&(u.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?u.credentials="include":h.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(h){if(h.ep)return;h.ep=!0;const u=s(h);fetch(h.href,u)}})();function Oe(){const t=window.location.hostname;return t.startsWith("admin.")?"admin":t.startsWith("recruiter.")?"recruiter":t.startsWith("institution.")||t.startsWith("instituation.")?"institution":"student"}function Q(t,i=""){const{protocol:s}=window.location,l=ln(),h=i?i.startsWith("/")?i:"/"+i:"";if(l.startsWith("localhost")||l.startsWith("127.0.0.1"))return`${s}//${l}${h}?portal=${t}`;
2switch(t){case"recruiter":return`${s}//recruiter.${l}${h}`;case"institution":return`${s}//institution.${l}${h}`;case"student":default:return`${s}//${l}${h}`}}function ln(){const t=window.location.hostname;if(t==="localhost"||t==="127.0.0.1")return`${t}:${window.location.port||"8080"}`;const i=t.split(".");return i.length>2?i.slice(-2).join("."):t}const cn=window.fetch;window.fetch=async function(...t){const i=await cn.apply(this,t);if(i.status===401){const s=window.location.pathname;if(!s.startsWith("/auth")&&!s.startsWith("/login")&&!s.startsWith("/signup")){localStorage.removeItem("token"),sessionStorage.clear();const l=Oe();l==="admin"||l==="institution"||l==="recruiter"?window.location.href="/login":window.location.href="/auth"}}return i};const dn=1,mn=1e6;let ls=0;function hn(){return ls=(ls+1)%Number.MAX_SAFE_INTEGER,ls.toString()}const cs=new Map,Us=t=>{if(cs.has(t))return;const i=setTimeout(()=>{cs.delete(t),Tt({type:"REMOVE_TOAST",toastId:t})},mn);cs.set(t,i)},pn=(t,i)=>{switch(i.type){case"ADD_TOAST":return{...t,toasts:[i.toast,...t.toasts].slice(0,dn)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(s=>s.id===i.toast.id?{...s,...i.toast}:s)};case"DISMISS_TOAST":{const{toastId:s}=i;return s?Us(s):t.toasts.forEach(l=>{Us(l.id)}),{...t,toasts:t.toasts.map(l=>l.id===s||s===void 0?{...l,open:!1}:l)}}case"REMOVE_TOAST":return i.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(s=>s.id!==i.toastId)}}},Ut=[];let Qt={toasts:[]};function Tt(t){Qt=pn(Qt,t),Ut.forEach(i=>{i(Qt)})}function un({...t}){const i=hn(),s=h=>Tt({type:"UPDATE_TOAST",toast:{...h,id:i}}),l=()=>Tt({type:"DISMISS_TOAST",toastId:i});return Tt({type:"ADD_TOAST",toast:{...t,id:i,open:!0,onOpenChange:h=>{h||l()}}}),{id:i,dismiss:l,update:s}}function xn(){const[t,i]=a.useState(Qt);return a.useEffect(()=>(Ut.push(i),()=>{const s=Ut.indexOf(i);s>-1&&Ut.splice(s,1)}),[t]),{...t,toast:un,dismiss:s=>Tt({type:"DISMISS_TOAST",toastId:s})}}function v(...t){return Ui(Qi(t))}function Ld(t,i,s=0){const l=document.getElementById(t);if(!l)return;const h=window.scrollY,m=l.getBoundingClientRect().top+window.scrollY+s-h;let b=null;const w=g=>1-Math.pow(1-g,3);function d(g){b===null&&(b=g);const f=g-b,p=Math.min(f/i,1),N=w(p);window.scrollTo(0,h+m*N),f<i&&requestAnimationFrame(d)}requestAnimationFrame(d)}const Fd=t=>{if(!t)return"#8b949e";const i=["#FF5555","#4D4DFF","#8BE9FD","#BD93F9","#FFB86C","#FF79C6","#F1FA8C","#00bcd4","#FF00FF","#e040fb"];let s=0;for(let l=0;l<t.length;l++)s=t.charCodeAt(l)+((s<<5)-s);return i[Math.abs(s)%i.length]},gn=Yi,mi=a.forwardRef(({className:t,...i},s)=>e.jsx(ba,{ref:s,className:v("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px] dark",t),...i}));mi.displayName=ba.displayName;const fn=Sa("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-2xl border p-6 pr-8 shadow-xl transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full hover:shadow-[0_0_20px_rgba(139,92,246,0.1)] duration-300",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),hi=a.forwardRef(({className:t,variant:i,...s},l)=>e.jsx(ya,{ref:l,className:v(fn({variant:i}),t),...s}));hi.displayName=ya.displayName;const bn=a.forwardRef(({className:t,...i},s)=>e.jsx(va,{ref:s,className:v("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",t),...i}));bn.displayName=va.displayName;const pi=a.forwardRef(({className:t,...i},s)=>e.jsx(wa,{ref:s,className:v("absolute right-2 top-2 rounded-md p-1 text-foreground
2/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...i,children:e.jsx(ja,{className:"h-4 w-4"})}));pi.displayName=wa.displayName;const ui=a.forwardRef(({className:t,...i},s)=>e.jsx(Na,{ref:s,className:v("text-sm font-semibold",t),...i}));ui.displayName=Na.displayName;const xi=a.forwardRef(({className:t,...i},s)=>e.jsx(ka,{ref:s,className:v("text-sm opacity-90",t),...i}));xi.displayName=ka.displayName;function yn(){const{toasts:t}=xn();return e.jsxs(gn,{children:[t.map(function({id:i,title:s,description:l,action:h,...u}){return e.jsxs(hi,{...u,children:[e.jsxs("div",{className:"grid gap-1",children:[s&&e.jsx(ui,{children:s}),l&&e.jsx(xi,{children:l})]}),h,e.jsx(pi,{})]},i)}),e.jsx(mi,{})]})}const vn=({...t})=>{const s=rt().pathname.startsWith("/college"),l=s?"light":"dark";return e.jsx(Ji,{theme:l,className:v("toaster group",!s&&"dark"),toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t})},wn=Xi,Bd=Ki,Md=Zi,jn=a.forwardRef(({className:t,sideOffset:i=4,...s},l)=>e.jsx(Ta,{ref:l,sideOffset:i,className:v("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...s}));jn.displayName=Ta.displayName;function n({className:t,...i}){return e.jsx("div",{className:v("animate-pulse rounded-md bg-muted",t),...i})}const Nn=({rows:t=8})=>e.jsxs("div",{className:"w-full bg-zinc-950/70 border border-zinc-800/60 rounded-xl overflow-hidden backdrop-blur-md",children:[e.jsxs("div",{className:"flex items-center space-x-4 p-4 border-b border-zinc-800/50 bg-zinc-900/40",children:[e.jsx(n,{className:"h-4 w-10 bg-zinc-800/50"}),e.jsx(n,{className:"h-4 flex-1 bg-zinc-800/50"}),e.jsx(n,{className:"h-4 w-24 bg-zinc-800/50"}),e.jsx(n,{className:"h-4 w-36 bg-zinc-800/50"}),e.jsx(n,{className:"h-4 w-24 bg-zinc-800/50"}),e.jsx(n,{className:"h-4 w-16 bg-zinc-800/50"})]}),Array.from({length:t}).map((i,s)=>e.jsxs("div",{className:"flex items-center space-x-4 p-4 border-b border-zinc-800/30",children:[e.jsx(n,{className:"h-4 w-8 bg-zinc-900/60"}),e.jsx(n,{className:"h-4 flex-1 bg-zinc-900/60"}),e.jsx(n,{className:"h-5 w-20 rounded-md bg-zinc-900/60"}),e.jsxs("div",{className:"flex gap-1.5 w-36",children:[e.jsx(n,{className:"h-4 w-14 rounded bg-zinc-900/60"}),e.jsx(n,{className:"h-4 w-16 rounded bg-zinc-900/60"})]}),e.jsx(n,{className:"h-4 w-16 bg-zinc-900/60"}),e.jsx(n,{className:"h-6 w-6 rounded-md bg-zinc-900/60 ml-auto"})]},s))]}),kn=()=>e.jsx("div",{className:"flex overflow-x-auto gap-4 py-2 px-1 pb-4 no-scrollbar",children:Array.from({length:3}).map((t,i)=>e.jsxs("div",{className:"flex-1 min-w-[260px] sm:min-w-[280px] h-52 bg-zinc-950/70 backdrop-blur-md border border-zinc-800/60 rounded-xl p-6 flex flex-col items-center justify-center space-y-4",children:[e.jsx(n,{className:"h-20 w-48 bg-zinc-900/60 rounded-lg"}),e.jsx(n,{className:"h-5 w-32 bg-zinc-900/60 rounded-md"})]},i))}),Sn=()=>e.jsxs("div",{className:"flex flex-col md:flex-row gap-4 items-stretch md:items-center justify-between bg-zinc-950/70 backdrop-blur-md p-3 rounded-xl border border-zinc-800/60",children:[e.jsx(n,{className:"h-10 flex-1 bg-zinc-900/50 rounded-xl"}),e.jsxs("div",{className:"flex gap-3 items-center",children:[e.jsx(n,{className:"h-8 w-36 bg-zinc-900/50 rounded-lg"}),e.jsx(n,{className:"h-8 w-36 bg-zinc-900/50 rounded-lg"}),e.jsx(n,{className:"h-8 w-28 bg-zinc-900/50 rounded-xl"})]})]}),qd=()=>e.jsxs("div",{className:"h-screen flex flex-col bg-[#02020a] overflow-hidden font-sans relative text-[#c9d1d9]",children:[e.jsx("div",{className:"fixed inset-0 bg-[#02020a] pointer-events-none"}),e.jsx("div",{className:"fixed inset-0 bg-[radial-gradient(circle_at_50%_-20%,rgba(255,255,255,0.02),transparent_70%)] pointer-events-none"}),e.jsx("div",{className:"fixed inset-0 bg-[linear-gradient(rgba(255,255,255,0.015)_1px,transparent_1px),linear-gradient(90deg,rgba(255,255,255,0.015)_1px,transparent_1px)] bg-[size:60px_60px] pointer-events-none"}),e.jsxs("div",{className:"h-14 border-b border-white/[0.06] bg-[#080b
212]/60 backdrop-blur-md flex items-center justify-between px-6 shrink-0 z-10",children:[e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(n,{className:"h-5 w-20 bg-white/[0.08] rounded-md"}),e.jsx("div",{className:"h-4 w-px bg-white/[0.05]"}),e.jsx(n,{className:"h-8 w-36 bg-white/[0.06] rounded-lg"}),e.jsx(n,{className:"h-8 w-24 bg-white/[0.04] rounded-lg"})]}),e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx(n,{className:"h-8 w-24 bg-white/[0.06] rounded-lg"}),e.jsx(n,{className:"h-8 w-24 bg-white/[0.04] rounded-lg"}),e.jsx("div",{className:"h-4 w-px bg-white/[0.05]"}),e.jsx(n,{className:"w-8 h-8 rounded-full bg-white/[0.06]"})]})]}),e.jsxs("div",{className:"flex-1 flex overflow-hidden min-h-0 z-10",children:[e.jsxs("div",{className:"w-1/2 flex flex-col border-r border-white/[0.06] bg-[#080b12]/40 min-h-0",children:[e.jsxs("div",{className:"h-10 border-b border-white/[0.06] flex items-center px-4 gap-3 bg-white/[0.02]",children:[e.jsx(n,{className:"h-4 w-24 bg-white/[0.08] rounded"}),e.jsx(n,{className:"h-4 w-16 bg-white/[0.04] rounded"})]}),e.jsxs("div",{className:"flex-1 p-6 space-y-6 overflow-y-auto min-h-0",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx(n,{className:"h-7 w-2/3 bg-white/[0.08] rounded-md"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(n,{className:"h-5 w-16 bg-white/[0.06] rounded-md"}),e.jsx(n,{className:"h-5 w-20 bg-white/[0.04] rounded-md"})]})]}),e.jsxs("div",{className:"space-y-2.5",children:[e.jsx(n,{className:"h-3.5 w-full bg-white/[0.04] rounded"}),e.jsx(n,{className:"h-3.5 w-11/12 bg-white/[0.04] rounded"}),e.jsx(n,{className:"h-3.5 w-4/5 bg-white/[0.04] rounded"}),e.jsx(n,{className:"h-3.5 w-full bg-white/[0.04] rounded"}),e.jsx(n,{className:"h-3.5 w-2/3 bg-white/[0.04] rounded"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(n,{className:"h-4 w-24 bg-white/[0.06] rounded"}),e.jsxs("div",{className:"p-4 rounded-xl border border-white/[0.05] bg-white/[0.02] space-y-2",children:[e.jsx(n,{className:"h-3.5 w-full bg-white/[0.04] rounded"}),e.jsx(n,{className:"h-3.5 w-3/4 bg-white/[0.04] rounded"})]})]})]})]}),e.jsxs("div",{className:"flex-1 flex flex-col bg-[#080b12]/60 min-h-0",children:[e.jsxs("div",{className:"h-10 border-b border-white/[0.06] flex items-center justify-between px-4 bg-white/[0.02]",children:[e.jsx(n,{className:"h-5 w-28 bg-white/[0.06] rounded-md"}),e.jsx(n,{className:"h-5 w-16 bg-white/[0.04] rounded-md"})]}),e.jsxs("div",{className:"flex-1 p-6 space-y-3 bg-[#02020a]/40 overflow-hidden",children:[e.jsx(n,{className:"h-3.5 w-36 bg-white/[0.06] rounded"}),e.jsx(n,{className:"h-3.5 w-64 bg-white/[0.04] rounded"}),e.jsx(n,{className:"h-3.5 w-48 bg-white/[0.04] rounded"}),e.jsx(n,{className:"h-3.5 w-56 bg-white/[0.04] rounded"}),e.jsx(n,{className:"h-3.5 w-40 bg-white/[0.04] rounded"}),e.jsx(n,{className:"h-3.5 w-48 bg-white/[0.04] rounded"}),e.jsx(n,{className:"h-3.5 w-32 bg-white/[0.04] rounded"})]}),e.jsxs("div",{className:"h-14 border-t border-white/[0.06] flex items-center justify-between px-4 bg-[#080b
212]/60",children:[e.jsx(n,{className:"h-8 w-24 bg-white/[0.04] rounded-lg"}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(n,{className:"h-8 w-20 bg-white/[0.06] rounded-lg"}),e.jsx(n,{className:"h-8 w-24 bg-white/[0.08] rounded-lg"})]})]})]})]})]}),Hd=()=>e.jsxs("div",{className:"min-h-full h-full bg-[#09090b] text-zinc-200 font-sans relative selection:bg-violet-500/30 flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"fixed inset-0 pointer-events-none z-0",children:[e.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[800px] h-[400px] opacity-80",style:{background:"radial-gradient(circle, rgba(139,92,246,0.12) 0%, transparent 70%)",filter:"blur(80px)"}}),e.jsx("div",{className:"absolute inset-0 opacity-[0.03]",style:{backgroundImage:"linear-gradient(rgba(255,255,255,0.4) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.4) 1px, transparent 1px)",backgroundSize:"48px 48px"}})]}),e.jsx("div",{className:"relative z-20 flex-1 flex flex-col min-h-0 overflow-y-auto custom-scrollbar",children:e.jsxs("div",{className:"max-w-[1700px] mx-auto w-full px-6 sm:px-8 py-8 space-y-8",children:[e.jsxs("div",{className:"p-6 bg-zinc-950/90 border border-zinc-800 rounded-2xl backdrop-blur-xl flex flex-col md:flex-row md:items-center justify-between gap-6",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(n,{className:"w-14 h-14 rounded-2xl bg-zinc-900 shrink-0"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{className:"h-7 w-48 bg-zinc-800 rounded-lg"}),e.jsx(n,{className:"h-4 w-32 bg-zinc-900 rounded-md"})]})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(n,{className:"h-11 w-64 bg-zinc-900 rounded-xl"}),e.jsx(n,{className:"h-11 w-36 bg-zinc-800 rounded-xl"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8 items-start",children:[e.jsx("div",{className:"lg:col-span-3 space-y-6",children:e.jsxs("div",{className:"bg-zinc-950/90 border border-zinc-800 rounded-2xl p-5 space-y-4",children:[e.jsx(n,{className:"h-5 w-28 bg-zinc-800 rounded-md"}),e.jsx("div",{className:"space-y-2",children:Array.from({length:6}).map((t,i)=>e.jsx(n,{className:"h-9 w-full bg-zinc-900 rounded-xl"},i))})]})}),e.jsx("div",{className:"lg:col-span-6 space-y-6",children:Array.from({length:4}).map((t,i)=>e.jsxs("div",{className:"bg-zinc-950/90 border border-zinc-800 rounded-2xl p-6 space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(n,{className:"w-10 h-10 rounded-xl bg-zinc-900"}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(n,{className:"h-4 w-28 bg-zinc-800 rounded-md"}),e.jsx(n,{className:"h-3 w-20 bg-zinc-900 rounded-md"})]})]}),e.jsx(n,{className:"h-6 w-20 bg-zinc-900 rounded-lg"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{className:"h-5 w-3/4 bg-zinc-800 rounded-md"}),e.jsx(n,{className:"h-4 w-full bg-zinc-900 rounded-md"}),e.jsx(n,{className:"h-4 w-2/3 bg-zinc-900 rounded-md"})]}),e.jsxs("div",{className:"flex items-center justify-between pt-4 border-t border-zinc-800/80",children:[e.jsx(n,{className:"h-6 w-24 bg-zinc-900 rounded-lg"}),e.jsx(n,{className:"h-6 w-16 bg-zinc-900 rounded-lg"})]})]},i))}),e.jsx("div",{className:"lg:col-span-3 space-y-6",children:e.jsxs("div",{className:"bg-zinc-950/90 border border-zinc-800 rounded-2xl p-5 space-y-4",children:[e.jsx(n,{className:"h-5 w-24 bg-zinc-800 rounded-md"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:Array.from({length:6}).map((t,i)=>e.jsx(n,{className:"h-7 w-20 bg-zinc-900 rounded-lg"},i))})]})})]})]})})]}),Tn=()=>{const t=window.location.pathname,i=["/problems","/resources","/profile","/roadmap","/projects","/threads","/campus","/coming-soon","/free-version","/resume","/roadmaps"],s=["/recruiter"],l=["/","/auth","/login","/signup","/reset-password","/verify-email","/pricing","/register-for-ambassador"];return i.some(o=>t.startsWith(o))||s.some(o=>t.startsWith(o))||l.some(o=>t===o)?e.jsxs("div",{className:"dark min-h-screen flex flex-col bg-[#050510] text-[#c9d1d9]",children:[e.jsxs("div",{className:"h-16 border-b border-border flex items-center justify-between px-4",children:[e.jsx(n,{className:"h-8 w-32 bg-muted"}),e.jsxs("div",{className:"flex space-x-4",children:[e.jsx(n,{className:"h-8 w-8 rounded-full bg-muted"}),e.jsx(n,{className:"h-8 w-24 bg-muted"})]})]}),e.jsxs("div",{className:"flex-1 p-8 space-y-8",children:[e.jsxs("div",{className:"flex gap-4",children:[e.jsx(n,{className:"h-40 flex-1 bg-muted/20"}),e.jsx(n,{className:"h-40 flex-1 bg-muted/20"}),e.jsx(n,{className:"h-40 flex-1 bg-muted/20"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(n,{className:"h-8 w-48 bg-muted"}),e.jsx(n,{className:"h-[400px] w-full bg-muted/10 border border-border/20"})]})]})]}):e.jsxs("div",{className:"professional-theme min-h-screen flex flex-col bg-[hsl(210,40%,98%)] text-[hsl(222.2,84%,4.9%)]",children:[e.jsxs("div",{className:"h-20 border-b border-[hsl(214.3,31.8%,91.4%)]/40 backdrop-blur-xl flex items-center justify-between px-6 md:px-12",children:[e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsx(n,{className:"h-8 w-14 bg-[hsl(210,40%,90%)] rounded"}),e.jsx(n,{className:"h-8 w-14 bg-[hsl(210,40%,92%)] rounded"})]}),e.jsxs("div",{className:"flex items-center gap-2 p-1 rounded-xl border-2 border-[hsl(214.3,31.8%,91.4%)]/80 bg-[hsl(210,40%,96.1%)]/20",children:[e.jsx(n,{className:"h-8 w-24 bg-[hsl(210,40%,90%)] rounded-lg"}),e.jsx(n,{className:"h-8 w-24 bg-[hsl(210,40%,92%)] rounded-lg"}),e.jsx(n,{className:"h-8 w-24 bg-[hsl(210,40%,92%)] rounded-lg"})]}),e.jsx(n,{className:"h-11 w-11 rounded-3xl bg-[hsl(210,40%,90%)]"})]}),e.jsxs("div",{className:"flex-1 p-6 md:p-8 space-y-8 max-w-[1600px] mx-auto w-full",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx(n,{className:"h-4 w-32 bg-[hsl(210,40%,92%)] rounded-full"}),e.jsx(n,{className:"h-10 w-72 bg-[hsl(210,40%,90%)] rounded"}),e.jsx(n,{className:"h-4 w-96 bg-[hsl(210,40%,93%)] rounded"})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[1,2,3].map(o=>e.jsx("div",{className:"p-5 rounded-xl border border-[hsl(214.3,31.8%,91.4%)] bg-white shadow-sm",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(n,{className:"h-12 w-12 rounded-xl bg-[hsl(210,40%,93%)]"}),e.jsxs("div",{className:"space-y-2 flex-1",children:[e.jsx(n,{className:"h-3 w-20 bg-[hsl(210,40%,93%)]"}),e.jsx(n,{className:"h-7 w-16 bg-[hsl(210,40%,90%)]"})]})]})},o))}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[e.jsxs("div",{className:"p-6 rounded-xl border border-[hsl(214.3,31.8%,91.4%)] bg-white",children:[e.jsx(n,{className:"h-5 w-40 bg-[hsl(210,40%,92%)] mb-4"}),e.jsx(n,{className:"h-[300px] w-full bg-[hsl(210,40%,96%)] rounded-lg"})]}),e.jsxs("div",{className:"p-6 rounded-xl border border-[hsl(214.3,31.8%,91.4%)] bg-white",children:[e.jsx(n,{className:"h-5 w-40 bg-[hsl(210,40%,92%)] mb-4"}),e.jsx(n,{className:"h-[300px] w-full bg-[hsl(210,40%,96%)] rounded-lg"})]})]})]})]})},zn=()=>e.jsx("div",{className:"dark min-h-screen bg-[#050510] p-4 md:p-10 space-y-12 text-[#c9d1d9]",children:e.jsxs("div",{className:"max-w-7xl mx-auto 
2space-y-12",children:[e.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between border-b border-border pb-8",children:[e.jsxs("div",{className:"flex items-center space-x-12",children:[e.jsx(n,{className:"h-32 w-32 bg-muted/50 hidden md:block"}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(n,{className:"h-4 w-24 bg-muted"}),e.jsx(n,{className:"h-16 w-64 bg-muted"}),e.jsx(n,{className:"h-6 w-48 bg-muted/50"})]})]}),e.jsx(n,{className:"h-10 w-32 bg-muted/50"})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsx(n,{className:"h-[300px] w-full bg-muted/20"}),e.jsx(n,{className:"h-[100px] w-full bg-muted/20"})]}),e.jsxs("div",{className:"col-span-2 space-y-6",children:[e.jsx(n,{className:"h-[250px] w-full bg-muted/20"}),e.jsxs("div",{className:"grid grid-cols-2 gap-8",children:[e.jsx(n,{className:"h-[200px] w-full bg-muted/20"}),e.jsx(n,{className:"h-[200px] w-full bg-muted/20"})]})]})]})]})}),Vd=()=>e.jsx("div",{className:"dark min-h-screen bg-[#050510] flex flex-col text-[#c9d1d9] font-mono",children:e.jsxs("div",{className:"max-w-5xl mx-auto px-6 py-10 w-full space-y-10",children:[e.jsx("div",{className:"relative rounded-3xl border border-[#bd93f9]/10 bg-[#0d1117]/80 p-10 overflow-hidden",children:e.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-10",children:[e.jsx("div",{className:"w-[150px] h-[150px] rounded-full border-4 border-white/[0.03] flex items-center justify-center shrink-0",children:e.jsx(n,{className:"h-10 w-16 bg-white/[0.05]"})}),e.jsxs("div",{className:"flex-1 space-y-6 w-full",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx(n,{className:"h-8 w-2/3 bg-white/[0.05]"}),e.jsx(n,{className:"h-4 w-1/3 bg-white/[0.03]"})]}),e.jsxs("div",{className:"flex flex-wrap gap-6",children:[e.jsxs("div",{className:"flex gap-3",children:[e.jsx(n,{className:"h-10 w-10 rounded-xl bg-white/[0.05]"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{className:"h-3 w-12 bg-white/[0.03]"}),e.jsx(n,{className:"h-4 w-16 bg-white/[0.05]"})]})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(n,{className:"h-10 w-10 rounded-xl bg-white/[0.05]"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{className:"h-3 w-12 bg-white/[0.03]"}),e.jsx(n,{className:"h-4 w-16 bg-white/[0.05]"})]})]})]})]})]})}),e.jsxs("div",{className:"space-y-6",children:[e.jsx(n,{className:"h-24 w-full rounded-2xl bg-white/[0.02] border border-white/[0.05]"}),e.jsx(n,{className:"h-20 w-full rounded-2xl bg-white/[0.02] border border-white/[0.05]"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 mb-6",children:[e.jsx(n,{className:"h-6 w-48 bg-white/[0.05]"}),e.jsx(n,{className:"h-4 w-10 bg-white/[0.03]"})]}),[1,2,3].map(t=>e.jsxs("div",{className:"rounded-2xl border border-white/[0.06] bg-[#0d1117]/40 p-6 flex items-center gap-6",children:[e.jsx(n,{className:"w-11 h-11 rounded-xl bg-white/[0.05]"}),e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx(n,{className:"h-5 w-1/3 bg-white/[0.05]"}),e.jsx(n,{className:"h-3 w-1/2 bg-white/[0.03]"})]}),e.jsxs("div",{className:"w-24 space-y-2 hidden sm:block",children:[e.jsx(n,{className:"h-3 w-full bg-white/[0.03]"}),e.jsx(n,{className:"h-1.5 w-full rounded-full bg-white/[0.05]"})]}),e.jsx(n,{className:"h-4 w-4 bg-white/[0.05]"})]},t))]})]})}),Wd=()=>{const t=[["w-3/5","w-4/5","w-1/2","w-3/4","w-2/3"],["w-2/3","w-3/4","w-3/5","w-4/5"],["w-4/5","w-1/2","w-2/3","w-3/5","w-3/4"]];return e.jsx("div",{className:"space-y-8 pb-20 animate-pulse font-mono",children:t.map((i,s)=>e.jsxs("div",{className:"group relative bg-zinc-950/90 backdrop-blur-xl border border-zinc-800 rounded-2xl overflow-hidden shadow-2xl shadow-black/80",children:[e.jsxs("div",{className:"flex items-center gap-3 p-4 border-b border-zinc-800 bg-zinc-900/60",children:[e.jsx(n,{className:"w-5 h-5 rounded bg-zinc-800/80 shrink-0"}),e.jsx(n,{className:"h-5 w-40 sm:w-52 bg-zinc-800/80 rounded-md"}),e.jsx(n,{className:"ml-auto h-6 w-24 bg-zinc-900 border border-zinc-800 rounded-md shrink-0"})]}),e.jsx("div",{className:"p-3 gap-1 grid grid-cols-1",children:i.map((l,h)=>e.jsxs("div",{className:"flex items-center gap-4 p-3 rounded-xl border border-transparent",children:[e.jsx(n,{className:"w-5 h-5 rounded-md bg-[#04060a] border border-zinc-800/80 shrink-0"}),e.jsx("div",{className:"flex-1",children:e.jsx(n,{className:`h-4 ${l} bg-zinc-800/60 rounded-md`})}),e.jsx(n,{className:"h-6 w-16 rounded-md bg-[#04060a]/80 border border-zinc-800/80 shrink-0"})]},h))})]},s))})},Gd=()=>e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-6",children:Array.from({length:8}).map((t,i)=>e.jsx("div",{className:"relative flex flex-col bg-[#06080e]/90 backdrop-blur-xl border border-white/10 overflow-hidden h-full rounded-xl",children:e.jsxs("div",{className:"p-5 space-y-4 flex-1 flex flex-col relative z-10",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-[#0c0f17] border border-white/10 rounded-md shrink-0",children:e.jsx(St,{size:16,className:"text-purple-400 opacity-40 animate-pulse"})}),e.jsx(n,{className:"h-3 w-16 bg-white/5"})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(za,{size:12,className:"text-slate-600"})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{className:"h-5 w-3/4 bg-white/10"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(n,{className:"h-3.5 w-16 bg-purple-500/20"}),e.jsx("span",{className:"w-1 h-1 rounded-full bg-slate-700"}),e.jsx(n,{className:"h-3.5 w-12 bg-white/5"})]})]}),e.jsxs("div",{className:"space-y-2 flex-1",children:[e.jsx(n,{className:"h-3 w-full bg-white/5"}),e.jsx(n,{className:"h-3 w-4/5 bg-white/5"})]}),e.jsxs("div",{className:"pt-4 mt-auto border-t border-white/[0.08] flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(Ca,{size:12,className:"text-amber-400/40"}),e.jsx(n,{className:"h-3.5 w-6 bg-white/5"})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(er,{size:12,className:"text-slate-500"}),e.jsx(n,{className:"h-3.5 w-6 bg-white/5"})]})]}),e.jsx(n,{className:"h-3.5 w-16 bg-white/5"})]})]})},i))}),Ud=()=>e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 animate-pulse",children:Array.from({length:6}).map((t,i)=>e.jsxs("div",{className:"bg-zinc-950/70 backdrop-blur-md border border-zinc-800/60 rounded-xl p-5 flex flex-col justify-between h-[230px]",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 mb-3",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(n,{className:"w-10 h-10 rounded-lg bg-zinc-900 border border-zinc-800 shrink-0"}),e.jsxs("div",{className:"space-y-2 flex-1",children:[e.jsx(n,{className:"h-4 w-36 bg-zinc-800/80 rounded"}),e.jsx(n,{className:"h-3 w-24 bg-zinc-900/80 rounded"})]})]}),e.jsx(n,{className:"w-8 h-8 rounded-lg bg-zinc-900 border border-zinc-800"})]}),e.jsxs("div",{className:"flex items-center gap-3 my-3",children:[e.jsx(n,{className:"h-5 w-20 bg-zinc-900/80 rounded-md"}),e.jsx(n,{className:"h-5 w-16 bg-zinc-900/80 rounded-md"}),e.jsx(n,{className:"h-5 w-24 bg-zinc-900/80 rounded-md"})]}),e.jsxs("div",{className:"flex gap-1.5 mt-2",children:[e.jsx(n,{className:"h-5 w-14 bg-zinc-900/60 rounded"}),e.jsx(n,{className:"h-5 w-16 bg-zinc-900/60 rounded"}),e.jsx(n,{className:"h-5 w-12 bg-zinc-900/60 rounded"})]})]}),e.jsxs("div",{className:"flex items-center justify-between pt-3 border-t border-zinc-800/50 mt-auto",children:[e.jsx(n,{className:"h-3 w-20 bg-zinc-900/60"}),e.jsx(n,{className:"h-8 w-24 bg-zinc-900 border border-zinc-800 rounded-lg"})]})]},i))}),Qd=()=>e.jsx("div",{className:"space-y-3 animate-pulse",children:Array.from({length:4}).map((t,i)=>e.jsxs("div",{className:"p-4 rounded-xl border border-zinc-800/60 bg-zinc-950/70 backdrop-blur-md",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(n,{className:"w-9 h-9 rounded-lg bg-zinc-900 border border-zinc-800 shrink-0"}),e.jsxs("div",{className:"flex-1 space-y-2 py-0.5",children:[e.jsx(n,{className:"h-4 w-28 bg-zinc-800/80 rounded"}),e.jsx(n,{className:"h-3.5 w-20 bg-zinc-900/80 rounded"})]})]}),e.jsxs("div",{className:"flex items-center justify-between mt-3.5 pt-3 border-t border-zinc-800/50",children:[e.jsx(n,{className:"h-5 w-16 bg-zinc-900 rounded-full"}),e.jsx("div",{className:"flex gap-1.5",children:[1,2,3,4].map(s=>e.jsx(n,{className:"w-1.5 h-1.5 rounded-full bg-zinc-800/80"},s))})]})]},i))}),Yd=()=>e.jsxs("div",{className:"bg-zinc-950/70 backdrop-blur-md border border-zinc-800/60 rounded-2xl p-6 md:p-8 relative overflow-hidden animate-pulse",children:[e.jsx("div",{className:"absolute -top-24 -right-24 w-48 h-48 bg-violet-500/5 rounded-full blur-3xl pointer-events-none"}),e.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start gap-4 mb-8 pb-6 border-b border-zinc-800/50",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(n,{className:"w-14 h-14 roun
2ded-xl bg-zinc-900 border border-zinc-800 shrink-0"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{className:"h-5 w-36 bg-zinc-800/80 rounded"}),e.jsx(n,{className:"h-4 w-28 bg-zinc-900/80 rounded"}),e.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[e.jsx(n,{className:"h-3.5 w-16 bg-zinc-900/60 rounded"}),e.jsx(n,{className:"h-3.5 w-20 bg-zinc-900/60 rounded"})]})]})]}),e.jsx(n,{className:"h-8 w-24 bg-zinc-900 border border-zinc-800 rounded-lg shrink-0"})]}),e.jsx("div",{className:"relative pl-1 space-y-8",children:Array.from({length:6}).map((t,i)=>e.jsxs("div",{className:"relative flex gap-4 pb-8 last:pb-0",children:[i!==5&&e.jsx("div",{className:"absolute left-[15px] top-8 bottom-0 w-[2px] bg-zinc-800/60"}),e.jsx("div",{className:"w-8 h-8 rounded-full border border-zinc-800 bg-zinc-900 flex items-center justify-center shrink-0 z-10 relative",children:e.jsx(n,{className:"w-3 h-3 rounded-full bg-zinc-800"})}),e.jsxs("div",{className:"flex-1 space-y-2 py-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1",children:[e.jsx(n,{className:"h-4 w-36 bg-white/[0.05] rounded"}),e.jsx(n,{className:"h-4.5 w-16 bg-white/[0.03] rounded-full"})]}),e.jsx(n,{className:"h-3.5 w-5/6 bg-white/[0.03] rounded"})]})]},i))})]}),Jd=()=>e.jsxs("div",{className:"relative rounded-xl border border-border bg-card overflow-hidden min-h-[160px] flex flex-col md:flex-row items-stretch animate-pulse",children:[e.jsxs("div",{className:"flex-1 p-6 border-b md:border-b-0 md:border-r border-border/50 space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(n,{className:"h-5 w-20 bg-muted/60 rounded"}),e.jsx(n,{className:"h-4 w-28 bg-muted/40 rounded"})]}),e.jsx(n,{className:"h-7 w-48 bg-muted rounded"}),e.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[e.jsx(n,{className:"h-6 w-24 bg-muted/40 rounded"}),e.jsx(n,{className:"h-6 w-20 bg-muted/40 rounded"}),e.jsx(n,{className:"h-6 w-24 bg-muted/40 rounded"}),e.jsx(n,{className:"h-6 w-28 bg-muted/40 rounded"})]}),e.jsx(n,{className:"h-4 w-3/4 bg-muted/30 rounded"})]}),e.jsxs("div",{className:"w-full md:w-[320px] bg-secondary/30 p-6 flex flex-col justify-between gap-6 border-l border-border/50",children:[e.jsxs("div",{className:"flex gap-8 border-l border-border pl-6 h-12 items-center",children:[e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(n,{className:"h-6 w-8 bg-muted rounded"}),e.jsx(n,{className:"h-3 w-12 bg-muted/50 rounded"})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(n,{className:"h-6 w-8 bg-muted rounded"}),e.jsx(n,{className:"h-3 w-12 bg-muted/50 rounded"})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(n,{className:"h-11 flex-1 bg-muted/50 rounded-xl"}),e.jsx(n,{className:"h-11 w-11 bg-muted/30 rounded-xl shrink-0"})]})]})]}),Xd=()=>e.jsxs("div",{className:"max-w-[1600px] mx-auto pb-6 px-6 pt-0 animate-pulse",children:[e.jsxs("div",{className:"mb-4 pt-2 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(n,{className:"h-7 w-32 bg-secondary/50 rounded-lg"}),e.jsx("div",{className:"h-3 w-px bg-border/40"}),e.jsx(n,{className:"h-3 w-48 bg-secondary/20"})]}),e.jsx(n,{className:"h-8 w-24 bg-primary/5 border border-primary/10 rounded-xl"})]}),e.jsxs("div",{className:"space-y-8 mt-8",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsx(n,{className:"h-40 rounded-[2rem] bg-secondary/30"}),e.jsx(n,{className:"h-40 rounded-[2rem] bg-secondary/30"})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsx(n,{className:"h-32 rounded-3xl bg-secondary/20"}),e.jsx(n,{className:"h-32 rounded-3xl bg-secondary/20"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(n,{className:"h-6 w-48 bg-secondary/40"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:Array.from({length:8}).map((t,i)=>e.jsx(n,{className:"h-36 rounded-2xl bg-secondary/20"},i))})]}),e.jsxs("div",{className:"space-y-4 pt-4",children:[e.jsx(n,{className:"h-6 w-48 bg-secondary/40"}),e.jsx(n,{className:"h-[500px] rounded-[3rem] bg-secondary/10"})]})]})]}),Cn=()=>e.jsx("div",{className:"bg-muted/10 border border-border rounded p-4 h-[72px] flex items-center",children:e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(n,{className:"h-8 w-8 rounded-full bg-muted"}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(n,{className:"h-4 w-32 bg-muted"}),e.jsx(n,{className:"h-3 w-24 bg-muted/50"})]})]}),e.jsx(n,{className:"h-6 w-12 bg-muted/30"})]})}),Kd=()=>e.jsxs("div",{className:"min-h-screen bg-[#09090b] text-zinc-300 font-sans relative overflow-x-hidden",children:[e.jsx("div",{className:"fixed inset-0 bg-[#09090b] pointer-events-none"}),e.jsx("div",{className:"fixed top-0 left-1/2 -translate-x-1/2 w-[800px] h-[400px] rounded-full pointer-events-none opacity-80",style:{background:"radial-gradient(circle, rgba(139,92,246,0.12) 0%, transparent 70%)",filter:"blur(80px)"}}),e.jsx("div",{className:"fixed inset-0 opacity-[0.03] pointer-events-none",style:{backgroundImage:"linear-gradient(rgba(255,255,255,0.4) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.4) 1px, transparent 1px)",backgroundSize:"48px 48px"}}),e.jsxs("div",{className:"relative z-10 max-w-7xl mx-auto px-4 sm:px-6 py-8 pb-20 space-y-8",children:[e.jsxs("header",{className:"p-6 bg-zinc-950/80 border border-zinc-800 rounded-2xl backdrop-blur-xl shadow-2xl space-y-6 relative overflow-hidden",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(n,{className:"w-14 h-14 roun
2ded-2xl bg-zinc-900 border border-zinc-800 shrink-0"}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(n,{className:"h-7 w-44 bg-zinc-800/80 rounded-md"}),e.jsx(n,{className:"h-4 w-24 bg-zinc-900 rounded"})]}),e.jsx(n,{className:"h-3.5 w-60 bg-zinc-900/80 rounded"})]})]}),e.jsx(n,{className:"h-9 w-32 rounded-xl bg-zinc-900 border border-zinc-800 shrink-0 self-start sm:self-center"})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3 bg-zinc-900/60 border border-zinc-800/80 rounded-xl p-4 sm:p-5 backdrop-blur-md",children:[e.jsxs("div",{className:"space-y-2 pr-0 sm:pr-4 sm:border-r border-zinc-800/80",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx(n,{className:"h-3.5 w-32 bg-zinc-800/60 rounded"}),e.jsx(n,{className:"h-4 w-10 bg-zinc-900 rounded"})]}),e.jsx(n,{className:"h-8 w-24 bg-zinc-800/80 rounded-md"}),e.jsxs("div",{className:"flex gap-2 pt-1",children:[e.jsx(n,{className:"h-4 w-14 bg-zinc-900/80 rounded"}),e.jsx(n,{className:"h-4 w-14 bg-zinc-900/80 rounded"}),e.jsx(n,{className:"h-4 w-14 bg-zinc-900/80 rounded"})]})]}),e.jsxs("div",{className:"space-y-2 px-0 sm:px-4 sm:border-r border-zinc-800/80 pt-3 sm:pt-0 border-t sm:border-t-0 border-zinc-800/80",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx(n,{className:"h-3.5 w-36 bg-zinc-800/60 rounded"}),e.jsx(n,{className:"h-4 w-14 bg-zinc-900 rounded"})]}),e.jsx(n,{className:"h-8 w-20 bg-zinc-800/80 rounded-md"}),e.jsx(n,{className:"h-3.5 w-48 bg-zinc-900/80 pt-1"})]}),e.jsxs("div",{className:"space-y-2 pl-0 sm:pl-4 pt-3 sm:pt-0 border-t sm:border-t-0 border-zinc-800/80",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx(n,{className:"h-3.5 w-36 bg-zinc-800/60 rounded"}),e.jsx(n,{className:"h-4 w-20 bg-zinc-900 rounded"})]}),e.jsx(n,{className:"h-8 w-20 bg-zinc-800/80 rounded-md"}),e.jsx(n,{className:"h-1.5 w-full bg-zinc-800 rounded-full pt-1"})]})]})]}),e.jsxs("section",{className:"p-6 sm:p-7 bg-gradient-to-r from-violet-950/30 via-zinc-950/90 to-zinc-950/90 border border-violet-500/30 rounded-2xl backdrop-blur-md flex flex-col md:flex-row items-start md:items-center justify-between gap-6 shadow-2xl",children:[e.jsxs("div",{className:"space-y-2.5 flex-1 w-full",children:[e.jsx(n,{className:"h-4 w-48 bg-zinc-800/80 rounded"}),e.jsx(n,{className:"h-7 w-64 bg-zinc-800 rounded-md"}),e.jsx(n,{className:"h-4 w-full max-w-xl bg-zinc-900/80 rounded"})]}),e.jsx(n,{className:"h-11 w-40 bg-violet-600/30 border border-violet-500/40 rounded-xl shrink-0 w-full md:w-auto"})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8",children:[e.jsxs("div",{className:"lg:col-span-8 space-y-8",children:[e.jsxs("section",{className:"p-6 bg-zinc-950/80 backdrop-blur-md border border-zinc-800 rounded-2xl space-y-4 shadow-xl",children:[e.jsxs("div",{className:"flex items-center justify-between pb-4 border-b border-zinc-800/80",children:[e.jsx(n,{className:"h-5 w-44 bg-zinc-800/80 rounded-md"}),e.jsx(n,{className:"h-3.5 w-32 bg-zinc-900/80"})]}),e.jsx("div",{className:"h-28 bg-zinc-900/50 border border-zinc-800/80 rounded-xl flex items-center justify-around px-4",children:Array.from({length:14}).map((t,i)=>e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(n,{className:"h-3 w-6 bg-zinc-900/80 mb-1"}),Array.from({length:7}).map((s,l)=>e.jsx(n,{className:"w-2.5 h-2.5 bg-zinc-800/80 rounded-[2px]"},l))]},i))})]}),e.jsxs("section",{className:"p-6 bg-zinc-950/80 backdrop-blur-md border border-zinc-800 rounded-2xl space-y-6 shadow-2xl",children:[e.jsxs("div",{className:"flex items-center justify-between pb-4 border-b border-zinc-800/80",children:[e.jsx(n,{className:"h-5 w-52 bg-zinc-800/80 rounded-md"}),e.jsx(n,{className:"h-6 w-32 bg-zinc-900 border border-zinc-800 rounded-full"})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-12 gap-6 items-center",children:[e.jsxs("div",{className:"md:col-span-4 flex flex-col items-center justify-center p-5 border border-zinc-800 bg-zinc-900/80 rounded-2xl shadow-inner",children:[e.jsx(n,{className:"h-3.5 w-36 bg-zinc-800/80 mb-3"}),e.jsx(n,{className:"w-28 h-28 rounded-full border-4 border-zinc-800 bg-zinc-950"})]}),e.jsx("div",{className:"md:col-span-8 space-y-4",children:Array.from({length:3}).map((t,i)=>e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx(n,{className:"h-4 w-32 bg-zinc-800/80"}),e.jsx(n,{className:"h-4 w-12 bg-zinc-800/80"})]}),e.jsx(n,{className:"h-2.5 w-full bg-zinc-900 border border-zinc-800 rounded-full"})]},i))})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"p-4 rounded-xl border border-zinc-800/80 bg-zinc-900/60 space-y-2",children:[e.jsx(n,{className:"h-4 w-36 bg-zinc-800/80"}),e.jsx(n,{className:"h-3.5 w-full bg-zinc-900/80"}),e.jsx(n,{className:"h-3.5 w-3/4 bg-zinc-900/80"})]}),e.jsxs("div",{className:"p-4 rounded-xl border border-zinc-800/80 bg-zinc-900/60 space-y-2",children:[e.jsx(n,{className:"h-4 w-36 bg-zinc-800/80"}),e.jsx(n,{className:"h-3.5 w-full bg-zinc-900/80"}),e.jsx(n,{className:"h-3.5 w-3/4 bg-zinc-900/80"})]})]})]}),e.jsxs("section",{className:"p-6 bg-zinc-950/80 backdrop-blur-md border border-zinc-800 rounded-2xl space-y-4 shadow-xl",children:[e.jsxs("div",{className:"flex items-center justify-between pb-4 border-b border-zinc-800/80",children:[e.jsx(n,{className:"h-5 w-48 bg-zinc-800/80 rounded-md"}),e.jsx(n,{className:"h-6 w-28 bg-zinc-900 border border-zinc-800 rounded-full"})]}),e.jsx("div",{className:"flex gap-2",children:Array.from({length:3}).map((t,i)=>e.jsx(n,{className:"h-9 w-32 bg-zinc-900 border border-zinc-800 rounded-xl shrink-0"},i))}),e.jsx("div",{className:"space-y-2.5",children:Array.from({length:3}).map((t,i)=>e.jsxs("div",{className:"p-4 rounded-xl border border-zinc-800/80 bg-zinc-900/40 flex justify-between items-center",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 pr-4",children:[e.jsx(n,{className:"w-5 h-5 rounded-full bg-zinc-800/80 shrink-0"}),e.jsxs("div",{className:"space-y-1.5 flex-1",children:[e.jsx(n,{className:"h-4 w-44 bg-zinc-800/80"}),e.jsx(n,{className:"h-3.5 w-3/4 bg-zinc-900/80"})]})]}),e.jsx(n,{className:"h-6 w-20 bg-zinc-900 rounded"})]},i))})]})]}),e.jsxs("div",{className:"lg:col-span-4 space-y-8",children:[e.jsxs("section",{className:"p-6 bg-zinc-950/80 backdrop-blur-md border border-zinc-800 rounded-2xl space-y-4 shadow-xl",children:[e.jsx(n,{className:"h-5 w-40 bg-zinc-800/80 rounded-md"}),e.jsxs("div",{className:"flex gap-2 border-b border-zinc-800/80 pb-3",children:[e.jsx(n,{className:"h-6 w-16 bg-zinc-900 rounded"}),e.jsx(n,{className:"h-6 w-16 bg-zinc-900 rounded"}),e.jsx(n,{className:"h-6 w-16 bg-zinc-900 rounded"})]}),e.jsx("div",{className:"space-y-3",children:Array.from({length:3}).map((t,i)=>e.jsxs("div",{className:"p-3.5 rounded-xl border border-zinc-800/80 bg-zinc-900/40 flex items-center gap-3",children:[e.jsx(n,{className:"w-8 h-8 rounded-lg bg-zinc-800/80 shrink-0"}),e.jsxs("div",{className:"space-y-1.5 flex-1",children:[e.jsx(n,{className:"h-3 w-12 bg-zinc-900/80"}),e.jsx(n,{className:"h-3.5 w-36 bg-zinc-800/80"})]})]},i))})]}),e.jsxs("section",{className:"p-6 bg-zinc-950/80 backdrop-blur-md border border-zinc-800 rounded-2xl space-y-4 shadow-xl",children:[e.jsx(n,{className:"h-5 w-40 bg-zinc-800/80 rounded-md"}),e.jsx("div",{className:"space-y-2.5",children:Array.from({length:4}).map((t,i)=>e.jsxs("div",{className:"p-3.5 rounded-xl border border-zinc-800/80 bg-zinc-900/40 space-y-2",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx(n,{className:"h-4 w-32 bg-zinc-800/80"}),e.jsx(n,{className:"h-4 w-14 bg-zinc-900 rounded"})]}),e.jsx(n,{className:"h-3 w-20 bg-zinc-900/80"})]},i))})]}),e.jsxs("section",{className:"p-6 bg-zinc-950/80 backdrop-blur-md border border-zinc-800 rounded-2xl space-y-4 shadow-xl",children:[e.jsx(n,{className:"h-5 w-36 bg-zinc-800/80 rounded-md"}),e.jsx("div",{className:"space-y-2.5",children:Array.from({length:2}).map((t,i)=>e.jsxs("div",{className:"p-3.5 rounded-xl border border-zinc-800/80 bg-zinc-900/40 space-y-2",children:[e.jsx(n,{className:"h-4 w-28 bg-zinc-800/80"}),e.jsx(n,{className:"h-3.5 w-36 bg-zinc-900/80"})]},i))})]})]})]})]})]}
2),he="https://api.pynyx.com",_n="860645443043-f3mqqhfgc0tlagemoh2qd217vm99pu2g.apps.googleusercontent.com",Zd=t=>{let i=he;i.endsWith("/")&&(i=i.slice(0,-1));const s=t.startsWith("/")?t:`/${t}`;if(i.startsWith("https://"))return i.replace("https://","wss://")+s;if(i.startsWith("http://"))return i.replace("http://","ws://")+s;const l=window.location.protocol==="https:"?"wss:":"ws:";return i.includes("://")?`${i}${s}`:`${l}//${i}${s}`};function Fe(t){if(typeof window<"u"&&!window.navigator.onLine)return!0;if(!t)return!1;if(t.isNetworkError||t.code==="ERR_NETWORK"||t.code==="ECONNABORTED"||t.code==="ERR_INTERNET_DISCONNECTED"||t.config&&!t.response)return!0;const i=String(t.message||t.description||t||"").toLowerCase();return i.includes("network error")||i.includes("failed to fetch")||i.includes("err_network")||i.includes("net::err_")||i.includes("networkerror")||i.includes("load failed")||i.includes("internet disconnected")||i.includes("connection refused")}function at(t,i="An unexpected error occurred"){var s,l,h,u,o,m,b;return Fe(t)?"Please check your internet connection and try again.":typeof t=="string"?t:(h=(l=(s=t==null?void 0:t.response)==null?void 0:s.data)==null?void 0:l.error)!=null&&h.message?t.response.data.error.message:(o=(u=t==null?void 0:t.response)==null?void 0:u.data)!=null&&o.detail?t.response.data.detail:(b=(m=t==null?void 0:t.response)==null?void 0:m.data)!=null&&b.message?t.response.data.message:t!=null&&t.message?t.message:i}function em(t,i="Operation failed",s){const l=Fe(t),h=l?"Network issue error":i,u=at(t);return ce.error(h,{description:u}),{title:h,description:u,isNetError:l}}const ye=tr.create({baseURL:he,headers:{"Content-Type":"application/json"}});ye.interceptors.request.use(t=>{const i=localStorage.getItem("token");return i&&(t.headers.Authorization=`Bearer ${i}`),t},t=>Promise.reject(t));ye.interceptors.response.use(t=>t,t=>{if(Fe(t)&&(t.isNetworkError=!0,t.message="Network issue error. Please check your internet connection."),t.response&&t.response.status===401&&(localStorage.removeItem("token"),sessionStorage.clear(),!window.location.pathname.startsWith("/auth")&&!window.location.pathname.startsWith("/login")&&!window.location.pathname.startsWith("/signup"))){const i=Oe();i==="admin"||i==="institution"||i==="recruiter"?window.location.href="/login":window.location.href="/auth"}return Promise.reject(t)});const gi=a.createContext({token:null,user:null,login:()=>{},logout:()=>{},refreshProfile:async()=>{},isAuthenticated:!1,isLoading:!0}),ot=()=>a.useContext(gi),An=({children:t})=>{const[i,s]=a.useState(null),[l,h]=a.useState(null),[u,o]=a.useState(!0);a.useEffect(()=>{const d=localStorage.getItem("token");d?s(d):o(!1)},[]),a.useEffect(()=>{(async()=>{if(!i){h(null);return}try{let g="/student/user/profile";try{const N=i.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),T=JSON.parse(window.atob(N));if(T.role==="ADMIN"){h({role:"ADMIN",username:T.sub}),o(!1);return}else T.role==="COLLEGE"?g="/college/profile":T.role==="RECRUITER"&&(g="/recruiter/user/profile")}catch(p){console.error("Token decode failure",p)}const f=await ye.get(g);h(f.data)}catch(g){console.error("Failed to fetch profile",g)}finally{o(!1)}})()},[i]);const m=async()=>{if(i)try{let d="/student/user/profile";try{const p=i.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),N=JSON.parse(window.atob(p));N.role==="COLLEGE"?d="/college/profile":N.role==="RECRUITER"&&(d="/recruiter/user/profile")}catch{}const g=await ye.get(d);h(g.data)}catch(d){console.error("Failed to refresh profile",d)}},b=d=>{localStorage.setItem("token",d),s(d)},w=()=>{localStorage.removeItem("token"),sessionStorage.clear(),s(null),h(null)};return e.jsx(gi.Provider,{value:{token:i,user:l,login:b,logout:w,refreshProfile:m,isAuthenticated:!!i,isLoading:u},children:t})},Dt={async getNotifications(t){try{const i=await fetch(`${he}/student/notifications`,{headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}});if(!i.ok)throw new Error(`Failed to fetch notifications: ${i.status}`);return await i.json()}catch(i){return console.warn("Using local notification fallback:",i),[]}},async markAsRead(t,i){try{return(await fetch(`${he}/student/notifications/${i}/read`,{method:"POST",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}})).ok}catch(s){return console.error("Failed to mark notification read:",s),!1}},async markAllAsRead(t){try{return(await fetch(`${he}/student/notifications/read-all`,{method:"POST",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}})).ok}catch(i){return console.error("Failed to mark all notifications read:",i),!1}}},fi=a.createContext(void 0),$n=({children:t})=>{const{token:i,isAuthenticated:s,user:l}=ot(),[h,u]=a.useState([]),[o,m]=a.useState(!1),b=a.useCallback(async()=>
2{if(!i||!s||(l==null?void 0:l.role)!=="STUDENT"){u([]);return}m(!0);try{const f=await Dt.getNotifications(i);u(f)}catch(f){console.error("Error in NotificationProvider:",f)}finally{m(!1)}},[i,s,l==null?void 0:l.role]);a.useEffect(()=>{b();const f=setInterval(()=>{i&&s&&(l==null?void 0:l.role)==="STUDENT"&&Dt.getNotifications(i).then(p=>{p&&p.length>0&&u(p)})},6e4);return()=>clearInterval(f)},[b,i,s,l==null?void 0:l.role]);const w=async f=>{u(p=>p.map(N=>N.id===f?{...N,is_read:!0}:N)),i&&await Dt.markAsRead(i,f)},d=async()=>{u(f=>f.map(p=>({...p,is_read:!0}))),i&&await Dt.markAllAsRead(i)},g=h.filter(f=>!f.is_read).length;return e.jsx(fi.Provider,{value:{notifications:h,unreadCount:g,loading:o,fetchNotifications:b,markAsRead:w,markAllAsRead:d},children:t})},tm=()=>{const t=a.useContext(fi);if(!t)throw new Error("useNotifications must be used within a NotificationProvider");return t},Ot=({allowedRoles:t})=>{const{isAuthenticated:i,isLoading:s,user:l}=ot();rt();const h=Oe();return s?null:i?t&&l&&!t.includes(l.role||"")?l.role==="ADMIN"?(window.location.href="/admin/dashboard",null):l.role==="RECRUITER"?(window.location.href=Q("recruiter","/dashboard"),null):l.role==="COLLEGE"?(window.location.href=Q("institution",`/${l.slug}/dashboard`),null):(window.location.href=Q("student","/dashboard"),null):e.jsx(_a,{}):h==="admin"||h==="institution"||h==="recruiter"?e.jsx(ut,{to:"/login",replace:!0}):e.jsx(ut,{to:"/auth",replace:!0})},In=()=>{const{user:t,isLoading:i,isAuthenticated:s}=ot();return i?null:s?e.jsx(_a,{}):e.jsx(ut,{to:"/auth",replace:!0})},is=({children:t,className:i,intensity:s=12,glare:l=!0})=>{const h=a.useRef(null),[u,o]=a.useState(0),[m,b]=a.useState(0),[w,d]=a.useState({x:50,y:50,opacity:0}),[g,f]=a.useState(!1),p=r=>{if(!h.current)return;const c=h.current.getBoundingClientRect(),j=c.width,k=c.height,I=(r.clientX-c.left)/j-.5,_=(r.clientY-c.top)/k-.5,q=I*s,F=-_*s;o(F),b(q),l&&d({x:(r.clientX-c.left)/j*100,y:(r.clientY-c.top)/k*100,opacity:.15})},N=()=>{f(!0)},T=()=>{f(!1),o(0),b(0),d(r=>({...r,opacity:0}))};return e.jsx("div",{style:{perspective:"1000px"},className:v("w-full",i),children:e.jsxs("div",{ref:h,onMouseEnter:N,onMouseMove:p,onMouseLeave:T,className:"relative w-full transition-transform ease-out duration-200 transform-gpu",style:{transformStyle:"preserve-3d",transform:g?`rotateX(${u}deg) rotateY(${m}deg) scale3d(1.02, 1.02, 1.02)`:"rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)",transitionProperty:"transform, box-shadow",transitionDuration:g?"100ms":"500ms"},children:[t,l&&e.jsx("div",{className:"pointer-events-none absolute inset-0 rounded-[inherit] transition-opacity duration-300 z-30",style:{background:`radial-gradient(circle at ${w.x}% ${w.y}%, rgba(255, 255, 255, 0.25) 0%, transparent 60%)`,opacity:w.opacity}})]})})},Qs=()=>e.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none z-0",children:[e.jsx("div",{className:"absolute inset-0 opacity-[0.15] sm:opacity-[0.8] mix-blend-multiply dark:mix-blend-screen",style:{backgroundImage:`
3            linear-gradient(to right, rgba(139, 92, 246, 0.12) 1px, transparent 1px),
4            linear-gradient(to bottom, rgba(139, 92, 246, 0.12) 1px, transparent 1px)
5          `,backgroundSize:"48px 48px"}}),e.jsx("div",{className:"absolute inset-0 opacity-[0.1] sm:opacity-[0.6]",style:{backgroundImage:"radial-gradient(rgba(139, 92, 246, 0.2) 1.5px, transparent 1.5px)",backgroundSize:"24px 24px",backgroundPosition:"12px 12px"}}),e.jsx(A.div,{className:"absolute top-[8%] left-[12%] w-[450px] h-[450px] bg-violet-400/[0.08] rounded-full blur-[100px]",animate:{x:[0,25,-20,0],y:[0,-35,25,0],scale:[1,1.08,.93,1]},transition:{duration:18,repeat:1/0,ease:"easeInOut"}}),e.jsx(A.div,{className:"absolute top-[35%] right-[8%] w-[550px] h-[550px] bg-indigo-400/[0.07] rounded-full blur-[120px]",animate:{x:[0,-35,30,0],y:[0,45,-25,0],scale:[1,.95,1.08,1]},transition:{duration:22,repeat:1/0,ease:"easeInOut"}}),e.jsx(A.div,{className:"absolute bottom-[15%] left-[18%] w-[500px] h-[500px] bg-cyan-400/[0.06] rounded-full blur-[110px]",animate:{x:[0,35,-15,0],y:[0,-25,35,0]},transition:{duration:20,repeat:1/0,ease:"easeInOut"}}),e.jsx("div",{className:"absolute inset-y-0 left-[10%] w-px bg-gradient-to-b from-transparent via-violet-500/20 to-transparent hidden sm:block"}),e.jsx("div",{className:"absolute inset-y-0 right-[15%] w-px bg-gradient-to-b from-transparent via-indigo-500/20 to-transparent hidden sm:block"}),e.jsx(A.div,{className:"absolute left-[10%] w-px h-[200px] bg-gradient-to-b from-transparent via-violet-400/50 to-transparent hidden sm:block",animate:{y:["-200px","100vh"]},transition:{duration:9,repeat:1/0,ease:"linear"}}),e.jsx(A.div,{className:"absolute right-[15%] w-px h-[250px] bg-gradient-to-b from-transparent via-indigo-400/40 to-transparent hidden sm:block",animate:{y:["100vh","-250px"]},transition:{duration:11,repeat:1/0,ease:"linear"}})]}),Pn=()=>e.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none z-0",children:[e.jsx("div",{className:"absolute bottom-[-15%
5] left-[-40%] right-[-40%] h-[750px] opacity-[0.25]",style:{perspective:"900px",transformOrigin:"center bottom"},children:e.jsx("div",{className:"w-full h-full",style:{transform:"rotateX(72deg) translateZ(-40px)",backgroundImage:`
6              linear-gradient(to right, rgba(139, 92, 246, 0.25) 1px, transparent 1px),
7              linear-gradient(to bottom, rgba(139, 92, 246, 0.25) 1px, transparent 1px)
8            `,backgroundSize:"50px 50px",maskImage:"linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 85%)",WebkitMaskImage:"linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 85%)"}})}),e.jsx(A.div,{className:"absolute top-[20%] right-[10%] w-[320px] h-[320px] rounded-full border border-violet-500/20 opacity-30",style:{perspective:"1000px",transformStyle:"preserve-3d"},animate:{rotateX:[15,35,15],rotateY:[-20,20,-20],y:[0,-20,0]},transition:{duration:12,repeat:1/0,ease:"easeInOut"}})]}),En=({words:t,typeSpeed:i=70,deleteSpeed:s=35,delayBetweenWords:l=2200,className:h,cursorColor:u="bg-violet-400",mode:o="typewriter"})=>{const[m,b]=a.useState(""),[w,d]=a.useState(0),g=t.join("||"),f=a.useRef(t);a.useEffect(()=>{f.current=t},[g]);const p=a.useRef({wordIdx:0,charIdx:0,isDeleting:!1,pauseUntil:0,lastTime:0});if(a.useEffect(()=>{if(o!=="typewriter")return;let N;const T=r=>{const c=p.current,j=f.current;if(!j||j.length===0)return;const k=j[c.wordIdx%j.length]||"";if(r<c.pauseUntil){N=requestAnimationFrame(T);return}const I=c.isDeleting?s:i;r-c.lastTime>=I&&(c.lastTime=r,c.isDeleting?c.charIdx>0?(c.charIdx--,b(k.slice(0,c.charIdx))):(c.isDeleting=!1,c.wordIdx=(c.wordIdx+1)%j.length,c.pauseUntil=r+280):c.charIdx<k.length?(c.charIdx++,b(k.slice(0,c.charIdx))):(c.isDeleting=!0,c.pauseUntil=r+l)),N=requestAnimationFrame(T)};return N=requestAnimationFrame(T),()=>cancelAnimationFrame(N)},[o,g,i,s,l]),a.useEffect(()=>{if(o!=="swap")return;const N=setInterval(()=>{d(T=>(T+1)%(f.current.length||1))},l);return()=>clearInterval(N)},[o,l,g]),o==="swap"){const N=t[w%t.length]||"";return e.jsx(A.span,{layout:!0,transition:{type:"spring",stiffness:350,damping:30},className:"inline-flex items-center align-baseline relative overflow-hidden py-1 px-0.5",children:e.jsx(nt,{mode:"wait",initial:!1,children:e.jsx(A.span,{initial:{opacity:0,y:22,filter:"blur(6px)",scale:.95},animate:{opacity:1,y:0,filter:"blur(0px)",scale:1},exit:{opacity:0,y:-22,filter:"blur(6px)",scale:.95},transition:{duration:.45,ease:[.16,1,.3,1]},className:v("inline-block font-extrabold whitespace-nowrap",h),children:N},w)})})}return e.jsxs("span",{className:"inline-flex items-center align-baseline",children:[e.jsx("span",{className:v("inline-block font-extrabold whitespace-nowrap",h),children:m||" "}),e.jsx(A.span,{animate:{opacity:[1,.15,1]},transition:{duration:.7,repeat:1/0,ease:"easeInOut"},className:v("inline-block w-[0.2em] h-[0.8em] align-middle ml-1 rounded-xs shrink-0 shadow-[0_0_10px_rgba(167,139,250,0.7)]",u)})]})},Ys=[{role:"user",text:"Why does my code skip node 2 on test case 2?"},{role:"vasist",text:"Look at line 7 (`curr.next = curr.next.next`). If `curr` is node 1, what node does `curr.next` point to after that line?"},{role:"user",text:"It points directly to node 3!"},{role:"vasist",text:"Right! So how do you point node 2 backward to node 1 without losing your reference to node 3?"},{role:"user",text:"I need to save `curr.next` in `nxt` first!"},{role:"vasist",text:"Bingo! Save `nxt = curr.next`, then set `curr.next = prev`."}],Dn=["projects.","problem solving.","verified proof."],On=()=>{const[t,i]=a.useState([]),[s,l]=a.useState(null),[h,u]=a.useState(""),[o,m]=a.useState("code"),b=a.useRef(null);a.useEffect(()=>{let d=!0,g;const f=(p,N)=>{if(!d)return;if(p>=Ys.length){g=setTimeout(()=>{d&&(i([]),l(null),u(""),f(0,0))},3e3);return}const T=Ys[p];N===0&&(l(T),u("")),N<T.text.length?(u(T.text.slice(0,N+1)),g=setTimeout(()=>f(p,N+1),22)):g=setTimeout(()=>{d&&(i(r=>[...r,T]),l(null),u(""),g=setTimeout(()=>f(p+1,0),T.role==="vasist"?1e3:600))},700)};return g=setTimeout(()=>f(0,0),500),()=>{d=!1,clearTimeout(g)}},[]),a.useEffect(()=>{b.current&&(b.current.scrollTop=b.current.scrollHeight)},[t,h]);const w=d=>e.jsx($a,{remarkPlugins:[Ia],components:{p({children:g}){return e.jsx("p",{className:"m-0 inline leading-relaxed",children:g})},code({inline:g,className:f,children:p,...N}){return e.jsx("code",{className:"bg-[#bd93f9]/10 px-1.5 py-0.5 rounded-md font-mono text-[11px] text-[#d2a8ff] border border-[#bd93f9]/20",...N,children:p})}},children:d});return e.jsxs("section",{className:"relative min-h-[90vh] pt-28 pb-16 sm:pt-36 sm:pb-24 flex flex-col items-center justify-center overflow-hidden px-4 sm:px-6",style:{background:"radial-gradient(ellipse at 50% 0%, #12131c 0%, #09090b 70%)"},children:[e.jsx("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none",style:{backgroundImage:"linear-gradient(rgba(255,255,255,0.4) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.4) 1px, transparent 1px)",backgroundSize:"48px 48px"}}),e.jsx(Pn,{}),e.jsx("div",{className:"absolute top-10 left-1/2 -translate-x-1/2 w-[600px] h-[350px] rounded-full pointer-events-none",style:{background:"radial-gradient(circle, rgba(139,92,246,0.12) 0%, transparent 70%)",filter:"blur(70px)"}}),e.jsxs("div",{className:"relative z-10 max-w-6xl mx-auto w-full",children:[e.jsx(A.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,amount:.15},transition:{duration:.5,ease:[.16,1,.3,1]},className:"flex justify-center mb-5 sm:mb-6",children:e.jsxs("div",{className:"inline-flex items-center gap-1.5 sm:gap-2 px-2.5 sm:px-3 py-1 rounded-full border border-zinc-800 bg-zinc-900/80 text-zinc-300 text-[11px] sm:text-xs font-mono max-w-full",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-violet-400 animate-pulse shrink-0"}),e.jsx("span",{className:"truncate",children:"PyNyx 2.0 — Socratic DSA Tutor & Code Intelligence"})]})}),e.jsxs(A.div,{initial:{opacity:0,y:25},whileInView:{opacity:1,y:0},viewport:{once:!0,amount:.15},transition:{duration:.6,delay:.1,ease:[.16,1,.3,1]},className:"text-center max-w-5xl mx-auto mb-6 sm:mb-8",children:[e.jsxs("h1",{className:"font-outfit text-3xl sm:text-6xl md:text-7xl font-extrabold tracking-tight text-white leading-[1.2] sm:leading-[1.15] mb-4 sm:mb-6",children:[e.jsx("span",{children:"Build "}),e.jsx(En,{words:Dn,typeSpeed:70,deleteSpeed:35,delayBetweenWords:2200,mode:"typewriter",className:"text-violet-400 font-extrabold"}),e.jsx("br",{}),e.jsx("span",{children:"Let recruiters "}),e.jsx("span",{className:"text-zinc-400 font-extrabold",children:"find you."})]}),e.jsx("p",{className:"text-sm sm:text-lg md:text-xl text-zinc-400 max-w-2xl mx-auto leading-relaxed font-normal px-2",children:"Master DSA & production engineering, showcase verified GitHub code proof, and let top tech recruiters discover your talents automatically."})]}),e.jsx(A.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,amount:.15},transition:{duration:.5,delay:.2,ease:[.16,1,.3,1]},className:"flex flex-col sm:flex-row items-center justify-center gap-3 sm:gap-4 mb-10 sm:mb-14",children:e.jsxs(fe,{to:"/signup",className:"w-full sm:w-auto inline-flex items-center justify-center gap-2.5 px-6 py-3.5 rounded-xl font-semibold text-sm text-white bg-violet-600 hover:bg-violet-500 transition-all shadow-md active:scale-[0.98]",children:["Start Practicing Free",e.jsx(Ae,{className:"w-4 h-4"})]})}),e.jsx(A.div,{initial:{opacity:0,y:35,scale:.97},whileInView:{opacity:1,y:0,scale:1},viewport:{once:!0,amount:.15},transition:{duration:.7,delay:.25,ease:[.16,1,.3,1]},children:e.jsx(is,{intensity:6,className:"max-w-4xl mx-auto",children:e.jsxs("div",{className:"rounded-2xl border border-zinc-800 bg-zinc-950/90 shadow-2xl shadow-black/80 overflow-hidden",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between px-3 sm:px-4 py-2.5 sm:py-3 border-b border-zinc-800/80 bg-zinc-900/60 gap-2",children:[e.jsxs("div",{className:"flex items-center justify-between sm:justify-start gap-2 sm:gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex gap-1.5",children:[e.jsx("div",{className:"w-2.5 h-2.5 sm:w-3 sm:h-3 rounded-full bg-zinc-800"}),e.jsx("div",{className:"w-2.5 h-2.5 sm:w-3 sm:h-3 rounded-full bg-zinc-800"}),e.jsx("div",{className:"w-2.5 h-2.5 sm:w-3 sm:h-3 rounded-full bg-zinc-800"})]}),e.jsx("div",{className:"h-4 w-px bg-zinc-800"}),e.jsxs("span",{className:"text-[11px] sm:text-xs font-mono text-zinc-400 flex items-center gap-1.5 truncate",children:[e.jsx(He,{className:"w-3.5 h-3.5 text-violet-400 shrink-0"}),"reverse_linked_list.py"]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2 text-[10px] sm:text-xs font-mono",children:[e.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 text-emerald-400 border border-emerald-500/20",children:"Medium"}),e.jsx("span",{className:"text-zinc-500 hidden sm:inline",children:"Python 3"})]})]}),e.jsxs("div",{className:"flex md:hidden items-center gap-1 p-1 bg-zinc-950 rounded-lg border border-zinc-800 text-[11px] font-mono w-full",children:[e.jsxs("button",{onClick:()=>m("code"),className:v("flex-1 py-1.5 rounded-md font-semibold text-center transition-all flex items-center justify-center gap-1",o==="code"?"bg-violet-600 text-white shadow-sm":"text-zinc-400"),children:[e.jsx(Aa,{className:"w-3.5 h-3.5"})," Code & Bug"]}),e.jsxs("button",{onClick:()=>m("chat"),className:v("flex-1 py-1.5 rounded-md font-semibold text-center transition-all flex items-center justify-center gap-1",o==="chat"?"bg-violet-600 text-white shadow-sm":"text-zinc-400"),children:[e.jsx(ve,{className:"w-3.5 h-3.5"})," Vasist AI"]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-12 divide-y md:divide-y-0 md:divide-x divide-zinc-800/80 min-h-[320px]",children:[e.jsxs("div",{className:v("md:col-span-6 p-3 sm:p-4 font-mono text-xs text-zinc-300 leading-relaxed overflow-x-auto bg-zinc-950",o==="code"?"block":"hidden md:block"),children:[e.jsx("div",{className:"text-zinc-500 select-none mb-1 text-[11px]",children:"# Problem 206: Reverse Linked List"}),e.jsxs("div",{children:[e.jsx("span",{className:"text-violet-400",children:"class"})," ",e.jsx("span",{className:"text-amber-300",children:"Solution"}),":"]}),e.jsxs("div",{className:"pl-4",children:[e.jsx("span",{className:"text-violet-400",children:"def"})," ",e.jsx("span",{className:"text-blue-400",children:"reverseList"}),"(self, head):"]}),e.jsx("div",{className:"pl-8 text-zinc-500",children:"curr = head"}),e.jsxs("div",{className:"pl-8 text-violet-400",children:["while ",e.jsx("span",{className:"text-zinc-300",children:"curr and curr.next:"})]}),e.jsxs("div",{className:"pl-12 text-rose-400 bg-rose-500/10 border-l-2 border-rose-500 px-1 -mx-1 my-0.5",children:["curr.next = curr.next.next ",e.jsx("span",{className:"text-zinc-500",children:"# Bug on line 7"})]}),e.jsxs("div",{className:"pl-8 text-violet-400",children:["return ",e.jsx("span",{className:"text-zinc-300",children:"head"})]}),e.jsxs("div",{className:"mt-3 sm:mt-4 pt-2.5 sm:pt-3 border-t border-zinc-800/80 text-[10px] sm:text-[11px] font-mono text-zinc-500 flex flex-wrap items-center justify-between gap-1",children:[e.jsxs("span",{children:["Status: ",e.jsx("span",{className:"text-amber-400",children:"Logic Issue Detected"})]}),e.jsx("span",{children:"Test Cases: 1/5 Passed"})]})]}),e.jsxs("div",{className:v("md:col-span-6 p-3 bg-zinc-900/40 flex flex-col justify-between",o==="chat"?"flex":"hidden md:flex"),children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between px-2 pb-2 mb-2 border-b border-zinc-800/80",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-5 h-5 rounded bg-vi
8olet-500/20 flex items-center justify-center text-violet-400",children:e.jsx(ve,{className:"w-3.5 h-3.5"})}),e.jsx("span",{className:"text-xs font-semibold text-zinc-200 font-mono",children:"Vasist_System"})]}),e.jsxs("span",{className:"text-[10px] font-mono text-emerald-400 flex items-center gap-1",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse"}),"Live Session"]})]}),e.jsxs("div",{ref:b,className:"h-[190px] sm:h-[220px] overflow-y-auto px-1 space-y-2.5 text-xs font-mono",children:[t.map((d,g)=>e.jsx("div",{className:v("flex w-full",d.role==="user"?"justify-end":"justify-start"),children:e.jsxs("div",{className:v("flex flex-col max-w-[92%]",d.role==="user"?"items-end":"items-start"),children:[d.role==="vasist"&&e.jsxs("span",{className:"text-[9px] items-center flex gap-1 font-bold text-[#bd93f9] mb-1 uppercase tracking-widest",children:[e.jsx(ve,{className:"h-2.5 w-2.5"})," Vasist_System"]}),e.jsx("div",{className:v("px-3 py-2 rounded-xl text-xs font-mono backdrop-blur-md leading-relaxed",d.role==="user"?"bg-[#062012]/60 border border-[#16a34a]/40 text-[#4ade80] rounded-tr-sm":"bg-[#0d1117]/90 border border-[#bd93f9]/20 text-[#e6edf3] rounded-tl-sm shadow-md"),children:w(d.text)})]})},g)),s&&e.jsx("div",{className:v("flex w-full",s.role==="user"?"justify-end":"justify-start"),children:e.jsxs("div",{className:v("flex flex-col max-w-[92%]",s.role==="user"?"items-end":"items-start"),children:[s.role==="vasist"&&e.jsxs("span",{className:"text-[9px] items-center flex gap-1 font-bold text-[#bd93f9] mb-1 uppercase tracking-widest",children:[e.jsx(ve,{className:"h-2.5 w-2.5"})," Vasist_System"]}),e.jsxs("div",{className:v("px-3 py-2 rounded-xl text-xs font-mono backdrop-blur-md leading-relaxed",s.role==="user"?"bg-[#062012]/60 border border-[#16a34a]/40 text-[#4ade80] rounded-tr-sm":"bg-[#0d1117]/90 border border-[#bd93f9]/20 text-[#e6edf3] rounded-tl-sm shadow-md"),children:[w(h),e.jsx("span",{className:"inline-block w-1 h-3 bg-[#bd93f9] ml-0.5 animate-pulse align-middle"})]})]})})]})]}),e.jsx("div",{className:"pt-2 border-t border-zinc-800/80",children:e.jsxs("div",{className:"px-2.5 py-1.5 rounded bg-zinc-950 border border-zinc-800 text-[11px] font-mono text-zinc-500 flex items-center justify-between",children:[e.jsx("span",{children:"Query Vasist system..."}),e.jsx("span",{className:"text-[#bd93f9] font-mono text-[10px]",children:"Socratic Mode"})]})})]})]})]})})}),e.jsxs(A.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,amount:.15},transition:{duration:.5,delay:.35,ease:[.16,1,.3,1]},className:"mt-6 sm:mt-8 grid grid-cols-2 md:grid-cols-4 gap-2 sm:gap-4 max-w-4xl mx-auto text-center text-[11px] sm:text-xs font-medium text-zinc-400",children:[e.jsx("div",{className:"py-2 px-2.5 sm:py-2.5 sm:px-3 rounded-lg border border-zinc-800/60 bg-zinc-900/30",children:"✓ 500+ Curated Problems"}),e.jsx("div",{className:"py-2 px-2.5 sm:py-2.5 sm:px-3 rounded-lg border border-zinc-800/60 bg-zinc-900/30",children:"✓ Socratic Logic Tutor"}),e.jsx("div",{className:"py-2 px-2.5 sm:py-2.5 sm:px-3 rounded-lg border border-zinc-800/60 bg-zinc-900/30",children:"✓ 30 / 45 / 60 Day Roadmaps"}),e.jsx("div",{className:"py-2 px-2.5 sm:py-2.5 sm:px-3 rounded-lg border border-zinc-800/60 bg-zinc-900/30",children:"✓ GitHub Skill Verification"})]})]})]})},Rn=[{label:"Curated DSA Problems",value:"500+",icon:Be,desc:"Easy, Medium, Hard"},{label:"Structured Roadmaps",value:"3 Tracks",icon:Pa,desc:"30, 45, & 60-Day"},{label:"Supported Languages",value:"Python, C++, Java, JS",icon:He,desc:"Monaco & Execution Judge"},{label:"Socratic AI Tutor",value:"Vasist AI",icon:De,desc:"Guided Hints & Logic Fixes"}],Ln=()=>e.jsx("section",{className:"relative py-10 border-y border-zinc-800/60 bg-zinc-950/60",children:e.jsx("div",{className:"container mx-auto px-4 max-w-6xl",children:e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 sm:gap-6 text-center md:text-left",children:Rn.map((t,i)=>{const s=t.icon;return e.jsxs(A.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,amount:.2},transition:{duration:.5,delay:i*.1,ease:[.16,1,.3,1]},className:"flex flex-col md:flex-row items-center md:items-start gap-2.5 sm:gap-3 p-2 sm:p-0",children:[e.jsx("div",{className:"w-9 h-9 sm:w-10 sm:h-10 rounded-xl bg-violet-500/10 border border-violet-500/20 flex items-center justify-center shrink-0 text-violet-400",children:e.jsx(s,{className:"w-4 h-4 sm:w-5 sm:h-5"})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-base sm:text-lg font-bold text-white font-mono tracking-tight",children:t.value}),e.jsx("div",{className:"text-xs font-semibold text-zinc-300",children:t.label}),e.jsx("div",{className:"text-[10px] sm:text-[11px] text-zinc-500",children:t.desc})]})]},t.label)})})})}),Fn=[{name:"React",depth:"8/10"},{name:"Tailwind",depth:"9/10"},{name:"TypeScript",depth:"8/10"},{name:"Supabase",depth:"7/10"},{name:"Framer",depth:"9/10"},{name:"PyTorch",depth:"8/10"},{name:"Next.js",depth:"7/10"},{name:"TanStack",depth:"7/10"},{name:"Zod",depth:"8/10"},{name:"Node.js",depth:"6/10"}],Bn=()=>{const[t,i]=a.useState("technical");return e.jsx("section",{className:"py-12 sm:py-20 bg-zinc-950 text-zinc-100",children:e.jsxs("div",{className:"container mx-auto px-2 sm:px-4 max-w-7xl",children:[e.jsxs(A.div,{initial:{opacity:0,y:25},whileInView:{opacity:1,y:0},viewport:{once:!0,amount:.15},transition:{duration:.5,ease:[.16,1,.3,1]},className:"flex flex-col md:flex-row md:items-end justify-between mb-8 sm:mb-12 pb-4 sm:pb-6 border-b border-zinc-800/80 gap-3 sm:gap-4",children:[e.jsxs("div",{children:[e.jsxs("span",{className:"text-xs font-mono text-violet-400 uppercase tracking-wider font-semibold flex items-center gap-1.5",children:[e.jsx(Ea,{className:"w-3.5 h-3.5 text-violet-400"}),"Passive Recruiter Discovery"]}),e.jsx("h2",{className:"text-2xl sm:text-4xl font-extrabold text-white mt-1",children:"Recruiters find you. You just code."})]}),e.jsx("p",{className:"text-xs sm:text-sm text-zinc-400 max-w-md",children:"Connect GitHub once. Solve DSA problems and push code—PyNyx generates your live verified AI profile card that recruiters search directly."})]}),e.jsx(A.div,{initial:{opacity:0,y:35},whileInView:{opacity:1,y:0},viewport:{once:!0,amount:.15},transition:{duration:.7,delay:.15,ease:[.16,1,.3,1]},children:e.jsx(is,{intensity:5,className:"w-full",children:e.jsxs("div",{className:"rounded-2xl border border-zinc-800 bg-zinc-900/50 p-2.5 sm:p-6 md:p-8 shadow-2xl backdrop-blur-md",children:[e.jsxs("div",{className:"flex flex-row items-center justify-between gap-2 pb-3 sm:pb-5 mb-3 sm:mb-6 border-b border-zinc-800/80",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2",children:[e.jsx("h3",{className:"text-base sm:text-xl md:text-2xl font-bold text-white tracking-tight leading-none",children:"Ajay Badugu"}),e.jsxs("span",{className:"px-1.5 sm:px-2 py-0.5 rounded-full bg-emerald-500/10 border border-emerald-500/30 text-emerald-400 text-[8px] sm:text-[10px] font-mono font-semibold flex items-center gap-0.5 sm:gap-1 shrink-0",children:[e.jsx(qe,{className:"w-2.5 h-2.5 sm:w-3 sm:h-3"})," Live Profile"]})]}),e.jsx("p",{className:"text-[9px] sm:text-xs text-zinc-400 font-mono mt-0.5",children:"@Ajay · Verified PyNyx Engineering ID"})]}),e.jsxs("div",{className:"flex items-center gap-1 sm:gap-2 px-2 sm:px-3 py-1 sm:py-1.5 rounded-xl bg-zinc-950 border border-zinc-800 text-[9px] sm:text-xs font-mono shrink-0",children:[e.jsx("span",{className:"text-zinc-400",children:"Match Score"}),e.jsx("span",{className:"text-xs sm:text-sm font-bold text-emerald-400 font-mono",children:"92%"})]})]}),e.jsxs("div",{className:"grid grid-cols-12 gap-1.5 xs:gap-2 sm:gap-4 lg:gap-6 items-stretch",children:[e.jsxs("div",{className:"col-span-3 space-y-2 sm:space-y-4 rounded-xl border border-zinc-800 bg-zinc-950 p-2 sm:p-4 lg:p-5 flex flex-col justify-between",children:[e.jsxs("div",{className:"flex gap-1 sm:gap-2",children:[e.jsxs("div",{className:"flex-1 rounded-lg sm:rounded-xl border border-zinc-800 bg-zinc-900/60 p-1 sm:p-2.5 text-center",children:[e.jsx("p",{className:"text-[7.5px] sm:text-[10px] font-semibold text-zinc-500 uppercase font-mono tracking-wider mb-0.5",children:"Score"}),e.jsx("p",{className:"text-sm sm:text-xl md:text-2xl font-bold font-mono text-emerald-400 leading-tight",children:"8.2"})]}),e.jsxs("div",{className:"flex-1 rounded-lg sm:rounded-xl border border-zinc-800 bg-zinc-900/60 p-1 sm:p-2.5 text-center",children:[e.jsx("p",{className:"text-[7.5px] sm:text-[10px] font-semibold text-zinc-500 uppercase font-mono tracking-wider mb-0.5",children:"DSA"}),e.jsx("p",{className:"text-sm sm:text-xl md:text-2xl font-bold font-mono text-violet-400 leading-tight",children:"36"})]})]}),e.jsxs("div",{className:"flex flex-col items-center py-1",children:[e.jsx("div",{className:"w-10 h-10 sm:w-16 sm:h-16 md:w-20 md:h-20 rounded-xl border-2 border-violet-500/30 bg-zinc-900 overflow-hidden mb-1 sm:mb-2 shadow-md shrink-0",children:e.jsx("img",{src:"/ajay_avatar.png",alt:"Ajay Badugu Profile",className:"w-full h-full object-cover"})}),e.jsx("h4",{className:"text-[10px] sm:text-sm md:text-base font-bold text-white text-center leading-tight",children:"Ajay Badugu"}),e.jsx("p",{className:"text-[8px] sm:text-xs text-zinc-400 font-mono mb-2 sm:mb-3",children:"@Ajay"}),e.jsxs("div",{className:"flex gap-1 sm:gap-2 mb-2 sm:mb-4",children:[e.jsx("button",{className:"w-6 h-6 sm:w-8 sm:h-8 rounded-md sm:rounded-xl border border-zinc-800 bg-zinc-900 flex items-center justify-center text-zinc-400 hover:text-white hover:border-zinc-700 transition-colors cursor-pointer",children:e.jsx(St,{className:"w-2.5 h-2.5 sm:w-3.5 sm:h-3.5"})}),e.jsx("button",{className:"w-6 h-6 sm:w-8 sm:h-8 rounded-md sm:rounded-xl border border-zinc-800 bg-zinc-900 flex items-center justify-center text-zinc-400 hover:text-white hover:border-zinc-700 transition-colors cursor-pointer",children:e.jsx(Zt,{className:"w-2.5 h-2.5 sm:w-3.5 sm:h-3.5"})}),e.jsx("button",{className:"w-6 h-6 sm:w-8 sm:h-8 rounded-md sm:rounded-xl border border-zinc-800 bg-zinc-900 flex items-center justify-center text-zinc-400 hover:text-white hover:border-zinc-700 transition-colors cursor-pointer",children:e.jsx(ps,{className:"w-2.5 h-2.5 sm:w-3.5 sm:h-3.5"})})]}),e.jsxs("div",{className:"w-full space-y-1 sm:space-y-2",children:[e.jsx(fe,{to:"/signup",className:"w-full h-6 sm:h-9 rounded-md sm:rounded-xl font-semibold text-[8px] sm:text-xs text-white bg-violet-600 hover:bg-violet-500 flex items-center justify-center transition-all shadow-md px-0.5 text-center leading-none",children:"Contact Candidate"}),e.jsxs("button",{className:"w-full h-6 sm:h-8 rounded-md sm:rounded-xl font-semibold text-[7.5px] sm:text-xs text-zinc-300 border border-zinc-800 bg-zinc-900 hover:bg-zinc-850 flex items-center justify-center gap-0.5 sm:gap-1 transition-all cursor-pointer px-0.5 text-center leading-none",children:[e.jsx(sr,{className:"w-2.5 h-2.5 sm:w-3.5 sm:h-3.5 text-zinc-400 shrink-0"})," ",e.jsx("span",{className:"truncate",children:"Generate CV"})]}),e.jsxs("button",{className:"w-full h-6 sm:h-8 rounded-md sm:rounded-xl font-semibold text-[7.5px] sm:text-xs text-violet-300 border border-violet-500/20 bg-violet-500/10 hover:bg-violet-500/20 flex items-center justify-center gap-0.5 sm:gap-1 transition-all cursor-pointer px-0.5 text-center leading-none",children:[e.jsx(Da,{className:"w-2.5 h-2.5 sm:w-3.5 sm:h-3.5 text-violet-400 shrink-0"})," ",e.jsx("span",{className:"truncate",children:"Similar Talent"})]})]})]})]}),e.jsxs("div",{className:"col-span-6 space-y-2 sm:space-y-4 rounded-xl border border-zinc-800 bg-zinc-950 p-2 sm:p-5 lg:p-6 flex flex-col justify-between",children:[e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs sm:text-lg font-bold text-white tracking-tight mb-0.5",children:["AI Recruiter ",e.jsx("span",{className:"text-violet-400",children:"Intelligence"})]}),e.jsx("p",{className:"text-[8px] sm:text-xs text-zinc-400 mb-2 sm:mb-3",children:"Technical & behavioral analysis from verified repos."}),e.jsxs("div",{className:"flex gap-0.5 sm:gap-1 p-0.5 sm:p-1 bg-zinc-900 border border-zinc-800 rounded-lg sm:rounded-xl w-fit text-[8px] sm:text-xs font-mono",children:[e.jsx("button",{onClick:()=>i("technical"),className:v("px-1.5 sm:px-3 py-1 sm:py-2 rounded-md sm:rounded-lg font-semibold transition-all text-center text-[8px] sm:text-xs cursor-pointer flex items-center justify-center leading-none",t==="technical"?"bg-violet-600 text-white shadow-md":"text-zinc-400 hover:text-white"),children:"Technical Mastery"}),e.jsx("button",{onClick:()=>i("behavioral"),className:v("px-1.5 sm:px-3 py-1 sm:py-2 rounded-md sm:rounded-lg font-semibold transition-all text-center text-[8px] sm:text-xs cursor-pointer flex items-center justify-center leading-none",t==="behavioral"?"bg-violet-600 text-white shadow-md":"text-zinc-400 hover:text-white"),children:"Mental Model & DSA"})]})]}),e.jsxs("div",{className:"flex items-center justify-between gap-1 pt-1.5 text-[8px] sm:text-xs font-mono border-t border-zinc-800/80",children:[e.jsx("span",{className:"text-zinc-500 uppercase tracking-wider font-semibold text-[7.5px] sm:text-xs truncate",children:"Repo Intelligence"}),e.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[e.jsx("span",{className:"text-zinc-400 text-[8px] sm:text-xs",children:"Mastery:"}),e.jsx("span",{className:"font-bold text-amber-400 text-[8px] sm:text-xs",children:"76/100"}),e.jsx("span",{className:"px-1 py-0.25 rounded bg-zinc-900 border border-zinc-800 text-zinc-300 text-[7.5px] sm:text-[10px]",children:"Adv. Fresher"})]})]}),e.jsxs("div",{className:"p-2 sm:p-3.5 rounded-lg sm:rounded-xl border border-zinc-800 bg-zinc-900/50 text-[8px] sm:text-xs text-zinc-300 leading-tight sm:leading-relaxed italic",children:['"',t==="technical"?"This candidate is a high-potential developer who demonstrates exceptional proficiency in modern React and UI/UX design. Successfully transitioned to building sophisticated applications with runtime val
8idation and clean architectural patterns.":"Demonstrates strong structured problem-solving intuition. Systematically breaks down binary tree traversals and dynamic programming subproblems with low cognitive latency and clean algorithmic execution.",'"']}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2 sm:gap-3 pt-0.5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("h5",{className:"text-[8.5px] sm:text-xs font-bold text-emerald-400 uppercase tracking-wider font-mono flex items-center gap-1",children:[e.jsx(Oa,{className:"w-2.5 h-2.5 sm:w-3.5 sm:h-3.5 shrink-0"})," Strengths"]}),e.jsxs("ul",{className:"space-y-0.5 sm:space-y-1 text-[7.5px] sm:text-xs text-zinc-400",children:[e.jsxs("li",{className:"flex items-start gap-1",children:[e.jsx("span",{className:"w-1 h-1 rounded-full bg-emerald-400 mt-1 shrink-0"}),e.jsx("span",{className:"leading-tight",children:"High-fidelity UI/UX & animation engineering"})]}),e.jsxs("li",{className:"flex items-start gap-1",children:[e.jsx("span",{className:"w-1 h-1 rounded-full bg-emerald-400 mt-1 shrink-0"}),e.jsx("span",{className:"leading-tight",children:"Modern full-stack integration (React, Supabase, Next.js)"})]}),e.jsxs("li",{className:"flex items-start gap-1",children:[e.jsx("span",{className:"w-1 h-1 rounded-full bg-emerald-400 mt-1 shrink-0"}),e.jsx("span",{className:"leading-tight",children:"Architectural maturity & runtime validation"})]})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("h5",{className:"text-[8.5px] sm:text-xs font-bold text-amber-400 uppercase tracking-wider font-mono flex items-center gap-1",children:[e.jsx(Me,{className:"w-2.5 h-2.5 sm:w-3.5 sm:h-3.5 shrink-0"})," Growth Areas"]}),e.jsxs("ul",{className:"space-y-0.5 sm:space-y-1 text-[7.5px] sm:text-xs text-zinc-400",children:[e.jsxs("li",{className:"flex items-start gap-1",children:[e.jsx("span",{className:"w-1 h-1 rounded-full bg-amber-400 mt-1 shrink-0"}),e.jsx("span",{className:"leading-tight",children:"Over-reliance on AI scaffolding for setup"})]}),e.jsxs("li",{className:"flex items-start gap-1",children:[e.jsx("span",{className:"w-1 h-1 rounded-full bg-amber-400 mt-1 shrink-0"}),e.jsx("span",{className:"leading-tight",children:"Inconsistent automated testing coverage"})]}),e.jsxs("li",{className:"flex items-start gap-1",children:[e.jsx("span",{className:"w-1 h-1 rounded-full bg-amber-400 mt-1 shrink-0"}),e.jsx("span",{className:"leading-tight",children:"Backend scalability & DB optimization"})]})]})]})]})]}),e.jsxs("div",{className:"col-span-3 space-y-2 sm:space-y-4 rounded-xl border border-zinc-800 bg-zinc-950 p-2 sm:p-4 lg:p-5 flex flex-col justify-between",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"text-[8.5px] sm:text-xs font-mono text-violet-400 font-bold uppercase tracking-wider flex items-center gap-1 mb-1.5",children:[e.jsx(He,{className:"w-2.5 h-2.5 sm:w-3.5 sm:h-3.5 shrink-0"})," Talent Signals"]}),e.jsxs("div",{className:"p-1.5 sm:p-3 rounded-lg sm:rounded-xl border border-violet-500/20 bg-violet-500/10 space-y-0.5 mb-2",children:[e.jsx("div",{className:"text-[7.5px] sm:text-[10px] font-mono text-violet-300 font-bold uppercase tracking-wider",children:"Recruiter Verdict"}),e.jsx("p",{className:"text-[8px] sm:text-xs text-zinc-200 leading-tight",children:"Highly recommended for product teams requiring autonomy."})]}),e.jsxs("div",{className:"space-y-1 mb-2",children:[e.jsx("div",{className:"text-[7.5px] sm:text-[10px] font-mono text-zinc-500 uppercase tracking-wider font-semibold",children:"<> Validated Stack"}),e.jsx("div",{className:"flex flex-wrap gap-0.5 sm:gap-1",children:Fn.map(s=>e.jsxs("span",{className:"text-[7px] sm:text-[10px] font-mono font-medium px-1 sm:px-1.5 py-0.25 sm:py-0.5 rounded border border-zinc-800 bg-zinc-900 text-zinc-300 flex items-center gap-0.5",children:[s.name,e.jsx("span",{className:"text-[6.5px] sm:text-[9px] font-bold text-violet-400",children:s.depth})]},s.name))})]})]}),e.jsxs("div",{className:"space-y-1.5 pt-1.5 border-t border-zinc-800/80 text-[8px] sm:text-xs font-mono",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[7.5px] sm:text-[10px] text-zinc-500 block",children:"Thinking Signal"}),e.jsx("span",{className:"text-zinc-200 font-semibold text-[8px] sm:text-[11px] leading-tight block",children:"Algorithmic Efficiency"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-[7.5px] sm:text-[10px] text-zinc-500 block",children:"Tech Signal"}),e.jsx("span",{className:"text-emerald-400 font-semibold text-[8px] sm:text-[11px] leading-tight block",children:"High-fidelity UI/UX"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-[7.5px] sm:text-[10px] text-zinc-500 block",children:"Data Recency"}),e.jsx("span",{className:"text-zinc-400 text-[8px] sm:text-[11px]",children:"8/7/2026"})]})]})]})]}),e.jsxs("div",{className:"mt-4 sm:mt-8 pt-3 sm:pt-5 border-t border-zinc-800/80 flex flex-col sm:flex-row items-center justify-between text-xs gap-2.5 sm:gap-4 font-mono",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-zinc-400 text-[9px] sm:text-xs text-center sm:text-left",children:[e.jsx("span",{className:"w-1.5 h-1.5 sm:w-2 sm:h-2 rounded-full bg-emerald-400 animate-pulse shrink-0"}),e.jsx("span",{children:"Connect GitHub once to build your live verified PyNyx AI Recruiter card"})]}),e.jsxs(fe,{to:"/signup",className:"w-full sm:w-auto inline-flex items-center justify-center gap-1.5 px-4 sm:px-6 py-2 sm:py-3 rounded-xl font-bold text-[10px] sm:text-xs text-white bg-violet-600 hover:bg-violet-500 transition-all shadow-lg shadow-violet-600/25 shrink-0",children:["Connect GitHub & Get Discovered",e.jsx(Ae,{className:"w-3.5 h-3.5"})]})]})]})})})]})})};function rs({value:t,from:i,duration:s=1.5,className:l}){const h=a.useRef(null),u=ar(h,{once:!0,margin:"-50px"}),[o,m]=a.useState(!1);a.useEffect(()=>{u&&!o&&m(!0)},[u,o]),a.useEffect(()=>{if(!o)return;const w=h.current;if(!w)return;const d=t.match(/[\d,.]+/);if(!d){w.textContent=t;return}const g=d[0],f=parseFloat(g.replace(/,/g,"")),p=g.includes(",")||i!==void 0&&Math.abs(i)>=1e3,T=g.includes(".")?g.split(".")[1].length:0,r=t.indexOf(g),c=t.substring(0,r),j=t.substring(r+g.length),I=ir(i!==void 0?i:0,f,{duration:s,ease:[.16,1,.3,1],onUpdate(_){let q=_.toFixed(T);if(p){const F=q.split(".");F[0]=F[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),q=F.join(".")}w.textContent=`${c}${q}${j}`}});return()=>I.stop()},[o,t,i,s]);const b=()=>{const w=t.match(/[\d,.]+/);if(!w)return t;const d=w[0],g=t.indexOf(d),f=t.substring(0,g),p=t.substring(g+d.length),N=d.includes(",")||i!==void 0&&Math.abs(i)>=1e3,r=d.includes(".")?d.split(".")[1].length:0;let j=(i!==void 0?i:0).toFixed(r);if(N){const k=j.split(".");k[0]=k[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),j=k.join(".")}return`${f}${j}${p}`};return e.jsx("span",{ref:h,className:l,children:b()})}const wt={hidden:{opacity:0,y:20},visible:t=>({opacity:1,y:0,transition:{duration:.6,delay:t*.1,ease:[.16,1,.3,1]}})},Mn=()=>
8{const t=$e(),i=Oe();return e.jsxs("section",{className:"relative bg-transparent pt-24 sm:pt-32 lg:pt-40 pb-10 sm:pb-16 lg:pb-20 overflow-hidden flex flex-col justify-between sm:justify-center sm:min-h-[90vh]",children:[e.jsx("div",{className:"absolute top-[10%] left-[10%] w-[500px] h-[500px] bg-violet-500/[0.04] rounded-full blur-[100px] pointer-events-none"}),e.jsx("div",{className:"absolute bottom-[10%] right-[10%] w-[500px] h-[500px] bg-indigo-500/[0.03] rounded-full blur-[100px] pointer-events-none"}),e.jsx("div",{className:"max-w-5xl mx-auto px-5 sm:px-6 text-center relative z-10 space-y-6 sm:space-y-8 flex-1 flex flex-col justify-center min-h-[calc(100vh-140px)] sm:min-h-0 w-full",children:e.jsxs(A.div,{initial:"hidden",animate:"visible",className:"space-y-6 my-auto",children:[e.jsx(A.div,{custom:0,variants:wt,children:e.jsxs("span",{className:"inline-flex items-center gap-1.5 sm:gap-2 px-2.5 py-1 sm:px-3 sm:py-1.5 rounded-full bg-primary/[0.06] border border-primary/10 text-primary text-[10px] sm:text-xs font-semibold tracking-wide shadow-sm",children:[e.jsx(ve,{className:"w-3 h-3 sm:w-3.5 sm:h-3.5"}),"Next-Gen Tech Talent Verification"]})}),e.jsxs(A.h1,{custom:1,variants:wt,className:"text-[32px] leading-[1.15] sm:text-4xl md:text-6xl lg:text-7xl font-extrabold tracking-[-0.03em] sm:leading-[1.1] text-slate-900",children:["World's Easiest and Free way"," ",e.jsx("br",{className:"hidden sm:block"}),"to find"," ",e.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-primary via-violet-500 to-indigo-500",children:"True Talent"}),"."]}),e.jsx(A.p,{custom:2,variants:wt,className:"text-slate-500 text-sm sm:text-lg md:text-xl max-w-xl sm:max-w-3xl mx-auto leading-relaxed font-medium",children:"Find Engineers who can actually build. Not just list keywords."}),e.jsx(A.div,{custom:3,variants:wt,className:"flex flex-col sm:flex-row justify-center items-center gap-3 sm:gap-4 pt-2 sm:pt-4",children:e.jsxs("button",{onClick:()=>{i==="recruiter"?t("/request-demo"):window.location.href=Q("recruiter","/request-demo")},className:"group w-full sm:w-auto px-8 py-3.5 sm:py-4 bg-primary text-white rounded-full sm:rounded-xl font-bold text-sm shadow-[0_4px_14px_rgba(139,92,246,0.3)] hover:bg-primary/95 active:scale-[0.98] transition-all duration-300 flex items-center justify-center gap-2",children:["Book a Demo",e.jsx(Ae,{className:"w-4 h-4 group-hover:translate-x-1 transition-transform"})]})}),e.jsxs(A.div,{custom:4,variants:wt,className:"flex flex-col items-center justify-center gap-2.5 pt-6 sm:pt-8 max-w-xl mx-auto",children:[e.jsx("span",{className:"text-[9px] font-black uppercase tracking-[0.2em] text-slate-400 block",children:"Backed by Amazon Web Services"}),e.jsx("div",{className:"bg-white border border-slate-200/80 px-6 py-2.5 rounded-xl shadow-[0_2px_8px_rgba(0,0,0,0.02)] inline-flex items-center justify-center h-10",children:e.jsx("img",{src:"https://upload.wikimedia.org/wikipedia/commons/9/93/Amazon_Web_Services_Logo.svg",alt:"AWS Logo",className:"h-4 w-auto object-contain"})})]})]})}),e.jsx("div",{className:"border-t border-slate-100/80 bg-white/40 backdrop-blur-sm py-12 sm:py-8 mt-10 sm:mt-16 relative z-10",children:e.jsx("div",{className:"max-w-5xl mx-auto px-5 sm:px-6",children:e.jsx("div",{className:"flex flex-col sm:grid sm:grid-cols-3 gap-12 sm:gap-6 md:gap-8 text-center items-center",children:[{value:"2,000+",label:"Engineers Verified",gradient:"from-primary to-indigo-600"},{value:"100%",label:"Free Job Postings",gradient:"from-fuchsia-600 to-pink-600"},{value:"$0",label:"Sourcing & Placement Fees",gradient:"from-emerald-500 to-teal-600",from:4999}].map((s,l)=>e.jsxs(A.div,{initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:l*.1},className:"space-y-2 sm:space-y-1",children:[e.jsx("p",{className:`text-4xl sm:text-3xl md:text-4xl font-black text-transparent bg-clip-text bg-gradient-to-r ${s.gradient} tracking-tight`,children:e.jsx(rs,{value:s.value,from:s.from})}),e.jsx("p",{className:"text-xs font-bold text-slate-400 uppercase tracking-widest max-w-[200px] sm:max-w-none",children:s.label})]},s.label))})})})]})},qn=[{id:"dp",name:"Dynamic Programming",x:68,y:-95,z:-50,r:15.5,colorGrad:"light-orb-magenta",glowFilter:"light-glow-purple",badge:"12x",badgeColor:"#db2777",evidence:[{dx:28,dy:-30,dz:15,r:4.2,color:"#f9a8d4"},{dx:-22,dy:-32,dz:-18,r:3,color:"#c084fc"},{dx:34,dy:10,dz:20,r:3.5,color:"#f472b6"}]},{id:"bs",name:"Binary Search",x:-68,y:-85,z:45,r:14,colorGrad:"light-orb-purple",glowFilter:"light-glow-purple",badge:"8x",badgeColor:"#7c3aed",evidence:[{dx:-35,dy:-25,dz:-15,r:3.8,color:"#a78bfa"},{dx:18,dy:-32,dz:20,r:3,color:"#c4b5fd"},{dx:-28,dy:15,dz:-20,r:2.5,color:"#818cf8"}]},{id:"hash",name:"Hash Maps",x:-6,y:-125,z:-35,r:13,colorGrad:"light-orb-purple",glowFilter:"light-glow-purple",badge:"9x",badgeColor:"#7c3aed",evidence:[{dx:-18,dy:-26,dz:10,r:3.2,color:"#c084fc"},{dx:20,dy:-22,dz:-15,r:3,color:"#f9a8d4"}]},{id:"trees",name:"Trees & Recursion",x:95,y:55,z:-60,r:12,colorGrad:"light-orb-amber",glowFilter:"light-glow-amber",badge:"6x",badgeColor:"#d97706",evidence:[{dx:36,dy:22,dz:-10,r:3.8,color:"#fcd34d"},{dx:32,dy:-18,dz:15,r:3,color:"#fbbf24"}]},{id:"heap",name:"Heaps",x:125,y:-15,z:50,r:11,colorGrad:"light-orb-amber",glowFilter:"light-glow-amber",badge:"5x",badgeColor:"#d97706",evidence:[{dx:26,dy:-18,dz:-15,r:3.2,color:"#fcd34d"},{dx:30,dy:16,dz:10,r:2.8,color:"#fbbf24"}]},{id:"sorting",name:"Sorting",x:82,y:-48,z:-12,r:10.5,colorGrad:"light-orb-magenta",glowFilter:"light-glow-purple",badge:"7x",badgeColor:"#db2777",evidence:[{dx:26,dy:-16,dz:15,r:3,color:"#f87171"}]},{id:"graph",name:"Graph Theory",x:-85,y:60,z:-45,r:10,colorGrad:"light-orb-cyan",glowFilter:"light-glow-cyan",badge:"4x",badgeColor:"#0284c7",evidence:[{dx:-35,dy:22,dz:12,r:3.5,color:"#6ee7b7"},{dx:-28,dy:-18,dz:-15,r:2.8,color:"#34d399"}]},{id:"backtrack",name:"Backtracking",x:58,y:108,z:42,r:9.5,colorGrad:"light-orb-magenta",glowFilter:"light-glow-purple",evidence:[{dx:25,dy:22,dz:-10,r:3.2,color:"#f472b6"},{dx:-18,dy:28,dz:12,r:2.5,color:"#c084fc"}]},{id:"sliding",name:"Sliding Window",x:-125,y:-65,z:-35,r:9,colorGrad:"light-orb-cyan",glowFilter:"light-glow-cyan",badge:"3x",badgeColor:"#0284c7",evidence:[{dx:-26,dy:-18,dz:10,r:3.2,color:"#38bdf8"},{dx:-18,dy:22,dz:-12,r:2.5,color:"#6ee7b7"}]},{id:"linkedlist",name:"Linked Lists",x:-80,y:-28,z:65,r:8.5,colorGrad:"light-orb-purple",glowFilter:"light-glow-purple",evidence:[{dx:-30,dy:8,dz:-15,r:3.2,color:"#5eead4"}]},{id:"stack",name:"Stack",x:-36,y:-58,z:-68,r:8,colorGrad:"light-orb-purple",glowFilter:"light-glow-purple",evidence:[{dx:-15,dy:8,dz:12,r:2.5,color:"#c4b5fd"}]},{id:"greedy",name:"Greedy",x:0,y:125,z:-22,r:7.5,colorGrad:"light-orb-cyan",glowFilter:"light-glow-cyan",evidence:[{dx:-20,dy:25,dz:10,r:2.8,color:"#93c5fd"},{dx:20,dy:25,dz:-12,r:2.8,color:"#60a5fa"}]},{id:"twopointers",name:"Two Pointers",x:-120,y:4,z:22,r:7,colorGrad:"light-orb-purple",glowFilter:"light-glow-purple",evidence:[{dx:-28,dy:-12,dz:-10,r:2.8,color:"#a78bfa"},{dx:-22,dy:20,dz:12,r:2.5,color:"#818cf8"}]},{id:"trie",name:"Trie",x:122,y:-88,z:-28,r:7,colorGrad:"light-orb-magenta",glowFilter:"light-glow-purple",evidence:[{dx:26,dy:-12,dz:12,r:2.8,color:"#f472b6"},{dx:22,dy:20,dz:-10,r:2.5,color:"#f9a8d4"}]},{id:"bitmanip",name:"Bit Manipulation",x:-52,y:105,z:50,r:6.5,colorGrad:"light-orb-cyan",glowFilter:"light-glow-cyan",evidence:[{dx:-24,dy:24,dz:-10,r:2.8,color:"#38bdf8"},{dx:12,dy:20,dz:12,r:2.5,color:"#93c5fd"}]},{id:"intervals",name:"Intervals",x:44,y:38,z:-78,r:6,colorGrad:"light-orb-amber",glowFilter:"light-glow-amber",evidence:[{dx:14,dy:-20,dz:10,r:2.5,color:"#fbbf24"}]}],Js=[["dp","hash"],["dp","sorting"],["dp","trie"],["bs","hash"],["bs","sliding"],["bs","stack"],["stack","linkedlist"],["linkedlist","twopointers"],["twopointers","graph"],["graph","bitmanip"],["bitmanip","greedy"],["greedy","backtrack"],["backtrack","trees"],["trees","heap"],["trees","intervals"],["intervals","sorting"],["sorting","heap"]],ze=500,Ce=385,Xs=440,bi=({className:t,badgeText:i,titleLine1:s,titleLine2:l,description:h,rightCardTitle:u="Recruiters"})=>{const[o,m]=a.useState(null),[b,w]=a.useState({x:.22,y:0}),[d,g]=a.useState(!1),f=a.useRef(!1),p=a.useRef({x:0,y:0}),N=a.useRef();a.useEffect(()=>{let y=performance.now();const E=C=>{const $=Math.min((C-y)/1e3,.1);y=C,f.current||w(R=>({x:.2+Math.sin(C*6e-4)*.06,y:R.y+$*.22})),N.current=requestAnimationFrame(E)};return N.current=requestAnimationFrame(E),()=>{N.current&&cancelAnimationFrame(N.current)}},[]);const T=y=>{f.current=!0,p.current={x:y.clientX,y:y.clientY}}
8,r=y=>{if(!f.current)return;const E=y.clientX-p.current.x,C=y.clientY-p.current.y;p.current={x:y.clientX,y:y.clientY},w($=>({x:Math.max(-.75,Math.min(.75,$.x+C*.007)),y:$.y+E*.007}))},c=()=>{f.current=!1},j=(y,E,C)=>{const $=Math.cos(b.y),R=Math.sin(b.y),X=y*$+C*R,re=-y*R+C*$,xe=Math.cos(b.x),se=Math.sin(b.x),K=E*xe-re*se,we=E*se+re*xe,ke=Xs/(Xs+we);return{x:ze+X*ke,y:Ce+K*ke,z:we,scale:ke}},k=a.useMemo(()=>{const y={};return{list:qn.map(C=>{const $=j(C.x,C.y,C.z),R=C.r*$.scale,X=Math.max(.38,Math.min(1,.45+(130-$.z)/260*.55)),re=C.evidence.map(se=>{const K=j(C.x+se.dx,C.y+se.dy,C.z+se.dz);return{...se,projX:K.x,projY:K.y,projZ:K.z,projR:se.r*K.scale,opacity:Math.max(.3,Math.min(.85,X*.8))}}),xe={...C,projX:$.x,projY:$.y,projZ:$.z,scale:$.scale,radius:R,opacity:X,evidenceProjected:re};return y[C.id]=xe,xe}),map:y}},[b]),I=a.useMemo(()=>{const E=[];for(let C=0;C<=36;C++){const $=C/36*Math.PI*2,R=152*Math.cos($),X=152*Math.sin($),re=j(R,0,X);E.push(`${C===0?"M":"L"} ${re.x.toFixed(1)},${re.y.toFixed(1)}`)}return E.join(" ")},[b]),_=a.useMemo(()=>{const C=[];for(let $=0;$<=36;$++){const R=$/36*Math.PI*2,X=142*Math.cos(R),re=142*Math.sin(R)*Math.cos(.95),xe=142*Math.sin(R)*Math.sin(.95),se=j(X,re,xe);C.push(`${$===0?"M":"L"} ${se.x.toFixed(1)},${se.y.toFixed(1)}`)}return C.join(" ")},[b]),q=a.useMemo(()=>j(135,0,0),[b]),F=a.useMemo(()=>j(0,-125,0),[b]),O=a.useMemo(()=>j(0,0,135),[b]),Y=a.useMemo(()=>k.list.filter(y=>y.projZ>0).sort((y,E)=>E.projZ-y.projZ),[k]),te=a.useMemo(()=>k.list.filter(y=>y.projZ<=0).sort((y,E)=>E.projZ-y.projZ),[k]);return e.jsxs("section",{className:v("relative py-14 sm:py-20 lg:py-24 bg-transparent text-slate-900 overflow-hidden border-t border-slate-100/80",t),children:[e.jsxs("div",{className:"absolute inset-0 pointer-events-none overflow-hidden",children:[e.jsx("div",{className:"absolute top-[15%] left-[50%] -translate-x-1/2 w-[850px] h-[550px] bg-gradient-to-b from-violet-400/[0.06] via-indigo-400/[0.04] to-transparent rounded-full blur-[130px]"}),e.jsx("div",{className:"absolute top-[35%] left-[10%] w-[450px] h-[450px] bg-purple-400/[0.04] rounded-full blur-[100px]"}),e.jsx("div",{className:"absolute bottom-[10%] right-[10%] w-[450px] h-[450px] bg-cyan-400/[0.04] rounded-full blur-[100px]"})]}),e.jsxs("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 relative z-10",children:[e.jsxs("div",{className:"text-center max-w-4xl mx-auto space-y-4 sm:space-y-5 mb-10 sm:mb-14",children:[e.jsx(A.div,{initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},children:e.jsxs("span",{className:"inline-flex items-center gap-2 px-3.5 py-1.5 rounded-full bg-primary/[0.06] border border-primary/15 text-primary text-xs font-semibold tracking-wide shadow-sm",children:[e.jsx(ve,{className:"w-3.5 h-3.5 text-primary animate-pulse"}),i||"Beyond Keyword Screening"]})}),e.jsxs(A.h2,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.1},className:"text-3xl sm:text-5xl md:text-6xl font-black tracking-[-0.035em] text-slate-900 leading-[1.14]",children:[e.jsx("span",{className:"block text-slate-900",children:s||"Resumes in 2026?"}),e.jsx("span",{className:"block mt-1 sm:mt-2 text-transparent bg-clip-text bg-gradient-to-r from-violet-600 via-primary to-indigo-600 pb-1",children:l||"Still Shortlisting Like It’s 2010?"})]}),e.jsx(A.p,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.2},className:"text-slate-500 text-base sm:text-lg md:text-xl max-w-2xl mx-auto leading-relaxed font-normal",children:h||e.jsxs(e.Fragment,{children:["With AI, anyone can have a perfect resume—burying true talent in endless noise."," ",e.jsx("span",{className:"text-slate-800 font-semibold",children:"PyNyx builds a mirror of student learning"}),", shortlisting best-fit engineers based purely on their validated work."]})}),e.jsxs(A.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.5,delay:.3},className:"inline-flex items-center gap-2 px-3.5 py-1.5 rounded-full bg-violet-50/90 border border-violet-200/80 text-violet-700 text-xs font-medium shadow-xs select-none backdrop-blur-xs cursor-grab active:cursor-grabbing",onPointerDown:T,onPointerMove:r,onPointerUp:c,children:[e.jsx(rr,{className:"w-3.5 h-3.5 text-violet-600 animate-spin",style:{animationDuration:"12s"}}),e.jsx("span",{children:"3D Vector Space"}),e.jsx("span",{className:"text-violet-400",children:"•"}),e.jsx("span",{className:"text-slate-500 font-normal",children:"Click & drag center to rotate in 3D"})]})]}),e.jsx(A.div,{initial:{opacity:0,scale:.98},whileInView:{opacity:1,scale:1},viewport:{once:!0},transition:{duration:.7,delay:.15},className:"relative w-full overflow-hidden",children:e.jsx("div",{className:"w-full relative overflow-hidden select-none",children:e.jsxs("svg",{viewBox:"0 0 1000 680",className:"w-full h-auto drop-shadow-sm",style:{minHeight:"520px"},children:[e.jsxs("defs",{children:[e.jsx("filter",{id:"light-glow-purple",x:"-50%",y:"-50%",width:"200%",height:"200%",children:e.jsx("feDropShadow",{dx:"0",dy:"4",stdDeviation:"8",floodColor:"#8b5cf6",floodOpacity:"0.3"})}),e.jsx("filter",{id:"light-glow-cyan",x:"-50%",y:"-50%",width:"200%",height:"200%",children:e.jsx("feDropShadow",{dx:"0",dy:"4",stdDeviation:"8",floodColor:"#0284c7",floodOpacity:"0.3"})}),e.jsx("filter",{id:"light-glow-amber",x:"-50%",y:"-50%",width:"200%",height:"200%",children:e.jsx("feDropShadow",{dx:"0",dy:"4",stdDeviation:"8",floodColor:"#d97706",floodOpacity:"0.3"})}),e.jsx("filter",{id:"card-shadow",x:"-10%",y:"-10%",width:"120%",height:"130%",children:e.jsx("feDropShadow",{dx:"0",dy:"6",stdDeviation:"12",floodColor:"#0f172a",floodOpacity:"0.06"})}),e.jsx("filter",{id:"badge-shadow",x:"-20%",y:"-20%",width:"140%",height:"140%",children:e.jsx("feDropShadow",{dx:"0",dy:"8",stdDeviation:"14",floodColor:"#8b5cf6",floodOpacity:"0.15"})}),e.jsxs("linearGradient",{id:"light-path-github",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[e.jsx("stop",{offset:"0%",stopColor:"#9333ea"}
8),e.jsx("stop",{offset:"50%",stopColor:"#a855f7"}),e.jsx("stop",{offset:"100%",stopColor:"#6366f1"})]}),e.jsxs("linearGradient",{id:"light-path-problem",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[e.jsx("stop",{offset:"0%",stopColor:"#4f46e5"}),e.jsx("stop",{offset:"50%",stopColor:"#818cf8"}),e.jsx("stop",{offset:"100%",stopColor:"#0284c7"})]}),e.jsxs("linearGradient",{id:"light-path-google",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[e.jsx("stop",{offset:"0%",stopColor:"#a855f7"}),e.jsx("stop",{offset:"60%",stopColor:"#ec4899"}),e.jsx("stop",{offset:"100%",stopColor:"#9333ea"})]}),e.jsxs("linearGradient",{id:"light-path-microsoft",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[e.jsx("stop",{offset:"0%",stopColor:"#0284c7"}),e.jsx("stop",{offset:"60%",stopColor:"#2563eb"}),e.jsx("stop",{offset:"100%",stopColor:"#0284c7"})]}),e.jsxs("linearGradient",{id:"light-path-amazon",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[e.jsx("stop",{offset:"0%",stopColor:"#f43f5e"}),e.jsx("stop",{offset:"50%",stopColor:"#f97316"}),e.jsx("stop",{offset:"100%",stopColor:"#d97706"})]}),e.jsxs("radialGradient",{id:"light-disc-surface",cx:"50%",cy:"50%",r:"50%",children:[e.jsx("stop",{offset:"0%",stopColor:"#ede9fe",stopOpacity:"0.75"}),e.jsx("stop",{offset:"60%",stopColor:"#f1f5f9",stopOpacity:"0.45"}),e.jsx("stop",{offset:"100%",stopColor:"#ffffff",stopOpacity:"0.1"})]}),e.jsxs("radialGradient",{id:"light-orb-magenta",cx:"30%",cy:"30%",r:"70%",children:[e.jsx("stop",{offset:"0%",stopColor:"#ffffff"}),e.jsx("stop",{offset:"30%",stopColor:"#f472b6"}),e.jsx("stop",{offset:"70%",stopColor:"#db2777"}),e.jsx("stop",{offset:"100%",stopColor:"#9d174d"})]}),e.jsxs("radialGradient",{id:"light-orb-cyan",cx:"30%",cy:"30%",r:"70%",children:[e.jsx("stop",{offset:"0%",stopColor:"#ffffff"}),e.jsx("stop",{offset:"30%",stopColor:"#38bdf8"}),e.jsx("stop",{offset:"70%",stopColor:"#0284c7"}),e.jsx("stop",{offset:"100%",stopColor:"#0369a1"})]}),e.jsxs("radialGradient",{id:"light-orb-amber",cx:"30%",cy:"30%",r:"70%",children:[e.jsx("stop",{offset:"0%",stopColor:"#ffffff"}),e.jsx("stop",{offset:"30%",stopColor:"#fbbf24"}),e.jsx("stop",{offset:"70%",stopColor:"#d97706"}),e.jsx("stop",{offset:"100%",stopColor:"#b45309"})]}),e.jsxs("radialGradient",{id:"light-orb-purple",cx:"30%",cy:"30%",r:"70%",children:[e.jsx("stop",{offset:"0%",stopColor:"#ffffff"}),e.jsx("stop",{offset:"30%",stopColor:"#c084fc"}),e.jsx("stop",{offset:"70%",stopColor:"#7c3aed"}),e.jsx("stop",{offset:"100%",stopColor:"#5b21b6"})]})]}),e.jsxs("g",{className:"cursor-pointer",children:[e.jsx("path",{d:"M 285, 175 C 345, 175, 345, 300, 420, 300",fill:"none",stroke:"#c084fc",strokeWidth:"7",strokeLinecap:"round",opacity:o==="github"?"0.45":"0.2"}),e.jsx("path",{d:"M 285, 175 C 345, 175, 345, 300, 420, 300",fill:"none",stroke:"url(#light-path-github)",strokeWidth:"3.5",strokeLinecap:"round",opacity:o==="github"?"1":"0.85"}),e.jsxs("g",{children:[e.jsx("ellipse",{rx:"9",ry:"3.5",fill:"#c084fc",opacity:"0.4",filter:"url(#light-glow-purple)"}),e.jsx("ellipse",{rx:"5",ry:"2",fill:"#e9d5ff",opacity:"0.9"}),e.jsx("animateMotion",{dur:"3.2s",repeatCount:"indefinite",rotate:"auto",path:"M 285, 175 C 345, 175, 345, 300, 420, 300"}),e.jsx("animate",{attributeName:"opacity",values:"0; 1; 1; 0",keyTimes:"0; 0.12; 0.88; 1",dur:"3.2s",repeatCount:"indefinite"})]})]}),e.jsxs("g",{className:"cursor-pointer",children:[e.jsx("path",{d:"M 285, 435 C 330, 435, 340, 385, 410, 385",fill:"none",stroke:"#818cf8",strokeWidth:"7",strokeLinecap:"round",opacity:o==="problem"?"0.45":"
80.2"}),e.jsx("path",{d:"M 285, 435 C 330, 435, 340, 385, 410, 385",fill:"none",stroke:"url(#light-path-problem)",strokeWidth:"3.5",strokeLinecap:"round",opacity:o==="problem"?"1":"0.85"}),e.jsxs("g",{children:[e.jsx("ellipse",{rx:"9",ry:"3.5",fill:"#818cf8",opacity:"0.4",filter:"url(#light-glow-cyan)"}),e.jsx("ellipse",{rx:"5",ry:"2",fill:"#c7d2fe",opacity:"0.9"}),e.jsx("animateMotion",{dur:"2.8s",repeatCount:"indefinite",rotate:"auto",path:"M 285, 435 C 330, 435, 340, 385, 410, 385"}),e.jsx("animate",{attributeName:"opacity",values:"0; 1; 1; 0",keyTimes:"0; 0.12; 0.88; 1",dur:"2.8s",repeatCount:"indefinite"})]})]}),e.jsxs("g",{className:"cursor-pointer",children:[e.jsx("path",{d:"M 590, 335 C 670, 335, 720, 305, 804, 305",fill:"none",stroke:"#f472b6",strokeWidth:"7",strokeLinecap:"round",opacity:o==="google"?"0.5":"0.2"}),e.jsx("path",{d:"M 590, 335 C 670, 335, 720, 305, 804, 305",fill:"none",stroke:"url(#light-path-google)",strokeWidth:"3.5",strokeLinecap:"round",opacity:o==="google"?"1":"0.85"}),e.jsxs("g",{children:[e.jsx("ellipse",{rx:"9",ry:"3.5",fill:"#f472b6",opacity:"0.45",filter:"url(#light-glow-purple)"}),e.jsx("ellipse",{rx:"5",ry:"2",fill:"#fce7f3",opacity:"0.9"}),e.jsx("animateMotion",{dur:"3s",repeatCount:"indefinite",rotate:"auto",path:"M 590, 335 C 670, 335, 720, 305, 804, 305"}),e.jsx("animate",{attributeName:"opacity",values:"0; 1; 1; 0",keyTimes:"0; 0.12; 0.88; 1",dur:"3s",repeatCount:"indefinite"})]})]}),e.jsxs("g",{className:"cursor-pointer",children:[e.jsx("path",{d:"M 610, 420 C 685, 420, 730, 420, 804, 420",fill:"none",stroke:"#38bdf8",strokeWidth:"7",strokeLinecap:"round",opacity:o==="microsoft"?"0.5":"0.2"}),e.jsx("path",{d:"M 610, 420 C 685, 420, 730, 420, 804, 420",fill:"none",stroke:"url(#light-path-microsoft)",strokeWidth:"3.5",strokeLinecap:"round",opacity:o==="microsoft"?"1":"0.85"}),e.jsxs("g",{children:[e.jsx("ellipse",{rx:"9",ry:"3.5",fill:"#38bdf8",opacity:"0.45",filter:"url(#light-glow-cyan)"}),e.jsx("ellipse",{rx:"5",ry:"2",fill:"#e0f2fe",opacity:"0.9"}),e.jsx("animateMotion",{dur:"2.7s",repeatCount:"indefinite",rotate:"auto",path:"M 610, 420 C 685, 420, 730, 420, 804, 420"}),e.jsx("animate",{attributeName:"opacity",values:"0; 1; 1; 0",keyTimes:"0; 0.12; 0.88; 1",dur:"2.7s",repeatCount:"indefinite"})]})]}),e.jsxs("g",{className:"cursor-pointer",children:[e.jsx("path",{d:"M 585, 505 C 670, 505, 720, 535, 804, 535",fill:"none",stroke:"#fbbf24",strokeWidth:"7",strokeLinecap:"round",opacity:o==="amazon"?"0.5":"0.2"}),e.jsx("path",{d:"M 585, 505 C 670, 505, 720, 535, 804, 535",fill:"none",stroke:"url(#light-path-amazon)",strokeWidth:"3.5",strokeLinecap:"round",opacity:o==="amazon"?"1":"0.85"}),e.jsxs("g",{children:[e.jsx("ellipse",{rx:"9",ry:"3.5",fill:"#fbbf24",opacity:"0.45",filter:"url(#light-glow-amber)"}),e.jsx("ellipse",{rx:"5",ry:"2",fill:"#fef3c7",opacity:"0.9"}),e.jsx("animateMotion",{dur:"3.4s",repeatCount:"indefinite",rotate:"auto",path:"M 585, 505 C 670, 505, 720, 535, 804, 535"}),e.jsx("animate",{attributeName:"opacity",values:"0; 1; 1; 0",keyTimes:"0; 0.12; 0.88; 1",dur:"3.4s",repeatCount:"indefinite"})]})]}),e.jsxs("g",{id:"memory-network-3d",className:"select-none",children:[e.jsx("rect",{x:"320",y:"180",width:"360",height:"400",fill:"transparent",className:"cursor-grab active:cursor-grabbing pointer-events-auto",onPointerDown:T,onPointerMove:r,onPointerUp:c,onMouseEnter:()=>g(!0),onMouseLeave:()=>{g(!1),f.current=!1}}),e.jsx("path",{d:I,fill:"none",stroke:"rgba(139, 92, 246, 0.26)",strokeWidth:"1.2",strokeDasharray:"5,4"}),e.jsx("path",{d:_,fill:"none",stroke:"rgba(56, 189, 248, 0.2)",strokeWidth:"1.1",strokeDasharray:"4,4"}),e.jsxs("g",{opacity:"0.6",children:[e.jsx("line",{x1:ze,y1:Ce,x2:q.x,y2:q.y,stroke:"rgba(124, 58, 237, 0.35)",strokeWidth:"1",strokeDasharray:"3,3"}),e.jsx("circle",{cx:q.x,cy:q.y,r:"2",fill:"#7c3aed"}),e.jsx("text",{x:q.x+6,y:q.y+3,fontSize:"6",fontWeight:"700",fill:"#7c3aed",children:"d₁"}),e.jsx("line",{x1:ze,y1:Ce,x2:F.x,y2:F.y,stroke:"rgba(14, 165, 233, 0.35)",strokeWidth:"1",strokeDasharray:"3,3"}),e.jsx("circle",{cx:F.x,cy:F.y,r:"2",fill:"#0284c7"}),e.jsx("text",{x:F.x,y:F.y-4,textAnchor:"middle",fontSize:"6",fontWeight:"700",fill:"#0284c7",children:"d₂"}),e.jsx("line",{x1:ze,y1:Ce,x2:O.x,y2:O.y,stroke:"rgba(219, 39, 119, 0.35)",strokeWidth:"1",strokeDasharray:"3,3"}),e.jsx("circle",{cx:O.x,cy:O.y,r:"2",fill:"#db2777"}),e.jsx("text",{x:O.x-6,y:O.y+4,textAnchor:"end",fontSize:"6",fontWeight:"700",fill:"#db2777",children:"d₃"})]}),Js.map(([y,E],C)=>{const $=k.map[y],R=k.map[E];return!$||!R||($.projZ+R.projZ)/2<=0?null:e.jsx("line",{x1:$.projX,y1:$.projY,x2:R.projX,y2:R.projY,stroke:"rgba(124, 58, 237, 0.1)",strokeWidth:"0.8",strokeDasharray:"3,3"},`sim-bg-${C}`)}),Y.map(y=>e.jsx("line",{x1:ze,y1:Ce,x2:y.projX,y2:y.projY,stroke:"rgba(139, 92, 246, 0.12)",strokeWidth:"0.9"},`orig-edge-bg-${y.id}`)),Y.map(y=>y.evidenceProjected.map((E,C)=>e.jsxs("g",{children:[e.jsx("line",{x1:y.projX,y1:y.projY,x2:E.projX,y2:E.projY,stroke:"rgba(139, 92, 246, 0.1)",strokeWidth:"0.6"}
8),e.jsx("circle",{cx:E.projX,cy:E.projY,r:E.projR,fill:E.color,opacity:E.opacity})]},`bg-ev-${y.id}-${C}`))),Y.map(y=>e.jsxs("g",{opacity:y.opacity,children:[e.jsx("circle",{cx:y.projX,cy:y.projY,r:y.radius,fill:`url(#${y.colorGrad})`,filter:`url(#${y.glowFilter})`}),e.jsx("text",{x:y.projX,y:y.projY+y.radius+9*y.scale,textAnchor:"middle",fill:"#64748b",fontSize:Math.max(5.5,7*y.scale),fontWeight:"600",opacity:y.opacity*.9,children:y.name}),y.badge&&e.jsxs("g",{opacity:y.opacity,children:[e.jsx("circle",{cx:y.projX+y.radius*.72,cy:y.projY-y.radius*.72,r:Math.max(4.2,5.8*y.scale),fill:y.badgeColor||"#7c3aed"}),e.jsx("text",{x:y.projX+y.radius*.72,y:y.projY-y.radius*.72+1.8*y.scale,textAnchor:"middle",fill:"white",fontSize:Math.max(3.6,4.6*y.scale),fontWeight:"700",children:y.badge})]})]},`bg-node-${y.id}`)),e.jsxs("g",{id:"center-student-mental-model",children:[e.jsxs("circle",{cx:ze,cy:Ce,r:"38",fill:"none",stroke:"rgba(139, 92, 246, 0.22)",strokeWidth:"1.5",children:[e.jsx("animate",{attributeName:"r",values:"38; 43; 38",dur:"3s",repeatCount:"indefinite"}),e.jsx("animate",{attributeName:"opacity",values:"0.65; 0.25; 0.65",dur:"3s",repeatCount:"indefinite"})]}),e.jsx("circle",{cx:ze,cy:Ce,r:"28",fill:"url(#light-disc-surface)",filter:"url(#light-glow-purple)",opacity:"0.6"}),e.jsx("circle",{cx:ze,cy:Ce,r:"24",fill:"url(#light-orb-purple)",filter:"url(#light-glow-purple)",children:e.jsx("animate",{attributeName:"r",values:"24; 25.5; 24",dur:"2.8s",repeatCount:"indefinite"})}),e.jsx("circle",{cx:ze-4,cy:Ce-5,r:"6",fill:"white",opacity:"0.45"}),e.jsxs("text",{x:ze,y:Ce-3,textAnchor:"middle",fill:"white",fontSize:"5.4",fontWeight:"800",letterSpacing:"0.2",style:{pointerEvents:"none"},children:["Student",e.jsx("tspan",{x:ze,y:Ce+5,fontSize:"4.8",children:"Mental Model"})]})]}),Js.map(([y,E],C)=>{const $=k.map[y],R=k.map[E];return!$||!R||($.projZ+R.projZ)/2>0?null:e.jsx("line",{x1:$.projX,y1:$.projY,x2:R.projX,y2:R.projY,stroke:"rgba(124, 58, 237, 0.16)",strokeWidth:"0.9",strokeDasharray:"3,3"},`sim-fg-${C}`)}),te.map(y=>e.jsx("line",{x1:ze,y1:Ce,x2:y.projX,y2:y.projY,stroke:"rgba(139, 92, 246, 0.22)",strokeWidth:"1.1"},`orig-edge-fg-${y.id}`)),te.map(y=>y.evidenceProjected.map((E,C)=>e.jsxs("g",{children:[e.jsx("line",{x1:y.projX,y1:y.projY,x2:E.projX,y2:E.projY,stroke:"rgba(139, 92, 246, 0.18)",strokeWidth:"0.75"}),e.jsx("circle",{cx:E.projX,cy:E.projY,r:E.projR,fill:E.color,opacity:E.opacity})]},`fg-ev-${y.id}-${C}`))),te.map(y=>e.jsxs("g",{opacity:y.opacity,children:[e.jsx("circle",{cx:y.projX,cy:y.projY,r:y.radius,fill:`url(#${y.colorGrad})`,filter:`url(#${y.glowFilter})`}),e.jsx("text",{x:y.projX,y:y.projY+y.radius+10*y.scale,textAnchor:"middle",fill:"#334155",fontSize:Math.max(6,7.4*y.scale),fontWeight:"700",opacity:y.opacity,children:y.name}),y.badge&&e.jsxs("g",{opacity:y.opacity,children:[e.jsx("circle",{cx:y.projX+y.radius*.72,cy:y.projY-y.radius*.72,r:Math.max(4.6,6.4*y.scale),fill:y.badgeColor||"#7c3aed"}),e.jsx("text",{x:y.projX+y.radius*.72,y:y.projY-y.radius*.72+2*y.scale,textAnchor:"middle",fill:"white",fontSize:Math.max(3.8,4.8*y.scale),fontWeight:"700",children:y.badge})]})]},`fg-node-${y.id}`)),e.jsxs("g",{id:"network-label",children:[e.jsx("text",{x:"500",y:"590",textAnchor:"middle",fill:"#0f172a",fontSize:"20",fontWeight:"800",letterSpacing:"-0.3",children:"Dynamic Memory node network"}),e.jsx("text",{x:"500",y:"615",textAnchor:"middle",fill:"#64748b",fontSize:"13",fontWeight:"600",letterSpacing:"0.2",children:"(mirrored student learning)"})]})]}),e.jsxs("g",{id:"card-github",className:"transition-all duration-300 cursor-pointer",onMouseEnter:()=>m("github"),onMouseLeave:()=>m(null),children:[e.jsx("rect",{x:"60",y:"70",width:"225",height:"210",rx:"20",fill:"#ffffff",stroke:o==="github"?"#8b5cf6":"rgba(226, 232, 240, 0.9)",strokeWidth:o==="github"?"2":"1.2",filter:o==="github"?"url(#light-glow-purple)":"url(#card-shadow)"}),e.jsx("rect",{x:"80",y:"90",width:"38",height:"38",rx:"12",fill:"#f5f3ff",stroke:"#ddd6fe",strokeWidth:"1"}),e.jsx("path",{d:"M99 97C94.03 97 90 101.03 90 106C90 109.98 92.58 113.35 96.16 114.54C96.61 114.62 96.7
87 114.35 96.77 114.11C96.77 113.9 96.76 113.19 96.76 112.37C94.26 112.91 93.73 111.27 93.73 111.27C93.32 110.23 92.73 109.95 92.73 109.95C91.92 109.39 92.79 109.41 92.79 109.41C93.69 109.47 94.16 110.33 94.16 110.33C94.96 111.7 96.26 111.3 96.78 111.07C96.86 110.49 97.09 110.09 97.35 109.86C95.35 109.64 93.25 108.87 93.25 105.42C93.25 104.44 93.6 103.63 94.18 103C94.08 102.77 93.78 101.86 94.27 100.64C94.27 100.64 95.02 100.4 96.74 101.56C97.45 101.36 98.21 101.26 98.97 101.26C99.73 101.26 100.49 101.36 101.2 101.56C102.92 100.4 103.67 100.4 103.67 100.4C104.16 101.86 103.86 102.77 103.77 103C104.35 103.63 104.69 104.44 104.69 105.42C104.69 108.88 102.58 109.63 100.58 109.85C100.9 110.13 101.19 110.68 101.19 111.52C101.19 112.73 101.18 113.7 101.18 114.11C101.18 114.35 101.34 114.63 101.8 114.54C105.37 113.34 107.95 109.97 107.95 106C107.95 101.03 103.92 97 99 97Z",fill:"#7c3aed"}),e.jsx("text",{x:"80",y:"147",fill:"#0f172a",fontSize:"15",fontWeight:"700",children:"GitHub Projects"}),e.jsxs("g",{transform:"translate(80, 166)",fontSize:"12",fontWeight:"600",fill:"#475569",children:[e.jsx("circle",{cx:"4",cy:"5",r:"4.5",fill:"#9333ea"}),e.jsx("text",{x:"17",y:"9",children:"Web App"}),e.jsx("line",{x1:"0",y1:"18",x2:"185",y2:"18",stroke:"#f1f5f9",strokeWidth:"1"}),e.jsx("circle",{cx:"4",cy:"27",r:"4.5",fill:"#0284c7"}),e.jsx("text",{x:"17",y:"31",children:"AI/ML Project"}),e.jsx("line",{x1:"0",y1:"40",x2:"185",y2:"40",stroke:"#f1f5f9",strokeWidth:"1"}),e.jsx("circle",{cx:"4",cy:"49",r:"4.5",fill:"#16a34a"}),e.jsx("text",{x:"17",y:"53",children:"Open Source"}),e.jsx("line",{x1:"0",y1:"62",x2:"185",y2:"62",stroke:"#f1f5f9",strokeWidth:"1"}),e.jsx("circle",{cx:"4",cy:"71",r:"4.5",fill:"#d97706"}),e.jsx("text",{x:"17",y:"75",children:"Contributions"})]})]}),e.jsxs("g",{id:"card-problem",className:"transition-all duration-300 cursor-pointer",onMouseEnter:()=>m("problem"),onMouseLeave:()=>m(null),children:[e.jsx("rect",{x:"60",y:"330",width:"225",height:"210",rx:"20",fill:"#ffffff",stroke:o==="problem"?"#4f46e5":"rgba(226, 232, 240, 0.9)",strokeWidth:o==="problem"?"2":"1.2",filter:o==="problem"?"url(#light-glow-cyan)":"url(#card-shadow)"}),e.jsx("rect",{x:"80",y:"350",width:"38",height:"38",rx:"12",fill:"#eff6ff",stroke:"#bfdbfe",strokeWidth:"1"}),e.jsxs("g",{transform:"translate(90, 360)",stroke:"#2563eb",strokeWidth:"1.8",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M9.5 2A2.5 2.5 0 0 1 12 4.5v11a2.5 2.5 0 0 1-4.96.44 2.5 2.5 0 0 1-2.96-3.08 3 3 0 0 1-.34-5.58 2.5 2.5 0 0 1 1.32-4.24 2.5 2.5 0 0 1 4.44-1.04"}),e.jsx("path",{d:"M14.5 2A2.5 2.5 0 0 0 12 4.5v11a2.5 2.5 0 0 0 4.96.44 2.5 2.5 0 0 0 2.96-3.08 3 3 0 0 0 .34-5.58 2.5 2.5 0 0 0-1.32-4.24 2.5 2.5 0 0 0-4.44-1.04"})]}),e.jsx("text",{x:"80",y:"407",fill:"#0f172a",fontSize:"15",fontWeight:"700",children:"Problem Solving"}),e.jsxs("g",{transform:"translate(80, 426)",fontSize:"12",fontWeight:"600",fill:"#475569",children:[e.jsx("circle",{cx:"4",cy:"5",r:"4.5",fill:"#9333ea"}),e.jsx("text",{x:"17",y:"9",children:"DSA Practice"}),e.jsx("line",{x1:"0",y1:"18",x2:"185",y2:"18",stroke:"#f1f5f9",strokeWidth:"1"}),e.jsx("circle",{cx:"4",cy:"27",r:"4.5",fill:"#0284c7"}),e.jsx("text",{x:"17",y:"31",children:"Code Challenges"}),e.jsx("line",{x1:"0",y1:"40",x2:"185",y2:"40",stroke:"#f1f5f9",strokeWidth:"1"}),e.jsx("circle",{cx:"4",cy:"49",r:"4.5",fill:"#16a34a"}),e.jsx("text",{x:"17",y:"53",children:"Hackathons"}),e.jsx("line",{x1:"0",y1:"62",x2:"185",y2:"62",stroke:"#f1f5f9",strokeWidth:"1"}),e.jsx("circle",{cx:"4",cy:"71",r:"4.5",fill:"#d97706"}),e.jsx("text",{x:"17",y:"75",children:"Real-world Scenarios"})]})]}),e.jsxs("g",{id:"card-recruiters",className:"transition-all duration-300 cursor-pointer",onMouseEnter:()=>m("recruiters"),onMouseLeave:()=>m(null),children:[e.jsx("rect",{x:"715",y:"20",width:"225",height:"205",rx:"20",fill:"#ffffff",stroke:o==="recruiters"?"#4f46e5":"rgba(226, 232, 240, 0.9)",strokeWidth:o==="recruiters"?"2":"1.2",filter:o==="recruiters"?"url(#light-glow-purple)":"url(#card-shadow)"}
8),e.jsx("rect",{x:"735",y:"38",width:"38",height:"38",rx:"12",fill:"#eef2ff",stroke:"#c7d2fe",strokeWidth:"1"}),e.jsxs("g",{transform:"translate(745, 48)",stroke:"#4f46e5",strokeWidth:"1.8",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z"}),e.jsx("path",{d:"M6 12H4a2 2 0 0 0-2 2v8h4"}),e.jsx("path",{d:"M18 9h2a2 2 0 0 1 2 2v11h-4"}),e.jsx("path",{d:"M10 6h4"}),e.jsx("path",{d:"M10 10h4"}),e.jsx("path",{d:"M10 14h4"}),e.jsx("path",{d:"M10 18h4"})]}),e.jsx("text",{x:"735",y:"95",fill:"#0f172a",fontSize:"15",fontWeight:"700",children:u}),e.jsxs("g",{transform:"translate(735, 114)",fontSize:"12",fontWeight:"600",fill:"#475569",children:[e.jsx("circle",{cx:"4",cy:"5",r:"4.5",fill:"#9333ea"}),e.jsx("text",{x:"17",y:"9",children:"Top Talent"}),e.jsx("line",{x1:"0",y1:"18",x2:"185",y2:"18",stroke:"#f1f5f9",strokeWidth:"1"}),e.jsx("circle",{cx:"4",cy:"27",r:"4.5",fill:"#0284c7"}),e.jsx("text",{x:"17",y:"31",children:"Relevant Skills"}),e.jsx("line",{x1:"0",y1:"40",x2:"185",y2:"40",stroke:"#f1f5f9",strokeWidth:"1"}),e.jsx("circle",{cx:"4",cy:"49",r:"4.5",fill:"#16a34a"}),e.jsx("text",{x:"17",y:"53",children:"Project Fit"}),e.jsx("line",{x1:"0",y1:"62",x2:"185",y2:"62",stroke:"#f1f5f9",strokeWidth:"1"}),e.jsx("circle",{cx:"4",cy:"71",r:"4.5",fill:"#d97706"}),e.jsx("text",{x:"17",y:"75",children:"Problem Solving Strength"})]})]}),e.jsxs("g",{id:"badge-google",className:"transition-all duration-300 cursor-pointer",onMouseEnter:()=>m("google"),onMouseLeave:()=>m(null),children:[e.jsx("circle",{cx:"865",cy:"305",r:"52",fill:"#ffffff",stroke:o==="google"?"#db2777":"rgba(147, 51, 234, 0.45)",strokeWidth:o==="google"?"3":"2",filter:"url(#badge-shadow)"}),e.jsx("circle",{cx:"865",cy:"305",r:"48",fill:"none",stroke:"#fdf2f8",strokeWidth:"2"}),e.jsxs("g",{transform:"translate(850, 285) scale(0.68)",children:[e.jsx("path",{d:"M44.5 20H24v8.5h11.8C34.7 33.9 30.1 37 24 37c-7.2 0-13-5.8-13-13s5.8-13 13-13c3.1 0 5.9 1.1 8.1 2.9l6.4-6.4C34.6 4.1 29.6 2 24 2 11.8 2 2 11.8 2 24s9.8 22 22 22c11 0 21-8 21-22 0-1.3-.2-2.7-.5-4z",fill:"#4285F4"}),e.jsx("path",{d:"M3.1 14.7l6.6 4.8C11.5 16 17.2 13 24 13c3.1 0 5.9 1.1 8.1 2.9l6.4-6.4C34.6 4.1 29.6 2 24 2 14.8 2 7 7.4 3.1 14.7z",fill:"#EA4335"}),e.jsx("path",{d:"M24 46c5.9 0 11.1-2 15-5.6l-6.9-5.6c-2.2 1.5-5 2.4-8.1 2.4-6.1 0-10.7-3.1-11.8-8.5L5.4 34C9.2 41.2 16.1 46 24 46z",fill:"#34A853"}),e.jsx("path",{d:"M45.5 24c0-1.3-.2-2.7-.5-4H24v8.5h11.8c-1 3.5-3.5 6.3-6.9 8.1l6.9 5.6C40 38.3 45.5 32 45.5 24z",fill:"#FBBC05"})]}),e.jsx("text",{x:"865",y:"336",textAnchor:"middle",fill:"#0f172a",fontSize:"13",fontWeight:"700",children:"Google"})]}),e.jsxs("g",{id:"badge-microsoft",className:"transition-all duration-300 cursor-pointer",onMouseEnter:()=>m("microsoft"),onMouseLeave:()=>m(null),children:[e.jsx("circle",{cx:"865",cy:"420",r:"52",fill:"#ffffff",stroke:o==="microsoft"?"#0284c7":"rgba(2, 132, 199, 0.45)",strokeWidth:o==="microsoft"?"3":"2",filter:"url(#badge-shadow)"}),e.jsx("circle",{cx:"865",cy:"420",r:"48",fill:"none",stroke:"#f0f9ff",strokeWidth:"2"}),e.jsxs("g",{transform:"translate(850, 400)",children:[e.jsx("rect",{x:"0",y:"0",width:"13",height:"13",fill:"#F25022",rx:"1.5"}),e.jsx("rect",{x:"16",y:"0",width:"13",height:"13",fill:"#7FBA00",rx:"1.5"}),e.jsx("rect",{x:"0",y:"16",width:"13",height:"13",fill:"#00A4EF",rx:"1.5"}),e.jsx("rect",{x:"16",y:"16",width:"13",height:"13",fill:"#FFB900",rx:"1.5"})]}),e.jsx("text",{x:"865",y:"451",textAnchor:"middle",fill:"#0f172a",fontSize:"13",fontWeight:"700",children:"Microsoft"})]}),e.jsxs("g",{id:"badge-amazon",className:"transition-all duration-300 cursor-pointer",onMouseEnter:()=>m("amazon"),onMouseLeave:()=>m(null),children:[e.jsx("circle",{cx:"865",cy:"535",r:"52",fill:"#ffffff",stroke:o==="amazon"?"#ea580c":"rgba(217, 119, 6, 0.45)",strokeWidth:o==="amazon"?"3":"2",filter:"url(#badge-shadow)"}),e.jsx("circle",{cx:"865",cy:"535",r:"48",fill:"none",stroke:"#fffbeb",strokeWidth:"2"}),e.jsxs("g",{transform:"translate(853, 513) scale(0.65)",children:[e.jsx("path",{d:"M17.5 24.5C14.2 24.5 11.5 23 11.5 19.5C11.5 15.5 14.5 14 19 14C21.5 14 23.5 14.5 24.5 15.2V13.8C24.5 10.8 22.5 9.5 19 9.5C16 9.5 13.5 10.5 12 11.5L10 8.5C12.5 7 15.8 6 19.5 6C25.5 6 29 8.8 29 14V24H24.5V22.2C23 23.8 20.5 24.5 17.5 24.5ZM19 21.2C21.8 21.2 23.8 19.8 24.5 18.2V17C23.5 16.5 21.8 16 19.5 16C16.8 16 15.5 17 15.5 18.8C15.5 20.2 16.8 21.2 19 21.2Z",fill:"#0f172a"}),e.jsx("path",{d:"M2.5 30C12 37 28 37 37.5 30M35 28L38.5 30.5L37.5 34",fill:"none",stroke:"#FF9900",strokeWidth:"3.2",strokeLinecap:"round",strokeLinejoin:"round"})]}),e.jsx("text",{x:"865",y:"566",textAnchor:"middle",fill:"#0f172a",fontSize:"13",fontWeight:"700",children:"Amazon"})]})]})})})]})]})},Hn=[{icon:Ra,color:"text-rose-500 bg-rose-50 border-rose-100",textColor:"text-rose-600",
8stat:"68%",title:"Resume Fraud",desc:"Of candidate resumes contain exaggerated or fabricated technical skills, making initial screening highly unreliable."},{icon:La,color:"text-amber-500 bg-amber-50 border-amber-100",textColor:"text-amber-600",stat:"75%",title:"Keyword Gaming",desc:"Of qualified developers are filtered out by traditional keyword-based ATS search systems, while skilled 'game-players' pass."},{icon:Fa,color:"text-indigo-500 bg-indigo-50 border-indigo-100",textColor:"text-indigo-600",stat:"42 Days",title:"Slow Pipeline",desc:"Is the average time it takes to hire a software engineer, with recruiters spending hours in manual vetting and phone screens."}],Vn=()=>e.jsx("section",{className:"relative py-12 sm:py-20 lg:py-24 bg-transparent overflow-hidden border-t border-slate-100/40",children:e.jsxs("div",{className:"max-w-5xl mx-auto px-5 sm:px-6 relative z-10",children:[e.jsxs("div",{className:"text-center max-w-3xl mx-auto space-y-2 sm:space-y-4 mb-8 sm:mb-16",children:[e.jsx("span",{className:"text-[9px] sm:text-[10px] font-bold tracking-widest uppercase text-primary bg-primary/[0.06] border border-primary/10 px-2.5 py-1 sm:px-3 sm:py-1.5 rounded-full",children:"The Status Quo"}),e.jsxs("h2",{className:"text-xl sm:text-3xl md:text-5xl font-extrabold text-slate-900 tracking-[-0.02em] leading-tight",children:["Technical hiring is"," ",e.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-rose-500 to-amber-500",children:"fundamentally broken."})]}),e.jsx("p",{className:"text-slate-500 text-xs sm:text-sm md:text-base font-medium max-w-2xl mx-auto leading-relaxed",children:"Relying on self-reported resumes and keyword matches makes screening a numbers game, costing organizations time and top talent."})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 sm:gap-6 md:gap-8",children:Hn.map((t,i)=>{const s=t.icon;return e.jsx(A.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-100px"},transition:{duration:.5,delay:i*.15,ease:"easeOut"},className:"bg-white border border-slate-200/60 rounded-xl sm:rounded-2xl p-4 sm:p-6 shadow-sm hover:shadow-md transition-all duration-300 flex flex-col justify-between group hover:-translate-y-1",children:e.jsxs("div",{className:"space-y-2.5 sm:space-y-4",children:[e.jsx("div",{className:`w-8 h-8 sm:w-10 sm:h-10 rounded-lg sm:rounded-xl border flex items-center justify-center ${t.color}`,children:e.jsx(s,{className:"w-4 h-4 sm:w-5 sm:h-5"})}),e.jsx("div",{className:`text-2xl sm:text-4xl font-black tracking-tight group-hover:scale-105 transition-transform duration-300 origin-left ${t.textColor}`,children:e.jsx(rs,{value:t.stat})}),e.jsxs("div",{className:"space-y-1 sm:space-y-2",children:[e.jsx("h3",{className:"text-sm sm:text-lg font-bold text-slate-800 tracking-tight",children:t.title}),e.jsx("p",{className:"text-[11px] sm:text-sm text-slate-500 font-medium leading-relaxed",children:t.desc})]})]})},t.title)})})]})}),et=[{name:"Manindra Rongala",username:"rongalamanin",role:"Python Developer",score:"8.2",dsa:"33",repositories:33,techScore:"72",techMaturity:"Intermediate Fresher",techSummary:"This candidate is an emerging AI engineer who demonstrates significant technical growth, transitioning from basic proof-of-concept scripts to sophisticated, agentic RAG architectures. They possess a strong grasp of the modern LLM stack, including FastAPI, LangChain, and vector databases, and have begun incorporating professional practices like Pydantic validation and Pytest. While they require mentorship in production-grade engineering—specifically regarding CI/CD, robust error handling, and iterative development—their ability to architect complex, multi-agent workflows marks them as a highly promising junior engineer.",techStrengths:["Agentic AI & RAG Orchestration","Full-stack AI Integration (FastAPI/React)","Robust Data Modeling with Pydantic"],techWeaknesses:["Inconsistent iterative development (Big Bang commits)","Limited exposure to production-grade CI/CD and logging","Needs improvement in comprehensive error handling"],engStandards:["Uses Mermaid diagrams for architectural documentation","Implements asynchronous backend patterns"],dsaScore:"33",dsaPersonality:"The Precise Optimizer",dsaSummary:"This candidate demonstrates a high level of algorithmic maturity, consistently delivering optimal time and space complexity solutions with a strong emphasis on edge-case robustness. Their work ethic is exemplary, characterized by a 100% completion rate and minimal reliance on AI assistance, indicating a deep, independent grasp of core concepts. While they occasionally lean toward over-complicating logic, their ability to recover from errors quickly and maintain high code readability suggests they are a disciplined and highly capable engineer.",dsaSignals:["First-Principles Thinker","Resilient Debugger","Self-Reliant Engineer","Methodical Optimizer"],dsaStrengths:["Optimal Complexity Architect","Robust Edge-Case Handling","High-Autonomy Problem Solver"],dsaWeaknesses:["Tendency toward unnecessary logic complexity","Occasional decomposition overhead"],verdict:"Highly recommended for product teams requiring autonomy and rapid learning.",techStack:[{name:"Python",depth:8},{name:"FastAPI",depth:8},{name:"LangChain",depth:8},{name:"React",depth:7},{name:"FAISS",depth:7},{name:"Pydantic",depth:8}],topThinkingSignal:"Optimal Complexity Architect",topTechnicalSignal:"Agentic AI & RAG Orchestration",dateRecency:"8/6/2026",avatar:"https://images.unsplash.com/photo-1500648767791-00dcc994a43e?auto=format&fit=crop&w=256&q=80"},{name:"Rohit Allanki",username:"allankirohit",role:"C++ & System Engineer",score:"9.4",dsa:"54",repositories:24,techScore:"92",techMaturity:"Senior Systems Specialist",techSummary:"Rohit demonstrates exceptional low-level systems maturity. Codebase features manual assembly optimizations, lock-free queues, and cache-aligned memory boundaries.",techStrengths:["Cache-aligned memory layouts","Lock-free synchronization","Assembly optimization"],techWeaknesses:["Complex template abstraction overhead","Manual assembly validation"],engStandards:["Implements custom memory allocators","Enforces strict cache alignment checks"],dsaScore:"88",dsaPersonality:"Optimal Complexity Architect",dsaSummary:"High mathematical index and optimal Big-O scaling. Prefers manual memory mapping over standard library overhead.",dsaSignals:["First-Principles Thinker","Resilient Debugger","Self-Reliant Engineer"],dsaStrengths:["Manual pointer arithmetic","Concurrency primitives"],dsaWeaknesses:["Dynamic programming scaling efficiency"],verdict:"Highly recommended for c
8ore systems requiring microsecond-level latency boundaries.",techStack:[{name:"C++",depth:9},{name:"Rust",depth:8},{name:"POSIX",depth:9}],topThinkingSignal:"Optimal Complexity Architect",topTechnicalSignal:"Low-Level Performance Optimization",dateRecency:"8/12/2026",avatar:"https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?auto=format&fit=crop&w=256&q=80"},{name:"Karthik Virodhula",username:"virodhula_k",role:"Computer Vision & UI",score:"8.2",dsa:"33",repositories:18,techScore:"72",techMaturity:"Intermediate Fresher",techSummary:"Emerging developer showing strong aptitude for integrating complex computer vision libraries. Transitioning to independent building with solid React/Python integration skills.",techStrengths:["Real-time stream traversal","Canvas framebuffer bindings"],techWeaknesses:["Asynchronous state invalidation logic","Custom rendering package optimization"],engStandards:["Enforces clean component boundaries","Modular hooks architecture"],dsaScore:"33",dsaPersonality:"Heuristic Search Developer",dsaSummary:"Focuses on applied spatial search patterns, quadtree coordinate divisions, and image processing filters.",dsaSignals:["First-Principles Thinker","Resilient Debugger"],dsaStrengths:["Matrix transformations","Spatial grid partitioning"],dsaWeaknesses:["Dynamic programming recursion scaling"],verdict:"Strong fit for teams building rich media web experiences or real-time camera interfaces.",techStack:[{name:"Python",depth:8},{name:"React",depth:8},{name:"OpenCV",depth:7}],topThinkingSignal:"Heuristic Search Specialist",topTechnicalSignal:"Computer Vision Processing",dateRecency:"8/10/2026",avatar:"https://images.unsplash.com/photo-1539571696357-5a69c17a67c6?auto=format&fit=crop&w=256&q=80"}],Wn=[{num:"01",icon:Ba,title:"Post Requirements",desc:"Simply specify what skills, seniority, and repository patterns you are looking for."},{icon:Ts,num:"02",title:"Automated Deep-Scan",desc:"PyNyx scans candidates' repositories, runs AST complexity checks, and verifies code originality."},{icon:qe,num:"03",title:"Get Verified Matches",desc:"Receive pre-vetted scorecards containing verified stack, custom interview guides, and match rates."}],Gn=()=>{const[t,i]=a.useState(0),[s,l]=a.useState(!1),[h,u]=a.useState("technical");a.useEffect(()=>{if(s)return;const m=setInterval(()=>{i(b=>(b+1)%et.length),u("technical")},4500);return()=>clearInterval(m)},[s]);const o=m=>{m.stopPropagation(),i(b=>(b+1)%et.length)};return e.jsxs("section",{className:"relative py-12 sm:py-20 lg:py-24 bg-transparent overflow-hidden border-t border-slate-100/40",children:[e.jsx("div",{className:"absolute top-[20%] right-[-10%] w-[350px] h-[350px] bg-violet-500/[0.02] rounded-full blur-[80px] pointer-events-none"}),e.jsxs("div",{className:"max-w-5xl mx-auto px-5 sm:px-6 relative z-10",children:[e.jsxs("div",{className:"max-w-3xl mb-6 sm:mb-16",children:[e.jsx("span",{className:"text-[9px] sm:text-[10px] font-bold tracking-widest uppercase text-primary bg-primary/[0.06] border border-primary/10 px-2.5 py-1 sm:px-3 sm:py-1.5 rounded-full",children:"The Process"}),e.jsxs("h2",{className:"text-xl sm:text-3xl md:text-5xl font-extrabold text-slate-900 tracking-[-0.02em] leading-tight mt-3 sm:mt-4",children:["How it works:"," ",e.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-primary to-indigo-500",children:"Proof-based screening."})]}),e.jsx("p",{className:"text-slate-500 text-xs sm:text-sm md:text-base font-medium leading-relaxed mt-2 sm:mt-4",children:"In three steps, replace keyword guessing with automated codebase evaluations. Save hours of pre-screens and focus only on verified talent."})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1.2fr_1fr] gap-8 sm:gap-12 items-center",children:[e.jsxs("div",{className:"space-y-4 sm:space-y-10 relative",children:[e.jsx("div",{className:"absolute left-[27px] top-6 bottom-6 w-0.5 bg-slate-100 z-0 hidden sm:block"}),Wn.map((m,b)=>{const w=m.icon;return e.jsxs(A.div,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.5,delay:b*.15},className:"flex flex-row items-start gap-3 sm:gap-6 relative z-10 group",children:[e.jsx("div",{className:"w-10 h-10 sm:w-14 sm:h-14 roun
8ded-xl sm:rounded-2xl bg-slate-50 border border-slate-200/80 group-hover:border-primary/20 group-hover:bg-primary/[0.02] flex items-center justify-center text-slate-400 group-hover:text-primary transition-all duration-300 shrink-0 shadow-sm",children:e.jsx(w,{className:"w-4 h-4 sm:w-6 sm:h-6"})}),e.jsxs("div",{className:"space-y-0.5 sm:space-y-1.5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-[10px] sm:text-xs font-bold text-primary tracking-widest",children:m.num}),e.jsx("h3",{className:"text-sm sm:text-lg font-bold text-slate-800 tracking-tight",children:m.title})]}),e.jsx("p",{className:"text-[11px] sm:text-sm text-slate-500 font-medium leading-relaxed max-w-md",children:m.desc})]})]},m.num)})]}),e.jsxs("div",{className:"flex flex-col items-center mt-6 sm:mt-12 pt-4",children:[e.jsx("div",{className:"relative w-full max-w-[320px] sm:max-w-[390px] h-[480px] sm:h-[480px] lg:h-[550px] cursor-pointer select-none",onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),onClick:o,children:e.jsx(nt,{mode:"popLayout",children:et.map((m,b)=>{const w=(b-t+et.length)%et.length,d=w===0,g=w===1;return w>=3?null:e.jsxs(A.div,{style:{transformOrigin:"left center"},animate:{scale:d?1:g?.98:.96,x:d?0:g?24:48,y:0,zIndex:et.length-w,opacity:d?1:g?.9:.7,boxShadow:d?"0 20px 25px -5px rgb(0 0 0 / 0.15), 0 8px 10px -6px rgb(0 0 0 / 0.15)":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"},transition:{type:"spring",stiffness:260,damping:25},className:"absolute inset-0 bg-white border border-slate-200/60 rounded-xl sm:rounded-2xl p-4 sm:p-5 flex flex-col justify-between overflow-hidden shadow-sm text-left",children:[e.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 bg-primary/[0.02] blur-[30px] pointer-events-none"}),e.jsxs("div",{className:"flex items-center justify-between border-b border-slate-100 pb-3 mb-3 shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("img",{src:m.avatar,alt:m.name,className:"w-10 h-10 sm:w-12 sm:h-12 rounded-xl border border-slate-200 bg-slate-50 object-cover",onError:f=>{f.target.src=`https://api.dicebear.com/7.x/initials/svg?seed=${m.name}`}}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs sm:text-sm font-extrabold text-slate-900 leading-tight",children:m.name}),e.jsxs("p",{className:"text-[10px] sm:text-xs text-slate-400 font-semibold mt-0.5",children:["@",m.username]})]})]}),e.jsxs("div",{className:"flex gap-2 font-mono",children:[e.jsxs("div",{className:"bg-slate-50 border border-slate-200/60 rounded-lg px-2 py-1 text-center shrink-0",children:[e.jsx("span",{className:"text-[8px] font-bold text-slate-400 uppercase tracking-wider block leading-none mb-0.5",children:"Score"}),e.jsx("span",{className:"text-[11px] sm:text-xs font-black text-emerald-600",children:m.score})]}),e.jsxs("div",{className:"bg-slate-50 border border-slate-200/60 rounded-lg px-2 py-1 text-center shrink-0",children:[e.jsx("span",{className:"text-[8px] font-bold text-slate-400 uppercase tracking-wider block leading-none mb-0.5",children:"DSA"}),e.jsx("span",{className:"text-[11px] sm:text-xs font-black text-primary",children:m.dsa})]})]})]}),e.jsx("div",{className:"flex gap-1 bg-slate-100/80 p-0.5 rounded-lg mb-3 shrink-0 text-[10px] font-bold",children:[{id:"technical",label:"Technical Mastery"},{id:"dsa",label:"DSA Mastery"}].map(f=>e.jsx("button",{onClick:p=>{p.stopPropagation(),d&&u(f.id)},className:v("flex-1 py-1 rounded-md text-center transition-all",(d?h:"technical")===f.id?"bg-white text-primary shadow-sm":"text-slate-500 hover:text-slate-800"),children:f.label},f.id))}),"                      ",e.jsxs("div",{className:"flex-1 overflow-y-auto pr-0.5 scrollbar-thin space-y-4 min-h-[130px] sm:min-h-[150px] text-[11px] leading-relaxed",children:[(d?h:"technical")==="technical"&&e.jsxs("div",{className:"space-y-4 animate-in fade-in duration-200",children:[e.jsxs("div",{className:"flex items-center justify-between bg-slate-50 p-2 rounded-lg border border-slate-100 shrink-0",children:[e.jsx("span",{className:"font-bold text-slate-600",children:"Tech Mastery Rating"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"font-extrabold text-[#6D28D9]",children:[m.techScore,"/100"]}),e.jsx("span",{className:"font-black text-amber-600 uppercase tracking-wider text-[8px] bg-amber-50 px-1.5 py-0.5 rounded border border-amber-100",children:m.techMaturity})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("span",{className:"font-black text-[9px] text-slate-400 uppercase tracking-wider block font-bold",children:"Repository Intelligence"}),e.jsxs("p",{className:"text-slate-500 italic bg-slate-50/50 p-2 sm:p-2.5 rounded-lg border border-slate-100/60 leading-normal",children:['"',m.techSummary,'"']})]}),e.jsxs("div",{className:"hidden sm:grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("span",{className:"font-black text-[9px] text-emerald-600 uppercase tracking-wider block font-bold",children:"Technical Strengths"}),e.jsx("div",{className:"grid grid-cols-1 gap-1",children:m.techStrengths.map((f,p)=>e.jsxs("div",{className:"flex items-start gap-1 text-slate-600",children:[e.jsx("div",{className:"w-1 h-1 rounded-full bg-emerald-500 mt-1.5 shrink-0"}),e.jsx("span",{className:"leading-snug",children:f})]},p))})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("span",{className:"font-black text-[9px] text-amber-600 uppercase tracking-wider block font-bold font-bold",children:"Growth Areas"}),e.jsx("div",{className:"grid grid-cols-1 gap-1",children:m.techWeaknesses.map((f,p)=>e.jsxs("div",{className:"flex items-start gap-1 text-slate-600",children:[e.jsx("div",{className:"w-1 h-1 rounded-full bg-amber-500 mt-1.5 shrink-0"}),e.jsx("span",{className:"leading-snug",children:f})]},p))})]})]}),e.jsxs("div",{className:"hidden sm:block space-y-1.5 pt-1",children:[e.jsx("span",{className:"font-black text-[9px] text-slate-400 uppercase tracking-wider block font-bold",children:"Engineering Standards"}),e.jsx("div",{className:"grid grid-cols-1 gap-1.5",children:m.engStandards.map((f,p)=>e.jsxs("div",{className:"flex items-center gap-1.5 text-slate-600 bg-emerald-500/5 px-2.5 py-1.5 rounded-lg border border-emerald-500/10",children:[e.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0"}),e.jsx("span",{className:"leading-snug",children:f})]},p))})]})]}),(d?h:"technical")==="dsa"&&e.jsxs("div",{className:"space-y-4 animate-in fade-in duration-200",children:[e.jsxs("div",{className:"flex items-center justify-between bg-slate-50 p-2 rounded-lg border border-slate-100 shrink-0",children:[e.jsx("span",{className:"font-bold text-slate-600",children:"DSA Alignment Score"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"font-extrabold text-[#6D28D9]",children:[m.dsaScore,"/100"]}),e.jsx("span",{className:"font-black text-primary uppercase tracking-wider text-[8px] bg-purple-50 px-1.5 py-0.5 rounded border border-purple-100",children:m.dsaPersonality})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("span",{className:"font-black text-[9px] text-slate-400 uppercase tracking-wider block font-bold",children:"Mental Model Summary"}),e.jsxs("p",{className:"text-slate-500 italic bg-slate-50/50 p-2 sm:p-2.5 rounded-lg border border-slate-100/60 leading-normal",children:['"',m.dsaSummary,'"']})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("span",{className:"font-black text-[9px] text-slate-400 uppercase tracking-wider block font-bold",children:"Cognitive Signals"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:m.dsaSignals.map((f,p)=>e.jsx("span",{className:"px-2 py-0.5 bg-slate-100 border border-slate-200/50 rounded-md text-[9px] font-semibold text-slate-600",children:f},p))})]}),e.jsxs("div",{className:"hidden sm:grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("span",{className:"font-black text-[9px] text-emerald-600 uppercase tracking-wider block font-bold font-bold",children:"Cognitive Strengths"}),e.jsx("div",{className:"grid grid-cols-1 gap-1",children:m.dsaStrengths.map((f,p)=>e.jsxs("div",{className:"flex items-start gap-1 text-slate-600",children:[e.jsx("div",{className:"w-1 h-1 rounded-full bg-emerald-500 mt-1.5 shrink-0"}),e.jsx("span",{className:"leading-snug",children:f})]},p))})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("span",{className:"font-black text-[9px] text-amber-600 uppercase tracking-wider block font-bold font-bold",children:"Growth Opportunities"}),e.jsx("div",{className:"grid grid-cols-1 gap-1",children:m.dsaWeaknesses.map((f,p)=>e.jsxs("div",{className:"flex items-start gap-1 text-slate-600",children:[e.jsx("div",{className:"w-1 h-1 rounded-full bg-amber-500 mt-1.5 shrink-0"}),e.jsx("span",{className:"leading-snug",children:f})]},p))})]})]})]})]}),e.jsxs("div",{className:"space-y-3 mt-3 pt-3 border-t border-slate-100 shrink-0 text-[10px]",children:[e.jsxs("div",{className:"bg-primary/[0.03] border border-primary/10 rounded-lg p-2.5",children:[e.jsx("span",{className:"text-[9px] font-black text-primary uppercase tracking-wider block mb-0.5",children:"Recruiter Verdict"}),e.jsxs("p",{className:"text-slate-600 leading-normal font-medium",children:['"',m.verdict,'"']})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("span",{className:"font-black text-[9px] text-slate-400 uppercase tracking-wider block font-bold font-bold",children:"Validated Tech Stack"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:m.techStack.map((f,p)=>e.jsxs("span",{className:"px-2 py-0.5 bg-slate-50 border border-slate-200 rounded-md font-bold text-slate-600 text-[9px]",children:[f.name," ",e.jsxs("span",{className:"text-primary font-black ml-0.5",children:[f.depth,"/10"]})]},p))})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[9px] border-t border-slate-100 pt-2.5 text-slate-400 font-medium leading-tight",children:[e.jsxs("div",{children:[e.jsx("span",{className:"block font-bold text-slate-400/80 uppercase text-[8px] tracking-wider font-bold",children:"Top Thinking Signal"}),e.jsx("span",{className:"text-slate-700 font-extrabold",children:m.topThinkingSignal})]}),e.jsxs("div",{children:[e.jsx("span",{className:"block font-bold text-slate-400/80 uppercase text-[8px] tracking-wider font-bold",children:"Top Technical Signal"}),e.jsx("span",{className:"text-slate-700 font-extrabold",children:m.topTechnicalSignal})]})]})]})]},m.name)})})}),e.jsx("div",{className:"flex justify-center gap-1.5 mt-6",children:et.map((m,b)=>e.jsx("button",{onClick:w=>{w.stopPropagation(),i(b)},className:v("w-2 h-2 rounded-full transition-all duration-300",t===b?"bg-primary w-4":"bg-slate-300 hover:bg-slate-400")},b))})]})]})]})]})},Un=[{icon:Gt,title:"Validated Data",desc:"Verify actual contributions, code activity, and developer profiles with cross-referenced git analytics.",color:"text-emerald-500 bg-emerald-50/70 border-emerald-100/80"},{icon:nr,title:"Easy Shortlisting",desc:"Rank and filter applicants instantly using objective codebase scoring, tech stack tags, and quality indicators.",color:"text-blue-500 bg-blue-50/70 border-blue-100/80"},{icon:Ge,title:"Custom Pipelines",desc:"Model hiring workflows exactly to your team's stages—from repo scans to screening, coding, and final offers.",color:"text-indigo-500 bg-indigo-50/70 border-indigo-100/80"},{icon:xt,title:"Cognitive Evaluation",desc:"Measure technical reasoning, structural understanding, and problem-solving patterns through coding analytics.",color:"text-purple-500 bg-purple-50/70 border-purple-100/80"},{icon:Ma,title:"AI Interviewer",desc:"Deliver automated, context-aware screening chats matching the specific tech stack of the open position.",color:"text-cyan-500 bg-cyan-50/70 border-cyan-100/80"},{icon:ve,title:"Automated Assessment Creation",desc:"Instantly spin up relevant, tailored code tests based on real-world scenarios and production challenges.",color:"text-amber-500 bg-amber-50/70 border-amber-100/80"},{icon:qa,title:"Code Authenticity",desc:"Weed out tutorial copyp
8asta, fork duplicates, and AI-generated boilerplates with deep historical checks.",color:"text-rose-500 bg-rose-50/70 border-rose-100/80"},{icon:Aa,title:"Deep Project Analysis",desc:"Go beyond basic syntax to evaluate design pattern quality, modularity, and modular test coverage.",color:"text-violet-500 bg-violet-50/70 border-violet-100/80"}],Qn=()=>e.jsx("section",{className:"relative py-12 sm:py-20 lg:py-24 bg-transparent overflow-hidden border-t border-slate-100/40",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-5 sm:px-6 relative z-10",children:[e.jsxs("div",{className:"text-center max-w-3xl mx-auto space-y-2 sm:space-y-4 mb-8 sm:mb-16",children:[e.jsx("span",{className:"text-[9px] sm:text-[10px] font-bold tracking-widest uppercase text-primary bg-primary/[0.06] border border-primary/10 px-2.5 py-1 sm:px-3 sm:py-1.5 rounded-full",children:"Product Features"}),e.jsxs("h2",{className:"text-xl sm:text-3xl md:text-5xl font-extrabold text-slate-900 tracking-[-0.02em] leading-tight",children:["Designed for the"," ",e.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-primary to-indigo-500",children:"modern tech recruiter."})]}),e.jsx("p",{className:"text-slate-500 text-xs sm:text-sm md:text-base font-medium max-w-2xl mx-auto leading-relaxed",children:"Stop digging through standard resumes. Leverage automated repository scans to verify every dimension of an engineer's profile."})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-2 lg:grid-cols-4 gap-3 sm:gap-4 md:gap-6",children:Un.map((t,i)=>{const s=t.icon;return e.jsx(A.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-50px"},transition:{duration:.4,delay:i*.05},className:"bg-white/80 backdrop-blur-sm border border-slate-200/50 rounded-xl sm:rounded-2xl p-4 sm:p-6 shadow-sm hover:shadow-xl hover:border-primary/20 transition-all duration-300 flex flex-col group hover:-translate-y-1.5",children:e.jsxs("div",{className:"space-y-2.5 sm:space-y-4 flex-1 flex flex-col",children:[e.jsx("div",{className:`w-8 h-8 sm:w-11 sm:h-11 rounded-lg sm:rounded-xl border flex items-center justify-center shrink-0 transition-all duration-300 ${t.color}`,children:e.jsx(s,{className:"w-4 h-4 sm:w-5 sm:h-5 group-hover:scale-110 transition-transform duration-300"})}),e.jsxs("div",{className:"space-y-1 sm:space-y-2 flex-1",children:[e.jsx("h3",{className:"text-xs sm:text-base font-bold text-slate-800 tracking-tight group-hover:text-primary transition-colors duration-200",children:t.title}),e.jsx("p",{className:"text-[10px] sm:text-xs md:text-sm text-slate-500 font-medium leading-relaxed",children:t.desc})]})]})},t.title)})})]})}),Yt=[{quote:"We were tired of candidates who could pass standard tests but struggled to write clean, production-ready code. PyNyx changed everything for us at Plexis. Now, we can see how they actually approach complex problems and ensure they're building independently. It's cut our vetting time in half while raising our bar for quality.",name:"Adithya Srikar",role:"Co-founder",company:"Plexis",logo:"/landing/plexis_logo.png",logoClass:"h-6 max-w-[110px] object-contain object-left",avatarImg:"/landing/adithya_avatar.png",avatarColor:"bg-violet-100 text-violet-600"},{quote:"Vetting AI and systems engineers is extremely challenging because resumes rarely tell the full story. PyNyx has been a lifesaver for us. It helps us bypass generic interviews and focus on developers who actually understand algorithms and execution. The insights are incredibly deep, and we've hired some of our best talent through it.",name:"Rama Ganesh Pothamsetti",role:"Founder",company:"KaliGanAI",logo:"/landing/kaliganai_logo.png",logoClass:"h-9 w-9 object-contain rounded-lg border border-slate-100/50 shadow-sm",avatarImg:"/landing/rama_avatar.png",avatarColor:"bg-emerald-100 text-emerald-600"},{quote:"Before PyNyx, our team spent hours sorting through keyword-stuffed resumes and conducting screening calls that led nowhere. Now, we run automated, proof-based coding challenges that let us see actual coding capability instantly. It's saved us hu
8ndreds of hours and made our tech hiring incredibly efficient.",name:"Talent Acquisition Team",role:"Recruitment Specialist",company:"Synvox",logo:"/landing/synvox_logo.png",logoClass:"h-4 object-contain",logoContainerClass:"bg-black px-2.5 py-1 rounded-md flex items-center h-7",avatarImg:null,avatarColor:"bg-indigo-100 text-indigo-600",hideAvatar:!0},{quote:"PyNyx's evaluations are different from standard coding platforms. They feel like a real-world pair programming session rather than a test. The focus on code design, readability, and AST originality checks makes it a very fair way to showcase actual engineering skills.",name:"Bharathi Virodhula",role:"SDE 2",company:"Amazon",logo:"https://upload.wikimedia.org/wikipedia/commons/a/a9/Amazon_logo.svg",logoClass:"h-4 md:h-4.5 object-contain object-left mt-1",avatarImg:null,avatarColor:"bg-orange-100 text-orange-600"}],Yn=[...Yt,...Yt,...Yt],Ks=()=>{const[t,i]=a.useState(7),[s,l]=a.useState(!0);a.useEffect(()=>{if(t<4){const o=setTimeout(()=>{l(!1),i(t+4)},600);return()=>clearTimeout(o)}if(t>7){const o=setTimeout(()=>{l(!1),i(t-4)},600);return()=>clearTimeout(o)}},[t]),a.useEffect(()=>{if(!s){const o=setTimeout(()=>{l(!0)},25);return()=>clearTimeout(o)}},[s]);const[h,u]=a.useState(!1);return a.useEffect(()=>{if(h)return;const o=setInterval(()=>{l(!0),i(m=>m+1)},5e3);return()=>clearInterval(o)},[h,t]),e.jsxs("section",{className:"relative py-12 sm:py-20 lg:py-24 bg-transparent overflow-hidden border-t border-slate-100/40",children:[e.jsx("style",{children:`
9        :root {
10          --card-width: 270px;
11          --card-gap: 16px;
12        }
13        @media (min-width: 640px) {
14          :root {
15            --card-width: 340px;
16            --card-gap: 20px;
17          }
18        }
19        @media (min-width: 768px) {
20          :root {
21            --card-width: 440px;
22          }
23        }
24        .slider-track {
25          display: flex;
26          gap: var(--card-gap);
27          width: max-content;
28        }
29      `}),e.jsx("div",{className:"max-w-5xl mx-auto px-5 sm:px-6 relative z-10 mb-8 sm:mb-16",children:e.jsxs("div",{className:"text-center max-w-3xl mx-auto space-y-2 sm:space-y-4",children:[e.jsx("span",{className:"text-[9px] sm:text-[10px] font-bold tracking-widest uppercase text-primary bg-primary/[0.06] border border-primary/10 px-2.5 py-1 sm:px-3 sm:py-1.5 rounded-full",children:"Success Stories"}),e.jsxs("h2",{className:"text-xl sm:text-3xl md:text-5xl font-extrabold text-slate-900 tracking-[-0.02em] leading-tight",children:["Loved by"," ",e.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-primary to-indigo-500",children:"engineering leaders."})]}),e.jsx("p",{className:"text-slate-500 text-xs sm:text-sm md:text-base font-medium max-w-2xl mx-auto leading-relaxed",children:"See how recruiters and engineering teams use PyNyx to build fast, high-quality, proof-based pipelines."})]})}),e.jsx("div",{className:"w-full overflow-hidden py-4 relative",onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),onTouchStart:()=>u(!0),onTouchEnd:()=>u(!1),children:e.jsx("div",{className:"slider-track",style:{transform:`translateX(calc(50vw - (var(--card-width) / 2) - ${t} * (var(--card-width) + var(--card-gap))))`,transition:s?"transform 600ms cubic-bezier(0.16, 1, 0.3, 1)":"none"},children:Yn.map((o,m)=>{const b=m===t;return e.jsxs("div",{onClick:()=>{l(!0),i(m)},className:`bg-white border rounded-xl sm:rounded-2xl p-5 sm:p-8 flex flex-col justify-between transition-all duration-500 ease-out relative cursor-pointer select-none shrink-0
30                  ${b?"border-primary shadow-[0_15px_40px_rgba(139,92,246,0.15)] scale-100 opacity-100 ring-2 ring-primary/5":"border-slate-100 shadow-sm scale-90 opacity-40 hover:opacity-60"}
31                `,style:{width:"var(--card-width)"},children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex justify-between items-center border-b border-slate-100 pb-4 h-10",children:[e.jsx("div",{className:"flex items-center",children:e.jsx("div",{className:o.logoContainerClass||"",children:e.jsx("img",{src:o.logo,alt:`${o.company} logo`,className:o.logoClass})})}),e.jsx("div",{className:"flex gap-0.5 text-amber-400",children:[...Array(5)].map((w,d)=>e.jsx(Ca,{className:"w-3.5 h-3.5 fill-current"},d))})]}),e.jsxs("p",{className:"text-xs sm:text-sm text-slate-600 leading-relaxed font-medium italic relative",children:[e.jsx(or,{className:"w-8 h-8 text-slate-100 absolute -left-4 -top-3 -z-10 opacity-60"}),'"',o.quote,'"']})]}),e.jsxs("div",{className:"flex items-center gap-3 pt-6 border-t border-slate-100 mt-8",children:[!
31o.hideAvatar&&(o.avatarImg?e.jsx("img",{src:o.avatarImg,alt:o.name,className:"w-10 h-10 rounded-full object-cover border border-slate-100 shadow-sm"}):e.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center font-bold text-sm ${o.avatarColor}`,children:o.name.split(" ").map(w=>w[0]).join("")})),e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-bold text-slate-800",children:o.name}),e.jsxs("p",{className:"text-[10px] text-slate-400 font-semibold mt-0.5",children:[o.role," · ",o.company]})]})]})]},`${o.name}-${m}`)})})}),e.jsx("div",{className:"flex justify-center items-center gap-2 mt-6 sm:mt-8",children:Yt.map((o,m)=>{const b=t%4;return e.jsx("button",{onClick:()=>{l(!0),i(m+4)},className:`h-2.5 rounded-full transition-all duration-300 ${m===b?"w-6 bg-primary":"w-2.5 bg-slate-200 hover:bg-slate-300"}`,"aria-label":`Go to slide ${m+1}`},m)})})]})},Jn=()=>{const t=$e(),i=Oe();return e.jsxs("section",{id:"cta-section",className:"relative py-14 sm:py-24 lg:py-32 bg-transparent overflow-hidden border-t border-slate-100/40",children:[e.jsx("div",{className:"absolute top-0 right-0 w-96 h-96 bg-primary/5 rounded-full blur-[100px] -mr-48 -mt-48"}),e.jsx("div",{className:"absolute bottom-0 left-0 w-96 h-96 bg-violet-100 rounded-full blur-[100px] -ml-48 -mb-48"}),e.jsxs("div",{className:"max-w-5xl mx-auto px-5 sm:px-6 relative z-10 text-center space-y-8 sm:space-y-10",children:[e.jsxs(A.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"space-y-6",children:[e.jsx("span",{className:"text-[9px] sm:text-[10px] font-bold tracking-[0.25em] text-primary uppercase block",children:"Ready to hire differently?"}),e.jsxs("h2",{className:"text-xl leading-[1.2] sm:text-4xl md:text-6xl font-extrabold text-slate-900 tracking-[-0.03em] sm:leading-[1.1] max-w-4xl mx-auto",children:["Your next great hire is already writing code."," ",e.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-primary to-indigo-600",children:"Let's find them."})]}),e.jsx("p",{className:"text-slate-500 text-xs sm:text-base md:text-lg max-w-2xl mx-auto leading-relaxed font-medium",children:"Stop sorting through resumes. Verify developer repositories automatically and hire candidates on proven capabilities."})]}),e.jsxs(A.div,{initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.1},className:"flex flex-col sm:flex-row items-center justify-center gap-3 sm:gap-4 pt-2 sm:pt-4",children:[e.jsxs("button",{onClick:()=>{i==="recruiter"?t("/signup"):window.location.href=Q("recruiter","/signup")},className:"group w-full sm:w-auto px-6 sm:px-8 py-3.5 sm:py-4 bg-primary hover:bg-primary/95 text-white rounded-xl font-semibold text-sm shadow-[0_4px_14px_rgba(139,92,246,0.3)] active:scale-[0.98] transition-all flex items-center justify-center gap-2",children:["Get Access Free",e.jsx(Ae,{size:16,className:"group-hover:translate-x-1 transition-transform"})]}),e.jsx("button",{onClick:()=>{i==="recruiter"?t("/request-demo"):window.location.href=Q("recruiter","/request-demo")},className:"w-full sm:w-auto px-6 sm:px-8 py-3.5 sm:py-4 bg-white border border-slate-200 hover:border-slate-300 hover:bg-slate-50 text-slate-700 rounded-xl font-semibold text-sm active:scale-[0.98] transition-all",children:"Book a Demo"})]}),e.jsx(A.div,{initial:{opacity:0}
31,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6,delay:.2},className:"flex flex-wrap items-center justify-center gap-6 sm:gap-8 md:gap-16 pt-8 sm:pt-12 border-t border-slate-200/60 max-w-3xl mx-auto",children:[{value:"< 24 Hours",label:"Setup Pipeline"},{value:"Free Tier",label:"For Initial Vetting"},{value:"24/7 Support",label:"Premium Slack Access"}].map(s=>e.jsxs("div",{className:"text-center space-y-1",children:[e.jsx("div",{className:"text-xl font-extrabold text-slate-800 tracking-tight",children:s.value}),e.jsx("div",{className:"text-[9px] font-bold text-slate-400 uppercase tracking-widest",children:s.label})]},s.label))})]})]})},Zs=[{role:"user",text:"Why does my reverse linked list fail on test case 2?"},{role:"vasist",text:"Look at line 6 (`curr.next = curr.next.next`). If you have the list `1 -> 2 -> 3`, what happens to node `2` after that line runs?"},{role:"user",text:"Ah, it skips node 2..."},{role:"vasist",text:"Exactly. In a reversed list, should node `2` point toward `3` or backward toward `1`?"},{role:"user",text:"It should point back to node 1."},{role:"vasist",text:"Right! Do you currently have a variable keeping track of node 1 (the previous node)?"},{role:"user",text:"No, I need a `prev` pointer!"}],Xn=[{icon:xt,title:"Guided Logic Discovery",desc:"Vasist asks questions about your code's pointer movements and variable states, guiding you to find the bug yourself."},{icon:Be,title:"Fix the Mental Model",desc:"Instead of giving you a copy-pasted answer, Vasist ensures you understand why your initial approach broke down."},{icon:st,title:"Zero Spoilers",desc:"Get incremental hints matched to your progress, keeping practice challenging and interview-realistic."}],Kn=()=>{const[t,i]=a.useState([]),[s,l]=a.useState(null),[h,u]=a.useState(""),[o,m]=a.useState("chat"),b=a.useRef(null),w=a.useRef(null),d=a.useRef(!1);a.useEffect(()=>{const p=new IntersectionObserver(([N])=>{N.isIntersecting&&!d.current&&(d.current=!0,g())},{threshold:.2});return w.current&&p.observe(w.current),()=>p.disconnect()},[]);const g=()=>{let p;const N=(T,r)=>{if(T>=Zs.length)return;const c=Zs[T];r===0&&(l(c),u("")),r<c.text.length?(u(c.text.slice(0,r+1)),p=setTimeout(()=>N(T,r+1),22)):p=setTimeout(()=>{i(j=>[...j,c]),l(null),u(""),p=setTimeout(()=>N(T+1,0),c.role==="vasist"?1e3:600)},600)};return p=setTimeout(()=>N(0,0),600),()=>clearTimeout(p)};a.useEffect(()=>{b.current&&(b.current.scrollTop=b.current.scrollHeight)},[t,h]);const f=p=>e.jsx($a,{remarkPlugins:[Ia],components:{p({children:N}){return e.jsx("p",{className:"m-0 inline leading-relaxed",children:N})},code({inline:N,className:T,children:r,...c}){return e.jsx("code",{className:"bg-[#bd93f9]/10 px-1.5 py-0.5 rounded-md font-mono text-[11px] text-[#d2a8ff] border border-[#bd93f9]/20",...c,children:r})}},children:p});return e.jsx("section",{ref:w,className:"py-20 bg-zinc-900/60 text-zinc-100 border-t border-zinc-800/80",children:e.jsxs("div",{className:"container mx-auto px-4 max-w-6xl",children:[e.jsxs(A.div,{initial:{opacity:0,y:25},whileInView:{opacity:1,y:0},viewport:{once:!0,amount:.15},transition:{duration:.5,ease:[.16,1,.3,1]},className:"flex flex-col md:flex-row md:items-end justify-between mb-12 pb-6 border-b border-zinc-800/80 gap-4",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-xs font-mono text-violet-400 uppercase tracking-wider font-semibold",children:"Interactive Socratic Debugging"}),e.jsx("h2",{className:"text-3xl sm:text-4xl font-extrabold text-white mt-1",children:"An AI Tutor that doesn't just copy-paste solutions."})]}),e.jsx("p",{className:"text-sm text-zinc-400 max-w-md",children:"When your code fails a test case, Vasist pinpoints where your mental model broke down and guides you with targeted questions."})]}),e.jsxs("div",{className:"flex lg:hidden items-center gap-1 p-1 bg-zinc-950 rounded-xl border border-zinc-800 text-xs font-mono mb-6",children:[e.jsxs("button",{onClick:()=>m("chat"),className:v("flex-1 py-2.5 rounded-lg font-semibold transition-all text-center flex items-center justify-center gap-1.5 cursor-pointer",o==="chat"?"bg-violet-600 text-white shadow-md":"text-zinc-400"),children:[e.jsx(ve,{className:"w-3.5 h-3.5"})," Live Vasist Chat"]}),e.jsxs("button",{onClick:()=>m("code"),className:v("flex-1 py-2.5 rounded-lg font-semibold transition-all text-center flex items-center justify-center gap-1.5 cursor-pointer",o==="code"?"bg-violet-600 text-white shadow-md":"text-zinc-400"),children:[e.jsx(Be,{className:"w-3.5 h-3.5"})," Code & Features"]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8 items-start",children:[e.jsxs(A.div,{initial:{opacity:0,x:-30},whileInView:{opacity:1,x:0},viewport:{once:!0,amount:.15},transition:{duration:.6,delay:.15,ease:[.16,1,.3,1]},className:v("lg:col-span-5 space-y-6",o==="code"?"block":"hidden lg:block"),children:[e.jsxs("div",{className:"rounded-xl border border-zinc-800 bg-zinc-950 overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 bg-zinc-900/80 border-b border-zinc-800 text-xs font-mono text-zinc-400",children:[e.jsx("span",{children:"LinkedList.py"}),e.jsx("span",{className:"text-amber-400",children:"Test Case Failed (2/5)"})]}),e.jsxs("div",{className:"p-4 font-mono text-xs text-zinc-300 leading-relaxed",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-violet-400",children:"def"})," ",e.jsx("span",{className:"text-blue-400",children:"reverseList"}),"(head):"]}),e.jsx("div",{className:"pl-4 text-zinc-500",children:"curr = head"}),e.jsxs("div",{className:"pl-4 text-violet-400",children:["while ",e.jsx("span",{className:"text-zinc-300",children:"curr and curr.next:"})]}),e.jsxs("div",{className:"pl-8 text-rose-400 bg-rose-500/10 border-l-2 border-rose-500 px-1 -mx-1",children:["curr.next = curr.next.next ",e.jsx("span",{className:"text-zinc-500",children:"# Bug here"})]}),e.jsxs("div",{className:"pl-4 text-violet-400",children:["return ",e.jsx("span",{className:"text-zinc-300",children:"head"})]})]})]}),e.jsx("div",{className:"space-y-4",children:Xn.map((p,N)=>{const T=p.icon;return e.jsxs(A.div,{initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.4,delay:.2+N*.1},className:"flex gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-violet-500/10 border border-violet-500/20 flex items-center justify-center shrink-0 text-violet-400 mt-0.5",children:e.jsx(T,{className:"w-4 h-4"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-bold text-zinc-200",children:p.title}),e.jsx("p",{className:"text-xs text-zinc-400 leading-relaxed",children:p.desc})]})]},p.title)})})]}),e.jsx(A.div,{initial:{opacity:0,x:30},whileInView:{opacity:1,x:0},viewport:{once:!0,amount:.15},transition:{duration:.6,delay:.2,ease:[.16,1,.3,1]},className:v("lg:col-span-7",o==="chat"?"block":"hidden lg:block"),children:e.jsx(is,{intensity:6,className:"w-full",children:e.jsxs("div",{className:"rounded-xl border border-zinc-800 bg-zinc-950 overflow-hidden shadow-xl",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-zinc-900/90 border-b border-zinc-800 text-xs font-mono text-zinc-300",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ve,{className:"w-4 h-4 text-violet-400"}),e.jsx("span",{className:"font-mono",children:"Vasist_System"})]}),e.jsx("span",{className:"text-emerald-400 text-[11px] font-mono",children:"Active Session"})]}),e.jsxs("div",{ref:b,className:"h-[280px] sm:h-[360px] overflow-y-auto p-3 sm:p-4 space-y-3 font-mono text-xs",children:[t.map((p,N)=>e.jsx("div",{className:v("flex w-full",p.role==="user"?"justify-end":"justify-start"),children:e.jsxs("div",{className:v("flex flex-col max-w-[92%] sm:max-w-[85%]",p.role==="user"?"items-end":"items-start"),children:[p.role==="vasist"&&e.jsxs("span",{className:"text-[10px] items-center flex gap-1 font-bold text-[#bd93f9] mb-1 uppercase tracking-widest",children:[e.jsx(ve,{className:"h-3 w-3"})," Vasist_System"]}),e.jsx("div",{className:v("p-2.5 sm:p-3 rounded-xl text-xs font-mono backdrop-blur-md leading-relaxed",p.role==="user"?"bg-[#062012]/60 border border-[#16a34a]/40 text-[#4ade80] rounded-tr-sm":"bg-[#0d1117]/90 border border-[#bd93f9]/20 text-[#e6edf3] rounded-tl-sm shadow-md"),children:f(p.text)})]})},N)),s&&e.jsx("div",{className:v("flex w-full",s.role==="user"?"justify-end":"justify-start"),children:e.jsxs("div",{className:v("flex flex-col max-w-[92%] sm:max-w-[85%]",s.role==="user"?"items-end":"items-start"),children:[s.role==="vasist"&&e.jsxs("span",{className:"text-[10px] items-center flex gap-1 font-bold text-[#bd93f9] mb-1 uppercase tracking-widest",children:[e.jsx(ve,{className:"h-3 w-3"})," Vasist_System"]}),e.jsxs("div",{className:v("p-2.5 sm:p-3 rounded-xl text-xs font-mono backdrop-blur-md leading-relaxed",s.role==="user"?"bg-[#062012]/60 border border-[#16a34a]/40 text-[#4ade80] rounded-tr-sm":"bg-[#0d1117]/90 border border-[#bd93f9]/20 text-[#e6edf3] rounded-tl-sm shadow-md"),children:[f(h),e.jsx("span",{className:"inline-block w-1 h-3 bg-[#bd93f9] ml-0.5 animate-pulse align-middle"})]})]})})]}),e.jsx("div",{className:"p-3 border-t border-zinc-800 bg-zinc-900/40",children:e.jsxs("div",{className:"flex items-center gap-2 bg-zinc-900 border border-zinc-800 rounded-lg px-3 py-2 text-xs text-zinc-500 font-mono",children:[e.jsx(lr,{className:"w-3.5 h-3.5 text-zinc-600"}),e.jsx("span",{children:"Query Vasist system..."})]})})]})})})]})]})})},Zn=[{id:"dsa",interviewerName:"Dr. Elena Vance",interviewerTitle:"Lead AI Examiner",company:"Meta Tech Track",category:"DSA & Algorithms",question:"Walk me through how you'd find the lowest common ancestor of two nodes in a Binary Search Tree without extra memory.",sampleAnswer:"Since it's a BST, I compare current node's value with both target nodes p and q. If both values are smaller, I traverse left. If both are larger, I traverse right. The first node where p and q split is mathematically our LCA, giving O(H) time and O(1) space.",score:{overall:76,technical:78,communication:74,confidence:72},feedback:["Optimal O(1) Space Complexity Identified","Minor pause while articulating BST traversal logic","Solid core reasoning, practice edge case verbalization"]},{id:"sysdesign",interviewerName:"Marcus Sterling",interviewerTitle:"Principal System Architect",company:"Google Infrastru
31cture Track",category:"System Design",question:"How would you design read-heavy caching for a global short-link service handling 50,000 requests per second?",sampleAnswer:"I'd implement Redis cluster caching at regional edge CDN layers with LRU eviction. Database reads query cache first. For write throughput, Base62 encoding with pre-generated range locks guarantees zero DB collision.",score:{overall:74,technical:76,communication:72,confidence:71},feedback:["Solid Regional Redis Caching Strategy","Include explicit cache invalidation trade-offs","Structured approach to high throughput bottlenecks"]},{id:"behavioral",interviewerName:"Sarah Jenkins",interviewerTitle:"Engineering Director",company:"Amazon Leadership Track",category:"Behavioral & Leadership",question:"Describe a scenario where you had to push back on a tight feature deadline due to architectural debt.",sampleAnswer:"I quantified the risk of unindexed database queries using load simulation benchmarks, presented data to product leaders, and proposed a 2-phase rollout that met product targets while keeping cluster reliability at 99.99%.",score:{overall:72,technical:70,communication:75,confidence:69},feedback:["Effective STAR Method Structure","Quantify trade-offs with explicit impact metrics","Clear stakeholder conflict resolution approach"]}],eo=[{icon:Va,title:"Interactive AI Examiner",desc:"Speak naturally into your mic. PyNyx AI listens, speaks back in real time, and asks adaptive follow-ups."},{icon:xt,title:"Algorithmic Code Intelligence",desc:"Your spoken logic is analyzed against optimal graph, DP, and system architecture design patterns."},{icon:zt,title:"Executive Score Breakdown",desc:"Receive instant performance metrics on technical correctness, articulation clarity, speed, and confidence."},{icon:Wa,title:"FAANG & Tier-1 Personas",desc:"Practice with realistic AI interviewer personas modeled after senior engineers at Meta, Google, and Amazon."}],to=()=>{const[t,i]=a.useState(0),[s,l]=a.useState(!1),[h,u]=a.useState(!1),[o,m]=a.useState(!1),[b,w]=a.useState(""),[d,g]=a.useState(225),[f,p]=a.useState([12,24,18,30,16,22,14,28,20,15,25,18]),[N,T]=a.useState("stage"),r=Zn[t];a.useEffect(()=>{const k=setInterval(()=>{g(I=>I+1)},1e3);return()=>clearInterval(k)},[]);const c=k=>{const I=Math.floor(k/60),_=k%60;return`${I.toString().padStart(2,"0")}:${_.toString().padStart(2,"0")}`};a.useEffect(()=>{if(s){const k=setInterval(()=>{p(Array.from({length:14},()=>Math.floor(Math.random()*28)+6))},90);return()=>clearInterval(k)}else p([6,10,8,12,6,10,8,12,6,10,8,6,10,8])},[s]);const j=()=>
31{if(s)return;l(!0),w("");const k=r.sampleAnswer;let I=0;const _=setInterval(()=>{I<k.length?(I+=2,w(k.slice(0,I))):(clearInterval(_),setTimeout(()=>{l(!1)},600))},38)};return e.jsxs("section",{className:"py-28 bg-[#05050a] text-zinc-100 relative overflow-hidden border-t border-zinc-800/80 font-sans",children:[e.jsx("div",{className:"absolute top-1/3 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[850px] h-[450px] rounded-full pointer-events-none opacity-25",style:{background:"radial-gradient(circle, rgba(139,92,246,0.22) 0%, rgba(59,130,246,0.08) 55%, transparent 75%)",filter:"blur(110px)"}}),e.jsx("div",{className:"absolute bottom-10 right-10 w-[500px] h-[300px] rounded-full pointer-events-none opacity-15",style:{background:"radial-gradient(circle, rgba(168,85,247,0.2) 0%, transparent 70%)",filter:"blur(100px)"}}),e.jsxs("div",{className:"container mx-auto px-4 max-w-6xl relative z-10",children:[e.jsxs(A.div,{initial:{opacity:0,y:25},whileInView:{opacity:1,y:0},viewport:{once:!0,amount:.15},transition:{duration:.5,ease:[.16,1,.3,1]},className:"text-center max-w-3xl mx-auto mb-14 space-y-4",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-3.5 py-1.5 rounded-full border border-violet-500/30 bg-violet-500/10 text-violet-300 text-xs font-mono backdrop-blur-md shadow-[0_0_15px_rgba(139,92,246,0.2)]",children:[e.jsx(cr,{className:"w-3.5 h-3.5 text-violet-400 animate-pulse"}),e.jsx("span",{className:"font-semibold uppercase tracking-[0.2em] text-[10px]",children:"PyNyx AI // Interactive Mock Interview Stage"})]}),e.jsxs("h2",{className:"text-3xl sm:text-5xl font-extrabold text-white tracking-tight leading-tight",children:["Ace Technical & Behavioral Rounds. ",e.jsx("br",{}),e.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-violet-400 via-purple-300 to-indigo-400",children:"With Real-Time AI Mock Interviews."})]}),e.jsx("p",{className:"text-sm sm:text-base text-zinc-400 leading-relaxed max-w-2xl mx-auto",children:"Experience realistic live video mock interviews. Practice DSA, System Design, and Behavioral rounds with interactive AI examiners—and receive instant performance evaluation reports."})]}),e.jsxs("div",{className:"flex lg:hidden items-center gap-1 p-1 bg-zinc-950 rounded-2xl border border-zinc-800 text-xs font-mono mb-6",children:[e.jsxs("button",{onClick:()=>T("stage"),className:v("flex-1 py-2.5 rounded-xl font-semibold transition-all text-center flex items-center justify-center gap-1.5 cursor-pointer",N==="stage"?"bg-violet-600 text-white shadow-md font-bold":"text-zinc-400"),children:[e.jsx(Os,{className:"w-3.5 h-3.5"})," Video Call Stage"]}),e.jsxs("button",{onClick:()=>T("report"),className:v("flex-1 py-2.5 rounded-xl font-semibold transition-all text-center flex items-center justify-center gap-1.5 cursor-pointer",N==="report"?"bg-violet-600 text-white shadow-md font-bold":"text-zinc-400"),children:[e.jsx(zt,{className:"w-3.5 h-3.5"})," Evaluation Report"]})]}),e.jsx(A.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,amount:.15},transition:{duration:.6,ease:[.16,1,.3,1]},className:v("mb-16",N==="stage"?"block":"hidden lg:block"),children:e.jsx(is,{intensity:4,className:"w-full",children:e.jsxs("div",{className:"rounded-3xl border border-white/[0.1] bg-zinc-950/90 overflow-hidden shadow-2xl shadow-black/90 backdrop-blur-2xl relative",children:[e.jsxs("div",{className:"flex items-center justify-between px-5 sm:px-6 py-3.5 bg-zinc-900/90 border-b border-white/[0.08] text-xs font-mono",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 rounded-md bg-rose-500/10 border border-rose-500/20 text-rose-400",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-rose-500 animate-pulse"}),e.jsx("span",{className:"font-bold text-[10px] uppercase tracking-wider",children:"LIVE INTERVIEW"})]}),e.jsx("span",{className:"text-zinc-300 font-semibold hidden sm:inline",children:r.company}),e.jsx("span",{className:"text-zinc-600 hidden md:inline",children:"// Room #04-A"})]}),e.jsxs("div",{className:"flex items-center gap-4 text-zinc-400 text-[11px]",children:[e.jsxs("div",{className:"flex items-center gap-1.5 bg-zinc-950/80 px-2.5 py-1 rounded-md border border-white/[0.06]",children:[e.jsx(Ha,{className:"w-3.5 h-3.5 text-violet-400"}),e.jsx("span",{className:"font-mono text-zinc-200 font-semibold",children:c(d)})]}),e.jsxs("div",{className:"hidden sm:flex items-center gap-1.5 bg-zinc-950/80 px-2.5 py-1 rounded-md border border-white/[0.06] text-emerald-400",children:[e.jsx(Ea,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"HD 1080p · 18ms"})]})]})]}),e.jsxs("div",{className:"relative w-full aspect-[16/9] min-h-[380px] sm:min-h-[460px] bg-zinc-950 overflow-hidden flex items-center justify-center",children:[e.jsx("img",{src:"/ai_interviewer_avatar.png",alt:"AI Interviewer Feed",className:"w-full h-full object-cover object-center filter brightness-[0.92] contrast-[1.06] transition-all duration-700"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-zinc-950 via-zinc-950/20 to-zinc-950/40 pointer-events-none"}),e.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,transparent_40%,rgba(5,5,10,0.75)_100%)] pointer-events-none"}),e.jsx("div",{className:"absolute top-4 left-4 w-4 h-4 border-t-2 border-l-2 border-violet-400/60 pointer-events-none"}),e.jsx("div",{className:"absolute top-4 right-4 w-4 h-4 border-t-2 border-r-2 border-violet-400/60 pointer-events-none"}),e.jsx("div",{className:"absolute bottom-4 left-4 w-4 h-4 border-b-2 border-l-2 border-violet-400/60 pointer-events-none"}),e.jsx("div",{className:"absolute bottom-4 right-4 w-4 h-4 border-b-2 border-r-2 border-violet-400/60 pointer-events-none"}),e.jsxs("div",{className:"absolute top-5 left-5 z-10 flex items-center gap-2.5 p-2 pr-4 rounded-xl bg-zinc-950/80 border border-white/[0.1] backdrop-blur-md shadow-xl",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-violet-500/20 border border-violet-500/30 flex items-center justify-center text-violet-300 shrink-0 font-bold text-xs",children:"AI"}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("h4",{className:"text-xs font-bold text-white leading-none",children:r.interviewerName}),e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),e.jsx("p",{className:"text-[10px] text-violet-300/80 font-mono mt-0.5",children:r.interviewerTitle})]})]}),e.jsxs("div",{className:"absolute top-5 right-5 z-10 flex items-center gap-2 px-3 py-1.5 rounded-xl bg-zinc-950/80 border border-white/[0.1] backdrop-blur-md",children:[e.jsx("span",{className:"text-[10px] font-mono font-bold text-violet-300 uppercase tracking-widest",children:"AI NEURAL CORE"}),e.jsx("div",{className:"flex items-end gap-0.5 h-3 px-1",children:[1,2,3,4,5].map(k=>e.jsx(A.div,{animate:{height:[3,Math.floor(Math.random()*12)+4,3]},transition:{duration:.5,repeat:1/0,delay:k*.1}
31,className:"w-0.5 bg-violet-400 rounded-full"},k))})]}),e.jsx("div",{className:"absolute bottom-6 left-6 right-20 sm:right-auto max-w-xl z-10",children:e.jsxs(A.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},className:"p-4 rounded-2xl bg-zinc-950/90 border border-white/[0.12] backdrop-blur-xl shadow-2xl space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between text-[10px] font-mono text-zinc-400",children:[e.jsxs("span",{className:"flex items-center gap-1.5 text-violet-400 font-bold",children:[e.jsx(dr,{className:"w-3.5 h-3.5"})," AI Examiner Question Prompt"]}),e.jsx("span",{className:"text-zinc-500",children:r.category})]}),e.jsxs("p",{className:"text-xs sm:text-sm font-semibold text-white leading-relaxed",children:['"',r.question,'"']})]},r.id)}),e.jsx("div",{className:"absolute bottom-6 right-6 z-20 w-40 sm:w-56 h-28 sm:h-36 rounded-2xl border-2 border-zinc-700/60 bg-zinc-950 overflow-hidden shadow-2xl shadow-black/90 group transition-all duration-300 hover:scale-105 hover:border-violet-400",children:e.jsx("div",{className:"relative w-full h-full",children:o?e.jsxs("div",{className:"w-full h-full bg-zinc-900 flex flex-col items-center justify-center text-zinc-600 gap-1",children:[e.jsx(Rs,{className:"w-6 h-6 text-zinc-500"}),e.jsx("span",{className:"text-[9px] font-mono uppercase",children:"Camera Off"})]}):e.jsx("img",{src:"/candidate_webcam_feed.png",alt:"Candidate Webcam Feed",className:"w-full h-full object-cover object-center filter brightness-[0.95] contrast-[1.05]"})})})]}),e.jsxs("div",{className:"p-4 sm:p-5 bg-zinc-900/90 border-t border-white/[0.08] flex flex-col sm:flex-row items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-center sm:justify-start gap-2.5 sm:gap-3",children:[e.jsx("button",{onClick:()=>u(!h),className:v("w-11 h-11 rounded-2xl flex items-center justify-center border transition-all cursor-pointer shadow-lg active:scale-95",h?"bg-rose-500/20 border-rose-500/40 text-rose-400 hover:bg-rose-500/30":"bg-zinc-800/80 border-zinc-700 text-zinc-200 hover:bg-zinc-700"),title:h?"Unmute Mic":"Mute Mic",children:h?e.jsx(mr,{className:"w-5 h-5"}):e.jsx(Va,{className:"w-5 h-5 text-violet-400"})}),e.jsx("button",{onClick:()=>m(!o),className:v("w-11 h-11 rounded-2xl flex items-center justify-center border transition-all cursor-pointer shadow-lg active:scale-95",o?"bg-rose-500/20 border-rose-500/40 text-rose-400 hover:bg-rose-500/30":"bg-zinc-800/80 border-zinc-700 text-zinc-200 hover:bg-zinc-700"),title:o?"Turn Camera On":"Turn Camera Off",children:o?e.jsx(Rs,{className:"w-5 h-5"}):e.jsx(Os,{className:"w-5 h-5 text-emerald-400"})}),e.jsx("div",{className:"h-6 w-px bg-zinc-800 mx-1"}),e.jsx("button",{onClick:j,disabled:s||h,className:v("inline-flex items-center justify-center gap-2.5 px-5 sm:px-6 py-3 min-h-[44px] rounded-2xl font-semibold text-xs font-mono transition-all shadow-xl active:scale-95 cursor-pointer border w-full sm:w-auto",s?"bg-violet-600/30 border-violet-500/50 text-violet-300 cursor-not-allowed":"bg-violet-600 hover:bg-violet-500 text-white border-violet-400 shadow-violet-600/25"),children:s?e.jsxs(e.Fragment,{children:[e.jsx(Me,{className:"w-4 h-4 animate-spin text-violet-300"}),e.jsx("span",{children:"Processing Live Candidate Response..."})]}):e.jsxs(e.Fragment,{children:[e.jsx(ht,{className:"w-3.5 h-3.5 fill-current"}),e.jsx("span",{children:"Start AI Mock Interview Demo"})]})})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-[10px] font-mono text-zinc-400 uppercase tracking-wider hidden md:inline",children:"Microphone Input Stream"}),e.jsx("div",{className:"flex items-end gap-1 h-6 px-3 py-1 bg-zinc-950 rounded-xl border border-white/[0.06]",children:f.map((k,I)=>e.jsx(A.div,{animate:{height:`${k}px`},transition:{duration:.1},className:v("w-1 rounded-full transition-colors",s?"bg-violet-400 shadow-[0_0_8px_rgba(167,139,250,0.8)]":"bg-zinc-800")},I))})]})]})]})})}),e.jsxs("div",{className:v("grid grid-cols-1 lg:grid-cols-12 gap-8 items-start mb-16",N==="report"?"grid":"hidden lg:grid"),children:[e.jsx(A.div,{initial:{opacity:0,x:-30},whileInView:{opacity:1,x:0},viewport:{once:!0,amount:.15},transition:{duration:.6,delay:.1,ease:[.16,1,.3,1]},className:"lg:col-span-6",children:e.jsxs("div",{className:"p-6 rounded-3xl border border-white/[0.08] bg-zinc-950/80 shadow-xl space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-800/80 pb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(hr,{className:"w-4 h-4 text-emerald-400"}),e.jsx("span",{className:"text-xs font-mono font-bold text-white uppercase tracking-wider",children:"Real-time Candidate Response Log"})]}),e.jsx("span",{className:"text-[10px] font-mono text-zinc-500",children:s?"Transcribing...":b?"Recorded":"Awaiting Response"})]}),e.jsxs("div",{className:"p-4 rounded-2xl bg-zinc-900/50 border border-zinc-800/60 min-h-[110px] flex flex-col justify-between font-mono text-xs text-zinc-300 leading-relaxed",children:[e.jsxs("div",{children:[b||e.jsx("span",{className:"text-zinc-600 italic",children:'Click "Start AI Mock Interview Demo" above to observe the live candidate response evaluation pipeline...'}),s&&e.jsx("span",{className:"inline-block w-1.5 h-3.5 bg-violet-400 ml-1 animate-pulse"})]}),e.jsxs("div",{className:"mt-3 pt-2 border-t border-zinc-800/50 flex justify-between text-[10px] text-zinc-500",children:[e.jsx("span",{children:"Engine: PyNyx Neural Whisper-v3"}),e.jsx("span",{children:"Confidence: 98.4%"})]})]})]})}),e.jsx(A.div,{initial:{opacity:0,x:30},whileInView:{opacity:1,x:0},viewport:{once:!0,amount:.15},transition:{duration:.6,delay:.2,ease:[.16,1,.3,1]},className:"lg:col-span-6",children:e.jsxs("div",{className:"p-6 rounded-3xl border border-white/[0.08] bg-zinc-950/80 shadow-xl space-y-5",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-800/80 pb-3",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] font-mono text-violet-400 uppercase tracking-widest font-bold",children:"Executive Evaluation Report"}),e.jsx("h4",{className:"text-sm font-bold text-white",children:"AI Mock Interview Analytics"})]}),e.jsxs("div",{className:"px-3 py-1 rounded-xl bg-violet-500/10 border border-violet-500/30 text-violet-300 text-xs font-bold font-mono shadow-[0_0_12px_rgba(139,92,246,0.2)]",children:["Overall: ",r.score.overall,"%"]})]}),e.jsxs("div",{className:"space-y-3 font-mono text-xs",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between mb-1 text-zinc-300",children:[e.jsx("span",{children:"Technical & Algorithmic Accuracy"}),e.jsxs("span",{className:"text-cyan-400 font-bold",children:[r.score.technical,"%"]})]}),e.jsx("div",{className:"w-full h-2 rounded-full bg-zinc-900 overflow-hidden",children:e.jsx(A.div,{initial:{width:0},whileInView:{width:`${r.score.technical}%`},transition:{duration:.8,ease:"easeOut"},className:"h-full bg-cyan-400 rounded-full"})})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between mb-1 text-zinc-300",children:[e.jsx("span",{children:"Verbal Communication & Articulation"}),e.jsxs("span",{className:"text-emerald-400 font-bold",children:[r.score.communication,"%"]})]}),e.jsx("div",{className:"w-full h-2 rounded-full bg-zinc-900 overflow-hidden",children:e.jsx(A.div,{initial:{width:0},whileInView:{width:`${r.score.communication}%`},transition:{duration:.8,delay:.1,ease:"easeOut"},className:"h-full bg-emerald-400 rounded-full"})})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between mb-1 text-zinc-300",children:[e.jsx("span",{children:"Problem Solving Speed & Confidence"}),e.jsxs("span",{className:"text-amber-400 font-bold",children:[r.score.confidence,"%"]})]}),e.jsx("div",{className:"w-full h-2 rounded-full bg-zinc-900 overflow-hidden",children:e.jsx(A.div,{initial:{width:0},whileInView:{width:`${r.score.confidence}%`},transition:{duration:.8,delay:.2,ease:"easeOut"},className:"h-full bg-amber-400 rounded-full"})})]})]}),e.jsx("div",{className:"space-y-2 pt-1",children:r.feedback.map((k,I)=>e.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-xl bg-zinc-900/60 border border-zinc-800/60 text-xs text-zinc-300 font-sans",children:[e.jsx(qe,{className:"w-3.5 h-3.5 text-emerald-400 shrink-0"}),e.jsx("span",{children:k})]},I))})]})})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:eo.map((k,I)=>{const _=k.icon;return e.jsxs(A.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.4,delay:I*.1},className:"p-6 rounded-3xl border border-white/[0.08] bg-zinc-900/30 hover:bg-zinc-900/60 hover:border-violet-500/30 transition-all group",children:[e.jsx("div",{className:"w-10 h-10 rounded-2xl bg-violet-500/10 border border-violet-500/20 flex items-center justify-center text-violet-400 mb-4 group-hover:scale-110 transition-transform",children:e.jsx(_,{className:"w-5 h-5"})}),e.jsx("h3",{className:"text-sm font-bold text-white mb-2",children:k.title}),e.jsx("p",{className:"text-xs text-zinc-400 leading-relaxed font-normal",children:k.desc})]},k.title)})})]})]})},ds=[{id:"beginner",name:"30-Day Foundation",tagline:"Arrays, Strings, Hashing & Pointers",color:"#10b981",days:30,totalQuestions:75,description:"Build fundamental problem-solving skills. Learn time/space complexity, array manipulation, and basic recursion.",topics:["Arrays & Matrices","Two Pointers","Sliding Window","Hashing Maps","Recursion Fundamentals"],problems:[{id:"1",title:"Two Sum",difficulty:"Easy",solved:!0,acceptance:"52%"},{id:"217",title:"Contains Duplicate",difficulty:"Easy",solved:!0,acceptance:"61%"},{id:"242",title:"Valid Anagram",difficulty:"Easy",solved:!0,acceptance:"64%"},{id:"125",title:"Valid Palindrome",difficulty:"Easy",solved:!0,acceptance:"46%"},{id:"121",title:"Best Time to Buy and Sell Stock",difficulty:"Easy",solved:!0,acceptance:"54%"},{id:"206",title:"Reverse Linked List",difficulty:"Easy",solved:!0,acceptance:"74%"},{id:"70",title:"Climbing Stairs",difficulty:"Easy",solved:!1,acceptance:"52%"}]},{id:"intermediate",name:"45-Day Intermediate",tagline:"Trees, Graphs & Dynamic Programming",color:"#f59e0b",days:45,totalQuestions:120,description:"Master essential interview patterns. Tree traversals, BFS/DFS graph search, backtracking, and standard DP subproblems.",topics:["Binary Search & Trees","Graphs (BFS/DFS)","Backtracking","Dynamic Programming","Heaps & Priority Queues"],problems:[{id:"3",title:"Longest Substring Without Repeating Characters",difficulty:"Medium",solved:!0,acceptance:"34%"},{id:"15",title:"3Sum",difficulty:"Medium",solved:!0,acceptance:"33%"},{id:"102",title:"Binary Tree Level Order Traversal",difficulty:"Medium",solved:!1,acceptance:"67%"},{id:"200",title:"Number of Islands",difficulty:"Medium",solved:!1,acceptance:"58%"},{id:"46",title:"Permutations",difficulty:"Medium",solved:!1,acceptance:"78%"},{id:"198",title:"House Robber",difficulty:"Medium",solved:!1,acceptance:"51%"},{id:"300",title:"Longest Increasing Subsequence",difficulty:"Medium",solved:!1,acceptance:"55%"}]},{id:"advanced",name:"60-Day Advanced",tagline:"Advanced DP, Segment Trees & Tries",color:"#ef4444",days:60,totalQuestions:160,description:"Conquer hard interview questions. Hard DP states, bitmasking, graph shortest paths (Dijkstra, Floyd-Warshall), and Tries.",topics:["Segment Trees","Tries & String Algo","Bitmask DP","Shortest Path Algos","System Level DSA"],problems:[{id:"76",title:"Minimum Window Substring",difficulty:"Hard",solved:!1,acceptance:"41%"},{id:"212",title:"Word Search II (Trie & Backtracking)",difficulty:"Hard",solved:!1,acceptance:"37%"},{id:"312",title:"Burst Balloons (Interval DP)",difficulty:"Hard",solved:!1,acceptance:"59%"},{id:"72",title:"Edit Distance",difficulty:"Hard",solved:!1,acceptance:"56%"},{id:"269",title:"Alien Dictionary (Graph Topological Sort)",difficulty:"Hard",solved:!1,acceptance:"36%"},{id:"84",title:"Largest Rectangle in Histogram",difficulty:"Hard",solved:!1,acceptance:"44%"}
31,{id:"307",title:"Range Sum Query - Mutable (Segment Tree)",difficulty:"Medium",solved:!1,acceptance:"42%"}]}],so={Easy:"text-emerald-400 bg-emerald-500/10 border-emerald-500/20",Medium:"text-amber-400 bg-amber-500/10 border-amber-500/20",Hard:"text-rose-400 bg-rose-500/10 border-rose-500/20"},ao=()=>{const[t,i]=a.useState(0),s=ds[t];return e.jsx("section",{className:"py-20 bg-zinc-950 text-zinc-100",children:e.jsxs("div",{className:"container mx-auto px-4 max-w-6xl",children:[e.jsxs(A.div,{initial:{opacity:0,y:25},whileInView:{opacity:1,y:0},viewport:{once:!0,amount:.15},transition:{duration:.5,ease:[.16,1,.3,1]},className:"flex flex-col md:flex-row md:items-end justify-between mb-12 pb-6 border-b border-zinc-800/80 gap-4",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-xs font-mono text-violet-400 uppercase tracking-wider font-semibold",children:"Curated Learning Tracks"}),e.jsx("h2",{className:"text-3xl sm:text-4xl font-extrabold text-white mt-1",children:"Structured DSA Roadmaps"})]}),e.jsx("p",{className:"text-sm text-zinc-400 max-w-md",children:"Follow a proven sequence of problems categorized by pattern and difficulty. Stop solving random questions without a plan."})]}),e.jsx("div",{className:"flex md:hidden items-center gap-1.5 p-1 bg-zinc-900 border border-zinc-800 rounded-xl mb-6 overflow-x-auto font-mono text-xs",children:ds.map((l,h)=>e.jsxs("button",{onClick:()=>i(h),className:v("flex-1 py-2.5 px-3 rounded-lg font-semibold whitespace-nowrap transition-all flex items-center justify-center gap-1.5 cursor-pointer",t===h?"bg-violet-600 text-white shadow-md font-bold":"text-zinc-400 hover:text-zinc-200"),children:[e.jsxs("span",{children:[l.days," Days"]}),e.jsxs("span",{className:"text-[10px] opacity-75",children:["(",l.totalQuestions," Qs)"]})]},l.id))}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5 mb-10",children:ds.map((l,h)=>{const u=h===t;return e.jsxs(A.button,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,amount:.15},transition:{duration:.5,delay:h*.1,ease:[.16,1,.3,1]},onClick:()=>i(h),className:v("p-5 rounded-xl border text-left transition-all duration-200 cursor-pointer relative overflow-hidden",u?"border-violet-500/50 bg-zinc-900 shadow-xl shadow-violet-950/20 block":"border-zinc-800/80 bg-zinc-900/40 hover:border-zinc-700 hover:bg-zinc-900/60 hidden md:block"),children:[u&&e.jsx("div",{className:"absolute top-0 left-0 right-0 h-0.5 bg-violet-500"}),e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("span",{className:"text-xs font-mono font-medium px-2 py-0.5 rounded",style:{color:l.color,backgroundColor:`${l.color}15`},children:[l.days," Days"]}),e.jsxs("span",{className:"text-xs text-zinc-500 font-mono",children:[l.totalQuestions," Problems"]})]}),e.jsx("h3",{className:"text-lg font-bold text-white mb-1",children:l.name}),e.jsx("p",{className:"text-xs text-zinc-400 mb-3",children:l.tagline}),e.jsx("p",{className:"text-xs text-zinc-500 leading-relaxed mb-4",children:l.description}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:l.topics.map(o=>e.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded bg-zinc-800/80 text-zinc-300 border border-zinc-700/50",children:o},o))})]},l.id)})}),e.jsxs(A.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,amount:.15},transition:{duration:.6,delay:.35,ease:[.16,1,.3,1]},className:"rounded-xl border border-zinc-800 bg-zinc-900/50 overflow-hidden shadow-2xl",children:[e.jsxs("div",{className:"flex items-center justify-between px-3 sm:px-5 py-3 border-b border-zinc-800 bg-zinc-900/80",children:[e.jsxs("div",{className:"flex items-center gap-2 font-mono text-xs text-zinc-300 truncate pr-2",children:[e.jsx(Be,{className:"w-4 h-4 text-violet-400 shrink-0"}),e.jsxs("span",{className:"truncate",children:[s.name," — Target Problem List"]})]}),e.jsx("span",{className:"text-[10px] sm:text-xs text-zinc-500 font-mono shrink-0",children:"Sample Problems"})]}),e.jsx(nt,{mode:"wait",children:e.jsx(A.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{duration:.2},className:"divide-y divide-zinc-800/60",children:s.problems.map(l
31=>e.jsxs(fe,{to:`/problem/${l.id}`,className:"flex items-center justify-between px-3 sm:px-5 py-3.5 min-h-[48px] hover:bg-zinc-900/80 transition-colors gap-2 group block",children:[e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 min-w-0 pr-2",children:[e.jsxs("span",{className:"w-8 text-xs font-mono text-zinc-500 shrink-0",children:["#",l.id]}),e.jsx("span",{className:"text-xs sm:text-sm font-medium text-zinc-200 group-hover:text-violet-300 transition-colors truncate",children:l.title})]}),e.jsxs("div",{className:"flex items-center gap-2 sm:gap-4 shrink-0",children:[e.jsxs("span",{className:"text-xs font-mono text-zinc-500 hidden sm:inline",children:["Acc: ",l.acceptance]}),e.jsx("span",{className:v("text-[10px] sm:text-xs font-mono px-2 py-0.5 rounded border",so[l.difficulty]),children:l.difficulty})]})]},l.id))},s.id)}),e.jsxs("div",{className:"p-3.5 sm:p-4 border-t border-zinc-800 bg-zinc-950 flex flex-col sm:flex-row items-center justify-between gap-2.5 text-xs text-center sm:text-left",children:[e.jsx("span",{className:"text-zinc-500 text-[11px] sm:text-xs",children:"Includes solution editorials & Socratic hint support for Python, C++, Java, and JS"}),e.jsxs(fe,{to:"/signup",className:"w-full sm:w-auto py-2 sm:py-0 min-h-[44px] text-violet-400 hover:text-violet-300 font-semibold flex items-center justify-center gap-1 shrink-0 whitespace-nowrap",children:["Enroll in ",s.name," ",e.jsx(Ae,{className:"w-3.5 h-3.5"})]})]})]})]})})},oe={body:"#374151",dark:"#111827",name:"#111827",date:"#4b5563",border:"#cbd5e1",white:"#FFFFFF"},ue={serif:"Lora",serifFallback:"'Lora', 'Playfair Display', Georgia, 'Times New Roman', serif",sans:"Inter",sansFallback:"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"},U={name:{fontSize:25,fontWeight:700,lineHeight:1.15},role:{fontSize:9.5,fontWeight:700,letterSpacing:3.5,lineHeight:1.25},contact:{fontSize:7.75,lineHeight:1.25},sectionHeading:{fontSize:11.5,fontWeight:700,letterSpacing:1.2,lineHeight:1.2},body:{fontSize:9,lineHeight:1.28},entryHeader:{fontSize:9.5,fontWeight:700,lineHeight:1.22},entrySub:{fontSize:9,lineHeight:1.22},projectTech:{fontSize:8.75},skills:{fontSize:9,lineHeight:1.28},impact:{fontSize:9,fontWeight:700}},le={leftColumnWidthPercent:55,rightColumnWidthPercent:45,leftColumnWidthPt:327.4,rightColumnWidthPt:267.88,headerHeightPt:145,headerPaddingTop:20,headerPaddingBottom:16,headerPaddingLeftRight:16,leftContentPaddingTop:12,leftContentPaddingBottom:12,leftContentPaddingLeftRight:16,rightContentPaddingTop:16,rightContentPaddingBottom:12,rightContentPaddingLeftRight:16,sectionMarginTop:10,sectionMarginBottom:4,sectionHeadingPaddingBottom:2,sectionBorderWidth:.75,entryMarginBottom:6,bulletListMarginTop:2,bulletItemMarginBottom:2,bulletSignWidth:9,bulletPaddingLeft:6,summaryMarginBottom:4,summaryLineHeight:1.28},io=({color:t})=>e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:t,style:{display:"inline-block",verticalAlign:"middle"},children:e.jsx("path",{d:"M12 0L14.59 9.41L24 12L14.59 14.59L12 24L9.41 14.59L0 12L9.41 9.41L12 0Z"})}),ea=({data:t,themeColor:i="#375470"})=>{var b,w;const s=(d,g)=>{d=d.replace(/^#/,"");const f=parseInt(d.substring(0,2),16)||0,p=parseInt(d.substring(2,4),16)||0,N=parseInt(d.substring(4,6),16)||0;return`rgba(${f}, ${p}, ${N}, ${g})`},l=({title:d})=>e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",borderBottom:`${le.sectionBorderWidth}pt solid ${i}`,paddingBottom:`${le.sectionHeadingPaddingBottom}pt`,marginTop:`${le.sectionMarginTop}pt`,marginBottom:`${le.sectionMarginBottom}pt`},children:[e.jsx("h3",{style:{fontSize:`${U.sectionHeading.fontSize}pt`,fontWeight:U.sectionHeading.fontWeight,fontFamily:ue.serifFallback,textTransform:"uppercase",color:oe.dark,letterSpacing:`${U.sectionHeading.letterSpacing}pt`,lineHeight:U.sectionHeading.lineHeight,margin:0,padding:0},children:d}),e.jsx(io,{color:i})]}),h=({desc:d})=>e.jsxs("div",{style:{display:"flex",flexDirection:"row",marginBottom:`${le.bulletItemMarginBottom}pt`,alignItems:"flex-start"},children:[e.jsx("span",{style:{width:`${le.bulletSignWidth}pt`,minWidth:`${le.bulletSignWidth}pt`,color:oe.body,fontSize:`${U.body.fontSize}pt`,lineHeight:U.body.lineHeight,fontFamily:ue.serifFallback},children:"•"}),e.jsx("span",{style:{flex:1,fontSize:`${U.body.fontSize}pt`,lineHeight:U.body.lineHeight,color:oe.body,fontFamily:ue.serifFallback,textAlign:"justify"},children:d})]}),u=(()=>{const d=(t.personalInfo.name||"").trim(),g=d.split(/\s+/);if(g.length===1){const f=d.toLowerCase();if(f.startsWith("rongala")&&f.endsWith("manindra"))return["Rongala","Manindra"];const p=d.split(/(?=[A-Z])/);if(p.length>1)return p}return g})(),o=u[0]||"",m=u.slice(1).join(" ")||"";return e.jsxs("div",{className:"modern-resume-root",style:{fontFamily:ue.serifFallback,color:oe.body,width:"595.28pt",he
31ight:"841.89pt",boxSizing:"border-box",fontSize:`${U.body.fontSize}pt`,lineHeight:U.body.lineHeight,backgroundColor:oe.white,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",display:"flex",flexDirection:"row",overflow:"hidden",position:"relative"},children:[e.jsx("style",{children:`
32                @import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,700&family=Playfair+Display:ital,wght@0,600;0,700;1,400&family=Inter:wght@400;500;600;700&display=swap');
33
34                .modern-resume-root,
35                .modern-resume-root *,
36                .modern-resume-root *::before,
37                .modern-resume-root *::after {
38                    box-sizing: border-box;
39                    border-width: 0;
40                    border-style: solid;
41                    border-color: currentColor;
42                    margin: 0;
43                    padding: 0;
44                    text-decoration: none;
45                }
46
47                .modern-resume-root {
48                    font-family: ${ue.serifFallback};
49                    line-height: ${U.body.lineHeight};
50                    -webkit-text-size-adjust: 100%;
51                }
52            `}),e.jsxs("div",{style:{width:`${le.leftColumnWidthPercent}%`,borderRight:`${le.sectionBorderWidth}pt solid ${oe.border}`,display:"flex",flexDirection:"column",height:"100%",boxSizing:"border-box"},children:[e.jsxs("div",{style:{paddingTop:`${le.headerPaddingTop}pt`,paddingBottom:`${le.headerPaddingBottom}pt`,paddingLeft:`${le.headerPaddingLeftRight}pt`,paddingRight:`${le.headerPaddingLeftRight}pt`,borderBottom:`${le.sectionBorderWidth}pt solid ${oe.border}`,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",textAlign:"center",height:`${le.headerHeightPt}pt`,boxSizing:"border-box",backgroundColor:s(i,.04),position:"relative"},children:[e.jsxs("h1",{style:{fontSize:`${U.name.fontSize}pt`,fontWeight:U.name.fontWeight,color:oe.name,lineHeight:U.name.lineHeight,fontFamily:ue.serifFallback,marginBottom:"3pt"},children:[o,m&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),m]})]}),e.jsx("div",{style:{fontSize:`${U.role.fontSize}pt`,fontWeight:U.role.fontWeight,letterSpacing:`${U.role.letterSpacing}pt`,color:i,textTransform:"uppercase",fontFamily:ue.serifFallback,marginTop:"2pt",marginBottom:"5pt"},children:t.personalInfo.role}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",fontSize:`${U.contact.fontSize}pt`,lineHeight:U.contact.lineHeight,color:oe.body,fontFamily:ue.serifFallback,maxWidth:"95%",textAlign:"center"},children:[t.personalInfo.email&&e.jsxs("div",{children:[t.personalInfo.email,t.personalInfo.phone&&e.jsxs(e.Fragment,{children:[" • ",t.personalInfo.phone," •"]})]}),(t.personalInfo.location||t.personalInfo.linkedin)&&e.jsxs("div",{children:[t.personalInfo.location,t.personalInfo.linkedin&&e.jsxs(e.Fragment,{children:[" • ",e.jsx("a",{href:t.personalInfo.linkedin.startsWith("http")?t.personalInfo.linkedin:`https://${t.personalInfo.linkedin}`,target:"_blank",rel:"noreferrer",style:{color:i,textDecoration:"none"},children:t.personalInfo.linkedin.replace(/^(https?:\/\/)?(www\.)?/,"")})," •"]})]}),(t.personalInfo.github||t.personalInfo.portfolio)&&e.jsxs("div",{children:[t.personalInfo.github&&e.jsx("a",{href:t.personalInfo.github.startsWith("http")?t.personalInfo.github:`https://${t.personalInfo.github}`,target:"_blank",rel:"noreferrer",style:{color:i,textDecoration:"none"},children:t.personalInfo.github.replace(/^(https?:\/\/)?(www\.)?/,"")}),t.personalInfo.portfolio&&e.jsxs(e.Fragment,{children:[t.personalInfo.github&&e.jsx(e.Fragment,{children:" • "}),e.jsx("a",{href:t.personalInfo.portfolio.startsWith("http")?t.personalInfo.portfolio:`https://${t.personalInfo.portfolio}`,target:"_blank",rel:"noreferrer",style:{color:i,textDecoration:"none"},children:t.personalInfo.portfolio.replace(/^(https?:\/\/)?(www\.)?/,"")})]})]})]})]}),e.jsxs("div",{style:{paddingTop:`${le.leftContentPaddingTop}pt`,paddingBottom:`${le.leftContentPaddingBottom}pt`,paddingLeft:`${le.leftContentPaddingLeftRight}pt`,paddingRight:`${le.leftContentPaddingLeftRight}pt`,flex:1,boxSizing:"border-box"},children:[t.experience.length>0&&e.jsxs("div",{children:[e.jsx(l,{title:"Experience"}),t.experience.map(d=>e.jsxs("div",{style:{marginBottom:`${le.entryMarginBottom}pt`},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",marginBottom:"1pt"},children:[e.jsx("h5",{style:{fontFamily:ue.serifFallback,fontWeight:U.entryHeader.fontWeight,fontSize:`${U.entryHeader.fontSize}pt`,color:oe.dark,textTransform:"uppercase",margin:0},children:d.title}),e.jsx("span",{style:{fontFamily:ue.serifFallback,fontWeight:U.entryHeader.fontWeight,fontSize:`${U.entrySub.fontSize}pt`,color:oe.date,whiteSpace:"nowrap",textTransform:"uppercase",letterSpacing:"0.5pt"},children:d.date})]}),e.jsxs("div",{style:{fontFamily:ue.serifFallback,fontStyle:"italic",fontSize:`${U.entrySub.fontSize}pt`,color:oe.body,marginBottom:"3pt"},children:[d.company,d.location?`, ${d.location}`:""]}),e.jsx("div",{style:{display:"flex",flexDirection:"column"},children:d.description.filter(g=>g.trim()).map((g,f)=>e.jsx(h,{desc:g},f))})]},d.id))]}),t.education.length>0&&e.jsxs("div",{children:[e.jsx(l,{title:"Education"}),t.education.map(d=>e.jsxs("div",{style:{marginBottom:`${le.entryMarginBottom}pt`},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",marginBottom:"1pt"},children:[e.jsx("h5",{style:{fontFamily:ue.serifFallback,fontWeight:U.entryHeader.fontWeight,fontSize:`${U.entryHeader.fontSize}pt`,color:oe.dark,textTransform:"uppercase",margin:0},children:d.degree}),e.jsx("span",{style:{fontFamily:ue.serifFallback,fontWeight:U.entryHeader.fontWeight,fontSize:`${U.entrySub.fontSize}pt`,color:oe.date,whiteSpace:"nowrap"},children:d.date?`- ${d.date}`:""})]}),e.jsx("div",{style:{fontFamily:ue.serifFallback,fontSize:`${U.entrySub.fontSize}pt`,color:oe.body},children:d.school}),d.gpa&&e.jsxs("div",{style:{fontSize:`${U.body.fontSize}pt`,color:oe.body,fontStyle:"italic",marginTop:"1pt",fontFamily:ue.serifFallback},children:["GPA: ",d.gpa]}),d.details&&e.jsx("div",{style:{fontSize:`${U.body.fontSize}pt`,color:oe.body,marginTop:"1pt",fontFamily:ue.serifFallback},children:d.details})]},d.id))]}),((b=t.achievements)==null?void 0:b.length)>0&&e.jsxs("div",{children:[e.jsx(l,{title:"Achievements"}),e.jsx("div",{style:{display:"flex",flexDirection:"column"},children:t.achievements.map((d,g)=>e.jsx(h,{desc:d},g))})]}),e.jsxs("div",{children:[e.jsx(l,{title:"Skills"}),e.jsxs("div",{style:{fontSize:`${U.skills.fontSize}pt`,lineHeight:U.skills.lineHeight,color:oe.body,fontFamily:ue.serifFallback},children:[t.skills.languages&&e.jsxs("div",{style:{marginBottom:"3pt"},children:[e.jsx("strong",{style:{fontWeight:"bold",color:oe.dark},children:"Languages:"})," ",t.skills.languages]}),t.skills.frameworks&&e.jsxs("div",{style:{marginBottom:"3pt"},children:[e.jsx("strong",{style:{fontWeight:"bold",color:oe.dark},children:"Frameworks:"})," ",t.skills.frameworks]}),t.skills.tools&&e.jsxs("div",{style:{marginBottom:"3pt"},children:[e.jsx("strong",{style:{fontWeight:"bold",color:oe.dark},children:"Tools:"})," ",t.skills.tools]}),t.skills.databases&&e.jsxs("div",{style:{marginBottom:"3pt"},children:[e.jsx("strong",{style:{fontWeight:"bold",color:oe.dark},children:"Databases:"})," ",t.skills.databases]})]})]}),((w=t.certifications)==null?void 0:w.length)>0&&e.jsxs("div",{children:[e.jsx(l,{title:"Certifications"}),e.jsx("div",{style:{display:"flex",flexDirection:"column"},children:t.certifications.map((d,g)=>e.jsx(h,{desc:d},g))})]})]})]}),e.jsx("div",{style:{width:`${le.rightColumnWidthPercent}%`,backgroundColor:oe.white,display:"flex",flexDirection:"column",height:"100%",boxSizing:"border-box"},children:e.jsxs("div",{style:{paddingTop:`${le.rightContentPaddingTop}pt`,paddingBottom:`${le.rightContentPaddingBottom}pt`,paddingLeft:`${le.rightContentPaddingLeftRight}pt`,paddingRight:`${le.rightContentPaddingLeftRight}pt`,flex:1,boxSizing:"border-box"},children:[t.personalInfo.summary&&e.jsxs("div",{children:[e.jsx(l,{title:"Summary"}),e.jsx("p",{style:{fontSize:`${U.body.fontSize}pt`,lineHeight:le.summaryLineHeight,color:oe.body,fontFamily:ue.serifFallback,textAlign:"justify",margin:0},children:t.personalInfo.summary})]}),t.projects.length>0&&e.jsxs("div",{children:[e.jsx(l,{title:"Projects"}),t.projects.map(d=>e.jsxs("div",{style:{marginBottom:`${le.entryMarginBottom}pt`},children:[e.jsxs("div",{style:{marginBottom:"2pt"},children:[e.jsxs("span",{style:{fontFamily:ue.serifFallback,fontWeight:U.entryHeader.fontWeight,fontSize:`${U.entryHeader.fontSize}pt`,color:oe.dark,textTransform:"uppercase"},children:[d.name,d.tech?" | ":""]}),d.tech&&e.jsx("span",{style:{fontFamily:ue.serifFallback,fontWeight:"normal",fontSize:`${U.projectTech.fontSize}pt`,color:oe.body},children:d.tech})]}),d.projectDescription&&e.jsx("p",{style:{fontFamily:ue.serifFallback,fontStyle:"italic",fontSize:`${U.body.fontSize}pt`,color:oe.body,lineHeight:U.body.lineHeight,marginBottom:"3pt",textAlign:"justify",margin:0},children:d.projectDescription}),e.jsx("div",{style:{display:"flex",flexDirection:"column"},children:d.description.filter(g=>g.trim()).map((g,f)=>e.jsx(h,{desc:g},f))}),d.impact&&e.jsxs("p",{style:{fontFamily:ue.serifFallback,fontWeight:"bold",fontSize:`${U.impact.fontSize}pt`,color:oe.dark,marginTop:"3pt",lineHeight:U.body.lineHeight,textAlign:"left",margin:0},children:["Impact: ",d.impact]})]},d.id))]})]})})]})},ro={personalInfo:{name:"karthik Virodhula",role:"Software Engineer",email:"[email protected]",phone:"+91 9182017247",location:"Hyderabad, India",github:"github.com/karthikvirodhula",linkedin:"linkedin.com/in/karthik-virodhula-8431b5254",portfolio:"",summary:"Aspiring Softw
52are Engineer with a focus on Computer Vision and Frontend Development. Proficient in Python, React, and OpenCV with a proven ability to build interactive, data-driven applications. Passionate about creating seamless user experiences and solving real-world problems through clean, efficient, and scalable code."},skills:{languages:"Python, JavaScript (ES6+), TypeScript, HTML5, CSS3, SQL",frameworks:"React, Tailwind CSS, Bootstrap, Vite, Framer Motion, Streamlit, TensorFlow/Keras",tools:"Git, OpenCV, MediaPipe, NumPy, Pygame, TMDB API",databases:"SQL, Data Analytics, Machine Learning, Power BI"},experience:[{id:"exp1",title:"Machine Learning Engineer Trainee",company:"Tanthran Information Systems Pvt. Ltd.",location:"",date:"May 2025 - Jan 2026",description:["Designed and deployed multiple end-to-end AI and data-driven solutions from MVP to production. Built Retrieval-Augmented Generation (RAG) applications integrating GitHub and Jera MCP servers to automate workflows—boosting employee productivity by 70%.","Developed voice-based AI agents for customer service and appointment booking, improving engagement by 40% and reducing wait times by 90%.","Implemented agentic automations to streamline enterprise operations and reduce manual intervention. Integrated high-precision similarity search and ranking pipelines (HNSW, MiniLM, CrossEncoder).","Developed secure, scalable FastAPI backends with authentication, access control, and API orchestration. Deployed production-ready solutions on AWS (S3, RDS, Elastic Beanstalk) and Render for high reliability and performance."]}],projects:[{id:"p1",name:"Yogamate",tech:"Python, Streamlit, MediaPipe, OpenCV, NumPy, Pygame, TensorFlow/Keras",date:"",projectDescription:"An AI-powered smart mirror that uses computer vision and deep learning to provide real-time feedback on yoga postures.",description:["Developed an AI-powered yoga pose correction system using MediaPipe and TensorFlow, processing 33 body landmarks in real-time.","Engineered a computer vision pipeline integrating OpenCV and audio feedback, reducing posture correction latency for smart mirror applications.","Implemented an ANN-based classification model to analyze user form, achieving real-time feedback across multiple yoga sessions."],impact:"Successfully integrated 33-landmark pose estimation with real-time audio feedback to improve user form accuracy."},{id:"p2",name:"Shrimp-Seed-Count",tech:"Python, OpenCV, Streamlit, NumPy",date:"",projectDescription:"A computer vision tool that automates the counting of shrimp seeds in images using OpenCV and a Streamlit web interface.",description:["Developed a computer vision application using OpenCV and Streamlit to automate shrimp seed counting for agricultural efficiency.","Engineered a streamlined image processing pipeline capable of handling various image formats and user-uploaded inputs."],impact:"Provides a rapid, automated alternative to manual counting, reducing processing time for agricultural quality control."},{id:"p3",name:"IMBD_Clone0",tech:"HTML5, CSS3, JavaScript (ES6+), TMDB API",date:"",projectDescription:"A front-end movie database clone that allows users to browse and search for films using real-time data from the TMDB API.",description:["Developed a dynamic movie discovery application using JavaScript and the TMDB API to fetch and render real-time cinematic data.","Engineered a modular front-end architecture across 21 files, ensuring clean separation of concerns between logic and styling."],impact:"Successfully integrated 3rd-party movie data to create a fully functional, dynamic content discovery interface."}],education:[{id:"edu1",degree:"BTech in CSE-AIML",school:"SRKR Bhimavaram",date:"Sep 2022 - Apr 2026",details:"",gpa:"8.88"}],achievements:["Lead my team to winning first place in Prajvalan, A National Level Hackathon.","Delivered a Lecture Series on Object Detection (R-CNN, Fast-RCNN, Faster-RCNN, YOLO, etc.)","Finalist - Internal Hackathon for Smart India Hackathon 2024."],certifications:["Introduction To Data Science With Python[HarvardX CS109x].","Complete Generative AI Course With Langchain and Huggingface."]},no={personalInfo:{name:"karthik Virodhula",role:"Software Engineer",email:"[email protected]",phone:"+91 9182017247",location:"Hyderabad, India",github:"github.com/karthikvirodhula",linkedin:"linkedin.com/in/karthik-virodhula-8431b5254",portfolio:"",summary:"Detail-oriented UI Developer with expertise in building responsive, user-centric web interfaces. Proficient in React, modern CSS frameworks, and JavaScript. Committed to convert
52ing complex designs into clean, scalable code while ensuring cross-browser compatibility and optimal performance. Passionate about delivering high-quality user experiences through collaborative development."},skills:{languages:"JavaScript (ES6+), TypeScript, HTML5, CSS3, Python, SQL",frameworks:"React, Tailwind CSS, Bootstrap, Vite, Radix UI, Framer Motion, GSAP, Lucide React",tools:"Git, TMDB API, Streamlit, OpenCV, MediaPipe, TensorFlow/Keras, NumPy, Pygame",databases:"PostgreSQL, MongoDB, Redis"},experience:[{id:"exp1",title:"Machine Learning Engineer Trainee",company:"Tanthran Information Systems Pvt. Ltd.",location:"",date:"May 2025 - Jan 2026",description:["Designed and deployed multiple end-to-end AI and data-driven solutions from MVP to production. Built Retrieval-Augmented Generation (RAG) applications integrating GitHub and Jera MCP servers to automate workflows—boosting employee productivity by 70%.","Developed voice-based AI agents for customer service and appointment booking, improving engagement by 40% and reducing wait times by 90%.","Implemented agentic automations to streamline enterprise operations and reduce manual intervention. Integrated high-precision similarity search and ranking pipelines (HNSW, MiniLM, CrossEncoder).","Developed secure, scalable FastAPI backends with authentication, access control, and API orchestration. Deployed production-ready solutions on AWS (S3, RDS, Elastic Beanstalk) and Render for high reliability and performance."]}],projects:[{id:"p1",name:"Dark-Port-React",tech:"React, GSAP, Framer Motion, Radix UI, Lucide React, Tailwind CSS",date:"",projectDescription:"A visually dynamic personal portfolio website featuring advanced animations and interactive sections to showcase professional experience.",description:["Developed a responsive portfolio website using React, Framer Motion, and GSAP to showcase professional ventures and projects.","Integrated 5+ interactive animation libraries to enhance user engagement and visual storytelling across the platform.","Managed project lifecycle through 90+ commits, ensuring consistent UI updates and feature deployments using modern React patterns.","Optimized component structure for modularity, utilizing Radix UI primitives to ensure accessibility and consistent design language."],impact:"Successfully deployed a high-fidelity interactive portfolio with 90+ commits and integrated multiple animation libraries for a polished user experience."},{id:"p2",name:"Portfoliolio",tech:"React, Vite, Bootstrap, JavaScript",date:"",projectDescription:"A personal portfolio website built with React to showcase professional work and skills.",description:["Developed a responsive personal portfolio website using React and Vite to showcase professional projects.","Engineered a modular component architecture comprising 20+ files to ensure maintainability and clean code practices.","Resolved deployment and environment configuration issues by integrating serve to optimize production builds."],impact:"Successfully deployed a functional web application with a modular architecture and optimized build pipeline."},{id:"p3",name:"IMBD_Clone0",tech:"HTML5, CSS3, JavaScript (ES6+), TMDB API",date:"",projectDescription:"A front-end movie database clone that allows users to browse and search for films using real-time data from the TMDB API.",description:["Developed a dynamic movie discovery application using JavaScript and the TMDB API to fetch and render real-time cinematic data.","Engineered a modular front-end architecture across 21 files, ensuring clean separation of concerns between logic and styling.","Implemented asynchronous data fetching using the Fetch API to handle 16+ internal functions for dynamic UI updates.","Designed a responsive user interface with CSS3 to display movie metadata and high-resolution posters fetched from external CDN endpoints."],impact:"Successfully integrated 3rd-party movie data to create a fully functional, dynamic content discovery interface."}],education:[{id:"edu1",degree:"BTech in CSE-AIML",school:"SRKR Bhimavaram",date:"Sep 2022 - Apr 2026",details:"",gpa:"8.88"}],achievements:["Lead my team to winning first place in Prajvalan, A National Level Hackathon.","Delivered a Lecture Series on Object Detection (R-CNN, Fast-RCNN, Faster-RCNN, YOLO, etc.)","Finalist - Internal Hackathon for Smart India Hackathon 2024."],certifications:["Introduction To Data Science With Python[HarvardX CS109x].","Complete Generative AI Course With Langchain and Huggingface."]},ms="We are looking for a UI Developer with experience in React, modern CSS frameworks, and JavaScript. The ideal candidate should have strong design-to-code skills, experience with responsive layouts, animation libraries, and component architecture...",Rt=794,Lt=1123;
52function oo(t,i,s){const[l,h]=a.useState("");return a.useEffect(()=>{if(!s){h("");return}let u=0;h("");const o=setInterval(()=>{u++,h(t.slice(0,u)),u>=t.length&&clearInterval(o)},i);return()=>clearInterval(o)},[t,i,s]),l}const lo=()=>{const[t,i]=a.useState("idle"),[s,l]=a.useState(0),[h,u]=a.useState(.45),[o,m]=a.useState(!1),b=a.useRef(null),w=a.useRef(null),d=a.useRef(!1),g=oo(ms,15,t==="typing"||t==="processing"||t==="done");a.useEffect(()=>{const T=()=>{if(w.current){const r=w.current.clientWidth;if(r>0){const c=Math.min(Math.max(r-32,240)/Rt,.95)*.82;u(c)}}};return T(),window.addEventListener("resize",T),()=>window.removeEventListener("resize",T)},[]),a.useEffect(()=>{const T=new IntersectionObserver(([r])=>{r.isIntersecting&&(m(!0),d.current||(d.current=!0,f()),T.disconnect())},{threshold:.12});return b.current&&T.observe(b.current),()=>T.disconnect()},[]);const f=()=>{i("typing"),setTimeout(()=>i("processing"),ms.length*15+500),setTimeout(()=>{i("done");let T=0;const r=88,c=()=>{if(T+=1.2,T>=r){l(r);return}l(Math.round(T)),requestAnimationFrame(c)};setTimeout(c,200)},ms.length*15+2500)},p=t==="done"?no:ro,N=t==="done"?"#166534":"#375470";return e.jsxs("section",{ref:b,className:"relative py-20 sm:py-28 overflow-hidden",style:{background:"linear-gradient(180deg, #09090b 0%, #0c0c12 50%, #09090b 100%)"},children:[e.jsx("div",{className:"absolute top-1/3 right-0 w-[500px] h-[500px] rounded-full pointer-events-none",style:{background:"radial-gradient(circle, rgba(52,211,153,0.04) 0%, transparent 60%)",filter:"blur(80px)"}}),e.jsx("div",{className:"absolute bottom-1/4 left-0 w-[400px] h-[400px] rounded-full pointer-events-none",style:{background:"radial-gradient(circle, rgba(139,92,246,0.04) 0%, transparent 60%)",filter:"blur(80px)"}}),e.jsxs("div",{className:"container mx-auto px-4 relative z-10",children:[e.jsxs("div",{className:"flex flex-col md:flex-row md:items-end justify-between mb-12 pb-6 border-b border-zinc-800/80 gap-4",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-xs font-mono text-violet-400 uppercase tracking-wider font-semibold",children:"Intelligent Resume Tailoring"}),e.jsx("h2",{className:"text-3xl sm:text-4xl font-extrabold text-white mt-1",children:"Target job descriptions with automated ATS tailoring."})]}),e.jsx("p",{className:"text-sm text-zinc-400 max-w-md",children:"Paste any job description. PyNyx restructures your resume summary, reorders skills, and highlights your strongest GitHub projects to maximize match rates."})]}),e.jsxs("div",{className:v("max-w-6xl mx-auto transition-all duration-700 delay-200",o?"opacity-100 translate-y-0":"opacity-0 translate-y-6"),children:[e.jsxs("div",{className:"lg:hidden space-y-5 max-w-xl mx-auto",ref:w,children:[e.jsxs("div",{className:"rounded-2xl border border-white/[0.06] bg-white/[0.02] backdrop-blur-sm overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 border-b border-white/[0.04] bg-white/[0.01]",children:[e.jsx("span",{className:"text-[11px] text-white/30 font-medium",children:"Target Job Description"}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:`w-1.5 h-1.5 rounded-full ${t!=="idle"?"bg-emerald-400 animate-pulse":"bg-white/10"}`}),e.jsx("span",{className:"text-[9px] text-white/25 font-medium uppercase tracking-wider",children:t==="processing"?"tailoring":t==="done"?"complete":"ready"})]})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"text-[12px] text-white/50 min-h-[48px] leading-relaxed line-clamp-3 mb-3",children:[g||e.jsx("span",{className:"text-white/20 italic",children:"Paste Job Description..."}),t==="typing"&&e.jsx("span",{className:"inline-block w-[2px] h-3.5 bg-violet-400 animate-pulse ml-0.5"})]}),e.jsx("button",{onClick:()=>{t!=="processing"&&f()},className:v("w-full py-2.5 px-4 rounded-xl text-[11px] font-semibold flex items-center justify-center gap-2 border transition-all duration-500",t==="processing"?"border-violet-500/30 bg-violet-500/10 text-violet-400 animate-pulse":t==="done"?"border-emerald-500/30 bg-emerald-500/10 text-emerald-400":"border-violet-500/20 bg-violet-500/10 text-violet-400 hover:bg-violet-500/15"),children:t==="processing"?e.jsxs(e.Fragment,{children:[e.jsx(Ue,{className:"w-3.5 h-3.5 animate-spin"})," Tailoring Resume..."]}):t==="done"?e.jsxs(e.Fragment,{children:[e.jsx(qe,{className:"w-3.5 h-3.5"})," Tailored for UI Developer"]}):e.jsxs(e.Fragment,{children:[e.jsx(ve,{className:"w-3.5 h-3.5"})," Tailor Resume with AI"]})})]})]}),e.jsxs("div",{className:"flex flex-col items-center w-full",children:[e.jsxs("div",{className:"w-full flex items-center justify-between mb-2 px-1",children:[e.jsxs("span",{className:"text-xs font-semibold text-white/60 flex items-center gap-1.5",children:[e.jsx(pr,{className:"w-3.5 h-3.5 text-emerald-400/60"}),"Live Resume Preview"]}),e.jsx("span",{className:v("text-[9px] font-medium px-2 py-0.5 rounded-md transition-all duration-500",t==="done"?"bg-emerald-500/10 text-emerald-400/70 border border-emerald-500/20":"bg-white/[0.03] text-white/30 border border-white/[0.06]"),children:t==="done"?"After Tailoring":"Before Tailoring"})]}),e.jsx("div",{className:"w-full flex justify-center py-1",children:e.jsx("div",{style:{width:`${Math.round(Rt*h)}
52px`,height:`${Math.round(Lt*h)}px`,position:"relative",overflow:"hidden"},className:"rounded-lg shadow-2xl shadow-black/30 border border-white/[0.06]",children:e.jsxs("div",{className:"bg-white transition-all duration-700",style:{width:`${Rt}px`,height:`${Lt}px`,transform:`scale(${h})`,transformOrigin:"top left",position:"absolute",top:0,left:0},children:[e.jsx(ea,{data:p,themeColor:N}),t==="processing"&&e.jsx("div",{className:"absolute inset-0 bg-[#050510]/50 backdrop-blur-sm flex items-center justify-center z-20",children:e.jsxs("div",{className:"flex flex-col items-center gap-4",children:[e.jsx(xt,{className:"w-10 h-10 text-violet-400 animate-spin"}),e.jsx("span",{className:"text-sm font-semibold text-violet-400",children:"Restructuring..."})]})})]})})})]})]}),e.jsx("div",{className:"hidden lg:block",children:e.jsxs("div",{className:"grid grid-cols-[380px,1fr] gap-6",children:[e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"rounded-2xl border border-white/[0.06] bg-white/[0.02] backdrop-blur-sm overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-white/[0.04] bg-white/[0.01]",children:[e.jsx("span",{className:"text-xs font-semibold text-white/50",children:"Job Description"}),e.jsx("span",{className:v("text-[9px] font-medium px-2 py-0.5 rounded-md",t==="done"?"bg-emerald-500/10 text-emerald-400/60 border border-emerald-500/20":"bg-white/[0.03] text-white/20 border border-white/[0.06]"),children:t==="done"?"JD-Tailored":"Auto-Filled"})]}),e.jsxs("div",{className:"p-4 space-y-4",children:[e.jsxs("div",{className:"bg-white/[0.02] border border-white/[0.05] rounded-xl p-3 min-h-[140px] text-[12px] text-white/50 leading-relaxed",children:[g||e.jsx("span",{className:"text-white/15 italic",children:"Paste Job Description for AI Tailoring..."}),t==="typing"&&e.jsx("span",{className:"inline-block w-[2px] h-3.5 bg-violet-400 animate-pulse ml-0.5 align-text-bottom"})]}),e.jsx("button",{className:v("w-full flex items-center justify-center gap-2 px-4 py-2.5 border rounded-xl text-[11px] font-semibold transition-all duration-500 cursor-default",t==="processing"?"border-violet-500/30 bg-violet-500/10 text-violet-400 animate-pulse":t==="done"?"border-emerald-500/30 bg-emerald-500/10 text-emerald-400":"border-violet-500/20 bg-violet-500/8 text-violet-400"),children:t==="processing"?e.jsxs(e.Fragment,{children:[e.jsx(Ue,{className:"w-4 h-4 animate-spin"})," Processing..."]}):t==="done"?e.jsxs(e.Fragment,{children:[e.jsx(qe,{className:"w-4 h-4"})," Tailoring Complete"]}):e.jsxs(e.Fragment,{children:[e.jsx(ve,{className:"w-4 h-4"})," Execute Tailoring"]})})]})]}),e.jsx("div",{className:v("rounded-2xl border border-white/[0.06] bg-white/[0.02] overflow-hidden transition-all duration-700 relative",t==="done"?"opacity-100 max-h-[200px]":"opacity-0 max-h-0 border-0 overflow-hidden"),children:e.jsxs("div",{className:"p-5 flex items-start gap-5",children:[e.jsxs("div",{className:"relative w-16 h-16 shrink-0",children:[e.jsxs("svg",{className:"w-full h-full transform -rotate-90",viewBox:"0 0 100 100",children:[e.jsx("circle",{cx:"50",cy:"50",r:"42",stroke:"rgba(255,255,255,0.05)",className:"fill-none",strokeWidth:"6"}),e.jsx("circle",{cx:"50",cy:"50",r:"42",stroke:"#34d399",className:"fill-none transition-all duration-1000 ease-out",strokeWidth:"7",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*42}`,strokeDashoffset:`${2*Math.PI*42*(1-s/100)}`})]}),e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[e.jsx("span",{className:"text-xl font-bold text-white",children:s}),e.jsx("span",{className:"text-[7px] font-bold uppercase tracking-wider text-emerald-400/70",children:"ATS"})]})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("h4",{className:"text-xs font-semibold text-white/70",children:"ATS Compatibility"}),e.jsx("span",{className:"text-[9px] font-medium px-2 py-0.5 rounded-md bg-emerald-500/10 text-emerald-400/70 border border-emerald-500/20",children:"STRONG"})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:["React match: 92%","Skills aligned","Missing: Docker","Good density"].map((T,r)=>e.jsx("span",{className:v("text-[9px] px-2 py-1 rounded-md border",T.includes("Missing")?"bg-amber-500/5 text-amber-400/60 border-amber-500/15":"bg-emerald-500/5 text-emerald-400/50 border-emerald-500/15"),children:T},r))})]})]})}),e.jsx("div",{className:"space-y-2",children:["Personal Details","Technical Skills","Experience","Projects","Education"].map(T=>e.jsx("div",{className:"border border-white/[0.04] bg-white/[0.015] rounded-xl overflow-hidden",children:e.jsxs("div",{className:"px-4 py-2.5 text-[11px] text-white/40 font-medium flex items-center justify-between cursor-default hover:bg-white/[0.01] transition-colors",children:[e.jsx("span",{children:T}),e.jsx("svg",{className:"w-3 h-3 text-white/15",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})},T))})]}),e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsxs("div",{className:"relative w-full flex justify-center",children:[e.jsxs("div",{className:v("bg-white shadow-2xl shadow-black/30 transition-all duration-700 overflow-hidden rounded-lg border border-white/[0.06] resume-preview-container",t==="done"?"shadow-[0_20px_50px_rgba(0,0,0,0.4),0_0_40px_rgba(52,211,153,0.08)]":""),style:{width:`${Rt}px`,height:`${Lt}px`},children:[e.jsx(ea,{data:p,themeColor:N}),t==="processing"&&e.jsx("div",{className:"absolute inset-0 bg-[#050510]/50 backdrop-blur-sm flex items-center justify-center z-20",children:e.jsxs("div",{className:"flex flex-col items-center gap-4",children:[e.jsx(xt,{className:"w-12 h-12 text-violet-400 animate-spin"}),e.jsx("span",{className:"text-sm font-semibold text-violet-400",children:"Restructuring Resume..."})]})})]}),e.jsx("style",{dangerouslySetInnerHTML:{__html:`
53                    .resume-preview-container {
54                      transform-origin: top center;
55                      transition: all 0.7s ease;
56                    }
57                    @media (min-width: 1024px) {
58                      .resume-preview-container {
59                        transform: scale(0.58);
60                        margin-bottom: -${(1-.58)*Lt}px;
61                      }
62                    }
63                  `}})]}),e.jsx("div",{className:"text-center mt-2",children:e.jsx("span",{className:"text-[10px] text-white/15 font-medium",children:"Page 1 of 2"})})]})]})})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3 sm:gap-4 mt-8 sm:mt-14 max-w-5xl mx-auto",children:[{icon:ve,title:"AI-Powered Tailoring",desc:"Paste any JD. Our AI rewrites your summary, reorders skills, and selects the most relevant projects.",color:"#a78bfa"},{icon:La,title:"ATS Score Optimization",desc:"Instant compatibility scores with keyword matching, skills alignment, and formatting analysis.",color:"#34d399"},{icon:ur,title:"Project-Aware Intelligence",desc:"Leverages your GitHub analysis data to pick the strongest projects for each role automatically.",color:"#22d3ee"}].map(T=>e.jsxs("div",{className:"p-4 sm:p-5 rounded-xl border border-white/[0.05] bg-white/[0.02] hover:border-white/[0.08] transition-all duration-300 group",children:[e.jsx("div",{className:"w-8 h-8 sm:w-9 sm:h-9 rounded-lg flex items-center justify-center mb-2.5 sm:mb-3 transition-all duration-300",style:{backgroundColor:`${T.color}10`,border:`1px solid ${T.color}20`},children:e.jsx(T.icon,{className:"w-4 h-4",style:{color:`${T.color}99`}})}),e.jsx("h4",{className:"text-xs sm:text-sm font-semibold text-white/70 mb-1 sm:mb-1.5",children:T.title}),e.jsx("p",{className:"text-xs text-white/40 sm:text-white/30 leading-relaxed",children:T.desc})]},T.title))}),e.jsx("div",{className:"text-center mt-8 sm:mt-12",children:e.jsxs(fe,{to:"/signup",className:"group w-full sm:w-auto inline-flex items-center justify-center gap-2 px-6 py-3.5 rounded-xl font-semibold text-sm text-white border border-white/10 bg-white/[0.03] hover:bg-white/[0.06] hover:border-white/15 transition-all duration-300",children:["Build Your Resume",e.jsx(Ae,{className:"w-4 h-4 transition-transform group-hover:translate-x-0.5"})]})})]})]})},co=()=>e.jsx("section",{className:"pt-16 pb-24 sm:pt-24 sm:pb-32 bg-zinc-950 border-t border-zinc-800 text-center relative z-10",children:e.jsxs(A.div,{initial:{opacity:0,y:30,scale:.96},whileInView:{opacity:1,y:0,scale:1},viewport:{once:!0,amount:.2},transition:{duration:.6,ease:[.16,1,.3,1]},className:"container mx-auto px-4 max-w-3xl",children:[e.jsx("h2",{className:"text-2xl sm:text-5xl font-extrabold text-white tracking-tight mb-3 sm:mb-4",children:"Start practicing DSA on PyNyx today."}),e.jsx("p",{className:"text-sm sm:text-base text-zinc-400 max-w-xl mx-auto mb-6 sm:mb-8",children:"Explore 500+ curated problems, follow a 30 to 60-day roadmap, and debug logic with Vasist Socratic AI."}),e.jsx("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-3 sm:gap-4",children:e.jsxs(fe,{to:"/signup",className:"w-full sm:w-auto inline-flex items-center justify-center gap-2 px-6 py-3.5 rounded-xl font-semibold text-sm text-white bg-violet-600 hover:bg-violet-500 transition-all shadow-lg shadow-violet-600/25",children:["Create Free Account",e.jsx(Ae,{className:"w-4 h-4"})]})})]})}),mo=()=>
63{const t=$e(),i=Oe();return e.jsxs("section",{id:"cta-section",className:"relative py-32 bg-transparent overflow-hidden border-t border-slate-100/40",children:[e.jsx("div",{className:"absolute top-0 right-0 w-96 h-96 bg-primary/5 rounded-full blur-[100px] -mr-48 -mt-48"}),e.jsx("div",{className:"absolute bottom-0 left-0 w-96 h-96 bg-violet-100 rounded-full blur-[100px] -ml-48 -mb-48"}),e.jsxs("div",{className:"max-w-5xl mx-auto px-6 relative z-10 text-center space-y-10",children:[e.jsxs(A.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"space-y-6",children:[e.jsx("span",{className:"text-[10px] font-bold tracking-[0.25em] text-primary uppercase block",children:"Ready to transform placements?"}),e.jsxs("h2",{className:"text-4xl sm:text-6xl font-extrabold text-slate-900 tracking-[-0.03em] leading-[1.1] max-w-4xl mx-auto",children:["Your next placement season starts"," ",e.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-primary to-indigo-600",children:"here."})]}),e.jsx("p",{className:"text-slate-500 text-base sm:text-lg max-w-2xl mx-auto leading-relaxed font-medium",children:"Stop filtering by numbers. Start verifying by code. Join leading institutions building a transparent, skill-first ecosystem with PyNyx."})]}),e.jsxs(A.div,{initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.1},className:"flex flex-col sm:flex-row items-center justify-center gap-4 pt-4",children:[e.jsxs("button",{onClick:()=>{i==="institution"?t("/register"):window.location.href=Q("institution","/register")},className:"group w-full sm:w-auto px-8 py-4 bg-primary hover:bg-primary/95 text-white rounded-xl font-semibold text-sm shadow-[0_4px_14px_rgba(139,92,246,0.3)] active:scale-[0.98] transition-all flex items-center justify-center gap-2",children:["Partner with PyNyx",e.jsx(Ae,{size:16,className:"group-hover:translate-x-1 transition-transform"})]}),e.jsx("button",{onClick:()=>{i==="institution"?t("/request-demo"):window.location.href=Q("institution","/request-demo")},className:"w-full sm:w-auto px-8 py-4 bg-white border border-slate-200 hover:border-slate-300 hover:bg-slate-50 text-slate-700 rounded-xl font-semibold text-sm active:scale-[0.98] transition-all",children:"Book a Demo"})]}),e.jsx(A.div,{initial:{opacity:0}
63,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6,delay:.2},className:"flex flex-wrap items-center justify-center gap-8 md:gap-16 pt-12 border-t border-slate-200/60 max-w-3xl mx-auto",children:[{value:"< 48 Hours",label:"Setup Time"},{value:"Free",label:"For Institutions"},{value:"24/7 Support",label:"Premium Slack Access"}].map(s=>e.jsxs("div",{className:"text-center space-y-1",children:[e.jsx("div",{className:"text-xl font-extrabold text-slate-800 tracking-tight",children:s.value}),e.jsx("div",{className:"text-[9px] font-bold text-slate-400 uppercase tracking-widest",children:s.label})]},s.label))})]})]})},jt={hidden:{opacity:0,y:20},visible:t=>({opacity:1,y:0,transition:{duration:.6,delay:t*.1,ease:[.16,1,.3,1]}})},ho=()=>{const t=$e(),i=Oe();return e.jsxs("section",{className:"relative bg-transparent pt-40 pb-20 overflow-hidden min-h-[90vh] flex flex-col justify-center",children:[e.jsx("div",{className:"absolute top-[10%] left-[10%] w-[500px] h-[500px] bg-violet-500/[0.04] rounded-full blur-[100px] pointer-events-none"}),e.jsx("div",{className:"absolute bottom-[10%] right-[10%] w-[500px] h-[500px] bg-indigo-500/[0.03] rounded-full blur-[100px] pointer-events-none"}),e.jsx("div",{className:"max-w-5xl mx-auto px-6 text-center relative z-10 space-y-8",children:e.jsxs(A.div,{initial:"hidden",animate:"visible",className:"space-y-6",children:[e.jsx(A.div,{custom:0,variants:jt,children:e.jsxs("span",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-primary/[0.06] border border-primary/10 text-primary text-xs font-semibold tracking-wide shadow-sm",children:[e.jsx(ve,{className:"w-3.5 h-3.5"}),"End-to-End Campus Platform"]})}),e.jsxs(A.h1,{custom:1,variants:jt,className:"text-4xl sm:text-6xl lg:text-7xl font-extrabold tracking-[-0.03em] leading-[1.1] text-slate-900",children:[e.jsx("span",{className:"relative z-[2] block",children:"India's Most Advanced"}),e.jsx("span",{className:"relative z-[10] text-transparent bg-clip-text bg-gradient-to-r from-primary via-violet-500 to-indigo-500 block sm:inline-block",children:"Placement Assistance Tool"}),e.jsx("span",{className:"relative z-[10]",children:"."})]}),e.jsx(A.p,{custom:2,variants:jt,className:"text-slate-500 text-lg sm:text-xl max-w-3xl mx-auto leading-relaxed font-medium",children:"Stop managing placements on spreadsheets. From job postings and AI-driven skill verification to interview tracking and final offers — everything in one unified dashboard."}),e.jsxs(A.div,{custom:3,variants:jt,className:"flex flex-col sm:flex-row justify-center items-center gap-4 pt-4",children:[e.jsxs("button",{onClick:()=>{i==="institution"?t("/register"):window.location.href=Q("institution","/register")},className:"group w-full sm:w-auto px-8 py-4 bg-primary text-white rounded-xl font-semibold text-sm shadow-[0_4px_14px_rgba(139,92,246,0.3)] hover:bg-primary/95 active:scale-[0.98] transition-all duration-300 flex items-center justify-center gap-2",children:["Partner with PyNyx",e.jsx(Ae,{className:"w-4 h-4 group-hover:translate-x-1 transition-transform"})]}),e.jsx("button",{onClick:()=>{i==="institution"?t("/request-demo"):window.location.href=Q("institution","/request-demo")},className:"w-full sm:w-auto px-8 py-4 bg-white border border-slate-200 hover:border-slate-300 hover:bg-slate-50 text-slate-700 rounded-xl font-semibold text-sm active:scale-[0.98] transition-all",children:"Book a Demo"})]}),e.jsx(A.div,{custom:4,variants:jt,className:"flex items-center justify-center pt-8 max-w-xl mx-auto",children:e.jsxs("span",{className:"inline-flex items-center gap-2.5 px-3 py-1.5 rounded-full bg-slate-50/50 border border-slate-200/50 text-slate-500 text-xs font-semibold tracking-wide shadow-sm",children:[e.jsx("img",{src:"https://upload.wikimedia.org/wikipedia/commons/9/93/Amazon_Web_Services_Logo.svg",alt:"AWS Logo",className:"h-3.5 w-auto object-contain"}),e.jsx("span",{className:"text-slate-300 font-normal",children:"|"}),"Backed by AWS"]})})]})}),e.jsx("div",{className:"border-t border-slate-100/80 bg-white/40 backdrop-blur-sm py-8 mt-16 relative z-10",children:e.jsx("div",{className:"max-w-5xl mx-auto px-6",children:e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 text-center",children:[{value:"50+",label:"Partner Institutions",gradient:"from-primary to-indigo-600"},{value:"100%",label:"Free for Colleges",gradient:"from-fuchsia-600 to-pink-600"},{value:"$0",label:"Setup & Placement Fees",gradient:"from-emerald-500 to-teal-600",from:4999}].map((s,l)=>e.jsxs(A.div,{initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:l*.1},className:"space-y-1",children:[e.jsx("p",{className:`text-3xl sm:text-4xl font-black text-transparent bg-clip-text bg-gradient-to-r ${s.gradient} tracking-tight`,children:e.jsx(rs,{value:s.value,from:s.from})}),e.jsx("p",{className:"text-xs font-semibold text-slate-400 uppercase tracking-widest",children:s.label})]},s.label))})})})]})},po=({className:t})=>e.jsx(bi,{className:t,badgeText:"Placement Cell Intelligence",titleLine1:"Student Resumes in 2026?",titleLine2:"Showcase Verified Proof of Work.",description:e.jsxs(e.Fragment,{children:["AI made every resume flawless."," ",e.jsx("span",{className:"text-slate-800 font-semibold",children:"PyNyx proves who can actually build"}),"—turning real code and problem-solving into proof top recruiters trust."]}),rightCardTitle:"Campus Recruiters"}),uo=[{icon:xr,color:"text-rose-500 bg-rose-50 border-rose-100",textColor:"text-rose-600",
63stat:"80%",title:"Unemployable Graduates",desc:"Of engineering graduates in India are deemed unemployable for core software roles due to outdated, theoretical curricula and a lack of real hands-on repository building experience."},{icon:gr,color:"text-amber-500 bg-amber-50 border-amber-100",textColor:"text-amber-600",stat:"78%",title:"Manual Excel Tracking",desc:"Of college Training & Placement Offices (TPOs) still manage candidate databases and drive lists entirely on spreadsheets, creating massive data silos and administrative burden."},{icon:Fa,color:"text-indigo-500 bg-indigo-50 border-indigo-100",textColor:"text-indigo-600",stat:"18 Days",title:"Manual Drive Prep",desc:"Average time a placement cell spends coordinating eligible candidate lists, verifying resumes, and conducting preliminary testing before a company visits campus."}],xo=()=>e.jsx("section",{className:"relative py-24 bg-transparent overflow-hidden border-t border-slate-100/40",children:e.jsxs("div",{className:"max-w-5xl mx-auto px-6 relative z-10",children:[e.jsxs("div",{className:"text-center max-w-3xl mx-auto space-y-4 mb-16",children:[e.jsx("span",{className:"text-[10px] font-bold tracking-widest uppercase text-primary bg-primary/[0.06] border border-primary/10 px-3 py-1.5 rounded-full",children:"The Status Quo"}),e.jsxs("h2",{className:"text-3xl sm:text-5xl font-extrabold text-slate-900 tracking-[-0.02em] leading-tight",children:["Campus placements are"," ",e.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-rose-500 to-amber-500",children:"fundamentally broken."})]}),e.jsx("p",{className:"text-slate-500 text-sm sm:text-base font-medium max-w-2xl mx-auto leading-relaxed",children:"Relying on exam scores and self-reported resumes makes campus recruitment a numbers game, costing institutions credibility and students real opportunities."})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:uo.map((t,i)=>{const s=t.icon;return e.jsx(A.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-100px"},transition:{duration:.5,delay:i*.15,ease:"easeOut"},className:"bg-white border border-slate-200/60 rounded-2xl p-6 shadow-sm hover:shadow-md transition-all duration-300 flex flex-col justify-between group hover:-translate-y-1",children:e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:`w-10 h-10 rounded-xl border flex items-center justify-center ${t.color}`,children:e.jsx(s,{className:"w-5 h-5"})}),e.jsx("div",{className:`text-4xl font-black tracking-tight group-hover:scale-105 transition-transform duration-300 origin-left ${t.textColor}`,children:e.jsx(rs,{value:t.stat})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-lg font-bold text-slate-800 tracking-tight",children:t.title}),e.jsx("p",{className:"text-sm text-slate-500 font-medium leading-relaxed",children:t.desc})]})]})},t.title)})})]})}),tt=[{name:"Manindra Rongala",username:"rongalamanin",role:"Python Developer",score:"8.2",dsa:"33",repositories:33,techScore:"72",techMaturity:"Intermediate Fresher",techSummary:"This candidate is an emerging AI engineer who demonstrates significant technical growth, transitioning from basic proof-of-concept scripts to sophisticated, agentic RAG architectures. They possess a strong grasp of the modern LLM stack, including FastAPI, LangChain, and vector databases, and have begun incorporating professional practices like Pydantic validation and Pytest. While they require mentorship in production-grade engineering—specifically regarding CI/CD, robust error handling, and iterative development—their ability to architect complex, multi-agent workflows marks them as a highly promising junior engineer.",techStrengths:["Agentic AI & RAG Orchestration","Full-stack AI Integration (FastAPI/React)","Robust Data Modeling with Pydantic"],techWeaknesses:["Inconsistent iterative development (Big Bang commits)","Limited exposure to production-grade CI/CD and logging","Needs improvement in comprehensive error handling"],engStandards:["Uses Mermaid diagrams for architectural documentation","Implements asynchronous backend patterns"],dsaScore:"33",dsaPersonality:"The Precise Optimizer",dsaSummary:"This candidate demonstrates a high level of algorithmic maturity, consistently delivering optimal time and space complexity solutions with a strong emphasis on edge-case robustness. Their work ethic is exemplary, characterized by a 100% completion rate and minimal reliance on AI assistance, indicating a deep, independent grasp of core concepts. While they occasionally lean toward over-complicating logic, their ability to recover from errors quickly and maintain high code readability suggests they are a disciplined and highly capable engineer.",dsaSignals:["First-Principles Thinker","Resilient Debugger","Self-Reliant Engineer","Methodical Optimizer"],dsaStrengths:["Optimal Complexity Architect","Robust Edge-Case Handling","High-Autonomy Problem Solver"],dsaWeaknesses:["Tendency toward unnecessary logic complexity","Occasional decomposition overhead"],verdict:"Highly recommended for product teams requiring autonomy and rapid learning.",techStack:[{name:"Python",depth:8},{name:"FastAPI",depth:8},{name:"LangChain",depth:8},{name:"React",depth:7},{name:"FAISS",depth:7},{name:"Pydantic",depth:8}],topThinkingSignal:"Optimal Complexity Architect",topTechnicalSignal:"Agentic AI & RAG Orchestration",dateRecency:"8/6/2026",avatar:"https://images.unsplash.com/photo-1500648767791-00dcc994a43e?auto=format&fit=crop&w=256&q=80"},{name:"Rohit Allanki",username:"allankirohit",role:"C++ & System Engineer",score:"9.4",dsa:"54",repositories:24,techScore:"92",techMaturity:"Senior Systems Specialist",techSummary:"Rohit demonstrates exceptional low-level systems maturity. Codebase features manual assembly optimizations, lock-free queues, and cache-aligned memory boundaries.",techStrengths:["Cache-aligned memory layouts","Lock-free synchronization","Assembly optimization"],techWeaknesses:["Complex template abstraction overhead","Manual assembly validation"],engStandards:["Implements custom memory allocators","Enforces strict cache alignment checks"],dsaScore:"88",dsaPersonality:"Optimal Complexity Architect",dsaSummary:"High mathematical index and optimal Big-O scaling. Prefers manual memory mapping over standard library overhead.",dsaSignals:["First-Principles Thinker","Resilient Debugger","Self-Reliant Engineer"],dsaStrengths:["Manual pointer arithmetic","Concurrency primitives"],dsaWeaknesses:["Dynamic programming scaling efficiency"],verdict:"Highly recommended for c
63ore systems requiring microsecond-level latency boundaries.",techStack:[{name:"C++",depth:9},{name:"Rust",depth:8},{name:"POSIX",depth:9}],topThinkingSignal:"Optimal Complexity Architect",topTechnicalSignal:"Low-Level Performance Optimization",dateRecency:"8/12/2026",avatar:"https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?auto=format&fit=crop&w=256&q=80"},{name:"Karthik Virodhula",username:"virodhula_k",role:"Computer Vision & UI",score:"8.2",dsa:"33",repositories:18,techScore:"72",techMaturity:"Intermediate Fresher",techSummary:"Emerging developer showing strong aptitude for integrating complex computer vision libraries. Transitioning to independent building with solid React/Python integration skills.",techStrengths:["Real-time stream traversal","Canvas framebuffer bindings"],techWeaknesses:["Asynchronous state invalidation logic","Custom rendering package optimization"],engStandards:["Enforces clean component boundaries","Modular hooks architecture"],dsaScore:"33",dsaPersonality:"Heuristic Search Developer",dsaSummary:"Focuses on applied spatial search patterns, quadtree coordinate divisions, and image processing filters.",dsaSignals:["First-Principles Thinker","Resilient Debugger"],dsaStrengths:["Matrix transformations","Spatial grid partitioning"],dsaWeaknesses:["Dynamic programming recursion scaling"],verdict:"Strong fit for teams building rich media web experiences or real-time camera interfaces.",techStack:[{name:"Python",depth:8},{name:"React",depth:8},{name:"OpenCV",depth:7}],topThinkingSignal:"Heuristic Search Specialist",topTechnicalSignal:"Computer Vision Processing",dateRecency:"8/10/2026",avatar:"https://images.unsplash.com/photo-1539571696357-5a69c17a67c6?auto=format&fit=crop&w=256&q=80"}],go=[{num:"01",icon:Ba,title:"Post Requirements",desc:"Recruiters post roles with skill requirements, and PyNyx distributes them to your entire student body instantly."},{icon:Wa,num:"02",title:"AI-Powered Verification",desc:"PyNyx scans every student's repositories, runs coding assessments, AI interviews, and verifies real skill depth."},{icon:zt,num:"03",title:"Track & Place",desc:"Manage the full pipeline — from applications to offer letters — in one dashboard with real-time analytics."}],fo=()=>{const[t,i]=a.useState(0),[s,l]=a.useState(!1),[h,u]=a.useState("technical");a.useEffect(()=>{if(s)return;const m=setInterval(()=>{i(b=>(b+1)%tt.length),u("technical")},4500);return()=>clearInterval(m)},[s]);const o=m=>{m.stopPropagation(),i(b=>(b+1)%tt.length)};return e.jsxs("section",{className:"relative py-12 sm:py-20 lg:py-24 bg-transparent overflow-hidden border-t border-slate-100/40",children:[e.jsx("div",{className:"absolute top-[20%] right-[-10%] w-[350px] h-[350px] bg-violet-500/[0.02] rounded-full blur-[80px] pointer-events-none"}),e.jsxs("div",{className:"max-w-5xl mx-auto px-5 sm:px-6 relative z-10",children:[e.jsxs("div",{className:"max-w-3xl mb-6 sm:mb-16",children:[e.jsx("span",{className:"text-[9px] sm:text-[10px] font-bold tracking-widest uppercase text-primary bg-primary/[0.06] border border-primary/10 px-2.5 py-1 sm:px-3 sm:py-1.5 rounded-full",children:"The Process"}),e.jsxs("h2",{className:"text-xl sm:text-3xl md:text-5xl font-extrabold text-slate-900 tracking-[-0.02em] leading-tight mt-3 sm:mt-4",children:["How it works:"," ",e.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-primary to-indigo-500",children:"Skill-verified placements."})]}),e.jsx("p",{className:"text-slate-500 text-xs sm:text-sm md:text-base font-medium leading-relaxed mt-2 sm:mt-4",children:"In three steps, replace exam-score guessing with automated codebase evaluations. Boost placement rates and connect verified talent with top recruiters."})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1.2fr_1fr] gap-8 sm:gap-12 items-center",children:[e.jsxs("div",{className:"space-y-4 sm:space-y-10 relative",children:[e.jsx("div",{className:"absolute left-[27px] top-6 bottom-6 w-0.5 bg-slate-100 z-0 hidden sm:block"}),go.map((m,b)=>{const w=m.icon;return e.jsxs(A.div,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.5,delay:b*.15},className:"flex flex-row items-start gap-3 sm:gap-6 relative z-10 group",children:[e.jsx("div",{className:"w-10 h-10 sm:w-14 sm:h-14 roun
63ded-xl sm:rounded-2xl bg-slate-50 border border-slate-200/80 group-hover:border-primary/20 group-hover:bg-primary/[0.02] flex items-center justify-center text-slate-400 group-hover:text-primary transition-all duration-300 shrink-0 shadow-sm",children:e.jsx(w,{className:"w-4 h-4 sm:w-6 sm:h-6"})}),e.jsxs("div",{className:"space-y-0.5 sm:space-y-1.5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-[10px] sm:text-xs font-bold text-primary tracking-widest",children:m.num}),e.jsx("h3",{className:"text-sm sm:text-lg font-bold text-slate-800 tracking-tight",children:m.title})]}),e.jsx("p",{className:"text-[11px] sm:text-sm text-slate-500 font-medium leading-relaxed max-w-md",children:m.desc})]})]},m.num)})]}),e.jsxs("div",{className:"flex flex-col items-center mt-6 sm:mt-12 pt-4",children:[e.jsx("div",{className:"relative w-full max-w-[320px] sm:max-w-[390px] h-[480px] sm:h-[480px] lg:h-[550px] cursor-pointer select-none",onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),onClick:o,children:e.jsx(nt,{mode:"popLayout",children:tt.map((m,b)=>{const w=(b-t+tt.length)%tt.length,d=w===0,g=w===1;return w>=3?null:e.jsxs(A.div,{style:{transformOrigin:"left center"},animate:{scale:d?1:g?.98:.96,x:d?0:g?24:48,y:0,zIndex:tt.length-w,opacity:d?1:g?.9:.7,boxShadow:d?"0 20px 25px -5px rgb(0 0 0 / 0.15), 0 8px 10px -6px rgb(0 0 0 / 0.15)":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"},transition:{type:"spring",stiffness:260,damping:25},className:"absolute inset-0 bg-white border border-slate-200/60 rounded-xl sm:rounded-2xl p-4 sm:p-5 flex flex-col justify-between overflow-hidden shadow-sm text-left",children:[e.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 bg-primary/[0.02] blur-[30px] pointer-events-none"}),e.jsxs("div",{className:"flex items-center justify-between border-b border-slate-100 pb-3 mb-3 shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("img",{src:m.avatar,alt:m.name,className:"w-10 h-10 sm:w-12 sm:h-12 rounded-xl border border-slate-200 bg-slate-50 object-cover",onError:f=>{f.target.src=`https://api.dicebear.com/7.x/initials/svg?seed=${m.name}`}}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs sm:text-sm font-extrabold text-slate-900 leading-tight",children:m.name}),e.jsxs("p",{className:"text-[10px] sm:text-xs text-slate-400 font-semibold mt-0.5",children:["@",m.username]})]})]}),e.jsxs("div",{className:"flex gap-2 font-mono",children:[e.jsxs("div",{className:"bg-slate-50 border border-slate-200/60 rounded-lg px-2 py-1 text-center shrink-0",children:[e.jsx("span",{className:"text-[8px] font-bold text-slate-400 uppercase tracking-wider block leading-none mb-0.5",children:"Score"}),e.jsx("span",{className:"text-[11px] sm:text-xs font-black text-emerald-600",children:m.score})]}),e.jsxs("div",{className:"bg-slate-50 border border-slate-200/60 rounded-lg px-2 py-1 text-center shrink-0",children:[e.jsx("span",{className:"text-[8px] font-bold text-slate-400 uppercase tracking-wider block leading-none mb-0.5",children:"DSA"}),e.jsx("span",{className:"text-[11px] sm:text-xs font-black text-primary",children:m.dsa})]})]})]}),e.jsx("div",{className:"flex gap-1 bg-slate-100/80 p-0.5 rounded-lg mb-3 shrink-0 text-[10px] font-bold",children:[{id:"technical",label:"Technical Mastery"},{id:"dsa",label:"DSA Mastery"}].map(f=>e.jsx("button",{onClick:p=>{p.stopPropagation(),d&&u(f.id)},className:v("flex-1 py-1 rounded-md text-center transition-all",(d?h:"technical")===f.id?"bg-white text-primary shadow-sm":"text-slate-500 hover:text-slate-800"),children:f.label},f.id))}),e.jsxs("div",{className:"flex-1 overflow-y-auto pr-0.5 scrollbar-thin space-y-4 min-h-[130px] sm:min-h-[150px] text-[11px] leading-relaxed",children:[(d?h:"technical")==="technical"&&e.jsxs("div",{className:"space-y-4 animate-in fade-in duration-200",children:[e.jsxs("div",{className:"flex items-center justify-between bg-slate-50 p-2 rounded-lg border border-slate-100 shrink-0",children:[e.jsx("span",{className:"font-bold text-slate-600",children:"Tech Mastery Rating"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"font-extrabold text-[#6D28D9]",children:[m.techScore,"/100"]}),e.jsx("span",{className:"font-black text-amber-600 uppercase tracking-wider text-[8px] bg-amber-50 px-1.5 py-0.5 rounded border border-amber-100",children:m.techMaturity})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("span",{className:"font-black text-[9px] text-slate-400 uppercase tracking-wider block font-bold",children:"Repository Intelligence"}),e.jsxs("p",{className:"text-slate-500 italic bg-slate-50/50 p-2 sm:p-2.5 rounded-lg border border-slate-100/60 leading-normal",children:['"',m.techSummary,'"']})]}),e.jsxs("div",{className:"hidden sm:grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("span",{className:"font-black text-[9px] text-emerald-600 uppercase tracking-wider block font-bold",children:"Technical Strengths"}),e.jsx("div",{className:"grid grid-cols-1 gap-1",children:m.techStrengths.map((f,p)=>e.jsxs("div",{className:"flex items-start gap-1 text-slate-600",children:[e.jsx("div",{className:"w-1 h-1 rounded-full bg-emerald-500 mt-1.5 shrink-0"}),e.jsx("span",{className:"leading-snug",children:f})]},p))})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("span",{className:"font-black text-[9px] text-amber-600 uppercase tracking-wider block font-bold",children:"Growth Areas"}),e.jsx("div",{className:"grid grid-cols-1 gap-1",children:m.techWeaknesses.map((f,p)=>e.jsxs("div",{className:"flex items-start gap-1 text-slate-600",children:[e.jsx("div",{className:"w-1 h-1 rounded-full bg-amber-500 mt-1.5 shrink-0"}),e.jsx("span",{className:"leading-snug",children:f})]},p))})]})]}),e.jsxs("div",{className:"hidden sm:block space-y-1.5 pt-1",children:[e.jsx("span",{className:"font-black text-[9px] text-slate-400 uppercase tracking-wider block font-bold",children:"Engineering Standards"}),e.jsx("div",{className:"grid grid-cols-1 gap-1.5",children:m.engStandards.map((f,p)=>e.jsxs("div",{className:"flex items-center gap-1.5 text-slate-600 bg-emerald-500/5 px-2.5 py-1.5 rounded-lg border border-emerald-500/10",children:[e.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0"}),e.jsx("span",{className:"leading-snug",children:f})]},p))})]})]}),(d?h:"technical")==="dsa"&&e.jsxs("div",{className:"space-y-4 animate-in fade-in duration-200",children:[e.jsxs("div",{className:"flex items-center justify-between bg-slate-50 p-2 rounded-lg border border-slate-100 shrink-0",children:[e.jsx("span",{className:"font-bold text-slate-600",children:"DSA Alignment Score"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"font-extrabold text-[#6D28D9]",children:[m.dsaScore,"/100"]}),e.jsx("span",{className:"font-black text-primary uppercase tracking-wider text-[8px] bg-purple-50 px-1.5 py-0.5 rounded border border-purple-100",children:m.dsaPersonality})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("span",{className:"font-black text-[9px] text-slate-400 uppercase tracking-wider block font-bold",children:"Mental Model Summary"}),e.jsxs("p",{className:"text-slate-500 italic bg-slate-50/50 p-2 sm:p-2.5 rounded-lg border border-slate-100/60 leading-normal",children:['"',m.dsaSummary,'"']})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("span",{className:"font-black text-[9px] text-slate-400 uppercase tracking-wider block font-bold",children:"Cognitive Signals"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:m.dsaSignals.map((f,p)=>e.jsx("span",{className:"px-2 py-0.5 bg-slate-100 border border-slate-200/50 rounded-md text-[9px] font-semibold text-slate-600",children:f},p))})]}),e.jsxs("div",{className:"hidden sm:grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("span",{className:"font-black text-[9px] text-emerald-600 uppercase tracking-wider block font-bold",children:"Cognitive Strengths"}),e.jsx("div",{className:"grid grid-cols-1 gap-1",children:m.dsaStrengths.map((f,p)=>e.jsxs("div",{className:"flex items-start gap-1 text-slate-600",children:[e.jsx("div",{className:"w-1 h-1 rounded-full bg-emerald-500 mt-1.5 shrink-0"}),e.jsx("span",{className:"leading-snug",children:f})]},p))})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("span",{className:"font-black text-[9px] text-amber-600 uppercase tracking-wider block font-bold",children:"Growth Opportunities"}),e.jsx("div",{className:"grid grid-cols-1 gap-1",children:m.dsaWeaknesses.map((f,p)=>e.jsxs("div",{className:"flex items-start gap-1 text-slate-600",children:[e.jsx("div",{className:"w-1 h-1 rounded-full bg-amber-500 mt-1.5 shrink-0"}),e.jsx("span",{className:"leading-snug",children:f})]},p))})]})]})]})]}),e.jsxs("div",{className:"space-y-3 mt-3 pt-3 border-t border-slate-100 shrink-0 text-[10px]",children:[e.jsxs("div",{className:"bg-primary/[0.03] border border-primary/10 rounded-lg p-2.5",children:[e.jsx("span",{className:"text-[9px] font-black text-primary uppercase tracking-wider block mb-0.5",children:"Recruiter Verdict"}),e.jsxs("p",{className:"text-slate-600 leading-normal font-medium",children:['"',m.verdict,'"']})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("span",{className:"font-black text-[9px] text-slate-400 uppercase tracking-wider block font-bold",children:"Validated Tech Stack"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:m.techStack.map((f,p)=>e.jsxs("span",{className:"px-2 py-0.5 bg-slate-50 border border-slate-200 rounded-md font-bold text-slate-600 text-[9px]",children:[f.name," ",e.jsxs("span",{className:"text-primary font-black ml-0.5",children:[f.depth,"/10"]})]},p))})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[9px] border-t border-slate-100 pt-2.5 text-slate-400 font-medium leading-tight",children:[e.jsxs("div",{children:[e.jsx("span",{className:"block font-bold text-slate-400/80 uppercase text-[8px] tracking-wider font-bold",children:"Top Thinking Signal"}),e.jsx("span",{className:"text-slate-700 font-extrabold",children:m.topThinkingSignal})]}),e.jsxs("div",{children:[e.jsx("span",{className:"block font-bold text-slate-400/80 uppercase text-[8px] tracking-wider font-bold",children:"Top Technical Signal"}),e.jsx("span",{className:"text-slate-700 font-extrabold",children:m.topTechnicalSignal})]})]})]})]},m.name)})})}),e.jsx("div",{className:"flex justify-center gap-1.5 mt-6",children:tt.map((m,b)=>e.jsx("button",{onClick:w=>{w.stopPropagation(),i(b)},className:v("w-2 h-2 rounded-full transition-all duration-300",t===b?"bg-primary w-4":"bg-slate-300 hover:bg-slate-400")},b))})]})]})]})]})},bo=[{icon:Da,title:"Verified Talent Pool",desc:"Every student's repositories are AI-analyzed. View real skills, code quality, and project depth — not self-reported claims.",color:"text-emerald-500 bg-emerald-50/70 border-emerald-100/80"},{icon:fr,title:"One-Click Job Distribution",desc:"Broadcast open positions to your entire student body instantly. No more notice boards, WhatsApp groups, or email floods.",color:"text-blue-500 bg-blue-50/70 border-blue-100/80"},{icon:Ge,title:"Custom Pipelines",desc:"Model each placement drive with custom screening stages — from repo scans to coding rounds, AI interviews, and final offers.",color:"text-indigo-500 bg-indigo-50/70 border-indigo-100/80"},{icon:xt,title:"AI Assessments",desc:"Auto-generated coding tests and aptitude exams tailored to each role's requirements. No manual question banks needed.",color:"text-purple-500 bg-purple-50/70 border-purple-100/80"},{icon:Ma,title:"AI Voice Interviews",desc:"Automated first-round AI screening interviews that evaluate communication, technical fund
63amentals, and problem-solving.",color:"text-cyan-500 bg-cyan-50/70 border-cyan-100/80"},{icon:zt,title:"Real-Time Analytics",desc:"Institution-wide dashboards tracking student skills, placement rates, tech ecosystem distribution, and drive progress.",color:"text-amber-500 bg-amber-50/70 border-amber-100/80"},{icon:br,title:"Recruiter Matching",desc:"Connect companies with pre-verified candidates. Recruiters see proof-backed profiles, not padded resumes.",color:"text-rose-500 bg-rose-50/70 border-rose-100/80"},{icon:qa,title:"Code Authenticity",desc:"Detect copied code, tutorial forks, and AI-generated boilerplate. Surface students who actually build, not just claim.",color:"text-violet-500 bg-violet-50/70 border-violet-100/80"}],yo=()=>e.jsx("section",{className:"relative py-24 bg-transparent overflow-hidden border-t border-slate-100/40",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-6 relative z-10",children:[e.jsxs("div",{className:"text-center max-w-3xl mx-auto space-y-4 mb-16",children:[e.jsx("span",{className:"text-[10px] font-bold tracking-widest uppercase text-primary bg-primary/[0.06] border border-primary/10 px-3 py-1.5 rounded-full",children:"Platform Features"}),e.jsxs("h2",{className:"text-3xl sm:text-5xl font-extrabold text-slate-900 tracking-[-0.02em] leading-tight",children:["Designed for the"," ",e.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-primary to-indigo-500",children:"modern placement cell."})]}),e.jsx("p",{className:"text-slate-500 text-sm sm:text-base font-medium max-w-2xl mx-auto leading-relaxed",children:"Stop managing drives on spreadsheets. Leverage AI-powered verification to build transparent, skill-first placement pipelines for your institution."})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:bo.map((t,i)=>{const s=t.icon;return e.jsx(A.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-50px"},transition:{duration:.4,delay:i*.05},className:"bg-white/80 backdrop-blur-sm border border-slate-200/50 rounded-2xl p-6 shadow-sm hover:shadow-xl hover:border-primary/20 transition-all duration-300 flex flex-col group hover:-translate-y-1.5",children:e.jsxs("div",{className:"space-y-4 flex-1 flex flex-col",children:[e.jsx("div",{className:`w-11 h-11 rounded-xl border flex items-center justify-center shrink-0 transition-all duration-300 ${t.color}`,children:e.jsx(s,{className:"w-5.5 h-5.5 group-hover:scale-110 transition-transform duration-300"})}),e.jsxs("div",{className:"space-y-2 flex-1",children:[e.jsx("h3",{className:"text-base font-bold text-slate-800 tracking-tight group-hover:text-primary transition-colors duration-200",children:t.title}),e.jsx("p",{className:"text-xs sm:text-sm text-slate-500 font-medium leading-relaxed",children:t.desc})]})]})},t.title)})})]})}),vo=({view:t="student"})=>{const i=t==="recruiter"||t==="college",s=()=>{window.scrollTo({top:0,behavior:"smooth"})},l=o=>{o.preventDefault(),window.location.href=Q("student")},h=o=>{o.preventDefault(),window.location.href=Q("recruiter")},u=o=>{o.preventDefault(),window.location.href=Q("institution")};return i?e.jsx("footer",{className:"relative bg-slate-50 border-t border-slate-200 font-sans text-slate-700",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-12 relative z-10",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-12 gap-8 pb-10 border-b border-slate-200",children:[e.jsxs("div",{className:"lg:col-span-5 space-y-3",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("pre",{className:"text-[12px] leading-[1] font-mono font-black text-slate-900 select-none",children:`█▀█ █▄█ █▄░█ █▄█ ▀▄▀
64█▀▀ ░█░ █░▀█ ░█░ █░█`})}),e.jsx("p",{className:"text-xs text-slate-500 leading-relaxed max-w-sm font-medium",children:"The verified, code-first engineering talent ecosystem. We evaluate real developer repositories, verify skills, and eliminate hiring noise."})]}),e.jsxs("div",{className:"lg:col-span-3 space-y-3",children:[e.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-slate-900 font-mono",children:"Company"}),e.jsxs("ul",{className:"space-y-2 text-xs text-slate-600",children:[e.jsx("li",{children:e.jsx(fe,{to:"/about",className:"hover:text-violet-600 transition-colors font-medium text-violet-700",children:"About Us"})}),e.jsx("li",{children:e.jsx("a",{href:Q("student"),onClick:l,title:"Fix the Thinking, Not Just Co
64de | PyNyx Agentic DSA Tutor",className:"hover:text-violet-600 transition-colors",children:"For Students"})}),e.jsx("li",{children:e.jsx("a",{href:Q("recruiter"),onClick:h,title:"PyNyx Recruiter: World's Easiest Way to Find True Tech Talent",className:"hover:text-violet-600 transition-colors",children:"For Employers"})}),e.jsx("li",{children:e.jsx("a",{href:Q("institution"),onClick:u,title:"India's Most Advanced Placement Assistance Tool",className:"hover:text-indigo-600 transition-colors",children:"For Colleges"})})]})]}),e.jsxs("div",{className:"lg:col-span-4 space-y-3",children:[e.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-slate-900 font-mono",children:"Connect"}),e.jsxs("ul",{className:"space-y-2 text-xs text-slate-600",children:[e.jsx("li",{children:e.jsxs("a",{href:"mailto:[email protected]",className:"flex items-center gap-2 hover:text-violet-600 transition-colors",children:[e.jsx(ps,{className:"w-3.5 h-3.5 text-slate-400"})," [email protected]"]})}),e.jsx("li",{children:e.jsxs("a",{href:"tel:+919391151599",className:"flex items-center gap-2 hover:text-violet-600 transition-colors",children:[e.jsx(us,{className:"w-3.5 h-3.5 text-slate-400"})," +91 9391151599"]})}),e.jsx("li",{children:e.jsxs("a",{href:"https://linkedin.com/company/pynyx",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 hover:text-violet-600 transition-colors",children:[e.jsx(Zt,{className:"w-3.5 h-3.5 text-[#0077B5]"})," LinkedIn ",e.jsx(Et,{className:"w-3 h-3 text-slate-400"})]})}),e.jsx("li",{children:e.jsxs("a",{href:"https://www.instagram.com/pynyx_official",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 hover:text-violet-600 transition-colors",children:[e.jsx(Ls,{className:"w-3.5 h-3.5 text-[#E1306C]"})," Instagram ",e.jsx(Et,{className:"w-3 h-3 text-slate-400"})]})})]})]})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4 pt-6 text-xs text-slate-500 font-medium",children:[e.jsxs("div",{children:["© ",new Date().getFullYear()," PyNyx Private Limited. All Rights Reserved."]}),e.jsxs("div",{className:"flex items-center gap-6",children:[e.jsx(fe,{to:"/about",className:"hover:text-slate-900 transition-colors font-medium",children:"About Us"}),e.jsx(fe,{to:"/privacy",className:"hover:text-slate-900 transition-colors",children:"Privacy Policy"}),e.jsx(fe,{to:"/terms",className:"hover:text-slate-900 transition-colors",children:"Terms of Service"}),e.jsx("button",{onClick:s,className:"w-8 h-8 rounded-full bg-white border border-slate-200 flex items-center justify-center text-slate-600 hover:text-violet-600 hover:border-violet-300 transition-all shadow-sm cursor-pointer ml-2",title:"Back to Top",children:e.jsx(Fs,{className:"w-3.5 h-3.5"})})]})]})]})}):e.jsx("footer",{className:"relative bg-[#020205] border-t border-zinc-800/80 font-sans text-zinc-400",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-12 relative z-10",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-12 gap-10 pb-10 border-b border-zinc-800/80",children:[e.jsxs("div",{className:"lg:col-span-4 space-y-3.5",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("pre",{className:"text-[12px] leading-[1] font-mono font-black text-white select-none",children:`█▀█ █▄█ █▄░█ █▄█ ▀▄▀
65█▀▀ ░█░ █░▀█ ░█░ █░█`})}),e.jsx("p",{className:"text-xs text-zinc-400 leading-relaxed max-w-sm",children:"The verified code proof & AI mock interview platform. Solve DSA problems with Vasist Socratic AI, verify GitHub code proof, and showcase your skills to top tech recruiters."})]}),e.jsxs("div",{className:"lg:col-span-3 space-y-3",children:[e.jsx("h4",{className:"text-xs font-mono font-semibold uppercase tracking-wider text-zinc-200",children:"Platform"}),e.jsx("ul",{className:"space-y-2 text-xs text-zinc-400",children:e.jsx("li",{children:e.jsx(fe,{to:"/pricing",className:"hover:text-white transition-colors",children:"Pricing & Pro Access"})})})]}),e.jsxs("div",{className:"lg:col-span-2 space-y-3",children:[e.jsx("h4",{className:"text-xs font-mono font-semibold uppercase tracking-wider text-zinc-200",children:"Company"}),e.jsxs("ul",{className:"space-y-2 text-xs",children:[e.jsx("li",{children:e.jsx(fe,{to:"/about",className:"text-violet-400 hover:text-violet-300 transition-colors font-medium",children:"About Us"})}),e.jsx("li",{children:e.jsx("a",{href:Q("student"),onClick:l,title:"Fix the Thinking, Not Just Co
65de | PyNyx Agentic DSA Tutor",className:"text-zinc-400 hover:text-white transition-colors",children:"For Students"})}),e.jsx("li",{children:e.jsx("a",{href:Q("recruiter"),onClick:h,title:"PyNyx Recruiter: World's Easiest Way to Find True Tech Talent",className:"text-zinc-400 hover:text-white transition-colors",children:"For Employers"})}),e.jsx("li",{children:e.jsx("a",{href:Q("institution"),onClick:u,title:"India's Most Advanced Placement Assistance Tool",className:"text-zinc-400 hover:text-white transition-colors",children:"For Colleges"})})]})]}),e.jsxs("div",{className:"lg:col-span-3 space-y-3",children:[e.jsx("h4",{className:"text-xs font-mono font-semibold uppercase tracking-wider text-zinc-200",children:"Connect"}),e.jsxs("ul",{className:"space-y-2 text-xs text-zinc-400",children:[e.jsx("li",{children:e.jsxs("a",{href:"mailto:[email protected]",className:"flex items-center gap-2 hover:text-white transition-colors",children:[e.jsx(ps,{className:"w-3.5 h-3.5 text-zinc-500"})," [email protected]"]})}),e.jsx("li",{children:e.jsxs("a",{href:"tel:+919391151599",className:"flex items-center gap-2 hover:text-white transition-colors",children:[e.jsx(us,{className:"w-3.5 h-3.5 text-zinc-500"})," +91 9391151599"]})}),e.jsx("li",{children:e.jsxs("a",{href:"https://linkedin.com/company/pynyx",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 hover:text-white transition-colors",children:[e.jsx(Zt,{className:"w-3.5 h-3.5 text-zinc-500"})," LinkedIn ",e.jsx(Et,{className:"w-3 h-3 text-zinc-600"})]})}),e.jsx("li",{children:e.jsxs("a",{href:"https://www.instagram.com/pynyx_official",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 hover:text-white transition-colors",children:[e.jsx(Ls,{className:"w-3.5 h-3.5 text-zinc-500"})," Instagram ",e.jsx(Et,{className:"w-3 h-3 text-zinc-600"})]})})]})]})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4 pt-6 text-xs text-zinc-500 font-mono",children:[e.jsxs("div",{children:["© ",new Date().getFullYear()," PyNyx Private Limited. All Rights Reserved."]}),e.jsxs("div",{className:"flex items-center gap-6",children:[e.jsx(fe,{to:"/about",className:"hover:text-zinc-300 transition-colors text-zinc-400 font-medium",children:"About Us"}),e.jsx(fe,{to:"/privacy",className:"hover:text-zinc-300 transition-colors",children:"Privacy Policy"}),e.jsx(fe,{to:"/terms",className:"hover:text-zinc-300 transition-colors",children:"Terms of Service"}),e.jsx("button",{onClick:s,className:"w-8 h-8 rounded-full bg-zinc-900 border border-zinc-800 flex items-center justify-center text-zinc-400 hover:text-white hover:border-zinc-700 transition-all cursor-pointer shadow-sm ml-2",title:"Back to Top",children:e.jsx(Fs,{className:"w-3.5 h-3.5"})})]})]})]})})},_e=({initialView:t})=>{const{isAuthenticated:i,user:s,isLoading:l}=ot(),h=rt(),u=Oe();let o=t||(u==="recruiter"?"recruiter":u==="institution"?"college":"student");if(!t&&u==="student"){const p=h.pathname.toLowerCase();p.includes("recruiter")||p.includes("employer")?o="recruiter":(p.includes("institution")||p.includes("college"))&&(o="college")}const[m,b]=a.useState(!1),[w,d]=a.useState(!1),g=a.useRef(null),f=$e();return a.useEffect(()=>{const p=N=>{g.current&&!g.current.contains(N.target)&&d(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]),a.useEffect(()=>{const p=()=>{b(window.scrollY>20)};return window.addEventListener("scroll",p),()=>window.removeEventListener("scroll",p)},[]),a.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"instant"}),document.documentElement.scrollTop=0,document.body.scrollTop=0},[o,h.pathname,h.search]),a.useEffect(()=>{let p="Fix the Thinking, Not Just Code | PyNyx Agentic DSA Tutor",N="Master coding interviews with PyNyx, the Agentic DSA Tutor. Practice problems, improve your skills, and get real-time AI guidance to fix the thinking.",T="https://pynyx.com/";o==="recruiter"?(p="PyNyx Recruiter: World's Easiest Way to Find True Tech Talent",N="Find engineers who can actually build, not just list keywords. PyNyx offers next-gen tech talent verification with $0 sourcing and placement fees.",T="https://recruiter.pynyx.com/"):o==="college"&&(p="India's Most Advanced Placement Assistance Tool",N="Stop managing placements on spreadsheets. PyNyx is an end-to-e
65nd campus platform for job postings, AI-driven skill verification, and interview tracking.",T="https://institution.pynyx.com/"),document.title=p;let r=document.querySelector('meta[name="robots"]');r||(r=document.createElement("meta"),r.setAttribute("name","robots"),document.head.appendChild(r)),r.setAttribute("content","index, follow");const c=document.querySelector('meta[name="description"]');c&&c.setAttribute("content",N);const j=document.querySelector('meta[property="og:title"]');j&&j.setAttribute("content",p);const k=document.querySelector('meta[property="og:description"]');k&&k.setAttribute("content",N);let I=document.querySelector('link[rel="canonical"]');if(I)I.setAttribute("href",T);else{const _=document.createElement("link");_.setAttribute("rel","canonical"),_.setAttribute("href",T),document.head.appendChild(_)}},[o]),a.useEffect(()=>{!l&&i&&s&&(s.role==="RECRUITER"?u==="recruiter"?f("/dashboard",{replace:!0}):window.location.href=Q("recruiter","/dashboard"):s.role==="COLLEGE"?u==="institution"?f(`/${s.slug}/dashboard`,{replace:!0}):window.location.href=Q("institution",`/${s.slug}/dashboard`):s.role==="STUDENT"&&(u==="student"?f("/dashboard",{replace:!0}):window.location.href=Q("student","/dashboard")))},[i,s,l,f,u]),e.jsxs("div",{className:v(o==="college"||o==="recruiter"?"professional-theme bg-background text-foreground font-sans":"min-h-screen relative transition-colors duration-500",o==="student"&&"bg-[#09090b] text-white/90"),style:o==="student"?{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"}:void 0,children:[e.jsx("header",{className:v("fixed z-[100] transition-all duration-300",m?"top-3 left-3 right-3 rounded-xl border shadow-[0_8px_30px_rgb(0,0,0,0.06)] backdrop-blur-md":"top-0 left-0 right-0 rounded-none border-none bg-transparent shadow-none","sm:top-0 sm:left-0 sm:right-0 sm:rounded-none sm:shadow-none sm:border-t-0 sm:border-l-0 sm:border-r-0 sm:border-b sm:backdrop-blur-md",o==="recruiter"?m?"bg-white/80 border-slate-200/80 sm:bg-white/40 sm:border-border/40 shadow-sm py-0.5":"bg-transparent sm:bg-white/20 sm:border-border/20":o==="college"?m?"bg-white/95 border-border shadow-sm py-0.5":"bg-white/80 border-border":m?"bg-[#09090b]/80 border-white/[0.06] py-0.5 backdrop-blur-xl":"bg-transparent sm:bg-transparent sm:border-white/[0.04]"),children:e.jsxs("div",{className:v("mx-auto flex items-center justify-between relative transition-all duration-500 w-full",m?"px-3.5 py-1.5":"px-4 sm:px-6 py-3 sm:py-4",(o==="college"||o==="recruiter")&&m?"sm:max-w-[1240px] sm:px-5 md:px-8 sm:py-2":"sm:container sm:px-4 md:px-6 sm:py-3 md:py-4"),children:[e.jsx("div",{className:"flex items-center space-x-2 md:space-x-3 cursor-pointer group w-auto sm:w-[150px] lg:w-[200px]",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:o==="student"?e.jsx("pre",{className:"text-[10px] sm:text-[12px] leading-[1] font-mono font-black text-white group-hover:text-white/80 transition-all duration-300 select-none",children:`█▀█ █▄█ █▄░█ █▄█ ▀▄▀
66█▀▀ ░█░ █░▀█ ░█░ █░█`}):e.jsxs("div",{className:"flex items-baseline transition-opacity group-hover:opacity-80 select-none",children:[e.jsx("span",{className:"text-[26px] sm:text-[34.5px] font-bold tracking-tighter text-primary leading-none",children:"Py"}),e.jsx("span",{className:"text-[26px] sm:text-[34.5px] font-bold tracking-tighter text-foreground leading-none",children:"Nyx"}),e.jsx("div",{className:"ml-0.5 sm:ml-1 w-[5px] h-[5px] sm:w-[7px] sm:h-[7px] rounded-full bg-primary animate-pulse"})]})}),e.jsxs("div",{className:"flex items-center justify-end space-x-1.5 sm:space-x-3 md:space-x-4 w-auto ml-auto",children:[e.jsxs("div",{className:"relative",ref:g,children:[e.jsxs("button",{type:"button",onClick:()=>d(p=>!p),className:v("text-xs sm:text-sm font-medium transition-colors px-1.5 py-1 flex items-center gap-1 cursor-pointer select-none",o==="college"||o==="recruiter"?"text-muted-foreground hover:text-primary":"text-white/60 hover:text-white"),children:[e.jsx("span",{children:"Products"}),e.jsx(zs,{className:v("w-3.5 h-3.5 transition-transform duration-200",w&&"rotate-180")}
66)]}),e.jsx(nt,{children:w&&e.jsxs(A.div,{initial:{opacity:0,y:-8,scale:.96},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-8,scale:.96},transition:{duration:.18,ease:[.16,1,.3,1]},className:v("absolute top-full right-0 mt-2 w-56 rounded-xl p-1.5 shadow-xl border z-[110] origin-top-right",o==="college"||o==="recruiter"?"bg-white border-slate-200/80 shadow-slate-900/10 text-slate-800":"bg-[#121216] border-white/10 shadow-black/80 text-white"),children:[e.jsxs("a",{href:Q("institution"),title:"India's Most Advanced Placement Assistance Tool",onClick:p=>{p.preventDefault(),d(!1),u==="institution"?f("/"):window.location.href=Q("institution")},className:v("block p-3 rounded-lg transition-colors cursor-pointer group",o==="college"||o==="recruiter"?"hover:bg-slate-100/80 text-slate-800":"hover:bg-white/[0.06] text-white"),children:[e.jsx("div",{className:"text-xs font-semibold group-hover:text-primary transition-colors",children:"For Institutions"}),e.jsx("div",{className:v("text-[11px] mt-0.5 leading-normal",o==="college"||o==="recruiter"?"text-slate-500":"text-zinc-400"),children:"Campus hiring & skill verification"})]}),e.jsxs("a",{href:Q("recruiter"),title:"PyNyx Recruiter: World's Easiest Way to Find True Tech Talent",onClick:p=>{p.preventDefault(),d(!1),u==="recruiter"?f("/"):window.location.href=Q("recruiter")},className:v("block p-3 rounded-lg transition-colors cursor-pointer group mt-0.5",o==="college"||o==="recruiter"?"hover:bg-slate-100/80 text-slate-800":"hover:bg-white/[0.06] text-white"),children:[e.jsx("div",{className:"text-xs font-semibold group-hover:text-primary transition-colors",children:"For Recruiters"}),e.jsx("div",{className:v("text-[11px] mt-0.5 leading-normal",o==="college"||o==="recruiter"?"text-slate-500":"text-zinc-400"),children:"Tech talent discovery"})]}),(o==="recruiter"||o==="college")&&e.jsxs("a",{href:Q("student"),title:"Fix the Thinking, Not Just Code | PyNyx Agentic DSA Tutor",onClick:p=>{p.preventDefault(),d(!1),u==="student"?f("/for-students"):window.location.href=Q("student")},className:v("block p-3 rounded-lg transition-colors cursor-pointer group border-t mt-1 pt-2.5",o==="college"||o==="recruiter"?"border-slate-100 hover:bg-slate-100/80 text-slate-800":"border-white/5 hover:bg-white/[0.06] text-white"),children:[e.jsx("div",{className:"text-xs font-semibold group-hover:text-primary transition-colors",children:"For Students"}),e.jsx("div",{className:v("text-[11px] mt-0.5 leading-normal",o==="college"||o==="recruiter"?"text-slate-500":"text-zinc-400"),children:"Socratic DSA tutor & code proof"})]})]})})]}),e.jsx("button",{onClick:()=>{o==="college"?u==="institution"?f("/login"):window.location.href=Q("institution","/login"):o==="recruiter"?u==="recruiter"?f("/login"):window.location.href=Q("recruiter","/login"):f("/auth")},className:v("text-xs sm:text-sm font-medium transition-colors px-1.5 py-1",o==="college"||o==="recruiter"?"text-muted-foreground hover:text-primary":"text-white/60 hover:text-white"),children:"Sign In"}),e.jsx("button",{onClick:()=>{o==="college"?u==="institution"?f("/register"):window.location.href=Q("institution","/register"):o==="recruiter"?u==="recruiter"?f("/signup"):window.location.href=Q("recruiter","/signup"):f("/signup")},className:v("px-3 py-1.5 sm:px-4 sm:py-2 text-xs sm:text-sm rounded-lg font-semibold transition-all whitespace-nowrap border",o==="college"||o==="recruiter"?"bg-primary text-primary-foreground border-primary hover:bg-primary/90":"bg-white/[0.08] border-white/[0.1] text-white/80 hover:bg-white/[0.12] hover:border-white/[0.15]"),children:"Get Started"})]})]})}),e.jsxs("main",{children:[o==="student"&&e.jsxs("div",{children:[e.jsx(On,{}),e.jsx(Ln,{}),e.jsx(Bn,{}),e.jsx(ao,{}),e.jsx(Kn,{}),e.jsx(to,{}),e.jsx(lo,{}),e.jsx(co,{})]}),o==="recruiter"&&e.jsxs("div",{className:"animate-in fade-in zoom-in-95 duration-700 relative overflow-hidden",children:[e.jsx(Qs,{}),e.jsxs("div",{className:"relative z-10",children:[e.jsx(Mn,{}),e.jsx(bi,{}),e.jsx(Vn,{}),e.jsx(Gn,{}),e.jsx(Qn,{}),e.jsx(Ks,{}),e.jsx(Jn,{})]})]}),o==="college"&&e.jsxs("div",{className:"animate-in fade-in zoom-in-95 duration-700 relative overflow-hidden",children:[e.jsx(Qs,{}),e.jsxs("div",{className:"relative z-10",children:[e.jsx(ho,{}),e.jsx(po,{}),e.jsx(xo,{}),e.jsx(fo,{}),e.jsx(yo,{}),e.jsx(Ks,{}),e.jsx(mo,{})]})]})]}),e.jsx(vo,{view:o})]})},wo=Sa("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),J=a.forwardRef(({className:t,variant:i,size:s,asChild:l=!1,...h},u)=>{const o=l?yr:"button";return e.jsx(o,{className:v(wo({variant:i,size:s,className:t})),ref:u,...h})});J.displayName="Button";const ie=a.forwardRef(({className:t,type:i,...s},l)=>e.jsx("input",{type:i,className:v("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:l,...s}));
66ie.displayName="Input";const yi=a.forwardRef(({className:t,...i},s)=>e.jsx(Ga,{ref:s,className:v("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...i,children:e.jsx(vr,{className:v("flex items-center justify-center text-current"),children:e.jsx(Xe,{className:"h-4 w-4"})})}));yi.displayName=Ga.displayName;const Jt={async verifyEmail(t){return(await ye.get(`/verify-email?token=${encodeURIComponent(t)}`)).data},async verifyCode(t,i){return(await ye.post("/verify-email",{identifier:t,code:i})).data},async resetPassword(t,i,s){return(await ye.post("/reset-password",{email:t,code:i,new_password:s})).data},async verifyResetOtp(t,i){return(await ye.post("/verify-reset-otp",{email:t,code:i})).data},async collegeVerifyResetOtp(t,i){return(await ye.post("/college/verify-reset-otp",{email:t,code:i})).data},async collegeForgotPassword(t){return(await ye.post("/college/forgot-password",{identifier:t})).data},async collegeResetPassword(t,i,s){return(await ye.post("/college/reset-password",{identifier:t,code:i,new_password:s})).data}},jo=({children:t,fontSize:i=120,fontWeight:s=900,fontFamily:l="monospace",color:h="#fff",enableHover:u=!0,baseIntensity:o=.18,hoverIntensity:m=.5})=>{const b=a.useRef(null);return a.useEffect(()=>{const w=b.current;if(!w)return;const d=w.getContext("2d");if(!d)return;let g,f=!1;const p=document.createElement("canvas"),N=p.getContext("2d");if(!N)return;const T=()=>{if(!d||!N)return;const j=w.width,k=w.height;d.clearRect(0,0,j,k),p.width=j,p.height=k,N.clearRect(0,0,j,k),N.fillStyle=h,N.font=`${s} ${i}px ${l}`,N.textAlign="center",N.textBaseline="middle",N.fillText(String(t),j/2,k/2);const _=N.getImageData(0,0,j,k).data,q=d.createImageData(j,k),F=q.data,O=f?m:o;for(let Y=0;Y<k;Y++){const te=Math.floor((Math.random()-.5)*O*(i*.5));for(let y=0;y<j;y++){const E=y-te;if(E>=0&&E<j){const C=(Y*j+E)*4,$=(Y*j+y)*4;F[$]=_[C],F[$+1]=_[C+1],F[$+2]=_[C+2],F[$+3]=_[C+3]}}}d.putImageData(q,0,0),g=requestAnimationFrame(T)};T();const r=()=>{u&&(f=!0)},c=()=>{f=!1};return w.addEventListener("mouseenter",r),w.addEventListener("mouseleave",c),()=>{cancelAnimationFrame(g),w.removeEventListener("mouseenter",r),w.removeEventListener("mouseleave",c)}},[t,i,s,l,h,u,o,m]),e.jsx("canvas",{ref:b,width:600,height:300,className:"w-full h-full object-contain cursor-pointer"})},hs=()=>
66{const t=$e(),i=rt(),{login:s,isAuthenticated:l,user:h,isLoading:u}=ot(),[o,m]=a.useState("login"),[b,w]=a.useState(!1),[d,g]=a.useState(null),[f,p]=a.useState(""),[N,T]=a.useState(""),[r,c]=a.useState(""),[j,k]=a.useState(!1),[I,_]=a.useState(!1),[q,F]=a.useState(!1),[O,Y]=a.useState(""),[te,y]=a.useState(!1),[E,C]=a.useState(""),[$,R]=a.useState(""),[X,re]=a.useState(""),[xe,se]=a.useState(!1),[K,we]=a.useState(!1),[ke,Ie]=a.useState(!1),[Pe,Ve]=a.useState(!1),[lt,ct]=a.useState(["> Ready.","> Watching for input changes..."]);a.useEffect(()=>{const D=document.createElement("script");return D.src="https://accounts.google.com/gsi/client",D.async=!0,D.defer=!0,document.head.appendChild(D),()=>{document.head.removeChild(D)}},[]);const ns=()=>{if(!window.google){ce.error("Google Identity Services not loaded",{description:"Please wait a moment and try again."}),W("Error: Google Identity Services SDK not loaded.");return}w(!0),W("Initializing Google OAuth handshake...");try{window.google.accounts.oauth2.initTokenClient({client_id:_n,scope:"email profile",callback:async H=>{var de,V;if(H&&H.access_token){W("Google verification code received. Exchanging token with backend...");try{const be=((de=new URLSearchParams(i.search).get("role"))==null?void 0:de.toUpperCase())||"STUDENT",B=await fetch(`${he}/auth/google`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({access_token:H.access_token,role:be})});if(!B.ok){const ae=await B.json().catch(()=>({})),ge=((V=ae==null?void 0:ae.error)==null?void 0:V.message)||(ae==null?void 0:ae.detail)||(ae==null?void 0:ae.message)||"Google Auth Failed";throw new Error(ge)}const Te=await B.json();s(Te.access_token),W("Identity verified. Access authorized."),ce.success("Login successful!",{description:"Welcome back."}),Te.role==="RECRUITER"?window.location.href=Q("recruiter","/dashboard"):t("/dashboard",{replace:!0})}catch(ne){W(`Error: ${ne.message||"Verification failed"}`),ce.error("Google Auth failed",{description:ne.message||"Verification failed"})}finally{w(!1)}}else w(!1),W("Handshake cancelled by user.")},error_callback:H=>{w(!1),W(`Error during Google authentication: ${H.message||H}`),ce.error("Google Auth failed",{description:H.message||"Authorization failed"})}}).requestAccessToken()}catch(D){w(!1),W("Error: Initializing handshake failed"),ce.error("Initialization failed",{description:D.message||"Failed to start Google Sign-in"})}};a.useEffect(()=>{!u&&l&&h&&(h.role==="RECRUITER"?window.location.href=Q("recruiter","/dashboard"):h.role==="COLLEGE"?window.location.href=Q("institution",`/${h.slug}/dashboard`):t("/dashboard",{replace:!0}))},[l,u,h,t]),a.useEffect(()=>{var de;const H=(de=new URLSearchParams(i.search).get("role"))==null?void 0:de.toUpperCase();if(i.pathname.includes("signup")){if(H==="COLLEGE"){window.location.href=Q("institution","/register");return}m("signup")}else if(i.pathname.includes("login")||i.pathname==="/auth"){if(H==="COLLEGE"){window.location.href=Q("institution","/login");return}if(H==="RECRUITER"){window.location.href=Q("recruiter","/login");return}o!=="forgot-password"&&m("login")}},[i.pathname,i.search]);const W=D=>{ct(H=>[...H.slice(-4),`> ${D}`])},Re=D=>{m(D),_(!1),se(!1),C(""),R(""),re(""),Ie(!1),Ve(!1),g(null),W(`Switched context to ${D==="login"?"auth.login.js":D==="signup"?"user.create.js":"auth.reset.js"}`),D!=="forgot-password"&&t(D==="login"?"/login":"/signup")},Ke=async()=>{var H,de;if(!(o==="forgot-password"?!!N:o==="signup"?!!f&&!!r&&!!N:!!f&&!!r)){W(`Error: Missing required fields for ${o}`);return}w(!0),W(`Initiating ${o==="login"?"login":o==="signup"?"registration":"recovery"} sequence...`);try{const V=o==="login"?`${he}/login`:o==="signup"?`${he}/signup`:`${he}/forgot-password`,ne=f.trim(),be=N.trim();let B,Te={};if(o==="signup"&&ne.includes(" "))throw new Error("Username cannot contain spaces");if(o==="login"){const ge=new URLSearchParams;ge.append("username",ne),ge.append("password",r),B=ge,Te={"Content-Type":"application/x-www-form-urlencoded"}}else if(o==="signup"){const je=((H=new URLSearchParams(i.search).get("role"))==null?void 0:H.toUpperCase())||"STUDENT";B=JSON.stringify({username:ne,email:be.toLowerCase(),password:r,role:je}),Te={"Content-Type":"application/json"}}else B=JSON.stringify({email:be.toLowerCase()}),Te={"Content-Type":"application/json"};W(`Sending request to ${V}...`);const ae=await fetch(V,{method:"POST",headers:Te,body:B});if(!ae.ok){let ge="",je=null;try{je=await ae.json(),ge=((de=je==null?void 0:je.error)==null?void 0:de.message)||(je==null?void 0:je.detail)||(je==null?void 0:je.message)}catch{}throw ae.status===404?(g("404 USER NOT FOUND"),W("Error: 404 User Not Found"),new Error(ge||"User not found")):ae.status===401?(g("401 UNAUTHORIZED"),W("Error: 401 Unauthorized"),new Error(ge||"Invalid credentials")):ae.status===403?(ge&&ge.includes("verify your email")?(g("VERIFY_EMAIL"),W("Error: Account not verified.")):(g("403 SIGNUP RESTRICTED"),W("Error: 403 Signup Restricted")),new Error(ge||"Sign up is restricted")):new Error(ge||"Authentication failed")}if(g(null),o==="login"){const ge=await ae.json();if(s(ge.access_token),W("Authentication successful. Token received."),ce.success("Login successful!",{description:"Welcome back."}),ge.role==="RECRUITER")window.location.href=Q("recruiter","/dashboard");else{if(ge.role==="COLLEGE")return;t("/dashboard",{replace:!0})}}else o==="signup"?(W("User registration successful."),W("VERIFICATION_REQUIRED: Check your inbox."),_(!0),ce.success("Account created!",{description:"Please verify your email."})):(W("Recovery OTP code sent. Check your inbox."),ce.success("OTP Code Sent!",{description:"If the account exists, you will receive a code shortly."}),se(!0))}catch(V){const ne=Fe(V),be=ne?"Network issue error":"Operation failed",B=at(V);W(`Error: ${ne?"Network issue error":B}`),ce.error(be,{description:B})}finally{w(!1)}},ft=async()=>{F(!0),W("Initiating verification resend sequence...");try{const D={};if(f.trim()&&(D.username=f.trim()),N.trim()&&(D.email=N.trim()),!(await fetch(`${he}/resend-verification`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(D)})).ok)throw new Error("Resend failed");W("Resend sequence complete. Check your inbox."),ce.success("Verification code resent!",{description:"Please check your email."}),_(!0),g(null)}catch(D){const de=Fe(D)?"Network issue error":"Resend failed",V=at(D);W(`Error: ${de}`),ce.error(de,{description:V})}finally{F(!1)}},dt=async()=>{const D=O.trim();if(D.length!==6){W("Error: Verification code must be 6 digits."),ce.error("Invalid Code",{description:"Please enter a 6-digit verification code."});return}y(!0),W("Verifying security handshake code...");try{const H=N.trim()||f.trim();await Jt.verifyCode(H,D),W("Identity confirmed. Access authorized."),ce.success("Account verified successfully!",{description:"You can now log in."}),_(!1),g(null),Y(""),Re("login")}catch(H){const de=Fe(H),V=at(H);W(`Error: ${de?"Network issue error":V}`),ce.error("Verification failed",{description:V})}finally{y(!1)}},_t=async()=>{const D=E.trim();if(D.length!==6){W("Error: Recovery OTP must be 6 digits."),ce.error("Invalid Code",{description:"Please enter a 6-digit verification code."});return}Ve(!0),W("Validating recovery OTP...");try{await Jt.verifyResetOtp(N.trim(),D),W("OTP validation successful. Mode patch unlocked."),ce.success("Identity Verified",{description:"You may now reset your password."}),Ie(!0)}catch(H){const de=Fe(H),V=at(H);W(`Error: ${de?"Network issue error":V}`),ce.error("Verification failed",{description:V})}finally{Ve(!1)}},mt=async()=>
66{if(!$||$!==X){W("Error: Passwords do not match."),ce.error("Security mismatch",{description:"Passwords must match."});return}if($.length<8){W("Error: Password must be at least 8 characters."),ce.error("Invalid password",{description:"Password must be at least 8 characters."});return}we(!0),W("Injecting recovery credentials...");try{await Jt.resetPassword(N.trim(),E.trim(),$),W("Kernel patch applied successfully."),ce.success("Security Updated",{description:"Your password has been reset."}),setTimeout(()=>{se(!1),C(""),R(""),re(""),Re("login")},2e3)}catch(D){const H=Fe(D),de=at(D);W(`Error: ${H?"Network issue error":de}`),ce.error("Reset failed",{description:de})}finally{we(!1)}},At=()=>{var Te;const D=f||"user_typing_here",H=N||"[email protected]",de=r?"•".repeat(r.length):"........",V=ae=>`<span class="text-[#ff7b72]">${ae}</span>`,ne=ae=>`<span class="text-[#a5d6ff]">${ae}</span>`,be=ae=>`<span class="text-[#8b949e]">${ae}</span>`,B=ae=>`<span class="text-[#f0883e]">${ae}</span>`;if(o==="login")return`${V("import")} ${B("{")} Authenticator ${B("}")} ${V("from")} ${ne("'@platform/security'")};
67
68${V("async")} ${V("function")} initSession${B("()")} ${B("{")}
69  ${V("const")} credentials = ${B("{")}
70    user: ${ne(`"${D}"`)}, ${be("// Live update")}
71    token: ${ne(`"${de}"`)} ${be("// Obfuscated")}
72  ${B("}")};
73  
74  ${be("// Awaiting 'Run Build' command...")}
75  ${b?`${V("await")} Authenticator.login${B("(")}credentials${B(")")};`:""}
76${B("}")}`;if(o==="signup"){const ae=((Te=new URLSearchParams(i.search).get("role"))==null?void 0:Te.toUpperCase())||"STUDENT";return`${V("import")} ${B("{")} UserManager ${B("}")} ${V("from")} ${ne("'@platform/admin'")};
77
78${V("async")} ${V("function")} createUser${B("()")} ${B("{")}
79  ${V("const")} newUser = ${B("{")}
80    username: ${ne(`"${D}"`)}, 
81    email: ${ne(`"${H}"`)},
82    password: ${ne(`"${de}"`)}, ${be("// Hash before sending?")}
83    role: ${ne(`"${ae}"`)}
84  ${B("}")};
85  
86  ${be("// Awaiting 'Run Build' command...")}
87  ${b?`${V("await")} UserManager.create${B("(")}newUser${B(")")};`:""}
88${B("}")}`}else if(xe){const ae=$?"•".repeat($.length):"........";return`${V("import")} ${B("{")} SecurityService ${B("}")} ${V("from")} ${ne("'@platform/security'")};
89
90${V("async")} ${V("function")} verifyAndReset${B("()")} ${B("{")}
91  ${V("const")} update = ${B("{")}
92    email: ${ne(`"${H}"`)},
93    otp: ${ne(`"${E}"`)},
94    new_hash: ${ne(`"${ae}"`)}
95  ${B("}")};
96  
97  ${be("// Executing kernel patch...")}
98  ${K?`${V("await")} SecurityService.resetWithOTP${B("(")}update${B(")")};`:""}
99${B("}")}`}else return`${V("import")} ${B("{")} SecurityService ${B("}")} ${V("from")} ${ne("'@platform/security'")};
100
101${V("async")} ${V("function")} requestReset${B("()")} ${B("{")}
102  ${V("const")} target_account = ${ne(`"${H}"`)};
103  
104  ${be("// Initiating recovery sequence...")}
105  ${b?`${V("await")} SecurityService.sendResetOTP${B("(")}target_account${B(")")};`:""}
106${B("}")}`};return e.jsxs("div",{className:"dark min-h-screen flex flex-col items-center justify-center p-3 sm:p-4 font-mono relative overflow-x-hidden overflow-y-auto md:overflow-hidden",children:[e.jsx("div",{className:"fixed top-4 left-4 sm:top-12 sm:left-12 z-50",children:e.jsxs(J,{variant:"ghost",onClick:()=>window.location.href="/",className:"group flex items-center gap-2 bg-transparent hover:bg-[#bd93f9]/5 text-[#8b949e] hover:text-[#bd93f9] transition-all px-3 sm:px-4 h-9 sm:h-10 rounded-lg border border-white/5 md:border-transparent",children:[e.jsx(Cs,{size:16,className:"group-hover:-translate-x-1 transition-transform"}),e.jsx("span",{className:"text-[10px] font-black uppercase tracking-[0.2em]",children:"back"})]})}),e.jsxs("div",{className:"w-full max-w-[900px] mx-auto bg-transparent rounded-xl border border-white/10 shadow-2xl overflow-hidden flex flex-col mt-12 md:mt-0",children:[e.jsx("div",{className:"h-10 bg-[#0d1117]/60 backdrop-blur-md border-b border-white/5 flex items-center px-4 justify-between select-none",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs("div",{className:"flex space-x-1.5 mr-4",children:[e.jsx("div",{className:"w-3 h-3 rounded-full bg-[#ff5f56]"}),e.jsx("div",{className:"w-3 h-3 rounded-full bg-[#ffbd2e]"}),e.jsx("div",{className:"w-3 h-3 rounded-full bg-[#27c93f]"})]}),e.jsx("div",{className:"text-xs text-[#8b949e]",children:"IDE window"})]})}),e.jsxs("div",{className:"flex bg-[#0d1117]/60 backdrop-blur-md border-b border-white/5 overflow-x-auto no-scrollbar",children:[e.jsxs("button",{onClick:()=>Re("login"),className:v("px-4 py-2 text-xs flex items-center space-x-2 border-r border-[#30363d] transition-colors shrink-0",o==="login"?"bg-white/5 text-[#c9d1d9] border-t-2 border-t-[#d2a8ff] shadow-[inset_0_1px_0_0_#d2a8ff,0_0_15px_-3px_rgba(210,168,255,0.3)]":"text-[#8b949e] hover:bg-white/5"),children:[e.jsx("span",{className:"text-[#a5d6ff]",children:"JS"}),e.jsx("span",{children:"auth.login.js"})]}),e.jsxs("button",{onClick:()=>Re("signup"),className:v("px-4 py-2 text-xs flex items-center space-x-2 border-r border-[#30363d] transition-colors shrink-0",o==="signup"?"bg-white/5 text-[#c9d1d9] border-t-2 border-t-[#d2a8ff] shadow-[inset_0_1px_0_0_#d2a8ff,0_0_15px_-3px_rgba(210,168,255,0.3)]":"text-[#8b949e] hover:bg-white/5"),children:[e.jsx("span",{className:"text-[#a5d6ff]",children:"JS"}),e.jsx("span",{children:"user.create.js"})]})]}),e.jsxs("div",{className:"flex flex-col md:flex-row min-h-[460px] md:h-[500px]",children:[e.jsxs("div",{className:v("w-full md:w-1/2 p-4 sm:p-6 border-b md:border-b-0 md:border-r border-white/5 bg-transparent flex flex-col",(xe||I||d==="VERIFY_EMAIL")&&"hidden md:flex"),children:[e.jsx("div",{className:"text-xs font-bold text-[#8b949e] mb-6 uppercase tracking-wider",children:"UI Input"}),e.jsxs("div",{className:"space-y-4 flex-1 font-mono text-sm leading-relaxed",children:[e.jsxs("div",{className:"flex items-center group",children:[e.jsx("span",{className:"text-[#484f58] select-none w-8 text-right pr-3 shrink-0",children:"1"}),e.jsx("span",{className:"text-[#8b949e] w-20 shrink-0",children:o==="forgot-password"?"Email:":o==="login"?"Identifier:":"Username:"}),e.jsxs("div",{className:"relative flex-1",children:[e.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-[#79c0ff] font-bold",children:o==="forgot-password"?"@":"["}),e.jsx(ie,{maxLength:o==="signup"?15:void 0,value:o==="forgot-password"?N:f,onChange:D=>{const H=D.target.value;o==="signup"&&H.includes(" ")||(o==="forgot-password"?T(H):p(H))},className:"bg-[#161b22] border-[#30363d] text-[#c9d1d9] pl-6 pr-6 h-9 font-mono text-sm focus:border-[#d2a8ff] focus:shadow-[0_0_15px_rgba(210,168,255,0.3)] focu
106s:ring-1 focus:ring-[#d2a8ff] focus-visible:ring-1 focus-visible:ring-[#d2a8ff] focus-visible:border-[#d2a8ff] focus-visible:ring-offset-0 transition-all",placeholder:o==="forgot-password"?"[email protected]":o==="login"?"username_or_email":"enter_username (max 15)"}),e.jsx("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-[#79c0ff] font-bold",children:o==="forgot-password"?"":"]"})]})]}),o==="signup"&&e.jsxs("div",{className:"flex items-center group animate-in fade-in slide-in-from-top-2",children:[e.jsx("span",{className:"text-[#484f58] select-none w-8 text-right pr-3 shrink-0",children:"2"}),e.jsx("span",{className:"text-[#8b949e] w-20 shrink-0",children:"Email:"}),e.jsxs("div",{className:"relative flex-1",children:[e.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-[#7ee787] font-bold",children:"@"}),e.jsx(ie,{value:N,onChange:D=>T(D.target.value),className:"bg-[#161b22] border-[#30363d] text-[#c9d1d9] pl-8 h-9 font-mono text-sm focus:border-[#d2a8ff] focus:shadow-[0_0_15px_rgba(210,168,255,0.3)] focus:ring-1 focus:ring-[#d2a8ff] focus-visible:ring-1 focus-visible:ring-[#d2a8ff] focus-visible:border-[#d2a8ff] focus-visible:ring-offset-0 transition-all",placeholder:"[email protected]"})]})]}),o!=="forgot-password"&&e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center group",children:[e.jsx("span",{className:"text-[#484f58] select-none w-8 text-right pr-3 shrink-0",children:o==="signup"?3:2}),e.jsx("span",{className:"text-[#8b949e] w-20 shrink-0",children:"Password:"}),e.jsxs("div",{className:"relative flex-1",children:[e.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-[#d2a8ff] font-bold",children:"["}),e.jsx(ie,{type:j?"text":"password",value:r,onChange:D=>c(D.target.value),className:"bg-[#161b22] border-[#30363d] text-[#c9d1d9] pl-6 pr-10 h-9 font-mono text-sm focus:border-[#d2a8ff] focus:shadow-[0_0_15px_rgba(210,168,255,0.3)] focus:ring-1 focus:ring-[#d2a8ff] focus-visible:ring-1 focus-visible:ring-[#d2a8ff] focus-visible:border-[#d2a8ff] focus-visible:ring-offset-0 transition-all",placeholder:"••••••••"}),e.jsx("span",{className:"absolute right-10 top-1/2 -translate-y-1/2 text-[#d2a8ff] font-bold",children:"]"}),e.jsx("button",{type:"button",onClick:()=>k(!j),className:"absolute right-3 top-1/2 -translate-y-1/2 text-[#8b949e] hover:text-[#c9d1d9]",children:j?e.jsx(Ua,{size:14}):e.jsx(Ts,{size:14})})]})]}),o==="login"&&e.jsx("div",{className:"pl-0 sm:pl-28 pt-1",children:e.jsx("button",{onClick:()=>Re("forgot-password"),className:"text-[10px] text-[#8b949e] hover:text-[#d2a8ff] transition-colors uppercase tracking-widest font-bold",children:"forget_password?"})})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3 pt-2 pl-0 sm:pl-11",children:[e.jsxs(J,{onClick:Ke,disabled:b,className:"bg-transparent border border-[#2ea043] text-[#2ea043] hover:bg-[#2ea043]/10 hover:text-[#3fb950] font-mono h-9 px-4 text-xs shadow-[0_0_10px_rgba(46,160,67,0.5)] relative overflow-hidden group transition-all",children:[b?e.jsx(Ue,{className:"w-3 h-3 mr-2 animate-spin"}):e.jsx(ht,{className:"w-3 h-3 mr-2 fill-current"}),"Run Build"]}),o==="login"&&e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(yi,{id:"remember",className:"border-[#30363d] w-4 h-4 data-[state=checked]:bg-[#238636] data-[state=checked]:border-[#238636]"}),e.jsx("label",{htmlFor:"remember",className:"text-xs text-[#8b949e] cursor-pointer hover:text-[#c9d1d9]",children:"Remember Me"})]})]}),o!=="forgot-password"&&e.jsxs("div",{className:"flex flex-col pl-0 sm:pl-11 pt-4 space-y-3",children:[e.jsx("div",{className:"flex items-center text-xs text-[#8b949e] before:content-[''] before:flex-1 before:border-t before:border-white/5 after:content-[''] after:flex-1 after:border-t after:border-white/5 gap-3",children:e.jsx("span",{children:"OR"})}),e.jsxs(J,{onClick:ns,disabled:b,className:"bg-[#161b22] border border-[#30363d] text-[#c9d1d9] hover:bg-white/5 font-mono h-9 text-xs flex items-center justify-center gap-2 transition-all w-full",children:[e.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",children:[e.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),e.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),e.jsx("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.06H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.94l2.85-2.22.81-.63z"}),e.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.06l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),"Sign in with Google"]})]})]})]}),e.jsx("div",{className:v("w-full md:w-1/2 bg-transparent flex flex-col relative overflow-hidden",!(xe||I||d==="VERIFY_EMAIL")&&"hidden md:flex"),children:xe?e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-[#0d1117]/95 z-10 p-8 font-mono text-center space-y-4 animate-in fade-in zoom-in-95 duration-200 overflow-y-auto no-scrollbar",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h2",{className:"text-lg font-bold text-[#bd93f9] tracking-wider up
106percase",children:"Kernel Recovery Mode"}),e.jsx("p",{className:"text-xs text-[#8b949e] max-w-xs mx-auto leading-relaxed",children:ke?"OTP verified successfully. Please enter your new password below.":`Enter the 6-digit OTP code sent to ${N}`})]}),e.jsx("div",{className:"flex flex-col items-center space-y-3 w-full",children:ke?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"w-64",children:[e.jsx("div",{className:"text-[10px] text-left text-[#8b949e] font-bold uppercase tracking-wider mb-1",children:"New Password:"}),e.jsx(ie,{type:"password",value:$,onChange:D=>R(D.target.value),className:"bg-[#161b22] border-[#30363d] text-center text-sm text-[#c9d1d9] h-10 focus:border-[#d2a8ff] focus-visible:ring-offset-0 focus-visible:ring-1 focus-visible:ring-[#d2a8ff] focus-visible:border-[#d2a8ff] transition-all",placeholder:"••••••••"})]}),e.jsxs("div",{className:"w-64",children:[e.jsx("div",{className:"text-[10px] text-left text-[#8b949e] font-bold uppercase tracking-wider mb-1",children:"Confirm Password:"}),e.jsx(ie,{type:"password",value:X,onChange:D=>re(D.target.value),className:"bg-[#161b22] border-[#30363d] text-center text-sm text-[#c9d1d9] h-10 focus:border-[#d2a8ff] focus-visible:ring-offset-0 focus-visible:ring-1 focus-visible:ring-[#d2a8ff] focus-visible:border-[#d2a8ff] transition-all",placeholder:"••••••••"})]}),e.jsxs(J,{onClick:mt,disabled:K||!$||$!==X,className:"w-64 bg-transparent border border-[#2ea043] text-[#2ea043] hover:bg-[#2ea043]/10 hover:text-[#3fb950] font-mono h-10 text-xs shadow-[0_0_10px_rgba(46,160,67,0.3)] transition-all flex items-center justify-center",children:[K?e.jsx(Ue,{className:"w-3.5 h-3.5 mr-2 animate-spin"}):e.jsx(ht,{className:"w-3.5 h-3.5 mr-2 fill-current"}),"EXECUTE_PATCH"]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"w-64",children:[e.jsx("div",{className:"text-[10px] text-left text-[#8b949e] font-bold uppercase tracking-wider mb-1",children:"Recovery OTP:"}),e.jsx(ie,{maxLength:6,value:E,onChange:D=>C(D.target.value.replace(/\D/g,"")),className:"w-48 mx-auto bg-[#161b22] border-[#30363d] text-center tracking-[0.5em] text-lg font-bold uppercase text-[#79c0ff] h-10 focus:border-[#d2a8ff] focus-visible:ring-offset-0 focus-visible:ring-1 focus-visible:ring-[#d2a8ff] focus-visible:border-[#d2a8ff] transition-all",placeholder:"000000"})]}),e.jsxs(J,{onClick:_t,disabled:Pe||E.length!==6,className:"w-64 bg-transparent border border-[#2ea043] text-[#2ea043] hover:bg-[#2ea043]/10 hover:text-[#3fb950] font-mono h-10 text-xs shadow-[0_0_10px_rgba(46,160,67,0.3)] transition-all flex items-center justify-center",children:[Pe?e.jsx(Ue,{className:"w-3.5 h-3.5 mr-2 animate-spin"}):e.jsx(ht,{className:"w-3.5 h-3.5 mr-2 fill-current"}),"VERIFY_OTP"]})]})}),e.jsxs("div",{className:"flex flex-col items-center space-y-2 pt-2",children:[e.jsx("button",{onClick:Ke,disabled:b,className:"text-[10px] text-[#2ea043] hover:text-[#3fb950] font-bold uppercase tracking-widest transition-all",children:b?"SENDING...":"RESEND_OTP"}),e.jsx(J,{variant:"ghost",onClick:()=>{se(!1),C(""),R(""),re(""),W("Kernel recovery aborted.")},className:"text-[#8b949e] hover:text-[#c9d1d9] text-[10px] font-bold uppercase tracking-wider h-8",children:"Cancel"})]})]}):I||d==="VERIFY_EMAIL"?e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-[#0d1117]/95 z-10 p-8 font-mono text-center space-y-6 animate-in fade-in zoom-in-95 duration-200",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h2",{className:"text-lg font-bold text-[#bd93f9] tracking-wider uppercase",children:"Secure Handshake Required"}),e.jsxs("p",{className:"text-xs text-[#8b949e] max-w-xs mx-auto leading-relaxed",children:["We sent a 6-digit verification code to ",N?e.jsx("span",{className:"text-[#d2a8ff]",children:N}):"your email","."]})]}),e.jsxs("div",{className:"flex flex-col items-center space-y-4 w-full",children:[e.jsx(ie,{maxLength:6,value:O,onChange:D=>Y(D.target.value.replace(/\D/g,"")),className:"w-48 bg-[#161b22] border-[#30363d] text-center tracking-[0.5em] text-xl font-bold uppercase text-[#79c0ff] h-11 focus:border-[#d2a8ff] focus-visible:ring-offset-0 focus-visible:ring-1 focus-visible:ring-[#d2a8ff] focus-visible:border-[#d2a8ff] transition-all",placeholder:"000000"}),e.jsxs(J,{onClick:dt,disabled:te||O.length!==6,className:"w-48 bg-transparent border border-[#2ea043] text-[#2ea043] hover:bg-[#2ea043]/10 hover:text-[#3fb950] font-mono h-9 text-xs shadow-[0_0_10px_rgba(46,160,67,0.3)] transition-all",children:[te?e.jsx(Ue,{className:"w-3.5 h-3.5 mr-2 animate-spin"}):e.jsx(ht,{className:"w-3 h-3 mr-2 fill-current"}),"VERIFY_CODE"]})]}),e.jsxs("div",{className:"flex flex-col items-center space-y-3 pt-2",children:[e.jsx("button",{onClick:ft,disabled:q,className:"text-[10px] text-[#2ea043] hover:text-[#3fb950] font-bold uppercase tracking-widest transition-all",children:q?"SENDING...":"RESEND_CODE"}),e.jsx(J,{variant:"ghost",onClick:()=>{_(!1),g(null),Y(""),Re("login")},className:"text-[#8b949e] hover:text-[#c9d1d9] text-[10px] font-bold uppercase tracking-wider h-8",children:"Cancel"})]})]}):d?e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-[#0d1117] z-10 p-8",children:[e.jsx("div",{className:"w-full h-full flex items-center justify-center",children:e.jsx(jo,{fontSize:50,color:"#ff5f56",fontFamily:"monospace",baseIntensity:.1,hoverIntensity:.2,children:d})}),e.jsx("div",{className:"mt-4 flex flex-col items-center space-y-2",children:e.jsx(J,{variant:"ghost",onClick:()=>g(null),className:"text-[#8b949e] hover:text-[#c9d1d9]",children:"Dismiss"})})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"p-6 border-b border-[#30363d] flex-1 overflow-auto no-scrollbar",children:[e.jsx("div",{className:"text-xs font-bold text-[#8b949e] mb-4 uppercase tracking-wider",children:"Live Compilation"}),e.jsx("pre",{className:"font-mono text-sm leading-relaxed",children:e.jsx("code",{className:"language-javascript block",children:At().split(`
107`).map((D,H)=>e.jsxs("div",{className:"flex",children:[e.jsx("span",{className:"text-[#484f58] select-none w-8 text-right pr-3 shrink-0",children:H+1}),e.jsx("span",{className:"text-[#c9d1d9]",dangerouslySetInnerHTML:{__html:D}})]},H))})})]}),e.jsxs("div",{className:"h-40 bg-transparent border-t border-white/5 p-4 font-mono text-xs overflow-y-auto no-scrollbar",children:[e.jsxs("div",{className:"flex items-center text-[#8b949e] mb-2 uppercase text-[10px] tracking-wider border-b border-[#30363d] pb-1",children:[e.jsx(He,{size:10,
107className:"mr-1.5"})," Terminal"]}),e.jsxs("div",{className:"space-y-1",children:[lt.map((D,H)=>e.jsx("div",{className:"text-[#8b949e]",children:D},H)),e.jsxs("div",{className:"flex items-center text-[#c9d1d9]",children:[e.jsx("span",{className:"text-[#79c0ff] mr-2",children:"➜"}),e.jsx("span",{className:"animate-pulse block w-2 h-4 bg-[#79c0ff]"})]})]})]})]})})]}),e.jsx("div",{className:"fixed inset-0 bg-[#02020a] -z-30"}),e.jsx("div",{className:"fixed inset-0 bg-[radial-gradient(circle_at_50%_-20%,#bd93f915,transparent_70%)] -z-20"}),e.jsx("div",{className:"fixed inset-0 bg-[linear-gradient(rgba(30,30,46,0.3)_1px,transparent_1px),linear-gradient(90deg,rgba(30,30,46,0.3)_1px,transparent_1px)] bg-[size:60px_60px] pointer-events-none -z-10"})]})]})},No=()=>{const t=$e(),[i]=_s(),s=i.get("token"),[l,h]=a.useState(""),[u,o]=a.useState(""),[m,b]=a.useState(!1),[w,d]=a.useState(!1),[g,f]=a.useState(["> Reset token detected.","> Awaiting final verification..."]);a.useEffect(()=>{s||(ce.error("Invalid Request",{description:"Reset token missing."}),t("/auth"))},[s,t]);const p=r=>{f(c=>[...c.slice(-4),`> ${r}`])},N=async()=>{var r;if(!l||l!==u){p("Error: Passwords do not match or are empty."),ce.error("Security mismatch",{description:"Passwords must match."});return}d(!0),p("Injecting new credentials into kernel...");try{const c=await fetch(`${he}/reset-password`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:s,new_password:l})});if(!c.ok){const j=await c.json();throw new Error(((r=j.error)==null?void 0:r.message)||j.detail||"Reset failed")}p("Password hash updated successfully."),ce.success("Security Updated",{description:"Your password has been reset."}),setTimeout(()=>{t("/auth")},2e3)}catch(c){const k=Fe(c)?"Network issue error":"Reset Failed",I=at(c);p(`Error: ${k}`),ce.error(k,{description:I})}finally{d(!1)}},T=()=>{const r=l?"•".repeat(l.length):"........",c=_=>`<span class="text-[#ff7b72]">${_}</span>`,j=_=>`<span class="text-[#a5d6ff]">${_}</span>`,k=_=>`<span class="text-[#8b949e]">${_}</span>`,I=_=>`<span class="text-[#f0883e]">${_}</span>`;return`${c("import")} ${I("{")} SecurityService ${I("}")} ${c("from")} ${j("'@platform/security'")};
108
109${c("async")} ${c("function")} updateCredentials${I("()")} ${I("{")}
110  ${c("const")} update = ${I("{")}
111    token: ${j(`"${s==null?void 0:s.substring(0,10)}..."`)},
112    new_hash: ${j(`"${r}"`)}
113  ${I("}")};
114  
115  ${k("// Executing kernel patch...")}
116  ${w?`${c("await")} SecurityService.patch${I("(")}update${I(")")};`:""}
117${I("}")}`};return e.jsxs("div",{className:"dark min-h-screen flex flex-col items-center justify-center p-4 font-mono relative overflow-hidden",children:[e.jsx("div",{className:"fixed top-12 left-12 z-50",children:e.jsxs(J,{variant:"ghost",onClick:()=>window.location.href="/",className:"group flex items-center gap-2 bg-transparent hover:bg-[#bd93f9]/5 text-[#8b949e] hover:text-[#bd93f9] transition-all px-4 h-10 rounded-lg",children:[e.jsx(Cs,{size:16,className:"group-hover:-translate-x-1 transition-transform"}),e.jsx("span",{className:"text-[10px] font-black uppercase tracking-[0.2em]",children:"back"})]})}),e.jsxs("div",{className:"w-[900px] bg-transparent rounded-xl border border-white/10 shadow-2xl overflow-hidden flex flex-col",children:[e.jsx("div",{className:"h-10 bg-[#0d1117]/60 backdrop-blur-md border-b border-white/5 flex items-center px-4 justify-between select-none",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs("div",{className:"flex space-x-1.5 mr-4",children:[e.jsx("div",{className:"w-3 h-3 rounded-full bg-[#ff5f56]"}),e.jsx("div",{className:"w-3 h-3 rounded-full bg-[#ffbd2e]"}),e.jsx("div",{className:"w-3 h-3 rounded-full bg-[#27c93f]"})]}),e.jsx("div",{className:"text-xs text-[#8b949e]",children:"IDE: reset_password_daemon"})]})}),e.jsx("div",{className:"flex bg-[#0d1117]/60 backdrop-blur-md border-b border-white/5",children:e.jsxs("div",{className:"px-4 py-2 text-xs flex items-center space-x-2 border-r border-[#30363d] bg-white/5 text-[#c9d1d9] border-t-2 border-t-[#d2a8ff] shadow-[inset_0_1px_0_0_#d2a8ff]",children:[e.jsx("span",{className:"text-[#a5d6ff]",children:"PY"}),e.jsx("span",{children:"kernel.patch.py"})]})}),e.jsxs("div",{className:"flex flex-col md:flex-row h-[500px]",children:[e.jsxs("div",{className:"w-full md:w-1/2 p-6 border-r border-white/5 bg-transparent flex flex-col",children:[e.jsx("div",{className:"text-xs font-bold text-[#8b949e] mb-8 uppercase tracking-widest",children:"New Credentials"}),e.jsxs("div",{className:"space-y-4 flex-1",children:[e.jsxs("div",{className:"flex items-center group",children:[e.jsx("span",{className:"text-[#484f58] select-none w-8 text-right pr-3 shrink-0",children:"1"}),e.jsx("span",{className:"text-[#8b949e] w-20 shrink-0 text-xs",children:"New Pass:"}),e.jsxs("div",{className:"relative flex-1",children:[e.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-[#d2a8ff] font-bold",children:"["}
117),e.jsx(ie,{type:m?"text":"password",value:l,onChange:r=>h(r.target.value),className:"bg-[#161b22] border-[#30363d] text-[#c9d1d9] pl-6 pr-10 h-9 font-mono text-sm focus:border-[#d2a8ff] focus:shadow-[0_0_15px_rgba(210,168,255,0.3)] transition-all",placeholder:"••••••••"}),e.jsx("span",{className:"absolute right-10 top-1/2 -translate-y-1/2 text-[#d2a8ff] font-bold",children:"]"}),e.jsx("button",{type:"button",onClick:()=>b(!m),className:"absolute right-3 top-1/2 -translate-y-1/2 text-[#8b949e] hover:text-[#c9d1d9]",children:m?e.jsx(Ua,{size:14}):e.jsx(Ts,{size:14})})]})]}),e.jsxs("div",{className:"flex items-center group",children:[e.jsx("span",{className:"text-[#484f58] select-none w-8 text-right pr-3 shrink-0",children:"2"}),e.jsx("span",{className:"text-[#8b949e] w-20 shrink-0 text-xs",children:"Confirm:"}),e.jsxs("div",{className:"relative flex-1",children:[e.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-[#79c0ff] font-bold",children:"["}),e.jsx(ie,{type:m?"text":"password",value:u,onChange:r=>o(r.target.value),className:"bg-[#161b22] border-[#30363d] text-[#c9d1d9] pl-6 h-9 font-mono text-sm focus:border-[#79c0ff] focus:shadow-[0_0_15px_rgba(121,192,255,0.3)] transition-all",placeholder:"••••••••"}),e.jsx("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-[#79c0ff] font-bold",children:"]"})]})]}),e.jsx("div",{className:"flex items-center pt-2 pl-11",children:e.jsxs(J,{onClick:N,disabled:w,className:"bg-transparent border border-[#2ea043] text-[#2ea043] hover:bg-[#2ea043]/10 hover:text-[#3fb950] font-mono h-9 px-4 text-xs shadow-[0_0_10px_rgba(46,160,67,0.5)] transition-all flex items-center",children:[w?e.jsx(Ue,{className:"w-3 h-3 mr-2 animate-spin"}):e.jsx(ht,{className:"w-3 h-3 mr-2 fill-current"}),"EXECUTE_PATCH"]})})]})]}),e.jsxs("div",{className:"w-full md:w-1/2 bg-transparent flex flex-col relative overflow-hidden",children:[e.jsxs("div",{className:"p-6 border-b border-[#30363d] flex-1 overflow-auto no-scrollbar",children:[e.jsx("div",{className:"text-xs font-bold text-[#8b949e] mb-4 uppercase tracking-wider",children:"Live Compilation"}),e.jsx("pre",{className:"font-mono text-sm leading-relaxed",children:e.jsx("code",{className:"language-javascript block",children:T().split(`
118`).map((r,c)=>e.jsxs("div",{className:"flex",children:[e.jsx("span",{className:"text-[#484f58] select-none w-8 text-right pr-3 shrink-0",children:c+1}),e.jsx("span",{className:"text-[#c9d1d9]",dangerouslySetInnerHTML:{__html:r}})]},c))})})]}),e.jsxs("div",{className:"h-40 bg-transparent border-t border-white/5 p-4 font-mono text-xs overflow-y-auto no-scrollbar",children:[e.jsxs("div",{className:"flex items-center text-[#8b949e] mb-2 uppercase text-[10px] tracking-wider border-b border-[#30363d] pb-1",children:[e.jsx(He,{size:10,className:"mr-1.5"})," Output"]}),e.jsxs("div",{className:"space-y-1",children:[g.map((r,c)=>e.jsx("div",{className:"text-[#8b949e]",children:r},c)),e.jsxs("div",{className:"flex items-center text-[#c9d1d9]",children:[e.jsx("span",{className:"text-[#79c0ff] mr-2",children:"➜"}),e.jsx("span",{className:"animate-pulse block w-2 h-4 bg-[#79c0ff]"})]})]})]})]})]})]}),e.jsx("div",{className:"fixed inset-0 bg-[#02020a] -z-30"}),e.jsx("div",{className:"fixed inset-0 bg-[radial-gradient(circle_at_50%_-20%,#bd93f915,transparent_70%)] -z-20"}),e.jsx("div",{className:"fixed inset-0 bg-[linear-gradient(rgba(30,30,46,0.3)_1px,transparent_1px),linear-gradient(90deg,rgba(30,30,46,0.3)_1px,transparent_1px)] bg-[size:60px_60px] pointer-events-none -z-10"})]})},ko=()=>
118{const t=$e(),[i]=_s(),s=i.get("token"),[l,h]=a.useState("loading"),[u,o]=a.useState(["> Establishing connection to security kernel...","> Verification sequence initiated."]),m=b=>{o(w=>[...w.slice(-4),`> ${b}`])};return a.useEffect(()=>{(async()=>{var w,d,g,f,p;if(!s){h("error"),m("Error: Security token missing from request.");return}try{m("Validating handshake..."),await Jt.verifyEmail(s),h("success"),m("Identity confirmed. Kernel patched."),m("Account unlocked successfully.")}catch(N){h("error");const T=((g=(d=(w=N.response)==null?void 0:w.data)==null?void 0:d.error)==null?void 0:g.message)||((p=(f=N.response)==null?void 0:f.data)==null?void 0:p.detail)||N.message||"Verification failed";m(`Error: ${T}`)}})()},[s]),e.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center p-4 font-mono relative overflow-hidden",children:[e.jsx("div",{className:"fixed top-12 left-12 z-50",children:e.jsxs(J,{variant:"ghost",onClick:()=>t("/"),className:"group flex items-center gap-2 bg-transparent hover:bg-[#bd93f9]/5 text-[#8b949e] hover:text-[#bd93f9] transition-all px-4 h-10 rounded-lg",children:[e.jsx(Cs,{size:16,className:"group-hover:-translate-x-1 transition-transform"}),e.jsx("span",{className:"text-[10px] font-black uppercase tracking-[0.2em]",children:"back"})]})}),e.jsxs("div",{className:"w-[500px] bg-[#0d1117]/60 backdrop-blur-md rounded-xl border border-white/10 shadow-2xl overflow-hidden flex flex-col",children:[e.jsx("div",{className:"h-10 bg-[#0d1117]/80 border-b border-white/5 flex items-center px-4 justify-between select-none",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs("div",{className:"flex space-x-1.5 mr-4",children:[e.jsx("div",{className:"w-3 h-3 rounded-full bg-[#ff5f56]"}),e.jsx("div",{className:"w-3 h-3 rounded-full bg-[#ffbd2e]"}),e.jsx("div",{className:"w-3 h-3 rounded-full bg-[#27c93f]"})]}),e.jsx("div",{className:"text-xs text-[#8b949e]",children:"identity_service.exe"})]})}),e.jsxs("div",{className:"p-8 flex flex-col items-center text-center space-y-6",children:[l==="loading"&&e.jsx("div",{className:"p-4 bg-white/5 rounded-full ring-8 ring-white/5 animate-pulse",children:e.jsx(Ue,{className:"w-12 h-12 text-[#d2a8ff] animate-spin"})}),l==="success"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"p-4 bg-[#238636]/10 rounded-full ring-8 ring-[#238636]/5",children:e.jsx(wr,{className:"w-12 h-12 text-[#2ea043]"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-xl font-bold text-white tracking-tight",children:"IDENTITY_VERIFIED"}),e.jsx("p",{className:"text-[#8b949e] text-sm",children:"Your account has been fully authorized."})]})]}),l==="error"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"p-4 bg-[#da3633]/10 rounded-full ring-8 ring-[#da3633]/5",children:e.jsx(jr,{className:"w-12 h-12 text-[#f85149]"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-xl font-bold text-white tracking-tight",children:"AUTH_FAILURE"}),e.jsx("p",{className:"text-[#8b949e] text-sm",children:"The security token is invalid or expired."})]})]}),e.jsxs("div",{className:"w-full bg-[#161b22] border border-[#30363d] rounded-lg p-4 text-left space-y-1",children:[e.jsxs("div",{className:"flex items-center text-[#8b949e] mb-2 uppercase text-[10px] tracking-wider border-b border-[#30363d] pb-1",children:[e.jsx(He,{size:10,className:"mr-1.5"})," Identity Logs"]}),u.map((b,w)=>e.jsx("div",{className:v("text-xs",b.startsWith("> Error")?"text-[#f85149]":b.includes("confirmed")?"text-[#3fb950]":"text-[#8b949e]"),children:b},w))]}),e.jsxs(J,{onClick:()=>window.location.href="/auth",className:"w-full bg-transparent border border-[#30363d] text-[#c9d1d9] hover:bg-white/5 hover:border-[#8b949e] transition-all h-10 group",children:["RETURN_TO_AUTH",e.jsx(za,{size:14,className:"ml-2 opacity-50 group-hover:opacity-100 transition-opacity"})]})]})]}),e.jsx("div",{className:"fixed inset-0 bg-[#02020a] -z-30"}),e.jsx("div",{className:"fixed inset-0 bg-[radial-gradient(circle_at_50%_-20%,#bd93f915,transparent_70%)] -z-20"}),e.jsx("div",{className:"fixed inset-0 bg-[linear-gradient(rgba(30,30,46,0.3)_1px,transparent_1px),linear-gradient(90deg,rgba(30,30,46,0.3)_1px,transparent_1px)] bg-[size:60px_60px] pointer-events-none -z-10"})]})},gt=a.lazy(()=>S(()=>import("./AboutUsPage-BxNKipby.js"),__vite__mapDeps([0,1,2]))),So=a.lazy(()=>S(()=>import("./StudentAmbassador-lMOdOa8i.js"),__vite__mapDeps([3,1,2,4]))),To=a.lazy(()=>S(()=>import("./PricingPage-BNB1TzMl.js"),__vite__mapDeps([5,1,2]))),fs=a.lazy(()=>S(()=>import("./CollegeDemoPage-CkdrJ0pg.js"),__vite__mapDeps([6,1,2,7,4]))),Xt=a.lazy(()=>S(()=>import("./CollegeSignupPage-B0ZzQ-Ir.js"),__vite__mapDeps([8,1,2,4,7]))),Kt=a.lazy(()=>S(()=>import("./CollegeLoginPage-CFDoCAt_.js"),__vite__mapDeps([9,1,2,4,10]))),zo=a.lazy(()=>S(()=>import("./CollegeForgotPasswordPage-CCSO4LjB.js"),__vite__mapDeps([11,1,2]))),Co=a.lazy(()=>S(()=>import("./CollegeResetPasswordPage-DvzVTc_e.js"),__vite__mapDeps([12,1,2]))),_o=a.lazy(()=>S(()=>import("./CollegeStudentRegistration-D0ImCWG3.js"),__vite__mapDeps([13,1,2,4,10]))),bs=a.lazy(()=>S(()=>import("./RecruiterLoginPage-B8ATxfZg.js"),__vite__mapDeps([14,1,2,4,10]))),ys=a.lazy(()=>S(()=>import("./RecruiterDemoPage-D-gYpnZk.js"),__vite__mapDeps([15,1,2,4,10]))),pt=a.lazy(()=>S(()=>import("./RecruiterAccessPage-D_3lLqus.js"),__vite__mapDeps([16,1,2,4,10]))),Ao=a.lazy(()=>S(()=>import("./SharedJobPipeline-BAL8Z5bh.js"),__vite__mapDeps([17,1,2,18,19]))),$o=a.lazy(()=>S(()=>import("./SharedCandidateProfile-D1Zhairj.js"),__vite__mapDeps([20,1,2,7,18]))),Io=a.lazy(()=>S(()=>import("./SharedLayout-DPSn_u3N.js"),__vite__mapDeps([21,1,2]))),Po=a.lazy(()=>S(()=>import("./MobileProctorPage-CdUnRQui.js"),__vite__mapDeps([22,1,2]))),Eo=e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"/proctor/phone",element:e.jsx(Po,{})}),e.jsx(x,{path:"/register-for-ambassador",element:e.jsx(So,{})}),e.jsx(x,{path:"/",element:e.jsx(_e,{})}),e.jsx(x,{path:"/for-students",element:e.jsx(_e,{initialView:"student"})}),e.jsx(x,{path:"/students",element:e.jsx(_e,{initialView:"student"})}),e.jsx(x,{path:"/about",element:e.jsx(gt,{})}),e.jsx(x,{path:"/about-us",element:e.jsx(gt,{})}),e.jsx(x,{path:"/auth",element:e.jsx(hs,{})}),e.jsx(x,{path:"/login",element:e.jsx(hs,{})}),e.jsx(x,{path:"/signup",element:e.jsx(hs,{})}),e.jsx(x,{path:"/reset-password",element:e.jsx(No,{})}),e.jsx(x,{path:"/verify-email",element:e.jsx(ko,{})}),e.jsx(x,{path:"/pricing",element:e.jsx(To,{})}),e.jsx(x,{path:"/recruiter",element:e.jsx(_e,{initialView:"recruiter"})}),e.jsx(x,{path:"/for-employers",element:e.jsx(_e,{initialView:"recruiter"})}),e.jsx(x,{path:"/employers",element:e.jsx(_e,{initialView:"recruiter"})}),e.jsx(x,{path:"/recruiter/login",element:e.jsx(bs,{})}),e.jsx(x,{path:"/recruiter/request-demo",element:e.jsx(ys,{})}),e.jsx(x,{path:"/recruiter/request-access",element:e.jsx(pt,{})}),e.jsx(x,{path:"/recruiter/signup",element:e.jsx(pt,{})}),e.jsx(x,{path:"/institution",element:e.jsx(_e,{initialView:"college"})}),e.jsx(x,{path:"/for-colleges",element:e.jsx(_e,{initialView:"college"})}),e.jsx(x,{path:"/colleges",element:e.jsx(_e,{initialView:"college"})}),e.jsx(x,{path:"/college",element:e.jsx(_e,{initialView:"college"})}),e.jsx(x,{path:"/institution/login",element:e.jsx(Kt,{})}),e.jsx(x,{path:"/institution/register",element:e.jsx(Xt,{})}),e.jsx(x,{path:"/institution/request-demo",element:e.jsx(fs,{})}),e.jsxs(x,{element:e.jsx(Io,{}),children:[e.jsx(x,{path:"/shared/job/:jobId",element:e.jsx(Ao,{})}),e.jsx(x,{path:"/shared/job/:jobId/candidate/:userId",element:e.jsx($o,{})})]})]}),Do=e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"/",element:e.jsx(_e,{})}),e.jsx(x,{path:"/about",element:e.jsx(gt,{})}),e.jsx(x,{path:"/about-us",element:e.jsx(gt,{})}),e.jsx(x,{path:"/login",element:e.jsx(bs,{})}),e.jsx(x,{path:"/request-demo",element:e.jsx(ys,{})}),e.jsx(x,{path:"/request-access",element:e.jsx(pt,{})}),e.jsx(x,{path:"/signup",element:e.jsx(pt,{})}),e.jsx(x,{path:"/recruiter/login",element:e.jsx(bs,{})}),e.jsx(x,{path:"/recruiter/request-demo",element:e.jsx(ys,{})}),e.jsx(x,{path:"/recruiter/request-access",element:e.jsx(pt,{})}),e.jsx(x,{path:"/recruiter/signup",element:e.jsx(pt,{})})]}),Oo=e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"/",element:e.jsx(_e,{})}),e.jsx(x,{path:"/about",element:e.jsx(gt,{})}),e.jsx(x,{path:"/about-us",element:e.jsx(gt,{})}),e.jsx(x,{path:"/login",element:e.jsx(Kt,{})}),e.jsx(x,{path:"/register",element:e.jsx(Xt,{})}),e.jsx(x,{path:"/forgot-password",element:e.jsx(zo,{})}),e.jsx(x,{path:"/reset-password",element:e.jsx(Co,{})}),e.jsx(x,{path:"/request-demo",element:e.jsx(fs,{})}),e.jsx(x,{path:"/:collegeSlug/register-student",element:e.jsx(_o,{})}),e.jsx(x,{path:"/institution/login",element:e.jsx(Kt,{})}),e.jsx(x,{path:"/institution/register",element:e.jsx(Xt,{})}),e.jsx(x,{path:"/institution/request-demo",element:e.jsx(fs,{})}),e.jsx(x,{path:"/college/login",element:e.jsx(Kt,{})}),e.jsx(x,{path:"/college/register",element:e.jsx(Xt,{})})]}),Ro=a.lazy(()=>S(()=>import("./RecruiterLayout-CCpSyFKg.js"),__vite__mapDeps([23,1,2]))),Lo=a.lazy(()=>S(()=>import("./RecruiterDashboard-BI58pFcs.js"),__vite__mapDeps([24,1,2,4]))),Fo=a.lazy(()=>S(()=>import("./RecruiterJobPost-2CcmkBTD.js"),__vite__mapDeps([25,1,2,4,18,26]))),Bo=a.lazy(()=>S(()=>import("./RecruiterJobDetail-BHyAzsAn.js"),__vite__mapDeps([27,1,2,18,4,28,29,30,19]))),Mo=a.lazy(()=>S(()=>import("./RecruiterCandidateProfile-CCqiQbSK.js"),__vite__mapDeps([31,1,2,18]))),qo=a.lazy(()=>S(()=>import("./RecruiterCandidateView-DUDvjKaI.js"),__vite__mapDeps([32,1,2,18]))),Ho=a.lazy(()=>S(()=>import("./RecruiterProjectAnalysis-C7ynXrR8.js"),__vite__mapDeps([33,1,2]))),Vo=a.lazy(()=>S(()=>import("./RecruiterSimilarCandidates-BtpI2bYe.js"),__vite__mapDeps([34,1,2,7,18]))),Wo=a.lazy(()=>S(()=>import("./RecruiterSearch-CiNE5_Tr.js"),__vite__mapDeps([35,1,2,18]))),Go=a.lazy(()=>S(()=>import("./RecruiterProfile-DuNqeO-S.js"),__vite__mapDeps([36,1,2,4,37,30,18]))),Uo=e.jsxs(x,{element:e.jsx(Ro,{}),children:[e.jsx(x,{path:"dashboard",element:e.jsx(Lo,{})}),e.jsx(x,{path:"profile",element:e.jsx(Go,{})}),e.jsx(x,{path:"jobs/new",element:e.jsx(Fo,{})}),e.jsx(x,{path:"search",element:e.jsx(Wo,{})}),e.jsx(x,{path:"jobs/:jobId",element:e.jsx(Bo,{})}),e.jsx(x,{path:"candidate/:userId",element:e.jsx(Mo,{})}),e.jsx(x,{path:"candidate/:userId/similar",element:e.jsx(Vo,{})}),e.jsx(x,{path:"candidate/:userId/project/:githubId",element:e.jsx(Ho,{})}),e.jsx(x,{path:"jobs/:jobId/matches",element:e.jsx(qo,{})})]}),Qo=a.lazy(()=>S(()=>import("./CollegeLayout-BzhmkzWy.js"),__vite__mapDeps([38,1,2]))),Yo=a.lazy(()=>S(()=>import("./CollegeDashboard-CVEPZBq_.js"),__vite__mapDeps([39,1,2,7]))),Jo=a.lazy(()=>S(()=>import("./CollegeStudentsList-ClUMSxNb.js"),__vite__mapDeps([40,1,2,18,19]))),Xo=a.lazy(()=>S(()=>import("./CollegeProfile-D6WxYsc3.js"),__vite__mapDeps([41,1,2,4,37,30,18,28]))),Ko=a.lazy(()=>S(()=>import("./CollegeCampus-CwCU5P_B.js"),__vite__mapDeps([42,1,2,18]))),Zo=a.lazy(()=>S(()=>import("./CollegeJobPost-CuwtwTe1.js"),__vite__mapDeps([43,1,2,4,18,26]))),el=a.lazy(()=>S(()=>import("./CollegeJobDetail-BoPQVVkG.js"),__vite__mapDeps([44,1,2,18,30,4,29,19]))),tl=a.lazy(()=>S(()=>import("./CollegePlacements-D4Z7UAs3.js"),__vite__mapDeps([45,1,2,18]))),sl=a.lazy(()=>S(()=>import("./CollegeStudentProfile-CtbOm8j-.js"),__vite__mapDeps([46,1,2,18]))),al=a.lazy(()=>S(()=>import("./CollegeSimilarStudents-C0F3xqBa.js"),__vite__mapDeps([47,1,2,7,18]))),il=a.lazy(()=>S(()=>import("./CollegeStudentProjectAnalysis-SgLn1zvj.js"),__vite__mapDeps([48,1,2,49]))),rl=a.lazy(()=>S(()=>import("./CollegeJobMatches-DCgxOEp3.js"),__vite__mapDeps([50,1,2,18]))),nl=e.jsxs(x,{path:"/:collegeSlug",element:e.jsx(Qo,{}),children:[e.jsx(x,{path:"dashboard",element:e.jsx(Yo,{})}),e.jsx(x,{path:"students",element:e.jsx(Jo,{})}),e.jsx(x,{path:"student/:userId",element:e.jsx(sl,{})}),e.jsx(x,{path:"student/:userId/similar",element:e.jsx(al,{})}),e.jsx(x,{path:"student/:userId/project/:githubId",element:e.jsx(il,{})}),e.jsx(x,{path:"profile",element:e.jsx(Xo,{})}),e.jsx(x,{path:"campus",element:e.jsx(Ko,{})}),e.jsx(x,{path:"campus/placements",element:e.jsx(tl,{})}),e.jsx(x,{path:"campus/new",element:e.jsx(Zo,{})}),e.jsx(x,{path:"campus/jobs/:jobId",element:e.jsx(el,{})}),e.jsx(x,{path:"campus/jobs/:jobId/matches",element:e.jsx(rl,{})}),e.jsx(x,{index:!0,element:e.jsx(ut,{to:"dashboard",replace:!0})})]}),ol=_r,ll=Ar,vi=a.forwardRef(({className:t,children:i,...s},l)=>e.jsxs(Qa,{ref:l,className:v("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...s,children:[i,e.jsx(Nr,{asChild:!0,children:e.jsx(zs,{className:"h-4 w-4 opacity-50"})})]}));vi.displayName=Qa.displayName;const wi=a.forwardRef(({className:t,...i},s)=>e.jsx(Ya,{ref:s,className:v("flex cursor-default items-center justify-center py-1",t),...i,children:e.jsx(kr,{className:"h-4 w-4"})}));wi.displayName=Ya.displayName;const ji=a.forwardRef(({className:t,...i},s)=>e.jsx(Ja,{ref:s,className:v("flex cursor-default items-center justify-center py-1",t),...i,children:e.jsx(zs,{className:"h-4 w-4"})}));ji.displayName=Ja.displayName;const Ni=a.forwardRef(({className:t,children:i,position:s="popper",...l},h)=>e.jsx(Sr,{children:e.jsxs(Xa,{ref:h,className:v("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
118de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:s,...l,children:[e.jsx(wi,{}),e.jsx(Tr,{className:v("p-1",s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:i}),e.jsx(ji,{})]})}));Ni.displayName=Xa.displayName;const cl=a.forwardRef(({className:t,...i},s)=>e.jsx(Ka,{ref:s,className:v("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...i}));cl.displayName=Ka.displayName;const vs=a.forwardRef(({className:t,children:i,...s},l)=>e.jsxs(Za,{ref:l,className:v("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t),...s,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(zr,{children:e.jsx(Xe,{className:"h-4 w-4"})})}),e.jsx(Cr,{children:i})]}));vs.displayName=Za.displayName;const dl=a.forwardRef(({className:t,...i},s)=>e.jsx(ei,{ref:s,className:v("-mx-1 my-1 h-px bg-muted",t),...i}));dl.displayName=ei.displayName;const ml=t=>{switch(t.toLowerCase()){case"easy":return"text-emerald-400/90 bg-emerald-500/10 border border-emerald-500/20";case"medium":return"text-amber-400/90 bg-amber-500/10 border border-amber-500/20";case"hard":return"text-rose-400/90 bg-rose-500/10 border border-rose-500/20";default:return"text-zinc-400/90 bg-zinc-500/10 border border-zinc-800/60"}},ki=a.forwardRef(({problem:t,onClick:i},s)=>e.jsxs("tr",{ref:s,onClick:i,className:v("group border-b border-zinc-800/30 hover:bg-zinc-900/40 transition-colors cursor-pointer font-mono bg-transparent"),children:[e.jsx("td",{className:"p-4 pl-6 text-zinc-500 text-xs group-hover:text-zinc-300 transition-colors",children:t.id}),e.jsx("td",{className:"p-4",children:e.jsx("span",{className:"font-medium text-zinc-200 group-hover:text-violet-300 transition-colors text-xs sm:text-sm flex items-center gap-2 font-outfit",children:t.title})}),e.jsx("td",{className:"p-4",children:e.jsx("span",{className:v("px-2.5 py-0.5 rounded-md text-[10px] font-semibold uppercase tracking-wider font-mono",ml(t.difficulty)),children:t.difficulty})}),e.jsx("td",{className:"p-4",children:e.jsxs("div",{className:"flex gap-1.5 flex-wrap",children:[(t.tags||[]).slice(0,2).map(l=>e.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] bg-zinc-900/60 text-zinc-400 border border-zinc-800/60 font-mono",children:l},l)),(t.tags||[]).length>2&&e.jsxs("span",{className:"px-2 py-0.5 rounded text-[10px] bg-zinc-900/60 text-zinc-400 border border-zinc-800/60 font-mono",children:["+",(t.tags||[]).length-2]})]})}),e.jsx("td",{className:"p-4 text-zinc-400/80 text-xs font-mono",children:t.acceptanceRate||"56.6%"}),e.jsx("td",{className:"p-4 pr-6 text-right",children:e.jsxs("div",{className:"flex items-center justify-end gap-3",children:[t.isSolved&&e.jsx(qe,{className:"h-4 w-4 text-emerald-400/90"}),e.jsxs("div",{className:"flex items-center justify-end gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[e.jsx(J,{size:"icon",variant:"ghost",className:"h-7 w-7 text-zinc-500 hover:text-zinc-200 hover:bg-zinc-800/60 rounded-md",children:e.jsx($r,{className:"h-3.5 w-3.5"})}),e.jsx(J,{size:"icon",variant:"ghost",className:"h-7 w-7 text-zinc-500 hover:text-emerald-400 hover:bg-emerald-500/10 rounded-md",children:e.jsx(qe,{className:"h-3.5 w-3.5"})})]})]})})]}));ki.displayName="ProblemRow";const hl=a.memo(ki),pl=()=>{const{token:t,isAuthenticated:i,logout:s}=ot(),[l,h]=a.useState([]),[u,o]=a.useState(""),[m,b]=a.useState("All"),[w,d]=a.useState("All"),[g,f]=a.useState("all"),[p,N]=a.useState([]),[T,r]=a.useState(!1),[c,j]=a.useState(!0),[k,I]=a.useState(0),[_,q]=a.useState(!0),F=20,O=$e(),Y=a.useRef(null),te=a.useCallback(C=>{c||(Y.current&&Y.current.disconnect(),Y.current=new IntersectionObserver($=>{$[0].isIntersecting&&_&&I(R=>R+F)}),C&&Y.current.observe(C))},[c,_]);a.useEffect(()=>{h([]),I(0),q(!0)},[m,u,g,w]);const y=async C=>{try{j(!0);const $={"Content-Type":"application/json"};t&&($.Authorization=`Bearer ${t}`);let R=`${he}/student/questions?skip=${C}&limit=${F}`;m!=="All"&&(R+=`&difficulty=${m}`),g!=="all"&&(R+=`&tag=${encodeURIComponent(g)}`),w!=="All"&&(R+=`&status=${w}`),u&&(R+=`&search=${encodeURIComponent(u)}`);const X=await fetch(R,{headers:$});if(X.status===401||X.status===403){s(),O("/auth");return}if(!X.ok)throw new Error("Failed to fetch questions");const xe=(await X.json()).questions||[];xe.length<F&&q(!1);const se=xe.map(K=>({...K,id:K.frontendId||K.id,category:K.category||(K.tags&&K.tags.length>0?K.tags[0]:"General"),starterCode:K.codeSnippets?K.codeSnippets.reduce((we,ke)=>(we[ke.langSlug]=ke.code,we),{}):typeof K.starterCode=="string"?{python:K.starterCode}:K.starterCode,isSolved:K.isSolved,codeSnippets:K.codeSnippets,tags:K.tags||[],examples:K.examples||[],constraints:K.constraints||[]}));h(K=>{if(C===0)return se;const we=new Set(K.map(Ie=>
118Ie.id)),ke=se.filter(Ie=>!we.has(Ie.id));return[...K,...ke]})}catch($){console.error("Error fetching problems:",$)}finally{j(!1),r(!0)}},E=a.useRef(!1);return a.useEffect(()=>{if(!E.current){E.current=!0,y(k);return}const C=setTimeout(()=>{y(k)},u&&k===0?300:0);return()=>clearTimeout(C)},[k,m,u,g,w]),a.useEffect(()=>{(async()=>{if(t)try{const $=await fetch(`${he}/student/questions/tags`,{headers:{Authorization:`Bearer ${t}`}});if($.ok){const R=await $.json();N(R.tags||[])}}catch($){console.error("Failed to fetch tags:",$)}})()},[t]),e.jsxs("div",{className:"min-h-screen bg-[#09090b] text-zinc-300 font-sans selection:bg-violet-500/30 relative overflow-x-hidden",children:[e.jsx("div",{className:"fixed inset-0 bg-[#09090b] pointer-events-none"}),e.jsx("div",{className:"fixed top-0 left-1/2 -translate-x-1/2 w-[800px] h-[400px] rounded-full pointer-events-none opacity-80",style:{background:"radial-gradient(circle, rgba(139,92,246,0.12) 0%, transparent 70%)",filter:"blur(80px)"}}),e.jsx("div",{className:"fixed inset-0 opacity-[0.03] pointer-events-none",style:{backgroundImage:"linear-gradient(rgba(255,255,255,0.4) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.4) 1px, transparent 1px)",backgroundSize:"48px 48px"}}),e.jsx("div",{className:"relative z-10",children:e.jsx("div",{className:"container mx-auto px-4 py-8 max-w-7xl",children:e.jsxs("div",{className:"space-y-6",children:[T?e.jsxs("div",{className:v("flex overflow-x-auto gap-4 py-2 px-1 pb-4 no-scrollbar animate-in fade-in slide-in-from-bottom-4 duration-500"),children:[e.jsxs("div",{onClick:()=>O("/roadmap/beginner"),className:"flex-1 min-w-[260px] sm:min-w-[280px] h-52 bg-zinc-950/70 backdrop-blur-md border border-zinc-800/60 rounded-xl p-6 relative overflow-hidden group hover:border-emerald-500/40 hover:shadow-[0_0_20px_rgba(16,185,129,0.1)] transition-all cursor-pointer flex flex-col justify-center",children:[e.jsx("div",{className:"absolute top-0 right-0 p-3 opacity-40 text-xs font-mono text-emerald-400",children:"[BEGINNER]"}),e.jsxs("div",{className:"flex flex-col items-center gap-4",children:[e.jsx("pre",{className:"font-mono text-[10px] leading-[1.1] text-emerald-400/80 whitespace-pre select-none opacity-80",children:`
119 _   _  _____  _____  ____  
120| \\ | ||  _  ||  _  || __ ) 
121|  \\| || | | || | | ||  _ \\ 
122| |\\  || |_| || |_| || |_) |
123|_| \\_| \\___/  \\___/ |____/ 
124`}),e.jsx("h3",{className:"text-lg font-bold text-emerald-400/90 font-outfit tracking-widest mt-2",children:"30-DSA NOOB"})]})]}),e.jsxs("div",{onClick:()=>O("/roadmap/intermediate"),className:"flex-1 min-w-[260px] sm:min-w-[280px] h-52 bg-zinc-950/70 backdrop-blur-md border border-zinc-800/60 rounded-xl p-6 relative overflow-hidden group hover:border-amber-500/40 hover:shadow-[0_0_20px_rgba(245,158,11,0.1)] transition-all cursor-pointer flex flex-col justify-center",children:[e.jsx("div",{className:"absolute top-0 right-0 p-3 opacity-40 text-xs font-mono text-amber-400",children:"[INTERMEDIATE]"}),e.jsxs("div",{className:"flex flex-col items-center gap-4",children:[e.jsx("pre",{className:"font-mono text-[10px] leading-[1.1] text-amber-400/80 whitespace-pre select-none opacity-80",children:` _   _   ___   ____   __  __  ___  _____ 
125| \\ | | / _ \\ |  _ \\ |  \\/  ||_ _|| ____|
126|  \\| || | | || |_) || |\\/| | | | |  _|  
127| |\\  || |_| ||  _ < | |  | | | | | |___ 
128|_| \\_| \\___/ |_| \\_\\|_|  |_||___||_____|`}),e.jsx("h3",{className:"text-lg font-bold text-amber-400/90 font-outfit tracking-widest mt-2",children:"45-DSA NORMIE"})]})]}),e.jsxs("div",{onClick:()=>O("/roadmap/pro"),className:"flex-1 min-w-[260px] sm:min-w-[280px] h-52 bg-zinc-950/70 backdrop-blur-md border border-zinc-800/60 rounded-xl p-6 relative overflow-hidden group hover:border-rose-500/40 hover:shadow-[0_0_20px_rgba(244,63,94,0.1)] transition-all cursor-pointer flex flex-col justify-center",children:[e.jsx("div",{className:"absolute top-0 right-0 p-3 opacity-40 text-xs font-mono text-rose-400",children:"[ADVANCED]"}),e.jsxs("div",{className:"flex flex-col items-center gap-4",children:[e.jsx("pre",{className:"font-mono text-xs leading-[1.1] text-rose-400/80 whitespace-pre select-none opacity-80",children:` ____   ____    ___ 
129|  _ \\ |  _ \\  / _ \\
130| |_) || |_) || | | |
131|  __/ |  _ < | |_| |
132|_|    |_| \\_\\ \\___/`}),e.jsx("h3",{className:"text-lg font-bold text-rose-400/90 font-outfit tracking-widest mt-2",children:"60-DSA PRO"})]})]})]}):e.jsx(kn,{}),T?e.jsxs("div",{className:v("relative flex flex-col md:flex-row gap-3 md:gap-4 items-stretch md:items-center justify-between bg-zinc-950/70 backdrop-blur-md p-3 rounded-xl border border-zinc-800/60 shadow-lg transition-all duration-700 delay-100",T?"translate-y-0 opacity-100":"translate-y-10 opacity-0"),children:[e.jsxs("div",{className:"relative flex-1 w-full min-w-0 group transition-all duration-300",children:[e.jsx(es,{className:"absolute left-4 top-1/2 -translate-y-1/2 h-4 w-4 text-zinc-500 group-focus-within:text-violet-400 transition-colors"}),e.jsx(ie,{placeholder:"Search problems...",value:u,onChange:C=>o(C.target.value),className:"pl-11 h-10 w-full bg-zinc-900/50 border-zinc-800/60 text-zinc-200 placeholder:text-zinc-500/70 focus-visible:border-violet-500/40 focu
132s-visible:ring-1 focus-visible:ring-violet-500/40 focus-visible:ring-offset-0 rounded-xl transition-all font-mono text-xs sm:text-sm"})]}),e.jsxs("div",{className:"flex items-center gap-3 overflow-x-auto no-scrollbar py-1 shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsx("span",{className:"text-xs text-zinc-400/80 font-medium hidden sm:inline",children:"Difficulty"}),e.jsx("div",{className:"flex items-center gap-1",children:["Easy","Medium","Hard"].map(C=>{const $=m===C;let R="text-zinc-200";return C==="Easy"&&(R="text-emerald-400/90"),C==="Medium"&&(R="text-amber-400/90"),C==="Hard"&&(R="text-rose-400/90"),e.jsxs("button",{onClick:()=>b($?"All":C),className:v("px-2.5 py-1.5 text-[10px] font-semibold tracking-widest uppercase transition-all relative group font-mono flex items-center shrink-0",$?v("text-opacity-100",R):"text-zinc-500 hover:text-zinc-300 text-opacity-60"),children:[$&&e.jsx("span",{className:"mr-1 animate-pulse",children:">"}),!$&&e.jsx("span",{className:"opacity-30 mr-1 text-[10px]",children:"//"}),C,$&&e.jsx("div",{className:v("absolute bottom-0 left-0 right-0 h-[2px] bg-current opacity-40 shadow-[0_0_6px_currentColor]")})]},C)})})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsx("span",{className:"text-xs text-zinc-400/80 font-medium hidden sm:inline",children:"Status"}),e.jsx("div",{className:"flex items-center gap-1",children:["All","Solved","Unsolved"].map(C=>{const $=w===C;let R="text-violet-300/90";return C==="Solved"&&(R="text-emerald-400/90"),C==="Unsolved"&&(R="text-amber-400/90"),e.jsxs("button",{onClick:()=>d(C),className:v("px-2.5 py-1.5 text-[10px] font-semibold tracking-widest uppercase transition-all relative group font-mono flex items-center shrink-0",$?v("text-opacity-100",R):"text-zinc-500 hover:text-zinc-300 text-opacity-60"),children:[$&&e.jsx("span",{className:"mr-1 animate-pulse",children:">"}),!$&&e.jsx("span",{className:"opacity-30 mr-1 text-[10px]",children:"//"}),C,$&&e.jsx("div",{className:v("absolute bottom-0 left-0 right-0 h-[2px] bg-current opacity-40 shadow-[0_0_6px_currentColor]")})]},C)})})]}),e.jsxs(ol,{value:g,onValueChange:f,children:[e.jsx(vi,{className:"w-[120px] sm:w-[140px] h-9 bg-zinc-900/50 border-zinc-800/60 rounded-xl text-zinc-300 text-xs focus:ring-violet-500/40 focus:ring-1 shrink-0 font-mono",children:e.jsx(ll,{placeholder:"Topic Tags"})}),e.jsxs(Ni,{className:"bg-zinc-950 border-zinc-800 text-zinc-300 max-h-80 font-mono",children:[e.jsx(vs,{value:"all",children:"All Topics"}),p.map(C=>e.jsx(vs,{value:C,children:C},C))]})]})]})]}):e.jsx(Sn,{}),e.jsxs("div",{className:v("bg-zinc-950/70 backdrop-blur-md rounded-xl border border-zinc-800/60 overflow-hidden shadow-lg transition-all duration-700 delay-200",T?"translate-y-0 opacity-100":"translate-y-10 opacity-0"),children:[c&&l.length===0?e.jsx(Nn,{rows:10}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-zinc-800/50 text-zinc-400/80 text-xs uppercase tracking-wider font-mono bg-zinc-900/40",children:[e.jsx("th",{className:"p-4 font-medium pl-6 w-16",children:"#"}),e.jsx("th",{className:"p-4 font-medium",children:"Title"}),e.jsx("th",{className:"p-4 font-medium w-32",children:"Difficulty"}),e.jsx("th",{className:"p-4 font-medium w-48",children:"Tags"}),e.jsx("th",{className:"p-4 font-medium w-32",children:"Acceptance"}),e.jsx("th",{className:"p-4 font-medium text-right pr-6 w-24",children:"Actions"})]})}),e.jsx("tbody",{children:l.map((C,$)=>e.jsx(hl,{ref:$===l.length-1?te:null,problem:C,onClick:()=>O(`/problems/${C.id}`,{state:{roadmapTitle:"Problem List",roadmapQuestions:l}})},C.id))})]})}),e.jsx("div",{className:"block md:hidden divide-y divide-zinc-800/60",children:l.map((C,$)=>{const R=$===l.length-1;let X="text-emerald-400 bg-emerald-500/10 border-emerald-500/30";return C.difficulty==="Medium"&&(X="text-amber-400 bg-amber-500/10 border-amber-500/30"),C.difficulty==="Hard"&&(X="text-rose-400 bg-rose-500/10 border-rose-500/30"),e.jsxs("div",{ref:R?te:null,onClick:()=>O(`/problems/${C.id}`,{state:{roadmapTitle:"Problem List",roadmapQuestions:l}}),className:"p-4 bg-zinc-950/60 hover:bg-zinc-900 active:bg-zinc-900/80 transition-all cursor-pointer space-y-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 font-mono text-xs",children:[e.jsxs("span",{className:"text-zinc-500 font-semibold",children:["#",C.id]}),C.isSolved&&e.jsx(qe,{className:"w-4 h-4 text-emerald-400 shrink-0"})]}),e.jsx("span",{className:v("px-2 py-0.5 text-[10px] font-mono font-bold tracking-wider up
132percase rounded border shrink-0",X),children:C.difficulty})]}),e.jsx("h3",{className:"text-sm font-bold text-white font-outfit leading-snug hover:text-violet-300 transition-colors",children:C.title}),e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 pt-1",children:[e.jsx("div",{className:"flex flex-wrap items-center gap-1.5",children:(C.tags||[]).slice(0,3).map(re=>e.jsx("span",{className:"px-2 py-0.5 bg-zinc-900 text-zinc-400 text-[10px] font-mono rounded border border-zinc-800",children:re},re))}),(C.acceptance||C.acceptanceRate)&&e.jsxs("span",{className:"text-[10px] font-mono text-zinc-400",children:["Acc: ",e.jsxs("span",{className:"text-zinc-200 font-semibold",children:[C.acceptance||C.acceptanceRate,"%"]})]})]})]},C.id)})})]}),c&&l.length>0&&e.jsxs("div",{className:"p-8 text-center bg-zinc-900/60 border-t border-zinc-800/80",children:[e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-violet-500 mx-auto"}),e.jsx("p",{className:"mt-2 text-xs text-zinc-400 animate-pulse font-mono",children:"Scanning database for more protocols..."})]})]})]})})})]})},ta=[{id:"number-system",title:"Number System",domain:"algebra-numbers",description:"Learn about different types of numbers, how to divide them, and find factors, LCM, HCF, and remainders.",icon:"Hash",topics:["Types of numbers","Divisibility rules","Factors and multiples","HCF & LCM","Remainders","Cyclicity","Unit digit","Last two digits"],formulas:[{name:"Dividend Rule",formula:"\\text{Dividend} = (\\text{Divisor} \\times \\text{Quotient}) + \\text{Remainder}",explanation:"Used to check division results."},{name:"Product of Two Numbers",formula:"A \\times B = \\text{HCF}(A, B) \\times \\text{LCM}(A, B)",explanation:"The product of two numbers is equal to the product of their HCF and LCM."},{name:"Number of Factors",formula:"N = p^a \\times q^b \\times r^c \\implies \\text{Factors} = (a+1)(b+1)(c+1)",explanation:"Calculates total factors where p, q, r are prime factors."}],variations:[{name:"Find remainder without actual division",explanation:"Use positive and negative remainders to simplify calculations.",example:"Find the remainder of $(49 \\times 51) \\div 8$.",solution:"Remainder of $49 \\div 8$ is $+1$. Remainder of $51 \\div 8$ is $+3$ (or $-5$). Multiply remainders: $1 \\times 3 = 3$. The final remainder is $3$."},{name:"Last digit of large powers",explanation:"Use the cyclicity of numbers. Unit digits repeat in patterns of 1, 2, or 4.",example:"Find the unit digit of $2^{33}$.",solution:"The powers of 2 repeat in a cycle of 4: $[2, 4, 8, 6]$. Divide power by 4: $33 \\div 4$ leaves remainder $1$. The first number in the cycle is $2$. So, the unit digit is $2$."},{name:"Number of factors",explanation:"Find prime factors and use the $(a+1)(b+1)(c+1)$ formula.",example:"Find the number of factors of $12$.",solution:"Prime factorization: $12 = 2^2 \\times 3^1$. Power exponents are 2 and 1. Add 1 to each exponent: $(2+1) \\times (1+1) = 3 \\times 2 = 6$ factors."},{name:"Greatest/smallest number problems",explanation:"Use HCF for greatest numbers that divide, and LCM for smallest numbers that are divided.",example:"Find the greatest number that divides 24 and 36 exactly.",solution:"We need the HCF of 24 and 36. Factors of 24: $1, 2, 3, 4, 6, 8, 12, 24$. Factors of 36: $1, 2, 3, 4, 6, 9, 12, 18, 36$. The greatest common factor is $12$."},{name:"Divisibility-based puzzles",explanation:"Apply rules of divisibility (like sum of digits for 3 and 9, or alternating signs for 11).",example:"Find digit $X$ if $35X4$ is divisible by 9.",solution:"For a number to be divisible by 9, the sum of its digits must be a multiple of 9. Sum = $3 + 5 + X + 4 = 12 + X$. The next multiple of 9 is 18. So $12 + X = 18 \\implies X = 6$."}],quiz:[{question:"What is the remainder when $17^{19} + 2$ is divided by 18?",options:["1","17","16","3"],answer:1,explanation:"$17 \\equiv -1 \\pmod{18}$. So, $17^{19} \\equiv (-1)^{19} = -1 \\pmod{18}$. Thus, $(-1) + 2 = 1$. The remainder is 1."},{question:"Find the unit digit of $7^{105}$.",options:["1","3","7","9"],answer:2,explanation:"Cyclicity of 7 is 4: $[7, 9, 3, 1]$. Divide 105 by 4: $105 = 4 \\times 26 + 1$ (Remainder 1). So the unit digit is the 1st digit in the cycle, which is 7."}]},{id:"percentages",title:"Percentages",domain:"arithmetic",description:"Understand parts of a whole, percentage change, salary increases, and population growth patterns.",icon:"Percent",topics:["Percentage c
132alculations","Percentage increase/decrease","Successive percentages","Population growth","Salary increments"],formulas:[{name:"Percentage Value",formula:"\\text{Value} = \\frac{P}{100} \\times \\text{Total}",explanation:"To find P% of a Total."},{name:"Percentage Change",formula:"\\% \\text{ Change} = \\frac{\\text{New Value} - \\text{Old Value}}{\\text{Old Value}} \\times 100",explanation:"Shows how much a value went up or down."},{name:"Successive Percentages",formula:"\\text{Net Change} = A + B + \\frac{A \\times B}{100}",explanation:"Applies when change happens one after another."}],variations:[{name:"Percentage increase/decrease",explanation:"Find the raw difference and compare it to the initial value.",example:"A price rises from $80 to $100. Find the percentage increase.",solution:"Difference = $100 - 80 = 20$. Initial value = 80. Increase = $(20 / 80) \\times 100 = 25\\%$."},{name:"Successive percentages",explanation:"Use the formula $A + B + (AB/100)$ to find the total combined change.",example:"A salary increases by 10% and then by 20%. What is the total increase?",solution:"Use $10 + 20 + (10 \\times 20 / 100) = 30 + 2 = 32\\%$."},{name:"Population growth",explanation:"Use the compound interest formula $P(1 + R/100)^N$ for growth over multiple years.",example:"A town has 10,000 people. It grows by 10% each year. Find the population in 2 years.",solution:"Population = $10000 \\times (1.10)^2 = 10000 \\times 1.21 = 12,100$ people."}],quiz:[{question:"If a value decreases by 20% and then increases by 20%, what is the net percentage change?",options:["No change","4% decrease","4% increase","2% decrease"],answer:1,explanation:"Using the formula: $-20 + 20 + (-20 \\times 20)/100 = -400/100 = -4\\%$. A negative sign means a decrease."}]},{id:"profit-loss",title:"Profit, Loss & Discount",domain:"arithmetic",description:"Learn how to calculate cost price, selling price, profits, losses, and marked prices with discounts.",icon:"TrendingUp",topics:["Cost Price & Selling Price","Profit & Loss percentage","Marked Price & Discounts","False Weights"],formulas:[{name:"Profit Percentage",formula:"\\% \\text{ Profit} = \\frac{\\text{Profit}}{\\text{Cost Price}} \\times 100",explanation:"Profit is Selling Price minus Cost Price."},{name:"Loss Percentage",formula:"\\% \\text{ Loss} = \\frac{\\text{Loss}}{\\text{Cost Price}} \\times 100",explanation:"Loss is Cost Price minus Selling Price."},{name:"Discount Percentage",formula:"\\% \\text{ Discount} = \\frac{\\text{Discount}}{\\text{Marked Price}} \\times 100",explanation:"Discount is Marked Price minus Selling Price."}],variations:[{name:"Successive discounts",explanation:"Combine discounts using $A + B - (AB/100)$ where discounts are entered as positive numbers.",example:"Find the single discount equal to two successive discounts of 20% and 10%.",solution:"Net discount = $20 + 10 - (20 \\times 10 / 100) = 30 - 2 = 28\\%$."},{name:"False weights",explanation:"Calculate profit when a seller uses weights less than they claim.",example:"A shopkeeper sells sugar at cost price but uses a 900g weight instead of 1kg. Find the profit percentage.",solution:"Profit is made on the weight difference. Profit weight = $1000 - 900 = 100g$. Actual weight sold = 900g. Profit % = $(100 / 900) \\times 100 = 11.11\\%$."}],quiz:[{question:"By selling an article for $240, a merchant loses 20%. What should be the selling price to gain 20%?",options:["$300","$360","$400","$320"],answer:1,explanation:"80% of Cost Price = $240 \\implies$ Cost Price = $240 / 0.8 = 300$. To gain 20%, Selling Price = $300 \\times 1.2 = 360$."}]},{id:"ratio-proportion",title:"Ratio & Proportion",domain:"arithmetic",description:"Compare values, share amounts fairly, mix ingredients, and calculate partnership returns.",icon:"Columns",topics:["Ratios and proportions","Sharing amounts","Direct and inverse proportion","Partnership rules"],formulas:[{name:"Ratio sharing",formula:"\\text{Share of A} = \\frac{a}{a+b} \\times \\text{Total}",explanation:"Dividing a total sum in ratio a:b."},{name:"Partnership Profit",formula:"\\frac{\\text{Profit}_A}{\\text{Profit}_B} = \\frac{\\text{Investment}_A \\times \\text{Time}_A}{\\text{Investment}_B \\times \\text{Time}_B}",explanation:"Profit splits depend on money and duration."}],variations:[{name:"Partnership share calculation",explanation:"Multiply each person's capital by their active investment time to find their profit ratio.",example:"A invests $500 for 12 months. B invests $600 for 5 months. Split a profit of $450.",solution:"A's ratio value = $500 \\times 12 = 6000$. B's ratio value = $600 \\times 5 = 3000$. Ratio A:B = $6000:3000 = 2:1$. A's share = $(2/3) \\times 450 = 300$. B's share = 150."},{name:"Direct and inverse proportion",explanation:"Direct: $y = kx$ (both grow). Inverse: $y = k/x$ (one grows, other shrinks).",example:"If 10 workers take 6 days to do a job, how many days will 15 workers take?",solution:"More workers mean fewer days (Inverse proportion). Workers $\\times$ Days = Constant. $10 \\times 6 = 15 \\times D \\implies 60 = 15 \\times D \\implies D = 4$ days."}],quiz:[{question:"Divide $1200 between X and Y in the ratio 5:3. What is Y's share?",options:["$450","$750","$600","$300"],answer:0,explanation:"Total parts = $5 + 3 = 8$. Y's share = $(3/8) \\times 1200 = 3 \\times 150 = 450$."}]},{id:"average",title:"Average",domain:"arithmetic",description:"Calculate central numbers, weighted averages, and handle age-based averages.",icon:"Scale",topics:["Basic average calculation","Weighted average","Consecutive numbers","Age-based averages"],formulas:[{name:"Simple Average",formula:"\\text{Average} = \\frac{\\text{Sum of all terms}}{\\text{Number of terms}}",explanation:"Finds the middle point."},{name:"Weighted Average",formula:"W_{avg} = \\frac{N_1 A_1 + N_2 A_2}{N_1 + N_2}",explanation:"Combines two groups of different sizes."}],variations:[{name:"Missing value",explanation:"Find one missing value by calculating the required total sum.",example:"The average of 5 numbers is 20. If four numbers are 15, 25, 18, and 22, find the fifth.",solution:"Total sum required = $5 \\times 20 = 100$. Sum of four numbers = $15 + 25 + 18 + 22 = 80$. Fifth number = $100 - 80 = 20$."},{name:"Weighted average",explanation:"Use the group weights when combining sets of values.",example:"Class A of 20 students average 80%. Class B of 30 students average 90%. Find the combined average.",solution:"Total sum = $(20 \\times 80) + (30 \\times 90) = 1600 + 2700 = 4300$. Total students = $20 + 30 = 50$. Average = $4300 / 50 = 86\\%$."}],quiz:[{question:"The average age of a family of 4 members is 25 years. If the grandfather joins, the average age increases by 5 years. Find the grandfather's age.",options:["45","50","30","50"],answer:1,explanation:"Total age of 4 members = 100. New average = 30. Total age of 5 members = 150. Grandfather age = $150 - 100 = 50$."}]},{id:"interest",title:"Simple & Compound Interest",domain:"arithmetic",description:"Learn how money grows over time using simple rate additions or compounding cycles.",icon:"TrendingUp",topics:["Simple Interest (SI)","Compound Interest (CI)","Compounding periods","Difference between SI & CI"],formulas:[{name:"Simple Interest",formula:"SI = \\frac{P \\times R \\times T}{100}",explanation:"Interest calculated only on original principal."},{name:"Compound Interest Amount",formula:"A = P \\left(1 + \\frac{R}{100}\\right)^n",explanation:"Interest calculated on updated balances."},{name:"SI/CI Difference (2 Years)",formula:"D = P \\left(\\frac{R}{100}\\right)^2",explanation:"Difference between CI and SI for 2 years."}],variations:[{name:"Difference between SI and CI",explanation:"Apply standard short formulas for 2 or 3 years.",example:"Find the difference between SI and CI on $1000 for 2 years at 10% per year.",solution:"Difference = $P \\times (R/100)^2 = 1000 \\times (10/100)^2 = 1000 \\times 0.01 = $10."},{name:"Half-yearly compounding",explanation:"Divide the rate by 2 and double the time periods.",example:"Calculate compound interest amount for $1000 for 1 year at 12% compounded half-yearly.",solution:"New rate = $12 / 2 = 6\\%$. New time periods = $1 \\times 2 = 2$. Amount = $1000 \\times (1.06)^2 = 1000 \\times 1.1236 = $1123.60."}],quiz:[{question:"A sum of money doubles itself in 5 years at simple interest. In how many years will it triple?",options:["10 years","8 years","15 years","12 years"],answer:0,explanation:"Doubles means interest = Principal. $P = P \\times R \\times 5 / 100 \\implies R = 20\\%$. To triple, interest must equal $2P$. $2P = P \\times 20 \\times T / 100 \\implies T = 10$ years."}]},{id:"time-work",title:"Time & Work",domain:"time-motion",description:"Measure tasks, human efficie
132ncy, pipe fill times, and alternate day rosters.",icon:"Clock",topics:["Individual efficiency","Men, Women and Children rates","Pipes and Cisterns","Alternate day work"],formulas:[{name:"Combined Rate",formula:"\\text{Rate}_{A+B} = \\frac{1}{A} + \\frac{1}{B} = \\frac{A+B}{A \\times B}",explanation:"Work done per day when working together."},{name:"Time Taken together",formula:"T = \\frac{A \\times B}{A + B}",explanation:"Days needed to finish task together."},{name:"Work & Efficiency Relation",formula:"\\text{Workers} \\times \\text{Days} \\times \\text{Hours} = \\text{Constant} \\times \\text{Work}",explanation:"Used for groups: M1*D1*H1 / W1 = M2*D2*H2 / W2."}],variations:[{name:"Pipes and Cisterns",explanation:"Fractions added for inlets, and subtracted for outlets/leaks.",example:"Pipe A fills a tank in 6 hours, while Leak B empties it in 12 hours. How long to fill the tank if both are open?",solution:"Net speed per hour = $1/6 - 1/12 = 1/12$. Total time = 12 hours."},{name:"Alternate day work",explanation:"Calculate work done in blocks of 2 days, rotating workers.",example:"A takes 10 days, B takes 15 days. If they work on alternate days starting with A, when is it done?",solution:"LCM of 10 and 15 is 30 (Total Work). A's power = 3 units/day. B's power = 2 units/day. In 2 days, they complete $3+2=5$ units. To reach 30 units, we need $30 / 5 = 6$ cycles. Total days = $6 \\times 2 = 12$ days."}],quiz:[{question:"If 12 men can build a wall in 20 days, how many days will 15 men take?",options:["16 days","15 days","18 days","12 days"],answer:0,explanation:"Using inverse work formula: $M_1 \\times D_1 = M_2 \\times D_2 \\implies 12 \\times 20 = 15 \\times D \\implies 240 = 15 \\times D \\implies D = 16$ days."}]},{id:"time-speed-distance",title:"Time, Speed & Distance",domain:"time-motion",description:"Solve problems about travel speeds, train pass times, boats in rivers, and race tracks.",icon:"Compass",topics:["Relative speed","Train crossings","Boats and streams","Circular tracks & Races"],formulas:[{name:"Average Speed (Equal Distances)",formula:"S_{avg} = \\frac{2xy}{x+y}",explanation:"Average speed when going at x and returning at y."},{name:"Relative Speed (Opposite Directions)",formula:"S_{rel} = S_1 + S_2",explanation:"Add speeds if moving towards each other."},{name:"Relative Speed (Same Direction)",formula:"S_{rel} = |S_1 - S_2|",explanation:"Subtract speeds if one chases another."},{name:"Upstream / Downstream",formula:"U = B - S, \\quad D = B + S",explanation:"B is boat speed, S is stream speed."}],variations:[{name:"Train crossing problems",explanation:"Distance is the sum of train length and object length (e.g. bridge).",example:"A 200m long train travels at 72 km/h. How long does it take to cross a 100m long bridge?",solution:"Speed in m/s = $72 \\times (5/18) = 20$ m/s. Total distance = $200m + 100m = 3
13200m$. Time = $300 / 20 = 15$ seconds."},{name:"Boats and streams",explanation:"Add stream speed when going with the flow, subtract it when fighting the flow.",example:"A boat speed is 8 km/h. Stream speed is 2 km/h. Find upstream and downstream speeds.",solution:"Downstream speed = $8 + 2 = 10$ km/h. Upstream speed = $8 - 2 = 6$ km/h."}],quiz:[{question:"A car travels at 60 km/h for the first half of a journey and 40 km/h for the second half. What is the average speed?",options:["50 km/h","48 km/h","45 km/h","52 km/h"],answer:1,explanation:"Using the formula: $2xy / (x+y) = 2 \\times 60 \\times 40 / 100 = 48$ km/h."}]},{id:"ages",title:"Aages",domain:"arithmetic",description:"Compare ages of family members across different points in time.",icon:"Clock",topics:["Present age equations","Past and future ratio comparisons","Family age averages"],formulas:[{name:"Age equation",formula:"A - k = r \\times (B - k)",explanation:"Relates ages A and B 'k' years ago."}],variations:[{name:"Past/Future age relationships",explanation:"Express the past and future ages using a single variable representing their present ages.",example:"A father is 4 times as old as his son. In 5 years, he will be 3 times as old. Find their present ages.",solution:"Let son's age = $x$, father's age = $4x$. In 5 years: $(4x + 5) = 3 \\times (x + 5) \\implies 4x + 5 = 3x + 15 \\implies x = 10$. Son is 10, father is 40."}],quiz:[{question:"The ratio of ages of Ram and Shyam is 3:4. The sum of their ages is 28 years. What will be Ram's age in 4 years?",options:["12 years","16 years","15 years","16 years"],answer:3,explanation:"Parts: $3x + 4x = 28 \\implies 7x = 28 \\implies x = 4$. Ram's age = $3 \\times 4 = 12$. In 4 years: $12 + 4 = 16$."}]},{id:"mixtures-allegations",title:"Mixtures & Allegations",domain:"arithmetic",description:"Mix solutions of different prices or concentrations and calculate the final properties.",icon:"GlassWater",topics:["Milk-water mixtures","Price mixture calculations","Repeated replacement"],formulas:[{name:"Allegation Rule",formula:"\\frac{\\text{Quantity of Cheap}}{\\text{Quantity of Dear}} = \\frac{d - m}{m - c}",explanation:"Finds the ratio of two parts to make a mixture of mean price m, where c is cheap price and d is dear price."},{name:"Replacement Formula",formula:"F = I \\left(1 - \\frac{x}{V}\\right)^n",explanation:"Finds the final amount of original liquid after removing x liters from volume V and replacing with water n times."}],variations:[{name:"Price mixture",explanation:"Find the ratio to mix items of different prices to get a target average price.",example:"In what ratio must rice at $12/kg be mixed with rice at $18/kg to get a mixture worth $14/kg?",solution:"Use the allegation rule: Cheap (c) = 12, Dear (d) = 18, Mean (m) = 14. Ratio = $(18 - 14) / (14 - 12) = 4 / 2 = 2:1$."},{name:"Repeated replacement",explanation:"Apply the formula $F = I(1 - x/V)^n$ for successive dilute iterations.",example:"A container has 40L of milk. 4L are removed and replaced with water. This is done a second time. Find the final milk volume.",solution:"Milk left = $40 \\times (1 - 4/40)^2 = 40 \\times (0.9)^2 = 40 \\times 0.81 = 32.4$ liters."}],quiz:[{question:"In what ratio must a grocer mix tea costing $60/kg with tea costing $65/kg to sell the mixture at $68.20/kg making a 10% profit?",options:["3:2","2:3","1:2","4:1"],answer:0,explanation:"Selling Price = 68.20 at 10% profit \\implies$ Cost Price of mixture = $68.20 / 1.1 = 62$. Using Allegation: $(65 - 62) / (62 - 60) = 3 / 2 = 3:2$."}]},{id:"permutations-combinations",title:"Permutations & Combinations",domain:"geometry-count",description:"Arrange letters, seat people in circles, and make team selections.",icon:"LayoutGrid",topics:["Arrangements of letters","Circular arrangements","Selection problems"],formulas:[{name:"Permutation (Order matters)",formula:"P(n, r) = \\frac{n!}{(n-r)!}",explanation:"Arranging r items out of n."},{name:"Combination (Order does not matter)",formula:"C(n, r) = \\frac{n!}{r!(n-r)!}",explanation:"Selecting r items out of n."},{name:"Circular Arrangement",formula:"\\text{Arrangements} = (n-1)!",explanation:"Seats n people around a round table."}],variations:[{name:"Word arrangements with repeats",explanation:"Divide the total factorial by repeats factorials.",example:"In how many ways can you arrange the letters of the word 'APPLE'?",solution:"Total letters = 5. Repeat letters: P appears 2 times. Ways = $5! / 2! = 120 / 2 = 60$ ways."},{name:"Selection problems",explanation:"Use combination $C(n,r)$ to pick items when order doesn't matter.",example:"How many ways can you choose 3 players from a group of 8?",solution:"$C(8, 3) = (8 \\times 7 \\times 6) / (3 \\times 2 \\times 1) = 56$ ways."}],quiz:[{question:"How many ways can 5 people be seated around a round table?",options:["120","24","60","48"],answer:1,explanation:"Using $(n-1)!$ for circular arrangements: $(5-1)! = 4! = 24$ ways."}]},{id:"probability",title:"Probability",domain:"geometry-count",description:"Calculate chances of winning, coin flips, rolling dice, card hands, and conditional events.",icon:"Dice5",topics:["Dice and Coins","Card selections","Conditional probability"],formulas:[{name:"Probability Definition",formula:"P(A) = \\frac{\\text{Number of Favorable Outcomes}}{\\text{Total Number of Outcomes}}",explanation:"Basic odds of an event occurring."},{name:"Addition Rule",formula:"P(A \\cup B) = P(A) + P(B) - P(A \\cap B)",explanation:"Probability of event A or B happening."},{name:"Conditional Probability",formula:"P(A | B) = \\frac{P(A \\cap B)}{P(B)}",explanation:"Probability of A happening given that B already happened."}],variations:[{name:"Dice puzzles",explanation:"List outcomes sum rules. Total outcomes for 2 dice is 36.",example:"What is the probability of getting a sum of 8 when rolling two dice?",solution:"Favorable pairs: $(2,6), (3,5), (4,4), (5,3), (6,2)$ (5 outcomes). Total outcomes = 36. Probability = $5/36$."},{name:"Selection probability",explanation:"Use combinations to find favorable choices out of total choices.",example:"A bag has 3 red and 4 blue balls. If you pick 2, find the probability that both are red.",solution:"Favorable ways = $C(3, 2) = 3$. Total ways = $C(7, 2) = 21$. Probability = $3 / 21 = 1/7$."}],quiz:[{question:"A card is drawn from a pack of 52 cards. What is the probability that it is a king or a club?",options:["4/13","17/52","16/52","1/4"],answer:0,explanation:"Total Kings = 4. Total Clubs = 13. King of Clubs is counted twice. Total favorable = $4 + 13 - 1 = 16$. Probability = $16/52 = 4/13$."}]},{id:"progressions",title:"Progressions",domain:"algebra-numbers",description:"Explore linear series (AP), multiplicative series (GP), and harmonic series (HP).",icon:"ListChecks",topics:["Arithmetic Progression (AP)","Geometric Progression (GP)","Harmonic Progression (HP)","Sum of terms"],formulas:[{name:"AP n-th Term",formula:"a_n = a + (n-1)d",explanation:"a is first term, d is common difference."},{name:"AP Sum",formula:"S_n = \\frac{n}{2} [2a + (n-1)d]",explanation:"Sum of first n terms of an AP."},{name:"GP n-th Term",formula:"g_n = a r^{n-1}",explanation:"r is the common ratio."},{name:"GP Infinite Sum",formula:"S_{\\infty} = \\frac{a}{1-r}",explanation:"Sum of GP to infinity when |r| < 1."}],variations:[{name:"Sum of terms",explanation:"Find the number of terms and apply the sum formula.",example:"Find the sum of the series $2 + 5 + 8 + \\dots$ up to 10 terms.",solution:"Here $a = 2$, $d = 3$, $n = 10$. Sum = $(10 / 2) \\times [2(2) + (10-1)3] = 5 \\times [4 + 27] = 5 \\times 31 = 155$."}],quiz:[{question:"Find the sum of the infinite GP: $1, 1/2, 1/4, 1/8, \\dots$",options:["2","1.5","3","Infinite"],answer:0,explanation:"First term $a=1$, ratio $r=1/2$. Sum = $a / (1-r) = 1 / (1 - 1/2) = 2$."}]},{id:"geometry",title:"Geometry",domain:"geometry-count",description:"Analyze properties of triangles, circles, and polygons, including areas and similarities.",icon:"Compass",topics:["Triangles","Circles","Quadrilaterals","Similarity and congruency"],formulas:[{name:"Angle Sum of Polygon",formula:"\\text{Sum} = (n - 2) \\times 180^{\\circ}",explanation:"Total angles in an n-sided polygon."},{name:"Pythagorean Theorem",formula:"a^2 + b^2 = c^2",explanation:"Applies to right-angled triangles."},{name:"Area of Circle",formula:"A = \\pi r^2",explanation:"Calculates space inside a circle."}],variations:[{name:"Angles in polygons",explanation:"Find interior or exterior angles using basic sum rules.",example:"Find the measure of each interior angle of a regular hexagon (6 sides).",solution:"Total interior sum = $(6-2) \\times 180^{\\circ} = 4 \\times 180^{\\circ} = 720^{\\circ}$. Hexagon has 6 equal angles: $720^{\\circ} / 6 = 120^{\\circ}$."}],quiz:[{question:"What is the angle of a sector of a circle of radius 7cm if the area of the sector is 77 sq cm? (Use $\\pi = 22/7$)",options:["90 degrees","180 degrees","60 degrees","120 degrees"],answer:1,explanation:"Full area = $\\pi r^2 = (22/7) \\times 49 = 154$. Sector area = 77, which is exactly half of the circle. Half a circle is 180 degrees."}]},{id:"mensuration",title:"Mensuration",domain:"geometry-count",description:"Find areas and volumes of 2D shapes and 3D solids like cuboids, cones, and spheres.",icon:"Shapes",topics:["2D Shapes (Square, Rectangle, Triangle)","3D Shapes (Cube, Cylinder, Cone, Sphere)","Surface area and volume"],formulas:[{name:"Cylinder Volume",formula:"V = \\pi r^2 h",explanation:"Volume of a cylinder of radius r and height h."},{name:"Sphere Volume",formula:"V = \\frac{4}{3} \\pi r^3",explanation:"Volume of a sphere of radius r."},{name:"Cone Volume",formula:"V = \\frac{1}{3} \\pi r^2 h",explanation:"Cone volume is one-third of a cylinder of same dimensions."}],variations:[{name:"Combined solids volume",explanation:"Add up individual volumes of shapes combined together.",example:"A toy is made by joining a cone of height 4cm onto a cylinder of height 10cm, both sharing a radius of 3cm. Find total volume.",solution:"Cylinder volume = $\\pi \\times 3^2 \\times 10 = 90\\pi$. Cone volume = $(1/3) \\pi \\times 3^2 \\times 4 = 12\\pi$. Total volume = $90\\pi + 12\\pi = 102\\pi$ cm$^3$."}],quiz:[{question:"If the radius of a sphere is doubled, how many times does its volume increase?",options:["2 times","4 times","8 times","6 times"],answer:2,explanation:"Volume is proportional to $r^3$. So if radius becomes $2r$, volume becomes $(2)^3 = 8$ times."}]},{id:"algebra",title:"Algebra",domain:"algebra-numbers",description:"Solve linear equations, quadratics, inequalities, and simplify algebraic fractions.",icon:"Variable",topics:["Linear equations","Quadratic equations","Inequalities","Simplifications"],formulas:[{name:"Quadratic Roots formula",formula:"x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}",explanation:"Roots of $ax^2 + bx + c = 0$."},{name:"Sum & Product of Roots",formula:"\\alpha + \\beta = -\\frac{b}{a}, \\quad \\alpha\\beta = \\frac{c}{a}",explanation:"Relation between quadratic coefficients and roots."}],variations:[{name:"Quadratic equations solving",explanation:"Find roots using factoring or the quadratic formula.",example:"Find the roots of $x^2 - 5x + 6 = 0$.",solution:"Factor equation: $(x-2)(x-3) = 0 \\implies x=2$ or $x=3$."}],quiz:[{question:"For what value of $k$ does the quadratic equation $x^2 - kx + 9 = 0$ have equal roots?",options:["6 or -6","3 or -3","9 or -9","0"],answer:0,explanation:"For equal roots, discriminant $b^2 - 4ac = 0 \\implies (-k)^2 - 4(1)(9) = 0 \\implies k^2 = 36 \\implies k = 6$ or $-6$."}]},{id:"logarithms",title:"Logarithms",domain:"algebra-numbers",description:"Understand exponential scaling, properties of logarithms, and log equation systems.",icon:"Variable",topics:["Basic laws of log","Exponential conversions","Log equations"],formulas:[{name:"Product Law",formula:"\\log_b (xy) = \\log_b x + \\log_b y",explanation:"Multiplication inside matches addition outside."},{name:"Quotient Law",formula:"\\log_b (x/y) = \\log_b x - \\log_b y",explanation:"Division inside matches subtraction outside."},{name:"Power Law",formula:"\\log_b (x^p) = p \\log_b x",explanation:"Brings exponent out front."},{name:"Change of Base",formula:"\\log_a b = \\frac{\\log_c b}{\\log_c a}",explanation:"Converts logs to a new base."}],variations:[{name:"Log equations solving",explanation:"Use properties to simplify logs and isolate variables.",example:"Solve for $x$: $\\log_2 (x) + \\log_2 (x-2) = 3$.",solution:"Simplify: $\\log_2(x(x-2)) = 3 \\implies x(x-2) = 2^3 \\implies x^2 - 2x = 8 \\implies x^2 - 2x - 8 = 0$. Factoring: $(
132x-4)(x+2) = 0$. Since log arguments must be positive, $x = 4$."}],quiz:[{question:"What is the value of $\\log_{10} 25 + \\log_{10} 4$?",options:["2","10","29","1.5"],answer:0,explanation:"Using the product law: $\\log_{10} 25 + \\log_{10} 4 = \\log_{10} (25 \\times 4) = \\log_{10} 100 = 2$."}]},{id:"data-interpretation",title:"Data Interpretation",domain:"data-logic",description:"Analyze charts, tables, bar graphs, and caselets to extract key metrics.",icon:"BarChart3",topics:["Tables","Pie charts","Bar & Line graphs","Caselets"],formulas:[{name:"Percentage Share",formula:"\\% \\text{ Share} = \\frac{\\text{Sector Value}}{\\text{Total Value}} \\times 100",explanation:"Finds slice percentage."},{name:"Sector Angle",formula:"\\text{Angle} = \\frac{\\text{Sector Value}}{\\text{Total Value}} \\times 360^{\\circ}",explanation:"Finds degrees in a pie chart."}],variations:[{name:"Pie chart degrees to percentages",explanation:"Multiply degrees by $100 / 360$ (or $5/18$) to get the percentage.",example:"A sector in a pie chart has an angle of $72^{\\circ}$. What percentage does it represent?",solution:"Percentage = $72 \\times (100 / 360) = 72 \\times (1/5) = 20\\%$."}],quiz:[{question:"In a company, the marketing department angle in a pie chart is 90 degrees. If the company has 400 employees, how many are in marketing?",options:["100","50","200","150"],answer:0,explanation:"90 degrees is exactly $90/360 = 1/4$ of the circle. Employees in marketing = $1/4 \\times 400 = 100$."}]},{id:"data-sufficiency",title:"Data Sufficiency",domain:"data-logic",description:"Evaluate whether statement inputs are enough to solve math questions.",icon:"CheckSquare",topics:["Statement sufficiency analysis","Quantitative comparison"],formulas:[],variations:[{name:"Statement-based sufficiency",explanation:"Determine if Statement 1 alone, Statement 2 alone, both together, or neither can answer the question.",example:`Is integer $X$ odd?
133Statement 1: $X+1$ is even.
134Statement 2: $X$ is prime.`,solution:`From Statement 1: If $X+1$ is even, $X$ must be odd. This statement alone is sufficient.
135From Statement 2: If $X$ is prime, it could be 2 (even) or 3 (odd). Not sufficient.
136So Statement 1 alone is sufficient.`}],quiz:[{question:`Find value of $x+y$.
137Statement 1: $x - y = 4$
138Statement 2: $x^2 - y^2 = 24$`,options:["Statement 1 alone is sufficient","Statement 2 alone is sufficient","Both statements together are sufficient","Statements 1 and 2 together are not sufficient"],answer:2,explanation:"$x^2 - y^2 = (x-y)(x+y)$. If we combine both statements: $24 = 4 \\times (x+y) \\implies x+y = 6$. So both statements together are sufficient."}]}],sa=[{id:"series",title:"Series",domain:"series-coding",description:"Identify patterns and mathematical relationships in numerical, alphabetical, or alphanumeric sequences to find missing terms.",icon:"Hash",topics:["Number series","Alphabet series","Mixed alphanumeric series","Double-tier differences"],rules:[{name:"Arithmetic Series",rule:"\\text{Next Term} = \\text{Previous Term} \\pm \\text{Difference (d)}",explanation:"Consecutive terms have a constant difference (e.g. +3, +5, +7)."},{name:"Geometric Series",rule:"\\text{Next Term} = \\text{Previous Term} \\times \\text{Ratio (r)}",explanation:"Consecutive terms are multiplied by a constant ratio."},{name:"Prime / Square Series",rule:"\\text{Term} = \\text{Position}^2 \\text{ or } \\text{Prime Number}",explanation:"Terms correspond to squares, cubes, or prime numbers."}],variations:[{name:"Number Series (Difference of Differences)",explanation:"When differences between terms don't show a direct pattern, find the difference of those differences.",example:"Find the next number: $2, 3, 5, 8, 12, 17, ?$?",solution:"First differences: $3-2=1$, $5-3=2$, $8-5=3$, $12-8=4$, $17-12=5$. The differences grow by $+1$. The next difference is $6$. Next term = $17 + 6 = 23$."},{name:"Alphabet Series",explanation:"Convert alphabet characters to their numerical values (A=1, B=2... Z=26) to identify simple mathematical shifts.",example:"Find the next letter in the series: $A, C, F, J, O, ?$?",solution:"Values: A=1, C=3 (shift +2), F=6 (shift +3), J=10 (shift +4), O=15 (shift +5). Next shift is $+6$. $15 + 6 = 21$, which is letter U."}],quiz:[{question:"Find the next number in the series: 3, 5, 9, 17, 33, ...",options:["49","65","50","55"],answer:1,explanation:"The differences are +2, +4, +8, +16. Each difference doubles the previous one. The next difference is +32. Thus, $33 + 32 = 65$."},{question:"Find the next group: AZ, CX, EV, GT, ...",options:["IS","IR","HS","KP"],answer:1,explanation:"First letters: A(+2) -> C(+2) -> E(+2) -> G(+2) -> I. Second letters: Z(-2) -> X(-2) -> V(-2) -> T(-2) -> R. So the answer is IR."}]},{id:"coding-decoding",title:"Coding-Decoding",domain:"series-coding",description:"Encrypt and decrypt words, numbers, patterns, or symbols based on systematic relational rules.",icon:"Code",topics:["Letter coding","Number coding","Symbol coding","Pattern & Substitution coding"],rules:[{name:"Shift Coding",rule:"\\text{Letter} \\to \\text{Letter Shifted by } k",explanation:"Each letter is shifted forward or backward in the alphabet."},{name:"Reverse Coding",rule:"\\text{Letter} \\to \\text{Opposite Letter (e.g. A } \\leftrightarrow \\text{ Z)}",explanation:"Letters are matched to opposites (A-Z, B-Y, etc.)."},{name:"Direct Value substitution",rule:"\\text{Word}
138 \\to \\text{Direct Number/Symbol List}",explanation:"Letters are assigned fixed values from a lookup key."}],variations:[{name:"Letter transposition shifts",explanation:"Letters are shifted alphabetically by a constant or changing integer key.",example:"If 'MONKEY' is coded as 'XDJMNL', how is 'TIGER' coded?",solution:"Observe: M(-1)=L, O(-1)=N, N(-1)=M, K(-1)=J, E(-1)=D, Y(-1)=X. The coded word is written in reverse order. For 'TIGER': T(-1)=S, I(-1)=H, G(-1)=F, E(-1)=D, R(-1)=Q. Reversed = QDFHS."}],quiz:[{question:"If in a certain language, 'MYSTIFY' is coded as 'NZTUJGZ', how is 'NEMESIS' coded?",options:["ODNFTJT","OFNFTJT","ODNFSJT","OFNFSJT"],answer:1,explanation:"Each letter is shifted by +1: N(+1)=O, E(+1)=F, M(+1)=N, E(+1)=F, S(+1)=T, I(+1)=J, S(+1)=T. Result: OFNFTJT."}]},{id:"blood-relations",title:"Blood Relations",domain:"relations-directions",description:"Solve complex family relationships using generation mapping trees, direct statement pointers, or coded tie variables.",icon:"Network",topics:["Family tree mapping","Coded relations","Puzzle-based relations"],rules:[{name:"Generation Tiers",rule:"\\text{Parents (Upper Level)} \\to \\text{Children (Lower Level)}",explanation:"Place older generations above younger generations visually."},{name:"Gender Signage",rule:"\\text{(+) for Male, (-) for Female}",explanation:"Aids in tracking genders to avoid relational confusion."},{name:"Links",rule:"\\text{(=) Spouse, (--) Sibling}",explanation:"Double lines connect married couples; single lines link siblings."}],variations:[{name:"Coded Relations (Forward Mapping)",explanation:"In forward-coded relations, the operators define the relationship of the left element with respect to the right element (e.g., $P * Q$ means $P$ is the husband of $Q$).",example:`If $P + Q$ means $P$ is the brother of $Q$, $P - Q$ means $P$ is the mother of $Q$, and $P \\times Q$ means $P$ is the husband of $Q$.
139
140In the expression $M - N + O \\times P$, how is $M$ related to $P$?`,solution:`Let's break down the expression from left to right:
1411. $M - N$: $M$ is the mother (-) of $N$.
1422. $N + O$: $N$ is the brother (+) of $O$. Since $M$ is the mother of $N$, $M$ is also the mother of $O$.
1433. $O \\times P$: $O$ is the husband (+) of $P$ (-).
144
145Since $M$ is the mother of husband $O$, $M$ is the mother-in-law of $P$.`},{name:"Coded Relations (Reverse Mapping)",explanation:"In reverse-coded relations, the operators define the relationship of the right element with respect to the left element (e.g., $P @ Q$ means $Q$ is the brother of $P$). This is a common trap in aptitude tests.",example:`If $P + Q$ means $Q$ is the daughter of $P$, $P - Q$ means $Q$ is the father of $P$, and $P \\times Q$ means $Q$ is the sister of $P$.
146
147In the expression $X \\times Y - Z$, how is $X$ related to $Z$?`,solution:`Since this is a reverse-mapped expression, we analyze the relationships starting from the right:
1481. $Y - Z$: $Z$ is the father (+) of $Y$.
1492. $X \\times Y$: $Y$ is the sister (-) of $X$.
150
151Since $Z$ is the father of $Y$, and $Y$ is the sister of $X$, $Z$ must be the father of $X$ as well. Therefore, $X$ is the child of $Z$. Since the gender of $X$ is not specified, $X$ is either the son or daughter of $Z$.`},{name:"Coded Relations (Equation Identification)",explanation:"Instead of decoding a given expression, you are given a target relationship and must identify which of the multiple-choice equations establishes it.",example:`If $P + Q$ means $P$ is the mother of $Q$, $P \\div Q$ means $P$ is the brother of $Q$, and $P - Q$ means $P$ is the daughter of $Q$.
152
153Which of the following expressions indicates that 'K is the maternal grandmother of S'?
1541) $K + T \\div S$
1552) $K + T - S$
1563) $K \\div T + S$
1574) $K + T + S$`,solution:`To find 'K is the maternal grandmother of S', K must be female, and there must be a mother-to-child link from K to an intermediate person, who must also be a mother to S.
158
159Let's check option 4: $K + T + S$
1601. $K + T$: $K$ is the mother (-) of $T$.
1612. $T + S$: $T$ is the mother (-) of $S$.
162
163Since $K$ is the mother of $S$'s mother $T$, $K$ is indeed the maternal grandmother of $S$. Therefore, option 4 is the correct expression.`},{name:"Dialogue & Pointing-based Relations",explanation:"A person points to a portrait or person and describes their relationship indirectly. Solve this by drawing a family tree backwards, starting from the pronoun 'my' or 'he/she'.",example:"Pointing to a man in a photograph, a woman says: 'His mother's only daughter is my mother.' How is the woman related to the man in the photograph?",solution:`Let's trace the statements step-by-step starting from 'my mother':
1641. 'my mother' = The speaking woman's mother.
1652. 'His mother's only daughter' = The speaking woman's mother.
1663. The man's mother's only daughter is the speaking woman's mother.
1674. The man's mother's daughter is the man's sister.
1685. Therefore, the man's sister is the speaking woman's mother.
1696. This makes the man the maternal uncle of the speaking woman.
1707. Consequently, the speaking woman is the niece of the man.`},{name:"Puzzle-based Family Tree Relations",explanation:"These questions present a set of descriptions about a fam
170ily's members, including their genders, relationships, and sometimes their professions or locations. A generation-by-generation family tree diagram is necessary to solve them.",example:`In a family of six members ($A, B, C, D, E,$ and $F$), there are two married couples. $D$ is the grandmother of $A$ and mother of $B$. $C$ is the wife of $B$ and mother of $F$. $F$ is the granddaughter of $E$.
171
172How is $C$ related to $A$?`,solution:`Let's construct the family tree:
1731. $D$ is the grandmother of $A$ (Generation 1) and mother of $B$ (Generation 2).
1742. $C$ is the wife of $B$. Since $C$ is female (-), $B$ must be male (+).
1753. $C$ is the mother of $F$. Since $B$ and $C$ are married, $F$ and $A$ are siblings in Generation 3.
1764. $F$ is the granddaughter of $E$. Since $D$ is the grandmother (Generation 1), $E$ must be the grandfather (Generation 1) and $D$'s husband.
1775. Looking at Generation 2: $B$ (husband) and $C$ (wife) are the parents of $A$ and $F$.
178
179Therefore, $C$ is the mother of $A$.`}],quiz:[{question:"Pointing to a photograph, Vipul said, 'She is the daughter of my grandfather's only son.' How is Vipul related to the girl in the photograph?",options:["Father","Brother","Uncle","Cousin"],answer:1,explanation:"Vipul's grandfather's only son is Vipul's father. The daughter of Vipul's father is Vipul's sister. So Vipul is her brother."}]},{id:"direction-sense",title:"Direction Sense",domain:"relations-directions",description:"Map spatial paths, calculate straight-line displacement, and compute final direction headings.",icon:"Compass",topics:["Distance calculation","Shortest path","Final direction tracking","Degree turns & shadows"],rules:[{name:"Cardinal Layout",rule:"\\text{North (Up), South (Down), East (Right), West (Left)}",explanation:"Always draw the standard compass reference map."},{name:"Pythagorean Theorem",rule:"\\text{Distance}^2 = \\text{Horizontal Change}^2 + \\text{Vertical Change}^2",explanation:"Used to find shortest diagonal distance between starting and ending points."},{name:"Turn Directions",rule:"\\text{Right Turn} \\to 90^\\circ \\text{ Clockwise, Left Turn} \\to 90^\\circ \\text{ Counter-Clockwise}",explanation:"Orient turns based on the direction the person is currently facing."}],variations:[{name:"Shortest Path Calculation",explanation:"Create a right-angled triangle representing net North-South and East-West movements, then solve for hypotenuse.",example:"A man walks 3km North, then turns East and walks 4km. Find his distance from start.",solution:"The path forms a right angle. Horizontal displacement = 4km, Vertical = 3km. Distance = $\\sqrt{3^2 + 4^2} = \\sqrt{9 + 16} = 5$ km."}],quiz:[{question:"A person walks 10m East, turns right and walks 10m, then turns left and walks 5m. In which direction is he now facing?",options:["North","South","East","West"],answer:2,explanation:"He starts walking East. Right turn makes him face South. Left turn from South makes him face East again. He continues to face East."}]},{id:"seating-arrangement",title:"Seating Arrangement",domain:"arrangements-puzzles",description:"Position multiple objects or individuals around linear tables, circles, or rectangular shapes while satisfying relative criteria.",icon:"Layers",topics:["Linear seating","Circular arrangement (inside/outside)","Square/Rectangular arrangement"],rules:[{name:"Circular Facing In",rule:"\\text{Clockwise} \\to \\text{ Left, Counter-Clockwise} \\to \\text{ Right}",explanation:"Directions align with sitting inside looking out."},{name:"Circular Facing Out",rule:"\\text{Clockwise} \\to \\text{ Right, Counter-Clockwise} \\to \\text{ Left}",explanation:"Directions invert when individuals face outwards."},{name:"Linear Facing North",rule:"\\text{Same as your Left and Right}",explanation:"Standard alignment with layout coordinates."}],variations:[{name:"Circular Seating (Facing Inside)",explanation:"In inside-facing circular arrangements, left is clockwise and right is counter-clockwise.",example:"A, B, C, and D are sitting in a circle facing the center. B is to the right of A. C is opposite B. Who is to the left of D?",solution:`Let's build the arrangement step-by-step:
180
181**Step 1: Place A at the bottom (6 o'clock position)**
182\`\`\`
183       [ ]
184    [ ]   [ ]
185       [A] (facing center)
186\`\`\`
187
188**Step 2: Place B to the right of A (counter-clockwise -> 3 o'clock)**
189\`\`\`
190       [ ]
191    [ ]   [B]
192       [A]
193\`\`\`
194
195**Step 3: Place C opposite B (9 o'clock)**
196\`\`\`
197       [ ]
198    [C]   [B]
199       [A]
200\`\`\`
201
202**Step 4: Place D in the remaining seat (12 o'clock)**
203\`\`\`
204       [D]
205    [C]   [B]
206       [A]
207\`\`\`
208
209Looking at D (facing the center): D's left is clockwise, pointing directly to A. Therefore, A is to the left of D.`},{name:"Circular Seating (Facing Outside)",explanation:"In outside-facing circular arrangements, the directions are reversed: left is counter-clockwise and right is clockwise.",example:"Five people P, Q, R, S, and T are sitting in a circle facing away from the center. S is to the immediate right of P. T is sitting between Q and R. R is to the immediate left of P. Who is sitting to the immediate right of S?",solution:`Let's construct the arrangement step-by-step:
210
211**Step 1: Anchor P at the bottom (6 o'clock) facing outwards**
212\`\`\`
213       [ ]
214    [ ]   [ ]
215       [P] (facing away)
216\`\`\`
217
218**Step 2: Place S to the immediate right of P (counter-clockwise -> 3 o'clock)**
219\`\`\`
220       [ ]
221    [ ]   [S]
222       [P]
223\`\`\`
224
225**Step 3: Place R to the immediate left of P (clockwise -> 9 o'clock)**
226\`\`\`
227       [ ]
228    [R]   [S]
229       [P]
230\`\`\`
231
232**Step 4: Place T and Q (T sits between Q and R)**
233\`\`\`
234       [Q] (12 o'clock)
235    [T]   [S] (3 o'clock)
236    [R]
237       [P] (6 o'clock)
238\`\`\`
239
240Looking at S (facing outwards): S's right is counter-clockwise, pointing towards Q. Therefore, Q is sitting to the immediate right of S.`},{name:"Linear Seating (Facing North)",explanation:"In linear arrangements facing North, the left and right directions of the seated individuals match your own view.",example:`Five friends A, B, C, D, and E are sitting in a row facing North.
241- C sits to the immediate left of E.
242- B sits to the immediate right of A.
243- D sits in the middle position.
244- E sits at the extreme right end.
245
246Who sits at the extreme left end?`,solution:"Let's fill the five positions [1, 2, 3, 4, 5] from left to right:\n\n**Step 1: D sits in the middle position (3)**\n```\n    [ ] [ ] [D] [ ] [ ]\n```\n\n**Step 2: E sits at the extreme right end (5)**\n```\n    [ ] [ ] [D] [ ] [E]\n```\n\n**Step 3: C sits to the immediate left of E (4)**\n```\n    [ ] [ ] [D] [C] [E]\n```\n\n**Step 4: B sits to the immediate right of A in the remaining adjacent spots (1 and 2)**\n```\n    [A] [B] [D] [C] [E]\n```\n\nTherefore, A sits at the extreme left end."},{name:"Square/Rectangular Seating",explanation:"Arrangement around a square or rectangular table. Always match relative left/right directions to the facing orientation (inside vs. outside) of each edge.",example:`Four people A, B, C, and D are sitting at the four corners of a square table facing the center.
247- A and C sit diagonally opposite each other.
248- B sits to the immediate right of C.
249
250Who sits to the immediate right of D?`,solution:`Let's map the corners of the table:
251
252**Step 1: Place C at the bottom-right corner**
253\`\`\`
254    [ ] ---- [ ]
255     |        |
256     |        |
257    [ ] ---- [C]
258\`\`\`
259
260**Step 2: Place A diagonally opposite C (top-left)**
261\`\`\`
262    [A] ---- [ ]
263     |        |
264     |        |
265    [ ] ---- [C]
266\`\`\`
267
268**Step 3: Place B to the immediate right of C (bottom-left)**
269\`\`\`
270    [A] ---- [ ]
271     |        |
272     |        |
273    [B] ---- [C]
274\`\`\`
275
276**Step 4: Place D at the remaining corner (top-right)**
277\`\`\`
278    [A] ---- [D]
279     |        |
280     |        |
281    [B] ---- [C]
282\`\`\`
283
284Looking at D (facing center): D's right points counter-clockwise, which goes directly to A. Therefore, A sits to the immediate right of D.`}],quiz:[{question:"Five friends A, B, C, D, and E are sitting on a bench facing North. A is next to B, C is next to D. C is not next to E. E is on the left end of the bench. C is second from the right. A is to the right of B and E. Where is A sitting?",options:["Between B and C","Between B and D","Right end","Left end"],answer:0,explanation:"Positions from left: 1, 2, 3, 4, 5. E is on left end (Pos 1). C is 2nd from right (Pos 4). C is next to D; since E is not next to C, D must be on right end (Pos 5) or Pos 3. Since C is next to D, let's test. E is 1. If D is 5, then Pos 2, 3 must be A and B. A is next to B, A is right of B. So B is 2, A is 3. The order is E, B, A, C, D. A is between B and C."}]},{id:"ranking-ordering",title:"Ranking & Ordering",domain:"arrangements-puzzles",description:"Determine exact linear rankings, index positions, and group totals based on positional comparisons.",icon:"ListChecks",topics:["Position finding","Rank calculations","Interchanging positions","Between cases (overlapping/non-overlapping)","Comparison inequalities"],rules:[{name:"Total Index Formula",rule:"\\text{Total} = \\text{Rank}_{\\text{Left}} + \\text{Rank}_{\\text{Right}} - 1",explanation:"Since the reference person is counted from both the left and right ends, they are double-counted. Subtract 1 to correct the total count."},{name:"Position from Opposite End",rule:"\\text{Rank}_{\\text{Opposite}} = \\text{Total} - \\text{Rank}_{\\text{Given}} + 1",explanation:"Subtract the given rank from the total to remove everyone up to that person, then add 1 to get their position from the other end."},{name:"Between (Non-Overlapping)",rule:"\\text{Between} = \\text{Total} - (\\text{Rank}_1 + \\text{Rank}_2)",explanation:"Used when the sum of individual ranks is less than the total strength (Total > Rank1 + Rank2)."},{name:"Between (Overlapping)",rule:"\\text{Between} = (\\text{Rank}_1 + \\text{Rank}_2) - \\text{Total} - 2",explanation:"Used when ranks overlap (Total < Rank1 + Rank2 - 1). Subtracting 2 accounts for the two reference people themselves."},{name:"Minimum Row Strength",rule:"\\text{Min Total} = \\text{Rank}_1 + \\text{Rank}_2 - \\text{Between} - 2",explanation:"The absolute minimum number of people needed to satisfy both ranks with the given number of people between them."}],variations:[{name:"Finding Total in a Single Person Row",explanation:"Calculating total strength when a single person's rank from both ends is known.",example:"In a class, Rahul is 12th from the top and 27th from the bottom. How many students are there in the class?",solution:`Using the Total Formula:
285Total = Rank from Top + Rank from Bottom - 1
286Total = $12 + 27 - 1 = 38$ students.`},{name:"Finding Rank from Opposite End",explanation:"Finding a person's rank from one end when the total number of people and their rank from the other end are given.",example:"In a row of 40 students, Priya is 15th from the right end. What is her position from the left end?",solution:`Using the Opposite Position Formula:
287Rank from Left = Total - Rank from Right + 1
288Rank from Left = $40 - 15 + 1 = 26$th position.`},{name:"Between Persons - Non-Overlapping Case",explanation:"Determining the number of people sitting between two individuals when their ranks from opposite ends do n
288ot overlap.",example:"In a row of 35 children, A is 10th from the left and B is 12th from the right. How many children are between A and B?",solution:`First, check for overlap:
289Sum of ranks = $10 + 12 = 22$.
290Since Total (35) > Sum of ranks (22), it is a non-overlapping case.
291Between = Total - (Left Rank + Right Rank)
292Between = $35 - (10 + 12) = 35 - 22 = 13$ children.`},{name:"Between Persons - Overlapping Case",explanation:"Finding the number of people between two individuals when their ranks from opposite ends overlap.",example:"In a row of 20 boys, Amar is 14th from the left and Akbar is 11th from the right. How many boys are between Amar and Akbar?",solution:`First, check for overlap:
293Sum of ranks = $14 + 11 = 25$.
294Since Total (20) < Sum of Ranks (25) - 1, they overlap.
295Between = (Left Rank + Right Rank) - Total - 2
296Between = $(14 + 11) - 20 - 2 = 25 - 22 = 3$ boys.`},{name:"Position Interchange & Swap",explanation:"When two people swap positions, the distance one person moves from their original position is equal to the distance the other person moves.",example:"In a row, Suresh is 11th from the left and Ramesh is 9th from the right. If they interchange positions, Suresh becomes 18th from the left. What is Ramesh's new position from the right?",solution:`1. Suresh's rank changes from 11th to 18th from the left, a shift of $+7$ positions.
2972. Ramesh must shift by the exact same amount (+7) from his original position (9th from right).
2983. Ramesh's new position = $9 + 7 = 16$th from the right.
2994. Total people in the row = Suresh's new left rank + Ramesh's old right rank - 1 = $18 + 9 - 1 = 26$.`},{name:"Comparison-Based Ordering (Inequalities)",explanation:"Ordering a group of people based on comparative parameters (height, weight, age, marks) using inequalities.",example:"Among five friends, A is taller than B but shorter than C. D is shorter than B but taller than E. Who is the tallest and who is the shortest?",solution:`Let's translate the statements to inequalities:
3001. 'A is taller than B but shorter than C' $\\implies C > A > B$
3012. 'D is shorter than B but taller than E' $\\implies B > D > E$
302
303Combining the two chains:
304$C > A > B > D > E$
305
306Therefore, C is the tallest and E is the shortest.`}],quiz:[{question:"In a row of trees, a pine tree is 7th from either end of the row. How many trees are there in the row?",options:["11","12","13","14"],answer:2,explanation:"Using the total formula: Total = Left + Right - 1. Since the pine tree is 7th from both ends, Total = $7 + 7 - 1 = 13$ trees."},{question:"In a class of 30 students, Kamal is ranked 15th from the top and Sunil is ranked 20th from the bottom. How many students are between them?",options:["3","4","5","6"],answer:0,explanation:"First, sum their ranks: $15 + 20 = 35$. Since $35 > 30$ (Total), it is an overlapping case. Using the formula: Between = (Rank1 + Rank2) - Total - 2. Between = $(15 + 20) - 30 - 2 = 35 - 32 = 3$ students."},{question:"In a row of children, Harish is 11th from the left and Mangesh is 17th from the right. When they interchange their places, Harish becomes 19th from the left. How many children are there in the row?",options:["34","35","36","37"],answer:1,explanation:"When Harish moves to Mangesh's spot, his new position (19th from left) represents the same physical spot that was originally 17th from the right. Total = Harish's new rank + Mangesh's old rank - 1 = $19 + 17 - 1 = 35$ children."},{question:"Among P, Q, R, S, and T, Q is heavier than only T. P is heavier than Q but lighter than R. S is not the heaviest. Who is the heaviest?",options:["P","Q","R","S"],answer:2,explanation:`1. 'Q is heavier than only T' means T is the lightest and Q is the second lightest: _ > _ > _ > Q > T.
3072. 'P is heavier than Q but lighter than R' $\\implies R > P > Q$.
3083. 'S is not the heaviest' means S cannot occupy the top spot.
3094. Placing P, R, and S in the remaining spots, R must be the heaviest, followed by S, then P. The order is: $R > S > P > Q > T$. Thus, R is the heaviest.`}]},{id:"syllogisms",title:"Syllogisms",domain:"logic-statements",description:"Use set intersections and deductive statements to check if conclusions logically follow from general premises.",icon:"HelpCircle",topics:["Standard Venn diagrams","Statement relationships","Possibility conclusions","Either-Or cases"],rules:[{name:"Venn Intersection",rule:"\\text{All A are B} \\implies \\text{Circle A is inside Circle B}",explanation:"Represent 'All' as a circle inside another circle."},{name:"Venn Overlap",rule:"\\text{Some A are B} \\implies \\text{Circles A and B overlap}",explanation:"Represent 'Some' as overlapping intersecting circles."},{name:"Venn Separation",rule:"\\text{No A is B} \\implies \\text{Circles A and B are completely separate}",explanation:"Represent 'No' as completely separate, non-touching circles."}],variations:[{name:"Complementary Either-Or Pair",explanation:"If individual conclusions are invalid but one is positive (Some A are B) and one is negative (No A is B), choose Either-Or.",example:"Statements: Some keys are locks. Some locks are drawers. Conclusions: 1. Some keys are drawers. 2. No key is a drawer.",solution:"Keys and drawers have no direct link. Separately, neither conclusion is certain. However, keys must either share elements with drawers or not. Thus, either 1 or 2 must follow. This is an Either-Or case."}],quiz:[{question:"Statements: All pens are books. All books are tables. Conclusions: I. All pens are tables. II. Some tables are pens.",options:["Only conclusion I follows","Only conclusion II follows","Both I and II follow","Neither I nor II follows"],answer:2,explanation:"All pens are books (Pen circle inside Book). All books are tables (Book circle inside Table). Therefore, Pen circle is inside Table circle (All pens are tables follows). Some tables are pens is also true as they overlap. Both follow."}]},{id:"statements-conclusions",title:"Statements & Conclusions",domain:"logic-statements",description:"Evaluate premise assumptions, direct deductions, and test the validity of logical arguments.",icon:"Terminal",topics:["Assumption validity","Inference mapping","Arguments analysis"],rules:[{name:"Assumption Boundary",rule:"\\text{Must be directly assumed to make statement true}",explanation:"Assumptions cannot exceed what is necessary to make the statement true."}
309,{name:"Direct Conclusion",rule:"\\text{Must follow 100\\% from the facts given without extra guessing}",explanation:"A conclusion must be derived 100% from the facts stated, with no extrapolation."}],variations:[{name:"Evaluating Assumptions",explanation:"An assumption is implicit if the author must believe it to be true to support their statement.",example:"Statement: 'Buy brand X shoes for durability.' Assumption: Brand X shoes are durable.",solution:"The statement advises buying Brand X specifically for durability. This directly implies the assumption that Brand X shoes indeed have the quality of durability. Thus, the assumption is implicit."}],quiz:[{question:"Statement: 'Double your money in 6 months by investing in scheme Y.' Assumptions: I. People want their money to grow. II. Scheme Y is genuine.",options:["Only I is implicit","Only II is implicit","Both I and II are implicit","Neither is implicit"],answer:2,explanation:"The advertisement is designed because people want to double their money (I is implicit). The advertiser presents Scheme Y as a valid offer, implying they believe it is genuine/capable of performing (II is implicit)."}]},{id:"logical-puzzles",title:"Logical Puzzles",domain:"arrangements-puzzles",description:"Resolve multi-parameter scheduling, matching tables, and floor arrangement puzzles under multiple variable constraints.",icon:"LayoutGrid",topics:["Grid matching","Distribution puzzles","Scheduling and floors","Box stacks"],rules:[{name:"Grid Matching (Elimination)",rule:"\\text{Match} \\implies \\text{Exactly One Check (\\checkmark) per Row and Column}",explanation:"Once a cell is marked True (✔), all other cells in its row and column must be marked False (X)."},{name:"Floor Ordering (Relative Anchor)",rule:"\\text{Gap between } A \\text{ and } B = |F_A - F_B| - 1",explanation:"If A lives 'two floors above' B, there is exactly 1 floor between them ($F_A = F_B + 2$)."},{name:"Scheduling Anchor",rule:"\\text{Fixed Days Anchor} \\implies \\text{Arrange chronologically (Mon } \\to \\text{ Sun)}",explanation:"Anchor calendar days or months in chronological order before placing relative events."},{name:"Conditional Elimination",rule:"P \\implies Q \\equiv \\neg Q \\implies \\neg P",explanation:"Use the contrapositive of statements to rule out invalid options. (e.g., if Delhi is not Doctor, then Doctor is not Delhi)."}],variations:[{name:"Grid Matching (Three Variables)",explanation:"Solving puzzles matching people to multiple attributes (e.g., Person, City, and Profession) using a grid.",example:"Three friends P, Q, and R belong to Delhi, Mumbai, and Kolkata, and are a Doctor, Engineer, and Lawyer. P is not from Mumbai. The Lawyer is from Kolkata. Q is the Doctor. Find R's city and profession.",solution:`1. Q is the Doctor. Since the Lawyer is from Kolkata, Q (Doctor) cannot be from Kolkata. Q is not from Kolkata.
3102. P is not from Mumbai.
3113. Create a matching matrix: Since Lawyer = Kolkata, and Q = Doctor, Q cannot be Kolkata, so Q must be Delhi or Mumbai. Since P is not Mumbai, let's analyze R.
3124. R must be the Lawyer (since Q is Doctor, so R must be Lawyer or Engineer. If R is Lawyer, R is from Kolkata. Then Q is from Mumbai (since Q cannot be Kolkata, and P cannot be Mumbai, Q must be Mumbai). This leaves P from Delhi.
3135. Since Q is Mumbai and Doctor, and R is Kolkata and Lawyer, P must be Delhi and Engineer. Therefore, R is from Kolkata and is a Lawyer.`},{name:"Floor / Building Arrangement",explanation:"Positioning people on vertical building levels (1 to N) based on relative height constraints.",example:"In a 5-floor building, A lives on an odd-numbered floor. B lives immediately below D. C lives on floor 4. E lives above A. Who lives on floor 1?",solution:`1. Floors: [1, 2, 3, 4, 5].
3142. C is on Floor 4.
3153. A lives on an odd floor (1, 3, or 5). Since E lives above A, A cannot be on Floor 5. So A is on Floor 1 or 3.
3164. B lives immediately below D => D and B must occupy adjacent floors (D on top, B directly below).
3175. The available consecutive spots are (2, 3) or (5, C on 4 is blocked, so only 2, 3 is available). So D must be on Floor 3 and B on Floor 2.
3186. This leaves Floor 1 and Floor 5. Since A is on an odd floor, A must be on Floor 1. E must be on Floor 5. Therefore, A lives on floor 1.`},{name:"Weekly Scheduling",explanation:"Allocating events, lectures, or travel plans to days of the week based on chronological rules.",example:"Lectures on History, Math, Physics, and Chemistry are held from Monday to Thursday. Math is taught on the day immediately after Physics. Chemistry is taught on Tuesday. When is History taught?",solution:`1. Days: [Mon, Tue, Wed, Thu].
3192. Chemistry is on Tuesday.
3203. Math is immediately after Physics. This means Physics and Math must occupy consecutive days: (Mon, Chemistry on Tue is blocked, so they must be Wed, Thu). So Physics is on Wednesday and Math is on Thursday.
3214. The only remaining day is Monday, which must be assigned to History. Therefore, History is taught on Monday.`},{name:"Box Stacking Puzzles",explanation:"Ordering physical boxes vertically where relative gap counts are given.",example:"Five boxes (P, Q, R, S, T) are stacked. R is immediately above S. There are two boxes between T and P. T is at the top. Q is immediately below P. Which box is at the bottom?",solution:`1. Stack positions: [5 (Top), 4, 3, 2, 1 (Bottom)].
3222. T is at the top (Pos 5).
3233. There are two boxes between T and P => P must be at Pos 2 (since 2 boxes are at Pos 4 and 3).
3244. Q is immediately below P => Q must be at Pos 1.
3255. R is immediately above S =>
325 R and S must be at Pos 4 and Pos 3. The stack from top to bottom is: T, R, S, P, Q. Therefore, Q is at the bottom.`}],quiz:[{question:"In a 5-floor building (floors 1 to 5), Amit lives two floors above Dev. Dev lives immediately below Chetan. Chetan lives on floor 2. On which floor does Amit live?",options:["Floor 3","Floor 4","Floor 5","Floor 1"],answer:0,explanation:`1. Chetan is on floor 2.
3262. Dev lives immediately below Chetan => Dev lives on floor 1.
3273. Amit lives two floors above Dev => Amit lives on floor 1 + 2 = floor 3.`},{question:"Three friends X, Y, and Z have different professions (Doctor, Engineer, Teacher) and live in different cities (Delhi, Mumbai, Kolkata). The Teacher lives in Kolkata. X is not the Engineer. Z lives in Delhi. Y is the Doctor. Where does X live?",options:["Kolkata","Delhi","Mumbai","Cannot be determined"],answer:0,explanation:`1. Y is the Doctor. Since the Teacher lives in Kolkata, Y (Doctor) cannot live in Kolkata. Y lives in Delhi or Mumbai.
3282. Z lives in Delhi. Since Z lives in Delhi, Y must live in Mumbai.
3293. This leaves Kolkata as the city for X. Since X lives in Kolkata, and the Teacher lives in Kolkata, X must be the Teacher. Therefore, X lives in Kolkata.`},{question:"Art, Music, Dance, and Drama are taught Mon to Thu. Dance is taught on Thursday. Art is taught on Monday. Music is taught immediately before Drama. When is Music taught?",options:["Tuesday","Wednesday","Monday","Thursday"],answer:0,explanation:`1. Art is taught on Monday. Dance is taught on Thursday.
3302. Music is taught immediately before Drama. The remaining days are Tuesday and Wednesday. Thus, Music must be taught on Tuesday and Drama on Wednesday. Therefore, Music is taught on Tuesday.`}]},{id:"input-output",title:"Input-Output",domain:"logic-statements",description:"Understand the sequential rules applied by a mathematical rearrange-machine that processes numbers and words.",icon:"Activity",topics:["Machine arrangement","Step-based transformations","Shift-sort rules"],rules:[{name:"Sorting Step",rule:"\\text{Apply one rearrangement change per step}",explanation:"Observe how many shifts occur simultaneously per line step."},{name:"Sorting Priority",rule:"\\text{Track sorting orders (e.g., A-Z, high-to-low)}",explanation:"Track if numbers go high-low and words go alphabetical A-Z."}],variations:[{name:"Simultaneous Left-Right Arrangement",explanation:"The machine rearranges a word on the left and a number on the right in every step.",example:"Input: 'boy 12 apple 45 cat 33'. Find Step 1 if sorting words alphabetically on left and numbers descending on right.",solution:"First alphabetical word is 'apple'. Highest number is '45'. Step 1 brings 'apple' to left, '45' to right: 'apple boy 12 33 cat 45'."}],quiz:[{question:"An input: 'go 40 run 12 cat 50' is rearranged in steps. Step 1: 'cat go 40 run 12 50'. Step 2: 'cat 50 go 40 run 12'. What is the sorting rule?",options:["Word A-Z, then Number high-low","Word Z-A, then Number low-high","Alternating word A-Z and number high-low","No rule"],answer:2,explanation:"Step 1 moves the alphabetical word 'cat' to position 1. Step 2 moves the highest number '50' to position 2. This shows an alternating sort: Word (A-Z) then Number (high-low)."}]},{id:"data-sufficiency",title:"Data Sufficiency",domain:"analytical",description:"Evaluate if information provided across individual or combined statements is sufficient to resolve a logic question.",icon:"CheckSquare",topics:["Checking statement 1 sufficiency","Checking statement 2 sufficiency","Combining statements","Sufficiency flowcharts"],rules:[{name:"Sufficiency Steps",rule:"\\text{Test Statement 1 alone, then Statement 2 alone, then combine them}",explanation:"Always evaluate statements independently before trying to combine them."},{name:"Deduction Goal",rule:"\\text{Must lead to exactly one unique, definitive answer}",explanation:"A statement is sufficient only if it yields a single, definitive answer."}],variations:[{name:"Positional Sufficiency",explanation:"Determine if rank information from two statements can solve a person's absolute position.",example:`What is Amit's rank from the top?
331Statement 1: Amit is 5 ranks ahead of Karun, who is 15th from top.
332Statement 2: Amit is 10th from the bottom.`,solution:`From Statement 1: Karun is 15th, Amit is 5 ranks ahead (higher), so Amit is 10th from top. Sufficient.
333From Statement 2: Amit is 10th from bottom (we don't know total students, so we can't find rank from top). Not sufficient. Statement 1 alone is sufficient.`}],quiz:[{question:`How is P related to Q?
334Statement 1: P is the brother of R.
335Statement 2: R is the daughter of Q.`,options:["Statement 1 alone is sufficient","Statement 2 alone is sufficient","Both statements together are sufficient","Both statements together are not sufficient"],answer:2,explanation:`Statement 1: P is brother (+) of R. Q is not mentioned. Not sufficient.
336Statement 2: R is daughter (-) of Q. P is not mentioned. Not sufficient.
337Combined: P is brother of R, and R is daughter of Q. Therefore, P must be Q's son. Both together are sufficient.`}]},{id:"analytical-reasoning",title:"Analytical Reasoning",domain:"analytical",description:"Solve cause-and-effect scenarios, identify ethical courses of action, and evaluate formal decision criteria.",icon:"Activity",topics:["Cause and effect","Course of action","Decision making criteria"],rules:[{name:"Course of Action Criteria",rule:"\\text{Must be feasible, proportional, and ethical}",explanation:"The action must solve the problem without causing a worse side-effect."}
337,{name:"Cause & Effect order",rule:"\\text{Cause must happen before and directly trigger the effect}",explanation:"Establish if one event directly triggered or resulted from another."}],variations:[{name:"Cause and Effect Analysis",explanation:"Determine if Statement A caused Statement B, Statement B caused A, both are independent, or both are effects of a common cause.",example:`Statement I: Schools closed for a week.
338Statement II: Temperatures dropped below freezing.`,solution:"Freezing temperatures (Statement II) led the local authority to close schools (Statement I) for safety. Thus, Statement II is the cause, and Statement I is its direct effect."}],quiz:[{question:"Statement: 'There is a massive rise in cases of food poisoning in city X.' Courses of Action: I. Citizens should avoid eating street food. II. The government should inspect local restaurants.",options:["Only I follows","Only II follows","Both I and II follow","Neither follows"],answer:2,explanation:"Avoiding street food helps citizens protect themselves immediately (I follows). Government inspections help identify and fix the root food safety issues (II follows). Both actions are valid courses of action."}]}],ws={id:"dsa-root",title:"Data Structures & Algorithms",description:"A complete roadmap from the basics to advanced topics",color:"#bd93f9",icon:"GitBranch",children:[{id:"what-is-dsa",title:"What is DSA?",shortTitle:"What is DSA?",description:"Understanding the fundamental concepts of Data Structures and Algorithms",color:"#8be9fd",icon:"BookOpen",content:{overview:"**Data Structures and Algorithms (DSA)** form the foundational pillars of computer science and software engineering. A **Data Structure** is a specialized format for organizing, storing, and managing data in memory so that it can be accessed and modified efficiently. An **Algorithm** is a finite, well-defined sequence of instructions that takes an input, performs a computation, and produces an output. Together, they determine how efficiently software can solve problems — the right combination of data structure and algorithm can make the difference between a program that runs in milliseconds and one that takes hours.",keyPoints:["Data Structures define HOW data is organized and stored in memory — choosing the wrong one can make your program 1000x slower","Algorithms define the step-by-step procedure to process data — they are the 'recipes' that operate on data structures","The right Data Structure + Algorithm pairing is the key to writing efficient, scalable software","DSA is language-agnostic — concepts like arrays, trees, sorting, and searching apply in Python, Java, C++, JavaScript, and every other language","Mastering DSA is essential for coding interviews at top tech companies (Google, Meta, Amazon, Microsoft, etc.)","All advanced CS fields — machine learning, databases, operating systems, compilers, networking — are built upon DSA fundamentals"],sections:[{title:"Why Learn DSA?",body:`DSA is the backbone of software engineering. Every application you use — from search engines to social media to GPS navigation — relies on carefully chosen data structures and algorithms working behind the scenes.
339
340**Key reasons to learn DSA:**
341
342- **Problem Solving**: DSA teaches you to decompose complex, real-world problems into smaller, manageable subproblems and solve them systematically. It transforms you from someone who writes code into someone who **designs solutions**.
343
344- **Efficiency & Performance**: Two programs can solve the same problem but one might take 0.001 seconds while the other takes 10 hours. The difference is DSA. Learning Big-O analysis helps you write code that scales gracefully from 100 users to 100 million.
345
346- **Coding Interviews**: Nearly every major tech company — from startups to FAANG — tests DSA knowledge in technical interviews. It's the universal standard for evaluating a developer's problem-solving ability.
347
348- **System Design**: Understanding DSA is essential for designing large-scale systems. How does Google search billions of web pages in 0.3 seconds? How does Uber match riders to drivers in real-time? The answers lie in efficie
348nt data structures and algorithms.
349
350- **Foundation for Advanced Topics**: Machine learning relies on matrix operations (arrays), databases use B-Trees and hash indexes, operating systems use queues for scheduling, compilers use stacks for parsing — DSA is everywhere.
351
352- **Better Code Quality**: DSA knowledge helps you choose the right tool for each job, write cleaner code, and avoid common performance pitfalls.`},{title:"Data Structures vs Algorithms",body:`Think of it this way:
353- **Data Structure** = A container (like a bookshelf, filing cabinet, or warehouse) that determines how data is stored and organized
354- **Algorithm** = The instructions for organizing, finding, or rearranging items in that container
355
356They are **inseparable partners** — the choice of data structure directly determines which algorithms are available and how fast they run.
357
358**Example 1 — Phone Book:**
359If you have a phone book (data structure = **sorted array**), you can use **binary search** to find a name in ~20 steps out of 1 million entries. If the phone book were unsorted, you'd need **linear search** — potentially checking all 1 million entries!
360
361**Example 2 — Social Network:**
362To store friendships between users, you could use:
363- A **2D array** (adjacency matrix) → O(1) to check if two users are friends, but wastes memory for sparse networks
364- A **hash map of linked lists** (adjacency list) → memory-efficient for sparse graphs, O(degree) lookup
365
366**Example 3 — Autocomplete:**
367Typing into a search bar triggers suggestions. Using a simple array would require scanning all possible words (slow). Using a **Trie** data structure, you can find all matching words in O(length of prefix) — nearly instant.
368
369The choice of data structure directly impacts which algorithms you can use and how efficient they are.`},{title:"Classification of Data Structures",body:`Data structures are classified into several categories based on how they organize data:
370
371### Linear Data Structures
372Elements are arranged **sequentially**, one after another. Each element has a single predecessor and successor (except the first and last).
373- **Array**: Fixed-size, contiguous memory, O(1) index access
374- **Linked List**: Dynamic size, pointer-based linkage, O(1) insert at head
375- **Stack**: LIFO — last in, first out (like a stack of plates)
376- **Queue**: FIFO — first in, first out (like a line at a counter)
377
378### Non-Linear Data Structures
379Elements are arranged **hierarchically or in a network**. An element can connect to multiple other elements.
380- **Tree**: Hierarchical structure with parent-child relationships (e.g. file systems, DOM)
381- **Graph**: Network of nodes connected by edges (e.g. social networks, maps, the internet)
382- **Heap**: Specialized tree for efficient min/max retrieval
383- **Trie**: Tree optimized for prefix-based string searching
384
385### Primitive vs Non-Primitive
386- **Primitive**: Basic data types built into the language — \`int\`, \`float\`, \`char\`, \`boolean\`
387- **Non-Primitive**: Composite structures built from primitives — Arrays, Lists, Trees, Graphs, Hash Tables
388
389### Static vs Dynamic
390- **Static**: Size is fixed at creation (e.g. arrays in C/Java)
391- **Dynamic**: Size can grow/shrink at runtime (e.g. linked lists, Python lists, hash maps)`},{title:"How to Approach Learning DSA",body:`Learning DSA is a marathon, not a sprint. Here's a structured approach:
392
393**Phase 1 — Foundations (Weeks 1–3)**
394Start with the basic data structures: Arrays, Linked Lists, Stacks, and Queues. Understand how each one stores data, its operations, and time complexities. Implement each from scratch.
395
396**Phase 2 — Core Algorithms (Weeks 4–6)**
397Learn searching (linear search, binary search) and sorting (bubble sort, merge sort, quick sort). Understand Big-O notation and how to analyze algorithm efficiency.
398
399**Phase 3 — Intermediate Structures (Weeks 7–10)**
400Dive into Hash Tables, Trees (BST, AVL), Heaps, and Graphs. Learn traversal algorithms (BFS, DFS) and their applications.
401
402**Phase 4 — Advanced Techniques (Weeks 11+)**
403Study dynamic programming, greedy algorithms, backtracking, and divi
403de-and-conquer. Practice on coding platforms like LeetCode, HackerRank, and Codeforces.
404
405**Key Principles:**
406- **Understand, don't memorize** — Focus on WHY each data structure exists and WHEN to use it
407- **Implement from scratch** — Coding your own linked list teaches more than reading about it
408- **Solve problems daily** — Consistent practice is the single most important factor
409- **Analyze complexity** — Always ask: "What is the time and space complexity of my solution?"`}],relatedTopics:["basic-data-structures","algorithm-complexity"]}},{id:"basic-data-structures",title:"Basic Data Structures",shortTitle:"Data Structures",description:"Fundamental data structures that form the building blocks",color:"#bd93f9",icon:"Boxes",children:[{id:"ds-arrays",title:"Arrays",description:"Contiguous memory storage of elements",color:"#bd93f9",icon:"LayoutGrid",content:{overview:"An **Array** is a linear data structure that stores a collection of elements in **contiguous (adjacent) memory locations**. It is one of the most fundamental and widely used data structures in computer science, forming the backbone of almost every program. Because elements sit side-by-side in memory, any element can be accessed **directly in O(1) time** using its numerical index — no traversal required. In most low-level languages (C, C++, Java), arrays have a **fixed size** declared at creation and hold elements of a **single data type**. Higher-level languages like Python and JavaScript provide dynamic arrays (lists) that resize automatically under the hood.",keyPoints:["Elements are stored at contiguous memory addresses, enabling direct index-based access in O(1) time","Static arrays have a fixed size set at creation — they cannot grow or shrink at runtime","Dynamic arrays (Python list, Java ArrayList, C++ vector) auto-resize by allocating a larger block and copying elements when capacity is exceeded","Insertion or deletion at arbitrary positions requires shifting elements, costing O(n) in the worst case","Arrays exhibit excellent cache locality because consecutive elements are stored adjacently in RAM, making sequential access extremely fast","They form the underlying implementation for many other data structures including stacks, queues, heaps, and hash tables"],sections:[{title:"How Arrays Work in Memory",body:`When you declare an array of size 5, the operating system allocates 5 **consecutive memory slots** of equal size. Each slot holds one element, and the position of any element can be computed instantly with pointer arithmetic:
410
411\`\`\`
412Index:    0     1     2     3     4
413Value:  [10]  [20]  [30]  [40]  [50]
414Addr:  0x100 0x104 0x108 0x10C 0x110
415\`\`\`
416
417To access the element at index \`i\`, the CPU uses this formula:
418
419**Address = Base Address + (i × size_of_element)**
420
421For example, to access index 3 in an integer array (4 bytes per int) starting at address 0x100:
422\`Address = 0x100 + (3 × 4) = 0x10C\`
423
424This direct calculation is why array access is **O(1)** — it's pure arithmetic with no searching involved. This property is called **random access** and it makes arrays fundamentally different from linked data structures where you must traverse nodes sequentially.
425
426**Cache Friendliness:** Because array elements sit contiguously in RAM, when the CPU loads one element into the cache line, the neighbouring elements come along for free. This **spatial locality** makes sequential array traversal significantly faster in practice than traversing pointer-based structures like linked lists.`},{title:"Types of Arrays",body:`### 1D Array (Vector)
427The simplest form — a flat sequence of elements indexed from 0 to n−1.
428\`\`\`python
429arr = [10, 20, 30, 40, 50]
430print(arr[2])   # 30
431print(len(arr)) # 5
432\`\`\`
433
434### 2D Array (Matrix)
435A table organized into rows and columns, commonly used in mathematical computations, image processing, and graph adjacency matrices.
436\`\`\`python
437matrix = [
438  [1, 2, 3],
439  [4, 5, 6],
440  [7, 8, 9]
441]
442print(matrix[1][2])  # 6 (row 1, col 2)
443\`\`\`
444Internally, 2D arrays are stored as a contiguous block in **row-major order** (C, Python) or **column-major order** (Fortran, MATLAB).
445
446### Dynamic Arrays
447Languages like Python (\`list\`), Java (\`ArrayList\`), and C++ (\`std::vector\`) provide arrays that resize automatically:
448- They start with an initial capacity (e.g. 4 or 8 slots)
449- When the array is full and a new element is appended, a **new block of double the size** is allocated, all existing elements are copied over, and the old block is freed
450- This makes single append operations **O(1) amortized** — most appends are instant, but occasionally one triggers an O(n) resize
451- The trade-off is ~25–50% unused memory overhead at any given time
452
453### Multi-Dimensional Arrays
454Arrays can extend to 3D, 4D, and beyond. A 3D array can represent volumetric data (e.g. CT scans), and higher dimensions are common in machine learning tensors.`},{title:"Common Operations & Time Complexity",body:`| Operation | Time Complexity | Explanation |
455|---|---|---|
456| **Access by index** | O(1) | Direct address calculation via pointer arithmetic |
457| **Update at index** | O(1) | Same address calculation, just overwrite the value |
458| **Search (unsorted)** | O(n) | Must scan each element sequentially (linear search) |
459| **Search (sorted)** | O(log n) | Binary search — halve the search space each step |
460| **Insert at end** | O(1) amortized | Append directly; occasional resize costs O(n) |
461| **Insert at beginning** | O(n) | Every existing element must shift right by one position |
462| **Insert at middle** | O(n) | Elements after the insertion point must shift right |
463| **Delete at index** | O(n) | Elements after the deletion point must shift left to fill the gap |
464| **Delete at end** | O(1) | Simply reduce the logical size; no shifting needed |
465
466**Why is insertion/deletion slow?** Arrays guarantee contiguous storage. If you insert an element at index 2 in a 5-element array, elements at indices 2, 3, and 4 must each move one position to the right to make room. This shifting costs O(n) in the worst case.`},{title:"Advantages & Disadvantages",body:`### ✅ Advantages
467- **O(1) Random Access**: Retrieve any element instantly by index — the defining strength of arrays
468- **Cache Friendly**: Contiguous memory layout means CPU cache lines load multiple elements at once, making sequential operations very fast in practice
469- **Memory Efficient**: No extra overhead per element (unlike linked lists which store pointers alongside data)
470- **Simple & Predictable**: Easy to implement, reason about, and debug
471- **Foundation for Other Structures**: Stacks, queues, heaps, hash tables, and even strings are typically built on top of arrays
472
473### ❌ Disadvantages
474- **Fixed Size** (static arrays): Size must be known at compile time and cannot change
475- **Costly Insertions/Deletions**: Adding or removing elements from the middle requires shifting, which is O(n)
476- **Wasted Memory**: If you allocate more space than needed, the unused slots are wasted; if you allocate less, you need a costly resize
477- **Single Data Type**: In statically-typed languages, all elements must be the same type`},{title:"Real-World Applications",body:`Arrays are ubiquitous in software engineering:
478
479- **Storing & Processing Collections**: Lists of users, product catalogs, sensor readings, pixel data in images
480- **Lookup Tables**: Pre-computed results stored in an array for O(1) retrieval (e.g. ASCII character mappings, trigonometric tables)
481- **Implementing Other Data Structures**: Stacks (push/pop at end), Queues (circular buffer), Heaps (binary heap stored level-by-level), Hash Tables (array of buckets)
482- **Sorting & Searching**: Most sorting algorithms (merge sort, quick sort, heap sort) operate on arrays; binary search requires sorted arrays
483- **Matrix Operations**: Linear algebra, computer graphics (transformation matrices), image processing (2D pixel arrays)
484- **Buffers & Streams**: Network packet buffers, audio/video frame buffers, I/O ring buffers
485- **Dynamic Programming**: DP tables are almost always implemented as 1D or 2D arrays storing subproblem solutions`}],complexity:{time:"O(1) access, O(n) search",space:"O(n)"},codeExamples:[{title:"Array Operations (Python)",language:"python",code:`# Array operations
486arr = [10, 20, 30, 40]
487
488arr.append(50)       # Add to end - O(1)
489arr.insert(1, 15)    # Insert at index 1 - O(n)
490val = arr[2]         # Access element - O(1)
491arr.pop()            # Remove from end - O(1)`},{title:"Array Operations (JavaScript)",language:"javascript",code:`// Array operations
492const arr = [10, 20, 30, 40];
493
494arr.push(50);        // Add to end - O(1)
495arr.splice(1, 0, 15);// Insert at index 1 - O(n)
496const val = arr[2];  // Access element - O(1)
497arr.pop();           // Remove from end - O(1)`},{title:"Array Operations (C++)",language:"cpp",code:`#include <vector>
498
499std::vector<int> arr = {10, 20, 30, 40};
500
501arr.push_back(50);                   // Add to end - O(1)
502arr.insert(arr.begin() + 1, 15);     // Insert at index 1 - O(n)
503int val = arr[2];                    // Access element - O(1)
504arr.pop_back();                      // Remove from end - O(1)`},{title:"Array Operations (Java)",language:"java",code:`import java.util.ArrayList;
505
506ArrayList<Integer> arr = new ArrayList<>();
507arr.add(10); arr.add(20); arr.add(30);
508
509arr.add(40);        // Add to end - O(1)
510arr.add(1, 15);     // Insert at index 1 - O(n)
511int val = arr.get(2); // Access element - O(1)
512arr.remove(arr.size() - 1); // Remove from end - O(1)`}],relatedTopics:["ds-linked-lists","searching-algorithms"]}},{id:"ds-linked-lists",title:"Linked Lists",description:"Dynamic data structure with nodes and pointers",color:"#bd93f9",icon:"Link",content:{overview:"A **Linked List** is a linear data structure in which elements are stored as individual **nodes** scattered throughout memory, rather than 
512in a contiguous block. Each node contains two parts: the **data** it holds and a **pointer (reference)** to the next node in the sequence. The first node is called the **head**, and the last node's pointer is set to **null** (indicating the end of the list). Unlike arrays, linked lists do not require a pre-allocated block of memory — nodes are created dynamically on the heap, making linked lists inherently **dynamic** in size. This design makes insertions and deletions extremely efficient when performed at known positions, since no element shifting is needed.",keyPoints:["Each node stores data alongside a pointer/reference to the next node — this pointer-based linkage is the defining characteristic","Dynamic size — nodes are allocated individually on the heap, so the list grows and shrinks on demand without costly resizing","No random access — to reach the k-th element, you must traverse k nodes starting from the head, making access O(n)","Insertion and deletion at the head (or at a known node reference) takes O(1) time since only pointer reassignment is needed","Uses more memory per element than arrays because each node stores an additional pointer (8 bytes on 64-bit systems)","Poor cache locality — nodes are scattered in memory, so sequential traversal triggers frequent cache misses compared to arrays"],sections:[{title:"How Linked Lists Work in Memory",body:"Unlike arrays where elements occupy a contiguous block of memory, linked list nodes can reside **anywhere in the heap**. The nodes are connected purely through pointer references stored within each node.\n\n**Key Observations:**\n- **Non-Sequential RAM Addresses**: Addresses (such as `0x108`, `0x2F8`, `0x50C`) are non-contiguous. The OS allocates memory wherever free heap blocks exist.\n- **Pointer Chaining**: The only way to reach Node $k$ is to start at the **Head** pointer and sequentially follow the chain of `next` memory pointers.\n- **Dynamic Allocation**: Adding a new node simply allocates a new node on the heap and re-links 1–2 pointers — **zero element shifting required**!\n- **Memory Overhead**: Each node requires extra memory to store pointer references (8 bytes on 64-bit platforms per pointer)."},{title:"Types of Linked Lists",body:`### 1. Singly Linked List
513The most basic form. Each node has a \`next\` pointer only. You can traverse the list in one direction — forward.
514
515**Use when:** You only need forward traversal and want minimal memory overhead per node.
516
517### 2. Doubly Linked List
518Each node has **two pointers**: \`prev\` (pointing to the previous node) and \`next\` (pointing to the next node). This enables traversal in both directions.
519
520**Use when:** You need backward traversal, or need to delete a node given only a reference to it (without knowing its predecessor). Python's \`collections.deque\` and Java's \`LinkedList\` are doubly linked.
521
522### 3. Circular Linked List
523The last node's \`next\` pointer links back to the head, forming a closed loop. Can be singly or doubly linked.
524
525**Use when:** You need to cycle through elements endlessly (e.g. round-robin scheduling, circular buffers, multiplayer game turn order).`},{title:"Linked List Operations (Insertion & Deletion)",body:`Manipulating a linked list centers around **pointer reassignment**. Understanding how pointers are created and unlinked is essential for solving DSA problems cleanly without lost references or memory leaks.
526
527---
528
529### 1. Insertion Operations
530
531#### A. Insertion at Head — $O(1)$ Time
532Inserting at the head is instantaneous because it does not depend on list size:
5331. **Allocate** a new node in memory: \`new_node = Node(val)\`.
5342. **Connect**: Set \`new_node.next = head\` (point new node to current head).
5353. **Update Head**: Set \`head = new_node\` (reassign head pointer).
536
537#### B. Insertion in the Middle — $O(n)$ Time
538To insert after a target node (e.g., node $A$):
5391. **Traverse**: Walk to predecessor node $A$.
5402. **Connect New Node**: Set \`new_node.next = A.next\` (new node points to node $B$).
5413. **Update Predecessor**: Set \`A.next = new_node\` (node $A$ now points to new node).
542> **Critical Order**: Always set \`new_node.next\` *before* overwriting \`A.next\`, otherwise the reference to node $B$ is lost!
543
544#### C. Insertion at Tail — $O(n)$ Time (or $O(1)$ with Tail pointer)
5451. **Traverse**: Walk to the last node (where \`curr.next == NULL\`).
5462. **Connect**: Set \`curr.next = new_node\`.
5473. **Terminate**: Set \`new_node.next = NULL\`.
548
549---
550
551### 2. Deletion Operations
552
553#### A. Deletion at Head — $O(1)$ Time
5541. **Save Reference**: \`temp = head\`.
5552. **Advance Head**: \`head = head.next\`.
5563. **Deallocate**: Free memory of \`temp\`.
557
558#### B. Deletion in Middle — $O(n)$ Time
559To delete node $B$ sitting between $A$ and $C$:
5601. **Locate Predecessor**: Find node $A$ preceding target node $B$.
5612. **Bypass Target**: Set \`A.next = B.next\` (node $A$ directly references node $C$).
5623. **Deallocate**: Free memory of node $B$.
563
564#### C. Deletion at Tail — $O(n)$ Time
5651. **Traverse to Predecessor**: Find second-to-last node where \`curr.next.next == NULL\`.
5662. **Deallocate**: Free \`curr.next\` (the old tail).
5673. **Update Tail**: Set \`curr.next = NULL\`.`},{title:"Common Operations & Time Complexity",body:`| Operation | Singly | Doubly | Notes |
568|---|---|---|---|
569| **Access by index** | O(n) | O(n) | Must traverse from head (or tail in doubly) |
570| **Search** | O(n) | O(n) | Must check each node sequentially |
571| **Insert at head** | O(1) | O(1) | Create node, point it to current head, update head |
572| **Insert at tail** | O(n)* | O(1)** | *O(1) if you maintain a tail pointer |
573| **Insert after a given node** | O(1) | O(1) | Just redirect pointers — no shifting |
574| **Delete head** | O(1) | O(1) | Update head to head.next |
575| **Delete a specific node** | O(n)*** | O(1) | ***Need to find the predecessor first in singly linked |
576| **Get length** | O(n) | O(n) | Must traverse entire list (unless you maintain a counter) |
577
578**Why are insertions/deletions fast?** In a linked list, inserting or removing a node only requires updating 1–2 pointer values. No other elements move. Compare this to an array where inserting at position \`k\` forces all elements after \`k\` to shift.`},{title:"Array vs Linked List",body:`| Feature | Array | Linked List |
579|---|---|---|
580| **Memory layout** | Contiguous block | Scattered nodes linked by pointers |
581| **Access time** | O(1) random access | O(n) sequential traversal |
582| **Insert/Delete at head** | O(n) — must shift all elements | O(1) — just update pointers |
583| **Insert/Delete at middle** | O(n) — must shift elements | O(1) if node reference is known |
584| **Memory per element** | Just the data | Data + pointer(s) — higher overhead |
585| **Cache performance** | Excellent — spatial locality | Poor — pointer chasing causes cache misses |
586| **Size flexibility** | Fixed (static) or costly resize | Grows/shrinks dynamically without waste |
587| **Memory allocation** | One large block upfront | Small allocations on demand |
588
589**When to choose Linked Lists over Arrays:**
590- Frequent insertions/deletions at the beginning or middle of the collection
591- Unknown or highly variable data size
592- No need for random access by index
593- Implementing structures like stacks, queues, or LRU caches
594
595**When to choose Arrays:**
596- Frequent random access by index
597- Known, relatively stable data size
598- Need for cache-efficient sequential processing`},{title:"Real-World Applications",body:`Linked lists power many critical systems:
599
600- **Undo/Redo Functionality**: Text editors and design tools use doubly linked lists — each node represents a state; moving backward is "undo", forward is "redo"
601- **Browser History**: Back and forward navigation uses a doubly linked list of visited pages
602- **Music Player Playlists**: Songs linked in sequence; circular linked lists enable "repeat all" and easy next/previous navigation
603- **Operating System Process Scheduling**: The OS maintains linked lists of processes in ready, waiting, and running states
604- **Memory Allocation**: The OS free-list tracks available memory blocks as a linked list of variable-sized chunks
605- **Hash Table Chaining**: When multiple keys hash to the same bucket, collisions are resolved by chaining entries in a linked list
606- **Polynomial Representation**: Each term (coefficient + exponent) is a node, making polynomial arithmetic straightforward
607- **Graph Adjacency Lists**: Each vertex stores a linked list of its neighboring vertices`}],complexity:{time:"O(1) insert/delete at head, O(n) search",space:"O(n)"},codeExamples:[{title:"Linked List (Python)",language:"python",code:`class Node:
608    def __init__(self, data):
609        self.data = data
610        self.next = None
611
612head = Node(10)
613head.next = Node(20)
614head.next.next = Node(30)`},{title:"Linked List (JavaScript)",language:"javascript",code:`class Node {
615  constructor(data) {
616    this.data = data;
617    this.next = null;
618  }
619}
620
621const head = new Node(10);
622head.next = new Node(20);
623head.next.next = new Node(30);`},{title:"Linked List (C++)",language:"cpp",code:`struct Node {
624    int data;
625    Node* next;
626    Node(int val) : data(val), next(nullptr) {}
627};
628
629Node* head = new Node(10);
630head->next = new Node(20);
631head->next->next = new Node(30);`},{title:"Linked List (Java)",language:"java",code:`class Node {
632    int data;
633    Node next;
634    Node(int data) {
635        this.data = data;
636        this.next = null;
637    }
638}
639
640Node head = new Node(10);
641head.next = new Node(20);
642head.next.next = new Node(30);`}],relatedTopics:["ds-arrays","ds-stacks"]}},{id:"ds-stacks",title:"Stacks",description:"Last-In-First-Out (LIFO) data structure",color:"#bd93f9",icon:"Layers",content:{overview:"A **Stack** is a linear data structure that follows the **LIFO (Last In, First Out)** principle — the most recently added element is the first one to be removed. Think of a stack of plates in a cafeteria: you always add new plates on top and remove from the top. You never pull a plate from the middle or bottom. This restricted access pattern may seem limiting, but it is precisely this constraint that makes stacks incredibly powerful for problems involving **nesting, recursion, backtracking, and reversal**. Stacks are one of the most fundamental data structures in computing — every program you run relies on a stack (the call stack) to manage function execution.",keyPoints:["LIFO principle — the last element pushed is the first element popped; access is restricted to one end only (the 'top')","Core operations (push, pop, peek) all execute in O(1) constant time — no searching or shifting involved","Can be implemented using either arrays (most common, cache-friendly) or linked lists (no capacity limit)","Every running program uses an implicit call stack to manage function calls, local variables, and return addresses","Essential for solving recursion, expression parsing, backtracking, undo systems, and depth-first search algorithms","Stack overflow occurs when too many items are pushed (e.g. infinite recursion exceeding the call stack limit)"],sections:[{title:"How a Stack Works",body:`A stack supports operations at only one end — the **top**. There is no concept of accessing elements in the middle or at the bottom.
643
644The key insight is that **push** and **pop** both operate at the top, which means they never need to shift, search, or traverse — each operation is a single O(1) step.`},{title:"Stack Operations",body:`| Operation | Description | Time Complexity |
645|---|---|---|
646| **push(item)** | Add an item to the top of the stack | O(1) |
647| **pop()** | Remove and return the top item; raises error if empty | O(1) |
648| **peek() / top()** | Return the top item without removing it | O(1) |
649| **isEmpty()** | Return True if the stack has no elements | O(1) |
650| **size()** | Return the number of elements currently in the stack | O(1) |
651
652**Important:** Stacks do **not** support searching, indexing, or iterating by design. If you need to search for an element, you would need to pop elements one by one (destroying the stack) or use a different data structure.`},{title:"Implementation: Array vs Linked List",body:'### Array-Based Stack (Most Common)\nUse the end of a dynamic array as the "top". `push` appends to the end, `pop` removes from the end — both O(1).\n\n**Pros:** Cache-friendly, no pointer overhead, simple implementation\n**Cons:** May need to resize the underlying array (amortized O(1) but occasional O(n) copy)\n\n### Linked List-Based Stack\nUse the head of a singly linked list as the "top". `push` inserts at the head, `pop` removes the head — both O(1).\n\n**Pros:** No capacity limit, no resizing ever needed\n**Cons:** Extra memory per element (pointer storage), poor cache locality\n\nIn practice, **array-based stacks are preferred** for most use cases due to better cache performance and lower memory overhead. Python\'s built-in `list` serves as an excellent stack: `append()` for push, `pop()` for pop.'},{title:"The Call Stack — How Your Programs Run",body:`Every time a function is called, the runtime pushes a **stack frame** onto the **call stack**. This frame contains:
653- The function's **local variables**
654- The **return address** (where to resume after the function finishes)
655- The **parameters** passed to the function
656
657\`\`\`python
658def a():
659    x = 1
660    b()        # Push frame for b()
661    print(x)   # Resume here after b() returns
662
663def b():
664    y = 2
665    c()        # Push frame for c()
666
667def c():
668    z = 3      # Top of call stack
669               # When c() returns, its frame is popped
670\`\`\`
671
672**Stack Overflow** occurs when the call stack exceeds its size limit — most commonly caused by infinite or excessively deep recursion. Python's default recursion limit is 1,000 frames.`},{title:"Real-World Applications",body:`Stacks appear everywhere in computing:
673
674- **Function Call Management**: Every programming language uses a call stack to track function execution, local variables, and return addresses
675- **Undo/Redo Systems**: Text editors push each action onto an undo stack; clicking "Undo" pops the last action and pushes it onto a redo stack
676- **Browser Navigation**: The back button pops from the history stack; forward pushes pages onto a forward stack
677- **Expression Evaluation**: Compilers use stacks to convert infix expressions (\`3 + 4 * 2\`) to postfix (\`3 4 2 * +\`) and then evaluate them
678- **Balanced Parentheses Checking**: Push opening brackets onto a stack; when a closing bracket appears, pop and verify it matches — a classic interview problem
679- **Depth-First Search (DFS)**: DFS in graphs and trees uses a stack (ex
679plicitly or via recursion) to explore branches before backtracking
680- **Syntax Parsing**: Compilers and interpreters parse programming language syntax using stack-based automata
681- **Memory Allocation**: The runtime stack allocates and deallocates local variables automatically as functions are called and return
682- **Reversing Data**: Push all elements onto a stack, then pop them off — they come out in reverse order`}],complexity:{time:"O(1) for all operations",space:"O(n)"},codeExamples:[{title:"Stack (Python)",language:"python",code:`stack = []
683stack.append(10)  # Push - O(1)
684stack.append(20)
685top = stack[-1]   # Peek - O(1)
686val = stack.pop() # Pop  - O(1)`},{title:"Stack (JavaScript)",language:"javascript",code:`const stack = [];
687stack.push(10);   // Push - O(1)
688stack.push(20);
689const top = stack[stack.length - 1]; // Peek - O(1)
690const val = stack.pop(); // Pop  - O(1)`},{title:"Stack (C++)",language:"cpp",code:`#include <stack>
691
692std::stack<int> st;
693st.push(10);      // Push - O(1)
694st.push(20);
695int top = st.top(); // Peek - O(1)
696st.pop();         // Pop  - O(1)`},{title:"Stack (Java)",language:"java",code:`import java.util.Stack;
697
698Stack<Integer> st = new Stack<>();
699st.push(10);      // Push - O(1)
700st.push(20);
701int top = st.peek(); // Peek - O(1)
702int val = st.pop(); // Pop  - O(1)`}],relatedTopics:["ds-queues","ds-linked-lists"]}},{id:"ds-queues",title:"Queues",description:"First-In-First-Out (FIFO) data structure",color:"#bd93f9",icon:"ArrowRightLeft",content:{overview:"A **Queue** is a linear data structure that follows the **FIFO (First In, First Out)** principle — the first element added is the first one to be removed. Think of a queue at a ticket counter or a line at a grocery store: the person who arrives first gets served first. Elements are always added at the **rear** (back) and removed from the **front**. This two-ended access pattern makes queues fundamentally different from stacks (which operate at one end only). Queues are essential in computing for managing tasks that must be processed in the order they arrive — from CPU scheduling to network packet handling to breadth-first search in graphs.",keyPoints:["FIFO principle — elements are processed in the exact order they were added; first in, first out","Two-ended access: enqueue (add) always happens at the rear, dequeue (remove) always happens at the front","All core operations (enqueue, dequeue, peek) run in O(1) time when properly implemented","Variants include Circular Queue (space-efficient), Priority Queue (order by priority), and Deque (double-ended)","Queues are the backbone of BFS traversal, CPU/disk/print scheduling, and producer-consumer patterns","Can be implemented using linked lists (natural fit) or circular arrays (cache-friendly, fixed capacity)"],sections:[{title:"How a Queue Works",body:`A queue maintains two pointers: **front** (where elements are removed) and **rear** (where elements are added).
703
704The fundamental invariant: **elements exit in the same order they entered**. There is no way to skip ahead or access elements in the middle.`},{title:"Queue Operations",body:"| Operation | Description | Time Complexity |\n|---|---|---|\n| **enqueue(item)** | Add an item to the rear of the queue | O(1) |\n| **dequeue()** | Remove and return the front item; raises error if empty | O(1) |\n| **front() / peek()** | View the front item without removing it | O(1) |\n| **isEmpty()** | Return True if the queue has no elements | O(1) |\n| **size()** | Return the number of elements currently in the queue | O(1) |\n\n**Implementation Note:** Using a plain Python `list` for a queue is inefficient — `list.pop(0)` is O(n) because all elements must shift left. Use `collections.deque` instead, which provides O(1) `popleft()`."},{title:"Types of Queues",body:`### 1. Simple Queue (Linear Queue)
705Standard FIFO behavior. Items enter at the rear and leave from the front. The simplest form, but in array-based implementations, dequeued slots can become wasted space.
706\`\`\`
707Front → [A] → [B] → [C] → [D] ← Rear
708\`\`\`
709
710### 2. Circular Queue (Ring Buffer)
711The last position wraps around and connects to the first position, forming a circle. This **eliminates wasted space** in array-based queues — when the rear reaches the end of the array, it wraps to the beginning if there are empty slots.
712\`\`\`
713    ┌──[D]──[E]──┐
714    │             │
715   [C]          [F]
716    │             │
717    └──[B]──[A]──┘
718    Front↑    ↑Rear
719\`\`\`
720**Use when:** Fixed-size buffers are needed (e.g. audio streaming, circular logs, network packet buffers).
721
722### 3. Priority Queue
723Elements are dequeued not by arrival order, but by **priority**. The highest (or lowest) priority element is always served first. Internally implemented using a **binary heap**, not a simple array.
724
725**Use when:** Task scheduling (higher priority tasks first), Dijkstra's shortest path algorithm, Huffman encoding, event-driven simulation.
726
727### 4. Double-Ended Queue (Deque)
728Elements can be added or removed from **both** the front and the rear. It combines the capabilities of both stacks and queues.
729\`\`\`
730[Front] ⇄ A ⇄ B ⇄ C ⇄ D ⇄ [Rear]
731\`\`\`
732**Use when:** You need both FIFO and LIFO behavior (e.g. sliding window problems, palindrome checking, work-stealing algorithms).`},{title:"Implementation: Array vs Linked List",body:"### Array-Based (Circular Array)\nUse a fixed-size array with `front` and `rear` indices that wrap around using modulo arithmetic:\n- `enqueue`: Place item at `rear`, then `rear = (rear + 1) % capacity`\n- `dequeue`: Return item at `front`, then `front = (front + 1) % capacity`\n\n**Pros:** Cache-friendly, no pointer overhead, predictable memory usage\n**Cons:** Fixed capacity — must know the maximum size in advance (or resize)\n\n### Linked List-Based\nUse a singly linked list with a `head` (front) and `tail` (rear) pointer:\n- `enqueue`: Create a new node, link it after `tail`, update `tail`\n- `dequeue`: Return `head` data, advance `head` to `head.next`\n\n**Pros:** Dynamic size, no capacity limit, no wasted space\n**Cons:** Extra memory per element (pointer), poor cache locality\n\n**Python's Best Practice:** Use `collections.deque` — it's implemented as a doubly linked list of fixed-size blocks, giving O(1) operations on both ends with good cache behavior."},{title:"Stack vs Queue",body:`| Feature | Stack (LIFO) | Queue (FIFO) |
733|---|---|---|
734| **Access pattern** | One end (top) | Two ends (front and rear) |
735| **Add** | push → top | enqueue → rear |
736| **Remove** | pop ← top | dequeue ← front |
737| **Order** | Last in, first out | First in, first out |
738| **Use case** | Backtracking, DFS, undo | Scheduling, BFS, buffering |
739| **Analogy** | Stack of plates | Line at a counter |
740
741Both are **restricted-access** data structures — you cannot access arbitrary elements. This constraint is what makes them useful: they enforce a specific processing order.`},{title:"Real-World Applications",body:`Queues are everywhere in systems that need fair, ordered processing:
742
743- **CPU Scheduling**: The OS maintains a ready queue of processes waiting for CPU time — each process gets its turn in order (Round Robin scheduling)
744- **Breadth-First Search (BFS)**: BFS uses a queue to explore graph nodes level by level — essential for finding shortest paths in unweighted graphs
745- **Print Spooling**: Print jobs are queued in order; the first document sent prints first
746- **Web Server Request Handling**: Incoming HTTP requests are queued and processed in order by worker threads
747- **Message Queues**: Systems like RabbitMQ and Kafka use queues to decouple producers and consumers in distributed systems
748- **Keyboard Buffer**: Keystrokes are stored in a queue so they're processed in the order typed, even if the CPU is briefly busy
749- **Streaming Buffers**: Audio and video players use circular queues to buffer data, ensuring smooth playback despite network jitter
750- **Asynchronous Task Processing**: Background job systems (Celery, Sidekiq) queue tasks for asynchronous execution`}
750],complexity:{time:"O(1) for all operations",space:"O(n)"},codeExamples:[{title:"Queue (Python)",language:"python",code:`from collections import deque
751
752q = deque()
753q.append(10)       # Enqueue - O(1)
754q.append(20)
755front = q[0]       # Peek    - O(1)
756val = q.popleft()  # Dequeue - O(1)`},{title:"Queue (JavaScript)",language:"javascript",code:`const queue = [];
757queue.push(10);    // Enqueue - O(1)
758queue.push(20);
759const front = queue[0];  // Peek    - O(1)
760const val = queue.shift(); // Dequeue - O(n)`},{title:"Queue (C++)",language:"cpp",code:`#include <queue>
761
762std::queue<int> q;
763q.push(10);       // Enqueue - O(1)
764q.push(20);
765int front = q.front(); // Peek    - O(1)
766q.pop();          // Dequeue - O(1)`},{title:"Queue (Java)",language:"java",code:`import java.util.LinkedList;
767import java.util.Queue;
768
769Queue<Integer> q = new LinkedList<>();
770q.add(10);        // Enqueue - O(1)
771q.add(20);
772int front = q.peek();  // Peek    - O(1)
773int val = q.poll(); // Dequeue - O(1)`}],relatedTopics:["ds-stacks","tree-bfs-dfs"]}},{id:"ds-hash-tables",title:"Hash Tables",description:"Key-value storage with O(1) average lookup",color:"#bd93f9",icon:"Hash",content:{overview:"A **Hash Table** (also called Hash Map or Dictionary) is a data structure that stores **key-value pairs**. It uses a **hash function** to translate keys into array indices, allowing for **O(1) average time** key access, insertion, and deletion. By mapping keys directly to specific RAM bins, it shatters the linear searching search time completely.",keyPoints:["Transforms arbitrary keys into deterministic array indices in O(1) time","Shifts query performance from O(N) linear search to O(1) direct offset access","Employs defense tactics like Separate Chaining or Linear Probing to handle collisions","Relies on Load Factor resizing under the hood to maintain constant-time lookup","Forms the backbone of Python's dict/set and Java's HashMap/HashSet"],sections:[{title:"Why Hash Tables? The Search Bottleneck",body:`Imagine a library with 1,000,000 unorganized books. If a user asks, "Do you have the book 'Dune'?", the librarian must walk the aisles and physically read the title of every single book until they find it or reach the absolute end of the library. This is the **linear search curse** — if you don't know where it is, you must look everywhere.
774
775Searching for the existence of an item inside an Array or a Linked List takes mathematical **O(N)** time. If you need to search for **M** items against an array of **N** elements, the overall check becomes **O(N × M)**. 
776
777Hash Tables solve this search bottleneck by converting a key directly into an index, bypassing the need to traverse the elements.`},{title:"How Hashing Works",body:`Under the hood, RAM (Random Access Memory) allows **absolute instant access** to any single memory address in $\\approx 1$ nanosecond. If we know the exact Array Index where a value is stored, the search time drops from $O(N)$ down to $O(1)$.
778
779### What is a Hash Function?
780A **Hash Function** $f(\\text{key}) \\rightarrow \\text{index}$ is a deterministic mathematical formula that transforms arbitrary keys (strings, objects, numbers) into valid array indices within the range $[0, \\text{size} - 1]$.
781
782**Core Properties of a Hash Function:**
7831. **Deterministic**: The same input key MUST always yield the exact same index output.
7842. **Fast Computation**: Calculating $f(\\text{key})$ must run in $O(1)$ constant time.
7853. **Uniform Distribution**: Keys should be evenly distributed across all available array buckets to minimize collisions.
7864. **Range Bounded**: The output index must always fall within $0 \\le \\text{index} < \\text{size}$.
787
788---
789
790### The Simple Hash Function (ASCII Sum Modulo N)
791The simplest way to hash a string is to sum the **ASCII values** of all its characters and take the remainder modulo array capacity ($N$):
792
793$$f(\\text{key}) = \\left( \\sum_{i=0}^{L-1} \\text{ord}(\\text{key}[i]) \\right) \\pmod N$$
794
795#### Step-by-Step Worked Example:
796Suppose our hash table has $N = 6$ buckets, and we want to insert the key \`"ALEX"\`:
797
798| Character | ASCII Code (\`ord\`) |
799|---|---|
800| \`'A'\` | 65 |
801| \`'L'\` | 76 |
802| \`'E'\` | 69 |
803| \`'X'\` | 88 |
804
8051. **Calculate ASCII Sum**:  
806   $$\\text{Sum} = 65 + 76 + 69 + 88 = 298$$
807
8082. **Apply Modulo Operation**:  
809   $$\\text{Index} = 298 \\pmod 6 = 4$$
810
811Thus, \`"ALEX"\` is placed in **Bucket [4]**.
812
813---
814
815\`\`\`python
816# Simple string hashing modulo capacity
817def simple_hash(key: str, size: int) -> int:
818    """Calculates the sum of character ASCII values modulo array size."""
819    ascii_sum = sum(ord(char) for char in str(key))
820    return ascii_sum % size
821
822# Example execution:
823print(simple_hash("ALEX", 6))  # Output: 4 (65 + 76 + 69 + 88 = 298 % 6 = 4)
824print(simple_hash("SARA", 6))  # Output: 1 (83 + 65 + 82 + 65 = 295 % 6 = 1)
825\`\`\`
826
827---
828
829### Limitations of Simple Sum Hashing
830While intuitive, simple ASCII sum hashing has a major vulnerability: **Permutations and Anagrams produce identical sums**.
831- \`"ALEX"\` $\\rightarrow 65 + 76 + 69 + 88 = 298 \\pmod 6 = \\mathbf{4}$
832- \`"XELA"\` $\\rightarrow 88 + 69 + 76 + 65 = 298 \\pmod 6 = \\mathbf{4}$
833- \`"LEAX"\` $\\rightarrow 76 + 69 + 65 + 88 = 298 \\pmod 6 = \\mathbf{4}$
834
835Because simple sum ignores character position, anagrams will **always collide**! 
836
837To fix this, real-world hash functions (like **DJB2** or Java's \`String.hashCode()\`) use **polynomial rolling hashes** that incorporate positional multipliers (e.g. $h = h \\times 31 + \\text{ord}
837(c)$), ensuring character order changes the final hash value dramatically.`},{title:"Collision Handling",body:`When two distinct keys hash to the same index, we have a **collision** (e.g., anagrams like \`"ALEX"\` and \`"XELA"\` which have the same ASCII values). Because a memory slot can only store one key-value pair, we must resolve this conflict.
838
839Two primary strategies are used:
840
841### 1. Separate Chaining (Linked Lists)
842Each bin in the memory array stores a pointer to a **Linked List**. When a collision occurs, the new key-value pair is appended to the linked list starting at that index.
843- **Pros**: Easy to implement; bucket capacity is dynamic.
844- **Cons**: Requires extra memory overhead for node pointers; pointer chasing degrades cache performance.
845
846### 2. Linear Probing (Open Addressing)
847If the primary slot is already occupied, we check the next adjacent slots sequentially (\`index + 1, index + 2, ...\`) until an empty slot is found in the array.
848- **Pros**: Data remains contiguous in memory; excellent cache performance; no extra pointer memory.
849- **Cons**: Can lead to **clustering** (long contiguous runs of occupied slots), which degrades search performance back to $O(N)$.`},{title:"Hash Map vs Hash Set: The Lookup Protocols",body:`Modern programming languages abstract away the buckets and chaining entirely. You strictly interact with Hash Maps (Dictionaries) or Hash Sets out-of-the-box.
850
851### 1. The Hash Map (Dictionary)
852Stores a **Key &rarr; Value** mapping. Perfect for tracking frequencies, caching data, or building lookup tables linking User IDs to Profiles.
853
854### 2. The Hash Set
855Stores entirely distinct **Keys** with no values. Perfect for tracking "Visited" nodes in a Graph or rapidly clearing duplicates out of an array.`},{title:"Common Traps: Collision Overload & Mutability",body:"### 1. Trap: Performance Degradation & Load Factors\nHash Tables boast $O(1)$ lookup time, but this is an **Amortized Average**. If a poor Hash Function maps all keys directly into a single array bin, the structure degrades into a Linked List. Any lookup inside that bucket costs $O(N)$. \n\nModern languages prevent this by dynamically resizing the array under the hood (rehashing all elements into a double-sized array) when the **Load Factor** (Items / Capacity) exceeds **75%**.\n\n### 2. Trap: The Mutable Hash Key Array\nA Hash Function calculates the target slot based on the raw intrinsic data of the object. **You cannot use mutable objects (like lists or arrays) as Keys.** \n\nIf you hash an array `[1, 2]`, store data against it, and then mutate the array to `[1, 2, 3]`, its Hash Signature changes. The Map will search in a completely different bin and return a `KeyError`.\n\n*   **Correct**: `hash_map[(1, 2)] = True` (Tuples are immutable and perfectly hashable)\n*   **Incorrect**: `hash_map[[1, 2]] = True` (Throws `TypeError: unhashable type: 'list'`)"},{title:"Omnipotent Map: When to Use & Coding Strategies",body:`The Hash Map (and Hash Set) is the single most widely used data structure in software engineering. It is the ultimate tool for turning $O(N^2)$ brute forces into $O(N)$ linear passes by establishing instant historical lookup. 
856
857### 1. The Complement Strategy (Two-Sum)
858Instead of looping twice through an array to find if two numbers add up to a Target, you loop once:
859- Take the current number \`val\`. 
860- Calculate the exact \`Complement = Target - val\`. 
861- Ask the Hash Map in $O(1)$ if it has already seen the \`Complement\`. 
862
863### 2. The Frequency Fingerprint (Anagrams / Majority Element)
864To check if two massive strings are Anagrams, dump String A into a Hash Map, counting the frequencies of each letter. Loop across String B and decrement the Hash Map keys. If all frequencies cleanly hit \`0\`, they are perfect anagrams.
865
866### 3. Memoization & Caching (Dynamic Programming)
867If a Recursive function calculates the same inputs multiple times (like Fibonacci), it causes an exponential $O(2^N)$ time explosion. Before computing a recursive call, check if the input exists in your Hash Map. If it does, return the cached value instantly in $O(1)$.`}],complexity:{time:"O(1) average, O(n) worst case",space:"O(n)"},codeExamples:[{title:"Hash Table (Python)",language:"python",code:`# Hash Map / Dictionary
868map_data = {}
869map_data["alice"] = 95 # Insert - O(1)
870map_data["bob"] = 88
871
872score = map_data.get("alice") # Lookup - O(1)
873del map_data["bob"]          # Delete - O(1)`},{title:"Hash Table (JavaScript)",language:"javascript",code:`// Hash Map / Object / Map
874const mapData = new Map();
875mapData.set("alice", 95); // Insert - O(1)
876mapData.set("bob", 88);
877
878const score = mapData.get("alice"); // Lookup - O(1)
879mapData.delete("bob");             // Delete - O(1)`},{title:"Hash Table (C++)",language:"cpp",code:`#include <unordered_map>
880#include <string>
881
882std::unordered_map<std::string, int> mapData;
883mapData["alice"] = 95; // Insert - O(1)
884mapData["bob"] = 88;
885
886int score = mapData["alice"]; // Lookup - O(1)
887mapData.erase("bob");         // Delete - O(1)`},{title:"Hash Table (Java)",language:"java",code:`import java.util.HashMap;
888
889HashMap<String, Integer> mapData = new HashMap<>();
890mapData.put("alice", 95); // Insert - O(1)
891mapData.put("bob", 88);
892
893int score = mapData.get("alice"); // Lookup - O(1)
894mapData.remove("bob");            // Delete - O(1)`}],relatedTopics:["ds-arrays","searching-algorithms"]}}]},{id:"algorithm-complexity",title:"Algorithm Complexity",shortTitle:"Complexity",description:"Analyzing the efficiency of algorithms using Big O notation",color:"#f1fa8c",icon:"TrendingUp",children:[{id:"time-complexity",title:"Time Complexity",description:"How execution time grows with input size",color:"#f1fa8c",icon:"Clock",content:{overview:'**Time Complexity** is a computational metric that describes how the number of operations an algorithm performs grows as the input size increases. It does not measure actual wall-clock time (which depen
894ds on hardware, language, and OS) — instead, it quantifies the **rate of growth** of the operation count as a mathematical function of the input size `n`. Time complexity answers the critical question: *"If I double the input size, how much longer will my algorithm take?"* This abstraction allows us to compare algorithms objectively, regardless of the machine they run on.',keyPoints:["Measures the growth rate of operations as input size n increases — not the actual seconds elapsed","Always focus on the dominant term as n → ∞ (e.g. in 5n² + 3n + 7, only n² matters at scale)","Constants and lower-order terms are dropped because they become negligible for large inputs","Provides a hardware-independent way to compare algorithms — an O(n) algorithm beats O(n²) on any machine for large n","Three cases to consider: Best case (Ω), Average case (Θ), and Worst case (O) — interviews typically focus on worst case","The goal is always to minimize time complexity: replace O(n²) brute force with O(n log n) or O(n) approaches"],sections:[{title:"Visualizing Complexity Growth",body:`An algorithm's efficiency is not measured in seconds because hardware varies; instead, we measure how the **operation count** scales relative to the **input size (N)**.
895
896Using the playground above, select a value for **N** to compute the exact operations performed by each complexity class, and observe their estimated real-world execution times. 
897
898*   **Toggle scale**: Switch between **Linear** (to see the physical steepness of slow algorithms) and **Logarithmic** (to view how all classes scale symmetrically over larger inputs).
899*   **Run simulation**: Select any tab below the graph to watch a live execution trace of common algorithms, seeing exactly why their step counts match their Big-O signatures.`},{title:"The Big-O Hierarchy",body:`Here is the definitive ranking of computational complexity classes, from most efficient to least:
900
901| Notation | Name | Real-World Scaling | Typical Python Code Pattern |
902|---|---|---|---|
903| **O(1)** | Constant | Stays completely flat. Scales instantly. | Reading from array index: \`val = arr[0]\` |
904| **O(log n)** | Logarithmic | Extremely efficient. Halves search space. | Binary Search, Tree height queries. |
905| **O(n)** | Linear | Scales 1:1. Ticks up for each item. | Single loop over array: \`for x in arr:\` |
906| **O(n log n)** | Linearithmic | Excellent sorting speed. | Divide-and-conquer sorting: \`arr.sort()\` |
907| **O(n²)** | Quadratic | Slows down heavily for large N. | Nested comparison loops: \`for x in A: for y in B:\` |
908| **O(2ⁿ)** | Exponential | Impractical. Operations double per item. | Recursive Fibonacci, generating subsets. |
909| **O(n!)** | Factorial | Catastrophic. Explodes near-instantly. | Brute forcing permutations of a TSP graph. |
910
911When designing software, your primary goal is to shift your algorithms as far **up** this table as possible (e.g. replacing an $O(N^2)$ nested loop with an $O(N)$ hash-table map lookup).`},{title:"Math Rules: Calculating Big-O",body:`When analyzing code to determine its Big-O complexity, follow these four core algebraic rules:
912
913### 1. Rule of Sums (Sequential Blocks)
914If code has two independent sequential loops, you **add** their complexities:
915\`\`\`python
916# Runs in O(A + B) time
917for x in list_a: # O(A)
918    print(x)
919for y in list_b: # O(B)
920    print(y)
921\`\`\`
922
923### 2. Rule of Products (Nested Blocks)
924If code has nested loops, you **multiply** their complexities:
925\`\`\`python
926# Runs in O(N * M) time
927for x in list_n: # O(N)
928    for y in list_m: # O(M)
929        print(x, y)
930\`\`\`
931
932### 3. Drop Constants
933Big-O only measures the asymptotic rate of growth, not actual arithmetic operations. We drop constants like multiplication coefficients:
934*   $O(2N) \rightarrow O(N)$
935*   $O(3N + 5) \rightarrow O(N)$
936
937### 4. Drop Non-Dominant Terms
938As $N$ grows very large (tending to infinity), smaller terms become insignificant compared to the largest exponent. We only keep the dominant growth class:
939*   $O(N^2 + N) \rightarrow O(N^2)$
940*   $O(N \\log N + N + 100) \rightarrow O(N \\log N)$`}],relatedTopics:["space-complexity","big-o-notation"]}},{id:"space-complexity",title:"Space Complexity",description:"How memory usage grows with input size",color:"#f1fa8c",icon:"Database",content:{overview:"**Space Complexity** measures the total amount of memory an algorithm consumes as a function of the input size. It encompasses both the **input space** (memory for storing the input data) and the **auxiliary space** (extra memory the algorithm allocates during execution — temporary variables, data structures, stack frames). In practice, when we talk about space complexity, we usually focus on **auxiliary space** — the extra memory beyond what the input already occupies. Space complexity is crucial because memory is a finite resource; an algorithm that uses O(n²) space might crash on large inputs even if its time complexity is excellent.",keyPoints:["Measures how memory consumption grows as input size increases — expressed using Big-O notation, same as time complexity","Auxiliary space = extra memory allocated beyond the input itself (temporary arrays, hash maps, recursion stack frames)","In-place algorithms use O(1) auxiliary space — they modify the input directly without creating significant extra data structures","Recursive algorithms consume O(depth) stack space because each recursive call adds a frame to the call stack","Time-space trade-off: you can often make an algorithm faster by using more memory (e.g. hash tables, memoization), or save memory at the cost of speed","In interviews, always state both time AND space complexity of your solution — both matter for production systems"],sections:[{title:"Visualizing Space Complexity",body:`Algorithm space complexity measures the amount of memory allocated by an algorithm during execution relative to the input size (N).
941
942Use the playground above to see how memory scales under different growth classes and inspect the physical memory representation of each class at the bottom.
943
944*   **Toggle scale**: Switch between **Linear** and **Logarithmic** to see how space requirements scale symmetrically over larger inputs.
945*   **Select Big O tab**: Click a row in the table below to view the visual allocation structure, showing how stack frames and heap structures populate the memory blocks.`},{title:"Space Complexity Examples",body:`| Algorithm | Space Complexity | Why |
946|---|---|---|
947| Variable swap | O(1) | Uses one temp variable |
948| Array copy | O(n) | Creates new array of size n |
949| Matrix creation | O(n²) | n×n matrix |
950| Merge Sort | O(n) | Temporary arrays during merge |
951| Quick Sort | O(log n) | Recursive call stack |
952| BFS | O(n) | Queue can hold all nodes |
953| Hash Map | O(n) | Stores n key-value pairs |`},{title:"In-Place vs Out-of-Place",body:`**In-place algorithms** modify the input directly without using significant extra memory:
954- Bubble Sort, Selection Sort, Insertion Sort — O(1) extra space
955- Quick Sort — O(log n) stack space
956
957**Out-of-place algorithms** create new data structures:
958- Merge Sort — O(n) extra space for temporary arrays
959- Counting Sort — O(k) extra space where k is the range
960
961\`\`\`python
962# In-place: O(1) space
963def reverse_in_place(arr):
964    left, right = 0, len(arr) - 1
965    while left < right:
966        arr[left], arr[right] = arr[right], arr[left]
967        left += 1
968        right -= 1
969
970# Out-of-place: O(n) space
971def reverse_new(arr):
972    return arr[::-1]  # creates new array
973\`\`\``}],relatedTopics:["time-complexity","big-o-notation"]}},{id:"big-o-notation",title:"Big O Notation",description:"Mathematical notation for describing algorithm efficiency",color:"#f1fa8c",icon:"Sigma",content:{overview:'**Big O Notation** is the standard mathematical notation used across computer science to describe the **upper bound** of an algorithm\'s growth rate. It characterizes the worst-case performance of an algorithm — the maximum number of operations it will ever perform for an input of size `n`. Big O strips away constants, hardware differences, and lower
973-order terms to reveal the **fundamental scaling behavior** of an algorithm. It answers the essential question: *"As my input size grows toward infinity, how does performance scale?"* When someone says an algorithm is "O(n log n)", they mean its operation count grows proportionally to n × log(n), regardless of the specific machine or programming language.',keyPoints:["Describes the upper bound (worst case) growth rate — it guarantees the algorithm will NEVER be slower than this class","Constants are dropped because they don't affect the shape of the growth curve: O(2n) = O(5n) = O(n)","Lower-order terms are dropped because they become negligible at large n: O(n² + n + 100) = O(n²)","The hierarchy from fast to slow: O(1) < O(log n) < O(n) < O(n log n) < O(n²) < O(2ⁿ) < O(n!)","Big O is the most common notation, but Big Ω (Omega) describes best case and Big Θ (Theta) describes average/tight bound","Big O is the universal language of technical interviews — always state the Big O of your solution when presenting it"],sections:[{title:"The Three Notations",body:`**Big O (O)** — Upper bound (worst case)
974- "The algorithm will NEVER be slower than this"
975- Most commonly used in interviews
976
977**Big Omega (Ω)** — Lower bound (best case)
978- "The algorithm will NEVER be faster than this"
979
980**Big Theta (Θ)** — Tight bound (average case)
981- "The algorithm grows at exactly this rate"
982
983**Example with Linear Search:**
984- Best case Ω(1): target is first element
985- Worst case O(n): target is last or absent
986- Average case Θ(n/2) → Θ(n): target is somewhere in middle`},{title:"Simplification Rules",body:`**Rule 1: Drop constants**
987- O(5n) → O(n)
988- O(100) → O(1)
989
990**Rule 2: Drop non-dominant terms**
991- O(n² + n) → O(n²)
992- O(n + log n) → O(n)
993
994**Rule 3: Different inputs = different variables**
995\`\`\`python
996# This is O(a + b), NOT O(n)
997def process(arr_a, arr_b):
998    for x in arr_a:   # O(a)
999        print(x)
1000    for y in arr_b:   # O(b)
1001        print(y)
1002
1003# This is O(a × b), NOT O(n²)
1004def compare(arr_a, arr_b):
1005    for x in arr_a:      # O(a)
1006        for y in arr_b:   # O(b)
1007            print(x, y)
1008\`\`\``},{title:"Practical Impact",body:`For n = 1,000,000 (1 million):
1009
1010| Complexity | Operations | Practical |
1011|---|---|---|
1012| O(1) | 1 | Instant |
1013| O(log n) | ~20 | Instant |
1014| O(n) | 1,000,000 | Fast (< 1 sec) |
1015| O(n log n) | ~20,000,000 | Acceptable (~1 sec) |
1016| O(n²) | 1,000,000,000,000 | Very slow (~hours) |
1017| O(2ⁿ) | Astronomically large | Impossible |
1018
1019**Rule of thumb:** Most computers do ~10⁸ operations per second. So for competitive programming:
1020- n ≤ 10⁶ → need O(n) or O(n log n)
1021- n ≤ 10⁴ → O(n²) is acceptable
1022- n ≤ 20 → O(2ⁿ) might work`}],relatedTopics:["time-complexity","space-complexity"]}}]},{id:"searching-algorithms",title:"Searching Algorithms",shortTitle:"Searching",description:"Techniques for finding elements in data structures",color:"#50fa7b",icon:"Search",children:[{id:"linear-search",title:"Linear Search",description:"Sequential search through every element",color:"#50fa7b",icon:"ArrowRight",content:{overview:"**Linear Search** (also called Sequential Search) is the most fundamental and straightforward searching algorithm. It works by examining each element in the collection **one by one, in order**, starting from the first element and continuing until either the target element is found or the entire collection has been exhausted. It requires **no preprocessing** — the data doesn't need to be sorted or organized in any particular way. While it is the slowest search method for large datasets, it is also the most versatile because it works on **any** data structure that supports sequential access (arrays, linked lists, etc.).",keyPoints:["Examines each element sequentially from start to end — the simplest possible search strategy","Works on both sorted and unsorted data — no preprocessing or special ordering required","Time complexity: O(n) worst/average case (target at end or absent), O(1) best case (target is first element)","Space complexity: O(1) — only uses a single index variable, no extra memory","Best suited for small datasets (< 100 elements), unsorted collections, or one-time searches","The baseline against which all other search algorithms are compared — anything better than O(n) is an improvement"],sections:[{title:"How It Works",body:`**Step-by-step algorithm:**
10231. Start from the first element (index 0)
10242. Compare the current element with the target value
10253. If they match → return the current index (search successful)
10264. If they don't match → move to the next element
10275. If the end of the collection is reached → return -1 (target not found)
1028
1029**Visual example:** Searching for 30 in [10, 25, 30, 45, 50]
1030\`\`\`
1031Step 1: [10] 25  30  45  50  → 10 ≠ 30 ✗  (1 comparison)
1032Step 2:  10 [25] 30  45  50  → 25 ≠ 30 ✗  (2 comparisons)
1033Step 3:  10  25 [30] 45  50  → 30 = 30 ✓  Found at index 2!
1034\`\`\`
1035
1036Total: 3 comparisons out of 5 elements. In the worst case (target = 50 or target not present), we'd need all 5 comparisons.`},{title:"When to Use Linear Search",body:`✅ **Use when:**
1037- Data is **unsorted** — linear search is your only option (besides building an index first)
1038- Dataset is **small** (< 100 elements) — the overhead of fancier algorithms isn't worth it
1039- You're searching **only once** — if you won't search again, don't bother sorting first
1040- Data structure **doesn't support random access** — linked lists can only be searched sequentially
1041- You need to find **all occurrences** of a target, not just the first one
1042
1043❌ **Avoid when:**
1044- Data is **sorted** → use Binary Search for O(log n)
1045- **Multiple searches** will be performed → build a hash table for O(1) average lookup
1046- Dataset is **very large** (millions of elements) — linear search becomes impractically slow
1047
1048**Rule of thumb:** If you need to search more than ~log₂(n) times, it's worth sorting the data first and using binary search.`},{title:"Variations of Linear Search",body:`### Sentinel Linear Search
1049Place the target value at the end of the array as a "sentinel". This eliminates the bounds-checking condition (\`i < n\`) in the loop, reducing the number of comparisons per iteration from 2 to 1. Particularly useful when implemented at the hardware level.
1050
1051### Find All Occurrences
1052Instead of returning after the first match, continue scanning and collect all indices where the target appears. Useful for counting frequency or finding duplicates.
1053
1054### Search with Early Exit
1055If the data is sorted, you can exit early when you encounter an element greater than the target — you know the target can't appear later. This gives average-case improvement on sorted data.
1056
1057### Bidirectional Search
1058Search from both ends simultaneously — start one pointer at index 0 and another at index n-1, moving toward the center. Halves the worst case in practice (still O(n) asymptotically).`}],complexity:{best:"O(1)",average:"O(n)",worst:"O(n)",space:"O(1)"},codeExamples:[{title:"Linear Search (Python)",language:"python",code:`def linear_search(arr, target):
1059    for i in range(len(arr)):
1060        if arr[i] == target:
1061            return i  # Index found - O(n)
1062    return -1`},{title:"Linear Search (JavaScript)",language:"javascript",code:`function linearSearch(arr, target) {
1063  for (let i = 0; i < arr.length; i++) {
1064    if (arr[i] === target) return i; // Index found - O(n)
1065  }
1066  return -1;
1067}`},{title:"Linear Search (C++)",language:"cpp",code:`#include <vector>
1068
1069int linearSearch(const std::vector<int>& arr, int target) {
1070    for (size_t i = 0; i < arr.size(); i++) {
1071        if (arr[i] == target) return i; // Index found - O(n)
1072    }
1073    return -1;
1074}`},{title:"Linear Search (Java)",language:"java",code:`public static int linearSearch(int[] arr, int target) {
1075    for (int i = 0; i < arr.length; i++) {
1076        if (arr[i] == target) return i; // Index found - O(n)
1077    }
1078    return -1;
1079}`}],relatedTopics:["binary-search-algo","ds-arrays"]}},{id:"binary-search-algo",title:"Binary Search",description:"Efficient search on sorted data by halving the search space",color:"#50fa7b",icon:"Scissors",content:{overview:'**Binary Search** is one of the most efficient searching algorithms in computer science. It finds a target value in a **sorted** array by repeatedly dividing the search interval in half. At each step, it compares the target with the middle element — if the target is smaller, it discards the right half; if larger, it discards the left half. This "divide and conquer" approach eliminates half of the remaining elements in each step, achieving an extraordinary **O(log n)** time complexity. For a sorted array of 1 billion elements, binary search f
1079inds any target in at most **30 comparisons** — compared to 1 billion for linear search.',keyPoints:["Prerequisite: data MUST be sorted — binary search on unsorted data produces incorrect results","Halves the search space at each step — this is why it's O(log n), dramatically faster than linear search's O(n)","For 1 million elements: ~20 comparisons (binary) vs up to 1,000,000 comparisons (linear search)","Can be implemented iteratively (preferred — O(1) space) or recursively (O(log n) stack space)","Foundation for many advanced algorithms: bisect in sorted arrays, search in rotated arrays, finding peaks, etc.","Common interview pitfall: integer overflow when computing mid — use mid = low + (high - low) // 2 instead of (low + high) // 2"],sections:[{title:"How It Works",body:`**Step-by-step:** Searching for 23 in [2, 5, 8, 12, 16, 23, 38, 56, 72, 91]
1080
1081\`\`\`
1082Step 1: low=0, high=9, mid=4
1083  [2, 5, 8, 12, [16], 23, 38, 56, 72, 91]
1084  16 < 23 → target is in RIGHT half → low = 5
1085
1086Step 2: low=5, high=9, mid=7
1087  [23, 38, [56], 72, 91]
1088  56 > 23 → target is in LEFT half → high = 6
1089
1090Step 3: low=5, high=6, mid=5
1091  [[23], 38]
1092  23 = 23 → FOUND at index 5!
1093\`\`\`
1094
1095Only **3 comparisons** for 10 elements! Linear search would need up to 10. For 1 billion elements, binary search needs at most **30 comparisons** (since log₂(10⁹) ≈ 30).`},{title:"Why O(log n)? — The Math Behind It",body:`Each comparison eliminates **half** of the remaining elements:
1096
1097\`\`\`
1098Start:     n elements
1099Step 1:    n/2 elements remain
1100Step 2:    n/4 elements remain
1101Step 3:    n/8 elements remain
1102...
1103Step k:    n/2ᵏ elements remain
1104\`\`\`
1105
1106The search ends when only 1 element remains: **n/2ᵏ = 1**, which gives **k = log₂(n)**.
1107
1108| Array Size (n) | Max Comparisons (log₂ n) | Linear Search Max |
1109|---|---|---|
1110| 100 | 7 | 100 |
1111| 10,000 | 14 | 10,000 |
1112| 1,000,000 | 20 | 1,000,000 |
1113| 1,000,000,000 | 30 | 1,000,000,000 |
1114
1115This logarithmic growth is extraordinarily powerful — doubling the input size only adds **one** more comparison.`},{title:"Iterative vs Recursive",body:`Both approaches produce identical results but differ in implementation:
1116
1117**Iterative (Preferred in Practice):**
1118- Uses a \`while\` loop with \`low\` and \`high\` pointers
1119- **O(1) space** — no additional memory beyond variables
1120- No risk of stack overflow for large arrays
1121- Slightly faster due to no function call overhead
1122
1123**Recursive:**
1124- Uses function calls, passing updated \`low\`/\`high\` bounds
1125- **O(log n) space** — each recursive call adds a frame to the call stack
1126- More elegant and readable for some developers
1127- Risk of stack overflow for very large arrays
1128
1129**Interview recommendation:** Use the iterative version. It's more memory-efficient and demonstrates that you understand the space implications of recursion.`},{title:"Common Pitfalls & Edge Cases",body:"### 1. Integer Overflow\nComputing `mid = (low + high) / 2` can overflow if `low + high` exceeds the maximum integer value. Use:\n```python\nmid = low + (high - low) // 2  # Safe from overflow\n```\n\n### 2. Off-by-One Errors\nThe most common bug in binary search. Pay careful attention to:\n- Should the condition be `low <= high` or `low < high`?\n- Should you set `low = mid + 1` or `low = mid`?\n- Should you set `high = mid - 1` or `high = mid`?\n\nThe standard template uses `while low <= high` with `low = mid + 1` and `high = mid - 1`.\n\n### 3. Forgetting the Sorted Prerequisite\nBinary search only works on sorted data. If the input is unsorted, the algorithm will produce **incorrect results** without warning. Always verify or sort first.\n\n### 4. Duplicate Elements\nBasic binary search finds *any* occurrence of the target. To find the *first* or *last* occurrence, you need modified versions (lower bound / upper bound)."},{title:"Applications Beyond Basic Search",body:`Binary search is far more powerful than just finding an element:
1130
1131- **Finding Boundaries**: Lower bound (first occurrence), upper bound (last occurrence) of a value in a sorted array
1132- **Search in Rotated Sorted Arrays**: Modified binary search to handle arrays that were sorted then rotated
1133- **Finding Square Root**: Binary search on the answer space to find √n with arbitrary precision
1134- **Peak Finding**: Find a local maximum in an array using binary search principles
1135- **Minimum in Rotated Array**: Find the minimum element in a rotated sorted array
1136- **Search on Answer**: When the answer space is monotonic, binary search the possible answers (e.g. "What's the minimum c
1136apacity to ship packages within D days?")
1137- **Python's bisect Module**: Built-in binary search utilities — \`bisect_left()\`, \`bisect_right()\`, \`insort()\``}],complexity:{best:"O(1)",average:"O(log n)",worst:"O(log n)",space:"O(1) iterative, O(log n) recursive"},codeExamples:[{title:"Binary Search (Python)",language:"python",code:`def binary_search(arr, target):
1138    low, high = 0, len(arr) - 1
1139    while low <= high:
1140        mid = (low + high) // 2
1141        if arr[mid] == target: return mid   # O(log n)
1142        elif arr[mid] < target: low = mid + 1
1143        else: high = mid - 1
1144    return -1`},{title:"Binary Search (JavaScript)",language:"javascript",code:`function binarySearch(arr, target) {
1145  let low = 0, high = arr.length - 1;
1146  while (low <= high) {
1147    let mid = Math.floor((low + high) / 2);
1148    if (arr[mid] === target) return mid;  // O(log n)
1149    else if (arr[mid] < target) low = mid + 1;
1150    else high = mid - 1;
1151  }
1152  return -1;
1153}`},{title:"Binary Search (C++)",language:"cpp",code:`#include <vector>
1154
1155int binarySearch(const std::vector<int>& arr, int target) {
1156    int low = 0, high = arr.size() - 1;
1157    while (low <= high) {
1158        int mid = low + (high - low) / 2;
1159        if (arr[mid] == target) return mid;  // O(log n)
1160        else if (arr[mid] < target) low = mid + 1;
1161        else high = mid - 1;
1162    }
1163    return -1;
1164}`},{title:"Binary Search (Java)",language:"java",code:`public static int binarySearch(int[] arr, int target) {
1165    int low = 0, high = arr.length - 1;
1166    while (low <= high) {
1167        int mid = low + (high - low) / 2;
1168        if (arr[mid] == target) return mid;  // O(log n)
1169        else if (arr[mid] < target) low = mid + 1;
1170        else high = mid - 1;
1171    }
1172    return -1;
1173}`}],relatedTopics:["linear-search","sorting-algorithms"]}}]},{id:"sorting-algorithms",title:"Sorting Algorithms",shortTitle:"Sorting",description:"Techniques for arranging elements in a specific order",color:"#ffb86c",icon:"ArrowUpDown",children:[{id:"bubble-sort",title:"Bubble Sort",description:"Repeatedly swap adjacent elements if in wrong order",color:"#ffb86c",icon:"Circle",content:{overview:`**Bubble Sort** is the simplest and most intuitive sorting algorithm, making it the ideal starting point for learning how sorting works. It repeatedly walks through the list, comparing each pair of **adjacent elements** and swapping them if they are in the wrong order. After each complete pass, the largest unsorted element "bubbles up" to its correct position at the end — like air bubbles rising to the surface of water. The algorithm repeats until a full pass completes with no swaps, indicating the list is sorted. While easy to understand and implement, Bubble Sort's O(n²) time complexity makes it impractical for large datasets.`,keyPoints:["Simplest sorting algorithm — excellent for learning, but too slow for production use on large datasets","Compares and swaps adjacent elements repeatedly; after pass k, the k-th largest element is in its final position","Optimization: if no swaps occur during a pass, the array is already sorted — exit early (makes best case O(n))","Stable sort — equal elements maintain their original relative order","Total comparisons in worst case: n(n-1)/2"],sections:[{title:"How It Works",body:"**Sorting [64, 34, 25, 12]:**\n\n**Pass 1:**\n```\n[64, 34, 25, 12] → compare 64, 34 → swap → [34, 64, 25, 12]\n[34, 64, 25, 12] → compare 64, 25 → swap → [34, 25, 64, 12]\n[34, 25, 64, 12] → compare 64, 12 → swap → [34, 25, 12, 64] ✓ 64 is in place\n```\n\n**Pass 2:**\n```\n[34, 25, 12, 64] → compare 34, 25 → swap → [25, 34, 12, 64]\n[25, 34, 12, 64] → compare 34, 12 → swap → [25, 12, 34, 64] ✓ 34 is in place\n```\n\n**Pass 3:**\n```\n[25, 12, 34, 64] → compare 25, 12 → swap → [12, 25, 34, 64] ✓ Done!\n```"}],complexity:{best:"O(n) — already sorted",average:"O(n²)",worst:"O(n²)",space:"O(1)"},codeExamples:[{title:"Bubble Sort (Python)",language:"python",code:`def bubble_sort(arr):
1174    n = len(arr)
1175    for i in range(n):
1176        for j in range(0, n - i - 1):
1177            if arr[j] > arr[j + 1]:
1178                arr[j], arr[j + 1] = arr[j + 1], arr[j]
1179    return arr`},{title:"Bubble Sort (JavaScript)",language:"javascript",code:`function bubbleSort(arr) {
1180  let n = arr.length;
1181  for (let i = 0; i < n; i++) {
1182    for (let j = 0; j < n - i - 1; j++) {
1183      if (arr[j] > arr[j + 1]) {
1184        [arr[j], arr[j + 1]] = [arr[j + 1], arr[j]];
1185      }
1186    }
1187  }
1188  return arr;
1189}`},{title:"Bubble Sort (C++)",language:"cpp",code:`#include <vector>
1190#include <algorithm>
1191
1192void bubbleSort(std::vector<int>& arr) {
1193    int n = arr.size();
1194    for (int i = 0; i < n; i++) {
1195        for (int j = 0; j < n - i - 1; j++) {
1196            if (arr[j] > arr[j + 1]) std::swap(arr[j], arr[j + 1]);
1197        }
1198    }
1199}`},{title:"Bubble Sort (Java)",language:"java",code:`public static void bubbleSort(int[] arr) {
1200    int n = arr.length;
1201    for (int i = 0; i < n; i++) {
1202        for (int j = 0; j < n - i - 1; j++) {
1203            if (arr[j] > arr[j + 1]) {
1204                int temp = arr[j]; arr[j] = arr[j + 1]; arr[j + 1] = temp;
1205            }
1206        }
1207    }
1208}`}],relatedTopics:["selection-sort","insertion-sort"]}},{id:"selection-sort",title:"Selection Sort",description:"Find the minimum and place it at the beginning",color:"#ffb86c",icon:"MousePointer",content:{overview:"**Selection Sort** is a straightforward comparison-based algorithm that sorts by repeatedly finding the **smallest (or largest) element** from the unsorted portion of the array and placing it at the beginning of the sorted portion. It conceptually divi
1208des the array into two regions: a **sorted region** (left side, growing) and an **unsorted region** (right side, shrinking). On each pass, it scans the entire unsorted region to find the minimum, then swaps it into the next position in the sorted region. Unlike Bubble Sort, Selection Sort makes at most **n swaps** total, which can be advantageous when swap operations are expensive (e.g. writing to flash memory).",keyPoints:["Divides array into sorted (left) and unsorted (right) regions; repeatedly selects the minimum from unsorted and places it at the end of sorted","Always performs exactly O(n²) comparisons regardless of input order — no best-case optimization","Makes the minimum possible number of swaps: exactly n-1 swaps in all cases — useful when writes are costly","Not stable — swapping can change the relative order of equal elements (e.g. swapping over a distant equal)","In-place — uses O(1) extra space","Simple to implement but generally outperformed by Insertion Sort for small datasets"],sections:[{title:"How It Works",body:`**Sorting [29, 10, 14, 37, 13]:**
1209
1210**Pass 1:** Find min in [29, 10, 14, 37, 13] → 10 at index 1
1211Swap 29 and 10 → **[10,** 29, 14, 37, 13]
1212
1213**Pass 2:** Find min in [29, 14, 37, 13] → 13 at index 4
1214Swap 29 and 13 → [10, **13,** 14, 37, 29]
1215
1216**Pass 3:** Find min in [14, 37, 29] → 14 at index 2
1217Already in place → [10, 13, **14,** 37, 29]
1218
1219**Pass 4:** Find min in [37, 29] → 29 at index 4
1220Swap 37 and 29 → [10, 13, 14, **29, 37**] ✓ Done!`}],complexity:{best:"O(n²)",average:"O(n²)",worst:"O(n²)",space:"O(1)"},codeExamples:[{title:"Selection Sort (Python)",language:"python",code:`def selection_sort(arr):
1221    n = len(arr)
1222    for i in range(n):
1223        min_idx = i
1224        for j in range(i + 1, n):
1225            if arr[j] < arr[min_idx]: min_idx = j
1226        arr[i], arr[min_idx] = arr[min_idx], arr[i]
1227    return arr`},{title:"Selection Sort (JavaScript)",language:"javascript",code:`function selectionSort(arr) {
1228  let n = arr.length;
1229  for (let i = 0; i < n; i++) {
1230    let minIdx = i;
1231    for (let j = i + 1; j < n; j++) {
1232      if (arr[j] < arr[minIdx]) minIdx = j;
1233    }
1234    [arr[i], arr[minIdx]] = [arr[minIdx], arr[i]];
1235  }
1236  return arr;
1237}`},{title:"Selection Sort (C++)",language:"cpp",code:`#include <vector>
1238#include <algorithm>
1239
1240void selectionSort(std::vector<int>& arr) {
1241    int n = arr.size();
1242    for (int i = 0; i < n; i++) {
1243        int minIdx = i;
1244        for (int j = i + 1; j < n; j++) {
1245            if (arr[j] < arr[minIdx]) minIdx = j;
1246        }
1247        std::swap(arr[i], arr[minIdx]);
1248    }
1249}`},{title:"Selection Sort (Java)",language:"java",code:`public static void selectionSort(int[] arr) {
1250    int n = arr.length;
1251    for (int i = 0; i < n; i++) {
1252        int minIdx = i;
1253        for (int j = i + 1; j < n; j++) {
1254            if (arr[j] < arr[minIdx]) minIdx = j;
1255        }
1256        int temp = arr[i]; arr[i] = arr[minIdx]; arr[minIdx] = temp;
1257    }
1258}`}],relatedTopics:["bubble-sort","insertion-sort"]}},{id:"insertion-sort",title:"Insertion Sort",description:"Build sorted array one element at a time",color:"#ffb86c",icon:"ArrowDownToLine",content:{overview:"**Insertion Sort** builds the sorted array one element at a time by picking each element and **inserting it into its correct position** among the previously sorted elements, shifting larger elements to the right to make room. The intuition is exactly how most people sort playing cards — you pick up one card at a time and slide it into the right spot in your hand. Despite being O(n²) in the worst case, Insertion Sort is remarkably efficie
1258nt for **small datasets** and **nearly sorted data**, where it approaches O(n). It is the algorithm of choice for sorting small subarrays in hybrid algorithms like Timsort (Python's built-in sort) and Introsort.",keyPoints:["Builds the sorted portion from left to right — each element is inserted into its correct position among the already-sorted elements","Excellent for small datasets (n < 50) and nearly sorted data — approaches O(n) when data is almost sorted","Stable sort — equal elements maintain their original relative order (important for multi-key sorting)","Online algorithm — can sort data as it arrives, one element at a time, without needing the full dataset upfront","Adaptive — runs faster when the input is partially sorted; specifically, runs in O(n + d) where d is the number of inversions","Used as the base case in hybrid sorts: Python's Timsort switches to insertion sort for small partitions (< 32 elements)"],sections:[{title:"How It Works",body:`Like sorting cards: pick a card, slide it into its correct position.
1259
1260**Sorting [12, 11, 13, 5, 6]:**
1261\`\`\`
1262Start:  [12] | 11, 13, 5, 6    (12 is trivially sorted)
1263Step 1: [11, 12] | 13, 5, 6    (insert 11 before 12)
1264Step 2: [11, 12, 13] | 5, 6    (13 already in place)
1265Step 3: [5, 11, 12, 13] | 6    (insert 5 at beginning)
1266Step 4: [5, 6, 11, 12, 13]     (insert 6 after 5) ✓ Done!
1267\`\`\``}],complexity:{best:"O(n) — already sorted",average:"O(n²)",worst:"O(n²) — reverse sorted",space:"O(1)"},codeExamples:[{title:"Insertion Sort (Python)",language:"python",code:`def insertion_sort(arr):
1268    for i in range(1, len(arr)):
1269        key = arr[i]
1270        j = i - 1
1271        while j >= 0 and arr[j] > key:
1272            arr[j + 1] = arr[j]
1273            j -= 1
1274        arr[j + 1] = key
1275    return arr`},{title:"Insertion Sort (JavaScript)",language:"javascript",code:`function insertionSort(arr) {
1276  for (let i = 1; i < arr.length; i++) {
1277    let key = arr[i], j = i - 1;
1278    while (j >= 0 && arr[j] > key) {
1279      arr[j + 1] = arr[j];
1280      j--;
1281    }
1282    arr[j + 1] = key;
1283  }
1284  return arr;
1285}`},{title:"Insertion Sort (C++)",language:"cpp",code:`#include <vector>
1286
1287void insertionSort(std::vector<int>& arr) {
1288    for (size_t i = 1; i < arr.size(); i++) {
1289        int key = arr[i], j = (int)i - 1;
1290        while (j >= 0 && arr[j] > key) {
1291            arr[j + 1] = arr[j];
1292            j--;
1293        }
1294        arr[j + 1] = key;
1295    }
1296}`},{title:"Insertion Sort (Java)",language:"java",code:`public static void insertionSort(int[] arr) {
1297    for (int i = 1; i < arr.length; i++) {
1298        int key = arr[i], j = i - 1;
1299        while (j >= 0 && arr[j] > key) {
1300            arr[j + 1] = arr[j];
1301            j--;
1302        }
1303        arr[j + 1] = key;
1304    }
1305}`}],relatedTopics:["bubble-sort","merge-sort"]}},{id:"merge-sort",title:"Merge Sort",description:"Divide-and-conquer sort with O(n log n) guarantee",color:"#ffb86c",icon:"GitMerge",content:{overview:"**Merge Sort** is a highly efficient, stable sorting algorithm built on the **divide and conquer** paradigm. It works by recursively dividing the array into two halves until each subarray contains a single element (which is trivially sorted), then **merging** the sorted subarrays back together in order. The key insight is that merging two already-sorted arrays into one sorted array takes only O(n) time, and the recursive division creates O(log n) levels — giving an overall **O(n log n)** time complexity that is guaranteed regardless of input order. Unlike Quick Sort, Merge Sort never degrades to O(n²).",keyPoints:["Divide and conquer: split → recursively sort → merge — the 'merge' step is where the actual sorting happens","Guaranteed O(n log n) in ALL cases (best, average, worst) — no input can cause performance degradation","Stable sort — preserves the relative order of elements with equal keys, critical for multi-level sorting","Requires O(n) extra space for the temporary arrays during merging — the main disadvantage compared to in-place sorts","Excellent for sorting linked lists — merging linked lists is O(1) space since you only redirect pointers","The conceptual foundation for external sorting (sorting data too large to fit in memory) and parallel sorting algorithms"],sections:[{title:"How It Works",body:`**Three steps:**
13061. **Divide:** Split array into two halves
13072. **Conquer:** Recursively sort each half
13083. **Merge:** Combine two sorted halves into one sorted array
1309
1310\`\`\`
1311         [38, 27, 43, 3, 9, 82, 10]
1312              /                \\
1313      [38, 27, 43]          [3, 9, 82, 10]
1314       /       \\              /          \\
1315   [38]     [27, 43]      [3, 9]     [82, 10]
1316              /  \\          /  \\        /   \\
1317           [27] [43]     [3]  [9]   [82]  [10]
1318              \\  /          \\  /        \\   /
1319           [27, 43]       [3, 9]     [10, 82]
1320       \\       /              \\        /
1321      [27, 38, 43]        [3, 9, 10, 82]
1322              \\                /
1323      [3, 9, 10, 27, 38, 43, 82] ✓
1324\`\`\``}],complexity:{best:"O(n log n)",average:"O(n log n)",worst:"O(n log n)",space:"O(n)"},codeExamples:[{title:"Merge Sort (Python)",language:"python",code:`def merge_sort(arr):
1325    if len(arr) <= 1: return arr
1326    mid = len(arr) // 2
1327    left = merge_sort(arr[:mid])
1328    right = merge_sort(arr[mid:])
1329    return merge(left, right)
1330
1331def merge(left, right):
1332    res, i, j = [], 0, 0
1333    while i < len(left) and j < len(right):
1334        if left[i] <= right[j]: res.append(left[i]); i += 1
1335        else: res.append(right[j]); j += 1
1336    res.extend(left[i:]); res.extend(right[j:])
1337    return res`},{title:"Merge Sort (JavaScript)",language:"javascript",code:`function mergeSort(arr) {
1338  if (arr.length <= 1) return arr;
1339  const mid = Math.floor(arr.length / 2);
1340  const left = mergeSort(arr.slice(0, mid));
1341  const right = mergeSort(arr.slice(mid));
1342  return merge(left, right);
1343}
1344
1345function merge(left, right) {
1346  let res = [], i = 0, j = 0;
1347  while (i < left.length && j < right.length) {
1348    res.push(left[i] <= right[j] ? left[i++] : right[j++]);
1349  }
1350  return res.concat(left.slice(i)).concat(right.slice(j));
1351}`},{title:"Merge Sort (C++)",language:"cpp",code:`#include <vector>
1352
1353void merge(std::vector<int>& arr, int l, int m, int r) {
1354    std::vector<int> left(arr.begin() + l, arr.begin() + m + 1);
1355    std::vector<int>
1355 right(arr.begin() + m + 1, arr.begin() + r + 1);
1356    size_t i = 0, j = 0; int k = l;
1357    while (i < left.size() && j < right.size()) {
1358        arr[k++] = (left[i] <= right[j]) ? left[i++] : right[j++];
1359    }
1360    while (i < left.size()) arr[k++] = left[i++];
1361    while (j < right.size()) arr[k++] = right[j++];
1362}
1363
1364void mergeSort(std::vector<int>& arr, int l, int r) {
1365    if (l < r) {
1366        int m = l + (r - l) / 2;
1367        mergeSort(arr, l, m);
1368        mergeSort(arr, m + 1, r);
1369        merge(arr, l, m, r);
1370    }
1371}`},{title:"Merge Sort (Java)",language:"java",code:`import java.util.Arrays;
1372
1373public static void mergeSort(int[] arr, int l, int r) {
1374    if (l < r) {
1375        int m = l + (r - l) / 2;
1376        mergeSort(arr, l, m);
1377        mergeSort(arr, m + 1, r);
1378        merge(arr, l, m, r);
1379    }
1380}
1381
1382private static void merge(int[] arr, int l, int m, int r) {
1383    int[] left = Arrays.copyOfRange(arr, l, m + 1);
1384    int[] right = Arrays.copyOfRange(arr, m + 1, r + 1);
1385    int i = 0, j = 0, k = l;
1386    while (i < left.length && j < right.length) {
1387        arr[k++] = (left[i] <= right[j]) ? left[i++] : right[j++];
1388    }
1389    while (i < left.length) arr[k++] = left[i++];
1390    while (j < right.length) arr[k++] = right[j++];
1391}`}],relatedTopics:["quick-sort","insertion-sort"]}},{id:"quick-sort",title:"Quick Sort",description:"Efficient in-place sort using pivot partitioning",color:"#ffb86c",icon:"Zap",content:{overview:"**Quick Sort** is widely regarded as the fastest general-purpose sorting algorithm in practice. It uses the **divide and conquer** strategy: select a **pivot** element, then **partition** the array so that all elements smaller than the pivot move to its left and all elements larger move to its right. The pivot is now in its final sorted position. Then recursively apply the same process to the left and right subarrays. Quick Sort's average-case O(n log n) performance combined with excellent cache locality and in-place operation makes it the default sorting algorithm in many language standard libraries (C's qsort, Java's Arrays.sort for primitives).",keyPoints:["Divide and conquer with pivot-based partitioning — the pivot ends up in its correct final position after each partition step","Average case O(n log n) and typically 2-3x faster than Merge Sort in practice due to smaller constants and better cache performance","In-place sorting — only O(log n) extra space for the recursion stack (vs O(n) for Merge Sort)","Not stable — partitioning can change the relative order of elements with equal values","Worst case O(n²) occurs when pivot consistently lands at the extremes (e.g. already sorted array with first/last pivot) — mitigated by randomized or median-of-three pivot selection","The partition subroutine is independently useful: finding the k-th smallest element (QuickSelect) runs in O(n) average time"],sections:[{title:"How It Works",body:`**Partition step** (using last element as pivot):
1392
1393\`\`\`
1394Array: [10, 80, 30, 90, 40, 50, 70]  pivot = 70
1395
1396Compare each element with pivot (70):
139710 < 70 → left   [10]
139880 > 70 → right       [80]
139930 < 70 → left   [10, 30]
140090 > 70 → right       [80, 90]
140140 < 70 → left   [10, 30, 40]
140250 < 70 → left   [10, 30, 40, 50]
1403
1404Result: [10, 30, 40, 50] [70] [80, 90]
1405         ↓ recurse        ✓    ↓ recurse
1406\`\`\`
1407
1408Now recursively sort left [10, 30, 40, 50] and right [80, 90].`}],complexity:{best:"O(n log n)",average:"O(n log n)",worst:"O(n²) — already sorted with bad pivot",space:"O(log n)"},codeExamples:[{title:"Quick Sort (Python)",language:"python",code:`def quick_sort(arr):
1409    if len(arr) <= 1: return arr
1410    pivot = arr[len(arr) // 2]
1411    left = [x for x in arr if x < pivot]
1412    middle = [x for x in arr if x == pivot]
1413    right = [x for x in arr if x > pivot]
1414    return quick_sort(left) + middle + quick_sort(right)`},{title:"Quick Sort (JavaScript)",language:"javascript",code:`function quickSort(arr) {
1415  if (arr.length <= 1) return arr;
1416  const pivot = arr[Math.floor(arr.length / 2)];
1417  const left = arr.filter(x => x < pivot);
1418  const middle = arr.filter(x => x === pivot);
1419  const right = arr.filter(x => x > pivot);
1420  return [...quickSort(left), ...middle, ...quickSort(right)];
1421}`},{title:"Quick Sort (C++)",language:"cpp",code:`#include <vector>
1422#include <algorithm>
1423
1424int partition(std::vector<int>& arr, int low, int high) {
1425    int pivot = arr[high], i = low - 1;
1426    for (int j = low; j < high; j++) {
1427        if (arr[j] < pivot) { i++; std::swap(arr[i], arr[j]); }
1428    }
1429    std::swap(arr[i + 1], arr[high]);
1430    return i + 1;
1431}
1432
1433void quickSort(std::vector<int>& arr, int low, int high) {
1434    if (low < high) {
1435        int pi = partition(arr, low, high);
1436        quickSort(arr, low, pi - 1);
1437        quickSort(arr, pi + 1, high);
1438    }
1439}`},{title:"Quick Sort (Java)",language:"java",code:`public static void quickSort(int[] arr, int low, int high) {
1440    if (low < high) {
1441        int pi = partition(arr, low, high);
1442        quickSort(arr, low, pi - 1);
1443        quickSort(arr, pi + 1, high);
1444    }
1445}
1446
1447private static int partition(int[] arr, int low, int high) {
1448    int pivot = arr[high], i = low - 1;
1449    for (int j = low; j < high; j++) {
1450        if (arr[j] < pivot) { i++; int t = arr[i]; arr[i] = arr[j]; arr[j] = t; }
1451    }
1452    int t = arr[i + 1]; arr[i + 1] = arr[high]; arr[high] = t;
1453    return i + 1;
1454}`}],relatedTopics:["merge-sort","heap-sort"]}},{id:"heap-sort",title:"Heap Sort",description:"Sort using a binary heap data structure",color:"#ffb86c",icon:"Triangle",content:{overview:"**Heap Sort** leverages the **binary heap** data structure to sort elements efficie
1454ntly. It first transforms the array into a **max-heap** (a complete binary tree where every parent is greater than its children), then repeatedly extracts the maximum element (the root) and places it at the end of the array. After each extraction, it restores the heap property. Heap Sort combines the O(n log n) worst-case guarantee of Merge Sort with the in-place nature of Quick Sort — it never degrades to O(n²) and uses only O(1) extra space. It's the algorithm of choice when both guaranteed performance and minimal memory usage are required.",keyPoints:["Uses a max-heap to repeatedly extract the maximum element — each extraction takes O(log n) time, n extractions = O(n log n)","Guaranteed O(n log n) in ALL cases — unlike Quick Sort, there is no worst-case degradation","In-place — only O(1) auxiliary space, unlike Merge Sort which needs O(n) extra","Not stable — the heapify process can change the relative order of elements with equal values","Building the initial max-heap from an unordered array takes only O(n) time (not O(n log n) — a non-obvious mathematical result)","Understanding Heap Sort is a prerequisite for Priority Queues, which are used in Dijkstra's algorithm, event schedulers, and task prioritization"],sections:[{title:"How It Works",body:`**Two phases:**
1455
1456**Phase 1: Build Max-Heap**
1457Rearrange array so parent ≥ children at every node
1458\`\`\`
1459Array: [4, 10, 3, 5, 1]
1460
1461Max-Heap:      10
1462              /  \\
1463             5    3
1464            / \\
1465           4   1
1466
1467Array: [10, 5, 3, 4, 1]
1468\`\`\`
1469
1470**Phase 2: Extract Max Repeatedly**
14711. Swap root (max) with last element
14722. Reduce heap size by 1
14733. Heapify the root
14744. Repeat
1475
1476\`\`\`
1477[10, 5, 3, 4, 1] → swap 10 & 1 → [1, 5, 3, 4, |10]
1478                 → heapify → [5, 4, 3, 1, |10]
1479[5, 4, 3, 1, |10] → swap 5 & 1 → [1, 4, 3, |5, 10]
1480                  → heapify → [4, 1, 3, |5, 10]
1481... continue until sorted → [1, 3, 4, 5, 10] ✓
1482\`\`\``}],complexity:{best:"O(n log n)",average:"O(n log n)",worst:"O(n log n)",space:"O(1)"},codeExamples:[{title:"Heap Sort (Python)",language:"python",code:`import heapq
1483
1484def heap_sort(arr):
1485    heapq.heapify(arr)
1486    return [heapq.heappop(arr) for _ in range(len(arr))]`},{title:"Heap Sort (JavaScript)",language:"javascript",code:`function heapify(arr, n, i) {
1487  let largest = i, l = 2 * i + 1, r = 2 * i + 2;
1488  if (l < n && arr[l] > arr[largest]) largest = l;
1489  if (r < n && arr[r] > arr[largest]) largest = r;
1490  if (largest !== i) {
1491    [arr[i], arr[largest]] = [arr[largest], arr[i]];
1492    heapify(arr, n, largest);
1493  }
1494}
1495
1496function heapSort(arr) {
1497  let n = arr.length;
1498  for (let i = Math.floor(n / 2) - 1; i >= 0; i--) heapify(arr, n, i);
1499  for (let i = n - 1; i > 0; i--) {
1500    [arr[0], arr[i]] = [arr[i], arr[0]];
1501    heapify(arr, i, 0);
1502  }
1503  return arr;
1504}`},{title:"Heap Sort (C++)",language:"cpp",code:`#include <vector>
1505#include <algorithm>
1506
1507void heapSort(std::vector<int>& arr) {
1508    std::make_heap(arr.begin(), arr.end());
1509    std::sort_heap(arr.begin(), arr.end());
1510}`},{title:"Heap Sort (Java)",language:"java",code:`import java.util.PriorityQueue;
1511
1512public static void heapSort(int[] arr) {
1513    PriorityQueue<Integer> pq = new PriorityQueue<>();
1514    for (int x : arr) pq.add(x);
1515    for (int i = 0; i < arr.length; i++) arr[i] = pq.poll();
1516}`}],relatedTopics:["quick-sort","tree-heap"]}}]},{id:"tree-data-structures",title:"Tree Data Structures",shortTitle:"Trees",description:"Hierarchical data structures with parent-child relationships",color:"#ff79c6",icon:"GitBranch",children:[{id:"what-is-tree",title:"What is a Tree?",description:"Understanding hierarchical tree data structures",color:"#ff79c6",icon:"TreePine",content:{overview:"A **Tree** is a non-linear, hierarchical data structure composed of **nodes** connected by directed or undirected **edges**. Unlike linear data structures (arrays, linked lists, stacks, queues) where elements sit in a sequential sequence, trees organize data in a top-down **parent-child relationship**. The topmost node is called the **root**, and nodes with no children are called **leaves**. Trees are ubiquitous in computer science — powering file systems, HTML DOMs, database indexes, compiler abstract syntax trees (ASTs), and AI decision models.",keyPoints:["Hierarchical non-linear structure with a single root node at the top and leaf nodes at the bottom","A tree with N nodes always contains exactly N − 1 edges and contains zero cycles","A unique simple path exists between the root and any node in the tree","Height of a tree is the length of the longest path from the root to any leaf node","Subtrees are recursive: every child node serves as the root of its own smaller subtree","Forms the foundational structure for Binary Search Trees, Heaps, AVL Trees, B-Trees, and Tries"],sections:[{title:"Tree Terminology & Core Anatomy",body:`Understanding tree terminology is essential for communicating algorithm design:
1517
1518\`\`\`
1519           A          ← Root (depth 0, height 2)
1520          / \\
1521         B   C        ← Internal Nodes (depth 1, height 1)
1522        / \\   \\
1523       D   E   F      ← Leaf Nodes (depth 2, height 0)
1524\`\`\`
1525
1526| Term | Definition | Example in Diagram |
1527|---|---|---|
1528| **Root** | The topmost node with no parent | Node A |
1529| **Parent** | A node that has child nodes below it | A is parent of B & C; B is parent of D & E |
1530| **Child** | A node connected directly below a parent | D & E are children of B |
1531| **Siblings** | Nodes sharing the exact same parent node | B & C are siblings; D & E are siblings |
1532| **Leaf (Terminal)** | A node that has zero children | Nodes D, E, and F |
1533| **Internal Node** | Any node that has at least one child | Nodes A, B, and C |
1534| **Edge** | The directional or undirected link connecting two nodes | Link (A → B) |
1535| **Height of Node** | Longest path (edge count) from node down to a leaf | Height of A = 2, Height of B = 1 |
1536| **Depth of Node** | Number of edges from root down to that specific node | Depth of A = 0, Depth of D = 2 |
1537| **Degree of Node** | Total count of direct children attached to the node | Degree of A = 2, Degree of B = 2 |`},{title:"Tree Classifications & Taxonomy",body:`Trees are categorized based on their branching factors, balance conditions, and structural rules:
1538
1539- **General Tree**: Nodes can have an arbitrary number of children (0 to N). Common in file system directory structures.
1540
1541- **Binary Tree**: Every node has at most **two children** (designated as Left Child and Right Child).
1542
1543- **Binary Search Tree (BST)**: A binary tree enforcing the ordering rule: \`Left Subtree < Node < Right Subtree\` for fast O(log n) lookups.
1544
1545- **Self-Balancing Trees (AVL / Red-Black)**: Automatically adjust height during insertions/deletions to maintain O(log n) worst-case time.
1546
1547- **B-Trees / B+ Trees**: Multi-way search trees optimized for reading/writing large blocks of data on physical disk storage and databases.
1548
1549- **Trie (Prefix Tree)**: Tree optimized for retrieving keys in a dataset of strings (e.g. autocomplete, dictionary lookups).
1550
1551- **Heap**: A complete binary tree preserving min-heap or max-heap order, providing instant O(1) access to extreme values.`}],relatedTopics:["tree-traversals","tree-binary"]}},{id:"tree-traversals",title:"Tree Traversals",shortTitle:"Traversals",description:"Inorder, Preorder, and Postorder traversal methods",color:"#ff79c6",icon:"Route",content:{overview:"**Tree Traversal** refers to the algorithmic process of visiting (retrieving or modifying) **every node** in a tree data structure exactly once. Because trees are non-linear, there is no single default sequence for stepping through elements. Instead, traversals are broadly categorized into **Depth-First Search (DFS)** — which explores down a branch before backtracking — and **Breadth-First Search (BFS)** — which visits nodes level by level. The three fundamental Depth-First traversal orders are **Inorder**, **Preorder**, and **Postorder**, each named after when the root/parent node is processed relative to its left and right subtrees.",keyPoints:["Inorder Traversal (Left → Root → Right): Processes BST elements in perfect ascending sorted order","Preorder Traversal (Root → Left → Right): Clones or serializes tree structure by visiting roots before children","Postorder Traversal (Left → Right → Root): Deletes or evaluates expression trees from bottom-up leaves to root","All DFS traversals process N nodes in O(N) time and consume O(H) auxiliary space on the call stack (where H is tree height)","Name mnemonic: 'Pre' = Root first, 'In' = Root in middle, 'Post' = Root last"],sections:[{title:"Detailed Breakdown of the Three DFS Traversals",body:`Given the following binary tree:
1552\`\`\`
1553        1
1554       / \\
1555      2   3
1556     / \\
1557    4   5
1558\`\`\`
1559
1560### 1. Inorder Traversal (\`Left ➔ Root ➔ Right\`)
1561- **Execution Order**: \`4 ➔ 2 ➔ 5 ➔ 1 ➔ 3\`
1562- **How it works**: Recursively visit the left subtree entirely, process the current node, then recursively visit the right subtree.
1563- **Key Superpower**: When performed on a **Binary Search Tree (BST)**, Inorder traversal visits node values in **strictly non-decreasing sorted order**.
1564
1565### 2. Preorder Traversal (\`Root ➔ Left ➔ Right\`)
1566- **Execution Order**: \`1 ➔ 2 ➔ 4 ➔ 5 ➔ 3\`
1567- **How it works**: Process the current node first, then recursively visit the left subtree, followed by the right subtree.
1568- **Key Superpower**: Perfect for **cloning trees**, serializing a tree into a file/string, or calculating prefix expressions (Polish Notation).
1569
1570### 3. Postorder Traversal (\`Left ➔ Right ➔ Root\`)
1571- **Execution Order**: \`4 ➔ 5 ➔ 2 ➔ 3 ➔ 1\`
1572- **How it works**: Recursively visit left and right subtrees first, and process the root node only after all descendants are done.
1573- **Key Superpower**: Essential for **bottom-up operations** like deleting/freeing a tree safely, calculating subtree sizes/heights, and evaluating postfix math expressions.`},{title:"Mnemonic & Strategy Matrix",body:`| Traversal | Root Processing Position | Ideal Use Case |
1574|---|---|---|
1575| **Preorder** | **First** (Root → Left → Right) | Tree cloning, serialization, prefix expression generation |
1576| **Inorder** | **Middle** (Left → Root → Right) | Sorted output generation on BSTs, checking if BST is valid |
1577| **Postorder** | **Last** (Left → Right → Root) | Memory deallocation (deleting nodes), subtree height computation |
1578
1579**Memory Rule**: The prefix of the traversal name indicates the placement of the **Root** node relative to its children. Left is always visited before Right!`}],complexity:{time:"O(n)",space:"O(h) where h = height of tree"},codeExamples:[{title:"Tree Traversals (Python)",language:"python",code:`def inorder(root):
1580    if root:
1581        inorder(root.left)
1582        print(root.val, end=" ")
1583        inorder(root.right)
1584
1585def preorder(root):
1586    if root:
1587        print(root.val, end=" ")
1588        preorder(root.left)
1589        preorder(root.right)
1590
1591def postorder(root):
1592    if root:
1593        postorder(root.left)
1594        postorder(root.right)
1595        print(root.val, end=" ")`},{title:"Tree Traversals (JavaScript)",language:"javascript",code:`function inorder(root) {
1596  if (!root) return;
1597  inorder(root.left);
1598  console.log(root.val);
1599  inorder(root.right);
1600}
1601
1602function preorder(root) {
1603  if (!root) return;
1604  console.log(root.val);
1605  preorder(root.left);
1606  preorder(root.right);
1607}
1608
1609function postorder(root) {
1610  if (!root) return;
1611  postorder(root.left);
1612  postorder(root.right);
1613  console.log(root.val);
1614}`},{title:"Tree Traversals (C++)",language:"cpp",code:`#include <iostream>
1615
1616void inorder(TreeNode* root) {
1617    if (!root) return;
1618    inorder(root->left);
1619    std::cout << root->val << " ";
1620    inorder(root->right);
1621}
1622
1623void preorder(TreeNode* root) {
1624    if (!root) return;
1625    std::cout << root->val << " ";
1626    preorder(root->left);
1627    preorder(root->right);
1628}
1629
1630void postorder(TreeNode* root) {
1631    if (!root) return;
1632    postorder(root->left);
1633    postorder(root->right);
1634    std::cout << root->val << " ";
1635}`},{title:"Tree Traversals (Java)",language:"java",code:`public static void inorder(TreeNode root) {
1636    if (root == null) return;
1637    inorder(root.left);
1638    System.out.print(root.val + " ");
1639    inorder(root.right);
1640}
1641
1642public static void preorder(TreeNode root) {
1643    if (root == null) return;
1644    System.out.print(root.val + " ");
1645    preorder(root.left);
1646    preorder(root.right);
1647}
1648
1649public static void postorder(TreeNode root) {
1650    if (root == null) return;
1651    postorder(root.left);
1652    postorder(root.right);
1653    System.out.print(root.val + " ");
1654}`}],relatedTopics:["tree-bfs-dfs","tree-binary"]}},{id:"tree-bfs-dfs",title:"BFS & DFS on Trees",shortTitle:"Tree BFS/DFS",description:"Breadth-First and Depth-First search strategies on trees",color:"#ff79c6",icon:"Scan",content:{overview:"Searching and traversing trees relies on two primary strategies: **Breadth-First Search (BFS)** and **Depth-First Search (DFS)**. **BFS (Level-Order Traversal)** explores the tree horizon-by-horizon, visiting all nodes at depth `k` before advancing to depth `k+1`. It is powered by a **FIFO Queue**. Conversely, **DFS** dives down a single branch as deeply as possible until hitting a leaf, then backtracks to explore remaining branches. DFS is powered by an explicit or implicit **LIFO Stack (Call Stack)**.",keyPoints:["BFS utilizes a FIFO Queue to traverse tree level by level — ideal for level-order problems and shortest paths in unweighted trees","DFS utilizes a LIFO Stack (or call stack recursion) to explore paths down to leaves before backtracking","Time Complexity is O(N) for both, as every node must be visited once","Space Complexity trade-off: BFS uses O(W) where W is max tree width; DFS uses O(H) where H is max tree height","For balanced trees, W = O(N) while H = O(log N) — making DFS significantly more memory-efficient on wide balanced trees"],sections:[{title:"BFS (Level-Order Traversal) Mechanics",body:`BFS processes nodes level by level from top to bottom, left to right:
1655\`\`\`
1656        1          Level 0  ➔ [1]
1657       / \\
1658      2   3        Level 1  ➔ [2, 3]
1659     / \\   \\
1660    4   5   6      Level 2  ➔ [4, 5, 6]
1661
1662Execution Sequence: 1 ➔ 2 ➔ 3 ➔ 4 ➔ 5 ➔ 6
1663\`\`\`
1664
1665**Algorithm:**
16661. Initialize a Queue and enqueue the \`root\` node.
16672. Loop while the queue is not empty:
1668   - Dequeue the front node.
1669   - Process its value.
1670   - Enqueue its left child (if present), then right child (if present).
1671
1672**Best for**: Printing tree levels, finding shortest paths, connecting next-right pointers.`},{title:"DFS Mechanics & Call Stack",body:`DFS plunges straight down to the deepest leaf before backtracking:
1673\`\`\`
1674        1
1675       / \\
1676      2   3
1677     / \\
1678    4   5
1679
1680Preorder DFS Sequence: 1 ➔ 2 ➔ 4 ➔ 5 ➔ 3
1681\`\`\`
1682
1683**Algorithm (Iterative via Stack):**
16841. Initialize a Stack and push the \`root\` node.
16852. Loop while the stack is not empty:
1686   - Pop the top node.
1687   - Process its value.
1688   - Push the **right** child first, then **left** child (so left is popped and processed first).
1689
1690**Best for**: Pathfinding, tree height validation, checking structural equality, backtracking.`},{title:"BFS vs DFS Structural Comparison",body:`| Metric | BFS (Level Order) | DFS (Pre/In/Postorder) |
1691|---|---|---|
1692| **Primary Data Structure** | Queue (\`collections.deque\`) | Stack or Call Stack Recursion |
1693| **Order of Exploration** | Level by level (horizontally) | Branch by branch (vertically) |
1694| **Auxiliary Memory** | $O(W)$ — proportional to max width | $O(H)$ — proportional to tree height |
1695| **Balanced Tree Space** | $O(N)$ (bottom level holds $N/2$ nodes) | $O(\\log N)$ (call stack depth is height) |
1696| **Skewed Tree Space** | $O(1)$ (width is 1) | $O(N)$ (call stack depth is $N$) |
1697| **Shortest Path to Leaf?** | Guaranteed shortest depth path first | May explore full deep branch first |`}],codeExamples:[{title:"Tree BFS & DFS (Python)",language:"python",code:`from collections import deque
1698
1699def bfs(root):
1700    if not root: return
1701    q = deque([root])
1702    while q:
1703        node = q.popleft()
1704        print(node.val, end=" ")
1705        if node.left: q.append(node.left)
1706        if node.right: q.append(node.right)
1707
1708def dfs(root):
1709    if not root: return
1710    print(root.val, end=" ")
1711    dfs(root.left)
1712    dfs(root.right)`},{title:"Tree BFS & DFS (JavaScript)",language:"javascript",code:`function bfs(root) {
1713  if (!root) return;
1714  const q = [root];
1715  while (q.length > 0) {
1716    const node = q.shift();
1717    console.log(node.val);
1718    if (node.left) q.push(node.left);
1719    if (node.right) q.push(node.right);
1720  }
1721}
1722
1723function dfs(root) {
1724  if (!root) return;
1725  console.log(root.val);
1726  dfs(root.left);
1727  dfs(root.right);
1728}`},{title:"Tree BFS & DFS (C++)",language:"cpp",code:`#include <queue>
1729#include <iostream>
1730
1731void bfs(TreeNode* root) {
1732    if (!root) return;
1733    std::queue<TreeNode*> q; q.push(root);
1734    while (!q.empty()) {
1735        TreeNode* node = q.front(); q.pop();
1736        std::cout << node->val << " ";
1737        if (node->left) q.push(node->left);
1738        if (node->right) q.push(node->right);
1739    }
1740}
1741
1742void dfs(TreeNode* root) {
1743    if (!root) return;
1744    std::cout << root->val << " ";
1745    dfs(root->left);
1746    dfs(root->right);
1747}`},{title:"Tree BFS & DFS (Java)",language:"java",code:`import java.util.LinkedList;
1748import java.util.Queue;
1749
1750public static void bfs(TreeNode root) {
1751    if (root == null) return;
1752    Queue<TreeNode> q = new LinkedList<>(); q.add(root);
1753    while (!q.isEmpty()) {
1754        TreeNode node = q.poll();
1755        System.out.print(node.val + " ");
1756        if (node.left != null) q.add(node.left);
1757        if (node.right != null) q.add(node.right);
1758    }
1759}
1760
1761public static void dfs(TreeNode root) {
1762    if (root == null) return;
1763    System.out.print(root.val + " ");
1764    dfs(root.left);
1765    dfs(root.right);
1766}`}],relatedTopics:["tree-traversals","graph-bfs-dfs"]}},{id:"tree-binary",title:"Binary Tree",description:"Tree where each node has at most two children",color:"#ff79c6",icon:"GitFork",content:{overview:"A **Binary Tree** is a fundamental non-linear data structure where every node has **at most two children**, strictly partitioned into a **left child** and a **right child**. It provides the architectural foundation for advanced data structures including Binary Search Trees (BSTs), Heaps, Huffman Coding Trees, and Expression Trees. Understanding binary tree properties, node limits, and height formulas is crucial for analyzing tree efficiency.",keyPoints:["Constraint: Node degree ≤ 2 (each node has 0, 1, or 2 children)","Maximum nodes at level k is 2ᵏ (where root is level 0)","Maximum total nodes in a binary tree of height h is 2^(h+1) − 1","Minimum height of a binary tree with N nodes is ⌊log₂ N⌋","Structural Variants: Full, Complete, Perfect, Balanced, and Degenerate (Skewed)"],sections:[{title:"Taxonomy of Binary Trees",body:`Binary trees are classified into 5 distinct structural forms:
1767
1768### 1. Full (Proper/Strict) Binary Tree
1769Every node has **either 0 or 2 children**. No node has just 1 child.
1770\`\`\`
1771      1
1772     / \\
1773    2   3
1774   / \\
1775  4   5
1776\`\`\`
1777
1778### 2. Complete Binary Tree
1779All levels are **completely filled**, except possibly the last level, which must be **filled strictly from left to right**. (This layout allows array-based heap storage!).
1780\`\`\`
1781      1
1782     / \\
1783    2   3
1784   / \\
1785  4   5
1786\`\`\`
1787
1788### 3. Perfect Binary Tree
1789All internal nodes have **2 children**, and **all leaf nodes sit at the exact same depth**.
1790\`\`\`
1791      1
1792     / \\
1793    2   3
1794   / \\ / \\
1795  4  5 6  7
1796\`\`\`
1797
1798### 4. Balanced Binary Tree
1799The height difference between left and right subtrees of EVERY node is at most 1 (e.g., AVL tree).
1800
1801### 5. Degenerate (Skewed) Binary Tree
1802Every node has only 1 child. The tree degenerates into a **Linked List**, tanking search performance to O(N).
1803\`\`\`
1804  1
1805   \\
1806    2
1807     \\
1808      3
1809\`\`\``},{title:"Mathematical Formulas & Properties",body:`| Property | Mathematical Formula | Explanation |
1810|---|---|---|
1811| **Max nodes at level k** | $2^k$ | Level 0 has $1$, Level 1 has $2$, Level 2 has $4$ |
1812| **Max total nodes (Height h)** | $2^{h+1} - 1$ | Geometric sum of nodes across all levels |
1813| **Min height (N nodes)** | $\\lfloor \\log_2 N \\rfloor$ | Achieved in a complete/perfect binary tree |
1814| **Max height (N nodes)** | $N - 1$ | Occurs in a degenerate single-line tree |
1815| **Total Edges (N nodes)** | $N - 1$ | Every node except root has 1 incoming parent edge |`}
1815],codeExamples:[{title:"Binary Tree (Python)",language:"python",code:`class TreeNode:
1816    def __init__(self, val=0, left=None, right=None):
1817        self.val = val
1818        self.left = left
1819        self.right = right
1820
1821root = TreeNode(1, TreeNode(2), TreeNode(3))`},{title:"Binary Tree (JavaScript)",language:"javascript",code:`class TreeNode {
1822  constructor(val = 0, left = null, right = null) {
1823    this.val = val;
1824    this.left = left;
1825    this.right = right;
1826  }
1827}
1828
1829const root = new TreeNode(1, new TreeNode(2), new TreeNode(3));`},{title:"Binary Tree (C++)",language:"cpp",code:`struct TreeNode {
1830    int val;
1831    TreeNode *left, *right;
1832    TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
1833};
1834
1835TreeNode* root = new TreeNode(1);
1836root->left = new TreeNode(2);
1837root->right = new TreeNode(3);`},{title:"Binary Tree (Java)",language:"java",code:`class TreeNode {
1838    int val;
1839    TreeNode left, right;
1840    TreeNode(int val) { this.val = val; }
1841}
1842
1843TreeNode root = new TreeNode(1);
1844root.left = new TreeNode(2);
1845root.right = new TreeNode(3);`}],relatedTopics:["tree-bst","tree-traversals"]}},{id:"tree-bst",title:"Binary Search Tree",shortTitle:"BST",description:"Binary tree with ordered insertion for efficient search",color:"#ff79c6",icon:"Search",content:{overview:"A **Binary Search Tree (BST)** is a node-based binary tree data structure that enforces a strict ordering invariant: for every node, all values in its **left subtree are strictly smaller** than the node's value, and all values in its **right subtree are strictly larger**. This ordering property enables binary-search-like lookup efficiency on dynamic data structures, allowing search, insertion, and deletion in **O(log N) average time**. However, without self-balancing mechanisms, sequential insertions can cause a BST to degenerate into an O(N) linked list.",keyPoints:["BST Ordering Invariant: Left Subtree Values < Node Value < Right Subtree Values (for all nodes)","Inorder Traversal (Left → Node → Right) produces all stored keys in strictly ascending sorted order","Average Time Complexity: O(log N) for Search, Insert, and Delete on reasonably balanced trees","Worst-case Time Complexity: O(N) when keys are inserted in pre-sorted order, turning the tree into a linked list","Node Deletion has 3 distinct cases: Leaf node (direct remove), 1 child (bypass pointer), 2 children (replace with Inorder Successor)"],sections:[{title:"Core BST Operations & Mechanics",body:`### 1. Search Operation — $O(\\log N)$ avg / $O(N)$ worst
1846Compare target value with the current node: if equal, target found; if smaller, recurse down the **left subtree**; if larger, recurse down the **right subtree**.
1847\`\`\`
1848        8          Searching for 6:
1849       / \\
1850      3   10       1. 6 < 8 ➔ Go Left to 3
1851     / \\    \\      2. 6 > 3 ➔ Go Right to 6
1852    1   6   14     3. 6 == 6 ➔ Found!
1853\`\`\`
1854
1855### 2. Insertion Operation — $O(\\log N)$ avg / $O(N)$ worst
1856Traverse down the tree comparing values until reaching a \`None\` pointer, then attach a new \`BSTNode\` at that leaf position. Duplicate keys are typically disallowed or tracked via a frequency counter.
1857
1858### 3. Deletion Operation — 3 Structural Cases
1859- **Case 1 (Leaf Node)**: Simply unlink the node from its parent.
1860- **Case 2 (Single Child)**: Bypass the target node by connecting its parent directly to its single child.
1861- **Case 3 (Two Children)**: Find the node's **Inorder Successor** (smallest key in right subtree) or **Inorder Predecessor** (largest key in left subtree), copy its value into the target node, then recursively delete the successor.`},{title:"The Unbalanced Tree Degeneration Problem",body:`Because standard BSTs do not perform automatic balancing, inserting sorted data (e.g. \`[1, 2, 3, 4, 5]\`) creates a **right-skewed degenerate tree**:
1862
1863\`\`\`
18641
1865 \\
1866  2
1867   \\
1868    3
1869     \\
1870      4
1871       \\
1872        5
1873\`\`\`
1874
1875In this state, search time degrades from $O(\\log N)$ to $O(N)$, completely defeating the purpose of a BST. This exact flaw motivated the invention of **Self-Balancing Trees (AVL and Red-Black Trees)**.`}
1875],complexity:{best:"O(log n)",average:"O(log n)",worst:"O(n) — skewed tree",space:"O(n)"},codeExamples:[{title:"BST Insert & Search (Python)",language:"python",code:`def insert_bst(root, val):
1876    if not root: return TreeNode(val)
1877    if val < root.val: root.left = insert_bst(root.left, val)
1878    else: root.right = insert_bst(root.right, val)
1879    return root`},{title:"BST Insert & Search (JavaScript)",language:"javascript",code:`function insertBST(root, val) {
1880  if (!root) return new TreeNode(val);
1881  if (val < root.val) root.left = insertBST(root.left, val);
1882  else root.right = insertBST(root.right, val);
1883  return root;
1884}`},{title:"BST Insert & Search (C++)",language:"cpp",code:`TreeNode* insertBST(TreeNode* root, int val) {
1885    if (!root) return new TreeNode(val);
1886    if (val < root->val) root->left = insertBST(root->left, val);
1887    else root->right = insertBST(root->right, val);
1888    return root;
1889}`},{title:"BST Insert & Search (Java)",language:"java",code:`public static TreeNode insertBST(TreeNode root, int val) {
1890    if (root == null) return new TreeNode(val);
1891    if (val < root.val) root.left = insertBST(root.left, val);
1892    else root.right = insertBST(root.right, val);
1893    return root;
1894}`}],relatedTopics:["tree-binary","tree-avl"]}},{id:"tree-avl",title:"AVL Tree",description:"Self-balancing BST with guaranteed O(log n) operations",color:"#ff79c6",icon:"Scale",content:{overview:"An **AVL Tree** (named after inventors Adelson-Velsky and Landis) is a **self-balancing Binary Search Tree**. It enforces a height-balance invariant: for every single node in the tree, the height difference between its left and right subtrees — known as the **Balance Factor** — must strictly remain within **{-1, 0, +1}**. If an insertion or deletion causes a node's Balance Factor to hit ±2, the tree instantly performs one of four local **tree rotations** to re-balance the tree. This guarantees a strict height bound of $H \\le 1.44 \\log_2 N$, providing guaranteed **O(log N)** performance for all operations.",keyPoints:["Strict Invariant: Balance Factor = Height(Left Subtree) − Height(Right Subtree) ∈ {-1, 0, +1}","Guarantees absolute $O(\\log N)$ worst-case time for Search, Insert, and Delete (no skewing possible)","Rebalances locally using 4 Rotation types: Left-Left (Single Right), Right-Right (Single Left), Left-Right (Double), Right-Left (Double)","More strictly balanced than Red-Black trees: faster for lookup-heavy workloads, but higher rotation overhead during insertions/deletions"],sections:[{title:"Balance Factor & Rotation Mechanics",body:`**Balance Factor (BF)** is calculated as:
1895$$\\text{BF}(\\text{node}) = \\text{Height}(\\text{Left Subtree}) - \\text{Height}(\\text{Right Subtree})$$
1896
1897If $\\text{BF} > +1$, the left side is too heavy. If $\\text{BF} < -1$, the right side is too heavy.
1898
1899### The 4 Rotation Scenarios:
1900
1901**1. Left-Left Case (LL) ➔ Single Right Rotation**
1902Triggered when a node has $\\text{BF} = +2$ and its left child has $\\text{BF} \\ge 0$.
1903\`\`\`
1904      Z (+2)              Y
1905     /                   / \\
1906    Y (+1)     ➔        X   Z
1907   /
1908  X
1909\`\`\`
1910
1911**2. Right-Right Case (RR) ➔ Single Left Rotation**
1912Triggered when a node has $\\text{BF} = -2$ and its right child has $\\text{BF} \\le 0$.
1913\`\`\`
1914  Z (-2)                  Y
1915   \\                     / \\
1916    Y (-1)     ➔        Z   X
1917     \\
1918      X
1919\`\`\`
1920
1921**3. Left-Right Case (LR) ➔ Left Rotate Child, then Right Rotate Parent**
1922Triggered when a node has $\\text{BF} = +2$ and its left child has $\\text{BF} = -1$.
1923
1924**4. Right-Left Case (RL) ➔ Right Rotate Child, then Left Rotate Parent**
1925Triggered when a node has $\\text{BF} = -2$ and its right child has $\\text{BF} = +1$.`},{title:"AVL vs Red-Black Trees",body:`| Metric | AVL Tree | Red-Black Tree |
1926|---|---|---|
1927| **Height Guarantee** | Strictly $1.44 \\log_2 N$ | Relaxed $2 \\log_2 N$ |
1928| **Lookup Speed** | Faster (slighter shorter height) | Slightly slower |
1929| **Insertion/Deletion** | Slower (requires more rotations) | Faster (max 2 rotations for insert) |
1930| **Use Case** | Read-heavy workloads (databases, lookups) | Write-heavy / general-purpose libraries (\`std::map\` in C++) |`}
1930],complexity:{time:"O(log n) for all operations",space:"O(n)"},codeExamples:[{title:"AVL Right Rotation (Python)",language:"python",code:`def right_rotate(y):
1931    x = y.left
1932    T2 = x.right
1933    x.right = y
1934    y.left = T2
1935    return x`},{title:"AVL Right Rotation (JavaScript)",language:"javascript",code:`function rightRotate(y) {
1936  let x = y.left;
1937  let T2 = x.right;
1938  x.right = y;
1939  y.left = T2;
1940  return x;
1941}`},{title:"AVL Right Rotation (C++)",language:"cpp",code:`TreeNode* rightRotate(TreeNode* y) {
1942    TreeNode* x = y->left;
1943    TreeNode* T2 = x->right;
1944    x->right = y;
1945    y->left = T2;
1946    return x;
1947}`},{title:"AVL Right Rotation (Java)",language:"java",code:`public static TreeNode rightRotate(TreeNode y) {
1948    TreeNode x = y.left;
1949    TreeNode T2 = x.right;
1950    x.right = y;
1951    y.left = T2;
1952    return x;
1953}`}],relatedTopics:["tree-bst","tree-b-trees"]}},{id:"tree-b-trees",title:"B-Trees",description:"Self-balancing multi-way search trees for databases",color:"#ff79c6",icon:"Database",content:{overview:"A **B-Tree** is a self-balancing, multi-way search tree designed to handle large quantities of data efficiently. Unlike binary search trees where nodes hold 1 key and 2 children, a B-Tree node can store **hundreds of keys and children** within a single node. B-Trees are explicitly engineered for systems that perform **block-based disk reads/writes**, making them the premier choice for **file systems (NTFS, ext4)** and **relational database indexes (MySQL InnoDB, PostgreSQL, SQLite)**.",keyPoints:["Multi-way Search Tree: Nodes hold up to m − 1 keys and m children (where m is the order of the B-Tree)","Perfect Balance Guarantee: All leaf nodes reside at the exact same depth","Disk-I/O Optimization: Storing large node blocks matches hardware disk page sizes (4KB–64KB), reducing disk seeks","Guaranteed O(log N) search, insert, and delete with extremely low tree height (typically height 3-4 for millions of records)","B+ Tree Variant: Stores all data records exclusively in leaves and links leaves sequentially for blazingly fast range queries"],sections:[{title:"B-Tree Formal Invariants & Rules",body:`For a B-Tree of **Order m**:
1954
19551. Every node has at most **m children** and at most **m − 1 keys**.
19562. Every internal node (except root) has at least **⌈m / 2⌉ children**.
19573. The root has at least 2 children if it is not a leaf.
19584. A non-leaf node with **k keys** has exactly **k + 1 children**.
19595. All leaf nodes appear at the **exact same level** (perfect balance).
1960
1961\`\`\`
1962          [10, 20]
1963         /   |   \\
1964   [5, 7] [12,15] [25, 30]
1965\`\`\``},{title:"Why B-Trees Outperform Binary Trees on Disk",body:`### The Storage Bottleneck
1966Fetching data from RAM takes ~100 nanoseconds, while reading a block from physical disk/SSD takes ~1–10 milliseconds (**100,000x slower**). Therefore, performance is measured in **Disk I/O seeks**, not CPU cycles.
1967
1968### Binary Tree vs B-Tree Disk Seeks (1,000,000 Records)
1969- **Binary Search Tree ($m=2$)**: Height $\\approx \\log_2(10^6) \\approx 20$. Requires up to **20 separate disk reads**.
1970- **B-Tree ($m=100$)**: Height $\\approx \\log_{100}(10^6) = 3$. Requires only **3 disk reads**!
1971
1972By packing hundreds of sorted keys into a single page-sized node, B-Trees minimize expensive disk head movements.`}],codeExamples:[{title:"B-Tree Node (Python)",language:"python",code:`class BTreeNode:
1973    def __init__(self, leaf=True):
1974        self.keys = []
1975        self.children = []
1976        self.leaf = leaf`},{title:"B-Tree Node (JavaScript)",language:"javascript",code:`class BTreeNode {
1977  constructor(leaf = true) {
1978    this.keys = [];
1979    this.children = [];
1980    this.leaf = leaf;
1981  }
1982}`},{title:"B-Tree Node (C++)",language:"cpp",code:`#include <vector>
1983
1984struct BTreeNode {
1985    std::vector<int> keys;
1986    std::vector<BTreeNode*> children;
1987    bool leaf;
1988    BTreeNode(bool l = true) : leaf(l) {}
1989};`},{title:"B-Tree Node (Java)",language:"java",code:`import java.util.ArrayList;
1990
1991class BTreeNode {
1992    ArrayList<Integer> keys = new ArrayList<>();
1993    ArrayList<BTreeNode> children = new ArrayList<>();
1994    boolean leaf;
1995    BTreeNode(boolean leaf) { this.leaf = leaf; }
1996}`}],relatedTopics:["tree-avl","linear-indexing"]}},{id:"tree-heap",title:"Heap (Min/Max)",shortTitle:"Heap",description:"Complete binary tree with heap ordering property",color:"#ff79c6",icon:"Triangle",content:{overview:"A **Heap** is a complete binary tree that satisfies the **Heap Ordering Property**. In a **Max-Heap**, the value of every parent node is greater than or equal to the values of its children, ensuring the maximum element al
1996ways sits at the root. In a **Min-Heap**, every parent is less than or equal to its children, placing the minimum element at the root. Because heaps are strictly complete binary trees, they are implemented as **contiguous arrays** without storing any node pointers, providing instant **O(1) access to extreme values**.",keyPoints:["Complete Binary Tree layout enables seamless contiguous array storage (zero pointer overhead)","Min-Heap Rule: `Parent ≤ Children` (Root = Minimum); Max-Heap Rule: `Parent ≥ Children` (Root = Maximum)","Array Index Arithmetic: For node at index `i`, `Left Child = 2i + 1`, `Right Child = 2i + 2`, `Parent = (i - 1) // 2`","Operations: Peek is O(1), Insert (Heapify-Up) is O(log N), Extract-Min/Max (Heapify-Down) is O(log N)","Building a Heap from an un-ordered array using Floyd's algorithm takes $O(N)$ linear time (not $O(N \\log N)$!)","Primary data structure behind Priority Queues, Dijkstra's algorithm, Prim's MST, and Heap Sort"],sections:[{title:"Array Representation & Zero-Pointer Index Math",body:`A Heap is stored directly in an array by traversing the complete binary tree level by level.
1997 
1998### Index Formulas (0-based):
1999- **Left Child Index**: $2i + 1$
2000- **Right Child Index**: $2i + 2$
2001- **Parent Index**: $\\lfloor (i - 1) / 2 \\rfloor$`},{title:"Heap Operations & Time Complexities",body:`| Operation | Action | Time Complexity |
2002|---|---|---|
2003| **Peek (Get Min/Max)** | Read root element at index \`0\` | **O(1)** |
2004| **Insert (Push)** | Append element to end of array, then **Heapify-Up** (bubble up) | **O(log N)** |
2005| **Extract (Pop)** | Swap root with last element, pop last element, then **Heapify-Down** (bubble down) | **O(log N)** |
2006| **Build Heap (Heapify)** | Apply Heapify-Down from bottom-most internal nodes up to root | **O(N)** |
2007| **Delete Arbitrary** | Swap target with last element, pop, then Heapify | **O(log N)** |`}],complexity:{time:"O(1) peek, O(log n) insert/extract",space:"O(n)"},codeExamples:[{title:"Min-Heap (Python)",language:"python",code:`import heapq
2008heap = []
2009heapq.heappush(heap, 30) # Push - O(log n)
2010heapq.heappush(heap, 10)
2011min_val = heapq.heappop(heap) # Pop min -> 10`},{title:"Min-Heap (JavaScript)",language:"javascript",code:`class MinHeap {
2012  constructor() { this.heap = []; }
2013  push(val) { this.heap.push(val); }
2014  pop() { return this.heap.shift(); }
2015}`},{title:"Min-Heap (C++)",language:"cpp",code:`#include <queue>
2016#include <vector>
2017
2018std::priority_queue<int, std::vector<int>, std::greater<int>> minHeap;
2019minHeap.push(30);
2020minHeap.push(10);
2021int minVal = minHeap.top(); // 10
2022minHeap.pop();`},{title:"Min-Heap (Java)",language:"java",code:`import java.util.PriorityQueue;
2023
2024PriorityQueue<Integer> minHeap = new PriorityQueue<>();
2025minHeap.add(30);
2026minHeap.add(10);
2027int minVal = minHeap.poll(); // 10`}],relatedTopics:["heap-sort","tree-binary"]}}]},{id:"graph-data-structures",title:"Graph Data Structures",shortTitle:"Graphs",description:"Network structures with vertices and edges",color:"#50fa7b",icon:"Network",children:[{id:"what-is-graph",title:"What is a Graph?",description:"Understanding graph structure, types, and representations",color:"#50fa7b",icon:"Share2",content:{overview:"A **Graph** is a versatile non-linear data structure defined as a pair $G = (V, E)$, consisting of a set of **Vertices (Nodes)** $V$ and a set of **Edges (Connections)** $E$ linking pairs of vertices. Unlike trees, graphs have no designated root node, no hierarchical parent-child restriction, and can freely contain **cycles**. Graphs are the primary data structure for modeling interconnected networks — from social media connections (LinkedIn/Facebook) and transportation networks (Google Maps/flight routes) to web page hyperlinks (PageRank algorithm) and computer networks.",keyPoints:["Graph Definition: $G = (V, E)$ where $V$ is the set of vertices and $E$ is the set of edges","Directed vs Undirected: Directed edges have one-way directionality ($U \\rightarrow V$), while Undirected edges allow two-way traversal ($U \\leftrightarrow V$)","Weighted vs Unweighted: Weighted edges carry numerical values representing distance, cost, time, or capacity","Cycle vs Acyclic: Graphs can contain cycles (loops returning to a starting node). A connected acyclic graph is a Tree!","Adjacency List ($O(V + E)$ space): Highly efficie
2027nt for sparse graphs (most real-world networks)","Adjacency Matrix ($O(V^2)$ space): Fast $O(1)$ edge existence checks, best for dense graphs"],sections:[{title:"Graph Taxonomy & Classifications",body:`Graphs are categorized based on edge properties and connectivity:
2028
2029### 1. Undirected Graph
2030Edges have no directional orientation. If edge $(A, B)$ exists, traversal can occur from $A \\rightarrow B$ and $B \\rightarrow A$.
2031\`\`\`
2032  A --- B
2033  |     |
2034  C --- D
2035\`\`\`
2036
2037### 2. Directed Graph (Digraph)
2038Edges have explicit direction indicated by arrows. Edge $(A \\rightarrow B)$ allows traversal from $A$ to $B$, but NOT $B$ to $A$ unless $(B \\rightarrow A)$ is also present.
2039\`\`\`
2040  A → B
2041  ↑   ↓
2042  C ← D
2043\`\`\`
2044
2045### 3. Weighted Graph
2046Edges carry numerical weights representing cost, latency, distance, or bandwidth.
2047\`\`\`
2048  A --5-- B
2049  |       |
2050  3       2
2051  |       |
2052  C --1-- D
2053\`\`\`
2054
2055### 4. Special Structural Types
2056- **DAG (Directed Acyclic Graph)**: Directed graph with NO cycles — crucial for build systems (Make/npm), task scheduling, and git commits.
2057- **Bipartite Graph**: Vertices can be partitioned into 2 sets where no two vertices in the same set share an edge.
2058- **Complete Graph**: Every vertex is directly connected to every other vertex (total edges = $V(V-1)/2$).`},{title:"Representation: Adjacency List vs Adjacency Matrix",body:`| Metric / Operation | Adjacency List (\`dict[list]\`) | Adjacency Matrix (\`2D Array\`) |
2059|---|---|---|
2060| **Memory Space** | **$O(V + E)$** (Optimal for sparse graphs) | **$O(V^2)$** (Wastes space on sparse graphs) |
2061| **Check if $(U, V)$ edge exists** | $O(\\text{degree}(U))$ lookup | **$O(1)$** direct index lookup |
2062| **Find all neighbors of $U$** | **$O(\\text{degree}(U))$** (Instant iteration) | $O(V)$ (Must scan full row) |
2063| **Add a Vertex** | $O(1)$ | $O(V^2)$ (Must resize 2D array) |
2064| **Add an Edge** | $O(1)$ | $O(1)$ |
2065| **Best For** | Sparse graphs ($E \\ll V^2$) — almost all real graphs | Dense graphs ($E \\approx V^2$) |`}],codeExamples:[{title:"Graph Representation (Python)",language:"python",code:`graph = {
2066    'A': ['B', 'C'],
2067    'B': ['A', 'D'],
2068    'C': ['A', 'D'],
2069    'D': ['B', 'C']
2070}`},{title:"Graph Representation (JavaScript)",language:"javascript",code:`const graph = {
2071  'A': ['B', 'C'],
2072  'B': ['A', 'D'],
2073  'C': ['A', 'D'],
2074  'D': ['B', 'C']
2075};`},{title:"Graph Representation (C++)",language:"cpp",code:`#include <vector>
2076#include <unordered_map>
2077
2078std::unordered_map<char, std::vector<char>> graph = {
2079    {'A', {'B', 'C'}},
2080    {'B', {'A', 'D'}},
2081    {'C', {'A', 'D'}},
2082    {'D', {'B', 'C'}}
2083};`},{title:"Graph Representation (Java)",language:"java",code:`import java.util.*;
2084
2085Map<Character, List<Character>> graph = new HashMap<>();
2086graph.put('A', Arrays.asList('B', 'C'));
2087graph.put('B', Arrays.asList('A', 'D'));
2088graph.put('C', Arrays.asList('A', 'D'));
2089graph.put('D', Arrays.asList('B', 'C'));`}],relatedTopics:["graph-bfs-dfs","graph-dijkstra"]}},{id:"graph-bfs-dfs",title:"BFS & DFS on Graphs",shortTitle:"Graph BFS/DFS",description:"Breadth-first and depth-first graph traversal algorithms",color:"#50fa7b",icon:"Radar",content:{overview:"**Breadth-First Search (BFS)** and **Depth-First Search (DFS)** are the two primary foundational traversal algorithms for graphs. Graph traversals build directly upon tree traversals, with one critical addition: because graphs can contain **cycles**, traversals must maintain a **Visited Set** to track visited nodes and prevent infinite looping. **BFS** explores the graph layer by layer using a **FIFO Queue**, making it ideal for unweighted shortest paths. **DFS** plunges as deeply as possible along a path using a **LIFO Stack or Recursion**, making it ideal for cycle detection, topological sorting, and pathfinding.",keyPoints:["Mandatory Cycle Prevention: Must maintain a `visited = set()` to avoid infinite loops in cyclic graphs","BFS (Queue): Explores nodes in concentric layers — guarantees finding the **shortest path (fewest edges)** in unweighted graphs","DFS (Stack/Recursion): Explores down a path until hitting a dead end before backtracking — uses less memory on narrow graphs","Time Complexity: Both algorithms run in $O(V + E)$ time, visiting every vertex and examining every edge","Space Complexity: $O(V)$ auxiliary space to store the visited set and the Queue/Stack"],sections:[{title:"BFS Mechanics & Shortest Unweighted Path Guarantee",body:`BFS explores all 1-hop neighbors, then 2-hop neighbors, then 3-hop neighbors in strict order:
2090\`\`\`
2091Graph:  A --- B
2092        |     |
2093        C --- D --- E
2094
2095BFS Execution from A:
20961. Queue: [A] ➔ Visit A
20972. Queue: [B, C] ➔ Visit B
20983. Queue: [C, D] ➔ Visit C
20994. Queue: [D] ➔ Visit D
21005. Queue: [E] ➔ Visit E
2101
2102Traversal Order: A ➔ B ➔ C ➔ D ➔ E
2103\`\`\`
2104
2105**Why BFS guarantees shortest path in unweighted graphs:**
2106Because BFS processes nodes in increasing distance order from the source, the first time BFS reaches a target vertex $T$, the path taken is **guaranteed to have the minimum number of edges**.`},{title:"DFS Mechanics & Recursive Backtracking",body:`DFS pushes down a single path as far as possible until it reaches a dead end, then backtracks:
2107\`\`\`
2108DFS Execution from A (Recursive):
2109Visit A ➔ Visit B ➔ Visit D ➔ Visit C (neighbors A, D already visited!) ➔ Visit E
2110
2111Traversal Order: A ➔ B ➔ D ➔ C ➔ E
2112\`\`\`
2113
2114### Primary DFS Use Cases:
2115- **Cycle Detection**: If DFS encounters a node currently in the active recursion call stack, a cycle exists!
2116- **Topological Sorting**: Ordering tasks with dependencies (in DAGs).
2117- **Connected Components**: Counting disconnected subgraphs in an isolated network.`}],complexity:{time:"O(V + E)",space:"O(V)"},codeExamples:[{title:"Graph BFS (Python)",language:"python",code:`from collections import deque
2118
2119def graph_bfs(graph, start):
2120    visited = {start}
2121    q = deque([start])
2122    while q:
2123        node = q.popleft()
2124        print(node, end=" ")
2125        for nxt in graph[node]:
2126            if nxt not in visited:
2127                visited.add(nxt)
2128                q.append(nxt)`},{title:"Graph BFS (JavaScript)",language:"javascript",code:`function graphBFS(graph, start) {
2129  const visited = new Set([start]);
2130  const q = [start];
2131  while (q.length > 0) {
2132    const node = q.shift();
2133    console.log(node);
2134    for (const nxt of graph[node] || []) {
2135      if (!visited.has(nxt)) {
2136        visited.add(nxt);
2137        q.push(nxt);
2138      }
2139    }
2140  }
2141}`},{title:"Graph BFS (C++)",language:"cpp",code:`#include <queue>
2142#include <unordered_set>
2143#include <iostream>
2144
2145void graphBFS(std::unordered_map<char, std::vector<char>>& graph, char start) {
2146    std::unordered_set<char> visited = {start};
2147    std::queue<char> q; q.push(start);
2148    while (!q.empty()) {
2149        char node = q.front(); q.pop();
2150        std::cout << node << " ";
2151        for (char nxt : graph[node]) {
2152            if (!visited.count(nxt)) { visited.insert(nxt); q.push(nxt); }
2153        }
2154    }
2155}`},{title:"Graph BFS (Java)",language:"java",code:`import java.util.*;
2156
2157public static void graphBFS(Map<Character, List<Character>> graph, char start) {
2158    Set<Character> visited = new HashSet<>(); visited.add(start);
2159    Queue<Character> q = new LinkedList<>(); q.add(start);
2160    while (!q.isEmpty()) {
2161        char node = q.poll();
2162        System.out.print(node + " ");
2163        for (char nxt : graph.getOrDefault(node, Collections.emptyList())) {
2164            if (!visited.contains(nxt)) { visited.add(nxt); q.add(nxt); }
2165        }
2166    }
2167}`}],relatedTopics:["what-is-graph","graph-dijkstra"]}},{id:"graph-dijkstra",title:"Dijkstra's Algorithm",shortTitle:"Dijkstra's",description:"Finding shortest paths in weighted graphs",color:"#50fa7b",icon:"Route",content:{overview:"**Dijkstra's Algorithm** is a famous greedy algorithm created by Edsger W. Dijkstra in 1956 to solve the **Single-Source Shortest Path problem** on weighted graphs with **non-negative edge weights**. It calculates the exact minimum cost/distance from a starting vertex to every other vertex in the graph. By prioritizing the closest unvisited node using a **Priority Queue (Min-Heap)**, Dijkstra's algorithm achieves an efficient time complexity of **$O((V + E) \\log V)$**.",keyPoints:["Computes shortest distance from a single source to ALL other reachable vertices in a weighted graph","Strict Invariant: Edge weights MUST be non-negative ($W(u, v) \\ge 0$). Fails silently on negative weights!","Greedy Paradigm: Always extracts the unvisited vertex with the smallest tentative distance from the Min-Heap","Edge Relaxation: If \\`dist[u] + weight(u, v) < dist[v]\\`, update \\`dist[v]\\` to the smaller value and push to Min-Heap","Optimized Complexity: $O((V + E) \\log V)$ using Min-Heap priority queue ($O(V^2)$ without heap)","For graphs with negative edge weights, use the **Bellman-Ford Algorithm** ($O(V \\cdot E)$)"],sections:[{title:"Step-by-Step Edge Relaxation Mechanics",body:`### The Core Relaxation Formula
2168Edge relaxation checks whether passing through vertex $u$ offers a shorter path to vertex $v$ than currently known:
2169$$\\text{If } \\text{dist}[u] + \\text{weight}(u, v) < \\text{dist}[v] \\implies \\text{dist}[v] = \\text{dist}[u] + \\text{weight}(u, v)$$
2170
2171Use the interactive visualizer above to step through the Priority Queue (Min-
2171Heap) pops, edge relaxations, distance dictionary updates, and final path determinations in real time.`},{title:"Why Dijkstra Fails on Negative Edge Weights",body:`Dijkstra's greedy assumption assumes that once a vertex is popped from the Min-Heap, its shortest distance is **permanently finalized**. Negative edge weights violate this assumption:
2172
2173\`\`\`
2174  A --1-- B
2175  |       |
2176  2      -5
2177  |       |
2178  C --1-- D
2179\`\`\`
2180
21811. Dijkstra pops $B$ with distance 1 and assumes $B$'s shortest path is 1.
21822. But the path $A \\rightarrow C \\rightarrow D \\rightarrow B$ has total cost $2 + 1 + (-5) = -2$.
21833. Dijkstra misses this shorter path because it never revisits finalized nodes.
2184
2185**Solution**: Use **Bellman-Ford** or **SPFA** when negative weights exist.`}],complexity:{time:"O((V + E) log V) with min-heap",space:"O(V)"},codeExamples:[{title:"Dijkstra Algorithm (Python)",language:"python",code:`import heapq
2186
2187def dijkstra(graph, start):
2188    dist = {node: float('inf') for node in graph}
2189    dist[start] = 0
2190    pq = [(0, start)]
2191    while pq:
2192        d, u = heapq.heappop(pq)
2193        if d > dist[u]: continue
2194        for v, weight in graph[u]:
2195            if dist[u] + weight < dist[v]:
2196                dist[v] = dist[u] + weight
2197                heapq.heappush(pq, (dist[v], v))
2198    return dist`},{title:"Dijkstra Algorithm (JavaScript)",language:"javascript",code:`function dijkstra(graph, start) {
2199  const dist = {};
2200  for (let node in graph) dist[node] = Infinity;
2201  dist[start] = 0;
2202  const pq = [[0, start]];
2203  while (pq.length > 0) {
2204    pq.sort((a, b) => a[0] - b[0]);
2205    const [d, u] = pq.shift();
2206    if (d > dist[u]) continue;
2207    for (const [v, weight] of graph[u]) {
2208      if (dist[u] + weight < dist[v]) {
2209        dist[v] = dist[u] + weight;
2210        pq.push([dist[v], v]);
2211      }
2212    }
2213  }
2214  return dist;
2215}`},{title:"Dijkstra Algorithm (C++)",language:"cpp",code:`#include <queue>
2216#include <vector>
2217#include <unordered_map>
2218
2219std::unordered_map<int, int> dijkstra(std::unordered_map<int, std::vector<std::pair<int, int>>>& graph, int start) {
2220    std::unordered_map<int, int> dist;
2221    std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int>>, std::greater<>> pq;
2222    dist[start] = 0; pq.push({0, start});
2223    while (!pq.empty()) {
2224        auto [d, u] = pq.top(); pq.pop();
2225        if (d > dist[u]) continue;
2226        for (auto& [v, w] : graph[u]) {
2227            if (!dist.count(v) || dist[u] + w < dist[v]) {
2228                dist[v] = dist[u] + w;
2229                pq.push({dist[v], v});
2230            }
2231        }
2232    }
2233    return dist;
2234}`},{title:"Dijkstra Algorithm (Java)",language:"java",code:`import java.util.*;
2235
2236public static Map<Integer, Integer> dijkstra(Map<Integer, List<int[]>> graph, int start) {
2237    Map<Integer, Integer> dist = new HashMap<>();
2238    PriorityQueue<int[]> pq = new PriorityQueue<>(Comparator.comparingInt(a -> a[0]));
2239    dist.put(start, 0); pq.add(new int[]{0, start});
2240    while (!pq.isEmpty()) {
2241        int[] curr = pq.poll(); int d = curr[0], u = curr[1];
2242        if (d > dist.get(u)) continue;
2243        for (int[] edge : graph.getOrDefault(u, Collections.emptyList())) {
2244            int v = edge[0], w = edge[1];
2245            if (dist.get(u) + w < dist.getOrDefault(v, Integer.MAX_VALUE)) {
2246                dist.put(v, dist.get(u) + w);
2247                pq.add(new int[]{dist.get(v), v});
2248            }
2249        }
2250    }
2251    return dist;
2252}`}],relatedTopics:["graph-bfs-dfs","what-is-graph"]}}]},{id:"indexing",title:"Indexing",shortTitle:"Indexing",description:"Techniques for fast data retrieval in databases and search engines",color:"#8be9fd",icon:"BookMarked",children:[{id:"linear-indexing",title:"Linear Indexing",description:"Sequential and direct address indexing techniques",color:"#8be9fd",icon:"List",content:{overview:"**Linear Indexing** is an auxiliary indexing technique where a separate index file stores sorted `(Search Key, Record Pointer)` pairs pointing to physical data records. It functions like a textbook table of contents: instead of scanning thousands of physical pages sequentially, you search the smaller sorted index first, then follow the record pointer directly to the target page in memory or on disk.",keyPoints:["Index Structure: A sorted array of (Search Key, File Pointer) tuples residing alongside the main data file","Dense Index: Contains an index entry for EVERY single record 
2252in the data file — fast lookup, higher memory overhead","Sparse Index: Contains index entries for only the FIRST record of each disk block — smaller index, requires sorted data file","Search Efficiency: Enables $O(\\log N)$ Binary Search over the index file, reducing disk reads from $O(N)$ to $O(\\log N)$","Limitation: Insertions and deletions require shifting index entries in $O(N)$ time, which led to the adoption of Tree-Based Indexes"],sections:[{title:"Dense Index vs Sparse Index Architecture",body:`### 1. Dense Index (1 Index Entry per Data Record)
2253Every record in the data file has an explicit pointer in the index.
2254\`\`\`
2255Index File (Sorted Keys):       Data File (Disk Records):
2256Key | Record Pointer             Record Details
2257----|---------------             --------------
2258101 | ➔                          {101, "Alice",  "Sales"}
2259102 | ➔                          {102, "Bob",    "Engineering"}
2260103 | ➔                          {103, "Carol",  "Design"}
2261104 | ➔                          {104, "Dave",   "Marketing"}
2262\`\`\`
2263- **Pros**: Blazingly fast lookup; data file does not need to be sorted.
2264- **Cons**: Large memory footprint.
2265
2266### 2. Sparse Index (1 Index Entry per Disk Block)
2267Index entries exist only for anchor keys (e.g. first record of each page/block).
2268\`\`\`
2269Index File:                     Data File Blocks on Disk:
2270Key | Block Pointer
2271----|--------------
2272101 | ➔                          Block 1: [ {101}, {102}, {103} ]
2273104 | ➔                          Block 2: [ {104}, {105}, {106} ]
2274107 | ➔                          Block 3: [ {107}, {108}, {109} ]
2275\`\`\`
2276- **Pros**: Compact index size; fits entirely in RAM cache.
2277- **Requirement**: Data file **MUST** be sorted physically by the search key!`},{title:"Performance Impact Comparison",body:`Searching for Employee ID #550,000 in a table of 1,000,000 records:
2278
2279- **Without Index (Full Table Scan)**: Scans up to **1,000,000 disk blocks** $\\rightarrow O(N)$ (takes seconds).
2280- **With Linear Index + Binary Search**: Performs binary search on the sorted index file in $\\approx \\log_2(10^6) \\approx 20$ steps, then makes 1 pointer jump $\\rightarrow O(\\log N)$ (takes milliseconds).
2281
2282However, because updating a linear index requires $O(N)$ array element shifting, modern relational databases use **Tree-Based Indexing (B+ Trees)** for dynamic workloads.`}],codeExamples:[{title:"Linear Index Lookup (Python)",language:"python",code:`import bisect
2283
2284index = [(101, 0), (102, 100), (105, 200)]  # (key, offset)
2285keys = [k for k, offset in index]
2286pos = bisect.bisect_left(keys, 102)
2287if pos < len(keys) and keys[pos] == 102:
2288    offset = index[pos][1]  # Jump to file offset directly!`},{title:"Linear Index Lookup (JavaScript)",language:"javascript",code:`const index = [{ key: 101, offset: 0 }, { key: 102, offset: 100 }, { key: 105, offset: 200 }];
2289const entry = index.find(item => item.key === 102);
2290if (entry) {
2291  const offset = entry.offset; // Jump to file offset directly!
2292}`},{title:"Linear Index Lookup (C++)",language:"cpp",code:`#include <vector>
2293#include <algorithm>
2294
2295struct IndexEntry { int key; long offset; };
2296std::vector<IndexEntry> index = {{101, 0}, {102, 100}, {105, 200}};
2297
2298auto it = std::lower_bound(index.begin(), index.end(), 102, [](const IndexEntry& e, int k) {
2299    return e.key < k;
2300});
2301if (it != index.end() && it->key == 102) {
2302    long offset = it->offset;
2303}`},{title:"Linear Index Lookup (Java)",language:"java",code:`import java.util.*;
2304
2305class IndexEntry { int key; long offset; IndexEntry(int k, long o) { key = k; offset = o; } }
2306List<IndexEntry> index = Arrays.asList(new IndexEntry(101, 0), new IndexEntry(102, 100));
2307for (IndexEntry entry : index) {
2308    if (entry.key == 102) { long offset = entry.offset; break; }
2309}`}],relatedTopics:["tree-based-indexing","binary-search-algo"]}},{id:"tree-based-indexing",title:"Tree-Based Indexing",description:"Using B-Trees and B+ Trees for database indexing",color:"#8be9fd",icon:"GitBranch",content:{overview:"**Tree-Based Indexing** uses dynamic, self-balancing search trees — overwhelmingly **B+ Trees** — to build database indexes. Unlike linear indexes that require costly $O(N)$ re-sorting upon insertion, B+ Tree indexes handle dynamic inserts, updates, and deletes in **$O(\\log N)$ time** while keeping index height extremely low. Tree-based indexing is the industry standard powering **MySQL (InnoDB), PostgreSQL, SQLite, Oracle, and MongoDB**.",keyPoints:["B+ Tree Architecture: All actual data pointers reside exclusively in leaf nodes; internal nodes store routing keys only","Sequential Leaf Linking: Leaves are doubly linked, enabling $O(\\log N + K)$ range queries (e.g. `WHERE age BETWEEN 20 AND 30`)","Guaranteed Balance: Height remains strictly logarithmic ($O(\\log N)$) regardless of insertion order","Disk Block Matching: Node size matches OS disk page size (typically 16KB in InnoDB), loading hundreds of keys per I/O seek","Used by all major RDBMS engine primary and secondary indexes"],sections:[{title:"B+ Tree Index Anatomy & Range Query Execution",body:`In a B+ Tree index, internal nodes act purely as a high-speed routing highway, while leaf nodes form a continuous sorted linked list containing the record pointers:
2310
2311\`\`\`
2312                 [ 30 | 60 ]                   ← Internal Routing Nodes
2313                /     |     \\
2314         [ 10 | 20 ] [ 40 | 50 ] [ 70 | 80 ]   ← Internal Routing Nodes
2315            /     \\     /    \\     /     \\
2316         [10,20] ⇄ [30,40,50] ⇄ [60,70,80]    ← Leaf Nodes (Linked List!)
2317            ↓          ↓            ↓
2318          Data       Data         Data
2319\`\`\`
2320
2321### Executing Range Query: \`SELECT * FROM users WHERE id BETWEEN 35 AND 75\`
23221. **Point Lookup**: Perform binary search down the internal routing nodes to find the leaf containing 35 $\\rightarrow O(\\log N)$.
23232. **Sequential Scan**: Follow the linked leaf pointers forward to read 40, 50, 60, 70 $\\rightarrow O(K)$ sequential reads.
23243. Total Time: $O(\\log N + K)$ — without needing to traverse back up the tree!`},{title:"Comprehensive Database Index Type Comparison",body:`| Metric | Linear Index | B-Tree Index | B+ Tree Index | Hash Index |
2325|---|---|---|---|---|
2326| **Point Search (\`WHERE id = 5\`)** | $O(\\log N)$ | $O(\\log N)$ | $O(\\log N)$ | **$O(1)$ avg** |
2327| **Range Query (\`WHERE id > 10\`)** | $O(N)$ | $O(\\log N + K)$ | **$O(\\log N + K)$** | ❌ Impossible ($O(N)$) |
2328| **Insert / Delete** | $O(N)$ (shifting) | $O(\\log N)$ | **$O(\\log N)$** | $O(1)$ avg |
2329| **Disk I/O Seeks (1M records)** | ~20 reads | 3-4 reads | **3-4 reads** | 1-2 reads |
2330| **Database Engines** | Legacy flat files | Early systems | **MySQL, Postgres, SQLite** | Hash Joins, In-Memory DBs |`}],codeExamples:[{title:"Tree Index Node (Python)",language:"python",code:`class BPlusTreeNode:
2331    def __init__(self, is_leaf=False):
2332        self.is_leaf = is_leaf
2333        self.keys = []
2334        self.children = [] # Child pointers if internal, record pointers if leaf
2335        self.next = None    # Pointer to next leaf for fast range scans!`},{title:"Tree Index Node (JavaScript)",language:"javascript",code:`class BPlusTreeNode {
2336  constructor(isLeaf = false) {
2337    this.isLeaf = isLeaf;
2338    this.keys = [];
2339    this.children = [];
2340    this.next = null;
2341  }
2342}`},{title:"Tree Index Node (C++)",language:"cpp",code:`#include <vector>
2343
2344struct BPlusTreeNode {
2345    bool isLeaf;
2346    std::vector<int> keys;
2347    std::vector<void*> children;
2348    BPlusTreeNode* next;
2349    BPlusTreeNode(bool leaf = false) : isLeaf(leaf), next(nullptr) {}
2350};`},{title:"Tree Index Node (Java)",language:"java",code:`import java.util.ArrayList;
2351
2352class BPlusTreeNode {
2353    boolean isLeaf;
2354    ArrayList<Integer> keys = new ArrayList<>();
2355    ArrayList<Object> children = new ArrayList<>();
2356    BPlusTreeNode next = null;
2357    BPlusTreeNode(boolean isLeaf) { this.isLeaf = isLeaf; }
2358}`}],relatedTopics:["linear-indexing","tree-b-trees"]}}]},{id:"problem-solving-techniques",title:"Problem Solving Techniques",shortTitle:"Problem Solving",description:"Applied coding patterns and strategies to solve complex interview questions from scratch",color:"#bd93f9",icon:"Sparkles",content:{overview:"Now that you have a solid understanding of core Data Structures and Algorithms, you are ready to transition to **Problem-Solving Techniques**. While foundational topics teach you **what** structures exist (e.g. Arrays, Trees, Graphs) and **how** they work under the hood, the Problem Solving roadmap teaches you **how to recognize and apply standard algorithmic patterns** (such as Two Pointers, Sliding Window, Monotonic Stack, and Topological Sort) to tackle unseen FAANG and competitive coding problems from scratch.",keyPoints:["Pattern Recognition: Learn to map ambiguous problem descriptions to high-efficiency algorithmic templates","Optimal Complexity Shifts: Turn naive $O(N^2)$ brute forces into $O(N)$ or $O(N \\log N)$ optimal solutions","FAANG Interview Arsenal: Master essential patterns including Two Pointers, Sliding Window, Monotonic Stack, DSU, and Dynamic Programming","Zero-Repetition Strategy: Focus on core template mechanics rather than memorizing individual LeetCode solutions","Prerequisite Validation: Ensure you have mastered foundational Data Structures before attempting their matching problem-solving patterns"],sections:[{title:"How to Transition from Foundations",body:`To make your learning path seamless, every problem-solving category assumes you have completed its matching foundational data structure first. Here is the transition map:
2359
2360*   **Foundations: Arrays & Hash Tables** $\\rightarrow$ **Techniques: Two Pointers, Sliding Window, Prefix Sum & Frequency Fingerprints**
2361*   **Foundations: Binary Search** $\\rightarrow$ **Techniques: Binary Search on Answer Space & Range Boundaries**
2362*   **Foundations: Stacks & Queues** $\\rightarrow$ **Techniques: Monotonic Stacks & Monotonic Queues**
2363*   **Foundations: Linked Lists** $\\rightarrow$ **Techniques: Fast & Slow Pointers & Dummy Node Mutation**
2364*   **Foundations: Tree DFS/BFS** $\\rightarrow$ **Techniques: Subtree Accumulation, LCA, and Tree DP**
2365*   **Foundations: Graph BFS/DFS & Dijkstra** $\\rightarrow$ **Techniques: Multi-Source BFS, 0-1 BFS, Topological Sort, Bipartite coloring, DSU & Tarjan's**
2366*   **Foundations: Math/Bits** $\\rightarrow$ **Techniques: Boyer-Moore Voting, Sieve of Eratosthenes, and Binary Exponentiation**`},{title:"Exploring the Techniques Canvas",body:`Switch to the **Problem Solving Techniques** tab at the top of the screen to view the interactive techniques network. 
2367
2368We recommend tackling the phases in order. Each node includes:
2369*   **Applied Theory**: A breakdown of the technique, why it is o
2369ptimal, and when to use it.
2370*   **Code Templates**: Production-ready, language-agnostic starter code.
2371*   **Interactive Visualizations**: Watch the technique (like two pointers sliding or monotonic stack updates) execute in real-time step-by-step.
2372*   **Target Problems**: Hand-picked FAANG problems to test your implementation.`}],relatedTopics:["what-is-dsa","basic-data-structures","tree-data-structures","graph-data-structures"]}}]},sm={"ds-arrays":[{frontendId:"1",title:"Largest Element in Array",titleSlug:"largest-element-in-array",difficulty:"Easy"},{frontendId:"2",title:"Find Minimum and Maximum Element in an Array",titleSlug:"find-minimum-and-maximum-element-in-an-array",difficulty:"Easy"},{frontendId:"3",title:"Second Largest",titleSlug:"second-largest",difficulty:"Easy"},{frontendId:"344",title:"Reverse String",titleSlug:"reverse-string",difficulty:"Easy"},{frontendId:"2529",title:"Maximum Count of Positive and Negative Integers",titleSlug:"maximum-count-of-positive-integer-and-negative-integer",difficulty:"Easy"},{frontendId:"4",title:"Index of an Extra Element",titleSlug:"index-of-an-extra-element",difficulty:"Easy"},{frontendId:"1752",title:"Check if Array is Sorted",titleSlug:"check-if-an-array-is-sorted",difficulty:"Easy"},{frontendId:"5",title:"Remove Duplicates from String",titleSlug:"remove-all-duplicates-from-a-given-string",difficulty:"Easy"},{frontendId:"709",title:"To Lower Case",titleSlug:"to-lower-case",difficulty:"Easy"},{frontendId:"6",title:"First Matching Character",titleSlug:"first-matching-character-from-both-ends",difficulty:"Easy"},{frontendId:"7",title:"Remove Character",titleSlug:"remove-character",difficulty:"Easy"},{frontendId:"20",title:"Parenthesis Checker",titleSlug:"parenthesis-checker",difficulty:"Easy"}],"ds-linked-lists":[{frontendId:"8",title:"Print Linked List Elements",titleSlug:"print-linked-list-elements",difficulty:"Easy"},{frontendId:"9",title:"Search in Linked List",titleSlug:"search-in-linked-list-1664434326",difficulty:"Easy"},{frontendId:"10",title:"Find Length of Loop",titleSlug:"find-length-of-loop",difficulty:"Easy"},{frontendId:"11",title:"Linked List Insertion",titleSlug:"linked-list-insertion-1587115620",difficulty:"Easy"},{frontendId:"12",title:"Insertion at Given Position in Linked List",titleSlug:"insertion-at-a-given-position-in-a-linked-list",difficulty:"Easy"},{frontendId:"13",title:"Delete Head of Linked List",titleSlug:"delete-head-of-linked-list",difficulty:"Easy"},{frontendId:"14",title:"Delete at Position in Linked List",titleSlug:"linked-list-delete-at-position",difficulty:"Easy"},{frontendId:"15",title:"Deletion at End of Linked List",titleSlug:"deletion-at-the-end-of-a-linked-list",difficulty:"Easy"}],"ds-stacks":[{frontendId:"2000",title:"Reverse Prefix of Word",titleSlug:"reverse-prefix-of-word",difficulty:"Easy"},{frontendId:"3174",title:"Clear Digits",titleSlug:"clear-digits",difficulty:"Easy"},{frontendId:"20",title:"Valid Parentheses",titleSlug:"valid-parentheses",difficulty:"Easy"},{frontendId:"1021",title:"Remove Outermost Parentheses",titleSlug:"remove-outermost-parentheses",difficulty:"Easy"},{frontendId:"16",title:"Delete Middle Element of Stack",titleSlug:"delete-middle-element-of-a-stack",difficulty:"Easy"},{frontendId:"1475",title:"Final Prices With Special Discount",titleSlug:"final-prices-with-a-special-discount-in-a-shop",difficulty:"Easy"}],"ds-queues":[{frontendId:"17",title:"Reverse First K Elements of Queue",titleSlug:"reverse-first-k-elements-of-queue",difficulty:"Easy"},{frontendId:"1700",title:"Number of Students Unable to Eat Lunch",titleSlug:"number-of-students-unable-to-eat-lunch",difficulty:"Easy"},{frontendId:"2073",title:"Time Needed to Buy Tickets",titleSlug:"time-needed-to-buy-tickets",difficulty:"Easy"}],"ds-hash-tables":[{frontendId:"18",title:"Frequencies of Array Elements",titleSlug:"frequency-of-array-elements-1587115620",difficulty:"Easy"},{frontendId:"19",title:"Count Distinct Elements",titleSlug:"count-distinct-elements-1587115620",difficulty:"Easy"},{frontendId:"21",title:"Check if Two Arrays are Equal",titleSlug:"check-if-two-arrays-are-equal-or-not3847",difficulty:"Easy"},{frontendId:"442",title:"Find All Duplicates in an Array",titleSlug:"find-duplicates-in-an-array",difficulty:"Medium"},{frontendId:"1394",title:"Find Lucky Integer in an Array",titleSlug:"find-lucky-integer-in-an-array",difficulty:"Easy"},{frontendId:"268",title:"Missing Number",titleSlug:"missing-number",difficulty:"Easy"},{frontendId:"389",title:"Find the Difference",titleSlug:"find-the-difference",difficulty:"Easy"},{frontendId:"349",title:"Intersection of Two Arrays",titleSlug:"intersection-of-two-arrays",difficulty:"Easy"}],"linear-search":[{frontendId:"22",title:"Search an Element in an Array",titleSlug:"search-an-element-in-an-array-1587115621",difficulty:"Easy"},{frontendId:"2798",title:"Number of Employees Who Met Target",titleSlug:"number-of-employees-who-met-the-target",difficulty:"Easy"},{frontendId:"1295",title:"Find Numbers with Even Number of Digits",titleSlug:"find-numbers-with-even-number-of-digits",difficulty:"Easy"},{frontendId:"1773",title:"Count Items Matching a Rule",titleSlug:"count-items-matching-a-rule",difficulty:"Easy"},{frontendId:"1346",title:"Check If N and Its Double Exist",titleSlug:"check-if-n-and-its-double-exist",difficulty:"Easy"},{frontendId:"28",title:"Find Index of First Occurrence in String",titleSlug:"find-the-index-of-the-first-occurrence-in-a-string",difficulty:"Easy"},{frontendId:"2089",title:"Find Target Indices After Sorting Array",titleSlug:"find-target-indices-after-sorting-array",difficulty:"Easy"}],"binary-search-algo":[{frontendId:"704",title:"Binary Search",titleSlug:"binary-search",difficulty:"Easy"},{frontendId:"23",title:"Binary Search Implementation",titleSlug:"binary-search-1587115620",difficulty:"Easy"},{frontendId:"35",title:"Search Insert Position",titleSlug:"search-insert-position",difficulty:"Easy"},{frontendId:"24",title:"Implement Lower Bound",titleSlug:"implement-lower-bound",difficulty:"Easy"},{frontendId:"25",title:"Implement Upper Bound",titleSlug:"implement-upper-bound",difficulty:"Easy"},{frontendId:"26",title:"Floor in a Sorted Array",titleSlug:"floor-in-a-sorted-array-1587115620",difficulty:"Easy"},{frontendId:"27",title:"Ceil the Floor",titleSlug:"ceil-the-floor2802",difficulty:"Easy"},{frontendId:"28",title:"Number of Occurrence",titleSlug:"number-of-occurrence2259",difficulty:"Easy"},{frontendId:"69",title:"Sqrt(x)",titleSlug:"sqrtx",difficulty:"Easy"}],"sorting-algorithms":[{frontendId:"2974",title:"Minimum Number Game",titleSlug:"minimum-number-game",difficulty:"Easy"},{frontendId:"1365",title:"How Many Numbers Are Smaller Than Current",titleSlug:"how-many-numbers-are-smaller-than-the-current-number",difficulty:"Easy"},{frontendId:"2037",title:"Minimum Moves to Seat Everyone",titleSlug:"minimum-number-of-moves-to-seat-everyone",difficulty:"Easy"},{frontendId:"1637",title:"Widest Vertical Area Between Two Points",titleSlug:"widest-vertical-area-between-two-points-containing-no-points",difficulty:"Easy"},{frontendId:"88",title:"Merge Sorted Array",titleSlug:"merge-sorted-array",difficulty:"Easy"},{frontendId:"3194",title:"Minimum Average of Smallest and Largest Elements",titleSlug:"minimum-average-of-smallest-and-largest-elements",difficulty:"Easy"},{frontendId:"2824",title:"Count Pairs Whose Sum is Less Than Target",titleSlug:"count-pairs-whose-sum-is-less-than-target",difficulty:"Easy"}],"bubble-sort":[{frontendId:"2974",title:"Minimum Number Game",titleSlug:"minimum-number-game",difficulty:"Easy"},{frontendId:"1365",title:"How Many Numbers Are Smaller Than Current",titleSlug:"how-many-numbers-are-smaller-than-the-current-number",difficulty:"Easy"}],"selection-sort":[{frontendId:"2037",title:"Minimum Moves to Seat Everyone",titleSlug:"minimum-number-of-moves-to-seat-everyone",difficulty:"Easy"}],"insertion-sort":[{frontendId:"3194",title:"Minimum Average of Smallest and Largest Elements",titleSlug:"minimum-average-of-smallest-and-largest-elements",difficulty:"Easy"}],"merge-sort":[{frontendId:"88",title:"Merge Sorted Array",titleSlug:"merge-sorted-array",difficulty:"Easy"}],"quick-sort":[{frontendId:"2824",title:"Count Pairs Whose Sum is Less Than Target",titleSlug:"count-pairs-whose-sum-is-less-than-target",difficulty:"Easy"}],"heap-sort":[{frontendId:"1637",title:"Widest Vertical Area Between Two Points",titleSlug:"widest-vertical-area-between-two-points-containing-no-points",difficulty:"Easy"}],"tree-traversals":[{frontendId:"144",title:"Binary Tree Preorder Traversal",titleSlug:"binary-tree-preorder-traversal",difficulty:"Easy"},{frontendId:"94",title:"Binary Tree Inorder Traversal",titleSlug:"binary-tree-inorder-traversal",difficulty:"Easy"},{frontendId:"145",title:"Binary Tree Postorder Traversal",titleSlug:"binary-tree-postorder-traversal",difficulty:"Easy"}],"tree-bfs-dfs":[{frontendId:"226",title:"Invert Binary Tree",titleSlug:"invert-binary-tree",difficulty:"Easy"},{frontendId:"938",title:"Range Sum of BST",titleSlug:"range-sum-of-bst",difficulty:"Easy"},{frontendId:"1022",title:"Sum of Root To Leaf Binary Numbers",titleSlug:"sum-of-root-to-leaf-binary-numbers",difficulty:"Easy"},{frontendId:"1379",title:"Find Corresponding Node in Binary Tree",titleSlug:"find-a-corresponding-node-of-a-binary-tree-in-a-clone-of-that-tree",difficulty:"Easy"},{frontendId:"637",title:"Average of Levels in Binary Tree",titleSlug:"average-of-levels-in-binary-tree",difficulty:"Easy"},{frontendId:"102",title:"Level Order Traversal",titleSlug:"level-order-traversal",difficulty:"Medium"}],"tree-binary":[{frontendId:"29",title:"Size of Binary Tree",titleSlug:"size-of-binary-tree",difficulty:"Easy"},{frontendId:"30",title:"Count Leaves in Binary Tree",titleSlug:"count-leaves",difficulty:"Easy"},{frontendId:"31",title:"Height of Binary Tree",titleSlug:"height-of-binary-tree",difficulty:"Easy"},{frontendId:"32",title:"Mirror Tree",titleSlug:"mirror-tree",difficulty:"Easy"},{frontendId:"100",title:"Determine if Two Trees are Identical",titleSlug:"determine-if-two-trees-are-identical",difficulty:"Easy"},{frontendId:"33",title:"Insertion in a Binary Tree",titleSlug:"insertion-in-a-binary-tree",difficulty:"Easy"}
2372,{frontendId:"34",title:"Deletion in a Binary Tree",titleSlug:"deletion-in-a-binary-tree",difficulty:"Easy"}],"tree-bst":[{frontendId:"700",title:"Search in a Binary Search Tree",titleSlug:"search-in-a-binary-search-tree",difficulty:"Easy"},{frontendId:"35",title:"Minimum Element in BST",titleSlug:"minimum-element-in-bst",difficulty:"Easy"},{frontendId:"36",title:"Find Parent Node in BST",titleSlug:"find-parent-node-in-bst",difficulty:"Easy"},{frontendId:"37",title:"Find Sibling in BST",titleSlug:"find-sibling-in-bst",difficulty:"Easy"},{frontendId:"701",title:"Insert into a Binary Search Tree",titleSlug:"insert-into-a-binary-search-tree",difficulty:"Medium"},{frontendId:"38",title:"Predecessor and Successor in BST",titleSlug:"predecessor-and-successor",difficulty:"Easy"},{frontendId:"450",title:"Delete Node in a BST",titleSlug:"delete-node-in-a-bst",difficulty:"Medium"}],"tree-avl":[{frontendId:"39",title:"AVL Tree Insertion",titleSlug:"avl-tree-insertion",difficulty:"Hard"},{frontendId:"40",title:"AVL Tree Deletion",titleSlug:"avl-tree-deletion",difficulty:"Hard"}],"tree-heap":[{frontendId:"1046",title:"Last Stone Weight",titleSlug:"last-stone-weight",difficulty:"Easy"},{frontendId:"703",title:"Kth Largest Element in a Stream",titleSlug:"kth-largest-element-in-a-stream",difficulty:"Easy"},{frontendId:"2558",title:"Take Gifts From the Richest Pile",titleSlug:"take-gifts-from-the-richest-pile",difficulty:"Easy"}],"graph-bfs-dfs":[{frontendId:"41",title:"Print Adjacency List",titleSlug:"print-adjacency-list",difficulty:"Easy"},{frontendId:"42",title:"Find Degree of Each Vertex",titleSlug:"find-the-degree-of-each-vertex",difficulty:"Easy"},{frontendId:"43",title:"BFS Traversal of Graph",titleSlug:"bfs-traversal-of-graph",difficulty:"Easy"},{frontendId:"44",title:"DFS Traversal of Graph",titleSlug:"dfs-traversal-of-graph",difficulty:"Easy"},{frontendId:"1791",title:"Find Center of Star Graph",titleSlug:"find-center-[#1791]",difficulty:"Easy"},{frontendId:"1971",title:"Find if Path Exists in Graph",titleSlug:"find-if-path-exists-in-graph",difficulty:"Easy"}],"graph-dijkstra":[{frontendId:"45",title:"Shortest Path in Undirected Graph",titleSlug:"shortest-path-in-undirected-graph-having-unit-distance",difficulty:"Medium"},{frontendId:"743",title:"Network Delay Time",titleSlug:"network-delay-time",difficulty:"Medium"},{frontendId:"787",title:"Cheapest Flights Within K Stops",titleSlug:"cheapest-flights-within-k-stops",difficulty:"Medium"},{frontendId:"2290",title:"Minimum Obstacle Removal to Reach Corner",titleSlug:"minimum-obstacle-removal-to-reach-corner",difficulty:"Hard"}]},ul=[{from:"what-is-dsa",to:"basic-data-structures"},{from:"what-is-dsa",to:"algorithm-complexity"},{from:"basic-data-structures",to:"searching-algorithms"},{from:"algorithm-complexity",to:"searching-algorithms"},{from:"searching-algorithms",to:"sorting-algorithms"},{from:"searching-algorithms",to:"tree-data-structures"},{from:"sorting-algorithms",to:"graph-data-structures"},{from:"tree-data-structures",to:"graph-data-structures"},{from:"graph-data-structures",to:"indexing"},{from:"graph-data-structures",to:"problem-solving-techniques"}],Si=180,Ti=46,aa=Si/2,Ft=Ti/2,js=200,Ns=52,ia=js/2,ra=Ns/2,Bt={"what-is-dsa":{x:500,y:70},"basic-data-structures":{x:350,y:210},"algorithm-complexity":{x:650,y:210},"searching-algorithms":{x:500,y:350},"sorting-algorithms":{x:350,y:490},"tree-data-structures":{x:650,y:490},"graph-data-structures":{x:500,y:630},indexing:{x:350,y:770},"problem-solving-techniques":{x:650,y:770}},na={"basic-data-structures":[{x:-210,y:-120},{x:-210,y:-60},{x:-210,y:0},{x:-210,y:60},{x:-210,y:120}],"algorithm-complexity":[{x:210,y:-60},{x:210,y:0},{x:210,y:60}],"searching-algorithms":[{x:210,y:-30},{x:210,y:30}],"sorting-algorithms":[{x:-210,y:-150},{x:-210,y:-90},{x:-210,y:-30},{x:-210,y:30},{x:-210,y:90},{x:-210,y:150}],"tree-data-structures":[{x:210,y:-210},{x:210,y:-150},{x:210,y:-90},{x:210,y:-30},{x:210,y:30},{x:210,y:90},{x:210,y:150},{x:210,y:210}],"graph-data-structures":[{x:210,y:-60},{x:210,y:0},{x:210,y:60}],indexing:[{x:-210,y:-30},{x:-210,y:30}]};
2372function xl(){const t=$e(),[i,s]=a.useState("basic-data-structures"),[l,h]=a.useState(null),[u,o]=a.useState([]);a.useEffect(()=>{try{const g=localStorage.getItem("pynyx_completed_foundations");g&&o(JSON.parse(g))}catch(g){console.error("Failed to load completed foundation topics",g)}},[]);const m=(g,f)=>{f.stopPropagation(),f.preventDefault();let p;u.includes(g)?p=u.filter(N=>N!==g):p=[...u,g],o(p);try{localStorage.setItem("pynyx_completed_foundations",JSON.stringify(p))}catch(N){console.error(N)}},b=g=>{var f;return(f=ws.children)==null?void 0:f.find(p=>p.id===g)},w=g=>!g.children||g.children.length===0?u.includes(g.id)?100:0:g.children.filter(p=>u.includes(p.id)).length/g.children.length*100,d=l||i;return e.jsxs("div",{className:"w-full flex flex-col items-center",children:[e.jsx("span",{className:"md:hidden text-[10px] text-[#bd93f9] font-mono italic mb-3 flex items-center justify-center gap-1 bg-[#bd93f9]/10 px-3 py-1 rounded-full border border-[#bd93f9]/20",children:"← Swipe left/right to view full interactive roadmap →"}),e.jsx("div",{className:"w-full overflow-x-auto no-scrollbar bg-zinc-950/90 backdrop-blur-xl border border-zinc-800 p-4 md:p-10 rounded-2xl relative flex justify-start md:justify-center shadow-2xl",children:e.jsxs("div",{style:{height:"900px"},className:"relative w-[1000px] select-none flex-shrink-0",children:[e.jsxs("svg",{className:"absolute inset-0 w-full h-full pointer-events-none z-0",children:[e.jsxs("defs",{children:[e.jsx("marker",{id:"arrow-default",viewBox:"0 0 10 10",refX:"6",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:e.jsx("path",{d:"M 0 2 L 7 5 L 0 8 z",fill:"#30363d"})}),e.jsx("marker",{id:"arrow-active",viewBox:"0 0 10 10",refX:"6",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:e.jsx("path",{d:"M 0 2 L 7 5 L 0 8 z",fill:"#bd93f9"})}),e.jsxs("filter",{id:"glow-foundations",x:"-20%",y:"-20%",width:"140%",height:"140%",children:[e.jsx("feGaussianBlur",{stdDeviation:"4",result:"blur"}),e.jsx("feComposite",{in:"SourceGraphic",in2:"blur",operator:"over"})]})]}),ul.map((g,f)=>{const p=Bt[g.from],N=Bt[g.to];if(!p||!N)return null;const T=p.x,r=p.y+Ft,c=N.x,j=N.y-Ft,k=(r+j)/2,I=`M ${T},${r} C ${T},${k} ${c},${k} ${c},${j}`,_=g.from===d||g.to===d;return e.jsxs("g",{children:[_&&e.jsx("path",{d:I,fill:"none",stroke:"#bd93f9",strokeWidth:"5",strokeOpacity:"0.4",filter:"url(#glow-foundations)"}),e.jsx("path",{d:I,fill:"none",stroke:_?"#bd93f9":"#30363d",strokeWidth:_?"2.5":"1.8",markerEnd:_?"url(#arrow-active)":"url(#arrow-default)"})]},f)}),d&&e.jsx("g",{children:(()=>{const g=Bt[d],f=b(d);if(!g||!f)return null;const p=f.children||[],N=p.length===0,T=f.color||"#bd93f9";if(N){const r=g.x,c=g.y+Ft,j=g.x,k=g.y+65-ra;return e.jsx(A.path,{initial:{pathLength:0},animate:{pathLength:1},d:`M ${r},${c} L ${j},${k}`,fill:"none",stroke:T,strokeWidth:"1.5",strokeDasharray:"4,4",className:"opacity-70"})}return p.map((r,c)=>{var y;const j=((y=na[d])==null?void 0:y[c])||{x:0,y:0},k=g.x+j.x,I=g.y+j.y;let _=g.x,q=g.y,F=k,O=I;j.x<0?(_=g.x-aa,F=k+ia):j.x>0?(_=g.x+aa,F=k-ia):(q=g.y+Ft,O=I-ra);const Y=(_+F)/2,te=j.x!==0?`M ${_},${q} C ${Y},${q} ${Y},${O} ${F},${O}`:`M ${_},${q} C ${_},${(q+O)/2} ${F},${(q+O)/2} ${F},${O}`;return e.jsx(A.path,{initial:{pathLength:0},animate:{pathLength:1},d:te,fill:"none",stroke:T,strokeWidth:"1.8",strokeDasharray:"4,4",className:"opacity-75"},c)})})()})]}),Object.entries(Bt).map(([g,f])=>{const p=b(g);if(!p)return null;const N=i===g,T=d===g,r=w(p),c=r===100,j=p.color||"#bd93f9";return e.jsxs("div",{style:{position:"absolute",left:`${f.x}px`,top:`${f.y}px`,width:`${Si}px`,height:`${Ti}px`,transform:"translate(-50%, -50%)"},className:v("z-10 transition-all duration-200",T?"z-30 scale-105":"hover:z-20"),onMouseEnter:()=>h(g),onMouseLeave:()=>h(null),children:[e.jsxs("button",{onClick:()=>s(N?null:g),className:v("w-full h-full relative rounded-md border flex flex-col justify-between overflow-hidden shadow-lg transition-all duration-300 group tree-node-button",T?"text-white":"bg-[#0b0c1e] border-[#30363d]/90 text-gray-300 hover:bg-[#0f112e] hover:border-gray-500/50"),style:{borderColor:T?j:void 0,backgroundColor:T?`${j}20`:void 0,boxShadow:T?`0 0 25px ${j}35`:void 0},children:[e.jsx("div",{className:v("h-[1.5px] w-full transition-opacity duration-300",T?"opacity-100":"opacity-0 group-hover:opacity-100"),style:{backgroundColor:j}}),e.jsx("div",{className:"flex-1 flex items-center justify-center px-2",children:e.jsx("span",{className:"text-xs font-bold tracking-tight text-center font-outfit leading-tight",children:p.shortTitle||p.title})}),e.jsx("div",{className:"w-full h-[3.5px] bg-black/50 relative",children:e.jsx("div",{className:v("h-full transition-all duration-500",c?"bg-[#50fa7b]":""),style:{width:`${r}%`,backgroundColor:c?void 0:j}})})]}),e.jsx(nt,{children:T&&(()=>{const k=p.children||[];return k.length===0?e.jsxs(A.div,{initial:{opacity:0,scale:.9,y:40}
2372,animate:{opacity:1,scale:1,y:65},exit:{opacity:0,scale:.9,y:40},transition:{duration:.2},style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)"},className:"z-20 pointer-events-auto flex gap-2",children:[e.jsxs("button",{onClick:()=>{if(p.id==="what-is-dsa")t("/resources/dsa/what-is-dsa");else{const _=new URLSearchParams(window.location.search);_.set("subTab","techniques"),t(`${window.location.pathname}?${_.toString()}`)}},className:"px-4 py-2 bg-purple-600 hover:bg-purple-700 text-xs font-semibold text-white transition-all rounded-md shadow-md font-sans flex items-center gap-1.5 whitespace-nowrap hover:scale-105 active:scale-95",children:[p.id==="what-is-dsa"?"Start Reading":"Switch tab",e.jsx(Ae,{size:12})]}),p.id==="what-is-dsa"&&e.jsxs("button",{onClick:_=>m(p.id,_),className:v("px-3 py-2 border text-xs font-semibold transition-all rounded-md shadow-sm font-sans flex items-center gap-1 whitespace-nowrap hover:scale-105 active:scale-95",u.includes(p.id)?"bg-[#50fa7b]/10 border-[#50fa7b] text-[#50fa7b] shadow-[0_4px_15px_rgba(80,250,123,0.2)]":"bg-[#0b0c1e] border-[#30363d] text-[#8b949e] hover:text-white hover:border-gray-500"),children:[e.jsx(Xe,{size:12,strokeWidth:2.5}),u.includes(p.id)?"Done":"Complete"]})]},`leaf-${g}`):e.jsx("div",{className:"absolute inset-0 pointer-events-none",children:k.map((_,q)=>{var Y;const F=((Y=na[g])==null?void 0:Y[q])||{x:0,y:0},O=u.includes(_.id);return e.jsx(A.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.2,delay:q*.01},style:{position:"absolute",left:`calc(50% + ${F.x}px - ${js/2}px)`,top:`calc(50% + ${F.y}px - ${Ns/2}px)`,width:`${js}px`,height:`${Ns}px`},className:"z-20 pointer-events-auto group/sub",children:e.jsxs("div",{className:v("w-full h-full rounded-md border flex items-center justify-between px-3 bg-[#070715]/95 backdrop-blur-md transition-all duration-300 relative shadow-[0_4px_20px_rgba(0,0,0,0.5)]",O?"border-[#50fa7b]/40 hover:border-[#50fa7b] hover:shadow-[0_0_15px_rgba(80,250,123,0.25)]":"border-[#30363d] hover:border-violet-500/60 hover:shadow-[0_0_15px_rgba(139,92,246,0.25)]"),style:{background:O?"linear-gradient(135deg, #090a1f 0%, rgba(80, 250, 123, 0.04) 100%)":`linear-gradient(135deg, #090a1f 0%, ${j}08 100%)`},children:[e.jsx("div",{className:"absolute left-0 top-1/4 bottom-1/4 w-[3px] rounded-r transition-all duration-300",style:{backgroundColor:O?"#50fa7b":j}}),e.jsx("button",{onClick:()=>t(`/resources/dsa/${_.id}`),className:"flex-1 text-xs font-medium text-left text-gray-200 hover:text-white transition-colors tracking-wide font-sans truncate mr-2 pl-1 leading-snug",title:_.title,children:_.title}),e.jsx("button",{onClick:te=>m(_.id,te),className:v("w-5 h-5 rounded-full border flex items-center justify-center transition-all duration-300 hover:scale-110",O?"bg-[#50fa7b]/20 border-[#50fa7b] text-[#50fa7b]":"bg-black/50 border-[#30363d] text-gray-500 hover:text-gray-300 hover:border-gray-400"),children:e.jsx(Xe,{size:10,strokeWidth:3})})]})},_.id)})})})()})]},g)})]})})]})}const gl={"custom-sorting":{id:"custom-sorting",name:"Custom Sorting & Compression",phase:1,description:"Sorting with custom comparators and coordinate mapping techniques.",icon:"Cpu"},"hashing-cache":{id:"hashing-cache",name:"Frequency Maps & Hashing Cache",phase:1,description:"Reducing O(N^2) loops to O(N) by caching complements and frequencies.",icon:"Database"},"two-pointers":{id:"two-pointers",name:"Opposite Direction Pointers",phase:1,description:"Shrinking arrays with left/right pointers to find target criteria.",icon:"Layers"},"sliding-window":{id:"sliding-window",name:"Sliding Window (Fixed/Variable)",phase:1,description:"Tracking subsegment extremes and window size optimizations.",icon:"Zap"},"prefix-sum":{id:"prefix-sum",name:"Prefix Sum & Difference Arrays",phase:1,description:"Executing range sum queries and range updates in O(1).",icon:"Monitor"},"binary-search-ans":{id:"binary-search-ans",name:"Binary Search on Answer",phase:1,description:"Logarithmic search on monotonic boolean value predicates.",icon:"Search"}
2372,"boyer-moore-majority":{id:"boyer-moore-majority",name:"Boyer-Moore Voting",phase:1,description:"Finding the majority element in O(N) time and O(1) space.",icon:"Cpu"},"monotonic-stack":{id:"monotonic-stack",name:"Monotonic Stack Patterns",phase:2,description:"Using LIFO structures to search nearest greater/smaller boundaries in O(N).",icon:"Layers"},"monotonic-queue":{id:"monotonic-queue",name:"Monotonic Queue & Deque",phase:2,description:"Tracking rolling minima and maxima in sliding windows.",icon:"Zap"},"two-heaps":{id:"two-heaps",name:"Two Heaps Pattern",phase:2,description:"Managing split min/max heaps to track running medians.",icon:"Activity"},"fast-slow-pointers":{id:"fast-slow-pointers",name:"Fast & Slow Pointers",phase:2,description:"Pointer-chasing cycle detection and list middle-point retrieval.",icon:"GitBranch"},"dummy-node-mutation":{id:"dummy-node-mutation",name:"Dummy Node Mutation",phase:2,description:"Linked List modification and reversal without null-pointer checks.",icon:"GitBranch"},"recursion-templates":{id:"recursion-templates",name:"Recursive Depth & Templates",phase:3,description:"Mastering functional call stacks and sub-routine execution.",icon:"GitBranch"},"combinatorics-states":{id:"combinatorics-states",name:"Combinatorial State Generation",phase:3,description:"Generating subsets, permutations, and power sets.",icon:"Boxes"},"backtracking-pruning":{id:"backtracking-pruning",name:"Backtracking & Space Pruning",phase:3,description:"Exploring state-space trees with aggressive constraint checks.",icon:"Network"},"greedy-heuristics":{id:"greedy-heuristics",name:"Greedy Choice & Scheduling",phase:4,description:"Selecting locally optimal options for global results.",icon:"GitBranch"},"divide-and-conquer-split":{id:"divide-and-conquer-split",name:"Divide & Conquer Patterns",phase:4,description:"Splitting problems into independent parts (e.g. Inversions).",icon:"Zap"},quickselect:{id:"quickselect",name:"Quickselect Rank Order",phase:4,description:"Retrieving the K-th largest element in O(N) average time.",icon:"Activity"},"kadanes-algorithm":{id:"kadanes-algorithm",name:"Kadane's Subarray Sum",phase:5,description:"Tracking maximum contiguous subarray sums in O(N).",icon:"Flame"},"merge-intervals":{id:"merge-intervals",name:"Merge Intervals & Overlaps",phase:5,description:"Handling range scheduling and overlap merging.",icon:"Monitor"},"k-way-merge":{id:"k-way-merge",name:"K-Way Merge (Heaps)",phase:5,description:"Merging K sorted streams using min-heaps in O(N log K).",icon:"GitBranch"},"subtree-accumulation":{id:"subtree-accumulation",name:"Subtree Accumulation (DFS)",phase:6,description:"Aggregating child node metrics at parent root levels.",icon:"GitBranch"},"tree-dp":{id:"tree-dp",name:"Tree DP Patterns",phase:6,description:"Executing dynamic programming decisions on tree structures.",icon:"Cpu"},"binary-lifting-lca":{id:"binary-lifting-lca",name:"LCA & Binary Lifting",phase:6,description:"Calculating Lowest Common Ancestors using exponential power jumps.",icon:"Network"},"grid-navigation":{id:"grid-navigation",name:"Grid Navigation & Flood Fill",phase:7,description:"Traversing 2D matrices as implicit graph networks.",icon:"Monitor"},"multi-source-bfs":{id:"multi-source-bfs",name:"Multi-Source BFS Wavefront",phase:7,description:"Propagating multiple BFS starting lines simultaneously.",icon:"Zap"},"cycle-detection-coloring":{id:"cycle-detection-coloring",name:"Cycle Detection & Graph Colors",phase:7,description:"Identifying loops in graphs using state color flags.",icon:"Activity"},"bipartite-graph-coloring":{id:"bipartite-graph-coloring",name:"Bipartite Graph Coloring",phase:7,description:"Checking graph bipartiteness using two-color BFS/DFS.",icon:"Activity"},"union-find-dsu":{id:"union-find-dsu",name:"Disjoint Set Union (DSU)",phase:7,description:"Managing dynamic connectivity and path compression in O(alpha).",icon:"Database"},"topological-sort":{id:"topological-sort",name:"Topological Sort Patterns",phase:7,description:"Ordering nodes in Directed Acyclic Graphs based on indegree.",icon:"Layers"},"shortest-path-01":{id:"shortest-path-01",name:"0-1 BFS & Distance Metrics",phase:7,description:"Shortest paths on 0-1 weighted graphs using double-ended queues.",icon:"Zap"},"tarjans-scc-bridges":{id:"tarjans-scc-bridges",name:"Tarjan's (Bridges & SCC)",phase:7,description:"Finding critical bridges and strongly connected components in O(V+E).",icon:"Network",
2372isAdvanced:!0},"hierholzers-eulerian":{id:"hierholzers-eulerian",name:"Hierholzer's (Eulerian Path)",phase:7,description:"Constructing Eulerian routes visiting every edge exactly once.",icon:"Network",isAdvanced:!0},"grid-dp":{id:"grid-dp",name:"DP on Grid",phase:8,description:"Finding optimal paths and target counts in 2D matrices using grid coordinates.",icon:"Cpu"},"knapsack-subset-dp":{id:"knapsack-subset-dp",name:"Knapsack & Subset DP",phase:8,description:"Optimizing state transitions with bounded capacity constraints.",icon:"Cpu"},"stock-dp":{id:"stock-dp",name:"DP on Stocks",phase:8,description:"Maximizing transaction profit bounds using finite state machines.",icon:"Cpu"},"alignment-dp":{id:"alignment-dp",name:"Sequence Alignment & LCS DP",phase:8,description:"Comparing and aligning sequences (e.g. Longest Common Subsequence).",icon:"Cpu"},"interval-dp":{id:"interval-dp",name:"Interval DP Patterns",phase:8,description:"Merging subsegments and folding ranges dynamically.",icon:"Cpu"},"bitmask-dp":{id:"bitmask-dp",name:"Bitmask DP State Compression",phase:8,description:"Exponential state compression for small constraint sets.",icon:"Code",isAdvanced:!0},"digit-dp":{id:"digit-dp",name:"Digit DP Range Counting",phase:8,description:"Counting numbers matching specific digit traits in value ranges.",icon:"Code",isAdvanced:!0},"bit-manipulation-tricks":{id:"bit-manipulation-tricks",name:"Bit Manipulation Patterns",phase:9,description:"Low-level bit masking, set queries, and arithmetic shortcuts.",icon:"Code"},"binary-exponentiation":{id:"binary-exponentiation",name:"Binary Exponentiation",phase:9,description:"Computing fast modular exponentiation in O(log N).",icon:"Code"},"trie-autocomplete":{id:"trie-autocomplete",name:"Trie Autocomplete & XOR Search",phase:9,description:"Fast prefix matching and bitwise XOR query indexing.",icon:"Database"},"rolling-hash-rabin":{id:"rolling-hash-rabin",name:"Rolling Hash Substring Match",phase:9,description:"String matching in O(N) via polynomial hash sliding.",icon:"Zap"},"sieve-primes":{id:"sieve-primes",name:"Sieve of Eratosthenes",phase:10,description:"Efficiently finding all primes up to N.",icon:"Activity"},"segment-tree":{id:"segment-tree",name:"Segment Tree Range Queries",phase:10,description:"Range query execution with point/range updates in O(log N).",icon:"Monitor",isAdvanced:!0},"fenwick-tree":{id:"fenwick-tree",name:"Fenwick Tree Range Queries",phase:10,description:"Binary Indexed Trees for prefix calculation in O(log N).",icon:"Monitor",isAdvanced:!0},"kmp-algorithm":{id:"kmp-algorithm",name:"KMP String Matching",phase:10,description:"Fast substring searches using failure fallback tables.",icon:"Search",isAdvanced:!0},"line-sweep":{id:"line-sweep",name:"Line Sweep Event Processing",phase:10,description:"Processing geometric overlaps across a sorted plane.",icon:"Layers",isAdvanced:!0}},fl=[{id:"arrays-hashing",title:"Arrays & Hashing",techniques:["hashing-cache","prefix-sum","boyer-moore-majority"]},{id:"two-pointers",title:"Two Pointers",techniques:["two-pointers"]},{id:"linked-list",title:"Linked List",techniques:["fast-slow-pointers","dummy-node-mutation"]},{id:"sliding-window",title:"Sliding Window",techniques:["sliding-window"]},{id:"backtracking",title:"Backtracking",techniques:["recursion-templates","combinatorics-states","backtracking-pruning"]}],bl=[{id:"arrays-hashing",title:"Arrays & Custom Sort",techniques:["custom-sorting","kadanes-algorithm"]},{id:"stack",title:"Monotonic Stack/Queue",techniques:["monotonic-stack","monotonic-queue"]},{id:"binary-search",title:"Binary Search on Answer",techniques:["binary-search-ans"]},{id:"heap-pq",title:"Heaps & K-Way Merge",techniques:["two-heaps","k-way-merge"]},{id:"intervals",title:"Interval Overlaps",techniques:["merge-intervals"]},{id:"greedy",title:"Greedy Choice",techniques:["greedy-heuristics"]},{id:"trees",title:"Subtree Accumulation",techniques:["subtree-accumulation"]},{id:"graphs",title:"Grid & Graph Paths",techniques:["grid-navigation","multi-source-bfs","topological-sort","union-find-dsu"]}
2372,{id:"one-d-dp",title:"Divide & Conquer",techniques:["divide-and-conquer-split","quickselect"]},{id:"two-d-dp",title:"Dynamic Programming",techniques:["grid-dp","knapsack-subset-dp","stock-dp","alignment-dp"]}],yl=[{id:"bit-manipulation",title:"Bits & Powers",techniques:["bit-manipulation-tricks","binary-exponentiation"]},{id:"tries",title:"Prefix Tries",techniques:["trie-autocomplete"]},{id:"hard-trees",title:"Hard Tree",techniques:["binary-lifting-lca","tree-dp"]},{id:"hard-graphs",title:"Hard Graph",techniques:["cycle-detection-coloring","bipartite-graph-coloring","shortest-path-01","tarjans-scc-bridges","hierholzers-eulerian"]},{id:"two-d-dp",title:"Advanced DP",techniques:["interval-dp","bitmask-dp","digit-dp"]},{id:"math-geometry",title:"Ranges & String Math",techniques:["sieve-primes","rolling-hash-rabin","segment-tree","fenwick-tree","kmp-algorithm","line-sweep"]}],vl=[{from:"arrays-hashing",to:"two-pointers"},{from:"arrays-hashing",to:"linked-list"},{from:"two-pointers",to:"sliding-window"},{from:"linked-list",to:"backtracking"}],wl=[{from:"arrays-hashing",to:"binary-search"},{from:"arrays-hashing",to:"stack"},{from:"arrays-hashing",to:"heap-pq"},{from:"binary-search",to:"intervals"},{from:"binary-search",to:"greedy"},{from:"heap-pq",to:"trees"},{from:"heap-pq",to:"graphs"},{from:"greedy",to:"one-d-dp"},{from:"trees",to:"two-d-dp"},{from:"graphs",to:"two-d-dp"}],jl=[{from:"bit-manipulation",to:"tries"},{from:"bit-manipulation",to:"hard-trees"},{from:"tries",to:"hard-graphs"},{from:"hard-trees",to:"two-d-dp"},{from:"hard-graphs",to:"math-geometry"},{from:"two-d-dp",to:"math-geometry"},{from:"tries",to:"two-d-dp"},{from:"hard-trees",to:"hard-graphs"}],Nl={"arrays-hashing":{x:500,y:70},"two-pointers":{x:350,y:220},"linked-list":{x:650,y:220},"sliding-window":{x:350,y:370},backtracking:{x:650,y:370}},kl={"arrays-hashing":{x:500,y:70},"binary-search":{x:300,y:220},stack:{x:500,y:220},"heap-pq":{x:700,y:220},intervals:{x:200,y:370},greedy:{x:400,y:370},trees:{x:600,y:370},graphs:{x:800,y:370},"one-d-dp":{x:350,y:520},"two-d-dp":{x:650,y:520}},Sl={"bit-manipulation":{x:500,y:80},tries:{x:380,y:230},"hard-trees":{x:620,y:230},"hard-graphs":{x:380,y:380},"two-d-dp":{x:620,y:380},"math-geometry":{x:500,y:530}},Tl={"arrays-hashing":[{x:-210,y:-60},{x:-210,y:0},{x:-210,y:60}],"two-pointers":[{x:-210,y:0}],"linked-list":[{x:210,y:-30},{x:210,y:30}],"sliding-window":[{x:-210,y:0}],backtracking:[{x:210,y:-60},{x:210,y:0},{x:210,y:60}]},zl={"arrays-hashing":[{x:-210,y:-30},{x:-210,y:30}],"binary-search":[{x:-210,y:0}],stack:[{x:210,y:-30},{x:210,y:30}],"heap-pq":[{x:210,y:-30},{x:210,y:30}],intervals:[{x:-210,y:0}],greedy:[{x:-210,y:0}],trees:[{x:210,y:0}],graphs:[{x:210,y:-90},{x:210,y:-30},{x:210,y:30},{x:210,y:90}],"one-d-dp":[{x:-210,y:-30},{x:-210,y:30}],"two-d-dp":[{x:210,y:-30},{x:210,y:30},{x:210,y:90},{x:210,y:150}]},Cl={"bit-manipulation":[{x:-220,y:-30},{x:-220,y:30}],tries:[{x:220,y:0}],"hard-trees":[{x:220,y:-30},{x:220,y:30}],"hard-graphs":[{x:-220,y:-120},{x:-220,y:-60},{x:-220,y:0},{x:-220,y:60},{x:-220,y:120}],"two-d-dp":[{x:220,y:-60},{x:220,y:0},{x:220,y:60}],"math-geometry":[{x:220,y:-30},{x:220,y:30},{x:220,y:90},{x:220,y:150},{x:220,y:210},{x:220,y:270}]},Mt={"arrays-hashing":"#8be9fd","two-pointers":"#50fa7b","linked-list":"#bd93f9","sliding-window":"#ffb86c",backtracking:"#ff79c6",stack:"#f1fa8c","binary-search":"#ff5555","heap-pq":"#50fa7b",intervals:"#8be9fd",greedy:"#ffb86c",trees:"#bd93f9",graphs:"#ff5555","one-d-dp":"#ff79c6","two-d-dp":"#f1fa8c","bit-manipulation":"#50fa7b",tries:"#8be9fd","hard-trees":"#bd93f9","hard-graphs":"#ff5555","math-geometry":"#ffb86c"},_l={"#8be9fd":"cyan","#50fa7b":"green","#bd93f9":"purple","#ffb86c":"orange","#ff79c6":"pink","#f1fa8c":"yellow","#ff5555":"red"},zi=170,Ci=46,oa=zi/2,qt=Ci/2,ks=230,Ss=52,la=ks/2,ca=Ss/2;
2372function Al(){const t=$e(),[i,s]=a.useState(()=>{try{const c=localStorage.getItem("pynyx_dsa_tree_level");if(c==="beginner"||c==="intermediate"||c==="advanced")return c}catch(c){console.error(c)}return"beginner"}),[l,h]=a.useState(()=>{try{const j=localStorage.getItem("pynyx_dsa_tree_expanded_node");if(j)return j}catch(j){console.error(j)}return localStorage.getItem("pynyx_dsa_tree_level")==="advanced"?"bit-manipulation":"arrays-hashing"}),[u,o]=a.useState(null),[m,b]=a.useState([]);a.useEffect(()=>{try{localStorage.setItem("pynyx_dsa_tree_level",i)}catch(c){console.error(c)}},[i]),a.useEffect(()=>{try{l&&localStorage.setItem("pynyx_dsa_tree_expanded_node",l)}catch(c){console.error(c)}},[l]),a.useEffect(()=>{try{const c=localStorage.getItem("pynyx_completed_techniques");c&&b(JSON.parse(c))}catch(c){console.error("Failed to load completed techniques",c)}},[]);const w=(c,j)=>{j.stopPropagation(),j.preventDefault();let k;m.includes(c)?k=m.filter(I=>I!==c):k=[...m,c],b(k);try{localStorage.setItem("pynyx_completed_techniques",JSON.stringify(k))}catch(I){console.error(I)}},d=i==="beginner"?fl:i==="intermediate"?bl:yl,g=i==="beginner"?Nl:i==="intermediate"?kl:Sl,f=i==="beginner"?vl:i==="intermediate"?wl:jl,p=i==="beginner"?Tl:i==="intermediate"?zl:Cl,N=i==="beginner"?"520px":i==="intermediate"?"640px":"880px",T=c=>c.techniques.length===0?0:c.techniques.filter(k=>m.includes(k)).length/c.techniques.length*100,r=u||l;return e.jsxs("div",{className:"w-full flex flex-col items-center",children:[e.jsxs("div",{className:"flex border border-zinc-800 bg-zinc-900/90 p-1.5 rounded-xl gap-1 mb-8 shadow-md",children:[e.jsx("button",{onClick:()=>{s("beginner"),h("arrays-hashing")},className:v("px-4 py-2 text-xs font-semibold transition-all rounded-lg font-sans",i==="beginner"?"bg-violet-500/20 text-violet-300 border border-violet-500/40 shadow-sm":"text-zinc-400 hover:text-white"),children:"Beginner Core"}),e.jsx("button",{onClick:()=>{s("intermediate"),h("arrays-hashing")},className:v("px-4 py-2 text-xs font-semibold transition-all rounded-lg font-sans",i==="intermediate"?"bg-violet-500/20 text-violet-300 border border-violet-500/40 shadow-sm":"text-zinc-400 hover:text-white"),children:"Intermediate Paradigms"}),e.jsx("button",{onClick:()=>{s("advanced"),h("bit-manipulation")},className:v("px-4 py-2 text-xs font-semibold transition-all rounded-lg font-sans",i==="advanced"?"bg-violet-500/20 text-violet-300 border border-violet-500/40 shadow-sm":"text-zinc-400 hover:text-white"),children:"Advanced & Competitive"})]}),e.jsx("span",{className:"md:hidden text-[10px] text-violet-400 font-mono italic mb-3 flex items-center justify-center gap-1 bg-violet-500/10 px-3 py-1 rounded-full border border-violet-500/20",children:"← Swipe left/right to view full interactive techniques tree →"}),e.jsx("div",{className:"w-full overflow-x-auto no-scrollbar bg-zinc-950/90 backdrop-blur-xl border border-zinc-800 p-4 md:p-10 rounded-2xl relative flex justify-start md:justify-center shadow-2xl",children:e.jsxs("div",{style:{height:N},className:"relative w-[1000px] select-none flex-shrink-0 transition-all duration-300",children:[e.jsxs("svg",{className:"absolute inset-0 w-full h-full pointer-events-none z-0",children:[e.jsxs("defs",{children:[e.jsx("marker",{id:"arrow-default",viewBox:"0 0 10 10",refX:"6",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:e.jsx("path",{d:"M 0 2 L 7 5 L 0 8 z",fill:"#30363d"})}),e.jsx("marker",{id:"arrow-cyan",viewBox:"0 0 10 10",refX:"6",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:e.jsx("path",{d:"M 0 2 L 7 5 L 0 8 z",fill:"#8be9fd"})}),e.jsx("marker",{id:"arrow-green",viewBox:"0 0 10 10",refX:"6",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:e.jsx("path",{d:"M 0 2 L 7 5 L 0 8 z",fill:"#50fa7b"})}),e.jsx("marker",{id:"arrow-purple",viewBox:"0 0 10 10",refX:"6",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:e.jsx("path",{d:"M 0 2 L 7 5 L 0 8 z",fill:"#bd93f9"})}),e.jsx("marker",{id:"arrow-orange",viewBox:"0 0 10 10",refX:"6",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:e.jsx("path",{d:"M 0 2 L 7 5 L 0 8 z",fill:"#ffb86c"})}),e.jsx("marker",{id:"arrow-pink",viewBox:"0 0 10 10",refX:"6",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:e.jsx("path",{d:"M 0 2 L 7 5 L 0 8 z",fill:"#ff79c6"})}),e.jsx("marker",{id:"arrow-yellow",viewBox:"0 0 10 10",refX:"6",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:e.jsx("path",{d:"M 0 2 L 7 5 L 0 8 z",fill:"#f1fa8c"})}),e.jsx("marker",{id:"arrow-red",viewBox:"0 0 10 10",refX:"6",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto-start-reverse",children:e.jsx("path",{d:"M 0 2 L 7 5 L 0 8 z",fill:"#ff5555"})}),e.jsxs("filter",{id:"glow",x:"-20%",y:"-20%",width:"140%",height:"140%",children:[e.jsx("feGaussianBlur",{stdDeviation:"4",result:"blur"}),e.jsx("feComposite",{in:"SourceGraphic",in2:"blur",operator:"over"})]})]}),f.map((c,j)=>{const k=g[c.from],I=g[c.to];if(!k||!I)return null;const _=k.x,q=k.y+qt,F=I.x,O=I.y-qt,Y=(q+O)/2,te=`M ${_},${q} C ${_},${Y} ${F},${Y} ${F},${O}`,y=c.from===r||c.to===r,E=r&&Mt[r]||"#3b82f6",C=r?_l[Mt[r]]:"",$=C?`url(#arrow-${C})`:"url(#arrow-default)";return e.jsxs("g",{children:[y&&e.jsx("path",{d:te,fill:"none",stroke:E,strokeWidth:"5",strokeOpacity:"0.4",filter:"url
2372(#glow)"}),e.jsx("path",{d:te,fill:"none",stroke:y?E:"#30363d",strokeWidth:y?"2.5":"1.8",markerEnd:y?$:"url(#arrow-default)"})]},j)}),r&&e.jsx("g",{children:(()=>{const c=g[r],j=d.find(_=>_.id===r);if(!c||!j)return null;const k=j.techniques||[];if(k.length<=1)return null;const I=Mt[r]||"#3b82f6";return k.map((_,q)=>{var X;const F=((X=p[r])==null?void 0:X[q])||{x:0,y:0},O=c.x+F.x,Y=c.y+F.y;let te=c.x,y=c.y,E=O,C=Y;F.x<0?(te=c.x-oa,E=O+la):F.x>0?(te=c.x+oa,E=O-la):F.y<0?(y=c.y-qt,C=Y+ca):(y=c.y+qt,C=Y-ca);const $=(te+E)/2,R=F.x!==0?`M ${te},${y} C ${$},${y} ${$},${C} ${E},${C}`:`M ${te},${y} C ${te},${(y+C)/2} ${E},${(y+C)/2} ${E},${C}`;return e.jsx(A.path,{initial:{pathLength:0},animate:{pathLength:1},d:R,fill:"none",stroke:I,strokeWidth:"1.8",strokeDasharray:"4,4",className:"opacity-75"},q)})})()})]}),d.map(c=>{const j=c.id,k=g[j];if(!k)return null;const I=l===j,_=r===j,q=T(c),F=q===100,O=Mt[j]||"#3b82f6",Y=c.techniques.length===1,te=Y?c.techniques[0]:"",y=Y?m.includes(te):!1;return e.jsxs("div",{style:{position:"absolute",left:`${k.x}px`,top:`${k.y}px`,width:`${zi}px`,height:`${Ci}px`,transform:"translate(-50%, -50%)"},className:v("z-10 transition-all duration-200",_?"z-30 scale-105":"hover:z-20"),onMouseEnter:()=>o(j),onMouseLeave:()=>o(null),children:[Y?e.jsxs("div",{onClick:()=>{t(`/resources/${te}`)},className:v("w-full h-full relative rounded-md border flex items-center justify-between px-3 overflow-hidden shadow-lg transition-all duration-300 group tree-node-button cursor-pointer",_?"text-white":"bg-[#0b0c1e] border-[#30363d]/90 text-gray-300 hover:bg-[#0f112e] hover:border-gray-500/50 hover:scale-[1.02]"),style:{borderColor:_?O:y?"#50fa7b40":void 0,backgroundColor:_?`${O}20`:void 0,boxShadow:_?`0 0 25px ${O}35`:void 0,background:y?"linear-gradient(135deg, #090a1f 0%, rgba(80, 250, 123, 0.04) 100%)":_?void 0:`linear-gradient(135deg, #090a1f 0%, ${O}08 100%)`},children:[e.jsx("div",{className:"absolute left-0 top-1/4 bottom-1/4 w-[3px] rounded-r transition-all duration-300",style:{backgroundColor:y?"#50fa7b":O}}),e.jsx("span",{className:"flex-1 text-xs font-bold tracking-tight text-left font-outfit leading-tight truncate mr-2 pl-1 text-gray-200",children:c.title}),e.jsx("button",{onClick:E=>w(te,E),className:v("w-5 h-5 rounded-full border flex items-center justify-center transition-all duration-300 hover:scale-110 z-20",y?"bg-[#50fa7b]/20 border-[#50fa7b] text-[#50fa7b]":"bg-black/50 border-[#30363d] text-gray-500 hover:text-gray-300 hover:border-gray-400"),children:e.jsx(Xe,{size:10,strokeWidth:3})})]}):e.jsxs("button",{onClick:()=>{h(I?null:j)},className:v("w-full h-full relative rounded-md border flex flex-col justify-between overflow-hidden shadow-lg transition-all duration-300 group tree-node-button",_?"text-white":"bg-[#0b0c1e] border-[#30363d]/90 text-gray-300 hover:bg-[#0f112e] hover:border-gray-500/50 hover:scale-[1.02]"),style:{borderColor:_?O:void 0,backgroundColor:_?`${O}20`:void 0,boxShadow:_?`0 0 25px ${O}35`:void 0},children:[e.jsx("div",{className:v("h-[1.5px] w-full transition-opacity duration-300",_?"opacity-100":"opacity-0 group-hover:opacity-100"),style:{backgroundColor:O}}),e.jsx("div",{className:"flex-1 flex items-center justify-center px-2",children:e.jsx("span",{className:"text-xs font-bold tracking-tight text-center font-outfit leading-tight",children:c.title})}),e.jsx("div",{className:"w-full h-[3.5px] bg-black/50 relative",children:e.jsx("div",{className:v("h-full transition-all duration-500",F?"bg-[#50fa7b]":""),style:{width:`${q}%`,backgroundColor:F?void 0:O}})})]}),e.jsx(nt,{children:_&&c.techniques.length>1&&(()=>{const E=c.techniques||[];return e.jsx("div",{className:"absolute inset-0 pointer-events-none",children:E.map((C,$)=>{var xe;const R=((xe=p[j])==null?void 0:xe[$])||{x:0,y:0},X=gl[C];if(!X)return null;const re=m.includes(C);return e.jsx(A.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.2,delay:$*.01},style:{position:"absolute",left:`calc(50% + ${R.x}px - ${ks/2}px)`,top:`calc(50% + ${R.y}px - ${Ss/2}px)`,width:`${ks}px`,height:`${Ss}px`},className:"z-20 pointer-events-auto group/sub",children:e.jsxs("div",{className:v("w-full h-full rounded-md border flex items-center justify-between px-3 bg-[#070715]/95 backdrop-blur-md transition-all duration-300 relative shadow-[0_4px_20px_rgba(0,0,0,0.5)]",re?"border-[#50fa7b]/40 hover:border-[#50fa7b] hover:shadow-[0_0_15px_rgba(80,250,123,0.25)]":"border-[#30363d]"),style:{background:re?"linear-gradient(135deg, #090a1f 0%, rgba(80, 250, 123, 0.04) 100%)":`linear-gradient(135deg, #090a1f 0%, ${O}08 100%)`},onMouseEnter:se=>{re||(se.currentTarget.style.borderColor=`${O}80`,se.currentTarget.style.boxShadow=`0 0 15px ${O}30`)},onMouseLeave:se=>{re||(se.currentTarget.style.borderColor="#30363d",se.currentTarget.style.boxShadow="none")},children:[e.jsx("div",{className:"absolute left-0 top-1/4 bottom-1/4 w-[3px] rounded-r transition-all duration-300",style:{backgroundColor:re?"#50fa7b":O}}),e.jsx(fe,{to:`/resources/${X.id}`,className:"flex-1 text-[11px] font-bold uppercase text-left text-gray-200 hover:text-white transition-colors tracking-wider font-mono truncate mr-2 pl-1 leading-snug",title:X.name,children:X.name}),e.jsx("button",{onClick:se=>w(C,se),className:v("w-5 h-5 rounded-full border flex items-center justify-center transition-all duration-300 hover:scale-110",re?"bg-[#50fa7b]/20 border-[#50fa7b] text-[#50fa7b]":"bg-black/50 border-[#30363d] text-gray-500 hover:text-gray-300 hover:border-gray-400"),children:e.jsx(Xe,{size:10,strokeWidth:3})})]})},C)})})})()})]},j)})]})})]})}const $l=[{id:"custom-sorting",name:"Custom Sorting & Compression",phase:1,description:"Sorting with custom comparators and coordinate mapping techniques.",icon:De},{id:"hashing-cache",name:"Frequency Maps & Hashing Cache",phase:1,description:"Reducing O(N^2) loops to O(N) by caching complements and frequencies.",icon:Gt},{id:"two-pointers",name:"Two Pointers",phase:1,description:"Shrinking arrays with left/right pointers to find target criteria.",icon:Nt},{id:"sliding-window",name:"Sliding Window",phase:1,description:"Tracking subsegment extremes and window size optimizations.",icon:st},{id:"prefix-sum",name:"Prefix Sum",phase:1,description:"Executing range sum queries and range updates in O(1).",icon:vt},{id:"binary-search-ans",name:"Binary Search on Answer",phase:1,description:"Logarithmic search on monotonic boolean value predicates.",icon:es}
2372,{id:"boyer-moore-majority",name:"Boyer-Moore Voting",phase:1,description:"Finding the majority element in O(N) time and O(1) space.",icon:De},{id:"monotonic-stack",name:"Monotonic Stack",phase:2,description:"Using LIFO structures to search nearest greater/smaller boundaries in O(N).",icon:Nt},{id:"monotonic-queue",name:"Monotonic Queue / Deque",phase:2,description:"Tracking rolling minima and maxima in sliding windows.",icon:st},{id:"two-heaps",name:"Two Heaps Pattern",phase:2,description:"Managing split min/max heaps to track running medians.",icon:Me},{id:"fast-slow-pointers",name:"Fast & Slow Pointers",phase:2,description:"Pointer-chasing cycle detection and list middle-point retrieval.",icon:Ge},{id:"dummy-node-mutation",name:"Dummy Node Mutation",phase:2,description:"Linked List modification and reversal without null-pointer checks.",icon:Ge},{id:"recursion-templates",name:"Recursion",phase:3,description:"Mastering functional call stacks and sub-routine execution.",icon:Ge},{id:"combinatorics-states",name:"Combinatorics / Subsets",phase:3,description:"Generating subsets, permutations, and power sets.",icon:ri},{id:"backtracking-pruning",name:"Backtracking & Pruning",phase:3,description:"Exploring state-space trees with aggressive constraint checks.",icon:kt},{id:"greedy-heuristics",name:"Greedy Choice / Scheduling",phase:4,description:"Selecting locally optimal options for global results.",icon:Ge},{id:"divide-and-conquer-split",name:"Divide and Conquer",phase:4,description:"Splitting problems into independent parts (e.g. Inversions).",icon:st},{id:"quickselect",name:"Quickselect",phase:4,description:"Retrieving the K-th largest element in O(N) average time.",icon:Me},{id:"kadanes-algorithm",name:"Kadane's Algorithm",phase:5,description:"Tracking maximum contiguous subarray sums in O(N).",icon:Lr},{id:"merge-intervals",name:"Merge Intervals",phase:5,description:"Handling range scheduling and overlap merging.",icon:vt},{id:"k-way-merge",name:"K-way Merge",phase:5,description:"Merging K sorted lists/arrays using heaps.",icon:Ge},{id:"subtree-accumulation",name:"Subtree Accumulation",phase:6,description:"Aggregating child node metrics at parent root levels.",icon:Ge},{id:"tree-dp",name:"Tree DP",phase:6,description:"Executing dynamic programming decisions on tree structures.",icon:De},{id:"binary-lifting-lca",name:"LCA & Binary Lifting",phase:6,description:"Calculating Lowest Common Ancestors using exponential power jumps.",icon:kt},{id:"grid-navigation",name:"Grid & Flood Fill",phase:7,description:"Traversing 2D matrices as implicit graph networks.",icon:vt},{id:"multi-source-bfs",name:"Multi-Source BFS",phase:7,description:"Propagating multiple BFS starting lines simultaneously.",icon:st},{id:"cycle-detection-coloring",name:"Cycle Detection",phase:7,description:"Identifying loops in graphs using state color flags.",icon:Me},{id:"bipartite-graph-coloring",name:"Bipartite Graphs",phase:7,description:"Checking graph biparteness using two-color BFS/DFS.",icon:Me},{id:"union-find-dsu",name:"Union-Find (DSU)",phase:7,description:"Managing dynamic connectivity and path compression in O(alpha).",icon:Gt},{id:"topological-sort",name:"Topological Sort",phase:7,description:"Ordering nodes in Directed Acyclic Graphs based on indegree.",icon:Nt},{id:"shortest-path-01",name:"Shortest Path (0-1 BFS)",phase:7,description:"Shortest paths on 0-1 weighted graphs using double-ended queues.",icon:st},{id:"tarjans-scc-bridges",name:"Tarjan's (Bridges / SCC)",phase:7,description:"Finding critical bridges and strongly connected components in O(V+E).",icon:kt,isAdvanced:!0},{id:"hierholzers-eulerian",name:"Hierholzer's (Eulerian)",phase:7,description:"Constructing Eulerian routes visiting every edge exactly once.",icon:kt,isAdvanced:!0}
2372,{id:"grid-dp",name:"DP on Grid",phase:8,description:"Finding optimal paths and target counts in 2D matrices using grid coordinates.",icon:De},{id:"knapsack-subset-dp",name:"Knapsack / Subset DP",phase:8,description:"Optimizing state transitions with bounded capacity constraints.",icon:De},{id:"stock-dp",name:"DP on Stocks",phase:8,description:"Maximizing transaction profit bounds using finite state machines.",icon:De},{id:"alignment-dp",name:"Sequence Alignment DP",phase:8,description:"Comparing and aligning sequences (e.g. Longest Common Subsequence).",icon:De},{id:"interval-dp",name:"Interval DP",phase:8,description:"Merging subsegments and folding ranges dynamically.",icon:De},{id:"bitmask-dp",name:"Bitmask DP",phase:8,description:"Exponential state compression for small constraint sets.",icon:Be,isAdvanced:!0},{id:"digit-dp",name:"Digit DP",phase:8,description:"Counting numbers matching specific digit traits in value ranges.",icon:Be,isAdvanced:!0},{id:"bit-manipulation-tricks",name:"Bit Manipulation",phase:9,description:"Low-level bit masking, set queries, and arithmetic shortcuts.",icon:Be},{id:"binary-exponentiation",name:"Binary Exponentiation",phase:9,description:"Computing fast modular exponentiation in O(log N).",icon:Be},{id:"trie-autocomplete",name:"Trie",phase:9,description:"Fast prefix matching and bitwise XOR query indexing.",icon:Gt},{id:"rolling-hash-rabin",name:"Rolling Hash",phase:9,description:"String matching in O(N) via polynomial hash sliding.",icon:st},{id:"segment-tree",name:"Segment Tree",phase:10,description:"Range query execution with point/range updates in O(log N).",icon:vt,isAdvanced:!0},{id:"fenwick-tree",name:"Fenwick Tree",phase:10,description:"Binary Indexed Trees for prefix calculation in O(log N).",icon:vt,isAdvanced:!0},{id:"kmp-algorithm",name:"KMP Algorithm",phase:10,description:"Fast substring searches using failure fallback tables.",icon:es,isAdvanced:!0},{id:"line-sweep",name:"Line Sweep",phase:10,description:"Processing geometric overlaps across a sorted plane.",icon:Nt,isAdvanced:!0}],Il=[{id:1,name:"Core Foundations",color:"text-[#50fa7b]",border:"border-[#50fa7b]/30",bg:"bg-[#50fa7b]/5"},{id:2,name:"Basic Data Structures",color:"text-[#bd93f9]",border:"border-[#bd93f9]/30",bg:"bg-[#bd93f9]/5"},{id:3,name:"Recursion -> Backtracking",color:"text-[#8be9fd]",border:"border-[#8be9fd]/30",bg:"bg-[#8be9fd]/5"},{id:4,name:"Greedy + Divide",color:"text-[#f1fa8c]",border:"border-[#f1fa8c]/30",bg:"bg-[#f1fa8c]/5"},{id:5,name:"Arrays Special",color:"text-[#ffb86c]",border:"border-[#ffb86c]/30",bg:"bg-[#ffb86c]/5"},{id:6,name:"Trees",color:"text-[#ff79c6]",border:"border-[#ff79c6]/30",bg:"bg-[#ff79c6]/5"},{id:7,name:"Graphs (Major)",color:"text-[#50fa7b]",border:"border-[#50fa7b]/30",bg:"bg-[#50fa7b]/5"},{id:8,name:"Dynamic Programming",color:"text-[#bd93f9]",border:"border-[#bd93f9]/30",bg:"bg-[#bd93f9]/5"},{id:9,name:"Bit & Structures",color:"text-[#8be9fd]",border:"border-[#8be9fd]/30",bg:"bg-[#8be9fd]/5"},{id:10,name:"Advanced (Do Last)",color:"text-[#ff5555]",border:"border-[#ff5555]/30",bg:"bg-[#ff5555]/5",isCritical:!0}],Ht=[{id:"algebra-numbers",name:"Algebra & Number Theory",color:"text-[#8be9fd]",border:"border-[#8be9fd]/30",bg:"bg-[#8be9fd]/5"},{id:"arithmetic",name:"Arithmetic Core",color:"text-[#50fa7b]",border:"border-[#50fa7b]/30",bg:"bg-[#50fa7b]/5"},{id:"time-motion",name:"Time & Motion",color:"text-[#ffb86c]",border:"border-[#ffb86c]/30",bg:"bg-[#ffb86c]/5"},{id:"geometry-count",name:"Geometry & Combinatorics",color:"text-[#bd93f9]",border:"border-[#bd93f9]/30",bg:"bg-[#bd93f9]/5"},{id:"data-logic",name:"Data & Logical Analysis",color:"text-[#ff79c6]",border:"border-[#ff79c6]/30",bg:"bg-[#ff79c6]/5"}],Vt=[{id:"series-coding",name:"Series & Coding",color:"text-[#8be9fd]",border:"border-[#8be9fd]/30",bg:"bg-[#8be9fd]/5"},{id:"relations-directions",name:"Relations & Space",color:"text-[#50fa7b]",border:"border-[#50fa7b]/30",bg:"bg-[#50fa7b]/5"},{id:"arrangements-puzzles",name:"Arrangements & Puzzles",color:"text-[#ffb86c]",border:"border-[#ffb86c]/30",bg:"bg-[#ffb86c]/5"},{id:"logic-statements",name:"Logical Statements",color:"text-[#bd93f9]",border:"border-[#bd93f9]/30",bg:"bg-[#bd93f9]/5"},{id:"analytical",name:"Analytical Core",color:"text-[#ff79c6]",border:"border-[#ff79c6]/30",bg:"bg-[#ff79c6]/5"}],Pl=t=>{switch(t){case"Hash":return ii;case"Percent":return Rr;case"TrendingUp":return Or;case"Columns":return Ms;case"Scale":return Dr;case"Clock":return Ha;case"Compass":return ai;case"LayoutGrid":return Ms;case"Dice5":return Er;case"ListChecks":return si;case"Shapes":return Pr;case"Variable":return Ir;case"BarChart3":return zt;case"CheckSquare":return ti;default:return xs}},El=t=>{switch(t){case"Hash":return ii;case"Code":return Be;case"Network":return kt;case"Compass":return ai;case"Layers":return Nt;case"ListChecks":return si;case"HelpCircle":return xs;case"Terminal":return He;case"LayoutGrid":return ri;case"Activity":return Me;case"CheckSquare":return ti;default:return xs}},Dl={hidden:{opacity:0}
2372,visible:{opacity:1,transition:{staggerChildren:.1,delayChildren:.2}}},Wt={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.5,ease:"easeInOut"}}},Ol=()=>{var T;const[t,i]=_s(),[s,l]=a.useState(""),h=t.get("tab"),u=a.useMemo(()=>h==="quant"?"quant":h==="logical"?"logical":"dsa",[h]),o=t.get("subTab"),m=a.useMemo(()=>o==="techniques"?"techniques":"foundations",[o]),b=r=>{i(r==="dsa"?{tab:r,subTab:"foundations"}:{tab:r})},w=r=>{i({tab:"dsa",subTab:r})},d=a.useMemo(()=>{let r=0;const c=j=>{j.id!=="dsa-root"&&r++,j.children&&j.children.forEach(c)};return c(ws),r},[]),g=Il,f=$l;a.useMemo(()=>f.filter(r=>r.name.toLowerCase().includes(s.toLowerCase())||r.description.toLowerCase().includes(s.toLowerCase())),[s,f]);const p=a.useMemo(()=>ta.filter(r=>r.title.toLowerCase().includes(s.toLowerCase())||r.description.toLowerCase().includes(s.toLowerCase())||r.topics.some(j=>j.toLowerCase().includes(s.toLowerCase()))),[s]),N=a.useMemo(()=>sa.filter(r=>r.title.toLowerCase().includes(s.toLowerCase())||r.description.toLowerCase().includes(s.toLowerCase())||r.topics.some(j=>j.toLowerCase().includes(s.toLowerCase()))),[s]);return e.jsxs("div",{className:"min-h-screen bg-[#09090b] text-zinc-300 selection:bg-violet-500/30 relative overflow-x-hidden",children:[e.jsx("div",{className:"fixed inset-0 bg-[#09090b] pointer-events-none"}),e.jsx("div",{className:"fixed top-0 left-1/2 -translate-x-1/2 w-[800px] h-[400px] rounded-full pointer-events-none opacity-80",style:{background:"radial-gradient(circle, rgba(139,92,246,0.12) 0%, transparent 70%)",filter:"blur(80px)"}}),e.jsx("div",{className:"fixed inset-0 opacity-[0.03] pointer-events-none",style:{backgroundImage:"linear-gradient(rgba(255,255,255,0.4) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.4) 1px, transparent 1px)",backgroundSize:"48px 48px"}}),e.jsxs(A.div,{initial:"hidden",animate:"visible",variants:Dl,className:"relative z-20 max-w-[1700px] mx-auto w-full px-4 sm:px-8 py-4 sm:py-8 space-y-6 sm:space-y-10",children:[e.jsxs("div",{className:"space-y-6 p-4 sm:p-6 bg-zinc-950/90 border border-zinc-800 rounded-2xl backdrop-blur-xl shadow-2xl relative overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 right-0 w-80 h-80 bg-violet-600/[0.04] rounded-full blur-3xl pointer-events-none"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center justify-between border-b border-zinc-800 pb-6 gap-6 relative z-10",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"p-3 bg-violet-500/10 border border-violet-500/30 rounded-xl shadow-md shrink-0",children:e.jsx(Pa,{size:24,className:"text-violet-400"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-xl sm:text-2xl md:text-3xl font-bold tracking-tight text-white font-outfit",children:"Learning Resources"}),e.jsxs("p",{className:"text-xs text-zinc-400 font-medium tracking-wide mt-0.5 flex items-center gap-2",children:[e.jsx(Me,{size:13,className:"text-emerald-400 shrink-0"})," Comprehensive Data Structures, Algorithms & Aptitude Guides"]})]})]}),e.jsxs("div",{className:"flex items-center gap-4 sm:gap-6 self-start lg:self-auto bg-zinc-900/90 border border-zinc-800 px-4 sm:px-5 py-2.5 rounded-xl backdrop-blur-md shadow-lg",children:[e.jsxs("div",{className:"text-right",children:[e.jsx("p",{className:"text-[10px] font-semibold text-zinc-400 uppercase tracking-wider font-sans",children:"Total Topics"}),e.jsx("p",{className:"text-base sm:text-lg font-bold text-white font-outfit mt-0.5",children:u==="dsa"?m==="foundations"?d:f.length:u==="quant"?ta.length:sa.length})]}),e.jsx("div",{className:"h-6 w-[1px] bg-zinc-800"}),e.jsxs("div",{className:"text-right",children:[e.jsx("p",{className:"text-[10px] font-semibold text-zinc-400 uppercase tracking-wider font-sans",children:"Learning Modules"}),e.jsx("p",{className:"text-base sm:text-lg font-bold text-white font-outfit mt-0.5",children:u==="dsa"?m==="foundations"?((T=ws.children)==null?void 0:T.length)||8:g.length:u==="quant"?Ht.length:Vt.length})]})]})]}),e.jsxs("div",{className:"flex flex-col md:flex-row items-stretch md:items-center justify-between gap-4 relative z-10",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row flex-wrap items-stretch sm:items-center gap-3 w-full md:w-auto",children:[e.jsxs("div",{className:"inline-flex items-center border border-zinc-800 bg-zinc-900/90 p-1.5 rounded-xl gap-1 shrink-0 overflow-x-auto no-scrollbar max-w-full",children:[e.jsx("button",{onClick:()=>{b("dsa"),l("")},className:v("px-3 sm:px-4 py-2 text-xs font-semibold transition-all rounded-lg whitespace-nowrap font-sans",u==="dsa"?"bg-violet-500/20 text-violet-300 border border-violet-500/40 shadow-sm":"text-zinc-400 hover:text-white"),children:"DSA Library"}),e.jsx("button",{onClick:()=>{b("quant"),l("")},className:v("px-3 sm:px-4 py-2 text-xs font-semibold transition-all rounded-lg whitespace-nowrap font-sans",u==="quant"?"bg-violet-500/20 text-violet-300 border border-violet-500/40 shadow-sm":"text-zinc-400 hover:text-white"),children:"Quantitative Aptitude"}),e.jsx("button",{onClick:()=>{b("logical"),l("")},className:v("px-3 sm:px-4 py-2 text-xs font-semibold transition-all rounded-lg whitespace-nowrap font-sans",u==="logical"?"bg-violet-500/20 text-violet-300 border border-violet-500/40 shadow-sm":"text-zinc-400 hover:text-white"),children:"Logical Reasoning"})]}),u==="dsa"&&e.jsxs("div",{className:"inline-flex items-center border border-zinc-800 bg-zinc-900/90 p-1.5 rounded-xl gap-1 shrink-0 overflow-x-auto no-scrollbar max-w-full",children:[e.jsx("button",{onClick:()=>w("foundations"),className:v("px-3.5 py-1.5 text-xs font-medium transition-all rounded-lg whitespace-nowrap font-sans",m==="foundations"?"bg-zinc-800 text-white font-semibold":"text-zinc-400 hover:text-white"),children:"Foundations Roadmap"}),e.jsx("button",{onClick:()=>w("techniques"),className:v("px-3.5 py-1.5 text-xs font-medium transition-all rounded-lg whitespace-nowrap font-sans",m==="techniques"?"bg-zinc-800 text-white font-semibold":"text-zinc-400 hover:text-white"),children:"Problem Solving Techniques"})]})]}),e.jsxs("div",{className:"relative w-full md:w-[260px] shrink-0",children:[e.jsx(es,{size:14,className:"absolute left-3.5 to
2372p-1/2 -translate-y-1/2 text-zinc-500"}),e.jsx("input",{type:"text",placeholder:"Search topics...",value:s,onChange:r=>l(r.target.value),className:"w-full bg-zinc-900/90 border border-zinc-800 pl-10 pr-4 py-2 text-xs text-white focus:outline-none focus:border-violet-500/70 placeholder-zinc-500 rounded-xl font-sans transition-all shadow-sm"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-12 gap-6 items-stretch",children:[u==="dsa"&&m==="techniques"&&e.jsx("div",{className:"col-span-12",children:e.jsx(Al,{})}),u==="quant"&&e.jsxs(A.div,{variants:Wt,className:"col-span-12 bg-zinc-950/90 backdrop-blur-xl p-12 relative min-h-[380px] rounded-2xl overflow-hidden group border border-zinc-800 shadow-2xl",children:[e.jsx("div",{className:"absolute top-6 left-8 z-20",children:e.jsx("p",{className:"text-xs font-semibold text-zinc-400 tracking-wider uppercase font-sans",children:"Quantitative Aptitude Map"})}),e.jsx("div",{className:"relative w-full h-full mt-10 overflow-x-auto no-scrollbar pb-12 flex items-center justify-center",children:e.jsxs("div",{className:"min-w-[1200px] h-[220px] relative",children:[e.jsxs("svg",{className:"absolute inset-0 w-full h-full pointer-events-none overflow-visible",children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"helixGrad1",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[e.jsx("stop",{offset:"0%",stopColor:"#8be9fd",stopOpacity:"0.1"}),e.jsx("stop",{offset:"50%",stopColor:"#8be9fd",stopOpacity:"0.8"}),e.jsx("stop",{offset:"100%",stopColor:"#8be9fd",stopOpacity:"0.1"})]}),e.jsxs("linearGradient",{id:"helixGrad2",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[e.jsx("stop",{offset:"0%",stopColor:"#bd93f9",stopOpacity:"0.1"}),e.jsx("stop",{offset:"50%",stopColor:"#bd93f9",stopOpacity:"0.8"}),e.jsx("stop",{offset:"100%",stopColor:"#bd93f9",stopOpacity:"0.1"})]})]}),e.jsx(A.path,{d:"M 120 110 C 220 110, 220 60, 320 60 S 420 160, 520 160 S 620 60, 720 60 S 820 160, 920 160 S 1020 110, 1080 110",fill:"none",stroke:"url(#helixGrad1)",strokeWidth:"1.5",className:"drop-shadow-[0_0_4px_rgba(139,233,253,0.3)]",initial:{pathLength:0},animate:{pathLength:1},transition:{duration:2.5,ease:"easeInOut"}}),e.jsx(A.path,{d:"M 120 110 C 220 110, 220 160, 320 160 S 420 60, 520 60 S 620 160, 720 160 S 820 60, 920 60 S 1020 110, 1080 110",fill:"none",stroke:"url(#helixGrad2)",strokeWidth:"1.5",className:"drop-shadow-[0_0_4px_rgba(189,147,249,0.3)]",initial:{pathLength:0},animate:{pathLength:1},transition:{duration:2.5,ease:"easeInOut"}})]}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-between px-10",children:Ht.map((r,c)=>{const j=c===0||c===Ht.length-1?"110px":c%2===1?"60px":"160px",k=["√x","%","t=d/s","πr²","Σ"];return e.jsxs(A.div,{initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},transition:{delay:.1*c},className:"relative flex flex-col items-center group/node",style:{top:`calc(${j} - 110px)`},children:[e.jsx("div",{className:v("w-11 h-11 rounded-xl border bg-zinc-900 flex flex-col items-center justify-center z-10 transition-all duration-300 border-zinc-800 shadow-md","group-hover/node:border-violet-500 group-hover/node:scale-110 group-hover/node:shadow-lg"),children:e.jsx("span",{className:"text-xs font-semibold text-white font-sans",children:k[c]})}),e.jsx("div",{className:"absolute -bottom-8 w-max text-center",children:e.jsx("p",{className:v("text-xs font-medium tracking-wide transition-colors font-sans",r.color),children:r.name.split(" ")[0]})})]},r.id)})})]})}),e.jsxs("div",{className:"absolute bottom-6 right-8 flex items-center gap-3 opacity-60",children:[e.jsx("div",{className:"w-2 h-2 bg-violet-400 rounded-full animate-pulse"}),e.jsx("p",{className:"text-xs font-medium text-zinc-400",children:"Interactive Topic Network"})]})]}),u==="logical"&&e.jsxs(A.div,{variants:Wt,className:"col-span-12 bg-zinc-950/90 backdrop-blur-xl p-12 relative min-h-[380px] rounded-2xl overflow-hidden group border border-zinc-800 shadow-2xl",children:[e.jsx("div",{className:"absolute top-6 left-8 z-20",children:e.jsx("p",{className:"text-xs font-semibold text-zinc-400 tracking-wider uppercase font-sans",children:"Logical Reasoning Map"})}),e.jsx("div",{className:"relative w-full h-full mt-10 overflow-x-auto no-scrollbar pb-12 flex items-center justify-center",children:e.jsxs("div",{className:"min-w-[1200px] h-[220px] relative",children:[e.jsxs("svg",{className:"absolute inset-0 w-full h-full pointer-events-none overflow-visible",children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"logicalGrad1",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[e.jsx("stop",{offset:"0%",stopColor:"#50fa7b",stopOpacity:"0.1"}),e.jsx("stop",{offset:"50%",stopColor:"#50fa7b",stopOpacity:"0.8"}),e.jsx("stop",{offset:"100%",stopColor:"#50fa7b",stopOpacity:"0.1"})]}),e.jsxs("linearGradient",{id:"logicalGrad2",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[e.jsx("stop",{offset:"0%",stopColor:"#ffb86c",stopOpacity:"0.1"}),e.jsx("stop",{offset:"50%",stopColor:"#ffb86c",stopOpacity:"0.8"}),e.jsx("stop",{offset:"100%",stopColor:"#ffb86c",stopOpacity:"0.1"})]})]}),e.jsx(A.path,{d:"M 120 110 C 220 110, 220 60, 320 60 S 420 160, 520 160 S 620 60, 720 60 S 820 160, 920 160 S 1020 110, 1080 110",fill:"none",stroke:"url
2372(#logicalGrad1)",strokeWidth:"1.5",className:"drop-shadow-[0_0_4px_rgba(80,250,123,0.3)]",initial:{pathLength:0},animate:{pathLength:1},transition:{duration:2.5,ease:"easeInOut"}}),e.jsx(A.path,{d:"M 120 110 C 220 110, 220 160, 320 160 S 420 60, 520 60 S 620 160, 720 160 S 820 60, 920 60 S 1020 110, 1080 110",fill:"none",stroke:"url(#logicalGrad2)",strokeWidth:"1.5",className:"drop-shadow-[0_0_4px_rgba(255,184,108,0.3)]",initial:{pathLength:0},animate:{pathLength:1},transition:{duration:2.5,ease:"easeInOut"}})]}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-between px-10",children:Vt.map((r,c)=>{const j=c===0||c===Vt.length-1?"110px":c%2===1?"60px":"160px",k=["A→B","☈","⚄","∀/∃","Cause"];return e.jsxs(A.div,{initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},transition:{delay:.1*c},className:"relative flex flex-col items-center group/node",style:{top:`calc(${j} - 110px)`},children:[e.jsx("div",{className:v("w-11 h-11 rounded-xl border bg-zinc-900 flex flex-col items-center justify-center z-10 transition-all duration-300 border-zinc-800 shadow-md","group-hover/node:border-violet-500 group-hover/node:scale-110 group-hover/node:shadow-lg"),children:e.jsx("span",{className:"text-xs font-semibold text-white font-sans",children:k[c]})}),e.jsx("div",{className:"absolute -bottom-8 w-max text-center",children:e.jsx("p",{className:v("text-xs font-medium tracking-wide transition-colors font-sans",r.color),children:r.name.split(" ")[0]})})]},r.id)})})]})}),e.jsxs("div",{className:"absolute bottom-6 right-8 flex items-center gap-3 opacity-60",children:[e.jsx("div",{className:"w-2 h-2 bg-emerald-400 rounded-full animate-pulse"}),e.jsx("p",{className:"text-xs font-medium text-zinc-400",children:"Logic Fundamentals Network"})]})]})]}),u==="dsa"&&m==="foundations"&&e.jsx("div",{className:"space-y-8 pb-20",children:e.jsx(xl,{})}),u==="quant"&&e.jsx("div",{className:"space-y-16 pb-20",children:Ht.map((r,c)=>{const j=p.filter(k=>k.domain===r.id);return j.length===0?null:e.jsxs("div",{className:"space-y-6 animate-fadeIn",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("div",{className:v("px-3 py-1 rounded border-l-2 font-semibold text-xs tracking-wider uppercase bg-zinc-950/90 backdrop-blur-md border-zinc-800",r.color),children:["Domain 0",c+1]}),e.jsx("h2",{className:"text-lg font-bold text-white tracking-tight font-outfit",children:r.name}),e.jsx("div",{className:"flex-1 h-[1px] bg-zinc-800"})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:j.map(k=>{const I=Pl(k.icon);return e.jsx(A.div,{variants:Wt,whileHover:{y:-4},transition:{duration:.2},children:e.jsxs(fe,{to:`/resources/quant/${k.id}`,className:"group relative flex flex-col bg-zinc-950/90 backdrop-blur-xl border border-zinc-800 hover:border-violet-500/50 transition-all overflow-hidden h-full rounded-2xl shadow-xl hover:shadow-2xl",children:[e.jsx("div",{className:"h-0.5 w-full opacity-0 group-hover:opacity-100 transition-all duration-300 bg-gradient-to-r from-transparent via-violet-500 to-transparent"}),e.jsxs("div",{className:"p-6 space-y-4 flex-1 flex flex-col relative z-10",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-zinc-900 border border-zinc-800 rounded-lg transition-colors group-hover:border-violet-500/30",children:e.jsx(I,{size:16,className:"text-violet-400"})}),e.jsx("span",{className:"text-xs font-medium text-zinc-400 font-sans",children:"Quantitative"})]}),e.jsx(Ae,{size:14,className:"text-zinc-500 group-hover:text-violet-400 group-hover:translate-x-0.5 transition-all"})]}),e.jsx("div",{className:"space-y-1",children:e.jsx("h3",{className:"text-base font-bold tracking-tight transition-colors leading-snug text-white group-hover:text-violet-300 font-outfit",children:k.title})}),e.jsx("div",{className:"text-xs text-zinc-400 leading-relaxed font-sans line-clamp-2 group-hover:text-zinc-300 transition-colors",children:k.description}),e.jsxs("div",{className:"pt-4 mt-auto border-t border-zinc-800/80 flex items-center justify-between",children:[e.jsxs("span",{className:"text-xs font-semibold font-sans text-violet-400 group-hover:underline flex items-center gap-1",children:["View Topic ",e.jsx(Bs,{size:12})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-emerald-400"}),e.jsx("span",{className:"text-[10px] font-medium text-zinc-400",children:"Available"})]})]})]})]})},k.id)})})]},r.id)})}),u==="logical"&&e.jsx("div",{className:"space-y-16 pb-20",children:Vt.map((r,c)=>{const j=N.filter(k=>k.domain===r.id);return j.length===0?null:e.jsxs("div",{className:"space-y-6 animate-fadeIn",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("div",{className:v("px-3 py-1 rounded border-l-2 font-semibold text-xs tracking-wider up
2372percase bg-zinc-950/90 backdrop-blur-md border-zinc-800",r.color),children:["Domain 0",c+1]}),e.jsx("h2",{className:"text-lg font-bold text-white tracking-tight font-outfit",children:r.name}),e.jsx("div",{className:"flex-1 h-[1px] bg-zinc-800"})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:j.map(k=>{const I=El(k.icon);return e.jsx(A.div,{variants:Wt,whileHover:{y:-4},transition:{duration:.2},children:e.jsxs(fe,{to:`/resources/logical/${k.id}`,className:"group relative flex flex-col bg-zinc-950/90 backdrop-blur-xl border border-zinc-800 hover:border-violet-500/50 transition-all overflow-hidden h-full rounded-2xl shadow-xl hover:shadow-2xl",children:[e.jsx("div",{className:"h-0.5 w-full opacity-0 group-hover:opacity-100 transition-all duration-300 bg-gradient-to-r from-transparent via-violet-500 to-transparent"}),e.jsxs("div",{className:"p-6 space-y-4 flex-1 flex flex-col relative z-10",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-zinc-900 border border-zinc-800 rounded-lg transition-colors group-hover:border-violet-500/30",children:e.jsx(I,{size:16,className:"text-violet-400"})}),e.jsx("span",{className:"text-xs font-medium text-zinc-400 font-sans",children:"Logical"})]}),e.jsx(Ae,{size:14,className:"text-zinc-500 group-hover:text-violet-400 group-hover:translate-x-0.5 transition-all"})]}),e.jsx("div",{className:"space-y-1",children:e.jsx("h3",{className:"text-base font-bold tracking-tight transition-colors leading-snug text-white group-hover:text-violet-300 font-outfit",children:k.title})}),e.jsx("div",{className:"text-xs text-zinc-400 leading-relaxed font-sans line-clamp-2 group-hover:text-zinc-300 transition-colors",children:k.description}),e.jsxs("div",{className:"pt-4 mt-auto border-t border-zinc-800/80 flex items-center justify-between",children:[e.jsxs("span",{className:"text-xs font-semibold font-sans text-violet-400 group-hover:underline flex items-center gap-1",children:["View Topic ",e.jsx(Bs,{size:12})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-emerald-400"}),e.jsx("span",{className:"text-[10px] font-medium text-zinc-400",children:"Available"})]})]})]})]})},k.id)})})]},r.id)})})]})]})},da={vertexShader:`
2373    varying vec2 vUv;
2374    void main() {
2375      vUv = uv;
2376      gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
2377    }
2378  `,fragmentShader:`
2379    varying vec2 vUv;
2380    uniform float time;
2381    uniform vec3 color;
2382    uniform vec3 scanColor;
2383    uniform float lineThickness;
2384    uniform float scale;
2385    uniform float opacity;
2386    uniform float scanOpacity;
2387    
2388    void main() {
2389      vec2 uv = vUv * scale;
2390      vec2 grid = abs(fract(uv - 0.5) - 0.5) / fwidth(uv);
2391      float line = min(grid.x, grid.y);
2392      float alpha = 1.0 - smoothstep(lineThickness - 1.0, lineThickness, line);
2393      
2394      // Horizontal Scan line
2395      float scan = smoothstep(0.4, 0.5, abs(sin(vUv.y * 3.0 - time * 1.5)));
2396      vec3 finalColor = mix(color, scanColor, scan * scanOpacity);
2397      
2398      // Additional slight pulse
2399      float pulse = 0.05 * sin(time);
2400      
2401      gl_FragColor = vec4(finalColor, min(1.0, alpha * opacity + scan * scanOpacity + pulse));
2402    }
2403  `},Rl=({scanOpacity:t=.5,linesColor:i="#30363d",lineThickness:s=1,gridScale:l=.1,scanColor:h="#d2a8ff"})=>{const u=a.useRef(null),{viewport:o}=Wr(),m=a.useMemo(()=>{const b=w=>{if(w.startsWith("rgba")){const d=w.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(d)return new qs(`rgb(${d[1]}, ${d[2]}, ${d[3]})`)}return new qs(w)};return{time:{value:0},color:{value:b(i)},scanColor:{value:b(h)},lineThickness:{value:s},scale:{value:1/l},opacity:{value:1},scanOpacity:{value:t}}},[i,h,s,l,t]);return Gr(b=>{u.current&&(u.current.material.uniforms.time.value=b.clock.getElapsedTime())}),e.jsxs("mesh",{ref:u,position:[0,0,0],scale:[o.width,o.height,1],children:[e.jsx("planeGeometry",{args:[1,1]}),e.jsx("shaderMaterial",{transparent:!0,uniforms:m,vertexShader:da.vertexShader,fragmentShader:da.fragmentShader})]})},Ll=({scanOpacity:t,linesColor:i,lineThickness:s=1,gridScale:l=.05,scanColor:h="#d2a8ff",enablePost:u=!1,bloomIntensity:o=.5,chromaticAberration:m=.002,noiseIntensity:b=.02,showScan:w,gridColor:d})=>{let g=t;w===!1?g=0:(w===!0&&g===void 0||g===void 0)&&(g=.5);const f=d||i||"#30363d",p=a.useMemo(()=>new Fr(m,m),[m]);return e.jsx("div",{className:"grid-scan-container",children:e.jsxs(Br,{orthographic:!0,camera:{position:[0,0,10],zoom:1},gl:{alpha:!0,antialias:!0},style:{width:"100%",height:"100%",pointerEvents:"none"},children:[e.jsx(Rl,{scanOpacity:g,linesColor:f,lineThickness:s,gridScale:l,scanColor:h}),u&&e.jsxs(Mr,{children:[e.jsx(qr,{luminanceThreshold:.5,luminanceSmoothing:.9,intensity:o}),e.jsx(Hr,{opacity:b}),e.jsx(Vr,{offset:p,radialModulation:!1,modulationOffset:0})]})]})})},Fl=()=>{const{techniqueId:t}=Ur(),i=t?t.split("-").map(s=>s.charAt(0).toUpperCase()+s.slice(1)).join(" "):"Protocol Unknown";return e.jsxs("div",{className:"min-h-screen bg-[#050510] text-[#c9d1d9] font-mono relative selection:bg-[#bd93f9]/30",children:[e.jsx("div",{className:"fixed inset-0 bg-[#050510] bg-[linear-gradient(rgba(30,30,46,0.5)_1px,transparent_1px),linear-gradient(90deg,rgba(30,30,46,0.5)_1px,transparent_1px)] bg-[size:30px_30px] pointer-events-none"}),e.jsx("div",{className:"fixed inset-0 bg-[linear-gradient(rgba(18,16,16,0)_50%,rgba(0,0,0,0.25)_50%),linear-gradient(90deg,rgba(255,0,0,0.06),rgba(0,255,0,0.02),rgba(0,0,255,0.06))] z-10 bg-[length:100%_2px,3px_100%] pointer-events-none opacity-40 mix-blend-overlay"}),e.jsx(Ll,{showScan:!1,gridColor:"rgba(48, 54, 61, 0.4)"}),e.jsxs("div",{className:"relative z-20 container mx-auto px-4 py-12 max-w-7xl",children:[e.jsxs(fe,{to:"/resources?tab=dsa&subTab=techniques",className:"inline-flex items-center text-[#8b949e] hover:text-[#bd93f9] transition-colors mb-8 group",children:[e.jsx(Qr,{className:"w-4 h-4 mr-2 group-hover:-translate-x-1 transition-transform"}),e.jsx("span",{children:"BACK_TO_LIBRARY"})]}),e.jsxs("div",{className:"border border-[#30363d]/50 bg-[#0d1117]/80 backdrop-blur-sm rounded-lg p-8 mb-8 relative overflow-hidden group",children:[e.jsx("div",{className:"absolute top-0 right-0 p-4 opacity-10 text-6xl",children:e.jsx(De,{className:"w-24 h-24"})}),e.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[e.jsxs("div",{className:"px-2 py-1 bg-[#bd93f9]/10 border border-[#bd93f9]/30 rounded text-[10px] text-[#bd93f9] font-bold tracking-widest uppercase",children:["TECH_PROTOCOL_",t==null?void 0:t.toUpperCase().replace(/-/g,"_")
2403]}),e.jsx("div",{className:"h-[1px] flex-1 bg-gradient-to-r from-[#30363d] to-transparent"})]}),e.jsx("h1",{className:"text-4xl md:text-5xl font-black mb-4 tracking-tighter text-white",children:i}),e.jsxs("p",{className:"text-[#8b949e] text-lg leading-relaxed max-w-2xl",children:["Initializing architectural breakdown for ",e.jsx("span",{className:"text-[#bd93f9]",children:i}),". Intelligence logs are currently being synchronized from the core database."]})]}),e.jsxs("div",{className:"grid gap-6",children:[e.jsxs("div",{className:"border border-[#ff5555]/30 bg-[#ff5555]/5 rounded-lg p-6 flex items-start gap-4 animate-pulse",children:[e.jsx(ni,{className:"w-6 h-6 text-[#ff5555] shrink-0 mt-1"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-[#ff5555] font-bold uppercase tracking-wider mb-2",children:"Access Limited"}),e.jsx("p",{className:"text-[#8b949e] text-sm leading-relaxed",children:"Full documentation for this protocol is scheduled for the next system update. Our intelligence engineers are currently re-calibrating the explanation engine for maximum clarity."})]})]}),e.jsxs("div",{className:"border border-[#30363d]/50 bg-[#0d1117]/40 rounded-lg p-12 flex flex-col items-center justify-center text-center",children:[e.jsx(He,{className:"w-12 h-12 text-[#30363d] mb-4"}),e.jsx("p",{className:"text-[#484f58] italic font-mono text-sm",children:"// waiting for data stream encryption..."}),e.jsx("div",{className:"mt-8 flex gap-2",children:[0,1,2].map(s=>e.jsx("div",{className:"w-2 h-2 bg-[#bd93f9]/30 rounded-full animate-bounce",style:{animationDelay:`${s*.2}s`}},s))})]})]})]})]})},Bl={async getConnectionStatus(){return(await ye.get("/student/github/status")).data},async getAuthUrl(){return(await ye.get("/student/github/auth")).data.url},async getRepositories(){return(await ye.get("/student/github/repositories")).data},async syncRepositories(){await ye.post("/student/github/sync")},async getLatestAnalysis(t){return(await ye.get(`/student/github/repositories/${t}/analysis/latest`)).data},async analyseRepository(t){return(await ye.post(`/student/github/repositories/${t}/analyse`)).data},async generateStudentCard(){return(await ye.post("/student/user/card/generate")).data}},We=[{id:"m1",name:"Tech Lead",gender:"male",color:"text-blue-400",art:`    ,_____,
2404    | . . |
2405    |  -  |
2406   /|     |\\
2407  / |_____| \\
2408    |  |  |`},{id:"m2",name:"Security Ops",gender:"male",color:"text-emerald-400",art:`    .---.
2409   /  _  \\
2410  |  (o)  |
2411  |   _   |
2412 / \\     / \\
2413/   '---'   \\`},{id:"m3",name:"The Senior",gender:"male",color:"text-amber-400",art:`    _..._
2414   / o o \\
2415  |   >   |
2416  |  ___  |
2417  \\_______/
2418    | | |`},{id:"m4",name:"Full Stack",gender:"male",color:"text-indigo-400",art:`   ______
2419  /      \\
2420 |  O  O  |
2421 |   --   |
2422 \\________/
2423  /|    |\\`},{id:"m5",name:"Architect",gender:"male",color:"text-cyan-400",art:`    .--.
2424   //  \\\\
2425   | oo |
2426   \\ -- /
2427    \\__/
2428   /|  |\\`},{id:"f1",name:"Dev Lead",gender:"female",color:"text-pink-400",art:`    /""\\
2429   | () |
2430  (  --  )
2431   \\____/
2432   /|  |\\
2433  / |__| \\`},{id:"f2",name:"Systems",gender:"female",color:"text-teal-400",art:`   .---.
2434  //   \\\\
2435  | o o |
2436  (  ^  )
2437   \\___/
2438    | |`},{id:"f3",name:"Designer",gender:"female",color:"text-rose-400",art:`   _  _
2439  ( \\/ )
2440   \\  /
2441   /--\\
2442  ( oo )
2443   \\__/`},{id:"f4",name:"Engineer",gender:"female",color:"text-violet-400",art:`   .---.
2444  | . . |
2445  |  u  |
2446   \\___/
2447   /| |\\
2448  /_|_|_\\`},{id:"f5",name:"Analyst",gender:"female",color:"text-fuchsia-400",art:`   ____
2449  //  \\\\
2450 |( == )|
2451  \\ -- /
2452   \\__/
2453   /  \\`}],am={id:"t1",name:"The Senior",gender:"male",color:"text-amber-400",art:`   _..._
2454  / o o \\
2455  |   >   |
2456  |  ___  |
2457  \\_______/
2458   |   |`},Ct=a.forwardRef(({className:t,...i},s)=>e.jsx("textarea",{className:v("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",t),ref:s,...i}));Ct.displayName="Textarea";const it=Jr,im=Xr,Ml=Kr,_i=a.forwardRef(({className:t,...i},s)=>e.jsx(oi,{ref:s,className:v("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...i}));_i.displayName=oi.displayName;const Qe=a.forwardRef(({className:t,children:i,...s},l)=>e.jsxs(Ml,{children:[e.jsx(_i,{}),e.jsxs(li,{ref:l,className:v("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
2458nded-lg",t),...s,children:[i,e.jsxs(Yr,{className:"absolute right-4 top-4 z-50 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[e.jsx(ja,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Qe.displayName=li.displayName;const Ye=({className:t,...i})=>e.jsx("div",{className:v("flex flex-col space-y-1.5 text-center sm:text-left",t),...i});Ye.displayName="DialogHeader";const ql=({className:t,...i})=>e.jsx("div",{className:v("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...i});ql.displayName="DialogFooter";const Je=a.forwardRef(({className:t,...i},s)=>e.jsx(ci,{ref:s,className:v("text-lg font-semibold leading-none tracking-tight",t),...i}));Je.displayName=ci.displayName;const Hl=a.forwardRef(({className:t,...i},s)=>e.jsx(di,{ref:s,className:v("text-sm text-muted-foreground",t),...i}));Hl.displayName=di.displayName;class Vl extends a.Component{constructor(){super(...arguments);Pt(this,"state",{hasError:!1,error:null,copied:!1});Pt(this,"handleReset",()=>{this.setState({hasError:!1,error:null}),window.location.reload()});Pt(this,"copyDiagnostics",()=>{this.state.error&&(navigator.clipboard.writeText(`Error: ${this.state.error.message}
2459Stack: ${this.state.error.stack}`),this.setState({copied:!0}),setTimeout(()=>this.setState({copied:!1}),2e3))})}static getDerivedStateFromError(s){return{hasError:!0,error:s,copied:!1}}componentDidCatch(s,l){console.error("ErrorBoundary captured a component exception:",s,l)}getActiveTheme(){return this.props.theme&&this.props.theme!=="auto"?this.props.theme:document.documentElement.classList.contains("professional-theme")||window.location.pathname.startsWith("/college")||window.location.pathname.startsWith("/recruiter")?"professional":"cyber"}render(){var s,l,h;return this.state.hasError?this.props.fallback?this.props.fallback:this.getActiveTheme()==="professional"?e.jsx("div",{className:"min-h-[400px] flex items-center justify-center p-8 bg-card rounded-2xl border border-border/80 shadow-sm max-w-xl mx-auto my-12 animate-in fade-in duration-300",children:e.jsxs("div",{className:"text-center space-y-6",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-destructive/10 flex items-center justify-center mx-auto",children:e.jsx(ni,{className:"w-8 h-8 text-destructive"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight text-foreground",children:"Something went wrong"}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-md mx-auto leading-relaxed",children:"The system encountered an unexpected error while loading this component. Our security kernel has safely isolated this segment."})]}),this.state.error&&e.jsx("div",{className:"bg-secondary/40 border border-border rounded-lg p-3 text-left max-h-[120px] overflow-y-auto text-xs font-mono text-muted-foreground",children:this.state.error.message}),e.jsxs("div",{className:"flex items-center justify-center gap-3",children:[e.jsxs(J,{onClick:this.handleReset,className:"bg-primary text-primary-foreground font-semibold px-4 py-2 rounded-lg flex items-center gap-2",children:[e.jsx(gs,{size:14,className:"animate-spin-slow"}),"Reload Page"]}),e.jsxs(J,{variant:"outline",onClick:this.copyDiagnostics,className:"border-border text-muted-foreground flex items-center gap-2",children:[this.state.copied?e.jsx(Xe,{size:14,className:"text-success"}):e.jsx(Hs,{size:14}),this.state.copied?"Copied":"Copy Diagnostics"]})]})]})}):e.jsxs("div",{className:"min-h-[450px] bg-[#0d1117]/80 backdrop-blur-md border border-[#ff5f56]/30 p-8 rounded-xl max-w-2xl mx-auto my-12 font-mono flex flex-col justify-between shadow-[0_0_30px_rgba(255,95,86,0.1)] relative overflow-hidden animate-in zoom-in-95 duration-300",children:[e.jsx("div",{className:"absolute top-0 left-0 w-full h-[2px] bg-gradient-to-r from-transparent via-[#ff5f56] to-transparent"}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[#30363d] pb-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(He,{className:"text-[#ff5f56] w-5 h-5 animate-pulse"}),e.jsx("span",{className:"text-xs font-bold text-[#ff5f56] uppercase tracking-widest",children:"// KERNEL_PANIC: RENDER_ABORT"})]}),e.jsx("span",{className:"text-[10px] text-[#8b949e] uppercase",children:"Seg_Fault (0x7F)"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("p",{className:"text-xs text-[#8b949e] leading-relaxed",children:"An unhandled component exception was caught in the React Virtual DOM tree. Isolating stack trace to protect active memory registers..."}),e.jsxs("div",{className:"bg-[#161b22] border border-[#30363d] rounded-lg p-4 font-mono text-[11px] text-[#ff7b72] max-h-[160px] overflow-y-auto overflow-x-hidden no-scrollbar",children:[e.jsx("span",{className:"text-[#8b949e] block mb-1",children:"=== DIAGNOSTIC_LOG ==="}),e.jsxs("span",{children:["Error: ",(s=this.state.error)==null?void 0:s.message]}),e.jsx("span",{className:"block text-[#8b949e] mt-2 text-[10px] whitespace-pre-wrap leading-tight",children:(h=(l=this.state.error)==null?void 0:l.stack)==null?void 0:h.split(`
2460`).slice(0,4).join(`
2461`)})]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3 pt-6 border-t border-[#30363d] mt-6",children:[e.jsxs(J,{onClick:this.handleReset,className:"bg-transparent border border-[#ff5f56] text-[#ff5f56] hover:bg-[#ff5f56]/10 font-bold px-4 h-9 text-xs transition-all flex items-center gap-2",children:[e.jsx(gs,{size:12}),"REBOOT_SEGMENT"]}),e.jsxs(J,{onClick:this.copyDiagnostics,className:"bg-transparent border border-[#30363d] text-[#c9d1d9] hover:bg-white/5 hover:border-[#8b949e] font-bold px-4 h-9 text-xs transition-all flex items-center gap-2",children:[this.state.copied?e.jsx(Xe,{size:12,className:"text-[#50fa7b]"}):e.jsx(Hs,{size:12}),this.state.copied?"COPIED_HASH":"COPY_CORE_DUMP"]})]})]}):this.props.children}}const Se=t=>(t||"").trim().toLowerCase(),ma=(t,i)=>i.some(s=>Se(s.school)===Se(t.school)&&Se(s.degree)===Se(t.degree)&&Se(s.field_of_study||s.field)===Se(t.field_of_study||t.field)),ha=(t,i)=>i.some(s=>Se(s.title||s.role)===Se(t.title||t.role)&&Se(s.company)===Se(t.company)),pa=(t,i)=>i.some(s=>Se(s)===Se(t)),ua=(t,i)=>i.some(s=>Se(s)===Se(t)),Wl=()=>{var Ps;const{token:t,logout:i,user:s,refreshProfile:l}=ot(),h=$e(),u=rt(),[o,m]=a.useState(!s),[b,w]=a.useState(!1),[d,g]=a.useState(null),[f,p]=a.use
2461State(!1),[N,T]=a.useState([]),[r,c]=a.useState([]),[j,k]=a.useState([]),[I,_]=a.useState([]),[q,F]=a.useState({first:!1,lastname:!1,bio:!1,phone:!1,location:!1,linkedin_url:!1}),[O,Y]=a.useState({education:[],experience:[],achievements:[],certifications:[]}),[te,y]=a.useState(!1),[E,C]=a.useState(""),[$,R]=a.useState(""),[X,re]=a.useState(""),[xe,se]=a.useState(""),[K,we]=a.useState(""),[ke,Ie]=a.useState(""),[Pe,Ve]=a.useState(""),[lt,ct]=a.useState(!1),[ns,W]=a.useState(!1),[Re,Ke]=a.useState(""),[ft,dt]=a.useState(""),[_t,mt]=a.useState(""),[At,D]=a.useState(""),[H,de]=a.useState(""),[V,ne]=a.useState(!1),[be,B]=a.useState("personal"),[Te,ae]=a.useState(!1),[ge,je]=a.useState(!1);a.useEffect(()=>{je(!1)},[s==null?void 0:s.profile_picture]),a.useEffect(()=>{te&&(B("personal"),ae(!1))},[te]);const As=async z=>{var L;const P=(L=z.target.files)==null?void 0:L[0];if(!P)return;if(P.size>5*1024*1024){alert("Image size exceeds 5MB limit");return}ne(!0);const M=new FormData;M.append("file",P);try{const G=await fetch(`${he}/student/user/profile/picture`,{method:"POST",headers:{Authorization:`Bearer ${t}`},body:M});if(G.ok){const Z=await G.json();Ve(Z.profile_picture),await l()}else{const Z=await G.json();alert(Z.detail||"Failed to upload image")}}catch(G){console.error("Error uploading profile image:",G),alert("Failed to upload image. Please try again.")}finally{ne(!1)}},[bt,$i]=a.useState(null),[$s,Ii]=a.useState([]);a.useEffect(()=>{s&&(C(s.first||""),R(s.lastname||""),re(s.bio||""),se(s.phone||""),we(s.location||""),Ie(s.linkedin_url||""),Ve(s.profile_picture||"m1"),Ke(s.student_id||""),dt(s.cgpa!==null&&s.cgpa!==void 0?String(s.cgpa):""),mt(s.branch||""),D(s.section||""),de(s.passed_out_year?String(s.passed_out_year):""),(async()=>{try{const P=await Bl.getRepositories().catch(()=>[]),M=[],L=[];(!s.education||s.education.length===0)&&M.push({id:"edu",label:"Education History"}),(!s.experience||s.experience.length===0)&&L.push({id:"exp",label:"Work Experience"}),(!s.achievements||s.achievements.length===0)&&L.push({id:"ach",label:"Achievements"}),(!s.certifications||s.certifications.length===0)&&L.push({id:"cert",label:"Certifications"}),s.phone||M.push({id:"phone",label:"Phone Number"}),s.email||M.push({id:"email",label:"Email Address"}),s.location||M.push({id:"loc",label:"Location"});const G=s.projects?s.projects.length:0,Z=P.length;Z>0&&G===0?M.push({id:"repo",label:"GitHub Repository Analysis"}):Z===0&&!s.github_username&&M.push({id:"github",label:"GitHub Connection"});const Ne=8,Le=Ne-(M.length+L.length),me=Math.round(Le/Ne*100);Ii([...M,...L]),$i(me)}catch(P){console.error("Failed to calculate completeness:",P)}})(),m(!1))},[s,t]),a.useEffect(()=>{var z,P;if((z=u.state)!=null&&z.openEdit&&s)y(!0),C(s.first||""),R(s.lastname||""),re(s.bio||""),se(s.phone||""),we(s.location||""),Ie(s.linkedin_url||""),Ve(s.profile_picture||"m1"),Ke(s.student_id||""),dt(s.cgpa!==null&&s.cgpa!==void 0?String(s.cgpa):""),mt(s.branch||""),D(s.section||""),de(s.passed_out_year?String(s.passed_out_year):""),h(u.pathname,{replace:!0,state:{}});else if((P=u.state)!=null&&P.scrollTo){const M=`${u.state.scrollTo}-section`;setTimeout(()=>{const L=document.getElementById(M);L&&(L.scrollIntoView({behavior:"smooth",block:"center"}),L.classList.add("ring-2","ring-[#bd93f9]","rounded-lg","transition-all","duration-1000"),setTimeout(()=>L.classList.remove("ring-2","ring-[#bd93f9]"),2e3))},300),h(u.pathname,{replace:!0,state:{}})}},[u,s,h]),a.useEffect(()=>{if(d){const z=(s==null?void 0:s.education)||[],P=(s==null?void 0:s.experience)||[],M=(s==null?void 0:s.achievements)||[],L=(s==null?void 0:s.certifications)||[],G=(d.education||[]).map(me=>ma(me,z)),Z=(d.experience||[]).map(me=>ha(me,P)),Ne=(d.achievements||[]).map(me=>pa(me,M)),Le=(d.certifications||[]).map(me=>ua(me,L));Y({education:G,experience:Z,achievements:Ne,certifications:Le}),T((d.education||[]).map((me,Ee)=>Ee).filter(me=>!G[me])),c((d.experience||[]).map((me,Ee)=>Ee).filter(me=>!Z[me])),k((d.achievements||[]).map((me,Ee)=>Ee).filter(me=>!Ne[me])),_((d.certifications||[]).map((me,Ee)=>Ee).filter(me=>!Le[me])),F({first:!!d.first&&!(s!=null&&s.first),lastname:!!d.lastname&&!(s!=null&&s.lastname),bio:!!d.bio&&!(s!=null&&s.bio),phone:!!d.phone&&!(s!=null&&s.phone),location:!!d.location&&!(s!=null&&s.location),linkedin_url:!!d.linkedin_url&&!(s!=null&&s.linkedin_url)})}},[d,s]);const Pi=async z=>{var L;const P=(L=z.target.files)==null?void 0:L[0];if(!P)return;if(P.type!=="application/pdf"&&!P.name.toLowerCase().endsWith(".pdf")){alert("Only PDF files are supported.");return}w(!0);const M=new FormData;M.append("file",P);try{const G=await fetch(`${he}/student/user/profile/autofill-resume`,{method:"POST",headers:{Authorization:`Bearer ${t}`},body:M});if(G.ok){const Z=await G.json();g(Z),p(!0)}else{const Z=await G.json();alert(Z.detail||"Failed to parse resume. Please make sure the PDF contains readable text.")}}catch(G){console.error("Error parsing resume:",G),alert("Failed to parse resume. Please try again.")}finally{w(!1),z.target.value=""}},Ei=async()=>
2461{if(d){ct(!0);try{const z=q.first?d.first:(s==null?void 0:s.first)||"",P=q.lastname?d.lastname:(s==null?void 0:s.lastname)||"",M=q.bio?d.bio:(s==null?void 0:s.bio)||"",L=q.phone?d.phone:(s==null?void 0:s.phone)||"",G=q.location?d.location:(s==null?void 0:s.location)||"",Z=q.linkedin_url?d.linkedin_url:(s==null?void 0:s.linkedin_url)||"",Ne=(s==null?void 0:s.education)||[],Le=(d.education||[]).filter((ee,Ze)=>N.includes(Ze)).map(ee=>({school:ee.school||"",degree:ee.degree||"",field:ee.field_of_study||ee.field||"",field_of_study:ee.field_of_study||ee.field||"",start_date:ee.start_date||"",end_date:ee.end_date||"",gpa:ee.gpa||ee.score||"",score:ee.gpa||ee.score||"",details:ee.details||""})).filter(ee=>!ma(ee,Ne)),me=[...Ne,...Le],Ee=(s==null?void 0:s.experience)||[],Fi=(d.experience||[]).filter((ee,Ze)=>r.includes(Ze)).map(ee=>({company:ee.company||"",title:ee.title||ee.role||"",location:ee.location||"",start_date:ee.start_date||"",end_date:ee.end_date||"",description:ee.description||ee.details||""})).filter(ee=>!ha(ee,Ee)),Bi=[...Ee,...Fi],Es=(s==null?void 0:s.achievements)||[],Mi=(d.achievements||[]).filter((ee,Ze)=>j.includes(Ze)).filter(ee=>!pa(ee,Es)),qi=[...Es,...Mi],Ds=(s==null?void 0:s.certifications)||[],Hi=(d.certifications||[]).filter((ee,Ze)=>I.includes(Ze)).filter(ee=>!ua(ee,Ds)),Vi=[...Ds,...Hi];(await fetch(`${he}/student/user/profile`,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify({first:z,lastname:P,bio:M,phone:L,location:G,linkedin_url:Z,education:me,experience:Bi,achievements:qi,certifications:Vi})})).ok?(await l(),p(!1),g(null)):alert("Failed to merge profile updates.")}catch(z){console.error("Failed to merge profile:",z),alert("Failed to save merged details.")}finally{ct(!1)}}},Di=async()=>{try{const z=await fetch(`${he}/student/github/auth`,{headers:{Authorization:`Bearer ${t}`}}),P=await z.json();z.ok?window.location.href=P.url:alert(P.detail||"Failed to initiate GitHub auth")}catch(z){console.error("Failed to initiate GitHub auth",z),alert("System error. Please contact administrator.")}},Oi=()=>{W(!0)},Ri=async()=>{W(!1);try{(await fetch(`${he}/student/github/disconnect`,{method:"DELETE",headers:{Authorization:`Bearer ${t}`}})).ok&&await l()}catch(z){console.error("Failed to disconnect GitHub",z)}},Li=async()=>{ct(!0);try{(await fetch(`${he}/student/user/profile`,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify({first:E,lastname:$,bio:X,phone:xe,location:K,linkedin_url:ke,profile_picture:Pe,student_id:Re||void 0,cgpa:ft?parseFloat(ft):void 0,branch:_t||void 0,section:At||void 0,passed_out_year:H?parseInt(H):void 0})})).ok&&(await l(),y(!1))}catch(z){console.error("Failed to update profile",z)}finally{ct(!1)}},Is=a.useMemo(()=>We.find(z=>z.id===((s==null?void 0:s.profile_picture)||"m1"))||We[0],[s==null?void 0:s.profile_picture]),pe=a.useMemo(()=>{if(!s)return null;const z=s.easy_solved||0,P=s.medium_solved||0,M=s.hard_solved||0,L=s.solved_problems||z+P+M,G=s.total_submissions||0,Z=s.accepted_submissions||0,Ne=G>0?(Z/G*100).toFixed(1):"0.0";return{easy:z,medium:P,hard:M,solved:L,total:G,accepted:Z,rate:Ne}},[s]);let $t=null,It=null;s!=null&&s.subscription_ends_at&&new Date(s.subscription_ends_at)>new Date?($t=Vs(Ws(s.subscription_ends_at),new Date),It="PRO"):s!=null&&s.trial_ends_at&&new Date(s.trial_ends_at)>new Date&&($t=Vs(Ws(s.trial_ends_at),new Date),It="TRIAL");const os=a.useMemo(()=>{const z=s==null?void 0:s.heatmap_data;if(!z||z.length===0)return[];const P=[],M=new Date,L=new Date(M);L.setDate(M.getDate()-363);let G="",Z=[];for(let Ne=0;Ne<z.length;Ne++){const Le=new Date(L);Le.setDate(L.getDate()+Ne);const me=Le.toLocaleString("default",{month:"short",year:"2-digit"});me!==G&&(G&&P.push({label:G,days:Z}),G=me,Z=[]),Z.push(z[Ne])}return Z.length>0&&P.push({label:G,days:Z}),P},[s==null?void 0:s.heatmap_data]),yt=a.useRef(null);return a.useEffect(()=>{if(!o&&yt.current){const z=()=>{yt.current&&(yt.current.scrollLeft=yt.current.scrollWidth)};z();const P=requestAnimationFrame(z),M=setTimeout(z,100);return()=>
2461{cancelAnimationFrame(P),clearTimeout(M)}}},[o,os]),o?e.jsx(zn,{}):e.jsx(Vl,{theme:"professional",children:e.jsxs("div",{className:"min-h-screen bg-[#09090b] text-zinc-200 font-sans relative selection:bg-violet-500/30 overflow-x-hidden",children:[e.jsxs("div",{className:"fixed inset-0 pointer-events-none z-0",children:[e.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[800px] h-[400px] opacity-80",style:{background:"radial-gradient(circle, rgba(139,92,246,0.12) 0%, transparent 70%)",filter:"blur(80px)"}}),e.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(rgba(255,255,255,0.4) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.4) 1px, transparent 1px)",backgroundSize:"48px 48px",opacity:.03}})]}),e.jsxs("div",{className:"relative z-10 max-w-7xl mx-auto px-4 sm:px-6 py-8 pb-20 space-y-8",children:[e.jsxs("header",{className:"p-6 sm:p-8 bg-zinc-950/90 border border-zinc-800 rounded-2xl backdrop-blur-xl shadow-2xl relative overflow-hidden space-y-6",children:[e.jsx("div",{className:"absolute top-0 right-0 w-80 h-80 bg-violet-500/[0.03] rounded-full blur-3xl pointer-events-none"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center justify-between gap-6 relative z-10",children:[e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx("div",{className:"w-20 h-20 rounded-2xl bg-zinc-900 border border-zinc-800 flex items-center justify-center text-white font-extrabold text-2xl shadow-inner shrink-0 relative group overflow-hidden",children:s!=null&&s.profile_picture&&(s.profile_picture.startsWith("http://")||s.profile_picture.startsWith("https://"))&&!ge?e.jsx("img",{src:s.profile_picture,alt:s.name||s.username||"Student Profile",className:"w-full h-full object-cover rounded-2xl",onError:()=>je(!0)}):e.jsx("div",{className:`font-mono text-[6px] scale-125 leading-none whitespace-pre select-none text-center ${Is.color}`,children:Is.art})}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsxs("h1",{className:"text-2xl sm:text-4xl font-extrabold font-mono text-white tracking-wider",children:["[ ",(s==null?void 0:s.username)||"Guest"," ]"]}),It&&$t!==null&&e.jsxs("span",{className:"text-xs font-bold font-mono border border-emerald-500/40 bg-emerald-500/10 text-emerald-400 px-2.5 py-0.5 rounded shadow-sm",children:[It," (",$t,"d)"]}),(s==null?void 0:s.branch)&&e.jsxs("span",{className:"text-[11px] font-mono text-zinc-400 bg-zinc-900 px-2.5 py-0.5 rounded border border-zinc-800",children:[s.branch," ",s!=null&&s.section?`- Sec ${s.section}`:""]})]}),(s==null?void 0:s.name)&&e.jsx("div",{className:"text-emerald-400 text-base font-mono font-semibold tracking-wide",children:s.name}),e.jsxs("p",{className:"text-zinc-400 text-xs sm:text-sm font-light italic",children:["> ",(s==null?void 0:s.bio)||(s==null?void 0:s.role)||"Full Stack Developer"]}),((s==null?void 0:s.phone)||(s==null?void 0:s.location)||(s==null?void 0:s.linkedin_url))&&e.jsxs("div",{className:"flex items-center gap-4 pt-1 text-xs text-zinc-400 flex-wrap",children:[(s==null?void 0:s.phone)&&e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(us,{className:"w-3.5 h-3.5 text-violet-400"}),s.phone]}),(s==null?void 0:s.location)&&e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(Zr,{className:"w-3.5 h-3.5 text-violet-400"}),s.location]}),(s==null?void 0:s.linkedin_url)&&e.jsxs("a",{href:s.linkedin_url.startsWith("http")?s.linkedin_url:`https://${s.linkedin_url}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 hover:text-violet-300 transition-colors",children:[e.jsx(Zt,{className:"w-3.5 h-3.5 text-violet-400"}),"LinkedIn"]})]})]})]}),e.jsxs("div",{className:"flex items-center gap-3 self-start lg:self-center flex-wrap",children:[e.jsxs("button",{onClick:()=>{y(!0),C((s==null?void 0:s.first)||""),R((s==null?void 0:s.lastname)||""),re((s==null?void 0:s.bio)||""),se((s==null?void 0:s.phone)||""),we((s==null?void 0:s.location)||""),Ie((s==null?void 0:s.linkedin_url)||""),Ve((s==null?void 0:s.profile_picture)||"m1"),Ke((s==null?void 0:s.student_id)||""),dt((s==null?void 0:s.cgpa)!==null&&(s==null?void 0:s.cgpa)!==void 0?String(s.cgpa):""),mt((s==null?void 0:s.branch)||""),D((s==null?void 0:s.section)||""),de(s!=null&&s.passed_out_year?String(s.passed_out_year):"")},className:"inline-flex items-center gap-2 px-4 py-2.5 rounded-xl text-xs font-bold font-mono bg-violet-600 hover:bg-violet-500 text-white border border-violet-500/30 transition-all shadow-lg shadow-violet-500/20 cursor-pointer",children:[e.jsx(en,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Edit Profile"})]}),e.jsxs("button",{onClick:()=>{i(),h("/login")},className:"inline-flex items-center gap-2 px-4 py-2.5 rounded-xl text-xs font-bold font-mono bg-rose-500/10 hover:bg-rose-500/20 text-rose-400 border border-rose-500/30 transition-all cursor-pointer",children:[e.jsx(tn,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Logout"})]})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8",children:[e.jsxs("div",{className:"lg:col-span-8 space-y-8",children:[e.jsxs("section",{className:"bg-zinc-950/90 border border-zinc-800 rounded-2xl p-6 backdrop-blur-xl shadow-2xl space-y-5",children:[e.jsxs("div",{className:"flex items-center justify-between pb-3 border-b border-zinc-800",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:"p-1.5 rounded-lg bg-violet-500/10 border border-violet-500/20 text-violet-400",children:e.jsx(Oa,{className:"w-4 h-4"})}),e.jsx("h2",{className:"text-base font-bold text-white font-mono tracking-wider up
2461percase",children:"Algorithmic Statistics"})]}),e.jsxs("span",{className:"text-[10px] font-mono text-emerald-400 bg-emerald-500/10 px-2.5 py-0.5 rounded border border-emerald-500/20 uppercase",children:["Acc: ",pe==null?void 0:pe.rate,"%"]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"p-4 rounded-xl bg-zinc-900/60 border border-zinc-800 flex flex-col justify-between space-y-2",children:[e.jsx("span",{className:"text-xs font-bold text-violet-300 font-mono uppercase tracking-wider",children:"Problems Solved"}),e.jsx("div",{className:"text-3xl font-black text-white font-mono",children:(pe==null?void 0:pe.solved)||0}),e.jsxs("div",{className:"flex items-center gap-2 text-xs font-mono pt-1",children:[e.jsxs("span",{className:"text-emerald-400 font-semibold bg-emerald-500/10 px-2 py-0.5 rounded border border-emerald-500/20",children:[(pe==null?void 0:pe.easy)||0," Easy"]}),e.jsxs("span",{className:"text-amber-400 font-semibold bg-amber-500/10 px-2 py-0.5 rounded border border-amber-500/20",children:[(pe==null?void 0:pe.medium)||0," Med"]}),e.jsxs("span",{className:"text-rose-400 font-semibold bg-rose-500/10 px-2 py-0.5 rounded border border-rose-500/20",children:[(pe==null?void 0:pe.hard)||0," Hard"]})]})]}),e.jsxs("div",{className:"p-4 rounded-xl bg-zinc-900/60 border border-zinc-800 flex flex-col justify-between space-y-2",children:[e.jsx("span",{className:"text-xs font-bold text-violet-300 font-mono uppercase tracking-wider",children:"Submission Accuracy"}),e.jsxs("div",{className:"text-3xl font-black text-emerald-400 font-mono",children:[pe==null?void 0:pe.rate,"%"]}),e.jsxs("p",{className:"text-xs text-zinc-400 font-mono",children:[(pe==null?void 0:pe.accepted)||0," accepted out of ",(pe==null?void 0:pe.total)||0," attempts"]})]})]})]}),e.jsxs("section",{className:"bg-zinc-950/90 border border-zinc-800 rounded-2xl p-6 backdrop-blur-xl shadow-2xl space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between pb-3 border-b border-zinc-800",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:"p-1.5 rounded-lg bg-emerald-500/10 border border-emerald-500/20 text-emerald-400",children:e.jsx(Me,{className:"w-4 h-4"})}),e.jsx("h2",{className:"text-base font-bold text-white font-mono tracking-wider uppercase",children:"Contribution Matrix"})]}),e.jsx("span",{className:"text-[10px] text-zinc-400 font-mono",children:"52-Week Activity"})]}),e.jsxs("div",{ref:yt,className:"w-full bg-zinc-900/60 border border-zinc-800 p-4 rounded-xl overflow-x-auto no-scrollbar",children:[e.jsx("div",{className:"flex space-x-3 min-w-max",children:os.length>0?os.map((z,P)=>e.jsxs("div",{className:"flex flex-col space-y-2",children:[e.jsx("span",{className:"text-[10px] text-zinc-400 font-mono uppercase tracking-wider h-3 block",children:z.label}),e.jsx("div",{className:"grid grid-rows-7 grid-flow-col gap-[3px]",children:z.days.map((M,L)=>e.jsx("div",{className:v("w-2.5 h-2.5 rounded-[2px] transition-colors duration-200",M===0?"bg-zinc-800/80":M===1?"bg-emerald-900/80":M===2?"bg-emerald-600":"bg-emerald-400"),title:`Submissions: ${M}`},L))})]},P)):e.jsx("div",{className:"py-6 text-center text-zinc-400 text-xs font-mono",children:"No submission activity recorded."})}),e.jsxs("div",{className:"flex items-center justify-end gap-2 text-[10px] text-zinc-400 font-mono pt-3 border-t border-zinc-800 mt-3",children:[e.jsx("span",{children:"Less"}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx("div",{className:"w-2.5 h-2.5 rounded-[2px] bg-zinc-800/80"}),e.jsx("div",{className:"w-2.5 h-2.5 rounded-[2px] bg-emerald-900/80"}),e.jsx("div",{className:"w-2.5 h-2.5 rounded-[2px] bg-emerald-600"}),e.jsx("div",{className:"w-2.5 h-2.5 rounded-[2px] bg-emerald-400"})]}),e.jsx("span",{children:"More"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{id:"account-integrations-section",className:"scroll-mt-8 bg-zinc-950/90 border border-zinc-800 rounded-2xl p-5 backdrop-blur-xl shadow-2xl flex flex-col justify-between space-y-4",children:[e.jsx("div",{className:"flex items-center justify-between pb-2 border-b border-zinc-800",children:e.jsxs("div",{className:"flex items-center gap-2 text-xs font-bold text-white font-mono uppercase tracking-wider",children:[e.jsx(St,{className:"w-4 h-4 text-violet-400"}),e.jsx("span",{children:"GitHub Integration"})]})}),e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-zinc-900 rounded-xl border border-zinc-800",children:e.jsx(St,{className:"w-5 h-5 text-zinc-200"})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-bold text-zinc-200 font-mono",children:"GitHub"}),e.jsx("div",{className:"text-[10px] text-zinc-400 font-mono",children:s!=null&&s.github_username?`@${s.github_username}`:"Not Connected"})]})]}),s!=null&&s.github_username?e.jsx("button",{onClick:Oi,className:"text-xs font-bold text-rose-400 hover:underline font-mono uppercase tracking-tighter cursor-pointer",children:"Disconnect"}):e.jsx("button",{onClick:Di,className:"text-xs font-bold text-violet-400 hover:underline font-mono uppercase tracking-tighter cursor-pointer",children:"Connect"})]})]}),e.jsx("div",{children:e.jsx(Gl,{token:t})})]})]}),e.jsx("div",{className:"lg:col-span-4 space-y-8",children:e.jsxs("section",{className:"bg-zinc-950/90 border border-zinc-800 rounded-2xl p-6 backdrop-blur-xl shadow-2xl space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between pb-3 border-b border-zinc-800",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ve,{className:"w-4 h-4 text-violet-400"}),e.jsx("h2",{className:"text-sm font-bold text-white font-mono uppercase tracking-wider",children:"Profile Completeness"})]}),e.jsxs("span",{className:"text-xs font-bold font-mono text-emerald-400",children:[bt||100,"%"]})]}),e.jsxs("div",{className:"flex flex-col items-center justify-center p-4 bg-zinc-900/60 border border-zinc-800 rounded-xl space-y-3",children:[e.jsxs("div",{className:"relative w-20 h-20 flex items-center justify-center",children:[e.jsxs("svg",{className:"absolute inset-0 w-full h-full transform -rotate-90 origin-center",style:{overflow:"visible"},children:[e.jsx("circle",{cx:"40",cy:"40",r:"34",className:"stroke-zinc-800 fill-none",strokeWidth:"5"}),e.jsx("circle",{cx:"40",cy:"40",r:"34",stroke:bt===100?"#34d399":"#a78bfa",className:"fill-none transition-all duration-1000 ease-out",strokeWidth:"5",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*34}`,strokeDashoffset:`${2*Math.PI*34*(1-(bt||0)/100)}`})]}),e.jsxs("span",{className:"text-base font-black font-mono text-white",children:[bt,"%"]})]}),$s.length>0?e.jsxs("div",{className:"w-full space-y-2 pt-2",children:[e.jsx("div",{className:"text-[10px] font-mono font-bold text-zinc-400 uppercase tracking-wider",children:"Recommended Additions"}),e.jsx("div",{className:"space-y-1.5",children:$s.map(z=>e.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-lg bg-rose-500/10 border border-rose-500/20 text-[10px] font-mono font-bold text-rose-400 uppercase tracking-wider",children:[e.jsx(Ra,{className:"w-3 h-3 shrink-0"}),e.jsx("span",{children:z.label})]},z.id))})]}):e.jsx("p",{className:"text-xs text-emerald-400 font-mono font-semibold text-center pt-1",children:"✓ Profile 100% Complete & Synchronized"})]}),bt!==100&&e.jsxs("div",{className:"space-y-3 pt-2 border-t border-zinc-800",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"text-xs font-bold text-white font-mono flex items-center gap-1.5",children:[e.jsx(ve,{className:"w-3.5 h-3.5 text-violet-400 animate-pulse"}),e.jsx("span",{children:"AI Resume Parser"})]}),e.jsx("p",{className:"text-[11px] text-zinc-400 leading-relaxed font-sans",children:"Upload your resume PDF to automatically extract education, work history, skills, and certifications."})]}),e.jsxs("label",{className:"w-full flex items-center justify-center gap-2 px-4 py-3 bg-violet-600 hover:bg-violet-500 text-white font-mono font-bold rounded-xl transition-all duration-300 shadow-lg shadow-violet-500/20 cursor-pointer text-xs uppercase tracking-wider",children:[e.jsx(Gs,{className:"w-4 h-4"}),e.jsx("span",{children:b?"Parsing PDF...":"Upload Resume PDF"}),e.jsx("input",{type:"file",accept:".pdf",onChange:Pi,className:"hidden",disabled:b})]})]})]})})]}),e.jsx("div",{id:"experience-section",className:"scroll-mt-8",children:e.jsx(Ul,{profile:s,token:t,refreshProfile:l})}),e.jsx("div",{id:"education-section",className:"scroll-mt-8",children:e.jsx(Ql,{profile:s,token:t,refreshProfile:l})}),e.jsx("div",{id:"achievements-section",className:"scroll-mt-8",children:e.jsx(Yl,{profile:s,token:t,refreshProfile:l})}),e.jsx("div",{id:"certifications-section",className:"scroll-mt-8",children:e.jsx(Jl,{profile:s,token:t,refreshProfile:l})}),e.jsxs("div",{className:"bg-zinc-950/90 border border-zinc-800 rounded-2xl p-6 backdrop-blur-xl shadow-2xl space-y-4",children:[e.jsx("div",{className:"text-xs font-bold text-zinc-400 font-mono uppercase tracking-wider pb-2 border-b border-zinc-800",children:"RECENT ACTIVITY LOG"}),e.jsx("ul",{className:"space-y-3 font-mono text-xs",children:((Ps=s==null?void 0:s.recent_activity)==null?void 0:Ps.length)>0?s.recent_activity.map((z,P)=>e.jsxs("li",{className:"flex justify-between items-center text-zinc-200 border-b border-zinc-800/80 pb-2 last:border-0 last:pb-0",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("span",{children:z.title}),e.jsx("span",{className:v("px-2 py-0.5 rounded text-[10px] font-bold border",z.status==="Solved"?"text-emerald-400 bg-emerald-500/10 border-emerald-500/20":z.status==="Wrong Answer"?"text-rose-400 bg-rose-500/10 border-rose-500/20":"text-amber-400 bg-amber-500/10 border-amber-500/20"),children:z.status})]}),e.jsx("span",{className:"text-zinc-500 text-[10px]",children:z.timestamp})]},P)):e.jsx("li",{className:"text-zinc-500",children:"No recent activity recorded."})})]})]}),e.jsx(it,{open:te,onOpenChange:y,children:e.jsxs(Qe,{className:"bg-zinc-950 border border-zinc-800 text-zinc-200 max-w-lg font-mono rounded-2xl p-0 overflow-hidden shadow-2xl flex flex-col max-h-[85vh] backdrop-blur-xl",children:[e.jsx(Ye,{className:"px-6 pt-6 pb-4 border-b border-zinc-800 shrink-0",children:e.jsxs(Je,{className:"text-violet-400 font-mono tracking-widest uppercase text-base flex items-center justify-between",children:[e.jsx("span",{children:"System.Edit_Profile"}),e.jsx("span",{className:"text-[10px] text-zinc-500 font-normal font-mono lowercase",children:"v2.0_interactive"})]})}),e.jsxs("div",{className:"p-6 space-y-6 overflow-y-auto flex-1",children:[e.jsxs("div",{className:"flex flex-col items-center justify-center space-y-3 bg-zinc-900/60 p-5 border border-zinc-800 rounded-xl",children:[e.jsxs("div",{className:"relative group w-24 h-24 rounded-full overflow-hidden border-2 border-violet-500/50 flex items-center justify-center bg-zinc-950 transition-all duration-300 hover:border-violet-400 shadow-lg shadow-violet-500/10",children:[Pe&&(Pe.startsWith("http://")||Pe.startsWith("https://"))&&!Te?e.jsx("img",{src:Pe,alt:"Profile Preview",className:"w-full h-full object-cover",onError:()=>ae(!0)}):e.jsx("div",{className:`font-mono text-[5px] scale-[1.1] leading-none whitespace-pre select-none text-center transform transition-transform duration-500 group-hover:scale-125 ${(We.find(z=>z.id===Pe)||We.find(z=>z.id===((s==null?void 0:s.profile_picture)||"m1"))||We[0]).color}`,children:(()=>{const z=(We.find(L=>
2461L.id===Pe)||We.find(L=>L.id===((s==null?void 0:s.profile_picture)||"m1"))||We[0]).art,P=z.split(`
2462`).filter(L=>L.trim().length>0);if(P.length===0)return z;const M=Math.min(...P.map(L=>{var G;return((G=L.match(/^ */))==null?void 0:G[0].length)||0}));return P.map(L=>L.substring(M)).join(`
2463`)})()}),e.jsxs("label",{htmlFor:"profile-image-upload",className:"absolute inset-0 bg-black/80 opacity-0 group-hover:opacity-100 flex flex-col items-center justify-center cursor-pointer transition-opacity duration-300",children:[e.jsx(Gs,{className:"w-5 h-5 text-white mb-1"}),e.jsx("span",{className:"text-[9px] text-white font-bold uppercase tracking-wider",children:"Change"})]}),V&&e.jsx("div",{className:"absolute inset-0 bg-black/80 flex items-center justify-center",children:e.jsx(gs,{className:"w-5 h-5 text-violet-400 animate-spin"})})]}),e.jsxs("div",{children:[e.jsx("input",{type:"file",accept:"image/*",onChange:As,className:"hidden",id:"profile-image-upload",disabled:V}),e.jsx("span",{className:"text-[9px] text-zinc-500 text-center font-mono",children:"Supports PNG, JPG, or GIF. Max 5MB."})]})]}),e.jsxs("div",{className:"flex border-b border-zinc-800 p-0.5 gap-2",children:[e.jsx("button",{type:"button",onClick:()=>B("personal"),className:`flex-1 py-2 text-[10px] font-bold tracking-widest uppercase transition-all duration-300 font-mono text-center rounded-lg border cursor-pointer ${be==="personal"?"bg-violet-500/20 border-violet-500/40 text-violet-300 shadow-sm":"border-transparent text-zinc-400 hover:text-white hover:bg-zinc-900/60"}`,children:"Personal Details"}),e.jsx("button",{type:"button",onClick:()=>B("academic"),className:`flex-1 py-2 text-[10px] font-bold tracking-widest uppercase transition-all duration-300 font-mono text-center rounded-lg border cursor-pointer ${be==="academic"?"bg-violet-500/20 border-violet-500/40 text-violet-300 shadow-sm":"border-transparent text-zinc-400 hover:text-white hover:bg-zinc-900/60"}`,children:"Academic Details"})]}),e.jsxs("div",{className:"space-y-4 min-h-[280px]",children:[be==="personal"&&e.jsxs("div",{className:"space-y-4 animate-in fade-in slide-in-from-left-4 duration-300",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"First Name"}),e.jsx(ie,{value:E,onChange:z=>C(z.target.value),className:"bg-zinc-900/90 border-zinc-800 focus:border-violet-500/50 font-mono text-xs text-white h-10 rounded-xl",placeholder:"Enter first name"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"Last Name"}),e.jsx(ie,{value:$,onChange:z=>R(z.target.value),className:"bg-zinc-900/90 border-zinc-800 focus:border-violet-500/50 font-mono text-xs text-white h-10 rounded-xl",placeholder:"Enter last name"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"Phone"}),e.jsx(ie,{value:xe,onChange:z=>se(z.target.value),className:"bg-zinc-900/90 border-zinc-800 focus:border-violet-500/50 font-mono text-xs text-white h-10 rounded-xl",placeholder:"+91 98765..."})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"Location"}),e.jsx(ie,{value:K,onChange:z=>we(z.target.value),className:"bg-zinc-900/90 border-zinc-800 focus:border-violet-500/50 font-mono text-xs text-white h-10 rounded-xl",placeholder:"City, Country"})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"LinkedIn URL"}),e.jsx(ie,{value:ke,onChange:z=>Ie(z.target.value),className:"bg-zinc-900/90 border-zinc-800 focus:border-violet-500/50 font-mono text-xs text-white h-10 rounded-xl",placeholder:"linkedin.com/in/username"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"Bio"}),e.jsx(Ct,{value:X,onChange:z=>re(z.target.value),className:"bg-zinc-900/90 border-zinc-800 focus:border-violet-500/50 font-mono text-xs h-28 resize-none text-white rounded-xl no-scrollbar",placeholder:"Tell us about yourself..."})]})]}),be==="academic"&&e.jsxs("div",{className:"space-y-4 animate-in fade-in slide-in-from-right-4 duration-300",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"Student ID"}),e.jsx(ie,{value:Re,onChange:z=>Ke(z.target.value),className:"bg-zinc-900/90 border-zinc-800 focus:border-violet-500/50 font-mono text-xs text-white h-10 rounded-xl",placeholder:"e.g. 22B81A..."})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"CGPA"}),e.jsx(ie,{type:"number",step:"0.01",min:"0",max:"10",value:ft,onCh
2463ange:z=>dt(z.target.value),className:"bg-zinc-900/90 border-zinc-800 focus:border-violet-500/50 font-mono text-xs text-white h-10 rounded-xl",placeholder:"e.g. 8.75"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"Branch"}),e.jsx(ie,{value:_t,onChange:z=>mt(z.target.value),className:"bg-zinc-900/90 border-zinc-800 focus:border-violet-500/50 font-mono text-xs text-white h-10 rounded-xl",placeholder:"e.g. CSE, ECE"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"Section"}),e.jsx(ie,{value:At,onChange:z=>D(z.target.value),className:"bg-zinc-900/90 border-zinc-800 focus:border-violet-500/50 font-mono text-xs text-white h-10 rounded-xl",placeholder:"e.g. A, B"})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"Passed Out Year"}),e.jsx(ie,{type:"number",min:"2020",max:"2035",value:H,onChange:z=>de(z.target.value),className:"bg-zinc-900/90 border-zinc-800 focus:border-violet-500/50 font-mono text-xs text-white h-10 rounded-xl",placeholder:"e.g. 2026"})]})]})]})]}),e.jsxs("div",{className:"flex justify-end gap-3 px-6 py-4 bg-zinc-900/60 border-t border-zinc-800 rounded-b-2xl shrink-0",children:[e.jsx(J,{variant:"ghost",onClick:()=>y(!1),className:"text-zinc-400 hover:text-white hover:bg-zinc-800/50 font-mono text-xs uppercase h-9 rounded-xl",children:"Cancel"}),e.jsx(J,{onClick:Li,disabled:lt,className:"bg-violet-600 hover:bg-violet-500 text-white font-mono text-xs font-bold uppercase h-9 px-5 rounded-xl shadow-lg shadow-violet-500/20",children:lt?"Saving...":"Save Changes"})]})]})}),e.jsx(it,{open:ns,onOpenChange:W,children:e.jsxs(Qe,{className:"bg-zinc-950 border border-zinc-800 text-zinc-200 max-w-md font-mono rounded-2xl backdrop-blur-xl shadow-2xl",children:[e.jsx(Ye,{children:e.jsxs(Je,{className:"text-rose-400 font-mono tracking-widest uppercase flex items-center gap-2 text-sm",children:[e.jsx(St,{className:"w-5 h-5"})," Confirm Disconnect"]})}),e.jsxs("div",{className:"py-6 space-y-4",children:[e.jsx("p",{className:"text-xs text-zinc-400 leading-relaxed italic",children:"> This action will terminate the connection between PyNyx and your GitHub account. All cached repository metadata will be archived (deleted)."}),e.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[e.jsx(J,{variant:"ghost",onClick:()=>W(!1),className:"text-zinc-400 hover:text-white hover:bg-zinc-800/50 border border-zinc-800 text-xs uppercase rounded-xl",children:"Cancel"}),e.jsx(J,{onClick:Ri,className:"bg-rose-500 text-white hover:bg-rose-600 font-bold border border-rose-500/20 shadow-lg shadow-rose-500/20 text-xs uppercase rounded-xl",children:"Disconnect"})]})]})]})}),e.jsx(it,{open:f,onOpenChange:p,children:e.jsxs(Qe,{className:"bg-zinc-950 border border-zinc-800 text-zinc-200 max-w-4xl font-mono rounded-2xl p-0 overflow-hidden shadow-2xl flex flex-col max-h-[85vh] backdrop-blur-xl",children:[e.jsx(Ye,{className:"px-6 pt-6 pb-4 border-b border-zinc-800",children:e.jsxs(Je,{className:"text-violet-400 font-mono tracking-widest uppercase text-base flex items-center justify-between",children:[e.jsx("span",{children:"System.Review_Resume_Extraction"}),e.jsx("span",{className:"text-[10px] text-emerald-400 font-normal font-mono lowercase",children:"Gemini Parse Success"})]})}),e.jsxs("div",{className:"p-6 space-y-6 overflow-y-auto flex-1 custom-scrollbar",children:[e.jsx("p",{className:"text-xs text-zinc-400 italic leading-relaxed",children:"> Review the parsed items below. Checked items will be added to your profile. Items already in your profile are auto-skipped — check them to add a duplicate copy."}),d&&e.jsxs("div",{className:"space-y-4",children:[e.jsx("h4",{className:"text-xs font-bold text-violet-300 uppercase tracking-wider border-b border-zinc-800 pb-1",children:"1. Basic Info"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:Object.entries({first:"First Name",lastname:"Last Name",bio:"Professional Bio",phone:"Phone Number",location:"Location",linkedin_url:"LinkedIn Profile"}).map(([z,P])=>{const M=d[z];if(!M)return null;const L=q[z],G=s==null?void 0:s[z];return e.jsxs("div",{className:"flex items-start gap-3 p-3 bg-zinc-900/60 border border-zinc-800 rounded-xl hover:border-violet-500/30 transition-all",children:[e.jsx("input",{type:"checkbox",id:`basic-${z}`,checked:L,onChange:Z=>F({...q,[z]:Z.target.checked}),className:"mt-1 accent-violet-500 w-4 h-4 cursor-pointer"}),e.jsxs("label",{htmlFor:`basic-${z}`,className:"flex-1 text-xs cursor-pointer select-none",children:[e.jsx("span",{className:"text-zinc-400 font-bold block uppercase text-[10px] tracking-wider mb-0.5",children:P}),e.jsx("span",{className:"text-white block font-mono",children:M}),G&&e.jsxs("span",{className:"text-rose-400 block text-[9px] mt-1 font-mono italic",children:['(Will overwrite current: "',G,'")']})]})]},z)})})]}),(d==null?void 0:d.education)&&d.education.length>0&&e.jsxs("div",{className:"space-y-4",children:[e.jsx("h4",{className:"text-xs font-bold text-violet-300 uppercase tracking-wider border-b border-zinc-800 pb-1",children:"2. Education History"}),e.jsx("div",{className:"space-y-3",children:d.education.map((z,P)=>{const M=N.includes(P),L=O.education[P];return e.jsxs("div",{className:v("flex items-start gap-4 p-4 rounded-xl border transition-all",L&&!M?"bg-amber-500/5 border-amber-500/20 opacity-60":"bg-zinc-900/60 border-zinc-800 hover:border-violet-500/30"),children:[e.jsx("input",{type:"checkbox",id:`edu-${P}`,checked:M,onChange:G=>{G.target.checked?T([...N,P]):T(N.filter(Z=>Z!==P))},className:"mt-1 accent-violet-500 w-4 h-4 cursor-pointer"}),e.jsxs("label",{htmlFor:`edu-${P}`,className:"flex-1 text-xs cursor-pointer select-none",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-bold text-white text-sm",children:z.school}),L&&e.jsx("span",{className:"text-[8px] font-bold font-mono uppercase tracking-wider px-1.5 py-0.5 rounded bg-amber-500/15 text-amber-300 border border-amber-500/30 whitespace-nowrap",children:"Already in profile"})]}),e.jsxs("div",{className:"text-violet-300 font-mono mt-0.5",children:[z.degree," ",z.field_of_study||z.field?`in ${z.field_of_study||z.field}`:""]}),e.jsxs("div",{className:"text-zinc-400 font-mono mt-1 text-[11px]",children:[z.start_date," - ",z.end_date," ",z.gpa||z.score?`| GPA: ${z.gpa||z.score}`:""]}),z.details&&e.jsx("div",{className:"text-zinc-400 font-mono mt-2 pl-3 border-l border-zinc-800 text-[11px] whitespace-pre-wrap",children:z.details})]})]},P)})})]}),(d==null?void 0:d.experience)&&d.experience.length>0&&e.jsxs("div",{className:"space-y-4",children:[e.jsx("h4",{className:"text-xs font-bold text-violet-300 uppercase tracking-wider border-b border-zinc-800 pb-1",children:"3. Work Experience"}),e.jsx("div",{className:"space-y-3",children:d.experience.map((z,P)=>{const M=r.includes(P),L=O.experience[P];return e.jsxs("div",{className:v("flex items-start gap-4 p-4 rounded-xl border transition-all",L&&!M?"bg-amber-500/5 border-amber-500/20 opacity-60":"bg-zinc-900/60 border-zinc-800 hover:border-violet-500/30"),children:[e.jsx("input",{type:"checkbox",id:`exp-${P}`,checked:M,onChange:G=>{G.target.checked?c([...r,P]):c(r.filter(Z=>Z!==P))},className:"mt-1 accent-violet-500 w-4 h-4 cursor-pointer"}),e.jsxs("label",{htmlFor:`exp-${P}`,className:"flex-1 text-xs cursor-pointer select-none",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-bold text-white text-sm",children:z.title||z.role}),L&&e.jsx("span",{className:"text-[8px] font-bold font-mono uppercase tracking-wider px-1.5 py-0.5 rounded bg-amber-500/15 text-amber-300 border border-amber-500/30 whitespace-nowrap",children:"Already in profile"})]}),e.jsxs("div",{className:"text-violet-300 font-mono mt-0.5",children:[z.company," ",z.location?`| ${z.location}`:""]}),e.jsxs("div",{className:"text-zinc-400 font-mono mt-1 text-[11px]",children:[z.start_date," - ",z.end_date]}),z.description&&e.jsx("div",{className:"text-zinc-400 font-mono mt-2 pl-3 border-l border-zinc-800 text-[11px] whitespace-pre-wrap",children:z.description})]})]},P)})})]}),(d==null?void 0:d.achievements)&&d.achievements.length>0&&e.jsxs("div",{className:"space-y-4",children:[e.jsx("h4",{className:"text-xs font-bold text-violet-300 uppercase tracking-wider border-b border-zinc-800 pb-1",children:"4. Achievements"}),e.jsx("div",{className:"grid grid-cols-1 gap-2",children:d.achievements.map((z,P)=>{const M=j.includes(P),L=O.achievements[P];return e.jsxs("div",{className:v("flex items-center gap-3 p-3 rounded-xl border transition-all",L&&!M?"bg-amber-500/5 border-amber-500/20 opacity-60":"bg-zinc-900/60 border-zinc-800 hover:border-violet-500/30"),children:[e.jsx("input",{type:"checkbox",id:`ach-${P}`,checked:M,onChange:G=>{G.target.checked?k([...j,P]):k(j.filter(Z=>Z!==P))},className:"accent-violet-500 w-4 h-4 cursor-pointer flex-shrink-0"}),e.jsxs("label",{htmlFor:`ach-${P}
2463`,className:"text-xs text-white font-mono cursor-pointer select-none flex-1 flex items-center gap-2",children:[e.jsx("span",{children:z}),L&&e.jsx("span",{className:"text-[8px] font-bold font-mono uppercase tracking-wider px-1.5 py-0.5 rounded bg-amber-500/15 text-amber-300 border border-amber-500/30 whitespace-nowrap flex-shrink-0",children:"Already in profile"})]})]},P)})})]}),(d==null?void 0:d.certifications)&&d.certifications.length>0&&e.jsxs("div",{className:"space-y-4",children:[e.jsx("h4",{className:"text-xs font-bold text-violet-300 uppercase tracking-wider border-b border-zinc-800 pb-1",children:"5. Certifications"}),e.jsx("div",{className:"grid grid-cols-1 gap-2",children:d.certifications.map((z,P)=>{const M=I.includes(P),L=O.certifications[P];return e.jsxs("div",{className:v("flex items-center gap-3 p-3 rounded-xl border transition-all",L&&!M?"bg-amber-500/5 border-amber-500/20 opacity-60":"bg-zinc-900/60 border-zinc-800 hover:border-violet-500/30"),children:[e.jsx("input",{type:"checkbox",id:`cert-${P}`,checked:M,onChange:G=>{G.target.checked?_([...I,P]):_(I.filter(Z=>Z!==P))},className:"accent-violet-500 w-4 h-4 cursor-pointer flex-shrink-0"}),e.jsxs("label",{htmlFor:`cert-${P}`,className:"text-xs text-white font-mono cursor-pointer select-none flex-1 flex items-center gap-2",children:[e.jsx("span",{children:z}),L&&e.jsx("span",{className:"text-[8px] font-bold font-mono uppercase tracking-wider px-1.5 py-0.5 rounded bg-amber-500/15 text-amber-300 border border-amber-500/30 whitespace-nowrap flex-shrink-0",children:"Already in profile"})]})]},P)})})]})]}),e.jsxs("div",{className:"flex justify-end gap-3 px-6 py-4 bg-zinc-900/60 border-t border-zinc-800 rounded-b-2xl",children:[e.jsx(J,{variant:"ghost",onClick:()=>{p(!1),g(null)},className:"text-zinc-400 hover:text-white hover:bg-zinc-800/50 font-mono text-xs uppercase h-9 rounded-xl",children:"Discard"}),e.jsx(J,{onClick:Ei,disabled:lt,className:"bg-emerald-500 text-zinc-950 hover:bg-emerald-400 font-mono text-xs font-bold uppercase h-9 px-5 rounded-xl shadow-lg shadow-emerald-500/20",children:lt?"Saving...":"Confirm & Merge"})]})]})})]})})},Gl=({token:t})=>{const[i,s]=a.useState(null),[l,h]=a.useState(!1),[u,o]=a.useState(!1),m=async()=>{try{h(!0);const w=await fetch(`${he}/student/user/card`,{headers:{Authorization:`Bearer ${t}`}});if(w.ok){const d=await w.json();s(d)}}catch(w){console.error(w)}finally{h(!1)}},b=async()=>{try{o(!0);const w=await fetch(`${he}/student/user/card/generate`,{method:"POST",headers:{Authorization:`Bearer ${t}`}});if(w.ok){const d=await w.json();s(d)}}catch(w){console.error(w)}finally{o(!1)}};return a.useEffect(()=>{t&&m()},[t]),e.jsxs("div",{className:"animate-in fade-in slide-in-from-bottom-5 duration-700",children:[e.jsx("div",{className:"flex items-center justify-between mb-4 border-b border-zinc-800 pb-2",children:e.jsx("div",{className:"text-zinc-400 text-xs font-bold font-mono uppercase tracking-wider",children:"TALENT CARD"})}),l&&!i?e.jsx(Cn,{}):i?e.jsx("div",{className:"bg-zinc-950/90 backdrop-blur-xl border border-zinc-800 rounded-2xl p-4 group hover:border-zinc-700 transition-colors h-[72px] flex items-center shadow-2xl",children:e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-emerald-500/10 rounded-full border border-emerald-500/20",children:e.jsx(qe,{className:"w-4 h-4 text-emerald-400"})}),e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("div",{className:"text-sm font-bold text-zinc-200 flex items-center gap-2 whitespace-nowrap",children:["Student Intelligence",e.jsx("span",{className:"text-[9px] text-emerald-400 bg-emerald-500/10 px-1 py-0 rounded border border-emerald-500/20 uppercase",children:"Active"})]}),e.jsxs("div",{className:"text-[10px] text-zinc-400 whitespace-nowrap",children:["Last synced: ",new Date(i.last_updated).toLocaleDateString()]})]})]}),e.jsx(J,{onClick:b,disabled:u,size:"sm",className:"text-violet-400 hover:underline bg-transparent hover:bg-transparent p-0 h-auto font-bold uppercase text-xs tracking-tighter cursor-pointer",children:u?"Syncing":"Sync"})]})}):e.jsxs("div",{className:"h-[72px] flex items-center justify-between px-4 text-zinc-400 font-mono text-[10px] border border-zinc-800 rounded-2xl bg-zinc-950/90 backdrop-blur-xl",children:[e.jsx("span",{children:"No card found."}),e.jsx(J,{onClick:b,variant:"outline",size:"sm",className:"border-zinc-800 hover:bg-zinc-900 text-zinc-200 text-[9px] h-6 uppercase tracking-wider cursor-pointer",children:"Generate"})]})]})},Ul=({profile:t,token:i,refreshProfile:s})=>
2463{const[l,h]=a.useState(!1),[u,o]=a.useState(null),[m,b]=a.useState({title:"",company:"",start_date:"",end_date:"",description:""}),[w,d]=a.useState(!1),g=()=>{b({title:"",company:"",start_date:"",end_date:"",description:""}),o(null),h(!0)},f=r=>{b(t==null?void 0:t.experience[r]),o(r),h(!0)},p=async r=>{if(!confirm("Are you sure you want to delete this experience?"))return;const c=[...(t==null?void 0:t.experience)||[]];c.splice(r,1),t.experience=c,await T(c,!0)},N=async()=>{const r=[...(t==null?void 0:t.experience)||[]];u!==null?r[u]=m:r.push(m),t.experience=r,h(!1),await T(r,!0)},T=async(r,c=!1)=>{c||d(!0);try{(await fetch(`${he}/student/user/profile`,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`},body:JSON.stringify({experience:r})})).ok&&await s()}catch(j){console.error("Failed to update experience",j)}finally{c||d(!1)}};return e.jsxs("div",{className:"mt-8",children:[e.jsxs("div",{className:"flex justify-between items-end mb-4 border-b border-zinc-800 pb-2",children:[e.jsx("div",{className:"text-zinc-400 text-xs font-bold font-mono uppercase tracking-wider",children:"Experience"}),e.jsx("button",{onClick:g,className:"text-zinc-400 hover:text-white transition-colors p-1 cursor-pointer",title:"Add Experience",children:e.jsx(ts,{className:"w-5 h-5"})})]}),e.jsx("div",{className:"bg-zinc-950/90 border border-zinc-800 rounded-2xl p-6 backdrop-blur-xl shadow-2xl",children:!(t!=null&&t.experience)||t.experience.length===0?e.jsx("div",{className:"text-zinc-400 font-mono text-xs",children:"No experience added."}):e.jsx("div",{className:"space-y-6",children:[...t.experience].map((r,c)=>({...r,_idx:c})).sort((r,c)=>{const j=k=>{if(!k||k.toLowerCase()==="present")return new Date(9999,0);const I=new Date(k);return isNaN(I.getTime())?new Date(0):I};return j(c.start_date).getTime()-j(r.start_date).getTime()}).map(r=>{const c=r._idx;return e.jsxs("div",{className:"group relative border-b border-zinc-800/80 pb-4 last:border-0 last:pb-0",children:[e.jsxs("div",{className:"absolute top-0 right-0 opacity-0 group-hover:opacity-100 transition-opacity flex gap-2 bg-zinc-900 p-1.5 rounded-lg border border-zinc-800",children:[e.jsx("button",{onClick:()=>f(c),className:"text-zinc-400 hover:text-violet-300 cursor-pointer",children:e.jsx(ss,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>p(c),className:"text-zinc-400 hover:text-rose-400 cursor-pointer",children:e.jsx(as,{className:"w-4 h-4"})})]}),e.jsx("h3",{className:"text-white font-bold text-base tracking-tight",children:r.title}),e.jsx("div",{className:"text-violet-400 text-xs font-semibold mb-1",children:r.company}),e.jsxs("div",{className:"text-zinc-400 text-xs mb-3 font-mono",children:[r.start_date," - ",r.end_date||"Present"]}),r.description&&e.jsx("p",{className:"text-zinc-300 whitespace-pre-wrap text-xs leading-relaxed",children:r.description})]},c)})})}),e.jsx(it,{open:l,onOpenChange:h,children:e.jsxs(Qe,{className:"bg-zinc-950 border border-zinc-800 text-zinc-200 max-w-md font-mono rounded-2xl shadow-2xl backdrop-blur-xl",children:[e.jsx(Ye,{children:e.jsx(Je,{className:"text-violet-400 font-mono tracking-widest uppercase text-sm",children:u!==null?"Edit Experience":"Add Experience"})}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"Title"}),e.jsx(ie,{value:m.title,onChange:r=>b({...m,title:r.target.value}),className:"bg-zinc-900/90 border-zinc-800 focus:border-violet-500/50 text-white rounded-xl text-xs",placeholder:"Software Engineer"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"Company"}),e.jsx(ie,{value:m.company,onChange:r=>b({...m,company:r.target.value}),className:"bg-zinc-900/90 border-zinc-800 focus:border-violet-500/50 text-white rounded-xl text-xs",placeholder:"Tech Corp"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"Start Date"}),e.jsx(ie,{value:m.start_date,onChange:r=>b({...m,start_date:r.target.value}),className:"bg-zinc-900/90 border-zinc-800 focus:border-violet-500/50 text-white rounded-xl text-xs",placeholder:"Jan 2020"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"End Date"}),e.jsx(ie,{value:m.end_date,onChange:r=>b({...m,end_date:r.target.value}),className:"bg-zinc-900/90 border-zinc-800 focus:border-violet-500/50 text-white rounded-xl text-xs",placeholder:"Present"})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"Description"}),e.jsx(Ct,{value:m.description,onChange:r=>b({...m,description:r.target.value}),className:"bg-zinc-900/90 border-zinc-800 focus:border-violet-500/50 text-white resize-none h-24 rounded-xl text-xs no-scrollbar",placeholder:"What did you do?"})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[e.jsx(J,{variant:"ghost",onClick:()=>h(!1),className:"text-zinc-400 hover:text-white font-mono text-xs uppercase rounded-xl",children:"Cancel"}),e.jsx(J,{onClick:N,disabled:w,className:"bg-violet-600 hover:bg-violet-500 text-white font-mono text-xs font-bold uppercase rounded-xl shadow-lg shadow-violet-500/20",children:w?"Saving...":"Save"})]})]})]})})]})},Ql=({profile:t,token:i,refreshProfile:s})=>
2463{const[l,h]=a.useState(!1),[u,o]=a.useState(null),[m,b]=a.useState({school:"",degree:"",field:"",start_date:"",end_date:"",score:""}),[w,d]=a.useState(!1),g=()=>{b({school:"",degree:"",field:"",start_date:"",end_date:"",score:""}),o(null),h(!0)},f=r=>{const c=t==null?void 0:t.education[r];c&&b({school:c.school||"",degree:c.degree||"",field:c.field||c.field_of_study||"",start_date:c.start_date||"",end_date:c.end_date||"",score:c.score||c.gpa||""}),o(r),h(!0)},p=async r=>{if(!confirm("Are you sure you want to delete this education?"))return;const c=[...(t==null?void 0:t.education)||[]];c.splice(r,1),t.education=c,await T(c,!0)},N=async()=>{const r=[...(t==null?void 0:t.education)||[]],c={...m,field_of_study:m.field,gpa:m.score,score:m.score};u!==null?r[u]=c:r.push(c),t.education=r,h(!1),await T(r,!0)},T=async(r,c=!1)=>{c||d(!0);try{(await fetch(`${he}/student/user/profile`,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`},body:JSON.stringify({education:r})})).ok&&await s()}catch(j){console.error("Failed to update education",j)}finally{c||d(!1)}};return e.jsxs("div",{id:"education-section",className:"mt-8 scroll-mt-8",children:[e.jsxs("div",{className:"flex justify-between items-end mb-4 border-b border-zinc-800 pb-2",children:[e.jsx("div",{className:"text-zinc-400 text-xs font-bold font-mono uppercase tracking-wider",children:"Education"}),e.jsx("button",{onClick:g,className:"text-zinc-400 hover:text-white transition-colors p-1 cursor-pointer",title:"Add Education",children:e.jsx(ts,{className:"w-5 h-5"})})]}),e.jsx("div",{className:"bg-zinc-950/90 border border-zinc-800 rounded-2xl p-6 backdrop-blur-xl shadow-2xl",children:!(t!=null&&t.education)||t.education.length===0?e.jsx("div",{className:"text-zinc-400 font-mono text-xs",children:"No education added."}):e.jsx("div",{className:"space-y-6",children:t.education.map((r,c)=>{const j=r.score||r.gpa,k=r.field||r.field_of_study;return e.jsxs("div",{className:"group relative border-b border-zinc-800/80 pb-4 last:border-0 last:pb-0",children:[e.jsxs("div",{className:"absolute top-0 right-0 opacity-0 group-hover:opacity-100 transition-opacity flex gap-2 bg-zinc-900 p-1.5 rounded-lg border border-zinc-800",children:[e.jsx("button",{onClick:()=>f(c),className:"text-zinc-400 hover:text-violet-300 cursor-pointer",children:e.jsx(ss,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>p(c),className:"text-zinc-400 hover:text-rose-400 cursor-pointer",children:e.jsx(as,{className:"w-4 h-4"})})]}),e.jsxs("div",{className:"flex justify-between items-start pr-16",children:[e.jsx("h3",{className:"text-white font-bold text-base tracking-tight",children:r.school}),j&&e.jsxs("div",{className:"text-zinc-200 text-xs font-bold text-right",children:["Grade/Score: ",e.jsx("span",{className:"text-emerald-400 font-mono font-normal",children:j})]})]}),e.jsxs("div",{className:"text-violet-400 text-xs font-semibold mb-1",children:[r.degree," ",k?`in ${k}`:""]}),e.jsxs("div",{className:"text-zinc-400 text-xs mb-3 font-mono",children:[r.start_date," - ",r.end_date||"Present"]})]},c)})})}),e.jsx(it,{open:l,onOpenChange:h,children:e.jsxs(Qe,{className:"bg-zinc-950 border border-zinc-800 text-zinc-200 max-w-md font-mono rounded-2xl shadow-2xl backdrop-blur-xl",children:[e.jsx(Ye,{children:e.jsx(Je,{className:"text-violet-400 font-mono tracking-widest uppercase text-sm",children:u!==null?"Edit Education":"Add Education"})}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"School / University"}),e.jsx(ie,{value:m.school,onChange:r=>b({...m,school:r.target.value}),className:"bg-zinc-900/90 border-zinc-800 focus:border-violet-500/50 text-white rounded-xl text-xs",placeholder:"Stanford University"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"Degree"}),e.jsx(ie,{value:m.degree,onChange:r=>b({...m,degree:r.target.value}),className:"bg-zinc-900/90 border-zinc-800 focus:border-violet-500/50 text-white rounded-xl text-xs",placeholder:"B.S."})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"Field of Study"}),e.jsx(ie,{value:m.field,onChange:r=>b({...m,field:r.target.value}),className:"bg-zinc-900/90 border-zinc-800 focus:border-violet-500/50 text-white rounded-xl text-xs",placeholder:"Computer Science"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"Start Date"}),e.jsx(ie,{value:m.start_date,onChange:r=>b({...m,start_date:r.target.value}),className:"bg-zinc-900/90 border-zinc-800 focus:border-violet-500/50 text-white rounded-xl text-xs",placeholder:"Sep 2018"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"End Date"}),e.jsx(ie,{value:m.end_date,onChange:r=>b({...m,end_date:r.target.value}),className:"bg-zinc-900/90 border-zinc-800 focus:border-violet-500/50 text-white rounded-xl text-xs",placeholder:"Jun 2022"})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"Score / CGPA (Optional)"}),e.jsx(ie,{value:m.score,onChange:r=>b({...m,score:r.target.value}),className:"bg-zinc-900/90 border-zinc-800 focus:border-violet-500/50 text-white rounded-xl text-xs",placeholder:"8.5 CGPA or 95%"})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[e.jsx(J,{variant:"ghost",onClick:()=>h(!1),className:"text-zinc-400 hover:text-white font-mono text-xs uppercase rounded-xl",children:"Cancel"}),e.jsx(J,{onClick:N,disabled:w,className:"bg-violet-600 hover:bg-violet-500 text-white font-mono text-xs font-bold uppercase rounded-xl shadow-lg shadow-violet-500/20",children:w?"Saving...":"Save"})]})]})]})})]})},Yl=({profile:t,token:i,refreshProfile:s})=>
2463{const[l,h]=a.useState(!1),[u,o]=a.useState(null),[m,b]=a.useState(""),[w,d]=a.useState(!1),g=()=>{b(""),o(null),h(!0)},f=r=>{b((t==null?void 0:t.achievements[r])||""),o(r),h(!0)},p=async r=>{if(!confirm("Are you sure you want to delete this achievement?"))return;const c=[...(t==null?void 0:t.achievements)||[]];c.splice(r,1),t.achievements=c,await T(c,!0)},N=async()=>{if(!m.trim())return;const r=[...(t==null?void 0:t.achievements)||[]];u!==null?r[u]=m:r.push(m),t.achievements=r,h(!1),await T(r,!0)},T=async(r,c=!1)=>{c||d(!0);try{(await fetch(`${he}/student/user/profile`,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`},body:JSON.stringify({achievements:r})})).ok&&await s()}catch(j){console.error("Failed to update achievements",j)}finally{c||d(!1)}};return e.jsxs("div",{className:"mt-8",children:[e.jsxs("div",{className:"flex justify-between items-end mb-4 border-b border-zinc-800 pb-2",children:[e.jsx("div",{className:"text-zinc-400 text-xs font-bold font-mono uppercase tracking-wider",children:"Achievements"}),e.jsx("button",{onClick:g,className:"text-zinc-400 hover:text-white transition-colors p-1 cursor-pointer",title:"Add Achievement",children:e.jsx(ts,{className:"w-5 h-5"})})]}),e.jsx("div",{className:"bg-zinc-950/90 border border-zinc-800 rounded-2xl p-6 backdrop-blur-xl shadow-2xl",children:!(t!=null&&t.achievements)||t.achievements.length===0?e.jsx("div",{className:"text-zinc-400 font-mono text-xs",children:"No achievements added."}):e.jsx("ul",{className:"space-y-4",children:t.achievements.map((r,c)=>e.jsxs("li",{className:"group relative border-b border-zinc-800/80 pb-4 last:border-0 last:pb-0 flex justify-between items-start",children:[e.jsx("span",{className:"text-zinc-200 text-xs leading-relaxed pr-8",children:r}),e.jsxs("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex gap-2",children:[e.jsx("button",{onClick:()=>f(c),className:"text-zinc-400 hover:text-violet-300 cursor-pointer",children:e.jsx(ss,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>p(c),className:"text-zinc-400 hover:text-rose-400 cursor-pointer",children:e.jsx(as,{className:"w-4 h-4"})})]})]},c))})}),e.jsx(it,{open:l,onOpenChange:h,children:e.jsxs(Qe,{className:"bg-zinc-950 border border-zinc-800 text-zinc-200 max-w-md font-mono rounded-2xl shadow-2xl backdrop-blur-xl",children:[e.jsx(Ye,{children:e.jsx(Je,{className:"text-violet-400 font-mono tracking-widest uppercase text-sm",children:u!==null?"Edit Achievement":"Add Achievement"})}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"Achievement Details"}),e.jsx(Ct,{value:m,onChange:r=>b(r.target.value),className:"bg-zinc-900/90 border-zinc-800 focus:border-violet-500/50 text-white resize-none h-24 rounded-xl text-xs no-scrollbar",placeholder:"AWS Certified, Winner of Hackathon, etc."})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[e.jsx(J,{variant:"ghost",onClick:()=>h(!1),className:"text-zinc-400 hover:text-white font-mono text-xs uppercase rounded-xl",children:"Cancel"}),e.jsx(J,{onClick:N,disabled:w,className:"bg-violet-600 hover:bg-violet-500 text-white font-mono text-xs font-bold uppercase rounded-xl shadow-lg shadow-violet-500/20",children:w?"Saving...":"Save"})]})]})]})})]})},Jl=({profile:t,token:i,refreshProfile:s})=>{const[l,h]=a.useState(!1),[u,o]=a.useState(null),[m,b]=a.useState(""),[w,d]=a.useState(!1),g=()=>{b(""),o(null),h(!0)},f=r=>{b((t==null?void 0:t.certifications[r])||""),o(r),h(!0)},p=async r=>{if(!confirm("Are you sure you want to delete this certification?"))return;const c=[...(t==null?void 0:t.certifications)||[]];c.splice(r,1),t.certifications=c,await T(c,!0)},N=async()=>{if(!m.trim())return;const r=[...(t==null?void 0:t.certifications)||[]];u!==null?r[u]=m:r.push(m),t.certifications=r,h(!1),await T(r,!0)},T=async(r,c=!1)=>{c||d(!0);try{(await fetch(`${he}/student/user/profile`,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`},body:JSON.stringify({certifications:r})})).ok&&await s()}catch(j){console.error("Failed to update certifications",j)}finally{c||d(!1)}};return e.jsxs("div",{className:"mt-8",children:[e.jsxs("div",{className:"flex justify-between items-end mb-4 border-b border-zinc-800 pb-2",children:[e.jsx("div",{className:"text-zinc-400 text-xs font-bold font-mono uppercase tracking-wider",children:"Certifications"}),e.jsx("button",{onClick:g,className:"text-zinc-400 hover:text-white transition-colors p-1 cursor-pointer",title:"Add Certification",children:e.jsx(ts,{className:"w-5 h-5"})})]}),e.jsx("div",{className:"bg-zinc-950/90 border border-zinc-800 rounded-2xl p-6 backdrop-blur-xl shadow-2xl",children:!(t!=null&&t.certifications)||t.certifications.length===0?e.jsx("div",{className:"text-zinc-400 font-mono text-xs",children:"No certifications added."}):e.jsx("ul",{className:"space-y-4",children:t.certifications.map((r,c)=>e.jsxs("li",{className:"group relative border-b border-zinc-800/80 pb-4 last:border-0 last:pb-0 flex justify-between items-start",children:[e.jsx("span",{className:"text-zinc-200 text-xs leading-relaxed pr-8",children:r}),e.jsxs("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex gap-2",children:[e.jsx("button",{onClick:()=>f(c),className:"text-zinc-400 hover:text-violet-300 cursor-pointer",children:e.jsx(ss,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>p(c),className:"text-zinc-400 hover:text-rose-400 cursor-pointer",children:e.jsx(as,{className:"w-4 h-4"})})]})]},c))})}),e.jsx(it,{open:l,onOpenChange:h,children:e.jsxs(Qe,{className:"bg-zinc-950 border border-zinc-800 text-zinc-200 max-w-md font-mono rounded-2xl shadow-2xl backdrop-blur-xl",children:[e.jsx(Ye,{children:e.jsx(Je,{className:"text-violet-400 font-mono tracking-widest uppercase text-sm",children:u!==null?"Edit Certification":"Add Certification"})}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-wider",children:"Certification Details"}),e.jsx(Ct,{value:m,onChange:r=>b(r.target.value),className:"bg-zinc-900/90 border-zinc-800 focus:border-violet-500/50 text-white resize-none h-24 rounded-xl text-xs no-scrollbar",placeholder:"AWS Certified Solutions Architect, etc."})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[e.jsx(J,{variant:"ghost",onClick:()=>h(!1),className:"text-zinc-400 hover:text-white font-mono text-xs uppercase rounded-xl",children:"Cancel"}),e.jsx(J,{onClick:N,disabled:w,className:"bg-violet-600 hover:bg-violet-500 text-white font-mono text-xs font-bold uppercase rounded-xl shadow-lg shadow-violet-500/20",children:w?"Saving...":"Save"})]})]})]})})]})},xa=a.lazy(()=>S(()=>import("./SortingPage-_Y2Yk_V1.js"),__vite__mapDeps([51,1,2,52,53,54]))),Xl=a.lazy(()=>S(()=>import("./HashingPage-S8f5_a2Z.js"),__vite__mapDeps([55,1,2,54,52]))),Kl=a.lazy(()=>S(()=>import("./TwoPointersPage-lhAAvJEK.js"),__vite__mapDeps([56,1,2,54,52]))),Zl=a.lazy(()=>S(()=>import("./SlidingWindowPage-deMocxxh.js"),__vite__mapDeps([57,1,2,54,52]))),ec=a.lazy(()=>S(()=>import("./PrefixSumPage-CPpppBVE.js"),__vite__mapDeps([58,1,2,54,52]))),tc=a.lazy(()=>S(()=>import("./BinarySearchPage-E-X5hCp7.js"),__vite__mapDeps([59,1,2,54,52,60,30]))),sc=a.lazy(()=>S(()=>import("./BoyerMooreMajorityPage-2lYsnB9V.js"),__vite__mapDeps([61,1,2,54,52]))),ac=a.lazy(()=>S(()=>import("./MonotonicStackPage-BST3Sb0Q.js"),__vite__mapDeps([62,1,2,54,52]))),ic=a.lazy(()=>S(()=>import("./MonotonicQueuePage-DOpBfkVC.js"),__vite__mapDeps([63,1,2,54,52]))),rc=a.lazy(()=>S(()=>import("./HeapPage-7h4S04Qc.js"),__vite__mapDeps([64,1,2,54,52,65]))),nc=a.lazy(()=>S(()=>import("./TwoHeapsPage-WME17KrO.js"),__vite__mapDeps([66,1,2,54,52]))),oc=a.lazy(()=>S(()=>import("./LinkedListPage-Dco3URQB.js"),__vite__mapDeps([67,1,2,54,52]))),lc=a.lazy(()=>S(()=>import("./DummyNodeMutationPage-BwSS6e_O.js"),__vite__mapDeps([68,1,2,54,52]))),cc=a.lazy(()=>S(()=>import("./RecursionPage-BjMJPYE_.js"),__vite__mapDeps([69,1,2,54,52,70]))),dc=a.lazy(()=>S(()=>import("./BacktrackingPage-_LAUK3Rs.js"),__vite__mapDeps([71,1,2,54,52]))),mc=a.lazy(()=>S(()=>import("./CombinatoricsPage-DsjmR3ra.js"),__vite__mapDeps([72,1,2,54,52]))),hc=a.lazy(()=>S(()=>import("./GreedyPage-DepnOwkH.js"),__vite__mapDeps([73,1,2,54,52]))),pc=a.lazy(()=>S(()=>import("./DivideConquerPage-BQIch5Eu.js"),__vite__mapDeps([74,1,2,54,52,53]))),uc=a.lazy(()=>S(()=>import("./QuickselectPage-C2WGRqzy.js"),__vite__mapDeps([75,1,2,54,52]))),xc=a.lazy(()=>S(()=>import("./KadanesPage-Dy1TLf3N.js"),__vite__mapDeps([76,1,2,54,52]))),gc=a.lazy(()=>S(()=>import("./MergeIntervalsPage-DW_0FcWD.js"),__vite__mapDeps([77,1,2,54,52]))),fc=a.lazy(()=>S(()=>import("./KWayMergePage-Dlzn1nr5.js"),__vite__mapDeps([78,1,2,54,52]))),bc=a.lazy(()=>S(()=>import("./TreeTraversalPage-VA71dPCR.js"),__vite__mapDeps([79,1,2,54,52,80]))),yc=a.lazy(()=>S(()=>import("./TreeDPPage-Jp7BYeXt.js"),__vite__mapDeps([81,1,2,54,52]))),vc=a.lazy(()=>S(()=>import("./GraphFundamentalsPage-CWZNQqW0.js"),__vite__mapDeps([82,1,2,54,52,83]))),wc=a.lazy(()=>S(()=>import("./GridTraversalPage-KZ5qd8q2.js"),__vite__mapDeps([84,1,2,54,52]))),jc=a.lazy(()=>S(()=>import("./MultiSourceBFSPage-CToyzOvw.js"),__vite__mapDeps([85,1,2,54,52]))),Nc=a.lazy(()=>S(()=>import("./UnionFindPage-Cjb-cs7h.js"),__vite__mapDeps([86,1,2,54,52]))),kc=a.lazy(()=>S(()=>import("./TopologicalSortPage-D6Q9hMv0.js"),__vite__mapDeps([87,1,2,54,52]))),Sc=a.lazy(()=>S(()=>import("./ShortestPathPage-OTYGfQ_p.js"),__vite__mapDeps([88,1,2,54,52,89]))),Tc=a.lazy(()=>S(()=>import("./BipartiteColoringPage-CclNNIAF.js"),__vite__mapDeps([90,1,2,54,52]))),zc=a.lazy(()=>S(()=>import("./TarjanBridgesPage-C0u34t-L.js"),__vite__mapDeps([91,1,2,54,52]))),Cc=a.lazy(()=>S(()=>import("./HierholzerEulerianPage-C1ZTWzKn.js"),__vite__mapDeps([92,1,2,54,52]))),_c=a.lazy(()=>S(()=>import("./GridDPPage-D2gqy7Fc.js"),__vite__mapDeps([93,1,2,54,52]))),Ac=a.lazy(()=>S(()=>import("./DynamicProgrammingPage-C2PT4dAW.js"),__vite__mapDeps([94,1,2,54,52]))),$c=a.lazy(()=>S(()=>import("./StockDPPage-BJtr1r9K.js"),__vite__mapDeps([95,1,2,54,52]))),Ic=a.lazy(()=>S(()=>import("./AlignmentDPPage-Byb_7Epy.js"),__vite__mapDeps([96,1,2,54,52]))),Pc=a.lazy(()=>S(()=>import("./IntervalDPPage-D52fqqye.js"),__vite__mapDeps([97,1,2,54,52]))),Ec=a.lazy(()=>S(()=>import("./BitmaskDPPage-pN-curzv.js"),__vite__mapDeps([98,1,2,54,52]))),Dc=a.lazy(()=>S(()=>import("./DigitDPPage-DMFnwXYk.js"),__vite__mapDeps([99,1,2,54,52]))),Oc=a.lazy(()=>S(()=>import("./BitManipulationPage-B-CPHh9J.js"),__vite__mapDeps([100,
24631,2,54,52]))),Rc=a.lazy(()=>S(()=>import("./BinaryExponentiationPage-RktnJ_ss.js"),__vite__mapDeps([101,1,2,54,52]))),Lc=a.lazy(()=>S(()=>import("./SievePrimesPage-wCXoC-0H.js"),__vite__mapDeps([102,1,2,54,52]))),Fc=a.lazy(()=>S(()=>import("./TriePage-D0HA03FT.js"),__vite__mapDeps([103,1,2,54,52]))),Bc=a.lazy(()=>S(()=>import("./SegmentTreePage-B4X58oZ0.js"),__vite__mapDeps([104,1,2,54,52]))),Mc=a.lazy(()=>S(()=>import("./FenwickTreePage-bYuYhwvq.js"),__vite__mapDeps([105,1,2,54,52]))),qc=a.lazy(()=>S(()=>import("./KMPPage-Dge-mOCz.js"),__vite__mapDeps([106,1,2,54,52]))),Hc=a.lazy(()=>S(()=>import("./LineSweepPage-Dhintubj.js"),__vite__mapDeps([107,1,2,54,52]))),Vc=a.lazy(()=>S(()=>import("./BinaryLiftingPage-Cm3Ht-TY.js"),__vite__mapDeps([108,1,2,54,52]))),Wc=a.lazy(()=>S(()=>import("./RollingHashPage-C6m3AQJt.js"),__vite__mapDeps([109,1,2,54,52]))),Gc=a.lazy(()=>S(()=>import("./CycleDetectionGraphsPage-B1Iqne2t.js"),__vite__mapDeps([110,1,2,54,52]))),Uc=a.lazy(()=>S(()=>import("./QuantDetailPage-CVf5d7IA.js"),__vite__mapDeps([111,1,2,54]))),Qc=a.lazy(()=>S(()=>import("./LogicalDetailPage-BdIGWS2I.js"),__vite__mapDeps([112,1,2,54]))),Yc=a.lazy(()=>S(()=>import("./DSATopicDetailPage-ORxHT-aC.js"),__vite__mapDeps([113,1,2,54,70,30,60,80,65,83,89,52]))),Jc=a.lazy(()=>S(()=>import("./ProblemDetail-ByDMU2S2.js"),__vite__mapDeps([114,1,2,18,115,116,117]))),Xc=a.lazy(()=>S(()=>import("./FreeVersionPage-cPlBM5_e.js"),__vite__mapDeps([118,1,2]))),Kc=a.lazy(()=>S(()=>import("./BeginnerRoadmap-L3f0rgla.js"),__vite__mapDeps([119,1,2,120]))),Zc=a.lazy(()=>S(()=>import("./IntermediateRoadmap-Chv6X34B.js"),__vite__mapDeps([121,1,2,120]))),ed=a.lazy(()=>S(()=>import("./ProRoadmap-BAsdZuEa.js"),__vite__mapDeps([122,1,2,120]))),td=a.lazy(()=>S(()=>import("./FoundationRoadmap-BVauhq_s.js"),__vite__mapDeps([123,1,2]))),ga=a.lazy(()=>S(()=>import("./BeginnerProblemRoadmap-DusnVSlv.js"),__vite__mapDeps([124,1,2]))),sd=a.lazy(()=>S(()=>import("./IntermediateProblemRoadmap-Cg-Zfri2.js"),__vite__mapDeps([125,1,2]))),ad=a.lazy(()=>S(()=>import("./RevisitRoadmap-DPQf-LKQ.js"),__vite__mapDeps([126,1,2]))),id=a.lazy(()=>S(()=>import("./DiscussPage-B9nYwt8O.js"),__vite__mapDeps([127,1,2]))),rd=a.lazy(()=>S(()=>import("./CampusPage-Ci9EOopP.js"),__vite__mapDeps([128,1,2,129,4]))),nd=a.lazy(()=>S(()=>import("./AssessmentPage-D4dFs32o.js"),__vite__mapDeps([130,1,2,18,115,116,131,117]))),od=a.lazy(()=>S(()=>import("./RoadmapsPage-BhA732t6.js"),__vite__mapDeps([132,1,2,120]))),ld=a.lazy(()=>S(()=>import("./StudentResume-Cng4b244.js"),__vite__mapDeps([133,1,2,18,134]))),cd=a.lazy(()=>S(()=>import("./StudentDashboard-DtdAaS0l.js"),__vite__mapDeps([135,1,2,129]))),dd=a.lazy(()=>S(()=>import("./AssessmentResultsPage-zop16I1j.js"),__vite__mapDeps([136,1,2,18,116]))),md=a.lazy(()=>S(()=>import("./AIInterviewPage-CwT4OA5Z.js"),__vite__mapDeps([137,1,2,131,117]))),hd=a.lazy(()=>S(()=>import("./OnlineAssessmentPage-Ba5Z9bxP.js"),__vite__mapDeps([138,1,2,18,7,131,117]))),pd=a.lazy(()=>S(()=>import("./ProjectsPage-CbrhUyv_.js"),__vite__mapDeps([139,1,2]))),ud=a.lazy(()=>S(()=>import("./RepoAnalysisPage-BX8sFwfY.js"),__vite__mapDeps([140,1,2,49]))),xd=a.lazy(()=>S(()=>import("./ComingSoon-D2-zrU9U.js"),__vite__mapDeps([141,1,2]))),gd=a.lazy(()=>S(()=>import("./JobsPage-BhB9hLby.js"),__vite__mapDeps([142,1,2,129,143]))),fd=a.lazy(()=>S(()=>import("./ContestPage-xniYaK5m.js"),__vite__mapDeps([144,1,2,131,117]))),bd=a.lazy(()=>S(()=>import("./WorkshopPage-Bdfb6SGM.js"),__vite__mapDeps([145,1,2,115,116,131,117,18]))),yd=e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"/jobs",element:e.jsx(gd,{})}),e.jsx(x,{path:"/dashboard",element:e.jsx(cd,{})}),e.jsx(x,{path:"/problems",element:e.jsx(pl,{})}),e.jsx(x,{path:"/resources",element:e.jsx(Ol,{})}),e.jsx(x,{path:"/resources/custom-sorting",element:e.jsx(xa,{})}),e.jsx(x,{path:"/resources/custom_sorting",element:e.jsx(xa,{})}),e.jsx(x,{path:"/resources/hashing-cache",element:e.jsx(Xl,{})}),e.jsx(x,{path:"/resources/two-pointers",element:e.jsx(Kl,{})}),e.jsx(x,{path:"/resources/sliding-window",element:e.jsx(Zl,{})}),e.jsx(x,{path:"/resources/prefix-sum",element:e.jsx(ec,{})}),e.jsx(x,{path:"/resources/binary-search-ans",element:e.jsx(tc,{})}),e.jsx(x,{path:"/resources/boyer-moore-majority",element:e.jsx(sc,{})}),e.jsx(x,{path:"/resources/monotonic-stack",element:e.jsx(ac,{})}),e.jsx(x,{path:"/resources/monotonic-queue",element:e.jsx(ic,{})}),e.jsx(x,{path:"/resources/heap-priority-queue",element:e.jsx(rc,{})}),e.jsx(x,{path:"/resources/two-heaps",element:e.jsx(nc,{})}),e.jsx(x,{path:"/resources/fast-slow-pointers",element:e.jsx(oc,{})}),e.jsx(x,{path:"/resources/dummy-node-mutation",element:e.jsx(lc,{})}),e.jsx(x,{path:"/resources/recursion-templates",element:e.jsx(cc,{})}),e.jsx(x,{path:"/resources/backtracking-pruning",element:e.jsx(dc,{})}),e.jsx(x,{path:"/resources/combinatorics-states",element:e.jsx(mc,{})}),e.jsx(x,{path:"/resources/greedy-heuristics",element:e.jsx(hc,{})}),e.jsx(x,{path:"/resources/divide-and-conquer-split",element:e.jsx(pc,{})}),e.jsx(x,{path:"/resources/quickselect",element:e.jsx(uc,{})}),e.jsx(x,{path:"/resources/kadanes-algorithm",element:e.jsx(xc,{})}),e.jsx(x,{path:"/resources/merge-intervals",element:e.jsx(gc,{})}),e.jsx(x,{path:"/resources/k-way-merge",element:e.jsx(fc,{})}),e.jsx(x,{path:"/resources/subtree-accumulation",element:e.jsx(bc,{})}),e.jsx(x,{path:"/resources/tree-dp",element:e.jsx(yc,{})}),e.jsx(x,{path:"/resources/graph-fundamentals",element:e.jsx(vc,{})}),e.jsx(x,{path:"/resources/grid-navigation",element:e.jsx(wc,{})}),e.jsx(x,{path:"/resources/multi-source-bfs",element:e.jsx(jc,{})}),e.jsx(x,{path:"/resources/union-find-dsu",element:e.jsx(Nc,{})}),e.jsx(x,{path:"/resources/topological-sort",element:e.jsx(kc,{})}),e.jsx(x,{path:"/resources/shortest-path-01",element:e.jsx(Sc,{})}),e.jsx(x,{path:"/resources/bipartite-graph-coloring",element:e.jsx(Tc,{})}),e.jsx(x,{path:"/resources/tarjans-scc-bridges",element:e.jsx(zc,{})}),e.jsx(x,{path:"/resources/hierholzers-eulerian",element:e.jsx(Cc,{})}),e.jsx(x,{path:"/resources/grid-dp",element:e.jsx(_c,{})}),e.jsx(x,{path:"/resources/knapsack-subset-dp",element:e.jsx(Ac,{})}),e.jsx(x,{path:"/resources/stock-dp",element:e.jsx($c,{})}),e.jsx(x,{path:"/resources/alignment-dp",element:e.jsx(Ic,{})}),e.jsx(x,{path:"/resources/interval-dp",element:e.jsx(Pc,{})}),e.jsx(x,{path:"/resources/bitmask-dp",element:e.jsx(Ec,{})}),e.jsx(x,{path:"/resources/digit-dp",element:e.jsx(Dc,{})}),e.jsx(x,{path:"/resources/bit-manipulation-tricks",element:e.jsx(Oc,{})}),e.jsx(x,{path:"/resources/binary-exponentiation",element:e.jsx(Rc,{})}),e.jsx(x,{path:"/resources/sieve-primes",element:e.jsx(Lc,{})}),e.jsx(x,{path:"/resources/trie-autocomplete",element:e.jsx(Fc,{})}),e.jsx(x,{path:"/resources/segment-tree",element:e.jsx(Bc,{})}),e.jsx(x,{path:"/resources/fenwick-tree",element:e.jsx(Mc,{})}),e.jsx(x,{path:"/resources/kmp-algorithm",element:e.jsx(qc,{})}),e.jsx(x,{path:"/resources/line-sweep",element:e.jsx(Hc,{})}),e.jsx(x,{path:"/resources/binary-lifting-lca",element:e.jsx(Vc,{})}),e.jsx(x,{path:"/resources/rolling-hash-rabin",element:e.jsx(Wc,{})}),e.jsx(x,{path:"/resources/cycle-detection-coloring",element:e.jsx(Gc,{})}),e.jsx(x,{path:"/resources/dsa/:topicId",element:e.jsx(Yc,{})}),e.jsx(x,{path:"/resources/quant/:topicId",element:e.jsx(Uc,{})}),e.jsx(x,{path:"/resources/logical/:topicId",element:e.jsx(Qc,{})}),e.jsx(x,{path:"/resources/:techniqueId",element:e.jsx(Fl,{})}),e.jsx(x,{path:"/profile",element:e.jsx(Wl,{})}),e.jsx(x,{path:"/roadmap/beginner",element:e.jsx(Kc,{})}),e.jsx(x,{path:"/roadmap/intermediate",element:e.jsx(Zc,{})}),e.jsx(x,{path:"/roadmap/pro",element:e.jsx(ed,{})}),e.jsx(x,{path:"/roadmap/foundation",element:e.jsx(td,{})}),e.jsx(x,{path:"/roadmap/beginner_problem",element:e.jsx(ga,{})}),e.jsx(x,{path:"/roadmap/intermediate_problem",element:e.jsx(sd,{})}),e.jsx(x,{path:"/roadmap/advance_problem",element:e.jsx(ga,{})}),e.jsx(x,{path:"/roadmap/revisit",element:e.jsx(ad,{})}),e.jsx(x,{path:"/coming-soon",element:e.jsx(xd,{})}),e.jsx(x,{path:"/free-version",element:e.jsx(Xc,{})}),e.jsx(x,{path:"/projects",element:e.jsx(pd,{})}),e.jsx(x,{path:"/projects/:githubId/analysis",element:e.jsx(ud,{})}),e.jsx(x,{path:"/roadmaps",element:e.jsx(od,{})}),e.jsx(x,{path:"/threads",element:e.jsx(id,{})}),e.jsx(x,{path:"/campus",element:e.jsx(rd,{})}),e.jsx(x,{path:"/resume",element:e.jsx(ld,{})})]}),vd=e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"/problems/:id",element:e.jsx(Jc,{})}),e.jsx(x,{path:"/problems/assessment/:jobId",element:e.jsx(nd,{})}),e.jsx(x,{path:"/problems/assessment/:jobId/results",element:e.jsx(dd,{})}),e.jsx(x,{path:"/interview/:jobId",element:e.jsx(md,{})}),e.jsx(x,{path:"/online-assessment/:jobId",element:e.jsx(hd,{})}),e.jsx(x,{path:"/contest",element:e.jsx(fd,{})}),e.jsx(x,{path:"/workshop",element:e.jsx(bd,{})})]}),wd=a.lazy(()=>S(()=>import("./AdminLayout-D_vKXBte.js"),__vite__mapDeps([146,1,2]))),jd=a.lazy(()=>S(()=>import("./AdminDashboard-DPJFrC5b.js"),__vite__mapDeps([147,1,2]))),Nd=a.lazy(()=>S(()=>import("./AdminStudents-Ck6q6AA8.js"),__vite__mapDeps([148,1,2]))),kd=a.lazy(()=>S(()=>import("./AdminRecruiters-C6g1cous.js"),__vite__mapDeps([149,1,2]))),Sd=a.lazy(()=>S(()=>import("./AdminColleges-D4gdSXdq.js"),__vite__mapDeps([150,1,2]))),Td=a.lazy(()=>S(()=>import("./AdminJobs-B73YPDf9.js"),__vite__mapDeps([151,1,2]))),zd=a.lazy(()=>S(()=>import("./AdminWorkshopsPage-Cf3n59AX.js"),__vite__mapDeps([152,1,2]))),fa=a.lazy(()=>S(()=>import("./AdminLoginPage-BdgDJpkq.js"),__vite__mapDeps([153,1,2]))),Ai=a.lazy(()=>S(()=>import("./AdminContentStudioPage-H8gaxwsj.js"),__vite__mapDeps([154,1,2]))),Cd=e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"/login",element:e.jsx(fa,{})}),e.jsx(x,{path:"/content",element:e.jsx(Ai,{})}),e.jsx(x,{path:"/",element:e.jsx(fa,{})})]}),_d=e.jsxs(x,{path:"/admin",element:e.jsx(wd,{}),children:[e.jsx(x,{path:"dashboard",element:e.jsx(jd,{})}),e.jsx(x,{path:"students",element:e.jsx(Nd,{})}),e.jsx(x,{path:"workshops",element:e.jsx(zd,{})}),e.jsx(x,{path:"recruiters",element:e.jsx(kd,{})}),e.jsx(x,{path:"colleges",element:e.jsx(Sd,{})}),e.jsx(x,{path:"jobs",element:e.jsx(Td,{})}),e.jsx(x,{path:"content",element:e.jsx(Ai,{})}),e.jsx(x,{index:!0,element:e.jsx(ut,{to:"dashboard",replace:!0})})]}),Ad=a.lazy(()=>S(()=>import("./StudentLayout-CLfFrKP0.js"),__vite__mapDeps([155,1,2,143]))),$d=()=>{const{pathname:t,search:i}=rt();return a.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"instant"}),document.documentElement.scrollTop=0,document.body.scrollTop=0},[t,i]),null},Id=new sn({defaultOptions:{queries:{staleTime:1e3*60,refetchOnWindowFocus:!0,retry:1}}}),Pd=()=>{const{pathname:t}=rt(),i=Oe();return a.useEffect(()=>
2463{let s="Fix the Thinking, Not Just Code | PyNyx Agentic DSA Tutor",l="Master coding interviews with PyNyx, the Agentic DSA Tutor. Practice problems, improve your skills, and get real-time AI guidance to fix the thinking.",h="https://pynyx.com/",u=!1;i==="recruiter"?t==="/"||t===""?(s="PyNyx Recruiter: World's Easiest Way to Find True Tech Talent",l="Find engineers who can actually build, not just list keywords. PyNyx offers next-gen tech talent verification with $0 sourcing and placement fees.",h="https://recruiter.pynyx.com/"):t==="/login"||t==="/recruiter/login"?(s="Recruiter Login | PyNyx Recruiter",h="https://recruiter.pynyx.com/",u=!0):t==="/signup"||t==="/request-access"||t==="/recruiter/signup"||t==="/recruiter/request-access"?(s="Request Recruiter Access | PyNyx Recruiter",h="https://recruiter.pynyx.com/",u=!0):t==="/request-demo"||t==="/recruiter/request-demo"?(s="Request Demo | PyNyx Recruiter",h="https://recruiter.pynyx.com/",u=!0):(s="PyNyx Recruiter: World's Easiest Way to Find True Tech Talent",h="https://recruiter.pynyx.com/",u=!0):i==="institution"?t==="/"||t===""?(s="India's Most Advanced Placement Assistance Tool",l="Stop managing placements on spreadsheets. PyNyx is an end-to-end campus platform for job postings, AI-driven skill verification, and interview tracking.",h="https://institution.pynyx.com/"):t==="/register"||t==="/institution/register"||t==="/college/register"?(s="College Onboarding & Registration | PyNyx Institution",l="Institutional registration portal for engineering colleges and universities.",h="https://institution.pynyx.com/",u=!0):t==="/login"||t==="/institution/login"||t==="/college/login"?(s="Institutional Login | PyNyx Institution",h="https://institution.pynyx.com/",u=!0):t==="/request-demo"||t==="/institution/request-demo"?(s="Request Campus Demo | PyNyx Institution",h="https://institution.pynyx.com/",u=!0):(s="India's Most Advanced Placement Assistance Tool",h="https://institution.pynyx.com/",u=!0):i==="admin"?(s="Admin Portal | PyNyx",l="PyNyx administration dashboard for platform management.",h="https://admin.pynyx.com/",u=!0):t==="/"||t==="/for-students"||t==="/students"?(s="Fix the Thinking, Not Just Code | PyNyx Agentic DSA Tutor",l="Master coding interviews with PyNyx, the Agentic DSA Tutor. Practice problems, improve your skills, and get real-time AI guidance to fix the thinking.",h="https://pynyx.com/"):t==="/recruiter"||t==="/for-employers"||t==="/employers"?(s="PyNyx Recruiter: World's Easiest Way to Find True Tech Talent",l="Find engineers who can actually build, not just list keywords. PyNyx offers next-gen tech talent verification with $0 sourcing and placement fees.",h="https://recruiter.pynyx.com/"):t==="/institution"||t==="/for-colleges"||t==="/colleges"||t==="/college"?(s="India's Most Advanced Placement Assistance Tool",l="Stop managing placements on spreadsheets. PyNyx is an end-to-end campus platform for job postings, AI-driven skill verification, and interview tracking.",h="https://institution.pynyx.com/"):t==="/pricing"?(s="Pricing Plans | PyNyx Agentic DSA Tutor",h="https://pynyx.com/pricing"):t==="/about"||t==="/about-us"?(s="About Us | PyNyx",h="https://pynyx.com/about"):["/auth","/login","/signup","/reset-password","/verify-email","/institution/register"].includes(t)?(s="Account Authentication | PyNyx",h="https://pynyx.com/",u=!0):(s="Fix the Thinking, Not Just Code | PyNyx Agentic DSA Tutor",h="https://pynyx.com/",u=!0),document.title=s;let o=document.querySelector('meta[name="robots"]');o||(o=document.createElement("meta"),o.setAttribute("name","robots"),document.head.appendChild(o)),o.setAttribute("content",u?"noindex, follow":"index, follow");const m=document.querySelector('meta[name="description"]');m&&m.setAttribute("content",l);const b=document.querySelector('meta[property="og:title"]');b&&b.setAttribute("content",s);const w=document.querySelector('meta[property="og:description"]');w&&w.setAttribute("content",l);let d=document.querySelector('meta[property="og:url"]');if(d)d.setAttribute("content",h);else{const c=document.createElement("meta");c.setAttribute("property","og:url"),c.setAttribute("content",h),document.head.appendChild(c)}let g=document.querySelector('link[rel="canonical"]');if(g)g.setAttribute("href",h);else{const c=document.createElement("link");c.setAttribute("rel","canonical"),c.setAttribute("href",h),document.head.appendChild(c)}const f=document.querySelector('meta[name="twitter:title"]');if(f)f.setAttribute("content",s);else{const c=document.createElement("meta");c.name="twitter:title",c.content=s,document.head.appendChild(c)}const p=document.querySelector('meta[name="twitter:description"]');if(p)p.setAttribute("content",l);else{const c=document.createElement("meta");c.name="twitter:description",c.content=l,document.head.appendChild(c)}const N=(c,j,k,I)=>{let _=document.querySelector(`link[rel="${c}"]${k?`[sizes="${k}"]`:""}`);_||(_=document.createElement("link"),_.rel=c,k&&_.setAttribute("sizes",k),I&&_.setAttribute("type",I),document.head.appendChild(_)),_.href=j},r=window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"?"":"https://pynyx.com";N("icon",`${r}/favicon.ico`,void 0,"image/x-icon"),N("shortcut icon",`${r}/favicon.ico`),N("icon",`${r}/android-chrome-192x192.png`,"192x192","image/png"),N("icon",`${r}/android-chrome-512x512.png`,"512x512","image/png"),N("icon",`${r}/favicon-32x32.png`,"32x32","image/png"),N("icon",`${r}/favicon-16x16.png`,"16x16","image/png"),N("apple-touch-icon",`${r}/apple-touch-icon.png`,"180x180")},[t,i]),null},Ed=()=>{const t=Oe();return a.useEffect(()=>{const i=()=>{ce.error("Network issue error",{description:"You are currently offline. Please check your internet connection."})},s=()=>{ce.success("Network Restored",{description:"Your internet connection has been restored."})};return window.addEventListener("offline",i),window.addEventListener("online",s),()=>{window.removeEventListener("offline",i),window.removeEventListener("online",s)}},[]),e.jsx(an,{client:Id,children:e.jsx(wn,{children:e.jsx(An,{children:e.jsx($n,{children:e.jsxs(rn,{future:{v7_startTransition:!0,v7_relativeSplatPath:!0},children:[e.jsx($d,{}),e.jsx(Pd,{}),e.jsx(yn,{}),e.jsx(vn,{position:"top-right"}),e.jsx(a.Suspense,{fallback:e.jsx(Tn,{}),children:e.jsxs(nn,{children:[t==="student"&&e.jsxs(e.Fragment,{children:[Eo,e.jsx(x,{element:e.jsx(Ot,{allowedRoles:["STUDENT"]}),children:e.jsxs(x,{element:e.jsx(In,{}),children:[e.jsx(x,{element:e.jsx(Ad,{}),children:yd}),vd]})})]}),t==="recruiter"&&e.jsxs(e.Fragment,{children:[Do,e.jsx(x,{element:e.jsx(Ot,{allowedRoles:["RECRUITER"]}),children:Uo})]}),t==="institution"&&e.jsxs(e.Fragment,{children:[Oo,e.jsx(x,{element:e.jsx(Ot,{allowedRoles:["COLLEGE"]}),children:nl})]}),t==="admin"&&e.jsxs(e.Fragment,{children:[Cd,e.jsx(x,{element:e.jsx(Ot,{allowedRoles:["ADMIN"]}),children:_d})]}),e.jsx(x,{path:"*",element:e.jsx(ut,{to:"/",replace:!0})})]})})]})})})})})};on(document.getElementById("root")).render(e.jsx(Ed,{}));export{Ud as $,We as A,J as B,yi as C,it as D,vs as E,vo as F,_n as G,Vl as H,ie as I,Jd as J,ws as K,sa as L,sm as M,Ll as N,Ld as O,qd as P,ta as Q,Qs as R,n as S,wn as T,Wd as U,wo as V,Fd as W,Hd as X,im as Y,Qd as Z,Yd as _,ot as a,Vd as a0,oe as a1,ue as a2,le as a3,ea as a4,am as a5,Kd as a6,un as a7,Gd as a8,Qe as b,v as c,Ye as d,Je as e,Hl as f,ql as g,he as h,Bl as i,em as j,Bd as k,Md as l,jn as m,Oe as n,Q as o,rs as p,ye as q,Ct as r,xn as s,Zd as t,tm as u,Xd as v,ol as w,vi as x,ll as y,Ni as z};

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.