mirror of
https://github.com/danog/telegram-tt.git
synced 2024-12-12 09:09:45 +01:00
2 lines
11 KiB
JavaScript
2 lines
11 KiB
JavaScript
|
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[41],{1133:(e,t,a)=>{a.r(t),a.d(t,{AuthCode:()=>v,AuthPassword:()=>f,AuthRegister:()=>y});var n=a(4050),o=a(3555),r=a(7361),l=a(782),s=a(2340),i=a(6590),c=a(9107),d=a(7687),m=a(4288),u=a(3716),h=a(9332),Z=a(7799);const g=r.wB?u.qp:u.z7,p=(0,n.X$)((e=>{let{code:t,codeLength:a,trackingDirection:o,isTracking:r,isBig:l}=e;const[s,i]=(0,n.eJ)(),[c,d]=(0,n.eJ)(),[m,p]=(0,n.eJ)(!1),v=165/a;(0,n.d4)((()=>{s||(0,h.Z)("MonkeyIdle").then(i)}),[s]),(0,n.d4)((()=>{c||(0,h.Z)("MonkeyTracking").then(d)}),[c]);const E=(0,n.I4)((()=>p(!0)),[]);return n.ZP.createElement("div",{id:"monkey",className:l?"big":""},!m&&n.ZP.createElement("div",{className:"monkey-preview"}),s&&n.ZP.createElement(Z.Z,{id:"idleMonkey",size:l?u.K2:g,className:r?"hidden":void 0,animationData:s,play:!r,onLoad:E}),c&&n.ZP.createElement(Z.Z,{id:"trackingMonkey",size:l?u.K2:g,className:r?"shown":"hidden",animationData:c,playSegment:r?function(){const e=t&&t.length>1||o<0?15+v*(t.length-1):0,n=t.length===a?180:15+v*t.length;return o<1?[n,e]:[e,n]}():void 0,speed:2,noLoop:!0}))})),v=(0,n.X$)((0,o.c$)((e=>(0,l.ei)(e,["authPhoneNumber","authIsCodeViaApp","authIsLoading","authError"])))((e=>{let{authPhoneNumber:t,authIsCodeViaApp:a,authIsLoading:l,authError:u}=e;const{setAuthCode:h,returnToAuthPhoneNumber:Z,clearAuthError:g}=(0,o.Sv)(),v=(0,c.Z)(),E=(0,n.sO)(null),[P,f]=(0,n.eJ)(""),[b,N]=(0,n.eJ)(!1),[y,C]=(0,n.eJ)(1);(0,n.d4)((()=>{r.$b||E.current.focus()}),[]),(0,i.Z)({isActive:!0,onBack:Z});const k=(0,n.I4)((e=>{u&&g();const{currentTarget:t}=e;t.value=t.value.replace(/[^\d]+/,"").substr(0,5),t.value!==P&&(f(t.value),b?t.value.length||N(!1):N(!0),P&&P.length>t.value.length?C(-1):C(1),5===t.value.length&&h({code:t.value}))}),[u,g,P,b,h]);return n.ZP.createElement("div",{id:"auth-code-form",className:"custom-scroll"},n.ZP.createElement("div",{className:"auth-form"},n.ZP.createElement(p,{code:P,codeLength:5,isTracking:b,trackingDirection:y}),n.ZP.createElement("h2",null,t,n.ZP.createElement("div",{className:"auth-number-edit",onClick:Z,role:"button",tabIndex:0,title:v("WrongNumber")},n.ZP.createElement("i",{className:"icon-edit"}))),n.ZP.createElement("p",{className:"note"},(0,s.Z)(v(a?"SentAppCode":"Login.JustSentSms"),["simple_markdown"])),n.ZP.createElement(d.Z,{ref:E,id:"sign-in-code",label:v("Code"),onInput:k,value:P,error:u&&v(u),autoComplete:"off",inputMode:"numeric"}),l&&n.ZP.createElement(m.Z,null)))})));var E=a(3490),P=a(9364);const f=(0,n.X$)((0,o.c$)((e=>(0,l.ei)(e,["authIsLoading","authError","authHint"])))((e=>{let{authIsLoading:t,authError:a,authHint:r}=e;const{setAuthPassword:l,clearAuthError:s}=(0,o.Sv)(),i=(0,c.Z)(),[d,m]=(0,n.eJ)(!1),u=(0,n.I4)((e=>{m(e)}),[]),h=(0,n.I4)((e=>{l({password:e})}),[l]);return n.ZP.createElement("div",{id:"auth-password-form",className:"custom-scroll"},n.ZP.createElement("div",{className:"auth-form"},n.ZP.createElement(E.Z,{isPasswordVisible:d}),n.ZP.createElement("h2",null,i("Login.Header.Password")),n.ZP.createElement("p",{className:"note"},i("Login.EnterPasswordDescription")),n.ZP.createElement(P.Z,{clearError:s,error:a&&i(a),hint:r,isLoading:t,isPasswordVisible:d,onChangePasswordVisibility:u,onSubmit:h})))})));var b=a(231),N=a(710);const y=(0,n.X$)((0,o.c$)((e=>(0,l.ei)(e,["authIsLoading","authError"])))((e=>{let{authIsLoading:t,authError:a}=e;const{signUp:r,clearAuthError:l,uploadProfilePhoto:s}=(0,o.Sv)(),i=(0,c.Z)(),[m,u]=(0,n.eJ)(!1),[h,Z]=(0,n.eJ)(),[g,p]=(0,n.eJ)(""),[v,E]=(0,n.eJ)(""),P=(0,n.I4)((e=>{a&&l();const{target:t}=e;p(t.value),u(t.value.length>0)}),[a,l]),f=(0,n.I4)((e=>{const{target:t}=e;E(t.value)}),[]);return n.ZP.createElement("div",{id:"auth-registration-form",className:"custom-scroll"},n.ZP.createElement("div",{className:"auth-form"},n.ZP.createElement("form",{action:"",method:"post",onSubmit:function(e){e.preventDefault(),r({firstName:g,lastName:v}),h&&s({file:h})}},n.ZP.createElement(N.Z,{onChange:Z}),n.ZP.createElement("h2",null,i("YourName")),n.ZP.createElement("p",{className:"note"},i("Login.Register.Desc")),n.ZP.cr
|
||
|
//# sourceMappingURL=41.519cd63654e9cc825bb6.js.map
|