PageSourceSearch

https://mapmagic.app/assets/auth-page.container-954607f0.js

js mapmagic.app collected 2026-09-25 20:24:16 UTC 21,620 bytes, 1 lines download raw bytes

1import{r as e,j as t,G as d1}from"./index-ea92eab9.js";import{P as C1,a4 as I,h as X,bX as g1,bY as h1,bZ as p1,c as t1,B as m1,y as i,o as x,K as z,aB as w1,ak as x1,a8 as Y,T as Q,e as f1,aE as k1,H as v1}from"./app-loader.container-18cad317.js";import{c as _1}from"./email.utils-84043971.js";import{A as e1,P as L1}from"./password-input-96e68968.js";const y1=s=>e.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},e.createElement("path",{d:"M24 12C24 18.6274 18.6274 24 12 24C5.37264 24 0 18.6274 0 12C0 5.37264 5.37264 0 12 0C18.6274 0 24 5.37264 24 12ZM5.76576 11.4108C5.8212 9.73032 6.11232 8.1228 6.60048 6.63648L2.59176 6.63192C1.77888 8.0544 1.27872 9.67848 1.18584 11.4108H5.76576ZM11.4142 6.6324H7.84152C7.3092 8.12352 6.996 9.72792 6.93672 11.4108H11.4139V6.6324H11.4142ZM11.4142 1.18488C10.1527 2.3124 9.08784 3.76944 8.3184 5.45016H11.4142V1.18488ZM3.36768 5.44992H7.044C7.66248 3.97176 8.5128 2.60136 9.49224 1.46688C6.9636 2.03712 4.80024 3.56208 3.36768 5.44992ZM22.8142 11.4108C22.7213 9.67824 22.2209 8.0544 21.4082 6.63192L17.399 6.63648C17.8874 8.1228 18.1786 9.73032 18.234 11.4108H22.8142ZM12.5858 11.4108H17.0633C17.004 9.72792 16.6906 8.12352 16.1582 6.6324H12.5858V11.4108ZM12.5858 5.44992H15.6818C14.9122 3.7692 13.8473 2.31216 12.5858 1.18464V5.44992ZM14.5075 1.46712C15.4872 2.6016 16.3378 3.972 16.956 5.44992H20.6323C19.2 3.56208 17.0369 2.03712 14.5075 1.46712ZM1.18584 12.5892C1.27872 14.3213 1.77888 15.9456 2.59176 17.3676L6.60048 17.3633C6.11232 15.8772 5.8212 14.2694 5.76576 12.589H1.18584V12.5892ZM11.4142 12.5892H6.93672C6.996 14.2723 7.3092 15.8765 7.84152 17.3676H11.4142V12.5892ZM11.4142 18.5501H8.31816C9.08784 20.231 10.1525 21.6878 11.4139 22.8151V18.5501H11.4142ZM9.49224 22.5329C8.5128 21.3979 7.66224 20.028 7.044 18.5498H3.36768C4.80024 20.4377 6.9636 21.9626 9.49224 22.5329ZM18.2338 12.5892C18.1786 14.2697 17.8874 15.8772 17.3988 17.3635L21.408 17.3678C22.2209 15.9458 22.7213 14.3215 22.8139 12.5894H18.2338V12.5892ZM12.5858 17.3676H16.1585C16.6908 15.8765 17.004 14.2723 17.0635 12.5892H12.5858V17.3676ZM12.5858 22.8151C13.8475 21.6878 14.9122 20.2308 15.6818 18.5501H12.5858V22.8151ZM20.6323 18.5501H16.956C16.3378 20.0282 15.4872 21.3982 14.5075 22.5331C17.0369 21.9626 19.2 20.4377 20.6323 18.5501Z",fill:"currentColor"})),b1="_button_1g5cu_1",E1="_container_1g5cu_15",T1="_option_1g5cu_24",M1="_selectedOption_1g5cu_38",R={button:b1,container:E1,option:T1,selectedOption:M1},j1=e.memo(s=>{const{anchor:o,onClickOutside:n,options:C,root:g,onLanguageChange:a,language:l}=s;return t.jsx(C1,{anchor:o,onClickOutside:n,className:R.container,root:g,customOffset:[0,8],placement:"bottom-end",children:C.map(r=>{const h=()=>{a(r),n()},p=I(R.option,{[R.selectedOption]:l===r});return t.jsx("button",{onClick:h,className:p,children:r},r)})})}),S1=e.memo(s=>{const{language:o,className:n,options:C,onLanguageChange:g}=s,[a,l]=e.useState(!1),r=e.useRef(null),h=e.useRef(null),p=()=>l(!1),w=()=>{l(!a)};return t.jsxs("div",{className:n,children:[t.jsx("button",{ref:r,className:R.button,onClick:w,children:t.jsx(y1,{})}),a&&r.current&&h.current&&t.jsx(j1,{anchor:r.current,root:h.current,onClickOutside:p,language:o,onLanguageChange:g,options:C}),t.jsx("div",{ref:h})]})}),P1=e.memo(s=>{const{lang:o,onLangChange:n}=X(),C=h1(o),g=a=>{const l=p1(a);n(l)};return e.createElement(S1,{language:C,className:s.className,onLanguageChange:g,options:g1})}),H1=s=>e.createElement("svg",{width:185,height:33,viewBox:"0 0 185 33",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},e.createElement("g",{clipPath:"url(#clip0_19047_67616)"},e.createElement("path",{d:"M0 16C0 7.16344 7.16344 0 16 0C24.8366 0 32 7.16344 32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16Z",fill:"#FFCF34"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.3115 7.74667L18.9777 25.8887L16.0598 25.1917L18.9995 12.8855L7.3907 17.9174L6.19758 15.1649L23.3115 7.74667Z",fill:"black"})),e.createElement("path",{d:"M43.0087 25.6995H40V6.90564H44.0952L49.4719 17.7893L51.1712 21.6883H51.3941L53.0378 17.7893L58.3587 6.90564H62.4539V25.6995H59.4452V14.1707L59.5566 11.4498H59.3338L58.1916 14.1707L53.0378 24.5775H49.4162L44.2623 14.1707L43.1201 11.4498H42.8973L43.0087 14.1707V25.6995Z",fill:"currentColor"}),e.createElement("path",{d:"M86.1004 32.4918H82.9365V18.2761C82.9365 16.8135 83.2748 15.5011 83.9514 14.339C84.6478 13.177 85.5831 12.2653 86.7571 11.6041C87.951 10.9229 89.2843 10.5823 90.7568 10.5823C92.2492 10.5823 93.5824 10.9329 94.7565 11.6342C95.9305 12.3154 96.8558 13.2471 97.5324 14.4292C98.2288 15.5913 98.577 16.8736 98.577 18.2761C98.577 19.7789 98.2487 21.1213 97.5921 22.3034C96.9354 23.4655 96.03 24.3872 94.8759 25.0684C93.7217 25.7296 92.3984 26.0602 90.906 26.0602C89.7519 26.0602 88.6873 25.7897 87.7123 25.2487C86.7372 24.7077 85.9512 23.9864 85.3542 23.0848C84.7772 22.1832 84.4886 21.2114 84.4886 20.1696L86.1004 20.8608V32.4918ZM90.7568 23.0848C91.6522 23.0848 92.4482 22.8744 93.1447 22.4537C93.8411 22.0129 94.3883 21.4318 94.7863 20.7105C95.2042 19.9692 95.4131 19.1678 95.4131 18.3062C95.4131 17.4446 95.2042 16.6632 94.7863 15.962C94.3883 15.2407 93.8411 14.6696 93.1447 14.2489C92.4482 13.8081 91.6522 13.5877 90.7568 13.5877C89.8812 13.5877 89.0853 13.8081 88.3689 14.2489C87.
16725 14.6696 87.1153 15.2407 86.6974 15.962C86.2994 16.6632 86.1004 17.4446 86.1004 18.3062C86.1004 19.1678 86.2994 19.9692 86.6974 20.7105C87.1153 21.4318 87.6725 22.0129 88.3689 22.4537C89.0853 22.8744 89.8812 23.0848 90.7568 23.0848Z",fill:"currentColor"}),e.createElement("path",{d:"M71.9872 26.0602C70.5744 26.0602 69.3108 25.7095 68.1965 25.0083C67.102 24.307 66.2364 23.3753 65.5997 22.2132C64.9629 21.0311 64.6445 19.7187 64.6445 18.2761C64.6445 16.8736 64.9928 15.5913 65.6892 14.4292C66.3857 13.2471 67.3209 12.3154 68.495 11.6342C69.669 10.9329 70.9923 10.5823 72.4648 10.5823C73.9572 10.5823 75.2904 10.9229 76.4645 11.6041C77.6584 12.2653 78.5937 13.177 79.2702 14.339C79.9667 15.5011 80.3149 16.8135 80.3149 18.2761V25.6995H77.3002V20.2297L78.3449 19.5084C78.3449 20.7506 78.0763 21.8626 77.539 22.8444C77.0017 23.8261 76.2555 24.6076 75.3004 25.1886C74.3651 25.7697 73.2607 26.0602 71.9872 26.0602ZM72.4648 23.0548C73.3602 23.0548 74.1562 22.8444 74.8527 22.4236C75.569 21.9828 76.1262 21.4018 76.5242 20.6805C76.942 19.9592 77.151 19.1678 77.151 18.3062C77.151 17.4446 76.942 16.6532 76.5242 15.9319C76.1262 15.2106 75.569 14.6396 74.8527 14.2188C74.1562 13.778 73.3602 13.5576 72.4648 13.5576C71.5892 13.5576 70.7933 13.778 70.0769 14.2188C69.3805 14.6396 68.8233 15.2106 68.4054 15.9319C68.0074 16.6532 67.8085 17.4446 67.8085 18.3062C67.8085 19.1678 68.0074 19.9592 68.4054 20.6805C68.8233 21.4018 69.3805 21.9828 70.0769 22.4236C70.7933 22.8444 71.5892 23.0548 72.4648 23.0548Z",fill:"currentColor"}),e.createElement("path",{d:"M104.695 25.6995H101.687V6.90564H105.782L111.158 17.7893L112.858 21.6883H113.081L114.724 17.7893L120.045 6.90564H124.14V25.6995H121.132V14.1707L121.243 11.4498H121.02L119.878 14.1707L114.724 24.5775H111.103L105.949 14.1707L104.807 11.4498H104.584L104.695 14.1707V25.6995Z",fill:"currentColor"}),e.createElement("path",{d:"M177.605 26.0301C176.55 26.0502 175.555 25.8598 174.62 25.4591C173.685 25.0584 172.869 24.5074 172.172 23.8061C171.476 23.0848 170.919 22.2533 170.501 21.3116C170.103 20.3699 169.904 19.3681 169.904 18.3062C169.904 17.2443 170.103 16.2425 170.501 15.3008C170.919 14.3591 171.476 13.5376 172.172 12.8363C172.869 12.115 173.685 11.564 174.62 11.1834C175.555 10.7826 176.55 10.5823 177.605 10.5823C178.978 10.5823 180.241 10.9029 181.395 11.544C182.569 12.1651 183.495 13.1569 184.171 14.5194L181.545 15.962C181.127 15.1806 180.57 14.5895 179.873 14.1888C179.197 13.7881 178.44 13.5877 177.605 13.5877C176.769 13.5877 176.003 13.7981 175.306 14.2188C174.63 14.6396 174.083 15.2106 173.665 15.9319C173.267 16.6532 173.068 17.4446 173.068 18.3062C173.068 19.1678 173.267 19.9592 173.665 20.6805C174.083 21.4018 174.63 21.9828 175.306 22.4236C176.003 22.8444 176.769 23.0548 177.605 23.0548C178.44 23.0548 179.197 22.8544 179.873 22.4537C180.57 22.0329 181.127 21.4418 181.545 20.6805L184.171 22.1231C183.495 23.4655 182.569 24.4573 181.395 25.0984C180.241 25.7196 178.978 26.0301 177.605 26.0301Z",fill:"currentColor"}),e.createElement("path",{d:"M163.809 10.9425H166.973V25.6991H163.809V10.9425ZM165.391 8.14748C165.013 8.14748 164.665 8.05731 164.346 7.87699C164.048 7.69666 163.799 7.44621 163.6 7.12563C163.421 6.80506 163.332 6.45442 163.332 6.07374C163.332 5.69305 163.421 5.34242 163.6 5.02184C163.799 4.70126 164.048 4.45081 164.346 4.27049C164.665 4.09016 165.013 4 165.391 4C165.769 4 166.107 4.09016 166.406 4.27049C166.704 4.45081 166.943 4.70126 167.122 5.02184C167.321 5.34242 167.421 5.69305 167.421 6.07374C167.421 6.45442 167.321 6.80506 167.122 7.12563C166.943 7.44621 166.704 7.69666 166.406 7.87699C166.107 8.05731 165.769 8.14748 165.391 8.14748Z",fill:"currentColor"}),e.createElement("path",{d:"M151.876 32.8524C150.264 32.8524 148.831 32.5018 147.578 31.8005C146.324 31.1193 145.359 30.1175 144.682 28.7951L147.309 27.3525C147.727 28.1339 148.314 28.755 149.07 29.2159C149.846 29.6767 150.762 29.9071 151.816 29.9071C152.811 29.9071 153.677 29.6767 154.413 29.2159C155.169 28.7751 155.756 28.1339 156.174 27.2924C156.612 26.4709 156.831 25.5092 156.831 24.4072V21.4619L157.607 20.8007C157.607 21.6422 157.378 22.4537 156.92 23.2351C156.463 24.0165 155.796 24.6576 154.92 25.1586C154.065 25.6595 153.02 25.9099 151.786 25.9099C150.413 25.9099 149.16 25.5793 148.025 24.9181C146.891 24.2369 145.986 23.3252 145.309 22.1832C144.653 21.0211 144.324 19.7187 144.324 18.2761C144.324 16.8736 144.672 15.5913 145.369 14.4292C146.065 13.2471 147.001 12.3154 148.175 11.6342C149.349 10.9329 150.672 10.5823 152.144 10.5823C153.637 10.5823 154.97 10.9229 156.144 11.6041C157.338 12.2653 158.273 13.177 158.95 14.339C159.646 15.5011 159.995 16.8135 159.995 18.2761V24.3471C159.995 26.0702 159.636 27.5629 158.92 28.8252C158.224 30.1075 157.258 31.0993 156.025 31.8005C154.811 32.5018 153.428 32.8524 151.876 32.8524ZM152.115 22.9045C152.99 22.9045 153.776 22.7041 154.473 22.3034C155.189 21.8826 155.756 21.3116 156.174 20.5903C156.592 19.8
169 156.801 19.0776 156.801 18.216C156.801 17.3545 156.592 16.5731 156.174 15.8718C155.756 15.1705 155.189 14.6196 154.473 14.2188C153.776 13.7981 152.99 13.5877 152.115 13.5877C151.259 13.5877 150.473 13.7981 149.757 14.2188C149.06 14.6196 148.503 15.1705 148.085 15.8718C147.667 16.5731 147.458 17.3545 147.458 18.216C147.458 19.0776 147.667 19.869 148.085 20.5903C148.503 21.3116 149.06 21.8826 149.757 22.3034C150.473 22.7041 151.259 22.9045 152.115 22.9045Z",fill:"currentColor"}),e.createElement("path",{d:"M133.674 26.0602C132.261 26.0602 130.998 25.7095 129.883 25.0083C128.789 24.307 127.923 23.3753 127.287 22.2132C126.65 21.0311 126.332 19.7187 126.332 18.2761C126.332 16.8736 126.68 15.5913 127.376 14.4292C128.073 13.2471 129.008 12.3154 130.182 11.6342C131.356 10.9329 132.679 10.5823 134.152 10.5823C135.644 10.5823 136.977 10.9229 138.151 11.6041C139.345 12.2653 140.281 13.177 140.957 14.339C141.654 15.5011 142.002 16.8135 142.002 18.2761V25.6995H138.987V20.2297L140.032 19.5084C140.032 20.7506 139.763 21.8626 139.226 22.8444C138.689 23.8261 137.943 24.6076 136.987 25.1886C136.052 25.7697 134.948 26.0602 133.674 26.0602ZM134.152 23.0548C135.047 23.0548 135.843 22.8444 136.54 22.4236C137.256 21.9828 137.813 21.4018 138.211 20.6805C138.629 19.9592 138.838 19.1678 138.838 18.3062C138.838 17.4446 138.629 16.6532 138.211 15.9319C137.813 15.2106 137.256 14.6396 136.54 14.2188C135.843 13.778 135.047 13.5576 134.152 13.5576C133.276 13.5576 132.48 13.778 131.764 14.2188C131.067 14.6396 130.51 15.2106 130.092 15.9319C129.694 16.6532 129.495 17.4446 129.495 18.3062C129.495 19.1678 129.694 19.9592 130.092 20.6805C130.51 21.4018 131.067 21.9828 131.764 22.4236C132.48 22.8444 133.276 23.0548 134.152 23.0548Z",fill:"currentColor"}),e.createElement("defs",null,e.createElement("clipPath",{id:"clip0_19047_67616"},e.createElement("rect",{width:32,height:32,rx:8,fill:"white"})))),N1=t1("div",{target:"et8poak1"})({name:"budh8k",styles:"display:flex;flex-direction:column;gap:16px"}),B1=t1(m1,{target:"et8poak0"})({name:"1nr9ywn",styles:"margin-top:16px;padding:9px 0;box-shadow:0px 4px 4px -2px rgba(24, 39, 75, 0.08);font-size:16px;line-height:28px;height:unset"}),V1="_errorMessage_1yhlt_1",Z1="_successMessage_1yhlt_9",I1="_infoMessage_1yhlt_17",R1="_infoMessageButton_1yhlt_25",W1="_secondaryButton_1yhlt_36",F1="_continueWithEmail_1yhlt_46",A1="_continueWithEmailLink_1yhlt_50",G1="_sendNewCodeButton_1yhlt_56",O1="_input_1yhlt_64",u={errorMessage:V1,successMessage:Z1,infoMessage:I1,infoMessageButton:R1,secondaryButton:W1,continueWithEmail:F1,continueWithEmailLink:A1,sendNewCodeButton:G1,input:O1},K1=e.memo(s=>{const{mode:o,step:n,onForgotPasswordClick:C,onReturnToEmailClick:g,email:a,onEmailChange:l,isEmailValid:r,password:h,onPasswordChange:p,isPasswordValid:w,loginCode:M,onLoginCodeChange:f,isLoginCodeValid:m,onContinueButtonClick:_,errorMessage:k,isRegistered:j,onRegisterButtonClick:L,handleSendNewCodeClick:y,isCodeSent:S}=s,b=e.useCallback(E=>l(E.target.value),[l]),W=e.useCallback(E=>p(E.target.value),[p]),F=e.useCallback(E=>f(E.target.value),[f]),P=e.useCallback(E=>{E.key==="Enter"&&_()},[_]),A=i("auth/email-input-placeholder"),G=i("auth/forgot-password-question"),O=i("auth/password"),K=i("auth/password-input-placeholder"),U=i("auth/login-code"),D=i("auth/login-code-input-placeholder"),N=i(q1(o,j)),q=i("auth/check-your-inbox"),c=i("auth/we-sent-you-reset-link"),T=i("auth/you-can-also-text"),v=i("auth/continue-with-email-secondary"),B=i("auth/reset-password/invalid-email"),J=i("auth/reset-password/invalid-email/register-link"),H=i("auth/send-new-login-code"),V=i("auth/we-sent-you-new-code"),n1=i(D1(n)),s1=I(u.secondaryButton,u.continueWithEmail),o1=I(u.secondaryButton,u.continueWithEmailLink),a1=I(u.secondaryButton,u.sendNewCodeButton),i1=n==="initial"||n==="password",r1=n==="reset-password"||n==="reset-password-done",l1=n!=="reset-password-done",c1=n!=="reset-password-done",u1=n==="reset-password-done";return t.jsxs(N1,{children:[l1&&t.jsx(e1,{className:u.input,title:"Email",type:"email",autoComplete:o==="login"?"username":"email",placeholder:A,value:a,onChange:b,onKeyDown:P,isValid:r,autoF
1ocus:!0}),n==="password"&&t.jsx(L1,{autoFocus:!0,className:u.input,title:O,autoComplete:o==="login"?"current-password":"new-password",placeholder:K,value:h,onChange:W,isValid:w,onKeyDown:P}),n==="login-code"&&t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:u.successMessage,children:[N,t.jsx("br",{}),q]}),t.jsx(e1,{className:u.input,title:U,type:"text",placeholder:D,value:M,onChange:F,isValid:m,onKeyDown:P})]}),c1&&t.jsx(B1,{onClick:_,variant:"outlined",disabled:n==="waiting",children:n1}),k&&t.jsx(U1,{errorTextId:k}),n==="reset-password-invalid-email"&&t.jsxs("span",{className:u.infoMessage,children:[B," ",t.jsx("button",{className:u.infoMessageButton,onClick:L,children:J}),"."]}),n==="login-code"&&!m&&t.jsxs("button",{disabled:S,className:a1,onClick:y,children:[!S&&H,S&&V]}),i1&&t.jsx("button",{className:u.secondaryButton,onClick:C,children:G}),u1&&t.jsx("span",{className:u.successMessage,children:c}),r1&&t.jsxs("span",{className:s1,children:[T," ",t.jsx("button",{className:o1,onClick:g,children:v})]})]})}),U1=e.memo(s=>t.jsx("span",{className:u.errorMessage,children:i(s.errorTextId)})),D1=s=>{switch(s){case"initial":return"auth/continue-with-email";case"waiting":return"auth/please-wait";case"reset-password":case"reset-password-done":case"reset-password-invalid-email":return"auth/send-reset-link";case"password":return"auth/continue-with-password";case"login-code":return"auth/continue-with-code"}},q1=(s,o)=>s=="login"&&o==!1?"auth/we-sent-you-auth-code-msg-in-login":s=="signup"&&o==!1?"auth/we-sent-you-auth-code-msg-in-singup":"auth/we-sent-you-login-code-msg";function Y1(s){const o=typeof s=="string"?s:s instanceof Error?s.message:String(s??"");return o.includes("too many attempts")||o.includes("code issuance cooldown")}function Z(s,o){return Y1(s)?"auth/too-many-attempts":o}let $;const Q1=e.memo(s=>{const[o,n]=e.useState("initial"),C=e.useMemo($1,[]),[g,a]=e.useState(C?"auth/try-again-error":void 0),{lang:l}=X(),[r,h]=e.useState(""),[p,w]=e.useState(!0),M=e.useCallback(c=>{["password","login-code"].includes(o)&&r===c||(w(!0),h(c),a(void 0),o!=="initial"&&o!=="reset-password"&&n("initial"))},[w,a,h,o,r]),[f,m]=e.useState(""),[_,k]=e.useState(!0),j=e.useCallback(c=>{k(!0),m(c),a(void 0)},[k,a,m]),[L,y]=e.useState(""),[S,b]=e.useState(!0),[W,F]=e.useState(!1),P=e.useCallback(c=>{b(!0),y(c),a(void 0)},[b,a,y]),A=e.useCallback(async()=>{const c=await x.sendLoginCode(r,l);if(c.type==="success"){n("login-code"),F(!0),a(void 0);return}a(Z(c.type==="failure"?c.error:void 0,"auth/unknown-error"))},[r,l]),[G,O]=e.useState(!1);e.useEffect(()=>()=>{$&&clearTimeout($)},[]);const K=e.useCallback(async()=>{const c=_1(r);switch(o){case"initial":if(c){w(!1),a(c);return}a(void 0),n("waiting");const T=await x.getUserSigninParams(r);if(T.type!=="success"){a("auth/unknown-error");return}if(O(T.value.registration_completed||!1),T.value.base_linked){m(""),n("password");return}const v=await x.sendLoginCode(r,l);if(v.type!=="success"){n("initial"),a(Z(v.type==="failure"?v.error:void 0,"auth/unknown-error"));return}v.type==="success"&&v.value.isUserCreated&&(z.setUserId(v.value.user_id),z.userCreated("basic")),n("login-code");break;case"login-code":const B=await x.signInBasic(r,L,!0);B.type==="failure"?(b(!1),a(Z(B.error,"auth/incorrect-login-code"))):(n("waiting"),await new Promise(V=>{$=window.setTimeout(V,500)}),window.location.reload());break;case"reset-password":case"reset-password-invalid-email":if(c){a(c);return}if(a(void 0),n("waiting"),(await x.getUserSigninParams(r)).type!=="success"){a("auth/unknown-error");return}const H=await x.sendLoginCode(r,l,!0);if(H.type!=="success"){n("reset-password"),a(Z(H.type==="failure"?H.error:void 0,"auth/unknown-error"));return}n("reset-password-done");break;case"password":(await x.signInBasic(r,f,!1)).type==="failure"?(b(!1),a("auth/invalid-password-message")):n("waiting")}},[r,a,o,L,m,f,l]);e.useEffect(()=>{m(""),k(!0),y(""),b(!0),n("initial")},[s.mode]);const U=e.useCallback(()=>n("reset-password"),[n]),D=e.useCallback(()=>n("initial"),[n]),N=w1(),q=e.useCallback(()=>{x1("/signup",N,{replace:!0})}
1,[N]);return t.jsx(K1,{mode:s.mode,step:o,email:r,onEmailChange:M,isEmailValid:p,password:f,onPasswordChange:j,isPasswordValid:_,loginCode:L,onLoginCodeChange:P,isLoginCodeValid:S,onContinueButtonClick:K,errorMessage:g,onForgotPasswordClick:U,onReturnToEmailClick:D,isRegistered:G,onRegisterButtonClick:q,handleSendNewCodeClick:A,isCodeSent:W})}),$1=()=>new URLSearchParams(window.location.search).get("incorrect-code")!==null,z1="_pageContainer_1vcxb_1",X1="_changeModeLink_1vcxb_11",J1="_header_1vcxb_28",ee="_pageTitle_1vcxb_36",te="_divider_1vcxb_45",ne="_dividerText_1vcxb_69",se="_buttonText_1vcxb_74",oe="_googleButtonContainer_1vcxb_80",ae="_secondaryButton_1vcxb_87",ie="_secondaryText_1vcxb_96",re="_languageSelector_1vcxb_105",le="_logoLink_1vcxb_110",ce="_linkTo_1vcxb_121",d={pageContainer:z1,changeModeLink:X1,header:J1,pageTitle:ee,divider:te,dividerText:ne,buttonText:se,googleButtonContainer:oe,secondaryButton:ae,secondaryText:ie,languageSelector:re,logoLink:le,linkTo:ce},ue=e.memo(s=>{const{mode:o,onGoogleSuccess:n,onGoogleError:C,isGoogleAuthAvailable:g}=s,a=i("auth/btn-login"),l=i("auth/btn-signup"),r=i("auth/title-login"),h=i("auth/title-signup"),p=i("auth/divider"),w=i("auth/consent-message-1"),M=i("auth/consent-message-2"),f=i("auth/recaptcha-terms-link"),m=i("auth/recaptcha-privacy-link"),_=i("auth/recaptcha-terms-text"),k=i("auth/recaptcha-privacy-text"),j=o==="login"?l:a,L=o==="login"?"/signup":"/login",y=o==="login"?r:h;return t.jsxs("div",{className:d.pageContainer,children:[t.jsxs("div",{className:d.header,children:[t.jsx("a",{href:"/",className:d.logoLink,children:t.jsx(H1,{})}),t.jsx(P1,{className:d.languageSelector}),t.jsx(Y,{keepQuery:!0,href:L,className:d.changeModeLink,children:j})]}),t.jsx("h2",{className:d.pageTitle,children:y}),g&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:d.googleButtonContainer,children:t.jsx(d1,{onSuccess:n,onError:C,type:"standard",theme:"outline",size:"large",text:o==="login"?"signin_with":"signup_with",shape:"rectangular",width:"320"})}),t.jsx("div",{className:d.divider,children:t.jsx("span",{className:d.dividerText,children:p})})]}),t.jsx(Q1,{mode:o}),t.jsxs("span",{className:d.secondaryText,children:[t.jsxs("div",{children:[t.jsx(Q,{id:"auth/recaptcha-text-1"})," ",t.jsx("a",{href:m,target:"_blank",rel:"noreferrer",className:d.linkTo,children:k})," ",t.jsx(Q,{id:"auth/recaptcha-text-2"})," ",t.jsx("a",{href:f,target:"_blank",rel:"noreferrer",className:d.linkTo,children:_})," ",t.jsx(Q,{id:"auth/recaptcha-text-3"})]}),t.jsx("br",{}),w," ",t.jsx(Y,{href:"/legal/terms-of-use",className:d.linkTo,children:"Terms of Service"})," & ",t.jsx(Y,{href:"/legal/privacy-policy",className:d.linkTo,children:"Privacy Policy"})," ",M,t.jsx("br",{})]})]})}),pe=e.memo(({mode:s})=>{e.useEffect(()=>{z.pageViewed(s)},[s]);const{lang:o}=f1(),{onLangChange:n}=X(),{isGoogleAuthAvailable:C}=k1(x.state),g=e.useCallback(l=>{l.credential&&x.signInWithGoogleCredential(l.credential)},[]),a=e.useCallback(()=>{window.location.reload()},[]);return o?(n(o),t.jsx(v1,{to:"/"+s})):t.jsx(ue,{mode:s,onGoogleSuccess:g,onGoogleError:a,isGoogleAuthAvailable:C})});export{pe as default};

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.