PageSourceSearch

https://actualidadpenal.pe/_nuxt/a7NoNRmc.js

js actualidadpenal.pe collected 2026-09-25 00:52:39 UTC 6,366 bytes, 1 lines download raw bytes

1import{_ as N}from"./D2nF2w0W.js";import{R as w,E as I,K as g,L as x,d as O,u as Y,h as K,b as s,c as i,i as _,f as d,g as l,e as a,t as p,_ as M,j as P,m as U,k as W,p as q,r as E,s as y}from"./DAfNz0Uy.js";import{_ as J}from"./Die6o6Ya.js";import{_ as X}from"./Cpd1THbu.js";import{u as Z}from"./CZ_t7wTv.js";import{u as z}from"./Dp2L3E9a.js";import{d as Q}from"./Cj7KpypS.js";import{C as G}from"./BsoBndRl.js";import{u as H}from"./30waLltj.js";import{u as ee}from"./gtC_3iWW.js";import"./C7b985Jf.js";import"./Cg2J696J.js";const te=()=>{const c=I().public.API_WEB_URL,m=`?revista=${w.slug}`;return{getVideos:async(e={})=>{const n=new URLSearchParams,b=x(e);return Object.entries(b).forEach(([v,r])=>{r!=null&&r!==""&&n.append(v,String(r))}),n.append("revista",w.slug),await g(`/api/videos?${n.toString()}`,{baseURL:c},"$LeE56EYriK")},getProgramas:async()=>await g(`/api/videos/programas${m}`,{baseURL:c},"$LZvi-3XXSp"),getAnios:async()=>await g(`/api/videos-anios/anios${m}`,{baseURL:c},"$r1WQCyyMuZ"),getVideo:(e,n=1)=>g(`/api/video/${x(e)}/${x(n)}`,{baseURL:c},"$grOqPtMvKJ"),toggleFavorite:async e=>await $fetch(`/api/videos/favorite/${e}`,{baseURL:c}),marcarVideoVisto:async e=>await $fetch(`/api/video-visto/${e}`,{baseURL:c})}},oe={class:"ap-page-content"},ae={key:0,class:"my-6"},se={key:1},ie={key:0,class:"mb-3"},ne={class:"bg-brand-second/10 text-brand-second rounded-lg px-2.5 py-1 text-xs font-bold"},re={class:"ap-title-4 text-brand-first mb-4"},le={class:"mb-6 flex flex-wrap items-center justify-between gap-4 border-b border-slate-200 pb-4 text-sm text-slate-500"},ce={class:"flex items-center gap-6"},ue={class:"flex items-center gap-2"},de={key:0,class:"flex items-center gap-2"},me={class:"flex items-center gap-2"}
1,pe={class:"mb-6 flex items-center gap-4 rounded-lg border border-slate-200 bg-slate-50 p-3"},ve=["href"],fe={class:"mb-8 aspect-video overflow-hidden rounded-lg border border-slate-200 bg-black shadow-2xl"},ge=["src"],_e=["poster"],he=["src"],be={key:2,class:"flex h-full w-full items-center justify-center text-white/50"},xe={key:2,class:"py-20 text-center"},Be=O({__name:"[slug]",setup(D){const m=q().params.slug,{data:u}=H({module:"VD",item:m}),{toggleFavorite:L,marcarVideoVisto:V}=te(),k=I(),h=Y(),{redirectToLogin:$}=z(),e=E(null),n=E(!1),{data:b,pending:v}=g(`/api/video/${m}/1`,{baseURL:k.public.API_WEB_URL});K(b,o=>{if(o){const t=Z(o);t?.id!=null?(e.value=t,typeof window<"u"&&V(t.id)):console.warn("No se encontró un video con ID en la respuesta:",o)}},{immediate:!0,deep:!0});const r=y(()=>u.value?.image||e.value?.imagen_medium||e.value?.imagen||Q()),R=y(()=>u.value?.description||e.value?.resumen||e.value?.titulo||""),B=y(()=>!e.value?.titulo&&!u.value?.title?null:{"@context":"https://schema.org","@type":"VideoObject",name:u.value?.title||e.value?.titulo,description:R.value,thumbnailUrl:r.value?[r.value]:void 0,uploadDate:e.value?.fecha_publicacion||e.value?.fecha||void 0,inLanguage:"es-PE",publisher:{"@type":"Organization",name:w.name,logo:{"@type":"ImageObject",url:"https://actualidadpenal.pe/images/logo-penal.svg"}}});ee({title:()=>u.value?.title||e.value?.titulo||"",moduleLabel:()=>u.value?.title?void 0:"IPTV",description:R,path:`/iptv/video/${m}`,type:"video.other",image:r,jsonLd:B,titleTemplate:"%s"});const C=o=>{if(!o)return"";const t=new Date(o);return new Intl.DateTimeFormat("es-PE",{day:"2-digit",month:"long",year:"numeric"}).format(t)},S=async()=>{if(!h.auth){$();return}if(e.value?.id){n.value=!0;try{const o=await L(e.value.id);o.body?.data&&(e.value.is_favorite=o.body.data.is_favorite)}catch(o){console.error("Error toggling favorite",o)}finally{n.value=!1}}},T=o=>{if(!o)return"";let t=o;return t.includes("watch?v=")&&(t=t.replace("watch?v=","embed/"),t=t.split("&")[0]??t),t};return(o,t)=>{const F=N,f=M,j=J,A=X;return s(),i("div",oe,[_(v)?(s(),i("div",ae,[d(F,{lines:12})])):l("",!0),e.value&&!_(v)?(s(),i("div",se,[e.value.categorias?(s(),i("div",ie,[a("span",ne,p(e.value.categorias.nombre),1)])):l("",!0),a("h1",re,p(e.value.titulo),1),a("div",le,[a("div",ce,[a("div",ue,[d(f,{name:"heroicons:calendar",class:"h-5 w-5 text-slate-400"}),a("span",null,"Publicado: "+p(C(e.value.fecha_creacion)),1)]),e.value.duracion?(s(),i("div",de,[d(f,{name:"heroicons:clock",class:"h-5 w-5 text-slate-400"}),a("span",null,"Duración: "+p(e.value.duracion),1)])):l("",!0),a("div",me,[d(f,{name:"heroicons:eye",class:"h-5 w-5 text-slate-400"}),a("span",null,"Vistas: "+p(e.value.visto||0),1)])]),a("div",pe,[_(h).auth?(s(),P(j,{key:0,"is-favorite":!!e.value.is_favorite,loading:n.value,onClick:S},null,8,["is-favorite","loading"])):l("",!0),e.value.host==="Y"||e.value.url?.includes("youtube")?(s(),i("a",{key:1,href:e.value.url,target:"_blank",rel:"noopener noreferrer",class:"ml-2 flex items-center gap-1.5 text-sm font-medium text-red-600 transition-colors hover:text-red-700"},[d(f,{name:"mdi:youtube",class:"h-5 w-5"}),t[0]||(t[0]=a("span",null,"Ver en YouTube",-1))],8,ve)):l("",!0)])]),a("div",fe,[e.value.host==="Y"||e.value.url?.includes("youtube")?(s(),i("iframe",{key:0,src:T(e.value.url),class:"h-full w-full",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:""},null,8,ge)):e.value.host==="L"?(s(),i("video",{key:1,class:"h-full w-full",controls:"",controlsList:"nodownload",poster:e.value.imagen_medium||e.value.imagen},[a("source",{src:`https://siip3.institutopacifico.pe/api/videoteca/video/${e.value.id}`,type:"video/mp4"},null,8,he),t[1]||(t[1]=U(" Tu navegador no soporta la reproducción de videos. ",-1))],8,_e)):(s(),i("div",be," Formato de video no soportado "))]),d(A,{variant:"intro",class:"text-md"},{default:W(()=>[U(p(e.value.resumen),1)]),_:1})])):l("",!0),!e.value&&!_(v)?(s(),i("div",xe,[d(f,{name:"heroicons:exclamation-triangle",class:"mx-auto mb-4 h-16 w-16 text-slate-300"}),t[2]||(t[2]=a("h2",{class:"text-lg text-slate-600"},"Video no encontrado",-1)),t[3]||(t[3]=a("p",{class:"mb-6 text-slate-500"},"El video que intentas buscar no existe o ha sido removido.",-1))])):l("",!0),e.value?.id?(s(),P(G,{key:3,"section-class":"mt-12 pt-8 border-t border-slate-200",title:"Comentarios","title-class":"ap-title-3 text-brand-first mb-2",modulo:"VD",id:e.value.id,plan:e.value.plan_id??1,titulo:e.value.titulo||""},null,8,["id","plan","titulo"])):l("",!0)])}}});
1export{Be 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.