2 lines
77 KiB
JavaScript
2 lines
77 KiB
JavaScript
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[7703],{68292:(e,t,n)=>{n.d(t,{A:()=>p});var a=n(84051),o=n(13439),i=n(29807),s=n(87357),r=n(37836),c=n(30857),l=n(39351),d=n(73767);let m=0;const u=(0,r.Fe)((()=>{m=0})),p=(0,a.ph)((({text:e,className:t,isDisabled:n,ref:r})=>{const{isRtl:p}=(0,l.A)(),h=(0,d.A)(e),A=(0,c.A)(),g=!(!(!n&&(0,i.PKK)((0,o.mS)())&&void 0!==h&&h!==e)||m>=10||(0===m&&u(),m++,0)),y=(0,a.Kr)((()=>g?function(e,t){const n=[],o=e.length,i=t?.length??0;for(let s=0;s<=o;s++){const r=o-s,c=i-s;t&&c>=0&&e[r]!==t[c]?n.unshift(a.Ay.createElement("div",{className:"IYTzbS8o"},a.Ay.createElement("div",{className:"Jw1oQFdk"},e[r]??""),a.Ay.createElement("div",{className:"TZfEz3sc"},t[c]),a.Ay.createElement("div",{className:"Y9ied8_t"},e[r]??""))):n.unshift(a.Ay.createElement("span",null,e[r]??""))}return n}(e,h):e),[g,h,e]);return(0,a.vJ)((()=>{if(!g)return;const e=window.setTimeout((()=>{A()}),200);return()=>{window.clearTimeout(e)}}),[g,e]),a.Ay.createElement("span",{ref:r,className:(0,s.A)(t,!n&&"tgKbsVmz"),dir:p?"rtl":void 0},y)}))},79577:(e,t,n)=>{n.d(t,{A:()=>l});var a=n(84051),o=n(23174),i=n(90709),s=n(62587),r=n(64489);function c(){return c=Object.assign?Object.assign.bind():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},c.apply(this,arguments)}const l=(0,a.ph)((function(e){const{sticker:t,noLoad:n,forcePreview:l,...d}=e,m=t?.thumbnail?.dataUri,u=t&&(0,i.Mw)(t,"full"),p=(0,s.A)(t?(0,i.Mw)(t,"preview"):void 0,n&&!l,o.qZ.BlobUrl),h=(0,s.A)(u,n);return a.Ay.createElement(r.A,c({tgsUrl:h,previewUrl:p,thumbDataUri:m},d))}))},64489:(e,t,n)=>{n.d(t,{A:()=>p});var a=n(84051),o=n(87357),i=n(95807),s=n(37661),r=n(17712),c=n(83057),l=n(4438);const d="lM2usrZU";function m(){return m=Object.assign?Object.assign.bind():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},m.apply(this,arguments)}const u=new Set,p=(0,a.ph)((function(e){const{previewUrl:t,thumbDataUri:n,className:p,...h}=e,[A,,g]=(0,s.A)(Boolean(n)),y=(0,c.A)(A),[f,v,C]=(0,s.A)(u.has(t)),I=(0,c.A)(f),[E,S]=(0,s.A)(!1),w=(0,r.A)((()=>{v(),u.add(t)})),R=(0,r.A)((()=>{g(),C(),setTimeout(S,300)})),{size:b}=e;return a.Ay.createElement("div",{className:(0,o.A)(p,"xCi2f0YH"),style:(0,i.A)(void 0!==b&&`width: ${b}px; height: ${b}px;`)},n&&!E&&a.Ay.createElement("img",{src:n,className:(0,o.A)(d,y),draggable:!1}),t&&!E&&a.Ay.createElement("img",{src:t,className:(0,o.A)(d,I),draggable:!1,onLoad:w}),a.Ay.createElement(l.A,m({},h,{onLoad:R})))}))},26875:(e,t,n)=>{n.d(t,{A:()=>r});var a=n(84051),o=n(87357),i=n(59030),s=n(21849);const r=(0,a.ph)((({peers:e,size:t,className:n,limit:r=3,badgeText:c})=>{const l=(0,i.A)(),d="number"==typeof t?t:s.R[t],m=(0,a.Kr)((()=>c||(!e?.length||e.length<=r?void 0:"+"+(e.length-r))),[c,e,r]);return a.Ay.createElement("div",{className:(0,o.A)(n,"kXs18Nmi"),style:`--_size: ${d}px;`,dir:l.isRtl?"rtl":"ltr"},e?.slice(0,r).map((e=>a.Ay.createElement(s.A,{size:t,peer:e,className:"XND8fhC1"}))),m&&a.Ay.createElement("div",{className:"SHyAyGFO"},m))}))},81949:(e,t,n)=>{n.d(t,{A:()=>i});var a=n(84051),o=n(87357);const i=({children:e,className:t,onClick:n,onMouseDown:i})=>a.Ay.createElement("div",{className:(0,o.A)("hJUqHi4B",n&&"hjDEmFaT",t),onClick:n,onMouseDown:i},e)},27860:(e,t,n)=>{n.d(t,{A:()=>l});var a=n(84051),o=n(66644),i=n(87357),s=n(45470),r=n(17712),c=n(50680);const l=(0,a.ph)((({isVisible:e,withAnimation:t,thumbDataUri:n,className:l,width:d,height:m})=>{const u=(0,a.li)(null),{shouldRender:p,transitionClassNames:h}=(0,c.A)(e,void 0,!0,!t&&void 0,void 0,500),A=(0,s.A)(n,!p,void 0,25,d,m),g=(0,r.A)((e=>{if(!u.current)return;const t=u.current,n=e.currentTarget.getBoundingClientRect(),a=e.clientX-n.left,i=e.clientY-n.top,s=a-n.width/2,r=i-n.height/2;(0,o.RK)((()=>{t.setAttribute("style",`--click-shift-x: ${s}px; --click-shift-y: ${r}px`)}))}));if(p)return a.Ay.createElement("div",{className:(0,i.A)("qF2WgYVg",h,l,t&&"pNM3cgkY"),ref:u,onClick:t?g:void 0},a.Ay.createElement("canvas",{ref:A,className:"eULqS2yR",width:d,height:m}),a.Ay.createElement("div",{className:"XBor45hE"}))}))},15535:(e,t,n)=>{n.d(t,{A:()=>h});var a=n(84051),o=n(31481),i=n(66644),s=n(96454),r=n(87357),c=n(83868),l=n(14737),d=n(43874),m=n(59030),u=n(64493),p=n(18276);const h=(0,a.ph)((({isLoading:e=!1,isPasswordVisible:t,error:n,hint:h,placeholder:A="Password",submitLabel:g="Next",description:y,shouldShowSubmit:f,shouldResetValue:v,shouldDisablePasswordManager:C=!1,noRipple:I=!1,clearError:E,onChangePasswordVisibility:S,onInputChange:w,onSubmit:R})=>{const b=(0,a.li)(null),N=(0,m.A)(),{isMobile:M}=(0,d.Ay)(),[k,P]=(0,a.J0)(""),[T,x]=(0,a.J0)(!1),L=M?550:400;return(0,a.vJ)((()=>{v&&P("")}),[v]),(0,l.A)((()=>{s.TF||b.current.focus()}),L),(0,a.vJ)((()=>{n&&(0,i.RK)((()=>{b.current.focus(),b.current.select()}))}),[n]),a.Ay.createElement("form",{action:"",onSubmit:R?function(t){t.preventDefault(),e||T&&R(k)}:c.A,autoComplete:"off"},a.Ay.createElement("div",{className:(0,r.A)("input-group password-input",k&&"touched",n&&"error"),dir:N.isRtl?"rtl":void 0},C&&a.Ay.createElement("input",{type:"password",id:"prevent_autofill",autoComplete:"off",className:"visually-hidden",tabIndex:-2}),a.Ay.createElement("input",{ref:b,className:"form-control",type:t?"text":"password",id:"sign-in-password",value:k||"",autoComplete:C?"one-time-code":"current-password",onChange:function(e){n&&E();const{target:t}=e;P(t.value),x(t.value.length>=o.AGC),w&&w(t.value)},maxLength:256,dir:"auto"}),a.Ay.createElement("label",null,n||h||A),a.Ay.createElement("div",{className:"div-button toggle-password",onClick:function(){S(!t)},role:"button",tabIndex:0,title:"Toggle password visibility","aria-label":"Toggle password visibility"},a.Ay.createElement(p.A,{name:t?"eye":"eye-crossed"}))),y&&a.Ay.createElement("p",{className:"description"},y),R&&(T||f)&&a.Ay.createElement(u.A,{size:"smaller",type:"submit",ripple:!I,isLoading:e,disabled:!T},g))}))},10187:(e,t,n)=>{n.d(t,{A:()=>p});var a=n(84051),o=n(13439),i=n(70636),s=n(29807),r=n(87357),c=n(35049),l=n(59030),d=n(21849),m=n(34431),u=n(18276);const p=(0,a.ph)((0,o.EK)(((e,{peerId:t,forceShowSelf:n})=>{if(!t)return{};const a=(0,s.PVB)(e,t),o=(0,s.mBe)(e,t);return{peer:a,isSavedMessages:!n&&o&&o.isSelf}}))((({icon:e,title:t,isMinimized:n,canClose:o,isCloseNonDestructive:s,clickArg:p,peer:h,mockPeer:A,customPeer:g,className:y,isSavedMessages:f,withPeerColors:v,withEmojiStatus:C,onClick:I,itemClassName:E})=>{const S=(0,l.A)(),w=A||h,R=g||w,b=w&&(0,i.vj)(w)?w:void 0;let N,M,k;e&&t?(N=a.Ay.createElement("div",{className:"NtoGLT22"},a.Ay.createElement(u.A,{name:e,style:"f91Ad80i"})),M=t):R&&(N=a.Ay.createElement(d.A,{className:"La8BQ9yr",peer:R,size:"small",isSavedMessages:f}),k=(0,i.F9)(S,R)||t,M=t||a.Ay.createElement(m.A,{peer:R,isSavedMessages:f,withEmojiStatus:C}));const P=(0,r.A)("_Lq6_4e5",(b?.isForum||g?.isAvatarSquare)&&"JIHfTUVn",n&&"UhOZvxvs",o&&"uvvgSFUJ",s&&"fAk5yEeV",!I&&"P8r3OoaX",v&&(0,c.y)(g||h),y);return a.Ay.createElement("div",{className:P,onClick:()=>I?.(p),title:n?k:void 0,dir:S.isRtl?"rtl":void 0},N,!n&&a.Ay.createElement("div",{className:(0,r.A)("XPVuH29G",E),dir:"auto"},M),o&&a.Ay.createElement("div",{className:"xVPG2UTy"},a.Ay.createElement(u.A,{name:"close"})))})))},20333:(e,t,n)=>{n.d(t,{A:()=>m});var a=n(84051),o=n(87357),i=n(95807),s=n(59030),r=n(93545),c=n(18276);const l="_b5HgBXr",d="P6mch4bB",m=(0,a.ph)((({leftText:e,rightText:t,floatingBadgeText:n,floatingBadgeIcon:m,progress:u,isPrimary:p,className:h})=>{const A=(0,s.A)(),g=(0,a.li)(null),y=(0,a.li)(null),[f,v]=(0,a.J0)(0),[C,I]=(0,a.J0)(0),E=()=>{if(g.current&&y.current&&void 0!==u){const e=g.current.offsetWidth,t=y.current.offsetWidth,n=e/2,a=t-e/2,o=u*t,i=Math.max(n,Math.min(o,a));let s;v(i/t),s=o<n?u*t/(2*n):o>a?.5+(u-a/t)/(1-a/t)*.4:.5,I(s)}};(0,a.vJ)(E,[u]),(0,r.A)(y,E);const S=Boolean(m||n),w=Boolean(u)&&u>.99;return a.Ay.createElement("div",{ref:y,className:(0,o.A)("nY2ggBsF",S&&"RYtVQAjM",p&&"Zi0w7QJ3",h),style:(0,i.A)(void 0!==u&&`--progress: ${u}`,void 0!==C&&`--tail-position: ${C}`,`--shift-x: ${f}`)},S&&a.Ay.createElement("div",{className:"dhigNjAq"},a.Ay.createElement("div",{className:"cOpfCGPh"},a.Ay.createElement("div",{className:"uNwBLNOy",ref:g},m&&a.Ay.createElement(c.A,{name:m,className:"MJ7MTmxi"}),n&&a.Ay.createElement("div",{className:"MwzZt3Qo",dir:A.isRtl?"rtl":void 0},n)),a.Ay.createElement("div",{className:"qRwO7SZm"},a.Ay.createElement("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none"},a.Ay.createElement("path",{d:"m 28,4 v 9 c 0.0089,7.283278 -3.302215,5.319646 -6.750951,8.589815 l -5.8284,5.82843 c -0.781,0.78105 -2.0474,0.78104 -2.8284,0 L 6.7638083,21.589815 C 2.8288652,17.959047 0.04527024,20.332086 0,13 V 4 C 0,4 0.00150581,0.97697493 3,1 5.3786658,1.018266 22.594519,0.9142007 25,1 c 2.992326,0.1067311 3,3 3,3 z",fill:"#7E85FF"}))))),a.Ay.createElement("div",{className:l},a.Ay.createElement("span",null,e)),a.Ay.createElement("div",{className:d},a.Ay.createElement("span",null,t)),a.Ay.createElement("div",{className:(0,o.A)("sZZV0yoe",w&&"m8ie8IxL")},a.Ay.createElement("div",{className:l},a.Ay.createElement("span",null,e)),a.Ay.createElement("div",{className:d},a.Ay.createElement("span",null,t))))}))},66833:(e,t,n)=>{function a(e){return"starGift"===e.type?e.sticker:e.attributes.find((e=>"model"===e.type))?.sticker}function o(e){return"starGift"===e.type?e.availabilityTotal:e.totalCount}function i(e){if("starGiftUnique"===e.type)return function(e){const t=e.find((e=>"model"===e.type)),n=e.find((e=>"backdrop"===e.type)),a=e.find((e=>"pattern"===e.type));return{model:t,originalDetails:e.find((e=>"originalDetails"===e.type)),pattern:a,backdrop:n}}(e.attributes)}n.d(t,{UC:()=>o,uc:()=>i,yQ:()=>a})},49086:(e,t,n)=>{n.d(t,{C:()=>u,V:()=>m});var a=n(13439),o=n(23174),i=n(90709),s=n(3544),r=n(60343),c=n(58849),l=n(4961),d=n(18501);function m({message:e,highlight:t,emojiSize:n,asPreview:a,truncateLength:o,isProtected:s,forcePlayback:l,shouldRenderAsHtml:m,isForMediaViewer:u,threadId:p,maxTimestamp:h}){const{text:A,entities:g}=e.content.text||{};if(!A){const t=(0,i.P5)(e)?.text;return t?[(0,c.A)(t,o)]:void 0}const y=(0,r.bj)(e);return(0,d.fd)({text:(0,c.A)(A,o),entities:g,highlight:t,emojiSize:n,shouldRenderAsHtml:m,containerId:`${u?"mv-":""}${y}`,asPreview:a,isProtected:s,forcePlayback:l,messageId:"id"in e?e.id:void 0,chatId:e.chatId,threadId:p,maxTimestamp:h})}function u(e,t,n=!1,r,d=s.vs){const{entities:u}=t.content.text||{},p=(0,a.mS)(),h=(0,i.ni)(p,t),A=u?.some((e=>e.type===o.C7.Spoiler)),g=u?.some((e=>e.type===o.C7.CustomEmoji));if(!A&&!g){const a=(0,c.A)((0,s.dS)(e,t,h,n),d);return r?(0,l.A)(a,["emoji","highlight"],{highlight:r}):(0,l.A)(a)}const y=!n&&(0,s.Su)(t),f=y?`${y} `:"",v=m({message:t,highlight:r,asPreview:!0,truncateLength:d}),C=(0,s.oL)(e,t,h,v);return[...(0,l.A)(f),...Array.isArray(C)?C:[C]].filter(Boolean)}},79582:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(13439),o=n(29807),i=n(87894);const s=3e9,r=3e8;function c(e,t=!1,n,c){const l=(0,a.mS)();return(0,i.My)(e,(e=>{if(e===c)return 1/0;const a=(0,o.hds)(l,e);if(!a)return 0;let i=0;const d=(0,o.yHC)(l,e);return d&&(i+=d.date),t&&a.isVerified&&(i+=s),n&&n.includes(e)&&(i=Date.now()+r+(n.length-n.indexOf(e))),i}),"desc")}},54960:(e,t,n)=>{n.d(t,{A:()=>M});var a=n(84051),o=n(13439),i=n(31481),s=n(66644),r=n(90709),c=n(70636),l=n(29807),d=n(87357),m=n(87894),u=n(79824),p=n(96374),h=n(17712),A=n(59030),g=n(19806),y=n(46222),f=n(40664),v=n(52745),C=n(24956),I=n(21849),E=n(34431),S=n(18276),w=n(10187),R=n(45780),b=n(31722);const N="PeerPickerItem",M=(0,a.ph)((({className:e,categories:t,itemIds:n,categoryPlaceholderKey:M,filterValue:k,filterPlaceholder:P,notFoundText:T,searchInputId:x,itemClassName:L,isLoading:D,noScrollRestore:O,isSearchable:B,lockedUnselectedSubtitle:F,forceShowSelf:K,isViewOnly:U,itemInputType:_,withStatus:j,withPeerTypes:$,withPeerUsernames:z,withDefaultPadding:H,onFilterChange:J,onDisabledClick:G,onLoadMore:q,...V})=>{const W=(0,A.A)(),Y=V.allowMultiple,Z=Y?V.lockedSelectedIds:void 0,X=Y?V.lockedUnselectedIds:void 0,Q=(0,a.Kr)((()=>Y?V.selectedCategories:V.selectedCategory?[V.selectedCategory]:u.p),[Y,V.selectedCategory,V.selectedCategories]),ee=(0,a.Kr)((()=>Y?V.selectedIds:V.selectedId?[V.selectedId]:u.p),[Y,V.selectedId,V.selectedIds]),te=(0,a.li)(null),ne=ee.length>10;(0,a.vJ)((()=>{if(!B)return;const e=window.setTimeout((()=>{(0,s.YS)((()=>{te.current?.focus()}))}),500);return()=>{window.clearTimeout(e)}}),[B]);const ae=(0,a.Kr)((()=>new Set(Z)),[Z]),oe=(0,a.Kr)((()=>new Set(X)),[X]),ie=(0,a.Kr)((()=>ee.filter((e=>!ae.has(e)))),[ae,ee]),se=(0,a.Kr)((()=>t?(0,m.dU)(t,"type"):{}),[t]),re=(0,a.Kr)((()=>{if(k)return n;const e=[],t=[],a=[];return n.forEach((n=>{ae.has(n)?e.push(n):oe.has(n)?a.push(n):t.push(n)})),e.concat(t,a)}),[k,n,ae,oe]),ce=(0,h.A)((e=>{if(ae.has(e))G?.(e,!0);else if(oe.has(e))G?.(e,!1);else{if(Y&&se[e]){const t=se[e].type,n=Q?.slice()||[];return n.includes(t)?n.splice(n.indexOf(t),1):n.push(t),void V.onSelectedCategoriesChange?.(n)}if(Y){const t=ee.slice();return t.includes(e)?t.splice(t.indexOf(e),1):t.push(e),void V.onSelectedIdsChange?.(t)}se[e]?V.onSelectedCategoryChange?.(se[e].type):V.onSelectedIdChange?.(e)}})),le=(0,h.A)((e=>{const{value:t}=e.currentTarget;J?.(t)})),[de,me]=(0,p.A)(q,re,Boolean(k)),ue=(0,a.hb)(((e,t)=>{const n=(0,o.mS)(),s=t?se[e]:void 0,m=t?void 0:(0,l.PVB)(n,e),u=m||s;if(!u)return i.Oig?a.Ay.createElement("div",{key:e},"No peer or category with ID ",e):void 0;const p=m&&!(0,c.vj)(m)?m.isSelf&&!K:void 0,h=oe.has(e),A=ae.has(e),y=h||A,f=s?Q?.includes(s.type):ee.includes(e),[v,w]=function(){if(h)return[F];if(m){if(z){const e=m.usernames?.[0]?.username;if(e)return[`@${e}`]}if(j){if((0,c.vj)(m))return[(0,r.sT)(W,m)];const e=(0,l.K0y)(n,m.id);return[(0,r.CD)(W,m,e),(0,d.A)((0,r.PF)(m,e,!0)&&b.A.onlineStatus)]}if($){const e=(0,c.cy)(m);return e&&[W(e)]}}}()||[];return a.Ay.createElement(R.A,{key:e,className:(0,d.A)(N,L),title:a.Ay.createElement(E.A,{peer:u}),avatarElement:a.Ay.createElement(I.A,{peer:m||s,isSavedMessages:p,size:"medium"}),subtitle:v,subtitleClassName:w,disabled:y,inactive:U,ripple:!0,inputElement:y?a.Ay.createElement(S.A,{name:"lock-badge"}):"radio"===_?a.Ay.createElement(C.A,{checked:f,disabled:y,onlyInput:!0}):"checkbox"===_?a.Ay.createElement(g.A,{checked:f,disabled:y,onlyInput:!0}):void 0,inputPosition:"end",onClick:()=>ce(e),onDisabledClick:G&&(()=>G(e,A))})}),[se,K,U,L,_,W,ae,oe,F,G,Q,ee,$,j,z]),pe=(0,a.Kr)((()=>{if(t?.length)return a.Ay.createElement("div",{key:"categories"},M&&a.Ay.createElement("div",{className:b.A.pickerCategoryTitle},W(M)),t?.map((e=>ue(e.type,!0))),a.Ay.createElement("div",{className:b.A.pickerCategoryTitle},W("FilterChats")))}),[t,M,W,ue]);return a.Ay.createElement("div",{className:(0,d.A)(b.A.container,e)},B&&a.Ay.createElement("div",{className:(0,d.A)(b.A.header,"custom-scroll"),dir:W.isRtl?"rtl":void 0},Q?.map((e=>a.Ay.createElement(w.A,{className:b.A.peerChip,customPeer:se[e],onClick:ce,clickArg:e,canClose:!0}))),Z?.map(((e,t)=>a.Ay.createElement(w.A,{className:b.A.peerChip,peerId:e,isMinimized:ne&&t<ee.length-5,forceShowSelf:K,onClick:ce,clickArg:e}))),ie.map(((e,t)=>a.Ay.createElement(w.A,{className:b.A.peerChip,peerId:e,isMinimized:ne&&t+(Z?.length||0)<ee.length-5,canClose:!0,onClick:ce,clickArg:e}))),a.Ay.createElement(f.A,{id:x,ref:te,value:k,onChange:le,placeholder:P||W("SelectChat")})),de?.length?a.Ay.createElement(y.A,{className:(0,d.A)(b.A.pickerList,H&&b.A.padded,"custom-scroll"),items:de,itemSelector:`.${N}`,beforeChildren:pe,onLoadMore:me,noScrollRestore:O},de.map((e=>ue(e)))):D||!de||de.length?a.Ay.createElement(v.A,null):a.Ay.createElement("p",{className:b.A.noResults},T||"Sorry, nothing found."))}))},45780:(e,t,n)=>{n.d(t,{A:()=>l});var a=n(84051),o=n(96454),i=n(87357),s=n(17712),r=n(59030),c=n(42452);const l=({title:e,subtitle:t,avatarElement:n,inputElement:l,inputPosition:d="start",disabled:m,inactive:u,ripple:p,className:h,titleClassName:A,subtitleClassName:g,style:y,onClick:f,onDisabledClick:v})=>{const C=(0,r.A)(),I=!u&&!m,E=(0,s.A)((()=>{u||(m?v?.():f?.())}));return a.Ay.createElement("div",{className:(0,i.A)("OHkx_W75",t&&"neXqB2_A",m&&"tvZeVJPh",I&&"VUSwo4t5",n&&"dMT9byM6",h),onClick:E,style:y,dir:C.isRtl?"rtl":void 0,role:I?"button":void 0,tabIndex:I?0:void 0},!m&&!u&&p&&a.Ay.createElement(c.A,null),l&&a.Ay.createElement("div",{className:(0,i.A)("kmjqObdP","end"===d?"iqGhSQGm":"F0Hv3EQm")},l),n&&a.Ay.createElement("div",{className:"dnAaRPCo"},n),a.Ay.createElement("div",{className:(0,i.A)("JSSC0N8V",A)},e),t&&a.Ay.createElement("div",{className:(0,i.A)("OYmzCSp2",g)},t),!l&&o.pz&&a.Ay.createElement("div",{className:"P53DrbWA"}))}},40558:(e,t,n)=>{n.d(t,{A:()=>p});var a=n(84051),o=n(66644),i=n(90709),s=n(87357),r=n(95807),c=n(87679),l=n(17712),d=n(62587),m=n(93545),u=n(38691);const p=(0,a.ph)((({backgroundColors:e,patternColor:t,patternIcon:n,clearBottomSector:p,className:h})=>{const A=(0,a.li)(null),g=(0,a.li)(null),[y,f]=(0,a.Ul)({width:0,height:0}),v=(0,u.A)(),[C,I]=(0,a.J0)(),E=n&&(0,i.Mw)(n,"preview"),S=(0,d.A)(E);(0,a.vJ)((()=>{S&&(0,c.NN)(S).then(I)}),[S]);const w=(0,a.Kr)((()=>{const e=[];for(let t=1;t<=3;t++){const n=Math.floor(8*(1+.5*(t-1))),a=t/3,o=.05+(.4-.05)*a,i=t%2==0?Math.PI/n:0;for(let t=0;t<n;t++){const s=t/n*Math.PI*2+i;if(p&&s>.45*Math.PI&&s<.55*Math.PI)continue;const r=.5+1.71*o*Math.cos(s),c=.5+o*Math.sin(s),l=1.4-a*Math.random();e.push({x:r,y:c,sizeFactor:l})}}return e}),[p]);(0,m.A)(A,(e=>{f({width:e.contentRect.width,height:e.contentRect.height})})),(0,a.vJ)((()=>{const e=A.current;e&&f({width:e.clientWidth,height:e.clientHeight})}),[f]);const R=(0,l.A)((()=>{const e=g.current;if(!e||!C)return;const n=e.getContext("2d"),{width:a,height:o}=e;if(!a||!o)return;n.save(),w.forEach((({x:e,y:t,sizeFactor:i})=>{const s=(a-Math.max(a,250*v))/2,r=e*Math.max(a,250*v)+s,c=t*Math.max(o,250*v)+s,l=20*v*i*(s?.8:1);n.drawImage(C,r-l/2,c-l/2,l,l)})),n.restore(),t&&(n.save(),n.fillStyle=t,n.globalCompositeOperation="source-atop",n.fillRect(0,0,a,o),n.restore());const i=n.createRadialGradient(a/2,o/2,0,a/2,o/2,a/2);i.addColorStop(0,"#FFFFFF77"),i.addColorStop(1,"#FFFFFF"),n.save(),n.globalCompositeOperation="destination-out",n.fillStyle=i,n.fillRect(0,0,a,o),n.restore()}));return(0,a.vJ)((()=>{R()}),[C]),(0,a.vJ)((()=>{const{width:e,height:t}=y(),n=g.current;if(!e||!t)return;const a=Math.max(e,t);(0,o.RK)((()=>{n.width=a*v,n.height=a*v,R()}))}),[y,v]),a.Ay.createElement("div",{ref:A,className:(0,s.A)("Af3tYFMg",h),style:(0,r.A)(`--_bg-1: ${e[0]}`,`--_bg-2: ${e[1]||e[0]}`)},a.Ay.createElement("canvas",{className:"GbpiDSS_",ref:g}))}))},83594:(e,t,n)=>{n.d(t,{A:()=>m});var a=n(84051),o=n(90709),i=n(96454),s=n(87357),r=n(95807),c=n(62587),l=n(87412);const d="PZAuNVZH",m=(0,a.ph)((({reaction:e,isLottie:t,className:n,particleSize:m,onEnded:u})=>{const p=(0,o.aL)(e.documentId,!0),h=(0,c.A)(t?void 0:p),A=(0,a.Kr)((()=>i.ol?Array.from({length:7}).map((()=>function(e=20){const t=(e/2+Math.random()*e*3)*(Math.random()>.5?1:-1),n=e+Math.random()*e*4;return`M 0 0 C 0 0 ${t} ${-n-e} ${t} ${n}`}(m))):[]),[m]);if(h||t)return a.Ay.createElement("div",{className:(0,s.A)("aInga6VW",n),style:(0,r.A)(Boolean(m)&&`--particle-size: ${m}px`)},A.map(((n,o)=>{const i=`--offset-path: path('${n}');`;return t?a.Ay.createElement(l.A,{documentId:e.documentId,className:d,style:i,withSharedAnimation:!0,size:m,onAnimationEnd:0===o?u:void 0}):a.Ay.createElement("img",{src:h,alt:"",className:d,style:i,draggable:!1,onAnimationEnd:0===o?u:void 0})})))}))},11241:(e,t,n)=>{n.d(t,{A:()=>w});var a=n(84051),o=n(13439),i=n(90709),s=n(29807),r=n(87357),c=n(43336),l=n(76023),d=n(37661),m=n(5912),u=n(17712),p=n(62587),h=n(50680),A=n(47483),g=n(18104),y=n(87412),f=n(83594),v=n(17794),C=n(93879);const I=1.5*l.$,E=6.5*l.$,S=l.$,w=(0,a.ph)((0,o.EK)(((e,{containerId:t})=>{const{genericEmojiEffects:n,reactions:a}=e,{activeReactions:o}=(0,s.nTw)(e),i=(0,s.xYJ)(e,"reactionEffects");return{activeReactions:o?.[t],availableReactions:a.availableReactions,genericEffects:n,withEffects:i}}))((({containerId:e,reaction:t,className:n,size:s=I,effectSize:l=E,activeReactions:w,availableReactions:R,genericEffects:b,withEffects:N,withEffectOnly:M,shouldPause:k,shouldLoop:P,loopLimit:T,observeIntersection:x})=>{const{stopActiveReaction:L}=(0,o.ko)(),D=(0,a.li)(null),O="custom"===t.type,B=(0,a.Kr)((()=>R?.find((e=>(0,i.a0)(e.reaction,t)))),[R,t]),F=B?.centerIcon?.id,{customEmoji:K}=(0,A.A)(O?t.documentId:void 0),U=(0,a.Kr)((()=>{if(!O)return B?.aroundAnimation?.id;if(!K)return;const e=R?.find((e=>e.reaction.emoticon===K.emoji))?.aroundAnimation?.id;return e}),[B,R,K,O]),_=(0,a.Kr)((()=>{if(U)return U;if(!b?.stickers)return;const{stickers:e}=b;return e[Math.floor(Math.random()*e.length)].id}),[U,b]),j=(0,m.Vz)(D,x),$=F&&(0,i.aL)(F),z=_&&(0,i.aL)(_),H=(0,p.A)($),J=(0,p.A)(z),G=(0,a.Kr)((()=>w?.find((e=>(0,i.a0)(e,t)))),[w,t]),q=Boolean(N&&G&&(O||H)&&J),V=j&&(q&&!M||P),{shouldRender:W,transitionClassNames:Y}=(0,h.A)(q,void 0,!0,"slow"),{shouldRender:Z,transitionClassNames:X}=(0,h.A)(V,void 0,!0,"slow"),Q=(0,u.A)((()=>{L({containerId:e,reaction:t})})),[ee,te,ne]=(0,d.A)(),ae=!(O||V&&ee),{shouldRender:oe,transitionClassNames:ie}=(0,h.A)(ae,void 0,!0),se=(0,r.A)(C.A.root,W&&C.A.animating,M&&C.A.withEffectOnly,n);return a.Ay.createElement("div",{className:se,ref:D},!M&&oe&&a.Ay.createElement(v.A,{className:ie,reaction:t,availableReactions:R,size:s,observeIntersection:x}),!M&&O&&a.Ay.createElement(y.A,{documentId:t.documentId,className:C.A.customEmoji,size:s,noPlay:k,noVideoOnMobile:!0,loopLimit:T,observeIntersectionForPlaying:x,forceAlways:!0}),Z&&!O&&a.Ay.createElement(g.A,{key:`${F}-${s}`,className:(0,r.A)(C.A.animatedIcon,X),size:(0,c.Ki)(1.9*s),tgsUrl:H,play:j&&!k,noLoop:!P,onLoad:te,onEnded:ne,forceAlways:!0}),W&&a.Ay.createElement(a.Ay.Fragment,null,a.Ay.createElement(g.A,{key:`${_}-${l}`,className:(0,r.A)(C.A.effect,Y),size:l,tgsUrl:J,play:j,noLoop:!0,onEnded:Q,forceAlways:!0}),O&&!U&&j&&a.Ay.createElement(f.A,{reaction:t,className:Y,particleSize:Math.max(.5*s,S),onEnded:Q})))})))},17794:(e,t,n)=>{n.d(t,{A:()=>m});var a=n(84051),o=n(90709),i=n(87357),s=n(62587),r=n(83057),c=n(87412),l=n(18276),d=n(61911);const m=(0,a.ph)((({reaction:e,availableReactions:t,className:n,size:m,withIconHeart:u,observeIntersection:p})=>{const h=(0,a.Kr)((()=>t?.find((t=>(0,o.a0)(t.reaction,e)))),[t,e]),A=h?.staticIcon?.id,g=A?`document${A}`:void 0,y=(0,s.A)(g),f=(0,r.A)(y),v="emoji"===e.type&&"🦄"===e.emoticon,C=u&&"emoji"===e.type&&"❤"===e.emoticon;return"custom"===e.type?a.Ay.createElement(c.A,{documentId:e.documentId,className:(0,i.A)("ReactionStaticEmoji",n),size:m,observeIntersectionForPlaying:p}):C?a.Ay.createElement(l.A,{name:"heart",className:"ReactionStaticEmoji",style:`font-size: ${m}px; width: ${m}px`}):a.Ay.createElement("img",{className:(0,i.A)("ReactionStaticEmoji",v&&"with-unicorn-fix",f,n),style:m?`width: ${m}px; height: ${m}px`:void 0,src:y||d,alt:h?.title,draggable:!1})}))},99515:(e,t,n)=>{n.d(t,{A:()=>W});var a=n(84051),o=n(13439),i=n(23174),s=n(31481),r=n(90709),c=n(29807),l=n(87357),d=n(85982),m=n(80539);const u=document.createElement("div"),p=new Set([i.C7.Bold,i.C7.Italic,i.C7.Underline,i.C7.Strike,i.C7.Spoiler,i.C7.CustomEmoji]);function h(e){const t=function(e){const t=e.cloneContents();u.appendChild(t);const n=function(e,t){const n=e.commonAncestorContainer;if(n.nodeType===Node.ELEMENT_NODE&&n.classList.contains("text-content"))return t;let a=e.commonAncestorContainer.parentElement;for(;a&&!a.classList.contains("text-content");){const e=a.tagName.toLowerCase(),n=a.dataset.entityType;t=`<${e} ${n?`data-entity-type="${n}"`:""}>${t}</${e}>`,a=a.parentElement}return t}(e,u.innerHTML);return u.innerHTML="",n.replace(/<br\s*\/?>/gi,"\n").replace(/ /gi," ").replace(/\u00a0/gi," ")}(e);return function(e){if(!e.entities)return e;const t=e.entities.filter((e=>p.has(e.type)));return{...e,entities:t.length?t:void 0}}((0,m.Ay)(t,!1,!0))}var A=n(37661),g=n(17712),y=n(59030),f=n(24531),v=n(21511),C=n(80089),I=n(80464);const E=e=>{const{isOpen:t}=e,n=(0,I.A)(C.ar.Extra,"PinMessageModal",!t);return n?a.Ay.createElement(n,e):void 0};var S=n(94189),w=n(73104),R=n(76023),b=n(4961),N=n(3544),M=n(96454),k=n(81686),P=n(58554),T=n(49086);function x(e){return e?"lng_context_copy_selected":"lng_context_copy_text"}var L=n(43874),D=n(26875),O=n(71429),B=n(24433),F=n(60859),K=n(55158),U=n(17663);const _="C3LVl_JT",j="cd1ZZeSy",$=(0,a.ph)((function({message:e}){const t=(0,y.A)(),{editDate:n}=e,o=!n;return a.Ay.createElement(B.A,{icon:"clock-edit",className:_},o?a.Ay.createElement(K.A,{className:j}):Boolean(n)&&t("Chat.PrivateMessageEditTimestamp.Date",(0,U.U)(t,1e3*n)))}));var z=n(76283),H=n(41036);const J=(0,a.ph)((function({message:e,shouldRenderShowWhen:t,canLoadReadDate:n,closeContextMenu:i}){const{openPrivacySettingsNoticeModal:s}=(0,o.ko)(),r=(0,y.A)(),{readDate:c}=e,l=n&&!c&&!t;return a.Ay.createElement(B.A,{icon:"message-read",className:_},a.Ay.createElement(H.Ay,{name:"fade",activeKey:l?1:2,className:"mg4sBQ9n"},l?a.Ay.createElement(K.A,{className:j}):a.Ay.createElement(a.Ay.Fragment,null,Boolean(c)&&r("PmReadAt",(0,U.U)(r,1e3*c)),!c&&t&&a.Ay.createElement("div",null,r("PmRead"),a.Ay.createElement("span",{className:"bmxij_dk",onClick:()=>{i(),s({chatId:e.chatId,isReadDate:!0})}},r("PmReadShowWhen"))))))})),G=(0,a.ph)((({isReactionPickerOpen:e,availableReactions:t,topReactions:n,defaultTagReactions:s,isOpen:c,message:m,poll:u,story:p,isPrivate:h,isCurrentUserPremium:f,enabledReactions:v,isWithPaidReaction:C,reactionsLimit:I,anchor:E,targetHref:S,canSendNow:U,canReschedule:_,canBuyPremium:j,canReply:H,canQuote:G,canEdit:q,noReplies:V,canPin:W,canUnpin:Y,canDelete:Z,canForward:X,canReport:Q,canFaveSticker:ee,canUnfaveSticker:te,canCopy:ne,canCopyLink:ae,canSelect:oe,canDownload:ie,canSaveGif:se,canRevote:re,canClosePoll:ce,canTranslate:le,canShowOriginal:de,canSelectLanguage:me,isDownloading:ue,repliesThreadInfo:pe,canShowSeenBy:he,canShowReactionsCount:Ae,canShowReactionList:ge,seenByRecentPeers:ye,hasCustomEmoji:fe,customEmojiSets:ve,canPlayAnimatedEmojis:Ce,isInSavedMessages:Ie,shouldRenderShowWhen:Ee,canLoadReadDate:Se,onReply:we,onOpenThread:Re,onEdit:be,onPin:Ne,onUnpin:Me,onForward:ke,onDelete:Pe,onFaveSticker:Te,onReport:xe,onUnfaveSticker:Le,onSelect:De,onSend:Oe,onReschedule:Be,onClose:Fe,onCloseAnimationEnd:Ke,onCopyLink:Ue,onCopyNumber:_e,onDownload:je,onSaveGif:$e,onCancelVote:ze,onClosePoll:He,onShowSeenBy:Je,onShowReactors:Ge,onToggleReaction:qe,onSendPaidReaction:Ve,onShowPaidReactionModal:We,onCopyMessages:Ye,onReactionPickerOpen:Ze,onTranslate:Xe,onShowOriginal:Qe,onSelectLanguage:et,userFullName:tt,canGift:nt})=>{const{showNotification:at,openStickerSet:ot,openCustomEmojiSets:it,loadStickers:st,openGiftModal:rt}=(0,o.ko)(),ct=(0,a.li)(null),lt=(0,a.li)(null),dt=(0,y.A)(),mt=!h&&!v,ut=m.areReactionsPossible,pt=ge&&!mt||ut,ht="isEdited"in m&&m.isEdited,At=m.seenByDates,gt="giftPremium"===m.content.action?.type,yt="giftCode"===m.content.action?.type,ft="starGift"===m.content.action?.type,vt="starGiftUnique"===m.content.action?.type,Ct=(0,r.L8)(m.chatId)&&nt&&(gt||yt||ft||vt),[It,Et]=(0,A.A)(),[St,wt,Rt]=(0,A.A)(),{isMobile:bt,isDesktop:Nt}=(0,L.Ay)(),Mt=(0,a.Kr)((()=>At?Object.keys(At).length:0),[At]),kt=(0,g.A)((()=>{at({message:dt("Share.Link.Copied")}),Fe()})),Pt=(0,g.A)((()=>{rt({forUserId:m.chatId}),Fe()}));(0,a.vJ)((()=>{c&&It&&!e&&Fe()}),[Fe,c,e,It]),(0,a.vJ)((()=>{ve?.length&&ve.map((e=>st({stickerSetInfo:{id:e.id,accessHash:e.accessHash}})))}),[ve,it]);const Tt=(0,g.A)((()=>{ve&&(1===ve.length?ot({stickerSetInfo:{shortName:ve[0].shortName}}):it({setIds:ve.map((e=>e.id))}),Fe())})),xt=function(e,t,n,a,o,s,c,l){const m=[],u=(0,r.P5)(e),p=(0,r.yl)(e)||((0,r.QC)(e)?void 0:(0,r.dc)(e)),h=(0,r.Qm)(e),A=p?(0,r.rI)(p,"full"):void 0,g=a&&p&&(A||(0,r.KG)(p))&&d.WO&&!M.Yw,y=window.getSelection();if(g&&m.push({label:"lng_context_copy_image",icon:"copy-media",handler:()=>{Promise.resolve(A?P.hd(A,i.qZ.BlobUrl):p.blobUrl).then(d.qp),o?.()}}),a&&n)m.push({label:"lng_context_copy_link",icon:"copy",handler:()=>{(0,d.eM)(n),o?.()}});else if(a&&u){const n=Boolean(y?.anchorNode?.parentNode&&y.anchorNode.parentNode.closest(".Message .content-inner")&&""!==y.toString().replace(/(?:\r\n|\r|\n)/g,"")&&function(e){const t=window.getSelection(),n=t?.anchorNode?.parentNode,a=n?.closest(".Message.message-list-item");return(0,r.GZ)(e.id)===a?.id}(e));m.push({label:x(n),icon:"copy",handler:()=>{const a=(0,k.A)();if(a?.length&&c)c(a);else if(n)document.execCommand("copy");else{const n=(0,T.V)({message:e,shouldRenderAsHtml:!0});n&&(0,d.A)(n.join(""),(0,N.Gn)(e,t))}o?.()}})}return s&&m.push({label:"lng_context_copy_message_link",icon:"link",handler:s}),h&&l&&m.push({label:"lng_profile_copy_phone",icon:"copy",handler:()=>{l(),o?.()}}),m}(m,(0,r.FE)({poll:u,story:p}),S,ne,kt,ae?Ue:void 0,Ye,_e),Lt=(0,g.A)((()=>document.querySelector(`.Transition_slide-active > .MessageList div[data-message-id="${m.id}"]`))),Dt=(0,g.A)((()=>document.querySelector(".Transition_slide-active > .MessageList"))),Ot=(0,g.A)((()=>document.querySelector(".MessageContextMenu .bubble"))),Bt=(0,g.A)((()=>{const e=bt&&document.querySelector(".AudioPlayer-content")?.offsetHeight||0,t=document.getElementById("MiddleColumn"),n=getComputedStyle(t),a=parseFloat(n.getPropertyValue("--middle-header-panes-height"))||0;return{extraPaddingX:10,extraTopPadding:document.querySelector(".MiddleHeader").offsetHeight,extraMarginTop:a+e,shouldAvoidNegativePosition:!Nt,menuElMinWidth:pt&&bt?19.25*R.$:void 0}}));(0,a.vJ)((()=>{c?setTimeout((()=>{wt()}),200):Rt()}),[c,wt,Rt]),(0,a.vJ)((()=>(0,w.M6)(lt.current,".ReactionPicker")),[c]);const Ft=(0,g.A)((e=>{Ze(e),Et()}));return a.Ay.createElement(O.A,{ref:ct,isOpen:c,anchor:E,getTriggerElement:Lt,getRootElement:Dt,getMenuElement:Ot,getLayout:Bt,withMaxHeight:!0,className:(0,l.A)("MessageContextMenu","fluid",pt&&"with-reactions"),onClose:Fe,onCloseAnimationEnd:Ke},pt&&a.Ay.createElement(z.A,{enabledReactions:v,topReactions:n,allAvailableReactions:t,defaultTagReactions:s,currentReactions:m.reactions?.results,reactionsLimit:I,onToggleReaction:qe,onSendPaidReaction:Ve,onShowPaidReactionModal:We,isWithPaidReaction:C,isPrivate:h,isReady:St,canBuyPremium:j,isCurrentUserPremium:f,isInSavedMessages:Ie,canPlayAnimatedEmojis:Ce,onShowMore:Ft,onClose:Fe,className:(0,l.A)(It&&"ReactionSelector-hidden")}),a.Ay.createElement("div",{ref:lt,className:(0,l.A)("MessageContextMenu_items scrollable-content custom-scroll",It&&"MessageContextMenu_items-hidden"),dir:dt.isRtl?"rtl":void 0},Ct&&a.Ay.createElement(B.A,{icon:"gift",onClick:Pt},m?.isOutgoing?dt("SendAnotherGift"):dt("Conversation.ContextMenuSendGiftTo",tt)),U&&a.Ay.createElement(B.A,{icon:"send-outline",onClick:Oe},dt("MessageScheduleSend")),_&&a.Ay.createElement(B.A,{icon:"schedule",onClick:Be},dt("MessageScheduleEditTime")),H&&a.Ay.createElement(B.A,{icon:"reply",onClick:we},dt(G?"lng_context_quote_and_reply":"Reply")),!V&&Boolean(pe?.messagesCount)&&a.Ay.createElement(B.A,{icon:"replies",onClick:Re},dt("Conversation.ContextViewReplies",pe.messagesCount,"i")),q&&a.Ay.createElement(B.A,{icon:"edit",onClick:be},dt("Edit")),ee&&a.Ay.createElement(B.A,{icon:"favorite",onClick:Te},dt("AddToFavorites")),te&&a.Ay.createElement(B.A,{icon:"favorite",onClick:Le},dt("Stickers.RemoveFromFavorites")),le&&a.Ay.createElement(B.A,{icon:"language",onClick:Xe},dt("TranslateMessage")),de&&a.Ay.createElement(B.A,{icon:"language",onClick:Qe},dt("ShowOriginalButton")),me&&a.Ay.createElement(B.A,{icon:"web",onClick:et},dt("lng_settings_change_lang")),xt.map((e=>a.Ay.createElement(B.A,{key:e.label,icon:e.icon,onClick:e.handler,withPreventDefaultOnMouseDown:!0},dt(e.label)))),W&&a.Ay.createElement(B.A,{icon:"pin",onClick:Ne},dt("DialogPin")),Y&&a.Ay.createElement(B.A,{icon:"unpin",onClick:Me},dt("DialogUnpin")),se&&a.Ay.createElement(B.A,{icon:"gifs",onClick:$e},dt("lng_context_save_gif")),re&&a.Ay.createElement(B.A,{icon:"revote",onClick:ze},dt("lng_polls_retract")),ce&&a.Ay.createElement(B.A,{icon:"stop",onClick:He},dt("lng_polls_stop")),ie&&a.Ay.createElement(B.A,{icon:"download",onClick:je},dt(ue?"lng_context_cancel_download":"lng_media_download")),X&&a.Ay.createElement(B.A,{icon:"forward",onClick:ke},dt("Forward")),oe&&a.Ay.createElement(B.A,{icon:"select",onClick:De},dt("Common.Select")),Q&&a.Ay.createElement(B.A,{icon:"flag",onClick:xe},dt("lng_context_report_msg")),Z&&a.Ay.createElement(B.A,{destructive:!0,icon:"delete",onClick:Pe},dt("Delete")),fe&&a.Ay.createElement(a.Ay.Fragment,null,a.Ay.createElement(F.A,{size:"thick"}),!ve&&a.Ay.createElement(a.Ay.Fragment,null,a.Ay.createElement(K.A,{inline:!0,className:"menu-loading-row"}),a.Ay.createElement(K.A,{inline:!0,className:"menu-loading-row"})),ve&&1===ve.length&&a.Ay.createElement(B.A,{withWrap:!0,onClick:Tt,className:"menu-custom-emoji-sets"},(0,b.A)(dt("MessageContainsEmojiPack",ve[0].title),["simple_markdown","emoji"])),ve&&ve.length>1&&a.Ay.createElement(B.A,{withWrap:!0,onClick:Tt,className:"menu-custom-emoji-sets"},(0,b.A)(dt("MessageContainsEmojiPacks",ve.length),["simple_markdown"]))),(he||Ae)&&a.Ay.createElement(a.Ay.Fragment,null,a.Ay.createElement(F.A,{size:fe?"thin":"thick"}),a.Ay.createElement(B.A,{icon:Ae?"heart-outline":"group",onClick:Ae?Ge:Je,disabled:!Ae&&!Mt},a.Ay.createElement("span",{className:"MessageContextMenu--seen-by-label-wrapper"},a.Ay.createElement("span",{className:"MessageContextMenu--seen-by-label",dir:dt.isRtl?"rtl":void 0},Ae&&m.reactors?.count?he&&Mt?dt("Chat.OutgoingContextMixedReactionCount",[m.reactors.count,Mt]):dt("Chat.ContextReactionCount",m.reactors.count,"i"):1===Mt&&ye?(0,b.A)((0,r.L8)(ye[0].id)?(0,r.Yg)(ye[0]):ye[0].title):Mt?dt("Conversation.ContextMenuSeen",Mt,"i"):dt("Conversation.ContextMenuNoViews"))),a.Ay.createElement(D.A,{className:"avatars",size:"micro",peers:ye}))),(Se||Ee||ht)&&a.Ay.createElement(F.A,{size:fe?"thin":"thick"}),(Se||Ee)&&a.Ay.createElement(J,{canLoadReadDate:Se,shouldRenderShowWhen:Ee,message:m,closeContextMenu:Fe}),ht&&a.Ay.createElement($,{message:m})))})),q=window.getSelection(),V=-1,W=(0,a.ph)((0,o.EK)(((e,{message:t,messageListType:n,detectedLanguage:a})=>{const{threadId:o}=(0,c.Xf0)(e)||{},{defaultTags:i,topReactions:l,availableReactions:d}=e.reactions,m=(0,c.yuw)(e),u=(0,c.hds)(e,t.chatId),p=u&&(0,r.L8)(u.id),h=p?void 0:(0,c.AWZ)(e,t.chatId),A=(0,c.mBe)(e,t.chatId),g=A&&(0,r.Yg)(A),{seenByExpiresAt:y,seenByMaxChatMembers:f,maxUniqueReactions:v,readDateExpiresAt:C}=e.appConfig||{},I=h?.reactionsLimit||v,{noOptions:E,canReplyGlobally:S,canPin:w,canUnpin:R,canDelete:b,canReport:N,canEdit:M,canFaveSticker:k,canUnfaveSticker:P,canCopy:T,canCopyLink:x,canSelect:L,canDownload:D,canSaveGif:O,canRevote:B,canClosePoll:F}=o&&(0,c.WAX)(e,t,o)||{},K=(0,c.R4s)(e,t),U=p?(0,c.K0y)(e,u.id):void 0,_=(0,r.Ie)(t),j=u&&(0,c.yps)(e,u.id),$=Boolean(j),z=(0,c.Jbz)(e,t),H=Boolean(p&&_&&!$&&!z&&C&&t.date>Date.now()/1e3-C&&!U?.isReadDateRestricted&&"scheduled"!==n),J=Boolean(H&&p&&(0,c.K0y)(e,u.id)?.isReadDateRestrictedByMe),G="pinned"===n,q="scheduled"===n,V=u&&(0,r.WX)(u),W=o&&(0,c.Vw0)(e,t.chatId,o),Y=Boolean(W&&!W?.isCommentsInfo&&W?.fromChannelId),Z=o?(0,c.S0q)(e,t.chatId,o):void 0,X=u&&!(0,r.Sq)(u,"sendPlain",h),Q=!(!u||!o)&&(0,r.__)(u,Z,Y,h)&&X,ee=(0,r.Nb)(t),te=(0,r.G5)(t),ne=Boolean(!ee&&u&&!z&&f&&y&&(0,r.YE)(u)&&_&&!q&&u.membersCount&&u.membersCount<=f&&t.date>Date.now()/1e3-y),ae=(0,r._P)(t),oe=!ee&&!V&&!q&&!ae&&!p&&t.reactions&&!(0,r.G)(t.reactions)&&t.reactions.canSeeList,ie=(0,c.ynf)(e,t),se=Boolean(t.content.contact),re=(0,c.g29)(e),ce=(0,c.S1W)(e,t),le=ce?.map((t=>(0,c.ycM)(e,t))),de=le?.every(Boolean)?le:void 0,me=(0,c.Rny)(e,t.chatId,t.id),ue=me?Boolean((0,c.a_$)(e,t.chatId,me)[t.id]?.text):void 0,pe=!ue&&(0,c.S86)(e,t,a),he=(0,c.qZq)(e,t.chatId),Ae=(0,c.nZ4)(e,t.chatId),ge=(0,c.zcZ)(e,t),ye=t.content.storyData,fe=ye?(0,c.Msb)(e,ye.peerId,ye.id):void 0,ve=(0,c.X2D)(e,t.chatId);return{threadId:o,chat:u,availableReactions:d,topReactions:l,defaultTagReactions:i,noOptions:E,canReport:N,canSendNow:q,canReschedule:q,canReply:!G&&!q&&S,canPin:!q&&w,canUnpin:!q&&R,canDelete:b,canEdit:!G&&M,canForward:!q&&K,canFaveSticker:!q&&k,canUnfaveSticker:!q&&P,canCopy:se||!ie&&T,canCopyLink:!q&&x,canSelect:L,canDownload:!ie&&D,canSaveGif:!ie&&O,canRevote:B,canClosePoll:!q&&F,activeDownloads:m,canShowSeenBy:ne,canLoadReadDate:H,shouldRenderShowWhen:J,enabledReactions:u?.isForbidden?void 0:h?.enabledReactions,reactionsLimit:I,isPrivate:p,isCurrentUserPremium:re,hasFullInfo:Boolean(h),canShowReactionsCount:oe,canShowReactionList:!(ee||ae||q||u?.id===s.zv8||te),canBuyPremium:!re&&!(0,c.n_C)(e),customEmojiSetsInfo:ce,customEmojiSets:de,canScheduleUntilOnline:(0,c.RBq)(e,t.chatId),canTranslate:pe,canShowOriginal:ue&&!he,canSelectLanguage:ue&&!he,isMessageTranslated:ue,canPlayAnimatedEmojis:(0,c.BWX)(e),isReactionPickerOpen:(0,c.Ani)(e),isInSavedMessages:Ae,isChannel:V,canReplyInChat:Q,isWithPaidReaction:h?.isPaidReactionAvailable,poll:ge,story:fe,userFullName:g,canGift:ve}}))((({threadId:e,availableReactions:t,topReactions:n,defaultTagReactions:c,isOpen:m,messageListType:u,message:p,customEmojiSetsInfo:C,customEmojiSets:I,album:w,poll:R,story:b,anchor:N,targetHref:M,noOptions:k,canSendNow:P,hasFullInfo:T,canReschedule:x,canReply:L,canPin:D,repliesThreadInfo:O,canUnpin:B,canDelete:F,canShowReactionsCount:K,chat:U,canReport:_,canShowReactionList:j,canEdit:$,enabledReactions:z,reactionsLimit:H,isPrivate:J,isCurrentUserPremium:W,canForward:Y,canBuyPremium:Z,canFaveSticker:X,canUnfaveSticker:Q,canCopy:ee,canCopyLink:te,canSelect:ne,canDownload:ae,canSaveGif:oe,canRevote:ie,canClosePoll:se,canPlayAnimatedEmojis:re,canLoadReadDate:ce,shouldRenderShowWhen:le,activeDownloads:de,noReplies:me,canShowSeenBy:ue,canScheduleUntilOnline:pe,canTranslate:he,isMessageTranslated:Ae,canShowOriginal:ge,canSelectLanguage:ye,isReactionPickerOpen:fe,isInSavedMessages:ve,canReplyInChat:Ce,isWithPaidReaction:Ie,userFullName:Ee,canGift:Se,className:we,onClose:Re,onCloseAnimationEnd:be})=>{const{openThread:Ne,updateDraftReplyInfo:Me,setEditingId:ke,pinMessage:Pe,openForwardMenu:Te,openReplyMenu:xe,faveSticker:Le,unfaveSticker:De,toggleMessageSelection:Oe,sendScheduledMessages:Be,rescheduleMessage:Fe,downloadMedia:Ke,cancelMediaDownload:Ue,loadSeenBy:_e,openSeenByModal:je,openReactorListModal:$e,loadFullChat:ze,loadReactors:He,copyMessagesByIds:Je,saveGif:Ge,loadStickers:qe,cancelPollVote:Ve,closePoll:We,toggleReaction:Ye,requestMessageTranslation:Ze,showOriginalMessage:Xe,openChatLanguageModal:Qe,openMessageReactionPicker:et,openPremiumModal:tt,loadOutboxReadDate:nt,copyMessageLink:at,openDeleteMessageModal:ot,addLocalPaidReaction:it,openPaidReactionModal:st,reportMessages:rt}=(0,o.ko)(),ct=(0,y.A)(),{ref:lt}=(0,v.A)({isOpen:m,onCloseAnimationEnd:be,className:!1}),[dt,mt]=(0,a.J0)(!0),[ut,pt]=(0,a.J0)(!1),[ht,At,gt]=(0,A.A)(),[yt,ft]=(0,a.J0)(V),[vt,Ct]=(0,f.A)(pe,Re,p.date),It=void 0===C||Boolean(C.length);(0,a.vJ)((()=>{ue&&m&&_e({chatId:p.chatId,messageId:p.id})}),[_e,m,p.chatId,p.id,ue]),(0,a.vJ)((()=>{ce&&m&&nt({chatId:p.chatId,messageId:p.id})}),[ce,m,p.chatId,p.id,p.readDate]),(0,a.vJ)((()=>{K&&m&&He({chatId:p.chatId,messageId:p.id})}),[K,m,He,p.chatId,p.id]),(0,a.vJ)((()=>{C?.length&&I?.length!==C.length&&C.forEach((e=>{qe({stickerSetInfo:e})}))}),[C,I,qe]),(0,a.vJ)((()=>{T||J||!m||ze({chatId:p.chatId})}),[T,m,J,ze,p.chatId]);const Et=(0,a.Kr)((()=>{const e=(0,o.mS)().chats.byId,t=(0,o.mS)().users.byId;if(p.reactions?.recentReactions?.length){const n=new Set(p.reactions?.recentReactions?.map((({peerId:n})=>t[n]||e[n])));return Array.from(n).filter(Boolean).slice(0,s.dqH)}if(p.seenByDates)return Object.keys(p.seenByDates).slice(0,s.dqH).map((n=>t[n]||e[n])).filter(Boolean)}),[p.reactions?.recentReactions,p.seenByDates]),St=(0,a.Kr)((()=>{if(w)return w.messages.some((e=>{const t=(0,r.ed)(e);return!!t&&(0,r.$r)(de,t)}));const e=(0,r.ed)(p);return!!e&&(0,r.$r)(de,e)}),[de,w,p]),wt=L&&q?.rangeCount?q.getRangeAt(0):void 0;(0,a.vJ)((()=>{if(Ae)return void ft(V);if(!wt||wt.collapsed||!Boolean(p.content.text?.text)||!function(e){const t=e.commonAncestorContainer,n=t.nodeType===Node.TEXT_NODE?t.parentNode:t;return Boolean(n.closest(".message-content-wrapper .text-content"))&&!(Boolean(n.closest(".EmbeddedMessage"))||Boolean(n.closest(".WebPage")))}(wt))return void ft(V);const e=h(wt),t=p.content.text.text.replace(/\u00A0/g," ");e.text.trim().length>0&&t.includes(e.text)?ft(wt.startOffset):ft(V)}),[wt,wt?.collapsed,wt?.startOffset,wt?.endOffset,Ae,p.content.text]);const Rt=(0,g.A)((()=>{mt(!1),Re()})),bt=(0,g.A)((()=>{mt(!1),Rt();const e=w?.messages?w.messages.map((({id:e})=>e)):[p.id];ot({chatId:p.chatId,messageIds:e,isSchedule:"scheduled"===u})})),Nt=(0,g.A)((()=>{pt(!1),Re()})),Mt=(0,g.A)((()=>{const e=yt!==V&&wt?h(wt):void 0;Ce?Me({replyToMsgId:p.id,quoteText:e,quoteOffset:yt,replyToPeerId:void 0}):xe({fromChatId:p.chatId,messageId:p.id,quoteText:e,quoteOffset:yt}),Rt()})),kt=(0,g.A)((()=>{Ne({chatId:p.chatId,threadId:p.id}),Rt()})),Pt=(0,g.A)((()=>{ke({messageId:p.id}),Rt()})),Tt=(0,g.A)((()=>{mt(!1),pt(!0)})),xt=(0,g.A)((()=>{Pe({chatId:p.chatId,messageId:p.id,isUnpin:!0}),Rt()})),Lt=(0,g.A)((()=>{if(Rt(),w?.messages){const e=w.messages.map((({id:e})=>e));Te({fromChatId:p.chatId,messageIds:e})}else Te({fromChatId:p.chatId,messageIds:[p.id]})})),Dt=(0,g.A)((()=>{Rt(),Le({sticker:p.content.sticker})})),Ot=(0,g.A)((()=>{Rt(),De({sticker:p.content.sticker})})),Bt=(0,g.A)((()=>{Rt(),Ve({chatId:p.chatId,messageId:p.id})})),Ft=(0,g.A)((()=>{Rt(),We({chatId:p.chatId,messageId:p.id})})),Kt=(0,g.A)((()=>{const e=w?.messages?{messageId:p.id,childMessageIds:w.messages.map((({id:e})=>e)),withShift:!1}:{messageId:p.id,withShift:!1};Oe(e),Rt()})),Ut=(0,g.A)((()=>{Be({chatId:p.chatId,id:p.id}),Rt()})),_t=(0,g.A)((e=>{Fe({chatId:p.chatId,messageId:p.id,scheduledAt:e}),Re()})),jt=(0,g.A)((()=>{mt(!1),vt(_t)})),$t=(0,g.A)((()=>{Rt(),je({chatId:p.chatId,messageId:p.id})})),zt=(0,g.A)((()=>{Rt(),$e({chatId:p.chatId,messageId:p.id})})),Ht=(0,g.A)((e=>{Je({messageIds:e}),Rt()})),Jt=(0,g.A)((()=>{at({chatId:p.chatId,messageId:p.id,shouldIncludeThread:e!==i.l3,shouldIncludeGrouped:!0}),Rt()})),Gt=(0,g.A)((()=>{(0,d.eM)(p.content.contact.phoneNumber),Rt()})),qt=(0,g.A)((()=>{(w?.messages||[p]).forEach((e=>{const t=(0,r.ed)(e);t&&(St?Ue({media:t}):Ke({media:t,originMessage:e}))})),Rt()})),Vt=(0,g.A)((()=>{const e=(0,r.zX)(p);Ge({gif:e}),Rt()})),Wt=(0,g.A)((e=>{ve&&!W?tt({initialSection:"saved_tags"}):Ye({chatId:p.chatId,messageId:p.id,reaction:e,shouldAddToRecent:!0}),Rt()})),Yt=(0,g.A)((()=>{it({chatId:p.chatId,messageId:p.id,count:1}),Rt()})),Zt=(0,g.A)((()=>{st({chatId:p.chatId,messageId:p.id}),Rt()})),Xt=(0,g.A)((e=>{et({chatId:p.chatId,messageId:p.id,position:e})})),Qt=(0,g.A)((()=>{Ze({chatId:p.chatId,id:p.id}),Rt()})),en=(0,g.A)((()=>{Xe({chatId:p.chatId,id:p.id}),Rt()})),tn=(0,g.A)((()=>{Qe({chatId:p.chatId,messageId:p.id}),Rt()})),nn=(0,a.Kr)((()=>(w?w.messages:[p]).map((({id:e})=>e))),[w,p]),an=(0,g.A)((()=>{U&&(mt(!1),Re(),rt({chatId:U.id,messageIds:nn}))}));if(k)return void Rt();const on=new Date;return on.setFullYear(on.getFullYear()+1),a.Ay.createElement("div",{ref:lt,className:(0,l.A)("ContextMenuContainer",we)},a.Ay.createElement(G,{isReactionPickerOpen:fe,availableReactions:t,topReactions:n,defaultTagReactions:c,isWithPaidReaction:Ie,message:p,isPrivate:J,isCurrentUserPremium:W,canBuyPremium:Z,isOpen:dt,enabledReactions:z,reactionsLimit:H,anchor:N,targetHref:M,canShowReactionsCount:K,canShowReactionList:j,canSendNow:P,canReschedule:x,canReply:L,canQuote:yt!==V,canDelete:F,canPin:D,canReport:_,repliesThreadInfo:O,canUnpin:B,canEdit:$,canForward:Y,canFaveSticker:X,canUnfaveSticker:Q,canCopy:ee,canCopyLink:te,canSelect:ne,canDownload:ae,canSaveGif:oe,canRevote:ie,canClosePoll:se,canShowSeenBy:ue,canTranslate:he,canShowOriginal:ge,canSelectLanguage:ye,canPlayAnimatedEmojis:re,shouldRenderShowWhen:le,canLoadReadDate:ce,hasCustomEmoji:It,customEmojiSets:I,isDownloading:St,seenByRecentPeers:Et,isInSavedMessages:ve,noReplies:me,poll:R,story:b,onOpenThread:kt,onReply:Mt,onEdit:Pt,onPin:Tt,onUnpin:xt,onForward:Lt,onDelete:bt,onReport:an,onFaveSticker:Dt,onUnfaveSticker:Ot,onSelect:Kt,onSend:Ut,onReschedule:jt,onClose:Rt,onCopyLink:Jt,onCopyMessages:Ht,onCopyNumber:Gt,onDownload:qt,onSaveGif:Vt,onCancelVote:Bt,onClosePoll:At,onShowSeenBy:$t,onToggleReaction:Wt,onSendPaidReaction:Yt,onShowPaidReactionModal:Zt,onShowReactors:zt,onReactionPickerOpen:Xt,onTranslate:Qt,onShowOriginal:en,onSelectLanguage:tn,userFullName:Ee,canGift:Se}),a.Ay.createElement(E,{isOpen:ut,messageId:p.id,chatId:p.chatId,onClose:Nt}),a.Ay.createElement(S.A,{isOpen:ht,onClose:gt,text:ct("lng_polls_stop_warning"),confirmLabel:ct("lng_polls_stop_sure"),confirmHandler:Ft}),x&&Ct)})))},79519:(e,t,n)=>{n.d(t,{A:()=>m});var a=n(84051),o=n(61433),i=n(31481),s=n(66644),r=n(81954);const c=500,l=i.nxZ,d=20;function m({elementRef:e,chatId:t,isFocused:n,focusDirection:i,noFocusHighlight:m,isResizingContainer:u,isJustAdded:p,isQuote:h,scrollTargetPosition:A}){const g=(0,a.li)(!p);(0,a.Nf)((()=>{const t=g.current;if(g.current=!1,n&&e.current){const n=e.current.closest(".MessageList"),a=m,p=A||a?"end":"centerOrTop",g=()=>{const t=void 0!==i?a?c:l:void 0,m=(0,r.Ay)({container:n,element:e.current,position:p,margin:d,maxDistance:t,forceDirection:i,forceNormalContainerHeight:u,shouldReturnMutationFn:!0});if(h){const t=e.current.querySelector(".is-quote");t&&(0,s.RK)((()=>{(0,o.YM)(t,"animate")}))}return m};t?(0,s.gm)(g):(0,s.YS)((()=>{(0,s.RK)(g())}))}}),[e,t,n,i,m,u,h,A])}},76283:(e,t,n)=>{n.d(t,{A:()=>M});var a=n(84051),o=n(13439),i=n(90709),s=n(87357),r=n(17712),c=n(59030),l=n(18276),d=n(64493),m=n(96530),u=n(78376),p=n(76023),h=n(10722),A=n(4438),g=n(87412);const y="uGUjDZKl",f="M62HGuIV",v="WMpEr5XQ",C=2*p.$,I=(0,a.ph)((({reaction:e,chosen:t,isReady:n,noAppearAnimation:o,style:i,isLocked:c,onToggleReaction:d,onSendPaidReaction:m,onShowPaidReactionModal:p})=>{const I=(0,a.li)(null),E=(0,r.A)((()=>{"paid"!==e.type?d(e):m?.()})),{isContextMenuOpen:S,handleBeforeContextMenu:w,handleContextMenu:R,handleContextMenuClose:b,handleContextMenuHide:N}=(0,h.A)(I,"paid"!==e.type,void 0,void 0,void 0,!0);return(0,a.vJ)((()=>{S&&(p?.(),b(),N())}),[b,p,N,S]),a.Ay.createElement("div",{className:(0,s.A)(y,"oc1hpMwv",t&&"paid"!==e.type&&f,!o&&n&&"sx6RTuAU",o&&"kqcWe4tf"),ref:I,style:i,onClick:E,onMouseDown:w,onContextMenu:R},"paid"===e.type?a.Ay.createElement(A.A,{tgsUrl:u.w.StarReaction,size:C,noLoop:!1}):a.Ay.createElement(g.A,{documentId:e.documentId,size:C}),c&&a.Ay.createElement(l.A,{className:v,name:"lock-badge"}))}));var E=n(37661),S=n(62587),w=n(18104);const R=2*p.$,b=(0,a.ph)((({reaction:e,isReady:t,noAppearAnimation:n,chosen:o,isLocked:i,onToggleReaction:r})=>{const c=(0,S.A)(`sticker${e.appearAnimation?.id}`,!t||n),d=(0,S.A)(`document${e.selectAnimation?.id}`,!t||n),m=(0,S.A)(`document${e.staticIcon?.id}`,!n),[u,p]=(0,E.A)(),[h,,A]=(0,E.A)(!0),[g,C,I]=(0,E.A)();return a.Ay.createElement("div",{className:(0,s.A)(y,o&&f),onClick:function(){r(e.reaction)},onMouseEnter:t&&!h?C:void 0},n&&a.Ay.createElement("img",{className:"MZ2tH980",src:m,alt:e.reaction.emoticon,draggable:!1}),!u&&!n&&a.Ay.createElement(w.A,{key:e.appearAnimation?.id,tgsUrl:c,play:h,noLoop:!0,size:R,onEnded:A,forceAlways:!0}),!h&&!n&&a.Ay.createElement(w.A,{key:e.selectAnimation?.id,tgsUrl:d,play:g,noLoop:!0,size:R,onLoad:p,onEnded:I,forceAlways:!0}),i&&a.Ay.createElement(l.A,{className:v,name:"lock-badge"}))})),N=(0,s.x)("ReactionSelector"),M=(0,a.ph)((({allAvailableReactions:e,topReactions:t,defaultTagReactions:n,enabledReactions:u,currentReactions:p,reactionsLimit:h,isPrivate:A,isReady:g,canPlayAnimatedEmojis:y,className:f,isCurrentUserPremium:v,isInSavedMessages:C,isInStoryViewer:E,isForEffects:S,effectReactions:w,isWithPaidReaction:R,onClose:M,onToggleReaction:k,onSendPaidReaction:P,onShowPaidReactionModal:T,onShowMore:x})=>{const{openPremiumModal:L}=(0,o.ko)(),D=(0,a.li)(null),O=(0,c.A)(),B=C&&!v&&!E,F=Boolean(h&&p&&p.length>=h),K=(0,a.Kr)((()=>{const a=F?p?.map((e=>e.reaction)):S?w:C?n:"some"===u?.type?u.allowed:e?.map((e=>e.reaction)),o=a?.map((t=>{const n="custom"===t.type,a=e?.find((e=>(0,i.a0)(e.reaction,t)));return S?a:(n||a)&&!a?.isInactive&&(A||F||u&&(0,i.A3)(t,u))?n?t:a:void 0})).filter(Boolean)||[],s=(0,i.fu)(o,t);return R&&s.unshift({type:"paid"}),s}),[e,p,n,u,C,A,t,S,w,F,R]),U=(0,a.Kr)((()=>8===K.length?K:K.slice(0,7)),[K]),_=U.length<K.length,j=(0,a.Kr)((()=>{const e=p?.filter((({chosenOrder:e})=>void 0!==e))||[];return new Set(e.map((({reaction:e})=>U.findIndex((t=>t&&(0,i.a0)("reaction"in t?t.reaction:t,e))))))}),[p,U]),$=(0,r.A)((()=>{const e=D.current?.getBoundingClientRect()||{x:0,y:0};x({x:e.x,y:e.y})})),z=(0,r.A)((()=>{M?.(),L({initialSection:"saved_tags"})})),H=(0,a.Kr)((()=>{if(C){if(!v){const e=O("lng_subscribe_tag_about").split("{link}");return a.Ay.createElement("span",null,e[0],a.Ay.createElement(m.A,{isPrimary:!0,onClick:z},O("lng_subscribe_tag_link")),e[1])}return O("SavedTagReactionsHint2")}return E?O("StoryReactionsHint"):S?O("AddEffectMessageHint"):void 0}),[v,C,E,O,S]);if(U.length)return a.Ay.createElement("div",{className:(0,s.A)(N("&"),f),ref:D},a.Ay.createElement("div",{className:N("bubble-small",O.isRtl&&"isRtl")}),a.Ay.createElement("div",{className:N("items-wrapper")},a.Ay.createElement("div",{className:N("bubble-big",O.isRtl&&"isRtl")}),a.Ay.createElement("div",{className:N("items")},H&&a.Ay.createElement("div",{className:N("hint")},H),a.Ay.createElement("div",{className:N("reactions"),dir:O.isRtl?"rtl":void 0},U.map(((e,t)=>"reaction"in e?a.Ay.createElement(b,{key:(0,i.Jj)(e.reaction),isReady:g,onToggleReaction:k,reaction:e,noAppearAnimation:!y,chosen:j.has(t),isLocked:B}):a.Ay.createElement(I,{key:(0,i.Jj)(e),isReady:g,onToggleReaction:k,onSendPaidReaction:P,onShowPaidReactionModal:T,reaction:e,noAppearAnimation:!y,chosen:j.has(t),isLocked:B,style:`--_animation-delay: ${20*(7-t)}ms`}))),_&&a.Ay.createElement(d.A,{color:"translucent",className:N("show-more"),onClick:$},a.Ay.createElement(l.A,{name:"down"}))))))}))},43581:(e,t,n)=>{n.d(t,{A:()=>j});var a=n(84051),o=n(13439),i=n(90709),s=n(29807),r=n(87357),c=n(60343),l=n(15283),d=n(17712),m=n(59030),u=n(14242),p=n(76023),h=n(63527),A=n(10722),g=n(82117),y=n(39351),f=n(29886),v=n(21511),C=n(68292),I=n(26875),E=n(96454),S=n(78376),w=n(5912),R=n(4438),b=n(9267),N=n(93879);const M=1.5*p.$,k=6.5*p.$,P=E.pz||E.Ni?2:5,T=E.pz||E.Ni?2:3,x=(0,a.ph)((0,o.EK)(((e,{containerId:t})=>{const{activeReactions:n}=(0,s.nTw)(e),a=(0,s.xYJ)(e,"reactionEffects");return{activeReactions:n?.[t],withEffects:a}}))((({containerId:e,reaction:t,className:n,size:s=M,effectSize:c=k,activeReactions:l,localAmount:m,withEffects:u,observeIntersection:p})=>{const{stopActiveReaction:h}=(0,o.ko)(),A=(0,a.li)(null),y=(0,a.li)(null),[f,C]=(0,a.J0)([]),I=(0,w.Vz)(A,p),E=(0,a.Kr)((()=>l?.find((e=>(0,i.a0)(e,t)))),[l,t]),x=Boolean(u&&E),L=f.length<P;(0,g.A)((([e])=>{x?!m||m<=(e||0)||L&&C((e=>[...e,Date.now()])):C([])}),[m,L,x]);const{shouldRender:D}=(0,v.A)({ref:y,noMountTransition:!0,isOpen:x,className:"slow",withShouldRender:!0}),O=(0,d.A)((()=>{const n=f.slice(1);C(n),n.length||h({containerId:e,reaction:t})})),B=(0,r.A)(N.A.root,D&&N.A.animating,n);return a.Ay.createElement("div",{className:B,ref:A,teactFastList:!0},a.Ay.createElement(b.A,{key:"icon",type:"gold",size:"adaptive",style:`width: ${s}px; height: ${s}px`}),D&&f.map((e=>a.Ay.createElement(R.A,{key:e,ref:y,className:N.A.effect,size:c,tgsUrl:S.w.StarReactionEffect,play:I,noLoop:!0,forceAlways:!0,nonInteractive:!0,quality:T,onEnded:O}))))})));var L=n(11241),D=n(85118),O=n(64493),B=n(69988);const F=1.25*p.$;function K(e){return e.stars}const U=(0,a.ph)((({reaction:e,containerId:t,isOwnMessage:n,recentReactors:s,className:c,chosenClassName:l,chatId:m,messageId:p,isOutside:E,observeIntersection:S,onClick:w,onPaidClick:R})=>{const{openStarsBalanceModal:b,resetLocalPaidReactions:N,openPaidReactionModal:M,requestWave:k}=(0,o.ko)(),P=(0,a.li)(null),T=(0,a.li)(null),U=(0,a.li)(),_=(0,y.A)(),j="paid"===e.reaction.type,$=(0,h.A)(K),z=Boolean($),H=(0,d.A)(((e=1)=>{R?.(e)})),J=(0,d.A)((t=>{if("paid"===e.reaction.type)return t.stopPropagation(),void H();w?.(e.reaction)})),{isContextMenuOpen:G,handleBeforeContextMenu:q,handleContextMenu:V,handleContextMenuClose:W,handleContextMenuHide:Y}=(0,A.A)(P,"paid"!==e.reaction.type,void 0,void 0,void 0,!0);(0,a.vJ)((()=>{G&&(M({chatId:m,messageId:p}),W(),Y())}),[W,Y,G,m,p]),(0,g.A)((([t])=>{const n=e.localAmount,a=P.current;if(!n||!a||n===t?.localAmount)return;if(z&&n>$.balance.amount)return b({originReaction:{chatId:m,messageId:p,amount:n}}),void N({chatId:m,messageId:p});if(e.localAmount){const{left:e,top:t}=a.getBoundingClientRect(),n=e+a.offsetWidth/2,o=t+a.offsetHeight/2;k({startX:n,startY:o})}const o=Number(getComputedStyle(a).scale)||1;U.current?.cancel(),U.current=a.animate([{scale:o},{scale:Math.min(1.2*o,3),offset:.2},{scale:1}],{duration:500*o,easing:"ease-out"})}),[e,$?.balance,z,m,p]);const Z=(0,f.A)(e.localAmount),{shouldRender:X}=(0,v.A)({isOpen:Boolean(e.localAmount),ref:T,className:"slow",withShouldRender:!0});return a.Ay.createElement(O.A,{className:(0,r.A)(B.A.root,n&&B.A.own,j&&B.A.paid,E&&B.A.outside,(0,i.eu)(e)&&B.A.chosen,(0,i.eu)(e)&&l,c),size:"tiny",ref:P,onMouseDown:q,onContextMenu:V,onClick:J},"paid"===e.reaction.type?a.Ay.createElement(a.Ay.Fragment,null,a.Ay.createElement(D.A,{preset:"button"}),a.Ay.createElement(x,{className:B.A.animatedEmoji,containerId:t,reaction:e.reaction,size:F,localAmount:e.localAmount,observeIntersection:S}),X&&a.Ay.createElement(C.A,{ref:T,text:`+${(0,u.Vw)(_,e.localAmount||Z)}`,className:B.A.paidCounter})):a.Ay.createElement(L.A,{className:B.A.animatedEmoji,containerId:t,reaction:e.reaction,size:F,observeIntersection:S}),s?.length?a.Ay.createElement(I.A,{size:"mini",peers:s}):a.Ay.createElement(C.A,{text:(0,u.Vw)(_,e.count+(e.localAmount||0)),className:B.A.counter}))}));var _=n(92915);const j=(0,a.ph)((({message:e,threadId:t,isOutside:n,maxWidth:u,metaChildren:p,observeIntersection:h,noRecentReactors:A,isCurrentUserPremium:g,tags:y,isAccountFrozen:f})=>{const{toggleReaction:v,addLocalPaidReaction:C,updateMiddleSearch:I,performMiddleSearch:E,openPremiumModal:S,resetLocalPaidReactions:w,showNotification:R,openFrozenAccountModal:b}=(0,o.ko)(),N=(0,m.A)(),{results:M,areTags:k,recentReactions:P}=e.reactions,T=Boolean(e.areReactionsPossible&&e.reactions),x=(0,a.Kr)((()=>M.reduce(((e,t)=>e+t.count),0)),[M]),L=(0,a.Kr)((()=>{const e=(0,o.mS)();return P?.reduce(((t,n)=>{const{reaction:a,peerId:o}=n,r=(0,i.Jj)(a),c=(0,s.PVB)(e,o);if(!c)return t;const l=t[r]||[];return l.push(c),t[r]=l,t}),{})}),[P]),D=(0,a.Kr)((()=>{const t=(0,c.bj)(e);return M.map((e=>{const n=(0,i.Jj)(e.reaction),a=L?.[n],o=x>3||A,s=k?y?.[n]:void 0;return{reaction:e,reactionKey:n,messageKey:t,recentReactors:o?void 0:a,isChosen:(0,i.eu)(e),tag:s}}))}),[e,A,L,M,k,y,x]),O=(0,d.A)((n=>{if(!f)return k?g?(I({chatId:e.chatId,threadId:t,update:{savedTag:n}}),void E({chatId:e.chatId,threadId:t})):void S({initialSection:"saved_tags"}):void v({chatId:e.chatId,messageId:e.id,reaction:n});b()})),B=(0,a.Kr)((()=>M.find((e=>"paid"===e.reaction.type))?.localAmount||0),[M]),F=(0,d.A)((t=>{f?b():C({chatId:e.chatId,messageId:e.id,count:t})}));(0,a.vJ)((()=>{B&&R({localId:(0,c.bj)(e),title:N("StarsSentTitle"),message:N("StarsSentText",B),actionText:N("StarsSentUndo"),cacheBreaker:B.toString(),action:{action:"resetLocalPaidReactions",payload:{chatId:e.chatId,messageId:e.id}},dismissAction:{action:"sendPaidReaction",payload:{chatId:e.chatId,messageId:e.id}},duration:5e3,shouldShowTimer:!0,disableClickDismiss:!0,icon:"star"})}),[N,e,B]);const K=(0,d.A)((t=>{f?b():v({chatId:e.chatId,messageId:e.id,reaction:t})}));return(0,l.A)((()=>()=>{w({chatId:e.chatId,messageId:e.id})})),a.Ay.createElement("div",{className:(0,r.A)("Reactions",n&&"is-outside",T&&"is-service"),style:u?`max-width: ${u}px`:void 0,dir:N.isRtl?"rtl":"ltr"},D.map((({reaction:t,recentReactors:o,messageKey:i,reactionKey:s,isChosen:r,tag:c})=>k?a.Ay.createElement(_.A,{key:s,className:"message-reaction",chosenClassName:"chosen",containerId:i,isOwnMessage:e.isOutgoing,isChosen:r,reaction:t.reaction,tag:c,withContextMenu:g,onClick:O,onRemove:K,observeIntersection:h}):a.Ay.createElement(U,{key:s,chatId:e.chatId,messageId:e.id,className:"message-reaction",chosenClassName:"chosen",containerId:i,isOwnMessage:e.isOutgoing,recentReactors:o,isOutside:n,reaction:t,onClick:O,onPaidClick:F,observeIntersection:h}))),p)}))},92915:(e,t,n)=>{n.d(t,{A:()=>C});var a=n(84051),o=n(13439),i=n(87357),s=n(76023),r=n(10722),c=n(37661),l=n(17712),d=n(59030),m=n(11241),u=n(64493),p=n(40664),h=n(8410);const A=(0,a.ph)((({isOpen:e,title:t,subtitle:n,placeholder:o,submitText:i,maxLength:s,initialValue:r="",onClose:c,onSubmit:m})=>{const A=(0,d.A)(),[g,y]=(0,a.J0)(r),f=(0,l.A)((e=>{y(e.target.value)})),v=(0,l.A)((()=>{m(g)}));return a.Ay.createElement(h.A,{className:"narrow",title:t,isOpen:e,onClose:c,isSlim:!0},Boolean(n)&&a.Ay.createElement("div",{className:"cGrbcqD_"},n),a.Ay.createElement(p.A,{placeholder:o,value:g,onChange:f,maxLength:s,teactExperimentControlled:!0}),a.Ay.createElement("div",{className:"dialog-buttons mt-2"},a.Ay.createElement(u.A,{className:"confirm-dialog-button",onClick:v},i||A("Save")),a.Ay.createElement(u.A,{className:"confirm-dialog-button",isText:!0,onClick:c},A("Cancel"))))}));var g=n(71429),y=n(24433),f=n(69988);const v=1.25*s.$,C=(0,a.ph)((({reaction:e,tag:t,containerId:n,isChosen:s,isOwnMessage:p,className:h,chosenClassName:C,withCount:I,isDisabled:E,withContextMenu:S,observeIntersection:w,onClick:R,onRemove:b})=>{const{editSavedReactionTag:N}=(0,o.ko)(),M=(0,a.li)(null),k=(0,a.li)(null),P=(0,d.A)(),[T,x,L]=(0,c.A)(),{title:D,count:O}=t||{},B=Boolean(D||I&&O),F=(0,l.A)((()=>{R?.(e)})),K=(0,l.A)((()=>{b?.(e)})),U=(0,l.A)((t=>{N({reaction:e,title:t}),L()})),{isContextMenuOpen:_,contextMenuAnchor:j,handleBeforeContextMenu:$,handleContextMenu:z,handleContextMenuClose:H,handleContextMenuHide:J}=(0,r.A)(M,!S,void 0,void 0,void 0,!0),G=(0,l.A)((()=>M.current)),q=(0,l.A)((()=>document.body)),V=(0,l.A)((()=>k.current)),W=(0,l.A)((()=>({withPortal:!0,shouldAvoidNegativePosition:!0})));if(!I||0!==O)return a.Ay.createElement(u.A,{className:(0,i.A)(f.A.root,f.A.tag,p&&f.A.own,s&&f.A.chosen,s&&C,E&&f.A.disabled,h),size:"tiny",onClick:F,onMouseDown:$,onContextMenu:z,ref:M},a.Ay.createElement(m.A,{className:f.A.animatedEmoji,containerId:n,reaction:e,loopLimit:1,size:v,observeIntersection:w}),B&&a.Ay.createElement("span",{className:f.A.tagText},D&&a.Ay.createElement("span",null,D),I&&a.Ay.createElement("span",null,O)),a.Ay.createElement("svg",{className:f.A.tail,width:"15",height:"30",viewBox:"0 0 15 30"},a.Ay.createElement("path",{className:f.A.tailFill,d:"m 0,30 c 3.1855,0 6.1803,-1.5176 8.0641,-4.0864 l 5.835,-7.9568 c 1.2906,-1.7599 1.2906,-4.1537 0,-5.9136 L 8.0641,4.08636 C 6.1803,1.51761 3.1855,0 0,0"})),S&&a.Ay.createElement(A,{isOpen:T,maxLength:15,title:P(t?.title?"SavedTagRenameTag":"SavedTagLabelTag"),subtitle:P("SavedTagLabelTagText"),placeholder:P("SavedTagLabelPlaceholder"),initialValue:t?.title,onClose:L,onSubmit:U}),S&&j&&a.Ay.createElement(g.A,{ref:k,isOpen:_,anchor:j,getTriggerElement:G,getRootElement:q,getMenuElement:V,getLayout:W,autoClose:!0,withPortal:!0,onClose:H,onCloseAnimationEnd:J},a.Ay.createElement(y.A,{icon:"tag-filter",onClick:F},P("SavedTagFilterByTag")),a.Ay.createElement(y.A,{icon:"tag-name",onClick:x},P(t?.title?"SavedTagRenameTag":"SavedTagLabelTag")),a.Ay.createElement(y.A,{icon:"tag-crossed",destructive:!0,onClick:K},P("SavedTagRemoveTag"))))}))},86046:(e,t,n)=>{n.d(t,{D5:()=>m,HT:()=>s,M6:()=>d,Pc:()=>r,ZF:()=>l,hk:()=>c,j6:()=>u,jA:()=>i});var a=n(5930),o=n(29807);function i(e,t){if("slug"===t.type)return t;if("stargift"===t.type){const{peerId:n,shouldHideName:a,giftId:i,message:s,shouldUpgrade:r}=t,c=(0,o.PVB)(e,n);if(!c)return;return{type:"stargift",peer:c,shouldHideName:a,giftId:i,message:s,shouldUpgrade:r}}if("starsgift"===t.type){const{userId:n,stars:a,amount:i,currency:s}=t,r=(0,o.mBe)(e,n);if(!r)return;return{type:"stars",purpose:{type:"starsgift",user:r,stars:a,amount:i,currency:s}}}if("stars"===t.type){const{stars:e,amount:n,currency:a}=t;return{type:"stars",purpose:{type:"stars",stars:e,amount:n,currency:a}}}if("chatInviteSubscription"===t.type){const{hash:e}=t;return{type:"chatInviteSubscription",hash:e}}if("message"===t.type){const n=(0,o.hds)(e,t.chatId);if(!n)return;return{type:"message",chat:n,messageId:t.messageId}}if("premiumGiftStars"===t.type){const{months:n,userId:a,message:i}=t,s=(0,o.mBe)(e,a);if(!s)return;return{type:"premiumGiftStars",months:n,message:i,user:s}}if("giftcode"===t.type){const{userIds:n,boostChannelId:a,amount:i,currency:s,option:r,message:c}=t;return{type:"giveaway",option:r,purpose:{type:"giftcode",amount:i,currency:s,users:n.map((t=>(0,o.mBe)(e,t))).filter(Boolean),boostChannel:a?(0,o.hds)(e,a):void 0,message:c}}}if("starsgiveaway"===t.type){const{chatId:n,additionalChannelIds:a,amount:i,currency:s,untilDate:r,areWinnersVisible:c,countries:l,isOnlyForNewSubscribers:d,prizeDescription:m,stars:u,users:p}=t,h=(0,o.hds)(e,n);if(!h)return;const A=a?.map((t=>(0,o.hds)(e,t))).filter(Boolean);return{type:"starsgiveaway",purpose:{type:"starsgiveaway",amount:i,currency:s,chat:h,additionalChannels:A,untilDate:r,areWinnersVisible:c,countries:l,isOnlyForNewSubscribers:d,prizeDescription:m,stars:u,users:p}}}if("giveaway"===t.type){const{chatId:n,additionalChannelIds:a,amount:i,currency:s,option:r,untilDate:c,areWinnersVisible:l,countries:d,isOnlyForNewSubscribers:m,prizeDescription:u}=t,p=(0,o.hds)(e,n);if(!p)return;const h=a?.map((t=>(0,o.hds)(e,t))).filter(Boolean);return{type:"giveaway",option:r,purpose:{type:"giveaway",amount:i,currency:s,chat:p,additionalChannels:h,untilDate:c,areWinnersVisible:l,countries:d,isOnlyForNewSubscribers:m,prizeDescription:u}}}if("stargiftUpgrade"===t.type){const{inputSavedGift:n,shouldKeepOriginalDetails:a}=t,o=s(e,n);if(!o)return;return{type:"stargiftUpgrade",inputSavedGift:o,shouldKeepOriginalDetails:a}}if("stargiftTransfer"===t.type){const{inputSavedGift:n,recipientId:a}=t,i=s(e,n),r=(0,o.PVB)(e,a);if(!i||!r)return;return{type:"stargiftTransfer",inputSavedGift:i,recipient:r}}}function s(e,t){if("user"===t.type)return t;if("chat"===t.type){const n=(0,o.hds)(e,t.chatId);if(!n)return;return{type:"chat",chat:n,savedId:t.savedId}}}function r(e){return"appStore"===e.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.AppleTopUp.Title",subtitleKey:"Stars.Intro.Transaction.AppleTopUp.Subtitle",peerColorId:5}:"playMarket"===e.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.GoogleTopUp.Title",subtitleKey:"Stars.Intro.Transaction.GoogleTopUp.Subtitle",peerColorId:3}:"fragment"===e.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.FragmentTopUp.Title",subtitleKey:"Stars.Intro.Transaction.FragmentTopUp.Subtitle",customPeerAvatarColor:"#000000"}:"premiumBot"===e.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.PremiumBotTopUp.Title",subtitleKey:"Stars.Intro.Transaction.PremiumBotTopUp.Subtitle",peerColorId:1,withPremiumGradient:!0}:"ads"===e.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.TelegramAds.Title",subtitleKey:"Stars.Intro.Transaction.TelegramAds.Subtitle",peerColorId:2}:"api"===e.type?{avatarIcon:"bots",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.TelegramBotApi.Title",subtitleKey:"Stars.Intro.Transaction.TelegramBotApi.Subtitle",peerColorId:4}:{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.Unsupported.Title",subtitleKey:"Stars.Intro.Transaction.Unsupported.Title",peerColorId:0}}function c(e,t){const n=t.amount+t.nanos/1e9;return n<0?`- ${e.number(Math.abs(n))}`:`+ ${e.number(n)}`}function l(e,t){return e.number(t.amount+t.nanos/1e9)}function d(e){const{action:t}=e.content;if("giftStars"!==t?.type)return;const{transactionId:n,stars:a}=t;return{id:n,stars:{amount:a,nanos:0},peer:{type:"peer",id:e.isOutgoing?e.chatId:e.senderId||e.chatId},date:e.date,isGift:!0,isMyGift:e.isOutgoing||void 0}}function m(e){const{action:t}=e.content;if("prizeStars"!==t?.type)return;const{transactionId:n,stars:a,boostPeerId:o}=t;return{id:n,stars:{amount:a,nanos:0},peer:{type:"peer",id:o},date:e.date,giveawayPostId:e.id}}function u(e,t){return(0,a.A)(e,t)}},14737:(e,t,n)=>{n.d(t,{A:()=>i});var a=n(84051),o=n(17712);const i=function(e,t){const n=(0,o.A)(e);(0,a.vJ)((()=>{if("number"!=typeof t)return;const e=setTimeout((()=>n()),t);return()=>clearTimeout(e)}),[t])}},45470:(e,t,n)=>{n.d(t,{A:()=>d});var a=n(84051),o=n(32610),i=n(66644),s=n(96454),r=n(35297);const c=2,l=2;function d(e,t=!1,n,d=c,m,u){const p=(0,a.li)(null),h=(0,a.li)();return(0,r.A)((()=>{t||(h.current=!1)}),[e,t]),(0,a.vJ)((()=>{const a=p.current;if(!e||!a||t||h.current)return;h.current=!0;const r=new Image,c=()=>{const e=m||r.width,t=u||r.height,n=a.getContext("2d",{alpha:!1});(0,i.RK)((()=>{a.width=e,a.height=t,s.QH&&(n.filter=`blur(${d}px)`),n.drawImage(r,2*-d,2*-d,e+4*d,t+4*d),s.QH||(0,o.A)(n,0,0,e,t,d,l)}))};r.onload=()=>{n?(0,i.YS)(c):c()},r.src=e}),[e,t,u,m,d,n]),p}},65632:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(84051),o=n(13439),i=n(31481),s=n(74824),r=n(87679);const c=(e,t)=>{const{setThemeSettings:n}=(0,o.ko)(),[c,l]=(0,a.J0)(t);return(0,a.vJ)((()=>{t&&(t.startsWith("#")?l(t):s.fetch(i.nfi,e,s.Type.Blob).then((e=>{const t=URL.createObjectURL(e);(0,r.NN)(t).then((()=>{l(`url(${t})`)}))})).catch((()=>{n({theme:e,background:void 0,backgroundColor:void 0,isBlurred:!0,patternColor:"dark"===e?i.MkD:i.be8})})))}),[t,e]),t?c:void 0}},49746:(e,t,n)=>{n.d(t,{A:()=>i});var a=n(84051),o=n(13439);function i(e,t,n,i,s){const{loadMessage:r}=(0,o.ko)();(0,a.vJ)((()=>{s||t&&!n&&r({chatId:e,messageId:t,replyOriginForId:i})}),[s,e,n,t,i])}},74984:(e,t,n)=>{n.d(t,{Jm:()=>l,Rh:()=>s,g5:()=>c,ic:()=>r});var a=n(84051),o=n(49763),i=n(30857);function s(e){const t=(0,i.A)();return(0,a.vJ)((()=>(0,o.Yw)(e,t)),[e,t]),(0,o.YA)(e)}function r(){const e=(0,i.A)();return(0,a.vJ)((()=>(0,o.P1)(e)),[e]),(0,o.PZ)()}function c(){const e=(0,i.A)();return(0,a.vJ)((()=>(0,o.BU)(e)),[e]),(0,o.jn)()}function l(){const e=(0,i.A)();return(0,a.vJ)((()=>(0,o.dk)(e)),[e]),(0,o.Xq)()}},36838:(e,t,n)=>{n.d(t,{A:()=>o});var a=n(84051);const o=(e,t,n=!1)=>{(0,a.vJ)((()=>{if(t)return;const a=e.current;function o(e){e.deltaX||(a.scrollLeft+=e.deltaY/4,n&&e.preventDefault())}return a.addEventListener("wheel",o,{passive:!n}),()=>{a.removeEventListener("wheel",o)}}),[e,t,n])}},29886:(e,t,n)=>{n.d(t,{A:()=>o});var a=n(84051);function o(e){const t=(0,a.li)(),n=(0,a.li)();return n.current!==e&&(t.current=n.current),n.current=e,t.current}},14622:(e,t,n)=>{n.d(t,{A:()=>l});var a=n(84051),o=n(13439),i=n(81954),s=n(17712),r=n(93545),c=n(672);const l=function(e,t=!1){const{focusLastMessage:n}=(0,o.ko)(),l=(0,a.li)(0),d=(0,s.A)((e=>{const t=l.current,o=e.contentRect.height;if(l.current=o,(0,i.o8)()||!t||o<=t)return;const s=e.target.closest(".MessageList");if(!s)return;(0,a.VK)(400);const r=o-t,{offsetHeight:c,scrollHeight:d,scrollTop:m}=s;Math.round(d-m-c)-r<=5&&n()})),m=(0,c.A)(d,[d],300,!1);(0,r.A)(e,m,!t)}},56133:(e,t,n)=>{n.d(t,{A:()=>o});var a=n(16581);function o(e,t,n,o=[]){return(0,a.A)((e=>{e()}),o,e,t,n)}},24531:(e,t,n)=>{n.d(t,{A:()=>u});var a=n(84051),o=n(31481),i=n(17663),s=n(80140),r=n(17712),c=n(59030),l=n(80089),d=n(80464);const m=e=>{const{isOpen:t}=e,n=(0,d.A)(l.ar.Extra,"CalendarModal",!t);return n?a.Ay.createElement(n,e):void 0},u=(e,t,n)=>{const l=(0,c.A)(),[d,u]=(0,a.J0)(),p=(0,r.A)(((e,t=!1)=>{const n=Math.round(Math.max(e.getTime(),Date.now()+6e4)/1e3)+(t?0:(0,s.SF)());d?.(n),u(void 0)})),h=(0,r.A)((()=>{p(new Date(1e3*o.NkL),!0)})),A=(0,r.A)((()=>{u(void 0),t?.()})),g=(0,r.A)((e=>{u((()=>e))})),y=n?new Date(1e3*n):new Date;y.setSeconds(0),y.setMilliseconds(0);const f=new Date;return f.setFullYear(f.getFullYear()+1),[g,a.Ay.createElement(m,{isOpen:Boolean(d),withTimePicker:!0,selectedAt:y.getTime(),maxAt:(0,i.CS)(f),isFutureMode:!0,secondButtonLabel:e?l("Schedule.SendWhenOnline"):void 0,onClose:A,onSubmit:p,onSecondButtonClick:e?h:void 0})]}},57446:(e,t,n)=>{n.d(t,{A:()=>l});var a=n(13439),o=n(66644),i=n(29807),s=n(19822);const r=300,c=new Map;function l(e,t,n=r){(0,i.PKK)((0,a.mS)())||(n=0);const l="rtl"===e.getAttribute("dir"),{scrollLeft:d,offsetWidth:m,scrollWidth:u,dataset:{scrollId:p}}=e;let h=t-d;if(h<0){const e=-d*(l?-1:1);h=Math.max(h,e)}else if(h>0){const e=u-(d+m);h=Math.min(h,e)}if(0===h)return Promise.resolve();p&&c.has(p)&&c.get(p)();const A=d+h;return new Promise((t=>{(0,o.RK)((()=>{if(0===n)return e.scrollLeft=A,void t();let a=!1;const i=Math.random().toString();e.dataset.scrollId=i,c.set(i,(()=>{a=!0})),e.style.scrollSnapType="none";const r=Date.now();function l(){e.style.scrollSnapType="",delete e.dataset.scrollId,c.delete(i)}(0,s.i0)((()=>{if(a)return l(),!1;const o=Math.min((Date.now()-r)/n,1),i=h*(1-function(e){return 1-(1-e)**3.5}(o));return e.scrollLeft=Math.round(A-i),o>=1&&(l(),t()),o<1}),o.RK)}))}))}},81954:(e,t,n)=>{n.d(t,{Ay:()=>A,H$:()=>v,_v:()=>g,o8:()=>f});var a=n(84051),o=n(13439),i=n(89925),s=n(31481),r=n(66644),c=n(29807),l=n(96454),d=n(16460),m=n(19822);let u,p,h=!1;function A(e){u=e;const t=y(e);if(e.shouldReturnMutationFn)return t;(0,r.RK)(t)}function g(){h&&((0,m.vk)(),(0,r.YS)((()=>{(0,r.RK)(y(u))})))}function y(e){const{container:t,element:n,position:A,margin:g=0,maxDistance:y=s.nxZ,forceDirection:f,forceNormalContainerHeight:v}=e;let E=e.forceDuration;f!==i.CC.Static&&(0,c.PKK)((0,o.mS)())||(E=0);const{offsetHeight:S}=n,{scrollTop:w,offsetHeight:R,scrollHeight:b}=t,N=(0,d.A)(n,t).top,M=v&&t.dataset.normalHeight?Number(t.dataset.normalHeight):R;let k;switch(A){case"start":k=N-g+(l.Ni?1:0);break;case"end":k=N+S+g-M;break;case"nearest":case"center":case"centerOrTop":k=S<M?N+S/2-M/2:N-g}const P=function(e,t,n=s.nxZ,a){const{scrollTop:o}=e;if(void 0===a){const e=t-o;if(e<-n)return o+(e+n);if(e>n)return o+(e-n)}else{if(a===i.CC.Up)return t+n;if(a===i.CC.Down)return Math.max(0,t-n)}return o}(t,k,y,f);let T=k-P;if(T<0){const e=-P;T=Math.max(T,e)}else if(T>0){const e=b-(P+M);T=Math.min(T,e)}const x=Math.abs(T);return()=>{if(x<1)return void(w!==P&&(t.scrollTop=P));const e=P+T;if(0===E)return void(t.scrollTop=e);const n=x<=s.s8T?C:I,o=E||s.SKD+x/s.nxZ*(s.OzO-s.SKD),i=Date.now();h=!0;const c=p;p=(0,a.VK)(void 0,!0),c?.(),(0,m.S0)((()=>{const a=Math.min((Date.now()-i)/o,1),s=T*(1-n(a)),r=Math.round(e-s);return t.scrollTop=r,h=a<1&&r!==e,h||(u=void 0,p?.(),p=void 0),h}),r.RK)}}function f(){return h}function v(){p(),p=void 0}function C(e){return 1-(1-e)**3.5}function I(e){return 1-(1-e)**6}},81686:(e,t,n)=>{n.d(t,{A:()=>i});var a=n(31481);const o=1;function i(){const e=window.getSelection();let t=e?.rangeCount?e.getRangeAt(0).cloneContents():void 0;const n=e?.focusNode&&e.focusOffset>0&&s(e.focusNode,a.zPk);if(!t||0===t.childElementCount)return;const i=Array.from(t.children).reduce(((e,t)=>t.nodeType===o&&t.classList.contains("message-date-group")?Array.from(t.querySelectorAll(".Message")).reduce(((e,t)=>e.concat(Number(t.dataset.messageId))),e):t.nodeType===o&&t.classList.contains("Message")?e.concat(Number(t.dataset.messageId)):e),[]);for(;t.firstChild;)t.removeChild(t.firstChild);return t=void 0,n||i.pop(),i}function s(e,t){return!(e.nodeType!==o||!e.classList.contains(t))||!!e.parentNode&&s(e.parentNode,t)}},58968:(e,t,n)=>{n.d(t,{I5:()=>s,LS:()=>i,V2:()=>o,lw:()=>a});const a={isCustomPeer:!0,type:"premium",titleKey:"PrivacyPremium",subtitleKey:"PrivacyPremiumText",avatarIcon:"star",isAvatarSquare:!0,withPremiumGradient:!0},o=[{isCustomPeer:!0,type:"contacts",titleKey:"FilterContacts",avatarIcon:"user",isAvatarSquare:!0,peerColorId:5},{isCustomPeer:!0,type:"nonContacts",titleKey:"FilterNonContacts",avatarIcon:"non-contacts",isAvatarSquare:!0,peerColorId:4},{isCustomPeer:!0,type:"groups",titleKey:"FilterGroups",avatarIcon:"group",isAvatarSquare:!0,peerColorId:3},{isCustomPeer:!0,type:"channels",titleKey:"FilterChannels",avatarIcon:"channel",isAvatarSquare:!0,peerColorId:1},{isCustomPeer:!0,type:"bots",titleKey:"FilterBots",avatarIcon:"bots",isAvatarSquare:!0,peerColorId:6}],i=[{isCustomPeer:!0,type:"excludeMuted",titleKey:"FilterMuted",avatarIcon:"mute",isAvatarSquare:!0,peerColorId:6},{isCustomPeer:!0,type:"excludeRead",titleKey:"FilterRead",avatarIcon:"readchats",isAvatarSquare:!0,peerColorId:4},{isCustomPeer:!0,type:"excludeArchived",titleKey:"FilterArchived",avatarIcon:"archive",isAvatarSquare:!0,peerColorId:5}],s={isCustomPeer:!0,type:"hidden",titleKey:"StarsTransactionHidden",avatarIcon:"author-hidden",peerColorId:4}},80539:(e,t,n)=>{n.d(t,{Ay:()=>c,g4:()=>l,qh:()=>s});var a=n(23174),o=n(31481),i=n(96454);const s={B:a.C7.Bold,STRONG:a.C7.Bold,I:a.C7.Italic,EM:a.C7.Italic,INS:a.C7.Underline,U:a.C7.Underline,S:a.C7.Strike,STRIKE:a.C7.Strike,DEL:a.C7.Strike,CODE:a.C7.Code,PRE:a.C7.Pre,BLOCKQUOTE:a.C7.Blockquote},r=3;function c(e,t=!1,n=!1){const c=document.createElement("div");c.innerHTML=n?e:function(e){let t=e.slice(0);return 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>"),i.TL||(t=t.replace(/\[<img[^>]+alt="([^"]+)"[^>]*>]/gm,"[$1]")),t=t.replace(/(?!<(?:code|pre)[^<]*|<\/)\[([^\]\n]+)\]\(customEmoji:(\d+)\)(?![^<]*<\/(?:code|pre)>)/g,'<img alt="$1" data-document-id="$2">'),t=t.replace(/(?!<(code|pre)[^<]*|<\/)[*]{2}([^*\n]+)[*]{2}(?![^<]*<\/(code|pre)>)/g,"<b>$2</b>"),t=t.replace(/(?!<(code|pre)[^<]*|<\/)[_]{2}([^_\n]+)[_]{2}(?![^<]*<\/(code|pre)>)/g,"<i>$2</i>"),t=t.replace(/(?!<(code|pre)[^<]*|<\/)[~]{2}([^~\n]+)[~]{2}(?![^<]*<\/(code|pre)>)/g,"<s>$2</s>"),t=t.replace(/(?!<(code|pre)[^<]*|<\/)[|]{2}([^|\n]+)[|]{2}(?![^<]*<\/(code|pre)>)/g,`<span data-entity-type="${a.C7.Spoiler}">$2</span>`),t}(t?function(e){return e.replace(new RegExp(`\\[([^\\]]+?)]\\((${o.kNZ}+?)\\)`,"g"),((e,t,n)=>`<a href="${n.includes("://")?n:n.includes("@")?`mailto:${n}`:`https://${n}`}">${t}</a>`))}(e):e),l(c);const d=c.innerText.trim().replace(/\u200b+/g,"");let m=-c.innerText.indexOf(d[0]),u=0;const p=[];function h(e){if(e.nodeType===Node.COMMENT_NODE)return;const{index:t,entity:n}=function(e,t,n){const o=function(e){if(e instanceof HTMLElement&&e.dataset.entityType)return e.dataset.entityType;if(s[e.nodeName])return s[e.nodeName];if("A"===e.nodeName){const t=e;return t.dataset.entityType===a.C7.MentionName?a.C7.MentionName:t.dataset.entityType===a.C7.Url?a.C7.Url:t.href.startsWith("mailto:")?a.C7.Email:t.href.startsWith("tel:")?a.C7.Phone:t.href!==t.textContent?a.C7.TextUrl:a.C7.Url}return"SPAN"===e.nodeName?e.dataset.entityType:"IMG"===e.nodeName&&e.dataset.documentId?a.C7.CustomEmoji:void 0}(e);if(!o||!e.textContent)return{index:n,entity:void 0};const i=t.indexOf(e.textContent,n),r=i>=0?i:n,c=t.substring(0,r).length,{length:l}=t.substring(r,r+e.textContent.length);if(o===a.C7.TextUrl)return{index:r,entity:{type:o,offset:c,length:l,url:e.href}};if(o===a.C7.MentionName)return{index:r,entity:{type:o,offset:c,length:l,userId:e.dataset.userId}};if(o===a.C7.Pre)return{index:r,entity:{type:o,offset:c,length:l,language:e.dataset.language}};if(o===a.C7.CustomEmoji)return{index:r,entity:{type:o,offset:c,length:l,documentId:e.dataset.documentId}};if(o===a.C7.Timestamp){const t=Number(e.dataset.timestamp);return Number.isNaN(t)?{index:r,entity:void 0}:{index:r,entity:{type:o,offset:c,length:l,timestamp:t}}}return{index:r,entity:{type:o,offset:c,length:l}}}(e,d,m);if(n)m=t,p.push(n);else if(e.textContent){if(0===t&&""===e.textContent.trim())return;m+=e.textContent.length}e.hasChildNodes()&&u<=r&&(u+=1,Array.from(e.childNodes).forEach(h))}return Array.from(c.childNodes).forEach((e=>{u=1,h(e)})),{text:d,entities:p.length?p:void 0}}function l(e){e.querySelectorAll("img").forEach((e=>{e.dataset.documentId?e.textContent=e.alt||"":e.replaceWith(e.alt||"")}))}},73104:(e,t,n)=>{let a,o;n.d(t,{M6:()=>c,v5:()=>l});const i={Down:!0,ArrowDown:!0,Up:!0,ArrowUp:!0,Left:!0,ArrowLeft:!0,Right:!0,ArrowRight:!0," ":!0,PageUp:!0,PageDown:!0,End:!0,Home:!0,Tab:!0},s=e=>{const t="deltaY"in e?e.deltaY:(e=>"changedTouches"in e?e.changedTouches[0].clientY:0)(e);if(!a||!a.contains(e.target)||a.scrollTop<=0&&t<=0||a.scrollTop>=a.scrollHeight-a.offsetHeight&&t>=0){if(o&&e.target.closest(o))return;e.preventDefault()}};function r(e){i[e.key]&&!function(e){if(!(e&&e instanceof HTMLElement))return!1;const t=e,n=t.tagName.toLowerCase();if("textarea"===n)return!0;if("input"!==n)return!1;const a=t.getAttribute("type");return!!a&&["text","password","number","email","tel","url","search","date","datetime","datetime-local","time","month","week"].indexOf(a.toLowerCase())>-1}(e.target)&&e.preventDefault()}function c(e,t){return a=e,o=t,document.addEventListener("wheel",s,{passive:!1}),document.addEventListener("touchmove",s,{passive:!1}),document.onkeydown=r,l}function l(){a=void 0,o=void 0,document.removeEventListener("wheel",s),document.removeEventListener("touchmove",s),document.onkeydown=null}},16460:(e,t,n)=>{function a(e,t){let n=0,a=0,o=e;for(;o&&o!==t&&!o.contains(t);)n+=o.offsetTop,a+=o.offsetLeft,o=o.offsetParent;return{top:n,left:a}}n.d(t,{A:()=>a})},41512:(e,t,n)=>{n.d(t,{Y:()=>o});var a=n(43503);function o(e){if("none"===e.style.display)return!1;const t=e.getBoundingClientRect(),{height:n}=a.A.get();return t.top<=n&&t.top+t.height>=0}},31722:(e,t,n)=>{n.d(t,{A:()=>a});const a={container:"YmM5biTv",header:"S7WFT2bv",pickerCategoryTitle:"YK1300x2",peerChip:"gsKPBPoK",pickerList:"yLCbiItq",padded:"bXzIGw8s",noResults:"dXWKD0ve",onlineStatus:"d5GDOYh9"}},93879:(e,t,n)=>{n.d(t,{A:()=>a});const a={root:"O9uCTt5C","animated-icon":"HiI6SMxF",animatedIcon:"HiI6SMxF",effect:"NhFcTGja",animating:"ikfZ6Igz",withEffectOnly:"jjRJmHCg"}},69988:(e,t,n)=>{n.d(t,{A:()=>a});const a={root:"gXO57D98",chosen:"VXSJn0Sm",paid:"N3lcrsh8",outside:"Hqw10FGl","animated-emoji":"lFjoRm_p",animatedEmoji:"lFjoRm_p",tag:"Dr889Kzc",tail:"cUfY1b26","is-safari":"rxxUijuG",isSafari:"rxxUijuG","tail-fill":"y591o4fN",tailFill:"y591o4fN","tag-text":"ly7cruxF",tagText:"ly7cruxF",counter:"P2FqNJAi",disabled:"NRtGofbf",paidCounter:"CW4UO1n3"}}}]);
|
|
//# sourceMappingURL=7703.e9ed7fef83cef66de0cd.js.map
|