TelegramPWA/dist/7405.c54f0056829b73a1e580.js
Alexander Zinchuk aef5c08a38 [Build]
2025-11-17 12:33:29 +04:00

2 lines
14 KiB
JavaScript

"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[7405],{101:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(84051),a=r(87679),i=r(56863);function s(e){const t=(0,n.li)(),{result:r}=(0,i.A)(()=>{if(!e)return Promise.resolve(void 0);t.current&&URL.revokeObjectURL(t.current);const r=URL.createObjectURL(e);return t.current=r,(0,a.NN)(r)},[e]);return(0,n.vJ)(()=>()=>{t.current&&(URL.revokeObjectURL(t.current),t.current=void 0)},[]),{image:r}}},3178:(e,t,r)=>{r.d(t,{A:()=>m});var n=r(84051),a=r(31481),i=r(58443),s=r(14737),o=r(43874),u=r(37661),c=r(18104),l=r(20021);const d=[0,50],p=[0,20],h=[20,0],m=(0,n.ph)(({isPasswordVisible:e,isBig:t})=>{const[r,m]=(0,u.A)(!1),[g,y]=(0,u.A)(!1),{isMobile:f}=(0,o.Ay)(),v=f?a.UyP:a.H6l;(0,s.A)(y,2e3);const b=(0,n.hb)(m,[m]);return(0,l.FD)("div",{id:"monkey",className:t?"big":"",children:[!r&&(0,l.Y)("div",{className:"monkey-preview"}),(0,l.Y)(c.A,{size:t?a.r2x:v,className:g?"hidden":"shown",tgsUrl:i.w.MonkeyClose,playSegment:d,noLoop:!0,onLoad:b}),(0,l.Y)(c.A,{size:t?a.r2x:v,className:g?"shown":"hidden",tgsUrl:i.w.MonkeyPeek,playSegment:e?p:h,noLoop:!0})]})})},14680:(e,t,r)=>{r.d(t,{FD:()=>a,ZJ:()=>s,wb:()=>i});let n=0;function a(){n+=1}function i(){n-=1}function s(){return n>0}},14737:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(84051),a=r(17712);const i=function(e,t){const r=(0,a.A)(e);(0,n.vJ)(()=>{if("number"!=typeof t)return;const e=setTimeout(()=>r(),t);return()=>clearTimeout(e)},[t])}},15535:(e,t,r)=>{r.d(t,{A:()=>y});var n=r(84051),a=r(31481),i=r(66644),s=r(63495),o=r(96454),u=r(87357),c=r(83868),l=r(14737),d=r(43874),p=r(39351),h=r(64493),m=r(18276),g=r(20021);const y=(0,n.ph)(({isLoading:e=!1,isPasswordVisible:t,error:r,hint:y,placeholder:f,submitLabel:v,description:b,shouldShowSubmit:I,shouldResetValue:A,shouldDisablePasswordManager:w=!1,noRipple:S=!1,onClearError:P,onChangePasswordVisibility:C,onInputChange:T,onSubmit:N})=>{const k=(0,n.li)(),U=(0,p.A)(),{isMobile:Y}=(0,d.Ay)(),[L,D]=(0,n.J0)(""),[K,F]=(0,n.J0)(!1),R=Y?550:400;return(0,n.vJ)(()=>{A&&D("")},[A]),(0,l.A)(()=>{o.TF||k.current.focus()},R),(0,n.vJ)(()=>{r&&(0,i.RK)(()=>{k.current.focus(),k.current.select()})},[r]),(0,g.FD)("form",{action:"",onSubmit:N?function(t){t.preventDefault(),e||K&&N(L)}:c.A,autoComplete:"off",children:[(0,g.FD)("div",{className:(0,u.A)("input-group password-input",L&&"touched",r&&"error"),dir:U.isRtl?"rtl":void 0,children:[w&&(0,g.Y)("input",{type:"password",id:"prevent_autofill",autoComplete:"off",className:"visually-hidden",tabIndex:-2}),(0,g.Y)("input",{ref:k,className:"form-control",type:t?"text":"password",id:"sign-in-password",value:L||"",autoComplete:w?"one-time-code":"current-password",spellCheck:!s.Vq&&void 0,onChange:function(e){r&&P();const{target:t}=e;D(t.value),F(t.value.length>=a.AGC),T&&T(t.value)},maxLength:256,dir:"auto"}),(0,g.Y)("label",{children:r||y||f||U("PasswordFormPlaceholder")}),(0,g.Y)("div",{className:"div-button toggle-password",onClick:function(){C(!t)},role:"button",tabIndex:0,title:U("AriaPasswordToggle"),"aria-label":U("AriaPasswordToggle"),children:(0,g.Y)(m.A,{name:t?"eye":"eye-crossed"})})]}),b&&(0,g.Y)("p",{className:"description",children:b}),N&&(K||I)&&(0,g.Y)(h.A,{type:"submit",ripple:!S,isLoading:e,disabled:!K,children:v||U("PasswordFormSubmit")})]})})},15640:(e,t,r)=>{function n(e){return"touches"in e?{x:e.touches[0].clientX,y:e.touches[0].clientY}:{x:e.clientX,y:e.clientY}}r.d(t,{A:()=>n})},29441:(e,t,r)=>{function n(e){function t(t){if("Tab"!==t.key)return;t.preventDefault(),t.stopPropagation();const r=Array.from(e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));if(!r.length)return;const n=r.findIndex(e=>e.isSameNode(document.activeElement));let a=0;n>=0&&(a=t.shiftKey?n>0?n-1:r.length-1:n<r.length-1?n+1:0),r[a].focus()}return document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}}r.d(t,{A:()=>n})},32794:(e,t,r)=>{r.r(t),r.d(t,{AuthCode:()=>v,AuthPassword:()=>A,AuthRegister:()=>P});var n=r(84051),a=r(13439),i=r(96454),s=r(87894),o=r(26072),u=r(39351),c=r(18276),l=r(31481),d=r(58443),p=r(43874),h=r(18104),m=r(20021);const g=(0,n.ph)(({code:e,codeLength:t,trackingDirection:r,isTracking:a,isBig:i})=>{const[s,o]=(0,n.J0)(!1),{isMobile:u}=(0,p.Ay)(),c=165/t,g=u?l.UyP:l.H6l,y=(0,n.hb)(()=>o(!0),[]);return(0,m.FD)("div",{id:"monkey",className:i?"big":"",children:[!s&&(0,m.Y)("div",{className:"monkey-preview"}),(0,m.Y)(h.A,{size:i?l.r2x:g,className:a?"hidden":void 0,tgsUrl:d.w.MonkeyIdle,play:!a,onLoad:y}),(0,m.Y)(h.A,{size:i?l.r2x:g,className:a?"shown":"hidden",tgsUrl:d.w.MonkeyTracking,playSegment:a?function(){const n=e&&e.length>1||r<0?15+c*(e.length-1):0,a=e.length===t?180:15+c*e.length;return r<1?[a,n]:[n,a]}():void 0,speed:2,noLoop:!0})]})});var y=r(40664),f=r(52745);const v=(0,n.ph)((0,a.EK)(e=>(0,s.Up)(e,["authPhoneNumber","authIsCodeViaApp","authIsLoading","authErrorKey"]))(({authPhoneNumber:e,authIsCodeViaApp:t,authIsLoading:r,authErrorKey:s})=>{const{setAuthCode:l,returnToAuthPhoneNumber:d,clearAuthErrorKey:p}=(0,a.ko)(),h=(0,u.A)(),v=(0,n.li)(),[b,I]=(0,n.J0)(""),[A,w]=(0,n.J0)(!1),[S,P]=(0,n.J0)(1);(0,n.vJ)(()=>{i.TF||v.current.focus()},[]),(0,o.A)({isActive:!0,onBack:d});const C=(0,n.hb)(e=>{s&&p();const{currentTarget:t}=e;t.value=t.value.replace(/[^\d]+/,"").substr(0,5),t.value!==b&&(I(t.value),A?t.value.length||w(!1):w(!0),b&&b.length>t.value.length?P(-1):P(1),5===t.value.length&&l({code:t.value}))},[s,b,A,l]);return(0,m.Y)("div",{id:"auth-code-form",className:"custom-scroll",children:(0,m.FD)("div",{className:"auth-form",children:[(0,m.Y)(g,{code:b,codeLength:5,isTracking:A,trackingDirection:S}),(0,m.FD)("h1",{children:[e,(0,m.Y)("div",{className:"auth-number-edit div-button",onClick:function(){d()},role:"button",tabIndex:0,title:h("WrongNumber"),"aria-label":h("WrongNumber"),children:(0,m.Y)(c.A,{name:"edit"})})]}),(0,m.Y)("p",{className:"note",children:h(t?"SentAppCode":"LoginJustSentSms",void 0,{withNodes:!0,withMarkdown:!0})}),(0,m.Y)(y.A,{ref:v,id:"sign-in-code",label:h("Code"),onInput:C,value:b,error:s&&h.withRegular(s),autoComplete:"off",inputMode:"numeric"}),r&&(0,m.Y)(f.A,{})]})})}));var b=r(15535),I=r(3178);const A=(0,n.ph)((0,a.EK)(e=>(0,s.Up)(e,["authIsLoading","authErrorKey","authHint"]))(({authIsLoading:e,authErrorKey:t,authHint:r})=>{const{setAuthPassword:i,clearAuthErrorKey:s}=(0,a.ko)(),o=(0,u.A)(),[c,l]=(0,n.J0)(!1),d=(0,n.hb)(e=>{l(e)},[]),p=(0,n.hb)(e=>{i({password:e})},[i]);return(0,m.Y)("div",{id:"auth-password-form",className:"custom-scroll",children:(0,m.FD)("div",{className:"auth-form",children:[(0,m.Y)(I.A,{isPasswordVisible:c}),(0,m.Y)("h1",{children:o("LoginHeaderPassword")}),(0,m.Y)("p",{className:"note",children:o("LoginEnterPasswordDescription")}),(0,m.Y)(b.A,{onClearError:s,error:t&&o.withRegular(t),hint:r,isLoading:e,isPasswordVisible:c,onChangePasswordVisibility:d,onSubmit:p})]})})}));var w=r(43434),S=r(64493);const P=(0,n.ph)((0,a.EK)(e=>(0,s.Up)(e,["authIsLoading","authErrorKey"]))(({authIsLoading:e,authErrorKey:t})=>{const{signUp:r,clearAuthErrorKey:i,uploadProfilePhoto:s}=(0,a.ko)(),o=(0,u.A)(),[c,l]=(0,n.J0)(!1),[d,p]=(0,n.J0)(),[h,g]=(0,n.J0)(""),[f,v]=(0,n.J0)(""),b=(0,n.hb)(e=>{t&&i();const{target:r}=e;g(r.value),l(r.value.length>0)},[t]),I=(0,n.hb)(e=>{const{target:t}=e;v(t.value)},[]);return(0,m.Y)("div",{id:"auth-registration-form",className:"custom-scroll",children:(0,m.Y)("div",{className:"auth-form",children:(0,m.FD)("form",{action:"",method:"post",onSubmit:function(e){e.preventDefault(),r({firstName:h,lastName:f}),d&&s({file:d})},children:[(0,m.Y)(w.A,{onChange:p}),(0,m.Y)("h2",{children:o("YourName")}),(0,m.Y)("p",{className:"note",children:o("LoginRegisterDesc")}),(0,m.Y)(y.A,{id:"registration-first-name",label:o("LoginRegisterFirstNamePlaceholder"),onChange:b,value:h,error:t&&o.withRegular(t),autoComplete:"given-name"}),(0,m.Y)(y.A,{id:"registration-last-name",label:o("LoginRegisterLastNamePlaceholder"),onChange:I,value:f,autoComplete:"family-name"}),c&&(0,m.Y)(S.A,{type:"submit",ripple:!0,isLoading:e,children:o("Next")})]})})})}))},37859:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(84051);const a=(e,t,r)=>{const a=(0,n.li)();return(0,n.Nf)(()=>{const r=a.current;return a.current=t,e(r||[])},t,r)}},86046:(e,t,r)=>{r.d(t,{D5:()=>m,HT:()=>u,M6:()=>h,MA:()=>c,Pc:()=>l,ZF:()=>p,hk:()=>d,j6:()=>g,jA:()=>o});var n=r(31481),a=r(5930),i=r(17142),s=r(91048);function o(e,t){if("slug"===t.type)return t;if("stargiftResale"===t.type){const{slug:r,peerId:n}=t,a=(0,s.PVB)(e,n);if(!a)return;return{type:"stargiftResale",slug:r,peer:a,currency:t.currency}}if("stargift"===t.type){const{peerId:r,shouldHideName:n,giftId:a,message:i,shouldUpgrade:o}=t,u=(0,s.PVB)(e,r);if(!u)return;return{type:"stargift",peer:u,shouldHideName:n,giftId:a,message:i,shouldUpgrade:o}}if("starsgift"===t.type){const{userId:r,stars:n,amount:a,currency:i}=t,o=(0,s.mBe)(e,r);if(!o)return;return{type:"stars",purpose:{type:"starsgift",user:o,stars:n,amount:a,currency:i}}}if("stars"===t.type){const{stars:e,amount:r,currency:n}=t;return{type:"stars",purpose:{type:"stars",stars:e,amount:r,currency:n}}}if("chatInviteSubscription"===t.type){const{hash:e}=t;return{type:"chatInviteSubscription",hash:e}}if("message"===t.type){const r=(0,s.hds)(e,t.chatId);if(!r)return;return{type:"message",chat:r,messageId:t.messageId}}if("premiumGiftStars"===t.type){const{months:r,userId:n,message:a}=t,i=(0,s.mBe)(e,n);if(!i)return;return{type:"premiumGiftStars",months:r,message:a,user:i}}if("giftcode"===t.type){const{userIds:r,boostChannelId:n,amount:a,currency:i,option:o,message:u}=t;return{type:"giveaway",option:o,purpose:{type:"giftcode",amount:a,currency:i,users:r.map(t=>(0,s.mBe)(e,t)).filter(Boolean),boostChannel:n?(0,s.hds)(e,n):void 0,message:u}}}if("starsgiveaway"===t.type){const{chatId:r,additionalChannelIds:n,amount:a,currency:i,untilDate:o,areWinnersVisible:u,countries:c,isOnlyForNewSubscribers:l,prizeDescription:d,stars:p,users:h}=t,m=(0,s.hds)(e,r);if(!m)return;const g=n?.map(t=>(0,s.hds)(e,t)).filter(Boolean);return{type:"starsgiveaway",purpose:{type:"starsgiveaway",amount:a,currency:i,chat:m,additionalChannels:g,untilDate:o,areWinnersVisible:u,countries:c,isOnlyForNewSubscribers:l,prizeDescription:d,stars:p,users:h}}}if("giveaway"===t.type){const{chatId:r,additionalChannelIds:n,amount:a,currency:i,option:o,untilDate:u,areWinnersVisible:c,countries:l,isOnlyForNewSubscribers:d,prizeDescription:p}=t,h=(0,s.hds)(e,r);if(!h)return;const m=n?.map(t=>(0,s.hds)(e,t)).filter(Boolean);return{type:"giveaway",option:o,purpose:{type:"giveaway",amount:a,currency:i,chat:h,additionalChannels:m,untilDate:u,areWinnersVisible:c,countries:l,isOnlyForNewSubscribers:d,prizeDescription:p}}}if("stargiftUpgrade"===t.type){const{inputSavedGift:r,shouldKeepOriginalDetails:n}=t,a=u(e,r);if(!a)return;return{type:"stargiftUpgrade",inputSavedGift:a,shouldKeepOriginalDetails:n}}if("stargiftTransfer"===t.type){const{inputSavedGift:r,recipientId:n}=t,a=u(e,r),i=(0,s.PVB)(e,n);if(!a||!i)return;return{type:"stargiftTransfer",inputSavedGift:a,recipient:i}}if("stargiftDropOriginalDetails"===t.type){const{inputSavedGift:r}=t,n=u(e,r);if(!n)return;return{type:"stargiftDropOriginalDetails",inputSavedGift:n}}if("stargiftPrepaidUpgrade"===t.type){const{peerId:r,hash:n}=t,a=(0,s.PVB)(e,r);if(!a)return;return{type:"stargiftPrepaidUpgrade",peer:a,hash:n}}}function u(e,t){if("user"===t.type)return t;if("chat"===t.type){const r=(0,s.hds)(e,t.chatId);if(!r)return;return{type:"chat",chat:r,savedId:t.savedId}}}function c(e){return"peer"!==e.peer.type||Boolean(e.isPostsSearch)}function l(e){const{peer:t}=e,r=e.amount.currency===n.ykW;return e.isPostsSearch?{avatarIcon:"search",isCustomPeer:!0,title:"",peerColorId:5}:"appStore"===t.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.AppleTopUp.Title",subtitleKey:"Stars.Intro.Transaction.AppleTopUp.Subtitle",peerColorId:5}:"playMarket"===t.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.GoogleTopUp.Title",subtitleKey:"Stars.Intro.Transaction.GoogleTopUp.Subtitle",peerColorId:3}:"fragment"===t.type?r?{avatarIcon:"fragment",isCustomPeer:!0,titleKey:"Stars.Gift.Received.Title",subtitleKey:"Stars.Intro.Transaction.Gift.UnknownUser",customPeerAvatarColor:"#000000"}:{avatarIcon:"fragment",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.FragmentTopUp.Title",subtitleKey:"Stars.Intro.Transaction.FragmentTopUp.Subtitle",customPeerAvatarColor:"#000000"}:"premiumBot"===t.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.PremiumBotTopUp.Title",subtitleKey:"Stars.Intro.Transaction.PremiumBotTopUp.Subtitle",peerColorId:1,withPremiumGradient:!0}:"ads"===t.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.TelegramAds.Title",subtitleKey:"Stars.Intro.Transaction.TelegramAds.Subtitle",peerColorId:2}:"api"===t.type?{avatarIcon:"bots",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.TelegramBotApi.Title",subtitleKey:"Stars.Intro.Transaction.TelegramBotApi.Subtitle",peerColorId:4}:{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.Unsupported.Title",subtitleKey:"Stars.Intro.Transaction.Unsupported.Title",peerColorId:0}}function d(e,t){if(t.currency===n.OUy){const r=t.amount+t.nanos/1e9;return r<0?`- ${e.number(Math.abs(r))}`:`+ ${e.number(r)}`}if(t.currency===n.ykW){const r=(0,i.wD)(t.amount),n=Math.abs(r);return r<0?`- ${e.preciseNumber(n)}`:`+ ${e.preciseNumber(n)}`}}function p(e,t){return e.number(t.amount+t.nanos/1e9)}function h(e){const{action:t}=e.content;if("giftStars"===t?.type){const{transactionId:r,stars:a}=t;return{id:r,amount:{currency:n.OUy,amount:a,nanos:0},peer:{type:"peer",id:e.isOutgoing?e.chatId:e.senderId||e.chatId},date:e.date,isGift:!0,isMyGift:e.isOutgoing||void 0}}if("giftTon"===t?.type){const{transactionId:r,cryptoAmount:a}=t;return{id:r,amount:{currency:n.ykW,amount:a},peer:{type:"fragment"},date:e.date,isGift:!0,isMyGift:e.isOutgoing||void 0}}}function m(e){const{action:t}=e.content;if("prizeStars"!==t?.type)return;const{transactionId:r,stars:a,boostPeerId:i}=t;return{id:r,amount:{currency:n.OUy,amount:a,nanos:0},peer:{type:"peer",id:i},date:e.date,giveawayPostId:e.id}}function g(e,t){return(0,a.A)(e,t)}},91034:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(84051);function a(e){return function(t){const r=(0,n.li)(t);return t.ignoreFreeze?e(t):(t.isOpen?r.current=t:r.current={...r.current,isOpen:!1},e(r.current))}}}}]);
//# sourceMappingURL=7405.c54f0056829b73a1e580.js.map