PageSourceSearch

https://fapemig.br/_nuxt/BUXfwQpm.js

js fapemig.br collected 2026-10-01 10:33:30 UTC 14,375 bytes, 1 lines download raw bytes

1import{d as re,w as ie,ae as oe,i as he,af as _e,c as L,ag as be,e as A,t as R,f as U,ah as ye,j as D,a6 as ve,r as v,k as V,o as C,ab as le,l as K,z as xe,p as we,m as Ee,g as Ie,ai as G,h as W,B as O,aj as Ae,N as se}from"./BKRH0lRf.js";import{u as Ce}from"./DV0ZOggt.js";import{F as Se}from"./C7FTi50u.js";import{F as ke}from"./XBLi1YJV.js";import{I as ze}from"./BBTesfEn.js";const Le={class:"gallery-modal__header"},Fe={class:"gallery-modal__counter","aria-live":"polite"},Te=["src","srcset","sizes","alt"],$e={key:0,class:"gallery-modal__caption","aria-live":"polite"},Be=re({__name:"FImageGalleryModal",props:{open:{type:Boolean},images:{},currentIndex:{}},emits:["close","update:currentIndex"],setup(_,{emit:d}){const u=_,F=d,S=v(null),M=v(null),x=v(null);let T=null,P="";const f=V(()=>u.images[u.currentIndex]),q=V(()=>u.images.length>1);function g(l){if(!u.images.length)return;const p=(l+u.images.length)%u.images.length;F("update:currentIndex",p)}function k(){F("close")}function X(l){if(l.key==="Escape"){l.preventDefault(),k();return}if(l.key==="ArrowLeft"){l.preventDefault(),g(u.currentIndex-1);return}if(l.key==="ArrowRight"){l.preventDefault(),g(u.currentIndex+1);return}if(l.key==="Home"){l.preventDefault(),g(0);return}if(l.key==="End"){l.preventDefault(),g(u.images.length-1);return}if(l.key!=="Tab"||!S.value)return;const p=Array.from(S.value.querySelectorAll('button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])')),h=p[0],b=p.at(-1);!h||!b||(l.shiftKey&&document.activeElement===h?(l.preventDefault(),b.focus()):!l.shiftKey&&document.activeElement===b&&(l.preventDefault(),h.focus()))}function z(l){x.value=l.changedTouches[0]?.clientX??null}function $(l){if(x.value===null)return;const h=(l.changedTouches[0]?.clientX??x.value)-x.value;x.value=null,!(Math.abs(h)<48)&&g(u.currentIndex+(h<0?1:-1))}function B(){document.body.style.overflow=P,T?.focus(),T=null}return ie(()=>u.open,async l=>{if(!l){B();return}T=document.activeElement,P=document.body.style.overflow,document.body.style.overflow="hidden",await le(),M.value?.focus()}),oe(B),(l,p)=>(C(),he(_e,{to:"body"},[_.open&&f.value?(C(),L("div",{key:0,ref_key:"modal",ref:S,class:"gallery-modal",role:"dialog","aria-modal":"true","aria-label":"Visualização ampliada da galeria",onClick:be(k,["self"]),onKeydown:X},[A("header",Le,[A("p",Fe,R(_.currentIndex+1)+" de "+R(_.images.length),1),A("button",{ref_key:"closeButton",ref:M,type:"button",class:"gallery-modal__close","aria-label":"Fechar visualização da galeria",onClick:k},[U(ye,{"aria-hidden":"true"})],512)]),q.value?(C(),L("button",{key:0,type:"button",class:"gallery-modal__arrow gallery-modal__arrow--previous","aria-label":"Imagem anterior",onClick:p[
10]||(p[0]=h=>g(_.currentIndex-1))},[U(ze,{"aria-hidden":"true"})])):D("",!0),A("figure",{class:"gallery-modal__figure",onTouchstartPassive:z,onTouchendPassive:$},[A("img",{src:f.value.src,srcset:f.value.srcset,sizes:f.value.sizes,alt:f.value.alt||f.value.caption||`Imagem ${_.currentIndex+1}`,class:"gallery-modal__image"},null,8,Te),f.value.caption?(C(),L("figcaption",$e,R(f.value.caption),1)):D("",!0)],32),q.value?(C(),L("button",{key:1,type:"button",class:"gallery-modal__arrow gallery-modal__arrow--next","aria-label":"Próxima imagem",onClick:p[1]||(p[1]=h=>g(_.currentIndex+1))},[U(ve,{"aria-hidden":"true"})])):D("",!0)],544)):D("",!0)]))}}),Me=Object.assign(K(Be,[["__scopeId","data-v-2fdb2af9"]]),{__name:"GeneralFImageGalleryModal"}),Pe={},qe={width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ne(_,d){return C(),L("svg",qe,[...d[0]||(d[0]=[A("path",{d:"M12 4L12 20M12 4L18 10M12 4L6 10",stroke:"#0e6dac","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const De=Object.assign(K(Pe,[["render",Ne]]),{__name:"IconsIconArrowCard"}),Ge=["innerHTML"],Ue=re({inheritAttrs:!1,__name:"FWordPressContent",props:{content:{},attachmentBlocks:{default:()=>[]},cardBlocks:{default:()=>[]},reverseAttachmentFiles:{type:Boolean,default:!1}},setup(_){const d=_,{cleanContent:u}=Ce(V(()=>({content:d.content}))),F=Ae()?.appContext,S=v(!1);function M(e){const t=q(e,"data-nivel")||e.match(/\bfapemig-avisos--([a-z0-9_-]+)\b/i)?.[1]?.toLowerCase()||"",a={alerta:"critical",atencao:"warning",informativo:"success"},n=g(e,"fapemig-avisos__botao");return{type:"alert",alertType:a[t]??"critical",title:O(g(e,"fapemig-avisos__titulo")?.content),description:g(e,"fapemig-avisos__descricao")?.content.trim()??"",buttonText:O(n?.content),buttonUrl:f(n?.attributes??"")}}function x(e,t){const a=t?T(t):[],n=a.length>0?a:P(e);return n.length===0?{type:"html",html:e}:{type:"attachments",files:d.reverseAttachmentFiles?n.reverse():n,showFileExtension:t?t.mostrar_tipo!==!1:e.includes("fapemig-anexos__icone--"),showFileSize:t?t.mostrar_tamanho!==!1:e.includes("fapemig-anexos__tamanho")}}function T(e){return e.arquivos.map(t=>({title:t.titulo||t.filename||"",filename:t.filename||"",filesize:t.tamanho_formatado||t.tamanho_bytes||"",type:t.extensao.toUpperCase()||"",url:t.url}))}function P(e){const t=/<a\b([^>]*)>([\s\S]*?)<\/a>/gi,a=[];let n;for(;(n=t.exec(e))!==null;){const i=n[1]??"",r=n[2]??"",s=f(i);if(!s)continue;const o=X(s),c=k(r,"fapemig-anexos__nome"),I=k(r,"fapemig-anexos__tamanho"),m=r.match(/\bfapemig-anexos__icone--([a-z0-9]+)\b/i)?.[1];a.push({title:c||o.replace(/\.[^/.]+$/,""),filename:o,filesize:I,type:(m||o.split(".").pop()||"").toUpperCase(),url:s})}return a}function f(e){const t=e.match(/\bhref\s*=\s*(["'])(.*?)\1/i)?.[2]??"";return se(t)}function q(e,t){const a=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp(`\\b${a}\\s*=\\s*(["'])(.*?)\\1`,"i");return se(e.match(n)?.[2]??"").toLowerCase()}function g(e,t){const a=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp(`<([a-z][\\w:-]*)\\b([^>]*class=["'][^"']*\\b${a}\\b[^"']*["'][^>]*)>([\\s\\S]*?)<\\/\\1\\s*>`,"i"),i=e.match(n);return i?{attributes:i[2]??"",content:i[3]??""}:null}function k(e,t){return O(g(e,t)?.content)}function X(e){try{const a=new URL(e,"https://fapemig.invalid").pathname.split("/").filter(Boolean).pop()??"";return decodeURIComponent(a)}catch{return e.split(/[?#]/)[0]?.split("/").pop()??""}}const z=v(null),$=v(!1),B=v([]),l=v(0),p=[],h=[],b=[],H=[],J=[];let N=null;function y(e,t,a){e.addEventListener(t,a),h.push(()=>e.removeEventListener(t,a))}function Q(){h.splice(0).forEach(e=>e()),H.splice(0).forEach(e=>G(null,e)),J.splice(0).forEach(({host:e,marker:t})=>{G(null,e),e.isConnected&&e.replaceWith(t)}),b.splice(0).forEach(e=>e.remove()),p.splice(0).forEach(e=>{const{element:t,mediaElement:a,src:n,alt:i,srcset:r,sizes:s,role:o,ariaLabel:c,carouselIndex:I}=e;w(t,"src",n),w(t,"alt",i),w(t,"srcset",r),w(t,"sizes",s),w(a,"role",o),w(a,"aria-label",c),w(a,"data-carousel-index",I)}),N=null}function Y(e,t){if(t.type==="html")return;const a=document.createElement("div");a.className=`wordpress-component-host wordpress-component-host--${t.type}`;const n=t.type==="attachments"?W(ke,{files:t.files,showFileExtension:t.showFileExtension,showFileSize:t.showFileSize}
1):W(Se,{type:t.alertType,title:t.title,description:t.description,buttonText:t.buttonText,buttonUrl:t.buttonUrl});F&&(n.appContext=F),e.replaceWith(a),G(n,a),J.push({host:a,marker:e})}function ce(){let e=0;z.value?.querySelectorAll(".wp-block-fapemig-anexos, .wp-block-fapemig-avisos")?.forEach(a=>{if(a.classList.contains("wp-block-fapemig-anexos")){const n=x(a.outerHTML,d.attachmentBlocks[e]);e+=1,Y(a,n);return}Y(a,M(a.outerHTML))})}function w(e,t,a){a===null?e.removeAttribute(t):e.setAttribute(t,a)}function Z(e){if(!e)return"";const t=document.createElement("div");return t.innerHTML=e,t.textContent?.trim()||""}function ue(e,t){const a=e.querySelector("figcaption, .fapemig-gallery__legenda, .fapemig-gallery__caption, .wp-element-caption, [data-gallery-caption], [data-caption], [data-legenda]"),n=Z(a?.textContent);if(n)return n;const i=[t,t.closest(".fapemig-gallery__media"),t.closest(".fapemig-gallery__trigger"),e],r=["data-gallery-caption","data-image-caption","data-caption","data-legenda","title"];for(const s of i)if(s)for(const o of r){const c=Z(s.getAttribute(o));if(c)return c}return""}function E(e,t){const a=(t+e.images.length)%e.images.length;e.activeIndex=a,e.cells.forEach((n,i)=>{n.classList.toggle("is-gallery-active",i===a)}),e.thumbnails.forEach(n=>{const r=Number(n.dataset.galleryIndex)===a;n.classList.toggle("is-gallery-selected",r),r?(n.setAttribute("aria-current","true"),me(n)):n.removeAttribute("aria-current")})}function me(e){const t=e.parentElement;if(!t)return;const a=e.getBoundingClientRect(),n=t.getBoundingClientRect(),i=a.left<n.left?a.left-n.left:a.right>n.right?a.right-n.right:0;if(i===0)return;const r=window.matchMedia("(prefers-reduced-motion: reduce)").matches,s=t.scrollLeft+i;t.scrollTo({left:s,behavior:r?"auto":"smooth"})}function ee(e,t){N=e,E(e,t),B.value=e.images,l.value=e.activeIndex,$.value=!0}function de(e){l.value=e,N&&E(N,e)}function te(e,t){const a=document.createElement("button");return a.type="button",a.className=`fapemig-gallery__mobile-arrow fapemig-gallery__mobile-arrow--${t}`,a.dataset.galleryEnhancement="true",a.setAttribute("aria-label",e),a.textContent=t==="previous"?"‹":"›",b.push(a),a}function pe(e,t){const a=document.createElement("div");a.className="fapemig-gallery__navigation",t.images.length<=3&&a.classList.add("fapemig-gallery__navigation--mobile-only"),a.dataset.galleryEnhancement="true",a.setAttribute("role","group"),a.setAttribute("aria-label","Miniaturas da galeria");const n=document.createElement("div");n.className="fapemig-gallery__thumbnails",t.images.forEach((r,s)=>{const o=document.createElement("button");o.type="button",o.className="fapemig-gallery__thumbnail",s<3&&o.classList.add("fapemig-gallery__thumbnail--stage"),o.dataset.galleryIndex=String(s),o.setAttribute("aria-label",`Selecionar imagem ${s+1} de ${t.images.length}`);const c=document.createElement("img");c.src=r.src,c.alt="",c.loading="lazy",o.append(c),n.append(o),t.thumbnails.push(o),y(o,"click",()=>{window.matchMedia("(max-width: 767px)").matches?E(t,s):ee(t,s)})});const i=document.createElement("p");return i.className="fapemig-gallery__hint",i.innerHTML='<span class="fapemig-gallery__hint-desktop">Clique em qualquer imagem para ampliar em tela cheia</span><span class="fapemig-gallery__hint-mobile">Deslize ou toque nas miniaturas para navegar</span>',a.append(n,i),e.append(a),b.push(a),a}function ge(e){const t=e.querySelector(".fapemig-gallery__stage");if(!t)return;const a=Array.from(e.querySelectorAll(".fapemig-gallery__celula")).slice(0,30);a.forEach(r=>{r.parentElement!==t&&t.append(r)}),e.querySelectorAll(".fapemig-gallery__grade").forEach(r=>{r.hidden=!0});const n=[];if(a.forEach(r=>{const s=r.querySelector(".fapemig-gallery__imagem, img");if(!s?.src)return;const o=s.closest("a[href]")?.href;n.push({src:s.dataset.fullUrl||o||s.src,alt:s.alt.trim(),caption:ue(r,s),srcset:s.srcset||void 0,sizes:s.sizes||void 0})}),!n.length)return;e.dataset.imageCount=String(n.length),t.classList.add(`fapemig-gallery__stage--count-${Math.min(n.length,4)}`),e.setAttribute("role","group"),e.setAttribute("aria-label",`Galeria com ${n.length} imagens`);const i={images:n,cells:a.slice(0,n.length),thumbnails:[],activeIndex:0};
1if(i.cells.forEach((r,s)=>{const o=r.querySelector(".fapemig-gallery__trigger, button");o&&(o.setAttribute("aria-label",`Ampliar imagem ${s+1} de ${n.length}`),y(o,"click",()=>ee(i,s)))}),n.length>1&&pe(e,i),n.length>1){const r=te("Imagem anterior","previous"),s=te("Próxima imagem","next");t.append(r,s),y(r,"click",c=>{c.stopPropagation(),E(i,i.activeIndex-1)}),y(s,"click",c=>{c.stopPropagation(),E(i,i.activeIndex+1)});let o=null;y(t,"touchstart",c=>{o=c.changedTouches[0]?.clientX??null}),y(t,"touchend",c=>{if(o===null)return;const m=(c.changedTouches[0]?.clientX??o)-o;o=null,Math.abs(m)>=48&&E(i,i.activeIndex+(m<0?1:-1))})}E(i,0)}function j(e,t){const a=(t+e.images.length)%e.images.length,n=e.images[a];n&&(e.activeIndex=a,e.imageElement.src=n.url,e.imageElement.alt=n.alt||"",e.imageElement.removeAttribute("srcset"),e.imageElement.removeAttribute("sizes"),e.images.length>1&&(e.mediaElement.dataset.carouselIndex=String(a),e.mediaElement.setAttribute("aria-label",`Imagem ${a+1} de ${e.images.length}`)))}function ae(e,t){const a=document.createElement("button");return a.type="button",a.className=`fapemig-card__carousel-arrow fapemig-card__carousel-arrow--${t}`,a.dataset.cardCarouselEnhancement="true",a.setAttribute("aria-label",e),G(W(De,{class:"fapemig-card__carousel-icon","aria-hidden":"true",focusable:"false"}),a),H.push(a),b.push(a),a}function fe(e,t){const a=e.dataset.clientId,n=d.cardBlocks.find(m=>m.client_id===a)??d.cardBlocks.find(m=>m.meta.ordem===t+1),i=n?.midia?.imagens.filter(m=>!!m.url)??[];if(!i.length||n?.midia?.tipo!=="imagem")return;const r=e.querySelector(".fapemig-card__media"),s=r?.querySelector(".fapemig-card__imagem");if(!r||!s)return;p.push({element:s,mediaElement:r,src:s.getAttribute("src"),alt:s.getAttribute("alt"),srcset:s.getAttribute("srcset"),sizes:s.getAttribute("sizes"),role:r.getAttribute("role"),ariaLabel:r.getAttribute("aria-label"),carouselIndex:r.getAttribute("data-carousel-index")});const o={images:i,imageElement:s,mediaElement:r,activeIndex:0};if(i.length>1&&r.setAttribute("role","group"),j(o,0),i.length<=1)return;const c=ae("Imagem anterior","previous"),I=ae("Próxima imagem","next");r.append(c,I),y(c,"click",m=>{m.stopPropagation(),j(o,o.activeIndex-1)}),y(I,"click",m=>{m.stopPropagation(),j(o,o.activeIndex+1)})}async function ne(){S.value&&(await le(),Q(),ce(),z.value?.querySelectorAll(".wp-block-fapemig-gallery, .fapemig-gallery").forEach(ge),z.value?.querySelectorAll(".wp-block-fapemig-card, .fapemig-card").forEach(fe))}return ie([u,()=>d.attachmentBlocks,()=>d.cardBlocks,()=>d.reverseAttachmentFiles],ne,{deep:!0,immediate:!0,flush:"post"}),xe(()=>{S.value=!0,ne()}),oe(Q),(e,t)=>(C(),L(we,null,[A("div",Ee({ref_key:"contentRoot",ref:z},e.$attrs,{class:"wordpress-content wordpress-rendered-content",innerHTML:Ie(u)}),null,16,Ge),U(Me,{open:$.value,images:B.value,"current-index":l.value,onClose:t[0]||(t[0]=a=>$.value=!1),"onUpdate:currentIndex":de},null,8,["open","images","current-index"])],64))}}),Ve=Object.assign(K(Ue,[["__scopeId","data-v-696ebdd1"]]),{__name:"GeneralFWordPressContent"});export{Ve as F};

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.