import{t as e}from"./cache-DUthuMSu.mjs";import{t}from"./parse-date-BdYTmLpo.mjs";import{t as n}from"./got-BBDj7u1e.mjs";import{t as r}from"./timezone-keeL11Io.mjs";import{load as i}from"cheerio";const a={path:`/:category?`,categories:[`study`],example:`/fjksbm`,parameters:{category:`分类，见下表，默认为网络报名进行中`},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`fjksbm.com/portal/:category?`,`fjksbm.com/portal`]}],name:`分类`,maintainers:[`nczitzk`],handler:o,description:`| 已发布公告 (方案)，即将开始 | 网络报名进行中 | 网络报名结束等待打印准考证 | 正在打印准考证 | 考试结束，等待发布成绩 | 已发布成绩 | 新闻动态 | 政策法规 |
| --------------------------- | -------------- | -------------------------- | -------------- | ---------------------- | ---------- | -------- | -------- |
| 0                           | 1              | 2                          | 3              | 4                      | 5          | news     | policy   |`};async function o(a){let o=a.req.param(`category`)??`0`,s=Number.parseInt(o),c=!Number.isNaN(s),l=`https://fjksbm.com`,u=`${l}/portal${c?``:`/${o}`}`,d=i((await n(u)).data),f=(c?d(`.panel-body`).eq(s).find(`.examName a`):d(`.panel-body ul li a`)).toArray().map(e=>{e=d(e);let t=e.attr(`href`);return{title:e.text(),link:t.startsWith(`//`)?t.startsWith(`https`)?t:`https:${t}`:`${l}${t}/news/bulletin`}}),p=await Promise.all(f.map(a=>e.tryGet(a.link,async()=>{let e=await n(a.link),o=i(e.data);return o(`h3`).remove(),o(`.panel-body div`).eq(0).remove(),a.description=o(`.panel-body`).html(),a.pubDate=r(t(e.data.match(/发布时间：(\d{4}-\d{2}-\d{2} \d{2}:\d{2})/)[1]),8),a})));return{title:`${d(`.panel-heading`).eq(c?s:1).text()} - 福建考试报名网`,link:u,item:p}}export{a as route};