TelegramPWA/dist/4765.035992b805f49110fb3b.js
Alexander Zinchuk 6fd1d0c598 [Build]
2025-09-19 14:39:00 +02:00

2 lines
38 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[4765],{283:(e,n,t)=>{t.d(n,{A:()=>l});var o=t(84051),i=t(87357);const a="AtWkrIxV";var r=t(20021);const l=(0,o.ph)(()=>(0,r.FD)("div",{className:"Oob7moh7",children:[(0,r.Y)("div",{className:(0,i.A)("ao0o6F_1",a)}),(0,r.FD)("div",{className:"e94nYlC4",children:[(0,r.Y)("div",{className:(0,i.A)("ANs9RCJu",a)}),(0,r.Y)("div",{className:(0,i.A)("RSn3O5Rx",a)})]})]}))},629:(e,n,t)=>{t.d(n,{A:()=>l});var o=t(84051),i=t(87357);const a={root:"eGD1rubd",widget:"EXXsQxeq",min:"C4vXj96y",mid:"nRNm3LRD",max:"LdztzMx0",filler:"kudEBJOk"};var r=t(20021);const l=(0,o.ph)(function(e){let{value:n}=e;return(0,r.FD)("div",{className:(0,i.A)(a.root,"Toggle"),"aria-hidden":!0,children:[(0,r.Y)("i",{className:(0,i.A)(a.filler,a[n])}),(0,r.Y)("i",{className:(0,i.A)(a.widget,a[n])})]})})},1087:(e,n,t)=>{t.d(n,{A:()=>s});var o=t(84051),i=t(87357),a=t(17712),r=t(24956),l=t(20021);const s=(0,o.ph)(e=>{let{id:n,name:t,options:s,selected:c,disabled:d,loadingOption:u,onChange:h,onClickAction:m,subLabelClassName:v,isLink:A,withIcon:g,subLabel:p,className:b}=e;const f=(0,o.hb)(e=>{const{value:n}=e.currentTarget;h(n,e)},[h]),C=(0,a.A)(e=>()=>{m?.(e)});return(0,l.Y)("div",{id:n,className:(0,i.A)("radio-group",b),children:s.map(e=>(0,l.Y)(r.A,{name:t,label:e.label,subLabel:p||e.subLabel,subLabelClassName:v,value:e.value,checked:e.value===c,hidden:e.hidden,isCanCheckedInDisabled:e.isCanCheckedInDisabled,disabled:d,withIcon:g,isLoading:u?u===e.value:void 0,className:e.className,onChange:f,onSubLabelClick:C(e.value),isLink:A}))})})},11124:(e,n,t)=>{t.d(n,{A:()=>r});var o=t(84051),i=t(87357);var a=t(20021);const r=(0,o.ph)(e=>{let{marks:n,onChange:t,rangeCount:r}=e;const l=(0,o.li)(),s=(0,o.Kr)(()=>n.indexOf(r),[n,r]),c=(0,o.Kr)(()=>n.indexOf(r).toString(),[n,r]);return(0,o.Nf)(()=>{if(l.current){const e=s/(n.length-1)*100,t=e/2;l.current.style.setProperty("--fill-percentage",`${e}%`),l.current.style.setProperty("--thumb-offset",`${t}%`)}},[s,n]),(0,a.Y)("div",{className:"s8NMMSES",children:(0,a.Y)("form",{children:(0,a.FD)("div",{className:"i_wrxmyh",children:[(0,a.Y)("div",{className:"O7SI4r_Y",children:n.map((e,n)=>{const t=n<=s;return(0,a.Y)("div",{className:(0,i.A)("b6UDc3zh",t?"VELPJsJ0":"K8NtimIi")},e)})}),(0,a.Y)("div",{className:"bVlnaLCI",children:n.map(e=>(0,a.Y)("div",{className:(0,i.A)("AFFaq4eZ",r===e&&"cuogxYPG"),children:e},e))}),(0,a.Y)("input",{ref:l,type:"range",className:"H_rMZrqn",min:"0",max:n.length-1,value:c,onChange:e=>{const o=parseInt(e.target.value,10),i=n[o];t(i)},step:"1"})]})})})})},12933:(e,n,t)=>{t.d(n,{A:()=>l});var o=t(87357),i=t(59030),a=t(64493),r=t(20021);const l=e=>{let{isShown:n,className:t,color:l="primary",ariaLabel:s,disabled:c,onClick:d,children:u}=e;const h=(0,i.A)(),m=(0,o.A)("FloatingActionButton",n&&"revealed",t);return(0,r.Y)(a.A,{className:m,color:l,round:!0,disabled:c,onClick:n&&!c?d:void 0,ariaLabel:s,tabIndex:-1,isRtl:h.isRtl,children:u})}},17208:(e,n,t)=>{t.d(n,{A:()=>D});var o=t(84051),i=t(13439),a=t(83649),r=t(31481),l=t(87357),s=t(11778),c=t(76023),d=t(4961),u=t(39351),h=t(17712),m=t(50680),v=t(87412),A=t(18276),g=t(9267),p=t(64493),b=t(3325),f=t(17663),C=t(32625),N=t(59030),w=t(68292);const y={root:"eldglPwL",svg:"xhUfxjkV",circle:"hsaty2zA"};var x=t(20021);const k=(0,o.ph)(e=>{let{duration:n,className:t,onEnd:i}=e;const[a,r]=(0,o.J0)(n),s=(0,N.A)();return(0,C.A)(()=>r(e=>e-1),a>0?1e3:void 0),(0,o.vJ)(()=>{a<=0&&i?.()},[a,i]),(0,o.vJ)(()=>{r(n)},[n]),(0,x.FD)("div",{className:(0,l.A)(y.root,t),children:[(0,x.Y)("svg",{className:y.svg,width:"32px",height:"32px",children:(0,x.Y)("circle",{cx:"16",cy:"16",r:14,transform:"rotate(-90, 16, 16)",pathLength:"100","stroke-dasharray":"100","stroke-dashoffset":100-(a-1)/n*100,className:y.circle})}),(0,x.Y)(w.A,{className:y.text,text:(0,f.dq)(s,1e3*a)})]})}),Y=3e3,L=1.75*c.$,D=e=>{let{notification:n}=e;const t=(0,i.ko)(),c=(0,u.A)(),{localId:f,message:C,action:N,actionText:w,cacheBreaker:y,className:D,disableClickDismiss:E,dismissAction:S,duration:T=Y,icon:B,shouldUseCustomIcon:M,customEmojiIconId:F,shouldShowTimer:R,title:I,containerSelector:O}=n,[K,P]=(0,o.J0)(!0),J=(0,o.li)(),{transitionClassNames:$}=(0,m.A)(K),U=(0,h.A)(()=>{t.dismissNotification({localId:f})}),q=(0,h.A)(e=>{!e&&E||(P(!1),setTimeout(U,150+r.xB5),S&&t[S.action](S.payload))}),z=(0,h.A)(()=>{N&&(Array.isArray(N)?N.forEach(e=>t[e.action](e.payload)):t[N.action](N.payload)),E&&(P(!1),setTimeout(U,150+r.xB5)),q()}),_=(0,h.A)(()=>{N&&(Array.isArray(N)?N.forEach(e=>t[e.action](e.payload)):t[N.action](N.payload)),q()});(0,o.vJ)(()=>K?(0,s.A)(q):void 0,[K,q]),(0,o.vJ)(()=>(J.current=window.setTimeout(()=>q(!0),T),()=>{J.current&&(clearTimeout(J.current),J.current=void 0)}),[T,y]);const H=(0,h.A)(()=>{E||J.current&&(clearTimeout(J.current),J.current=void 0)}),W=(0,h.A)(()=>{E||(J.current&&clearTimeout(J.current),J.current=window.setTimeout(q,T))}),j=(0,o.Kr)(()=>{if(I)return(0,a.Yw)(I)?c.with(I):(0,d.A)(I,["simple_markdown","emoji","br","links"])},[c,I]),Q=(0,o.Kr)(()=>(0,a.Yw)(C)?c.with(C):"string"==typeof C?(0,d.A)(C,["simple_markdown","emoji","br","links"]):C,[c,C]),V=(0,o.Kr)(()=>{if(w)return(0,a.Yw)(w)?c.with(w):w},[c,w]),G=(0,o.Kr)(()=>F?(0,x.Y)(v.A,{className:"notification-emoji-icon",forceAlways:!0,size:L,documentId:F}):M&&"star"===B?(0,x.Y)(g.A,{type:"gold",className:(0,l.A)("notification-icon"),size:"adaptive"}):(0,x.Y)(A.A,{name:B||"info-filled",className:"notification-icon"}),[F,B,M]);return(0,x.Y)(b.A,{className:"Notification-container",containerSelector:O,children:(0,x.FD)("div",{className:(0,l.A)("Notification",$,D),onClick:_,onMouseEnter:H,onMouseLeave:W,children:[G,(0,x.FD)("div",{className:"content",children:[Boolean(j)&&(0,x.Y)("div",{className:"notification-title",children:j}),Q]}),Boolean(V)&&(0,x.Y)(p.A,{color:"translucent-white",onClick:z,className:"notification-button",children:V}),R&&(0,x.Y)(k,{className:"notification-timer",duration:Math.ceil(T/1e3)},y)]})})}},22337:(e,n,t)=>{t.d(n,{U:()=>Y,A:()=>L});var o=t(84051),i=t(87357),a=t(52674),r=t(14680),l=t(91034),s=t(29441),c=t(26072),d=t(17712),u=t(37859),h=t(59030),m=t(34201),v=t(18276),A=t(64493),g=t(13439),p=t(86046),b=t(17142),f=t(48775),C=t(39351),N=t(96530);const w="w919CqtI";var y=t(20021);const x=(0,o.ph)((0,g.EK)(e=>{const{stars:n,ton:t}=e;return{starBalance:n?.balance,tonBalance:t?.balance,tonUsdRate:e.appConfig.tonUsdRate}})(function(e){let{starBalance:n,tonBalance:t,tonUsdRate:o,isModalOpen:a,currency:r,onCloseAnimationEnd:l}=e;const{openStarsBalanceModal:s}=(0,g.ko)(),c=(0,C.A)(),u="TON"===r,h=u?t:n,v=!!a&&Boolean(h),{ref:A,shouldRender:x}=(0,m.A)({isOpen:v,onCloseAnimationEnd:l,withShouldRender:!0}),k=(0,d.A)(()=>{s(u?{currency:"TON"}:{})});if(x&&h)return(0,y.FD)("div",{className:(0,i.A)("UtvP6LQ2"),ref:A,children:[(0,y.Y)("div",{children:c("ModalStarsBalanceBarDescription",u?{stars:(0,f.Ms)(c,(0,b.wD)(h.amount),{className:w})}:{stars:(0,f.U2)(c,(0,p.ZF)(c,h),{className:w})},{withNodes:!0,withMarkdown:!0})}),(0,y.FD)("div",{children:[u&&Boolean(o)&&(0,y.Y)("div",{className:"VMKBAQXy",style:"color: var(--color-text-secondary)",children:`${(0,b.Ad)((0,b.C)(h.amount,o,!0),"USD",c.code)}`}),!u&&(0,y.Y)(N.A,{isPrimary:!0,onClick:k,children:c("GetMoreStarsLinkText")})]})]})}));var k=t(3325);const Y=200,L=(0,l.A)(e=>{let{dialogRef:n,title:t,className:l,contentClassName:g,headerClassName:p,isOpen:b,isSlim:f,header:C,hasCloseButton:N,hasAbsoluteCloseButton:w,absoluteCloseButtonColor:L="translucent",noBackdrop:D,noBackdropClose:E,children:S,style:T,dialogStyle:B,isLowStackPriority:M,dialogContent:F,onClose:R,onCloseAnimationEnd:I,onEnter:O,withBalanceBar:K,isCondensedHeader:P,currencyInBalanceBar:J="XTR"}=e;const{ref:$,shouldRender:U}=(0,m.A)({isOpen:b,onCloseAnimationEnd:I,withShouldRender:!0}),q=N||w;(0,o.vJ)(()=>{if(b)return(0,r.FD)(),r.wb},[b]);const z=(0,d.A)(e=>!!O&&(e.preventDefault(),O(),!0));(0,o.vJ)(()=>b?(0,a.A)({onEsc:R,onEnter:z}):void 0,[b,R,z]),(0,o.vJ)(()=>b&&$.current?(0,s.A)($.current):void 0,[b,$]),(0,c.A)({isActive:b,onBack:R}),(0,u.A)(e=>{let[n]=e;return document.body.classList.toggle("has-open-dialog",Boolean(b)),(b||!b&&void 0!==n)&&(0,o.VK)(Y),()=>{document.body.classList.remove("has-open-dialog")}},[b]);const _=(0,h.A)();if(!U)return;const H=(0,i.A)("Modal",l,D&&"transparent-backdrop",f&&"slim",M&&"low-priority",K&&"with-balance-bar");return(0,y.Y)(k.A,{children:(0,y.FD)("div",{ref:$,className:H,tabIndex:-1,role:"dialog",children:[K&&(0,y.Y)(x,{isModalOpen:b,currency:J}),(0,y.FD)("div",{className:"modal-container",children:[(0,y.Y)("div",{className:"modal-backdrop",onClick:E?void 0:R}),(0,y.FD)("div",{className:"modal-dialog",ref:n,style:B,children:[function(){if(C)return C;if(!t&&!q)return;const e=(0,y.Y)(A.A,{className:(0,i.A)(w&&"modal-absolute-close-button"),round:!0,color:L,size:"smaller",ariaLabel:_("Close"),onClick:R,children:(0,y.Y)(v.A,{name:"close"})});return w?e:(0,y.FD)("div",{className:(0,i.A)("modal-header",p,P&&"modal-header-condensed"),children:[q&&e,(0,y.Y)("div",{className:"modal-title",children:t})]})}(),F,(0,y.Y)("div",{className:(0,i.A)("modal-content custom-scroll",g),style:T,children:S})]})]})]})})})},22720:(e,n,t)=>{t.d(n,{A:()=>C});var o=t(84051),i=t(66644),a=t(96454),r=t(87357),l=t(4961),s=t(10722),c=t(11217),d=t(37661),u=t(17712),h=t(59030),m=t(18276),v=t(64493),A=t(71429),g=t(24433),p=t(60859),b=t(42452),f=t(20021);const C=e=>{let{ref:n,buttonRef:t,icon:C,iconClassName:N,leftElement:w,buttonClassName:y,menuBubbleClassName:x,secondaryIcon:k,secondaryIconClassName:Y,rightElement:L,className:D,style:E,children:S,disabled:T,allowDisabledClick:B,ripple:M,narrow:F,inactive:R,focus:I,destructive:O,withPrimaryColor:K,multiline:P,isStatic:J,allowSelection:$,withColorTransition:U,contextActions:q,withPortalForMenu:z,href:_,onMouseDown:H,onClick:W,onContextMenu:j,clickArg:Q,onSecondaryIconClick:V,onDragEnter:G,nonInteractive:X}=e,Z=(0,o.li)();n&&(Z=n);const[ee,ne,te]=(0,d.A)(),{isContextMenuOpen:oe,contextMenuAnchor:ie,handleBeforeContextMenu:ae,handleContextMenu:re,handleContextMenuClose:le,handleContextMenuHide:se}=(0,s.A)(Z,!q),ce=(0,u.A)(()=>Z.current),de=(0,u.A)(()=>Z.current.closest(".custom-scroll")),ue=(0,u.A)(()=>(z?document.querySelector("#portals"):Z.current).querySelector(".ListItem-context-menu .bubble")),he=(0,u.A)(()=>({withPortal:z})),me=(0,u.A)(e=>{if(!(e.ctrlKey||e.metaKey||e.shiftKey)&&e.button===a.w3.Main){if(_&&!W)return;e.preventDefault()}}),ve=(0,u.A)(e=>{if(!T||B){if(_){if((e.ctrlKey||e.metaKey||e.shiftKey)&&e.button===a.w3.Main||e.button===a.w3.Auxiliary)return;W&&e.preventDefault()}W&&(W(e,Q),a.TF&&!M&&(ne(),(0,i.YS)(te)))}}),{handleClick:Ae,handleMouseDown:ge}=(0,c.Q)(e=>{T&&!B||0!==e.button||!V&&!q||(e.stopPropagation(),V?V(e):re(e))}),pe=(0,u.A)(e=>{R||a.TF||(!q||e.button!==a.w3.Secondary&&W||ae(e),e.button===a.w3.Main&&(W?ve(e):re(e)))}),be=(0,h.A)(),fe=(0,r.A)("ListItem",D,$&&"allow-selection",M&&"has-ripple",F&&"narrow",T&&"disabled",B&&"click-allowed",R&&"inactive",ie&&"has-menu-open",I&&"focus",O&&"destructive",K&&"primary",P&&"multiline",J&&"is-static",U&&"with-color-transition"),Ce=_?"a":"div";return(0,f.FD)("div",{ref:Z,className:fe,dir:be.isRtl?"rtl":void 0,style:E,onMouseDown:H,onDragEnter:G,children:[(0,f.FD)(Ce,{className:(0,r.A)("ListItem-button",ee&&"active",y),role:J||_?void 0:"button",href:_,ref:t,rel:_?"noopener noreferrer":void 0,tabIndex:J?void 0:0,onClick:!R&&a.TF?ve:me,onMouseDown:pe,onContextMenu:j||(!R&&q?re:void 0),"aria-disabled":T||void 0,children:[!T&&!R&&M&&(0,f.Y)(b.A,{}),w,C&&(0,f.Y)(m.A,{name:C,className:(0,r.A)("ListItem-main-icon",N)}),P&&(0,f.Y)("div",{className:"multiline-item",children:S}),!P&&S,k&&(0,f.Y)(v.A,{nonInteractive:X,className:(0,r.A)("secondary-icon",Y),round:!0,color:"translucent",size:"smaller",onClick:Ae,onMouseDown:ge,children:(0,f.Y)(m.A,{name:k})}),L]}),q&&void 0!==ie&&(0,f.Y)(A.A,{isOpen:oe,anchor:ie,getTriggerElement:ce,getRootElement:de,getMenuElement:ue,getLayout:he,className:"ListItem-context-menu with-menu-transitions",autoClose:!0,onClose:le,onCloseAnimationEnd:se,withPortal:z,bubbleClassName:x,children:q.map(e=>"isSeparator"in e?(0,f.Y)(p.A,{},e.key||"separator"):(0,f.Y)(g.A,{icon:e.icon,destructive:e.destructive,disabled:!e.handler,onClick:e.handler,children:(0,f.Y)("span",{className:"list-item-ellipsis",children:(0,l.A)(e.title)})},e.title))})]})}},24680:(e,n,t)=>{t.d(n,{A:()=>m});var o=t(84051),i=t(57446),a=t(96454),r=t(87357),l=t(36838),s=t(59030),c=t(73767),d=t(34132),u=t(20021);const h=a.pz?450:a.Ni?400:300,m=(0,o.ph)(e=>{let{tabs:n,activeTab:t,onSwitchTab:a,contextRootElementSelector:m,className:v,tabClassName:A}=e;const g=(0,o.li)(),p=(0,c.A)(t);(0,l.A)(g,void 0,!0),(0,o.vJ)(()=>{const e=g.current,{scrollWidth:n,offsetWidth:o,scrollLeft:a}=e;if(n<=o)return;const r=e.childNodes[t];if(!r)return;const{offsetLeft:l,offsetWidth:s}=r,c=l-o/2+s/2;Math.abs(c-a)<16||(0,i.A)(e,c,h)},[t]);const b=(0,s.A)();return(0,u.Y)("div",{className:(0,r.A)("TabList","no-scrollbar",v),ref:g,dir:b.isRtl?"rtl":void 0,children:n.map((e,n)=>(0,u.Y)(d.A,{title:e.title,isActive:n===t,isBlocked:e.isBlocked,badgeCount:e.badgeCount,isBadgeActive:e.isBadgeActive,previousActiveTab:p,onClick:a,clickArg:n,contextActions:e.contextActions,contextRootElementSelector:m,className:A},e.id))})})},24713:(e,n,t)=>{t.d(n,{A:()=>s});var o=t(84051),i=t(87357),a=t(68292),r=t(26607);var l=t(20021);const s=(0,o.ph)(e=>{let{text:n,className:t,isAlternateColor:o}=e;return(0,l.Y)(r.A,{className:(0,i.A)("Y3ZoW17O",o?"Lq67O2D2":"DWjOG2Ze",t),isOpen:Boolean(n),children:n&&(0,l.Y)(a.A,{text:n})})})},24956:(e,n,t)=>{t.d(n,{A:()=>s});var o=t(84051),i=t(87357),a=t(59030),r=t(57474),l=t(20021);const s=(0,o.ph)(e=>{let{id:n,label:t,subLabel:o,subLabelClassName:s,value:c,name:d,checked:u,disabled:h,hidden:m,isLoading:v,className:A,onlyInput:g,withIcon:p,isLink:b,onChange:f,onSubLabelClick:C,isCanCheckedInDisabled:N}=e;const w=(0,a.A)(),y=(0,i.A)("Radio",A,h&&"disabled",m&&"hidden-widget",p&&"with-icon",v&&"loading",g&&"onlyInput",Boolean(o)&&"withSubLabel",N&&"canCheckedInDisabled");return(0,l.FD)("label",{className:y,dir:w.isRtl?"rtl":void 0,children:[(0,l.Y)("input",{type:"radio",name:d,value:c,id:n,checked:u,onChange:f,disabled:h||m}),(0,l.FD)("div",{className:"Radio-main",children:[(0,l.Y)("span",{className:"label",dir:w.isRtl?"auto":void 0,children:t}),Boolean(o)&&(0,l.Y)("span",{className:(0,i.A)(s,"subLabel",b?"subLabelLink":void 0),dir:w.isRtl?"auto":void 0,onClick:b?C:void 0,children:o})]}),v&&(0,l.Y)(r.A,{})]})})},26607:(e,n,t)=>{t.d(n,{A:()=>l});var o=t(84051),i=t(73767),a=t(34201),r=t(20021);const l=e=>{let{isOpen:n,isHidden:t,isCustom:l,id:s,className:c,onClick:d,children:u,noCloseTransition:h,shouldAnimateFirstRender:m,style:v,ref:A}=e;const g=(0,i.A)(n),p=(0,i.A)(u),b=(0,o.li)(),f=void 0===g,{ref:C,shouldRender:N}=(0,a.A)({isOpen:n&&!t,ref:A,noMountTransition:f&&!m,className:!l&&void 0,noCloseTransition:h,withShouldRender:!0});return g&&!n&&(b.current=p),(N||t)&&(0,r.Y)("div",{id:s,ref:C,className:c,onClick:d,style:v,children:n?u:b.current})}},32581:(e,n,t)=>{t.d(n,{A:()=>r});var o=t(87357),i=t(59030);var a=t(20021);const r=function(e){let{children:n,className:t}=e;const r=(0,i.A)();return(0,a.Y)("div",{dir:r.isRtl?"rtl":void 0,className:(0,o.A)("LxlpQKLr",t),children:n})}},34132:(e,n,t)=>{t.d(n,{A:()=>b});var o=t(84051),i=t(66644),a=t(96454),r=t(87357),l=t(41402),s=t(4961),c=t(10722),d=t(11217),u=t(17712),h=t(18276),m=t(71429),v=t(24433),A=t(60859),g=t(20021);const p="Tab--active",b=e=>{let{className:n,title:t,isActive:b,isBlocked:f,badgeCount:C,isBadgeActive:N,previousActiveTab:w,onClick:y,clickArg:x,contextActions:k,contextRootElementSelector:Y}=e;const L=(0,o.li)();(0,o.Nf)(()=>{b&&void 0===w&&L.current&&L.current.classList.add(p)},[b,w]),(0,o.vJ)(()=>{if(!b||void 0===w)return;const e=L.current,n=e.parentElement.children[w];if(!n)return void(b&&!e.classList.contains(p)&&(0,i.RK)(()=>{e.classList.add(p)}));const t=e.querySelector(".platform"),o=n.querySelector(".platform"),a=o.parentElement.offsetLeft-t.parentElement.offsetLeft,r=o.clientWidth/t.clientWidth;(0,i.RK)(()=>{o.classList.remove("animate"),t.classList.remove("animate"),t.style.transform=`translate3d(${a}px, 0, 0) scale3d(${r}, 1, 1)`,(0,i.gm)(()=>((0,l.A)(t),()=>{t.classList.add("animate"),t.style.transform="none",n.classList.remove(p),e.classList.add(p)}))})},[b,w]);const{contextMenuAnchor:D,handleContextMenu:E,handleBeforeContextMenu:S,handleContextMenuClose:T,handleContextMenuHide:B,isContextMenuOpen:M}=(0,c.A)(L,!k),{handleClick:F,handleMouseDown:R}=(0,d.Q)(e=>{!k||e.button!==a.w3.Secondary&&y||S(e),"mousedown"===e.type&&e.button!==a.w3.Main||y?.(x)}),I=(0,u.A)(()=>L.current),O=(0,u.A)(()=>Y?L.current.closest(Y):document.body),K=(0,u.A)(()=>document.querySelector("#portals").querySelector(".Tab-context-menu .bubble")),P=(0,u.A)(()=>({withPortal:!0}));return(0,g.FD)("div",{className:(0,r.A)("Tab",y&&"Tab--interactive",n),onClick:F,onMouseDown:R,onContextMenu:E,ref:L,children:[(0,g.FD)("span",{className:"Tab_inner",children:["string"==typeof t?(0,s.A)(t):t,Boolean(C)&&(0,g.Y)("span",{className:(0,r.A)("badge",N&&"Tab__badge--active"),children:C}),f&&(0,g.Y)(h.A,{name:"lock-badge",className:"blocked"}),(0,g.Y)("i",{className:"platform"})]}),k&&void 0!==D&&(0,g.Y)(m.A,{isOpen:M,anchor:D,getTriggerElement:I,getRootElement:O,getMenuElement:K,getLayout:P,className:"Tab-context-menu",autoClose:!0,onClose:T,onCloseAnimationEnd:B,withPortal:!0,children:k.map(e=>"isSeparator"in e?(0,g.Y)(A.A,{},e.key||"separator"):(0,g.Y)(v.A,{icon:e.icon,destructive:e.destructive,disabled:!e.handler,onClick:e.handler,children:e.title},e.title))})]})}},35913:(e,n,t)=>{t.d(n,{A:()=>v});var o=t(84051),i=t(66644),a=t(19822),r=t(87357),l=t(87094),s=t(41257),c=t(38691),d=t(18276),u=t(20021);const h={s:42,m:48,l:54,xl:52},m=.05,v=(0,o.ph)(e=>{let{progress:n=0,size:t="l",square:v,transparent:A,noCross:g,rotationOffset:p,withColor:b,onClick:f}=e;const C=(0,o.li)(),N=h[t],w=(0,s.i)(n),y=(0,c.A)(),x=(0,l.A)(C,void 0,!b);(0,o.vJ)(()=>{let e,n,o=!0,r=m;(0,a.i0)(()=>{if(!C.current)return!1;w.current!==n&&(r=Math.min(Math.max(m,n||0),1),e=Date.now(),n=w.current);const i=Math.min(Math.max(m,w.current),1),l=Math.min(1,(Date.now()-e)/600),s=a.qM.easeOutQuad(l),c=r+(i-r)*s;return function(e,n,t,o,i,a){let r=arguments.length>6&&void 0!==arguments[6]&&arguments[6];const l=n/2,s=(n-t)/2-2*a,c=(arguments.length>7?arguments[7]:void 0)??Date.now()%2e3/2e3,d=2*Math.PI*c,u=d+2*Math.PI*i,h=e.getContext("2d");r&&(e.width=n,e.height=n,h.lineCap="round",h.strokeStyle=o,h.lineWidth=t),h.clearRect(0,0,n,n),h.beginPath(),h.arc(l,l,s,d,u),h.stroke()}(C.current,N*y,("xl"===t?3:2)*y,x??"white",c,y,o,p),o=!1,c<1},i.RK)},[w,t,N,y,p,x]);const k=(0,r.A)(`ProgressSpinner size-${t}`,A&&"transparent",v&&"square",g&&"no-cross");return(0,u.FD)("div",{className:k,onClick:f,children:[!g&&(0,u.Y)(d.A,{name:"close"}),(0,u.Y)("canvas",{ref:C,className:"ProgressSpinner_canvas",style:`width: ${N}; height: ${N}px;`})]})})},36393:(e,n,t)=>{t.d(n,{A:()=>g});var o=t(84051),i=t(63495),a=t(87357),r=t(37661),l=t(79174),s=t(39351),c=t(17712),d=t(59030),u=t(18276),h=t(64493),m=t(52745),v=t(41036),A=t(20021);const g=(0,o.ph)(e=>{let{ref:n,children:t,resultsItemSelector:g,value:p,inputId:b,className:f,focused:C,isLoading:N=!1,spinnerColor:w,spinnerBackgroundColor:y,placeholder:x,disabled:k,autoComplete:Y,canClose:L,autoFocusSearch:D,hasUpButton:E,hasDownButton:S,teactExperimentControlled:T,withBackIcon:B,onChange:M,onStartBackspace:F,onReset:R,onFocus:I,onBlur:O,onClick:K,onUpClick:P,onDownClick:J,onSpinnerClick:$,onEnter:U}=e,q=(0,o.li)();n&&(q=n);const[z,_,H]=(0,r.A)(C);(0,l.A)(q,D,H),(0,o.vJ)(()=>{q.current&&(C?q.current.focus():q.current.blur())},[C,x]);const W=(0,d.A)(),j=(0,s.A)();function Q(){_(),I?.()}const V=(0,c.A)(e=>{if("Enter"===e.key){if(U)return e.preventDefault(),void U();if(g){const e=document.querySelector(g);e&&e.focus()}}if(g&&"ArrowDown"===e.key){const e=document.querySelector(g);e&&e.focus()}"Backspace"===e.key&&0===e.currentTarget.selectionStart&&0===e.currentTarget.selectionEnd&&F?.()});return(0,A.FD)("div",{className:(0,a.A)("SearchInput",f,z&&"has-focus"),onClick:K,dir:W.isRtl?"rtl":void 0,children:[(0,A.Y)(v.Ay,{name:"fade",shouldCleanup:!0,activeKey:Number(!N&&!B),className:"icon-container-left",slideClassName:"icon-container-slide",children:N&&!B?(0,A.Y)(m.A,{color:w,backgroundColor:y,onClick:$}):B?(0,A.Y)(u.A,{name:"arrow-left",className:"back-icon",onClick:R}):(0,A.Y)(u.A,{name:"search",className:"search-icon"})}),(0,A.Y)("div",{children:t}),(0,A.Y)("input",{ref:q,id:b,type:"text",dir:"auto",placeholder:x||W("Search"),className:"form-control",value:p,disabled:k,autoComplete:Y,spellCheck:!i.Vq&&void 0,onChange:function(e){const{currentTarget:n}=e;M(n.value),z||Q()},onFocus:Q,onBlur:function(){H(),O?.()},onKeyDown:V,teactExperimentControlled:T}),E&&(0,A.Y)(h.A,{round:!0,size:"tiny",color:"translucent",onClick:P,disabled:!P,ariaLabel:j("AriaSearchOlderResult"),children:(0,A.Y)(u.A,{name:"up"})}),S&&(0,A.Y)(h.A,{round:!0,size:"tiny",color:"translucent",onClick:J,disabled:!J,ariaLabel:j("AriaSearchNewerResult"),children:(0,A.Y)(u.A,{name:"down"})}),(0,A.Y)(v.Ay,{name:"fade",shouldCleanup:!0,activeKey:Number(N),className:"icon-container-right",slideClassName:"icon-container-slide",children:B&&N?(0,A.Y)(m.A,{color:w,backgroundColor:y,onClick:$}):(p||L)&&R&&(0,A.Y)(h.A,{round:!0,size:"tiny",color:"translucent",onClick:R,children:(0,A.Y)(u.A,{name:"close"})})})]})})},43434:(e,n,t)=>{t.d(n,{A:()=>c});var o=t(84051),i=t(87357),a=t(39351),r=t(18276),l=t(90751),s=t(20021);const c=(0,o.ph)(e=>{let{title:n,disabled:t,isForForum:c,currentAvatarBlobUrl:d,onChange:u}=e;const[h,m]=(0,o.J0)(),[v,A]=(0,o.J0)(d),g=(0,a.A)();(0,o.vJ)(()=>{A(d)},[d]);const p=(0,o.hb)(e=>{m(void 0),u(e),v&&v!==d&&URL.revokeObjectURL(v),A(URL.createObjectURL(e))},[v,d,u]),b=(0,o.hb)(()=>{m(void 0)},[]),f=(0,i.A)(v&&"filled",t&&"disabled",c&&"rounded-square");return(0,s.FD)("div",{className:"AvatarEditable",children:[(0,s.FD)("label",{className:f,role:"button",tabIndex:0,title:n||g("ChangeYourProfilePicture"),children:[(0,s.Y)("input",{type:"file",onChange:function(e){const n=e.target;n?.files?.[0]&&(m(n.files[0]),n.value="")},accept:"image/png, image/jpeg"}),(0,s.Y)(r.A,{name:"camera-add"}),v&&(0,s.Y)("img",{src:v,draggable:!1,alt:""})]}),(0,s.Y)(l.A,{file:h,onClose:b,onChange:p})]})})},46222:(e,n,t)=>{t.d(n,{A:()=>A});var o=t(84051),i=t(89925),a=t(66644),r=t(96454),l=t(95807),s=t(9718),c=t(37836),d=t(17712),u=t(20021);const h=".ListItem",m=20,v=800,A=e=>{let{ref:n,style:t,className:A,items:g,itemSelector:p=h,preloadBackwards:b=m,sensitiveArea:f=v,withAbsolutePositioning:C,maxHeight:N,noScrollRestore:w=!1,noScrollRestoreOnTop:y=!1,noFastList:x,cacheBuster:k,beforeChildren:Y,children:L,scrollContainerClosest:D,onLoadMore:E,onScroll:S,onWheel:T,onClick:B,onKeyDown:M,onDragOver:F,onDragLeave:R}=e,I=(0,o.li)();n&&(I=n);const O=(0,o.li)({}),[K,P]=(0,o.Kr)(()=>E?[(0,c.sg)(function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];E({direction:i.TN.Backwards,noScroll:e})},1e3,!0,!1),(0,c.sg)(()=>{E({direction:i.TN.Forwards})},1e3,!0,!1)]:[],[E,g]);(0,o.vJ)(()=>{const e=D?I.current.closest(D):I.current;if(!K||!e)return;if(b>0&&(!g||g.length<b))return void K(!0);const{scrollHeight:n,clientHeight:t}=e;t&&n<t&&K()},[g,K,b,D]),(0,o.Nf)(()=>{const e=D?I.current.closest(D):I.current,n=I.current;(0,a.gm)(()=>{const t=O.current;let o;if(t.listItemElements=n.querySelectorAll(p),t.currentAnchor&&Array.from(t.listItemElements).includes(t.currentAnchor)){const{scrollTop:n}=e,i=t.currentAnchor.getBoundingClientRect().top;o=n+(i-t.currentAnchorTop)}else{const e=t.listItemElements[0];e&&(t.currentAnchor=e,t.currentAnchorTop=e.getBoundingClientRect().top)}if(C||w)return;const{scrollTop:i}=e;return y&&0===i?void 0:()=>{(0,s.A)(e,o),t.isScrollTopJustUpdated=!0}})},[g,p,w,y,k,C,D]);const J=(0,d.A)(e=>{if(P&&K){const{isScrollTopJustUpdated:e,currentAnchor:n,currentAnchorTop:t}=O.current,o=O.current.listItemElements;if(e)return void(O.current.isScrollTopJustUpdated=!1);const i=o.length,a=D?I.current.closest(D):I.current,{scrollTop:r,scrollHeight:l,offsetHeight:s}=a,c=r<=(i?o[0].offsetTop:0)+f,d=(i?o[i-1].offsetTop+o[i-1].offsetHeight:l)-(r+s)<=f;let u=!1;if(c){const e=o[0];if(e){const o=e.getBoundingClientRect().top,i=n?.offsetParent&&n!==e?n.getBoundingClientRect().top:o;n&&void 0!==t&&i>t&&(O.current.currentAnchor=e,O.current.currentAnchorTop=o,u=!0,P())}}if(d){const e=o[i-1];if(e){const o=e.getBoundingClientRect().top,i=n?.offsetParent&&n!==e?n.getBoundingClientRect().top:o;n&&void 0!==t&&i<t&&(O.current.currentAnchor=e,O.current.currentAnchorTop=o,u=!0,K())}}if(!u)if(n?.offsetParent)O.current.currentAnchorTop=n.getBoundingClientRect().top;else{const e=o[0];e&&(O.current.currentAnchor=e,O.current.currentAnchorTop=e.getBoundingClientRect().top)}}S&&S(e)});return(0,o.Nf)(()=>{const e=D?I.current.closest(D):I.current;if(!e)return;const n=e=>J(e);return e.addEventListener("scroll",n),()=>{e.removeEventListener("scroll",n)}},[J,D]),(0,u.FD)("div",{ref:I,className:A,onWheel:T,teactFastList:!x&&!C,onKeyDown:M,onDragOver:F,onDragLeave:R,onClick:B,style:t,children:[Y,C&&g?.length?(0,u.Y)("div",{teactFastList:!x,style:(0,l.A)("position: relative",r.Ni&&`height: ${N}px`),children:L}):L]})}},55158:(e,n,t)=>{t.d(n,{A:()=>r});var o=t(87357),i=t(95807),a=t(20021);const r=e=>{let{variant:n="rectangular",animation:t="wave",width:r,height:l,forceAspectRatio:s,inline:c,className:d}=e;const u=(0,o.A)("Skeleton",n,t,d,c&&"inline"),h=r&&l?`aspect-ratio: ${r}/${l}`:void 0,m=(0,i.A)(s&&h,Boolean(r)&&`width: ${r}px`,!s&&Boolean(l)&&`height: ${l}px`);return(0,a.Y)("div",{className:u,style:m,children:c&&" "})}},55573:(e,n,t)=>{t.d(n,{A:()=>l});var o=t(59030),i=t(18276),a=t(64493),r=t(20021);const l=e=>{let{count:n,itemName:t,itemPluralName:l,isLoading:s,onClick:c}=e;const d=(0,o.A)();return(0,r.FD)(a.A,{className:"ShowMoreButton",color:"translucent",isText:!0,isLoading:s,isRtl:d.isRtl,onClick:c,children:[(0,r.Y)(i.A,{name:"down"}),"Show"," ",n," ","more"," ",n>1?l||`${t}s`:t]})}},60859:(e,n,t)=>{t.d(n,{A:()=>r});var o=t(87357);const i={root:"h039vb1K",thin:"NGKaFgra",thick:"_BdnjPEa"};var a=t(20021);const r=e=>{let{className:n,size:t="thin"}=e;return(0,a.Y)("div",{className:(0,o.A)(i.root,i[t],n)})}},61361:(e,n,t)=>{t.d(n,{A:()=>h});var o=t(84051),i=t(17663),a=t(80140),r=t(32625),l=t(30857),s=t(39351),c=t(59030),d=t(68292),u=t(20021);const h=(0,o.ph)(e=>{let{langKey:n,endsAt:t,onEnd:h}=e;const m=(0,s.A)(),v=(0,c.A)(),A=(0,l.A)(),g=(0,a.Fm)(),p=g<t;if((0,r.A)(A,p?500:void 0),(0,o.vJ)(()=>{p||h?.()},[p,h]),!p)return;const b=t-g,f=(0,i.QO)(b),C=f.split(":"),N=(0,u.Y)("span",{style:"font-variant-numeric: tabular-nums;",children:C.map((e,n)=>(0,u.FD)(u.FK,{children:[n>0&&":",(0,u.Y)(d.A,{text:e},n)]}))});return"UnlockTimerPublicPostsSearch"===n?(0,u.Y)("span",{children:m(n,{time:N},{withNodes:!0})}):(0,u.Y)("span",{children:v(n,f)})})},63152:(e,n,t)=>{t.d(n,{A:()=>r});var o=t(84051),i=t(87357),a=t(20021);const r=(0,o.ph)(e=>{let{id:n,name:t,value:r,label:l,checked:s=!1,disabled:c,inactive:d,noAnimation:u,onChange:h,onCheck:m}=e;const v=(0,o.hb)(e=>{h&&h(e),m&&m(e.currentTarget.checked)},[h,m]),A=(0,i.A)("Switcher",c&&"disabled",d&&"inactive",u&&"no-animation");return(0,a.FD)("label",{className:A,title:l,children:[(0,a.Y)("input",{type:"checkbox",id:n,name:t,value:r,checked:s,disabled:c,onChange:v}),(0,a.Y)("span",{className:"widget"})]})})},63173:(e,n,t)=>{t.d(n,{A:()=>r});var o=t(84051),i=t(87357),a=t(20021);const r=(0,o.ph)(e=>{const{id:n,value:t,label:o,hasArrow:r,error:l,ref:s,tabIndex:c,onChange:d,children:u}=e,h=l||o,m=(0,i.A)("input-group",t&&"touched",l&&"error",h&&"with-label",r&&"with-arrow","input-group");return(0,a.FD)("div",{className:m,children:[(0,a.Y)("select",{className:"form-control",id:n,value:t||"",onChange:d,tabIndex:c,ref:s,children:u}),h&&n&&(0,a.Y)("label",{htmlFor:n,children:h})]})})},66469:(e,n,t)=>{t.d(n,{A:()=>d});var o=t(84051),i=t(96454),a=t(17712),r=t(64493),l=t(20021);let s,c=!0;const d=e=>{let{onActivate:n,...t}=e;const d=(0,o.li)(!1),u=(0,a.A)(e=>{if(d.current=!0,c)return c=!1,void n(e);s&&(clearTimeout(s),s=void 0),s=window.setTimeout(()=>{d.current&&n(e)},200)}),h=(0,a.A)(()=>{d.current=!1}),m=(0,a.A)(e=>{d.current=!0,n(e)});return(0,l.Y)(r.A,{...t,onMouseEnter:i.TF?void 0:u,onMouseLeave:i.TF?void 0:h,onClick:i.TF?m:n})}},77561:(e,n,t)=>{t.d(n,{A:()=>c});var o=t(84051),i=t(87357),a=t(87894),r=t(17712),l=t(19806),s=t(20021);const c=(0,o.ph)(e=>{let{id:n,options:t,selected:o,disabled:c,nestedCheckbox:d,loadingOptions:u,isRound:h,onChange:m,onClickLabel:v,className:A}=e;const g=(0,r.A)((e,n)=>{const{value:t,checked:i}=e.currentTarget;let r;i?(r=(0,a.Am)([...o,t]),n?.forEach(e=>{r.includes(e.value)||r.push(e.value)})):(r=o.filter(e=>e!==t),n&&(r=r.filter(e=>!n.some(n=>n.value===e)))),m(r)}),p=(0,r.A)(e=>{const n=e?.filter(e=>o.includes(e.value)).length;return n>0?n:e.length});return(0,s.Y)("div",{id:n,className:(0,i.A)("radio-group",A),children:t.map(e=>(0,s.Y)(l.A,{label:e.label,subLabel:e.subLabel,value:e.value,user:e.user,checked:-1!==o?.indexOf(e.value),disabled:e.disabled||c,isLoading:u?-1!==u.indexOf(e.value):void 0,onChange:g,onClickLabel:v,nestedCheckbox:d,nestedCheckboxCount:p(e.nestedOptions??[]),nestedOptionList:e.nestedOptions,values:o,isRound:h}))})})},80401:(e,n,t)=>{t.d(n,{A:()=>u});var o=t(84051),i=t(87357),a=t(95807),r=t(15640),l=t(59030),s=t(18276);var c=t(20021);const d={x:0,y:0},u=(0,o.ph)(e=>{let{children:n,id:t,onDrag:u,onDragEnd:h,style:m,knobStyle:v,isDisabled:A}=e;const g=(0,l.A)(),p=(0,o.li)(),[b,f]=(0,o.J0)({isDragging:!1,origin:d,translation:d}),C=e=>{e.stopPropagation(),e.preventDefault();const{x:n,y:t}=(0,r.A)(e);f({...b,isDragging:!0,origin:{x:n,y:t},width:p.current?.offsetWidth,height:p.current?.offsetHeight})},N=(0,o.hb)(e=>{const{x:n,y:o}=(0,r.A)(e),i={x:n-b.origin.x,y:o-b.origin.y};f(e=>({...e,translation:i})),u(i,t)},[t,u,b.origin.x,b.origin.y]),w=(0,o.hb)(()=>{f(e=>({...e,isDragging:!1,width:void 0,height:void 0})),h()},[h]);(0,o.vJ)(()=>{b.isDragging&&A&&f(e=>({...e,isDragging:!1,width:void 0,height:void 0}))},[A,b.isDragging]),(0,o.vJ)(()=>(b.isDragging?(window.addEventListener("touchmove",N),window.addEventListener("mousemove",N),window.addEventListener("touchend",w),window.addEventListener("touchcancel",w),window.addEventListener("mouseup",w)):(window.removeEventListener("touchmove",N),window.removeEventListener("mousemove",N),window.removeEventListener("touchend",w),window.removeEventListener("touchcancel",w),window.removeEventListener("mouseup",w),f(e=>({...e,translation:d}))),()=>{b.isDragging&&(window.removeEventListener("touchmove",N),window.removeEventListener("mousemove",N),window.removeEventListener("touchend",w),window.removeEventListener("touchcancel",w),window.removeEventListener("mouseup",w))}),[N,w,b.isDragging]);const y=(0,i.A)("kWQHzIMD",b.isDragging&&"k0c5WDAy"),x=(0,o.Kr)(()=>(0,a.A)(b.isDragging&&`transform: translate(${b.translation.x}px, ${b.translation.y}px)`,b.width?`width: ${b.width}px`:void 0,b.height?`height: ${b.height}px`:void 0,m),[m,b.height,b.isDragging,b.translation.x,b.translation.y,b.width]);return(0,c.FD)("div",{style:x,className:y,ref:p,children:[n,!A&&(0,c.Y)("div",{"aria-label":g("i18n_dragToSort"),tabIndex:0,role:"button",className:(0,i.A)("UpzQzcvs","div-button","draggable-knob"),onMouseDown:C,onTouchStart:C,style:v,children:(0,c.Y)(s.A,{name:"sort",className:"JIThxQAL"})})]})})},82497:(e,n,t)=>{t.d(n,{A:()=>l});var o=t(84051),i=t(87357),a=t(59030),r=t(20021);const l=(0,o.ph)(e=>{let{options:n,min:t=0,max:l=(n?n.length-1:100),step:s=1,label:c,value:d,disabled:u,readOnly:h,bold:m,className:v,renderValue:A,onChange:g,isCenteredLayout:p}=e;const b=(0,a.A)(),f=(0,o.hb)(e=>{g(Number(e.currentTarget.value))},[g]),C=(0,i.A)(v,"RangeSlider",u&&"disabled",h&&"readOnly",m&&"bold"),N=(0,o.Kr)(()=>n?d/(n.length-1)*100:(d-t)/((l-t)/s)*100,[n,d,l,t,s]);return(0,r.FD)("div",{className:C,children:[p?(0,r.Y)("div",{className:"slider-top-row",dir:b.isRtl?"rtl":void 0,children:!n&&(0,r.FD)(r.FK,{children:[(0,r.Y)("span",{className:"value-min",dir:"auto",children:t}),(0,r.Y)("span",{className:"label",dir:"auto",children:A?A(d):d}),(0,r.Y)("span",{className:"value-max",dir:"auto",children:l})]})}):c?(0,r.FD)("div",{className:"slider-top-row",dir:b.isRtl?"rtl":void 0,children:[(0,r.Y)("span",{className:"label",dir:"auto",children:c}),!n&&(0,r.Y)("span",{className:"value",dir:"auto",children:A?A(d):d})]}):void 0,(0,r.FD)("div",{className:"slider-main",children:[(0,r.Y)("div",{className:"slider-fill-track",style:`width: ${N}%`}),(0,r.Y)("input",{min:t,max:l,value:d,step:s,type:"range",className:"RangeSlider__input",onChange:f}),n&&(0,r.Y)("div",{className:"slider-options",children:n.map((e,n)=>(0,r.Y)("div",{className:(0,i.A)("slider-option",n===d&&"active"),onClick:()=>g(n),children:e}))})]})]})})},90751:(e,n,t)=>{t.d(n,{A:()=>N});var o=t(84051),i=t(101),a=t(39351),r=t(95807),l=t(15640),s=t(87679),c=t(43336),d=t(76023),u=t(17712),h=t(39751),m=t(18276),v=t(64493),A=t(82497);var g=t(20021);const p=.125*d.$,b=2*d.$,f=(0,o.ph)(e=>{let{onChange:n,image:t,maxOutputSize:i,minOutputSize:a}=e;const[d,f]=(0,o.J0)({x:0,y:0}),[C,N]=(0,o.J0)(100),w=(0,o.li)(!1),y=(0,o.li)({x:0,y:0}),x=(0,o.li)({x:0,y:0}),{width:k}=(0,h.A)(),Y=Math.min(400,k-2*b),L=t?Math.max(Y/t.width,Y/t.height):1,D=L*C/100,E=(0,o.Kr)(()=>t?{width:t.width*D,height:t.height*D}:{width:0,height:0},[t,D]),S=(e,n,t)=>{const o=Y/2,i=t.width/2,a=t.height/2,r=Math.max(0,i-o),l=Math.max(0,a-o);return{x:(0,c.qE)(e,-r,r),y:(0,c.qE)(n,-l,l)}},T=e=>{w.current=!0,y.current=(0,l.A)(e),x.current={...d},document.addEventListener("mousemove",B),document.addEventListener("touchmove",B),document.addEventListener("mouseup",M),document.addEventListener("touchend",M)},B=(0,u.A)(e=>{if("touches"in e&&e.touches.length>1)return;if(!w.current)return;const{x:n,y:t}=(0,l.A)(e),o=n-y.current.x,i=t-y.current.y,a=S(x.current.x+o,x.current.y+i,E);f(a)}),M=(0,u.A)(()=>{w.current=!1,document.removeEventListener("mousemove",B),document.removeEventListener("touchmove",B),document.removeEventListener("mouseup",M),document.removeEventListener("touchend",M)}),F=(0,u.A)(e=>{const n=L*e/100,o={width:t.width*n,height:t.height*n},i=e/C,a=S(d.x*i,d.y*i,o);N(e),f(a)});if(!t)return;const R=(Y-E.width)/2+d.x,I=(Y-E.height)/2+d.y,O=(0,r.A)(`width: ${E.width}px`,`height: ${E.height}px`,`left: ${R}px`,`top: ${I}px`),K=(0,r.A)(`width: ${E.width}px`,`height: ${E.height}px`,`left: ${R-p}px`,`top: ${I-p}px`);return(0,g.FD)("div",{children:[(0,g.FD)("div",{className:"r_2tKzuI",style:(0,r.A)(`width: ${Y}px`,`height: ${Y}px`),children:[(0,g.Y)("img",{src:t.src,className:"caUABR3p",style:O,draggable:!1,onMouseDown:T,onTouchStart:T,alt:"",role:"presentation"}),(0,g.Y)("div",{className:"gR8q967h"}),(0,g.Y)("div",{className:"m_d02kUd",children:(0,g.Y)("img",{src:t.src,className:"nJUDgVTD",style:K,draggable:!1,alt:"",role:"presentation"})})]}),(0,g.FD)("div",{className:"_YQbrXkD",children:[(0,g.Y)(A.A,{className:"s73_IyYI",min:100,max:200,value:C,onChange:F}),(0,g.Y)(v.A,{className:"M0r9Gw03",round:!0,color:"primary",onClick:()=>{if(!t)return;const e=Y/D,o=t.width/2-e/2-d.x/D,r=t.height/2-e/2-d.y/D,l=Math.min(i,Math.max(a,e)),c=document.createElement("canvas");c.width=l,c.height=l,c.getContext("2d").drawImage(t,o,r,e,e,0,0,l,l),c.toBlob(e=>{e&&n((0,s.ti)(e,"avatar.jpg"))},"image/jpeg")},ariaLabel:"Crop",children:(0,g.Y)(m.A,{name:"check"})})]})]})});var C=t(22337);const N=(0,o.ph)(e=>{let{file:n,onChange:t,onClose:o}=e;const r=(0,a.A)(),{image:l}=(0,i.A)(n),s=Boolean(n)&&Boolean(l);return(0,g.Y)(C.A,{isOpen:s,onClose:o,title:r("CropperTitle"),className:"CropModal",hasCloseButton:!0,isCondensedHeader:!0,children:(0,g.Y)(f,{onChange:t,image:l,maxOutputSize:1024,minOutputSize:256})})})},91356:(e,n,t)=>{t.d(n,{A:()=>l});var o=t(84051),i=t(52844),a=t(90751);var r=t(20021);const l=(0,o.ph)(e=>{let{onChange:n,inputRef:t}=e;const[l,s]=(0,o.J0)(),c=(0,o.hb)(e=>{s(void 0),n(e)},[n]),d=(0,o.hb)(()=>{s(void 0)},[]),u=(0,o.hb)(()=>{(0,i.p)("image/png, image/jpeg",e=>{const n=e.target;n?.files?.[0]&&s(n.files[0])},!0)},[]);return(0,r.FD)(r.FK,{children:[(0,r.Y)("input",{ref:t,className:"axfkbhWJ",onClick:u}),(0,r.Y)(a.A,{file:l,onClose:d,onChange:c})]})})},94079:(e,n,t)=>{t.d(n,{A:()=>d});var o=t(84051),i=t(66644),a=t(63495),r=t(87357),l=t(17712),s=t(59030),c=t(20021);const d=(0,o.ph)(e=>{let{ref:n,id:t,className:d,value:u,label:h,error:m,success:v,disabled:A,readOnly:g,placeholder:p,autoComplete:b,inputMode:f,maxLength:C,maxLengthIndicator:N,tabIndex:w,onChange:y,onInput:x,onKeyPress:k,onKeyDown:Y,onBlur:L,onPaste:D,noReplaceNewlines:E}=e,S=(0,o.li)();n&&(S=n);const T=(0,s.A)(),B=m||v||h,M=(0,r.A)("input-group",u&&"touched",m?"error":v&&"success",A&&"disabled",g&&"disabled",B&&"with-label",d),F=(0,l.A)(e=>{(0,i.RK)(()=>{e.style.height="0",(0,i.gm)(()=>{const n=e.scrollHeight;return()=>{e.style.height=`${n}px`}})})});(0,o.Nf)(()=>{const e=S.current;e&&F(e)},[]);const R=(0,o.hb)(e=>{const n=e.currentTarget;if(!E){const e=n.selectionEnd;n.value=n.value.replace(/\n/g," "),n.selectionEnd=e}F(n),y?.(e)},[E,y]);return(0,c.FD)("div",{className:M,dir:T.isRtl?"rtl":void 0,children:[(0,c.Y)("textarea",{ref:S,className:"form-control",id:t,dir:"auto",value:u||"",tabIndex:w,placeholder:p,maxLength:C,autoComplete:b,spellCheck:!a.Vq&&void 0,inputMode:f,disabled:A,readOnly:g,onChange:R,onInput:x,onKeyPress:k,onKeyDown:Y,onBlur:L,onPaste:D,"aria-label":B}),B&&(0,c.Y)("label",{htmlFor:t,children:B}),N&&(0,c.Y)("div",{className:"max-length-indicator",children:N})]})})},94189:(e,n,t)=>{t.d(n,{A:()=>d});var o=t(84051),i=t(87357),a=t(10328),r=t(39351),l=t(64493),s=t(22337),c=t(20021);const d=(0,o.ph)(e=>{let{isOpen:n,title:t,noDefaultTitle:d,header:u,text:h,textParts:m,confirmLabel:v,confirmIsDestructive:A,isConfirmDisabled:g,isOnlyConfirm:p,areButtonsInColumn:b,className:f,children:C,confirmHandler:N,onClose:w,onCloseAnimationEnd:y}=e;const x=(0,r.A)(),k=(0,o.li)(),Y=(0,o.hb)(e=>{-1===e&&N()},[N]),L=(0,a.A)(k,n,Y,".Button");return(0,c.FD)(s.A,{className:(0,i.A)("confirm",f),title:t||(d?void 0:x("Telegram")),header:u,isOpen:n,onClose:w,onCloseAnimationEnd:y,children:[h&&h.split("\\n").map(e=>(0,c.Y)("p",{children:e})),m||C,(0,c.FD)("div",{className:b?"dialog-buttons-column":"dialog-buttons mt-2",ref:k,onKeyDown:L,children:[(0,c.Y)(l.A,{className:"confirm-dialog-button",isText:!0,onClick:N,color:A?"danger":"primary",disabled:g,children:v||x("GeneralConfirm")}),!p&&(0,c.Y)(l.A,{className:"confirm-dialog-button",isText:!0,onClick:w,children:x("Cancel")})]})]})})}}]);
//# sourceMappingURL=4765.035992b805f49110fb3b.js.map