1"use strict"; 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0044bb3e-0c07-5906-a746-65bc506b97af")}catch(e){}}(); 3(self.webpackChunkultradinero_customer_client=self.webpackChunkultradinero_customer_client||[]).push([[351],{12351:(e,t,n)=>{n.r(t),n.d(t,{default:()=>z});var o=n(89379),r=n(10467),a=n(65043),l=n(73216),i=n(24858),s=n(88911),u=n(85865),d=n(46946),c=n(53193),v=n(67784),m=n(81673),p=n(18356),h=n(60598),g=n(37970),f=n(51787),x=n(72812),A=n(18403),_=n(60446),b=n.n(_),j=n(54597),y=n(9971),C=n(17620),w=n(40901),P=n(84312),I=n(60340),S=n(21541),N=n(83275),M=n(31256),k=n(10584),B=n(16674),R=n.n(B),D=n(38872),E=n(83462),V=n(26600),T=n(17392),X=n(35316),U=n(98533),O=n(29347),W=n(53404),F=n(74802),H=n(70579);const Y=e=>{var{onClose:t,onError:n,open:o,text:i,withAction:s=!1,phones:u=null}=e,[d,c]=a.useState(!1),[v,m]=a.useState(!1),p=(0,y.j)(),h=(0,l.Zp)(),g=function(){var e=(0,r.A)((function*(e){c(!0);try{var o=(yield(0,j.Bh)(e)).data.token;new(R())("EverCookie").setItem(!1,"userID",o.user.id.toString()),(0,I.j5)(o.token),(0,I.mY)(o.refresh_token),p((0,C.BH)(!0)),D.gV({id:o.user.id,username:o.user.username}),(0,I.sb)({event:"income_additional_inform",label:"sign_up",type:"duplicates_merge_old_user",UID:o.user.id}),c(!1),t(),window.location.reload()}catch(r){n(),t()}}));return function(t){return e.apply(this,arguments)}}(),f=function(){var e=(0,r.A)((function*(e){m(!0);try{var o=yield(0,j.IX)({phone_number:e});(0,I.sb)({event:"income_additional_inform",label:"sign_up",type:"duplicates_merge_new_user",UID:o.data.user_id}),(0,I.Nc)(),p((0,C.Ve)({user:{id:0,username:""}})),p((0,C.BH)(!1)),D.gV(null),m(!1),h(w.f.Login,{replace:!0,state:{phone:e,needsMerge:!0}})}catch(r){n(),t()}}));return function(t){return e.apply(this,arguments)}}();return(0,H.jsxs)(E.A,{onClose:()=>{t()},open:o,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[(0,H.jsx)(V.A,{display:"flex",justifyContent:"flex-start",alignItems:"center",gap:1,children:"Usuario duplicado"}),(0,H.jsx)(T.A,{"aria-label":"close",onClick:()=>{t()},sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,H.jsx)(F.A,{})}),(0,H.jsx)(X.A,{children:(0,H.jsx)(U.A,{id:"alert-dialog-description",color:"text.primary",children:i})}),s&&u?(0,H.jsxs)(O.A,{sx:{alignItems:"flex-end",flexDirection:{xs:"column",md:"row"},gap:"0.75rem",padding:"1.25rem 1.5rem"},children:[(0,H.jsx)(x.A,{loading:d,variant:"outlined",size:"medium",fullWidth:!0,onClick:()=>{g(u[0])},children:(0,I.V7)(u[0])}),(0,H.jsx)(x.A,{loading:v,variant:"outlined",size:"medium",fullWidth:!0,onClick:()=>{f(u[1])},children:(0,I.V7)(u[1])})]}):(0,H.jsx)(O.A,{sx:{alignItems:"flex-end",flexDirection:{xs:"column",md:"row"},gap:"0.75rem",padding:"1.25rem 1.5rem"},children:(0,H.jsx)(W.A,{variant:"outlined",size:"medium",sx:{width:{xs:"100%",md:"auto"}},onClick:()=>{t()},children:S.VN})})]})};const z=()=>{var e,t,[n,_]=a.useState(!1),[B,R]=a.useState(!1),[D,E]=a.useState(!1),[V,T]=a.useState(!1),[X,U]=a.useState(null),[O,W]=a.useState(null),[F,z]=a.useState(!1),[L,q]=a.useState(void 0),{contactTypes:G}=(0,P.MR)(),K=(0,l.Zp)(),{schema:Z,defaultValue:$}=(0,P.ur)(),{userInfo:J}=(0,y.G)(C.mB);a.useEffect((()=>{window.scrollTo(0,0)}),[]);var Q=a.useCallback(((e,t)=>{var n=document.getElementById(e);if(n){var o=n.getBoundingClientRect(),r=window.scrollY+o.top-10;window.scrollTo({top:r,behavior:"auto"}),requestAnimationFrame((()=>{var n,o,r=document.getElementById(e);if(r){var a=r.getBoundingClientRect(),l=window.visualViewport,i=(null!==(n=null===l||void 0===l?void 0:l.offsetTop)&&void 0!==n?n:0)+(null!==(o=null===l||void 0===l?void 0:l.height)&&void 0!==o?o:window.innerHeight),s=Math.max(0,Math.floor(i-a.bottom-20));t(s)}}))}}),[]),{register:ee,formState:{errors:te},handleSubmit:ne,setError:oe,control:re,clearErrors:ae}=(0,i.mN)({mode:"onSubmit",reValidateMode:"onSubmit",resolver:(0,A.t)(Z),criteriaMode:"all"}),le=(()=>{var e,t,n,o,r=null!==(e=J.father_surname)&&void 0!==e?e:null,a=null!==(t=J.mother_surname)&&void 0!==t?t:null,l=null!==(n=J.first_name)&&void 0!==n?n:null,i=null!==(o=J.birthday)&&void 0!==o?o:null,s="";if(r&&r.length>2&&a&&l&&i){var u="\xd1"===r[0]?"X":r[0],d=r[1].match(/^([aeiouyAEIOUY]+)$/gi)?r[1]:"X",c=a[0],v=l[0];
3s="".concat(u).concat(d).concat(c).concat(v).concat(b()(i).format("YYMMDD")).toUpperCase()}return s})(),ie=function(){var e=(0,r.A)((function*(){var e=yield(0,j.XM)(),t=e.data.reason,n=e.data.phone_number,o=e.data.matched_user_phone_number,r="";switch(t){case"black_list":r=S.sO.tM.replace("{phoneNumber}",(0,I.mC)(o)),U(r),T(!0),E(!0);break;case"moratorium":r=S.sO.T9.replace("{phoneNumber}",(0,I.mC)(o)),U(r),T(!0),E(!0);break;case"unsuccessful_selfie_matching":U(S.sO.GY),T(!0),E(!0);break;case"successful_selfie_matching":U(S.sO.jI),W([n,o]),z(!0),T(!0),E(!0)}}));return function(){return e.apply(this,arguments)}}();a.useEffect((()=>{var e=!0;return e&&J.matched_user_id&&((0,I.fl)("curp"),ie()),()=>{e=!1}}),[J.matched_user_id]);var se=function(){var e=(0,r.A)((function*(e){R(!0);var t={contact_name:e.contactName,contact_relationship:(0,I.AF)(G,e.contactRelationship),contact_phone_number:e.contactPhoneNumber.replace(/ /g,""),curp:e.curp,rfc:e.rfc};try{yield(0,j.TK)(J.id,t),(0,I.MS)(e),(0,I.sb)({event:"income_additional_inform",label:"sign_up",UID:J.id}),R(!1),K(w.f.ReceivingMoneyMethod,{replace:!0})}catch(u){var n,o,r,a,l,i;R(!1);var s=null===u||void 0===u||null===(n=u.response)||void 0===n||null===(o=n.data)||void 0===o?void 0:o.violations;null!==u&&void 0!==u&&null!==(r=u.response)&&void 0!==r&&null!==(a=r.data)&&void 0!==a&&a.detail.includes("curp: This value ".concat(e.curp," is already used."))?ie():null!==u&&void 0!==u&&null!==(l=u.response)&&void 0!==l&&null!==(i=l.data)&&void 0!==i&&i.detail.includes("Invalid rfc or curp number.")?(oe("curp",{type:"custom",message:void 0},{shouldFocus:!0}),oe("rfc",{type:"custom",message:"El n\xfamero de RFC o CURP no es v\xe1lido. Por favor, verifique nuevamente los datos ingresados."},{shouldFocus:!0})):(null===s||void 0===s?void 0:s.length)>0?s.forEach((e=>{var t=(0,I.sF)(e.propertyPath);(0,I.sb)({event:"error_data",label:"sign_up",stage:"income_additional_inform",field_name:t,error_text:"error_backend: ".concat(e.message),UID:J.id}),oe(t,{type:"custom",message:e.message},{shouldFocus:!0})})):(oe("root.serverError",{type:"custom"}),_(!0))}}));return function(t){return e.apply(this,arguments)}}();return(0,N.h)((0,H.jsx)(M.ff,{children:(0,H.jsxs)(s.A,{sx:{width:{xs:"100%",sm:"540px"}},children:[(0,H.jsx)(M.f6,{value:80}),(0,H.jsx)(u.A,{variant:"h4",children:"Datos de identificaci\xf3n"}),(0,H.jsx)(u.A,{variant:"body2",mt:"1.5rem",lineHeight:"1.25rem",sx:{color:"#697395"},children:"Ingresa tu CURP y RFC"}),(0,H.jsx)(d.A,{component:"form",onSubmit:ne(se),width:"100%",mt:2.5,children:(0,H.jsxs)(s.A,{spacing:1.5,children:[(0,H.jsx)(i.xI,{name:"curp",control:re,defaultValue:J.matched_user_id?void 0:$.curp||le,render:e=>{var t,n,o,{field:{onChange:r,onBlur:a,value:l}}=e;return(0,H.jsxs)(c.A,{fullWidth:!0,error:!!te.curp,children:[(0,H.jsx)(v.A,{id:"ultradinero_registration_curp",value:null!==l&&void 0!==l?l:"",onChange:e=>{e.target.value=e.target.value.toUpperCase(),(0,I.ni)("curp",e.target.value),r(e),ae("curp")},onBlur:()=>{a()},disabled:Boolean(J.matched_user_id),label:(0,H.jsx)(M.l1,{children:S.An.VL}),type:"text",error:Boolean(null===te||void 0===te?void 0:te.curp),inputProps:{inputMode:"text","aria-label":S.An.VL},InputProps:{endAdornment:(0,H.jsx)(M.kg,{show:Boolean(null===te||void 0===te?void 0:te.curp)}),inputComponent:M.j9}}),(0,H.jsx)(m.A,{error:!0,children:null!==te&&void 0!==te&&null!==(t=te.curp)&&void 0!==t&&null!==(n=t.message)&&void 0!==n&&n.includes("is already used")?S.sO.oS:null===te||void 0===te||null===(o=te.curp)||void 0===o?void 0:o.message})]})}}),(0,H.jsx)(i.xI,{name:"rfc",control:re,defaultValue:$.rfc||le,render:e=>{var t,n,o,{field:{onChange:r,onBlur:a,value:l}}=e;return(0,H.jsxs)(c.A,{fullWidth:!0,error:!!te.rfc,children:[(0,H.jsx)(v.A,{id:"ultradinero_registration_rfc",value:null!==l&&void 0!==l?l:"",onChange:e=>{e.target.value=e.target.value.toUpperCase(),(0,I.ni)("rfc",e.target.value),r(e),ae("rfc")},onBlur:()=>{a()},label:(0,H.jsx)(M.l1,{children:S.An.Wh}),type:"text",error:Boolean(null===te||void 0===te?void 0:te.rfc),inputProps:{inputMode:"text","aria-label":S.An.Wh},InputProps:{endAdornment:(0,H.jsx)(M.kg,{show:Boolean(null===te||void 0===te?void 0:te.rfc)}),inputComponent:M.ud}}),(0,H.jsx)(m.A,{error:!0,children:null!==te&&void 0!==te&&null!==(t=te.rfc)&&void 0!==t&&null!==(n=t.message)&&void 0!==n&&n.includes("is already used")?S.sO.oS:null===te||void 0===te||null===(o=te.rfc)||void 0===o?void 0:o.message})]})}}),(0,H.jsx)(u.A,{variant:"h4",sx:{mt:"2rem !important",mb:"0.75rem !important"},children:S.An.AH}),(0,H.jsx)(v.A,(0,o.A)((0,o.A)({},ee("contactName",{onChange:e=>{e.target.value=e.target.value.replace(k.p,""),(0,I.ni)("contactName",e.target.value),ae("contactName")}})),{},{id:"ultradinero_registration_second_contact_name",defaultValue:$.contactName,label:(0,H.jsx)(M.l1,{children:S.An.e2}),type:"text",fullWidth:!0,error:Boolean(null===te||void 0===te?void 0:te.contactName),helperText:null===te||void 0===te||null===(e=te.contactName)||void 0===e?void 0:e.message,onKeyDown:I.f$,InputProps:{endAdornment:(0,H.jsx)(M.kg,{show:Boolean(null===te||void 0===te?void 0:te.contactName)})}})),(0,H.jsx)(i.xI,{name:"contactRelationship",control:re,defaultValue:$.contactRelationship,render:e=>
3{var t,{field:{onChange:n,value:o},fieldState:{invalid:r}}=e;return(0,H.jsxs)(c.A,{fullWidth:!0,error:r,variant:"filled",children:[(0,H.jsx)(p.A,{id:"contact-relationship-select-label",children:S.An.v6}),(0,H.jsx)(h.A,{value:o||"",onOpen:()=>{Q("contact-relationship-select",q)},onChange:e=>{n(e),(0,I.ni)("contactRelationship",e.target.value),ae("contactRelationship")},displayEmpty:!0,labelId:"contact-relationship-select-label",id:"contact-relationship-select",label:S.An.v6,inputProps:{"aria-label":S.An.v6,id:"ultradinero_registration_contact_relationship"},MenuProps:{marginThreshold:0,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},anchorEl:()=>document.getElementById("contact-relationship-select"),PaperProps:{sx:{maxHeight:null!==L&&void 0!==L?L:"auto",overflowY:"auto"}},MenuListProps:{sx:{maxHeight:"inherit"}}},children:G.map((e=>(0,H.jsx)(g.A,{value:e.name,children:e.name},e.code)))}),(0,H.jsx)(m.A,{children:null===te||void 0===te||null===(t=te.contactRelationship)||void 0===t?void 0:t.message})]})}}),(0,H.jsx)(v.A,(0,o.A)((0,o.A)({},ee("contactPhoneNumber",{onChange:e=>{var t=e.target.selectionStart;e.target.value=e.target.value.replace(/[^0-9]/g,""),e.target.value=(0,I.mC)(e.target.value),3===t||8===t?e.target.setSelectionRange(+t+1,+t+1):e.target.setSelectionRange(t,t),(0,I.ni)("contactPhoneNumber",e.target.value),ae("contactPhoneNumber")}})),{},{id:"ultradinero_registration_second_contact_phone_number",defaultValue:$.contactPhoneNumber,label:(0,H.jsx)(M.l1,{children:S.Sv}),placeholder:"XX XXXX XXXX",autoComplete:"off",fullWidth:!0,inputProps:{inputMode:"tel","aria-label":S.Sv},InputProps:{startAdornment:(0,H.jsx)(f.A,{position:"start",children:k.Mr}),endAdornment:(0,H.jsx)(M.kg,{show:Boolean(null===te||void 0===te?void 0:te.contactPhoneNumber)})},error:Boolean(null===te||void 0===te?void 0:te.contactPhoneNumber),helperText:null===te||void 0===te||null===(t=te.contactPhoneNumber)||void 0===t?void 0:t.message,onPaste:e=>{var t;e.preventDefault(),e.target.value="";var n=(0,I.q7)(null===(t=e.clipboardData)||void 0===t?void 0:t.getData("text"));e.target.value=(0,I.mC)(n)}})),n&&(0,H.jsx)(M.U0,{onAlertOpen:()=>{_(!1)}}),(0,H.jsx)(x.A,{loading:B,disabled:D,variant:"contained",fullWidth:!0,size:"large",type:"submit",sx:{mt:"2rem !important"},"aria-label":S.c3,children:S.c3})]})}),X&&(0,H.jsx)(Y,{onClose:()=>{T(!1),U(null),W(null),z(!1)},onError:()=>{oe("root.serverError",{type:"custom"}),_(!0)},open:V,text:X,withAction:F,phones:O})]})}),w.f.ContactPerson)}},83275:(e,t,n)=>{n.d(t,{h:()=>s});n(65043);var o=n(73216),r=n(40901),a=n(84312),l=n(31256),i=n(70579),s=(e,t)=>{var{loading:n,step:s}=(0,a.yP)();return n&&!s?(0,i.jsx)(l.aH,{open:n}):s===t?e:(0,i.jsx)(o.C5,{to:null!==s&&void 0!==s?s:r.f.Registration,replace:!0})}},98533:(e,t,n)=>{n.d(t,{A:()=>f});var o=n(98587),r=n(58168),a=n(65043),l=n(88795),i=n(68606),s=n(34535),u=n(72876),d=n(85865),c=n(57056),v=n(32400);function m(e){return(0,v.Ay)("MuiDialogContentText",e)}(0,c.A)("MuiDialogContentText",["root"]);var p=n(70579),h=["children","className"],g=(0,s.Ay)(d.A,{shouldForwardProp:e=>(0,s.ep)(e)||"classes"===e,name:"MuiDialogContentText",slot:"Root",overridesResolver:(e,t)=>t.root})({});const f=a.forwardRef((function(e,t){var n=(0,u.A)({props:e,name:"MuiDialogContentText"}),{className:a}=n,s=(0,o.A)(n,h),d=(e=>{var{classes:t}=e,n=(0,i.A)({root:["root"]},m,t);return(0,r.A)({},t,n)})(s);return(0,p.jsx)(g,(0,r.A)({component:"p",variant:"body1",color:"text.secondary",ref:t,ownerState:s,className:(0,l.A)(d.root,a)},n,{classes:d}))}))}}]); 4//# sourceMappingURL=351.f8fb788f.chunk.js.map 5//# debugId=0044bb3e-0c07-5906-a746-65bc506b97af
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.