(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[2962],{97754:(t,e)=>{var o;!function(){"use strict";var i={}.hasOwnProperty;function n(){for(var t=[],e=0;e<arguments.length;e++){var o=arguments[e];if(o){var r=typeof o;if("string"===r||"number"===r)t.push(o);else if(Array.isArray(o)&&o.length){var a=n.apply(null,o);a&&t.push(a)}else if("object"===r)for(var s in o)i.call(o,s)&&o[s]&&t.push(s)}}return t.join(" ")}t.exports?(n.default=n,t.exports=n):void 0===(o=function(){return n}.apply(e,[]))||(t.exports=o)}()},72174:t=>{t.exports={divider:"divider-pzdcWv_c","orientation-horizontal":"orientation-horizontal-pzdcWv_c","orientation-vertical":"orientation-vertical-pzdcWv_c","size-xsmall":"size-xsmall-pzdcWv_c","size-small":"size-small-pzdcWv_c","size-medium":"size-medium-pzdcWv_c","size-large":"size-large-pzdcWv_c","size-xlarge":"size-xlarge-pzdcWv_c","size-xxlarge":"size-xxlarge-pzdcWv_c","type-primary":"type-primary-pzdcWv_c","type-secondary":"type-secondary-pzdcWv_c"}},91754:t=>{t.exports={content:"content-DAxjbs7m"}},19250:(t,e,o)=>{"use strict";o.d(e,{Portal:()=>c,PortalContext:()=>d});var i=o(50959),n=o(32227),r=o(25931),a=o(67961),s=o(34811),l=o(99663);class c extends i.PureComponent{constructor(){super(...arguments),this._uuid=(0,r.nanoid)()}componentWillUnmount(){this._manager().removeWindow(this._uuid)}render(){const t=this._manager().ensureWindow(this._uuid,this.props.layerOptions);t.style.top=this.props.top||"",t.style.bottom=this.props.bottom||"",t.style.left=this.props.left||"",t.style.right=this.props.right||"",t.style.pointerEvents=this.props.pointerEvents||"";const e=this.props.className;return e&&("string"==typeof e?t.classList.add(e):t.classList.add(...e)),this.props.shouldTrapFocus&&!t.hasAttribute(s.FOCUS_TRAP_DATA_ATTRIBUTE)&&t.setAttribute(s.FOCUS_TRAP_DATA_ATTRIBUTE,"true"),this.props["aria-hidden"]&&t.setAttribute("aria-hidden","true"),n.createPortal(i.createElement(d.Provider,{value:this},this.props.children),t)}moveToTop(){this._manager().moveToTop(this._uuid)}_manager(){return null===this.context?(0,a.getRootOverlapManager)():this.context}}c.contextType=l.SlotContext;const d=i.createContext(null)},99663:(t,e,o)=>{"use strict";o.d(e,{Slot:()=>n,SlotContext:()=>r});var i=o(50959);class n extends i.Component{shouldComponentUpdate(){return!1}render(){return i.createElement("div",{style:{position:"fixed",zIndex:150,left:0,top:0},ref:this.props.reference})}}const r=i.createContext(null)},67961:(t,e,o)=>{"use strict";o.d(e,{OverlapManager:()=>a,getRootOverlapManager:()=>l});var i=o(50151),n=o(34811);class r{constructor(){this._storage=[]}add(t){this._storage.push(t)}remove(t){this._storage=this._storage.filter((e=>t!==e))}has(t){return this._storage.includes(t)}getItems(){return this._storage}}class a{constructor(t=document){this._storage=new r,this._windows=new Map,this._index=0,this._document=t,this._container=t.createDocumentFragment()}setContainer(t){const e=this._container,o=null===t?this._document.createDocumentFragment():t;!function(t,e){
Array.from(t.childNodes).forEach((t=>{t.nodeType===Node.ELEMENT_NODE&&e.appendChild(t)}))}(e,o),this._container=o}registerWindow(t){this._storage.has(t)||this._storage.add(t)}ensureWindow(t,e={position:"fixed",direction:"normal"}){const o=this._windows.get(t);if(void 0!==o)return o;this.registerWindow(t);const i=this._document.createElement("div");if(i.style.position=e.position,i.style.zIndex=this._index.toString(),i.dataset.id=t,void 0!==e.index){const t=this._container.childNodes.length;if(e.index>=t)this._container.appendChild(i);else if(e.index<=0)this._container.insertBefore(i,this._container.firstChild);else{const t=this._container.childNodes[e.index];this._container.insertBefore(i,t)}}else"reverse"===e.direction?this._container.insertBefore(i,this._container.firstChild):this._container.appendChild(i);return this._windows.set(t,i),++this._index,i}unregisterWindow(t){this._storage.remove(t);const e=this._windows.get(t);void 0!==e&&(null!==e.parentElement&&e.parentElement.removeChild(e),this._windows.delete(t))}getZindex(t){const e=this.ensureWindow(t);return parseInt(e.style.zIndex||"0")}moveLastWindowToTop(){const t=this._storage.getItems(),e=t[t.length-1];e&&this.moveToTop(e)}moveToTop(t){if(this.getZindex(t)!==this._index){const e=this.ensureWindow(t);this._windows.forEach(((t,o)=>{t.hasAttribute(n.FOCUS_TRAP_DATA_ATTRIBUTE)&&t.setAttribute(n.FOCUS_TRAP_DATA_ATTRIBUTE,t===e?"true":"false")})),e.style.zIndex=(++this._index).toString()}}removeWindow(t){this.unregisterWindow(t)}}const s=new WeakMap;function l(t=document){const e=t.getElementById("overlap-manager-root");if(null!==e)return(0,i.ensureDefined)(s.get(e));{const e=new a(t),o=function(t){const e=t.createElement("div");return e.style.position="absolute",e.style.zIndex=150..toString(),e.style.top="0px",e.style.left="0px",e.id="overlap-manager-root",e.dataset.qaId="overlap-manager-root",e}(t);return s.set(o,e),e.setContainer(o),t.body.appendChild(o),e}}var c;!function(t){t[t.BaseZindex=150]="BaseZindex"}(c||(c={}))},87896:(t,e,o)=>{"use strict";o.d(e,{createReactRoot:()=>u});var i=o(50959),n=o(32227),r=o(4237);const a=(0,i.createContext)({isOnMobileAppPage:()=>!1,isRtl:!1,locale:"en",renderMode:"legacy"});var s=o(84015),l=o(24640);const c={iOs:"old",android:"new",old:"old",new:"new",any:"any"};function d(t){const[e]=(0,i.useState)({isOnMobileAppPage:t=>(0,s.isOnMobileAppPage)(c[t]),isRtl:(0,l.isRtl)(),locale:window.locale,renderMode:t.renderMode??"legacy"});return i.createElement(a.Provider,{value:e},t.children)}function u(t,e,o="legacy"){const a=i.createElement(d,{renderMode:o},t);if("modern"===o){const t=(0,r.createRoot)(e);return t.render(a),{render(e){t.render(i.createElement(d,{renderMode:o},e))},unmount(){t.unmount()}}}return n.render(a,e),{render(t){n.render(i.createElement(d,{renderMode:o},t),e)},unmount(){n.unmountComponentAtNode(e)}}}},77975:(t,e,o)=>{"use strict";o.d(e,{useWatchedValueReadonly:()=>n});var i=o(50959);const n=(t,e=!1,o=[])=>{
const n="watchedValue"in t?t.watchedValue:void 0,r="defaultValue"in t?t.defaultValue:t.watchedValue.value(),[a,s]=(0,i.useState)(n?n.value():r);return(e?i.useLayoutEffect:i.useEffect)((()=>{if(n){s(n.value());const t=t=>s(t);return n.subscribe(t),()=>n.unsubscribe(t)}return()=>{}}),[n,...o]),a}},4237:(t,e,o)=>{"use strict";var i=o(32227);e.createRoot=i.createRoot,i.hydrateRoot},47723:t=>{t.exports={"floating-tooltip-container":"floating-tooltip-container-HbjzitVh",hidden:"hidden-HbjzitVh","chart-floating-tooltip-content":"chart-floating-tooltip-content-HbjzitVh","chart-floating-tooltip-row":"chart-floating-tooltip-row-HbjzitVh","chart-floating-tooltip-divider":"chart-floating-tooltip-divider-HbjzitVh","chart-floating-tooltip-divider-dark":"chart-floating-tooltip-divider-dark-HbjzitVh","chart-floating-tooltip-title":"chart-floating-tooltip-title-HbjzitVh","chart-floating-tooltip-title-text":"chart-floating-tooltip-title-text-HbjzitVh","chart-floating-tooltip-title-text-dark":"chart-floating-tooltip-title-text-dark-HbjzitVh","chart-floating-tooltip-title-inputs":"chart-floating-tooltip-title-inputs-HbjzitVh","chart-floating-tooltip-title-inputs-dark":"chart-floating-tooltip-title-inputs-dark-HbjzitVh","chart-floating-tooltip-value":"chart-floating-tooltip-value-HbjzitVh","chart-floating-tooltip-value-dark":"chart-floating-tooltip-value-dark-HbjzitVh","chart-floating-tooltip-value--summary":"chart-floating-tooltip-value--summary-HbjzitVh","chart-floating-tooltip-positioner":"chart-floating-tooltip-positioner-HbjzitVh","chart-floating-tooltip-positioner-dark":"chart-floating-tooltip-positioner-dark-HbjzitVh"}},64624:(t,e,o)=>{"use strict";o.r(e),o.d(e,{createChartFloatingTooltip:()=>C});var i=o(50959),n=o(87896),r=o(97754),a=o.n(r),s=o(87465),l=o(62764),c=o(91754),d=o.n(c);function u(t){const{children:e}=t,{onContentResized:o}=(0,i.useContext)(l.RectanglePositionerContext),n=(0,i.useMemo)((()=>new ResizeObserver((([t])=>{o(t.borderBoxSize[0].inlineSize,t.borderBoxSize[0].blockSize)}))),[o]);return i.createElement("div",{ref:t=>{n.disconnect(),t&&n.observe(t)},className:d().content},e)}var p,h,m,g=o(11670),f=o(60179),v=o(72174),_=o.n(v);function w(t){const{className:e,type:o="secondary",size:n="small",orientation:r="horizontal"}=t,s=a()(e,_().divider,_()[`size-${n}`],_()[`type-${o}`],_()[`orientation-${r}`]);return i.createElement("hr",{className:s,"aria-orientation":r})}!function(t){t.XSmall="xsmall",t.Small="small",t.Medium="medium",t.Large="large",t.XLarge="xlarge",t.XXLarge="xxlarge"}(p||(p={})),function(t){t.Primary="primary",t.Secondary="secondary"}(h||(h={})),function(t){t.Horizontal="horizontal",t.Vertical="vertical"}(m||(m={}));var y=o(77975),x=o(47723);const b=12;function z(t){const{state:e,isDark:o}=t;return i.createElement("div",{className:x["chart-floating-tooltip-row"]},i.createElement("div",{className:x["chart-floating-tooltip-title"]},i.createElement("div",{className:a()(x["chart-floating-tooltip-title-text"],o&&x["chart-floating-tooltip-title-text-dark"])},e.titleText),i.createElement("div",{
className:a()(x["chart-floating-tooltip-title-inputs"],o&&x["chart-floating-tooltip-title-inputs-dark"])},e.titleInputs)),i.createElement("div",{className:a()(x["chart-floating-tooltip-value"],e.isSummary&&x["chart-floating-tooltip-value--summary"],o&&x["chart-floating-tooltip-value-dark"]),style:{color:t.state.valueColor}},e.value))}function E(t){const{state:e,isDark:o}=t;return i.createElement(i.Fragment,null,e.plots.map(((t,e)=>i.createElement(z,{key:e,state:t,isDark:o}))))}function T(t){const e=(0,y.useWatchedValueReadonly)({watchedValue:t.isDark}),o=(0,y.useWatchedValueReadonly)({watchedValue:t.state}),n=[...o.sources,o.seriesSource].filter(s.notUndefined).reduce(((t,e)=>t+e.plots.length),0),r=(0,i.useRef)(null);return i.createElement(l.RectanglePositioner,{isOpen:o.visible&&n>0,anchoredAt:{x:o.x-b,y:o.y,width:2*b,height:0},width:{by:"content"},height:{by:"content"},isRtl:!1,anchorPositionerCardAppearanceClassname:a()(x["chart-floating-tooltip-positioner"],e&&x["chart-floating-tooltip-positioner-dark"]),ifNonePlacementRuleMatched:(0,g.ifNonePlacementRuleMatchedToImpl)({pickRule:{by:"smallest-overlap",criteria:"area"},vertical:"slideToFit"}),placementRules:R,refObjectToContentWrapperElement:r},i.createElement(u,null,i.createElement("div",{className:x["chart-floating-tooltip-content"]},!!o.seriesSource?.plots.length&&i.createElement(i.Fragment,null,i.createElement(E,{state:o.seriesSource,isDark:e}),o.sources.length>0&&i.createElement(w,{size:"xsmall",className:a()(x["chart-floating-tooltip-divider"],e&&x["chart-floating-tooltip-divider-dark"])})),o.sources.map(((t,o)=>i.createElement(E,{state:t,isDark:e,key:`source-${o}`}))))))}const R=[f.PLACEMENT_RIGHT_ALIGN_CENTER,f.PLACEMENT_LEFT_ALIGN_CENTER];function C(t,e){const o=document.createElement("div"),r=(0,n.createReactRoot)(i.createElement(T,{state:t,isDark:e}),o);return{destroy:()=>{r.unmount(),o.remove(),t.release()}}}},10978:(t,e,o)=>{"use strict";o.r(e),o.d(e,{createViewState:()=>u,limitedPlots:()=>c});var i=o(87465),n=o(11542),r=o(8811),a=o(48943),s=o(6652);const l=10;function c(t,e,i){if(!t||!e)return[];const r=t.items(),a=i-l+1;if(r.length>e||a>1&&r.length===e){const i=t.items().slice(0,e-1);return i.push({titleText:"",titleInputs:"",value:n.t(null,{context:"chart floating toolbar",plural:"{plotsCount} more values",count:a},o(46729)).format({plotsCount:a.toString()}),isSummary:!0}),i}return r}function d(t,e,o,i){return e&&"release"in e?(0,a.combine)(((t,e)=>({plots:c(t,o,i)})),e,t).ownership():(0,a.combine)((t=>({plots:c(e,o,i)})),t).ownership()}function u(t,e,o){const n=t.model().model(),c=(0,a.combine)((t=>t?.containsMainSeries()?n.mainSeries().chartFloatingTooltipView?.()??null:null),t.activePaneWidget().weakReference()),u=(0,a.combine)(((t,e,o)=>({cursor:t,visible:e,seriesSource:o})),e.weakReference(),o.weakReference(),d(e.weakReference(),c.ownership(),1/0,0)),p=(0,a.accumulate)(((t,e)=>({seriesSource:e.seriesSource,sources:t.filter((t=>t.plots.length)),x:e.cursor?.x??0,y:e.cursor?.y??0,visible:e.visible})),function(t,e,o){const n=(0,
a.combine)((t=>t?[(0,r.createWVFromGetterAndSubscription)((()=>[...t.state().sourcesByGroup().plotSources().filter((t=>t.isVisible()))].reverse()),t.state().dataSourcesCollectionChanged()).ownership()]:[]),e.weakReference()),c=(0,a.accumulate)((t=>t[0]??[]),n.ownership());return(0,a.combine)(((e,o)=>{const n=e.filter((t=>!(0,s.isSeries)(t))).map((t=>t.chartFloatingTooltipView?.()??null)).filter(i.notNull),r=function(t){return t.reduce(((t,e)=>t+e.items().length),0)}(n);return n.reduce(((e,o,i)=>{if(e.counter>=l)return e;const n=d(t,o,l-e.counter,r);return{counter:e.counter+n.value().plots.length,views:[...e.views,n]}}),{counter:0,views:[]}).views}),c.ownership(),o.weakReference()).ownership()}(e,t.activePaneWidget().weakReference(),c.weakReference()).ownership(),u.ownership());return p.ownership()}},25931:(t,e,o)=>{"use strict";o.d(e,{nanoid:()=>i});let i=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce(((t,e)=>t+=(e&=63)<36?e.toString(36):e<62?(e-26).toString(36).toUpperCase():e>62?"-":"_"),"")}}]);