import{t as e}from"./ofetch-Dl6dVB_5.mjs";import{t}from"./cache-DUthuMSu.mjs";import{load as n}from"cheerio";import r from"p-map";const i={path:`/engineering`,categories:[`programming`],example:`/anthropic/engineering`,parameters:{},radar:[{source:[`www.anthropic.com/engineering`,`www.anthropic.com`]}],name:`Engineering`,maintainers:[`TonyRL`],handler:a,url:`www.anthropic.com/engineering`};async function a(i){let a=`https://www.anthropic.com`,o=`${a}/engineering`,s=n(await e(o)),c=i.req.query(`limit`)?Number.parseInt(i.req.query(`limit`),10):20,l=await r(s(`a[class*="cardLink"]`).toArray().map(e=>{let t=s(e),n=t.attr(`href`)??``,r=n.startsWith(`http`)?n:`${a}${n}`,i=t.find(`div[class*="date"]`).text().trim();return{title:t.find(`h2, h3`).text().trim(),link:r,pubDate:i}}).filter(e=>e.title&&e.link).slice(0,c),r=>t.tryGet(r.link,async()=>{let t=n(await e(r.link)),i=t(`article > div > div[class*="__body"]`);return i.find(`img`).each((e,n)=>{let r=t(n);r.removeAttr(`style srcset`);let i=r.attr(`src`),a=new URLSearchParams(i).get(`/_next/image?url`);a&&r.attr(`src`,a)}),r.description=i.html()??void 0,r}),{concurrency:5});return{title:`Anthropic Engineering`,link:o,description:`Latest engineering posts from Anthropic`,image:`${a}/images/icons/apple-touch-icon.png`,item:l}}export{i as route};