mirror of
https://github.com/danog/telegram-tt.git
synced 2024-12-16 03:07:07 +01:00
2 lines
272 KiB
JavaScript
2 lines
272 KiB
JavaScript
|
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[701],{9701:(e,t,n)=>{n.r(t),n.d(t,{ArchivedChats:()=>Da,AttachMenu:()=>Ys,AttachmentModal:()=>ps,BotCommandMenu:()=>Vs,BotCommandTooltip:()=>js,CalendarModal:()=>De,ChatFolderModal:()=>Oa,ContactList:()=>Ta,ContextMenuContainer:()=>Wa,CustomSendMenu:()=>qs,DeleteMessageModal:()=>Oe,Dialogs:()=>we,DropArea:()=>Ws.Z,EmojiTooltip:()=>tr,ForwardPicker:()=>Ie,GifSearch:()=>Pr,HeaderMenuContainer:()=>ts,HistoryCalendar:()=>Ue,InlineBotTooltip:()=>ir,LeftSearch:()=>Rt,Management:()=>$r,MediaViewer:()=>de,MentionTooltip:()=>gs,MessageSelectToolbar:()=>Ye,MobileSearch:()=>ss,NewChat:()=>Ba,NewChatStep1:()=>Aa,NewChatStep2:()=>La,Notifications:()=>ke,PaymentModal:()=>io,PinMessageModal:()=>xe,PollModal:()=>Cs,PollResults:()=>vr,ReceiptModal:()=>uo,RightSearch:()=>dr,SafeLinkModal:()=>Fe,Settings:()=>ka,StickerSearch:()=>Zr,StickerSetModal:()=>Qa,StickerTooltip:()=>Ks,SymbolMenu:()=>_s,TextFormatter:()=>Qs.Z,UnpinAllMessagesModal:()=>Ge});var a=n(4050),s=n(5116),r=n(6137),o=n(1713),l=n(3716),i=n(7361),c=n(3858),d=n(4399),m=n(8085),u=n(2858),h=n(782),Z=n(1174),P=n(3989),g=n(396),v=n(5326),p=n(6202),E=n(2566),C=n(2937),f=n(7204),b=n(8674),I=n(935);function y(e,t){const n=document.createElement("div");n.classList.add("ghost");const a=new Image;if("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(".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 N(e,t){let n,a;switch(e){case o.bZ.Album:case o.bZ.ScheduledAlbum:n=`.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 .ChatInfo .Avatar",a="img.avatar-media";break;case o.bZ.SettingsAvatar:n="#Settings .ProfileInfo .active .ProfilePhoto",a="img.avatar-media";break;case o.bZ.ProfileAvatar:n="#RightColumn .ProfileInfo .active .ProfilePhoto",a="img.avatar-media";break;case o.bZ.ScheduledInline:case o.bZ.Inline:default:n=`.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 k(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 M=n(9107),T=n(6590),F=n(9204),A=n(126),L=n(2255),R=n(231),B=n(790),$=n(2340),D=n(172);const U=(0,s.c$)(((e,{chatId:t,messageId:n,isAvatar:a})=>{if(a&&t)return{sender:(0,u.YC)(t)?(0,m.dy)(e,t):(0,m.Z1)(e,t)};if(!n||!t)return{};const s=(0,m.hj)(e,t,n);return{message:s,sender:s&&(0,m.Ur)(e,s)}}),((e,t)=>(0,h.ei)(t,["closeMediaViewer","focusMessage"])))((({chatId:e,messageId:t,sender:n,isAvatar:s,message:r,closeMediaViewer:o,focusMessage:l})=>{const i=(0,a.I4)((()=>{o(),l({chatId:e,messageId:t})}),[e,l,t,o]),c=(0,M.Z)();if(!n||!r&&!s)return;const d=(0,u.OU)(c,n);return a.ZP.createElement("div",{className:"SenderInfo",onClick:i},(0,u.YC)(n.id)?a.ZP.createElement(D.Z,{key:n.id,size:"medium",user:n}):a.ZP.createElement(D.Z,{key:n.id,size:"medium",chat:n}),a.ZP.createElement("div",{className:"meta"},a.ZP.createElement("div",{className:"t
|
||
|
//# sourceMappingURL=701.0c52bb0aaf1cd79c0b70.js.map
|