2022-01-28 21:02:07 +01:00
|
|
|
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[126],{9126:(e,t,n)=>{n.r(t),n.d(t,{ArchivedChats:()=>ts,AttachMenu:()=>Er,AttachmentModal:()=>zs,BotCommandMenu:()=>br,BotCommandTooltip:()=>fr,CalendarModal:()=>qe,ChatFolderModal:()=>as,ContactList:()=>Va,ContextMenuContainer:()=>Is,CustomSendMenu:()=>yr,DeleteMessageModal:()=>We,Dialogs:()=>Ue,DropArea:()=>Nr.Z,EmojiInteractionAnimation:()=>ut,EmojiTooltip:()=>wr,ForwardPicker:()=>Be,GifSearch:()=>Xr,HeaderMenuContainer:()=>ks,HistoryCalendar:()=>Ke,InlineBotTooltip:()=>Br,LeftSearch:()=>en,Management:()=>Io,MediaViewer:()=>be,MentionTooltip:()=>Js,MessageSelectToolbar:()=>rt,MobileSearch:()=>Ms,NewChat:()=>Qa,NewChatStep1:()=>qa,NewChatStep2:()=>Ka,Notifications:()=>Ge,PaymentModal:()=>jo,PinMessageModal:()=>Qe,PollModal:()=>Ys,PollResults:()=>_r,ReactorListModal:()=>ct,ReceiptModal:()=>Wo,RightSearch:()=>Dr,SafeLinkModal:()=>ze,SeenByModal:()=>ot,SendAsMenu:()=>$r,Settings:()=>Ya,StickerSearch:()=>Jr,StickerSetModal:()=>ys,StickerTooltip:()=>Ir,SymbolMenu:()=>pr,TextFormatter:()=>kr.Z,UnpinAllMessagesModal:()=>et});var a=n(4050),s=n(5116),r=n(6137),o=n(1713),i=n(3716),l=n(2937),c=n(5326),d=n(8674),m=n(6590),u=n(9107),h=n(6202),Z=n(2566),v=n(7204),P=n(8415),g=n(1638),p=n(396),E=n(3989),C=n(1174),f=n(7361),b=n(3858),I=n(4399),y=n(1265),N=n(3227);function k(e,t){const n=document.createElement("div");n.classList.add("ghost");const a=new Image;if(a.draggable=!1,a.oncontextmenu=N.Z,"string"==typeof e?a.src=e:e instanceof HTMLVideoElement?a.src=e.poster:a.src=e.src,n.appendChild(a),t===o.bZ.ProfileAvatar||t===o.bZ.SettingsAvatar){n.classList.add("ProfileInfo"),t===o.bZ.SettingsAvatar&&n.classList.add("self");const e=document.querySelector(t===o.bZ.ProfileAvatar?"#RightColumn .ProfileInfo .info":"#Settings .ProfileInfo .info");e&&n.appendChild(e.cloneNode(!0))}return n}function S(e,t){const n=document.querySelector(".Transition__slide--active > .MessageList");let a=e.offsetTop+t.closest(".content-inner, .WebPage").offsetTop;return e.id.includes("album-media-")&&(a+=e.parentElement.offsetTop+e.closest(".Message").offsetTop),a>n.scrollTop&&a+t.offsetHeight<n.scrollTop+n.offsetHeight}function w(e,t){Object.assign(e.style,t)}function M(e,t){let n,a;switch(e){case o.bZ.Album:case o.bZ.ScheduledAlbum:n=`.Transition__slide--active > .MessageList #album-media-${t.id}`,a=".full-media";break;case o.bZ.SharedMedia:n=`#shared-media${t.id}`,a="img";break;case o.bZ.SearchResult:n=`#search-media${t.id}`,a="img";break;case o.bZ.MiddleHeaderAvatar:n=".MiddleHeader .Transition__slide--active .ChatInfo .Avatar",a="img.avatar-media";break;case o.bZ.SettingsAvatar:n="#Settings .ProfileInfo .Transition__slide--active .ProfilePhoto",a="img.avatar-media";break;case o.bZ.ProfileAvatar:n="#RightColumn .ProfileInfo .Transition__slide--active .ProfilePhoto",a="img.avatar-media";break;case o.bZ.ScheduledInline:case o.bZ.Inline:default:n=`.Transition__slide--active > .MessageList #message${t.id}`,a=".message-content .full-media, .message-content .thumbnail"}const s=document.querySelector(n),r=s&&s.querySelectorAll(a);return{container:s,mediaEl:null==r?void 0:r[r.length-1]}}function T(e,t){switch(t){case o.bZ.Album:case o.bZ.ScheduledAlbum:case o.bZ.Inline:case o.bZ.ScheduledInline:e.classList.add("rounded-corners");break;case o.bZ.SharedMedia:case o.bZ.SettingsAvatar:case o.bZ.ProfileAvatar:case o.bZ.SearchResult:e.firstChild.style.objectFit="cover";break;case o.bZ.MiddleHeaderAvatar:e.classList.add("circle")}}var R=n(231),L=n(126),A=n(2255),F=n(3106),B=n(8964),$=n(9196);const x=(0,a.X$)((0,s.c$)(((e,{message:t})=>({isDownloading:!!t&&(0,g.te)(e,t),isProtected:(0,g.EV)(e,t)})))((({mediaData:e,isVideo:t,isZoomed:n,message:r,fileName:o,isAvatar:i,isDownloading:l,isProtected:c,onCloseMediaViewer:d,onForward:m,onZoomToggle:h})=>{const{downloadMessageMedia:v,cancelMessageMediaDownload:g}=(0,s.uC)(),{loadProgress:p}=(0,Z.Z)(r&&(0,P.Ti)(r,"download"),!l),E=(0,a.I4)((()=>{l?g({message:r}):v({message:r})}),[g,v,l,r]),C=(0,u.Z)(),b=(0,a.Ye)((()=>({onTrigger:e,isOpen:t})=>a.ZP.creat
|