2 lines
15 KiB
JavaScript
2 lines
15 KiB
JavaScript
"use strict";(self.webpackChunkmontana_messenger=self.webpackChunkmontana_messenger||[]).push([[7405],{32794(e,t,r){r.r(t),r.d(t,{AuthCode:()=>v,AuthPassword:()=>A,AuthRegister:()=>P});var n=r(84051),i=r(13439),s=r(96454),a=r(87894),o=r(26072),u=r(39351),c=r(18276),l=r(31481),d=r(44029),p=r(43874),m=r(18104),h=r(20021);const g=(0,n.ph)(({code:e,codeLength:t,trackingDirection:r,isTracking:i,isBig:s})=>{const[a,o]=(0,n.J0)(!1),{isMobile:u}=(0,p.Ay)(),c=165/t,g=u?l.UyP:l.H6l,f=(0,n.hb)(()=>o(!0),[]);return(0,h.FD)("div",{id:"monkey",className:s?"big":"",children:[!a&&(0,h.Y)("div",{className:"monkey-preview"}),(0,h.Y)(m.A,{size:s?l.r2x:g,className:i?"hidden":void 0,tgsUrl:d.w.MonkeyIdle,play:!i,onLoad:f}),(0,h.Y)(m.A,{size:s?l.r2x:g,className:i?"shown":"hidden",tgsUrl:d.w.MonkeyTracking,playSegment:i?function(){const n=e&&e.length>1||r<0?15+c*(e.length-1):0,i=e.length===t?180:15+c*e.length;return r<1?[i,n]:[n,i]}():void 0,speed:2,noLoop:!0})]})});var f=r(40664),y=r(52745);const v=(0,n.ph)((0,i.EK)(e=>(0,a.Up)(e,["auth"]))(({auth:e})=>{const{setAuthCode:t,returnToAuthPhoneNumber:r,clearAuthErrorKey:a}=(0,i.ko)(),{phoneNumber:l,isCodeViaApp:d,isLoading:p,errorKey:m}=e,v=(0,u.A)(),b=(0,n.li)(),[I,A]=(0,n.J0)(""),[w,S]=(0,n.J0)(!1),[P,C]=(0,n.J0)(1);(0,n.vJ)(()=>{s.TF||b.current.focus()},[]),(0,o.A)({isActive:!0,onBack:r});const T=(0,n.hb)(e=>{m&&a();const{currentTarget:r}=e;r.value=r.value.replace(/[^\d]+/,"").substr(0,5),r.value!==I&&(A(r.value),w?r.value.length||S(!1):S(!0),I&&I.length>r.value.length?C(-1):C(1),5===r.value.length&&t({code:r.value}))},[m,I,w]);return(0,h.Y)("div",{id:"auth-code-form",className:"custom-scroll",children:(0,h.FD)("div",{className:"auth-form",children:[(0,h.Y)(g,{code:I,codeLength:5,isTracking:w,trackingDirection:P}),(0,h.FD)("h1",{children:[l,(0,h.Y)("div",{className:"auth-number-edit div-button",onClick:function(){r()},role:"button",tabIndex:0,title:v("WrongNumber"),"aria-label":v("WrongNumber"),children:(0,h.Y)(c.A,{name:"edit"})})]}),(0,h.Y)("p",{className:"note",children:v(d?"SentAppCode":"LoginJustSentSms",void 0,{withNodes:!0,withMarkdown:!0})}),(0,h.Y)(f.A,{ref:b,id:"sign-in-code",label:v("Code"),onInput:T,value:I,error:m&&v.withRegular(m),autoComplete:"off",inputMode:"numeric"}),p&&(0,h.Y)(y.A,{})]})})}));var b=r(15535),I=r(3178);const A=(0,n.ph)((0,i.EK)(e=>(0,a.Up)(e,["auth"]))(({auth:e})=>{const{setAuthPassword:t,clearAuthErrorKey:r}=(0,i.ko)(),{isLoading:s,errorKey:a,hint:o}=e,c=(0,u.A)(),[l,d]=(0,n.J0)(!1),p=(0,n.hb)(e=>{d(e)},[]),m=(0,n.hb)(e=>{t({password:e})},[t]);return(0,h.Y)("div",{id:"auth-password-form",className:"custom-scroll",children:(0,h.FD)("div",{className:"auth-form",children:[(0,h.Y)(I.A,{isPasswordVisible:l}),(0,h.Y)("h1",{children:c("LoginHeaderPassword")}),(0,h.Y)("p",{className:"note",children:c("LoginEnterPasswordDescription")}),(0,h.Y)(b.A,{onClearError:r,error:a&&c.withRegular(a),hint:o,isLoading:s,isPasswordVisible:l,onChangePasswordVisibility:p,onSubmit:m})]})})}));var w=r(43434),S=r(64493);const P=(0,n.ph)((0,i.EK)(e=>(0,a.Up)(e,["auth"]))(({auth:e})=>{const{signUp:t,clearAuthErrorKey:r,uploadProfilePhoto:s}=(0,i.ko)(),{isLoading:a,errorKey:o}=e,c=(0,u.A)(),[l,d]=(0,n.J0)(!1),[p,m]=(0,n.J0)(),[g,y]=(0,n.J0)(""),[v,b]=(0,n.J0)(""),I=(0,n.hb)(e=>{o&&r();const{target:t}=e;y(t.value),d(t.value.length>0)},[o]),A=(0,n.hb)(e=>{const{target:t}=e;b(t.value)},[]);return(0,h.Y)("div",{id:"auth-registration-form",className:"custom-scroll",children:(0,h.Y)("div",{className:"auth-form",children:(0,h.FD)("form",{action:"",method:"post",onSubmit:function(e){e.preventDefault(),t({firstName:g,lastName:v}),p&&s({file:p})},children:[(0,h.Y)(w.A,{onChange:m}),(0,h.Y)("h2",{children:c("YourName")}),(0,h.Y)("p",{className:"note",children:c("LoginRegisterDesc")}),(0,h.Y)(f.A,{id:"registration-first-name",label:c("LoginRegisterFirstNamePlaceholder"),onChange:I,value:g,error:o&&c.withRegular(o),autoComplete:"given-name"}),(0,h.Y)(f.A,{id:"registration-last-name",label:c("LoginRegisterLastNamePlaceholder"),onChange:A,value:v,autoComplete:"family-name"}),l&&(0,h.Y)(S.A,{type:"submit",ripple:!0,isLoading:a,children:c("Next")})]})})})}))},15535(e,t,r){r.d(t,{A:()=>f});var n=r(84051),i=r(31481),s=r(66644),a=r(63495),o=r(96454),u=r(87357),c=r(83868),l=r(14737),d=r(43874),p=r(39351),m=r(64493),h=r(18276),g=r(20021);const f=(0,n.ph)(({isLoading:e=!1,isPasswordVisible:t,error:r,hint:f,placeholder:y,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)(),[D,L]=(0,n.J0)(""),[K,B]=(0,n.J0)(!1),F=Y?550:400;return(0,n.vJ)(()=>{A&&L("")},[A]),(0,l.A)(()=>{o.TF||k.current.focus()},F),(0,n.vJ)(()=>{r&&(0,s.RK)(()=>{k.current.focus(),k.current.select()})},[r]),(0,g.FD)("form",{action:"",onSubmit:N?function(t){t.preventDefault(),e||K&&N(D)}:c.A,autoComplete:"off",children:[(0,g.FD)("div",{className:(0,u.A)("input-group password-input",D&&"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:D||"",autoComplete:w?"one-time-code":"current-password",spellCheck:!a.Vq&&void 0,onChange:function(e){r&&P();const{target:t}=e;L(t.value),B(t.value.length>=i.AGC),T&&T(t.value)},maxLength:256,dir:"auto"}),(0,g.Y)("label",{children:r||f||y||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)(h.A,{name:t?"eye":"eye-crossed"})})]}),b&&(0,g.Y)("p",{className:"description",children:b}),N&&(K||I)&&(0,g.Y)(m.A,{type:"submit",ripple:!S,isLoading:e,disabled:!K,children:v||U("PasswordFormSubmit")})]})})},3178(e,t,r){r.d(t,{A:()=>h});var n=r(84051),i=r(31481),s=r(44029),a=r(14737),o=r(43874),u=r(37661),c=r(18104),l=r(20021);const d=[0,50],p=[0,20],m=[20,0],h=(0,n.ph)(({isPasswordVisible:e,isBig:t})=>{const[r,h]=(0,u.A)(!1),[g,f]=(0,u.A)(!1),{isMobile:y}=(0,o.Ay)(),v=y?i.UyP:i.H6l;(0,a.A)(f,2e3);const b=(0,n.hb)(h,[h]);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?i.r2x:v,className:g?"hidden":"shown",tgsUrl:s.w.MonkeyClose,playSegment:d,noLoop:!0,onLoad:b}),(0,l.Y)(c.A,{size:t?i.r2x:v,className:g?"shown":"hidden",tgsUrl:s.w.MonkeyPeek,playSegment:e?p:m,noLoop:!0})]})})},86046(e,t,r){r.d(t,{D5:()=>h,HT:()=>u,M6:()=>m,MA:()=>c,Pc:()=>l,ZF:()=>p,hk:()=>d,j6:()=>g,jA:()=>o});var n=r(31481),i=r(27102),s=r(17142),a=r(11597);function o(e,t){if("slug"===t.type)return t;if("stargiftResale"===t.type){const{slug:r,peerId:n}=t,i=(0,a.PVB)(e,n);if(!i)return;return{type:"stargiftResale",slug:r,peer:i,currency:t.currency}}if("stargift"===t.type){const{peerId:r,shouldHideName:n,giftId:i,message:s,shouldUpgrade:o}=t,u=(0,a.PVB)(e,r);if(!u)return;return{type:"stargift",peer:u,shouldHideName:n,giftId:i,message:s,shouldUpgrade:o}}if("starsgift"===t.type){const{userId:r,stars:n,amount:i,currency:s}=t,o=(0,a.mBe)(e,r);if(!o)return;return{type:"stars",purpose:{type:"starsgift",user:o,stars:n,amount:i,currency:s}}}if("stars"===t.type){const{stars:r,amount:n,currency:i,spendPurposePeerId:s}=t;return{type:"stars",purpose:{type:"stars",stars:r,amount:n,currency:i,spendPurposePeer:s?(0,a.PVB)(e,s):void 0}}}if("chatInviteSubscription"===t.type){const{hash:e}=t;return{type:"chatInviteSubscription",hash:e}}if("message"===t.type){const r=(0,a.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:i}=t,s=(0,a.mBe)(e,n);if(!s)return;return{type:"premiumGiftStars",months:r,message:i,user:s}}if("giftcode"===t.type){const{userIds:r,boostChannelId:n,amount:i,currency:s,option:o,message:u}=t;return{type:"giveaway",option:o,purpose:{type:"giftcode",amount:i,currency:s,users:r.map(t=>(0,a.mBe)(e,t)).filter(Boolean),boostChannel:n?(0,a.hds)(e,n):void 0,message:u}}}if("starsgiveaway"===t.type){const{chatId:r,additionalChannelIds:n,amount:i,currency:s,untilDate:o,areWinnersVisible:u,countries:c,isOnlyForNewSubscribers:l,prizeDescription:d,stars:p,users:m}=t,h=(0,a.hds)(e,r);if(!h)return;const g=n?.map(t=>(0,a.hds)(e,t)).filter(Boolean);return{type:"starsgiveaway",purpose:{type:"starsgiveaway",amount:i,currency:s,chat:h,additionalChannels:g,untilDate:o,areWinnersVisible:u,countries:c,isOnlyForNewSubscribers:l,prizeDescription:d,stars:p,users:m}}}if("giveaway"===t.type){const{chatId:r,additionalChannelIds:n,amount:i,currency:s,option:o,untilDate:u,areWinnersVisible:c,countries:l,isOnlyForNewSubscribers:d,prizeDescription:p}=t,m=(0,a.hds)(e,r);if(!m)return;const h=n?.map(t=>(0,a.hds)(e,t)).filter(Boolean);return{type:"giveaway",option:o,purpose:{type:"giveaway",amount:i,currency:s,chat:m,additionalChannels:h,untilDate:u,areWinnersVisible:c,countries:l,isOnlyForNewSubscribers:d,prizeDescription:p}}}if("stargiftUpgrade"===t.type){const{inputSavedGift:r,shouldKeepOriginalDetails:n}=t,i=u(e,r);if(!i)return;return{type:"stargiftUpgrade",inputSavedGift:i,shouldKeepOriginalDetails:n}}if("stargiftTransfer"===t.type){const{inputSavedGift:r,recipientId:n}=t,i=u(e,r),s=(0,a.PVB)(e,n);if(!i||!s)return;return{type:"stargiftTransfer",inputSavedGift:i,recipient:s}}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,i=(0,a.PVB)(e,r);if(!i)return;return{type:"stargiftPrepaidUpgrade",peer:i,hash:n}}if("stargiftAuctionBid"===t.type){const{giftId:r,bidAmount:n,peerId:i,message:s,shouldHideName:o,isUpdateBid:u}=t;return{type:"stargiftAuctionBid",giftId:r,bidAmount:n,peer:i?(0,a.PVB)(e,i):void 0,message:s,shouldHideName:o,isUpdateBid:u}}}function u(e,t){if("user"===t.type)return t;if("chat"===t.type){const r=(0,a.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,s.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 m(e){const{action:t}=e.content;if("giftStars"===t?.type){const{transactionId:r,stars:i}=t;return{id:r,amount:{currency:n.OUy,amount:i,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:i}=t;return{id:r,amount:{currency:n.ykW,amount:i},peer:{type:"fragment"},date:e.date,isGift:!0,isMyGift:e.isOutgoing||void 0}}}function h(e){const{action:t}=e.content;if("prizeStars"!==t?.type)return;const{transactionId:r,stars:i,boostPeerId:s}=t;return{id:r,amount:{currency:n.OUy,amount:i,nanos:0},peer:{type:"peer",id:s},date:e.date,giveawayPostId:e.id}}function g(e,t){return(0,i.Lz)(e,t)}},72730(e,t,r){r.d(t,{A:()=>o});var n=r(84051),i=r(46536);const s=".Modal.with-balance-bar",a=(0,i.h)();function o(e,t){const[r,i]=(0,n.J0)(!0);return(0,n.vJ)(()=>{if(!t)return;const r=()=>{i(function(e){if(!e)return!0;const t=e.closest(s);if(!t)return!0;const r=document.querySelectorAll(s);if(r.length<=1)return!0;let n,i=-1/0;return r.forEach(e=>{const t=parseInt(getComputedStyle(e).zIndex,10)||0;t>=i&&(i=t,n=e)}),t===n}(e.current))};r();const n=a.addCallback(r);return a.runCallbacks(),()=>{n(),a.runCallbacks()}},[t,e]),r}},14737(e,t,r){r.d(t,{A:()=>s});var n=r(84051),i=r(17712);const s=function(e,t){const r=(0,i.A)(e);(0,n.vJ)(()=>{if("number"!=typeof t)return;const e=setTimeout(()=>r(),t);return()=>clearTimeout(e)},[t])}},1455(e,t,r){r.d(t,{A:()=>i});var n=r(84051);function i(e,t,r){const i=(0,n.li)(e);if(t){if(r?.length){const t={};for(const n of r)t[n]=e[n];i.current={...i.current,...t}}}else i.current=e;return i.current}},101(e,t,r){r.d(t,{A:()=>a});var n=r(84051),i=r(87679),s=r(56863);function a(e){const t=(0,n.li)(),{result:r}=(0,s.A)(()=>{if(!e)return Promise.resolve(void 0);t.current&&URL.revokeObjectURL(t.current);const r=URL.createObjectURL(e);return t.current=r,(0,i.NN)(r)},[e]);return(0,n.vJ)(()=>()=>{t.current&&(URL.revokeObjectURL(t.current),t.current=void 0)},[]),{image:r}}},37859(e,t,r){r.d(t,{A:()=>i});var n=r(84051);const i=(e,t,r)=>{const i=(0,n.li)();return(0,n.Nf)(()=>{const r=i.current;return i.current=t,e(r||[])},t,r)}},14680(e,t,r){r.d(t,{FD:()=>i,ZJ:()=>a,wb:()=>s});let n=0;function i(){n+=1}function s(){n-=1}function a(){return n>0}},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 i=0;n>=0&&(i=t.shiftKey?n>0?n-1:r.length-1:n<r.length-1?n+1:0),r[i].focus()}return document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}}r.d(t,{A:()=>n})}}]);
|
|
//# sourceMappingURL=7405.5c640f361c3102008bfb.js.map
|