mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-26 12:24:46 +01:00
2 lines
133 KiB
JavaScript
2 lines
133 KiB
JavaScript
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[8688],{45601:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(14050),r=n(6137),i=n(6202),o=n(21179);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},s.apply(this,arguments)}const l=(0,a.X$)((function(e){var t;const{sticker:n,noLoad:l,forcePreview:c,lastSyncTime:d,...u}=e,m=null==n||null===(t=n.thumbnail)||void 0===t?void 0:t.dataUri,h=`sticker${null==n?void 0:n.id}`,v=(0,i.Z)(n?`${h}?size=m`:void 0,l&&!c,r.IU.BlobUrl,d),p=(0,i.Z)(h,l,void 0,d);return a.ZP.createElement(o.Z,s({tgsUrl:p,previewUrl:v,noPreviewTransition:!0,thumbDataUri:m},u))}))},21179:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(14050),r=n(46752),i=n(70692),o=n(58912);const s="gp5OwinzPeHwkesmaEIR";var l=n(60706),c=n(80036);function d(){return d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},d.apply(this,arguments)}const u=new Set,m=(0,a.X$)((function(e){const{previewUrl:t,thumbDataUri:n,noPreviewTransition:m,className:h,...v}=e,[p,f]=(0,l.Z)(u.has(t)),g=(0,i.Z)(m||p),[Z,P]=(0,l.Z)(!1),E=(0,a.I4)((()=>{f(),u.add(t)}),[f,t]),{size:y}=e;return a.ZP.createElement("div",{className:(0,r.Z)(h,"oGmd77AsTbJeJk8CV6gl"),style:(0,c.Z)(void 0!==y&&`width: ${y}px; height: ${y}px;`)},!Z&&n&&a.ZP.createElement("img",{src:n,className:(0,r.Z)(s)}),!Z&&t&&a.ZP.createElement("img",{src:t,className:(0,r.Z)(s,g),onLoad:E}),a.ZP.createElement(o.Z,d({},v,{onLoad:P,noTransition:!0})))}))},54752:(e,t,n)=>{n.d(t,{ZP:()=>L});var a=n(14050),r=n(33555),i=n(6137),o=n(91713),s=n(77361),l=n(790),c=n(83158);function d(e,t,n,a){let{peak:r,fillStyle:i,progressFillStyle:o}=a;const s=4*t.length;e.width=2*s,e.height=46,e.style.width=`${s}px`,e.style.height="23px";const l=e.getContext("2d");l.scale(2,2),t.forEach(((e,a)=>{l.globalAlpha=a/t.length>=n?.5:1,l.fillStyle=n>a/t.length?o:i;const s=Math.max(2,e/Math.max(1,r)*23);!function(e,t,n,a,r,i){2<2*i&&(i=1),r<2*i&&(i=r/2),e.beginPath(),e.moveTo(t+i,n),e.arcTo(t+2,n,t+2,n-r,i),e.arcTo(t+2,n-r,t,n-r,i),e.arcTo(t,n-r,t,n,i),e.arcTo(t,n,t+2,n,i),e.closePath()}(l,4*a,(23+s)/2,0,s,1),l.fill()}))}var u=n(46752),m=n(32340),h=n(15376);function v(e){const t=8*e.length,n=Math.floor(t/5);if(!n)return[];const a=Array(n),r=e;for(let e=0,t=n-1;e!==t;++e){const t=Math.floor(5*e/8),n=Math.floor(5*e%8),i=r[t]+(r[t+1]<<8);a[e]=i>>n&31}const i=Math.floor(5*(n-1)/8),o=Math.floor(5*(n-1)%8),s=r[i]+(r[i+1]<<8);return a[n-1]=s>>o&31,a}function p(e,t){let n=0;const a=new Array(t),r=e.length/t,i=e[0],o=e[e.length-1];for(let d=0;d<t;d++){var s,l,c;const t=Math.floor(d*r),u=((null!==(s=e[t-1])&&void 0!==s?s:i)+(null!==(l=e[t])&&void 0!==l?l:i)+(null!==(c=e[t+1])&&void 0!==c?c:o))/3;a[d]=u,n<u&&(n=u)}return{data:a,peak:n}}var f=n(92566),g=n(31212),Z=n(12019),P=n(23186),E=n(59107),y=n(64963),C=n(6202),b=n(10396),w=n(50711),N=n(231),k=n(39196),I=n(8337);const S=window.matchMedia("(max-width: 375px)"),M=window.matchMedia("(max-width: 410px)");function T(e){return{MIN_SPIKES:s.wB?S.matches?16:20:25,MAX_SPIKES:s.wB?S.matches?35:e&&M.matches?40:45:75}}function x(e,t,n){return a.ZP.createElement("div",{className:"seekline no-selection",ref:n},t.map((e=>{let{start:t,end:n}=e;return a.ZP.createElement("div",{className:"seekline-buffered-progress",style:`left: ${100*t}%; right: ${100-100*n}%`})})),a.ZP.createElement("span",{className:"seekline-play-progress"},a.ZP.createElement("i",{style:`transform: translateX(${100*e}%)`})),a.ZP.createElement("span",{className:"seekline-thumb"},a.ZP.createElement("i",{style:`transform: translateX(${100*e}%)`})))}const L=(0,a.X$)((e=>{let{theme:t,message:n,senderTitle:S,uploadProgress:M,origin:L,date:$,lastSyncTime:D,noAvatars:O,className:A,isSelectable:F,isSelected:R,isDownloading:U,isTranscribing:B,isTranscriptionHidden:X,isTranscribed:V,isTranscriptionError:Y,canDownload:_,canTranscribe:j,onHideTranscription:K,onPlay:z,onReadMedia:H,onCancelUpload:J,onDateClick:W}=e;const{cancelMessageMediaDownload:q,downloadMessageMedia:G,transcribeAudio:Q}=(0,r.Sv)(),{content:{audio:ee,voice:te,video:ne},isMediaUnread:ae}=n,re=Boolean(te||ne),ie=(0,a.sO)(!1),oe=(0,a.sO)(null),se=(0,E.Z)(),{isRtl:le}=se,[ce,de]=(0,a.eJ)(!1),ue=D,me=(0,c.Ti)(n,"pictogram"),he=(0,C.Z)(me,!1,i.IU.BlobUrl),ve=(0,C.Z)((0,c.Ti)(n,"inline"),!ue,(0,c.kG)(n,"inline")),{loadProgress:pe}=(0,f.Z)((0,c.Ti)(n,"download"),!U,(0,c.kG)(n,"download")),fe=(0,a.I4)((()=>{de(!0),z(n.id,n.chatId)}),[n,z]),ge=(0,a.I4)((()=>{de(!1)}),[]),{isBuffered:Ze,bufferedRanges:Pe,bufferingHandlers:Ee,checkBuffering:ye}=(0,Z.Z)(),{isPlaying:Ce,playProgress:be,playPause:we,setCurrentTime:Ne,duration:ke}=(0,P.Z)((0,b.An)(n),(0,c.XV)(n),re?"voice":"audio",ve,Ee,void 0,ye,ce,fe,ge,(0,c.CI)(n)),Ie=(0,c.B4)(n),Se=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const o=(0,a.sO)(null),{data:s,peak:l}=(0,a.Ye)((()=>{if(!t)return;const{waveform:e,duration:n}=t;if(!e)return{data:new Array(Math.min(n,30)).fill(0),peak:0};const{MIN_SPIKES:a,MAX_SPIKES:r}=T(i),o=Math.min(n/10,1),s=Math.round(a+(r-a)*o);return p(v(new Uint8Array(e)),s)}),[t,i])||{};return(0,a.bt)((()=>{const t=o.current;t&&s&&void 0!==l&&d(t,s,n,{peak:l,fillStyle:r?"dark"===e?"#B7ABED":"#AEDFA4":"dark"===e?"#494A78":"#ADD3F7",progressFillStyle:r?"dark"===e?"#FFFFFF":"#4FAE4E":"dark"===e?"#8774E1":"#3390EC"})}),[r,l,n,s,e]),o}(t,te,ae&&!Ie?1:be,Ie,!O),Me=Ce||be>0&&be<1;(0,a.d4)((()=>{de(Ce)}),[Ce]);const Te=ce&&!Ze,{isUploading:xe,isTransferring:Le,transferProgress:$e}=(0,c.Sc)(n,M||pe,Te||U),{shouldRender:De,transitionClassNames:Oe}=(0,g.Z)(Le),Ae=De&&(Te||xe),Fe=(0,a.I4)((()=>{xe?null==J||J():(Ce||z(n.id,n.chatId),(0,r.Sv)().setAudioPlayerOrigin({origin:L}),de(!ce),we())}),[xe,Ce,ce,we,J,z,n.id,n.chatId,L]);(0,a.d4)((()=>{H&&ae&&(Ce||U)&&H()}),[Ce,ae,H,U]);const Re=(0,a.I4)((()=>{U?q({message:n}):G({message:n})}),[q,G,U,n]),Ue=(0,a.I4)((e=>{if(ie.current&&oe.current){const{width:t,left:n}=oe.current.getBoundingClientRect(),a=e instanceof MouseEvent?e.clientX:e.targetTouches[0].clientX;e.stopPropagation(),Ne(Math.max(Math.min(ke*((a-n)/t),ke-.1),.001))}}),[ke,Ne]),Be=(0,a.I4)((e=>{e instanceof MouseEvent&&2===e.button||(ie.current=!0,Ue(e))}),[Ue]),Xe=(0,a.I4)((()=>{ie.current=!1}),[]),Ve=(0,a.I4)((()=>{W(n.id,n.chatId)}),[W,n.id,n.chatId]),Ye=(0,a.I4)((()=>{Q({chatId:n.chatId,messageId:n.id})}),[n.chatId,n.id,Q]);(0,a.d4)((()=>{if(oe.current&&Me)return(0,y.sf)(oe.current,{onCapture:Be,onRelease:Xe,onClick:Xe,onDrag:Ue})}),[Me,Be,Ue,Xe]);const _e=(0,a.Ye)((()=>a.ZP.createElement("div",{dangerouslySetInnerHTML:{__html:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 24" class="loading-svg"><rect class="loading-rect" fill="transparent" width="32" height="24" stroke-width="3" stroke-linejoin="round" rx="6" ry="6" stroke="var(--accent-color)" stroke-dashoffset="1" stroke-dasharray="32,68"></rect></svg>'}})),[]);function je(){if(re)return S||"Voice";const{title:e,fileName:t}=ee;return e||t}const Ke=(0,u.Z)("Audio",A,Ie&&L===o.Cr.Inline&&"own",(L===o.Cr.Search||L===o.Cr.SharedMedia)&&"bigger",R&&"audio-is-selected"),ze=["toggle-play"];Ae?ze.push("loading"):ze.push(Ce?"pause":"play");const He=(0,u.Z)("content",Me&&"with-seekline");function Je(){return a.ZP.createElement("div",{className:He},a.ZP.createElement("div",{className:"content-row"},a.ZP.createElement("p",{className:"title",dir:"auto",title:je()},(0,m.Z)(je())),a.ZP.createElement("div",{className:"message-date"},$&&a.ZP.createElement(I.Z,{className:"date",onClick:Ve},(0,l.VX)(se,1e3*$)))),Me&&a.ZP.createElement("div",{className:"meta search-result",dir:le?"rtl":void 0},a.ZP.createElement("span",{className:"duration with-seekline",dir:"auto"},be<1&&`${(0,l.k9)(ke*be,ke)}`),x(be,Pe,oe)),!Me&&function(){if(re)return a.ZP.createElement("div",{className:"meta",dir:le?"rtl":void 0},(0,l.k9)((te||ne).duration));const{performer:e}=ee;return a.ZP.createElement("div",{className:"meta",dir:le?"rtl":void 0},(0,l.k9)(ke),a.ZP.createElement("span",{className:"bullet"},"•"),e&&a.ZP.createElement("span",{className:"performer",title:e},(0,m.Z)(e)),e&&S&&a.ZP.createElement("span",{className:"bullet"},"•"),S&&a.ZP.createElement("span",{title:S},(0,m.Z)(S)))}())}return a.ZP.createElement("div",{className:Ke,dir:se.isRtl?"rtl":"ltr"},F&&a.ZP.createElement("div",{className:"message-select-control"},R&&a.ZP.createElement("i",{className:"icon-select"})),a.ZP.createElement(N.Z,{round:!0,ripple:!s.wB,size:"smaller",color:he?"translucent-white":"primary",className:ze.join(" "),ariaLabel:Ce?"Pause audio":"Play audio",onClick:Fe,isRtl:se.isRtl,backgroundImage:he},a.ZP.createElement("i",{className:"icon-play"}),a.ZP.createElement("i",{className:"icon-pause"})),De&&a.ZP.createElement("div",{className:(0,u.Z)("media-loading",Oe,Ae&&"interactive")},a.ZP.createElement(k.Z,{progress:$e,transparent:!0,size:"m",onClick:Ae?Fe:void 0,noCross:!Ae})),ee&&_&&!xe&&a.ZP.createElement(N.Z,{round:!0,size:"tiny",className:"download-button",ariaLabel:U?"Cancel download":"Download",onClick:Re},a.ZP.createElement("i",{className:U?"icon-close":"icon-arrow-down"})),L===o.Cr.Search&&Je(),L!==o.Cr.Search&&ee&&function(e,t,n,r,i,o,s,c,d,u,v){const{title:p,performer:f,fileName:g}=t,Z=r||i>0&&i<1,{isRtl:P}=w.i0;return a.ZP.createElement("div",{className:"content"},a.ZP.createElement("p",{className:"title",dir:"auto",title:p},(0,m.Z)(p||g)),Z&&a.ZP.createElement("div",{className:"meta",dir:P?"rtl":void 0},a.ZP.createElement("span",{className:"duration with-seekline",dir:"auto"},(0,l.k9)(n*i,n)),x(i,o,s)),!Z&&c&&a.ZP.createElement("div",{className:"meta",dir:P?"rtl":void 0},u?`${(0,h.yW)(t.size*u)} / `:void 0,(0,h.yW)(t.size)),!Z&&!c&&a.ZP.createElement("div",{className:"meta",dir:P?"rtl":void 0},a.ZP.createElement("span",{className:"duration",dir:"auto"},(0,l.k9)(n)),f&&a.ZP.createElement(a.ZP.Fragment,null,a.ZP.createElement("span",{className:"bullet"},"•"),a.ZP.createElement("span",{className:"performer",dir:"auto",title:f},(0,m.Z)(f))),d&&a.ZP.createElement(a.ZP.Fragment,null,a.ZP.createElement("span",{className:"bullet"},"•"),a.ZP.createElement(I.Z,{className:"date",onClick:v},(0,l.ZK)(e,1e3*d,!0)))))}(se,ee,ke,Ce,be,Pe,oe,U||xe,$,$e,W?Ve:void 0),L===o.Cr.SharedMedia&&(te||ne)&&Je(),L===o.Cr.Inline&&te&&function(e,t,n,r,i,o,s,c,d,m,h,v){return a.ZP.createElement("div",{className:"content"},a.ZP.createElement("div",{className:"waveform-wrapper"},a.ZP.createElement("div",{className:"waveform",draggable:!1,ref:t},a.ZP.createElement("canvas",{ref:n})),h&&a.ZP.createElement(N.Z,{onClick:()=>{(c||d)&&v?v(!s):o||h()}},a.ZP.createElement("i",{className:(0,u.Z)("transcribe-icon",c||d?"icon-down":"icon-transcribe",(c||d)&&!s&&"transcribe-shown")}),o&&m)),a.ZP.createElement("p",{className:(0,u.Z)("voice-duration",i&&"unread"),dir:"auto"},0===r?(0,l.k9)(e.duration):(0,l.k9)(e.duration*r)))}(te,oe,Se,be,ae,B,X,V,Y,_e,j?Ye:void 0,K))}))},70180:(e,t,n)=>{n.d(t,{Z:()=>h});var a=n(14050),r=n(33555),i=n(11192),o=n(83158),s=n(32340),l=n(64319),c=n(6272),d=n(59107),u=n(31876),m=n(83321);const h=(0,a.X$)((0,r.c$)(((e,t)=>{let{chatOrUserId:n}=t;const{lastSyncTime:a,countryList:{phoneCodes:r}}=e,s=n?(0,i.Z1)(e,n):void 0,l=(0,o.YC)(n)?(0,i.dy)(e,n):void 0,c=s&&(0,o.i4)(s,(0,i.dZ)(e),(0,i.NJ)(e));return{lastSyncTime:a,phoneCodeList:r,chat:s,user:l,canInviteUsers:s&&!l&&(!(0,o.eA)(s)&&!(0,o.Mg)(s,"inviteUsers")||(0,o.VE)(s,"inviteUsers")),isMuted:c}}))((e=>{let{lastSyncTime:t,user:n,chat:i,forceShowSelf:h,canInviteUsers:v,isMuted:p,phoneCodeList:f}=e;const{loadFullUser:g,showNotification:Z,updateChatMutedState:P}=(0,r.Sv)(),{id:E,fullInfo:y,username:C,phoneNumber:b,isSelf:w}=n||{},{id:N}=i||{},k=(0,d.Z)();(0,a.d4)((()=>{t&&E&&g({userId:E})}),[g,E,t]);const I=(0,a.I4)((()=>{P({chatId:N,isMuted:!p})}),[N,p,P]);if(!i||i.isRestricted||w&&!h)return;function S(e,t){(0,l.TE)(e),Z({message:`${t} was copied`})}const M=b&&(0,c.WZ)(f,b),T=(0,o.hu)(i),x=(null==y?void 0:y.bio)||(0,o.GM)(i);return a.ZP.createElement("div",{className:"ChatExtra"},M&&Boolean(M.length)&&a.ZP.createElement(u.Z,{icon:"phone",multiline:!0,narrow:!0,ripple:!0,onClick:()=>S(M,k("Phone"))},a.ZP.createElement("span",{className:"title",dir:"auto"},M),a.ZP.createElement("span",{className:"subtitle"},k("Phone"))),C&&a.ZP.createElement(u.Z,{icon:"mention",multiline:!0,narrow:!0,ripple:!0,onClick:()=>S(`@${C}`,k("Username"))},a.ZP.createElement("span",{className:"title",dir:"auto"},(0,s.Z)(C)),a.ZP.createElement("span",{className:"subtitle"},k("Username"))),x&&Boolean(x.length)&&a.ZP.createElement(u.Z,{icon:"info",multiline:!0,narrow:!0,isStatic:!0},a.ZP.createElement("span",{className:"title word-break",dir:"auto"},(0,s.Z)(x,["br","links","emoji"])),a.ZP.createElement("span",{className:"subtitle"},k(E?"UserBio":"Info"))),(v||!C)&&T&&a.ZP.createElement(u.Z,{icon:i.username?"mention":"link",multiline:!0,narrow:!0,ripple:!0,onClick:()=>S(T,k("SetUrlPlaceholder"))},a.ZP.createElement("div",{className:"title"},T),a.ZP.createElement("span",{className:"subtitle"},k("SetUrlPlaceholder"))),!h&&a.ZP.createElement(u.Z,{icon:"unmute",ripple:!0,onClick:I},a.ZP.createElement("span",null,k("Notifications")),a.ZP.createElement(m.Z,{id:"group-notifications",label:E?"Toggle User Notifications":"Toggle Chat Notifications",checked:!p,inactive:!0})))})))},40329:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(14050),r=n(33555),i=n(11192),o=n(83158),s=n(59107),l=n(32340),c=n(70172),d=n(13103),u=n(231);const m=(0,a.X$)((0,r.c$)(((e,t)=>{let{chat:n}=t;const a=(0,o.YC)(n.id),r=(0,i.FM)(e,n.id),s=a&&(0,i.dy)(e,(0,o.zX)(n)),l=s&&(0,o.cS)(s)&&!n.isSupport,c=a&&!r&&!l,d=a?(0,o.Vl)((0,i.dy)(e,(0,o.zX)(n))):void 0;return{isPrivateChat:a,isChatWithSelf:r,isBot:l,isChannel:(0,o.eA)(n),isBasicGroup:(0,o.G9)(n),isSuperGroup:(0,o.ZV)(n),currentUserId:e.currentUserId,canDeleteForAll:c,contactName:d,animationLevel:e.settings.byKey.animationLevel}}))((e=>{let{isOpen:t,chat:n,isChannel:i,isPrivateChat:m,isChatWithSelf:h,isBot:v,isBasicGroup:p,isSuperGroup:f,currentUserId:g,canDeleteForAll:Z,contactName:P,animationLevel:E,onClose:y,onCloseAnimationEnd:C}=e;const{leaveChannel:b,deleteHistory:w,deleteChannel:N,deleteChatUser:k,blockContact:I}=(0,r.Sv)(),S=(0,s.Z)(),M=(0,o.U)(S,n),T=(0,a.I4)((()=>{w({chatId:n.id,shouldDeleteForAll:!0}),y()}),[w,n.id,y]),x=(0,a.I4)((()=>{w({chatId:n.id,shouldDeleteForAll:!0}),I({contactId:n.id,accessHash:n.accessHash}),y()}),[w,n.id,n.accessHash,I,y]),L=(0,a.I4)((()=>{m?w({chatId:n.id,shouldDeleteForAll:!1}):p?(k({chatId:n.id,userId:g}),w({chatId:n.id,shouldDeleteForAll:!1})):!i&&!f||n.isCreator?(i||f)&&n.isCreator&&N({chatId:n.id}):b({chatId:n.id}),y()}),[m,p,i,f,g,n.isCreator,n.id,y,w,k,b,N]),$=(0,a.I4)((()=>{i||f?(b({chatId:n.id}),y()):L()}),[n.id,L,i,f,b,y]);return a.ZP.createElement(d.Z,{isOpen:t,className:"DeleteChatModal",header:a.ZP.createElement("div",{className:"modal-header",dir:S.isRtl?"rtl":void 0},a.ZP.createElement(c.Z,{size:"tiny",chat:n,isSavedMessages:h,animationLevel:E,withVideo:!0}),a.ZP.createElement("h3",{className:"modal-title"},S(i&&!n.isCreator?"LeaveChannel":i&&n.isCreator?"ChannelDelete":p||f?"Group.LeaveGroup":"DeleteChatUser"))),onClose:y,onCloseAnimationEnd:C},i&&n.isCreator?a.ZP.createElement("p",null,(0,l.Z)(S("ChatList.DeleteAndLeaveGroupConfirmation",M),["simple_markdown","emoji"])):i&&!n.isCreator||p||f?a.ZP.createElement("p",null,(0,l.Z)(S("ChannelLeaveAlertWithName",M),["simple_markdown","emoji"])):a.ZP.createElement("p",null,(0,l.Z)(S("ChatList.DeleteChatConfirmation",P),["simple_markdown","emoji"])),v&&a.ZP.createElement(u.Z,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:x},S("DeleteAndStop")),Z&&a.ZP.createElement(u.Z,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:T},P?(0,l.Z)(S("ChatList.DeleteForEveryone",P)):S("DeleteForAll")),!m&&n.isCreator&&a.ZP.createElement(u.Z,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:L},S("DeleteForAll")),a.ZP.createElement(u.Z,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:m?L:$},S(i&&!n.isCreator?"LeaveChannel":i&&n.isCreator?"Chat.Input.Delete":p||f?"Group.LeaveGroup":Z?"ChatList.DeleteForCurrentUser":"Delete")),a.ZP.createElement(u.Z,{className:"confirm-dialog-button",isText:!0,onClick:y},S("Cancel")))})))},82535:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(14050),r=n(33555),i=n(15376),o=n(83158),s=n(3657),l=n(92566),c=n(6202),d=n(60706),u=n(47002);const m=(0,a.X$)((e=>{let{message:t,observeIntersection:n,smaller:m,canAutoLoad:h,autoLoadFileMaxSizeMb:v,uploadProgress:p,withDate:f,datetime:g,className:Z,sender:P,isSelected:E,isSelectable:y,onCancelUpload:C,onMediaClick:b,onDateClick:w,isDownloading:N}=e;const k=(0,r.Sv)(),I=(0,a.sO)(null),S=t.content.document,{fileName:M,size:T,timestamp:x}=S,L=(0,i.K2)(S)||"",$=(0,s.Op)(I,n),[D,O]=(0,d.Z)();(0,a.d4)((()=>{$&&O()}),[$,O]);const[A,F]=(0,a.eJ)(h&&(!v||T<=1048576*v)),R=Boolean(N||A&&D),U=(0,o.Ti)(t,"download"),{loadProgress:B,mediaData:X}=(0,l.Z)(U,!R,(0,o.kG)(t,"download"),void 0,void 0,!0),V=Boolean(X),{isUploading:Y,isTransferring:_,transferProgress:j}=(0,o.Sc)(t,p||B,R&&!V),K=(0,i.v6)(S),z=K?(0,o.DH)(t):void 0,H=K?S.previewBlobUrl:void 0,J=(0,c.Z)((0,o.Ti)(t,"pictogram"),!$),W=b&&Boolean(S.mediaType),q=(0,a.I4)((()=>{Y?C&&C():N?k.cancelMessageMediaDownload({message:t}):_?F(!1):W?b():k.downloadMessageMedia({message:t})}),[Y,N,_,W,C,k,t,b]),G=(0,a.I4)((()=>{w(t.id,t.chatId)}),[w,t.id,t.chatId]);return a.ZP.createElement(u.Z,{ref:I,name:M,extension:L,size:T,timestamp:f?g||x:void 0,thumbnailDataUri:z,previewData:H||J,smaller:m,isTransferring:_,isUploading:Y,transferProgress:j,className:Z,sender:P,isSelectable:y,isSelected:E,actionIcon:W?(0,o.hC)(t)?"icon-play":"icon-eye":"icon-download",onClick:q,onDateClick:w?G:void 0})}))},78780:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(14050),r=n(59107),i=n(46752);const o=e=>{let{content:t,className:n}=e;const o=(0,r.Z)();return a.ZP.createElement("span",{className:(0,i.Z)("DotAnimation",n),dir:o.isRtl?"rtl":"auto"},t,a.ZP.createElement("span",{className:"ellipsis"}))}},50685:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(14050),r=n(59107);const i=(0,a.X$)((e=>{let{fakeType:t}=e;const n=(0,r.Z)();return a.ZP.createElement("span",{className:"FakeIcon"},n("fake"===t?"FakeMessage":"ScamMessage"))}))},47002:(e,t,n)=>{n.d(t,{Z:()=>v});var a=n(14050),r=n(31212),i=n(70692),o=n(46752),s=n(790),l=n(15376),c=n(74399),d=n(32340),u=n(59107),m=n(39196),h=n(8337);const v=(0,a.X$)((e=>{let{ref:t,name:n,size:v,extension:p="",timestamp:f,sender:g,thumbnailDataUri:Z,previewData:P,className:E,smaller:y,isTransferring:C,isUploading:b,isSelectable:w,isSelected:N,transferProgress:k,actionIcon:I,onClick:S,onDateClick:M}=e;const T=(0,u.Z)();let x=(0,a.sO)(null);t&&(x=t);const L=(0,i.Z)(P),{shouldRender:$,transitionClassNames:D}=(0,r.Z)(C,void 0,!0),O=(0,l.Oh)(p),A=(0,l.yW)(v),{width:F,height:R}=(0,c.lE)(y),U=(0,o.Z)("File",E,y&&"smaller",S&&!b&&"interactive",N&&"file-is-selected");return a.ZP.createElement("div",{ref:x,className:U,dir:T.isRtl?"rtl":void 0},w&&a.ZP.createElement("div",{className:"message-select-control"},N&&a.ZP.createElement("i",{className:"icon-select"})),a.ZP.createElement("div",{className:"file-icon-container",onClick:b?void 0:S},Z||P?a.ZP.createElement("div",{className:"file-preview media-inner"},a.ZP.createElement("img",{src:Z,width:F,height:R,className:"thumbnail",alt:""}),a.ZP.createElement("img",{src:P,className:(0,o.Z)("full-media",L),width:F,height:R,alt:""})):a.ZP.createElement("div",{className:`file-icon ${O}`},p.length<=4&&a.ZP.createElement("span",{className:"file-ext",dir:"auto"},p)),$&&a.ZP.createElement("div",{className:(0,o.Z)("file-progress",O,D)},a.ZP.createElement(m.Z,{progress:k,size:y?"s":"m",onClick:b?S:void 0})),S&&a.ZP.createElement("i",{className:(0,o.Z)("action-icon",I||"icon-download",$&&"hidden")})),a.ZP.createElement("div",{className:"file-info"},a.ZP.createElement("div",{className:"file-title",dir:"auto"},(0,d.Z)(n)),a.ZP.createElement("div",{className:"file-subtitle",dir:"auto"},a.ZP.createElement("span",null,C&&k?`${Math.round(100*k)}%`:A),g&&a.ZP.createElement("span",{className:"file-sender"},(0,d.Z)(g)),!g&&f&&a.ZP.createElement(a.ZP.Fragment,null,a.ZP.createElement("span",{className:"bullet"}),a.ZP.createElement(h.Z,{onClick:M},(0,s.ZK)(T,1e3*f,!0))))),g&&f&&a.ZP.createElement(h.Z,{onClick:M},(0,s.VX)(T,1e3*f)))}))},98799:(e,t,n)=>{n.d(t,{Z:()=>p});var a=n(14050),r=n(33555),i=n(91713),o=n(83158),s=n(11192),l=n(32340),c=n(59107),d=n(70172),u=n(89411),m=n(68729),h=n(78780),v=n(50685);const p=(0,a.X$)((0,r.c$)(((e,t)=>{let{chatId:n}=t;const{lastSyncTime:a}=e,r=(0,s.Z1)(e,n);return{lastSyncTime:a,chat:r,onlineCount:r?(0,s.YK)(e,r):void 0,areMessagesLoaded:Boolean((0,s.Zw)(e,n)),animationLevel:e.settings.byKey.animationLevel}}))((e=>{let{typingStatus:t,avatarSize:n="medium",status:s,withDots:p,withMediaViewer:f,withUsername:g,withFullInfo:Z,withUpdatingStatus:P,withChatType:E,withVideoAvatar:y,noRtl:C,chat:b,onlineCount:w,areMessagesLoaded:N,animationLevel:k,lastSyncTime:I}=e;const{loadFullChat:S,openMediaViewer:M,loadProfilePhotos:T}=(0,r.Sv)(),x=b&&(0,o.ZV)(b),{id:L,isMin:$,isRestricted:D}=b||{};(0,a.d4)((()=>{L&&!$&&I&&(Z&&S({chatId:L}),f&&T({profileId:L}))}),[L,$,I,Z,S,T,x,f]);const O=(0,a.I4)(((e,t)=>{b&&t&&(e.stopPropagation(),M({avatarOwnerId:b.id,mediaId:0,origin:"jumbo"===n?i.bZ.ProfileAvatar:i.bZ.MiddleHeaderAvatar}))}),[b,n,M]),A=(0,c.Z)();if(b)return a.ZP.createElement("div",{className:"ChatInfo",dir:!C&&A.isRtl?"rtl":void 0},a.ZP.createElement(d.Z,{key:b.id,size:n,chat:b,onClick:f?O:void 0,withVideo:y,animationLevel:k}),a.ZP.createElement("div",{className:"info"},a.ZP.createElement("div",{className:"title"},a.ZP.createElement("h3",{dir:"auto"},(0,l.Z)((0,o.U)(A,b))),b.isVerified&&a.ZP.createElement(u.Z,null),b.fakeType&&a.ZP.createElement(v.Z,{fakeType:b.fakeType})),function(){if(s)return p?a.ZP.createElement(h.Z,{className:"status",content:s}):a.ZP.createElement("span",{className:"status",dir:"auto"},s);if(P&&!N&&!D)return a.ZP.createElement(h.Z,{className:"status",content:A("Updating")});if(!b)return;if(t)return a.ZP.createElement(m.Z,{typingStatus:t});if(E)return a.ZP.createElement("span",{className:"status",dir:"auto"},A((0,o.l6)(b)));const e=g?b.username:void 0,n=function(e,t){const n=e((0,o.l6)(t)),{membersCount:a}=t;return t.isRestricted?"Channel"===n?"channel is inaccessible":"group is inaccessible":a?e("Channel"===n?"Subscribers":"Members",a,"i"):n}(A,b),r=w?`, ${A("OnlineCount",w,"i")}`:void 0;return a.ZP.createElement("span",{className:"status"},e&&a.ZP.createElement("span",{className:"handle"},e),a.ZP.createElement("span",{className:"group-status"},n),r&&a.ZP.createElement("span",{className:"online-status"},r))}()))})))},76844:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(14050),r=n(790),i=n(59107),o=n(8018);const s=(0,a.X$)((e=>{let{message:t,outgoingStatus:n}=e;const s=(0,i.Z)();return a.ZP.createElement("div",{className:"LastMessageMeta"},n&&a.ZP.createElement(o.Z,{status:n}),a.ZP.createElement("span",{className:"time"},(0,r.VX)(s,1e3*t.date)))}))},13709:(e,t,n)=>{n.d(t,{Z:()=>u});var a=n(14050),r=n(790),i=n(3858),o=n(83158),s=n(46752),l=n(6202),c=n(70692),d=n(3657);const u=(0,a.X$)((e=>{let{message:t,idPrefix:n="shared-media",isProtected:u,observeIntersection:m,onClick:h}=e;const v=(0,a.sO)(null),p=(0,d.Op)(v,m),f=(0,o.DH)(t),g=(0,l.Z)((0,o.Ti)(t,"pictogram"),!p),Z=(0,c.Z)(g),P=(0,o.b7)(t),E=(0,a.I4)((()=>{h(t.id,t.chatId)}),[t.id,t.chatId,h]);return a.ZP.createElement("div",{ref:v,id:`${n}${(0,o.d0)(t.id)}`,className:"Media scroll-item",onClick:h?E:void 0},a.ZP.createElement("img",{src:f,alt:"",draggable:!u,decoding:"async",onContextMenu:u?i.Z:void 0}),a.ZP.createElement("img",{src:g,className:(0,s.Z)("full-media",Z),alt:"",draggable:!u,decoding:"async",onContextMenu:u?i.Z:void 0}),P&&a.ZP.createElement("span",{className:"video-duration"},P.isGif?"GIF":(0,r.k9)(P.duration)),u&&a.ZP.createElement("span",{className:"protector"}))}))},8018:(e,t,n)=>{n.d(t,{Z:()=>o});var a,r=n(14050),i=n(2255);!function(e){e[e.failed=0]="failed",e[e.pending=1]="pending",e[e.succeeded=2]="succeeded",e[e.read=3]="read"}(a||(a={}));const o=(0,r.X$)((e=>{let{status:t}=e;return r.ZP.createElement("div",{className:"MessageOutgoingStatus"},r.ZP.createElement(i.Z,{name:"reveal",activeKey:a[t]},r.ZP.createElement("i",{className:`icon-message-${t}`})))}))},47262:(e,t,n)=>{n.d(t,{Z:()=>c});var a=n(14050),r=n(46752),i=n(31212),o=n(32340),s=n(59107);const l="Nothing found.",c=(0,a.X$)((e=>{let{text:t=l,description:n}=e;const c=(0,s.Z)(),{transitionClassNames:d}=(0,i.Z)(!0);return a.ZP.createElement("div",{className:(0,r.Z)("NothingFound",d,n&&"with-description")},t,n&&a.ZP.createElement("p",{className:"description"},(0,o.Z)(c(n),["br"])))}))},99364:(e,t,n)=>{n.d(t,{Z:()=>u});var a=n(14050),r=n(83716),i=n(77361),o=n(46752),s=n(59107),l=n(28183),c=n(231);const d=i.wB?550:400,u=(0,a.X$)((e=>{let{isLoading:t=!1,isPasswordVisible:n,error:u,hint:m,placeholder:h="Password",submitLabel:v="Next",shouldShowSubmit:p,shouldResetValue:f,shouldDisablePasswordManager:g=!1,noRipple:Z=!1,clearError:P,onChangePasswordVisibility:E,onInputChange:y,onSubmit:C}=e;const b=(0,a.sO)(null),w=(0,s.Z)(),[N,k]=(0,a.eJ)(""),[I,S]=(0,a.eJ)(!1);return(0,a.d4)((()=>{f&&k("")}),[f]),(0,l.Z)((()=>{i.$b||b.current.focus()}),d),(0,a.d4)((()=>{u&&requestAnimationFrame((()=>{b.current.focus(),b.current.select()}))}),[u]),a.ZP.createElement("form",{action:"",onSubmit:function(e){e.preventDefault(),t||I&&C(N)},autoComplete:"off"},a.ZP.createElement("div",{className:(0,o.Z)("input-group password-input",N&&"touched",u&&"error"),dir:w.isRtl?"rtl":void 0},g&&a.ZP.createElement("input",{type:"password",id:"prevent_autofill",autoComplete:"off",className:"visually-hidden",tabIndex:-2}),a.ZP.createElement("input",{ref:b,className:"form-control",type:n?"text":"password",id:"sign-in-password",value:N||"",autoComplete:g?"one-time-code":"current-password",onChange:function(e){u&&P();const{target:t}=e;k(t.value),S(t.value.length>=r.lo),y&&y(t.value)},maxLength:256,dir:"auto"}),a.ZP.createElement("label",null,u||m||h),a.ZP.createElement("div",{className:"toggle-password",onClick:function(){E(!n)},role:"button",tabIndex:0,title:"Toggle password visibility"},a.ZP.createElement("i",{className:n?"icon-eye":"icon-eye-closed"}))),(I||p)&&a.ZP.createElement(c.Z,{type:"submit",ripple:!Z,isLoading:t,disabled:!I},v))}))},11820:(e,t,n)=>{n.d(t,{Z:()=>p});var a=n(14050),r=n(83158),i=n(21273),o=n(14605),s=n(97687),l=n(31876),c=n(6058),d=n(98799),u=n(49187),m=n(27407),h=n(59107),v=n(34288);const p=(0,a.X$)((e=>{let{itemIds:t,selectedIds:n,filterValue:p,filterPlaceholder:f,notFoundText:g,searchInputId:Z,isLoading:P,noScrollRestore:E,onSelectedIdsChange:y,onFilterChange:C,onLoadMore:b}=e;const w=(0,a.sO)(null),N=n.length>10;(0,a.d4)((()=>{setTimeout((()=>{requestAnimationFrame((()=>{w.current.focus()}))}),500)}),[]);const k=(0,a.I4)((e=>{const t=[...n];t.includes(e)?t.splice(t.indexOf(e),1):t.push(e),y(t),C("")}),[n,y,C]),I=(0,a.I4)((e=>{const{value:t}=e.currentTarget;C(t)}),[C]),[S,M]=(0,m.Z)(b,t,Boolean(p)),T=(0,h.Z)();return a.ZP.createElement("div",{className:"Picker"},a.ZP.createElement("div",{className:"picker-header custom-scroll",dir:T.isRtl?"rtl":void 0},n.map(((e,t)=>a.ZP.createElement(u.Z,{chatOrUserId:e,isMinimized:N&&t<n.length-5,canClose:!0,onClick:k,clickArg:e}))),a.ZP.createElement(s.Z,{id:Z,ref:w,value:p,onChange:I,placeholder:f||T("SelectChat")})),null!=S&&S.length?a.ZP.createElement(i.Z,{className:"picker-list custom-scroll",items:S,onLoadMore:M,noScrollRestore:E},S.map((e=>a.ZP.createElement(l.Z,{key:e,className:"chat-item-clickable picker-list-item",onClick:()=>k(e),ripple:!0},a.ZP.createElement(o.Z,{label:"",checked:n.includes(e)}),(0,r.YC)(e)?a.ZP.createElement(c.Z,{userId:e}):a.ZP.createElement(d.Z,{chatId:e}))))):P||!S||S.length?a.ZP.createElement(v.Z,null):a.ZP.createElement("p",{className:"no-results"},g||"Sorry, nothing found."))}))},49187:(e,t,n)=>{n.d(t,{Z:()=>u});var a=n(14050),r=n(33555),i=n(11192),o=n(83158),s=n(32340),l=n(46752),c=n(59107),d=n(70172);const u=(0,a.X$)((0,r.c$)(((e,t)=>{let{chatOrUserId:n}=t;return n?{chat:n?(0,i.Z1)(e,n):void 0,user:(0,o.YC)(n)?(0,i.dy)(e,n):void 0}:{}}))((e=>{let{icon:t,title:n,isMinimized:r,canClose:i,onClick:u,clickArg:m,chat:h,user:v,className:p}=e;const f=(0,c.Z)();let g,Z;if(t&&n)g=a.ZP.createElement("div",{className:"item-icon"},a.ZP.createElement("i",{className:`icon-${t}`})),Z=n;else if(h||v){g=a.ZP.createElement(d.Z,{chat:h,user:v,size:"small",isSavedMessages:null==v?void 0:v.isSelf});const e=!h||v&&!v.isSelf?(0,o.Vl)(v):(0,o.U)(f,h,v);Z=e?(0,s.Z)(e):void 0}const P=(0,l.Z)("PickerSelectedItem",p,r&&"minimized",i&&"closeable");return a.ZP.createElement("div",{className:P,onClick:()=>u(m),title:r?Z:void 0,dir:f.isRtl?"rtl":void 0},g,!r&&a.ZP.createElement("div",{className:"item-name",dir:"auto"},Z),i&&a.ZP.createElement("div",{className:"item-remove"},a.ZP.createElement("i",{className:"icon-close"})))})))},4863:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(14050),r=n(26926),i=n(46752);const o={__html:'<svg width="14" height="15" viewBox="0 0 14 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.63869 12.1902L3.50621 14.1092C3.18049 14.3087 2.75468 14.2064 2.55515 13.8807C2.45769 13.7216 2.42864 13.5299 2.47457 13.3491L2.95948 11.4405C3.13452 10.7515 3.60599 10.1756 4.24682 9.86791L7.6642 8.22716C7.82352 8.15067 7.89067 7.95951 7.81418 7.80019C7.75223 7.67116 7.61214 7.59896 7.47111 7.62338L3.66713 8.28194C2.89387 8.41581 2.1009 8.20228 1.49941 7.69823L0.297703 6.69116C0.00493565 6.44581 -0.0335059 6.00958 0.211842 5.71682C0.33117 5.57442 0.502766 5.48602 0.687982 5.47153L4.35956 5.18419C4.61895 5.16389 4.845 4.99974 4.94458 4.75937L6.36101 1.3402C6.5072 0.987302 6.91179 0.819734 7.26469 0.965925C7.43413 1.03612 7.56876 1.17075 7.63896 1.3402L9.05539 4.75937C9.15496 4.99974 9.38101 5.16389 9.6404 5.18419L13.3322 5.47311C13.713 5.50291 13.9975 5.83578 13.9677 6.2166C13.9534 6.39979 13.8667 6.56975 13.7269 6.68896L10.9114 9.08928C10.7131 9.25826 10.6267 9.52425 10.6876 9.77748L11.5532 13.3733C11.6426 13.7447 11.414 14.1182 11.0427 14.2076C10.8642 14.2506 10.676 14.2208 10.5195 14.1249L7.36128 12.1902C7.13956 12.0544 6.8604 12.0544 6.63869 12.1902Z" fill="var(--color-fill)"/></svg>'},s={},l=(0,a.X$)((e=>{let{withGradient:t,big:n,className:l,onClick:c}=e;const d=(0,a.Ye)((()=>t?function(){const e=(0,r.Z)(s);return{__html:`<svg width="14" height="15" viewBox="0 0 14 15" fill="none" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="${e}" x1="3" y1="63.5001" x2="84.1475" y2="-1.32262" gradientUnits="userSpaceOnUse"><stop stop-color="#6B93FF"/><stop offset="0.439058" stop-color="#976FFF"/><stop offset="1" stop-color="#E46ACE"/></linearGradient></defs><path fill-rule="evenodd" clip-rule="evenodd" d="M6.63869 12.1902L3.50621 14.1092C3.18049 14.3087 2.75468 14.2064 2.55515 13.8807C2.45769 13.7216 2.42864 13.5299 2.47457 13.3491L2.95948 11.4405C3.13452 10.7515 3.60599 10.1756 4.24682 9.86791L7.6642 8.22716C7.82352 8.15067 7.89067 7.95951 7.81418 7.80019C7.75223 7.67116 7.61214 7.59896 7.47111 7.62338L3.66713 8.28194C2.89387 8.41581 2.1009 8.20228 1.49941 7.69823L0.297703 6.69116C0.00493565 6.44581 -0.0335059 6.00958 0.211842 5.71682C0.33117 5.57442 0.502766 5.48602 0.687982 5.47153L4.35956 5.18419C4.61895 5.16389 4.845 4.99974 4.94458 4.75937L6.36101 1.3402C6.5072 0.987302 6.91179 0.819734 7.26469 0.965925C7.43413 1.03612 7.56876 1.17075 7.63896 1.3402L9.05539 4.75937C9.15496 4.99974 9.38101 5.16389 9.6404 5.18419L13.3322 5.47311C13.713 5.50291 13.9975 5.83578 13.9677 6.2166C13.9534 6.39979 13.8667 6.56975 13.7269 6.68896L10.9114 9.08928C10.7131 9.25826 10.6267 9.52425 10.6876 9.77748L11.5532 13.3733C11.6426 13.7447 11.414 14.1182 11.0427 14.2076C10.8642 14.2506 10.676 14.2208 10.5195 14.1249L7.36128 12.1902C7.13956 12.0544 6.8604 12.0544 6.63869 12.1902Z" fill="url(#${e})"/></svg>`}}():o),[t]);return a.ZP.createElement("i",{onClick:c,className:(0,i.Z)("PremiumIcon",l,t&&"gradient",c&&"clickable",n&&"big"),dangerouslySetInnerHTML:d,title:"Premium"})}))},6058:(e,t,n)=>{n.d(t,{Z:()=>f});var a=n(14050),r=n(33555),i=n(91713),o=n(11192),s=n(83158),l=n(32340),c=n(59107),d=n(70172),u=n(89411),m=n(68729),h=n(78780),v=n(50685),p=n(4863);const f=(0,a.X$)((0,r.c$)(((e,t)=>{let{userId:n,forceShowSelf:a}=t;const{lastSyncTime:r,serverTimeOffset:i}=e,s=(0,o.dy)(e,n);return{lastSyncTime:r,user:s,userStatus:(0,o.ss)(e,n),isSavedMessages:!a&&s&&s.isSelf,areMessagesLoaded:Boolean((0,o.Zw)(e,n)),serverTimeOffset:i,animationLevel:e.settings.byKey.animationLevel}}))((e=>{let{typingStatus:t,avatarSize:n="medium",status:o,withDots:f,withMediaViewer:g,withUsername:Z,withFullInfo:P,withUpdatingStatus:E,withVideoAvatar:y,noStatusOrTyping:C,noRtl:b,user:w,userStatus:N,isSavedMessages:k,areMessagesLoaded:I,animationLevel:S,lastSyncTime:M,serverTimeOffset:T}=e;const{loadFullUser:x,openMediaViewer:L,loadProfilePhotos:$}=(0,r.Sv)(),{id:D}=w||{},O=(0,s.Js)(w);(0,a.d4)((()=>{D&&M&&(P&&x({userId:D}),g&&$({profileId:D}))}),[D,x,$,M,P,g]);const A=(0,a.I4)(((e,t)=>{w&&t&&(e.stopPropagation(),L({avatarOwnerId:w.id,mediaId:0,origin:"jumbo"===n?i.bZ.ProfileAvatar:i.bZ.MiddleHeaderAvatar}))}),[w,n,L]),F=(0,c.Z)();if(w)return a.ZP.createElement("div",{className:"ChatInfo",dir:!b&&F.isRtl?"rtl":void 0},a.ZP.createElement(d.Z,{key:w.id,size:n,user:w,isSavedMessages:k,onClick:g?A:void 0,withVideo:y,animationLevel:S}),a.ZP.createElement("div",{className:"info"},k?a.ZP.createElement("div",{className:"title"},a.ZP.createElement("h3",null,F("SavedMessages"))):a.ZP.createElement("div",{className:"title"},a.ZP.createElement("h3",{dir:"auto"},O&&(0,l.Z)(O)),(null==w?void 0:w.isVerified)&&a.ZP.createElement(u.Z,null),w.isPremium&&a.ZP.createElement(p.Z,null),w.fakeType&&a.ZP.createElement(v.Z,{fakeType:w.fakeType})),(o||!k&&!C)&&(o?f?a.ZP.createElement(h.Z,{className:"status",content:o}):a.ZP.createElement("span",{className:"status",dir:"auto"},o):E&&!I?a.ZP.createElement(h.Z,{className:"status",content:F("Updating")}):w?t?a.ZP.createElement(m.Z,{typingStatus:t}):a.ZP.createElement("span",{className:"status "+((0,s.kM)(w,N)?"online":"")},Z&&w.username&&a.ZP.createElement("span",{className:"handle"},w.username),a.ZP.createElement("span",{className:"user-status",dir:"auto"},(0,s.Tq)(F,w,N,T))):void 0)))})))},20787:(e,t,n)=>{n.d(t,{Z:()=>k});var a=n(14050),r=n(33555),i=n(91713),o=n(77361),s=n(70735),l=n(11192),c=n(83158),d=n(32340),u=n(64963),m=n(46752),h=n(6137),v=n(40647),p=n(59107),f=n(87204),g=n(89411),Z=n(74753),P=n(2155),E=n(6202),y=n(49204);const C=(0,a.X$)((e=>{var t;let{chat:n,user:r,photo:i,isFirstPhoto:o,isSavedMessages:s,notActive:l,lastSyncTime:u,onClick:v}=e;const f=(0,a.sO)(null),g=(0,p.Z)(),C=r&&(0,c.NB)(r),b=n&&(0,c.pK)(n.id);function w(e){var t;let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"photo";const l=r||n,d=i||(null==l||null===(t=l.fullInfo)||void 0===t?void 0:t.profilePhoto),u=null==d?void 0:d.isVideo,m=o;if("video"!==a||u){if(i&&!m){if(u&&"video"===a)return(0,c.Dk)(i);if("photo"===a)return`photo${i.id}?size=c`}return s||C||b||!l?void 0:(0,c.RT)(l,e,a)}}(0,a.d4)((()=>{f.current&&(l?(f.current.pause(),f.current.currentTime=0):(0,Z.Z)(f.current))}),[l]);const N=w("big","photo"),k=(0,E.Z)(N,!1,h.IU.BlobUrl,u),I=w("normal","video"),S=(0,E.Z)(I,!1,h.IU.BlobUrl,u),M=S||k||(null==i||null===(t=i.thumbnail)||void 0===t?void 0:t.dataUri);let T;if(s)T=a.ZP.createElement("i",{className:"icon-avatar-saved-messages"});else if(C)T=a.ZP.createElement("i",{className:"icon-avatar-deleted-account"});else if(b)T=a.ZP.createElement("i",{className:"icon-reply-filled"});else if(M)T=S?a.ZP.createElement("video",{ref:f,src:M,className:"avatar-media",muted:!0,disablePictureInPicture:!0,autoPlay:!l,loop:!0,playsInline:!0}):a.ZP.createElement("img",{src:M,className:"avatar-media",alt:""});else if(r){const e=(0,c.Js)(r);T=e?(0,P.Xv)(e,2):void 0}else if(n){const e=(0,c.U)(g,n);T=e&&(0,P.Xv)(e,(0,c.YC)(n.id)?2:1)}else T=a.ZP.createElement("div",{className:"spinner-wrapper"},a.ZP.createElement(y.Z,{color:"white"}));const x=(0,m.Z)("ProfilePhoto",`color-bg-${(0,c.Rs)(r||n)}`,s&&"saved-messages",C&&"deleted-account",b&&"replies-bot-account",!s&&!M&&"no-photo");return a.ZP.createElement("div",{className:x,onClick:M?v:void 0},"string"==typeof T?(0,d.Z)(T,["hq_emoji"]):T)}));var b=n(2255),w=n(50685),N=n(4863);const k=(0,a.X$)((0,r.c$)(((e,t)=>{let{userId:n,forceShowSelf:a}=t;const{connectionState:r,serverTimeOffset:i}=e,o=(0,l.dy)(e,n),s=(0,l.ss)(e,n),c=(0,l.Z1)(e,n),d=!a&&o&&o.isSelf,{animationLevel:u}=e.settings.byKey,{mediaId:m,avatarOwnerId:h}=e.mediaViewer;return{connectionState:r,user:o,userStatus:s,chat:c,isSavedMessages:d,animationLevel:u,serverTimeOffset:i,mediaId:m,avatarOwnerId:h}}))((e=>{var t,n;let{forceShowSelf:l,user:Z,userStatus:P,chat:E,isSavedMessages:y,connectionState:k,animationLevel:I,serverTimeOffset:S,mediaId:M,avatarOwnerId:T}=e;const{loadFullUser:x,openMediaViewer:L,openPremiumModal:$}=(0,r.Sv)(),D=(0,p.Z)(),{id:O}=Z||{},{id:A}=E||{},F=Z?(0,c.Js)(Z):E?E.title:"",R=(null==Z?void 0:Z.photos)||(null==E?void 0:E.photos)||s.D,U=(0,f.Z)(M),B=(0,f.Z)(T),[X,V]=(0,a.eJ)(!0),Y=X&&I>=1?D.isRtl?"slide-optimized-rtl":"slide-optimized":"none",[_,j]=(0,a.eJ)(0),K=y||R.length<=1||0===_,z=y||R.length<=1||_===R.length-1;(0,a.d4)((()=>{B&&void 0!==U&&void 0===M&&(V(!1),j(U))}),[M,U,B]),(0,a.d4)((()=>{_>R.length&&j(Math.max(0,R.length-1))}),[_,R.length]),(0,a.d4)((()=>{"connectionStateReady"===k&&O&&!l&&x({userId:O})}),[O,x,k,l]),function(e,t,n){(0,a.d4)((()=>{t.slice(n,n+4).forEach((e=>{v.UV(`photo${e.id}?size=c`)||v.he(`photo${e.id}?size=c`,h.IU.BlobUrl)}))}),[n,t])}(0,R,_);const H=(0,a.I4)((()=>{L({avatarOwnerId:O||A,mediaId:_,origin:l?i.bZ.SettingsAvatar:i.bZ.ProfileAvatar})}),[L,O,A,_,l]),J=(0,a.I4)((()=>{Z&&$({fromUserId:Z.id})}),[$,Z]),W=(0,a.I4)((()=>{K||(V(!0),j(_-1))}),[_,K]),q=(0,a.I4)((()=>{z||(V(!0),j(_+1))}),[_,z]);if((0,a.d4)((()=>{const e=document.querySelector(".photo-wrapper");if(e)return(0,u.sf)(e,{selectorToPreventScroll:".Profile, .settings-content",onSwipe:o.$b?(e,t)=>t===u.eM.Right?(W(),!0):t===u.eM.Left&&(q(),!0):void 0})}),[q,W]),!Z&&!E)return;function G(e){const t=!y&&R.length>0?R[_]:void 0;return a.ZP.createElement(C,{key:_,user:Z,chat:E,photo:t,isSavedMessages:y,isFirstPhoto:K,notActive:!e,onClick:H})}const Q=null===(t=Z||E)||void 0===t?void 0:t.isVerified,ee=null==Z?void 0:Z.isPremium,te=null===(n=Z||E)||void 0===n?void 0:n.fakeType;return a.ZP.createElement("div",{className:(0,m.Z)("ProfileInfo",l&&"self"),dir:D.isRtl?"rtl":void 0},a.ZP.createElement("div",{className:"photo-wrapper"},function(){if(!(y||!R||R.length<=1))return a.ZP.createElement("div",{className:"photo-dashes"},R.map(((e,t)=>a.ZP.createElement("span",{className:"photo-dash "+(t===_?"current":"")}))))}(),a.ZP.createElement(b.Z,{activeKey:_,name:Y,className:"profile-slide-container"},G),!K&&a.ZP.createElement("button",{type:"button",className:"navigation prev","aria-label":D("AccDescrPrevious"),onClick:W}),!z&&a.ZP.createElement("button",{type:"button",className:"navigation next","aria-label":D("Next"),onClick:q})),a.ZP.createElement("div",{className:"info",dir:D.isRtl?"rtl":"auto"},y?a.ZP.createElement("div",{className:"title"},a.ZP.createElement("div",{className:"fullName",dir:"auto"},D("SavedMessages"))):a.ZP.createElement("div",{className:"title"},a.ZP.createElement("div",{className:"fullName",dir:"auto"},F&&(0,d.Z)(F)),Q&&a.ZP.createElement(g.Z,null),ee&&a.ZP.createElement(N.Z,{onClick:J}),te&&a.ZP.createElement(w.Z,{fakeType:te})),!y&&(Z?a.ZP.createElement("div",{className:"status "+((0,c.kM)(Z,P)?"online":"")},a.ZP.createElement("span",{className:"user-status",dir:"auto"},(0,c.Tq)(D,Z,P,S))):a.ZP.createElement("span",{className:"status",dir:"auto"},(0,c.eA)(E)?D("Subscribers",null!==(ne=E.membersCount)&&void 0!==ne?ne:0,"i"):D("Members",null!==(ae=E.membersCount)&&void 0!==ae?ae:0,"i")))));var ne,ae})))},48198:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(14050),r=n(33555),i=n(6137),o=n(6202),s=n(46752);const l=(0,a.X$)((e=>{var t,n,l;let{reaction:c,ref:d,className:u}=e;const m=null===(t=(0,r.Rd)().availableReactions)||void 0===t||null===(n=t.find((e=>e.reaction===c)))||void 0===n||null===(l=n.staticIcon)||void 0===l?void 0:l.id,h=(0,o.Z)(`document${m}`,!m,i.IU.BlobUrl);return a.ZP.createElement("img",{className:(0,s.Z)("ReactionStaticEmoji",u),ref:d,src:h,alt:""})}))},66534:(e,t,n)=>{n.d(t,{Z:()=>d});var a=n(14050),r=n(33555),i=n(59107),o=n(13103),s=n(231),l=n(14434),c=n(97687);const d=(0,a.X$)((e=>{let{isOpen:t,subject:n="messages",chatId:d,photo:u,messageIds:m,onClose:h,onCloseAnimationEnd:v}=e;const{reportMessages:p,reportPeer:f,reportProfilePhoto:g,exitMessageSelectMode:Z}=(0,r.Sv)(),[P,E]=(0,a.eJ)("spam"),[y,C]=(0,a.eJ)(""),b=(0,a.I4)((()=>{switch(n){case"messages":p({messageIds:m,reason:P,description:y}),Z();break;case"peer":f({chatId:d,reason:P,description:y});break;case"media":g({chatId:d,photo:u,reason:P,description:y})}h()}),[y,Z,m,u,h,p,P,d,g,f,n]),w=(0,a.I4)((e=>{E(e)}),[]),N=(0,a.I4)((e=>{C(e.target.value)}),[]),k=(0,i.Z)(),I=(0,a.Ye)((()=>[{value:"spam",label:k("lng_report_reason_spam")},{value:"violence",label:k("lng_report_reason_violence")},{value:"pornography",label:k("lng_report_reason_pornography")},{value:"childAbuse",label:k("lng_report_reason_child_abuse")},{value:"copyright",label:k("ReportPeer.ReasonCopyright")},{value:"illegalDrugs",label:"Illegal Drugs"},{value:"personalDetails",label:"Personal Details"},{value:"other",label:k("lng_report_reason_other")}]),[k]);if("messages"===n&&!m||"peer"===n&&!d||"media"===n&&(!d||!u))return;const S=k("messages"===n?"lng_report_message_title":"ReportPeer.Report");return a.ZP.createElement(o.Z,{isOpen:t,onClose:h,onEnter:t?b:void 0,onCloseAnimationEnd:v,className:"report",title:S},a.ZP.createElement(l.Z,{name:"report-message",options:I,onChange:w,selected:P}),a.ZP.createElement(c.Z,{label:k("lng_report_reason_description"),value:y,onChange:N}),a.ZP.createElement(s.Z,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:b},k("lng_report_button")),a.ZP.createElement(s.Z,{className:"confirm-dialog-button",isText:!0,onClick:h},k("Cancel")))}))},73547:(e,t,n)=>{n.d(t,{Z:()=>C});var a=n(14050),r=n(33555),i=n(6137),o=n(46752),s=n(30386),l=n(74753),c=n(77361),d=n(3657),u=n(6202),m=n(31212),h=n(60706),v=n(59107),p=n(17240),f=n(63394),g=n(2903),Z=n(97799),P=n(231),E=n(52328),y=n(58964);const C=(0,a.X$)((e=>{let{sticker:t,size:n,noAnimate:C,title:b,className:w,clickArg:N,noContextMenu:k,isSavedMessages:I,canViewSet:S,observeIntersection:M,onClick:T,onFaveClick:x,onUnfaveClick:L,onRemoveRecentClick:$,isCurrentUserPremium:D}=e;const{openStickerSet:O,openPremiumModal:A}=(0,r.Sv)(),F=(0,a.sO)(null),R=(0,v.Z)(),U=`sticker${t.id}`,B=`sticker-button-${t.id}`,X=(0,d.Op)(F,M),V=(0,g.Z)(t),Y=(0,u.Z)(`${U}?size=m`,!X,i.IU.BlobUrl),_=X&&!C,j=(0,u.Z)(t.isLottie&&U,!_),[K,z,H]=(0,h.Z)(Boolean(j)),J=K&&_,W=t.isVideo&&c.Hh,q=t.isCustomEmoji,G=(0,u.Z)(W&&U,!_,i.IU.BlobUrl),Q=Boolean(W&&G&&_),ee=t.hasEffect,te=!D&&ee,{transitionClassNames:ne}=(0,m.Z)(Boolean(Y||J),void 0,void 0,"slow"),{isContextMenuOpen:ae,contextMenuPosition:re,handleBeforeContextMenu:ie,handleContextMenu:oe,handleContextMenuClose:se,handleContextMenuHide:le}=(0,p.Z)(F),ce=(0,a.I4)((()=>F.current),[]),de=(0,a.I4)((()=>F.current.closest(".custom-scroll, .no-scrollbar")),[]),ue=(0,a.I4)((()=>F.current.querySelector(".sticker-context-menu .bubble")),[]),{positionX:me,positionY:he,transformOriginX:ve,transformOriginY:pe,style:fe}=(0,f.Z)(re,ce,de,ue);(0,a.d4)((()=>{_||H()}),[H,_]),(0,a.d4)((()=>{if(!W||!F.current)return;const e=F.current.querySelector("video");e&&(Q?(0,l.Z)(e):e.pause())}),[W,Q]),(0,a.d4)((()=>{X||se()}),[se,X]);const ge=(0,a.I4)((e=>{e.stopPropagation(),e.preventDefault(),$(t)}),[$,t]),Ze=(0,a.I4)((()=>{$(t)}),[$,t]),Pe=(0,a.I4)((()=>{L(t)}),[L,t]),Ee=(0,a.I4)((()=>{x(t)}),[x,t]),ye=(0,a.I4)((()=>{null==T||T(N,!0)}),[N,T]),Ce=(0,a.I4)((()=>{null==T||T(N,void 0,!0)}),[N,T]),be=(0,a.I4)((()=>{O({stickerSetInfo:t.stickerSetInfo})}),[O,t]),we=!c.$b&&$,Ne=(0,o.Z)("StickerButton",T&&"interactive",q&&"custom-emoji",B,w),ke=!V||J||Q?"":`background-image: url('${V}');`,Ie=(0,a.Ye)((()=>{const e=[];return k||q||(L&&e.push(a.ZP.createElement(y.Z,{icon:"favorite",onClick:Pe},R("Stickers.RemoveFromFavorites"))),x&&e.push(a.ZP.createElement(y.Z,{icon:"favorite",onClick:Ee},R("Stickers.AddToFavorites"))),!te&&T&&(I||e.push(a.ZP.createElement(y.Z,{onClick:ye,icon:"muted"},R("SendWithoutSound"))),e.push(a.ZP.createElement(y.Z,{onClick:Ce,icon:"calendar"},R(I?"SetReminder":"ScheduleMessage")))),S&&e.push(a.ZP.createElement(y.Z,{onClick:be,icon:"stickers"},R("ViewPackPreview"))),$&&e.push(a.ZP.createElement(y.Z,{icon:"delete",onClick:Ze},R("DeleteFromRecent")))),e}),[S,Ee,Ze,Pe,be,ye,Ce,te,I,R,x,$,L,T,k,q]);return a.ZP.createElement("div",{ref:F,className:Ne,title:b||(null==t?void 0:t.emoji),style:ke,"data-sticker-id":t.id,onMouseDown:e=>{(0,s.b)(e),ie(e)},onClick:()=>{ae||(te?A({initialSection:"premium_stickers"}):null==T||T(N))},onContextMenu:oe},!J&&!Q&&a.ZP.createElement("img",{src:Y,className:ne}),W&&a.ZP.createElement("video",{className:ne,src:G,autoPlay:Q,loop:!0,playsInline:!0,disablePictureInPicture:!0,muted:!0}),_&&j&&a.ZP.createElement(Z.Z,{tgsUrl:j,play:!0,size:n,isLowPriority:!0,onLoad:z}),te&&a.ZP.createElement("div",{className:"sticker-locked"},a.ZP.createElement("i",{className:"icon-lock-badge"})),ee&&!te&&a.ZP.createElement("div",{className:"sticker-premium"},a.ZP.createElement("i",{className:"icon-premium"})),we&&a.ZP.createElement(P.Z,{className:"sticker-remove-button",color:"dark",round:!0,onClick:ge},a.ZP.createElement("i",{className:"icon-close"})),Boolean(Ie.length)&&void 0!==re&&a.ZP.createElement(E.Z,{isOpen:ae,transformOriginX:ve,transformOriginY:pe,positionX:me,positionY:he,style:fe,className:"sticker-context-menu",autoClose:!0,onClose:se,onCloseAnimationEnd:le},Ie))}))},68729:(e,t,n)=>{n.d(t,{Z:()=>d});var a=n(14050),r=n(33555),i=n(11192),o=n(83158),s=n(32340),l=n(59107),c=n(78780);const d=(0,a.X$)((0,r.c$)(((e,t)=>{let{typingStatus:n}=t;return n.userId?{typingUser:(0,i.dy)(e,n.userId)}:{}}))((e=>{let{typingStatus:t,typingUser:n}=e;const r=(0,l.Z)(),i=n&&!n.isSelf&&(0,o.Vl)(n),d=r(t.action).replace("{user}","").replace("{emoji}",t.emoji).trim();return a.ZP.createElement("p",{className:"typing-status",dir:r.isRtl?"rtl":"auto"},i&&a.ZP.createElement("span",{className:"sender-name",dir:"auto"},(0,s.Z)(i)),a.ZP.createElement(c.Z,{content:d}))})))},89411:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(14050);const r={__html:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12.3 2.9c.1.1.2.1.3.2.7.6 1.3 1.1 2 1.7.3.2.6.4.9.4.9.1 1.7.2 2.6.2.5 0 .6.1.7.7.1.9.1 1.8.2 2.6 0 .4.2.7.4 1 .6.7 1.1 1.3 1.7 2 .3.4.3.5 0 .8-.5.6-1.1 1.3-1.6 1.9-.3.3-.5.7-.5 1.2-.1.8-.2 1.7-.2 2.5 0 .4-.2.5-.6.6-.8 0-1.6.1-2.5.2-.5 0-1 .2-1.4.5-.6.5-1.3 1.1-1.9 1.6-.3.3-.5.3-.8 0-.7-.6-1.4-1.2-2-1.8-.3-.2-.6-.4-.9-.4-.9-.1-1.8-.2-2.7-.2-.4 0-.5-.2-.6-.5 0-.9-.1-1.7-.2-2.6 0-.4-.2-.8-.4-1.1-.6-.6-1.1-1.3-1.6-2-.4-.4-.3-.5 0-1 .6-.6 1.1-1.3 1.7-1.9.3-.3.4-.6.4-1 0-.8.1-1.6.2-2.5 0-.5.1-.6.6-.6.9-.1 1.7-.1 2.6-.2.4 0 .7-.2 1-.4.7-.6 1.4-1.2 2.1-1.7.1-.2.3-.3.5-.2z" style="fill: var(--color-fill)"/><path class="lol" d="M16.4 10.1l-.2.2-5.4 5.4c-.1.1-.2.2-.4 0l-2.6-2.6c-.2-.2-.1-.3 0-.4.2-.2.5-.6.7-.6.3 0 .5.4.7.6l1.1 1.1c.2.2.3.2.5 0l4.3-4.3c.2-.2.4-.3.6 0 .1.2.3.3.4.5.2 0 .3.1.3.1z" style="fill: var(--color-checkmark)"/></svg>'},i=()=>a.ZP.createElement("span",{className:"VerifiedIcon",dangerouslySetInnerHTML:r})},45418:(e,t,n)=>{n.d(t,{Z:()=>v});var a=n(14050),r=n(83158),i=n(46752),o=n(48035),s=n(32340),l=n(790),c=n(59107),d=n(996),u=n(13709),m=n(8337),h=n(10088);const v=(0,a.X$)((e=>{let{message:t,senderTitle:n,isProtected:v,observeIntersection:p,onMessageClick:f}=e;const g=(0,c.Z)();let Z=(0,r.s1)(t);if(!Z){const e=(0,r.T7)(t);if(e){const{url:n,domain:a}=e;Z={siteName:a.replace(/^www./,""),url:n.includes("://")?n:n.includes("@")?`mailto:${n}`:`http://${n}`,formattedDescription:(0,r.UD)(t)!==n?(0,d.e)(g,t,void 0,void 0,170):void 0}}}const P=(0,a.I4)((()=>{f(t.id,t.chatId)}),[f,t.id,t.chatId]);if(!Z)return;const{siteName:E,url:y,displayUrl:C,title:b,description:w,formattedDescription:N,photo:k,video:I}=Z,S=!n&&w&&(0,o.Z)(w,170),M=(0,i.Z)("WebLink scroll-item",!k&&!I&&"without-media");return a.ZP.createElement("div",{className:M,"data-initial":(E||C)[0],dir:g.isRtl?"rtl":void 0},k&&a.ZP.createElement(u.Z,{message:t,isProtected:v,observeIntersection:p}),a.ZP.createElement("div",{className:"content"},a.ZP.createElement(m.Z,{isRtl:g.isRtl,className:"site-title",onClick:P},(0,s.Z)(b||E||C)),(S||N)&&a.ZP.createElement(m.Z,{isRtl:g.isRtl,className:"site-description",onClick:P},N||S&&(0,s.Z)(S)),a.ZP.createElement(h.Z,{url:y,className:"site-name",text:"",isRtl:g.isRtl},y.replace("mailto:","")||C),n&&a.ZP.createElement("div",{className:"sender-name"},(0,s.Z)(n))),n&&a.ZP.createElement("div",{className:"message-date"},a.ZP.createElement(m.Z,{className:"date",onClick:P,isRtl:g.isRtl},(0,l.VX)(g,1e3*t.date))))}))},74399:(e,t,n)=>{n.d(t,{Eh:()=>E,Fp:()=>u,GC:()=>y,Gw:()=>l,L6:()=>s,PA:()=>N,Rj:()=>c,W7:()=>C,Wr:()=>w,fM:()=>P,jg:()=>k,kc:()=>g,lE:()=>b,vY:()=>d,wB:()=>m});var a=n(83716),r=n(77361),i=n(43858),o=n(83158);const s="(max-height: 640px)",l=parseInt(getComputedStyle(document.documentElement).fontSize,10),c=240,d={width:640,height:640},u={width:800,height:800},m="4986041492570112461",h={width:100,height:100};let v,p,f;function g(e,t,n,a){const o=t||n?1.625:0,s=function(e,t){const n=e?30:29;if(!r.wB)return n;const{width:a}=i.Z.get();return v||(v=Math.min(30,a/l-4.5)),p||(p=Math.min(29,a/l-7)),f||(f=Math.min(29,a/l-4.5)),e?v:t?f:p}(e,a)-o;return s*l}function Z(e){let{width:t,height:n,fromOwnMessage:a,isForwarded:r,isWebPagePhoto:i,isGif:o,noAvatars:s}=e;const c=n/t,d=g(a,r,i,s),u=function(e,t){return e&&t&&t>=.75&&t<=1.25?20*l:27*l}(o,c),m=o?Math.max(300,t):t;return k(d,u,m,o?n*(m/t):n)}function P(e,t){const n=window.matchMedia(s),{width:a,height:o}=i.Z.get();let c=t&&n.matches?10:8.25;return e&&!r.$b&&(c=n.matches?10:12.5),{width:a,height:o-c*l}}function E(e,t,n,a,r){const{width:i,height:s}=(0,o.HV)(e)||h;return Z({width:i,height:s,fromOwnMessage:t,isForwarded:n,isWebPagePhoto:a,noAvatars:r})}function y(e,t,n,a){const{width:r,height:i}=(0,o.jC)(e)||h;return Z({width:r,height:i,fromOwnMessage:t,isForwarded:n,isGif:e.isGif,noAvatars:a})}function C(){return{width:2*l,height:2*l}}function b(e){return e?{width:3*l,height:3*l}:{width:3.375*l,height:3.375*l}}function w(e){const{width:t}=e;let{height:n}=e;e.id===m&&(n=t);const i=n&&t&&n/t,o=l*(r.wB?a.w7:a.K7),s=i?o*i:o;return i&&s>o?{width:Math.round(o/i),height:o}:{width:o,height:s}}function N(e,t){let{width:n,height:a}=e,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const{width:i,height:o}=P(t,r);return k(i,o,n,a)}function k(e,t,n,a){const r=a/n,i=Math.min(n,e);return Math.round(i*r)>t?{width:Math.round(t/r),height:t}:{width:i,height:Math.round(i*r)}}},50742:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(14050),r=n(99203),i=n(48778);const o=(0,a.X$)((e=>{const{isOpen:t}=e,n=(0,i.Z)(r.gl.Extra,"ChatFolderModal",!t);return n?a.ZP.createElement(n,e):void 0}))},1080:(e,t,n)=>{n.d(t,{Z:()=>W});var a=n(14050),r=n(33555),i=n(83716),o=n(77361),s=n(60782),l=n(16974),c=n(87204),d=n(27407),u=n(95616);let m;!function(e){e[e.Move=0]="Move",e[e.Opacity=1]="Opacity",e[e.None=2]="None"}(m||(m={}));var h=n(3657),v=n(73541),p=n(67360),f=n(21273),g=n(34288),Z=n(6137),P=n(83158),E=n(11192),y=n(18005),C=n(32340),b=n(69118),w=n(46752),N=n(996),k=n(75790),I=n(41470),S=n(60706),M=n(6202),T=n(59107),x=n(70172),L=n(89411),$=n(68729),D=n(76844),O=n(40329),A=n(31876),F=n(2155),R=n(40126);const U=(0,a.X$)((e=>{let{chat:t,isPinned:n,isMuted:r}=e;const i=Boolean(t.unreadCount||t.unreadMentionsCount||t.hasUnreadMark||n||t.unreadReactionsCount),o=Boolean(t.unreadCount||t.hasUnreadMark),s=(0,w.Z)("Badge",r&&"muted",!o&&n&&"pinned",o&&"unread");return a.ZP.createElement(R.Z,{isCustom:!0,className:"Badge-transition",isOpen:i},function(){const e=t.unreadReactionsCount&&a.ZP.createElement("div",{className:(0,w.Z)("Badge reaction",r&&"muted")},a.ZP.createElement("i",{className:"icon-heart"})),i=t.unreadMentionsCount&&a.ZP.createElement("div",{className:"Badge mention"},a.ZP.createElement("i",{className:"icon-mention"})),o=t.hasUnreadMark||t.unreadCount?a.ZP.createElement("div",{className:s},!t.hasUnreadMark&&(0,F.bi)(t.unreadCount)):void 0,l=[e,i,o,n&&!o&&!i&&!e&&a.ZP.createElement("div",{className:s},a.ZP.createElement("i",{className:"icon-pinned-chat"}))].filter(Boolean);if(0!==l.length)return 1===l.length?l[0]:a.ZP.createElement("div",{className:"Badge-wrapper"},l)}())}));var B=n(50742);const X=(0,a.X$)((e=>{let{isSelected:t,isActive:n}=e;return a.ZP.createElement("div",{className:(0,w.Z)("ChatCallStatus",n&&"active",t&&!o.wB&&"selected")},a.ZP.createElement("div",{className:"indicator"},a.ZP.createElement("div",null),a.ZP.createElement("div",null),a.ZP.createElement("div",null)))}));var V=n(66534),Y=n(50685),_=n(4863);const j=(0,a.X$)((0,r.c$)(((e,t)=>{var n;let{chatId:a}=t;const r=(0,E.Z1)(e,a);if(!r)return{};const{senderId:i,replyToMessageId:o,isOutgoing:s}=r.lastMessage||{},l=i?(0,E.dy)(e,i):void 0,c=r.lastMessage?(0,P.N5)(r.lastMessage):void 0,d=c&&o?(0,E.hj)(e,r.id,o):void 0,{targetUserIds:u,targetChatId:m}=c||{},h=(0,P.zX)(r),{chatId:v,threadId:p,type:f}=(0,E.Bt)(e)||{},g=a===v&&p===Z._f;return{chat:r,isMuted:(0,P.i4)(r,(0,E.dZ)(e),(0,E.NJ)(e)),lastMessageSender:l,actionTargetUserIds:u,actionTargetChatId:m,actionTargetMessage:d,draft:(0,E.Ms)(e,a,Z._f),animationLevel:e.settings.byKey.animationLevel,isSelected:g,canScrollDown:g&&"thread"===f,canChangeFolder:((null===(n=e.chatFolders.orderedIds)||void 0===n?void 0:n.length)||0)>1,lastSyncTime:e.lastSyncTime,...s&&r.lastMessage&&{lastMessageOutgoingStatus:(0,E.dT)(e,r.lastMessage)},...h&&{user:(0,E.dy)(e,h),userStatus:(0,E.ss)(e,h)}}}))((e=>{let{style:t,chatId:n,folderId:s,orderDiff:l,animationType:c,isPinned:d,observeIntersection:u,chat:h,isMuted:v,user:p,userStatus:f,actionTargetUserIds:g,lastMessageSender:Z,lastMessageOutgoingStatus:E,actionTargetMessage:F,actionTargetChatId:R,draft:j,animationLevel:K,isSelected:z,canScrollDown:H,canChangeFolder:J,lastSyncTime:W,onDragEnter:q}=e;const{openChat:G,focusLastMessage:Q}=(0,r.Sv)(),ee=(0,a.sO)(null),[te,ne,ae]=(0,S.Z)(),[re,ie,oe]=(0,S.Z)(),[se,le,ce]=(0,S.Z)(),[de,ue,me]=(0,S.Z)(),[he,ve,pe]=(0,S.Z)(),[fe,ge,Ze]=(0,S.Z)(),{lastMessage:Pe,typingStatus:Ee}=h||{},ye=Pe&&(0,P.Lo)(Pe);(0,k.Z)(n,ye?Pe.replyToMessageId:void 0,F);const Ce=Pe&&!(0,P.bf)(Pe)?(0,P.DH)(Pe):void 0,be=(0,M.Z)(Pe?(0,P.Ti)(Pe,"micro"):void 0),we=Boolean(Pe&&(0,P.Y5)(Pe)),Ne=(0,a.Ye)((()=>{if(!g)return;const e=(0,r.Rd)().users.byId;return g.map((t=>e[t])).filter(Boolean)}),[g]);(0,a.bt)((()=>{const e=ee.current;if(0!==K&&e){if(c===m.Opacity)e.style.opacity="0",(0,b.T2)((()=>{e.classList.add("animate-opacity"),e.style.opacity="1"}));else{if(c!==m.Move)return;e.style.transform=`translate3d(0, ${100*-l}%, 0)`,(0,b.T2)((()=>{e.classList.add("animate-transform"),e.style.transform=""}))}setTimeout((()=>{(0,b.T2)((()=>{e.classList.remove("animate-opacity","animate-transform"),e.style.opacity="",e.style.transform=""}))}),200+i.fK)}}),[K,l,c]);const ke=(0,a.I4)((()=>{G({id:n,shouldReplaceHistory:!0},{forceOnHeavyAnimation:!0}),z&&H&&Q()}),[z,H,G,n,Q]),Ie=(0,a.I4)((e=>{e.preventDefault(),null==q||q(n)}),[n,q]),Se=(0,a.I4)((()=>{ue(),ne()}),[ue,ne]),Me=(0,a.I4)((()=>{ve(),ie()}),[ve,ie]),Te=(0,a.I4)((()=>{ge(),le()}),[ge,le]),xe=(0,I.Z)({chat:h,user:p,handleDelete:Se,handleChatFolderChange:Me,handleReport:Te,folderId:s,isPinned:d,isMuted:v,canChangeFolder:J}),Le=(0,T.Z)();if(!h)return;const $e=(0,w.Z)("Chat chat-item-clickable",(0,P.YC)(n)?"private":"group",z&&"selected");return a.ZP.createElement(A.Z,{ref:ee,className:$e,style:t,ripple:!o.wB,contextActions:xe,onClick:ke,onDragEnter:Ie},a.ZP.createElement("div",{className:"status"},a.ZP.createElement(x.Z,{chat:h,user:p,userStatus:f,isSavedMessages:null==p?void 0:p.isSelf,lastSyncTime:W,animationLevel:K,withVideo:!0,observeIntersection:u}),h.isCallActive&&h.isCallNotEmpty&&a.ZP.createElement(X,{isSelected:z,isActive:0!==K})),a.ZP.createElement("div",{className:"info"},a.ZP.createElement("div",{className:"title"},a.ZP.createElement("h3",null,(0,C.Z)((0,P.U)(Le,h,p))),h.isVerified&&a.ZP.createElement(L.Z,null),(null==p?void 0:p.isPremium)&&!p.isSelf&&a.ZP.createElement(_.Z,null),h.fakeType&&a.ZP.createElement(Y.Z,{fakeType:h.fakeType}),v&&a.ZP.createElement("i",{className:"icon-muted"}),h.lastMessage&&a.ZP.createElement(D.Z,{message:h.lastMessage,outgoingStatus:E})),a.ZP.createElement("div",{className:"subtitle"},function(){if(Ee&&Pe&&Ee.timestamp>1e3*Pe.date)return a.ZP.createElement($.Z,{typingStatus:Ee});if(null!=j&&j.text.length)return a.ZP.createElement("p",{className:"last-message",dir:Le.isRtl?"auto":"ltr"},a.ZP.createElement("span",{className:"draft"},Le("Draft")),(0,C.Z)(j.text));if(!Pe)return;if(ye){const e=h&&((0,P.eA)(h)||Pe.senderId===Pe.chatId);return a.ZP.createElement("p",{className:"last-message",dir:Le.isRtl?"auto":"ltr"},(0,y.D)(Le,Pe,e?void 0:Z,e?h:void 0,Ne,F,R,{asTextWithSpoilers:!0}))}const e=(0,P.zF)(Le,n,Z);return a.ZP.createElement("p",{className:"last-message",dir:Le.isRtl?"auto":"ltr"},e&&a.ZP.createElement(a.ZP.Fragment,null,a.ZP.createElement("span",{className:"sender-name"},(0,C.Z)(e)),a.ZP.createElement("span",{className:"colon"},":")),function(e,t,n,r,i){return r?a.ZP.createElement("span",{className:"media-preview"},a.ZP.createElement("img",{src:r,alt:"",className:(0,w.Z)("media-preview--image",i&&"round")}),(0,P.b7)(t)&&a.ZP.createElement("i",{className:"icon-play"}),(0,N.e)(e,t,!0,void 0,void 0,n)):(0,N.e)(e,t,void 0,void 0,void 0,n)}(Le,Pe,u,be||Ce,we))}(),a.ZP.createElement(U,{chat:h,isPinned:d,isMuted:v}))),de&&a.ZP.createElement(O.Z,{isOpen:te,onClose:ae,onCloseAnimationEnd:me,chat:h}),he&&a.ZP.createElement(B.Z,{isOpen:re,onClose:oe,onCloseAnimationEnd:pe,chatId:n}),fe&&a.ZP.createElement(V.Z,{isOpen:se,onClose:ce,onCloseAnimationEnd:Ze,chatId:n,subject:"peer"}))})));var K=n(91713),z=n(231),H=n(45601);const J=(0,a.X$)((0,r.c$)(((e,t)=>{let{folderId:n,folderType:a}=t;return{chatFolder:n&&"folder"===a?(0,E.Mw)(e,n):void 0,animatedEmoji:(0,E.zB)(e,"📂")}}))((e=>{let{chatFolder:t,animatedEmoji:n,foldersDispatch:r,onScreenSelect:i}=e;const s=(0,T.Z)(),l=(0,a.I4)((()=>{r({type:"editFolder",payload:t}),i(K.MT.FoldersEditFolderFromChatList)}),[t,r,i]);return a.ZP.createElement("div",{className:"EmptyFolder"},a.ZP.createElement("div",{className:"sticker"},n&&a.ZP.createElement(H.Z,{sticker:n,size:128})),a.ZP.createElement("h3",{className:"title",dir:"auto"},s("FilterNoChatsToDisplay")),a.ZP.createElement("p",{className:"description",dir:"auto"},s(t?"ChatList.EmptyChatListFilterText":"Chat.EmptyChat")),t&&r&&i&&a.ZP.createElement(z.Z,{ripple:!o.wB,fluid:!0,pill:!0,onClick:l,size:"smaller",isRtl:s.isRtl},a.ZP.createElement("i",{className:"icon-settings"}),s("ChatList.EmptyChatListEditFilter")))}))),W=(0,a.X$)((e=>{let{folderType:t,folderId:n,isActive:Z,foldersDispatch:P,onScreenSelect:E}=e;const{openChat:y,openNextChat:C}=(0,r.Sv)(),b=(0,a.sO)(null),w=(0,a.sO)(!1),N="all"===t?i.Nf:"archived"===t?i.WS:n,k=(0,u.d7)(N),I=(0,a.Ye)((()=>{if(k)return k.reduce(((e,t,n)=>(e[t]=n,e)),{})}),[k]),S=(0,c.Z)(I),M=(0,a.Ye)((()=>I&&S?(0,s.Q8)(I,((e,t)=>void 0!==S[t]?e-S[t]:-1/0)):{}),[I,S]),[T,x]=(0,d.Z)(void 0,k,void 0,i.t_);(0,v.y)(Z&&null!=k&&k.length?{"Alt+ArrowUp":e=>{e.preventDefault(),C({targetIndexDelta:-1,orderedIds:k})},"Alt+ArrowDown":e=>{e.preventDefault(),C({targetIndexDelta:1,orderedIds:k})}}:void 0),(0,a.d4)((()=>{if(Z&&k&&o.fl)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){if((o.jm&&e.metaKey||!o.jm&&e.ctrlKey)&&e.code.startsWith("Digit")){const[,t]=e.code.match(/Digit(\d)/)||[];if(!t)return;const n=Number(t)-1;if(n>k.length-1||n<0)return;y({id:k[n],shouldReplaceHistory:!0})}}}),[Z,y,C,k]);const L=function(e){return(0,a.Ye)((()=>{const t=Object.values(e),n=t.filter((e=>e<0)).length,a=t.filter((e=>e>0)).length;return t=>{const r=e[t];return 0===r?m.None:r===1/0||r===-1/0||n<=a&&r<0||a<n&&r>0?m.Opacity:m.Move}}),[e])}(M),{observe:$}=(0,h.S1)({rootRef:b,throttleMs:200}),D=(0,p.Z)((e=>{w.current?w.current=!1:y({id:e,shouldReplaceHistory:!0})}),[],500,!0),O=(0,a.I4)((e=>{const t=e.currentTarget.getBoundingClientRect(),n=e.clientX-t.left,a=e.clientY-t.top;n<t.width||a<t.y||(w.current=!0)}),[]);return a.ZP.createElement(f.Z,{className:"chat-list custom-scroll",ref:b,items:T,preloadBackwards:i.t_,withAbsolutePositioning:!0,maxHeight:((null==k?void 0:k.length)||0)*i.rS,onLoadMore:x,onDragLeave:O},null!=T&&T.length?function(){const e=k.indexOf(T[0]),t=(0,l.aE)(N)||0;return T.map(((r,o)=>{const s=e+o<t;return a.ZP.createElement(j,{key:r,teactOrderKey:s?o:(0,l.jK)(r),chatId:r,isPinned:s,folderId:n,animationType:L(r),orderDiff:M[r],style:`top: ${(e+o)*i.rS}px;`,observeIntersection:$,onDragEnter:D})}))}():T&&!T.length?a.ZP.createElement(J,{folderId:n,folderType:t,foldersDispatch:P,onScreenSelect:E}):a.ZP.createElement(g.Z,{key:"loading"}))}))},91:(e,t,n)=>{n.d(t,{F:()=>r});var a=n(83158);function r(e,t,n,r){const{senderId:i}=t;if(!i)return;const o=(0,a.YC)(i)?r[i]:n[i];let s=(0,a.OU)(e,o);const l=n[t.chatId];return l&&((0,a.YC)(i)&&o.isSelf?s=`${e("FromYou")} → ${(0,a.U)(e,l)}`:(0,a.Bf)(l)&&(s+=` → ${(0,a.U)(e,l)}`)),s}},67146:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(14050),r=n(99203),i=n(48778);const o=(0,a.X$)((e=>{const{isOpen:t}=e,n=(0,i.Z)(r.gl.Extra,"CustomSendMenu",!t);return n?a.ZP.createElement(n,e):void 0}))},12420:(e,t,n)=>{n.d(t,{t:()=>m,Z:()=>h});var a=n(14050),r=n(31212),i=n(46752),o=n(21262),s=n(23989),l=n(87204),c=n(62898),d=n(60706);const u=(0,a.X$)((e=>{let{isQuick:t,onFileSelect:n}=e;const[r,o,s]=(0,d.Z)(),l=(0,i.Z)("DropTarget",r&&"hovered");return a.ZP.createElement("div",{className:l,onDrop:n,onDragEnter:o,onDragLeave:e=>{const{relatedTarget:t}=e;t&&e.stopPropagation(),s()},"data-dropzone":!0},a.ZP.createElement("div",{className:"target-content"},a.ZP.createElement("div",{className:"icon icon-"+(t?"photo":"document")}),a.ZP.createElement("div",{className:"title"},"Drop files here to send them"),a.ZP.createElement("div",{className:"description"},t?"in a quick way":"without compression")))}));let m;!function(e){e.None="none",e.Document="document",e.QuickFile="quick_file"}(m||(m={}));const h=(0,a.X$)((e=>{let{isOpen:t,withQuick:n,onHide:d,onFileSelect:m}=e;const h=(0,a.sO)(null),v=(0,l.Z)(n),{shouldRender:p,transitionClassNames:f}=(0,r.Z)(t);(0,a.d4)((()=>t?(0,s.Z)(d):void 0),[t,d]);const g=(0,a.I4)((async e=>{const{dataTransfer:t}=e;let n=[];if(!(t.files&&t.files.length>0)||t.items&&t.items.length){if(t.items&&t.items.length>0){const e=await(0,o.Z)(t.items);e.length&&(n=n.concat(e))}}else n=n.concat(Array.from(t.files));d(),m(n,!1)}),[m,d]),Z=(0,a.I4)((e=>{const{dataTransfer:t}=e;t.files&&t.files.length>0&&(d(),m(Array.from(t.files),!0))}),[m,d]),P=(0,a.I4)((e=>{e.stopPropagation();const{target:t,relatedTarget:n}=e;t.matches(".DropTarget, .DropArea")&&!n&&(h.current=window.setTimeout((()=>{d()}),150))}),[d]);if(!p)return;const E=(0,i.Z)("DropArea",f);return a.ZP.createElement(c.Z,{containerId:"#middle-column-portals"},a.ZP.createElement("div",{className:E,onDragLeave:P,onDragOver:()=>{h.current&&window.clearTimeout(h.current)},onDrop:d,onClick:d},a.ZP.createElement(u,{onFileSelect:g}),(n||v)&&a.ZP.createElement(u,{onFileSelect:Z,isQuick:!0})))}))},19830:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(14050),r=n(99203),i=n(48778);const o=(0,a.X$)((e=>{const{isOpen:t}=e,n=(0,i.Z)(r.gl.Extra,"EmojiTooltip",!t);return n?a.ZP.createElement(n,e):void 0}))},13616:(e,t,n)=>{n.d(t,{Z:()=>y});var a=n(14050),r=n(33555),i=n(83716),o=n(11192),s=n(69118),l=n(65723),c=n(46752),d=n(77361),u=n(517),m=n(72645),h=n(60706),v=n(18674),p=n(59107),f=n(64784),g=n(96391),Z=n(32340),P=n(72087);const E=d.wB?256:416,y=(0,a.X$)((0,r.c$)(((e,t)=>{let{chatId:n,threadId:a}=t;const{messageSendKeyCombo:r}=e.settings.byKey;return{messageSendKeyCombo:r,replyingToId:n&&a?(0,o.Yy)(e,n,a):void 0,noTabCapture:e.pollModal.isOpen||e.payment.isPaymentModalOpen}}))((e=>{let{id:t,chatId:n,captionLimit:o,isAttachmentModalInput:y,editableInputId:C,html:b,placeholder:w,forcedPlaceholder:N,canAutoFocus:k,shouldSuppressFocus:I,shouldSuppressTextFormatter:S,replyingToId:M,noTabCapture:T,messageSendKeyCombo:x,onUpdate:L,onSuppressedFocus:$,onSend:D}=e;const{editLastMessage:O,replyToNextMessage:A}=(0,r.Sv)(),F=(0,a.sO)(null),R=(0,a.sO)(null),U=(0,a.sO)(null),B=(0,p.Z)(),X=(0,a.sO)(!1),[V,Y,_]=(0,h.Z)(),[j,K]=(0,a.eJ)(),[z,H]=(0,a.eJ)();(0,a.d4)((()=>{y&&ee(!1)}),[y]),(0,m.Z)((e=>{let[t]=e;b!==F.current.innerHTML&&(F.current.innerHTML=b),b!==U.current.innerHTML&&(U.current.innerHTML=b),void 0!==t&&t!==b&&ee(!b.length)}),[b]),(0,a.sO)(n).current=n;const J=(0,a.I4)((()=>{F.current&&((0,v.zG)()?setTimeout(J,350):(0,l.Z)(F.current))}),[]),W=(0,a.I4)((()=>{_(),function(){const e=window.getSelection();e&&(e.removeAllRanges?e.removeAllRanges():e.empty&&e.empty())}()}),[_]);function q(){if(d.cj)return!1;const e=window.getSelection();if(!e||!e.rangeCount||X.current)return _(),!1;const t=e.getRangeAt(0),n=t.toString().trim();return!(S||!(0,g.R)(t,C||i.R2)||!n||(0,f.Z)(n)||!t.START_TO_END)||(_(),!1)}function G(){if(!q())return;const e=window.getSelection().getRangeAt(0),t=e.getBoundingClientRect(),n=F.current.getBoundingClientRect();let a=t.left+t.width/2-n.left;a<90?a=90:a>n.width-90&&(a=n.width-90),K({x:a,y:t.top-n.top}),H(e),Y()}function Q(){R.current&&window.clearTimeout(R.current),R.current=window.setTimeout(G,260)}function ee(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=F.current,n=U.current,a=Number(t.style.height.replace("px","")),r=Math.min(n.scrollHeight,E);if(r===a)return;const i=Math.round(50*Math.log(Math.abs(r-a))),o=()=>{t.style.height=`${r}px`,t.style.transitionDuration=`${i}ms`,t.classList.toggle("overflown",n.scrollHeight>E)};e?requestAnimationFrame(o):o()}(0,a.d4)((()=>{d.$b||k&&J()}),[n,J,M,k]),(0,a.d4)((()=>{if(T)return;const e=(0,s.Ds)((e=>{"Tab"===e.key&&(e.preventDefault(),requestAnimationFrame(J))}),2e3,!0,!1);return(0,u.Z)({onTab:e})}),[J,T]),(0,a.d4)((()=>{const e=F.current;function t(){e.blur()}return I&&e.addEventListener("focus",t),()=>{e.removeEventListener("focus",t)}}),[I]);const te=(0,c.Z)("form-control custom-scroll",b.length>0&&"touched",I&&"focus-disabled");return a.ZP.createElement("div",{id:t,onClick:I?$:void 0,dir:B.isRtl?"rtl":void 0},a.ZP.createElement("div",{ref:F,id:C||i.R2,className:te,contentEditable:!0,role:"textbox",dir:"auto",tabIndex:0,onClick:J,onChange:function(e){const{innerHTML:t,textContent:n}=e.currentTarget;if(L("<br>"===t?"":t),!d.$b&&(!n||!n.length)&&(d.op||!t.includes("emoji-small"))){const e=window.getSelection();e&&(F.current.blur(),e.removeAllRanges(),(0,l.Z)(F.current,!0))}},onKeyDown:function(e){const{isComposing:t}=e;if(!t&&!b.length&&(e.metaKey||e.ctrlKey)){const t="ArrowDown"===e.key?1:"ArrowUp"===e.key?-1:void 0;if(t)return e.preventDefault(),void A({targetIndexDelta:t})}t||"Enter"!==e.key||e.shiftKey?t||"ArrowUp"!==e.key||b.length||e.metaKey||e.ctrlKey||e.altKey?e.target.addEventListener("keyup",Q,{once:!0}):(e.preventDefault(),O()):d.cj||d.wZ||!("enter"===x&&!e.shiftKey||"ctrl-enter"===x&&(e.ctrlKey||e.metaKey))||(e.preventDefault(),_(),D())},onMouseDown:function(e){function t(e){e instanceof KeyboardEvent&&"Esc"!==e.key&&"Escape"!==e.key||(setTimeout((()=>{X.current=!1}),100),window.removeEventListener("keydown",t),window.removeEventListener("mousedown",t))}2===e.button?X.current||(X.current=!0,document.addEventListener("mousedown",t),document.addEventListener("keydown",t)):e.target.addEventListener("mouseup",Q,{once:!0})},onContextMenu:d.wZ?function(e){q()&&(e.preventDefault(),e.stopPropagation())}:void 0,onTouchCancel:d.wZ?Q:void 0,"aria-label":w}),o&&a.ZP.createElement("div",{className:"max-length-indicator",dir:"auto"},o),a.ZP.createElement("div",{ref:U,className:(0,c.Z)(te,"clone"),dir:"auto"}),!N&&a.ZP.createElement("span",{className:"placeholder-text",dir:"auto"},w),a.ZP.createElement(P.Z,{isOpen:V,anchorPosition:j,selectedRange:z,setSelectedRange:H,onClose:W}),N&&a.ZP.createElement("span",{className:"forced-placeholder"},(0,Z.Z)(N)))})))},72087:(e,t,n)=>{n.d(t,{Z:()=>f});var a=n(14050),r=n(6137),i=n(83716),o=n(46752),s=n(81396),l=n(23989),c=n(31212),d=n(58758),u=n(60706),m=n(59107),h=n(231);const v={B:"bold",STRONG:"bold",I:"italic",EM:"italic",U:"underline",DEL:"strikethrough",CODE:"monospace",SPAN:"spoiler"},p=document.createElement("div"),f=(0,a.X$)((e=>{let{isOpen:t,anchorPosition:n,selectedRange:f,setSelectedRange:g,onClose:Z}=e;const P=(0,a.sO)(null),E=(0,a.sO)(null),{shouldRender:y,transitionClassNames:C}=(0,c.Z)(t),[b,w,N]=(0,u.Z)(),[k,I]=(0,a.eJ)(""),[S,M]=(0,a.eJ)(!1),[T,x]=(0,a.eJ)(),[L,$]=(0,a.eJ)({});(0,a.d4)((()=>t?(0,l.Z)(Z):void 0),[t,Z]),(0,d.Z)(t,P,Z),(0,a.d4)((()=>{b?E.current.focus():(I(""),M(!1))}),[b]),(0,a.d4)((()=>{y||(N(),$({}),x(void 0))}),[N,y]),(0,a.d4)((()=>{if(!t||!f)return;const e={};let{parentElement:n}=f.commonAncestorContainer;for(;n&&n.id!==i.R2;){const t=v[n.tagName];t&&(e[t]=!0),n=n.parentElement}$(e)}),[t,f,w]);const D=(0,a.I4)((()=>{if(!f)return;const e=window.getSelection();e&&(e.removeAllRanges(),e.addRange(f))}),[f]),O=(0,a.I4)((()=>{const e=window.getSelection();e&&g(e.getRangeAt(0))}),[g]),A=(0,a.I4)((()=>{if(f)return p.replaceChildren(f.cloneContents()),p.innerHTML}),[f]),F=(0,a.I4)((()=>{if(f)return f.commonAncestorContainer.parentElement}),[f]);function R(){const e=E.current;if(!e)return;const{offsetWidth:t,scrollWidth:n,scrollLeft:a}=e;if(n<=t)return void x(void 0);let r="";a<n-t&&(r="mask-right"),a>0&&(r+=" mask-left"),x(r)}function U(e){if(L[e])return"active";if("monospace"===e||"strikethrough"===e){if(Object.keys(L).some((t=>t!==e&&Boolean(L[t]))))return"disabled"}else if(L.monospace||L.strikethrough)return"disabled"}const B=(0,a.I4)((()=>{if(L.spoiler){const e=F();if(!f||!e||e.dataset.entityType!==r.Vv.Spoiler||!e.textContent)return;return e.replaceWith(e.textContent),void $((e=>({...e,spoiler:!1})))}const e=A();document.execCommand("insertHTML",!1,`<span class="spoiler" data-entity-type="${r.Vv.Spoiler}">${e}</span>`),Z()}),[F,A,Z,f,L.spoiler]),X=(0,a.I4)((()=>{$((e=>(document.execCommand(e.bold?"removeFormat":"bold"),Object.keys(e).forEach((t=>{"italic"!==t&&"underline"!==t||!Boolean(e[t])||document.execCommand(t)})),O(),{...e,bold:!e.bold})))}),[O]),V=(0,a.I4)((()=>{document.execCommand("italic"),O(),$((e=>({...e,italic:!e.italic})))}),[O]),Y=(0,a.I4)((()=>{document.execCommand("underline"),O(),$((e=>({...e,underline:!e.underline})))}),[O]),_=(0,a.I4)((()=>{if(L.strikethrough){const e=F();if(!f||!e||"DEL"!==e.tagName||!e.textContent)return;return e.replaceWith(e.textContent),void $((e=>({...e,strikethrough:!1})))}const e=A();document.execCommand("insertHTML",!1,`<del>${e}</del>`),Z()}),[F,A,Z,f,L.strikethrough]),j=(0,a.I4)((()=>{if(L.monospace){const e=F();if(!f||!e||"CODE"!==e.tagName||!e.textContent)return;return e.replaceWith(e.textContent),void $((e=>({...e,monospace:!1})))}const e=A();document.execCommand("insertHTML",!1,`<code class="text-entity-code" dir="auto">${e}</code>`),Z()}),[F,A,Z,f,L.monospace]),K=(0,a.I4)((()=>{const e=((0,s.X)(k)||"").split("%").map(encodeURI).join("%");if(S){const t=F();if(!t||"A"!==t.tagName)return;return t.href=e,void Z()}const t=A();D(),document.execCommand("insertHTML",!1,`<a href=${e} class="text-entity-link" dir="auto">${t}</a>`),Z()}),[F,A,S,k,Z,D]),z=(0,a.I4)((e=>{const t={k:w,b:X,u:Y,i:V,m:j,s:_,p:B}[function(e){const t="key"in e?e.key:e.code;return t.startsWith("Key")?t.slice(3).toLowerCase():t}(e)];!e.altKey&&(e.ctrlKey||e.metaKey)&&t&&(e.preventDefault(),e.stopPropagation(),t())}),[w,X,Y,V,j,_,B]);(0,a.d4)((()=>(t&&document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z))),[t,z]);const H=(0,m.Z)();if(!y)return;const J=(0,o.Z)("TextFormatter",C,b&&"link-control-shown"),W=(0,o.Z)("TextFormatter-link-url-confirm",Boolean(k.length)&&"shown"),q=n?`left: ${n.x}px; top: ${n.y}px;--text-formatter-left: ${n.x}px;`:"";return a.ZP.createElement("div",{ref:P,className:J,style:q,onKeyDown:function(e){"Enter"===e.key&&b&&(K(),e.preventDefault())}},a.ZP.createElement("div",{className:"TextFormatter-buttons"},a.ZP.createElement(h.Z,{color:"translucent",ariaLabel:"Spoiler text",className:U("spoiler"),onClick:B},a.ZP.createElement("i",{className:"icon-eye-closed"})),a.ZP.createElement("div",{className:"TextFormatter-divider"}),a.ZP.createElement(h.Z,{color:"translucent",ariaLabel:"Bold text",className:U("bold"),onClick:X},a.ZP.createElement("i",{className:"icon-bold"})),a.ZP.createElement(h.Z,{color:"translucent",ariaLabel:"Italic text",className:U("italic"),onClick:V},a.ZP.createElement("i",{className:"icon-italic"})),a.ZP.createElement(h.Z,{color:"translucent",ariaLabel:"Underlined text",className:U("underline"),onClick:Y},a.ZP.createElement("i",{className:"icon-underlined"})),a.ZP.createElement(h.Z,{color:"translucent",ariaLabel:"Strikethrough text",className:U("strikethrough"),onClick:_},a.ZP.createElement("i",{className:"icon-strikethrough"})),a.ZP.createElement(h.Z,{color:"translucent",ariaLabel:"Monospace text",className:U("monospace"),onClick:j},a.ZP.createElement("i",{className:"icon-monospace"})),a.ZP.createElement("div",{className:"TextFormatter-divider"}),a.ZP.createElement(h.Z,{color:"translucent",ariaLabel:H("TextFormat.AddLinkTitle"),onClick:w},a.ZP.createElement("i",{className:"icon-link"}))),a.ZP.createElement("div",{className:"TextFormatter-link-control"},a.ZP.createElement("div",{className:"TextFormatter-buttons"},a.ZP.createElement(h.Z,{color:"translucent",ariaLabel:H("Cancel"),onClick:N},a.ZP.createElement("i",{className:"icon-arrow-left"})),a.ZP.createElement("div",{className:"TextFormatter-divider"}),a.ZP.createElement("div",{className:(0,o.Z)("TextFormatter-link-url-input-wrapper",T)},a.ZP.createElement("input",{ref:E,className:"TextFormatter-link-url-input",type:"text",value:k,placeholder:"Enter URL...",autoComplete:"off",inputMode:"url",dir:"auto",onChange:function(e){I(e.target.value),R()},onScroll:R})),a.ZP.createElement("div",{className:W},a.ZP.createElement("div",{className:"TextFormatter-divider"}),a.ZP.createElement(h.Z,{color:"translucent",ariaLabel:H("Save"),className:"color-primary",onClick:K},a.ZP.createElement("i",{className:"icon-check"}))))))}))},21262:(e,t,n)=>{async function a(e){const t=[];function n(e,a){return new Promise((r=>{if(e instanceof File)t.push(e),r(e);else if(e.isFile){const n=a.getAsFile();e.file((e=>{t.push(e),r(e)}),(()=>{n&&t.push(n),r(n)}))}else e.isDirectory&&e.createReader().readEntries((e=>{const t=[];for(let r=0;r<e.length;r++)t.push(n(e[r],a));r(Promise.all(t))}))}))}const a=[];for(let t=0;t<e.length;t++){const r=e[t];if("file"===r.kind){const e=r.webkitGetAsEntry()||r.getAsFile();e&&a.push(n(e,r))}}return await Promise.all(a),t.map(r)}function r(e){const t=e.name.split(".").pop();return e.type||"mov"!==t.toLowerCase()?e:new File([e],e.name,{type:"video/quicktime"})}n.d(t,{Z:()=>a})},52400:(e,t,n)=>{n.d(t,{_:()=>s});const a=/(<br>|<br\s?\/>)/g,r=/( |\u00A0)/g,i=/(<div>|<\/div>)/gi,o=/\n$/i;function s(e){return e.replace(r," ").replace(a,"\n").replace(i,"").replace(o,"")}},96391:(e,t,n)=>{function a(e,t){const{commonAncestorContainer:n}=e;let a=n,r=1;for(;a&&a.id!==t&&r<5;)a=a.parentElement,r++;return Boolean(a&&a.id===t)}n.d(t,{R:()=>a})},72162:(e,t,n)=>{n.d(t,{Z:()=>y});var a=n(14050),r=n(83716),i=n(70735),o=n(52400),s=n(34284),l=n(65723),c=n(60782);const d=new WeakMap;function u(e){return function(){const t=d.get(e);for(var n=arguments.length,a=new Array(n),r=0;r<n;r++)a[r]=arguments[r];if(t&&(0,c.et)(t.lastArgs,a))return t.lastResult;const i=e(...a);return d.set(e,{lastArgs:a,lastResult:i}),i}}var m=n(60706),h=n(32340);let v,p,f,g;const Z=u((function(e,t,n){return e&&t.length?Object.values((0,c.q0)(e,t)).slice(0,n):i.D})),P=u((function(e,t,n){const a=Object.values(e),r=(0,c.ee)(a,"native"),i=t?(0,c.Q8)(t,(e=>Object.values((0,c.q0)(r,e)))):{},o=n?(0,c.Q8)(n,(e=>Object.values((0,c.q0)(r,e)))):{},s={...i,...o},l=[].concat(Object.keys(i),Object.keys(o)),d=a.reduce(((e,t)=>(t.names.forEach((n=>{e[n]||(e[n]=[]),e[n].push(t)})),e)),{});return{byKeyword:s,keywords:l,byName:d,names:Object.keys(d)}})),E=u((function(e,t,n){const{byKeyword:a,keywords:r,byName:o,names:s}=e;let l=i.D;const d=r.filter((e=>e.startsWith(t))).sort();l=l.concat(Object.values((0,c.q0)(a,d)).flat());const u=s.filter((e=>e.startsWith(t)));return l=l.concat(Object.values((0,c.q0)(o,u)).flat()),l=(0,c.Tw)(l),l.slice(0,n)}));try{g=/(^|\s):[-+_:\p{L}\p{N}]*$/giu}catch(e){g=/(^|\s):[-+_:\d\wа-яё]*$/gi}function y(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:r.R2,s=arguments.length>4?arguments[4]:void 0,c=arguments.length>5?arguments[5]:void 0,d=arguments.length>6?arguments[6]:void 0,u=arguments.length>7&&void 0!==arguments[7]&&arguments[7];const[v,p,g]=(0,m.Z)(),[y,w]=(0,a.eJ)(),[N,k]=(0,a.eJ)(!1),[I,S]=(0,a.eJ)(i.D);(0,a.d4)((()=>{if(u)return;const e=()=>{w(f.emojis)};f?e():b().then(e)}),[u]);const M=t.current;(0,a.d4)((()=>{if(!e||!M||!y||u)return void g();const t=M.includes(":")&&C(M);if(!t)return S(i.D),void g();const a=t.length>2&&t.endsWith(":"),r=t.substr(1,a?t.length-2:void 0);let o=i.D;if(k(a),r){if(r.length>=2){const e=P(y,c,d);o=E(e,r,36)}}else o=Z(y,n,36);o.length?(a||p(),S(o)):g()}),[y,M,e,p,n,g,k,u,c,d]);const T=(0,a.I4)(((e,n)=>{const a=t.current,i=a.lastIndexOf(":",n?a.lastIndexOf(":")-1:void 0);if(-1!==i){let t;s(`${a.substr(0,i)}${(0,h.Z)(e,["emoji_html"])}`),t=o===r.R2?document.querySelector(r.Ed):document.getElementById(o),requestAnimationFrame((()=>{(0,l.Z)(t,!0,!0)}))}g()}),[t,o,s,g]);return(0,a.d4)((()=>{v&&N&&I.length&&T(I[0].native,!0)}),[I,T,v,N]),{isEmojiTooltipOpen:v,closeEmojiTooltip:g,filteredEmojis:I,insertEmoji:T}}function C(e){const t=(0,o._)(e).match(g);return t?t[0].trim():void 0}async function b(){return v||(v=n.e(7501).then(n.t.bind(n,47501,19)),p=(await v).default,f=(0,s.NM)(p)),v}},29295:(e,t,n)=>{n.d(t,{Z:()=>v});var a=n(14050),r=n(33555),i=n(6137),o=n(83716),s=n(83158),l=n(52400),c=n(65723),d=n(60706),u=n(60782);const m=(0,n(69118).P2)((e=>e()),500,!0);let h;try{h=/(^|\s)@[-_\p{L}\p{M}\p{N}]*$/giu}catch(e){h=/(^|\s)@[-_\d\wа-яё]*$/gi}function v(e,t,n){let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o.R2,h=arguments.length>4?arguments[4]:void 0,v=arguments.length>5?arguments[5]:void 0,g=arguments.length>6?arguments[6]:void 0;const[Z,P,E]=(0,d.Z)(),[y,C]=(0,a.eJ)(),b=(0,a.I4)(((e,t)=>{const n=(0,r.Rd)().users.byId;(h||v)&&n?m((()=>{const a=null==h?void 0:h.reduce(((e,t)=>(t.userId!==g&&e.push(t.userId),e)),[]),r=(0,s.kK)((0,u.Tw)([...t&&v||[],...a||[]]),n,e);C(Object.values((0,u.q0)(n,r)))})):C(void 0)}),[g,h,v]),w=t.current;(0,a.d4)((()=>{if(!e||!w.length)return void E();const t=w.includes("@")&&p(w);if(t){const e=t?t.substr(1):"";b(e,f(w))}else E()}),[e,b,P,E,w]),(0,a.d4)((()=>{null!=y&&y.length?P():E()}),[P,E,y]);const N=(0,a.I4)((function(e){let a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e.username&&!(0,s.Vl)(e))return;const r=e.username?`@${e.username}`:`<a\n class="text-entity-link"\n data-entity-type="${i.Vv.MentionName}"\n data-user-id="${e.id}"\n contenteditable="false"\n dir="auto"\n >${(0,s.Vl)(e)}</a>`,o=t.current,d=o.lastIndexOf("@");if(-1!==d){n(`${o.substr(0,d)}${r} `);const e=document.getElementById(l);requestAnimationFrame((()=>{(0,c.Z)(e,a)}))}E()}),[t,l,n,E]);return{isMentionTooltipOpen:Z,closeMentionTooltip:E,insertMention:N,mentionFilteredUsers:y}}function p(e){const t=(0,l._)(e).match(h);return t?t[0].trim():void 0}function f(e){return e.startsWith("@")}},17891:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(14050),r=n(29290),i=n(65326);function o(e,t){const n=void 0===t,o=(0,a.sO)(n),s=(0,a.sO)(),l=(0,i.Z)();return(0,r.Z)((()=>{n||(o.current=!1,s.current&&(clearTimeout(s.current),s.current=void 0))}),e),(0,a.d4)((()=>{if(n||o.current)return;const e=()=>{o.current=!0,l()};t>0?s.current=window.setTimeout(e,t):e()}),e),o.current}},51218:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(14050),r=n(14605);const i=(0,a.X$)((e=>{let{id:t,options:n,selected:i=[],disabled:o,round:s,loadingOptions:l,onChange:c}=e;const[d,u]=(0,a.eJ)(i||[]),m=(0,a.I4)((e=>{const{value:t,checked:n}=e.currentTarget;let a;a=n?[...d,t]:d.filter((e=>e!==t)),u(a),c(a)}),[c,d]);return a.ZP.createElement("div",{id:t,className:"radio-group"},n.map((e=>a.ZP.createElement(r.Z,{label:e.label,subLabel:e.subLabel,value:e.value,checked:-1!==i.indexOf(e.value),disabled:o,round:s,isLoading:l?-1!==l.indexOf(e.value):void 0,onChange:m}))))}))},17551:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(14050),r=n(59107),i=n(72313),o=n(13103),s=n(231);const l=(0,a.X$)((e=>{let{isOpen:t,onClose:n,onCloseAnimationEnd:l,title:c,header:d,text:u,textParts:m,confirmLabel:h="Confirm",confirmHandler:v,confirmIsDestructive:p,isButtonsInOneRow:f,children:g}=e;const Z=(0,r.Z)(),P=(0,a.sO)(null),E=(0,a.I4)((e=>{-1===e&&v()}),[v]),y=(0,i.Z)(P,t,E,".Button");return a.ZP.createElement(o.Z,{className:"confirm",title:c||Z("Telegram"),header:d,isOpen:t,onClose:n,onCloseAnimationEnd:l},u&&u.split("\\n").map((e=>a.ZP.createElement("p",null,e))),m||g,a.ZP.createElement("div",{className:f?"dialog-buttons mt-2":"",ref:P,onKeyDown:y},a.ZP.createElement(s.Z,{className:"confirm-dialog-button",isText:!0,onClick:v,color:p?"danger":"primary"},h),a.ZP.createElement(s.Z,{className:"confirm-dialog-button",isText:!0,onClick:n},Z("Cancel"))))}))},41151:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(14050),r=n(46752),i=n(59107),o=n(231);const s=e=>{let{isShown:t,className:n,color:s="primary",ariaLabel:l,disabled:c,onClick:d,children:u}=e;const m=(0,i.Z)(),h=(0,r.Z)("FloatingActionButton",t&&"revealed",n);return a.ZP.createElement(o.Z,{className:h,color:s,round:!0,disabled:c,onClick:t&&!c?d:void 0,ariaLabel:l,tabIndex:-1,isRtl:m.isRtl},u)}},31876:(e,t,n)=>{n.d(t,{Z:()=>p});var a=n(14050),r=n(77361),i=n(69118),o=n(46752),s=n(17240),l=n(63394),c=n(60706),d=n(59107),u=n(68512),m=n(52328),h=n(58964),v=n(231);const p=e=>{let{ref:t,buttonRef:n,icon:p,leftElement:f,buttonClassName:g,secondaryIcon:Z,rightElement:P,className:E,style:y,children:C,disabled:b,allowDisabledClick:w,ripple:N,narrow:k,inactive:I,focus:S,destructive:M,multiline:T,isStatic:x,contextActions:L,onMouseDown:$,onClick:D,onSecondaryIconClick:O,onDragEnter:A}=e,F=(0,a.sO)(null);t&&(F=t);const[R,U,B]=(0,c.Z)(),{isContextMenuOpen:X,contextMenuPosition:V,handleBeforeContextMenu:Y,handleContextMenu:_,handleContextMenuClose:j,handleContextMenuHide:K}=(0,s.Z)(F,!L),z=(0,a.I4)((()=>F.current),[]),H=(0,a.I4)((()=>F.current.closest(".custom-scroll")),[]),J=(0,a.I4)((()=>F.current.querySelector(".ListItem-context-menu .bubble")),[]),{positionX:W,positionY:q,transformOriginX:G,transformOriginY:Q,style:ee}=(0,l.Z)(V,z,H,J),te=(0,a.I4)((e=>{b&&!w||!D||(D(e),r.$b&&!N&&(U(),(0,i.T2)(B)))}),[w,b,U,D,N,B]),ne=e=>{b&&!w||0!==e.button||!O&&!L||(e.stopPropagation(),O?O(e):_(e))},ae=(0,a.I4)((e=>{I||r.$b||(!L||2!==e.button&&D||Y(e),0===e.button&&(D?te(e):_(e)))}),[I,L,D,Y,_,te]),re=(0,d.Z)(),ie=(0,o.Z)("ListItem",E,!x&&"no-selection",N&&"has-ripple",k&&"narrow",b&&"disabled",w&&"click-allowed",I&&"inactive",V&&"has-menu-open",S&&"focus",M&&"destructive",T&&"multiline",x&&"is-static");return a.ZP.createElement("div",{ref:F,className:ie,dir:re.isRtl?"rtl":void 0,style:y,onMouseDown:$,onDragEnter:A},a.ZP.createElement("div",{className:(0,o.Z)("ListItem-button",R&&"active",g),role:x?void 0:"button",ref:n,tabIndex:x?void 0:0,onClick:!I&&r.$b?te:void 0,onMouseDown:ae,onContextMenu:!I&&L?_:void 0},f,p&&a.ZP.createElement("i",{className:`icon-${p}`}),T&&a.ZP.createElement("div",{className:"multiline-item"},C),!T&&C,!b&&!I&&N&&a.ZP.createElement(u.Z,null),Z&&a.ZP.createElement(v.Z,{className:"secondary-icon",round:!0,color:"translucent",size:"smaller",onClick:r.$b?ne:void 0,onMouseDown:r.$b?void 0:ne},a.ZP.createElement("i",{className:`icon-${Z}`})),P),L&&void 0!==V&&a.ZP.createElement(m.Z,{isOpen:X,transformOriginX:G,transformOriginY:Q,positionX:W,positionY:q,style:ee,className:"ListItem-context-menu",autoClose:!0,onClose:j,onCloseAnimationEnd:K},L.map((e=>a.ZP.createElement(h.Z,{key:e.title,icon:e.icon,destructive:e.destructive,disabled:!e.handler,onClick:e.handler},e.title)))))}},66902:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(14050),r=n(46752);const i=e=>{let{className:t}=e;return a.ZP.createElement("div",{className:(0,r.Z)("GC8g9Q16IaK76g6rcU78",t)})}},96937:(e,t,n)=>{n.d(t,{Z:()=>u});var a=n(14050),r=n(83716),i=n(31212),o=n(46752),s=n(23989),l=n(62898),c=n(231);const d=3e3,u=e=>{let{title:t,className:n,message:u,duration:m=d,containerId:h,onDismiss:v,action:p,actionText:f}=e;const[g,Z]=(0,a.eJ)(!0),P=(0,a.sO)(null),{transitionClassNames:E}=(0,i.Z)(g),y=(0,a.I4)((()=>{Z(!1),setTimeout(v,150+r.fK)}),[v]);(0,a.d4)((()=>g?(0,s.Z)(y):void 0),[g,y]),(0,a.d4)((()=>(P.current=window.setTimeout(y,m),()=>{P.current&&(clearTimeout(P.current),P.current=void 0)})),[m,y]);const C=(0,a.I4)((()=>{P.current&&(clearTimeout(P.current),P.current=void 0)}),[]),b=(0,a.I4)((()=>{P.current=window.setTimeout(y,m)}),[m,y]);return a.ZP.createElement(l.Z,{className:"Notification-container",containerId:h},a.ZP.createElement("div",{className:(0,o.Z)("Notification",E,n),onClick:function(){null==p||p(),y()},onMouseEnter:C,onMouseLeave:b},a.ZP.createElement("div",{className:"content"},t&&a.ZP.createElement("div",{className:"notification-title"},t),u),p&&f&&a.ZP.createElement(c.Z,{color:"translucent-white",onClick:p,className:"Notification-button"},f)))}},39196:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(14050),r=n(46752);const i={s:22,m:25,l:28,xl:20},o=(0,a.X$)((e=>{let{progress:t=0,size:n="l",square:o,transparent:s,noCross:l,onClick:c}=e;const d=i[n],u=d-4,m=d-1,h=2*u*Math.PI,v=(0,a.sO)(null);(0,a.d4)((()=>{if(!v.current)return;const e=v.current.firstElementChild,n=h-Math.min(Math.max(.05,t),1)*h;e?e.firstElementChild.setAttribute("stroke-dashoffset",n.toString()):v.current.innerHTML=`<svg\n viewBox="0 0 ${2*m} ${2*m}"\n height="${2*m}"\n width="${2*m}"\n >\n <circle\n stroke="white"\n fill="transparent"\n stroke-width=2\n stroke-dasharray="${h} ${h}"}\n stroke-dashoffset="${n}"\n stroke-linecap="round"\n r=${u}\n cx=${m}\n cy=${m}\n />\n </svg>`}),[v,h,m,u,t]);const p=(0,r.Z)(`ProgressSpinner size-${n}`,s&&"transparent",o&&"square",l&&"no-cross");return a.ZP.createElement("div",{ref:v,className:p,onClick:c})}))},14434:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(14050),r=n(46752),i=n(59107),o=n(49204);const s=(0,a.X$)((e=>{let{id:t,label:n,subLabel:s,value:l,name:c,checked:d,disabled:u,hidden:m,isLoading:h,onChange:v}=e;const p=(0,i.Z)(),f=(0,r.Z)("Radio",u&&"disabled",m&&"hidden-widget",h&&"loading");return a.ZP.createElement("label",{className:f,dir:p.isRtl?"rtl":void 0},a.ZP.createElement("input",{type:"radio",name:c,value:l,id:t,checked:d,onChange:v,disabled:u||m}),a.ZP.createElement("div",{className:"Radio-main"},a.ZP.createElement("span",{className:"label",dir:p.isRtl?"auto":void 0},n),s&&a.ZP.createElement("span",{className:"subLabel",dir:p.isRtl?"auto":void 0},s)),h&&a.ZP.createElement(o.Z,null))})),l=(0,a.X$)((e=>{let{id:t,name:n,options:r,selected:i,disabled:o,loadingOption:l,onChange:c}=e;const d=(0,a.I4)((e=>{const{value:t}=e.currentTarget;c(t,e)}),[c]);return a.ZP.createElement("div",{id:t,className:"radio-group"},r.map((e=>a.ZP.createElement(s,{name:n,label:e.label,subLabel:e.subLabel,value:e.value,checked:e.value===i,hidden:e.hidden,disabled:o,isLoading:l?l===e.value:void 0,onChange:d}))))}))},18051:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(14050),r=n(46752),i=n(59107);const o=(0,a.X$)((e=>{let{options:t,min:n=0,max:o=(t?t.length-1:100),step:s=1,label:l,value:c,disabled:d,bold:u,className:m,renderValue:h,onChange:v}=e;const p=(0,i.Z)(),f=(0,a.I4)((e=>{v(Number(e.currentTarget.value))}),[v]),g=(0,r.Z)(m,"RangeSlider",d&&"disabled",u&&"bold"),Z=(0,a.Ye)((()=>t?c/(t.length-1)*100:(c-n)/((o-n)/s)*100),[t,c,o,n,s]);return a.ZP.createElement("div",{className:g},l&&a.ZP.createElement("div",{className:"slider-top-row",dir:p.isRtl?"rtl":void 0},a.ZP.createElement("span",{className:"label",dir:"auto"},l),!t&&a.ZP.createElement("span",{className:"value",dir:"auto"},h?h(c):c)),a.ZP.createElement("div",{className:"slider-main"},a.ZP.createElement("div",{className:"slider-fill-track",style:`width: ${Z}%`}),a.ZP.createElement("input",{min:n,max:o,value:c,step:s,type:"range",className:"RangeSlider__input",onChange:f}),t&&a.ZP.createElement("div",{className:"slider-options"},t.map(((e,t)=>a.ZP.createElement("div",{className:(0,r.Z)("slider-option no-selection",t===c&&"active"),onClick:()=>v(t)},e))))))}))},69589:(e,t,n)=>{n.d(t,{Z:()=>u});var a=n(14050),r=n(46752),i=n(60706),o=n(59107),s=n(12515),l=n(34288),c=n(231),d=n(40126);const u=(0,a.X$)((e=>{let{ref:t,children:n,parentContainerClassName:u,value:m,inputId:h,className:v,focused:p,isLoading:f,spinnerColor:g,spinnerBackgroundColor:Z,placeholder:P,disabled:E,autoComplete:y,canClose:C,autoFocusSearch:b,onChange:w,onReset:N,onFocus:k,onBlur:I,onSpinnerClick:S}=e,M=(0,a.sO)(null);t&&(M=t);const[T,x,L]=(0,i.Z)(p);(0,s.Z)(M,b,L),(0,a.d4)((()=>{M.current&&(p?M.current.focus():M.current.blur())}),[p,P]);const $=(0,o.Z)(),D=(0,a.I4)((e=>{if("ArrowDown"===e.key||"Enter"===e.key){const e=document.querySelector(`.${u} .ListItem-button`);e&&e.focus()}}),[u]);return a.ZP.createElement("div",{className:(0,r.Z)("SearchInput",v,T&&"has-focus"),dir:$.isRtl?"rtl":void 0},n,a.ZP.createElement("input",{ref:M,id:h,type:"text",dir:"auto",placeholder:P||$("Search"),className:"form-control",value:m,disabled:E,autoComplete:y,onChange:function(e){const{currentTarget:t}=e;w(t.value)},onFocus:function(){x(),k&&k()},onBlur:function(){L(),I&&I()},onKeyDown:D}),a.ZP.createElement("i",{className:"icon-search"}),a.ZP.createElement(d.Z,{isOpen:Boolean(f),className:"slow"},a.ZP.createElement(l.Z,{color:g,backgroundColor:Z,onClick:S})),!f&&(m||C)&&N&&a.ZP.createElement(c.Z,{round:!0,size:"tiny",color:"translucent",onClick:N},a.ZP.createElement("span",{className:"icon-close"})))}))},40126:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(14050),r=n(31212),i=n(87204),o=n(46752);const s=e=>{let{isOpen:t,isCustom:n,id:s,className:l,onClick:c,children:d}=e;const{shouldRender:u,transitionClassNames:m}=(0,r.Z)(t,void 0,void 0,!n&&void 0),h=(0,i.Z)(t),v=(0,i.Z)(d),p=(0,a.sO)();return h&&!t&&(p.current=v),u&&a.ZP.createElement("div",{id:s,className:(0,o.Z)(l,m),onClick:c},t?d:p.current)}},17921:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(14050),r=n(46752),i=n(80036);const o=e=>{let{variant:t="rectangular",animation:n="wave",width:o,height:s,forceAspectRatio:l,inline:c,className:d}=e;const u=(0,r.Z)("Skeleton",t,n,d,c&&"inline"),m=l?o&&s?`aspect-ratio: ${o}/${s}`:void 0:(0,i.Z)(Boolean(o)&&`width: ${o}px`,Boolean(s)&&`height: ${s}px`);return a.ZP.createElement("div",{className:u,style:m},c&&" ")}},83321:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(14050),r=n(46752);const i=(0,a.X$)((e=>{let{id:t,name:n,value:i,label:o,checked:s=!1,disabled:l,inactive:c,noAnimation:d,onChange:u,onCheck:m}=e;const h=(0,a.I4)((e=>{u&&u(e),m&&m(e.currentTarget.checked)}),[u,m]),v=(0,r.Z)("Switcher",l&&"disabled",c&&"inactive",d&&"no-animation");return a.ZP.createElement("label",{className:v,title:o},a.ZP.createElement("input",{type:"checkbox",id:t,name:n,value:i,checked:s,disabled:l,onChange:h}),a.ZP.createElement("span",{className:"widget"}))}))},93133:(e,t,n)=>{n.d(t,{Z:()=>f});var a=n(14050),r=n(83716),i=n(77361),o=n(81367),s=n(87204),l=n(78781),c=n(59107),d=n(46752),u=n(82972),m=n(32340);const h="Tab--active",v=(0,a.X$)((e=>{let{className:t,title:n,isActive:r,isBlocked:i,badgeCount:o,isBadgeActive:s,previousActiveTab:l,onClick:c,clickArg:v}=e;const p=(0,a.sO)(null);return(0,a.d4)((()=>{if(r&&void 0===l&&p.current&&p.current.classList.add(h),!r||void 0===l)return;const e=p.current,t=e.parentElement.children[l];if(!t)return;const n=e.querySelector(".platform"),a=t.querySelector(".platform"),i=a.parentElement.offsetLeft-n.parentElement.offsetLeft,o=a.clientWidth/n.clientWidth;a.classList.remove("animate"),n.classList.remove("animate"),n.style.transform=`translate3d(${i}px, 0, 0) scale3d(${o}, 1, 1)`,(0,u.Z)(n),n.classList.add("animate"),n.style.transform="none",t.classList.remove(h),e.classList.add(h)}),[r,l]),a.ZP.createElement("div",{className:(0,d.Z)("Tab",t),onClick:()=>c(v),ref:p},a.ZP.createElement("span",null,(0,m.Z)(n),Boolean(o)&&a.ZP.createElement("span",{className:(0,d.Z)("badge",s&&"Tab__badge--active")},o),i&&a.ZP.createElement("i",{className:"icon-lock-badge blocked"}),a.ZP.createElement("i",{className:"platform"})))})),p=i.cj?450:i.wZ?400:300,f=(0,a.X$)((e=>{let{tabs:t,areFolders:n,activeTab:i,big:d,onSwitchTab:u}=e;const m=(0,a.sO)(null),h=(0,s.Z)(i);(0,l.Z)(m.current,void 0,!0),(0,a.d4)((()=>{const e=m.current,{scrollWidth:t,offsetWidth:n,scrollLeft:a}=e;if(t<=n)return;const r=e.childNodes[i];if(!r)return;const{offsetLeft:s,offsetWidth:l}=r,c=s-n/2+l/2;Math.abs(c-a)<16||(0,o.Z)(e,c,p)}),[i]);const f=(0,c.Z)();return a.ZP.createElement("div",{className:"TabList no-selection no-scrollbar "+(d?"big":""),ref:m,dir:f.isRtl?"rtl":void 0},t.map(((e,t)=>{var o;return a.ZP.createElement(v,{key:null!==(o=e.id)&&void 0!==o?o:e.title,title:n&&e.id!==r.Nf?e.title:f(e.title),isActive:t===i,isBlocked:e.isBlocked,badgeCount:e.badgeCount,isBadgeActive:e.isBadgeActive,previousActiveTab:h,onClick:u,clickArg:t})})))}))},53455:(e,t,n)=>{n.d(t,{Yy:()=>o,ZP:()=>h,fi:()=>i,vb:()=>c});var a=n(91090),r=n(60782);const i=[{icon:"user",title:"FilterContacts",key:"contacts"},{icon:"non-contacts",title:"FilterNonContacts",key:"nonContacts"},{icon:"group",title:"FilterGroups",key:"groups"},{icon:"channel",title:"FilterChannels",key:"channels"},{icon:"bots",title:"FilterBots",key:"bots"}],o=[{icon:"mute",title:"FilterMuted",key:"excludeMuted"},{icon:"archive",title:"FilterArchived",key:"excludeArchived"},{icon:"readchats",title:"FilterRead",key:"excludeRead"}],s=["includedChatIds","bots","channels","groups","contacts","nonContacts"],l=["excludedChatIds","excludeArchived","excludeMuted","excludeRead"];function c(e,t,n){let a=[],i=[];if("included"===t){const{includedChatIds:t,...o}=n?e.includeFilters||{}:(0,r.ei)(e.folder,s);a=t||[],i=Object.keys(o).filter((e=>Boolean(o[e])))}else{const{excludedChatIds:t,...o}=n?e.excludeFilters||{}:(0,r.ei)(e.folder,l);a=t||[],i=Object.keys(o).filter((e=>Boolean(o[e])))}return{selectedChatIds:a,selectedChatTypes:i}}function d(e){if(e){const{includedChatIds:t,...n}=e;if(Object.values(n).filter(Boolean).length>1||null!=t&&t.length)return"";if(n.bots)return"Bots";if(n.groups)return"Groups";if(n.channels)return"Channels";if(n.contacts)return"Contacts";if(n.nonContacts)return"Non-Contacts"}return""}const u={mode:"create",chatFilter:"",folder:{title:"",includedChatIds:[],excludedChatIds:[]}},m=(e,t)=>{switch(t.type){case"setTitle":return{...e,folder:{...e.folder,title:t.payload},isTouched:!0};case"editIncludeFilters":return{...e,includeFilters:(0,r.ei)(e.folder,s)};case"editExcludeFilters":return{...e,excludeFilters:(0,r.ei)(e.folder,l)};case"setIncludeFilters":return{...e,includeFilters:t.payload,chatFilter:""};case"setExcludeFilters":return{...e,excludeFilters:t.payload,chatFilter:""};case"saveFilters":return e.includeFilters?{...e,folder:{...(0,r.CE)(e.folder,s),title:e.folder.title?e.folder.title:d(e.includeFilters),...e.includeFilters},includeFilters:void 0,chatFilter:"",isTouched:!0}:e.excludeFilters?{...e,folder:{...(0,r.CE)(e.folder,l),...e.excludeFilters},excludeFilters:void 0,chatFilter:"",isTouched:!0}:e;case"editFolder":{const{id:e,description:n,...a}=t.payload;return{mode:"edit",folderId:e,folder:a,chatFilter:""}}case"setChatFilter":return{...e,chatFilter:t.payload};case"setIsLoading":return{...e,isLoading:t.payload};case"setError":return{...e,error:t.payload};case"reset":return u;default:return e}},h=()=>(0,a.Z)(m,u)},23186:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(14050),r=n(33555),i=n(83716),o=n(10396),s=n(85266),l=n(64532),c=n(274),d=n(29290);function u(e){let t={};if(e&&e.current){const{play:n,pause:a,setCurrentTime:i,proxy:o,requestNextTrack:s,requestPreviousTrack:l,isFirst:c,isLast:d}=e.current;t={play:()=>{n(o.src)},pause:()=>{a()},stop:()=>{a(),i(0),(0,r.Sv)().closeAudioPlayer()},seekbackward:e=>{const t=e.seekOffset||10;i(Math.max(o.currentTime-t,0))},seekforward:e=>{const t=e.seekOffset||10;i(Math.min(o.currentTime+t,o.duration))},seekTo:e=>{e.seekTime&&i(e.seekTime)}},d()||(t.nexttrack=()=>{s()}),c()||(t.previoustrack=()=>{l()})}return t}const m=function(e,t,n,m,h,v,p){let f=arguments.length>7&&void 0!==arguments[7]&&arguments[7],g=arguments.length>8?arguments[8]:void 0,Z=arguments.length>9?arguments[9]:void 0,P=arguments.length>10&&void 0!==arguments[10]&&arguments[10],E=arguments.length>11&&void 0!==arguments[11]&&arguments[11];const y=(0,a.sO)(null),[C,b]=(0,a.eJ)(!1);let w=C;const[N,k]=(0,a.eJ)(0),I=(0,a.I4)((()=>{b(!1),Z&&Z()}),[Z]);(0,d.Z)((()=>{y.current=(0,o.z2)(e,n,((e,a)=>{var o;switch(e){case"onPlay":{const{setVolume:e,setPlaybackRate:a,toggleMuted:o,proxy:s}=y.current;b(!0),(0,l.N)(v,u(y)),(0,l.pC)("playing"),e((0,r.Rd)().audioPlayer.volume),o(Boolean((0,r.Rd)().audioPlayer.isMuted));const c=s.duration&&Number.isFinite(s.duration)?s.duration:t;("voice"===n||c>i.J0)&&a((0,r.Rd)().audioPlayer.playbackRate),(0,l.NS)({duration:s.duration||0,playbackRate:s.playbackRate,position:s.currentTime});break}case"onRateChange":{const{proxy:e}=y.current;(0,l.NS)({duration:e.duration||0,playbackRate:e.playbackRate,position:e.currentTime});break}case"onPause":b(!1),(0,l.pC)("paused");break;case"onTimeUpdate":{const{proxy:e}=y.current,n=e.duration&&Number.isFinite(e.duration)?e.duration:t;E||k(e.currentTime/n);break}case"onEnded":(0,l.pC)("paused")}null==h||null===(o=h[e])||void 0===o||o.call(h,a)}),g,I);const{proxy:a}=y.current;C||a.paused||(b(!0),w=!0),p&&p(a)}),[e]),(0,a.d4)((()=>{C&&v&&(0,l.Ym)(v)}),[v,C]);const{play:S,pause:M,setCurrentTime:T,proxy:x,destroy:L,setVolume:$,stop:D,isFirst:O,isLast:A,requestNextTrack:F,requestPreviousTrack:R,setPlaybackRate:U,toggleMuted:B}=y.current,X=x.duration&&Number.isFinite(x.duration)?x.duration:t;(0,a.d4)((()=>{!X||(0,s.z)(x)||E||k(x.currentTime/X)}),[X,N,x,E]),(0,a.d4)((()=>()=>{L(P)}),[L,P]),(0,c.Z)((e=>{let[t,n]=e;t===f&&m===n||x.src&&x.paused||f&&m&&!C&&S(m)}),[f,m,C,S,x.src,x.paused]);const V=(0,a.I4)((()=>{m&&S(m)}),[m,S]),Y=(0,a.I4)((()=>{C?M():V()}),[M,V,C]),_=(0,a.I4)((e=>{T(e),X&&k(x.currentTime/X)}),[X,x,T]);return{isPlaying:w,playProgress:N,playPause:Y,pause:M,play:V,stop:D,setCurrentTime:_,setVolume:$,audioProxy:x,duration:X,requestNextTrack:F,requestPreviousTrack:R,isFirst:O,isLast:A,setPlaybackRate:U,toggleMuted:B}}},12019:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(14050),r=n(69118),i=n(85266);function o(e,t){const n=[];for(let a=0;a<e.length;a++)n.push({start:e.start(a)/t,end:e.end(a)/t});return n}const s=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const[t,n]=(0,a.eJ)(!e),[s,l]=(0,a.eJ)(0),[c,d]=(0,a.eJ)([]),u=(0,a.Ye)((()=>(0,r.Ds)(n,200,!1,!0)),[]),m=(0,a.I4)((e=>{const t=e.currentTarget;if(!(0,i.z)(t)){if(t.buffered.length){const e=o(t.buffered,t.duration);d(e);const n=e.reduce(((e,t)=>{let{start:n,end:a}=t;return e+a-n}),0);l(n/t.duration)}u(t.readyState>=3||t.currentTime>0)}}),[u]),h={onLoadedData:m,onPlaying:m,onLoadStart:m,onPause:m,onTimeUpdate:m,onProgress:m};return{isBuffered:t,bufferedProgress:s,bufferedRanges:c,bufferingHandlers:h,checkBuffering(e){u(e.readyState>=3)}}}},15866:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(14050),r=n(96264),i=n(65326),o=n(77361);function s(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;const s=(0,a.sO)(null),l=(0,i.Z)();return(0,a.d4)((()=>{const a=s.current;if(!e||!a||t)return;const i=new Image,l=()=>{a.width=i.width,a.height=i.height;const e=a.getContext("2d",{alpha:!1});o.vX&&(e.filter="blur(2px)"),e.drawImage(i,-4,-4,a.width+8,a.height+8),o.vX||(0,r.Z)(e,0,0,a.width,a.height,2,2)};i.onload=()=>{n?requestAnimationFrame(l):l()},i.src=e}),[s,e,l,t,n]),s}},41470:(e,t,n)=>{n.d(t,{Z:()=>c});var a=n(14050),r=n(33555),i=n(83716),o=n(83158),s=n(60782),l=n(59107);const c=function(e){let{chat:t,user:n,folderId:c,isPinned:d,isMuted:u,canChangeFolder:m,handleDelete:h,handleChatFolderChange:v,handleReport:p}=e,f=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const g=(0,l.Z)(),{isSelf:Z}=n||{},P=(null==n?void 0:n.id)===i.aw;return(0,a.Ye)((()=>{if(!t)return;const{toggleChatPinned:e,updateChatMutedState:a,toggleChatArchived:i,toggleChatUnread:l}=(0,r.Sv)(),E=m?{title:g("ChatList.Filter.AddToFolder"),icon:"folder",handler:v}:void 0,y=d?{title:g("UnpinFromTop"),icon:"unpin",handler:()=>e({id:t.id,folderId:c})}:{title:g("PinToTop"),icon:"pin",handler:()=>e({id:t.id,folderId:c})};if(f)return(0,s.oA)([y,E]);const C=t.unreadCount||t.hasUnreadMark?{title:g("MarkAsRead"),icon:"readchats",handler:()=>l({id:t.id})}:{title:g("MarkAsUnread"),icon:"unread",handler:()=>l({id:t.id})},b=u?{title:g("ChatList.Unmute"),icon:"unmute",handler:()=>a({chatId:t.id,isMuted:!1})}:{title:g("ChatList.Mute"),icon:"mute",handler:()=>a({chatId:t.id,isMuted:!0})},w=(0,o.pE)(t)?{title:g("Unarchive"),icon:"unarchive",handler:()=>i({id:t.id})}:{title:g("Archive"),icon:"archive",handler:()=>i({id:t.id})},N=p&&((0,o.eA)(t)||(0,o.Bf)(t)||n&&!n.isSelf)?{title:g("ReportPeer.Report"),icon:"flag",handler:p}:void 0,k={title:(0,o.YC)(t.id)?g("Delete"):g((0,o.cc)(t)?"DeleteChat":(0,o.eA)(t)?"LeaveChannel":"Group.LeaveGroup"),icon:"delete",destructive:!0,handler:h},I=void 0!==c;return(0,s.oA)([E,C,y,!Z&&b,!Z&&!P&&!I&&w,N,k])}),[t,n,m,g,v,d,f,u,h,p,c,Z,P])}},17240:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(14050),r=n(77361);function i(e){e.stopImmediatePropagation(),e.preventDefault(),e.stopPropagation()}const o=(e,t,n,o)=>{const[s,l]=(0,a.eJ)(!1),[c,d]=(0,a.eJ)(void 0),u=(0,a.I4)((e=>{t||2!==e.button||e.target.classList.add("no-selection")}),[t]),m=(0,a.I4)((e=>{e.target.classList.remove("no-selection"),t||n&&e.target.matches("a[href]")||(e.preventDefault(),c||(l(!0),d({x:e.clientX,y:e.clientY})))}),[t,n,c]),h=(0,a.I4)((()=>{l(!1)}),[]),v=(0,a.I4)((()=>{d(void 0)}),[]);return(0,a.d4)((()=>{if(t||!r.$b||o)return;const a=e.current;if(!a)return;let s;const u=()=>{s&&(clearTimeout(s),s=void 0)},m=e=>{t||(u(),s=window.setTimeout((()=>(e=>{u();const{clientX:t,clientY:o,target:s}=e.touches[0];c||n&&s.matches("a[href]")||(a.addEventListener("touchend",(function e(t){a.removeEventListener("touchend",e,!0),i(t)}),!0),r.fl&&r.cj&&a.addEventListener("mousedown",(function e(t){a.removeEventListener("mousedown",e,!0),i(t)}),!0),l(!0),d({x:t,y:o}))})(e)),200))};return a.addEventListener("touchstart",m,{passive:!0}),a.addEventListener("touchcancel",u,!0),a.addEventListener("touchend",u,!0),a.addEventListener("touchmove",u,{passive:!0}),()=>{u(),a.removeEventListener("touchstart",m),a.removeEventListener("touchcancel",u,!0),a.removeEventListener("touchend",u,!0),a.removeEventListener("touchmove",u)}}),[c,t,o,e,n]),{isContextMenuOpen:s,contextMenuPosition:c,handleBeforeContextMenu:u,handleContextMenu:m,handleContextMenuClose:h,handleContextMenuHide:v}}},63394:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(14050);const r={width:0,left:0,height:0,top:0};function i(e,t,n,i,o){const[s,l]=(0,a.eJ)("right"),[c,d]=(0,a.eJ)("bottom"),[u,m]=(0,a.eJ)(),[h,v]=(0,a.eJ)(),[p,f]=(0,a.eJ)(!1),[g,Z]=(0,a.eJ)(""),[P,E]=(0,a.eJ)("opacity: 0;");return(0,a.d4)((()=>{const a=t();if(!e||!a)return;let{x:s,y:c}=e;const u=s,h=c,p=i(),g=n(),{extraPaddingX:P=0,extraTopPadding:y=0,marginSides:C=0,extraMarginTop:b=0}=(null==o?void 0:o())||{},w=p?parseInt(getComputedStyle(p).marginTop,10)+b:void 0,N=p?{width:p.offsetWidth,height:p.offsetHeight+w}:r,k=g?g.getBoundingClientRect():r;let I,S;s+N.width+P<k.width+k.left?(s+=3,I="left"):s-N.width>0?(I="right",s-=3):(I="left",s=16),l(I),C&&"right"===I&&s+P+C>=k.width+k.left&&(s-=C),C&&"left"===I&&(s+P+C+N.width>=k.width+k.left?s-=C:s-C<=0&&(s+=C)),c+N.height<k.height+k.top?S="top":(S="bottom",c-N.height<k.top+y&&(c=k.top+k.height)),d(S);const M=a.getBoundingClientRect(),T="left"===I?Math.min(s-M.left,k.width-N.width-16):s-M.left,x=c-M.top,L=k.height-12-(w||0);f(L<N.height),E(`max-height: ${L}px;`),Z(`left: ${T}px; top: ${x}px`);const $=u-M.left-T,D=h-M.top-x-(w||0);m("left"===I?$:N.width+$),v("bottom"===S?N.height+D:D)}),[e,i,n,t,o]),{positionX:s,positionY:c,transformOriginX:u,transformOriginY:h,style:g,menuStyle:P,withScroll:p}}},75790:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(14050),r=n(33555),i=n(69118);const o=(e,t,n,o)=>{const{loadMessage:s}=(0,r.Sv)(),l=(0,a.Ye)((()=>{const n=(0,i.P2)(s,500,!0);return()=>{n({chatId:e,messageId:t,replyOriginForId:o})}}),[s,e,t,o]);(0,a.d4)((()=>{t&&!n&&l()}))}},95616:(e,t,n)=>{n.d(t,{d7:()=>o,mE:()=>l,yi:()=>s});var a=n(14050),r=n(16974),i=n(65326);function o(e){const t=(0,i.Z)();return(0,a.d4)((()=>(0,r.M2)(e,t)),[e,t]),(0,r.gO)(e)}function s(){const e=(0,i.Z)();return(0,a.d4)((()=>(0,r.O6)(e)),[e]),(0,r.wC)()}function l(){const e=(0,i.Z)();return(0,a.d4)((()=>(0,r.r_)(e)),[e]),(0,r.Yz)()}},78781:(e,t,n)=>{n.d(t,{Z:()=>r});var a=n(14050);const r=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,a.d4)((()=>{if(e&&!t)return e.addEventListener("wheel",a,{passive:!n}),()=>{e.removeEventListener("wheel",a)};function a(t){t.deltaX||(e.scrollLeft+=t.deltaY/4,n&&t.preventDefault())}}),[e,t,n])}},73541:(e,t,n)=>{n.d(t,{y:()=>s});var a=n(14050);var r=n(16063);const i=new Set(["INPUT","TEXTAREA","SELECT"]),o=(0,r._)();function s(e){(0,a.d4)((()=>{if(!e)return;const t=Object.entries(e);return o.addCallback((function(e){(function(e){return!(e.target instanceof HTMLElement)||!i.has(e.target.tagName)})(e)&&t.forEach((t=>{let[n,a]=t;(function(e){return t=>function(e,t){const{alt:n,ctrl:a,meta:r,mod:i,shift:o,key:s}=e,{altKey:l,ctrlKey:c,metaKey:d,shiftKey:u,key:m}=t;if(n!==l)return!1;if(i){if(!c&&!d)return!1}else{if(a!==c)return!1;if(r!==d)return!1}return o===u&&Boolean(s&&(m.toLowerCase()===s.toLowerCase()||t.code.replace("Key","").toLowerCase()===s.toLowerCase()))}(function(e){const t=e.toLowerCase().split("+").map((e=>e.trim())),n={alt:t.includes("alt"),ctrl:t.includes("ctrl"),meta:t.includes("meta"),mod:t.includes("mod"),shift:t.includes("shift")},a=["alt","ctrl","meta","shift","mod"];return{...n,key:t.find((e=>!a.includes(e)))}}(e),t)})(n)(e)&&a(e)}))}))}),[e])}document.documentElement.addEventListener("keydown",o.runCallbacks)},12515:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(14050),r=n(77361);function i(e,t,n){(0,a.d4)((()=>{t?r.wB||setTimeout((()=>{requestAnimationFrame((()=>{e.current&&e.current.focus()}))}),500):(e.current&&e.current.blur(),n&&setTimeout(n,300))}),[e,t,n])}},72645:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(14050),r=n(87204);const i=(e,t,n)=>{const i=(0,r.Z)(t);return(0,a.bt)((()=>e(i||[])),t,n)}},92566:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(14050),r=n(77361),i=n(6137),o=n(69118),s=n(40647),l=n(65326),c=n(26926);const d={},u=()=>{const e=(0,a.sO)();return e.current||(e.current=(0,c.Z)(d),d[e.current]=!0),e.current};function m(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.IU.BlobUrl,c=arguments.length>3?arguments[3]:void 0,d=arguments.length>4?arguments[4]:void 0,m=arguments.length>5&&void 0!==arguments[5]&&arguments[5];const h=e?s.UV(e):void 0,v=n===i.IU.Stream||r.I_&&n===i.IU.Progressive,p=(0,l.Z)(),f=u(),[g,Z]=(0,a.eJ)(h&&!v?1:0),P=(0,a.sO)(),E=(0,a.Ye)((()=>(0,o.P2)((e=>{P.current&&(!d||Date.now()-P.current>d)&&Z(e)}),500,!0)),[d]);return(0,a.d4)((()=>{!t&&e&&(h?v&&setTimeout((()=>{Z(.75)}),1500):(Z(0),P.current&&s.cC(E),P.current=Date.now(),s.he(e,n,m,E,f).then((()=>{const e=Date.now()-P.current;P.current=void 0,!d||e>=d?p():setTimeout(p,d-e)}))))}),[t,e,h,n,c,p,v,d,E,m,f]),(0,a.d4)((()=>{t&&P.current&&(s.cC(E),Z(0),P.current=void 0)}),[E,t]),(0,a.d4)((()=>()=>{e&&s.Iq(e,f)}),[f,e]),{mediaData:h,loadProgress:g}}},56503:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(14050),r=n(77361);let i;function o(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:250,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const s=(0,a.sO)(!1),l=(0,a.I4)((()=>{s.current=!0}),[]);(0,a.d4)((()=>{i&&(clearTimeout(i),i=void 0),!e||r.$b||o||(i=window.setTimeout((()=>{s.current||t()}),2*n))}),[o,e,n,t]);const c=(0,a.I4)((()=>{s.current=!0}),[]),d=(0,a.I4)((()=>{s.current=!1,i&&(clearTimeout(i),i=void 0),i=window.setTimeout((()=>{s.current||t()}),n)}),[n,t]);return[c,d,l]}},52678:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(14050),r=n(87204),i=n(65326),o=n(29290);function s(e,t){const n=(0,r.Z)(e,!0),s=(0,a.sO)(),l=(0,i.Z)(),c=null!=e,d=null!=n;return c&&s.current&&(clearTimeout(s.current),s.current=void 0),(0,o.Z)((()=>{t&&!c&&d&&!s.current&&(s.current=window.setTimeout((()=>{s.current=void 0,l()}),t))}),[e]),s.current&&t&&!c?n:e}},91090:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(14050),r=n(65326);function i(e,t){const n=(0,r.Z)(),i=(0,a.sO)(e),o=(0,a.sO)(t),s=(0,a.I4)((e=>{o.current=i.current(o.current,e),n()}),[n]);return[o.current,s]}},88957:(e,t,n)=>{n.d(t,{Z:()=>r});var a=n(67360);function r(e,t,n){return(0,a.Z)((e=>{e()}),[],e,t,n)}},33057:(e,t,n)=>{n.d(t,{Z:()=>u});var a=n(14050),r=n(65116),i=n(83716),o=n(790),s=n(59107),l=n(99203),c=n(48778);const d=(0,a.X$)((e=>{const{isOpen:t}=e,n=(0,c.Z)(l.gl.Extra,"CalendarModal",!t);return n?a.ZP.createElement(n,e):void 0})),u=(e,t)=>{const n=(0,s.Z)(),[l,c]=(0,a.eJ)(),u=(0,a.I4)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{serverTimeOffset:n}=(0,r.Rd)(),a=Math.round(Math.max(e.getTime(),Date.now()+6e4)/1e3)+(t?0:n);null==l||l(a),c(void 0)}),[l]),m=(0,a.I4)((()=>{u(new Date(1e3*i.t4),!0)}),[u]),h=(0,a.I4)((()=>{c(void 0),null==t||t()}),[t]),v=(0,a.I4)((e=>{c((()=>e))}),[]),p=new Date;p.setSeconds(0),p.setMilliseconds(0);const f=new Date;return f.setFullYear(f.getFullYear()+1),[v,a.ZP.createElement(d,{isOpen:Boolean(l),withTimePicker:!0,selectedAt:p.getTime(),maxAt:(0,o._F)(f),isFutureMode:!0,secondButtonLabel:e?n("Schedule.SendWhenOnline"):void 0,onClose:h,onSubmit:u,onSecondButtonClick:e?m:void 0})]}},56389:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(14050),r=n(33555),i=n(83716),o=n(69118);const s=(e,t)=>(0,a.Ye)((()=>(0,o.P2)((n=>{(0,r.Sv)().sendMessageAction({chatId:e,threadId:t,action:n})}),i.o_)),[e,t])},70971:(e,t,n)=>{n.d(t,{Y:()=>i});var a=n(14050),r=n(29290);function i(e){const t=(0,a.sO)(e);return(0,r.Z)((()=>{t.current=e}),[e]),t}},28183:(e,t,n)=>{n.d(t,{Z:()=>r});var a=n(14050);const r=function(e,t){const n=(0,a.sO)(e);(0,a.bt)((()=>{n.current=e}),[e]),(0,a.d4)((()=>{if("number"!=typeof t)return;const e=setTimeout((()=>n.current()),t);return()=>clearTimeout(e)}),[t])}},96264:(e,t,n)=>{n.d(t,{Z:()=>i});const a=[1,57,41,21,203,34,97,73,227,91,149,62,105,45,39,137,241,107,3,173,39,71,65,238,219,101,187,87,81,151,141,133,249,117,221,209,197,187,177,169,5,153,73,139,133,127,243,233,223,107,103,99,191,23,177,171,165,159,77,149,9,139,135,131,253,245,119,231,224,109,211,103,25,195,189,23,45,175,171,83,81,79,155,151,147,9,141,137,67,131,129,251,123,30,235,115,113,221,217,53,13,51,50,49,193,189,185,91,179,175,43,169,83,163,5,79,155,19,75,147,145,143,35,69,17,67,33,65,255,251,247,243,239,59,29,229,113,111,219,27,213,105,207,51,201,199,49,193,191,47,93,183,181,179,11,87,43,85,167,165,163,161,159,157,155,77,19,75,37,73,145,143,141,35,138,137,135,67,33,131,129,255,63,250,247,61,121,239,237,117,29,229,227,225,111,55,109,216,213,211,209,207,205,203,201,199,197,195,193,48,190,47,93,185,183,181,179,178,176,175,173,171,85,21,167,165,41,163,161,5,79,157,78,154,153,19,75,149,74,147,73,144,143,71,141,140,139,137,17,135,134,133,66,131,65,129,1],r=[0,9,10,10,14,12,14,14,16,15,16,15,16,15,15,17,18,17,12,18,16,17,17,19,19,18,19,18,18,19,19,19,20,19,20,20,20,20,20,20,15,20,19,20,20,20,21,21,21,20,20,20,21,18,21,21,21,21,20,21,17,21,21,21,22,22,21,22,22,21,22,21,19,22,22,19,20,22,22,21,21,21,22,22,22,18,22,22,21,22,22,23,22,20,23,22,22,23,23,21,19,21,21,21,23,23,23,22,23,23,21,23,22,23,18,22,23,20,22,23,23,23,21,22,20,22,21,22,24,24,24,24,24,22,21,24,23,23,24,21,24,23,24,22,24,24,22,24,24,22,23,24,24,24,20,23,22,23,24,24,24,24,24,24,24,23,21,23,22,23,24,24,24,22,24,24,24,23,22,24,24,25,23,25,25,23,24,25,25,24,22,25,25,25,24,23,24,25,25,25,25,25,25,25,25,25,25,25,25,23,25,23,24,25,25,25,25,25,25,25,25,25,24,22,25,25,23,25,25,20,24,25,24,25,25,22,24,25,24,25,24,25,25,24,25,25,25,25,22,25,25,25,24,25,24,25,18];function i(e,t,n,i,o,s,l){if(Number.isNaN(s)||s<1)return;s|=0,Number.isNaN(l)&&(l=1),(l|=0)>3&&(l=3),l<1&&(l=1);const c=e.getImageData(t,n,i,o),d=c.data;let u,m,h,v,p,f,g,Z,P,E,y,C,b=i-1,w=o-1,N=s+1,k=[],I=[],S=[],M=a[s],T=r[s],x=[],L=[];for(;l-- >0;){for(C=y=0,p=0;p<o;p++){for(u=d[C]*N,m=d[C+1]*N,h=d[C+2]*N,f=1;f<=s;f++)g=C+((f>b?b:f)<<2),u+=d[g++],m+=d[g++],h+=d[g++];for(v=0;v<i;v++)k[y]=u,I[y]=m,S[y]=h,0==p&&(x[v]=((g=v+N)<b?g:b)<<2,L[v]=(g=v-s)>0?g<<2:0),Z=C+x[v],P=C+L[v],u+=d[Z++]-d[P++],m+=d[Z++]-d[P++],h+=d[Z++]-d[P++],y++;C+=i<<2}for(v=0;v<i;v++){for(E=v,u=k[E]*N,m=I[E]*N,h=S[E]*N,f=1;f<=s;f++)E+=f>w?0:i,u+=k[E],m+=I[E],h+=S[E];for(y=v<<2,p=0;p<o;p++)d[y]=u*M>>>T,d[y+1]=m*M>>>T,d[y+2]=h*M>>>T,0==v&&(x[p]=((g=p+N)<w?g:w)*i,L[p]=(g=p-s)>0?g*i:0),Z=v+x[p],P=v+L[p],u+=k[Z]-k[P],m+=I[Z]-I[P],h+=S[Z]-S[P],y+=i<<2}}e.putImageData(c,t,n)}},10396:(e,t,n)=>{n.d(t,{An:()=>E,Es:()=>f,z2:()=>g});var a=n(33555),r=n(91713),i=n(77361),o=n(74753),s=n(85266),l=n(83158),c=n(69118),d=n(11192);const u=new Map;let m,h=[],v=[];function p(e,t){const n=m&&u.get(m);n&&(n.audio.pause(),n.audio.currentTime=0,n.onTrackChange&&n.onTrackChange());const i=P(e,(0,a.Rd)().audioPlayer.origin||r.Cr.Inline,t);if(!i)return;if(!u.has(i))return void(0,a.Sv)().openAudioPlayer((0,l.Ak)(y(i).messageKey));const s=u.get(i);s.onForcePlay&&s.onForcePlay(),m=i,s.audio.src&&(0,o.Z)(s.audio)}function f(){const e=m&&u.get(m);e&&e.audio.pause()}function g(e,t,n,f,g){if(!u.has(e)){const n=function(e,t,n,a){const r=new Audio;function i(t){return n=>{u.has(e)&&((0,s.z)(r)||u.get(e).handlers.forEach((e=>{e(t,n)})))}}return r.addEventListener("timeupdate",i("onTimeUpdate")),r.addEventListener("play",i("onPlay")),r.addEventListener("pause",i("onPause")),r.addEventListener("loadstart",i("onLoadStart")),r.addEventListener("loadeddata",i("onLoadedData")),r.addEventListener("playing",i("onPlaying")),r.addEventListener("ended",(()=>{u.has(e)&&((0,s.z)(r)||p(e))})),{audio:r,type:t,proxy:new Proxy(r,{get:(e,t)=>e[t]}),handlers:[],onForcePlay:n,onTrackChange:a}}(e,t,f,g);u.set(e,n),function(e,t){"audio"!==e.type||v.includes(t)||(v.push(t),v.sort(C)),"voice"!==e.type||h.includes(t)||(h.push(t),h.sort(C))}(n,e)}const{audio:Z,proxy:E,handlers:b}=u.get(e);return b.push(n),{play(n){if(!Z.paused)return;const c=m&&u.get(m);c&&m!==e&&(c.audio.pause(),c.audio.currentTime=0,(0,s.z)(c.audio)&&(c.audio.dataset.preventPlayAfterPatch="true"),c.onTrackChange&&c.onTrackChange()),m=e,Z.src||(Z.src=n,Z.preload="auto",n.includes("/progressive/")&&i.s$&&(delete Z.dataset.preventPlayAfterPatch,(0,s.B)(Z))),(0,o.Z)(Z),function(e,t){var n;if((0,a.Rd)().globalSearch.currentContent===r.nJ.Music)return;const{chatId:i}=(0,l.Ak)(y(t).messageKey),o=null===(n=(0,d.Bt)((0,a.Rd)()))||void 0===n?void 0:n.chatId,s=e=>e.startsWith(`msg${i}`)||o&&e.startsWith(`msg${o}`);"audio"===e&&(v=v.filter(s)),"voice"===e&&(h=h.filter(s))}(t,e)},pause(){m===e&&Z.pause()},stop(){if(m===e){const e=Z.src;Z.pause(),(0,c.T2)((()=>{Z.src="",Z.src=e}))}},setCurrentTime(t){m===e&&(Z.fastSeek?Z.fastSeek(t):Z.currentTime=t)},setVolume(t){m===e&&(Z.volume=t,Z.muted=!1)},setPlaybackRate(t){m===e&&(Z.playbackRate=t)},toggleMuted(e){Z.muted=void 0===e?!Z.muted:e},proxy:E,requestNextTrack(){p(e)},isLast:()=>!P(e,(0,a.Rd)().audioPlayer.origin),isFirst:()=>!P(e,(0,a.Rd)().audioPlayer.origin,!0),requestPreviousTrack(){p(e,!0)},destroy(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const a=u.get(e);a&&(a.handlers=a.handlers.filter((e=>e!==n)),a.handlers.length||(a.audio.pause(),u.delete(e),t&&function(e,t){const n=e=>e!==t;"audio"===e.type&&(v=v.filter(n)),"voice"===e.type&&(h=h.filter(n))}(a,e),e===m&&(m=void 0)))}}}function Z(e){switch(e.type){case"audio":return v;case"voice":return h;default:return}}function P(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.Cr.Inline,n=arguments.length>2?arguments[2]:void 0;const a=u.get(e),i=Z(a);if(!i)return;if(t===r.Cr.Search){const t=i.indexOf(e);if(t<0)return;return i[t+(n?-1:1)]}const{chatId:o}=(0,l.Ak)(y(e).messageKey),s=i.filter((e=>e.startsWith(`msg${o}`))),c=s.indexOf(e);if(c<0)return;let d=t===r.Cr.Inline?-1:1;return n&&(d*=-1),s[c+d]}function E(e){return`${(0,l.Tp)(e)}-${e.date}`}function y(e){return{messageKey:e.match(/^msg(-?\d+)-(\d+)/)[0],date:Number(e.split("-").pop())}}function C(e,t){if(!e||!t)return 0;const{date:n,messageKey:a}=y(e),{date:r,messageKey:i}=y(t),o=r-n;return 0===o?i.localeCompare(a):o}},64963:(e,t,n)=>{n.d(t,{vJ:()=>l,eM:()=>s,sf:()=>h});var a=n(77361);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=n(28712),o=n(69118);let s;!function(e){e[e.Up=0]="Up",e[e.Down=1]="Down",e[e.Left=2]="Left",e[e.Right=3]="Right"}(s||(s={}));const l=20;function c(e,t){return t?Math.hypot(t.pageX-e.pageX,t.pageY-e.pageY):0}function d(e,t){return{x:(e.pageX+t.pageX)/2,y:(e.pageY+t.pageY)/2}}let u=0;const m=new class{constructor(){let{stability:e=8,sensitivity:t=100,tolerance:n=1.1,delay:a=150}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,"stability",void 0),r(this,"sensitivity",void 0),r(this,"tolerance",void 0),r(this,"delay",void 0),r(this,"lastUpDeltas",void 0),r(this,"lastDownDeltas",void 0),r(this,"deltasTimestamp",void 0),this.stability=e,this.sensitivity=t,this.tolerance=n,this.delay=a,this.lastUpDeltas=new Array(2*this.stability).fill(0),this.lastDownDeltas=new Array(2*this.stability).fill(0),this.deltasTimestamp=new Array(2*this.stability).fill(0)}check(e){let t;return void 0!==(e=e.originalEvent||e).wheelDelta?t=e.wheelDelta:void 0!==e.deltaY?t=-40*e.deltaY:void 0===e.detail&&0!==e.detail||(t=-40*e.detail),this.deltasTimestamp.push(Date.now()),this.deltasTimestamp.shift(),t>0?(this.lastUpDeltas.push(t),this.lastUpDeltas.shift(),this.isInertia(1)):(this.lastDownDeltas.push(t),this.lastDownDeltas.shift(),this.isInertia(-1))}isInertia(e){const t=-1===e?this.lastDownDeltas:this.lastUpDeltas;if(void 0===t[0])return e;if(this.deltasTimestamp[2*this.stability-2]+this.delay>Date.now()&&t[0]===t[2*this.stability-1])return!1;const n=t.slice(0,this.stability),a=t.slice(this.stability,2*this.stability),r=n.reduce(((e,t)=>e+t)),i=a.reduce(((e,t)=>e+t)),o=r/n.length,s=i/a.length;return Math.abs(o)<Math.abs(s*this.tolerance)&&this.sensitivity<Math.abs(s)}}({stability:5,sensitivity:25,tolerance:.6,delay:150});function h(e,t){var n,r,h;let v,p,f=!1,g=!1,Z=!1,P=0,E=null!==(n=t.initialZoom)&&void 0!==n?n:1,y={x:0,y:0},C={x:!1,y:!1},b={x:window.innerWidth/2,y:window.innerHeight/2};const w=null!==(r=t.minZoom)&&void 0!==r?r:1,N=null!==(h=t.maxZoom)&&void 0!==h?h:4;function k(e){if(!t.excludedClosestSelector||!e.target.matches(t.excludedClosestSelector)&&!e.target.closest(t.excludedClosestSelector)){if(v=e,"mousedown"===e.type)!t.withNativeDrag&&t.onDrag&&e.preventDefault(),document.addEventListener("mousemove",S),document.addEventListener("mouseup",I);else if("touchstart"===e.type){const t=e.target;t.addEventListener("touchmove",S,{passive:!0}),t.addEventListener("touchend",I),t.addEventListener("touchcancel",I),"touches"in e&&(void 0===e.pageX&&(e.pageX=e.touches[0].pageX),void 0===e.pageY&&(e.pageY=e.touches[0].pageY),2===e.touches.length&&(P=c(e.touches[0],e.touches[1]),b=d(e.touches[0],e.touches[1])))}t.withCursor&&document.body.classList.add("cursor-grabbing"),t.onCapture&&t.onCapture(e)}}function I(e){v&&(t.withCursor&&document.body.classList.remove("cursor-grabbing"),document.removeEventListener("mouseup",I),document.removeEventListener("mousemove",S),v.target.removeEventListener("touchcancel",I),v.target.removeEventListener("touchend",I),v.target.removeEventListener("touchmove",S),a.cj&&t.selectorToPreventScroll&&Array.from(document.querySelectorAll(t.selectorToPreventScroll)).forEach((e=>{e.style.overflow=""})),e&&(f?t.onRelease&&t.onRelease(e):"mouseup"===e.type&&(t.onDoubleClick&&Date.now()-u<300?t.onDoubleClick(e,{centerX:v.pageX,centerY:v.pageY}):!t.onClick||"button"in e&&0!==e.button||t.onClick(e),u=Date.now()))),f=!1,g=!1,Z=!1,P=0,E=(0,i.uZ)(E,w,N),p=void 0,y={x:0,y:0},C={x:!1,y:!1},b={x:window.innerWidth/2,y:window.innerHeight/2},v=void 0}function S(e){if(v){if("touchmove"===e.type&&"touches"in e&&(void 0===e.pageX&&(e.pageX=e.touches[0].pageX),void 0===e.pageY&&(e.pageY=e.touches[0].pageY),t.onZoom&&P>0&&2===e.touches.length)){const n=c(e.touches[0],e.touches[1]),a=d(e.touches[0],e.touches[1]),r=a.x-b.x,i=a.y-b.y,o=n/P;t.onZoom(e,{zoomFactor:o,initialCenterX:b.x,initialCenterY:b.y,dragOffsetX:r,dragOffsetY:i,currentCenterX:a.x,currentCenterY:a.y}),1!==o&&(f=!0)}const n=e.pageX-v.pageX,r=e.pageY-v.pageY;(Math.abs(n)>=15||Math.abs(r)>=15)&&(f=!0);let i=!1;t.onDrag&&(t.onDrag(e,v,{dragOffsetX:n,dragOffsetY:r}),i=!0),t.onSwipe&&!g&&(g=function(e,n,r){if(a.cj){const t=e.touches[0].pageX;if(t<=l||t>=window.innerWidth-l)return!1}const i=Math.abs(n),o=Math.abs(r);if(n&&r&&Math.max(i,o)/Math.min(i,o)<2)return!1;let c;if(i>=50?c="x":o>=50&&(c="y"),!c)return!1;if(p){if(p!==c)return!1}else p=c;return function(e,t,n,a,r){return"x"===t?r(e,n<0?s.Left:s.Right):"y"===t&&r(e,a<0?s.Up:s.Down)}(e,c,n,r,t.onSwipe)}(e,n,r),i=g),a.cj&&i&&t.selectorToPreventScroll&&Array.from(document.querySelectorAll(t.selectorToPreventScroll)).forEach((e=>{e.style.overflow="hidden"}))}}const M=(0,o.Ds)(I,150,!1),T=(0,o.Ds)(I,150,!1);function x(e){f||(k(e),f=!0,b={x:e.x,y:e.y})}function L(e){if(!t.onZoom&&!t.onDrag)return;if(t.excludedClosestSelector&&(e.target.matches(t.excludedClosestSelector)||e.target.closest(t.excludedClosestSelector)))return;e.preventDefault(),e.stopPropagation();const{doubleTapZoom:n=3}=t;if(t.onDoubleClick&&Object.is(e.deltaX,-0)&&Object.is(e.deltaY,-0)&&e.ctrlKey)return x(e),E=E>1?1:n,t.onDoubleClick(e,{centerX:e.pageX,centerY:e.pageY}),void(f=!1);const a=e.metaKey||e.ctrlKey||e.shiftKey;if(a&&function(e){if(!t.onZoom)return;x(e);const n=e.x-b.x,a=e.y-b.y,r=(0,i.uZ)(e.deltaY,-25,25);E-=.01*r,E=(0,i.uZ)(E,.5*w,3*N),t.onZoom(e,{zoom:(0,i.NM)(E,2),initialCenterX:b.x,initialCenterY:b.y,dragOffsetX:n,dragOffsetY:a,currentCenterX:e.x,currentCenterY:e.y}),T(e)}(e),!a&&!Z){const n=m.check(e);(1!==E||n)&&function(e){if(!t.onDrag)return;x(e),C.x&&Math.sign(y.x)!==Math.sign(e.deltaX)||(y.x-=e.deltaX),C.y&&Math.sign(y.y)!==Math.sign(e.deltaY)||(y.y-=e.deltaY);const{x:n,y:a}=y;t.onDrag(e,v,{dragOffsetX:n,dragOffsetY:a},((e,t)=>{C={x:e,y:t}})),M(e)}(e)}}return e.addEventListener("wheel",L),e.addEventListener("mousedown",k),e.addEventListener("touchstart",k,{passive:!t.isNotPassive}),()=>{I(),e.removeEventListener("wheel",L),e.removeEventListener("touchstart",k),e.removeEventListener("mousedown",k)}}},75851:(e,t,n)=>{n.d(t,{CO:()=>i,eb:()=>s,ix:()=>l,rZ:()=>c,uR:()=>d,wK:()=>r,xP:()=>o});var a=n(71394);function r(e){return[parseInt(e.substring(0,2),16),parseInt(e.substring(2,4),16),parseInt(e.substring(4,6),16)]}function i(e){const t=e[0].toString(16),n=e[1].toString(16),a=e[2].toString(16);return(1==t.length?"0"+t:t)+(1==n.length?"0"+n:n)+(1==a.length?"0"+a:a)}function o(e){let[t,n,a]=e;t/=255,n/=255,a/=255;let r,i,o=Math.max(t,n,a),s=Math.min(t,n,a),l=o,c=o-s;if(i=0==o?0:c/o,o==s)r=0;else{switch(o){case t:r=(n-a)/c+(n<a?6:0);break;case n:r=(a-t)/c+2;break;case a:r=(t-n)/c+4}r/=6}return[r,i,l]}function s(e){let t,n,a,[r,i,o]=e,s=Math.floor(6*r),l=6*r-s,c=o*(1-i),d=o*(1-l*i),u=o*(1-(1-l)*i);switch(s%6){case 0:t=o,n=u,a=c;break;case 1:t=d,n=o,a=c;break;case 2:t=c,n=o,a=u;break;case 3:t=c,n=d,a=o;break;case 4:t=u,n=c,a=o;break;case 5:t=o,n=c,a=d}return[Math.round(255*t),Math.round(255*n),Math.round(255*a)]}async function l(e){const t=[0,0,0];let n,r,i,o,s=-4,l=[0,0,0],c=0;const d=document.createElement("canvas"),u=d.getContext&&d.getContext("2d");if(!u)return t;const m=await(0,a.pt)(e);i=m.naturalHeight||m.offsetHeight||m.height,r=m.naturalWidth||m.offsetWidth||m.width,d.height=i,d.width=r,u.drawImage(m,0,0);try{n=u.getImageData(0,0,r,i)}catch(e){return t}for(o=n.data.length;(s+=20)<o;)0!==n.data[s+3]&&(++c,l[0]+=n.data[s],l[1]+=n.data[s+1],l[2]+=n.data[s+2]);return l[0]=Math.floor(l[0]/c),l[1]=Math.floor(l[1]/c),l[2]=Math.floor(l[2]/c),l}function c(e){const[t,n,a]=e;return.2126*t+.7152*n+.0722*a}function d(e){let[t,n,a]=o(e);return n=Math.min(1,n+.05+.1*(1-n)),a=a>.5?Math.max(0,.65*a):Math.max(0,Math.min(1,1-.65*a)),`hsla(${360*t}, ${100*n}%, ${100*a}%, .4)`}},3570:(e,t,n)=>{function a(e,t){return t-Math.floor(t/e)*e}n.d(t,{Z:()=>a})},60539:(e,t,n)=>{n.d(t,{N:()=>m,Z:()=>u});var a=n(33555),r=n(91713),i=n(83716),o=n(77361),s=n(18674),l=n(9933),c=n(69118);let d=!1;function u(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:i.V$,l=arguments.length>5?arguments[5]:void 0,c=arguments.length>6?arguments[6]:void 0,d=arguments.length>7?arguments[7]:void 0;const u=h(e,t,s,l);l!==r.fo.Static?((0,a.Rd)().settings.byKey.animationLevel===i.oB&&(c=0),v(e,t,u,n,o,c,d)):v(e,t,u,n,o,0)}function m(){return d}function h(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.V$,a=arguments.length>3?arguments[3]:void 0;const{offsetTop:o}=t,{scrollTop:s}=e;if(void 0===a){const t=o-e.scrollTop;if(t<-n)return s+(t+n);if(t>n)return s+(t-n)}else{if(a===r.fo.Up)return o+n;if(a===r.fo.Down)return Math.max(0,o-n)}return s}function v(e,t,n,a){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,u=arguments.length>5?arguments[5]:void 0,m=arguments.length>6?arguments[6]:void 0;const{offsetTop:h,offsetHeight:v}=t,{scrollTop:g,offsetHeight:Z,scrollHeight:P}=e,E=m&&e.dataset.normalHeight?Number(e.dataset.normalHeight):Z;let y;switch(g!==n&&(e.scrollTop=n),a){case"start":y=h-r-n+(o.wZ?1:0);break;case"end":y=h+v+r-(n+E);break;case"nearest":case"center":case"centerOrTop":y=v<E?h+v/2-(n+E/2):h-r-n}if(y<0){const e=-n;y=Math.max(y,e)}else if(y>0){const e=P-(n+E);y=Math.min(y,e)}if(0===y)return;const C=n+y;if(0===u)return void(e.scrollTop=C);d=!0;const b=Math.abs(y),w=b<i.xn?f:p,N=u||i.bK+b/i.V$*(i.ck-i.bK),k=Date.now(),I=(0,s.YW)();(0,c.T2)((()=>{(0,l.cK)((()=>{const t=Math.min((Date.now()-k)/N,1),n=y*(1-w(t));return e.scrollTop=Math.round(C-n),d=t<1,d||I(),d}))}))}function p(e){return 1-(1-e)**5}function f(e){return 1-(1-e)**3.5}},81367:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(33555),r=n(83716),i=n(9933),o=n(69118);const s=new Map;function l(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300;return(0,a.Rd)().settings.byKey.animationLevel===r.oB&&(n=0),c(e,t,n)}function c(e,t,n){const a="rtl"===e.getAttribute("dir"),{scrollLeft:r,offsetWidth:l,scrollWidth:c,dataset:{scrollId:d}}=e;let u=t-r;if(u<0){const e=-r*(a?-1:1);u=Math.max(u,e)}else if(u>0){const e=c-(r+l);u=Math.min(u,e)}if(0===u)return Promise.resolve();d&&s.has(d)&&s.get(d)();const m=r+u;if(0===n)return e.scrollLeft=m,Promise.resolve();let h=!1;const v=Math.random().toString();let p;e.dataset.scrollId=v,s.set(v,(()=>{h=!0})),e.style.scrollSnapType="none";const f=new Promise((e=>{p=e})),g=Date.now();return(0,o.T2)((()=>{(0,i.jt)((()=>{if(h)return!1;const t=Math.min((Date.now()-g)/n,1),a=u*(1-function(e){return 1-(1-e)**3.5}(t));return e.scrollLeft=Math.round(m-a),t>=1&&(e.style.scrollSnapType="",e.dataset.scrollId=void 0,s.delete(v),p()),t<1}))})),f}},65723:(e,t,n)=>{n.d(t,{Z:()=>r});var a=n(77361);function r(e,t,n){if(!t&&e===document.activeElement)return;const r=window.getSelection(),i=document.createRange(),o=e.lastChild||e;a.$b||n||o&&o.nodeValue?(i.selectNodeContents(n?e:o),i.collapse(!1),r.removeAllRanges(),r.addRange(i)):e.focus()}},60998:(e,t,n)=>{function a(){const e=window.getSelection();let t=e&&e.rangeCount?e.getRangeAt(0).cloneContents():void 0;if(!t||0===t.childElementCount)return;const n=Array.from(t.children).reduce(((e,t)=>1===t.nodeType&&t.classList.contains("message-date-group")?Array.from(t.querySelectorAll(".Message")).reduce(((e,t)=>e.concat(Number(t.dataset.messageId))),e):1===t.nodeType&&t.classList.contains("Message")?e.concat(Number(t.dataset.messageId)):e),[]);for(;t.firstChild;)t.removeChild(t.firstChild);return t=void 0,n}n.d(t,{Z:()=>a})},55254:(e,t,n)=>{n.d(t,{P:()=>r});var a=n(43858);function r(e){if("none"===e.style.display)return!1;const t=e.getBoundingClientRect(),{height:n}=a.Z.get();return t.top<=n&&t.top+t.height>=0}},64532:(e,t,n)=>{n.d(t,{Ay:()=>s,N:()=>r,NS:()=>c,Of:()=>d,Ym:()=>i,pC:()=>l});const a={play:void 0,pause:void 0,seekbackward:void 0,seekforward:void 0,previoustrack:void 0,nexttrack:void 0,stop:void 0,seekTo:void 0};function r(e,t){const{mediaSession:n}=window.navigator;n?(e&&i(e),t&&o(t)):console.warn("MediaSession API not supported in this browser")}function i(e){const{mediaSession:t}=window.navigator;t&&(t.metadata=null!=e?e:null)}function o(e){const{mediaSession:t}=window.navigator;t&&Object.entries({...a,...e}).forEach((e=>{let[n,a]=e;try{t.setActionHandler(n,a)}catch(e){}}))}function s(){const{mediaSession:e}=window.navigator;var t;e&&(e.metadata=null,o(a),e.playbackState&&(e.playbackState="none"),null===(t=e.setPositionState)||void 0===t||t.call(e))}function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"none";const{mediaSession:t}=window.navigator;t&&t.playbackState&&(t.playbackState=e)}function c(e){var t;if(!e||void 0===e.position||void 0===e.duration)return;e.position=Math.min(e.position,e.duration);const{mediaSession:n}=window.navigator;null==n||null===(t=n.setPositionState)||void 0===t||t.call(n,e)}function d(e){let{title:t,artist:n,album:a,artwork:r}=e;if("MediaMetadata"in window)return new window.MediaMetadata({title:t,artist:n,album:a,artwork:r})}},83099:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(6137),r=n(77361),i=n(83716);const o={B:a.Vv.Bold,STRONG:a.Vv.Bold,I:a.Vv.Italic,EM:a.Vv.Italic,U:a.Vv.Underline,S:a.Vv.Strike,STRIKE:a.Vv.Strike,DEL:a.Vv.Strike,CODE:a.Vv.Code,PRE:a.Vv.Pre,BLOCKQUOTE:a.Vv.Blockquote,"CUSTOM-EMOJI":a.Vv.CustomEmoji};function s(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=document.createElement("div");n.innerHTML=l(t?c(e):e);const a=n.innerText.trim().replace(/\u200b+/g,"");let r=0,i=0;const o=[];function s(e){const{index:t,entity:n}=d(e,a,r);if(n)r=t,o.push(n);else if(e.textContent){if(0===t&&""===e.textContent.trim())return;r+=e.textContent.length}e.hasChildNodes()&&i<=3&&(i+=1,Array.from(e.childNodes).forEach(s))}return Array.from(n.childNodes).forEach((e=>{i=1,s(e)})),{text:a,entities:o.length?o:void 0}}function l(e){let t=e.slice(0);return r.op||(t=t.replace(/<img[^>]+alt="([^"]+)"[^>]*>/gm,"$1")),t=t.replace(/ /g," "),t=t.replace(/<div><br([^>]*)?><\/div>/g,"\n"),t=t.replace(/<br([^>]*)?>/g,"\n"),t=t.replace(/<\/div>(\s*)<div>/g,"\n"),t=t.replace(/<div>/g,"\n"),t=t.replace(/<\/div>/g,""),t=t.replace(/^`{3}(.*?)[\n\r](.*?[\n\r]?)`{3}/gms,'<pre data-language="$1">$2</pre>'),t=t.replace(/^`{3}[\n\r]?(.*?)[\n\r]?`{3}/gms,"<pre>$1</pre>"),t=t.replace(/[`]{3}([^`]+)[`]{3}/g,"<pre>$1</pre>"),t=t.replace(/(?!<(code|pre)[^<]*|<\/)[`]{1}([^`\n]+)[`]{1}(?![^<]*<\/(code|pre)>)/g,"<code>$2</code>"),t=t.replace(/(^|\s)(?!<(?:code|pre)[^<]*|<\/)\[([^\]\n]+)\]\(customEmoji:(\d+)\)(?![^<]*<\/(?:code|pre)>)(\s|$)/g,'$1<custom-emoji document-id="$3" alt="$2">$2</custom-emoji>$4'),t=t.replace(/(^|\s)(?!<(code|pre)[^<]*|<\/)[*]{2}([^*\n]+)[*]{2}(?![^<]*<\/(code|pre)>)(\s|$)/g,"$1<b>$3</b>$5"),t=t.replace(/(^|\s)(?!<(code|pre)[^<]*|<\/)[_]{2}([^_\n]+)[_]{2}(?![^<]*<\/(code|pre)>)(\s|$)/g,"$1<i>$3</i>$5"),t=t.replace(/(^|\s)(?!<(code|pre)[^<]*|<\/)[~]{2}([^~\n]+)[~]{2}(?![^<]*<\/(code|pre)>)(\s|$)/g,"$1<s>$3</s>$5"),t=t.replace(/(^|\s)(?!<(code|pre)[^<]*|<\/)[|]{2}([^|\n]+)[|]{2}(?![^<]*<\/(code|pre)>)(\s|$)/g,`$1<span data-entity-type="${a.Vv.Spoiler}">$3</span>$5`),t}function c(e){return e.replace(new RegExp(`\\[([^\\]]+?)]\\((${i.FM}+?)\\)`,"g"),((e,t,n)=>`<a href="${n.includes("://")?n:n.includes("@")?`mailto:${n}`:`http://${n}`}">${t}</a>`))}function d(e,t,n){const r=function(e){if(o[e.nodeName])return o[e.nodeName];if("A"===e.nodeName){const t=e;return t.dataset.entityType===a.Vv.MentionName?a.Vv.MentionName:t.dataset.entityType===a.Vv.Url?a.Vv.Url:t.href.startsWith("mailto:")?a.Vv.Email:t.href.startsWith("tel:")?a.Vv.Phone:t.href!==t.textContent?a.Vv.TextUrl:a.Vv.Url}return"SPAN"===e.nodeName?e.dataset.entityType:void 0}(e);if(!r||!e.textContent)return{index:n,entity:void 0};const i=t.indexOf(e.textContent,n),s=i>=0?i:n,l=t.substring(0,s).length,{length:c}=t.substring(s,s+e.textContent.length);return r===a.Vv.TextUrl?{index:s,entity:{type:r,offset:l,length:c,url:e.href}}:r===a.Vv.MentionName?{index:s,entity:{type:r,offset:l,length:c,userId:e.dataset.userId}}:r===a.Vv.Pre?{index:s,entity:{type:r,offset:l,length:c,language:e.dataset.language}}:r===a.Vv.CustomEmoji?{index:s,entity:{type:r,offset:l,length:c,documentId:e.getAttribute("document-id")}}:{index:s,entity:{type:r,offset:l,length:c}}}},85266:(e,t,n)=>{function a(e){e.dataset.patchedForSafari||(e.addEventListener("play",(()=>{const t=e.currentTime;e.dataset.patchForSafariInProgress="true",e.addEventListener("progress",(function n(){e.buffered.length&&(e.currentTime=e.duration-1,e.addEventListener("progress",(()=>{delete e.dataset.patchForSafariInProgress,e.currentTime=t,e.paused&&!e.dataset.preventPlayAfterPatch&&e.play()}),{once:!0}),e.removeEventListener("progress",n))}))}),{once:!0}),e.dataset.patchedForSafari="true")}function r(e){return Boolean(e.dataset.patchForSafariInProgress)}n.d(t,{B:()=>a,z:()=>r})},3858:(e,t,n)=>{n.d(t,{Z:()=>a});const a=e=>{e.stopPropagation(),e.preventDefault()}},85655:(e,t,n)=>{let a;function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"*",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];a||(a=document.createElement("input"),a.setAttribute("type","file")),a.setAttribute("accept",e),n?a.removeAttribute("multiple"):a.setAttribute("multiple","multiple"),a.onchange=null,a.value="",a.onchange=t,a.click()}n.d(t,{g:()=>r})},18629:(e,t,n)=>{function a(){const e=getComputedStyle(document.documentElement),t=i(e,"--color-background"),n=i(e,"--color-text"),a=i(e,"--color-primary"),r=i(e,"--color-white"),o=i(e,"--color-links");return{bg_color:t,text_color:n,hint_color:i(e,"--color-text-secondary"),link_color:o,button_color:a,button_text_color:r,secondary_bg_color:i(e,"--color-background-secondary")}}function r(e){return/^#[0-9A-F]{6}$/i.test(e)}function i(e,t){return r(n=e.getPropertyValue(t).trim())?n:`#${n.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+\.{0,1}\d*))?\)$/).slice(1).map(((e,t)=>(3===t?Math.round(255*parseFloat(e)):parseFloat(e)).toString(16).padStart(2,"0").replace("NaN",""))).join("")}`;var n}n.d(t,{B:()=>a,U:()=>r})}}]);
|
||
//# sourceMappingURL=8688.6cda6506154e2e3e5b90.js.map
|