import{t as e}from"./ofetch-Dl6dVB_5.mjs";import{t}from"./cache-DUthuMSu.mjs";import{t as n}from"./parse-date-BdYTmLpo.mjs";import{load as r}from"cheerio";import i from"dayjs";const a={name:`Release`,path:`/release`,url:`notion.so/releases`,example:`/notion/release`,categories:[`program-update`],maintainers:[`equt`],features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},handler:async()=>{let a=r(await e(`https://notion.so/releases`,{headers:{"Accept-Language":`en-US`}})),o=a(`h2`).first().text()??``,s=n(a(`time`).first().text()),c=a(`article.release article`).first().html()??``,l=`https://notion.so/releases/${i(s).format(`YYYY-MM-DD`)}`,u=await Promise.all(a(`div[class^="releasePreviewsSection"] h3 a[href^="/releases/"]`).toArray().slice(0,5).map(i=>{let a=`https://notion.so${i.attribs.href}`;return t.tryGet(`notion:release:${a}`,async()=>{let t=r(await e(a,{headers:{"Accept-Language":`en-US`}}));return{title:t(`h2`).first().text()??``,pubDate:n(t(`time`).first().text()),description:t(`article.release article`).first().html()??``,link:a}})}));return{title:`Notion Releases`,link:`https://notion.so/releases`,item:[{title:o,description:c,pubDate:s,link:l},...u]}}};export{a as route};