mirror of
https://github.com/danog/telegram-tt.git
synced 2024-12-13 17:47:39 +01:00
2 lines
240 KiB
JavaScript
2 lines
240 KiB
JavaScript
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],Array(95).concat([function(e,t,a){"use strict";a.r(t),a.d(t,"MediaViewer",(function(){return de})),a.d(t,"ForwardPicker",(function(){return fe})),a.d(t,"Errors",(function(){return ye})),a.d(t,"Notifications",(function(){return Ne})),a.d(t,"SafeLinkModal",(function(){return we})),a.d(t,"CalendarModal",(function(){return Le})),a.d(t,"DeleteMessageModal",(function(){return Ae})),a.d(t,"PinMessageModal",(function(){return Te})),a.d(t,"UnpinAllMessagesModal",(function(){return De})),a.d(t,"MessageSelectToolbar",(function(){return Ue})),a.d(t,"LeftSearch",(function(){return yt})),a.d(t,"Settings",(function(){return sn})),a.d(t,"ContactList",(function(){return ln})),a.d(t,"NewChat",(function(){return hn})),a.d(t,"NewChatStep1",(function(){return dn})),a.d(t,"NewChatStep2",(function(){return mn})),a.d(t,"ArchivedChats",(function(){return gn})),a.d(t,"ContextMenuContainer",(function(){return Sn})),a.d(t,"StickerSetModal",(function(){return wn})),a.d(t,"HeaderMenuContainer",(function(){return Mn})),a.d(t,"MobileSearch",(function(){return An})),a.d(t,"AttachmentModal",(function(){return Vn})),a.d(t,"PollModal",(function(){return Wn})),a.d(t,"SymbolMenu",(function(){return Ec})),a.d(t,"AttachMenu",(function(){return Oc})),a.d(t,"MentionTooltip",(function(){return $n})),a.d(t,"StickerTooltip",(function(){return fc})),a.d(t,"BotKeyboardMenu",(function(){return jc})),a.d(t,"CustomSendMenu",(function(){return Cc})),a.d(t,"DropArea",(function(){return yc.b})),a.d(t,"TextFormatter",(function(){return kc.a})),a.d(t,"EmojiTooltip",(function(){return Ic})),a.d(t,"RightSearch",(function(){return wc})),a.d(t,"StickerSearch",(function(){return Lc})),a.d(t,"GifSearch",(function(){return Ac})),a.d(t,"PollResults",(function(){return Dc})),a.d(t,"Management",(function(){return Qc})),a.d(t,"PaymentModal",(function(){return js})),a.d(t,"ReceiptModal",(function(){return ks}));var n=a(0),c=a(2),s=a(5),r=a(19),l=a(1),o=a(7),i=a(109),d=a(6),m=a(4),u=a(3),h=a(126),b=a(44),g=a(171),p=a(35),v=a(101),E=a(114),O=a(185),f=a(41),j=a(45),C=a(140),y=a(52);function k(e,t,a,n){const{mediaEl:c}=P(t,n);if(!c)return;const{width:s}=y.a.get();let o,d=!1;if(n){const{photo:e,video:t,webPage:a}=Object(m.v)(n);d=Boolean(t),o=t?Object(m.ab)(t):Object(m.R)(e||a.photo)}else o=i.a;const{width:u,height:h}=Object(i.j)(e,d),{width:b,height:g}=Object(i.e)(u,h,o.width,o.height),p=(s-b)/2,v=function(e){const t=window.matchMedia(i.b);let a=4.125;e&&(a+=t.matches?.875:3.375);return a*i.c}(e)+(h-g)/2;let{top:E,left:O,width:f,height:j}=c.getBoundingClientRect();if([r.h.SharedMedia,r.h.Album,r.h.ScheduledAlbum,r.h.SearchResult].includes(t)){const e=function(e,t,a,n,c,s){if(e===t){const r=Math.max(c,s)*(e/t);n-=(r-c)/2,a-=(r-s)/2,c=r,s=r}else if(e>t){const a=c;n-=((c=s*(e/t))-a)/2}else if(t>e){const n=s;a-=((s=c*(t/e))-n)/2}return{top:a,left:n,width:c,height:s}}(b,g,E,O,f,j);E=e.top,O=e.left,f=e.width,j=e.height}const C=O+f/2-(p+b/2),k=E+j/2-(v+g/2),N=f/b,S=j/g,F=I(a||c);w(F,{top:v+"px",left:p+"px",width:b+"px",height:g+"px",transform:`translate3d(${C}px, ${k}px, 0) scale(${N}, ${S})`}),M(F,t),document.body.classList.add("ghost-animating"),requestAnimationFrame(()=>{document.body.appendChild(F),requestAnimationFrame(()=>{F.style.transform="",function(e){e.firstChild.style.objectFit="default",e.classList.remove("rounded-corners","circle")}(F),setTimeout(()=>{requestAnimationFrame(()=>{document.body.contains(F)&&document.body.removeChild(F),document.body.classList.remove("ghost-animating")})},200+l.c)})})}function N(e,t,a){const{container:n,mediaEl:c}=P(e,a);if(!c)return;const s=document.getElementById("MediaViewer").querySelector(".active .media-viewer-content img, .active .media-viewer-content video");if(!s||!c)return;const{top:o,left:i,width:d,height:m}=s.getBoundingClientRect(),{top:u,left:h,width:b,height:g}=c.getBoundingClientRect();let p=u;if(!function(e){if("none"===e.style.display)return!1;const t=e.getBoundingClientRect(),{height:a}=y.a.get();return t.top<=a&&t.top+t.height>=0}(n)){const{height:e}=y.a.get();p=u<o?-g:e}const v
|
||
|
//# sourceMappingURL=3.91a1da61c17d38fb3b13.js.map
|