telegram-tt/dist/5.4cf6b0c1d4d25ba708d7.js

2 lines
27 KiB
JavaScript
Raw Normal View History

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