(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6193],{57554:e=>{e.exports={logo:"logo-PsAlMQQF",hidden:"hidden-PsAlMQQF",xxceptionallysmalldonotusebrv1023:"xxceptionallysmalldonotusebrv1023-PsAlMQQF",xxxsmall:"xxxsmall-PsAlMQQF",xxsmall:"xxsmall-PsAlMQQF",xsmall:"xsmall-PsAlMQQF",small:"small-PsAlMQQF",medium:"medium-PsAlMQQF",large:"large-PsAlMQQF",xlarge:"xlarge-PsAlMQQF",xxlarge:"xxlarge-PsAlMQQF",xxxlarge:"xxxlarge-PsAlMQQF",skeleton:"skeleton-PsAlMQQF",letter:"letter-PsAlMQQF"}},16313:e=>{e.exports={wrapper:"wrapper-TJ9ObuLF",animated:"animated-TJ9ObuLF",pulsation:"pulsation-TJ9ObuLF"}},76773:e=>{e.exports={"default-drawer-min-top-distance":"100px",wrap:"wrap-_HnK0UIN",positionBottom:"positionBottom-_HnK0UIN",backdrop:"backdrop-_HnK0UIN",drawer:"drawer-_HnK0UIN",positionLeft:"positionLeft-_HnK0UIN"}},17888:e=>{e.exports={"tablet-small-breakpoint":"(max-width: 440px)",item:"item-jFqVJoPk",hovered:"hovered-jFqVJoPk",isDisabled:"isDisabled-jFqVJoPk",isActive:"isActive-jFqVJoPk",shortcut:"shortcut-jFqVJoPk",toolbox:"toolbox-jFqVJoPk",withIcon:"withIcon-jFqVJoPk","round-icon":"round-icon-jFqVJoPk",icon:"icon-jFqVJoPk",startSlot:"startSlot-jFqVJoPk",labelRow:"labelRow-jFqVJoPk",label:"label-jFqVJoPk",showOnHover:"showOnHover-jFqVJoPk","disclosure-item-circle-logo":"disclosure-item-circle-logo-jFqVJoPk",showOnFocus:"showOnFocus-jFqVJoPk"}},86186:e=>{e.exports={icon:"icon-WB2y0EnP",dropped:"dropped-WB2y0EnP"}},53885:(e,t,o)=>{"use strict";o.d(t,{getStyleClasses:()=>l,isCircleLogoWithUrlProps:()=>c});var n=o(97754),r=o.n(n),i=o(52292),s=o(57554),a=o.n(s);function l(e,t=2,o){return r()(a().logo,a()[e],o,0===t||1===t?r()(i.skeletonTheme.wrapper,a().skeleton):a().letter,1===t&&i.skeletonTheme.animated)}function c(e){return"logoUrl"in e&&null!==e.logoUrl&&void 0!==e.logoUrl&&0!==e.logoUrl.length}},39416:(e,t,o)=>{"use strict";o.d(t,{useFunctionalRefObject:()=>i});var n=o(50959),r=o(43010);function i(e){const t=(0,n.useMemo)((()=>function(e){const t=o=>{e(o),t.current=o};return t.current=null,t}((e=>{a.current(e)}))),[]),o=(0,n.useRef)(null),i=t=>{if(null===t)return s(o.current,t),void(o.current=null);o.current!==e&&(o.current=e,s(o.current,t))},a=(0,n.useRef)(i);return a.current=i,(0,r.useIsomorphicLayoutEffect)((()=>{if(null!==t.current)return a.current(t.current),()=>a.current(null)}),[e]),t}function s(e,t){null!==e&&("function"==typeof e?e(t):e.current=t)}},52292:(e,t,o)=>{"use strict";o.d(t,{skeletonTheme:()=>r});var n=o(16313);const r=o.n(n)()},90186:(e,t,o)=>{"use strict";function n(e){return i(e,s)}function r(e){return i(e,a)}function i(e,t){const o=Object.entries(e).filter(t),n={};for(const[e,t]of o)n[e]=t;return n}function s(e){const[t,o]=e;return 0===t.indexOf("data-")&&"string"==typeof o}function a(e){return 0===e[0].indexOf("aria-")}o.d(t,{filterAriaProps:()=>r,filterDataProps:()=>n,filterProps:()=>i,isAriaAttribute:()=>a,isDataAttribute:()=>s})},50238:(e,t,o)=>{"use strict";o.d(t,{useRovingTabindexElement:()=>s});var n=o(50959),r=o(39416),i=o(43010);function s(e,t=[]){const[o,s]=(0,
n.useState)(!1),a=(0,r.useFunctionalRefObject)(e);return(0,i.useIsomorphicLayoutEffect)((()=>{const e=a.current;if(null===e)return;const t=e=>{switch(e.type){case"roving-tabindex:main-element":s(!0);break;case"roving-tabindex:secondary-element":s(!1)}};return e.addEventListener("roving-tabindex:main-element",t),e.addEventListener("roving-tabindex:secondary-element",t),()=>{e.removeEventListener("roving-tabindex:main-element",t),e.removeEventListener("roving-tabindex:secondary-element",t)}}),t),[a,o?0:-1]}},59695:(e,t,o)=>{"use strict";o.d(t,{CircleLogo:()=>a,hiddenCircleLogoClass:()=>s});var n=o(50959),r=o(53885),i=o(57554);const s=o.n(i)().hidden;function a(e){const t=(0,r.isCircleLogoWithUrlProps)(e),[o,i]=(0,n.useState)(0),s=(0,n.useRef)(null),a=(0,r.getStyleClasses)(e.size,o,e.className),l=e.alt??e.title??"",c=t?l[0]:e.placeholderLetter;return(0,n.useEffect)((()=>i(s.current?.complete??!t?2:1)),[t]),t&&3!==o?n.createElement("img",{ref:s,className:a,crossOrigin:"",src:e.logoUrl,alt:l,title:e.title,loading:e.loading,onLoad:()=>i(2),onError:()=>i(3),"aria-label":e["aria-label"],"aria-hidden":e["aria-hidden"]}):n.createElement("span",{className:a,title:e.title,"aria-label":e["aria-label"],"aria-hidden":e["aria-hidden"]},c)}},37558:(e,t,o)=>{"use strict";o.d(t,{DrawerContext:()=>s,DrawerManager:()=>i});var n=o(50959),r=o(99054);class i extends n.PureComponent{constructor(e){super(e),this._isBodyFixed=!1,this._addDrawer=e=>{this.setState((t=>({stack:[...t.stack,e]})))},this._removeDrawer=e=>{this.setState((t=>({stack:t.stack.filter((t=>t!==e))})))},this.state={stack:[]}}componentDidUpdate(e,t){!t.stack.length&&this.state.stack.length&&((0,r.setFixedBodyState)(!0),this._isBodyFixed=!0),t.stack.length&&!this.state.stack.length&&this._isBodyFixed&&((0,r.setFixedBodyState)(!1),this._isBodyFixed=!1)}componentWillUnmount(){this.state.stack.length&&this._isBodyFixed&&(0,r.setFixedBodyState)(!1)}render(){return n.createElement(s.Provider,{value:{addDrawer:this._addDrawer,removeDrawer:this._removeDrawer,currentDrawer:this.state.stack.length?this.state.stack[this.state.stack.length-1]:null}},this.props.children)}}const s=n.createContext(null)},41590:(e,t,o)=>{"use strict";o.d(t,{Drawer:()=>h});var n=o(50959),r=o(50151),i=o(97754),s=o(4226),a=o(65718),l=o(37558),c=o(29197),d=o(86656),u=o(76773);var p;function h(e){const{position:t="Bottom",onClose:o,children:d,reference:p,className:h,theme:f=u}=e,v=(0,r.ensureNotNull)((0,n.useContext)(l.DrawerContext)),[g]=(0,n.useState)((()=>(0,s.randomHash)())),b=(0,n.useRef)(null),x=(0,n.useContext)(c.CloseDelegateContext);return(0,n.useLayoutEffect)((()=>((0,r.ensureNotNull)(b.current).focus({preventScroll:!0}),x.subscribe(v,o),v.addDrawer(g),()=>{v.removeDrawer(g),x.unsubscribe(v,o)})),[]),n.createElement(a.Portal,null,n.createElement("div",{ref:p,className:i(u.wrap,u[`position${t}`])},g===v.currentDrawer&&n.createElement("div",{className:u.backdrop,onClick:o}),n.createElement(m,{className:i(f.drawer,u[`position${t}`],h),ref:b,"data-name":e["data-name"],"data-qa-id":e["data-qa-id"]},d)))}
!function(e){e.Left="Left",e.Bottom="Bottom"}(p||(p={}));const m=(0,n.forwardRef)(((e,t)=>{const{className:o,...r}=e;return n.createElement(d.TouchScrollContainer,{className:i(u.drawer,o),tabIndex:-1,ref:t,...r})}))},16396:(e,t,o)=>{"use strict";o.d(t,{DEFAULT_POPUP_MENU_ITEM_THEME:()=>d,PopupMenuItem:()=>p});var n=o(50959),r=o(97754),i=o(51768),s=o(87713),a=o(59695),l=o(76460),c=o(17888);const d=c;function u(e){e.stopPropagation()}function p(e){const{id:t,role:o,className:d,title:p,labelRowClassName:h,labelClassName:m,toolboxClassName:f,shortcut:v,forceShowShortcuts:g,icon:b,iconClassname:x,isActive:w,isDisabled:E,isHovered:k,appearAsDisabled:C,label:D,link:y,showToolboxOnHover:M,showToolboxOnFocus:O,target:T,rel:N,toolbox:F,toolboxRole:P,reference:B,onMouseOut:_,onMouseOver:A,onKeyDown:S,suppressToolboxClick:Q=!0,theme:L=c,tabIndex:R,tagName:I,renderComponent:U,roundedIcon:W,iconAriaProps:H,circleLogo:j,dontClosePopup:z,onClick:V,onClickArg:q,trackEventObject:K,trackMouseWheelClick:J,trackRightClick:G,startSlot:$,...Z}=e,X=(0,n.useRef)(null),Y=(0,n.useMemo)((()=>function(e){function t(t){const{reference:o,...r}=t,i=e??(r.href?"a":"div"),s="a"===i?r:function(e){const{download:t,href:o,hrefLang:n,media:r,ping:i,rel:s,target:a,type:l,referrerPolicy:c,...d}=e;return d}(r);return n.createElement(i,{...s,ref:o})}return t.displayName=`DefaultComponent(${e})`,t}(I)),[I]),ee=U??Y;return n.createElement(ee,{...Z,id:t,role:o,className:r(d,L.item,b&&L.withIcon,{[L.isActive]:w,[L.isDisabled]:E||C,[L.hovered]:k}),title:p,href:y,target:T,rel:N,reference:function(e){X.current=e,"function"==typeof B&&B(e);"object"==typeof B&&(B.current=e)},onClick:function(e){if(E)return;K&&(0,i.trackEvent)(K.category,K.event,K.label);V&&V(q,e);z||(e.currentTarget.dispatchEvent(new CustomEvent("popup-menu-close-event",{bubbles:!0,detail:{clickType:(0,l.isKeyboardClick)(e)?"keyboard":"mouse"}})),(0,s.globalCloseMenu)())},onContextMenu:function(e){K&&G&&(0,i.trackEvent)(K.category,K.event,`${K.label}_rightClick`)},onMouseUp:function(e){if(1===e.button&&y&&K){let e=K.label;J&&(e+="_mouseWheelClick"),(0,i.trackEvent)(K.category,K.event,e)}},onMouseOver:A,onMouseOut:_,onKeyDown:S,tabIndex:R},j&&n.createElement(a.CircleLogo,{...H,className:c["disclosure-item-circle-logo"],size:"xxxsmall",logoUrl:j.logoUrl,placeholderLetter:"placeholderLetter"in j?j.placeholderLetter:void 0}),$&&n.createElement("span",{className:L.startSlot},$),b&&n.createElement("span",{"aria-label":H&&H["aria-label"],"aria-hidden":H&&Boolean(H["aria-hidden"]),className:r(L.icon,W&&c["round-icon"],x),dangerouslySetInnerHTML:{__html:b}}),n.createElement("span",{className:r(L.labelRow,h)},n.createElement("span",{className:r(L.label,m)},D)),(void 0!==v||g)&&n.createElement("span",{className:L.shortcut},(te=v)&&te.split("+").join(" + ")),void 0!==F&&n.createElement("span",{role:P,onClick:Q?u:void 0,className:r(f,L.toolbox,{[L.showOnHover]:M,[L.showOnFocus]:O})},F));var te}},20520:(e,t,o)=>{"use strict";o.d(t,{PopupMenu:()=>p})
;var n=o(50959),r=o(32227),i=o(88987),s=o(65718),a=o(27317),l=o(29197);const c=n.createContext(void 0);var d=o(36383);const u=n.createContext({setMenuMaxWidth:!1});function p(e){const{controller:t,children:o,isOpened:p,closeOnClickOutside:h=!0,doNotCloseOn:m,onClickOutside:f,onClose:v,onKeyboardClose:g,"data-name":b="popup-menu-container",closeOnScrollOutsideOffset:x,...w}=e,E=(0,n.useContext)(l.CloseDelegateContext),k=n.useContext(u),C=(0,n.useContext)(c),D=(0,d.useOutsideEvent)({handler:function(e){f&&f(e);if(!h)return;const t=(0,i.default)(m)?m():null==m?[]:[m];if(t.length>0&&e.target instanceof Node)for(const o of t){const t=r.findDOMNode(o);if(t instanceof Node&&t.contains(e.target))return}v()},mouseDown:!0,touchStart:!0});return p?n.createElement(s.Portal,{top:"0",left:"0",right:"0",bottom:"0",pointerEvents:"none"},n.createElement("span",{ref:D,style:{pointerEvents:"auto"}},n.createElement(a.Menu,{...w,onClose:v,onKeyboardClose:g,onScroll:function(t){const{onScroll:o}=e;o&&o(t)},customCloseDelegate:E,customRemeasureDelegate:C,ref:t,"data-name":b,limitMaxWidth:k.setMenuMaxWidth,"data-tooltip-show-on-focus":"true",closeOnScrollOutsideOffset:x},o))):null}},10381:(e,t,o)=>{"use strict";o.d(t,{ToolWidgetCaret:()=>l});var n=o(50959),r=o(97754),i=o(9745),s=o(86186),a=o(578);function l(e){const{dropped:t,className:o}=e;return n.createElement(i.Icon,{className:r(o,s.icon,{[s.dropped]:t}),icon:a})}},86656:(e,t,o)=>{"use strict";o.d(t,{TouchScrollContainer:()=>c});var n=o(50959),r=o(59142),i=o(50151),s=o(49483);const a=CSS.supports("overscroll-behavior","none");let l=0;const c=(0,n.forwardRef)(((e,t)=>{const{children:o,...i}=e,c=(0,n.useRef)(null);return(0,n.useImperativeHandle)(t,(()=>c.current)),(0,n.useLayoutEffect)((()=>{if(s.CheckMobile.iOS())return l++,null!==c.current&&(a?1===l&&(document.body.style.overscrollBehavior="none"):(0,r.disableBodyScroll)(c.current,{allowTouchMove:d(c)})),()=>{l--,null!==c.current&&(a?0===l&&(document.body.style.overscrollBehavior=""):(0,r.enableBodyScroll)(c.current))}}),[]),n.createElement("div",{ref:c,...i},o)}));function d(e){return t=>{const o=(0,i.ensureNotNull)(e.current),n=document.activeElement;return!o.contains(t)||null!==n&&o.contains(n)&&n.contains(t)}}},11098:e=>{e.exports={accessible:"accessible-NQERJsv9",active:"active-NQERJsv9"}},99343:e=>{e.exports={button:"button-GwQQdU8S",pressed:"pressed-GwQQdU8S",hover:"hover-GwQQdU8S",clicked:"clicked-GwQQdU8S",isInteractive:"isInteractive-GwQQdU8S",accessible:"accessible-GwQQdU8S",isGrouped:"isGrouped-GwQQdU8S",isActive:"isActive-GwQQdU8S",isOpened:"isOpened-GwQQdU8S",isDisabled:"isDisabled-GwQQdU8S",text:"text-GwQQdU8S",icon:"icon-GwQQdU8S",endIcon:"endIcon-GwQQdU8S"}},80204:e=>{e.exports={button:"button-xNqEcuN2"}},63024:e=>{e.exports={button:"button-merBkM5y",hover:"hover-merBkM5y",clicked:"clicked-merBkM5y",accessible:"accessible-merBkM5y",arrow:"arrow-merBkM5y",arrowWrap:"arrowWrap-merBkM5y",isOpened:"isOpened-merBkM5y"}},73607:(e,t,o)=>{"use strict";o.d(t,{focusFirstMenuItem:()=>d,handleAccessibleMenuFocus:()=>l,
handleAccessibleMenuKeyDown:()=>c,queryMenuElements:()=>h});var n=o(22692),r=o(33647),i=o(68335),s=o(15754);const a=[37,39,38,40];function l(e,t){if(!e.target)return;const o=e.relatedTarget?.getAttribute("aria-activedescendant");if(e.relatedTarget!==t.current){const e=o&&document.getElementById(o);if(!e||e!==t.current)return}d(e.target)}function c(e){if(e.defaultPrevented)return;const t=(0,i.hashFromEvent)(e);if(!a.includes(t))return;const o=document.activeElement;if(!(document.activeElement instanceof HTMLElement))return;const s=h(e.currentTarget).sort(n.navigationOrderComparator);if(0===s.length)return;const l=document.activeElement.closest('[data-role="menuitem"]')||document.activeElement.parentElement?.querySelector('[data-role="menuitem"]');if(!(l instanceof HTMLElement))return;const c=s.indexOf(l);if(-1===c)return;const d=m(l),f=d.indexOf(document.activeElement),v=-1!==f,g=e=>{o&&(0,r.becomeSecondaryElement)(o),(0,r.becomeMainElement)(e),e.focus()};switch((0,n.mapKeyCodeToDirection)(t)){case"inlinePrev":if(!d.length)return;e.preventDefault(),g(0===f?s[c]:v?u(d,f,-1):d[d.length-1]);break;case"inlineNext":if(!d.length)return;e.preventDefault(),f===d.length-1?g(s[c]):g(v?u(d,f,1):d[0]);break;case"blockPrev":{e.preventDefault();const t=u(s,c,-1);if(v){const e=p(t,f);g(e||t);break}g(t);break}case"blockNext":{e.preventDefault();const t=u(s,c,1);if(v){const e=p(t,f);g(e||t);break}g(t)}}}function d(e){const[t]=h(e);t&&((0,r.becomeMainElement)(t),t.focus())}function u(e,t,o){return e[(t+e.length+o)%e.length]}function p(e,t){const o=m(e);return o.length?o[(t+o.length)%o.length]:null}function h(e){return Array.from(e.querySelectorAll('[data-role="menuitem"]:not([disabled]):not([aria-disabled])')).filter((0,s.createScopedVisibleElementFilter)(e))}function m(e){return Array.from(e.querySelectorAll("[tabindex]:not([disabled]):not([aria-disabled])")).filter((0,s.createScopedVisibleElementFilter)(e))}},33647:(e,t,o)=>{"use strict";var n;function r(e){e.dispatchEvent(new CustomEvent("roving-tabindex:main-element"))}function i(e){e.dispatchEvent(new CustomEvent("roving-tabindex:secondary-element"))}o.d(t,{becomeMainElement:()=>r,becomeSecondaryElement:()=>i}),function(e){e.MainElement="roving-tabindex:main-element",e.SecondaryElement="roving-tabindex:secondary-element"}(n||(n={}))},90397:(e,t,o)=>{"use strict";o.d(t,{AccessibleMenuItem:()=>d});var n=o(50959),r=o(97754),i=o.n(r),s=o(3343),a=o(50238),l=o(16396),c=o(11098);function d(e){const{className:t,reference:o,...r}=e,[d,u]=(0,a.useRovingTabindexElement)(o??null);return n.createElement(l.PopupMenuItem,{...r,className:i()(c.accessible,e.isActive&&c.active,t),reference:d,tabIndex:u,onKeyDown:function(e){if(e.target!==e.currentTarget)return;const t=(0,s.hashFromEvent)(e);13!==t&&32!==t||(e.preventDefault(),d.current instanceof HTMLElement&&d.current.click())},"data-role":"menuitem","aria-disabled":e.isDisabled||void 0,toolboxRole:"toolbar"})}},78014:(e,t,o)=>{"use strict";o.d(t,{HorizontalAttachEdge:()=>r,HorizontalDropDirection:()=>s,VerticalAttachEdge:()=>n,
VerticalDropDirection:()=>i,getPopupPositioner:()=>c});var n,r,i,s,a=o(50151);!function(e){e[e.Top=0]="Top",e[e.Bottom=1]="Bottom",e[e.AutoStrict=2]="AutoStrict"}(n||(n={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(r||(r={})),function(e){e[e.FromTopToBottom=0]="FromTopToBottom",e[e.FromBottomToTop=1]="FromBottomToTop"}(i||(i={})),function(e){e[e.FromLeftToRight=0]="FromLeftToRight",e[e.FromRightToLeft=1]="FromRightToLeft"}(s||(s={}));const l={verticalAttachEdge:n.Bottom,horizontalAttachEdge:r.Left,verticalDropDirection:i.FromTopToBottom,horizontalDropDirection:s.FromLeftToRight,verticalMargin:0,horizontalMargin:0,matchButtonAndListboxWidths:!1};function c(e,t){return o=>{const{contentWidth:c,contentHeight:d,availableHeight:u}=o,p=(0,a.ensureNotNull)(e).getBoundingClientRect(),{horizontalAttachEdge:h=l.horizontalAttachEdge,horizontalDropDirection:m=l.horizontalDropDirection,horizontalMargin:f=l.horizontalMargin,verticalMargin:v=l.verticalMargin,matchButtonAndListboxWidths:g=l.matchButtonAndListboxWidths}=t;let b=t.verticalAttachEdge??l.verticalAttachEdge,x=t.verticalDropDirection??l.verticalDropDirection;b===n.AutoStrict&&(u<p.y+p.height+v+d?(b=n.Top,x=i.FromBottomToTop):(b=n.Bottom,x=i.FromTopToBottom));const w=b===n.Top?-1*v:v,E=h===r.Right?p.right:p.left,k=b===n.Top?p.top:p.bottom,C={x:E-(m===s.FromRightToLeft?c:0)+f,y:k-(x===i.FromBottomToTop?d:0)+w};return g&&(C.overrideWidth=p.width),C}}},46003:(e,t,o)=>{"use strict";o.d(t,{DEFAULT_TOOL_WIDGET_BUTTON_THEME:()=>a,ToolWidgetButton:()=>l});var n=o(50959),r=o(97754),i=o(9745),s=o(99343);const a=s,l=n.forwardRef(((e,t)=>{const{tag:o="div",icon:a,endIcon:l,isActive:c,isOpened:d,isDisabled:u,isDisabledAppearance:p,isGrouped:h,isHovered:m,isClicked:f,onClick:v,text:g,textBeforeIcon:b,title:x,theme:w=s,className:E,forceInteractive:k,"data-name":C,"data-tooltip":D,tooltipPosition:y,children:M,isPressed:O,...T}=e,N=r(E,w.button,{"apply-common-tooltip":Boolean(x||D),"common-tooltip-vertical":Boolean(D)&&"vertical"===y,[w.isActive]:c,[w.isOpened]:d,[w.isInteractive]:(k||Boolean(v))&&!u&&!p,[w.isDisabled]:Boolean(u||p),[w.isGrouped]:h,[w.hover]:m,[w.clicked]:f,[w.pressed]:O}),F=a&&("string"==typeof a?n.createElement(i.Icon,{className:w.icon,icon:a}):n.cloneElement(a,{className:r(w.icon,a.props.className)}));return"button"===o?n.createElement("button",{...T,ref:t,type:"button",className:r(N,w.accessible),disabled:u&&!p,onClick:v,title:x,"data-name":C,"data-tooltip":D},b&&g&&n.createElement("div",{className:r("js-button-text",w.text)},g),F,!b&&g&&n.createElement("div",{className:r("js-button-text",w.text)},g),M):n.createElement("div",{...T,ref:t,"data-role":"button",className:N,onClick:u?void 0:v,title:x,"data-name":C,"data-tooltip":D},b&&g&&n.createElement("div",{className:r("js-button-text",w.text)},g),F,!b&&g&&n.createElement("div",{className:r("js-button-text",w.text)},g),l&&n.createElement(i.Icon,{icon:l,className:s.endIcon}),M)}))},21618:(e,t,o)=>{"use strict";o.d(t,{ToolWidgetIconButton:()=>a});var n=o(50959),r=o(97754),i=o(46003),s=o(80204)
;const a=n.forwardRef((function(e,t){const{className:o,id:a,...l}=e;return n.createElement(i.ToolWidgetButton,{id:a,"data-name":a,...l,ref:t,className:r(o,s.button)})}))},54374:(e,t,o)=>{"use strict";o.d(t,{ToolWidgetMenu:()=>b});var n=o(50959),r=o(97754),i=o.n(r),s=o(3343),a=o(20520),l=o(10381),c=o(90186),d=o(37558),u=o(41590),p=o(78014),h=o(90692),m=o(37103),f=o(76460),v=o(63024);var g;!function(e){e[e.Vertical=2]="Vertical",e[e.Horizontal=0]="Horizontal"}(g||(g={}));class b extends n.PureComponent{constructor(e){super(e),this._wrapperRef=null,this._controller=n.createRef(),this._onPopupCloseOnClick=e=>{"keyboard"===e.detail.clickType&&this.focus()},this._handleMenuFocus=e=>{e.relatedTarget===this._wrapperRef&&this.setState((e=>({...e,isOpenedByButton:!0}))),this.props.onMenuFocus?.(e)},this._handleWrapperRef=e=>{this._wrapperRef=e,this.props.reference&&this.props.reference(e)},this._handleOpen=()=>{"div"!==this.props.tag&&(this.setState((e=>({...e,isOpenedByButton:!1}))),this.props.menuReference?.current?.addEventListener("popup-menu-close-event",this._onPopupCloseOnClick),this._controller.current?.focus())},this._handleClick=e=>{(m.enabled("skip_event_target_check")||e.target instanceof Node)&&e.currentTarget.contains(e.target)&&(this._handleToggleDropdown(void 0,(0,f.isKeyboardClick)(e)),this.props.onClick&&this.props.onClick(e,!this.state.isOpened))},this._handleToggleDropdown=(e,t=!1)=>{const{onClose:o,onOpen:n}=this.props,{isOpened:r}=this.state,i="boolean"==typeof e?e:!r;this.setState({isOpened:i,shouldReturnFocus:!!i&&t}),i&&n&&n(),!i&&o&&o()},this._handleClose=()=>{this.close()},this._handleKeyDown=e=>{const{orientation:t="horizontal"}=this.props;if(e.defaultPrevented)return;if(!(e.target instanceof Node))return;const o=(0,s.hashFromEvent)(e);if(e.currentTarget.contains(e.target))switch(o){case 40:if("div"===this.props.tag||"horizontal"!==t)return;if(this.state.isOpened)return;e.preventDefault(),this._handleToggleDropdown(!0,!0);break;case 27:if(!this.state.isOpened||!this.props.closeOnEsc)return;e.preventDefault(),e.stopPropagation(),this._handleToggleDropdown(!1)}else{if("div"===this.props.tag)return;switch(o){case 27:{e.preventDefault();const{shouldReturnFocus:t,isOpenedByButton:o}=this.state;this._handleToggleDropdown(!1),t&&o&&this._wrapperRef?.focus();break}}}},this.state={isOpened:!1,shouldReturnFocus:!1,isOpenedByButton:!1}}render(){const{tag:e="div",id:t,arrow:o,content:r,isDisabled:s,isDrawer:a,isShowTooltip:d,title:u,className:p,hotKey:m,theme:f,drawerBreakpoint:v,tabIndex:g,isClicked:b}=this.props,{isOpened:w}=this.state,E=i()(p,f.button,{"apply-common-tooltip":d||!s,[f.isDisabled]:s,[f.isOpened]:w,[f.clicked]:b}),k=x(r)?r({isOpened:w}):r;return"button"===e?n.createElement("button",{type:"button",id:t,className:i()(E,f.accessible),disabled:s,onClick:this._handleClick,title:u,"data-tooltip-hotkey":m,ref:this._handleWrapperRef,onKeyDown:this._handleKeyDown,tabIndex:g,...(0,c.filterDataProps)(this.props),...(0,c.filterAriaProps)(this.props)},k,o&&n.createElement("div",{className:f.arrow
},n.createElement("div",{className:f.arrowWrap},n.createElement(l.ToolWidgetCaret,{dropped:w}))),this.state.isOpened&&(v?n.createElement(h.MatchMedia,{rule:v},(e=>this._renderContent(e))):this._renderContent(a))):n.createElement("div",{id:t,className:E,onClick:s?void 0:this._handleClick,title:u,"data-tooltip-hotkey":m,ref:this._handleWrapperRef,"data-role":"button",tabIndex:g,onKeyDown:this._handleKeyDown,"aria-haspopup":this.props["aria-haspopup"],...(0,c.filterDataProps)(this.props)},k,o&&n.createElement("div",{className:f.arrow},n.createElement("div",{className:f.arrowWrap},n.createElement(l.ToolWidgetCaret,{dropped:w}))),this.state.isOpened&&(v?n.createElement(h.MatchMedia,{rule:v},(e=>this._renderContent(e))):this._renderContent(a)))}close(){this.props.menuReference?.current?.removeEventListener("popup-menu-close-event",this._onPopupCloseOnClick),this._handleToggleDropdown(!1)}focus(){this._wrapperRef?.focus()}update(){null!==this._controller.current&&this._controller.current.update()}_renderContent(e){const{menuDataName:t,minWidth:o,menuClassName:r,menuRole:i,maxHeight:s,drawerPosition:l="Bottom",children:c,noMomentumBasedScroll:h}=this.props,{isOpened:m}=this.state,f={horizontalMargin:this.props.horizontalMargin||0,verticalMargin:this.props.verticalMargin||2,verticalAttachEdge:this.props.verticalAttachEdge,horizontalAttachEdge:this.props.horizontalAttachEdge,verticalDropDirection:this.props.verticalDropDirection,horizontalDropDirection:this.props.horizontalDropDirection,matchButtonAndListboxWidths:this.props.matchButtonAndListboxWidths},v=Boolean(m&&e&&l),g=x(c)?c({isDrawer:v}):c;return v?n.createElement(d.DrawerManager,null,n.createElement(u.Drawer,{reference:this.props.drawerReference,onClose:this._handleClose,position:l,"data-name":t},g)):n.createElement(a.PopupMenu,{reference:this.props.menuReference,role:i,controller:this._controller,closeOnClickOutside:this.props.closeOnClickOutside,doNotCloseOn:this,isOpened:m,minWidth:o,onClose:this._handleClose,position:(0,p.getPopupPositioner)(this._wrapperRef,f),className:r,maxHeight:s,"data-name":t,tabIndex:"div"!==this.props.tag?-1:void 0,onOpen:this._handleOpen,onKeyDown:this.props.onMenuKeyDown,onFocus:this._handleMenuFocus,noMomentumBasedScroll:h},g)}}function x(e){return"function"==typeof e}b.defaultProps={arrow:!0,closeOnClickOutside:!0,theme:v}},60925:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="M12 4h3v1h-1.04l-.88 9.64a1.5 1.5 0 0 1-1.5 1.36H6.42a1.5 1.5 0 0 1-1.5-1.36L4.05 5H3V4h3v-.5C6 2.67 6.67 2 7.5 2h3c.83 0 1.5.67 1.5 1.5V4ZM7.5 3a.5.5 0 0 0-.5.5V4h4v-.5a.5.5 0 0 0-.5-.5h-3ZM5.05 5l.87 9.55a.5.5 0 0 0 .5.45h5.17a.5.5 0 0 0 .5-.45L12.94 5h-7.9Z"/></svg>'},578:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 8" width="16" height="8"><path fill="currentColor" d="M0 1.475l7.396 6.04.596.485.593-.49L16 1.39 14.807 0 7.393 6.122 8.58 6.12 1.186.08z"/></svg>'}}]);