PageSourceSearch

https://www.sporttv.pt/_nuxt/D-gX23ak.js

js sporttv.pt collected 2026-10-01 11:28:48 UTC 5,192 bytes, 1 lines download raw bytes

1import J from"./CyPgeJRF.js";import{k as ee,c as te,u as ae,o as oe,b as le}from"./CM_Wyx7H.js";import{k as re,v as se,w as ne,x as ie,y as C,j as ue}from"./B3s3tHEp.js";import{a as ce}from"./DJe5h_GG.js";import{N as _e}from"./LF_x_BYy.js";import{_ as de}from"./IHAhuMeB.js";import{j as ve,k as a,a as c,a4 as ge,H as fe,n as me,O as r,P as i,u as l,Q as R,U as L,W as I,X as b,a2 as U,Y as H,V as Y,a3 as pe}from"./cVuhXwai.js";import{_ as Ee}from"./DlAUqK2U.js";import"./JtzmZDUP.js";import"./B1l7X2wM.js";const Ne={class:"news-all-page"},he={key:0,class:"news-all-page__loading"},ye={class:"news-all-page__header"},we={class:"news-all-page__title headingDesktopTitle01"},Se={key:0,class:"news-all-page__grid"},Ie={key:1,class:"news-all-page__grid"},Pe={key:2,class:"news-all-page__empty"},Te={class:"bodyNormalBold"},Oe={key:3,class:"news-all-page__load-more"},ke=["disabled"],d=9,j="news-all-page-second-page",Ae=ve({__name:"todas",async setup(Ce){let h,W;const{getToken:o}=ee(),v=te(),F=le(),g=a(()=>v.query.category||void 0),f=a(()=>v.query.tag||void 0),Q=a(()=>v.query.tagName||""),m=a(()=>v.query.type||void 0),P=a(()=>v.query.search||void 0),D=a(()=>m.value==="most-viewed"),x=a(()=>m.value==="popular"),M=a(()=>m.value==="latest"),G=a(()=>m.value==="saved"),s=a(()=>m.value==="opinions"),T=a(()=>!!P.value),V=a(()=>!!f.value),u=c([]),p=c([]),E=c(!1),y=c(1),O=c(!0),w=c(!1),_=c(""),k=c(-1),$=a(()=>T.value&&!s.value),z=async()=>{if(g.value)try{const e=await ce(g.value);e!=null&&e.title&&(_.value=e.title)}catch(e){console.error("[NewsAll] Error fetching category title:",e)}},K=e=>({id:e.newsId,title:e.title,slug:e.slug,thumbnail:e.thumbnail??"",publishedAt:e.savedAt}),A=async e=>s.value?await re(e,d):T.value?await se(P.value,e,d):D.value?await ne(e,d):x.value?await ie(e,d):M.value?await C(e,d):G.value?{docs:(await ue(1,100)).map(K),hasNextPage:!1,page:1}:V.value?await C(e,d,void 0,[f.value]):await C(e,d,g.value);try{const[e,t]=([h,W]=ge(()=>
1Promise.all([A(1),$.value?A(2):Promise.resolve(void 0),z()])),h=await h,W(),h);s.value?p.value=(e==null?void 0:e.docs)??[]:u.value=(e==null?void 0:e.docs)??[],E.value=(e==null?void 0:e.hasNextPage)??!1,y.value=(e==null?void 0:e.page)??1;const n=(t==null?void 0:t.docs)??[];E.value&&n.length>0&&(k.value=u.value.length,u.value=[...u.value,...n],E.value=(t==null?void 0:t.hasNextPage)??!1,y.value=(t==null?void 0:t.page)??2)}catch(e){console.error("[NewsAll] Error fetching initial news:",e)}finally{O.value=!1}const S=a(()=>T.value?o("NEWS_SEARCH_TITLE",[P.value.replace(/-/g," ")]):D.value?o("NEWS_MOST_VIEWED"):x.value?o("NEWS_POPULAR"):M.value?o("NEWS_BREAKING_NEWS"):G.value?o("NEWS_SAVED_ARTICLES"):s.value?o("MEGAMENU_OPINIAO"):V.value?o("NEWS_TAG_TITLE",[Q.value||f.value]):_.value?_.value:o("NEWS_ALL_TITLE")),X=a(()=>s.value?p.value:u.value);fe(async()=>{if(!$.value)return;await me(),window.scrollTo({top:0,behavior:"auto"});const e=document.getElementById(j);e&&requestAnimationFrame(()=>{e.scrollIntoView({behavior:"smooth",block:"start"})})});const Z=async()=>{if(!w.value){w.value=!0;try{const e=y.value+1,t=await A(e);if(s.value){const n=(t==null?void 0:t.docs)??[];p.value=[...p.value,...n]}else{const n=(t==null?void 0:t.docs)??[];u.value=[...u.value,...n]}E.value=(t==null?void 0:t.hasNextPage)??!1,y.value=(t==null?void 0:t.page)??e}catch(e){console.error("[NewsAll] Error loading more news:",e)}finally{w.value=!1}}},B=a(()=>{const e=`${F.public.SITE_URL}${oe.allNews}`;return s.value?`${e}?type=opinions`:g.value?`${e}?category=${g.value}`:f.value?`${e}?tag=${f.value}`:e});return ae({title:a(()=>S.value),link:[{rel:"canonical",key:"canonical",href:B}],meta:[{hid:"description",name:"description",content:a(()=>s.value?o("NEWS_OPINIONS_SEO_DESCRIPTION"):_.value?o("NEWS_SEO_CATEGORY_DESCRIPTION",[_.value]):o("NEWS_ALL_SEO_DESCRIPTION"))},{hid:"og:title",property:"og:title",content:a(()=>S.value)},{hid:"og:description",property:"og:description",content:a(()=>s.value?o("NEWS_OPINIONS_SEO_DESCRIPTION"):_.value?o("NEWS_SEO_CATEGORY_DESCRIPTION",[_.value]):o("NEWS_ALL_SEO_DESCRIPTION"))},{hid:"og:type",property:"og:type",content:"website"},{hid:"og:url",property:"og:url",content:B},{hid:"twitter:card",name:"twitter:card",content:"summary_large_image"},{hid:"twitter:title",name:"twitter:title",content:a(()=>S.value)}]}),(e,t)=>{const n=J;return r(),i("div",Ne,[l(O)?(r(),i("div",he,[R(n,{height:"60px",style:{"background-color":"#636363"}}),R(n,{height:"600px",style:{"background-color":"#636363"}})])):(r(),i(L,{key:1},[I("div",ye,[I("h1",we,b(l(S)),1)]),l(s)?(r(),i("div",Ie,[(r(!0),i(L,null,U(l(p),N=>(r(),Y(de,{key:`opinion-${N.id}`,opinion:N},null,8,["opinion"]))),128))])):(r(),i("div",Se,[(r(!0),i(L,null,U(l(u),(N,q)=>(r(),Y(_e,{key:N.id,article:N,id:q===l(k)?j:void 0,class:pe(q===l(k)?"news-all-page__second-page-anchor":"")},null,8,["article","id","class"]))),128))])),l(X).length===0&&!l(O)?(r(),i("div",Pe,[I("p",Te,b(l(o)("NEWS_ALL_EMPTY")),1)])):H("",!0),l(E)?(r(),i("div",Oe,[I("button",{class:"news-all-page__load-more-btn buttonPrimary",disabled:l(w),onClick:Z},b(l(o)("NEWS_ALL_LOAD_MORE")),9,ke)])):H("",!0)],64))])}}}),qe=Ee(Ae,[["__scopeId","data-v-e4950c30"]]);export{qe 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.