Release v29.2.0 (from 92e59637d61b6a77468d0026d24a07296d63e896)
This commit is contained in:
42
changelog.md
42
changelog.md
@@ -4,6 +4,48 @@
|
||||
<!-- markdownlint-disable no-emphasis-as-header -->
|
||||
<!-- markdownlint-disable no-inline-html -->
|
||||
<!-- markdownlint-disable code-block-style -->
|
||||
## Version 29.2.0
|
||||
|
||||
*Date: Mon Apr 07 2025*
|
||||
|
||||
**New Features**
|
||||
|
||||
- **Added new methods to Trading Host.** The [Trading Host](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/trading-concepts#trading-host) now includes three new methods designed to clear specific caches and trigger fresh data fetches:
|
||||
- [`ordersFullUpdate`](https://www.tradingview.com/charting-library-docs/latest/api/interfaces/Charting_Library.IBrokerConnectionAdapterHost#ordersfullupdate)
|
||||
- [`positionsFullUpdate`](https://www.tradingview.com/charting-library-docs/latest/api/interfaces/Charting_Library.IBrokerConnectionAdapterHost#positionsfullupdate)
|
||||
- [`individualPositionsFullUpdate`](https://www.tradingview.com/charting-library-docs/latest/api/interfaces/Charting_Library.IBrokerConnectionAdapterHost#individualpositionsfullupdate)
|
||||
- **Added cross-tab synchronization for watchlists.** This feature is enabled by default and requires the `use_localstorage_for_settings` [featureset](https://www.tradingview.com/charting-library-docs/latest/customization/Featuresets) to be enabled.
|
||||
To disable the cross-tab synchronization, use the `watchlist_cross_tab_sync` featureset. (Trading Platform only)
|
||||
|
||||
**Improvements**
|
||||
|
||||
- **New `resetCache` method.** The new `resetCache` method allows you to delete previously loaded data for all symbol and resolution combinations known to the datafeed at once. You can use this method instead of [`onResetCacheNeededCallback`](https://www.tradingview.com/charting-library-docs/latest/api/interfaces/Charting_Library.IDatafeedChartApi#subscribebars) to clear the cache before calling [`resetData`](https://www.tradingview.com/charting-library-docs/latest/api/interfaces/Charting_Library.IChartWidgetApi#resetdata). In this case, you do not need to wait for [`subscribeBars`](https://www.tradingview.com/charting-library-docs/latest/api/interfaces/Charting_Library.IDatafeedChartApi#subscribebars) to be called to access the callback.
|
||||
|
||||
**Bug Fixes**
|
||||
|
||||
- **Save button tooltip still shows shortcut when `save_shortcut` is disabled.** Fixed a bug where the _Save_ button's tooltip still showed the shortcut when the `save_shortcut` featureset was disabled. Fixes [#8925](https://github.com/tradingview/charting_library/issues/8925)
|
||||
- **Fixed an issue where on some occasions PineJS functions would not return the right values when internally comparing it to MIN_VALUE or MAX_VALUE.**
|
||||
|
||||
- **Adding a custom interval could cause an error.** Adding a custom interval after enabling the [`custom_resolution`](https://www.tradingview.com/charting-library-docs/latest/customization/Featuresets#custom_resolutions) featureset used to cause a console error.
|
||||
- **Fixed an issue with time scale marks that couldn't contain any underscore character.**
|
||||
|
||||
- **Fixed a bug where `getBars` failed to display error messages containing semicolons.**
|
||||
|
||||
- **Future bar time extrapolation with `disable_resolution_rebuild`.** Fixed an issue where future bar times would be extrapolated incorrectly when the `disable_resolution_rebuild` featureset was enabled, and daily bars that do not consider the January 1 to be the first day of the year were provided to the library.
|
||||
- **Compare Symbol search dialog behavior.** Fixed an issue where the library would try to resolve a symbol that may not exist when users pressed _Enter_ whenever the featureset `allow_arbitrary_symbol_search_input` would be enabled.
|
||||
- **Compare symbol legend context menu.** Fixed an issue where the context menu for compared symbols would show the _Add this indicator to favorites_ item.
|
||||
- **Main series context menu.** Fixed an issue where the [context menu](https://www.tradingview.com/charting-library-docs/latest/ui_elements/context-menu) for the main series would show a blank space instead of the _Add SYMBOL to watchlist_ item.
|
||||
- **Watchlist item counter.** Fixed an issue where the watchlist item count would include section titles in its calculation.
|
||||
- **Fixed drawing keyboard shortcuts.** Fixed an issue where using keyboard shortcuts to add drawings would sometimes open the _Symbol Search_ dialog instead of adding the intended drawing.
|
||||
|
||||
**Documentation**
|
||||
|
||||
- **The following enhancements were made.**
|
||||
- Added a new section explaining how to [display pre- and post-market price lines](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Extended-Sessions#enable-the-price-line).
|
||||
- Added a new section explaining how to [provide profit and loss values](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/trading-concepts/positions#provide-profit-and-loss) in Trading Platform.
|
||||
- Updated the [Trading Session](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Trading-Sessions) article with information on how to specify [session history](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Trading-Sessions#session-history)
|
||||
|
||||
---
|
||||
|
||||
|
||||
## Version 29.1.0
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,9 +1,9 @@
|
||||
(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[731],{59142:function(e,t){var o,n,a;n=[t],o=function(e){"use strict";function t(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t<e.length;t++)o[t]=e[t];return o}return Array.from(e)}Object.defineProperty(e,"__esModule",{value:!0});var o=!1;if("undefined"!=typeof window){var n={get passive(){o=!0}};window.addEventListener("testPassive",null,n),window.removeEventListener("testPassive",null,n)}var a="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&/iP(ad|hone|od)/.test(window.navigator.platform),r=[],l=!1,i=-1,c=void 0,s=void 0,d=function(e){return r.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},u=function(e){var t=e||window.event;return!!d(t.target)||1<t.touches.length||(t.preventDefault&&t.preventDefault(),!1)},m=function(){setTimeout((function(){void 0!==s&&(document.body.style.paddingRight=s,s=void 0),void 0!==c&&(document.body.style.overflow=c,c=void 0)}))};e.disableBodyScroll=function(e,n){if(a){if(!e)return void console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");if(e&&!r.some((function(t){return t.targetElement===e}))){var m={targetElement:e,options:n||{}};r=[].concat(t(r),[m]),e.ontouchstart=function(e){1===e.targetTouches.length&&(i=e.targetTouches[0].clientY)},e.ontouchmove=function(t){var o,n,a,r;1===t.targetTouches.length&&(n=e,r=(o=t).targetTouches[0].clientY-i,!d(o.target)&&(n&&0===n.scrollTop&&0<r||(a=n)&&a.scrollHeight-a.scrollTop<=a.clientHeight&&r<0?u(o):o.stopPropagation()))},l||(document.addEventListener("touchmove",u,o?{passive:!1}:void 0),l=!0)}}else{h=n,setTimeout((function(){if(void 0===s){var e=!!h&&!0===h.reserveScrollBarGap,t=window.innerWidth-document.documentElement.clientWidth;e&&0<t&&(s=document.body.style.paddingRight,document.body.style.paddingRight=t+"px")}void 0===c&&(c=document.body.style.overflow,document.body.style.overflow="hidden")}));var p={targetElement:e,options:n||{}};r=[].concat(t(r),[p])}var h},e.clearAllBodyScrollLocks=function(){a?(r.forEach((function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null})),l&&(document.removeEventListener("touchmove",u,o?{passive:!1}:void 0),l=!1),r=[],i=-1):(m(),r=[])},e.enableBodyScroll=function(e){if(a){if(!e)return void console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");e.ontouchstart=null,e.ontouchmove=null,r=r.filter((function(t){return t.targetElement!==e})),l&&0===r.length&&(document.removeEventListener("touchmove",u,o?{passive:!1}:void 0),l=!1)}else 1===r.length&&r[0].targetElement===e?(m(),r=[]):r=r.filter((function(t){return t.targetElement!==e}))}},void 0===(a="function"==typeof o?o.apply(t,n):o)||(e.exports=a)},11362:e=>{e.exports={wrapper:"wrapper-GZajBGIm",input:"input-GZajBGIm",view:"view-GZajBGIm",danger:"danger-GZajBGIm"}},4052: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_"}},77897:e=>{e.exports={button:"button-Rc93kXa8",bordersVisible:"bordersVisible-Rc93kXa8",selected:"selected-Rc93kXa8"}},34625:e=>{e.exports={footer:"footer-dwINHZFL"}},13079:e=>{e.exports={wrap:"wrap-oc7l8ZQg",header:"header-oc7l8ZQg",item:"item-oc7l8ZQg"}},69849:e=>{e.exports={label:"label-lVJKBKVk"}},60883:e=>{e.exports={scrollable:"scrollable-sXALjK1u",spinnerWrap:"spinnerWrap-sXALjK1u",item:"item-sXALjK1u",heading:"heading-sXALjK1u",checkboxWrap:"checkboxWrap-sXALjK1u",checkbox:"checkbox-sXALjK1u",emptyState:"emptyState-sXALjK1u",image:"image-sXALjK1u",text:"text-sXALjK1u"}},29e3:e=>{e.exports={dialog:"dialog-IKuIIugL",tabletDialog:"tabletDialog-IKuIIugL",desktopDialog:"desktopDialog-IKuIIugL"}},36718:e=>{e.exports={"default-drawer-min-top-distance":"100px",wrap:"wrap-_HnK0UIN",positionBottom:"positionBottom-_HnK0UIN",backdrop:"backdrop-_HnK0UIN",drawer:"drawer-_HnK0UIN",positionLeft:"positionLeft-_HnK0UIN"}},70673:(e,t,o)=>{"use strict";o.d(t,{CheckboxInput:()=>s});var n=o(50959),a=o(97754),r=o(90186),l=o(5811),i=o(11362),c=o.n(i);function s(e){const t=a(c().wrapper,e.className);return n.createElement("span",{className:t,title:e.title,style:e.style},n.createElement("input",{id:e.id,tabIndex:e.tabIndex,className:a(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"],...(0,r.filterDataProps)(e)}),n.createElement(l.CheckboxView,{className:c().view,indeterminate:e.indeterminate,checked:e.checked,disabled:e.disabled,intent:e.intent,tabIndex:e.tabIndex}))}},5811:(e,t,o)=>{"use strict";o.d(t,{CheckboxView:()=>s});var n=o(50959),a=o(97754),r=o(9745),l=o(65890),i=o(4052),c=o.n(i);function s(e){const{indeterminate:t,checked:o,tabIndex:i,className:s,disabled:d,disableActiveStyles:u,intent:m,hideIcon:p,...h}=e,v=t||!o||p?"":l,f=a(c().box,c()[`intent-${m}`],!t&&c().check,!!t&&c().dot,-1===i&&c().noOutline,s,o&&c().checked,d&&c().disabled,u&&c().disableActiveStyles);return n.createElement("span",{className:f,...h},n.createElement(r.Icon,{icon:v,className:c().icon}))}},45601:(e,t,o)=>{"use strict";o.d(t,{Measure:()=>a});var n=o(67842);function a(e){const{children:t,onResize:o}=e;return t((0,n.useResizeObserver)(o||(()=>{}),[null===o]))}},39362:(e,t,o)=>{"use strict";o.d(t,{SymbolSearchDialogFooter:()=>i});var n=o(50959),a=o(97754),r=o.n(a),l=o(34625);function i(e){const{className:t,children:o}=e;return n.createElement("div",{className:r()(l.footer,t)},o)}},14283:(e,t,o)=>{"use strict";o.r(t),o.d(t,{getCompareDialogRenderer:()=>le})
|
||||
;var n=o(50959),a=o(11542),r=o(32563),l=o(56570),i=o(94664),c=o(97754),s=o.n(c),d=o(50151),u=o(9745),m=o(86656),p=o(77975),h=o(63932),v=o(24633),f=o(45345),g=o(45601),b=o(84524),S=o(96967);const y=n.createContext(null);var x=o(70412),w=o(78036);const I=n.createContext(null);var C=o(16396),E=o(41590),k=o(37558),D=o(77897);function M(e){const{theme:t=D,children:o,onClick:a,isSelected:r,areBordersVisible:l,isItemSelected:i,className:c,value:d,name:u}=e;return n.createElement("button",{type:"button",className:s()(c,t.button,r&&t.selected,l&&!r&&!i&&t.bordersVisible),name:u,value:d,onClick:a},o)}function N(e){const{value:t,onClick:o,...a}=e,r=(0,n.useCallback)((e=>o(t,e)),[t,o]);return n.createElement(M,{...a,value:String(t),onClick:r})}var _=o(46148);function B(e){const{compareModel:t,selectedCompareOptionIndex:r}=(0,w.useEnsuredContext)(y),l=t.comparableOnSameScale({isYield:e}),i=(0,n.useMemo)((()=>function(e){return[{label:e?a.t(null,void 0,o(38137)):a.t(null,void 0,o(56136)),compareOption:e?_.CompareOption.SameScale:_.CompareOption.SamePctScale},{label:a.t(null,void 0,o(60126)),compareOption:_.CompareOption.NewPriceScale},{label:a.t(null,void 0,o(63456)),compareOption:_.CompareOption.NewPane}]}(l)),[l]);return[(0,n.useMemo)((()=>i[r]?.compareOption??i[0].compareOption),[i,r]),i]}var L=o(13079);function O(e){const{fullSymbolName:t,isSelected:r,className:l,isYield:c}=e,{isMobile:d,searchRef:u,setMode:m}=(0,w.useEnsuredContext)(b.SymbolSearchItemsDialogContext),{compareModel:p,setHoveredItemId:h,clearInput:v,allowExtendTimeScale:f}=(0,w.useEnsuredContext)(y),{callback:g}=(0,w.useEnsuredContext)(I),[S,x]=B(c);return d?n.createElement(k.DrawerManager,null,n.createElement(E.Drawer,{position:"Bottom",onClose:D.bind(null,!1)},n.createElement("div",{className:L.header},a.t(null,void 0,o(60085))),x.map((({label:e,compareOption:t})=>n.createElement(C.PopupMenuItem,{key:t,className:L.item,onClick:M,onClickArg:t,label:e}))))):n.createElement("div",{className:s()(L.wrap,l),"data-name":"compare-buttons-group"},x.map((({label:e,compareOption:t})=>n.createElement(N,{key:t,onClick:M,value:t,isItemSelected:Boolean(r),isSelected:r&&S===t},e))));function D(e){d&&g&&g(),v&&e&&v(u,m)}function M(e,o){if(o.preventDefault(),p&&t&&void 0!==e){(0,i.getSymbolSearchCompleteOverrideFunction)()(t).then((t=>{p.applyStudy(t.symbol,e,f),h(""),D(!0)}))}}}function T(e){const{isSelected:t,fullSymbolName:o,onExpandClick:a,actions:l,id:c,isOffset:s,isYield:d}=e,{isMobile:u,toggleExpand:m,searchSpreads:p,searchRef:h,setMode:v,mode:f}=(0,w.useEnsuredContext)(b.SymbolSearchItemsDialogContext),{compareModel:g,hoveredItemId:C,setHoveredItemId:E,clearInput:k,allowExtendTimeScale:D}=(0,w.useEnsuredContext)(y),[M,N]=(0,n.useState)(!1),B=(0,n.useRef)(null),L=(0,x.useAccurateHover)(B),T=(0,n.useMemo)((()=>({callback:z})),[z]),A=!Boolean(a)&&!Boolean(l),R=c===C;return n.createElement(I.Provider,{value:T},n.createElement(S.SymbolSearchDialogContentItem,{hideMarkedListFlag:"compare"===f,...e,reference:B,onClick:function(t){
|
||||
if(Boolean(a)&&c&&!s)return t?.preventDefault(),void m(c);if(!M&&u)return void N(!0);if(p&&e.onClick)return void e.onClick(t);if((r.mobiletouch?R:!M)&&o){(0,i.getSymbolSearchCompleteOverrideFunction)()(o).then((e=>{const t=g.comparableOnSameScale({isYield:d})?_.CompareOption.SameScale:_.CompareOption.SamePctScale;g.applyStudy(e.symbol,t,D)})),E(""),k&&k(h,v)}r.mobiletouch&&!u&&!R&&c&&E(c)},hoverComponent:function(){if(!A)return!1;if(u)return M;if(r.mobiletouch)return R;return Boolean(L||t)}()?O:void 0}));function z(){N(!1)}}var A=o(15550),R=o(93986),z=o(39750),H=o(60883);function V(e){const{handleListWidth:t}=(0,d.ensureNotNull)((0,n.useContext)(b.SymbolSearchItemsDialogContext)),{compareModel:r,selectedCompareIndex:l,selectedItemRef:i}=(0,d.ensureNotNull)((0,n.useContext)(y)),c=(0,p.useWatchedValueReadonly)({watchedValue:r.isDataReady()}),x=(0,p.useWatchedValueReadonly)({watchedValue:r.studies()}),w=(0,p.useWatchedValueReadonly)({watchedValue:r.highlightedSymbol()}),I=(0,n.useMemo)((()=>x.filter((e=>e.checked))),[x]),C=(0,n.useMemo)((()=>x.filter((e=>!e.checked))),[x]);return(0,n.useEffect)((()=>(r.chartModel().dataSourceCollectionChanged().subscribe(r,r.handleSourcesChange),()=>r.chartModel().dataSourceCollectionChanged().unsubscribe(r,r.handleSourcesChange))),[r]),n.createElement(g.Measure,{onResize:function([e]){t(e.contentRect.width)}},(e=>n.createElement(m.TouchScrollContainer,{className:H.scrollable,ref:e},function(){if(!c)return n.createElement("div",{className:H.spinnerWrap},n.createElement(h.Spinner,null));if(!Boolean(I.length)&&!Boolean(C.length)){const e=f.watchedTheme.value()===v.StdTheme.Dark?R:A;return n.createElement("div",{className:H.emptyState},n.createElement(u.Icon,{className:H.image,icon:e}),n.createElement("div",{className:H.text},a.t(null,void 0,o(37094))))}return n.createElement(n.Fragment,null,Boolean(I.length)&&n.createElement(n.Fragment,null,n.createElement("div",{className:H.heading},a.t(null,void 0,o(46622))),I.map(((e,t)=>n.createElement(S.SymbolSearchDialogContentItem,{"data-role":"added-symbol-item",className:H.item,key:e.id,id:e.id,shortName:e.title,title:e.title,logoId:e.logoId,currencyLogoId:e.currencyLogoId,baseCurrencyLogoId:e.baseCurrencyLogoId,dangerousDescriptionHTML:e.description,exchangeName:e.exchangeName,marketType:e.marketType,country:e.country,providerId:e.providerId,onClick:E.bind(null,e),isHighlighted:e.id===w,isSelected:k(e),itemRef:k(e)?i:void 0,isYield:e.isYield,actions:n.createElement("div",{className:H.checkboxWrap},n.createElement(M,{className:H.checkbox,onClick:E.bind(null,e),isSelected:k(e)},n.createElement(u.Icon,{icon:z})))})))),Boolean(C.length)&&n.createElement(n.Fragment,null,n.createElement("div",{className:H.heading},a.t(null,void 0,o(8926))),C.map((e=>n.createElement(T,{"data-role":"recent-symbol-item",className:s()(H.item,e.id===w&&H.highlighted),key:e.id,id:e.id,shortName:e.title,logoId:e.logoId,currencyLogoId:e.currencyLogoId,baseCurrencyLogoId:e.baseCurrencyLogoId,title:e.title,dangerousDescriptionHTML:e.description,exchangeName:e.exchangeName,
|
||||
marketType:e.marketType,country:e.country,providerId:e.providerId,fullSymbolName:e.symbol,isSelected:k(e),itemRef:k(e)?i:void 0,isYield:e.isYield})))))}())));function E(e,t){t?.preventDefault(),r.removeStudy(e)}function k(e){return x.indexOf(e)===l}}var P=o(56840);class F extends n.PureComponent{constructor(e){super(e),this._selectedItemRef=n.createRef(),this._getContextValue=()=>{const{compareModel:e}=this.props,{selectedCompareOptionIndex:t,selectedCompareIndex:o,hoveredItemId:n,allowExtendTimeScale:a}=this.state;return{compareModel:e,selectedCompareOptionIndex:t,setSelectedCompareOptionIndex:this._setSelectedCompareOptionIndex,hoveredItemId:n,setHoveredItemId:this._setHoveredItemId,selectedCompareIndex:o,setSelectedCompareIndex:this._setSelectedCompareIndex,selectedItemRef:this._selectedItemRef,clearInput:this._clearInput,allowExtendTimeScale:a,toggleAllowExtendTimeScale:this._toggleAllowExtendTimeScale}},this._clearInput=(e,t)=>{e&&e.current&&(e.current.value="",t("compare"))},this._setSelectedCompareOptionIndex=e=>{this.setState({selectedCompareOptionIndex:e})},this._setHoveredItemId=e=>{this.setState({hoveredItemId:e})},this._setSelectedCompareIndex=(e,t)=>{this.setState({selectedCompareIndex:e},t)},this._toggleAllowExtendTimeScale=()=>{const e=!this.state.allowExtendTimeScale;P.setValue("showAddSymbolDialog.extendCheckboxState",e),this.setState({allowExtendTimeScale:e})},this.state={selectedCompareOptionIndex:0,selectedCompareIndex:-1,hoveredItemId:void 0,allowExtendTimeScale:Boolean(P.getBool("showAddSymbolDialog.extendCheckboxState"))}}render(){const{children:e}=this.props;return n.createElement(y.Provider,{value:this._getContextValue()},e)}}var K=o(68335),W=o(79418),j=o(19291),X=o(29e3);function Y(e){const{openedItems:t,searchRef:o,feedItems:a,selectedIndex:r,toggleExpand:l,onSearchComplete:i,mode:s,setMode:d,setSelectedIndex:u,isMobile:m,isTablet:h,onClose:v,upperCaseEnabled:f,symbolSearchState:g}=(0,w.useEnsuredContext)(b.SymbolSearchItemsDialogContext),{compareModel:S,hoveredItemId:x,setHoveredItemId:I,selectedCompareOptionIndex:C,setSelectedCompareOptionIndex:E,selectedCompareIndex:k,setSelectedCompareIndex:D,selectedItemRef:M,clearInput:N,allowExtendTimeScale:_}=(0,w.useEnsuredContext)(y),L=(0,p.useWatchedValueReadonly)({watchedValue:S.studies()}),O=a[r],T="compare"===s,A="exchange"===s,R=T?k:r,z=T?L:a,H=z[R],[V,P]=B(H?.isYield);return(0,n.useEffect)((()=>{x&&I(""),k&&D(-1)}),[s]),n.createElement(W.AdaptivePopupDialog,{...e,className:c(X.dialog,!m&&(h?X.tabletDialog:X.desktopDialog)),onKeyDown:function(e){if(e.target&&e.target!==o.current)return;const n=(0,K.hashFromEvent)(e);switch(n){case 13:{if(T)return void function(){if(-1===k)return;const e=L[k];e.checked?S.removeStudy(e):S.applyStudy(e.symbol,V,_);D(-1)}();const t=G();if(t)return e.preventDefault(),void l(t);e.preventDefault();const n=o?.current?.value.trim();return void(n&&N&&(i([{symbol:f?n.toUpperCase():n,resolved:!1,compareOption:V,allowExtendTimeScale:_}]),N(o,d)))}case 27:return e.preventDefault(),A?void d("symbolSearch"):void v()}
|
||||
if(!T&&"good"!==g)return;switch((0,j.mapKeyCodeToDirection)(n)){case"blockPrev":if(e.preventDefault(),0===R)return;if(-1===R)return void F(0);F(R-1);break;case"blockNext":if(e.preventDefault(),R===z.length-1)return;F(R+1);break;case"inlinePrev":{const o=G();if(o&&t.has(o))return e.preventDefault(),void l(o);if(!C||o)return;e.preventDefault(),E(C-1);break}case"inlineNext":{const o=G();if(o&&!t.has(o))return e.preventDefault(),void l(o);if(C===P.length-1||o)return;e.preventDefault(),E(C+1);break}}},dataName:"compare-dialog",draggable:!0});function F(e){T?D(e,Y):u(e)}function Y(){M.current?.scrollIntoView({block:"nearest"})}function G(){if(!O)return;const{id:e,isOffset:t,onExpandClick:o}=O;return!t&&Boolean(o)&&e?e:void 0}}var G=o(73280),U=o(29280),Z=o(87896);class Q extends U.DialogRenderer{constructor(e){super(),this._props=e}show(e){if(this.visible().value())return;const t=n.createElement(G.SymbolSearchItemsDialog,{...this._props,shouldReturnFocus:e?.shouldReturnFocus,initialMode:this._props.initialMode||"symbolSearch",onClose:()=>this.hide()});this._rootInstance=(0,Z.createReactRoot)(t,this._container),this._setVisibility(!0)}hide(){this._rootInstance?.unmount(),this._visibility.setValue(!1),this._props.onClose?.()}}var $=o(81319),q=o(69654),J=o(70613);function ee(e){const{searchRef:t,setMode:o}=(0,w.useEnsuredContext)(b.SymbolSearchItemsDialogContext),{currentMode:a}=(0,w.useEnsuredContext)(J.SymbolSearchDialogBodyContext);return(0,n.useEffect)((()=>{const e=t.current;if(e)return e.addEventListener("input",r),()=>{e&&e.removeEventListener("input",r)}}),[]),n.createElement(q.DialogSearch,{...e});function r(){t.current&&a&&("compare"!==a.current||""===t?.current?.value?.trim()?"symbolSearch"===a.current&&""===t?.current?.value?.trim()&&o("compare"):o("symbolSearch"))}}var te=o(70673),oe=o(39362),ne=o(69849);function ae(e){const{allowExtendTimeScale:t,toggleAllowExtendTimeScale:r}=(0,d.ensureNotNull)((0,n.useContext)(y));return n.createElement(oe.SymbolSearchDialogFooter,null,n.createElement("label",{"data-name":"allow-extend-time-scale-checkbox"},n.createElement(te.CheckboxInput,{checked:t,value:t?"on":"off",onChange:r}),n.createElement("span",{className:ne.label},a.t(null,void 0,o(1048)))))}const re=l.enabled("secondary_series_extend_time_scale");function le(e){return new Q({wrapper:(t=e,e=>n.createElement(F,{...e,compareModel:t})),dialog:Y,contentItem:T,initialScreen:V,searchInput:ee,footer:re?n.createElement(ae):void 0,initialMode:"compare",dialogTitle:a.t(null,void 0,o(93193)),autofocus:!r.mobiletouch,dialogWidth:"fixed",onSearchComplete:t=>{const{compareOption:o,allowExtendTimeScale:n}=t[0];if(void 0!==o){(0,i.getSymbolSearchCompleteOverrideFunction)()(t[0].symbol,t[0].result).then((t=>{e.applyStudy(t.symbol,o,n)}))}},symbolTypes:(0,$.getAvailableSymbolTypes)(),showSpreadActions:l.enabled("show_spread_operators")&&l.enabled("compare_symbol_search_spread_operators")});var t}},46148:(e,t,o)=>{"use strict";var n;o.d(t,{CompareOption:()=>n}),function(e){e[e.SamePctScale=0]="SamePctScale",
|
||||
e[e.NewPriceScale=1]="NewPriceScale",e[e.NewPane=2]="NewPane",e[e.SameScale=3]="SameScale"}(n||(n={}))},37558:(e,t,o)=>{"use strict";o.d(t,{DrawerContext:()=>l,DrawerManager:()=>r});var n=o(50959),a=o(99054);class r 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,a.setFixedBodyState)(!0),this._isBodyFixed=!0),t.stack.length&&!this.state.stack.length&&this._isBodyFixed&&((0,a.setFixedBodyState)(!1),this._isBodyFixed=!1)}componentWillUnmount(){this.state.stack.length&&this._isBodyFixed&&(0,a.setFixedBodyState)(!1)}render(){return n.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=n.createContext(null)},41590:(e,t,o)=>{"use strict";o.d(t,{Drawer:()=>p});var n=o(50959),a=o(50151),r=o(97754),l=o(92184),i=o(42842),c=o(37558),s=o(29197),d=o(86656),u=o(36718);var m;function p(e){const{position:t="Bottom",onClose:o,children:d,reference:m,className:p,theme:v=u}=e,f=(0,a.ensureNotNull)((0,n.useContext)(c.DrawerContext)),[g]=(0,n.useState)((()=>(0,l.randomHash)())),b=(0,n.useRef)(null),S=(0,n.useContext)(s.CloseDelegateContext);return(0,n.useLayoutEffect)((()=>((0,a.ensureNotNull)(b.current).focus({preventScroll:!0}),S.subscribe(f,o),f.addDrawer(g),()=>{f.removeDrawer(g),S.unsubscribe(f,o)})),[]),n.createElement(i.Portal,null,n.createElement("div",{ref:m,className:r(u.wrap,u[`position${t}`])},g===f.currentDrawer&&n.createElement("div",{className:u.backdrop,onClick:o}),n.createElement(h,{className:r(v.drawer,u[`position${t}`],p),ref:b,"data-name":e["data-name"]},d)))}!function(e){e.Left="Left",e.Bottom="Bottom"}(m||(m={}));const h=(0,n.forwardRef)(((e,t)=>{const{className:o,...a}=e;return n.createElement(d.TouchScrollContainer,{className:r(u.drawer,o),tabIndex:-1,ref:t,...a})}))},70412:(e,t,o)=>{"use strict";o.d(t,{hoverMouseEventFilter:()=>r,useAccurateHover:()=>l,useHover:()=>a});var n=o(50959);function a(){const[e,t]=(0,n.useState)(!1);return[e,{onMouseOver:function(e){r(e)&&t(!0)},onMouseOut:function(e){r(e)&&t(!1)}}]}function r(e){return!e.currentTarget.contains(e.relatedTarget)}function l(e){const[t,o]=(0,n.useState)(!1);return(0,n.useEffect)((()=>{const t=t=>{if(null===e.current)return;const n=e.current.contains(t.target);o(n)};return document.addEventListener("mouseover",t),()=>document.removeEventListener("mouseover",t)}),[]),t}},86656:(e,t,o)=>{"use strict";o.d(t,{TouchScrollContainer:()=>s});var n=o(50959),a=o(59142),r=o(50151),l=o(49483);const i=CSS.supports("overscroll-behavior","none");let c=0;const s=(0,n.forwardRef)(((e,t)=>{const{children:o,...r}=e,s=(0,n.useRef)(null);return(0,n.useImperativeHandle)(t,(()=>s.current)),(0,n.useLayoutEffect)((()=>{if(l.CheckMobile.iOS())return c++,
|
||||
null!==s.current&&(i?1===c&&(document.body.style.overscrollBehavior="none"):(0,a.disableBodyScroll)(s.current,{allowTouchMove:d(s)})),()=>{c--,null!==s.current&&(i?0===c&&(document.body.style.overscrollBehavior=""):(0,a.enableBodyScroll)(s.current))}}),[]),n.createElement("div",{ref:s,...r},o)}));function d(e){return t=>{const o=(0,r.ensureNotNull)(e.current),n=document.activeElement;return!o.contains(t)||null!==n&&o.contains(n)&&n.contains(t)}}},65890:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 9" width="11" height="9" fill="none"><path stroke="currentColor" stroke-width="2" d="M0.999878 4L3.99988 7L9.99988 1"/></svg>'},39750:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="none"><path stroke="currentColor" stroke-linecap="round" stroke-width="1.5" d="M7 15l5 5L23 9"/></svg>'},93986:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 121 120" width="121" height="120"><path fill="#D1D4DC" d="M53.88 18.36a43.4 43.4 0 0 1 11.24 0 1 1 0 0 0 .26-1.98 45.42 45.42 0 0 0-11.76 0 1 1 0 1 0 .26 1.98zM43.04 21.26a1 1 0 0 0-.77-1.85A44.95 44.95 0 0 0 32.1 25.3a1 1 0 0 0 1.22 1.58 42.95 42.95 0 0 1 9.72-5.62zM75.42 19.96a1 1 0 0 1 1.3-.55A44.95 44.95 0 0 1 86.9 25.3a1 1 0 0 1-1.22 1.58 42.95 42.95 0 0 0-9.72-5.62 1 1 0 0 1-.54-1.3zM25.38 34.82a1 1 0 1 0-1.58-1.22 44.95 44.95 0 0 0-5.89 10.17 1 1 0 0 0 1.85.77 42.95 42.95 0 0 1 5.62-9.72zM16.86 55.38a1 1 0 0 0-1.98-.26 45.42 45.42 0 0 0 0 11.76 1 1 0 1 0 1.98-.26 43.4 43.4 0 0 1 0-11.24zM103 54.26a1 1 0 0 1 1.12.86 45.4 45.4 0 0 1 0 11.76 1 1 0 0 1-1.98-.26 43.37 43.37 0 0 0 0-11.24 1 1 0 0 1 .86-1.12zM19.76 77.46a1 1 0 0 0-1.85.77A44.95 44.95 0 0 0 23.8 88.4a1 1 0 0 0 1.58-1.22 42.95 42.95 0 0 1-5.62-9.72zM100.54 76.92a1 1 0 0 1 .54 1.3A44.95 44.95 0 0 1 95.2 88.4a1 1 0 0 1-1.58-1.22 42.95 42.95 0 0 0 5.62-9.72 1 1 0 0 1 1.3-.54zM33.32 95.12a1 1 0 1 0-1.22 1.58 44.94 44.94 0 0 0 10.17 5.88 1 1 0 0 0 .77-1.84 42.97 42.97 0 0 1-9.72-5.62zM87.08 95.3a1 1 0 0 1-.18 1.4 44.94 44.94 0 0 1-10.17 5.88 1 1 0 0 1-.77-1.84 42.98 42.98 0 0 0 9.72-5.62 1 1 0 0 1 1.4.18zM53.88 103.64a1 1 0 0 0-.26 1.98 45.4 45.4 0 0 0 11.76 0 1 1 0 0 0-.26-1.98 43.37 43.37 0 0 1-11.24 0zM62.81 53.17a1 1 0 0 0-.78 1.84 6.62 6.62 0 0 1 3.49 3.5 1 1 0 1 0 1.84-.78 8.62 8.62 0 0 0-4.55-4.56z"/><path fill="#D1D4DC" d="M45.5 61a14 14 0 1 1 24.28 9.5l7.92 7.92a1 1 0 0 1-1.42 1.42l-7.96-7.97A14 14 0 0 1 45.5 61zm14-12a12 12 0 1 0 0 24 12 12 0 0 0 0-24z"/><circle fill="#1976D2" cx="97.5" cy="39" r="13"/><path fill="#D1D4DC" d="M98.5 34a1 1 0 1 0-2 0v4h-4a1 1 0 1 0 0 2h4v4a1 1 0 1 0 2 0v-4h4a1 1 0 0 0 0-2h-4v-4z"/></svg>'},15550:e=>{
|
||||
(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[731],{59142:function(e,t){var o,n,a;n=[t],o=function(e){"use strict";function t(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t<e.length;t++)o[t]=e[t];return o}return Array.from(e)}Object.defineProperty(e,"__esModule",{value:!0});var o=!1;if("undefined"!=typeof window){var n={get passive(){o=!0}};window.addEventListener("testPassive",null,n),window.removeEventListener("testPassive",null,n)}var a="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&/iP(ad|hone|od)/.test(window.navigator.platform),r=[],l=!1,i=-1,s=void 0,c=void 0,d=function(e){return r.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},u=function(e){var t=e||window.event;return!!d(t.target)||1<t.touches.length||(t.preventDefault&&t.preventDefault(),!1)},m=function(){setTimeout((function(){void 0!==c&&(document.body.style.paddingRight=c,c=void 0),void 0!==s&&(document.body.style.overflow=s,s=void 0)}))};e.disableBodyScroll=function(e,n){if(a){if(!e)return void console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");if(e&&!r.some((function(t){return t.targetElement===e}))){var m={targetElement:e,options:n||{}};r=[].concat(t(r),[m]),e.ontouchstart=function(e){1===e.targetTouches.length&&(i=e.targetTouches[0].clientY)},e.ontouchmove=function(t){var o,n,a,r;1===t.targetTouches.length&&(n=e,r=(o=t).targetTouches[0].clientY-i,!d(o.target)&&(n&&0===n.scrollTop&&0<r||(a=n)&&a.scrollHeight-a.scrollTop<=a.clientHeight&&r<0?u(o):o.stopPropagation()))},l||(document.addEventListener("touchmove",u,o?{passive:!1}:void 0),l=!0)}}else{h=n,setTimeout((function(){if(void 0===c){var e=!!h&&!0===h.reserveScrollBarGap,t=window.innerWidth-document.documentElement.clientWidth;e&&0<t&&(c=document.body.style.paddingRight,document.body.style.paddingRight=t+"px")}void 0===s&&(s=document.body.style.overflow,document.body.style.overflow="hidden")}));var p={targetElement:e,options:n||{}};r=[].concat(t(r),[p])}var h},e.clearAllBodyScrollLocks=function(){a?(r.forEach((function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null})),l&&(document.removeEventListener("touchmove",u,o?{passive:!1}:void 0),l=!1),r=[],i=-1):(m(),r=[])},e.enableBodyScroll=function(e){if(a){if(!e)return void console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");e.ontouchstart=null,e.ontouchmove=null,r=r.filter((function(t){return t.targetElement!==e})),l&&0===r.length&&(document.removeEventListener("touchmove",u,o?{passive:!1}:void 0),l=!1)}else 1===r.length&&r[0].targetElement===e?(m(),r=[]):r=r.filter((function(t){return t.targetElement!==e}))}},void 0===(a="function"==typeof o?o.apply(t,n):o)||(e.exports=a)},11362:e=>{e.exports={wrapper:"wrapper-GZajBGIm",input:"input-GZajBGIm",view:"view-GZajBGIm",danger:"danger-GZajBGIm"}},4052: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_"}},77897:e=>{e.exports={button:"button-Rc93kXa8",bordersVisible:"bordersVisible-Rc93kXa8",selected:"selected-Rc93kXa8"}},34625:e=>{e.exports={footer:"footer-dwINHZFL"}},13079:e=>{e.exports={wrap:"wrap-oc7l8ZQg",header:"header-oc7l8ZQg",item:"item-oc7l8ZQg"}},69849:e=>{e.exports={label:"label-lVJKBKVk"}},60883:e=>{e.exports={scrollable:"scrollable-sXALjK1u",spinnerWrap:"spinnerWrap-sXALjK1u",item:"item-sXALjK1u",heading:"heading-sXALjK1u",checkboxWrap:"checkboxWrap-sXALjK1u",checkbox:"checkbox-sXALjK1u",emptyState:"emptyState-sXALjK1u",image:"image-sXALjK1u",text:"text-sXALjK1u"}},29e3:e=>{e.exports={dialog:"dialog-IKuIIugL",tabletDialog:"tabletDialog-IKuIIugL",desktopDialog:"desktopDialog-IKuIIugL"}},36718:e=>{e.exports={"default-drawer-min-top-distance":"100px",wrap:"wrap-_HnK0UIN",positionBottom:"positionBottom-_HnK0UIN",backdrop:"backdrop-_HnK0UIN",drawer:"drawer-_HnK0UIN",positionLeft:"positionLeft-_HnK0UIN"}},70673:(e,t,o)=>{"use strict";o.d(t,{CheckboxInput:()=>c});var n=o(50959),a=o(97754),r=o(90186),l=o(5811),i=o(11362),s=o.n(i);function c(e){const t=a(s().wrapper,e.className);return n.createElement("span",{className:t,title:e.title,style:e.style},n.createElement("input",{id:e.id,tabIndex:e.tabIndex,className:a(e.intent&&s()[e.intent],s().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"],...(0,r.filterDataProps)(e)}),n.createElement(l.CheckboxView,{className:s().view,indeterminate:e.indeterminate,checked:e.checked,disabled:e.disabled,intent:e.intent,tabIndex:e.tabIndex}))}},5811:(e,t,o)=>{"use strict";o.d(t,{CheckboxView:()=>c});var n=o(50959),a=o(97754),r=o(9745),l=o(65890),i=o(4052),s=o.n(i);function c(e){const{indeterminate:t,checked:o,tabIndex:i,className:c,disabled:d,disableActiveStyles:u,intent:m,hideIcon:p,...h}=e,v=t||!o||p?"":l,f=a(s().box,s()[`intent-${m}`],!t&&s().check,!!t&&s().dot,-1===i&&s().noOutline,c,o&&s().checked,d&&s().disabled,u&&s().disableActiveStyles);return n.createElement("span",{className:f,...h},n.createElement(r.Icon,{icon:v,className:s().icon}))}},45601:(e,t,o)=>{"use strict";o.d(t,{Measure:()=>a});var n=o(67842);function a(e){const{children:t,onResize:o}=e;return t((0,n.useResizeObserver)(o||(()=>{}),[null===o]))}},39362:(e,t,o)=>{"use strict";o.d(t,{SymbolSearchDialogFooter:()=>i});var n=o(50959),a=o(97754),r=o.n(a),l=o(34625);function i(e){const{className:t,children:o}=e;return n.createElement("div",{className:r()(l.footer,t)},o)}},14283:(e,t,o)=>{"use strict";o.r(t),o.d(t,{getCompareDialogRenderer:()=>le})
|
||||
;var n=o(50959),a=o(11542),r=o(32563),l=o(56570),i=o(94664),s=o(97754),c=o.n(s),d=o(50151),u=o(9745),m=o(86656),p=o(77975),h=o(63932),v=o(24633),f=o(45345),g=o(45601),b=o(84524),S=o(96967);const y=n.createContext(null);var x=o(70412),w=o(78036);const I=n.createContext(null);var C=o(16396),E=o(41590),k=o(37558),D=o(77897);function M(e){const{theme:t=D,children:o,onClick:a,isSelected:r,areBordersVisible:l,isItemSelected:i,className:s,value:d,name:u}=e;return n.createElement("button",{type:"button",className:c()(s,t.button,r&&t.selected,l&&!r&&!i&&t.bordersVisible),name:u,value:d,onClick:a},o)}function N(e){const{value:t,onClick:o,...a}=e,r=(0,n.useCallback)((e=>o(t,e)),[t,o]);return n.createElement(M,{...a,value:String(t),onClick:r})}var _=o(46148);function B(e){const{compareModel:t,selectedCompareOptionIndex:r}=(0,w.useEnsuredContext)(y),l=t.comparableOnSameScale({isYield:e}),i=(0,n.useMemo)((()=>function(e){return[{label:e?a.t(null,void 0,o(38137)):a.t(null,void 0,o(56136)),compareOption:e?_.CompareOption.SameScale:_.CompareOption.SamePctScale},{label:a.t(null,void 0,o(60126)),compareOption:_.CompareOption.NewPriceScale},{label:a.t(null,void 0,o(63456)),compareOption:_.CompareOption.NewPane}]}(l)),[l]);return[(0,n.useMemo)((()=>i[r]?.compareOption??i[0].compareOption),[i,r]),i]}var L=o(13079);function O(e){const{fullSymbolName:t,isSelected:r,className:l,isYield:s}=e,{isMobile:d,searchRef:u,setMode:m}=(0,w.useEnsuredContext)(b.SymbolSearchItemsDialogContext),{compareModel:p,setHoveredItemId:h,clearInput:v,allowExtendTimeScale:f}=(0,w.useEnsuredContext)(y),{callback:g}=(0,w.useEnsuredContext)(I),[S,x]=B(s);return d?n.createElement(k.DrawerManager,null,n.createElement(E.Drawer,{position:"Bottom",onClose:D.bind(null,!1)},n.createElement("div",{className:L.header},a.t(null,void 0,o(60085))),x.map((({label:e,compareOption:t})=>n.createElement(C.PopupMenuItem,{key:t,className:L.item,onClick:M,onClickArg:t,label:e}))))):n.createElement("div",{className:c()(L.wrap,l),"data-name":"compare-buttons-group"},x.map((({label:e,compareOption:t})=>n.createElement(N,{key:t,onClick:M,value:t,isItemSelected:Boolean(r),isSelected:r&&S===t},e))));function D(e){d&&g&&g(),v&&e&&v(u,m)}function M(e,o){if(o.preventDefault(),p&&t&&void 0!==e){(0,i.getSymbolSearchCompleteOverrideFunction)()(t).then((t=>{p.applyStudy(t.symbol,e,f),h(""),D(!0)}))}}}function T(e){const{isSelected:t,fullSymbolName:o,onExpandClick:a,actions:l,id:s,isOffset:c,isYield:d}=e,{isMobile:u,toggleExpand:m,searchSpreads:p,searchRef:h,setMode:v,mode:f}=(0,w.useEnsuredContext)(b.SymbolSearchItemsDialogContext),{compareModel:g,hoveredItemId:C,setHoveredItemId:E,clearInput:k,allowExtendTimeScale:D}=(0,w.useEnsuredContext)(y),[M,N]=(0,n.useState)(!1),B=(0,n.useRef)(null),L=(0,x.useAccurateHover)(B),T=(0,n.useMemo)((()=>({callback:z})),[z]),A=!Boolean(a)&&!Boolean(l),R=s===C;return n.createElement(I.Provider,{value:T},n.createElement(S.SymbolSearchDialogContentItem,{hideMarkedListFlag:"compare"===f,...e,reference:B,onClick:function(t){
|
||||
if(Boolean(a)&&s&&!c)return t?.preventDefault(),void m(s);if(!M&&u)return void N(!0);if(p&&e.onClick)return void e.onClick(t);if((r.mobiletouch?R:!M)&&o){(0,i.getSymbolSearchCompleteOverrideFunction)()(o).then((e=>{const t=g.comparableOnSameScale({isYield:d})?_.CompareOption.SameScale:_.CompareOption.SamePctScale;g.applyStudy(e.symbol,t,D)})),E(""),k&&k(h,v)}r.mobiletouch&&!u&&!R&&s&&E(s)},hoverComponent:function(){if(!A)return!1;if(u)return M;if(r.mobiletouch)return R;return Boolean(L||t)}()?O:void 0}));function z(){N(!1)}}var A=o(15550),R=o(93986),z=o(39750),H=o(60883);function V(e){const{handleListWidth:t}=(0,d.ensureNotNull)((0,n.useContext)(b.SymbolSearchItemsDialogContext)),{compareModel:r,selectedCompareIndex:l,selectedItemRef:i}=(0,d.ensureNotNull)((0,n.useContext)(y)),s=(0,p.useWatchedValueReadonly)({watchedValue:r.isDataReady()}),x=(0,p.useWatchedValueReadonly)({watchedValue:r.studies()}),w=(0,p.useWatchedValueReadonly)({watchedValue:r.highlightedSymbol()}),I=(0,n.useMemo)((()=>x.filter((e=>e.checked))),[x]),C=(0,n.useMemo)((()=>x.filter((e=>!e.checked))),[x]);return(0,n.useEffect)((()=>(r.chartModel().dataSourceCollectionChanged().subscribe(r,r.handleSourcesChange),()=>r.chartModel().dataSourceCollectionChanged().unsubscribe(r,r.handleSourcesChange))),[r]),n.createElement(g.Measure,{onResize:function([e]){t(e.contentRect.width)}},(e=>n.createElement(m.TouchScrollContainer,{className:H.scrollable,ref:e},function(){if(!s)return n.createElement("div",{className:H.spinnerWrap},n.createElement(h.Spinner,null));if(!Boolean(I.length)&&!Boolean(C.length)){const e=f.watchedTheme.value()===v.StdTheme.Dark?R:A;return n.createElement("div",{className:H.emptyState},n.createElement(u.Icon,{className:H.image,icon:e}),n.createElement("div",{className:H.text},a.t(null,void 0,o(37094))))}return n.createElement(n.Fragment,null,Boolean(I.length)&&n.createElement(n.Fragment,null,n.createElement("div",{className:H.heading},a.t(null,void 0,o(46622))),I.map(((e,t)=>n.createElement(S.SymbolSearchDialogContentItem,{"data-role":"added-symbol-item",className:H.item,key:e.id,id:e.id,shortName:e.title,title:e.title,logoId:e.logoId,currencyLogoId:e.currencyLogoId,baseCurrencyLogoId:e.baseCurrencyLogoId,dangerousDescriptionHTML:e.description,exchangeName:e.exchangeName,marketType:e.marketType,country:e.country,providerId:e.providerId,onClick:E.bind(null,e),isHighlighted:e.id===w,isSelected:k(e),itemRef:k(e)?i:void 0,isYield:e.isYield,actions:n.createElement("div",{className:H.checkboxWrap},n.createElement(M,{className:H.checkbox,onClick:E.bind(null,e),isSelected:k(e)},n.createElement(u.Icon,{icon:z})))})))),Boolean(C.length)&&n.createElement(n.Fragment,null,n.createElement("div",{className:H.heading},a.t(null,void 0,o(8926))),C.map((e=>n.createElement(T,{"data-role":"recent-symbol-item",className:c()(H.item,e.id===w&&H.highlighted),key:e.id,id:e.id,shortName:e.title,logoId:e.logoId,currencyLogoId:e.currencyLogoId,baseCurrencyLogoId:e.baseCurrencyLogoId,title:e.title,dangerousDescriptionHTML:e.description,exchangeName:e.exchangeName,
|
||||
marketType:e.marketType,country:e.country,providerId:e.providerId,fullSymbolName:e.symbol,isSelected:k(e),itemRef:k(e)?i:void 0,isYield:e.isYield})))))}())));function E(e,t){t?.preventDefault(),r.removeStudy(e)}function k(e){return x.indexOf(e)===l}}var P=o(56840);class F extends n.PureComponent{constructor(e){super(e),this._selectedItemRef=n.createRef(),this._getContextValue=()=>{const{compareModel:e}=this.props,{selectedCompareOptionIndex:t,selectedCompareIndex:o,hoveredItemId:n,allowExtendTimeScale:a}=this.state;return{compareModel:e,selectedCompareOptionIndex:t,setSelectedCompareOptionIndex:this._setSelectedCompareOptionIndex,hoveredItemId:n,setHoveredItemId:this._setHoveredItemId,selectedCompareIndex:o,setSelectedCompareIndex:this._setSelectedCompareIndex,selectedItemRef:this._selectedItemRef,clearInput:this._clearInput,allowExtendTimeScale:a,toggleAllowExtendTimeScale:this._toggleAllowExtendTimeScale}},this._clearInput=(e,t)=>{e&&e.current&&(e.current.value="",t("compare"))},this._setSelectedCompareOptionIndex=e=>{this.setState({selectedCompareOptionIndex:e})},this._setHoveredItemId=e=>{this.setState({hoveredItemId:e})},this._setSelectedCompareIndex=(e,t)=>{this.setState({selectedCompareIndex:e},t)},this._toggleAllowExtendTimeScale=()=>{const e=!this.state.allowExtendTimeScale;P.setValue("showAddSymbolDialog.extendCheckboxState",e),this.setState({allowExtendTimeScale:e})},this.state={selectedCompareOptionIndex:0,selectedCompareIndex:-1,hoveredItemId:void 0,allowExtendTimeScale:Boolean(P.getBool("showAddSymbolDialog.extendCheckboxState"))}}render(){const{children:e}=this.props;return n.createElement(y.Provider,{value:this._getContextValue()},e)}}var K=o(68335),W=o(79418),j=o(19291),X=o(29e3);function Y(e){const{openedItems:t,searchRef:o,feedItems:a,selectedIndex:r,toggleExpand:i,onSearchComplete:c,mode:d,setMode:u,setSelectedIndex:m,isMobile:h,isTablet:v,onClose:f,upperCaseEnabled:g,symbolSearchState:S}=(0,w.useEnsuredContext)(b.SymbolSearchItemsDialogContext),{compareModel:x,hoveredItemId:I,setHoveredItemId:C,selectedCompareOptionIndex:E,setSelectedCompareOptionIndex:k,selectedCompareIndex:D,setSelectedCompareIndex:M,selectedItemRef:N,clearInput:_,allowExtendTimeScale:L}=(0,w.useEnsuredContext)(y),O=(0,p.useWatchedValueReadonly)({watchedValue:x.studies()}),T=a[r],A="compare"===d,R="exchange"===d,z=A?D:r,H=A?O:a,V=H[z],[P,F]=B(V?.isYield);return(0,n.useEffect)((()=>{I&&C(""),D&&M(-1)}),[d]),n.createElement(W.AdaptivePopupDialog,{...e,className:s(X.dialog,!h&&(v?X.tabletDialog:X.desktopDialog)),onKeyDown:function(e){if(e.target&&e.target!==o.current)return;const n=(0,K.hashFromEvent)(e);switch(n){case 13:{if(A)return void function(){if(-1===D)return;const e=O[D];e.checked?x.removeStudy(e):x.applyStudy(e.symbol,P,L);M(-1)}();const t=U();if(t)return e.preventDefault(),void i(t);e.preventDefault();const n=function(){0;const e=e=>"string"==typeof e?.fullSymbolName?e.fullSymbolName:e?.symbol,t=-1!==r;if(t)return e(V);const n=l.enabled("allow_arbitrary_symbol_search_input"),a="empty"!==S
|
||||
;if(n)return a&&H.length?e(H[0]):o?.current?.value.trim();if(!a&&!t&&!n)return;if(H.length)return e(H[0])}();return void(n&&(c([{symbol:g?n.toString().toUpperCase():n.toString(),resolved:!1,compareOption:P,allowExtendTimeScale:L}]),_&&_(o,u)))}case 27:return e.preventDefault(),R?void u("symbolSearch"):void f()}if(!A&&"good"!==S)return;switch((0,j.mapKeyCodeToDirection)(n)){case"blockPrev":if(e.preventDefault(),0===z)return;if(-1===z)return void Y(0);Y(z-1);break;case"blockNext":if(e.preventDefault(),z===H.length-1)return;Y(z+1);break;case"inlinePrev":{const o=U();if(o&&t.has(o))return e.preventDefault(),void i(o);if(!E||o)return;e.preventDefault(),k(E-1);break}case"inlineNext":{const o=U();if(o&&!t.has(o))return e.preventDefault(),void i(o);if(E===F.length-1||o)return;e.preventDefault(),k(E+1);break}}},dataName:"compare-dialog",draggable:!0});function Y(e){A?M(e,G):m(e)}function G(){N.current?.scrollIntoView({block:"nearest"})}function U(){if(!T)return;const{id:e,isOffset:t,onExpandClick:o}=T;return!t&&Boolean(o)&&e?e:void 0}}var G=o(73280),U=o(29280),Z=o(87896);class Q extends U.DialogRenderer{constructor(e){super(),this._props=e}show(e){if(this.visible().value())return;const t=n.createElement(G.SymbolSearchItemsDialog,{...this._props,shouldReturnFocus:e?.shouldReturnFocus,initialMode:this._props.initialMode||"symbolSearch",onClose:()=>this.hide()});this._rootInstance=(0,Z.createReactRoot)(t,this._container),this._setVisibility(!0)}hide(){this._rootInstance?.unmount(),this._visibility.setValue(!1),this._props.onClose?.()}}var $=o(81319),q=o(69654),J=o(70613);function ee(e){const{searchRef:t,setMode:o}=(0,w.useEnsuredContext)(b.SymbolSearchItemsDialogContext),{currentMode:a}=(0,w.useEnsuredContext)(J.SymbolSearchDialogBodyContext);return(0,n.useEffect)((()=>{const e=t.current;if(e)return e.addEventListener("input",r),()=>{e&&e.removeEventListener("input",r)}}),[]),n.createElement(q.DialogSearch,{...e});function r(){t.current&&a&&("compare"!==a.current||""===t?.current?.value?.trim()?"symbolSearch"===a.current&&""===t?.current?.value?.trim()&&o("compare"):o("symbolSearch"))}}var te=o(70673),oe=o(39362),ne=o(69849);function ae(e){const{allowExtendTimeScale:t,toggleAllowExtendTimeScale:r}=(0,d.ensureNotNull)((0,n.useContext)(y));return n.createElement(oe.SymbolSearchDialogFooter,null,n.createElement("label",{"data-name":"allow-extend-time-scale-checkbox"},n.createElement(te.CheckboxInput,{checked:t,value:t?"on":"off",onChange:r}),n.createElement("span",{className:ne.label},a.t(null,void 0,o(1048)))))}const re=l.enabled("secondary_series_extend_time_scale");function le(e){return new Q({wrapper:(t=e,e=>n.createElement(F,{...e,compareModel:t})),dialog:Y,contentItem:T,initialScreen:V,searchInput:ee,footer:re?n.createElement(ae):void 0,initialMode:"compare",dialogTitle:a.t(null,void 0,o(93193)),autofocus:!r.mobiletouch,dialogWidth:"fixed",onSearchComplete:t=>{const{compareOption:o,allowExtendTimeScale:n}=t[0];if(void 0!==o){(0,i.getSymbolSearchCompleteOverrideFunction)()(t[0].symbol,t[0].result).then((t=>{
|
||||
e.applyStudy(t.symbol,o,n)}))}},symbolTypes:(0,$.getAvailableSymbolTypes)(),showSpreadActions:l.enabled("show_spread_operators")&&l.enabled("compare_symbol_search_spread_operators")});var t}},46148:(e,t,o)=>{"use strict";var n;o.d(t,{CompareOption:()=>n}),function(e){e[e.SamePctScale=0]="SamePctScale",e[e.NewPriceScale=1]="NewPriceScale",e[e.NewPane=2]="NewPane",e[e.SameScale=3]="SameScale"}(n||(n={}))},37558:(e,t,o)=>{"use strict";o.d(t,{DrawerContext:()=>l,DrawerManager:()=>r});var n=o(50959),a=o(99054);class r 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,a.setFixedBodyState)(!0),this._isBodyFixed=!0),t.stack.length&&!this.state.stack.length&&this._isBodyFixed&&((0,a.setFixedBodyState)(!1),this._isBodyFixed=!1)}componentWillUnmount(){this.state.stack.length&&this._isBodyFixed&&(0,a.setFixedBodyState)(!1)}render(){return n.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=n.createContext(null)},41590:(e,t,o)=>{"use strict";o.d(t,{Drawer:()=>p});var n=o(50959),a=o(50151),r=o(97754),l=o(92184),i=o(42842),s=o(37558),c=o(29197),d=o(86656),u=o(36718);var m;function p(e){const{position:t="Bottom",onClose:o,children:d,reference:m,className:p,theme:v=u}=e,f=(0,a.ensureNotNull)((0,n.useContext)(s.DrawerContext)),[g]=(0,n.useState)((()=>(0,l.randomHash)())),b=(0,n.useRef)(null),S=(0,n.useContext)(c.CloseDelegateContext);return(0,n.useLayoutEffect)((()=>((0,a.ensureNotNull)(b.current).focus({preventScroll:!0}),S.subscribe(f,o),f.addDrawer(g),()=>{f.removeDrawer(g),S.unsubscribe(f,o)})),[]),n.createElement(i.Portal,null,n.createElement("div",{ref:m,className:r(u.wrap,u[`position${t}`])},g===f.currentDrawer&&n.createElement("div",{className:u.backdrop,onClick:o}),n.createElement(h,{className:r(v.drawer,u[`position${t}`],p),ref:b,"data-name":e["data-name"]},d)))}!function(e){e.Left="Left",e.Bottom="Bottom"}(m||(m={}));const h=(0,n.forwardRef)(((e,t)=>{const{className:o,...a}=e;return n.createElement(d.TouchScrollContainer,{className:r(u.drawer,o),tabIndex:-1,ref:t,...a})}))},70412:(e,t,o)=>{"use strict";o.d(t,{hoverMouseEventFilter:()=>r,useAccurateHover:()=>l,useHover:()=>a});var n=o(50959);function a(){const[e,t]=(0,n.useState)(!1);return[e,{onMouseOver:function(e){r(e)&&t(!0)},onMouseOut:function(e){r(e)&&t(!1)}}]}function r(e){return!e.currentTarget.contains(e.relatedTarget)}function l(e){const[t,o]=(0,n.useState)(!1);return(0,n.useEffect)((()=>{const t=t=>{if(null===e.current)return;const n=e.current.contains(t.target);o(n)};return document.addEventListener("mouseover",t),()=>document.removeEventListener("mouseover",t)}),[]),t}},86656:(e,t,o)=>{"use strict";o.d(t,{TouchScrollContainer:()=>c})
|
||||
;var n=o(50959),a=o(59142),r=o(50151),l=o(49483);const i=CSS.supports("overscroll-behavior","none");let s=0;const c=(0,n.forwardRef)(((e,t)=>{const{children:o,...r}=e,c=(0,n.useRef)(null);return(0,n.useImperativeHandle)(t,(()=>c.current)),(0,n.useLayoutEffect)((()=>{if(l.CheckMobile.iOS())return s++,null!==c.current&&(i?1===s&&(document.body.style.overscrollBehavior="none"):(0,a.disableBodyScroll)(c.current,{allowTouchMove:d(c)})),()=>{s--,null!==c.current&&(i?0===s&&(document.body.style.overscrollBehavior=""):(0,a.enableBodyScroll)(c.current))}}),[]),n.createElement("div",{ref:c,...r},o)}));function d(e){return t=>{const o=(0,r.ensureNotNull)(e.current),n=document.activeElement;return!o.contains(t)||null!==n&&o.contains(n)&&n.contains(t)}}},65890:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 9" width="11" height="9" fill="none"><path stroke="currentColor" stroke-width="2" d="M0.999878 4L3.99988 7L9.99988 1"/></svg>'},39750:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="none"><path stroke="currentColor" stroke-linecap="round" stroke-width="1.5" d="M7 15l5 5L23 9"/></svg>'},93986:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 121 120" width="121" height="120"><path fill="#D1D4DC" d="M53.88 18.36a43.4 43.4 0 0 1 11.24 0 1 1 0 0 0 .26-1.98 45.42 45.42 0 0 0-11.76 0 1 1 0 1 0 .26 1.98zM43.04 21.26a1 1 0 0 0-.77-1.85A44.95 44.95 0 0 0 32.1 25.3a1 1 0 0 0 1.22 1.58 42.95 42.95 0 0 1 9.72-5.62zM75.42 19.96a1 1 0 0 1 1.3-.55A44.95 44.95 0 0 1 86.9 25.3a1 1 0 0 1-1.22 1.58 42.95 42.95 0 0 0-9.72-5.62 1 1 0 0 1-.54-1.3zM25.38 34.82a1 1 0 1 0-1.58-1.22 44.95 44.95 0 0 0-5.89 10.17 1 1 0 0 0 1.85.77 42.95 42.95 0 0 1 5.62-9.72zM16.86 55.38a1 1 0 0 0-1.98-.26 45.42 45.42 0 0 0 0 11.76 1 1 0 1 0 1.98-.26 43.4 43.4 0 0 1 0-11.24zM103 54.26a1 1 0 0 1 1.12.86 45.4 45.4 0 0 1 0 11.76 1 1 0 0 1-1.98-.26 43.37 43.37 0 0 0 0-11.24 1 1 0 0 1 .86-1.12zM19.76 77.46a1 1 0 0 0-1.85.77A44.95 44.95 0 0 0 23.8 88.4a1 1 0 0 0 1.58-1.22 42.95 42.95 0 0 1-5.62-9.72zM100.54 76.92a1 1 0 0 1 .54 1.3A44.95 44.95 0 0 1 95.2 88.4a1 1 0 0 1-1.58-1.22 42.95 42.95 0 0 0 5.62-9.72 1 1 0 0 1 1.3-.54zM33.32 95.12a1 1 0 1 0-1.22 1.58 44.94 44.94 0 0 0 10.17 5.88 1 1 0 0 0 .77-1.84 42.97 42.97 0 0 1-9.72-5.62zM87.08 95.3a1 1 0 0 1-.18 1.4 44.94 44.94 0 0 1-10.17 5.88 1 1 0 0 1-.77-1.84 42.98 42.98 0 0 0 9.72-5.62 1 1 0 0 1 1.4.18zM53.88 103.64a1 1 0 0 0-.26 1.98 45.4 45.4 0 0 0 11.76 0 1 1 0 0 0-.26-1.98 43.37 43.37 0 0 1-11.24 0zM62.81 53.17a1 1 0 0 0-.78 1.84 6.62 6.62 0 0 1 3.49 3.5 1 1 0 1 0 1.84-.78 8.62 8.62 0 0 0-4.55-4.56z"/><path fill="#D1D4DC" d="M45.5 61a14 14 0 1 1 24.28 9.5l7.92 7.92a1 1 0 0 1-1.42 1.42l-7.96-7.97A14 14 0 0 1 45.5 61zm14-12a12 12 0 1 0 0 24 12 12 0 0 0 0-24z"/><circle fill="#1976D2" cx="97.5" cy="39" r="13"/><path fill="#D1D4DC" d="M98.5 34a1 1 0 1 0-2 0v4h-4a1 1 0 1 0 0 2h4v4a1 1 0 1 0 2 0v-4h4a1 1 0 0 0 0-2h-4v-4z"/></svg>'},15550:e=>{
|
||||
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 121 120" width="121" height="120"><path fill="#1E222D" d="M53.88 18.36a43.4 43.4 0 0 1 11.24 0 1 1 0 0 0 .26-1.98 45.42 45.42 0 0 0-11.76 0 1 1 0 1 0 .26 1.98zM43.04 21.26a1 1 0 0 0-.77-1.85A44.95 44.95 0 0 0 32.1 25.3a1 1 0 0 0 1.22 1.58 42.95 42.95 0 0 1 9.72-5.62zM75.42 19.96a1 1 0 0 1 1.3-.55A44.95 44.95 0 0 1 86.9 25.3a1 1 0 0 1-1.22 1.58 42.95 42.95 0 0 0-9.72-5.62 1 1 0 0 1-.54-1.3zM25.38 34.82a1 1 0 1 0-1.58-1.22 44.95 44.95 0 0 0-5.89 10.17 1 1 0 0 0 1.85.77 42.95 42.95 0 0 1 5.62-9.72zM16.86 55.38a1 1 0 0 0-1.98-.26 45.42 45.42 0 0 0 0 11.76 1 1 0 1 0 1.98-.26 43.4 43.4 0 0 1 0-11.24zM103 54.26a1 1 0 0 1 1.12.86 45.4 45.4 0 0 1 0 11.76 1 1 0 0 1-1.98-.26 43.37 43.37 0 0 0 0-11.24 1 1 0 0 1 .86-1.12zM19.76 77.46a1 1 0 0 0-1.85.77A44.95 44.95 0 0 0 23.8 88.4a1 1 0 0 0 1.58-1.22 42.95 42.95 0 0 1-5.62-9.72zM100.54 76.92a1 1 0 0 1 .54 1.3A44.95 44.95 0 0 1 95.2 88.4a1 1 0 0 1-1.58-1.22 42.95 42.95 0 0 0 5.62-9.72 1 1 0 0 1 1.3-.54zM33.32 95.12a1 1 0 1 0-1.22 1.58 44.94 44.94 0 0 0 10.17 5.88 1 1 0 0 0 .77-1.84 42.97 42.97 0 0 1-9.72-5.62zM87.08 95.3a1 1 0 0 1-.18 1.4 44.94 44.94 0 0 1-10.17 5.88 1 1 0 0 1-.77-1.84 42.98 42.98 0 0 0 9.72-5.62 1 1 0 0 1 1.4.18zM53.88 103.64a1 1 0 0 0-.26 1.98 45.4 45.4 0 0 0 11.76 0 1 1 0 0 0-.26-1.98 43.37 43.37 0 0 1-11.24 0zM62.81 53.17a1 1 0 0 0-.78 1.84 6.62 6.62 0 0 1 3.49 3.5 1 1 0 1 0 1.84-.78 8.62 8.62 0 0 0-4.55-4.56z"/><path fill="#1E222D" d="M45.5 61a14 14 0 1 1 24.28 9.5l7.92 7.92a1 1 0 0 1-1.42 1.42l-7.96-7.97A14 14 0 0 1 45.5 61zm14-12a12 12 0 1 0 0 24 12 12 0 0 0 0-24z"/><circle fill="#2196F3" cx="97.5" cy="39" r="13"/><path fill="#fff" d="M98.5 34a1 1 0 1 0-2 0v4h-4a1 1 0 1 0 0 2h4v4a1 1 0 1 0 2 0v-4h4a1 1 0 0 0 0-2h-4v-4z"/></svg>'}}]);
|
||||
File diff suppressed because one or more lines are too long
@@ -1,12 +1,12 @@
|
||||
(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[3005],{97754:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function s(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)&&n.length){var a=s.apply(null,n);a&&e.push(a)}else if("object"===i)for(var o in n)r.call(n,o)&&n[o]&&e.push(o)}}return e.join(" ")}e.exports?(s.default=s,e.exports=s):void 0===(n=function(){return s}.apply(t,[]))||(e.exports=n)}()},46913:e=>{e.exports={wrap:"wrap-wXGVFOC9",wrapWithArrowsOuting:"wrapWithArrowsOuting-wXGVFOC9",wrapOverflow:"wrapOverflow-wXGVFOC9",scrollWrap:"scrollWrap-wXGVFOC9",noScrollBar:"noScrollBar-wXGVFOC9",icon:"icon-wXGVFOC9",scrollLeft:"scrollLeft-wXGVFOC9",scrollRight:"scrollRight-wXGVFOC9",isVisible:"isVisible-wXGVFOC9",iconWrap:"iconWrap-wXGVFOC9",fadeLeft:"fadeLeft-wXGVFOC9",fadeRight:"fadeRight-wXGVFOC9"}},39416:(e,t,n)=>{"use strict";n.d(t,{useFunctionalRefObject:()=>i});var r=n(50959),s=n(43010);function i(e){const t=(0,r.useMemo)((()=>function(e){const t=n=>{e(n),t.current=n};return t.current=null,t}((e=>{o.current(e)}))),[]),n=(0,r.useRef)(null),i=t=>{if(null===t)return a(n.current,t),void(n.current=null);n.current!==e&&(n.current=e,a(n.current,t))},o=(0,r.useRef)(i);return o.current=i,(0,s.useIsomorphicLayoutEffect)((()=>{if(null!==t.current)return o.current(t.current),()=>o.current(null)}),[e]),t}function a(e,t){null!==e&&("function"==typeof e?e(t):e.current=t)}},43010:(e,t,n)=>{"use strict";n.d(t,{useIsomorphicLayoutEffect:()=>s});var r=n(50959);function s(e,t){("undefined"==typeof window?r.useEffect:r.useLayoutEffect)(e,t)}},67842:(e,t,n)=>{"use strict";n.d(t,{useResizeObserver:()=>a});var r=n(50959),s=n(43010),i=n(39416);function a(e,t=[]){const{callback:n,ref:a=null}=function(e){return"function"==typeof e?{callback:e}:e}(e),o=(0,r.useRef)(null),l=(0,r.useRef)(n);l.current=n;const c=(0,i.useFunctionalRefObject)(a),u=(0,r.useCallback)((e=>{c(e),null!==o.current&&(o.current.disconnect(),null!==e&&o.current.observe(e))}),[c,o]);return(0,s.useIsomorphicLayoutEffect)((()=>(o.current=new ResizeObserver(((e,t)=>{l.current(e,t)})),c.current&&u(c.current),()=>{o.current?.disconnect()})),[c,...t]),u}},9745:(e,t,n)=>{"use strict";n.d(t,{Icon:()=>s});var r=n(50959);const s=r.forwardRef(((e,t)=>{const{icon:n="",title:s,ariaLabel:i,ariaLabelledby:a,ariaHidden:o,...l}=e,c=!!(s||i||a);return r.createElement("span",{role:"img",...l,ref:t,"aria-label":i,"aria-labelledby":a,"aria-hidden":o||!c,title:s,dangerouslySetInnerHTML:{__html:n}})}))},47201:(e,t,n)=>{"use strict";function r(...e){return t=>{for(const n of e)void 0!==n&&n(t)}}n.d(t,{createSafeMulticastEventHandler:()=>r})},42142:(e,t,n)=>{"use strict";n.d(t,{FragmentMap:()=>s});var r=n(50959);function s(e){if(e.map){return r.Children.toArray(e.children).map(e.map)}return e.children}},45601:(e,t,n)=>{"use strict";n.d(t,{Measure:()=>s});var r=n(67842);function s(e){const{children:t,onResize:n}=e;return t((0,
|
||||
r.useResizeObserver)(n||(()=>{}),[null===n]))}},70412:(e,t,n)=>{"use strict";n.d(t,{hoverMouseEventFilter:()=>i,useAccurateHover:()=>a,useHover:()=>s});var r=n(50959);function s(){const[e,t]=(0,r.useState)(!1);return[e,{onMouseOver:function(e){i(e)&&t(!0)},onMouseOut:function(e){i(e)&&t(!1)}}]}function i(e){return!e.currentTarget.contains(e.relatedTarget)}function a(e){const[t,n]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const t=t=>{if(null===e.current)return;const r=e.current.contains(t.target);n(r)};return document.addEventListener("mouseover",t),()=>document.removeEventListener("mouseover",t)}),[]),t}},6132:(e,t,n)=>{"use strict";var r=n(22134);function s(){}function i(){}i.resetWarningCache=s,e.exports=function(){function e(e,t,n,s,i,a){if(a!==r){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:s};return n.PropTypes=n,n}},19036:(e,t,n)=>{e.exports=n(6132)()},22134:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},13818:e=>{e.exports={group:"group-MBOVGQRI",separator:"separator-MBOVGQRI",noLeftDecoration:"noLeftDecoration-MBOVGQRI",noRightDecoration:"noRightDecoration-MBOVGQRI",noMinimalWidth:"noMinimalWidth-MBOVGQRI",separatorWrap:"separatorWrap-MBOVGQRI"}},32169:e=>{e.exports={separator:"separator-xVhBjD5m"}},58312:e=>{e.exports={"css-value-header-toolbar-height":"38px",toolbar:"toolbar-qqNP9X6e",isHidden:"isHidden-qqNP9X6e",overflowWrap:"overflowWrap-qqNP9X6e",customButton:"customButton-qqNP9X6e",hover:"hover-qqNP9X6e",clicked:"clicked-qqNP9X6e"}},87730:e=>{e.exports={wrap:"wrap-_psvpUP2",icon:"icon-_psvpUP2"}},8297:e=>{e.exports={"css-value-header-toolbar-height":"38px",innerWrap:"innerWrap-OhqNVIYA",inner:"inner-OhqNVIYA",fake:"fake-OhqNVIYA",fill:"fill-OhqNVIYA",collapse:"collapse-OhqNVIYA",button:"button-OhqNVIYA",iconButton:"iconButton-OhqNVIYA",hidden:"hidden-OhqNVIYA",content:"content-OhqNVIYA",desktopPublish:"desktopPublish-OhqNVIYA",mobilePublish:"mobilePublish-OhqNVIYA"}},57177:(e,t,n)=>{"use strict";var r;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"}(r||(r={}))},42014:(e,t,n)=>{"use strict";n.d(t,{INTERVALS:()=>s});var r=n(11542);const s=[{name:"",label:r.t(null,{context:"interval"},n(79930))},{name:"H",label:r.t(null,{context:"interval"},n(35157))},{name:"D",label:r.t(null,{context:"interval"},n(23970))},{name:"W",label:r.t(null,{context:"interval"},n(7938))},{
|
||||
name:"M",label:r.t(null,{context:"interval"},n(18193))}]},6190:(e,t,n)=>{"use strict";n.d(t,{Toolbar:()=>d});var r=n(50959),s=n(50151),i=n(47201),a=n(3343),o=n(19291),l=n(57177),c=n(39416),u=n(7047);const d=(0,r.forwardRef)((function(e,t){const{onKeyDown:n,orientation:d,blurOnEscKeydown:h=!0,blurOnClick:m=!0,...p}=e,v=(0,c.useFunctionalRefObject)(t);return(0,r.useLayoutEffect)((()=>{const e=(0,s.ensureNotNull)(v.current),t=()=>{const t=(0,o.queryTabbableElements)(e).sort(o.navigationOrderComparator);if(0===t.length){const[t]=(0,o.queryFocusableElements)(e).sort(o.navigationOrderComparator);if(void 0===t)return;(0,l.becomeMainElement)(t)}if(t.length>1){const[,...e]=t;for(const t of e)(0,l.becomeSecondaryElement)(t)}};return window.addEventListener("keyboard-navigation-activation",t),()=>window.removeEventListener("keyboard-navigation-activation",t)}),[]),r.createElement("div",{...u.MouseClickAutoBlurHandler.attributes(m),...p,role:"toolbar","aria-orientation":d,ref:v,onKeyDown:(0,i.createSafeMulticastEventHandler)((function(e){if(e.defaultPrevented)return;if(!(document.activeElement instanceof HTMLElement))return;const t=(0,a.hashFromEvent)(e);if(h&&27===t)return e.preventDefault(),void document.activeElement.blur();if("vertical"!==d&&37!==t&&39!==t)return;if("vertical"===d&&38!==t&&40!==t)return;const n=e.currentTarget,r=(0,o.queryFocusableElements)(n).sort(o.navigationOrderComparator);if(0===r.length)return;const s=r.indexOf(document.activeElement);if(-1===s)return;e.preventDefault();const i=()=>{const e=(s+r.length-1)%r.length;(0,l.becomeSecondaryElement)(r[s]),(0,l.becomeMainElement)(r[e]),r[e].focus()},c=()=>{const e=(s+r.length+1)%r.length;(0,l.becomeSecondaryElement)(r[s]),(0,l.becomeMainElement)(r[e]),r[e].focus()};switch((0,o.mapKeyCodeToDirection)(t)){case"inlinePrev":"vertical"!==d&&i();break;case"inlineNext":"vertical"!==d&&c();break;case"blockPrev":"vertical"===d&&i();break;case"blockNext":"vertical"===d&&c()}}),n),"data-tooltip-show-on-focus":"true"})}))},43410:(e,t,n)=>{"use strict";n.r(t),n.d(t,{HeaderToolbarRenderer:()=>Fe});var r=n(50959),s=n(32227),i=n(50151),a=n(97754),o=n.n(a),l=n(85459),c=n.n(l),u=n(20057),d=n(83873);const h=function(e){return null==e};var m=n(56570),p=n(76422),v=n(19036),f=n(32563),g=n(42142),S=n(32169);function b(e){return r.createElement("div",{className:o()(S.separator,e.className)})}var y=n(13818);function C(e){const{children:t,className:n,noLeftDecoration:s,noRightDecoration:i,noMinimalWidth:o,onClick:l,removeSeparator:c}=e;return r.createElement(r.Fragment,null,!c&&r.createElement("div",{className:y.separatorWrap},r.createElement(b,{className:y.separator})),r.createElement("div",{className:a(n,y.group,{[y.noMinimalWidth]:o,[y.noLeftDecoration]:s,[y.noRightDecoration]:i}),onClick:l},t))}var E=n(45601),_=n(11542),w=n(9745),M=n(87730),R=n(45820);const k={text:_.t(null,void 0,n(48161))};function I(e){return r.createElement("div",{className:M.wrap},r.createElement(w.Icon,{className:M.icon,icon:R}),k.text)}var V=n(61119),F=n(78871),O=n(63273),W=n(61380),L=n(46913);const N={
|
||||
isVisibleScrollbar:!0,shouldMeasure:!0,hideButtonsFrom:1};function T(e){return r.createElement("div",{className:a(L.fadeLeft,e.className,{[L.isVisible]:e.isVisible})})}function B(e){return r.createElement("div",{className:a(L.fadeRight,e.className,{[L.isVisible]:e.isVisible})})}function A(e){return r.createElement(x,{...e,className:L.scrollLeft})}function D(e){return r.createElement(x,{...e,className:L.scrollRight})}function x(e){return r.createElement("div",{className:a(e.className,{[L.isVisible]:e.isVisible}),onClick:e.onClick},r.createElement("div",{className:L.iconWrap},r.createElement(w.Icon,{icon:W,className:L.icon})))}const P=function(e=A,t=D,n=T,s=B){var o;return(o=class extends r.PureComponent{constructor(e){super(e),this._scroll=r.createRef(),this._handleScrollLeft=()=>{if(this.props.onScrollButtonClick)return void this.props.onScrollButtonClick("left");const e=this.props.scrollStepSize||this.state.widthWrap-50;this.animateTo(Math.max(0,this.currentPosition()-e))},this._handleScrollRight=()=>{if(this.props.onScrollButtonClick)return void this.props.onScrollButtonClick("right");const e=this.props.scrollStepSize||this.state.widthWrap-50;this.animateTo(Math.min((this.state.widthContent||0)-(this.state.widthWrap||0),this.currentPosition()+e))},this._handleResizeWrap=([e])=>{const t=e.target.getBoundingClientRect();this.props.onMeasureWrap&&this.props.onMeasureWrap(t),this.setState({widthWrap:t.width}),this._checkButtonsVisibility()},this._handleResizeContent=([e])=>{const t=e.target.getBoundingClientRect();this.props.onMeasureContent&&this.props.onMeasureContent(t);const{shouldDecreaseWidthContent:n,buttonsWidthIfDecreasedWidthContent:r}=this.props;n&&r?this.setState({widthContent:t.width+2*r}):this.setState({widthContent:t.width})},this._handleScroll=()=>{const{onScroll:e}=this.props;e&&e(this.currentPosition(),this.isAtLeft(),this.isAtRight()),this._checkButtonsVisibility()},this._checkButtonsVisibility=()=>{const{isVisibleLeftButton:e,isVisibleRightButton:t}=this.state,n=this.isAtLeft(),r=this.isAtRight();n||e?n&&e&&this.setState({isVisibleLeftButton:!1}):this.setState({isVisibleLeftButton:!0}),r||t?r&&t&&this.setState({isVisibleRightButton:!1}):this.setState({isVisibleRightButton:!0})},this.state={widthContent:0,widthWrap:0,isVisibleRightButton:!1,isVisibleLeftButton:!1}}componentDidMount(){this._checkButtonsVisibility()}componentDidUpdate(e,t){t.widthWrap===this.state.widthWrap&&t.widthContent===this.state.widthContent||this._handleScroll()}currentPosition(){return this._scroll.current?(0,O.isRtl)()?(0,O.getLTRScrollLeft)(this._scroll.current):this._scroll.current.scrollLeft:0}isAtLeft(){return!this._isOverflowed()||this.currentPosition()<=(0,i.ensureDefined)(this.props.hideButtonsFrom)}isAtRight(){return!this._isOverflowed()||this.currentPosition()+this.state.widthWrap>=this.state.widthContent-(0,i.ensureDefined)(this.props.hideButtonsFrom)}animateTo(e,t=F.dur){const n=this._scroll.current;n&&((0,O.isRtl)()&&(e=(0,O.getLTRScrollLeftOffset)(n,e)),t<=0?n.scrollLeft=Math.round(e):(0,V.doAnimate)({
|
||||
onStep(e,t){n.scrollLeft=Math.round(t)},from:n.scrollLeft,to:Math.round(e),easing:F.easingFunc.easeInOutCubic,duration:t}))}render(){const{children:i,isVisibleScrollbar:o,isVisibleFade:l,isVisibleButtons:c,shouldMeasure:u,shouldDecreaseWidthContent:d,buttonsWidthIfDecreasedWidthContent:h,onMouseOver:m,onMouseOut:p,scrollWrapClassName:v,fadeClassName:f}=this.props,{isVisibleRightButton:g,isVisibleLeftButton:S}=this.state,b=d&&h;return r.createElement(E.Measure,{onResize:u?this._handleResizeWrap:null},(d=>r.createElement("div",{className:L.wrapOverflow,onMouseOver:m,onMouseOut:p,ref:d},r.createElement("div",{className:a(L.wrap,b?L.wrapWithArrowsOuting:"")},r.createElement("div",{className:a(L.scrollWrap,v,{[L.noScrollBar]:!o}),onScroll:this._handleScroll,ref:this._scroll},r.createElement(E.Measure,{onResize:u?this._handleResizeContent:null},i)),l&&r.createElement(n,{isVisible:S,className:f}),l&&r.createElement(s,{isVisible:g,className:f}),c&&r.createElement(e,{onClick:this._handleScrollLeft,isVisible:S}),c&&r.createElement(t,{onClick:this._handleScrollRight,isVisible:g})))))}_isOverflowed(){const{widthContent:e,widthWrap:t}=this.state;return e>t}}).defaultProps=N,o}(A,D,T,B);var H,q=n(14729);!function(e){e.SymbolSearch="header-toolbar-symbol-search",e.Intervals="header-toolbar-intervals",e.ChartStyles="header-toolbar-chart-styles",e.Compare="header-toolbar-compare",e.Indicators="header-toolbar-indicators",e.StudyTemplates="header-toolbar-study-templates",e.Dropdown="header-toolbar-dropdown",e.Alerts="header-toolbar-alerts",e.Layouts="header-toolbar-layouts",e.SaveLoad="header-toolbar-save-load",e.UndoRedo="header-toolbar-undo-redo",e.Properties="header-toolbar-properties",e.QuickSearch="header-toolbar-quick-search",e.PublishDesktop="header-toolbar-publish-desktop",e.PublishMobile="header-toolbar-publish-mobile",e.Fullscreen="header-toolbar-fullscreen",e.Screenshot="header-toolbar-screenshot",e.Replay="header-toolbar-replay",e.Financials="header-toolbar-financials"}(H||(H={}));var z=n(70412),G=n(77151),X=n(6190),U=n(8297);const Q=(0,G.registryContextType)(),Y=m.enabled("widget");class j extends r.PureComponent{constructor(e,t){super(e,t),this._handleMouseOver=e=>{(0,z.hoverMouseEventFilter)(e)&&this.setState({isHovered:!0})},this._handleMouseOut=e=>{(0,z.hoverMouseEventFilter)(e)&&this.setState({isHovered:!1})},this._handleInnerResize=([e])=>{const t=e.contentRect.width,{onWidthChange:n}=this.props;n&&n(t)},this._handleMeasureAvailableSpace=e=>{const{onAvailableSpaceChange:t}=this.props;t&&t(e.width)},this._processCustoms=e=>{const{isFake:t,displayMode:n}=this.props,{tools:s}=this.context;return e.map((e=>r.createElement(C,{key:e.id},(e=>{switch(e.type){case"Button":return r.createElement(s.Custom,{...e.params,isFake:t});case"TradingViewStyledButton":return r.createElement(s.CustomTradingViewStyledButton,{...e.params,className:U.button,displayMode:n});case"Dropdown":return r.createElement(s.Dropdown,{displayMode:n,params:e.params});default:return null}})(e))))},this._fixLastGroup=(e,t,n)=>{
|
||||
name:"M",label:r.t(null,{context:"interval"},n(18193))}]},6190:(e,t,n)=>{"use strict";n.d(t,{Toolbar:()=>d});var r=n(50959),s=n(50151),i=n(47201),a=n(3343),o=n(19291),l=n(57177),c=n(39416),u=n(7047);const d=(0,r.forwardRef)((function(e,t){const{onKeyDown:n,orientation:d,blurOnEscKeydown:h=!0,blurOnClick:m=!0,...p}=e,v=(0,c.useFunctionalRefObject)(t);return(0,r.useLayoutEffect)((()=>{const e=(0,s.ensureNotNull)(v.current),t=()=>{const t=(0,o.queryTabbableElements)(e).sort(o.navigationOrderComparator);if(0===t.length){const[t]=(0,o.queryFocusableElements)(e).sort(o.navigationOrderComparator);if(void 0===t)return;(0,l.becomeMainElement)(t)}if(t.length>1){const[,...e]=t;for(const t of e)(0,l.becomeSecondaryElement)(t)}};return window.addEventListener("keyboard-navigation-activation",t),()=>window.removeEventListener("keyboard-navigation-activation",t)}),[]),r.createElement("div",{...u.MouseClickAutoBlurHandler.attributes(m),...p,role:"toolbar","aria-orientation":d,ref:v,onKeyDown:(0,i.createSafeMulticastEventHandler)((function(e){if(e.defaultPrevented)return;if(!(document.activeElement instanceof HTMLElement))return;const t=(0,a.hashFromEvent)(e);if(h&&27===t)return e.preventDefault(),void document.activeElement.blur();if("vertical"!==d&&37!==t&&39!==t)return;if("vertical"===d&&38!==t&&40!==t)return;const n=e.currentTarget,r=(0,o.queryFocusableElements)(n).sort(o.navigationOrderComparator);if(0===r.length)return;const s=r.indexOf(document.activeElement);if(-1===s)return;e.preventDefault();const i=()=>{const e=(s+r.length-1)%r.length;(0,l.becomeSecondaryElement)(r[s]),(0,l.becomeMainElement)(r[e]),r[e].focus()},c=()=>{const e=(s+r.length+1)%r.length;(0,l.becomeSecondaryElement)(r[s]),(0,l.becomeMainElement)(r[e]),r[e].focus()};switch((0,o.mapKeyCodeToDirection)(t)){case"inlinePrev":"vertical"!==d&&i();break;case"inlineNext":"vertical"!==d&&c();break;case"blockPrev":"vertical"===d&&i();break;case"blockNext":"vertical"===d&&c()}}),n),"data-tooltip-show-on-focus":"true"})}))},39214:(e,t,n)=>{"use strict";n.r(t),n.d(t,{HeaderToolbarRenderer:()=>Fe});var r=n(50959),s=n(32227),i=n(50151),a=n(97754),o=n.n(a),l=n(85459),c=n.n(l),u=n(20057),d=n(83873),h=n(63193),m=n(56570),p=n(76422),v=n(19036),f=n(32563),g=n(42142),S=n(32169);function b(e){return r.createElement("div",{className:o()(S.separator,e.className)})}var y=n(13818);function C(e){const{children:t,className:n,noLeftDecoration:s,noRightDecoration:i,noMinimalWidth:o,onClick:l,removeSeparator:c}=e;return r.createElement(r.Fragment,null,!c&&r.createElement("div",{className:y.separatorWrap},r.createElement(b,{className:y.separator})),r.createElement("div",{className:a(n,y.group,{[y.noMinimalWidth]:o,[y.noLeftDecoration]:s,[y.noRightDecoration]:i}),onClick:l},t))}var E=n(45601),_=n(11542),w=n(9745),M=n(87730),R=n(45820);const k={text:_.t(null,void 0,n(48161))};function I(e){return r.createElement("div",{className:M.wrap},r.createElement(w.Icon,{className:M.icon,icon:R}),k.text)}var V=n(61119),F=n(78871),O=n(63273),W=n(61380),L=n(46913);const N={isVisibleScrollbar:!0,
|
||||
shouldMeasure:!0,hideButtonsFrom:1};function T(e){return r.createElement("div",{className:a(L.fadeLeft,e.className,{[L.isVisible]:e.isVisible})})}function B(e){return r.createElement("div",{className:a(L.fadeRight,e.className,{[L.isVisible]:e.isVisible})})}function A(e){return r.createElement(x,{...e,className:L.scrollLeft})}function D(e){return r.createElement(x,{...e,className:L.scrollRight})}function x(e){return r.createElement("div",{className:a(e.className,{[L.isVisible]:e.isVisible}),onClick:e.onClick},r.createElement("div",{className:L.iconWrap},r.createElement(w.Icon,{icon:W,className:L.icon})))}const P=function(e=A,t=D,n=T,s=B){var o;return(o=class extends r.PureComponent{constructor(e){super(e),this._scroll=r.createRef(),this._handleScrollLeft=()=>{if(this.props.onScrollButtonClick)return void this.props.onScrollButtonClick("left");const e=this.props.scrollStepSize||this.state.widthWrap-50;this.animateTo(Math.max(0,this.currentPosition()-e))},this._handleScrollRight=()=>{if(this.props.onScrollButtonClick)return void this.props.onScrollButtonClick("right");const e=this.props.scrollStepSize||this.state.widthWrap-50;this.animateTo(Math.min((this.state.widthContent||0)-(this.state.widthWrap||0),this.currentPosition()+e))},this._handleResizeWrap=([e])=>{const t=e.target.getBoundingClientRect();this.props.onMeasureWrap&&this.props.onMeasureWrap(t),this.setState({widthWrap:t.width}),this._checkButtonsVisibility()},this._handleResizeContent=([e])=>{const t=e.target.getBoundingClientRect();this.props.onMeasureContent&&this.props.onMeasureContent(t);const{shouldDecreaseWidthContent:n,buttonsWidthIfDecreasedWidthContent:r}=this.props;n&&r?this.setState({widthContent:t.width+2*r}):this.setState({widthContent:t.width})},this._handleScroll=()=>{const{onScroll:e}=this.props;e&&e(this.currentPosition(),this.isAtLeft(),this.isAtRight()),this._checkButtonsVisibility()},this._checkButtonsVisibility=()=>{const{isVisibleLeftButton:e,isVisibleRightButton:t}=this.state,n=this.isAtLeft(),r=this.isAtRight();n||e?n&&e&&this.setState({isVisibleLeftButton:!1}):this.setState({isVisibleLeftButton:!0}),r||t?r&&t&&this.setState({isVisibleRightButton:!1}):this.setState({isVisibleRightButton:!0})},this.state={widthContent:0,widthWrap:0,isVisibleRightButton:!1,isVisibleLeftButton:!1}}componentDidMount(){this._checkButtonsVisibility()}componentDidUpdate(e,t){t.widthWrap===this.state.widthWrap&&t.widthContent===this.state.widthContent||this._handleScroll()}currentPosition(){return this._scroll.current?(0,O.isRtl)()?(0,O.getLTRScrollLeft)(this._scroll.current):this._scroll.current.scrollLeft:0}isAtLeft(){return!this._isOverflowed()||this.currentPosition()<=(0,i.ensureDefined)(this.props.hideButtonsFrom)}isAtRight(){return!this._isOverflowed()||this.currentPosition()+this.state.widthWrap>=this.state.widthContent-(0,i.ensureDefined)(this.props.hideButtonsFrom)}animateTo(e,t=F.dur){const n=this._scroll.current;n&&((0,O.isRtl)()&&(e=(0,O.getLTRScrollLeftOffset)(n,e)),t<=0?n.scrollLeft=Math.round(e):(0,V.doAnimate)({onStep(e,t){
|
||||
n.scrollLeft=Math.round(t)},from:n.scrollLeft,to:Math.round(e),easing:F.easingFunc.easeInOutCubic,duration:t}))}render(){const{children:i,isVisibleScrollbar:o,isVisibleFade:l,isVisibleButtons:c,shouldMeasure:u,shouldDecreaseWidthContent:d,buttonsWidthIfDecreasedWidthContent:h,onMouseOver:m,onMouseOut:p,scrollWrapClassName:v,fadeClassName:f}=this.props,{isVisibleRightButton:g,isVisibleLeftButton:S}=this.state,b=d&&h;return r.createElement(E.Measure,{onResize:u?this._handleResizeWrap:null},(d=>r.createElement("div",{className:L.wrapOverflow,onMouseOver:m,onMouseOut:p,ref:d},r.createElement("div",{className:a(L.wrap,b?L.wrapWithArrowsOuting:"")},r.createElement("div",{className:a(L.scrollWrap,v,{[L.noScrollBar]:!o}),onScroll:this._handleScroll,ref:this._scroll},r.createElement(E.Measure,{onResize:u?this._handleResizeContent:null},i)),l&&r.createElement(n,{isVisible:S,className:f}),l&&r.createElement(s,{isVisible:g,className:f}),c&&r.createElement(e,{onClick:this._handleScrollLeft,isVisible:S}),c&&r.createElement(t,{onClick:this._handleScrollRight,isVisible:g})))))}_isOverflowed(){const{widthContent:e,widthWrap:t}=this.state;return e>t}}).defaultProps=N,o}(A,D,T,B);var H,q=n(14729);!function(e){e.SymbolSearch="header-toolbar-symbol-search",e.Intervals="header-toolbar-intervals",e.ChartStyles="header-toolbar-chart-styles",e.Compare="header-toolbar-compare",e.Indicators="header-toolbar-indicators",e.StudyTemplates="header-toolbar-study-templates",e.Dropdown="header-toolbar-dropdown",e.Alerts="header-toolbar-alerts",e.Layouts="header-toolbar-layouts",e.SaveLoad="header-toolbar-save-load",e.UndoRedo="header-toolbar-undo-redo",e.Properties="header-toolbar-properties",e.QuickSearch="header-toolbar-quick-search",e.PublishDesktop="header-toolbar-publish-desktop",e.PublishMobile="header-toolbar-publish-mobile",e.Fullscreen="header-toolbar-fullscreen",e.Screenshot="header-toolbar-screenshot",e.Replay="header-toolbar-replay",e.Financials="header-toolbar-financials"}(H||(H={}));var z=n(70412),G=n(77151),X=n(6190),U=n(8297);const Q=(0,G.registryContextType)(),Y=m.enabled("widget");class j extends r.PureComponent{constructor(e,t){super(e,t),this._handleMouseOver=e=>{(0,z.hoverMouseEventFilter)(e)&&this.setState({isHovered:!0})},this._handleMouseOut=e=>{(0,z.hoverMouseEventFilter)(e)&&this.setState({isHovered:!1})},this._handleInnerResize=([e])=>{const t=e.contentRect.width,{onWidthChange:n}=this.props;n&&n(t)},this._handleMeasureAvailableSpace=e=>{const{onAvailableSpaceChange:t}=this.props;t&&t(e.width)},this._processCustoms=e=>{const{isFake:t,displayMode:n}=this.props,{tools:s}=this.context;return e.map((e=>r.createElement(C,{key:e.id},(e=>{switch(e.type){case"Button":return r.createElement(s.Custom,{...e.params,isFake:t});case"TradingViewStyledButton":return r.createElement(s.CustomTradingViewStyledButton,{...e.params,className:U.button,displayMode:n});case"Dropdown":return r.createElement(s.Dropdown,{displayMode:n,params:e.params});default:return null}})(e))))},this._fixLastGroup=(e,t,n)=>{
|
||||
if(t===n.length-1&&r.isValidElement(e)&&e.type===C){const t=void 0!==this.context.tools.Publish&&!this.props.readOnly;return r.cloneElement(e,{noRightDecoration:t})}return e},(0,G.validateRegistry)(t,{tools:v.any.isRequired}),this.state={isHovered:!1}}render(){const{tools:e}=this.context,{features:t,displayMode:n,chartSaver:s,studyMarket:i,readOnly:o,saveLoadSyncEmitter:l,leftCustomElements:c,rightCustomElements:u,showScrollbarWhen:d,isFake:h=!1}=this.props,{isHovered:p}=this.state,v=this._processCustoms(c),S=this._processCustoms(u),b=d.includes(n);return r.createElement(X.Toolbar,{className:a(U.inner,{[U.fake]:h}),onContextMenu:q.preventDefaultForContextMenu,"data-is-fake-main-panel":h,"aria-hidden":h},r.createElement(P,{isVisibleFade:f.mobiletouch&&b,isVisibleButtons:!f.mobiletouch&&b&&p,isVisibleScrollbar:!1,shouldMeasure:!h,onMouseOver:this._handleMouseOver,onMouseOut:this._handleMouseOut,onMeasureWrap:this._handleMeasureAvailableSpace},(c=>r.createElement("div",{className:U.content,ref:c,role:"none"},r.createElement(E.Measure,{onResize:h?this._handleInnerResize:null},(c=>r.createElement("div",{className:U.innerWrap,ref:c},r.createElement(g.FragmentMap,{map:this._fixLastGroup},!o&&r.Children.toArray([(e.SymbolSearch||!Y&&e.Compare)&&r.createElement(C,{key:"symbol"},e.SymbolSearch&&r.createElement(e.SymbolSearch,{id:h?void 0:H.SymbolSearch,isActionsVisible:t.allowSymbolSearchSpread}),e.Compare&&r.createElement(e.Compare,{id:h?void 0:H.Compare,className:U.button,displayMode:n})),e.DateRange&&r.createElement(C,{key:"range"},r.createElement(e.DateRange,null)),e.Intervals&&r.createElement(C,{key:"intervals"},r.createElement(e.Intervals,{id:h?void 0:H.Intervals,isShownQuicks:t.allowFavoriting,isFavoritingAllowed:t.allowFavoriting,displayMode:n,isFake:h})),e.Bars&&r.createElement(C,{key:"styles"},r.createElement(e.Bars,{id:h?void 0:H.ChartStyles,isShownQuicks:t.allowFavoriting,isFavoritingAllowed:t.allowFavoriting,displayMode:n,isFake:h})),Y&&e.Compare&&!e.SymbolSearch&&r.createElement(C,{key:"compare"},r.createElement(e.Compare,{id:h?void 0:H.Compare,className:U.button,displayMode:n})),e.Indicators&&r.createElement(C,{key:"indicators"},r.createElement(e.Indicators,{id:h?void 0:H.Indicators,className:U.button,studyMarket:i,displayMode:n}),e.Templates&&r.createElement(e.Templates,{id:h?void 0:H.StudyTemplates,isShownQuicks:t.allowFavoriting,isFavoritingAllowed:t.allowFavoriting,displayMode:n})),e.Alert&&r.createElement(C,{key:"alert"},r.createElement(e.Alert,{id:h?void 0:H.Alerts,className:U.button,displayMode:n}),e.Replay&&r.createElement(e.Replay,{id:h?void 0:H.Replay,className:U.button,displayMode:n})),e.AlertReferral&&!m.enabled("hide_alert_referral_tool")&&r.createElement(C,{key:"alert-referral"},r.createElement(e.AlertReferral,{className:U.button,displayMode:n})),e.ScalePercentage&&r.createElement(C,{key:"percentage"},r.createElement(e.ScalePercentage,null)),e.ScaleLogarithm&&r.createElement(C,{key:"logarithm"},r.createElement(e.ScaleLogarithm,null)),...v]),function(e){
|
||||
const t=e.findIndex((e=>r.isValidElement(e)&&!!e.key&&-1!==e.key.toString().indexOf("view-only-badge")));return[t].filter((e=>e>=0)).forEach((t=>{e=r.Children.map(e,((e,n)=>{if(r.isValidElement(e)){switch([t-1,t,t+1].indexOf(n)){case 0:const t={noRightDecoration:!0};e=r.cloneElement(e,t);break;case 1:const n={noLeftDecoration:!0,noRightDecoration:!0};e=r.cloneElement(e,n);break;case 2:const s={noLeftDecoration:!0};e=r.cloneElement(e,s)}}return e}))})),e}(r.Children.toArray([o&&r.createElement(C,{key:"view-only-badge",removeSeparator:!0},r.createElement(I,null)),!o&&e.UndoRedo&&r.createElement(C,{key:"undo-redo"},r.createElement(e.UndoRedo,{id:h?void 0:H.UndoRedo})),r.createElement(C,{removeSeparator:!0,key:"gap-1",className:a(U.fill,h&&U.collapse)}),(e.Layout||e.SaveLoad)&&r.createElement(C,{key:"layout",removeSeparator:!0},!o&&e.Layout&&r.createElement(e.Layout,{id:h?void 0:H.Layouts}),e.SaveLoad&&r.createElement(e.SaveLoad,{id:h?void 0:H.SaveLoad,chartSaver:s,isReadOnly:o,displayMode:n,isFake:h,stateSyncEmitter:l})),e.SaveLoadReferral&&r.createElement(C,{key:"save-load-referral"},r.createElement(e.SaveLoadReferral,{isReadOnly:o,displayMode:n})),t.showLaunchInPopupButton&&e.OpenPopup&&!m.enabled("hide_open_popup_button")&&r.createElement(C,{key:"popup"},r.createElement(e.OpenPopup,null)),!o&&(e.Properties||e.Fullscreen||!Y&&e.Screenshot)&&r.createElement(C,{key:"properties"},!o&&e.QuickSearch&&r.createElement(e.QuickSearch,{id:h?void 0:H.QuickSearch,className:U.iconButton}),!o&&e.Properties&&r.createElement(e.Properties,{id:h?void 0:H.Properties,className:U.iconButton}),r.createElement(r.Fragment,null,!o&&e.Fullscreen&&r.createElement(C,{key:"fullscreen",onClick:this._trackFullscreenButtonClick,removeSeparator:!0},r.createElement(e.Fullscreen,{id:h?void 0:H.Fullscreen})),!Y&&e.Screenshot&&r.createElement(e.Screenshot,{id:h?void 0:H.Screenshot,className:U.iconButton}))),Y&&!o&&e.Fullscreen&&r.createElement(C,{key:"fullscreen",onClick:this._trackFullscreenButtonClick,removeSeparator:!0},r.createElement(e.Fullscreen,{id:h?void 0:H.Fullscreen})),Y&&e.Screenshot&&r.createElement(C,{key:"screenshot",removeSeparator:!0},r.createElement(e.Screenshot,{id:h?void 0:H.Screenshot,className:U.iconButton})),!o&&e.Publish&&!m.enabled("hide_publish_button")&&r.createElement(C,{key:"publish",className:U.mobilePublish,removeSeparator:!0},r.createElement(e.Publish,{id:h?void 0:H.PublishMobile})),...S]))))))))),e.Publish&&!o&&!h&&!m.enabled("hide_publish_button")&&r.createElement(e.Publish,{id:H.PublishDesktop,className:U.desktopPublish}))}_trackFullscreenButtonClick(){0}}var K;j.contextType=Q,function(e){e[e.Left=0]="Left",e[e.Self=1]="Self",e[e.Right=2]="Right"}(K||(K={}));var J=n(64147),$=n(59063);class Z extends $.CommonJsonStoreService{constructor(e,t,n=[]){super(e,t,"FAVORITE_CHART_STYLES_CHANGED","StyleWidget.quicks",n)}}var ee=n(10074),te=n(97144);class ne extends $.AbstractJsonStoreService{constructor(e,t,n){super(e,t,"FAVORITE_INTERVALS_CHANGED","IntervalWidget.quicks",n)}_serialize(e){return(0,
|
||||
te.uniq)(e.map(ee.normalizeIntervalString))}_deserialize(e){return(0,te.uniq)((0,ee.convertResolutionsFromSettings)(e).filter(ee.isResolutionMultiplierValid).map(ee.normalizeIntervalString))}}var re=n(82992),se=n(52033),ie=n(56840),ae=n(21097);class oe extends $.AbstractJsonStoreService{constructor(e,t,n=[]){super(e,t,"CUSTOM_INTERVALS_CHANGED","IntervalWidget.intervals",n)}set(e,t){const n=()=>{super.set(e,t)};e.length,this.get().length,n()}_serialize(e){return(0,te.uniq)(e.map(ee.normalizeIntervalString))}_deserialize(e){return(0,te.uniq)([...(0,ee.convertResolutionsFromSettings)(e).filter(ee.isResolutionMultiplierValid).map(ee.normalizeIntervalString)])}}const le=new oe(ae.TVXWindowEvents,ie);var ce=n(42014);class ue{constructor(e){this._customIntervalsService=le,this._supportedIntervalsMayChange=new se.Delegate,this._fireSupportedIntervalsMayChange=()=>{this._supportedIntervalsMayChange.fire()},this._resolutionGetter=()=>[],this._resolutionGetter=e,re.linking.supportedResolutions.subscribe(this._fireSupportedIntervalsMayChange),re.linking.range.subscribe(this._fireSupportedIntervalsMayChange),re.linking.seconds.subscribe(this._fireSupportedIntervalsMayChange),re.linking.ticks.subscribe(this._fireSupportedIntervalsMayChange),re.linking.intraday.subscribe(this._fireSupportedIntervalsMayChange),re.linking.dataFrequencyResolution.subscribe(this._fireSupportedIntervalsMayChange)}destroy(){re.linking.supportedResolutions.unsubscribe(this._fireSupportedIntervalsMayChange),re.linking.range.unsubscribe(this._fireSupportedIntervalsMayChange),re.linking.seconds.unsubscribe(this._fireSupportedIntervalsMayChange),re.linking.ticks.unsubscribe(this._fireSupportedIntervalsMayChange),re.linking.intraday.unsubscribe(this._fireSupportedIntervalsMayChange),re.linking.dataFrequencyResolution.unsubscribe(this._fireSupportedIntervalsMayChange)}getDefaultIntervals(){return this._resolutionGetter?this._resolutionGetter().map(ee.normalizeIntervalString):[]}getCustomIntervals(){return this._customIntervalsService.get()}add(e,t,n){if(!this.isValidInterval(e,t))return null;const r=(0,ee.normalizeIntervalString)(`${e}${t}`),s=this.getCustomIntervals();return this._isIntervalDefault(r)||s.includes(r)?null:(this._customIntervalsService.set((0,ee.sortResolutions)([...s,r])),r)}remove(e){this._customIntervalsService.set(this.getCustomIntervals().filter((t=>t!==e)))}isValidInterval(e,t){return(0,ee.isResolutionMultiplierValid)(`${e}${t}`)}isSupportedInterval(e){return(0,ee.isAvailable)(e)}supportedIntervalsMayChange(){return this._supportedIntervalsMayChange}getOnChange(){return this._customIntervalsService.getOnChange()}getPossibleIntervals(){return ce.INTERVALS}getResolutionUtils(){return{getMaxResolutionValue:ee.getMaxResolutionValue,getTranslatedResolutionModel:ee.getTranslatedResolutionModel,mergeResolutions:ee.mergeResolutions,sortResolutions:ee.sortResolutions}}_isIntervalDefault(e){return this.getDefaultIntervals().includes(e)}}var de=n(72894);function he(e){return e.replace(/(@[^-]+-[^-]+).*$/,"$1")}const me={};let pe=null;class ve{
|
||||
constructor(e=ie){this._favorites=[],this._favoritesChanged=new se.Delegate,this._settings=e,ae.TVXWindowEvents.on("StudyFavoritesChanged",(e=>{const t=JSON.parse(e);this._loadFromState(t.favorites||[])})),this._settings.onSync.subscribe(this,this._loadFavs),this._loadFavs()}isFav(e){const t=this.favId(e);return-1!==this._findFavIndex(t)}toggleFavorite(e){this.isFav(e)?this.removeFavorite(e):this.addFavorite(e)}addFavorite(e){const t=this.favId(e);this._favorites.push(ge(t)),this._favoritesChanged.fire(t),this._saveFavs()}removeFavorite(e){const t=this.favId(e),n=this._findFavIndex(t);-1!==n&&(this._favorites.splice(n,1),this._favoritesChanged.fire(t)),this._saveFavs()}favId(e){return he(e)}favorites(){return this._favorites}favoritePineIds(){return this._favorites.filter((e=>"pine"===e.type)).map((e=>e.pineId))}favoritesChanged(){return this._favoritesChanged}static getInstance(){return null===pe&&(pe=new ve),pe}static create(e){return new ve(e)}_loadFavs(){const e=this._settings.getJSON("studyMarket.favorites",[]);this._loadFromState(e)}_saveFavs(){const e=this._stateToSave();this._settings.setJSON("studyMarket.favorites",e,{forceFlush:!0}),ae.TVXWindowEvents.emit("StudyFavoritesChanged",JSON.stringify({favorites:e}))}_stateToSave(){return this._favorites.map(fe)}_loadFromState(e){this._favorites=e.map((e=>ge(function(e){return e in me?me[e]:e}(e)))),this._favoritesChanged.fire()}_findFavIndex(e){return this._favorites.findIndex((t=>e===fe(t)))}}function fe(e){return"java"===e.type?e.studyId:e.pineId}function ge(e){return isPineIdString(e)?{type:"pine",pineId:e}:{type:"java",studyId:e}}var Se=n(85049);const be={[Se.ResolutionKind.Ticks]:!1,[Se.ResolutionKind.Seconds]:!1,[Se.ResolutionKind.Minutes]:!1,[Se.SpecialResolutionKind.Hours]:!1,[Se.ResolutionKind.Days]:!1,[Se.ResolutionKind.Range]:!1};class ye extends $.CommonJsonStoreService{constructor(e,t,n=be){super(e,t,"INTERVALS_MENU_VIEW_STATE_CHANGED","IntervalWidget.menu.viewState",n)}isAllowed(e){return Object.keys(be).includes(e)}}const Ce={Area:3,"HLC area":16,Bars:0,Candles:1,"Heiken Ashi":8,"Hollow Candles":9,Line:2,Renko:4,Kagi:5,"Point & figure":6,"Line Break":7,Baseline:10,LineWithMarkers:14,Stepline:15,Columns:13,"High-low":12},Ee=["1","30","60"];function _e(e=[]){let t=e.map((e=>Ce[e]))||[1,4,5,6];return m.enabled("widget")&&(t=[0,1,3]),t}function we(e=[]){return(0,ee.mergeResolutions)(e,m.enabled("star_some_intervals_by_default")?Ee:[])}new ne(ae.TVXWindowEvents,ie,we()),new Z(ae.TVXWindowEvents,ie,_e());const Me={tools:v.any.isRequired,isFundamental:v.any,chartApiInstance:v.any,availableTimeFrames:v.any,chartWidgetCollection:v.any,windowMessageService:v.any,favoriteChartStylesService:v.any,favoriteIntervalsService:v.any,intervalService:v.any,recentStudyTemplatesService:v.any,studyTemplates:v.any,chartChangesWatcher:v.any,saveChartService:v.any,sharingChartService:v.any,loadChartService:v.any,chartWidget:v.any,favoriteScriptsModel:v.any,intervalsMenuViewStateService:v.any,templatesMenuViewStateService:v.any,openGlobalSearch:v.any,snapshotUrl:v.any}
|
||||
;var Re=n(49481),ke=n(58312);const Ie=[];class Ve extends r.PureComponent{constructor(e){super(e),this._saveLoadSyncEmitter=new(c()),this._handleFullWidthChange=e=>{this._fullWidth=e,this.setState({measureValid:!1})},this._handleFavoritesWidthChange=e=>{this._favoritesWidth=e,this.setState({measureValid:!1})},this._handleCollapseWidthChange=e=>{this._collapseWidth=e,this.setState({measureValid:!1})},this._handleMeasure=e=>{this.setState({availableWidth:e,measureValid:!1})};const{tools:t,windowMessageService:n,chartWidgetCollection:r,chartApiInstance:s,availableTimeFrames:a,isFundamental:o,favoriteIntervalsService:l,favoriteChartStylesService:d,recentStudyTemplatesService:h,studyTemplates:p,saveChartService:v,sharingChartService:f,loadChartService:g,snapshotUrl:S,openGlobalSearch:b}=e;this._showScrollbarWhen=(0,i.ensureDefined)(e.allowedModes).slice(-1),this._panelWidthChangeHandlers={full:this._handleFullWidthChange,medium:this._handleFavoritesWidthChange,small:this._handleCollapseWidthChange};const{chartChangesWatcher:y}=e;this._chartChangesWatcher=y;const C=_e(this.props.defaultFavoriteStyles);this._favoriteChartStylesService=d||new Z(ae.TVXWindowEvents,ie,C);const E=we(this.props.defaultFavoriteIntervals);this._favoriteIntervalsService=l||new ne(ae.TVXWindowEvents,ie,E),this._intervalsMenuViewStateService=new ye(ae.TVXWindowEvents,ie),this._intervalService=new ue(s.defaultResolutions),this._registry={tools:t,isFundamental:o,chartWidgetCollection:r,windowMessageService:n,chartApiInstance:s,availableTimeFrames:a,recentStudyTemplatesService:h,studyTemplates:p,saveChartService:v,sharingChartService:f,loadChartService:g,intervalsMenuViewStateService:this._intervalsMenuViewStateService,favoriteChartStylesService:this._favoriteChartStylesService,favoriteIntervalsService:this._favoriteIntervalsService,intervalService:this._intervalService,chartChangesWatcher:this._chartChangesWatcher,chartWidget:r.activeChartWidget.value(),favoriteScriptsModel:ve.getInstance(),templatesMenuViewStateService:this._templatesMenuVuewStateService,snapshotUrl:S,openGlobalSearch:b},this.state={isVisible:!0,availableWidth:0,displayMode:"full",measureValid:!1,leftCustomElements:[],rightCustomElements:[]},this._readOnly=r.readOnly(),this._features={allowFavoriting:m.enabled("items_favoriting"),showIdeasButton:Boolean(this.props.ideas),showLaunchInPopupButton:Boolean(this.props.popupButton),allowSymbolSearchSpread:m.enabled("header_symbol_search")&&m.enabled("show_spread_operators"),allowToolbarHiding:m.enabled("collapsible_header")},this._setDisplayMode=(0,u.default)(this._setDisplayMode,100),this._negotiateResizer()}componentDidUpdate(e,t){const{isVisible:n,measureValid:r}=this.state;n!==t.isVisible&&(p.emit("toggle_header",n),this._negotiateResizer()),r||this._setDisplayMode()}render(){const{resizerBridge:e,allowedModes:t,...n}=this.props,{displayMode:s,isVisible:o,leftCustomElements:l,rightCustomElements:c}=this.state,u={features:this._features,readOnly:this._readOnly,isFake:!1,saveLoadSyncEmitter:this._saveLoadSyncEmitter,leftCustomElements:l,
|
||||
rightCustomElements:c,...n},d={...u,isFake:!0,showScrollbarWhen:Ie},h=(0,i.ensureDefined)(t),m=this.props.tools.PublishButtonManager||r.Fragment;return r.createElement(G.RegistryProvider,{value:this._registry,validation:Me},r.createElement(m,null,r.createElement("div",{className:a(ke.toolbar,{[ke.isHidden]:!o}),onClick:this.props.onClick},r.createElement("div",{className:ke.overflowWrap},h.map((e=>r.createElement(j,{key:e,displayMode:e,onWidthChange:this._panelWidthChangeHandlers[e],...d}))),r.createElement(j,{key:"live",showScrollbarWhen:this._showScrollbarWhen,displayMode:s,onAvailableSpaceChange:this._handleMeasure,...u})))))}addButton(e,t){if(!t.useTradingViewStyle)return this._addCustomHTMLButton(e,t.align);this._addCustomTradingViewStyledButton(e,t)}removeButton(e){const{leftCustomElements:t,rightCustomElements:n}=this.state;if((0,d.default)(e))this._removeCustomElementToState(e);else{const r=t=>"element"in t.params&&t.params.element===e,s=t.find(r)?.id??n.find(r)?.id;h(s)||this._removeCustomElementToState(s)}}addDropdown(e,t){const{leftCustomElements:n,rightCustomElements:r}=this.state,s={type:"Dropdown",id:e,params:t};"left"===t.align?this.setState({leftCustomElements:[...n,s]}):this.setState({rightCustomElements:[...r,s]})}updateDropdown(e,t){const n=t=>"Dropdown"===t.type&&t.id===e,r=this.state.leftCustomElements.find(n)||this.state.rightCustomElements.find(n);void 0!==r&&(r.params={...r.params,...t},this.setState({leftCustomElements:this.state.leftCustomElements.slice(),rightCustomElements:this.state.rightCustomElements.slice()}))}removeDropdown(e){const t=t=>"Dropdown"===t.type&&t.id!==e,n=this.state.leftCustomElements.filter(t),r=this.state.rightCustomElements.filter(t);this.setState({leftCustomElements:n,rightCustomElements:r})}_negotiateResizer(){this.props.resizerBridge.negotiateHeight(this.state.isVisible?de.HEADER_TOOLBAR_HEIGHT_EXPANDED:de.HEADER_TOOLBAR_HEIGHT_COLLAPSED)}_setDisplayMode(){const{availableWidth:e}=this.state,{allowedModes:t}=this.props,n={full:this._fullWidth,medium:this._favoritesWidth,small:this._collapseWidth},r=(0,i.ensureDefined)(t);let s=r.map((e=>n[e])).findIndex((t=>e>=t));-1===s&&(s=r.length-1);const a=r[s];this.setState({measureValid:!0,displayMode:a})}_addCustomHTMLButton(e,t="left"){const n=new J.WatchedValue(0),r=(0,Re.parseHtmlElement)(`<div class="apply-common-tooltip ${ke.customButton}">`),s={type:"Button",id:e,params:{key:Number(new Date),element:r,width:n}};return this._addCustomElementToState(t,s),r}_addCustomTradingViewStyledButton(e,t){const n={type:"TradingViewStyledButton",id:e,params:{key:Number(new Date),text:t.text,title:t.title,onClick:t.onClick}};this._addCustomElementToState(t.align,n)}_addCustomElementToState(e,t){const{leftCustomElements:n,rightCustomElements:r}=this.state;"left"===e?this.setState({leftCustomElements:[...n,t]}):this.setState({rightCustomElements:[...r,t]})}_removeCustomElementToState(e){this.setState({leftCustomElements:this.state.leftCustomElements.filter((t=>t.id!==e)),
|
||||
rightCustomElements:c,...n},d={...u,isFake:!0,showScrollbarWhen:Ie},h=(0,i.ensureDefined)(t),m=this.props.tools.PublishButtonManager||r.Fragment;return r.createElement(G.RegistryProvider,{value:this._registry,validation:Me},r.createElement(m,null,r.createElement("div",{className:a(ke.toolbar,{[ke.isHidden]:!o}),onClick:this.props.onClick},r.createElement("div",{className:ke.overflowWrap},h.map((e=>r.createElement(j,{key:e,displayMode:e,onWidthChange:this._panelWidthChangeHandlers[e],...d}))),r.createElement(j,{key:"live",showScrollbarWhen:this._showScrollbarWhen,displayMode:s,onAvailableSpaceChange:this._handleMeasure,...u})))))}addButton(e,t){if(!t.useTradingViewStyle)return this._addCustomHTMLButton(e,t.align);this._addCustomTradingViewStyledButton(e,t)}removeButton(e){const{leftCustomElements:t,rightCustomElements:n}=this.state;if((0,d.default)(e))this._removeCustomElementToState(e);else{const r=t=>"element"in t.params&&t.params.element===e,s=t.find(r)?.id??n.find(r)?.id;(0,h.default)(s)||this._removeCustomElementToState(s)}}addDropdown(e,t){const{leftCustomElements:n,rightCustomElements:r}=this.state,s={type:"Dropdown",id:e,params:t};"left"===t.align?this.setState({leftCustomElements:[...n,s]}):this.setState({rightCustomElements:[...r,s]})}updateDropdown(e,t){const n=t=>"Dropdown"===t.type&&t.id===e,r=this.state.leftCustomElements.find(n)||this.state.rightCustomElements.find(n);void 0!==r&&(r.params={...r.params,...t},this.setState({leftCustomElements:this.state.leftCustomElements.slice(),rightCustomElements:this.state.rightCustomElements.slice()}))}removeDropdown(e){const t=t=>"Dropdown"===t.type&&t.id!==e,n=this.state.leftCustomElements.filter(t),r=this.state.rightCustomElements.filter(t);this.setState({leftCustomElements:n,rightCustomElements:r})}_negotiateResizer(){this.props.resizerBridge.negotiateHeight(this.state.isVisible?de.HEADER_TOOLBAR_HEIGHT_EXPANDED:de.HEADER_TOOLBAR_HEIGHT_COLLAPSED)}_setDisplayMode(){const{availableWidth:e}=this.state,{allowedModes:t}=this.props,n={full:this._fullWidth,medium:this._favoritesWidth,small:this._collapseWidth},r=(0,i.ensureDefined)(t);let s=r.map((e=>n[e])).findIndex((t=>e>=t));-1===s&&(s=r.length-1);const a=r[s];this.setState({measureValid:!0,displayMode:a})}_addCustomHTMLButton(e,t="left"){const n=new J.WatchedValue(0),r=(0,Re.parseHtmlElement)(`<div class="apply-common-tooltip ${ke.customButton}">`),s={type:"Button",id:e,params:{key:Number(new Date),element:r,width:n}};return this._addCustomElementToState(t,s),r}_addCustomTradingViewStyledButton(e,t){const n={type:"TradingViewStyledButton",id:e,params:{key:Number(new Date),text:t.text,title:t.title,onClick:t.onClick}};this._addCustomElementToState(t.align,n)}_addCustomElementToState(e,t){const{leftCustomElements:n,rightCustomElements:r}=this.state;"left"===e?this.setState({leftCustomElements:[...n,t]}):this.setState({rightCustomElements:[...r,t]})}_removeCustomElementToState(e){this.setState({leftCustomElements:this.state.leftCustomElements.filter((t=>t.id!==e)),
|
||||
rightCustomElements:this.state.rightCustomElements.filter((t=>t.id!==e))})}}Ve.defaultProps={allowedModes:["full","medium"]};class Fe{constructor(e,t){this._component=null,this._handleRef=e=>{this._component=e},this._container=e,s.render(r.createElement(Ve,{...t,ref:this._handleRef}),this._container)}destroy(){s.unmountComponentAtNode(this._container)}getComponent(){return(0,i.ensureNotNull)(this._component)}}},77151:(e,t,n)=>{"use strict";n.d(t,{RegistryProvider:()=>l,registryContextType:()=>c,validateRegistry:()=>o});var r=n(50959),s=n(19036),i=n.n(s);const a=r.createContext({});function o(e,t){i().checkPropTypes(t,e,"context","RegistryContext")}function l(e){const{validation:t,value:n}=e;return o(n,t),r.createElement(a.Provider,{value:n},e.children)}function c(){return a}},61380:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 10" width="20" height="10"><path fill="none" stroke="currentColor" stroke-width="1.5" d="M2 1l8 8 8-8"/></svg>'},45820:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path fill="currentColor" fill-rule="evenodd" d="M4.56 14a10.05 10.05 0 00.52.91c.41.69 1.04 1.6 1.85 2.5C8.58 19.25 10.95 21 14 21c3.05 0 5.42-1.76 7.07-3.58A17.18 17.18 0 0023.44 14a9.47 9.47 0 00-.52-.91c-.41-.69-1.04-1.6-1.85-2.5C19.42 8.75 17.05 7 14 7c-3.05 0-5.42 1.76-7.07 3.58A17.18 17.18 0 004.56 14zM24 14l.45-.21-.01-.03a7.03 7.03 0 00-.16-.32c-.11-.2-.28-.51-.5-.87-.44-.72-1.1-1.69-1.97-2.65C20.08 7.99 17.45 6 14 6c-3.45 0-6.08 2-7.8 3.92a18.18 18.18 0 00-2.64 3.84v.02h-.01L4 14l-.45-.21-.1.21.1.21L4 14l-.45.21.01.03a5.85 5.85 0 00.16.32c.11.2.28.51.5.87.44.72 1.1 1.69 1.97 2.65C7.92 20.01 10.55 22 14 22c3.45 0 6.08-2 7.8-3.92a18.18 18.18 0 002.64-3.84v-.02h.01L24 14zm0 0l.45.21.1-.21-.1-.21L24 14zm-10-3a3 3 0 100 6 3 3 0 000-6zm-4 3a4 4 0 118 0 4 4 0 01-8 0z"/></svg>'}}]);
|
||||
860
charting_library/bundles/library.63b10f79ae60d2266de0.js
Normal file
860
charting_library/bundles/library.63b10f79ae60d2266de0.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
||||
(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[5516,9685],{45658:e=>{e.exports={small:"small-CtnpmPzP",medium:"medium-CtnpmPzP",large:"large-CtnpmPzP",switchView:"switchView-CtnpmPzP",checked:"checked-CtnpmPzP",disabled:"disabled-CtnpmPzP",track:"track-CtnpmPzP",thumb:"thumb-CtnpmPzP"}},20071:e=>{e.exports={switcher:"switcher-fwE97QDf",input:"input-fwE97QDf",thumbWrapper:"thumbWrapper-fwE97QDf",disabled:"disabled-fwE97QDf",checked:"checked-fwE97QDf"}},6917:e=>{e.exports={labelRow:"labelRow-_uXjSSQ5",toolbox:"toolbox-_uXjSSQ5",description:"description-_uXjSSQ5",descriptionTabletSmall:"descriptionTabletSmall-_uXjSSQ5",item:"item-_uXjSSQ5",titleItem:"titleItem-_uXjSSQ5",remove:"remove-_uXjSSQ5",active:"active-_uXjSSQ5",titleItemTabletSmall:"titleItemTabletSmall-_uXjSSQ5",itemTabletSmall:"itemTabletSmall-_uXjSSQ5",itemLabelTabletSmall:"itemLabelTabletSmall-_uXjSSQ5",wrap:"wrap-_uXjSSQ5",hovered:"hovered-_uXjSSQ5"}},34625:e=>{e.exports={footer:"footer-dwINHZFL"}},95214:e=>{e.exports={item:"item-zwyEh4hn",label:"label-zwyEh4hn",labelRow:"labelRow-zwyEh4hn",toolbox:"toolbox-zwyEh4hn"}},17946:(e,t,a)=>{"use strict";a.d(t,{CustomBehaviourContext:()=>i});const i=(0,a(50959).createContext)({enableActiveStateStyles:!0});i.displayName="CustomBehaviourContext"},125:(e,t,a)=>{"use strict";a.d(t,{useForceUpdate:()=>n});var i=a(50959);const n=()=>{const[,e]=(0,i.useReducer)((e=>e+1),0);return e}},76974:(e,t,a)=>{"use strict";a.d(t,{useIsMounted:()=>n});var i=a(50959);const n=()=>{const e=(0,i.useRef)(!1);return(0,i.useEffect)((()=>(e.current=!0,()=>{e.current=!1})),[]),e}},39362:(e,t,a)=>{"use strict";a.d(t,{SymbolSearchDialogFooter:()=>l});var i=a(50959),n=a(97754),s=a.n(n),o=a(34625);function l(e){const{className:t,children:a}=e;return i.createElement("div",{className:s()(o.footer,t)},a)}},36947:(e,t,a)=>{"use strict";a.d(t,{useForceUpdate:()=>i.useForceUpdate});var i=a(125)},81332:(e,t,a)=>{"use strict";a.d(t,{multilineLabelWithIconAndToolboxTheme:()=>o});var i=a(40173),n=a(9059),s=a(95214);const o=(0,i.mergeThemes)(n,s)},91836:e=>{e.exports={summary:"summary-ynHBVe1n",hovered:"hovered-ynHBVe1n",caret:"caret-ynHBVe1n"}},66114:e=>{e.exports={item:"item-KMkDzD5K",accessible:"accessible-KMkDzD5K",round:"round-KMkDzD5K",active:"active-KMkDzD5K"}},97542:e=>{e.exports={accessible:"accessible-raQdxQp0"}},89888:e=>{e.exports={button:"button-LkmyTVRc",active:"active-LkmyTVRc"}},17479:e=>{e.exports={wrapper:"wrapper-psOC5oyI",labelRow:"labelRow-psOC5oyI",label:"label-psOC5oyI",labelHint:"labelHint-psOC5oyI",labelOn:"labelOn-psOC5oyI"}},22315:e=>{e.exports={wrapper:"wrapper-bl9AR3Gv",hovered:"hovered-bl9AR3Gv",switchWrap:"switchWrap-bl9AR3Gv",withIcon:"withIcon-bl9AR3Gv",labelRow:"labelRow-bl9AR3Gv",label:"label-bl9AR3Gv",icon:"icon-bl9AR3Gv",labelHint:"labelHint-bl9AR3Gv",labelOn:"labelOn-bl9AR3Gv",accessible:"accessible-bl9AR3Gv"}},9306:e=>{e.exports={button:"button-Y1TCZogJ",active:"active-Y1TCZogJ"}},23225:e=>{e.exports={button:"button-ptpAHg8E",withText:"withText-ptpAHg8E",withoutText:"withoutText-ptpAHg8E"}},
|
||||
68484:e=>{e.exports={spinnerWrap:"spinnerWrap-cZT0OZe0"}},82316:e=>{e.exports={button:"button-neROVfUe",first:"first-neROVfUe",last:"last-neROVfUe"}},54663:e=>{e.exports={wrap:"wrap-n5bmFxyX"}},21569:e=>{e.exports={hidden:"hidden-5MVS18J8"}},63295:e=>{e.exports={"tablet-small-breakpoint":"(max-width: 440px)",item:"item-o5a0MQMm",withIcon:"withIcon-o5a0MQMm",shortcut:"shortcut-o5a0MQMm",loading:"loading-o5a0MQMm",icon:"icon-o5a0MQMm"}},41340:e=>{e.exports={button:"button-b3Cgff6l",group:"group-b3Cgff6l",menu:"menu-b3Cgff6l",betaBadge:"betaBadge-b3Cgff6l",newBadge:"newBadge-b3Cgff6l",label:"label-b3Cgff6l"}},935:e=>{e.exports={customTradingViewStyleButton:"customTradingViewStyleButton-zigjK1n2",withoutIcon:"withoutIcon-zigjK1n2"}},69744:e=>{e.exports={dropdown:"dropdown-l0nf43ai",label:"label-l0nf43ai",smallWidthTitle:"smallWidthTitle-l0nf43ai",smallWidthMenuItem:"smallWidthMenuItem-l0nf43ai",smallWidthWrapper:"smallWidthWrapper-l0nf43ai"}},18027:e=>{e.exports={value:"value-gwXludjS",selected:"selected-gwXludjS"}},23745:e=>{e.exports={smallWidthMenuItem:"smallWidthMenuItem-RmqZNwwp",menuItem:"menuItem-RmqZNwwp",remove:"remove-RmqZNwwp",signal:"signal-RmqZNwwp","highlight-animation":"highlight-animation-RmqZNwwp"}},20905:e=>{e.exports={button:"button-S_1OCXUK",first:"first-S_1OCXUK",last:"last-S_1OCXUK",menu:"menu-S_1OCXUK",dropdown:"dropdown-S_1OCXUK",menuContent:"menuContent-S_1OCXUK",section:"section-S_1OCXUK",smallTabletSectionTitle:"smallTabletSectionTitle-S_1OCXUK",addCustomInterval:"addCustomInterval-S_1OCXUK",desktop:"desktop-S_1OCXUK",group:"group-S_1OCXUK"}},36488:e=>{e.exports={button:"button-gn9HMufu"}},75394:e=>{e.exports={button:"button-ZuDkGGhF",isDisabled:"isDisabled-ZuDkGGhF"}},52464:e=>{e.exports={saveString:"saveString-XVd1Kfjg",hidden:"hidden-XVd1Kfjg",loader:"loader-XVd1Kfjg"}},18603:e=>{e.exports={menuBtnWrap:"menuBtnWrap-yyMUOAN9",menu:"menu-yyMUOAN9",hintPlaceholder:"hintPlaceholder-yyMUOAN9",hintWrapper:"hintWrapper-yyMUOAN9",hintText:"hintText-yyMUOAN9",hintButton:"hintButton-yyMUOAN9",hintButtons:"hintButtons-yyMUOAN9",hintAdditionalButton:"hintAdditionalButton-yyMUOAN9",opened:"opened-yyMUOAN9",hover:"hover-yyMUOAN9",clicked:"clicked-yyMUOAN9",autoSaveWrapper:"autoSaveWrapper-yyMUOAN9",sharingWrapper:"sharingWrapper-yyMUOAN9",button:"button-yyMUOAN9",buttonSmallPadding:"buttonSmallPadding-yyMUOAN9",hintPlaceHolder:"hintPlaceHolder-yyMUOAN9",smallHintPlaceHolder:"smallHintPlaceHolder-yyMUOAN9",popupItemRowTabletSmall:"popupItemRowTabletSmall-yyMUOAN9",shortcut:"shortcut-yyMUOAN9",toolTitle:"toolTitle-yyMUOAN9",toolTitleMobile:"toolTitleMobile-yyMUOAN9",layoutItem:"layoutItem-yyMUOAN9",layoutMeta:"layoutMeta-yyMUOAN9",toolbox:"toolbox-yyMUOAN9",toolboxSmall:"toolboxSmall-yyMUOAN9",layoutTitle:"layoutTitle-yyMUOAN9",layoutItemWrap:"layoutItemWrap-yyMUOAN9",layoutItemWrapSmall:"layoutItemWrapSmall-yyMUOAN9",layoutTitleSmall:"layoutTitleSmall-yyMUOAN9",textWrap:"textWrap-yyMUOAN9",text:"text-yyMUOAN9",withIcon:"withIcon-yyMUOAN9",sharingLabelWrap:"sharingLabelWrap-yyMUOAN9",
|
||||
titleSharingLabel:"titleSharingLabel-yyMUOAN9",switcherLabel:"switcherLabel-yyMUOAN9",iconWrap:"iconWrap-yyMUOAN9",infoIcon:"infoIcon-yyMUOAN9",accessibleLabel:"accessibleLabel-yyMUOAN9"}},92876:e=>{e.exports={button:"button-cq__ntSC",smallLeftPadding:"smallLeftPadding-cq__ntSC",text:"text-cq__ntSC",uppercase:"uppercase-cq__ntSC"}},75313:e=>{e.exports={description:"description-jgoQcEnP"}},97357:e=>{e.exports={wrap:"wrap-HXSqojvq",titleWrap:"titleWrap-HXSqojvq",indicators:"indicators-HXSqojvq",title:"title-HXSqojvq",icon:"icon-HXSqojvq",text:"text-HXSqojvq",titleTabletSmall:"titleTabletSmall-HXSqojvq",labelRow:"labelRow-HXSqojvq",label:"label-HXSqojvq"}},72154:e=>{e.exports={menu:"menu-hcofKPms",menuSmallTablet:"menuSmallTablet-hcofKPms",menuItemHeaderTabletSmall:"menuItemHeaderTabletSmall-hcofKPms",menuItemHeader:"menuItemHeader-hcofKPms"}},88506:e=>{e.exports={wrap:"wrap-jiC5bgmi",full:"full-jiC5bgmi",first:"first-jiC5bgmi",last:"last-jiC5bgmi",medium:"medium-jiC5bgmi",buttonWithFavorites:"buttonWithFavorites-jiC5bgmi"}},28282:e=>{e.exports={icon:"icon-uMfL97K2"}},39706:(e,t,a)=>{"use strict";a.d(t,{CollapsibleSection:()=>r});var i=a(50959),n=a(97754),s=a.n(n),o=a(10381),l=a(91836);const r=(0,i.forwardRef)((function(e,t){const{open:a,summary:n,children:r,onStateChange:h,tabIndex:c,className:d,...u}=e;return i.createElement(i.Fragment,null,i.createElement("div",{...u,className:s()(d,l.summary),onClick:function(){h&&h(!a)},"data-open":a,"aria-expanded":a,ref:t,tabIndex:c},n,i.createElement(o.ToolWidgetCaret,{className:l.caret,dropped:Boolean(a)})),a&&r)}))},40894:(e,t,a)=>{"use strict";a.d(t,{MenuFavoriteButton:()=>c});var i=a(50959),n=a(97754),s=a.n(n),o=a(50238),l=a(36189),r=a(71402),h=a(89888);function c(e){const{onClick:t,isFilled:a,isActive:n,...c}=e,[d,u]=(0,o.useRovingTabindexElement)(null),m=a?r.removeTitlesMap[r.RemoveTitleType.Remove]:r.removeTitlesMap[r.RemoveTitleType.Add];return(0,i.useLayoutEffect)((()=>{const e=d.current;e instanceof HTMLElement&&e.dispatchEvent(new CustomEvent("common-tooltip-update"))}),[m,d]),i.createElement("button",{ref:d,tabIndex:u,onClick:t,className:s()(h.button,n&&h.active,"apply-common-tooltip"),type:"button","aria-label":m,"data-tooltip":m},i.createElement(l.FavoriteButton,{...c,isFilled:a,isActive:n,title:""}))}},10428:(e,t,a)=>{"use strict";a.d(t,{DEFAULT_MENU_ITEM_SWITCHER_THEME:()=>C,MenuItemSwitcher:()=>_});var i,n=a(50959),s=a(97754),o=a.n(s),l=a(17946),r=a(45658);function h(e){const{size:t="small",checked:a,disabled:i}=e;return n.createElement("span",{className:o()(r.switchView,r[t],i&&r.disabled,a&&r.checked)},n.createElement("span",{className:r.track}),n.createElement("span",{className:r.thumb}))}!function(e){e.Small="small",e.Medium="medium",e.Large="large"}(i||(i={}));var c,d=a(3343),u=a(20071),m=a.n(u);function v(e){const t=(0,
|
||||
n.useContext)(l.CustomBehaviourContext),{size:a,intent:i="default",checked:o,className:r,enableActiveStateStyles:c=t.enableActiveStateStyles,disabled:u,onChange:v,title:p,id:g,name:b,value:S,tabIndex:C,role:_="switch",ariaDisabled:y,reference:w,ariaLabelledBy:f,ariaLabel:k,...E}=e;return n.createElement("span",{className:s(r,m().switcher)},n.createElement("input",{...E,type:"checkbox",className:s(m().input,c&&m().activeStylesEnabled,o&&m().checked,u&&m().disabled),role:_,"aria-checked":o,checked:o,onKeyDown:e=>{13===(0,d.hashFromEvent)(e)&&e.currentTarget?.click()},onChange:v,disabled:u,"aria-disabled":y,tabIndex:C,title:p,id:g,name:b,value:S,ref:w,"aria-label":k,"aria-labelledby":f}),n.createElement("span",{className:s(m().thumbWrapper,m()[i])},n.createElement(h,{checked:o,size:a,disabled:u})))}!function(e){e.Default="default",e.Select="select"}(c||(c={}));var p=a(9745),g=a(50238),b=a(90186),S=a(22315);const C=S;function _(e){const{role:t,checked:a,onChange:i,className:s,id:l,label:r,labelDescription:h,preventLabelHighlight:c,value:u,reference:m,switchReference:C,theme:_=S,disabled:y,switchRole:w,icon:f}=e,[k,E]=(0,g.useRovingTabindexElement)(null),M=o()(_.label,a&&!c&&_.labelOn),T=o()(s,_.wrapper,a&&_.wrapperWithOnLabel,h&&_.wrapperWithDescription);return n.createElement("label",{role:t,className:o()(T,f&&_.withIcon,S.accessible),htmlFor:l,ref:m,onKeyDown:function(e){if(e.target!==e.currentTarget)return;const t=(0,d.hashFromEvent)(e);13!==t&&32!==t||(e.preventDefault(),k.current instanceof HTMLElement&&k.current.click())},tabIndex:E,"data-role":"menuitem","aria-disabled":e.disabled||void 0,"aria-selected":a},void 0!==f&&n.createElement(p.Icon,{className:_.icon,icon:f}),n.createElement("div",{className:_.labelRow},n.createElement("div",{className:M},r),h&&n.createElement("div",{className:_.labelHint},h)),n.createElement("div",{className:S.switchWrap},n.createElement(v,{disabled:y,className:_.switch,reference:function(e){k(e),C?.(e)},checked:a,onChange:function(e){const t=e.target.checked;void 0!==i&&i(t)},value:u,tabIndex:-1,id:l,role:w,ariaDisabled:!0,...(0,b.filterDataProps)(e)})))}},38068:(e,t,a)=>{"use strict";a.d(t,{MenuRemoveButton:()=>d});var i=a(50959),n=a(97754),s=a.n(n),o=a(11542),l=a(50238),r=a(96040),h=a(60925),c=a(9306);function d(e){const{onClick:t,isActive:n,onKeyDown:d,...u}=e,[m,v]=(0,l.useRovingTabindexElement)(null);return i.createElement("button",{ref:m,tabIndex:v,onClick:t,onKeyDown:d,className:s()(c.button,n&&c.active,"apply-common-tooltip"),"aria-label":o.t(null,void 0,a(67410)),"data-tooltip":o.t(null,void 0,a(67410)),type:"button"},i.createElement(r.RemoveButton,{...u,isActive:n,title:"",icon:h}))}},95230:(e,t,a)=>{"use strict";a.r(t),a.d(t,{getRestrictedToolSet:()=>ci});var i=a(56570),n=a(50959),s=a(19036),o=a(9745),l=a(11542),r=a(82992),h=a(5171),c=a(23076),d=a(88811),u=a(97754),m=a.n(u),v=a(54663);const p=n.forwardRef(((e,t)=>{const{children:a,className:i,...s}=e;return n.createElement("div",{className:u(i,v.wrap),ref:t,...s},a)}));var g=a(20792),b=a(82316)
|
||||
n.useContext)(l.CustomBehaviourContext),{size:a,intent:i="default",checked:o,className:r,enableActiveStateStyles:c=t.enableActiveStateStyles,disabled:u,onChange:v,title:p,id:g,name:b,value:S,tabIndex:C,role:_="switch",ariaDisabled:y,reference:w,ariaLabelledBy:f,ariaLabel:k,...E}=e;return n.createElement("span",{className:s(r,m().switcher)},n.createElement("input",{...E,type:"checkbox",className:s(m().input,c&&m().activeStylesEnabled,o&&m().checked,u&&m().disabled),role:_,"aria-checked":o,checked:o,onKeyDown:e=>{13===(0,d.hashFromEvent)(e)&&e.currentTarget?.click()},onChange:v,disabled:u,"aria-disabled":y,tabIndex:C,title:p,id:g,name:b,value:S,ref:w,"aria-label":k,"aria-labelledby":f}),n.createElement("span",{className:s(m().thumbWrapper,m()[i])},n.createElement(h,{checked:o,size:a,disabled:u})))}!function(e){e.Default="default",e.Select="select"}(c||(c={}));var p=a(9745),g=a(50238),b=a(90186),S=a(22315);const C=S;function _(e){const{role:t,checked:a,onChange:i,className:s,id:l,label:r,labelDescription:h,preventLabelHighlight:c,value:u,reference:m,switchReference:C,theme:_=S,disabled:y,switchRole:w,icon:f}=e,[k,E]=(0,g.useRovingTabindexElement)(null),M=o()(_.label,a&&!c&&_.labelOn),T=o()(s,_.wrapper,a&&_.wrapperWithOnLabel,h&&_.wrapperWithDescription);return n.createElement("label",{role:t,className:o()(T,f&&_.withIcon,S.accessible),htmlFor:l,ref:m,onKeyDown:function(e){if(e.target!==e.currentTarget)return;const t=(0,d.hashFromEvent)(e);13!==t&&32!==t||(e.preventDefault(),k.current instanceof HTMLElement&&k.current.click())},tabIndex:E,"data-role":"menuitem","aria-disabled":e.disabled||void 0,"aria-selected":a},void 0!==f&&n.createElement(p.Icon,{className:_.icon,icon:f}),n.createElement("div",{className:_.labelRow},n.createElement("div",{className:M},r),h&&n.createElement("div",{className:_.labelHint},h)),n.createElement("div",{className:S.switchWrap},n.createElement(v,{disabled:y,className:_.switch,reference:function(e){k(e),C?.(e)},checked:a,onChange:function(e){const t=e.target.checked;void 0!==i&&i(t)},value:u,tabIndex:-1,id:l,role:w,ariaDisabled:!0,...(0,b.filterDataProps)(e)})))}},38068:(e,t,a)=>{"use strict";a.d(t,{MenuRemoveButton:()=>d});var i=a(50959),n=a(97754),s=a.n(n),o=a(11542),l=a(50238),r=a(96040),h=a(60925),c=a(9306);function d(e){const{onClick:t,isActive:n,onKeyDown:d,...u}=e,[m,v]=(0,l.useRovingTabindexElement)(null);return i.createElement("button",{ref:m,tabIndex:v,onClick:t,onKeyDown:d,className:s()(c.button,n&&c.active,"apply-common-tooltip"),"aria-label":o.t(null,void 0,a(67410)),"data-tooltip":o.t(null,void 0,a(67410)),type:"button"},i.createElement(r.RemoveButton,{...u,isActive:n,title:"",icon:h}))}},95230:(e,t,a)=>{"use strict";a.r(t),a.d(t,{getRestrictedToolSet:()=>di});var i=a(56570),n=a(50959),s=a(19036),o=a(9745),l=a(11542),r=a(82992),h=a(5171),c=a(23076),d=a(88811),u=a(97754),m=a.n(u),v=a(54663);const p=n.forwardRef(((e,t)=>{const{children:a,className:i,...s}=e;return n.createElement("div",{className:u(i,v.wrap),ref:t,...s},a)}));var g=a(20792),b=a(82316)
|
||||
;class S extends n.PureComponent{constructor(){super(...arguments),this._handleClick=()=>{const{onClick:e,onClickArg:t}=this.props;e&&e(t)}}render(){const{className:e,icon:t,hint:a,text:i,isDisabled:s,isActive:o,isFirst:l,isLast:r,onClick:h,onClickArg:c,...d}=this.props;return n.createElement(g.ToolbarButton,{...d,icon:t,text:i,tooltip:a,isDisabled:s,isActive:o,isGrouped:!0,onClick:this._handleClick,className:u(e,b.button,{[b.first]:l,[b.last]:r})})}}var C=a(11684),_=a(90692),y=a(24437),w=a(81332),f=a(77151),k=a(42989),E=a(68805),M=a(47201),T=a(3343),x=a(19291),I=a(15754);function R(e){const{orientation:t,onKeyDown:a,...i}=e;return n.createElement("div",{...i,role:"radiogroup","aria-orientation":t,onKeyDown:(0,M.createSafeMulticastEventHandler)((function(e){if(e.defaultPrevented)return;if(!(document.activeElement instanceof HTMLElement))return;const a=(0,T.hashFromEvent)(e);if("vertical"!==t&&38!==a&&40!==a)return;if("vertical"===t&&37!==a&&39!==a)return;const i=(n=e.currentTarget,Array.from(n.querySelectorAll('[role="radio"]:not([disabled]):not([aria-disabled])')).filter((0,I.createScopedVisibleElementFilter)(n))).sort(x.navigationOrderComparator);var n;if(0===i.length)return;const s=i.indexOf(document.activeElement);if(-1===s)return;e.preventDefault();const o=()=>{const e=(s+i.length-1)%i.length;i[s].dispatchEvent(new CustomEvent("roving-tabindex:secondary-element")),i[e].dispatchEvent(new CustomEvent("roving-tabindex:main-element")),i[e].focus()},l=()=>{const e=(s+i.length+1)%i.length;i[s].dispatchEvent(new CustomEvent("roving-tabindex:secondary-element")),i[e].dispatchEvent(new CustomEvent("roving-tabindex:main-element")),i[e].focus()};switch(a){case 38:"vertical"!==t&&o();break;case 40:"vertical"!==t&&l();break;case 37:"vertical"===t&&o();break;case 39:"vertical"===t&&l()}}),a)})}var A=a(10838),N=a(40894),F=a(41340);const H=(0,f.registryContextType)();function O(e){return!r.linking.supportedChartStyles.value()?.includes(e)}const D="ITEMS_DIVIDER",U=[[0,1,9,19],[2,14,15],[3,16,10],[13,12],[17,18,20],[8,4,7,5,6,11]];new Set([]),new Set([]);class W extends n.PureComponent{constructor(e,t){super(e,t),this._handleChangeStyle=e=>{const{favorites:t,lastSelectedNotFavorite:a,activeStyle:i}=this.state;this.setState({activeStyle:e,lastSelectedNotFavorite:t.includes(i)?a:i})},this._handleSelectStyle=e=>{const{chartWidgetCollection:t}=this.context;e!==t.activeChartStyle.value()&&t.setChartStyleToWidget(e)},this._handleClickFavorite=e=>{this._isStyleFavorited(e)?this._handleRemoveFavorite(e):this._handleAddFavorite(e)},this._boundForceUpdate=()=>{this.forceUpdate()},this._handleQuickClick=e=>{this._handleSelectStyle(e),this._trackClick()},(0,f.validateRegistry)(t,{chartWidgetCollection:s.any.isRequired,favoriteChartStylesService:s.any.isRequired});const{chartWidgetCollection:a,favoriteChartStylesService:i}=t,n=a.activeChartStyle.value(),o=i.get(),l=new Set((0,k.allChartStyles)());this.state={activeStyle:n,favorites:o,styles:U.reduce(((e,t)=>{const a=t.filter((e=>l.has(e)));return a.length&&(e.length&&a.unshift(D),
|
||||
e.push(...a)),e}),[])}}componentDidMount(){const{chartWidgetCollection:e,favoriteChartStylesService:t}=this.context;e.activeChartStyle.subscribe(this._handleChangeStyle),t.getOnChange().subscribe(this,this._handleChangeSettings),r.linking.supportedChartStyles.subscribe(this._boundForceUpdate)}componentWillUnmount(){const{chartWidgetCollection:e,favoriteChartStylesService:t}=this.context;e.activeChartStyle.unsubscribe(this._handleChangeStyle),t.getOnChange().unsubscribe(this,this._handleChangeSettings),r.linking.supportedChartStyles.unsubscribe(this._boundForceUpdate)}render(){const{isShownQuicks:e,displayMode:t="full",id:i}=this.props,{activeStyle:s,favorites:r,styles:u,lastSelectedNotFavorite:m}=this.state,v="small"!==t&&e&&0!==r.length,g=[...r];g.includes(s)?void 0!==m&&g.push(m):g.push(s);const b=v&&g.length>1;return n.createElement(_.MatchMedia,{rule:y.DialogBreakpoints.TabletSmall},(e=>{const t=u.map(((t,a)=>t===D?n.createElement(C.PopupMenuSeparator,{key:`separator-${a}`}):this._renderPopupMenuItem(t,t===s,e)));return n.createElement(p,{id:i},b&&n.createElement(R,{orientation:"horizontal",className:F.group},g.map(((e,t)=>n.createElement(S,{role:"radio",className:F.button,icon:c.SERIES_ICONS[e],"aria-checked":v&&s===e,isActive:v&&s===e,isDisabled:O(e),key:t,hint:(0,E.getTranslatedChartStyleName)(e),isFirst:0===t,isLast:t===g.length-1,onClick:v?this._handleQuickClick:void 0,onClickArg:e,"data-value":h.STYLE_SHORT_NAMES[e]})))),n.createElement(d.ToolbarMenuButton,{arrow:Boolean(b),content:b?void 0:n.createElement(p,null,n.createElement(o.Icon,{icon:c.SERIES_ICONS[s]})),tooltip:b?l.t(null,void 0,a(89911)):(0,E.getTranslatedChartStyleName)(s),className:F.menu,isDrawer:e,onClick:this._trackClick,menuRole:"treegrid"},t))}))}_renderPopupMenuItem(e,t,a){const{isFavoritingAllowed:i}=this.props,s=this._isStyleFavorited(e);return n.createElement(A.AccessibleMenuItem,{key:`chart-type-${e}`,role:"row",theme:a?w.multilineLabelWithIconAndToolboxTheme:void 0,icon:c.SERIES_ICONS[e],isActive:t,"aria-selected":t,isDisabled:O(e),label:n.createElement("div",{className:F.label},(0,E.getTranslatedChartStyleName)(e)||"",!1,!1),onClick:this._handleSelectStyle,onClickArg:e,showToolboxOnHover:!s,showToolboxOnFocus:!0,toolbox:i&&n.createElement(N.MenuFavoriteButton,{isActive:t,isFilled:s,onClick:()=>this._handleClickFavorite(e)}),"data-value":h.STYLE_SHORT_NAMES[e]})}_handleChangeSettings(e){this.setState({lastSelectedNotFavorite:void 0,favorites:e})}_isStyleFavorited(e){return-1!==this.state.favorites.indexOf(e)}_handleAddFavorite(e){const{favorites:t}=this.state,{favoriteChartStylesService:a}=this.context;a.set([...t,e])}_handleRemoveFavorite(e){const{favorites:t}=this.state,{favoriteChartStylesService:a}=this.context;a.set(t.filter((t=>t!==e)))}_trackClick(){0}}W.contextType=H;var P=a(50238),L=a(81348),V=a(23225);const B=["medium","small"],z=(0,n.forwardRef)((function(e,t){const{text:a,className:i,displayMode:s,collapseWhen:o=B,...l}=e,r=!o.includes(s);return n.createElement(L.ToolWidgetButton,{...l,ref:t,text:r?a:void 0,
|
||||
className:u(i,V.button,r?V.withText:V.withoutText)})}));function Z(e){const{tooltip:t,...a}=e,[i,s]=(0,P.useRovingTabindexElement)(null);return n.createElement(z,{"aria-label":t,...a,tag:"button",tabIndex:s,ref:i,"data-tooltip":t})}var K=a(51768),q=a(76460),j=a(1393);const Q=(0,f.registryContextType)();class X extends n.PureComponent{constructor(e,t){super(e,t),this._updateState=e=>{this.setState({isActive:e})},this._handleClick=e=>{(0,K.trackEvent)("GUI","Chart Header Toolbar","compare"),this._compareDialogRenderer?.show({shouldReturnFocus:(0,q.isKeyboardClick)(e)})},(0,f.validateRegistry)(t,{chartWidgetCollection:s.any.isRequired}),this.state={isActive:!1},this._compareDialogRenderer=this.context.chartWidgetCollection.getCompareDialogRenderer()}componentDidMount(){this._compareDialogRenderer?.visible().subscribe(this._updateState)}componentWillUnmount(){this._compareDialogRenderer?.visible().unsubscribe(this._updateState)}render(){const{isActive:e}=this.state;return n.createElement(Z,{...this.props,icon:j,isOpened:e,onClick:this._handleClick,collapseWhen:["full","medium","small"],tooltip:l.t(null,void 0,a(53942)),"aria-haspopup":"dialog"})}}X.contextType=Q;var G=a(45827),$=a(61814),Y=a(68335),J=a(97268),ee=a(36992);const te=(0,$.hotKeySerialize)({keys:[(0,Y.humanReadableModifiers)(Y.Modifiers.Shift,!1),"F"],text:"{0} + {1}"}),ae=(0,f.registryContextType)();function ie(e){return e.fullscreen().value()?ee:J}class ne extends n.PureComponent{constructor(e,t){super(e,t),this._updateState=()=>{this.setState({icon:ie(this.context.chartWidgetCollection)})},this._handleClick=()=>{const{chartWidgetCollection:e}=this.context;e.fullscreen().value()?e.exitFullscreen():e.startFullscreen()},(0,f.validateRegistry)(t,{chartWidgetCollection:s.any.isRequired}),this.state={icon:ie(this.context.chartWidgetCollection)},this._subscribe()}render(){const{className:e,id:t}=this.props,{icon:i}=this.state;return n.createElement(G.ToolbarIconButton,{id:t,icon:i,onClick:this._handleClick,className:u(e),tooltip:l.t(null,void 0,a(67092)),"data-tooltip-hotkey":te})}componentWillUnmount(){this._unsubscribe()}_subscribe(){this.context.chartWidgetCollection.fullscreen().subscribe(this._updateState)}_unsubscribe(){this.context.chartWidgetCollection.fullscreen().unsubscribe(this._updateState)}}ne.contextType=ae;var se=a(50151),oe=a(16396),le=a(20243),re=a(16638);const he=(0,a(9343).getLogger)("FavoritesInfo");function ce(e){if(0===e.length)return Promise.resolve([]);he.logNormal("Requesting favorites info");const t=[],a=new Map,i=new Map,n=new Map;return e.forEach((e=>{switch(e.type){case"java":n.set(e.studyId,e);break;case"pine":isPublishedPineId(e.pineId)?a.set(e.pineId,e):i.set(e.pineId,e);break;default:(0,se.assert)(!1,`unknown favorite type ${JSON.stringify(e)}`)}})),0!==n.size&&t.push((0,re.studyMetaInfoRepository)().findAllJavaStudies().then((e=>{const t=new Map;for(const a of e)!a.is_hidden_study&&n.has(a.id)&&t.set(a.id,{name:a.description,localizedName:a.description_localized,studyMarketShittyObject:a});return t})).then((e=>{
|
||||
@@ -12,20 +12,20 @@ default:(await Promise.all([a.e(101),a.e(4524),a.e(7939),a.e(9258),a.e(5387),a.e
|
||||
this.setState({isAddIntervalDialogOpened:!0})},this._handleCloseAddIntervalDialog=()=>{this.setState({isAddIntervalDialogOpened:!1})},this._handleGlobalClose=()=>{const{isFake:e}=this.props,{isAddIntervalDialogOpened:t}=this.state;e||t||je.fire()},this._handeQuickClick=e=>{this._handleSelectInterval(e),this._trackClick()},(0,f.validateRegistry)(t,{chartApiInstance:s.any.isRequired,favoriteIntervalsService:s.any.isRequired,intervalService:s.any.isRequired,intervalsMenuViewStateService:s.any.isRequired});const{chartApiInstance:a,favoriteIntervalsService:o,intervalService:l,intervalsMenuViewStateService:h}=t;this._customIntervals=i.enabled("custom_resolutions");const c=r.linking.interval.value(),d=c&&(0,ke.normalizeIntervalString)(c),u=o.get(),m=l.getCustomIntervals(),v=h.get();this._defaultIntervals=a.defaultResolutions().filter(ke.isIntervalEnabled).map(ke.normalizeIntervalString),this.state={isOpenedFormMenu:!1,activeInterval:d,favorites:u,customs:m,menuViewState:v,isAddIntervalDialogOpened:!1}}componentDidMount(){const{favoriteIntervalsService:e,intervalService:t,intervalsMenuViewStateService:a}=this.context;e.getOnChange().subscribe(this,this._handleChangeFavorites),a.getOnChange().subscribe(this,this._handleChangeMenuViewState),t.getOnChange().subscribe(this,this._handleChangeCustoms),r.linking.interval.subscribe(this._handleChangeInterval),r.linking.intraday.subscribe(this._bindedForceUpdate),r.linking.seconds.subscribe(this._bindedForceUpdate),r.linking.ticks.subscribe(this._bindedForceUpdate),r.linking.range.subscribe(this._bindedForceUpdate),r.linking.supportedResolutions.subscribe(this._bindedForceUpdate),r.linking.dataFrequencyResolution.subscribe(this._bindedForceUpdate),Ue.globalCloseDelegate.subscribe(this,this._handleGlobalClose)}componentWillUnmount(){const{favoriteIntervalsService:e,intervalService:t,intervalsMenuViewStateService:a}=this.context;e.getOnChange().unsubscribe(this,this._handleChangeFavorites),a.getOnChange().unsubscribe(this,this._handleChangeMenuViewState),t.getOnChange().unsubscribe(this,this._handleChangeCustoms),r.linking.interval.unsubscribe(this._handleChangeInterval),r.linking.intraday.unsubscribe(this._bindedForceUpdate),r.linking.seconds.unsubscribe(this._bindedForceUpdate),r.linking.ticks.unsubscribe(this._bindedForceUpdate),r.linking.range.unsubscribe(this._bindedForceUpdate),r.linking.supportedResolutions.unsubscribe(this._bindedForceUpdate),r.linking.dataFrequencyResolution.unsubscribe(this._bindedForceUpdate),Ue.globalCloseDelegate.unsubscribe(this,this._handleGlobalClose)}componentDidUpdate(e,t){this.state.lastAddedInterval&&setTimeout((()=>this.setState({lastAddedInterval:void 0})),1600)}render(){const{isShownQuicks:e,id:t}=this.props,{activeInterval:a,customs:i,lastNotQuicked:s,isAddIntervalDialogOpened:o}=this.state,l=this._getQuicks(),r=(0,ke.sortResolutions)([...l]);void 0!==a&&r.includes(a)?void 0!==s&&r.push(s):void 0!==a&&r.push(a);const h=(!(!e||0===l.length)||void 0)&&r.length>1,c={},m=(0,ke.mergeResolutions)(this._defaultIntervals,i)
|
||||
;(void 0!==a?m.concat(a):m).filter(ke.isAvailable).forEach((e=>c[e]=!0));const v=void 0!==a?(0,ke.getTranslatedResolutionModel)(a):null;return n.createElement(p,{id:t},h&&n.createElement(R,{className:Be.group,orientation:"horizontal"},r.map(((e,t)=>{const i=(0,ke.getTranslatedResolutionModel)(e);return n.createElement(S,{key:t,role:"radio",className:u(Be.button,{[Be.first]:0===t,[Be.last]:t===r.length-1}),text:n.createElement(Te,{value:i.mayOmitMultiplier?void 0:i.multiplier,metric:i.shortKind}),hint:i.hint,"aria-checked":a===e,isActive:a===e,isDisabled:!c[e],onClick:this._handeQuickClick,onClickArg:e,"data-value":e})}))),n.createElement(_.MatchMedia,{rule:y.DialogBreakpoints.TabletSmall},(e=>n.createElement(n.Fragment,null,n.createElement(De.CloseDelegateContext.Provider,{value:je},n.createElement(d.ToolbarMenuButton,{arrow:Boolean(h),closeOnClickOutside:!o,content:h||null===v?void 0:n.createElement(p,{className:Be.menuContent},n.createElement(Te,{value:v.mayOmitMultiplier?void 0:v.multiplier,metric:v.shortKind})),hotKey:h?Ke:void 0,className:Be.menu,ref:this._menu,isDrawer:e,onClick:this._trackClick,tooltip:h||null===v?Ze.timeInterval:v.hint,menuReference:this._menuItemsContainerRef,menuRole:"treegrid",drawerReference:this._drawerContainerRef},n.createElement("div",{className:Be.dropdown},this._renderChildren(m,e)))),o&&n.createElement(n.Suspense,{fallback:null},n.createElement(Qe,{onAdd:this._handleAddInterval,onClose:this._handleCloseAddIntervalDialog,onUnmount:this._handleCloseAddIntervalDialog,intervalService:this.context.intervalService,isSmallTablet:e}))))))}_createMenuItems(e,t,a,i){const n=e.map(((e,n,s)=>this._renderResolutionsGroup(e,1===s.length,t,n+1+a,i)));return function(e){let t=!1;return e.filter(((e,a,i)=>{let n=!0;return e.type===C.PopupMenuSeparator&&(0!==a&&a!==i.length-1||(n=!1),t&&(n=!1)),t=e.type===C.PopupMenuSeparator,n}))}([].concat(...n))}_createIntervalItem(e,t){return this._customIntervals?[n.createElement(Ge,{key:"add-dialog","aria-level":1,"aria-posinset":1,"aria-setsize":t,isSmallTablet:e,onClick:this._handleOpenAddIntervalDialog}),n.createElement(C.PopupMenuSeparator,{key:"custom-interval-separator"})]:[]}_renderResolutionsGroup(e,t=!1,a,i,s){const o=[],l=t?1:2,r=e.items.map(((t,i)=>this._renderPopupMenuItem(t,a,i+1,e.items.length,l)));if(t)o.push(...r);else if(a){const t=n.createElement($e,{key:e.id,title:e.name},r);o.push(t)}else{const{intervalsMenuViewStateService:t}=this.context,{menuViewState:a}=this.state;if(!t.isAllowed(e.id))return[];const l=n.createElement(Le,{key:e.id,role:"row","aria-posinset":i,"aria-setsize":s,"aria-level":1,className:Be.section,summary:e.name,open:!a[e.id],onStateChange:this._getHandleSectionStateChange(e.id)},r);o.push(l)}return(!e.mayOmitSeparator||e.items.length>1)&&(o.unshift(n.createElement(C.PopupMenuSeparator,{key:`begin-${e.name}`})),o.push(n.createElement(C.PopupMenuSeparator,{key:`end-${e.name}`}))),o}_handleChangeFavorites(e){this.setState({lastNotQuicked:void 0,favorites:e})}_handleChangeCustoms(e){this.setState({customs:e})}
|
||||
_handleChangeMenuViewState(e){this.setState({menuViewState:e},(()=>{this._menu.current&&this._menu.current.update()}))}_renderPopupMenuItem(e,t,a,i,s){const{isFavoritingAllowed:o}=this.props,{activeInterval:l,lastAddedInterval:r}=this.state,h=e===l,c=(0,ke.isAvailable)(e),d=this._isIntervalFavorite(e),u=this._isIntervalDefault(e),m=(0,ke.getTranslatedResolutionModel)(e);return n.createElement(Ne,{key:e,role:"row","aria-level":s,"aria-posinset":a,"aria-setsize":i,"aria-selected":h,isSmallTablet:t,interval:e,hint:m.hint,isSignaling:r===e,isFavoritingAllowed:o,isDisabled:!c,isFavorite:d,isRemovable:!u,isActive:h,onClick:this._handleSelectInterval,onClickRemove:this._handleRemoveInterval,onClickFavorite:this._handleClickFavorite,scrollContainerRef:t?this._drawerContainerRef:this._menuItemsContainerRef,"data-value":e})}_isIntervalDefault(e){return this._defaultIntervals.includes(e)}_isIntervalFavorite(e){return this.state.favorites.includes(e)}_getQuicks(e){return this.props.isShownQuicks&&"small"!==this.props.displayMode?void 0===e?this.state.favorites:e:[]}_trackClick(){0}}function Ge(e){const{onClick:t,className:i,isSmallTablet:s,...o}=e;return n.createElement(A.AccessibleMenuItem,{...o,key:"add-dialog",role:"row","aria-haspopup":"dialog",className:u(Be.addCustomInterval,!s&&Be.desktop,i),onClick:t,label:(0,Ve.appendEllipsis)(l.t(null,void 0,a(80335))),icon:ze,dontClosePopup:!0})}function $e(e){const{children:t,title:a,className:i}=e;return n.createElement("div",{className:i},n.createElement("div",{className:Be.smallTabletSectionTitle},a),t)}Xe.contextType=qe;var Ye=a(36488),Je=a(82436);const et=(0,f.registryContextType)();class tt extends n.PureComponent{constructor(e,t){super(e,t),this._handleClick=()=>{const{chartWidgetCollection:e,windowMessageService:t,isFundamental:a}=this.context,i=e.activeChartWidget.value();const n=function(){const e=new URL(window.location.href),t=JSON.parse(decodeURIComponent(e.hash.slice(1)));return delete t.show_popup_button,e.hash=`#${encodeURIComponent(JSON.stringify(t))}`,e.toString()}();i.withModel(null,(()=>{t.post(parent,"openChartInPopup",{symbol:i.model().mainSeries().actualSymbol(),interval:i.model().mainSeries().interval(),fundamental:a,url:n})}))},(0,f.validateRegistry)(t,{isFundamental:s.any,chartWidgetCollection:s.any.isRequired,windowMessageService:s.any.isRequired})}render(){const{className:e}=this.props;return n.createElement(G.ToolbarIconButton,{className:u(e,Ye.button),icon:Je,onClick:this._handleClick,tooltip:l.t(null,void 0,a(34770))})}}tt.contextType=et;var at=a(34369);const it=(0,f.registryContextType)();class nt extends n.PureComponent{constructor(e,t){super(e,t),this._updateState=e=>{this.setState({isOpened:e})},this._handleClick=e=>{const{chartWidgetCollection:t}=this.context,a=t.activeChartWidget.value();(0,K.trackEvent)("GUI","Chart Header Toolbar","chart properties"),a.showGeneralChartProperties(void 0,{shouldReturnFocus:(0,q.isKeyboardClick)(e)})},(0,f.validateRegistry)(t,{chartWidgetCollection:s.any.isRequired}),this.state={isOpened:!1},
|
||||
this._propertiesDialogRenderer=this.context.chartWidgetCollection.getChartPropertiesDialogRenderer()}componentDidMount(){this._propertiesDialogRenderer?.visible().subscribe(this._updateState)}componentWillUnmount(){this._propertiesDialogRenderer?.visible().unsubscribe(this._updateState)}render(){const{isOpened:e}=this.state;return n.createElement(G.ToolbarIconButton,{...this.props,icon:at,isOpened:e,onClick:this._handleClick,tooltip:l.t(null,void 0,a(32514))})}}nt.contextType=it;var st=a(26709),ot=a(56616),lt=a(49483),rt=a(40173),ht=a(56127),ct=a(10428),dt=a(17479);(0,rt.mergeThemes)(ct.DEFAULT_MENU_ITEM_SWITCHER_THEME,dt);var ut=a(52464);function mt(e){const{wasChanges:t,isSaving:i,className:s}=e;return n.createElement("span",{className:u(ut.saveString,!t&&!i&&ut.hidden,s)},i?n.createElement(me.Loader,{className:ut.loader,size:"small",staticPosition:!0}):l.t(null,void 0,a(64e3)))}var vt=a(27830),pt=a(36296),gt=a(13090),bt=a(18603),St=a(75394);a(22315);const Ct=i.enabled("widget"),_t=(0,rt.mergeThemes)(L.DEFAULT_TOOL_WIDGET_BUTTON_THEME,St),yt=(0,rt.mergeThemes)(oe.DEFAULT_POPUP_MENU_ITEM_THEME,{shortcut:bt.shortcut,withIcon:bt.withIcon}),wt=((0,rt.mergeThemes)(oe.DEFAULT_POPUP_MENU_ITEM_THEME,{toolbox:bt.toolbox}),(0,rt.mergeThemes)(oe.DEFAULT_POPUP_MENU_ITEM_THEME,{toolbox:bt.toolboxSmall}),l.t(null,void 0,a(40115))),ft=l.t(null,void 0,a(26276)),kt=[],Et=(0,$.hotKeySerialize)({keys:[(0,Y.humanReadableModifiers)(Y.Modifiers.Mod,!1),"S"],text:"{0} + {1}"}),Mt=()=>null;class Tt extends n.PureComponent{constructor(e){super(e),this._copyElRef=n.createRef(),this._menuRef=n.createRef(),this._handleCopyLinkClick=()=>Promise.resolve(),this._handleCloneClick=()=>{this.props.onCloneChart?.()},this._handleSaveClick=()=>{this.props.onSaveChart?.(),this._trackClick()},this._handleSaveAsClick=()=>{this.props.onSaveAsChart?.()},this.state={isSaving:!1}}componentDidUpdate(e,t){e.isProcessing&&!this.props.isProcessing&&(clearTimeout(this._timeout),this._timeout=void 0,this.setState({isSaving:!1})),!e.recentItems?.length&&this.props.recentItems?.length&&this._menuRef.current?.update(),!e.isProcessing&&this.props.isProcessing&&(this._timeout=setTimeout((()=>{this.setState({isSaving:!0})}),1e3))}componentWillUnmount(){this._timeout&&clearTimeout(this._timeout)}render(){const{id:e,isReadOnly:t,displayMode:i,isProcessing:s,title:r,wasChanges:h,hideMenu:c,isTabletSmall:m,onOpenMenu:v,dataNameSaveMenu:g,isSaveDialogOpened:b,chartList:S,favorites:C,showRemoveFavoriteHint:_,onButtonClick:y,onAdditionalButtonClick:w}=this.props,f=!t&&!c;let k=[];vt.showFavoriteLayouts&&S&&C&&(k=S.filter((e=>C[e.id])).sort(((e,t)=>e.name.localeCompare(t.name))));const E=!(h||!r||this.state.isSaving),M=n.createElement("div",{className:bt.textWrap},n.createElement("span",{className:bt.text},n.createElement(ht.LeadingEmojiText,{text:r||l.t(null,void 0,a(64e3))})),n.createElement(mt,{isSaving:this.state.isSaving,wasChanges:h}));return n.createElement(p,null,t?n.createElement(p,null,n.createElement(Z,{id:e,displayMode:i,icon:n.createElement(o.Icon,{icon:pt}),
|
||||
isDisabled:s,onClick:this._handleCloneClick,text:l.t(null,void 0,a(49680)),collapseWhen:kt,tooltip:wt})):n.createElement(p,null,n.createElement(Z,{id:e,className:u(bt.button,f&&bt.buttonSmallPadding),displayMode:i,"aria-disabled":!!E||void 0,isDisabled:s,onClick:E?void 0:this._handleSaveClick,text:M,theme:_t,collapseWhen:kt,isOpened:b,tooltip:E?l.t(null,void 0,a(89771)):l.t(null,void 0,a(15356)),"data-tooltip-hotkey":Ct||E?"":Et}),f&&n.createElement("div",{className:bt.menuBtnWrap},n.createElement(d.ToolbarMenuButton,{"data-name":g,arrow:!0,ref:this._menuRef,isDrawer:m,drawerPosition:"Bottom",onClick:this._trackClick,onOpen:v,tooltip:l.t(null,void 0,a(38973)),menuClassName:u(!m&&bt.menu),menuRole:"grid"},this._renderMenuItems(Boolean(m))),vt.showFavoriteLayouts&&_&&k.length>FAVORITE_LAYOUTS_LIMIT&&n.createElement(n.Suspense,{fallback:null},n.createElement(Mt,{onClick:y,onAdditionalClick:w,placement:"auto",theme:undefined,buttonSize:"small",saveHintStateByClick:!1,text:l.t(null,{count:k.length,plural:"Your favorite layouts have moved to the top toolbar. You currently have {count} favorites. You can reduce the number to find them easier — unfavorite all in just one click or set up your choice manually.",replace:{count:k.length.toString()}},a(6094)),buttonText:l.t(null,void 0,a(66418)),additionalButtonText:l.t(null,void 0,a(36291)),settingsHintKey:"hint.favoriteLayouts",placeHolderClassName:bt.hintPlaceholder,hideWithReference:!0,hintStateHandler:favoriteLayoutsHintStateHandler}))),!1))}_renderMenuItems(e){const{wasChanges:t,isProcessing:i,chartId:s,onSaveChartFromMenu:o,onRenameChart:r,onLoadChart:h,onNewChart:c,isAutoSaveEnabled:d,autoSaveId:m,sharingId:v,onAutoSaveChanged:p,isSharingEnabled:g,onSharingChanged:b,recentItems:S,onExportData:_,isAuthenticated:y,favorites:f}=this.props,k=e?w.multilineLabelWithIconAndToolboxTheme:yt,E=e?void 0:(0,Y.humanReadableHash)(Y.Modifiers.Mod+83),M=e?void 0:l.t(null,{context:"hotkey"},a(23821)),T=[];return T.push(n.createElement(A.AccessibleMenuItem,{key:"save",role:"row",isDisabled:Boolean(i||!t&&s),label:ft,onClick:o,shortcut:E,labelRowClassName:u(e&&bt.popupItemRowTabletSmall),theme:k,"data-name":"save-load-menu-item-save"})),void 0!==s&&T.push(n.createElement(A.AccessibleMenuItem,{key:"rename",role:"row",icon:void 0,label:(0,Ve.appendEllipsis)(l.t(null,void 0,a(6321))),onClick:r,labelRowClassName:u(e&&bt.popupItemRowTabletSmall),theme:k,"data-name":"save-load-menu-item-rename","aria-haspopup":"dialog"}),n.createElement(A.AccessibleMenuItem,{key:"save-as",role:"row",icon:void 0,label:(0,Ve.appendEllipsis)(wt),onClick:this._handleSaveAsClick,labelRowClassName:u(e&&bt.popupItemRowTabletSmall),theme:k,"data-name":"save-load-menu-item-clone","aria-haspopup":"dialog"})),T.push(n.createElement(C.PopupMenuSeparator,{key:"all-layouts-separator"}),n.createElement(A.AccessibleMenuItem,{key:"all-layouts",role:"row",className:"js-save-load-menu-item-load-chart",label:(0,Ve.appendEllipsis)(l.t(null,void 0,a(65433))),onClick:h,icon:gt,labelRowClassName:u(e&&bt.popupItemRowTabletSmall),theme:k,
|
||||
shortcut:M,"data-name":"save-load-menu-item-load","aria-haspopup":"dialog"})),T}_trackClick(){0}}const xt=(0,f.registryContextType)();class It extends n.PureComponent{constructor(e,t){super(e,t),this._exportDialogPromise=null,this._recentLayoutsAbortController=null,this._requestRecentLayouts=()=>{this._recentLayoutsAbortController?.abort()},this._updateState=e=>{this.setState((t=>({...t,...e})))},this._handleExportData=()=>{0},this._onSaveDialogVisibleChange=e=>{this.setState({isSaveDialogOpened:e})},this._syncState=e=>{this.setState(e)},this._handleAdditionalButton=()=>{const{loadChartService:e}=this.context;e.deleteAllFavorites()},this._onChangeHasChanges=e=>{this.state.wasChanges!==e&&this.setState({wasChanges:e})},this._onChangeAutoSaveEnabled=e=>{0},this._onChangeSharingEnabled=e=>{this.setState({isSharingEnabled:e})},this._onChangeTitle=e=>{this.setState({title:e})},this._onChangeId=e=>{this.setState({id:e})},this._onChartAboutToBeSaved=()=>{this.setState({isProcessing:!0})},this._onChartSaved=()=>{this.setState({isProcessing:!1})},this._handleAutoSaveEnabled=e=>{0},this._handleSharingEnabled=e=>{0},this._handleClickSave=()=>{this.context.saveChartService.saveChartOrShowTitleDialog(),this._trackEvent("Save click")},this._handleOpenMenu=()=>{this._requestRecentLayouts()},this._handleClickSaveFromMenu=()=>{this.context.saveChartService.saveChartOrShowTitleDialog(),this._trackEvent("Save From Menu")},this._handleClickClone=()=>{this.context.saveChartService.cloneChart()},this._handleClickSaveAs=()=>{this.context.saveChartService.saveChartAs(),this._trackEvent("Make a copy")},this._handleClickNew=()=>{this._trackEvent("New chart layout")},this._handleClickLoad=()=>{this.context.loadChartService.showLoadDialog()},this._handleHotkey=()=>{this.context.loadChartService.showLoadDialog()},this._handleClickRename=()=>{this.context.saveChartService.renameChart(),this._trackEvent("Rename")},(0,f.validateRegistry)(t,{chartWidgetCollection:s.any.isRequired,chartChangesWatcher:s.any.isRequired,saveChartService:s.any.isRequired,sharingChartService:s.any,loadChartService:s.any.isRequired});const{chartWidgetCollection:a,chartChangesWatcher:i,saveChartService:n,sharingChartService:o,loadChartService:l}=t;this._loadChartServiceState=l.state(),this.state={isAuthenticated:window.is_authenticated,isProcessing:!1,id:a.metaInfo.id.value(),title:a.metaInfo.name.value(),wasChanges:i.hasChanges(),iconHovered:!1,isSaveDialogOpened:!1,...this._loadChartServiceState.value()}}componentDidMount(){const{chartSaver:e,isFake:t,stateSyncEmitter:i}=this.props,{chartWidgetCollection:n,chartChangesWatcher:s,saveChartService:o,sharingChartService:r,loadChartService:h}=this.context;t?i.on("change",this._syncState):(s.getOnChange().subscribe(this,this._onChangeHasChanges),n.metaInfo.name.subscribe(this._onChangeTitle),n.metaInfo.id.subscribe(this._onChangeId),this._hotkeys=(0,st.createGroup)({desc:"Save/Load"}),this._hotkeys.add({desc:l.t(null,void 0,a(29517)),handler:this._handleHotkey,hotkey:190}),e.chartSaved().subscribe(this,this._onChartSaved),
|
||||
e.chartAboutToBeSaved().subscribe(this,this._onChartAboutToBeSaved),window.loginStateChange.subscribe(this,this._onLoginStateChange),this.context.saveChartService.getCreateController().visible().subscribe(this._onSaveDialogVisibleChange),this._loadChartServiceState.subscribe(this._updateState),vt.showFavoriteLayouts&&h.refreshChartList())}componentDidUpdate(e,t){this.props.isFake||t!==this.state&&this.props.stateSyncEmitter.emit("change",this.state)}componentWillUnmount(){const{chartSaver:e,isFake:t,stateSyncEmitter:a}=this.props,{chartWidgetCollection:i,chartChangesWatcher:n,saveChartService:s,sharingChartService:o}=this.context;t?a.off("change",this._syncState):(n.getOnChange().unsubscribe(this,this._onChangeHasChanges),i.metaInfo.name.unsubscribe(this._onChangeTitle),i.metaInfo.id.unsubscribe(this._onChangeId),(0,se.ensureDefined)(this._hotkeys).destroy(),e.chartSaved().unsubscribe(this,this._onChartSaved),e.chartAboutToBeSaved().unsubscribe(this,this._onChartAboutToBeSaved),window.loginStateChange.unsubscribe(this,this._onLoginStateChange),this._recentLayoutsAbortController?.abort(),this.context.saveChartService.getCreateController().visible().unsubscribe(this._onSaveDialogVisibleChange),this._loadChartServiceState.unsubscribe(this._updateState))}render(){const{isReadOnly:e,displayMode:t,id:a,isFake:i}=this.props,{isProcessing:s,isAuthenticated:o,title:l,id:r,wasChanges:h,isAutoSaveEnabled:c,isSharingEnabled:d,isSaveDialogOpened:u,favorites:m,chartList:v,recents:p}=this.state,g={displayMode:t,isReadOnly:e,isAuthenticated:o,isProcessing:s,wasChanges:h,title:l,id:a,isSaveDialogOpened:u,favorites:m,chartList:v,chartId:null!==r?r:void 0,dataNameSaveMenu:i?void 0:"save-load-menu",showRemoveFavoriteHint:!i,onCloneChart:this._handleClickClone,onSaveChart:this._handleClickSave,onSaveChartFromMenu:this._handleClickSaveFromMenu,onRenameChart:this._handleClickRename,onSaveAsChart:this._handleClickSaveAs,onLoadChart:this._handleClickLoad,onButtonClick:this._handleClickLoad,onAdditionalButtonClick:this._handleAdditionalButton};return n.createElement(_.MatchMedia,{rule:y.DialogBreakpoints.TabletSmall},(e=>n.createElement(Tt,{...g,isTabletSmall:e})))}_onLoginStateChange(){const e=window.is_authenticated;this.setState({isAuthenticated:e}),vt.showFavoriteLayouts&&this.context.loadChartService.refreshChartList()}_trackEvent(e){0}}It.contextType=xt;var Rt=a(7986),At=a(52388),Nt=a(13665);const Ft=new At.DateTimeFormatter({dateTimeSeparator:"_",timeFormat:"%h-%m-%s"}),Ht={takeSnapshot:l.t(null,void 0,a(87972))},Ot=(0,f.registryContextType)();var Dt=a(75774);function Ut(e,t,i){return async function(e,t,i){const n=URL.createObjectURL(new Blob([`<!doctype html><html style="background-color:${getComputedStyle(document.documentElement).backgroundColor}"><head><meta charset="utf-8"><title>${l.t(null,void 0,a(93292))}</title></head><body style="background-color:${getComputedStyle(document.body).backgroundColor}"></body></html>`],{type:"text/html"}));try{Dt.isIOS&&await new Promise((e=>setTimeout(e)));const a=open(n,t,i)
|
||||
;if(!a)throw new Error("cound not open a new tab");const s=await e.catch((()=>{}));void 0!==s?a.location.replace(s):a.close()}finally{URL.revokeObjectURL(n)}}(e,t,i)}var Wt=a(7372),Pt=a(21569);function Lt(e){const t=u(e.isLoading&&Pt.hidden),a=u(!e.isLoading&&Pt.hidden);return n.createElement("div",null,n.createElement("span",{className:t},e.children),n.createElement("span",{className:a},n.createElement(me.Loader,null)))}var Vt=a(76974),Bt=a(67487),zt=a(1457),Zt=a(23595),Kt=a(29414),qt=a(99280),jt=a(63295);const Qt=(0,rt.mergeThemes)(oe.DEFAULT_POPUP_MENU_ITEM_THEME,jt);function Xt(e){const{serverSnapshot:t,clientSnapshot:i,hideShortcuts:s}=e,[o,r]=(0,n.useState)(!1),[h,c]=(0,n.useState)(!1),[d,m]=(0,n.useState)(!1),[v,p]=(0,n.useState)(!1),[g,b]=(0,n.useState)(!1),S=(0,Vt.useIsMounted)(),C=(0,n.useCallback)((async()=>{const e=i(),t=e.then((e=>new Promise((t=>e.canvas.toBlob((e=>{null!==e&&t(e)}))))));try{await(0,ot.writePromiseUsingApi)(t,"image/png"),be.emit("onClientScreenshotCopiedToClipboard")}catch(t){const{canvas:a}=await e;window.open()?.document.write(`<img width="100%" src="${a.toDataURL()}"/>`)}}),[i]),_=(0,n.useCallback)((async()=>{const e=await i(),t=await function(e){return new Promise((t=>{try{e.canvas.toBlob((e=>{if(null===e)throw new Error("Unable to generate blob");t(URL.createObjectURL(e))}))}catch{t(e.canvas.toDataURL())}}))}(e);t&&(0,Wt.downloadFile)(`${e.name}.png`,t)}),[i]),y=e=>Ut(e.then((e=>e.imageUrl))),w=(0,n.useCallback)((async(e=!1)=>{const a=t();try{if(e)await y(a);else{const e=a.then((e=>new Blob([e.imageUrl],{type:"text/plain"})));await(0,ot.writePromiseUsingApi)(e,"text/plain"),be.emit("onServerScreenshotCopiedToClipboard")}return!0}catch(e){return y(a),!0}finally{S.current&&(c(!1),r(!1),(0,Ue.globalCloseMenu)())}}),[t]),f=((0,n.useCallback)((async()=>{const e=t();try{const t=720,a=e.then((async e=>{const a=await snapshoter().getSnapshot(e.symbol,new Set(["description"])),i="error"!==a.status?a.values.description:e.symbol,n=e.imageUrl.match(/\/x\/([0-9a-zA-Z]{8})/)?.[1]??"",s=createSnapshotImageUrls(n)?.url;return new Blob([`<img width="${t}" loading="lazy" src="${s}"/><p><a href="https://www.tradingview.com${getSymbolPagePath({shortName:e.symbol})}">${i} chart</a> by TradingView</p>`],{type:"text/plain"})}));return await(0,ot.writePromiseUsingApi)(a,"text/plain"),be.emit("onServerScreenshotEmbedCodeCopiedToClipboard"),!0}catch(t){return y(e),!0}finally{S.current&&(m(!1),(0,Ue.globalCloseMenu)())}}),[t]),(0,n.useCallback)((async()=>{p(!0);const[e,i]=await Promise.all([a.e(4665).then(a.bind(a,66921)),t()]);e.Twitter.shareSnapshotInstantly(i.symbol,i.imageUrl),S.current&&(p(!1),(0,Ue.globalCloseMenu)())}),[t]));return n.createElement(n.Fragment,null,n.createElement(ge.ToolWidgetMenuSummary,null,l.t(null,void 0,a(58425))),n.createElement(A.AccessibleMenuItem,{role:"row","data-name":"save-chart-image",label:l.t(null,void 0,a(26200)),icon:Zt,onClick:_,shortcut:s?void 0:(0,Y.humanReadableHash)(Y.Modifiers.Mod+Y.Modifiers.Alt+83),theme:Qt}),n.createElement(A.AccessibleMenuItem,{role:"row",
|
||||
"data-name":"copy-chart-image",label:l.t(null,void 0,a(96554)),icon:zt,onClick:C,shortcut:s?void 0:(0,Y.humanReadableHash)(Y.Modifiers.Mod+Y.Modifiers.Shift+83),theme:Qt}),!(0,lt.onWidget)()&&n.createElement(A.AccessibleMenuItem,{role:"row","data-name":"copy-link-to-the-chart-image",label:n.createElement(Lt,{isLoading:o},l.t(null,void 0,a(81939))),icon:Kt,onClick:()=>{r(!0),w(!1)},dontClosePopup:!0,isDisabled:o,shortcut:s?void 0:(0,Y.humanReadableHash)(Y.Modifiers.Alt+83),className:u(o&&jt.loading),theme:Qt}),!1,!(0,lt.onWidget)()&&!(0,lt.isSymphonyEmbed)()&&n.createElement(A.AccessibleMenuItem,{role:"row","data-name":"open-image-in-new-tab",label:n.createElement(Lt,{isLoading:h},l.t(null,void 0,a(19159))),icon:qt,onClick:()=>{c(!0),w(!0)},dontClosePopup:!0,isDisabled:h,className:u(h&&jt.loading),theme:Qt}),!(0,lt.onWidget)()&&!(0,lt.isSymphonyEmbed)()&&n.createElement(A.AccessibleMenuItem,{role:"row","data-name":"tweet-chart-image",label:n.createElement(Lt,{isLoading:v},l.t(null,void 0,a(28239))),icon:Bt,onClick:f,dontClosePopup:!0,isDisabled:v,className:u(v&&jt.loading),theme:Qt}),!1)}var Gt=a(84015);function $t(e){const[t,a]=(0,n.useState)(!1),i=(0,Vt.useIsMounted)(),s=(0,n.useCallback)((async()=>{a(!0),await e.serverSnapshot(),i.current&&a(!1)}),[e.serverSnapshot]);return n.createElement(L.ToolWidgetButton,{id:e.id,className:e.className,isDisabled:t,onClick:s,title:e.tooltip,icon:e.icon})}var Yt=a(72644);const Jt=(ea=function(e){return(0,Gt.isOnMobileAppPage)("any")?n.createElement($t,{...e,icon:Yt}):n.createElement(d.ToolbarMenuButton,{content:n.createElement(L.ToolWidgetButton,{tag:"div",id:e.id,className:e.className,icon:Yt}),drawerPosition:"Bottom",drawerBreakpoint:y.DialogBreakpoints.TabletSmall,arrow:!1,onClick:function(){},tooltip:e.tooltip,menuRole:"grid"},n.createElement(Xt,{...e}))},(ta=class extends n.PureComponent{constructor(e,t){super(e,t),this._clientSnapshot=async()=>{const e=this.context.chartWidgetCollection.activeChartWidget.value().model().mainSeries().actualSymbol();return{canvas:await this.context.chartWidgetCollection.clientSnapshot(),name:`${(0,Nt.shortName)(e)}_${Ft.formatLocal(new Date)}`}},this._serverSnapshot=async()=>{const e=this.context.chartWidgetCollection.activeChartWidget.value().model().mainSeries().actualSymbol(),t=await this.context.chartWidgetCollection.takeScreenshot(),a=void 0!==this.context.snapshotUrl?t:(0,Rt.convertImageNameToUrl)(t);return{symbol:(0,Nt.shortName)(e),imageUrl:a}},(0,f.validateRegistry)(t,{chartWidgetCollection:s.any.isRequired})}render(){const{className:e,id:t}=this.props;return n.createElement(ea,{id:t,className:e,tooltip:Ht.takeSnapshot,serverSnapshot:this._serverSnapshot,clientSnapshot:this._clientSnapshot})}}).contextType=Ot,ta);var ea,ta,aa=a(79652),ia=a(39362),na=a(50340);class sa{async show(e){if(null!==sa._provider){const e=await sa._provider.getSymbol();return r.linking.setSymbolAndLogInitiator(e.symbol,"symbol search UI"),e}if(sa._currentShowingInstance)throw new DOMException("SymbolSearchUI is already shown","InvalidStateError");try{
|
||||
sa._currentShowingInstance=this,sa.preload();const t=await sa._implementation;return(0,se.assert)(null!==t),new Promise((a=>{t.showDefaultSearchDialog({...e,onSearchComplete:e=>{a({symbol:e})}})}))}finally{sa._currentShowingInstance=null}}static setProvider(e){this._provider=e}static preload(){null===this._provider&&null===this._implementation&&(this._implementation=(0,na.loadNewSymbolSearch)())}}sa._currentShowingInstance=null,sa._provider=null,sa._implementation=null;var oa=a(29142),la=a(92876);const ra=(0,rt.mergeThemes)(g.DEFAULT_TOOLBAR_BUTTON_THEME,la),ha=(0,f.registryContextType)();class ca extends n.PureComponent{constructor(e,t){super(e,t),this._openSymbolSearchDialog=async e=>{if((0,Y.modifiersFromEvent)(e)===Y.Modifiers.Alt)return void(0,ot.getClipboard)().writeText(this.state.symbol);if(this.state.isOpened)return;const{chartWidgetCollection:t}=this.context,s=t?.activeChartWidget.value().model().model(),o=s?.mainSeries().symbolInfo(),r="option"===o?.type;try{(0,K.trackEvent)("GUI","SS","main search");let t=this._isSpread(this.state.symbol)?this.state.symbol:this.state.shortName;if(i.enabled("symbol_search_option_chain_selector")&&r){const e=await resolveUnderlyingSymbol(this.state.symbol);e&&(t={type:"option",value:this.state.symbol,underlying:e})}await(new sa).show({trackResultsOptions:{trackResults:!1,emptySearchType:"empty_result__supercharts"},onClose:()=>{this.setState({isOpened:!1})},onOpen:()=>{this.setState({isOpened:!0})},shouldReturnFocus:(0,q.isKeyboardClick)(e),defaultValue:t,showSpreadActions:(0,aa.canShowSpreadActions)()&&this.props.isActionsVisible,source:"searchBar",enableOptionsChain:i.enabled("symbol_search_option_chain_selector"),footer:Ie.mobiletouch?void 0:n.createElement(ia.SymbolSearchDialogFooter,null,l.t(null,void 0,a(50021)))})}catch(e){}},this._isSpread=e=>!1,this._onSymbolChanged=()=>{const e=r.linking.proSymbol.value();this.setState({symbol:e,shortName:da(e)})},(0,f.validateRegistry)(t,{chartWidgetCollection:s.any.isRequired}),this.state={symbol:r.linking.proSymbol.value(),shortName:da(r.linking.proSymbol.value()),isOpened:!1}}componentDidMount(){r.linking.proSymbol.subscribe(this._onSymbolChanged),sa.preload()}componentWillUnmount(){r.linking.proSymbol.unsubscribe(this._onSymbolChanged)}render(){const{id:e,className:t}=this.props;return n.createElement(g.ToolbarButton,{id:e,className:m()(t,i.enabled("uppercase_instrument_names")&&la.uppercase,la.smallLeftPadding),theme:ra,icon:oa,isOpened:this.state.isOpened,text:this.state.shortName,onClick:this._openSymbolSearchDialog,tooltip:l.t(null,void 0,a(51165))})}async _updateQuotes(e){}}function da(e){return function(e){return e.includes(":")?e.split(":"):["",e]}(e)[1]}ca.contextType=ha;var ua=a(75313);function ma(e){return n.createElement("div",{className:u(ua.description,e.className)},e.children)}var va=a(6917);const pa=(0,rt.mergeThemes)(oe.DEFAULT_POPUP_MENU_ITEM_THEME,{labelRow:va.labelRow,toolbox:va.toolbox,item:va.titleItem}),ga=(0,rt.mergeThemes)(oe.DEFAULT_POPUP_MENU_ITEM_THEME,{labelRow:va.labelRow,toolbox:va.toolbox,
|
||||
item:va.titleItemTabletSmall}),ba=(0,rt.mergeThemes)(oe.DEFAULT_POPUP_MENU_ITEM_THEME,{item:va.item}),Sa=(0,rt.mergeThemes)(oe.DEFAULT_POPUP_MENU_ITEM_THEME,{item:va.itemTabletSmall});function Ca(e){const{role:t,className:a,item:i,description:s,favorite:o,isFavoritingAllowed:l,isTabletSmall:r,onApply:h,onRemove:c,onFavor:d,isActive:u,descriptionDataName:v,...p}=e,g=p,[b,S]=(0,xe.useHover)(),C=r?ga:pa,_=r?Sa:ba,y=(0,n.useCallback)((()=>h(i)),[h,i]),w=(0,n.useCallback)((e=>c(i,e)),[c,i]),f=(0,n.useCallback)((()=>{d&&d(i)}),[d,i]);return n.createElement("div",{...S,...g,className:m()(a,va.wrap)},n.createElement(A.AccessibleMenuItem,{role:t,theme:C,label:n.createElement(ht.LeadingEmojiText,{text:i.name}),labelRowClassName:m()(r&&va.itemLabelTabletSmall),isHovered:b,showToolboxOnHover:!o&&!b,showToolboxOnFocus:!0,onClick:y,isActive:u,toolbox:n.createElement(n.Fragment,null,!i.isDefault&&n.createElement(Re.MenuRemoveButton,{key:"remove",hidden:!Ie.touch&&!b,onClick:w,className:m()(va.remove,u&&va.active)}),Boolean(d)&&l&&n.createElement(N.MenuFavoriteButton,{key:"favorite",isFilled:Boolean(o),onClick:f}))}),s&&n.createElement(oe.PopupMenuItem,{theme:_,label:n.createElement(ma,{className:m()(va.description,r&&va.descriptionTabletSmall)},s),onClick:y,isHovered:b,isActive:u,"data-name":v}))}var _a=a(76032);function ya(e){const{item:t}=e,a={...t,isDefault:t.is_default},i={"data-name":t.name,"data-id":t.id,"data-is-default":Boolean(t.is_default)},s=t.meta_info,o=s?(0,_a.getStudyTemplateDescString)(s.indicators):void 0;return n.createElement(Ca,{...e,...i,description:o,item:a})}var wa=a(97357);const fa=(0,rt.mergeThemes)(oe.DEFAULT_POPUP_MENU_ITEM_THEME,wa);function ka(e){const{onClick:t,isTabletSmall:a,className:i,icon:s,title:l,...r}=e;return n.createElement(A.AccessibleMenuItem,{...r,theme:fa,className:m()(i,wa.wrap),label:n.createElement("div",{className:wa.titleWrap},n.createElement("div",{className:m()(wa.title,a&&wa.titleTabletSmall)},n.createElement(o.Icon,{className:wa.icon,icon:s}),n.createElement("div",{className:wa.text},l))),onClick:t})}var Ea=a(36947),Ma=a(64706);const Ta=n.createContext(null),xa=!1;var Ia=a(53707),Ra=a(72154);function Aa(e){const{templates:t,recents:i,onTemplateSave:s,onTemplateRemove:o,onTemplateSelect:r,onTemplateFavorite:h,isTabletSmall:c,isLoading:d,onOpenTemplatesDialog:u}=e,v=(0,n.useMemo)((()=>t.filter((e=>e.is_default))),[t]),p=(0,n.useMemo)((()=>t.filter((e=>!e.is_default))),[t]),g=(0,n.useContext)(Ta),b=(0,n.useContext)(Ma.MenuContext),S=(0,Ea.useForceUpdate)();(0,n.useEffect)((()=>{if(null!==g){const e={};return g.getOnChange().subscribe(e,(()=>{S(),b&&b.update()})),()=>g.getOnChange().unsubscribeAll(e)}return()=>{}}),[]);const _=(e,t)=>n.createElement(ya,{key:e.name,role:"row",item:e,isFavoritingAllowed:Boolean(h),favorite:null!==e.favorite_date,onApply:r,onFavor:h,onRemove:o,isTabletSmall:c,"data-group-name":t});return n.createElement("div",{role:"treegrid",className:m()(Ra.menu,c&&Ra.menuSmallTablet)},n.createElement(ka,{role:"row",onClick:s,isTabletSmall:c,icon:Ia,title:(0,
|
||||
Ve.appendEllipsis)(l.t(null,void 0,a(26869))),"aria-haspopup":"dialog"}),d&&n.createElement(n.Fragment,null,n.createElement(C.PopupMenuSeparator,null),n.createElement(pe,null)),!d&&(c?n.createElement(Na,{defaults:v,customs:p,recents:i,render:_}):n.createElement(Fa,{defaults:v,customs:p,recents:i,render:_,state:g})),xa)}function Na(e){const{defaults:t,customs:i,recents:s,render:o}=e;return n.createElement(n.Fragment,null,i.length>0&&n.createElement(n.Fragment,null,n.createElement(C.PopupMenuSeparator,null),n.createElement(ge.ToolWidgetMenuSummary,{className:Ra.menuItemHeaderTabletSmall},l.t(null,void 0,a(83300))),i.map((e=>o(e)))),t.length>0&&n.createElement(n.Fragment,null,n.createElement(C.PopupMenuSeparator,null),n.createElement(ge.ToolWidgetMenuSummary,{className:Ra.menuItemHeaderTabletSmall},l.t(null,void 0,a(46838))),t.map((e=>o(e)))))}function Fa(e){const{defaults:t,customs:i,recents:s,render:o,state:r}=e;return n.createElement(n.Fragment,null,i.length>0&&n.createElement(n.Fragment,null,n.createElement(C.PopupMenuSeparator,null),n.createElement(ge.ToolWidgetMenuSummary,{className:Ra.menuItemHeader},l.t(null,void 0,a(83300))),i.map((e=>o(e)))),i.length>0&&t.length>0&&r&&n.createElement(n.Fragment,null,n.createElement(C.PopupMenuSeparator,null),n.createElement(Le,{role:"row",summary:l.t(null,void 0,a(46838)),open:!r.get().defaultsCollapsed,onStateChange:e=>r.set({defaultsCollapsed:!e})},t.map((e=>o(e))))),0===i.length&&t.length>0&&n.createElement(n.Fragment,null,n.createElement(C.PopupMenuSeparator,null),n.createElement(ge.ToolWidgetMenuSummary,{className:Ra.menuItemHeader},l.t(null,void 0,a(46838))),t.map((e=>o(e)))))}var Ha=a(64147),Oa=a(39076);class Da{constructor(e,t){this._isFavoriteEnabled=i.enabled("items_favoriting"),this.handleFavorTemplate=e=>{if(!this._isFavoriteEnabled)return;const{id:t,is_default:a,favorite_date:i}=e;null!==i?this._removeFavoriteTemplate(t,a):this._addFavoriteTemplate(t,a)},this.handleDropdownOpen=()=>{this._setState({isLoading:!0}),this._studyTemplates.invalidate(),this._studyTemplates.refreshStudyTemplateList((()=>this._setState({isLoading:!1})))},this.handleApplyTemplate=e=>{this._studyTemplates.applyTemplate(e.name),this._recentStudyTemplatesService&&this._recentStudyTemplatesService.add(e.id)},this.handleRemoveTemplate=(e,t,a)=>{this._studyTemplates.deleteStudyTemplate(e.name,t,a)},this.handleSaveTemplate=e=>{this._studyTemplates.showSaveAsDialog(e)},this._studyTemplates=e,this._recentStudyTemplatesService=t;const a=this._recentStudyTemplatesService?.get()||[],n=this._studyTemplates.list();this._state=new Ha.WatchedValue({isLoading:!1,studyTemplatesList:n,recents:a}),this._studyTemplates.getOnChange().subscribe(this,this._handleTemplatesChange),this._recentStudyTemplatesService?.getOnChange().subscribe(this,this._handleRecentsChange),this._studyTemplates.refreshStudyTemplateList()}destroy(){this._studyTemplates.getOnChange().unsubscribe(this,this._handleTemplatesChange),this._recentStudyTemplatesService?.getOnChange().unsubscribe(this,this._handleRecentsChange)}state(){
|
||||
return this._state.readonly()}getSortedFavoritesStudyTemplates(e){return e.filter((e=>null!==e.favorite_date)).sort(((e,t)=>null!==e.favorite_date&&null!==t.favorite_date&&e.favorite_date>t.favorite_date?1:-1))}getValidRecents(e){const t=e.reduce(((e,t)=>(e[t.id]=t,e)),{});return this._state.value().recents.map((e=>t[e])).filter((e=>void 0!==e))}_setState(e){this._state.setValue({...this._state.value(),...e})}_handleTemplatesChange(){this._setState({studyTemplatesList:this._studyTemplates.list()})}_handleRecentsChange(){this._setState({recents:this._recentStudyTemplatesService?.get()||[]})}_removeFavoriteTemplate(e,t){const a=t?Oa.backend.favorStandardStudyTemplate:Oa.backend.favorStudyTemplate;this._replaceOldFavoriteStudyTemplate(e,null,t),a(e,!1)}_addFavoriteTemplate(e,t){const a=this.getSortedFavoritesStudyTemplates(this._state.value().studyTemplatesList),i=a.length?a[a.length-1].favorite_date:0,n=window.is_authenticated?Date.now():i+1,s=t?Oa.backend.favorStandardStudyTemplate:Oa.backend.favorStudyTemplate;this._replaceOldFavoriteStudyTemplate(e,n,t),s(e,!0)}_replaceOldFavoriteStudyTemplate(e,t,a){const i=this._state.value().studyTemplatesList.map((i=>i.id===e&&i.is_default===a?{...i,favorite_date:t}:i));this._setState({studyTemplatesList:i})}}var Ua=a(63472),Wa=a(66114);function Pa(e){const{className:t,children:a,item:i,onApply:s,isActive:o,href:l,target:r}=e,h=i.name??" ",[c,d]=(0,P.useRovingTabindexElement)(null),m=l?"a":s?"button":"div",v=i.tooltip??h,p=(0,Ua.getLeadingEmojiHtml)(v);return n.createElement(m,{ref:c,type:s&&!l?"button":void 0,className:u(t,Wa.item,Wa.accessible,"apply-common-tooltip","common-tooltip-html"),onClick:function(e){if(e.stopPropagation(),s&&l){if((0,T.modifiersFromEvent)(e)!==T.Modifiers.None||1===e.button)return;e.preventDefault()}s?.(i)},onKeyDown:"a"===m?function(e){32===(0,T.hashFromEvent)(e)&&(e.preventDefault(),c.current?.click())}:void 0,"data-tooltip":p,"aria-label":v,tabIndex:d,href:"a"===m?l:void 0,target:"a"===m?r:void 0},n.createElement("div",{className:u(Wa.round,o&&Wa.active)},a||n.createElement(ht.LeadingEmojiText,{text:h,firstSegmentOnly:!0})))}var La=a(21233),Va=a(88506);const Ba=(0,f.registryContextType)();class za extends n.PureComponent{constructor(e,t){super(e,t),this._updateState=e=>{this.setState({...e,isActive:this.state.isActive})},this._handleApplyTemplate=e=>{this._handleClose(),this._model.handleApplyTemplate(e)},this._handleRemoveTemplate=(e,t,a)=>{this._handleClose(),this._model.handleRemoveTemplate(e,t,a)},this._handleClose=()=>{this._handleToggleDropdown(!1)},this._handleToggleDropdown=e=>{const{isActive:t}=this.state,a="boolean"==typeof e?e:!t;this.setState({isActive:a})},this._handleOpenTemplatesDialog=()=>{isNewTemplatesViewEnabled&&showIndicatorTemplatesDialog(this._model)},(0,f.validateRegistry)(t,{studyTemplates:s.any.isRequired,templatesMenuViewStateService:s.any,recentStudyTemplatesService:s.any});const{recentStudyTemplatesService:a,studyTemplates:i}=t;this._model=new Da(i,a),this.state={...this._model.state().value(),isActive:!1}}
|
||||
componentDidMount(){this._model.state().subscribe(this._updateState)}componentWillUnmount(){this._model.state().unsubscribe(this._updateState),this._model.destroy()}render(){const{studyTemplatesList:e}=this.state,{isShownQuicks:t,className:a,displayMode:i,id:s}=this.props,o=this._model.getSortedFavoritesStudyTemplates(e),l=this._model.getValidRecents(e);return n.createElement(Ta.Provider,{value:this.context.templatesMenuViewStateService||null},n.createElement(Za,{id:s,className:a,mode:i,templates:e,favorites:o,recents:l,onMenuOpen:this._model.handleDropdownOpen,onTemplateFavorite:t?this._model.handleFavorTemplate:void 0,onTemplateSelect:this._handleApplyTemplate,onTemplateRemove:this._handleRemoveTemplate,onTemplateSave:this._model.handleSaveTemplate,onOpenTemplatesDialog:this._handleOpenTemplatesDialog}))}}function Za(e){const{id:t,className:i,mode:s,templates:o,favorites:r,recents:h,isMenuOpen:c,onTemplateSelect:u,onTemplateSave:v,onTemplateFavorite:g,onTemplateRemove:b,onOpenTemplatesDialog:S}=e,C=(0,n.useRef)(null),w=(0,n.useRef)(null),f=m()(i,Va.wrap,{[Va.full]:"full"===s,[Va.medium]:"medium"===s}),k="small"!==s&&g&&r.length>0;return n.createElement(p,{id:t,className:f},n.createElement(_.MatchMedia,{rule:y.DialogBreakpoints.TabletSmall},(t=>n.createElement(d.ToolbarMenuButton,{ref:C,menuReference:w,onOpen:e.onMenuOpen,isDrawer:t,drawerPosition:"Bottom",arrow:!1,content:n.createElement(z,{tag:"div",className:m()(k&&Va.buttonWithFavorites),displayMode:s,isOpened:c,icon:La,forceInteractive:!0,collapseWhen:["full","medium","small"]}),onClick:M,tooltip:l.t(null,void 0,a(76443)),menuDataName:"indicator-templates-menu"},n.createElement(Aa,{onTemplateSave:v,onTemplateSelect:u,onTemplateRemove:E,onTemplateFavorite:g,templates:o,recents:h,isTabletSmall:t,onOpenTemplatesDialog:S})))),k&&n.createElement(Ka,{favorites:r,onTemplateSelect:function(e){u(e),M()}}));function E(e,t){if(t&&(0,q.isKeyboardClick)(t)&&w.current){const t=(0,le.queryMenuElements)(w.current),a=t.findIndex((t=>null!==t.closest(`[data-id="${e.id}"]`)));b(e,null,(()=>{if(-1!==a&&w.current){const e=t[a+1]??t[a-1];e?e.focus():(0,le.focusFirstMenuItem)(w.current),C.current?.update()}}))}else b(e)}function M(){0}}function Ka(e){return n.createElement(n.Fragment,null,e.favorites.map(((t,a,i)=>n.createElement(Pa,{key:t.name,item:t,onApply:e.onTemplateSelect,className:m()({[Va.first]:0===a,[Va.last]:a===i.length-1})}))))}za.contextType=Ba;a(21251);var qa=a(77665),ja=a(96052),Qa=a(28282);const Xa={undoHotKey:(0,$.hotKeySerialize)({keys:[(0,Y.humanReadableModifiers)(Y.Modifiers.Mod,!1),"Z"],text:"{0} + {1}"}),redoHotKey:(0,$.hotKeySerialize)({keys:[(0,Y.humanReadableModifiers)(Y.Modifiers.Mod,!1),"Y"],text:"{0} + {1}"})},Ga=(0,rt.mergeThemes)(g.DEFAULT_TOOLBAR_BUTTON_THEME,Qa),$a=(0,f.registryContextType)();class Ya extends n.PureComponent{constructor(e,t){super(e,t),this._batched=null,this._handleClickUndo=()=>{(0,K.trackEvent)("GUI","Undo");const{chartWidgetCollection:e}=this.context;e.undoHistory.undo()},this._handleClickRedo=()=>{(0,K.trackEvent)("GUI","Redo")
|
||||
;const{chartWidgetCollection:e}=this.context;e.undoHistory.redo()},(0,f.validateRegistry)(t,{chartWidgetCollection:s.any.isRequired}),this.state=this._getStateFromUndoHistory()}componentDidMount(){const{chartWidgetCollection:e}=this.context;e.undoHistory.redoStack().onChange().subscribe(this,this._onChangeStack),e.undoHistory.undoStack().onChange().subscribe(this,this._onChangeStack)}componentWillUnmount(){const{chartWidgetCollection:e}=this.context;e.undoHistory.redoStack().onChange().unsubscribe(this,this._onChangeStack),e.undoHistory.undoStack().onChange().unsubscribe(this,this._onChangeStack),this._batched=null}render(){const{id:e}=this.props,{isEnabledRedo:t,isEnabledUndo:i,redoStack:s,undoStack:o}=this.state;return n.createElement(p,{id:e},n.createElement(g.ToolbarButton,{icon:qa,isDisabled:!i,onClick:this._handleClickUndo,theme:Ga,tooltip:i?l.t(null,{replace:{hint:o}},a(66020)):void 0,"data-tooltip-hotkey":i?Xa.undoHotKey:void 0}),n.createElement(g.ToolbarButton,{icon:ja,isDisabled:!t,onClick:this._handleClickRedo,theme:Ga,tooltip:t?l.t(null,{replace:{hint:s}},a(11304)):void 0,"data-tooltip-hotkey":t?Xa.redoHotKey:void 0}))}_onChangeStack(){null===this._batched&&(this._batched=Promise.resolve().then((()=>{if(null===this._batched)return;this._batched=null;const e=this._getStateFromUndoHistory();this.setState(e)})))}_getStateFromUndoHistory(){const{chartWidgetCollection:e}=this.context,t=e.undoHistory.undoStack(),a=e.undoHistory.redoStack(),i=a.head(),n=t.head();return{isEnabledRedo:!a.isEmpty(),isEnabledUndo:!t.isEmpty(),redoStack:i?i.text().translatedText():"",undoStack:n?n.text().translatedText():""}}}Ya.contextType=$a;const Ja=e=>{if((e=>"http://www.w3.org/1999/xhtml"===e?.namespaceURI)(e)&&"true"!==e.dataset.internalAllowKeyboardNavigation){e.tabIndex=-1,e.ariaDisabled="true";for(let t=0;t<e.children.length;t++)Ja(e.children.item(t))}};class ei extends n.PureComponent{constructor(){super(...arguments),this._wrapperElement=null,this._resizeObserver=null,this._mutationObserver=null,this._update=()=>{this.forceUpdate()},this._setRef=e=>{this._wrapperElement=e},this._handleMeasure=([e])=>{this.props.width.setValue(e.contentRect.width)},this._handleMutation=([e])=>{"childList"===e.type&&Ja(this.props.element)}}componentDidMount(){const{element:e,isFake:t,width:a}=this.props;!t&&this._wrapperElement?(this._resizeObserver=new ResizeObserver(this._handleMeasure),this._mutationObserver=new MutationObserver(this._handleMutation),this._wrapperElement.appendChild(e),this._resizeObserver.observe(this._wrapperElement),this._mutationObserver.observe(e,{subtree:!0,childList:!0})):a.subscribe(this._update)}componentWillUnmount(){const{width:e,isFake:t}=this.props;t&&e.unsubscribe(this._update),this._resizeObserver&&this._wrapperElement&&this._resizeObserver.unobserve(this._wrapperElement),this._mutationObserver&&(this._mutationObserver.disconnect(),this._mutationObserver=null)}render(){const{isFake:e=!1,width:t}=this.props;return n.createElement(p,{ref:this._setRef,style:e?{width:t.value()}:void 0,
|
||||
"data-is-custom-header-element":!0})}}function ti(e){const{displayMode:t,params:a}=e;return n.createElement(d.ToolbarMenuButton,{content:n.createElement(z,{collapseWhen:void 0!==a.icon?void 0:[],displayMode:t,icon:a.icon,text:a.title,"data-name":"dropdown","data-is-custom-header-element":!0}),drawerPosition:"Bottom",drawerBreakpoint:y.DialogBreakpoints.TabletSmall,arrow:!1,tooltip:a.tooltip},a.items.map(((e,t)=>n.createElement(oe.PopupMenuItem,{key:t,label:e.title,onClick:()=>e.onSelect(),"data-name":"dropdown-item"}))))}var ai=a(935);function ii(e){const{className:t,title:a,...i}=e;return n.createElement(Z,{...i,className:u(t,ai.customTradingViewStyleButton,ai.withoutIcon),collapseWhen:[],"data-name":"custom-tradingview-styled-button",tooltip:a})}var ni=a(60448);const si=(0,$.hotKeySerialize)({keys:[(0,Y.humanReadableModifiers)(Y.Modifiers.Mod,!1),"K"],text:"{0} + {1}"}),oi=(0,f.registryContextType)();class li extends n.PureComponent{constructor(e,t){super(e),this._dialog=null,this._updateState=e=>{this.setState({isOpened:e})},this._handleClick=e=>{const{openGlobalSearch:t}=this.context;t({shouldReturnFocus:(0,q.isKeyboardClick)(e)}).then((e=>{this._dialog?.visible().unsubscribe(this._updateState),this._dialog=e,e.visible().subscribe(this._updateState)}))},(0,f.validateRegistry)(t,{openGlobalSearch:s.any.isRequired}),this.state={isOpened:!1}}componentWillUnmount(){this._dialog?.visible().unsubscribe(this._updateState)}render(){return n.createElement(G.ToolbarIconButton,{...this.props,icon:ni,isOpened:this.state.isOpened,onClick:this._handleClick,"data-tooltip-hotkey":si,tooltip:l.t(null,void 0,a(18243))})}}li.contextType=oi;var ri=a(27514),hi=a(27906);function ci(){return{Bars:i.enabled("header_chart_type")?W:void 0,Compare:i.enabled("header_compare")?X:void 0,Custom:ei,CustomTradingViewStyledButton:ii,Fullscreen:(0,hi.shouldShowFullscreen)()?ne:void 0,Indicators:i.enabled("header_indicators")?we:void 0,Intervals:i.enabled("header_resolutions")?Xe:void 0,OpenPopup:tt,Properties:i.enabled("header_settings")&&i.enabled("show_chart_property_page")?nt:void 0,SaveLoad:i.enabled("header_saveload")?It:void 0,Screenshot:i.enabled("header_screenshot")?Jt:void 0,SymbolSearch:i.enabled("header_symbol_search")?ca:void 0,Templates:i.enabled("study_templates")?za:void 0,Dropdown:ti,UndoRedo:i.enabled("header_undo_redo")?Ya:void 0,Layout:undefined,QuickSearch:(0,ri.shouldShowQuickSearchOnLib)()?li:void 0}}},27906:(e,t,a)=>{"use strict";a.d(t,{shouldShowFullscreen:()=>n});var i=a(56570);function n(){return i.enabled("header_fullscreen_button")}},23076:(e,t,a)=>{"use strict";a.r(t),a.d(t,{SERIES_ICONS:()=>p});var i=a(94670),n=a(32162),s=a(39956),o=a(14083),l=a(45504),r=a(52867),h=a(41473),c=a(31246),d=a(15726),u=a(24464),m=a(71705),v=a(9450);const p={3:i,16:n,0:s,1:o,8:l,9:r,2:h,14:c,15:d,10:u,12:m,13:v}},7986:(e,t,a)=>{"use strict";function i(e){return"https://www.tradingview.com/x/"+e+"/"}a.d(t,{convertImageNameToUrl:()=>i})},7372:(e,t,a)=>{"use strict";function i(e,t){const a=document.createElement("a");a.style.display="none",
|
||||
a.href=t,a.download=e,a.click()}a.d(t,{downloadFile:()=>i})},29142:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="M3.5 8a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM8 2a6 6 0 1 0 3.65 10.76l3.58 3.58 1.06-1.06-3.57-3.57A6 6 0 0 0 8 2Z"/></svg>'},97268:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M8.5 6A2.5 2.5 0 0 0 6 8.5V11h1V8.5C7 7.67 7.67 7 8.5 7H11V6H8.5zM6 17v2.5A2.5 2.5 0 0 0 8.5 22H11v-1H8.5A1.5 1.5 0 0 1 7 19.5V17H6zM19.5 7H17V6h2.5A2.5 2.5 0 0 1 22 8.5V11h-1V8.5c0-.83-.67-1.5-1.5-1.5zM22 19.5V17h-1v2.5c0 .83-.67 1.5-1.5 1.5H17v1h2.5a2.5 2.5 0 0 0 2.5-2.5z"/></svg>'},36992:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M17 6v2.5a2.5 2.5 0 0 0 2.5 2.5H22v-1h-2.5A1.5 1.5 0 0 1 18 8.5V6h-1zm2.5 11a2.5 2.5 0 0 0-2.5 2.5V22h1v-2.5c0-.83.67-1.5 1.5-1.5H22v-1h-2.5zm-11 1H6v-1h2.5a2.5 2.5 0 0 1 2.5 2.5V22h-1v-2.5c0-.83-.67-1.5-1.5-1.5zM11 8.5V6h-1v2.5c0 .83-.67 1.5-1.5 1.5H6v1h2.5A2.5 2.5 0 0 0 11 8.5z"/></svg>'},13090:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M5 7.5C5 6.67 5.67 6 6.5 6h4.2l2 2h8.8c.83 0 1.5.67 1.5 1.5v10c0 .83-.67 1.5-1.5 1.5h-15A1.5 1.5 0 0 1 5 19.5v-12ZM6.5 7a.5.5 0 0 0-.5.5V11h16V9.5a.5.5 0 0 0-.5-.5h-9.2l-2-2H6.5ZM22 12H6v7.5c0 .28.22.5.5.5h15a.5.5 0 0 0 .5-.5V12Z"/></svg>'},6198:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M13.9 14.1V22h1.2v-7.9H23v-1.2h-7.9V5h-1.2v7.9H6v1.2h7.9Z"/></svg>'},99280:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M8.5 6A2.5 2.5 0 0 0 6 8.5v11A2.5 2.5 0 0 0 8.5 22h11a2.5 2.5 0 0 0 2.5-2.5v-3h-1v3c0 .83-.67 1.5-1.5 1.5h-11A1.5 1.5 0 0 1 7 19.5v-11C7 7.67 7.67 7 8.5 7h3V6h-3zm7 1h4.8l-7.49 7.48.71.7L21 7.72v4.79h1V6h-6.5v1z"/></svg>'},60448:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="currentColor"><path d="M17 4v4h2a1 1 0 0 1 .83 1.55l-4 6A1 1 0 0 1 14 15v-4h-2a1 1 0 0 1-.83-1.55l4-6A1 1 0 0 1 17 4m-2 11 4-6h-3V4l-4 6h3z"/><path d="M5 13.5a7.5 7.5 0 0 1 6-7.35v1.02A6.5 6.5 0 1 0 18.98 13h1l.02.5a7.47 7.47 0 0 1-1.85 4.94L23 23.29l-.71.7-4.85-4.84A7.5 7.5 0 0 1 5 13.5"/></svg>'},21233:e=>{
|
||||
this._propertiesDialogRenderer=this.context.chartWidgetCollection.getChartPropertiesDialogRenderer()}componentDidMount(){this._propertiesDialogRenderer?.visible().subscribe(this._updateState)}componentWillUnmount(){this._propertiesDialogRenderer?.visible().unsubscribe(this._updateState)}render(){const{isOpened:e}=this.state;return n.createElement(G.ToolbarIconButton,{...this.props,icon:at,isOpened:e,onClick:this._handleClick,tooltip:l.t(null,void 0,a(32514))})}}nt.contextType=it;var st=a(26709),ot=a(56616),lt=a(49483),rt=a(40173),ht=a(56127),ct=a(10428),dt=a(17479);(0,rt.mergeThemes)(ct.DEFAULT_MENU_ITEM_SWITCHER_THEME,dt);var ut=a(52464);function mt(e){const{wasChanges:t,isSaving:i,className:s}=e;return n.createElement("span",{className:u(ut.saveString,!t&&!i&&ut.hidden,s)},i?n.createElement(me.Loader,{className:ut.loader,size:"small",staticPosition:!0}):l.t(null,void 0,a(64e3)))}var vt=a(27830),pt=a(36296),gt=a(13090),bt=a(18603),St=a(75394);a(22315);const Ct=i.enabled("widget"),_t=i.enabled("save_shortcut"),yt=(0,rt.mergeThemes)(L.DEFAULT_TOOL_WIDGET_BUTTON_THEME,St),wt=(0,rt.mergeThemes)(oe.DEFAULT_POPUP_MENU_ITEM_THEME,{shortcut:bt.shortcut,withIcon:bt.withIcon}),ft=((0,rt.mergeThemes)(oe.DEFAULT_POPUP_MENU_ITEM_THEME,{toolbox:bt.toolbox}),(0,rt.mergeThemes)(oe.DEFAULT_POPUP_MENU_ITEM_THEME,{toolbox:bt.toolboxSmall}),l.t(null,void 0,a(40115))),kt=l.t(null,void 0,a(26276)),Et=[],Mt=(0,$.hotKeySerialize)({keys:[(0,Y.humanReadableModifiers)(Y.Modifiers.Mod,!1),"S"],text:"{0} + {1}"}),Tt=()=>null;class xt extends n.PureComponent{constructor(e){super(e),this._copyElRef=n.createRef(),this._menuRef=n.createRef(),this._handleCopyLinkClick=()=>Promise.resolve(),this._handleCloneClick=()=>{this.props.onCloneChart?.()},this._handleSaveClick=()=>{this.props.onSaveChart?.(),this._trackClick()},this._handleSaveAsClick=()=>{this.props.onSaveAsChart?.()},this.state={isSaving:!1}}componentDidUpdate(e,t){e.isProcessing&&!this.props.isProcessing&&(clearTimeout(this._timeout),this._timeout=void 0,this.setState({isSaving:!1})),!e.recentItems?.length&&this.props.recentItems?.length&&this._menuRef.current?.update(),!e.isProcessing&&this.props.isProcessing&&(this._timeout=setTimeout((()=>{this.setState({isSaving:!0})}),1e3))}componentWillUnmount(){this._timeout&&clearTimeout(this._timeout)}render(){const{id:e,isReadOnly:t,displayMode:i,isProcessing:s,title:r,wasChanges:h,hideMenu:c,isTabletSmall:m,onOpenMenu:v,dataNameSaveMenu:g,isSaveDialogOpened:b,chartList:S,favorites:C,showRemoveFavoriteHint:_,onButtonClick:y,onAdditionalButtonClick:w}=this.props,f=!t&&!c;let k=[];vt.showFavoriteLayouts&&S&&C&&(k=S.filter((e=>C[e.id])).sort(((e,t)=>e.name.localeCompare(t.name))));const E=!(h||!r||this.state.isSaving),M=n.createElement("div",{className:bt.textWrap},n.createElement("span",{className:bt.text},n.createElement(ht.LeadingEmojiText,{text:r||l.t(null,void 0,a(64e3))})),n.createElement(mt,{isSaving:this.state.isSaving,wasChanges:h}));return n.createElement(p,null,t?n.createElement(p,null,n.createElement(Z,{id:e,displayMode:i,
|
||||
icon:n.createElement(o.Icon,{icon:pt}),isDisabled:s,onClick:this._handleCloneClick,text:l.t(null,void 0,a(49680)),collapseWhen:Et,tooltip:ft})):n.createElement(p,null,n.createElement(Z,{id:e,className:u(bt.button,f&&bt.buttonSmallPadding),displayMode:i,"aria-disabled":!!E||void 0,isDisabled:s,onClick:E?void 0:this._handleSaveClick,text:M,theme:yt,collapseWhen:Et,isOpened:b,tooltip:E?l.t(null,void 0,a(89771)):l.t(null,void 0,a(15356)),"data-tooltip-hotkey":Ct||E?"":_t?Mt:""}),f&&n.createElement("div",{className:bt.menuBtnWrap},n.createElement(d.ToolbarMenuButton,{"data-name":g,arrow:!0,ref:this._menuRef,isDrawer:m,drawerPosition:"Bottom",onClick:this._trackClick,onOpen:v,tooltip:l.t(null,void 0,a(38973)),menuClassName:u(!m&&bt.menu),menuRole:"grid"},this._renderMenuItems(Boolean(m))),vt.showFavoriteLayouts&&_&&k.length>FAVORITE_LAYOUTS_LIMIT&&n.createElement(n.Suspense,{fallback:null},n.createElement(Tt,{onClick:y,onAdditionalClick:w,placement:"auto",theme:undefined,buttonSize:"small",saveHintStateByClick:!1,text:l.t(null,{count:k.length,plural:"Your favorite layouts have moved to the top toolbar. You currently have {count} favorites. You can reduce the number to find them easier — unfavorite all in just one click or set up your choice manually.",replace:{count:k.length.toString()}},a(6094)),buttonText:l.t(null,void 0,a(66418)),additionalButtonText:l.t(null,void 0,a(36291)),settingsHintKey:"hint.favoriteLayouts",placeHolderClassName:bt.hintPlaceholder,hideWithReference:!0,hintStateHandler:favoriteLayoutsHintStateHandler}))),!1))}_renderMenuItems(e){const{wasChanges:t,isProcessing:i,chartId:s,onSaveChartFromMenu:o,onRenameChart:r,onLoadChart:h,onNewChart:c,isAutoSaveEnabled:d,autoSaveId:m,sharingId:v,onAutoSaveChanged:p,isSharingEnabled:g,onSharingChanged:b,recentItems:S,onExportData:_,isAuthenticated:y,favorites:f}=this.props,k=e?w.multilineLabelWithIconAndToolboxTheme:wt,E=e?void 0:(0,Y.humanReadableHash)(Y.Modifiers.Mod+83),M=e?void 0:l.t(null,{context:"hotkey"},a(23821)),T=[];return T.push(n.createElement(A.AccessibleMenuItem,{key:"save",role:"row",isDisabled:Boolean(i||!t&&s),label:kt,onClick:o,shortcut:E,labelRowClassName:u(e&&bt.popupItemRowTabletSmall),theme:k,"data-name":"save-load-menu-item-save"})),void 0!==s&&T.push(n.createElement(A.AccessibleMenuItem,{key:"rename",role:"row",icon:void 0,label:(0,Ve.appendEllipsis)(l.t(null,void 0,a(6321))),onClick:r,labelRowClassName:u(e&&bt.popupItemRowTabletSmall),theme:k,"data-name":"save-load-menu-item-rename","aria-haspopup":"dialog"}),n.createElement(A.AccessibleMenuItem,{key:"save-as",role:"row",icon:void 0,label:(0,Ve.appendEllipsis)(ft),onClick:this._handleSaveAsClick,labelRowClassName:u(e&&bt.popupItemRowTabletSmall),theme:k,"data-name":"save-load-menu-item-clone","aria-haspopup":"dialog"})),T.push(n.createElement(C.PopupMenuSeparator,{key:"all-layouts-separator"}),n.createElement(A.AccessibleMenuItem,{key:"all-layouts",role:"row",className:"js-save-load-menu-item-load-chart",label:(0,Ve.appendEllipsis)(l.t(null,void 0,a(65433))),onClick:h,icon:gt,
|
||||
labelRowClassName:u(e&&bt.popupItemRowTabletSmall),theme:k,shortcut:M,"data-name":"save-load-menu-item-load","aria-haspopup":"dialog"})),T}_trackClick(){0}}const It=(0,f.registryContextType)();class Rt extends n.PureComponent{constructor(e,t){super(e,t),this._exportDialogPromise=null,this._recentLayoutsAbortController=null,this._requestRecentLayouts=()=>{this._recentLayoutsAbortController?.abort()},this._updateState=e=>{this.setState((t=>({...t,...e})))},this._handleExportData=()=>{0},this._onSaveDialogVisibleChange=e=>{this.setState({isSaveDialogOpened:e})},this._syncState=e=>{this.setState(e)},this._handleAdditionalButton=()=>{const{loadChartService:e}=this.context;e.deleteAllFavorites()},this._onChangeHasChanges=e=>{this.state.wasChanges!==e&&this.setState({wasChanges:e})},this._onChangeAutoSaveEnabled=e=>{0},this._onChangeSharingEnabled=e=>{this.setState({isSharingEnabled:e})},this._onChangeTitle=e=>{this.setState({title:e})},this._onChangeId=e=>{this.setState({id:e})},this._onChartAboutToBeSaved=()=>{this.setState({isProcessing:!0})},this._onChartSaved=()=>{this.setState({isProcessing:!1})},this._handleAutoSaveEnabled=e=>{0},this._handleSharingEnabled=e=>{0},this._handleClickSave=()=>{this.context.saveChartService.saveChartOrShowTitleDialog(),this._trackEvent("Save click")},this._handleOpenMenu=()=>{this._requestRecentLayouts()},this._handleClickSaveFromMenu=()=>{this.context.saveChartService.saveChartOrShowTitleDialog(),this._trackEvent("Save From Menu")},this._handleClickClone=()=>{this.context.saveChartService.cloneChart()},this._handleClickSaveAs=()=>{this.context.saveChartService.saveChartAs(),this._trackEvent("Make a copy")},this._handleClickNew=()=>{this._trackEvent("New chart layout")},this._handleClickLoad=()=>{this.context.loadChartService.showLoadDialog()},this._handleHotkey=()=>{this.context.loadChartService.showLoadDialog()},this._handleClickRename=()=>{this.context.saveChartService.renameChart(),this._trackEvent("Rename")},(0,f.validateRegistry)(t,{chartWidgetCollection:s.any.isRequired,chartChangesWatcher:s.any.isRequired,saveChartService:s.any.isRequired,sharingChartService:s.any,loadChartService:s.any.isRequired});const{chartWidgetCollection:a,chartChangesWatcher:i,saveChartService:n,sharingChartService:o,loadChartService:l}=t;this._loadChartServiceState=l.state(),this.state={isAuthenticated:window.is_authenticated,isProcessing:!1,id:a.metaInfo.id.value(),title:a.metaInfo.name.value(),wasChanges:i.hasChanges(),iconHovered:!1,isSaveDialogOpened:!1,...this._loadChartServiceState.value()}}componentDidMount(){const{chartSaver:e,isFake:t,stateSyncEmitter:i}=this.props,{chartWidgetCollection:n,chartChangesWatcher:s,saveChartService:o,sharingChartService:r,loadChartService:h}=this.context;t?i.on("change",this._syncState):(s.getOnChange().subscribe(this,this._onChangeHasChanges),n.metaInfo.name.subscribe(this._onChangeTitle),n.metaInfo.id.subscribe(this._onChangeId),this._hotkeys=(0,st.createGroup)({desc:"Save/Load"}),this._hotkeys.add({desc:l.t(null,void 0,a(29517)),handler:this._handleHotkey,
|
||||
hotkey:190}),e.chartSaved().subscribe(this,this._onChartSaved),e.chartAboutToBeSaved().subscribe(this,this._onChartAboutToBeSaved),window.loginStateChange.subscribe(this,this._onLoginStateChange),this.context.saveChartService.getCreateController().visible().subscribe(this._onSaveDialogVisibleChange),this._loadChartServiceState.subscribe(this._updateState),vt.showFavoriteLayouts&&h.refreshChartList())}componentDidUpdate(e,t){this.props.isFake||t!==this.state&&this.props.stateSyncEmitter.emit("change",this.state)}componentWillUnmount(){const{chartSaver:e,isFake:t,stateSyncEmitter:a}=this.props,{chartWidgetCollection:i,chartChangesWatcher:n,saveChartService:s,sharingChartService:o}=this.context;t?a.off("change",this._syncState):(n.getOnChange().unsubscribe(this,this._onChangeHasChanges),i.metaInfo.name.unsubscribe(this._onChangeTitle),i.metaInfo.id.unsubscribe(this._onChangeId),(0,se.ensureDefined)(this._hotkeys).destroy(),e.chartSaved().unsubscribe(this,this._onChartSaved),e.chartAboutToBeSaved().unsubscribe(this,this._onChartAboutToBeSaved),window.loginStateChange.unsubscribe(this,this._onLoginStateChange),this._recentLayoutsAbortController?.abort(),this.context.saveChartService.getCreateController().visible().unsubscribe(this._onSaveDialogVisibleChange),this._loadChartServiceState.unsubscribe(this._updateState))}render(){const{isReadOnly:e,displayMode:t,id:a,isFake:i}=this.props,{isProcessing:s,isAuthenticated:o,title:l,id:r,wasChanges:h,isAutoSaveEnabled:c,isSharingEnabled:d,isSaveDialogOpened:u,favorites:m,chartList:v,recents:p}=this.state,g={displayMode:t,isReadOnly:e,isAuthenticated:o,isProcessing:s,wasChanges:h,title:l,id:a,isSaveDialogOpened:u,favorites:m,chartList:v,chartId:null!==r?r:void 0,dataNameSaveMenu:i?void 0:"save-load-menu",showRemoveFavoriteHint:!i,onCloneChart:this._handleClickClone,onSaveChart:this._handleClickSave,onSaveChartFromMenu:this._handleClickSaveFromMenu,onRenameChart:this._handleClickRename,onSaveAsChart:this._handleClickSaveAs,onLoadChart:this._handleClickLoad,onButtonClick:this._handleClickLoad,onAdditionalButtonClick:this._handleAdditionalButton};return n.createElement(_.MatchMedia,{rule:y.DialogBreakpoints.TabletSmall},(e=>n.createElement(xt,{...g,isTabletSmall:e})))}_onLoginStateChange(){const e=window.is_authenticated;this.setState({isAuthenticated:e}),vt.showFavoriteLayouts&&this.context.loadChartService.refreshChartList()}_trackEvent(e){0}}Rt.contextType=It;var At=a(7986),Nt=a(52388),Ft=a(13665);const Ht=new Nt.DateTimeFormatter({dateTimeSeparator:"_",timeFormat:"%h-%m-%s"}),Ot={takeSnapshot:l.t(null,void 0,a(87972))},Dt=(0,f.registryContextType)();var Ut=a(75774);function Wt(e,t,i){return async function(e,t,i){const n=URL.createObjectURL(new Blob([`<!doctype html><html style="background-color:${getComputedStyle(document.documentElement).backgroundColor}"><head><meta charset="utf-8"><title>${l.t(null,void 0,a(93292))}</title></head><body style="background-color:${getComputedStyle(document.body).backgroundColor}"></body></html>`],{type:"text/html"}));try{
|
||||
Ut.isIOS&&await new Promise((e=>setTimeout(e)));const a=open(n,t,i);if(!a)throw new Error("cound not open a new tab");const s=await e.catch((()=>{}));void 0!==s?a.location.replace(s):a.close()}finally{URL.revokeObjectURL(n)}}(e,t,i)}var Pt=a(7372),Lt=a(21569);function Vt(e){const t=u(e.isLoading&&Lt.hidden),a=u(!e.isLoading&&Lt.hidden);return n.createElement("div",null,n.createElement("span",{className:t},e.children),n.createElement("span",{className:a},n.createElement(me.Loader,null)))}var Bt=a(76974),zt=a(67487),Zt=a(1457),Kt=a(23595),qt=a(29414),jt=a(99280),Qt=a(63295);const Xt=(0,rt.mergeThemes)(oe.DEFAULT_POPUP_MENU_ITEM_THEME,Qt);function Gt(e){const{serverSnapshot:t,clientSnapshot:i,hideShortcuts:s}=e,[o,r]=(0,n.useState)(!1),[h,c]=(0,n.useState)(!1),[d,m]=(0,n.useState)(!1),[v,p]=(0,n.useState)(!1),[g,b]=(0,n.useState)(!1),S=(0,Bt.useIsMounted)(),C=(0,n.useCallback)((async()=>{const e=i(),t=e.then((e=>new Promise((t=>e.canvas.toBlob((e=>{null!==e&&t(e)}))))));try{await(0,ot.writePromiseUsingApi)(t,"image/png"),be.emit("onClientScreenshotCopiedToClipboard")}catch(t){const{canvas:a}=await e;window.open()?.document.write(`<img width="100%" src="${a.toDataURL()}"/>`)}}),[i]),_=(0,n.useCallback)((async()=>{const e=await i(),t=await function(e){return new Promise((t=>{try{e.canvas.toBlob((e=>{if(null===e)throw new Error("Unable to generate blob");t(URL.createObjectURL(e))}))}catch{t(e.canvas.toDataURL())}}))}(e);t&&(0,Pt.downloadFile)(`${e.name}.png`,t)}),[i]),y=e=>Wt(e.then((e=>e.imageUrl))),w=(0,n.useCallback)((async(e=!1)=>{const a=t();try{if(e)await y(a);else{const e=a.then((e=>new Blob([e.imageUrl],{type:"text/plain"})));await(0,ot.writePromiseUsingApi)(e,"text/plain"),be.emit("onServerScreenshotCopiedToClipboard")}return!0}catch(e){return y(a),!0}finally{S.current&&(c(!1),r(!1),(0,Ue.globalCloseMenu)())}}),[t]),f=((0,n.useCallback)((async()=>{const e=t();try{const t=720,a=e.then((async e=>{const a=await snapshoter().getSnapshot(e.symbol,new Set(["description"])),i="error"!==a.status?a.values.description:e.symbol,n=e.imageUrl.match(/\/x\/([0-9a-zA-Z]{8})/)?.[1]??"",s=createSnapshotImageUrls(n)?.url;return new Blob([`<img width="${t}" loading="lazy" src="${s}"/><p><a href="https://www.tradingview.com${getSymbolPagePath({shortName:e.symbol})}">${i} chart</a> by TradingView</p>`],{type:"text/plain"})}));return await(0,ot.writePromiseUsingApi)(a,"text/plain"),be.emit("onServerScreenshotEmbedCodeCopiedToClipboard"),!0}catch(t){return y(e),!0}finally{S.current&&(m(!1),(0,Ue.globalCloseMenu)())}}),[t]),(0,n.useCallback)((async()=>{p(!0);const[e,i]=await Promise.all([a.e(4665).then(a.bind(a,66921)),t()]);e.Twitter.shareSnapshotInstantly(i.symbol,i.imageUrl),S.current&&(p(!1),(0,Ue.globalCloseMenu)())}),[t]));return n.createElement(n.Fragment,null,n.createElement(ge.ToolWidgetMenuSummary,null,l.t(null,void 0,a(58425))),n.createElement(A.AccessibleMenuItem,{role:"row","data-name":"save-chart-image",label:l.t(null,void 0,a(26200)),icon:Kt,onClick:_,shortcut:s?void 0:(0,
|
||||
Y.humanReadableHash)(Y.Modifiers.Mod+Y.Modifiers.Alt+83),theme:Xt}),n.createElement(A.AccessibleMenuItem,{role:"row","data-name":"copy-chart-image",label:l.t(null,void 0,a(96554)),icon:Zt,onClick:C,shortcut:s?void 0:(0,Y.humanReadableHash)(Y.Modifiers.Mod+Y.Modifiers.Shift+83),theme:Xt}),!(0,lt.onWidget)()&&n.createElement(A.AccessibleMenuItem,{role:"row","data-name":"copy-link-to-the-chart-image",label:n.createElement(Vt,{isLoading:o},l.t(null,void 0,a(81939))),icon:qt,onClick:()=>{r(!0),w(!1)},dontClosePopup:!0,isDisabled:o,shortcut:s?void 0:(0,Y.humanReadableHash)(Y.Modifiers.Alt+83),className:u(o&&Qt.loading),theme:Xt}),!1,!(0,lt.onWidget)()&&!(0,lt.isSymphonyEmbed)()&&n.createElement(A.AccessibleMenuItem,{role:"row","data-name":"open-image-in-new-tab",label:n.createElement(Vt,{isLoading:h},l.t(null,void 0,a(19159))),icon:jt,onClick:()=>{c(!0),w(!0)},dontClosePopup:!0,isDisabled:h,className:u(h&&Qt.loading),theme:Xt}),!(0,lt.onWidget)()&&!(0,lt.isSymphonyEmbed)()&&n.createElement(A.AccessibleMenuItem,{role:"row","data-name":"tweet-chart-image",label:n.createElement(Vt,{isLoading:v},l.t(null,void 0,a(28239))),icon:zt,onClick:f,dontClosePopup:!0,isDisabled:v,className:u(v&&Qt.loading),theme:Xt}),!1)}var $t=a(84015);function Yt(e){const[t,a]=(0,n.useState)(!1),i=(0,Bt.useIsMounted)(),s=(0,n.useCallback)((async()=>{a(!0),await e.serverSnapshot(),i.current&&a(!1)}),[e.serverSnapshot]);return n.createElement(L.ToolWidgetButton,{id:e.id,className:e.className,isDisabled:t,onClick:s,title:e.tooltip,icon:e.icon})}var Jt=a(72644);const ea=(ta=function(e){return(0,$t.isOnMobileAppPage)("any")?n.createElement(Yt,{...e,icon:Jt}):n.createElement(d.ToolbarMenuButton,{content:n.createElement(L.ToolWidgetButton,{tag:"div",id:e.id,className:e.className,icon:Jt}),drawerPosition:"Bottom",drawerBreakpoint:y.DialogBreakpoints.TabletSmall,arrow:!1,onClick:function(){},tooltip:e.tooltip,menuRole:"grid"},n.createElement(Gt,{...e}))},(aa=class extends n.PureComponent{constructor(e,t){super(e,t),this._clientSnapshot=async()=>{const e=this.context.chartWidgetCollection.activeChartWidget.value().model().mainSeries().actualSymbol();return{canvas:await this.context.chartWidgetCollection.clientSnapshot(),name:`${(0,Ft.shortName)(e)}_${Ht.formatLocal(new Date)}`}},this._serverSnapshot=async()=>{const e=this.context.chartWidgetCollection.activeChartWidget.value().model().mainSeries().actualSymbol(),t=await this.context.chartWidgetCollection.takeScreenshot(),a=void 0!==this.context.snapshotUrl?t:(0,At.convertImageNameToUrl)(t);return{symbol:(0,Ft.shortName)(e),imageUrl:a}},(0,f.validateRegistry)(t,{chartWidgetCollection:s.any.isRequired})}render(){const{className:e,id:t}=this.props;return n.createElement(ta,{id:t,className:e,tooltip:Ot.takeSnapshot,serverSnapshot:this._serverSnapshot,clientSnapshot:this._clientSnapshot})}}).contextType=Dt,aa);var ta,aa,ia=a(79652),na=a(39362),sa=a(50340);class oa{async show(e){if(null!==oa._provider){const e=await oa._provider.getSymbol();return r.linking.setSymbolAndLogInitiator(e.symbol,"symbol search UI"),e}
|
||||
if(oa._currentShowingInstance)throw new DOMException("SymbolSearchUI is already shown","InvalidStateError");try{oa._currentShowingInstance=this,oa.preload();const t=await oa._implementation;return(0,se.assert)(null!==t),new Promise((a=>{t.showDefaultSearchDialog({...e,onSearchComplete:e=>{a({symbol:e})}})}))}finally{oa._currentShowingInstance=null}}static setProvider(e){this._provider=e}static preload(){null===this._provider&&null===this._implementation&&(this._implementation=(0,sa.loadNewSymbolSearch)())}}oa._currentShowingInstance=null,oa._provider=null,oa._implementation=null;var la=a(29142),ra=a(92876);const ha=(0,rt.mergeThemes)(g.DEFAULT_TOOLBAR_BUTTON_THEME,ra),ca=(0,f.registryContextType)();class da extends n.PureComponent{constructor(e,t){super(e,t),this._openSymbolSearchDialog=async e=>{if((0,Y.modifiersFromEvent)(e)===Y.Modifiers.Alt)return void(0,ot.getClipboard)().writeText(this.state.symbol);if(this.state.isOpened)return;const{chartWidgetCollection:t}=this.context,s=t?.activeChartWidget.value().model().model(),o=s?.mainSeries().symbolInfo(),r="option"===o?.type;try{(0,K.trackEvent)("GUI","SS","main search");let t=this._isSpread(this.state.symbol)?this.state.symbol:this.state.shortName;if(i.enabled("symbol_search_option_chain_selector")&&r){const e=await resolveUnderlyingSymbol(this.state.symbol);e&&(t={type:"option",value:this.state.symbol,underlying:e})}await(new oa).show({trackResultsOptions:{trackResults:!1,emptySearchType:"empty_result__supercharts"},onClose:()=>{this.setState({isOpened:!1})},onOpen:()=>{this.setState({isOpened:!0})},shouldReturnFocus:(0,q.isKeyboardClick)(e),defaultValue:t,showSpreadActions:(0,ia.canShowSpreadActions)()&&this.props.isActionsVisible,source:"searchBar",enableOptionsChain:i.enabled("symbol_search_option_chain_selector"),footer:Ie.mobiletouch?void 0:n.createElement(na.SymbolSearchDialogFooter,null,l.t(null,void 0,a(50021)))})}catch(e){}},this._isSpread=e=>!1,this._onSymbolChanged=()=>{const e=r.linking.proSymbol.value();this.setState({symbol:e,shortName:ua(e)})},(0,f.validateRegistry)(t,{chartWidgetCollection:s.any.isRequired}),this.state={symbol:r.linking.proSymbol.value(),shortName:ua(r.linking.proSymbol.value()),isOpened:!1}}componentDidMount(){r.linking.proSymbol.subscribe(this._onSymbolChanged),oa.preload()}componentWillUnmount(){r.linking.proSymbol.unsubscribe(this._onSymbolChanged)}render(){const{id:e,className:t}=this.props;return n.createElement(g.ToolbarButton,{id:e,className:m()(t,i.enabled("uppercase_instrument_names")&&ra.uppercase,ra.smallLeftPadding),theme:ha,icon:la,isOpened:this.state.isOpened,text:this.state.shortName,onClick:this._openSymbolSearchDialog,tooltip:l.t(null,void 0,a(51165))})}async _updateQuotes(e){}}function ua(e){return function(e){return e.includes(":")?e.split(":"):["",e]}(e)[1]}da.contextType=ca;var ma=a(75313);function va(e){return n.createElement("div",{className:u(ma.description,e.className)},e.children)}var pa=a(6917);const ga=(0,rt.mergeThemes)(oe.DEFAULT_POPUP_MENU_ITEM_THEME,{labelRow:pa.labelRow,toolbox:pa.toolbox,
|
||||
item:pa.titleItem}),ba=(0,rt.mergeThemes)(oe.DEFAULT_POPUP_MENU_ITEM_THEME,{labelRow:pa.labelRow,toolbox:pa.toolbox,item:pa.titleItemTabletSmall}),Sa=(0,rt.mergeThemes)(oe.DEFAULT_POPUP_MENU_ITEM_THEME,{item:pa.item}),Ca=(0,rt.mergeThemes)(oe.DEFAULT_POPUP_MENU_ITEM_THEME,{item:pa.itemTabletSmall});function _a(e){const{role:t,className:a,item:i,description:s,favorite:o,isFavoritingAllowed:l,isTabletSmall:r,onApply:h,onRemove:c,onFavor:d,isActive:u,descriptionDataName:v,...p}=e,g=p,[b,S]=(0,xe.useHover)(),C=r?ba:ga,_=r?Ca:Sa,y=(0,n.useCallback)((()=>h(i)),[h,i]),w=(0,n.useCallback)((e=>c(i,e)),[c,i]),f=(0,n.useCallback)((()=>{d&&d(i)}),[d,i]);return n.createElement("div",{...S,...g,className:m()(a,pa.wrap)},n.createElement(A.AccessibleMenuItem,{role:t,theme:C,label:n.createElement(ht.LeadingEmojiText,{text:i.name}),labelRowClassName:m()(r&&pa.itemLabelTabletSmall),isHovered:b,showToolboxOnHover:!o&&!b,showToolboxOnFocus:!0,onClick:y,isActive:u,toolbox:n.createElement(n.Fragment,null,!i.isDefault&&n.createElement(Re.MenuRemoveButton,{key:"remove",hidden:!Ie.touch&&!b,onClick:w,className:m()(pa.remove,u&&pa.active)}),Boolean(d)&&l&&n.createElement(N.MenuFavoriteButton,{key:"favorite",isFilled:Boolean(o),onClick:f}))}),s&&n.createElement(oe.PopupMenuItem,{theme:_,label:n.createElement(va,{className:m()(pa.description,r&&pa.descriptionTabletSmall)},s),onClick:y,isHovered:b,isActive:u,"data-name":v}))}var ya=a(76032);function wa(e){const{item:t}=e,a={...t,isDefault:t.is_default},i={"data-name":t.name,"data-id":t.id,"data-is-default":Boolean(t.is_default)},s=t.meta_info,o=s?(0,ya.getStudyTemplateDescString)(s.indicators):void 0;return n.createElement(_a,{...e,...i,description:o,item:a})}var fa=a(97357);const ka=(0,rt.mergeThemes)(oe.DEFAULT_POPUP_MENU_ITEM_THEME,fa);function Ea(e){const{onClick:t,isTabletSmall:a,className:i,icon:s,title:l,...r}=e;return n.createElement(A.AccessibleMenuItem,{...r,theme:ka,className:m()(i,fa.wrap),label:n.createElement("div",{className:fa.titleWrap},n.createElement("div",{className:m()(fa.title,a&&fa.titleTabletSmall)},n.createElement(o.Icon,{className:fa.icon,icon:s}),n.createElement("div",{className:fa.text},l))),onClick:t})}var Ma=a(36947),Ta=a(64706);const xa=n.createContext(null),Ia=!1;var Ra=a(53707),Aa=a(72154);function Na(e){const{templates:t,recents:i,onTemplateSave:s,onTemplateRemove:o,onTemplateSelect:r,onTemplateFavorite:h,isTabletSmall:c,isLoading:d,onOpenTemplatesDialog:u}=e,v=(0,n.useMemo)((()=>t.filter((e=>e.is_default))),[t]),p=(0,n.useMemo)((()=>t.filter((e=>!e.is_default))),[t]),g=(0,n.useContext)(xa),b=(0,n.useContext)(Ta.MenuContext),S=(0,Ma.useForceUpdate)();(0,n.useEffect)((()=>{if(null!==g){const e={};return g.getOnChange().subscribe(e,(()=>{S(),b&&b.update()})),()=>g.getOnChange().unsubscribeAll(e)}return()=>{}}),[]);const _=(e,t)=>n.createElement(wa,{key:e.name,role:"row",item:e,isFavoritingAllowed:Boolean(h),favorite:null!==e.favorite_date,onApply:r,onFavor:h,onRemove:o,isTabletSmall:c,"data-group-name":t});return n.createElement("div",{role:"treegrid",
|
||||
className:m()(Aa.menu,c&&Aa.menuSmallTablet)},n.createElement(Ea,{role:"row",onClick:s,isTabletSmall:c,icon:Ra,title:(0,Ve.appendEllipsis)(l.t(null,void 0,a(26869))),"aria-haspopup":"dialog"}),d&&n.createElement(n.Fragment,null,n.createElement(C.PopupMenuSeparator,null),n.createElement(pe,null)),!d&&(c?n.createElement(Fa,{defaults:v,customs:p,recents:i,render:_}):n.createElement(Ha,{defaults:v,customs:p,recents:i,render:_,state:g})),Ia)}function Fa(e){const{defaults:t,customs:i,recents:s,render:o}=e;return n.createElement(n.Fragment,null,i.length>0&&n.createElement(n.Fragment,null,n.createElement(C.PopupMenuSeparator,null),n.createElement(ge.ToolWidgetMenuSummary,{className:Aa.menuItemHeaderTabletSmall},l.t(null,void 0,a(83300))),i.map((e=>o(e)))),t.length>0&&n.createElement(n.Fragment,null,n.createElement(C.PopupMenuSeparator,null),n.createElement(ge.ToolWidgetMenuSummary,{className:Aa.menuItemHeaderTabletSmall},l.t(null,void 0,a(46838))),t.map((e=>o(e)))))}function Ha(e){const{defaults:t,customs:i,recents:s,render:o,state:r}=e;return n.createElement(n.Fragment,null,i.length>0&&n.createElement(n.Fragment,null,n.createElement(C.PopupMenuSeparator,null),n.createElement(ge.ToolWidgetMenuSummary,{className:Aa.menuItemHeader},l.t(null,void 0,a(83300))),i.map((e=>o(e)))),i.length>0&&t.length>0&&r&&n.createElement(n.Fragment,null,n.createElement(C.PopupMenuSeparator,null),n.createElement(Le,{role:"row",summary:l.t(null,void 0,a(46838)),open:!r.get().defaultsCollapsed,onStateChange:e=>r.set({defaultsCollapsed:!e})},t.map((e=>o(e))))),0===i.length&&t.length>0&&n.createElement(n.Fragment,null,n.createElement(C.PopupMenuSeparator,null),n.createElement(ge.ToolWidgetMenuSummary,{className:Aa.menuItemHeader},l.t(null,void 0,a(46838))),t.map((e=>o(e)))))}var Oa=a(64147),Da=a(39076);class Ua{constructor(e,t){this._isFavoriteEnabled=i.enabled("items_favoriting"),this.handleFavorTemplate=e=>{if(!this._isFavoriteEnabled)return;const{id:t,is_default:a,favorite_date:i}=e;null!==i?this._removeFavoriteTemplate(t,a):this._addFavoriteTemplate(t,a)},this.handleDropdownOpen=()=>{this._setState({isLoading:!0}),this._studyTemplates.invalidate(),this._studyTemplates.refreshStudyTemplateList((()=>this._setState({isLoading:!1})))},this.handleApplyTemplate=e=>{this._studyTemplates.applyTemplate(e.name),this._recentStudyTemplatesService&&this._recentStudyTemplatesService.add(e.id)},this.handleRemoveTemplate=(e,t,a)=>{this._studyTemplates.deleteStudyTemplate(e.name,t,a)},this.handleSaveTemplate=e=>{this._studyTemplates.showSaveAsDialog(e)},this._studyTemplates=e,this._recentStudyTemplatesService=t;const a=this._recentStudyTemplatesService?.get()||[],n=this._studyTemplates.list();this._state=new Oa.WatchedValue({isLoading:!1,studyTemplatesList:n,recents:a}),this._studyTemplates.getOnChange().subscribe(this,this._handleTemplatesChange),this._recentStudyTemplatesService?.getOnChange().subscribe(this,this._handleRecentsChange),this._studyTemplates.refreshStudyTemplateList()}destroy(){
|
||||
this._studyTemplates.getOnChange().unsubscribe(this,this._handleTemplatesChange),this._recentStudyTemplatesService?.getOnChange().unsubscribe(this,this._handleRecentsChange)}state(){return this._state.readonly()}getSortedFavoritesStudyTemplates(e){return e.filter((e=>null!==e.favorite_date)).sort(((e,t)=>null!==e.favorite_date&&null!==t.favorite_date&&e.favorite_date>t.favorite_date?1:-1))}getValidRecents(e){const t=e.reduce(((e,t)=>(e[t.id]=t,e)),{});return this._state.value().recents.map((e=>t[e])).filter((e=>void 0!==e))}_setState(e){this._state.setValue({...this._state.value(),...e})}_handleTemplatesChange(){this._setState({studyTemplatesList:this._studyTemplates.list()})}_handleRecentsChange(){this._setState({recents:this._recentStudyTemplatesService?.get()||[]})}_removeFavoriteTemplate(e,t){const a=t?Da.backend.favorStandardStudyTemplate:Da.backend.favorStudyTemplate;this._replaceOldFavoriteStudyTemplate(e,null,t),a(e,!1)}_addFavoriteTemplate(e,t){const a=this.getSortedFavoritesStudyTemplates(this._state.value().studyTemplatesList),i=a.length?a[a.length-1].favorite_date:0,n=window.is_authenticated?Date.now():i+1,s=t?Da.backend.favorStandardStudyTemplate:Da.backend.favorStudyTemplate;this._replaceOldFavoriteStudyTemplate(e,n,t),s(e,!0)}_replaceOldFavoriteStudyTemplate(e,t,a){const i=this._state.value().studyTemplatesList.map((i=>i.id===e&&i.is_default===a?{...i,favorite_date:t}:i));this._setState({studyTemplatesList:i})}}var Wa=a(63472),Pa=a(66114);function La(e){const{className:t,children:a,item:i,onApply:s,isActive:o,href:l,target:r}=e,h=i.name??" ",[c,d]=(0,P.useRovingTabindexElement)(null),m=l?"a":s?"button":"div",v=i.tooltip??h,p=(0,Wa.getLeadingEmojiHtml)(v);return n.createElement(m,{ref:c,type:s&&!l?"button":void 0,className:u(t,Pa.item,Pa.accessible,"apply-common-tooltip","common-tooltip-html"),onClick:function(e){if(e.stopPropagation(),s&&l){if((0,T.modifiersFromEvent)(e)!==T.Modifiers.None||1===e.button)return;e.preventDefault()}s?.(i)},onKeyDown:"a"===m?function(e){32===(0,T.hashFromEvent)(e)&&(e.preventDefault(),c.current?.click())}:void 0,"data-tooltip":p,"aria-label":v,tabIndex:d,href:"a"===m?l:void 0,target:"a"===m?r:void 0},n.createElement("div",{className:u(Pa.round,o&&Pa.active)},a||n.createElement(ht.LeadingEmojiText,{text:h,firstSegmentOnly:!0})))}var Va=a(21233),Ba=a(88506);const za=(0,f.registryContextType)();class Za extends n.PureComponent{constructor(e,t){super(e,t),this._updateState=e=>{this.setState({...e,isActive:this.state.isActive})},this._handleApplyTemplate=e=>{this._handleClose(),this._model.handleApplyTemplate(e)},this._handleRemoveTemplate=(e,t,a)=>{this._handleClose(),this._model.handleRemoveTemplate(e,t,a)},this._handleClose=()=>{this._handleToggleDropdown(!1)},this._handleToggleDropdown=e=>{const{isActive:t}=this.state,a="boolean"==typeof e?e:!t;this.setState({isActive:a})},this._handleOpenTemplatesDialog=()=>{isNewTemplatesViewEnabled&&showIndicatorTemplatesDialog(this._model)},(0,f.validateRegistry)(t,{studyTemplates:s.any.isRequired,templatesMenuViewStateService:s.any,
|
||||
recentStudyTemplatesService:s.any});const{recentStudyTemplatesService:a,studyTemplates:i}=t;this._model=new Ua(i,a),this.state={...this._model.state().value(),isActive:!1}}componentDidMount(){this._model.state().subscribe(this._updateState)}componentWillUnmount(){this._model.state().unsubscribe(this._updateState),this._model.destroy()}render(){const{studyTemplatesList:e}=this.state,{isShownQuicks:t,className:a,displayMode:i,id:s}=this.props,o=this._model.getSortedFavoritesStudyTemplates(e),l=this._model.getValidRecents(e);return n.createElement(xa.Provider,{value:this.context.templatesMenuViewStateService||null},n.createElement(Ka,{id:s,className:a,mode:i,templates:e,favorites:o,recents:l,onMenuOpen:this._model.handleDropdownOpen,onTemplateFavorite:t?this._model.handleFavorTemplate:void 0,onTemplateSelect:this._handleApplyTemplate,onTemplateRemove:this._handleRemoveTemplate,onTemplateSave:this._model.handleSaveTemplate,onOpenTemplatesDialog:this._handleOpenTemplatesDialog}))}}function Ka(e){const{id:t,className:i,mode:s,templates:o,favorites:r,recents:h,isMenuOpen:c,onTemplateSelect:u,onTemplateSave:v,onTemplateFavorite:g,onTemplateRemove:b,onOpenTemplatesDialog:S}=e,C=(0,n.useRef)(null),w=(0,n.useRef)(null),f=m()(i,Ba.wrap,{[Ba.full]:"full"===s,[Ba.medium]:"medium"===s}),k="small"!==s&&g&&r.length>0;return n.createElement(p,{id:t,className:f},n.createElement(_.MatchMedia,{rule:y.DialogBreakpoints.TabletSmall},(t=>n.createElement(d.ToolbarMenuButton,{ref:C,menuReference:w,onOpen:e.onMenuOpen,isDrawer:t,drawerPosition:"Bottom",arrow:!1,content:n.createElement(z,{tag:"div",className:m()(k&&Ba.buttonWithFavorites),displayMode:s,isOpened:c,icon:Va,forceInteractive:!0,collapseWhen:["full","medium","small"]}),onClick:M,tooltip:l.t(null,void 0,a(76443)),menuDataName:"indicator-templates-menu"},n.createElement(Na,{onTemplateSave:v,onTemplateSelect:u,onTemplateRemove:E,onTemplateFavorite:g,templates:o,recents:h,isTabletSmall:t,onOpenTemplatesDialog:S})))),k&&n.createElement(qa,{favorites:r,onTemplateSelect:function(e){u(e),M()}}));function E(e,t){if(t&&(0,q.isKeyboardClick)(t)&&w.current){const t=(0,le.queryMenuElements)(w.current),a=t.findIndex((t=>null!==t.closest(`[data-id="${e.id}"]`)));b(e,null,(()=>{if(-1!==a&&w.current){const e=t[a+1]??t[a-1];e?e.focus():(0,le.focusFirstMenuItem)(w.current),C.current?.update()}}))}else b(e)}function M(){0}}function qa(e){return n.createElement(n.Fragment,null,e.favorites.map(((t,a,i)=>n.createElement(La,{key:t.name,item:t,onApply:e.onTemplateSelect,className:m()({[Ba.first]:0===a,[Ba.last]:a===i.length-1})}))))}Za.contextType=za;a(21251);var ja=a(77665),Qa=a(96052),Xa=a(28282);const Ga={undoHotKey:(0,$.hotKeySerialize)({keys:[(0,Y.humanReadableModifiers)(Y.Modifiers.Mod,!1),"Z"],text:"{0} + {1}"}),redoHotKey:(0,$.hotKeySerialize)({keys:[(0,Y.humanReadableModifiers)(Y.Modifiers.Mod,!1),"Y"],text:"{0} + {1}"})},$a=(0,rt.mergeThemes)(g.DEFAULT_TOOLBAR_BUTTON_THEME,Xa),Ya=(0,f.registryContextType)();class Ja extends n.PureComponent{constructor(e,t){super(e,t),this._batched=null,
|
||||
this._handleClickUndo=()=>{(0,K.trackEvent)("GUI","Undo");const{chartWidgetCollection:e}=this.context;e.undoHistory.undo()},this._handleClickRedo=()=>{(0,K.trackEvent)("GUI","Redo");const{chartWidgetCollection:e}=this.context;e.undoHistory.redo()},(0,f.validateRegistry)(t,{chartWidgetCollection:s.any.isRequired}),this.state=this._getStateFromUndoHistory()}componentDidMount(){const{chartWidgetCollection:e}=this.context;e.undoHistory.redoStack().onChange().subscribe(this,this._onChangeStack),e.undoHistory.undoStack().onChange().subscribe(this,this._onChangeStack)}componentWillUnmount(){const{chartWidgetCollection:e}=this.context;e.undoHistory.redoStack().onChange().unsubscribe(this,this._onChangeStack),e.undoHistory.undoStack().onChange().unsubscribe(this,this._onChangeStack),this._batched=null}render(){const{id:e}=this.props,{isEnabledRedo:t,isEnabledUndo:i,redoStack:s,undoStack:o}=this.state;return n.createElement(p,{id:e},n.createElement(g.ToolbarButton,{icon:ja,isDisabled:!i,onClick:this._handleClickUndo,theme:$a,tooltip:i?l.t(null,{replace:{hint:o}},a(66020)):void 0,"data-tooltip-hotkey":i?Ga.undoHotKey:void 0}),n.createElement(g.ToolbarButton,{icon:Qa,isDisabled:!t,onClick:this._handleClickRedo,theme:$a,tooltip:t?l.t(null,{replace:{hint:s}},a(11304)):void 0,"data-tooltip-hotkey":t?Ga.redoHotKey:void 0}))}_onChangeStack(){null===this._batched&&(this._batched=Promise.resolve().then((()=>{if(null===this._batched)return;this._batched=null;const e=this._getStateFromUndoHistory();this.setState(e)})))}_getStateFromUndoHistory(){const{chartWidgetCollection:e}=this.context,t=e.undoHistory.undoStack(),a=e.undoHistory.redoStack(),i=a.head(),n=t.head();return{isEnabledRedo:!a.isEmpty(),isEnabledUndo:!t.isEmpty(),redoStack:i?i.text().translatedText():"",undoStack:n?n.text().translatedText():""}}}Ja.contextType=Ya;const ei=e=>{if((e=>"http://www.w3.org/1999/xhtml"===e?.namespaceURI)(e)&&"true"!==e.dataset.internalAllowKeyboardNavigation){e.tabIndex=-1,e.ariaDisabled="true";for(let t=0;t<e.children.length;t++)ei(e.children.item(t))}};class ti extends n.PureComponent{constructor(){super(...arguments),this._wrapperElement=null,this._resizeObserver=null,this._mutationObserver=null,this._update=()=>{this.forceUpdate()},this._setRef=e=>{this._wrapperElement=e},this._handleMeasure=([e])=>{this.props.width.setValue(e.contentRect.width)},this._handleMutation=([e])=>{"childList"===e.type&&ei(this.props.element)}}componentDidMount(){const{element:e,isFake:t,width:a}=this.props;!t&&this._wrapperElement?(this._resizeObserver=new ResizeObserver(this._handleMeasure),this._mutationObserver=new MutationObserver(this._handleMutation),this._wrapperElement.appendChild(e),this._resizeObserver.observe(this._wrapperElement),this._mutationObserver.observe(e,{subtree:!0,childList:!0})):a.subscribe(this._update)}componentWillUnmount(){const{width:e,isFake:t}=this.props;t&&e.unsubscribe(this._update),this._resizeObserver&&this._wrapperElement&&this._resizeObserver.unobserve(this._wrapperElement),
|
||||
this._mutationObserver&&(this._mutationObserver.disconnect(),this._mutationObserver=null)}render(){const{isFake:e=!1,width:t}=this.props;return n.createElement(p,{ref:this._setRef,style:e?{width:t.value()}:void 0,"data-is-custom-header-element":!0})}}function ai(e){const{displayMode:t,params:a}=e;return n.createElement(d.ToolbarMenuButton,{content:n.createElement(z,{collapseWhen:void 0!==a.icon?void 0:[],displayMode:t,icon:a.icon,text:a.title,"data-name":"dropdown","data-is-custom-header-element":!0}),drawerPosition:"Bottom",drawerBreakpoint:y.DialogBreakpoints.TabletSmall,arrow:!1,tooltip:a.tooltip},a.items.map(((e,t)=>n.createElement(oe.PopupMenuItem,{key:t,label:e.title,onClick:()=>e.onSelect(),"data-name":"dropdown-item"}))))}var ii=a(935);function ni(e){const{className:t,title:a,...i}=e;return n.createElement(Z,{...i,className:u(t,ii.customTradingViewStyleButton,ii.withoutIcon),collapseWhen:[],"data-name":"custom-tradingview-styled-button",tooltip:a})}var si=a(60448);const oi=(0,$.hotKeySerialize)({keys:[(0,Y.humanReadableModifiers)(Y.Modifiers.Mod,!1),"K"],text:"{0} + {1}"}),li=(0,f.registryContextType)();class ri extends n.PureComponent{constructor(e,t){super(e),this._dialog=null,this._updateState=e=>{this.setState({isOpened:e})},this._handleClick=e=>{const{openGlobalSearch:t}=this.context;t({shouldReturnFocus:(0,q.isKeyboardClick)(e)}).then((e=>{this._dialog?.visible().unsubscribe(this._updateState),this._dialog=e,e.visible().subscribe(this._updateState)}))},(0,f.validateRegistry)(t,{openGlobalSearch:s.any.isRequired}),this.state={isOpened:!1}}componentWillUnmount(){this._dialog?.visible().unsubscribe(this._updateState)}render(){return n.createElement(G.ToolbarIconButton,{...this.props,icon:si,isOpened:this.state.isOpened,onClick:this._handleClick,"data-tooltip-hotkey":oi,tooltip:l.t(null,void 0,a(18243))})}}ri.contextType=li;var hi=a(27514),ci=a(27906);function di(){return{Bars:i.enabled("header_chart_type")?W:void 0,Compare:i.enabled("header_compare")?X:void 0,Custom:ti,CustomTradingViewStyledButton:ni,Fullscreen:(0,ci.shouldShowFullscreen)()?ne:void 0,Indicators:i.enabled("header_indicators")?we:void 0,Intervals:i.enabled("header_resolutions")?Xe:void 0,OpenPopup:tt,Properties:i.enabled("header_settings")&&i.enabled("show_chart_property_page")?nt:void 0,SaveLoad:i.enabled("header_saveload")?Rt:void 0,Screenshot:i.enabled("header_screenshot")?ea:void 0,SymbolSearch:i.enabled("header_symbol_search")?da:void 0,Templates:i.enabled("study_templates")?Za:void 0,Dropdown:ai,UndoRedo:i.enabled("header_undo_redo")?Ja:void 0,Layout:undefined,QuickSearch:(0,hi.shouldShowQuickSearchOnLib)()?ri:void 0}}},27906:(e,t,a)=>{"use strict";a.d(t,{shouldShowFullscreen:()=>n});var i=a(56570);function n(){return i.enabled("header_fullscreen_button")}},23076:(e,t,a)=>{"use strict";a.r(t),a.d(t,{SERIES_ICONS:()=>p});var i=a(94670),n=a(32162),s=a(39956),o=a(14083),l=a(45504),r=a(52867),h=a(41473),c=a(31246),d=a(15726),u=a(24464),m=a(71705),v=a(9450);const p={3:i,16:n,0:s,1:o,8:l,9:r,2:h,14:c,15:d,10:u,12:m,13:v}},7986:(e,t,a)=>{
|
||||
"use strict";function i(e){return"https://www.tradingview.com/x/"+e+"/"}a.d(t,{convertImageNameToUrl:()=>i})},7372:(e,t,a)=>{"use strict";function i(e,t){const a=document.createElement("a");a.style.display="none",a.href=t,a.download=e,a.click()}a.d(t,{downloadFile:()=>i})},29142:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="M3.5 8a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM8 2a6 6 0 1 0 3.65 10.76l3.58 3.58 1.06-1.06-3.57-3.57A6 6 0 0 0 8 2Z"/></svg>'},97268:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M8.5 6A2.5 2.5 0 0 0 6 8.5V11h1V8.5C7 7.67 7.67 7 8.5 7H11V6H8.5zM6 17v2.5A2.5 2.5 0 0 0 8.5 22H11v-1H8.5A1.5 1.5 0 0 1 7 19.5V17H6zM19.5 7H17V6h2.5A2.5 2.5 0 0 1 22 8.5V11h-1V8.5c0-.83-.67-1.5-1.5-1.5zM22 19.5V17h-1v2.5c0 .83-.67 1.5-1.5 1.5H17v1h2.5a2.5 2.5 0 0 0 2.5-2.5z"/></svg>'},36992:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M17 6v2.5a2.5 2.5 0 0 0 2.5 2.5H22v-1h-2.5A1.5 1.5 0 0 1 18 8.5V6h-1zm2.5 11a2.5 2.5 0 0 0-2.5 2.5V22h1v-2.5c0-.83.67-1.5 1.5-1.5H22v-1h-2.5zm-11 1H6v-1h2.5a2.5 2.5 0 0 1 2.5 2.5V22h-1v-2.5c0-.83-.67-1.5-1.5-1.5zM11 8.5V6h-1v2.5c0 .83-.67 1.5-1.5 1.5H6v1h2.5A2.5 2.5 0 0 0 11 8.5z"/></svg>'},13090:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M5 7.5C5 6.67 5.67 6 6.5 6h4.2l2 2h8.8c.83 0 1.5.67 1.5 1.5v10c0 .83-.67 1.5-1.5 1.5h-15A1.5 1.5 0 0 1 5 19.5v-12ZM6.5 7a.5.5 0 0 0-.5.5V11h16V9.5a.5.5 0 0 0-.5-.5h-9.2l-2-2H6.5ZM22 12H6v7.5c0 .28.22.5.5.5h15a.5.5 0 0 0 .5-.5V12Z"/></svg>'},6198:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M13.9 14.1V22h1.2v-7.9H23v-1.2h-7.9V5h-1.2v7.9H6v1.2h7.9Z"/></svg>'},99280:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M8.5 6A2.5 2.5 0 0 0 6 8.5v11A2.5 2.5 0 0 0 8.5 22h11a2.5 2.5 0 0 0 2.5-2.5v-3h-1v3c0 .83-.67 1.5-1.5 1.5h-11A1.5 1.5 0 0 1 7 19.5v-11C7 7.67 7.67 7 8.5 7h3V6h-3zm7 1h4.8l-7.49 7.48.71.7L21 7.72v4.79h1V6h-6.5v1z"/></svg>'},60448:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="currentColor"><path d="M17 4v4h2a1 1 0 0 1 .83 1.55l-4 6A1 1 0 0 1 14 15v-4h-2a1 1 0 0 1-.83-1.55l4-6A1 1 0 0 1 17 4m-2 11 4-6h-3V4l-4 6h3z"/><path d="M5 13.5a7.5 7.5 0 0 1 6-7.35v1.02A6.5 6.5 0 1 0 18.98 13h1l.02.5a7.47 7.47 0 0 1-1.85 4.94L23 23.29l-.71.7-4.85-4.84A7.5 7.5 0 0 1 5 13.5"/></svg>'},21233:e=>{
|
||||
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" fill-rule="evenodd" d="M8 7h3a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zM6 8c0-1.1.9-2 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V8zm11-1h3a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zm-2 1c0-1.1.9-2 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2h-3a2 2 0 0 1-2-2V8zm-4 8H8a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1zm-3-1a2 2 0 0 0-2 2v3c0 1.1.9 2 2 2h3a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H8zm9 1h3a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1zm-2 1c0-1.1.9-2 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2h-3a2 2 0 0 1-2-2v-3z"/></svg>'},94670:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" fill-rule="evenodd" d="m25.35 5.35-9.5 9.5-.35.36-.35-.36-4.65-4.64-8.15 8.14-.7-.7 8.5-8.5.35-.36.35.36 4.65 4.64 9.15-9.14.7.7ZM2 21h1v1H2v-1Zm2-1H3v1h1v1h1v-1h1v1h1v-1h1v1h1v-1h1v1h1v-1h1v1h1v-1h1v1h1v-1h1v1h1v-1h1v1h1v-1h1v1h1v-1h1v1h1v-1h1v1h1v-1h-1v-1h1v-1h-1v-1h1v-1h-1v-1h1v-1h-1v-1h1v-1h-1v-1h1v-1h-1v-1h1V9h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v-1h-1v-1h-1v-1h-1v-1h-1v-1h-1v1H9v1H8v1H7v1H6v1H5v1H4v1Zm1 0v1H4v-1h1Zm1 0H5v-1h1v1Zm1 0v1H6v-1h1Zm0-1H6v-1h1v1Zm1 0H7v1h1v1h1v-1h1v1h1v-1h1v1h1v-1h1v1h1v-1h1v1h1v-1h1v1h1v-1h1v1h1v-1h1v1h1v-1h1v-1h-1v-1h1v-1h-1v-1h1v-1h-1v-1h1v-1h-1v-1h1v-1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v-1h-1v-1h-1v-1h-1v-1h-1v-1h-1v1H9v1H8v1H7v1h1v1Zm1 0v1H8v-1h1Zm0-1H8v-1h1v1Zm1 0H9v1h1v1h1v-1h1v1h1v-1h1v1h1v-1h-1v-1h-1v-1h-1v-1h-1v-1h-1v1H9v1h1v1Zm1 0v1h-1v-1h1Zm0-1v-1h-1v1h1Zm0 0v1h1v1h1v-1h-1v-1h-1Zm6 2v-1h1v1h-1Zm2 0v1h-1v-1h1Zm0-1h-1v-1h1v1Zm1 0h-1v1h1v1h1v-1h1v1h1v-1h-1v-1h1v-1h-1v-1h1v-1h-1v-1h1v-1h-1v1h-1v1h-1v1h-1v1h1v1Zm1 0h-1v1h1v-1Zm0-1h1v1h-1v-1Zm0-1h1v-1h-1v1Zm0 0v1h-1v-1h1Zm-4 3v1h-1v-1h1Z"/></svg>'},39956:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M19 6h-1v7h-3v1h3v8h1v-3h3v-1h-3V6ZM11 7h-1v13H7v1h3v2h1V10h3V9h-3V7Z"/></svg>'},24464:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="m10.49 7.55-.42.7-2.1 3.5.86.5 1.68-2.8 1.8 2.82.84-.54-2.23-3.5-.43-.68Zm12.32 4.72-.84-.54 2.61-4 .84.54-2.61 4Zm-5.3 6.3 1.2-1.84.84.54-1.63 2.5-.43.65-.41-.65-1.6-2.5.85-.54 1.17 1.85ZM4.96 16.75l.86.52-2.4 4-.86-.52 2.4-4ZM3 14v1h1v-1H3Zm2 0h1v1H5v-1Zm2 0v1h1v-1H7Zm2 0h1v1H9v-1Zm2 0v1h1v-1h-1Zm2 0h1v1h-1v-1Zm2 0v1h1v-1h-1Zm2 0h1v1h-1v-1Zm2 0v1h1v-1h-1Zm2 0h1v1h-1v-1Zm2 0v1h1v-1h-1Zm2 0h1v1h-1v-1Z"/></svg>'},14083:e=>{
|
||||
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="currentColor"><path d="M17 11v6h3v-6h-3zm-.5-1h4a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-.5.5h-4a.5.5 0 0 1-.5-.5v-7a.5.5 0 0 1 .5-.5z"/><path d="M18 7h1v3.5h-1zm0 10.5h1V21h-1z"/><path d="M9 8v12h3V8H9zm-.5-1h4a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-.5.5h-4a.5.5 0 0 1-.5-.5v-13a.5.5 0 0 1 .5-.5z"/><path d="M10 4h1v3.5h-1zm0 16.5h1V24h-1z"/></svg>'},53707:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><g fill="none"><path stroke="currentColor" d="M11 20.5H7.5a5 5 0 1 1 .42-9.98 7.5 7.5 0 0 1 14.57 2.1 4 4 0 0 1-1 7.877H18"/><path stroke="currentColor" d="M14.5 24V12.5M11 16l3.5-3.5L18 16"/></g></svg>'},9450:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" fill-rule="evenodd" d="M12 7v14h5V7h-5Zm4 1h-3v12h3V8ZM19 15v6h5v-6h-5Zm4 1h-3v4h3v-4ZM5 12h5v9H5v-9Zm1 1h3v7H6v-7Z"/></svg>'},1393:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M13.5 6a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17zM4 14.5a9.5 9.5 0 1 1 19 0 9.5 9.5 0 0 1-19 0z"/><path fill="currentColor" d="M9 14h4v-4h1v4h4v1h-4v4h-1v-4H9v-1z"/></svg>'},45504:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="currentColor"><path d="M9 8v12h3V8H9zm-1-.502C8 7.223 8.215 7 8.498 7h4.004c.275 0 .498.22.498.498v13.004a.493.493 0 0 1-.498.498H8.498A.496.496 0 0 1 8 20.502V7.498z"/><path d="M10 4h1v3.5h-1z"/><path d="M17 6v6h3V6h-3zm-1-.5c0-.276.215-.5.498-.5h4.004c.275 0 .498.23.498.5v7c0 .276-.215.5-.498.5h-4.004a.503.503 0 0 1-.498-.5v-7z"/><path d="M18 2h1v3.5h-1z"/></svg>'},71705:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M7.5 7H7v14h5V7H7.5zM8 20V8h3v12H8zm7.5-11H15v10h5V9h-4.5zm.5 9v-8h3v8h-3z"/></svg>'},32162:e=>{
|
||||
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="currentColor"><path fill-rule="evenodd" d="M22 3h1v1h-1V3Zm0 2V4h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1V9h-1V8h-1V7h-1V6h-1V5h-1v1H9v1H8v1H7v1H6v1H5v1H4v1h1v1H4v1h1v-1h1v-1h1v-1h1v-1h1V9h1V8h1v1h1v1h1v1h1v1h1v1h1v-1h1v-1h1v-1h1V9h1V8h1V7h1V6h1V5h-1Zm-1 1V5h1v1h-1Zm-1 1V6h1v1h-1Zm-1 1V7h1v1h-1Zm-1 1V8h1v1h-1Zm-1 1V9h1v1h-1Zm-1 1v-1h1v1h-1Zm-1 0v-1h-1V9h-1V8h-1V7h-1V6h-1v1H9v1H8v1H7v1H6v1H5v1h1v-1h1v-1h1V9h1V8h1V7h1v1h1v1h1v1h1v1h1Zm0 0h1v1h-1v-1Zm.84 6.37 7.5-7-.68-.74-7.15 6.67-4.66-4.65-.33-.34-.36.32-5.5 5 .68.74 5.14-4.68 4.67 4.66.34.35.35-.33ZM6 23H5v1h1v-1Zm0-1H5v-1h1v1Zm1 0v1H6v-1h1Zm0-1H6v-1h1v1Zm1 0v1H7v-1h1Zm0-1H7v-1h1v1Zm1 0v1H8v-1h1Zm0-1H8v-1h1v1Zm1 0v1H9v-1h1Zm0-1H9v-1h1v1Zm1 0h-1v1h1v1h1v1h1v1h1v1h1v1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h-1v-1h1v-1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v-1h-1v-1h-1v-1h-1v-1h-1v-1h-1v1h1v1Zm0 0h1v1h-1v-1Zm2 2v1h1v1h1v1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v-1h-1v-1h-1Zm0 0v-1h-1v1h1Z"/></svg>'},52867:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="currentColor"><path d="M17 11v6h3v-6h-3zm-.5-1h4a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-.5.5h-4a.5.5 0 0 1-.5-.5v-7a.5.5 0 0 1 .5-.5z"/><path d="M18 7h1v3.5h-1zm0 10.5h1V21h-1z"/><path d="M9 8v11h3V8H9zm-.5-1h4a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5h-4a.5.5 0 0 1-.5-.5v-12a.5.5 0 0 1 .5-.5z"/><path d="M10 4h1v5h-1zm0 14h1v5h-1zM8.5 9H10v1H8.5zM11 9h1.5v1H11zm-1 1h1v1h-1zm-1.5 1H10v1H8.5zm2.5 0h1.5v1H11zm-1 1h1v1h-1zm-1.5 1H10v1H8.5zm2.5 0h1.5v1H11zm-1 1h1v1h-1zm-1.5 1H10v1H8.5zm2.5 0h1.5v1H11zm-1 1h1v1h-1zm-1.5 1H10v1H8.5zm2.5 0h1.5v1H11z"/></svg>'},39681:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="none"><path stroke="currentColor" d="M20 17l-5 5M15 17l5 5M9 11.5h7M17.5 8a2.5 2.5 0 0 0-5 0v11a2.5 2.5 0 0 1-5 0"/></svg>'},31246:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="currentColor"><path fill-rule="evenodd" d="m18.43 15.91 6.96-8.6-.78-.62-6.96 8.6a2.49 2.49 0 0 0-2.63.2l-2.21-2.02A2.5 2.5 0 0 0 10.5 10a2.5 2.5 0 1 0 1.73 4.3l2.12 1.92a2.5 2.5 0 1 0 4.08-.31ZM10.5 14a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm7.5 3.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"/><path d="M8.37 13.8c.17.3.4.54.68.74l-5.67 6.78-.76-.64 5.75-6.88Z"/></svg>'},41473:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="m25.39 7.31-8.83 10.92-6.02-5.47-7.16 8.56-.76-.64 7.82-9.36 6 5.45L24.61 6.7l.78.62Z"/></svg>'},82436:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 21 21" width="21" height="21"><g fill="none" stroke="currentColor"><path d="M18.5 11v5.5a2 2 0 0 1-2 2h-13a2 2 0 0 1-2-2v-13a2 2 0 0 1 2-2H9"/><path stroke-linecap="square" d="M18 2l-8.5 8.5m4-9h5v5"/></g></svg>'},96052:e=>{
|
||||
@@ -1,8 +1,8 @@
|
||||
(()=>{"use strict";var e,a,c,d,f,b={},t={};function o(e){var a=t[e];if(void 0!==a)return a.exports;var c=t[e]={id:e,loaded:!1,exports:{}};return b[e].call(c.exports,c,c.exports,o),c.loaded=!0,c.exports}o.m=b,o.c=t,o._plural={ar:(e,a=6,c=(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11&&e%100<=99?4:5))=>null==e?0:+c,cs:(e,a=4,c=(1==e?0:e>=2&&e<=4?1:0!=e?2:3))=>null==e?0:+c,ru:(e,a=3,c=(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2))=>null==e?0:+c,ro:(e,a=3,c=(1==e?0:e%100>19||e%100==0&&0!=e?2:1))=>null==e?0:+c,pl:(e,a=3,c=(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2))=>null==e?0:+c,pt:(e,a=2,c=1!=e)=>null==e?0:+c,de:(e,a=2,c=1!=e)=>null==e?0:+c,en:(e,a=2,c=1!=e)=>null==e?0:+c,es:(e,a=2,c=1!=e)=>null==e?0:+c,sv:(e,a=2,c=1!=e)=>null==e?0:+c,it:(e,a=2,c=1!=e)=>null==e?0:+c,tr:(e,a=2,c=1!=e)=>null==e?0:+c,el:(e,a=2,c=1!=e)=>null==e?0:+c,fr:(e,a=2,c=e>1)=>null==e?0:+c,fa:(e,a=1,c=0)=>null==e?0:+c,ja:(e,a=1,c=0)=>null==e?0:+c,ko:(e,a=1,c=0)=>null==e?0:+c,th:(e,a=1,c=0)=>null==e?0:+c,vi:(e,a=1,c=0)=>null==e?0:+c,zh:(e,a=1,c=0)=>null==e?0:+c,he_IL:(e,a=4,c=(1==e?0:2==e?1:e>10&&e%10==0?2:3))=>null==e?0:+c,ca_ES:(e,a=2,c=1!=e)=>null==e?0:+c,nl_NL:(e,a=2,c=1!=e)=>null==e?0:+c,hu_HU:(e,a=2,c=1!=e)=>null==e?0:+c,id_ID:(e,a=1,c=0)=>null==e?0:+c,ms_MY:(e,a=1,c=0)=>null==e?0:+c,zh_TW:(e,a=1,c=0)=>null==e?0:+c},e=[],o.O=(a,c,d,f)=>{if(!c){var b=1/0;for(r=0;r<e.length;r++){for(var[c,d,f]=e[r],t=!0,l=0;l<c.length;l++)(!1&f||b>=f)&&Object.keys(o.O).every((e=>o.O[e](c[l])))?c.splice(l--,1):(t=!1,f<b&&(b=f));if(t){e.splice(r--,1);var n=d();void 0!==n&&(a=n)}}return a}f=f||0;for(var r=e.length;r>0&&e[r-1][2]>f;r--)e[r]=e[r-1];e[r]=[c,d,f]},o.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return o.d(a,{a}),a},c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(e,d){if(1&d&&(e=this(e)),8&d)return e;if("object"==typeof e&&e){if(4&d&&e.__esModule)return e;if(16&d&&"function"==typeof e.then)return e}var f=Object.create(null);o.r(f);var b={};a=a||[null,c({}),c([]),c(c)];for(var t=2&d&&e;"object"==typeof t&&!~a.indexOf(t);t=c(t))Object.getOwnPropertyNames(t).forEach((a=>b[a]=()=>e[a]));return b.default=()=>e,o.d(f,b),f},o.d=(e,a)=>{for(var c in a)o.o(a,c)&&!o.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:a[c]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((a,c)=>(o.f[c](e,a),a)),[])),
|
||||
o.u=e=>7827===e?"__LANG__.7827.ea2deb999b0c771280eb.js":8370===e?"__LANG__.8370.da37ca095a984f601a1e.js":2134===e?"__LANG__.2134.fb8463bf93e547b8a24f.js":1303===e?"__LANG__.1303.f07c410173ec0b804b22.js":3357===e?"__LANG__.3357.613d24759e11646b0997.js":3597===e?"__LANG__.3597.9c639cb519af03750b8e.js":2530===e?"__LANG__.2530.6108ccc54d7b804c8af1.js":2686===e?"__LANG__.2686.a0ecdb8d162712f1b9c2.js":6822===e?"__LANG__.6822.4179cccc2fa59f991bf4.js":2486===e?"__LANG__.2486.11825549d0f3e1fd5ee7.js":4040===e?"__LANG__.4040.333002e872dd8b0c1c95.js":6703===e?"__LANG__.6703.bdb6f2f6c5d635dc479f.js":6838===e?"__LANG__.6838.b209fab6f81d9054b17c.js":6406===e?"__LANG__.6406.78b7e0b0b9555ce886a5.js":2199===e?"__LANG__.2199.5cc70080a81e97402902.js":5202===e?"__LANG__.5202.af93f71b1250800e1711.js":6342===e?"__LANG__.6342.6af643b9a34abf3f6313.js":359===e?"__LANG__.359.3c5835e59f61404fe3cc.js":7714===e?"__LANG__.7714.fb6a9318f826d9829d2d.js":9003===e?"__LANG__.9003.299a55ed654df75bf43b.js":6290===e?"__LANG__.6290.a5f1298c89f78011c7d7.js":8940===e?"__LANG__.8940.5460b0ccfae157b7bbe3.js":6645===e?"__LANG__.6645.638c62337337129de9dc.js":3355===e?"__LANG__.3355.c5e027afabcecc85b871.js":3181===e?"__LANG__.3181.259d07263a732c089332.js":2787===e?"__LANG__.2787.b95db3c8cfe7fab3c811.js":9494===e?"__LANG__.9494.40d61f8ac3ffd8535658.js":1427===e?"__LANG__.1427.8971bd84437c851f01a9.js":7952===e?"__LANG__.7952.0cb83b58212a65904f9d.js":1308===e?"__LANG__.1308.d1a986137a3ad4cdfe66.js":6760===e?"__LANG__.6760.d667b4a17bb7e3977273.js":6155===e?"__LANG__.6155.0d55563600ea0d002811.js":3367===e?"__LANG__.3367.8357e9248b9de0310231.js":2303===e?"__LANG__.2303.a9546f2924221b57a144.js":1432===e?"__LANG__.1432.d43e80e1d49b8e361fa5.js":8763===e?"__LANG__.8763.bf9d4d175a7686effaf6.js":7850===e?"__LANG__.7850.c4f446fdb53937cc86cb.js":7122===e?"__LANG__.7122.b56804d4455c3a0204dd.js":4543===e?"__LANG__.4543.af2e0ddd821d5bacf27b.js":5111===e?"__LANG__.5111.0e84f778015dc1f067f1.js":2342===e?"__LANG__.2342.4e495e3da576be4868f7.js":5402===e?"__LANG__.5402.f7a00bf7d82b9a40920d.js":4821===e?"__LANG__.4821.0124e1463859eb34b0d7.js":4593===e?"__LANG__.4593.99cfdf832ec7f90cc2a7.js":6655===e?"__LANG__.6655.0fd2fe635955f6cfa2ba.js":4109===e?"__LANG__.4109.921da6023cc8aa9fe3a5.js":9093===e?"__LANG__.9093.2cff9fa939c391056de4.js":8975===e?"__LANG__.8975.0b3e843255e92a8c2808.js":8622===e?"__LANG__.8622.b162b43310f56287e24e.js":6778===e?"__LANG__.6778.cb295f9cefe08c721b2c.js":5683===e?"__LANG__.5683.0a2c985dba54512056ce.js":7328===e?"__LANG__.7328.6e079881a6ff4ded3dbf.js":8356===e?"__LANG__.8356.3131cfefc19bf35ba006.js":4166===e?"__LANG__.4166.e3c369fb8ae4775c7f89.js":1715===e?"__LANG__.1715.48491249cfe3a1a8a335.js":5862===e?"__LANG__.5862.3039f470825daf65b9d6.js":1629===e?"__LANG__.1629.7afd8c16ef79eab8b22e.js":1190===e?"__LANG__.1190.9767233fd3baf9052411.js":101===e?"__LANG__.101.d2f212f7ba1b45845d9f.js":({92:"chart-screenshot-hint",139:"get-error-card",319:"line-tool-table",341:"line-tool-schiff-pitchfork2",360:"demonstration-highlighter",380:"line-tool-price-note",
|
||||
507:"study-pane-views",569:"line-tool-arrow-mark",574:"line-tool-horizontal-ray",607:"study-property-pages-with-definitions",620:"tablecontext-menu",688:"line-tool-callout",731:"add-compare-dialog",906:"line-tool-fib-speed-resistance-fan",925:"line-tool-extended",961:"line-tool-path",1155:"line-tool-5points-pattern",1277:"line-tool-balloon",1282:"line-tool-vertical-line",1313:"line-tool-pitch-fan",1314:"line-tool-position",1455:"line-tool-date-and-price-range",1470:"line-tool-arrow-marker",1506:"line-tool-fib-timezone",1583:"lt-pane-views",1584:"context-menu-renderer",1702:"manage-drawings-dialog",1713:"line-tool-sine-line",1754:"symbol-search-dialog",1859:"go-to-date-dialog-impl",1890:"line-tools-icons",1963:"line-tool-gann-complex",2050:"line-tool-parallel-channel",2077:"change-interval-dialog",2087:"line-tool-highlighter",2183:"study-inputs-pane-views",2232:"line-tool-order",2277:"line-tool-risk-reward-long",2283:"line-tool-fib-channel",2306:"floating-toolbars",2312:"line-tool-text",2377:"hammerjs",2413:"custom-themes-api",2704:"currency-label-menu",2816:"line-tool-fib-circles",2878:"drawing-toolbar",3005:"header-toolbar",3030:"new-confirm-inputs-dialog",3248:"line-tool-note",3314:"line-tool-fib-wedge",3378:"line-tool-head-and-shoulders",3383:"line-tool-triangle-pattern",3555:"price-scale-mode-buttons-renderer",3596:"general-property-page",3710:"line-tool-fib-speed-resistance-arcs",3723:"line-tool-fib-retracement",3866:"line-tool-poly-line",3945:"line-tool-projection",3966:"line-tool-comment",4013:"custom-intervals-add-dialog",4015:"line-tool-rotated-rectangle",4079:"series-pane-views",4201:"line-tool-horizontal-line",4273:"line-tool-date-range",4389:"take-chart-image-impl",4598:"delete-locked-line-confirm-dialog-content",4602:"line-tool-three-drivers",4665:"share-chart-to-social-utils",4674:"line-tool-signpost",4731:"line-tool-trend-based-fib-extension",4862:"object-tree-dialog",4934:"line-tool-ray",4981:"line-tool-gann-fan",5009:"load-chart-dialog",5055:"line-tool-pitchfork",5093:"chart-widget-gui",5122:"line-tool-brush",5206:"line-tool-bars-pattern",5231:"line-tool-image",5248:"library-studies",5283:"line-tool-abcd",5500:"line-tool-anchored-vwap",5516:"restricted-toolset",5529:"line-tool-emoji",5551:"favorite-drawings-api",5565:"ichart-storage",5592:"chart-text-editor-renderer",5598:"lt-stickers-atlas",5639:"currency-label-menu-events",5695:"line-tool-volume-profile",5967:"line-tool-arc",6124:"chart-storage-library-http",6166:"chart-event-hint",6265:"new-edit-object-dialog",6336:"line-tool-gann-fixed",6432:"line-tool-triangle",6456:"study-market",6477:"line-tool-price-range",6484:"line-tool-price-label",6631:"study-template-dialog",6740:"line-tool-cypher-pattern",6748:"line-tool-circle",6768:"line-tool-risk-reward-short",6780:"source-properties-editor",7038:"insert-image-dialog",7078:"general-chart-properties-dialog",7127:"line-tool-trend-based-fib-time",7129:"line-tools-synchronizer",7175:"line-tool-schiff-pitchfork",7203:"line-tool-cross-line",7260:"chart-bottom-toolbar",7271:"compare-model",
|
||||
7488:"line-tool-info-line",7539:"studies",7563:"line-tool-ghost-feed",7648:"show-theme-save-dialog",7660:"line-tool-ellipse",7806:"line-tool-icon",7987:"lt-icons-atlas",8020:"user-defined-bars-marks-tooltip",8061:"line-tool-bezier-quadro",8090:"line-tool-fib-spiral",8313:"chart-storage-external-adapter",8334:"line-tool-time-cycles",8372:"line-tool-trend-angle",8422:"line-tool-rectangle",8468:"line-tool-inside-pitchfork",8537:"lt-property-pages-with-definitions",8607:"line-tool-arrow",8643:"full-tooltips-popup",8673:"line-tool-trend-line",8820:"line-tool-flag-mark",8890:"simple-dialog",8949:"line-tool-sticker",9014:"line-tool-bezier-cubic",9039:"lollipop-tooltip-renderer",9123:"line-tool-text-note",9310:"line-tool-flat-bottom",9374:"symbol-info-dialog-impl",9445:"line-tool-cyclic-lines",9478:"line-tool-gann-square",9498:"export-data",9534:"line-tool-prediction",9581:"line-tool-disjoint-channel",9685:"series-icons-map",9748:"line-tool-regression-trend",9754:"global-search-dialog",9790:"favorite-indicators"}[e]||e)+"."+{92:"9c2d9ee1d1ca65a8aa27",116:"7a938e628dae74ba527c",139:"04b8d60c4104ce77bfae",319:"1eb09cfdedf2e78f577d",341:"4aa71e356859926db3a2",360:"f67ae87ec1068bb8268d",380:"d8636434a285be606160",422:"9335b7df4365e97cbb6a",507:"b80513f731e4b3a193eb",569:"19e8b788cdb0919595a2",574:"5ef049b044be26e418f0",601:"bc292726a701d789f4a8",607:"64f8a2015ef4c1b12a01",620:"73067184a7f2d03f3339",625:"c3f879df6a8d4a1c054d",643:"b5b634495eec3f1b3c14",653:"e6c7e6c622f6a200dcdc",688:"6c101e4f7fd73db50bc0",731:"ec30ead58b8dc51afd61",769:"7eb483a16682eb9ba9b6",779:"4eec9138a97bf5ff8a8a",906:"dca6ff066c5fdc6feeef",925:"120362ea002d3bfcbf30",961:"d999333ab31c578011b9",1072:"be3a8a7d09f34e875a1e",1155:"6263308902575ad8a026",1200:"04b28fea9e7b7b64a167",1252:"c5de90e9c298e410878e",1277:"848baff09cb27b6dbf01",1282:"382e7e3c5f0c8a15938a",1313:"6bb3c812b7e898c9bab3",1314:"b2935b11001a6b3d8dba",1390:"ffdc2b9032c730265212",1455:"fe461cde786ddb040db9",1470:"ef1d87c6fcc9f4200c3c",1506:"1be7aea3345f62c946c0",1531:"2f8518f3d19f709e4655",1553:"ee2f0024a59277fd480e",1583:"cf9d7448e928a6e8c713",1584:"7fff087c0bda17935d02",1667:"0cef8caf292dbf333c02",1702:"d398b4b164bfe467f5d9",1713:"672ae4cff5daaebdbb5c",1737:"a88f1ff138fca90aaa14",1754:"98819995db912ba0a146",1833:"a12ca3d3e3276fb1b461",1859:"2964d9695fbef38df17c",1890:"6270f97faffd65a49d40",1906:"434b4be8cda98af43453",1933:"510498d67c9b20798afa",1963:"8f27bb6c7b49cba52180",2050:"cedec45efced95505b7d",2077:"43c303b12db18a924490",2087:"2d3e8ad7c47abff0b80b",2157:"f319e735be765995ca4f",2183:"40514e36e1d2d7e2e969",2197:"9e441b34254e9ebf8757",2227:"c1c4b4d4d12f9774793f",2232:"6295ec35522b8432a85e",2277:"72b60477bb30e1a62478",2283:"30c52a07e502b48ab09b",2306:"9b713cdcc2aaf0749bbb",2312:"b8d0d264b42c15f28456",2371:"d7c78ac916c18b933246",2377:"6e30e0c48af40bf2f6c0",2413:"e9919f26ec0be3a614ae",2440:"e433d90edf053f8432de",2444:"140908ac04f81fa39b26",2544:"883cdc36b20a2dd3223f",2564:"d2a3fd8f9cddcf5264c3",2704:"574a3b52565fb7ee430a",2709:"6489d5a6a0a85376efba",2736:"066be336f75b34bccc10",
|
||||
2751:"345d26923caaf2a9f33e",2816:"09127ece526330287314",2864:"3c2bc645c073a6505d89",2878:"ae90b75d73d48a9b8e94",3005:"fc001887c9d93a522563",3030:"afc7a08821bc5df64ef9",3202:"3dd097b08ddcf065e475",3248:"6b0c21a5d86658ee9809",3314:"2000cb0299da9d5c270a",3362:"cc61c557540cab7abba0",3378:"39551a52d95c24cfddb3",3383:"47f266dbf2efbe2162c4",3489:"630ed945efafcecf2e20",3555:"7e813f280229de3d710b",3596:"8e71fcfef583b7d9ce35",3693:"eba6a9041db303dd8bdd",3703:"34314901d1086db0e25e",3710:"fa637d08945b1678e88d",3723:"68c994793ce5b4c1bc5f",3745:"ca0dc4793963821e17cf",3746:"f97f0fb65128649c7cd8",3799:"57b13fc53ae3cdf9b02f",3828:"dd3b3ab9b1e9037c5d53",3866:"492a52ede167918754e7",3889:"1f275e258565cbaf0d8e",3945:"7454f552122a38f36db3",3953:"074939cda643555b9fa0",3960:"2cda395cf5c2cfa1f887",3966:"2b6661ea10d34449f371",3999:"ad1f87e790552238f74a",4013:"77db9d4f9796ed64c643",4015:"9b7648d4802398a8cb51",4052:"9999fdd036dbbf203b10",4057:"debdf4bb4205c8a4ca75",4066:"f51f4a04f2ec9db826e7",4079:"2960218970c17f66f4d5",4106:"39a4b0e746d3a222c47b",4137:"0f18ca5eea411d63b805",4170:"7b0f546ce3800398472d",4178:"1d0b7074e5333864ae92",4201:"810ec7b5447df5f931f8",4256:"264ea6b0e6a4742d480c",4273:"c2c265a1a3a29e00e706",4353:"7cc84e240b93d6e7e35f",4389:"06b7f0e04f7a2a290f26",4411:"c49ed08264e4ecdc3778",4482:"0748ddf46b77df1b2821",4524:"3aeb32cd32e5da655aa5",4556:"681e1cb78cccc175cab8",4598:"53a9c5f5df1264b687e2",4600:"09e4c4cc50200b9e6850",4602:"ae561b848687458ec130",4665:"e6a25f4006607ca48421",4674:"b5ce2c69346d2c87c146",4731:"146698ab896428effa70",4862:"260a976938e387b0726b",4876:"7897d3efdf28cba97d62",4931:"6008b4d2694ba4532170",4934:"8b76cff032095f9115fe",4981:"22c773e811ba8b2d7caa",5009:"3a80aaa8a3780555d7bf",5055:"5418a2d34d6b78f716dc",5058:"99cc5cca8222cb165435",5083:"46b0c5fd2a360051603e",5093:"778d7660018ea7f20de1",5099:"3cfd2de22e6258d2a292",5122:"ee0f230877d5db0665c5",5168:"e337b19e191fd77bb91b",5206:"fd9c8e049ac79fbcc2fb",5231:"f18d8a63cf1dd81f0d88",5248:"538702d65096d9a3d6b4",5283:"c98d47bf3b71d452d58b",5323:"f0f2e4cd72aef7561792",5375:"40c7f0a13dfd0b073241",5378:"271e40afdba3994a941e",5387:"1fb6a179200ed9f9d598",5446:"34d25f33d4a5377fc9b5",5480:"872f4f12e150c051ec76",5500:"294e75f950a6600b59c2",5516:"a6e7e2f78b1b06748db5",5529:"4877448f5bb1b9f3de05",5551:"ec1abe78f54ce91e86da",5565:"1144e5a1b4f8503ee572",5579:"06f240fa157f3f88c0d9",5592:"96aa1d6a274550df5c5e",5598:"28f311a546f5aa99113a",5639:"e269bd9e406f041eb8d5",5695:"52417dee6aa5037e0294",5699:"491feb1ed1bf2b4f9aaf",5826:"ebf365249c45db1ffdaf",5967:"d2e2962fd7645f47f876",5975:"b7cae9993c5dd48e5a93",6124:"4fb8f2a7e2c0b2ac7071",6164:"d777d634896ff9f161e6",6166:"beb5ba75e0d99ca0d3ec",6190:"ba40b4eca0e5787a7131",6262:"50bf96239e95bd5526f8",6265:"085c77106105c12777fe",6316:"f4ad5200fc2f7cfac880",6336:"3db1ca2ccff68d9c5618",6432:"55b8d2807089ae6869ee",6445:"35b87669babb3c0df14e",6456:"e9c97c4731663ba0ad49",6477:"ec0e1080c347b97c9812",6484:"9928d8c78aa8e2e8686c",6489:"bc05b17c8a898e58bbac",6631:"57f98e80e7d8c0045366",6710:"04d48637cfbf4dd81f30",6740:"b08efdd378a6e81ef8d2",
|
||||
7488:"line-tool-info-line",7539:"studies",7563:"line-tool-ghost-feed",7648:"show-theme-save-dialog",7660:"line-tool-ellipse",7806:"line-tool-icon",7987:"lt-icons-atlas",8020:"user-defined-bars-marks-tooltip",8061:"line-tool-bezier-quadro",8090:"line-tool-fib-spiral",8313:"chart-storage-external-adapter",8334:"line-tool-time-cycles",8372:"line-tool-trend-angle",8422:"line-tool-rectangle",8468:"line-tool-inside-pitchfork",8537:"lt-property-pages-with-definitions",8607:"line-tool-arrow",8643:"full-tooltips-popup",8673:"line-tool-trend-line",8820:"line-tool-flag-mark",8890:"simple-dialog",8949:"line-tool-sticker",9014:"line-tool-bezier-cubic",9039:"lollipop-tooltip-renderer",9123:"line-tool-text-note",9310:"line-tool-flat-bottom",9374:"symbol-info-dialog-impl",9445:"line-tool-cyclic-lines",9478:"line-tool-gann-square",9498:"export-data",9534:"line-tool-prediction",9581:"line-tool-disjoint-channel",9685:"series-icons-map",9748:"line-tool-regression-trend",9754:"global-search-dialog",9790:"favorite-indicators"}[e]||e)+"."+{92:"9c2d9ee1d1ca65a8aa27",116:"7a938e628dae74ba527c",139:"04b8d60c4104ce77bfae",319:"1eb09cfdedf2e78f577d",341:"4aa71e356859926db3a2",360:"f67ae87ec1068bb8268d",380:"d8636434a285be606160",422:"9335b7df4365e97cbb6a",507:"b80513f731e4b3a193eb",569:"19e8b788cdb0919595a2",574:"5ef049b044be26e418f0",601:"bc292726a701d789f4a8",607:"64f8a2015ef4c1b12a01",620:"73067184a7f2d03f3339",625:"c3f879df6a8d4a1c054d",643:"b5b634495eec3f1b3c14",653:"e6c7e6c622f6a200dcdc",688:"6c101e4f7fd73db50bc0",731:"81007d0d3f1ec11f97c8",769:"7eb483a16682eb9ba9b6",779:"4eec9138a97bf5ff8a8a",906:"dca6ff066c5fdc6feeef",925:"120362ea002d3bfcbf30",961:"d999333ab31c578011b9",1072:"be3a8a7d09f34e875a1e",1155:"6263308902575ad8a026",1200:"04b28fea9e7b7b64a167",1252:"c5de90e9c298e410878e",1277:"848baff09cb27b6dbf01",1282:"382e7e3c5f0c8a15938a",1313:"6bb3c812b7e898c9bab3",1314:"b2935b11001a6b3d8dba",1390:"ffdc2b9032c730265212",1455:"fe461cde786ddb040db9",1470:"ef1d87c6fcc9f4200c3c",1506:"1be7aea3345f62c946c0",1531:"2f8518f3d19f709e4655",1553:"ee2f0024a59277fd480e",1583:"cf9d7448e928a6e8c713",1584:"7fff087c0bda17935d02",1667:"0cef8caf292dbf333c02",1702:"d398b4b164bfe467f5d9",1713:"672ae4cff5daaebdbb5c",1737:"a88f1ff138fca90aaa14",1754:"98819995db912ba0a146",1833:"a12ca3d3e3276fb1b461",1859:"2964d9695fbef38df17c",1890:"6270f97faffd65a49d40",1906:"434b4be8cda98af43453",1933:"510498d67c9b20798afa",1963:"8f27bb6c7b49cba52180",2050:"cedec45efced95505b7d",2077:"43c303b12db18a924490",2087:"2d3e8ad7c47abff0b80b",2157:"f319e735be765995ca4f",2183:"40514e36e1d2d7e2e969",2197:"9e441b34254e9ebf8757",2227:"c1c4b4d4d12f9774793f",2232:"6295ec35522b8432a85e",2277:"72b60477bb30e1a62478",2283:"30c52a07e502b48ab09b",2306:"9b713cdcc2aaf0749bbb",2312:"b8d0d264b42c15f28456",2371:"d7c78ac916c18b933246",2377:"6e30e0c48af40bf2f6c0",2413:"8b5298317cb99fbbf8c4",2440:"e433d90edf053f8432de",2444:"140908ac04f81fa39b26",2544:"883cdc36b20a2dd3223f",2564:"d2a3fd8f9cddcf5264c3",2704:"574a3b52565fb7ee430a",2709:"6489d5a6a0a85376efba",2736:"066be336f75b34bccc10",
|
||||
2751:"345d26923caaf2a9f33e",2816:"09127ece526330287314",2864:"3c2bc645c073a6505d89",2878:"ae90b75d73d48a9b8e94",3005:"b988704f5babf67fa9a6",3030:"afc7a08821bc5df64ef9",3202:"3dd097b08ddcf065e475",3248:"6b0c21a5d86658ee9809",3314:"2000cb0299da9d5c270a",3362:"cc61c557540cab7abba0",3378:"39551a52d95c24cfddb3",3383:"47f266dbf2efbe2162c4",3489:"630ed945efafcecf2e20",3555:"7e813f280229de3d710b",3596:"8e71fcfef583b7d9ce35",3693:"eba6a9041db303dd8bdd",3703:"34314901d1086db0e25e",3710:"fa637d08945b1678e88d",3723:"68c994793ce5b4c1bc5f",3745:"ca0dc4793963821e17cf",3746:"f97f0fb65128649c7cd8",3799:"57b13fc53ae3cdf9b02f",3828:"dd3b3ab9b1e9037c5d53",3866:"492a52ede167918754e7",3889:"1f275e258565cbaf0d8e",3945:"7454f552122a38f36db3",3953:"074939cda643555b9fa0",3960:"2cda395cf5c2cfa1f887",3966:"2b6661ea10d34449f371",3999:"ad1f87e790552238f74a",4013:"77db9d4f9796ed64c643",4015:"9b7648d4802398a8cb51",4052:"9999fdd036dbbf203b10",4057:"debdf4bb4205c8a4ca75",4066:"f51f4a04f2ec9db826e7",4079:"2960218970c17f66f4d5",4106:"39a4b0e746d3a222c47b",4137:"0f18ca5eea411d63b805",4170:"7b0f546ce3800398472d",4178:"1d0b7074e5333864ae92",4201:"810ec7b5447df5f931f8",4256:"264ea6b0e6a4742d480c",4273:"c2c265a1a3a29e00e706",4353:"7cc84e240b93d6e7e35f",4389:"06b7f0e04f7a2a290f26",4411:"c49ed08264e4ecdc3778",4482:"0748ddf46b77df1b2821",4524:"3aeb32cd32e5da655aa5",4556:"681e1cb78cccc175cab8",4598:"53a9c5f5df1264b687e2",4600:"09e4c4cc50200b9e6850",4602:"ae561b848687458ec130",4665:"e6a25f4006607ca48421",4674:"b5ce2c69346d2c87c146",4731:"146698ab896428effa70",4862:"260a976938e387b0726b",4876:"7897d3efdf28cba97d62",4931:"6008b4d2694ba4532170",4934:"8b76cff032095f9115fe",4981:"22c773e811ba8b2d7caa",5009:"3a80aaa8a3780555d7bf",5055:"5418a2d34d6b78f716dc",5058:"99cc5cca8222cb165435",5083:"46b0c5fd2a360051603e",5093:"778d7660018ea7f20de1",5099:"3cfd2de22e6258d2a292",5122:"ee0f230877d5db0665c5",5168:"e337b19e191fd77bb91b",5206:"fd9c8e049ac79fbcc2fb",5231:"f18d8a63cf1dd81f0d88",5248:"538702d65096d9a3d6b4",5283:"c98d47bf3b71d452d58b",5323:"f0f2e4cd72aef7561792",5375:"40c7f0a13dfd0b073241",5378:"271e40afdba3994a941e",5387:"1fb6a179200ed9f9d598",5446:"34d25f33d4a5377fc9b5",5480:"872f4f12e150c051ec76",5500:"294e75f950a6600b59c2",5516:"5b321cb9cdf61bb765c2",5529:"4877448f5bb1b9f3de05",5551:"ec1abe78f54ce91e86da",5565:"1144e5a1b4f8503ee572",5579:"06f240fa157f3f88c0d9",5592:"96aa1d6a274550df5c5e",5598:"28f311a546f5aa99113a",5639:"e269bd9e406f041eb8d5",5695:"52417dee6aa5037e0294",5699:"491feb1ed1bf2b4f9aaf",5826:"ebf365249c45db1ffdaf",5967:"d2e2962fd7645f47f876",5975:"b7cae9993c5dd48e5a93",6124:"4fb8f2a7e2c0b2ac7071",6164:"d777d634896ff9f161e6",6166:"beb5ba75e0d99ca0d3ec",6190:"ba40b4eca0e5787a7131",6262:"50bf96239e95bd5526f8",6265:"085c77106105c12777fe",6316:"f4ad5200fc2f7cfac880",6336:"3db1ca2ccff68d9c5618",6432:"55b8d2807089ae6869ee",6445:"35b87669babb3c0df14e",6456:"e9c97c4731663ba0ad49",6477:"ec0e1080c347b97c9812",6484:"9928d8c78aa8e2e8686c",6489:"bc05b17c8a898e58bbac",6631:"57f98e80e7d8c0045366",6710:"04d48637cfbf4dd81f30",6740:"b08efdd378a6e81ef8d2",
|
||||
6748:"d54b18d4c0b2f15d0c1b",6768:"ac91a7312c853449a9b5",6780:"ee8cc2b562199f399ca1",6842:"d8d23575b4bae4029458",6847:"a20c2744b4ec26c282c2",7001:"2e9740e3dd29f52fbc39",7038:"2cd66863e222e6701e1b",7078:"b8d24061f85e7c41e09e",7127:"22fc6bd0bf04f52638ee",7129:"db411c09fa8a1f3938dd",7159:"9cf6001375236b4ae5ae",7175:"43fa465654886a69616a",7203:"eebadbe6029f6639649b",7204:"4ce39b0fb7cfe7b4e3a4",7223:"5dc4702239e8f86405c5",7260:"f5400bf815bf18a71f91",7271:"b36834782b1510f27b4e",7384:"0cdb4857f1460f4d9a53",7435:"320e6ee2a20ef22f4c89",7444:"70c9dc9f1fe0190cdb4a",7488:"e0d6706970624488339a",7519:"01180f215ff7af433df6",7539:"5adb77c7090b3cd03816",7563:"d4c0d87d92f45e88a356",7572:"55da2195e08bfa006905",7648:"13fd53598db85ddaf6d5",7660:"4ad87bdf79bb14a1f405",7746:"80c929346a2e4da2da17",7806:"da5d50b03d4be9b941d7",7843:"769f50c52542d4fdb657",7935:"4b1b34f77a2daa9c9b93",7939:"a4955d64b3419221b6f8",7973:"ad0167e6dc2ee763baaf",7987:"b322584213cf8db18142",8009:"d0c79ff5d18ffda9091d",8020:"f1bc9e9a5112927f9e52",8054:"ed303ebb191a688f566a",8056:"35e7c7e55a0c335968c5",8061:"34e4a41c4df11cc2722c",8090:"321bcf488423993d1325",8222:"87a78213ec9f0d1770b0",8257:"e182f402a058e5d88be8",8313:"9c1267d07e48b8d8f53f",8334:"df64378236249eb84118",8372:"7a2bc9e72c627628334b",8402:"b320045d1f82cd213e57",8422:"547d7780fa0f311fdad7",8468:"45316fac341acce1d8f8",8537:"7750bdfe8b8d39e6ee0a",8544:"fb27137673cba35e671e",8607:"98ac3056e2ee19b7cf8c",8643:"5a9ba45d6b00748a6f73",8666:"36efe49307baf278bd9f",8673:"7c2fe2b482833030d517",8692:"eed8394a9b1af7348f9a",8820:"ecfbb92c1fe43bbb6eb8",8859:"ae2af6f78341c0095774",8890:"d0bb94e2f7cbbcb4b593",8949:"ce6f4bb24e50170dbbbb",8985:"d4599a0cccc3494e753e",9014:"3dfdff2b64d0a5ca56f0",9039:"7c400941d19103307b25",9116:"594e0953a1b91260594c",9123:"cdad539f93d06424338a",9255:"218770777b8f819418ad",9258:"d5d85e4484e2c6e1716a",9276:"56e7b7666415deb7b327",9296:"5dae32e37069d21f713e",9310:"ef1dc89d7d7faf6420cc",9325:"3eb0347ac3afd65e4e78",9374:"bfa616edcb923b7a6e94",9418:"c6ce3fbbf9fd54162f86",9443:"c9f3705cec1a81c09b81",9445:"d262ab58e6a1e37a318c",9478:"bdee506d401471928f7f",9481:"ef84307c90c7f4780c09",9498:"69c3a394cf1093b33995",9534:"deabe2b851af076f2193",9581:"1989d22edae7a5c7ef34",9608:"d4f33f9e72384b833e5c",9654:"d38201d2782cc90eb9f5",9685:"8c0383b52d89ca46a1b8",9748:"ff6634bd91342a3a7c72",9753:"1c410653234b85ae211e",9754:"fc461ed0f3710b990724",9766:"14ec8ca9f791a864f57a",9790:"1855183210ba69fff9e4",9928:"54ec0f3b289ae632aa3e",9967:"7ea4b09ac3ec84715844",9977:"33cfa81f34341c7e5e31"}[e]+".js",o.miniCssF=e=>e+"."+{116:"668ae3395c34e5ab58d7",422:"bc23975c348a4f41dea4",601:"b6bc31b7ce369908d97d",625:"d44699b46966b893bfca",643:"5e08138e265dd49437ea",779:"b84315f4350430cdb348",1072:"67a2846c0506e2e592be",1252:"788a58021829bdae27fc",1390:"626f0a194297d6d23002",1531:"9f5911fcffe385103254",1737:"51511f925000b99093e3",1833:"1e1cad103085069c69fc",1906:"40ce159ad2a7f4f15d5c",1933:"a40665ade21837a1b5e2",2197:"3c275591170ccafa3bbe",2371:"3fc94a1aa7a1e03d91e4",2440:"8620e9f557ec49b4b3d7",2444:"3360c6e677bffb470a53",
|
||||
2564:"cac75529a7aa17227aa7",2709:"a1e050d9d395d7ca0793",2736:"c88f0ff04a966a2fb2df",2864:"f4dde91fd09337ffbc3c",3362:"2476428ae07d34323af5",3693:"44308eb6167ec63939d4",3703:"fbb750fd312778403036",3745:"cf2f96070c64ff0ae693",3799:"e61340cf19beaf4f90d5",3828:"b87cd06c9d4e7baa6eda",3953:"7146f14703227db023af",4052:"093089193f18ca4eeff8",4057:"400f57042c58b6946a7c",4066:"eba4ddabfe5309662e8a",4106:"8577632fdab29ee53ddf",4137:"6299deceb84b57b5f957",4170:"b8247e6f2ef930e9c9a6",4178:"3183c4285a7a7661d53e",4256:"1d39c3c8dc435b82e4c6",4353:"9eade1db5c4beb02071a",4524:"d6f97e44b70e5e01f7d4",4556:"cff39ef77f0827e16b81",4600:"362fa6a7ab1f3e3b06c4",4876:"9ce134321e5f7ed1c4ad",5058:"2776c62444167c12b233",5083:"a9187278de5ab079b6d2",5099:"8d938014c9c676877539",5168:"c631f421748404652de3",5323:"05b152d9c203bbe1e861",5375:"132067dc73c5743d825f",5387:"6dc6a5ec31f9d97dc855",5446:"1f5883a75f4d7d613e20",5480:"62c8085685951c0bc278",5579:"0353e321d943562b4486",5699:"32d0511e014f0b07d6c6",5826:"c70dad3fc1bd0fd0f22d",5975:"a3e49a7b95404261d4eb",6164:"3d692610247dc24d7b64",6190:"bd22fdbcb9baef45b965",6262:"cce9c2d0878310b9ee03",6316:"4c1aab38ac483c2022bb",6445:"d2b2f28850f8c828a4d7",6489:"9070beae9e8cef21670a",6710:"9171de773f9f829118f4",6842:"f6f5a9b5ab991d9de920",6847:"f6b63c197359a8b78abb",7001:"d167a8793031fa802176",7159:"27d77fe8d8dff58ceb0a",7204:"b3dcbd58906265276dd8",7384:"aefeb9db8e938fbfb1dc",7435:"45bbca649d592877886a",7444:"8be34346a1a2c104404c",7519:"6dcec65216aeb5263fdb",7572:"eeafd67dac93bb21fca3",7935:"1def029dc5949b8f8e0e",7939:"b1bead470bdb2684eb12",8054:"f7c1326458b0418d3775",8222:"a31543d092246fd03dd2",8257:"0e03bab72eb086ffb4ee",8544:"16c0fd7539d08ad5ffd3",8666:"d1d8147337bae3fa6372",8692:"1372368151d36104b74b",8859:"4e8179db16fddc59e8fa",8985:"10034c1258391b9f008c",9255:"574882a5338ad0774967",9258:"127a4c4030a8c2724b98",9276:"99ce945e2a3fe8127079",9296:"dff3cd88e89f770d4753",9325:"f2e1edd6097be38e73da",9481:"63a2692b383c39f8a3d1",9608:"d8e66f4c4d6c2e5e9e51",9654:"e02f2476bd5db34eaf55",9753:"b7b1c5568e3084458241",9766:"631d966499ce5a6b82a9",9967:"ea707572e7ac5e0fd485",9977:"d6dee9346a53b63a68b0"}[e]+".css",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),d={},f="tradingview:",o.l=(e,a,c,b)=>{if(d[e])d[e].push(a);else{var t,l;if(void 0!==c)for(var n=document.getElementsByTagName("script"),r=0;r<n.length;r++){var i=n[r];if(i.getAttribute("src")==e||i.getAttribute("data-webpack")==f+c){t=i;break}}t||(l=!0,(t=document.createElement("script")).charset="utf-8",t.timeout=120,o.nc&&t.setAttribute("nonce",o.nc),t.setAttribute("data-webpack",f+c),t.src=e,0!==t.src.indexOf(window.location.origin+"/")&&(t.crossOrigin="anonymous")),d[e]=[a];var s=(a,c)=>{t.onerror=t.onload=null,clearTimeout(_);var f=d[e];if(delete d[e],t.parentNode&&t.parentNode.removeChild(t),f&&f.forEach((e=>e(c))),a)return a(c)},_=setTimeout(s.bind(null,void 0,{type:"timeout",target:t}),12e4)
|
||||
;t.onerror=s.bind(null,t.onerror),t.onload=s.bind(null,t.onload),l&&document.head.appendChild(t)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var a=o.g.document;if(!e&&a&&(a.currentScript&&(e=a.currentScript.src),!e)){var c=a.getElementsByTagName("script");c.length&&(e=c[c.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),o.g.location&&o.p.startsWith(o.g.location.origin)&&(o.p=o.p.slice(o.g.location.origin.length)),(()=>{const e=o.u;o.u=a=>e(a).replace("__LANG__",o.g.language)})(),o.p=o.g.WEBPACK_PUBLIC_PATH||o.p;var l=o.e,n=Object.create(null);function r(e,a){return l(e).catch((function(){return new Promise((function(c){var d=function(){self.removeEventListener("online",d,!1),!1===navigator.onLine?self.addEventListener("online",d,!1):c(a<2?r(e,a+1):l(e))};setTimeout(d,a*a*1e3)}))}))}o.e=function(e){if(!n[e]){n[e]=r(e,0);var a=function(){delete n[e]};n[e].then(a,a)}return n[e]},(()=>{if("undefined"!=typeof document){var e=e=>new Promise(((a,c)=>{var d=o.miniCssF(e),f=o.p+d;if(((e,a)=>{for(var c=document.getElementsByTagName("link"),d=0;d<c.length;d++){var f=(t=c[d]).getAttribute("data-href")||t.getAttribute("href");if("stylesheet"===t.rel&&(f===e||f===a))return t}var b=document.getElementsByTagName("style");for(d=0;d<b.length;d++){var t;if((f=(t=b[d]).getAttribute("data-href"))===e||f===a)return t}})(d,f))return a();((e,a,c,d,f)=>{var b=document.createElement("link");b.rel="stylesheet",b.type="text/css",b.onerror=b.onload=c=>{if(b.onerror=b.onload=null,"load"===c.type)d();else{var t=c&&("load"===c.type?"missing":c.type),o=c&&c.target&&c.target.href||a,l=new Error("Loading CSS chunk "+e+" failed.\n("+o+")");l.code="CSS_CHUNK_LOAD_FAILED",l.type=t,l.request=o,b.parentNode&&b.parentNode.removeChild(b),f(l)}},b.href=a,0!==b.href.indexOf(window.location.origin+"/")&&(b.crossOrigin="anonymous"),c?c.parentNode.insertBefore(b,c.nextSibling):document.head.appendChild(b)})(e,f,null,a,c)})),a={3666:0};o.f.miniCss=(c,d)=>{a[c]?d.push(a[c]):0!==a[c]&&{116:1,422:1,601:1,625:1,643:1,779:1,1072:1,1252:1,1390:1,1531:1,1737:1,1833:1,1906:1,1933:1,2197:1,2371:1,2440:1,2444:1,2564:1,2709:1,2736:1,2864:1,3362:1,3693:1,3703:1,3745:1,3799:1,3828:1,3953:1,4052:1,4057:1,4066:1,4106:1,4137:1,4170:1,4178:1,4256:1,4353:1,4524:1,4556:1,4600:1,4876:1,5058:1,5083:1,5099:1,5168:1,5323:1,5375:1,5387:1,5446:1,5480:1,5579:1,5699:1,5826:1,5975:1,6164:1,6190:1,6262:1,6316:1,6445:1,6489:1,6710:1,6842:1,6847:1,7001:1,7159:1,7204:1,7384:1,7435:1,7444:1,7519:1,7572:1,7935:1,7939:1,8054:1,8222:1,8257:1,8544:1,8666:1,8692:1,8859:1,8985:1,9255:1,9258:1,9276:1,9296:1,9325:1,9481:1,9608:1,9654:1,9753:1,9766:1,9967:1,9977:1}[c]&&d.push(a[c]=e(c).then((()=>{a[c]=0}),(e=>{throw delete a[c],e})))}}})(),
|
||||
File diff suppressed because one or more lines are too long
51
charting_library/charting_library.d.ts
vendored
51
charting_library/charting_library.d.ts
vendored
@@ -2158,9 +2158,15 @@ export interface BrokerConfigFlags {
|
||||
*/
|
||||
supportMultiposition?: boolean;
|
||||
/**
|
||||
* Allows you to use your own Profit & Loss (P&L) values for positions.
|
||||
* If `supportPLUpdate` is set to `true`, you should call the {@link IBrokerConnectionAdapterHost.plUpdate} method as soon as P&L values are changed.
|
||||
* Allows using your own [profit and loss](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/trading-concepts/positions#provide-profit-and-loss) (P&L) values for positions.
|
||||
* By default, `supportPLUpdate` is set to `true`, which means:
|
||||
* - You should calculate the P&L value for a position on your backend server.
|
||||
* - Once calculated, call the {@link IBrokerConnectionAdapterHost.plUpdate} method to provide the library with updated values.
|
||||
* - If [position netting](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/trading-concepts/positions#position-netting) is enabled, you should also call {@link IBrokerConnectionAdapterHost.individualPositionPLUpdate}.
|
||||
*
|
||||
* If `supportPLUpdate` is set to `false`, the library automatically calculates P&L values as the difference between the current trade and the average position price.
|
||||
* However, we recommend using your own P&L calculations for positions.
|
||||
* This helps avoid any discrepancies between the P&L values of the account and positions due to potential delays.
|
||||
* @default true
|
||||
*/
|
||||
supportPLUpdate?: boolean;
|
||||
@@ -6342,13 +6348,13 @@ export interface DatafeedQuoteValues {
|
||||
volume?: number;
|
||||
/** Original name */
|
||||
original_name?: string;
|
||||
/** Pre-/post-market price. This value is used for the pre-/post-market price line and in the [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details) widget */
|
||||
/** Pre-/post-market price. This value is required to display the [pre-/post-market price line](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Extended-Sessions#enable-the-price-line) on the chart and information on the extended session in the [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details) widget. */
|
||||
rtc?: number;
|
||||
/** Pre-/post-market price update time. This value is used in the [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details) widget */
|
||||
/** Pre-/post-market price update time. This value is required to display information on the [extended session](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Extended-Sessions) in the [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details) widget. */
|
||||
rtc_time?: number;
|
||||
/** Pre-/post-market change. This value is used in the [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details) widget */
|
||||
/** Pre-/post-market price change. This value is required to display information on the [extended session](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Extended-Sessions) in the [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details) widget. */
|
||||
rch?: number;
|
||||
/** Pre-/post-market change percent. This value is used in the [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details) widget */
|
||||
/** Pre-/post-market price change percentage. This value is required to display information on the [extended session](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Extended-Sessions) the [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details) widget. */
|
||||
rchp?: number;
|
||||
[valueName: string]: string | number | string[] | number[] | undefined;
|
||||
}
|
||||
@@ -9941,6 +9947,10 @@ export interface IBrokerConnectionAdapterHost {
|
||||
* @param {Order} order - order which was added or changed
|
||||
*/
|
||||
orderUpdate(order: Order): void;
|
||||
/**
|
||||
* Call this method to clear the current cache for orders and notify the chart that it needs to request orders again.
|
||||
*/
|
||||
ordersFullUpdate(): void;
|
||||
/**
|
||||
* Call this method when an order is not changed, but the fields that you added to the order object to display in the Account Manager have changed.
|
||||
* It should be used only if you want to display custom fields in the Account Manager.
|
||||
@@ -9954,6 +9964,10 @@ export interface IBrokerConnectionAdapterHost {
|
||||
* @param {boolean} [isHistoryUpdate] - whether the change is a history update
|
||||
*/
|
||||
positionUpdate(position: Position, isHistoryUpdate?: boolean): void;
|
||||
/**
|
||||
* Call this method to clear the current cache for positions and notify the chart that it needs to request positions again.
|
||||
*/
|
||||
positionsFullUpdate(): void;
|
||||
/**
|
||||
* Call this method when a position is not changed, but the fields that you added to the position object to display in the Account Manager have changed.
|
||||
* It should be used only if you want to display custom fields in the Account Manager.
|
||||
@@ -9967,6 +9981,10 @@ export interface IBrokerConnectionAdapterHost {
|
||||
* @param {boolean} [isHistoryUpdate] - whether the change is a history update
|
||||
*/
|
||||
individualPositionUpdate(individualPosition: IndividualPosition, isHistoryUpdate?: boolean): void;
|
||||
/**
|
||||
* Call this method to clear the current cache for individual positions and notify the chart that it needs to request individual positions again.
|
||||
*/
|
||||
individualPositionsFullUpdate(): void;
|
||||
/**
|
||||
* Call this method when an individual position has not changed, but fields that you added to the individual position object to display in the Account Manager have changed.
|
||||
* @param {string} id - ID of the updated individual position
|
||||
@@ -9989,7 +10007,7 @@ export interface IBrokerConnectionAdapterHost {
|
||||
*/
|
||||
realtimeUpdate(symbol: string, data: TradingQuotes): void;
|
||||
/**
|
||||
* Call this method when a broker connection has received a PL update.
|
||||
* Call this method when a broker connection has received a [profit and loss](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/trading-concepts/positions#provide-profit-and-loss) update.
|
||||
* Use this method when the {@link BrokerConfigFlags.supportPLUpdate} flag is set to `true` in {@link SingleBrokerMetaInfo.configFlags}.
|
||||
* @param {string} positionId - ID of the position
|
||||
* @param {number} pl - updated profit / loss value
|
||||
@@ -10003,7 +10021,7 @@ export interface IBrokerConnectionAdapterHost {
|
||||
*/
|
||||
pipValueUpdate(symbol: string, pipValues: PipValues): void;
|
||||
/**
|
||||
* Call this method when a broker connection has received an individual position PL update.
|
||||
* Call this method when a broker connection has received an individual position [profit and loss](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/trading-concepts/positions#provide-profit-and-loss) update.
|
||||
* @param {string} individualPositionId - ID of the individual position
|
||||
* @param {number} pl - updated profit / loss for the individual position
|
||||
*/
|
||||
@@ -10521,7 +10539,7 @@ export interface IChartWidgetApi {
|
||||
setChartType(type: SeriesType, callback?: () => void): void;
|
||||
/**
|
||||
* Force the chart to re-request data, for example if there are [internet connection issues](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Datafeed-Issues#internet-connection-issues).
|
||||
* Before calling this function the `onResetCacheNeededCallback` callback from {@link IDatafeedChartApi.subscribeBars} should be called.
|
||||
* Before calling this function the {@link IChartWidgetApi.resetCache} method should be called.
|
||||
*
|
||||
* **Example**
|
||||
* ```javascript
|
||||
@@ -11990,6 +12008,12 @@ export interface IChartingLibraryWidget {
|
||||
* @returns An API object for interacting with the custom themes.
|
||||
*/
|
||||
customThemes(): Promise<ICustomThemesApi>;
|
||||
/**
|
||||
* Reset cached bar data from the datafeed, for all symbols.
|
||||
*
|
||||
* This has the same effect as calling [`onResetCacheNeededCallback`](@api/interfaces/Charting_Library.IDatafeedChartApi.md#subscribebars) for all symbol and resolution combinations at once.
|
||||
*/
|
||||
resetCache(): void;
|
||||
}
|
||||
/**
|
||||
* PineJS execution context.
|
||||
@@ -29528,11 +29552,16 @@ export type TradingTerminalFeatureset = ChartingLibraryFeatureset |
|
||||
/**
|
||||
* Enables the pre-/post-market price line.
|
||||
*
|
||||
* To enable the pre-/post-market lines, you need to provide {@link DatafeedQuoteValues.rtc} to the quote values.
|
||||
* To enable the pre-/post-market lines, you need to provide {@link DatafeedQuoteValues.rtc} to the quote object.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
"pre_post_market_price_line";
|
||||
"pre_post_market_price_line" |
|
||||
/**
|
||||
* Enables cross-tab synchronization for [watchlists](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/Watch-List).
|
||||
* @default true
|
||||
*/
|
||||
"watchlist_cross_tab_sync";
|
||||
export type VisiblePlotsSet = "ohlcv" | "ohlc" | "c";
|
||||
export type WatchListSymbolListAddedCallback = (listId: string, symbols: string[]) => void;
|
||||
export type WatchListSymbolListChangedCallback = (listId: string) => void;
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
8
charting_library/datafeed-api.d.ts
vendored
8
charting_library/datafeed-api.d.ts
vendored
@@ -210,13 +210,13 @@ export interface DatafeedQuoteValues {
|
||||
volume?: number;
|
||||
/** Original name */
|
||||
original_name?: string;
|
||||
/** Pre-/post-market price. This value is used for the pre-/post-market price line and in the [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details) widget */
|
||||
/** Pre-/post-market price. This value is required to display the [pre-/post-market price line](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Extended-Sessions#enable-the-price-line) on the chart and information on the extended session in the [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details) widget. */
|
||||
rtc?: number;
|
||||
/** Pre-/post-market price update time. This value is used in the [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details) widget */
|
||||
/** Pre-/post-market price update time. This value is required to display information on the [extended session](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Extended-Sessions) in the [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details) widget. */
|
||||
rtc_time?: number;
|
||||
/** Pre-/post-market change. This value is used in the [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details) widget */
|
||||
/** Pre-/post-market price change. This value is required to display information on the [extended session](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Extended-Sessions) in the [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details) widget. */
|
||||
rch?: number;
|
||||
/** Pre-/post-market change percent. This value is used in the [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details) widget */
|
||||
/** Pre-/post-market price change percentage. This value is required to display information on the [extended session](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Extended-Sessions) the [Details](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/#details) widget. */
|
||||
rchp?: number;
|
||||
[valueName: string]: string | number | string[] | number[] | undefined;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"description": "CL v29.1.0 (internal id 7030c9d4b37f307467b71dc4c4029989ac015d31 @ 2025-03-10T18:15:29.482Z)",
|
||||
"description": "CL v29.2.0 (internal id 92e59637d61b6a77468d0026d24a07296d63e896 @ 2025-04-07T16:45:22.953Z)",
|
||||
"type": "module",
|
||||
"main": "charting_library.cjs.js",
|
||||
"module": "charting_library.esm.js",
|
||||
|
||||
@@ -23,6 +23,6 @@
|
||||
},
|
||||
"homepage": "https://www.tradingview.com/charting-library-docs",
|
||||
"name": "charting_library",
|
||||
"version": "29.1.0",
|
||||
"version": "29.2.0",
|
||||
"types": "charting_library.d.ts"
|
||||
}
|
||||
Reference in New Issue
Block a user