import{t as e}from"./parse-date-BdYTmLpo.mjs";import{t}from"./got-BBDj7u1e.mjs";import{Fragment as n,jsx as r,jsxs as i}from"hono/jsx/jsx-runtime";import{load as a}from"cheerio";import{renderToString as o}from"hono/jsx/dom/server";import{raw as s}from"hono/html";const c=(e,t)=>o(i(n,{children:[e?.[`wp:featuredmedia`]?.length?e[`wp:featuredmedia`].map(e=>i(n,{children:[i(`figure`,{children:[r(`img`,{src:e.source_url,alt:e.alt_text}),r(`figcaption`,{children:e.media_details?.image_meta.caption})]}),r(`br`,{})]})):null,t?r(n,{children:s(t)}):null]})),l={path:`/`,radar:[{source:[`deadline.com/`],target:``}],name:`Unknown`,maintainers:[`TonyRL`],handler:u,url:`deadline.com/`};async function u(n){let r=`https://deadline.com`,i=(await t(`${r}/wp-json/wp/v2/posts`,{searchParams:{per_page:n.req.query(`limit`)??30,_embed:!0}})).data.map(t=>{let n=t._embedded,r=a(t.content.rendered,null,!1);r(`.c-lazy-image__img`).each((e,t)=>{t=r(t),t.attr(`data-lazy-src`)&&(t.attr(`src`,t.attr(`data-lazy-src`).split(`?`)[0]),t.removeAttr(`data-lazy-src`),t.removeAttr(`data-lazy-srcset`))}),r(`[class^="lrv-a-crop-"]`).contents().unwrap();let i=c(n,r.html());return{title:t.title.rendered,link:t.link,guid:t.guid.rendered,description:i,pubDate:e(t.date_gmt),author:n.author[0].name,category:[...new Set([...n[`wp:term`][0].map(e=>e.name),...n[`wp:term`][1].map(e=>e.name)])]}});return{title:`Deadline – Hollywood Entertainment Breaking News`,description:`Deadline.com is always the first to break up-to-the-minute entertainment, Hollywood and media news, with an unfiltered, no-holds-barred analysis of events.`,link:r,language:`en-US`,image:`${r}/wp-content/themes/pmc-deadline-2019/assets/app/icons/apple-touch-icon.png`,item:i}}export{l as route};