@s_mart/minha-conta 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +34 -30
- package/dist/index.mjs +34 -30
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
var
|
|
2
|
-
background-color: ${
|
|
1
|
+
var x4=Object.defineProperty,P4=Object.defineProperties;var S4=Object.getOwnPropertyDescriptors;var Q1=Object.getOwnPropertySymbols;var u2=Object.prototype.hasOwnProperty,Z2=Object.prototype.propertyIsEnumerable;var v2=(a,e,c)=>e in a?x4(a,e,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[e]=c,M=(a,e)=>{for(var c in e||(e={}))u2.call(e,c)&&v2(a,c,e[c]);if(Q1)for(var c of Q1(e))Z2.call(e,c)&&v2(a,c,e[c]);return a},C=(a,e)=>P4(a,S4(e));var J1=(a,e)=>{var c={};for(var i in a)u2.call(a,i)&&e.indexOf(i)<0&&(c[i]=a[i]);if(a!=null&&Q1)for(var i of Q1(a))e.indexOf(i)<0&&Z2.call(a,i)&&(c[i]=a[i]);return c};var H=(a,e,c)=>new Promise((i,n)=>{var r=s=>{try{o(c.next(s))}catch(h){n(h)}},t=s=>{try{o(c.throw(s))}catch(h){n(h)}},o=s=>s.done?i(s.value):Promise.resolve(s.value).then(r,t);o((c=c.apply(a,e)).next())});import{cloneElement as C5}from"react";import{Grid as d2,Tab as b5}from"@s_mart/core";import{useEffect as W4}from"react";import $4 from"jwt-decode";import{Backdrop as L4,CircularProgress as D4}from"@s_mart/core";import{jsx as g2}from"react/jsx-runtime";function A4({show:a}){return g2(L4,{open:a,style:{zIndex:1e4},children:g2(D4,{size:50,sx:{color:e=>e.palette.primary.main}})})}var f2=A4;import{create as R4}from"zustand";var T0={axiosInstance:null,ready:!1,tabAtiva:"minhaEmpresa",sistemaNome:"",telefoneSuporte:"",minhaEmpresa:{alterarEmailDialogImage:""},meuPlano:{},recursosDialog:{},planosDialog:{}};var k4=R4(a=>C(M({},T0),{setValues:e=>a(e),setTabAtiva:e=>a({tabAtiva:e}),resetState:()=>a(T0)})),Z=k4;import{create as E4}from"zustand";var T4=a=>{var c,i;let e=[];return typeof a!="object"||(Array.isArray(a)&&typeof a[0]=="string"?e=a:Array.isArray(a.errors)?e=a.errors:typeof a.errors=="string"?e=[a.errors]:typeof a.error=="string"?e=[a.error]:typeof a.erro=="string"?e=[a.erro]:(c=a.erro)!=null&&c.mensagem?e=[a.erro.mensagem]:typeof a.message=="string"?e=[a.message]:typeof a.mensagem=="string"?e=[a.mensagem]:typeof((i=a.authErrors)==null?void 0:i[0])=="string"&&(e=a.authErrors)),e},M2=T4;var E0={loading:!1,notification:null};var w4=E4(a=>C(M({},E0),{setLoading:e=>a({loading:e}),toggleNotification:e=>a({notification:e}),handleErrors:e=>{let c=M2(e);a({loading:!1,notification:{title:c[0],variant:"error",autoHideDuration:5e3}})},resetState:()=>a(E0)})),V=w4;import{useEffect as I4}from"react";import{useNotification as G4}from"@s_mart/hooks";var F4={success:"A\xE7\xE3o realizada com sucesso!",warning:"Aten\xE7\xE3o",error:"Algum problema ocorreu"},B4=()=>{let a=V(i=>i.notification),e=V(i=>i.toggleNotification),c=G4();I4(()=>{a&&c.setNotification({title:a.title||F4[a.variant||"success"],message:a.message,variant:a.variant,autoHideDuration:a.autoHideDuration,onClose:(i,n)=>{var r;n!=="clickaway"&&((r=a.onClose)==null||r.call(a),n!=="maxsnack"&&e(null))},style:{minWidth:"19rem",maxWidth:"50rem"}})},[a])},K1=B4;import{create as z4}from"zustand";import H2 from"dayjs";import y2 from"axios";var q4=()=>{let a=Z.getState().axiosInstance;return{fetchMeusDados:()=>a.get("/v2/meus-dados"),updateMeusDados:e=>a.patch("/v2/meus-dados",e),confirmarEmailEmpresa:(e,c)=>y2.post(`${e}/meus-dados/confirmar-atualizacao-do-email-da-empresa/${c}`),confirmarEmailResponsavel:(e,c)=>y2.post(`${e}/meus-dados/confirmar-atualizacao-do-email-do-responsavel/${c}`),fetchMeuPlano:()=>a.get("/v2/meus-dados/meu-plano/recursos"),contratarRecurso:e=>a.patch(`/v2/meus-dados/plano/contratar-recurso/${e}`),descontratarRecurso:e=>a.patch(`/v2/meus-dados/plano/descontratar-recurso/${e}`),buscarPlano:(e,c)=>a.get(`/v2/meus-dados/plano-buscar/${e}`,{params:{periodicidade:c}}),contratarPlano:e=>a.patch("/v2/meus-dados/alterar-plano",e),fetchCobrancas:()=>a.get("/v2/meus-dados/cobrancas"),fetchBoleto:e=>a.get(`/v2/meus-dados/cobrancas/baixar-boleto/${e}`),fetchNfse:e=>a.get(`/v2/meus-dados/cobrancas/baixar-nfse/${e}`)}},I=q4;var a0={codigoGrupo:null,codigoPlano:null,dataContratacao:null,descricaoPlano:null,diasCarencia:null,diaVencimentoBoleto:null,nomePlano:null,observacaoPlano:null,periodicidade:null,qtdeBilhetagem:null,recursos:null,tipoAcesso:null,tipoCobranca:null,valor:null,cobrancas:[],fetchedCobrancas:!1,fetchedMeuPlano:!1};var N4=z4((a,e)=>C(M({},a0),{fetchMeuPlano:()=>H(void 0,null,function*(){try{let c=yield I().fetchMeuPlano();c.data&&a(C(M(M({},e().fetchedMeuPlano?a0:{}),c.data),{fetchedMeuPlano:!0,fetchedCobrancas:e().fetchedCobrancas}))}catch(c){V.getState().handleErrors(c)}}),fetchCobrancas:()=>H(void 0,null,function*(){try{let c=yield I().fetchCobrancas();c.data&&a({cobrancas:c.data.sort((i,n)=>H2(n.dataVencimento).unix()-H2(i.dataVencimento).unix()),fetchedCobrancas:!0})}catch(c){V.getState().handleErrors(c)}}),getValorTotalPlano:()=>{var n,r,t;let c=(n=e().valor)!=null?n:0,i=(t=(r=e().recursos)==null?void 0:r.filter(o=>o.recursoContratado).reduce((o,s)=>o+s.valorRecurso,0))!=null?t:0;return c+i},getMeuPlanoData:()=>{let c=M({},e()),i=["cobrancas","fetchedCobrancas","fetchedMeuPlano"],n=Object.entries(c).filter(([r,t])=>typeof t!="function"&&!i.includes(r));return Object.fromEntries(n)},resetState:()=>a(a0)})),y=N4;import{create as O4}from"zustand";var e0={alteracaoDoEmailDaEmpresa:null,alteracaoDoEmailDoResponsavel:null,bairro:null,cep:null,cidade:null,codigoCidade:null,complemento:null,cpfCnpj:null,dataContratacao:null,dataInativacao:null,email:null,emailResponsavel:null,exibirAbaMeuPlano:null,fone:null,foneResponsavel:null,funruralDescricao:null,funruralTipo:null,ie:null,logotipo:null,motivoInativacao:null,nomeFantasia:null,nomeResponsavel:null,numero:null,razaoSocial:null,regimeTributario:null,rntrc:null,rntrcDataVencimento:null,rua:null,situacao:null,tipoPessoa:null,uf:null,fetched:!1};var U4=O4((a,e)=>C(M({},e0),{fetchMinhaEmpresa:()=>H(void 0,null,function*(){try{let c=yield I().fetchMeusDados();c.data&&a(C(M(M({},e0),c.data),{fetched:!0}))}catch(c){V.getState().handleErrors(c)}}),updateMinhaEmpresa:(c,i)=>H(void 0,null,function*(){var n,r;try{yield I().updateMeusDados(c),V.getState().toggleNotification({title:"Dados atualizados com sucesso!",variant:"success"}),(n=i==null?void 0:i.callback)==null||n.call(i),yield e().fetchMinhaEmpresa()}catch(t){(r=i==null?void 0:i.fallback)==null||r.call(i,t),V.getState().handleErrors(t)}}),getMeusDados:()=>{let c=M({},e()),i=["fetched"],n=Object.entries(c).filter(([r,t])=>typeof t!="function"&&!i.includes(r));return Object.fromEntries(n)},resetState:()=>a(e0)})),S=U4;import{Fragment as V2,jsx as C2,jsxs as X4}from"react/jsx-runtime";function j4(a){let e=Z(s=>s.ready),c=V(s=>s.loading),i=Z(s=>s.setValues),n=Z(s=>s.resetState),r=V(s=>s.resetState),t=y(s=>s.resetState),o=S(s=>s.resetState);return K1(),W4(()=>{var g,f;let s,h=(f=(g=a.axiosInstance)==null?void 0:g.defaults.headers.common.Authorization)==null?void 0:f.toString().replace("Bearer ","");if(h)try{s={email:$4(h).email}}catch(v){}return i(C(M({},a),{usuario:s,ready:!0})),()=>{r(),t(),o(),n()}},[]),e?X4(V2,{children:[a.children,C2(f2,{show:c})]}):C2(V2,{})}var y1=j4;import{useMemo as v4}from"react";import{useMediaQuery as y5}from"@s_mart/hooks";import{memo as qa}from"react";import{Divider as O0,Grid as t1,CircularProgress as za}from"@s_mart/core";import{Form as Na}from"@s_mart/form";import{useMediaQuery as Oa}from"@s_mart/hooks";import _4 from"@emotion/styled";import{css as Y4}from"@emotion/react";import{colorPalette as Q4}from"@s_mart/tokens";var O=_4.div`
|
|
2
|
+
background-color: ${Q4.neutral[0]};
|
|
3
3
|
box-shadow: 0px 3px 12px rgba(0, 0, 0, 0.12);
|
|
4
4
|
border-radius: 4px;
|
|
5
|
-
padding:
|
|
5
|
+
padding: 1.5rem;
|
|
6
6
|
|
|
7
7
|
height: ${({height:a})=>a};
|
|
8
8
|
|
|
9
|
-
${({centerContent:a})=>!!a&&
|
|
9
|
+
${({centerContent:a})=>!!a&&Y4`
|
|
10
10
|
display: flex;
|
|
11
11
|
justify-content: center;
|
|
12
12
|
align-items: center;
|
|
13
13
|
`}
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
@media(max-width: 600px) {
|
|
16
|
+
padding: 1rem;
|
|
17
|
+
}
|
|
18
|
+
`;import{Avatar as ea,Button as c0,CircularProgress as ca,Grid as w0,LIcon as I0,Typography as ia}from"@s_mart/core";var b2={description:"M34.5 27.8h-2a1 1 0 0 0-.9 1v6.6h-19v-19h8.5a1 1 0 0 0 1-1v-1.9a1 1 0 0 0-1-.9h-9.5a2.9 2.9 0 0 0-2.8 2.8v21a2.9 2.9 0 0 0 2.8 2.8h21a2.9 2.9 0 0 0 2.8-2.8v-7.6a1 1 0 0 0-1-1Zm3.3-19h-7.6a1.4 1.4 0 0 0-1 2.4l2 2.2-14.4 14.4a1.4 1.4 0 0 0 0 2l1.4 1.4a1.4 1.4 0 0 0 2 0l14.4-14.5 2.2 2.1c.9 1 2.4.3 2.4-1v-7.6a1.4 1.4 0 0 0-1.4-1.4Z",id:"line-external-link-solid"};var x2={description:"M24 8a16 16 0 0 0 0 32 16 16 0 0 0 0-32Zm0 7.1c1.5 0 2.7 1.2 2.7 2.7 0 1.6-1.2 2.7-2.7 2.7a2.6 2.6 0 0 1-2.7-2.7c0-1.5 1.2-2.7 2.7-2.7Zm3.6 16.4c0 .4-.4.8-.8.8h-5.6a.7.7 0 0 1-.8-.8v-1.6c0-.4.3-.7.8-.7h.7V25h-.7a.7.7 0 0 1-.8-.7v-1.6c0-.4.3-.8.8-.8h4c.5 0 .9.4.9.8v6.5h.7c.4 0 .8.3.8.7v1.6Z",id:"line-info-circle-solid"};var P2={description:"M37 39H10c-1.6 0-3-1.6-3-3.6V13.6c0-2 1.4-3.6 3-3.6h27c1.6 0 3 1.6 3 3.6v21.8c0 2-1.4 3.6-3 3.6ZM14.1 14.2c-2 0-3.6 2-3.6 4.3s1.6 4.2 3.6 4.2 3.6-2 3.6-4.2c0-2.4-1.6-4.3-3.6-4.3Zm-3 20h24.7v-8.5l-5.7-6.6a.7.7 0 0 0-1 0l-8.8 10.2-3.6-4.2a.7.7 0 0 0-1 0L11 30.5v3.7Z",id:"line-picture-solid"};var S2={description:"M36.5 26.7 39 14.5c.1-1-.4-1.8-1.3-1.8H17.3l-.5-2.6c-.1-.6-.6-1.1-1.2-1.1h-5.3C9.6 9 9 9.6 9 10.4v1c0 .7.6 1.3 1.3 1.3h3.6L17.5 33c-.8.5-1.4 1.6-1.4 2.8 0 1.8 1.3 3.3 2.9 3.3 1.6 0 3-1.5 3-3.3 0-.9-.4-1.7-1-2.3h11c-.6.6-1 1.4-1 2.3 0 1.8 1.4 3.3 3 3.3s3-1.5 3-3.3c0-1.3-.8-2.4-1.7-3l.3-1.4c.1-.8-.5-1.7-1.3-1.7h-14l-.3-1.9h15.3c.6 0 1-.4 1.2-1Z",id:"line-shopping-card-solid"};var H1={description:"M22.3 9a2 2 0 0 1 3.4 0l4.3 7.8 9.1 1.5a2 2 0 0 1 1.2 3.3l-6 6.7 1.4 9.6A2 2 0 0 1 33 40l-9-4-9 4a2 2 0 0 1-2.7-2.1l1.4-9.6-6-6.7a2 2 0 0 1 1.2-3.3l9-1.5L22.4 9Z",id:"line-start-solid"};var V1={description:"M30.4 17.1A9.4 9.4 0 0 0 15 21.7c0 .3-.4.5-.7.5H11a.7.7 0 0 1-.6-.8A13.9 13.9 0 0 1 33.6 14l2-2c.8-.9 2.3-.3 2.3 1v7.4c0 .8-.6 1.4-1.4 1.4H29a1.3 1.3 0 0 1-1-2.3l2.4-2.4Zm-19 9.1H19c1.2 0 1.8 1.5 1 2.3L17.5 31A9.4 9.4 0 0 0 33 26.3c0-.3.4-.5.7-.5H37c.4 0 .7.4.6.8A13.9 13.9 0 0 1 14.4 34l-2 2c-.8.9-2.3.3-2.3-1v-7.4c0-.8.6-1.4 1.4-1.4Z",id:"line-sync-solid"};var L2={description:"M35.1 12.2h-6.4l-.5-1a1.3 1.3 0 0 0-1.1-.7h-6.2a1.3 1.3 0 0 0-1.1.7l-.5 1h-6.4c-.3 0-.5 0-.6.2l-.3.6v1.7c0 .2 0 .5.3.6.1.2.3.3.6.3H35c.3 0 .5-.1.6-.3.2-.1.3-.4.3-.6V13c0-.2 0-.4-.3-.6a.9.9 0 0 0-.6-.2Zm-20.3 23c0 .6.4 1.2.9 1.6.4.5 1 .7 1.7.7h13.2c.6 0 1.3-.2 1.7-.7.5-.4.8-1 .9-1.7l1-17.9H13.8l1.2 18Z",id:"line-trash-solid"};import{colorPalette as A2}from"@s_mart/tokens";import{useMediaQuery as oa}from"@s_mart/hooks";import{useDropzone as J4}from"react-dropzone";import{useFormContext as K4}from"react-hook-form";var aa=()=>{let{open:a,getInputProps:e}=J4({noKeyboard:!0,multiple:!1,accept:{"image/jpeg":[".jpeg",".jpg"],"image/png":[".png"]},onDrop:h}),c=S(v=>v.nomeFantasia),i=S(v=>v.razaoSocial),n=V(v=>v.toggleNotification),{setValue:r,watch:t,formState:{isSubmitting:o}}=K4(),s=t("logo");function h(v){let l=v==null?void 0:v[0];if(!l)return n({title:"Selecione um arquivo v\xE1lido",message:"Formatos v\xE1lidos: PNG, JPG e JPEG",variant:"warning",autoHideDuration:1e4});if(!l.type.startsWith("image/"))return n({title:"Formato de imagem inv\xE1lido",variant:"warning"});if(l.size>2e5)return n({title:"Arquivo muito grande (m\xE1ximo 200kB)",variant:"warning",autoHideDuration:5e3});let d=new FileReader;d.onload=()=>{var u;if(!d.result)return console.log("Ocorreu um erro ao ler o arquivo");r("logo",{conteudo:(u=d.result)==null?void 0:u.toString().replace(`data:${l.type};base64,`,""),nome:l.name,mimetype:l.type,tamanho:l.size})},d.readAsDataURL(l)}return{open:a,getInputProps:e,logo:s,getIniciaisEmpresa:()=>(c||i||"").split(" ").map(l=>l[0]).join("").substring(0,2).toUpperCase(),onRemoverLogo:()=>r("logo",void 0),isSubmitting:o}},D2=aa;import{Fragment as la,jsx as U,jsxs as I1}from"react/jsx-runtime";function R2(){let{open:a,getInputProps:e,logo:c,onRemoverLogo:i,getIniciaisEmpresa:n,isSubmitting:r}=D2(),t=oa("(max-width:600px)");return I1(w0,{container:!0,spacing:2,justifyContent:"space-between",flexWrap:t?"wrap-reverse":void 0,children:[I1(w0,{item:!0,display:"flex",alignItems:"center",gap:t?"0.5rem":"1rem",children:[U(ea,{src:c?`data:${c.mimetype};base64,${c.conteudo}`:void 0,sx:{borderRadius:t?"10px":"16px",height:t?"3rem":"4rem",width:t?"3rem":"4rem",backgroundColor:A2.neutral[100]},alt:"Logotipo/empresa",children:!c&&n()}),U("input",M({},e())),c?I1(la,{children:[U(c0,{type:"button",variant:"neutral",startIcon:t?void 0:U(I0,{icon:V1}),onClick:a,children:"Alterar logo"}),U(c0,{type:"button",variant:"outlined",color:"error",startIcon:t?void 0:U(I0,{icon:L2}),onClick:i,children:"Remover"})]}):I1("div",{children:[U(c0,{type:"button",variant:"neutral",startIcon:U(I0,{icon:P2}),onClick:a,children:"Adicionar logo"}),I1(ia,{variant:"bodyXXS",color:A2.neutral[100],style:{display:"block",marginTop:"0.3rem"},children:["Utilize imagens no formato .jpg, .png ou .jpeg com",U("br",{})," tamanho recomendado de 300x160 pixels."]})]})]}),U(w0,{item:!0,xs:12,sm:"auto",children:U(c0,{type:"submit",size:"large",disabled:r,endIcon:r&&U("div",{style:{display:"flex"},children:U(ca,{size:"1rem",sx:{color:"#FFF"}})}),fullWidth:t,children:"Salvar informa\xE7\xF5es"})})]})}import{CircularProgress as da,Grid as c1,LIcon as ha,Tooltip as pa,Typography as T2}from"@s_mart/core";import{TextField as p1,DatePicker as va}from"@s_mart/form";import{cpfCnpj as ua,composeValidators as F0,required as G1,email as Za,telefone as ga}from"@s_mart/rules";import ra from"@emotion/styled";import{Typography as na}from"@s_mart/core";var G0=ra(na)`
|
|
15
19
|
color: ${a=>{var e,c,i;return(i=(c=(e=a==null?void 0:a.theme)==null?void 0:e.palette)==null?void 0:c.primary)==null?void 0:i.main}};
|
|
16
20
|
cursor: pointer;
|
|
17
21
|
|
|
@@ -19,37 +23,37 @@ var V4=Object.defineProperty,C4=Object.defineProperties;var b4=Object.getOwnProp
|
|
|
19
23
|
text-decoration: none;
|
|
20
24
|
color: ${a=>{var e,c,i;return(i=(c=(e=a==null?void 0:a.theme)==null?void 0:e.palette)==null?void 0:c.primary)==null?void 0:i.main}};
|
|
21
25
|
}
|
|
22
|
-
`;import{useFormContext as oa}from"react-hook-form";import la from"dayjs";var J1=()=>{let a=v.getState().axiosInstance;return{fetchRntrc:e=>a.get(`/v2/rntrc?cnpj=${e}`),fetchCep:e=>a.get(`/v2/cep/${e}`),fetchCidades:e=>a.get(`/v2/cidades?search=${e}`)}};var ra=()=>{let a=v(p=>p.minhaEmpresa.camposAdicionais),e=v(p=>{var Z;return(Z=p.usuario)==null?void 0:Z.email}),c=A(p=>p.emailResponsavel),i=A(p=>p.cpfCnpj),r=A(p=>p.alteracaoDoEmailDaEmpresa),l=V(p=>p.toggleNotification),h=V(p=>p.handleErrors),{setValue:o,watch:d,getValues:u}=oa(),{fetchRntrc:g}=J1(),f=d("flags.fetchingRntrc");return{onAtualizarRntrc:()=>y(void 0,null,function*(){if(!(f||!i))try{o("flags.fetchingRntrc",!0);let p=yield g(i);if(p.data){let Z=u("empresa.rntrc"),D=u("empresa.rntrcDataVencimento"),G=la(p.data.data_validade,"DD/MM/YYYY");o("empresa.rntrc",p.data.rntrc),o("empresa.rntrcDataVencimento",G),p.data.rntrc===Z&&(D!=null&&D.isSame(G))?l({title:"Seu RNTRC est\xE1 atualizado",variant:"success"}):l({title:"RNTRC foi atualizado com sucesso",variant:"success"})}}catch(p){h(p)}finally{o("flags.fetchingRntrc",!1)}}),camposAdicionais:a,fetchingRntrc:f,usuarioResponsavel:!!e&&!!c&&e===c,alteracaoDoEmailDaEmpresa:r}},D2=ra;import{jsx as P,jsxs as V1}from"react/jsx-runtime";function R2(){let{camposAdicionais:a,fetchingRntrc:e,onAtualizarRntrc:c,usuarioResponsavel:i,alteracaoDoEmailDaEmpresa:r}=D2();return V1(e1,{container:!0,spacing:2,children:[V1(e1,{item:!0,xs:12,children:[P(A2,{variant:"titleSM",children:"Dados da empresa"}),!!r&&P(sa,{placement:"top-start",title:V1(A2,{variant:"titleXS",children:["Altera\xE7\xE3o de e-mail da empresa solicitada.",P("br",{})," Pendente a confirma\xE7\xE3o de e-mail."]}),children:P("div",{style:{display:"inline"},children:P(ta,{icon:y1,top:"4px"})})})]}),P(e1,{item:!0,xs:12,md:6,children:P(v1,{name:"empresa.cpfCnpj",label:"CNPJ",mask:"cpfCnpj",disabled:!0,required:!0,rules:T0([w1,ha])})}),P(e1,{item:!0,xs:12,md:6,children:P(v1,{name:"empresa.razaoSocial",label:"Raz\xE3o social",required:!0,rules:w1})}),P(e1,{item:!0,xs:12,md:4,children:P(v1,{name:"empresa.nomeFantasia",label:"Nome fantasia",required:!0,rules:w1})}),P(e1,{item:!0,xs:12,md:4,children:P(v1,{name:"empresa.email",label:"E-mail da empresa",disabled:!i,required:!0,rules:T0([w1,da])})}),P(e1,{item:!0,xs:12,md:4,children:P(v1,{name:"empresa.fone",label:"Telefone da empresa",mask:"telefone",required:!0,rules:T0([w1,pa])})}),(a==null?void 0:a.ie)&&P(e1,C(M({item:!0,xs:12,md:4},a.ie.grid),{children:P(v1,{name:"empresa.ie",label:"Inscri\xE7\xE3o estadual",required:a.ie.required,rules:a.ie.rules})})),(a==null?void 0:a.rntrc)&&V1(e1,C(M({item:!0,xs:12,sm:6,md:4},a.rntrc.grid),{children:[P(v1,{name:"empresa.rntrc",label:"RNTRC",mask:"numero",disabled:e,required:a.rntrc.required,rules:a.rntrc.rules,inputProps:{maxLength:8}}),V1(k0,{variant:"bodyXXS",onClick:c,children:["Atualizar RNTRC",e&&P(na,{size:"0.5rem",thickness:5,style:{marginLeft:"0.3rem"}})]})]})),(a==null?void 0:a.rntrcVencimento)&&V1(e1,C(M({item:!0,xs:12,sm:6,md:4},a.rntrcVencimento.grid),{children:[P(ma,{name:"empresa.rntrcDataVencimento",label:"Vencimento",disabled:e,required:a.rntrcVencimento.required,rules:a.rntrcVencimento.rules}),P(k0,{variant:"bodyXXS",children:P("a",{href:"https://consultapublica.antt.gov.br/Site/ConsultaRNTRC.aspx/ConsultaPublica/",target:"_blank",rel:"noopener noreferrer",children:"Consultar site da ANTT"})})]}))]})}import{CircularProgress as Ha,Grid as r1,Typography as ya}from"@s_mart/core";import{Autocomplete as Va,TextField as I1}from"@s_mart/form";import{cep as Ca,composeValidators as ba,required as G1}from"@s_mart/rules";import{useMemo as va,useState as ua}from"react";import{cep as Za}from"@s_mart/rules";import{useFormContext as ga}from"react-hook-form";import fa from"lodash/debounce";var Ma=()=>{let a=V(t=>t.handleErrors),{watch:e,getValues:c,setValue:i}=ga(),[r,l]=ua([]),{fetchCep:h,fetchCidades:o}=J1(),d=e("flags.fetchingCep"),u=t=>y(void 0,null,function*(){let p=t.replace(/\D/g,"");if(p&&!Za.validate.cep(p)&&p!==c("flags.ultimoCepBuscado"))try{i("flags.fetchingCep",!0);let Z=yield h(p);Z.data.codigo_ibge&&i("endereco.cidade",{label:`${Z.data.cidade}/${Z.data.uf}`,value:{codigo:Z.data.codigo_ibge,nome:Z.data.cidade,uf:Z.data.uf}}),Z.data.bairro&&i("endereco.bairro",Z.data.bairro),Z.data.logradouro&&i("endereco.rua",Z.data.logradouro),Z.data.complemento&&i("endereco.complemento",Z.data.complemento),i("flags.ultimoCepBuscado",p)}catch(Z){}finally{i("flags.fetchingCep",!1)}}),g=t=>y(void 0,null,function*(){var p;try{let Z=yield o(t);l((p=Z.data)==null?void 0:p.map(D=>({label:`${D.nome}/${D.uf}`,value:{codigo:D.codigo,nome:D.nome,uf:D.uf}})))}catch(Z){a(Z)}}),f=va(()=>fa(g,500),[]);return{onChangeCep:u,fetchingCep:d,onChangeInputCidades:f,onFocusInputCidades:()=>!r.length&&g(""),cidades:r}},k2=Ma;import{jsx as I,jsxs as xa}from"react/jsx-runtime";function T2(){let{onChangeCep:a,fetchingCep:e,onChangeInputCidades:c,onFocusInputCidades:i,cidades:r}=k2();return xa(r1,{container:!0,spacing:2,children:[I(r1,{item:!0,xs:12,children:I(ya,{variant:"titleSM",children:"Endere\xE7o"})}),I(r1,{item:!0,xs:12,md:4,children:I(I1,{name:"endereco.cep",label:"CEP",mask:"cep",disabled:e,required:!0,rules:ba([G1,Ca]),onInputChange:a,InputProps:{endAdornment:e&&I("div",{style:{display:"flex"},children:I(Ha,{thickness:6,size:"1.5rem"})})}})}),I(r1,{item:!0,xs:12,md:4,children:I(Va,{name:"endereco.cidade",label:"Cidade/UF",options:r,onInputChange:c,onFocus:i,noOptionsText:"Nenhuma cidade encontrada",disabled:e,required:!0,rules:G1})}),I(r1,{item:!0,xs:12,md:4,children:I(I1,{name:"endereco.bairro",label:"Bairro",disabled:e,required:!0,rules:G1})}),I(r1,{item:!0,xs:12,md:4,children:I(I1,{name:"endereco.rua",label:"Rua",disabled:e,required:!0,rules:G1})}),I(r1,{item:!0,xs:12,md:4,children:I(I1,{name:"endereco.numero",label:"N\xFAmero",disabled:e,required:!0,rules:G1})}),I(r1,{item:!0,xs:12,md:4,children:I(I1,{name:"endereco.complemento",label:"Complemento",disabled:e})})]})}import{Grid as F1,LIcon as Pa,Tooltip as Sa,Typography as E2}from"@s_mart/core";import{TextField as E0}from"@s_mart/form";import{composeValidators as w2,email as La,required as w0,telefone as Da}from"@s_mart/rules";import{jsx as X,jsxs as I0}from"react/jsx-runtime";function I2(){let a=v(r=>{var l;return(l=r.usuario)==null?void 0:l.email}),e=A(r=>r.emailResponsavel),c=A(r=>r.alteracaoDoEmailDoResponsavel);return I0(F1,{container:!0,spacing:2,children:[I0(F1,{item:!0,xs:12,children:[X(E2,{variant:"titleSM",children:"Dados do respons\xE1vel"}),!!c&&X(Sa,{placement:"top-start",title:I0(E2,{variant:"titleXS",children:["Altera\xE7\xE3o de respons\xE1vel solicitada.",X("br",{})," Pendente a confirma\xE7\xE3o de e-mail."]}),children:X("div",{style:{display:"inline"},children:X(Pa,{icon:y1,top:"4px"})})})]}),X(F1,{item:!0,xs:12,md:4,children:X(E0,{name:"responsavel.nome",label:"Nome do respons\xE1vel",required:!0,rules:w0})}),X(F1,{item:!0,xs:12,md:4,children:X(E0,{name:"responsavel.email",label:"Email do respons\xE1vel",disabled:!(!!a&&!!e&&a===e),required:!0,rules:w2([w0,La])})}),X(F1,{item:!0,xs:12,md:4,children:X(E0,{name:"responsavel.fone",label:"Telefone do respons\xE1vel",mask:"telefone",required:!0,rules:w2([w0,Da])})})]})}import{useState as Aa}from"react";import{Button as G2,CircularProgress as Ra,Dialog as a0,Grid as C1,Typography as e0}from"@s_mart/core";import{Fragment as G0,jsx as S,jsxs as B1}from"react/jsx-runtime";function F2({onConfirmar:a,onClose:e,confirmado:c,tipo:i,open:r}){let l=v(f=>f.sistemaNome),h=v(f=>f.minhaEmpresa.alterarEmailDialogImage),[o,d]=Aa(!1),u=()=>y(this,null,function*(){d(!0),yield a==null?void 0:a(),d(!1)}),g={empresa:{title:"Alterar e-mail da empresa",content:B1(G0,{children:["O e-mail da empresa \xE9 exibido em documentos fiscais da empresa al\xE9m de receber mensagens importantes e cobran\xE7as do ",l,".",S("br",{}),S("br",{}),"Deseja salvar as altera\xE7\xF5es?"]})},responsavel:{title:"Alterar respons\xE1vel",content:B1(G0,{children:["O respons\xE1vel \xE9 o \xFAnico que pode alterar o e-mail da empresa e dados do respons\xE1vel.",S("br",{}),S("br",{}),"Ao realizar essa altera\xE7\xE3o, voc\xEA perder\xE1 as permiss\xF5es atuais.",S("br",{})," Deseja salvar as altera\xE7\xF5es?"]})}};return B1(a0,{open:r,onClose:e,closeIcon:!o,maxWidth:"xs",disableBackdropClick:o,children:[S(a0.Header,{children:!!i&&g[i].title}),S(a0.Content,{children:S(C1,{container:!0,spacing:2,display:"flex",children:c?B1(G0,{children:[S(C1,{item:!0,xs:12,display:"flex",justifyContent:"center",children:S("img",{src:h,alt:"E-mail"})}),S(C1,{item:!0,xs:12,display:"flex",justifyContent:"center",children:S(e0,{variant:"titleMD",align:"center",children:"Confirme o e-mail para finalizar"})}),S(C1,{item:!0,xs:12,children:S(e0,{variant:"bodyMD",display:"flex",align:"center",children:"Cheque a caixa de entrada do novo e-mail cadastrado para confirmar as altera\xE7\xF5es."})}),S(C1,{item:!0,xs:12,display:"flex",justifyContent:"center",children:S(e0,{variant:"bodyMD",children:"A confirma\xE7\xE3o ir\xE1 expirar em 24h."})})]}):S(C1,{item:!0,xs:12,children:S(e0,{variant:"bodySM",children:!!i&&g[i].content})})})}),!c&&B1(a0.Footer,{children:[S(G2,{variant:"neutral",onClick:e,disabled:o,children:"Voltar"}),S(G2,{onClick:u,disabled:o,endIcon:o&&S("div",{style:{display:"flex"},children:S(Ra,{size:"1rem",sx:{color:"#FFF"}})}),children:"Salvar"})]})]})}import{useEffect as Ta,useState as z2}from"react";import ka from"dayjs";var B2=a=>{let e={empresa:{},endereco:{},responsavel:{},flags:{}};return a.logotipo&&(e.logo=a.logotipo),a.cpfCnpj&&(e.empresa.cpfCnpj=a.cpfCnpj),a.razaoSocial&&(e.empresa.razaoSocial=a.razaoSocial),a.nomeFantasia&&(e.empresa.nomeFantasia=a.nomeFantasia),a.email&&(e.empresa.email=a.email),a.fone&&(e.empresa.fone=a.fone),a.ie&&(e.empresa.ie=a.ie),a.rntrc&&(e.empresa.rntrc=a.rntrc),a.rntrcDataVencimento&&a.rntrcDataVencimento!=="0001-01-01T00:00:00Z"&&(e.empresa.rntrcDataVencimento=ka(a.rntrcDataVencimento)),a.cep&&(e.endereco.cep=a.cep,e.flags.ultimoCepBuscado=a.cep),a.cidade&&a.codigoCidade&&a.uf&&(e.endereco.cidade={label:`${a.cidade}/${a.uf}`,value:{codigo:a.codigoCidade,nome:a.cidade,uf:a.uf}}),a.bairro&&(e.endereco.bairro=a.bairro),a.rua&&(e.endereco.rua=a.rua),a.numero&&(e.endereco.numero=a.numero),a.complemento&&(e.endereco.complemento=a.complemento),a.nomeResponsavel&&(e.responsavel.nome=a.nomeResponsavel),a.emailResponsavel&&(e.responsavel.email=a.emailResponsavel),a.foneResponsavel&&(e.responsavel.fone=a.foneResponsavel),e},q2=a=>{var c;let e={};if(a.empresa){let i=a.empresa;i.razaoSocial&&(e.razaoSocial=i.razaoSocial.trim()),i.nomeFantasia&&(e.nomeFantasia=i.nomeFantasia.trim()),i.email&&(e.email=i.email.toLowerCase().trim()),i.ie&&(e.ie=i.ie),i.fone&&(e.fone=i.fone),e.rntrc=i.rntrc||"null",i.rntrcDataVencimento?e.rntrcDataVencimento=i.rntrcDataVencimento.toISOString():e.rntrcDataVencimento="0001-01-01T00:00:00Z"}if(a.endereco){let i=a.endereco;i.cep&&(e.cep=i.cep),i.bairro&&(e.bairro=i.bairro),i.rua&&(e.rua=i.rua),i.numero&&(e.numero=i.numero),i.complemento&&(e.complemento=i.complemento),(c=i.cidade)!=null&&c.value&&(e.codigoCidade=i.cidade.value.codigo)}if(a.responsavel){let i=a.responsavel;i.nome&&(e.nomeResponsavel=i.nome.trim()),i.email&&(e.emailResponsavel=i.email.toLowerCase().trim()),i.fone&&(e.foneResponsavel=i.fone)}return a.logo&&(e.logotipo={conteudo:a.logo.conteudo,nome:a.logo.nome,mimetype:a.logo.mimetype,tamanho:a.logo.tamanho}),e};var Ea=()=>{let a=A(t=>t.fetched),e=A(t=>t.email),c=A(t=>t.emailResponsavel),i=A(t=>t.getMeusDados),r=A(t=>t.fetchMinhaEmpresa),l=A(t=>t.updateMinhaEmpresa),h=v(t=>t.minhaEmpresa.onDadosAtualizadosComSucesso),[o,d]=z2(null),[u,g]=z2({open:!1,tipo:"empresa"});Ta(()=>{a?d(B2(i())):r()},[a]);let f=(t,p)=>y(void 0,null,function*(){let Z=q2(t);yield l(Z,{callback:()=>{h==null||h(Z),p&&g(j=>C(M({},j),{confirmado:!0}))},fallback:()=>p&&g(j=>C(M({},j),{open:!1}))})});return{onFormSubmit:t=>y(void 0,null,function*(){var p,Z;if((e==null?void 0:e.toLowerCase().trim())!==((p=t.empresa.email)==null?void 0:p.toLowerCase().trim()))return g({open:!0,tipo:"empresa",confirmado:!1,onConfirmar:()=>f(t,!0)});if((c==null?void 0:c.toLowerCase().trim())!==((Z=t.responsavel.email)==null?void 0:Z.toLowerCase().trim()))return g({open:!0,tipo:"responsavel",confirmado:!1,onConfirmar:()=>f(t,!0)});yield f(t)}),initialValues:o,confirmarEmailDialog:u,setConfirmarEmailDialog:g}},N2=Ea;import{jsx as k,jsxs as O2}from"react/jsx-runtime";function Fa(){let{onFormSubmit:a,initialValues:e,confirmarEmailDialog:c,setConfirmarEmailDialog:i}=N2();return e?O2(Ga,{onSubmit:a,defaultValues:e,children:[k(N,{children:O2(n1,{container:!0,spacing:3,children:[k(n1,{item:!0,xs:12,children:k(L2,{})}),k(n1,{item:!0,xs:12,children:k(F0,{})}),k(n1,{item:!0,xs:12,children:k(R2,{})}),k(n1,{item:!0,xs:12,children:k(F0,{})}),k(n1,{item:!0,xs:12,children:k(T2,{})}),k(n1,{item:!0,xs:12,children:k(F0,{})}),k(n1,{item:!0,xs:12,children:k(I2,{})})]})}),k(F2,{open:c.open,tipo:c==null?void 0:c.tipo,confirmado:c==null?void 0:c.confirmado,onClose:()=>i(r=>C(M({},r),{open:!1})),onConfirmar:c==null?void 0:c.onConfirmar})]}):k(N,{centerContent:!0,height:"75vh",children:k(Ia,{})})}var U2=wa(Fa);import{memo as t5}from"react";import{Grid as t4}from"@s_mart/core";import{useState as Be}from"react";import{Button as X3,CircularProgress as qe,Grid as N1,LIcon as _3,Typography as m1}from"@s_mart/core";import{decimal as ze,valor as Y3}from"@s_mart/masks";import{colorPalette as Q3}from"@s_mart/tokens";import{useMediaQuery as Ne}from"@s_mart/hooks";import{Button as ae,CircularProgress as ee,Dialog as u0,Divider as p3,Grid as i1,LIcon as ce,Typography as v3}from"@s_mart/core";var c0={description:"M24.6 7.6a17 17 0 1 0 0 34 17 17 0 0 0 0-34Zm0 3.3a13.7 13.7 0 1 1 0 27.4 13.7 13.7 0 0 1 0-27.4Zm9.6 9-1.5-1.6a.8.8 0 0 0-1.2 0l-9.7 9.6-4-4.1a.8.8 0 0 0-1.2 0L15 25.3a1 1 0 0 0 0 1.2l6.2 6.3c.4.3.9.3 1.2 0L34.2 21c.4-.3.4-.8 0-1.1Z",id:"line-check-circle-regular"};var $2={description:"m27 36.9 1.2-1.1a1 1 0 0 0 0-1L18 24.6l10.2-10.3a1 1 0 0 0 0-1l-1.2-1c-.2-.4-.6-.4-1 0L14.5 24c-.3.2-.3.6 0 1L26 36.8c.3.3.7.3 1 0Z",id:"line-chevron-left-regular"},W2={description:"m19.9 12.2-1.1 1c-.3.4-.3.8 0 1l10 10.3-10 10.3c-.3.3-.3.7 0 1l1 1c.3.4.7.4 1 0L32.5 25c.3-.3.3-.7 0-1L20.8 12.3c-.3-.3-.7-.3-1 0Z",id:"line-chevron-right-regular"};var j2={description:"M31 25.9H17c-.2 0-.4.2-.4.4v2c0 .2.2.4.4.4h14c.2 0 .4-.2.4-.5v-1.9c0-.2-.2-.4-.4-.4Zm3.3-16.6-2.6 1.9-2.2-1.7c-1-.7-2.3-.7-3.3 0L24 11.2l-2.2-1.7a2.8 2.8 0 0 0-3.3 0l-2.2 1.7-2.6-1.9c-1.1-.8-2.7 0-2.7 1.5v26.4c0 1.4 1.6 2.3 2.7 1.5l2.6-1.9 2.2 1.7c1 .7 2.3.7 3.3 0l2.2-1.7 2.2 1.7c1 .7 2.3.7 3.3 0l2.2-1.7 2.6 1.9c1.1.8 2.7 0 2.7-1.5V10.8c0-1.4-1.6-2.3-2.7-1.5Zm0 25.9-2.6-1.8-3.8 2.8-4-2.8-3.8 2.8-3.8-2.8-2.5 1.8V12.8l2.5 1.8 3.8-2.8 4 2.8 3.8-2.8 3.8 2.8 2.5-1.8v22.4ZM31 19.3H17c-.2 0-.4.2-.4.5v1.9c0 .2.2.4.4.4h14c.2 0 .4-.2.4-.4v-2c0-.2-.2-.4-.4-.4Z",id:"line-receipt-regular"};var i0={description:"M35.2 12.7a15.9 15.9 0 0 0-25 19.1L8 40l8.4-2.2a16 16 0 0 0 23.6-14 16 16 0 0 0-4.8-11.1ZM24 37a13 13 0 0 1-6.7-1.9l-.5-.3-5 1.3 1.3-4.8-.3-.5a13.2 13.2 0 0 1 20.5-16.3c2.5 2.4 4 5.7 4 9.3C37.3 31 31.3 37 24 37Zm7.2-10-2.7-1c-.4-.1-.6-.2-.9.2l-1.2 1.5c-.3.3-.5.3-.9.1-2.3-1.1-3.9-2-5.4-4.7-.4-.7.4-.6 1.2-2.1v-.7c-.2-.2-1-2.2-1.3-3-.3-.7-.6-.6-.9-.6h-.7c-.3 0-.7 0-1 .4-.4.4-1.5 1.4-1.5 3.3 0 2 1.5 3.9 1.6 4.1.2.3 2.8 4.3 6.8 6 2.5 1.1 3.5 1.2 4.8 1 .7 0 2.3-1 2.6-1.9.4-.9.4-1.7.3-1.9l-.8-.4Z",id:"line-whatsapp-regular"};import{colorPalette as z0}from"@s_mart/tokens";import{useState as Ba}from"react";var qa=a=>{let[e,c]=Ba(!0);return{open:e,onCloseDialog:()=>{c(!1),setTimeout(()=>a(),100)}}},W=qa;var za=a=>{let e=`https://api.whatsapp.com/send?phone=${a}`;window.open(e,"_blank","noopener noreferrer")},o0=za;import{Button as K2,LIcon as J2,Tooltip as Na,Typography as b1}from"@s_mart/core";import{valor as Oa}from"@s_mart/masks";import{colorPalette as a3}from"@s_mart/tokens";import Ua from"dayjs";import{css as X2}from"@emotion/react";import B0 from"@emotion/styled";import{colorPalette as l0}from"@s_mart/tokens";var _2=B0.div`
|
|
26
|
+
`;import{useFormContext as ta}from"react-hook-form";import sa from"dayjs";var i0=()=>{let a=Z.getState().axiosInstance;return{fetchRntrc:e=>a.get(`/v2/rntrc?cnpj=${e}`),fetchCep:e=>a.get(`/v2/cep/${e}`),fetchCidades:e=>a.get(`/v2/cidades?search=${e}`)}};var ma=()=>{let a=Z(d=>d.minhaEmpresa.camposAdicionais),e=Z(d=>{var u;return(u=d.usuario)==null?void 0:u.email}),c=S(d=>d.emailResponsavel),i=S(d=>d.cpfCnpj),n=S(d=>d.alteracaoDoEmailDaEmpresa),r=V(d=>d.toggleNotification),t=V(d=>d.handleErrors),{setValue:o,watch:s,getValues:h}=ta(),{fetchRntrc:g}=i0(),f=s("flags.fetchingRntrc");return{onAtualizarRntrc:()=>H(void 0,null,function*(){if(!(f||!i))try{o("flags.fetchingRntrc",!0);let d=yield g(i);if(d.data){let u=h("empresa.rntrc"),x=h("empresa.rntrcDataVencimento"),F=sa(d.data.data_validade,"DD/MM/YYYY");o("empresa.rntrc",d.data.rntrc),o("empresa.rntrcDataVencimento",F),d.data.rntrc===u&&(x!=null&&x.isSame(F))?r({title:"Seu RNTRC est\xE1 atualizado",variant:"success"}):r({title:"RNTRC foi atualizado com sucesso",variant:"success"})}}catch(d){t(d)}finally{o("flags.fetchingRntrc",!1)}}),camposAdicionais:a,fetchingRntrc:f,usuarioResponsavel:!!e&&!!c&&e===c,alteracaoDoEmailDaEmpresa:n}},k2=ma;import{jsx as D,jsxs as C1}from"react/jsx-runtime";function E2(){let{camposAdicionais:a,fetchingRntrc:e,onAtualizarRntrc:c,usuarioResponsavel:i,alteracaoDoEmailDaEmpresa:n}=k2();return C1(c1,{container:!0,spacing:2,children:[C1(c1,{item:!0,xs:12,children:[D(T2,{variant:"titleSM",children:"Dados da empresa"}),!!n&&D(pa,{placement:"top-start",title:C1(T2,{variant:"titleXS",children:["Altera\xE7\xE3o de e-mail da empresa solicitada.",D("br",{})," Pendente a confirma\xE7\xE3o de e-mail."]}),children:D("div",{style:{display:"inline"},children:D(ha,{icon:V1,top:"4px"})})})]}),D(c1,{item:!0,xs:12,md:6,children:D(p1,{name:"empresa.cpfCnpj",label:"CNPJ",mask:"cpfCnpj",disabled:!0,required:!0,rules:F0([G1,ua])})}),D(c1,{item:!0,xs:12,md:6,children:D(p1,{name:"empresa.razaoSocial",label:"Raz\xE3o social",required:!0,rules:G1})}),D(c1,{item:!0,xs:12,md:4,children:D(p1,{name:"empresa.nomeFantasia",label:"Nome fantasia",required:!0,rules:G1})}),D(c1,{item:!0,xs:12,md:4,children:D(p1,{name:"empresa.email",label:"E-mail para recebimento de boletos",disabled:!i,required:!0,rules:F0([G1,Za])})}),D(c1,{item:!0,xs:12,md:4,children:D(p1,{name:"empresa.fone",label:"Telefone da empresa",mask:"telefone",required:!0,rules:F0([G1,ga])})}),(a==null?void 0:a.ie)&&D(c1,C(M({item:!0,xs:12,md:4},a.ie.grid),{children:D(p1,{name:"empresa.ie",label:"Inscri\xE7\xE3o estadual",required:a.ie.required,rules:a.ie.rules})})),(a==null?void 0:a.rntrc)&&C1(c1,C(M({item:!0,xs:12,sm:6,md:4},a.rntrc.grid),{children:[D(p1,{name:"empresa.rntrc",label:"RNTRC",mask:"numero",disabled:e,required:a.rntrc.required,rules:a.rntrc.rules,inputProps:{maxLength:8}}),C1(G0,{variant:"bodyXXS",onClick:c,children:["Atualizar RNTRC",e&&D(da,{size:"0.5rem",thickness:5,style:{marginLeft:"0.3rem"}})]})]})),(a==null?void 0:a.rntrcVencimento)&&C1(c1,C(M({item:!0,xs:12,sm:6,md:4},a.rntrcVencimento.grid),{children:[D(va,{name:"empresa.rntrcDataVencimento",label:"Vencimento",disabled:e,required:a.rntrcVencimento.required,rules:a.rntrcVencimento.rules}),D(G0,{variant:"bodyXXS",children:D("a",{href:"https://consultapublica.antt.gov.br/Site/ConsultaRNTRC.aspx/ConsultaPublica/",target:"_blank",rel:"noopener noreferrer",children:"Consultar site da ANTT"})})]}))]})}import{CircularProgress as ba,Grid as n1,Typography as xa}from"@s_mart/core";import{Autocomplete as Pa,TextField as F1}from"@s_mart/form";import{cep as Sa,composeValidators as La,required as B1}from"@s_mart/rules";import{useMemo as fa,useState as Ma}from"react";import{cep as ya}from"@s_mart/rules";import{useFormContext as Ha}from"react-hook-form";import Va from"lodash/debounce";var Ca=()=>{let a=V(l=>l.handleErrors),{watch:e,getValues:c,setValue:i}=Ha(),[n,r]=Ma([]),{fetchCep:t,fetchCidades:o}=i0(),s=e("flags.fetchingCep"),h=l=>H(void 0,null,function*(){let d=l.replace(/\D/g,"");if(d&&!ya.validate.cep(d)&&d!==c("flags.ultimoCepBuscado"))try{i("flags.fetchingCep",!0);let u=yield t(d);u.data.codigo_ibge&&i("endereco.cidade",{label:`${u.data.cidade}/${u.data.uf}`,value:{codigo:u.data.codigo_ibge,nome:u.data.cidade,uf:u.data.uf}}),u.data.bairro&&i("endereco.bairro",u.data.bairro),u.data.logradouro&&i("endereco.rua",u.data.logradouro),u.data.complemento&&i("endereco.complemento",u.data.complemento),i("flags.ultimoCepBuscado",d)}catch(u){}finally{i("flags.fetchingCep",!1)}}),g=l=>H(void 0,null,function*(){var d;try{let u=yield o(l);r((d=u.data)==null?void 0:d.map(x=>({label:`${x.nome}/${x.uf}`,value:{codigo:x.codigo,nome:x.nome,uf:x.uf}})))}catch(u){a(u)}}),f=fa(()=>Va(g,500),[]);return{onChangeCep:h,fetchingCep:s,onChangeInputCidades:f,onFocusInputCidades:()=>!n.length&&g(""),cidades:n}},w2=Ca;import{jsx as G,jsxs as Da}from"react/jsx-runtime";function I2(){let{onChangeCep:a,fetchingCep:e,onChangeInputCidades:c,onFocusInputCidades:i,cidades:n}=w2();return Da(n1,{container:!0,spacing:2,children:[G(n1,{item:!0,xs:12,children:G(xa,{variant:"titleSM",children:"Endere\xE7o"})}),G(n1,{item:!0,xs:12,md:4,children:G(F1,{name:"endereco.cep",label:"CEP",mask:"cep",disabled:e,required:!0,rules:La([B1,Sa]),onInputChange:a,InputProps:{endAdornment:e&&G("div",{style:{display:"flex"},children:G(ba,{thickness:6,size:"1.5rem"})})}})}),G(n1,{item:!0,xs:12,md:4,children:G(Pa,{name:"endereco.cidade",label:"Cidade/UF",options:n,onInputChange:c,onFocus:i,noOptionsText:"Nenhuma cidade encontrada",disabled:e,required:!0,rules:B1})}),G(n1,{item:!0,xs:12,md:4,children:G(F1,{name:"endereco.bairro",label:"Bairro",disabled:e,required:!0,rules:B1})}),G(n1,{item:!0,xs:12,md:4,children:G(F1,{name:"endereco.rua",label:"Rua",disabled:e,required:!0,rules:B1})}),G(n1,{item:!0,xs:12,md:4,children:G(F1,{name:"endereco.numero",label:"N\xFAmero",disabled:e,required:!0,rules:B1})}),G(n1,{item:!0,xs:12,md:4,children:G(F1,{name:"endereco.complemento",label:"Complemento",disabled:e})})]})}import{Grid as q1,LIcon as Aa,Tooltip as Ra,Typography as G2}from"@s_mart/core";import{TextField as B0}from"@s_mart/form";import{composeValidators as F2,email as ka,required as q0,telefone as Ta}from"@s_mart/rules";import{jsx as _,jsxs as z0}from"react/jsx-runtime";function B2(){let a=Z(n=>{var r;return(r=n.usuario)==null?void 0:r.email}),e=S(n=>n.emailResponsavel),c=S(n=>n.alteracaoDoEmailDoResponsavel);return z0(q1,{container:!0,spacing:2,children:[z0(q1,{item:!0,xs:12,children:[_(G2,{variant:"titleSM",children:"Dados do respons\xE1vel"}),!!c&&_(Ra,{placement:"top-start",title:z0(G2,{variant:"titleXS",children:["Altera\xE7\xE3o de respons\xE1vel solicitada.",_("br",{})," Pendente a confirma\xE7\xE3o de e-mail."]}),children:_("div",{style:{display:"inline"},children:_(Aa,{icon:V1,top:"4px"})})})]}),_(q1,{item:!0,xs:12,md:4,children:_(B0,{name:"responsavel.nome",label:"Nome do respons\xE1vel",required:!0,rules:q0})}),_(q1,{item:!0,xs:12,md:4,children:_(B0,{name:"responsavel.email",label:"Email do respons\xE1vel",disabled:!(!!a&&!!e&&a===e),required:!0,rules:F2([q0,ka])})}),_(q1,{item:!0,xs:12,md:4,children:_(B0,{name:"responsavel.fone",label:"Telefone do respons\xE1vel",mask:"telefone",required:!0,rules:F2([q0,Ta])})})]})}import{useState as Ea}from"react";import{Button as q2,CircularProgress as wa,Dialog as o0,Grid as b1,Typography as l0}from"@s_mart/core";import{useFormContext as Ia}from"react-hook-form";import{Fragment as N0,jsx as L,jsxs as z1}from"react/jsx-runtime";function z2({onConfirmar:a,onClose:e,confirmado:c,tipo:i,open:n}){let r=Z(v=>v.sistemaNome),t=Z(v=>v.minhaEmpresa.alterarEmailDialogImage),[o,s]=Ea(!1),{getValues:h}=Ia(),g=()=>H(this,null,function*(){s(!0),yield a==null?void 0:a(),s(!1)}),f={empresa:{title:"Alterar e-mail",content:z1(N0,{children:["O e-mail ",L("strong",{children:h("empresa.email")})," ser\xE1 atualizado para receber mensagens importantes e boletos do ",r,". Fique atento(a) \xE0 sua caixa de entrada para n\xE3o perder informa\xE7\xF5es essenciais.",L("br",{}),L("br",{}),"Deseja alterar o e-mail?"]})},responsavel:{title:"Alterar respons\xE1vel",content:z1(N0,{children:["O respons\xE1vel \xE9 o \xFAnico que pode alterar o e-mail da empresa e dados do respons\xE1vel.",L("br",{}),L("br",{}),"Ao realizar essa altera\xE7\xE3o, voc\xEA perder\xE1 as permiss\xF5es atuais.",L("br",{})," Deseja salvar as altera\xE7\xF5es?"]})}};return z1(o0,{open:n,onClose:e,closeIcon:!o,maxWidth:"xs",disableBackdropClick:o,children:[L(o0.Header,{children:!!i&&f[i].title}),L(o0.Content,{children:L(b1,{container:!0,spacing:2,display:"flex",children:c?z1(N0,{children:[L(b1,{item:!0,xs:12,display:"flex",justifyContent:"center",children:L("img",{src:t,alt:"E-mail"})}),L(b1,{item:!0,xs:12,display:"flex",justifyContent:"center",children:L(l0,{variant:"titleMD",align:"center",children:"Confirme o e-mail para finalizar"})}),L(b1,{item:!0,xs:12,children:L(l0,{variant:"bodyMD",display:"flex",align:"center",children:"Cheque a caixa de entrada do novo e-mail cadastrado para confirmar as altera\xE7\xF5es."})}),L(b1,{item:!0,xs:12,display:"flex",justifyContent:"center",children:L(l0,{variant:"bodyMD",children:"A confirma\xE7\xE3o ir\xE1 expirar em 24h."})})]}):L(b1,{item:!0,xs:12,children:L(l0,{variant:"bodySM",children:!!i&&f[i].content})})})}),!c&&z1(o0.Footer,{children:[L(q2,{variant:"neutral",onClick:e,disabled:o,children:"Voltar"}),L(q2,{onClick:g,disabled:o,endIcon:o&&L("div",{style:{display:"flex"},children:L(wa,{size:"1rem",sx:{color:"#FFF"}})}),children:"Salvar"})]})]})}import{useEffect as Fa,useState as U2}from"react";import Ga from"dayjs";var N2=a=>{let e={empresa:{},endereco:{},responsavel:{},flags:{}};return a.logotipo&&(e.logo=a.logotipo),a.cpfCnpj&&(e.empresa.cpfCnpj=a.cpfCnpj),a.razaoSocial&&(e.empresa.razaoSocial=a.razaoSocial),a.nomeFantasia&&(e.empresa.nomeFantasia=a.nomeFantasia),a.email&&(e.empresa.email=a.email),a.fone&&(e.empresa.fone=a.fone),a.ie&&(e.empresa.ie=a.ie),a.rntrc&&(e.empresa.rntrc=a.rntrc),a.rntrcDataVencimento&&a.rntrcDataVencimento!=="0001-01-01T00:00:00Z"&&(e.empresa.rntrcDataVencimento=Ga(a.rntrcDataVencimento)),a.cep&&(e.endereco.cep=a.cep,e.flags.ultimoCepBuscado=a.cep),a.cidade&&a.codigoCidade&&a.uf&&(e.endereco.cidade={label:`${a.cidade}/${a.uf}`,value:{codigo:a.codigoCidade,nome:a.cidade,uf:a.uf}}),a.bairro&&(e.endereco.bairro=a.bairro),a.rua&&(e.endereco.rua=a.rua),a.numero&&(e.endereco.numero=a.numero),a.complemento&&(e.endereco.complemento=a.complemento),a.nomeResponsavel&&(e.responsavel.nome=a.nomeResponsavel),a.emailResponsavel&&(e.responsavel.email=a.emailResponsavel),a.foneResponsavel&&(e.responsavel.fone=a.foneResponsavel),e},O2=a=>{var c;let e={};if(a.empresa){let i=a.empresa;i.razaoSocial&&(e.razaoSocial=i.razaoSocial.trim()),i.nomeFantasia&&(e.nomeFantasia=i.nomeFantasia.trim()),i.email&&(e.email=i.email.toLowerCase().trim()),i.ie&&(e.ie=i.ie),i.fone&&(e.fone=i.fone),e.rntrc=i.rntrc||"null",i.rntrcDataVencimento?e.rntrcDataVencimento=i.rntrcDataVencimento.toISOString():e.rntrcDataVencimento="0001-01-01T00:00:00Z"}if(a.endereco){let i=a.endereco;i.cep&&(e.cep=i.cep),i.bairro&&(e.bairro=i.bairro),i.rua&&(e.rua=i.rua),i.numero&&(e.numero=i.numero),i.complemento&&(e.complemento=i.complemento),(c=i.cidade)!=null&&c.value&&(e.codigoCidade=i.cidade.value.codigo)}if(a.responsavel){let i=a.responsavel;i.nome&&(e.nomeResponsavel=i.nome.trim()),i.email&&(e.emailResponsavel=i.email.toLowerCase().trim()),i.fone&&(e.foneResponsavel=i.fone)}return a.logo&&(e.logotipo={conteudo:a.logo.conteudo,nome:a.logo.nome,mimetype:a.logo.mimetype,tamanho:a.logo.tamanho}),e};var Ba=()=>{let a=S(l=>l.fetched),e=S(l=>l.email),c=S(l=>l.emailResponsavel),i=S(l=>l.getMeusDados),n=S(l=>l.fetchMinhaEmpresa),r=S(l=>l.updateMinhaEmpresa),t=Z(l=>l.minhaEmpresa.onDadosAtualizadosComSucesso),[o,s]=U2(null),[h,g]=U2({open:!1,tipo:"empresa"});Fa(()=>{a?s(N2(i())):n()},[a]);let f=(l,d)=>H(void 0,null,function*(){let u=O2(l);yield r(u,{callback:()=>{t==null||t(u),d&&g(X=>C(M({},X),{confirmado:!0}))},fallback:()=>d&&g(X=>C(M({},X),{open:!1}))})});return{onFormSubmit:l=>H(void 0,null,function*(){var d,u;if((e==null?void 0:e.toLowerCase().trim())!==((d=l.empresa.email)==null?void 0:d.toLowerCase().trim()))return g({open:!0,tipo:"empresa",confirmado:!1,onConfirmar:()=>f(l,!0)});if((c==null?void 0:c.toLowerCase().trim())!==((u=l.responsavel.email)==null?void 0:u.toLowerCase().trim()))return g({open:!0,tipo:"responsavel",confirmado:!1,onConfirmar:()=>f(l,!0)});yield f(l)}),initialValues:o,confirmarEmailDialog:h,setConfirmarEmailDialog:g}},W2=Ba;import{jsx as k,jsxs as $2}from"react/jsx-runtime";function Ua(){let{onFormSubmit:a,initialValues:e,confirmarEmailDialog:c,setConfirmarEmailDialog:i}=W2(),n=Oa("(max-width: 600px)");return e?$2(Na,{onSubmit:a,defaultValues:e,children:[k(O,{style:{borderRadius:n?"0 0 16px 16px":"0 16px 16px 16px"},children:$2(t1,{container:!0,spacing:3,children:[k(t1,{item:!0,xs:12,children:k(R2,{})}),k(t1,{item:!0,xs:12,children:k(O0,{})}),k(t1,{item:!0,xs:12,children:k(E2,{})}),k(t1,{item:!0,xs:12,children:k(O0,{})}),k(t1,{item:!0,xs:12,children:k(I2,{})}),k(t1,{item:!0,xs:12,children:k(O0,{})}),k(t1,{item:!0,xs:12,children:k(B2,{})})]})}),k(z2,{open:c.open,tipo:c==null?void 0:c.tipo,confirmado:c==null?void 0:c.confirmado,onClose:()=>i(r=>C(M({},r),{open:!1})),onConfirmar:c==null?void 0:c.onConfirmar})]}):k(O,{centerContent:!0,height:"75vh",children:k(za,{})})}var j2=qa(Ua);import{memo as g5}from"react";import{Grid as d4}from"@s_mart/core";import{useMediaQuery as f5}from"@s_mart/hooks";import{useState as We}from"react";import{Button as Q3,CircularProgress as $e,Grid as U1,LIcon as J3,Typography as d1}from"@s_mart/core";import{decimal as je,valor as K3}from"@s_mart/masks";import{colorPalette as a4}from"@s_mart/tokens";import{useMediaQuery as Xe}from"@s_mart/hooks";import{Button as re,CircularProgress as ne,Dialog as M0,Divider as Z3,Grid as o1,LIcon as te,Typography as g3}from"@s_mart/core";var r0={description:"M24.6 7.6a17 17 0 1 0 0 34 17 17 0 0 0 0-34Zm0 3.3a13.7 13.7 0 1 1 0 27.4 13.7 13.7 0 0 1 0-27.4Zm9.6 9-1.5-1.6a.8.8 0 0 0-1.2 0l-9.7 9.6-4-4.1a.8.8 0 0 0-1.2 0L15 25.3a1 1 0 0 0 0 1.2l6.2 6.3c.4.3.9.3 1.2 0L34.2 21c.4-.3.4-.8 0-1.1Z",id:"line-check-circle-regular"};var X2={description:"m27 36.9 1.2-1.1a1 1 0 0 0 0-1L18 24.6l10.2-10.3a1 1 0 0 0 0-1l-1.2-1c-.2-.4-.6-.4-1 0L14.5 24c-.3.2-.3.6 0 1L26 36.8c.3.3.7.3 1 0Z",id:"line-chevron-left-regular"},_2={description:"m19.9 12.2-1.1 1c-.3.4-.3.8 0 1l10 10.3-10 10.3c-.3.3-.3.7 0 1l1 1c.3.4.7.4 1 0L32.5 25c.3-.3.3-.7 0-1L20.8 12.3c-.3-.3-.7-.3-1 0Z",id:"line-chevron-right-regular"};var Y2={description:"M31 25.9H17c-.2 0-.4.2-.4.4v2c0 .2.2.4.4.4h14c.2 0 .4-.2.4-.5v-1.9c0-.2-.2-.4-.4-.4Zm3.3-16.6-2.6 1.9-2.2-1.7c-1-.7-2.3-.7-3.3 0L24 11.2l-2.2-1.7a2.8 2.8 0 0 0-3.3 0l-2.2 1.7-2.6-1.9c-1.1-.8-2.7 0-2.7 1.5v26.4c0 1.4 1.6 2.3 2.7 1.5l2.6-1.9 2.2 1.7c1 .7 2.3.7 3.3 0l2.2-1.7 2.2 1.7c1 .7 2.3.7 3.3 0l2.2-1.7 2.6 1.9c1.1.8 2.7 0 2.7-1.5V10.8c0-1.4-1.6-2.3-2.7-1.5Zm0 25.9-2.6-1.8-3.8 2.8-4-2.8-3.8 2.8-3.8-2.8-2.5 1.8V12.8l2.5 1.8 3.8-2.8 4 2.8 3.8-2.8 3.8 2.8 2.5-1.8v22.4ZM31 19.3H17c-.2 0-.4.2-.4.5v1.9c0 .2.2.4.4.4h14c.2 0 .4-.2.4-.4v-2c0-.2-.2-.4-.4-.4Z",id:"line-receipt-regular"};var n0={description:"M35.2 12.7a15.9 15.9 0 0 0-25 19.1L8 40l8.4-2.2a16 16 0 0 0 23.6-14 16 16 0 0 0-4.8-11.1ZM24 37a13 13 0 0 1-6.7-1.9l-.5-.3-5 1.3 1.3-4.8-.3-.5a13.2 13.2 0 0 1 20.5-16.3c2.5 2.4 4 5.7 4 9.3C37.3 31 31.3 37 24 37Zm7.2-10-2.7-1c-.4-.1-.6-.2-.9.2l-1.2 1.5c-.3.3-.5.3-.9.1-2.3-1.1-3.9-2-5.4-4.7-.4-.7.4-.6 1.2-2.1v-.7c-.2-.2-1-2.2-1.3-3-.3-.7-.6-.6-.9-.6h-.7c-.3 0-.7 0-1 .4-.4.4-1.5 1.4-1.5 3.3 0 2 1.5 3.9 1.6 4.1.2.3 2.8 4.3 6.8 6 2.5 1.1 3.5 1.2 4.8 1 .7 0 2.3-1 2.6-1.9.4-.9.4-1.7.3-1.9l-.8-.4Z",id:"line-whatsapp-regular"};import{colorPalette as $0}from"@s_mart/tokens";import{useState as Wa}from"react";var $a=a=>{let[e,c]=Wa(!0);return{open:e,onCloseDialog:()=>{c(!1),setTimeout(()=>a(),100)}}},j=$a;var ja=a=>{let e=`https://api.whatsapp.com/send?phone=${a}`;window.open(e,"_blank","noopener noreferrer")},t0=ja;import{Button as e3,LIcon as c3,Tooltip as Xa,Typography as x1}from"@s_mart/core";import{valor as _a}from"@s_mart/masks";import{colorPalette as i3}from"@s_mart/tokens";import Ya from"dayjs";import{css as Q2}from"@emotion/react";import U0 from"@emotion/styled";import{colorPalette as s0}from"@s_mart/tokens";var J2=U0.div`
|
|
23
27
|
display: flex;
|
|
24
28
|
padding: 1rem;
|
|
25
29
|
gap: 1rem;
|
|
26
30
|
min-height: 10rem;
|
|
27
|
-
border: 1px solid ${
|
|
31
|
+
border: 1px solid ${s0.neutral[50]};
|
|
28
32
|
border-radius: 6px;
|
|
29
|
-
background-color: ${({recursoContratado:a})=>a?
|
|
33
|
+
background-color: ${({recursoContratado:a})=>a?s0.neutral[30]:s0.neutral[0]};
|
|
30
34
|
transition: 200ms;
|
|
31
35
|
|
|
32
|
-
${({emDestaque:a,theme:e})=>a&&
|
|
36
|
+
${({emDestaque:a,theme:e})=>a&&Q2`
|
|
33
37
|
border: 1px solid ${e.palette.primary.main};
|
|
34
38
|
box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.25), 0px 0px 1px 0px rgba(0, 0, 0, 0.03);
|
|
35
39
|
`}
|
|
36
40
|
|
|
37
41
|
:hover {
|
|
38
|
-
background-color: ${({recursoContratado:a})=>a&&
|
|
42
|
+
background-color: ${({recursoContratado:a})=>a&&s0.neutral[50]};
|
|
39
43
|
border: 1px solid ${({recursoContratado:a,theme:e})=>{var c,i;return!a&&((i=(c=e==null?void 0:e.palette)==null?void 0:c.primary)==null?void 0:i.main)}};
|
|
40
44
|
}
|
|
41
|
-
`,
|
|
45
|
+
`,K2=U0.img`
|
|
42
46
|
height: 3.5rem;
|
|
43
47
|
width: 3.5rem;
|
|
44
48
|
|
|
45
49
|
cursor: ${({hasGif:a})=>a?"pointer":void 0};
|
|
46
|
-
`,
|
|
50
|
+
`,a3=U0.div`
|
|
47
51
|
display: flex;
|
|
48
52
|
justify-content: space-between;
|
|
49
53
|
align-items: center;
|
|
50
54
|
margin-top: 0.5rem;
|
|
51
55
|
|
|
52
|
-
${({emDestaque:a})=>a&&
|
|
56
|
+
${({emDestaque:a})=>a&&Q2`
|
|
53
57
|
justify-content: end;
|
|
54
58
|
gap: 0.5rem;
|
|
55
59
|
`}
|
|
@@ -62,7 +66,7 @@ var V4=Object.defineProperty,C4=Object.defineProperties;var b4=Object.getOwnProp
|
|
|
62
66
|
width: 100%;
|
|
63
67
|
}
|
|
64
68
|
}
|
|
65
|
-
`;import{Fragment as
|
|
69
|
+
`;import{Fragment as Qa,jsx as W,jsxs as v1}from"react/jsx-runtime";function W0({recurso:a,periodicidade:e,onClick:c,onAdquirir:i,onRemover:n}){let r=a.valorRecurso===0&&a.recursoContratado,t=()=>r?W(Qa,{}):a.recursoContratado?a.dataExclusaoRecurso?W(Xa,{title:v1(x1,{variant:"bodySM",children:["Recurso dispon\xEDvel at\xE9 ",Ya(a.dataExclusaoRecurso).format("DD/MM/YYYY")]}),children:W("div",{style:{padding:"0.3rem 0"},children:W(x1,{variant:"bodySM",children:"Removido"})})}):W(e3,{variant:"neutral",size:"small",onClick:o=>{o.stopPropagation(),n(a)},children:"Remover"}):W(e3,{variant:a.emDestaque?"contained":"outlined",size:"small",onClick:o=>{o.stopPropagation(),i(a)},children:"Adquirir"});return v1(J2,{recursoContratado:a.recursoContratado,emDestaque:a.emDestaque,onClick:()=>a.gif&&c(a),children:[W("div",{children:W(K2,{src:a.caminhoImagem,hasGif:!!a.gif})}),v1("div",{style:{display:"flex",flexDirection:"column",justifyContent:"space-between",flex:1},children:[v1("div",{children:[v1("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"0.1rem"},children:[W(x1,{variant:"titleSM",children:a.nomeRecurso}),a.recursoContratado&&W(c3,{icon:r0,size:"24px",color:i3.green[500]}),a.emDestaque&&W(c3,{icon:H1,size:"24px",color:i3.yellow[300]})]}),W(x1,{variant:"bodySM",children:a.descricaoRecurso})]}),v1(a3,{emDestaque:a.emDestaque,children:[r?W(x1,{variant:"titleXS",padding:"0.3rem 0",children:"Recurso incluso"}):v1(x1,{variant:"titleXS",children:[_a.format(a.valorRecurso),"/",e]}),t()]})]})]})}import{Button as l3,Dialog as m0,Grid as d0,Typography as r3}from"@s_mart/core";import Ja from"@emotion/styled";var o3=Ja.img`
|
|
66
70
|
max-width: 520px;
|
|
67
71
|
|
|
68
72
|
@media only screen and (max-width: 640px) {
|
|
@@ -76,14 +80,14 @@ var V4=Object.defineProperty,C4=Object.defineProperties;var b4=Object.getOwnProp
|
|
|
76
80
|
@media only screen and (max-width: 420px) {
|
|
77
81
|
max-width: 260px;
|
|
78
82
|
}
|
|
79
|
-
`;import{jsx as
|
|
83
|
+
`;import{jsx as Y,jsxs as n3}from"react/jsx-runtime";function t3({recurso:a,onClose:e,onAdquirirRecurso:c,onRemoverRecurso:i}){let{open:n,onCloseDialog:r}=j(e),t=a.valorRecurso===0&&a.recursoContratado,o=()=>H(this,null,function*(){yield i(a),r()}),s=()=>H(this,null,function*(){yield c(a),r()});return n3(m0,{open:n,closeIcon:!0,onClose:r,children:[Y(m0.Header,{children:"Este recurso pode ajudar voc\xEA!"}),Y(m0.Content,{children:n3(d0,{container:!0,direction:"column",alignItems:"center",spacing:2,children:[Y(d0,{item:!0,children:Y(r3,{variant:"titleSM",children:a.nomeRecurso})}),Y(d0,{item:!0,children:Y(r3,{variant:"bodySM",children:a.descricaoRecurso})}),a.gif&&Y(d0,{item:!0,children:Y(o3,{src:a.gif})})]})}),!t&&!a.dataExclusaoRecurso&&Y(m0.Footer,{children:a.recursoContratado?Y(l3,{color:"error",onClick:o,children:"Remover recurso"}):Y(l3,{onClick:s,children:"Adquirir recurso"})})]})}import{Button as s3,Dialog as h0,Grid as p0,Typography as v0}from"@s_mart/core";import{valor as ae}from"@s_mart/masks";var Ka=(a,e)=>{let c=(e==null?void 0:e.modelo)||"mes",i=a!=null?a:0;return{mes:{0:"m\xEAs",1:"tri",2:"sem",3:"ano"},mensais:{0:"mensais",1:"trimestrais",2:"semestrais",3:"anuais"},mensalidade:{0:"mensalidade",1:"trimestralidade",2:"semestralidade",3:"anualidade"}}[c][i]},z=Ka;import{jsx as Q,jsxs as N1}from"react/jsx-runtime";function m3({recurso:a,onClose:e,onConfirmar:c}){let i=y(o=>o.periodicidade),{open:n,onCloseDialog:r}=j(e),t=()=>H(this,null,function*(){yield c(a),r()});return N1(h0,{open:n,closeIcon:!0,onClose:r,children:[Q(h0.Header,{children:"Adquirir novo recurso"}),Q(h0.Content,{children:N1(p0,{container:!0,children:[N1(p0,{item:!0,xs:12,children:[Q(v0,{variant:"bodySM",children:"Voc\xEA est\xE1 adquirindo um recurso do seu sistema: "}),Q(v0,{variant:"titleXS",children:a.nomeRecurso})]}),Q(p0,{item:!0,xs:12,children:N1(v0,{variant:"bodySM",children:["Informamos que sua ",z(i,{modelo:"mensalidade"})," ter\xE1 uma adi\xE7\xE3o de"," ",ae.format(a.valorRecurso)]})}),Q("br",{}),Q("br",{}),Q(p0,{item:!0,xs:12,children:Q(v0,{variant:"bodySM",children:"Deseja confirmar a aquisi\xE7\xE3o?"})})]})}),N1(h0.Footer,{children:[Q(s3,{variant:"neutral",onClick:r,children:"Cancelar"}),Q(s3,{onClick:t,children:"Confirmar"})]})]})}import{Button as d3,Dialog as u0,Grid as Z0,Typography as g0}from"@s_mart/core";import{jsx as J,jsxs as O1}from"react/jsx-runtime";function h3({recurso:a,onClose:e,onRemover:c}){let i=y(o=>o.periodicidade),{open:n,onCloseDialog:r}=j(e),t=()=>H(this,null,function*(){yield c(a),r()});return O1(u0,{open:n,closeIcon:!0,onClose:r,children:[J(u0.Header,{children:"Remover recurso"}),J(u0.Content,{children:O1(Z0,{container:!0,children:[O1(Z0,{item:!0,xs:12,children:[J(g0,{variant:"bodySM",children:"Voc\xEA est\xE1 removendo um recurso do seu sistema: "}),J(g0,{variant:"titleXS",children:a.nomeRecurso})]}),J(Z0,{item:!0,xs:12,children:O1(g0,{variant:"bodySM",children:["Sua ",z(i,{modelo:"mensalidade"})," ter\xE1 uma altera\xE7\xE3o."]})}),J("br",{}),J("br",{}),J(Z0,{item:!0,xs:12,children:J(g0,{variant:"bodySM",children:"Deseja confirmar a remo\xE7\xE3o?"})})]})}),O1(u0.Footer,{children:[J(d3,{color:"error",onClick:t,children:"Remover"}),J(d3,{variant:"neutral",onClick:r,children:"Cancelar"})]})]})}import{Grid as f0,Typography as p3}from"@s_mart/core";import{jsx as P1,jsxs as ee}from"react/jsx-runtime";function v3(){let a=Z(e=>e.recursosDialog.emptyStateImg);return ee(f0,{container:!0,spacing:2,direction:"column",alignItems:"center",margin:"2rem 0",children:[!!a&&P1(f0,{item:!0,children:P1("img",{src:a})}),P1(f0,{item:!0,textAlign:"center",children:P1(p3,{variant:"titleMD",children:"Novos recursos v\xEAm a\xED"})}),P1(f0,{item:!0,textAlign:"center",children:P1(p3,{variant:"bodyMD",children:"Voc\xEA j\xE1 possui todos os recursos dispon\xEDveis no momento."})})]})}import{useEffect as ce,useMemo as ie,useState as oe}from"react";var le=()=>{let[a,e]=oe(null),c=y(m=>m.fetchedMeuPlano),i=y(m=>m.fetchMeuPlano),n=y(m=>m.recursos),r=y(m=>m.periodicidade),t=Z(m=>m.sistemaNome),o=Z(m=>m.telefoneSuporte),s=Z(m=>m.recursosDialog.recursosGifs),h=Z(m=>m.recursosDialog.recursoEmDestaque),g=Z(m=>m.recursosDialog.onContratarRecurso),f=Z(m=>m.recursosDialog.onRemoverRecurso),v=V(m=>m.handleErrors),l=V(m=>m.setLoading),d=V(m=>m.toggleNotification),{contratarRecurso:u,descontratarRecurso:x}=I(),F=z(r),X=ie(()=>{let m={contratados:[],naoContratados:[]};return n==null||n.forEach(p=>{var P;let b=((P=s==null?void 0:s.find(q=>q.slug===p.slugRecurso))==null?void 0:P.gif)||null;p.recursoContratado?m.contratados.push(C(M({},p),{gif:b,emDestaque:!1})):m.naoContratados.push(C(M({},p),{gif:b,emDestaque:p.slugRecurso===h}))}),h&&m.naoContratados.sort(p=>p.emDestaque?-1:1),m},[n,s,h]);return ce(()=>{c||i()},[c]),{sistemaNome:t,alreadyFetchedMeuPlano:c,telefoneSuporte:o,recursos:X,periodicidadeLabel:F,handleClickRecurso:m=>e({open:"gif",recurso:m}),openedDialog:a,handleCloseDialog:()=>e(null),handleAdquirirRecurso:m=>e({open:"confirmacaoAdquirir",recurso:m}),handleRemoverRecurso:m=>e({open:"confirmacaoRemover",recurso:m}),adquirirRecurso:m=>H(void 0,null,function*(){try{l(!0),yield u(m.codigoRecurso),i(),d({title:"Novo recurso adquirido"}),l(!1),g==null||g(m)}catch(p){v(p)}}),removerRecurso:m=>H(void 0,null,function*(){try{l(!0),yield x(m.codigoRecurso),i(),d({title:"O recurso foi removido"}),l(!1),f==null||f(m)}catch(p){v(p)}})}},u3=le;import{Fragment as f3,jsx as A,jsxs as u1}from"react/jsx-runtime";function y0({onClose:a}){let{sistemaNome:e,alreadyFetchedMeuPlano:c,telefoneSuporte:i,recursos:n,periodicidadeLabel:r,handleClickRecurso:t,openedDialog:o,handleAdquirirRecurso:s,handleCloseDialog:h,handleRemoverRecurso:g,adquirirRecurso:f,removerRecurso:v}=u3(),{open:l,onCloseDialog:d}=j(a);return u1(f3,{children:[u1(M0,{open:l,onClose:d,fullWidth:!0,maxWidth:"lg",closeIcon:!0,disableBackdropClick:!0,children:[u1(M0.Header,{children:["Recursos ",e]}),c?u1(f3,{children:[A(M0.Content,{style:{marginTop:"1rem"},children:u1(o1,{container:!0,spacing:2,children:[u1(o1,{item:!0,xs:12,display:"flex",alignItems:"center",children:[A(g3,{variant:"titleSM",children:"Recursos feitos para ajudar voc\xEA"}),A(Z3,{style:{flex:1,marginLeft:"1rem",color:$0.neutral[30]}})]}),A(o1,{item:!0,xs:12,children:A(o1,{container:!0,spacing:2,children:n.naoContratados.length?n.naoContratados.map(u=>A(o1,{item:!0,xs:12,sm:u.emDestaque?12:6,children:A(W0,{recurso:u,periodicidade:r,onClick:t,onAdquirir:s,onRemover:g})},u.codigoRecurso)):A(v3,{})})}),u1(o1,{item:!0,xs:12,display:"flex",alignItems:"center",children:[A(g3,{variant:"titleSM",children:"Recursos que voc\xEA j\xE1 adquiriu"}),A(Z3,{style:{flex:1,marginLeft:"1rem",color:$0.neutral[30]}})]}),A(o1,{item:!0,xs:12,children:A(o1,{container:!0,spacing:2,children:n.contratados.map(u=>A(o1,{item:!0,xs:12,sm:6,children:A(W0,{recurso:u,periodicidade:r,onClick:t,onAdquirir:s,onRemover:g})},u.codigoRecurso))})})]})}),A(M0.Footer,{children:A(re,{variant:"outlined",color:"neutral",startIcon:A(te,{icon:n0,size:"22px",removeMargin:!0}),style:{color:$0.neutral[100]},onClick:()=>t0(i),children:"Preciso de Ajuda"})})]}):A("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"20vh"},children:A(ne,{})})]}),(o==null?void 0:o.open)==="gif"&&A(t3,{recurso:o.recurso,onClose:h,onAdquirirRecurso:f,onRemoverRecurso:v}),(o==null?void 0:o.open)==="confirmacaoAdquirir"&&A(m3,{recurso:o.recurso,onClose:h,onConfirmar:f}),(o==null?void 0:o.open)==="confirmacaoRemover"&&A(h3,{recurso:o.recurso,onClose:h,onRemover:v})]})}import{Button as _3,Dialog as P0,LIcon as Be,Typography as qe}from"@s_mart/core";import{Form as ze,Select as Ne}from"@s_mart/form";import{colorPalette as Oe}from"@s_mart/tokens";import{CircularProgress as se}from"@s_mart/core";import{jsx as M3}from"react/jsx-runtime";function y3(){return M3("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"20vh"},children:M3(se,{})})}import{LIcon as L3}from"@s_mart/core";import me from"@emotion/styled";import{colorPalette as de}from"@s_mart/tokens";var j0=me.div`
|
|
80
84
|
display: flex;
|
|
81
85
|
align-items: center;
|
|
82
86
|
border-radius: 4px;
|
|
83
87
|
cursor: pointer;
|
|
84
88
|
|
|
85
89
|
:hover {
|
|
86
|
-
background-color: ${
|
|
90
|
+
background-color: ${de.neutral[30]};
|
|
87
91
|
}
|
|
88
92
|
|
|
89
93
|
@media (max-width: 450px) {
|
|
@@ -95,7 +99,7 @@ var V4=Object.defineProperty,C4=Object.defineProperties;var b4=Object.getOwnProp
|
|
|
95
99
|
|
|
96
100
|
${({side:a})=>`${a}: 0;`}
|
|
97
101
|
}
|
|
98
|
-
`;import{Button as
|
|
102
|
+
`;import{Button as pe,LIcon as b3,Tooltip as ve,Typography as s1}from"@s_mart/core";import{colorPalette as _0}from"@s_mart/tokens";import X0 from"@emotion/styled";import{colorPalette as he}from"@s_mart/tokens";var H3=X0.div`
|
|
99
103
|
display: flex;
|
|
100
104
|
min-width: calc(100% / 3);
|
|
101
105
|
max-width: calc(100% / 3); // Precisa ter o min e max, por algum krl o width não funciona
|
|
@@ -109,7 +113,7 @@ var V4=Object.defineProperty,C4=Object.defineProperties;var b4=Object.getOwnProp
|
|
|
109
113
|
min-width: 100%;
|
|
110
114
|
max-width: 100%;
|
|
111
115
|
}
|
|
112
|
-
`,
|
|
116
|
+
`,V3=X0.div`
|
|
113
117
|
position: relative;
|
|
114
118
|
display: flex;
|
|
115
119
|
flex-direction: column;
|
|
@@ -120,7 +124,7 @@ var V4=Object.defineProperty,C4=Object.defineProperties;var b4=Object.getOwnProp
|
|
|
120
124
|
padding: 2rem 1.5rem 1.5rem;
|
|
121
125
|
margin: 0.8rem;
|
|
122
126
|
border: ${({destaque:a,theme:e})=>a?`2px solid ${e.palette.primary.main}`:void 0};
|
|
123
|
-
background-color: ${({disabled:a})=>a?
|
|
127
|
+
background-color: ${({disabled:a})=>a?he.neutral[30]:void 0};
|
|
124
128
|
opacity: ${({disabled:a})=>a?.6:void 0};
|
|
125
129
|
|
|
126
130
|
@media (max-width: 1050px) {
|
|
@@ -130,18 +134,18 @@ var V4=Object.defineProperty,C4=Object.defineProperties;var b4=Object.getOwnProp
|
|
|
130
134
|
@media (max-width: 400px) {
|
|
131
135
|
padding: 1rem;
|
|
132
136
|
}
|
|
133
|
-
`,
|
|
137
|
+
`,C3=X0.div`
|
|
134
138
|
display: flex;
|
|
135
139
|
flex-direction: column;
|
|
136
140
|
justify-content: space-between;
|
|
137
141
|
align-items: center;
|
|
138
142
|
min-height: 7rem;
|
|
139
|
-
`;import{Fragment as
|
|
143
|
+
`;import{Fragment as Ze,jsx as R,jsxs as S1}from"react/jsx-runtime";function x3({plano:a,id:e,reduceFont:c,onContratar:i,periodicidadePlanoAtual:n}){let r=()=>a.planoAtual?"Seu plano atual":a.periodicidade!==n?"Contratar plano":a.valorMensalMenorQueAtual?"Diminuir plano":"Aumentar plano";return R(H3,{id:e,children:R(ue,{title:a.disabled30Dias?S1(s1,{variant:"bodyXS",children:["A troca para um plano de valor ",R("br",{}),"menor, s\xF3 \xE9 poss\xEDvel ap\xF3s 30 dias ",R("br",{}),"de uso do seu plano atual."]}):"",placement:"right",children:S1(V3,{destaque:!!a.destaque,disabled:a.planoAtual||a.disabled||a.disabled30Dias,children:[!!a.destaque&&R(b3,{icon:H1,color:_0.yellow[300],style:{position:"absolute",top:"5px",right:"5px"}}),S1(C3,{children:[R("div",{style:{textAlign:"center"},children:R(s1,{variant:c?"titleMS":"titleMD",children:a.nome})}),!!a.fraseDeEfeito&&R("div",{children:R(s1,{variant:"bodySM",color:_0.neutral[100],children:a.fraseDeEfeito})}),!!a.valorPeriodicoPromocional&&R("div",{children:S1(s1,{variant:"bodySM",color:_0.red[300],style:{textDecorationLine:"line-through",marginRight:"2rem"},children:["R$ ",a.valorPeriodico]})}),S1("div",{style:{display:"flex",justifyContent:"center",alignItems:"end"},children:[R(s1,{variant:"titleXXS",alignSelf:"center",children:"R$"}),R(s1,{variant:c?"titleLG":"titleXL",style:{fontSize:"3rem"},children:a.valorPeriodicoPromocional||a.valorPeriodico}),S1(s1,{variant:c?"titleMS":"titleMD",marginBottom:"0.3rem",children:["/",z(a.periodicidade)]})]})]}),R(pe,{fullWidth:!0,variant:a.planoAtual?"neutral":"contained",disabled:a.planoAtual||a.disabled||a.disabled30Dias,startIcon:a.planoAtual&&R(b3,{icon:r0,size:"25px"}),onClick:()=>i(a),style:{margin:"1.5rem 0"},children:r()}),R("div",{style:{paddingLeft:"1rem"},children:R(s1,{variant:"bodySM",children:R("div",{style:{display:"flex",flexDirection:"column"},dangerouslySetInnerHTML:{__html:a.descricao}})})})]})})})}function ue(a){return a.title?R(ve,M({},a)):R(Ze,{children:a.children})}import{useMemo as Y0}from"react";import{useMediaQuery as Q0}from"@s_mart/hooks";import{useFormContext as ge}from"react-hook-form";import P3 from"dayjs";var fe=({planos:a})=>{let e=y(m=>m.codigoPlano),c=y(m=>m.periodicidade),i=y(m=>m.valor),n=y(m=>m.dataContratacao),r=y(m=>m.recursos),t=V(m=>m.handleErrors),o=V(m=>m.setLoading),s=Z(m=>m.planosDialog.bloquearDowngrade),h=Z(m=>m.planosDialog.bloquearDowngrade30Dias),g=Z(m=>{var p;return(p=m.planosDialog.mostrarPlanosDeterminados)==null?void 0:p.codigoPlanoValor}),{buscarPlano:f}=I(),{watch:v,setValue:l}=ge(),d=Q0("(max-width: 900px)"),u=Q0("(max-width: 700px)"),x=Q0("(max-width: 450px)"),F=v("filtroPeriodicidade"),X=!!h&&P3().diff(P3(n),"days")<30,r1=Y0(()=>{let m={previous:0,next:4};return u?m.next=2:d&&(m.next=3),m},[u,d,F]),a1=Y0(()=>{let m=[];return a?(g?m=[...a.mensais,...a.trimestrais,...a.semestrais,...a.anuais].filter(P=>g.includes(P.codigoPlanoValor)):F&&(m=a[["mensais","trimestrais","semestrais","anuais"][F.value]]),m.sort((b,P)=>b.valorPeriodico-P.valorPeriodico),m.map(b=>{let P=b.valorPeriodicoPromocional||b.valorPeriodico,q=w1(P,b.periodicidade)<w1(i!=null?i:0,c);return C(M({},b),{planoAtual:b.codigo===e&&b.periodicidade===c,valorMensalMenorQueAtual:q,disabled:!!s&&q,disabled30Dias:X&&q})})):m},[a,F,g]),X1=Y0(()=>u?a1.length>1:d?a1.length>2:a1.length>3,[u,d,a1]);function w1(m,p){switch(p){case 1:return m/3;case 2:return m/6;case 3:return m/12;default:return m}}return{planosFiltrados:a1,scrollPlanos:m=>{let p=r1[m];if(p===0||p>a1.length)return;let b=document.getElementById(`plano-${p}`);b&&(b.scrollIntoView({behavior:"smooth"}),m==="next"?(r1.next++,r1.previous++):(r1.next--,r1.previous--))},showScrollControllers:X1,maxWidth700:u,maxWidth450:x,handleClickContratarPlano:m=>H(void 0,null,function*(){var p,b;try{o(!0);let P=yield f(m.codigo,m.periodicidade);if(P.data){let q={},i1=(b=(p=P.data.recursos)==null?void 0:p.filter(E=>!(E!=null&&E.valorRecurso)))==null?void 0:b.map(E=>E==null?void 0:E.slugRecurso),e1=r==null?void 0:r.filter(E=>E.recursoContratado);e1==null||e1.forEach(E=>{P.data.recursos.some(Y1=>Y1.slugRecurso===E.slugRecurso)&&!(i1!=null&&i1.includes(E.slugRecurso))&&(q[E.slugRecurso]=!0)}),l("recursosSelecionados",q),l("planoSelecionado",C(M({},m),{recursos:P.data.recursos}))}o(!1)}catch(P){t(P)}}),periodicidadePlanoAtual:c}},S3=fe;import{jsx as L1,jsxs as Me}from"react/jsx-runtime";function D3(a){let{planosFiltrados:e,scrollPlanos:c,showScrollControllers:i,maxWidth700:n,maxWidth450:r,handleClickContratarPlano:t,periodicidadePlanoAtual:o}=S3(a);return Me("div",{style:{display:"flex",position:"relative"},children:[i&&L1(j0,{side:"left",onClick:()=>c("previous"),children:L1(L3,{icon:X2,size:n?"2rem":"3rem"})}),L1("div",{style:{display:"flex",justifyContent:i?void 0:"center",overflow:"hidden",flex:1},children:e.map((s,h)=>L1(x3,{id:`plano-${h+1}`,plano:s,reduceFont:r,periodicidadePlanoAtual:o!=null?o:0,onContratar:t},s.codigoPlanoValor))}),i&&L1(j0,{side:"right",onClick:()=>c("next"),children:L1(L3,{icon:_2,size:n?"2rem":"3rem"})})]})}import{Grid as n2}from"@s_mart/core";import{Grid as ye,Typography as a2}from"@s_mart/core";import{valor as He}from"@s_mart/masks";import{Switch as Ve}from"@s_mart/form";import{useFormContext as Ce}from"react-hook-form";import{Grid as J0}from"@s_mart/core";import K0 from"@emotion/styled";var A3=K0(J0)`
|
|
140
144
|
display: flex;
|
|
141
145
|
justify-content: end;
|
|
142
146
|
margin-bottom: 1.5rem;
|
|
143
147
|
margin-right: 0.5rem;
|
|
144
|
-
`,
|
|
148
|
+
`,R3=K0(J0)`
|
|
145
149
|
@media (min-height: 800px) {
|
|
146
150
|
max-height: 50vh;
|
|
147
151
|
overflow-y: auto;
|
|
@@ -150,7 +154,7 @@ var V4=Object.defineProperty,C4=Object.defineProperties;var b4=Object.getOwnProp
|
|
|
150
154
|
@media (max-width: 960px) {
|
|
151
155
|
max-height: fit-content;
|
|
152
156
|
}
|
|
153
|
-
`,
|
|
157
|
+
`,k3=K0(J0)`
|
|
154
158
|
display: flex;
|
|
155
159
|
justify-content: space-between;
|
|
156
160
|
align-items: center;
|
|
@@ -162,7 +166,7 @@ var V4=Object.defineProperty,C4=Object.defineProperties;var b4=Object.getOwnProp
|
|
|
162
166
|
@media ((min-height: 800px) or (max-width: 960px)) {
|
|
163
167
|
margin-right: 0.5rem;
|
|
164
168
|
}
|
|
165
|
-
`;import{Fragment as
|
|
169
|
+
`;import{Fragment as be,jsx as D1,jsxs as e2}from"react/jsx-runtime";function T3(){let{getValues:a}=Ce(),c=a("planoSelecionado.recursos").filter(i=>!!i.valorRecurso);return c.length?e2(ye,{container:!0,children:[D1(A3,{item:!0,xs:12,children:D1(a2,{variant:"titleSM",children:"Confira os recursos em seu novo plano"})}),D1(R3,{item:!0,xs:12,children:c.map(i=>e2(k3,{item:!0,xs:12,children:[e2(a2,{variant:"titleXS",children:[i.nomeRecurso," (",He.format(i.valorRecurso),")"]}),D1(Ve,{name:`recursosSelecionados.${i.slugRecurso}`,label:D1(a2,{variant:"titleXXS",children:"Adicionar"})})]},i.codigoRecurso))})]}):D1(be,{})}import{useState as Re}from"react";import{Button as ke,Grid as q3,Typography as K}from"@s_mart/core";import{valor as r2}from"@s_mart/masks";import{Button as w3,Dialog as H0,Grid as i2,Typography as Se}from"@s_mart/core";import{valor as Le}from"@s_mart/masks";import{useMemo as c2}from"react";import{useFormContext as xe}from"react-hook-form";var Pe=()=>{let a=y(v=>v.valor),e=y(v=>v.tipoCobranca),c=y(v=>v.periodicidade),i=y(v=>v.nomePlano),n=y(v=>v.getValorTotalPlano),r=Z(v=>v.planosDialog.imagensAlterarPlano),{getValues:t}=xe(),o=t("planoSelecionado"),s=t("recursosSelecionados"),h=c2(()=>{let v=[];o!=null&&o.recursos&&s&&Object.entries(s).forEach(([u,x])=>{if(x){let F=o.recursos.find(X=>X.slugRecurso===u);F&&v.push(F)}});let l=(o==null?void 0:o.valorPeriodicoPromocional)||(o==null?void 0:o.valorPeriodico)||0;return v.reduce((u,x)=>u+x.valorRecurso,l)},[o,s]),g=c2(()=>(o==null?void 0:o.periodicidade)!==c?{title:"Contratar",buttonLabel:"Confirmar contrata\xE7\xE3o de plano",img:r==null?void 0:r.contratar}:h>n()?{title:"Melhorar",buttonLabel:"Confirmar altera\xE7\xE3o de plano",img:r==null?void 0:r.melhorar}:{title:"Diminuir",buttonLabel:"Confirmar altera\xE7\xE3o de plano",img:r==null?void 0:r.diminuir},[o,c]),f=c2(()=>{let v=(o==null?void 0:o.valorPeriodicoPromocional)||(o==null?void 0:o.valorPeriodico);return a&&v&&e&&o.tipoDeCobranca&&e!==o.tipoDeCobranca?{de:e===2?"p\xF3s-pago":"pr\xE9-pago",para:o.tipoDeCobranca===2?"p\xF3s-pago":"pr\xE9-pago"}:null},[a,e,o]);return{valorTotal:h,mudouTipoCobranca:f,dynamicText:g,nomePlanoPlanoAtual:i,planoSelecionado:o}},E3=Pe;import{Fragment as o2,jsx as $,jsxs as l1}from"react/jsx-runtime";function I3({onClose:a}){var s;let{mudouTipoCobranca:e,dynamicText:c,valorTotal:i,nomePlanoPlanoAtual:n,planoSelecionado:r}=E3(),{open:t,onCloseDialog:o}=j(a);return l1(H0,{open:t,onClose:o,maxWidth:"xs",fullWidth:!0,closeIcon:!0,disablePortal:!0,children:[l1(H0.Header,{children:[c.title," plano"]}),$(H0.Content,{children:l1(i2,{container:!0,spacing:2,children:[$(i2,{item:!0,xs:12,style:{display:"flex"},children:l1(Se,{variant:"bodySM",children:[e?l1(o2,{children:["Voc\xEA est\xE1 alterando seu plano ",$("strong",{children:n})," para uma nova modalidade:"," ",$("strong",{style:{textTransform:"capitalize"},children:e.para})]}):l1(o2,{children:["Voc\xEA est\xE1 alterando seu plano para ",$("strong",{children:r==null?void 0:r.nome}),". O boleto ser\xE1 enviado por email em at\xE9 2 dias \xFAteis."]}),$("br",{}),$("br",{}),e&&l1(o2,{children:["A forma de pagamento ser\xE1 alterada de ",e.de," para ",e.para,". O"," ",$("strong",{children:"boleto ser\xE1 enviado por email"})," em at\xE9 2 dias \xFAteis, com data de vencimento de at\xE9 5 dias.",$("br",{})]}),"Ao confirmar sua nova escolha, sua fatura ser\xE1 alterada para"," ",l1("strong",{children:[Le.format(i)," ",z((s=r==null?void 0:r.periodicidade)!=null?s:0,{modelo:"mensais"})]}),"."]})}),$(i2,{item:!0,xs:12,style:{display:"flex",alignItems:"center",justifyContent:"center"},children:!!c.img&&$("img",{src:c.img})})]})}),l1(H0.Footer,{children:[$(w3,{variant:"neutral",onClick:o,children:"Cancelar"}),$(w3,{type:"submit",onClick:o,children:c.buttonLabel})]})]})}import{Grid as G3}from"@s_mart/core";import l2 from"@emotion/styled";var F3=l2(G3)`
|
|
166
170
|
width: 90%;
|
|
167
171
|
border-radius: 16px;
|
|
168
172
|
padding: 1.5rem;
|
|
@@ -179,23 +183,23 @@ var V4=Object.defineProperty,C4=Object.defineProperties;var b4=Object.getOwnProp
|
|
|
179
183
|
padding: 1rem;
|
|
180
184
|
margin: 0.5rem;
|
|
181
185
|
}
|
|
182
|
-
`,
|
|
186
|
+
`,V0=l2(G3)`
|
|
183
187
|
display: flex;
|
|
184
188
|
justify-content: center;
|
|
185
189
|
margin-bottom: 0.5rem;
|
|
186
|
-
`,
|
|
190
|
+
`,C0=l2.div`
|
|
187
191
|
display: flex;
|
|
188
192
|
justify-content: space-between;
|
|
189
193
|
margin-bottom: 0.3rem;
|
|
190
|
-
`;import{useFormContext as Ce}from"react-hook-form";var be=()=>{let{watch:a,getValues:e}=Ce(),c=e("planoSelecionado"),i=a("recursosSelecionados"),r=()=>{let h=[];return c.recursos&&(h=c.recursos.filter(o=>!o.valorRecurso)),Object.entries(i||{}).forEach(([o,d])=>{var u;if(d){let g=(u=c.recursos)==null?void 0:u.find(f=>f.slugRecurso===o);g&&h.push(g)}}),h};return{getValorTotal:h=>{let o=r(),d=h?0:c.valorPeriodicoPromocional||c.valorPeriodico;return o.reduce((g,f)=>g+f.valorRecurso,d)},getRecursos:r,planoSelecionado:c}},I3=be;import{Fragment as Se,jsx as F,jsxs as s1}from"react/jsx-runtime";function F3(){let[a,e]=xe(!1),{planoSelecionado:c,getRecursos:i,getValorTotal:r}=I3();return s1(Se,{children:[s1(w3,{container:!0,children:[F(f0,{item:!0,xs:12,style:{marginBottom:"1.5rem"},children:F(K,{variant:"titleMD",align:"center",children:c.nome})}),F(f0,{item:!0,xs:12,children:F(K,{variant:"titleSM",children:"Valor do plano"})}),s1(f0,{item:!0,xs:12,children:[F(K,{variant:"bodyLG",style:{alignSelf:"center"},children:"R$"}),F(K,{variant:"titleXXL",children:Number(r().toFixed(2))}),s1(K,{variant:"bodyLG",style:{alignSelf:"end"},children:["/",q(c.periodicidade)]})]}),F(G3,{item:!0,xs:12,style:{marginBottom:"1rem"},children:F(Pe,{size:"large",fullWidth:!0,onClick:()=>e(!0),children:"Contratar agora"})}),s1(G3,{item:!0,xs:12,children:[s1(M0,{children:[F(K,{variant:"bodyMD",children:c.nome}),F(K,{variant:"bodyMD",children:e2.format(c.valorPeriodicoPromocional||c.valorPeriodico)})]}),s1(M0,{children:[F(K,{variant:"bodySM",children:"Subtotal recursos"}),F(K,{variant:"bodySM",children:e2.format(r(!0))})]}),i().map(l=>s1(M0,{children:[F(K,{variant:"bodySM",children:l.nomeRecurso}),F(K,{variant:"bodySM",children:e2.format(l.valorRecurso)})]},l.codigoRecurso))]})]}),a&&F(T3,{onClose:()=>e(!1)})]})}import{jsx as H0,jsxs as Le}from"react/jsx-runtime";function B3(){return Le(c2,{container:!0,spacing:2,children:[H0(c2,{item:!0,xs:12,md:7,children:H0(A3,{})}),H0(c2,{item:!0,xs:12,md:5,style:{display:"flex",justifyContent:"center",alignItems:"start"},children:H0(F3,{})})]})}import{Grid as y0,Typography as q3}from"@s_mart/core";import{jsx as D1,jsxs as De}from"react/jsx-runtime";function z3(){let a=v(e=>e.planosDialog.emptyStateImg);return De(y0,{container:!0,spacing:2,direction:"column",alignItems:"center",padding:"1rem 0",children:[!!a&&D1(y0,{item:!0,children:D1("img",{src:a})}),D1(y0,{item:!0,textAlign:"center",children:D1(q3,{variant:"titleMD",children:"Voc\xEA precisa de um plano especial"})}),D1(y0,{item:!0,textAlign:"center",children:D1(q3,{variant:"bodyMD",children:"Para trocar de plano solicite ajuda da nossa equipe no bot\xE3o abaixo."})})]})}import{useEffect as O3,useMemo as U3,useState as Re}from"react";var Ae=()=>{var c;let a=v.getState().axiosInstance,e=(c=a.defaults.baseURL)!=null&&c.includes("staging")?"https://apistaging-controle.sbsistemas.com.br":"https://apicontrole.sbsistemas.com.br";return{fetchPlanosEGrupos:i=>a.get("/contrate/planos-e-grupos",{baseURL:e,params:{grupo:i!=null?i:"",tipoPlano:window.location.hostname.includes("parceiro")?1:0}})}},N3=Ae;var A1=[{label:"Mensais",value:0},{label:"Trimestrais",value:1},{label:"Semestrais",value:2},{label:"Anuais",value:3}];var ke=({onClose:a})=>{let e=H(m=>m.fetchedMeuPlano),c=H(m=>m.fetchMeuPlano),i=H(m=>m.codigoGrupo),r=H(m=>m.periodicidade),l=H(m=>m.getMeuPlanoData),h=v(m=>m.telefoneSuporte),o=v(m=>m.planosDialog.mostrarPlanosDeterminados),d=v(m=>m.planosDialog.esconderPeriodicidade),u=v(m=>m.planosDialog.onContratarSuccess),g=V(m=>m.handleErrors),f=V(m=>m.setLoading),n=V(m=>m.toggleNotification),[t,p]=Re(null),{fetchPlanosEGrupos:Z}=N3(),{contratarPlano:D,contratarRecurso:G}=w(),j=!e||!t,l1=U3(()=>{let m={};return e&&typeof r=="number"&&(m.filtroPeriodicidade=A1[r]),m},[r]),J=U3(()=>{let m=[];return t!=null&&t.planos&&(t.planos.mensais.length&&m.push(A1[0]),t.planos.trimestrais.length&&m.push(A1[1]),t.planos.semestrais.length&&m.push(A1[2]),t.planos.anuais.length&&m.push(A1[3])),m},[t]),$1=!d&&!(o!=null&&o.codigoPlanoValor)&&J.length>1;O3(()=>{e||c()},[e]),O3(()=>{e&&!t&&T1()},[e,t]);let T1=()=>y(void 0,null,function*(){let m=i;o!=null&&o.codigoGrupo&&(m=o.codigoGrupo);try{let b=yield Z(m),x=M({},b.data);x.planos&&![...x.planos.mensais,...x.planos.trimestrais,...x.planos.semestrais,...x.planos.anuais].length&&(x.planos=null),p(x)}catch(b){g(b)}}),P0=m=>y(void 0,null,function*(){try{if(!m.planoSelecionado)throw{error:"Ocorreu um erro inesperado"};f(!0);let b={codigoPlano:m.planoSelecionado.codigo,codigoPlanoValor:m.planoSelecionado.codigoPlanoValor};yield D(b);let x=()=>{u==null||u(l(),m.planoSelecionado),n({title:"Seu plano foi atualizado com sucesso."}),c(),a()},B=Object.entries(m.recursosSelecionados||{});if(B.length){let c1=[];B.forEach(([T,W1])=>{var j1,t2;if(W1){let s2=(t2=(j1=m.planoSelecionado)==null?void 0:j1.recursos)==null?void 0:t2.find(y4=>y4.slugRecurso===T);s2&&c1.push(s2)}});let a1=yield S0(c1);if(a1.length){let T=a1.map(W1=>W1.nomeRecurso);x(),n({title:"Ocorreu um erro ao contratar os seguintes recursos:",message:T.join(" ; "),autoHideDuration:1e4})}else x()}else x();f(!1)}catch(b){g(b)}}),S0=m=>{let b=[];return new Promise(x=>{let B=c1=>{let a1=c1.shift();if(!a1)return x(b);G(Number(a1.codigoRecurso)).catch(()=>b.push(a1)).finally(()=>B(c1))};B([...m])})};return{telefoneSuporte:h,handleContratarPlano:P0,isLoading:j,mostrarPeriodicidade:$1,filtroPeriodicidadeOptions:J,initialValues:l1,planosEGrupos:t,getDialogTitle:m=>m?m.periodicidade!==r?"Contratar plano":m.valorMensalMenorQueAtual?"Diminuir plano":"Aumentar plano":"Meus planos"}},$3=ke;import{Fragment as Fe,jsx as z,jsxs as j3}from"react/jsx-runtime";function C0({onClose:a}){let{open:e,onCloseDialog:c}=W(a),{isLoading:i,mostrarPeriodicidade:r,filtroPeriodicidadeOptions:l,handleContratarPlano:h,telefoneSuporte:o,initialValues:d,planosEGrupos:u,getDialogTitle:g}=$3({onClose:c}),f=n=>i?z(g3,{}):u!=null&&u.planos?n?z(B3,{}):z(P3,{planos:u.planos}):z(z3,{});return z(V0,{open:e,onClose:c,fullWidth:!0,maxWidth:"xl",closeIcon:!0,disableBackdropClick:!0,children:z(we,{onSubmit:h,defaultValues:d,style:{display:"flex",flexDirection:"column",overflowY:"auto"},children:({watch:n,setValue:t})=>{let p=n("planoSelecionado");return j3(Fe,{children:[z(V0.Header,{children:j3("div",{style:{display:"flex",flex:1,justifyContent:"space-between"},children:[z(Ee,{variant:"titleMD",children:g(p)}),r&&!p&&z(Ie,{name:"filtroPeriodicidade",options:l,style:{minWidth:"7rem",marginRight:"0.5rem"}})]})}),z(V0.Content,{children:f(!!p)}),z(V0.Footer,{children:p?z(W3,{variant:"neutral",disableRipple:!0,onClick:()=>{t("planoSelecionado",void 0),t("recursosSelecionados",void 0)},children:"Voltar"}):z(W3,{variant:"outlined",color:"neutral",startIcon:z(Te,{icon:i0,size:"22px",removeMargin:!0}),style:{color:Ge.neutral[100]},onClick:()=>o0(o),children:"Preciso de Ajuda"})})]})}})})}import{Fragment as Oe,jsx as E,jsxs as h1}from"react/jsx-runtime";function K3(){let{valor:a,recursos:e,nomePlano:c,periodicidade:i,getValorTotalPlano:r,fetchedMeuPlano:l}=H(),h=v(n=>n.meuPlano.esconderPlanos),o=v(n=>n.meuPlano.esconderLojaDeRecursos),[d,u]=Be(null),g=Ne("(max-width: 400px)"),f=e==null?void 0:e.filter(n=>n.recursoContratado).sort((n,t)=>n.valorRecurso-t.valorRecurso);return l?h1(Oe,{children:[E(N,{style:{padding:"1.5rem"},children:h1(N1,{container:!0,children:[E(N1,{item:!0,xs:12,textAlign:"center",children:E(m1,{variant:"titleSM",children:e?"Valor Total":"Valor do plano"})}),h1(N1,{item:!0,xs:12,display:"flex",justifyContent:"center",alignItems:"end",children:[E(m1,{variant:"titleXXS",alignSelf:"center",children:"R$"}),E(m1,{variant:"titleXL",style:{fontSize:"3rem"},children:ze.format(r())}),h1(m1,{variant:"titleMD",marginBottom:"0.3rem",children:["/",q(i)]})]}),h1(N1,{item:!0,xs:12,marginTop:"2rem",children:[h1("div",{style:{display:"flex",justifyContent:"space-between"},children:[E(m1,{variant:"bodySM",children:c!=null&&c.includes("Plano")?c:`Plano ${c}`}),E(m1,{variant:"titleXS",children:Y3.format(a!=null?a:0)})]}),!!(f!=null&&f.length)&&f.map(n=>{var t;return h1("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"0.2rem"},children:[E(m1,{variant:"bodySM",color:Q3.neutral[100],children:n.nomeRecurso}),E(m1,{variant:"titleXS",color:Q3.neutral[100],children:Y3.format((t=n.valorRecurso)!=null?t:0)})]},n.codigoRecurso)})]}),h1(N1,{item:!0,xs:12,display:"flex",flexDirection:g?"column":"row",justifyContent:"space-between",gap:"0.5rem",marginTop:"2rem",children:[!h&&E(X3,{startIcon:E(_3,{icon:H1,removeMargin:!0}),fullWidth:g||o,onClick:()=>u("planos"),children:"Ver planos"}),!o&&E(X3,{variant:"outlined",disabled:!e,startIcon:E(_3,{icon:b2,removeMargin:!0}),fullWidth:g||h,onClick:()=>u("recursos"),children:"Loja de recursos"})]})]})}),d==="recursos"&&E(Z0,{onClose:()=>u(null)}),d==="planos"&&E(C0,{onClose:()=>u(null)})]}):E(N,{centerContent:!0,height:"60vh",children:E(qe,{})})}import{CircularProgress as Ye,Grid as o2,LIcon as Qe,Typography as Ke}from"@s_mart/core";import{DataTable as Je}from"@s_mart/data";import{Grid as b0,Typography as J3}from"@s_mart/core";import{jsx as g1,jsxs as Ue}from"react/jsx-runtime";function a4(){let a=v(e=>e.meuPlano.faturasEmptyStateImg);return g1(N,{children:Ue(b0,{container:!0,spacing:2,flexDirection:"column",justifyContent:"center",alignItems:"center",minHeight:"25rem",children:[!!a&&g1(b0,{item:!0,children:g1("img",{src:a})}),g1(b0,{item:!0,textAlign:"center",children:g1(J3,{variant:"titleMD",children:"Nenhuma fatura para mostrar"})}),g1(b0,{item:!0,children:g1(J3,{variant:"bodyMD",children:"Voc\xEA n\xE3o possui faturas."})})]})})}import{useMemo as e4}from"react";import{Chip as $e,LIcon as We,Tooltip as je,Typography as x0}from"@s_mart/core";import{valor as Xe}from"@s_mart/masks";import{colorPalette as R1}from"@s_mart/tokens";import{downloadFile as i2}from"@s_mart/utils";import O1 from"dayjs";import{jsx as d1}from"react/jsx-runtime";var _e=()=>{let a=H(n=>n.cobrancas),e=H(n=>n.fetchedCobrancas),c=V(n=>n.handleErrors),i=V(n=>n.setLoading),{fetchBoleto:r,fetchNfse:l}=w(),h=e4(()=>{let n=null;return e?a.length||(n="empty"):n="loading",n},[e,a]),o=n=>{switch(n.value){case"EMITIDO":{let t=O1().startOf("day"),p=O1(n.row.dataVencimento.replace("Z","")).startOf("day");return t.isAfter(p)&&(O1(p).day()===6?p=p.add(2,"d"):O1(p).day()===0&&(p=p.add(1,"d"))),t.isAfter(p)?{label:"Vencida",color:R1.red[100]}:{label:"A pagar",color:R1.neutral[30]}}case"LIQUIDADO":return{label:"Paga",color:R1.green[100]};case"ISENTADO":return{label:"Isenta",color:R1.neutral[50]};default:return{label:"",color:R1.neutral[0]}}},d=n=>{switch(n.row.situacao){case"EMITIDO":return{label:"Baixar boleto",onClick:()=>u(n.row.identificador)};case"LIQUIDADO":return{label:"Baixar nota",onClick:()=>g(n.row.identificador)}}},u=n=>y(void 0,null,function*(){try{i(!0);let t=yield r(n);t.data.boleto&&i2(t.data.boleto,`Boleto_${n}.pdf`,"application/pdf")}catch(t){c(t)}finally{i(!1)}}),g=n=>y(void 0,null,function*(){try{i(!0);let t=yield l(n);t.data&&(t.data.xml&&i2(t.data.xml,`${t.data.xml}-nfse.xml`,"text/xml"),t.data.danfse?i2(t.data.danfse,`${t.data.danfse}-danfse.pdf`,"application/pdf"):t.data.link_impressao_danfse&&window.open(t.data.link_impressao_danfse,"_blank","noopener=yes,noreferrer=yes"))}catch(t){c(t)}finally{i(!1)}}),f=e4(()=>[{field:"dataVencimento",headerName:"Vencimento",flex:2,minWidth:100,renderCell:({formattedValue:n})=>d1(x0,{variant:"bodySM",children:n}),valueFormatter:({value:n})=>O1(n).format("DD/MM/YYYY")},{field:"situacao",headerName:"Situa\xE7\xE3o",flex:5,minWidth:115,valueGetter:o,renderCell:({value:n})=>d1($e,{label:n.label,style:{backgroundColor:n.color,minWidth:"6.5rem"}})},{field:"descricao",headerName:"Ref",renderCell:({value:n})=>d1(je,{title:d1(x0,{variant:"bodySM",children:n}),children:d1("div",{children:d1(We,{icon:V2,color:R1.neutral[100]})})}),flex:1},{field:"valor",headerName:"Valor",flex:1,minWidth:100,renderCell:({formattedValue:n})=>d1(x0,{variant:"titleXS",children:n}),valueFormatter:({value:n})=>Xe.format(n)},{field:"acao",headerName:"A\xE7\xF5es",flex:1.5,minWidth:110,renderCell:({value:n})=>!!n&&d1(x0,{variant:"bodySM",style:{textDecorationLine:"underline",cursor:"pointer"},onClick:n.onClick,children:n.label}),valueGetter:d}],[]);return{faturasList:a,tableStatus:h,tableColumns:f,fetchedCobrancas:e}},c4=_e;import{jsx as p1,jsxs as i4}from"react/jsx-runtime";function o4(){let{faturasList:a,tableStatus:e,tableColumns:c,fetchedCobrancas:i}=c4();return i?e==="empty"?p1(a4,{}):p1(N,{children:i4(o2,{container:!0,children:[i4(o2,{item:!0,xs:12,display:"flex",alignItems:"center",paddingBottom:"0.5rem",children:[p1(Qe,{icon:j2,size:"25px"}),p1(Ke,{variant:"titleSM",children:"Gerenciamento de faturas"})]}),p1(o2,{item:!0,xs:12,maxHeight:"65vh",overflow:"auto",children:p1(Je,{rows:a,loading:e==="loading",columns:c,getRowId:r=>r.identificador||r.dataVencimento+r.valor,disableRowSelectionOnClick:!0})})]})}):p1(N,{centerContent:!0,height:"60vh",children:p1(Ye,{})})}import{Grid as a5,LIcon as e5,Typography as c5}from"@s_mart/core";import{colorPalette as i5}from"@s_mart/tokens";import{jsx as l2,jsxs as o5}from"react/jsx-runtime";function l4({link:a}){return l2(a5,{item:!0,display:"flex",marginTop:"1.5rem",children:o5("a",{href:a,rel:"noopener noreferrer",target:"_blank",style:{display:"flex",alignItems:"center",color:i5.neutral[100]},children:[l2(c5,{variant:"bodySM",children:"Termos de uso"}),l2(e5,{icon:y2})]})})}import l5 from"@emotion/styled";import{Grid as r5}from"@s_mart/core";var r4=l5(r5)`
|
|
194
|
+
`;import{useFormContext as De}from"react-hook-form";var Ae=()=>{let{watch:a,getValues:e}=De(),c=e("planoSelecionado"),i=a("recursosSelecionados"),n=()=>{let t=[];return c.recursos&&(t=c.recursos.filter(o=>!o.valorRecurso)),Object.entries(i||{}).forEach(([o,s])=>{var h;if(s){let g=(h=c.recursos)==null?void 0:h.find(f=>f.slugRecurso===o);g&&t.push(g)}}),t};return{getValorTotal:t=>{let o=n(),s=t?0:c.valorPeriodicoPromocional||c.valorPeriodico;return o.reduce((g,f)=>g+f.valorRecurso,s)},getRecursos:n,planoSelecionado:c}},B3=Ae;import{Fragment as Te,jsx as B,jsxs as m1}from"react/jsx-runtime";function z3(){let[a,e]=Re(!1),{planoSelecionado:c,getRecursos:i,getValorTotal:n}=B3();return m1(Te,{children:[m1(F3,{container:!0,children:[B(V0,{item:!0,xs:12,style:{marginBottom:"1.5rem"},children:B(K,{variant:"titleMD",align:"center",children:c.nome})}),B(V0,{item:!0,xs:12,children:B(K,{variant:"titleSM",children:"Valor do plano"})}),m1(V0,{item:!0,xs:12,children:[B(K,{variant:"bodyLG",style:{alignSelf:"center"},children:"R$"}),B(K,{variant:"titleXXL",children:Number(n().toFixed(2))}),m1(K,{variant:"bodyLG",style:{alignSelf:"end"},children:["/",z(c.periodicidade)]})]}),B(q3,{item:!0,xs:12,style:{marginBottom:"1rem"},children:B(ke,{size:"large",fullWidth:!0,onClick:()=>e(!0),children:"Contratar agora"})}),m1(q3,{item:!0,xs:12,children:[m1(C0,{children:[B(K,{variant:"bodyMD",children:c.nome}),B(K,{variant:"bodyMD",children:r2.format(c.valorPeriodicoPromocional||c.valorPeriodico)})]}),m1(C0,{children:[B(K,{variant:"bodySM",children:"Subtotal recursos"}),B(K,{variant:"bodySM",children:r2.format(n(!0))})]}),i().map(r=>m1(C0,{children:[B(K,{variant:"bodySM",children:r.nomeRecurso}),B(K,{variant:"bodySM",children:r2.format(r.valorRecurso)})]},r.codigoRecurso))]})]}),a&&B(I3,{onClose:()=>e(!1)})]})}import{jsx as b0,jsxs as Ee}from"react/jsx-runtime";function N3(){return Ee(n2,{container:!0,spacing:2,children:[b0(n2,{item:!0,xs:12,md:7,children:b0(T3,{})}),b0(n2,{item:!0,xs:12,md:5,style:{display:"flex",justifyContent:"center",alignItems:"start"},children:b0(z3,{})})]})}import{Grid as x0,Typography as O3}from"@s_mart/core";import{jsx as A1,jsxs as we}from"react/jsx-runtime";function U3(){let a=Z(e=>e.planosDialog.emptyStateImg);return we(x0,{container:!0,spacing:2,direction:"column",alignItems:"center",padding:"1rem 0",children:[!!a&&A1(x0,{item:!0,children:A1("img",{src:a})}),A1(x0,{item:!0,textAlign:"center",children:A1(O3,{variant:"titleMD",children:"Voc\xEA precisa de um plano especial"})}),A1(x0,{item:!0,textAlign:"center",children:A1(O3,{variant:"bodyMD",children:"Para trocar de plano solicite ajuda da nossa equipe no bot\xE3o abaixo."})})]})}import{useEffect as $3,useMemo as j3,useState as Ge}from"react";var Ie=()=>{var c;let a=Z.getState().axiosInstance,e=(c=a.defaults.baseURL)!=null&&c.includes("staging")?"https://apistaging-controle.sbsistemas.com.br":"https://apicontrole.sbsistemas.com.br";return{fetchPlanosEGrupos:i=>a.get("/contrate/planos-e-grupos",{baseURL:e,params:{grupo:i!=null?i:"",tipoPlano:window.location.hostname.includes("parceiro")?1:0}})}},W3=Ie;var R1=[{label:"Mensais",value:0},{label:"Trimestrais",value:1},{label:"Semestrais",value:2},{label:"Anuais",value:3}];var Fe=({onClose:a})=>{let e=y(p=>p.fetchedMeuPlano),c=y(p=>p.fetchMeuPlano),i=y(p=>p.codigoGrupo),n=y(p=>p.periodicidade),r=y(p=>p.getMeuPlanoData),t=Z(p=>p.telefoneSuporte),o=Z(p=>p.planosDialog.mostrarPlanosDeterminados),s=Z(p=>p.planosDialog.esconderPeriodicidade),h=Z(p=>p.planosDialog.onContratarSuccess),g=V(p=>p.handleErrors),f=V(p=>p.setLoading),v=V(p=>p.toggleNotification),[l,d]=Ge(null),{fetchPlanosEGrupos:u}=W3(),{contratarPlano:x,contratarRecurso:F}=I(),X=!e||!l,r1=j3(()=>{let p={};return e&&typeof n=="number"&&(p.filtroPeriodicidade=R1[n]),p},[n]),a1=j3(()=>{let p=[];return l!=null&&l.planos&&(l.planos.mensais.length&&p.push(R1[0]),l.planos.trimestrais.length&&p.push(R1[1]),l.planos.semestrais.length&&p.push(R1[2]),l.planos.anuais.length&&p.push(R1[3])),p},[l]),X1=!s&&!(o!=null&&o.codigoPlanoValor)&&a1.length>1;$3(()=>{e||c()},[e]),$3(()=>{e&&!l&&w1()},[e,l]);let w1=()=>H(void 0,null,function*(){let p=i;o!=null&&o.codigoGrupo&&(p=o.codigoGrupo);try{let b=yield u(p),P=M({},b.data);P.planos&&![...P.planos.mensais,...P.planos.trimestrais,...P.planos.semestrais,...P.planos.anuais].length&&(P.planos=null),d(P)}catch(b){g(b)}}),R0=p=>H(void 0,null,function*(){try{if(!p.planoSelecionado)throw{error:"Ocorreu um erro inesperado"};f(!0);let b={codigoPlano:p.planoSelecionado.codigo,codigoPlanoValor:p.planoSelecionado.codigoPlanoValor};yield x(b);let P=()=>{h==null||h(r(),p.planoSelecionado),v({title:"Seu plano foi atualizado com sucesso."}),c(),a()},q=Object.entries(p.recursosSelecionados||{});if(q.length){let i1=[];q.forEach(([E,_1])=>{var Y1,h2;if(_1){let p2=(h2=(Y1=p.planoSelecionado)==null?void 0:Y1.recursos)==null?void 0:h2.find(b4=>b4.slugRecurso===E);p2&&i1.push(p2)}});let e1=yield k0(i1);if(e1.length){let E=e1.map(_1=>_1.nomeRecurso);P(),v({title:"Ocorreu um erro ao contratar os seguintes recursos:",message:E.join(" ; "),autoHideDuration:1e4})}else P()}else P();f(!1)}catch(b){g(b)}}),k0=p=>{let b=[];return new Promise(P=>{let q=i1=>{let e1=i1.shift();if(!e1)return P(b);F(Number(e1.codigoRecurso)).catch(()=>b.push(e1)).finally(()=>q(i1))};q([...p])})};return{telefoneSuporte:t,handleContratarPlano:R0,isLoading:X,mostrarPeriodicidade:X1,filtroPeriodicidadeOptions:a1,initialValues:r1,planosEGrupos:l,getDialogTitle:p=>p?p.periodicidade!==n?"Contratar plano":p.valorMensalMenorQueAtual?"Diminuir plano":"Aumentar plano":"Meus planos"}},X3=Fe;import{Fragment as Ue,jsx as N,jsxs as Y3}from"react/jsx-runtime";function S0({onClose:a}){let{open:e,onCloseDialog:c}=j(a),{isLoading:i,mostrarPeriodicidade:n,filtroPeriodicidadeOptions:r,handleContratarPlano:t,telefoneSuporte:o,initialValues:s,planosEGrupos:h,getDialogTitle:g}=X3({onClose:c}),f=v=>i?N(y3,{}):h!=null&&h.planos?v?N(N3,{}):N(D3,{planos:h.planos}):N(U3,{});return N(P0,{open:e,onClose:c,fullWidth:!0,maxWidth:"xl",closeIcon:!0,disableBackdropClick:!0,children:N(ze,{onSubmit:t,defaultValues:s,style:{display:"flex",flexDirection:"column",overflowY:"auto"},children:({watch:v,setValue:l})=>{let d=v("planoSelecionado");return Y3(Ue,{children:[N(P0.Header,{children:Y3("div",{style:{display:"flex",flex:1,justifyContent:"space-between"},children:[N(qe,{variant:"titleMD",children:g(d)}),n&&!d&&N(Ne,{name:"filtroPeriodicidade",options:r,style:{minWidth:"7rem",marginRight:"0.5rem"}})]})}),N(P0.Content,{children:f(!!d)}),N(P0.Footer,{children:d?N(_3,{variant:"neutral",disableRipple:!0,onClick:()=>{l("planoSelecionado",void 0),l("recursosSelecionados",void 0)},children:"Voltar"}):N(_3,{variant:"outlined",color:"neutral",startIcon:N(Be,{icon:n0,size:"22px",removeMargin:!0}),style:{color:Oe.neutral[100]},onClick:()=>t0(o),children:"Preciso de Ajuda"})})]})}})})}import{Fragment as _e,jsx as w,jsxs as h1}from"react/jsx-runtime";function e4(){let{valor:a,recursos:e,nomePlano:c,periodicidade:i,getValorTotalPlano:n,fetchedMeuPlano:r}=y(),t=Z(v=>v.meuPlano.esconderPlanos),o=Z(v=>v.meuPlano.esconderLojaDeRecursos),[s,h]=We(null),g=Xe("(max-width: 400px)"),f=e==null?void 0:e.filter(v=>v.recursoContratado).sort((v,l)=>v.valorRecurso-l.valorRecurso);return r?h1(_e,{children:[w(O,{style:{padding:"1.5rem",borderRadius:"8px"},children:h1(U1,{container:!0,children:[w(U1,{item:!0,xs:12,textAlign:"center",children:w(d1,{variant:"titleSM",children:e?"Valor Total":"Valor do plano"})}),h1(U1,{item:!0,xs:12,display:"flex",justifyContent:"center",alignItems:"end",children:[w(d1,{variant:"titleXXS",alignSelf:"center",children:"R$"}),w(d1,{variant:"titleXL",style:{fontSize:"3rem"},children:je.format(n())}),h1(d1,{variant:"titleMD",marginBottom:"0.3rem",children:["/",z(i)]})]}),h1(U1,{item:!0,xs:12,marginTop:"2rem",children:[h1("div",{style:{display:"flex",justifyContent:"space-between"},children:[w(d1,{variant:"bodySM",children:c!=null&&c.includes("Plano")?c:`Plano ${c}`}),w(d1,{variant:"titleXS",children:K3.format(a!=null?a:0)})]}),!!(f!=null&&f.length)&&f.map(v=>{var l;return h1("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"0.2rem"},children:[w(d1,{variant:"bodySM",color:a4.neutral[100],children:v.nomeRecurso}),w(d1,{variant:"titleXS",color:a4.neutral[100],children:K3.format((l=v.valorRecurso)!=null?l:0)})]},v.codigoRecurso)})]}),h1(U1,{item:!0,xs:12,display:"flex",flexDirection:g?"column":"row",justifyContent:"space-between",gap:"0.5rem",marginTop:"2rem",children:[!t&&w(Q3,{startIcon:w(J3,{icon:H1,removeMargin:!0}),fullWidth:g||o,onClick:()=>h("planos"),children:"Ver planos"}),!o&&w(Q3,{variant:"outlined",disabled:!e,startIcon:w(J3,{icon:S2,removeMargin:!0}),fullWidth:g||t,onClick:()=>h("recursos"),children:"Loja de recursos"})]})]})}),s==="recursos"&&w(y0,{onClose:()=>h(null)}),s==="planos"&&w(S0,{onClose:()=>h(null)})]}):w(O,{centerContent:!0,height:"60vh",children:w($e,{})})}import{Chip as c5,CircularProgress as i5,Grid as D0,LIcon as o5,Typography as T1}from"@s_mart/core";import{DataTable as l5,List as r4}from"@s_mart/data";import{useMediaQuery as r5}from"@s_mart/hooks";import{colorPalette as $1}from"@s_mart/tokens";import{valor as n5}from"@s_mart/masks";import t5 from"dayjs";import{Grid as L0,Typography as c4}from"@s_mart/core";import{jsx as Z1,jsxs as Ye}from"react/jsx-runtime";function i4(){let a=Z(e=>e.meuPlano.faturasEmptyStateImg);return Z1(O,{children:Ye(L0,{container:!0,spacing:2,flexDirection:"column",justifyContent:"center",alignItems:"center",minHeight:"25rem",children:[!!a&&Z1(L0,{item:!0,children:Z1("img",{src:a})}),Z1(L0,{item:!0,textAlign:"center",children:Z1(c4,{variant:"titleMD",children:"Nenhuma fatura para mostrar"})}),Z1(L0,{item:!0,children:Z1(c4,{variant:"bodyMD",children:"Voc\xEA n\xE3o possui faturas."})})]})})}import{useMemo as o4}from"react";import{Chip as Qe,LIcon as Je,Tooltip as Ke,Typography as t2}from"@s_mart/core";import{valor as a5}from"@s_mart/masks";import{colorPalette as k1}from"@s_mart/tokens";import{downloadFile as s2}from"@s_mart/utils";import W1 from"dayjs";import{jsx as g1}from"react/jsx-runtime";var e5=()=>{let a=y(l=>l.cobrancas),e=y(l=>l.fetchedCobrancas),c=S(l=>l.email),i=V(l=>l.handleErrors),n=V(l=>l.setLoading),{fetchBoleto:r,fetchNfse:t}=I(),o=o4(()=>{let l=null;return e?a.length||(l="empty"):l="loading",l},[e,a]),s=l=>{var d;switch(l.situacao){case"EMITIDO":{let u=W1().startOf("day"),x=W1((d=l.dataVencimento)==null?void 0:d.replace("Z","")).startOf("day");return u.isAfter(x)&&(W1(x).day()===6?x=x.add(2,"d"):W1(x).day()===0&&(x=x.add(1,"d"))),u.isAfter(x)?{label:"Vencida",color:k1.red[100]}:{label:"A pagar",color:k1.neutral[30]}}case"LIQUIDADO":return{label:"Paga",color:k1.green[100]};case"ISENTADO":return{label:"Isenta",color:k1.neutral[50]};default:return{label:"",color:k1.neutral[0]}}},h=l=>{switch(l.situacao){case"EMITIDO":return{label:"Baixar boleto",onClick:()=>g(l.identificador)};case"LIQUIDADO":return{label:"Baixar nota",onClick:()=>f(l.identificador)}}},g=l=>H(void 0,null,function*(){try{n(!0);let d=yield r(l);d.data.boleto&&s2(d.data.boleto,`Boleto_${l}.pdf`,"application/pdf")}catch(d){i(d)}finally{n(!1)}}),f=l=>H(void 0,null,function*(){try{n(!0);let d=yield t(l);d.data&&(d.data.xml&&s2(d.data.xml,`${d.data.xml}-nfse.xml`,"text/xml"),d.data.danfse?s2(d.data.danfse,`${d.data.danfse}-danfse.pdf`,"application/pdf"):d.data.link_impressao_danfse&&window.open(d.data.link_impressao_danfse,"_blank","noopener=yes,noreferrer=yes"))}catch(d){i(d)}finally{n(!1)}}),v=o4(()=>[{field:"dataVencimento",headerName:"Vencimento",flex:2,minWidth:100,valueFormatter:({value:l})=>W1(l).format("DD/MM/YYYY")},{field:"situacao",headerName:"Situa\xE7\xE3o",flex:5,minWidth:115,valueGetter:l=>s(l.row),renderCell:({value:l})=>g1(Qe,{label:l.label,style:{backgroundColor:l.color,minWidth:"6.5rem"}})},{field:"descricao",headerName:"Ref",renderCell:({value:l})=>g1(Ke,{title:g1(t2,{variant:"bodySM",children:l}),children:g1("div",{children:g1(Je,{icon:x2,color:k1.neutral[100]})})}),flex:1},{field:"valor",headerName:"Valor",flex:1,minWidth:100,renderCell:({formattedValue:l})=>g1(t2,{variant:"titleXS",children:l}),valueFormatter:({value:l})=>a5.format(l)},{field:"acao",headerName:"A\xE7\xF5es",flex:1.5,minWidth:110,renderCell:({value:l})=>!!l&&g1(t2,{variant:"bodySM",style:{textDecorationLine:"underline",cursor:"pointer"},onClick:l.onClick,children:l.label}),valueGetter:l=>h(l.row)}],[]);return{faturasList:a,tableStatus:o,tableColumns:v,fetchedCobrancas:e,empresaEmail:c,getActions:h,getSituacao:s}},l4=e5;import{jsx as T,jsxs as f1}from"react/jsx-runtime";function n4(){let{faturasList:a,tableStatus:e,tableColumns:c,fetchedCobrancas:i,empresaEmail:n,getActions:r,getSituacao:t}=l4(),o=r5("(max-width: 700px)");return i?e==="empty"?T(i4,{}):T(O,{style:{borderRadius:"8px",padding:o?0:"1rem",boxShadow:o?"none":void 0},children:f1(D0,{container:!0,children:[f1(D0,{item:!0,xs:12,display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",paddingBottom:"0.5rem",children:[f1("div",{style:{display:"flex",alignItems:"center"},children:[T(o5,{icon:Y2,size:"25px"}),T(T1,{variant:"titleSM",children:"Gerenciamento de faturas"})]}),f1(T1,{variant:"bodySM",marginY:o?"0.5rem":void 0,children:["Boletos enviados para: ",o&&T("br",{})," ",T("strong",{children:n})]})]}),o?T(D0,{item:!0,xs:12,children:T(r4.Root,{data:a,isLoading:e==="loading",children:a.map((s,h)=>{let g=t(s),f=r(s),v=g.label==="Vencida";return f1(r4.ListItem,{index:h,style:{width:"calc(100% + 2rem)",marginLeft:"-1rem",padding:"1.5rem 1rem",backgroundColor:v?"#FFE3E3":void 0},children:[f1("div",{style:{display:"flex",justifyContent:"space-between"},children:[T(c5,{label:g.label,size:"small",style:{backgroundColor:g.color,minWidth:"6.5rem"}}),T(T1,{variant:"bodySM",color:v?$1.red[300]:void 0,children:t5(s.dataVencimento).format("DD/MM/YYYY")})]}),T("div",{style:{margin:"0.75rem 0"},children:T(T1,{variant:"bodyXS",color:v?$1.neutral[500]:$1.neutral[100],children:s.descricao})}),f1("div",{style:{display:"flex",justifyContent:"space-between"},children:[T(T1,{variant:"titleXS",color:v?$1.red[300]:void 0,children:n5.format(s.valor)}),!!f&&T(T1,{variant:"bodySM",color:v?$1.red[300]:void 0,fontWeight:v?700:void 0,style:{textDecorationLine:"underline",cursor:"pointer"},onClick:f.onClick,children:f.label})]})]},s.identificador||s.dataVencimento)})})}):T(D0,{item:!0,xs:12,sx:{overflow:"auto",maxHeight:"65vh","@media(max-height: 750px)":{maxHeight:"60vh"}},children:T(l5,{rows:a,loading:e==="loading",columns:c,getRowId:s=>s.identificador||s.dataVencimento,disableRowSelectionOnClick:!0})})]})}):T(O,{centerContent:!0,height:"60vh",children:T(i5,{})})}import{Grid as s5,LIcon as m5,Typography as d5}from"@s_mart/core";import{colorPalette as h5}from"@s_mart/tokens";import{jsx as m2,jsxs as p5}from"react/jsx-runtime";function t4({link:a}){return m2(s5,{item:!0,display:"flex",marginTop:"1.5rem",children:p5("a",{href:a,rel:"noopener noreferrer",target:"_blank",style:{display:"flex",alignItems:"center",color:h5.neutral[100]},children:[m2(d5,{variant:"bodySM",children:"Termos de uso"}),m2(m5,{icon:b2})]})})}import v5 from"@emotion/styled";import{Grid as u5}from"@s_mart/core";var s4=v5(u5)`
|
|
191
195
|
@media (min-width: 600px) {
|
|
192
196
|
max-width: 24rem;
|
|
193
197
|
}
|
|
194
|
-
`;import{useEffect as
|
|
198
|
+
`;import{useEffect as A0}from"react";var Z5=()=>{let a=y(h=>h.fetchedMeuPlano),e=y(h=>h.fetchedCobrancas),c=y(h=>h.fetchMeuPlano),i=y(h=>h.fetchCobrancas),n=S(h=>h.fetched),r=S(h=>h.fetchMinhaEmpresa),t=Z(h=>h.meuPlano.linkTermosDeUso),o=Z(h=>h.meuPlano.onRenderTabMeuPlano),s=Z(h=>h.meuPlano.esconderInformacoesPlano);return A0(()=>{a||c()},[a]),A0(()=>{e||i()},[e]),A0(()=>{n||r()},[n]),A0(()=>{o==null||o()},[]),{linkTermosDeUso:t,esconderInformacoesPlano:s}},m4=Z5;import{jsx as j1,jsxs as h4}from"react/jsx-runtime";function M5(){let{linkTermosDeUso:a,esconderInformacoesPlano:e}=m4(),c=f5("(max-width: 600px)");return j1(O,{style:{borderRadius:c?0:"0px 16px 16px 16px"},children:h4(d4,{container:!0,spacing:4,children:[!e&&h4(s4,{item:!0,xs:12,sm:7,md:5,lg:4,xl:3,children:[j1(e4,{}),!!a&&j1(t4,{link:a})]}),j1(d4,{item:!0,xs:12,md:7,lg:8,xl:6,children:j1(n4,{})})]})})}var p4=g5(M5);var H5={minhaEmpresa:j2,meuPlano:p4},V5=()=>{let a=Z(t=>t.tabAtiva),e=Z(t=>t.setTabAtiva),c=Z(t=>t.esconderTabMeuPlano),i=y5("(max-width:600px)"),n=v4(()=>{let t=[{label:"Minha empresa",value:"minhaEmpresa"},{label:"Meu plano",value:"meuPlano"}];return c&&(t=t.filter(o=>o.value!=="meuPlano")),t},[c]),r=v4(()=>H5[a||"minhaEmpresa"],[a]);return{tabs:n,tabAtiva:a,setTabAtiva:e,TabComponent:r,fullWidthTabs:i}},u4=V5;import{jsx as E1,jsxs as S5}from"react/jsx-runtime";function x5(){let{tabs:a,tabAtiva:e,setTabAtiva:c,TabComponent:i,fullWidthTabs:n}=u4();return S5(d2,{container:!0,children:[E1(d2,{item:!0,xs:12,sm:"auto",children:E1(b5,{variant:n?"fullWidth":"standard",items:a,value:e,onChange:(r,t)=>c(t)})}),E1(d2,{item:!0,xs:12,children:C5(E1(i,{}))})]})}function P5(a){return E1(y1,C(M({},a),{children:E1(x5,{})}))}import{Button as A5,Typography as R5}from"@s_mart/core";import Z4 from"@emotion/styled";import{Grid as g4}from"@s_mart/core";var f4=Z4(g4)`
|
|
195
199
|
height: 100vh;
|
|
196
200
|
|
|
197
201
|
background: ${({theme:a})=>{var e,c;return(c=(e=a==null?void 0:a.palette)==null?void 0:e.primary)==null?void 0:c.main}};
|
|
198
|
-
`,Z4
|
|
202
|
+
`,M4=Z4(g4)`
|
|
199
203
|
display: flex;
|
|
200
204
|
flex-direction: column;
|
|
201
205
|
align-items: center;
|
|
@@ -204,4 +208,4 @@ var V4=Object.defineProperty,C4=Object.defineProperties;var b4=Object.getOwnProp
|
|
|
204
208
|
background-color: #ffffff;
|
|
205
209
|
padding: 32px;
|
|
206
210
|
border-radius: 8px;
|
|
207
|
-
`;import{useEffect as
|
|
211
|
+
`;import{useEffect as L5}from"react";var D5=(a,e)=>{let c=V(o=>o.handleErrors);K1();let{confirmarEmailEmpresa:i,confirmarEmailResponsavel:n}=I(),r=new URLSearchParams(window.location.search).get("token");L5(()=>{t()},[r]);let t=()=>H(void 0,null,function*(){var o;try{r&&(e==="empresa"?yield i(a,r):e==="respons\xE1vel"&&(yield n(a,r)))}catch(s){let h=s;c(((o=h==null?void 0:h.response)==null?void 0:o.data)||s)}})},y4=D5;import{jsx as M1,jsxs as H4}from"react/jsx-runtime";function k5({apiUrl:a,imagem:e,onSubmit:c,tipo:i}){return y4(a,i),M1(f4,{container:!0,justifyContent:"center",alignItems:"center",children:H4(M4,{item:!0,sm:5,md:4,lg:3,children:[M1("div",{children:M1("img",{src:e,alt:"E-mail confirmado",style:{width:"150px"}})}),M1("div",{style:{display:"flex"},children:H4(R5,{variant:"bodyXL",align:"center",children:["E-mail ",i=="empresa"?"da":"do"," ",i,M1("br",{}),"alterado com sucesso!"]})}),M1("div",{children:M1(A5,{size:"large",onClick:c,children:"Continuar para o sistema"})})]})})}import{jsx as V4}from"react/jsx-runtime";function T5(r){var t=r,{onClose:a,axiosInstance:e,sistemaNome:c,telefoneSuporte:i}=t,n=J1(t,["onClose","axiosInstance","sistemaNome","telefoneSuporte"]);return V4(y1,C(M({},{axiosInstance:e,sistemaNome:c,telefoneSuporte:i,recursosDialog:n}),{children:V4(y0,{onClose:a})}))}import{jsx as C4}from"react/jsx-runtime";function E5(n){var r=n,{onClose:a,axiosInstance:e,telefoneSuporte:c}=r,i=J1(r,["onClose","axiosInstance","telefoneSuporte"]);return C4(y1,C(M({},{axiosInstance:e,telefoneSuporte:c,planosDialog:i}),{children:C4(S0,{onClose:a})}))}export{k5 as ConfirmarEmail,P5 as MinhaConta,E5 as PlanosDialog,T5 as RecursosDialog};
|