import{t as e}from"./ofetch-Dl6dVB_5.mjs";import{t}from"./config-BYRrjYC5.mjs";import{t as n}from"./cache-DUthuMSu.mjs";import{t as r}from"./parse-date-BdYTmLpo.mjs";import{t as i}from"./comic-BVXrCMqe.mjs";import a from"p-map";const o={path:`/update`,categories:[`anime`],example:`/zaimanhua/update`,features:{requireConfig:[{name:`ZAIMANHUA_TOKEN`,optional:!0,description:"可从浏览器开发者工具中抓取站点请求头 `Authorization` 的 Bearer token，并配置为环境变量。可设置为完整值 `Bearer <token>`，或仅设置 token 由路由自动补齐 `Bearer ` 前缀。"}],requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1,nsfw:!0},radar:[{source:[`manhua.zaimanhua.com/update`],target:`/update`}],name:`最近更新`,maintainers:[`kjasn`],description:"::: Warning\n建议设置`ZAIMANHUA_TOKEN`环境变量以使用 API 授权访问。且由于源网站本身的限制，建议尽量在部署于中国大陆网络内的 RSSHub 节点中使用本路由。若在海外网络环境中使用，即使设置了`ZAIMANHUA_TOKEN`环境变量，也可能无法获取全部漫画。\n:::",handler:async()=>{let o=`https://manhua.zaimanhua.com`,s=`${o}/api/v1/comic2/update_list?status&theme&zone&cate&firstLetter&sortType&page=1&size=20`,c={"user-agent":t.trueUA,referer:o},l=t.zaimanhua.token;l&&(c.Authorization=l.startsWith(`Bearer `)?l:`Bearer ${l}`);let u=(await e(s,{headers:c})).data.comicList,d=await a(u,async t=>{let a=t.id,s=t.last_update_chapter_id,l=t.comic_py,u=`${o}/api/v1/comic2/chapter/detail?comic_id=${a}&chapter_id=${s}`;return await n.tryGet(u,async()=>{let n=(await e(u,{headers:c})).data,d=i(n.chapterInfo.page_url||[]);return{title:`[${t.status}] | ${t.name} - ${t.last_update_chapter_name}`,author:t.authors,category:[t.status,...t.types.split(`/`).map(e=>e.trim())],image:t.cover,link:`${o}/view/${l}/${a}/${s}`,pubDate:r(t.last_updatetime*1e3),description:d}})},{concurrency:3});return{title:`再漫画 - 最近更新`,link:`${o}/update`,item:d}}};export{o as route};