PageSourceSearch

https://espacodocliente.smartfit.com.br/_next/static/chunks/pages/renewal-4bf46889c96f4268.js

js smartfit.com.br collected 2026-10-01 12:05:39 UTC 18,523 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2387],{10317:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/renewal",function(){return t(38398)}])},37786:function(e,n,t){"use strict";var r=t(72253),i=t(47702),o=t(85893),a=t(67294),l=t(81126),s=t(88660);n.Z=(0,a.memo)(function(e){var n,t,c=e.name,u=e.label,d=e.altLabel,p=(e.hasError,e.onChange),m=e.inputHeight,f=e.inputWidth,h=e.backgroundColor,v=e.iconCheck,_=e.initialValue,x=void 0===_?void 0:_,b=(0,i._)(e,["name","label","altLabel","hasError","onChange","inputHeight","inputWidth","backgroundColor","iconCheck","initialValue"]),g=(0,a.useRef)(null),j=(0,l.U$)(c),y=j.fieldName,w=j.defaultValue,P=j.registerField,O=j.error,C=j.clearError;return(0,a.useEffect)(function(){P({name:y,ref:g.current,getValue:function(e){return e.checked},setValue:function(e,n){e.checked=null==n||n},clearValue:function(e){e.checked=!1}})},[y,P]),(0,a.useEffect)(function(){void 0!==x&&g.current&&(g.current.checked=!!x)},[x]),(0,o.jsx)(s.im,{children:(0,o.jsxs)(s.kC,{children:[(0,o.jsxs)(s.XZ,{backgroundColor:h,checked:null!==(t=null===(n=g.current)||void 0===n?void 0:n.checked)&&void 0!==t?t:x,error:!!O,children:[(0,o.jsx)(s.II,(0,r._)({id:y,type:"checkbox",ref:g,defaultValue:w,onChange:function(e){C(),p&&"function"==typeof p&&p(e)},inputHeight:m,inputWidth:f},b)),(0,o.jsx)(s.JO,{alt:"checkmark",src:null!=v?v:"/icons/icon-checkbox.svg"})]}),(0,o.jsxs)(s.__,{dangerouslySetInnerHTML:u&&{__html:u},children:[d,(0,o.jsx)(s.jj,{children:O&&(0,o.jsx)("span",{className:"error",children:O})})]})]})})})},88660:function(e,n,t){"use strict";t.d(n,{II:function(){return u},JO:function(){return d},XZ:function(){return c},__:function(){return l},im:function(){return o},jj:function(){return s},kC:function(){return a}});var r=t(82729),i=t(85444);function _templateObject(){var e=(0,r._)(["\n  font-weight: 400;\n"]);return _templateObject=function(){return e},e}function _templateObject1(){var e=(0,r._)(["\n  display: flex;\n  justify-content: flex-start;\n  align-items: flex-start;\n\n  input {\n    width: auto;\n    margin-right: 10px;\n  }\n"]);return _templateObject1=function(){return e},e}function _templateObject2(){var e=(0,r._)(["\n  font-size: 12px;\n  font-weight: 400;\n  flex: 1;\n"]);return _templateObject2=function(){return e},e}function _templateObject3(){var e=(0,r._)(["\n  color: #C92C3F;\n  font-weight: 400;\n"]);return _templateObject3=function(){return e},e}function _templateObject4(){var e=(0,r._)(["\n  max-width: 40px;\n  height: 40px;\n  flex: 0.5;\n  border-radius: 20%;\n  display: flex;\n  margin-right: 10px;\n  justify-content: center;\n  align-items: center;\n  border: ",";\n  background-color: ",";\n\n  img {\n    display: ",";\n    position: absolute;\n    filter: invert(75%) sepia(11%) saturate(6042%) hue- rotate(30deg) brightness(105%) contrast(68%);\n  }\n\n  @media (",") {\n    max-width: 24px;\n    height: 24px;\n  }\n\n"]);return _templateObject4=function(){return e},e}function _templateObject5(){var e=(0,r._)(["\n  overflow: hidden;\n  height: 23px;\n  visibility: hidden;\n"]);return _templateObject5=function(){return e},e}function _templateObject6(){var e=(0,r._)(["\n  width: 11px;\n"]);return _templateObject6=function(){return e},e}var o=i.ZP.div.withConfig({displayName:"styles__Wrapper",componentId:"sc-8df64873-0"})(_templateObject()),a=i.ZP.div.withConfig({displayName:"styles__Flex",componentId:"sc-8df64873-1"})(_templateObject1()),l=i.ZP.label.withConfig({displayName:"styles__Label",componentId:"sc-8df64873-2"})(_templateObject2()),s=i.ZP.div.withConfig({displayName:"styles__Error",componentId:"sc-8df64873-3"})(_templateObject3()),c=i.ZP.label.withConfig({displayName:"styles__Checkbox",componentId:"sc-8df64873-4"})(_templateObject4(),function(e){var n=e.checked,t=e.error;return n?"none":t?"1px solid #C92C3F":"1px solid #3B3B40"},function(e){var n=e.checked,t=e.backgroundColor,r=e.theme;return n?null!=t?t:r.colors.primary:"none"},function(e){return e.checked?"flex":"none"},function(e){return e.theme.sizes.large}),u=i.ZP.input.withConfig({displayName:"styles__Input",componentId:"sc-8df64873-5"}
1)(_templateObject5()),d=i.ZP.img.withConfig({displayName:"styles__Icon",componentId:"sc-8df64873-6"})(_templateObject6())},10253:function(e,n,t){"use strict";var r=t(82729);function _templateObject(){var e=(0,r._)(["\n  font-family: ",";\n  font-weight: 900;\n  margin: 3.2rem 0 4.8rem;\n  font-size: 24px;\n  line-height: 32px;\n  color: ",";\n"]);return _templateObject=function(){return e},e}var i=t(85444).ZP.h2.withConfig({displayName:"Title",componentId:"sc-7fa98e15-0"})(_templateObject(),function(e){return e.theme.fonts.highlight},function(e){return e.theme.colors.text});n.Z=i},38398:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSP:function(){return F},default:function(){return renewal}});var r=t(85893),i=t(67294),o=t(91546),a=t(14376),l=t(9008),s=t.n(l),c=t(11010),u=t(91309),d=t(97582),p=t(60369),m=t(11163),f=t(48303);function _postPlanRenewal(){return(_postPlanRenewal=(0,c._)(function(){return(0,d.Jh)(this,function(e){switch(e.label){case 0:return[4,(0,f.v_)("/api/v2/renewals/renewals",{}).then(function(e){return null==e?void 0:e.data}).catch(function(e){throw e})];case 1:return[2,e.sent()]}})})).apply(this,arguments)}var h=t(36705),v=t(21286),_=t(12460),x=t(7575),b=t(11672),g=t(98231),RenewalContent_useRenewal=function(){var e,n,t,r,o,a,l,s=(0,p.mM)(),f=(0,m.useRouter)(),j=(0,i.useRef)(null),y=null==s?void 0:null===(n=s.state)||void 0===n?void 0:n.translate,w=null==s?void 0:null===(t=s.state)||void 0===t?void 0:t.user,P=null==s?void 0:null===(r=s.state)||void 0===r?void 0:r.payment,O=null==w?void 0:null===(o=w.personal)||void 0===o?void 0:o.country_locale,C=null==P?void 0:P.userPayment,k=null==P?void 0:P.renewalPromotion,I="renewalBlackAvailable",R=(0,u._)((0,i.useState)(!1),2),N=R[0],Z=R[1],S=(0,u._)((0,i.useState)(!1),2),D=S[0],E=S[1],T=(0,u._)((0,i.useState)(!1),2),M=T[0],V=T[1],A=(0,u._)((0,i.useState)({}),2),L=A[0],H=A[1],goToPreviousPage=function(){window.history.replaceState(null,"","/"),null==f||f.push("".concat(O,"/"))},z=(e=(0,c._)(function(e){return(0,d.Jh)(this,function(n){switch(n.label){case 0:if(!e.renewal_term)return j.current.setFieldError("renewal_term",y["Deve ser selecionado"]),[2];Z(!0),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,function(){return _postPlanRenewal.apply(this,arguments)}()];case 2:return n.sent(),f.query.status="success",f.push(f),V(!0),[3,5];case 3:return n.sent(),f.query.status="error",f.push(f),E(!0),[3,5];case 4:return Z(!1),[7];case 5:return[2]}})}),function(n){return e.apply(this,arguments)}),handleCurrencyAndDate=function(e,n,t){var r,i=(0,x.OH)(null==e?void 0:e.value_of_first_memberships,O).toString(),o=(0,x.OH)(null==n?void 0:null===(r=n.black_membership)||void 0===r?void 0:r.price,O).toString();"pt-BR"===O&&(o=o.replace(/,(\d+)/,"<span>,$1</span>"),i=i.replace(/,(\d+)/,"<span>,$1</span>"));var a=new Date;H({firstPayment:{value:i,date:"".concat(null==t?void 0:t.lastDueDateDay,"/").concat((a.getMonth()+2).toString().padStart(2,"0"),"/").concat(a.getFullYear())},nextPayments:{value:o,date:"".concat(null==t?void 0:t.lastDueDateDay,"/").concat((a.getMonth()+Number(null==e?void 0:e.first_memberships)+2).toString().padStart(2,"0"),"/").concat(a.getFullYear())},promotionMonths:null==e?void 0:e.first_memberships})};return(0,i.useEffect)(function(){function _fetchData(){return(_fetchData=(0,c._)(function(){var e,n,t,r,i,o,a,l,c,u,p,m,f;return(0,d.Jh)(this,function(d){switch(d.label){case 0:if(d.trys.push([0,11,12,13]),r=C,i=k,o=sessionStorage.getItem(I),"black"!==w.plan.name.toLowerCase()||null!==o&&"false"===o)return[2,goToPreviousPage()];if(!(null!==o))return[3,1];return l=o,[3,3];case 1:return[4,(0,g.r)()];case 2:l=d.sent(),d.label=3;case 3:if((null==(a=l)?void 0:null===(e=a.data)||void 0===e?void 0:e.available)&&sessionStorage.setItem(I,null==a?void 0:null===(n=a.data)||void 0===n?void 0:n.available),!((null==a?void 0:null===(t=a.data)||void 0===t?void 0:t.available)||"true"===a))return[3,9];if(null==r?void 0:r.person_id)return[3,5];return[4,(0,v.bU)()];case 4:u=d.sent(),(0,_.Je)({user_payment:null==u?void 0:u.data,dispatch:null==s?void 0:s.dispatch}),r=null==u?void 0:u.data,d.label=5;case 5:if(null==i?void 0:i.id)return[3,7];return[4,(0,h.U)()];case 6:p=d.sent(),(0,_.nx)({promotion:null==p?void 0:p.data,dispatch:null==s?void 0:s.dispatch}),i=null==p?void 0:p.data,d.label=7;case 7:return[4,(0,b.z)({id:null==w?void 0:null===(c=w.location)||void 0===c?void 0:c.smart_system_id})];case 8:return m=d.sent().data,handleCurrencyAndDate(i,m,r),[3,10];case 9:return[2,goToPreviousPage()];case 10:return[3,13];case 11:return f=d.sent(),goToPreviousPage(),console.log(f),[3,13];case 12:return Z(!1),[7];case 13:return[2]}})})).apply(this,arguments)}Z(!0),function(){_fetchData.apply(this,arguments)}()},[null==s?void 0:null===(a=s.state)||void 0===a?void 0:a.user]),{t:y,isLoading:N,formRef:j,userName:null==w?void 0:null===(l=w.personal)||void 0===l?void 0:l.name,hasError:D,setHasError:E,successRenewal:M,goToPreviousPage:goToPreviousPage,onRenewalPlan:z,chargings:L,router:f}},j=t(82729),y=t(85444),w=t(10253),P=t(93207);
1function _templateObject(){var e=(0,j._)(["\n  position: relative;\n"]);return _templateObject=function(){return e},e}function _templateObject1(){var e=(0,j._)(["\n  font-size: 24px;\n  margin-bottom: 8px;\n"]);return _templateObject1=function(){return e},e}function _templateObject2(){var e=(0,j._)(["\n  font-size: 16px;\n  margin-bottom: 4rem;\n"]);return _templateObject2=function(){return e},e}function _templateObject3(){var e=(0,j._)(["\n  font-size: 14px;\n  margin-bottom: 4rem;\n"]);return _templateObject3=function(){return e},e}function _templateObject4(){var e=(0,j._)(["\n  font-size: 12px;\n  margin: 0px;\n  line-height: 16px;\n"]);return _templateObject4=function(){return e},e}function _templateObject5(){var e=(0,j._)(["\n  display: flex;\n  gap: 4px;\n  flex-direction: column;\n"]);return _templateObject5=function(){return e},e}function _templateObject6(){var e=(0,j._)(["\n  cursor: pointer;\n  font-family: ",";\n  color:",";\n  text-decoration: underline;\n"]);return _templateObject6=function(){return e},e}function _templateObject7(){var e=(0,j._)(["\n  font-size: 12px;\n  margin-top: 16px;\n  line-height: 16px;\n"]);return _templateObject7=function(){return e},e}function _templateObject8(){var e=(0,j._)(["\n  font-size: 14px;\n"]);return _templateObject8=function(){return e},e}function _templateObject9(){var e=(0,j._)(["\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  height: fit-content;\n"]);return _templateObject9=function(){return e},e}function _templateObject10(){var e=(0,j._)(["\n  color: ",";\n"]);return _templateObject10=function(){return e},e}function _templateObject11(){var e=(0,j._)(["\n  position: absolute;\n  top: 0;\n  background-color: white;\n  width: 100%;\n  height: 100%;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  padding: 32px;\n  text-align: center;\n  gap: 24px;\n"]);return _templateObject11=function(){return e},e}var O=y.ZP.div.withConfig({displayName:"styles__Container",componentId:"sc-939364e1-0"})(_templateObject()),C=(0,y.ZP)(w.Z).withConfig({displayName:"styles__TitleRenewal",componentId:"sc-939364e1-1"})(_templateObject1()),k=y.ZP.div.withConfig({displayName:"styles__Subtitle",componentId:"sc-939364e1-2"})(_templateObject2()),I=y.ZP.div.withConfig({displayName:"styles__Description",componentId:"sc-939364e1-3"})(_templateObject3()),R=y.ZP.h5.withConfig({displayName:"styles__Term",componentId:"sc-939364e1-4"})(_templateObject4()),N=y.ZP.div.withConfig({displayName:"styles__TermContainer",componentId:"sc-939364e1-5"})(_templateObject5()),Z=y.ZP.strong.withConfig({displayName:"styles__ButtonTerms",componentId:"sc-939364e1-6"})(_templateObject6(),function(e){return e.theme.fonts.highlight},function(e){return e.theme.buttons.action.default}),S=(0,y.ZP)(P.X2).withConfig({displayName:"styles__RowRenewal",componentId:"sc-939364e1-7"})(_templateObject7()),D=(0,y.ZP)(P.sg).withConfig({displayName:"styles__ColumnRenewal",componentId:"sc-939364e1-8"})(_templateObject8()),E=(0,y.ZP)(P.Lm).withConfig({displayName:"styles__UpgradeDetailsItemRenewal",componentId:"sc-939364e1-9"})(_templateObject9()),T=(0,y.ZP)(E).withConfig({displayName:"styles__UpgradeDetailsItemRenewalDark",componentId:"sc-939364e1-10"})(_templateObject10(),function(e){return e.theme.colors.white}),M=y.ZP.div.withConfig({displayName:"styles__ScreenContainer",componentId:"sc-939364e1-11"})(_templateObject11()),V=t(75026),A=t(19928),L=t(37786),H=t(83122),z=t(72108),RenewalContent=function(){var e,n,t,i,o,a,l,c,u,d=RenewalContent_useRenewal(),p=d.t,m=d.isLoading,f=d.formRef,h=d.userName,v=d.hasError,_=d.setHasError,x=d.successRenewal,b=d.goToPreviousPage,g=d.onRenewalPlan,j=d.chargings,y=d.router,w=p["Renove sua assinatura Black"];return(0,r.jsxs)(O,{children:[m&&(0,r.jsx)(A.Z,{}),(0,r.jsx)(s(),{children:(0,r.jsxs)("title",{children:[p["Smart Fit"]," - ",p["Espa\xe7o do Cliente"]," - ",w]})}),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(C,{children:p["Voc\xea est\xe1 renovando a sua assinatura"]}),(0,r.jsx)(k,{children:p["Em comemora\xe7\xe3o \xe0 renova\xe7\xe3o da sua assinatura voc\xea receber\xe1 desconto na primeira mensalidade. Aproveite!"]}),(0,r.jsxs)(P.qF,{children:[(0,r.jsxs)(T,{children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)(P.YD,{children:[(0,r.jsx)(P.sg,{visibility:!!(null==j?void 0:j.promotionMonths),children:(null==j?void 0:j.promotionMonths)>1?"1\xba ao ".concat(null==j?void 0:j.promotionMonths,"\xba m\xeas"):p["1\xaa cobran\xe7a"]}),(0,r.jsx)(P.sg,{visibility:!!(null==j?void 0:j.promotionMonths),dangerouslySetInnerHTML:{__html:(null==j?void 0:null===(e=j.firstPayment)||void 0===e?void 0:e.value)+"*"}})]}),(0,r.jsxs)(P.X2,{children:[(0,r.jsx)(D,{visibility:!!(null==j?void 0:null===(n=j.firstPayment)||void 0===n?void 0:n.date),children:p["Data da cobran\xe7a"]}),(0,r.jsx)(D,{visibility:!!(null==j?void 0:null===(t=j.firstPayment)||void 0===t?void 0:t.date),children:null==j?void 0:null===(i=j.firstPayment)||void 0===i?void 0:i.date})]})]}),(0,r.jsx)(S,{children:p["*Desconto promocional apenas para essa mensalidade."]})]}),(0,r.jsxs)(E,{children:[(0,r.jsx)("div",{children:(0,r.jsxs)(P.YD,{children:[(0,r.jsx)(P.sg,{visibility:!0,children:p["Mensalidades seguintes"]}),(0,r.jsx)(P.sg,{visibility:!!(null==j?void 0:null===(o=j.nextPayments)||void 0===o?void 0:o.value),dangerouslySetInnerHTML:{__html:(null==j?void 0:null===(a=j.nextPayments)||void 0===a?void 0:a.value)+"*"}})]})}),(0,r.jsxs)(P.X2,{children:[(0,r.jsx)(D,{visibility:!!(null==j?void 0:null===(l=j.nextPayments)||void 0===l?void 0:l.date),children:p["Data da cobran\xe7a"]}),(0,r.jsx)(D,{visibility:!!(null==j?void 0:null===(c=j.nextPayments)||void 0===c?void 0:c.date),children:null==j?void 0:null===(u=j.nextPayments)||void 0===u?void 0:u.date})]}),(0,r.jsx)(S,{children:p["*Esse \xe9 o valor do seu plano pelos pr\xf3ximos %{months} meses. Ap\xf3s o termino da promo\xe7\xe3o o valor do plano estar\xe1 sujeito a corre\xe7\xf5es de valores"].replace("%{months}",12-(null==j?void 0:j.promotionMonths))})]})]}),(0,r.jsx)(I,{children:p["As datas de cobran\xe7a da manuten\xe7\xe3o anual n\xe3o s\xe3o alteradas."]}),(0,r.jsxs)(H.l,{onSubmit:g,ref:f,placeholder:void 0,onPointerEnterCapture:void 0,onPointerLeaveCapture:void 0,children:[(0,r.jsx)(L.Z,{altLabel:(0,r.jsxs)(N,{children:[(0,r.jsxs)(R,{children:[p["Declaro que estou ciente e aceito as condi\xe7\xf5es estabelecidas nos"],(0,r.jsx)("a",{href:"https://smartfit.com.br/contratos/termosrenovacaoblack",target:"_blank",children:(0,r.jsxs)(Z,{children:[" ",p["termos de renova\xe7\xe3o da minha assinatura"]]})})]}),(0,r.jsx)(R,{children:p["A renova\xe7\xe3o do Plano Black \xe9 uma a\xe7\xe3o irrevers\xedvel. Ap\xf3s a confirma\xe7\xe3o, o plano ser\xe1 renovado com fidelidade de 12 meses."]})]}),name:"renewal_term",inputWidth:20,inputHeight:20}),(0,r.jsxs)(P.W4,{children:[(0,r.jsx)(V.Z,{variant:"secondary",type:"button",outlined:!0,borderRadius:"36px",textTransform:"uppercase",onClick:b,children:p.Voltar}),(0,r.jsx)(V.Z,{variant:"secondary",type:"submit",borderRadius:"36px",textTransform:"uppercase",children:p["Renovar assinatura"]})]})]}),v&&(0,r.jsx)(function(){return(0,r.jsx)(z.Z,{icon:(0,r.jsx)("img",{src:"/icons/bell-fail.svg",alt:"Error Modal"}),showing:!0,title:p["OPS, ocorreu um erro!"],message:p["No momento n\xe3o foi poss\xedvel renovar a sua assinatura.  Por favor, tente novamente em alguns minutos ou dirija-se na sua unidade."],onClose:function(){var e=y.query;new URLSearchParams(e).delete("status"),_(!1)}})},{}),x&&(0,r.jsx)(function(){return(0,r.jsxs)(M,{children:[(0,r.jsx)("img",{src:"/icons/bell-with-background.svg",width:"341"}),(0,r.jsxs)(C,{children:[h,", ",p["seu plano foi renovado com sucesso!"]]}),(0,r.jsx)(V.Z,{variant:"secondary",type:"button",outlined:!0,borderRadius:"36px",textTransform:"uppercase",onClick:b,children:p["Voltar \xe0 p\xe1gina inicial"]})]})},{})]})]})},F=!0,renewal=function(){var e=(0,i.useRef)(null);return(0,r.jsx)(o.Z,{footerRef:e,children:(0,r.jsx)(a.default,{overflowMenuWrapper:!0,children:(0,r.jsx)(RenewalContent,{})})})}},98231:function(e,n,t){"use strict";t.d(n,{r:function(){return getAvailablePerson}});var r=t(11010),i=t(97582),o=t(48303);function getAvailablePerson(){return _getAvailablePerson.apply(this,arguments)}function _getAvailablePerson(){return(_getAvailablePerson=(0,r._)(function(){return(0,i.Jh)(this,function(e){switch(e.label){case 0:return[4,(0,o.U2)("/api/v2/renewals/available_person",{}).then(function(e){return null==e?void 0:e.data}).catch(function(e){var n;return null===(n=e.response)||void 0===n?void 0:n.data})];case 1:return[2,e.sent()]}})})).apply(this,arguments)}},36705:function(e,n,t){"use strict";t.d(n,{U:function(){return getVerifyPromotion}});var r=t(11010),i=t(97582),o=t(48303);function getVerifyPromotion(){return _getVerifyPromotion.apply(this,arguments)}function _getVerifyPromotion(){return(_getVerifyPromotion=(0,r._)(function(){return(0,i.Jh)(this,function(e){switch(e.label){case 0:return[4,(0,o.U2)("/api/v2/renewals/verify_promotion",{}).then(function(e){return null==e?void 0:e.data}).catch(function(e){var n;return null===(n=e.response)||void 0===n?void 0:n.data})];case 1:return[2,e.sent()]}})})).apply(this,arguments)}}},function(e){e.O(0,[5445,9402,1546,3926,4376,4549,9774,2888,179],function(){return e(e.s=10317)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.