PageSourceSearch

https://www.plataforma10.com.br/_next/static/chunks/271t9jxvttw-1.js

js plataforma10.com.br collected 2026-10-08 20:29:01 UTC 22,638 bytes, 28 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,430961,(e,t,r)=>{"use strict";var a=e.r(13451);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var s=a(e.r(813579)),l=e.r(843476);r.default=(0,s.default)((0,l.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"Block")},612785,(e,t,r)=>{"use strict";var a=e.r(13451);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var s=a(e.r(813579)),l=e.r(843476);r.default=(0,s.default)((0,l.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline")},232340,(e,t,r)=>{"use strict";var a=e.r(13451);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var s=a(e.r(813579)),l=e.r(843476);r.default=(0,s.default)((0,l.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline")},927140,(e,t,r)=>{"use strict";var a=e.r(13451);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var s=a(e.r(813579)),l=e.r(843476);r.default=(0,s.default)((0,l.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info")},292314,(e,t,r)=>{"use strict";var a=e.r(13451);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var s=a(e.r(813579)),l=e.r(843476);r.default=(0,s.default)([(0,l.jsx)("path",{d:"M12 5.99 19.53 19H4.47zM12 2 1 21h22z"},"0"),(0,l.jsx)("path",{d:"M13 16h-2v2h2zm0-6h-2v5h2z"},"1")],"WarningAmber")},863665,175548,e=>{"use strict";var t=e.i(931067),r=e.i(915874),a=e.i(271645),s=e.i(207670),l=e.i(15400),i=e.i(869941),n=e.i(986268),o=e.i(419389),d=e.i(843476);let u=["className","component"];var c=e.i(412287),f=e.i(591772),m=e.i(892420);let p=(0,e.i(798051).default)("MuiBox",["root"]);e.s(["default",0,p],175548);let h=(0,f.createTheme)(),v=function(e={}){let{themeId:c,defaultTheme:f,defaultClassName:m="MuiBox-root",generateClassName:p}=e,h=(0,l.default)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(i.default);return a.forwardRef(function(e,a){let l=(0,o.default)(f),i=(0,n.extendSxProp)(e),{className:v,component:g="div"}=i,x=(0,r.default)(i,u);return(0,d.jsx)(h,(0,t.default)({as:g,ref:a,className:(0,s.default)(v,p?p(m):m),theme:c&&l[c]||l},x))})}({themeId:m.default,defaultTheme:h,defaultClassName:p.root,generateClassName:c.unstable_ClassNameGenerator.generate});e.s(["default",0,v],863665)},838456,e=>{"use strict";var t=e.i(863665);e.s(["Box",()=>t.default])},846924,e=>{e.v({container:"OtpResendLink-module__o-pcFG__container",countdownText:"OtpResendLink-module__o-pcFG__countdownText",initialLink:"OtpResendLink-module__o-pcFG__initialLink",resendLink:"OtpResendLink-module__o-pcFG__resendLink",sentText:"OtpResendLink-module__o-pcFG__sentText"})},417187,e=>{"use strict";var t=e.i(843476),r=e.i(653145),a=e.i(132448),s=e.i(78333),l=e.i(271645);let i=/[^a-zA-ZÀ-ÖØ-öø-ÿĀ-žŽ-ž'-_@.]/g;e.s(["EmailField",0,({customLabel:e,name:n,placeholder:o="",onBlurHandler:d=()=>{},isDebouncedEmailFormatEnabled:u=!0,validateOnBlur:c=!0,...f})=>{let{setValue:m,getValues:p,clearErrors:h,formState:{errors:v}}=(0,r.useFormContext)(),g=(0,l.useCallback)((0,s.default)(e=>{m(n,e,{shouldValidate:!0,shouldDirty:!0})},5e3),[n,m]);return(0,l.useEffect)(()=>()=>{g.cancel()},[g]),(0,t.jsx)(a.BaseTextField,{customLabel:e,name:n,maxLength:100,onInputHandler:e=>{e.target.value=e.target.value.replace(i,"")},onBlurHandler:()=>{let e=p(n);m(n,e.trim(),{shouldValidate:c,shouldDirty:!0}),d()},onChangeHandler:()=>{let e=p(n);u&&g(e),v.root?.serverError&&h("root")},placeholder:o,...f})}])},60338,e=>{e.v({"icon-container":"Notification-module__eAjgpa__icon-container","message-container":"Notification-module__eAjgpa__message-container",notification:"Notification-module__eAjgpa__notification"})},36450,e=>{"use strict";var t=e.i(843476),r=e.i(343794),a=e.i(430961),s=e.i(927140),l=e.i(612785),i=e.i(232340),n=e.i(292314),o=e.i(60338);let d={info:(0,t.jsx)(s.default,{}),success:(0,t.jsx)(l.default,{}),error:(0,t.jsx)(i.default,{}),warning:(0,t.jsx)(n.default,{}),disabled:(0,t.jsx)(a.default,{})},u={info:"var(--color-argentina-01)",success:"var(--color-caribbean-01)",error:"var(--color-red-09)",warning:"var(--color-yellow-02)",disabled:"var(--color-neutral-grey-02)"},c={info:"var(--color-argentina-05)",success:"var(--color-caribbean-03)",error:"var(--color-red-05)",warning:"var(--color-yellow-06)",disabled:"var(--color-neutral-grey-08)"},f={info:"var(--color-argentina-08)",success:"var(--color-caribbean-08)",error:"var(--color-red-01)",warning:"var(--color-yellow-09)",disabled:"var(--color-neutral-grey-08)"};e.s(["default",0,({message:e,type:a,icon:s,showIcon:l=!0,id:i,className:n,"data-testid":m,"aria-label":p,children:h})=>{let v=(0,r.default)(n,o.default.notification,o.default[a]),g=s||d[a];return(0,t.jsxs)("div",{id:i,className:v,style:{backgroundColor:u[a],borderColor:c[a],color:f[a]},"data-testid":m||`notification-${a}`,"aria-label":p,children:[l&&(0,t.jsx)("div",{className:o.default["icon-container"],children:g}),(0,t.jsx)("div",{className:o.default["message-container"],children:e||h})]})}])},965600,e=>{e.v({btnsContainer:"OtpModalBase-module__5xDTNq__btnsContainer",closeButton:"OtpModalBase-module__5xDTNq__closeButton",codeInputContainer:"OtpModalBase-module__5xDTNq__codeInputContainer",headerEmail:"OtpModalBase-module__5xDTNq__headerEmail",modalContainer:"OtpModalBase-module__5xDTNq__modalContainer",modalContent:"OtpModalBase-module__5xDTNq__modalContent",modalHeader:"OtpModalBase-module__5xDTNq__modalHeader",modalTitle:"OtpModalBase-module__5xDTNq__modalTitle",passwordlessVariant:"OtpModalBase-module__5xDTNq__passwordlessVariant",trustDeviceContainer:"OtpModalBase-module__5xDTNq__trustDeviceContainer",trustDeviceInfo:"OtpModalBase-module__5xDTNq__trustDeviceInfo",trustedSection:"OtpModalBase-module__5xDTNq__trustedSection"})},214013,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(301568),s=e.i(677061),l=e.i(162282),i=e.i(166107),n=e.i(782904),o=e.i(948148),d=e.i(343794),u=e.i(170586),c=e.i(838456);let f=(0,e.i(261722).styled)("input")(()=>`
2  width: 44px;
3  height: 44px;
4  text-align: center;
5  font-size: var(--font-size-lg);
6  font-family: var(--font-family-body);
7  border-radius: var(--border-radius-2xs);
8  color: var(--text-neutral-color-text-neutral-default);
9  border: 1px solid var(--border-neutral-color-border-neutral-stronger);
10
11  &.inputError {
12    border-color: var(--border-error-color-border-error-default);
13  }
14
15  &:disabled {
16    opacity: 0.5;
17    cursor: not-allowed;
18  }
19
20  &.error {
21    color: var(--text-error-color-text-error-default);
22  }
23
24  @media (max-width: 320px) {
25    width: 38px;
26    height: 38px;
27  }
28`),m=({value:e,onChange:a,separator:s="",length:l=6,hasError:i=!1,label:o="Ingresar código*",digitAriaLabel:d=e=>`D\xedgito ${e} del c\xf3digo`,errorText:u="Código incorrecto",inputTestId:m=e=>`otp-input-${e}`,disabled:p=!1,onComplete:h})=>{let v=r.default.useRef(Array(l).fill(null)),g=e=>{let t=v.current[e];t&&t.focus()},x=e=>{let t=v.current[e];t&&t.select()},_=e=>{h&&e.length===l&&h(e)};return(0,t.jsxs)(c.Box,{sx:{display:"flex",flexDirection:"column",gap:"8px"},children:[o&&(0,t.jsx)(n.Typography,{sx:{color:i?"var(--text-error-color-text-error-default)":""},children:o}),(0,t.jsx)(c.Box,{sx:{display:"flex",gap:"6px",alignItems:"center"},children:Array(l).fill(null).map((n,o)=>(0,t.jsxs)(r.default.Fragment,{children:[(0,t.jsx)(f,{ref:e=>{v.current[o]=e},"aria-label":d(o+1),onKeyDown:e=>((e,t)=>{switch(e.key){case"ArrowLeft":e.preventDefault(),t>0&&(g(t-1),x(t-1));break;case"ArrowRight":e.preventDefault(),t<l-1&&(g(t+1),x(t+1));break;case"Backspace":e.preventDefault(),t>0&&(g(t-1),x(t-1)),a(e=>{let r=e.split("");return r[t]="",r.join("")})}})(e,o),onChange:t=>((t,r)=>{let s=t.target.value;if(s.length>1){let t=s.substring(0,l),i=e.split("");for(let e=0;e<t.length;e++)r+e<l&&(i[r+e]=t[e]);let n=i.join("");a(n),g(Math.min(r+t.length,l-1)),_(n);return}a(e=>{let t=e.split("");return t[r]=s,t.join("")}),s&&r<l-1&&g(r+1);let i=e.split("");i[r]=s,_(i.join(""))})(t,o),onPaste:t=>((t,r)=>{t.preventDefault();let s=t.clipboardData.getData("text/plain").substring(0,l),i=e.split("");for(let e=0;e<s.length;e++)r+e<l&&(i[r+e]=s[e]);let n=i.join("");a(n),_(n)})(t,o),value:e[o]??"",disabled:p,maxLength:0===o?l:1,className:i?"inputError":"",inputMode:"numeric",type:"tel",autoComplete:0===o?"one-time-code":"off","data-testid":m(o+1)}),o===l-1?null:s]},o))}),i&&u&&(0,t.jsx)(n.Typography,{variant:"body2",color:"error",children:u})]})};var p=e.i(846924);let h=({onResend:e,confirmationDurationMs:a=4800,isLoading:s=!1,countdown:l,countdownSeconds:i,onCountdownComplete:n,initialText:o="¿No te llegó el código?",countdownText:d=e=>`Podr\xe1s reenviar el c\xf3digo en ${e} segundos`,resendText:u="Reenviar código",sentText:c="Código reenviado",loadingText:f="Reenviando...",isReady:m=!1,"data-testid":h})=>{let[v,g]=(0,r.useState)("initial"),x=(0,r.useRef)(null);(0,r.useEffect)(()=>{m&&g("ready")},[m]);let[_,w]=(0,r.useState)(null!=i?i:null),C=null!=l?l:null!=_?_:0;(0,r.useEffect)(()=>{if("countdown"!==v||null!=l||null==_||_<=0)return;let e=setTimeout(()=>{w(e=>null!=e?e-1:e)},1e3);return()=>clearTimeout(e)},[v,_,l]),(0,r.useEffect)(()=>{0===C&&"countdown"===v&&(g("ready"),n&&n())},[C,v,n]);let T=()=>{s||(0===C?g("ready"):(g("countdown"),null==l&&null!=i&&w(i)))},b=()=>{s||(e(),g("sent"),x.current&&clearTimeout(x.current),x.current=setTimeout(()=>{g("initial")},a))};return(0,r.useEffect)(()=>()=>{x.current&&clearTimeout(x.current)},[]),(0,t.jsx)("div",{className:p.default.container,"data-testid":h,children:(()=>{if(s&&"ready"===v)return(0,t.jsx)("span",{className:p.default.countdownText,children:f});switch(v){case"initial":return(0,t.jsx)("span",{className:p.default.initialLink,onClick:T,...s?{disabled:!0}:{},children:o});case"countdown":return(0,t.jsx)("span",{className:p.default.countdownText,children:d(C)});case"ready":return(0,t.jsx)("span",{className:p.default.resendLink,onClick:b,...s?{disabled:!0}:{},children:u});case"sent":return(0,t.jsx)("span",{className:p.default.sentText,children:c});default:return null}})()})};var v=e.i(984397),g=e.i(36450),x=e.i(965600);e.s(["OTP_TIMER_CODE",0,30,"default",0,({isOpen:e,email:c,otp:f,onOtpChange:p,hasError:_,errorText:w,isLocked:C=!1,isLoading:T,countdown:b,onResend:y,onConfirm:j,onCancel:E,isTrustedDevice:N=!1,onTrustedDeviceChange:k,variant:S="classic",showTrustedDevice:O=!0,isInputDisabled:D=!1,isResendReady:M=!1})=>{let L=(0,o.useTranslations)("TwoFactorModal"),A=(0,r.useRef)(null);return(0,r.useEffect)(()=>{""===f&&(A.current=null)},[f]),(0,t.jsx)(s.Modal,{open:e,onClose:E,className:x.default.modalContainer,children:(0,t.jsxs)("div",{className:(0,d.default)(x.default.modalContent,{[x.default.passwordlessVariant]:"passwordless"===S}),"data-testid":"otp-modal",children:[(0,t.jsxs)("div",{className:x.default.modalHeader,children:[(0,t.jsx)("span",{className:x.default.modalTitle,children:L("title")}),(0,t.jsx)(l.IconButton,{onClick:E,className:x.default.closeButton,children:(0,t.jsx)(a.default,{})})]}),(0,t.jsx)("span",{className:x.default.headerEmail,children:L.rich("description",{highlight:e=>(0,t.jsx)("b",{children:e}),email:c})})," ",(0,t.jsxs)("div",{className:x.default.codeInputContainer,"data-testid":"otp-input-group",children:[(0,t.jsx)(m,{value:f,onChange:p,hasError:_,disabled:C||D,label:L("form.label"),digitAriaLabel:e=>L("form.digitAriaLabel",{digit:e}),errorText:w||L("form.error"),onComplete:e=>{D||T||A.current===e||(A.current=e,j(e))}}),(0,t.jsx)(h,{"data-testid":"otp-resend-link",onResend:y,countdownSeconds:30,confirmationDurationMs:4800,isLoading:T||C,isReady:M,countdown:b,initialText:L("resendLink.initial"),countdownText:e=>L("resendLink.countdown",{seconds:e}),resendText:L("resendLink.resend"),sentText:L("resendLink.sent"),loadingText:L("resendLink.loading")})]}),(0,t.jsx)(g.default,{message:L("notification"),type:"info"}),O&&(0,t.jsxs)("section",{className:x.default.trustedSection,children:[(0,t.jsxs)("div",{className:x.default.trustDeviceContainer,children:[(0,t.jsx)(i.Checkbox,{icon:(0,t.jsx)(v.default,{type:"default"}),checkedIcon:(0,t.jsx)(v.default,{type:"checked"}),checked:N,onChange:e=>k?.(e.target.checked),sx:{padding:0},"data-testid":"otp-trust-device-checkbox"}),(0,t.jsx)(n.Typography,{variant:"body2",children:L("trustDevice.label")})]}),(0,t.jsx)("span",{className:x.default.trustDeviceInfo,children:L("trustDevice.info")})]}),(0,t.jsx)("div",{className:x.default.btnsContainer,children:(0,t.jsx)(u.default,{type:"secondary",color:"alternative",disabled:T,onClick:E,"data-testid":"otp-cancel-button",children:T?L("actions.loading"):L("actions.cancel")})})]})})}],214013)},814717,e=>{e.v({helperSuccess:"PasswordField-module__BlAyuG__helperSuccess",passwordContainer:"PasswordField-module__BlAyuG__passwordContainer",passwordEye:"PasswordField-module__BlAyuG__passwordEye",passwordVisible:"PasswordField-module__BlAyuG__passwordVisible"})},838805,e=>{"use strict";var t=e.i(843476),r=e.i(50270),a=e.i(653145),s=e.i(78333),l=e.i(271645),i=e.i(814717),n=e.i(456757),o=e.i(146228),d=e.i(670498),u=e.i(256162);let c=/[^a-zA-Z0-9ñÑáéíóúÁÉÍÓÚüÜ_!@#$%^&*(),.?":{}|<>+\/~´'\\-]/g;e.s(["PasswordField",0,({customLabel:e,name:r,placeholder:u="",skipValidation:f=!1,helpText:m,showToggleVisibility:p=!1,successText:h,...v})=>{let g,[x,_]=(0,l.useState)(!1),{setValue:w,getValues:C,clearErrors:T,register:b,watch:y,formState:{errors:j}}=(0,a.useFormContext)(),E=(0,a.get)(j,r)?.message?.toString(),N=h?y(r):void 0,k=!!(h&&"string"==typeof N&&(g=N.trim()).length>=8&&/[A-Z]/.test(g)&&/[a-z]/.test(g)&&/\d/.test(g)),S=(0,l.useCallback)((0,s.default)(e=>{w(r,e,{shouldValidate:!f,shouldDirty:!0})},5e3),[r,w,f]);return(0,l.useEffect)(()=>()=>{S.cancel()},[S]),(0,t.jsxs)("div",{className:`${i.default.passwordContainer} ${x?i.default.passwordVisible:""}`,children:[(0,t.jsxs)("div",{className:d.default["field-container"],children:[(0,o.getInputLabel)({labelText:e.labelText,isRequired:e.isRequired,hasError:!k&&!!E,htmlFor:r,isDisabled:v.disabled}),(0,t.jsx)(n.TextField,{className:d.default["text-field"],id:r,helperText:k?h:E||m,FormHelperTextProps:k?{className:i.default.helperSuccess}:void 0,error:!k&&!!E,placeholder:u,size:"small",type:x?"text":"password",inputProps:{inputMode:v.inputMode||"text","data-testid":v.dataTestid?v.dataTestid:`${r}-input`,maxLength:100,onInput:e=>{f||(e.target.value=e.target.value.replace(c,""))}},...b(r,{onBlur:()=>{let e=C(r);w(r,f?e:e.trim(),{shouldValidate:!f,shouldDirty:!0})},onChange:()=>{S(C(r)),j.root?.serverError&&T("root")}}),...v})]}),p&&(0,t.jsx)("div",{className:i.default.passwordEye,onClick:()=>{_(!x)},children:x?(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z",fill:"#000000"})}):(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z",f
28ill:"#000000"})})})]})},"getPasswordFieldValidationSchema",0,(e=!1,t=!1,a={},s)=>{let{required:l,invalid:i}=(0,u.withCommonMessages)(a),n=s??i??"La contraseña debe tener al menos 8 caracteres, una mayúscula, una minúscula y un número.";return e?r.z.string():t?r.z.string().trim().min(1,{message:l}):r.z.string().trim().min(1,{message:l}).min(8,{message:n}).regex(/[A-Z]/,{message:n}).regex(/[a-z]/,{message:n}).regex(/\d/,{message:n})},"getPasswordFieldValidationSchemaForLoginAndRegister",0,(e=!1,t=!1,a={},s)=>{let{required:l,invalid:i}=(0,u.withCommonMessages)(a);return e?r.z.string():t?r.z.string().trim().min(1,{message:l}):r.z.string().trim().refine(e=>e.length>=8&&/[A-Z]/.test(e)&&/[a-z]/.test(e)&&/\d/.test(e),{message:s??i??"La contraseña debe tener al menos 8 caracteres, una mayúscula, una minúscula y un número."})}])},945650,e=>{"use strict";var t=e.i(843476),r=e.i(189911),a=e.i(271645),s=e.i(948148),l=e.i(214013),i=e.i(493606),n=e.i(36389),o=e.i(612276),d=e.i(484086),u=e.i(932341),c=e.i(487121),f=e.i(330268),m=e.i(746323),p=e.i(58701),h=e.i(42582),v=e.i(676785),g=e.i(89636),x=e.i(542518);let _=`${(0,r.getBffBaseUrl)()}/Auth/ValidateOTPCode`,w=`${(0,r.getBffBaseUrl)()}/Auth/SendOTPCode`,C=async(e,{arg:t})=>(0,i.prepurchaseFetcherForAuthentication)({url:e,nameToTrackErrors:"validateOtpRequest",body:t,isBodySecureToLog:!1}),T=async(e,{arg:t})=>(0,i.prepurchaseFetcherForAuthentication)({url:e,nameToTrackErrors:"sendOTPCodeRequest",body:t,isBodySecureToLog:!1});e.s(["TwoFactorModalLogin",0,({email:e,isOpen:r,onClose:i,isPasswordReset:b=!1,step:y,variant:j="classic"})=>{let{setIsLogged:E,setHash:N,validateOtp:k,validateOtpForReset:S}=(0,u.useAuth)(),O=(0,s.useTranslations)("TwoFactorModal"),[D,M]=(0,a.useState)(""),[L,A]=(0,a.useState)(!0),[B,I]=(0,a.useState)(!1),[R,P]=(0,a.useState)(0),[F,z]=(0,a.useState)(30),V=(0,a.useRef)(null),q=(0,a.useRef)(null),U=(0,a.useCallback)(e=>{P(e),q.current&&clearInterval(q.current),e<=0||(q.current=setInterval(()=>{P(e=>e<=1?(q.current&&clearInterval(q.current),0):e-1)},1e3))},[]);(0,a.useEffect)(()=>()=>{q.current&&clearInterval(q.current)},[]);let{trackEvent:G,getIdentifyEvent:H,trackIdentifyEvent:$}=(0,v.useAmplitude)(),W=(0,h.useAmplitudeSite)(),Z=(0,a.useCallback)(()=>{z(30),V.current&&clearInterval(V.current),V.current=setInterval(()=>{z(e=>e<=1?(V.current&&clearInterval(V.current),0):e-1)},1e3)},[]),{trigger:K,isMutating:Q,data:X,error:J}=(0,o.default)(w,T,{throwOnError:!1}),{trigger:Y,isMutating:ee,data:et,error:er}=(0,o.default)(_,C,{throwOnError:!1}),[ea,es]=(0,a.useState)(!1),el=(0,a.useRef)(!1);(0,a.useEffect)(()=>(r&&!el.current&&(el.current=!0,Z(),K({email:e})),r||(el.current=!1,es(!1)),()=>{V.current&&clearInterval(V.current)}),[r,e,K,Z]),(0,a.useEffect)(()=>{if(!r)return;let t=(0,p.send2FaWithStep)({site:W,url:window.location.href,email:e,step:y});G({name:t.name,data:t.properties})},[r]),(0,a.useEffect)(()=>{if(!et)return;let t=(0,p.confirmedCode2FaWithStep)({site:W,url:window.location.href,email:e,step:y});G({name:t.name,data:t.properties}),$(H())},[et]),(0,a.useEffect)(()=>{et&&(async()=>{if(et?.status===n.AuthStatusCode.RATE_LIMITED){I(!1),M(""),U(et.retryAfterSeconds??0);return}if(et?.token&&et?.hash){if(I(!1),(0,d.setP10EshCookie)(et.hash),N(et.hash),await (0,d.setProfileNameCookie)(et.firstName,et.lastName),b)await S(e,et.token,et.hash);else{if(et.trustedDeviceToken&&(0,d.setTrustedDeviceToken)(et.trustedDeviceToken),y===c.AmplitudeStepEnum.REGISTER)try{G({name:c.EventNameEnum.LOGIN_SUCCESS,data:{method:"email",provider:"email",funnel_step:"register",...(0,m.buildLoginVersionProperties)("passwordless"===j?"v2":"v1",{otpBypassed:!1}),...(0,f.buildNewAccountProperties)(et.registrationDate)}})}catch{}await k({...et,isTrustedDevice:L}),E(!0),et?.user?.userId||(await (0,d.setEmailCookie)(et.email),await (0,d.setEmailValidatedByOTP)(e));let t=await (0,d.getUserVisitorCookie)();(0,g.storeInsiderUserForNextPage)({email:e,uuid:t??void 0})}i()}else I(!0),M("")})().catch(()=>{I(!0),M(""),(0,d.removeLoginCookies)()})},[et]),(0,a.useEffect)(()=>{er&&(I(!0),M(""))},[er]),(0,a.useEffect)(()=>{J&&(es(!0),V.current&&clearInterval(V.current),z(0))},[J]),(0,a.useEffect)(()=>{X&&es(!1)},[X]);let ei=async()=>{I(!1),es(!1),el.current=!1;let t=await K({email:e});if((0,x.wasOtpSendSuccessful)(t)){let t;Z(),G({name:(t=(0,p.resendCode2FaWithStep)({site:W,url:window.location.href,email:e,step:y})).name,data:t.properties})}},en=async t=>{if(6!==t.length)return void I(!0);I(!1);let r=L?await (0,d.getTrustedDeviceToken)()??void 0:void 0;Y({email:e,OTPCode:t,trustDevice:L,existingTrustedDeviceToken:r})};return(0,t.jsx)(l.default,{isOpen:r,email:e,otp:D,onOtpChange:M,hasError:B||R>0||ea,errorText:R>0?O("form.rateLimitError",{seconds:R}):ea&&!B?O("form.sendError"):void 0,isLocked:R>0,isLoading:ee||Q,isResendReady:ea,countdown:F,onResend:ei,onConfirm:en,onCancel:()=>{M(""),I(!1),P(0),V.current&&clearInterval(V.current),q.current&&clearInterval(q.current),i()},isTrustedDevice:L,onTrustedDeviceChange:e=>{A(e);let t=e?(0,p.selectLinkedDevice)({site:W,url:window.location.href}):(0,p.unselectLinkedDevice)({site:W,url:window.location.href});t&&G({name:t.name,data:t.properties})},variant:j})}])},330268,746323,542518,e=>{"use strict";var t=e.i(822315);e.s(["NEW_ACCOUNT_PROPERTIES_WITHOUT_ACCOUNT",0,{is_new_account:!0,account_age_days:0},"buildNewAccountProperties",0,(e,r)=>{let a=(e=>{if(!e)return null;let r=(0,t.default)(e);if(!r.isValid())return null;let a=(0,t.default)().startOf("day").diff(r.startOf("day"),"day");return a<0?null:a})(e);return null===a?!0===r?{is_new_account:!1}:{is_new_account:"unknown"}:{is_new_account:0===a,account_age_days:a}}],330268);var r=e.i(36389);e.s(["buildLoginOptionProperties",0,({method:e,provider:t,funnelStep:r,loginVersion:a})=>({method:e,provider:t,funnel_step:r,login_version:a}),"buildLoginVersionProperties",0,(e,t)=>({login_version:e,otp_bypassed:t?.otpBypassed??!1}),"resolvePasswordlessOutcome",0,e=>{switch(e){case r.AuthStatusCode.OK:return"login_trusted_device";case r.AuthStatusCode.OTP_REQUIRED:return"register";case r.AuthStatusCode.USER_EXISTS:return"login";case r.AuthStatusCode.USER_BLOCKED:return"blocked";case r.AuthStatusCode.UNAUTHORIZED:return"unauthorized";case r.AuthStatusCode.RATE_LIMITED:return"rate_limited";default:return"error"}}
28],746323),e.s(["shouldSendOtpOnOpen",0,({isOpen:e,email:t,lastSentEmail:r})=>!!e&&!!t&&r!==t,"wasOtpSendSuccessful",0,e=>void 0!==e],542518)}]);

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.