PageSourceSearch

https://santabarbara.ba.gov.br/assets/MapaDoSite-RdvjOYRf.js

js santabarbara.ba.gov.br collected 2026-10-02 22:38:11 UTC 10,275 bytes, 1 lines download raw bytes

1import{u as h,j as e}from"./vendor-query-CAW0R6Fd.js";import{S as M,T as K,H as O,bn as R,a as L,B as W,a8 as B,a9 as D,b as H,ai as S,o as m,aa as u,bo as z,N as w,C as I,bm as $,F as G,aC as Q,aE as U,q as k,am as V,bp as J,ak as X,ao as Y}from"./index-Dr2jZQpy.js";import{r as g}from"./vendor-react-BIBNHc4z.js";import{p as Z}from"./paginas.service-Df5dL9fm.js";import{I as ee}from"./input-Bu5ViSvB.js";import{A as se,a as n,b as i,c as l}from"./accordion-LOCXV7l7.js";import"./ui-radix-CMPBktV5.js";import"./utils-objBp_8x.js";const de=()=>{var b,C;const[x,T]=g.useState(""),[f,j]=g.useState(["institucional","transparencia","servicos","eventos-noticias","lgpd","contatos"]),{data:o,isLoading:q}=h({queryKey:["paginas-mapa-site"],queryFn:async()=>(await Z.getPaginas({status:"publicado"})).data}),{data:v,isLoading:A}=h({queryKey:["categorias-paginas-mapa"],queryFn:async()=>{if(Q.isApiMode())return[];const{data:s,error:a}=await U.from("categorias_paginas").select("id, titulo, slug").eq("ativo",!0).order("ordem");if(a)throw a;return s}}),{data:c,isLoading:E}=h({queryKey:k.transparencia.categoriasComItens(),queryFn:()=>V.getActiveWithItems()}),{data:d,isLoading:P}=h({queryKey:k.linksRapidos.ativos(),queryFn:async()=>(await J()).filter(a=>a.ativo)}),F=q||A||E||P,N=(s,a="h-4 w-4")=>{const r=X[s]||Y;return e.jsx(r,{className:a})},_=()=>{f.length>0?j([]):j(["institucional","transparencia","servicos","eventos-noticias","lgpd","contatos"])},p=g.useMemo(()=>{if(!x)return{paginas:o,transparencia:c,linksRapidos:d};const s=x.toLowerCase();return{paginas:o==null?void 0:o.filter(a=>a.titulo.toLowerCase().includes(s)),transparencia:c==null?void 0:c.map(a=>{var r;return{...a,itens:(r=a.itens)==null?void 0:r.filter(t=>t.nome.toLowerCase().includes(s))}}).filter(a=>a.titulo.toLowerCase().includes(s)||a.itens&&a.itens.length>0),linksRapidos:d==null?void 0:d.filter(a=>a.titulo.toLowerCase().includes(s))}},[x,o,c,d]),y=g.useMemo(()=>{var a;const s={};return(a=p.paginas)==null||a.forEach(r=>{const t=r.categoria_id||"sem-categoria";s[t]||(s[t]=[]),s[t].push(r)}),s},[p.paginas]);return e.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[e.jsx(M,{title:"Mapa do Site",description:"Navegue por todas as seções e páginas disponíveis no portal.",path:"/mapa-do-site"}),e.jsx(K,{}),e.jsx(O,{}),e.jsxs("main",{className:"flex-grow",children:[e.jsx("section",{className:"bg-gradient-to-r from-primary to-primary/80 text-primary-foreground py-16",children:e.jsxs("div",{className:"container mx-auto px-4",children:[e.jsxs("div",{className:"flex items-center justify-center mb-4",children:[e.jsx(R,{className:"h-12 w-12 mr-4"}),e.jsx("h1",{className:"text-4xl md:text-5xl font-bold",children:"Mapa do Site"})]}),e.jsx("p",{className:"text-center text-lg text-primary-foreground/90 max-w-3xl mx-auto",children:"Navegue por todas as seções e páginas do portal de forma organizada"})]})}),e.jsx("section",{className:"container mx-auto px-4 py-8",children:e.jsxs("div",{className:"bg-card rounded-lg shadow-lg p-6",children:[e.jsxs("div",{className:"flex flex-col md:flex-row gap-4 mb-6",children:[e.jsxs("div",{className:"flex-1 relative",children:[e.jsx(L,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground h-5 w-5"}),e.jsx(ee,{type:"text",placeholder:"Pesquisar no mapa do site...",value:x,onChange:s=>T(s.target.value),className:"pl-10"})]}),e.jsx(W,{onClick:_,variant:"outline",className:"shrink-0",children:f.length>0?e.jsxs(e.Fragment,{children:[e.jsx(B,{className:"h-4 w-4 mr-2"}),"Recolher Todos"]}):e.jsxs(e.Fragment,{children:[e.jsx(D,{className:"h-4 w-4 mr-2"}),"Expandir Todos"]})})]}),F?e.jsx("div",{className:"space-y-4",children:[1,2,3,4].map(s=>e.jsx(H,{className:"h-16 w-full"},s))}):e.jsxs(se,{type:"multiple",value:f,onValueChange:j,className:"space-y-4",children:[e.jsxs(n,{value:"institucional",className:"border rounded-lg px-4",children:[e.jsx(i,{className:"hover:no-underline",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(S,{className:"h-5 w-5 text-primary"}),e.jsx("span",{className:"text-lg font-semibold",children:"Institucional"})]})}),e.jsx(l,{children:e.jsxs("div",{className:"space-y-2 pl-8 pt-2",children:[v==null?void 0:v.map(s=>{const a=y[s.id];return!a||a.length===0?null:e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"font-medium text-sm text-muted-foreground uppercase tracking-wide mt-4 mb-2",children:s.titulo}),a.map(r=>e.jsxs("a",{href:`/pagina/${r.slug}
1`,className:"flex items-center gap-2 text-foreground/80 hover:text-primary hover:underline py-1",children:[e.jsx(m,{className:"h-4 w-4"}),r.titulo]},r.id))]},s.id)}),y["sem-categoria"]&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"font-medium text-sm text-muted-foreground uppercase tracking-wide mt-4 mb-2",children:"Outras Páginas"}),y["sem-categoria"].map(s=>e.jsxs("a",{href:`/pagina/${s.slug}`,className:"flex items-center gap-2 text-foreground/80 hover:text-primary hover:underline py-1",children:[e.jsx(m,{className:"h-4 w-4"}),s.titulo]},s.id))]})]})})]}),e.jsxs(n,{value:"transparencia",className:"border rounded-lg px-4",children:[e.jsx(i,{className:"hover:no-underline",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(u,{className:"h-5 w-5 text-primary"}),e.jsx("span",{className:"text-lg font-semibold",children:"Transparência Pública"})]})}),e.jsx(l,{children:e.jsxs("div",{className:"space-y-2 pl-8 pt-2",children:[e.jsxs("a",{href:"/transparencia",className:"flex items-center gap-2 text-foreground/80 hover:text-primary hover:underline py-1 font-medium",children:[e.jsx(u,{className:"h-4 w-4"}),"Portal da Transparência"]}),(b=p.transparencia)==null?void 0:b.map(s=>e.jsxs("div",{className:"space-y-2",children:[e.jsxs("a",{href:`/transparencia/${s.slug}`,className:"flex items-center gap-2 text-foreground font-medium hover:text-primary hover:underline py-1 mt-3",children:[N(s.icone),s.titulo]}),s.itens&&s.itens.length>0&&e.jsx("div",{className:"pl-6 space-y-1",children:s.itens.map(a=>{var r,t;return e.jsxs("a",{href:a.link_url||"#",className:"flex items-center gap-2 text-foreground/70 hover:text-primary hover:underline py-1 text-sm",target:(r=a.link_url)!=null&&r.startsWith("http")?"_blank":void 0,rel:(t=a.link_url)!=null&&t.startsWith("http")?"noopener noreferrer":void 0,children:[N(a.icone||"FileText"),a.nome]},a.id)})})]},s.id))]})})]}),e.jsxs(n,{value:"servicos",className:"border rounded-lg px-4",children:[e.jsx(i,{className:"hover:no-underline",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(z,{className:"h-5 w-5 text-primary"}),e.jsx("span",{className:"text-lg font-semibold",children:"Serviços ao Cidadão"})]})}),e.jsx(l,{children:e.jsxs("div",{className:"space-y-2 pl-8 pt-2",children:[e.jsxs("a",{href:"/ouvidoria",className:"flex items-center gap-2 text-foreground/80 hover:text-primary hover:underline py-1",children:[e.jsx(w,{className:"h-4 w-4"}),"Ouvidoria"]}),e.jsxs("a",{href:"/publicacoes",className:"flex items-center gap-2 text-foreground/80 hover:text-primary hover:underline py-1",children:[e.jsx(m,{className:"h-4 w-4"}),"Publicações"]}),e.jsxs("a",{href:"/busca",className:"flex items-center gap-2 text-foreground/80 hover:text-primary hover:underline py-1",children:[e.jsx(L,{className:"h-4 w-4"}),"Busca"]}),(C=p.linksRapidos)==null?void 0:C.map(s=>e.jsxs("a",{href:s.link_url,className:"flex items-center gap-2 text-foreground/80 hover:text-primary hover:underline py-1",target:s.link_url.startsWith("http")?"_blank":void 0,rel:s.link_url.startsWith("http")?"noopener noreferrer":void 0,children:[N(s.icone),s.titulo]},s.id))]})})]}),e.jsxs(n,{value:"eventos-noticias",className:"border rounded-lg px-4",children:[e.jsx(i,{className:"hover:no-underline",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(I,{className:"h-5 w-5 text-primary"}),e.jsx("span",{className:"text-lg font-semibold",children:"Eventos e Notícias"})]})}),e.jsx(l,{children:e.jsxs("div",{className:"space-y-2 pl-8 pt-2",children:[e.jsxs("a",{href:"/agenda",className:"flex items-center gap-2 text-foreground/80 hover:text-primary hover:underline py-1",children:[e.jsx(I,{className:"h-4 w-4"}),"Agenda de Eventos"]}),e.jsxs("a",{href:"/noticias",className:"flex items-center gap-2 text-foreground/80 hover:text-primary hover:underline py-1",children:[e.jsx($,{className:"h-4 w-4"}),"Notícias"]})]})})]}),e.jsxs(n,{value:"lgpd",className:"border rounded-lg px-4",children:[e.jsx(i,{className:"hover:no-underline",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(u,{className:"h-5 w-5 text-primary"}),e.jsx("span",{className:"text-lg font-semibold",children:"LGPD / Acesso à Informação"})]})}),e.jsx(l,{children:e.jsxs("div",{className:"space-y-2 pl-8 pt-2",children:[e.jsxs("a",{href:"#",className:"flex items-center gap-2 text-foreground
1/80 hover:text-primary hover:underline py-1",children:[e.jsx(m,{className:"h-4 w-4"}),"Política de Privacidade"]}),e.jsxs("a",{href:"#",className:"flex items-center gap-2 text-foreground/80 hover:text-primary hover:underline py-1",children:[e.jsx(u,{className:"h-4 w-4"}),"Lei de Acesso à Informação"]}),e.jsxs("a",{href:"/esic",className:"flex items-center gap-2 text-foreground/80 hover:text-primary hover:underline py-1",children:[e.jsx(m,{className:"h-4 w-4"}),"e-SIC (Serviço de Informação ao Cidadão)"]})]})})]}),e.jsxs(n,{value:"contatos",className:"border rounded-lg px-4",children:[e.jsx(i,{className:"hover:no-underline",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(w,{className:"h-5 w-5 text-primary"}),e.jsx("span",{className:"text-lg font-semibold",children:"Contatos"})]})}),e.jsx(l,{children:e.jsxs("div",{className:"space-y-2 pl-8 pt-2",children:[e.jsxs("a",{href:"/ouvidoria",className:"flex items-center gap-2 text-foreground/80 hover:text-primary hover:underline py-1",children:[e.jsx(w,{className:"h-4 w-4"}),"Ouvidoria Municipal"]}),e.jsxs("a",{href:"/estrutura-organizacional",className:"flex items-center gap-2 text-foreground/80 hover:text-primary hover:underline py-1",children:[e.jsx(S,{className:"h-4 w-4"}),"Estrutura Organizacional"]})]})})]})]})]})})]}),e.jsx(G,{})]})};export{de 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.