1"use strict";(self.webpackChunkb2c_checkout=self.webpackChunkb2c_checkout||[]).push([[45],{31100:function(e,t,r){r.d(t,{i:function(){return l}});var n=r(1413),o=r(44925),a=r(34578),s=r(46417),i=["visible","onClick","color"],l=function(e){var t=e.visible,r=e.onClick,l=e.color,c=(0,o.Z)(e,i);return(0,s.jsx)(a.hU,(0,n.Z)((0,n.Z)({},c),{},{variant:"unstyled",onClick:r,"aria-label":t?"Hide Password":"Show Password",icon:t?(0,s.jsx)(a.Jib,{color:l}):(0,s.jsx)(a.I5h,{color:l})}))}},46978:function(e,t,r){r.d(t,{Bl:function(){return d},HD:function(){return u},fI:function(){return i},fO:function(){return c},mJ:function(){return l}});var n=r(74165),o=r(15861),a=r(49448),s=r(84656);function i(e,t){var r="cart"===t?"entrega":"home";window.location.href="".concat(a.O.apiUriV2,"/canais/social/").concat(e,"/redirect?canal=gazin-ecommerce&redirect_to=").concat(r)}var l=function(){var e=(0,o.Z)((0,n.Z)().mark((function e(t){var r,o,a,i,l,c,u,d;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,s.K.post("/canais/social/vincular",t);case 3:return r=e.sent,e.abrupt("return",[r.data,null]);case 7:return e.prev=7,e.t0=e.catch(0),d=e.t0,e.abrupt("return",[null,{message:null!==(o=null!==(a=null===(i=d.response)||void 0===i||null===(l=i.data)||void 0===l?void 0:l.message)&&void 0!==a?a:null===(c=d.response)||void 0===c||null===(u=c.data)||void 0===u?void 0:u[0])&&void 0!==o?o:"Erro ao vincular conta."}]);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),c=function(){var e=(0,o.Z)((0,n.Z)().mark((function e(t){var r,o,a;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,s.K.post("/canais/social/criar-conta",t);case 3:return r=e.sent,e.abrupt("return",[r.data,null]);case 7:return e.prev=7,e.t0=e.catch(0),a=e.t0,e.abrupt("return",[null,{status:null===(o=a.response)||void 0===o?void 0:o.status}]);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),u=function(){var e=(0,o.Z)((0,n.Z)().mark((function e(t){var r,o,a,i,l;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,s.K.post("/canais/social/exchange-new-user",{code:t});case 3:return r=e.sent,e.abrupt("return",[r.data,null]);case 7:return e.prev=7,e.t0=e.catch(0),l=e.t0,e.abrupt("return",[null,{message:null!==(o=null===(a=l.response)||void 0===a||null===(i=a.data)||void 0===i?void 0:i.message)&&void 0!==o?o:"C\xf3digo social inv\xe1lido ou expirado."}]);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),d=function(){var e=(0,o.Z)((0,n.Z)().mark((function e(t){var r,o,a,i,l;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,s.K.post("/canais/social/exchange",{code:t});case 3:return r=e.sent,e.abrupt("return",[r.data,null]);case 7:return e.prev=7,e.t0=e.catch(0),l=e.t0,e.abrupt("return",[null,{message:null!==(o=null===(a=l.response)||void 0===a||null===(i=a.data)||void 0===i?void 0:i.message)&&void 0!==o?o:"Erro ao finalizar autentica\xe7\xe3o."}]);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}()},91045:function(e,t,r){r.r(t),r.d(t,{default:function(){return he}});var n=r(74165),o=r(1413),a=r(15861),s=r(29439),i=r(44925),l=r(49448),c=(r(92842),r(34578)),u=r(30831),d=r(47313),p=r(75627),m=r(75590),v=r(51111),f=r.n(v),g=r(31100),h=r(36459),b=r(86016),x=r(47397),w=r.n(x),y=/(?=.*[a-zA-Z])(?=.*\d)/,Z=/(?=.*[!@#$%^&*(),.?":{}|<>])/,j=/(.)\1{2,}/,k=/(012|123|234|345|456|567|678|789|890|abc|bcd|cde|def|efg|fgh|ghi|hij|ijk|jkl|klm|lmn|mno|nop|opq|pqr|qrs|rst|stu|tuv|uvw|vwx|wxy|xyz)/i,S=w().string().min(8).required().custom((function(e,t){return y.test(e)?Z.test(e)?k.test(e)?t.message({custom:"N\xe3o deve conter sequ\xeancias"}):j.test(e)?t.message({custom:"N\xe3o deve conter caracteres repetidos"}):e:t.message({custom:"Deve conter pelo menos um caracter especial"}):t.message({custom:"Deve conter letras e n\xfameros"})})).messages({"string.min":"Senha deve ter no m\xednimo oito caracteres","string.empty":"C
1ampo obrigat\xf3rio"}),C=w().object().equal(w().ref("password")).required().messages({"any.only":"Senhas devem ser iguais"}),I=w().alternatives().conditional("acceptWhatsapp",{is:!0,then:w().string().custom(b.p4).required().messages({"validation.movel":"Telefone inv\xe1lido, verifique se o n\xfamero do telefone segue o formato (XX) 9XXXX-XXXX","string.empty":"Campo obrigat\xf3rio.","validation.ddd":"Telefone inv\xe1lido"}),otherwise:w().allow("").optional()}),P=w().object({password:S,repeatPassword:C,number:I,acceptAdvertising:w().boolean(),acceptWhatsapp:w().boolean()}),F=r(46417),q=function(e){var t=Object.assign({},((0,h.Z)(e),e)),r=(0,m.$G)().t,n={weak:"".concat(r("components.passwordStep.passwordStrength.weak")),medium:"".concat(r("components.passwordStep.passwordStrength.medium")),strong:"".concat(r("components.passwordStep.passwordStrength.strong")),safe:"".concat(r("components.passwordStep.passwordStrength.safe"))},a=function(e){var t,r=(t=e,[y,Z,/(?!.*(.)\1{2,})/,/(?!.*(?:012|123|234|345|456|567|678|789|890|abc|bcd|cde|def|efg|fgh|ghi|hij|ijk|jkl|klm|lmn|mno|nop|opq|pqr|qrs|rst|stu|tuv|uvw|vwx|wxy|xyz))/].concat([/(?=(?:.*[a-z]){8})/,/(?=(?:.*[A-Z]){3})/,/(?=(?:.*[0-9]){5})/,/(?=(?:.*[!@#$%^&*?_~]){1})/,/.{12,}/]).reduce((function(e,r,n,o){return 4===n&&4!==e?e:e+(o[n].test(t)?1:0)}),0));return r>=8?"safe":r>5&&r<=7?"strong":r>3&&r<=5?"medium":"weak"}(t.password),s=n[a],i={weak:{backgroundColor:"danger.500",width:"30%"},medium:{backgroundColor:"secondary.500",width:"60%"},strong:{backgroundColor:"primary.500",width:"80%"},safe:{backgroundColor:"success.500",width:"100%"}}[a];return(0,F.jsxs)(c.kCb,{w:"full",direction:"row",alignItems:"baseline",children:[(0,F.jsx)(c.xuv,{height:"2",borderRadius:"6.25rem",w:"full",backgroundColor:"neutral.50",children:(0,F.jsx)(c.xuv,(0,o.Z)((0,o.Z)({},i),{},{"data-testid":"password-strength-bar",borderRadius:"6.25rem",h:"full"}))}),(0,F.jsx)(c.xvT,{as:"span",display:"flex",fontSize:"sm",justifyContent:"flex-end",w:"44",color:"neutral.500",children:s})]})},D=["ref"],z=["ref"],M=function(e){var t,r,n,a,v,h=e.onSubmit,b=e.onReturn,x=e.isSendingForm,w=(0,m.$G)().t,y=(0,d.useState)(!1),Z=(0,s.Z)(y,2),j=Z[0],k=Z[1],S=function(){return k(!j)},C=(0,c.l0L)(),I=(0,p.cI)({resolver:(0,u.L)(P)}),M=I.register,A=I.handleSubmit,W=I.watch,X=I.trigger,O=I.formState,B=O.errors,N=O.isSubmitting,T=W("password"),E=W("acceptWhatsapp",!0),_=M("password"),R=_.ref,V=(0,i.Z)(_,D),L=M("repeatPassword"),K=L.ref,U=(0,i.Z)(L,z);return(0,F.jsxs)(c.gCW,{flexDirection:"column",maxW:"29.313rem",spacing:"1rem",as:"form",onSubmit:A((function(e){h(e)}),(function(e){Object.keys(e).forEach((function(t){C({status:"error",description:e[t].message})}))})),my:"96px",children:[(0,F.jsxs)(c.kCb,{flexDirection:{base:"column",md:"row"},w:"full",flex:1,children:[(0,F.jsx)(c.zxk,{display:{base:"none",md:"inherit"},color:"primary.500",fontWeight:"semibold",fontSize:"sm",variant:"link",leftIcon:(0,F.jsx)(c.rq1,{}),ml:"-10.5rem",onClick:b,"data-testid":"password-step-back-button",children:w("components.passwordStep.back")}),(0,F.jsx)(c.xvT,{as:"span",fontSize:"xl",ml:{base:"0",md:"12.938rem"},fontWeight:"bold",color:"neutral.800",textAlign:"center",children:w("components.passwordStep.strengthPassword")}),(0,F.jsx)(c.xvT,{as:"span",id:"strengthBadge"})]}),(0,F.jsx)(c.xvT,{fontSize:"sm",color:"neutral.600","data-testid":"senha mais segura",textAlign:"center",children:w("components.passwordStep.strenghtMessage")}),(0,F.jsxs)(c.gCW,{w:"full",spacing:"9",children:[(0,F.jsx)(c.Icd,(0,o.Z)((0,o.Z)({},V),{},{ref:function(e){R(e),e&&e.setAttribute("autoComplete","new-password")},name:"password",placeholder:w("components.passwordStep.typeYourPassword"),type:j?"text":"password",label:w("components.passwordStep.password"),formLabelProps:{color:"neutral.700",fontSize:"sm",fontWeight:"normal",mb:1},inputProps:{height:"3.375rem",borderRadius:"base"},errorMessage:null===B||void 0===B||null===(t=B.password)||void 0===t?void 0:t.message,onBlur:function(){X("password")},isInvalid:Boolean(null===B||void 0===B?void 0:B.password),isDisabled:N,rightElement:(0,F.jsx)(g.i,{onClick:S,visible:j,color:"neutral.500"}),"data-testid":"step-password-input"})),T&&(0,F.jsx)(q,{password:T}),(0,F.jsx)(c.Icd,(0,o.Z)((0,o.Z)({},U),{},{ref:function(e){K(e),e&&e.setAttribute("autoComplete","new-password")},name:"repeatPassword",placeholder:w("components.passwordStep.repeatedPassword"),type:j?"text":"password",label:w("components.passwordStep.confirmPassword"),inputProps:{height:"3.375rem",borderRadius:"base"},formLabelProps:{color:"neutral.700",fontSize:"sm",fontWeight:"normal"},errorMessage:null===B||void 0===B||null===(r=B.repeatPassword)||void 0===r?void 0:r.message,onBlur:function(){X("repeatPassword")},isInvalid:Boolean(null===B||void 0===B?void 0:B.repeatPassword),isDisabled:N,rightElement:(0,F.jsx)(g.i,{onClick:S,visible:j,color:"neutral.500"}),"data-testid":"step-repeat-password-input"}))]}),(0,F.jsxs)(c.xuv,{display:"flex",children:[(0,F.jsx)(c.xvT,{color:"neutral.600",fontSize:"sm",children:w("components.passwordStep.promotionMessage")}),(0,F.jsx)(c.X$I,(0,o.Z)((0,o.Z)({},M("acceptAdvertising")),{},{display:"flex",justifyContent:"flex-end",switchProps:{variant:"gswitch",defaultChecked:!0},alignItems:"center",ml:{base:"6",md:"2.8rem"},w:{base:"10",md:"8"},errorMessage:null===B||void 0===B||null===(n=B.acceptAdvertising)||void 0===n?void 0:n.message,isInvalid:Boolean(null===B||void 0===B?void 0:B.acceptAdvertising),isDisabled:N,"data-testid":"password-step-accept-advertising-switch"}))]}),(0,F.jsxs)(c.xuv,{display:"flex",width:"full",justifyContent:"space-between",children:[(0,F.jsxs)(c.kCb,{flexDirection:"column",children:[(0,F.jsx)(c.xvT,{color:"neutral.600",fontSize:"sm",children:w("components.passwordStep.wantReceive")}),(0,F.jsxs)(c.kCb,{gap:1,alignItems:"center",children:[(0,F.jsx)(c.xvT,{color:"neutral.600",fontSize:"sm",children:w("components.passwordStep.aboutMyOrder")}),(0,F.jsx)(c.l1V,{h:"1.125rem",w:"5rem"})]})]}),(0,F.jsx)(c.X$I,(0,o.Z)((0,o.Z)({},M("acceptWhatsapp")),{},{display:"flex",justifyContent:"flex-end",switchProps:{variant:"gswitch",defaultChecked:!0},alignItems:"center",ml:{base:"6",md:"2.8rem"},w:{base:"10",md:"8"},errorMessage:null===B||void 0===B||null===(a=B.acceptWhatsapp)||void 0===a?void 0:a.message,isInvalid:Boolean(null===B||void 0===B?void 0:B.acceptWhatsapp),isDisabled:N,"data-testid":"password-step-accept-whatsapp-switch"}))]}),(0,F.jsxs)(c.xuv,{width:"full",justifyContent:"space-between",alignItems:"center",display:E?"flex":"none",children:[(0,F.jsx)(c.xvT,{color:"neutral.600",fontSize:"sm",children:w("components.passwordStep.phoneLabel")}),(0,F.jsx)(c.Icd,(0,o.Z)((0,o.Z)({},M("number")),{},{name:"number",placeholder:w("components.passwordStep.phonePlaceholder"),w:{base:"10.25rem",md:"63%"},inputProps:{height:"9",as:f(),mask:"(99) 99999-9999"},errorMessage:null===B||void 0===B||null===(v=B.number)||void 0===v?void 0:v.message,isInvalid:Boolean(null===B||void 0===B?void 0:B.number),isDisabled:N,"data-testid":"password-step-phone-input"}))]}),(0,F.jsx)(c.kCb,{w:"full",children:(0,F.jsxs)(c.xvT,{color:"neutral.600",fontSize:"sm",w:"full",children:[w("components.passwordStep.informMyData"),(0,F.jsx)(c.rUS,{fontSize:"sm",color:"primary.500",ml:"2",href:l.O.mainAppUri+"/pagina/privacidade",children:w("components.passwordStep.policyPrivacy")})]})}),(0,F.jsx)(c.Jiv,{name:"Bot\xe3o Continuar",label:w("components.passwordStep.continue"),backgroundColor:"success.500",w:"100%",borderRadius:"base",height:"3.375rem",_hover:{},type:"submit",isLoading:x,"data-testid":"password-step-continue-button"})]})},A=function(e){return e.masculino="Masculino",e.feminino="Feminino",e}({}),W=r(43470),X=["inputProps"],O=(0,d.forwardRef)((function(e,t){var r=e.inputProps,n=(0,i.Z)(e,X),a=Boolean(null===r||void 0===r?void 0:r.isReadOnly);return(0,F.jsx)(c.ua7,{label:a?"Este campo n\xe3o pode ser alterado":void 0,isDisabled:!a,placement:"top-start",children:(0,F.jsxs)(c.xuv,{position:"relative",curs
1or:a?"not-allowed":void 0,children:[(0,F.jsx)(c.Icd,(0,o.Z)({ref:t,inputProps:(0,o.Z)((0,o.Z)({borderRadius:"base",height:"3.375rem"},r),a&&{bg:"neutral.50",color:"neutral.400",cursor:"not-allowed",pr:"2.5rem",_readOnly:{bg:"neutral.50",color:"neutral.400"}}),formLabelProps:{color:"neutral.700",fontSize:"sm"}},n)),a&&(0,F.jsx)(c.xuv,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",color:"neutral.400",pointerEvents:"none",children:(0,F.jsx)(c._V1,{})})]})})}));O.displayName="RegistrationInput";var B=r(10658),N=r.n(B),T=r(17798),E=r.n(T);N().extend(E());var _=r(22857),R=w().string().custom((function(e,t){var r=e.replace(/\D/g,"");return(0,_.pM)(r)?e:t.error("validation.invalid")})).required().messages({"string.empty":"Campo CPF obrigat\xf3rio","string.pattern.base":"CPF inv\xe1lido","string.pattern.invert.base":"CPF inv\xe1lido","validation.invalid":"CPF inv\xe1lido"}),V=w().string().trim().required().min(3).max(60).pattern(/^[a-zA-Z\xe1\xe0\xe2\xe3\xe9\xe8\xea\xed\xec\xee\xf3\xf2\xf5\xf4\xfa\xf9\xfb\xe7\xc1\xc0\xc2\xc3\xc9\xc8\xca\xcd\xcc\xce\xd3\xd2\xd5\xd4\xda\xd9\xdb\xc7 ]+$/).custom((function(e,t){var r=e.replace(/\s{2,}/g," ");return r.split(" ").length<2?t.error("string.pattern.nameComplete"):r})).messages({"string.empty":"Nome \xe9 obrigat\xf3rio.","string.min":"Nome precisa ter no m\xednimo 3 caracteres","string.max":"Nome precisa ter no m\xe1ximo 60 caracteres","string.pattern.base":"Nome inv\xe1lido. Somente letras e caracteres acentuados","string.pattern.nameComplete":"Insira nome e sobrenome"}),L=w().string().required().email({tlds:{allow:!1}}).custom((function(e,t){var r=e.split("@"),n=(0,s.Z)(r,1)[0];return n&&/^[_]|[_]$/.test(n)?t.message({custom:"E-mail inv\xe1lido. A parte local n\xe3o pode come\xe7ar ou terminar com '_'"}):e})).messages({"string.email":"Formato de e-mail inv\xe1lido","string.empty":"Campo obrigat\xf3rio"}),K=w().string().trim().custom(b.rc).required().messages({"string.empty":"Campo telefone obrigat\xf3rio","validation.movel":"Telefone inv\xe1lido, verifique se o n\xfamero do telefone segue o formato (XX) 9XXXX-XXXX","validation.ddd":"Telefone inv\xe1lido"}),U=w().string().required().messages({"string.empty":"Campo g\xeanero obrigat\xf3rio."}),Y=w().custom((function(e,t){if(!e)return t.error("any.required");var r=N()(e,"DD/MM/YYYY",!0);return r.isValid()?N()().diff(r,"years")<18?t.error("date.minor"):e:t.error("date.invalid")}),void 0).required().messages({"date.invalid":"Data inv\xe1lida.","date.minor":"Maioridade requerida.","any.required":"Campo data de nascimento obrigat\xf3rio."}),$=w().boolean().optional(),J=w().boolean().optional(),G=w().object({cpf:R,name:V,email:L,telephone:K,gender:U,birthdate:Y,acceptAdvertising:$,acceptWhatsapp:J}),H=function(e){var t,r,i,v,g,h,b=e.onSubmit,x=e.cpf,w=e.birthdate,y=e.email,Z=e.gender,j=e.name,k=e.telephone,S=e.readOnlyEmail,C=void 0!==S&&S,I=e.readOnlyName,P=void 0!==I&&I,q=(0,m.$G)().t,D=(0,c.l0L)({containerStyle:{margin:["0","0.5rem"],maxWidth:["100%","inherit"],padding:["0","inherit"],width:["100vw","inherit"]}}),z=(0,p.cI)({resolver:(0,u.L)(G),mode:"all",reValidateMode:"onBlur",defaultValues:{name:j,email:y,cpf:x,telephone:k,gender:Z,birthdate:w,acceptAdvertising:!0,acceptWhatsapp:!0}}),M=z.register,X=z.handleSubmit,B=z.setValue,N=z.formState,T=N.errors,E=N.isSubmitting,_=(0,d.useState)("(99) 99999-9999"),R=(0,s.Z)(_,2),V=R[0],L=R[1],K=function(){var e=(0,a.Z)((0,n.Z)().mark((function e(t){return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:b(t);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),U=function(e){"Enter"===e.key&&e.preventDefault()};return(0,F.jsxs)(c.Kqy,{spacing:"6",maxW:"29.25rem",my:"96px",children:[(0,F.jsx)(c.xvT,{color:"neutral.800",fontSize:"xl",fontWeight:"bold",textAlign:"center",children:q("components.registrationForm.createAccount")}),(0,F.jsxs)(c.xvT,{fontSize:"xs",color:"neutral.600",textAlign:"center",children:[q("components.registrationForm.yourData")," ",(0,F.jsx)(c.rUS,{textDecoration:"underline",href:"".concat(l.O.mainAppUri,"/pagina/privacidade"),target:"_blank",rel:"noreferrer",children:q("components.registrationForm.policyPrivacy")}),q("components.registrationForm.questions")]}),(0,F.jsxs)(c.Kqy,{as:"form",onSubmit:X(K,(function(e){var t=Object.keys(e)[0];t&&D({status:"error",description:e[t].message})})),spacing:"6",children:[(0,F.jsx)(O,(0,o.Z)((0,o.Z)({},M("cpf")),{},{label:q("components.registrationForm.document"),placeholder:q("components.registrationForm.typeOnlyNumber"),errorMessage:null===T||void 0===T||null===(t=T.cpf)||void 0===t?void 0:t.message,isInvalid:Boolean(null===T||void 0===T?void 0:T.cpf),inputProps:{as:f(),mask:"999.999.999-99",defaultValue:x},onKeyDown:U,"data-testid":"cpf-registration-input"})),(0,F.jsx)(O,(0,o.Z)((0,o.Z)({},M("name")),{},{label:q("components.registrationForm.completeName"),placeholder:q("components.registrationForm.typeYourName"),errorMessage:null===T||void 0===T||null===(r=T.name)||void 0===r?void 0:r.message,isInvalid:Boolean(null===T||void 0===T?void 0:T.name),inputProps:{defaultValue:j,isReadOnly:P},onInput:P?void 0:function(e){var t=e.target.value.replace(/[^a-zA-Z\xe1\xe0\xe2\xe3\xe9\xe8\xea\xed\xec\xee\xf3\xf2\xf5\xf4\xfa\xf9\xfb\xe7\xc1\xc0\xc2\xc3\xc9\xc8\xca\xcd\xcc\xce\xd3\xd2\xd5\xd4\xda\xd9\xdb\xc7~\xb4^` ]/g,"").replace(/\s{2,}/g," ");B("name",t)},onKeyDown:U,"data-testid":"full-name-registration-input"})),(0,F.jsx)(O,(0,o.Z)((0,o.Z)({},M("email",{onChange:C?void 0:function(e){e.target.value=e.target.value.toLowerCase()}})),{},{label:q("components.registrationForm.mail"),placeholder:q("components.registrationForm.typeYourEmail"),errorMessage:null===T||void 0===T||null===(i=T.email)||void 0===i?void 0:i.message,isInvalid:Boolean(null===T||void 0===T?void 0:T.email),inputProps:{defaultValue:y,isReadOnly:C},onKeyDown:U,"data-testid":"email-registration-input"})),(0,F.jsx)(O,(0,o.Z)((0,o.Z)({},M("telephone")),{},{label:q("components.registrationForm.phone"),placeholder:q("components.registrationForm.typeOnlyNumber"),errorMessage:null===T||void 0===T||null===(v=T.telephone)||void 0===v?void 0:v.message,isInvalid:Boolean(null===T||void 0===T?void 0:T.telephone),inputProps:{as:f(),mask:V,defaultValue:k},onInput:function(e){var t,r=null===(t=e.target.value)||void 0===t?void 0:t.replace(/\D/g,""),n=(null===r||void 0===r?void 0:r.length)>=3&&"9"===(null===r||void 0===r?void 0:r[2])?"(99) 99999-9999":"(99) 9999-9999";V!==n&&L(n)},onKeyDown:U,"data-testid":"telephone-registration-input"})),(0,F.jsx)(c.b88,(0,o.Z)((0,o.Z)({},M("gender")),{},{placeholder:q("components.registrationForm.select"),label:q("components.registrationForm.gender"),options:(0,W.a)(A),errorMessage:null===T||void 0===T||null===(g=T.gender)||void 0===g?void 0:g.message,isInvalid:Boolean(null===T||void 0===T?void 0:T.gender),formLabelProps:{color:"neutral.700",fontSize:"sm"},selectProps:{borderRadius:"base",height:"3.375rem",defaultValue:Z},onKeyDown:U,"data-testid":"gender-registration-input"})),(0,F.jsx)(O,(0,o.Z)((0,o.Z)({},M("birthdate")),{},{label:q("components.registrationForm.birthdate"),placeholder:q("components.registrationForm.typeOnlyNumber"),errorMessage:null===T||void 0===T||null===(h=T.birthdate)||void 0===h?void 0:h.message,isInvalid:Boolean(null===T||void 0===T?void 0:T.birthdate),inputProps:{as:f(),mask:"99/99/9999",defaultValue:w},onKeyDown:U,"data-testid":"birthdate-registration-input"})),(0,F.jsx)(c.Jiv,{label:q("components.registrationForm.continue"),isLoading:E,type:"submit",variant:"success",backgroundColor:"success.500",width:"100%",height:"3.375rem",borderRadius:"4px",fontSize:"1rem",fontWeight:"semibold","data-testid":"submit-registration-button"})]})]})},Q=r(97158),ee=r(39307),te=r(84656),re=r(63980),ne=r(26689),oe=function(){var e=(0,a.Z)((0,n.Z)().mark((function e(t){var r,o,a;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,te.M.post("/canais/consumidores",(0,re.ex)(t));case 3:return r=e.sent,(0,ne.Ue)((0,re.mv)(r.data)),e.abrupt("return",[!0,null]);case 8:return e.prev=8,e.t0=e.catch(0),a=e.t0,e.abrupt("return",[null,{status:null===(o=a.response)||void 0===o?void 0:o.status}]);case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),ae=r(85115),se=r(46978),ie=r(25567),le=r(41813),ce=r(64081),ue=r(59353),de=r(30122),pe=r(65795),me=r(58467),ve=r(2135),fe=function(e){return 429===e?"Muitas tentativas. Tente novamente mais tarde.":"N\xe3o foi poss\xedvel concluir o cadastro. Verifique as informa\xe7\xf5es e tente novamente."},ge=function(e){var t=e.children;return(0,F.jsx)(de.E.div,{initial:{opacity:0,x:100}
1,animate:{opacity:1,x:0},transition:{delay:.1},children:t})},he=function(){var e,t,r,i,l,u,p=(0,me.TH)().state,m=(0,me.s0)(),v=(0,ve.lr)(),f=(0,s.Z)(v,1)[0],g=(0,c.l0L)(),h=(0,Q.y)().isEnableFeatureFlag,b=null!==(e=null===p||void 0===p?void 0:p.socialEmail)&&void 0!==e?e:"",x=null!==(t=null===p||void 0===p?void 0:p.socialName)&&void 0!==t?t:"",w=null!==(r=null===p||void 0===p?void 0:p.socialProvider)&&void 0!==r?r:"",y=null!==(i=null===p||void 0===p?void 0:p.socialProviderId)&&void 0!==i?i:"",Z=null!==(l=null===p||void 0===p?void 0:p.socialSig)&&void 0!==l?l:"",j=(0,ue.q)(f,p),k=(0,d.useState)((function(){return(0,ue.S)(f,null===p||void 0===p?void 0:p.returnUrl)})),S=(0,s.Z)(k,1)[0],C=Boolean(b&&w&&y&&Z),I=(0,d.useState)({cpf:"",name:C?x:"",email:C?b:null!==(u=null===p||void 0===p?void 0:p.email)&&void 0!==u?u:"",telephone:"",gender:"",birthdate:"",acceptAdvertising:!0,acceptWhatsapp:!0,password:"",repeatPassword:"",number:"",step:1,submit:!1}),P=(0,s.Z)(I,2),q=P[0],D=P[1],z=q.step,A=q.submit;(0,d.useEffect)((function(){A&&O()}),[q]);var W=function(){var e=(0,a.Z)((0,n.Z)().mark((function e(t){var r,a,i,l,c,u,d,p;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!C){e.next=25;break}return e.next=3,(0,se.fO)({nome:t.name,email:t.email,cpf:t.cpf,data_nascimento:t.birthdate,sexo:t.gender,telefone:t.telephone,email_publicidade:t.acceptAdvertising,wa_aceite_notificacao:t.acceptWhatsapp?1:0,provider:w,provider_id:y,sig:Z});case 3:if(r=e.sent,a=(0,s.Z)(r,2),i=a[0],!(l=a[1])){e.next=10;break}return g({status:"error",description:fe(l.status)}),e.abrupt("return");case 10:if((0,ne.Ue)((0,re.yw)(i)),!(c=(0,ie.WJ)(le.b.cart))){e.next=20;break}return e.next=15,(0,ee.Ii)(c);case 15:u=e.sent,d=(0,s.Z)(u,2),d[0],(p=d[1])&&g({status:"error",description:p});case 20:if(j){e.next=23;break}return window.location.href=S,e.abrupt("return");case 23:return m(ce.X.shipping,{state:{isCheckoutFlow:j}}),e.abrupt("return");case 25:D((0,o.Z)((0,o.Z)((0,o.Z)({},q),t),{},{step:2}));case 26:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),X=function(){var e=(0,a.Z)((0,n.Z)().mark((function e(t){return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",D((0,o.Z)((0,o.Z)((0,o.Z)({},q),t),{},{submit:!0})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),O=function(){var e=(0,a.Z)((0,n.Z)().mark((function e(){var t,r,a,i,l,c,u,d,p;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,oe(q);case 2:if(t=e.sent,r=(0,s.Z)(t,2),r[0],!(a=r[1])){e.next=10;break}return g({status:"error",description:fe(a.status)}),D((0,o.Z)((0,o.Z)({},q),{},{submit:!1})),e.abrupt("return");case 10:if(!(i=(0,ie.WJ)(le.b.cart))){e.next=19;break}return e.next=14,(0,ee.Ii)(i);case 14:l=e.sent,c=(0,s.Z)(l,2),c[0],(u=c[1])&&g({status:"error",description:u});case 19:return e.next=21,h(ae.Nr.EMAIL_VERIFICATION);case 21:if(d=e.sent,!((null===d||void 0===d?void 0:d.situacao)===ae.Bv.ATIVO)){e.next=27;break}return(p=(0,ne.cq)())&&(sessionStorage.setItem("pending_credential",JSON.stringify(p)),(0,ie.xf)(le.b.user)),e.abrupt("return",m(ce.X.emailVerification,{state:{isCheckoutFlow:j,returnUrl:S,origin:"cadastro"}}));case 27:if(!j){e.next=29;break}return e.abrupt("return",m(ce.X.shipping,{state:{isCheckoutFlow:j}}));case 29:window.location.href=S;case 30:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,F.jsx)(c.W20,{maxW:"container.xl",children:(0,F.jsx)(c.M5Y,{children:(0,F.jsx)(pe.M,{children:(0,F.jsxs)(c.Kqy,{children:[1==z&&(0,F.jsx)(ge,{children:(0,F.jsx)(H,(0,o.Z)({onSubmit:W,readOnlyEmail:C,readOnlyName:C},q))}),2==z&&(0,F.jsx)(ge,{children:(0,F.jsx)(M,{onSubmit:X,onReturn:function(){return D((0,o.Z)((0,o.Z)({},q),{},{step:1}))},isSendingForm:q.submit})})]})})})})}},43470:function(e,t,r){r.d(t,{a:function(){return n}});var n=function(e){return Object.keys(e).map((function(t){return{label:e[t],value:t}}))}}}]);
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.