1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1654],{91654:(t,e,o)=>{o.d(e,{generateRoiPdf:()=>x});var a=o(26597),n=o(52699),i=o.n(n),s=o(99349),l=o(339),r=o(80018);let c=[43,114,183],d=[30,41,59],h=[100,116,139],m=[226,232,240],u=[239,246,252],F=[254,242,242],g=[185,28,28],v=[22,163,74],S=()=>new Promise(t=>requestAnimationFrame(()=>t()));async function p(t){if("undefined"==typeof document)return null;let e=document.getElementById(t);if(!e)return null;if(!await function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3,o=()=>!!t.querySelector("svg.recharts-surface");return o()?Promise.resolve(!0):new Promise(a=>{let n=t=>{i.disconnect(),clearTimeout(s),a(t)},i=new MutationObserver(()=>{o()&&n(!0)});i.observe(t,{childList:!0,subtree:!0});let s=setTimeout(()=>n(o()),e)})}(e))return console.warn("Gr\xe1fico n\xe3o carregou a tempo para o PDF",t),null;await S(),await S();try{let t=await i()(e,{scale:2,backgroundColor:"#ffffff",logging:!1,useCORS:!0});return{dataUrl:t.toDataURL("image/png"),ratio:t.height/t.width}}catch(e){return console.warn("Falha ao capturar gr\xe1fico",t,e),null}}async function x(t){var e;let{inputs:o,results:n,investment:i,plan:S,salespersonName:x}=t,{roiRatio:z,paybackDays:w}=(0,s.Gs)(n.monthlySavings,i),D=new a.jsPDF({unit:"pt",format:"a4"}),f=D.internal.pageSize.getWidth(),b=D.internal.pageSize.getHeight(),y=f-80,A=o.firmName.trim()||"Seu escrit\xf3rio",R=new Date().toLocaleDateString("pt-BR",{day:"2-digit",month:"long",year:"numeric"}),P=await p("pdf-snapshot-cumulative"),C=t=>D.setFillColor(t[0],t[1],t[2]),L=t=>D.setTextColor(t[0],t[1],t[2]),M=t=>D.setDrawColor(t[0],t[1],t[2]),E=34;D.setFont("helvetica","bold"),D.setFontSize(18),L(c),D.text("Astrea",40,E+6),D.setFont("helvetica","normal"),D.setFontSize(8.5),L(h),D.text(R,f-40,E+6,{align:"right"}),E+=22,D.setFont("helvetica","bold"),D.setFontSize(14),L(d),D.text("Simula\xe7\xe3o de Retorno do Investimento",40,E),D.setFont("helvetica","normal"),D.setFontSize(9),L(h),D.text("Preparado para ".concat(A),f-40,E,{align:"right"}),E+=8,M(m),D.setLineWidth(.5),D.line(40,E,f-40,E),E+=14,D.setFont("helvetica","bold"),D.setFontSize(9.5),L(c),D.text("PERFIL DO ESCRIT\xd3RIO",40,E),E+=10;let I=[["N\xfamero de advogados",(0,l.Dw)(o.lawyers)],["Processos ativos",(0,l.Dw)(o.activeCases)],["Valor m\xe9dio por hora",(0,l.y7)(o.hourlyRate)],["Horas/semana em tarefas manuais","".concat((0,l.Dw)(o.adminHoursPerWeek)," h")],["Horas/semana buscando informa\xe7\xe3o","".concat((0,l.Dw)(o.searchHoursPerWeek)," h")],["Prazos perdidos por m\xeas",(0,l.Dw)(o.missedDeadlinesPerMonth)],["Valor m\xe9dio por prazo perdido",(0,l.y7)(o.deadlinePenalty
1)]],O=(y-10)/2,T=Math.ceil(I.length/2);for(let t=0;t<I.length;t++){let e=40+t%2*(O+10),o=E+26*Math.floor(t/2);C([249,250,251]),M(m),D.roundedRect(e,o,O,22,3,3,"FD"),D.setFont("helvetica","normal"),D.setFontSize(7.5),L(h),D.text(I[t][0],e+8,o+14),D.setFont("helvetica","bold"),D.setFontSize(9.5),L(d),D.text(I[t][1],e+O-8,o+14,{align:"right"})}E+=26*T+10,D.setFont("helvetica","bold"),D.setFontSize(9.5),L(c),D.text("COMPARATIVO: SITUA\xc7\xc3O ATUAL vs COM ASTREA",40,E),E+=10;let W=(y-10)/2;C(F),M([252,165,165]),D.roundedRect(40,E,W,84,5,5,"FD"),D.setFont("helvetica","bold"),D.setFontSize(9),L(g),D.text("Sem Astrea",52,E+14),D.setFont("helvetica","normal"),D.setFontSize(8),L(h),D.text("Horas perdidas/m\xeas",52,E+30),D.text("Prazos perdidos/m\xeas",52,E+48),D.text("Custo mensal",52,E+68),D.setFont("helvetica","bold"),D.setFontSize(9),L(d),D.text("".concat((0,l.zJ)(n.totalHoursWithout,0)," h"),40+W-12,E+30,{align:"right"}),D.text((0,l.Dw)(n.missedDeadlinesWithout),40+W-12,E+48,{align:"right"}),D.setFontSize(11),L(g),D.text((0,l.y7)(n.monthlyCostWithout),40+W-12,E+68,{align:"right"});let N=40+W+10;C(u),M([147,197,253]),D.roundedRect(N,E,W,84,5,5,"FD"),D.setFont("helvetica","bold"),D.setFontSize(9),L(c),D.text("Com Astrea",N+12,E+14),D.setFont("helvetica","normal"),D.setFontSize(8),L(h),D.text("Horas recuperadas/m\xeas",N+12,E+30),D.text("Prazos protegidos/m\xeas",N+12,E+48),D.text("Economia mensal",N+12,E+68),D.setFont("helvetica","bold"),D.setFontSize(9),L(d),D.text("".concat((0,l.zJ)(n.hoursRecovered,0)," h"),N+W-12,E+30,{align:"right"});let U=n.missedDeadlinesWithout-n.missedDeadlinesWith;D.text("".concat((0,l.zJ)(U,0)," de ").concat((0,l.Dw)(n.missedDeadlinesWithout)),N+W-12,E+48,{align:"right"}),D.setFontSize(11),L(v),D.text((0,l.y7)(n.monthlySavings),N+W-12,E+68,{align:"right"}),E+=94,D.setFont("helvetica","bold"),D.setFontSize(9.5),L(c),D.text("RESULTADO FINANCEIRO",40,E),E+=10;let k=(y-10)/2,H=function(t,e,o,a){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:c;C([255,255,255]),M(m),D.setLineWidth(.6),D.roundedRect(t,E,k,68,5,5,"FD"),D.setFont("helvetica","normal"),D.setFontSize(7),L(h),D.text(e.toUpperCase(),t+10,E+14),D.setFont("helvetica","bold"),D.setFontSize(13),L(n),D.text(o,t+10,E+36),D.setFont("helvetica","normal"),D.setFontSize(7),L(h);let i=D.splitTextToSize(a,k-20);D.text(i,t+10,E+50)};H(40,"Economia mensal",(0,l.y7)(n.monthlySavings),"Horas recuperadas + multas evitadas",v);let G=Number.isFinite(z)?"R$ ".concat((0,l.zJ)(z,2)):"â",J=Number.isFinite(w)&&w>0?"".concat((0,l.Dw)(Math.max(1,Math.round(w)))," ").concat(1===Math.round(w)?"dia":"dias"):"â";H(40+k+10,"Retorno do investimento",G,"Para cada R$ 1 investido ⢠Payback em ".concat(J),c),E+=78,D.setFont("helvetica","bold"),D.setFontSize(9.5),L(c),D.text("PLANO IDEAL",40,E),E+=10,C(u),M([147,197,253]),D.setLineWidth(.6),D.roundedRect(40,E,y,58,5,5,"FD"),D.setFont("helvetica","bold"),D.setFontSize(14),L(c),D.text(S.name,54,E+22);let V=S.custom?"Plano personalizado \xb7 sob consulta":0===S.price?"Gratuito":"".concat((0,l.y7)(null!=(e=S.price)?e:0),"/m\xeas");D.setFont("helvetica","bold"),D.setFontSize(10),L(d),D.text(V,54,E+40),D.setFont("helvetica","normal"),D.setFontSize(7.5),L(h),D.text("Recomendado para ".concat(A),54,E+52),S.popular&&(D.setFont("helvetica","bold"),D.setFontSize(7),L(c),D.text("MAIS POPULAR",40+y-14,E+13,{align:"right"})),D.setFont("helvetica","normal"),D.setFontSize(8),L(h);let _=S.custom?"".concat((0,l.Dw)(o.activeCases)," processos ativos"):"".concat((0,l.Dw)(o.activeCases)," processos ativos \xb7 limite ").concat((0,l.Dw)(S.maxCases)),$=S.custom?"".concat((0,l.Dw)(o.lawyers)," advogado").concat(o.lawyers>1?"s":""):"".concat((0,l.Dw)(o.lawyers)," advogado").concat(o.lawyers>1?"s":""," \xb7 limite ").concat((0,l.Dw)(S.maxUsers)," usu\xe1rio").concat(S.maxUsers>1?"s":"");if(D.text(_,40+y-14,E+31,{align:"right"}),D.text($,40+y-14,E+46,{align:"right"}),E+=68,P){let t=Math.min(y*P.ratio,130),e=t/P.ratio,o=40+(y-e)/2;D.addImage(P.dataUrl,"PNG",o,E,e,t),E+=t+10}let q=(0,r.Ys)(n.annualSavings,i),B=[q.logos,q.pathos];q.ethos&&B.push(q.ethos);let j=y-56,Y=B.map(t=>D.splitTextToSize(t,j)),K=44+Y.reduce((t,e)=>t+Math.max(12,9*e.length)+4,0)+12;C(u),M(c),D.setLineWidth(.8),D.roundedRect(40,E,y,K,6,6,"FD"),D.setFont("helvetica","bold"),D.setFontSize(8),L(c),D.text("ECONOMIA ANUAL ESTIMADA PARA ".concat(A.toUpperCase()),40+y/2,E+14,{align:"center"}),D.setFont("helvetica","bold"),D.setFontSize(22),L(d),D.text((0,l.y7)(n.annualSavings),40+y/2,E+40,{align:"center"});let Q=[[22,163,74],[100,116,139],c],X=E+52;Y.forEach((t,e)=>{var o;C(null!=(o=Q[e])?o:h),D.circle(56,X+3,2,"F"),D.setFont("helvetica","normal"),D.setFontSize(8.5),L(d),D.text(t,64,X+5),X+=Math.max(12,9*t.length)+4}),E+=K+8;let Z=b-34;M(m),D.setLineWidth(.5),D.line(40,Z-18,f-40,Z-18),D.setFont("helvetica","bold"),D.setFontSize(8.5),L(c),D.text("Astrea",40,Z-6),D.setFont("helvetica","normal"),D.setFontSize(7),L(h),D.text("Valores estimados com base em benchmarks de mercado \xb7 Simula\xe7\xe3o realizada em ".concat(R,"."),82,Z-6),x&&x.trim()&&(D.setFont("helvetica","normal"),D.setFontSize(7.5),L(d),D.text("Apresentado por: ".concat(x.trim()),f-40,Z-6,{align:"right"})),D.save("roi-astrea-".concat(A.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"escritorio",".pdf"))}}}]);
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.