1import X from"./qdCxvroI.js";import{s as B,_ as Q,a as U}from"./C-y6db50.js";import{o as Y,b as Z,u as z,q as J}from"./rYqlmPdd.js";import{L as i,M as o,N as S,T as ee,_ as n,R as V,O as I,P as N,Q as q,ac as te,ad as ae,c as u,V as P,f as k,G as le,C as j,n as se,u as t,$ as F}from"./DQsU5YNN.js";import{u as re}from"./CDMsTvD2.js";import"./BdGRe0ex.js";import"./CAU5F8yj.js";import"./D4Fa3VAj.js";import"./BfzDkvDZ.js";import"./B2kiRKAx.js";const ie={class:"py-6 mb-10 bg-green-light relative"},oe={class:"container-custom"},ne={class:"text-[34px] leading-10 mb-7 text-black-custom"},ce={__name:"LArticleRecommended",props:{title:{type:String,default:"Rekomenduojame"},items:{type:Array,default:()=>[]}},setup(w){return(s,c)=>{const A=Y,p=te,R=ae;return i(),o("div",ie,[S("div",oe,[S("h3",ne,ee(w.title),1),n(R,{"slides-per-view":1.2,"space-between":32,breakpoints:{768:{slidesPerView:2,spaceBetween:40},1024:{slidesPerView:4,spaceBetween:50}}},{default:V(()=>[(i(!0),o(I,null,N(w.items,b=>(i(),q(p,{key:b.kpm3id},{default:V(()=>[n(A,{post:b,trackingKey:"recommended"},null,8,["post"])]),_:2},1024))),128))]),_:1})])])}}},ue={class:"pt-11 bg-white"},pe={key:0},_e={class:"container-custom relative bg-white"},me={key:1,class:"container-custom relative bg-white"},de={key:2,class:"container-custom relative bg-white py-24"},K=6,D=12,Ce={__name:"index",async setup(w){let s,c;const A=Z(),p=u(null),b=A.params.slug.match(/\d+$/)[0],{data:_}=([s,c]=P(()=>z(`https://kolumbus-api.lrytas.lt/query/?kpm3id=${b}&order=pubfromdate-&type=Foto,foto,photogallery,Photogallery&count=1&ret_fields=props.path__AS__path`,"$M7rzMTYeZk")),s=await s,c(),s),G=k(()=>_.value&&_.value.result&&_.value.result[0]&&_.value.result[0].path?_.value.result[0].path:""),{data:e,pending:O}=([s,c]=P(()=>z(`https://content-api.lrytas.lt/api/content/?path=${G.value}&adsEvery=${K}&maxAds=${D}`,{lazy:!0},"$jVgudo48XC")),s=await s,c(),s),{data:m}=([s,c]=P(()=>z("https://kolumbus-api.lrytas.lt/query/?tag_slugs=isskirtiniai-tekstai&count=20&type=Articolo,Foto,Recipe,Komentaras,custom_teaser&order=pubfromdate-&ret_fields=props.overtitle__AS__overtitle,props.enable_carousel__AS__enable_carousel,props._summaryClear__AS__summary,fb_shares__AS__fb_shares,props.type__AS__type,props.updated_local_ts__AS__dateedited,props.href__AS__href,props.kpm3id__AS__kpm3id,props.title__AS__title,props.commentCount__AS__commentCount,props._photoCount__AS__photoCount,props._videoCount__AS__videoCount,props.tema__AS__label,img300x200__AS__thumb,img1080x720__AS__thumb_large,props.categories__AS__categories",{lazy:!0},"$gUXuRFrOid")),s=await s,c(),s),C=k(()=>({keyword:e.value&&e.value.articles&&e.value.articles.length>0?e.value.articles[0].article.lastTagSlug:"",category:e.value&&e.value.articles&&e.value.articles.length>0?e.value.articles[0].article.subblockTag.slug:""})),$=k(()=>e.value&&e.value.articles&&e.value.articles.length>0?e.value&&e.value.articles&&e.value.articles[0].article.kpm3id:""),d=u([]),x=u([]),v=u(!1),L=u(!1),E=u(!1);u(null),le(()=>{e.value&&e.value.infiniteList&&e.value.infiniteList.length>0&&!L.value&&(d.value=e.value.infiniteList,L.value=!0),e.value&&e.value.articles&&e.value.articles[0]&&!E.value&&(x.value.push(e.value.articles[0]),E.value=!0)});const h=k(()=>{if(m.value&&m.value.result&&m.value.result.length>0){const a=[];for(let r=0;r<m.value.result.length;r+=4)a.push(m.value.result.slice(r,r+4));return a}else return[]});async function H(){if(L.value&&d.value&&d.value.length>0&&!v.value)try{v.value=!0;const l=d.value[0];d.value.shift();const a=await $fetch(`https://content-api.lrytas.lt/api/content/?path=${l}&adsEvery=${K}&maxAds=${D}`);a&&a.articles&&a.articles[0]&&(x.value.push(a.articles[0]),v.value=!1)}catch(l){v.value=!1,console.log("Error loading infinite scroll article",l)}}j(async()=>{await se(),setTimeout(()=>{const l=new IntersectionObserver(([a])=>{a.isIntersecting&&H()},{threshold:.5,rootMargin:"100px"});p.value&&l.observe(p.value)},1)});const W=k(()=>{var l,a;return e.value&&e.value.articles[0]?[{hid:"og:title",property:"og:title",content:e.value.articles[0].article.title},{hid:"description",name:"description",content:B(e.value.articles[0].articleContent[0]?e.value.articles[0].articleContent[0].plainText:e.value.articles[0].articleSummary||"",{allowedTags:[]})||""},{hid:"og:image",property:"og:image",content:((l=e.value.articles[0].article.media[0])==null?void 0:l.mediumsrc)||((a=e.value.articles[0].article.media[0])==null?void 0:a.src)||"https://www.lrytas.lt/embed.png"},{hid:"og:description",property:"og:description",content:B(e.value.articles[0].articleContent[0]?e.value.articles[0].articleContent[0].plainText:e.value.articles[0].articleSummary||"",{allowedTags:[]})||""},{hid:"og:type",property:"og:type",content:"article"},{hid:"og:url",property:"og:url",content:e.value.articles[0].article.href.endsWith("/")?e.value.articles[0].article.href.slice(0,-1):e.value.articles[0].article.href}]:[]});return re({title:e.value?e.value.articles[0].article.title:"",meta:W.value,link:[{rel:"stylesheet",href:"https://use.typekit.net/hek1pis.css"}],__dangerouslyDisableSanitizersByTagID:{"og:image":["content"]}}),j(()=>{const l=J();let a=!1;const r=()=>{if(a||!l.state.grants.analytics)return;a=!0;const g=document.createElement("script");g.async=!0,g.src=`https://lijuke.panel.kantartns.lt/bug/pic.gif?siteid=lrytas.lt&j=1&nocache=${Math.random()}`,document.body.appendChild(g);const y=document.createElement("script");y.async=!0,y.src="https://lisource.panel.kantartns.lt/cm/cm.js",document.body.appendChild(y)};l.onResolved(r),l.onChange(r)}),(l,a)=>{const r=X,g=Q,y=ce,M=U;return i(),o("div",ue,[n(r,{id:"wallpaper","in-article":"",kpm3id:t($),content:{position_name:"wallpaper"},kv:t(C),"no-lazy":""},null,8,["kpm3id","kv"]),n(r,{id:"scroller","in-article":"",kpm3id:t($),content:{position_name:"scroller"},kv:t(C),"no-lazy":""},null,8,["kpm3id","kv"]),n(r,{id:"circle-float","in-article":"",kpm3id:t($),content:{position_name:"circle_float"},kv:t(C),"no-lazy":""},null,8,["kpm3id","kv"]),!t(O)&&t(e)&&t(e).articles&&t(e).articles.length>0?(i(),o("div",pe,[(i(!0),o(I,null,N(t(x),(f,T)=>(i(),o("div",{key:f.kpm3id},[S("div",_e,[n(g,{article:f.article,"article-content":f.articleContent,"article-summary":f.articleSummary,"article-premium-content":f.articlePremiumSummary,"is-photogallery":""},null,8,["article","article-content","article-summary","article-premium-content"])]),t(h)&&t(h).length>0&&t(h)[T]&&t(h)[T].length>0?(i(),q(y,{key:0,items:t(h)[T]},null,8,["items"])):F("",!0)]))),128))])):(i(),o("div",me,[n(M)])),S("div",{ref_key:"bottom",ref:p,class:"py-24"}
1,null,512),t(v)?(i(),o("div",de,[n(M)])):F("",!0)])}}};export{Ce 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.