1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[604],{1339:e=>{e.exports={tabs:"tabs_tabs__MYUwR",tab:"tabs_tab__e65v2",active:"tabs_active__jP5xY",tab_content:"tabs_tab_content__G54ca",tab_content_with_oauth:"tabs_tab_content_with_oauth__iPPZE"}},66290:e=>{e.exports={container:"oauth-vk-id_container__wj_Pk",loading:"oauth-vk-id_loading__3D9Zu",blink:"oauth-vk-id_blink__WVkVx"}},69902:(e,n,s)=>{"use strict";s.r(n),s.d(n,{__N_SSP:()=>X,default:()=>K});var t=s(37876),r=s(3814),o=s(45194),a=s(85952);function i(e){var n,s;let{autofocus:i,request:l,label:u="Ðод из пиÑÑма",resend:c,initParams:d,description:p,onSuccess:m,onErrorHook:h,sendOnInit:g=!1,showSpamNotification:v=!1}=e,{controller:x,submit:f,field:j}=(0,r.mN)({showToastError:!1,initParams:{...(null==c?void 0:c.name)?{[c.name]:null!=(n=c.value)?n:""}:{},...d?{[d.name]:null!=(s=d.value)?s:""}:{}},request:l,onSuccess:m,onErrorHook:h});return(0,t.jsx)(a.l,{controller:x,stackButtons:!0,submitButtonProps:{text:["ÐÑодолжиÑÑ","ÐÑовеÑÑем..."]},backButton:{to:"/auth",text:"ÐеÑнÑÑÑÑÑ Ðº авÑоÑизаÑии"},description:(0,t.jsxs)(t.Fragment,{children:[p,v&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("br",{}),(0,t.jsx)("br",{}),"Ðе пÑиÑло пиÑÑмо? ÐаглÑниÑе в Ð¿Ð°Ð¿ÐºÑ ",(0,t.jsx)("b",{children:"\xabСпам\xbb"})]})]}),children:(0,t.jsx)(o.A,{autofocus:i,label:u,sendOnInit:g,model:j("code"),resend:c,onFilled:()=>f()})})}var l=s(89719),u=s(56750),c=s(13977),d=s.n(c),p=s(89980),m=s(70727),h=s(14e3),g=s(8932),v=s(83985);function x(e){let{onTwofaError:n}=e,{handleLoginSuccessResponse:s}=(0,v.Jd)(),r=(0,h.useRouter)(),o=(0,m.XU)(),{controller:i,field:c,setError:x}=(0,p.m)({initParams:{login:"",password:""},captchaEnabled:!0,showToastError:!1,request:e=>l.R2.signin(e),onSuccess:s,async onError(e,s){var t,a;if((null==(t=e.extra)?void 0:t.code)==="TWOFA_CODE_IS_REQUIRED")return void n({...s,captcha:{...s.captcha,bypassToken:e.extra.captchaBypassToken}});(null==e?void 0:e.status)===445&&(o.setSignupEmail(s.login),r.push("/auth/confirm-signup-send")),x(null!=(a=e.message)?a:e)}});return(0,t.jsxs)(a.l,{controller:i,submitButtonProps:{text:["ÐойÑи в аккаÑнÑ","ÐаÑ
одим..."],wide:!0},children:[(0,t.jsx)(u.A,{name:"login",label:"Ðогин или поÑÑа",placeholder:"ÐведиÑе логин или поÑÑÑ",autoComplete:"username email",required:!0,model:c("login"),inputProps:{minLength:3,maxLength:256}}),(0,t.jsx)(u.A,{name:"password",label:"ÐаÑолÑ",placeholder:"ÐведиÑе паÑолÑ",hint:(0,t.jsx)("div",{className:d().hint_action,children:(0,t.jsx)(g.A,{href:"/auth/recover",style:{fontWeight:500,textDecoration:"none"},children:"ÐабÑли паÑолÑ?"})}),required:!0,type:"password",autoComplete:"current-password",model:c("password"),inputProps:{minLength:6,maxLength:100}})]})}var f=s(14232),j=s(70402),w=s(35253),_=s(579),b=s.n(_),E=s(85812);function y(){let e=(0,f.useRef)(!0),n=(0,f.useRef)(null),s=(0,h.useRouter)(),o=(0,m.XU)(),{login:a}=(0,v.Jd)(),[i,l]=(0,f.useState)({login:"",code:"",password:"",password_repeat:""});(0,f.useEffect)(()=>{if(e.current&&!o.recoverData){e.current=!1;return}o.recoverData||s.push(E.$.routes.auth.login),l(e=>{var n,s,t,r;return{...e,login:null!=(t=null==(n=o.recoverData)?void 0:n.login)?t:"",code:null!=(r=null==(s=o.recoverData)?void 0:s.code)?r:""}})},[]);let{submit:c,submitting:d,error:p}=(0,r.of)("POST","/auth/password-recovery",{params:i,async onSuccess(){o.setRecoverData(null),a()}});return(0,t.jsxs)("form",{onSubmit:c,className:b().form,children:[(0,t.jsx)(u.A,{id:"password",name:"password",label:"ÐаÑолÑ",placeholder:"ÐведиÑе новÑй паÑолÑ",hint:"ÐинимÑм 6 Ñимволов",type:"password",autoFocus:!0,autoComplete:"new-password",required:!0,model:{formData:i,setFormData:l},inputProps:{ref:n,minLength:6,maxLength:30}}),(0,t.jsx)(u.A,{id:"password_repeat",name:"password_repeat",label:"ÐовÑоÑиÑе паÑолÑ",placeholder:"ÐведиÑе новÑй паÑÐ¾Ð»Ñ ÐµÑе Ñаз",type:"password",autoComplete:"new-password",required:!0,value:i.password_repeat,onInput:(e,s)=>{l(n=>({...n,password_repeat:e})),s.setCustomValidity(n.current.value!==e?"ÐаÑоли Ð´Ð¾Ð»Ð¶Ð½Ñ ÑовпадаÑÑ":"")},inputProps:{minLength:6,maxLength:30}}),(0,t.jsx)(w.j,{error:p}),(0,t.jsx)(j.b7,{submitting:d})]})}function S(){let e=(0,h.useRouter)(),n=(0,m.XU)(),{controller:s,field:r}=(0,p.m)({initParams:{login:""},request:l.R2.recoveryPasswordInit,showToastError:!1,captchaEnabled:!0,async onSuccess(s,t){n.setRecoverData({login:t.login}),e.push("/auth/confirm-recover")}});return(0,t.jsx)(a.l,{controller:s,submitButtonProps:{text:["ÐоÑÑÑановиÑÑ Ð¿Ð°ÑолÑ","ÐÑпÑавлÑем пиÑÑмо..."]},backButton:{text:"ÐеÑнÑÑÑÑÑ Ðº авÑоÑизаÑии",to:"/auth"},stackButtons:!0,children:(0,t.jsx)(u.A,{name:"login",label:"ÐогиÐ
1½ или поÑÑа",placeholder:"ÐведиÑе логин или поÑÑÑ",autoFocus:!0,required:!0,autoComplete:"username email",model:r("login"),inputProps:{minLength:3,maxLength:255}})})}var k=s(2323),P=s(79352);function R(){let e=(0,h.useRouter)(),n=(0,m.XU)(),{controller:s,field:o}=(0,r.mN)({id:"signup",save:!0,captchaEnabled:!0,showToastError:!1,initParams:{username:"",email:"",password:"",agree:!1},request:e=>k.lu.signup(e),async onSuccess(s,t){n.setSignupEmail(t.email),n.setSignupToken(s.signupToken),e.push("/auth/confirm-signup")}});return(0,t.jsxs)(a.l,{controller:s,submitButtonProps:{text:["СоздаÑÑ Ð°ÐºÐºÐ°ÑнÑ","Создаем аккаÑнÑ..."],wide:!0},children:[(0,t.jsx)(u.A,{name:"email",label:"ÐоÑÑа",placeholder:"ÐведиÑе поÑÑÑ",hint:"Ðа Ð½ÐµÑ Ð¿ÑÐ¸Ð´ÐµÑ Ð¿Ð¸ÑÑмо Ð´Ð»Ñ Ð°ÐºÑиваÑии",type:"email",autoComplete:"email",required:!0,model:o("email"),inputProps:{minLength:3,maxLength:256}}),(0,t.jsx)(u.A,{name:"username",label:"Ðогин или никнейм",placeholder:"ÐведиÑе логин или никнейм",hint:"ÐаÑинÑкие бÑÐºÐ²Ñ Ð¸ ÑиÑÑÑ",autoComplete:"off",required:!0,model:o("username"),pattern:"(?![_.])(?!.*\\..*\\.)[A-Za-z0-9._]{3,20}(?<![_.])$",customValidityMessage:"Рлогине можно иÑполÑзоваÑÑ ÑолÑко лаÑинÑкие бÑÐºÐ²Ñ Ð¸ ÑиÑÑÑ, Ð¾Ñ 3 до 20 Ñимволов",showCounter:!1}),(0,t.jsx)(u.A,{name:"password",label:"ÐаÑолÑ",placeholder:"ÐведиÑе паÑолÑ",hint:"ÐинимÑм 6 Ñимволов",type:"password",autoComplete:"new-password",required:!0,model:o("password"),inputProps:{minLength:6,maxLength:30}}),(0,t.jsx)(P.A,{name:"agree",required:!0,model:o("agree"),label:(0,t.jsxs)(t.Fragment,{children:["С полÑзоваÑелÑÑким ÑоглаÑением,"," ",(0,t.jsx)(g.A,{href:"/rules",target:"_blank",children:"пÑавилами ÑайÑа"})," ","ознакомилÑÑ Ð¸ пÑÐ¸Ð½Ð¸Ð¼Ð°Ñ Ð² полном обÑеме"]})})]})}var I=s(1339),N=s.n(I),A=s(69241),D=s(89099),C=s(7574),T=s(61948),q=s(77328),L=s.n(q),V=s(77893),F=s(58346),U=s(84879);function $(){let e=(0,h.useSearchParams)(),n=(0,h.useRouter)(),{oauthVkId:s}=(0,v.Jd)(),r=e.get("code"),o=e.get("state"),a=e.get("device_id");return(0,f.useEffect)(()=>{let e=sessionStorage.getItem(E.$.storageKeys.pkceVerifier),t=sessionStorage.getItem(E.$.storageKeys.oauthState);if(!r||!o||!a||!e||!t||o!==t)return void n.push(E.$.routes.home);s({pkce:e,deviceId:a,code:r})},[]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(L(),{children:(0,t.jsx)("meta",{name:"robots",content:"noindex, follow"})}),(0,t.jsx)(U.I,{})]})}let B={login:"ÐвÑоÑизаÑиÑ",signup:"РегиÑÑÑаÑиÑ",recover:"ÐоÑÑÑановление паÑолÑ","new-password":"ÐовÑй паÑолÑ","confirm-recover":"ÐодÑвеÑждение","confirm-signup":"ÐодÑвеÑждение","confirm-signup-send":"ÐодÑвеÑждение","confirm-signin":"ÐодÑвеÑждение","2fa":"ÐвÑÑ
ÑакÑоÑÐ½Ð°Ñ Ð°ÑÑенÑиÑикаÑиÑ","oauth-vk-id":"ÐвÑоÑизаÑÐ¸Ñ ÑеÑез VK ID"},O={[F.F.AUTH_EMAIL_REQUIRED]:"Ðе ÑдалоÑÑ Ð°Ð²ÑоÑизоваÑÑÑÑ. Ð ÑÑеÑной запиÑи во ÐÐонÑакÑе оÑÑÑÑÑÑвÑÐµÑ email."};var X=!0;function K(){var e,n,s,r,o,a,u,c,d,p,g,j,w,_,k,P;let I=(0,m.XU)(),q=(0,h.useRouter)(),U=(0,D.useRouter)(),{login:X,setRedirectAfterLogin:K,handleLoginSuccessResponse:J}=(0,v.Jd)(),{redirect:W,redirect_type:M}=U.query,Z=(0,f.useRef)(!0),[z,H]=(0,f.useState)({}),Q=(0,h.useSearchParams)(),[Y,G]=(0,f.useState)(!1),[ee,en]=(0,f.useState)("ÐеобÑ
одимо заÑегиÑÑÑиÑоваÑÑÑÑ"),es=null!=(d=null==(n=U.query)||null==(e=n.slug)?void 0:e[0])?d:"login",et=["login","signup"].includes(es),er=["login","recover","new-password","confirm-recover","2fa","confirm-signin"].includes(es);return((0,f.useEffect)(()=>{if(!W||"string"!=typeof W)return;let e=decodeURIComponent(W),n=new URL(e,window.location.origin).pathname;E.$.allowedRedirectPaths.includes(n)&&K(e,"string"==typeof M?M:"router")},[W,M]),(0,f.useEffect)(()=>
1{if("confirm-signup"===es&&(!I.signupEmail||!I.signupToken)||"confirm-recover"===es&&!I.recoverData||"confirm-signin"===es&&!I.signinVerificationId){if(Z.current){Z.current=!1;return}q.push("/")}},[]),(0,f.useEffect)(()=>{{let e=Q.get("status"),n=!!(("login"===es||"signup"===es)&&window.sessionStorage.getItem(E.$.storageKeys.showAuthNotification)||e&&(0,F.r)(e));if(e&&(0,F.r)(e)){let n=O[e];n&&en(n)}else"login"===es&&en("ÐеобÑ
одимо авÑоÑизоваÑÑÑÑ"),"signup"===es&&en("ÐеобÑ
одимо заÑегиÑÑÑиÑоваÑÑÑÑ");G(n)}return()=>{sessionStorage.removeItem(E.$.storageKeys.showAuthNotification)}},[es]),"oauth-vk-id"===es)?(0,t.jsx)($,{}):(0,t.jsxs)("div",{className:b().form_panel,children:[(0,t.jsx)(L(),{children:(0,t.jsx)("title",{children:null!=(p=B[es])?p:"ÐвÑоÑизаÑиÑ"})}),(0,t.jsxs)("div",{className:N().tabs,children:[(0,t.jsx)("div",{className:(0,A.A)(N().tab,{[N().active]:er}),onClick:()=>{er||q.push(E.$.routes.auth.login)},children:"ÐвÑоÑизаÑиÑ"}),(0,t.jsx)("div",{className:(0,A.A)(N().tab,{[N().active]:!er}),onClick:()=>{er&&q.push(E.$.routes.auth.signup)},children:"РегиÑÑÑаÑиÑ"})]}),(0,t.jsxs)("div",{className:(0,A.A)(N().tab_content,{[N().tab_content_with_oauth]:et}),children:[Y&&(0,t.jsx)(C.A,{type:"warning",title:ee}),et&&(0,t.jsxs)("div",{children:[(0,t.jsx)(V.z,{buttons:["google","vk"]}),(0,t.jsx)("div",{className:b().separator,children:(0,t.jsx)("span",{children:"или ÑеÑез"})})]}),"login"===es&&(0,t.jsx)(x,{onTwofaError:e=>{H(e),U.push({pathname:"/auth/2fa",query:{redirect:W}})}})||"recover"===es&&(0,t.jsx)(S,{})||"new-password"===es&&(0,t.jsx)(y,{})||"2fa"===es&&(0,t.jsx)(i,{request:async e=>{var n;return l.R2.signin({...z,twoFaCode:null==(n=e.code)?void 0:n.join("")})},onErrorHook:e=>{var n;(null==(n=e.extra)?void 0:n.code)!=="TWOFA_INVALID_CODE"&&((0,T.T)(e),U.push(E.$.routes.auth.login))},onSuccess:J,description:"ЧÑÐ¾Ð±Ñ Ð²Ð¾Ð¹Ñи на ÑÐ°Ð¹Ñ Ð²Ð²ÐµÐ´Ð¸Ñе код двÑÑ
ÑакÑоÑной аÑÑенÑиÑикаÑии",label:"ÐвÑÑ
ÑакÑоÑÐ½Ð°Ñ Ð°ÑÑенÑиÑикаÑиÑ"},es)||"confirm-signin"===es&&(0,t.jsx)(i,{showSpamNotification:!0,request:async e=>{var n,s,t;return l.R2.confirmSignin({verificationId:null!=(s=I.signinVerificationId)?s:"",code:null!=(t=null==(n=e.code)?void 0:n.join(""))?t:""})},resend:{url:"/auth/signin/verification/resend-code",name:"verificationId",value:null!=(g=I.signinVerificationId)?g:void 0},description:(0,t.jsxs)("span",{children:["ЧÑÐ¾Ð±Ñ Ð²Ð¾Ð¹Ñи, введиÑе код из 6 ÑиÑÑ ÐºÐ¾ÑоÑÑй пÑиÑÑл на поÑÑÑ"," ",(null==I?void 0:I.maskedEmail)&&(0,t.jsx)("b",{children:I.maskedEmail})]}),onSuccess:async()=>{I.setSigninVerificationId(null),await X()}},es)||("confirm-signup"===es||"confirm-signup-send"===es)&&(0,t.jsx)(i,{showSpamNotification:!0,request:async e=>{var n,s;return l.R2.confirmEmail({...e,code:null!=(s=null==(n=e.code)?void 0:n.join(""))?s:""})},sendOnInit:"confirm-signup-send"===es,initParams:{name:"signupToken",value:null!=(j=I.signupToken)?j:void 0},resend:{url:"/auth/email-confirmation",name:"login",value:null!=(w=I.signupEmail)?w:void 0},description:(null==(s=I.signupEmail)?void 0:s.includes("@"))?(0,t.jsxs)("span",{children:["ЧÑÐ¾Ð±Ñ Ð·Ð°Ð²ÐµÑÑиÑÑ ÑегиÑÑÑаÑиÑ, введиÑе код из 6 ÑиÑÑ ÐºÐ¾ÑоÑÑй пÑиÑÑл на поÑÑÑ"," ",(0,t.jsx)("b",{children:I.signupEmail})]}):(0,t.jsxs)("span",{children:["ЧÑÐ¾Ð±Ñ Ð·Ð°Ð²ÐµÑÑиÑÑ ÑегиÑÑÑаÑиÑ, введиÑе код из 6 ÑиÑÑ ÐºÐ¾ÑоÑÑй пÑиÑÑл на поÑÑÑ Ð¿Ð¾Ð»ÑзоваÑÐµÐ»Ñ ",(0,t.jsx)("b",{children:I.signupEmail})]}),onSuccess:async()=>{I.setSignupEmail(null),I.setSignupToken(null),await X()}},es)||"confirm-recover"===es&&(0,t.jsx)(i,{showSpamNotification:!0,request:async e=>{var n,s;return l.R2.passwordRecoveryValidateCode({...e,code:null!=(s=null==(n=e.code)?void 0:n.join(""))?s:""})},resend:{url:"/auth/password-recovery/send-code",name:"login",value:null!=(_=null==(r=I.recoverData)?void 0:r.login)?_:"",withCaptcha:!0},description:(null==(a=I.recoverData)||null==(o=a.login)?void 0:o.includes("@"))?(0,t.jsxs)("span",{children:["ЧÑÐ¾Ð±Ñ Ð¿Ð¾Ð´ÑвеÑдиÑÑ ÑÑо Ð²Ñ Ð´ÐµÐ¹ÑÑвиÑелÑно ÑвлÑеÑеÑÑ Ð²Ð»Ð°Ð´ÐµÐ»ÑÑем аккаÑнÑа, ÑкажиÑе код из 6 ÑиÑÑ ÐºÐ¾ÑоÑÑй пÑиÑÑл вам на поÑÑÑ"," ",(0,t.jsx)("b",{children:null!=(k=null==(u=I.recoverData)?void 0:u.login)?k:""})]}):(0,t.jsxs)("span",{children:["ЧÑÐ¾Ð±Ñ Ð¿Ð¾Ð´ÑвеÑдиÑÑ ÑÑо Ð²Ñ Ð´ÐµÐ¹ÑÑвиÑелÑно ÑвлÑеÑеÑÑ Ð²Ð»Ð°Ð´ÐµÐ»ÑÑем аккаÑнÑа, ÑкажиÑе код из 6 ÑиÑÑ ÐºÐ¾ÑоÑÑй пÑиÑÑл на поÑÑÑ Ð¿Ð¾Ð»ÑзоваÑелÑ"," ",(0,t.jsx)("b",{children:null!=(P=null==(c=I.recoverData)?void 0:c.login)?P:""})]}),onSuccess:async(e,n)=>{var s,t,r;I.setRecoverData({login:null!=(r=null==(s=I.recoverData)?void 0:s.login)?r:"",code:null==(t=n.code)?void 0:t.join("")}),q.push("/auth/new-password")}},es)||"signup"===es&&(0,t.jsx)(R,{})]})]})}}
1,77872:(e,n,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/[[...slug]]",function(){return s(69902)}])},84879:(e,n,s)=>{"use strict";s.d(n,{I:()=>l});var t=s(37876),r=s(15955),o=s.n(r),a=s(66290),i=s.n(a);function l(){return(0,t.jsx)("div",{className:o().content_wide,children:(0,t.jsx)("div",{className:i().container,children:(0,t.jsxs)("p",{children:["ÐÑполнÑем вÑ
од"," ",(0,t.jsxs)("span",{className:i().loading,children:[(0,t.jsx)("span",{children:"."}),(0,t.jsx)("span",{children:"."}),(0,t.jsx)("span",{children:"."})]})]})})})}}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=77872)),_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.