telegram-tt/dist/5.7056b09bd8c345377ff1.js

2 lines
13 KiB
JavaScript
Raw Normal View History

2021-06-29 23:25:23 +02:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{104:function(e,t,a){"use strict";a.r(t),a.d(t,"AuthCode",(function(){return p})),a.d(t,"AuthPassword",(function(){return j})),a.d(t,"AuthRegister",(function(){return E}));var n=a(0),r=a(2),o=a(7),c=a(3),i=a(45),l=a(17),s=a(1),u=a(124),d=a(115);a(139);const m=o.k?s.rb:s.qb;var b=Object(n.h)(({code:e,codeLength:t,trackingDirection:a,isTracking:r,isBig:o})=>{const[c,i]=Object(n.r)(),[l,b]=Object(n.r)(),[h,p]=Object(n.r)(!1),f=165/t;Object(n.n)(()=>{c||Object(u.a)("MonkeyIdle").then(i)},[c]),Object(n.n)(()=>{l||Object(u.a)("MonkeyTracking").then(b)},[l]);const g=Object(n.m)(()=>p(!0),[]);return n.a.createElement("div",{id:"monkey",className:o?"big":""},!h&&n.a.createElement("div",{className:"monkey-preview"}),c&&n.a.createElement(d.a,{id:"idleMonkey",size:o?s.Bb:m,className:r?"hidden":void 0,animationData:c,play:!r,onLoad:g}),l&&n.a.createElement(d.a,{id:"trackingMonkey",size:o?s.Bb:m,className:r?"shown":"hidden",animationData:l,playSegment:r?function(){const n=e&&e.length>1||a<0?15+f*(e.length-1):0,r=e.length===t?180:15+f*e.length;return a<1?[r,n]:[n,r]}():void 0,speed:2,noLoop:!0}))}),h=a(79);var p=Object(n.h)(Object(r.h)(e=>Object(c.l)(e,["authPhoneNumber","authIsCodeViaApp","authIsLoading","authError"]),(e,t)=>Object(c.l)(t,["setAuthCode","returnToAuthPhoneNumber","clearAuthError"]))(({authPhoneNumber:e,authIsCodeViaApp:t,authIsLoading:a,authError:r,setAuthCode:c,returnToAuthPhoneNumber:s,clearAuthError:u})=>{const d=Object(n.q)(null),[m,p]=Object(n.r)(""),[f,g]=Object(n.r)(!1),[j,O]=Object(n.r)(1);Object(n.n)(()=>{o.m||d.current.focus()},[]),Object(h.a)(s);const v=Object(n.m)(e=>{r&&u();const{currentTarget:t}=e;t.value=t.value.replace(/[^\d]+/,"").substr(0,5),t.value!==m&&(p(t.value),f?t.value.length||g(!1):g(!0),m&&m.length>t.value.length?O(-1):O(1),5===t.value.length&&c({code:t.value}))},[r,u,m,f,c]);return n.a.createElement("div",{id:"auth-code-form",className:"custom-scroll"},n.a.createElement("div",{className:"auth-form"},n.a.createElement(b,{code:m,codeLength:5,isTracking:f,trackingDirection:j}),n.a.createElement("h2",null,e,n.a.createElement("div",{className:"auth-number-edit",onClick:s,role:"button",tabIndex:0,title:"Sign In with another phone number"},n.a.createElement("i",{className:"icon-edit"}))),n.a.createElement("p",{className:"note"},t?n.a.createElement(n.a.Fragment,null,"We have sent the code to the Telegram app",n.a.createElement("br",null),"on your other device."):n.a.createElement(n.a.Fragment,null,"We have sent you an SMS",n.a.createElement("br",null),"with the code.")),n.a.createElement(i.a,{ref:d,id:"sign-in-code",label:"Code",onInput:v,value:m,error:r,autoComplete:"off",inputMode:"decimal"}),a&&n.a.createElement(l.a,null)))})),f=a(147),g=a(148);var j=Object(n.h)(Object(r.h)(e=>Object(c.l)(e,["authIsLoading","authError","authHint"]),(e,t)=>Object(c.l)(t,["setAuthPassword","clearAuthError"]))(({authIsLoading:e,authError:t,authHint:a,setAuthPassword:r,clearAuthError:o})=>{const[c,i]=Object(n.r)(!1),l=Object(n.m)(e=>{i(e)},[]),s=Object(n.m)(e=>{r({password:e})},[r]);return n.a.createElement("div",{id:"auth-password-form",className:"custom-scroll"},n.a.createElement("div",{className:"auth-form"},n.a.createElement(f.a,{isPasswordVisible:c}),n.a.createElement("h2",null,"Enter Your Password"),n.a.createElement("p",{className:"note"},"Your account is protected with",n.a.createElement("br",null),"an additional password."),n.a.createElement(g.a,{clearError:o,error:t,hint:a,isLoading:e,isPasswordVisible:c,onChangePasswordVisibility:l,onSubmit:s})))})),O=a(23),v=a(130);var E=Object(n.h)(Object(r.h)(e=>Object(c.l)(e,["authIsLoading","authError"]),(e,t)=>Object(c.l)(t,["signUp","clearAuthError","uploadProfilePhoto"]))(({authIsLoading:e,authError:t,signUp:a,clearAuthError:r,uploadProfilePhoto:o})=>{const[c,l]=Object(n.r)(!1),[s,u]=Object(n.r)(),[d,m]=Object(n.r)(""),[b,h]=Object(n.r)("");return n.a.createElement("div",{id:"auth-registration-form",className:"custom-scroll"},n.a.createElement("div",{className:"auth-form"},n.a.createElement("form",{action:"",
//# sourceMappingURL=5.7056b09bd8c345377ff1.js.map