1import{_ as a}from"./prev-BM8kEqdX.js";import{c as e,r as l,V as o,f as t,x as r,B as n,O as u,u as s,J as i,K as d,aA as v,au as c,g as f,n as m,y as p,H as h,a6 as y}from"./vendor-core-DockhpYX.js";import{_ as g,a1 as _,cR as w,cS as k}from"./index-DIXwfVMT.js";import{a as C,_ as j}from"./PullTo-BIvbThln.js";import{C as b}from"./creatorCard-CgJ8ZyvR.js";import"./i18n-misc-CJ8HFqLU.js";import"./axios-C-1G2k3o.js";import"./element-plus-CADUlNlv.js";import"./@ffmpeg-CcTuH-sP.js";import"./@paypal-DitgUCQS.js";import"./LazyLoadImg-Bzjg4n3F.js";const x={class:"featured-creators-page height-all flex-column"},F={class:"featured-creators-header"},z={class:"featured-creators-title"},B={class:"featured-creators-list-wrap flex1 height-0"},L={key:1,class:"featured-creators-list"},$=g({__name:"featuredCreators",setup(g){var $;const H={en:"Featured Creators","zh-Hans":"ç²¾éåä½è
","zh-Hant":"ç²¾é¸åµä½è
",es:"Creadores destacados",pt:"Criadores em destaque",ko:"ì¶ì² í¬ë¦¬ìì´í°",ja:"注ç®ã®ã¯ãªã¨ã¤ã¿ã¼",de:"Ausgewählte Creator",it:"Creator in evidenza",fr:"Créateurs à la une",ru:"РекомендÑемÑе авÑоÑÑ"},I=c(),R=v(),U=_(),M=null==($=f())?void 0:$.appContext.config.globalProperties,{$$language:q,$$t:A}=(null==M?void 0:M.$i18n)??{},J=e(()=>{const a=(null==q?void 0:q())||"en";return H[a]||H.en}),N=l(null),P=l([]),E=l(!1),K=l(!1),O=l(!1),S=l(!1),T=l(!1),V=l(null),D=l(!0),G=o({networkerror:(null==A?void 0:A("common.network_error"))||"Network error",loadfailure:(null==A?void 0:A("common.load_failure"))||"Load failed",contentviolation:(null==A?void 0:A("common.content_violation"))||"Content unavailable",emptydata:(null==A?void 0:A("common.empty_data"))||"No data yet"}),Q=e(()=>!P.value.length&&S.value),W=async(a=!1)=>{var e;if(O.value||!a&&E.value||a&&!D.value)return;a?O.value=!0:E.value=!0,T.value=!1;let l=0;try{const o={page_size:20,module_id:(null==(e=R.query)?void 0:e.module_id)||void 0};a&&null!=V.value&&(o.last_id=V.value);const t=await w(null,o),r=k((null==t?void 0:t.data)||t);V.value=(null==r?void 0:r.last_id)??null,D.value=Boolean(null==r?void 0:r.has_more),S.value=!D.value;const n=(null==r?void 0:r.list)||[];l=n.length,((a=[],e=!1)=>{P.value=e?[...P.value,...a]:a})(n,a)}catch(o){throw T.value=!a&&!P.value.length,o}finally{a?O.value=!1:E.value=!1}await(async(a=0)=>{var e;!D.value||a<=0||(await m(),(null==(e=N.value)?void 0:e.checkIsFull())&&await W(!0))})(l)},X=async(a,e)=>{K.value=!0;try{await W(!1),null==a||a(P.value,S.value)}catch(l){null==e||e(l)}finally{K.value=!1}},Y=async(a,e)=>{if(!D.value)return S.value=!0,void(null==a||a(P.value,!0));try{await W(!0),null==a||a(P.value,S.value)}catch(l){null==e||e(l)}},Z=async()=>{await U.refreshHomeFeaturedCreators(),window.history.length>1?I.back():I.push({name:"home"})},aa=({userId:a,isFollowed:e})=>{P.value=P.value.map(l=>l.user_id!==a?l:{...l,is_followed:Boolean(e)})};return t(()=>{var a;null==(a=null==M?void 0:M.logCustomEvent)||a.call(M,"featured_creators_list_view"),W()}),(e,l)=>{var o;return p(),r("div",x,[n("div",F,[n("button",{class:"back-btn pointer",onClick:Z},[l[5]||(l[5]=n("img",{src:a,alt:"back"},null,-1)),n("span",null,u((null==(o=s(A))?void 0:o("library.Back"))||"Back"),1)])]),n("div",z,u(J.value),1),n("div",B,[T.value?(p(),i(j,{key:1,type:"loadfailure",info:G,onRetry:l[4]||(l[4]=a=>W())},null,8,["info"])):(p(),i(C,{key:0,ref_key:"pullRef",ref:N,"loading-more":O.value,"onUpdate:loadingMore":l[0]||(l[0]=a=>O.value=a),"is-loading":E.value,"onUpdate:isLoading":l[1]||(l[1]=a=>E.value=a),refreshing:K.value,"onUpdate:refreshing":l[2]||(l[2]=a=>K.value=a),finished:S.value,"onUpdate:finished":l[3]||(l[3]=a=>S.value=a),datas:P.value,"show-info":G,onRefresh:X,onLoadMore:Y},{customContent:d(()=>[Q.value?(p(),i(j,{key:0,type:"emptydata",info:G,"hide-retry":!0},null,8,["info"])):(p(),r("div",L,[(p(!0),r(h,null,y(P.value,a=>(p(),i(b,{key:a.user_id,data:a,"profile-source":"featured_creators_list","view-mode":"list",onFollowChange:aa},null,8,["data"]))),128))]))]),_:1},8,["loading-more","is-loading","refreshing","finished","datas","show-info"]))])])}}},[["__scopeId","data-v-a5da6e96"]]);export{$ 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.