(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[9418],{38672:e=>{e.exports={"nav-button":"nav-button-znwuaSC1",link:"link-znwuaSC1",background:"background-znwuaSC1",icon:"icon-znwuaSC1","flip-icon":"flip-icon-znwuaSC1","size-large":"size-large-znwuaSC1","preserve-paddings":"preserve-paddings-znwuaSC1","size-medium":"size-medium-znwuaSC1","size-small":"size-small-znwuaSC1","size-xsmall":"size-xsmall-znwuaSC1","size-xxsmall":"size-xxsmall-znwuaSC1","visually-hidden":"visually-hidden-znwuaSC1"}},41427:e=>{e.exports={dialog:"dialog-aRAWUDhF",rounded:"rounded-aRAWUDhF",shadowed:"shadowed-aRAWUDhF",fullscreen:"fullscreen-aRAWUDhF",darker:"darker-aRAWUDhF",backdrop:"backdrop-aRAWUDhF"}},72908:e=>{e.exports={dialog:"dialog-b8SxMnzX",wrapper:"wrapper-b8SxMnzX",separator:"separator-b8SxMnzX",bounded:"bounded-b8SxMnzX"}},74714:e=>{e.exports={"small-height-breakpoint":"(max-height: 360px)",container:"container-BZKENkhT",unsetAlign:"unsetAlign-BZKENkhT",title:"title-BZKENkhT",subtitle:"subtitle-BZKENkhT",textWrap:"textWrap-BZKENkhT",ellipsis:"ellipsis-BZKENkhT",close:"close-BZKENkhT",icon:"icon-BZKENkhT"}},47156:e=>{e.exports={"tablet-normal-breakpoint":"(max-width: 768px)","tooltip-offset":"20px",dialog:"dialog-qyCw0PaN",dragging:"dragging-qyCw0PaN",mobile:"mobile-qyCw0PaN",fullscreen:"fullscreen-qyCw0PaN",dialogAnimatedAppearance:"dialogAnimatedAppearance-qyCw0PaN",dialogAnimation:"dialogAnimation-qyCw0PaN",dialogTooltip:"dialogTooltip-qyCw0PaN"}},15015:e=>{e.exports={separator:"separator-Pf4rIzEt"}},53177:(e,t,i)=>{"use strict";i.d(t,{CloseButton:()=>_});var s=i(50959),n=i(64388),o=i(17105),a=i.n(o),r=i(15130),l=i.n(r),d=i(38822),c=i.n(d),h=i(63346),u=i.n(h),p=i(34983),g=i.n(p);function m(e="large"){switch(e){case"large":return a();case"medium":default:return l();case"small":return c();case"xsmall":return u();case"xxsmall":return g()}}const _=s.forwardRef(((e,t)=>s.createElement(n.NavButton,{...e,ref:t,icon:m(e.size)})))},64388:(e,t,i)=>{"use strict";i.d(t,{NavButton:()=>h});var s=i(50959),n=i(97754),o=i.n(n),a=i(9745),r=(i(49406),i(38672)),l=i.n(r);function d(e){const{size:t="large",preservePaddings:i,isLink:s,flipIconOnRtl:n,className:a}=e;return o()(l()["nav-button"],l()[`size-${t}`],i&&l()["preserve-paddings"],n&&l()["flip-icon"],s&&l().link,a)}function c(e){const{children:t,icon:i}=e;return s.createElement(s.Fragment,null,s.createElement("span",{className:l().background}),s.createElement(a.Icon,{icon:i,className:l().icon,"aria-hidden":!0}),t&&s.createElement("span",{className:l()["visually-hidden"]},t))}const h=(0,s.forwardRef)(((e,t)=>{const{icon:i,type:n="button",preservePaddings:o,flipIconOnRtl:a,size:r,"aria-label":l,...h}=e;return s.createElement("button",{...h,className:d({...e,children:l}),ref:t,type:n},s.createElement(c,{icon:i},l))}));h.displayName="NavButton";var u=i(21593),p=i(53017);(0,s.forwardRef)(((e,t)=>{const{icon:i,renderComponent:n,"aria-label":o,...a}=e,r=n??u.CustomComponentDefaultLink;return s.createElement(r,{...a,className:d({...e,children:o,isLink:!0}),reference:(0,
p.isomorphicRef)(t)},s.createElement(c,{icon:i},o))})).displayName="NavAnchorButton"},49406:(e,t,i)=>{"use strict";var s,n,o,a;!function(e){e.Primary="primary",e.QuietPrimary="quiet-primary",e.Secondary="secondary",e.Ghost="ghost"}(s||(s={})),function(e){e.XXSmall="xxsmall",e.XSmall="xsmall",e.Small="small",e.Medium="medium",e.Large="large",e.XLarge="xlarge",e.XXLarge="xxlarge"}(n||(n={})),function(e){e.Brand="brand",e.Blue="blue",e.Gray="gray",e.LightGray="light-gray",e.Green="green",e.Red="red",e.Black="black",e.Gradient="gradient",e.BlackFriday="black-friday",e.CyberMonday="cyber-monday",e.Coupon="coupon",e.Offer="offer",e.Space="space"}(o||(o={})),function(e){e.Semibold18px="semibold18px",e.Semibold16px="semibold16px",e.Semibold14px="semibold14px",e.Medium16px="medium16px",e.Regular16px="regular16px",e.Regular14px="regular14px",e.Regular12px="regular12px"}(a||(a={}))},38952:(e,t,i)=>{"use strict";function s(e){const{reference:t,...i}=e;return{...i,ref:t}}i.d(t,{renameRef:()=>s})},21593:(e,t,i)=>{"use strict";i.d(t,{CustomComponentDefaultLink:()=>o});var s=i(50959),n=i(38952);function o(e){return s.createElement("a",{...(0,n.renameRef)(e)})}s.PureComponent},94489:(e,t,i)=>{"use strict";function s(e){return null!=e}function n(e,t){return[e,t].filter(s).join(" ")}i.d(t,{dataQaIds:()=>n})},53017:(e,t,i)=>{"use strict";function s(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function n(e){return s([e])}i.d(t,{isomorphicRef:()=>n,mergeRefs:()=>s})},52778:(e,t,i)=>{"use strict";i.d(t,{OutsideEvent:()=>n});var s=i(36383);function n(e){const{children:t,...i}=e;return t((0,s.useOutsideEvent)(i))}},79418:(e,t,i)=>{"use strict";i.d(t,{AdaptivePopupDialog:()=>F});var s=i(50959),n=i(50151),o=i(97754),a=i.n(o),r=i(68335),l=i(24640),d=i(35749),c=i(9722),h=i(1109),u=i(73986),p=i(90692),g=i(95711);var m=i(52092),_=i(76422),f=i(11542),v=i(53177);const y=s.createContext({setHideClose:()=>{}});var w=i(74714);function x(e){const{titleId:t,title:n,titleTextWrap:o=!1,titleClassName:r,subtitle:l,showCloseIcon:d=!0,onClose:c,onCloseButtonKeyDown:h,renderBefore:u,renderAfter:p,draggable:g,className:m,unsetAlign:_,closeAriaLabel:x=f.t(null,void 0,i(47742)),closeButtonReference:b}=e,[E,C]=(0,s.useState)(!1);return s.createElement(y.Provider,{value:{setHideClose:C}},s.createElement("div",{className:a()(w.container,m,(l||_)&&w.unsetAlign)},u,s.createElement("div",{id:t,className:w.title,"data-dragg-area":g},s.createElement("div",{className:a()(o?w.textWrap:w.ellipsis,r)},n),l&&s.createElement("div",{className:a()(w.ellipsis,w.subtitle)},l)),p,d&&!E&&s.createElement(v.CloseButton,{className:w.close,"data-qa-id":"close","aria-label":x,onClick:c,onKeyDown:h,ref:b,size:"medium",preservePaddings:!0})))}var b=i(53017),E=i(90186),C=i(4226),D=i(37103),S=i(72908);const k={vertical:20},A={vertical:0};class F extends s.PureComponent{constructor(){super(...arguments),this._controller=null,this._reference=null,this._orientationMediaQuery=null,this._embedResizerOverridesEnabled=D.enabled("embed_resizer_overrides"),
this._titleId=`title_${(0,C.randomHash)()}`,this._renderChildren=(e,t)=>(this._controller=e,this.props.render({requestResize:this._requestResize,centerAndFit:this._centerAndFit,isSmallWidth:t})),this._handleReference=e=>this._reference=e,this._handleCloseBtnClick=()=>{this.props.onKeyboardClose&&this.props.onKeyboardClose(),this._handleClose()},this._handleClose=()=>{this.props.onClose()},this._handleOpen=()=>{void 0!==this.props.onOpen&&this.props.isOpened&&this.props.onOpen(this.props.fullScreen||window.matchMedia(u.DialogBreakpoints.TabletSmall).matches)},this._handleKeyDown=e=>{if(!e.defaultPrevented){if(this.props.onKeyDown&&this.props.onKeyDown(e),27===(0,r.hashFromEvent)(e)){if(e.defaultPrevented)return;if(this.props.forceCloseOnEsc&&this.props.forceCloseOnEsc())return this.props.onKeyboardClose&&this.props.onKeyboardClose(),void this._handleClose();const{activeElement:i}=document;if(null!==i){if(e.preventDefault(),"true"===(t=i).getAttribute("data-haspopup")&&"true"!==t.getAttribute("data-expanded"))return void this._handleClose();const s=this._reference;if(null!==s&&(0,d.isTextEditingField)(i))return void s.focus();if(s?.contains(i))return this.props.onKeyboardClose&&this.props.onKeyboardClose(),void this._handleClose()}}var t,i;(function(e){if("function"==typeof e)return e();return Boolean(e)})(this.props.disableTabNavigationContainment)||(i=e,[9,r.Modifiers.Shift+9].includes((0,r.hashFromEvent)(i))&&i.stopPropagation())}},this._requestResize=()=>{null!==this._controller&&this._controller.recalculateBounds()},this._centerAndFit=()=>{null!==this._controller&&this._controller.centerAndFit()},this._calculatePositionWithOffsets=(e,t)=>{const i=(0,n.ensureDefined)(this.props.fullScreenViewOffsets).value();return{top:i.top,left:(0,l.isRtl)()?-i.right:i.left,width:t.clientWidth-i.left-i.right,height:t.clientHeight-i.top-i.bottom}}}componentDidMount(){this.props.ignoreClosePopupsAndDialog||_.subscribe(m.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleClose,null),this._handleOpen(),void 0!==this.props.onOpen&&(this._orientationMediaQuery=window.matchMedia("(orientation: portrait)"),this._orientationMediaQuery.addEventListener("change",this._handleOpen)),this.props.fullScreenViewOffsets&&this.props.fullScreen&&this.props.fullScreenViewOffsets.subscribe(this._requestResize);const{backdrop:e,draggable:t=!e,centerOnResize:i=!t}=this.props;i&&window.addEventListener("resize",this._centerAndFit)}componentWillUnmount(){this.props.ignoreClosePopupsAndDialog||_.unsubscribe(m.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleClose,null),null!==this._orientationMediaQuery&&this._orientationMediaQuery.removeEventListener("change",this._handleOpen),this.props.fullScreenViewOffsets&&this.props.fullScreen&&this.props.fullScreenViewOffsets.unsubscribe(this._requestResize),window.removeEventListener("resize",this._centerAndFit)}focus(){(0,n.ensureNotNull)(this._reference).focus()}getElement(){return this._reference}contains(e){return this._reference?.contains(e)??!1}render(){
const{className:e,wrapperClassName:t,headerClassName:i,isOpened:n,title:o,titleTextWrap:r,titleClassName:l,dataName:d,dataQaId:m,onClickOutside:_,onClickBackdrop:f,additionalElementPos:v,additionalHeaderElement:y,backdrop:w,shouldForceFocus:C=!0,shouldReturnFocus:D,onForceFocus:F,showSeparator:M,subtitle:T,draggable:N=!w,fullScreen:B=!1,showCloseIcon:P=!0,rounded:z=!0,isAnimationEnabled:O,growPoint:L,dialogTooltip:R,unsetHeaderAlign:I,onDragStart:H,dataDialogName:W,closeAriaLabel:K,containerAriaLabel:X,reference:$,containerTabIndex:q,closeButtonReference:U,onCloseButtonKeyDown:Y,shadowed:G,fullScreenViewOffsets:V,onClick:Z}=this.props,Q=this.props.fixedBody??(!!w||void 0),j="after"!==v?y:void 0,J="after"===v?y:void 0,ee="string"==typeof o?o:W||"",te=(0,E.filterDataProps)(this.props),ie=(0,b.mergeRefs)([this._handleReference,$]);return s.createElement(p.MatchMedia,{rule:u.DialogBreakpoints.SmallHeight},(v=>s.createElement(p.MatchMedia,{rule:u.DialogBreakpoints.TabletSmall},(u=>s.createElement(c.PopupDialog,{rounded:!(u||B)&&z,className:a()(S.dialog,B&&V&&S.bounded,e),isOpened:n,reference:ie,onKeyDown:this._handleKeyDown,onClickOutside:_,onClickBackdrop:f??_,fullscreen:u||B,guard:v?A:k,boundByScreen:u||B,shouldForceFocus:C,onForceFocus:F,shouldReturnFocus:D,backdrop:w,draggable:N,isAnimationEnabled:O,growPoint:L,name:this.props.dataName,dialogTooltip:R,onDragStart:H,containerAriaLabel:X,containerTabIndex:q,calculateDialogPosition:B&&V?this._calculatePositionWithOffsets:void 0,shadowed:G,fixedBody:Q,onClick:Z,...te},s.createElement("div",{role:"dialog","aria-labelledby":void 0!==o?this._titleId:void 0,className:a()(S.wrapper,t),"data-name":d,"data-qa-id":m,"data-dialog-name":ee},void 0!==o&&s.createElement(x,{draggable:N&&!(u||B),onClose:this._handleCloseBtnClick,renderAfter:J,renderBefore:j,subtitle:T,title:o,titleId:this._titleId,titleTextWrap:r,showCloseIcon:P,className:i,titleClassName:l,unsetAlign:I,closeAriaLabel:K,closeButtonReference:U,onCloseButtonKeyDown:Y}),M&&s.createElement(h.Separator,{className:S.separator}),s.createElement(g.PopupContext.Consumer,null,(e=>this._renderChildren(e,u||B)))))))))}}},95711:(e,t,i)=>{"use strict";i.d(t,{PopupContext:()=>s});const s=i(50959).createContext(null)},9722:(e,t,i)=>{"use strict";i.d(t,{PopupDialog:()=>L});var s=i(50959),n=i(97754),o=i.n(n),a=i(50151),r=i(99663),l=i(67961),d=i(90186),c=i(41427),h=i.n(c);class u extends s.PureComponent{constructor(){super(...arguments),this._manager=new l.OverlapManager,this._handleSlot=e=>{this._manager.setContainer(e)}}render(){const{rounded:e=!0,shadowed:t=!0,fullscreen:i=!1,darker:n=!1,className:a,backdrop:l,containerTabIndex:c=-1}=this.props,u=o()(a,h().dialog,e&&h().rounded,t&&h().shadowed,i&&h().fullscreen,n&&h().darker),p=(0,d.filterDataProps)(this.props),g=this.props.style?{...this._createStyles(),...this.props.style}:this._createStyles();return s.createElement(s.Fragment,null,s.createElement(r.SlotContext.Provider,{value:this._manager},l&&s.createElement("div",{onClick:this.props.onClickBackdrop,className:h().backdrop
}),s.createElement("div",{...p,className:u,style:g,ref:this.props.reference,onFocus:this.props.onFocus,onMouseDown:this.props.onMouseDown,onMouseUp:this.props.onMouseUp,onClick:this.props.onClick,onKeyDown:this.props.onKeyDown,tabIndex:c,"aria-label":this.props.containerAriaLabel},this.props.children)),s.createElement(r.Slot,{reference:this._handleSlot}))}_createStyles(){const{bottom:e,left:t,width:i,right:s,top:n,zIndex:o,height:a}=this.props;return{bottom:e,left:t,right:s,top:n,zIndex:o,maxWidth:i,height:a}}}var p,g=i(86431),m=i(52778),_=i(77914),f=i(15754);function v(e,t,i,s){return e+t>s&&(e=s-t),e<i&&(e=i),e}function y(e){return{x:(0,_.clamp)(e.x,20,document.documentElement.clientWidth-20),y:(0,_.clamp)(e.y,20,window.innerHeight-20)}}function w(e){return{x:e.clientX,y:e.clientY}}function x(e){return{x:e.touches[0].clientX,y:e.touches[0].clientY}}!function(e){e[e.MouseGuardZone=20]="MouseGuardZone"}(p||(p={}));class b{constructor(e,t,i={boundByScreen:!0}){this._drag=null,this._canBeTouchClick=!1,this._frame=null,this._onMouseDragStart=e=>{if(0!==e.button||this._isTargetNoDraggable(e))return;e.preventDefault(),document.addEventListener("mousemove",this._onMouseDragMove),document.addEventListener("mouseup",this._onMouseDragEnd);const t=y(w(e));this._dragStart(t)},this._onTouchDragStart=e=>{if(this._isTargetNoDraggable(e))return;this._canBeTouchClick=!0,e.preventDefault(),this._header.addEventListener("touchmove",this._onTouchDragMove,{passive:!1});const t=y(x(e));this._dragStart(t)},this._onMouseDragEnd=e=>{e.target instanceof Node&&this._header.contains(e.target)&&e.preventDefault(),document.removeEventListener("mousemove",this._onMouseDragMove),document.removeEventListener("mouseup",this._onMouseDragEnd),this._onDragStop()},this._onTouchDragEnd=e=>{this._header.removeEventListener("touchmove",this._onTouchDragMove),this._onDragStop(),this._canBeTouchClick&&(this._canBeTouchClick=!1,function(e){if(e instanceof SVGElement){const t=document.createEvent("SVGEvents");t.initEvent("click",!0,!0),e.dispatchEvent(t)}e instanceof HTMLElement&&e.click()}(e.target))},this._onMouseDragMove=e=>{const t=y(w(e));this._dragMove(t)},this._onTouchDragMove=e=>{this._canBeTouchClick=!1,e.preventDefault();const t=y(x(e));this._dragMove(t)},this._onDragStop=()=>{this._drag=null,this._header.classList.remove("dragging"),this._options.onDragEnd&&this._options.onDragEnd()},this._dialog=e,this._header=t,this._options=i,this._header.addEventListener("mousedown",this._onMouseDragStart),this._header.addEventListener("touchstart",this._onTouchDragStart),this._header.addEventListener("touchend",this._onTouchDragEnd)}destroy(){null!==this._frame&&cancelAnimationFrame(this._frame),this._header.removeEventListener("mousedown",this._onMouseDragStart),document.removeEventListener("mouseup",this._onMouseDragEnd),this._header.removeEventListener("touchstart",this._onTouchDragStart),this._header.removeEventListener("touchend",this._onTouchDragEnd),document.removeEventListener("mouseleave",this._onMouseDragEnd)}updateOptions(e){this._options=e}
_dragStart(e){const t=this._dialog.getBoundingClientRect();this._drag={startX:e.x,startY:e.y,finishX:e.x,finishY:e.y,dialogX:t.left,dialogY:t.top};const i=Math.round(t.left),s=Math.round(t.top);this._dialog.style.transform=`translate(${i}px, ${s}px)`,this._header.classList.add("dragging"),this._options.onDragStart&&this._options.onDragStart()}_dragMove(e){if(this._drag){if(this._drag.finishX=e.x,this._drag.finishY=e.y,null!==this._frame)return;this._frame=requestAnimationFrame((()=>{if(this._drag){const t=e.x-this._drag.startX,i=e.y-this._drag.startY;this._moveDialog(this._drag.dialogX+t,this._drag.dialogY+i)}this._frame=null}))}}_moveDialog(e,t){const i=this._dialog.getBoundingClientRect(),{boundByScreen:s}=this._options,n=v(e,i.width,s?0:-1/0,s?window.innerWidth:1/0),o=v(t,i.height,s?0:-1/0,s?window.innerHeight:1/0);this._dialog.style.transform=`translate(${Math.round(n)}px, ${Math.round(o)}px)`}_isTargetNoDraggable(e){return e.target instanceof Element&&null!==e.target.closest("[data-disable-drag]")}}const E={vertical:0};var C,D=i(65718),S=i(95711),k=i(99054),A=i(9343),F=i(4226);!function(e){e.Open="dialog-open",e.Close="dialog-close",e.FullscreenOn="dialog-fullscreen-on",e.FullscreenOff="dialog-fullscreen-off"}(C||(C={}));const M=(0,A.getLogger)("DialogEventDispatcher");class T{constructor(){this._openSessionId=null}dispatch(e){if("dialog-open"===e){if(null!==this._openSessionId)return void M.logError("Multiple calls to open dialog");this._openSessionId=(0,F.randomHash)()}null!==this._openSessionId?(window.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:{dialogSessionId:this._openSessionId}})),"dialog-close"===e&&(this._openSessionId=null)):M.logError("Empty open dialog session id")}}var N=i(84015),B=(i(37103),i(94489)),P=i(47156);P["tooltip-offset"];const z=class{constructor(e,t){this._frame=null,this._isFullscreen=!1,this._handleResize=()=>{null===this._frame&&(this._frame=requestAnimationFrame((()=>{this.recalculateBounds(),this._frame=null})))},this._dialog=e,this._guard=t.guard||E,this._calculateDialogPosition=t.calculateDialogPosition,this._initialHeight=e.style.height,window.addEventListener("resize",this._handleResize)}updateOptions(e){this._guard=e.guard||E,this._calculateDialogPosition=e.calculateDialogPosition}setFullscreen(e){this._isFullscreen!==e&&(this._isFullscreen=e,this.recalculateBounds())}centerAndFit(){const{x:e,y:t}=this.getDialogsTopLeftCoordinates(),i=this._calcAvailableHeight(),s=this._calcDialogHeight();if(i===s)if(this._calculateDialogPosition){const{left:e,top:t}=this._calculateDialogPosition(this._dialog,document.documentElement,this._guard);this._dialog.style.transform=`translate(${Math.round(e)}px, ${Math.round(t)}px)`}else this._dialog.style.height=s+"px";this._dialog.style.top="0px",this._dialog.style.left="0px",this._dialog.style.transform=`translate(${e}px, ${t}px)`}getDialogsTopLeftCoordinates(){const{clientWidth:e,clientHeight:t}=this._getClientDimensions(),i=this._calcDialogHeight(),s=e/2-this._dialog.clientWidth/2,n=t/2-i/2+this._getTopOffset();return{x:Math.round(s),
y:Math.round(n)}}recalculateBounds(){const{clientWidth:e,clientHeight:t}=this._getClientDimensions(),{vertical:i}=this._guard,s=this._calculateDialogPosition?.(this._dialog,{clientWidth:e,clientHeight:t},{vertical:i});if(this._isFullscreen){if(this._dialog.style.top="0px",this._dialog.style.left="0px",this._dialog.style.width="100%",this._dialog.style.height="100%",this._dialog.style.transform="none",s){const{left:e,top:t,width:i,height:n}=s;this._dialog.style.transform=`translate(${Math.round(e)}px, ${Math.round(t)}px)`,i&&(this._dialog.style.width=`${i}px`,this._dialog.style.minWidth="unset"),n&&(this._dialog.style.height=`${n}px`,this._dialog.style.minHeight="unset")}}else if(s){const{left:e,top:t}=s;this._dialog.style.transform=`translate(${Math.round(e)}px, ${Math.round(t)}px)`}else{this._dialog.style.width="",this._dialog.style.height="";const s=this._dialog.getBoundingClientRect(),n=t-2*i,o=v(s.left,s.width,0,e),a=v(s.top,s.height,i,t);this._dialog.style.top="0px",this._dialog.style.left="0px",this._dialog.style.transform=`translate(${Math.round(o)}px, ${Math.round(a)}px)`,this._dialog.style.height=n<s.height?n+"px":this._initialHeight}}destroy(){window.removeEventListener("resize",this._handleResize),null!==this._frame&&(cancelAnimationFrame(this._frame),this._frame=null)}_getClientDimensions(){return{clientHeight:document.documentElement.clientHeight,clientWidth:document.documentElement.clientWidth}}_getTopOffset(){return 0}_calcDialogHeight(){const e=this._calcAvailableHeight();return e<this._dialog.clientHeight?e:this._dialog.clientHeight}_calcAvailableHeight(){return this._getClientDimensions().clientHeight-2*this._guard.vertical}};class O extends s.PureComponent{constructor(e){super(e),this._dialog=null,this._cleanUpFunctions=[],this._prevActiveElement=null,this._eventDispatcher=new T,this._handleDialogRef=e=>{const{reference:t}=this.props;this._dialog=e,"function"==typeof t?t(e):null!=t&&(t.current=e)},this._handleFocus=()=>{this._moveToTop()},this._handleMouseDown=e=>{this._moveToTop()},this._handleTouchStart=e=>{this._moveToTop()},this.state={canFitTooltip:!1},this._prevActiveElement=document.activeElement}render(){return s.createElement(S.PopupContext.Provider,{value:this},s.createElement(m.OutsideEvent,{mouseDown:!0,touchStart:!0,handler:this.props.onClickOutside},(e=>s.createElement("div",{ref:e,"data-outside-boundary-for":this.props.name,onFocus:this._handleFocus,onMouseDown:this._handleMouseDown,onTouchStart:this._handleTouchStart,"data-dialog-name":this.props["data-dialog-name"],"data-tooltip-show-on-focus":"true","data-qa-id":(0,B.dataQaIds)("ui-lib-PopupDialog",this.props.dataQaId)},s.createElement(u,{style:this._applyAnimationCSSVariables(),...this.props,reference:this._handleDialogRef,className:n(P.dialog,(0,N.isOnMobileAppPage)("any")&&!this.props.noMobileAppShadows&&P.mobile,this.props.fullscreen&&P.fullscreen,this.props.className)},!1,this.props.children)))))}componentDidMount(){const{draggable:e,boundByScreen:t,onDragStart:i}=this.props,s=(0,a.ensureNotNull)(this._dialog)
;if(this._eventDispatcher.dispatch("dialog-open"),e){const e=s.querySelector("[data-dragg-area]");if(e&&e instanceof HTMLElement){const n=new b(s,e,{boundByScreen:Boolean(t),onDragStart:i});this._cleanUpFunctions.push((()=>n.destroy())),this._drag=n}}this.props.autofocus&&!s.contains(document.activeElement)&&s.focus(),(this._isFullScreen()||this.props.fixedBody)&&(0,k.setFixedBodyState)(!0);const{guard:n,calculateDialogPosition:o}=this.props;if(this.props.resizeHandler)this._resize=this.props.resizeHandler;else{const e=new z(s,{guard:n,calculateDialogPosition:o});this._cleanUpFunctions.push((()=>e.destroy())),this._resize=e}if(this._isFullScreen()&&this._eventDispatcher.dispatch("dialog-fullscreen-on"),this.props.isAnimationEnabled&&this.props.growPoint&&this._applyAppearanceAnimation(this.props.growPoint),this.props.centeredOnMount&&this._resize.centerAndFit(),this._resize.setFullscreen(this._isFullScreen()),this.props.shouldForceFocus){if(this.props.onForceFocus)return void this.props.onForceFocus(s);s.focus()}if(!s.contains(document.activeElement)){const e=function(e){const t=e.querySelector("[autofocus]:not([disabled])");if(t)return t;if(e.tabIndex>=0)return e;const i=(0,f.getActiveElementSelectors)(),s=Array.from(e.querySelectorAll(i)).filter((0,f.createScopedVisibleElementFilter)(e));let n=Number.NEGATIVE_INFINITY,o=null;for(let e=0;e<s.length;e++){const t=s[e],i=t.getAttribute("tabindex");if(null!==i){const e=parseInt(i,10);!isNaN(e)&&e>n&&(n=e,o=t)}}return o}(s);e instanceof HTMLElement&&e.focus()}}componentDidUpdate(e){const t=e.fullscreen;if(this._resize){const{guard:e,calculateDialogPosition:t}=this.props;this._resize.updateOptions({guard:e,calculateDialogPosition:t}),this._resize.setFullscreen(this._isFullScreen())}if(this._drag&&this._drag.updateOptions({boundByScreen:Boolean(this.props.boundByScreen),onDragStart:this.props.onDragStart}),e.fullscreen!==this.props.fullscreen){const e=this.props.fullscreen;e&&!t?this._eventDispatcher.dispatch("dialog-fullscreen-on"):!e&&t&&this._eventDispatcher.dispatch("dialog-fullscreen-off")}}componentWillUnmount(){if(this.props.shouldReturnFocus&&this._prevActiveElement&&document.body.contains(this._prevActiveElement)&&(null===document.activeElement||document.activeElement===document.body||this._dialog?.contains(document.activeElement)))try{setTimeout((()=>{this._prevActiveElement.focus({preventScroll:!0})}))}catch{}for(const e of this._cleanUpFunctions)e();(this._isFullScreen()||this.props.fixedBody)&&(0,k.setFixedBodyState)(!1),this._isFullScreen()&&this._eventDispatcher.dispatch("dialog-fullscreen-off"),this._eventDispatcher.dispatch("dialog-close")}focus(){this._dialog&&this._dialog.focus()}centerAndFit(){this._resize&&this._resize.centerAndFit()}recalculateBounds(){this._resize&&this._resize.recalculateBounds()}_moveToTop(){this.props.isZIndexFixed||null!==this.context&&this.context.moveToTop()}_applyAnimationCSSVariables(){return{"--animationTranslateStartX":null,"--animationTranslateStartY":null,"--animationTranslateEndX":null,"--animationTranslateEndY":null}}
_applyAppearanceAnimation(e){if(this._resize&&this._dialog){const{x:t,y:i}=e,{x:s,y:n}=this._resize.getDialogsTopLeftCoordinates();this._dialog.style.setProperty("--animationTranslateStartX",`${t}px`),this._dialog.style.setProperty("--animationTranslateStartY",`${i}px`),this._dialog.style.setProperty("--animationTranslateEndX",`${s}px`),this._dialog.style.setProperty("--animationTranslateEndY",`${n}px`),this._dialog.classList.add(P.dialogAnimatedAppearance)}}_handleTooltipFit(){0}_isFullScreen(){return Boolean(this.props.fullscreen)}}O.contextType=D.PortalContext,O.defaultProps={boundByScreen:!0,draggable:!0,centeredOnMount:!0,shouldReturnFocus:!0};const L=(0,g.makeOverlapable)(O,!0)},1109:(e,t,i)=>{"use strict";i.d(t,{Separator:()=>a});var s=i(50959),n=i(97754),o=i(15015);function a(e){return s.createElement("div",{className:n(o.separator,e.className)})}},86431:(e,t,i)=>{"use strict";i.d(t,{makeOverlapable:()=>o});var s=i(50959),n=i(65718);function o(e,t){return class extends s.PureComponent{render(){const{isOpened:i,root:o}=this.props;if(!i)return null;const a=s.createElement(e,{...this.props,ref:this.props.componentRef,zIndex:150});return"parent"===o?a:s.createElement(n.Portal,{shouldTrapFocus:t},a)}}}},17105:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path stroke="currentColor" stroke-width="1.2" d="m1.5 1.5 21 21m0-21-21 21"/></svg>'},15130:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path stroke="currentColor" stroke-width="1.2" d="m1.5 1.5 15 15m0-15-15 15"/></svg>'},38822:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" width="14" height="14"><path stroke="currentColor" stroke-width="1.2" d="m1.5 1.5 11 11m0-11-11 11"/></svg>'},63346:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" width="12" height="12"><path stroke="currentColor" stroke-width="1.2" d="m1.5 1.5 9 9m0-9-9 9"/></svg>'},34983:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10" width="10" height="10"><path stroke="currentColor" stroke-width="1.2" d="m1.5 1.5 7 7m0-7-7 7"/></svg>'}}]);