1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BjfRaslF.js","./Bx1xfRBz.js","./CmUz1GCm.js","./svg-icons.DDc8G5QA.css","./DCCPWw9Y.js","./pyVxiBLO.js","./DTLJGphe.js","./entry.D7psC3v0.css","./BY7qRNnA.js","./Questionnaire.Y7tOWGA8.css","./B2zPeKMA.js","./BfwWOIos.js","./nuIACsfu.js","./HeaderSearch.CpQ5zY18.css"])))=>i.map(i=>d[i]); 2import{_ as e}from"./pyVxiBLO.js";import t from"./aGiP4FvI.js";import{s as a,R as l,el as s,em as i,f as r,T as o,_ as n,V as u,d,G as c,aa as m,P as p,ao as f,dw as g,b as v,a as h,am as x,c as y,en as _,x as b,M as w,w as k,ae as E,o as S,eo as I,ep as T,e9 as C,$ as O,y as L,E as j,dM as N,ag as R}from"./DCCPWw9Y.js";import{N as U,R as A,aM as z,_ as P,bK as F,ca as D,cb as M,T as $}from"./Bx1xfRBz.js";import{aM as Y,c as q,e as B,d as V,l as W,o as X,r as G,g as H,a as K,J,N as Z,an as Q,V as ee,P as te,S as ae,af as le,L as se,ac as ie,b1 as re,aj as oe,ap as ne,aN as ue,w as de,a4 as ce,a5 as me,f as pe,j as fe,O as ge,at as ve,v as he,n as xe,Y as ye}from"./CmUz1GCm.js";import{_ as _e}from"./DgIBpxaE.js";import{S as be}from"./BlkLiUnJ.js";import{t as we}from"./Bp-lYpDv.js";import{u as ke}from"./Dt5DPnqm.js";import{_ as Ee}from"./CuMzknAe.js";import{u as Se,_ as Ie}from"./DVJpo16p.js";import{_ as Te}from"./XN7_yt4r.js";import Ce from"./D2CkDl4O.js";import{d as Oe,e as Le,h as je}from"./BY7qRNnA.js";import{a as Ne,u as Re}from"./BTsO7hDj.js";import{t as Ue}from"./CoYWWrii.js";import{_ as Ae}from"./DGk1TgdJ.js";import{d as ze}from"./YMolbn0J.js";import"./D7eON5FF.js";import"./DTlqbplb.js";import"./B3fkB5lH.js";import"./Cwfv5-nU.js";import"./Brfzr7gJ.js";import"./DTLJGphe.js";import"./BM1BnFF1.js";import"./JnCikusn.js";import"./DnT-784C.js";import"./GGf5-mLq.js";import"./CxA7yvZw.js";import"./CAJYKgNP.js";import"./CNceNWGg.js";import"./Cp2VVmCx.js";import"./DFSovOcX.js";import"./D2VId1Iw.js";import"./Dk4YzRvS.js";const Pe={key:0,class:"flex w-full shrink-0 items-start gap-4 p-4 max-md:flex-col max-md:gap-0 max-md:p-0"},Fe={class:"absolute inset-0 overflow-hidden"},De=["src","poster"],Me=["loading","src","alt"],$e={class:"pointer-events-none absolute inset-x-0 bottom-0 z-10 flex w-full flex-col items-center gap-4 bg-gradient-to-b from-transparent to-fill-dd-7 px-4 pb-2 pt-8"},Ye={key:0,class:"flex w-full flex-col gap-0.5"},qe={key:0,class:"w-full break-words text-xl font-semibold leading-7 text-text-white"},Be={key:1,class:"w-full overflow-hidden text-ellipsis whitespace-nowrap text-sm font-normal leading-[22px] text-text-t-8"},Ve={key:1,class:"pointer-events-auto flex items-center gap-2"},We=["onClick"],Xe={key:1,class:"flex h-[260px] min-w-px flex-[1_0_0] flex-col overflow-hidden rounded-2xl bg-fill-ww-10 max-md:h-auto max-md:w-full max-md:flex-none max-md:rounded-none max-md:bg-transparent"},Ge={class:"flex w-full shrink-0 flex-col gap-0.5 px-5 pb-4 pt-5"},He={class:"flex w-full items-center gap-4"},Ke={class:"min-w-px flex-1 break-words text-xl font-semibold leading-7 text-text-1"},Je={class:"w-full overflow-hidden text-ellipsis whitespace-nowrap text-sm font-normal leading-[22px] text-text-t-7"},Ze={class:"flex min-h-0 w-full flex-1 flex-col gap-4 overflow-hidden pb-5 max-md:px-5"},Qe={class:"size-10 shrink-0 overflow-hidden rounded-xl"},et=["src","alt"],tt={class:"whitespace-nowrap text-sm font-medium leading-[22px]"},at={__name:"ExploreHero",setup(e){const t=["24s","32s","40s"],{lang:n}=a(l()),u=()=>({data:[]}),{data:d}=ke("explore-hero-rotating-topics",(()=>s().catch(u)),{default:u}),{data:c}=ke("explore-hero-banners",(()=>i({lang:n.value}).catch(u)),{default:u,watch:[n]}),m=W((()=>(Array.isArray(d.value?.data)?d.value.data:[]).filter((e=>e?.slug&&e?.name)))),p=W((()=>{const e=m.value;if(!e.length)return[];const t=Math.min(3,e.length),a=Array.from({length:t},(()=>[]));return e.forEach(((e,l)=>{a[l%t].push(e)})),a})),f=(e,t)=>{const a="string"==typeof e?e.trim():"";return a?2!==Number(t)||/^https?:\/\//i.test(a)||a.startsWith("/")?a:`https://${a}`:""},g=W((()=>(Array.isArray(c.value?.data)?c.value.data:[]).filter((e=>e?.coverImageUrl||e?.coverVideoUrl)).sort(((e,t)=>(t.sortWeight??0)-(e.sortWeight??0))).map((e=>({id:e.id,url:e.coverImageUrl,videoUrl:e.coverVideoUrl,href:f(e.linkUrl,e.linkType),title:e.title,de
2sc:e.description,alt:e.title||"",linkType:2===Number(e.linkType)?2:1}))))),v=G(),h=G(0),x=G(!1),y=W((()=>g.value[h.value]||g.value[0])),_=e=>{e>=g.value.length?h.value=0:h.value=e},b=W((()=>e=>o(e,{source_from:"explore_hero_banner"})));return(e,a)=>{const l=r,s=U,i=A,o=z,n=Y("login-check");return V(g).length||V(m).length?(X(),q("section",Pe,[V(g).length?(X(),q("div",{key:0,class:"relative h-[260px] w-1/2 min-w-px max-w-[611px] flex-[1_0_0] overflow-hidden rounded-2xl max-md:aspect-[16/9] max-md:h-auto max-md:w-full max-md:max-w-none max-md:flex-none max-md:rounded-none",onMouseenter:a[2]||(a[2]=e=>x.value=!0),onMouseleave:a[3]||(a[3]=e=>x.value=!1)},[H(be,{options:V(g),ref_key:"slider",ref:v,autoplay:"",onChange:_},{default:J((({item:e,index:t})=>[K("div",Fe,[e.videoUrl?(X(),q("video",{key:0,class:"absolute inset-0 size-full object-cover",src:e.videoUrl,poster:e.url,autoplay:"",muted:"",loop:"",playsinline:""},null,8,De)):(X(),q("img",{key:1,class:"absolute inset-0 size-full object-cover",width:"611",height:"260",loading:0===t?"eager":"lazy",fetchpriority:"auto",src:e.url,alt:e.alt},null,8,Me))]),e.href&&2===e.linkType?(X(),Z(l,{key:0,to:V(b)(e.href),target:"_blank",class:"absolute inset-0 z-[1]"},null,8,["to"])):e.href?Q((X(),Z(l,{key:1,to:V(b)(e.href),class:"absolute inset-0 z-[1]"},null,8,["to"])),[[n]]):B("",!0)])),_:1},8,["options"]),K("div",$e,[V(y)?.title||V(y)?.desc?(X(),q("div",Ye,[V(y).title?(X(),q("div",qe,ee(V(y).title),1)):B("",!0),V(y).desc?(X(),q("div",Be,ee(V(y).desc),1)):B("",!0)])):B("",!0),V(g).length>1?(X(),q("div",Ve,[(X(!0),q(te,null,ae(V(g),((e,t)=>(X(),q("div",{key:e.id||t,class:se(["h-[3px] w-10 cursor-pointer rounded-[2px] bg-fill-ww-3 transition-colors duration-200",{"bg-white":t===V(h)}]),onClick:le((e=>V(v).goTo(t)),["stop"])},null,10,We)))),128))])):B("",!0)]),V(g).length>1?(X(),q("div",{key:0,class:se(["absolute left-4 top-1/2 z-20 flex size-10 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full bg-fill-dd-3 shadow-[0_2px_4px_rgba(29,33,41,0.04),0_4px_5px_rgba(29,33,41,0.08)] backdrop-blur-[16px] transition-[opacity,background-color] duration-200 hover:bg-fill-dd-4 max-md:hidden",V(x)?"pointer-events-auto opacity-100":"pointer-events-none opacity-0"]),onClick:a[0]||(a[0]=le((e=>V(v).prev()),["stop"]))},[H(s,{class:"size-5 text-text-white"})],2)):B("",!0),V(g).length>1?(X(),q("div",{key:1,class:se(["absolute right-4 top-1/2 z-20 flex size-10 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full bg-fill-dd-3 shadow-[0_2px_4px_rgba(29,33,41,0.04),0_4px_5px_rgba(29,33,41,0.08)] backdrop-blur-[16px] transition-[opacity,background-color] duration-200 hover:bg-fill-dd-4 max-md:hidden",V(x)?"pointer-events-auto opacity-100":"pointer-events-none opacity-0"]),onClick:a[1]||(a[1]=le((e=>V(v).next()),["stop"]))},[H(i,{class:"size-5 text-text-white"})],2)):B("",!0)],32)):B("",!0),V(m).length?(X(),q("div",Xe,[K("div",Ge,[K("div",He,[K("h2",Ke,ee(e.$t("EXPLORE_TAGS.TITLE")),1),H(l,{to:"/gallery/",class:"inline-flex shrink-0 items-center justify-center gap-1.5 text-sm font-medium leading-[22px] text-primary-6"},{default:J((()=>[K("span",null,ee(e.$t("HOME.VIEWALL")),1),H(o,{class:"size-3.5"})])),_:1})]),K("p",Je,ee(e.$t("EXPLORE_TAGS.EXPLORE_SUBTITLE")),1)]),K("div",Ze,[(X(!0),q(te,null,ae(V(p),((e,a)=>(X(),Z(_e,{key:a,"marquee-list":e,duration:t[a]||"40s","min-count":8,"fill-max":16,"show-fade":!1},{default:J((e=>[e?.slug?(X(),Z(l,{key:0,to:`/gallery/${e.slug}/`,class:"flex shrink-0 items-center gap-3 overflow-hidden rounded-xl bg-fill-wd-1 pr-4 text-text-t-2 transition-colors duration-200 hover:bg-fill-wd-2 hover:text-text-1"},{default:J((()=>[K("span",Qe,[e.coverUrl?(X(),q("img",{key:0,src:e.coverUrl,alt:e.name,class:"size-10 object-cover",width:"40",height:"40",loading:"lazy"},null,8,et)):B("",!0)]),K("span",tt,ee(V(we)(e.name)),1)])),_:2},1032,["to"])):B("",!0)])),_:1},8,["marquee-list","duration"])))),128))])])):B("",!0)])):B("",!0)}}},lt={class:"h-full relative rounded-xl overflow-hidden"},st=["href"],it=["src"],rt=["onClick"],ot=["onClick"],nt={class:"absolute left-0 bottom-[7px] w-full justify-center items-center flex gap-x-1"},ut=["onClick"],dt={__name:"CommunityAd",props:{adList:{type:Array,default:()=>[]}},setup:e=>(t,a)=>{const l=F,s=ie,i=re;return X(),q("div",lt,[H(i,{draggable:e.adList.length>1,"show-arrow":"",class:"carousel transform-gpu",autoplay:""},{arrow:J((({prev:t,next:a})=>[K("div",null,[e.adList.length>1?(X(),q("div",{key:0,class:"carousel-arrow left-3 rotate-90",onClick:t},[H(s,{size:"20"},{default:J((()=>[H(l)])),_:1})],8,rt)):B("",!0),e.adList.length>1?(X(),q("div",{key:1,class:"carousel-arrow right-3 -rotate-90",onClick:a},[H(s,{size:"20"},{default:J((()=>[H(l)])),_:1})],8,ot)):B("",!0)])])),dots:J((({total:e,currentIndex:t,to:a})=>[K("ul",nt,[(X(!0),q(te,null,ae(e,(e=>(X(),q("li",{key:e,class:se(["w-[6px] h-[6px] rounded-full cursor-pointer bg-text-t-5",{"!bg-text-white !w-4":t===e-1}]),onClick:t=>a(e-1)},null,10,ut)))),128))])])),default:J((()=>[(X(!0),q(te,null,ae(e.adList,((e,t)=>
2(X(),q("div",{class:"w-full h-full",key:e.id||t},[K("a",{href:e.jumpUrl,target:"_blank",class:"w-full h-full overflow-hidden",rel:"noopener noreferrer"},[K("img",{class:"w-full h-full object-cover cursor-pointer rounded-xl",src:e.src},null,8,it)],8,st)])))),128))])),_:1},8,["draggable"])])}},ct=P(dt,[["__scopeId","data-v-f04e1af9"]]),mt={class:"absolute left-2 top-2 flex size-8 items-center justify-center rounded-full bg-fill-dd-3 text-white backdrop-blur-lg"},pt={class:"pointer-events-none absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/70 to-transparent p-3"},ft={class:"line-clamp-2 text-sm font-medium leading-[22px] text-white"},gt={key:0,class:"mt-0.5 text-xs leading-[18px] text-white/80"},vt={__name:"ExploreDramaItem",props:{item:{type:Object,required:!0},imageLoading:{type:String,default:"lazy"},imageFetchPriority:{type:String,default:"auto"}},setup:e=>(t,a)=>{const l=Ee,s=D,i=r;return X(),Z(i,{to:`/explore/drama-${e.item.id}/`,class:"relative block h-full overflow-hidden"},{default:J((()=>[H(l,{src:e.item.displayUrl,alt:e.item.title,loading:e.imageLoading,"fetch-priority":e.imageFetchPriority},null,8,["src","alt","loading","fetch-priority"]),K("div",mt,[H(s,{class:"size-4"})]),K("div",pt,[K("p",ft,ee(e.item.title),1),e.item.episodeCount?(X(),q("p",gt,ee(t.$t("DRAMA_EPISODES_TOTAL",{n:e.item.episodeCount})),1)):B("",!0)])])),_:1},8,["to"])}},ht={key:2,class:"relative h-full overflow-hidden"},xt={class:"flex-1"},yt={class:"text-sm"},_t={class:"text-sm"},bt={class:"text-sm"},wt={class:"rounded-lg border border-solid border-border-t-1 bg-bg-6 px-3 py-2 text-text-2"},kt={__name:"ExploreFeedItem",props:{item:{type:Object,required:!0},inFirstScreen:{type:Boolean,default:!1},isLcpCandidate:{type:Boolean,default:!1},isMobile:{type:Boolean,default:!1}},emits:["click","updateCommunityItem","remix","usePlayground","setReferFrame"],setup(e,{emit:t}){const a=t,{handleUseFlowTemplate:l,useFlowTempLoading:s}=Se();return(t,i)=>{const r=ct,o=vt,u=n,d=M,c=ie,m=ne,p=Ie,f=Y("login-check");return e.item.isAd?(X(),Z(r,{key:0,"ad-list":e.item.list},null,8,["ad-list"])):e.item.isDrama?(X(),Z(o,{key:1,item:e.item,"image-loading":e.inFirstScreen?"eager":"lazy","image-fetch-priority":e.isLcpCandidate?"high":"auto"},null,8,["item","image-loading","image-fetch-priority"])):(X(),q("div",ht,[H(p,{item:e.item,"enable-visible-video-autoplay":"","video-hover-play":"","image-loading":e.inFirstScreen?"eager":"lazy","image-fetch-priority":e.isLcpCandidate?"high":"auto",onClick:i[4]||(i[4]=e=>a("click")),onUpdateCommunityItem:i[5]||(i[5]=e=>a("updateCommunityItem",e))},oe({remix:J((()=>[K("div",xt,[e.item.canvasTemplateId&&!e.isMobile?(X(),Z(u,{key:0,type:"ghost",class:"w-full backdrop-blur-sm",size:"small",rounded:"lg",loading:V(s),onClick:i[0]||(i[0]=t=>V(l)(e.item.canvasTemplateId))},{default:J((()=>[K("span",yt,ee(t.$t("USE_CANVAS")),1)])),_:1},8,["loading"])):e.item.isPlayground?(X(),Z(u,{key:1,type:"ghost",class:"w-full backdrop-blur-sm",size:"small",rounded:"lg",onClick:i[1]||(i[1]=t=>a("usePlayground",e.item))},{default:J((()=>[K("span",_t,ee(t.$t("PLAYGROUND_TRY_THIS")),1)])),_:1})):(X(),Z(u,{key:2,type:"ghost",class:"w-full backdrop-blur-sm",size:"small",rounded:"lg",onClick:i[2]||(i[2]=t=>a("remix",e.item))},{default:J((()=>[K("span",bt,ee(t.$t("TOOLBAR_REMIX")),1)])),_:1}))])])),_:2},["audio"!==e.item.type?{name:"videoCover",fn:J((()=>[H(m,{trigger:"hover",placement:"top","show-arrow":!1,raw:""},{trigger:J((()=>[Q((X(),Z(u,{type:"ghost",class:"size-8 !p-0 backdrop-blur-sm",size:"small",rounded:"lg",onClick:i[3]||(i[3]=le((t=>a("setReferFrame",e.item)),["stop","prevent"]))},{default:J((()=>[H(c,{size:"16"},{default:J((()=>[H(d,{class:"size-4"})])),_:1})])),_:1})),[[f]])])),default:J((()=>[K("div",wt,ee(t.$t("GEN_VIDEO_TIPS")),1)])),_:1})])),key:"0"}:void 0]),1032,["item","image-loading","image-fetch-priority"])]))}}},Et=ve((()=>e((()=>import("./BjfRaslF.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url).then((e=>e.default||e)))),St=ve((()=>e((()=>import("./B2zPeKMA.js")),__vite__mapDeps([10,1,2,3]),import.meta.url).then((e=>e.default||e)))),It=ve((()=>e((()=>import("./BfwWOIos.js")),__vite__mapDeps([11,1,2,3,4,5,6,7]),import.meta.url).then((e=>e.default||e)))),Tt={key:0,class:"top-app-banner z-[30] flex min-h-[72px] shrink-0 items-center justify-end gap-3 p-4"},Ct={class:"render-container relative h-full"},Ot={class:"relative h-full md:overflow-y-visible"},Lt={class:"feed-search-sticky sticky z-20 bg-bg-8 p-4"},jt={key:0,class:"flex flex-col items-center gap-1 text-center whitespace-normal"},Nt={class:"text-sm font-medium leading-[22px] text-text-t-2"},Rt={class:"text-xs font-normal leading-[18px] text-text-t-1"},Ut={key:1,class:"text-center text-text-4"},At={key:0,class:"pb-24 mt-auto text-center"},zt={class:"end-msg text-text-4 dark:text-dark-text/40"},Pt={key:1,class:"flex -translate-y-10 items-center justify-center"},Ft={class:"flex gap-2"},Dt={key:2,class:"pointer-events-none sticky bottom-0 left-0 right-0 flex -translate-y-20 items-center justify-center py-10"},Mt={class:"fixed bottom-20 right-9 z-10 flex flex-col items-end gap-4 lg:bottom-6"},$t=Object.assign({name:u.FEED_WEB},{__name:"index",async setup(l){let s,i;const{isLogin:r,ensureLogin:o}=d((e=>{e&&(ot.value.isDone=!1)})),u=ve((()=>e((()=>import("./nuIACsfu.js")),__vite__mapDeps([12,1,2,3,4,5,6,7,8,13]),import.meta.url))),{t:U,locale:A}=c(),P=2,F=3,{setFrameOrRefer:D,setParamsByRemix:M}=m();p({title:()=>U("SEO_META.SEO_EXPLORE_TITLE"),ogTitle:()=>U("SEO_META.SEO_EXPLORE_TITLE"),description:()=>U("SEO_META.SEO_EXPLORE_DESC"),ogDescription:()=>U("SEO_META.SEO_EXPLORE_DESC")});const Y=G(!1),Q=G(null);Oe(Q,(([{isIntersecting:e}])=>{e&&(bt(),Y.value||0===Se.value.length||(Y.value=!0,o((()=>{}),{type:"More"})))}));const ae=f(),{recordCommunityScore:le}=Ne(),se=g(),{user:re}=v(),{isMobile:oe}=a(h()),ne=G(!1),_e=x(),be=y(),we=()=>r.value&&be.query?.tab||"Featured",Ee=()=>{et.value=!1,Se.value=[],Ie.value.vagueKey="",Ie.value.tags="",Ie.value.promptShow=-1,Ie.value.fileType=be.query?.fileType||-1,Ie.value.collationName=we(),tt.value={},nt.value=!1,Ze()},Se=G([]),Ie=G({collationName:we(),tags:"",vagueKey:"",promptShow:-1,fileType:be.query?.fileType||-1}),{toCreate:Pe}=_(),Fe=async({width:e,height:t,displayUrl:a,fileUrl:l,imgUrl:s})=>{D({url:a=s||l||a,width:e,height:t}),Pe("video")},De=b(),{openApp:Me}=Re(),$e=e=>{if(!e.isPlayground)return;const{displayUrl:t,imgUrl:a,fileUrl:l,playgroundName:s,appTemplateId:i}=e;if(i){const t=j(s);let a=`/tool-kits/${t}-template?id=${i}`;return"video"===e.type&&(a=`/video-effects/${t}/?id=${i}`),L(De(a))}Me(s,a||l||t)},Ye=(e,t)=>
2{if("audio"===e.type)return t;const a=Number(e.realWidth||e.width),l=Number(e.realHeight||e.height);return a&&l&&Number.isFinite(a)&&Number.isFinite(l)?t*l/a:t},qe=e=>e.columnSpan||1,Be=[{min:2320,cols:6},{min:1920,cols:5},{min:1440,cols:4},{min:1025,cols:3}],Ve=W((()=>{const e=se.width.value;return Be.find((t=>e>t.min))?.cols??2})),We=W((()=>oe.value?8:4)),Xe=W((()=>oe.value?750:1920)),Ge=G(null);w((()=>({link:Ge.value?[{rel:"preload",as:"image",href:Ge.value,fetchpriority:"high",crossorigin:"anonymous"}]:[]})));const He=G(null),Ke=()=>{const e=(()=>{const e=He.value;if(!e)return null;const t=e.nextElementSibling,a=t&&Number.parseFloat(getComputedStyle(t).top)||0,l=e.getBoundingClientRect().top+qt();return Math.max(0,Math.round(l-a))})();null!=e&&(qt()+1<e||(window.scrollTo({top:e}),Bt.value=e))},Je=G(!1),Ze=e=>{nt.value||("filter-tab"===e?.source&&(Je.value=!0,Ke(),xe(Ke),requestAnimationFrame(Ke)),ot.value={pageNum:0,pageSize:50,lastId:"",lastScoreIndex:"",isDone:!1},et.value=!1,bt())},Qe=W((()=>{const{isDone:e}=ot.value;return e&&Se.value?.length>0})),et=G(!1),tt=G(null),lt=k(),st=()=>{lt.setList(Se.value.filter((e=>!e.isAd&&!e.isDrama)))},it=(e,t)=>{try{window.trackEvent(e,{el:t})}catch(a){}},rt=e=>{(async(e,t)=>{switch(e){case"COMMON_PROMPT":R(t.prompt),S.success(U("TOAST_COPY_SUCCESS")),it("Community","thumbnail_more=copy_prompt");break;case"TOOLBAR_REMIX":le(t.fileId,"remix"),M(t,t.type),it("Community","thumbnails_remix"),S.success(U("ACTION_SUCCESS_TIPS")),ne.value=!0;break;case"TOOLBAR_COPY_LINK":let e=window.location.host+`/explore/${t.id}`;R(e),S.success(U("TOAST_COPY_SUCCESS")),it("Community","thumbnail_more=copy_link");break;case"REPORT":N({type:"GEN_CONTENT",commFileId:t.id}).then((e=>{"cancel"!==e&&(tt.value=t,Gt())})),it("Community","thumbnail_more=report")}})("TOOLBAR_REMIX",e)},ot=G({pageNum:0,pageSize:50,lastId:"",lastScoreIndex:"",isDone:!1}),nt=G(!1),ut=W((()=>({searchParam:Ie.value,isLoading:nt.value,isLogin:r.value}))),dt=W((()=>0===Se.value.length&&!ot.value.isDone)),ct=W((()=>nt.value&&Se.value.length>0)),mt=W((()=>0===Se.value.length&&ot.value.isDone)),pt=W((()=>mt.value&&"Following"===Ie.value.collationName)),ft=G(null),gt=async()=>{"function"!=typeof ft.value?.changeFilter?(await L({path:De("/explore/"),query:{tab:"Featured"}}),Ie.value.collationName="Featured",Ze({source:"filter-tab"})):await ft.value.changeFilter("Featured")},vt=W((()=>{const{pageNum:e=1}=ot.value;return Boolean(Ie.value.vagueKey.trim()&&1===e&&!nt.value)})),ht=(e,{resetList:t=!1}={})=>!e||e.error?(Je.value=!1,e?.error&&S.error(e.error),!1):(ot.value.searchId=JSON.stringify(Ie.value),ot.value.lastId=e.lastId,ot.value.lastScoreIndex=e.lastScoreIndex,ot.value.pageNum=e.pageNum,ot.value.isDone=e.isDone,t?Se.value=e.list:Se.value.push(...e.list),(t||1===e.pageNum)&&(Ge.value=(e=>{const t=Xe.value,a=Math.min(Math.floor(t/128),Ve.value),l=(t-2*(a-1))/a,s=new Array(a).fill(0);let i=null,r=1/0;for(const o of e){if(o.isAd||!o.displayUrl)continue;const e=Math.min(...s),t=s.indexOf(e),a=s[t];a<900&&a<r&&(r=a,i=o.displayUrl),s[t]=a+Ye(o,l)+2}return i})(Se.value)),t&&Je.value&&(Je.value=!1,Ke(),xe(Ke)),!0),xt=async(e,t,{ssr:a=!1,skipYield:l=!1}={})=>{const{pageNum:s=0,pageSize:i=50,isDone:r=!1,lastId:o="",lastScoreIndex:n=""}=e;if(r)return null;const u=s+1,d="Following"===t.collationName,c="Likes"===t.collationName?{lastLikeId:o}:{lastFileId:o},{status:m,data:p,message:f}=d?await T({pageSize:i,...o?{lastFileId:o}:{}},a):await C({lastScoreIndex:n,pageSize:i,...c,...t},a);if(0!==m)return{error:f};if(!p)return{list:[],lastId:o,lastScoreIndex:n,pageNum:u,isDone:!0};const g=p.encryptResult?ze(p.encryptResult):[],v=(Array.isArray(g)&&g.length?g:p.resultList)||[],h=await(async(e,{skipYield:t=!1}={})=>{const a=[];for(let l=0;l<e.length;l++){!t&&l>0&&l%10==0&&await new Promise((e=>{"requestIdleCallback"in window?window.requestIdleCallback((()=>e()),{timeout:60}):setTimeout(e,0)}));const s=e[l];a.push(Ue(s,{userId:re.userId,asRaw:!0,extra:({resolution:e,type:t})=>({audioUrl:s.audioUrl||("audio"===t?s.videoUrl:""),_uid:O(),width:s.realWidth||e.width,height:s.realHeight||e.height,displayUrl:s.highMiniUrl||s.thumbnailUrl||s.fileUrl})}))}return a})(v,{skipYield:l}),x=h.slice(-1).pop();return{list:h,lastId:p.lastId,lastScoreIndex:x?.lastScoreIndex??n,pageNum:u,isDone:0===h.length}},yt=async(e,{ssr:t=!1}={})=>{const{pageNum:a=0,pageSize:l=50,isDone:s=!1}=e;if(s)return null;const i=a+1,{status:r,data:o,message:n}=await I({page:i,pageSize:l,lang:A.value},t);if(0!==r)return{error:n};const u=o?.list||[],d=Number(o?.total)||0,c=(e=>{const t=[];for(const a of e||[])a?.id&&a?.coverUrl&&t.push(he({id:a.id,title:a.title||"",coverUrl:a.coverUrl,displayUrl:a.coverUrl,episodeCount:Number(a.episodeCount)||0,finishStatus:Number(a.finishStatus)||0,publishTime:a.publishTime||"",type:"drama",isDrama:!0,width:P,height:F,_uid:`drama-${a.id}`}));return t})(u);return{list:c,lastId:"",lastScoreIndex:"",pageNum:i,isDone:0===c.length||c.length<l||d>0&&i*l>=d}},_t=(e,t,a)=>(e=>
23===Number(e?.fileType))(t)?yt(e,a):xt(e,t,a),bt=async(e=!1)=>{if(nt.value)return;const{isDone:t=!1}=ot.value;if(t)return;nt.value=!0;const a=0===ot.value.pageNum,l=await _t(ot.value,Ie.value,{ssr:e,skipYield:a});nt.value=!1,l&&ht(l,{resetList:a})},wt={collationName:we(),tags:"",vagueKey:"",promptShow:-1,fileType:be.query?.fileType||-1},{data:$t,pending:Yt}=([s,i]=ue((()=>ke(`explore-feed-${JSON.stringify(wt)}`,(()=>_t({pageNum:0,pageSize:50,lastId:"",lastScoreIndex:"",isDone:!1},wt,{ssr:!0,skipYield:!0})),{lazy:!0}))),s=await s,i(),s);de($t,(e=>{(e=>{e&&!e.error&&(Ie.value={...wt},ht(e,{resetList:!0}))})(e)}),{immediate:!0}),de(Yt,(e=>{e&&0===Se.value.length?nt.value=!0:(!e&&Se.value.length>0&&(nt.value=!1),!e&&$t.value?.error&&(nt.value=!1))}),{immediate:!0});const qt=()=>window.scrollY||document.documentElement.scrollTop||0,Bt=G(0),Vt=G(!0),Wt=Le((()=>{Vt.value&&(Bt.value=qt())}),100);je(window,"scroll",Wt,{passive:!0});const Xt=G(null),Gt=()=>{const e=Se.value.findIndex((e=>tt.value.id===e.id));if(e<0)return;const t=he({...Se.value[e],reported:!0});Se.value.splice(e,1,t),et.value&&Xt.value?.forceUpdatePreview(t)},Ht=()=>{et.value=!1,tt.value={}},Kt=()=>{Bt.value=0,window.scrollTo({top:0,behavior:"smooth"})},Jt=()=>{window.scrollTo({top:Bt.value})},Zt=e=>{const t=Se.value.findIndex((t=>t.id===e.id));if(t<0)return;if(e.isDel)return void Se.value.splice(t,1);const a=Se.value[t];Se.value.splice(t,1,he({...a,...e}))};return E((()=>{Bt.value=qt()})),ce((()=>{Vt.value=!1,Bt.value=qt()})),me((()=>{Vt.value=!0,Jt(),xe(Jt)})),pe((()=>{ae.subscribe("updateCommunityItem",Zt),ae.subscribe("closePreview",Ht)})),fe((()=>{ae.unsubscribe("updateCommunityItem",Zt),ae.unsubscribe("closePreview",Ht)})),de((()=>et.value),(e=>{e||xe((()=>{Jt()}))})),de((()=>_e.key["/explore/"]),(()=>{Ee()})),de((()=>be.query?.fileType),((e,t)=>{e!=t&&Ee()})),(e,a)=>{const l=t,s=at,i=kt,d=n,c=Te,m=z,p=$,f=Et,g=St,v=It,h=Ce;return X(),q(te,null,[V(oe)?B("",!0):(X(),q("header",Tt,[H(l,{"show-profile-name":""})])),K("main",Ct,[K("div",Ot,[H(s),K("div",{ref_key:"feedSearchAnchorRef",ref:He,class:"pointer-events-none h-0 overflow-hidden","aria-hidden":"true"},null,512),K("div",Lt,[H(V(u),ge({ref_key:"headerSearchRef",ref:ft},V(ut),{onWhenSearch:Ze}),null,16)]),H(Ae,{class:"box-content min-h-[100vh] mx-4 overflow-hidden rounded-t-2xl",padding:"0 0 100px 0",gap:V(We),"row-key":"_uid",virtual:"",items:V(Se),pending:V(dt),"calc-item-height":Ye,"item-min-width":128,"preload-screen-count":[1,2],"max-column-count":V(Ve),"cross-columns":qe},{default:J((({item:e,inFirstScreen:t,isLcpCandidate:a})=>[H(i,{item:e,"in-first-screen":t,"is-lcp-candidate":a,"is-mobile":V(oe),onClick:st,onUpdateCommunityItem:Zt,onRemix:rt,onUsePlayground:$e,onSetReferFrame:Fe},null,8,["item","in-first-screen","is-lcp-candidate","is-mobile"])])),before:J((()=>[V(mt)?(X(),Z(c,{key:0,class:"mx-auto w-full max-w-[800px] px-4 py-16",type:"notice"},{text:J((()=>[V(pt)?(X(),q("div",jt,[K("p",Nt,ee(V(U)("FILTER.FOLLOWING_EMPTY_TITLE")),1),K("p",Rt,ee(V(U)("FILTER.FOLLOWING_EMPTY_DESC")),1)])):(X(),q("span",Ut,ee(V(vt)?V(U)("NO_SUCH_RES"):V(U)("EMPTY_DATA")),1))])),default:J((()=>[V(pt)?(X(),Z(d,{key:0,type:"primary",size:"small",class:"!h-9 !min-h-9 !px-3",onClick:gt},{default:J((()=>[ye(ee(V(U)("FILTER.GO_FEATURED")),1)])),_:1})):B("",!0)])),_:1})):B("",!0)])),_:1},8,["gap","items","pending","max-column-count"]),K("div",{ref_key:"invisibleRef",ref:Q,class:"invisible -translate-y-40"},null,512),V(Qe)&&V(r)?(X(),q("div",At,[K("span",zt,ee(V(U)("SHORT_NO_MORE")),1)])):V(Qe)?(X(),q("div",Pt,[H(d,{type:"primary",class:"min-w-40",onClick:a[0]||(a[0]=e=>V(o)(Ze))},{default:J((()=>[K("div",Ft,[ye(ee(e.$t("HOME.VIEWALL"))+" ",1),H(m,{class:"h-4 w-4"})])])),_:1})])):B("",!0),V(ct)?(X(),q("div",Dt,[H(V(ie),{size:"32",class:"text-primary"},{default:J((()=>[H(p)])),_:1})])):B("",!0)])]),K("aside",Mt,[H(f),V(Bt)>500?(X(),Z(g,{key:0,class:"!relative !bottom-0 !right-0",onClick:Kt})):B("",!0),H(v,{to:"/explore/rule/"})]),V(r)?B("",!0):(X(),Z(h,{key:1}))],64)}}}),Yt=P($t,[["__scopeId","data-v-668fcfa7"]]);export{Yt as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.