PageSourceSearch

https://www.companyhero.com/_next/static/chunks/pages/admin/company/[slug]-30d10c6b7ea942f4.js

js companyhero.com collected 2026-10-01 10:39:11 UTC 79,098 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[60821,26131,61697],{73860:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/company/[slug]",function(){return a(75169)}])},33520:function(e,t,a){"use strict";var n=a(85893),s=a(67294),r=a(56590),i=a(55673),l=a(5789),o=a(53740),c=a(59361),d=a(67814);let{format:u}=a(29111),{Title:m,Text:x}=o.default;t.Z=(0,s.memo)(e=>{let{data:t,rows:a=[],icon:s=null,size:o="small",title:f=""}=e;if(!t)return!1;let p=f,TagsRoles=e=>{let t=[...new Set(e)];return t.map(e=>(0,n.jsx)(c.default,{color:"blue",children:e},"tag_".concat(e)))},LinkValue=e=>(0,n.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:e});p&&(p=(0,n.jsxs)(m,{level:5,children:[s&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.FontAwesomeIcon,{icon:s}),"\xa0\xa0"]}),f]}));let TagComponent=e=>{let{data:t,item:a}=e;return(0,n.jsx)(n.Fragment,{children:t[a.key].length<=1?(0,n.jsx)(c.default,{color:"blue",children:t[a.key]},"tag_".concat(t[a.key])):(0,n.jsx)(n.Fragment,{children:t[a.key].filter(e=>!!e).map(e=>(0,n.jsx)(c.default,{color:"blue",style:{whiteSpace:"normal"},children:e},"tag_".concat(e)))})})};return(0,n.jsx)(r.default,{header:p||!1,itemLayout:"horizontal",style:{marginBottom:"10%",fontSize:"small"===o?"14px":"16px"},dataSource:a,renderItem:e=>(0,n.jsx)(r.default.Item,{children:(0,n.jsxs)(i.default,{type:"flex",justify:"space-between",style:{width:"100%"},children:[(0,n.jsx)(l.default,{span:11,children:(0,n.jsx)(x,{style:{whiteSpace:"normal"},children:(0,n.jsx)("strong",{children:null==e?void 0:e.label})})}),(0,n.jsxs)(l.default,{span:13,children:["tag"===e.type&&(0,n.jsx)(TagComponent,{data:t,item:e}),"tag"!==e.type&&(0,n.jsx)(x,{style:{whiteSpace:"normal"},children:function(e){try{let a=null==e?void 0:e.type,n=null==e?void 0:e.key,s="";switch(a){case"string":default:s=t[n];break;case"datetime":s=function(e){let t=new Date(e);return u(t,"dd/MM/yyyy '\xe0s' HH:mm")}(t[n]);break;case"boolean":s=!0===t[n]?"Verdadeiro":"Falso";break;case"array":s=TagsRoles(t[n]);break;case"link":s=LinkValue(t[n])}return s}catch(e){}}(e)||"-"})]})]})})})})},41927:function(e,t,a){"use strict";var n=a(85893),s=a(67294),r=a(56590),i=a(55673),l=a(5789),o=a(59361),c=a(53740),d=a(7136),u=a(85518),m=a(27484),x=a.n(m);let{Text:f}=c.default;t.Z=(0,s.memo)(e=>{if(!e.company)return!1;let{company:t}=e,{credits_and_points:{credits:a,points:s}}=t,c={green:"#87d068",gray:"#bcbcbc",yellow:"#faad14",red:"#ef233c"},m=1===t.authorize_scanning?"Aceito":0===t.authorize_scanning?"Rejeitado":"Sem resposta",p=[{title:"Situa\xe7\xe3o Financeira",value:(0,n.jsx)(o.default,{color:"ativo"===t.financial_situation?c.green:"inadimplente"===t.financial_situation?c.yellow:"cancelado"===t.financial_situation?c.red:c.gray,className:"big capitalize",children:t.financial_situation}),description:(0,n.jsxs)(f,{type:"secondary",children:["Atualiza\xe7\xe3o:"," ",x()(t.financial_situation_last_update).locale("pt-br").format("MMMM D, YYYY")]})},{title:"Escaneamento",value:(0,n.jsx)(o.default,{color:"Aceito"===m?c.green:"Rejeitado"===m?c.red:c.gray,className:"big capitalize",children:m}),description:(0,n.jsxs)(f,{type:"secondary",children:["Atualiza\xe7\xe3o:"," ",x()(t.updated_at).locale("pt-br").format("MMMM D, YYYY")]})},{title:"Horas usadas",value:(0,n.jsx)(o.default,{color:a.credits_left>0?c.green:a.credits_total>0?c.red:c.gray,className:"big",children:"".concat(a.credits_used_current_month,"/").concat(a.credist_total)})},{title:"Pontos usados",value:(0,n.jsx)(o.default,{color:s.points_contracted>0?c.green:s.credits_total>0?c.red:c.gray,className:"big",children:"".concat(s.points_left,"/").concat(s.points_contracted)})}];return(0,n.jsx)(r.default,{grid:{gutter:[30,20],column:u.tq?1:2},dataSource:p,renderItem:e=>(0,n.jsxs)(r.default.Item,{children:[(0,n.jsx)(d.Card,{className:"smallPadding",children:(0,n.jsxs)(i.default,{type:"flex",justify:"space-between",style:{width:"100%"},children:[(0,n.jsx)(l.default,{span:14,children:(0,n.jsx)("b",{children:e.title})}),(0,n.jsx)(l.default,{span:10,style:{textAlign:"right"},children:e.value})]})}),e.description&&(0,n.jsx)("div",{className:"textCenter",children:(0,n.jsx)(f,{className:"p5",style:{marginTop:"10px"},children:e.description})})]})})})},47783:function(e,t,a){"use strict";a.d(t,{Z:function(){return reservas_table}});var n=a(85893),s=a(67294),r=a(2307),i=a(41609),l=a.n(i),o=a(85518),c=a(90008),d=a(86091),u=a(56697),m=a(61697);let x=(0,s.memo)(e=>{let{booking:t,setVisible:a,visible:s}=e;
1return(0,n.jsx)(u.default,{title:"",open:s,style:{top:40,marginBottom:"100px"},onCancel:()=>{a(!1)},destroyOnClose:!0,footer:!1,width:o.tq?"100%":"60%",closable:!0,children:(0,n.jsx)(m.Z,{booking:t})})}),f={UNDECIDED:"N\xe3o confirmado",CONFIRMED:"Confirmado",ACCEPTED:"Confirmado",REJECTED:"Rejeitado",CANCELED:"Cancelado"},statusDuration=e=>e?e.replace("hours","horas").replace("hour","hora"):e,columns=(e,t)=>{let a=[{title:"Refer\xeancia",dataIndex:"provider_id",key:"reference"},{title:"Sala",dataIndex:["model","title"],key:"room"},{title:"Nome do titular",dataIndex:["payload","name"],key:"owner_name"},{title:"Email",dataIndex:["payload","email"],key:"owner_email"},{title:"Data e hora",dataIndex:["payload","full_start_date_str"],key:"full_start_date_str"},{title:"Situa\xe7\xe3o",dataIndex:"status",key:"status",filters:[{text:"N\xe3o confirmado",value:"N\xe3o confirmado"},{text:"Confirmado",value:"Confirmado"},{text:"Rejeitado",value:"Rejeitado"},{text:"Cancelado",value:"Cancelado"}],render:e=>f[e]},{title:"Dura\xe7\xe3o",dataIndex:["payload","time"],key:"duration",render:e=>statusDuration(e)},{title:"",key:"actions",render:(a,s)=>(0,n.jsx)("a",{onClick:()=>{e(!0),t(s.payload)},children:"+Info"})}];return a};var reservas_table=e=>{let{total:t,setTotal:a,search:i,unity:u="todas",company_id:m=null}
1=e,[p,h]=(0,s.useState)(!0),[g,y]=(0,s.useState)([]),[j,v]=(0,s.useState)({limit:10,offset:0,order:"-start_at"}),[_,b]=(0,s.useState)(!1),[C,S]=(0,s.useState)(),unityFilter=()=>({content_type__model_id:"todas"!==u?u:void 0}),companyFilter=()=>m?{company_id:m}:{};(0,s.useEffect)(()=>{getReserveApi({...j,...unityFilter(),...companyFilter(),search:i})},[,i,u]);let getReserveApi=e=>{v(e),h(!0),c.eZ.getBookings(e).then(e=>{let t=e.data.items;a&&a(e.data.meta.total_count);let n=t.map(e=>({...e,key:e.id}));y(n)}).finally(()=>{h(!1)})},handleFilter=e=>{if(e.status){var t;e.status=(0,d.r)(e.status,f),e.status.find(e=>"CONFIRMED"===e)&&!e.status.find(e=>"ACCEPTED"===e)&&e.status.push("ACCEPTED");let a="";null===(t=e.status)||void 0===t||t.forEach((e,t)=>{if(0===t){a+=e;return}a+=",".concat(e)}),e.status=a}return e.status&&""!==e.status||delete e.status,e};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.default,{columns:columns(b,S),dataSource:g,onChange:(e,t,a)=>{let n=e.pageSize*e.current-e.pageSize;if(!l()(a)){let e="descend"===a.order?"-":"";t.order=e+a.columnKey}l()(a)&&(t.order="-start_at");let s={limit:e.pageSize,offset:n,search:i,...unityFilter(),...companyFilter(),...handleFilter({...t})};getReserveApi(s)},loading:p,pagination:{defaultPageSize:10,total:t},scroll:{x:o.tq?1200:0},locale:{emptyText:"Sem reservas na lista"}}),(0,n.jsx)(x,{booking:C,setVisible:b,visible:_})]})}},3774:function(e,t,a){"use strict";a.r(t);var n=a(85893),s=a(67294),r=a(51024),i=a(17669),l=a(55673),o=a(5789),c=a(53740),d=a(25675),u=a.n(d),m=a(23279),x=a.n(m);a(5904);var f=a(67814),p=a(11163),h=a.n(p),g=a(58754),y=a(90008),j=a(22657);let{Search:v}=r.default,{Text:_,Paragraph:b}=c.default;t.default=(0,s.memo)(e=>{let t;let{model:a,placeholder:r,defaultValue:c,customOnSelect:d=null,returnedValue:m="url",onError:p,...C}=e,[S,k]=(0,s.useState)([]),[w,I]=(0,s.useState)(!1),[A,F]=(0,s.useState)(null);(0,s.useEffect)(()=>{c&&F(c)},[c]);let searchResult=e=>{t&&t.abort(),t=new AbortController;let{signal:n}=t;I(!0);let s=y.ApiPrivate.getAPICall("/v2/".concat(a||"company","/search/").concat(e.replace("/","").toString().toLowerCase(),"/"),{signal:n}).then(e=>{var t;return(null===(t=e.data)||void 0===t?void 0:t.error)||!e.data?(k([{key:"error",title:"Sem resultados",url:"#"}]),p&&p(!0)):(k(e.data),p&&p(!1)),I(!1),e.data}).catch(e=>{I(!1)});return s},renderOption=e=>{var t,a;let{item:s}=e,[r]=null!==(a=s.highlight)&&void 0!==a?a:[],i=null===(t=s.highlight)||void 0===t?void 0:t.find(e=>"title"===e.key);if((null==r?void 0:r.key)==="cpf_cnpj"){let e=null==r?void 0:r.value.replace(/<b>/,"").replace(/<\/b>/,"");e=(0,g.UV)({target:{value:e}}),r={key:null==r?void 0:r.key,value:e}}let c=24;return s.img&&(c-=7),s.icon&&(c-=7),s.extra_data&&(c-=6),{id:null==s?void 0:s.id,key:null==s?void 0:s.id,value:s[m],label:(0,n.jsxs)(l.default,{justify:"space-around",align:"middle",children:[s.img&&(0,n.jsx)(o.default,{span:7,children:(0,n.jsx)(u(),{src:s.img,alt:s.title,title:s.title,width:"52",height:"52",className:"round5"})}),(0,n.jsxs)(o.default,{span:c,style:{lineHeight:"1.4em"},children:[(0,n.jsx)(_,{strong:!0,children:s.error?"Sem resultados":i?(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:i.value}}):s.title}),r&&!i&&(0,n.jsxs)(b,{type:"secondary",style:{fontSize:"12px"},children:[(0,n.jsx)("br",{}),(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:r.value}})]},r.key),s.description&&(0,n.jsxs)(_,{type:"secondary",style:{fontSize:"13px"},children:[(0,n.jsx)("br",{}),s.description]})]}),s.icon&&(0,n.jsxs)(o.default,{span:6,...!(null==s?void 0:s.extra_data)&&{style:{textAlign:"right"}},children:[(0,n.jsx)(f.FontAwesomeIcon,{icon:s.icon})," ",s.icon_text&&(0,n.jsxs)(n.Fragment,{children:["\xa0",s.icon_text]})]}),s.extra_data&&(0,n.jsx)(o.default,{span:6,children:(0,n.jsx)(_,{style:{fontSize:"12px"},children:s.extra_data})})]})}},handleSearch=e=>!(e.length<3)&&(searchResult(e),!0),P=(0,s.useMemo)(()=>x()(handleSearch,500),[]);return(0,n.jsx)(i.default,{className:"global-search noFocus fullWidth",value:A,onSelect:function(e){if(d){let t=S.find(t=>t[m]===e);
1d(t),I(!1),F(null==t?void 0:t.title);return}let t=S.find(t=>t.url===e);t&&t.id&&sessionStorage.setItem("_navigator",JSON.stringify({modelId:t.id,modelSlug:(0,j.Z)(t.title),modelIdentifier:t.title})),e&&"error"!==e&&(h().push(e),I(!1),F(null))},onChange:e=>{F(e)},onSearch:P,mode:"combobox",placeholder:r||"Procurar empresa",options:S.map(e=>renderOption({item:e})),...C,children:(0,n.jsx)(v,{loading:w})},"autocomplete")})},39580:function(e,t,a){"use strict";var n=a(85893),s=a(67294),r=a(11163),i=a(55673),l=a(5789),o=a(53740),c=a(10149),d=a(7136);a(5904);var u=a(67814),m=a(90008),x=a(39691),f=a(82943);let{Title:p}=o.default;t.Z=(0,s.memo)(e=>{let{processStatusFilter:t,setProcessStatusFilter:a,isAdmin:o=!1,companyId:h=!1}=e,{defaultCompanyId:g,defaultCompanyObject:y}=(0,s.useContext)(x.S),[j,v]=(0,s.useState)(null),[_,b]=(0,s.useState)(!0),{access_roles:C}=y,S=C.includes("legalizacao-processos-visao-pme"),k=o||S?6:5,w=h||g,I=(0,r.useRouter)(),A=(0,s.useCallback)(async()=>{m.ApiPrivate.getIncorporateProcessMetrics(w).then(e=>{v(e.data),b(!1)})},[w]);return(0,s.useEffect)(()=>{A()},[A]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(c.default,{active:!0,loading:_,paragraph:{rows:3},children:!_&&j&&(0,n.jsxs)(i.default,{type:"flex",align:"stretch",gutter:[20,20],style:{marginBottom:25},children:[!S&&(0,n.jsx)(n.Fragment,{children:!o&&(0,n.jsx)(l.default,{xs:24,md:4,children:(0,n.jsxs)(d.Card,{id:"start-process",className:"fullHeight bg gray-light notShadow",onClick:function(){I.push("/app/processos/novo-processo")},style:{textAlign:"center",display:"flex",flexDirection:"column",justifyContent:"center",align:"center"},hoverable:!0,bordered:!0,children:[(0,n.jsx)(u.FontAwesomeIcon,{icon:"plus-circle",size:"2x"}),(0,n.jsx)(p,{className:"noMarginBottom marginTop",level:4,children:"Adicionar processo"})]})})}),(0,n.jsx)(l.default,{xs:24,sm:12,md:k,children:(0,n.jsx)(f.Z,{icon:"chart-line",iconSize:26,title:"Processos em andamento",status:j.in_progress,hoverable:!0,onClick:()=>a("in_progress"),pressed:"in_progress"===t})}),(0,n.jsx)(l.default,{xs:24,sm:12,md:k,children:(0,n.jsx)(f.Z,{icon:"check-circle",iconSize:23,title:"Processos Pausados",status:j.paused,hoverable:!0,onClick:()=>a("paused"),pressed:"paused"===t})}),(0,n.jsx)(l.default,{xs:24,sm:12,md:k,children:(0,n.jsx)(f.Z,{icon:"check-circle",iconSize:23,title:"Processos Suspensos",status:j.suspend,hoverable:!0,onClick:()=>a("suspend"),pressed:"suspend"===t})}),(0,n.jsx)(l.default,{xs:24,sm:12,md:k,children:(0,n.jsx)(f.Z,{icon:"check-circle",iconSize:23,title:"Processos finalizados",status:j.finished,hoverable:!0,onClick:()=>a("finished"),pressed:"finished"===t})})]})})})})},54027:function(e,t,a){"use strict";a.d(t,{z:function(){return columns}});var n=a(85893),s=a(27484),r=a.n(s),i=a(90008),l=a(18945),o=a(53740),c=a(59361),d=a(35297),u=a(11187);a(5904);var m=a(67814);let{Text:x}=o.default,statusTranslate=e=>{let t={in_progress:"Aberto",canceled:"Excluido",finished:"Finalizado",paused:"Pausado",suspend:"Suspenso"};return t[e]?t[e]:e},f={organ:"Org\xe3o",hero:"Company Hero",client:"Cliente"},columns=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/app/processos/";async function onDeleteProcess(t){try{await i.mJ.postIncorporateForm({status:"canceled",object_id:t}),e(e=>e.filter(e=>e.id!==t)),u.default.success("Processo exclu\xeddo")}catch(e){u.default.error("N\xe3o foi poss\xedvel excluir processo. Tente novamente em alguns instantes")}}return[{title:"Identificador",dataIndex:"identificator",key:"identificator",ellipsis:!0,render:(e,a)=>(0,n.jsx)(l.default,{as:"".concat(t,"[model]"),href:"".concat(t).concat(a.id),children:e})},{title:"Processo",dataIndex:["model","title"],key:"model"},{title:"Estado",dataIndex:"status",key:"status",render:e=>statusTranslate(e),defaultFilteredValue:["in_progress"]},{title:"Etapa",dataIndex:"stage_id.title",key:"stage_id",render:(e,t)=>(0,n.jsxs)(n.Fragment,{children:[t.submitted?(0,n.jsx)(x,{children:e}):(0,n.jsx)(c.default,{color:"red",children:e}),(0,n.jsx)("br",{}),(0,n.jsx)(x,{type:"secondary",style:{fontSize:"12px"},children:t.stage_updated_at?(0,n.jsxs)(n.Fragment,{children:["Entrou"," ",r()(t.stage_updated_at&&t.stage_updated_at).fromNow()]}):(0,n.jsxs)(n.Fragment,{children:["Atualizado"," ",t.updated_at&&r()(t.updated_at).fromNow()]})})]})},{title:"Respons\xe1vel",dataIndex:"responsible",key:"responsible",render:e=>(0,n.jsx)(n.Fragment,{children:f[e]})},{title:"Inicio",dataIndex:"started_at",key:"started_at",defaultSortOrder:"descend",render:e=>e?r()(e).locale("pt-br").format("DD MMM, YY"):(0,n.jsx)(c.default,{color:"red",children:"N\xe3o iniciado"}),sorter:(e,t)=>r()(e.started_at).unix()-r()(t.started_at).unix(),sortDirections:["desce
1nd","ascend"]},{title:"",dataIndex:"",key:"delete",width:"5%",align:"center",render:e=>(0,n.jsx)(n.Fragment,{children:!e.submitted&&(0,n.jsx)(d.default,{okText:"Sim",onConfirm:()=>onDeleteProcess(e.id),title:"Excluir processo?",cancelText:"N\xe3o",children:(0,n.jsx)(m.FontAwesomeIcon,{color:"#f06",style:{cursor:"pointer",fontSize:".7em"},icon:"trash-alt"})})})}]}},30070:function(e,t,a){"use strict";a.d(t,{Z:function(){return ProcessTable}});var n=a(85893),s=a(67294),r=a(11187),i=a(2307),l=a(27484),o=a.n(l),c=a(85518),d=a(39691),u=a(90008),m=a(54027);function ProcessTable(e){let{total:t,setTotal:a,disableColor:l,fields:x=[],processStatusFilter:f,isAdmin:p,companyId:h=!1}=e,{defaultCompanyId:g}=(0,s.useContext)(d.S),y=h||g,[j,v]=(0,s.useState)(!0),[_,b]=(0,s.useState)([]),[C,S]=(0,s.useState)(1),k=null,w=o()();if(x&&x.length){let e=(0,m.z)();k=e.filter(e=>x.includes(e.dataIndex))}let getStageName=(e,t)=>{let a=t.stages.filter(t=>t.id===e);if(a.length){let t=a[0].value;return t.id=e,t}return""},ProcessSerializer=e=>{let t=e.map((e,t)=>{let a=o()(e.updated_at);return{key:t,id:e.id,responsible:e.responsible,company_id:e.company.id,c
1ompany:e.company.title,model:e.model,status:e.status,stage_id:getStageName(e.stage_id,e.model)||{title:"Rascunho"},submitted:e.submitted,created_at:e.created_at,started_at:e.started_at,identificator:e.identificator||e.company.title,stage_updated_at:e.stage_updated_at,updated_at:e.updated_at,last_comment:{...e.last_comment},color:["finished","canceled"].indexOf(e.status)>-1?"":w.diff(a,"days")>30?"bg_alert":w.diff(a,"days")>10?"bg_warning":""}});b(t),v(!1)},getProcessApi=async e=>{v(!0);let{offset:t}=e;try{let{data:n}=await u.ApiPrivate.getAllIncorporateProcessByCompany(y,"id,identificator,stage_id,stage_name,status,created_at,company,model,started_at",{...e});a&&a(n.meta.total_count),S(t/10+1),ProcessSerializer(n.items)}catch(e){r.default.error("N\xe3o foi poss\xedvel carregar processos")}};(0,s.useEffect)(()=>{f&&getProcessApi({limit:10,offset:0,status:f})},[y,f]);let I=p?"/admin/cnpj/".concat(y,"/"):"/app/processos/";return(0,n.jsx)(i.default,{columns:k||(0,m.z)(b,I),dataSource:_,onChange:(e,t,a)=>{let n={...t},s=e.pageSize*e.current-e.pageSize;if(a){let e="descend"===a.order?"-":"";n.order=e+a.columnKey}let r={...n,limit:e.pageSize,offset:s,status:f};getProcessApi(r)},loading:j,rowClassName:e=>!l&&e.color.replace("#",""),pagination:{defaultPageSize:10,total:t,current:C},scroll:{x:c.tq?800:0}})}},37380:function(e,t,a){"use strict";var n=a(85893),s=a(67294),r=a(55673),i=a(5789),l=a(53740),o=a(10149),c=a(7136),d=a(19435);a(5904);var u=a(67814),m=a(90008),x=a(39691),f=a(82943),p=a(11163),h=a(81361);let{Title:g}=l.default;t.Z=(0,s.memo)(e=>{let{indicationStatusFilter:t,setProcessStatusFilter:a,companyId:l=!1,isAdmin:y=!1}=e,j=(0,h.cC)("new-indication-flow"),v=(0,p.useRouter)(),{defaultCompanyId:_}=(0,s.useContext)(x.S),[b,C]=(0,s.useState)(null),[S,k]=(0,s.useState)(""),[w,I]=(0,s.useState)(!0),A=l||_,{setModalCheckoutVisibleId:F,setCheckoutFlowId:P,setIsIndicationPage:N}=(0,s.useContext)(d.I),D=(0,s.useCallback)(async()=>{try{let{data:e}=await m.ApiPrivate.getIndicationMetrics(A);C(e),I(!1)}catch(e){I(!1)}},[A]),z=(0,s.useCallback)(async()=>{await m.ApiPrivate.getChekouflowIdBySlug("fluxo-cad-indicacao-ev").then(e=>{let{data:t}=e;k(t.id)})},[]);return(0,s.useEffect)(()=>{D()},[D]),(0,s.useEffect)(()=>(j?z():P(""),()=>{P("")}),[z,j,P]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(o.default,{active:!0,loading:w,paragraph:{rows:3},children:!w&&b&&(0,n.jsxs)(r.default,{align:"stretch",gutter:[20,20],style:{marginBottom:25},children:[!y&&(0,n.jsx)(i.default,{xs:24,md:6,children:(0,n.jsxs)(c.Card,{className:"fullHeight bg gray-light notShadow",onClick:()=>{j?(N(!0),P(S),F(!0)):v.push("/solucoes/escritorio-virtual")},style:{textAlign:"center",display:"flex",flexDirection:"column",justifyContent:"center",align:"center"},hoverable:!0,bordered:!0,children:[(0,n.jsx)(u.FontAwesomeIcon,{icon:"plus-circle",size:"2x"}),(0,n.jsx)(g,{className:"noMarginBottom marginTop",level:4,children:"Nova Indica\xe7\xe3o"})]})}),(0,n.jsx)(i.default,{xs:24,sm:12,md:6,children:(0,n.jsx)(f.Z,{icon:"user",iconSize:26,title:"Todas as Indica\xe7\xf5es",status:b.total_indications,hoverable:!0,onClick:()=>a("awaiting_payment,concluded,waiting_customer_registration"),pressed:"awaiting_payment,concluded,waiting_customer_registration"===t})}),(0,n.jsx)(i.default,{xs:24,sm:12,md:6,children:(0,n.jsx)(f.Z,{icon:"hourglass",iconSize:26,title:"Indica\xe7\xf5es em andamento",status:b.in_progress,hoverable:!0,onClick:()=>a("awaiting_payment,waiting_customer_registration"),pressed:"awaiting_payment,waiting_customer_registration"===t})}),(0,n.jsx)(i.default,{xs:24,sm:12,md:6,children:(0,n.jsx)(f.Z,{icon:"check-circle",iconSize:23,title:"Indica\xe7\xf5es Ativas",status:b.concluded,hoverable:!0,onClick:()=>a("concluded"),pressed:"concluded"===t})})]})})})})},32429:function(e,t,a){"use strict";a.d(t,{Z:function(){return C}});var n=a(85893),s=a(67294),r=a(2307),i=a(11187),l=a(85518),o=a(64487),c=a(39691),d=a(19435),u=a(90008),m=a(27484),x=a.n(m),f=a(18945),p=a(59361),h=a(94055),g=a(35297);a(5904);var y=a(67814),j=a(61681),v=a.n(j);let _={awaiting_payment:{color:"warning",value:{cad:"Aguardando pagamento",pme:"Aguardando pagamento do cliente"}},waiting_customer_registration:{color:"default",value:"Ativo com pend\xeancia"},canceled:{color:"error",value:"Cancelada"},concluded:{color:"processing",value:"Ativo"}},Columns=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/app/escritorios-virtuais/",t=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0,modalCancel=e=>{a(e),s(!0),t()},r=[{title:"Identificador",dataIndex:"identifier",key:"identifier",ellipsis:!0,render:(t,a)=>(0,n.jsx)(f.default,{as:"".concat(e,"[model]"),href:"".concat(e).concat(a.id),children:t})},{title:"Cliente",dataIndex:"client",key:"client"},{title:"Endere\xe7o",dataIndex:"address",key:"address"},{title:"Status",dataIndex:"status",key:"status",render:e=>{let{status:t,whoPaid:a}=e,s=_[t.toLocaleLowerCase()],r="awaiting_payment"===t?s.value[a]:s.value;return(0,n.jsx)(h.default,{title:r,placement:"topLeft",children:(0,n.jsx)("div",{className:v().tagStyle,children:(0,n.jsx)(p.default,{color:s.color,children:r})})})}},{title:"Data Inicio",dataIndex:"created_at",key:"created_at",defaultSortOrder:"descend",render:e=>x()(e).locale("pt-br").format("DD MMM, YY")},{title:"",dataIndex:"",key:"delete",width:"5%",align:"center",render:(e,t)=>{let{status:{status:a}}=e,{order:{id:s}}=t;return(0,n.jsx)(n.Fragment,{children:"awaiting_payment"===a?(0,n.jsx)("div",{children:(0,n.jsx)(g.default,{okText:"Sim",onConfirm:()=>{modalCancel(s)},title:"Excluir indica\xe7\xe3o?",cancelText:"N\xe3o",children:(0,n.jsx)(y.FontAwesomeIcon,{color:"#f06",style:{cursor:"pointer",fontSize:".7em"},icon:"trash-alt"})})}):""})}}];return r};var b=a(178),C=(0,s.memo)(e=>{let{total:t,setTotal:a,disableColor:m,indicationStatusFilter:x,c
1ompanyId:f=!1,isAdmin:p=!1}=e,{reload:h}=(0,s.useContext)(d.I),{defaultCompanyId:g}=(0,s.useContext)(c.S),[y,j]=(0,s.useState)(!0),[v,_]=(0,s.useState)([]),C=f||g,S="awaiting_payment,concluded,waiting_customer_registration",[k,w]=(0,s.useState)(!1),[I,A]=(0,s.useState)(""),indicationsSerializer=e=>{let t=e.map((e,t)=>{let{represented_customer:a,smart:{subtitle:n},status:s,created_at:r,who_paid:i}=e,{customer_identifier:l,first_name:o,last_name:c}=a;return{key:t,id:e.id,order:{id:e.order.id},identifier:l,client:"".concat(o," ").concat(c),address:n,status:{whoPaid:i,status:s},created_at:r}});_(t),j(!1)},F=(0,s.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};j(!0);try{0===Object.keys(e).length&&(e={status:S});let{data:t}=await u.ApiPrivate.getAllIndicationsByCompanyId(e,C),{meta:{total_count:n},items:s}=t;a&&a(n),indicationsSerializer(s),j(!1)}catch(l){var t,n,s;i.default.error("N\xe3o foi poss\xedvel obter a lista de contrata\xe7\xf5es. Tente novamente em alguns instantes"),_([]),j(!1);let e=JSON.stringify(null==l?void 0:null===(t=l.response)||void 0===t?void 0:t.data),a=null==l?void 0:null===(n=l.response)||void 0===n?void 0:n.status,r=null==l?void 0:null===(s=l.response)||void 0===s?void 0:s.headers;(0,o.Tb)(l,{contexts:{errorData:{value:e},errorStatus:{value:a},errorHeaders:{value:r}}})}},[C,a]);(0,s.useEffect)(()=>{let e={limit:10,offset:0};e.status=x||S,F(e)},[C,x,h]);let P=p?"drawer|indication|".concat(C,"|"):"/app/escritorios-virtuais/";return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.default,{columns:Columns(P,F,A,w),dataSource:v,onChange:(e,t,a)=>{let n={...t},s=e.pageSize*e.current-e.pageSize;n.status=x||S;let r={limit:e.pageSize,offset:s,...n};F(r)},loading:y,rowClassName:e=>!m&&e.color.replace("#",""),pagination:{defaultPageSize:10,total:t},scroll:{x:l.tq?800:0}}),(0,n.jsx)(b.Z,{open:k,updateData:F,onCancel:w,indicationId:I})]})})},178:function(e,t,a){"use strict";var n=a(85893),s=a(67294),r=a(56697),i=a(53740),l=a(74048),o=a(51024),c=a(55673),d=a(11187),u=a(97538),m=a(7136),x=a(90008),f=a(87409),p=a.n(f),h=a(47041);let{Text:g}=i.default;t.Z=e=>{var t;let{open:a,onCancel:i,indicationId:f,updateData:y}=e,[j,v]=(0,s.useState)(""),_=null!==(t=(0,h.getCookie)("defaultCompanyId"))&&void 0!==t?t:"",onConfirm=async()=>{try{await x.ApiPrivate.setIndicationCancelReason(f,_,j),d.default.success("Indica\xe7\xe3o exclu\xedda com sucesso!"),y([]),i(!1)}catch(e){d.default.error("N\xe3o foi possivel excluir a indica\xe7\xe3o, tente novamente mais tarde!"),i(!1)}};return(0,n.jsx)(r.default,{title:"Excluir sua indica\xe7\xe3o de Escrit\xf3rio Virtual?",open:a,centered:!0,onCancel:()=>i(!1),destroyOnClose:!0,width:"600px",footer:null,children:(0,n.jsxs)(l.default,{direction:"vertical",size:"middle",children:[(0,n.jsx)(g,{children:"Ah, lembre-se que ap\xf3s a exclus\xe3o, o link de indica\xe7\xe3o ser\xe1 eliminado e essa contrata\xe7\xe3o n\xe3o poder\xe1 mais ser efetivada."}),(0,n.jsx)(u.default,{layout:"vertical",style:{padding:0},children:(0,n.jsx)(u.default.Item,{name:"cancel_reason",rules:[{min:12,message:"Detalhe um pouco mais o motivo do cancelamento, por favor :)",warningOnly:!0}],children:(0,n.jsx)(o.default,{value:j,placeholder:"Preecha esse campo com o motivo do cancelamento da indica\xe7\xe3o",onChange:e=>{let{value:t}=e.target;v(t)},autoFocus:!0,"data-hj-allow":!0})})}),(0,n.jsx)(c.default,{justify:"end",children:(0,n.jsx)(m.zx,{type:"primary",disabled:j.length<12,className:p().customPrimaryButton,onClick:()=>onConfirm(),children:"Excluir indica\xe7\xe3o"})})]})})}},82943:function(e,t,a){"use strict";a.d(t,{Z:function(){return MetricCard}});var n=a(85893),s=a(55673),r=a(5789),i=a(53740),l=a(7136);a(5904);var o=a(67814),c=a(97069),d=a.n(c);let{Title:u,Text:m}=i.default;function MetricCard(e){let{icon:t,iconSize:a,status:i,title:c,hoverable:x,onClick:f,pressed:p}=e,h=c.split(" "),g=h?h.pop():"";return(0,n.jsx)(l.Card,{className:"fullHeight  ".concat(p?d().pressed:""),style:{display:"flex",flexDirection:"column",justifyContent:"center"},hoverable:x,onClick:()=>f?f():null,children:(0,n.jsxs)(s.default,{type:"flex",gutter:14,children:[(0,n.jsxs)(r.default,{xs:5,md:5,style:{textAlign:"center"},children:[(0,n.jsx)(o.FontAwesomeIcon,{icon:t,className:"primaryColor",style:{marginTop:14,fontSize:a||20}}),(0,n.jsx)("br",{})]}),(0,n.jsxs)(r.default,{xs:15,md:18,children:[(0,n.jsx)(u,{level:1,className:"noPadding noMargin",children:i||"0"}),(0,n.jsxs)(m,{className:"p3 noMargin",children:[h.join(" ")," ",(0,n.jsx)("br",{}),(0,n.jsx)(m,{strong:!0,style:{fontSize:20,fontWeight:"bold",textTransform:"capitalize",lineHeight:1},children:g})]})]})]})})}},66917:function(e,t,a){"use strict";var n=a(85893),s=a(7136),r=a(25675),i=a.n(r);a(5904);var l=a(67814),o=a(19317);t.Z=e=>{let{icon:t,size:a="",className:r="",bordered:c=!1,iconParams:d={}}
1=e,u="big"===a?50:"medium"===a?40:25,m=t.includes(".svg")?(0,n.jsx)(o.Q,{src:t,className:"icon_svg"}):t.includes(".")?(0,n.jsx)(i(),{src:t,width:u,height:u}):(0,n.jsx)(l.FontAwesomeIcon,{icon:t,...d});return(0,n.jsx)(s.Card,{className:"icon ".concat(a," ").concat(r," ").concat(u),bordered:c,size:"small",style:{display:"flex",justifyContent:"center",alignItems:"center"},children:m})}},80323:function(e,t,a){"use strict";a.d(t,{Z:function(){return Molecules_CardProductDescription}});var n=a(85893),s=a(7136),r=a(53740),i=a(59361),l=a(94055),o=a(1541),c=a(74048),d=a(66917),u=a(67814),m=a(92211),x=a(67294),f=a(76658),p=a.n(f);function TagRenderer(e){var t;let{gateway_name:a}=e,s=(0,x.useMemo)(()=>({Iugu:(0,n.jsx)(i.default,{color:"#5274FF",className:p().alert,children:"Iugu"}),Finance:(0,n.jsx)(i.default,{color:"#001A9E",className:p().alert,children:"Finance"})}),[]);return null!==(t=s[a])&&void 0!==t?t:(0,n.jsx)(n.Fragment,{})}function GatewayTag(e){let{gateway_name:t}=e;return(0,n.jsx)(TagRenderer,{gateway_name:t})}var h=a(85688),g=a.n(h),y=a(97274);let{useToken:j}=o.default,{Title:v,Text:_}=r.default,SharedProductIndication=e=>{let{owner_name:t}=e;return(0,n.jsx)("span",{className:"absolute right",style:{right:"15px",textAlign:"right"},children:(0,n.jsx)(l.default,{title:"Ativado por: ".concat(t),children:(0,n.jsx)(i.default,{color:"orange",children:(0,n.jsx)(u.FontAwesomeIcon,{icon:"user-friends"})})})})};var Molecules_CardProductDescription=function(e){var t,a;let{icon:r,title:i,subtitle:l,link:o,description:u,item:x,onOnboarding:f}=e,{token:p}=j(),h=(null==x?void 0:null===(t=x.order)||void 0===t?void 0:t.external_id)&&(null==x?void 0:null===(a=x.order)||void 0===a?void 0:a.external_id.length)>0?"Finance":"Iugu";return(0,n.jsx)(y.Z,{item:x,link:o,title:i,children:(0,n.jsxs)(s.Card,{hoverable:!!o,className:"fullHeight",...f&&x&&{onClick:()=>f(x)},children:[x&&x.ownerCompanyId&&(0,n.jsx)(SharedProductIndication,{owner_name:x.ownerCompanyTitle}),(0,n.jsxs)(c.default,{direction:"horizontal",className:g().cardHeading,children:[r&&(0,n.jsx)(d.Z,{icon:r,className:"noBorder",bordered:!0}
1),(0,n.jsxs)(c.default,{direction:"horizontal",className:g().tags,children:[x&&(0,n.jsx)(m.Y,{contractedService:x}),x&&(0,n.jsx)(GatewayTag,{gateway_name:h})]})]}),(0,n.jsxs)(c.default,{direction:"vertical",style:{width:"100%"},children:[(0,n.jsx)(v,{level:4,ellipsis:!0,className:"noMargin",children:i}),(0,n.jsx)(_,{className:"left blackGray",strong:!0,children:l}),(0,n.jsx)(_,{style:{fontSize:p.fontSizeSM},children:u})]}),o&&(0,n.jsx)(c.default,{className:"marginTop",children:(0,n.jsx)(s.zx,{style:{fontSize:p.fontSizeSM,padding:0},type:"link",children:"Acessar"})})]})})}},61697:function(e,t,a){"use strict";var n=a(85893),s=a(67294),r=a(97029),i=a(73818),l=a(53740),o=a(4863),c=a(11187),d=a(64749),u=a(74253),m=a(74048),x=a(55673),f=a(5789),p=a(7136);a(5904);var h=a(67814),g=a(39024),y=a(90008);let{Title:j,Paragraph:v,Text:_}=l.default,{Option:b}=d.default;t.Z=(0,s.memo)(e=>{var t,a,l,C;let{booking:S}=e,[k,w]=(0,s.useState)((0,g.Qt)(null==S?void 0:S.guests)),[I,A]=(0,s.useState)(!1),[F,P]=(0,s.useState)(!1),N={CONFIRMED:{status:"success",title:"Sua reserva est\xe1 confirmada!"},ACCEPTED:{status:"success",title:"Sua reserva est\xe1 confirmada!"},REJECTED:{status:"error",title:"Essa reserva foi cancelada"},UNDECIDED:{status:"info",title:"Reserva n\xe3o confirmada"},FINISHED:{status:"error",title:"Reserva finalizada!"},ACTIVE:{status:"info",title:"Reserva iniciada!"}},D=(null===(t=N[null==S?void 0:S.status])||void 0===t?void 0:t.status)==="success"&&(null==S?void 0:null===(a=S.room)||void 0===a?void 0:a.concierge_notification);async function updtateGuests(e){y.mJ.updateBooking(e).then(e=>{c.default.success("Convidados atualizados"),A(!1),P(!1)})}let Icon=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.FontAwesomeIcon,{icon:"caret-right",style:{width:"5px"}}),"\xa0\xa0"]});return(0,n.jsx)(i.default,{status:null===(l=N[null==S?void 0:S.status])||void 0===l?void 0:l.status,title:(0,n.jsx)(j,{level:2,children:null===(C=N[null==S?void 0:S.status])||void 0===C?void 0:C.title}),style:{paddingBottom:"7% !important"},children:(0,n.jsxs)("div",{className:"desc",children:[(0,n.jsx)(v,{children:(0,n.jsx)(_,{strong:!0,style:{fontSize:16},children:"Dados da reserva:"})}),(0,n.jsx)(v,{children:(0,n.jsxs)(m.default,{children:[(0,n.jsx)(Icon,{}),(0,n.jsx)("strong",{children:"C\xf3digo de reserva: "}),null==S?void 0:S.ref_formatted]})}),(0,n.jsx)(v,{children:(0,n.jsxs)(m.default,{children:[(0,n.jsx)(Icon,{}),(0,n.jsx)("strong",{children:"Sala: "}),null==S?void 0:S.room_name]})}),(0,n.jsx)(v,{children:(0,n.jsxs)(m.default,{children:[(0,n.jsx)(Icon,{}),(0,n.jsx)("strong",{children:"Empresa: "}),null==S?void 0:S.empresa]})}),(0,n.jsx)(v,{children:(0,n.jsxs)(m.default,{children:[(0,n.jsx)(Icon,{}),(0,n.jsx)("strong",{children:"Organizador: "}),null==S?void 0:S.name]})}),(0,n.jsx)(x.default,{gutter:[16,16],children:(0,n.jsx)(f.default,{xs:24,sm:24,md:24,lg:24,children:(0,n.jsxs)(v,{children:[(0,n.jsx)(Icon,{}),(0,n.jsx)("strong",{children:"Data e hora: "}),(0,r.z1)({date:null==S?void 0:S.start_at})," (",null==S?void 0:S.hours_str,")"]})})}),D&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.default,{}),(0,n.jsx)(o.default,{message:"Adicione seus convidados:",description:"Garanta uma boa experi\xeancia para seus convidados na recep\xe7\xe3o do nosso pr\xe9dio. Adicione os nomes separados por virgula para fazer a sua chegada mais eficiente.",type:"success",showIcon:!0}),(0,n.jsx)(d.default,{mode:"tags",style:{width:"100%",marginTop:"15px",marginBottom:"15px"},placeholder:"Adicione um novo convidado",defaultValue:k,onChange:e=>{w(e),A(!0),S.guests=(0,g.gP)(e)},notFoundContent:null,size:"large",tokenSeparators:[","],dropdownRender:()=>(0,n.jsx)(n.Fragment,{}),children:k.map(e=>(0,n.jsx)(b,{children:e},e))}),I&&(0,n.jsx)(p.zx,{type:"default",onClick:e=>void(P(!0),updtateGuests(S)),loading:F,children:"Salvar lista de convidados"})]})]})})})},43455:function(e,t,a){"use strict";a.d(t,{Z:function(){return Special_ProductTabsSection}});var n=a(85893),s=a(67294),r=a(39691),i=a(20838),l=a(10149),o=a(5789),c=a(7136),d=a(53740),u=a(1541),m=a(74048),x=a(16318),f=a(18945),p=a(66917),h=a(90008),g=a(29369),y=a(28508),j=a(46293),v=a(97871),_=a.n(v);let{useToken:b}=u.default,{Title:C,Text:S}=d.default;function CardHeroProductDescription(e){let{icon:t,iconParams:a,title:i,subtitle:l,link:o,description:d,slug:u,category:v,form:k,term:w}=e,{token:I}=b(),{defaultCompanyId:A}
1=(0,s.useContext)(r.S),[F,P]=(0,s.useState)(null),[N,D]=(0,s.useState)(!1),[z,E]=(0,s.useState)(!1),setHeroProductOnStorage=()=>{sessionStorage.setItem("heroProduct",JSON.stringify({slug:u,title:i,description:d,category:v}))},T=(0,s.useCallback)(async()=>{if(A){let{data:e}=await h.ApiPrivate.validateHeroProduct({companyId:A,productSlug:u}),t=(0,g.Z)({json:e});P(t.companyActive)}},[A,u]),HeroProduct=()=>(0,n.jsxs)(c.Card,{hoverable:!!o,className:"fullHeight ".concat(_().cardContent),onClick:null===F?null:()=>F?setHeroProductOnStorage():E(!0),children:[(0,n.jsxs)(m.default,{direction:"horizontal",className:_().cardHeading,children:[t&&(0,n.jsx)(p.Z,{icon:t,className:"noBorder ".concat(a?_().alignIcon:""),bordered:!0,iconParams:a||{}}),null!==F&&(0,n.jsx)(n.Fragment,{children:F?(0,n.jsx)(j.A,{category:"active"}):(0,n.jsx)(j.A,{category:"pendingActivation"})})]}),(0,n.jsxs)(m.default,{direction:"vertical",style:{width:"100%"},children:[(0,n.jsx)(C,{level:4,ellipsis:!0,className:"noMargin",children:i}),(0,n.jsx)(S,{className:"left blackGray",strong:!0,children:l}),(0,n.jsx)(S,{style:{fontSize:I.fontSizeSM},children:d})]}),o&&(0,n.jsx)(m.default,{className:"marginTop ".concat(_().linkContent),style:{flex:1,display:"flex"},children:(0,n.jsx)(f.default,{style:{fontSize:I.fontSizeSM,alignSelf:"flex-end",fontWeight:"bold"},href:"#",children:"Acessar"})})]});return(0,s.useEffect)(()=>{N&&(P(!0),x.default.success({message:"Produto ativado com sucesso"}),setTimeout(()=>{D(!1)},3e3))},[N]),(0,s.useEffect)(()=>{T()},[T]),(0,n.jsxs)(n.Fragment,{children:[A&&(0,n.jsx)(n.Fragment,{children:F?(0,n.jsx)(f.default,{title:i,href:o,children:(0,n.jsx)(HeroProduct,{})}):(0,n.jsx)(HeroProduct,{})}),(0,n.jsx)(y.O,{open:z,setOpen:E,productTitle:i,productSlug:u,defaultCompanyId:A,setActivationSuccess:D,activationForm:k,termKey:w.key})]})}var k=a(55673);a(5904);var w=a(67814);let{useToken:I}=u.default,{Title:A,Text:F}=d.default;var Molecules_CardAddService=function(e){let{link:t,title:a,subtitle:s}=e,{token:r}=I();return(0,n.jsx)(f.default,{href:t||"/solucoes",children:(0,n.jsxs)(c.Card,{bordered:!0,className:"fullHeight bg gray-light",style:{textAlign:"center",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},hoverable:!0,children:[(0,n.jsx)(w.FontAwesomeIcon,{icon:"plus-circle",size:"2x",style:{marginBottom:13,maxWidth:"50px"}}),(0,n.jsx)(A,{className:"noMarginBottom",level:4,children:a||"Adicionar servi\xe7o"}),(0,n.jsx)(F,{style:{fontSize:r.fontSizeSM},children:s||"Visite nosso marketplace"})]})})},P=a(80323);function ContractsTabs(e){let{content:t,addButton:a,admin:s,gridWidth:r,ownerId:i,onOpenOnboarding:l,extra:c}=e;return(0,n.jsxs)(k.default,{align:"stretch",gutter:[24,24],children:[0===t.length&&!a&&(0,n.jsx)("div",{style:{paddingLeft:"30px",display:"table"},children:(0,n.jsxs)("p",{className:"p3 gray",children:[(0,n.jsx)(w.FontAwesomeIcon,{icon:"exclamation-circle",className:"gray"}),"\xa0\xa0 Nenhum servi\xe7o encontrado"]})}),c,t.map(e=>{let{smart_internal_list:t,id:a,ownerCompanyId:c}=e,{title:d,subtitle:u,icon:m,customer_description:x}=t,f=s?"drawer|contract|".concat(c||i,"|").concat(a,"|").concat(i):"/app/home/".concat(a,"?company=").concat(c||i);return(0,n.jsx)(o.default,{xs:24,md:r,children:(0,n.jsx)(P.Z,{link:f,icon:m,title:d,subtitle:u,description:x,item:e,onOnboarding:l})},a)}),!s&&a&&(0,n.jsx)(o.default,{xs:24,md:r,children:(0,n.jsx)(Molecules_CardAddService,{})})]})}var N=a(65182),Special_ProductTabsSection=e=>{let{title:t="",companyId:a=!1,gridWidth:c=6,admin:d=!1}=e,{ownerId:u,handleOpenOnboarding:m,listServicesActive:x,listServicesFinish:f,listServicesCancel:p,hide:h,loading:g,sectionTitle:y}=(0,N.Z)(t,a),{heroProduct:j}=(0,s.useContext)(r.S),v=(0,s.useCallback)(()=>{var e;return(0,n.jsx)(n.Fragment,{children:(null==j?void 0:j.items)?null==j?void 0:null===(e=j.items)||void 0===e?void 0:e.filter(e=>e.active).map(e=>{let{description:t,id:a,slug:s,title:r,categoryCompany:i,form:l,term:d}=e;return(0,n.jsx)(o.default,{xs:24,md:c,children:(0,n.jsx)(CardHeroProductDescription,{link:"/app/produto/".concat(s),slug:s,icon:"flask",iconParams:{size:"2x"},title:r,subtitle:"",description:t,category:i,form:l,term:d})},a)}):(0,n.jsx)(n.Fragment,{})})},[c,j]),_=(0,s.useMemo)(()=>[{label:"Servi\xe7os ativos",key:"active",children:(0,n.jsx)(ContractsTabs,{admin:d,gridWidth:c,ownerId:u,onOpenOnboarding:m,content:x,addButton:!0,extra:(0,n.jsx)(v,{})}),disabled:!x.length},{label:"Finalizados",key:"finished",children:(0,n.jsx)(ContractsTabs,{admin:d,gridWidth:c,ownerId:u,onOpenOnboarding:m,content:f}),disabled:!f.length},{label:"Cancelados",key:"canceled",children:(0,n.jsx)(ContractsTabs,{admin:d,gridWidth:c,ownerId:u,onOpenOnboarding:m,content:p}),disabled:!p.length}],[d,c,u,m,x,v,f,p]);return h?(0,n.jsx)(n.Fragment,{}):(0,n.jsx)(l.default,{loading:g,paragraph:{rows:10},title:!1,active:!0,children:!g&&(0,n.jsxs)(n.Fragment,{children:[t||null,(0,n.jsx)(i.default,{defaultActiveKey:"0",animated:!0,className:"border",style:{marginBottom:80},items:_})]})})}},17605:function(e,t,a){"use strict";a.d(t,{$O:function(){return useDrawerVisibility},LR:function(){return useMembers},ZP:function(){return MemberProvider},iC:function(){return useCurrentMember}});var n=a(85893),s=a(67294);let r=(0,s.createContext)(null);function MemberProvider(e){let{children:t}
1=e,[a,i]=(0,s.useState)([]),[l,o]=(0,s.useState)(!1),[c,d]=(0,s.useState)(!1);return(0,n.jsx)(r.Provider,{value:{members:a,setMembers:i,drawerVisible:l,setDrawerVisible:o,currentMember:c,setCurrentMember:d},children:t})}function useMembers(){let e=(0,s.useContext)(r),{members:t,setMembers:a}=e;return{members:t,setMembers:a}}function useDrawerVisibility(){let e=(0,s.useContext)(r),{drawerVisible:t,setDrawerVisible:a}=e;return{drawerVisible:t,setDrawerVisible:a}}function useCurrentMember(){let e=(0,s.useContext)(r),{currentMember:t,setCurrentMember:a}=e;return{currentMember:t,setCurrentMember:a}}},39024:function(e,t,a){"use strict";a.d(t,{Qt:function(){return UnsSrializerGuest},gP:function(){return serializerGuest},QG:function(){return updateBookingObject}}),a(26272),a(80254);var n=a(90008);let updateBookingObject=async e=>!e||await n.mJ.updateBooking(e,e.status).then(e=>{});function UnsSrializerGuest(e){return e&&Array.isArray(e)?e.map(e=>e.name):[]}function serializerGuest(e){return e.map(e=>({name:e}))}},26131:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return Custom404}});var n=a(85893),s=a(73818),r=a(7136),i=a(18945),l=a(25675),o=a.n(l);function Custom404(e){let{message:t}=e;return(0,n.jsx)(s.default,{icon:(0,n.jsx)(o(),{src:"/404.svg",alt:"Error",title:"Error",width:300,height:300}),title:"Error 404!",subTitle:t||"N\xe3o conseguimos encontrar esta p\xe1gina",extra:(0,n.jsx)(i.default,{href:"/",children:(0,n.jsx)(r.zx,{type:"primary",children:"Voltar na home"})})})}},75169:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return eC}});var n=a(85893),s=a(67294),r=a(5152),i=a.n(r),l=a(85518),o=a(4670),c=a(10149),d=a(53740),u=a(20838),m=a(74253),x=a(5789),f=a(55673),p=a(59361),h=a(4863),g=a(94055),y=a(56590),j=a(74048),v=a(7136),_=a(31132),b=a(12274),C=a(18945),S=a(19435),k=a(39691),w=a(38939);a(5904);var I=a(67814),A=a(19317),Atoms_MenuItemContent=e=>{let{href:t,icon:a,label:s}=e;return(0,n.jsxs)(C.default,{href:t,children:[a&&!a.includes(".svg")&&(0,n.jsxs)("span",{className:"iconItem 1",children:[(0,n.jsx)(I.FontAwesomeIcon,{icon:a}),"\xa0\xa0"]}),a&&a.includes(".svg")&&(0,n.jsx)("span",{className:"iconItem 2",children:(0,n.jsx)(A.Q,{src:a,className:"svg-inline--fa"})}),(0,n.jsx)("span",{className:"label",children:s})]})},F=a(12386),P=a(11163),N=(0,s.memo)(e=>{let{mode:t="horizontal",theme:a="light",security:r,company:i,items:l,divider:o,dividerTitle:c,setOpen:d}=e,{user:u,userRole:x,security:f}=(0,s.useContext)(k.S),p=(0,P.useRouter)(),h=!(!u.companies||0===u.companies.length);if(r){if(!f)return"";if(!f[r])return!1}let g=i?null==i?void 0:i.access_roles:x,y=l&&l.filter(e=>!!(0===e.role.length||e.role&&e.role.length&&g&&e.role.some(e=>g.includes(e)))).map(e=>({label:(0,n.jsx)(Atoms_MenuItemContent,{icon:e.icon,label:e.label,href:e.href}),title:e.label,key:e.label,disabled:!h}));return 0===y.length?"":(0,n.jsxs)(n.Fragment,{children:[o&&(0,n.jsx)(m.default,{orientation:"left",children:c}),(0,n.jsx)(F.default,{mode:t,defaultSelectedKeys:["0"],selectedKeys:[p.asPath],theme:a,onClick:()=>d?d(!1):"",items:y})]})}),D=(0,s.memo)(e=>{let{company:t=!1,theme:a="dark",showStaffMenu:r=!0,setOpen:i}=e,{menuSider:l}=(0,s.useContext)(S.I),{defaultCompanyObject:o}=(0,s.useContext)(k.S),c=(0,w.Z)(l,t||o),d=c.map(e=>({mode:"inline",theme:a,divider:"base"!==e.slug,dividerTitle:e.title,role:e.roles,items:e.menu_items.map(e=>({href:e.link,icon:e.icon||"shield-alt",label:e.title,role:e.roles}))})),u=[...d,{role:[],mode:"inline",theme:a,divider:!0,dividerTitle:"Conta",items:[{role:[],href:"/app/minha-empresa",icon:"building",label:"Minha empresa"}]}];return r&&(u=[...u,{security:["is_staff"],role:[],mode:"inline",theme:a,divider:!0,dividerTitle:"AREA PRIVADA",items:[{role:[],href:"/admin",icon:"shield-alt",label:"Administra\xe7\xe3o"}]}]),(0,n.jsx)(n.Fragment,{children:u.map((e,a)=>(0,n.jsx)(N,{...e,company:t,setOpen:i},a))})}),z=a(3774),E=a(29793),T=a(33520),M=a(2307),B=a(90008);let{Text:Z}=d.default;var R=(0,s.memo)(e=>{let{company_id:t}=e,[a,r]=(0,s.useState)([]),[i,l]=(0,s.useState)(!0);(0,s.useEffect)(()=>{B.ApiPrivate.getCompanyCoupons(t).then(e=>{let t=e.data.items.map(e=>({...e,key:e.id}));return r(t),l(!1),e.data})},[t]);let o=[{title:"code",dataIndex:"code",key:"code",render:e=>(0,n.jsx)(Z,{children:(0,n.jsx)("b",{children:e})})},{title:"Ativo",dataIndex:"active",key:"active",render:e=>e?"Sim":"Nao"},{title:"coupom",dataIndex:"coupom",key:"coupom",render:e=>(0,n.jsx)(Z,{children:e})},{title:"% total",dataIndex:"discount",key:"discount",render:e=>(0,n.jsx)(Z,{children:e})},{title:"Estrategia comissionamento",dataIndex:"discount_commissioning_strategy",key:"discount_commissioning_strategy",render:e=>(0,n.jsx)(Z,{children:e})},{title:"Desconto final clientes",dataIndex:"real_discount",key:"real_discount",render:e=>(0,n.jsx)(Z,{children:e})},{title:"",dataIndex:"",key:"x",render:e=>(0,n.jsxs)(C.default,{href:"".concat("https://admin.companyhero.
1com/","/cms/voucher/voucher/edit/").concat(e.id,"/"),children:["Editar\xa0\xa0",(0,n.jsx)(I.FontAwesomeIcon,{icon:"external-link-alt",style:{fontSize:"10px"}})]})}];return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(M.default,{columns:o,dataSource:a,pagination:!1,loading:i})})}),O=a(41927),H=a(30359),L=a(43455),q=a(84237),W=a(53248),mailing=e=>{let{company:t,is_admin:a=!1}=e,{user:r,userLoading:i}=(0,s.useContext)(k.S);return(0,n.jsx)(q.Z,{children:(0,n.jsx)(c.default,{active:!0,loading:i,paragraph:{rows:10},children:!i&&t&&(0,n.jsx)(W.Z,{company_id:t.id,defaultCompanyObject:t,defaultCompanyId:t.id,user:r,is_admin:a})})})},J=a(30070),V=a(39580),U=a(37380),G=a(32429),Y=a(17605),K=a(47783),Q=a(30607);let{Text:X}=d.default;var multiForms=e=>{let{companyId:t}=e,[a,r]=(0,s.useState)([]),[i,l]=(0,s.useState)([]);return(0,s.useEffect)(()=>{B.eZ.getAllForms("?objects_type=Company&save_answers_on_db=true").then(e=>{r(e.data.items)}).catch(()=>{})},[]),(0,s.useEffect)(()=>{let e=a.map((e,a)=>({key:"form_".concat(a),label:(0,n.jsx)(X,{strong:!0,children:e.title}),children:(0,n.jsx)(Q.Z,{slug:e.slug,owner_id:t,auto_save:!0,autoPopulate:!0,is_admin:!0})}));l(e)},[a,t]),(0,n.jsx)(v.UO,{className:"cleanList middleMargin",items:i})},$=a(96023);let{Title:ee,Text:et}=d.default;async function getForm(e){let t=await B.eZ.getForm(e);return t.data}async function getAnswers(e,t){let a=await (0,$.Z)(e,t);return a}var ea=(0,s.memo)(e=>{let{formId:t,companyId:a,setUpdateForm:r,updateForm:i,extras:l=!0,showTitle:o=!0,orderId:c}=e,[d,u]=(0,s.useState)(!1),[m,p]=(0,s.useState)(!1),[h,g]=(0,s.useState)([]),[j,v]=(0,s.useState)([]),[C,S]=(0,s.useState)(!0),[k,w]=(0,s.useState)([]),A={marginBottom:"10%",fontSize:"16px"};(0,s.useEffect)(()=>{getForm(t).then(e=>{if(u(e),c){getAnswers(c,e.id).then(e=>{p(e)});return}getAnswers(a,e.id).then(e=>{p(e)})})},[a,t,c]),(0,s.useEffect)(()=>{i&&(S(!0),setTimeout(()=>{getAnswers(a,t).then(e=>{p(e),r(!1)})},1e3))},[i,a,t,r]),(0,s.useEffect)(()=>{if(d.fields&&m){let e=[],t=[],a=[];d.fields.map(t=>{var n;if(!t.hasOwnProperty("value")||!t.value.hasOwnProperty("key")&&"FieldsGroup"!=t.type)return!1;if("FieldsGroup"==t.type){let e=[];return e.title=t.value.title,e.value=[],t.value.group.map(t=>{if(m[t.key])return e.value.push({key:t.title,value:m[t.key]}),delete m[t.key],!0}),a.push(e),!1}m[t.value.key]&&((null==m?void 0:m.object_type)==="Order"&&"TextArea"===t.type&&(null===(n=t.value.key)||void 0===n?void 0:n.includes("obs"))?e.push({key:"".concat(t.value.title," | ").concat(t.value.key),value:m[t.value.key].toString()}):"DateField"===t.type?e.push({key:t.value.title,value:(0,b.Z)(new Date(m[t.value.key]))?(0,_.Z)(new Date(m[t.value.key]),"dd/MM/yyyy"):m[t.value.key].toString()}):e.push({key:t.value.title,value:m[t.value.key].toString()}),delete m[t.value.key])}),Object.keys(m).map(e=>{""!=m[e]&&t.push({key:e.replace(/_/g," "),value:m[e]})}),g(e),v(t);let s=a.map(e=>{if(e.value.length>0){let t="";e.title.toLowerCase().includes("contato")&&(t=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(I.FontAwesomeIcon,{icon:"user-tie"}),"\xa0\xa0"]}));let a=(0,n.jsxs)(ee,{level:3,children:[t,e.title]});return(0,n.jsx)(y.default,{header:a,itemLayout:"horizontal",style:A,dataSource:e.value,renderItem:e=>itemList(e.key,e.value)},e.title)}});w(s),S(!1)}},[d,m]);let itemList=(e,t)=>(0,n.jsx)(y.default.Item,{children:(0,n.jsxs)(f.default,{type:"flex",justify:"space-between",style:{width:"100%"},gutter:[30,10],children:[(0,n.jsx)(x.default,{span:12,children:(0,n.jsx)("strong",{children:e})}),(0,n.jsx)(x.default,{span:12,children:t})]})});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(y.default,{header:o&&(0,n.jsxs)(et,{strong:!0,children:[(0,n.jsx)(I.FontAwesomeIcon,{icon:"clipboard-list"}),"\xa0\xa0",d.title]}),itemLayout:"horizontal",style:A,dataSource:h,renderItem:e=>itemList(e.key,e.value),loading:C}),k,l&&(0,n.jsx)(y.default,{header:(0,n.jsx)(ee,{level:3,children:"Outras Informa\xe7\xf5es:"}),itemLayout:"horizontal",style:A,dataSource:j,renderItem:e=>itemList(e.key,e.value),loading:C})]})}),multiFormsAnswers=e=>{let{companyId:t,useOrder:a,orderId:r=null}
1=e,[i,l]=(0,s.useState)([]);return(0,s.useEffect)(()=>{B.eZ.getAllForms("?objects_type=".concat(a?"Order":"Company","&save_answers_on_db=true").concat(a?"&order=form_key":"")).then(e=>{l(e.data.items)}).catch(()=>{})},[a]),(0,n.jsx)(n.Fragment,{children:i.map(e=>(0,n.jsx)(ea,{formId:e.id,companyId:t,extras:!1,orderId:r},e.id))})},multiFormsAdmin=e=>{let{companyId:t}=e,a=[{label:"Formul\xe1rios",key:"customer",children:(0,n.jsx)(multiForms,{companyId:t})},{label:"S\xf3 respostas",key:"admin",children:(0,n.jsx)(multiFormsAnswers,{companyId:t})}];return(0,n.jsx)(u.default,{className:"border",items:a})},en=a(56697),es=a(8799),er=a(51024),ei=a(89552),el=a(73818),eo=a(72335),ec=a.n(eo);let Footer=e=>{var t;let{step:a,creditsAmount:s,onConfirm:r,onAddCredits:i,onPreviousStep:l}=e;return 0===a?(0,n.jsx)("div",{className:ec().formFooter,children:(0,n.jsxs)(v.zx,{disabled:0===s,onClick:i,children:[s<0?"Remover":"Adicionar"," ",null!==(t="".concat(s).replace(/\D/g,""))&&void 0!==t?t:0," hora",(s>1||s<0||0===s||!s)&&"s"]})}):1===a?(0,n.jsxs)("div",{className:"".concat(ec().formFooter," ").concat(ec().justifyEnd),children:[(0,n.jsx)(v.zx,{onClick:l,children:"Cancelar"}),(0,n.jsx)(v.zx,{type:"primary",onClick:r,children:"Confirmar"})]}):(0,n.jsx)(n.Fragment,{})};var company_AddCreditsModal=e=>{let{open:t,onClose:a,companyId:r,onSuccess:i}
1=e,[l,o]=(0,s.useState)(0),[c,u]=(0,s.useState)(null),[m,x]=(0,s.useState)("failure"),[f,p]=(0,s.useState)(""),[h,g]=(0,s.useState)(!1),{Title:y,Text:j}=d.default;(0,s.useEffect)(()=>{o(0)},[]);let _=(0,s.useCallback)(async()=>{if(g(!0),o(e=>e+1),c<0){await B.ApiPrivate.removeCompanyCredits(r,Math.abs(c),f).then(()=>{x("success"),i()}).catch(e=>{console.error(e),x("failure")}).finally(()=>{g(!1)});return}await B.ApiPrivate.addCompanyCredits(r,c,f).then(()=>{x("success"),i()}).catch(e=>{console.error(e),x("failure")}).finally(()=>{g(!1)})},[c,f,r]);return(0,n.jsxs)(en.default,{className:ec().modal,open:t,onCancel:a,destroyOnClose:!0,footer:(0,n.jsx)(Footer,{step:l,creditsAmount:c,onConfirm:_,onAddCredits:()=>o(e=>e+1),onPreviousStep:()=>o(e=>e-1)}),children:[(0,n.jsxs)("div",{className:ec().formContentWrapper,children:[0===l&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(y,{level:3,style:{fontSize:"28px",lineHeight:"36.4px"},children:"Quantas horas voc\xea quer adicionar/remover?"}),(0,n.jsx)(j,{style:{marginBottom:"24px"},children:"Selecione ou digite a quantidade desejada"}),(0,n.jsxs)("div",{className:ec().fieldsWrapper,children:[(0,n.jsx)(es.default,{formatter:e=>"".concat(e).replace(/\D-/g,""),value:c,placeholder:"2",onChange:e=>{if(!e){u(0);return}let t="".concat(e).replace(/\D-/g,"");u(Number(t))}}),(0,n.jsxs)("div",{children:[(0,n.jsx)("strong",{children:"Detalhes (Opcional)"}),(0,n.jsx)(er.default,{value:f,"data-hj-allow":!0,onChange:e=>{let{target:{value:t}}=e;return p(t)},placeholder:"Exemplo: horas extornadas (clique para editar)"})]})]})]}),1===l&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(y,{level:3,style:{fontSize:"28px",lineHeight:"36.4px"},children:"Revise sua a\xe7\xe3o"}),(0,n.jsxs)(j,{style:{marginBottom:"24px"},children:["Voc\xea quer ",c<0?"remover":"adicionar"," ",(0,n.jsxs)("strong",{children:["".concat(c).replace(/\D/g,"")," hora",(c>1||c<0)&&"s","?"]})]}),(0,n.jsx)("div",{className:ec().fieldsWrapper,children:(0,n.jsxs)("div",{children:[(0,n.jsx)("strong",{children:"Detalhes (Opcional)"}),(0,n.jsx)(er.default,{"data-hj-allow":!0,readOnly:!0,value:f})]})})]})]}),2===l&&(0,n.jsx)(n.Fragment,{children:h?(0,n.jsx)("div",{className:ec().centered,children:(0,n.jsx)(ei.default,{})}):(0,n.jsx)("div",{className:ec().resultMessage,children:"success"===m?(0,n.jsx)(el.default,{status:"success",title:"Deu tudo certo!",subTitle:"As suas ".concat(Math.abs(c)," horas foram ").concat(c<0?"removidas":"adicionadas","!"),extra:(0,n.jsx)(v.zx,{type:"primary",onClick:a,children:"Fechar"},"console")}):(0,n.jsx)(el.default,{status:"error",title:"Algo de errado n\xe3o est\xe1 certo!",subTitle:"N\xe3o conseguimos alterar suas horas \uD83D\uDE41.\n                  Voc\xea pode recarregar a p\xe1gina e tentar novamente .️",extra:[(0,n.jsx)(v.zx,{onClick:a,children:"Fechar"},"close"),(0,n.jsx)(v.zx,{type:"primary",onClick:()=>o(0),children:"Tentar novamente"},"retry")]})})})]})},ed=a(64749),eu=a(97538),em=a(31059),ex=a(16318),ef=a(49197),ep=a.n(ef);let eh={ADD:{success:{message:"Sucesso",description:"Pontos adicionados com sucesso"},error:{message:"Erro",description:"Erro ao adicionar pontos"}},SUBTRACT:{success:{message:"Sucesso",description:"Pontos removidos com sucesso"},error:{message:"Erro",description:"Erro ao remover pontos"}}};function AddPointsModal(e){let{open:t,onClose:a,companyId:r,onSuccess:i}=e,[l]=eu.default.useForm(),[o,c]=(0,s.useState)(""),[d,u]=(0,s.useState)(""),[m,p]=(0,s.useState)(!1),h=(0,s.useCallback)(e=>{let{status:t="success",action:n}=e;ex.default["".concat(t)](eh[n][t]),a(),i()},[a,i]),addOrRemovePoints=async e=>{let{action:t,payload:a}=e,{addCompanyPoints:n,removeCompanyPoints:s}=B.ApiPrivate,i="ADD"===t?n:s;return await i(r,a).then(()=>h({action:t})).catch(()=>{h({status:"error",action:t})})},g=(0,s.useCallback)(async()=>{l.validateFields().then(async()=>{p(!0);let e=l.getFieldsValue(),t=e.action,a="ADD"===t?{points:e.points,description:e.description,is_cortesy:!!e.is_cortesy}:{points:e.points,description:e.description};await addOrRemovePoints({action:t,payload:a})})},[d,r,l]);return(0,n.jsx)(en.default,{className:ep().modal,open:t,onCancel:a,destroyOnClose:!0,onOk:g,title:"Adicionar/remover pontos",okText:"Confirmar",cancelText:"Cancelar",okButtonProps:{disabled:m},cancelButtonProps:{disabled:m},children:(0,n.jsx)(eu.default,{form:l,layout:"vertical",children:(0,n.jsxs)(f.default,{gutter:[12,12],children:[(0,n.jsx)(x.default,{xl:14,lg:14,md:12,sm:24,xs:24,children:(0,n.jsx)(eu.default.Item,{name:"action",label:"Ac\xe3o",rules:[{required:!0,message:"Selecione uma a\xe7\xe3o"}],children:(0,n.jsx)(ed.default,{disabled:m,onChange:e=>c(e),options:[{value:"ADD",label:"Adicionar"},{value:"SUBTRACT",label:"Remover"}]})})}),(0,n.jsx)(x.default,{xl:6,lg:6,md:8,sm:12,xs:12,children:(0,n.jsx)(eu.default.Item,{name:"points",label:"Pontos",rules:[{required:!0,message:"Informe a quantidade"}],children:(0,n.jsx)(es.default,{className:ep().inputNumber,formatter:e=>"".concat(e).replace(/\D-/g,""),disabled:m,placeholder:"2",min:1,onChange:e=>{if(e&&e<0)return 1}})})}),(0,n.jsx)(x.default,{xl:4,lg:4,md:4,sm:12,xs:12,children:(0,n.jsx)(eu.default.Item,{name:"is_courtesy",label:"Cortesia",valuePropName:"checked",children:(0,n.jsx)(em.default,{defaultChecked:!1,disabled:m||"ADD"!==o})})}),(0,n.jsx)(x.default,{xl:24,lg:24,md:24,sm:24,xs:24,children:(0,n.jsx)(eu.default.Item,{name:"description",label:"Detalhes",rules:[{required:!0,message:"Descreva o motivo da a\xe7\xe3o"},{min:10,message:"A descri\xe7\xe3o deve ter no m\xednimo 10 caracteres"}],children:(0,n.jsx)(er.default,{disabled:m,value:d,"data-hj-allow":!0,onChange:e=>{let{target:{value:t}}=e;return u(t)},placeholder:"Exemplo: Adicionado pela Hero como cortesia"})})})]})})})}var eg=a(26131);let ey=i()(()=>a.e(79188).then(a.bind(a,37874)),{loadableGenerated:{webpack:()=>[37874]}}),ej=i()(()=>a.e(24930).then(a.bind(a,24930)),{loadableGenerated:{webpack:()=>[24930]}}),ev=i()(()=>a.e(54521).then(a.bind(a,54521)),{loadableGenerated:{webpack:()=>[54521]}}),{Title:e_,Text:eb}=d.default;function CardBase(e){let{title:t,children:a,loading:s}=e;return(0,n.jsx)(v.Card,{className:"centerDiv padding8 margin10",type:"inner",title:t,children:(0,n.jsx)(c.default,{active:!0,loading:s,paragraph:{rows:10},children:a})})}
1function TabBasicInfo(e){let{companyData:t,receitaWsData:a,sociosData:s,cnaesData:r,basicInfoActiveTab:i,setBasicInfoActiveTab:l,setReloadCompany:o}=e,c=[{label:"Todas as variaveis",key:"admin",children:(0,n.jsx)(function(){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(T.Z,{data:t,title:"Nomes",icon:"store",rows:[{key:"title",label:"T\xedtulo",type:"string"},{key:"social_reason",label:"Raz\xe3o Social",type:"string"},{key:"fantasy_name",label:"Nome fantasia",type:"string"},{key:"cpf_cnpj",label:"CPF/CNPJ",type:"string"},{key:"pessoa",label:"Pessoa",type:"string"}]}),(0,n.jsx)(T.Z,{data:t,title:"Dados b\xe1sicos",icon:"box",rows:[{key:"id",label:"Id",type:"string"},{key:"slug",label:"Slug",type:"string"},{key:"id_customer_iugu",label:"Id do cliente na Iugu",type:"string"},{key:"external_id",label:"Id do cliente no Finance",type:"string"},{key:"created_at",label:"Criado em",type:"datetime"},{key:"access_roles",label:"Access Roles",type:"tag"}]}),(0,n.jsx)(T.Z,{data:t.company_type,title:"Tipo de empresa",icon:"building",rows:[{key:"id",label:"Id",type:"string"},{key:"title",label:"T\xedtulo",type:"string"},{key:"slug",label:"Slug",type:"string"},{key:"accept_share_docs",label:"Accept share_docs",type:"boolean"}]}),(0,n.jsx)(T.Z,{data:t,title:"Dados de contato",icon:"phone",rows:[{key:"administrator",label:"Administrador",type:"string"},{key:"phone",label:"Telefone",type:"string"},{key:"email",label:"Email",type:"string"},{key:"website",label:"Website",type:"link"}]}),(0,n.jsx)(T.Z,{data:t,title:"Endere\xe7o",icon:"map-marker-alt",rows:[{key:"zip_code",label:"CEP",type:"string"},{key:"street",label:"Rua",type:"string"},{key:"number",label:"N\xfamero",type:"string"},{key:"complement",label:"Complemento",type:"string"},{key:"city",label:"Cidade",type:"string"},{key:"state",label:"UF",type:"string"}]}),(0,n.jsx)(m.default,{}),(0,n.jsx)(E.Z,{company:a,keys:Object.keys(a),title:"Informa\xe7\xf5es da receita federal",icon:"university"}),s&&(0,n.jsxs)(y.default,{header:(0,n.jsx)(e_,{level:4,children:s.label}),itemLayout:"horizontal",style:{fontSize:"14px",marginBottom:"5%",marginTop:"-5%"},children:[(0,n.jsx)(y.default.Item,{children:(0,n.jsxs)(f.default,{type:"flex",justify:"space-between",style:{width:"100%"},children:[(0,n.jsx)(x.default,{span:11,children:(0,n.jsx)(eb,{style:{whiteSpace:"normal"},children:(0,n.jsx)("strong",{children:"Nome"})})}),(0,n.jsx)(x.default,{span:13,children:(0,n.jsx)(eb,{style:{whiteSpace:"normal"},children:(0,n.jsx)("strong",{children:"Qualifica\xe7\xe3o"})})})]})}),s.value.map(e=>{var t,a;return(0,n.jsx)(y.default.Item,{children:(0,n.jsxs)(f.default,{type:"flex",justify:"space-between",style:{width:"100%"},children:[(0,n.jsx)(x.default,{span:11,children:(0,n.jsx)(eb,{style:{whiteSpace:"normal"},children:null===(t=e[0])||void 0===t?void 0:t.value})}),(0,n.jsx)(x.default,{span:13,children:(0,n.jsx)(eb,{style:{whiteSpace:"normal"},children:(null===(a=e[1])||void 0===a?void 0:a.value)||""})})]})},JSON.stringify(e))})]}),0!==r.length&&r.map(e=>(0,n.jsxs)(y.default,{header:(0,n.jsx)(e_,{level:4,children:e.label}),itemLayout:"horizontal",style:{fontSize:"14px"},children:[(0,n.jsx)(y.default.Item,{children:(0,n.jsxs)(f.default,{type:"flex",justify:"space-between",style:{width:"100%"},children:[(0,n.jsx)(x.default,{span:11,children:(0,n.jsx)(eb,{style:{whiteSpace:"normal"},children:(0,n.jsx)("strong",{children:"C\xf3digo"})})}),(0,n.jsx)(x.default,{span:13,children:(0,n.jsx)(eb,{style:{whiteSpace:"normal"},children:(0,n.jsx)("strong",{children:"Descri\xe7\xe3o"})})})]})}),e.value.map((e,t)=>{var a,s,r;return(0,n.jsx)(y.default.Item,{children:(0,n.jsxs)(f.default,{type:"flex",justify:"space-between",style:{width:"100%"},children:[(0,n.jsx)(x.default,{span:11,children:(0,n.jsx)(eb,{style:{whiteSpace:"normal"},children:(null===(a=e[1])||void 0===a?void 0:a.value)||""})}),(0,n.jsx)(x.default,{span:13,children:(0,n.jsx)(eb,{style:{whiteSpace:"normal"},children:(null===(s=e[0])||void 0===s?void 0:s.value)||""})})]})},(null===(r=e[1])||void 0===r?void 0:r.value)||t)})]},e.key))]})},{})},{label:"Formulario - Minha empresa",key:"form_company",children:(0,n.jsx)(ey,{companyId:t.id,is_admin:!0,onSuccess:()=>o(e=>!e)},"form-company-".concat(t.id))},{label:"Menu do cliente",key:"customer_menu",children:(0,n.jsx)(D,{company:t,theme:"light",showStaffMenu:!1})},{label:"Notas time Hero",key:"notes",children:(0,n.jsx)(ey,{companyId:t.id,is_admin:!0,slug:"admin-company-notes"},"form-company-notes-".concat(t.id))}];return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(O.Z,{company:t}),(0,n.jsx)(m.default,{}),(0,n.jsx)(C.default,{href:"".concat("https://admin.companyhero.
1com/","/cms/company/company/edit/").concat(t.id,"/"),children:(0,n.jsx)(v.zx,{size:"small",children:(0,n.jsxs)(j.default,{children:["Abrir no wagtail",(0,n.jsx)(I.FontAwesomeIcon,{icon:"external-link-alt",style:{width:"10px"}})]})})}),(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),(0,n.jsx)(u.default,{activeKey:i,onChange:e=>{l(e)},className:"border",items:c})]})}var eC=(0,o.Xy)(function(){var e;let t=(0,P.useRouter)(),{slug:a}=t.query,[r,i]=(0,s.useState)(!1),[o,c]=(0,s.useState)(0),[d,y]=(0,s.useState)(!0),[j,S]=(0,s.useState)(!1),[k,w]=(0,s.useState)("in_progress"),[A,F]=(0,s.useState)("all"),[N,D]=(0,s.useState)(null),[M,Z]=(0,s.useState)("admin"),[O,q]=(0,s.useState)("basic_info"),[W,Q]=(0,s.useState)({}),[X,$]=(0,s.useState)([]),[ee,et]=(0,s.useState)(null),[ea,en]=(0,s.useState)(!1),[es,er]=(0,s.useState)(!1),[ei,el]=(0,s.useState)(!1),eo=(0,s.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];await B.ApiPrivate.getCompany(a,!1,e).then(e=>{let{data:t}=e,a=t.receitaws_fields.map(e=>"receitaws_date_last_sync"===e.key?{...e,value:(0,b.Z)(new Date(e.value))?(0,_.Z)(new Date(e.value),"dd/MM/yyyy - HH:mm:ss"):e.value}:e),n={},s={};return a&&(null==a?void 0:a.length)!==0&&(a.forEach(e=>{if("receitaws_associates"===e.key){s=e;return}Object.assign(n,{[e.label]:e.value})}),Q(n),et(s)),$(t.cnaes),t.external_id?en(!0):en(!1),i(t),c(t.members?t.members.length:0),e}).catch(e=>{S(!0)})},[a]);(0,s.useEffect)(()=>{a&&(y(!0),eo().finally(e=>(y(!1),e)).catch(e=>{}))},[a]),(0,s.useEffect)(()=>{null!=N&&setTimeout(()=>{eo(!0).catch(()=>{})},1e3)},[N]);let roleExists=e=>r&&r.access_roles.includes(e),onAddCreditsSuccess=()=>{eo().then(e=>e).catch(e=>{})};if(j)return(0,n.jsx)(eg.default,{statusCode:404});let ec=[{label:"Informa\xe7\xf5es b\xe1sicas",key:"basic_info",children:(0,n.jsx)(CardBase,{title:"Informa\xe7\xf5es b\xe1sicas",loading:d,children:(0,n.jsx)(TabBasicInfo,{companyData:r,receitaWsData:W,sociosData:ee,cnaesData:X,basicInfoActiveTab:M,setBasicInfoActiveTab:Z,setReloadCompany:D})})},{label:"Formul\xe1rios de cadastro",key:"forms",children:(0,n.jsx)(CardBase,{title:"Formul\xe1rios de cadastro",loading:d,children:(0,n.jsx)(multiFormsAdmin,{companyId:r.id})})},{label:"Faturamento",key:"billing",children:(0,n.jsx)(CardBase,{title:"Faturamento",loading:d,children:(0,n.jsx)(function(){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(T.Z,{icon:"address-card",data:r,title:"Dados do cliente",rows:[{key:"id_customer_iugu",label:"Id do cliente na Iugu",type:"string"},ea&&{key:"external_id",label:"Id do cliente no Finance",type:"string"},{key:"financial_situation",label:"Situa\xe7\xe3o financeira",type:"string"},{key:"financial_situation_last_update",label:"\xdaltima atualiza\xe7\xe3o da situa\xe7\xe3o financeira",type:"datetime"}]}),(0,n.jsxs)(C.default,{href:"https://alia.iugu.com/contact/customers/".concat(r.id_customer_iugu),children:[(0,n.jsx)(I.FontAwesomeIcon,{icon:"external-link-alt"}),"\xa0Ver cliente no Iugu"]}),(0,n.jsx)(m.default,{dashed:!0}),(0,n.jsx)(e_,{level:3,children:"Faturas"}),(0,n.jsx)(H.default,{company_id:r.id})]})},{})})},{label:"Contratos (".concat(r.count_contract_service||0,")"),key:"contracts",children:(0,n.jsx)(CardBase,{title:"Contratos",loading:d,children:(0,n.jsx)(L.Z,{companyId:r.id,gridWidth:12,admin:!0})})},{label:"Horas e Pontos (".concat(r&&r.credits_and_points.credits.credits_left||0,"/").concat(r&&r.credits_and_points.points.total||0,")"),key:"credits",children:(0,n.jsx)(CardBase,{title:"Horas e Pontos",loading:d,children:(0,n.jsx)(function(){return(0,n.jsx)(n.Fragment,{children:r&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(f.default,{type:"flex",style:{flexDirection:"row-reverse"},children:(0,n.jsx)(v.zx,{type:"primary",onClick:()=>el(!0),children:"Adicionar/remover horas"})}),(0,n.jsx)(E.Z,{company:r.credits_and_points.credits,keys:["credits_left","credist_total","credits_used_current_month","credits_contracted","credits_courtesy"],title:"Horas",icon:"coins"}),(0,n.jsx)(f.default,{type:"flex",style:{flexDirection:"row-reverse"},children:(0,n.jsx)(v.zx,{type:"primary",onClick:()=>er(!0),children:"Adicionar/remover pontos"})}),(0,n.jsx)(E.Z,{company:r.credits_and_points.points,keys:["total","courtesy_balance"],title:"Pontos",icon:"coins"}),ei&&(0,n.jsx)(company_AddCreditsModal,{open:ei,onClose:()=>el(!1),companyId:null==r?void 0:r.id,onSuccess:onAddCreditsSuccess}),es&&(0,n.jsx)(AddPointsModal,{open:es,onClose:()=>er(!1),companyId:null==r?void 0:r.id,onSuccess:onAddCreditsSuccess})]})})},{})})},{label:(0,n.jsx)(g.default,{title:!roleExists("virtual")&&"Empresa sem permiss\xe3o para acessar correspond\xeancia (sem role: virtual)",placement:"right",children:"Correspond\xeancia (".concat(r.count_mailing||0,")")}),key:"mailing",children:(0,n.jsx)(CardBase,{title:"Correspond\xeancia",loading:d,children:(0,n.jsx)(function(){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.default,{message:"Voc\xea como administrador pode abrir as correspond\xeancias e isso n\xe3o mudara o status de 'N\xe3o Lido', j\xe1 que isso s\xf3 acontece quando o cliente acessa a sua propia correspond\xeancia",type:"warning",showIcon:!0,className:"marginBottom"}),(0,n.jsx)("br",{}),r&&(0,n.jsx)(mailing,{company:r,is_admin:!0}
1)]})},{})})},{label:(0,n.jsxs)(g.default,{title:!roleExists("dashboard-cad")&&"Empresa sem permiss\xe3o para fazer indica\xe7\xf5es (sem role: dashboard-cad)",placement:"right",children:["Indica\xe7\xf5es ","(".concat(r.count_product_indications||0,")")]}),key:"indications",children:(0,n.jsx)(CardBase,{title:"Indica\xe7\xf5es",loading:d,children:(0,n.jsx)(function(){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.default,{message:"Aqui vera a mesma visualiza\xe7\xe3o que o cliente consegue ver em seu dashboard, a \xfanica diferen\xe7a \xe9 o link que neste caso vai para o processo com a visual de administrador",type:"warning",showIcon:!0,className:"marginBottom"}),(0,n.jsx)("br",{}),(0,n.jsx)(U.Z,{indicationStatusFilter:A,setProcessStatusFilter:F,companyId:r.id,isAdmin:!0}),(0,n.jsx)(G.Z,{indicationStatusFilter:A,companyId:r.id,disableColor:!0,isAdmin:!0})]})},{})})},{label:(0,n.jsxs)(g.default,{title:!roleExists("legalizacao-b2b2b")&&!r.count_incorporate_process&&"Empresa sem permiss\xe3o para acessar dashboard de legaliza\xe7\xe3o (sem role: legalizacao-b2b2b)",placement:"right",children:["Legaliza\xe7\xe3o ","(".concat(r.count_incorporate_process||0,")")]}),key:"legalizacao",children:(0,n.jsx)(CardBase,{title:"Plataforma de Legaliza\xe7\xe3o",loading:d,children:(0,n.jsx)(function(){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.default,{message:"Aqui vera a mesma visualiza\xe7\xe3o que o cliente consegue ver em seu dashboard, a \xfanica diferen\xe7a \xe9 o link que neste caso vai para o processo com a visual de administrador",type:"warning",showIcon:!0,className:"marginBottom"}),(0,n.jsx)("br",{}),(0,n.jsx)(V.Z,{processStatusFilter:k,setProcessStatusFilter:w,companyId:r.id,isAdmin:!0}),(0,n.jsx)(J.Z,{processStatusFilter:k,companyId:r.id,disableColor:!0,isAdmin:!0})]})},{})})},{label:"Membros (".concat(o,")"),key:"members",children:(0,n.jsx)(CardBase,{title:"Membros",loading:d,children:(0,n.jsx)(Y.ZP,{children:(0,n.jsx)(ej,{company_id:r.id})})})},{label:"Cupons (".concat(r.count_coupons||0,")"),key:"coupons",children:(0,n.jsx)(CardBase,{title:"Cupons",loading:d,children:(0,n.jsx)(R,{company_id:r.id})})},{label:"Reserva de salas (".concat(r.count_bookings||0,")"),key:"bookings",children:(0,n.jsx)(CardBase,{title:"Reserva de salas",loading:d,children:(0,n.jsx)(K.Z,{company_id:r.id})})},{label:"Termos e condi\xe7\xf5es",key:"termos",children:(0,n.jsx)(CardBase,{title:"Termos e condi\xe7\xf5es",loading:d,children:(0,n.jsx)(ev,{isCompany:!0,targetId:r.id})})}];return(0,n.jsxs)("section",{className:"flex-width notMobilePadding",style:{marginBottom:"200px"},children:[(0,n.jsx)("section",{className:"padding smallPadding",children:(0,n.jsxs)(f.default,{type:"flex",justify:"space-between",align:"middle",children:[(0,n.jsx)(x.default,{xs:24,sm:24,md:14,children:(0,n.jsx)(v.mr,{title:r.title,subTitle:r.social_reason,avatar:{src:"/icons/company.svg"},tags:(0,n.jsx)(p.default,{color:"blue",children:null===(e=r.company_type)||void 0===e?void 0:e.title})})}),(0,n.jsx)(x.default,{xs:24,sm:24,md:8,children:(0,n.jsx)(z.default,{autoFocus:!0,placeholder:"Procurar empresa"})})]})}),(0,n.jsx)(u.default,{activeKey:O,onChange:q,tabPosition:l.tq?"top":"left",className:"paddingCard noBorder",items:ec,size:"middle"})]})})},80254:function(e,t,a){"use strict";a.d(t,{V:function(){return c}});var n=a(6154),s=a(27484),r=a.n(s),i=a(34155);let l={auth:{username:i.env.YOUCANBOOKME_ACCOUNT,password:i.env.YOUCANBOOKME_API_KEY}},o="https://api.youcanbook.me/v1",c={getEvent:e=>n.Z.get("".concat(o,"/bookings/").concat(e,"/?").concat("&fields=id,ref,title,createdAt,startsAt,endsAt,tentative,cancelled,answers,answers.string,answers.code,displayDurationFull,teamMember,teamMember.name,teamMember.description,teamMember.pic,teamMember.calendarId,teamMember.id,profileId,accountId,profile,profile.accountId,teamMemberId,status,actions,actions.status,actions.anchor,actions.created,actions.title,actions.type,durationMinutes,calendars,calendars.*,*"),{withCredentials:!0,headers:{Accept:"application/json","Content-Type":"application/json"},...l}),getProfile:e=>n.Z.get("".concat(o,"/profiles/").concat(e).concat("?fields=title,subdomain,questions,questions.*"),l),async getEventSerializer(e){let t=await this.getEvent(e);
1if(!t.data||0===t.data.length)return!1;let a=d.booking(t.data);return a.profile=await this.getProfile(a.profileId).then(e=>d.profile(e.data)),a.ref_formatted=e,a.subitem_line=d.subitem(a),a},confirmEvent:async e=>await n.Z.patch("".concat(o,"/bookings/").concat(e.ref_formatted,"?fields=id,ref_formatted,tentative,title"),{tentative:"ACCEPTED"},{headers:{"Content-Type":"application/json"},...l}).then(async()=>!0).catch(e=>console.log("error",e)),cancelEvent:async e=>await n.Z.patch("".concat(o,"/bookings/").concat(e.ref_formatted,"?fields=id,ref_formatted,tentative,title"),{tentative:"REJECTED"},{headers:{"Content-Type":"application/json"},...l}).then(async()=>!0).catch(e=>console.log("error",e))},d={booking(e){let t=[];e.answers.map(e=>(e.code="FNAME"===e.code?"name":e.code,e.code=["CNPJ","CPF"].includes(e.code)?"cpf_cnpj":e.code,e.string="PHONE"===e.code?e.string.replace("+55",""):e.string,t[e.code.toLowerCase()]=e.string,e));let a=r()(e.startsAt).locale("pt-br"),n=r()(e.endsAt).locale("pt-br"),s=a.format("HH:mm"),i=a.format("DD/MM/Y"),l=a.format("DD/MM"),o=r().duration(n.diff(a)),c=o.asHours(),d=c>1?"".concat(c," Horas"):"".concat(c," Hora"),u=a.format("HH:mm"),m=n.format("HH:mm");return t.full_start_date_str="".concat(i," ").concat(s),t.simple_start_date_str="".concat(l," ").concat(s.substr(0,5)),t.price_string=e.displayPrice,t.price_cents=e.price,t.price=e.price/100,t.time=e.displayDurationFull,t.hours=c,t.hours_str=d,t.ref=e.ref,t.start_at=e.startsAt,t.created_at=e.createdAt,t.hour_start=u,t.hour_ends=m,t.ends_at=e.endsAt,t.id=e.id,t.status=e.tentative,t.profileId=e.profileId,t.status=e.cancelled||"REJECTED"==e.tentative?"REJECTED":"UNDECIDED"!=e.tentative?"ACCEPTED":e.tentative,t},profile:e=>(e.questions.map((t,a)=>{e.room="Sala"==t.before?t.after:""|e.room}),delete e.questions,e),subitem(e){let t={invoice:"".concat(e.hours_str," ").concat(e.room_name," - ").concat(e.full_start_date_str," | Ref: ").concat(e.ref_formatted),checkout:"".concat(e.room_name," - ").concat(e.simple_start_date_str," (").concat(e.hours_str,")")};return t}}},58754:function(e,t,a){"use strict";a.d(t,{CN:function(){return formatPhone},Cz:function(){return formatCPF},R4:function(){return formatCNPJ},UV:function(){return formatCPFCNPJ},VD:function(){return validateCNPJ},a$:function(){return validatePhone},aA:function(){return validateNineDigitPhone},gj:function(){return formatMonetary},kh:function(){return formatInteger},pM:function(){return validateCPF},rl:function(){return formatPercentage},sc:function(){return validateCPFCNPJ}});var n=a(91530);let formatPhone=e=>{let{value:t}=e.target,a=(0,n.gw)(t);return e.target.value=a,a},validatePhone=(e,t)=>new Promise((e,a)=>{t?(0,n.Mn)(t)?e():a("Telefone inv\xe1lido"):e()}),validateNineDigitPhone=(e,t)=>new Promise((e,a)=>{t&&(t.replace(/[^0-9]/g,"").length<11||!(0,n.Mn)(t))?a("Telefone inv\xe1lido"):e()}),cleanRegistryCode=e=>String(null!=e?e:"").replace(/[^0-9A-Za-z]/g,""),isCnpjInput=e=>{let t=cleanRegistryCode(e);return/[A-Za-z]/.test(t)||t.length>11},formatCPFCNPJ=e=>{let{value:t}=e.target,a=isCnpjInput(t)?(0,n.fC)(t):(0,n.zt)(t);return e.target.value=a,a},validateCPFCNPJ=(e,t,a)=>{if(t){if(isCnpjInput(t)){if(!(0,n.Co)(t))return a("CNPJ inv\xe1lido")}else if(!(0,n.h0)(t))return a("CPF inv\xe1lido")}a()},validateCPF=(e,t,a)=>{t&&!(0,n.h0)(t)&&a("CPF inv\xe1lido"),a()},formatCPF=e=>{let{value:t}=e.target,a=(0,n.zt)(t);return e.target.value=a,a},validateCNPJ=(e,t,a)=>{t&&!(0,n.Co)(t)&&a("CNPJ inv\xe1lido"),a()},formatCNPJ=e=>{let{value:t}=e.target,a=(0,n.fC)(t);return e.target.value=a,a},formatInteger=e=>e.target.value.toString().replace(/[^0-9]+/g,""),formatMonetary=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{value:a}=e.target,{empty:n=!1,locales:s="pt-BR",options:r={minimumFractionDigits:2}}=t,i=a&&"number"==typeof a?a.toFixed(2):a,l=function(e){let t=String(e),a=t.replace(/\D/g,""),n=a.replace(/^0+(?=\d)/,""),s=t.startsWith("-");return(s?"-":"")+n}(i),o=l.padStart(3,"0"),c=o.slice(-2),d=o.slice(0,o.length-2);if(n&&"0"===d&&"00"===c)return"";let u=new Intl.NumberFormat(s,r).format("".concat(d,".").concat(c));return u},formatPercentage=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{value:a}=e.target,{empty:n=!1,locales:s="pt-BR",options:r={minimumFractionDigits:1,minimumFractionDigits:2}}=t;"number"==typeof a&&(a=a.toFixed(2));let i=String(a).replace(/\D/g,"").replace(/^0+/g,""),l=i.padStart(2,"0"),o=l.slice(-2),c=l.slice(0,l.length-2);if(n&&"0"===c&&"00"===o)return"";let d=new Intl.NumberFormat(s,r).format("".concat(c,".").concat(o));return d}},26272:function(e,t,a){"use strict";a.d(t,{C:function(){return s}});var n=a(90008);a(80254);let s={useCredit:async(e,t,a,s)=>await n.ApiPrivate.useCompanyCredits(e,t,a,s).then(e=>e).catch(e=>e),async checkAndCharge(e,t,a,s){let r=await n.ApiPrivate.getCompanyCredits(e,s).then(e=>{let a=e.data;return a.credits_left>0&&a.credits_left>=t?{credits_left:a.credits_left-t,credits_to_charge:0,credits_used:t,credits_meeting:t,action:"use_credits"}:a.credits_left>0&&a.credits_left<t?{credits_left:0,credits_to_charge:t-a.credits_left,credits_used:a.credits_left,credits_meeting:t,action:"use_credits_and_charge_money"}:{credits_left:0,credits_to_charge:t,credits_used:0,credits_meeting:t,action:"use_credits_and_charge_money"}}).catch(()=>({credits_left:0,credits_to_charge:t,credits_used:0,credits_meeting:t,action:"use_credits_and_charge_money"}));if(r.credits_used>0&&0==r.credits_to_charge){let t={booking:a,description:(null==a?void 0:a.room_name)?"Sala de reuni\xe3o - ".concat(a.room_name):"",object_type:"booking",object_id:a.id};await this.useCredit(e,r.credits_used,t,s)}return r},useCreditsSinglePurchase:async(e,t)=>await n.ApiPrivate.useCompanyCreditsSinglePurchase(e,t).then(e=>e).catch(e=>e)}},97029:function(e,t,a){"use strict";function formatDateWithHour(e){let{date:t}=e,a=new Intl.DateTimeFormat("pt-Br",{dateStyle:"short",timeStyle:"medium"}).format(new Date(t));return a.includes(", ")?a.replace(", "," - "):a.replace(" "," - ")}function formatFullDateWithHour(e){let{date:t}=e;return new Intl.DateTimeFormat("pt-BR",{dateStyle:"long",timeStyle:"short"}).format(new Date(t)).replace("\xe0s","-")}function formatFullDate(e){let{date:t}=e;return new Intl.DateTimeFormat("pt-BR",{dateStyle:"long"}).format(new Date(t))}function formatDate(e){let{date:t}=e,a=new Date(t),n="".concat(a.getHours(),":").concat(a.getMinutes()>9?a.getMinutes():"0".concat(a.getMinutes())),s=Intl.DateTimeFormat("pt-BR",{weekday:"long",year:"numeric",month:"short",day:"2-digit"}).format(a).replace("-feira","").replace(".",",").replace(/de /g,"").split(" ").map(e=>"".concat(e[0].toLocaleUpperCase()).concat(e.slice(1,e.length))).join(" ");return"".concat(s,", ").concat(n)}function formatDateWithLongMonth(e){let{date:t}=e,a=new Date(t),n="".concat(a.getHours(),":").concat(a.getMinutes()>9?a.getMinutes():"0".concat(a.getMinutes())),s=Intl.DateTimeFormat("pt-BR",{weekday:"long",year:"numeric",month:"long",day:"2-digit"}).format(a).replace("-feira","").replace(".",",").replace(/de [0-9]/g,e=>e.replace(/\D/g,""));return"".concat(s[0].toUpperCase()).concat(s.slice(1),", ").concat(n)}function formartSimpleDate(e){let{date:t}=e;return new Intl.DateTimeFormat("pt-BR",{year:"numeric",month:"short",day:"2-digit"}).format(new Date(t)).replace(".",",").replace(/de /g,"").split(" ").join(" ")}a.d(t,{Rp:function(){return formatDateWithLongMonth},Tu:function(){return formatFullDate},h6:function(){return formatFullDateWithHour},p6:function(){return formatDate},xF:function(){return formartSimpleDate},z1:function(){return formatDateWithHour}})},86091:function(e,t,a){"use strict";function arrayValuesToArrayKeys(e,t){return e?e.map(e=>Object.keys(t).find(a=>t[a]===e)):[]}a.d(t,{r:function(){return arrayValuesToArrayKeys}})},38939:function(e,t,a){"use strict";a.d(t,{Z:function(){return filter}});let n=[{referrer:"beer_or_coffee",link:"/app/salas"}],getReferrerByLink=(e,t)=>{let a=e.find(e=>e.link==t);return a&&a.referrer||null};function filter(e,t){let a=t?t.referred_category:[],s=e.map(e=>({...e,menu_items:e.menu_items.filter(e=>(function(e,t,a){let n=getReferrerByLink(e,a);return!t.includes(n)})(n,a,e.link))}));return s}},72335:function(e){e.exports={modal:"style_modal__h4e0V",formContentWrapper:"style_formContentWrapper__iwhHe",fieldsWrapper:"style_fieldsWrapper__B6J7L",formFooter:"style_formFooter__flgIr",justifyEnd:"style_justifyEnd__wbJGK",justifyCenter:"style_justifyCenter__lKUjD",centered:"style_centered__TewA7",resultMessage:"style_resultMessage__UWZpI"}},49197:function(e){e.exports={modal:"style_modal__3sVpf",formContentWrapper:"style_formContentWrapper__ysZRj",fieldsWrapper:"style_fieldsWrapper__66plW",formFooter:"style_formFooter__bJaYH",justifyEnd:"style_justifyEnd__iDTVf",justifyCenter:"style_justifyCenter__uOac9",centered:"style_centered__jpqq_",resultMessage:"style_resultMessage__44kKj",inputNumber:"style_inputNumber__kIE_i"}},61681:function(e){e.exports={tagStyle:"styles_tagStyle__jHxNh"}},87409:function(e){e.exports={modalBody:"style_modalBody__TPrd4",modal:"style_modal__7OUIw",customPrimaryButton:"style_customPrimaryButton__KMl38"}},97069:function(e){e.exports={pressed:"styles_pressed__codLz"}},97871:function(e){e.exports={cardContent:"styles_cardContent___xUxd",cardHeading:"styles_cardHeading__awdwB",alignIcon:"styles_alignIcon__lgcl6",linkContent:"styles_linkContent__SRJjC"}},85688:function(e){e.exports={cardHeading:"styles_cardHeading__b4qt0",tags:"styles_tags__LtxF0"}},76658:function(e){e.exports={alert:"styles_alert__jJnDl"}}},function(e){e.O(0,[94976,97948,95445,32013,30260,84617,85937,3874,36556,56158,23636,25675,12386,69843,48301,97538,64713,73818,39517,2307,1852,56590,74806,19317,28465,31132,44563,29111,50676,66343,46602,57326,30359,53248,49774,92888,40179],function(){return e(e.s=73860)}),_N_E=e.O()}]);

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.