1import{d as Be,j as De,U as Ne,u as Me,z as Ye,k as je,l as He,C as ye,V as he,W as j,N as ze,s as qe,a as Ze,b as Fe,c as d,f as p,e as i,w as H,t as f,m as s,F as $,n as _,g as T,B as z,r as Je,i as l,p as y,J as ge,_ as We,o as u,q,x as Ge,y as P,K as Ke}from"./B0QnNv5Y.js";import{u as Qe,_ as Xe}from"./Cv7eV0po.js";import et from"./DoZWNKCO.js";import{s as tt}from"./BLYkUC0l.js";const at={class:"container py-6"},ot={class:"flex items-center gap-3 mb-6","aria-label":"Breadcrumb"},st={class:"text-theme-secondary-500 dark:text-theme-secondary-300 text-sm"},nt={key:0,class:"flex items-center justify-center min-h-[400px]"},it={class:"pb-4 border-b-2 border-theme-primary-500"},rt={class:"font-display font-bold text-2xl md:text-3xl text-theme-ui-page-text dark:text-theme-ui-d-page-text"},lt={key:0,class:"font-serif text-theme-secondary-600 dark:text-theme-secondary-400 mt-2 line-clamp-3"},ut={class:"mt-6 md:mt-8 flex flex-col lg:flex-row gap-6"},dt={class:"w-full lg:w-2/3"},ct={key:0,class:"bg-black rounded-lg"},mt={key:1,class:"bg-black rounded-lg"},pt={key:2,class:"bg-black rounded-lg"},vt={class:"mt-3 md:mt-4"},yt={key:0,class:"font-serif font-bold text-lg md:text-xl text-theme-ui-card-text dark:text-theme-ui-d-card-text"},ht={key:1,class:"text-sm text-theme-secondary-500 dark:text-theme-secondary-300 mt-1 block"},gt={key:1,class:"aspect-video bg-theme-secondary-100 dark:bg-theme-secondary-800 rounded-lg flex items-center justify-center"},ft={key:2,class:"mt-6"},_t=["src","alt"],xt={key:0,class:"w-full lg:w-1/3"},bt={class:"flex items-center justify-between mb-3"},wt={class:"font-display font-semibold text-lg text-theme-ui-card-text dark:text-theme-ui-d-card-text flex items-center gap-2"},kt={class:"text-sm font-normal text-theme-secondary-500 dark:text-theme-secondary-300"},It={class:"autoplay-toggle__track"},St={class:"autoplay-toggle__knob"},$t={class:"lg:max-h-[600px] lg:overflow-y-auto border border-theme-secondary-200 dark:border-theme-secondary-700 rounded-lg"},Et={class:"flex items-start gap-2"},Ut={class:"min-w-0 flex-1"},Ct={class:"text-sm font-display font-medium text-theme-ui-card-text dark:text-theme-ui-d-card-text line-clamp-2"},Lt={key:0,class:"text-xs text-theme-secondary-500 dark:text-theme-secondary-300 mt-0.5 block"},Ot=["disabled"],fe="emisiuni:autoplay",_e="show-player",xe="yt-player",Z="onn-player-container",Tt=Be({__name:"[slug]",async setup(Pt){let F,J;const W=De(),be=Ne(),A=l(()=>W.params.slug),{siteUrl:we,siteName:E,defaultOgImage:ke}=Me(),{getPosition:Ie}=Ye(),{hasAdConsent:Se}=Qe(),G=je(),K=l(()=>{if(!Se.value)return null;const e=Ie("show-preroll"),t=e?.desktop??e?.mobile;return!t||t.type!=="gam"||!t.adUnitPath?null:`https://pubads.g.doubleclick.net/gampad/live/ads?iu=${encodeURIComponent(t.adUnitPath)}&description_url=&env=vp&impl=s&correlator=&tfcd=0&npa=0&gdfp_req=1&output=vast&sz=640x480&unviewed_position_start=1`}),$e=l(()=>we.value||window.location.origin),Q=y(null),v=y([]),R=y(1),V=y(!1),U=y(!1),B=y(!0),Ee=async()=>{B.value=!0;const e=await G.shows.getBySlug(A.value).execute({episodes_page:1});if(e.error)throw Ge({statusCode:e.error.status||404,message:"Emisiunea nu a fost gasita"});e.data&&(Q.value=e.data,v.value=e.data.episodes.data,R.value=e.data.episodes.pagination.page,V.value=e.data.episodes.pagination.hasMore),B.value=!1};[F,J]=He(()=>Ee()),await F,J();const r=l(()=>Q.value?.show),I=l(()=>r.value?.isYoutube??!1),C=l(()=>W.query.id||null),o=l(()=>{if(!v.value.length)return null;if(C.value){const e=v.value.find(t=>t.path1===C.value);if(e)return e}return v.value[0]}),X=l(()=>!I.value&&!!o.value?.onnExported&&!!o.value?.onnSid),Ue=l(()=>o.value?v.value.findIndex(e=>e.path1===o.value.path1):-1),ee=l(()=>{const e=Ue.value;return e<0||e>=v.value.length-1?null:v.value[e+1]}),x=y(!0),S=y(!1);ye(()=>{const e=localStorage.getItem(fe);e!==null&&(x.value=e==="1"),window.addEventListener("message",se)}),he(x,e=>{localStorage.setItem(fe,e?"1":"0")});const Ce=e=>{S.value=!0,be.replace({query:{id:e.path1}})},D=()=>{x.value&&ee.value&&Ce(ee.value)},Le=async()=>{U.value=!0;const e=R.value+1,t=await G.shows.getBySlug(A.value).execute({episodes_page:e});t.data&&(v.value=[...v.value,...t.data.episodes.data],R.value=e,V.value=t.data.episodes.pagination.hasMore),U.value=!1},te=e=>{const t=new Date(e),n=t.toLocaleDateString("ro-RO",{weekday:"long",timeZone:"Europe/Bucharest"}),a=t.toLocaleTimeString("ro-RO",{hour:"2-digit",minute:"2-digit",timeZone:"Europe/Bucharest"}),c=t.toLocaleDateString("ro-RO",{day:"numeric",month:"long",year:"numeric",timeZone:"Europe/Bucharest"});return`${n.charAt(0).toUpperCase()+n.slice(1)} ${a}, ${c}`},h=y(null),ae=y(!1),oe=async e=>{const{default:t}=await ge(async()=>{const{default:c}=await import("./D02re3bK.js");return{default:c}},[],import.meta.url);Object.assign(window,{Hls:t});const{default:n}=await ge(async()=>{const{default:c}=await import("./7NSlEXLi.js").then(m=>m.o);return{default:c}},[],import.meta.url);if(h.value){try{h.value.remove()}catch{}h.value=null}
1const a={autoStart:S.value,autoFallback:!0,mute:!1,sources:[{type:"mp4",file:e}]};K.value&&(a.adClient="googleima",a.adTagUrl=K.value),h.value=n.create(_e,a),h.value.on("stateChanged",c=>{c.newstate==="complete"&&D()})};ye(async()=>{o.value&&(await j(),I.value&&o.value.youtubeVideoId?await re(o.value.youtubeVideoId):X.value&&o.value.onnSid?ne(o.value.onnSid):o.value.videoUrl&&await oe(o.value.videoUrl),ae.value=!0)}),he(o,async(e,t)=>{if(!e||!ae.value||e.path1===t?.path1)return;const n=!!t?.onnExported&&!!t?.onnSid&&!I.value,a=!!e.onnExported&&!!e.onnSid&&!I.value;if(n&&!a&&ie(),I.value&&e.youtubeVideoId){await re(e.youtubeVideoId);return}if(a&&e.onnSid){if(h.value){try{h.value.remove()}catch{}h.value=null}await j(),ne(e.onnSid);return}e.videoUrl&&(await j(),await oe(e.videoUrl))});const b=y(null),w=y(null),se=e=>{if(!(typeof e.data!="string"||!e.data.startsWith("onntv://")))try{const t=JSON.parse(e.data.substring(8));t?.sender==="onntv"&&t?.comm==="moviecompleted"&&D()}catch{}},ne=e=>{const t=document.getElementById(Z);if(!t)return;if(w.value){try{w.value.remove()}catch{}w.value=null}t.innerHTML="";const n=document.createElement("script");n.type="text/javascript";
1const a=S.value?"&ap=1&map=1":"";n.src="https://video.onnetwork.tv/embed.php?sid="+encodeURIComponent(e)+a,n.async=!0,t.appendChild(n),w.value=n},ie=()=>{const e=document.getElementById(Z);if(e&&(e.innerHTML=""),w.value){try{w.value.remove()}catch{}w.value=null}},Oe=()=>new Promise(e=>{const t=window;if(t.YT&&t.YT.Player){e();return}if(!document.querySelector('script[src="https://www.youtube.com/iframe_api"]')){const m=document.createElement("script");m.src="https://www.youtube.com/iframe_api",document.head.appendChild(m)}const a=t.onYouTubeIframeAPIReady;t.onYouTubeIframeAPIReady=()=>{a?.(),e()};const c=tt(()=>{t.YT&&t.YT.Player&&(clearInterval(c),e())},100)}),re=async e=>{await Oe();const t=window;if(b.value){try{b.value.destroy()}catch{}b.value=null}const n=document.getElementById(xe);n&&(n.innerHTML='<div id="yt-player-inner"></div>',b.value=new t.YT.Player("yt-player-inner",{videoId:e,playerVars:{autoplay:S.value?1:0,rel:0,enablejsapi:1,origin:$e.value},events:{onReady:a=>{if(S.value)try{a.target.unMute?.(),a.target.playVideo?.()}catch{}},onStateChange:a=>{a.data===0&&D()}}}))};ze(()=>{if(window.removeEventListener("message",se),b.value){try{b.value.destroy()}catch{}b.value=null}h.value&&(h.value.remove(),h.value=null),ie()});const{siteBase:k,organizationId:Te,websiteId:Pe}=qe(),g=l(()=>`${k.value}/emisiuni/${A.value}`),le=l(()=>P(k.value,r.value?.image||void 0)),Ae=l(()=>le.value||P(k.value,ke.value)),Re=l(()=>r.value?`${r.value.name} - ${E.value}`:""),Ve=l(()=>r.value?.description||`UrmÄreÈte ${r.value?.name} pe ${E.value}`),ue=e=>{const t=new Date(e),n=t.toLocaleDateString("ro-RO",{day:"numeric",month:"long",year:"numeric",timeZone:"Europe/Bucharest"}),a=t.toLocaleTimeString("ro-RO",{hour:"2-digit",minute:"2-digit",timeZone:"Europe/Bucharest"});return`${n}, ${a}`},N=e=>`${g.value}?id=${encodeURIComponent(e.path1)}`,de=e=>{const t=r.value;return e.name?.trim()&&e.name.trim()!==t?.name?e.name.trim():`${t?.name} â ${ue(e.date)}`},ce=e=>`${r.value?.description||`UrmÄreÈte ${r.value?.name} pe ${E.value}.`} Episodul din ${ue(e.date)}.`,M=l(()=>r.value?v.value.slice(0,12).map(t=>{const n=P(k.value,t.thumbnail)||le.value,a=t.youtubeVideoId?{embedUrl:`https://www.youtube.com/embed/${t.youtubeVideoId}`}:t.onnExported&&t.onnSid?{embedUrl:`https://video.onnetwork.tv/embed.php?sid=${t.onnSid}`}:t.videoUrl?{contentUrl:t.videoUrl}:{};return{"@type":"VideoObject","@id":N(t),url:N(t),name:de(t),description:ce(t),...n?{thumbnailUrl:[n]}:{},uploadDate:t.date,...a,publisher:{"@id":Te.value},inLanguage:"ro-RO"}}):[]),L=l(()=>!!C.value&&o.value?.path1===C.value),me=l(()=>L.value&&o.value?N(o.value):g.value),O=l(()=>L.value&&o.value?de(o.value):r.value?.name??""),pe=l(()=>O.value?`${O.value} - ${E.value}`:""),Y=l(()=>L.value&&o.value?ce(o.value):Ve.value),ve=l(()=>(L.value&&o.value?P(k.value,o.value.thumbnail):null)||Ae.value);return Ze({title:()=>O.value,description:()=>Y.value,ogType:"video.other",ogTitle:()=>pe.value,ogDescription:()=>Y.value,ogUrl:()=>me.value,ogImage:()=>ve.value,ogImageAlt:()=>O.value,twitterCard:"summary_large_image",twitterTitle:()=>pe.value,twitterDescription:()=>Y.value,twitterImage:()=>ve.value}),Fe({link:[{rel:"canonical",href:()=>me.value}],script:[{type:"application/ld+json",innerHTML:()=>JSON.stringify({"@context":"https://schema.org","@graph":[{"@type":"VideoGallery","@id":g.value,url:g.value,name:Re.value,...r.value?.description?{description:r.value.description}:{},isPartOf:{"@id":Pe.value},breadcrumb:{"@id":`${g.value}#breadcrumb`},...M.value.length?{mainEntity:{"@id":`${g.value}#episodes`}}:{},inLanguage:"ro-RO"},...M.value.length?[{"@type":"ItemList","@id":`${g.value}#episodes`,itemListElement:M.value.map((e,t)=>({"@type":"ListItem",position:t+1,item:e}))}]:[],{"@type":"BreadcrumbList","@id":`${g.value}#breadcrumb`,itemListElement:[{"@type":"ListItem",position:1,name:"AcasÄ",item:k.value},{"@type":"ListItem",position:2,name:"Emisiuni",item:`${k.value}/emisiuni`},{"@type":"ListItem",position:3,name:r.value?.name}]}]})}]}),(e,t)=>{const n=Xe,a=et,c=We;return u(),d("div",at,[p(n,{name:"show-header-banner","reserve-desktop":"","reserve-mobile":""}),i("nav",ot,[p(c,{to:"/",class:"flex items-center gap-1 text-theme-secondary-500 dark:text-theme-secondary-300 hover:text-theme-primary-500 transition-colors text-sm"},{default:H(()=>[p(a,{name:"mdi:home",class:"w-4 h-4"}),t[2]||(t[2]=i("span",null,"AcasÄ",-1))]),_:1}),p(a,{name:"weui:arrow-outlined",class:"size-4 text-theme-secondary-400"}),p(c,{to:"/emisiuni",class:"text-theme-secondary-500 dark:text-theme-secondary-300 hover:text-theme-primary-500 transition-colors text-sm"},{default:H(()=>[...t[3]||(t[3]=[T("Emisiuni",-1)])]),_:1}),p(a,{name:"weui:arrow-outlined",class:"size-4 text-theme-secondary-400"}),i("span",st,f(s(r)?.name),1)]),s(B)?(u(),d("div",nt,[p(a,{name:"mdi:loading",class:"w-8 h-8 animate-spin text-theme-primary-500"})])):s(r)?(u(),d($,{key:1},[i("header",it,[i("h1",rt,f(s(r).name),1),s(r).description?(u(),d("p",lt,f(s(r).description),1)):_("",!0)]),i("div",ut,[i("div",dt,[s(o)?(u(),d($,{key:0},[s(I)&&s(o).youtubeVideoId?(u(),d("div",ct,[i("div",{id:xe,style:{width:"100%","aspect-ratio":"16/9"}})])):s(X)?(u(),d("div",mt,[i("div",{id:Z,style:{width:"100%","aspect-ratio":"16/9"}})])):(u(),d("div",pt,[i("div",{id:_e,style:{width:"100%","aspect-ratio":"16/9"}})])),i("div",vt,[s(o).name?(u(),d("h2",yt,f(s(o).name),1)):_("",!0),s(o).date?(u(),d("time",ht,f(te(s(o).date)),1)):_("",!0)])],64)):(u(),d("div",gt,[...t[4]||(t[4]=[i("p",{class:"text-theme-secondary-500 dark:text-theme-secondary-300"},"Nu existÄ episoade disponibile.",-1)])])),s(r).image?(u(),d("div",ft,[i("img",{src:s(r).image,alt:s(r).name,class:"w-full max-w-md rounded-lg",loading:"lazy"},null,8,_t)])):_("",!0)]),s(v).length>0?(u(),d("div",xt,[i("div",bt,[i("h3",wt,[p(a,{name:"mdi:playlist-play",class:"w-5 h-5 text-theme-primary-500"}),t[5]||(t[5]=T(" Episoade ",-1)),i("span",kt,"("+f(s(r).episodesCount)+")",1)]),i("button",{class:z(["autoplay-toggle flex items-center gap-2 cursor-pointer select-none",{"is-on":s(x)}]),onClick:t[0]||(t[0]=m=>x.value=!s(x))},[i("span",{class:z(["text-xs font-medium",s(x)?"text-theme-ui-card-text dark:text-theme-ui-d-card-text":"text-theme-secondary-400"])},"Autoplay",2),i("span",It,[i("span",St,[p(a,{name:"mdi:play",class:"autoplay-toggle__icon autoplay-toggle__icon--play"}),p(a,{name:"mdi:pause",class:"autoplay-toggle__icon autoplay-toggle__icon--pause"})])])],2)]),i("div",$t,[(u(!0),d($,null,Je(s(v),m=>(u(),q(c,{key:m.path1,to:{query:{id:m.path1}},class:z(["block w-full text-left p-3 transition-colors border-b border-theme-secondary-100 dark:border-theme-secondary-800 last:border-b-0 cursor-pointer",m.path1===s(o)?.path1?"bg-theme-primary-500/10 border-l-2 border-l-theme-primary-500":"hover:bg-theme-secondary-50 dark:hover:bg-theme-secondary-800/50"]),onClick:t[1]||(t[1]=At=>S.value=!0)},{default:H(()=>[i("div",Et,[m.path1===s(o)?.path1?(u(),q(a,{key:0,name:"mdi:play-circle",class:"w-5 h-5 text-theme-primary-500 flex-shrink-0 mt-0.5"})):(u(),q(a,{key:1,name:"mdi:play-circle-outline",class:"w-5 h-5 text-theme-secondary-400 flex-shrink-0 mt-0.5"})),i("div",Ut,[i("p",Ct,f(m.name||"FÄrÄ titlu"),1),m.date?(u(),d("time",Lt,f(te(m.date)),1)):_("",!0)])])]),_:2},1032,["to","class"]))),128))]),s(V)?(u(),d("button",{key:0,class:"mt-3 w-full py-2 text-sm font-medium text-theme-primary-500 hover:text-theme-primary-600 border border-theme-primary-500 hover:bg-theme-primary-500/5 rounded-lg transition-colors cursor-pointer",disabled:s(U),onClick:Le},[s(U)?(u(),d($,{key:0},[p(a,{name:"mdi:loading",class:"w-4 h-4 animate-spin inline mr-1"}),t[6]||(t[6]=T(" Se încarcÄ... ",-1))],64)):(u(),d($,{key:1},[T(" Mai multe episoade ")],64))],8,Ot)):_("",!0)])):_("",!0)])],64)):_("",!0),p(n,{name:"show-script"}),p(n,{name:"show-pixel"})])}}}),Nt=Ke(Tt,[["__scopeId","data-v-7f644231"]]);export{Nt 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.