1_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[151,63],{LQvc:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/perfil/gerenciamento/vistoria/[id]/[vistoria]",function(){return n("VD5V")}])},UF2t:function(e,t,n){"use strict";n.d(t,"a",(function(){return I}));var i=n("nKUr"),a=n("dhJC"),o=n("cpVT"),l=n("vJKn"),r=n.n(l),c=n("rg98"),s=n("q1tI"),d=n("+0BD"),u=n("2U2a"),v=n("IP2g"),j=n("tTGf"),m=n("/MKj"),b=n("40+L"),p=n.n(b),O=(n("VLDe"),n("+TwM")),h=n.n(O),f=n("BEdn"),x=n.n(f),g=n("wd/R"),y=n.n(g),N=n("b2yJ"),_=n("20a2"),w=n("OKMn"),k=n("5PhN");function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){Object(o.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function I(e){var t,n,o,l,b,O,f,g,S,I,P,D,Y,q,E,T,M,R,B,L,A=Object(s.useRef)(null),V=Object(m.d)((function(e){return e.user})).user,F=Object(_.useRouter)(),U=Object(s.useState)(""),H=U[0],J=U[1],z=Object(s.useState)(!1),K=z[0],G=z[1],Q=Object(s.useState)(null),Z=Q[0],X=Q[1];Object(s.useEffect)((function(){var t=e.vistoria;null!==t&&void 0!==t&&t.comment&&t.comments.push({comment:null===t||void 0===t?void 0:t.comment,user:null===t||void 0===t?void 0:t.user,created_at:t.created_at}),X(t)}),[e.vistoria]);var $=function(){var t=Object(c.a)(r.a.mark((function t(n){return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.userRolePermission){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,Object(N.b)({property_inspection_id:Z.property_inspection_id,property_inspection_item_id:Z.id,comment:H,submitted_at:y()().toDate(),location:{latitude:"25.1061751",longitude:"-50.172959"}}).catch((function(e){})).then((function(e){(null===Z||void 0===Z?void 0:Z.comments).unshift({comment:H,user:V,created_at:y()().toDate()})})).finally((function(){J("")}));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),W=function(){var e=Object(c.a)(r.a.mark((function e(t){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(N.b)({property_inspection_id:Z.property_inspection_id,property_inspection_item_id:Z.id,comment:"file",submitted_at:y()().toDate(),location:{latitude:"25.1061751",longitude:"-50.172959"}}).catch((function(e){})).then(function(){var e=Object(c.a)(r.a.mark((function e(n){var i;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i=new FormData).append("media",t.target.files[0]),e.next=4,Object(N.a)(n.data.data.id,i).catch((function(e){})).then((function(e){var t=C({},Z);n.data.data.medias=e.data.data.medias,t.comments||(t.comments=[]),t.comments.unshift(n.data.data),X(t)}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ee=function(e){var t=e.onClick,n=Object(a.a)(e,["onClick"]),o=(n.onMove,n.carouselState);o.currentSlide,o.deviceType;return Object(i.jsx)("button",{style:{position:"absolute",right:"calc(4% + 1px)"},className:"react-multiple-carousel__arrow",onClick:function(){return t()},children:Object(i.jsx)(v.a,{style:{color:" #87A1B8"},icon:j.i})})},te=function(e){var t=e.onClick,n=Object(a.a)(e,["onClick"]),o=(n.onMove,n.carouselState);o.currentSlide,o.deviceType;return Object(i.jsx)("button",{style:{position:"absolute",left:"calc(4% + 1px)"},className:"react-multiple-carousel__arrow",onClick:function(){return t()},children:Object(i.jsx)(v.a,{style:{color:" #87A1B8"},icon:j.g})})},ne=e.userRolePermission&&y()().isSameOrBefore(y()(e.end_date).add(3,"hours"))&&y()().isSameOrAfter(y()(e.end_date).subtract(30,"days").add(3,"hours")),ie=function(e){var t,n,a,o,l,r,c,s,d,u,m=e.comentario,b=e.index,p=!1;return e.notFirst&&0==b&&(p=!0),p?null:Object(i.jsxs)("div",{className:h.a.comentario,children:[null!==m&&void 0!==m&&null!==(t=m.user)&&void 0!==t&&null!==(n=t.profile_image)&&void 0!==n&&null!==(a=n.large)&&void 0!==a&&a.url?Object(i.jsx)("div",{className:h.a.image,style:{backgroundImage:"url(".concat(null===m||void 0===m||null===(o=m.user)||void 0===o||null===(l=o.profile_image)||void 0===l||null===(r=l.large)||void 0===r?void 0:r.url)}}):Object(i.jsx)("div",{className:h.a.noPhotoContainerP,children:Object(i.jsx)(v.a,{className:"iconP",icon:j.Le})}),Object(i.jsxs)("div",{className:h.a.comentarioLetter,children:[Object(i.jsxs)("div",{className:"d-flex align-items-center",children:[Object(i.jsx)("p",{children:null===m||void 0===m||null===(c=m.user)||void 0===c?void 0:c.name}),Object(i.jsx)("small",{children:y()(m.created_at).format("DD/MM/YYYY [\xe0s] HH:mm")}
1)]}),(null===m||void 0===m||null===(s=m.medias)||void 0===s?void 0:s.length)>0?Object(i.jsx)("div",{style:{backgroundImage:"url(".concat(null===m||void 0===m||null===(d=m.medias)||void 0===d||null===(u=d[0])||void 0===u?void 0:u.Location)},className:h.a.mediaComentario}):Object(i.jsx)("p",{className:h.a.textLetter,children:m.comment})]})]},b)};return Object(i.jsxs)("div",{className:h.a.card,style:{cursor:"auto"},children:[Object(i.jsxs)("div",{className:h.a.detailsUpper,children:[Object(i.jsxs)("div",{className:h.a.detailsUpperInfo,children:[null!==Z&&void 0!==Z&&null!==(t=Z.user)&&void 0!==t&&null!==(n=t.profile_image)&&void 0!==n&&null!==(o=n.large)&&void 0!==o&&o.url?Object(i.jsx)("div",{className:h.a.image,style:{backgroundImage:"url(".concat(null===Z||void 0===Z||null===(l=Z.user)||void 0===l||null===(b=l.profile_image)||void 0===b||null===(O=b.large)||void 0===O?void 0:O.url)}}):Object(i.jsx)("div",{className:h.a.noPhotoContainer,children:Object(i.jsx)(v.a,{className:"iconP",icon:j.Le})}),Object(i.jsxs)("div",{className:h.a.detailsUpperText,children:[Object(i.jsx)("p",{children:null===Z||void 0===Z?void 0:Z.name}),Object(i.jsx)(w.R,{fontSize:k.h.regularMicro,color:k.e.cinza700,children:"".concat(null!==(f=null===Z||void 0===Z?void 0:Z.room)&&void 0!==f?f:"N\xe3o definido"," ").concat(y()(null===Z||void 0===Z?void 0:Z.submitted_at).format("DD/MM/YYYY [\xe0s] HH:mm"))})]})]}),Object(i.jsx)("button",{type:"button",className:h.a.editButton,onClick:function(){var t=e.contractId,n=e.propertyInspObj;try{window.sessionStorage.setItem("propertyInspectionEditItem",JSON.stringify({item:Z,propertyInspectionId:null===Z||void 0===Z?void 0:Z.property_inspection_id}))}catch(a){}var i={itemId:Z.id,contractId:t};"ENTRY"===(null===n||void 0===n?void 0:n.type)?F.push({pathname:"/contrato/painel/vistoria-entrada/".concat(null===n||void 0===n?void 0:n.id,"/new"),query:i}):F.push({pathname:"/contrato/painel/vistoria-saida/".concat(null===n||void 0===n?void 0:n.id,"/new"),query:i})},disabled:!ne,"aria-label":"Editar item da vistoria",children:Object(i.jsxs)(i.Fragment,{children:[Object(i.jsx)(v.a,{icon:j.Jd}),"Editar item"]})})]}),Object(i.jsxs)("div",{style:{height:280,position:"relative",border:"1px solid #BED0E0"},children:[(null===Z||void 0===Z||null===(g=Z.medias)||void 0===g?void 0:g.length)>1?Object(i.jsx)(p.a,{className:h.a.carouselContainer,responsive:{superLargeDesktop:{breakpoint:{max:4e3,min:3e3},items:1},desktop:{breakpoint:{max:3e3,min:1024},items:1},tablet:{breakpoint:{max:1024,min:464},items:1},mobile:{breakpoint:{max:464,min:0},items:1}},infinite:!0,customRightArrow:Object(i.jsx)(ee,{}),customLeftArrow:Object(i.jsx)(te,{}),swipeable:!0,draggable:!0,keyBoardControl:!0,showDots:!0,dotListClass:"".concat(h.a.dots," dotsCustom"),children:null===Z||void 0===Z||null===(S=Z.medias)||void 0===S?void 0:S.map((function(e,t){var n;return null!==e&&void 0!==e&&null!==(n=e.Location)&&void 0!==n&&n.includes("mp4")?Object(i.jsxs)("video",{width:"auto",height:"auto",controls:!0,children:[Object(i.jsx)("source",{src:null===e||void 0===e?void 0:e.Location,type:"video/mp4"}),"Your browser does not support the video tag."]}):Object(i.jsx)("div",{className:"".concat(h.a.containerImage),style:{borderRadius:0,backgroundImage:"url(".concat(null!==e&&void 0!==e&&e.Location?null===e||void 0===e?void 0:e.Location:"/images/no-image-announcement.jpg",")")}},t)}))}):null!==Z&&void 0!==Z&&null!==(I=Z.medias[0])&&void 0!==I&&null!==(P=I.Location)&&void 0!==P&&P.includes("mp4")?Object(i.jsx)("div",{className:h.a.carouselContainer,children:Object(i.jsxs)("video",{width:"auto",height:"auto",controls:!0,children:[Object(i.jsx)("source",{src:null===Z||void 0===Z||null===(D=Z.medias[0])||void 0===D?void 0:D.Location,type:"video/mp4"}),"Your browser does not support the video tag."]})}):Object(i.jsx)("div",{className:"".concat(h.a.containerImage),style:{borderRadius:0,backgroundImage:"url(".concat(null!==Z&&void 0!==Z&&null!==(Y=Z.medias[0])&&void 0!==Y&&Y.Location?null===Z||void 0===Z||null===(q=Z.medias[0])||void 0===q?void 0:q.Location:"/images/no-image-announcement.jpg",")")}}),Object(i.jsx)("div",{className:"needRepair"==(null===Z||void 0===Z?void 0:Z.state)?h.a.needRepairText:h.a.allFineText,children:"needRepair"==(null===Z||void 0===Z?void 0:Z.state)?"Precisa de reforma":"Bom estado"})]}),Object(i.jsxs)("div",{className:h.a.details,style:!K&&(null===Z||void 0===Z||null===(E=Z.comments)||void 0===E?void 0:E.length)>1?{padding:8,borderBottom:"none",borderRadius:0}:{padding:8},children:[y()().isAfter(y()(e.end_date))?null:Object(i.jsxs)("form",{className:x.a.chatInput,style:H?{padding:"0 13px 0 0"}:{},onSubmit:function(e){e.preventDefault(),$(e)},children:[!H&&Object(i.jsxs)("div",{className:x.a.iconP,style:{cursor:"pointer"},onClick:function(){return A.current.click()},children:[Object(i.jsx)("input",{ref:A,type:"file",hidden:!0,accept:["image/*","video/*","audio/*","application/*","text/*"],disabled:!e.userRolePermission,onChange:function(e){W(e)}}),Object(i.jsx)(v.a,{color:"#A0B5C7",size:18,icon:j.sc}
1)]}),Object(i.jsx)(d.f,{className:x.a.chatInput,placeholder:"".concat(e.userRolePermission?"Comentar...":"Sem permiss\xe3o para participar da conversa..."),value:H,onChange:function(e){var t=e.target;return J(t.value)},disabled:!e.userRolePermission,style:{backgroundColor:"".concat(e.userRolePermission?"":"#F4F9FF")}}),Object(i.jsx)(v.a,{className:H?x.a.footerIconHasMessage:x.a.footerIcons,icon:u.sb,onClick:function(e){return $(e)}})]}),(null===Z||void 0===Z||null===(T=Z.comments)||void 0===T?void 0:T.length)>0?Object(i.jsxs)("div",{className:h.a.boxComentarios,children:[Object(i.jsxs)("p",{children:[null===Z||void 0===Z||null===(M=Z.comments)||void 0===M?void 0:M.length," Coment\xe1rio",(null===Z||void 0===Z||null===(R=Z.comments)||void 0===R?void 0:R.length)>1?"s":"",":"]}),null!==Z&&void 0!==Z&&Z.comments[0]?Object(i.jsx)(ie,{comentario:null===Z||void 0===Z?void 0:Z.comments[0],index:0}):null,K&&(null===Z||void 0===Z||null===(B=Z.comments)||void 0===B?void 0:B.map((function(e,t){return Object(i.jsx)(ie,{comentario:e,index:t,notFirst:!0})})))]}):null]}),(null===Z||void 0===Z||null===(L=Z.comments)||void 0===L?void 0:L.length)>1&&!K?Object(i.jsx)("div",{onClick:function(){return G(!0)},className:h.a.showMoreComments,children:"Ver todos os coment\xe1rios"}):null]})}},VD5V:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return q}));var i=n("nKUr"),a=n("vJKn"),o=n.n(a),l=n("rg98"),r=n("q1tI"),c=n("wd/R"),s=n.n(c),d=n("g4pe"),u=n.n(d),v=n("/MKj"),j=n("s/Ur"),m=n("ZHqB"),b=n("CmbD"),p=n("0ISm"),O=n("IP2g"),h=n("tTGf"),f=n("bVMp"),x=n("20a2"),g=n.n(x),y=n("b2yJ"),N=n("lqRf"),_=n("UF2t"),w=n("DZHF"),k=n("6xyR"),S=n("+TwM"),C=n.n(S),I=n("BEdn"),P=n.n(I),D=n("hw50"),Y=n("OKMn");function q(){var e,t,n,a,c,d,x,S,I,q,E,T,M,R,B=Object(j.useMediaQuery)({query:"(max-width: 641px)"}),L=Object(v.d)((function(e){return e.user})).user,A=Object(r.useState)(!1),V=A[0],F=(A[1],Object(r.useState)(!1)),U=F[0],H=F[1],J=Object(r.useState)(!1),z=J[0],K=J[1],G=Object(r.useState)({}),Q=G[0],Z=G[1],X=Object(r.useState)(null),$=X[0],W=X[1],ee=Object(r.useState)([]),te=ee[0],ne=ee[1],ie=Object(r.useState)(!1),ae=ie[0],oe=ie[1],le=Object(r.useState)(null),re=le[0],ce=le[1],se=Object(r.useState)([]),de=se[0],ue=se[1],ve=Object(r.useState)(),je=ve[0],me=ve[1],be=Object(r.useState)(1),pe=be[0],Oe=be[1],he=Object(r.useState)(0),fe=he[0],xe=he[1],ge=Object(r.useState)(0),ye=ge[0],Ne=ge[1],_e=Object(r.useState)([]),we=_e[0],ke=_e[1],Se=Object(r.useState)(!1),Ce=Se[0],Ie=Se[1],Pe=Object(r.useState)(!1),De=Pe[0],Ye=Pe[1];Object(r.useEffect)((function(){var e,t,n,i;(s.a.locale("pt-br"),H(!0),L)?(qe(),Object(y.i)(null===g.a||void 0===g.a||null===(e=g.a.query)||void 0===e?void 0:e.vistoria).then((function(e){var t,n,i,a,o;"ENTRY"!==(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.type)?g.a.push("/contrato/painel/vistoria-saida/".concat(null===g.a||void 0===g.a||null===(n=g.a.query)||void 0===n?void 0:n.vistoria,"?contractId=").concat(null===g.a||void 0===g.a||null===(i=g.a.query)||void 0===i?void 0:i.id)):g.a.push("/contrato/painel/vistoria-entrada/".concat(null===g.a||void 0===g.a||null===(a=g.a.query)||void 0===a?void 0:a.vistoria,"?contractId=").concat(null===g.a||void 0===g.a||null===(o=g.a.query)||void 0===o?void 0:o.id))})).catch((function(e){})),Object(y.f)(null===g.a||void 0===g.a||null===(t=g.a.query)||void 0===t?void 0:t.vistoria,1,!0).then((function(e){var t,n;null!==e&&void 0!==e&&null!==(t=e.data)&&void 0!==t&&null!==(n=t.data)&&void 0!==n&&n.length&&oe(!0)})).catch((function(e){})),Object(y.g)(null===g.a||void 0===g.a||null===(n=g.a.query)||void 0===n?void 0:n.vistoria).then((function(e){var t=e.data;ue(t)})).catch((function(){})),Object(y.f)(null===g.a||void 0===g.a||null===(i=g.a.query)||void 0===i?void 0:i.vistoria,pe,!1).then((function(e){var t,n,i,a,o=null!==(t=null===e||void 0===e||null===(n=e.data)||void 0===n?void 0:n.data)&&void 0!==t?t:[];Ne(o.length),xe(null!==(i=null===e||void 0===e||null===(a=e.data)||void 0===a?void 0:a.total)&&void 0!==i?i:0),ne(Object(D.Gb)({},o))})).catch((function(e){})).finally((function(){H(!1)})),Ee()):window.location.assign("https://mellro.com/imovel/buscar?login=true")}),[null===g.a||void 0===g.a||null===(e=g.a.query)||void 0===e?void 0:e.id]);var qe=function(){var e=Object(l.a)(o.a.mark((function e(){var t;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(p.f)(null===g.a||void 0===g.a||null===(t=g.a.query)||void 0===t?void 0:t.id).then(function(){var e=Object(l.a)(o.a.mark((function e(t){var n,i,a,l,r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Z(t.data.data),l=(null===(n=t.data.data)||void 0===n||null===(i=n.user)||void 0===i?void 0:i.id)==(null===L||void 0===L?void 0:L.id),r={property_announcement_id:null===g.a||void 0===g.a||null===(a=g.a.query)||void 0===a?void 0:a.id,$limit:300},l?r.landlord_id=L.id:r.user_id=L.id;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ee=function(){var e=Object(l.a)(o.a.mark((function e(){var t,n;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===g.a||void 0===g.a||null===(t=g.a.query)||void 0===t||!t.contractId){e.next=5;break}return e.next=3,Object(N.o)({contract_id:null===g.a||void 0===g.a||null===(n=g.a.query)||void 0===n?void 0:n.contractId}).catch((function(e){})).then(function(){var e=Object(l.a)(o.a.mark((function e(t){var n,i,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:200===(null===t||void 0===t?void 0:t.status)&&(ke(null===t||void 0===t||null===(n=t.data)||void 0===n?void 0:n.data),i=t.data.data.find((function(e){return e.user_id===L.id})),(a=t.data.data.find((function(e){return"admin"===e.user_type})))&&"admin"===i.user_type?me(!0):a||"landlord"!==i.user_type?"tenant"===i.user_type?me(!0):me(!1):me(!0));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 3:e.next=6;break;case 5:me(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Te=function(){var e=Object(l.a)(o.a.mark((function e(){var t;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:K(!0),Object(y.f)(null===g.a||void 0===g.a||null===(t=g.a.query)||void 0===t?void 0:t.vistoria,pe+1,!1).then((function(e){var t,n,i,a,o=null!==(t=null===e||void 0===e||null===(n=e.data)||void 0===n?void 0:n.data)&&void 0!==t?t:[],l=null!==(i=null===e||void 0===e||null===(a=e.data)||void 0===a?void 0:a.total)&&void 0!==i?i:fe;Oe(pe+1),xe(l),Ne(o.length?ye+o.length:l),ne((function(e){return Object(D.Gb)(e,o)}))})).catch((function(e){})).finally((function(){K(!1)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Me=function(){var e=Object(l.a)(o.a.mark((function e(t){var n;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Ye(!0),e.prev=1,e.next=4,Object(y.e)(t);case 4:n=e.sent,window.open(n,"_blank"),Ye(!1),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(1),console.error("Erro ao abrir o arquivo:",e.t0);case 12:case"end":return e.stop()}}),e,null,[[1,9]])})));return function(t){return e.apply(this,arguments)}}(),Re=Object(D.Zb)(de,te);return Object(i.jsxs)("div",{children:[Object(i.jsx)(u.a,{children:Object(i.jsx)("title",{children:"Mellro - Vistoria"})}),Object(i.jsx)(Y.C,{onClickBackButton:function(){return g.a.back()}}),Object(i.jsx)("div",{style:{paddingTop:"80px",marginBottom:"64px"},className:"container",children:Object(i.jsx)(f.a,{pagina:"vistoria",announcement:Q,user:L,billing:!1,lembreteTextArray:["Itens da vistoria","Se um dos itens do apartamento n\xe3o for adicionado na vistoria, ser\xe1 considerado que est\xe1 em bom estado."],contractId:null===g.a||void 0===g.a||null===(t=g.a.query)||void 0===t?void 0:t.contractId,faqMe
1ssage:!0,onLoadContrato:W,children:Object(i.jsx)("div",{className:C.a.container,children:L?Object(i.jsx)(b.a,{loading:U,children:Object(i.jsxs)(i.Fragment,{children:[B?Object(i.jsxs)("div",{style:s()().isAfter(s()(V.end_date))?{marginBottom:"16px"}:null,children:[Object(i.jsxs)("div",{className:C.a.containerHeader,style:{marginTop:36},children:[Object(i.jsx)(O.a,{className:"iconM",icon:h.gb,style:{marginRight:16}}),Object(i.jsxs)("h1",{children:["Vistoria de ","ENTRY"==(null===V||void 0===V?void 0:V.type)?null!==$&&void 0!==$&&null!==(I=$.details)&&void 0!==I&&null!==(q=I.portability)&&void 0!==q&&q.additive?"constata\xe7\xe3o":"entrada":"sa\xedda"]})]}),Object(i.jsxs)("div",{className:C.a.breadcrumb,children:[Object(i.jsx)("p",{onClick:function(){var e;return g.a.push("/contrato/painel/".concat(null===g.a||void 0===g.a||null===(e=g.a.query)||void 0===e?void 0:e.contractId))},children:"Vistoria"}),Object(i.jsx)(O.a,{icon:h.i}),Object(i.jsx)("p",{children:"ENTRY"==(null===V||void 0===V?void 0:V.type)?null!==$&&void 0!==$&&null!==(E=$.details)&&void 0!==E&&null!==(T=E.portability)&&void 0!==T&&T.additive?"Constata\xe7\xe3o":"Entrada":"Sa\xedda"})]}),Object(i.jsxs)("div",{className:C.a.vistoriaHeaderBox,children:[Object(i.jsx)("p",{className:P.a.title,children:"Prazo da vistoria"}),Object(i.jsx)("p",{className:P.a.subtitle,children:s()().isAfter(s()(V.end_date))?"Vistoria de ".concat("ENTRY"==(null===V||void 0===V?void 0:V.type)?null!==$&&void 0!==$&&null!==(M=$.details)&&void 0!==M&&null!==(R=M.portability)&&void 0!==R&&R.additive?"constata\xe7\xe3o":"entrada":"sa\xedda"," encerrada no dia ").concat(s()(V.end_date).format("DD/MM/YYYY"),". N\xe3o pode mais ser editada."):Object(i.jsxs)(i.Fragment,{children:["Edite a vistoria at\xe9 o \xfaltimo minuto do dia ",Object(i.jsx)("span",{style:{color:"#FE6A6A"},children:s()(V.end_date).format("DD/MM/YYYY")})]})}),Object(i.jsx)("p",{className:P.a.bigSubtitle,children:"Segundo a cl\xe1usula 6.2.1, ap\xf3s o termino do prazo da vistoria, ambas as partes concordam com o estado do im\xf3vel."}),Object(i.jsx)("p",{className:C.a.seeMoreOrLess,onClick:function(){return Ie(!Ce)},children:Ce?"Ver menos -":"Ver mais +"})]}),Ce?Object(i.jsx)("div",{className:P.a.usersBox,children:Object(i.jsx)("div",{className:P.a.wrapperUsers,children:null===we||void 0===we?void 0:we.map((function(e){var t,n,a,o,l,r,c,s,d,u,v,j,m,b,p,f,x;return Object(i.jsxs)("div",{className:P.a.labelUser,children:[Object(i.jsx)("div",{className:P.a.picturePerson,children:null!==e&&void 0!==e&&null!==(t=e.user)&&void 0!==t&&null!==(n=t.profile_image)&&void 0!==n&&null!==(a=n.small)&&void 0!==a&&a.url?Object(i.jsx)("div",{className:P.a.picturePerson,style:{backgroundImage:"url(".concat(null===e||void 0===e||null===(o=e.user)||void 0===o||null===(l=o.profile_image)||void 0===l||null===(r=l.small)||void 0===r?void 0:r.url,")")}}):Object(i.jsx)("div",{className:"".concat(P.a.containerIconUser," ").concat(P.a.containerUserLogged),children:Object(i.jsx)(O.a,{className:"default-icon",icon:h.Le})})}),Object(i.jsxs)("div",{className:P.a.detailsPerson,children:[Object(i.jsxs)("p",{className:P.a.namePerson,children:[Object(i.jsx)("span",{children:null===e||void 0===e||null===(c=e.user)||void 0===c?void 0:c.name.split(" ")[0]})," ",Object(D.J)((null===e||void 0===e||null===(s=e.user)||void 0===s?void 0:s.cpf)||(null===e||void 0===e||null===(d=e.user)||void 0===d?void 0:d.cnpj))]}),Object(i.jsxs)("p",{className:P.a.isSignedByPerson,children:[Object(i.jsx)(O.a,{className:"default-icon",style:{color:" #87A1B8"},icon:h.gb}),Object(i.jsx)("span",{style:{color:" #87A1B8",marginLeft:"10px"},children:"ENTRY"==(null===V||void 0===V?void 0:V.type)?null!==e&&void 0!==e&&null!==(u=e.inspection_infos)&&void 0!==u&&null!==(v=u.entry)&&void 0!==v&&v.last_view?null===e||void 0===e||null===(j=e.inspection_infos)||void 0===j||null===(m=j.entry)||void 0===m?void 0:m.last_view:"Sem registro":null!==e&&void 0!==e&&null!==(b=e.inspection_infos)&&void 0!==b&&null!==(p=b.exit)&&void 0!==p&&p.last_view?null===e||void 0===e||null===(f=e.inspection_infos)||void 0===f||null===(x=f.exit)||void 0===x?void 0:x.last_view:"Sem registro"})]})]})]})}))})}
1):null,s()().startOf("D").isAfter(s()(V.end_date))?Object(i.jsx)("button",{style:{marginTop:"32px",marginBottom:"32px"},disabled:De,onClick:function(){return Me(V.id)},className:"btn ".concat(P.a.buttonDownloadVistoria),children:Object(i.jsxs)(i.Fragment,{children:["Download da vistoria",Object(i.jsx)(O.a,{icon:h.f})]})}):null,Object(i.jsxs)("div",{className:P.a.warningAlert,style:{flexDirection:"column",marginTop:16},children:[Object(i.jsx)("h6",{children:"Itens da vistoria"}),Object(i.jsx)("p",{children:"Se um dos itens do apartamento n\xe3o for adicionado na vistoria, ser\xe1 considerado que est\xe1 em bom estado."}),Object(i.jsxs)("p",{style:{marginTop:16},children:["Para qualquer d\xfavida, acesse ",Object(i.jsx)("b",{onClick:function(){return window.open("https://mellro.com/ajuda")},children:"nosso FAQ."})]})]})]}):Object(i.jsxs)("div",{style:s()().isAfter(s()(V.end_date))?{marginBottom:"16px"}:null,children:[Object(i.jsxs)("div",{className:C.a.containerHeader,style:{marginTop:42},children:[Object(i.jsx)(O.a,{className:"iconM",icon:h.gb,style:{marginRight:16}}),Object(i.jsxs)("h1",{children:["Vistoria de ","ENTRY"==(null===V||void 0===V?void 0:V.type)?null!==$&&void 0!==$&&null!==(n=$.details)&&void 0!==n&&null!==(a=n.portability)&&void 0!==a&&a.additive?"constata\xe7\xe3o":"entrada":"sa\xedda"]})]}),Object(i.jsxs)("div",{className:C.a.breadcrumb,children:[Object(i.jsx)("p",{onClick:function(){var e;return g.a.push("/contrato/painel/".concat(null===g.a||void 0===g.a||null===(e=g.a.query)||void 0===e?void 0:e.contractId))},children:"Vistoria"}),Object(i.jsx)(O.a,{icon:h.i}),Object(i.jsx)("p",{children:"ENTRY"==(null===V||void 0===V?void 0:V.type)?null!==$&&void 0!==$&&null!==(c=$.details)&&void 0!==c&&null!==(d=c.portability)&&void 0!==d&&d.additive?"Constata\xe7\xe3o":"Entrada":"Sa\xedda"})]}),Object(i.jsxs)("div",{className:C.a.vistoriaHeaderBox,children:[Object(i.jsx)("p",{className:P.a.title,children:"Prazo da vistoria"}),Object(i.jsx)("p",{className:P.a.subtitle,children:s()().isAfter(s()(V.end_date))?"Vistoria de ".concat("ENTRY"==(null===V||void 0===V?void 0:V.type)?null!==$&&void 0!==$&&null!==(x=$.details)&&void 0!==x&&null!==(S=x.portability)&&void 0!==S&&S.additive?"constata\xe7\xe3o":"entrada":"sa\xedda"," encerrada no dia ").concat(s()(V.end_date).format("DD/MM/YYYY"),". N\xe3o pode mais ser editada."):Object(i.jsxs)(i.Fragment,{children:["Edite a vistoria at\xe9 o \xfaltimo minuto do dia ",Object(i.jsx)("span",{style:{color:"#FE6A6A"},children:s()(V.end_date).format("DD/MM/YYYY")})]})}),Object(i.jsx)("p",{className:P.a.bigSubtitle,children:"Segundo a cl\xe1usula 6.2.1, ap\xf3s o termino do prazo da vistoria, ambas as partes concordam com o estado do im\xf3vel."}),Object(i.jsx)("p",{className:C.a.seeMoreOrLess,onClick:function(){return Ie(!Ce)},children:Ce?"Ver menos -":"Ver mais +"})]}),Ce?Object(i.jsx)("div",{className:P.a.usersBox,children:Object(i.jsx)("div",{className:P.a.wrapperUsers,children:null===we||void 0===we?void 0:we.map((function(e){var t,n,a,o,l,r,c,s,d,u,v,j,m,b,p,f,x;return Object(i.jsxs)("div",{className:P.a.labelUser,children:[Object(i.jsx)("div",{className:P.a.picturePerson,children:null!==e&&void 0!==e&&null!==(t=e.user)&&void 0!==t&&null!==(n=t.profile_image)&&void 0!==n&&null!==(a=n.small)&&void 0!==a&&a.url?Object(i.jsx)("div",{className:P.a.picturePerson,style:{backgroundImage:"url(".concat(null===e||void 0===e||null===(o=e.user)||void 0===o||null===(l=o.profile_image)||void 0===l||null===(r=l.small)||void 0===r?void 0:r.url,")")}}):Object(i.jsx)("div",{className:"".concat(P.a.containerIconUser," ").concat(P.a.containerUserLogged),children:Object(i.jsx)(O.a,{className:"default-icon",icon:h.Le})})}),Object(i.jsxs)("div",{className:P.a.detailsPerson,children:[Object(i.jsxs)("p",{className:P.a.namePerson,children:[Object(i.jsx)("span",{children:null===e||void 0===e||null===(c=e.user)||void 0===c?void 0:c.name.split(" ")[0]})," ",Object(D.J)((null===e||void 0===e||null===(s=e.user)||void 0===s?void 0:s.cpf)||(null===e||void 0===e||null===(d=e.user)||void 0===d?void 0:d.cnpj))]}),Object(i.jsxs)("p",{className:P.a.isSignedByPerson,children:[Object(i.jsx)(O.a,{className:"default-icon",style:{color:" #87A1B8"},icon:h.gb}),Object(i.jsx)("span",{style:{color:" #87A1B8",marginLeft:"10px"},children:"ENTRY"==(null===V||void 0===V?void 0:V.type)?null!==e&&void 0!==e&&null!==(u=e.inspection_infos)&&void 0!==u&&null!==(v=u.entry)&&void 0!==v&&v.last_view?null===e||void 0===e||null===(j=e.inspection_infos)||void 0===j||null===(m=j.entry)||void 0===m?void 0:m.last_view:"Sem registro":null!==e&&void 0!==e&&null!==(b=e.inspection_infos)&&void 0!==b&&null!==(p=b.exit)&&void 0!==p&&p.last_view?null===e||void 0===e||null===(f=e.inspection_infos)||void 0===f||null===(x=f.exit)||void 0===x?void 0:x.last_view:"Sem registro"})]})]})]})}))})}
1):null,s()().startOf("D").isAfter(s()(V.end_date))?Object(i.jsx)("button",{style:{marginTop:"32px",marginBottom:"32px"},disabled:De,onClick:function(){return Me(V.id)},className:"btn ".concat(P.a.buttonDownloadVistoria),children:Object(i.jsxs)(i.Fragment,{children:["Download da vistoria",Object(i.jsx)(O.a,{icon:h.f})]})}):null]}),je&&s()().isSameOrBefore(s()(V.end_date).add(3,"hours"))&&s()().isSameOrAfter(s()(V.end_date).subtract(30,"days").add(3,"hours"))?Object(i.jsxs)("button",{style:B?{width:"100%",marginTop:"32px"}:{marginTop:"32px"},onClick:function(){var e,t;return g.a.push("/perfil/gerenciamento/vistoria/".concat(null===Q||void 0===Q?void 0:Q.id,"/").concat(null===g.a||void 0===g.a||null===(e=g.a.query)||void 0===e?void 0:e.vistoria,"/new?contractId=").concat(null===g.a||void 0===g.a||null===(t=g.a.query)||void 0===t?void 0:t.contractId))},className:"btn ".concat(P.a.buttonPrimary),children:[Object(i.jsx)(O.a,{icon:h.Y}),"Cadastrar itens"]}):null,ae&&Object(i.jsxs)("div",{className:P.a.warningAlert,children:[Object(i.jsx)("div",{children:Object(i.jsx)(O.a,{icon:h.Je})}),Object(i.jsxs)("p",{children:["Existem itens pendentes aguardando edi\xe7\xe3o. ",Object(i.jsx)("b",{onClick:function(){var e,t;return g.a.push("/perfil/gerenciamento/vistoria/".concat(null===Q||void 0===Q?void 0:Q.id,"/").concat(null===g.a||void 0===g.a||null===(e=g.a.query)||void 0===e?void 0:e.vistoria,"/new?contractId=").concat(null===g.a||void 0===g.a||null===(t=g.a.query)||void 0===t?void 0:t.contractId))},children:"Clique aqui"})," para visualizar."]})]}),Object(i.jsx)(w.a,{children:Object(i.jsx)(k.a,{className:C.a.accordionCard,children:Re.map((function(e,t){var n,a,o;return(null===(n=te[e])||void 0===n?void 0:n.length)>0?Object(i.jsxs)(i.Fragment,{children:[Object(i.jsx)(k.a.Header,{onClick:function(){return ce(re==t.toString()?null:t.toString())},className:C.a.cardHeader,children:Object(i.jsxs)("div",{className:C.a.cardTitle,children:[Object(i.jsxs)("div",{children:[e,Object(i.jsxs)("small",{children:[null===(a=te[e])||void 0===a?void 0:a.length," itens"]})]}),Object(i.jsx)("div",{className:C.a.containerIconCardHeader,children:Object(i.jsx)(O.a,{className:"iconM",icon:re==t.toString()?h.kb:h.hb})})]})}),re==t.toString()?Object(i.jsx)("div",{className:C.a.containerCards,style:{paddingTop:16},children:null===(o=te[e])||void 0===o?void 0:o.map((function(e,t){return Object(i.jsx)(_.a,{vistoria:e,end_date:V.end_date,userRolePermission:je},t)}))}):null]}):null}))})}),ye<fe?Object(i.jsx)("div",{className:C.a.loadMoreContainer,disabled:z,onClick:Te,children:z?Object(i.jsx)("i",{className:"fas fa-spinner fa-spin"}):"Carregar mais"}):null]})}):Object(i.jsx)("div",{className:C.a.containerNoUser,children:Object(i.jsx)("h1",{className:C.a.titleNoUser,children:"Voc\xea precisa fazer login para visualizar as vistorias desse contrato."})})})})}),B?null:Object(i.jsx)(m.default,{})]})}}},[["LQvc",0,1,5,7,6,12,16,13,17,21,2,3,4,8,9,10,11,14,15,24,25,30,35,36,40]]]);
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.