2 lines
93 KiB
JavaScript
2 lines
93 KiB
JavaScript
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[4765],{43434(e,t,r){r.d(t,{A:()=>c});var n=r(84051),o=r(87357),i=r(39351),a=r(18276),l=r(90751),s=r(20021);const c=(0,n.ph)(({title:e,disabled:t,isForForum:r,currentAvatarBlobUrl:c,onChange:d})=>{const[h,u]=(0,n.J0)(),[p,m]=(0,n.J0)(c),f=(0,i.A)();(0,n.vJ)(()=>{m(c)},[c]);const g=(0,n.hb)(e=>{u(void 0),d(e),p&&p!==c&&URL.revokeObjectURL(p),m(URL.createObjectURL(e))},[p,c,d]),v=(0,n.hb)(()=>{u(void 0)},[]),A=(0,o.A)(p&&"filled",t&&"disabled",r&&"rounded-square");return(0,s.FD)("div",{className:"AvatarEditable",children:[(0,s.FD)("label",{className:A,role:"button",tabIndex:0,title:e||f("ChangeYourProfilePicture"),children:[(0,s.Y)("input",{type:"file",onChange:function(e){const t=e.target;t?.files?.[0]&&(u(t.files[0]),t.value="")},accept:"image/png, image/jpeg"}),(0,s.Y)(a.A,{name:"camera-add"}),p&&(0,s.Y)("img",{src:p,draggable:!1,alt:""})]}),(0,s.Y)(l.A,{file:h,onClose:v,onChange:g})]})})},24713(e,t,r){r.d(t,{A:()=>s});var n=r(84051),o=r(87357),i=r(68292),a=r(26607);var l=r(20021);const s=(0,n.ph)(({text:e,className:t,isAlternateColor:r})=>(0,l.Y)(a.A,{className:(0,o.A)("Y3ZoW17O",r?"Lq67O2D2":"DWjOG2Ze",t),isOpen:Boolean(e),children:e&&(0,l.Y)(i.A,{text:e})}))},77561(e,t,r){r.d(t,{A:()=>c});var n=r(84051),o=r(87357),i=r(87894),a=r(17712),l=r(19806),s=r(20021);const c=(0,n.ph)(({id:e,options:t,selected:r,disabled:n,nestedCheckbox:c,loadingOptions:d,isRound:h,onChange:u,onClickLabel:p,className:m})=>{const f=(0,a.A)((e,t)=>{const{value:n,checked:o}=e.currentTarget;let a;o?(a=(0,i.Am)([...r,n]),t?.forEach(e=>{a.includes(e.value)||a.push(e.value)})):(a=r.filter(e=>e!==n),t&&(a=a.filter(e=>!t.some(t=>t.value===e)))),u(a)}),g=(0,a.A)(e=>{const t=e?.filter(e=>r.includes(e.value)).length;return t>0?t:e.length});return(0,s.Y)("div",{id:e,className:(0,o.A)("radio-group",m),children:t.map(e=>(0,s.Y)(l.A,{label:e.label,subLabel:e.subLabel,value:e.value,peer:e.peer,checked:-1!==r?.indexOf(e.value),disabled:e.disabled||n,isLoading:d?-1!==d.indexOf(e.value):void 0,onChange:f,onClickLabel:p,nestedCheckbox:c,nestedCheckboxCount:g(e.nestedOptions??[]),nestedOptionList:e.nestedOptions,values:r,isRound:h}))})})},94189(e,t,r){r.d(t,{A:()=>d});var n=r(84051),o=r(87357),i=r(10328),a=r(39351),l=r(64493),s=r(22337),c=r(20021);const d=(0,n.ph)(({isOpen:e,title:t,noDefaultTitle:r,header:d,text:h,textParts:u,confirmLabel:p,confirmIsDestructive:m,isConfirmDisabled:f,isOnlyConfirm:g,areButtonsInColumn:v,className:A,children:C,confirmHandler:w,onClose:x,onCloseAnimationEnd:Y})=>{const b=(0,a.A)(),y=(0,n.li)(),S=(0,n.hb)(e=>{-1===e&&w()},[w]),N=(0,i.A)(y,e,S,".Button");return(0,c.FD)(s.A,{className:(0,o.A)("confirm",A),title:t||(r?void 0:b("Telegram")),header:d,isOpen:e,onClose:x,onCloseAnimationEnd:Y,children:[h&&h.split("\\n").map(e=>(0,c.Y)("p",{children:e})),u||C,(0,c.FD)("div",{className:v?"dialog-buttons-column":"dialog-buttons mt-2",ref:y,onKeyDown:N,children:[(0,c.Y)(l.A,{className:"confirm-dialog-button",isText:!0,inline:!0,onClick:w,color:m?"danger":"primary",disabled:f,children:p||b("GeneralConfirm")}),!g&&(0,c.Y)(l.A,{className:"confirm-dialog-button",isText:!0,onClick:x,children:b("Cancel")})]})]})})},90751(e,t,r){r.d(t,{A:()=>w});var n=r(84051),o=r(101),i=r(39351),a=r(95807),l=r(15640),s=r(87679),c=r(43336),d=r(76023),h=r(17712),u=r(39751),p=r(64493),m=r(82497);var f=r(20021);const g=.125*d.$,v=2*d.$,A=(0,n.ph)(({onChange:e,image:t,maxOutputSize:r,minOutputSize:o})=>{const[i,d]=(0,n.J0)({x:0,y:0}),[A,C]=(0,n.J0)(100),w=(0,n.li)(!1),x=(0,n.li)({x:0,y:0}),Y=(0,n.li)({x:0,y:0}),{width:b}=(0,u.A)(),y=Math.min(400,b-2*v),S=t?Math.max(y/t.width,y/t.height):1,N=S*A/100,k=(0,n.Kr)(()=>t?{width:t.width*N,height:t.height*N}:{width:0,height:0},[t,N]),D=(e,t,r)=>{const n=y/2,o=r.width/2,i=r.height/2,a=Math.max(0,o-n),l=Math.max(0,i-n);return{x:(0,c.qE)(e,-a,a),y:(0,c.qE)(t,-l,l)}},M=e=>{w.current=!0,x.current=(0,l.A)(e),Y.current={...i},document.addEventListener("mousemove",_),document.addEventListener("touchmove",_),document.addEventListener("mouseup",B),document.addEventListener("touchend",B)},_=(0,h.A)(e=>{if("touches"in e&&e.touches.length>1)return;if(!w.current)return;const{x:t,y:r}=(0,l.A)(e),n=t-x.current.x,o=r-x.current.y,i=D(Y.current.x+n,Y.current.y+o,k);d(i)}),B=(0,h.A)(()=>{w.current=!1,document.removeEventListener("mousemove",_),document.removeEventListener("touchmove",_),document.removeEventListener("mouseup",B),document.removeEventListener("touchend",B)}),F=(0,h.A)(e=>{const r=S*e/100,n={width:t.width*r,height:t.height*r},o=e/A,a=D(i.x*o,i.y*o,n);C(e),d(a)});if(!t)return;const L=(y-k.width)/2+i.x,R=(y-k.height)/2+i.y,I=(0,a.A)(`width: ${k.width}px`,`height: ${k.height}px`,`left: ${L}px`,`top: ${R}px`),T=(0,a.A)(`width: ${k.width}px`,`height: ${k.height}px`,`left: ${L-g}px`,`top: ${R-g}px`);return(0,f.FD)("div",{children:[(0,f.FD)("div",{className:"r_2tKzuI",style:(0,a.A)(`width: ${y}px`,`height: ${y}px`),children:[(0,f.Y)("img",{src:t.src,className:"caUABR3p",style:I,draggable:!1,onMouseDown:M,onTouchStart:M,alt:"",role:"presentation"}),(0,f.Y)("div",{className:"gR8q967h"}),(0,f.Y)("div",{className:"m_d02kUd",children:(0,f.Y)("img",{src:t.src,className:"nJUDgVTD",style:T,draggable:!1,alt:"",role:"presentation"})})]}),(0,f.FD)("div",{className:"_YQbrXkD",children:[(0,f.Y)(m.A,{className:"s73_IyYI",min:100,max:200,value:A,onChange:F}),(0,f.Y)(p.A,{className:"M0r9Gw03",round:!0,color:"primary",iconName:"check",onClick:()=>{if(!t)return;const n=y/N,a=t.width/2-n/2-i.x/N,l=t.height/2-n/2-i.y/N,c=Math.min(r,Math.max(o,n)),d=document.createElement("canvas");d.width=c,d.height=c,d.getContext("2d").drawImage(t,a,l,n,n,0,0,c,c),d.toBlob(t=>{t&&e((0,s.ti)(t,"avatar.jpg"))},"image/jpeg")},ariaLabel:"Crop"})]})]})});var C=r(22337);const w=(0,n.ph)(({file:e,onChange:t,onClose:r})=>{const n=(0,i.A)(),{image:a}=(0,o.A)(e),l=Boolean(e)&&Boolean(a);return(0,f.Y)(C.A,{isOpen:l,onClose:r,title:n("CropperTitle"),className:"CropModal",hasCloseButton:!0,isCondensedHeader:!0,children:(0,f.Y)(A,{onChange:t,image:a,maxOutputSize:1024,minOutputSize:256})})})},80401(e,t,r){r.d(t,{A:()=>h});var n=r(84051),o=r(87357),i=r(95807),a=r(15640),l=r(59030),s=r(18276);var c=r(20021);const d={x:0,y:0},h=(0,n.ph)(({children:e,id:t,onDrag:r,onDragEnd:h,style:u,knobStyle:p,isDisabled:m})=>{const f=(0,l.A)(),g=(0,n.li)(),[v,A]=(0,n.J0)({isDragging:!1,origin:d,translation:d}),C=e=>{e.stopPropagation(),e.preventDefault();const{x:t,y:r}=(0,a.A)(e);A({...v,isDragging:!0,origin:{x:t,y:r},width:g.current?.offsetWidth,height:g.current?.offsetHeight})},w=(0,n.hb)(e=>{const{x:n,y:o}=(0,a.A)(e),i={x:n-v.origin.x,y:o-v.origin.y};A(e=>({...e,translation:i})),r(i,t)},[t,r,v.origin.x,v.origin.y]),x=(0,n.hb)(()=>{A(e=>({...e,isDragging:!1,width:void 0,height:void 0})),h()},[h]);(0,n.vJ)(()=>{v.isDragging&&m&&A(e=>({...e,isDragging:!1,width:void 0,height:void 0}))},[m,v.isDragging]),(0,n.vJ)(()=>(v.isDragging?(window.addEventListener("touchmove",w),window.addEventListener("mousemove",w),window.addEventListener("touchend",x),window.addEventListener("touchcancel",x),window.addEventListener("mouseup",x)):(window.removeEventListener("touchmove",w),window.removeEventListener("mousemove",w),window.removeEventListener("touchend",x),window.removeEventListener("touchcancel",x),window.removeEventListener("mouseup",x),A(e=>({...e,translation:d}))),()=>{v.isDragging&&(window.removeEventListener("touchmove",w),window.removeEventListener("mousemove",w),window.removeEventListener("touchend",x),window.removeEventListener("touchcancel",x),window.removeEventListener("mouseup",x))}),[w,x,v.isDragging]);const Y=(0,o.A)("kWQHzIMD",v.isDragging&&"k0c5WDAy"),b=(0,n.Kr)(()=>(0,i.A)(v.isDragging&&`transform: translate(${v.translation.x}px, ${v.translation.y}px)`,v.width?`width: ${v.width}px`:void 0,v.height?`height: ${v.height}px`:void 0,u),[u,v.height,v.isDragging,v.translation.x,v.translation.y,v.width]);return(0,c.FD)("div",{style:b,className:Y,ref:g,children:[e,!m&&(0,c.Y)("div",{"aria-label":f("i18n_dragToSort"),tabIndex:0,role:"button",className:(0,o.A)("UpzQzcvs","div-button","draggable-knob"),onMouseDown:C,onTouchStart:C,style:p,children:(0,c.Y)(s.A,{name:"sort",className:"JIThxQAL"})})]})})},46144(e,t,r){r.d(t,{A:()=>p});var n=r(84051),o=r(66644),i=r(87357),a=r(76023),l=r(37661),s=r(39351),c=r(17712),d=r(93545);var h=r(20021);const u=4.1875*a.$,p=(0,n.ph)(({text:e,collapsedHeight:t=u,className:r})=>{const p=(0,s.A)(),[m,f,g]=(0,l.A)(!1),[v,A]=(0,n.J0)(),[C,w]=(0,n.J0)(!1),x=(0,n.li)(),Y=e||"",b=C,y=(0,c.A)(()=>{(0,o.YS)(()=>{x.current&&w(x.current.scrollHeight>t)})});(0,n.vJ)(()=>{y()},[Y,t,y]),(0,d.A)(x,y);const S=(0,c.A)(()=>{m?g():(x.current&&A(x.current.scrollHeight),f())});return(0,h.FD)("div",{className:(0,i.A)("wQnkm0PP",!m&&b&&"zTnTr5it",r),children:[(0,h.Y)("div",{className:"cIdCum0y",style:m&&v?`height: ${v}px`:`height: ${t/a.$}rem`,children:(0,h.Y)("span",{ref:x,className:"wAD3_xQA",children:Y})}),b&&(0,h.Y)("span",{className:"wRHZDd4K",children:(0,h.Y)("span",{className:"IZhl7cdQ",onClick:S,children:p(m?"TextShowLess":"TextShowMore")})})]})})},12933(e,t,r){r.d(t,{A:()=>s});var n=r(87357),o=r(59030),i=r(59324),a=r(64493),l=r(20021);const s=({isShown:e,iconName:t,className:r,color:s="primary",ariaLabel:c,disabled:d,isLoading:h,onClick:u})=>{const p=(0,o.A)(),m=(0,n.A)("FloatingActionButton",e&&"revealed",r);return(0,l.Y)(a.A,{className:m,color:s,round:!0,disabled:d,onClick:e&&!d?u:void 0,ariaLabel:c,tabIndex:-1,isRtl:p.isRtl,children:(0,l.Y)(i.A,{iconName:t,isLoading:h})})}},98028(e,t,r){r.d(t,{A:()=>v});var n=r(84051),o=r(96454),i=r(87357),a=r(10722),l=r(11217),s=r(37661),c=r(17712),d=r(72167),h=r(18276),u=r(71429),p=r(24433),m=r(60859);const f={folder:"r_wWhyY_","no-page-transitions":"WddG2sPd",noPageTransitions:"WddG2sPd",inner:"k59cp8Xp",title:"GfrkwlNw",icon:"Ehg2aEWm",badge:"XwWX8ZRp","badge-active":"JrMkpoeL",badgeActive:"JrMkpoeL",blocked:"xqOTsTUl",active:"y8ZeQOsX"};var g=r(20021);const v=({className:e,title:t,isActive:r,isBlocked:v,badgeCount:A,isBadgeActive:C,contextActions:w,contextRootElementSelector:x,icon:Y,clickArg:b,onClick:y})=>{const S=(0,n.li)(),[N,k,D]=(0,s.A)(),{contextMenuAnchor:M,handleContextMenu:_,handleBeforeContextMenu:B,handleContextMenuClose:F,handleContextMenuHide:L,isContextMenuOpen:R}=(0,a.A)(S,!w),{handleClick:I,handleMouseDown:T}=(0,l.Q)(e=>{!w||e.button!==o.w3.Secondary&&y||B(e),"mousedown"===e.type&&e.button!==o.w3.Main||y?.(b)}),E=(0,c.A)(()=>S.current),H=(0,c.A)(()=>x?S.current.closest(x):document.body),O=(0,c.A)(()=>document.querySelector(`.${f.contextMenu} .bubble`)),$=(0,c.A)(()=>({withPortal:!0}));return(0,g.FD)("div",{className:(0,i.A)(f.folder,r&&f.active,e),onClick:I,onMouseDown:T,onContextMenu:_,onMouseEnter:k,onMouseLeave:D,ref:S,children:[(0,g.FD)("div",{className:f.icon,children:[(0,g.Y)(d.A,{emoji:"string"==typeof Y?Y:void 0,customEmojiId:"object"==typeof Y?Y.documentId:void 0,shouldAnimate:N}),Boolean(A)&&(0,g.Y)("span",{className:(0,i.A)(f.badge,C&&f.badgeActive),children:A})]}),(0,g.Y)("span",{className:f.inner,children:(0,g.FD)("div",{className:f.title,children:[v&&(0,g.Y)(h.A,{name:"lock-badge",className:f.blocked}),t]})}),w&&void 0!==M&&(0,g.Y)(u.A,{isOpen:R,anchor:M,getTriggerElement:E,getRootElement:H,getMenuElement:O,getLayout:$,className:f.contextMenu,autoClose:!0,onClose:F,onCloseAnimationEnd:L,withPortal:!0,children:w.map(e=>"isSeparator"in e?(0,g.Y)(m.A,{},e.key||"separator"):(0,g.Y)(p.A,{icon:e.icon,destructive:e.destructive,disabled:!e.handler,onClick:e.handler,children:e.title},e.title))})]})}},46222(e,t,r){r.d(t,{A:()=>u});var n=r(84051),o=r(89925),i=r(66644),a=r(96454),l=r(95807),s=r(9718),c=r(37836),d=r(17712),h=r(20021);const u=({ref:e,style:t,className:r,items:u,itemSelector:p=".ListItem",preloadBackwards:m=20,sensitiveArea:f=800,withAbsolutePositioning:g,maxHeight:v,noScrollRestore:A=!1,noScrollRestoreOnTop:C=!1,noFastList:w,cacheBuster:x,beforeChildren:Y,children:b,scrollContainerClosest:y,onLoadMore:S,onScroll:N,onWheel:k,onClick:D,onKeyDown:M})=>{let _=(0,n.li)();e&&(_=e);const B=(0,n.li)({}),[F,L]=(0,n.Kr)(()=>S?[(0,c.sg)((e=!1)=>{S({direction:o.TN.Backwards,noScroll:e})},1e3,!0,!1),(0,c.sg)(()=>{S({direction:o.TN.Forwards})},1e3,!0,!1)]:[],[S,u]);(0,n.vJ)(()=>{const e=y?_.current.closest(y):_.current;if(!F||!e)return;if(m>0&&(!u||u.length<m))return void F(!0);const{scrollHeight:t,clientHeight:r}=e;r&&t<r&&F()},[u,F,m,y]),(0,n.Nf)(()=>{const e=y?_.current.closest(y):_.current,t=_.current;(0,i.gm)(()=>{const r=B.current;let n;if(r.listItemElements=t.querySelectorAll(p),r.currentAnchor&&Array.from(r.listItemElements).includes(r.currentAnchor)){const{scrollTop:t}=e,o=r.currentAnchor.getBoundingClientRect().top;n=t+(o-r.currentAnchorTop)}else{const e=r.listItemElements[0];e&&(r.currentAnchor=e,r.currentAnchorTop=e.getBoundingClientRect().top)}if(g||A)return;const{scrollTop:o}=e;return C&&0===o?void 0:()=>{(0,s.A)(e,n),r.isScrollTopJustUpdated=!0}})},[u,p,A,C,x,g,y]);const R=(0,d.A)(e=>{if(L&&F){const{isScrollTopJustUpdated:e,currentAnchor:t,currentAnchorTop:r}=B.current,n=B.current.listItemElements;if(e)return void(B.current.isScrollTopJustUpdated=!1);const o=n.length,i=y?_.current.closest(y):_.current,{scrollTop:a,scrollHeight:l,offsetHeight:s}=i,c=a<=(o?n[0].offsetTop:0)+f,d=(o?n[o-1].offsetTop+n[o-1].offsetHeight:l)-(a+s)<=f;let h=!1;if(c){const e=n[0];if(e){const n=e.getBoundingClientRect().top,o=t?.offsetParent&&t!==e?t.getBoundingClientRect().top:n;t&&void 0!==r&&o>r&&(B.current.currentAnchor=e,B.current.currentAnchorTop=n,h=!0,L())}}if(d){const e=n[o-1];if(e){const n=e.getBoundingClientRect().top,o=t?.offsetParent&&t!==e?t.getBoundingClientRect().top:n;t&&void 0!==r&&o<r&&(B.current.currentAnchor=e,B.current.currentAnchorTop=n,h=!0,F())}}if(!h)if(t?.offsetParent)B.current.currentAnchorTop=t.getBoundingClientRect().top;else{const e=n[0];e&&(B.current.currentAnchor=e,B.current.currentAnchorTop=e.getBoundingClientRect().top)}}N&&N(e)});return(0,n.Nf)(()=>{const e=y?_.current.closest(y):_.current;if(!e)return;const t=e=>R(e);return e.addEventListener("scroll",t),()=>{e.removeEventListener("scroll",t)}},[R,y]),(0,h.FD)("div",{ref:_,className:r,style:t,teactFastList:!w&&!g,onClick:D,onKeyDown:M,onWheel:k,children:[Y,g&&u?.length?(0,h.Y)("div",{teactFastList:!w,style:(0,l.A)("position: relative",a.Ni&&`height: ${v}px`),children:b}):b]})}},22720(e,t,r){r.d(t,{A:()=>w});var n=r(84051),o=r(66644),i=r(96454),a=r(87357),l=r(4961),s=r(10722),c=r(11217),d=r(37661),h=r(39351),u=r(17712),p=r(18276),m=r(64493),f=r(71429),g=r(24433),v=r(60859),A=r(42452),C=r(20021);const w=({ref:e,buttonRef:t,icon:r,iconClassName:w,leftElement:x,buttonClassName:Y,menuBubbleClassName:b,secondaryIcon:y,secondaryIconClassName:S,rightElement:N,className:k,style:D,children:M,disabled:_,allowDisabledClick:B,ripple:F,narrow:L,inactive:R,focus:I,destructive:T,withPrimaryColor:E,multiline:H,isStatic:O,allowSelection:$,withColorTransition:P,contextActions:J,withPortalForMenu:z,href:K,nonInteractive:G,onClick:q,clickArg:V,onMouseDown:X,onContextMenu:W,onSecondaryIconClick:U,onDragEnter:Z,onDragLeave:j})=>{let Q=(0,n.li)();e&&(Q=e);const ee=(0,n.li)(),[te,re,ne]=(0,d.A)(),{isContextMenuOpen:oe,contextMenuAnchor:ie,handleBeforeContextMenu:ae,handleContextMenu:le,handleContextMenuClose:se,handleContextMenuHide:ce}=(0,s.A)(Q,!J),de=(0,u.A)(()=>Q.current),he=(0,u.A)(()=>Q.current.closest(".custom-scroll")),ue=(0,u.A)(()=>ee.current),pe=(0,u.A)(()=>({withPortal:z})),me=(0,u.A)(e=>{if(!(e.ctrlKey||e.metaKey||e.shiftKey)&&e.button===i.w3.Main){if(K&&!q)return;e.preventDefault()}}),fe=(0,u.A)(e=>{if(!_||B){if(K){if((e.ctrlKey||e.metaKey||e.shiftKey)&&e.button===i.w3.Main||e.button===i.w3.Auxiliary)return;q&&e.preventDefault()}q&&(q(e,V),i.TF&&!F&&(re(),(0,o.YS)(ne)))}}),{handleClick:ge,handleMouseDown:ve}=(0,c.Q)(e=>{_&&!B||0!==e.button||!U&&!J||(e.stopPropagation(),U?U(e):le(e))}),Ae=(0,u.A)(e=>{R||i.TF||(!J||e.button!==i.w3.Secondary&&q||ae(e),e.button===i.w3.Main&&(q?fe(e):le(e)))}),Ce=(0,h.A)(),we=(0,a.A)("ListItem",k,$&&"allow-selection",F&&"has-ripple",L&&"narrow",_&&"disabled",B&&"click-allowed",R&&"inactive",ie&&"has-menu-open",I&&"focus",T&&"destructive",E&&"primary",H&&"multiline",O&&"is-static",P&&"with-color-transition"),xe=K?"a":"div";return(0,C.FD)("div",{ref:Q,className:we,dir:Ce.isRtl?"rtl":void 0,style:D,onMouseDown:X,onDragEnter:Z,onDragLeave:j,children:[(0,C.FD)(xe,{className:(0,a.A)("ListItem-button",te&&"active",Y),role:O||K?void 0:"button",href:K,ref:t,rel:K?"noopener noreferrer":void 0,tabIndex:O?void 0:0,onClick:!R&&i.TF?fe:me,onMouseDown:Ae,onContextMenu:W||(!R&&J?le:void 0),"aria-disabled":_||void 0,children:[!_&&!R&&F&&(0,C.Y)(A.A,{}),x,r&&(0,C.Y)(p.A,{name:r,className:(0,a.A)("ListItem-main-icon",w)}),H&&(0,C.Y)("div",{className:"multiline-item",children:M}),!H&&M,y&&(0,C.Y)(m.A,{nonInteractive:G,className:(0,a.A)("secondary-icon",S),round:!0,color:"translucent",size:"smaller",onClick:ge,onMouseDown:ve,iconName:y}),N]}),J&&void 0!==ie&&(0,C.Y)(f.A,{ref:ee,isOpen:oe,anchor:ie,getTriggerElement:de,getRootElement:he,getMenuElement:ue,getLayout:pe,className:"ListItem-context-menu with-menu-transitions",autoClose:!0,onClose:se,onCloseAnimationEnd:ce,withPortal:z,bubbleClassName:b,children:J.map(e=>"isSeparator"in e?(0,C.Y)(v.A,{},e.key||"separator"):(0,C.Y)(g.A,{icon:e.icon,destructive:e.destructive,disabled:!e.handler,onClick:e.handler,children:(0,C.Y)("span",{className:"list-item-ellipsis",children:(0,l.A)(e.title)})},e.title))})]})}},60859(e,t,r){r.d(t,{A:()=>a});var n=r(87357);const o={root:"h039vb1K",thin:"NGKaFgra",thick:"_BdnjPEa"};var i=r(20021);const a=({className:e,size:t="thin"})=>(0,i.Y)("div",{className:(0,n.A)(o.root,o[t],e)})},22337(e,t,r){r.d(t,{U:()=>k,A:()=>D});var n=r(84051),o=r(87357),i=r(52674),a=r(14680),l=r(29441),s=r(10722),c=r(1455),d=r(26072),h=r(17712),u=r(37859),p=r(59030),m=r(34201),f=r(64493),g=r(71429),v=r(13439),A=r(86046),C=r(17142),w=r(48775),x=r(72730),Y=r(39351),b=r(96530);var y=r(20021);const S=(0,n.ph)((0,v.EK)(e=>{const{stars:t,ton:r}=e;return{starBalance:t?.balance,tonBalance:r?.balance,tonUsdRate:e.appConfig.tonUsdRate}})(function({starBalance:e,tonBalance:t,tonUsdRate:r,isModalOpen:n,currency:i,onCloseAnimationEnd:a}){const{openStarsBalanceModal:l}=(0,v.ko)(),s=(0,Y.A)(),c="TON"===i,d=c?t:e,u=!!n&&Boolean(d),{ref:p,shouldRender:f}=(0,m.A)({isOpen:u,onCloseAnimationEnd:a,withShouldRender:!0}),g=(0,x.A)(p,Boolean(f&&d)),S=(0,h.A)(()=>{l(c?{currency:"TON"}:{})});if(f&&d)return(0,y.FD)("div",{className:(0,o.A)("UtvP6LQ2",!g&&"xYkfrKnb"),ref:p,children:[(0,y.Y)("div",{children:s("ModalStarsBalanceBarDescription",c?{stars:(0,w.Ms)(s,(0,C.wD)(d.amount))}:{stars:(0,w.U2)(s,(0,A.ZF)(s,d))},{withNodes:!0,withMarkdown:!0})}),(0,y.FD)("div",{children:[c&&Boolean(r)&&(0,y.Y)("div",{className:"VMKBAQXy",style:"color: var(--color-text-secondary)",children:`≈ ${(0,C.Ad)((0,C.C)(d.amount,r,!0),"USD",s.code)}`}),!c&&(0,y.Y)(b.A,{className:"GGPosAVA",isPrimary:!0,onClick:S,children:s("GetMoreStarsLinkText",void 0,{withNodes:!0,specialReplacement:w.hG})})]})]})}));var N=r(3325);const k=200,D=e=>{const{dialogRef:t,isOpen:r,noBackdropClose:v,noFreezeOnClose:A,onClose:C,onCloseAnimationEnd:w,onEnter:x}=e,{ref:Y,shouldRender:b}=(0,m.A)({isOpen:r,withShouldRender:!0,onCloseAnimationEnd:w}),D=!A&&!r,{title:M,isLowStackPriority:_,header:B,children:F,className:L,contentClassName:R,headerClassName:I,dialogClassName:T,isSlim:E,hasCloseButton:H,hasAbsoluteCloseButton:O,absoluteCloseButtonColor:$="translucent",isBackButton:P,noBackdrop:J,style:z,dialogStyle:K,dialogContent:G,moreMenuItems:q,headerRightToolBar:V,withBalanceBar:X,isCondensedHeader:W,currencyInBalanceBar:U="XTR"}=(0,c.A)(e,D),Z=(0,n.li)(),j=(0,n.li)(),Q=(0,n.li)(),{isContextMenuOpen:ee,contextMenuAnchor:te,handleContextMenu:re,handleContextMenuClose:ne,handleContextMenuHide:oe}=(0,s.A)(j),ie=t||Z,ae=(0,h.A)(()=>ie.current),le=(0,h.A)(()=>j.current),se=(0,h.A)(()=>Q.current),ce=(0,h.A)(()=>({withPortal:!0})),de=H||O;(0,n.vJ)(()=>{if(r)return(0,a.FD)(),a.wb},[r]);const he=(0,h.A)(e=>!!x&&(e.preventDefault(),x(),!0));(0,n.vJ)(()=>r?(0,i.A)({onEsc:C,onEnter:he}):void 0,[r,C,he]),(0,n.vJ)(()=>r&&Y.current?(0,l.A)(Y.current):void 0,[r,Y]),(0,d.A)({isActive:r,onBack:C}),(0,u.A)(([e])=>(document.body.classList.toggle("has-open-dialog",Boolean(r)),(r||!r&&void 0!==e)&&(0,n.VK)(k),()=>{document.body.classList.remove("has-open-dialog")}),[r]);const ue=(0,p.A)();if(!b)return;const pe=(0,o.A)("Modal",L,J&&"transparent-backdrop",E&&"slim",_&&"low-priority",X&&"with-balance-bar"),me=(0,o.A)("modal-dialog",T);return(0,y.Y)(N.A,{children:(0,y.Y)("div",{ref:Y,className:pe,tabIndex:-1,role:"dialog",children:(0,y.FD)("div",{className:"modal-container",children:[(0,y.Y)("div",{className:"modal-backdrop",onClick:v?void 0:C}),X&&(0,y.Y)(S,{isModalOpen:r,currency:U}),(0,y.FD)("div",{className:me,ref:ie,style:K,children:[function(){if(B)return B;const e=(0,o.A)("animated-close-icon",P&&"state-back"),t=de?(0,y.Y)(f.A,{className:(0,o.A)(O&&"modal-absolute-close-button"),round:!0,color:$,size:"tiny",ariaLabel:ue(P?"Back":"Close"),onClick:C,children:(0,y.Y)("div",{className:e})}):void 0;return M?(0,y.FD)("div",{className:(0,o.A)("modal-header",I,W&&"modal-header-condensed"),children:[t,(0,y.Y)("div",{className:"modal-title",children:M})]}):t}(),V,Boolean(q)&&(0,y.FD)(y.FK,{children:[(0,y.Y)(f.A,{ref:j,className:"modal-more-button",round:!0,color:$,size:"tiny",iconName:"more",ariaLabel:ue("AriaMoreButton"),onClick:re,onContextMenu:re}),(0,y.Y)(g.A,{ref:Q,isOpen:ee,anchor:te,autoClose:!0,withPortal:!0,positionX:"right",onClose:ne,onCloseAnimationEnd:oe,getRootElement:ae,getTriggerElement:le,getMenuElement:se,getLayout:ce,children:q})]}),G,(0,y.Y)("div",{className:(0,o.A)("modal-content custom-scroll",R),style:z,children:F})]})]})})})}},34396(e,t,r){r.d(t,{A:()=>g});var n=r(84051),o=r(66644),i=r(87357),a=r(76023),l=r(37661),s=r(39351),c=r(17712),d=r(14745),h=r(39751),u=r(18276),p=r(71429),m=r(24433),f=r(20021);const g=({icon:e,customIcon:t,submenuIcon:r,className:g,children:v,submenu:A,submenuClassName:C,disabled:w,destructive:x,ariaLabel:Y,footer:b})=>{const y=(0,s.A)(),S=(0,n.li)(),N=(0,n.li)(),k=(0,n.li)(),D=(0,d.A)(),M=(0,n.li)(!1),[_,B,F]=(0,l.A)(!1);(0,n._W)(()=>{clearTimeout(N.current),clearTimeout(k.current)});const[L,R]=(0,n.J0)(),{isResizing:I}=(0,h.A)(),T=(0,c.A)(()=>{(0,o.YS)(()=>{if(!S.current)return;const e=S.current.getBoundingClientRect(),t=a.$;R({x:y.isRtl?e.left+t:e.right-t,y:e.top,width:e.width-2*t,height:e.height})})});(0,n.vJ)(()=>{_&&!I&&T()},[_,y.isRtl,T,I]);const E=(0,c.A)(()=>{clearTimeout(k.current),k.current=void 0}),H=(0,c.A)(()=>{clearTimeout(N.current),N.current=void 0}),O=(0,c.A)(()=>{H(),E(),k.current=window.setTimeout(()=>{k.current=void 0;const e=S.current?.closest(".bubble");e?.classList.contains("closing")||B()},150)}),$=(0,c.A)(()=>{E(),H(),N.current=window.setTimeout(()=>{F(),N.current=void 0},150)}),P=(0,c.A)(()=>{w||O()}),J=(0,c.A)(()=>{E(),H()}),z=(0,c.A)(()=>{$()}),K=(0,c.A)(()=>{const e=S.current?.closest(".Menu");if(e){const t=e.querySelector(".backdrop");if(t){const e=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});t.dispatchEvent(e)}}}),G=(0,c.A)(()=>{M.current||(M.current=!0,E(),H(),F(),K(),setTimeout(()=>{M.current=!1},100))}),q=(0,c.A)(()=>S.current),V=(0,c.A)(()=>document.body),X=(0,c.A)(()=>document.getElementById(D)?.querySelector(".bubble")),W=(0,c.A)(()=>({withPortal:!0})),U=(0,c.A)(e=>{e.stopPropagation(),w||_||B()});return(0,f.Y)("div",{onMouseEnter:P,onMouseLeave:$,ref:S,children:(0,f.FD)(m.A,{icon:e,customIcon:t,className:(0,i.A)(g,"submenu"),disabled:w,destructive:x,ariaLabel:Y,onClick:U,children:[v,(0,f.Y)(u.A,{name:r||(y.isRtl?"previous":"next"),className:"submenu-icon"}),L&&(0,f.Y)(p.A,{id:D,isOpen:_,className:(0,i.A)("submenu",C),anchor:L,positionX:y.isRtl?"left":"right",getTriggerElement:q,getRootElement:V,getMenuElement:X,getLayout:W,autoClose:!0,nested:!0,withPortal:!0,footer:b,onClose:G,onMouseEnter:J,onMouseLeave:z,children:A})]})})}},35913(e,t,r){r.d(t,{A:()=>m});var n=r(84051),o=r(66644),i=r(19822),a=r(87357),l=r(87094),s=r(41257),c=r(38691),d=r(18276),h=r(20021);const u={s:42,m:48,l:54,xl:52},p=.05,m=(0,n.ph)(({progress:e=0,size:t="l",square:r,transparent:m,noCross:f,rotationOffset:g,withColor:v,onClick:A})=>{const C=(0,n.li)(),w=u[t],x=(0,s.i)(e),Y=(0,c.A)(),b=(0,l.A)(C,void 0,!v);(0,n.vJ)(()=>{let e,r,n=!0,a=p;(0,i.i0)(()=>{if(!C.current)return!1;x.current!==r&&(a=Math.min(Math.max(p,r||0),1),e=Date.now(),r=x.current);const o=Math.min(Math.max(p,x.current),1),l=Math.min(1,(Date.now()-e)/600),s=i.qM.easeOutQuad(l),c=a+(o-a)*s;return function(e,t,r,n,o,i,a=!1,l){const s=t/2,c=(t-r)/2-2*i,d=l??Date.now()%2e3/2e3,h=2*Math.PI*d,u=h+2*Math.PI*o,p=e.getContext("2d");a&&(e.width=t,e.height=t,p.lineCap="round",p.strokeStyle=n,p.lineWidth=r),p.clearRect(0,0,t,t),p.beginPath(),p.arc(s,s,c,h,u),p.stroke()}(C.current,w*Y,("xl"===t?3:2)*Y,b??"white",c,Y,n,g),n=!1,c<1},o.RK)},[x,t,w,Y,g,b]);const y=(0,a.A)(`ProgressSpinner size-${t}`,m&&"transparent",r&&"square",f&&"no-cross");return(0,h.FD)("div",{className:y,onClick:A,children:[!f&&(0,h.Y)(d.A,{name:"close"}),(0,h.Y)("canvas",{ref:C,className:"ProgressSpinner_canvas",style:`width: ${w}; height: ${w}px;`})]})})},24956(e,t,r){r.d(t,{A:()=>s});var n=r(84051),o=r(87357),i=r(39351),a=r(97422),l=r(20021);const s=(0,n.ph)(({id:e,label:t,subLabel:r,subLabelClassName:n,value:s,name:c,checked:d,disabled:h,hidden:u,isLoading:p,className:m,onlyInput:f,withIcon:g,isLink:v,onChange:A,onSubLabelClick:C,isCanCheckedInDisabled:w})=>{const x=(0,i.A)(),Y=(0,o.A)("Radio",m,h&&"disabled",u&&"hidden-widget",g&&"with-icon",p&&"loading",f&&"onlyInput",Boolean(r)&&"withSubLabel",w&&"canCheckedInDisabled");return(0,l.FD)("label",{className:Y,dir:x.isRtl?"rtl":void 0,children:[(0,l.Y)("input",{type:"radio",name:c,value:s,id:e,checked:d,onChange:A,disabled:h||u}),(0,l.FD)("div",{className:"Radio-main",children:[(0,l.Y)("span",{className:"label",dir:x.isRtl?"auto":void 0,children:t}),Boolean(r)&&(0,l.Y)("span",{className:(0,o.A)(n,"subLabel",v?"subLabelLink":void 0),dir:x.isRtl?"auto":void 0,onClick:v?C:void 0,children:r})]}),p&&(0,l.Y)(a.A,{})]})})},1087(e,t,r){r.d(t,{A:()=>s});var n=r(84051),o=r(87357),i=r(17712),a=r(24956),l=r(20021);const s=(0,n.ph)(({id:e,name:t,options:r,selected:s,disabled:c,loadingOption:d,onChange:h,onClickAction:u,subLabelClassName:p,isLink:m,withIcon:f,subLabel:g,className:v})=>{const A=(0,n.hb)(e=>{const{value:t}=e.currentTarget;h(t,e)},[h]),C=(0,i.A)(e=>()=>{u?.(e)});return(0,l.Y)("div",{id:e,className:(0,o.A)("radio-group",v),children:r.map(e=>(0,l.Y)(a.A,{name:t,label:e.label,subLabel:g||e.subLabel,subLabelClassName:p,value:e.value,checked:e.value===s,hidden:e.hidden,isCanCheckedInDisabled:e.isCanCheckedInDisabled,disabled:c,withIcon:f,isLoading:d?d===e.value:void 0,className:e.className,onChange:A,onSubLabelClick:C(e.value),isLink:m}))})})},82497(e,t,r){r.d(t,{A:()=>l});var n=r(84051),o=r(87357),i=r(39351),a=r(20021);const l=(0,n.ph)(({options:e,min:t=0,max:r=(e?e.length-1:100),step:l=1,label:s,value:c,disabled:d,readOnly:h,bold:u,className:p,renderValue:m,onChange:f,isCenteredLayout:g})=>{const v=(0,i.A)(),A=(0,n.hb)(e=>{f(Number(e.currentTarget.value))},[f]),C=(0,o.A)(p,"RangeSlider",d&&"disabled",h&&"readOnly",u&&"bold"),w=(0,n.Kr)(()=>e?c/(e.length-1)*100:(c-t)/((r-t)/l)*100,[e,c,r,t,l]);return(0,a.FD)("div",{className:C,children:[g?(0,a.Y)("div",{className:"slider-top-row",dir:v.isRtl?"rtl":void 0,children:!e&&(0,a.FD)(a.FK,{children:[(0,a.Y)("span",{className:"value-min",dir:"auto",children:t}),(0,a.Y)("span",{className:"label",dir:"auto",children:m?m(c):c}),(0,a.Y)("span",{className:"value-max",dir:"auto",children:r})]})}):s?(0,a.FD)("div",{className:"slider-top-row",dir:v.isRtl?"rtl":void 0,children:[(0,a.Y)("span",{className:"label",dir:"auto",children:s}),!e&&(0,a.Y)("span",{className:"value",dir:"auto",children:m?m(c):c})]}):void 0,(0,a.FD)("div",{className:"slider-main",children:[(0,a.Y)("div",{className:"slider-fill-track",style:`width: ${w}%`}),(0,a.Y)("input",{min:t,max:r,value:c,step:l,type:"range",className:"RangeSlider__input",onChange:A}),e&&(0,a.Y)("div",{className:"slider-options",children:e.map((e,t)=>(0,a.Y)("div",{className:(0,o.A)("slider-option",t===c&&"active"),onClick:()=>f(t),children:e}))})]})]})})},11124(e,t,r){r.d(t,{A:()=>a});var n=r(84051),o=r(87357);var i=r(20021);const a=(0,n.ph)(({marks:e,onChange:t,rangeCount:r})=>{const a=(0,n.li)(),l=(0,n.Kr)(()=>e.indexOf(r),[e,r]),s=(0,n.Kr)(()=>e.indexOf(r).toString(),[e,r]);return(0,n.Nf)(()=>{if(a.current){const t=l/(e.length-1)*100,r=t/2;a.current.style.setProperty("--fill-percentage",`${t}%`),a.current.style.setProperty("--thumb-offset",`${r}%`)}},[l,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,t)=>{const r=t<=l;return(0,i.Y)("div",{className:(0,o.A)("b6UDc3zh",r?"VELPJsJ0":"K8NtimIi")},e)})}),(0,i.Y)("div",{className:"bVlnaLCI",children:e.map(e=>(0,i.Y)("div",{className:(0,o.A)("AFFaq4eZ",r===e&&"cuogxYPG"),children:e},e))}),(0,i.Y)("input",{ref:a,type:"range",className:"H_rMZrqn",min:"0",max:e.length-1,value:s,onChange:r=>{const n=parseInt(r.target.value,10),o=e[n];t(o)},step:"1"})]})})})})},66469(e,t,r){r.d(t,{A:()=>d});var n=r(84051),o=r(96454),i=r(17712),a=r(64493),l=r(20021);let s,c=!0;const d=({onActivate:e,noClickActivation:t,...r})=>{const d=(0,n.li)(!1),h=(0,i.A)(t=>{if(d.current=!0,c)return c=!1,void e(t);s&&(clearTimeout(s),s=void 0),s=window.setTimeout(()=>{d.current&&e(t)},200)}),u=(0,i.A)(()=>{d.current=!1}),p=(0,i.A)(t=>{d.current=!0,e(t)});return(0,l.Y)(a.A,{...r,onMouseEnter:o.TF?void 0:h,onMouseLeave:o.TF?void 0:u,onClick:o.TF?p:t?void 0:e})}},36393(e,t,r){r.d(t,{A:()=>g});var n=r(84051),o=r(63495),i=r(87357),a=r(37661),l=r(79174),s=r(39351),c=r(17712),d=r(59030),h=r(18276),u=r(64493),p=r(52745),m=r(41036),f=r(20021);const g=(0,n.ph)(({ref:e,children:t,resultsItemSelector:r,value:g,inputId:v,className:A,focused:C,isLoading:w=!1,spinnerColor:x,spinnerBackgroundColor:Y,placeholder:b,disabled:y,autoComplete:S,canClose:N,autoFocusSearch:k,hasUpButton:D,hasDownButton:M,teactExperimentControlled:_,withBackIcon:B,onChange:F,onStartBackspace:L,onReset:R,onFocus:I,onBlur:T,onClick:E,onUpClick:H,onDownClick:O,onSpinnerClick:$,onEnter:P})=>{let J=(0,n.li)();e&&(J=e);const[z,K,G]=(0,a.A)(C);(0,l.A)(J,k,G),(0,n.vJ)(()=>{J.current&&(C?J.current.focus():J.current.blur())},[C,b]);const q=(0,d.A)(),V=(0,s.A)();function X(){K(),I?.()}const W=(0,c.A)(e=>{if("Enter"===e.key){if(P)return e.preventDefault(),void P();if(r){const e=document.querySelector(r);e&&e.focus()}}if(r&&"ArrowDown"===e.key){const e=document.querySelector(r);e&&e.focus()}"Backspace"===e.key&&0===e.currentTarget.selectionStart&&0===e.currentTarget.selectionEnd&&L?.()});return(0,f.FD)("div",{className:(0,i.A)("SearchInput",A,z&&"has-focus"),onClick:E,dir:V.isRtl?"rtl":void 0,children:[(0,f.Y)(m.Ay,{name:"fade",shouldCleanup:!0,activeKey:Number(!w&&!B),className:"icon-container-left",slideClassName:"icon-container-slide",children:w&&!B?(0,f.Y)(p.A,{color:x,backgroundColor:Y,onClick:$}):B?(0,f.Y)(h.A,{name:"arrow-left",className:"back-icon",onClick:R}):(0,f.Y)(h.A,{name:"search",className:"search-icon"})}),(0,f.Y)("div",{children:t}),(0,f.Y)("input",{ref:J,id:v,type:"text",dir:"auto",placeholder:b||q("Search"),className:"form-control",value:g,disabled:y,autoComplete:S,spellCheck:!o.Vq&&void 0,onChange:function(e){const{currentTarget:t}=e;F(t.value),z||X()},onFocus:X,onBlur:function(){G(),T?.()},onKeyDown:W,teactExperimentControlled:_}),D&&(0,f.Y)(u.A,{round:!0,size:"tiny",color:"translucent",iconName:"up",onClick:H,disabled:!H,ariaLabel:V("AriaSearchOlderResult")}),M&&(0,f.Y)(u.A,{round:!0,size:"tiny",color:"translucent",iconName:"down",onClick:O,disabled:!O,ariaLabel:V("AriaSearchNewerResult")}),(0,f.Y)(m.Ay,{name:"fade",shouldCleanup:!0,activeKey:Number(w),className:"icon-container-right",slideClassName:"icon-container-slide",children:B&&w?(0,f.Y)(p.A,{color:x,backgroundColor:Y,onClick:$}):(g||N)&&R&&(0,f.Y)(u.A,{round:!0,size:"tiny",color:"translucent",iconName:"close",onClick:R})})]})})},63173(e,t,r){r.d(t,{A:()=>a});var n=r(84051),o=r(87357),i=r(20021);const a=(0,n.ph)(e=>{const{id:t,value:r,label:n,hasArrow:a,error:l,ref:s,tabIndex:c,onChange:d,children:h}=e,u=l||n,p=(0,o.A)("input-group",r&&"touched",l&&"error",u&&"with-label",a&&"with-arrow","input-group");return(0,i.FD)("div",{className:p,children:[(0,i.Y)("select",{className:"form-control",id:t,value:r||"",onChange:d,tabIndex:c,ref:s,children:h}),u&&t&&(0,i.Y)("label",{htmlFor:t,children:u})]})})},91356(e,t,r){r.d(t,{A:()=>l});var n=r(84051),o=r(52844),i=r(90751);var a=r(20021);const l=(0,n.ph)(({onChange:e,inputRef:t})=>{const[r,l]=(0,n.J0)(),s=(0,n.hb)(t=>{l(void 0),e(t)},[e]),c=(0,n.hb)(()=>{l(void 0)},[]),d=(0,n.hb)(()=>{(0,o.p)("image/png, image/jpeg",e=>{const t=e.target;t?.files?.[0]&&l(t.files[0])},!0)},[]);return(0,a.FD)(a.FK,{children:[(0,a.Y)("input",{ref:t,className:"axfkbhWJ",onClick:d}),(0,a.Y)(i.A,{file:r,onClose:c,onChange:s})]})})},32581(e,t,r){r.d(t,{A:()=>a});var n=r(87357),o=r(59030);var i=r(20021);const a=function({children:e,className:t}){const r=(0,o.A)();return(0,i.Y)("div",{dir:r.isRtl?"rtl":void 0,className:(0,n.A)("LxlpQKLr",t),children:e})}},55573(e,t,r){r.d(t,{A:()=>a});var n=r(59030),o=r(64493),i=r(20021);const a=({count:e,itemName:t,itemPluralName:r,isLoading:a,onClick:l})=>{const s=(0,n.A)();return(0,i.FD)(o.A,{className:"ShowMoreButton",color:"translucent",isText:!0,isLoading:a,isRtl:s.isRtl,onClick:l,iconName:"down",children:["Show"," ",e," ","more"," ",e>1?r||`${t}s`:t]})}},26607(e,t,r){r.d(t,{A:()=>l});var n=r(84051),o=r(73767),i=r(34201),a=r(20021);const l=({isOpen:e,isHidden:t,isCustom:r,id:l,className:s,onClick:c,children:d,noCloseTransition:h,shouldAnimateFirstRender:u,style:p,ref:m})=>{const f=(0,o.A)(e),g=(0,o.A)(d),v=(0,n.li)(),A=void 0===f,{ref:C,shouldRender:w}=(0,i.A)({isOpen:e&&!t,ref:m,noMountTransition:A&&!u,className:!r&&void 0,noCloseTransition:h,withShouldRender:!0});return f&&!e&&(v.current=g),(w||t)&&(0,a.Y)("div",{id:l,ref:C,className:s,onClick:c,style:p,children:e?d:v.current})}},22191(e,t,r){r.d(t,{A:()=>p});var n=r(84051),o=r(57446),i=r(96454),a=r(87357),l=r(36838),s=r(39351),c=r(73767),d=r(34132),h=r(20021);const u=i.pz?450:i.Ni?400:300,p=(0,n.ph)(({tabs:e,activeTab:t,className:r,tabClassName:i,contextRootElementSelector:p,ref:m,onSwitchTab:f})=>{const g=(0,n.li)(),v=m||g,A=(0,c.A)(t),C=(0,s.A)();return(0,l.A)(v,void 0,!0),(0,n.vJ)(()=>{const e=v.current,{scrollWidth:r,offsetWidth:n,scrollLeft:i}=e;if(r<=n)return;const a=e.childNodes[t];if(!a)return;const{offsetLeft:l,offsetWidth:s}=a,c=l-n/2+s/2;Math.abs(c-i)<16||(0,o.A)(e,c,u)},[t,v]),(0,h.Y)("div",{className:(0,a.A)("SquareTabList","no-scrollbar",r),ref:v,dir:C.isRtl?"rtl":void 0,children:e.map((e,r)=>(0,h.Y)(d.A,{title:e.title,isActive:r===t,isBlocked:e.isBlocked,badgeCount:e.badgeCount,isBadgeActive:e.isBadgeActive,previousActiveTab:A,onClick:f,clickArg:r,contextActions:e.contextActions,contextRootElementSelector:p,className:i},e.id))})})},63152(e,t,r){r.d(t,{A:()=>l});var n=r(84051),o=r(87357),i=r(17712),a=r(20021);const l=(0,n.ph)(({id:e,name:t,value:r,label:n,checked:l=!1,disabled:s,inactive:c,noAnimation:d,onCheck:h})=>{const u=(0,i.A)(e=>{h?.(e.currentTarget.checked)}),p=(0,o.A)("Switcher",s&&"disabled",c&&"inactive",d&&"no-animation");return(0,a.FD)("label",{className:p,title:n,children:[(0,a.Y)("input",{type:"checkbox",id:e,name:t,value:r,checked:l,disabled:s,onChange:u}),(0,a.Y)("span",{className:"widget"})]})})},34132(e,t,r){r.d(t,{A:()=>A});var n=r(84051),o=r(66644),i=r(96454),a=r(87357),l=r(41402),s=r(4961),c=r(10722),d=r(11217),h=r(17712),u=r(18276),p=r(71429),m=r(24433),f=r(60859),g=r(20021);const v="Tab--active",A=({className:e,title:t,isActive:r,isBlocked:A,badgeCount:C,isBadgeActive:w,previousActiveTab:x,contextActions:Y,contextRootElementSelector:b,icon:y,clickArg:S,onClick:N})=>{const k=(0,n.li)();(0,n.Nf)(()=>{r&&void 0===x&&k.current&&k.current.classList.add(v)},[r,x]),(0,n.vJ)(()=>{if(!r||void 0===x)return;const e=k.current,t=e.parentElement.children[x];if(!t)return void(r&&!e.classList.contains(v)&&(0,o.RK)(()=>{e.classList.add(v)}));const n=e.querySelector(".platform"),i=t.querySelector(".platform"),a=i.parentElement.offsetLeft-n.parentElement.offsetLeft,s=i.clientWidth/n.clientWidth;(0,o.RK)(()=>{i.classList.remove("animate"),n.classList.remove("animate"),n.style.transform=`translate3d(${a}px, 0, 0) scale3d(${s}, 1, 1)`,(0,o.gm)(()=>((0,l.A)(n),()=>{n.classList.add("animate"),n.style.transform="none",t.classList.remove(v),e.classList.add(v)}))})},[r,x]);const{contextMenuAnchor:D,handleContextMenu:M,handleBeforeContextMenu:_,handleContextMenuClose:B,handleContextMenuHide:F,isContextMenuOpen:L}=(0,c.A)(k,!Y),{handleClick:R,handleMouseDown:I}=(0,d.Q)(e=>{!Y||e.button!==i.w3.Secondary&&N||_(e),"mousedown"===e.type&&e.button!==i.w3.Main||N?.(S)}),T=(0,h.A)(()=>k.current),E=(0,h.A)(()=>b?k.current.closest(b):document.body),H=(0,h.A)(()=>document.querySelector("#portals").querySelector(".Tab-context-menu .bubble")),O=(0,h.A)(()=>({withPortal:!0}));return(0,g.FD)("div",{className:(0,a.A)("Tab",N&&"Tab--interactive",e),onClick:R,onMouseDown:I,onContextMenu:M,ref:k,children:[y,(0,g.FD)("span",{className:"Tab_inner",children:["string"==typeof t?(0,s.A)(t):t,Boolean(C)&&(0,g.Y)("span",{className:(0,a.A)("badge",w&&"Tab__badge--active"),children:C}),A&&(0,g.Y)(u.A,{name:"lock-badge",className:"blocked"}),(0,g.Y)("i",{className:"platform"})]}),Y&&void 0!==D&&(0,g.Y)(p.A,{isOpen:L,anchor:D,getTriggerElement:T,getRootElement:E,getMenuElement:H,getLayout:O,className:"Tab-context-menu",autoClose:!0,onClose:B,onCloseAnimationEnd:F,withPortal:!0,children:Y.map(e=>"isSeparator"in e?(0,g.Y)(f.A,{},e.key||"separator"):(0,g.Y)(m.A,{icon:e.icon,destructive:e.destructive,disabled:!e.handler,onClick:e.handler,children:e.title},e.title))})]})}},17486(e,t,r){r.d(t,{A:()=>f});var n=r(84051),o=r(87357),i=r(36838),a=r(17712),l=r(93545),s=r(87412),c=r(18276);const d="olvrE11Z",h="aqYb2jyH",u="A194nVWE",p="o1qYw03A";var m=r(20021);const f=(0,n.ph)(({tabs:e,activeTab:t,className:r,tabClassName:f,indicatorClassName:g,centered:v,stretched:A,itemAlignment:C,onSwitchTab:w})=>{const x=(0,n.li)(),Y=(0,n.li)(),[b,y]=(0,n.J0)("");(0,i.A)(x,!e.length,!0);const S=(0,a.A)(()=>{const e=Y.current,r=t>=0&&e?.childNodes[t];if(e&&r&&e.offsetWidth>0){const{offsetLeft:t,offsetWidth:n}=r,o=e.offsetWidth,i=(t/o*100).toFixed(1),a=((o-(t+n))/o*100).toFixed(1);y(`inset(0.25rem ${a}% 0.25rem ${i}% round var(--tab-radius))`)}else t<0&&y("inset(0 100% 0 100%)")});(0,n.vJ)(()=>{S()},[t,e]),(0,l.A)(Y,S);const N=(0,a.A)(e=>{w(e)});if(!e.length)return;const k=(e,t)=>{const r="string"==typeof e.emoticon?e.emoticon:void 0,n="object"==typeof e.emoticon?e.emoticon:void 0;return(0,m.FD)("div",{className:(0,o.A)("U0xACBS1",f,"vertical"===C&&d,A&&u),onClick:()=>N(t),children:[r&&(0,m.Y)("span",{className:p,children:r}),n&&(0,m.Y)(s.A,{documentId:n.documentId,className:p,size:20,shouldNotLoop:!0}),e.icon&&(0,m.Y)(c.A,{name:e.icon,className:"wz7cqDHX"}),e.title,e.isBlocked&&(0,m.Y)(c.A,{name:"lock-badge",className:"V6G8MwAI"})]},e.id??t)};return(0,m.FD)("div",{ref:x,className:(0,o.A)("Jya4TQTw",v&&h,"vertical"===C&&d,r,b&&"Gsb2Drsd"),children:[e.map(k),(0,m.Y)("div",{ref:Y,className:(0,o.A)("apT7vRiG",v&&h,A&&u,g),style:b?`clip-path: ${b}`:void 0,"aria-hidden":!0,children:e.map(k)})]})})},94079(e,t,r){r.d(t,{A:()=>d});var n=r(84051),o=r(66644),i=r(63495),a=r(87357),l=r(17712),s=r(59030),c=r(20021);const d=(0,n.ph)(({ref:e,id:t,className:r,value:d,label:h,error:u,success:p,disabled:m,readOnly:f,placeholder:g,autoComplete:v,inputMode:A,maxLength:C,maxLengthIndicator:w,tabIndex:x,onChange:Y,onInput:b,onKeyPress:y,onKeyDown:S,onBlur:N,onPaste:k,noReplaceNewlines:D})=>{let M=(0,n.li)();e&&(M=e);const _=(0,s.A)(),B=u||p||h,F=(0,a.A)("input-group",d&&"touched",u?"error":p&&"success",m&&"disabled",f&&"disabled",B&&"with-label",r),L=(0,l.A)(e=>{(0,o.RK)(()=>{e.style.height="0",(0,o.gm)(()=>{const t=e.scrollHeight;return()=>{e.style.height=`${t}px`}})})});(0,n.Nf)(()=>{const e=M.current;e&&L(e)},[]);const R=(0,n.hb)(e=>{const t=e.currentTarget;if(!D){const e=t.selectionEnd;t.value=t.value.replace(/\n/g," "),t.selectionEnd=e}L(t),Y?.(e)},[D,Y]);return(0,c.FD)("div",{className:F,dir:_.isRtl?"rtl":void 0,children:[(0,c.Y)("textarea",{ref:M,className:"form-control",id:t,dir:"auto",value:d||"",tabIndex:x,placeholder:g,maxLength:C,autoComplete:v,spellCheck:!i.Vq&&void 0,inputMode:A,disabled:m,readOnly:f,onChange:R,onInput:b,onKeyPress:y,onKeyDown:S,onBlur:N,onPaste:k,"aria-label":B}),B&&(0,c.Y)("label",{htmlFor:t,children:B}),w&&(0,c.Y)("div",{className:"max-length-indicator",children:w})]})})},61361(e,t,r){r.d(t,{A:()=>u});var n=r(84051),o=r(19801),i=r(80140),a=r(32625),l=r(14737),s=r(30857),c=r(39351),d=r(68292),h=r(20021);const u=({className:e,endsAt:t,mode:r="clock",shouldShowZeroOnEnd:u,onEnd:p})=>{const m=(0,s.A)(),f=(0,c.A)(),g=(0,i.Fm)(),v=g<t,A=Math.max(0,t-g),C="clock"===r||A<86400,w=v&&"countdown"===r&&!C?1e3*(A-86400)+500:void 0;if((0,l.A)(m,w),(0,a.A)(m,v&&C?500:void 0),(0,n.vJ)(()=>{v||p?.()},[v,p]),!v&&!u)return;if("countdown"===r&&!C)return(0,h.Y)("span",{className:e,children:(0,o.mi)(f,(0,o.Ft)(t),{anchorDate:(0,o.Ft)(g)})});const x=(0,o.ak)(A).split(":"),Y=(0,h.Y)(h.FK,{children:x.map((e,t)=>(0,h.FD)("span",{children:[t>0&&":",(0,h.Y)(d.A,{text:e})]},t))});return(0,h.Y)("span",{className:e,style:"font-variant-numeric: tabular-nums;",children:"countdown"===r?f("TimeIn",{time:Y},{withNodes:!0}):Y})}},629(e,t,r){r.d(t,{A:()=>l});var n=r(84051),o=r(87357);const i={root:"eGD1rubd",widget:"EXXsQxeq",min:"C4vXj96y",mid:"nRNm3LRD",max:"LdztzMx0",filler:"kudEBJOk"};var a=r(20021);const l=(0,n.ph)(function({value:e}){return(0,a.FD)("div",{className:(0,o.A)(i.root,"Toggle"),"aria-hidden":!0,children:[(0,a.Y)("i",{className:(0,o.A)(i.filler,i[e])}),(0,a.Y)("i",{className:(0,o.A)(i.widget,i[e])})]})})},1715(e,t,r){r.d(t,{A:()=>ie});var n=r(84051),o=r(11597),i=r(30708),a=r(96454),l=r(87357),s=r(95807),c=r(11778),d=r(15640),h=r(87679),u=r(31460),p=r(76023);const m=document.createElement("canvas");function f(e,t,r){const n=r%2==1;return{width:n?t:e,height:n?e:t}}function g(e,t,r){if(0===r||e<=0||t<=0)return 1;const n=Math.abs(r*Math.PI/180),o=Math.cos(n),i=Math.sin(n);return Math.max(o+t/e*i,e/t*i+o)}function v(e,t,r=0,n=0,o=!0){t.points.length<2||(e.save(),"eraser"===t.tool?(e.globalCompositeOperation="destination-out",e.strokeStyle="rgba(0,0,0,1)",e.lineWidth=2*t.brushSize):"neon"===t.tool?(e.shadowColor=t.color,e.shadowBlur=2*t.brushSize,e.strokeStyle=t.color,e.lineWidth=.5*t.brushSize):"brush"===t.tool?(e.globalAlpha=.4,e.strokeStyle=t.color,e.lineWidth=2*t.brushSize):(e.strokeStyle=t.color,e.lineWidth=t.brushSize),e.lineCap="round",e.lineJoin="round","arrow"===t.tool?function(e,t,r,n,o){if(t.points.length<2)return;const i=t.points[0],a=t.points[t.points.length-1];e.beginPath(),e.moveTo(i.x+r,i.y+n);for(let o=1;o<t.points.length;o++){const i=t.points[o];e.lineTo(i.x+r,i.y+n)}if(e.stroke(),!o)return;const l=Math.max(0,t.points.length-10),s=t.points[l],c=Math.atan2(a.y-s.y,a.x-s.x),d=t.completedAt?Date.now()-t.completedAt:200,h=1-(1-Math.min(d/200,1))**3,u=3*t.brushSize*h;e.beginPath(),e.moveTo(a.x+r,a.y+n),e.lineTo(a.x+r-u*Math.cos(c-Math.PI/6),a.y+n-u*Math.sin(c-Math.PI/6)),e.moveTo(a.x+r,a.y+n),e.lineTo(a.x+r-u*Math.cos(c+Math.PI/6),a.y+n-u*Math.sin(c+Math.PI/6)),e.stroke()}(e,t,r,n,o):function(e,t,r,n){e.beginPath();const o=t.points[0];e.moveTo(o.x+r,o.y+n);for(let o=1;o<t.points.length;o++){const i=t.points[o];e.lineTo(i.x+r,i.y+n)}e.stroke()}(e,t,r,n),e.restore())}function A(e,t,r,n,o=0,i=1){const{width:a,height:l}=f(t.width,t.height,o);e.translate(a/2,l/2),e.rotate(r*Math.PI/180),e.scale(i*(n?-1:1),i),e.translate(-t.width/2,-t.height/2)}function C(e,t,r=0,n=0,o,i,a){const l=o&&!t.includes(o);if(0===t.length&&!l)return;const s=i||e.canvas.width,c=a||e.canvas.height;m.width=s,m.height=c;const d=m.getContext("2d");d.clearRect(0,0,s,c),t.forEach(e=>{v(d,e,r,n,!0)}),l&&v(d,o,r,n,!1),e.drawImage(m,0,0)}var w=r(63527),x=r(39351),Y=r(17712),b=r(34201),y=r(37836),S=r(43336);function N(e){return e.rotation-90*e.quarterTurns}const k=[{value:"free",labelKey:"Free"},{value:"original",labelKey:"Original"},{value:"square",labelKey:"Square",ratio:1},{value:"3:2",label:"3:2",ratio:1.5},{value:"2:3",label:"2:3",ratio:2/3},{value:"4:3",label:"4:3",ratio:4/3},{value:"3:4",label:"3:4",ratio:3/4},{value:"5:4",label:"5:4",ratio:5/4},{value:"4:5",label:"4:5",ratio:.8},{value:"16:9",label:"16:9",ratio:16/9},{value:"9:16",label:"9:16",ratio:9/16}],D={cropperX:0,cropperY:0,cropperWidth:0,cropperHeight:0,aspectRatio:"free",rotation:0,quarterTurns:0,flipH:!1},M=50;function _(e,t,r){let n,o;return r?e/t>r?(o=t,n=t*r):(n=e,o=e/r):(n=e,o=t),{cropperX:(e-n)/2,cropperY:(t-o)/2,cropperWidth:n,cropperHeight:o}}var B=r(48894),F=r(37661);const L=["#FE4438","#FF8901","#FFD60A","#33C759","#62E5E0","#0A84FF","#5856D6","#BD5CF3"];function R(e,t,r){const n=(0,B.hT)([e,t,r]);return{hue:e,saturation:t,brightness:r,hexInputValue:(0,B.v2)(n).toUpperCase(),rgbInputValue:`${n[0]}, ${n[1]}, ${n[2]}`}}const I={hue:0,saturation:1,brightness:1,hexInputValue:"",rgbInputValue:""};var T=r(18276),E=r(64493),H=r(12933),O=r(3325),$=r(22191),P=r(41036);const J={root:"fS7bjhZZ",canvasArea:"nOvdLJ1f",canvasContainer:"flFdG3Pw",canvas:"S__rCiJq",drawMode:"SsRJ8Ne8",transitioningToDraw:"icvmSYcf",canvasFadeInDelayed:"U1RgSGpb",transitioningToCrop:"NBftB_Wf",canvasZoomOut:"XWRi5K7q",transformAnimating:"FIix5Nx_",canvasTransformReveal:"oMjsJ3C4",flipAnimating:"KE1JgIqy",canvasFlipReveal:"hYKyTZX1",canvasSnapshot:"Hn9OjWnJ",zoomIn:"RYaLTunM",snapshotZoomIn:"GAZb8MPh",fadeOut:"cy5aDIor",snapshotFadeOut:"VHbOGv8X",rotateFade:"nruaroqo",snapshotRotateFade:"ow81UAjP",flipFade:"YVh8VNb5",snapshotFlipFade:"_AIjAMlP",cropWrapper:"GbMfO7GI",fadeIn:"Ztf1aNhm",fadingOut:"KgL8yEmQ",cropDarkOverlay:"iVu6ZHeJ",cropRegion:"r8Qx2Ktf",cropGrid:"BFtdoj0S",cropCorner:"nEDBQw1H",topLeft:"qzU5GUm_",topRight:"IBoPxRge",bottomLeft:"HrdjIhiG",bottomRight:"IdkngJiS",editPanel:"QVflGRhn",panelHeader:"O_DGaaLI",headerTitle:"E4eCdO4M",headerActions:"_4706V27",panelTabs:"mJXF_Yxs",modeTabs:"h8eu56lc",modeTab:"l4buYDV4",panelContent:"i6JIcnc8",sectionLabel:"_0du4yfwQ",colorRow:"pX2M1SEc",colorSwatch:"vvX7mrfr",selected:"dJPeRZqd",customColor:"_hSMHHR5",sizeRow:"vNJyCRnu",sizeSlider:"Rhwfg155",sizeValue:"iMkZTuXV",canvasControls:"dJwM8niH",hidden:"VeD7D760",fadingIn:"cureBZo1",aspectRatioList:"xj769eB6",toolList:"X0nYMkPZ",toolIcon:"fDGjX7uI",toolLabel:"piZ_2j0J",aspectRatioRow:"Vxu0LMkw",ratioBox:"E3afJRca",ratio1x1:"a3SrmuRv",ratio1X1:"a3SrmuRv",ratio3x2:"CRJondNh",ratio3X2:"CRJondNh",ratio2x3:"oh3kbhar",ratio2X3:"oh3kbhar",ratio4x3:"hW7rVntz",ratio4X3:"hW7rVntz",ratio3x4:"jaH1RSPd",ratio3X4:"jaH1RSPd",ratio5x4:"_7JukZoaG",ratio5X4:"_7JukZoaG",ratio4x5:"mU6KfKdp",ratio4X5:"mU6KfKdp",ratio16x9:"F5xquvwb",ratio16X9:"F5xquvwb",ratio9x16:"hG0HwSYF",ratio9X16:"hG0HwSYF",colorPickerInline:"A4gAVclo",colorPickerRow:"jSDhtnV4",saturationBrightness:"pakBNiyw",colorInputs:"fH8Baw0r",colorInput:"ZmhX1fIF",satBrightHandle:"XinWYrSA",hueSlider:"_MJjYdh1",hueHandle:"LBY1bylB",saveButton:"BSHyHGia"};var z=r(20021);const K=["topLeft","topRight","bottomLeft","bottomRight"],G=(0,n.ph)(function({cropState:e,displaySize:t,scale:r,isFadingOut:n,onCropperDragStart:o,onCornerResizeStart:i}){const{cropperX:a,cropperY:c,cropperWidth:d,cropperHeight:h}=e,u=a*r,p=c*r,m=d*r,f=h*r;if(0!==m&&0!==f)return(0,z.FD)("div",{className:(0,l.A)(J.cropWrapper,n&&J.fadingOut),style:`width: ${t.width}px; height: ${t.height}px`,children:[(0,z.Y)("div",{className:J.cropDarkOverlay,style:`clip-path: polygon(\n 0% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 0%,\n ${u}px ${p}px,\n ${u}px ${p+f}px,\n ${u+m}px ${p+f}px,\n ${u+m}px ${p}px,\n ${u}px ${p}px\n )`}),(0,z.Y)("div",{className:J.cropRegion,style:(0,s.A)(`left: ${u}px`,`top: ${p}px`,`width: ${m}px`,`height: ${f}px`),onMouseDown:o,onTouchStart:o,children:(0,z.Y)("div",{className:J.cropGrid})}),K.map(e=>{const t="topLeft"===e||"bottomLeft"===e?u:u+m,r="topLeft"===e||"topRight"===e?p:p+f;return(0,z.Y)("div",{className:(0,l.A)(J.cropCorner,J[e]),style:(0,s.A)(`left: ${t}px`,`top: ${r}px`),onMouseDown:t=>i(t,e),onTouchStart:t=>i(t,e)},e)})]})});var q=r(22720);const V={square:J.ratio1x1,"3:2":J.ratio3x2,"2:3":J.ratio2x3,"4:3":J.ratio4x3,"3:4":J.ratio3x4,"5:4":J.ratio5x4,"4:5":J.ratio4x5,"16:9":J.ratio16x9,"9:16":J.ratio9x16},X=k.slice(0,3),W=k.slice(3),U=(0,n.ph)(function({currentRatio:e,onRatioChange:t}){const r=(0,x.A)(),n=e=>"free"===e?(0,z.Y)(T.A,{name:"fullscreen",className:"ListItem-main-icon"}):"original"===e?(0,z.Y)(T.A,{name:"photo",className:"ListItem-main-icon"}):(0,z.Y)("div",{className:(0,l.A)("ListItem-main-icon",J.ratioBox,V[e])}),o=e=>e.labelKey?r(e.labelKey):e.label;return(0,z.FD)(z.FK,{children:[(0,z.Y)("div",{className:J.sectionLabel,children:r("AspectRatio")}),(0,z.FD)("div",{className:J.aspectRatioList,children:[X.map(r=>(0,z.FD)(q.A,{focus:e===r.value,onClick:()=>t(r.value),children:[n(r.value),o(r)]},r.value)),Array.from({length:Math.ceil(W.length/2)},(e,t)=>2*t).map(r=>{const o=W[r],i=W[r+1];return(0,z.FD)("div",{className:J.aspectRatioRow,children:[(0,z.FD)(q.A,{focus:e===o.value,onClick:()=>t(o.value),children:[n(o.value),o.label]}),i&&(0,z.FD)(q.A,{focus:e===i.value,onClick:()=>t(i.value),children:[n(i.value),i.label]})]},r)})]})]})});var Z=r(40664),j=r(82497);const Q=[{id:"pen",labelKey:"Pen",Icon:function(){return(0,z.FD)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"120",height:"20",viewBox:"0 0 120 20",className:"draw-tool-icon",children:[(0,z.FD)("g",{"clip-path":"url(#clip0_2524_7134)",children:[(0,z.Y)("g",{filter:"url(#filter0_iiii_2524_7134)",children:(0,z.Y)("path",{d:"M0 1H80L110.2 8.44653C112.048 8.90213 112.971 9.12994 113.185 9.49307C113.369 9.80597 113.369 10.194 113.185 10.5069C112.971 10.8701 112.048 11.0979 110.2 11.5535L80 19H0V1Z",fill:"#3E3F3F"})}),(0,z.Y)("path",{d:"M112.564 10.9709L103.474 13.2132C103.21 13.2782 102.944 13.121 102.883 12.8566C102.736 12.2146 102.5 11.0296 102.5 10C102.5 8.9705 102.736 7.78549 102.883 7.14344C102.944 6.87906 103.21 6.72187 103.474 6.78685L112.564 9.02913C113.578 9.27925 113.578 10.7208 112.564 10.9709Z",fill:"currentColor"}),(0,z.Y)("rect",{x:"76",y:"1",width:"4",height:"18",rx:"0.5",fill:"currentColor"})]}),(0,z.FD)("defs",{children:[(0,z.FD)("filter",{id:"filter0_iiii_2524_7134",x:"0",y:"-4",width:"116.323",height:"28",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[(0,z.Y)("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),(0,z.Y)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),(0,z.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,z.Y)("feOffset",{dx:"1",dy:"5"}),(0,z.Y)("feGaussianBlur",{stdDeviation:"3"}),(0,z.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,z.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.137255 0 0 0 0 0.145098 0 0 0 0 0.14902 0 0 0 1 0"}),(0,z.Y)("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_2524_7134"}),(0,z.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,z.Y)("feOffset",{dx:"3",dy:"-5"}),(0,z.Y)("feGaussianBlur",{stdDeviation:"3"}),(0,z.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,z.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.137255 0 0 0 0 0.145098 0 0 0 0 0.14902 0 0 0 1 0"}),(0,z.Y)("feBlend",{mode:"normal",in2:"effect1_innerShadow_2524_7134",result:"effect2_innerShadow_2524_7134"}),(0,z.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,z.Y)("feOffset",{dx:"1",dy:"-1"}),(0,z.Y)("feGaussianBlur",{stdDeviation:"0.5"}),(0,z.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,z.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.242217 0 0 0 0 0.247242 0 0 0 0 0.247101 0 0 0 1 0"}),(0,z.Y)("feBlend",{mode:"normal",in2:"effect2_innerShadow_2524_7134",result:"effect3_innerShadow_2524_7134"}),(0,z.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,z.Y)("feOffset",{dx:"1",dy:"1"}),(0,z.Y)("feGaussianBlur",{stdDeviation:"0.5"}),(0,z.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,z.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.242217 0 0 0 0 0.247242 0 0 0 0 0.247101 0 0 0 1 0"}),(0,z.Y)("feBlend",{mode:"normal",in2:"effect3_innerShadow_2524_7134",result:"effect4_innerShadow_2524_7134"})]}),(0,z.Y)("clipPath",{id:"clip0_2524_7134",children:(0,z.Y)("rect",{width:"20",height:"120",fill:"currentColor",transform:"matrix(0 1 -1 0 120 0)"})})]})]})}},{id:"arrow",labelKey:"Arrow",Icon:function(){return(0,z.FD)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"120",height:"20",viewBox:"0 0 120 20",className:"draw-tool-icon",children:[(0,z.FD)("g",{"clip-path":"url(#clip0_2524_7140)",children:[(0,z.Y)("path",{d:"M94 10H110M110 10L104 4M110 10L104 16",stroke:"url(#paint0_linear_2524_7140)","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"}),(0,z.Y)("g",{filter:"url(#filter0_iiii_2524_7140)",children:(0,z.Y)("path",{d:"M0 1H92C94.2091 1 96 2.79086 96 5V15C96 17.2091 94.2091 19 92 19H0V1Z",fill:"#3E3F3F"})}),(0,z.Y)("path",{d:"M92 1C94.2091 1 96 2.79086 96 5V15C96 17.2091 94.2091 19 92 19V1Z",fill:"currentColor"})]}),(0,z.FD)("defs",{children:[(0,z.FD)("filter",{id:"filter0_iiii_2524_7140",x:"0",y:"-4",width:"99",height:"28",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[(0,z.Y)("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),(0,z.Y)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),(0,z.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,z.Y)("feOffset",{dx:"1",dy:"5"}),(0,z.Y)("feGaussianBlur",{stdDeviation:"3"}),(0,z.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,z.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.137255 0 0 0 0 0.145098 0 0 0 0 0.14902 0 0 0 1 0"}),(0,z.Y)("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_2524_7140"}),(0,z.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,z.Y)("feOffset",{dx:"3",dy:"-5"}),(0,z.Y)("feGaussianBlur",{stdDeviation:"3"}),(0,z.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,z.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.137255 0 0 0 0 0.145098 0 0 0 0 0.14902 0 0 0 1 0"}),(0,z.Y)("feBlend",{mode:"normal",in2:"effect1_innerShadow_2524_7140",result:"effect2_innerShadow_2524_7140"}),(0,z.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,z.Y)("feOffset",{dx:"1",dy:"-1"}),(0,z.Y)("feGaussianBlur",{stdDeviation:"0.5"}),(0,z.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,z.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.242217 0 0 0 0 0.247242 0 0 0 0 0.247101 0 0 0 1 0"}),(0,z.Y)("feBlend",{mode:"normal",in2:"effect2_innerShadow_2524_7140",result:"effect3_innerShadow_2524_7140"}),(0,z.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,z.Y)("feOffset",{dx:"1",dy:"1"}),(0,z.Y)("feGaussianBlur",{stdDeviation:"0.5"}),(0,z.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,z.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.242217 0 0 0 0 0.247242 0 0 0 0 0.247101 0 0 0 1 0"}),(0,z.Y)("feBlend",{mode:"normal",in2:"effect3_innerShadow_2524_7140",result:"effect4_innerShadow_2524_7140"})]}),(0,z.FD)("linearGradient",{id:"paint0_linear_2524_7140",x1:"110",y1:"10",x2:"94",y2:"10",gradientUnits:"userSpaceOnUse",children:[(0,z.Y)("stop",{offset:"0.755","stop-color":"currentColor"}),(0,z.Y)("stop",{offset:"1","stop-color":"currentColor","stop-opacity":"0"})]}),(0,z.Y)("clipPath",{id:"clip0_2524_7140",children:(0,z.Y)("rect",{width:"20",height:"120",fill:"currentColor",transform:"matrix(0 1 -1 0 120 0)"})})]})]})}},{id:"brush",labelKey:"Brush",Icon:function(){return(0,z.FD)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"120",height:"20",viewBox:"0 0 120 20",className:"draw-tool-icon",children:[(0,z.FD)("g",{"clip-path":"url(#clip0_2524_7174)",children:[(0,z.Y)("g",{filter:"url(#filter0_iiii_2524_7174)",children:(0,z.Y)("path",{d:"M0 1H82.3579C83.4414 1 84.5135 1.22006 85.5093 1.64684L91 4H101C101.552 4 102 4.44772 102 5V15C102 15.5523 101.552 16 101 16H91L85.5093 18.3532C84.5135 18.7799 83.4414 19 82.3579 19H0V1Z",fill:"#3E3F3F"})}),(0,z.Y)("rect",{x:"76",y:"1",width:"4",height:"18",rx:"0.5",fill:"currentColor"}),(0,z.Y)("path",{d:"M102 5H106.434C106.785 5 107.111 5.1843 107.291 5.4855L112.091 13.4855C112.491 14.152 112.011 15 111.234 15H102V5Z",fill:"currentColor"})]}),(0,z.FD)("defs",{children:[(0,z.FD)("filter",{id:"filter0_iiii_2524_7174",x:"0",y:"-4",width:"105",height:"28",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[(0,z.Y)("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),(0,z.Y)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),(0,z.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,z.Y)("feOffset",{dx:"1",dy:"5"}),(0,z.Y)("feGaussianBlur",{stdDeviation:"3"}),(0,z.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,z.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.137255 0 0 0 0 0.145098 0 0 0 0 0.14902 0 0 0 1 0"}),(0,z.Y)("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_2524_7174"}),(0,z.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,z.Y)("feOffset",{dx:"3",dy:"-5"}),(0,z.Y)("feGaussianBlur",{stdDeviation:"3"}),(0,z.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,z.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.137255 0 0 0 0 0.145098 0 0 0 0 0.14902 0 0 0 1 0"}),(0,z.Y)("feBlend",{mode:"normal",in2:"effect1_innerShadow_2524_7174",result:"effect2_innerShadow_2524_7174"}),(0,z.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,z.Y)("feOffset",{dx:"1",dy:"-1"}),(0,z.Y)("feGaussianBlur",{stdDeviation:"0.5"}),(0,z.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,z.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.242217 0 0 0 0 0.247242 0 0 0 0 0.247101 0 0 0 1 0"}),(0,z.Y)("feBlend",{mode:"normal",in2:"effect2_innerShadow_2524_7174",result:"effect3_innerShadow_2524_7174"}),(0,z.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,z.Y)("feOffset",{dx:"1",dy:"1"}),(0,z.Y)("feGaussianBlur",{stdDeviation:"0.5"}),(0,z.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,z.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.242217 0 0 0 0 0.247242 0 0 0 0 0.247101 0 0 0 1 0"}),(0,z.Y)("feBlend",{mode:"normal",in2:"effect3_innerShadow_2524_7174",result:"effect4_innerShadow_2524_7174"})]}),(0,z.Y)("clipPath",{id:"clip0_2524_7174",children:(0,z.Y)("rect",{width:"20",height:"120",fill:"currentColor",transform:"matrix(0 1 -1 0 120 0)"})})]})]})}},{id:"neon",labelKey:"Neon",Icon:function(){return(0,z.FD)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"120",height:"20",viewBox:"0 0 120 20",className:"draw-tool-icon",children:[(0,z.FD)("g",{"clip-path":"url(#clip0_2524_7180)",children:[(0,z.Y)("g",{filter:"url(#filter0_f_2524_7180)",children:(0,z.Y)("path",{d:"M102 5H107.146C108.282 5 109.323 5.64872 109.601 6.75061C109.813 7.59297 110 8.70303 110 10C110 11.297 109.813 12.407 109.601 13.2494C109.323 14.3513 108.282 15 107.146 15H102V5Z",fill:"currentColor"})}),(0,z.Y)("g",{filter:"url(#filter1_f_2524_7180)",children:(0,z.Y)("path",{d:"M102 5H107.146C108.282 5 109.323 5.64872 109.601 6.75061C109.813 7.59297 110 8.70303 110 10C110 11.297 109.813 12.407 109.601 13.2494C109.323 14.3513 108.282 15 107.146 15H102V5Z",fill:"currentColor"})}),(0,z.Y)("g",{filter:"url(#filter2_f_2524_7180)",children:(0,z.Y)("path",{d:"M102 5H107.146C108.282 5 109.323 5.64872 109.601 6.75061C109.813 7.59297 110 8.70303 110 10C110 11.297 109.813 12.407 109.601 13.2494C109.323 14.3513 108.282 15 107.146 15H102V5Z",fill:"currentColor"})}),(0,z.Y)("g",{filter:"url(#filter3_iiii_2524_7180)",children:(0,z.Y)("path",{d:"M0 1H82.3579C83.4414 1 84.5135 1.22006 85.5093 1.64684L91 4H101C101.552 4 102 4.44772 102 5V15C102 15.5523 101.552 16 101 16H91L85.5093 18.3532C84.5135 18.7799 83.4414 19 82.3579 19H0V1Z",fill:"#3E3F3F"})}),(0,z.Y)("rect",{x:"76",y:"1",width:"4",height:"18",rx:"0.5",fill:"currentColor"}),(0,z.Y)("path",{d:"M102 5H107.146C108.282 5 109.323 5.64872 109.601 6.75061C109.813 7.59297 110 8.70303 110 10C110 11.297 109.813 12.407 109.601 13.2494C109.323 14.3513 108.282 15 107.146 15H102V5Z",fill:"currentColor"})]}),(0,z.FD)("defs",{children:[(0,z.FD)("filter",{id:"filter0_f_2524_7180",x:"96",y:"-1",width:"20",height:"22",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[(0,z.Y)("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),(0,z.Y)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),(0,z.Y)("feGaussianBlur",{stdDeviation:"3",result:"effect1_foregroundBlur_2524_7180"})]}),(0,z.FD)("filter",{id:"filter1_f_2524_7180",x:"96",y:"-1",width:"20",height:"22",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[(0,z.Y)("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),(0,z.Y)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),(0,z.Y)("feGaussianBlur",{stdDeviation:"3",result:"effect1_foregroundBlur_2524_7180"})]}),(0,z.FD)("filter",{id:"filter2_f_2524_7180",x:"96",y:"-1",width:"20",height:"22",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[(0,z.Y)("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),(0,z.Y)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),(0,z.Y)("feGaussianBlur",{stdDeviation:"3",result:"effect1_foregroundBlur_2524_7180"})]}),(0,z.FD)("filter",{id:"filter3_iiii_2524_7180",x:"0",y:"-4",width:"105",height:"28",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[(0,z.Y)("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),(0,z.Y)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),(0,z.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,z.Y)("feOffset",{dx:"1",dy:"5"}),(0,z.Y)("feGaussianBlur",{stdDeviation:"3"}),(0,z.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,z.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.137255 0 0 0 0 0.145098 0 0 0 0 0.14902 0 0 0 1 0"}),(0,z.Y)("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_2524_7180"}),(0,z.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,z.Y)("feOffset",{dx:"3",dy:"-5"}),(0,z.Y)("feGaussianBlur",{stdDeviation:"3"}),(0,z.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,z.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.137255 0 0 0 0 0.145098 0 0 0 0 0.14902 0 0 0 1 0"}),(0,z.Y)("feBlend",{mode:"normal",in2:"effect1_innerShadow_2524_7180",result:"effect2_innerShadow_2524_7180"}),(0,z.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,z.Y)("feOffset",{dx:"1",dy:"-1"}),(0,z.Y)("feGaussianBlur",{stdDeviation:"0.5"}),(0,z.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,z.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.242217 0 0 0 0 0.247242 0 0 0 0 0.247101 0 0 0 1 0"}),(0,z.Y)("feBlend",{mode:"normal",in2:"effect2_innerShadow_2524_7180",result:"effect3_innerShadow_2524_7180"}),(0,z.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,z.Y)("feOffset",{dx:"1",dy:"1"}),(0,z.Y)("feGaussianBlur",{stdDeviation:"0.5"}),(0,z.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,z.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.242217 0 0 0 0 0.247242 0 0 0 0 0.247101 0 0 0 1 0"}),(0,z.Y)("feBlend",{mode:"normal",in2:"effect3_innerShadow_2524_7180",result:"effect4_innerShadow_2524_7180"})]}),(0,z.Y)("clipPath",{id:"clip0_2524_7180",children:(0,z.Y)("rect",{width:"20",height:"120",fill:"currentColor",transform:"matrix(0 1 -1 0 120 0)"})})]})]})}},{id:"eraser",labelKey:"Eraser",Icon:function(){return(0,z.FD)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"120",height:"20",viewBox:"0 0 120 20",className:"draw-tool-icon",children:[(0,z.FD)("g",{"clip-path":"url(#clip0_2524_7149)",children:[(0,z.FD)("g",{filter:"url(#filter0_i_2524_7149)",children:[(0,z.Y)("path",{d:"M95 1H108C110.209 1 112 2.79086 112 5V15C112 17.2091 110.209 19 108 19H95V1Z",fill:"#D9D9D9"}),(0,z.Y)("path",{d:"M95 1H108C110.209 1 112 2.79086 112 5V15C112 17.2091 110.209 19 108 19H95V1Z",fill:"#F09B99"})]}),(0,z.Y)("g",{filter:"url(#filter1_iiii_2524_7149)",children:(0,z.Y)("path",{d:"M0 1H77.6464C77.8728 1 78.0899 0.910072 78.25 0.75C78.4101 0.589928 78.6272 0.5 78.8536 0.5H96C97.1046 0.5 98 1.39543 98 2.5V17.5C98 18.6046 97.1046 19.5 96 19.5H78.8536C78.6272 19.5 78.4101 19.4101 78.25 19.25C78.0899 19.0899 77.8728 19 77.6464 19H0V1Z",fill:"#3E3F3F"})}),(0,z.Y)("path",{d:"M79 19.5V0.5L78 0.5V19.5H79Z",fill:"black","fill-opacity":"0.33"})]}),(0,z.FD)("defs",{children:[(0,z.FD)("filter",{id:"filter0_i_2524_7149",x:"95",y:"-1",width:"19",height:"20",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[(0,z.Y)("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),(0,z.Y)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),(0,z.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,z.Y)("feOffset",{dx:"2",dy:"-2"}),(0,z.Y)("feGaussianBlur",{stdDeviation:"2"}),(0,z.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,z.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.33 0"}),(0,z.Y)("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_2524_7149"})]}),(0,z.FD)("filter",{id:"filter1_iiii_2524_7149",x:"0",y:"-4.5",width:"101",height:"29",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[(0,z.Y)("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),(0,z.Y)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),(0,z.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,z.Y)("feOffset",{dx:"1",dy:"5"}),(0,z.Y)("feGaussianBlur",{stdDeviation:"3"}),(0,z.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,z.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.137255 0 0 0 0 0.145098 0 0 0 0 0.14902 0 0 0 1 0"}),(0,z.Y)("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_2524_7149"}),(0,z.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,z.Y)("feOffset",{dx:"3",dy:"-5"}),(0,z.Y)("feGaussianBlur",{stdDeviation:"3"}),(0,z.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,z.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.137255 0 0 0 0 0.145098 0 0 0 0 0.14902 0 0 0 1 0"}),(0,z.Y)("feBlend",{mode:"normal",in2:"effect1_innerShadow_2524_7149",result:"effect2_innerShadow_2524_7149"}),(0,z.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,z.Y)("feOffset",{dx:"1",dy:"-1"}),(0,z.Y)("feGaussianBlur",{stdDeviation:"0.5"}),(0,z.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,z.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.242217 0 0 0 0 0.247242 0 0 0 0 0.247101 0 0 0 1 0"}),(0,z.Y)("feBlend",{mode:"normal",in2:"effect2_innerShadow_2524_7149",result:"effect3_innerShadow_2524_7149"}),(0,z.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,z.Y)("feOffset",{dx:"1",dy:"1"}),(0,z.Y)("feGaussianBlur",{stdDeviation:"0.5"}),(0,z.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,z.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.242217 0 0 0 0 0.247242 0 0 0 0 0.247101 0 0 0 1 0"}),(0,z.Y)("feBlend",{mode:"normal",in2:"effect3_innerShadow_2524_7149",result:"effect4_innerShadow_2524_7149"})]}),(0,z.Y)("clipPath",{id:"clip0_2524_7149",children:(0,z.Y)("rect",{width:"20",height:"120",fill:"white",transform:"matrix(0 1 -1 0 120 0)"})})]})]})}}],ee=(0,n.ph)(function({predefinedColors:e,selectedColor:t,isColorPickerOpen:r,hue:n,saturation:o,brightness:i,pickerColor:a,hexInputValue:c,rgbInputValue:d,brushSize:h,drawTool:u,hueSliderRef:p,satBrightRef:m,onColorSelect:f,onOpenColorPicker:g,onCloseColorPicker:v,onHueSliderMouseDown:A,onHueChange:C,onSatBrightMouseDown:w,onSatBrightChange:Y,onHexInput:b,onHexInputBlur:y,onRgbInput:S,onRgbInputBlur:N,onBrushSizeChange:k,onToolChange:D}){const M=(0,x.A)(),_=360*n;return(0,z.FD)(z.FK,{children:[(0,z.FD)("div",{className:J.colorRow,children:[r?(0,z.Y)("div",{ref:p,className:J.hueSlider,onMouseDown:A,onTouchStart:C,onTouchMove:C,children:(0,z.Y)("div",{className:J.hueHandle,style:`--picker-hue: ${_}`})}):e.map(e=>(0,z.Y)("button",{className:(0,l.A)(J.colorSwatch,t===e&&J.selected),style:`--swatch-color: ${e}; --swatch-outline: ${e}1a`,onClick:()=>f(e),"aria-label":e},e)),(0,z.Y)("button",{className:(0,l.A)(J.colorSwatch,J.customColor,r&&J.selected),onClick:r?v:g,"aria-label":M("CustomColor")})]}),r&&(0,z.Y)("div",{className:J.colorPickerInline,children:(0,z.FD)("div",{className:J.colorPickerRow,children:[(0,z.Y)("div",{ref:m,className:J.saturationBrightness,style:`--picker-hue: ${_}`,onMouseDown:w,onTouchStart:Y,onTouchMove:Y,children:(0,z.Y)("div",{className:J.satBrightHandle,style:(0,s.A)(`--picker-sat: ${100*o}%`,`--picker-bright: ${100*(1-i)}%`,`--picker-color: ${a}`)})}),(0,z.FD)("div",{className:J.colorInputs,children:[(0,z.Y)(Z.A,{className:J.colorInput,label:M("HEX"),value:c,onChange:b,onBlur:y,maxLength:7}),(0,z.Y)(Z.A,{className:J.colorInput,label:M("RGB"),value:d,onChange:S,onBlur:N})]})]})}),(0,z.FD)("div",{className:J.sizeRow,style:`--selected-color: ${t}`,children:[(0,z.FD)("span",{className:J.sectionLabel,children:[M("Size"),(0,z.Y)("span",{className:J.sizeValue,children:h})]}),(0,z.Y)(j.A,{className:J.sizeSlider,min:2,max:50,value:h,onChange:k,bold:!0})]}),(0,z.Y)("div",{className:J.sectionLabel,children:M("Tool")}),(0,z.Y)("div",{className:J.toolList,children:Q.map(e=>{const r=(0,l.A)("ListItem-main-icon",J.toolIcon,u===e.id&&J.toolIconActive);return(0,z.FD)(q.A,{focus:u===e.id,onClick:()=>D(e.id),children:[(0,z.Y)("span",{className:r,style:`color: ${t}`,children:(0,z.Y)(e.Icon,{})}),(0,z.Y)("span",{className:J.toolLabel,children:M(e.labelKey)})]},e.id)})})]})}),te=(0,n.ph)(function({value:e,onChange:t,onChangeEnd:r}){const n=(0,Y.A)(n=>{n.preventDefault();const{x:o}=(0,d.A)(n),i=e,a=e=>{e.preventDefault();const{x:r}=(0,d.A)(e),n=r-o,a=(0,S.qE)(Math.round(i-n/5),-90,90);t(a)},l=()=>{document.removeEventListener("mousemove",a),document.removeEventListener("touchmove",a),document.removeEventListener("mouseup",l),document.removeEventListener("touchend",l),r?.()};document.addEventListener("mousemove",a),document.addEventListener("touchmove",a,{passive:!1}),document.addEventListener("mouseup",l),document.addEventListener("touchend",l)}),o=15*Math.round(e/15),i=5*-e,a=[];for(let e=-90;e<=90;e+=15)a.push((0,z.Y)("span",{className:e===o?"tSDtmAv6":"wmzytKOT",style:`left: ${5*e}px`,children:e},e));return(0,z.Y)("div",{className:"YFefcZgL",children:(0,z.FD)("div",{className:"dXY4Fo0z",onMouseDown:n,onTouchStart:n,children:[(0,z.FD)("div",{className:"j5mg6w9j",style:`transform: translateX(${i}px)`,children:[(0,z.Y)("div",{className:"l0eEy5Rf",children:a}),(0,z.Y)("div",{className:"qitJ1s1k"})]}),(0,z.Y)("div",{className:"TLbgSYM9"})]})})}),re=[{type:"draw",icon:"brush"},{type:"crop",icon:"crop"}],ne="draw",oe=re.map(e=>({title:(0,z.Y)(T.A,{name:e.icon})})),ie=(0,n.ph)(({isOpen:e,imageUrl:t,mimeType:r,filename:m,onClose:v,onSave:K})=>{const q=(0,x.A)(),V=(0,w.Ay)(i.Vu),X=(0,w.Ay)(o.SJA),W=(0,n.Kr)(()=>function(e){return"light"===e?["#000000",...L]:["#FFFFFF",...L]}(X),[X]),{ref:Z,shouldRender:j}=(0,b.A)({isOpen:e,withShouldRender:!0}),Q=(0,n.li)(),ie=(0,n.li)(),ae=(0,n.li)(),le=(0,n.li)(void 0),[se,ce]=(0,n.J0)(ne),[de,he]=(0,n.J0)(!1),[ue,pe]=(0,n.J0)(),[me,fe]=(0,n.J0)(""),[ge,ve]=(0,n.J0)({width:0,height:0}),[Ae,Ce]=(0,n.J0)(D),we=(0,n.Kr)(()=>0===ge.width?{width:0,height:0}:f(ge.width,ge.height,Ae.quarterTurns),[ge.width,ge.height,Ae.quarterTurns]),[xe,Ye]=(0,n.J0)(),[be,ye]=(0,n.J0)([]),[Se,Ne]=(0,n.J0)([]),ke=(0,n.li)([]),De=(0,n.li)([]);ke.current=be,De.current=Se;const{displaySize:Me,getDisplayScale:_e,resetDisplaySize:Be}=function({canvasAreaRef:e,imageWidth:t,imageHeight:r,reservedHeight:o=0}){const[i,a]=(0,n.J0)({width:0,height:0}),l=(0,Y.A)(()=>0===i.width||0===t?1:Math.min(i.width/t,i.height/r));(0,n.vJ)(()=>{const n=e.current;if(!n||0===t)return;const i=()=>{const e=n.getBoundingClientRect(),i=getComputedStyle(n),l=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),s=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),c=e.width-l,d=e.height-s-o;if(c<=0||d<=0)return;const h=Math.min(c/t,d/r),u=Math.min(h,1);a({width:t*u,height:r*u})};return i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[e,t,r,o]);const s=(0,Y.A)(()=>{a({width:0,height:0})});return{displaySize:i,getDisplayScale:l,resetDisplaySize:s}}({canvasAreaRef:ae,imageWidth:we.width,imageHeight:we.height,reservedHeight:6.5*p.$}),{hueSliderRef:Fe,satBrightRef:Le,selectedColor:Re,setSelectedColor:Ie,isColorPickerOpen:Te,openColorPicker:Ee,closeColorPicker:He,hue:Oe,saturation:$e,brightness:Pe,pickerColor:Je,hexInputValue:ze,rgbInputValue:Ke,handleHueChange:Ge,handleSatBrightChange:qe,handleHexInput:Ve,handleHexInputBlur:Xe,handleRgbInput:We,handleRgbInputBlur:Ue,handleColorSelect:Ze,handleHueSliderMouseDown:je,handleSatBrightMouseDown:Qe}=function({initialColor:e}){const t=(0,n.li)(),r=(0,n.li)(),[o,i]=(0,n.J0)(e),[a,l,s]=(0,F.A)(!1),[c,h]=(0,n.J0)(I),u=(0,B.v2)((0,B.hT)([c.hue,c.saturation,c.brightness]));(0,n.vJ)(()=>{if(!a)return;const e=(0,B.xp)(o.replace("#","")),[t,r,n]=(0,B.bi)(e);h(R(t,r,n))},[a]);const p=(0,Y.A)((e,t,r)=>{const n=R(e,t,r);h(n),i((0,B.v2)((0,B.hT)([e,t,r])))}),m=(0,Y.A)(e=>{const t=t=>e(t),r=()=>{document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",r)};document.addEventListener("mousemove",t),document.addEventListener("mouseup",r)}),f=(0,Y.A)(e=>{const r=t.current;if(!r)return;const n=r.getBoundingClientRect(),{x:o}=(0,d.A)(e),i=(0,S.qE)(o-n.left,0,n.width);p(i/n.width,c.saturation,c.brightness)}),g=(0,Y.A)(e=>{const t=r.current;if(!t)return;const n=t.getBoundingClientRect(),{x:o,y:i}=(0,d.A)(e),a=(0,S.qE)(o-n.left,0,n.width),l=(0,S.qE)(i-n.top,0,n.height);p(c.hue,a/n.width,1-l/n.height)}),v=(0,Y.A)(e=>{const t=e.target.value.toUpperCase().replace(/[^0-9A-F]/g,"").slice(0,6);e.target.value=`#${t}`;const r=3===t.length?t.split("").map(e=>e+e).join(""):t;if(6===r.length){const[e,n,o]=(0,B.bi)((0,B.xp)(r)),a=R(e,n,o);h({...a,hexInputValue:`#${t}`}),i((0,B.v2)((0,B.hT)([e,n,o])))}else h(e=>({...e,hexInputValue:`#${t}`}))}),A=(0,Y.A)(e=>{const t=e.target.value,r=t.split(",").map(e=>e.trim());if(3===r.length){const e=parseInt(r[0],10),n=parseInt(r[1],10),o=parseInt(r[2],10);if(![e,n,o].some(e=>Number.isNaN(e)||e<0||e>255)){const[r,a,l]=(0,B.bi)([e,n,o]),s=R(r,a,l);return h({...s,rgbInputValue:t}),void i((0,B.v2)((0,B.hT)([r,a,l])))}}h(e=>({...e,rgbInputValue:t}))}),C=(0,Y.A)(()=>{h(e=>({...e,hexInputValue:u.toUpperCase()}))}),w=(0,Y.A)(()=>{const e=(0,B.hT)([c.hue,c.saturation,c.brightness]);h(t=>({...t,rgbInputValue:`${e[0]}, ${e[1]}, ${e[2]}`}))}),x=(0,Y.A)(e=>{i(e),s()}),b=(0,Y.A)(e=>{f(e),m(f)}),y=(0,Y.A)(e=>{g(e),m(g)});return{hueSliderRef:t,satBrightRef:r,selectedColor:o,setSelectedColor:i,isColorPickerOpen:a,openColorPicker:l,closeColorPicker:s,hue:c.hue,saturation:c.saturation,brightness:c.brightness,pickerColor:u,hexInputValue:c.hexInputValue,rgbInputValue:c.rgbInputValue,handleHueChange:f,handleSatBrightChange:g,handleHexInput:v,handleHexInputBlur:C,handleRgbInput:A,handleRgbInputBlur:w,handleColorSelect:x,handleHueSliderMouseDown:b,handleSatBrightMouseDown:y}}({initialColor:W[1]}),et=(0,Y.A)(e=>{const t=ie.current;if(!t)return{x:0,y:0};const r=t.getBoundingClientRect(),{x:n,y:o}=(0,d.A)(e);return{x:n-r.left,y:o-r.top}}),tt=(0,Y.A)(e=>{ye(t=>[...t,e]),Ne([])}),{getCroppedRegion:rt,initCropState:nt,handleCropperDragStart:ot,handleCornerResizeStart:it,handleAspectRatioChange:at,handleRotationChange:lt,handleRotationChangeEnd:st,handleQuarterRotate:ct,handleFlip:dt}=function({imageRef:e,displaySize:t,getDisplayScale:r,getDisplayCoordinates:o,onAction:i,cropState:a,setCropState:l}){const s=(0,n.li)(),c=(0,n.li)(D);c.current=a;const d=(0,Y.A)(t=>{if("free"===t)return;if("original"===t&&e.current){const{width:t,height:r}=f(e.current.width,e.current.height,c.current.quarterTurns);return t/r}const r=k.find(e=>e.value===t);return r?.ratio}),h=(e,t)=>{const r=()=>{t(),document.removeEventListener("mousemove",e),document.removeEventListener("touchmove",e),document.removeEventListener("mouseup",r),document.removeEventListener("touchend",r)};document.addEventListener("mousemove",e),document.addEventListener("touchmove",e),document.addEventListener("mouseup",r),document.addEventListener("touchend",r)},u=(0,Y.A)(n=>{const d=e.current;if(!d||0===t.width)return;n.preventDefault(),n.stopPropagation();const{x:u,y:p}=o(n),m=r();s.current={startX:u,startY:p,cropperX:a.cropperX,cropperY:a.cropperY,cropperWidth:a.cropperWidth,cropperHeight:a.cropperHeight},h(e=>{if(!s.current)return;const t=o(e),r=t.x-s.current.startX,n=t.y-s.current.startY,i=r/m,a=n/m,h=s.current.cropperX+i,u=s.current.cropperY+a,{width:p,height:g}=f(d.width,d.height,c.current.quarterTurns),v=(0,S.qE)(h,0,p-s.current.cropperWidth),A=(0,S.qE)(u,0,g-s.current.cropperHeight);l(e=>({...e,cropperX:v,cropperY:A}))},()=>{if(s.current){const e=s.current;if(e.cropperX!==c.current.cropperX||e.cropperY!==c.current.cropperY){const t={...c.current,cropperX:e.cropperX,cropperY:e.cropperY,cropperWidth:e.cropperWidth,cropperHeight:e.cropperHeight};i({type:"crop",previousState:t})}}s.current=void 0})}),p=(0,Y.A)((n,u)=>{const p=e.current;if(!p||0===t.width)return;n.preventDefault(),n.stopPropagation();const{x:m,y:g}=o(n),v=r();s.current={startX:m,startY:g,cropperX:a.cropperX,cropperY:a.cropperY,cropperWidth:a.cropperWidth,cropperHeight:a.cropperHeight},h(e=>{if(!s.current)return;const t=o(e),r=t.x-s.current.startX,n=t.y-s.current.startY,i=r/v,a=n/v,h=s.current,{width:m,height:g}=f(p.width,p.height,c.current.quarterTurns);let A=h.cropperX,C=h.cropperY,w=h.cropperWidth,x=h.cropperHeight;const Y=d(c.current.aspectRatio);if("topLeft"===u?(A=h.cropperX+i,C=h.cropperY+a,w=h.cropperWidth-i,x=h.cropperHeight-a):"topRight"===u?(C=h.cropperY+a,w=h.cropperWidth+i,x=h.cropperHeight-a):"bottomLeft"===u?(A=h.cropperX+i,w=h.cropperWidth-i,x=h.cropperHeight+a):"bottomRight"===u&&(w=h.cropperWidth+i,x=h.cropperHeight+a),Y)if(w/x>Y){const e=x*Y;"topLeft"!==u&&"bottomLeft"!==u||(A+=w-e),w=e}else{const e=w/Y;"topLeft"!==u&&"topRight"!==u||(C+=x-e),x=e}w<M&&("topLeft"!==u&&"bottomLeft"!==u||(A-=M-w),w=M,Y&&(x=M/Y)),x<M&&("topLeft"!==u&&"topRight"!==u||(C-=M-x),x=M,Y&&(w=M*Y));const b=A+w,y=C+x;"topLeft"===u||"bottomLeft"===u?(A=Math.max(0,A),w=b-A):w=Math.min(w,m-A),"topLeft"===u||"topRight"===u?(C=Math.max(0,C),x=y-C):x=Math.min(x,g-C),l(e=>({...e,cropperX:A,cropperY:C,cropperWidth:w,cropperHeight:x}))},()=>{if(s.current){const e=s.current;if(e.cropperX!==c.current.cropperX||e.cropperY!==c.current.cropperY||e.cropperWidth!==c.current.cropperWidth||e.cropperHeight!==c.current.cropperHeight){const t={...c.current,cropperX:e.cropperX,cropperY:e.cropperY,cropperWidth:e.cropperWidth,cropperHeight:e.cropperHeight};i({type:"crop",previousState:t})}}s.current=void 0})}),m=(0,Y.A)(t=>{const r=e.current;if(!r)return;const n={...c.current},{width:o,height:a}=f(r.width,r.height,c.current.quarterTurns);l({...c.current,aspectRatio:t,..._(o,a,d(t))}),i({type:"crop",previousState:n})}),g=(0,Y.A)((e,t)=>{l({aspectRatio:"free",cropperX:0,cropperY:0,cropperWidth:e,cropperHeight:t,rotation:0,quarterTurns:0,flipH:!1})}),v=(0,Y.A)(()=>{const{cropperX:e,cropperY:t,cropperWidth:r,cropperHeight:n}=c.current;return{x:e,y:t,width:r,height:n}}),A=(0,n.li)();return{getCroppedRegion:v,initCropState:g,handleCropperDragStart:u,handleCornerResizeStart:p,handleAspectRatioChange:m,handleRotationChange:(0,Y.A)(t=>{const r=e.current;if(!r)return;A.current||(A.current={...c.current});const{width:n,height:o}=f(r.width,r.height,c.current.quarterTurns);l({...c.current,rotation:(0,S.qE)(t,-90,90),..._(n,o,d(c.current.aspectRatio))})}),handleRotationChangeEnd:(0,Y.A)(()=>{A.current&&(i({type:"crop",previousState:A.current}),A.current=void 0)}),handleQuarterRotate:(0,Y.A)(()=>{const t=e.current;if(!t)return;const r={...c.current},n=(c.current.quarterTurns+1)%4,{width:o,height:a}=f(t.width,t.height,n);l({...c.current,quarterTurns:n,rotation:0,..._(o,a,d(c.current.aspectRatio))}),i({type:"crop",previousState:r})}),handleFlip:(0,Y.A)(()=>{const t=e.current;if(!t)return;const r={...c.current},{width:n}=f(t.width,t.height,c.current.quarterTurns);l({...c.current,flipH:!c.current.flipH,cropperX:n-c.current.cropperX-c.current.cropperWidth}),i({type:"crop",previousState:r})})}}({imageRef:le,displaySize:Me,getDisplayScale:_e,getDisplayCoordinates:et,onAction:tt,cropState:Ae,setCropState:Ce}),ht=(0,n.Kr)(()=>be.filter(e=>"draw"===e.type),[be]),ut=(0,Y.A)(e=>{const t=ie.current;if(!t)return{x:0,y:0};const r=t.getBoundingClientRect(),{x:n,y:o}=(0,d.A)(e),i=t.width/r.width,a=t.height/r.height;return{x:(n-r.left)*i,y:(o-r.top)*a}}),pt=(0,Y.A)((e,t,r,n,o,i,a)=>{const l=N(Ae),{flipH:s}=Ae;let c=e-r,d=t-n;if(0!==l){const e=-l*Math.PI/180,t=Math.cos(e),r=Math.sin(e),n=c*r+d*t;c=c*t-d*r,d=n}return c/=a,d/=a,s&&(c=-c),{x:c+o,y:d+i}}),mt=(0,Y.A)((e,t)=>{const r=rt(),n=le.current,o=r.x+e,i=r.y+t;if(!n||"draw"!==se)return{x:o,y:i};const{width:a,height:l}=f(n.width,n.height,Ae.quarterTurns),s=N(Ae),{flipH:c}=Ae,d=g(a,l,Ae.rotation);return 0!==s||c||1!==d?pt(o,i,a/2,l/2,n.width/2,n.height/2,d):{x:o,y:i}}),ft=(0,Y.A)(e=>{ye(t=>[...t,e]),Ne([])}),{drawTool:gt,setDrawTool:vt,brushSize:At,setBrushSize:Ct,currentDrawAction:wt,handlePointerDown:xt,resetDrawing:Yt}=function({getCanvasCoordinates:e,canvasToImageCoords:t,selectedColor:r,onActionComplete:o}){const[i,a]=(0,n.J0)("pen"),[l,s]=(0,n.J0)(5),[c,d]=(0,n.J0)(void 0),[h,u,p]=(0,F.A)(!1),m=(0,n.li)(void 0),f=(0,Y.A)(r=>{if(!h||!c||m.current===c)return;const n=e(r),o=t(n.x,n.y),i="shiftKey"in r&&r.shiftKey,a=i?[c.points[0],o]:[...c.points,o];d({...c,points:a,isShiftPressed:i})}),g=(0,Y.A)(e=>{if(!h||!c||m.current===c)return;p();const t={...c,completedAt:Date.now()};m.current=t,d(void 0),t.points.length>1&&o(t),document.removeEventListener("mousemove",f),document.removeEventListener("touchmove",f),document.removeEventListener("mouseup",g),document.removeEventListener("touchend",g)}),v=(0,Y.A)(n=>{u();const o=e(n),a=t(o.x,o.y),s="shiftKey"in n&&n.shiftKey;d({type:"draw",tool:i,points:[a],color:r,brushSize:l,isShiftPressed:s}),document.addEventListener("mousemove",f),document.addEventListener("touchmove",f),document.addEventListener("mouseup",g),document.addEventListener("touchend",g)}),A=(0,Y.A)(()=>{d(void 0),p()});return{drawTool:i,setDrawTool:a,brushSize:l,setBrushSize:s,currentDrawAction:c,isDrawing:h,handlePointerDown:v,handlePointerMove:f,handlePointerUp:g,resetDrawing:A}}({getCanvasCoordinates:ut,canvasToImageCoords:mt,selectedColor:Re,onActionComplete:ft}),{canvasSize:bt,renderCanvas:yt,resetCanvasSize:St}=function({canvasRef:e,imageRef:t,mode:r,cropState:o,drawActions:i,currentDrawAction:a}){const[l,s]=(0,n.J0)({width:0,height:0}),c=(0,Y.A)(()=>{const n=e.current,c=t.current;if(!n||!c)return;const d={x:o.cropperX,y:o.cropperY,width:o.cropperWidth,height:o.cropperHeight},h=n.getContext("2d");if(!h)return;const u=N(o),{flipH:p}=o;if("crop"===r){const{width:e,height:t}=f(c.width,c.height,o.quarterTurns),r=g(e,t,o.rotation);if(l.width!==e||l.height!==t)return void s({width:e,height:t});!function(e,t,r,n,o,i,a=0,l=!1,s=0,c=1){e.clearRect(0,0,e.canvas.width,e.canvas.height),e.save(),(0!==a||l||0!==s||1!==c)&&A(e,t,a,l,s,c),i?e.drawImage(t,0,0):e.drawImage(t,r.x,r.y,r.width,r.height,0,0,n,o),e.restore()}(h,c,d,e,t,!0,u,p,o.quarterTurns,r),0!==u||p||0!==o.quarterTurns||1!==r?(h.save(),A(h,c,u,p,o.quarterTurns,r),C(h,i,0,0,void 0,c.width,c.height),h.restore()):C(h,i)}else{if(d.width<=0||d.height<=0)return;const e=Math.round(d.width),t=Math.round(d.height);if(l.width!==e||l.height!==t)return void s({width:e,height:t});const{width:r,height:n}=f(c.width,c.height,o.quarterTurns),m=g(r,n,o.rotation),v=0!==u||p||0!==o.quarterTurns||1!==m,w=document.createElement("canvas");w.width=r,w.height=n;const x=w.getContext("2d");v&&(x.save(),A(x,c,u,p,o.quarterTurns,m)),x.drawImage(c,0,0),C(x,i,0,0,a,c.width,c.height),v&&x.restore(),h.drawImage(w,d.x,d.y,d.width,d.height,0,0,e,t)}}),d=(0,n.Kr)(()=>(0,y.nb)(y.IJ,c),[c]);(0,n.vJ)(()=>{d()},[i,a,l,r,o,d]);const h=(0,n.li)();(0,n.vJ)(()=>{const e=()=>i.some(e=>"arrow"===e.tool&&e.completedAt&&Date.now()-e.completedAt<200);if(!e())return;const t=()=>{c(),e()&&(h.current=requestAnimationFrame(t))};return h.current=requestAnimationFrame(t),()=>{h.current&&cancelAnimationFrame(h.current)}},[i,c]);const u=(0,Y.A)(()=>{s({width:0,height:0})});return{canvasSize:l,renderCanvas:c,resetCanvasSize:u}}({canvasRef:ie,imageRef:le,mode:se,cropState:Ae,drawActions:ht,currentDrawAction:wt});(0,n.vJ)(()=>{e&&t&&(ye([]),Ne([]),Yt(),ce(ne),pe(void 0),he(!1),Ye(void 0),Ie(W[1]),Ce(D),St(),Be(),ve({width:0,height:0}),le.current=void 0)},[e,t]),(0,n.vJ)(()=>{e&&t&&(async()=>{let e;try{e=await(0,h.NN)(t)}catch{return}le.current=e,ve({width:e.width,height:e.height}),nt(e.width,e.height),yt()})()},[e,t,yt,nt]),(0,n.vJ)(()=>{if(e)return(0,c.A)(()=>{Te?He():v()})},[e,Te,He,v]),(0,n.vJ)(()=>{if(!e)return;const t=e=>{const t=e.metaKey||e.ctrlKey,r=e.key.toLowerCase();t&&"z"===r&&!e.shiftKey?(e.preventDefault(),Nt()):(t&&"z"===r&&e.shiftKey||a.H8&&t&&"y"===r)&&(e.preventDefault(),kt())};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e]);const Nt=(0,Y.A)(()=>{const e=ke.current;if(0===e.length)return;const t=e[e.length-1],r=e.slice(0,-1);if("crop"===t.type){const e={...Ae};Ce(t.previousState),Ne(t=>[...t,{type:"crop",previousState:e}])}else Ne(e=>[...e,t]);ye(r)}),kt=(0,Y.A)(()=>{const e=De.current;if(0===e.length)return;const t=e[e.length-1],r=e.slice(0,-1);if("crop"===t.type){const e={...Ae};Ce(t.previousState),ye(t=>[...t,{type:"crop",previousState:e}])}else ye(e=>[...e,t]);Ne(r)}),Dt=(0,Y.A)(e=>{const t=ie.current;if(t&&0!==t.width&&0!==t.height)try{const r=t.offsetWidth,n=t.offsetHeight,o=document.createElement("canvas");o.width=r,o.height=n;const i=o.getContext("2d");i&&(i.drawImage(t,0,0,r,n),pe(o.toDataURL()),fe(e?e(r,n):`width: ${r}px; height: ${n}px`))}catch{}}),Mt=(0,Y.A)(()=>{V>0&&(Dt((e,t)=>{const r=ae.current;if(!r)return`width: ${e}px; height: ${t}px`;const n=f(ge.width,ge.height,(Ae.quarterTurns+1)%4),o=r.getBoundingClientRect(),i=getComputedStyle(r),a=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),l=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),s=Math.min((o.width-a)/n.width,(o.height-l-6.5*p.$)/n.height,1),c=n.width*s;return`width: ${e}px; height: ${t}px; --end-sx: ${n.height*s/e}; --end-sy: ${c/t}`}),Ye("rotate")),ct(),V>0&&setTimeout(()=>{Ye(void 0),pe(void 0)},300)}),_t=(0,Y.A)(()=>{V>0&&(Dt(),Ye("flip")),dt(),V>0&&setTimeout(()=>{Ye(void 0),pe(void 0)},300)}),Bt=(0,Y.A)(()=>{const e=le.current;if(!e)return;const t=rt();if(t.width<=0||t.height<=0)return;const n=N(Ae),{flipH:o}=Ae,{width:i,height:a}=f(e.width,e.height,Ae.quarterTurns),l=g(i,a,Ae.rotation),s=0!==n||o||0!==Ae.quarterTurns||1!==l,c=document.createElement("canvas");c.width=i,c.height=a;const d=c.getContext("2d");if(!d)return;s&&(d.save(),A(d,e,n,o,Ae.quarterTurns,l)),d.drawImage(e,0,0),C(d,ht,0,0,void 0,e.width,e.height),s&&d.restore();const u=document.createElement("canvas");u.width=Math.round(t.width),u.height=Math.round(t.height);const p=u.getContext("2d");if(!p)return;p.drawImage(c,t.x,t.y,t.width,t.height,0,0,t.width,t.height);const w=r||"image/jpeg";u.toBlob(e=>{if(e){const t=m||`image.${function(e){return e.split("/")[1]}(w)}`,r=(0,h.ti)(e,t);K(r),v()}},w)}),Ft=re.findIndex(e=>e.type===se),Lt=(0,Y.A)(e=>{const t=re[e];t&&t.type!==se&&(V>0&&("draw"===t.type?Dt((e,t)=>{const r=_e(),n=Ae.cropperWidth*r,o=Ae.cropperHeight*r,i=Ae.cropperX*r,a=Ae.cropperY*r;return(0,s.A)(`width: ${e}px`,`height: ${t}px`,`--crop-top: ${a}px`,`--crop-right: ${e-(i+n)}px`,`--crop-bottom: ${t-(a+o)}px`,`--crop-left: ${i}px`,`--offset-x: ${e/2-(i+n/2)}px`,`--offset-y: ${t/2-(a+o/2)}px`)}):Dt(),he(!0),setTimeout(()=>{he(!1),pe(void 0)},300)),ce(t.type))}),Rt=be.length>0,It=Se.length>0,Tt=de&&"draw"===se,Et=de&&"crop"===se,Ht="crop"===se||Tt,Ot=_e(),$t=(0,n.Kr)(()=>{if(0===Me.width)return"";if("crop"===se){const e=(0,s.A)(`width: ${Me.width}px`,`height: ${Me.height}px`);if(de){const t=Ae.cropperWidth*Ot,r=Ae.cropperHeight*Ot,n=Ae.cropperX*Ot,o=Ae.cropperY*Ot;return(0,s.A)(e,`--crop-top: ${o}px`,`--crop-right: ${Me.width-(n+t)}px`,`--crop-bottom: ${Me.height-(o+r)}px`,`--crop-left: ${n}px`,`--offset-x: ${Me.width/2-(n+t/2)}px`,`--offset-y: ${Me.height/2-(o+r/2)}px`)}return e}const e=Ae.cropperWidth*Ot,t=Ae.cropperHeight*Ot;return(0,s.A)(`width: ${e}px`,`height: ${t}px`)},[Me,Ae,Ot,se,de]);if(j)return(0,z.Y)(O.A,{children:(0,z.FD)("div",{ref:Z,className:J.root,children:[(0,z.FD)("div",{ref:ae,className:J.canvasArea,children:[(0,z.FD)("div",{className:J.canvasContainer,children:[(0,z.Y)("canvas",{ref:ie,className:(0,l.A)(J.canvas,Tt&&J.transitioningToDraw,Et&&J.transitioningToCrop,"draw"===se&&!de&&J.drawMode,"rotate"===xe&&J.transformAnimating,"flip"===xe&&J.flipAnimating),width:bt.width||void 0,height:bt.height||void 0,style:$t,onMouseDown:"draw"===se?xt:void 0,onTouchStart:"draw"===se?xt:void 0}),ue&&(0,z.Y)("img",{className:(0,l.A)(J.canvasSnapshot,Tt&&J.zoomIn,Et&&J.fadeOut,"rotate"===xe&&J.rotateFade,"flip"===xe&&J.flipFade),src:ue,style:me,alt:"",draggable:!1}),Ht&&!xe&&Me.width>0&&(0,z.Y)(G,{cropState:Ae,displaySize:Me,scale:Ot,isFadingOut:Tt,onCropperDragStart:ot,onCornerResizeStart:it})]}),(0,z.FD)("div",{className:(0,l.A)(J.canvasControls,Tt&&J.fadingOut,Et&&J.fadingIn,"draw"===se&&!de&&J.hidden),children:[(0,z.Y)(E.A,{round:!0,color:"translucent",size:"smaller",onClick:Mt,iconName:"rotate"}),(0,z.Y)(te,{value:Ae.rotation,onChange:lt,onChangeEnd:st}),(0,z.Y)(E.A,{round:!0,color:"translucent",size:"smaller",onClick:_t,iconName:"flip"})]})]}),(0,z.FD)("div",{className:J.editPanel,children:[(0,z.FD)("div",{className:J.panelHeader,children:[(0,z.Y)(E.A,{round:!0,color:"translucent",size:"smaller",onClick:v,children:(0,z.Y)(T.A,{name:"close"})}),(0,z.Y)("div",{className:J.headerTitle,children:q("EditMedia")}),(0,z.FD)("div",{className:J.headerActions,children:[(0,z.Y)(E.A,{round:!0,color:"translucent",size:"smaller",onClick:Nt,disabled:!Rt,iconName:"undo"}),(0,z.Y)(E.A,{round:!0,color:"translucent",size:"smaller",onClick:kt,disabled:!It,iconName:"redo"})]})]}),(0,z.FD)("div",{className:J.panelTabs,children:[(0,z.Y)(P.Ay,{ref:Q,name:(0,u.P)("slideOptimized",V,void 0,q.isRtl),activeKey:Ft,shouldRestoreHeight:!0,className:J.panelContent,children:(()=>{switch(se){case"crop":return(0,z.Y)(U,{currentRatio:Ae.aspectRatio,onRatioChange:at});case"draw":return(0,z.Y)(ee,{predefinedColors:W,selectedColor:Re,isColorPickerOpen:Te,hue:Oe,saturation:$e,brightness:Pe,pickerColor:Je,hexInputValue:ze,rgbInputValue:Ke,brushSize:At,drawTool:gt,hueSliderRef:Fe,satBrightRef:Le,onColorSelect:Ze,onOpenColorPicker:Ee,onCloseColorPicker:He,onHueSliderMouseDown:je,onHueChange:Ge,onSatBrightMouseDown:Qe,onSatBrightChange:qe,onHexInput:Ve,onHexInputBlur:Xe,onRgbInput:We,onRgbInputBlur:Ue,onBrushSizeChange:Ct,onToolChange:vt});default:return}})()}),(0,z.Y)($.A,{tabs:oe,activeTab:Ft,onSwitchTab:Lt,className:J.modeTabs,tabClassName:J.modeTab})]})]}),(0,z.Y)(H.A,{isShown:be.length>0,iconName:"check",className:J.saveButton,onClick:Bt,ariaLabel:q("Save")})]})})})},283(e,t,r){r.d(t,{A:()=>l});var n=r(84051),o=r(87357);const i="AtWkrIxV";var a=r(20021);const l=(0,n.ph)(()=>(0,a.FD)("div",{className:"Oob7moh7",children:[(0,a.Y)("div",{className:(0,o.A)("ao0o6F_1",i)}),(0,a.FD)("div",{className:"e94nYlC4",children:[(0,a.Y)("div",{className:(0,o.A)("ANs9RCJu",i)}),(0,a.Y)("div",{className:(0,o.A)("RSn3O5Rx",i)})]})]}))},55158(e,t,r){r.d(t,{A:()=>l});var n=r(84051),o=r(87357),i=r(95807),a=r(20021);const l=(0,n.ph)(({variant:e="rectangular",animation:t="none",width:r,height:n,forceAspectRatio:l,inline:s,className:c,style:d})=>{const h=(0,o.A)("Skeleton",e,t,c,s&&"inline"),u=r&&n?`aspect-ratio: ${r}/${n}`:void 0,p=(0,i.A)(d,l&&u,Boolean(r)&&`width: ${r}px`,!l&&Boolean(n)&&`height: ${n}px`);return(0,a.Y)("div",{className:h,style:p,children:s&&" "})})},41730(e,t,r){r.d(t,{A:()=>s});var n=r(84051),o=r(87357),i=r(55158);var a=r(20021);const l=[[85,90,87,83,87,70],[81,75,83,87,81,93],[73,87,91,75,87,91]],s=(0,n.ph)(({lines:e=6,className:t})=>{const r=(0,n.Kr)(()=>{const t=Math.floor(Math.random()*l.length),r=l[t];return Array.from({length:e},(e,t)=>r[t%r.length])},[e]);return(0,a.Y)("div",{className:(0,o.A)("HenC8uSU",t),children:r.map((e,t)=>(0,a.Y)(i.A,{variant:"rounded-rect",animation:"fast-wave",className:"j0EaVKZd",style:`width: ${e}%`},t))})})}}]);
|
||
//# sourceMappingURL=4765.e56108b7e4519b47a562.js.map
|