1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9897],{19897:(e,a,t)=>{t.d(a,{O:()=>h});var i=t(95155),l=t(98500),r=t.n(l),n=t(12115);function s(e=new Date){let a=new Date(e.getTime()-108e5),t=a.getUTCFullYear(),i=String(a.getUTCMonth()+1).padStart(2,"0"),l=String(a.getUTCDate()).padStart(2,"0");return`${t}-${i}-${l}`}var o=t(39493);let c=globalThis.prismaGlobal??new o.PrismaClient,d="cinemas-4-rio-grande";function u(e,a){return{id:e.id,slug:e.slug,titulo:e.titulo,duracionMin:e.duracionMin,genero:e.genero,clasificacion:e.clasificacion,posterUrl:e.posterUrl,estreno:e.estreno,funciones:a.sort((e,a)=>e.hora.localeCompare(a.hora))}}let p=(0,n.cache)(async(e=s())=>{let a=await c.cineSemana.findFirst({where:{complejo:d,hasta:{gte:e}},orderBy:{desde:"asc"}});return a||c.cineSemana.findFirst({where:{complejo:d},orderBy:{desde:"desc"}})}),m=(0,n.cache)(async(e=s())=>{let[a,t]=await Promise.all([c.cineFuncion.findMany({where:{complejo:d,fecha:{gte:e}},include:{pelicula:!0},orderBy:[{fecha:"asc"},{hora:"asc"}]}),p(e)]);return{dias:function(e){let a=new Map;for(let t of e){let e=a.get(t.fecha)??[];e.push(t),a.set(t.fecha,e)}return[...a.entries()].sort(([e],[a])=>e.localeCompare(a)).map(([e,a])=>{let t,i,l,r=new Map,n=new Map;for(let e of a){n.set(e.pelicula.id,e.pelicula);let a=r.get(e.pelicula.id)??[];a.push({id:e.id,peliculaId:e.peliculaId,hora:e.hora,formato:e.formato,idioma:e.idioma,sala:e.sala}),r.set(e.pelicula.id,a)}return{fecha:e,label:new Date(`${e}T12:00:00-03:00`).toLocaleDateString("es-AR",{weekday:"long",day:"numeric",month:"long"}),labelCorta:(i=(t=new Date(`${e}T12:00:00-03:00`)).toLocaleDateString("es-AR",{weekday:"short"}).replace(".","").slice(0,3).toUpperCase(),l=t.toLocaleDateString("es-AR",{day:"2-digit"}),`${i} ${l}`),peliculas:[...n.values()].map(e=>u(e,r.get(e.id)??[]))}})}(a),semana:t,sourceUrl:"https://www.cinemas4riogrande.com.ar/es-AR"}});function h({peli:e,fecha:a}){return(0,i.jsx)("article",{className:"group relative overflow-hidden rounded-xl bg-zinc-950 text-white shadow-[0_18px_40px_-24px_rgba(0,0,0,0.7)] ring-1 ring-white/10",children:(0,i.jsxs)("div",{className:"relative aspect-[2/3]",children:[e.posterUrl?(0,i.jsx)("img",{src:e.posterUrl,alt:`Afiche de ${e.titulo} \xb7 Cinemas 4 R\xedo Grande`,className:"absolute inset-0 h-full w-full object-cover transition duration-700 ease-out group-hover:scale-[1.06]",loading:"lazy"}):(0,i.jsx)("div",{className:"absolute inset-0 bg-zinc-800"}),(0,i.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-black via-black/45 to-black/10"}),e.estreno?(0,i.jsx)("span",{className:"absolute left-0 top-3 rounded-r-md bg-brand-orange px-2 py-0.5 text-[10px] font-bold uppercase tracking-[0.14em] text-white shadow-md",children:"Estreno"}):null,(0,i.jsx)("span",{className:"absolute right-2.5 top-3 rounded-md bg-black/55 px-1.5 py-0.5 text-[10px] font-bold uppercase tracking-wide text-white/90 ring-1 ring-white/20 backdrop-blur-sm",children:e.clasificacion}),(0,i.jsxs)("div",{className:"absolute inset-x-0 bottom-0 space-y-1.5 p-2.5",children:[(0,i.jsx)("h3",{className:"font-serif text-sm font-bold leading-tight tracking-tight text-balance drop-shadow-[0_1px_8px_rgba(0,0,0,0.8)] sm:text-[0.95rem]",children:e.titulo}),(0,i.jsx)("p",{className:"truncate text-[10px] text-white/70",children:[e.genero,function(e){let a="number"==typeof e?e:parseInt(e,10);if(Number.isNaN(a))return String(e);let t=Math.floor(a/60),i=a%60;return t>0?`${t}h ${i}min`:`${i}min`}(e.duracionMin)].filter(Boolean).join(" \xb7 ")}),(0,i.jsx)("ul",{className:"flex flex-wrap gap-1",children:e.funciones.map(t=>{var l,n,s;return(0,i.jsx)("li",{children:(0,i.jsxs)(r(),{href:(l=e.slug,n=t.id,`/cartelera/${l}/${n}`),className:"inline-flex items-baseline gap-1 rounded-md bg-black/45 px-1.5 py-0.5 ring-1 ring-amber-200/25 backdrop-blur-sm",title:`Sala ${t.sala}`,children:[(0,i.jsx)("time",{dateTime:a?`${a}T${t.hora}:00-03:00`:t.hora,className:"text-xs font-semibold tabular-nums tracking-tight",children:t.hora}),(0,i.jsxs)("span",{className:"text-[8px] font-semibold uppercase tracking-wider text-amber-100/80",children:[t.formato," ","CAST"===(s=t.idioma)?"Cast":"SUBT"===s?"Subt":s]})]})},t.id)})})]})]})})}(0,n.cache)(async()=>{let e=await m();return{dia:e.dias[0]??null,semana:e.semana}}),(0,n.cache)(async()=>{let e=await m(),a=new Map;for(let t of e.dias)for(let e of t.peliculas)a.has(e.id)||a.set(e.id,e);return{peliculas:[...a.values()],semana:e.semana,dia:e.dias[0]??null}}),(0,n.cache)(async e=>{let a=await c.cineFuncion.findUnique({where:{id:e},include:{pelicula:!0}});if(!a)return null;let t=await p(a.fecha),i={id:a.id,peliculaId:a.peliculaId,hora:a.hora,formato:a.formato,idioma:a.idioma,sala:a.sala};return{fecha:a.fecha,funcion:i,pelicula:u(a.pelicula,[i]),semana:t}})}}]);
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.