(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[9754,1754,9685,3179],{59142:function(e,t){var n,o,s;o=[t],n=function(e){"use strict";function t(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t{e.exports={wrapper:"wrapper-GZajBGIm",input:"input-GZajBGIm",view:"view-GZajBGIm",danger:"danger-GZajBGIm"}},3260:e=>{e.exports={box:"box-ywH2tsV_",noOutline:"noOutline-ywH2tsV_", disabled:"disabled-ywH2tsV_","intent-danger":"intent-danger-ywH2tsV_",checked:"checked-ywH2tsV_",check:"check-ywH2tsV_",icon:"icon-ywH2tsV_",dot:"dot-ywH2tsV_",disableActiveStyles:"disableActiveStyles-ywH2tsV_"}},49107:e=>{e.exports={loader:"loader-UL6iwcBa",static:"static-UL6iwcBa",item:"item-UL6iwcBa","tv-button-loader":"tv-button-loader-UL6iwcBa",medium:"medium-UL6iwcBa",small:"small-UL6iwcBa",black:"black-UL6iwcBa",white:"white-UL6iwcBa",gray:"gray-UL6iwcBa",primary:"primary-UL6iwcBa"}},31841:e=>{e.exports={wrap:"wrap-HAxAr6QG",image:"image-HAxAr6QG",text:"text-HAxAr6QG"}},74765:e=>{e.exports={section:"section-Og4Rg_SK",heading:"heading-Og4Rg_SK"}},80329:e=>{e.exports={item:"item-nuuDM7vP",normal:"normal-nuuDM7vP",big:"big-nuuDM7vP",selected:"selected-nuuDM7vP",contentCell:"contentCell-nuuDM7vP",content:"content-nuuDM7vP",favourite:"favourite-nuuDM7vP",favoriteActionCell:"favoriteActionCell-nuuDM7vP",iconCell:"iconCell-nuuDM7vP",icon:"icon-nuuDM7vP",checkboxInput:"checkboxInput-nuuDM7vP",label:"label-nuuDM7vP"}},56096:e=>{e.exports={dialog:"dialog-UAy2ZKyS",wrap:"wrap-UAy2ZKyS",empty:"empty-UAy2ZKyS",image:"image-UAy2ZKyS",emptyState:"emptyState-UAy2ZKyS"}},57418:e=>{e.exports={accessible:"accessible-rm8yeqY4"}},2277:e=>{e.exports={loaderWrap:"loaderWrap-jGEARQlM",big:"big-jGEARQlM",loader:"loader-jGEARQlM"}},47429:e=>{e.exports={item:"item-GJX1EXhk",interactive:"interactive-GJX1EXhk",hovered:"hovered-GJX1EXhk",disabled:"disabled-GJX1EXhk",active:"active-GJX1EXhk",shortcut:"shortcut-GJX1EXhk",normal:"normal-GJX1EXhk",big:"big-GJX1EXhk",iconCell:"iconCell-GJX1EXhk",icon:"icon-GJX1EXhk",content:"content-GJX1EXhk",label:"label-GJX1EXhk",checked:"checked-GJX1EXhk",toolbox:"toolbox-GJX1EXhk",showToolboxOnHover:"showToolboxOnHover-GJX1EXhk",arrowIcon:"arrowIcon-GJX1EXhk",subMenu:"subMenu-GJX1EXhk",invisibleHotkey:"invisibleHotkey-GJX1EXhk"}},16191:e=>{e.exports={row:"row-DFIg7eOh",line:"line-DFIg7eOh",hint:"hint-DFIg7eOh"}},45536:e=>{e.exports={menu:"menu-Tx5xMZww"}},5264:e=>{e.exports={item:"item-WJDah4zD",emptyIcons:"emptyIcons-WJDah4zD",loading:"loading-WJDah4zD",disabled:"disabled-WJDah4zD",interactive:"interactive-WJDah4zD",hovered:"hovered-WJDah4zD",normal:"normal-WJDah4zD",big:"big-WJDah4zD",icon:"icon-WJDah4zD",label:"label-WJDah4zD",title:"title-WJDah4zD",nested:"nested-WJDah4zD",shortcut:"shortcut-WJDah4zD",remove:"remove-WJDah4zD"}},68745:e=>{e.exports={separator:"separator-Ymxd0dt_"}},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"}},5808:e=>{e.exports={menuWrap:"menuWrap-Kq3ruQo8",isMeasuring:"isMeasuring-Kq3ruQo8",scrollWrap:"scrollWrap-Kq3ruQo8",momentumBased:"momentumBased-Kq3ruQo8",menuBox:"menuBox-Kq3ruQo8",isHidden:"isHidden-Kq3ruQo8"}},92657:e=>{e.exports={button:"button-iLKiGOdQ",hovered:"hovered-iLKiGOdQ",disabled:"disabled-iLKiGOdQ",focused:"focused-iLKiGOdQ",active:"active-iLKiGOdQ",hidden:"hidden-iLKiGOdQ"}},70673:(e,t,n)=>{ "use strict";n.d(t,{CheckboxInput:()=>h});var o=n(50959),s=n(97754),i=n.n(s),l=n(90186),a=n(5811),r=n(62093),c=n.n(r);function h(e){const t=i()(c().wrapper,e.className);return o.createElement("span",{className:t,title:e.title,style:e.style},o.createElement("input",{id:e.id,tabIndex:e.tabIndex,className:i()(e.intent&&c()[e.intent],c().input),type:"checkbox",name:e.name,checked:e.checked,disabled:e.disabled,value:e.value,autoFocus:e.autoFocus,role:e.role,onChange:function(){e.onChange?.(e.value)},ref:e.reference,"aria-required":e["aria-required"],"aria-describedby":e["aria-describedby"],"aria-invalid":e["aria-invalid"],"data-qa-id":e.dataQaId,...(0,l.filterDataProps)(e)}),o.createElement(a.CheckboxView,{className:c().view,indeterminate:e.indeterminate,checked:e.checked,disabled:e.disabled,intent:e.intent,tabIndex:e.tabIndex}))}},5811:(e,t,n)=>{"use strict";n.d(t,{CheckboxView:()=>d});var o=n(50959),s=n(97754),i=n.n(s),l=n(9745),a=n(65890),r=n.n(a),c=n(3260),h=n.n(c);function d(e){const{indeterminate:t,checked:n,tabIndex:s,className:a,disabled:c,disableActiveStyles:d,intent:u,hideIcon:v,...m}=e,p=t||!n||v?"":r(),g=i()(h().box,h()[`intent-${u}`],!t&&h().check,!!t&&h().dot,-1===s&&h().noOutline,a,n&&h().checked,c&&h().disabled,d&&h().disableActiveStyles);return o.createElement("span",{className:g,...m},o.createElement(l.Icon,{icon:p,className:h().icon}))}},43010:(e,t,n)=>{"use strict";n.d(t,{useIsomorphicLayoutEffect:()=>s});var o=n(50959);function s(e,t){("undefined"==typeof window?o.useEffect:o.useLayoutEffect)(e,t)}},27267:(e,t,n)=>{"use strict";function o(e,t,n,o,s){function i(s){if(e>s.timeStamp)return;const i=s.target;void 0!==n&&null!==t&&null!==i&&i.ownerDocument===o&&(t.contains(i)||n(s))}return s.click&&o.addEventListener("click",i,!1),s.mouseDown&&o.addEventListener("mousedown",i,!1),s.touchEnd&&o.addEventListener("touchend",i,!1),s.touchStart&&o.addEventListener("touchstart",i,!1),()=>{o.removeEventListener("click",i,!1),o.removeEventListener("mousedown",i,!1),o.removeEventListener("touchend",i,!1),o.removeEventListener("touchstart",i,!1)}}n.d(t,{addOutsideEventListener:()=>o})},36383:(e,t,n)=>{"use strict";n.d(t,{useOutsideEvent:()=>l});var o=n(50959),s=n(43010),i=n(27267);function l(e){const{click:t,mouseDown:n,touchEnd:l,touchStart:a,handler:r,reference:c}=e,h=(0,o.useRef)(null),d=(0,o.useRef)("undefined"==typeof window?0:new window.CustomEvent("timestamp").timeStamp);return(0,s.useIsomorphicLayoutEffect)((()=>{const e={click:t,mouseDown:n,touchEnd:l,touchStart:a},o=c?c.current:h.current;return(0,i.addOutsideEventListener)(d.current,o,r,document,e)}),[t,n,l,a,r]),c||h}},9745:(e,t,n)=>{"use strict";n.d(t,{Icon:()=>s});var o=n(50959);const s=o.forwardRef(((e,t)=>{const{icon:n="",title:s,ariaLabel:i,ariaLabelledby:l,ariaHidden:a,...r}=e,c=!!(s||i||l);return o.createElement("span",{role:"img",...r,ref:t,"aria-label":i,"aria-labelledby":l,"aria-hidden":a||!c,title:s,dangerouslySetInnerHTML:{__html:n}})}))},26996:(e,t,n)=>{"use strict";n.d(t,{Loader:()=>c});var o,s=n(50959),i=n(97754),l=n.n(i),a=n(49107),r=n.n(a) ;function c(e){const{className:t,size:n="medium",staticPosition:o,color:i="black"}=e,a=l()(r().item,r()[i],r()[n]);return s.createElement("span",{className:l()(r().loader,o&&r().static,t)},s.createElement("span",{className:a}),s.createElement("span",{className:a}),s.createElement("span",{className:a}))}!function(e){e.Medium="medium",e.Small="small"}(o||(o={}))},83021:(e,t,n)=>{"use strict";n.d(t,{SubmenuContext:()=>s,SubmenuHandler:()=>i});var o=n(50959);const s=o.createContext(null);function i(e){const[t,n]=(0,o.useState)(null),i=(0,o.useRef)(null),l=(0,o.useRef)(new Map);return(0,o.useEffect)((()=>()=>{null!==i.current&&clearTimeout(i.current)}),[]),o.createElement(s.Provider,{value:{current:t,setCurrent:function(e){null!==i.current&&(clearTimeout(i.current),i.current=null);null===t?n(e):i.current=setTimeout((()=>{i.current=null,n(e)}),100)},registerSubmenu:function(e,t){return l.current.set(e,t),()=>{l.current.delete(e)}},isSubmenuNode:function(e){return Array.from(l.current.values()).some((t=>t(e)))}}},e.children)}},19250:(e,t,n)=>{"use strict";n.d(t,{Portal:()=>c,PortalContext:()=>h});var o=n(50959),s=n(32227),i=n(25931),l=n(67961),a=n(34811),r=n(99663);class c extends o.PureComponent{constructor(){super(...arguments),this._uuid=(0,i.nanoid)()}componentWillUnmount(){this._manager().removeWindow(this._uuid)}render(){const e=this._manager().ensureWindow(this._uuid,this.props.layerOptions);e.style.top=this.props.top||"",e.style.bottom=this.props.bottom||"",e.style.left=this.props.left||"",e.style.right=this.props.right||"",e.style.pointerEvents=this.props.pointerEvents||"";const t=this.props.className;return t&&("string"==typeof t?e.classList.add(t):e.classList.add(...t)),this.props.shouldTrapFocus&&!e.hasAttribute(a.FOCUS_TRAP_DATA_ATTRIBUTE)&&e.setAttribute(a.FOCUS_TRAP_DATA_ATTRIBUTE,"true"),this.props["aria-hidden"]&&e.setAttribute("aria-hidden","true"),s.createPortal(o.createElement(h.Provider,{value:this},this.props.children),e)}moveToTop(){this._manager().moveToTop(this._uuid)}_manager(){return null===this.context?(0,l.getRootOverlapManager)():this.context}}c.contextType=r.SlotContext;const h=o.createContext(null)},99663:(e,t,n)=>{"use strict";n.d(t,{Slot:()=>s,SlotContext:()=>i});var o=n(50959);class s extends o.Component{shouldComponentUpdate(){return!1}render(){return o.createElement("div",{style:{position:"fixed",zIndex:150,left:0,top:0},ref:this.props.reference})}}const i=o.createContext(null)},67961:(e,t,n)=>{"use strict";n.d(t,{OverlapManager:()=>l,getRootOverlapManager:()=>r});var o=n(50151),s=n(34811);class i{constructor(){this._storage=[]}add(e){this._storage.push(e)}remove(e){this._storage=this._storage.filter((t=>e!==t))}has(e){return this._storage.includes(e)}getItems(){return this._storage}}class l{constructor(e=document){this._storage=new i,this._windows=new Map,this._index=0,this._document=e,this._container=e.createDocumentFragment()}setContainer(e){const t=this._container,n=null===e?this._document.createDocumentFragment():e;!function(e,t){Array.from(e.childNodes).forEach((e=>{ e.nodeType===Node.ELEMENT_NODE&&t.appendChild(e)}))}(t,n),this._container=n}registerWindow(e){this._storage.has(e)||this._storage.add(e)}ensureWindow(e,t={position:"fixed",direction:"normal"}){const n=this._windows.get(e);if(void 0!==n)return n;this.registerWindow(e);const o=this._document.createElement("div");if(o.style.position=t.position,o.style.zIndex=this._index.toString(),o.dataset.id=e,void 0!==t.index){const e=this._container.childNodes.length;if(t.index>=e)this._container.appendChild(o);else if(t.index<=0)this._container.insertBefore(o,this._container.firstChild);else{const e=this._container.childNodes[t.index];this._container.insertBefore(o,e)}}else"reverse"===t.direction?this._container.insertBefore(o,this._container.firstChild):this._container.appendChild(o);return this._windows.set(e,o),++this._index,o}unregisterWindow(e){this._storage.remove(e);const t=this._windows.get(e);void 0!==t&&(null!==t.parentElement&&t.parentElement.removeChild(t),this._windows.delete(e))}getZindex(e){const t=this.ensureWindow(e);return parseInt(t.style.zIndex||"0")}moveLastWindowToTop(){const e=this._storage.getItems(),t=e[e.length-1];t&&this.moveToTop(t)}moveToTop(e){if(this.getZindex(e)!==this._index){const t=this.ensureWindow(e);this._windows.forEach(((e,n)=>{e.hasAttribute(s.FOCUS_TRAP_DATA_ATTRIBUTE)&&e.setAttribute(s.FOCUS_TRAP_DATA_ATTRIBUTE,e===t?"true":"false")})),t.style.zIndex=(++this._index).toString()}}removeWindow(e){this.unregisterWindow(e)}}const a=new WeakMap;function r(e=document){const t=e.getElementById("overlap-manager-root");if(null!==t)return(0,o.ensureDefined)(a.get(t));{const t=new l(e),n=function(e){const t=e.createElement("div");return t.style.position="absolute",t.style.zIndex=150..toString(),t.style.top="0px",t.style.left="0px",t.id="overlap-manager-root",t.dataset.qaId="overlap-manager-root",t}(e);return a.set(n,t),t.setContainer(n),e.body.appendChild(n),t}}var c;!function(e){e[e.BaseZindex=150]="BaseZindex"}(c||(c={}))},99054:(e,t,n)=>{"use strict";n.d(t,{setFixedBodyState:()=>c});const o=(()=>{let e;return()=>{if(void 0===e){const t=document.createElement("div"),n=t.style;n.visibility="hidden",n.width="100px",n.msOverflowStyle="scrollbar",document.body.appendChild(t);const o=t.offsetWidth;t.style.overflow="scroll";const s=document.createElement("div");s.style.width="100%",t.appendChild(s);const i=s.offsetWidth;t.parentNode?.removeChild(t),e=o-i}return e}})();function s(e,t,n){null!==e&&e.style.setProperty(t,n)}function i(e,t){return getComputedStyle(e,null).getPropertyValue(t)}function l(e,t){return parseInt(i(e,t))}let a=0,r=!1;function c(e){const{body:t}=document,n=t.querySelector(".widgetbar-wrap");if(e&&1==++a){const e=i(t,"overflow"),a=l(t,"padding-right");"hidden"!==e.toLowerCase()&&t.scrollHeight>t.offsetHeight&&(s(n,"right",`${o()}px`),t.style.paddingRight=`${a+o()}px`,r=!0),t.classList.add("i-no-scroll")}else if(!e&&a>0&&0==--a&&(t.classList.remove("i-no-scroll"),r)){s(n,"right","0px");let e=0;0,t.scrollHeight<=t.clientHeight&&(e-=o()),t.style.paddingRight=(e<0?0:e)+"px",r=!1}}}, 89324:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Components:()=>h,showDefaultSearchDialog:()=>c,showSymbolSearchItemsDialog:()=>l.showSymbolSearchItemsDialog});var o=n(29803),s=(n(32563),n(4745)),i=n(48961),l=n(1861),a=n(22613),r=n(84015);n(37103),n(49483);!(0,r.isOnMobileAppPage)("any")&&window.matchMedia("(min-width: 602px) and (min-height: 445px)").matches;function c(e){new a.WatchedValue({});const t=(0,i.getSymbolSearchCompleteOverrideFunction)(),{defaultValue:n,showSpreadActions:r,source:c,onSearchComplete:h,trackResultsOptions:d,...u}=e,v={...u,showSpreadActions:r??(0,s.canShowSpreadActions)(),onSymbolFiltersParamsChange:void 0,onSearchComplete:(e,n)=>{t(e[0].symbol,e[0].result).then((e=>{o.linking.setSymbolAndLogInitiator(e.symbol,"symbol search"),h?.(e.symbol)}))},onEmptyResults:void 0};(0,l.showSymbolSearchItemsDialog)({...v,defaultValue:n})}const h={SymbolSearchWatchlistDialogContentItem:null,SymbolSearchWatchlistDialog:null}},1861:(e,t,n)=>{"use strict";n.d(t,{showSymbolSearchItemsDialog:()=>r});var o=n(50959),s=n(50655),i=n(51826),l=n(59071),a=n(87896);function r(e){const{symbolTypeFilter:t,initialMode:n="symbolSearch",autofocus:r=!0,defaultValue:c,showSpreadActions:h,selectSearchOnInit:d,onSearchComplete:u,dialogTitle:v,placeholder:m,fullscreen:p,initialScreen:g,wrapper:b,dialog:f,contentItem:w,onClose:y,onOpen:S,footer:x,symbolTypes:_,searchInput:E,emptyState:C,hideMarkedListFlag:M,dialogWidth:k="auto",manager:I,shouldReturnFocus:T,onSymbolFiltersParamsChange:A,onEmptyResults:D,customSearchSymbols:L,enableOptionsChain:H,disableRecents:R,overrideQueryParams:N,hiddenFilterIds:P,showRecents:O,searchInitiationPoint:z,selectedSymbolSettingsKey:F,filterValuesSettingsKey:B}=e;if(i.dialogsOpenerManager.isOpened("SymbolSearch")||i.dialogsOpenerManager.isOpened("ChangeIntervalDialog"))return;const W=document.createElement("div"),V=o.createElement(s.SlotContext.Provider,{value:I??null},o.createElement(l.SymbolSearchItemsDialog,{symbolTypeFilter:t,onClose:U,initialMode:n,defaultValue:c,showSpreadActions:h,hideMarkedListFlag:M,selectSearchOnInit:d,onSearchComplete:u,dialogTitle:v,placeholder:m,fullscreen:p,initialScreen:g,wrapper:b,dialog:f,contentItem:w,footer:x,symbolTypes:_,searchInput:E,emptyState:C,autofocus:r,dialogWidth:k,shouldReturnFocus:T,onSymbolFiltersParamsChange:A,onEmptyResults:D,customSearchSymbols:L,enableOptionsChain:H,disableRecents:R,overrideQueryParams:N,hiddenFilterIds:P,showRecents:O,searchInitiationPoint:z,selectedSymbolSettingsKey:F,filterValuesSettingsKey:B})),Z=(0,a.createReactRoot)(V,W);function U(){Z.unmount(),i.dialogsOpenerManager.setAsClosed("SymbolSearch"),y&&y()}return i.dialogsOpenerManager.setAsOpened("SymbolSearch"),S&&S(),{close:U}}},11065:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GlobalSearchDialogRenderer:()=>je});var o=n(50959),s=n(60709),i=n(38414),l=n(90484),a=n(11542),r=n(1765),c=n(10087),h=n(87465),d=n(69654),u=n(97754),v=n.n(u),m=n(9745),p=n(24633),g=n(45345),b=n(67562),f=n(66619),w=n(31841);function y(e){ const{text:t,showIcon:n=!0,className:s}=e,i=g.watchedTheme.value()===p.StdTheme.Dark?f:b;return o.createElement("div",{className:u(w.wrap,s)},n&&o.createElement(m.Icon,{icon:i,className:w.image}),o.createElement("span",{className:w.text},t))}var S=n(79418),x=n(55883),_=n(40173),E=n(5304),C=n(10772),M=n(74670),k=n(80329);const I=(0,_.mergeThemes)(E.DEFAUL_CONTEXT_MENU_ITEM_THEME,k);function T(e){const{action:t,onExecute:n}=e,[s,i]=(0,M.useActiveDescendant)(null);return o.createElement(C.ContextMenuAction,{theme:I,onShowSubMenu:x.default,isSubMenuOpened:!1,checkboxInput:!0,reference:s,selected:i,action:t,onExecute:()=>n(t),className:v()("apply-overflow-tooltip","apply-overflow-tooltip-focus","apply-overflow-tooltip--direction_y","apply-overflow-tooltip--check-children-recursively"),"data-overflow-tooltip-text":t.getLabel()})}var A=n(74765);function D(e){const{heading:t,items:n,onExecute:s,getActionIndex:i}=e;return o.createElement("table",{className:A.section},o.createElement("tbody",null,o.createElement("tr",null,o.createElement("td",{className:A.heading},t)),n.map((e=>o.createElement(T,{key:e.id,action:e,onExecute:s,index:i(e)})))))}var L=n(56096);const H=[{name:"drawingsActions",label:a.t(null,void 0,n(74385))},{name:"functionActions",label:a.t(null,void 0,n(83576))},{name:"settingsActions",label:a.t(null,void 0,n(32514))}];function R(e){const{dialogId:t,items:s,onClose:i,shouldReturnFocus:u}=e,[v,m]=(0,o.useState)(""),[p,g]=(0,o.useState)([]),b=(0,o.useRef)(null),f=(0,o.useRef)(null),w=(0,o.useRef)(null);(0,o.useEffect)((()=>{b.current?.focus()}),[]),(0,o.useEffect)((()=>{const e=b.current;if(e)return e.addEventListener("input",N),N(),()=>{e&&e.removeEventListener("input",N)}}),[]);const x=(0,o.useCallback)((0,l.default)((e=>{}),1e3),[]),_=(0,o.useCallback)((0,l.default)(i,200),[]);(0,o.useEffect)((()=>()=>{x.flush(),_.cancel()}),[]);const E=(0,o.useMemo)((()=>{const e=new Set(r.getJSON("GlobalSearchDialog.recent",[])),t=[];for(const n of e){const e=s.find((e=>e.getState().id===n));e&&t.push(e)}return t.reverse(),t}),[]),C=(0,o.useMemo)((()=>H.reduce(((e,t)=>(e.set(t.name,p.filter((e=>e.getState().category===t.name))),e)),new Map)),[p]),{handleKeyDown:M,handleForceFocus:k,handleSearchRefBlur:I,onDialogClick:T,resetFocusState:A}=(0,c.useSearchDialogKeyboardNavigation)({dialogRef:f,searchInputRef:b,contentContainerRef:w,getNextFocusedItemIndex:function(e,t){const n=null===e?1===t?-1:0:e;for(let e=1;e<=p.length;e++){const o=(p.length+e*t+n)%p.length;if(!p[o].isDisabled())return o}return null},isNavigationDisabled:!p.length,scrollToFocusedItem:function(e){e?.scrollIntoView({block:"nearest"})},onEscapeClick:i,getElementIdByIndex:function(e,t){let n=p[e].id;null!=t&&(n+="-favorite");return CSS.escape(n)}});return o.createElement(S.AdaptivePopupDialog,{ref:f,dataName:t,title:a.t(null,void 0,n(79354)),onClose:i,onClickOutside:i,shouldReturnFocus:u,render:()=>o.createElement(o.Fragment,null,o.createElement(d.DialogSearch,{reference:b,onBlur:I}),o.createElement("div",{className:L.wrap,ref:w },v?o.createElement(o.Fragment,null,p.length?H.map((e=>{const t=C.get(e.name);return t&&t.length?o.createElement(D,{key:e.name,heading:e.label,items:t,onExecute:R,getActionIndex:O}):null})):o.createElement(y,{text:a.t(null,void 0,n(47202)),className:L.emptyState})):o.createElement(o.Fragment,null,Boolean(p.length)?o.createElement(D,{heading:a.t(null,void 0,n(76753)),items:p,onExecute:R,getActionIndex:O}):o.createElement(y,{text:a.t(null,void 0,n(27463)),showIcon:!1,className:L.emptyState})))),onKeyDown:M,className:L.dialog,onForceFocus:k,onClick:T,isOpened:!0});function R(e){const t=new Set(r.getJSON("GlobalSearchDialog.recent",[])),n=e.getState().id;t.has(n)&&t.delete(n),t.add(n),r.setJSON("GlobalSearchDialog.recent",Array.from(t).slice(-10)),e.getState().checkable?_():i()}function N(){A();const e=b.current?b.current.value.toLocaleLowerCase().trim():"";if(m(e),e){const t=s.filter((t=>P(t).includes(e)||function(e,t){const{aliases:n}=t.getState();if(n)return n.some((t=>t.toLowerCase().includes(e)));return!1}(e,t))).sort((t=>P(t)===e?-1:0));g(t),t.length||x(e)}else g(E)}function P(e){const{label:t}=e.getState();return(0,h.isString)(t)?t.toLocaleLowerCase():""}function O(e){return p.findIndex((t=>t.id===e.id))}}var N,P=n(68335),O=n(29803),z=n(59613),F=n(29242),B=n(37103),W=n(41706);!function(e){e.Drawings="drawingsActions",e.Function="functionActions",e.Settings="settingsActions"}(N||(N={}));class V extends W.Action{constructor({id:e,category:t,favourite:n,onFavouriteClick:o,hotkeyGroup:s,hotkeyHash:i,aliases:l,optionsLoader:a,onStartListening:r,...c}){super({actionId:"UnknownAction",options:{...c,doNotCloseOnClick:!0},id:e,optionsLoader:a,onStartListening:r}),this.execute=()=>{super.execute()},this.getState=()=>({...super.getState(),id:this._searchOptions.id,category:this._searchOptions.category,favourite:this._searchOptions.favourite,onFavouriteClick:this._onFavouriteClick,aliases:this._searchOptions.aliases}),this.update=e=>{this._searchOptions=Object.assign(this._searchOptions,e),super.update(e)},this._onFavouriteClick=e=>{this._searchOptions.onFavouriteClick&&(this.update({favourite:!this._searchOptions.favourite}),this._searchOptions.onFavouriteClick(e))},this._searchOptions={id:e,category:t,favourite:n,onFavouriteClick:o,aliases:l}}}var Z,U=n(95804),G=n(49483),K=n(33718);!function(e){e.None="all",e.Following="following",e.Private="private"}(Z||(Z={}));var q=n(67455),X=n(54370),J=n(99678),j=n(22489),Q=n(81662),$=n(3615),Y=n(71843);function ee(e){const t=e.match(/^(\d+).(\d+).(\d+)/);if(!t)return null;const[,n,o,s]=t;return[parseInt(n),parseInt(o),parseInt(s)]}function te(e){const t=(0,G.desktopAppVersion)();return!!t&&function(e,t){const n=ee(e),o=ee(t);if(!n||!o)return!1;const[s,i,l]=n,[a,r,c]=o;return s!==a?s{const t=t=>{const o=[];if(t&&t.length&&window.is_authenticated&&t.forEach((t=>{o.push(new V({id:t,category:"settingsActions",label:`${a.t(null,void 0,n(53438))} ${j.translateStdThemeName(t)}`,onExecute:()=>{(0,Y.loadTheme)(e.chartWidgetCollection(),{themeName:t, standardTheme:!1}).then((()=>{e.readOnly()||window.saver.saveChartSilently()}))}}))})),!(0,G.isDesktopApp)()||te("1.0.10")){const[,t]=j.getStdThemeNames();o.push(new V({id:"DarkColorTheme",category:"settingsActions",label:a.t(null,void 0,n(25848)),checkable:!0,checked:j.getCurrentTheme().name===t,onExecute:()=>{!function(e){const t=(0,j.getCurrentTheme)().name===p.StdTheme.Dark?p.StdTheme.Light:p.StdTheme.Dark,o=e.chartModels().value().every((e=>null!==e.model().getThemeNameIfStdTheme())),s=()=>{(0,Y.loadTheme)(e,{themeName:t,standardTheme:!0}).then((()=>{e.readOnly()||window.saver.saveChartSilently()}))};if(o)s();else{const e=a.t(null,void 0,n(78659)).format({name:(0,Q.capitalizeFirstLetter)(t)});(0,$.showConfirm)({text:e,onConfirm:({dialogClose:e})=>{s(),e()},onCancel:({dialogClose:e})=>{(0,g.setTheme)(t),(0,j.syncTheme)(),e()}})}}(e.chartWidgetCollection())}}))}return o};return window.is_authenticated?j.getThemeNames().then(t):Promise.resolve(t())};var oe=n(78861),se=n(94322);n(78176);var ie=n(7024),le=n(70173),ae=n(90995);const{DrawingSyncMode:re}=oe,ce={drawings:"ToggleHideAllDrawingTools",indicators:"ToggleHideAllIndicators",positions:"ToggleHideAllPositions",all:"ToggleHideAll"},he=new U.TranslatedString("stay in drawing mode",a.t(null,void 0,n(4114))),de=new U.TranslatedString("sync drawings",a.t(null,void 0,n(94521))),ue=a.t(null,void 0,n(99901)),ve=a.t(null,void 0,n(23391)),me=(a.t(null,void 0,n(93027)),a.t(null,void 0,n(3521)),a.t(null,void 0,n(79451))),pe=a.t(null,void 0,n(3519)),ge=a.t(null,void 0,n(94593));var be=n(84526),fe=n(92572),we=n(89324);class ye extends V{constructor(e){super({label:a.t(null,void 0,n(37189)),id:"InvertScale",category:"settingsActions",checkable:!0,onExecute:()=>{this._model.invertPriceScale(this._model.mainSeries().priceScale())},shortcutHint:(0,P.humanReadableHash)(P.Modifiers.Alt+73)}),this._model=e;(this._props=this._model.mainSeries().priceScale().properties().childs().isInverted).subscribe(this,(()=>{this._onUpdate.fire(this)}))}destroy(){super.destroy(),this._props.unsubscribeAll(this)}isChecked(){return this._model.mainSeries().priceScale().isInverted()}}class Se extends V{constructor(e){super({label:a.t(null,void 0,n(6919)),checkable:!0,id:"TogglePercantage",category:"settingsActions",onExecute:()=>{this.isChecked()?this._model.setPriceScaleRegularScaleMode(this._model.mainSeries().priceScale()):this._model.togglePriceScalePercentageScaleMode(this._model.mainSeries().priceScale())},shortcutHint:(0,P.humanReadableHash)(P.Modifiers.Alt+80),disabled:e.mainSeries().priceScale().isLockScale()||6===e.mainSeries().properties().childs().style.value(),checked:e.mainSeries().priceScale().isPercentage()}),this._model=e;(this._props=this._model.mainSeries().priceScale().properties().childs().percentage).subscribe(this,(()=>{this._onUpdate.fire(this)}))}destroy(){super.destroy(),this._props.unsubscribeAll(this)}isChecked(){return this._model.mainSeries().priceScale().isPercentage()}}class xe extends V{constructor(e){super({label:a.t(null,void 0,n(16170)),id:"ToggleLogScale", category:"settingsActions",checkable:!0,onExecute:()=>{this.isChecked()?this._model.setPriceScaleRegularScaleMode(this._model.mainSeries().priceScale()):this._model.togglePriceScaleLogScaleMode(this._model.mainSeries().priceScale())},shortcutHint:(0,P.humanReadableHash)(P.Modifiers.Alt+76),disabled:e.mainSeries().priceScale().isLockScale()||6===e.mainSeries().properties().childs().style.value(),checked:e.mainSeries().priceScale().isLog()}),this._model=e;(this._props=this._model.mainSeries().priceScale().properties().childs().log).subscribe(this,(()=>{this._onUpdate.fire(this)}))}destroy(){super.destroy(),this._props.unsubscribeAll(this)}isChecked(){return this._model.mainSeries().priceScale().isLog()}}var _e=n(91572);const Ee=B.enabled("show_average_close_price_line_and_label"),Ce=new U.TranslatedString("change session",a.t(null,void 0,n(87041))),Me=new U.TranslatedString("change plus button visibility",a.t(null,void 0,n(96379))),ke=new U.TranslatedString("change countdown to bar close visibility",a.t(null,void 0,n(39383))),Ie=new U.TranslatedString("scale price chart only",a.t(null,void 0,n(63796))),Te=new U.TranslatedString("change symbol last value visibility",a.t(null,void 0,n(67453))),Ae=new U.TranslatedString("change high and low price labels visibility",a.t(null,void 0,n(24226))),De=new U.TranslatedString("change average close price label visibility",a.t(null,void 0,n(76852))),Le=new U.TranslatedString("change indicators and financials value labels visibility",a.t(null,void 0,n(71161))),He=new U.TranslatedString("change indicators and financials name labels visibility",a.t(null,void 0,n(35111))),Re=new U.TranslatedString("change high and low price lines visibility",a.t(null,void 0,n(80692))),Ne=new U.TranslatedString("change average close price line visibility",a.t(null,void 0,n(1022))),Pe=new U.TranslatedString("change symbol labels visibility",a.t(null,void 0,n(73357))),Oe=(new U.TranslatedString("change pre/post market price label visibility",a.t(null,void 0,n(30870))),new U.TranslatedString("change symbol previous close value visibility",a.t(null,void 0,n(4729))),new U.TranslatedString("change previous close price line visibility",a.t(null,void 0,n(58419)))),ze=(new U.TranslatedString("change bid and ask labels visibility",a.t(null,void 0,n(69362))),new U.TranslatedString("change bid and ask lines visibility",a.t(null,void 0,n(52919))),new U.TranslatedString("change pre/post market price lines visibility",a.t(null,void 0,n(91978))),new U.TranslatedString("change price line visibility",a.t(null,void 0,n(8662)))),Fe=new U.TranslatedString("change session breaks visibility",a.t(null,void 0,n(38413))),Be=(new U.TranslatedString("change ideas visibility on chart",a.t(null,void 0,n(13489))),new U.TranslatedString("show all ideas",a.t(null,void 0,n(13336))),new U.TranslatedString("show ideas of followed users",a.t(null,void 0,n(91395))),new U.TranslatedString("show my ideas only",a.t(null,void 0,n(57460))),new U.TranslatedString("change events visibility on chart",a.t(null,void 0,n(6119))), new U.TranslatedString("change earnings visibility",a.t(null,void 0,n(6819))),new U.TranslatedString("change dividends visibility",a.t(null,void 0,n(53929))),new U.TranslatedString("change splits visibility",a.t(null,void 0,n(47474))),{0:a.t(null,void 0,n(19265)),1:a.t(null,void 0,n(64526)),9:a.t(null,void 0,n(44958)),2:a.t(null,void 0,n(92911)),14:a.t(null,void 0,n(35458)),15:a.t(null,void 0,n(40447)),3:a.t(null,void 0,n(9537)),16:a.t(null,void 0,n(39883)),4:a.t(null,void 0,n(80082)),7:a.t(null,void 0,n(11604)),5:a.t(null,void 0,n(47189)),6:a.t(null,void 0,n(22027)),8:a.t(null,void 0,n(62423)),10:a.t(null,void 0,n(19579)),11:a.t(null,void 0,n(49942)),12:a.t(null,void 0,n(70405)),13:a.t(null,void 0,n(56281)),17:a.t(null,void 0,n(21190)),18:a.t(null,void 0,n(94861)),19:a.t(null,void 0,n(13618)),20:a.t(null,void 0,n(67346)),21:a.t(null,void 0,n(67579))});async function We(e){const t=[],[o,s]=await Promise.all([ne(e),Promise.resolve(null)]),i=(e=>{const t=[],{stayInDrawingMode:n,drawOnAllCharts:o,drawOnAllChartsMode:s}=oe.properties().childs();t.push(new V({label:ue,checkable:!0,checked:n.value(),id:"ToggleStayInDrawingMode",category:"settingsActions",onExecute:()=>{e.model().setProperty(n,!n.value(),he)}})),t.push(new V({label:ve,checkable:!0,id:"ToggleSyncDrawings",category:"settingsActions",checked:o.value(),disabled:!e.isMultipleLayout().value(),onExecute:()=>{e.model().setProperty(o,!o.value(),de)}}));const i=oe.lockDrawings();t.push(new V({label:me,checkable:!0,id:"ToggleLockDrawings",category:"settingsActions",checked:i.value(),onExecute:()=>{oe.lockDrawings().setValue(!oe.lockDrawings().value())}}));const l=(0,ae.getSavedHideMode)();t.push(...Array.from((0,ae.getHideOptions)()).map((([e,t])=>new V({label:t.tooltip.inactive,checkable:!0,id:ce[e],category:"settingsActions",checked:l===e&&(0,ae.getHideModeStateValue)(e),onExecute:()=>(0,ae.toggleHideMode)(e)}))));const{magnet:a,magnetMode:r}=oe.properties().childs();return t.push(new V({label:pe,checkable:!0,id:"WeakMagnet",category:"functionActions",checked:a.value()&&r.value()===ie.MagnetMode.WeakMagnet,icon:le.drawingToolsIcons.magnet,onExecute:()=>{a.value()&&r.value()===ie.MagnetMode.WeakMagnet?(0,se.setIsMagnetEnabled)(!1):(0,se.setMagnetMode)(ie.MagnetMode.WeakMagnet)}})),t.push(new V({label:ge,checkable:!0,id:"StrongMagnet",category:"functionActions",checked:a.value()&&r.value()===ie.MagnetMode.StrongMagnet,icon:le.drawingToolsIcons.strongMagnet,onExecute:()=>{a.value()&&r.value()===ie.MagnetMode.StrongMagnet?(0,se.setIsMagnetEnabled)(!1):(0,se.setMagnetMode)(ie.MagnetMode.StrongMagnet)}})),t})(e),l=function(e){const t=[];return B.enabled("header_widget")&&B.enabled("header_compare")&&t.push(new V({icon:n(1393),label:(0,F.appendEllipsis)(a.t(null,void 0,n(57e3))),id:"Compare",category:"functionActions",onExecute:()=>e.toggleCompareOrAdd()})),B.enabled("header_widget")&&B.enabled("header_indicators")&&t.push(new V({icon:n(39681),label:(0,F.appendEllipsis)(a.t(null,void 0,n(87829))),id:"InsertIndicator",category:"functionActions",onExecute:()=>{ e.showIndicators([])},shortcutHint:e.options().indicatorsDialogShortcutEnabled?(0,P.humanReadableHash)(47):void 0})),B.enabled("show_object_tree")&&t.push(new V({icon:n(30192),label:a.t(null,void 0,n(27077)),id:"OpenObjectsTreeInRightPanel",category:"functionActions",onExecute:()=>e.showObjectsTreePanelOrDialog()})),B.enabled("header_widget")&&B.enabled("header_settings")&&t.push(new V({label:(0,F.appendEllipsis)(a.t(null,void 0,n(32514))),icon:n(34369),id:"ChartProperties",category:"functionActions",onExecute:()=>{e.showGeneralChartProperties()}})),B.enabled("header_widget")&&B.enabled("header_symbol_search")&&t.push(new V({icon:n(6347),label:(0,F.appendEllipsis)(a.t(null,void 0,n(63245))),id:"ChangeSymbol",category:"functionActions",onExecute:()=>{(0,we.showDefaultSearchDialog)({defaultValue:"",trackResultsOptions:void 0,enableOptionsChain:B.enabled("symbol_search_option_chain_selector")})}})),B.enabled("symbol_info")&&t.push(new V({label:(0,F.appendEllipsis)(a.t(null,void 0,n(75594))),icon:n(37924),id:"SymbolInfo",category:"functionActions",onExecute:()=>{{const t=e.model().model(),n=t.mainSeries().symbolInfo(),o=t.availableUnits(),s={symbolInfo:n,showUnit:t.unitConversionEnabled(),unitDescription:e=>e?o.description(e):"",dateFormatter:t.dateFormatter()};return void(0,be.showSymbolInfoDialog)(s)}}})),e.options().goToDateEnabled&&t.push(new V({label:(0,F.appendEllipsis)(a.t(null,void 0,n(54280))),icon:n(90752),id:"GoToDate",category:"functionActions",onExecute:()=>{(0,fe.showGoToDateDialog)(e)},shortcutHint:(0,P.humanReadableHash)(P.Modifiers.Alt+71)})),t.filter((e=>null!==e))}(e);t.push(...o,...i,...l),s&&t.push(...s);const r=e.model().mainSeries(),c=r.priceScale(),h=r.properties().childs(),d=e.model().paneForSource?.(r);t.push(new V({id:"ResetPriceScale",category:"functionActions",label:a.t(null,void 0,n(15332)),icon:n(39267),onExecute:()=>{d&&e.model().resetPriceScale(d,c)},shortcutHint:(0,P.humanReadableHash)(P.Modifiers.Alt+82)})),t.push(new ye(e.model())),t.push(new Se(e.model())),t.push(new xe(e.model()));const u=c.isLockScale(),v=6===h.style.value();t.push(new V({label:a.t(null,void 0,n(28051)),checkable:!0,id:"SetRegularSessionId",category:"functionActions",disabled:Boolean("regular"===r.symbolInfo()?.subsession_id),onExecute:()=>{e.model().setProperty(h.sessionId,"regular",Ce)},checked:Boolean("regular"===r.symbolInfo()?.subsession_id)})),t.push(new V({label:a.t(null,void 0,n(93308)),checkable:!0,id:"SetExtendedSessionId",category:"functionActions",disabled:!r.symbolInfo()?.subsessions?.some((e=>!e.private&&"extended"===e.id)),onExecute:()=>{const t="extended"===r.symbolInfo()?.subsession_id?"regular":"extended";e.model().setProperty(h.sessionId,t,Ce)},checked:Boolean("extended"===r.symbolInfo()?.subsession_id)})),t.push(new V({label:a.t(null,void 0,n(14017)),checkable:!0,id:"ToggleLockScale",category:"settingsActions",onExecute:()=>{e.model().togglePriceScaleLockScaleMode(e.model().mainSeries().priceScale())},checked:c.isLockScale()})),t.push(new V({label:a.t(null,void 0,n(89999)),checkable:!0, id:"ToggleIndexedTo100",category:"settingsActions",onExecute:()=>{c.isIndexedTo100()?e.model().setPriceScaleRegularScaleMode(e.model().mainSeries().priceScale()):e.model().togglePriceScaleIndexedTo100ScaleMode(e.model().mainSeries().priceScale())},disabled:u||v,checked:c.isIndexedTo100()})),t.push(new V({id:"AutoFitsToScreen",category:"settingsActions",label:a.t(null,void 0,n(24157)),checkable:!0,onExecute:()=>{e.model().togglePriceScaleAutoScaleMode(c)},checked:c.isAutoScale(),disabled:c.properties().childs().autoScaleDisabled.value()})),t.push(new V({label:a.t(null,{context:"scale_menu"},n(55300)),checkable:!0,id:"ToggleRegularScale",category:"settingsActions",onExecute:()=>{e.model().setPriceScaleRegularScaleMode(c)},disabled:u||v||c.isRegular(),checked:c.isRegular()}));const m=e.model().model().priceScaleSlotsCount(),p=0===m.left;t.push(new V({label:p?a.t(null,void 0,n(26493)):a.t(null,void 0,n(40789)),id:"MoveScaleToSide",category:"functionActions",disabled:m.left+m.right!==1,onExecute:()=>{e.model().mergeAllScales(p?"left":"right")}})),t.push(new V({label:a.t(null,void 0,n(7276)),id:"MergeAllScalesToLeft",category:"functionActions",disabled:m.left+m.right===1,onExecute:()=>{e.model().mergeAllScales("left")}})),t.push(new V({label:a.t(null,void 0,n(80219)),id:"MergeAllScalesToRight",category:"functionActions",disabled:m.left+m.right===1,onExecute:()=>{e.model().mergeAllScales("right")}})),t.push(new V({label:a.t(null,void 0,n(71566)),checkable:!0,checked:K.addPlusButtonProperty.value(),id:"ToggleAddOrderPlusButton",category:"settingsActions",onExecute:()=>{e.model().setProperty(K.addPlusButtonProperty,!K.addPlusButtonProperty.value(),Me)}}));const g=e.properties().childs().scalesProperties.childs(),b=h.showCountdown;t.push(new V({label:a.t(null,void 0,n(83140)),checkable:!0,id:"ToggleCountdown",category:"settingsActions",checked:b.value(),onExecute:()=>{e.model().setProperty(b,!b.value(),ke)}}));const f=g.scaleSeriesOnly;t.push(new V({label:a.t(null,void 0,n(43758)),checkable:!0,id:"ScalePriceChartOnly",category:"settingsActions",checked:f.value(),onExecute:()=>{e.model().setProperty(f,!f.value(),Ie)}}));const w=g.showSeriesLastValue;t.push(new V({label:a.t(null,void 0,n(10127)),checkable:!0,id:"ToggleSymbolLastValue",category:"settingsActions",checked:w.value(),onExecute:()=>{e.model().setProperty(w,!w.value(),Te)}}));const y=h.highLowAvgPrice.childs();t.push(new V({label:a.t(null,void 0,n(99479)),checkable:!0,id:"ToggleHighLowPriceLabels",category:"settingsActions",checked:y.highLowPriceLabelsVisible.value(),onExecute:()=>{e.model().setProperty(y.highLowPriceLabelsVisible,!y.highLowPriceLabelsVisible.value(),Ae)}})),Ee&&t.push(new V({label:a.t(null,void 0,n(21841)),checkable:!0,id:"ToggleAverageClosePriceLabel",category:"settingsActions",checked:y.averageClosePriceLabelVisible.value(),onExecute:()=>{const t=!y.averageClosePriceLabelVisible.value();e.model().setProperty(y.averageClosePriceLabelVisible,t,De)}}));const S=g.showSymbolLabels;t.push(new V({label:a.t(null,void 0,n(32390)),checkable:!0, id:"ToggleSymbolLabels",category:"settingsActions",checked:S.value(),onExecute:()=>{e.model().setProperty(S,!S.value(),Pe)}}));const x=(0,q.combineProperty)(((e,t)=>e||t),g.showStudyLastValue.weakReference(),g.showFundamentalLastValue.weakReference());t.push(new V({label:a.t(null,void 0,n(46850)),checkable:!0,id:"ToggleStudyLastValue",category:"settingsActions",checked:x.value(),onExecute:()=>{const t=!x.value();e.model().beginUndoMacro(Le),e.model().setProperty(g.showStudyLastValue,t,null),e.model().setProperty(g.showFundamentalLastValue,t,null),e.model().endUndoMacro()},onDestroy:()=>{x.destroy()}}));const _=(0,q.combineProperty)(((e,t)=>e||t),g.showStudyPlotLabels.weakReference(),g.showFundamentalNameLabel.weakReference());t.push(new V({label:a.t(null,void 0,n(54418)),checkable:!0,id:"ToggleIndicatorsLabels",category:"settingsActions",checked:_.value(),onExecute:()=>{e.model().beginUndoMacro(He);const t=!_.value();e.model().setProperty(g.showStudyPlotLabels,t,null),e.model().setProperty(g.showFundamentalNameLabel,t,null),e.model().endUndoMacro()},onDestroy:()=>{_.destroy()}})),t.push(new V({label:a.t(null,void 0,n(33766)),checkable:!0,id:"ToggleHighLowPriceLines",category:"settingsActions",checked:y.highLowPriceLinesVisible.value(),onExecute:()=>{e.model().setProperty(y.highLowPriceLinesVisible,!y.highLowPriceLinesVisible.value(),Re)}})),Ee&&t.push(new V({label:a.t(null,void 0,n(16138)),checkable:!0,id:"ToggleAverageClosePriceLine",category:"settingsActions",checked:y.averageClosePriceLineVisible.value(),onExecute:()=>{const t=!y.averageClosePriceLineVisible.value();e.model().setProperty(y.averageClosePriceLineVisible,t,Ne)}}));const E=h.showPriceLine;t.push(new V({label:a.t(null,void 0,n(72926)),checkable:!0,id:"TogglePriceLine",category:"settingsActions",checked:E.value(),onExecute:()=>{e.model().setProperty(E,!E.value(),ze)}}));const C=h.showPrevClosePriceLine;t.push(new V({label:a.t(null,void 0,n(79366)),checkable:!0,id:"ToggleSymbolPrevCloseLine",disabled:e.model().mainSeries().isDWM(),category:"settingsActions",checked:C.value(),onExecute:()=>{e.model().setProperty(C,!C.value(),Oe)}})),t.push(new V({label:a.t(null,void 0,n(54170)),icon:n(39267),id:"ResetTimeScale",category:"functionActions",onExecute:()=>{e.model().resetTimeScale()},shortcutHint:(0,P.humanReadableHash)(P.Modifiers.Mod+P.Modifiers.Alt+81)}));const M=e.model().model().sessions().properties().childs().sessionHighlight.childs().vertlines.childs().sessBreaks.childs().visible,k=(0,q.createWVFromProperty)(e.model().mainSeries().isDWMProperty()),I=new V({label:a.t(null,void 0,n(66707)),checkable:!0,id:"ToggleSessionBreaks",category:"settingsActions",disabled:k.value(),checked:M.value(),onExecute:()=>{e.model().setProperty(M,!M.value(),Fe)},onDestroy:()=>k.destroy()});if(k.subscribe((()=>I.update({disabled:k.value()}))),t.push(I),t.push(new V({label:a.t(null,void 0,n(49153)),icon:n(39267),id:"ResetChart",category:"functionActions",onExecute:()=>e.GUIResetScales(),shortcutHint:(0,P.humanReadableHash)(P.Modifiers.Alt+82)})),t.push(new V({icon:n(93544), label:a.t(null,void 0,n(99984)),id:"RemoveAllIndicators",category:"functionActions",onExecute:()=>e.removeAllStudies()})),t.push(new V({icon:n(93544),label:a.t(null,void 0,n(96374)),id:"RemoveAllDrawingTools",category:"functionActions",onExecute:()=>e.removeAllDrawingTools()})),t.push(new V({icon:n(93544),label:a.t(null,void 0,n(4474)),id:"RemoveAllIndicatorsAndDrawingTools",category:"functionActions",onExecute:()=>e.removeAllStudiesDrawingTools()})),t.push(new V({label:a.t(null,void 0,n(22437)),id:"ApplyIndicatorsToAllCharts",category:"functionActions",disabled:!e.applyIndicatorsToAllChartsAvailable(),onExecute:()=>{e.chartWidgetCollection().applyIndicatorsToAllCharts(e)}})),B.enabled("header_widget")&&B.enabled("header_undo_redo")&&(t.push(new V({id:"Undo",category:"functionActions",icon:n(77665),label:a.t(null,void 0,n(14804)),onExecute:()=>{e.model().undoHistory().undo()},disabled:e.model().undoHistory().undoStack().isEmpty(),shortcutHint:(0,P.humanReadableHash)(P.Modifiers.Mod+90)})),t.push(new V({id:"Redo",category:"functionActions",icon:n(96052),label:a.t(null,void 0,n(48236)),onExecute:()=>{e.model().undoHistory().redo()},disabled:e.model().undoHistory().redoStack().isEmpty(),shortcutHint:(0,P.humanReadableHash)(P.Modifiers.Mod+89)}))),t.push(new V({label:a.t(null,void 0,n(12754)),id:"MoveChartRight",category:"functionActions",disabled:!e.chartWidgetCollection().activeChartCanBeMoved().value(),onExecute:()=>{e.chartWidgetCollection().moveActiveChartWithUndo(!1)}})),t.push(new V({label:a.t(null,void 0,n(35112)),id:"MoveChartLeft",category:"functionActions",disabled:!e.chartWidgetCollection().activeChartCanBeMoved().value(),onExecute:()=>{e.chartWidgetCollection().moveActiveChartWithUndo(!0)}})),B.enabled("header_widget")&&B.enabled("header_chart_type")){const n=(0,X.allChartStyles)();for(const o of n)t.push(new V({id:`ChartStyle_${o}`,category:"functionActions",disabled:!O.linking.supportedChartStyles.value()?.includes(o),onExecute:()=>{e.chartWidgetCollection().setChartStyleToWidget(o)},icon:J.SERIES_ICONS[o],label:Be[o]}))}return B.enabled("header_widget")&&(0,_e.shouldShowFullscreen)()&&t.push(new V({label:a.t(null,void 0,n(67092)),id:"Fullscreen mode",icon:n(49697),category:"functionActions",checkable:!0,checked:e.chartWidgetCollection().fullscreen().value(),disabled:!e.chartWidgetCollection().fullscreenable().value(),onExecute:()=>{const t=e.chartWidgetCollection();t.fullscreen().value()?t.exitFullscreen():t.startFullscreen()},shortcutHint:(0,P.humanReadableHash)(P.Modifiers.Shift+70)})),t}n(50151);var Ve=n(97995),Ze=n(6519),Ue=n(18117),Ge=n(84902);function Ke(){return Ge.lineToolsFlat.filter(Ge.isLineTool).map((e=>function(e){const t=Ue.lineToolsInfo[e],o=t.selectHotkey?.hash,s={id:e,category:"drawingsActions",label:t.localizedName,icon:t.icon,shortcutHint:o?(0,P.humanReadableHash)(o):void 0,payload:e,onExecute:()=>{oe.tool.setValue(e),(0,Ve.trackDrawingToolSelected)(e,"Global action")},favourite:Ze.LinetoolsFavoritesStore.isFavorite(e),onFavouriteClick:t=>{t.preventDefault(), Ze.LinetoolsFavoritesStore.isFavorite(e)?Ze.LinetoolsFavoritesStore.removeFavorite(e):Ze.LinetoolsFavoritesStore.addFavorite(e)}};return e.toLowerCase().includes("fib")&&(s.aliases=[a.t(null,void 0,n(26578))]),new V(s)}(e.name)))}n(3343);function qe(e,t){const n=e.getState().category,o=t.getState().category;return n===o?0:"drawingsActions"===o?1:"drawingsActions"===n||"functionActions"===n?-1:1}var Xe=n(16216),Je=n(87896);class je extends i.DialogRenderer{constructor(e){super(),this._actions=[],this.show=e=>{this.visible().value()||async function(e,t){const o=[],[s,i,l,r,c]=await Promise.all([We(e),Promise.resolve(null),Promise.resolve(null),Promise.resolve(null),Promise.resolve(null)]);o.push(...s);const h=e.chartWidgetCollection();if(B.enabled("header_widget")&&B.enabled("header_resolutions")){const t={label:(0,F.appendEllipsis)(a.t(null,void 0,n(2569))),id:"ChangeInterval",category:"functionActions",onExecute:()=>{(0,z.showChangeIntervalDialogAsync)({initVal:O.linking.interval.value(),selectOnInit:!0})}};!B.enabled("show_interval_dialog_on_key_press")||e.readOnly()||e.options().hideSymbolSearch||(t.shortcutHint=(0,P.humanReadableHash)(188)),o.push(new V(t))}if(t&&B.enabled("header_widget")&&B.enabled("header_saveload")){o.push(new V({id:"LoadChartLayout",category:"functionActions",label:(0,F.appendEllipsis)(a.t(null,void 0,n(7386))),onExecute:()=>{t.showLoadDialog()},shortcutHint:a.t(null,{context:"hotkey"},n(23821))}));const s=e.getSaveChartService();s&&(o.push(new V({id:"RenameChartLayout",category:"functionActions",label:(0,F.appendEllipsis)(a.t(null,void 0,n(18638))),onExecute:()=>{s.renameChart()}})),o.push(new V({id:"SaveChartLayout",category:"functionActions",icon:n(53707),label:(0,F.appendEllipsis)(a.t(null,void 0,n(41569))),disabled:!s.hasChanges(),onExecute:()=>{s.saveChartOrShowTitleDialog()},shortcutHint:(0,P.humanReadableHash)(P.Modifiers.Mod+83)})))}return o.push(new V({id:"TakeSnapshot",category:"functionActions",icon:n(72644),label:a.t(null,void 0,n(8270)),onExecute:()=>h.takeServerScreenshot(),shortcutHint:(0,P.humanReadableHash)(P.Modifiers.Alt+83)})),o}(this._activeChartWidget,this._loadChartService).then((t=>{this._actions=t.concat((()=>{const e=B.enabled("left_toolbar")?[...Ke()]:[];return e})()).sort(qe),this._rootInstance=(0,Je.createReactRoot)(o.createElement(R,{shouldReturnFocus:e?.shouldReturnFocus,dialogId:"globalSearch",items:this._actions,onClose:this.hide}),this._container),this._setVisibility(!0)}))},this.hide=()=>{this._rootInstance?.unmount(),this._setVisibility(!1);for(const e of this._actions)e.destroy()};const t=(0,Xe.service)(s.CHART_WIDGET_COLLECTION_SERVICE);this._activeChartWidget=t.activeChartWidget.value(),this._loadChartService=e}}},50238:(e,t,n)=>{"use strict";n.d(t,{useRovingTabindexElement:()=>l});var o=n(50959),s=n(39416),i=n(43010);function l(e,t=[]){const[n,l]=(0,o.useState)(!1),a=(0,s.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":l(!0);break ;case"roving-tabindex:secondary-element":l(!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,n?0:-1]}},10087:(e,t,n)=>{"use strict";n.d(t,{getElementId:()=>d,useSearchDialogKeyboardNavigation:()=>h});var o=n(50959),s=n(50335),i=n(3343),l=n(76460),a=n(22692),r=n(77914),c=n(49483);function h(e){const{contentContainerRef:t,searchInputRef:n,dialogRef:s,getNextFocusedItemIndex:h,isNavigationDisabled:u,onEscapeClick:v,scrollToFocusedItem:m,getElementIdByIndex:p=d}=e,[g,b]=(0,o.useState)(null),[f,w]=(0,o.useState)(null),y=(0,o.useRef)({itemIndex:null,actionIndex:null}),[S,x]=(0,o.useState)(!1);function _(){x(!1),w(null),b(null)}return(0,o.useLayoutEffect)((()=>{if(null===g||!S)return;const e=p(g,f),n=t.current?.querySelector(`#${e}`);return n?.dispatchEvent(new CustomEvent("active-descendant-focus")),()=>{n?.dispatchEvent(new CustomEvent("active-descendant-blur"))}}),[g,S,f]),{handleKeyDown:function(e){const o=(0,i.hashFromEvent)(e);if(27===o&&v)return void v(e);const s=t.current;if(!s||e.target!==n.current)return;if(32===o||13===o){if(null===g)return;e.preventDefault();const t=s.querySelector(`#${p(g,f)}`);if(!(t instanceof HTMLElement))return;return void t.click()}const l=(0,a.mapKeyCodeToDirection)(o);if(!l||u)return;const c=null!==g?s.querySelector(`#${p(g)}`):null;switch(l){case"blockNext":case"blockPrev":{e.preventDefault();const t=h(g,"blockNext"===l?1:-1);if(null===t)return;b(t),x(!0),y.current.itemIndex=t;const n=s.querySelector(`#${p(t)}`);if(m(n,t),null!==f&&n instanceof HTMLElement){const e=Array.from(n.querySelectorAll('[data-role="list-item-action"]'));if(!e.length)return w(null),void(y.current.actionIndex=null);const t=(0,r.clamp)(f,0,e.length-1);w(t),y.current.actionIndex=t}return}case"inlineNext":{if(!c)return;e.preventDefault();const t=Array.from(c.querySelectorAll('[data-role="list-item-action"]'));if(!t||!t.length)return;return null===f?(w(0),void(y.current.actionIndex=0)):f===t.length-1?(w(null),void(y.current.actionIndex=null)):(w(f+1),void(y.current.actionIndex=f+1))}case"inlinePrev":{if(!c)return;e.preventDefault();const t=Array.from(c.querySelectorAll('[data-role="list-item-action"]'));if(!t||!t.length)return;return null===f?(w(t.length-1),void(y.current.actionIndex=t.length-1)):0===f?(w(null),void(y.current.actionIndex=null)):(w(f-1),void(y.current.actionIndex=f-1))}}},handleForceFocus:function(){(0,a.updateTabIndexes)()},handleSearchRefBlur:function(e){_(),b(g),c.CheckMobile.any()||e.relatedTarget!==s.current?.getElement()||e.target.focus()},resetFocusState:_,restoreFocusState:function(){w(y.current.actionIndex),b(y.current.itemIndex),x(!0)},focusVisible:S,focusedItemIndex:g,focusedActionIndex:f,setFocusedItemIndex:b,setFocusedActionIndex:w,onDialogClick:function(e){(0,l.isKeyboardClick)(e)||(x(!1),w(null))}}}function d(e,t){return(0, s.isNumber)(t)&&-1!==t?`list-item-${e}-action-${t}`:`list-item-${e}`}},51826:(e,t,n)=>{"use strict";n.d(t,{DialogsOpenerManager:()=>o,dialogsOpenerManager:()=>s});class o{constructor(){this._storage=new Map}setAsOpened(e,t){this._storage.set(e,t)}setAsClosed(e){this._storage.delete(e)}isOpened(e){return this._storage.has(e)}getDialogPayload(e){return this._storage.get(e)}}const s=new o},10772:(e,t,n)=>{"use strict";n.d(t,{ContextMenuAction:()=>S});var o=n(50959),s=n(50151),i=n(90186),l=n(83021),a=n(87713),r=n(97754),c=n.n(r),h=n(26996),d=n(5304),u=n(2277);function v(e){const{size:t="normal"}=e;return o.createElement(d.ContextMenuItem,{size:t,jsxLabel:o.createElement("div",{className:c()(u.loaderWrap,u[t])},o.createElement(h.Loader,{className:u.loader})),noInteractive:!0,onMouseOver:e.onMouseOver})}var m=n(3343),p=n(50238),g=n(57418);const b=(0,o.forwardRef)((function(e,t){const{className:n,...s}=e,[i,l]=(0,p.useRovingTabindexElement)(t);return o.createElement(d.ContextMenuItem,{...s,className:c()(g.accessible,n),reference:i,tabIndex:l,onKeyDown:function(e){if(e.target!==e.currentTarget)return;const t=(0,m.hashFromEvent)(e);13!==t&&32!==t||(e.preventDefault(),i.current instanceof HTMLElement&&i.current.click())},"data-role":"menuitem","aria-disabled":e.disabled||void 0})}));var f=n(24640);var w=n(51768),y=n(91561);class S extends o.PureComponent{constructor(e){super(e),this._itemRef=null,this._menuElementRef=o.createRef(),this._menuRef=null,this._handleClick=e=>{e.isDefaultPrevented()||this.state.disabled||(this._hasSubItems()?this._showSubMenu():(this.state.doNotCloseOnClick||(0,a.globalCloseMenu)(),this.props.action.execute(),this._trackEvent(),this.props.onExecute&&this.props.onExecute(this.props.action)))},this._handleClickToolbox=()=>{(0,a.globalCloseMenu)()},this._handleItemMouseOver=()=>{this._showSubMenu(),this._setCurrentContextValue()},this._handleMenuMouseOver=()=>{this._setCurrentContextValue()},this._showSubMenu=()=>{this.props.onShowSubMenu(this.props.action)},this._calcSubMenuPos=e=>function(e,t,n={x:0,y:10}){if(t){const{left:n,right:o,top:s}=t.getBoundingClientRect(),i=document.documentElement.clientWidth,l={x:n-e,y:s},a={x:o,y:s};return(0,f.isRtl)()?n<=e?a:l:i-o>=e?a:l}return n}(e.contentWidth,this._itemRef),this._updateState=e=>{this.setState(e.getState())},this._setItemRef=e=>{this._itemRef=e},this._handleMenuRef=e=>{this._menuRef=e},this._registerSubmenu=()=>this.context?.registerSubmenu(this.props.action.id,(e=>(0,s.ensureNotNull)(this._itemRef).contains(e)||null!==this._menuElementRef.current&&this._menuElementRef.current.contains(e))),this.state={...this.props.action.getState()}}componentDidMount(){this.props.action.onUpdate().subscribe(this,this._updateState),this.state.subItems.length&&(this._unsubscribe=this._registerSubmenu()),this.props.reference&&(this._itemRef=this.props.reference.current)}componentDidUpdate(e,t){t.loading!==this.state.loading&&this.props.onRequestUpdate?.(),0===t.subItems.length&&this.state.subItems.length>0&&(this._unsubscribe=this._registerSubmenu()), t.subItems.length>0&&0===this.state.subItems.length&&this._unsubscribe?.(),t.subItems!==this.state.subItems&&null!==this._menuRef&&this._menuRef.update()}componentWillUnmount(){this.props.action.onUpdate().unsubscribe(this,this._updateState),this._unsubscribe&&this._unsubscribe()}render(){const e=this.context?.current?this.context.current===this.props.action.id:this.props.isSubMenuOpened;return this.state.loading?o.createElement(v,{size:this.state.size}):o.createElement(b,{...(0,i.filterDataProps)(this.props),theme:this.props.theme,ref:this.props.reference??this._setItemRef,onClick:this._handleClick,onClickToolbox:this._handleClickToolbox,onMouseOver:this._handleItemMouseOver,hovered:e,hasSubItems:this._hasSubItems(),actionName:this.state.name,checkboxInput:this.props.checkboxInput,selected:this.props.selected,className:this.props.className,...this.state},o.createElement(y.ContextMenu,{isOpened:e,items:this.state.subItems,position:this._calcSubMenuPos,menuStatName:this.props.menuStatName,parentStatName:this._getStatName(),menuElementReference:this._menuElementRef,onMouseOver:this.state.subItems.length?this._handleMenuMouseOver:void 0,ref:this._handleMenuRef}))}_setCurrentContextValue(){this.state.subItems.length&&this.context?.setCurrent(this.props.action.id)}_hasSubItems(){return this.state.subItems.length>0}_trackEvent(){const e=this._getStatName();(0,w.trackEvent)("ContextMenuClick",this.props.menuStatName||"",e)}_getStatName(){return[this.props.parentStatName,this.state.statName].filter((e=>Boolean(e))).join(".")}}S.contextType=l.SubmenuContext},5304:(e,t,n)=>{"use strict";n.d(t,{ContextMenuItem:()=>y,DEFAUL_CONTEXT_MENU_ITEM_THEME:()=>f});var o=n(50959),s=n(97754),i=n(70673),l=n(49483),a=n(71382),r=n(96040),c=n(36189),h=n(99025),d=n(25812),u=n(37103),v=n(90186),m=n(60925),p=n(60004),g=n(14665),b=n(47429);const f=b,w=u.enabled("items_favoriting");class y extends o.PureComponent{constructor(){super(...arguments),this._handleMouseOver=e=>{(0,a.isTouchEvent)(e.nativeEvent)||this.props.onMouseOver&&this.props.onMouseOver()},this._handleClickToolbox=e=>{e.stopPropagation(),this.props.onClickToolbox&&this.props.onClickToolbox()}}render(){const{hasSubItems:e,shortcutHint:t,hint:n,invisibleHotkey:i,favourite:a,theme:r=b,size:d="normal",onKeyDown:u,label:m,jsxLabel:p,styledLabel:f}=this.props,y=this.props.checkable&&this.props.checkboxInput?"label":"div";return o.createElement(o.Fragment,null,o.createElement("tr",{...(0,v.filterDataProps)(this.props),...(0,v.filterAriaProps)(this.props),id:this.props.id,className:s(this.props.className,r.item,!this.props.noInteractive&&r.interactive,this.props.hovered&&r.hovered,this.props.disabled&&r.disabled,this.props.active&&r.active,this.props.selected&&r.selected,r[d]),onClick:this.props.onClick,onMouseOver:this._handleMouseOver,ref:this.props.reference,"data-action-name":this.props.actionName,tabIndex:this.props.tabIndex,onKeyDown:u},w&&void 0!==a&&o.createElement("td",{className:r.favoriteActionCell},o.createElement(c.FavoriteButton,{id:`${this.props.id}-favorite`, className:r.favourite,isFilled:a,onClick:this.props.onFavouriteClick,"data-role":"list-item-action"})),o.createElement("td",{className:s(r.iconCell),"data-icon-cell":!0},this._icon(r)),o.createElement("td",{className:r.contentCell},o.createElement(y,{className:r.content},o.createElement("span",{className:s(r.label,this.props.checked&&r.checked),"data-label":!0},!p&&f?f.map((({text:e,...t},n)=>o.createElement("span",{key:n,style:t},e))):p??m),this._toolbox(r),e&&o.createElement("span",{className:r.arrowIcon,dangerouslySetInnerHTML:{__html:g},"data-submenu-arrow":!0}),!e&&t&&!l.CheckMobile.any()&&o.createElement(h.Hint,{className:s(i&&r.invisibleHotkey),text:t}),!e&&!t&&n&&o.createElement(h.Hint,{text:n})))),o.createElement("tr",{className:r.subMenu},o.createElement("td",null,this.props.children)))}_icon(e){if(this.props.checkable){if(this.props.checkboxInput)return o.createElement(i.CheckboxInput,{className:s(e.icon,e.checkboxInput),checked:this.props.checked});if(this.props.checked){const t=!this.props.icon&&!this.props.iconChecked,n=this.props.iconChecked||this.props.icon||p;return o.createElement("span",{className:e.icon,dangerouslySetInnerHTML:{__html:n},"data-icon-checkmark":t})}return this.props.icon?o.createElement("span",{className:e.icon,dangerouslySetInnerHTML:{__html:this.props.icon}}):o.createElement("span",{className:e.icon})}return this.props.icon?o.createElement("span",{className:e.icon,dangerouslySetInnerHTML:{__html:this.props.icon}}):null}_toolbox(e){return this.props.toolbox?o.createElement("span",{className:s(e.toolbox,this.props.showToolboxOnHover&&e.showToolboxOnHover),onClick:this._handleClickToolbox,"data-toolbox":!0},this._renderToolboxContent()):null}_renderToolboxContent(){return this.props.toolbox&&this.props.toolbox.type===d.ToolboxType.Delete?o.createElement(r.RemoveButton,{icon:m,onClick:this.props.toolbox.action}):null}}},91561:(e,t,n)=>{"use strict";n.d(t,{ContextMenu:()=>C,OverlapContextMenu:()=>M});var o=n(50959),s=n(97754),i=n.n(s),l=n(86431),a=n(27317),r=n(52778);class c extends o.PureComponent{constructor(){super(...arguments),this._handleKeyDown=e=>{e.keyCode===this.props.keyCode&&this.props.handler(e)}}componentDidMount(){document.addEventListener(this.props.eventType||"keydown",this._handleKeyDown,!1)}componentWillUnmount(){document.removeEventListener(this.props.eventType||"keydown",this._handleKeyDown,!1)}render(){return null}}var h=n(69451),d=n(37558),u=n(90692),v=n(68745);function m(e){return o.createElement("li",{className:v.separator})}var p=n(23829),g=n(41590),b=n(87713);function f(e){const t=e.action.custom()??e.action,[n,s]=(0,o.useState)((()=>t.getState())),[i,l]=(0,o.useState)(!1),a=!!n.subItems.length,r=a&&i;return(0,o.useEffect)((()=>{const e=()=>s(t.getState());return t.onUpdate().subscribe(null,e),()=>{t.onUpdate().unsubscribe(null,e)}}),[]),o.createElement(p.ContextMenuItem,{...n,onClick:function(e){if(n.disabled||e.defaultPrevented)return;if(a)return void l(!0);n.doNotCloseOnClick||(0,b.globalCloseMenu)();t.execute()},isLoading:n.loading,isHovered:r },r&&o.createElement(g.Drawer,{onClose:c},o.createElement(S,{items:n.subItems,parentAction:t,closeNested:c})));function c(e){e&&e.preventDefault(),l(!1)}}var w=n(54627),y=n(66493);function S(e){const{items:t,parentAction:n,closeNested:s}=e,i=!Boolean(n)&&t.every((e=>!Boolean("separator"!==e.type&&(e.getState().icon||e.getState().checkable))));return o.createElement(w.EmptyIconsContext.Provider,{value:i},o.createElement("ul",null,n&&o.createElement(o.Fragment,null,o.createElement(p.ContextMenuItem,{label:n.getState().label,isTitle:!0,active:!1,disabled:!1,subItems:[],checkable:!1,checked:!1,doNotCloseOnClick:!1,icon:y,onClick:s}),o.createElement(m,null)),t.map((e=>{switch(e.type){case"action":return o.createElement(f,{key:e.id,action:e});case"separator":return o.createElement(m,{key:e.id})}}))))}const x=o.createContext(null);var _=n(73607),E=n(45536);class C extends o.PureComponent{constructor(e){super(e),this._menuRef=o.createRef(),this._handleRequestUpdate=()=>{this.update()},this._handleClose=()=>{this.props.onClose&&this.props.onClose()},this._handleOutsideClickClose=e=>{const{doNotCloseOn:t,onClose:n}=this.props;!n||void 0!==t&&t.contains(e.target)||n()},this._handleFocusOnOpen=()=>{this.props.menuElementReference?.current&&this.props.takeFocus&&this.props.menuElementReference?.current.focus({preventScroll:!0})},this._handleFocus=e=>{this.props.isKeyboardEvent&&e.target&&(0,_.focusFirstMenuItem)(e.target)},this.state={}}render(){const{isOpened:e,onClose:t,items:n,doNotCloseOn:s,menuStatName:l,parentStatName:v,takeFocus:m,...p}=this.props;return e&&n.length>0?o.createElement(d.DrawerManager,null,o.createElement(c,{keyCode:27,eventType:"keyup",handler:this._handleClose}),o.createElement(u.MatchMedia,{rule:"(max-width: 440px)"},(t=>this._isDrawer(t)?o.createElement(x.Provider,{value:{type:"drawer"}},o.createElement(g.Drawer,{onClose:this._handleClose,position:"Bottom","data-name":p["data-name"]},o.createElement(S,{items:n}))):o.createElement(x.Provider,{value:{type:"menu"}},o.createElement(r.OutsideEvent,{handler:this._handleOutsideClickClose,mouseDown:!0,touchStart:!0,reference:this.props.menuElementReference},(t=>o.createElement(a.Menu,{...p,reference:t,className:i()(E.menu,"context-menu"),onClose:this._handleClose,noMomentumBasedScroll:!0,ref:this._menuRef,tabIndex:m?-1:void 0,onOpen:this._handleFocusOnOpen,onFocus:this._handleFocus,onKeyDown:_.handleAccessibleMenuKeyDown},o.createElement(h.ActionsTable,{items:n,menuStatName:l,parentStatName:v,parentIsOpened:e,onRequestUpdate:this._handleRequestUpdate})))))))):null}update(){this._menuRef.current&&this._menuRef.current.update(),this.props.isKeyboardEvent&&this.props.menuElementReference?.current&&document.activeElement===this.props.menuElementReference.current&&(0,_.focusFirstMenuItem)(this.props.menuElementReference.current)}_isDrawer(e){return void 0===this.props.mode?e:"drawer"===this.props.mode}}const M=(0,l.makeOverlapable)(C)},25812:(e,t,n)=>{"use strict";var o;n.d(t,{ToolboxType:()=>o}),function(e){e[e.Delete=0]="Delete"}(o||(o={}))},99025:(e,t,n)=>{ "use strict";n.d(t,{Hint:()=>a});var o=n(50959),s=n(97754),i=n.n(s),l=n(47429);function a(e){const{text:t="",className:n}=e;return o.createElement("span",{className:i()(l.shortcut,n)},t)}},23829:(e,t,n)=>{"use strict";n.d(t,{ContextMenuItem:()=>m});var o=n(50959),s=n(97754),i=n.n(s),l=n(9745),a=n(26996),r=n(54627),c=n(99025),h=n(39750),d=n(79978),u=n(60925),v=n(5264);function m(e){const{className:t,isTitle:n,isLoading:s,isHovered:m,active:p,checkable:g,disabled:b,checked:f,icon:w,iconChecked:y,hint:S,subItems:x,label:_,styledLabel:E,onClick:C,children:M,toolbox:k,jsxLabel:I,size:T="normal"}=e,A=(0,o.useContext)(r.EmptyIconsContext),D=!!x.length;return s?o.createElement("li",{className:i()(t,v.item,v.loading,v[T])},o.createElement(a.Loader,null)):o.createElement("li",{className:i()(t,v.item,v.interactive,n&&v.title,b&&v.disabled,m&&v.hovered,p&&v.active,A&&v.emptyIcons,v[T]),onClick:C},o.createElement(l.Icon,{className:i()(v.icon),icon:function(){if(g&&f)return y||w||h;return w}()}),o.createElement("span",{className:i()(v.label)},!I&&E?E.map((({text:e,...t},n)=>o.createElement("span",{key:n,style:t},e))):I??_),!!k&&o.createElement(l.Icon,{onClick:function(){k&&k.action()},className:v.remove,icon:u}),!D&&S&&o.createElement(c.Hint,{className:v.shortcut,text:S}),D&&o.createElement(l.Icon,{className:v.nested,icon:d}),M)}},54627:(e,t,n)=>{"use strict";n.d(t,{EmptyIconsContext:()=>o});const o=n(50959).createContext(!1)},37558:(e,t,n)=>{"use strict";n.d(t,{DrawerContext:()=>l,DrawerManager:()=>i});var o=n(50959),s=n(99054);class i extends o.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,s.setFixedBodyState)(!0),this._isBodyFixed=!0),t.stack.length&&!this.state.stack.length&&this._isBodyFixed&&((0,s.setFixedBodyState)(!1),this._isBodyFixed=!1)}componentWillUnmount(){this.state.stack.length&&this._isBodyFixed&&(0,s.setFixedBodyState)(!1)}render(){return o.createElement(l.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 l=o.createContext(null)},41590:(e,t,n)=>{"use strict";n.d(t,{Drawer:()=>v});var o=n(50959),s=n(50151),i=n(97754),l=n(4226),a=n(65718),r=n(37558),c=n(29197),h=n(86656),d=n(76773);var u;function v(e){const{position:t="Bottom",onClose:n,children:h,reference:u,className:v,theme:p=d}=e,g=(0,s.ensureNotNull)((0,o.useContext)(r.DrawerContext)),[b]=(0,o.useState)((()=>(0,l.randomHash)())),f=(0,o.useRef)(null),w=(0,o.useContext)(c.CloseDelegateContext);return(0,o.useLayoutEffect)((()=>((0,s.ensureNotNull)(f.current).focus({preventScroll:!0}),w.subscribe(g,n),g.addDrawer(b),()=>{g.removeDrawer(b),w.unsubscribe(g,n)})),[]),o.createElement(a.Portal,null,o.createElement("div",{ref:u,className:i(d.wrap,d[`position${t}`]) },b===g.currentDrawer&&o.createElement("div",{className:d.backdrop,onClick:n}),o.createElement(m,{className:i(p.drawer,d[`position${t}`],v),ref:f,"data-name":e["data-name"],"data-qa-id":e["data-qa-id"]},h)))}!function(e){e.Left="Left",e.Bottom="Bottom"}(u||(u={}));const m=(0,o.forwardRef)(((e,t)=>{const{className:n,...s}=e;return o.createElement(h.TouchScrollContainer,{className:i(d.drawer,n),tabIndex:-1,ref:t,...s})}))},90692:(e,t,n)=>{"use strict";n.d(t,{MatchMedia:()=>s});var o=n(50959);class s extends o.PureComponent{constructor(e){super(e),this._handleChange=()=>{this.forceUpdate()},this.state={query:window.matchMedia(this.props.rule)}}componentDidMount(){this._subscribe(this.state.query)}componentDidUpdate(e,t){this.state.query!==t.query&&(this._unsubscribe(t.query),this._subscribe(this.state.query))}componentWillUnmount(){this._unsubscribe(this.state.query)}render(){return this.props.children(this.state.query.matches)}static getDerivedStateFromProps(e,t){return e.rule!==t.query.media?{query:window.matchMedia(e.rule)}:null}_subscribe(e){e.addEventListener("change",this._handleChange)}_unsubscribe(e){e.removeEventListener("change",this._handleChange)}}},64706:(e,t,n)=>{"use strict";n.d(t,{MenuContext:()=>o});const o=n(50959).createContext(null)},27317:(e,t,n)=>{"use strict";n.d(t,{DEFAULT_MENU_THEME:()=>g,Menu:()=>f});var o=n(50959),s=n(97754),i=n.n(s),l=n(50151),a=n(77914),r=n(26867),c=n(50655),h=n(87713),d=n(67961),u=n(26709),v=n(83021),m=n(64706),p=n(5808);const g=p;var b;!function(e){e[e.IndentFromWindow=0]="IndentFromWindow"}(b||(b={}));class f extends o.PureComponent{constructor(e){super(e),this._containerRef=null,this._scrollWrapRef=null,this._raf=null,this._scrollRaf=null,this._scrollTimeout=void 0,this._manager=new d.OverlapManager,this._hotkeys=null,this._scroll=0,this._handleContainerRef=e=>{this._containerRef=e,this.props.reference&&("function"==typeof this.props.reference&&this.props.reference(e),"object"==typeof this.props.reference&&(this.props.reference.current=e))},this._handleScrollWrapRef=e=>{this._scrollWrapRef=e,"function"==typeof this.props.scrollWrapReference&&this.props.scrollWrapReference(e),"object"==typeof this.props.scrollWrapReference&&(this.props.scrollWrapReference.current=e)},this._handleCustomRemeasureDelegate=()=>{this._resizeForced(),this._handleMeasure()},this._handleMeasure=({callback:e,forceRecalcPosition:t}={})=>{if(this.state.isMeasureValid&&!t)return;const{position:n}=this.props,o=(0,l.ensureNotNull)(this._containerRef);let s=o.getBoundingClientRect();const i=document.documentElement.clientHeight,r=document.documentElement.clientWidth,c=this.props.closeOnScrollOutsideOffset??0;let h=i-0-c;const d=s.height>h;if(d){(0,l.ensureNotNull)(this._scrollWrapRef).style.overflowY="scroll",s=o.getBoundingClientRect()}const{width:u,height:v}=s,m="function"==typeof n?n({contentWidth:u,contentHeight:v,availableWidth:r,availableHeight:i}):n,p=m?.indentFromWindow?.left??0,g=r-(m.overrideWidth??u)-(m?.indentFromWindow?.right??0),b=(0, a.clamp)(m.x,p,Math.max(p,g)),f=(m?.indentFromWindow?.top??0)+c,w=i-(m.overrideHeight??v)-(m?.indentFromWindow?.bottom??0);let y=(0,a.clamp)(m.y,f,Math.max(f,w));if(m.forbidCorrectYCoord&&y{this.props.doNotRestorePosition||this._restoreScrollPosition(),e&&e()}))},this._restoreScrollPosition=()=>{const e=document.activeElement,t=(0,l.ensureNotNull)(this._containerRef);if(null!==e&&t.contains(e))try{e.scrollIntoView()}catch(e){}else(0,l.ensureNotNull)(this._scrollWrapRef).scrollTop=this._scroll},this._resizeForced=()=>{this.setState({appearingMenuHeight:void 0,appearingMenuWidth:void 0,appearingPosition:void 0,isMeasureValid:void 0})},this._resize=()=>{null===this._raf&&(this._raf=requestAnimationFrame((()=>{this.setState({appearingMenuHeight:void 0,appearingMenuWidth:void 0,appearingPosition:void 0,isMeasureValid:void 0}),this._raf=null})))},this._handleGlobalClose=e=>{this.props.onClose(e)},this._handleSlot=e=>{this._manager.setContainer(e)},this._handleScroll=()=>{this._scroll=(0,l.ensureNotNull)(this._scrollWrapRef).scrollTop},this._handleScrollOutsideEnd=()=>{clearTimeout(this._scrollTimeout),this._scrollTimeout=setTimeout((()=>{this._handleMeasure({forceRecalcPosition:!0})}),80)},this._handleScrollOutside=e=>{e.target!==this._scrollWrapRef&&(this._handleScrollOutsideEnd(),null===this._scrollRaf&&(this._scrollRaf=requestAnimationFrame((()=>{this._handleMeasure({forceRecalcPosition:!0}),this._scrollRaf=null}))))},this.state={}}componentDidMount(){this._handleMeasure({callback:this.props.onOpen});const{customCloseDelegate:e=h.globalCloseDelegate,customRemeasureDelegate:t}=this.props;e.subscribe(this,this._handleGlobalClose),t?.subscribe(null,this._handleCustomRemeasureDelegate),window.addEventListener("resize",this._resize);const n=null!==this.context;this._hotkeys||n||(this._hotkeys=u.createGroup({desc:"Popup menu"}),this._hotkeys.add({desc:"Close",hotkey:27,handler:()=>{this.props.onKeyboardClose&&this.props.onKeyboardClose(),this._handleGlobalClose()}})),this.props.repositionOnScroll&&window.addEventListener("scroll",this._handleScrollOutside,{capture:!0})}componentDidUpdate(){this._handleMeasure()}componentWillUnmount(){const{customCloseDelegate:e=h.globalCloseDelegate,customRemeasureDelegate:t}=this.props;e.unsubscribe(this,this._handleGlobalClose),t?.unsubscribe(null,this._handleCustomRemeasureDelegate),window.removeEventListener("resize",this._resize),window.removeEventListener("scroll",this._handleScrollOutside,{capture:!0}),this._hotkeys&&(this._hotkeys.destroy(),this._hotkeys=null),null!==this._raf&&(cancelAnimationFrame(this._raf),this._raf=null),null!==this._scrollRaf&&(cancelAnimationFrame(this._scrollRaf), this._scrollRaf=null),this._scrollTimeout&&clearTimeout(this._scrollTimeout)}render(){const{id:e,role:t,"aria-label":n,"aria-labelledby":s,"aria-activedescendant":l,"aria-hidden":a,"aria-describedby":h,"aria-invalid":d,children:u,minWidth:g,theme:b=p,className:f,maxHeight:y,onMouseOver:S,onMouseOut:x,onKeyDown:_,onFocus:E,onBlur:C}=this.props,{appearingMenuHeight:M,appearingMenuWidth:k,appearingPosition:I,isMeasureValid:T}=this.state,A={"--ui-kit-menu-max-width":`${I&&I.x}px`,maxWidth:"calc(100vw - var(--ui-kit-menu-max-width) - 6px)"};return o.createElement(m.MenuContext.Provider,{value:this},o.createElement(v.SubmenuHandler,null,o.createElement(c.SlotContext.Provider,{value:this._manager},o.createElement("div",{id:e,role:t,"aria-label":n,"aria-labelledby":s,"aria-activedescendant":l,"aria-hidden":a,"aria-describedby":h,"aria-invalid":d,className:i()(f,b.menuWrap,!T&&b.isMeasuring),style:{height:M,left:I&&I.x,minWidth:g,position:"fixed",top:I&&I.y,width:k,...this.props.limitMaxWidth&&A},"data-name":this.props["data-name"],"data-qa-id":this.props.dataQaId,"data-tooltip-show-on-focus":this.props["data-tooltip-show-on-focus"],ref:this._handleContainerRef,onScrollCapture:this.props.onScroll,onContextMenu:r.preventDefaultForContextMenu,tabIndex:this.props.tabIndex,onMouseOver:S,onMouseOut:x,onKeyDown:_,onFocus:E,onBlur:C},o.createElement("div",{className:i()(b.scrollWrap,!this.props.noMomentumBasedScroll&&b.momentumBased),style:{overflowY:void 0!==M?"scroll":"auto",maxHeight:y},onScrollCapture:this._handleScroll,ref:this._handleScrollWrapRef},o.createElement(w,{className:b.menuBox},u)))),o.createElement(c.Slot,{reference:this._handleSlot})))}update(e){e?this._resizeForced():this._resize()}focus(e){this._containerRef?.focus(e)}blur(){this._containerRef?.blur()}}function w(e){const t=(0,l.ensureNotNull)((0,o.useContext)(v.SubmenuContext)),n=o.useRef(null);return o.createElement("div",{ref:n,className:e.className,onMouseOver:function(e){if(!(null!==t.current&&e.target instanceof Node&&(o=e.target,n.current?.contains(o))))return;var o;t.isSubmenuNode(e.target)||t.setCurrent(null)},"data-name":"menu-inner","data-qa-id":"menu-inner"},e.children)}f.contextType=v.SubmenuContext},29197:(e,t,n)=>{"use strict";n.d(t,{CloseDelegateContext:()=>i});var o=n(50959),s=n(87713);const i=o.createContext(s.globalCloseDelegate)},65718:(e,t,n)=>{"use strict";n.d(t,{Portal:()=>o.Portal,PortalContext:()=>o.PortalContext});var o=n(19250)},96040:(e,t,n)=>{"use strict";n.d(t,{RemoveButton:()=>d});var o=n(11542),s=n(50959),i=n(97754),l=n.n(i),a=n(9745),r=n(74670),c=n(33765),h=n(92657);function d(e){const{className:t,isActive:i,onClick:d,onMouseDown:u,title:v,hidden:m,"data-name":p="remove-button",icon:g,...b}=e,[f,w]=(0,r.useActiveDescendant)(null);return s.createElement(a.Icon,{...b,"data-name":p,className:l()(h.button,"apply-common-tooltip",i&&h.active,m&&h.hidden,w&&h.focused,t),icon:g||c,onClick:d,onMouseDown:u,title:v??o.t(null,void 0,n(67410)),ariaLabel:v??o.t(null,void 0,n(67410)),ref:f})}},50655:(e,t,n)=>{"use strict";n.d(t,{Slot:()=>o.Slot, SlotContext:()=>o.SlotContext});var o=n(99663)},86656:(e,t,n)=>{"use strict";n.d(t,{TouchScrollContainer:()=>c});var o=n(50959),s=n(59142),i=n(50151),l=n(49483);const a=CSS.supports("overscroll-behavior","none");let r=0;const c=(0,o.forwardRef)(((e,t)=>{const{children:n,...i}=e,c=(0,o.useRef)(null);return(0,o.useImperativeHandle)(t,(()=>c.current)),(0,o.useLayoutEffect)((()=>{if(l.CheckMobile.iOS())return r++,null!==c.current&&(a?1===r&&(document.body.style.overscrollBehavior="none"):(0,s.disableBodyScroll)(c.current,{allowTouchMove:h(c)})),()=>{r--,null!==c.current&&(a?0===r&&(document.body.style.overscrollBehavior=""):(0,s.enableBodyScroll)(c.current))}}),[]),o.createElement("div",{ref:c,...i},n)}));function h(e){return t=>{const n=(0,i.ensureNotNull)(e.current),o=document.activeElement;return!n.contains(t)||null!==o&&n.contains(o)&&o.contains(t)}}},40173:(e,t,n)=>{"use strict";function o(e,t,n={}){return Object.assign({},e,function(e,t,n={}){const o=Object.assign({},t);for(const s of Object.keys(t)){const i=n[s]||s;i in e&&(o[s]=[e[i],t[s]].join(" "))}return o}(e,t,n))}n.d(t,{mergeThemes:()=>o})},33647:(e,t,n)=>{"use strict";var o;function s(e){e.dispatchEvent(new CustomEvent("roving-tabindex:main-element"))}function i(e){e.dispatchEvent(new CustomEvent("roving-tabindex:secondary-element"))}n.d(t,{becomeMainElement:()=>s,becomeSecondaryElement:()=>i}),function(e){e.MainElement="roving-tabindex:main-element",e.SecondaryElement="roving-tabindex:secondary-element"}(o||(o={}))},69451:(e,t,n)=>{"use strict";n.d(t,{ActionsTable:()=>a});var o=n(50959),s=n(16191);function i(e){return o.createElement("tr",{className:s.row},o.createElement("td",null,o.createElement("div",{className:s.line})),o.createElement("td",null,o.createElement("div",{className:s.line}),e.hint?o.createElement("div",{className:s.hint},e.hint):null))}var l=n(10772);class a extends o.PureComponent{constructor(e){super(e),this._handleShowSubMenu=e=>{const t=e.getState();this.setState({showSubMenuOf:t.subItems.length?e:void 0})},this.state={}}render(){return o.createElement("table",null,o.createElement("tbody",null,this.props.items.map((e=>this._item(e)))))}static getDerivedStateFromProps(e,t){return!e.parentIsOpened&&t.showSubMenuOf?{showSubMenuOf:void 0}:null}_item(e){switch(e.type){case"separator":return o.createElement(i,{key:e.id,hint:e.getHint()});case"action":const t=e.custom()??e;return o.createElement(l.ContextMenuAction,{key:t.id,action:t,onShowSubMenu:this._handleShowSubMenu,isSubMenuOpened:this.state.showSubMenuOf===t,menuStatName:this.props.menuStatName,parentStatName:this.props.parentStatName,onRequestUpdate:this.props.onRequestUpdate})}}}},91572:(e,t,n)=>{"use strict";n.d(t,{shouldShowFullscreen:()=>s});var o=n(37103);function s(){return o.enabled("header_fullscreen_button")}},99678:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SERIES_ICONS:()=>g});var o=n(4475),s=n(94670),i=n(87778),l=n(39956),a=n(14083),r=n(45504),c=n(52867),h=n(41473),d=n(31246),u=n(15726),v=n(24464),m=n(71705),p=n(9450);const g={3:s,16:i,0:l,1:a,8:r,9:c,2:h,14:d,15:u,10:v,12:m, 13:p};g[21]=o},81662:(e,t,n)=>{"use strict";function o(e){return e.charAt(0).toUpperCase()+e.substring(1)}n.d(t,{capitalizeFirstLetter:()=>o})},60925:e=>{e.exports=''},60004:e=>{e.exports=''},87778:e=>{e.exports=''},65890:e=>{e.exports=''},66493:e=>{e.exports=''},79978:e=>{e.exports=''},94670:e=>{ e.exports=''},39956:e=>{e.exports=''},24464:e=>{e.exports=''},14083:e=>{e.exports=''},53707:e=>{e.exports=''},9450:e=>{e.exports=''},1393:e=>{ e.exports=''},49697:e=>{e.exports=''},45504:e=>{e.exports=''},71705:e=>{e.exports=''},4475:e=>{e.exports=''},52867:e=>{e.exports=''},39681:e=>{e.exports=''},37924:e=>{e.exports=''},31246:e=>{ e.exports=''},41473:e=>{e.exports=''},96052:e=>{e.exports=''},72644:e=>{e.exports=''},15726:e=>{e.exports=''},77665:e=>{e.exports=''},39750:e=>{e.exports=''},33765:e=>{e.exports=''},90752:e=>{e.exports=''},30192:e=>{ e.exports=''},55883:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});const o=function(){}}}]);