"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[2239],{70172:(e,t,n)=>{n.d(t,{Z:()=>Z});var o=n(60748),r=n(33555),l=n(6137),c=n(83716),s=n(77361),i=n(56112),a=n(2155),d=n(46752),u=n(32340),m=n(6202),f=n(31212),p=n(59107),v=n(3657),g=n(35148);const h=(0,d.y)("Avatar");h.media=h("media"),h.icon=h("icon");const Z=(0,o.X$)((e=>{let{className:t,size:n="large",chat:Z,user:I,photo:C,userStatus:P,text:b,isSavedMessages:y,withVideo:E,noLoop:w,lastSyncTime:A,animationLevel:B,observeIntersection:N,onClick:T}=e;const{loadFullUser:k}=(0,r.Sv)(),S=(0,o.sO)(null),U=(0,o.sO)(0),L=(0,v.Op)(S,N),R=I&&(0,i.NB)(I),O=I&&(0,i.pK)(I.id),x=Z?.isForum;let D,F;const q=!s.as&&B===c.zy8&&L&&E&&I?.isPremium&&I?.hasVideoAvatar,H=I?.fullInfo?.profilePhoto,V=q&&H?.isVideo,$="jumbo"===n;y||R||(I?D=(0,i.RT)(I,$?"big":void 0):Z?D=(0,i.RT)(Z,$?"big":void 0):C&&(D=`photo${C.id}?size=m`),V&&(F=(0,i.RT)(I,void 0,"video")));const j=(0,m.Z)(D,!1,l.IU.BlobUrl,A),K=(0,m.Z)(F,!V,l.IU.BlobUrl,A),M=Boolean(j||K),_=Boolean(L&&K),{transitionClassNames:z}=(0,f.Z)(M,void 0,M,"slow"),X=(0,o.I4)((e=>{const t=e.currentTarget;K&&(U.current+=1,(U.current>=3||w)&&(t.style.display="none"))}),[w,K]),J=I?.id;(0,o.d4)((()=>{J&&q&&!H&&k({userId:J})}),[k,H,J,q]);const G=(0,p.Z)();let Y;const W=I?(0,i.Js)(I):Z?(0,i.U)(G,Z):b;if(y)Y=o.ZP.createElement("i",{className:(0,d.Z)(h.icon,"icon-avatar-saved-messages"),role:"img","aria-label":W});else if(R)Y=o.ZP.createElement("i",{className:(0,d.Z)(h.icon,"icon-avatar-deleted-account"),role:"img","aria-label":W});else if(O)Y=o.ZP.createElement("i",{className:(0,d.Z)(h.icon,"icon-reply-filled"),role:"img","aria-label":W});else if(M)Y=o.ZP.createElement(o.ZP.Fragment,null,o.ZP.createElement("img",{src:j,className:(0,d.Z)(h.media,"avatar-media",z,K&&"poster"),alt:W,decoding:"async"}),_&&o.ZP.createElement(g.Z,{canPlay:!0,src:K,className:(0,d.Z)(h.media,"avatar-media"),muted:!0,autoPlay:!0,disablePictureInPicture:!0,playsInline:!0,onEnded:X}));else if(I){const e=(0,i.Js)(I);Y=e?(0,a.Xv)(e,2):void 0}else if(Z){const e=(0,i.U)(G,Z);Y=e&&(0,a.Xv)(e,(0,i.YC)(Z.id)?2:1)}else b&&(Y=(0,a.Xv)(b,2));const Q=!y&&I&&P&&(0,i.kM)(I,P),ee=(0,d.Z)(`Avatar size-${n}`,t,`color-bg-${(0,i.Rs)(I||Z)}`,y&&"saved-messages",R&&"deleted-account",O&&"replies-bot-account",x&&"forum",Q&&"online",T&&"interactive",!y&&!j&&"no-photo"),te=Boolean(y||j),ne=(0,o.I4)((e=>{T&&T(e,te)}),[T,te]),oe=(I||Z)&&(I||Z).id;return o.ZP.createElement("div",{ref:S,className:ee,onClick:ne,"data-test-sender-id":c.Cgt?oe:void 0,"aria-label":"string"==typeof Y?W:void 0},"string"==typeof Y?(0,u.Z)(Y,["jumbo"===n?"hq_emoji":"emoji"]):Y)}))},22275:(e,t,n)=>{n.d(t,{Z:()=>d});var o=n(60748),r=n(33555),l=n(11192),c=n(56112),s=n(32340),i=n(59107),a=n(17551);const d=(0,o.X$)((0,r.c$)(((e,t)=>{let{userId:n}=t;const o=(0,l.jr)(e),r=n&&(0,l.dy)(e,n);return{chat:o,contactName:r?(0,c.Vl)(r):void 0}}))((e=>{let{isOpen:t,chat:n,userId:l,contactName:c,onClose:d}=e;const{deleteChatMember:u}=(0,r.Sv)(),m=(0,i.Z)(),f=(0,o.I4)((()=>{u({chatId:n.id,userId:l}),d()}),[n,u,d,l]);if(n&&l)return o.ZP.createElement(a.Z,{isOpen:t,onClose:d,title:m("GroupRemoved.Remove"),textParts:(0,s.Z)(m("PeerInfo.Confirm.RemovePeer",c)),confirmLabel:m("lng_box_remove"),confirmHandler:f,confirmIsDestructive:!0})})))},17551:(e,t,n)=>{n.d(t,{Z:()=>i});var o=n(60748),r=n(59107),l=n(72313),c=n(13103),s=n(231);const i=(0,o.X$)((e=>{let{isOpen:t,onClose:n,onCloseAnimationEnd:i,title:a,header:d,text:u,textParts:m,confirmLabel:f="Confirm",confirmHandler:p,confirmIsDestructive:v,areButtonsInColumn:g,children:h}=e;const Z=(0,r.Z)(),I=(0,o.sO)(null),C=(0,o.I4)((e=>{-1===e&&p()}),[p]),P=(0,l.Z)(I,t,C,".Button");return o.ZP.createElement(c.Z,{className:"confirm",title:a||Z("Telegram"),header:d,isOpen:t,onClose:n,onCloseAnimationEnd:i},u&&u.split("\\n").map((e=>o.ZP.createElement("p",null,e))),m||h,o.ZP.createElement("div",{className:g?"dialog-buttons-column":"dialog-buttons mt-2",ref:I,onKeyDown:P},o.ZP.createElement(s.Z,{className:"confirm-dialog-button",isText:!0,onClick:p,color:v?"danger":"primary"},f),o.ZP.createElement(s.Z,{className:"confirm-dialog-button",isText:!0,onClick:n},Z("Cancel"))))}))},21273:(e,t,n)=>{n.d(t,{Z:()=>m});var o=n(91713),r=n(60748),l=n(69118),c=n(87675),s=n(77361),i=n(80036);const a=".ListItem",d=20,u=800,m=e=>{let{ref:t,className:n,items:m,itemSelector:f=a,preloadBackwards:p=d,sensitiveArea:v=u,withAbsolutePositioning:g,maxHeight:h,noScrollRestore:Z=!1,noScrollRestoreOnTop:I=!1,noFastList:C,cacheBuster:P,beforeChildren:b,children:y,onLoadMore:E,onScroll:w,onKeyDown:A,onDragOver:B,onDragLeave:N}=e,T=(0,r.sO)(null);t&&(T=t);const k=(0,r.sO)({}),[S,U]=(0,r.Ye)((()=>E?[(0,l.Ds)((function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];E({direction:o.Uq.Backwards,noScroll:e})}),1e3,!0,!1),(0,l.Ds)((()=>{E({direction:o.Uq.Forwards})}),1e3,!0,!1)]:[]),[E,m]);(0,r.d4)((()=>{if(!S)return;if(p>0&&(!m||m.length
{const e=T.current,t=k.current;let n;if(t.listItemElements=e.querySelectorAll(f),t.currentAnchor&&Array.from(t.listItemElements).includes(t.currentAnchor)){const{scrollTop:o}=e;n=o+(t.currentAnchor.getBoundingClientRect().top-t.currentAnchorTop)}else{const e=t.listItemElements[0];e&&(t.currentAnchor=e,t.currentAnchorTop=e.getBoundingClientRect().top)}g||Z||I&&0===e.scrollTop||((0,c.Z)(e,n),t.isScrollTopJustUpdated=!0)}),[m,f,Z,I,P,g]);const L=(0,r.I4)((e=>{if(U&&S){const{isScrollTopJustUpdated:e,currentAnchor:t,currentAnchorTop:n}=k.current,o=k.current.listItemElements;if(e)return void(k.current.isScrollTopJustUpdated=!1);const r=o.length,l=T.current,{scrollTop:c,scrollHeight:s,offsetHeight:i}=l,a=c<=(r?o[0].offsetTop:0)+v,d=(r?o[r-1].offsetTop+o[r-1].offsetHeight:s)-(c+i)<=v;let u=!1;if(a){const e=o[0];if(e){const o=e.getBoundingClientRect().top,r=t?.offsetParent&&t!==e?t.getBoundingClientRect().top:o;t&&void 0!==n&&r>n&&(k.current.currentAnchor=e,k.current.currentAnchorTop=o,u=!0,U())}}if(d){const e=o[r-1];if(e){const o=e.getBoundingClientRect().top,r=t?.offsetParent&&t!==e?t.getBoundingClientRect().top:o;t&&void 0!==n&&r