1import{t as _}from"./track.B8dTbuZD.js";const ct="modulepreload",dt=function(r){return"/"+r},Q={},pt=function(n,c,L){let z=Promise.resolve();if(c&&c.length>0){let o=function(h){return Promise.all(h.map(y=>Promise.resolve(y).then(i=>({status:"fulfilled",value:i}),i=>({status:"rejected",reason:i}))))};document.getElementsByTagName("link");const g=document.querySelector("meta[property=csp-nonce]"),t=g?.nonce||g?.getAttribute("nonce");z=o(c.map(h=>{if(h=dt(h),h in Q)return;Q[h]=!0;const y=h.endsWith(".css"),i=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${i}`))return;const p=document.createElement("link");if(p.rel=y?"stylesheet":ct,y||(p.as="script"),p.crossOrigin="",p.href=h,t&&p.setAttribute("nonce",t),document.head.appendChild(p),y)return new Promise((x,$)=>{p.addEventListener("load",x),p.addEventListener("error",()=>$(new Error(`Unable to preload CSS for ${h}`)))})}))}function w(o){const g=new Event("vite:preloadError",{cancelable:!0});if(g.payload=o,window.dispatchEvent(g),!g.defaultPrevented)throw o}return z.then(o=>{for(const g of o||[])g.status==="rejected"&&w(g.reason);return n().catch(w)})},q=document.getElementById("app-shell"),et=Array.from(document.querySelectorAll("#stats-rail .rail-toggle")),ut=Array.from(document.querySelectorAll("#rail-panel .rail-view"));let k=null;const ht=r=>({stats:"hiring trends",chrome:"the Chrome extension",firefox:"the Firefox add-on",ai:"Ask your AI"})[r]??r;function ot(r){k=r===k?null:r,q?.classList.toggle("stats-open",k!==null),q&&(q.dataset.panel=k??"");for(const n of et){const c=n.dataset.panel===k;n.classList.toggle("is-active",c),n.setAttribute("aria-expanded",c?"true":"false");const L=ht(n.dataset.panel);n.setAttribute("aria-label",c?`Close ${L}`:`Show ${L}`)}for(const n of ut)n.hidden=n.dataset.view!==k}for(const r of et)r.addEventListener("click",()=>{const n=r.dataset.panel,c=k===n;ot(n),_(c?"rail_close":"rail_open",{panel:n})});document.getElementById("rail-panel")?.addEventListener("click",r=>{const n=r.target.closest?.("a[href]");if(!n)return;const c=n.closest(".rail-view")?.dataset.view??"";_("rail_link",{panel:c,label:(n.getAttribute("aria-label")||n.textContent||"").trim().slice(0,60),href:n.href.slice(0,120)})});const O=new URLSearchParams(location.search).get("panel");O&&["stats","chrome","firefox","ai"].includes(O)&&ot(O);const R=document.getElementById("ai-copy");R?.addEventListener("click",async()=>{const r=document.getElementById("ai-endpoint")?.textContent?.trim()??"";try{await navigator.clipboard.writeText(r),R.textContent="Copied",setTimeout(()=>R.textContent="Copy",1600)}catch{R.textContent=r}_("mcp_copy_endpoint")});document.querySelectorAll("#rail-panel [data-ai]").forEach(r=>r.addEventListener("click",()=>_("mcp_ai_click",{assistant:r.dataset.ai})));const P=document.getElementById("trends-pdf");async function nt(){if(!P||P.disabled)return;const r=document.getElementById("trends-data");if(!r?.textContent)return;const n=P.querySelector(".trends-pdf-label"),c=n?.textContent??"PDF";P.disabled=!0,n&&(n.textContent="Generatingâ¦");try{let L=function(){t.setFillColor(...$),t.rect(0,0,h,y,"F"),t.setFont("helvetica","normal"),t.setFontSize(12),t.setTextColor(...lt);const e=168,s=66;for(let a=24;a<y+60;a+=s){const u=Math.round(a/s)%2*(e/2);for(let l=-70+u;l<h+70;l+=e)t.text("jobs.uxjobs.io",l,a,{angle:30})}t.setTextColor(...F)},z=function(){t.addPage(),L(),f=i},w=function(e,s,a,u){t.setFont("helvetica","normal"),t.setFontSize(8);const l=a?t.splitTextToSize(a,p-x*2):[],b=a?10+l.length*10:0,d=22,m=x+d+s+b+x;f+m>y-i&&m<y-i*2&&z();const v=f,C=i+x,M=p-x*2;t.setFillColor(...N),t.setDrawColor(...K),t.setLineWidth(.8),t.roundedRect(i,v,p,m,9,9,"FD"),t.setFont("helvetica","bold"),t.setFontSize(11.5),t.setTextColor(...F),t.text(e,C,v+x+10),t.setFont("helvetica","normal"),t.setFontSize(8),t.setTextColor(...T),t.text("jobs.uxjobs.io",i+p-x,v+x+9,{align:"right"});const S=v+x+d;u(C,S,M),a&&(t.setFont("helvetica","normal"),t.setFontSize(8),t.setTextColor(...T),t.text(l,C,S+s+10),t.setTextColor(...F)),f=v+m+12};const o=JSON.parse(r.textContent),{jsPDF:g}=await pt(async()=>{const{jsPDF:e}=await import("./jspdf.es.min.DM-LvTrw.js").then(s=>s.j);return{jsPDF:e}},[]),t=new g({orientation:"portrait",unit:"pt",format:"letter",compress:!0}),h=612,y=792,i=44,p=h-i*2,x=14,$=[243,242,238],N=[255,255,255],F=[17,17,17],T=[136,136,136],G=[250,208,10],rt=[233,232,227],K=[226,225,219],lt=[223,222,214];let f=i;const J=e=>e?"$"+Math.round(e/1e3)+"K":"â",E=e=>
1e.toLocaleString("en-US"),X=(e,s)=>{if(t.getTextWidth(e)<=s)return e;for(;e.length>2&&t.getTextWidth(e+"â¦")>s;)e=e.slice(0,-1);return e+"â¦"},H=e=>e*17,U=(e,s)=>(a,u,l)=>{const b=Math.max(...e.map(S=>S.val),1),d=116,m=46,v=8,C=a+d+v,M=l-d-v-m-v;e.forEach((S,B)=>{const I=u+B*17;t.setFont("helvetica","normal"),t.setFontSize(9),t.setTextColor(...T),t.text(X(S.label,d),a,I+8),t.setFillColor(...rt),t.roundedRect(C,I+2,M,7,2,2,"F"),t.setFillColor(...G),t.roundedRect(C,I+2,Math.max(2,M*(S.val/b)),7,2,2,"F"),t.setFont("helvetica","bold"),t.setFontSize(9),t.setTextColor(...F),t.text(s(S.val),a+l,I+8,{align:"right"})})},Y=e=>e*18,V=e=>(s,a,u)=>{e.forEach((l,b)=>{const d=a+b*18;t.setFont("helvetica","normal"),t.setFontSize(9),t.setTextColor(...T),t.text(String(b+1),s,d+8),t.setFontSize(9.5),t.setTextColor(...F),t.text(X(l.label,u-26-46),s+22,d+8),t.setFont("helvetica","bold"),t.text(E(l.count),s+u,d+8,{align:"right"})})};L(),t.setFont("helvetica","bold"),t.setFontSize(19),t.setTextColor(...F),t.text("Design hiring trends",i,f+14),t.setFont("helvetica","normal"),t.setFontSize(9),t.setTextColor(...T),t.text("jobs.uxjobs.io · "+o.generated,i+p,f+13,{align:"right"}),f+=24,t.setFontSize(10),t.setTextColor(...T),t.text("Built from every posting, not a survey.",i,f+4),t.setTextColor(...F),f+=22;const it=[["Open design roles",E(o.totalRoles)],["Hiring companies",E(o.companies)],["Median pay",J(o.medianPay)],["Countries",E(o.countries)],["Remote-friendly",o.remotePct+"%"],["Show salary",o.salaryPct+"%"]];{const s=(p-20)/3,a=48;it.forEach(([u,l],b)=>{const d=i+b%3*(s+10),m=f+Math.floor(b/3)*(a+10);t.setFillColor(...N),t.setDrawColor(...K),t.setLineWidth(.8),t.roundedRect(d,m,s,a,8,8,"FD"),t.setFont("helvetica","normal"),t.setFontSize(8),t.setTextColor(...T),t.text(u,d+11,m+16),t.setFont("helvetica","bold"),t.setFontSize(15),t.setTextColor(...F),t.text(l,d+11,m+37)}),f+=a*2+10+8}{t.setFont("helvetica","normal"),t.setFontSize(8),t.setTextColor(...T);const e=t.splitTextToSize(`Remote-friendly and median pay cover the ${E(o.workplaceStated)} roles that state a workplace and the ${E(o.salaryStated)} that publish it in USD â not all ${E(o.totalRoles)}.`,p);t.text(e,i,f+4),t.setTextColor(...F),f+=e.length*10+14}if(o.perDay?.length&&w("New postings per day",96,"Employer posting dates, complete days only â today and the oldest retained day are excluded because both are partial. Weekend dips are real.",(s,a,u)=>{const l=a+82,b=o.perDay.length,d=u/b,m=Math.min(d*.6,24),v=Math.max(...o.perDay.map(C=>C.count),1);o.perDay.forEach((C,M)=>{const S=s+M*d+(d-m)/2,B=Math.max(1,82*(C.count/v));t.setFillColor(...G),t.roundedRect(S,l-B,m,B,2,2,"F"),t.setFont("helvetica","normal"),t.setFontSize(6.4),t.setTextColor(...T),t.text(String(C.label),S+m/2,l+10,{align:"center"})}),t.setTextColor(...F)}),o.payBySeniority?.length){const e=o.payBySeniority.map(s=>({label:s.label,val:s.median}));w("Median pay by seniority",H(e.length),"Median of postings that published a pay range. Levels with fewer than 3 are omitted. USD only.",U(e,J))}const A=(e,s,a=null)=>{if(!s?.length)return;const u=s.map(l=>({label:l.label,val:l.count}));w(e,H(u.length),a,U(u,E))};if(A("Open roles by discipline",o.disciplines),A("Seniority",o.seniority),o.workplaceSplit?.length){const e=o.workplaceSplit[0].pct!=null,s=o.workplaceSplit.map(a=>({label:a.label,val:e?a.pct:a.count}));w("Workplace",H(s.length),`Of the ${E(o.workplaceStated)} roles that state one.`,U(s,a=>e?Math.round(a)+"%":E(a)))}A("Employment type",o.employmentTypes),o.topCompanies?.length&&w("Top hiring companies",Y(o.topCompanies.length),"Staffing agencies are excluded â their listings carry the agency name, not the employer.",V(o.topCompanies)),o.topLocations?.length&&w("Top locations",Y(o.topLocations.length),null,V(o.topLocations)),A("Most active platforms",o.topSources,"Aggregated from the public job feeds that power the UX Jobs browser extension. Every listing links to its original posting."),t.save("uxjobs-hiring-trends.pdf")}catch(L){console.error("Trends PDF export failed:",L),alert("Sorry â the PDF export failed. Please try again.")}finally{P.disabled=!1,n&&(n.textContent=c)}}const st="uxjobs.reportEmail",D=document.getElementById("pdf-gate"),Z=document.getElementById("pdf-gate-form"),at=document.getElementById("pdf-gate-email"),j=D?.querySelector("[data-gate-msg]"),tt=()=>{try{return!!localStorage.getItem(st)}catch{return!1}},mt=()=>{D?.classList.add("open"),setTimeout(()=>at?.focus(),40)},W=()=>D?.classList.remove("open");P?.addEventListener("click",()=>{P.disabled||(_("trends_pdf_click",{gated:!tt()}),tt()?nt():mt())});D?.querySelector("[data-gate-close]")?.addEventListener("click",W);D?.addEventListener("click",r=>{r.target===D&&W()});document.addEventListener("keydown",r=>{r.key==="Escape"&&D?.classList.contains("open")&&W()});Z?.addEventListener("submit",async r=>{r.preventDefault();const n=(at?.value||"").trim();if(!n||!/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(n)){j&&(j.textContent="Please enter a valid email.");return}_("sign_up",{method:"trends-pdf"});const c=Z.querySelector('button[type="submit"]');c&&(c.disabled=!0),j&&(j.textContent="");try{await fetch("/api/subscribe",{method:"POST",body:new URLSearchParams({email:n,source:"trends-pdf"})})}catch{}try{localStorage.setItem(st,n)}catch{}c&&(c.disabled=!1),W(),nt()});export{pt as _};
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.