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