import{r as e,t}from"./util-C1azhJmz.mjs";let n=0;const r=async r=>{let{id:i,tab:a}=r.req.param(),o=Number.parseInt(r.req.query(`limit`)??`30`,10),s=new URL(`collections/${i}${a?`?tab=${a}`:``}`,t).href,c=new URL(`gapi/v1/collections/${i}/${a??`originals`}`,t).href,l={"page[limit]":o,sort:`-published-at`,include:`category,user,media`,"filter[list-all]":1,"filter[is-news]":+(a===`news`)};return a===`radios`?n=4:a===`videos`&&(n=3),await e(o,l,c,s)},i={path:`/collections/:id/:tab?`,name:`专题`,url:`www.gcores.com`,maintainers:[`kudryavka1013`,`nczitzk`],handler:r,example:`/gcores/collections/64/articles`,parameters:{id:{description:`专题 ID，可在对应专题页 URL 中找到`},tab:{description:`类型，默认为空，即全部，可在对应专题页 URL 中找到`,options:[{label:`全部`,value:``},{label:`播客`,value:`radios`},{label:`文章`,value:`articles`},{label:`资讯`,value:`news`},{label:`视频`,value:`videos`}]}},description:"::: tip\n若订阅 [文章 - 文章](https://www.gcores.com/collections/64?tab=articles)，网址为 `https://www.gcores.com/collections/64?tab=articles`，请截取 `https://www.gcores.com/collections/` 到末尾的部分 `64` 作为 `id` 参数填入，截取 `articles` 作为 `tab` 参数填入，此时目标路由为 [`/gcores/collections/64/articles`](https://rsshub.app/gcores/collections/64/articles)。\n:::\n\n| 全部 | 播客   | 文章     | 资讯 | 视频   |\n| ---- | ------ | -------- | ---- | ------ |\n|      | radios | articles | news | videos |\n",categories:[`game`],features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportRadar:!0,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`www.gcores.com/collections/:id`],target:(e,t)=>{let n=new URL(t),r=e.id,i=n.searchParams.get(`tab`)??void 0;return`/gcores/collections/${r}/${i?`/${i}`:``}`}},{title:`全部`,source:[`www.gcores.com/collections/:id`],target:`/collections/:id`},{title:`播客`,source:[`www.gcores.com/collections/:id`],target:`/collections/:id/radios`},{title:`文章`,source:[`www.gcores.com/collections/:id`],target:`/collections/:id/articles`},{title:`资讯`,source:[`www.gcores.com/collections/:id`],target:`/collections/:id/news`},{title:`视频`,source:[`www.gcores.com/collections/:id`],target:`/collections/:id/videos`}],view:n};export{r as handler,i as route};