mirror of
https://github.com/danog/telegram-tt.git
synced 2024-12-15 10:47:04 +01:00
2 lines
13 KiB
JavaScript
2 lines
13 KiB
JavaScript
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[830],{7799:(e,t,n)=>{n.d(t,{Z:()=>u});var o=n(4050),r=n(9118),c=n(6752),s=n(8674),a=n(5332);let l,i;async function d(){return l||(l=n.e(941).then(n.bind(n,7941)),i=(await l).default),l}setTimeout(d,5e3);const u=(0,o.X$)((({className:e,id:t,animationData:n,play:l,playSegment:u,speed:m,noLoop:p,size:f,quality:g,isLowPriority:h,color:v,forceOnHeavyAnimation:w,onLoad:Z,onEnded:b})=>{const[y,C]=(0,o.eJ)(),E=(0,o.sO)(null),k=(0,o.sO)(!1),T=(0,o.sO)(!1),x=(0,o.sO)(!0),P=(0,o.sO)();P.current=l;const A=(0,o.sO)();A.current=u,(0,o.d4)((()=>{if(y||!n)return;const e=()=>{if(!E.current)return;const e=new i(t,E.current,n,{noLoop:p,size:f,quality:g,isLowPriority:h},Z,v,b);m&&e.setSpeed(m),C(e)};i?e():d().then((()=>{(0,r.T2)((()=>{E.current&&e()}))}))}),[v,y,n,t,h,p,Z,g,f,m,b]),(0,o.d4)((()=>{y&&y.setColor(v)}),[v,y]),(0,o.d4)((()=>()=>{y&&y.destroy()}),[y]);const I=(0,o.I4)(((e=!1)=>{y&&(P.current||A.current)&&(A.current?y.playSegment(A.current):e?y.goToAndPlay(0):y.play())}),[y]),N=(0,o.I4)((()=>{y&&y.pause()}),[y]),S=(0,o.I4)((()=>{T.current=!0,y&&(k.current||(k.current=y.isPlaying()),N())}),[y,N]),L=(0,o.I4)((()=>{k.current&&I(),k.current=!1,T.current=!1}),[I]),O=(0,o.I4)((()=>{(0,r.T2)(L)}),[L]);(0,o.d4)((()=>{y&&(l||u?T.current?k.current=!0:I(p):T.current?k.current=!1:N())}),[y,l,u,p,I,N]),(0,o.d4)((()=>{y&&(x.current?x.current=!1:n&&(y.changeData(n),I()))}),[I,y,n]),(0,s.ZP)(S,L,w),(0,a.Z)(S,O);const B=(0,c.Z)("AnimatedSticker",e),F=f?`width: ${f}px; height: ${f}px;`:void 0;return o.ZP.createElement("div",{ref:E,className:B,style:F})}))},172:(e,t,n)=>{n.d(t,{Z:()=>p});var o=n(4050),r=n(6137),c=n(3716),s=n(2858),a=n(2155),l=n(6752),i=n(2340),d=n(6202),u=n(1212),m=n(9107);const p=(0,o.X$)((({className:e,size:t="large",chat:n,user:p,photo:f,userStatus:g,text:h,isSavedMessages:v,lastSyncTime:w,onClick:Z})=>{const b=p&&(0,s.NB)(p),y=p&&(0,s.pK)(p.id);let C;v||b||(p?C=(0,s.RT)(p):n?C=(0,s.RT)(n):f&&(C=`photo${f.id}?size=m`));const E=(0,d.Z)(C,!1,r.IU.BlobUrl,w),k=Boolean(E),{transitionClassNames:T}=(0,u.Z)(k,void 0,k,"slow"),x=(0,m.Z)();let P="";if(v)P=o.ZP.createElement("i",{className:"icon-avatar-saved-messages"});else if(b)P=o.ZP.createElement("i",{className:"icon-avatar-deleted-account"});else if(y)P=o.ZP.createElement("i",{className:"icon-reply-filled"});else if(E)P=o.ZP.createElement("img",{src:E,className:(0,l.Z)("avatar-media",T),alt:"",decoding:"async"});else if(p){const e=(0,s.Js)(p);P=e?(0,a.Xv)(e,2):void 0}else if(n){const e=(0,s.U)(x,n);P=e&&(0,a.Xv)(e,(0,s.YC)(n.id)?2:1)}else h&&(P=(0,a.Xv)(h,2));const A=!v&&p&&g&&(0,s.kM)(p,g),I=(0,l.Z)(`Avatar size-${t}`,e,`color-bg-${(0,s.Rs)(p||n)}`,v&&"saved-messages",b&&"deleted-account",y&&"replies-bot-account",A&&"online",Z&&"interactive",!v&&!E&&"no-photo"),N=Boolean(v||E),S=(0,o.I4)((e=>{Z&&Z(e,N)}),[Z,N]),L=(p||n)&&(p||n).id;return o.ZP.createElement("div",{className:I,onClick:S,"data-test-sender-id":c.Cg?L:void 0},"string"==typeof P?(0,i.Z)(P,["jumbo"===t?"hq_emoji":"emoji"]):P)}))},7324:(e,t,n)=>{n.d(t,{x:()=>c,Z:()=>s});var o=n(6137),r=n(647);const c={MonkeyIdle:n(8760),MonkeyTracking:n(2750),MonkeyClose:n(6257),MonkeyPeek:n(7785),FoldersAll:n(9356),FoldersNew:n(5485),DiscussionGroups:n(6978),CameraFlip:n(5665),HandFilled:n(2456),HandOutline:n(5667),Speaker:n(8763),VoiceAllowTalk:n(401),VoiceMini:n(5106),VoiceMuted:n(487),VoiceOutlined:n(5740),Peach:n(3677),Eggplant:n(5435),Cumshot:n(1879)};function s(e){const t=c[e].replace(window.location.origin,"");return r.he(`file${t}`,o.IU.Lottie)}},7551:(e,t,n)=>{n.d(t,{Z:()=>a});var o=n(4050),r=n(9107),c=n(3103),s=n(231);const a=(0,o.X$)((({isOpen:e,onClose:t,onCloseAnimationEnd:n,title:a,header:l,text:i,textParts:d,confirmLabel:u="Confirm",confirmHandler:m,confirmIsDestructive:p,isButtonsInOneRow:f,children:g})=>{const h=(0,r.Z)();return o.ZP.createElement(c.Z,{className:"confirm",title:a,header:l,isOpen:e,onClose:t,onCloseAnimationEnd:n,onEnter:m},i&&i.split("\\n").map((e=>o.ZP.createElement("p",null,e))),d||g,o.ZP.createElement("div",{className:f?"dialog-buttons mt-2":""},o.ZP.createElement(s.Z,{className:"confirm-dialog-button",isText:!0,onClick:m,color:p?"danger":"primary"},u),o.ZP.createElement(s.Z,{className:"confirm-dialog-button",isText:!0,onClick:t},h("Cancel"))))}))},1273:(e,t,n)=>{n.d(t,{Z:()=>a});var o=n(1713),r=n(4050),c=n(9118),s=n(7675);const a=({ref:e,className:t,onLoadMore:n,onScroll:a,onKeyDown:l,items:i,itemSelector:d=".ListItem",preloadBackwards:u=20,sensitiveArea:m=800,noScrollRestore:p=!1,noScrollRestoreOnTop:f=!1,noFastList:g,cacheBuster:h,children:v})=>{let w=(0,r.sO)(null);e&&(w=e);const Z=(0,r.sO)({}),[b,y]=(0,r.Ye)((()=>n?[(0,c.Ds)(((e=!1)=>{n({direction:o.Uq.Backwards,noScroll:e})}),1e3,!0,!1),(0,c.Ds)((()=>{n({direction:o.Uq.Forwards})}),1e3,!0,!1)]:[]),[n,i]);(0,r.d4)((()=>{if(!b)return;if(u>0&&(!i||i.length<u))return void b(!0);const{scrollHeight:e,clientHeight:t}=w.current;t&&e<=t&&b()}),[i,b,u]),(0,r.bt)((()=>{const e=w.current,t=Z.current;let n;if(t.listItemElements=e.querySelectorAll(d),t.currentAnchor&&Array.from(t.listItemElements).includes(t.currentAnchor)){const{scrollTop:o}=e;n=o+(t.currentAnchor.getBoundingClientRect().top-t.currentAnchorTop)}else{const e=t.listItemElements[0];e&&(t.currentAnchor=e,t.currentAnchorTop=e.getBoundingClientRect().top)}p||f&&0===e.scrollTop||((0,s.Z)(e,n),t.isScrollTopJustUpdated=!0)}),[i,d,p,f,h]);const C=(0,r.I4)((e=>{if(y&&b){const{isScrollTopJustUpdated:e,currentAnchor:t,currentAnchorTop:n}=Z.current,o=Z.current.listItemElements;if(e)return void(Z.current.isScrollTopJustUpdated=!1);const r=o.length,c=w.current,{scrollTop:s,scrollHeight:a,offsetHeight:l}=c,i=s<=(r?o[0].offsetTop:0)+m,d=(r?o[r-1].offsetTop+o[r-1].offsetHeight:a)-(s+l)<=m;let u=!1;if(i){const e=o[0];if(e){const o=e.getBoundingClientRect().top,r=null!=t&&t.offsetParent&&t!==e?t.getBoundingClientRect().top:o;t&&void 0!==n&&r>n&&(Z.current.currentAnchor=e,Z.current.currentAnchorTop=o,u=!0,y())}}if(d){const e=o[r-1];if(e){const o=e.getBoundingClientRect().top,r=null!=t&&t.offsetParent&&t!==e?t.getBoundingClientRect().top:o;t&&void 0!==n&&r<n&&(Z.current.currentAnchor=e,Z.current.currentAnchorTop=o,u=!0,b())}}if(!u)if(null!=t&&t.offsetParent)Z.current.currentAnchorTop=t.getBoundingClientRect().top;else{const e=o[0];e&&(Z.current.currentAnchor=e,Z.current.currentAnchorTop=e.getBoundingClientRect().top)}}a&&a(e)}),[b,y,a,m]);return r.ZP.createElement("div",{ref:w,className:t,onScroll:C,teactFastList:!g,onKeyDown:l},v)}},3103:(e,t,n)=>{n.d(t,{Z:()=>p});var o=n(4050),r=n(517),c=n(6752),s=n(8674),a=n(1212),l=n(274),i=n(9107),d=n(6590),u=n(231),m=n(2898);const p=({dialogRef:e,title:t,className:n,isOpen:p,header:f,hasCloseButton:g,noBackdrop:h,children:v,onClose:w,onCloseAnimationEnd:Z,onEnter:b,shouldSkipHistoryAnimations:y})=>{const{shouldRender:C,transitionClassNames:E}=(0,a.Z)(p,Z,y,void 0,y),k=(0,o.sO)(null);(0,o.d4)((()=>p?(0,r.Z)({onEsc:w,onEnter:b}):void 0),[p,w,b]),(0,o.d4)((()=>p&&k.current?function(e){function t(t){if("Tab"!==t.key)return;t.preventDefault(),t.stopPropagation();const n=Array.from(e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));if(!n.length)return;const o=n.findIndex((e=>e.isSameNode(document.activeElement)));let r=0;o>=0&&(r=t.shiftKey?o>0?o-1:n.length-1:o<n.length-1?o+1:0),n[r].focus()}return document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}}(k.current):void 0),[p]);const{forceClose:T}=(0,d.ZP)(p,w);(0,o.d4)((()=>()=>{p&&T()}),[]),(0,l.Z)((([e])=>(document.body.classList.toggle("has-open-dialog",p),(p||!p&&void 0!==e)&&(0,s.YW)(200),()=>{document.body.classList.remove("has-open-dialog")})),[p]);const x=(0,i.Z)();if(!C)return;const P=(0,c.Z)("Modal",n,E,h&&"transparent-backdrop");return o.ZP.createElement(m.Z,null,o.ZP.createElement("div",{ref:k,className:P,tabIndex:-1,role:"dialog"},o.ZP.createElement("div",{className:"modal-container"},o.ZP.createElement("div",{className:"modal-backdrop",onClick:w}),o.ZP.createElement("div",{className:"modal-dialog",ref:e},f||(t?o.ZP.createElement("div",{className:"modal-header"},g&&o.ZP.createElement(u.Z,{round:!0,color:"translucent",size:"smaller",ariaLabel:x("Close"),onClick:w},o.ZP.createElement("i",{className:"icon-close"})),o.ZP.createElement("div",{className:"modal-title"},t)):void 0),o.ZP.createElement("div",{className:"modal-content custom-scroll"},v)))))}},2898:(e,t,n)=>{n.d(t,{Z:()=>c});var o=n(4050),r=n(2916);const c=({containerId:e,className:t,children:n})=>{const c=(0,o.sO)();return c.current||(c.current=document.createElement("div")),(0,o.bt)((()=>{const n=document.querySelector(e||"#portals");if(!n)return;const o=c.current;return t&&o.classList.add(t),n.appendChild(o),()=>{r.Z.render(void 0,o),n.removeChild(o)}}),[t,e]),r.Z.render(n,c.current)}},5332:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(4050);function r(e,t){(0,o.d4)((()=>(e&&!document.hasFocus()&&e(),e&&window.addEventListener("blur",e),t&&window.addEventListener("focus",t),()=>{t&&window.removeEventListener("focus",t),e&&window.removeEventListener("blur",e)})),[e,t])}},8360:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(7204);function r(e,t=!1,n=!1){const r=(0,o.Z)(e,t);return n||null!=e?e:r}},7407:(e,t,n)=>{n.d(t,{Z:()=>l});var o=n(4050),r=n(1713),c=n(782),s=n(5326),a=n(7204);const l=(e,t,n=!1,l=30,d=!1)=>{const u=(0,o.sO)(),m=(0,o.sO)((()=>{if(!t||u.current)return;const{newViewportIds:e}=i(t,r.Uq.Forwards,l,t[0]);return e})()),p=(0,s.Z)(),f=(0,a.Z)(t),g=(0,a.Z)(n);if(t&&!n&&(t!==f||n!==g)){const{offsetId:e=t[0],direction:n=r.Uq.Forwards}=u.current||{},{newViewportIds:o}=i(t,n,l,e);m.current&&(0,c.et)(m.current,o)||(m.current=o)}(0,o.d4)((()=>{if(t&&!n&&e&&d){const t=m.current;e({offsetId:t[t.length-1]})}}),[t,n,e,d]);const h=(0,o.I4)((({direction:n,noScroll:o})=>{const s=m.current,a=s?n===r.Uq.Backwards?s[s.length-1]:s[0]:void 0;if(!t)return void(e&&e({offsetId:a}));o||(u.current={...u.current,direction:n,offsetId:a});const{newViewportIds:d,areSomeLocal:f,areAllLocal:g}=i(t,n,l,a);!f||s&&(0,c.et)(s,d)||(m.current=d,p()),!g&&e&&e({offsetId:a})}),[t,l,e,p]);return n?[t]:[m.current,h]};function i(e,t,n,o){const{length:c}=e,s=o?e.indexOf(o):0,a=t===r.Uq.Forwards?s:s+1||c,l=Math.max(0,a-n),i=a+n-1,d=e.slice(Math.max(0,l),i+1);let u,m;switch(t){case r.Uq.Forwards:u=a>0,m=l>=0;break;case r.Uq.Backwards:u=a<c,m=i<=c-1}return{newViewportIds:d,areSomeLocal:u,areAllLocal:m}}},6202:(e,t,n)=>{n.d(t,{Z:()=>a});var o=n(4050),r=n(6137),c=n(647),s=n(5326);const a=(e,t=!1,n=r.IU.BlobUrl,a,l)=>{const i=e?c.UV(e):void 0,d=(0,s.Z)();return(0,o.d4)((()=>{if(!t&&e&&!i){const t=Date.now();c.he(e,n).then((()=>{const e=Date.now()-t;!l||e>=l?d():setTimeout(d,l-e)}))}}),[t,e,i,n,a,d,l]),i}},4319:(e,t,n)=>{n.d(t,{yl:()=>r,TE:()=>s,VP:()=>a});var o=n(3716);const r=navigator.clipboard&&window.ClipboardItem,c=document.createElement("textarea");c.setAttribute("readonly",""),c.tabIndex=-1,c.className="visually-hidden";const s=e=>{c.value=e,document.body.appendChild(c);const t=document.getSelection();if(t){const e=t.rangeCount>0&&t.getRangeAt(0);c.select(),document.execCommand("copy"),e&&(t.removeAllRanges(),t.addRange(e))}document.body.removeChild(c)},a=e=>{if(!e)return;const t=document.createElement("canvas"),n=t.getContext("2d"),o=new Image;o.onload=e=>{if(n&&e.currentTarget){const o=e.currentTarget;t.width=o.width,t.height=o.height,n.drawImage(o,0,0,o.width,o.height),t.toBlob(l,"image/png",1)}},o.src=e};async function l(e){if(e&&r)try{await navigator.clipboard.write([new window.ClipboardItem({[e.type]:e})])}catch(e){o.eM&&console.error(e)}}},2972:(e,t,n)=>{function o(e){e.offsetWidth}n.d(t,{Z:()=>o})},7675:(e,t,n)=>{n.d(t,{Z:()=>c,z:()=>s});var o=n(7361),r=n(2972);const c=(e,t)=>{o.cj&&(e.style.overflow="hidden"),void 0!==t&&(e.scrollTop=t),o.cj&&(e.style.overflow="")};function s(e){e.style.display="none",(0,r.Z)(e),e.style.display=""}},4753:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(3716);const r=e=>{e.play().catch((t=>{o.eM&&console.warn(t,e)}))}},1879:(e,t,n)=>{e.exports=n.p+"Cumshot.7a17984a6b80787dab34..tgs"},5435:(e,t,n)=>{e.exports=n.p+"Eggplant.7693d877087b802d04be..tgs"},3677:(e,t,n)=>{e.exports=n.p+"Peach.a289b2c54c563f11208f..tgs"},5665:(e,t,n)=>{e.exports=n.p+"CameraFlip.1a9fe44cf01fcb22347d..tgs"},2456:(e,t,n)=>{e.exports=n.p+"HandFilled.f87939d160f1dc288586..tgs"},5667:(e,t,n)=>{e.exports=n.p+"HandOutline.f9831751ba60df30c484..tgs"},8763:(e,t,n)=>{e.exports=n.p+"Speaker.04bb3743412b41ff83c5..tgs"},401:(e,t,n)=>{e.exports=n.p+"VoiceAllowTalk.a9cc7c39ec438973ddc9..tgs"},5106:(e,t,n)=>{e.exports=n.p+"VoiceMini.bf00ffdf69625c579569..tgs"},487:(e,t,n)=>{e.exports=n.p+"VoiceMuted.a4b4ec6bfd7c6c5fb275..tgs"},5740:(e,t,n)=>{e.exports=n.p+"VoiceOutlined.91b394ab3562cdfad6bc..tgs"},6257:(e,t,n)=>{e.exports=n.p+"TwoFactorSetupMonkeyClose.604c4c833d322b7e6c3e..tgs"},8760:(e,t,n)=>{e.exports=n.p+"TwoFactorSetupMonkeyIdle.dea4a492c144df84ddab..tgs"},7785:(e,t,n)=>{e.exports=n.p+"TwoFactorSetupMonkeyPeek.1905436b042520363d7e..tgs"},2750:(e,t,n)=>{e.exports=n.p+"TwoFactorSetupMonkeyTracking.eb5a7a6f166fb7589c12..tgs"},6978:(e,t,n)=>{e.exports=n.p+"DiscussionGroupsDucks.9ea453d1be9d1b0ee77a..tgs"},9356:(e,t,n)=>{e.exports=n.p+"FoldersAll.3f9f9e243d19f0fbf9aa..tgs"},5485:(e,t,n)=>{e.exports=n.p+"FoldersNew.9a40d71c0c8be70f5bd1..tgs"}}]);
|
|
//# sourceMappingURL=830.73181e239801042afb0c.js.map
|