2 lines
20 KiB
JavaScript
2 lines
20 KiB
JavaScript
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[6599],{96634:(e,t,n)=>{n.d(t,{Z:()=>N});var o=n(60748),r=n(33555),i=n(6137),a=n(83716),s=n(48670),c=n(2155),l=n(46752),d=n(32340),u=n(6202),m=n(70692),h=n(59107),f=n(25190),p=n(39415),v=n(57080),g=n(74399),Z=n(601),w=n(7054);const C={micro:1.125*Z.cL*g.Gw,tiny:2.125*Z.cL*g.Gw,mini:1.625*Z.cL*g.Gw,small:2.25*Z.cL*g.Gw,"small-mobile":2.625*Z.cL*g.Gw,medium:2.875*Z.cL*g.Gw,large:3.5*Z.cL*g.Gw,jumbo:7.625*Z.cL*g.Gw},I=["#34C578","#3CA3F3"],P=["#C9EB38","#09C167"],E=.125*Z.cL*g.Gw,y=.0625*Z.cL*g.Gw,L=Math.PI/4,b=2*Math.PI*.1,M=L-b/2,x=L+b/2,S=(0,o.X$)((0,r.c$)(((e,t)=>{let{userId:n}=t;const o=(0,w.dyD)(e,n),r=(0,w.GZu)(e,n),i=(0,w.Puy)(e);return{isCloseFriend:o?.isCloseFriend,storyIds:r?.orderedIds,lastReadId:r?.lastReadId,appTheme:i}}))((function(e){let{size:t="large",className:n,isCloseFriend:r,storyIds:i,lastReadId:a,withExtraGap:s,appTheme:c}=e;const d=(0,o.sO)(null),u=(0,o.Ye)((()=>(i||[]).reduce(((e,t)=>(e.total+=1,a&&t<=a&&(e.read+=1),e)),{total:0,read:0})),[a,i]);if((0,o.bt)((()=>{d.current&&function(e){let{canvas:t,size:n,color:o,segmentsCount:r,readSegmentsCount:i=0,withExtraGap:a=!1,readSegmentColor:s}=e;r>45&&(i=Math.round(i*(45/r)),r=45);const c=t.getContext("2d");if(!c)return;t.width=n,t.height=n;const l=n/2,d=(n-E)/2,u=2*Math.PI/r,m=2*Math.PI*.02,h=c.createLinearGradient(0,0,Math.ceil(n*Math.cos(Math.PI/2)),Math.ceil(n*Math.sin(Math.PI/2))),f="green"===o?P:I;f.forEach(((e,t)=>{h.addColorStop(t/(f.length-1),e)})),c.lineCap="round",c.clearRect(0,0,n,n),Array.from({length:r}).forEach(((e,t)=>{const n=t<i;let o=t*u-Math.PI/2+m/2,f=o+u-(r>1?m:0);if(c.strokeStyle=n?s:h,c.lineWidth=n?y:E,a){if(o>=M&&f<=x)return;o<M&&f>x?(c.beginPath(),c.arc(l,l,d,x,f),c.stroke(),f=M):o<M&&f>M?f=M:o<x&&f>x&&(o=x)}c.beginPath(),c.arc(l,l,d,o,f),c.stroke()}))}({canvas:d.current,size:C[t],segmentsCount:u.total,color:r?"green":"blue",readSegmentsCount:u.read,withExtraGap:s,readSegmentColor:"dark"===c?"#737373":"#C4C9CC"})}),[c,r,t,u.read,u.total,s]),!u.total)return;const m=C[t]/Z.cL;return o.ZP.createElement("canvas",{ref:d,className:(0,l.Z)("story-circle",t,n),style:`max-width: ${m}px; max-height: ${m}px;`})}))),k=(0,l.y)("Avatar");k.media=k("media"),k.icon=k("icon");const N=(0,o.X$)((e=>{let{className:t,size:n="large",peer:g,photo:Z,text:w,isSavedMessages:C,withVideo:I,withStory:P,withStoryGap:E,withStorySolid:y,storyViewerMode:L="single-user",loopIndefinitely:b,noPersonalPhoto:M,onClick:x}=e;const{openStoryViewer:N}=(0,r.Sv)(),T=(0,o.sO)(null),G=(0,o.sO)(0),O=g&&"title"in g,U=g&&!O?g:void 0,B=g&&O?g:void 0,F=U&&(0,s.NB)(U),$=g&&(0,s.pK)(g.id),j=B?.isForum;let X,D;const R=I&&Z?.isVideo,V="jumbo"===n;C||F||(U&&!M||B?X=(0,s.RT)(g,V?"big":void 0):Z&&(X=`photo${Z.id}?size=m`,Z.isVideo&&I&&(D=`videoAvatar${Z.id}?size=u`)));const A=(0,u.Z)(X,!1,i.IU.BlobUrl),z=(0,u.Z)(D,!R,i.IU.BlobUrl),J=Boolean(A||z),q=Boolean(z&&R),W=(0,m.Z)(J),Y=(0,f.Z)((e=>{const t=e.currentTarget;z&&(b||(G.current+=1,G.current>=3&&(t.style.display="none")))})),_=(0,h.Z)();let H;const K=U?(0,s.Js)(U):B?(0,s.U)(_,B):w;if(C)H=o.ZP.createElement("i",{className:(0,l.Z)(k.icon,"icon","icon-avatar-saved-messages"),role:"img","aria-label":K});else if(F)H=o.ZP.createElement("i",{className:(0,l.Z)(k.icon,"icon","icon-avatar-deleted-account"),role:"img","aria-label":K});else if($)H=o.ZP.createElement("i",{className:(0,l.Z)(k.icon,"icon","icon-reply-filled"),role:"img","aria-label":K});else if(J)H=o.ZP.createElement(o.ZP.Fragment,null,o.ZP.createElement("img",{src:A,className:(0,l.Z)(k.media,"avatar-media",W,z&&"poster"),alt:K,decoding:"async",draggable:!1}),q&&o.ZP.createElement(v.Z,{canPlay:!0,src:z,className:(0,l.Z)(k.media,"avatar-media","poster"),muted:!0,loop:b,autoPlay:!0,disablePictureInPicture:!0,playsInline:!0,draggable:!1,onEnded:Y}));else if(U){const e=(0,s.Js)(U);H=e?(0,c.Xv)(e,2):void 0}else if(B){const e=(0,s.U)(_,B);H=e&&(0,c.Xv)(e,(0,s.YC)(B.id)?2:1)}else w&&(H=(0,c.Xv)(w,2));const Q=(0,l.Z)(`Avatar size-${n}`,t,`color-bg-${(0,s.Rs)(g)}`,C&&"saved-messages",F&&"deleted-account",$&&"replies-bot-account",j&&"forum",P&&U?.hasStories&&"with-story-circle",y&&U?.hasStories&&"with-story-solid",y&&U?.hasUnreadStories&&"has-unread-story",x&&"interactive",!C&&!A&&"no-photo"),ee=Boolean(C||A),{handleClick:te,handleMouseDown:ne}=(0,p.m)((e=>{if(P&&"disabled"!==L&&U?.hasStories)return e.stopPropagation(),void N({userId:U.id,isSingleUser:"single-user"===L});x&&x(e,ee)}));return o.ZP.createElement("div",{ref:T,className:Q,"data-test-sender-id":a.Cgt?g?.id:void 0,"aria-label":"string"==typeof H?K:void 0,onClick:te,onMouseDown:ne},o.ZP.createElement("div",{className:"inner"},"string"==typeof H?(0,d.Z)(H,["jumbo"===n?"hq_emoji":"emoji"]):H),P&&U?.hasStories&&o.ZP.createElement(S,{userId:U.id,size:n,withExtraGap:E}))}))},50685:(e,t,n)=>{n.d(t,{Z:()=>i});var o=n(60748),r=n(59107);const i=(0,o.X$)((e=>{let{fakeType:t}=e;const n=(0,r.Z)();return o.ZP.createElement("span",{className:"FakeIcon"},n("fake"===t?"FakeMessage":"ScamMessage"))}))},2153:(e,t,n)=>{n.d(t,{Z:()=>Z});var o=n(60748),r=n(33555),i=n(83716),a=n(32340),s=n(48670),c=n(46752),l=n(64319),d=n(3858),u=n(59107),m=n(25190);const h=()=>o.ZP.createElement("svg",{className:"VerifiedIcon",viewBox:"0 0 24 24"},o.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)"}),o.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)"}));var f=n(50685),p=n(96459),v=n(4863);const g="ysHMmXALnn0fgFRc7Bn7",Z=(0,o.X$)((e=>{let{className:t,peer:n,noVerified:Z,noFake:w,withEmojiStatus:C,emojiStatusSize:I,isSavedMessages:P,noLoopLimit:E,canCopyTitle:y,onEmojiStatusClick:L,observeIntersection:b}=e;const M=(0,u.Z)(),{showNotification:x}=(0,r.Sv)(),S=(0,s.YC)(n.id),k=S?(0,s.Js)(n):(0,s.U)(M,n),N=S&&n.emojiStatus,T=S&&n.isPremium,G=(0,m.Z)((e=>{k&&y&&((0,d.Z)(e),(0,l.TE)(k),x({message:(S?"User":"Chat")+" name was copied"}))}));return P?o.ZP.createElement("div",{className:(0,c.Z)("title",g,t)},o.ZP.createElement("h3",null,M("SavedMessages"))):o.ZP.createElement("div",{className:(0,c.Z)("title",g,t)},o.ZP.createElement("h3",{dir:"auto",role:"button",className:(0,c.Z)("fullName","nq7wdidGAlDZRU8k5YjA",y&&"wRQ44EzvWVlpm3M3sEPu"),onClick:G},(0,a.Z)(k||"")),!Z&&n.isVerified&&o.ZP.createElement(h,null),!w&&n.fakeType&&o.ZP.createElement(f.Z,{fakeType:n.fakeType}),C&&N&&o.ZP.createElement(p.Z,{documentId:N.documentId,size:I,loopLimit:E?void 0:i.y3O,observeIntersectionForLoading:b,onClick:L}),C&&!N&&T&&o.ZP.createElement(v.Z,null))}))},4863:(e,t,n)=>{n.d(t,{Z:()=>s});var o=n(60748),r=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",s=(0,o.X$)((e=>{let{withGradient:t,big:n,className:s,onClick:c}=e;const l=(0,i.Z)();return o.ZP.createElement("i",{onClick:c,className:(0,r.Z)("PremiumIcon",s,t&&"gradient",c&&"clickable",n&&"big"),title:"Premium"},t?o.ZP.createElement("svg",{width:"14",height:"15",viewBox:"0 0 14 15",fill:"none"},o.ZP.createElement("defs",null,o.ZP.createElement("linearGradient",{id:l,x1:"3",y1:"63.5001",x2:"84.1475",y2:"-1.32262",gradientUnits:"userSpaceOnUse"},o.ZP.createElement("stop",{"stop-color":"#6B93FF"}),o.ZP.createElement("stop",{offset:"0.439058","stop-color":"#976FFF"}),o.ZP.createElement("stop",{offset:"1","stop-color":"#E46ACE"}))),o.ZP.createElement("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:a,fill:`url(#${l})`})):o.ZP.createElement("svg",{width:"14",height:"15",viewBox:"0 0 14 15",fill:"none"},o.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 o=n(60748),r=n(33555),i=n(7054),a=n(48670),s=n(32340),c=n(59107),l=n(17551);const d=(0,o.X$)((0,r.c$)(((e,t)=>{let{userId:n}=t;const o=(0,i.jrE)(e),r=n&&(0,i.dyD)(e,n);return{chat:o,contactName:r?(0,a.Vl)(r):void 0}}))((e=>{let{isOpen:t,chat:n,userId:i,contactName:a,onClose:d}=e;const{deleteChatMember:u}=(0,r.Sv)(),m=(0,c.Z)(),h=(0,o.I4)((()=>{u({chatId:n.id,userId:i}),d()}),[n,u,d,i]);if(n&&i)return o.ZP.createElement(l.Z,{isOpen:t,onClose:d,title:m("GroupRemoved.Remove"),textParts:(0,s.Z)(m("PeerInfo.Confirm.RemovePeer",a)),confirmLabel:m("lng_box_remove"),confirmHandler:h,confirmIsDestructive:!0})})))},42431:(e,t,n)=>{n.d(t,{$5:()=>s,Bj:()=>a,GU:()=>c,Ht:()=>l,LU:()=>m,fu:()=>u,mU:()=>d});var o=n(14342),r=n(48670),i=n(86087);function a(e,t){const n=(0,o.x6)(e,t);if(n&&n.groupCallId)return s(e,n.groupCallId)}function s(e,t){return e.groupCalls.byId[t]}function c(e,t,n){return s(e,t)?.participants[n]}function l(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 s(e,t)}function u(e){const{phoneCall:t,currentUserId:n}=e;if(!t||!t.participantId||!t.adminId)return;const o=t.adminId===n?t.participantId:t.adminId;return(0,i.dy)(e,o)}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 o=n(86087),r=n(83716);function i(e,t){var n;const{appConfig:i}=e;if(!i)return r.prK[t][0];const a=(0,o.wV)(e),{limits:s}=i,c=null!==(n=s[t]?.[a?1:0])&&void 0!==n?n:r.prK[t][a?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:()=>l});var o=n(60748),r=n(31664),i=n(57710),a=n(601),s=n(25190);function c(e){e.stopImmediatePropagation(),e.preventDefault(),e.stopPropagation()}const l=(e,t,n,l,d)=>{const[u,m]=(0,o.eJ)(!1),[h,f]=(0,o.eJ)(void 0),[p,v]=(0,o.eJ)(void 0),g=(0,s.Z)((e=>{t||2!==e.button||(0,i.WM)((()=>{(0,r.D_)(e.target,"no-selection")}))})),Z=(0,s.Z)((e=>{(0,i.WM)((()=>{(0,r.mC)(e.target,"no-selection")})),t||n&&e.target.matches("a[href]")||(e.preventDefault(),h||(m(!0),f({x:e.clientX,y:e.clientY}),v(e.target)))})),w=(0,s.Z)((()=>{m(!1)})),C=(0,s.Z)((()=>{f(void 0)}));return(0,o.d4)((()=>{if(t||!a.$b||l||d&&!d())return;const o=e.current;if(!o)return;let r;const i=()=>{r&&(clearTimeout(r),r=void 0)},s=e=>{t||(i(),r=window.setTimeout((()=>(e=>{i();const{clientX:t,clientY:o,target:r}=e.touches[0];h||n&&r.matches("a[href]")||(document.addEventListener("touchend",(e=>{a.cj&&a.fl&&setTimeout((()=>{document.removeEventListener("mousedown",c,{capture:!0}),document.removeEventListener("click",c,{capture:!0})}),100),c(e)}),{once:!0,capture:!0}),a.fl&&a.cj&&(document.addEventListener("mousedown",c,{once:!0,capture:!0}),document.addEventListener("click",c,{once:!0,capture:!0})),m(!0),f({x:t,y:o}))})(e)),200))};return o.addEventListener("touchstart",s,{passive:!0}),o.addEventListener("touchcancel",i,!0),o.addEventListener("touchend",i,!0),o.addEventListener("touchmove",i,{passive:!0}),()=>{i(),o.removeEventListener("touchstart",s),o.removeEventListener("touchcancel",i,!0),o.removeEventListener("touchend",i,!0),o.removeEventListener("touchmove",i)}}),[h,t,l,e,n,d]),{isContextMenuOpen:u,contextMenuPosition:h,contextMenuTarget:p,handleBeforeContextMenu:g,handleContextMenu:Z,handleContextMenuClose:w,handleContextMenuHide:C}}},39415:(e,t,n)=>{n.d(t,{m:()=>i});var o=n(601),r=n(25190);function i(e){const t=(0,r.Z)((t=>{"mousedown"===t.type&&t.button!==o.tc.Main||e(t)}));return o.$b?{handleClick:e?t:void 0}:{handleMouseDown:e?t:void 0}}},27407:(e,t,n)=>{n.d(t,{Z:()=>d});var o=n(60748),r=n(91713),i=n(60782),a=n(25190),s=n(65326),c=n(87204);function l(e,t,n,o){const{length:i}=e,a=o?e.indexOf(o):0,s=t===r.Uq.Forwards?a:a+1||i,c=Math.max(0,s-n),l=s+n-1,d=e.slice(Math.max(0,c),l+1);let u,m;switch(t){case r.Uq.Forwards:u=s>=0,m=c>=0;break;case r.Uq.Backwards:u=s<i,m=l<=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,o.sO)(),m=(0,o.sO)();if(!m.current&&t&&!n){const{newViewportIds:e,newIsOnTop:n}=l(t,r.Uq.Forwards,d,t[0]);m.current={viewportIds:e,isOnTop:n}}const h=(0,s.Z)();n&&(u.current={});const f=(0,c.Z)(t),p=(0,c.Z)(n);if(!t||n||t===f&&n===p)t||(m.current=void 0);else{const{viewportIds:e,isOnTop:n}=m.current||{},o=e&&!n?e[Math.round(e.length/2)]:void 0,a=o&&t.includes(o)?o:t[0],{offsetId:s=a,direction:c=r.Uq.Forwards}=u.current||{},{newViewportIds:h,newIsOnTop:f}=l(t,c,d,s);u.current={},e&&(0,i.et)(e,h)||(m.current={viewportIds:h,isOnTop:f})}const v=(0,a.Z)((n=>{let{direction:o,noScroll:a}=n;const{viewportIds:s}=m.current||{},c=s?o===r.Uq.Backwards?s[s.length-1]:s[0]:void 0;if(!t)return void(e&&e({offsetId:c}));const{newViewportIds:f,areSomeLocal:p,areAllLocal:v,newIsOnTop:g}=l(t,o,d,c);!p||s&&(0,i.et)(s,f)||(m.current={viewportIds:f,isOnTop:g},h()),!v&&e&&(a||(u.current={...u.current,direction:o,offsetId:c}),e({offsetId:c}))}));return n?[t]:[m.current?.viewportIds,v]}},62357:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(60748);const r=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=(0,o.sO)(e);(0,o.bt)((()=>{r.current=e}),[e]),(0,o.d4)((()=>{if(void 0===t)return;const e=setInterval((()=>r.current()),t);return n||r.current(),()=>clearInterval(e)}),[t,n])}},72645:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(60748);const r=(e,t,n)=>{const r=(0,o.sO)();return(0,o.bt)((()=>{const n=r.current;return r.current=t,e(n||[])}),t,n)}},12644:(e,t,n)=>{n.d(t,{Z:()=>i});var o=n(60748);const r={width:0,left:0,height:0,top:0};function i(e,t,n,i,a){const[s,c]=(0,o.eJ)("right"),[l,d]=(0,o.eJ)("bottom"),[u,m]=(0,o.eJ)(),[h,f]=(0,o.eJ)(),[p,v]=(0,o.eJ)(!1),[g,Z]=(0,o.eJ)(""),[w,C]=(0,o.eJ)("opacity: 0;");return(0,o.d4)((()=>{const o=t();if(!e||!o)return;let{x:s,y:l}=e;const u=s,h=l,p=i(),g=n(),{extraPaddingX:w=0,extraTopPadding:I=0,marginSides:P=0,extraMarginTop:E=0,menuElMinWidth:y=0,deltaX:L=0,shouldAvoidNegativePosition:b=!1,withPortal:M=!1,isDense:x=!1}=a?.()||{},S=p?parseInt(getComputedStyle(p).marginTop,10)+E:void 0,{offsetWidth:k,offsetHeight:N}=p||{offsetWidth:0,offsetHeight:0},T=p?{width:Math.max(k,y),height:N+S}:r,G=g?g.getBoundingClientRect():r;let O,U;x||s+T.width+w<G.width+G.left?(s+=3,O="left"):s-T.width-G.left>0?(O="right",s-=3):(O="left",s=16),c(O),P&&"right"===O&&s+w+P>=G.width+G.left&&(s-=P),P&&"left"===O&&(s+w+P+T.width>=G.width+G.left?s-=P:s-P<=0&&(s+=P)),s+=L,x||l+T.height<G.height+G.top?U="top":(U="bottom",l-T.height<G.top+I&&(l=G.top+G.height)),d(U);const B=o.getBoundingClientRect(),F=M?B.top:0,$=M?B.left:0,j=Math.min(s-B.left,G.width-T.width-16);let X=("left"===O?M||b?Math.max(16,j):j:s-B.left)+$,D=l-B.top+F;x&&(X=Math.min(X,G.width-T.width-16),D=Math.min(D,G.height-T.height-16));const R=y?Math.max(0,(y-k)/2):0;X-R<0&&b&&(X=R+16);const V=G.height-12-(S||0);v(V<T.height),C(`max-height: ${V}px;`),Z(`left: ${X}px; top: ${D}px`);const A=u+$-B.left-X,z=h+F-B.top-D-(S||0);m("left"===O?A:T.width+A),f("bottom"===U?T.height+z:z)}),[e,i,n,t,a]),{positionX:s,positionY:l,transformOriginX:u,transformOriginY:h,style:g,menuStyle:w,withScroll:p}}},96264:(e,t,n)=>{n.d(t,{Z:()=>i});const o=[1,57,41,21,203,34,97,73,227,91,149,62,105,45,39,137,241,107,3,173,39,71,65,238,219,101,187,87,81,151,141,133,249,117,221,209,197,187,177,169,5,153,73,139,133,127,243,233,223,107,103,99,191,23,177,171,165,159,77,149,9,139,135,131,253,245,119,231,224,109,211,103,25,195,189,23,45,175,171,83,81,79,155,151,147,9,141,137,67,131,129,251,123,30,235,115,113,221,217,53,13,51,50,49,193,189,185,91,179,175,43,169,83,163,5,79,155,19,75,147,145,143,35,69,17,67,33,65,255,251,247,243,239,59,29,229,113,111,219,27,213,105,207,51,201,199,49,193,191,47,93,183,181,179,11,87,43,85,167,165,163,161,159,157,155,77,19,75,37,73,145,143,141,35,138,137,135,67,33,131,129,255,63,250,247,61,121,239,237,117,29,229,227,225,111,55,109,216,213,211,209,207,205,203,201,199,197,195,193,48,190,47,93,185,183,181,179,178,176,175,173,171,85,21,167,165,41,163,161,5,79,157,78,154,153,19,75,149,74,147,73,144,143,71,141,140,139,137,17,135,134,133,66,131,65,129,1],r=[0,9,10,10,14,12,14,14,16,15,16,15,16,15,15,17,18,17,12,18,16,17,17,19,19,18,19,18,18,19,19,19,20,19,20,20,20,20,20,20,15,20,19,20,20,20,21,21,21,20,20,20,21,18,21,21,21,21,20,21,17,21,21,21,22,22,21,22,22,21,22,21,19,22,22,19,20,22,22,21,21,21,22,22,22,18,22,22,21,22,22,23,22,20,23,22,22,23,23,21,19,21,21,21,23,23,23,22,23,23,21,23,22,23,18,22,23,20,22,23,23,23,21,22,20,22,21,22,24,24,24,24,24,22,21,24,23,23,24,21,24,23,24,22,24,24,22,24,24,22,23,24,24,24,20,23,22,23,24,24,24,24,24,24,24,23,21,23,22,23,24,24,24,22,24,24,24,23,22,24,24,25,23,25,25,23,24,25,25,24,22,25,25,25,24,23,24,25,25,25,25,25,25,25,25,25,25,25,25,23,25,23,24,25,25,25,25,25,25,25,25,25,24,22,25,25,23,25,25,20,24,25,24,25,25,22,24,25,24,25,24,25,25,24,25,25,25,25,22,25,25,25,24,25,24,25,18];function i(e,t,n,i,a,s,c){if(Number.isNaN(s)||s<1)return;s|=0,Number.isNaN(c)&&(c=1),(c|=0)>3&&(c=3),c<1&&(c=1);const l=e.getImageData(t,n,i,a),d=l.data;let u,m,h,f,p,v,g,Z,w,C,I,P,E=i-1,y=a-1,L=s+1,b=[],M=[],x=[],S=o[s],k=r[s],N=[],T=[];for(;c-- >0;){for(P=I=0,p=0;p<a;p++){for(u=d[P]*L,m=d[P+1]*L,h=d[P+2]*L,v=1;v<=s;v++)g=P+((v>E?E:v)<<2),u+=d[g++],m+=d[g++],h+=d[g++];for(f=0;f<i;f++)b[I]=u,M[I]=m,x[I]=h,0==p&&(N[f]=((g=f+L)<E?g:E)<<2,T[f]=(g=f-s)>0?g<<2:0),Z=P+N[f],w=P+T[f],u+=d[Z++]-d[w++],m+=d[Z++]-d[w++],h+=d[Z++]-d[w++],I++;P+=i<<2}for(f=0;f<i;f++){for(C=f,u=b[C]*L,m=M[C]*L,h=x[C]*L,v=1;v<=s;v++)C+=v>y?0:i,u+=b[C],m+=M[C],h+=x[C];for(I=f<<2,p=0;p<a;p++)d[I]=u*S>>>k,d[I+1]=m*S>>>k,d[I+2]=h*S>>>k,0==f&&(N[p]=((g=p+L)<y?g:y)*i,T[p]=(g=p-s)>0?g*i:0),Z=f+N[p],w=f+T[p],u+=b[Z]-b[w],m+=M[Z]-M[w],h+=x[Z]-x[w],I+=i<<2}}e.putImageData(l,t,n)}},98069:(e,t,n)=>{n.d(t,{In:()=>i,l_:()=>r,wT:()=>a});let o=0;function r(){o+=1}function i(){o-=1}function a(){return o>0}},87675:(e,t,n)=>{n.d(t,{Z:()=>a,n:()=>i});var o=n(601),r=n(82972);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:()=>o});const o=e=>{e.stopPropagation(),e.preventDefault()}},1911:(e,t,n)=>{function o(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)}}n.d(t,{Z:()=>o})}}]);
|
|
//# sourceMappingURL=6599.f7992cf566eb2fde2658.js.map
|