1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/jspdf.es.min-MbcVh8Z_.js","assets/icons-Ftwg0gFU.js","assets/react-core-SJCqmpBs.js","assets/browser-D8a3QxOO.js"])))=>i.map(i=>d[i]); 2import{ab as b}from"./icons-Ftwg0gFU.js";import{l as C,a as P,b as z,c as A,d as h,C as y,F as _}from"./index-PccIvjWY.js";import"./react-core-SJCqmpBs.js";import"./index-HPRL_Gmq.js";import"./radix-Cn1BSsAS.js";import"./supabase-Dr7v01qy.js";import"./dates-CW3_KQM6.js";import"./animation-9S7D5_Pu.js";import"./dnd-D1ccY35k.js";import"./ciclo-rGrJuWn1.js";import"./AdminHeader-C68IE-W0.js";import"./relatorioGestao-BYniPHge.js";import"./RelatorioGestaoDocumento-B-zqOZrb.js";import"./plainText-TiTZg-Hv.js";import"./toCsv-KfAEwdyx.js";import"./constants-R9M6Sb10.js";import"./points-B9CEiUt6.js";import"./selectors-CWw2hmGp.js";import"./visibility-BdpI8n9M.js";import"./dimensionScope-DvDHUFCW.js";import"./planoDeAcao-B2gHYSVp.js";import"./useOuvidoriaTaxonomia-DPXkBxt8.js";import"./avaliacao-leLAwO1r.js";import"./types-BXKNsNc6.js";import"./types-gHcFB2b9.js";import"./AnexoLink-szRvYTZ8.js";import"./sugestaoDeResposta-aNyJOR8Y.js";const o=40;function p(i,n){return i.lastAutoTable?.finalY??n}function c(i,n,r,s,t,d=12){const a=i.splitTextToSize(n,t);return i.text(a,r,s),s+d*a.length}function g(i,n,r,s,t,d){let a=t;return a>d-o-80&&(i.addPage(),a=o),i.setFontSize(11),i.setFont("helvetica","bold"),i.text(r,o,a),a+=8,i.setFont("helvetica","normal"),n(i,{startY:a,head:[y],body:s,styles:{fontSize:9,cellPadding:4,overflow:"linebreak"},headStyles:{fillColor:[37,99,235],textColor:255,fontStyle:"bold"},alternateRowStyles:{fillColor:[245,247,250]},columnStyles:{0:{cellWidth:"auto"},1:{cellWidth:70,halign:"right"},2:{cellWidth:80,halign:"right"}},margin:{left:o,right:o}}),p(i,a)+18}async function ot(i,n){const[{jsPDF:r},{default:s}]=await Promise.all([b(()=>import("./jspdf.es.min-MbcVh8Z_.js").then(l=>l.j),__vite__mapDeps([0,1,2,3])),b(()=>import("./jspdf.plugin.autotable-B0IxatYY.js"),[])]),t=new r({orientation:"portrait",unit:"pt",format:"a4"}),d=t.internal.pageSize.getWidth(),a=t.internal.pageSize.getHeight(),m=d-o*2;let e=o;t.setFontSize(14),t.setFont("helvetica","bold"),e=c(t,"Relatório gerencial da Ouvidoria",o,e,m,18),t.setFontSize(10),t.setFont("helvetica","normal"),t.setTextColor(120),e=c(t,n,o,e,m,14),t.setTextColor(0);for(const[l,T]of C(i)){t.setFont("helvetica","bold");const F=t.getTextWidth(`${l}: `);t.text(`${l}: `,o,e),t.setFont("helvetica","normal"),e=c(t,T,o+F,e,m-F,14)}e+=6;const v=P(i),[x,...f]=v;t.setFontSize(9),t.setFont("helvetica","bold"),t.setTextColor(150,60,0),e=c(t,x,o,e,m,12),t.setTextColor(0),t.setFont("helvetica","normal"),e+=10,t.setFontSize(11),t.setFont("helvetica","bold"),t.text("Indicadores de prazo",o,e),e+=8,t.setFont("helvetica","normal"),s(t,{startY:e,body:z(i),theme:"plain",styles:{fontSize:9,cellPadding:4,overflow:"linebreak"},columnStyles:{0:{cellWidth:220,fontStyle:"bold"},1:{cellWidth:"auto"}},margin:{left:o,right:o}}),e=p(t,e)+18;const u=A(i);if(u&&(e>a-o-160&&(t.addPage(),e=o),t.setFontSize(11),t.setFont("helvetica","bold"),t.text("Satisfação do atendimento",o,e),e+=14,t.setFontSize(8),t.setFont("helvetica","normal"),t.setTextColor(80),e=c(t,_,o,e,m,11),t.setTextColor(0),s(t,{startY:e,body:u,theme:"plain",styles:{fontSize:9,cellPadding:4,overflow:"linebreak"},columnStyles:{0:{cellWidth:220,fontStyle:"bold"},1:{cellWidth:"auto"}},margin:{left:o,right:o}}),e=p(t,e)+18),e=g(t,s,"Por tipologia",h(i.tipologias,i.totais.recebidas),e,a),e=g(t,s,"Assuntos mais demandados",h(i.assuntos,i.totais.recebidas),e,a),e=g(t,s,"Por unidade",h(i.unidades,i.totais.recebidas),e,a),f.length>0){e>a-o-60&&(t.addPage(),e=o),t.setFontSize(11),t.setFont("helvetica","bold"),t.setTextColor(0),t.text("Como ler estes números",o,e),e+=14,t.setFontSize(8),t.setFont("helvetica","normal"),t.setTextColor(80);for(const l of f)e>a-o-30&&(t.addPage(),e=o),e=c(t,`- ${l}`,o,e,m,11)+4;t.setTextColor(0)}const S=t.getNumberOfPages();t.setFontSize(8),t.setTextColor(120);for(let l=1;l<=S;l+=1)t.setPage(l),t.text(`Página ${l} de ${S}`,d-o,a-20,{align:"right"});return t}export{ot as toPdfGerencial};
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.