TelegramPWA/dist/5278.5bd1c1a18f0edfccd48c.js
Alexander Zinchuk 20cdfeadb3 [Build]
2025-07-25 19:37:36 +02:00

2 lines
28 KiB
JavaScript

"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[5278],{25404:(e,t,i)=>{i.d(t,{A:()=>g});var n=i(84051),o=i(13439),s=i(31481),r=i(85982),a=i(17663),c=i(80140),d=i(39351),l=i(17712),u=i(59030),m=i(24433),h=i(20021);const g=(0,n.ph)((({peerId:e,canManage:t,gift:i,currentUserEmojiStatus:g,collectibleEmojiStatuses:p})=>{const{showNotification:A,openChatWithDraft:f,openGiftTransferModal:v,openGiftResalePriceComposerModal:C,openGiftStatusInfoModal:I,setEmojiStatus:y,toggleSavedGiftPinned:b,changeGiftVisibility:F,updateStarGiftPrice:P,closeGiftInfoModal:k}=(0,o.ko)(),N=(0,d.A)(),S=(0,u.A)(),Y=i&&"gift"in i,T=Y?i:void 0,w=Y?i.gift:i,G="starGiftUnique"===w?.type?w.slug:void 0,x=(0,n.Kr)((()=>{if(G)return`${s.jsp}nft/${G}`}),[G]),B=(0,n.Kr)((()=>{if(G)return p?.find((e=>"collectible"===e.type&&e.slug===G))}),[G,p]),M="collectible"===g?.type?g.slug:void 0,D=w&&"starGiftUnique"===w.type,U=D&&M===w.slug,R=B&&!U,L=D?w.resellPriceInStars:void 0,V=t&&T&&!T.isUnsaved&&D,E=(0,l.A)((()=>{const{inputGift:e,isUnsaved:t}=T;F({gift:e,shouldUnsave:!t})})),j=(0,l.A)((()=>{x&&((0,r.eM)(x),A({message:N("LinkCopied")}))})),K=(0,l.A)((()=>{x&&f({text:{text:x}})})),O=(0,l.A)((()=>{T&&"starGiftUnique"===T?.gift.type&&(T.canTransferAt&&T.canTransferAt>(0,c.Fm)()?A({message:{key:"NotificationGiftCanTransferAt",variables:{date:(0,a.U)(S,1e3*T.canTransferAt)}}}):v({gift:T}))})),z=(0,l.A)((()=>{T&&(T.canResellAt&&T.canResellAt>(0,c.Fm)()?A({message:{key:"NotificationGiftCanResellAt",variables:{date:(0,a.U)(S,1e3*T.canResellAt)}}}):C({peerId:e,gift:T}))})),J=(0,l.A)((()=>{T&&"starGiftUnique"===T.gift.type&&T.inputGift&&(k(),P({gift:T.inputGift,price:0}),A({icon:"unlist-outline",message:{key:"NotificationGiftIsUnlist",variables:{gift:N("GiftUnique",{title:T.gift.title,number:T.gift.number})}}}))})),q=(0,l.A)((()=>{"starGiftUnique"===w?.type&&B&&I({emojiStatus:B})})),W=(0,l.A)((()=>{U&&y({emojiStatus:{type:"regular",documentId:s.zNY}})})),Q=(0,l.A)((()=>{b({peerId:e,gift:T})}));return(0,h.FD)(h.FK,{children:[V&&(0,h.Y)(m.A,{icon:T.isPinned?"unpin":"pin",onClick:Q,children:N(T.isPinned?"ChatListUnpinFromTop":"ChatListPinToTop")}),(0,h.Y)(m.A,{icon:"link-badge",onClick:j,children:N("CopyLink")}),(0,h.Y)(m.A,{icon:"forward",onClick:K,children:N("Share")}),t&&D&&(0,h.Y)(m.A,{icon:"diamond",onClick:O,children:N("GiftInfoTransfer")}),t&&D&&!L&&(0,h.Y)(m.A,{icon:"sell-outline",onClick:z,children:N("Sell")}),t&&D&&Boolean(L)&&(0,h.Y)(m.A,{icon:"unlist-outline",onClick:J,children:N("GiftInfoUnlist")}),t&&T&&(0,h.Y)(m.A,{icon:T.isUnsaved?"eye-outline":"eye-crossed-outline",onClick:E,children:N(T.isUnsaved?"GiftActionShow":"GiftActionHide")}),R&&(0,h.Y)(m.A,{icon:"crown-wear-outline",onClick:q,children:N("GiftInfoWear")}),U&&(0,h.Y)(m.A,{icon:"crown-take-off-outline",onClick:W,children:N("GiftInfoTakeOff")})]})}))},36143:(e,t,i)=>{i.d(t,{A:()=>we});var n=i(84051),o=i(13439),s=i(23174),r=i(89925),a=i(31481),c=i(90709),d=i(26129),l=i(29807),u=i(96454),m=i(87357),h=i(60343),g=i(41512),p=i(54464),A=i(43874),f=i(10722),v=i(49746),C=i(37661),I=i(5912),y=i(17712),b=i(14622),F=i(21511),P=i(48196),k=i(79519),N=i(96773),S=i(76023),Y=i(21849),T=i(50805),w=i(20021);const G=15*S.$,x=(0,n.ph)((({action:e,onClick:t,observeIntersection:i})=>(0,w.Y)(Y.A,{className:T.A.channelPhoto,photo:e.photo,loopIndefinitely:!0,withVideo:!0,observeIntersection:i,onClick:t,size:G})));var B=i(18501),M=i(39351),D=i(85118),U=i(82855);const R=(0,n.ph)((0,o.EK)(((e,{action:t})=>({sticker:"giftPremium"===t.type?(0,l.t0O)(e,t.months):(0,l.WLj)(e,t.stars),canPlayAnimatedEmojis:(0,l.BWX)(e)})))((({action:e,sticker:t,canPlayAnimatedEmojis:i,onClick:o,observeIntersectionForLoading:s,observeIntersectionForPlaying:r})=>{const a=(0,n.li)(),c=(0,M.A)(),d="giftPremium"===e.type?e.message:void 0;return(0,w.FD)("div",{className:T.A.contentBox,tabIndex:0,role:"button",onClick:o,children:[(0,w.Y)("div",{ref:a,className:T.A.stickerWrapper,style:"width: 150px; height: 150px",children:t&&(0,w.Y)(U.A,{containerRef:a,sticker:t,size:150,observeIntersectionForLoading:s,observeIntersectionForPlaying:r,noLoad:!i})}),(0,w.FD)("div",{className:T.A.info,children:[(0,w.Y)("h3",{className:T.A.title,children:"giftPremium"===e.type?c("ActionGiftPremiumTitle",{months:e.months},{pluralValue:e.months}):c("ActionGiftStarsTitle",{amount:e.stars},{pluralValue:e.stars})}),(0,w.FD)("div",{children:[d&&(0,B.fd)(d),!d&&c("giftPremium"===e.type?"ActionGiftPremiumText":"ActionGiftStarsText")]})]}),(0,w.FD)("div",{className:T.A.actionButton,children:[(0,w.Y)(D.A,{preset:"button"}),c("ActionViewButton")]})]})})));var L=i(70636),V=i(4262);const E=(0,n.ph)((0,o.EK)(((e,{action:t})=>({currentUserId:e.currentUserId,sticker:"giftCode"===t.type?(0,l.t0O)(e,t.months):(0,l.WLj)(e,t.stars),canPlayAnimatedEmojis:(0,l.BWX)(e),channel:t.boostPeerId?(0,l.hds)(e,t.boostPeerId):void 0})))((({currentUserId:e,action:t,sender:i,sticker:o,canPlayAnimatedEmojis:s,channel:r,onClick:a,observeIntersectionForLoading:c,observeIntersectionForPlaying:d})=>{const l=(0,n.li)(),u=(0,M.A)(),m=(0,n.Kr)((()=>{const e=r&&(0,L.F9)(u,r),t=u("ActionFallbackChannel");return(0,V.Nm)(r?.id,e||t)}),[r,u]),h=(0,n.Kr)((()=>{const e=r||i,t=e&&(0,L.F9)(u,e),n=u("ActionFallbackChat");return(0,V.Nm)(e?.id,t||n)}),[r,i,u]);return(0,w.FD)("div",{className:T.A.contentBox,tabIndex:0,role:"button",onClick:a,children:[(0,w.Y)("div",{ref:l,className:T.A.stickerWrapper,style:"width: 150px; height: 150px",children:o&&(0,w.Y)(U.A,{containerRef:l,sticker:o,size:150,observeIntersectionForLoading:c,observeIntersectionForPlaying:d,noLoad:!s})}),(0,w.FD)("div",{children:[(0,w.Y)("h3",{className:T.A.title,children:u("giftCode"!==t.type||t.isViaGiveaway?"ActionGiveawayResultTitle":"GiftInfoTitle")}),(0,w.FD)("div",{children:["giftCode"===t.type&&(t.isViaGiveaway?u("ActionGiveawayResultPremiumText",{channel:m,months:t.months},{withNodes:!0,withMarkdown:!0,pluralValue:t.months,renderTextFilters:["br"]}):(0,V.AD)(u,"ActionGiftCodeSubscriptionText",i?.id===e,{peer:h,months:t.months},{pluralValue:t.months,renderTextFilters:["br"]})),"prizeStars"===t.type&&u("ActionGiveawayResultStarsText",{amount:t.stars,channel:m},{withNodes:!0,withMarkdown:!0,pluralValue:t.stars,renderTextFilters:["br"]})]})]}),(0,w.FD)("div",{className:T.A.actionButton,children:[(0,w.Y)(D.A,{preset:"button"}),u("giftCode"===t.type?"ActionOpenGiftButton":"ActionViewButton")]})]})})));var j=i(48775),K=i(80140),O=i(14242),z=i(66833),J=i(87094),q=i(87049);const W=(0,n.ph)((0,o.EK)(((e,{message:t,action:i})=>{const n=(0,l.mBe)(e,e.currentUserId),o=(0,l.BWX)(e),s=(0,l.Y7C)(e,t),r=i.fromId?(0,l.PVB)(e,i.fromId):void 0,a=t.isOutgoing?(0,l.PVB)(e,t.chatId):n;return{canPlayAnimatedEmojis:o,sender:r||s,recipient:(i.peerId?(0,l.PVB)(e,i.peerId):void 0)||a,starGiftMaxConvertPeriod:e.appConfig?.starGiftMaxConvertPeriod}}))((({action:e,message:t,canPlayAnimatedEmojis:i,sender:o,recipient:s,starGiftMaxConvertPeriod:r,onClick:a,observeIntersectionForLoading:d,observeIntersectionForPlaying:l})=>{const u=(0,n.li)(),h=(0,n.li)(),g=(0,M.A)(),{isOutgoing:p}=t,A=(0,z.yQ)(e.gift),f=p?s:o,v=f&&(0,L.vj)(f)&&(0,c.WX)(f),C=(0,J.A)(u,"background-color",!e.gift.availabilityTotal),I=g("ActionFallbackSomeone"),y=f&&(0,L.F9)(g,f),b=o?.id===s?.id,F=(0,n.Kr)((()=>{const i=(0,V.Nm)(f?.id,y||I),n=void 0!==e.starsToConvert?(0,j.K)(g,e.starsToConvert):void 0;return e.isUpgraded?g("ActionStarGiftUpgraded"):e.alreadyPaidUpgradeStars?(0,V.AD)(g,"ActionStarGiftUpgradeText",!p||b,{peer:i}):e.isConverted?(0,V.AD)(g,"ActionStarGiftConvertedText",!p||b,{peer:i,amount:n}):r&&(0,K.Fm)()<t.date+r?(0,V.AD)(g,"ActionStarGiftConvertText",!p||b,{peer:i,amount:n}):v?g("ActionStarGiftChannelText",{amount:n},{withNodes:!0}):(0,V.AD)(g,"ActionStarGiftNoConvertText",!p||b,{peer:i})}),[e,I,v,p,g,t.date,f?.id,y,r,b]);return(0,w.FD)("div",{ref:u,className:(0,m.A)(T.A.contentBox,T.A.starGift),tabIndex:0,role:"button",onClick:a,children:[(0,w.Y)("div",{ref:h,className:T.A.stickerWrapper,style:"width: 120px; height: 120px",children:A&&(0,w.Y)(U.A,{containerRef:h,sticker:A,size:120,observeIntersectionForLoading:d,observeIntersectionForPlaying:l,noLoad:!i})}),Boolean(e.gift.availabilityTotal)&&(0,w.Y)(q.A,{color:C||"blue",text:g("ActionStarGiftLimitedRibbon",{total:(0,O.Vw)(g,e.gift.availabilityTotal)})}),(0,w.FD)("div",{className:T.A.info,children:[(0,w.Y)("h3",{className:T.A.title,children:b?g("ActionStarGiftSelf"):g(p?"ActionStarGiftTo":"ActionStarGiftFrom",{peer:(0,V.Nm)(f?.id,y||I)},{withNodes:!0})}),(0,w.FD)("div",{className:T.A.subtitle,children:[e.message&&(0,B.fd)(e.message),!e.message&&F]})]}),(0,w.FD)("div",{className:T.A.actionButton,children:[(0,w.Y)(D.A,{preset:"button"}),!e.alreadyPaidUpgradeStars||e.isUpgraded||p?g("ActionViewButton"):g("ActionStarGiftUnpack")]})]})})));var Q=i(95807),$=i(92108),H=i(40558);const X=(0,n.ph)((0,o.EK)(((e,{message:t,action:i})=>{const n=(0,l.mBe)(e,e.currentUserId),o=(0,l.BWX)(e),s=(0,l.Y7C)(e,t),r=i.fromId?(0,l.PVB)(e,i.fromId):void 0,a=t.isOutgoing?(0,l.PVB)(e,t.chatId):n;return{canPlayAnimatedEmojis:o,sender:r||s,recipient:(i.peerId?(0,l.PVB)(e,i.peerId):void 0)||a}}))((({action:e,message:t,canPlayAnimatedEmojis:i,sender:o,recipient:s,onClick:r,observeIntersectionForLoading:a,observeIntersectionForPlaying:c})=>{const d=(0,n.li)(),l=(0,M.A)(),{isOutgoing:u}=t,h=(0,z.yQ)(e.gift),g=(0,z.uc)(e.gift),p=g.model,A=g.pattern,f=g.backdrop,v=[f.centerColor,f.edgeColor],C=`${f.patternColor.slice(0,7)}55`,I=(0,n.Kr)((()=>[[l("ActionStarGiftUniqueModel"),p.name],[l("ActionStarGiftUniqueBackdrop"),f.name],[l("ActionStarGiftUniqueSymbol"),A.name]]),[l,p,A,f]),y=!u||e.isUpgrade,b=y&&!e.isUpgrade?o:s,F=l("ActionFallbackSomeone"),P=b&&(0,L.F9)(l,b),k=o?.id===s?.id;return(0,w.FD)("div",{className:(0,m.A)(T.A.contentBox,T.A.starGift,T.A.uniqueGift),tabIndex:0,role:"button",onClick:r,children:[(0,w.Y)("div",{className:T.A.uniqueBackgroundWrapper,children:(0,w.Y)(H.A,{className:T.A.uniqueBackground,backgroundColors:v,patternColor:f.patternColor,patternIcon:A.sticker,clearBottomSector:!0})}),(0,w.Y)("div",{ref:d,className:T.A.stickerWrapper,style:"width: 120px; height: 120px",children:h&&(0,w.Y)(U.A,{containerRef:d,sticker:h,size:120,observeIntersectionForLoading:a,observeIntersectionForPlaying:c,noLoad:!i})}),(0,w.Y)(q.A,{color:C,text:l("ActionStarGiftUniqueRibbon")}),(0,w.FD)("div",{className:T.A.info,children:[(0,w.Y)("h3",{className:T.A.title,children:k?l("ActionStarGiftSelf"):l(y?"ActionStarGiftFrom":"ActionStarGiftTo",{peer:(0,V.Nm)(b?.id,P||F)},{withNodes:!0})}),(0,w.Y)("div",{className:T.A.subtitle,style:`color: ${f.textColor}`,children:l("GiftUnique",{title:e.gift.title,number:e.gift.number})}),(0,w.Y)($.A,{data:I,style:`color: ${f.textColor}`,valueClassName:T.A.uniqueValue})]}),(0,w.FD)("div",{className:T.A.actionButton,style:(0,Q.A)(C&&`background-color: ${C}`),children:[(0,w.Y)(D.A,{preset:"button"}),l("ActionViewButton")]})]})})));var Z=i(87679),_=i(62587),ee=i(94189),te=i(90751);const ie=(0,n.ph)((0,o.EK)(((e,{message:t})=>({peer:(0,l.PVB)(e,t.chatId)})))((({message:e,action:t,peer:i,observeIntersection:a})=>{const{openMediaViewer:d,uploadProfilePhoto:l,showNotification:u}=(0,o.ko)(),{isOutgoing:m}=e,h=t.photo,g=(0,M.A)(),[p,A]=(0,n.J0)(),[f,v,I]=(0,C.A)(!1),b=(0,_.A)((0,c.rI)(h,"full")),F=(0,_.A)((0,c.Pg)(h)),P=h.isVideo,k=(0,n.Kr)((()=>{const e=i&&(0,L.F9)(g,i)||g("ActionFallbackUser"),t=(0,V.Nm)(i?.id,e);return g(m?"ActionSuggestedPhotoYou":"ActionSuggestedPhoto",{user:t},{withNodes:!0})}),[g,m,i]),N=(0,y.A)((()=>{u({title:g("ActionSuggestedPhotoUpdatedTitle"),message:g("ActionSuggestedPhotoUpdatedDescription"),action:{action:"openSettingsScreen",payload:{screen:r.VS.Main}},actionText:g("Open")})})),S=(0,y.A)((e=>{A(void 0),l({file:e}),N()})),G=(0,y.A)((()=>{A(void 0)})),x=(0,y.A)((async()=>{if(!F)return;I(),N();const e=await(0,Z.sZ)(F);l({file:new File([e],"avatar.mp4"),isVideo:!0,videoTs:h.videoSizes?.find((e=>void 0!==e.videoStartTs))?.videoStartTs})}));return(0,w.FD)("div",{className:T.A.contentBox,tabIndex:0,role:"button",onClick:async()=>{!m&&b?P?v():A(await(0,Z.sZ)(b)):d({chatId:e.chatId,messageId:e.id,threadId:s.l3,origin:r.TQ.SuggestedAvatar})},children:[(0,w.Y)(Y.A,{className:T.A.suggestedAvatar,photo:t.photo,loopIndefinitely:!0,withVideo:!0,observeIntersection:a,size:"jumbo"}),(0,w.Y)("div",{className:T.A.suggestedText,children:k}),(0,w.Y)("div",{className:T.A.actionButton,children:g("ActionSuggestedPhotoButton")}),(0,w.Y)(te.A,{file:p,onClose:G,onChange:S}),(0,w.Y)(ee.A,{isOpen:f,title:g("ActionSuggestedVideoTitle"),confirmHandler:x,onClose:I,text:g("ActionSuggestedVideoText")})]})})));var ne=i(17663),oe=i(4961),se=i(59030);const re=(0,n.ph)((0,o.EK)(((e,{message:t})=>{const i=(0,l.Y7C)(e,t),n=(0,l.k2W)(e,t.chatId),o=(0,d.Q)(t);let s;if("message"===o?.type&&o.replyToMsgId){const i=(0,l.gMr)(e,t);i&&(s=(0,l.Y7C)(e,i))}const{appConfig:r}=e;return{sender:i,chat:n,originalSender:s,ageMinSeconds:r?.starsSuggestedPostAgeMin||a.Qep,isAdmin:!!n&&Boolean((0,l.ODG)(e,t.chatId))}}))((({message:e,action:t,sender:i,chat:n,originalSender:o,ageMinSeconds:s,isAdmin:r,onClick:a})=>{const c=(0,M.A)(),d=(0,se.A)(),{scheduleDate:l,amount:u}=t,h=n&&(0,L.em)(c,n),g=()=>(0,V.Nm)(n?.id,h||c("ActionFallbackChat")),p=o&&(0,L.em)(c,o),A=(0,V.Nm)(o?.id,p||c("ActionFallbackUser")),f=l?(0,ne.e0)(l,c,d):c("TitleAnytime"),v=!!l&&l<=(0,K.Fm)(),C=u?.amount?(0,j.K)(c,u.amount):void 0,I=(0,ne.A$)(c,s,!0);return(0,w.FD)("div",{className:(0,m.A)(T.A.contentBox,T.A.suggestedPostContentBox),onClick:a,children:[(0,w.Y)("div",{className:T.A.suggestedPostApprovalTitle,children:(0,oe.A)(c("SuggestedPostAgreementReached"))}),(0,w.Y)("div",{className:T.A.suggestedPostApprovalSection,children:(0,V.AD)(c,v?"SuggestedPostPublished":"SuggestedPostPublishSchedule",!r,{peer:g(),date:f},{withMarkdown:!0})}),C&&(0,w.Y)("div",{className:T.A.suggestedPostApprovalSection,children:(0,V.AD)(c,"SuggestedPostCharged",!r,{user:A,amount:C},{withMarkdown:!0})}),v&&C&&(0,w.FD)(w.FK,{children:[(0,w.Y)("div",{className:T.A.suggestedPostApprovalSection,children:(0,V.AD)(c,"SuggestedPostReceiveAmount",!r,{peer:g(),duration:I,currency:c("CurrencyStars")},{withMarkdown:!0})}),(0,w.Y)("div",{className:T.A.suggestedPostApprovalSection,children:(0,V.AD)(c,"SuggestedPostRefund",!r,{peer:g(),duration:I,currency:c("CurrencyStars")},{withMarkdown:!0})})]})]})}))),ae=(0,n.ph)((0,o.EK)(((e,{message:t})=>{const i=(0,l.Y7C)(e,t),n="message"===t.replyInfo?.type&&t.replyInfo.replyToMsgId?(0,l.O5q)(e,t.chatId,t.replyInfo.replyToMsgId):void 0;return{sender:i,replyMessageSender:n?(0,l.Y7C)(e,n):void 0}}))((({onClick:e,message:t,sender:i,replyMessageSender:n})=>{const{openStarsBalanceModal:s}=(0,o.ko)(),r=(0,M.A)(),a=(0,y.A)((e=>{e.preventDefault(),e.stopPropagation(),s({})})),c=n||i,d=c&&(0,L.em)(r,c),l=(0,V.Nm)(c?.id,d||r("ActionFallbackUser"));return(0,w.FD)("div",{className:(0,m.A)(T.A.contentBox,T.A.suggestedPostBalanceTooLowBox),onClick:e,children:[(0,w.Y)("div",{className:T.A.suggestedPostBalanceTooLowTitle,children:r("SuggestedPostBalanceTooLow",{peer:l,currency:r("CurrencyStars")},{withNodes:!0,withMarkdown:!0})}),!t.isOutgoing&&(0,w.FD)("div",{className:T.A.actionButton,onClick:a,children:[(0,w.Y)(D.A,{preset:"button"}),r("ButtonBuyStars")]})]})})));var ce=i(18276);const de=(0,n.ph)((0,o.EK)(((e,{message:t})=>({sender:(0,l.Y7C)(e,t)})))((({message:e,action:t,sender:i,onClick:n})=>{const o=(0,M.A)(),{isOutgoing:s}=e,{rejectComment:r}=t,a=i&&(0,L.F9)(o,i),c=(0,V.Nm)(i?.id,a||o("ActionFallbackUser"));return(0,w.FD)("div",{className:(0,m.A)(T.A.contentBox,T.A.suggestedPostRejectedContentBox),onClick:n,children:[(0,w.FD)("div",{className:T.A.suggestedPostRejectedTitle,children:[(0,w.Y)(ce.A,{className:T.A.rejectedIcon,name:"close"}),(0,V.AD)(o,r?"SuggestedPostRejectedWithReason":"SuggestedPostRejected",s,{peer:c},{withMarkdown:!0})]}),r&&(0,w.Y)("div",{className:T.A.suggestedPostRejectedComment,children:o("SuggestedPostRejectedComment",{comment:r})})]})})));var le=i(99515),ue=i(43581),me=i(14737),he=i(48894);var ge=i(36838),pe=i(64493),Ae=i(55158);const fe="d8axZxyN",ve="glDpC2av",Ce="gqCs9fSo",Ie="gnYhwnvf",ye="HWgwnKui",be="BTNQ4KBH",Fe="Xl9MVMTn",Pe="Qizai7yv";function ke({channel:e}){const{openChat:t}=(0,o.ko)(),i=function(e,t="#00000000"){const[i,o]=(0,n.J0)(t),r=(0,_.A)((0,c.cP)(e),!1,s.qZ.BlobUrl);return(0,n.vJ)((()=>{(async()=>{if(!r)return;const e=await(0,he.rX)(r);o(`#${(0,he.v2)(e)}`)})()}),[r]),i}(e,"#3C3C4399"),r=(0,M.A)();return(0,w.FD)("div",{className:ve,onClick:()=>t({id:e.id}),children:[(0,w.Y)(Y.A,{className:Ce,size:"large",peer:e},e.id),(0,w.FD)("div",{style:`background: ${i}`,className:Ie,children:[(0,w.Y)(ce.A,{name:"user-filled",className:fe}),(0,w.Y)("span",{className:ye,children:(0,O.Vw)(r,e?.membersCount||0)})]}),(0,w.Y)("span",{className:be,children:e.title})]})}function Ne({channel:e,chatId:t,channelsCount:i,isCurrentUserPremium:n}){const{openPremiumModal:s,openChatWithInfo:r}=(0,o.ko)(),a=(0,se.A)();return(0,w.FD)("div",{className:(0,m.A)(ve,"MBChXyXk"),onClick:()=>{n?r({id:t,shouldReplaceHistory:!0,profileTab:"similarChannels",forceScrollProfileTab:!0}):s()},children:[(0,w.Y)(Y.A,{className:Ce,size:"large",peer:e},e.id),(0,w.Y)("div",{className:Fe,children:(0,w.Y)("div",{className:Pe})}),(0,w.Y)("div",{className:(0,m.A)(Fe,"JxSmtOFi"),children:(0,w.Y)("div",{className:Pe})}),(0,w.FD)("div",{className:Ie,children:[(0,w.Y)("span",{className:ye,children:`+${i}`}),!n&&(0,w.Y)(ce.A,{name:"lock-badge",className:fe})]}),(0,w.Y)("span",{className:be,children:a("MoreSimilar")})]})}const Se=(0,n.ph)((0,o.EK)(((e,{chatId:t})=>{const{similarChannelIds:i,isExpanded:n,count:o}=(0,l.dg4)(e,t)||{},s=(0,l.g29)(e),r=(0,l.AWZ)(e,t);return{similarChannelIds:i,isExpanded:n,count:o,isCurrentUserPremium:s,channelJoinInfo:r?.joinInfo}}))((({chatId:e,similarChannelIds:t,isExpanded:i,count:s,isCurrentUserPremium:r,channelJoinInfo:a})=>{const{toggleChannelRecommendations:c,loadChannelRecommendations:d}=(0,o.ko)(),u=(0,se.A)(),[h,g,p]=(0,C.A)(!1),[A,f,v]=(0,C.A)(!1),I=(0,n.li)(),b=(0,n.li)(!1),F=(0,n.Kr)((()=>{if(!t)return;const e=(0,o.mS)();return t.map((t=>(0,l.hds)(e,t))).filter(Boolean)}),[t]),[P,k]=(0,n.J0)(!1),N=(0,n.Kr)((()=>F?.slice(0,10)),[F]),S=Boolean(N?.length),Y=Boolean(!P&&(i||A||h)&&S);(0,ge.A)(I,!Y,!0),(0,n.vJ)((()=>{t||d({chatId:e})}),[e,t]),(0,me.A)((()=>k(!1)),2e3),(0,n.vJ)((()=>{if(P&&F&&i){const e=setTimeout((()=>{k(!1)}),300);return()=>clearTimeout(e)}}),[F,i,P]),(0,n.vJ)((()=>{i?(g(),v(),k(!t),b.current||setTimeout((()=>{I.current?.scrollIntoView({behavior:"smooth"})}),150)):(p(),f())}),[i,t]);const T=(0,y.A)((()=>{c({chatId:e})}));if((0,n.vJ)((()=>{a?.joinedDate&&!i&&(0,K.Fm)()-a.joinedDate<=10&&(T(),b.current=!0)}),[a,i]),Y||P)return(0,w.FD)("div",{className:(0,m.A)("V3RHiOJR"),children:[P&&(0,w.Y)(Ae.A,{className:"xKVZv7KE"}),Y&&(0,w.FD)("div",{className:(0,m.A)(h&&"eb8rX09E",A&&"XR6_qLCc"),children:[(0,w.Y)("div",{className:"tfG_BSDt",children:(0,w.Y)("svg",{width:"19",height:"7",viewBox:"0 0 19 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,w.Y)("path",{className:"HVbeGv4t","fill-rule":"evenodd","clip-rule":"evenodd",d:"M19 7C16.8992 7 13.59 3.88897 11.5003 1.67424C10.7648 0.894688 10.397 0.50491 10.0434 0.385149C9.70568 0.270811 9.4225 0.270474 9.08456 0.38401C8.73059 0.50293 8.36133 0.892443 7.62279 1.67147C5.52303 3.88637 2.18302 7 0 7L19 7Z",fill:"white"})})}),(0,w.FD)("div",{className:"njAC8dR9",children:[(0,w.FD)("div",{className:"s7QOi22Q",children:[(0,w.Y)("span",{className:"JstcOhAN",children:u("SimilarChannels")}),(0,w.Y)(pe.A,{className:"meewH7t_",color:"translucent",onClick:T,children:(0,w.Y)(ce.A,{name:"close"})})]}),(0,w.Y)("div",{ref:I,className:(0,m.A)("h4gWlNen","no-scrollbar"),children:N?.map(((t,i)=>9===i?(0,w.Y)(Ne,{channel:t,chatId:e,channelsCount:s-10+1,isCurrentUserPremium:r}):(0,w.Y)(ke,{channel:t})))})]})]})]})}))),Ye=new Set(["pinMessage","chatEditPhoto","chatDeletePhoto","todoCompletions","todoAppendTasks","unsupported"]),Te=new Set(["giftCode","prizeStars","suggestProfilePhoto","suggestedPostApproval"]),we=(0,n.ph)((0,o.EK)(((e,{message:t,threadId:i})=>{const n=(0,l.nTw)(e),{themes:o}=e.settings,r=(0,l.hds)(e,t.chatId),a=(0,l.Y7C)(e,t),c=r?.isForum&&i!==s.l3,{replyToMsgId:u,replyToPeerId:m}=(0,d.Q)(t)||{},h=u?(0,l.O5q)(e,m||t.chatId,u):void 0,g=!!i&&(0,l.nJv)(e,t,i),{direction:p,noHighlight:A,isResizingContainer:f,scrollTargetPosition:v}=g&&n.focusedMessage||{},C=(0,l.g29)(e),I=r?.unreadReactions?.includes(t.id),y=(0,l.trm)(e);return{sender:a,currentUserId:e.currentUserId,isCurrentUserPremium:C,isFocused:g,focusDirection:p,noFocusHighlight:A,isInsideTopic:c,replyMessage:h,isInSelectMode:(0,l.rTV)(e),patternColor:o[(0,l.SJA)(e)]?.patternColor,hasUnreadReaction:I,isResizingContainer:f,scrollTargetPosition:v,isAccountFrozen:y}}))((({message:e,threadId:t,sender:i,currentUserId:s,appearanceOrder:l,isJustAdded:S,isLastInList:Y,memoFirstUnreadIdRef:G,getIsMessageListReady:B,isInsideTopic:M,isFocused:D,focusDirection:U,noFocusHighlight:L,replyMessage:V,patternColor:j,isCurrentUserPremium:K,isInSelectMode:O,hasUnreadReaction:z,isResizingContainer:J,scrollTargetPosition:q,onIntersectPinnedMessage:Q,observeIntersectionForBottom:$,observeIntersectionForLoading:H,observeIntersectionForPlaying:Z,isAccountFrozen:_})=>{const{requestConfetti:ee,openMediaViewer:te,getReceipt:ne,checkGiftCode:oe,openPrizeStarsTransactionFromGiveaway:se,openPremiumModal:ce,openStarsTransactionFromGift:me,openGiftInfoModalFromMessage:he,toggleChannelRecommendations:ge,animateUnreadReaction:pe,markMentionsRead:Ae,focusMessage:fe}=(0,o.ko)(),ve=(0,n.li)(),{id:Ce,chatId:Ie}=e,ye=e.content.action,be=(0,h.iL)(Ce),Fe=Te.has(ye.type),Pe=Ye.has(ye.type),ke=u.uH&&!Pe,Ne="suggestedPostSuccess"===ye.type,we=(0,d.Q)(e),{replyToMsgId:Ge,replyToPeerId:xe}=we||{},Be=Boolean(e.areReactionsPossible&&e?.reactions?.results?.length),Me=M&&"topicCreate"===ye.type,{isTouchScreen:De}=(0,A.Ay)();(0,I.mv)(ve,Me?void 0:$),(0,b.A)(ve,!Me&&Y&&"channelJoined"!==ye.type),(0,v.A)(xe||Ie,Ge,V,Ce),(0,k.A)({elementRef:ve,chatId:Ie,isFocused:D,focusDirection:U,noFocusHighlight:L,isResizingContainer:J,isJustAdded:S,scrollTargetPosition:q}),(0,n._W)((()=>{e.isPinned&&Q?.({viewportPinnedIdsToRemove:[e.id]})}));const{isContextMenuOpen:Ue,contextMenuAnchor:Re,handleBeforeContextMenu:Le,handleContextMenu:Ve,handleContextMenuClose:Ee,handleContextMenuHide:je}=(0,f.A)(ve,De&&O||_,!u.cp,u.Ni,B),Ke=void 0!==Re,Oe=l<=0,[ze,Je]=(0,C.A)(Oe);(0,n.vJ)((()=>{Oe||setTimeout(Je,l*a.zq7)}),[l,Je,Oe]);const{ref:qe}=(0,F.A)({isOpen:ze,noOpenTransition:Oe,noCloseTransition:!0,className:!1,ref:ve});(0,n.vJ)((()=>{const t=ve.current;t&&(0,g.Y)(t)&&(z&&pe({messageIds:[Ce]}),e.hasUnreadMention&&Ae({chatId:Ie,messageIds:[Ce]}))}),[z,Ie,Ce,pe,e.hasUnreadMention]),(0,n.vJ)((()=>{"giftPremium"===ye.type&&(G?.current&&Ce>=G.current||be)&&ee({})}),[ye.type,Ce,be,G]);const We=(0,P.A)(ke?j:void 0),Qe=(0,y.A)((()=>{switch(ye.type){case"paymentSent":case"paymentRefunded":ne({chatId:e.chatId,messageId:e.id});break;case"chatEditPhoto":te({chatId:e.chatId,messageId:e.id,threadId:t,origin:r.TQ.ChannelAvatar});break;case"giftCode":oe({slug:ye.slug,message:{chatId:e.chatId,messageId:e.id}});break;case"prizeStars":se({chatId:e.chatId,messageId:e.id});break;case"giftPremium":ce({isGift:!0,fromUserId:i?.id,toUserId:i&&i.id===s?Ie:s,monthsAmount:ye.months});break;case"giftStars":me({chatId:e.chatId,messageId:e.id});break;case"starGift":case"starGiftUnique":he({chatId:e.chatId,messageId:e.id});break;case"channelJoined":ge({chatId:Ie});break;case"suggestedPostApproval":{const i=(0,d.Q)(e);"message"===i?.type&&i.replyToMsgId&&fe({chatId:e.chatId,threadId:t,messageId:i.replyToMsgId});break}case"suggestedPostSuccess":{const i=(0,d.Q)(e);"message"===i?.type&&i.replyToMsgId&&fe({chatId:e.chatId,threadId:t,messageId:i.replyToMsgId});break}}})),$e=(0,n.Kr)((()=>{switch(ye.type){case"chatEditPhoto":if(!ye.photo)return;return(0,w.Y)(x,{action:ye,observeIntersection:H,onClick:Qe});case"suggestProfilePhoto":return(0,w.Y)(ie,{message:e,action:ye,observeIntersection:H});case"prizeStars":case"giftCode":return(0,w.Y)(E,{action:ye,sender:i,observeIntersectionForLoading:H,observeIntersectionForPlaying:Z,onClick:Qe});case"giftPremium":case"giftStars":return(0,w.Y)(R,{action:ye,observeIntersectionForLoading:H,observeIntersectionForPlaying:Z,onClick:Qe});case"starGift":return(0,w.Y)(W,{action:ye,message:e,observeIntersectionForLoading:H,observeIntersectionForPlaying:Z,onClick:Qe});case"starGiftUnique":return(0,w.Y)(X,{action:ye,message:e,observeIntersectionForLoading:H,observeIntersectionForPlaying:Z,onClick:Qe});case"channelJoined":return(0,w.Y)(Se,{chatId:e.chatId});case"suggestedPostApproval":return ye.isBalanceTooLow?(0,w.Y)(ae,{message:e,action:ye,onClick:Qe}):ye.isRejected?(0,w.Y)(de,{message:e,action:ye,onClick:Qe}):(0,w.Y)(re,{message:e,action:ye,onClick:Qe});default:return}}),[ye,e,H,i,Z]);if(!(M&&"topicCreate"===ye.type||"phoneCall"===ye.type))return(0,w.FD)("div",{ref:qe,id:(0,c.GZ)(Ce),className:(0,m.A)("ActionMessage","message-list-item",T.A.root,Pe&&T.A.singleLine,ke&&T.A.fluidMultiline,$e&&T.A.hasFullContent,D&&!L&&"focused",Ke&&"has-menu-open",Y&&"last-in-list"),"data-message-id":e.id,"data-is-pinned":e.isPinned||void 0,"data-has-unread-mention":e.hasUnreadMention||void 0,"data-has-unread-reaction":z||void 0,onMouseDown:e=>{(0,p.l)(e),Le(e)},onContextMenu:Ve,children:[!Fe&&(0,w.FD)(w.FK,{children:[ke&&(0,w.Y)("div",{className:(0,m.A)(T.A.inlineWrapper,Ne&&T.A.hoverable),children:(0,w.Y)("span",{className:T.A.fluidBackground,style:We,children:(0,w.Y)(N.A,{message:e,isInsideTopic:M})})}),(0,w.Y)("div",{className:(0,m.A)(T.A.inlineWrapper,Ne&&T.A.hoverable),children:(0,w.Y)("span",{className:T.A.textContent,onClick:Qe,children:(0,w.Y)(N.A,{message:e,isInsideTopic:M})})})]}),$e,Re&&(0,w.Y)(le.A,{isOpen:Ue,anchor:Re,message:e,messageListType:"thread",className:T.A.contextContainer,onClose:Ee,onCloseAnimationEnd:je}),Be&&(0,w.Y)(ue.A,{isOutside:!0,message:e,threadId:t,observeIntersection:Z,isCurrentUserPremium:K,isAccountFrozen:_})]})})))},48196:(e,t,i)=>{i.d(t,{A:()=>d});var n=i(84051),o=i(31481),s=i(28470),r=i(20021);const a=new Map;class c{referenceCount=0;constructor(e){this.color=e,this.filterId=`fluid-background-filter-${e.slice(1)}`,(0,s.z)((0,r.FD)("filter",{"color-interpolation-filters":"sRGB",xmlns:o.jNX,children:[(0,r.Y)("feGaussianBlur",{in:"SourceAlpha",stdDeviation:"4",result:"blur"}),(0,r.Y)("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 30 -15",result:"goo"}),(0,r.Y)("feComposite",{in:"SourceAlpha",in2:"goo",operator:"over",result:"outline"}),(0,r.Y)("feFlood",{"flood-color":e,result:"color"}),(0,r.Y)("feComposite",{in:"color",in2:"outline",operator:"in"})]}),this.filterId)}getFilterId(){return this.referenceCount+=1,this.filterId}removeReference(){this.referenceCount-=1,0===this.referenceCount&&(0,s.e)(this.filterId)}isUsed(){return this.referenceCount>0}}function d(e,t){if((0,n.vJ)((()=>{if(e)return()=>{const t=a.get(e);t&&(t.removeReference(),t.isUsed()||a.delete(t.color))}}),[e]),!e)return;if(a.has(e))return l(a.get(e).getFilterId(),t);const i=new c(e);return a.set(e,i),l(i.getFilterId(),t)}function l(e,t){return t?`url(#${e})`:`filter: url(#${e});`}},87049:(e,t,i)=>{i.d(t,{A:()=>m});var n=i(84051),o=i(13439),s=i(29807),r=i(87357),a=i(14745);const c={root:"AmQSvxpZ",text:"pQW7dcwr"};var d=i(20021);const l={red:[["#FF5B54","#ED1C26"],["#653633","#532224"]],blue:[["#6ED2FF","#34A4FC"],["#344F5A","#152E42"]],purple:[["#E367D7","#757BF6"],["#E367D7","#757BF6"]],green:[["#52D553","#4BB121"],["#52D553","#4BB121"]]},u=new Set(Object.keys(l)),m=(0,n.ph)((0,o.EK)((e=>({theme:(0,s.SJA)(e)})))((({text:e,color:t,className:i,theme:n})=>{const o=`svg-${(0,a.A)()}`,s=u.has(t)?t:void 0,m="dark"===n,h=Array.isArray(t)?t:s?l[s][m?1:0]:void 0,g=h?h[0]:t,p=h?h[1]:t;return(0,d.FD)("div",{className:(0,r.A)(c.root,i),children:[(0,d.FD)("svg",{className:c.ribbon,width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",children:[(0,d.Y)("path",{d:"M52.4851 26.4853L29.5145 3.51472C27.2641 1.26428 24.2119 0 21.0293 0H2.82824C1.04643 0 0.154103 2.15429 1.41403 3.41422L52.5856 54.5858C53.8455 55.8457 55.9998 54.9534 55.9998 53.1716V34.9706C55.9998 31.788 54.7355 28.7357 52.4851 26.4853Z",fill:`url(#${o})`}),(0,d.Y)("defs",{children:(0,d.FD)("linearGradient",{id:o,x1:"27.9998",y1:"1",x2:"27.9998",y2:"55",gradientUnits:"userSpaceOnUse",children:[(0,d.Y)("stop",{"stop-color":g}),(0,d.Y)("stop",{offset:"1","stop-color":p})]})})]}),(0,d.Y)("div",{className:c.text,children:e})]})})))},92108:(e,t,i)=>{i.d(t,{A:()=>r});var n=i(84051),o=i(87357);var s=i(20021);const r=(0,n.ph)((({data:e,style:t,className:i,valueClassName:n,keyClassName:r})=>(0,s.Y)("div",{className:(0,o.A)("cKr8J5k_",i),style:t,children:e.map((([e,t])=>(0,s.FD)(s.FK,{children:[(0,s.Y)("div",{className:(0,o.A)("c9RLLvfs",r),children:e}),(0,s.Y)("div",{className:(0,o.A)("QEuGpzIc",n),children:t})]})))})))}}]);
//# sourceMappingURL=5278.5bd1c1a18f0edfccd48c.js.map