1import{r as x,j as e}from"./animation-CddyXVCz.js";import{r as f}from"./index-PGJMoIYN.js";import{u as y,B as h,bv as g,a3 as j,X as b}from"./index-DnWsV7cE.js";import{c as w}from"./clipboard-C0L7pyCw.js";import"./react-vendor-CbN3pvl2.js";import"./supabase-iKSPld20.js";import"./docgen-Bp8WKBAE.js";import"./query-DPqpbKNH.js";const v=p=>{const s=p.split(` 2`),n=[];let d=[];const o=()=>{d.length!==0&&(n.push({type:"p",content:d.join(" ").trim()}),d=[])};let a=0;for(;a<s.length;){const r=s[a].trim();if(!r){o(),a+=1;continue}if(r.startsWith("### ")){o(),n.push({type:"h3",content:r.slice(4).trim()}),a+=1;continue}if(r.startsWith("## ")){o(),n.push({type:"h2",content:r.slice(3).trim()}),a+=1;continue}if(r.startsWith("# ")){o(),n.push({type:"h1",content:r.slice(2).trim()}),a+=1;continue}if(r.startsWith("- ")||r.startsWith("* ")){o();const l=[];for(;a<s.length;){const c=s[a].trim();if(!c.startsWith("- ")&&!c.startsWith("* "))break;l.push(c.slice(2).trim()),a+=1}n.push({type:"ul",items:l});continue}if(/^\d+\.\s/.test(r)){o();const l=[];for(;a<s.length;){const c=s[a].trim();if(!/^\d+\.\s/.test(c))break;l.push(c.replace(/^\d+\.\s/,"").trim()),a+=1}n.push({type:"ol",items:l});continue}d.push(r),a+=1}return o(),n},D=({isOpen:p,onClose:s,markdown:n,currentRole:d,targetRole:o,onRegenerate:a,isRegenerating:r=!1})=>{const{toast:l}=y(),c=x.useMemo(()=>v(n),[n]);if(x.useEffect(()=>{if(!p)return;const t=i=>{i.key==="Escape"&&s()};return document.addEventListener("keydown",t),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow="unset"}},[p,s]),!p||typeof document>"u")return null;const u=async()=>{try{await w(n),l.success("Roadmap copied","The roadmap markdown is on your clipboard.")}catch(t){const i=t instanceof Error?t.message:"Copy failed";l.error("Could not copy roadmap",i)}};return f.createPortal(e.jsxs("div",{className:"fixed inset-0 z-50 bg-black/60",onClick:s,children:[e.jsx("style",{children:` 3 @media print { 4 .career-roadmap-chrome { 5 display: none !important; 6 } 7 .career-roadmap-shell { 8 position: static !important; 9 inset: auto !important; 10 max-height: none !important; 11 border: none !important; 12 box-shadow: none !important; 13 background: white !important; 14 } 15 .career-roadmap-body { 16 overflow: visible !important; 17 padding: 0 !important; 18 } 19 } 20 `}),e.jsx("div",{className:"flex min-h-full items-center justify-center px-4 py-6 sm:px-6",onClick:t=>t.stopPropagation(),children:e.jsxs("div",{className:"career-roadmap-shell flex max-h-[92vh] w-full max-w-5xl flex-col overflow-hidden rounded-[28px] border border-slate-200 bg-white shadow-2xl dark:border-slate-700 dark:bg-slate-900 animate-in fade-in duration-300",children:[e.jsxs("div",{className:"career-roadmap-chrome flex flex-wrap items-center justify-between gap-3 border-b border-slate-200 bg-white/95 px-6 py-4 backdrop-blur dark:border-slate-700 dark:bg-slate-900/95",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-[0.2em] text-indigo-600 dark:text-indigo-300",children:"Career Roadmap"}),e.jsxs("h2",{className:"mt-1 text-2xl font-bold text-slate-900 dark:text-slate-100",children:[d||"Current Role"," to ",o||"Target Role"]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(h,{variant:"outline",onClick:()=>window.print(),leftIcon:e.jsx(g,{className:"h-4 w-4"}),children:"Print / Save as PDF"}),e.jsx(h,{variant:"outline",onClick:()=>{u()},leftIcon:e.jsx(j,{className:"h-4 w-4"}),children:"Copy to Clipboard"}),a&&e.jsx(h,{variant:"primary",onClick:a,loading:r,children:"Regenerate"}),e.jsx(h,{variant:"ghost",size:"sm",className:"h-auto rounded-full p-2",onClick:s,"aria-label":"Close roadmap",children:e.jsx(b,{className:"h-5 w-5"})})]})]}),e.jsx("div",{className:"career-roadmap-body flex-1 overflow-y-auto px-6 py-8 sm:px-10",children:e.jsx("article",{className:"mx-auto max-w-3xl space-y-5 text-slate-700 dark:text-slate-300",children:c.map((t,i)=>t.type==="h1"?e.jsx("h1",{className:"text-4xl font-bold tracking-tight text-slate-950 dar
20k:text-slate-50",children:t.content},i):t.type==="h2"?e.jsx("h2",{className:"pt-4 text-2xl font-bold text-slate-900 dark:text-slate-100",children:t.content},i):t.type==="h3"?e.jsx("h3",{className:"pt-2 text-lg font-semibold text-indigo-700 dark:text-indigo-300",children:t.content},i):t.type==="ul"?e.jsx("ul",{className:"space-y-2 pl-5 text-sm leading-7 text-slate-700 marker:text-blue-600 dark:text-slate-300",children:t.items.map(m=>e.jsx("li",{className:"list-disc",children:m},m))},i):t.type==="ol"?e.jsx("ol",{className:"space-y-2 pl-5 text-sm leading-7 text-slate-700 dark:text-slate-300",children:t.items.map(m=>e.jsx("li",{className:"list-decimal",children:e.jsx("span",{children:m})},m))},i):t.type==="p"?e.jsx("p",{className:"text-sm leading-8 text-slate-700 dark:text-slate-300",children:t.content},i):null)})})]})})]}),document.body)};export{D as CareerRoadmapView,D as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.