1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8197],{8197:(e,r,l)=>{l.r(r),l.d(r,{default:()=>v});var a=l(37876),t=l(14232),n=l(32982),i=l(84678),s=l(30214),d=l(60150),u=l(24684),c=l(91188),o=l(89428),h=l(88274),x=l(84994);let v=function(e){let{onStep1DataChange:r,resetData:l,onReset:v}=e,[j,A]=(0,t.useState)(null),[p,g]=(0,t.useState)([]),[m,S]=(0,t.useState)(null),[y,f]=(0,t.useState)([]),[b,q]=(0,t.useState)(""),[C,N]=(0,t.useState)(""),[w,I]=(0,t.useState)(""),[E,B]=(0,t.useState)(""),[_,F]=(0,t.useState)(""),[M,P]=(0,t.useState)(""),[Q,k]=(0,t.useState)(""),[D,T]=(0,t.useState)(""),[J,R]=(0,t.useState)(""),[V,z]=(0,t.useState)(""),{pegaBairros:L}=(0,t.useContext)(x._),{pegaTipos:G}=(0,t.useContext)(x._),[K,U]=(0,t.useState)(!0),[$,H]=(0,t.useState)(!0),[O,W]=(0,t.useState)(!0),[X,Y]=(0,t.useState)(!0),[Z,ee]=(0,t.useState)(!0),[er,el]=(0,t.useState)(!0),[ea,et]=(0,t.useState)(!0),[en,ei]=(0,t.useState)(!0),[es,ed]=(0,t.useState)(!0),[eu,ec]=(0,t.useState)(!0),[eo,eh]=(0,t.useState)(!0),[ex,ev]=(0,t.useState)(!0),ej=()=>{S(null),U(!0),A(null),H(!0),q(""),W(!0),N(""),I(""),ee(!0),B(""),el(!0),F(""),et(!0),P(""),ei(!0),k(""),ed(!0),T(""),ec(!0),R(""),eh(!0),z(""),ev(!0)};(0,t.useEffect)(()=>{S(null),U(!0),A(null),H(!0),q(""),W(!0),N(""),Y(!0),I(""),ee(!0),B(""),el(!0),F(""),et(!0),P(""),ei(!0),k(""),ed(!0),T(""),ec(!0),R(""),eh(!0),z(""),ev(!0)},[l]),(0,t.useEffect)(()=>{v&&ej()},[v]),(0,t.useEffect)(()=>{r({andar:b,qtdBanheiros:w,qtdElevadores:E,qtdQuartos:_,qtdSalas:M,qtdSuites:Q,qtdVagas:D,valorCondominio:J,valorIptu:V,areaTotal:C,tipo:(null==m?void 0:m.tipoDescricao)||"",bairro:(null==j?void 0:j.bairroNomes)||""})},[b,w,E,_,_,M,Q,D,J,V,C,null==m?void 0:m.tipoDescricao,null==j?void 0:j.bairroNomes]),(0,t.useEffect)(()=>{(async()=>{try{let e=await L();g(e)}catch(e){}})()},[L]),(0,t.useEffect)(()=>{(async()=>{try{let e=await G();f(e)}catch(e){}})()},[G]);let eA=e=>{let r=parseFloat(e.replace(/[^\d]/g,""));if(isNaN(r))return"";let l=Math.floor(r/100),a="".concat(l.toLocaleString("pt-BR"),",").concat((r%100).toString().padStart(2,"0"));return"R$ ".concat(a)},ep=(e,r)=>{let l=e.target.value.replace(/[^\d]/g,"");r(l.length>=1?eA(l):"")},eg=e=>{let r=parseFloat(e.replace(/[^\d.]/g,""));if(isNaN(r))return"";let l=Math.floor(r/100),a="".concat(l.toLocaleString("pt-BR"),",").concat((r%100).toString().padStart(2,"0"));return"m\xb2 ".concat(a)},em=(e,r)=>{let l=e.target.value.replace(/[^\d]/g,"");r(l.length>=1?eg(l):"")};return(0,a.jsxs)(n.A,{sx:{display:"flex",flexDirection:"column",width:"100%"},children:[(0,a.jsxs)(i.A,{direction:"row",spacing:3,justifyContent:"center",children:[(0,a.jsxs)(s.A,{required:!0,error:K,children:[K&&(0,a.jsx)(d.A,{style:{color:"red",margin:0}}),(0,a.jsx)(u.A,{id:"tipo",children:"Escolha um tipo de im\xf3vel"}),(0,a.jsx)(c.A,{variant:"outlined",id:"demo-simple-select",name:"tipo",value:m?m.tipoId.toString():"",onChange:e=>{let r=Number(e.target.value),l=y.find(e=>e.tipoId===r);S(l||null),null!=l&&U(!1)},children:y&&y.map(e=>(0,a.jsx)(o.A,{value:e.tipoId,children:e.tipoDescricao},e.tipoId))})]}),(0,a.jsxs)(s.A,{required:!0,error:$,children:[$&&(0,a.jsx)(d.A,{style:{color:"red",margin:0}}),(0,a.jsx)(u.A,{id:"bairro",children:"Escolha o bairro"}),(0,a.jsx)(c.A,{variant:"outlined",name:"bairro",value:j?j.bairroId.toString():"",onChange:e=>{let r=Number(e.target.value),l=p.find(e=>e.bairroId===r);A(l||null),null!=l&&H(!1)},children:p&&p.map(e=>(0,a.jsx)(o.A,{value:e.bairroId,children:e.bairroNomes},e.bairroId))})]}),(0,a.jsxs)(s.A,{required:!0,error:O,children:[O&&(0,a.jsx)(d.A,{style:{color:"red",margin:0}}),(0,a.jsx)(u.A,{id:"andar",children:"Qual o andar?"}),(0,a.jsxs)(c.A,{error:O,variant:"outlined",type:"number",value:b,onChange:e=>{let r=e.target.value;q(r),W(""===r)},children:[(0,a.jsx)(o.A,{value:0,children:"0"}),(0,a.jsx)(o.A,{value:1,children:"1"}),(0,a.jsx)(o.A,{value:2,children:"2"}),(0,a.jsx)(o.A,{value:3,children:"3"}),(0,a.jsx)(o.A,{value:4,children:"4"}),(0,a.jsx)(o.A,{value:5,children:"5"}),(0,a.jsx)(o.A,{value:6,children:"6"}),(0,a.jsx)(o.A,{value:7,children:"7"}),(0,a.jsx)(o.A,{value:8,children:"8"}),(0,a.jsx)(o.A,{value:9,children:"9"}),(0,a.jsx)(o.A,{value:10,children:"10"}),(0,a.jsx)(o.A,{value:11,children:"11"}),(0,a.jsx)(o.A,{value:12,children:"12"}),(0,a.jsx)(o.A,{value:13,children:"13"}),(0,a.jsx)(o.A,{value:14,children:"14"}),(0,a.jsx)(o.A,{value:15,children:"15"}),(0,a.jsx)(o.A,{value:16,children:"16"}),(0,a.jsx)(o.A,{value:17,children:"17"}),(0,a.jsx)(o.A,{value:18,children:"18"}),(0,a.jsx)(o.A,{value:19,children:"19"}),(0,a.jsx)(o.A,{value:20,children:"20"})]})]})]}),(0,a.jsxs)(i.A,{direction:"row",spacing:3,justifyContent:"center",children:[(0,a.jsxs)(s.A,{required:!0,error:eu,children:[eu&&(0,a.jsx)(d.A,{style:{color:"red",margin:0}}),(0,a.jsx)(u.A,{id:"qtdvagas",children:"N\xfamero de vagas"}),(0,a.jsxs)(c.A,{variant:"outlined",type:"number",value:D,onChange:e=>{let r=e.target.value;T(r),ec(""===r)},children:[(0,a.jsx)(o.A,{value:0,children:"0"}),(0,a.jsx)(o.A,{value:1,children:"1"}),(0,a.jsx)(o.A,{value:2,children:"2"}),(0,a.jsx)(o.A,{value:3,children:"3"}),(0,a.jsx)(o.A,{value:4,children:"4"}),(0,a.jsx)(o.A,{value:5,children:"5"}),(0,a.jsx)(o.A,{value:6,children:"6"}),(0,a.jsx)(o.A,{value:7,children:"7"}),(0,a.jsx)(o.A,{value:8,children:"8"}),(0,a.jsx)(o.A,{value:9,children:"9"}),(0,a.jsx)(o.A,{value:10,children:"10"})]})]}),(0,a.jsxs)(s.A,{required:!0,error:Z,children:[Z&&(0,a.jsx)(d.A,{style:{color:"red",margin:0}}),(0,a.jsx)(u.A,{id:"qtdbanheiros",children:"N\xfamero de banheiros"}),(0,a.jsxs)(c.A,{variant:"outlined",type:"number",value:w,onChange:e=>{let r=e.target.value;I(r),ee(""===r)},children:[(0,a.jsx)(o.A,{value:1,children:"1"}),(0,a.jsx)(o.A,{value:2,children:"2"}),(0,a.jsx)(o.A,{value:3,children:"3"}),(0,a.jsx)(o.A,{value:4,children:"4"}),(0,a.jsx)(o.A,{value:5,children:"5"}),(0,a.jsx)(o.A,{value:6,children:"6"}),(0,a.jsx)(o.A,{value:7,children:"7"}),(0,a.jsx)(o.A,{value:8,children:"8"}),(0,a.jsx)(o.A,{value:9,children:"9"}),(0,a.jsx)(o.A,{value:10,children:"10"})]})]}),(0,a.jsxs)(s.A,{required:!0,error:er,children:[er&&(0,a.jsx)(d.A,{style:{color:"red",margin:0}}),(0,a.jsx)(u.A,{id:"qtdelevadores",children:"N\xfamero de elevadores"}),(0,a.jsxs)(c.A,{variant:"outlined",type:"number",value:E,onChange:e=>{let r=e.target.value;B(r),el(""===r)},children:[(0,a.jsx)(o.A,{value:0,children:"0"}),(0,a.jsx)(o.A,{value:1,children:"1"}),(0,a.jsx)(o.A,{value:2,children:"2"}),(0,a.jsx)(o.A,{value:3,children:"3"}),(0,a.jsx)(o.A,{value:4,children:"4"}),(0,a.jsx)(o.A,{value:5,children:"5"}),(0,a.jsx)(o.A,{value:6,children:"6"}),(0,a.jsx)(o.A,{value:7,children:"7"}),(0,a.jsx)(o.A,{value:8,children:"8"}),(0,a.jsx)(o.A,{value:9,children:"9"}),(0,a.jsx)(o.A,{value:10,children:"10"})]})]})]}),(0,a.jsxs)(i.A,{direction:"row",spacing:3,justifyContent:"center",children:[(0,a.jsxs)(s.A,{required:!0,error:ea,children:[ea&&(0,a.jsx)(d.A,{style:{color:"red",margin:0}}),(0,a.jsx)(u.A,{id:"qtdquartos",children:"N\xfamero de quartos"}),(0,a.jsxs)(c.A,{variant:"outlined",name:"qtdquartos",value:_,type:"number",onChange:e=>{let r=e.target.value;F(r),et(""===r)},children:[(0,a.jsx)(o.A,{value:0,children:"0"}),(0,a.jsx)(o.A,{value:1,children:"1"}),(0,a.jsx)(o.A,{value:2,children:"2"}),(0,a.jsx)(o.A,{value:3,children:"3"}),(0,a.jsx)(o.A,{value:4,children:"4"}),(0,a.jsx)(o.A,{value:5,children:"5"}),(0,a.jsx)(o.A,{value:6,children:"6"}),(0,a.jsx)(o.A,{value:7,children:"7"}),(0,a.jsx)(o.A,{value:8,children:"8"}),(0,a.jsx)(o.A,{value:9,children:"9"}),(0,a.jsx)(o.A,{value:10,children:"10"})]})]}),(0,a.jsxs)(s.A,{required:!0,error:en,children:[en&&(0,a.jsx)(d.A,{style:{color:"red",margin:0}}),(0,a.jsx)(u.A,{id:"qtdsalas",children:"N\xfamero de salas"}),(0,a.jsxs)(c.A,{variant:"outlined",type:"number",value:M,onChange:e=>{let r=e.target.value;P(r),ei(""===r)},children:[(0,a.jsx)(o.A,{value:0,children:"0"}),(0,a.jsx)(o.A,{value:1,children:"1"}),(0,a.jsx)(o.A,{value:2,children:"2"}),(0,a.jsx)(o.A,{value:3,children:"3"}),(0,a.jsx)(o.A,{value:4,children:"4"}),(0,a.jsx)(o.A,{value:5,children:"5"}),(0,a.jsx)(o.A,{value:6,children:"6"}),(0,a.jsx)(o.A,{value:7,children:"7"}),(0,a.jsx)(o.A,{value:8,children:"8"}),(0,a.jsx)(o.A,{value:9,children:"9"}),(0,a.jsx)(o.A,{value:10,children:"10"})]})]}),(0,a.jsxs)(s.A,{required:!0,error:es,children:[es&&(0,a.jsx)(d.A,{style:{color:"red",margin:0}}),(0,a.jsx)(u.A,{id:"qtdbanheiros",children:"N\xfameros de su\xedtes"}),(0,a.jsxs)(c.A,{variant:"outlined",type:"number",value:Q,onChange:e=>{let r=e.target.value;k(r),ed(""===r)},children:[(0,a.jsx)(o.A,{value:0,children:"0"}),(0,a.jsx)(o.A,{value:1,children:"1"}),(0,a.jsx)(o.A,{value:2,children:"2"}),(0,a.jsx)(o.A,{value:3,children:"3"}),(0,a.jsx)(o.A,{value:4,children:"4"}),(0,a.jsx)(o.A,{value:5,children:"5"}),(0,a.jsx)(o.A,{value:6,children:"6"}),(0,a.jsx)(o.A,{value:7,children:"7"}),(0,a.jsx)(o.A,{value:8,children:"8"}),(0,a.jsx)(o.A,{value:9,children:"9"}),(0,a.jsx)(o.A,{value:10,children:"10"})]})]})]}),(0,a.jsxs)(i.A,{direction:"row",spacing:3,justifyContent:"center",sx:{alignItems:"center"},children:[(0,a.jsx)(s.A,{children:(0,a.jsx)(h.A,{error:X,required:!0,label:"\xc1rea interna aproximada",variant:"outlined",type:"text",inputProps:{inputMode:"numeric",pattern:"[0-9]*"},value:C,onChange:e=>{em(e,N),Y(!e.target.value)}})}),(0,a.jsx)(s.A,{children:(0,a.jsx)(h.A,{error:ex,required:!0,variant:"outlined",label:"Valor do IPTU (mensal)",type:"text",inputProps:{inputMode:"numeric",pattern:"[0-9]*"},value:V,onChange:e=>{ep(e,z),ev(!e.target.value)}})}),(0,a.jsx)(s.A,{children:(0,a.jsx)(h.A,{error:eo,required:!0,variant:"outlined",label:"Valor do condom\xednio",type:"text",inputProps:{inputMode:"numeric",pattern:"[0-9]*"},value:J,onChange:e=>{ep(e,R),eh(!e.target.value)}})})]})]})}},84994:(e,r,l)=>{l.d(r,{K:()=>s,_:()=>i});var a=l(37876),t=l(14232),n=l(86082);let i=(0,t.createContext)({}),s=e=>{let{children:r}=e,l=async()=>(await (0,n.J2)()).data,t=async()=>
1(await (0,n.Sz)()).data,s=async(e,r,l,a,t,i,s,d,u,c,o,h,x,v,j,A,p,g,m,S,y,f,b,q,C,N,w,I,E,B,_,F,M,P,Q,k)=>(await (0,n.Fh)(e,r,l,a,t,i,s,d,u,c,o,h,x,v,j,A,p,g,m,S,y,f,b,q,C,N,w,I,E,B,_,F,M,P,Q,k)).data;return(0,a.jsx)(i.Provider,{value:{pegaBairros:l,pegaTipos:t,calculaAluguel:s},children:r})}},86082:(e,r,l)=>{l.d(r,{Fh:()=>t,GT:()=>s,J2:()=>n,Sz:()=>i});var a=l(89174);let t=async(e,r,l,t,n,i,s,d,u,c,o,h,x,v,j,A,p,g,m,S,y,f,b,q,C,N,w,I,E,B,_,F,M,P,Q,k)=>await a.fQ.post("/api/BI/calcular",{tipo:e,bairro:r,andar:l,area:t,qbanheiro:n,qelevador:i,qdormit:s,qsala:d,qsuite:u,qvaga:c,vcond:o,viptu:h,churrasqueira_imo:x,sacada:v,aquecimentogas:j,arcond:A,areaserv:p,armariobanheiro:g,armariocozinha:m,armarioquarto:S,boxbanheiro:y,closet:f,despensa:b,hidromassagem:q,lavabo:C,mobiliado:N,solmanha:w,aguaindividual:I,gascanalizado:E,portaria24h:B,academia:_,churrasqueira_cond:F,piscina:M,playground:P,salaofesta:Q,salaojogos:k}),n=async()=>await a.fQ.get("/api/BI/getBairros"),i=async()=>await a.fQ.get("/api/BI/getTipos"),s=async e=>{try{return(await a.FJ.post("/leads",e)).data}catch(e){}}}}]);
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.