1import{b as f,j as i}from"./data-client-CAimJuVx.js";import{h as v,f as g,r as m}from"./router-DczAKRgd.js";import{b as h}from"./index-DAn8Ggbh.js";import{C as w}from"./CVRenderer-CBYPvdBk.js";import"./supabase-DH7NlqY0.js";import"./icons-Ak3im7X8.js";const x=["modern","classic","minimal","executive","creative","technical"],b=["sans","serif","mono"],N=["compact","normal","spacious"],_=["tight","normal","relaxed"],n=(e,r,a)=>e&&r.includes(e)?e:a;function I(){const{id:e}=v(),[r]=g(),a=n(r.get("theme"),x,"modern"),c=n(r.get("fontFamily"),b,"sans"),d=n(r.get("fontSize"),N,"normal"),p=n(r.get("lineSpacing"),_,"normal"),s=r.get("print")==="true",{data:t,isLoading:o,error:l}=f({queryKey:["tailored",e],queryFn:()=>h.getById(Number(e)),enabled:!!e});return m.useEffect(()=>(document.body.classList.add("print-mode"),()=>{document.body.classList.remove("print-mode")}),[]),m.useEffect(()=>{if(s&&(t!=null&&t.tailored_cv_data)&&!o){const u=window.setTimeout(()=>window.print(),500);return()=>window.clearTimeout(u)}},[s,t,o]),o?i.jsx("div",{className:"p-8 text-center",children:"Loading tailored CV for printing..."}):l||!(t!=null&&t.tailored_cv_data)?i.jsx("div",{className:"p-8 text-center text-red-600",children:"Failed to load tailored CV"}):i.jsxs("div",{className:"cv-print-view print-container bg-white min-h-screen",children:[i.jsx(w,{data:t.tailored_cv_data,theme:a,fontFamily:c,fontSize:d,lineSpacing:p,className:"w-full cv-print-renderer"}),i.jsx("style",{children:` 2 .cv-print-view { 3 background: #fff; 4 padding: 1rem; 5 } 6 7 .cv-print-view .cv-renderer { 8 width: 100%; 9 max-width: 1080px; 10 margin: 0 auto; 11 } 12 13 @media print { 14 @page { 15 margin: 8mm; 16 } 17 18 html, 19 body { 20 margin: 0 !important; 21 padding: 0 !important; 22 background: #fff !important; 23 height: auto !important; 24 overflow: visible !important; 25 -webkit-print-color-adjust: exact; 26 print-color-adjust: exact; 27 } 28 29 .cv-print-view { 30 padding: 0 !important; 31 min-height: auto !important; 32 overflow: visible !important; 33 position: static !important; 34 } 35 36 .cv-print-view .cv-renderer { 37 max-width: none !important; 38 width: 100% !important; 39 margin: 0 !important; 40 padding: 0 !important; 41 border-radius: 0 !important; 42 } 43 44 nav, 45 footer, 46 .sidebar { 47 display: none !important; 48 } 49 } 50 `})]})}export{I 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.