mirror of
https://github.com/danog/telegram-tt.git
synced 2024-12-15 18:57:12 +01:00
2 lines
282 KiB
JavaScript
2 lines
282 KiB
JavaScript
|
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[301],{4301:(e,t,n)=>{n.r(t),n.d(t,{ArchivedChats:()=>Ka,AttachMenu:()=>or,AttachmentModal:()=>Fs,BotCommandMenu:()=>cr,BotCommandTooltip:()=>lr,CalendarModal:()=>je,ChatFolderModal:()=>Wa,ContactList:()=>Ja,ContextMenuContainer:()=>ms,CustomSendMenu:()=>mr,DeleteMessageModal:()=>qe,Dialogs:()=>Ue,DropArea:()=>ur.Z,EmojiTooltip:()=>Pr,ForwardPicker:()=>Be,GifSearch:()=>Tr,HeaderMenuContainer:()=>Zs,HistoryCalendar:()=>Ke,InlineBotTooltip:()=>br,LeftSearch:()=>Yt,Management:()=>qr,MediaViewer:()=>be,MentionTooltip:()=>Ms,MessageSelectToolbar:()=>st,MobileSearch:()=>vs,NewChat:()=>Ha,NewChatStep1:()=>_a,NewChatStep2:()=>Va,Notifications:()=>Ge,PaymentModal:()=>yo,PinMessageModal:()=>We,PollModal:()=>Ls,PollResults:()=>Ar,ReceiptModal:()=>No,RightSearch:()=>Sr,SafeLinkModal:()=>ze,SeenByModal:()=>rt,SendAsMenu:()=>Ir,Settings:()=>Ga,StickerSearch:()=>Mr,StickerSetModal:()=>us,StickerTooltip:()=>dr,SymbolMenu:()=>rr,TextFormatter:()=>hr.Z,UnpinAllMessagesModal:()=>Qe});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),P=n(7204),g=n(2858),v=n(1638),p=n(396),E=n(3989),C=n(1174),f=n(7361),b=n(3858),I=n(4399),y=n(935),S=n(3227);function w(e,t){const n=document.createElement("div");n.classList.add("ghost");const a=new Image;if(a.draggable=!1,a.oncontextmenu=S.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 N(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 k(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 F=n(231),A=n(126),L=n(2255),R=n(3106),B=n(8964),$=n(9196);const D=(0,a.X$)((0,s.c$)(((e,{message:t})=>({isDownloading:!!t&&(0,v.te)(e,t),isProtected:(0,v.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:P,cancelMessageMediaDownload:v}=(0,s.uC)(),{loadProgress:p}=(0,Z.Z)(r&&(0,g.Ti)(r,"download"),!l),E=(0,a.I4)((()=>{l?v({message:r}):P({message:r})}),[v,P,l,r]),C=(0,u.Z)(),b=(0,a.Ye)((()=>({onTrigger:e,isOpen:t})=>a.ZP.createElement(F.Z,{round:!0,size:"smaller",color:"translucent",
|
||
|
//# sourceMappingURL=301.751950a7a21e70acdb7c.js.map
|