PageSourceSearch

https://inteller.ai/_next/static/chunks/ebcb75937fd72a5d.js

js inteller.ai collected 2026-10-05 13:57:47 UTC 62,491 bytes, 8 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="22cc1f74-990e-4f23-d628-25b0db74f58e")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,17218,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(846932),n=e.i(88653),l=e.i(107233),r=e.i(727612),i=e.i(63727),o=e.i(263488),c=e.i(555436),d=e.i(440160),x=e.i(778917),m=e.i(664659),u=e.i(655900),p=e.i(899602),h=e.i(87316),g=e.i(25652),f=e.i(686311),b=e.i(37727),j=e.i(286536),w=e.i(788699),v=e.i(531278),N=e.i(346897),y=e.i(607486),k=e.i(158524),C=e.i(455711);let S=(0,e.i(475254).default)("radar",[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]]);var _=e.i(659544),$=e.i(339964),T=e.i(558700),P=e.i(299641),I=e.i(174886),D=e.i(643531),A=e.i(918789),M=e.i(749337);function R({company:e,role:a,status:n,notes:l,appliedDate:r,onClose:i}){let[c,d]=(0,s.useState)(!1),x=(0,s.useRef)(!1),{completion:m,isLoading:u,complete:p}=(0,P.useCompletion)({api:"/api/followup",streamProtocol:"text"});async function h(){m&&(await navigator.clipboard.writeText(m),d(!0),setTimeout(()=>d(!1),2e3))}return(0,s.useEffect)(()=>{x.current||(x.current=!0,p("",{body:{company:e,role:a,status:n,notes:l,appliedDate:r}}))},[p,e,a,n,l,r]),(0,t.jsxs)("div",{className:"bg-surface rounded-xl shadow-[0_4px_16px_rgba(0,0,0,0.08)] p-6 mt-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,t.jsx)(o.Mail,{className:"w-4 h-4 text-info flex-shrink-0"}),(0,t.jsxs)("h3",{className:"text-sm font-semibold text-text-primary truncate",children:["Follow-Up Email — ",e]}),u&&(0,t.jsx)("span",{className:"text-xs text-text-muted animate-pulse",children:"drafting..."})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[m&&!u&&(0,t.jsxs)(_.default,{variant:"ghost",size:"sm",onClick:h,children:[c?(0,t.jsx)(D.Check,{className:"w-3.5 h-3.5 text-success"}):(0,t.jsx)(I.Copy,{className:"w-3.5 h-3.5"}),c?"Copied":"Copy"]}),(0,t.jsx)("button",{onClick:i,className:"p-1.5 text-text-muted hover:text-text-primary transition-colors",children:(0,t.jsx)(b.X,{className:"w-4 h-4"})})]})]}),(0,t.jsx)("div",{className:"rounded-lg border border-border bg-background p-4 max-h-[300px] overflow-y-auto",children:m?(0,t.jsx)("div",{className:M.DOCUMENT_PROSE,children:(0,t.jsx)(A.default,{remarkPlugins:M.DOCUMENT_REMARK_PLUGINS,children:m})}):(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("div",{className:"h-4 bg-surface-muted rounded animate-pulse w-1/2"}),(0,t.jsx)("div",{className:"h-4 bg-surface-muted rounded animate-pulse w-full"}),(0,t.jsx)("div",{className:"h-4 bg-surface-muted rounded animate-pulse w-3/4"})]})})]})}var L=e.i(16715),O=e.i(375679);function E(){return(0,t.jsx)("div",{className:"space-y-6 animate-pulse",children:["Key Things to Know","Likely Interview Questions","Your Strongest Talking Points","Questions to Ask","Watch Out For"].map((e,s)=>(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"h-5 bg-surface-muted rounded w-56 mb-3"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("div",{className:"h-3 bg-surface-muted/70 rounded w-full"}),(0,t.jsx)("div",{className:"h-3 bg-surface-muted/70 rounded w-4/5"}),(0,t.jsx)("div",{className:"h-3 bg-surface-muted/70 rounded w-3/5"}),1===s&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"h-3 bg-surface-muted/70 rounded w-full mt-3"}),(0,t.jsx)("div",{className:"h-3 bg-surface-muted/70 rounded w-4/5"}),(0,t.jsx)("div",{className:"h-3 bg-surface-muted/70 rounded w-full mt-3"}),(0,t.jsx)("div",{className:"h-3 bg-surface-muted/70 rounded w-3/4"})]})]})]},s))})}function U({company:e,role:a,location:n,notes:l,onClose:r}
2){let[i,o]=(0,s.useState)(!1),[c,d]=(0,s.useState)(!1),x=(0,s.useRef)(null),{completion:m,isLoading:u,complete:p,error:h}=(0,P.useCompletion)({api:"/api/interview-prep",streamProtocol:"text",body:{company:e,role:a,location:n,notes:l}});async function g(){d(!0),(0,O.trackInterviewPrepStarted)(),(0,O.trackAICreditsUsed)(1,"interview_prep"),await p(`Interview prep for ${a} at ${e}`)}async function f(){m&&(await navigator.clipboard.writeText(m),o(!0),setTimeout(()=>o(!1),2e3))}(0,s.useEffect)(()=>{x.current&&x.current.scrollIntoView({behavior:"smooth",block:"start"})},[]);let j=m?(m.match(/^## /gm)||[]).length:0;return(0,t.jsx)("div",{ref:x,className:"mt-2",children:(0,t.jsxs)("div",{className:"bg-surface rounded-xl border border-info/20 shadow-[0_2px_12px_rgba(0,0,0,0.06)] overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border bg-info/5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,t.jsx)(C.Brain,{className:"w-4 h-4 text-info flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-bold text-text-primary",children:"Interview Prep"}),(0,t.jsxs)("span",{className:"text-xs text-text-muted truncate",children:[a," at ",e]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0",children:[u&&(0,t.jsxs)("span",{className:"text-xs text-info flex items-center gap-1 mr-2",children:[(0,t.jsx)(v.Loader2,{className:"w-3 h-3 animate-spin"}),j>0?`${j}/5 sections`:"Starting..."]}),m&&!u&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:f,className:"p-1.5 text-text-muted hover:text-text-primary hover:bg-surface-muted rounded-lg transition-all",title:"Copy prep guide",children:i?(0,t.jsx)(D.Check,{className:"w-3.5 h-3.5 text-success"}):(0,t.jsx)(I.Copy,{className:"w-3.5 h-3.5"})}),(0,t.jsx)("button",{onClick:g,className:"p-1.5 text-text-muted hover:text-text-primary hover:bg-surface-muted rounded-lg transition-all",title:"Regenerate",children:(0,t.jsx)(L.RefreshCw,{className:"w-3.5 h-3.5"})})]}),(0,t.jsx)("button",{onClick:r,className:"p-1.5 text-text-muted hover:text-text-primary hover:bg-surface-muted rounded-lg transition-all",children:(0,t.jsx)(b.X,{className:"w-3.5 h-3.5"})})]})]}),(0,t.jsx)("div",{className:"px-5 py-5 max-h-[600px] overflow-y-auto",children:c?h&&!m?(0,t.jsxs)("div",{className:"text-center py-6",children:[(0,t.jsx)("p",{className:"text-sm text-danger mb-2",children:"Failed to generate prep. Please try again."}),(0,t.jsxs)(_.default,{onClick:g,variant:"secondary",size:"sm",children:[(0,t.jsx)(L.RefreshCw,{className:"w-4 h-4"})," Retry"]})]}):(0,t.jsxs)("div",{className:"relative",children:[u&&!m&&(0,t.jsx)(E,{}),m&&(0,t.jsxs)("div",{className:"prose prose-sm max-w-none text-text-primary prose-headings:font-bold prose-headings:text-text-primary prose-headings:mt-5 prose-headings:mb-2 prose-h2:text-base prose-h2:border-b prose-h2:border-border/50 prose-h2:pb-1 prose-h3:text-sm prose-p:leading-relaxed prose-p:my-2 prose-li:my-1 prose-ul:my-2 prose-ol:my-2 prose-strong:text-text-primary ",children:[(0,t.jsx)(A.default,{children:m}),u&&(0,t.jsx)("span",{className:"inline-block w-2 h-5 bg-info/40 animate-pulse rounded-sm ml-0.5 align-middle"})]}),!u&&m&&(0,t.jsxs)("div",{className:"mt-5 pt-4 border-t border-border/50 flex items-center justify-between",children:[(0,t.jsxs)("p",{className:"text-xs text-success flex items-center gap-1",children:[(0,t.jsx)(D.Check,{className:"w-3.5 h-3.5"}),"Prep guide ready — ",j," sections generated"]}),(0,t.jsxs)(_.default,{onClick:f,variant:"ghost",size:"sm",children:[(0,t.jsx)(I.Copy,{className:"w-3.5 h-3.5"}),i?"Copied!":"Copy to clipboard"]})]})]}):(0,t.jsxs)("div",{className:"text-center py-6",children:[(0,t.jsx)(C.Brain,{className:"w-10 h-10 text-info/30 mx-auto mb-3"}),(0,t.jsxs)("p",{className:"text-sm text-text-secondary mb-1",children:["Get AI-powered interview prep for ",(0,t.jsx)("strong",{children:a})," at ",(0,t.jsx)("strong",{children:e})]}),(0,t.jsx)("p",{className:"text-xs text-text-muted mb-4",children:"Likely questions, talking points from your resume, company research, and smart questions to ask"}),(0,t.jsxs)(_.default,{onClick:g,size:"sm",children:[(0,t.jsx)(C.Brain,{className:"w-4 h-4"}),"Generate Interview Prep"]})]})})]})})}var q=e.i(514764),z=e.i(367240),B=e.i(752044);let F={behavioral:{label:"Behavioral",description:"Past experiences, STAR method, teamwork & leadership"},technical:{label:"Technical",description:"Skills, problem-solving, system design thinking"},situational:{label:"Situational",description:"Hypothetical scenarios, decision-making, judgment"}};function G({company:e,role:l,onClose:r}
2){let[i,o]=(0,s.useState)("behavioral"),[c,d]=(0,s.useState)(!1),[x,m]=(0,s.useState)([]),[u,p]=(0,s.useState)(""),[h,g]=(0,s.useState)(!1),j=(0,s.useRef)(null),w=(0,s.useRef)(null),N=x.filter(e=>"user"===e.role).length,y=N>=15;(0,s.useEffect)(()=>{j.current?.scrollIntoView({behavior:"smooth"})},[x]),(0,s.useEffect)(()=>{!h&&c&&w.current&&w.current.focus()},[h,c]);let k=(0,s.useCallback)(async t=>{g(!0);let s=`msg-${Date.now()}`;m(e=>[...e,{id:s,role:"assistant",content:""}]);try{let a=await fetch("/api/interview-roleplay",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({company:e,role:l,mode:i,messages:t.map(e=>({role:e.role,content:e.content}))})});if(!a.ok||!a.body){m(e=>e.map(e=>e.id===s?{...e,content:"Something went wrong. Try again."}:e)),g(!1);return}let n=a.body.getReader(),r=new TextDecoder,o="";for(;;){let{done:e,value:t}=await n.read();if(e)break;let a=o+=r.decode(t,{stream:!0});m(e=>e.map(e=>e.id===s?{...e,content:a}:e))}}catch{m(e=>e.map(e=>e.id===s?{...e,content:"Connection error. Try again."}:e))}finally{g(!1)}},[e,l,i]);function C(){m([]),d(!1),p("")}function S(){if(!u.trim()||h||y)return;let e={id:`msg-${Date.now()}`,role:"user",content:u.trim()};p("");let t=[...x,e];m(t),k(t)}return(0,t.jsx)(a.motion.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:{duration:.25,ease:"easeOut"},className:"mt-2",children:(0,t.jsxs)("div",{className:"bg-surface rounded-xl border border-accent/20 shadow-[0_2px_12px_rgba(0,0,0,0.06)] overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border bg-accent/5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,t.jsx)(f.MessageSquare,{className:"w-4 h-4 text-accent flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-bold text-text-primary",children:"Practice Interview"}),(0,t.jsxs)("span",{className:"text-xs text-text-muted truncate",children:[l," at ",e]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0",children:[c&&(0,t.jsxs)("span",{className:"text-xs text-text-muted mr-2",children:[N,"/",15]}),c&&(0,t.jsx)("button",{onClick:C,className:"p-1.5 text-text-muted hover:text-text-primary hover:bg-surface-muted rounded-lg transition-all",title:"New session",children:(0,t.jsx)(z.RotateCcw,{className:"w-3.5 h-3.5"})}),(0,t.jsx)("button",{onClick:r,className:"p-1.5 text-text-muted hover:text-text-primary hover:bg-surface-muted rounded-lg transition-all",children:(0,t.jsx)(b.X,{className:"w-3.5 h-3.5"})})]})]}),!c&&(0,t.jsxs)("div",{className:"px-5 py-4 border-b border-border/50",children:[(0,t.jsx)("p",{className:"text-xs text-text-muted uppercase tracking-wider font-medium mb-2.5",children:"Interview type"}),(0,t.jsx)("div",{className:"grid grid-cols-3 gap-2",children:Object.entries(F).map(([e,s])=>(0,t.jsxs)("button",{onClick:()=>o(e),className:`text-left p-3 rounded-lg border transition-all ${i===e?"border-accent bg-accent/5":"border-border hover:border-accent/30 hover:bg-surface-muted/50"}`,children:[(0,t.jsx)("p",{className:`text-sm font-medium ${i===e?"text-accent":"text-text-primary"}`,children:s.label}),(0,t.jsx)("p",{className:"text-xs text-text-muted mt-0.5 leading-snug",children:s.description})]},e))})]}),(0,t.jsx)("div",{className:"max-h-[500px] overflow-y-auto",children:c?(0,t.jsxs)("div",{className:"px-5 py-4 space-y-3",children:[(0,t.jsx)(n.AnimatePresence,{initial:!1,children:x.map(e=>{if("user"===e.role&&e.content.startsWith("I'm ready to start the"))return null;let s="user"===e.role,{feedback:n,question:l,quality:r}=s?{feedback:null,question:e.content,quality:null}:function(e){let t=e.includes("[STRONG]")?"strong":e.includes("[IMPROVE]")?"improve":null,s=e.replace(/\[(STRONG|IMPROVE)\]\s*/g,"");if(!t)return{feedback:null,question:s,quality:null};let a=s.split(/\n\n/);return a.length>=2?{feedback:a[0].trim(),question:a.slice(1).join("\n\n").trim(),quality:t}:{feedback:null,question:s,quality:t}}(e.content);return(0,t.jsx)(a.motion.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.2},className:`flex ${s?"justify-end":"justify-start"}`,children:(0,t.jsxs)("div",{className:`max-w-[85%] rounded-xl px-4 py-3 ${s?"bg-accent/8 border border-accent/15 text-text-primary":"bg-surface-muted border border-border text-text-primary"}`,children:[(0,t.jsx)("p",{className:`text-xs uppercase tracking-wider font-medium mb-1.5 ${s?"text-accent/60":"text-text-muted"}`,children:s?"Your response":"Interviewer"}),n&&r&&(0,t.jsxs)("div",{className:`flex items-start gap-2 rounded-lg px-3 py-2 mb-2.5 text-sm ${"strong"===r?"bg-success/8 border border-success/15":"bg-warning/8 border border-warning/15"}`,children:[(0,t.jsx)("span",{className:`inline-block w-2.5 h-2.5 rounded-full flex-shrink-0 mt-1 ${"strong"===r?"bg-success":"bg-warning"}`}),(0,t.jsx)("span",{className:"leading-relaxed",children:n})]}),(0,t.jsx)("p",{className:"text-sm leading-relaxed whitespace-pre-wrap",children:r?l:e.content.replace(/\[(STRONG|IMPROVE)\]\s*/g,"")})]})},e.id)})}),h&&x[x.length-1]?.content===""&&(0,t.jsx)(a.motion.div,{initial:{opacity:0}
2,animate:{opacity:1},className:"flex justify-start",children:(0,t.jsxs)("div",{className:"bg-surface-muted border border-border rounded-xl px-4 py-3",children:[(0,t.jsx)("p",{className:"text-xs text-text-muted uppercase tracking-wider font-medium mb-1.5",children:"Interviewer"}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-text-muted/40 animate-bounce [animation-delay:0ms]"}),(0,t.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-text-muted/40 animate-bounce [animation-delay:150ms]"}),(0,t.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-text-muted/40 animate-bounce [animation-delay:300ms]"})]})]})}),y&&!h&&(0,t.jsxs)(a.motion.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},className:"text-center py-4 border-t border-border/50",children:[(0,t.jsxs)("p",{className:"text-sm text-text-secondary mb-2",children:["Session complete — ",15," questions answered"]}),(0,t.jsxs)(_.default,{onClick:C,variant:"secondary",size:"sm",children:[(0,t.jsx)(z.RotateCcw,{className:"w-4 h-4"}),"Start New Session"]})]}),(0,t.jsx)("div",{ref:j})]}):(0,t.jsxs)("div",{className:"text-center py-8 px-5",children:[(0,t.jsx)(f.MessageSquare,{className:"w-10 h-10 text-accent/30 mx-auto mb-3"}),(0,t.jsxs)("p",{className:"text-sm text-text-secondary mb-1",children:["Practice a ",(0,t.jsx)("strong",{children:F[i].label.toLowerCase()})," interview for ",(0,t.jsx)("strong",{children:l})," at ",(0,t.jsx)("strong",{children:e})]}),(0,t.jsxs)("p",{className:"text-xs text-text-muted mb-5",children:["An AI interviewer will ask you questions one at a time and give feedback. Up to ",15," questions per session."]}),(0,t.jsxs)(_.default,{onClick:function(){d(!0),(0,O.trackRoleplayStarted)(),(0,O.trackAICreditsUsed)(1,"interview_roleplay");let t={id:`msg-${Date.now()}`,role:"user",content:`I'm ready to start the ${i} interview practice for ${l} at ${e}. Please begin.`};m([t]),k([t])},size:"sm",children:[(0,t.jsx)(f.MessageSquare,{className:"w-4 h-4"}),"Start Practice"]})]})}),c&&!y&&(0,t.jsxs)("div",{className:"px-5 py-3 border-t border-border bg-surface",children:[(0,t.jsxs)("div",{className:"flex items-end gap-2",children:[(0,t.jsx)("textarea",{ref:w,value:u,onChange:e=>p(e.target.value),onKeyDown:function(e){"Enter"!==e.key||e.shiftKey||(e.preventDefault(),S())},placeholder:h?"Waiting for interviewer...":"Type your answer... (Enter to send)",disabled:h,rows:2,className:"flex-1 resize-none rounded-lg border border-border bg-surface-muted px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-accent/20 focus:border-accent disabled:opacity-50 transition-all"}),(0,t.jsx)("button",{type:"button",onClick:S,disabled:!u.trim()||h,className:"p-2.5 rounded-lg bg-accent text-white hover:bg-accent/90 disabled:opacity-40 disabled:cursor-not-allowed transition-all flex-shrink-0",children:h?(0,t.jsx)(v.Loader2,{className:"w-4 h-4 animate-spin"}):(0,t.jsx)(q.Send,{className:"w-4 h-4"})})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between mt-1.5",children:[(0,t.jsxs)("p",{className:"text-xs text-text-muted",children:[N,"/",15," questions answered"]}),(0,t.jsxs)("button",{onClick:C,className:"text-xs text-text-muted hover:text-accent transition-colors flex items-center gap-1",children:[(0,t.jsx)(B.Square,{className:"w-2.5 h-2.5"})," End session"]})]})]})]})})}var W=e.i(245776);let J=["watchlist","saved","applied","interviewing","offered","rejected","ghosted"];function K(e){return e<=1?"a day":e<7?`${e} days`:e<14?"a week":e<31?`${Math.round(e/7)} weeks`:e<60?"a month":e<365?`${Math.round(e/30)} months`:"over a year"}function V(e){let t=new Date,s=new Date(e.created_at),a=Math.floor((t.getTime()-s.getTime())/864e5),n=e.applied_date?new Date(e.applied_date):null,l=n?Math.floor((t.getTime()-n.getTime())/864e5):null,r=e.follow_up_date?new Date(e.follow_up_date):null,i=r&&r<t;switch(e.status){case"watchlist":if(a>=7)return{message:`On your watchlist for ${K(a)}. Apply now or let it go — good roles fill fast.`,urgency:"warning"};if(a>=3)return{message:"Interested? Don't wait too long — job postings get stale after 2 weeks.",urgency:"info"};return null;case"saved":if(a>=5)return{message:`Saved ${K(a)} ago. If you're still interested, take action — otherwise clear it.`,urgency:"warning"};if(a>=2)return{message:"Ready to apply? Tailor your resume first for the best shot.",urgency:"info"};return null;case"applied":if(i){let e=Math.abs(Math.floor((t.getTime()-r.getTime())/864e5));return{message:`Follow-up was due ${e} ${1===e?"day":"days"} ago. Send a follow-up now — it shows genuine interest.`,urgency:"danger"}}if(null!==l&&l>=14)return{message:`${K(l)} with no response. Likely ghosted — consider marking it and moving on.`,urgency:"warning"};if(null!==l&&l>=7)return{message:`${K(l)} since you applied. A polite follow-up email now can double your response rate.`,urgency:"info"};if(null!==l&&l>=3)return{message:"Most companies respond within 5-10 business days. Hang tight.",urgency:"info"};return null;case"interviewing":if(a>=3&&!e.notes?.includes("["))return{message:"Interview in progress — prep with our AI interviewer to practice your answers.",urgency:"info"};return null;case"offered":return{message:"Congratulations! Take time to evaluate — compare compensation, culture, and growth potential.",urgency:"info"};case"rejected":return{message:"It happens. Review the scan analysis to see what skills to strengthen for next time.",urgency:"info"};default:return null}}let X={watchlist:{color:"text-info",bg:"bg-blue-50 border-blue-200",label:"Watchlist",dot:"bg-info",accent:"bg-info"},saved:{color:"text-text-muted",bg:"bg-surface-muted border-border",label:"Saved",dot:"bg-text-muted",accent:"bg-text-muted/40"},applied:{color:"text-info",bg:"bg-blue-50 border-blue-200",label:"Applied",dot:"bg-info",accent:"bg-info"},interviewing:{color:"text-warning",bg:"bg-amber-50 border-amber-200",label:"Interviewing",dot:"bg-warning",accent:"bg-warning"},offered:{color:"text-success",bg:"bg-emerald-50 border-emerald-200",label:"Offered",dot:"bg-success",accent:"bg-success"},rejected:{color:"text-danger",bg:"bg-red-50 border-red-200",label:"Rejected",dot:"bg-danger",accent:"bg-danger"},ghosted:{color:"text-text-muted",bg:"bg-surface-muted border-border",label:"Ghosted",dot:"bg-text-muted/40",accent:"bg-text-muted/30"}};function H(e){if(!e)return{original:null,tailored:null};let t=e.match(/ATS:\s*(\d+)(?:\s*→\s*(\d+))?/);return t?{original:parseInt(t[1]),tailored:t[2]?parseInt(t[2]):null}:{original:null,tailored:null}}function Q(e){return e>=75?"text-success":e>=50?"text-warning":"text-danger"}let Y={active:{color:"text-success",bg:"bg-success",label:"Still active"},removed:{color:"text-danger",bg:"bg-danger",label:"Posting removed"},changed:{color:"text-warning",bg:"bg-warning",label:"JD changed"},error:{color:"text-text-muted",bg:"bg-text-muted",label:"Check failed"},unchecked:{color:"text-text-muted",bg:"bg-border",label:"Not checked"}};function Z({app:e,onCheck:s,checking:a,isPro:n}){let l=e.monitor_status||"unchecked",r=Y[l]||Y.unchecked,i=!!e.link,o="";if(e.last_checked_at){let t=Math.floor((Date.now()-new Date(e.last_checked_at).getTime())/36e5);
2o=t<1?"Checked just now":t<24?`Checked ${t}h ago`:`Checked ${Math.floor(t/24)}d ago`}return i?(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:(0,t.jsxs)("div",{role:"button",tabIndex:n?0:void 0,onClick:t=>{t.stopPropagation(),n&&!a&&s(e.id)},className:`group/monitor flex items-center gap-1.5 transition-all ${n&&!a?"cursor-pointer hover:opacity-80":"cursor-default opacity-70"}`,title:n?a?"Checking...":`${r.label}${o?` — ${o}`:""}. Click to check now.`:"Pro subscription required to check jobs",children:[a?(0,t.jsx)(v.Loader2,{className:"w-2.5 h-2.5 animate-spin text-accent flex-shrink-0"}):(0,t.jsx)("div",{className:`w-2 h-2 rounded-full flex-shrink-0 ${r.bg}`}),(0,t.jsx)("span",{className:`text-xs hidden lg:inline ${r.color}`,children:a?"Checking":"unchecked"===l?n?"Check":"":r.label})]})}):(0,t.jsxs)("div",{className:"flex items-center gap-1.5",title:"No URL to monitor",children:[(0,t.jsx)("div",{className:"w-2 h-2 rounded-full bg-border flex-shrink-0"}),(0,t.jsx)("span",{className:"text-xs text-text-muted/50 hidden lg:inline",children:"No URL"})]})}function ee(e){return e?e.replace(/ATS:\s*\d+(?:\s*→\s*\d+)?\s*/g,"").trim():""}function et({value:e,field:a,appId:n,onSave:l,placeholder:r,className:i=""}){let[o,c]=(0,s.useState)(!1),[d,x]=(0,s.useState)(e||""),[m,u]=(0,s.useState)(!1),p=(0,s.useRef)(null);async function h(){d===(e||"")||(u(!0),await l(n,a,d),u(!1)),c(!1)}return((0,s.useEffect)(()=>{o&&p.current&&p.current.focus()},[o]),o)?(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("input",{ref:p,value:d,onChange:e=>x(e.target.value),onKeyDown:t=>{"Enter"===t.key&&h(),"Escape"===t.key&&(x(e||""),c(!1))},onBlur:h,className:"text-xs rounded border border-accent bg-white px-2 py-1 text-text-primary focus:outline-none w-full min-w-[60px]",placeholder:r}),m&&(0,t.jsx)(v.Loader2,{className:"w-3 h-3 animate-spin text-text-muted flex-shrink-0"})]}):(0,t.jsx)("button",{onClick:()=>{x(e||""),c(!0)},className:`group/cell text-left truncate max-w-full ${i}`,title:e||r||`Edit ${a}`,children:e?(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"truncate",children:e}),(0,t.jsx)(w.Pencil,{className:"w-2.5 h-2.5 text-text-muted/0 group-hover/cell:text-text-muted flex-shrink-0 transition-opacity"})]}):(0,t.jsxs)("span",{className:"text-text-muted/40 italic text-xs hover:text-accent transition-colors",children:["+ ",r||a]})})}function es({initialApplications:e,tier:w}){let[v,P]=(0,s.useState)(e),[I,D]=(0,s.useState)(!1),[A,M]=(0,s.use
2State)(""),[L,E]=(0,s.useState)(""),[q,z]=(0,s.useState)(""),[B,F]=(0,s.useState)(""),[K,Y]=(0,s.useState)(""),[es,ea]=(0,s.useState)(!1),[en,el]=(0,s.useState)(null),[er,ei]=(0,s.useState)(null),[eo,ec]=(0,s.useState)(null),[ed,ex]=(0,s.useState)(null),[em,eu]=(0,s.useState)(null),[ep,eh]=(0,s.useState)(null),[eg,ef]=(0,s.useState)(""),eb=(0,s.useRef)(null),ej=(0,s.useRef)(null);(0,s.useEffect)(()=>{(0,O.trackFeatureUsed)("tracker")},[]),(0,s.useEffect)(()=>{em&&setTimeout(()=>{eb.current?.scrollIntoView({behavior:"smooth",block:"nearest"})},150)},[em]);let[ew,ev]=(0,s.useState)(""),[eN,ey]=(0,s.useState)("all"),[ek,eC]=(0,s.useState)("created_at"),[eS,e_]=(0,s.useState)("desc"),[e$,eT]=(0,s.useState)(1),[eP,eI]=(0,s.useState)(!1);(0,s.useEffect)(()=>{let e=()=>eI(window.innerWidth<768);return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);let eD=eP?10:25,eA="premium"===w,eM="pro"===w||"premium"===w,[eR,eL]=(0,s.useState)(new Set),[eO,eE]=(0,s.useState)(!1);async function eU(e){eL(t=>new Set(t).add(e));try{let t=await fetch("/api/monitor/check",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({applicationId:e})}),s=await t.json();s.applicationId&&P(e=>e.map(e=>e.id===s.applicationId?{...e,monitor_status:s.status,last_checked_at:s.checkedAt}:e))}catch(e){console.error("Monitor check failed:",e)}eL(t=>{let s=new Set(t);return s.delete(e),s})}let[eq,ez]=(0,s.useState)(null);async function eB(){eE(!0),ez(null);let e=v.filter(e=>e.link&&["watchlist","saved","applied","interviewing"].includes(e.status));if(0===e.length){ez("No jobs with URLs to check."),eE(!1),setTimeout(()=>ez(null),4e3);return}eL(new Set(e.map(e=>e.id)));try{let e=await fetch("/api/monitor/batch",{method:"POST",headers:{"Content-Type":"application/json"}});if(!e.ok){let t=await e.json().catch(()=>({}));ez(t.error||"Check failed. Try again later."),eL(new Set),eE(!1),setTimeout(()=>ez(null),5e3);return}let t=await e.json();if(t.results){let e=new Map,s=0,a=0,n=0;for(let l of t.results)e.set(l.applicationId,{status:l.status,checkedAt:l.checkedAt}),"active"===l.status&&s++,"removed"===l.status&&a++,"changed"===l.status&&n++;P(t=>t.map(t=>{let s=e.get(t.id);return s?{...t,monitor_status:s.status,last_checked_at:s.checkedAt}:t}));let l=[];s&&l.push(`${s} active`),a&&l.push(`${a} removed`),n&&l.push(`${n} changed`),ez(`Checked ${t.results.length} jobs: ${l.join(", ")||"all checked"}`)}}catch(e){console.error("Batch check failed:",e),ez("Check failed. Please try again.")}eL(new Set),eE(!1),setTimeout(()=>ez(null),5e3)}let eF=(0,s.useMemo)(()=>{let e=new Date,t=new Date(e);t.setDate(e.getDate()-e.getDay()),t.setHours(0,0,0,0);let s=v.filter(e=>new Date(e.applied_date?e.applied_date:e.created_at)>=t).length,a=v.filter(e=>(0,W.isPreApplication)(e.status)).length,n=v.filter(e=>"applied"===e.status).length,l=v.filter(e=>"interviewing"===e.status).length,r=v.filter(e=>"offered"===e.status).length,i=v.filter(e=>"rejected"===e.status).length,o=v.filter(e=>"ghosted"===e.status).length,c=v.filter(e=>!(0,W.isPreApplication)(e.status)).length,d=c>0?Math.round((l+r+i)/c*100):0;return{total:v.length,thisWeek:s,watchlist:a,applied:n,interviewing:l,offered:r,rejected:i,ghosted:o,responseRate:d}},[v]),eG=(0,s.useMemo)(()=>{let e=new Date;e.setDate(e.getDate()-7);let t=new Date;return t.setDate(t.getDate()-30),v.filter(s=>{if("applied"!==s.status)return!1;let a=new Date(s.applied_date?s.applied_date:s.created_at);return a<=e&&a>=t}).sort((e,t)=>new Date(e.applied_date||e.created_at).getTime()-new Date(t.applied_date||t.created_at).getTime()).slice(0,5)},[v]),eW=(0,s.useMemo)(()=>{let e=[...v];if(ew.trim()){let t=ew.toLowerCase();e=e.filter(e=>e.company.toLowerCase().includes(t)||e.role.toLowerCase().includes(t)||e.location&&e.location.toLowerCase().includes(t)||e.platform&&e.platform.toLowerCase().includes(t))}return"all"!==eN&&(e=e.filter(e=>e.status===eN)),e.sort((e,t)=>{let s=0;switch(ek){case"company":s=e.company.localeCompare(t.company);break;case"status":s=J.indexOf(e.status)-J.indexOf(t.status);break;case"applied_date":s=(e.applied_date||e.created_at).localeCompare(t.applied_date||t.created_at);break;default:s=e.created_at.localeCompare(t.created_at)}return"desc"===eS?-s:s}),e},[v,ew,eN,ek,eS]);async function eJ(){if(!A.trim()||!L.trim())return;ea(!0);let e=await fetch("/api/applications",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({company:A.trim(),role:L.trim(),link:q.trim()||null,platform:B.trim()||null,location:K.trim()||null,status:"applied",applied_date:new Date().toISOString().split("T")[0]})}
2),t=await e.json();t.application&&(P(e=>[t.application,...e]),M(""),E(""),z(""),F(""),Y(""),D(!1)),ea(!1)}let eK=["interviewing","offered","rejected","ghosted"];async function eV(e,t){el(e);let s={status:t},a=v.find(t=>t.id===e);"applied"===t&&a&&!a.applied_date&&(s.applied_date=new Date().toISOString().split("T")[0]);try{let a=await fetch(`/api/applications/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});a.ok?(P(t=>t.map(t=>t.id===e?{...t,...s}:t)),"interviewing"!==t&&eo===e&&ec(null),"interviewing"!==t&&ed===e&&ex(null),eK.includes(t)&&(eu(e),eh(e),ef(""),setTimeout(()=>ej.current?.focus(),200))):console.error("Status update failed:",a.status,await a.text())}catch(e){console.error("Status update error:",e)}el(null)}async function eX(e){if(!eg.trim())return void eh(null);let t=v.find(t=>t.id===e),s=new Date().toISOString().split("T")[0],a=`[${X[t?.status||""]?.label||"Update"} ${s}] ${eg.trim()}`,n=t?.notes||"",l=n?`${n}
3${a}`:a;(await fetch(`/api/applications/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({notes:l})})).ok&&P(t=>t.map(t=>t.id===e?{...t,notes:l}:t)),eh(null),ef("")}async function eH(e,t,s){(await fetch(`/api/applications/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({[t]:s.trim()||null})})).ok&&P(a=>a.map(a=>a.id===e?{...a,[t]:s.trim()||null}:a))}async function eQ(e,t){(await fetch(`/api/applications/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({follow_up_date:t||null})})).ok&&P(s=>s.map(s=>s.id===e?{...s,follow_up_date:t||null}:s))}async function eY(e){let t=v.find(t=>
3t.id===e),s=[t?.company,t?.role].filter(Boolean).join(" — ")||"this application";!confirm(`Delete "${s}"? This cannot be undone.`)||(em===e&&eu(null),(await fetch(`/api/applications/${e}`,{method:"DELETE"})).ok&&P(t=>t.filter(t=>t.id!==e)))}function eZ(e){ek===e?e_("desc"===eS?"asc":"desc"):(eC(e),e_("desc"))}function e0(e){return e?new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric"}):"—"}function e1(e){return e?Math.floor((Date.now()-new Date(e).getTime())/864e5):null}return(0,t.jsxs)("div",{className:"space-y-6",children:[v.length>0&&(0,t.jsx)("div",{className:"grid grid-cols-4 gap-2 sm:grid-cols-4 xl:grid-cols-7",children:[{icon:(0,t.jsx)(i.Briefcase,{className:"w-4 h-4"}),value:eF.total,label:"Total",color:"text-text-primary"},{icon:(0,t.jsx)(h.Calendar,{className:"w-4 h-4"}),value:eF.thisWeek,label:"This Wk",color:"text-info"},{icon:(0,t.jsx)(j.Eye,{className:"w-4 h-4"}),value:eF.watchlist,label:"Watching",color:"text-info"},{icon:(0,t.jsx)(f.MessageSquare,{className:"w-4 h-4"}),value:eF.interviewing,label:"Interview",color:"text-warning"}].map(e=>(0,t.jsxs)($.default,{padding:"sm",className:"text-center",children:[e.icon&&(0,t.jsx)("div",{className:`${e.color} mx-auto mb-1`,children:e.icon}),(0,t.jsx)("p",{className:`text-2xl font-bold font-mono ${e.color}`,children:e.value}),(0,t.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:e.label})]},e.label))}),v.length>0&&(0,t.jsxs)($.default,{padding:"sm",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-text-muted mb-2 px-1",children:"Pipeline"}),(0,t.jsx)("div",{className:"flex items-center gap-0.5 h-3 rounded-full overflow-hidden bg-surface-muted",children:[{count:eF.watchlist,color:"bg-info"},{count:eF.applied,color:"bg-info"},{count:eF.interviewing,color:"bg-warning"},{count:eF.offered,color:"bg-success"},{count:eF.rejected,color:"bg-danger"},{count:eF.ghosted,color:"bg-text-muted/40"}].filter(e=>e.count>0).map((e,s)=>(0,t.jsx)("div",{className:`h-full ${e.color} transition-all`,style:{width:`${e.count/eF.total*100}%`}},s))}),(0,t.jsx)("div",{className:"flex items-center gap-3 sm:gap-4 mt-2 px-1 flex-wrap",children:[{label:"Watch",color:"bg-info",count:eF.watchlist},{label:"Applied",color:"bg-info",count:eF.applied},{label:"Interview",color:"bg-warning",count:eF.interviewing},{label:"Offered",color:"bg-success",count:eF.offered},{label:"Rejected",color:"bg-danger",count:eF.rejected},{label:"Ghosted",color:"bg-text-muted/40",count:eF.ghosted}].map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("div",{className:`w-2 h-2 rounded-full ${e.count>0?e.color:"bg-border"}`}),(0,t.jsxs)("span",{className:`text-xs ${e.count>0?"text-text-muted":"text-text-muted/50"}`,children:[e.label,e.count>0?` (${e.count})`:""]})]},e.label))})]}),eA&&eG.length>0&&(0,t.jsxs)($.default,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-3 flex-wrap",children:[(0,t.jsx)(o.Mail,{className:"w-4 h-4 text-warning flex-shrink-0"}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-text-primary",children:"Priority Follow-ups"}),(0,t.jsx)("span",{className:"text-xs text-text-muted",children:"7+ days, no response"})]}),(0,t.jsx)("div",{className:"space-y-2",children:eG.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between bg-warning/5 border border-warning/10 rounded-lg px-3 py-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"text-sm font-medium text-text-primary",children:[e.role," at ",e.company]}),(0,t.jsxs)("p",{className:"text-xs text-text-muted",children:["Applied ",e1(e.applied_date)," days ago"]})]}),(0,t.jsxs)(_.default,{variant:"ghost",size:"sm",onClick:()=>ei(er===e.id?null:e.id),children:[(0,t.jsx)(o.Mail,{className:"w-3.5 h-3.5"}),"Follow up"]})]},e.id))})]}),(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-3",children:[(0,t.jsxs)("select",{value:eN,onChange:e=>{ey(e.target.value),eT(1)},className:"rounded-lg border border-border bg-surface px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none",children:[(0,t.jsx)("option",{value:"all",children:"All Status"}),J.map(e=>(0,t.jsx)("option",{value:e,children:X[e]?.label||e},e))]}),(0,t.jsxs)("div",{className:"relative flex-1 w-full sm:w-auto",children:[(0,t.jsx)(c.Search,{className:"absolute left-3 top-2.5 w-4 h-4 text-text-muted"}),(0,t.jsx)("input",{value:ew,onChange:e=>{ev(e.target.value),eT(1)},placeholder:"Search company or role...",className:"w-full pl-9 pr-3 py-2 rounded-lg border border-border bg-surface text-sm text-text-primary placeholder:text-text-muted focus:border-accent focus:outline-none"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[eA&&v.some(e=>e.link)&&(0,t.jsxs)(_.default,{variant:"ghost",size:"sm",onClick:eB,loading:eO,disabled:eO,title:"Re-check if job postings are still live — detects removed or changed listings",children:[(0,t.jsx)(S,{className:"w-4 h-4"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Check all jobs"}),(0,t.jsx)("span",{className:"sm:hidden",children:"Check"})]}),v.length>0&&(0,t.jsxs)(_.default,{variant:"ghost",size:"sm",onClick:function(){let e=new Blob([[["Date","Company","Role","Location","Platform","Status","ATS","Link","Notes"],...v.map(e=>{let t=H(e.notes);return[e.applied_date||e.created_at.split("T")[0],e.company,e.role,e.location||"",e.platform||"",e.status,t.tailored?`${t.original}→${t.tailored}`:t.original?.toString()||"",e.link||"",ee(e.notes)]})].map(e=>e.map(e=>`"${e.replace(/"/g,'""')}"`).join(",")).join("\n")],{type:"text/csv"}),t=URL.createObjectURL(e),s=document.createElement("a");s.href=t,s.download=`applications-${new Date().toISOString().split("T")[0]}.csv`,s.click(),URL.revokeObjectURL(t)},children:[(0,t.jsx)(d.Download,{className:"w-4 h-4"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Export CSV"}),(0,t.jsx)("span",{className:"sm:hidden",children:"Export"})]}),(0,t.jsxs)(_.default,{onClick:()=>D(!0),size:"sm",className:"whitespace-nowrap",children:[(0,t.jsx)(l.Plus,{className:"w-4 h-4"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Add an application to track"}),(0,t.jsx)("span",{className:"sm:hidden",children:"Track one"})]})]})]}),eq&&(0,t.jsxs)("div",{className:"bg-info/5 border border-info/20 rounded-lg px-4 py-2.5 text-sm text-text-primary flex items-center gap-2",children:[(0,t.jsx)(S,{className:"w-4 h-4 text-info flex-shrink-0"}),eq]}),I&&(0,t.jsx)("div",{ref:e=>{e&&setTimeout(()=>e.scrollIntoView({behavior:"smooth",block:"start"}),100)},children:(0,t.jsxs)($.default,{children:[(0,t.jsx)("h3",{className:"font-semibold text-text-primary mb-4",children:"Add Application"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[(0,t.jsx)("input",{value:A,onChange:e=>M(e.target.value),placeholder:"Company *",className:"rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-accent focus:outline-none"}),(0,t.jsx)("input",{value:L,onChange:e=>E(e.target.value),placeholder:"Role *",className:"rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-accent focus:outline-none"}),(0,t.jsx)("input",{value:B,onChange:e=>F(e.target.value),placeholder:"Platform (LinkedIn, Indeed...)",className:"rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-accent focus:outline-none"}),(0,t.jsx)("input",{value:K,onChange:e=>Y(e.target.value),placeholder:"Location",className:"rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-accent focus:outline-none"}),(0,t.jsx)("input",{value:q,onChange:e=>z(e.target.value),placeholder:"Job URL (optional)",className:"rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-accent focus:outline-none sm:col-span-2"})]}),(0,t.jsxs)("div",{className:"flex gap-3 mt-4",children:[(0,t.jsx)(_.default,{onClick:eJ,loading:es,disabled:!A||!L,children:"Save"}),(0,t.jsx)(_.default,{variant:"ghost",onClick:()=>D(!1),children:"Cancel"})]})]})}),0!==v.length||I?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"hidden md:block",children:[(0,t.jsxs)("div",{className:"flex items-center px-6 py-2 mb-1",children:[(0,t.jsx)("div",{className:"w-1 flex-shrink-0"})," ",(0,t.jsxs)("div",{className:"flex items-center flex-1 px-4 gap-4",children:[(0,t.jsx)("div",{className:"w-[60px] flex-shrink-0",children:(0,t.jsxs)("button",{onClick:()=>eZ("applied_date"),className:"flex items-center gap-1 text-xs font-bold text-text-muted uppercase tracking-wider hover:text-text-primary transition-colors select-none",children:["Date ","applied_date"===ek?"desc"===eS?(0,t.jsx)(m.ChevronDown,{className:"w-3 h-3"}):(0,t.jsx)(u.ChevronUp,{className:"w-3 h-3"}):(0,t.jsx)(p.ArrowUpDown,{className:"w-3 h-3 opacity-30"})]})}),(0,t.jsx)("div",{className:"flex-[3] min-w-0",children:(0,t.jsxs)("button",{onClick:()=>eZ("company"),className:"flex items-center gap-1 text-xs font-bold text-text-muted uppercase tracking-wider hover:text-text-primary transition-colors select-none",children:["Company ","company"===ek?"desc"===eS?(0,t.jsx)(m.ChevronDown,{className:"w-3 h-3"}):(0,t.jsx)(u.ChevronUp,{className:"w-3 h-3"}):(0,t.jsx)(p.ArrowUpDown,{className:"w-3 h-3 opacity-30"})]})}),(0,t.jsx)("div",{className:"flex-[3] min-w-0",children:(0,t.jsx)("span",{className:"text-xs font-bold text-text-muted uppercase tracking-wider",children:"Role"})}),(0,t.jsx)("div",{className:"w-[64px] flex-shrink-0 text-center",children:(0,t.jsx)("span",{className:"text-xs font-bold text-text-muted uppercase tracking-wider",children:"ATS"})}),(0,t.jsx)("div",{className:"w-[132px] flex-shrink-0",children:(0,t.jsxs)("button",{onClick:()=>eZ("status"),className:"flex items-center gap-1 text-xs font-bold text-text-muted uppercase tracking-wider hover:text-text-primary transition-colors select-none",children:["Status ","status"===ek?"desc"===eS?(0,t.jsx)(m.ChevronDown,{className:"w-3 h-3"}):(0,t.jsx)(u.ChevronUp,{className:"w-3 h-3"}):(0,t.jsx)(p.ArrowUpDown,{className:"w-3 h-3 opacity-30"})]})}),eM&&(0,t.jsx)("div",{className:"w-[90px] flex-shrink-0",children:(0,t.jsx)("span",{className:"text-xs font-bold text-text-muted uppercase tracking-wider",children:"Monitor"})}),(0,t.jsx)("div",{className:"w-6 flex-shrink-0"})]})]}),(0,t.jsx)("div",{className:"space-y-1.5",children:(0,T.paginate)(eW,e$,eD).map(e=>{let s,i=X[e.status]||X.saved,c=H(e.notes),d=ee(e.notes),u=em===e.id,p=e1(e.applied_date||e.created_at),j="applied"===e.status&&null!==p&&p>=7;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:`
4                      bg-surface rounded-xl overflow-hidden transition-all duration-200
5                      ${u?"shadow-[0_4px_20px_rgba(0,0,0,0.08)] ring-1 ring-border":`shadow-[0_1px_4px_rgba(0,0,0,0.04)] hover:shadow-[0_4px_16px_rgba(0,0,0,0.07)] hover:-translate-y-[1px] ${j?"ring-1 ring-warning/20":""}`}
6                    `,children:[(0,t.jsxs)("div",{className:"flex items-center gap-0 cursor-pointer group",onClick:()=>eu(u?null:e.id),children:[(0,t.jsx)("div",{className:`w-1 self-stretch flex-shrink-0 rounded-l-xl ${i.accent} transition-all ${u?"w-1.5":""}`}),(0,t.jsxs)("div",{className:"flex items-center flex-1 min-w-0 px-4 py-4 gap-4",children:[(0,t.jsxs)("div",{className:"w-[60px] flex-shrink-0",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-text-primary leading-tight",children:e0(e.applied_date||e.created_at)}),null!==p&&(0,t.jsx)("p",{className:`text-xs font-mono mt-0.5 ${!["applied"].includes(e.status)?"text-text-muted":p>=14?"text-danger font-medium":p>=7?"text-warning font-medium":"text-text-muted"}`,children:0===p?"Today":1===p?"1d ago":`${p}d ago`})]}),(0,t.jsxs)("div",{className:"flex-[3] min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("h3",{className:"text-[15px] font-bold text-text-primary truncate",children:e.company}),e.link&&(0,t.jsx)("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:"text-text-muted/30 hover:text-info transition-colors flex-shrink-0",children:(0,t.jsx)(x.Exter
6nalLink,{className:"w-3.5 h-3.5"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[e.location&&(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs text-text-muted bg-surface-muted rounded px-2 py-0.5",children:[(0,t.jsx)(N.MapPin,{className:"w-3 h-3"}),e.location]}),e.platform&&(0,t.jsx)("span",{className:"inline-flex items-center gap-1 text-xs text-text-muted bg-surface-muted rounded px-2 py-0.5",children:e.platform}),j&&(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-warning bg-warning/10 rounded px-2 py-0.5",children:[(0,t.jsx)(o.Mail,{className:"w-3 h-3"}),"Follow up"]}),"interviewing"===e.status&&eA&&(0,t.jsxs)("button",{onClick:t=>{t.stopPropagation(),eu(e.id),ec(e.id)},className:"inline-flex items-center gap-1 text-xs font-medium text-info bg-info/10 rounded px-2 py-0.5 hover:bg-info/20 transition-colors",title:"AI briefing with company research, likely questions, and talking points",children:[(0,t.jsx)(C.Brain,{className:"w-3 h-3"}),"Prep for interview"]}),d&&(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs text-text-muted/70 italic truncate max-w-[200px]",children:[(0,t.jsx)(f.MessageSquare,{className:"w-3 h-3 flex-shrink-0"}),d.length>30?d.slice(0,30)+"…":d]})]})]}),(0,t.jsxs)("div",{className:"flex-[3] min-w-0",children:[(0,t.jsx)("p",{className:"text-sm text-text-secondary truncate",children:e.role}),e.follow_up_date&&!(0,W.isClosed)(e.status)&&(0,t.jsxs)("p",{className:`text-xs mt-1 flex items-center gap-1 ${new Date(e.follow_up_date)<=new Date?"text-warning font-medium":"text-text-muted"}`,children:[(0,t.jsx)(h.Calendar,{className:"w-3 h-3"}),"Follow up ",e0(e.follow_up_date)]}),(()=>{let s=V(e);if(!s)return null;let a="danger"===s.urgency?"bg-danger/8 border-danger/20 text-danger":"warning"===s.urgency?"bg-warning/8 border-warning/20 text-warning":"bg-info/8 border-info/20 text-info",n="danger"===s.urgency?"!":"warning"===s.urgency?"→":"i";return(0,t.jsxs)("div",{className:`mt-2 flex items-start gap-2 rounded-lg border px-2.5 py-1.5 overflow-hidden ${a}`,children:[(0,t.jsx)("span",{className:"text-xs font-bold mt-px flex-shrink-0",children:n}),(0,t.jsx)("p",{className:"text-xs leading-snug font-medium min-w-0 line-clamp-2",children:s.message})]})})()]}),(0,t.jsx)("div",{className:"w-[64px] flex-shrink-0",onClick:e=>e.stopPropagation(),children:null!==c.original?(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("span",{className:`text-2xl font-bold font-mono leading-none ${Q(c.tailored??c.original)}`,children:c.tailored??c.original}),null!==c.tailored&&(0,t.jsxs)("p",{className:"text-xs text-text-muted font-mono mt-0.5",children:[c.original," → ",c.tailored]}),(0,t.jsx)("div",{className:"mt-1.5 h-1 rounded-full bg-surface-muted overflow-hidden mx-auto w-11",children:(0,t.jsx)("div",{className:`h-full rounded-full transition-all ${(c.tailored??c.original)>=75?"bg-success":(c.tailored??c.original)>=50?"bg-warning":"bg-danger"}`,style:{width:`${c.tailored??c.original}%`}})})]}):(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("span",{className:"text-sm text-text-muted/15 font-mono",children:"--"}),(0,t.jsx)("div",{className:"mt-1.5 h-1 rounded-full bg-surface-muted/30 mx-auto w-11"})]})}),(0,t.jsx)("div",{className:"w-[132px] flex-shrink-0",onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),children:(0,t.jsx)("select",{value:e.status,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),onChange:t=>{t.stopPropagation(),eV(e.id,t.target.value)},disabled:en===e.id,className:`text-sm font-medium rounded-lg border px-3 py-1.5 focus:outline-none focus:ring-2 focus:ring-accent/20 transition-all cursor-pointer w-full ${i.bg} ${i.color}`,children:J.map(e=>(0,t.jsx)("option",{value:e,children:X[e]?.label||e},e))})}),eM&&(0,t.jsx)("div",{className:"w-[90px] flex-shrink-0",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(Z,{app:e,onCheck:eU,checking:eR.has(e.id),isPro:eM})}),(0,t.jsx)("div",{className:"w-6 flex-shrink-0 flex justify-center",children:(0,t.jsx)(a.motion.div,{animate:{rotate:180*!!u},transition:{duration:.2},children:(0,t.jsx)(m.ChevronDown,{className:`w-4 h-4 transition-colors ${u?"text-text-secondary":"text-text-muted/20 group-hover:text-text-muted"}`})})})]})]}),(0,t.jsx)(n.AnimatePresence,{mode:"wait",children:u&&(0,t.jsx)(a.motion.div,{ref:eb,initial:{height:0,opacity:0}
6,animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,t.jsxs)("div",{className:"mx-4 mb-4 mt-0.5 rounded-lg bg-background border border-border/60 p-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-x-6 gap-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"text-xs text-text-muted uppercase tracking-wider font-medium mb-1.5 flex items-center gap-1",children:[(0,t.jsx)(y.Building2,{className:"w-3 h-3"})," Company"]}),(0,t.jsx)(et,{value:e.company,field:"company",appId:e.id,onSave:eH,placeholder:"company",className:"text-sm font-semibold text-text-primary"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs text-text-muted uppercase tracking-wider font-medium mb-1.5 block",children:"Role"}),(0,t.jsx)(et,{value:e.role,field:"role",appId:e.id,onSave:eH,placeholder:"role",className:"text-sm text-text-primary"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"text-xs text-text-muted uppercase tracking-wider font-medium mb-1.5 flex items-center gap-1",children:[(0,t.jsx)(N.MapPin,{className:"w-3 h-3"})," Location"]}),(0,t.jsx)(et,{value:e.location,field:"location",appId:e.id,onSave:eH,placeholder:"Add location",className:"text-sm text-text-secondary"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"text-xs text-text-muted uppercase tracking-wider font-medium mb-1.5 flex items-center gap-1",children:[(0,t.jsx)(k.Link2,{className:"w-3 h-3"})," Platform"]}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(et,{value:e.platform,field:"platform",appId:e.id,onSave:eH,placeholder:"Add source",className:"text-sm text-text-secondary"}),e.link&&(0,t.jsx)("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:"text-text-muted hover:text-info transition-colors flex-shrink-0",children:(0,t.jsx)(x.Exter
6nalLink,{className:"w-3.5 h-3.5"})})]})]})]}),(0,t.jsx)("div",{className:"border-t border-border/40 my-3"}),(0,t.jsxs)("div",{className:"flex items-end gap-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"text-xs text-text-muted uppercase tracking-wider font-medium mb-1.5 flex items-center gap-1",children:[(0,t.jsx)(h.Calendar,{className:"w-3 h-3"})," Follow-up"]}),(0,t.jsx)("input",{type:"date",value:e.follow_up_date||"",onChange:t=>eQ(e.id,t.target.value),className:"text-sm rounded-lg border border-border bg-surface px-2.5 py-1.5 text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/20 focus:border-accent w-[140px]"})]}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-xs text-text-muted uppercase tracking-wider font-medium mb-1.5 block",children:"Notes"}),(0,t.jsx)(et,{value:d&&d.replace(/\[(?:Interviewing|Offered|Rejected|Ghosted|Applied) \d{4}-\d{2}-\d{2}\] .*/g,"").trim()||null,field:"notes",appId:e.id,onSave:eH,placeholder:"Add a note...",className:"text-sm text-text-muted"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 pb-0.5 flex-shrink-0",children:[e.link&&(0,t.jsxs)("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 px-3 py-1.5 bg-accent text-white text-xs font-medium rounded-lg hover:opacity-90 transition-opacity",title:"Open application page",children:[(0,t.jsx)(x.Exter
6nalLink,{className:"w-3.5 h-3.5"}),"Apply"]}),eA&&"interviewing"===e.status&&(0,t.jsx)("button",{onClick:()=>ec(eo===e.id?null:e.id),className:"p-2 text-info hover:text-info hover:bg-info/5 transition-all rounded-lg",title:"Interview Prep",children:(0,t.jsx)(C.Brain,{className:"w-4 h-4"})}),eA&&"interviewing"===e.status&&(0,t.jsx)("button",{onClick:()=>ex(ed===e.id?null:e.id),className:"p-2 text-accent hover:text-accent hover:bg-accent/5 transition-all rounded-lg",title:"Practice Interview",children:(0,t.jsx)(f.MessageSquare,{className:"w-4 h-4"})}),eA&&(0,t.jsx)("button",{onClick:()=>ei(er===e.id?null:e.id),className:"p-2 text-text-muted hover:text-info hover:bg-info/5 transition-all rounded-lg",title:"Draft follow-up email",children:(0,t.jsx)(o.Mail,{className:"w-4 h-4"})}),(0,t.jsx)("button",{onClick:()=>eY(e.id),className:"p-2 text-text-muted hover:text-danger hover:bg-danger/5 transition-all rounded-lg",title:"Delete application",children:(0,t.jsx)(r.Trash2,{className:"w-4 h-4"})})]})]}),ep===e.id&&(0,t.jsxs)("div",{className:"mt-3 pt-3 border-t border-border/40",children:[(0,t.jsxs)("label",{className:"text-xs text-text-muted uppercase tracking-wider font-medium mb-1.5 flex items-center gap-1",children:[(0,t.jsx)(f.MessageSquare,{className:"w-3 h-3"})," What happened?"]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("input",{ref:ej,value:eg,onChange:e=>ef(e.target.value),onKeyDown:t=>{"Enter"===t.key&&eX(e.id),"Escape"===t.key&&(eh(null),ef(""))},placeholder:"interviewing"===e.status?"e.g., Got screening call from recruiter":"offered"===e.status?"e.g., Received offer — $120k base + equity":"rejected"===e.status?"e.g., Rejection email — no feedback given":"e.g., No response after 3 weeks",className:"flex-1 text-sm rounded-lg border border-border bg-surface px-3 py-2 text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/20 focus:border-accent placeholder:text-text-muted/50"}),(0,t.jsx)(_.default,{size:"sm",onClick:()=>eX(e.id),children:"Log"}),(0,t.jsx)("button",{onClick:()=>{eh(null),ef("")},className:"p-2 text-text-muted hover:text-text-primary transition-colors",children:(0,t.jsx)(b.X,{className:"w-4 h-4"})})]}),(0,t.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Press Enter to save · Esc to skip"})]}),(s=(e.notes||"").match(/\[(?:Interviewing|Offered|Rejected|Ghosted|Applied) \d{4}-\d{2}-\d{2}\] .*/g))&&0!==s.length?(0,t.jsxs)("div",{className:"mt-3 pt-3 border-t border-border/40",children:[(0,t.jsxs)("label",{className:"text-xs text-text-muted uppercase tracking-wider font-medium mb-2 flex items-center gap-1",children:[(0,t.jsx)(g.TrendingUp,{className:"w-3 h-3"})," Response Timeline"]}),(0,t.jsx)("div",{className:"space-y-1.5",children:s.map((e,s)=>{let a=e.match(/\[(.*?) (\d{4}-\d{2}-\d{2})\] (.*)/);if(!a)return null;let[,n,l,r]=a,i=X[n.toLowerCase()]||X.applied;return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("div",{className:`w-2 h-2 rounded-full mt-1.5 flex-shrink-0 ${i.dot}`}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("span",{className:"text-xs text-text-muted font-mono",children:l}),(0,t.jsx)("span",{className:`text-xs font-medium ml-1.5 ${i.color}`,children:n}),(0,t.jsx)("p",{className:"text-xs text-text-secondary leading-relaxed",children:r})]})]},s)})}),ep!==e.id&&(0,t.jsxs)("button",{onClick:()=>{eh(e.id),ef(""),setTimeout(()=>ej.current?.focus(),100)},className:"mt-2 text-xs text-accent hover:text-accent-hover font-medium flex items-center gap-1 transition-colors",children:[(0,t.jsx)(l.Plus,{className:"w-3 h-3"})," Add update"]})]}):null]})},`expanded-${e.id}`)})]}),er===e.id&&(0,t.jsx)("div",{className:"mt-1.5",children:(0,t.jsx)(R,{company:e.company,role:e.role,status:e.status,notes:e.notes,appliedDate:e.applied_date,onClose:()=>ei(null)})}),eo===e.id&&(0,t.jsx)(U,{company:e.company,role:e.role,location:e.location,notes:e.notes,onClose:()=>ec(null)}),ed===e.id&&(0,t.jsx)(G,{company:e.company,role:e.role,onClose:()=>ex(null)})]},e.id)})})]}),(0,t.jsx)("div",{className:"md:hidden space-y-2",children:(0,T.paginate)(eW,e$,eD).map(e=>{let s=X[e.status]||X.saved,a=H(e.notes),n=em===e.id;return(0,t.jsxs)("div",{children:[(0,t.jsxs)($.default,{padding:"sm",className:"overflow-hidden",children:[(0,t.jsxs)("div",{role:"button",tabIndex:0,onClick:()=>eu(n?null:e.id),className:"w-full text-left cursor-pointer",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,t.jsx)("div",{className:`w-2 h-2 rounded-full flex-shrink-0 ${s.dot}`}),(0,t.jsx)("p",{className:"font-bold text-sm text-text-primary truncate",children:e.company}),null!==a.original&&(0,t.jsxs)("span",{className:`text-xs font-bold font-mono px-1.5 py-0.5 rounded ${Q(a.tailored??a.original)} bg-current/[0.08]`,children:["ATS ",a.tailored??a.original]})]}),(0,t.jsx)("p",{className:"text-xs text-text-secondary truncate pl-4",children:e.role}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-1.5 pl-4 overflow-hidden",children:[(0,t.jsx)("span",{className:"text-xs text-text-muted flex-shrink-0",children:e0(e.applied_date||e.created_at)}),e.location&&(0,t.jsxs)("span",{className:"text-xs text-text-muted flex items-center gap-0.5 truncate",children:[(0,t.jsx)(N.MapPin,{className:"w-2.5 h-2.5 flex-shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e.location})]}),e.platform&&(0,t.jsx)("span",{className:"text-xs text-text-muted flex-shrink-0",children:e.platform}),eM&&e.link&&(0,t.jsx)(Z,{app:e,onCheck:eU,checking:eR.has(e.id),isPro:eM})]})]}),(0,t.jsx)("span",{className:`text-xs font-medium rounded-md border px-2 py-0.5 flex-shrink-0 ${s.bg} ${s.color}`,children:s.label})]}),(()=>{let s=V(e);if(!s)return null;let a="danger"===s.urgency?"bg-danger/8 border-danger/20 text-danger":"warning"===s.urgency?"bg-warning/8 border-warning/20 text-warning":"bg-info/8 border-info/20 text-info",n="danger"===s.urgency?"!":"warning"===s.urgency?"→":"i";return(0,t.jsxs)("div",{className:`mt-2 flex items-start gap-2 rounded-lg border px-2.5 py-2 overflow-hidden ${a}`,children:[(0,t.jsx)("span",{className:"text-xs font-bold mt-px flex-shrink-0",children:n}),(0,t.jsx)("p",{className:"text-sm leading-snug font-medium line-clamp-2 min-w-0",children:s.message})]})})()]}),n&&(0,t.jsxs)("div",{className:"mt-3 pt-3 border-t border-border space-y-3",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"text-xs text-text-muted uppercase tracking-wide flex items-center gap-1",children:[(0,t.jsx)(y.Building2,{className:"w-3 h-3"})," Company"]}),(0,t.jsx)(et,{value:e.company,field:"company",appId:e.id,onSave:eH,placeholder:"company",className:"text-sm text-text-primary mt-0.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs text-text-muted uppercase tracking-wide",children:"Role"}),(0,t.jsx)(et,{value:e.role,field:"role",appId:e.id,onSave:eH,placeholder:"role",className:"text-sm text-text-primary mt-0.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"text-xs text-text-muted uppercase tracking-wide flex items-center gap-1",children:[(0,t.jsx)(N.MapPin,{className:"w-3 h-3"})," Location"]}),(0,t.jsx)(et,{value:e.location,field:"location",appId:e.id,onSave:eH,placeholder:"location",className:"text-xs text-text-secondary mt-0.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"text-xs text-text-muted uppercase tracking-wide flex items-center gap-1",children:[(0,t.jsx)(k.Link2,{className:"w-3 h-3"})," Source"]}),(0,t.jsx)(et,{value:e.platform,field:"platform",appId:e.id,onSave:eH,placeholder:"source",className:"text-xs text-text-secondary mt-0.5"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs text-text-muted uppercase tracking-wide",children:"Notes"}),(0,t.jsx)(et,{value:ee(e.notes)||null,field:"notes",appId:e.id,onSave:eH,placeholder:"add note",className:"text-xs text-text-muted mt-0.5"})]}),(0,t.jsx)("div",{className:"flex items-center gap-3",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs text-text-muted uppercase tracking-wide",children:"Follow-up"}),(0,t.jsx)("input",{type:"date",value:e.follow_up_date||"",onChange:t=>eQ(e.id,t.target.value),className:"block text-xs rounded border border-border bg-surface px-2 py-1 text-text-primary focus:outline-none focus:border-accent mt-0.5"})]})}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("select",{value:e.status,onChange:t=>eV(e.id,t.target.value),disabled:en===e.id,className:`text-xs font-medium rounded-md border px-2 py-1 focus:outline-none ${s.bg} ${s.color}`,children:J.map(e=>(0,t.jsx)("option",{value:e,children:X[e]?.label||e},e))}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[e.link&&(0,t.jsx)("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:"p-2.5 text-text-muted hover:text-info hover:bg-info/5 rounded-lg transition-colors min-h-[44px] min-w-[44px] flex items-center justify-center",children:(0,t.jsx)(x.Exter
6nalLink,{className:"w-4 h-4"})}),eA&&"interviewing"===e.status&&(0,t.jsx)("button",{onClick:()=>ec(eo===e.id?null:e.id),className:"p-2.5 text-info hover:text-info hover:bg-info/5 rounded-lg transition-colors min-h-[44px] min-w-[44px] flex items-center justify-center",title:"Interview Prep",children:(0,t.jsx)(C.Brain,{className:"w-4 h-4"})}),eA&&"interviewing"===e.status&&(0,t.jsx)("button",{onClick:()=>ex(ed===e.id?null:e.id),className:"p-2.5 text-accent hover:text-accent hover:bg-accent/5 rounded-lg transition-colors min-h-[44px] min-w-[44px] flex items-center justify-center",title:"Practice Interview",children:(0,t.jsx)(f.MessageSquare,{className:"w-4 h-4"})}),eA&&(0,t.jsx)("button",{onClick:()=>ei(er===e.id?null:e.id),className:"p-2.5 text-text-muted hover:text-info hover:bg-info/5 rounded-lg transition-colors min-h-[44px] min-w-[44px] flex items-center justify-center",children:(0,t.jsx)(o.Mail,{className:"w-4 h-4"})}),(0,t.jsx)("button",{onClick:()=>eY(e.id),className:"p-2.5 text-text-muted hover:text-danger hover:bg-danger/5 rounded-lg transition-colors min-h-[44px] min-w-[44px] flex items-center justify-center",children:(0,t.jsx)(r.Trash2,{className:"w-4 h-4"})})]})]})]})]}),er===e.id&&(0,t.jsx)(R,{company:e.company,role:e.role,status:e.status,notes:e.notes,appliedDate:e.applied_date,onClose:()=>ei(null)}),eo===e.id&&(0,t.jsx)(U,{company:e.company,role:e.role,location:e.location,notes:e.notes,onClose:()=>ec(null)}),ed===e.id&&(0,t.jsx)(G,{company:e.company,role:e.role,onClose:()=>ex(null)})]},e.id)})}),eW.length>eD&&(0,t.jsx)(T.default,{currentPage:e$,totalPages:Math.ceil(eW.length/eD),onPageChange:eT,totalItems:eW.length,pageSize:eD}),eW.length<=eD&&(ew||"all"!==eN)?(0,t.jsxs)("p",{className:"text-xs text-text-muted text-center",children:["Showing ",eW.length," of ",v.length," applications"]}):null]}):(0,t.jsxs)($.default,{className:"text-center py-12",children:[(0,t.jsx)(i.Briefcase,{className:"w-10 h-10 text-text-muted mx-auto mb-3"}),(0,t.jsx)("h3",{className:"font-semibold text-text-primary mb-1",children:"No applications tracked yet"}),(0,t.jsx)("p",{className:"text-sm text-text-secondary mb-4 max-w-sm mx-auto",children:"Track every application in one place. See which companies respond, which approaches lead to interviews, and where to follow up."}),(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row items-center gap-3",children:[(0,t.jsxs)(_.default,{onClick:()=>D(!0),children:[(0,t.jsx)(l.Plus,{className:"w-4 h-4"}),"Add manually"]}),(0,t.jsx)("a",{href:"/scan",className:"text-sm font-medium text-accent hover:text-accent-hover transition-colors",children:"or scan a job first →"})]}),(0,t.jsx)("p",{className:"text-xs text-text-muted mt-3",children:"Tip: Scan a job first — your ATS score and analysis get saved automatically."})]})]})}e.s(["default",()=>es],17218)}]);
7
8//# debugId=22cc1f74-990e-4f23-d628-25b0db74f58e

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.