import{t as e}from"./ofetch-Dl6dVB_5.mjs";import{t}from"./parse-date-BdYTmLpo.mjs";import{t as n}from"./description-Dw_iy-yT.mjs";import{load as r}from"cheerio";const i={path:`/user/video/:uid/:embed?`,radar:[{source:[`www.acfun.cn/u/:id`],target:`/user/video/:id`}],name:`用户投稿`,parameters:{uid:`用户 UID`,embed:`默认为开启内嵌视频, 任意值为关闭`},categories:[`anime`],example:`/acfun/user/video/6102`,view:3,maintainers:[`wdssmq`],handler:a};async function a(i){let a=i.req.param(`uid`),o=!i.req.param(`embed`),s=`https://www.acfun.cn`,c=`${s}/u/${a}`,l=r(await e(c)),u=l(`title`).text(),d=l(`.signature .complete`).text(),f=l(`#ac-space-video-list a`).toArray();return{title:u,link:c,description:d,image:l(`head style:contains("user-photo")`).text().match(/.user-photo{\n\s*background:url\((.*)\) 0% 0% \/ 100% no-repeat;/)?.[1],item:f.map(e=>{let r=l(e),i=r.find(`p.title`).text(),a=r.find(`figure img`).attr(`src`),c=r.attr(`href`),u=r.find(`.date`).text(),d=JSON.parse(r.data(`wb-info`)||`{}`);return{title:i,description:n({embed:o,aid:d.atmid||d.mediaId||c.match(/\/v\/(ac\d+)/)?.[1],img:a?.split(`?`)[0]}),link:s+c,pubDate:t(u,`YYYY/MM/DD`)}})}}export{i as route};