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{t as r}from"./timezone-keeL11Io.mjs";import{t as i}from"./description-0wV08eu2.mjs";import{load as a}from"cheerio";const o=async o=>{let s=Number.parseInt(o.req.query(`limit`)??`30`,10),c=`https://www.adquan.com`,l=a(await e(c)),u=l(`html`).attr(`lang`)??`zh-CN`,d=l(`div.article_1`).slice(0,s).toArray().map(e=>{let t=l(e),r=t.find(`p.article_2_p`).text(),a=i({intro:t.find(`div.article_1_fu p`).first().text()}),o=t.find(`div.article_1_fu p`).last().text(),s=t.find(`a.article_2_href`).attr(`href`),c=t.find(`div.article_4`).text(),d=t.find(`img.article_1_img`).attr(`src`),f=o;return{title:r,description:a,pubDate:o?n(o):void 0,link:s,author:c,content:{html:a,text:a},image:d,banner:d,updated:f?n(f):void 0,language:u}});return d=(await Promise.all(d.map(o=>o.link?t.tryGet(o.link,async()=>{let t=a(await e(o.link)),s=t(`p.infoTitle_left`).text(),c=i({description:t(`div.articleContent`).html()??void 0}),l=t(`p.time`).text().split(/：/).pop(),d=t(`span.article_5`).toArray(),f=[...new Set(d.map(e=>t(e).text()).filter(Boolean))],p=t(`div.infoTitle_right span`).text(),m=l,h={title:s,description:c,pubDate:l?r(n(l),8):o.pubDate,category:f,author:p,content:{html:c,text:c},updated:m?r(n(m),8):o.updated,language:u};return{...o,...h}}):o))).filter(e=>!0),{title:l(`title`).text(),description:l(`meta[name="description"]`).attr(`content`),link:c,item:d,allowEmpty:!0,image:l(`img.navi_logo`).attr(`src`),author:l(`meta[name="author"]`).attr(`content`),language:u,id:c}},s={path:`/`,name:`最新文章`,url:`www.adquan.com`,maintainers:[`nczitzk`],handler:o,example:`/adquan`,parameters:void 0,description:void 0,categories:[`new-media`],features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportRadar:!0,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`www.adquan.com`],target:`/`}],view:0};export{o as handler,s as route};