2021-08-19 09:06:45 +02:00
|
|
|
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[280],{7854:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(4050),a=n(6137),s=n(4399),o=n(3657),i=n(6202),c=n(8835),l=n(706),d=n(7799);const u={large:160,medium:128,small:104},m=({sticker:e,size:t="medium",observeIntersection:n,lastSyncTime:m,forceLoadPreview:h})=>{const f=(0,r.sO)(null),[v,p]=(0,l.Z)(),g=`sticker${e.id}`,Z=(0,o.Op)(f,n),E=e.thumbnail&&e.thumbnail.dataUri,y=(0,i.Z)(`${g}?size=m`,!Z&&!h,a.IU.BlobUrl,m),{transitionClassNames:P}=(0,c.Z)(y,"slow"),C=(0,i.Z)(g,!Z,a.IU.Lottie,m),b=Boolean(C),[w,N]=(0,r.eJ)(String(Math.random())),k=(0,r.I4)((()=>{N(String(Math.random()))}),[]),I=u[t],T=`width: ${I}px; height: ${I}px;`;return r.ZP.createElement("div",{ref:f,className:"AnimatedEmoji media-inner",style:T,onClick:k},!v&&E&&r.ZP.createElement("img",{src:E,className:e.id===s.wB?"like-sticker-thumb":void 0,alt:""}),!v&&y&&r.ZP.createElement("img",{src:y,className:P,alt:""}),b&&r.ZP.createElement(d.Z,{key:g,id:g,animationData:C,size:I,quality:1,play:Z&&w,noLoop:!0,onLoad:p}))}},7799:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(4050),a=n(9118),s=n(6752),o=n(8674),i=n(5332);let c,l;async function d(){return c||(c=n.e(941).then(n.bind(n,7941)),l=(await c).default),c}setTimeout(d,5e3);const u=(0,r.X$)((({className:e,id:t,animationData:n,play:c,playSegment:u,speed:m,noLoop:h,size:f,quality:v,isLowPriority:p,onLoad:g})=>{const[Z,E]=(0,r.eJ)(),y=(0,r.sO)(null),P=(0,r.sO)(!1),C=(0,r.sO)(!1),b=(0,r.sO)();b.current=c;const w=(0,r.sO)();w.current=u,(0,r.d4)((()=>{if(Z||!n)return;const e=()=>{if(!y.current)return;const e=new l(t,y.current,n,{noLoop:h,size:f,quality:v,isLowPriority:p},g);m&&e.setSpeed(m),E(e)};l?e():d().then((()=>{(0,a.T2)((()=>{y.current&&e()}))}))}),[Z,n,t,p,h,g,v,f,m]),(0,r.d4)((()=>()=>{Z&&Z.destroy()}),[Z]);const N=(0,r.I4)(((e=!1)=>{Z&&(b.current||w.current)&&(w.current?Z.playSegment(w.current):e?Z.goToAndPlay(0):Z.play())}),[Z]),k=(0,r.I4)((()=>{Z&&Z.pause()}),[Z]),I=(0,r.I4)((()=>{C.current=!0,Z&&(P.current||(P.current=Z.isPlaying()),k())}),[Z,k]),T=(0,r.I4)((()=>{P.current&&N(),P.current=!1,C.current=!1}),[N]),L=(0,r.I4)((()=>{(0,a.T2)(T)}),[T]);(0,r.d4)((()=>{Z&&(c||u?C.current?P.current=!0:N(h):C.current?P.current=!1:k())}),[Z,c,u,h,N,k]),(0,o.ZP)(I,T),(0,i.Z)(I,L);const x=(0,s.Z)("AnimatedSticker",e),M=f?`width: ${f}px; height: ${f}px;`:void 0;return r.ZP.createElement("div",{ref:y,className:x,style:M})}))},4752:(e,t,n)=>{n.d(t,{Z:()=>P});var r=n(4050),a=n(7361),s=n(790),o=n(2858),i=n(6752),c=n(2340),l=n(2761),d=n(1212),u=n(2019),m=n(3186),h=n(2619),f=n(9107),v=n(231),p=n(9196),g=n(8033);const Z=a.wB?20:25,E=a.wB?50:75;function y(e,t,{handleStartSeek:n,handleSeek:a,handleStopSeek:s}){return r.ZP.createElement("div",{className:"seekline no-selection",onMouseDown:n,onMouseMove:a,onMouseUp:s},r.ZP.createElement("span",{className:"seekline-buffered-progress"},r.ZP.createElement("i",{style:`transform: translateX(${100*t}%)`})),r.ZP.createElement("span",{className:"seekline-play-progress"},r.ZP.createElement("i",{style:`transform: translateX(${100*e}%)`})),r.ZP.createElement("span",{className:"seekline-thumb"},r.ZP.createElement("i",{style:`transform: translateX(${100*e}%)`})))}const P=(0,r.X$)((({theme:e,message:t,senderTitle:n,uploadProgress:P,target:C,date:b,lastSyncTime:w,className:N,isSelectable:k,isSelected:I,onPlay:T,onReadMedia:L,onCancelUpload:x,onDateClick:M})=>{const{content:{audio:S,voice:$},isMediaUnread:F}=t,O=Boolean($),A=(0,r.sO)(!1),D=(0,f.Z)(),[R,U]=(0,r.eJ)(!1),B=w,{mediaData:V,downloadProgress:X}=(0,l.Z)((0,o.Ti)(t,"inline"),!B,(0,o.kG)(t,"inline")),{isBuffered:H,bufferedProgress:K,bufferingHandlers:j,checkBuffering:z}=(0,u.Z)(),{isPlaying:q,playProgress:J,playPause:Y,setCurrentTime:W,duration:_}=(0,m.Z)((0,o.Tp)(t),(0,o.XV)(t),V,j,z,R,(function(){U(!0),T(t.id,t.chatId)}),(0,o.CI)(t));(0,r.d4)((()=>{U(q)}),[q]);const{isDownloadStarted:G,downloadProgress:Q,handleDownloadClick:ee}=(0,h.Z)((0,o.Ti)(t,"download"),(0,o.I3)(t)),te=R&&!H,{isUploading:ne,isTransferring:re,transferProgress:ae}=(0,o.Sc)(t,G?Q:P||X,te||G),{shouldRender:se,tra
|