1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3519],{4508:(e,t,a)=>{"use strict";a.d(t,{B:()=>i,EditModeProvider:()=>n});var r=a(5155),l=a(2115);let s=(0,l.createContext)();function n({children:e}){let[t,a]=(0,l.useState)(!1),[i,o]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/admin/session");e.ok&&(await e.json()).authenticated&&a(!0)}catch(e){console.error("Session check client error:",e)}})()},[]),(0,r.jsxs)(s.Provider,{value:{isAdmin:t,editMode:i,setEditMode:o},children:[e,t&&(0,r.jsxs)("div",{className:"fixed bottom-6 left-6 z-[9999] glass p-4 rounded-2xl border border-slate-200 shadow-xl flex items-center gap-4 text-xs font-bold text-slate-800 animate-slide",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#fac612] animate-pulse"}),(0,r.jsx)("span",{children:"Painel do Operador"})]}),(0,r.jsx)("div",{className:"w-px h-4 bg-slate-200"}),(0,r.jsxs)("button",{onClick:()=>o(!i),className:`px-3 py-1.5 rounded-xl font-bold uppercase tracking-wider text-[11px] transition-all flex items-center gap-2 border ${i?"bg-[#fac612] text-[#253c7f] border-[#fac612] shadow-md":"bg-white/60 hover:bg-white text-slate-600 border-slate-200"}`,children:[(0,r.jsx)("span",{children:"âï¸"}),(0,r.jsx)("span",{children:i?"Salvar & Sair":"Editar Conte\xfado"})]})]})]})}function i(){return(0,l.useContext)(s)}},5722:(e,t,a)=>{"use strict";a.d(t,{default:()=>n});var r=a(5155),l=a(2115),s=a(5772);function n({images:e}){let[t,a]=(0,l.useState)(null),[i,o]=(0,l.useState)(null),c=(0,l.useCallback)(()=>{null!==i&&e&&0!==e.length&&o(t=>t>0?t-1:e.length-1)},[i,e]),d=(0,l.useCallback)(()=>{null!==i&&e&&0!==e.length&&o(t=>t<e.length-1?t+1:0)},[i,e]);if((0,l.useEffect)(()=>{let e=e=>{null!==i&&("Escape"===e.key&&o(null),"ArrowLeft"===e.key&&c(),"ArrowRight"===e.key&&d())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[i,c,d]),!e||0===e.length)return null;let u=null!==i?e[i]:null;return(0,r.jsxs)("section",{id:"restaurante_galeria",className:"w-full bg-white overflow-hidden py-0",children:[(0,r.jsx)("div",{className:"flex flex-wrap w-full",children:e.map((e,l)=>{let n=t===e.id;return(0,r.jsx)("div",{className:"w-full sm:w-1/2 md:w-1/3 lg:w-1/5 aspect-square relative cursor-pointer overflow-hidden bg-slate-200",onMouseEnter:()=>a(e.id),onMouseLeave:()=>a(null),onClick:()=>o(l),children:(0,r.jsx)(s.default,{src:`/images/galeria-restaurante/thumbs/${e.imagem}`,alt:e.descricao||"Restaurante Viana",fill:!0,sizes:"(max-width: 640px) 100vw, (max-width: 768px) 50vw, (max-width: 1024px) 33vw, 20vw",className:`object-cover transition-all duration-400 ease-out foco ${null!==t&&!n?"contrast-[0.8] brightness-[0.4]":"contrast-100 brightness-100"}`})},e.id)})}),u&&(0,r.jsxs)("div",{onClick:()=>o(null),className:"fixed inset-0 z-[10000] backdrop-blur-2xl bg-black/90 flex flex-col items-center justify-center p-4 sm:p-6 animate-fade cursor-zoom-out select-none",children:[(0,r.jsx)("button",{onClick:()=>o(null),className:"absolute top-4 right-4 sm:top-6 sm:right-6 z-50 w-11 h-11 rounded-full bg-white/15 hover:bg-white/30 text-white font-bold text-xl flex items-center justify-center transition-all border border-white/20 backdrop-blur-md active:scale-95 shadow-xl cursor-pointer","aria-label":"Fechar amplia\xe7\xe3o",children:"â"}),(0,r.jsx)("button",{onClick:e=>{e.stopPropagation(),c()},className:"absolute left-3 md:left-[35px] top-1/2 -translate-y-1/2 z-50 w-12 h-12 rounded-full bg-white/15 hover:bg-white/35 text-white flex items-center justify-center transition-all border border-white/20 backdrop-blur-md active:scale-90 shadow-2xl cursor-pointer","aria-label":"Imagem Anterior",children:(0,r.jsx)("svg",{className:"w-6 h-6 stroke-current",fill:"none",strokeWidth:"2.5",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})})}),(0,r.jsx)("button",{onClick:e=>{e.stopPropagation(),d()},className:"absolute right-3 md:right-[35px] top-1/2 -translate-y-1/2 z-50 w-12 h-12 rounded-full bg-white/15 hover:bg-white/35 text-white flex items-center justify-center transition-all border border-white/20 backdrop-blur-md active:scale-90 shadow-2xl cursor-pointer","aria-label":"Pr\xf3xima Imagem",children:(0,r.jsx)("svg",{className:"w-6 h-6 stroke-current",fill:"none",strokeWidth:"2.5",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})}),(0,r.jsxs)("div",{onClick:e=>e.stopPropagation(),className:"relative max-w-[calc(100vw-140px)] max-h-[85vh] flex flex-col items-center justify-center cursor-default px-2",children:[(0,r.jsx)("img",{src:`/images/galeria-restaurante/high/${u.imagem}`,alt:u.descricao||"Amplia\xe7\xe3o do Restaurante Viana",className:"max-w-[calc(100vw-140px)] max-h-[78vh] w-auto h-auto object-contain rounded-2xl shadow-2xl border border-white/15 drop-shadow-[0_20px_50px_rgba(0,0,0,0.95)]"}),u.descricao&&(0,r.jsx)("div",{className:"mt-3.5 px-6 py-2 rounded-2xl bg-black/65 backdrop-blur-md border border-white/15 text-center max-w-[85vw] shadow-xl",children:(0,r.jsx)("h3",{className:"text-white font-bold text-sm sm:text-base uppercase tracking-wide",children:u.descricao})})]})]})]})}},5733:(e,t,a)=>{Promise.resolve().then(a.bind(a,9575)),Promise.resolve().then(a.bind(a,5722)),Promise.resolve().then(a.bind(a,6257)),Promise.resolve().then(a.t.bind(a,8437,23))},6257:(e,t,a)=>{"use strict";a.d(t,{default:()=>n});var r=a(5155),l=a(4508),s=a(2115);function n({pagina:e,chave:t,initialText:a,className:i="",as:o="span"}){let{editMode:c}
1=(0,l.B)(),[d,u]=(0,s.useState)(a||""),[h,x]=(0,s.useState)(!1);console.log(`[EditableText Debug] Key: ${t}, EditMode: ${c}`);let b=async a=>{let r=a.target.innerText;if(r!==d){x(!0);try{(await fetch("/api/admin/textos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pagina:e,chave:t,conteudo:r})})).ok?u(r):(alert("Erro ao salvar edi\xe7\xe3o de texto."),a.target.innerText=d)}catch(e){console.error(e),alert("Erro de rede."),a.target.innerText=d}finally{x(!1)}}};return c?(0,r.jsx)(o,{contentEditable:!0,suppressContentEditableWarning:!0,onBlur:b,className:`${i} cursor-text outline-dashed outline-2 outline-offset-2 outline-[#fac612] bg-[#fac612]/5 transition-all ${h?"opacity-50 pointer-events-none":""}`,title:"Clique para editar este texto diretamente",children:d}):(0,r.jsx)(o,{className:i,children:d})}},9575:(e,t,a)=>{"use strict";a.d(t,{default:()=>n});var r=a(5155),l=a(2115),s=a(5772);function n({slides:e}){let[t,a]=(0,l.useState)(0);return((0,l.useEffect)(()=>{if(!e||e.length<=1)return;let t=setInterval(()=>{a(t=>(t+1)%e.length)},6e3);return()=>clearInterval(t)},[e]),e&&0!==e.length)?(0,r.jsxs)("section",{className:"relative w-full h-[calc(100vh-230px)] min-h-[380px] bg-slate-900 overflow-hidden",children:[(0,r.jsx)("div",{className:"absolute inset-0 w-full h-full",children:e.map((e,a)=>(0,r.jsx)("div",{className:`absolute inset-0 transition-opacity duration-1000 ease-in-out ${a===t?"opacity-100":"opacity-0 pointer-events-none"}`,children:(0,r.jsx)(s.default,{src:`/images/slideshow/restaurante/${e.imagem}`,alt:"Restaurante Viana",fill:!0,priority:0===a,sizes:"100vw",className:"object-cover"})},e.id))}),e.length>1&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{onClick:t=>{t.preventDefault(),a(t=>(t-1+e.length)%e.length)},className:"absolute left-6 top-1/2 -translate-y-1/2 z-20 w-12 h-12 flex items-center justify-center text-white bg-black/20 hover:bg-black/40 border border-white/10 rounded-full transition-all duration-300 backdrop-blur-md shadow-md hover:scale-105 active:scale-95 group","aria-label":"Anterior",children:(0,r.jsx)("svg",{className:"w-5 h-5 stroke-current transition-transform duration-300 group-hover:-translate-x-0.5",fill:"none",strokeWidth:"2.5",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})})}),(0,r.jsx)("button",{onClick:t=>{t.preventDefault(),a(t=>(t+1)%e.length)},className:"absolute right-6 top-1/2 -translate-y-1/2 z-20 w-12 h-12 flex items-center justify-center text-white bg-black/20 hover:bg-black/40 border border-white/10 rounded-full transition-all duration-300 backdrop-blur-md shadow-md hover:scale-105 active:scale-95 group","aria-label":"Pr\xf3ximo",children:(0,r.jsx)("svg",{className:"w-5 h-5 stroke-current transition-transform duration-300 group-hover:translate-x-0.5",fill:"none",strokeWidth:"2.5",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})})]}),e.length>1&&(0,r.jsx)("div",{className:"absolute bottom-6 left-1/2 -translate-x-1/2 z-20 flex gap-2",children:e.map((e,l)=>(0,r.jsx)("button",{onClick:()=>a(l),className:`w-3 h-3 rounded-full transition-all duration-300 ${l===t?"bg-[#fac612] scale-125":"bg-white/40 hover:bg-white/70"}`,"aria-label":`Ir para foto ${l+1}`},l))})]}):null}}},e=>{e.O(0,[5772,8441,3794,7358],()=>e(e.s=5733)),_N_E=e.O()}]);
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.