1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4953],{29133:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/my-jobs",function(){return a(16290)}])},31111:function(e,t,a){"use strict";a.d(t,{Z:function(){return d}});var s=a(85893);a(67294);var r=a(49240);let n={idle:{cx:258,cy:120,r:6,hx:259.5,hy:118.5,hr:2,shape:"circle"},happy:{cx:258,cy:120,r:5.5,hx:259.5,hy:119,hr:1.5,shape:"squint"},thinking:{cx:260,cy:118,r:6,hx:262,hy:116.5,hr:2,shape:"circle"},searching:{cx:256,cy:120,r:6.5,hx:254,hy:118.5,hr:2,shape:"wide"},celebrating:{cx:258,cy:120,r:5,hx:259,hy:119,hr:1.5,shape:"squint"},sad:{cx:258,cy:121,r:5.5,hx:259,hy:120,hr:1.5,shape:"circle"},sleeping:{cx:258,cy:120,r:5,hx:259,hy:119,hr:0,shape:"closed"},proud:{cx:258,cy:119,r:6.5,hx:260,hy:117,hr:2.5,shape:"circle"},waving:{cx:258,cy:120,r:6,hx:259.5,hy:118.5,hr:2,shape:"circle"},coding:{cx:258,cy:120,r:5,hx:259.5,hy:119,hr:1.5,shape:"squint"},love:{cx:258,cy:120,r:6,hx:259,hy:118,hr:0,shape:"heart"}},l={idle:"",happy:"rotate(-3deg)",thinking:"rotate(4deg) translateY(-2px)",searching:"rotate(-2deg) translateX(-3px)",celebrating:"rotate(-6deg) translateY(-4px)",sad:"rotate(5deg) translateY(3px)",sleeping:"rotate(8deg) translateY(4px)",proud:"rotate(-4deg) translateY(-3px) scale(1.02)",waving:"rotate(-5deg)",coding:"rotate(2deg) translateY(-1px)",love:"rotate(-3deg) scale(1.03)"},i={idle:!1,happy:!0,thinking:!1,searching:!1,celebrating:!0,sad:!1,sleeping:!1,proud:!1,waving:!0,coding:!1,love:!0},c={idle:"crane-idle",happy:"crane-happy",thinking:"crane-thinking",searching:"crane-searching",celebrating:"crane-celebrating",sad:"crane-sad",sleeping:"crane-sleeping",proud:"crane-proud",waving:"crane-waving",coding:"crane-thinking",love:"crane-happy"},o={sm:{wrapper:"w-16 h-16",caption:"text-xs mt-1"},md:{wrapper:"w-24 h-24",caption:"text-sm mt-2"},lg:{wrapper:"w-32 h-32",caption:"text-sm mt-2"},xl:{wrapper:"w-40 h-40",caption:"text-base mt-3"}};function d(e){let{mood:t="idle",className:a="",fill:d="#FF4500",caption:x,captionClass:h="",size:m="md",showBg:u=!1}=e,p=n[t],g=l[t],f=i[t],y=c[t],b=o[m],v="#1C1C1C";return(0,s.jsxs)("div",{className:"flex flex-col items-center ".concat(a),children:[(0,s.jsxs)("div",{className:"".concat(b.wrapper," ").concat(y," relative"),children:[u&&(0,s.jsx)("div",{className:"absolute inset-0 rounded-full bg-[#EDEFF1] dark:bg-[#343536]"}),(0,s.jsxs)("svg",{viewBox:"23 95 330 345",className:"w-full h-full relative z-10",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",style:{transform:g,transition:"transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1)"},children:[(0,s.jsx)("path",{d:r.y,transform:"translate(266,117)",fill:d}),(0,s.jsx)("svg",{x:"255",y:"102",width:"92",height:"47",viewBox:"255 102 92 47",children:(0,s.jsx)("path",{d:r.y,transform:"translate(266,117)",fill:"#CC3700"})}),"closed"===p.shape?(0,s.jsx)("line",{x1:p.cx-5,y1:p.cy,x2:p.cx+5,y2:p.cy,stroke:v,strokeWidth:"2.5",strokeLinecap:"round"}):"squint"===p.shape?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("path",{d:"M".concat(p.cx-5," ").concat(p.cy+1," Q").concat(p.cx," ").concat(p.cy-5," ").concat(p.cx+5," ").concat(p.cy+1),stroke:v,strokeWidth:"2.5",strokeLinecap:"round",fill:"none"}),p.hr>0&&(0,s.jsx)("circle",{cx:p.hx,cy:p.hy,r:.8*p.hr,fill:"white",opacity:"0.7"})]}):"heart"===p.shape?(0,s.jsx)("g",{transform:"translate(".concat(p.cx-5,", ").concat(p.cy-5,")"),children:(0,s.jsx)("path",{d:"M5 9 C5 9 0 5 0 3 C0 1 1.5 0 2.5 0 C3.5 0 5 1.5 5 3 C5 1.5 6.5 0 7.5 0 C8.5 0 10 1 10 3 C10 5 5 9 5 9Z",fill:"#EA0027"})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("circle",{cx:p.cx,cy:p.cy,r:p.r,fill:v}),p.hr>0&&(0,s.jsx)("circle",{cx:p.hx,cy:p.hy,r:p.hr,fill:"white"})]}),f&&(0,s.jsx)("circle",{cx:242,cy:135,r:8,fill:"#FF4500",opacity:"0.12"}),"thinking"===t&&(0,s.jsx)("line",{x1:254,y1:112,x2:264,y2:110,stroke:v,strokeWidth:"1.5",strokeLinecap:"round",opacity:"0.4"}),"sad"===t&&(0,s.jsx)("line",{x1:253,y1:114,x2:263,y2:112,stroke:v,strokeWidth:"1.5",strokeLinecap:"round",opacity:"0.35"}),"proud"===t&&(0,s.jsx)("line",{x1:253,y1:111,x2:263,y2:111,stroke:v,strokeWidth:"1.5",strokeLinecap:"round",opacity:"0.3"}),"coding"===t&&(0,s.jsxs)("g",{opacity:"0.25",stroke:v,strokeWidth:"1",fill:"none",children:[(0,s.jsx)("circle",{cx:255,cy:120,r:7}),(0,s.jsx)("line",{x1:262,y1:120,x2:265,y2:120})]}),"sleeping"===t&&(0,s.jsxs)("g",{opacity:"0.4",fill:v,children:[(0,s.jsx)("text",{x:"270",y:"108",fontSize:"12",fontWeight:"bold",fontFamily:"sans-serif",children:"z"}),(0,s.jsx)("text",{x:"280",y:"100",fontSize:"9",fontWeight:"bold",fontFamily:"sans-serif",children:"z"}),(0,s.jsx)("text",{x:"287",y:"94",fontSize:"7",fontWeight:"bold",fontFamily:"sans-serif",children:"z"})]}),"love"===t&&(0,s.jsxs)("g",{opacity:"0.4",children:[(0,s.jsx)("text",{x:"270",y:"105",fontSize:"10",fontFamily:"sans-serif",children:"â¤"}),(0,s.jsx)("text",{x:"282",y:"98",fontSize:"7",fontFamily:"sans-serif",children:"â¤"})]})]})]}),x&&(0,s.jsx)("p",{className:"text-center font-medium ".concat(b.caption," ").concat(h),children:x})]})}},26709:function(e,t,a){"use strict";a.d(t,{Z:function(){return c}});var s=a(85893);a(67294);var r=a(92761),n=a(79298),l=a(11163),i=a(67694);function c(e){let{title:t,subtitle:a,onPrimary:c,primaryLabel:o,showBack:d=!0}=e,x=(0,l.useRouter)(),{theme:h}=(0,i.F)();return(0,s.jsx)("div",{className:"md:hidden sticky top-12 z-40 px-3 py-2.5 transition-colors ".concat("dark"===h?"bg-[#1A1A1B] border-b border-[#343536]":"bg-white border-b border-[#
1EDEFF1]"),children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[d?(0,s.jsx)(n.hU,{onClick:()=>x.back(),icon:r.Z,"aria-label":"Back",variant:"ghost",size:"sm"}):(0,s.jsx)("div",{className:"w-9 h-9","aria-hidden":!0}),(0,s.jsxs)("div",{className:"flex-1 text-center min-w-0",children:[t&&(0,s.jsx)("div",{className:"font-semibold text-sm truncate ".concat("dark"===h?"text-white":"text-gray-900"),children:t}),a&&(0,s.jsx)("div",{className:"text-xs truncate ".concat("dark"===h?"text-[#818384]":"text-gray-500"),children:a})]}),(0,s.jsx)("div",{className:"flex-shrink-0 flex items-center justify-end",children:c?(0,s.jsx)(n.zx,{onClick:c,size:"sm",variant:"primary",className:"text-xs px-2.5 py-1.5 whitespace-nowrap",children:o||"Done"}):(0,s.jsx)("div",{className:"w-9 h-9","aria-hidden":!0})})]})})}},28562:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(63759).Z)("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]])},3192:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(63759).Z)("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]])},60493:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(63759).Z)("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},4307:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(63759).Z)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},50039:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(63759).Z)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},12779:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(63759).Z)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},47935:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(63759).Z)("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]])},36127:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(63759).Z)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},20113:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(63759).Z)("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]])},90437:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(63759).Z)("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]])},16290:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return E}});var s=a(85893),r=a(67294),n=a(9008),l=a.n(n),i=a(85412),c=a(26709),o=a(33299),d=a(67694),x=a(80893),h=a(2553),m=a(71707),u=a(4307),p=a(3192),g=a(50039),f=a(60493),y=a(28562),b=a(20113),v=a(90437),j=a(12779),k=a(47935),w=a(36127),N=a(41664),F=a.n(N),S=a(31111);function D(e){let t=String(e||"").trim();return!!t&&(t.startsWith("resume-jd-")||/^resume-\d{10,}$/.test(t))}function A(e,t,a,s){let r=(s-90)*Math.PI/180;return{x:e+a*Math.cos(r),y:t+a*Math.sin(r)}}function M(e){let{data:t,themeMode:a}=e,n="dark"===a,l="job-dash-hole-".concat((0,r.useId)().replace(/:/g,"")),[i,c]=(0,r.useState)(null),o=t.reduce((e,t)=>e+Math.max(0,t.value),0),d=(0,r.useMemo)(()=>{if(o<=0)return[];let e=0;return t.map((t,a)=>{let s=Math.max(0,t.value)/o*360,r=e,n=e+s;return e=n,{...t,idx:a,startDeg:r,endDeg:n,path:function(e,t,a,s,r,n){let l=n-r;if(l<.02)return"";let i=A(120,120,106,r),c=A(120,120,106,n),o=A(e,t,64,n),d=A(e,t,64,r),x=l>180?1:0;return["M ".concat(i.x," ").concat(i.y),"A ".concat(106," ").concat(s," 0 ").concat(x," 1 ").concat(c.x," ").concat(c.y),"L ".concat(o.x," ").concat(o.y),"A ".concat(64," ").concat(a," 0 ").concat(x," 0 ").concat(d.x," ").concat(d.y),"Z"].join(" ")}(120,120,64,106,r,n),pct:Math.round(t.value/o*1e3)/10}}).filter(e=>e.value>0)},[t,o]),x=n?"#0c0c0e":"#f8fafc",h=1===d.length&&d[0].value>0&&d[0].pct>=99.98,m=h&&d[0]?d[0].idx:-1;return(0,s.jsxs)("div",{className:"flex w-full flex-col items-stretch gap-6 sm:flex-row sm:items-center sm:justify-between sm:gap-8",children:[(0,s.jsxs)("div",{className:"relative mx-auto
1shrink-0",style:{width:240,height:240},children:[(0,s.jsx)("div",{className:"pointer-events-none absolute inset-0 rounded-full opacity-70 blur-xl ".concat(n?"bg-gradient-to-br from-orange-500/10 via-transparent to-blue-600/15":"bg-gradient-to-br from-sky-200/35 via-transparent to-violet-200/35")}),(0,s.jsxs)("svg",{width:240,height:240,viewBox:"0 0 ".concat(240," ").concat(240),className:"relative z-[1] drop-shadow-[0_16px_40px_rgba(0,0,0,0.35)]",role:"img","aria-label":"Distribution chart",children:[(0,s.jsx)("defs",{children:(0,s.jsxs)("linearGradient",{id:l,x1:"0",y1:"0",x2:"1",y2:"1",children:[(0,s.jsx)("stop",{offset:"0%",stopColor:n?"#29292c":"#ffffff",stopOpacity:1}),(0,s.jsx)("stop",{offset:"100%",stopColor:n?"#18181b":"#f1f5f9",stopOpacity:1})]})}),(0,s.jsx)("circle",{cx:120,cy:120,r:85,fill:"none",stroke:n?"#2d2d31":"#e2e8f0",strokeWidth:42,opacity:.45}),h&&d[0]?(0,s.jsx)("circle",{cx:120,cy:120,r:85,fill:"none",stroke:d[0].color,strokeWidth:42,strokeLinecap:"round",opacity:null!==i&&m>=0&&i!==m?.45:1,className:"cursor-default transition-opacity duration-200",onMouseEnter:()=>c(m),onMouseLeave:()=>c(null),children:(0,s.jsx)("title",{children:"".concat(d[0].name,": ").concat(d[0].value," (").concat(d[0].pct,"%)")})}):d.map(e=>(0,s.jsx)("path",{d:e.path,fill:e.color,stroke:x,strokeWidth:2,opacity:null===i?1:i===e.idx?1:.4,className:"cursor-default transition-opacity duration-200",onMouseEnter:()=>c(e.idx),onMouseLeave:()=>c(null),children:(0,s.jsx)("title",{children:"".concat(e.name,": ").concat(e.value," (").concat(e.pct,"%)")})},"arc-".concat(e.name,"-").concat(e.idx))),(0,s.jsx)("circle",{cx:120,cy:120,r:63,fill:"url(#".concat(l,")")}),(0,s.jsx)("text",{x:120,y:116,textAnchor:"middle",dominantBaseline:"middle",fill:n?"#ffffff":"#0f172a",fontSize:28,fontWeight:700,style:{letterSpacing:"-0.02em"},children:o}),(0,s.jsx)("text",{x:120,y:142,textAnchor:"middle",dominantBaseline:"middle",fill:n?"#9ca3af":"#64748b",fontSize:10,fontWeight:600,letterSpacing:2,children:"TOTAL"})]})]}),(0,s.jsx)("div",{className:"min-w-0 flex-1 space-y-3",children:t.map((e,t)=>{let a=o>0?Math.round(e.value/o*1e3)/10:0,r=null===i||i===t;return(0,s.jsxs)("div",{role:"button",tabIndex:0,className:"rounded-xl border px-3 py-3 text-left outline-none transition ".concat(r?n?"border-white/[0.10] bg-white/[0.04]":"border-slate-200 bg-slate-50":"border-transparent bg-transparent opacity-50"),onMouseEnter:()=>c(t),onMouseLeave:()=>c(null),onFocus:()=>c(t),onBlur:()=>c(null),children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,s.jsx)("span",{className:"h-2.5 w-10 shrink-0 rounded-full shadow-sm",style:{backgroundColor:e.color}}),(0,s.jsx)("span",{className:"truncate text-sm font-semibold ".concat(n?"text-[#eef0f1]":"text-slate-900"),children:e.name})]}),(0,s.jsxs)("div",{className:"shrink-0 text-right text-sm tabular-nums ".concat(n?"text-white":"text-slate-900"),children:[(0,s.jsx)("span",{className:"font-bold",children:e.value}),(0,s.jsxs)("span",{className:"ml-2 text-xs font-semibold ".concat(n?"text-[#9ca3af]":"text-slate-500"),children:[a,"%"]})]})]}),(0,s.jsx)("div",{className:"h-2 overflow-hidden rounded-full ".concat(n?"bg-black/35":"bg-slate-200/90"),children:(0,s.jsx)("div",{className:"h-full rounded-full transition-[width] duration-300",style:{width:"".concat(Math.min(a,100),"%"),backgroundColor:e.color,boxShadow:"0 0 12px rgba(255,135,62,0.25)"}})})]},"kpi-".concat(e.name,"-").concat(t))})})]})}function C(e){var t,a,r,n,l;let{app:i,theme:c,formatDate:o,getStatusBadge:d}=e,p="dark"===c,g=(null===(t=i.resumeSummary)||void 0===t?void 0:t.id)||i.resumeId||i.resumeUsed,f=null!==(n=i.matchScoreAtApply)&&void 0!==n?n:null===(a=i.resumeSummary)||void 0===a?void 0:a.matchScore,y=p?"text-[#818384]":"text-gray-500",b=null!==(l=i.isExternalJd)&&void 0!==l?l:D(i.jobId),v=function(e,t){let a=String(e||"").trim();if(!a||a.startsWith("/my-jobs")||D(t))return!1;try{let e=new URL(a),t=e.pathname.replace(/^\//,"");if(("jobs.trueresume.ai"===e.hostname||"www.jobs.trueresume.ai"===e.hostname)&&D(t))return!1;return"http:"===e.protocol||"https:"===e.protocol}catch(e){return!1}}(i.applyUrl,i.jobId),j=g?"/my-jobs/resume/".concat(g):v?i.applyUrl:null,k=[i.companyName||null,b?"Pasted JD":null,i.appliedAt||i.clickedAt?o(i.appliedAt||i.clickedAt||""):null,"auto"===i.applyMethod?"Smart Ap
1ply":"resume_builder"===i.applyMethod?"Tailored resume":null,(null===(r=i.jobDetails)||void 0===r?void 0:r.location)||null].filter(Boolean),w=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"shrink-0 flex h-7 w-7 items-center justify-center rounded-md ".concat(p?"bg-[#1a1a1c] text-[#FF4500]":"bg-orange-50 text-[#FF4500]"),children:(0,s.jsx)(x.Z,{className:"h-3.5 w-3.5"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,s.jsx)("span",{className:"truncate text-sm font-medium ".concat(p?"text-white":"text-gray-900"),children:i.jobTitle}),(0,s.jsx)("span",{className:"shrink-0 hidden sm:block",children:d(i)})]}),k.length>0&&(0,s.jsx)("p",{className:"truncate text-[11px] leading-tight mt-0.5 ".concat(y),children:k.join(" \xb7 ")})]})]});return(0,s.jsxs)("div",{className:"group flex items-center gap-2 px-2.5 py-2.5 sm:px-3 sm:py-2 min-h-[52px] transition-colors ".concat(p?"hover:bg-[#1e1e20]/70":"hover:bg-gray-50"),children:[j&&j.startsWith("/")?(0,s.jsx)(F(),{href:j,className:"flex min-w-0 flex-1 items-center gap-2.5",children:w}):j?(0,s.jsx)("a",{href:j,target:"_blank",rel:"noopener noreferrer",className:"flex min-w-0 flex-1 items-center gap-2.5",children:w}):(0,s.jsx)("div",{className:"flex min-w-0 flex-1 items-center gap-2.5",children:w}),(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-1",children:[(0,s.jsx)("span",{className:"shrink-0 sm:hidden",children:d(i,!0)}),"number"==typeof f&&f>0&&(0,s.jsxs)("span",{className:"text-[10px] font-bold tabular-nums px-1.5 py-0.5 rounded bg-emerald-500/15 text-emerald-600",children:[Math.round(f),"%"]}),g&&(0,s.jsx)(F(),{href:"/my-jobs/resume/".concat(g),title:"View tailored resume & job description",className:"p-2 rounded-md transition-colors min-w-[40px] min-h-[40px] inline-flex items-center justify-center ".concat(p?"text-[#818384] hover:bg-[#343536] hover:text-white":"text-gray-400 hover:bg-gray-100 hover:text-gray-700"),children:(0,s.jsx)(h.Z,{className:"h-4 w-4"})}),v&&(0,s.jsx)("a",{href:i.applyUrl,target:"_blank",rel:"noopener noreferrer",title:"Open original job posting",className:"p-2 rounded-md transition-colors min-w-[40px] min-h-[40px] inline-flex items-center justify-center ".concat(p?"text-[#818384] hover:bg-[#343536] hover:text-white":"text-gray-400 hover:bg-gray-100 hover:text-gray-700"),children:(0,s.jsx)(m.Z,{className:"h-4 w-4"})}),g?(0,s.jsx)(F(),{href:"/my-jobs/resume/".concat(g),className:"p-2 rounded-md transition-colors min-w-[40px] min-h-[40px] inline-flex items-center justify-center ".concat(p?"text-[#818384] group-hover:text-white":"text-gray-400 group-hover:text-gray-700"),"aria-label":"Open resume for ".concat(i.jobTitle),children:(0,s.jsx)(u.Z,{className:"h-4 w-4"})}):v?(0,s.jsx)("a",{href:i.applyUrl,target:"_blank",rel:"noopener noreferrer",className:"p-2 rounded-md transition-colors min-w-[40px] min-h-[40px] inline-flex items-center justify-center ".concat(p?"text-[#818384] group-hover:text-white":"text-gray-400 group-hover:text-gray-700"),"aria-label":"Open job posting for ".concat(i.jobTitle),children:(0,s.jsx)(u.Z,{className:"h-4 w-4"})}):(0,s.jsx)(u.Z,{className:"h-4 w-4 ".concat(y," opacity-40")})]})]})}var Z=()=>{var e,t,a,n,l,i;let{data:c}=(0,o.useSession)(),{theme:m}=(0,d.F)(),[N,D]=(0,r.useState)([]),[A,Z]=(0,r.useState)({total:0,clicked:0,applied:0,submitted:0,viewing:0,saved:0,viewed:0}),[E,T]=(0,r.useState)(0),[W,_]=(0,r.useState)(!0),[L,z]=(0,r.useState)(1),[B,P]=(0,r.useState)(1),[R,O]=(0,r.useState)(10),[J,U]=(0,r.useState)(0),[q,V]=(0,r.useState)("createdAt_desc"),[Y,H]=(0,r.useState)(""),[I,X]=(0,r.useState)(""),[G,Q]=(0,r.useState)("all"),[$,K]=(0,r.useState)(""),[ee,et]=(0,r.useState)(""),[ea,es]=(0,r.useState)("overview"),[er,en]=(0,r.useState)([]),[el,ei]=(0,r.useState)([]),ec=(0,r.useRef)(null),eo=(0,r.useRef)(()=>{});(0,r.useEffect)(()=>{z(1)},[G,R,q,Y,I,ee]),(0,r.useEffect)(()=>(ec.current&&clearTimeout(ec.current),ec.current=setTimeout(()=>{et($)},400),()=>{ec.current&&clearTimeout(ec.current)}),[$]),(0,r.useEffect)(()=>{ex()},[null==c?void 0:null===(e=c.user)||void 0===e?void 0:e.email,G,L,R,q,Y,I,ee]);let ed=(0,r.useCallback)(()=>{try{let e=localStorage.getItem("viewedJobs")||"[]",t=JSON.parse(e);T(Array.isArray(t)?t.length:0)}catch(e){T(0)}},[]);(0,r.useEffect)(()=>{ed();let e=e=>{("viewedJobs"===e.key||null===e.key)&&ed()};window.addEventListener("storage",e);let t=()=>ed();return window.addEventListener("jobStatsChanged",t),()=>{window.removeEventListener("storage",e),window.removeEventListener("jobStatsChanged",t)}},[ed]),(0,r.useEffect)(()=>{let e=null,t=e=>{try{let t=null;if(e.data?t=e.data:"applied_event"===e.key&&e.newValue&&(t=JSON.parse(e.newValue)),!t)return;("application_confirmed"===t.type||"application_click"===t.type)&&eo.current()}catch(e){}};try{"undefined"!=typeof BroadcastChannel&&(e=new BroadcastChannel("apply-events")).addEventListener("message",t)}catch(t){e=null}window.addEventListener("storage",t);let a=()=>{eo.current()};return window.addEventListener("jobStatsChanged",a),()=>{e&&e.close(),window.removeEventListener("storage",t),window.removeEventListener("jobStatsChanged",a)}},[]);let ex=async()=>{var e,t,a,s,r,n,l,i,o;if(!(null==c?void 0:null===(e=c.user)||void 0===e?void 0:e.email)){_(!1),D([]),U(0),P(1);return}_(!0);try{let e=new URLSearchParams;if(G&&"all"!==G&&e.set("status",G),e.set("page",String(L)),e.set("limit",String(R)),ee&&e.set("search",ee),q){let[t,a
1]=q.split("_");e.set("sortBy",t),e.set("order",a)}Y&&e.set("appliedFrom",Y),I&&e.set("appliedTo",I),e.set("includeResumes","true");let c="/api/jobs/my-jobs-dashboard?".concat(e.toString()),d=await fetch(c);if(d.ok){let e=await d.json(),c=(e.applications||[]).map(e=>({...e,status:"viewed"===e.status?"viewing":e.status}));D(c),U(e.total||c.length),P(e.pages||1),en(e.resumes||[]),ei(e.timeline||[]),e.stats?Z({total:e.stats.total||0,clicked:e.stats.clicked||0,applied:e.stats.applied||0,submitted:e.stats.submitted||0,viewing:e.stats.viewing||0,saved:null!==(a=e.stats.saved)&&void 0!==a?a:0,viewed:null!==(s=e.stats.viewed)&&void 0!==s?s:0,autoApplied:null!==(r=e.stats.autoApplied)&&void 0!==r?r:0,withResume:null!==(n=e.stats.withResume)&&void 0!==n?n:0,resumeCount:null!==(i=null!==(l=e.stats.resumeCount)&&void 0!==l?l:null===(t=e.resumes)||void 0===t?void 0:t.length)&&void 0!==i?i:0,withdrawn:null!==(o=e.stats.withdrawn)&&void 0!==o?o:0}):(console.warn("â ï¸ No stats in response, using total from pagination"),Z(t=>({...t,total:e.total||c.length})))}else console.error("Failed to fetch applications:",d.statusText),D([])}catch(e){console.error("Error fetching applications:",e),D([])}finally{_(!1)}};(0,r.useEffect)(()=>{eo.current=ex});let eh=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a="viewed"===e.status?"viewing":e.status;if("auto"===e.applyMethod&&"submitted"===a)return(0,s.jsxs)("div",{className:"flex items-center gap-1 ".concat(t?"px-1.5 py-0.5 text-[10px]":"gap-1.5 px-2.5 py-1 text-xs"," rounded-md border font-medium ").concat("dark"===m?"bg-orange-500/10 text-orange-400 border-orange-500/30":"bg-orange-50 text-orange-700 border-orange-200"),children:[(0,s.jsx)(p.Z,{className:t?"w-2.5 h-2.5":"w-3 h-3"}),"Auto applied"]});let r={clicked:{icon:g.Z,text:"Pending",color:"dark"===m?"bg-[#FF4500]/10 text-yellow-400 border-yellow-500/30":"bg-[#FFF1EE] text-[#CC3700] border-yellow-200"},viewing:{icon:g.Z,text:"Viewed",color:"dark"===m?"bg-blue-500/10 text-blue-400 border-blue-500/30":"bg-blue-50 text-blue-700 border-blue-200"},applied:{icon:f.Z,text:"Applied",color:"dark"===m?"bg-green-500/10 text-green-400 border-green-500/30":"bg-green-50 text-green-700 border-green-200"},submitted:{icon:f.Z,text:"Applied",color:"dark"===m?"bg-green-500/10 text-green-400 border-green-500/30":"bg-green-50 text-green-700 border-green-200"},withdrawn:{icon:g.Z,text:"Withdrawn",color:"dark"===m?"bg-gray-500/10 text-gray-400 border-gray-500/30":"bg-gray-50 text-gray-600 border-gray-200"}},n=r[a]||r.clicked,l=n.icon;return(0,s.jsxs)("div",{className:"flex items-center gap-1 ".concat(t?"px-1.5 py-0.5 text-[10px]":"gap-1.5 px-2.5 py-1 text-xs"," rounded-md border font-medium ").concat(n.color),children:[(0,s.jsx)(l,{className:t?"w-2.5 h-2.5":"w-3 h-3"}),n.text]})},em=e=>{let t=new Date(e),a=Math.floor((new Date().getTime()-t.getTime())/864e5);return 0===a?"Today":1===a?"Yesterday":a<7?"".concat(a," days ago"):a<30?"".concat(Math.floor(a/7)," weeks ago"):t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})},eu=A.applied,ep=A.clicked+A.viewing,eg=Math.max(0,A.total-ep-eu),ef=A.total>0?Math.round(eu/A.total*100):0,ey=Math.max(null!==(t=A.viewed)&&void 0!==t?t:0,E),eb=(0,r.useMemo)(()=>{let e=[{name:"Pending",value:ep,color:"#fb923c"},{name:"Applied",value:eu,color:"#34d399"}];return eg>0&&e.push({name:"Other statuses",value:eg,color:"#94a3b8"}),e.filter(e=>e.value>0)},[ep,eu,eg]),ev=(0,r.useMemo)(()=>[{name:"Saved",value:A.saved,color:"#38bdf8"},{name:"Viewed (board)",value:ey,color:"#c084fc"}].filter(e=>e.value>0),[A.saved,A.viewed,E]),ej=(0,r.useMemo)(()=>{if(el.length>=7)return el.map(e=>{var t;return{label:e.label,value:e.total,applied:e.applied,isToday:e.date===(null===(t=el[el.length-1])||void 0===t?void 0:t.date)}});let e=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],t=new Date;t.setHours(23,59,59,999);let a=[];for(let s=6;s>=0;s--){let r=new Date(t);r.setDate(t.getDate()-s);let n=new Date(r);n.setHours(0,0,0,0);let l=new Date(r);l.setHours(23,59,59,999);let i=N.filter(e=>{let t=new Date(e.appliedAt||e.clickedAt);return t>=n&&t<=l}).length;a.push({label:e[r.getDay()],value:i,isToday:0===s})}return a},[N,el]);(0,r.useMemo)(()=>{let e=new Date,t=[];for(let a=3;a>=0;a--){let s=new Date(e);s.setDate(e.getDate()-7*a);let r=new Date(s);r.setDate(s.getDate()-6),r.setHours(0,0,0,0),s.setHours(23,59,59,999);let n=N.filter(e=>{let t=new Date(e.appliedAt||e.clickedAt);return t>=r&&t<=s}).length;t.push(n)}return t},[N]);let ek=el.length?el.reduce((e,t)=>
1e+t.total,0):ej.reduce((e,t)=>e+t.value,0),ew=el.length?el.reduce((e,t)=>e+t.applied,0):0,eN=A.applied;return c?(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-xl sm:text-2xl font-bold ".concat("dark"===m?"text-white":"text-gray-900"),style:{fontFamily:"Rajdhani, sans-serif"},children:"My Jobs"}),(0,s.jsx)("p",{className:"text-sm mt-1 ".concat("dark"===m?"text-[#818384]":"text-gray-500"),children:"Application inventory, tailored resumes & pipeline analytics"})]}),(0,s.jsx)("div",{className:"grid grid-cols-3 gap-1 p-1 rounded-xl ".concat("dark"===m?"bg-[#1a1a1c]":"bg-gray-100"),children:[["overview","Overview"],["applications","Applications"],["resumes","Resumes (".concat(null!==(a=A.resumeCount)&&void 0!==a?a:er.length,")")]].map(e=>{let[t,a]=e;return(0,s.jsx)("button",{type:"button",onClick:()=>es(t),className:"px-2 sm:px-4 py-2 rounded-lg text-xs sm:text-sm font-semibold transition-all truncate ".concat(ea===t?"bg-[#FF4500] text-white shadow-md":"dark"===m?"text-[#D7DADC] hover:bg-[#272729]":"text-gray-600 hover:bg-white"),children:a},t)})}),"overview"===ea&&(0,s.jsxs)("div",{className:"p-3 sm:p-5 rounded-xl ".concat("dark"===m?"bg-[#272729] border border-[#343536]/30":"bg-white border border-gray-100 shadow-sm"),children:[(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-3 sm:flex sm:flex-wrap sm:justify-center sm:gap-6 lg:gap-10",children:[(0,s.jsxs)("div",{className:"flex flex-col items-center group",children:[(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsxs)("svg",{width:"80",height:"80",className:"transform -rotate-90",children:[(0,s.jsx)("circle",{cx:"40",cy:"40",r:"34",strokeWidth:"5",fill:"none",className:"dark"===m?"stroke-[#343536]":"stroke-gray-100"}),(0,s.jsx)("circle",{cx:"40",cy:"40",r:"34",strokeWidth:"5",fill:"none",strokeLinecap:"round",className:ef>=50?"stroke-emerald-500":ef>=25?"stroke-[#FF4500]":"stroke-blue-500",strokeDasharray:214,strokeDashoffset:214-ef/100*214,style:{transition:"stroke-dashoffset 0.6s ease"}})]}),(0,s.jsx)("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:(0,s.jsxs)("span",{className:"text-lg font-semibold tabular-nums ".concat(ef>=50?"dark"===m?"text-emerald-400":"text-emerald-600":ef>=25?"text-[#FF4500]":"dark"===m?"text-blue-400":"text-blue-600"),children:[ef,"%"]})})]}),(0,s.jsx)("span",{className:"text-[11px] font-medium mt-2 text-center ".concat("dark"===m?"text-[#818384]":"text-gray-500"),children:"Apply Rate"})]}),(0,s.jsxs)("div",{className:"flex flex-col items-center group",children:[(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsxs)("svg",{width:"80",height:"80",className:"transform -rotate-90",children:[(0,s.jsx)("circle",{cx:"40",cy:"40",r:"34",strokeWidth:"5",fill:"none",className:"dark"===m?"stroke-[#343536]":"stroke-gray-100"}),(0,s.jsx)("circle",{cx:"40",cy:"40",r:"34",strokeWidth:"5",fill:"none",strokeLinecap:"round",className:"stroke-[#0079D3]",strokeDasharray:214,strokeDashoffset:214-(ey+A.saved>0?ey/(ey+A.saved):0)*214,style:{transition:"stroke-dashoffset 0.6s ease"}})]}),(0,s.jsx)("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:(0,s.jsx)("span",{className:"text-lg font-semibold tabular-nums ".concat("text-[#0079D3]"),children:ey})})]}),(0,s.jsxs)("span",{className:"text-[11px] font-medium mt-2 text-center max-w-[92px] leading-tight ".concat("dark"===m?"text-[#818384]":"text-gray-500"),children:["Board views",(0,s.jsx)("span",{className:"block text-[9px] font-normal mt-0.5 opacity-80",children:"Synced + browser"})]})]}),(0,s.jsxs)("div",{className:"flex flex-col items-center group",children:[(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsxs)("svg",{width:"80",height:"80",className:"transform -rotate-90",children:[(0,s.jsx)("circle",{cx:"40",cy:"40",r:"34",strokeWidth:"5",fill:"none",className:"dark"===m?"stroke-[#343536]":"stroke-gray-100"}),(0,s.jsx)("circle",{cx:"40",cy:"40",r:"34",strokeWidth:"5",fill:"none",strokeLinecap:"round",className:"stroke-emerald-500",strokeDasharray:214,strokeDashoffset:214-(A.total>0?eu/A.total*214:0),style:{transition:"stroke-dashoffset 0.6s ease"}})]}),(0,s.jsx)("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:(0,s.jsx)("span",{className:"text-lg font-semibold tabular-nums ".concat("dark"===m?"text-emerald-400":"text-emerald-600"),children:eu})})]}
1),(0,s.jsx)("span",{className:"text-[11px] font-medium mt-2 text-center ".concat("dark"===m?"text-[#818384]":"text-gray-500"),children:"Applied Jobs"})]}),(0,s.jsxs)("div",{className:"flex flex-col items-center group",children:[(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsxs)("svg",{width:"80",height:"80",className:"transform -rotate-90",children:[(0,s.jsx)("circle",{cx:"40",cy:"40",r:"34",strokeWidth:"5",fill:"none",className:"dark"===m?"stroke-[#343536]":"stroke-gray-100"}),(0,s.jsx)("circle",{cx:"40",cy:"40",r:"34",strokeWidth:"5",fill:"none",strokeLinecap:"round",className:"stroke-[#FF4500]",strokeDasharray:214,strokeDashoffset:214-(A.total>0?ep/A.total*214:0),style:{transition:"stroke-dashoffset 0.6s ease"}})]}),(0,s.jsx)("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:(0,s.jsx)("span",{className:"text-lg font-semibold tabular-nums ".concat("text-[#FF4500]"),children:ep})})]}),(0,s.jsx)("span",{className:"text-[11px] font-medium mt-2 text-center ".concat("dark"===m?"text-[#818384]":"text-gray-500"),children:"Pending Action"})]}),(0,s.jsxs)("div",{className:"flex flex-col items-center group",children:[(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsxs)("svg",{width:"80",height:"80",className:"transform -rotate-90",children:[(0,s.jsx)("circle",{cx:"40",cy:"40",r:"34",strokeWidth:"5",fill:"none",className:"dark"===m?"stroke-[#343536]":"stroke-gray-100"}),(0,s.jsx)("circle",{cx:"40",cy:"40",r:"34",strokeWidth:"5",fill:"none",strokeLinecap:"round",className:"stroke-[#FF4500]",strokeDasharray:214,strokeDashoffset:214-214*Math.min(ek/10,1),style:{transition:"stroke-dashoffset 0.6s ease"}})]}),(0,s.jsx)("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:(0,s.jsx)("span",{className:"text-lg font-semibold tabular-nums ".concat("text-[#FF4500]"),children:ek})})]}),(0,s.jsx)("span",{className:"text-[11px] font-medium mt-2 text-center ".concat("dark"===m?"text-[#818384]":"text-gray-500"),children:"This Week"})]}),(0,s.jsxs)("div",{className:"flex flex-col items-center group",children:[(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsxs)("svg",{width:"80",height:"80",className:"transform -rotate-90",children:[(0,s.jsx)("circle",{cx:"40",cy:"40",r:"34",strokeWidth:"5",fill:"none",className:"dark"===m?"stroke-[#343536]":"stroke-gray-100"}),(0,s.jsx)("circle",{cx:"40",cy:"40",r:"34",strokeWidth:"5",fill:"none",strokeLinecap:"round",className:"stroke-orange-500",strokeDasharray:214,strokeDashoffset:214-214*Math.min(eN/30,1),style:{transition:"stroke-dashoffset 0.6s ease"}})]}),(0,s.jsx)("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:(0,s.jsx)("span",{className:"text-lg font-semibold tabular-nums ".concat("dark"===m?"text-[#FF4500]":"text-[#E03D00]"),children:eN})})]}),(0,s.jsx)("span",{className:"text-[11px] font-medium mt-2 text-center ".concat("dark"===m?"text-[#818384]":"text-gray-500"),children:"This Month"})]})]}),(0,s.jsxs)("p",{className:"mt-4 text-center text-xs max-w-2xl mx-auto ".concat("dark"===m?"text-[#818384]":"text-gray-500"),children:["Rings use your saved application pipeline; ",(0,s.jsx)("strong",{className:"font-medium",children:"Board views"})," merges your account-wide history with this browser."," ",(0,s.jsx)("strong",{className:"font-medium",children:"Saved"})," counts are from your account."]}),(0,s.jsxs)("div",{className:"mt-6 grid grid-cols-1 lg:grid-cols-2 gap-6 items-stretch",children:[(0,s.jsxs)("div",{className:"rounded-xl shadow-sm ring-1 ".concat("dark"===m?"bg-[#1e1e20] ring-white/[0.06]":"bg-white ring-slate-200/90"),children:[(0,s.jsx)("div",{className:"px-4 py-3 border-b ".concat("dark"===m?"border-[#343536]/80 bg-[#252528]/60":"border-slate-100 bg-slate-50/80"),children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg ".concat("dark"===m?"bg-[#0079D3]/15 text-[#5eb5f8]":"bg-sky-100 text-sky-700"),children:(0,s.jsx)(y.Z,{className:"w-4 h-4"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-semibold ".concat("dark"===m?"text-white":"text-slate-900"),children:"Application pipeline"}),(0,s.jsx)("p",{className:"text-xs ".concat("dark"===m?"text-[#9ca3af]":"text-slate-500"),children:"Pending, applied & other statuses"})]})]})}),(0,s.jsx)("div",{className:"p-4",children:0===eb.length?(0,s.jsxs)("div",{className:"h-[200px] flex flex-col items-center justify-center gap-2 text-center text-sm ".concat("dark"===m?"text-[#818384]":"text-gray-500"),children:[(0,s.jsx)("span",{children:"No application data yet."}),(0,s.jsx)("span",{className:"text-xs max-w-[240px] opacity-90",children:"Open jobs from the Jobs board â your funnel appears here automatically."})]}):(0,s.jsx)(M,{data:eb,themeMode:m})})]}),(0,s.jsxs)("div",{className:"rounded-xl shadow-sm ring-1 ".concat("dark"===m?"bg-[#1e1e20] ring-white/[0.06]":"bg-white ring-slate-200/90"),children:[(0,s.jsx)("div",{className:"px-4 py-3 border-b ".concat("dark"===m?"border-[#343536]/80 bg-[#252528]/60":"border-slate-100 bg-slate-50/80"),children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg ".concat("dark"===m?"bg-violet-500/15 text-violet-300":"bg-violet-100 text-violet-700"),children:(0,s.jsx)(b.Z,{className:"w-4 h-4"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-semibold ".concat("dark"===m?"text-white":"text-slate-900"),children:"Board activity"}),(0,s.jsx)("p",{className:"text-xs ".concat("dark"===m?"text-[#9ca3af]":"text-slate-500"),children:"Saved jobs vs viewed cards (server + this browser)"})]})]})}),(0,s.jsx)("div",{className:"p-4",children:0===ev.length?(0,s.jsxs)("div",{className:"h-[200px] flex flex-col items-center justify-center gap-2 text-center text-sm ".concat("dark"===m?"text-[#818384]":"text-gray-500"),children:[(0,s.jsx)("span",{children:"No saved or viewed stats yet."}),(0,s.jsx)("span",{className:"text-xs max-w-[240px] opacity-90",children:"Bookmark roles or tap job cards â this chart fills in instantly."})]}):(0,s.jsx)(M,{data:ev,themeMode:m})})]})]}),(0,s.jsxs)("div",{className:"mt-6 rounded-xl border p-4 ".concat("dark"===m?"border-[#343536]/50 bg-[#1e1e20]":"border-slate-200 bg-slate-50/50"),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4 gap-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(v.Z,{className:"w-4 h-4 text-[#FF4500]"}),(0,s.jsx)("h3",{className:"text-sm font-semibold ".concat("dark"===m?"text-white":"text-slate-900"),children:"7-day activity"})]}),(0,s.jsxs)("span",{className:"text-xs ".concat("dark"===m?"text-[#818384]":"text-gray-500"),children:[ek," tracked \xb7 ",ew," applied"]})]}),(0,s.jsx)("div",{className:"flex items-end justify-between gap-2 h-24",children:ej.map((e,t)=>{let a=Math.max(...ej.map(e=>e.value),1),r=Math.max(8,e.value/a*100);return(0,s.jsxs)("div",{className:"flex-1 flex flex-col items-center gap-1",children:[(0,s.jsx)("div",{className:"w-full rounded-t-md transition-all ".concat(e.isToday?"bg-[#FF4500]":"dark"===m?"bg-[#0079D3]/70":"bg-sky-4
100"),style:{height:"".concat(r,"%"),minHeight:e.value>0?8:4},title:"".concat(e.value," activities")}),(0,s.jsx)("span",{className:"text-[10px] font-medium ".concat(e.isToday?"text-[#FF4500]":"dark"===m?"text-[#818384]":"text-gray-500"),children:e.label})]},t)})})]}),(0,s.jsx)("div",{className:"mt-4 grid grid-cols-2 sm:grid-cols-4 gap-3",children:[{label:"Tailored resumes",value:null!==(n=A.resumeCount)&&void 0!==n?n:er.length,icon:h.Z},{label:"Apps with resume",value:null!==(l=A.withResume)&&void 0!==l?l:0,icon:x.Z},{label:"Smart Apply",value:null!==(i=A.autoApplied)&&void 0!==i?i:0,icon:p.Z},{label:"Saved jobs",value:A.saved,icon:b.Z}].map(e=>{let{label:t,value:a,icon:r}=e;return(0,s.jsxs)("div",{className:"rounded-lg px-3 py-2.5 ".concat("dark"===m?"bg-[#1e1e20] border border-[#343536]/40":"bg-white border border-gray-100"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 mb-1",children:[(0,s.jsx)(r,{className:"w-3.5 h-3.5 text-[#FF4500]"}),(0,s.jsx)("span",{className:"text-[10px] uppercase tracking-wide font-semibold ".concat("dark"===m?"text-[#818384]":"text-gray-500"),children:t})]}),(0,s.jsx)("div",{className:"text-xl font-bold tabular-nums ".concat("dark"===m?"text-white":"text-gray-900"),children:a})]},t)})})]}),"resumes"===ea&&(0,s.jsx)("div",{className:"space-y-4",children:0===er.length?(0,s.jsxs)("div",{className:"text-center py-12 rounded-2xl border-2 border-dashed ".concat("dark"===m?"border-[#343536] bg-[#272729]/30":"border-gray-300 bg-gray-50"),children:[(0,s.jsx)(h.Z,{className:"w-10 h-10 mx-auto mb-3 ".concat("dark"===m?"text-[#818384]":"text-gray-400")}),(0,s.jsx)("h3",{className:"text-lg font-semibold mb-2 ".concat("dark"===m?"text-white":"text-gray-900"),children:"No saved resumes yet"}),(0,s.jsx)("p",{className:"text-sm mb-4 ".concat("dark"===m?"text-[#818384]":"text-gray-600"),children:"Generate a tailored resume from a job description â it appears here with the JD it was built for."}),(0,s.jsx)(F(),{href:"/create-resume",className:"inline-flex items-center gap-2 px-4 py-2 rounded-lg bg-[#FF4500] text-white text-sm font-semibold",children:"Create tailored resume"})]}):(0,s.jsx)("div",{className:"rounded-lg border overflow-hidden ".concat("dark"===m?"bg-[#272729] border-[#343536]":"bg-white border-gray-200"),children:(0,s.jsx)("div",{className:"".concat("dark"===m?"divide-y divide-[#343536]":"divide-y divide-gray-100"),children:er.map(e=>{var t;let a=[e.companyName||null,e.createdAt?em(e.createdAt):null,e.template?e.template.replace(/-/g," "):null,(null!==(t=e.linkedApplications)&&void 0!==t?t:0)>0?"".concat(e.linkedApplications," app").concat(1===e.linkedApplications?"":"s"):null].filter(Boolean);return(0,s.jsxs)("div",{className:"group flex items-center gap-2 px-2.5 py-2 sm:px-3 transition-colors ".concat("dark"===m?"hover:bg-[#1e1e20]/70":"hover:bg-gray-50"),children:[(0,s.jsxs)(F(),{href:"/my-jobs/resume/".concat(e.id),className:"flex min-w-0 flex-1 items-center gap-2.5",children:[(0,s.jsx)("span",{className:"shrink-0 flex h-7 w-7 items-center justify-center rounded-md ".concat("dark"===m?"bg-[#1a1a1c] text-[#FF4500]":"bg-orange-50 text-[#FF4500]"),children:(0,s.jsx)(h.Z,{className:"h-3.5 w-3.5"})}),(0,s.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,s.jsx)("span",{className:"block truncate text-sm font-medium leading-tight ".concat("dark"===m?"text-white":"text-gray-900"),children:e.jobTitle}),a.length>0&&(0,s.jsx)("span",{className:"block truncate text-[11px] leading-tight mt-0.5 ".concat("dark"===m?"text-[#818384]":"text-gray-500"),children:a.join(" \xb7 ")})]})]}),(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-1",children:["number"==typeof e.matchScore&&e.matchScore>0&&(0,s.jsxs)("span",{className:"text-[10px] font-bold tabular-nums px-1.5 py-0.5 rounded bg-emerald-500/15 text-emerald-600",children:[Math.round(e.matchScore),"%"]}),e.pdfUrl&&(0,s.jsx)("a",{href:e.pdfUrl,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),title:"Download saved PDF",className:"p-1.5 rounded-md transition-colors ".concat("dark"===m?"text-[#818384] hover:bg-[#343536] hover:text-white":"text-gray-400 hover:bg-gray-100 hover:text-gray-700"),children:(0,s.jsx)(j.Z,{className:"h-3.5 w-3.5"})}),(0,s.jsx)(F(),{href:"/my-jobs/resume/".concat(e.id),className:"p-1 rounded-md transition-colors ".concat("dark"===m?"text-[#818384] group-hover:text-white":"text-gray-400 group-hover:text-gray-700"),"aria-label":"Open resume for ".concat(e.jobTitle),children:(0,s.jsx)(u.Z,{className:"h-4 w-4"})})]})]},e.id)})})})}),"overview"===ea&&N.length>0&&(0,s.jsxs)("div",{className:"rounded-lg border overflow-hidden ".concat("dark"===m?"bg-[#272729] border-[#343536]":"bg-white border-gray-200"),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 border-b ".concat("dark"===m?"border-[#343536] bg-[#1e1e20]":"border-gray-100 bg-gray-50"),children:[(0,s.jsx)("h3",{className:"text-xs font-semibold uppercase tracking-wide ".concat("dark"===m?"text-[#818384]":"text-gray-500"),children:"Recent activity"}),(0,s.jsx)("button",{type:"button",onClick:()=>es("applications"),className:"text-xs font-semibold text-[#FF4500] hover:underline",children:"View all"})]}),(0,s.jsx)("div",{className:"dark"===m?"divide-y divide-[#343536]":"divide-y divide-gray-100",children:N.slice(0,5).map(e=>(0,s.jsx)(C,{app:e,theme:m,formatDate:em,getStatusBadge:eh},e._id))})]}),"applications"===ea&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3",children:[(0,s.jsxs)("div",{className:"relative flex-1 sm:max-w-[200px]",children:[(0,s.jsx)("div",{className:"absolute left-3 top-0 bottom-0 flex items-center",children:(0,s.jsx)(k.Z,{className:"w-4 h-4 ".concat("dark"===m?"text-[#818384]":"text-gray-400")})}),(0,s.jsxs)("select",{value:G,onChange:e=>Q(e.target.value),className:"w-full pl-10 pr-4 py-2 rounded-lg border text-sm transition-colors ".concat("dark"===m?"bg-[#272729] border-[#343536] text-white focus:border-blue-500":"bg-white border-gray-300/50 text-gray-900 focus:border-blue-500"," focus:outline-none focus:ring-2 focus:ring-[#FF4500]/20"),children:[(0,s.jsx)("option",{value:"all",children:"All Jobs"}),(0,s.jsx)("option",{value:"applied",children:"Applied"}),(0,s.jsx)("option",{value:"clicked",children:"Pending"})]})]}),(0,s.jsxs)("div",{className:"relative flex-1",children:[(0,s.jsx)("div",{className:"absolute left-3 top-0 bottom-0 flex items-center",children:(0,s.jsx)(w.Z,{className:"w-4 h-4 ".concat("dark"===m?"text-[#818384]":"text-gray-400")})}),(0,s.jsx)("input",{type:"text",placeholder:"Search jobs...",value:$,onChange:e=>K(e.target.value),"aria-label":"Search applications by title or company",className:"w-full pl-10 pr-4 py-2 rounded-lg border text-sm transition-colors ".concat("dark"===m?"bg-[#272729] border-[#343536] text-white placeholder-[#818384] focus:border-blue-500":"bg-white border-gray-300/50 text-gray-900 placeholder-gray-400 focus:border-blue-500"," focus:outline-none focus:ring-2 focus:ring-[#FF4500]/20")})]})]}),(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row sm:flex-wrap sm:items-center gap-2",children:[(0,s.jsxs)("select",{value:q,onChange:e=>V(e.target.value),className:"w-full sm:flex-1 sm:flex-none sm:min-w-0 px-3 py-2 rounded-lg border text-sm transition-colors ".concat("dark"===m?"bg-[#272729] border-[#343536] text-[#D7DADC] focu
1s:ring-[#FF4500]":"bg-white border-[#EDEFF1] text-gray-800 focus:ring-blue-300"," focus:outline-none focus:ring-2"),"aria-label":"Sort applications",children:[(0,s.jsx)("option",{value:"createdAt_desc",children:"Newest first"}),(0,s.jsx)("option",{value:"createdAt_asc",children:"Oldest first"}),(0,s.jsx)("option",{value:"appliedAt_desc",children:"Applied (new)"}),(0,s.jsx)("option",{value:"appliedAt_asc",children:"Applied (old)"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2 sm:contents",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,s.jsx)("label",{className:"text-xs whitespace-nowrap shrink-0 ".concat("dark"===m?"text-[#818384]":"text-gray-500"),children:"From"}),(0,s.jsx)("input",{type:"date",value:Y,onChange:e=>H(e.target.value),className:"w-full min-w-0 px-2 py-2 rounded-lg border text-sm transition-colors ".concat("dark"===m?"bg-[#272729] border-[#343536] text-white":"bg-white border-[#EDEFF1] text-gray-800"," focus:outline-none focus:ring-2 focus:ring-blue-400"),"aria-label":"Applied from date"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,s.jsx)("label",{className:"text-xs whitespace-nowrap shrink-0 ".concat("dark"===m?"text-[#818384]":"text-gray-500"),children:"To"}),(0,s.jsx)("input",{type:"date",value:I,onChange:e=>X(e.target.value),className:"w-full min-w-0 px-2 py-2 rounded-lg border text-sm transition-colors ".concat("dark"===m?"bg-[#272729] border-[#343536] text-white":"bg-white border-[#EDEFF1] text-gray-800"," focus:outline-none focus:ring-2 focus:ring-blue-400"),"aria-label":"Applied to date"})]})]})]})]}),W?(0,s.jsx)("div",{className:"text-center py-12",children:(0,s.jsx)("div",{className:"inline-block w-8 h-8 border-4 border-blue-500 border-t-transparent rounded-full animate-spin"})}):0===N.length?(0,s.jsxs)("div",{className:"text-center py-12 rounded-2xl border-2 border-dashed ".concat("dark"===m?"border-[#343536] bg-[#272729]/30":"border-gray-300 bg-gray-50"),children:[(0,s.jsx)(S.Z,{mood:"waving",size:"lg",fill:"dark"===m?"#94a3b8":"#9ca3af",className:"mx-auto mb-4"}),(0,s.jsx)("h3",{className:"text-lg font-semibold mb-2 ".concat("dark"===m?"text-white":"text-gray-900"),children:"No Applications Yet"}),(0,s.jsx)("p",{className:"text-sm ".concat("dark"===m?"text-[#818384]":"text-gray-600"),children:$?"No applications match your search":"Start applying to jobs to track them here"})]}):(0,s.jsx)("div",{className:"rounded-lg border overflow-hidden ".concat("dark"===m?"bg-[#272729] border-[#343536]":"bg-white border-gray-200"),children:(0,s.jsx)("div",{className:"dark"===m?"divide-y divide-[#343536]":"divide-y divide-gray-100",children:N.map(e=>(0,s.jsx)(C,{app:e,theme:m,formatDate:em,getStatusBadge:eh},e._id))})}),(0,s.jsxs)("div",{className:"mt-6 flex flex-col sm:flex-row items-stretch sm:items-center justify-between gap-4",children:[(0,s.jsxs)("div",{className:"hidden sm:flex items-center gap-2",children:[(0,s.jsx)("label",{className:"text-sm ".concat("dark"===m?"text-[#D7DADC]":"text-gray-700"),children:"Page size"}),(0,s.jsxs)("select",{value:R,onChange:e=>O(Number(e.target.value)),"aria-label":"Page size",className:"px-2 py-1 rounded border transition-colors ".concat("dark"===m?"bg-[#272729] border-[#343536] text-white":"bg-white border-[#EDEFF1] text-gray-800"," focus:outline-none focus:ring-2 focus:ring-blue-400"),children:[(0,s.jsx)("option",{value:10,children:"10"}),(0,s.jsx)("option",{value:20,children:"20"}),(0,s.jsx)("option",{value:50,children:"50"})]}),(0,s.jsxs)("div",{className:"text-sm ml-3 ".concat("dark"===m?"text-[#818384]":"text-gray-500"),children:["Total: ",J]})]}),(0,s.jsxs)("div",{className:"sm:hidden text-center text-sm ".concat("dark"===m?"text-[#818384]":"text-gray-500"),children:["Showing ",N.length," of ",J," jobs"]}),(0,s.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,s.jsx)("button",{onClick:()=>z(e=>Math.max(1,e-1)),disabled:1===L,className:"px-3 py-1.5 rounded-lg text-sm font-medium transition-all disabled:opacity-40 ".concat("dark"===m?"bg-[#343536] hover:bg-[#343536] text-white":"bg-gray-200 hover:bg-gray-300 text-gray-700"),"aria-label":"Previous page",children:"Prev"}),(0,s.jsxs)("div",{className:"px-3 py-1.5 text-sm font-medium ".concat("dark"===m?"text-[#D7DADC]":"text-gray-600"),children:[L," / ",B]}),(0,s.jsx)("button",{onClick:()=>z(e=>Math.min(B,e+1)),disabled:L===B,className:"px-3 py-1.5 rounded-lg text-sm font-medium transition-all disabled:opacity-40 ".concat("dark"===m?"bg-[#343536] hover:bg-[#343536] text-white":"bg-gray-200 hover:bg-gray-300 text-gray-700"),"aria-label":"Next page",children:"Next"})]})]})]})]}):(0,s.jsx)("div",{className:"text-center py-12 ".concat("dark"===m?"text-[#818384]":"text-gray-600"),children:"Please log in to view your applied jobs"})};function E(){let{theme:e}=(0,d.F)();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(l(),{children:[(0,s.jsx)("title",{children:"My Jobs â Applied Jobs | TrueResume"}),(0,s.jsx)("meta",{name:"description",content:"Track your applications and manage applied jobs"})]}),(0,s.jsx)(i.Z,{}),(0,s.jsx)(c.Z,{title:"My jobs",subtitle:"Your application inventory"}),(0,s.jsx)("div",{className:"min-h-screen pt-12 sm:pt-16 pb-[calc(4.5rem+env(safe-area-inset-bottom,0px))] md:pb-8 transition-colors duration-300 ".concat("dark"===e?"bg-[#030303]":"bg-transparent"),children:(0,s.jsx)("div",{className:"max-w-7xl mx-auto px-3 sm:px-6 lg:px-8 py-4 sm:py-8",children:(0,s.jsx)("div",{className:"grid grid-cols-1 gap-6",children:(0,s.jsx)(Z,{})})})})]})}}},function(e){e.O(0,[4968,1296,5412,2888,9774,179],function(){return e(e.s=29133)}),_N_E=e.O()}]);
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.