2 lines
23 KiB
JavaScript
2 lines
23 KiB
JavaScript
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[3634],{70172:(e,t,n)=>{n.d(t,{Z:()=>E});var r=n(60748),o=n(33555),i=n(6137),a=n(83716),c=n(4463),l=n(46752),s=n(2155),d=n(32340),u=n(39415),m=n(59107),h=n(25190),f=n(6202),v=n(70692),p=n(57080),g=n(99585);const w=(0,l.y)("Avatar");w.media=w("media"),w.icon=w("icon");const E=(0,r.X$)((e=>{let{className:t,size:n="large",peer:E,photo:Z,text:C,isSavedMessages:I,withVideo:L,withStory:P,forPremiumPromo:b,withStoryGap:y,withStorySolid:k,storyViewerOrigin:x,storyViewerMode:M="single-peer",loopIndefinitely:S,noPersonalPhoto:F,onClick:N}=e;const{openStoryViewer:T}=(0,o.Sv)(),G=(0,r.sO)(null),U=(0,r.sO)(0),B=E&&"title"in E,O=E&&!B?E:void 0,A=E&&B?E:void 0,z=O&&(0,c.NB)(O),R=E&&(0,c.pK)(E.id),$=A?.isForum;let j,D;const V=L&&Z?.isVideo,q="jumbo"===n;I||z||(O&&!F||A?j=(0,c.RT)(E,q?"big":void 0):Z&&(j=`photo${Z.id}?size=m`,Z.isVideo&&L&&(D=`videoAvatar${Z.id}?size=u`)));const X=(0,f.Z)(j,!1,i.IU.BlobUrl),J=(0,f.Z)(D,!V,i.IU.BlobUrl),_=Boolean(X||J),H=Boolean(J&&V),W=(0,v.Z)(_),Y=(0,h.Z)((e=>{const t=e.currentTarget;J&&(S||(U.current+=1,U.current>=3&&(t.style.display="none")))})),K=(0,m.Z)();let Q;const ee=O?(0,c.Js)(O):A?(0,c.U)(K,A):C;if(I)Q=r.ZP.createElement("i",{className:(0,l.Z)(w.icon,"icon","icon-avatar-saved-messages"),role:"img","aria-label":ee});else if(z)Q=r.ZP.createElement("i",{className:(0,l.Z)(w.icon,"icon","icon-avatar-deleted-account"),role:"img","aria-label":ee});else if(R)Q=r.ZP.createElement("i",{className:(0,l.Z)(w.icon,"icon","icon-reply-filled"),role:"img","aria-label":ee});else if(_)Q=r.ZP.createElement(r.ZP.Fragment,null,r.ZP.createElement("img",{src:X,className:(0,l.Z)(w.media,"avatar-media",W,J&&"poster"),alt:ee,decoding:"async",draggable:!1}),H&&r.ZP.createElement(p.Z,{canPlay:!0,src:J,className:(0,l.Z)(w.media,"avatar-media","poster"),muted:!0,loop:S,autoPlay:!0,disablePictureInPicture:!0,playsInline:!0,draggable:!1,onEnded:Y}));else if(O){const e=(0,c.Js)(O);Q=e?(0,s.Xv)(e,2):void 0}else if(A){const e=(0,c.U)(K,A);Q=e&&(0,s.Xv)(e,(0,c.YC)(A.id)?2:1)}else C&&(Q=(0,s.Xv)(C,2));const te=(0,l.Z)(`Avatar size-${n}`,t,`color-bg-${(0,c.kj)(E)}`,I&&"saved-messages",z&&"deleted-account",R&&"replies-bot-account",$&&"forum",(P&&E?.hasStories||b)&&"with-story-circle",k&&E?.hasStories&&"with-story-solid",k&&E?.hasUnreadStories&&"has-unread-story",N&&"interactive",!I&&!X&&"no-photo"),ne=Boolean(I||X),{handleClick:re,handleMouseDown:oe}=(0,u.m)((e=>{if(P&&"disabled"!==M&&E?.hasStories)return e.stopPropagation(),void T({peerId:E.id,isSinglePeer:"single-peer"===M,origin:x});N&&N(e,ne)}));return r.ZP.createElement("div",{ref:G,className:te,id:E?.id&&P?(0,c.qI)(E.id):void 0,"data-peer-id":E?.id,"data-test-sender-id":a.Cgt?E?.id:void 0,"aria-label":"string"==typeof Q?ee:void 0,onClick:re,onMouseDown:oe},r.ZP.createElement("div",{className:"inner"},"string"==typeof Q?(0,d.Z)(Q,["jumbo"===n?"hq_emoji":"emoji"]):Q),P&&E?.hasStories&&r.ZP.createElement(g.Z,{peerId:E.id,size:n,withExtraGap:y}))}))},99585:(e,t,n)=>{n.d(t,{T:()=>I,Z:()=>C});var r=n(60748),o=n(33555),i=n(7054),a=n(46752),c=n(97184),l=n(74399);const s={micro:1.125*c.cL*l.Gw,tiny:2.125*c.cL*l.Gw,mini:1.625*c.cL*l.Gw,small:2.25*c.cL*l.Gw,"small-mobile":2.625*c.cL*l.Gw,medium:2.875*c.cL*l.Gw,large:3.5*c.cL*l.Gw,giant:5.125*c.cL*l.Gw,jumbo:7.625*c.cL*l.Gw},d=["#34C578","#3CA3F3"],u=["#C9EB38","#09C167"],m=["#A667FF","#55A5FF"],h=.125*c.cL*l.Gw,f=.0625*c.cL*l.Gw,v=2,p=45,g=Math.PI/4,w=2*Math.PI*.1,E=g-w/2,Z=g+w/2,C=(0,r.X$)((0,o.c$)(((e,t)=>{let{peerId:n}=t;const r=(0,i.dyD)(e,n),o=(0,i.nST)(e,n),a=(0,i.Puy)(e);return{isCloseFriend:r?.isCloseFriend,storyIds:o?.orderedIds,lastReadId:o?.lastReadId,appTheme:a}}))((function(e){let{size:t="large",className:n,isCloseFriend:o,storyIds:i,lastReadId:l,withExtraGap:d,appTheme:u}=e;const m=(0,r.sO)(null),h=(0,r.Ye)((()=>(i||[]).reduce(((e,t)=>(e.total+=1,l&&t<=l&&(e.read+=1),e)),{total:0,read:0})),[l,i]);if((0,r.bt)((()=>{m.current&&I({canvas:m.current,size:s[t],segmentsCount:h.total,color:o?"green":"blue",readSegmentsCount:h.read,withExtraGap:d,readSegmentColor:"dark"===u?"#737373":"#C4C9CC"})}),[u,o,t,h.read,h.total,d]),!h.total)return;const f=s[t]/c.cL;return r.ZP.createElement("canvas",{ref:m,className:(0,a.Z)("story-circle",t,n),style:`max-width: ${f}px; max-height: ${f}px;`})})));function I(e){let{canvas:t,size:n,color:r,segmentsCount:o,readSegmentsCount:i=0,withExtraGap:a=!1,readSegmentColor:g}=e;o>p&&(i=Math.round(i*(p/o)),o=p);const w=Math.max(Math.max(n-s.large,0)/c.cL/l.Gw/1.5,1),C=t.getContext("2d");if(!C)return;t.width=n,t.height=n;const I=n/2,L=(n-h*w)/2,P=2*Math.PI/o,b=v/100*(2*Math.PI),y=C.createLinearGradient(0,0,Math.ceil(n*Math.cos(Math.PI/2)),Math.ceil(n*Math.sin(Math.PI/2))),k="purple"===r?m:"green"===r?u:d;k.forEach(((e,t)=>{y.addColorStop(t/(k.length-1),e)})),C.lineCap="round",C.clearRect(0,0,n,n),Array.from({length:o}).forEach(((e,t)=>{const n=t<i;let r=t*P-Math.PI/2+b/2,c=r+P-(o>1?b:0);if(C.strokeStyle=n?g:y,C.lineWidth=(n?f:h)*w,a){if(r>=E&&c<=Z)return;r<E&&c>Z?(C.beginPath(),C.arc(I,I,L,Z,c),C.stroke(),c=E):r<E&&c>E?c=E:r<Z&&c>Z&&(r=Z)}C.beginPath(),C.arc(I,I,L,r,c),C.stroke()}))}},50685:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(60748),o=n(59107);const i=(0,r.X$)((e=>{let{fakeType:t}=e;const n=(0,o.Z)();return r.ZP.createElement("span",{className:"FakeIcon"},n("fake"===t?"FakeMessage":"ScamMessage"))}))},2153:(e,t,n)=>{n.d(t,{Z:()=>w});var r=n(60748),o=n(33555),i=n(83716),a=n(4463),c=n(46752),l=n(64319),s=n(3858),d=n(32340),u=n(59107),m=n(25190),h=n(96459),f=n(50685),v=n(4863);const p=()=>r.ZP.createElement("svg",{className:"VerifiedIcon",viewBox:"0 0 24 24"},r.ZP.createElement("path",{d:"M12.3 2.9c.1.1.2.1.3.2.7.6 1.3 1.1 2 1.7.3.2.6.4.9.4.9.1 1.7.2 2.6.2.5 0 .6.1.7.7.1.9.1 1.8.2 2.6 0 .4.2.7.4 1 .6.7 1.1 1.3 1.7 2 .3.4.3.5 0 .8-.5.6-1.1 1.3-1.6 1.9-.3.3-.5.7-.5 1.2-.1.8-.2 1.7-.2 2.5 0 .4-.2.5-.6.6-.8 0-1.6.1-2.5.2-.5 0-1 .2-1.4.5-.6.5-1.3 1.1-1.9 1.6-.3.3-.5.3-.8 0-.7-.6-1.4-1.2-2-1.8-.3-.2-.6-.4-.9-.4-.9-.1-1.8-.2-2.7-.2-.4 0-.5-.2-.6-.5 0-.9-.1-1.7-.2-2.6 0-.4-.2-.8-.4-1.1-.6-.6-1.1-1.3-1.6-2-.4-.4-.3-.5 0-1 .6-.6 1.1-1.3 1.7-1.9.3-.3.4-.6.4-1 0-.8.1-1.6.2-2.5 0-.5.1-.6.6-.6.9-.1 1.7-.1 2.6-.2.4 0 .7-.2 1-.4.7-.6 1.4-1.2 2.1-1.7.1-.2.3-.3.5-.2z",style:"fill: var(--color-fill)"}),r.ZP.createElement("path",{d:"M16.4 10.1l-.2.2-5.4 5.4c-.1.1-.2.2-.4 0l-2.6-2.6c-.2-.2-.1-.3 0-.4.2-.2.5-.6.7-.6.3 0 .5.4.7.6l1.1 1.1c.2.2.3.2.5 0l4.3-4.3c.2-.2.4-.3.6 0 .1.2.3.3.4.5.2 0 .3.1.3.1z",style:"fill: var(--color-checkmark)"})),g="ysHMmXALnn0fgFRc7Bn7",w=(0,r.X$)((e=>{let{className:t,peer:n,noVerified:w,noFake:E,withEmojiStatus:Z,emojiStatusSize:C,isSavedMessages:I,noLoopLimit:L,canCopyTitle:P,onEmojiStatusClick:b,observeIntersection:y}=e;const k=(0,u.Z)(),{showNotification:x}=(0,o.Sv)(),M=(0,a.YC)(n.id),S=M?(0,a.Js)(n):(0,a.U)(k,n),F=M&&n.emojiStatus,N=M&&n.isPremium,T=(0,m.Z)((e=>{S&&P&&((0,s.Z)(e),(0,l.TE)(S),x({message:(M?"User":"Chat")+" name was copied"}))}));return I?r.ZP.createElement("div",{className:(0,c.Z)("title",g,t)},r.ZP.createElement("h3",null,k("SavedMessages"))):r.ZP.createElement("div",{className:(0,c.Z)("title",g,t)},r.ZP.createElement("h3",{dir:"auto",role:"button",className:(0,c.Z)("fullName","nq7wdidGAlDZRU8k5YjA",P&&"wRQ44EzvWVlpm3M3sEPu"),onClick:T},(0,d.Z)(S||"")),!w&&n.isVerified&&r.ZP.createElement(p,null),!E&&n.fakeType&&r.ZP.createElement(f.Z,{fakeType:n.fakeType}),Z&&F&&r.ZP.createElement(h.Z,{documentId:F.documentId,size:C,loopLimit:L?void 0:i.y3O,observeIntersectionForLoading:y,onClick:b}),Z&&!F&&N&&r.ZP.createElement(v.Z,null))}))},4863:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(60748),o=n(46752),i=n(27704);const a="M6.63869 12.1902L3.50621 14.1092C3.18049 14.3087 2.75468 14.2064 2.55515 13.8807C2.45769 13.7216 2.42864 13.5299 2.47457 13.3491L2.95948 11.4405C3.13452 10.7515 3.60599 10.1756 4.24682 9.86791L7.6642 8.22716C7.82352 8.15067 7.89067 7.95951 7.81418 7.80019C7.75223 7.67116 7.61214 7.59896 7.47111 7.62338L3.66713 8.28194C2.89387 8.41581 2.1009 8.20228 1.49941 7.69823L0.297703 6.69116C0.00493565 6.44581 -0.0335059 6.00958 0.211842 5.71682C0.33117 5.57442 0.502766 5.48602 0.687982 5.47153L4.35956 5.18419C4.61895 5.16389 4.845 4.99974 4.94458 4.75937L6.36101 1.3402C6.5072 0.987302 6.91179 0.819734 7.26469 0.965925C7.43413 1.03612 7.56876 1.17075 7.63896 1.3402L9.05539 4.75937C9.15496 4.99974 9.38101 5.16389 9.6404 5.18419L13.3322 5.47311C13.713 5.50291 13.9975 5.83578 13.9677 6.2166C13.9534 6.39979 13.8667 6.56975 13.7269 6.68896L10.9114 9.08928C10.7131 9.25826 10.6267 9.52425 10.6876 9.77748L11.5532 13.3733C11.6426 13.7447 11.414 14.1182 11.0427 14.2076C10.8642 14.2506 10.676 14.2208 10.5195 14.1249L7.36128 12.1902C7.13956 12.0544 6.8604 12.0544 6.63869 12.1902Z",c=(0,r.X$)((e=>{let{withGradient:t,big:n,className:c,onClick:l}=e;const s=(0,i.Z)();return r.ZP.createElement("i",{onClick:l,className:(0,o.Z)("PremiumIcon",c,t&&"gradient",l&&"clickable",n&&"big"),title:"Premium"},t?r.ZP.createElement("svg",{width:"14",height:"15",viewBox:"0 0 14 15",fill:"none"},r.ZP.createElement("defs",null,r.ZP.createElement("linearGradient",{id:s,x1:"3",y1:"63.5001",x2:"84.1475",y2:"-1.32262",gradientUnits:"userSpaceOnUse"},r.ZP.createElement("stop",{"stop-color":"#6B93FF"}),r.ZP.createElement("stop",{offset:"0.439058","stop-color":"#976FFF"}),r.ZP.createElement("stop",{offset:"1","stop-color":"#E46ACE"}))),r.ZP.createElement("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:a,fill:`url(#${s})`})):r.ZP.createElement("svg",{width:"14",height:"15",viewBox:"0 0 14 15",fill:"none"},r.ZP.createElement("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:a,fill:"var(--color-fill)"})))}))},22275:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(60748),o=n(33555),i=n(4463),a=n(7054),c=n(32340),l=n(59107),s=n(17551);const d=(0,r.X$)((0,o.c$)(((e,t)=>{let{userId:n}=t;const r=(0,a.jrE)(e),o=n&&(0,a.dyD)(e,n);return{chat:r,contactName:o?(0,i.Vl)(o):void 0}}))((e=>{let{isOpen:t,chat:n,userId:i,contactName:a,onClose:d}=e;const{deleteChatMember:u}=(0,o.Sv)(),m=(0,l.Z)(),h=(0,r.I4)((()=>{u({chatId:n.id,userId:i}),d()}),[n,u,d,i]);if(n&&i)return r.ZP.createElement(s.Z,{isOpen:t,onClose:d,title:m("GroupRemoved.Remove"),textParts:(0,c.Z)(m("PeerInfo.Confirm.RemovePeer",a)),confirmLabel:m("lng_box_remove"),confirmHandler:h,confirmIsDestructive:!0})})))},42431:(e,t,n)=>{n.d(t,{$5:()=>c,Bj:()=>a,GU:()=>l,Ht:()=>s,LU:()=>m,fu:()=>u,mU:()=>d});var r=n(4463),o=n(14342),i=n(86087);function a(e,t){const n=(0,o.x6)(e,t);if(n&&n.groupCallId)return c(e,n.groupCallId)}function c(e,t){return e.groupCalls.byId[t]}function l(e,t,n){return c(e,t)?.participants[n]}function s(e){const t=d(e)?.chatId;if(!t)return!1;const n=(0,o.Z1)(e,t);return!!n&&((0,r.G9)(n)&&n.isCreator||Boolean(n.adminRights?.manageCall))}function d(e){const{groupCalls:{activeGroupCallId:t}}=e;if(t)return c(e,t)}function u(e){const{phoneCall:t,currentUserId:n}=e;if(!t||!t.participantId||!t.adminId)return;const r=t.adminId===n?t.participantId:t.adminId;return(0,i.dy)(e,r)}function m(e){const t=d(e);if(!t||!t.chatId)return!1;const n=(0,o.Z1)(e,t.chatId);if(!n)return!1;if(Boolean((0,r.WS)(n)))return!0;const i=(0,o.x6)(e,n.id)?.inviteLink;return Boolean(i)}},9211:(e,t,n)=>{n.d(t,{M:()=>i,P:()=>a});var r=n(83716),o=n(86087);function i(e,t){const{appConfig:n}=e;if(!n)return r.prK[t][0];const i=(0,o.wV)(e),{limits:a}=n,c=a[t]?.[i?1:0]??r.prK[t][i?1:0];return"dialogFilters"===t?c+1:c}function a(e,t){const{appConfig:n}=e;if(!n)return r.prK[t][1];const{limits:o}=n;return o[t][1]}},17240:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(60748),o=n(31664),i=n(57710),a=n(97184),c=n(25190);function l(e){e.stopImmediatePropagation(),e.preventDefault(),e.stopPropagation()}const s=(e,t,n,s,d)=>{const[u,m]=(0,r.eJ)(!1),[h,f]=(0,r.eJ)(void 0),[v,p]=(0,r.eJ)(void 0),g=(0,c.Z)((e=>{t||2!==e.button||(0,i.WM)((()=>{(0,o.D_)(e.target,"no-selection")}))})),w=(0,c.Z)((e=>{(0,i.WM)((()=>{(0,o.mC)(e.target,"no-selection")})),t||n&&e.target.matches("a[href]")||(e.preventDefault(),h||(m(!0),f({x:e.clientX,y:e.clientY}),p(e.target)))})),E=(0,c.Z)((()=>{m(!1)})),Z=(0,c.Z)((()=>{f(void 0)}));return(0,r.d4)((()=>{if(t||!a.$b||s||d&&!d())return;const r=e.current;if(!r)return;let o;const i=()=>{o&&(clearTimeout(o),o=void 0)},c=e=>{t||(i(),o=window.setTimeout((()=>(e=>{i();const{clientX:t,clientY:r,target:o}=e.touches[0];h||n&&o.matches("a[href]")||(document.addEventListener("touchend",(e=>{a.cj&&a.fl&&setTimeout((()=>{document.removeEventListener("mousedown",l,{capture:!0}),document.removeEventListener("click",l,{capture:!0})}),100),l(e)}),{once:!0,capture:!0}),a.fl&&a.cj&&(document.addEventListener("mousedown",l,{once:!0,capture:!0}),document.addEventListener("click",l,{once:!0,capture:!0})),m(!0),f({x:t,y:r}))})(e)),200))};return r.addEventListener("touchstart",c,{passive:!0}),r.addEventListener("touchcancel",i,!0),r.addEventListener("touchend",i,!0),r.addEventListener("touchmove",i,{passive:!0}),()=>{i(),r.removeEventListener("touchstart",c),r.removeEventListener("touchcancel",i,!0),r.removeEventListener("touchend",i,!0),r.removeEventListener("touchmove",i)}}),[h,t,s,e,n,d]),{isContextMenuOpen:u,contextMenuPosition:h,contextMenuTarget:v,handleBeforeContextMenu:g,handleContextMenu:w,handleContextMenuClose:E,handleContextMenuHide:Z}}},39415:(e,t,n)=>{n.d(t,{m:()=>i});var r=n(97184),o=n(25190);function i(e){const t=(0,o.Z)((t=>{"mousedown"===t.type&&t.button!==r.tc.Main||e(t)}));return r.$b?{handleClick:e?t:void 0}:{handleMouseDown:e?t:void 0}}},36413:(e,t,n)=>{n.d(t,{Ar:()=>l,ZP:()=>c});var r=n(60748),o=n(73760),i=n(97184);const a=s();function c(e,t){const[n,o]=(0,r.eJ)(Boolean(a&&document[a]));return(0,r.bt)((()=>{const n=e.current,r=()=>{const e=Boolean(a&&document[a]);o(e),n.controls=e},i=()=>{o(!0)},c=()=>{o(!1),t(!1)};return document.addEventListener("fullscreenchange",r,!1),document.addEventListener("webkitfullscreenchange",r,!1),document.addEventListener("mozfullscreenchange",r,!1),n&&(n.addEventListener("webkitbeginfullscreen",i,!1),n.addEventListener("webkitendfullscreen",c,!1)),()=>{document.removeEventListener("fullscreenchange",r,!1),document.removeEventListener("webkitfullscreenchange",r,!1),document.removeEventListener("mozfullscreenchange",r,!1),n&&(n.removeEventListener("webkitbeginfullscreen",i,!1),n.removeEventListener("webkitendfullscreen",c,!1))}}),[]),a||i.cj?[n,()=>{var t;e.current&&(a||i.cj)&&((t=e.current).requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.webkitEnterFullscreen?t.webkitEnterFullscreen():t.mozRequestFullScreen&&t.mozRequestFullScreen(),o(!0))},()=>{e.current&&(document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen(),o(!1))}]:[!1]}const l=()=>{const[e,t]=(0,r.eJ)(!1);return(0,r.d4)((()=>{const e=()=>{t(function(){const e=s();return Boolean(e&&document[e])}())},n=window.electron?.on(o.I.FULLSCREEN_CHANGE,t);return window.electron?.isFullscreen().then(t),document.addEventListener("fullscreenchange",e,!1),document.addEventListener("webkitfullscreenchange",e,!1),document.addEventListener("mozfullscreenchange",e,!1),()=>{n?.(),document.removeEventListener("fullscreenchange",e,!1),document.removeEventListener("webkitfullscreenchange",e,!1),document.removeEventListener("mozfullscreenchange",e,!1)}}),[]),e};function s(){return void 0!==document.fullscreenElement?"fullscreenElement":void 0!==document.mozFullScreenElement?"mozFullScreenElement":void 0!==document.webkitFullscreenElement?"webkitFullscreenElement":""}},27407:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(60748),o=n(91713),i=n(60782),a=n(65326),c=n(25190),l=n(87204);function s(e,t,n,r){const{length:i}=e,a=r?e.indexOf(r):0,c=t===o.Uq.Forwards?a:a+1||i,l=Math.max(0,c-n),s=c+n-1,d=e.slice(Math.max(0,l),s+1);let u,m;switch(t){case o.Uq.Forwards:u=c>=0,m=l>=0;break;case o.Uq.Backwards:u=c<i,m=s<=i-1}return{newViewportIds:d,areSomeLocal:u,areAllLocal:m,newIsOnTop:d[0]===e[0]}}const d=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:30;const u=(0,r.sO)(),m=(0,r.sO)();if(!m.current&&t&&!n){const{newViewportIds:e,newIsOnTop:n}=s(t,o.Uq.Forwards,d,t[0]);m.current={viewportIds:e,isOnTop:n}}const h=(0,a.Z)();n&&(u.current={});const f=(0,l.Z)(t),v=(0,l.Z)(n);if(!t||n||t===f&&n===v)t||(m.current=void 0);else{const{viewportIds:e,isOnTop:n}=m.current||{},r=e&&!n?e[Math.round(e.length/2)]:void 0,a=r&&t.includes(r)?r:t[0],{offsetId:c=a,direction:l=o.Uq.Forwards}=u.current||{},{newViewportIds:h,newIsOnTop:f}=s(t,l,d,c);u.current={},e&&(0,i.et)(e,h)||(m.current={viewportIds:h,isOnTop:f})}const p=(0,c.Z)((n=>{let{direction:r,noScroll:a}=n;const{viewportIds:c}=m.current||{},l=c?r===o.Uq.Backwards?c[c.length-1]:c[0]:void 0;if(!t)return void(e&&e({offsetId:l}));const{newViewportIds:f,areSomeLocal:v,areAllLocal:p,newIsOnTop:g}=s(t,r,d,l);!v||c&&(0,i.et)(c,f)||(m.current={viewportIds:f,isOnTop:g},h()),!p&&e&&(a||(u.current={...u.current,direction:r,offsetId:l}),e({offsetId:l}))}));return n?[t]:[m.current?.viewportIds,p]}},62357:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(60748);const o=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=(0,r.sO)(e);(0,r.bt)((()=>{o.current=e}),[e]),(0,r.d4)((()=>{if(void 0===t)return;const e=setInterval((()=>o.current()),t);return n||o.current(),()=>clearInterval(e)}),[t,n])}},72645:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(60748);const o=(e,t,n)=>{const o=(0,r.sO)();return(0,r.bt)((()=>{const n=o.current;return o.current=t,e(n||[])}),t,n)}},12644:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(60748);const o=16,i=12,a={width:0,left:0,height:0,top:0};function c(e,t,n,c,l){const[s,d]=(0,r.eJ)("right"),[u,m]=(0,r.eJ)("bottom"),[h,f]=(0,r.eJ)(),[v,p]=(0,r.eJ)(),[g,w]=(0,r.eJ)(!1),[E,Z]=(0,r.eJ)(""),[C,I]=(0,r.eJ)("opacity: 0;");return(0,r.d4)((()=>{const r=t();if(!e||!r)return;let{x:s,y:u}=e;const h=s,v=u,g=c(),E=n(),{extraPaddingX:C=0,extraTopPadding:L=0,marginSides:P=0,extraMarginTop:b=0,menuElMinWidth:y=0,deltaX:k=0,shouldAvoidNegativePosition:x=!1,withPortal:M=!1,isDense:S=!1}=l?.()||{},F=g?parseInt(getComputedStyle(g).marginTop,10)+b:void 0,{offsetWidth:N,offsetHeight:T}=g||{offsetWidth:0,offsetHeight:0},G=g?{width:Math.max(N,y),height:T+F}:a,U=E?E.getBoundingClientRect():a;let B,O;S||s+G.width+C<U.width+U.left?(s+=3,B="left"):s-G.width-U.left>0?(B="right",s-=3):(B="left",s=16),d(B),P&&"right"===B&&s+C+P>=U.width+U.left&&(s-=P),P&&"left"===B&&(s+C+P+G.width>=U.width+U.left?s-=P:s-P<=0&&(s+=P)),s+=k,S||u+G.height<U.height+U.top?O="top":(O="bottom",u-G.height<U.top+L&&(u=U.top+U.height)),m(O);const A=r.getBoundingClientRect(),z=M?A.top:0,R=M?A.left:0,$=Math.min(s-A.left,U.width-G.width-o);let j=("left"===B?M||x?Math.max(o,$):$:s-A.left)+R,D=u-A.top+z;S&&(j=Math.min(j,U.width-G.width-o),D=Math.min(D,U.height-G.height-o));const V=y?Math.max(0,(y-N)/2):0;j-V<0&&x&&(j=V+o);const q=U.height-i-(F||0);w(q<G.height),I(`max-height: ${q}px;`),Z(`left: ${j}px; top: ${D}px`);const X=h+R-A.left-j,J=v+z-A.top-D-(F||0);f("left"===B?X:G.width+X),p("bottom"===O?G.height+J:J)}),[e,c,n,t,l]),{positionX:s,positionY:u,transformOriginX:h,transformOriginY:v,style:E,menuStyle:C,withScroll:g}}},96264:(e,t,n)=>{n.d(t,{Z:()=>i});const r=[1,57,41,21,203,34,97,73,227,91,149,62,105,45,39,137,241,107,3,173,39,71,65,238,219,101,187,87,81,151,141,133,249,117,221,209,197,187,177,169,5,153,73,139,133,127,243,233,223,107,103,99,191,23,177,171,165,159,77,149,9,139,135,131,253,245,119,231,224,109,211,103,25,195,189,23,45,175,171,83,81,79,155,151,147,9,141,137,67,131,129,251,123,30,235,115,113,221,217,53,13,51,50,49,193,189,185,91,179,175,43,169,83,163,5,79,155,19,75,147,145,143,35,69,17,67,33,65,255,251,247,243,239,59,29,229,113,111,219,27,213,105,207,51,201,199,49,193,191,47,93,183,181,179,11,87,43,85,167,165,163,161,159,157,155,77,19,75,37,73,145,143,141,35,138,137,135,67,33,131,129,255,63,250,247,61,121,239,237,117,29,229,227,225,111,55,109,216,213,211,209,207,205,203,201,199,197,195,193,48,190,47,93,185,183,181,179,178,176,175,173,171,85,21,167,165,41,163,161,5,79,157,78,154,153,19,75,149,74,147,73,144,143,71,141,140,139,137,17,135,134,133,66,131,65,129,1],o=[0,9,10,10,14,12,14,14,16,15,16,15,16,15,15,17,18,17,12,18,16,17,17,19,19,18,19,18,18,19,19,19,20,19,20,20,20,20,20,20,15,20,19,20,20,20,21,21,21,20,20,20,21,18,21,21,21,21,20,21,17,21,21,21,22,22,21,22,22,21,22,21,19,22,22,19,20,22,22,21,21,21,22,22,22,18,22,22,21,22,22,23,22,20,23,22,22,23,23,21,19,21,21,21,23,23,23,22,23,23,21,23,22,23,18,22,23,20,22,23,23,23,21,22,20,22,21,22,24,24,24,24,24,22,21,24,23,23,24,21,24,23,24,22,24,24,22,24,24,22,23,24,24,24,20,23,22,23,24,24,24,24,24,24,24,23,21,23,22,23,24,24,24,22,24,24,24,23,22,24,24,25,23,25,25,23,24,25,25,24,22,25,25,25,24,23,24,25,25,25,25,25,25,25,25,25,25,25,25,23,25,23,24,25,25,25,25,25,25,25,25,25,24,22,25,25,23,25,25,20,24,25,24,25,25,22,24,25,24,25,24,25,25,24,25,25,25,25,22,25,25,25,24,25,24,25,18];function i(e,t,n,i,a,c,l){if(Number.isNaN(c)||c<1)return;c|=0,Number.isNaN(l)&&(l=1),(l|=0)>3&&(l=3),l<1&&(l=1);const s=e.getImageData(t,n,i,a),d=s.data;let u,m,h,f,v,p,g,w,E,Z,C,I,L=i-1,P=a-1,b=c+1,y=[],k=[],x=[],M=r[c],S=o[c],F=[],N=[];for(;l-- >0;){for(I=C=0,v=0;v<a;v++){for(u=d[I]*b,m=d[I+1]*b,h=d[I+2]*b,p=1;p<=c;p++)g=I+((p>L?L:p)<<2),u+=d[g++],m+=d[g++],h+=d[g++];for(f=0;f<i;f++)y[C]=u,k[C]=m,x[C]=h,0==v&&(F[f]=((g=f+b)<L?g:L)<<2,N[f]=(g=f-c)>0?g<<2:0),w=I+F[f],E=I+N[f],u+=d[w++]-d[E++],m+=d[w++]-d[E++],h+=d[w++]-d[E++],C++;I+=i<<2}for(f=0;f<i;f++){for(Z=f,u=y[Z]*b,m=k[Z]*b,h=x[Z]*b,p=1;p<=c;p++)Z+=p>P?0:i,u+=y[Z],m+=k[Z],h+=x[Z];for(C=f<<2,v=0;v<a;v++)d[C]=u*M>>>S,d[C+1]=m*M>>>S,d[C+2]=h*M>>>S,0==f&&(F[v]=((g=v+b)<P?g:P)*i,N[v]=(g=v-c)>0?g*i:0),w=f+F[v],E=f+N[v],u+=y[w]-y[E],m+=k[w]-k[E],h+=x[w]-x[E],C+=i<<2}}e.putImageData(s,t,n)}},73760:(e,t,n)=>{n.d(t,{I:()=>r});let r=function(e){return e.FULLSCREEN_CHANGE="fullscreen-change",e.UPDATE_ERROR="update-error",e.UPDATE_AVAILABLE="update-available",e.DEEPLINK="deeplink",e}({})},98069:(e,t,n)=>{n.d(t,{In:()=>i,l_:()=>o,wT:()=>a});let r=0;function o(){r+=1}function i(){r-=1}function a(){return r>0}},87675:(e,t,n)=>{n.d(t,{Z:()=>a,n:()=>i});var r=n(82972),o=n(97184);function i(e){e.style.display="none",(0,r.Z)(e),e.style.display=""}const a=(e,t)=>{o.cj&&(e.style.overflow="hidden"),void 0!==t&&(e.scrollTop=t),o.cj&&(e.style.overflow="")}},3858:(e,t,n)=>{n.d(t,{Z:()=>r});const r=e=>{e.stopPropagation(),e.preventDefault()}},1911:(e,t,n)=>{function r(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 r=n.findIndex((e=>e.isSameNode(document.activeElement)));let o=0;r>=0&&(o=t.shiftKey?r>0?r-1:n.length-1:r<n.length-1?r+1:0),n[o].focus()}return document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}}n.d(t,{Z:()=>r})}}]);
|
|
//# sourceMappingURL=3634.94c29f9cdb1fe92879f4.js.map
|