import{t as e}from"./config-BYRrjYC5.mjs";import{t}from"./cache-DUthuMSu.mjs";import{t as n}from"./parse-date-BdYTmLpo.mjs";import{t as r}from"./got-BBDj7u1e.mjs";import{t as i}from"./timezone-keeL11Io.mjs";const a={path:`/topic/:id`,categories:[`finance`],view:0,example:`/jin10/topic/396`,parameters:{id:`N`},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`xnews.jin10.com/topic/:id`]}],name:`主题文章`,maintainers:[`miles170`],handler:o,url:`jin10.com/`};async function o(a){let o=a.req.param(`id`),s=await t.tryGet(`jin10:topic:${o}`,async()=>{let{data:e}=await r(`https://reference-api.jin10.com/topic/getById?id=${o}`,{headers:{"x-app-id":`g93rhHb9DcDptyPb`,"x-version":`1.0.1`}});return e.data},e.cache.routeExpire,!1),c=await Promise.all(s.list.map(e=>t.tryGet(`jin10:reference:${e.id}`,async()=>{let{data:t}=await r(`https://reference-api.jin10.com/reference/getOne?id=${e.id}&type=news`,{headers:{"x-app-id":`g93rhHb9DcDptyPb`,"x-version":`1.0.1`}});return{title:e.title,description:t.data.content,author:e.author.nick,pubDate:i(n(e.display_datetime),8),link:`https://xnews.jin10.com/details/${e.id}`}})));return{title:s.title,link:`https://xnews.jin10.com/topic/${o}`,description:s.introduction,item:c}}export{a as route};