1import{_ as N,r as $,o as O,n as S,D as M,a as c,e as m,z as r,b as e,F as D,m as z,t as _,C as W,H as Y,h as T,I as H,w as V,c as F,B as X,s as K,J as j,d as U,K as G,l as B,j as J,k as R,N as q}from"./CKJpJfkf.js";import{U as Q}from"./D6fgLw3a.js";import{B as Z}from"./C_97zubz.js";import{u as P}from"./CjY08ewG.js";import"./C_sEYA7S.js";const ee={key:0,class:"noticia-carousel"},te={class:"swiper noticiaSwiper"},se={class:"swiper-wrapper"},oe={class:"carousel-slide-content"},ae=["src","alt","loading","onClick"],ie={key:0,class:"carousel-overlay"},le={class:"carousel-caption"},ne=["src","alt"],re={key:0,class:"lightbox-caption"},ce={class:"lightbox-controls"},ue={class:"lightbox-counter"},de={__name:"NoticiaCarousel",props:{carrosselIds:{type:Array,default:()=>[]}},setup(L){const i=L,t=$([]),v=$(null),h=$(!1),p=$(0);async function a(){if(!i.carrosselIds||i.carrosselIds.length===0){t.value=[];return}try{const o=i.carrosselIds.join(","),s=await $fetch(`/api/carrossel-noticias?ids=${o}`);t.value=s||[]}catch(o){console.error("Erro ao buscar imagens do carrossel:",o),t.value=[]}}function k(){var o;try{const s=typeof Swiper<"u"?Swiper:(globalThis==null?void 0:globalThis.Swiper)||null;if(!s||t.value.length===0||((o=v.value)!=null&&o.destroy&&(v.value.destroy(!0,!0),v.value=null),!document.querySelector(".noticiaSwiper")))return;v.value=new s(".noticiaSwiper",{loop:t.value.length>1,autoplay:t.value.length>1?{delay:4e3,disableOnInteraction:!1}:!1,observer:!0,observeParents:!0,observeSlideChildren:!0,resizeObserver:!0,pagination:{el:".noticiaSwiper .carousel-pagination",clickable:!0,dynamicBullets:!0},navigation:{nextEl:".noticiaSwiper .swiper-button-next",prevEl:".noticiaSwiper .swiper-button-prev"},breakpoints:{320:{slidesPerView:1,spaceBetween:10},768:{slidesPerView:2,spaceBetween:20},1024:{slidesPerView:3,spaceBetween:30}}})}catch(s){console.error("Erro ao iniciar swiper notÃcia:",s)}}function C(o){p.value=o,h.value=!0,document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%",document.body.style.height="100%",S(()=>{const s=document.querySelector(".lightbox-modal");s&&(document.body.appendChild(s),s.style.zIndex="9999999999",s.style.position="fixed")})}function b(){h.value=!1,document.body.style.overflow="",document.body.style.position="",document.body.style.width="",document.body.style.height=""}function g(){p.value=p.value>0?p.value-1:t.value.length-1}function y(){p.value=p.value<t.value.length-1?p.value+1:0}function u(o){if(h.value)switch(o.key){case"Escape":b();break;case"ArrowLeft":g();break;case"ArrowRight":y();break}}let l=0,d=0;function n(o){h.value&&(l=o.touches[0].clientX,d=o.touches[0].clientY)}function x(o){if(!h.value)return;const s=o.changedTouches[0].clientX,w=o.changedTouches[0].clientY,f=l-s,I=d-w;Math.abs(f)>Math.abs(I)&&Math.abs(f)>50&&(f>0?y():g())}return O(async()=>{await a(),await S(),t.value.length>0&&k(),document.addEventListener("keydown",u),document.addEventListener("touchstart",n,{passive:!0}),document.addEventListener("touchend",x,{passive:!0})}),M(()=>i.carrosselIds,async()=>{await a(),await S(),t.value.length>0&&k()},{deep:!0}),M(()=>t.value,async()=>{t.value.length>0&&(await S(),k())},{deep:!0}),(o,s)=>t.value&&t.value.length>0?(r(),c("div",ee,[s[8]||(s[8]=e("div",{class:"carousel-header"},[e("h3",{class:"carousel-title"}
1,"Galeria de Imagens")],-1)),e("div",te,[e("div",se,[(r(!0),c(D,null,z(t.value,(w,f)=>(r(),c("div",{class:"swiper-slide",key:w.id||f},[e("div",oe,[e("img",{src:`https://nexus.webservicesistemas.com.br/assets/${w.directus_files_id}`,alt:`Imagem ${f+1} da galeria`,class:"carousel-slide-img",loading:f===0?"eager":"lazy",decoding:"async",onClick:I=>C(f),style:{cursor:"pointer"}},null,8,ae),w.titulo?(r(),c("div",ie,[e("p",le,_(w.titulo),1)])):m("",!0),s[1]||(s[1]=e("div",{class:"zoom-indicator"},[e("i",{class:"fa-solid fa-search-plus"})],-1))])]))),128))]),s[2]||(s[2]=e("div",{class:"swiper-button-next carousel-nav-btn"},null,-1)),s[3]||(s[3]=e("div",{class:"swiper-button-prev carousel-nav-btn"},null,-1)),s[4]||(s[4]=e("div",{class:"swiper-pagination carousel-pagination"},null,-1))]),h.value?(r(),c("div",{key:0,class:"lightbox-modal",onClick:b},[e("div",{class:"lightbox-content",onClick:s[0]||(s[0]=W(()=>{},["stop"]))},[e("button",{class:"lightbox-close",onClick:b},s[5]||(s[5]=[e("i",{class:"fa-solid fa-times"},null,-1)])),t.value[p.value]?(r(),c("div",{key:0,class:"lightbox-image-container",onTouchstart:n,onTouchend:x},[e("img",{src:`https://nexus.webservicesistemas.com.br/assets/${t.value[p.value].directus_files_id}`,alt:`Imagem ${p.value+1} da galeria`,class:"lightbox-img",draggable:"false"},null,8,ne),t.value[p.value].titulo?(r(),c("div",re,_(t.value[p.value].titulo),1)):m("",!0)],32)):m("",!0),e("div",ce,[t.value.length>1?(r(),c("button",{key:0,class:"lightbox-prev",onClick:g},s[6]||(s[6]=[e("i",{class:"fa-solid fa-chevron-left"},null,-1)]))):m("",!0),t.value.length>1?(r(),c("button",{key:1,class:"lightbox-next",onClick:y},s[7]||(s[7]=[e("i",{class:"fa-solid fa-chevron-right"},null,-1)]))):m("",!0)]),e("div",ue,_(p.value+1)+" / "+_(t.value.length),1)])])):m("",!0)])):m("",!0)}},pe=N(de,[["__scopeId","data-v-799b7d97"]]),ve={class:"share-widget"},he=["title"],me={class:"share-options"},fe=["title"],ge={__name:"ShareWidget",props:{url:{type:String,required:!0},title:{type:String,required:!0},description:{type:String,default:""}},setup(L){const i=L,t=$(!1),v=$(!1),h=()=>{t.value=!t.value},p=()=>{const u=`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(i.url)}`;window.open(u,"_blank","width=600,height=400"),t.value=!1},a=()=>{const u=`${i.title} - ${i.description}`,l=`https://twitter.com/intent/tweet?url=${encodeURIComponent(i.url)}&text=${encodeURIComponent(u)}`;window.open(l,"_blank","width=600,height=400"),t.value=!1},k=()=>{const u=`${i.title} 2 3${i.description} 4 5Leia mais: ${i.url}`,l=`https://wa.me/?text=${encodeURIComponent(u)}`;window.open(l,"_blank"),t.value=!1},C=()=>{const u=`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(i.url)}`;window.open(u,"_blank","width=600,height=400"),t.value=!1},b=()=>{const u=`${i.title} 6 7${i.description} 8 9Leia mais: ${i.url}`,l=`https://t.me/share/url?url=${encodeURIComponent(i.url)}&text=${encodeURIComponent(u)}`;window.open(l,"_blank"),t.value=!1},g=async()=>{try{await navigator.clipboard.writeText(i.url),v.value=!0,setTimeout(()=>{v.value=!1},2e3),t.value=!1}catch(u){console.error("Erro ao copiar link:",u);const l=document.createElement("textarea");l.value=i.url,document.body.appendChild(l),l.select(),document.execCommand("copy"),document.body.removeChild(l),v.value=!0,setTimeout(()=>{v.value=!1},2e3),t.value=!1}},y=u=>{u.target.closest(".share-widget")||(t.value=!1)};return O(()=>{document.addEventListener("click",y)}),Y(()=>{document.removeEventListener("click",y)}),(u,l)=>(r(),c("div",ve,[e("button",{class:T(["share-trigger",{active:t.value}]),onClick:h,title:t.value?"Fechar compartilhamento":"Compartilhar"},l[0]||(l[0]=[e("i",{class:"fas fa-share-alt"},null,-1),e("span",null,"Compartilhar",-1)]),10,he),t.value?(r(),c("div",{key:0,class:T(["share-dropdown",{open:t.value}])},[e("div",me,[e("button",{class:"share-option facebook",onClick:p,title:"Compartilhar no Facebook"},l[1]||(l[1]=[e("i",{class:"fab fa-facebook-f"},null,-1),e("span",null,"Facebook",-1)])),e("button",{class:"share-option twitter",onClick:a,title:"Compartilhar no Twitter"},l[2]||(l[2]=[e("i",{class:"fab fa-twitter"},null,-1),e("span",null,"Twitter",-1)])),e("button",{class:"share-option whatsapp",onClick:k,title:"Compartilhar no WhatsApp"},l[3]||(l[3]=[e("i",{class:"fab fa-whatsapp"},null,-1),e("span",null,"WhatsApp",-1)])),e("button",{class:"share-option linkedin",onClick:C,title:"Compartilhar no LinkedIn"},l[4]||(l[4]=[e("i",{class:"fab fa-linkedin-in"},null,-1),e("span",null,"LinkedIn",-1)])),e("button",{class:"share-option telegram",onClick:b,title:"Compartilhar no Telegram"},l[5]||(l[5]=[e("i",{class:"fab fa-telegram-plane"}
9,null,-1),e("span",null,"Telegram",-1)])),e("button",{class:T(["share-option copy",{copied:v.value}]),onClick:g,title:v.value?"Link copiado!":"Copiar link"},[e("i",{class:T(v.value?"fas fa-check":"fas fa-link")},null,2),e("span",null,_(v.value?"Copiado!":"Copiar"),1)],10,fe)])],2)):m("",!0)]))}},we=N(ge,[["__scopeId","data-v-6d71d06e"]]);var be={};const _e={class:"th-blog-wrapper blog-details space-top space-extra-bottom"},ye={class:"container"},ke={class:"row"},xe={class:"col-xxl-8 col-lg-7"},$e={class:"th-blog blog-single"},Ce={key:0,class:"share-section"},Ie={class:"blog-img"},Se=["src"],Le=["innerHTML"],Te={key:1,class:"noticia-files-section mt-40 mb-40"},Ue={class:"files-list"},De={class:"file-info"},Ee={class:"file-details"},Be={class:"file-name"},ze={key:0,class:"file-meta"},Ne={class:"file-actions"},Oe=["onClick"],Ae=["href"],Me={class:"preview-body"},Ve=["src"],Fe={class:"col-xxl-4 col-lg-5"},Re={class:"sidebar-area"},Pe={class:"widget"},We={class:"recent-post-wrap"},Ye={class:"media-img"},He=["src"],Xe={class:"media-body"},Ke={class:"recent-post-meta"},je={href:"blog.html"},Ge={class:"post-title"},Je={__name:"[slug]",async setup(L){let i,t;const h=H().params.slug,{data:p}=([i,t]=V(()=>P(`noticia-${h}`,()=>$fetch(`/api/noticias/${h}`))),i=await i,t(),i),a=F(()=>p.value||{}),{data:k}=([i,t]=V(async()=>P("prefeitura",async()=>{const d=await $fetch("/api/prefeitura");return Array.isArray(d)?d[0]:d})),i=await i,t(),i),C=F(()=>{var n;const d=(n=k.value)==null?void 0:n.dominio;return d?`https://${d}/noticias/${h}`:`/noticias/${h}`}),b=X("noticias",()=>[]),g=$(null);function y(d){g.value=d,document.body.style.overflow="hidden"}function u(){g.value=null,document.body.style.overflow=""}O(async()=>{try{if(b.value.length===0){const d=await K.get("/api/noticias");b.value=d.data}await S(),await Q({directusUrl:be.DOMINIO})}catch(d){console.error(d)}});function l(d){const n=new Date(d),x=String(n.getDate()).padStart(2,"0"),o=String(n.getMonth()+1).padStart(2,"0"),s=n.getFullYear();return`${x}/${o}/${s}`}return j({title:()=>a.value.titulo,ogTitle:()=>a.value.titulo,description:()=>a.value.resumo||a.value.titulo,ogDescription:()=>a.value.resumo||a.value.titulo,ogImage:()=>a.value.imagem?`https://nexus.webservicesistemas.com.br/assets/${a.value.imagem}`:void 0,ogImageWidth:1200,ogImageHeight:630,ogUrl:()=>C.value,ogType:"article",twitterCard:"summary_large_image",twitterTitle:()=>a.value.titulo,twitterDescription:()=>a.value.resumo||a.value.titulo,twitterImage:()=>a.value.imagem?`https://nexus.webservicesistemas.com.br/assets/${a.value.imagem}`:void 0}),(d,n)=>{const x=q;
9return r(),c(D,null,[U(Z,{title:a.value.titulo||"NotÃcia",items:[{text:"Home",href:"/"},{text:"NotÃcias",href:"/noticias"},{text:a.value.titulo||"NotÃcia",href:null}]},null,8,["title","items"]),e("section",_e,[e("div",ye,[e("div",ke,[e("div",xe,[e("div",$e,[a.value.titulo?(r(),c("div",Ce,[U(we,{url:C.value,title:a.value.titulo,description:a.value.resumo||a.value.titulo},null,8,["url","title","description"])])):m("",!0),e("div",Ie,[e("img",{src:`https://nexus.webservicesistemas.com.br/assets/${a.value.imagem}`,alt:"Blog Image"},null,8,Se)]),e("div",{class:"blog-content",innerHTML:a.value.conteudo},null,8,Le),a.value.arquivos&&a.value.arquivos.length>0?(r(),c("div",Te,[n[4]||(n[4]=e("h4",{class:"files-title mb-20"},[e("i",{class:"fa-solid fa-file-pdf me-2"}),B(" Documentos e Anexos ")],-1)),e("div",Ue,[(r(!0),c(D,null,z(a.value.arquivos,(o,s)=>{var w,f,I,E;return r(),c("div",{key:s,class:"file-item"},[e("div",De,[n[1]||(n[1]=e("div",{class:"file-icon"},[e("i",{class:"fa-solid fa-file-pdf"})],-1)),e("div",Ee,[e("span",Be,_(((w=o.directus_files_id)==null?void 0:w.title)||((f=o.directus_files_id)==null?void 0:f.filename_download)||"Documento PDF"),1),(I=o.directus_files_id)!=null&&I.filesize?(r(),c("span",ze,_((o.directus_files_id.filesize/1024).toFixed(1))+" KB ",1)):m("",!0)])]),e("div",Ne,[e("button",{onClick:qe=>{var A;return y(`https://nexus.webservicesistemas.com.br/assets/${((A=o.directus_files_id)==null?void 0:A.id)||o.directus_files_id}`)},class:"btn-view",title:"Visualizar documento"},n[2]||(n[2]=[e("i",{class:"fa-solid fa-eye"},null,-1),e("span",null,"Visualizar",-1)]),8,Oe),e("a",{href:`https://nexus.webservicesistemas.com.br/assets/${((E=o.directus_files_id)==null?void 0:E.id)||o.directus_files_id}?download`,class:"btn-download",target:"_blank"},n[3]||(n[3]=[e("i",{class:"fa-solid fa-download"},null,-1),e("span",null,"Baixar",-1)]),8,Ae)])])}),128))])])):m("",!0),a.value.carrossel&&a.value.carrossel.length>0?(r(),G(pe,{key:2,"carrossel-ids":a.value.carrossel},null,8,["carrossel-ids"])):m("",!0)])]),g.value?(r(),c("div",{key:0,class:"pdf-preview-modal",onClick:u},[e("div",{class:"preview-content",onClick:n[0]||(n[0]=W(()=>{},["stop"]))},[e("div",{class:"preview-header"},[n[6]||(n[6]=e("h5",{class:"preview-title"},"Visualização do Documento",-1)),e("button",{class:"btn-close-preview",onClick:u},n[5]||(n[5]=[e("i",{class:"fa-solid fa-times"},null,-1)]))]),e("div",Me,[e("iframe",{src:g.value,width:"100%",height:"100%",frameborder:"0"},null,8,Ve)])])])):m("",!0),e("div",Fe,[e("aside",Re,[e("div",Pe,[n[8]||(n[8]=e("h3",{class:"widget_title"},"Ãltimos posts",-1)),e("div",We,[(r(!0),c(D,null,z(J(b).slice(0,5),o=>(r(),c("div",{class:"recent-post",key:o.id},[e("div",Ye,[U(x,{to:`/noticias/${o.slug}`},{default:R(()=>[e("img",{src:`https://nexus.webservicesistemas.com.br/assets/${o.imagem}`,alt:"Blog Image",style:{width:"85px",height:"85px"}},null,8,He)]),_:2},1032,["to"])]),e("div",Xe,[e("div",Ke,[e("a",je,[n[7]||(n[7]=e("i",{class:"fa-solid fa-calendar-days",style:{"font-size":"12px"}},null,-1)),B(_(l(o.date_created)),1)])]),e("h4",Ge,[U(x,{to:`/noticias/${o.slug}`,style:{"font-size":"14px"}},{default:R(()=>[B(_(o.titulo),1)]),_:2},1032,["to"])])])]))),128))])])])])])])])],64)}}},ot=N(Je,[["__scopeId","data-v-4982fa99"]]);export{ot 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.