File Manager
Viewing File: widgetbar.js
(window.webpackJsonp=window.webpackJsonp||[]).push([["widgetbar",379],{"+Lx6":function(e,t,i){},"/BH3":function(e,t,i){"use strict";i.r(t),i.d(t,"layoutKeyName",(function(){return n})),i.d(t,"getDefaultState",(function(){return o})),i.d(t,"tabsWidth",(function(){return a})),i.d(t,"hiderGapWidth",(function(){return s})),i.d(t,"borderWidth",(function(){return r}));var n="layout-settings";function o(){return{version:2,width:267,pages:[]}}var a=46,s=5,r=1},"/Jsq":function(e,t,i){"use strict";i.r(t);var n=i("mrSG"),o=i("FBuY"),a=i("ku9n"),s=i("JZcM"),r=i("IWHC"),l=i("JUY+"),c=i("aIyQ"),d=i.n(c),h=function(){function e(){this._unreadBuffer=new Set,this._onEventsToHighlight=new d.a,this._onUnreadCountChanged=new d.a,this._isLogWidgetVisible=!1}return e.prototype.onEventsToHighlight=function(){return this._onEventsToHighlight},e.prototype.onUnreadCountChanged=function(){return this._onUnreadCountChanged},e.prototype.setIsLogWidgetVisible=function(e){this._isLogWidgetVisible!==e&&(e&&(this._onEventsToHighlight.fire(new Set(this._unreadBuffer)),this.markAllRead()),this._isLogWidgetVisible=e)},e.prototype.onEventFired=function(e){this._isLogWidgetVisible?this._onEventsToHighlight.fire(new Set([e])):(this._unreadBuffer.add(e),this._emitUnreadCountUpdate())},e.prototype.onEventViewed=function(e){this._unreadBuffer.delete(e),this._emitUnreadCountUpdate()},e.prototype.markAllRead=function(){this._unreadBuffer.clear(),this._emitUnreadCountUpdate()},e.prototype._emitUnreadCountUpdate=function(){this._onUnreadCountChanged.fire(this._unreadBuffer.size)},e}(),u=function(){function e(e,t){this._bridge=e,this._onEventsToHighlight=t}return e.prototype.getService=function(){var e=this;return this._servicePromise||(this._servicePromise=Promise.all([Object(l.getPriceAlertsDispatcher)(),Promise.all([i.e(274),i.e(80),i.e(134),i.e(223),i.e("alerts-log-widget-service-provider-impl")]).then(i.bind(null,"22go"))]).then((function(t){var i=t[0],n=t[1].AlertsLogWidgetServiceProviderImpl;return e._impl=new n(e._bridge,e._onEventsToHighlight,i),e._servicePromise||e._impl.destroy(),e._impl.getService()}))),this._servicePromise},e.prototype.destroy=function(){var e;delete this._servicePromise,null===(e=this._impl)||void 0===e||e.destroy()},e}();i.d(t,"AlertsLogWidget",(function(){return p}));var p=function(e){function t(t){var i,n,a,c=e.call(this,t)||this;return c._onUnreadCountChanged=function(e){c._bridge.notify(null,{notificationValue:e})},c._bridge=t,c._notificationController=new h,c._serviceProvider=new u(t,c._notificationController.onEventsToHighlight()),c._notificationController.onUnreadCountChanged().subscribe(null,c._onUnreadCountChanged),c._unbindNotificationController=(i=c._notificationController,n=function(){},a=!1,Object(l.getPriceAlertsDispatcher)().then((function(e){e.getAlertNotifier().then((function(t){if(!a){var l=function(e){i.onEventFired(e.id)},c=function(e){e.filter((function(e){return e.alertCategory===r.AlertCategory.Price&&e.type===s.a.Fired&&void 0!==e.eventId})).map((function(e){return e.eventId})).forEach((function(e){
return i.onEventViewed(e)}))},d=function(){i.markAllRead()};e.events.on("fired",l),t.onNotificationsViewed.subscribe(null,c),o.TVXWindowEvents.on("alertevents-markread",d),n=function(){e.events.off("fired",l),t.onNotificationsViewed.unsubscribe(null,c),o.TVXWindowEvents.off("alertevents-markread",d)}}}))})),function(){a=!0,n()}),c}return Object(n.c)(t,e),t.prototype.mount=function(){var e=this,t=Promise.all([Promise.all([i.e(1),i.e(29),i.e(49),i.e(63),i.e(104),i.e(212),i.e(261),i.e(339),i.e(48),i.e(225),i.e("alerts-log-widget-impl")]).then(i.bind(null,"1BHs")),this._serviceProvider.getService()]).then((function(i){var n=i[0].AlertsLogWidgetView,a=i[1];e._loadModulePromise===t&&(e._view=new n(e._bridge.header,e._bridge.container,a),e._notificationController.setIsLogWidgetVisible(!0),o.TVXWindowEvents.emit("alertevents-markread"))}));this._loadModulePromise=t},t.prototype.unmount=function(){var t;this._notificationController.setIsLogWidgetVisible(!1),this._loadModulePromise=null,null===(t=this._view)||void 0===t||t.destroy(),delete this._view,e.prototype.unmount.call(this)},t.prototype.destroy=function(){this._unbindNotificationController(),this._serviceProvider.destroy(),e.prototype.destroy.call(this)},t}(a.a)},"1E3x":function(e,t,i){"use strict";(function(t){i("+Lx6");var n,o=i("sFgq"),a=i("c2JX"),s=i("iAz1"),r=i("X19y"),l=i("Vdly"),c=(n=l)&&n.__esModule?n:{default:n},d=i("xlbu"),h=i("55Xp");function u(e){this._bridge=e,this._properties=e.properties,this.settingsKey="ecalendar.market",this._defaultMarket=(0,s.getDefaultMarketForLocale)(window.locale||"en"),this._market=c.default.getValue(this.settingsKey)||this._defaultMarket,this._$container=e.$body,this._bridgeSymbol=e.symbol,this._initMe(),this._initFeed(!0),this._createHeaderButtons()}u.prototype.lastData=null,u.prototype.resize=function(){var e=Math.max(0,this._$container.height()-this.$headerContent.outerHeight());this._$widget.height(e),this._scroll&&this._scroll.resize()},u.prototype._initMe=function(){this._$container.on("contextmenu",(function(e){return e.preventDefault()})),this.$headerContent=$("<div>").addClass("calendar-widget header").appendTo(this._$container),$("<div title = "+$.t("Symbol")+">"+$.t("Symbol")+"</div>").addClass("calendar-widget-w-20").appendTo(this.$headerContent),$("<div title = "+$.t("Company")+">"+$.t("Company")+"</div>").addClass("calendar-widget-w-60").appendTo(this.$headerContent),$("<div title = "+$.t("Estimate")+">"+$.t("Estimate")+"</div>").addClass("calendar-widget-w-20 i-align_right").appendTo(this.$headerContent),this._$widget=$('<div class="calendar-widget-scnt">').appendTo(this._$container),this._$data=$('<div class="calendar-widget-dcnt">').appendTo(this._$widget),this._bridgeSymbol.subscribe(function(e){if(e){var t=e.split(":");if(t[1]&&this._activeSymbol!==e&&(this._activeSymbol=e,null!==this.lastData)){this._dropActive();var i=this._currentSymbols[t[1]]||this._currentSymbols[e];i&&i[0].addClass("active")}}}.bind(this),{callWithLast:!0}),this._scroll=new o.SidebarCustomScroll(this._$widget,this._$data),
this._bridge.height.subscribe(this.resize.bind(this),{callWithLast:!0})},u.prototype._closeConfigPopup=function(){this._$popup&&(this._$popup.remove(),this._$popup=null)},u.prototype._createConfigPopup=function(){if(!this._$popup){var e=this._$configButton,t=$("<div>").addClass("tv-e-calendar-popup");this._$popup=t,t.on("mousedownoutside",function(t){$(t.target).parents().andSelf().is(e)||this._closeConfigPopup()}.bind(this)),e.addClass("active");var i=$("<div>").addClass("tv-e-calendar-config").appendTo(t);this._createConfigPopupMarkets().appendTo(i);var n=e.offset();n.width=e.outerWidth(),n.height=e.outerHeight(),e.parents().each((function(){var e=$(this);n.left-=e.scrollLeft()||0,n.top-=e.scrollTop()||0})),t.css({position:"fixed",left:0,top:n.top+n.height+1}),t.appendTo(document.body);var o=t.get(0).getBoundingClientRect();t.css({left:n.left+n.width-o.width,height:o.height-Math.abs(window.innerHeight-(o.top+o.height))-20})}},u.prototype._getMarketTitle=function(e){return e.title+" ("+e.stocks.join(", ")+")"},u.prototype._createConfigPopupMarkets=function(){var e=this,t=(0,s.getMarketsByScreenerType)("stocks"),i=$("<div>").addClass("tv-e-calendar-config__markets"),n=void 0,o=Object.keys(t).sort((function(e,t){return e<t?-1:e>t?1:0})),a=o.indexOf(this._defaultMarket);return~a&&o.splice(a,1),o.unshift(this._defaultMarket),o.forEach((function(o){n=t[o],$("<div>").addClass("tv-e-calendar-config__market-button js-e-calendar-choose-market").data("market",o).toggleClass("tv-e-calendar-config__market-button--active",o===e._market).append($((0,r.flagHtml)(n.flag))).append('<span class="tv-e-calendar-config__market-button-title">'+e._getMarketTitle(n)+"</span>").appendTo(i)})),i.on("click",".js-e-calendar-choose-market",(function(t){var i=e._market=$(t.currentTarget).data("market");i&&(c.default.setValue(e.settingsKey,i,{forceFlush:!0}),e._closeConfigPopup(),e._initFeed(!0),e._createHeaderButtons())})),i},u.prototype._createHeaderButtons=function(){var e=(0,s.getMarketsByScreenerType)("stocks")[this._market];this._$configButton&&this._$configButton.remove(),this._$configButton=$("<a>").addClass("apply-common-tooltip tv-flag-country tv-flag-country--"+e.flag+" tv-e-calendarwidget-inline-select-wrapper").attr("title",this._getMarketTitle(e)).html((0,r.flagHtml)(e.flag)).appendTo(this._bridge.$headerspace).on("click",function(e){e.preventDefault(),this._$popup?this._closeConfigPopup():this._createConfigPopup()}.bind(this))},u.prototype.toggleDay=function(e){$(e.data.hider).toggleClass("hidden"),e.data.me.resize()},u.prototype._setSymbol=function(e,t){this._bridgeSymbol.setValue&&this._bridgeSymbol.setValue(e)},u.prototype._activeSymbol=null,u.prototype._dropActive=function(){this._$data.find("div.calendar-widget.active").removeClass("active")},u.prototype._currentSymbols={},u.prototype._renderMe=function(){var e=this;e._currentSymbols={};var i=this.lastData;if(i){for(var n=t().startOf("day").valueOf(),o=t().startOf("day").add(5,"days").valueOf(),a=0,s=i.length;a<s;a++)n<=1e3*i[a].d[3]&&1e3*i[a].d[3]<=o&&(i[a].d[1]=i[a].d[3],
i[a].d[2]=i[a].d[4]);i=i.sort((function(e,t){var i=e.d[1],n=t.d[1];return i<n?-1:i>n?1:0})),this._$data.empty();var r=[$.t("January"),$.t("February"),$.t("March"),$.t("April"),$.t("May"),$.t("June"),$.t("July"),$.t("August"),$.t("September"),$.t("October"),$.t("November"),$.t("December")],l=e._activeSymbol;l&&(l=""+l.split(":")[1]);for(a=0,s=i.length;a<s;a++){var c=i[a],d=c.d,u=d[0];if(d&&u){var p,g=t(),v=r[g.month()]+" "+g.date(),m=t(1e3*d[1]),f=r[m.month()]+" "+m.date(),_=m.format("L").replace(" ","");this._currentDayname!==f&&(this._currentDayname=f,p=$("<div>").addClass("calendar-widget day hand "+_),f===v&&p.addClass("today"),p.html(f).appendTo(this._$data),p.on("click",{hider:".erc"+_,me:e},e.toggleDay));var w=c.s;if(w){var b,y=w.split(":")[1],C=y===l?"active":"";b=d[2]?(0,h.roundToFirstValuable)(d[2]):" ",e._currentSymbols[w]||(e._currentSymbols[w]=[]);var S=$("<div>").addClass("calendar-widget erc"+_+" "+C).appendTo(this._$data);S.addClass("regular").on("click",{symbol:w,container:S,me:e},(function(e){var t=e.data;t.me._dropActive(),t.me._setSymbol(t.symbol,t.container)})),S.symbol=$('<div title="'+w+'">'+y+"</div>").addClass("calendar-widget-w-20 symbol").appendTo(S),S.title=$('<div title="'+u+'">'+u+"</div>").addClass("calendar-widget-w-60").appendTo(S),S.est=$('<div title="'+b+'">'+b+"</div>").addClass("calendar-widget-w-20 i-align_right").appendTo(S),e._currentSymbols[w].push(S)}}}delete this._currentDayname}},u.prototype.backendUrl=function(){return(window.EARNINGS_CALENDAR_URL||"")+"/"+this._market+"/"},u.prototype._initFeed=function(e){e&&(this._spinner=new a.Spinner("mini").spin(this._$widget.get(0)));var i=Date.now(),n=36e5;$.ajax(this.backendUrl()+"scan",{type:"POST",data:JSON.stringify({filter:[{left:"earnings_release_date,earnings_release_next_date",operation:"in_range",right:[t().startOf("day").valueOf()/1e3,t().startOf("day").add(5,"days").valueOf()/1e3]}],columns:["description","earnings_release_next_date","earnings_per_share_forecast_next_fq","earnings_release_date","earnings_per_share_forecast_fq"]}),dataType:"json",xhrFields:{withCredentials:!0}}).done(function(t,o,a){var s=Date.now()-i;d.telemetry.sendReport("calendars","earnings_http_status",{value:a.status,additional:{source:"EarningsCalendarWidget"}}),d.telemetry.sendReport("calendars","earnings_response_time_frame",{value:s,additional:{source:"EarningsCalendarWidget"}}),t&&!t.error&&t.data?(e&&(this._spinner.stop(),delete this._spinner),n=t.expiration||n,this.lastData=t.data||this.lastData,this._renderMe.call(this),d.telemetry.sendReport("calendars","earnings_ok")):d.telemetry.sendReport("calendars","earnings_error"),window.setTimeout(function(){this._initFeed.call(this)}.bind(this),n)}.bind(this)).fail(function(e){var t=Date.now()-i;d.telemetry.sendReport("calendars","earnings_http_status",{value:e.status,additional:{source:"EarningsCalendarWidget"}}),d.telemetry.sendReport("calendars","earnings_response_time_frame",{value:t,additional:{source:"EarningsCalendarWidget"}}),window.setTimeout(function(){this._initFeed.call(this)
}.bind(this),n)}.bind(this))},e.exports={Earnings:u}}).call(this,i("ldgD"))},"1Pr8":function(e,t,i){e.exports={button:"button-DABaJZo4",hover:"hover-DABaJZo4",hoverMask:"hoverMask-DABaJZo4",icon:"icon-DABaJZo4",counterRow:"counterRow-DABaJZo4",counter:"counter-DABaJZo4",isGrayed:"isGrayed-DABaJZo4",isActive:"isActive-DABaJZo4",isTab:"isTab-DABaJZo4"}},"1TxM":function(e,t,i){"use strict";i.d(t,"c",(function(){return l})),i.d(t,"a",(function(){return c})),i.d(t,"b",(function(){return d}));var n=i("q1tI"),o=i.n(n),a=i("17x9"),s=i.n(a),r=o.a.createContext({});function l(e,t){s.a.checkPropTypes(t,e,"context","RegistryContext")}function c(e){var t=e.validation,i=e.value;return l(i,t),o.a.createElement(r.Provider,{value:i},e.children)}function d(){return r}},"1WEt":function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="45" height="45"><path fill="currentcolor" d="m18 18v-.5c0-1.2.6-2 1.5-2.7.8-.5 2-.8 3-.8s2.2.3 3 .8c.9.6 1.5 1.5 1.5 2.7a4 4 0 0 1-1.3 2.8l-2.3 2c-.3.3-.4.6-.4 1.2v.5h-1v-.5c0-.8.2-1.4.6-1.9l2.4-2c.6-.7 1-1.3 1-2.1a2 2 0 0 0-1-1.8c-.7-.5-1.6-.7-2.5-.7-1 0-1.8.2-2.5.7-.6.4-1 1-1 1.8v.5m3.5 8a1 1 0 0 0 0 5 1 1 0 0 0 0-5m0 1a1 1 0 0 1 0 3 1 1 0 0 1 0-3m0-17a1 1 0 0 0 0 25 1 1 0 0 0 0-25m0 1a1 1 0 0 1 0 23 1 1 0 0 1 0-23"/></svg>'},"1WwW":function(e,t,i){"use strict";i.d(t,"a",(function(){return l}));var n=i("mrSG"),o=i("q1tI"),a=i("TSYQ"),s=i("Iivm"),r=i("1Pr8");function l(e){var t=(e=Object(n.a)({isTab:!0,theme:r},e)).NotificationComponent,i=void 0===t?c:t,l=a(e.className,e.theme.button,e.isTab&&e.theme.isTab,e.isActive&&e.theme.isActive,e.isGrayed&&e.theme.isGrayed,e.hint&&"apply-common-tooltip common-tooltip-vertical");return o.createElement("div",{className:l,title:e.hint,onClick:e.onClick,ref:e.reference,"data-role":"button","data-name":e.name},o.createElement("div",{className:e.theme.hoverMask}),o.createElement(s.a,{icon:e.icon}),o.createElement("div",{className:e.theme.counterRow},o.createElement(i,{className:e.theme.counter,count:e.count,"data-name":"counter"})))}function c(e){return o.createElement("span",{className:e.className,"data-name":"counter"},e.count&&0!==e.count?e.count.toString():void 0)}},"5AaZ":function(e,t,i){"use strict";i.d(t,"a",(function(){return v}));var n=i("mrSG"),o=i("q1tI"),a=i.n(o),s=i("TSYQ"),r=i.n(s),l=i("cvc5"),c=i("Iivm"),d=i("//lZ"),h=i("9uLv"),u=i("uJ8n"),p=i("Vike"),g={isVisibleScrollbar:!0},v=function(e){function t(t){var i=e.call(this,t)||this;return i._scroll=null,i._handleScrollTop=function(){i.animateTo(Math.max(0,i.currentPosition()-(i.state.heightWrap-50)))},i._handleScrollBot=function(){i.animateTo(Math.min((i.state.heightContent||0)-(i.state.heightWrap||0),i.currentPosition()+(i.state.heightWrap-50)))},i._handleResizeWrap=function(e){var t=e.height;i.setState({heightWrap:t})},i._handleResizeContent=function(e){var t=e.height;i.setState({heightContent:t})},i._handleScroll=function(){var e=i.props.onScroll;e&&e(i.currentPosition(),i.isAtTop(),i.isAtBot()),i._checkButtonsVisibility()},i._checkButtonsVisibility=function(){
var e=i.state,t=e.isVisibleTopButton,n=e.isVisibleBotButton,o=i.isAtTop(),a=i.isAtBot();o||t?o&&t&&i.setState({isVisibleTopButton:!1}):i.setState({isVisibleTopButton:!0}),a||n?a&&n&&i.setState({isVisibleBotButton:!1}):i.setState({isVisibleBotButton:!0})},i.state={heightContent:0,heightWrap:0,isVisibleBotButton:!1,isVisibleTopButton:!1},i}return Object(n.c)(t,e),t.prototype.componentDidMount=function(){this._checkButtonsVisibility()},t.prototype.componentDidUpdate=function(e,t){t.heightWrap===this.state.heightWrap&&t.heightContent===this.state.heightContent||this._handleScroll()},t.prototype.currentPosition=function(){return this._scroll?this._scroll.scrollTop:0},t.prototype.isAtTop=function(){return this.currentPosition()<=1},t.prototype.isAtBot=function(){return this.currentPosition()+this.state.heightWrap>=this.state.heightContent-1},t.prototype.animateTo=function(e,t){void 0===t&&(t=h.dur);var i=this._scroll;i&&Object(d.doAnimate)({onStep:function(e,t){i.scrollTop=t},from:i.scrollTop,to:Math.round(e),easing:h.easingFunc.easeInOutCubic,duration:t})},t.prototype.render=function(){var e,t,i,n,o,s=this,d=this.props,h=d.children,g=d.isVisibleScrollbar,v=d.isVisibleFade,m=d.isVisibleButtons,f=d.onMouseOver,_=d.onMouseOut,w=this.state,b=w.heightContent,y=w.heightWrap,C=w.isVisibleBotButton,S=w.isVisibleTopButton;return a.a.createElement(l,{whitelist:["height"],onMeasure:this._handleResizeWrap},a.a.createElement("div",{className:u.wrap,onMouseOver:f,onMouseOut:_},a.a.createElement("div",{className:r()(u.scrollWrap,(e={},e[u.noScrollBar]=!g,e)),onScroll:this._handleScroll,ref:function(e){return s._scroll=e}},a.a.createElement(l,{onMeasure:this._handleResizeContent,whitelist:["height"]},a.a.createElement("div",{className:u.content},h))),v&&a.a.createElement("div",{className:r()(u.fadeTop,(t={},t[u.isVisible]=S&&b>y,t))}),v&&a.a.createElement("div",{className:r()(u.fadeBot,(i={},i[u.isVisible]=C&&b>y,i))}),m&&a.a.createElement("div",{className:r()(u.scrollTop,(n={},n[u.isVisible]=S&&b>y,n)),onClick:this._handleScrollTop},a.a.createElement("div",{className:u.iconWrap},a.a.createElement(c.a,{icon:p,className:u.icon}))),m&&a.a.createElement("div",{className:r()(u.scrollBot,(o={},o[u.isVisible]=C&&b>y,o)),onClick:this._handleScrollBot},a.a.createElement("div",{className:u.iconWrap},a.a.createElement(c.a,{icon:p,className:u.icon})))))},t.defaultProps=g,t}(a.a.PureComponent)},"5M8d":function(e,t,i){},"5qsH":function(e,t){
e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="45" height="45"><g fill="none" stroke="currentColor"><path d="M14.5 27.5c0 4.97 3.03 8 8 8 4.97 0 8-3.03 8-8v-6a3 3 0 0 0-3-3h-10a3 3 0 0 0-3 3v6z"/><path stroke-linecap="square" d="M22.5 19v16"/><path d="M27.5 18.5a5 5 0 1 0-10 0m13 3h2a2 2 0 0 1 2 2V25m-4 2.5h2a2 2 0 0 1 2 2V31M29 32.5h1.5a2 2 0 0 1 2 2V36m-18-14.5h-2a2 2 0 0 0-2 2V25m4 2.5h-2a2 2 0 0 0-2 2V31m5.5 1.5h-1.5a2 2 0 0 0-2 2V36"/><g transform="translate(12 8)"><circle cx="2.5" cy="2.5" r="2"/><path d="M3.911 3.911L7 7"/></g><g transform="translate(26 8)"><circle cx="4.5" cy="2.5" r="2"/><path d="M3.115 3.885L0 7"/></g></g></svg>'},"6Qm0":function(e,t,i){"use strict";i.r(t),i.d(t,"uiDefaults",(function(){return o}));var n={de:["USD","EUR","JPY","AUD","DEM","GBP","CAD","FRF","CNY","ITL","NZD","ESP","MXN","RUR","HKD","BRL","INR","CHF","TRL","SEK","ARS","PLZ","ATS"],fr:["USD","EUR","JPY","AUD","DEM","GBP","CAD","FRF","CNY","ITL","NZD","ESP"],it:["USD","EUR","JPY","AUD","DEM","GBP","CAD","FRF","CNY","ITL","NZD","ESP"],tr:["USD","EUR","JPY","AUD","DEM","GBP","CAD","FRF","CNY","ITL","NZD","ESP","TRL"],kr:["USD","EUR","JPY","AUD","DEM","GBP","CAD","FRF","CNY","MXN","RUR","HKD","BRL","INR","SGD","KRW","THB","TWD","VND"],in:["USD","EUR","JPY","AUD","DEM","GBP","CAD","FRF","CNY","RUR","HKD","BRL","INR","SGD","IDR","MYR","AED","QAR"],my:["USD","EUR","JPY","AUD","DEM","GBP","CAD","FRF","CNY","HKD","SGD","MYR"],ru:["USD","EUR","JPY","AUD","DEM","GBP","CAD","FRF","ITL","NZD","ESP","MXN","RUR","CHF","TRL"],uk:["USD","EUR","JPY","AUD","DEM","GBP","CAD","FRF","ITL","NZD","ESP","MXN","CHF","TRL","SEK","NOK","GRD"],en:["USD","EUR","JPY","AUD","DEM","GBP","CAD","FRF","ITL","NZD","ESP","MXN","CHF","TRL","ZAR"],tw:["USD","EUR","JPY","AUD","DEM","GBP","CAD","FRF","ITL","NZD","ESP","MXN","CHF","TRL","ZAR","TWD"],pl:["USD","EUR","JPY","AUD","DEM","GBP","CAD","CNY","ITL","NZD","SEK","NOK","PLZ"],es:["USD","EUR","JPY","AUD","DEM","GBP","CAD","ITL","ESP","MXN","CHF","ARS","CLP","COP"],cn:["USD","EUR","JPY","AUD","DEM","GBP","CAD","FRF","CNY","NZD","HKD","SGD"],br:["USD","EUR","JPY","AUD","DEM","GBP","FRF","CNY","MXN","RUR","BRL","INR"],id:["USD","EUR","JPY","AUD","DEM","GBP","FRF","RUR","HKD","BRL","INR","SGD","IDR"],ja:["USD","EUR","JPY","AUD","DEM","CAD","FRF","CNY","ITL","NZD","MXN","RUR","HKD","BRL","INR","SGD","KRW","ZAR"]},o=function(e){return(n[e]||n.en).slice()}},"6RdN":function(e,t,i){"use strict";i.r(t),i.d(t,"renderBadgeAccountWithoutFeaturedBroker",(function(){return s}));var n=i("bbtx"),o=i("EhHS"),a=i("n2KA");function s(e,t){var i=t.badges,s=t.size,r=t.getTitle,l=t.getLink;if(0!==i.length){var c=i.filter((function(e){return!Object(n.isFeaturedBroker)(e.name)})),d=Object(o.getBadgeAccountName)(c);d&&Object(a.renderBadgeAccount)(e,{name:d,title:r&&r(i),href:l&&l(d),size:s})}}},"7+KO":function(e,t){
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 20" width="15" height="20"><g fill="none" stroke="currentColor"><path d="M11.499 13.246a7 7 0 1 0-8.003-.004l.003 3.753c0 .279.232.505.501.505h7c.276 0 .5-.229.5-.505l-.001-3.749z"/><path stroke-linecap="square" d="M5.5 18v.992c0 .28.215.508.49.508h3.02c.27 0 .49-.221.49-.508V18"/><path d="M3.5 13.5h8"/><path stroke-linecap="square" d="M7.5 8.5v4m-2-5h4"/><path d="M3.5 15.5h8"/></g></svg>'},"9Qhg":function(e,t,i){},"9nb6":function(e,t,i){"use strict";i.r(t),i.d(t,"getSymbolDataFromSymbolString",(function(){return o})),i.d(t,"getShortNameAndProName",(function(){return a}));var n=i("8woN");function o(e){if(e.includes("|")){var t=e.split("|"),i=t[0],n=t[1],o=a(i);return{proName:o.proName,shortName:o.shortName,interval:n}}var s=a(e);return{proName:s.proName,shortName:s.shortName,interval:void 0}}function a(e){var t,i;return e.includes(":")?(i=Object(n.shortName)(e),t=e):i=e,{proName:t,shortName:i}}},AJki:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 17" width="24px" height="17px"><path fill-rule="evenodd" d="M1.826 16.913l4.088-6c.85-1.244 2.036-1.25 2.896-.018l2.718 3.897c1.698 2.436 4.46 2.235 5.79-.425l6.457-12.92-1.79-.894-6.456 12.92c-.65 1.302-1.53 1.366-2.363.175L10.45 9.75c-1.66-2.38-4.55-2.365-6.188.037l-4.088 6 1.652 1.126z"/></svg>'},AlSh:function(e,t,i){},Aml6:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 15" width="12px" height="15px"><path fill-rule="evenodd" d="M6.2 0c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zM6 14.3a7.2 7.2 0 0 1-6-3.22C.03 9.09 4 8 6 8c1.99 0 5.97 1.09 6 3.08a7.2 7.2 0 0 1-6 3.22z"/></svg>'},BARr:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="45" height="45"><path fill="currentcolor" d="m21.5 10a3.5 3.5 0 0 0-3.5 3.5v3h1v-3a2.5 2.5 0 0 1 2.5-2.5h9a2.5 2.5 0 0 1 2.5 2.5v3a2.5 2.5 0 0 1-2.5 2.5h-1v1h1a3.5 3.5 0 0 0 3.5-3.5v-3a3.5 3.5 0 0 0-3.5-3.5zm-7 6a4.5 4.5 0 0 0-4.5 4.5v13.2l4.7-4.7h10.8a4.5 4.5 0 0 0 4.5-4.5v-4a4.5 4.5 0 0 0-4.5-4.5zm0 1h11a3.5 3.5 0 0 1 3.5 3.5v4a3.5 3.5 0 0 1-3.5 3.5H14.3L11 31.3V20.5a3.5 3.5 0 0 1 3.5-3.5zm15 5v1h1a2.5 2.5 0 0 1 2.5 2.5v8.8L29.7 31h-8.2a2.5 2.5 0 0 1-2.5-2.5h-1a3.5 3.5 0 0 0 3.5 3.5h7.8l4.7 4.7V25.5a3.5 3.5 0 0 0-3.5-3.5z"/></svg>'},BH4H:function(e,t,i){"use strict";(function(t,n,o){i("9Qhg"),i("TdlR");var a=i("Eyy1").ensureNotNull,s=i("PiKd"),r=i("Q8Ag"),l=i("PT1i").linking,c=i("1AAW").combine,d=i("JWMC").trackEvent,h=i("e3/o"),u=i("/BH3"),p=i("TSYQ"),g=i("Fb/L").WidgetBarInternal,v=i("dkCg").RightToolbarRenderer,m=i("tBUM").WidgetBarTabButtonViewModel,f=i("jkvV").Hider,_=i("i8i4"),w=i("q1tI"),b=i("HySD"),y=i("N22A"),C=y.tradingService,S=y.waitTradingService,P=i("b5Gw").makeCancelable,T=i("ULlu").unwrap,B=i("+k+b").getInitData,k=i("+GxX").isFeatureEnabled;i("e9Yb");var O=i("xrkQ"),x=parseInt(O["css-value-widgets-margin"]);i("5M8d");var M=i("oOPW");const D={title:$.t("Details"),ctor:null,lazyLoad:!0,chartWidgetAllowed:!0,widgetClass:O.widget,headerClass:O.widgetHeader,margin:x
},I=Object.assign({},D,{emptyHeader:!0});function N(e){e||(e={}),this.options=e,this.resizerBridge=e.resizerBridge,this.adaptive=!!e.adaptive,this.tradingPanelAccessor=e.tradingPanelAccessor;var t=this.resizerBridge;this._visible=c((function(e,t,i){return Boolean(e&&t&&i)}),t.width,t.height,t.visible),this.widgetConfig=$.extend(!0,{},N.widgetConfig),e.widgetConfig&&(this.widgetConfig=$.extend(!0,this.widgetConfig,e.widgetConfig)),this.layout=new L({widgetBar:this}),this._customization=e.customization,e.chartWidgetCollection&&(this.chartWidgetCollection=e.chartWidgetCollection),e.state?this.layout.demarshal(e.state):e.settingsPrefix&&(this._settingsPrefix=e.settingsPrefix+"",this.loadFromTVSettings()),e.readonly&&(this.readonly=!0),e.fixedMode&&(this.fixedMode=!0),e.showCloseButton&&(this.showCloseButton=!0),this.$container=$(this.resizerBridge.container.value()),this._internal=new g(this),this.createHTML(),this.initLayout(),loginStateChange.subscribe(this,this.onLoginStateChange),this.resizerBridge.width.subscribe(function(){this.layout.syncWidth()}.bind(this)),this.resizerBridge.height.subscribe(function(){this.layout.syncHeight()}.bind(this)),this.resizerBridge.visible.subscribe(function(e){this.layout.onVisibilityChange(e)}.bind(this)),this.resizerBridge.availWidth.subscribe(function(){this.layout.requestOptimalWidth(),this.layout.updateResponsiveness()}.bind(this)),this._tradingServiceCancelable=P(S()),this._tradingServiceCancelable.promise.then(function(e){this._tradingServiceCancelable=null,e.onConnectionStatusChange.subscribe(this,this._onBrokerConnectionStatusChanged)}.bind(this))}N.widgetConfig={reuters_calendar:{title:$.t("Economic Calendar"),ctor:null,lazyLoad:!0,icon:"economic-calendar",options:{widgetType:"widgetbar"}},earnings_calendar:{title:$.t("Earnings Calendar"),ctor:null,lazyLoad:!0,icon:"earnings-calendar"},watchlist:{title:$.t("Watchlist"),ctor:null,lazyLoad:!0,chartWidgetAllowed:!0,emptyHeader:!0,widgetClass:O.widget,headerClass:O.widgetHeader,margin:x,preloadDelay:6e4},hotlist:{title:$.t("Hotlist"),ctor:null,lazyLoad:!0,chartWidgetAllowed:!0,emptyHeader:!0,widgetClass:O.widget,headerClass:O.widgetHeader,margin:x},detail:I,news:{title:$.t("Headlines"),ctor:null,noHeaderSpace:!0,widgetClass:O.widget,headerClass:O.widgetHeader,titleClass:O.widgetTitle,margin:x},chat:{title:$.t("Talks"),ctor:null,chartWidgetAllowed:!0,doNotClearNotifications:!0},messages:{title:$.t("Recent Chats"),ctor:null,chartWidgetAllowed:!0,doNotClearNotifications:!0},messages_with_select:{title:$.t("Recent Chats"),ctor:null,chartWidgetAllowed:!0,doNotClearNotifications:!0,options:{layoutWithSelect:!0},emptyHeader:!0},notifications_user:{title:$.t("Notifications"),ctor:null,options:{type:"user"},chartWidgetAllowed:!0},notifications_following:{title:$.t("Ideas Stream"),ctor:null,options:{type:"following"},chartWidgetAllowed:!0},datawindow:{title:$.t("Data Window"),ctor:null,chartWidgetAllowed:!0,chartWidgetRequired:!0},publicchats:{title:$.t("All Talks"),ctor:null,doNotClearNotifications:!0},publicchats_with_select:{
title:$.t("All Talks"),ctor:null,doNotClearNotifications:!0,options:{layoutWithSelect:!0},emptyHeader:!0},notes:{title:$.t("My Ideas"),ctor:null,lazyLoad:!0,chartWidgetAllowed:!0},alerts_manage:{ctor:null,lazyLoad:!0,chartWidgetAllowed:!0,emptyHeader:!0,noHeaderSpace:!0,widgetClass:O.widget,headerClass:O.widgetHeader,margin:x},alerts_log:{ctor:null,chartWidgetAllowed:!0,emptyHeader:!0,noHeaderSpace:!0,widgetClass:O.widget,headerClass:O.widgetHeader,margin:x},market_summary:{title:$.t("Market Summary"),ctor:null},object_tree:{title:$.t("Object tree. Multi-select drawings tools"),ctor:null,noHeader:!0,chartWidgetAllowed:!0,chartWidgetRequired:!0},streams:{title:$.t("Streams"),ctor:null,emptyHeader:!0,widgetClass:O.widget,headerClass:O.widgetHeader,margin:x,doNotClearNotifications:!0,doNotClearNotificationsOnVisibilityChange:!0}},N.svgIcons={base:i("dECE")},N.svgIcons["economic-calendar"]=i("nVo0"),N.svgIcons["earnings-calendar"]=i("wvCj"),N.svgIcons["alarm-clock"]=i("uDbD"),N.svgIcons.hotlists=i("TZqb"),N.svgIcons.calendar=i("ohw9"),N.svgIcons.notes=i("PiG3"),N.svgIcons.chat=i("BARr"),N.svgIcons.messages=i("Yznx"),N.svgIcons["ideas-stream"]=i("BpqW"),N.svgIcons.notifications=i("LBec"),N.svgIcons.streams=i("P+Z2"),N.svgIcons.news=i("Ui/w"),N.svgIcons["object-tree"]=i("aE/C"),N.svgIcons.datawindow=i("GNw3"),N._messageHandlers=[],N.postMessage=function(e,t){N._messageHandlers.forEach((function(i){i.handler(e,t)}))},N.onMessage=function(e){"function"==typeof e&&N._messageHandlers.push({handler:e,widget:this})},N.offMessage=function(e){if("function"==typeof e){const t=N._messageHandlers.findIndex(t=>t.handler===e);-1!==t&&N._messageHandlers.splice(t,1)}},N.prototype.destroy=function(){null!==this._tradingServiceCancelable?(this._tradingServiceCancelable.cancel(),this._tradingServiceCancelable=null):a(C()).onConnectionStatusChange.unsubscribe(this,this._onBrokerConnectionStatusChanged);this._internal.destroy(),this._internal=null},N.prototype.isVisible=function(){var e=this.resizerBridge;return e.visible.value()&&e.height.value()&&e.width.value()},N.prototype.visible=function(){return this._visible},N.prototype.initLayout=function(){var e=this;s.load("widgetbar",(function(){var t=$.Deferred();return r.loadWidgetBarModules((function(i){var n=e.widgetConfig;n.reuters_calendar.ctor=i.ReutersCalendarWidget,n.earnings_calendar.ctor=i.CalendarWidget&&i.CalendarWidget.Earnings,n.watchlist.ctor=i.Watchlist,n.hotlist.ctor=i.HotlistWidget,n.detail.ctor=i.Detail&&i.Detail.Widget,n.news.ctor=i.NewsWidget,n.chat.ctor=i.ChatWidget,n.messages.ctor=i.Messages&&i.Messages.Widget,n.messages_with_select.ctor=i.Messages&&i.Messages.Widget,n.notifications_following.ctor=i.NotificationsWidgets,n.notifications_user.ctor=i.NotificationsWidgets,n.publicchats.ctor=i.PublicChatsWidget,n.publicchats_with_select.ctor=i.PublicChatsWidget,n.notes.ctor=i.NotesWidget,n.alerts_manage.ctor=i.AlertsManageWidget,n.alerts_log.ctor=i.AlertsLogWidget,n.streams.ctor=i.StreamsWidget,t.resolve(i)})),t.promise()}),this.options.instantLoad),
s.onReady("widgetbar",(function(){e.layout.startWidgets()})),0===this.layout.pages.length&&(this.layout.setMinimizedState(!0),this.layout.$handle.addClass("js-hidden")),e.layout.requestOptimalWidth(),this.layout.syncWidth(),this.layout.syncHeight(),e.layout.onVisibilityChange(),e.layout.updateResponsiveness()},N.prototype.loadWidgets=function(){this._widgetsLoadRequested||(this._widgetsLoadRequested=!0,s.load("widgetbar",null,!0))},N.prototype.onLoginStateChange=function(e){e||window.is_authenticated&&(this.dropWidgetData(),this.refreshFromTVSettings())},N.prototype.dropWidgetData=function(){for(var e in this.widgetConfig)delete this.widgetConfig[e].data},N.prototype.refreshFromTVSettings=function(){this._settingsPrefix&&(this.layout&&this.layout.destroy(),this.layout=new L({widgetBar:this}),this.loadFromTVSettings(),this.layout.createHTML(),this.layout.$pages.appendTo(this.$wrap),this.layout.$tabs.appendTo(this.$wrap),this.layout.$hider&&this.layout.$hider.appendTo(this.$wrap),this.initLayout())},N.prototype.getWidgets=function(e){for(var t=[],i=0;i<this.layout.pages.length;++i)t=t.concat(this.layout.pages[i].getWidgets(e));return t},N.prototype.loadFromTVSettings=function(){if(this._settingsPrefix){try{this.migrateFromOld()}catch(a){console.error&&console.error(a)}var e=this.getLayoutState();e=this.mergeProperties(e),this.layout.demarshal(e,{settingsPrefix:this._settingsPrefix}),this.saveToTVSettings();var t=TVSettings.getJSON(this._settingsPrefix+"."+u.layoutKeyName,null);if(t){var i,n=[];for(i in t.widgets)n=n.concat(t.widgets[i].map((function(e){return e.id})));var o=TVSettings.keysMask(this._settingsPrefix+".widget.*.*");o&&o.forEach(function(e){var t=e.replace(this._settingsPrefix+".widget.","");-1===n.indexOf(t)&&0===e.indexOf(this._settingsPrefix+".widget.")&&(d("Settings debug","loadFromTVSettings: "+e,user.username),TVSettings.remove(e))}.bind(this))}}},N.prototype.mergeProperties=function(e){var t=TVSettings.getJSON(this._settingsPrefix+"."+u.layoutKeyName,null);if(!t)return e;t.settings&&$.extend(e,t.settings);for(var i={},n=0;n<e.pages.length;n++)for(var o=0;o<e.pages[n].widgets.length;o++){var a=e.pages[n].widgets[o],s=i[a.type]||0;t.widgets[a.type]&&t.widgets[a.type][s]&&$.extend(a,t.widgets[a.type][s]),i[a.type]=++s}return e},N.prototype.migrateFromOld=function(e){var t=TVSettings.getJSON(this._settingsPrefix+".layout-fixed",null);if(t){var i={settings:{}};"minimized"in t&&(i.settings.minimized=t.minimized),"width"in t&&(i.settings.width=t.width),"activeIndex"in t&&(i.settings.activeIndex=t.activeIndex),i.widgets={};for(var n=0;n<t.pages.length;n++)for(var o=t.pages[n].widgets||t.pages[n],a=0;a<o.length;a++){var s,r=o[a];r.id?(s=r.id.replace(/\..*/,""),/^news_.+/.test(s)&&(s=r.type="news",TVSettings.setJSON(this._settingsPrefix+".widget."+r.id.replace(/news_[^.]*/,"news"),TVSettings.getValue(this._settingsPrefix+".widget."+r.id)),r.id=r.id.replace(/news_[^.]*/,"news"))):(s=r.type,/^news_.+/.test(s)&&(r.properties=r.properties||{},r.properties.provider=r.type.replace(/news_([^.]*).*/,"$1"),
s=r.type="news")),i.widgets[s]?i.widgets[s].push(r):i.widgets[s]=[r]}TVSettings.setJSON(this._settingsPrefix+"."+u.layoutKeyName,i)}else if(TVSettings.getJSON(this._settingsPrefix+".layout",null)){var l=this.getWidgetProperties("watchlist");if(l){i={settings:{},widgets:{watchlist:[l]}};TVSettings.setJSON(this._settingsPrefix+"."+u.layoutKeyName,i)}}t&&TVSettings.remove(this._settingsPrefix+".layout-fixed"),TVSettings.getJSON(this._settingsPrefix+".layout",null)&&TVSettings.remove(this._settingsPrefix+".layout")},N.prototype.saveToTVSettings=function(){if(this._settingsPrefix){var e=this.layout.marshal();TVSettings.setJSON(this._settingsPrefix+"."+u.layoutKeyName,e)}},N.prototype.getWidgetProperties=function(e,t){t=t||0;var i=this._settingsPrefix.replace(/\W/g,"\\$&")+".widget.",n=TVSettings.keysMask(i+e+".*");return!!(n&&n.length&&(n=n.sort())[t])&&{id:n[t].replace(i,"")}},N.prototype._onBrokerConnectionStatusChanged=function(e){this.layout.updateRightToolbar()};var E={type:"news"};function L(e){this.widgetBar=e.widgetBar,this.pages=[],this.activePageIndex=new n(this.activeIndex),this.isMinimized=new n(this.minimized),e&&e.widgetBar&&Object.defineProperty(this,"widgetBar",{value:e.widgetBar,configurable:!0})}function W(e){this.widgets=[],e&&e.widgetBarLayout&&Object.defineProperty(this,"widgetBarLayout",{value:e.widgetBarLayout,configurable:!0})}function A(e){e&&e.widgetBarPage&&Object.defineProperty(this,"widgetBarPage",{value:e.widgetBarPage,configurable:!0}),this._internalState={alive:new n(!0),container:new n,width:new n,height:new n,detachable:new n(!1)},this._rdState=new b.ResizerDetacherState(this._internalState),this._rdState.owner.subscribe(function(e){e!==this._internalState&&$(this._internalState.container.value()).empty()}.bind(this)),this.widgetActive=new n,this.widgetMaximized=new n,this._widgetStarted=new o,this._preloadTimeout=null}function H(e){e&&e.settingsKey&&(this._settingsKey=e.settingsKey,this._value=TVSettings.getJSON(this._settingsKey,null)),e&&e.widgetBarWidget&&Object.defineProperty(this,"widgetBarWidget",{value:e.widgetBarWidget,configurable:!0})}function R(){return t.enabled("right_toolbar")}N.prototype.getGenericLayoutState=function(e){var n=u.getDefaultState(),o=window.COUNTRY_CODE_TO_DEFAULT_EXCHANGE;o.default=o.en;for(var a=k("news_separate_tab_enabled"),s=B(),r=k("streams_widget_enabled")&&s.streams_enabled,l=[{_gaEvent:"General Widget",title:a?$.t("Watchlist and details"):$.t("Watchlist, details and news"),name:"base",icon:"base",widgets:[{type:"watchlist",properties:e&&e.length?{list:e}:void 0},{type:"detail"},Object.assign({},E,{isEnabled:!a})]},t.enabled("alerts")?{_gaEvent:"Alerts",title:$.t("Alerts"),name:"alerts",icon:"alarm-clock",widgets:[{type:"alerts_manage",properties:{}},{type:"alerts_log",properties:{}}]}:null,a?{_gaEvent:"News",title:$.t("News"),name:"news",icon:"news",widgets:[E]}:null,this.chartWidgetCollection&&!this.chartWidgetCollection.readOnly()?{_gaEvent:"Object tree",title:$.t("Object tree. Multi-select drawings tools"),name:"object_tree",icon:"object-tree",
onBottom:!0,widgets:[{type:"object_tree"}]}:null,{_gaEvent:"Data Window",title:$.t("Data Window"),name:"data-window",icon:"datawindow",widgets:[{type:"datawindow"}]},{_gaEvent:"Hotlists",title:$.t("Hotlists"),name:"hotlist",icon:"hotlists",widgets:[{type:"hotlist",properties:{exchangeByLocale:o,groupByLocale:{default:"volume_gainers"}}},{type:"hotlist",properties:{exchangeByLocale:o,groupByLocale:{default:"percent_change_gainers"}}},{type:"hotlist",properties:{exchangeByLocale:o,groupByLocale:{default:"percent_change_loosers"}}}]},{_gaEvent:"Calendar",title:$.t("Calendar"),name:"calendar",icon:"calendar",widgets:[{type:"reuters_calendar",properties:{}},{type:"earnings_calendar",properties:{}}]},{_gaEvent:"My Ideas",title:$.t("My Ideas"),name:"notes",icon:"notes",spaceBottom:!0,spaceBottomText:$.t("Social"),widgets:[{type:"notes"}]},{_gaEvent:"Public Chats",title:$.t("Public Chats"),name:"chats",icon:"chat",widgets:[{type:"chat"},{type:"publicchats"}]},{_gaEvent:"Private Chats",title:$.t("Private Chats"),name:"pm_chats",icon:"messages",widgets:[{type:"messages"}]},{_gaEvent:"Ideas Stream",title:$.t("Ideas Stream"),name:"ideas_stream",icon:"ideas-stream",widgets:[{type:"notifications_following"}]},r?{_gaEvent:"Streams",title:$.t("Streams"),name:"streams",icon:"streams",widgets:[{type:"streams"}],TabButtonComponent:i("XUKQ").StreamsTabButton}:null,{_gaEvent:"Notifications",title:$.t("Notifications"),name:"notifications",icon:"notifications",widgets:[{type:"notifications_user"}]}],c=0;c<l.length;c++)l[c]&&n.pages.push(l[c]);return n},N.prototype.getChartingPlatformLayoutState=function(e,i){var n={version:2,width:267,pages:[]};if(this._customization.watchlist||this._customization.details||this._customization.news){var o="",a=[];this._customization.watchlist&&(o=$.t("Watchlist"),a.push({type:"watchlist",id:"watchlist."+i,properties:e&&e.length?{list:e}:void 0})),this._customization.details&&(this._customization.watchlist?o+=" "+$.t("and details"):o=$.t("Details"),a.push({type:"detail"})),this._customization.news&&(this._customization.watchlist||this._customization.details?o+=" and news":o="News",a.push({type:"news",id:"news."+i})),n.pages.push({name:"base",title:o,icon:"base",widgets:a})}return this._customization.datawindow&&n.pages.push({title:$.t("Data Window"),name:"data-window",icon:"datawindow",widgets:[{type:"datawindow"}]}),t.enabled("show_object_tree")&&this.chartWidgetCollection&&!this.chartWidgetCollection.readOnly()&&n.pages.push({title:$.t("Show Object tree"),name:"object_tree",icon:"object-tree",onBottom:!0,widgets:[{type:"object_tree"}]}),n},N.prototype.getLayoutState=function(){var e,i=this,n=TVSettings.getJSON("watchlist.list",[]);function o(e){return!(void 0!==e.isEnabled&&!e.isEnabled)&&(i.chartWidgetCollection||!N.widgetConfig[e.type].chartWidgetRequired)}for(var a=(e=t.enabled("trading_terminal")?this.getChartingPlatformLayoutState(n,"terminal"):this.getGenericLayoutState(n)).pages.length-1;a>=0;a--){var s=e.pages[a];s.widgets=$.grep(s.widgets,o)}return e.pages=$.grep(e.pages,(function(e){
return e.widgets&&e.widgets.length})),e},N.prototype.createWidgetId=function(e){return e+"."+h.randomHash()},N.prototype.setPage=function(e){this.layout.setMinimizedState(!1);var t=this.layout.activeIndex;return this.layout.pages.forEach((function(i,n){i.name===e&&(t=n)})),this.layout.switchPage(t),this.layout.getActivePage()},L.prototype.startWidgets=function(){this.pages.forEach((function(e){e.widgets.forEach((function(e){e.widgetObject||e.widgetStartDelayed||setTimeout((function(){e.startWidget()}),0)}))}));var e=this.getActivePage();e&&e.onActiveStateChange(!0)},L.prototype.syncHeight=function(){var e=this.widgetBar.resizerBridge.height.value();if(this.$pages.css("height",e+"px"),!this.minimized){var t=this.getActivePage();t&&t.updateWidgetsHeight()}},L.prototype.tabsWidth=function(){return R()?u.tabsWidth:this.minimized?u.hiderGapWidth:0},L.prototype.borderWidth=function(){return u.borderWidth},L.prototype.canOpen=function(){return this.MIN_WIDTH+this.tabsWidth()+this.borderWidth()<=this.widgetBar.resizerBridge.availWidth.value()},L.prototype.requestWidth=function(e){var t=this.widgetBar.resizerBridge;e>0&&(e+=this.borderWidth());var i=this.tabsWidth(),n=e+i;this.canOpen()?t.width.value()!==n&&t.negotiateWidth([{min:i,max:i},{min:this.MIN_WIDTH+i,max:n}]):t.negotiateWidth(0)},L.prototype.requestOptimalWidth=function(){this.changeWidgetsButtonTitle(),this.minimized?this.requestWidth(0):this.requestWidth(this.width)},L.prototype.updateResponsiveness=function(){var e=!this.canOpen();this.$tabs.toggleClass("js-hidden",e),this.$pages.toggleClass("js-hidden",e)},L.prototype.syncWidth=function(){var e=this.widgetBar.resizerBridge,t=this.tabsWidth(),i=this.borderWidth(),n=e.width.value(),o=Math.max(n-t-i,0)||0;if(o<this.MINIMIZE_THRESHOLD?this.setMinimizedState(!0):this.setMinimizedState(!1),this.$pages.css("width",o+"px").toggleClass("hidden",!!this.minimized),!this.minimized){var a=this.getActivePage();a&&a.widgets.forEach((function(e){e.onWidthChange(o)})),this.widgetBar&&this.widgetBar.loadWidgets()}var s=!this.canOpen();this.$deviceButton&&this.$deviceButton.toggleClass("js-hidden",!s||!this.minimized)},L.prototype.setMinimizedState=function(e){e=!!e,!!this.minimized!==e&&(this.minimized=e,this.isMinimized.setValue(this.minimized),e&&this.widgetBar.resizerBridge.exitFullscreen(),this.requestOptimalWidth(),this.activeIndex>=0&&this.pages[this.activeIndex].onActiveStateChange(!this.minimized))},L.prototype.getWidgetsButtonTitle=function(){return this.minimized?window.t("Show Widgets"):window.t("Hide Widgets")},L.prototype.changeWidgetsButtonTitle=function(){this.widgetBar.$widgetBarBtn&&this.widgetBar.$widgetBarBtn.attr("title",this.getWidgetsButtonTitle())},L.prototype.switchPage=function(e){if(-1===e||0===this.pages.length)return this.activeIndex=-1,void this.activePageIndex.setValue(this.activeIndex);var t;if(e instanceof W){if(-1===(t=this.pages.indexOf(e)))return}else t=+e;var i=this.pages[this.activeIndex];this.activeIndex=Math.min(this.pages.length-1,Math.max(0,t)),
this.activePageIndex.setValue(this.activeIndex);var n=this.pages[this.activeIndex];this.activeName=n.name,this.minimized||i&&i===n||(i&&i.onActiveStateChange(!1),n&&n.onActiveStateChange(!0))},L.prototype.getActivePage=function(){return this.minimized?null:this.pages[this.activeIndex]||null},L.prototype.onTabClick=function(e,t){if(!e.isDefaultPrevented()){var i=this.pages.indexOf(t);-1!==i&&(e.preventDefault(),i!==this.activeIndex||this.minimized?(t._gaEvent&&d("Platform Widgets",t._gaEvent),this.switchPage(i),this.minimized&&this.setMinimizedState(!1)):this.setMinimizedState(!0),this.widgetBar&&this.widgetBar.saveToTVSettings())}},N.prototype.ensureSupportTicketButtonViewModel=function(){return this._supportTicketButtonViewModel?this._supportTicketButtonViewModel:this._supportTicketButtonViewModel=new m({icon:i("5qsH"),hint:window.t("Help Center"),onClick:function(){s.onReady("widgetbar",(function(e){var t=e.showSupportDialog;t&&t()})),s.load("widgetbar",null,0)}})},N.prototype.ensureHelpButtonViewModel=function(){if(this._helpButtonViewModel)return this._helpButtonViewModel;var e=this.ensureSupportTicketButtonViewModel();return this._helpButtonViewModel=new m({icon:i("1WEt"),hint:$.t("Help Center"),onClick:e.onClick.value()})},L.prototype.onLayoutResizeHandleMousedown=function(e){if(!e.isDefaultPrevented()){e.preventDefault();var t,i=this,n=Math.max(this.widgetBar.resizerBridge.width.value()-this.tabsWidth()-this.borderWidth(),0);t=e.originalEvent.touches?e.originalEvent.touches[0].clientX:e.pageX,$(document.documentElement).on("mousemove touchmove",o).on("mouseup touchend",(function e(t){$(document.documentElement).off("mousemove touchmove",o).off("mouseup touchend",e),i.widgetBar&&i.widgetBar.saveToTVSettings(),i.changeWidgetsButtonTitle()}))}function o(e){var o;o=e.originalEvent.touches?e.originalEvent.touches[0].clientX:e.pageX;var a=n-(o-t);a<i.MINIMIZE_THRESHOLD?a=0:a<i.MIN_WIDTH&&(a=i.MIN_WIDTH),a>0&&(i.width=a),i.requestWidth(a)}},L.prototype.removePage=function(e){var t=this.pages.indexOf(e);-1!==t&&(delete e.widgetBarLayout,this.pages.splice(t,1),e.$page.detach(),e.$page.detach(),e.$tab.detach(),this.activeIndex===t&&this.switchPage(t-1))},L.prototype.createPage=function(){var e=new W({widgetBarLayout:this});return this.pages.push(e),e.createHTML(),this.$pagescontent.append(e.$page),e},L.prototype.createWidget=function(e,t){if(t){if(-1===this.pages.indexOf(t))return null}else t=this.createPage();var i=new A({widgetBarPage:t});return i.demarshal({type:e}),i.createHTML(),t.attachWidget(i),i},L.prototype.widgetInsertionDisallowed=function(e){return"watchlist"===e&&((!window.user||!user.is_pro)&&(this.pages.some((function(t){return t.widgets.some((function(t){return t.type===e}))}))?(M({feature:"multipleWatchLists"}),!0):void 0))},L.prototype.onVisibilityChange=function(){var e=!(!this.widgetBar||!this.widgetBar.resizerBridge.visible.value());this.visible=e,this.pages.forEach((function(t){t.onVisibilityChange(e)}))},L.prototype.destroy=function(){
if(this.widgetBar&&this.widgetBar.layout===this&&delete this.widgetBar.layout,this.tabRenderer&&(this.tabRenderer.destroy(),this.tabRenderer=null),this.$hider){var e=this.$hider.get(0);_.unmountComponentAtNode(e)}for(var t=this.pages.length;t--;)for(var i=this.pages[t],n=i.widgets.length;n--;)i.widgets[n].destroy();for(var o in this)this[o]instanceof $&&this[o].remove(),delete this[o]},L.prototype.getWidgetBarOption=function(){if(this.widgetBar&&name in this.widgetBar)return this.widgetBar[name]},L.prototype.MIN_WIDTH=200,L.prototype.MINIMIZE_THRESHOLD=50,L.prototype.width=290,L.prototype.minimized=!t.enabled("show_right_widgets_panel_by_default"),L.prototype.activeIndex=0,L.prototype.activeName="",L.prototype.visible=!0,W.prototype.onActiveStateChange=function(e){e=!!e,$(this.$page).toggleClass("active",!!e),this.tab.onActiveStateChange(e),e&&this.updateWidgetsHeight({skipIfHeightUnchanged:!0}),this.widgets.forEach((function(t){t.onActiveStateChange(e)}))},W.prototype.updateWidgetsHeight=function(e){if(!this.$page)return;if(!this.widgetBarLayout||!this.widgetBarLayout.widgetBar)return;if(this.widgetBarLayout.getActivePage()!==this)return void(this._invalidated=!0);e=e||{};var t=this.widgetBarLayout.widgetBar.resizerBridge.height.value();if(this._pageHeight===t&&e.skipIfHeightUnchanged||(this._invalidated=!0,this._pageHeight=t),!this._invalidated)return;var i,n=t,o=0,a=this.widgets,s=null;const r=a.every(e=>null===e.heightRatio||0===e.heightRatio);for(var l=this.widgets.length;l--;)if(this.widgets[l].widgetMaximized.value()){s=this.widgets[l];break}if(a.length>0&&null===s&&r){const e=a[a.length-1];e.heightRatio=1,s=e}if(s){for(l=this.widgets.length;l--;){(u=a[l])!==s&&u.setHeight(0)}a=[s]}for(l=a.length-1;l>0;l--){n-=(u=a[l]).widgetConfig&&u.widgetConfig.margin||1}for(l=a.length;l--;){(u=a[l]).$widget&&(void 0===i&&(i=u.$header.outerHeight(!0)),n-=i,o+=u.heightRatio)}var c=n/o,d=a.length-1;for(l=0;l<=d;l++){var h,u=a[l];h=l===d?n:Math.round(c*u.heightRatio),u.setHeight(h),n-=h}},W.prototype.onWidgetResizeHandleMousedown=function(e,t){if(!e.isDefaultPrevented()){var i,n,o,a=this;e.preventDefault();for(var s=this.widgets.length-1;s>0;s--)this.widgets[s]===t&&(i=this.widgets[s],n=this.widgets[s-1]);o=e.originalEvent.touches?e.originalEvent.touches[0].clientY:e.pageY;var r=n._rdState.bridge().height.value(),l=n.heightRatio+i.heightRatio,c=r+i._rdState.bridge().height.value();if(0!==c){var d,h=function(e){a.$page.addClass("widget-resize-mode");var t=(e.originalEvent.touches?e.originalEvent.touches[0].clientY:e.pageY)-o,s=Math.max(0,Math.min(r+t,c));d!==s&&(d=s,n.heightRatio=s/c*l,i.heightRatio=l-n.heightRatio,n.setHeight(s),i.setHeight(c-s))},u=function(e){$(document.documentElement).off("mousemove touchmove",h).off("mouseup touchend",u),a.$page.removeClass("widget-resize-mode"),d!==r&&(a.normalizeRatios(),a.widgetBarLayout&&a.widgetBarLayout.widgetBar&&a.widgetBarLayout.widgetBar.saveToTVSettings())};$(document.documentElement).on("mousemove touchmove",h).one("mouseup touchend",u)}}},
W.prototype.normalizeRatios=function(){for(var e=1/0,t=this.widgets.length;t--;){var i=this.widgets[t].heightRatio;i<=0||!isFinite(i)||i<e&&(e=i)}if(isFinite(e)){for(var n=1;e<1;)e*=2,n*=2;for(;e>=2;)e/=2,n/=2;for(t=this.widgets.length;t--;)this.widgets[t].heightRatio*=n}},W.prototype.attachWidget=function(e,t){t=+t;var i=this.widgets.indexOf(e);-1!==i?this.widgets.splice(i,1):e.widgetBarPage&&e.widgetBarPage!==this&&e.widgetBarPage.removeWidget(e),t<this.widgets.length?t<0&&(t=0):t=this.widgets.length,delete e.widgetBarPage,Object.defineProperty(e,"widgetBarPage",{value:this,configurable:!0}),this.widgets.splice(t,0,e);var n=this.widgets[t+1];n?e.$widget.insertBefore(n.$widget):e.$widget.appendTo(this.$page),this.widgetBarLayout&&this.widgetBarLayout.getActivePage(),this.updateWidgetsHeight(),e.updateVisibleWatchedValue()},W.prototype.removeWidget=function(e){var t=this.widgets.indexOf(e);-1!==t&&(delete e.widgetBarPage,this.widgets.splice(t,1),e.$widget&&e.$widget.detach(),this.updateWidgetsHeight())},W.prototype.remove=function(){this.widgetBarLayout&&this.widgetBarLayout.removePage(this)},W.prototype.destroy=function(){for(var e in this.remove(),this)this[e]instanceof $&&this[e].remove(),delete this[e]},W.prototype.isActiveAndVisible=function(){var e=this.widgetBarLayout;return!(!e||!e.visible)&&e.getActivePage()===this},W.prototype.onVisibilityChange=function(e){var t=e&&this.widgetBarLayout&&this.widgetBarLayout.getActivePage()===this;this.widgets.forEach((function(i){var n=i.getWidgetBarOption("widgetConfig")[i.type];t&&!n.doNotClearNotificationsOnVisibilityChange&&i.clearNotifications(),i.onVisibilityChange(e)}))},W.prototype.notify=function(e,t){!0!==(t=t||{}).clear?t.stopHighlightTab||(this.notificationCounter=this.notificationCounter+(~~e||1),this.updateNotifications(t.notificationValue)):this.clearNotifications()},W.prototype.clearNotifications=function(){this.notificationCounter=0,this.tab.updateNotifications(this.notificationCounter)},W.prototype.updateNotifications=function(e){var t="number"==typeof e?e:this.notificationCounter;this.tab.updateNotifications(t)},W.prototype.notificationCounter=0,W.prototype.getWidgets=function(e){for(var t=[],i=0;i<this.widgets.length;++i){var n=this.widgets[i];n.type===e&&t.push(n)}return t},A.prototype.setHeight=function(e){$(this._internalState.container.value())&&$(this._internalState.container.value()).height(e),this._internalState.height.setValue(e)},A.prototype.onWidthChange=function(e){this._internalState.width.setValue(e)},A.prototype.remove=function(){this.widgetBarPage&&this.widgetBarPage.removeWidget(this)},A.prototype.destroy=function(){for(var e in this.widgetObject&&"function"==typeof this.widgetObject.destroy&&this.widgetObject.destroy(),this.remove(),this.symbolLinking&&(this.symbolLinking.destroy(),this.symbolLinking=null),this.intervalLinking&&(this.intervalLinking.destroy(),this.intervalLinking=null),this.widgetVisible&&(this.widgetVisible.unsubscribe(),this.widgetVisible=null),this.widgetActive&&(this.widgetActive.unsubscribe(),
this.widgetActive=null),this.watchedHeight&&(this.watchedHeight.unsubscribe(),this.watchedHeight=null),this.watchedWidth&&(this.watchedWidth.unsubscribe(),this.watchedWidth=null),this.widgetMaximized&&(this.widgetMaximized.unsubscribe(),this.widgetMaximized=null),this)this[e]instanceof $&&this[e].remove(),delete this[e];N._messageHandlers=N._messageHandlers.filter((function(e){return e.widget!==this}),this),clearTimeout(this._preloadTimeout)},A.prototype.onActiveStateChange=function(e){var t=(this.getWidgetBarOption("widgetConfig")||N.widgetConfig)[this.type];this.$icon&&this.$icon.toggleClass("active",!!e),e&&!t.doNotClearNotifications&&this.clearNotifications(),this.updateVisibleWatchedValue(),this.widgetActive.setValue(!!e)},A.prototype.toggleMaximize=function(e){if("boolean"!=typeof e)e=!this.widgetMaximized.value();else if(e===this.widgetMaximized.value())return;this.widgetMaximized.setValue(e),this.widgetBarPage&&this.widgetBarPage.widgetBarLayout&&this.widgetBarPage.widgetBarLayout.widgetBar&&this.widgetBarPage.widgetBarLayout.widgetBar.saveToTVSettings(),this.widgetBarPage&&this.widgetBarPage.updateWidgetsHeight()},A.prototype.startWidget=function(){if(!this.widgetObject&&!this.widgetStartDelayed){var e=(this.getWidgetBarOption("widgetConfig")||N.widgetConfig)[this.type];if(e){var t=e.ctor;if(t){var i=this;if(this.widgetVisible=this.widgetVisible||new n,this.updateVisibleWatchedValue(),e.lazyLoad&&!this.widgetVisible.value())return this.widgetStartDelayed=!0,this.widgetVisible.when((function(){delete i.widgetStartDelayed,i.startWidget(),clearTimeout(i._preloadTimeout)})),void(e.preloadDelay&&(this._preloadTimeout=setTimeout((function(){t.preload&&t.preload()}),e.preloadDelay)));this.symbolLinking=l.symbol.spawn(),this.intervalLinking=l.interval.spawn();var o=this._rdState.bridge(),a={$widget:this.$widget,$header:this.$header,$headerspace:this.$headerspace,$body:$(o.container.value()),header:this.$header[0],widget:this.$widget[0],container:o.container.value(),properties:this.properties,notify:this.notify.bind(this),clearNotifications:this.clearNotifications.bind(this),visible:this.widgetVisible.readonly(),active:this.widgetActive.readonly(),symbol:this.symbolLinking,interval:this.intervalLinking,height:o.height,width:o.width,setTitle:this.setTitle.bind(this),setTitleHtml:this.setTitleHtml.bind(this),id:this.id,toggleMaximize:this.toggleMaximize.bind(this),maximized:this.widgetMaximized.readonly(),postMessage:N.postMessage.bind(this),onMessage:N.onMessage.bind(this),offMessage:N.offMessage.bind(this),hideDetach:!1,unAuthEditable:this.unAuthEditable};if(e.chartWidgetAllowed){var s=function(){return i.widgetBarPage&&i.widgetBarPage.widgetBarLayout&&i.widgetBarPage.widgetBarLayout.widgetBar&&i.widgetBarPage.widgetBarLayout.widgetBar.chartWidgetCollection};a.getChartWidget=function(){var e=s();return e?e.activeChartWidget.value():null},a.getChartWidgetCollection=function(){return s()||null}}null!=this.readonly?this.readonly&&(a.readonly=!0):this.getWidgetBarOption("readonly")&&(a.readonly=!0),
null!=e.options&&(a.options=e.options),null!=this.stateData?a.data=this.stateData:null!=e.data&&(a.data=e.data);var r=this.widgetObject=new t(a);r.hasLifecycle&&this.widgetActive.readonly().subscribe((function(e){e?r.mount():r.unmount()}),{callWithLast:!e.lazyLoad}),this._widgetStarted.fire(this)}}}},A.prototype.widgetStarted=function(){return this._widgetStarted},A.prototype.notify=function(e,t){if(t=t||{},this.widgetBarPage&&(!this.widgetBarPage.isActiveAndVisible()||t.force))return this.widgetBarPage.notify(e,t)},A.prototype.clearNotifications=function(){if(this.widgetBarPage)return this.widgetBarPage.clearNotifications()},W.prototype.isActiveAndVisible=function(){var e=this.widgetBarLayout;return!(!e||!e.visible)&&e.getActivePage()===this},A.prototype.onVisibilityChange=function(e){this.updateVisibleWatchedValue()},A.prototype.updateVisibleWatchedValue=function(){this.widgetVisible&&this.widgetVisible.setValue(!!this.widgetBarPage&&this.widgetBarPage.isActiveAndVisible())},A.prototype.setTitle=function(e){this.customTitle=e+"",this.$title&&this.$title.text(this.getTitle())},A.prototype.setTitleHtml=function(e){this.$title&&this.$title.html(e)},A.prototype.heightRatio=1,A.prototype.getWidgetBarOption=function(e){if(this.widgetBarPage&&this.widgetBarPage.widgetBarLayout&&this.widgetBarPage.widgetBarLayout.widgetBar&&e in this.widgetBarPage.widgetBarLayout.widgetBar)return this.widgetBarPage.widgetBarLayout.widgetBar[e]},H.prototype.value=function(e){return this._value},H.prototype.setValue=function(e,t){return this._value=e,this._settingsKey&&(null==e?(d("Settings debug","WigdetProperties.setValue: "+this._settingsKey,user.username),TVSettings.remove(this._settingsKey)):TVSettings.setJSON(this._settingsKey,e,t)),this._value},N.prototype.createHTML=function(){var e=this.$container;!e||e.size()<1||(e.empty(),this.layout.createHTML(),this.$wrap=$(document.createElement("div")).attr("class","widgetbar-wrap unselectable js-right-boundary").appendTo(e),this.layout.$pages.appendTo(this.$wrap),R()&&this.layout.$tabs.appendTo(this.$wrap),this.layout.$deviceButton&&this.$wrap.append(this.layout.$deviceButton),this.layout.$hider&&this.layout.$hider.appendTo(this.$wrap))},L.prototype._tabRendererOptions=function(){var e=this.widgetBar._internal;return{tabs:this.pages,isDomButtonAvailable:e.isDomButtonAvailable(),isOrderPanelButtonAvailable:e.isOrderPanelButtonAvailable(),isSupportTicketButtonAvailable:e.isSupportTicketButtonAvailable(),isHelpButtonAvailable:e.isHelpButtonAvailable()}},L.prototype.updateRightToolbar=function(){this.tabRenderer.updateOptions(this._tabRendererOptions())},L.prototype.createHTML=function(){var e=this;if(e.$tabs=e.$tabscontent=$(),R()&&(e.$tabs=$('<div class="widgetbar-tabs">'),e.tabRenderer&&(e.tabRenderer.destroy(),e.tabRenderer=null),e.tabRenderer=new v(e.widgetBar,e.$tabs[0],e._tabRendererOptions()),
this.widgetBar.adaptive&&(e.$deviceButton=$('<div class="tv-device-widgetbar-button js-hidden"><div class="tv-device-widgetbar-button__ripple js-ripple"></div>'+i("bC7V")+"</div>").on("click",(function(t){e.widgetBar.resizerBridge.requestFullscreen(),d("Mobile","Open right toolbar")})))),e.$pages=$(document.createElement("div")).attr("class","widgetbar-pages"),e.$pagescontent=$(document.createElement("div")).attr("class","widgetbar-pagescontent").appendTo(e.$pages),R()||e.$pages.css("right","-1px"),e.$handle=$(document.createElement("div")).attr("class","widgetbar-handle").appendTo(e.$pages),e.$handle.on("mousedown touchstart",e.onLayoutResizeHandleMousedown.bind(e)),e.$handle.on("contextmenu",(function(e){e.target.classList.contains("widgetbar-handle")&&e.preventDefault()})),this.widgetBar.showCloseButton){e.$hider=$(document.createElement("div")).addClass("widgetbar-hider");var t=function(){var t=e.$hider.get(0);t.classList.toggle("widgetbar-hider--closed",e.isMinimized.value()),t.classList.toggle("js-hidden",R()&&e.isMinimized.value()),_.render(w.createElement(f,{isMinimized:e.isMinimized.value(),onClick:function(){e.setMinimizedState(!e.minimized)}}),t)};e.isMinimized.subscribe(t),t()}e.pages.forEach((function(t){t.createHTML(),t.$page.appendTo(e.$pagescontent)}))},W.prototype.createHTML=function(){var e=this;e.$page=$(document.createElement("div")).attr("class","widgetbar-page"),e.widgets.forEach((function(t){t.createHTML(),t.$widget.appendTo(e.$page)}))},W.prototype.createTabButtonViewModel=function(){var e=this;e.tab=new m({icon:N.svgIcons[e.icon],hint:e.title,onClick:function(t){e.widgetBarLayout&&e.widgetBarLayout.onTabClick(t,e)},TabButtonComponent:e.TabButtonComponent})},A.prototype.getTitle=function(e){var t,i,n,o=(t=this.type,i=this.getWidgetBarOption("widgetConfig"),!(n=((i=i||N.widgetConfig)[t]||0).title)&&t&&(n=(""+t).match(/[A-Z]{2,}|\d+(?:\.\d+)?|[A-Z]?[a-z]+/g).join(" ").replace(/^.|\s./g,(function(e){return e.toUpperCase()}))),n||void 0);return e&&this.customTitle&&o?this.customTitle.substr(0,o.length)===o?this.customTitle:o+": "+this.customTitle:this.customTitle||o||$.t("Widget")},A.prototype.createHTML=function(){var e=this,t=!!e.widgetConfig&&(!!e.widgetConfig.icon&&e.widgetConfig.icon),i=e.widgetConfig&&e.widgetConfig.emptyHeader,n=e.widgetConfig&&e.widgetConfig.noHeader,o=e.widgetConfig&&e.widgetConfig.noHeaderSpace,a=e.widgetConfig&&e.widgetConfig.widgetClass||"",s=e.widgetConfig&&e.widgetConfig.headerClass||"",r=e.widgetConfig&&e.widgetConfig.titleClass||"";e.$widget=$(document.createElement("div")).attr("class",p(a,"widgetbar-widget","widgetbar-widget-"+e.type)),e.$header=$(document.createElement("div")).attr("class",s||"widgetbar-widgetheader"),n||e.$header.appendTo(e.$widget),e.$header.on("contextmenu",(function(e){"input"!==e.target.tagName.toLowerCase()&&e.preventDefault()})),t&&(e.$headericon=$(document.createElement("div")).attr("class","widgetbar-widgetheader-icon widgetbar-widgetheader-icon-"+t).append($(N.svgIcons[t])).appendTo(e.$header)),
o||(e.$headerspace=$(document.createElement("div")).attr("class","widgetbar-headerspace").appendTo(e.$header),e.$headerspace.on("click",(function(e){e.preventDefault()}))),i||(e.$title=$(document.createElement("div")).attr("class",p("widgetbar-widgettitle",r)).appendTo(e.$header),e.$title.text(this.getTitle()));var l=$(document.createElement("div")).attr("class","widgetbar-widgetbody").appendTo(e.$widget);l.on("contextmenu",(function(e){e.target.classList.contains("widgetbar-widgetbody")&&e.preventDefault()})),e._internalState.container.setValue(T(l)),e.$resizehandle=$(document.createElement("div")).attr("class","widgetbar-widgethandle").appendTo(e.$widget),e.$resizehandle.on("mousedown touchstart",(function(t){e.widgetBarPage&&e.widgetBarPage.onWidgetResizeHandleMousedown(t,e)})),e.$resizehandle.on("contextmenu",(function(e){e.target.classList.contains("widgetbar-widgethandle")&&e.preventDefault()})),!0===this.maximized&&(this.toggleMaximize(!0),delete this.maximized)},L.demarshal=function(e,t){return(new L).demarshal(e,t)},W.demarshal=function(e,t){return(new W).demarshal(e,t)},A.demarshal=function(e,t){return(new A).demarshal(e,t)},L.prototype.demarshal=function(e,t){if("string"==typeof e)try{e=JSON.parse(e)}catch(s){}if(!e||"object"!=typeof e)return null;this.width=+e.width,!isFinite(this.width)||this.width<=0?delete this.width:this.width<this.MIN_WIDTH&&(this.width=this.MIN_WIDTH),"minimized"in e?(this.minimized=!!e.minimized,this.isMinimized.setValue(this.minimized)):(delete this.minimized,this.isMinimized.setValue(this.minimized)),"version"in e&&(this.version=e.version);var i=+e.activeIndex,n=e.activeName,o=!1,a=this.pages;return a.splice(0,this.pages.length),Array.isArray(e.pages)&&e.pages.forEach((function(e,s){var r=new W({widgetBarLayout:this}).demarshal(e,t);n?e.name===n&&r&&(i=s,o=!0):r||s!==i||i--,r&&a.push(r)}),this),n&&!o&&(i=0),0===a.length?(this.activeIndex=-1,this.activePageIndex.setValue(this.activeIndex)):i>=0&&i<a.length&&(this.activeIndex=i,this.activePageIndex.setValue(this.activeIndex)),this},W.prototype.demarshal=function(e,t){if("string"==typeof e)try{e=JSON.parse(e)}catch(n){}if(!e||!e.widgets||!Array.isArray(e.widgets))return null;var i=this.widgets;return i.splice(0,i.length),this._gaEvent=e._gaEvent,this.title=e.title,this.name=e.name,this.icon=e.icon,this.spaceBottom=e.spaceBottom,this.spaceBottomText=e.spaceBottomText,this.onBottom=e.onBottom,this.TabButtonComponent=e.TabButtonComponent,this.createTabButtonViewModel(),e.widgets.forEach((function(e){var n=new A({widgetBarPage:this}).demarshal(e,t);n&&i.push(n)}),this),0===i.length?null:this},A.prototype.demarshal=function(e,t){if("string"==typeof e)try{e=JSON.parse(e)}catch(a){}if(!e||"object"!=typeof e)return null;var i;if("id"in e?(this.id=e.id+"",this.type=this.id.replace(/\..*/,"")):"type"in e?(this.type=e.type+"",this.id=N.prototype.createWidgetId(this.type)):(delete this.type,delete this.id),null!=e.readonly?this.readonly=!!e.readonly:delete this.readonly,this.stateData=e.data,
isFinite(+e.heightRatio)&&+e.heightRatio>=0?this.heightRatio=+e.heightRatio:delete this.heightRatio,!0===e.maximized&&(this.maximized=!0),!0===e.unAuthEditable&&(this.unAuthEditable=!0),e.settingsKey)i=e.settingsKey;else if(this.id){var n=this.getWidgetBarOption("_settingsPrefix");n&&(i=n+".widget."+this.id)}this.properties=new H({widgetBarWidget:this,settingsKey:i}),null==e.properties||i&&null!==this.properties.value()||this.properties.setValue(e.properties),"news"!==this.type&&"hotlist"!==this.type||!i||this.properties.setValue($.extend(!0,{},e.properties,this.properties.value())),"hotlist"===this.type&&!i&&e.properties&&this.properties.setValue(e.properties),this.widgetConfig=null;var o=this.getWidgetBarOption("widgetConfig");return o[this.type]&&(this.widgetConfig=o[this.type]),this},L.prototype.marshal=function(e){var t=[];this.pages.forEach((function(i){var n=i.marshal(e);n&&(t=t.concat(n))}));for(var i={},n=0;n<t.length;n++)if(t[n].type){var o=t[n].type;t[n].id&&delete t[n].type,i[o]?i[o].push(t[n]):i[o]=[t[n]]}var a={widgets:i,settings:{}};return["minimized","width","activeIndex","version","activeName"].forEach((function(e){this[e]!==L.prototype[e]&&(a.settings[e]=this[e])}),this),a},W.prototype.marshal=function(e){var t=[];return this.widgets.forEach((function(i){var n=i.marshal(e);n&&t.push(n)})),0===t.length?null:t},A.prototype.marshal=function(e){var t={};return this.id&&(t.id=this.id),this.type&&(t.type=this.type),["heightRatio"].forEach((function(e){this[e]!==A.prototype[e]&&(t[e]=this[e])}),this),this.widgetMaximized.value()&&(t.maximized=!0),e&&e.includeWidgetProperties&&this.properties&&(t.properties=TradingView.clone(this.properties.value())),t},e.exports.WidgetBar=N}).call(this,i("Kxc7"),i("hY0g"),i("aIyQ"))},BpqW:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="45" height="45"><g fill="none" stroke="currentcolor"><path d="M19.5 33.5h6a2 2 0 0 0 2-2v-4c2.41-1.615 4-4.88 4-8a9 9 0 0 0-18 0c0 3.122 1.586 6.386 4 8v4a2 2 0 0 0 2 2zm-2-6h10m-10 3h10m-7 3v1a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-1"/><path stroke-linecap="square" d="M22.5 27.5v-7m-2 0h4"/><path d="M11.86 13.945A11.948 11.948 0 0 0 10.5 19.5c0 2.009.494 3.902 1.366 5.566M9.203 12.552A14.935 14.935 0 0 0 7.5 19.5c0 2.508.615 4.872 1.703 6.95M33.14 13.945A11.946 11.946 0 0 1 34.5 19.5c0 2.009-.494 3.902-1.366 5.566m2.663-12.514A14.935 14.935 0 0 1 37.5 19.5c0 2.508-.615 4.872-1.703 6.95"/></g></svg>'},CNcW:function(e,t,i){"use strict";i.r(t),i.d(t,"HotlistRenderer",(function(){return l}));var n=i("mrSG"),o=i("q1tI"),a=i("i8i4"),s=i("ku9n"),r=i("J/x9"),l=function(e){function t(t){var i=e.call(this,t)||this;i._task=null;var n=t.properties;return i._properties=n,i.mount(),i}return Object(n.c)(t,e),t.prototype.mount=function(){
var e=this,t=this._loadModulePromise=Promise.all([Promise.all([i.e("vendors_embed"),i.e(1),i.e(2),i.e(3),i.e(4),i.e(5),i.e(9),i.e(11),i.e(20),i.e(16),i.e(17),i.e(19),i.e(25),i.e(26),i.e(27),i.e(28),i.e(29),i.e(33),i.e(36),i.e(49),i.e(51),i.e(52),i.e(56),i.e(61),i.e(66),i.e(70),i.e(101),i.e(149),i.e(150),i.e(156),i.e(190),i.e(191),i.e(203),i.e(207),i.e(209),i.e(229),i.e(444),i.e(8),i.e(10),i.e(18),i.e(24),i.e(34),i.e(39),i.e(40),i.e(41),i.e(42),i.e(47),i.e(50),i.e(48),i.e(54),i.e(58),i.e(64),i.e(75),i.e(93),i.e(138),i.e(136),i.e(159),i.e(189),i.e(177),i.e(216),i.e("hotlist-widget")]).then(i.bind(null,"/MKj")),Promise.all([i.e("vendors_embed"),i.e(1),i.e(2),i.e(3),i.e(4),i.e(5),i.e(9),i.e(11),i.e(20),i.e(16),i.e(17),i.e(19),i.e(25),i.e(26),i.e(27),i.e(28),i.e(29),i.e(33),i.e(36),i.e(49),i.e(51),i.e(52),i.e(56),i.e(61),i.e(66),i.e(70),i.e(101),i.e(149),i.e(150),i.e(156),i.e(190),i.e(191),i.e(203),i.e(207),i.e(209),i.e(229),i.e(444),i.e(8),i.e(10),i.e(18),i.e(24),i.e(34),i.e(39),i.e(40),i.e(41),i.e(42),i.e(47),i.e(50),i.e(48),i.e(54),i.e(58),i.e(64),i.e(75),i.e(93),i.e(138),i.e(136),i.e(159),i.e(189),i.e(177),i.e(216),i.e("hotlist-widget")]).then(i.bind(null,"16wD")),Promise.all([i.e("vendors_embed"),i.e(1),i.e(2),i.e(3),i.e(4),i.e(5),i.e(9),i.e(11),i.e(20),i.e(16),i.e(17),i.e(19),i.e(25),i.e(26),i.e(27),i.e(28),i.e(29),i.e(33),i.e(36),i.e(49),i.e(51),i.e(52),i.e(56),i.e(61),i.e(66),i.e(70),i.e(101),i.e(149),i.e(150),i.e(156),i.e(190),i.e(191),i.e(203),i.e(207),i.e(209),i.e(229),i.e(444),i.e(8),i.e(10),i.e(18),i.e(24),i.e(34),i.e(39),i.e(40),i.e(41),i.e(42),i.e(47),i.e(50),i.e(48),i.e(54),i.e(58),i.e(64),i.e(75),i.e(93),i.e(138),i.e(136),i.e(159),i.e(189),i.e(177),i.e(216),i.e("hotlist-widget")]).then(i.bind(null,"6ibq")),Promise.all([i.e("vendors_embed"),i.e(1),i.e(2),i.e(3),i.e(4),i.e(5),i.e(9),i.e(11),i.e(20),i.e(16),i.e(17),i.e(19),i.e(25),i.e(26),i.e(27),i.e(28),i.e(29),i.e(33),i.e(36),i.e(49),i.e(51),i.e(52),i.e(56),i.e(61),i.e(66),i.e(70),i.e(101),i.e(149),i.e(150),i.e(156),i.e(190),i.e(191),i.e(203),i.e(207),i.e(209),i.e(229),i.e(444),i.e(8),i.e(10),i.e(18),i.e(24),i.e(34),i.e(39),i.e(40),i.e(41),i.e(42),i.e(47),i.e(50),i.e(48),i.e(54),i.e(58),i.e(64),i.e(75),i.e(93),i.e(138),i.e(136),i.e(159),i.e(189),i.e(177),i.e(216),i.e("hotlist-widget")]).then(i.bind(null,"u18y")),Object(r.a)()]).then((function(i){var n=i[0],s=i[1],r=i[2],l=i[3],c=i[4];if(e._loadModulePromise===t){var d=c.store,h=c.actions,u=c.runner,p=h.initWidget;e._task=u.run(l.hotlistsSaga,e._widgetId),d.dispatch(p(e._widgetId,["short_name","last_price","change","change_percent"],{isDeletable:!1,isSortable:!1,isMovable:!1,enableContextMenu:!1,enableAddSymbolsByAnon:!1,shouldDisplaySymbolSearch:!1,shouldDisplayPositions:!1,shouldDisplayColumnsMenu:!1})),a.render(o.createElement(n.Provider,{store:d},o.createElement(s.Hotlist,{properties:e._properties,widgetId:e._widgetId})),e._container),a.render(o.createElement(n.Provider,{store:d},o.createElement(r.HotlistHeader,{properties:e._properties,widgetId:e._widgetId})),e._headerContainer)}}))},
t.prototype.unmount=function(){e.prototype.unmount.call(this),this._cancelTask()},t.prototype.destroy=function(){this._cancelTask(),e.prototype.destroy.call(this)},t.prototype._cancelTask=function(){this._task&&(this._task.cancel(),this._task=null)},t}(s.a)},CYdy:function(e,t,i){"use strict";i.d(t,"a",(function(){return l}));var n=i("mrSG"),o=i("Vdly"),a=i("hY0g"),s=i.n(a),r=null,l=function(){function e(){this._state=new s.a({live:o.getBool("streams.widget.state_live",!0)||null,recent:o.getBool("streams.widget.state_ended",!0)||null,notificationLive:o.getBool("streams.widget.notification_live",!0)||null}),this._state.subscribe((function(e){o.setValue("streams.widget.state_live",null!==e.live),o.setValue("streams.widget.state_ended",null!==e.recent),o.setValue("streams.widget.notification_live",null!==e.notificationLive)}))}return e.prototype.setFiltersState=function(e){this._state.setValue(Object(n.a)(Object(n.a)({},this._state.value()),e))},e.prototype.isFilterEnabled=function(e){return null!==this._state.value()[e]},e.prototype.toggleFilter=function(e,t){switch(void 0===t&&(t=!this.isFilterEnabled(e)),e){case"live":this.setFiltersState({live:t||null}),this.isFilterEnabled("live")?this.setFiltersState({notificationLive:!0}):this.setFiltersState({notificationLive:null});break;case"recent":this.setFiltersState({recent:t||null});break;case"notificationLive":this.setFiltersState({notificationLive:t||null})}},e.prototype.getFiltersState=function(){return this._state.value()},e.prototype.subscribe=function(e){this._state.subscribe(e)},e.prototype.unsubscribe=function(e){this._state.unsubscribe(e)},e.getInstance=function(){return null===r&&(r=new e),r},e}()},DIB2:function(e,t,i){"use strict";var n;i.d(t,"a",(function(){return n})),function(e){e.Idea="ideaPublishing",e.Script="scriptPublishing",e.Stream="startStreaming",e.VideoIdea="videoIdeaPublishing"}(n||(n={}))},"Fb/L":function(e,t,i){"use strict";i.r(t),i.d(t,"WidgetBarInternal",(function(){return o}));var n=i("Kxc7"),o=function(){function e(){}return e.prototype.isHelpButtonAvailable=function(){return!n.enabled("widget")&&!n.enabled("charting_library_base")},e.prototype.isSupportTicketButtonAvailable=function(){return n.enabled("bugreport_button")},e.prototype.isDomButtonAvailable=function(){return n.enabled("dome_widget")},e.prototype.isOrderPanelButtonAvailable=function(){return n.enabled("order_panel")},e}()},GNw3:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="45" height="45"><path fill="currentcolor" d="m5 12v-1h4v1zm5-6h1v4h-1zm0 7h1v4h-1zm2-1v-1h4v1zm7 0v-1h10.5a4.5 4.5 0 0 1 4.5 4.5v14a4.5 4.5 0 0 1-4.5 4.5h-15a4.5 4.5 0 0 1-4.5-4.5V20h1v9.5a3.5 3.5 0 0 0 3.5 3.5h15a3.5 3.5 0 0 0 3.5-3.5v-14a3.5 3.5 0 0 0-3.5-3.5H19zm-3 5a1 1 0 0 0 0 2h12a1 1 0 0 0 0-2H16zm0-1h12a2 2 0 1 1 0 4H16a2 2 0 1 1 0-4zm-1 8v-1h8v1zm0 4v-1h8v1zm11-4v-1h3v1zm0 4v-1h3v1z"/></svg>'},GWvR:function(e,t){
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" width="14" height="14"><path d="M9.901 9.639c-.102-.797.218-1.775.77-2.356l1.438-1.527-2.07-.395c-.784-.142-1.615-.742-2.008-1.446L7.003 2.06 5.97 3.917c-.391.702-1.222 1.301-2 1.443l-2.08.396 1.44 1.526c.547.577.866 1.549.77 2.353l-.262 2.086 1.93-.897a2.95 2.95 0 0 1 1.233-.254c.44 0 .87.085 1.233.254l1.93.897-.263-2.082zm.992-.127l.458 3.624c.014.105-.006.16-.02.176-.028.03-.109.005-.182-.03L7.812 11.73a1.973 1.973 0 0 0-.811-.16c-.302 0-.59.057-.81.16l-3.338 1.552c-.118.056-.164.051-.182.03-.014-.016-.034-.07-.02-.178L3.11 9.51c.06-.503-.162-1.18-.505-1.54L.087 5.302c-.085-.091-.09-.148-.086-.158.003-.01.04-.053.16-.077l3.621-.689c.491-.09 1.069-.506 1.315-.948L7.004 0l1.902 3.43c.246.442.824.859 1.312.947l3.617.69c.123.024.162.068.164.077.003.01-.003.066-.089.157L11.4 7.97c-.348.367-.57 1.045-.506 1.543z"/></svg>'},"H+PN":function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 16" width="24px" height="16px"><path clip-rule="evenodd" d="M12 0C4.07 0 0 8 0 8s3.072 8 12 8c8.087 0 12-7.97 12-7.97S20.057 0 12 0zm.02 13c-2.9 0-4.996-2.188-4.996-5 0-2.813 2.096-5 4.995-5s4.992 2.187 4.992 5c0 2.812-2.096 5-4.995 5zm0-8c-1.658 0-3 1.393-3 3 0 1.606 1.34 3 2.997 3 1.656 0 2.996-1.395 2.996-3 0-1.608-1.34-3.003-2.997-3z"/></svg>'},HKz3:function(e,t,i){"use strict";i.r(t);var n=i("LsFU");var o=i("bbtx");function a(e){return Object(n.isBadgeUser)(e)?function(e){return Object(n.isModerator)(e)?"/house-rules/":Object(n.isTop)(e)?"/people/":Object(n.isProPremium)(e)||Object(n.isProRealtime)(e)||Object(n.isPro)(e)||Object(n.isTrial)(e)?"/gopro/?source=badge&feature="+e.split(":")[1]:void 0}(e):Object(o.isBadgeBroker)(e)?function(e){return Object(o.isBadgeBrokerWithLink)(e)?"/brokers/":void 0}(e):void 0}i.d(t,"getBadgeAccountLink",(function(){return a}))},HSWI:function(e,t,i){e.exports={filler:"filler-1ggHJ4cQ"}},Hpvy:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path fill="currentColor" d="M21 14.5a7.5 7.5 0 0 0-15 0v.5H5v-.5a8.5 8.5 0 1 1 8.5 8.5H13v-1h.5a7.5 7.5 0 0 0 7.5-7.5zm-8-.5V9h1v6h-4v-1h3zm-5.646 2.646l3.5 3.5.353.354-.353.354-3.5 3.5-.708-.708L9.293 21H3v-1h6.293l-2.647-2.646.708-.708z"/></svg>'},IMMp:function(e){
e.exports=JSON.parse('{"color-bg-primary":"color-cold-gray-850","color-bg-primary-hover":"color-cold-gray-800","color-bg-secondary":"color-cold-gray-900","color-bg-highlight":"color-cold-gray-900","color-bg-scroll-buttons":"color-cold-gray-800","color-legacy-bg-scroll-buttons":"color-cold-gray-550","color-legacy-bg-widget":"color-cold-gray-900","color-text-primary":"color-cold-gray-200","color-text-secondary":"color-cold-gray-500","color-text-tertiary":"color-cold-gray-400","color-text-disabled":"color-cold-gray-650","color-divider":"color-cold-gray-700","color-divider-hover":"color-cold-gray-800","color-box-shadow":"color-black","color-active-hover-text":"color-gull-gray","color-alert-text":"color-loblolly","color-border":"color-bright-gray","color-border-chat-fields":"color-bright-gray","color-border-hover":"color-trout-1","color-border-table":"color-cold-gray-800","color-brand":"color-tv-blue-700","color-brand-active":"color-tv-blue-600","color-brand-hover":"color-tv-blue-600","color-button-hover-bg":"color-mirage-3","color-chart-page-bg":"color-cold-gray-800","color-common-tooltip-bg":"color-cold-gray-650","color-danger":"color-ripe-red-600","color-depthrenderer-fill-style":"color-catskill-white","color-depthrenderer-stroke-style":"color-trout-1","color-disabled-border-and-color":"color-ebony-clay","color-disabled-input":"color-bright-gray","color-empty-container-message":"color-slate-gray","color-highlight-new":"color-dark-slate-blue","color-icons":"color-slate-gray","color-input-bg":"color-charade","color-input-textarea-readonly":"color-trout-1","color-input-placeholder-text":"color-cold-gray-700","color-input-publish-bg":"color-mirage-1","color-item-active-blue":"color-blue-dianne","color-item-hover-active-bg":"color-charade","color-item-hover-bg":"color-ebony-clay","color-item-hover-blue":"color-blue-dianne","color-item-selected-blue":"color-blue-dianne","color-item-active-text":"color-cold-gray-200","color-item-active-bg":"color-tv-blue-700","color-link":"color-tv-blue-700","color-link-hover":"color-tv-blue-600","color-link-active":"color-tv-blue-800","color-list-item":"color-slate-gray","color-list-nth-child-bg":"color-mirage-3","color-news-highlight":"color-charade","color-pane-bg":"color-mirage-1","color-pane-secondary-bg":"color-cold-gray-850","color-placeholder":"color-trout-2","color-popup-menu-item-hover-bg":"color-cold-gray-800","color-popup-menu-separator":"color-cold-gray-700","color-row-hover-active-bg":"color-ebony-clay","color-sb-scrollbar-body-bg":"color-trout-2","color-screener-description":"color-loblolly","color-section-separator-border":"color-bright-gray","color-separator-table-chat":"color-bright-gray","color-success":"color-minty-green-700","color-success-hover":"color-minty-green-600","color-success-active":"color-minty-green-500","color-tag-active-bg":"color-bright-gray","color-tag-hover-bg":"color-charade","color-text-regular":"color-loblolly","color-toolbar-button-text":"color-cold-gray-500","color-toolbar-button-text-hover":"color-cold-gray-450","color-toolbar-button-text-active":"color-tv-blue-700","color-toolbar-button-text-active-hover":"color-tv-blue-600","color-toolbar-button-background-hover":"color-cold-gray-800","color-toolbar-button-background-secondary-hover":"color-cold-gray-750","color-toolbar-toggle-button-background-active":"color-tv-blue-700","color-toolbar-toggle-button-background-active-hover":"color-tv-blue-600","color-toolbar-interactive-element-text-normal":"color-cold-gray-300","color-toolbar-interactive-element-text-hover":"color-cold-gray-250","color-toolbar-opened-element-bg":"color-cold-gray-800","color-tooltip-bg":"color-bright-gray","color-tv-button-checked":"color-slate-gray","color-tv-dialog-caption":"color-athens-gray-2","color-tv-dropdown-item-hover-bg":"color-charade","color-underlined-text":"color-gull-gray","color-widget-pages-bg":"color-cold-gray-900","color-warning":"color-tan-orange-700","color-forex-icon":"color-white","color-list-item-active-bg":"color-medium-blue","color-list-item-hover-bg":"color-ebony-clay","color-list-item-text":"color-loblolly","color-price-axis-label-back":"color-cold-gray-800","color-price-axis-label-text":"color-cold-gray-500","color-price-axis-gear":"color-cold-gray-500","color-price-axis-gear-hover":"color-cold-gray-400","color-price-axis-highlight":"color-cold-gray-800","color-bid":"color-tv-blue-700","color-scroll-bg":"color-cold-gray-650","color-scroll-border":"color-cold-gray-850","color-widget-border":"color-cold-gray-800","color-scroll-buttons-arrow":"color-white","color-control-intent-default":"color-cold-gray-650","color-control-intent-success":"color-minty-green-600","color-control-intent-primary":"color-tv-blue-700","color-control-intent-warning":"color-tan-orange-400","color-control-intent-danger":"color-ripe-red-500","color-growing":"color-minty-green-600","color-falling":"color-ripe-red-600","color-pre-market":"color-tan-orange-600","color-pre-market-bg":"color-tan-orange-400","color-post-market":"color-tv-blue-500","color-post-market-bg":"color-tv-blue-400","color-market-open":"color-minty-green-500","color-market-open-bg":"color-minty-green-400","color-market-closed":"color-cold-gray-400","color-market-holiday":"color-cold-gray-400","color-invalid-symbol":"color-ripe-red-400","color-invalid-symbol-hover":"color-ripe-red-500","color-replay-mode":"color-tv-blue-700","color-replay-mode-icon":"color-tv-blue-50","color-replay-mode-hover":"color-tv-blue-600","color-notaccurate-mode":"color-berry-pink-700","color-notaccurate-mode-bg":"color-berry-pink-400","color-delay-mode":"color-tan-orange-700","color-delay-mode-bg":"color-tan-orange-400","color-eod-mode":"color-grapes-purple-700","color-eod-mode-bg":"color-grapes-purple-400","color-data-problem":"color-ripe-red-600","color-data-problem-bg":"color-ripe-red-400","color-data-problem-hover":"color-ripe-red-500","color-list-item-bg-highlighted":"color-tv-blue-a900","color-list-item-bg-selected":"color-tv-blue-a800","color-list-item-bg-highlighted-hover":"color-tv-blue-a800","color-list-item-bg-selected-hover":"color-tv-blue-a700","color-screener-header-bg":"color-cold-gray-850","color-screener-header-bg-hover":"color-cold-gray-800"}')
},IS8I:function(e,t,i){},IWHC:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"AlertCategory",(function(){return n})),function(e){e.Price="price",e.Screener="screener"}(n||(n={}))},"If+W":function(e,t,i){e.exports={toolbar:"toolbar-OvhMiobx",isGrayed:"isGrayed-OvhMiobx"}},JHPQ:function(e,t,i){e.exports={"news-item":"news-item-14OMzC2A","news-item--no-hover":"news-item--no-hover-14OMzC2A","news-item--highlight":"news-item--highlight-14OMzC2A","news-item__header":"news-item__header-14OMzC2A","news-item--card":"news-item--card-14OMzC2A","news-item__dot":"news-item__dot-14OMzC2A","news-item__title":"news-item__title-14OMzC2A","news-item__title--external-link":"news-item__title--external-link-14OMzC2A","news-item__description":"news-item__description-14OMzC2A"}},JZcM:function(e,t,i){"use strict";var n;i.d(t,"a",(function(){return n})),function(e){e.Fired="fired",e.FireControl="fire_control"}(n||(n={}))},LBec:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="45" height="45"><path fill="currentcolor" d="M23.98 13.12c3.67 1.19 5.98 4.85 6.02 9.26v2.31c-.04 1.53.03 2.14.35 2.46l-.7.7c-.61-.6-.7-1.32-.66-3.18L29 24v-1.62c-.04-4.13-2.23-7.46-5.63-8.4a.5.5 0 0 1-.37-.48c0-1.04-.56-1.5-1.5-1.5s-1.5.46-1.5 1.5a.5.5 0 0 1-.37.48c-3.4.93-5.59 4.27-5.63 8.4V24l.01.67c.04 1.86-.05 2.58-.66 3.18l-.7-.7c.32-.32.4-.93.36-2.46L13 24v-1.62c.04-4.41 2.35-8.07 6.02-9.26.15-1.39 1.14-2.12 2.48-2.12s2.33.73 2.48 2.12zM13 28a1 1 0 0 0 0 2h17a1 1 0 0 0 0-2m0-1a1 1 0 0 1 0 4H13a1 1 0 0 1 0-4m6 3.5a1 1 0 0 0 5 0h1a1 1 0 0 1-7 0"/></svg>'},M1lL:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 23 24" width="23" height="24"><g fill="none"><g stroke="currentColor"><path d="M15.499 17.246a7 7 0 1 0-8.003-.004l.003 3.753c0 .279.232.505.501.505h7c.276 0 .5-.229.5-.505l-.001-3.749z"/><path stroke-linecap="square" d="M9.5 22v.992c0 .28.215.508.49.508h3.02c.27 0 .49-.221.49-.508V22"/><path d="M7.5 17.5h8"/><path stroke-linecap="square" d="M11.5 12.5v4m-2-5h4"/><path d="M7.5 19.5h8"/></g><path fill="currentColor" fill-rule="nonzero" d="M2 11H0v1h2zm15.864 7.571l1.414 1.414.707-.707-1.414-1.414zM23 11h-2v1h2zm-4.429-5.864l1.414-1.414-.707-.707-1.414 1.414zM4.429 17.864l-1.414 1.414.707.707 1.414-1.414zm.707-13.435L3.722 3.015l-.707.707 1.414 1.414zM12 2V0h-1v2z"/></g></svg>'},MVPm:function(e,t,i){"use strict";i.r(t),i.d(t,"configure",(function(){return d}));var n=i("mrSG"),o=i("Eyy1"),a=i("Kxc7"),s=i("Z+Vr"),r=i("ku9n"),l=i("m2+w"),c=i("J/x9");function d(e){return Object(o.ensure)(e.chartApiInstance),function(t){function r(e){var i=t.call(this,e)||this;return i._addSymbolPromise=null,i._task=null,i._props=e,i.mount(),i}return Object(n.c)(r,t),r.prototype.mount=function(){var t=this,i=this._loadModulePromise=r.preload().then((function(n){var r=n[0],c=n[1],d=n[2],h=n[3],u=n[4],p=n[5],g=n[6],v=n[7];if(t._loadModulePromise===i){var m=r.store,f=r.runner,_=r.actions.initWidget,w=t._props,b=w.readonly,y=w.unAuthEditable;t._task=f.run(g.watchListSaga);var C=new l.a;if(m.dispatch(_(s.a,C.get(),{
shouldDisplayColumnsMenu:!0,shouldDisplayPositions:!0,isSortable:!0,enableContextMenu:!a.enabled("widget"),isDeletable:!b,isMovable:!b,shouldDisplaySymbolSearch:y||!b&&!a.enabled("widget"),enableAddSymbolsByAnon:Boolean(y)||!1})),void 0!==v){var S=Object(o.ensure)(e.tradingViewApi);if(!S.watchlist()){var P=e.chartApiInstance,T=new v.WatchListApi(P,m);S.setWatchlistApi(T)}}d.render(c.createElement(h.Provider,{store:m},c.createElement(u.WatchList,{widgetId:s.a})),t._container),d.render(c.createElement(h.Provider,{store:m},c.createElement(p.Header,{widgetId:s.a})),t._headerContainer)}}))},r.prototype.unmount=function(){t.prototype.unmount.call(this),this._cancelTask()},r.prototype.addSymbols=function(e){var t=this,n=window.widgetbar;if(n&&e.length){n.layout.setMinimizedState(!1),n.setPage("base");var o=this._addSymbolPromise=Promise.all([Object(c.a)(),Promise.all([i.e("vendors_embed"),i.e(1),i.e(2),i.e(3),i.e(4),i.e(5),i.e(9),i.e(11),i.e(20),i.e(16),i.e(17),i.e(19),i.e(25),i.e(26),i.e(27),i.e(28),i.e(29),i.e(33),i.e(36),i.e(49),i.e(51),i.e(52),i.e(56),i.e(61),i.e(63),i.e(66),i.e(70),i.e(101),i.e(149),i.e(151),i.e(156),i.e(190),i.e(191),i.e(203),i.e(207),i.e(209),i.e(229),i.e(334),i.e(8),i.e(10),i.e(18),i.e(24),i.e(34),i.e(39),i.e(40),i.e(41),i.e(42),i.e(47),i.e(50),i.e(48),i.e(54),i.e(60),i.e(58),i.e(64),i.e(75),i.e(80),i.e(93),i.e(138),i.e(136),i.e(159),i.e(189),i.e(177),i.e(216),i.e("watchlist-widget")]).then(i.bind(null,"y5tV"))]).then((function(i){var n=i[0],a=i[1];if(t._addSymbolPromise===o){t._addSymbolPromise=null;var r=n.store,l=n.runner,c=n.actions.addSymbols,d=function(){r.dispatch(c(s.a,e))};if(t._task&&t._task.isRunning())d();else{var h=l.run(a.watchListSaga);d(),h.cancel()}}}))}},r.prototype.destroy=function(){this._cancelTask(),t.prototype.destroy.call(this)},r.preload=function(){
return Promise.all([Object(c.a)(),Promise.resolve().then(i.t.bind(null,"q1tI",7)),Promise.resolve().then(i.t.bind(null,"i8i4",7)),Promise.all([i.e("vendors_embed"),i.e(1),i.e(2),i.e(3),i.e(4),i.e(5),i.e(9),i.e(11),i.e(20),i.e(16),i.e(17),i.e(19),i.e(25),i.e(26),i.e(27),i.e(28),i.e(29),i.e(33),i.e(36),i.e(49),i.e(51),i.e(52),i.e(56),i.e(61),i.e(63),i.e(66),i.e(70),i.e(101),i.e(149),i.e(151),i.e(156),i.e(190),i.e(191),i.e(203),i.e(207),i.e(209),i.e(229),i.e(334),i.e(8),i.e(10),i.e(18),i.e(24),i.e(34),i.e(39),i.e(40),i.e(41),i.e(42),i.e(47),i.e(50),i.e(48),i.e(54),i.e(60),i.e(58),i.e(64),i.e(75),i.e(80),i.e(93),i.e(138),i.e(136),i.e(159),i.e(189),i.e(177),i.e(216),i.e("watchlist-widget")]).then(i.bind(null,"/MKj")),Promise.all([i.e("vendors_embed"),i.e(1),i.e(2),i.e(3),i.e(4),i.e(5),i.e(9),i.e(11),i.e(20),i.e(16),i.e(17),i.e(19),i.e(25),i.e(26),i.e(27),i.e(28),i.e(29),i.e(33),i.e(36),i.e(49),i.e(51),i.e(52),i.e(56),i.e(61),i.e(63),i.e(66),i.e(70),i.e(101),i.e(149),i.e(151),i.e(156),i.e(190),i.e(191),i.e(203),i.e(207),i.e(209),i.e(229),i.e(334),i.e(8),i.e(10),i.e(18),i.e(24),i.e(34),i.e(39),i.e(40),i.e(41),i.e(42),i.e(47),i.e(50),i.e(48),i.e(54),i.e(60),i.e(58),i.e(64),i.e(75),i.e(80),i.e(93),i.e(138),i.e(136),i.e(159),i.e(189),i.e(177),i.e(216),i.e("watchlist-widget")]).then(i.bind(null,"5oMM")),Promise.all([i.e("vendors_embed"),i.e(1),i.e(2),i.e(3),i.e(4),i.e(5),i.e(9),i.e(11),i.e(20),i.e(16),i.e(17),i.e(19),i.e(25),i.e(26),i.e(27),i.e(28),i.e(29),i.e(33),i.e(36),i.e(49),i.e(51),i.e(52),i.e(56),i.e(61),i.e(63),i.e(66),i.e(70),i.e(101),i.e(149),i.e(151),i.e(156),i.e(190),i.e(191),i.e(203),i.e(207),i.e(209),i.e(229),i.e(334),i.e(8),i.e(10),i.e(18),i.e(24),i.e(34),i.e(39),i.e(40),i.e(41),i.e(42),i.e(47),i.e(50),i.e(48),i.e(54),i.e(60),i.e(58),i.e(64),i.e(75),i.e(80),i.e(93),i.e(138),i.e(136),i.e(159),i.e(189),i.e(177),i.e(216),i.e("watchlist-widget")]).then(i.bind(null,"3EM8")),Promise.all([i.e("vendors_embed"),i.e(1),i.e(2),i.e(3),i.e(4),i.e(5),i.e(9),i.e(11),i.e(20),i.e(16),i.e(17),i.e(19),i.e(25),i.e(26),i.e(27),i.e(28),i.e(29),i.e(33),i.e(36),i.e(49),i.e(51),i.e(52),i.e(56),i.e(61),i.e(63),i.e(66),i.e(70),i.e(101),i.e(149),i.e(151),i.e(156),i.e(190),i.e(191),i.e(203),i.e(207),i.e(209),i.e(229),i.e(334),i.e(8),i.e(10),i.e(18),i.e(24),i.e(34),i.e(39),i.e(40),i.e(41),i.e(42),i.e(47),i.e(50),i.e(48),i.e(54),i.e(60),i.e(58),i.e(64),i.e(75),i.e(80),i.e(93),i.e(138),i.e(136),i.e(159),i.e(189),i.e(177),i.e(216),i.e("watchlist-widget")]).then(i.bind(null,"y5tV")),Promise.resolve(void 0)])},r.prototype._cancelTask=function(){this._task&&(this._task.cancel(),this._task=null)},r}(r.a)}},Maqz:function(e,t,i){"use strict";(function(t,n){i("Py6I"),i("xNaP");var o=i("L7u7").pushChartPage,a=i("TxTq"),s=i("sFgq").SidebarCustomScroll,r=i("bR4N").bindPopupMenu,l=i("fZEr"),c=l.showConfirm,d=l.showWarning,h=i("c2JX").Spinner,u=i("oiRj"),p=i("brCa").showNoticeDialog;function g(e){this.bridge=e,this.properties=e.properties,this.settings={},this.$container=e.$body,this.prepareLayout(this.$container),this.updateData(),
e.onMessage&&e.onMessage(this.onBridgeMessage.bind(this)),e.symbol&&e.symbol.subscribe(this.update.bind(this)),e.interval&&e.interval.subscribe(this.updateInterval.bind(this)),a.on("ideas.channel",this.messageHandler.bind(this)),this.favorites=new g.Favorites(g.FAV_KEY)}function v(e){this.requestData=e,this.offset=0,this.itemsInRequest=5,this.requestsRunning=0}function m(e,t,i){return e.filter((function(){return $(this).data(t)===i}))}function f(e,t,i){this._bridge=e,this._handler=t,this._handler(this.getMenu(i))}g.SHOW_ONLY_PRIVATE_IDEAS="notes.show_only_private_ideas",g.SHOW_IDEAS_FOR_CURRENT_SYMBOL="notes.show_ideas_for_current_symbol",g.SHOW_IDEAS_FOR_CURRENT_RESOLUTION="notes.show_ideas_for_current_resolution",g.SHOW_ONLY_FAVORITE_IDEAS="notes_widget.show_only_favorite_ideas",g.FAV_KEY="notesAndIdeas.favorites",g.prototype.onChart=function(){return null!=this.bridge.getChartWidget()},g.prototype.filterData=function(e){return(!this.showOnlyPrivateIdeas()||!e.is_public)&&((!this.showIdeasForCurrentSymbol()||e.symbol===this.bridge.symbol.value())&&((!this.showIdeasForCurrentResolution()||e.interval===this.bridge.interval.value())&&(!(this.showOnlyFavoriteIdeas()&&!this.favorites.isFavorite(e.id))&&!(this.listView.find(e.id).length>0&&"delete"!==e.action))))},g.prototype.messageHandler=function(e){if("delete"===e.action)this.listView.find(e.idea.id).remove(),this.notesCache.removeNote();else if(this.filterData(e.idea)){var t=new g.Idea(e.idea);this.listView.prepend(t),this.notesCache.addNote(),this.addListeners(t)}},g.prototype.update=function(){this.bridge&&this.bridge.symbol&&this.updateData()},g.prototype.updateInterval=function(){this.bridge&&this.bridge.interval&&this.updateData()},g.prototype.updateData=function(){if(is_authenticated){var e=this;this.notesCache=new v(this.getRequestData()),this.notesCache.requestNext().then((function(t){e.onData(t.charts)}))}},g.prototype.appendData=function(){var e=this;this.listView.loading(!0),this.notesCache.requestNext().then((function(t){e.onData(t.charts,!0)})).always((function(){e.listView.loading(!1)}))},g.prototype.addListeners=function(e){var t=this;e.onClick((function(e,i){o({chartId:i.getImageUrl(),chartName:i.getName(),publishedUrl:i.getPublishedChartUrl(),chartWidgetCollection:t.bridge.getChartWidgetCollection()})})),e.onDelete((function(e,i){t.deletePublishedChart(i,{trigger:!0})})),e.onFavorite((function(e,i){t.favorites.toggleFavorite(i.getId()),i.setFavorite(t.favorites.isFavorite(i.getId()))})),e.setFavorite(t.favorites.isFavorite(e.getId()))},g.prototype.deletePublishedChart=function(e,t){var i=e.getImageUrl(),n=(t.isScript?$.t("Do you really want to delete Script '{name}' ?"):$.t("Do you really want to delete Idea '{name}' ?")).format({name:e.getName()});c({text:n,onConfirm:function(e){return new Promise((function(t){$.ajax({type:"POST",url:"/idea-delete/",data:{image_url:i},success:function(i){t(),i.error?d({title:$.t("Error"),text:i.error},e.innerManager):e.dialogClose()}})}))}})},g.prototype.onData=function(e,t){t||(this._scroll.scrollTo(0),
this.listView.empty());for(var i=0;i<e.length;i++){var n=new g.Idea(e[i]);this.listView.add(n),this.addListeners(n)}this._scroll.atEnd()&&this._scroll.scrolltoend.fire()},g.prototype.showOnlyFavoriteIdeas=function(){return TVSettings.getBool(g.SHOW_ONLY_FAVORITE_IDEAS,!1)},g.prototype.showOnlyPrivateIdeas=function(){return TVSettings.getBool(g.SHOW_ONLY_PRIVATE_IDEAS,!1)},g.prototype.showIdeasForCurrentSymbol=function(){return TVSettings.getBool(g.SHOW_IDEAS_FOR_CURRENT_SYMBOL,!1)},g.prototype.showIdeasForCurrentResolution=function(){return TVSettings.getBool(g.SHOW_IDEAS_FOR_CURRENT_RESOLUTION,!1)},g.prototype.toggleShowOnlyPrivateIdeas=function(){TVSettings.setValue(g.SHOW_ONLY_PRIVATE_IDEAS,!this.showOnlyPrivateIdeas()),this.updateData()},g.prototype.toggleShowOnlyFavoriteIdeas=function(){TVSettings.setValue(g.SHOW_ONLY_FAVORITE_IDEAS,!this.showOnlyFavoriteIdeas()),this.updateData()},g.prototype.toggleIdeasForCurrentSymbol=function(){TVSettings.setValue(g.SHOW_IDEAS_FOR_CURRENT_SYMBOL,!this.showIdeasForCurrentSymbol()),this.updateData()},g.prototype.toggleIdeasForCurrentResolution=function(){TVSettings.setValue(g.SHOW_IDEAS_FOR_CURRENT_RESOLUTION,!this.showIdeasForCurrentResolution()),this.updateData()},g.prototype.onBridgeMessage=function(e,t){e===g.SHOW_ONLY_PRIVATE_IDEAS?this.toggleShowOnlyPrivateIdeas():e===g.SHOW_IDEAS_FOR_CURRENT_SYMBOL?this.toggleIdeasForCurrentSymbol():e===g.SHOW_IDEAS_FOR_CURRENT_RESOLUTION?this.toggleIdeasForCurrentResolution():e===g.SHOW_ONLY_FAVORITE_IDEAS&&this.toggleShowOnlyFavoriteIdeas()},g.prototype.prepareLayout=function(e){e.on("contextmenu",(function(e){e.preventDefault()})),this._$widget=$('<div class="tv-notes-widget">').appendTo(e),this.$data=$('<div class="tv-notes-widget__data">').appendTo(this._$widget),this.listView=new g.ListView(this.$data),this._scroll=new s(this._$widget,this.$data);var t=this;this._scroll.scrolltoend.subscribe(this,(function(e){this.notesCache.requestRunning()||this.notesCache.requestedAll()||t.appendData()})),this.$addButton=$(document.createElement("a")).addClass("button apply-common-tooltip").attr("title",$.t("Publish Private Idea")).append($(i("drLC")).attr({width:17,height:17})).appendTo(this.bridge.$headerspace),this.onChart()?this.$addButton.on("click",(function(){$(".publish-dropdown-container").children().removeClass("inprogress"),u.publishChart({isPrivate:!0,doNotSavePrivacySetting:!0})})):this.$addButton.on("click",(function(){var e=$.t("Publishing is possible only from the chart page. Please {link_start}open a chart{link_end} and then try again.").format({link_start:'<a target="_blank" href="/chart/">',link_end:"</a>"});p({title:$.t("Oops!"),content:e})})),this.$settingsButton=$('<a class="button apply-common-tooltip" title="'+$.t("Settings")+'"></a>').append($(i("jJ9P")).attr({width:17,height:17})).on("click",function(e){this._showSettingsDialog(e)}.bind(this)).appendTo(this.bridge.$headerspace),r(this.$settingsButton,null,{event:"show-popup",careBottomBorder:!0,careRightBorder:!0,viewportSpacing:2,reverse:!0})},
g.prototype._showSettingsDialog=function(e){return $(e.delegateTarget).hasClass("open")?($(e.delegateTarget).trigger("hide-popup"),!1):(new f(this.bridge,(function(t,i){$(e.delegateTarget).trigger("show-popup",[t,i])}),this.onChart()),e.preventDefault(),!1)},v.prototype.requestRunning=function(){return this.requestsRunning>0},v.prototype.requestedAll=function(){return this.offset>=this.chartsCount},v.prototype.addNote=function(){this.offset++},v.prototype.removeNote=function(){this.offset--},v.prototype.requestNext=function(){var e=this;return this.requestData.offset=this.offset,this.requestData.count=this.itemsInRequest,this.requestsRunning++,$.get("/my-ideas/",this.requestData,(function(t){t&&(e.offset+=t.charts.length,e.chartsCount=t.count)})).always((function(){e.requestsRunning--}))},g.prototype.getRequestData=function(e){var t={start:e||0,onlyPrivate:this.showOnlyPrivateIdeas(),onlyFavorite:this.showOnlyFavoriteIdeas()};if(this.bridge.getChartWidget()){var i=this.bridge.symbol.value(),n=this.bridge.interval.value();i&&this.showIdeasForCurrentSymbol()&&(t.symbol=i),n&&this.showIdeasForCurrentResolution()&&(t.interval=n)}return t},g.Favorites=function(e){this.key=e,this._favs=TVSettings.getJSON(e,[])},g.Favorites.prototype.addFavorite=function(e){return!this.isFavorite(e)&&(this._favs.push(e),this.save(),!0)},g.Favorites.prototype.toggleFavorite=function(e){this.isFavorite(e)?this.removeFavorite(e):this.addFavorite(e)},g.Favorites.prototype.isFavorite=function(e){return-1!==this._favs.indexOf(e)},g.Favorites.prototype.save=function(){TVSettings.setJSON(this.key,this._favs)},g.Favorites.prototype.removeFavorite=function(e){return!!this.isFavorite(e)&&(this._favs.splice(this._favs.indexOf(e),1),this.save(),!0)},g.Idea=function(e){var t=new g.IdeaViewRenderer;this.$view=t.render(e),this.$view.data("id",e.id),this.$view.data("imageUrl",e.image_url),this.$view.data("publishedChartUrl",e.published_chart_url)},g.Idea.prototype.jqueryObject=function(){return this.$view},g.Idea.prototype.getName=function(){return this.$view.find(".name").text()},g.Idea.prototype.getImageUrl=function(){return this.$view.data("imageUrl")},g.Idea.prototype.getId=function(){return this.$view.data("id")},g.Idea.prototype.getPublishedChartUrl=function(){return this.$view.data("publishedChartUrl")},g.Idea.prototype.setFavorite=function(e){this.$view.find(".favorite").toggleClass("active",e).html(i(e?"HHbT":"GWvR"))},g.Idea.prototype.onClick=function(e){this.$view.on("click",function(t){t.stopPropagation(),t.preventDefault(),e(t,this)}.bind(this))},g.Idea.prototype.onDelete=function(e){this.$view.find(".delete").on("click",function(t){t.stopPropagation(),t.preventDefault(),e(t,this)}.bind(this))},g.Idea.prototype.onFavorite=function(e){this.$view.find(".favorite").on("click",function(t){t.stopPropagation(),t.preventDefault(),e(t,this)}.bind(this))},g.IdeaViewRenderer=function(){},g.IdeaViewRenderer.prototype.render=function(e){var o={date:t.unix(e.date_timestamp).format("lll"),name:e.name,desc:e.desc,interval:e.interval,
symbolStr:e.short_symbol+", "+$.t(e.interval),imageUrl:e.image_small,is_public:e.is_public,is_video:e.is_video,likes:e.likes,comments:e.comments,views:e.views},a=$(n.render('<div class="tv-notes-widget__note-block"><div class="header">{{^is_public}}<div class="private-icon">'+i("eKOu")+'</div>{{/is_public}}<div class="date">{{date}}</div><div class="separator"></div><div class="symbol">{{symbolStr}}</div><div class="separator"></div><div class="favorite"></div></div>{{^is_public}}<span class="delete">'+i("uo4K")+'</span>{{/is_public}}<div class="name">{{name}}</div><div class="desc">{{desc}}</div><div class="container clearfix"><img class="preview" src="{{imageUrl}}">{{#is_video}}<div class="tv-idea-preview-button__play-icon">'+i("IRk6")+'</div>{{/is_video}}{{#is_public}}<div class="stats"><div class="likes"><span>{{likes}}</span></div><div class="comments"><span>{{comments}}</span></div><div class="views"><span>{{views}}</span></div></div>{{/is_public}}</div></div>',o));return a.find(".likes").prepend($(i("yr01")).attr({width:12,height:12})),a.find(".comments").prepend($(i("g996")).attr({width:12,height:12})),a.find(".views").prepend($(i("H+PN")).attr({width:12,height:12})),a},g.ListView=function(e){this.$list=e,this.showEmptyLabel()},g.ListView.prototype.empty=function(){this.$list.empty(),this.showEmptyLabel()},g.ListView.prototype.loading=function(e){if(this._spinner||(this._spinner=new h("mini")),e){var t=$('<div class="spinner-container"></div>');this._spinner.spin(t.get(0)),this.$list.append(t)}else this._spinner.stop(),this.$list.find(".spinner-container").remove();this.showEmptyLabel()},g.ListView.prototype.showEmptyLabel=function(){if(is_authenticated)if(0===this.$list.children().length){var e=$('<div class="no-ideas">'+$.t("No ideas matched your criteria")+"</div>");this.$list.append(e)}else this.$list.find(".no-ideas").remove();else(e=$('<div class="ch-item-empty">'+$.t("No ideas.")+" <br/>"+$.t("If you want to use this service - please __signInLink__!",{signInLink:'<a href="#signin">'+$.t("sign in or register")+"</a>"})+"</div>")).find("a").on("click",(function(){return runOrSignIn((function(){}),{source:"My ideas widget placeholder",sourceMeta:"Chart"}),!1})),this.$list.append(e)},g.ListView.prototype.prepend=function(e){this.$list.prepend(e.jqueryObject()),this.showEmptyLabel()},g.ListView.prototype.add=function(e){this.$list.append(e.jqueryObject()),this.showEmptyLabel()},g.ListView.prototype.remove=function(e){m(this.$list.children(),"id",e.getId()).remove(),this.showEmptyLabel()},g.ListView.prototype.find=function(e){return m(this.$list.children(),"id",e)},f.prototype.getMenu=function(e){var t=[];return t.push({title:$.t("Favorite Ideas"),icon:{image:"url('/static/images/dialogs/checkbox.png')",offset:TVSettings.getBool(g.SHOW_ONLY_FAVORITE_IDEAS)?"0 -16px":void 0},action:function(e){this._bridge.postMessage(g.SHOW_ONLY_FAVORITE_IDEAS)}.bind(this)}),t.push({title:$.t("Only Private Ideas"),icon:{image:"url('/static/images/dialogs/checkbox.png')",
offset:TVSettings.getBool(g.SHOW_ONLY_PRIVATE_IDEAS)?"0 -16px":void 0},action:function(e){this._bridge.postMessage(g.SHOW_ONLY_PRIVATE_IDEAS)}.bind(this)}),e&&(t.push({title:$.t("Ideas for the Current Symbol Only"),icon:{image:"url('/static/images/dialogs/checkbox.png')",offset:TVSettings.getBool(g.SHOW_IDEAS_FOR_CURRENT_SYMBOL)?"0 -16px":void 0},action:function(e){this._bridge.postMessage(g.SHOW_IDEAS_FOR_CURRENT_SYMBOL)}.bind(this)}),t.push({title:$.t("Ideas for the Current Resolution Only"),icon:{image:"url('/static/images/dialogs/checkbox.png')",offset:TVSettings.getBool(g.SHOW_IDEAS_FOR_CURRENT_RESOLUTION)?"0 -16px":void 0},action:function(e){this._bridge.postMessage(g.SHOW_IDEAS_FOR_CURRENT_RESOLUTION)}.bind(this)})),t},e.exports=g}).call(this,i("ldgD"),i("nbsC"))},NWKS:function(e){e.exports=JSON.parse('{"color-toolbar-button-text-active":"color-seeking-alpha-brand"}')},Opoj:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17 17" width="17" height="17"><path fill="none" stroke="currentColor" d="M1 1l15 15M1 16L16 1"/></svg>'},"P+Z2":function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45" width="45" height="45" fill="none"><path fill="currentcolor" fill-rule="evenodd" clip-rule="evenodd" d="M14.25 23.02a8.76 8.76 0 0 1 3.6-7.09l-.51-.87a9.76 9.76 0 0 0-.05 15.88l.5-.88a8.76 8.76 0 0 1-3.54-7.04zm17.5 0c0 2.89-1.39 5.45-3.54 7.04l.5.87a9.76 9.76 0 0 0-.05-15.87l-.5.87a8.76 8.76 0 0 1 3.6 7.09zM9 23.02c0 4.83 2.44 9.1 6.16 11.61l-.5.87a15.01 15.01 0 0 1 .05-25l.5.87A14.01 14.01 0 0 0 9 23.02zm21.84 11.61l.5.87a15.01 15.01 0 0 0-.05-25l-.5.87a14.01 14.01 0 0 1 .05 23.26zm-9.2-8.03l5.6-3.23a1 1 0 0 0 0-1.74l-5.6-3.23a1 1 0 0 0-1.5.87v6.46a1 1 0 0 0 1.5.87zm-.5-7.33l5.6 3.23-5.6 3.23v-6.46z"/></svg>'},PW1O:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="45" height="45"><path fill="currentcolor" d="m17 30a1 1 0 0 1 0 4h-4a1 1 0 0 1 0-4m0 1a1 1 0 0 0 0 2h4a1 1 0 0 0 0-2m0-7a1 1 0 0 1 0 4h-4a1 1 0 0 1 0-4m0 1a1 1 0 0 0 0 2h4a1 1 0 0 0 0-2m6 5a1 1 0 0 1 0 4 1 1 0 0 1 0-4m0 1a1 1 0 0 0 0 2 1 1 0 0 0 0-2m0-7a1 1 0 0 1 0 4 1 1 0 0 1 0-4m0 1a1 1 0 0 0 0 2 1 1 0 0 0 0-2m0-7a1 1 0 0 1 0 4 1 1 0 0 1 0-4m0 1a1 1 0 0 0 0 2 1 1 0 0 0 0-2m0-7a1 1 0 0 1 0 4 1 1 0 0 1 0-4m0 1a1 1 0 0 0 0 2 1 1 0 0 0 0-2m10 5a1 1 0 0 1 0 4h-4a1 1 0 0 1 0-4m0 1a1 1 0 0 0 0 2h4a1 1 0 0 0 0-2m0-7a1 1 0 0 1 0 4h-4a1 1 0 0 1 0-4m0 1a1 1 0 0 0 0 2h4a1 1 0 0 0 0-2"/></svg>'},PiG3:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="45" height="45"><path fill="currentcolor" d="m27 31.5a2.5 2.5 0 0 1-2.5 2.5h-6a2.5 2.5 0 0 1-2.5-2.5v-3.74c-2.41-1.74-4-5.04-4-8.26a9.5 9.5 0 0 1 19 0c0 3.21-1.6 6.52-4 8.26v3.74zM18.5 33h6a1.5 1.5 0 0 0 1.5-1.5v-4.27l.22-.14c2.25-1.51 3.78-4.6 3.78-7.59a8.5 8.5 0 1 0-17 0c0 3 1.53 6.08 3.78 7.58l.22.15v4.27a1.5 1.5 0 0 0 1.5 1.5zm-2-5v-1h10v1zm0 3v-1h10v1zm2.5 2.5h1v1a.5.5 0 0 0 .5.5h2a.5.5 0 0 0 .5-.5v-1h1v1a1.5 1.5 0 0 1-1.5 1.5h-2a1.5 1.5 0 0 1-1.5-1.5v-1zm3-5.5h-1v-8h1zm-3-7v-1h5v1z"/></svg>'},PiKd:function(e,t,i){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0}),t.isExists=function(e){return!!s(e)},t.load=function(e,t,i){if(t){var o=s(e);o?o.cb=t:n.push({m:e,cb:t})}(void 0!==i||a)&&function(e,t){"number"==typeof t?setTimeout((function(){return r(e)}),t):(!0===t||a)&&r(e)}(e,i)},t.isLoaded=function(e){var t=s(e);return t&&"loaded"===t.state},t.onReady=function(e,t){var i=s(e);o[e]=o[e]||[],o[e].push(t),i&&"loaded"===i.state&&l(e)};var n=[],o={},a=!1;function s(e){return n.filter((function(t){return t.m===e}))[0]}function r(e){var t=s(e);t&&t.cb&&$.when(t.cb()).done((function(){t.state="loaded",t.args=Array.prototype.slice.call(arguments),delete t.cb,l(t.m)}))}function l(e){var t=s(e),i=o[e];i&&function e(i){i&&!i.length||(i.shift().apply(null,t.args),e(i))}(i)}setTimeout((function(){var e;for(a=!0,e=0;e<n.length;e+=1)r(n[e].m)}),5e3)},Py6I:function(e,t,i){},Q02a:function(e,t,i){"use strict";i.r(t),i.d(t,"getNewsDiffResolver",(function(){return a})),i.d(t,"getNewsItemDigest",(function(){return s}));var n=i("YJLw"),o=i.n(n);function a(e){return{getDiff:function(t){if(0===t.length)return[];var i=t.findIndex((function(t){return s(t)===e}));return e=s(t[0]),t.slice(0,-1===i?t.length:i)}}}function s(e){return o()(e.title+(null!==e.published?e.published.valueOf():""))}},Q8Ag:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={},e.exports=t.default},R5LG:function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));var n="light"},"RMt/":function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 17" width="24" height="17"><g fill-rule="evenodd"><path d="M1.826 16.913l4.088-6c.85-1.244 2.036-1.25 2.896-.018l2.718 3.897c1.698 2.436 4.46 2.235 5.79-.425l6.457-12.92-1.79-.894-6.456 12.92c-.65 1.302-1.53 1.366-2.365.175L10.45 9.75c-1.66-2.38-4.55-2.365-6.188.037l-4.088 6 1.652 1.126zM7 .7v6.1h1V.2H7v.5z"/><path d="M7.146.346l-2.8 2.8-.353.354.707.707.354-.353 2.8-2.8L8.207.7 7.5-.007l-.354.353z"/><path d="M7.146 1.054l2.8 2.8.354.353.707-.707-.353-.354-2.8-2.8L7.5-.007 6.793.7l.353.354z"/></g></svg>'},RrLr:function(e,t,i){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},o=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();i("TdlR");var a,s=i("YFKU"),r=i("8woN"),l=(a=r)&&a.__esModule?a:{default:a},c=i("sFgq"),d=i("IWXC"),h=i("WUrJ"),u=i("b5Gw"),p=i("Q02a"),g=i("txPx"),v=i("cSYm"),m=i("jEqg"),f=i("+GxX"),_=i("y8Ih");i("IS8I");var w=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i("JHPQ"));var b=(0,g.getLogger)("News.Widget"),y=(0,s.t)("{title} for {symbol}"),C=function(){function e(t){!function(e,t){
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._bridge=t,this.widgetName="widgetbar",this._$widgetTitle=this._bridge.$header.find(".widgetbar-widgettitle"),this._newsScrollIterator=null,this._newsDiffResolver=null,this._updateWhenVisible=null,this._pendingNewsRequest=null,this._updateIntervalHandle=null,this._needsFullUpdate=!0,this._$container=t.$body,this._resize=this.resize.bind(this),this._prepareLayout(this._$container);var i=(0,v.getWidgetBarProvider)();i&&(this._dataProvider=new i),this._onSymbolChange=this.onSymbolChange.bind(this),this._bridge.symbol.subscribe(this._onSymbolChange,{callWithLast:!0}),window.loginStateChange.subscribe(this,this._onLoginChange)}return o(e,[{key:"_prepareLayout",value:function(e){this._$container=e,this._$widget=$('<div class="tv-news">').appendTo(e),this._$widget.on("contextmenu",(function(e){"a"!==e.target.tagName.toLowerCase()&&e.preventDefault()})),this._$data=$('<div class="ns-data" data-name="news_list">').appendTo(this._$widget),this._scroll=new c.SidebarCustomScroll(this._$widget,this._$data),this._bridge.height.subscribe(this._resize),this._bridge.visible.subscribe(this._resize)}},{key:"setTitle",value:function(e){if(this._dataProvider){var t=this._dataProvider.title();this._dataProvider.needAppendSymbolToTitle()&&e&&(t=y.format({title:t,symbol:e})),this._$widgetTitle.text(t)}}},{key:"update",value:function(){var e=this;if(this._dataProvider)if(this._bridge.visible.value()){var t=this._quoteMetaInfo;if(!t)return this._clearListUI(),void this._stopLoading();var i=t.short_name;this._needsFullUpdate=i!==this._shortName,this._shortName=i,this._needsFullUpdate&&(this._startLoading(),clearInterval(this._updateIntervalHandle),this._setUpdateInterval()),this.setTitle(i),this._pendingNewsRequest&&this._pendingNewsRequest.cancel(),this._pendingNewsRequest=(0,u.makeCancelable)(this._dataProvider.getNews(this._quoteMetaInfo)),this._pendingNewsRequest.promise.then((function(t){e._pendingNewsRequest=null,e._stopLoading(),e.updateData(t)})).catch((function(t){if(!(0,u.isCancelled)(t))throw e._pendingNewsRequest=null,e._stopLoading(),t}))}else null===this._updateWhenVisible&&(this._updateWhenVisible=function(t){t&&(null!==e._updateIntervalHandle&&e._setUpdateInterval(),e._bridge.visible.unsubscribe(e._updateWhenVisible),e._updateWhenVisible=null,e.update())},this._bridge.visible.subscribe(this._updateWhenVisible),clearInterval(this._updateIntervalHandle))}},{key:"_setUpdateInterval",value:function(){if(this._dataProvider){var e=this._dataProvider.timeout();e&&(this._updateIntervalHandle=setInterval(this.update.bind(this),e))}}},{key:"updateData",value:function(e){if(e&&e.length)if(this._needsFullUpdate){this._clearListUI(),this._scroll.scrolltoend.unsubscribe(this,this._onScrollToEnd),this._scroll.scrollToStart(),this._scroll.scrolltoend.subscribe(this,this._onScrollToEnd),this._newsScrollIterator=(0,h.iterateInChunks)(e,20);var t=this._newsScrollIterator.next().value,i=(0,p.getNewsItemDigest)(t[0]);this._newsDiffResolver=(0,
p.getNewsDiffResolver)(i),this._renderItems(t,!1)}else{if(!this._newsDiffResolver)return void b.logError("Attempt to perform partial update before full update was committed");var n=this._newsDiffResolver.getDiff(e);this._renderItems(n,!0)}}},{key:"_renderItems",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this._dataProvider){var i=document.createDocumentFragment(),o=!0,a=!1,s=void 0;try{for(var r,l=e[Symbol.iterator]();!(o=(r=l.next()).done);o=!0){var c=r.value,d=!(0,f.isFeatureEnabled)("hide_short_description_on_widgetbar")&&c.shortDescription,h=this._dataProvider.renderItem(n({},c,{shortDescription:d?(0,m.dottedDescriptionTruncate)(c.shortDescription,170):void 0}));t&&this.highlight(h),i.appendChild(h)}}catch(u){a=!0,s=u}finally{try{!o&&l.return&&l.return()}finally{if(a)throw s}}t?this._$data.prepend(i):this._$data.append(i)}}},{key:"_onScrollToEnd",value:function(){this._newsScrollIterator&&this._renderItems(this._newsScrollIterator.next().value,!1)}},{key:"_onLoginChange",value:function(){window.is_authenticated||this.update()}},{key:"_startLoading",value:function(){this._$data.addClass("loading")}},{key:"_stopLoading",value:function(){this._$data.removeClass("loading")}},{key:"_clearListUI",value:function(){this._$data.empty()}},{key:"resize",value:function(){this._scroll.resize()}},{key:"highlight",value:function(e){e.classList.add(w["news-item--highlight"]),$(e).highlight(5)}},{key:"onSymbolChange",value:function(e){if(l.default.shortName(e)!==this._shortName){var t=(0,d.getQuoteSessionInstance)("full"),i=this;if(i._quoteSymbol&&t.unsubscribe(i._bridge.id,i._quoteSymbol),i._quoteMetaInfo=null,e){i._quoteSymbol=e,this._needsFullUpdate&&i.update(),this._bridge.clearNotifications();var n=!1;t.subscribe(i._bridge.id,e,(function(o){n||(0,_.isSfQuoteData)(o)||("permission_denied"===o.status&&o.values&&o.values.alternative?i.onSymbolChange(o.values.alternative):o.values&&o.values.short_name&&(i._quoteMetaInfo={pro_name:o.values.pro_name,short_name:o.values.short_name,type:o.values.type,typespecs:o.values.typespecs,exchange:o.values.exchange},i.update(),n=!0,setTimeout((function(){t.unsubscribe(i._bridge.id,e)}),0)))}))}else i._quoteSymbol=void 0}}},{key:"destroy",value:function(){this._quoteSymbol&&(0,d.getQuoteSessionInstance)("full").unsubscribe(this._bridge.id,this._quoteSymbol),this._updateIntervalHandle&&clearInterval(this._updateIntervalHandle),this._scroll.scrolltoend.unsubscribe(this,this._onScrollToEnd),this._updateWhenVisible&&this._bridge.visible.unsubscribe(this._updateWhenVisible),this._bridge.height.unsubscribe(this._resize),this._bridge.visible.unsubscribe(this._resize),this._bridge.symbol.unsubscribe(this._onSymbolChange),window.loginStateChange.unsubscribe(this,this._onLoginChange)}}]),e}();e.exports=C},SoRE:function(e,t,i){},TZqb:function(e,t){
e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="45" height="45"><path fill="currentcolor" d="m28.5 16.92l.14-.8.65.47a9.8 9.8 0 0 1 1.87 2A10.12 10.12 0 0 1 33 24.5C33 30.28 28.28 35 22.5 35S12 30.28 12 24.5c0-4.4 1.71-6.67 6.46-10.3l.49-.36a30 30 0 0 0 3.2-2.7l.4-.39.34.44a12.57 12.57 0 0 1 1.05 1.64 7.95 7.95 0 0 1 .93 5.5 28.56 28.56 0 0 1-.71 3.64c2.46-.27 3.85-2.04 4.35-5.05zm-8.95-2.29l-.48.37C14.55 18.45 13 20.5 13 24.5c0 5.22 4.28 9.5 9.5 9.5s9.5-4.28 9.5-9.5c0-2.08-.62-3.86-1.66-5.34a8.91 8.91 0 0 0-1.02-1.22C28.55 21.13 26.66 23 23.5 23h-.66l.18-.64a35.38 35.38 0 0 0 .49-2.02c.16-.74.28-1.46.37-2.14a7 7 0 0 0-.82-4.9c-.2-.38-.41-.72-.63-1.04-.74.7-1.55 1.36-2.88 2.37z"/></svg>'},"Ui/w":function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45" width="45" height="45" fill="none"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M11.5 11c-.83 0-1.5.67-1.5 1.5v19a2.5 2.5 0 0 0 2.5 2.5H33.5c.59 0 1.06-.15 1.43-.4.37-.24.61-.57.77-.88a2.96 2.96 0 0 0 .3-1.18v-.04h-.5.5v-11c0-.83-.67-1.5-1.5-1.5H32v-6.5c0-.83-.67-1.5-1.5-1.5h-19zM32 20V31.55a1.97 1.97 0 0 0 .2.73c.1.19.23.36.42.5.2.12.47.22.88.22.41 0 .69-.1.88-.23.2-.13.33-.3.42-.5a1.96 1.96 0 0 0 .2-.76V20.5a.5.5 0 0 0-.5-.5H32zm-.7 12.72l.16.28H12.5a1.5 1.5 0 0 1-1.5-1.5v-19c0-.28.22-.5.5-.5h19c.28 0 .5.22.5.5v19h.5-.5v.04a2.08 2.08 0 0 0 .04.35c.03.22.1.53.26.83zM15.5 15c-.83 0-1.5.67-1.5 1.5v3c0 .83.67 1.5 1.5 1.5h3c.83 0 1.5-.67 1.5-1.5v-3c0-.83-.67-1.5-1.5-1.5h-3zm-.5 1.5c0-.28.22-.5.5-.5h3c.28 0 .5.22.5.5v3a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-3zM28 24H14v-1h14v1zm-6-8h6v-1h-6v1zm6 3h-6v-1h6v1zm-14 8h14v-1H14v1zm7 3h-7v-1h7v1z"/></svg>'},Vike:function(e,t){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>'},WUrJ:function(e,t,i){"use strict";function n(e,t){if(!Number.isInteger(t))throw new TypeError("Chunks size must be an integer");if(t<=0)throw new RangeError("Chunk size must be a positive number");var i=e.slice();return{next:function(){var e=i.splice(0,t);return{value:e,done:!e.length}}}}i.r(t),i.d(t,"iterateInChunks",(function(){return n}))},Wz44:function(e,t,i){e.exports={container:"container-3CL4Geq2",mirror:"mirror-3CL4Geq2",background:"background-3CL4Geq2",arrow:"arrow-3CL4Geq2"}},XUKQ:function(e,t,i){"use strict";i.r(t),i.d(t,"StreamsTabButton",(function(){return r})),i.d(t,"StreamNotification",(function(){return l}));var n=i("mrSG"),o=i("q1tI"),a=i("1WwW"),s=i("vvCS");function r(e){return o.createElement(a.a,Object(n.a)({},e,{NotificationComponent:l}))}function l(e){var t=e.count;return t&&t>0?o.createElement("span",{className:s.counter}):null}},YJLw:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=0;if(0===e.length)return t;for(var i=0;i<e.length;i++)t=(t<<5)-t+e.charCodeAt(i),t&=t;return t},e.exports=t.default},YvYu:function(e,t){
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 45" width="45" height="45"><path fill="currentcolor" d="M16.5 21.5l8.146 8.146a.914.914 0 0 1-1.292 1.293L16.5 24.086l-6.854 6.853a.914.914 0 0 1-1.292-1.293L16.5 21.5zm0 4l6.146 6.146a1.914 1.914 0 0 0 2.708-2.707L16.5 20.086l-8.854 8.853a1.914 1.914 0 1 0 2.708 2.707L16.5 25.5zm13 0l8.146-8.146a.914.914 0 0 0-1.292-1.293L29.5 22.914l-6.854-6.853a.914.914 0 0 0-1.292 1.293L29.5 25.5zm0-4l6.146-6.146a1.914 1.914 0 0 1 2.708 2.707L29.5 26.914l-8.854-8.853a1.914 1.914 0 1 1 2.708-2.707L29.5 21.5z"/></svg>'},Yznx:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="45" height="45"><path fill="currentcolor" d="m14.5 10a4.5 4.5 0 0 0-4.5 4.5v17.2l4.7-4.7h10.8a4.5 4.5 0 0 0 4.5-4.5v-8a4.5 4.5 0 0 0-4.5-4.5zm0 1h11a3.5 3.5 0 0 1 3.5 3.5v8a3.5 3.5 0 0 1-3.5 3.5H14.3L11 29.3V14.5a3.5 3.5 0 0 1 3.5-3.5zm15 5v1h1a2.5 2.5 0 0 1 2.5 2.5v12.8L29.7 29h-8.2a2.5 2.5 0 0 1-2.5-2.5h-1a3.5 3.5 0 0 0 3.5 3.5h7.8l4.7 4.7V19.5a3.5 3.5 0 0 0-3.5-3.5z"/></svg>'},"Z+Vr":function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));var n="watchlist-widget"},"aE/C":function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="44" height="44" fill="none"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M22.308 8.606a.5.5 0 0 0-.616 0l-11.5 9a.5.5 0 0 0 0 .788l11.5 9a.5.5 0 0 0 .616 0l11.5-9a.5.5 0 0 0 0-.788l-11.5-9zM22 26.366L11.311 18 22 9.635 32.689 18 22 26.365zm0 4l-11.192-8.76-.616.788 11.5 9a.5.5 0 0 0 .616 0l11.5-9-.616-.788L22 30.366zm0 4l-11.192-8.76-.616.788 11.5 9a.5.5 0 0 0 .616 0l11.5-9-.616-.788L22 34.366z"/></svg>'},ai7J:function(e,t,i){e.exports={separator:"separator-3YbwEKtL"}},at9Y:function(e,t,i){},bC7V:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" width="25" height="25"><path d="M15 15v10l-2-2h10l-2 2v-10l2 2h-10l2-2zm-2 0h10v10h-10v-10zm-13 8h10l-2 2v-10l2 2h-10l2-2v10l-2-2zm0 2v-10h10v10h-10zm2-23v10l-2-2h10l-2 2v-10l2 2h-10l2-2zm-2 0h10v10h-10v-10zm19.414-.657l-7.071 7.071v-2.828l7.071 7.071h-2.828l7.071-7.071v2.828l-7.071-7.071h2.828zm-1.414-1.414l7.071 7.071-7.071 7.071-7.071-7.071 7.071-7.071z"/></svg>'},bZvF:function(e,t,i){},cSYm:function(e,t,i){"use strict";i.r(t);i("Kxc7");var n=i("mrSG"),o=i("YFKU"),a=i("xlbu"),s=i("BHQF"),r=i("24R9"),l=i("txPx");function c(e){return Promise.all([i.e("vendors_embed"),i.e(1),i.e(3),i.e(30),i.e(38),i.e(205),i.e(257),i.e(359),i.e(168),i.e(236),i.e("news-description-dialog-impl")]).then(i.bind(null,"b+lp")).then((function(t){return t.openNewsDescriptionDialogImpl(e)}))}var d=i("4kQX"),h=i("e1ZQ");var u=i("JHPQ");function p(e,t,i){var n=e.title,o=e.shortDescription,a=e.link,s=e.source,r=e.published,l=document.createElement("div");l.classList.add(u["news-item__title"]),l.textContent=n,l.classList.toggle(u["news-item__title--external-link"],t);var c=document.createElement("div");c.classList.add(u["news-item__header"]);var p=document.createElement("span");p.textContent=s;var g=document.createElement("span")
;g.classList.add(u["news-item__dot"]),g.textContent="·";var v=document.createElement("span");v.textContent=function(e){var t=new Date(e),i=new d.TimeFormatter("%h:%m"),n=h.dateFormatFunctions["MMM dd"](t,!0);return i.formatLocal(t)+" · "+n}(r),c.appendChild(v),c.appendChild(g),c.appendChild(p);var m=document.createElement(t?"a":"div");if(m.classList.add(u["news-item"]),m.classList.toggle(u["news-item--no-hover"],!i),t&&a&&(m.href=a,m.target="_blank",m.rel="noopener nofollow"),m.appendChild(c),m.appendChild(l),o){var f=document.createElement("div");f.classList.add(u["news-item__description"]),f.textContent=o||"",m.appendChild(f)}return m}var g=function(){function e(){}return e.prototype.timeout=function(){return 3e5},e.prototype.getNews=function(e){return this._fetch(e)},e.prototype.renderItem=function(e){var t=this,i=p(e,Boolean(e.link),Boolean(e.link));return e.fullDescription&&i.addEventListener("click",(function(i){i.preventDefault(),t.showPopup(e)})),i},e.prototype.showPopup=function(e){var t=e.fullDescription;t&&c({title:e.title,description:t,source:e.source,published:e.published})},e}(),v=i("eYFQ"),m=i("9nb6"),f={bond:"bond",cfd:"cfd",crypto:"crypto",dr:"stock",forex:"forex",fund:"stock",futures:"futures",index:"index",right:"stock",stock:"stock",structured:"stock",warrant:"stock"};function _(e,t){if(t&&0!==t.length){if(t.includes("crypto"))return"crypto";if(t.includes("bond"))return"bond"}return function(e){return e in f}(e)?f[e]:"base"}function w(e){return window.is_authenticated?e.shortDescription:y(e)?void 0:e.shortDescription}function b(e){return window.is_authenticated?e.astDescription:y(e)?void 0:function(e){return Boolean(e.permission&&"preview"===e.permission)}(e)?e.shortDescription:e.astDescription}function y(e){return Boolean(e.permission&&"headline"===e.permission)}var C=i("wyNs"),S=i("dp/D"),P=i("ogJP"),T=i("vTLT");function B(e){if(void 0!==e.children)return function e(t){for(var i=0,n=t;i<n.length;i++){var o=n[i];if("string"!=typeof o)if("table"!==o.type){if(o.children&&e(o.children),"symbol"===o.type){var a=Object(m.getShortNameAndProName)(o.params.symbol);o.params.pageUrl=Object(v.makeSymbolPageUrl)(a),o.params.text=a.shortName}}else{var s=Object(P.clone)(o);s.className=T.table,o.type="div",o.children=[s],o.className=T.tableContainer}}return t}(e.children),e}var k=i("952j"),$=i("JWMC"),O=i("0UyP");function x(e){return Object(n.b)(this,void 0,void 0,(function(){var t,i,o;return Object(n.d)(this,(function(a){switch(a.label){case 0:return Object($.trackEvent)("News","click",e.provider),[4,Object(O.getTracker)()];case 1:return t=a.sent(),i=e.category,o=Object(n.e)(e,["category"]),t&&t.trackNewsClick(Object(n.a)(Object(n.a)({},o),{category:i,page:M(),user_id:window.user.id||null})),[2]}}))}))}function M(){if(window.TradingView.onChartPage)return"chart";var e=window.location.pathname;if("/"===e)return"main";var t=e.split("/")[1];return"chart"===t?"idea":t}var D=Object(l.getLogger)("NewsProvider"),I=Object(o.t)("Headlines"),N=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this
;return t._baseUrl=window.NEWS_SERVICE_URL+"/headlines/?",t}return Object(n.c)(t,e),t.prototype.title=function(){return I},t.prototype.getNews=function(e){if("spread"===e.type){var t=Object(k.b)(e.pro_name).filter((function(e){return"symbol"===e.type})).map((function(e){return e.value}));return this._fetch(Object(n.a)(Object(n.a)({},e),{pro_name:t[0]}))}return this._fetch(e)},t.prototype.renderItem=function(e){var t=this,i=p(e,Boolean(!e.astDescription&&e.link),Boolean(e.astDescription||e.link));return e.astDescription?i.addEventListener("click",(function(){return t.showPopup(e)})):e.link&&i.addEventListener("click",(function(){x({category:e.category,country:e.country,language:e.locale,news_id:i.pathname,provider:i.hostname,symbol:e.proSymbol})})),i},t.prototype.showPopup=function(e){var t=e.astDescription;if(t){x({category:e.category,country:e.country,language:e.locale,news_id:null,provider:e.source,symbol:e.proSymbol});var i,n=function(){return c({title:e.title,astDescription:t,source:e.source,published:e.published,link:e.link})};if(window.is_authenticated||!("permission"in e))n();else{var o=b(e),a=void 0!==(i=o)&&"string"==typeof i?o:void 0,s=function(e){return void 0!==e&&"string"!=typeof e}(o)?o:void 0;c({title:e.title,description:a,astDescription:s,source:e.source,published:e.published,onShowDescriptionClick:n,link:e.link})}}},t.prototype.needAppendSymbolToTitle=function(){return"ja"!==window.locale},t.prototype._fetch=function(e){return Object(n.b)(this,void 0,void 0,(function(){var t,i,o,r,l,c,d;return Object(n.d)(this,(function(h){switch(h.label){case 0:return h.trys.push([0,5,,6]),t=function(e){return{proSymbol:e.pro_name||null,locale:e.locale||window.locale,category:_(e.type,e.typespecs),country:e.country||Object(C.a)(window.locale),lang:e.lang||Object(S.a)(window.language),client:"web"}}(e),i=this._getURL(t),o=Date.now(),[4,Object(s.fetch)(i)];case 1:return r=h.sent(),l=Date.now()-o,a.telemetry.sendReport("news","api_time_frame",{value:l}),a.telemetry.sendReport("news","api_http_status",{value:r.status}),r.ok?[3,3]:[4,r.text()];case 2:throw c=h.sent(),Error("Error while fetch "+r.url+". Response status "+r.status+" "+r.statusText+". Response text: '"+c+"'");case 3:return[4,r.json()];case 4:return[2,h.sent().map((function(e){return function(e,t){return Object(n.a)(Object(n.a)({},e),{shortDescription:w(e),astDescription:e.astDescription&&B(e.astDescription),published:1e3*e.published,category:t.category,country:t.country,locale:t.locale,proSymbol:t.proSymbol})}(e,t)}))];case 5:throw d=h.sent(),D.logError(d.message),d;case 6:return[2]}}))}))},t.prototype._getURL=function(e){return this._baseUrl+Object(r.createUrlParams)(e)},t}(g);function E(){return N}i.d(t,"getWidgetBarProvider",(function(){return E}))},clWw:function(e,t,i){"use strict";(function(t,n){i("TdlR"),i("bZvF"),i("AlSh"),i("xNaP")
;var o=i("9tJu"),a=o.getUserProfilePath,s=o.ProfilePages,r=i("hp/T"),l=i("TxTq"),c=i("sFgq").SidebarCustomScroll,d=i("L7u7").pushChartPage,h=i("bR4N").bindPopupMenu,u=i("PQvG"),p=i("OqB+").ChatLikesHandler,g=i("VPmY"),v=i("c2JX").Spinner,m=i("qjxE"),f=i("FBuY").TVXWindowEvents,_=i("eYFQ").getSymbolPagePath,w=i("0gOL").template,b=i("hPwr").PublishedChartsFilter,y=i("IhIr").Size,C=i("6RdN").renderBadgeAccountWithoutFeaturedBroker,S=i("EhHS").getBadgeAccountTitle,P=i("HKz3").getBadgeAccountLink,T=i("e1ZQ").dateFormatFunctions,B=i("2uTr").appendEllipsis,k=i("7+KO"),O=i("M1lL"),x=0,M=1,D=2,I=3,N={};N[b.None]=0,N[b.Following]=1,N[b.Private]=2;function E(e){this._bridge=e;var i=(e.options||{}).type;if("following"!==i&&"user"!==i)throw new Error("NotificationsWidgets: invalid widget type");this._widgetType=i,this._pushStreamChannel="notification:"+i,this._xEventsChannel="notifications-read:"+i,this._markNotificationsSettingsKey="notifications-mark:"+i,this._onMessage=new t,this._$container=e.$body,this._prepareLayout(this._$container),this._getTemplate(),window.is_authenticated?(this.init(),this._state=M,this._bridge.visible.value()&&this.load()):(this._state=x,this.showSignInMessage()),TradingView.notificationsChanged.subscribe(null,function(){this.updateSettings()}.bind(this))}function L(e,t){if(e.length<t)return e.trim();e+=" ";for(var i,n=/\s+/g,o="",a=0;null!=(i=n.exec(e));){if(i.index>=t){o=e.substring(0,a).trim()+"...";break}a=i.index}return o||e.substring(0,t)+"..."}E.prototype.updateSettings=function(){this.getWidgetData().done(function(e){if(this._settings=e.settings,"user"===this._widgetType){var t=new g;t.ready.then((function(){t.data.notification_popup=e.settings.notification_popup,t.data.notification_sound=e.settings.notification_sound})),TVSettings.setValue("messages.show_onsite_notifications",0!=(1&e.settings.notification_mention_in_chat)),TVSettings.setValue("publicchats.send_email_notifications",0!=(2&e.settings.notification_mention_in_chat))}}.bind(this))},E.prototype._getTemplate=function(){
this._itemTemplate='<div class="js-notifications-event-block tv-notifications-widget-item" data-id="{{id}}"><div class="tv-notifications-widget-item__wrap"><div class="tv-notifications-widget-item__icon-time-wrap tv-notifications-widget-item__icon-time-wrap--event-type_{{eventType}}"><div class="js-icon-place"></div></div><div class="tv-notifications-widget-item__header"><a class="js-userlink-popup tv-notifications-widget-item__user-avatar" href="{{profileUrl}}" target="_blank" data-username="{{username}}"><img src="{{avatar}}" alt=""/></a><div class="tv-notifications-widget-item__user-info"><div class="tv-notifications-widget-item__user-name"><a class="js-userlink-popup tv-notifications-widget-item__user-name-link" href="{{profileUrl}}" target="_blank" data-username="{{username}}">{{username}}</a><span class="js-badge-wrapper"></span></div><time class="js-ago-timer"></time><div>{{event}}</div></div></div>{{^templateOptions.noBody}}<div class="tv-notifications-widget-item__body">{{#templateOptions.title}}<span class="tv-notifications-widget-item__chart-title"><span>{{chartTitle}}</span> {{^templateOptions.noSymbol}}<a href="{{ symbolPageUrl }}" target="_blank" class="tv-notifications-widget-item__chart-symbol">{{chartSymbol}}</a>{{/templateOptions.noSymbol}}</span>{{/templateOptions.title}}{{#templateOptions.chartPreview}}<div class="tv-notifications-widget-item__chart-preview-wrap">{{^templateOptions.noLikes}}'+w+'{{/templateOptions.noLikes}}<a class="js-chart-preview tv-notifications-widget-item__chart-preview" href="{{chartURL}}"><img src="{{chartPreview}}"/>{{#isVideo}}<div class="tv-idea-preview-button__play-icon">'+i("IRk6")+'</div>{{/isVideo}}{{#videoCam}}<div class="tv-idea-preview-button__video-cam">'+i("n5P/")+'</div>{{/videoCam}}</a></div>{{/templateOptions.chartPreview}}{{#templateOptions.description}}<div class="tv-notifications-widget-item__description {{#shortDescription}}tv-notifications-widget-item__description--short {{/shortDescription}} tv-notifications__description--ellipsis">{{description}}</div>{{/templateOptions.description}}{{#templateOptions.descriptionLink}}<div class="tv-notifications-widget-item__entity-link"><a href="{{descriptionLink}}" target="_blank">'+window.t("Link")+"</a></div>{{/templateOptions.descriptionLink}}</div>{{/templateOptions.noBody}}</div></div>"},E.prototype.showSignInMessage=function(){this._$data.append('<div class="ch-item-empty">'+window.t("If you want to use this service - please __signInLink__!",{signInLink:'<a class="js-notifications-widgets-sign-in" href="#signin">'+window.t("sign in or register")+"</a>"})+"</div>"),this._$data.find("a.js-notifications-widgets-sign-in").on("click",(function(){return runOrSignIn((function(){}),{source:"Notifications widget placeholder",sourceMeta:"Chart"}),!1}))},E.prototype.showEmptyMessage=function(){this._$data.append('<div class="ch-item-empty js-empty-message">'+window.t("You have no notifications yet.")+"</div>"),this._onMessage.subscribe(this,function(){this._$data.find(".js-empty-message").remove()}.bind(this),!0)},
E.prototype.load=function(e){var t=new v("mini").spin(this._$widget.get(0));this._state=D,this.getWidgetData().done(function(i){t.stop(),this.onData(i),this.highlightUnread(),this.read(),e&&e()}.bind(this))},E.prototype.onData=function(e){var t=this,i=$.map(this._events,(function(e,t){return"notification_"+t}));this._settings=e.settings,i.forEach((function(e){if(!(e in t._settings))throw new Error("NotificationsWidgets: missing notification settings")})),e.notifications.length?this.renderItems(e.notifications):this.showEmptyMessage(),e.notifications.length<20&&(this._history_loaded=!0),this.initLoadMore(),this._state=I},E.prototype.init=function(){var e=this;l.on(this._pushStreamChannel,$.proxy(this,"onMessage")),f.on(this._xEventsChannel,this.onRead.bind(this)),this._likesHandler=p.getChartsHandler(),this._$container.parent().on("click",this.onFocus.bind(this)),this._getEvents(),this._count=window.user.notification_count?window.user.notification_count[this._widgetType]:0,this._count&&this._bridge.notify(this._count),this._settings={};var t=new g;t.ready.then((function(){for(var i in t.data)t.data.hasOwnProperty(i)&&(e._settings[i]=t.data[i])})),this._bridge.visible.subscribe(this.visibilityChange.bind(this)),this._bridge.active.subscribe(this.activeStateChange.bind(this))},E.prototype.destroy=function(){this._likesHandler&&this._likesHandler.destroy(),this._publishedChartsWatchedProps&&(this._publishedChartsWatchedProps.visible.unsubscribe(this,this._publishedChartsUpdateControls),this._publishedChartsWatchedProps.filter.unsubscribe(this,this._publishedChartsUpdateControls)),this._publishedChartsActiveChangedBound&&this._bridge.getChartWidgetCollection().activeChartWidget.unsubscribe(this._publishedChartsActiveChangedBound),l.off(this._pushStreamChannel),f.off(this._xEventsChannel)},E.prototype.getWidgetData=function(){return $.get("/notifications-data/",{widget_type:this._widgetType},"json")},E.prototype.visibilityChange=function(e){e&&this._state===M?this.load(this.visibilityChange.bind(this,e)):(e&&this.updateLayout(),e||this.read())},E.prototype.activeStateChange=function(e){e&&this._state!==D&&(this.highlightUnread(),this.read())},E.prototype.onFocus=function(){this.stopHighlight(),this.read()},E.prototype.markAsRead=function(){var e=this._$data.find(".js-notifications-event-block.js-notifications-unread").removeClass("js-notifications-unread").addClass("js-notifications-new");if(e.length){setTimeout((function(){e.removeClass(".js-notifications-new")}),36e5);var t=e.map((function(){return $(this).data("id")})),i=TVSettings.getJSON(this._markNotificationsSettingsKey,{},!0);i[(new Date).getTime()]=[Math.min.apply(null,t),Math.max.apply(null,t)],TVSettings.setJSON(this._markNotificationsSettingsKey,i)}},E.prototype.markNew=function(){var e,t=(new Date).getTime(),i=TVSettings.getJSON(this._markNotificationsSettingsKey,{},!0),n=!1;for(e in i)t-parseInt(e,10)>36e5&&(delete i[e],n=!0);n&&TVSettings.setJSON(this._markNotificationsSettingsKey,i),
this._$data.find(".js-notifications-event-block:not(.js-notifications-new)").each((function(){var n=$(this),o=n.data("id");function a(){n.removeClass("js-notifications-new")}for(e in i){var s=i[e];if(o>=s[0]&&o<=s[1]){n.addClass("js-notifications-new");var r=parseInt(e,10)+36e5-t;setTimeout(a,r)}}})).slice(0,this._count||0).addClass("js-notifications-unread")},E.prototype.highlightUnread=function(){this._$data.find(".js-notifications-event-block.js-notifications-unread").highlight(3)},E.prototype.stopHighlight=function(){this._$data.find(".js-notifications-event-block.js-notifications-unread").filter(":animated").stop(!0,!1).highlight(!1)},E.prototype.read=function(){this._count&&($.post("/notifications-reset-counter/",{widget_type:this._widgetType},(function(){})),this.onRead(),f.emit(this._xEventsChannel))},E.prototype.onRead=function(){this.markAsRead(),this._count=0,setTimeout(function(){this._bridge.clearNotifications()}.bind(this),0)},E.prototype.onMessage=function(e){e&&"stream_start"===e.type&&e.user_id===window.user.id||!e||"user"!==this._widgetType&&e.lang!==window.locale&&"publish_pine"!==e.type&&"pubscript_updates"!==e.type||(this._state!==M&&(this.addNewNotification(e),this._onMessage.fire()),this.incrementCounter(),this._bridge.visible.value()||this.showDesktopNotification(e),this.playSound())},E.prototype.incrementCounter=function(){this._count++,this._bridge.notify(1)},E.prototype.addNewNotification=function(e){var t=this.renderItem(e);this._$data.prepend(t),t.addClass("js-notifications-unread"),this._bridge.active.value()&&this.updateLayout(),this._bridge.visible.value()&&t.highlight(3)},E.prototype.showDesktopNotification=function(e){var t=this,i=new g;i.ready.then((function(){if(i.data.notification_popup&&l.ownPushStream()){var n=t._events[e.type],o=n.desktopNotification.messageTitle,a="function"==typeof o?o.call(t,e):o.format(e.user.username,e.chart_title||"",e.chart_symbol||""),s="";s=(s=n.desktopNotification.noDescription?window.t("Click here to open widget..."):n.desktopNotification.useChartTitle?e.chart_title:n.desktopNotification.description?"function"==typeof n.desktopNotification.description?n.desktopNotification.description.call(t,e):n.desktopNotification.description:e.description.trim()).slice(0,256),u.show(a,s,e.user.mid_picture_url)}}))},E.prototype._prepareLayout=function(e){if(this._$widget=$('<div class="tv-notifications">').appendTo(e),this._$data=$('<div class="nf-data">').appendTo(this._$widget),this._scroll=new c(this._$widget,this._$data),this._bridge.height.subscribe(this.resize.bind(this)),this._bridge.visible.subscribe(this.resize.bind(this)),"following"===this._widgetType&&this._bridge.getChartWidgetCollection()&&this._initPublishedCharts(),window.is_authenticated){this._$settings=this._addHeaderButton({classes:"button apply-common-tooltip",title:window.t("Settings"),icon:i("jJ9P"),iconWidth:17,iconHeight:17});var t=this;this._$settings.on("click",(function(e){$(this).hasClass("open")?$(this).trigger("hide-popup"):t._settingsMenu(e)})),h(this._$settings,null,{
event:"show-popup",hideEvent:"hide-popup",addClass:"nf-popup nf-settings-popup",careBottomBorder:!0,careRightBorder:!0,viewportSpacing:2,reverse:!0})}this._$widget.on("contextmenu",(function(e){e.target.classList.contains("tv-notifications")&&e.preventDefault()}))},E.prototype._addHeaderButton=function(e){var t=$('<a class="'+e.classes+'" title="'+e.title+'"></a>'),i=$(e.icon).attr({width:e.iconWidth,height:e.iconHeight});return t.append(i).appendTo(this._bridge.$headerspace)},E.prototype._initPublishedCharts=function(){var e={classes:"apply-common-tooltip button",title:window.t("Ideas for this symbol will appear as different color dots on the chart. Red for short ideas, yellow for neutral and green for long. The dot appears on the day when they were published."),icon:k},t={classes:"apply-common-tooltip button button-half button-nomarginleft",title:window.t("Published ideas settings"),icon:i("SmzL"),iconWidth:8,iconHeight:4};this._publishedChartsFilterPopupItems=[{title:window.t("Show All Ideas"),action:this._signInOrRunFilterHandler(b.None)},{title:window.t("Show Ideas of Followed Users"),action:this._signInOrRunFilterHandler(b.Following)},{title:window.t("Show My Ideas Only"),action:this._signInOrRunFilterHandler(b.Private)}],this._$publishedChartsToggle=this._addHeaderButton(e),this._$publishedChartsFilter=this._addHeaderButton(t),this._$publishedChartsToggle.on("click",this._handlePublishedChartsToggle.bind(this,void 0)),h(this._$publishedChartsFilter,this._publishedChartsFilterPopupItems,{direction:"down",reverse:!0}),this._publishedChartsActiveChangedBound=this._publishedChartsActiveChanged.bind(this),this._bridge.getChartWidgetCollection().activeChartWidget.subscribe(this._publishedChartsActiveChangedBound,{callWithLast:!0})},E.prototype._publishedChartsActiveChanged=function(e){if(this._bridge.getChartWidget()===e){var t=e.model();if(t){var i=t.publishedChartsTimelineSource().properties().visible,n=t.publishedChartsTimelineSource().properties().filter;i.subscribe(this,this._publishedChartsUpdateControls),n.subscribe(this,this._publishedChartsUpdateControls),this._publishedChartsWatchedProps?(this._publishedChartsWatchedProps.visible.unsubscribe(this,this._publishedChartsUpdateControls),this._publishedChartsWatchedProps.filter.unsubscribe(this,this._publishedChartsUpdateControls),this._publishedChartsWatchedProps.visible=i,this._publishedChartsWatchedProps.filter=n):this._publishedChartsWatchedProps={visible:i,filter:n},this._publishedChartsUpdateControls()}else e.modelCreated().subscribe(this,(function(){this._publishedChartsActiveChanged(e)}),!0)}},E.prototype._publishedChartsUpdateControls=function(){var e=this._publishedChartsWatchedProps,t=e.visible.value(),i=e.filter.value();this._publishedChartsFilterPopupItems.forEach((function(e,t){e.addClass=N[i]===t?"active-item-backlight":void 0})),this._$publishedChartsToggle.toggleClass("active",t);var n=$(t?O:k).css("margin-top",t?-4:0);this._$publishedChartsToggle.find("svg").replaceWith(n)},E.prototype._handlePublishedChartsToggle=function(e){
if(this._publishedChartsWatchedProps){var t=window.t("Show Published Charts Timeline"),i=window.t("Hide Published Charts Timeline"),n=this._publishedChartsWatchedProps.visible,o=!n.value();void 0!==e&&e!==o||n.setValue(o,o?t:i)}},E.prototype._signInOrRunFilterHandler=function(e){return window.runOrSignIn.bind(null,this._handlePublishedChartsFilter.bind(this,e),{source:"Published charts timeline in widgetbar",sourceMeta:"Chart",feature:"publish"})},E.prototype._handlePublishedChartsFilter=function(e){if(this._publishedChartsWatchedProps){var t=window.t("Change Ideas filter");this._publishedChartsWatchedProps.filter.setValue(e,t),this._handlePublishedChartsToggle(!0)}},E.prototype._getEvents=function(){"following"===this._widgetType&&(this._events={publish:{templateOptions:{title:!0,description:!0,chartPreview:!0},eventName:window.t("Published new idea"),iconSvgCode:i("AJki"),settingName:window.t("Ideas"),desktopNotification:{messageTitle:window.t("New idea by {0}"),useChartTitle:!0}},publish_pine:{templateOptions:{title:!0,description:!0,chartPreview:!0,noSymbol:!0},eventName:window.t("Published new script"),iconSvgCode:i("AJki"),settingName:window.t("Ideas"),desktopNotification:{messageTitle:window.t("New script by {0}"),useChartTitle:!0}},chart_updates:{templateOptions:{title:!0,description:!0,chartPreview:!0},eventName:window.t("Updated idea"),iconSvgCode:i("RMt/"),settingName:window.t("Updates"),desktopNotification:{messageTitle:window.t("{0} updated the {1} idea")}},pubscript_updates:{templateOptions:{title:!0,description:!0,chartPreview:!0},eventName:window.t("New script version"),iconSvgCode:i("RMt/"),settingName:window.t("Scripts Updates"),desktopNotification:{messageTitle:window.t("{0} updated the {1} script")}},change_status:{templateOptions:{description:!0},eventName:window.t("Updated status"),iconSvgCode:i("pM3Z"),settingName:window.t("Status Updates"),desktopNotification:{messageTitle:window.t("{0} has a new status")}},follow_symbol:{templateOptions:{title:!0,description:!0,chartPreview:!0},eventName:window.t("Published new idea"),iconSvgCode:i("AJki"),settingName:window.t("Ideas"),desktopNotification:{messageTitle:window.t("New idea by {0} on symbol {2}"),useChartTitle:!0}}},this._settingsGroups=[{title:window.t("Authors Followed"),items:["publish","change_status"]},{title:window.t("Ideas Followed"),items:["chart_updates"]},{title:window.t("Symbols Followed"),items:["follow_symbol"]}]),"user"===this._widgetType&&(this._events={follow_user:{templateOptions:{noBody:!0},eventName:window.t("Follows you"),iconSvgCode:i("Aml6"),settingName:window.t("New Follower"),desktopNotification:{messageTitle:window.t("User {0} now follows you"),noDescription:!0}},stream_start:{templateOptions:{descriptionLink:!0},eventName:window.t("Started a new live stream"),iconSvgCode:i("yTtm"),settingName:window.t("New Stream"),desktopNotification:{messageTitle:window.t("User {0} just started a new live stream")}},comment:{templateOptions:{title:!0,description:!0,descriptionLink:!0,chartPreview:!0},eventName:function(e){
return e.coins?window.t("Donated {amount} coin on your idea",{plural:"Donated {amount} coins on your idea",count:e.coins}).format({amount:e.coins}):window.t("Commented on your idea")},iconSvgCode:i("ioEH"),settingName:window.t("Comments"),desktopNotification:{messageTitle:function(e){return e.coins?window.t("{username} donated {amount} coin on your idea {name}",{plural:"{username} donated {amount} coins on your idea {name}",count:e.coins}).format({amount:e.coins,username:e.user.username,name:e.chart_title||""}):window.t("{username} commented on your idea {name}").format({username:e.user.username,name:e.chart_title||""})}}},comment_pine:{templateOptions:{title:!0,description:!0,descriptionLink:!0,chartPreview:!0,noSymbol:!0},eventName:function(e){return e.coins?window.t("Donated {amount} coin on your script",{plural:"Donated {amount} coins on your script",count:e.coins}).format({amount:e.coins}):window.t("Commented your script")},iconSvgCode:i("ioEH"),settingName:window.t("Comments"),desktopNotification:{messageTitle:function(e){return e.coins?window.t("{username} donated {amount} coin on your script {name}",{plural:"{username} donated {amount} coins on your script {name}",count:e.coins}).format({amount:e.coins,username:e.user.username,name:e.chart_title||""}):window.t("{username} commented your script {name}").format({username:e.user.username,name:e.chart_title||""})}}},vote:{templateOptions:{title:!0,chartPreview:!0},eventName:window.t("Agreed with your idea"),iconSvgCode:i("w68K"),settingName:window.t("Likes"),desktopNotification:{messageTitle:window.t("{0} agreed with your idea"),useChartTitle:!0}},vote_pine:{templateOptions:{title:!0,chartPreview:!0,noSymbol:!0},eventName:window.t("Liked your script"),iconSvgCode:i("w68K"),settingName:window.t("Likes"),desktopNotification:{messageTitle:window.t("{0} liked your script {1}"),useChartTitle:!0}},mention_in_ideas_comment:{templateOptions:{description:!0,descriptionLink:!0},eventName:window.t("Mentioned you in idea comment"),iconSvgCode:i("ioEH"),settingName:window.t("Mentions in Idea Comment"),desktopNotification:{messageTitle:window.t("{0} mentioned you in idea comment")}},mention_in_script_comment:{templateOptions:{description:!0,descriptionLink:!0},eventName:window.t("Mentioned you in script comment"),iconSvgCode:i("ioEH"),settingName:window.t("Mentions in Script Comment"),desktopNotification:{messageTitle:window.t("{0} mentioned you in script comment")}},mention_in_chat:{templateOptions:{description:!0,descriptionLink:!0},eventName:function(e){return window.t("Mentioned you in{chatRoom}chat").format({chatRoom:e.chat_room?" "+e.chat_room+" ":" "})},iconSvgCode:i("ioEH"),settingName:window.t("Mentions in Chat"),desktopNotification:{messageTitle:window.t("{0} mentioned you in chat")}},access_to_script:{templateOptions:{title:!0,description:!0,chartPreview:!0,noSymbol:!0,noLikes:!0},eventName:function(e){return e.expiration?window.t("Granted you access to a script that expires on {expiration}").format({expiration:T["dd MMM 'yy"](new Date(e.expiration),!1)
}):window.t("Granted you access to a script")},iconSvgCode:i("AJki"),desktopNotification:{messageTitle:window.t("Granted access to a script"),description:function(e){return e.script_name}},processViewData:function(e,t){e.chartTitle=t.script_name,e.description=window.t("Refresh your page to see it in the Indicators window.")}},broker_review:{templateOptions:{description:!0,descriptionLink:!0},eventName:window.t("Left you a review"),iconSvgCode:i("pM3Z"),desktopNotification:{messageTitle:window.t("{0} left you a review")}},broker_review_update:{templateOptions:{description:!0,descriptionLink:!0},eventName:window.t("Updated a review"),iconSvgCode:i("pM3Z"),desktopNotification:{messageTitle:window.t("{0} updated a review")}},broker_reply:{templateOptions:{description:!0,descriptionLink:!0},eventName:window.t("Replied to your review"),iconSvgCode:i("pM3Z"),desktopNotification:{messageTitle:window.t("{0} replied to your review")}}},this._settingsGroups=[{title:window.t("You"),items:["follow_user","mention_in_ideas_comment","mention_in_chat"]},{title:window.t("Your Ideas"),items:["comment","vote"]}])},E.prototype._settingsMenu=function(e){var t=this;if(this._settings){var n=[];t._settingsGroups.forEach((function(o){var a=h.Group({title:o.title.toUpperCase()});o.items.forEach((function(n){var o=t._settings,s="notification_"+n;a.push({title:t._events[n].settingName,action:function(){o[s]^=1;var i={widget_type:t._widgetType};i[s]=o[s];var n=$('input[name="'+s+'_onsite"]');$.post("/notifications-settings/",i,(function(e){if(e&&e.success){if(n[0]){1&o[s]?n.attr("checked","checked"):n.removeAttr("checked")}}else o[s]^=1}),"json"),setTimeout((function(){t._settingsMenu(e)}),0)},icon:{image:"url('"+i("4AmR")+"')",offset:1&o[s]?"0 -16px":void 0}})})),n.push(a)})),n.push({separator:!0}),n.push({title:B(window.t("Additional Notifications Settings")),action:function(){window.open(a(window.user,{page:s.Notifications}),"_blank")},addClass:"with-indent"}),$(e.target).trigger("show-popup",[n])}e.stopPropagation()},E.prototype.updateLayout=function(e){this.resize()},E.prototype.resize=function(e){this._scroll.resize()},E.prototype.renderItems=function(e){for(var t=0;t<e.length;t++)this._$data.append(this.renderItem(e[t]));this.markNew(),this.updateLayout()},E.prototype.openChartPopup=function(e,t,i,n){return d({chartId:e,chartName:t,publishedUrl:i,shortSymbol:n,chartWidgetCollection:this._bridge.getChartWidgetCollection()}),!1},E.prototype.renderItem=function(e){var t=this._events[e.type],i=window.t("Like",{context:"like_button"}),o=window.t("Likes",{context:"like_button_amount_of_likes"}),s={eventType:e.type.replace("_","-"),templateOptions:t.templateOptions,id:e.id,username:e.user.username,profileUrl:a(e.user),avatar:e.user.picture_url,event:"function"==typeof t.eventName?t.eventName(e):t.eventName,chartURL:e.published_chart_url,chartTitle:e.chart_title,chartSymbol:e.chart_symbol,symbolPageUrl:e.chart_pro_symbol?_({proName:e.chart_pro_symbol}):"",chartPreview:e.chart_preview,description:e.description&&L(e.description,254),
shortDescription:t.templateOptions.description&&!(t.templateOptions.chartPreview&&t.templateOptions.title),descriptionLink:e.entity_url,isVideo:e.is_video,videoCam:e.video_cam,typeClass:"js-chart-like",titleTooltip:e.chart_user_id===window.user.id?o:i};t.processViewData&&t.processViewData.call(this,s,e);var r=$(n.render(this._itemTemplate,s));r.find(".js-icon-place").append($(t.iconSvgCode));var l=r[0].querySelector(".js-badge-wrapper");return null!==l&&C(l,{badges:e.user.badges,size:y.Small,getTitle:S,getLink:P}),t.templateOptions.chartPreview&&!t.templateOptions.noLikes&&(this._likesHandler.addIdea(r.find(".js-chart-like")[0],e.image_url,e.chart_likes,"user"===this._widgetType?-1:e.chart_voted),r.find(".js-chart-preview").on("click",this.openChartPopup.bind(this,e.image_url,e.chart_title,e.published_chart_url,e.chart_symbol))),m.jQueryCompatibleAgoDateFormatter(r.find(".js-ago-timer"),new Date(1e3*e.timestamp)),r},E.prototype.playSound=function(){this._settings.notification_sound&&l.ownPushStream()&&r.play(r.DEFAULT_SOUNDS.sound)},E.prototype.initLoadMore=function(){this._history_loaded||this._scroll.scrolltoend.subscribe(this,this.loadMore.bind(this))},E.prototype.loadMore=function(e){if(!this._history_loading&&!this._history_loaded){this._history_loading=!0,this._$data.addClass("js-notifications-loading");var t=this._$data.find(".js-notifications-event-block:last").data("id");$.get("/notifications-history/",{widget_type:this._widgetType,last:t,limit:20},function(e){e.length<20&&(this._history_loaded=!0),e.length&&this.renderItems(e)}.bind(this),"json").always(function(){e||this._scroll.updateScrollBar(),this._history_loading=!1,this._$data.removeClass("js-notifications-loading")}.bind(this))}},e.exports=E}).call(this,i("aIyQ"),i("nbsC"))},dCE3:function(e,t,i){e.exports={button:"button-2OmDro4I",icon:"icon-2OmDro4I"}},dECE:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="45" height="45"><path fill="currentcolor" d="m29.5 11a4.5 4.5 0 0 1 4.5 4.5v14a4.5 4.5 0 0 1-4.5 4.5h-15a4.5 4.5 0 0 1-4.5-4.5v-14a4.5 4.5 0 0 1 4.5-4.5m0 1a3.5 3.5 0 0 0-3.5 3.5v14a3.5 3.5 0 0 0 3.5 3.5h15a3.5 3.5 0 0 0 3.5-3.5v-14a3.5 3.5 0 0 0-3.5-3.5M15 17v-1h14v1zm0 4v-1h14v1zm0 4v-1h14v1zm0 4v-1h14v1z"/></svg>'},dkCg:function(e,t,i){"use strict";i.r(t);var n=i("q1tI"),o=i("i8i4"),a=(i("EsMY"),i("mrSG")),s=i("17x9"),r=i("TSYQ"),l=i("Iivm"),c=i("dCE3"),d=i("Opoj");function h(e){var t=r(e.className,c.button,e.isGrayed&&c.isGrayed);return n.createElement("div",{className:t,onClick:e.onClick,"data-role":"button","data-name":e.name},n.createElement(l.a,{className:c.icon,icon:d}))}var u,p=i("5AaZ"),g=i("1WwW");!function(e){e.DomPanel="domPanel",e.OrderPanel="orderPanel"}(u||(u={}));var v=i("Eyy1"),m=i("1TxM"),f=i("PW1O"),_=window.t("DOM"),w=Object(m.b)(),b=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._handleClick=function(){(0,Object(v.ensure)(n.context.widgetBar.tradingPanelAccessor).setDomPanelVisibility)(!n.state.isActive)},n._handleIsOpenedChange=function(){n.setState({
isActive:n._tradingPanel.isPageOpened(u.DomPanel)})},n._handleActivePageChange=function(e){n._tradingPanel.isOpened.value()&&n.setState({isActive:e===u.DomPanel})},Object(m.c)(i,{widgetBar:s.any.isRequired}),n._tradingPanel=Object(v.ensure)(n.context.widgetBar.tradingPanelAccessor).tradingPanel,n.state={isActive:n._tradingPanel.isPageOpened(u.DomPanel)},n}return Object(a.c)(t,e),t.prototype.componentDidMount=function(){this._tradingPanel.isOpened.subscribe(this._handleIsOpenedChange),this._tradingPanel.activePage.subscribe(this._handleActivePageChange)},t.prototype.componentWillUnmount=function(){this._tradingPanel.isOpened.unsubscribe(this._handleIsOpenedChange),this._tradingPanel.activePage.unsubscribe(this._handleActivePageChange)},t.prototype.render=function(){return n.createElement(g.a,Object(a.a)({},this.props,{icon:f,hint:_,isActive:this.state.isActive,onClick:this._handleClick}))},t.contextType=w,t}(n.PureComponent),y=i("JWMC"),C=i("YvYu"),S=window.t("Order Panel"),P=Object(m.b)(),T=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._handleClick=function(){var e=Object(v.ensure)(n.context.widgetBar.tradingPanelAccessor).setOrderPanelVisibility,t=!n.state.isActive;e(t),t&&Object(y.trackEvent)("GUI","Open Order Panel")},n._handleIsOpenedChange=function(){n.setState({isActive:n._tradingPanel.isPageOpened(u.OrderPanel)})},n._handleActivePageChange=function(e){n._tradingPanel.isOpened.value()&&n.setState({isActive:e===u.OrderPanel})},Object(m.c)(i,{widgetBar:s.any.isRequired}),n._tradingPanel=Object(v.ensure)(n.context.widgetBar.tradingPanelAccessor).tradingPanel,n.state={isActive:n._tradingPanel.isPageOpened(u.OrderPanel)},n}return Object(a.c)(t,e),t.prototype.componentDidMount=function(){this._tradingPanel.isOpened.subscribe(this._handleIsOpenedChange),this._tradingPanel.activePage.subscribe(this._handleActivePageChange)},t.prototype.componentWillUnmount=function(){this._tradingPanel.isOpened.unsubscribe(this._handleIsOpenedChange),this._tradingPanel.activePage.unsubscribe(this._handleActivePageChange)},t.prototype.render=function(){return n.createElement(g.a,Object(a.a)({},this.props,{icon:C,hint:S,isActive:this.state.isActive,onClick:this._handleClick}))},t.contextType=P,t}(n.PureComponent),B=i("ai7J");function k(e){return n.createElement("div",{className:r(e.className,B.separator)})}var $=i("HSWI");function O(e){return n.createElement("div",{className:r($.filler,e.className)})}function x(e,t){return function(i){function o(e){var n=i.call(this,e)||this;return n._bindedForceUpdate=function(){return n.forceUpdate()},n.state={viewModel:t},n}return Object(a.c)(o,i),o.prototype.componentDidMount=function(){var e=this.state.viewModel;e.notificationsCount.subscribe(this._bindedForceUpdate),e.isActive.subscribe(this._bindedForceUpdate)},o.prototype.componentWillUnmount=function(){var e=this.state.viewModel;e.notificationsCount.unsubscribe(this._bindedForceUpdate),e.isActive.unsubscribe(this._bindedForceUpdate)},o.prototype.render=function(){var t=this.state.viewModel,i=t.notificationsCount.value()
;return n.createElement(e,Object(a.a)({},this.props,{icon:t.icon.value(),isActive:t.isActive.value(),onClick:t.onClick.value(),hint:t.hint.value(),count:i}))},o}(n.PureComponent)}var M=i("XAms"),D=i("txPx"),I=i("8d0Q"),N=i("If+W"),E=Object(D.getLogger)("Platform.GUI.RightToolbar"),L=Object(m.b)(),W=function(e){function t(t,i){var n=e.call(this,t,i)||this;n._pages={},n._isTradingPanelCanBeShown=null,n._tradingActivePage=null,n._isTradingPanelOpened=null,n._handleMouseOver=function(e){Object(I.a)(e)&&n.setState({isHovered:!0})},n._handleMouseOut=function(e){Object(I.a)(e)&&n.setState({isHovered:!1})},n._handleFullscreenChange=function(e){n.setState({isFullscreen:e})},n._handleCloseClick=function(){n.context.widgetBar.layout.setMinimizedState(!0)},n._handleGrayedChange=function(){n.setState({isGrayed:n._isGrayed()})},n._handleDomButtonVisibilityChange=function(e){n.setState({isTradingButtonsVisible:e})},n._isGrayed=function(){var e=n._isMinimized.value();return null!==n._isTradingPanelOpened&&(e=e&&!n._isTradingPanelOpened.value()),!e},Object(m.c)(i,{widgetBar:s.any.isRequired});var o=n.context.widgetBar;if(n._isMinimized=o.layout.isMinimized.spawn(),n._isFullscreen=o.resizerBridge.fullscreen.spawn(),o.tradingPanelAccessor){var r=o.tradingPanelAccessor.tradingPanel;n._isTradingPanelCanBeShown=r.isAvailable.spawn(),n._tradingActivePage=r.activePage.spawn(),n._isTradingPanelOpened=r.isOpened.spawn()}return n.state={isHovered:!1,isGrayed:n._isGrayed(),isFullscreen:n._isFullscreen.value(),isTradingButtonsVisible:!1},n._isTradingPanelCanBeShown&&(n.state=Object(a.a)(Object(a.a)({},n.state),{isTradingButtonsVisible:n._isTradingPanelCanBeShown.value()})),o.layout.pages.forEach((function(e){var t;void 0===e.name&&E.logWarn('Page does not provide required field "name"'),n._pages[e.name]=x(null!==(t=e.tab.TabButtonComponent)&&void 0!==t?t:g.a,e.tab)})),n._toolset=n._createToolset(),n}return Object(a.c)(t,e),t.prototype.componentDidMount=function(){this._isFullscreen.subscribe(this._handleFullscreenChange),this._isMinimized.subscribe(this._handleGrayedChange),null!==this._isTradingPanelCanBeShown&&this._isTradingPanelCanBeShown.subscribe(this._handleDomButtonVisibilityChange),null!==this._isTradingPanelOpened&&this._isTradingPanelOpened.subscribe(this._handleGrayedChange)},t.prototype.componentWillUnmount=function(){this._isFullscreen.destroy(),this._isMinimized.destroy(),null!==this._isTradingPanelCanBeShown&&this._isTradingPanelCanBeShown.destroy(),null!==this._tradingActivePage&&this._tradingActivePage.destroy(),null!==this._isTradingPanelOpened&&this._isTradingPanelOpened.destroy()},t.prototype.render=function(){var e=this.props,t=e.className,i=e.isDomButtonAvailable,o=e.isOrderPanelButtonAvailable,a=this.state,s=a.isHovered,l=a.isGrayed,c=a.isFullscreen,d=a.isTradingButtonsVisible,u=this.context.widgetBar,g=this._toolset,v=o&&d,m=i&&d;return n.createElement(p.a,{isVisibleFade:Modernizr.mobiletouch,isVisibleButtons:!Modernizr.mobiletouch&&s,isVisibleScrollbar:!1,onMouseOver:this._handleMouseOver,onMouseOut:this._handleMouseOut
},n.createElement("div",{className:r(t,N.toolbar,l&&N.isGrayed),"data-name":"right-toolbar",onContextMenu:M.a},u.adaptive&&c&&n.createElement(h,{name:"close-button",onClick:this._handleCloseClick}),this._renderPages(),(v||m)&&n.createElement(k,null),v&&n.createElement(T,{name:"order-panel-button",isGrayed:l}),m&&n.createElement(b,{name:"dom-button",isGrayed:l}),n.createElement(O,null),this._renderPages(!0),g.SupportTicketButton&&n.createElement(g.SupportTicketButton,{name:"bug-report-button",isGrayed:l,isTab:!1}),g.HelpButton&&n.createElement(g.HelpButton,{name:"help-button",isGrayed:l,isTab:!1})))},t.prototype._renderPages=function(e){var t=this,i=[],o=this.state.isGrayed;return this.context.widgetBar.layout.pages.forEach((function(a){if(a.name in t._pages&&Boolean(a.onBottom)===Boolean(e)){var s=t._pages[a.name];i.push(n.createElement(s,{name:a.name,isGrayed:o,key:a.name})),a.spaceBottom&&i.push(n.createElement(k,{key:a.spaceBottomText}))}})),i},t.prototype._createToolset=function(){var e=this.context.widgetBar;return{SupportTicketButton:this.props.isSupportTicketButtonAvailable?x(g.a,e.ensureSupportTicketButtonViewModel()):void 0,HelpButton:this.props.isHelpButtonAvailable?x(g.a,e.ensureHelpButtonViewModel()):void 0}},t.contextType=L,t}(n.PureComponent),A={widgetBar:s.any},H=function(e){function t(t){var i=e.call(this,t)||this;return i._registry={widgetBar:i.props.widgetBar},i}return Object(a.c)(t,e),t.prototype.render=function(){return n.createElement(m.a,{validation:A,value:this._registry},this.props.children)},t}(n.PureComponent);i.d(t,"RightToolbarRenderer",(function(){return R}));var R=function(){function e(e,t,i){this._widgetBar=e,this._container=t,this._options=i,this._render()}return e.prototype.updateOptions=function(e){this._options=e,this._render()},e.prototype.destroy=function(){o.unmountComponentAtNode(this._container)},e.prototype._render=function(){o.render(n.createElement(H,{widgetBar:this._widgetBar},n.createElement(W,{isDomButtonAvailable:this._options.isDomButtonAvailable,isOrderPanelButtonAvailable:this._options.isOrderPanelButtonAvailable,isHelpButtonAvailable:this._options.isHelpButtonAvailable,isSupportTicketButtonAvailable:this._options.isSupportTicketButtonAvailable})),this._container)},e}()},dlie:function(e,t,i){"use strict";i.r(t),i.d(t,"importanceSwitcherValues",(function(){return n}));var n={true:[0,1],false:[-1,0,1]}},e9Yb:function(e,t,i){},e9uC:function(e,t,i){"use strict";i.r(t),i.d(t,"getWidgetButtonHTML",(function(){return a}));i("YFKU");var n=i("kTIc"),o=window.t("Get Widget");function a(e,t){var i="tv-get-widget-button apply-common-tooltip";return t&&(i+=" "+t),'<a class="'+i+'" href="'+("/widget/"+e+"/")+'" target="_blank" title="'+o+'">'+n+"</a>"}},eKOu:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 9 12"><path d="M4 0C2.347 0 1 1.347 1 3v2H.3c-.165 0-.3.135-.3.3v6.4c0 .165.135.3.3.3h8.4c.165 0 .3-.135.3-.3V5.3c0-.165-.135-.3-.3-.3H8V3c0-1.653-1.347-3-3-3H4zm0 1h1c1.117 0 2 .883 2 2v2H2V3c0-1.117.883-2 2-2z"/></svg>'},fadt:function(e,t,i){
"use strict";(function(n,o){Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();i("YFKU"),i("TdlR"),i("udDf"),i("b6p+"),i("1oAu");var s,r=i("c2JX"),l=i("sFgq"),c=i("dlie"),d=i("0h28"),h=(s=d)&&s.__esModule?s:{default:s},u=i("X19y"),p=i("e9uC"),g=i("6Qm0");var v=i("txPx").getLogger("ReutersCalendar"),m=i("wy57"),f=i("Hpvy"),_=i("R4+T"),w=i("yLMQ"),b=function(e,t,i,n){return null==e?"—":(t&&(e+=t),i&&i!==n&&("%"===i?e+=i:"USD"===i?e="$"+e:e+=" "+i),e)},y=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._bridge=t,this._bridge.options=t.options||{},this._$container=t.$body,this._chartEvents=new h.default,this._dateBlocks=[],this._templates=this._createTemplates(),this._collapsedDateBlocksDict={},this.onLayoutUpdated=new n,this._init()}return a(e,[{key:"_init",value:function(){var e=this;this._addUtmInfoToHeader(),this._updateFilter(!0),this._refDate=new Date,this._$container.addClass("tv-reuters-calendar").empty(),this._$container.on("contextmenu",(function(e){return e.preventDefault()}));var t=this._bridge.options,i=t.isTransparent,n=t.hideImportanceIndicator,a=t.noScroll,s=t.showHeaderIcons,r=t.showGetWidgetBtn;n&&this._$container.addClass("tv-reuters-calendar--hide-importance-indicator"),i&&this._$container.addClass("tv-reuters-calendar--transparent");var l=$(o.render(this._templates.calendarContent,{showHeaderIcons:s,showGetWidgetBtn:r}));l.appendTo(this._$container),this._$header=l.filter(".js-calendar-header"),this._$widget=l.filter(".js-calendar-widget"),this._$data=l.find(".js-calendar-data"),a||this.initScroll(),this._bridge.width.subscribe(this.resize.bind(this)),this._bridge.height.subscribe(this.resize.bind(this)),this.resize(),this._initialRequest(),this._chartEvents.changed.subscribe(null,(function(t){e._pendingRequestPromise||e._updateLayout(t)})),this._createHeaderButtons()}},{key:"_initialRequest",value:function(){var e=this,t=void 0;if(this.currencyFilterState.length){if(this._bridge.options.rewind&&null==this._bridge.options.maxHistoryInHours)return v.logError("cannot rewind events history: maxHistoryInHours is not set"),Promise.reject();this._historyEnd=!1,t=new Promise((function(t,i){!function n(o){var a=e._chartEvents.items();o?t({added:a}):e._chartEvents.requestMore().done(n).fail((function(e){i(e)}))}(null)}))}else this._historyEnd=!0,t=Promise.resolve({noResults:!0});e._pendingRequestPromise=t,t.catch((function(){return null})).then((function(i){e._pendingRequestPromise===t&&(e._pendingRequestPromise=void 0,i&&(e._updateLayout(i),e._scrollToUpcoming()||e._scroll&&e._scroll.scrollToEnd()))}));var i=new r.Spinner("mini").spin(e._$container.get(0));return t.catch((function(){})).then((function(){i.stop()})),t}},{key:"_onSettingsChanged",value:function(){this._updateFilter(!1),
this._$data.empty(),this._dateBlocks.length=0,this._initialRequest(),this._scroll&&this._scroll.resize()}},{key:"_updateFilter",value:function(e){var t=this.currencyFilterState,i=this.importanceFilterState;if(e){var n=!1;t.length||(t=(0,g.uiDefaults)(window.locale),n=!0),i=-1!==this.importanceFilterState.indexOf(-1)?c.importanceSwitcherValues.false:c.importanceSwitcherValues.true,(n=n||JSON.stringify(this.importanceFilterState)!==JSON.stringify(i))&&this._bridge.properties.setValue({currencyFilter:t,importanceFilter:i})}var o=i[0],a={minImportance:o,currencyFilter:this.currencyFilterState,to:Date.now()+12096e5};"number"==typeof this._bridge.options.maxHistoryInHours&&(a.historyLimit=a.from=Date.now()-36e5*this._bridge.options.maxHistoryInHours),this._bridge.options.maxItems>0&&(a.maxItems=this._bridge.options.maxItems),this._chartEvents.reset(a),this._minImportance=o}},{key:"_getProperty",value:function(e){return(this._bridge.properties.value()||{})[e]}},{key:"_addUtmInfoToHeader",value:function(){this._bridge.options.utmInfo&&$(".js-embed-widget-head a").prop("search",$.param(this._bridge.options.utmInfo))}},{key:"_createHeaderButtons",value:function(){var e=this,t=function(t){return t===e._bridge.options.widgetType};t("widgetbar")&&$(o.render(this._templates.closestEventButton,{})).appendTo(this._bridge.$headerspace).addClass("apply-common-tooltip").attr("title",window.t("Closest Event")).on("click",(function(t){t.preventDefault(),e._scrollToUpcoming(),e._highlightUpcoming()}));if(!this._bridge.readonly){var i,n,a=void 0;a=t("widgetbar")?this._templates.importanceSwitcher_widgetbar:t("full_page")?this._templates.importanceSwitcher_page:this._templates.importanceSwitcher_widget,t("external_widget")||t("full_page")?(this._importanceSwitcher=this._$header.find(".js-embed-widget-calendar-importance"),this._importanceSwitcher.removeClass("i-hidden")):(this._importanceSwitcher=$(o.render(a,{})),this._importanceSwitcher.appendTo(this._bridge.$headerspace)),this._importanceSwitcher.toggleClass("i-active active",this.importanceFilterState.toString()===c.importanceSwitcherValues.true.toString()).addClass("apply-common-tooltip").attr("title",window.t("Only High Importance")).on("click",(function(){var t=e.importanceFilterState.toString()===c.importanceSwitcherValues.true.toString();e._importanceSwitcher.toggleClass("i-active active",!t),t?e.saveFilter("importanceFilter",c.importanceSwitcherValues.false):e.saveFilter("importanceFilter",c.importanceSwitcherValues.true)})),t("widgetbar")?(n="fixed",i=this._templates.configButton_widgetbar):i=t("full_page")?this._templates.configButton_page:this._templates.configButton_widget,t("external_widget")||t("full_page")?(this._$configButton=this._$header.find(".js-embed-widget-calendar-config"),this._$configButton.removeClass("i-hidden")):(this._$configButton=$(o.render(i,{})),this._$configButton.appendTo(this._bridge.$headerspace)),this._$configButton.addClass("apply-common-tooltip").attr("title",window.t("Filter")).on("click",(function(t){t.preventDefault(),
e._popup?e._closeConfigPopup():e._createConfigPopup(n||"absolute")}))}}},{key:"_createConfigPopup",value:function(e){var t=this;if(!this._popup){var n=this.getAnchorPoint(e),o={left:n.left,top:n.top,onCurrencyFilterChange:this.saveFilter.bind(this,"currencyFilter"),chartEventsInstance:this._chartEvents,positioning:e,state:{currencyFilter:this.currencyFilterState},defaultCurrencyFilterState:this._bridge.options.defaultCurrencyFilterState||(0,g.uiDefaults)(window.locale)};Promise.all([i.e(201),i.e(368),i.e(142),i.e(193),i.e(319)]).then(function(){if(!t._popup){var e=i("AQM8").CalendarConfig;t._popup=new e(o),t._$configButton.addClass("active i-active"),t._$configButton.toggleClass("i-active",!0),$(t._popup.el).on("mousedownoutside",function(e){$(e.target).parents().andSelf().is(this._$configButton)||this._closeConfigPopup()}.bind(t))}}.bind(null,i)).catch(i.oe)}}},{key:"_closeConfigPopup",value:function(){this._popup&&(this._popup.destroy(),this._popup=null,this._$configButton.removeClass("active"),this._$configButton.toggleClass("i-active",!1))}},{key:"saveFilter",value:function(e,t){var i=this;if(Array.isArray(t)){var n=Object.assign({},this._bridge.properties.value());0===t.length?delete n[e]:n[e]=t,this._bridge.properties.setValue(n),setTimeout((function(){return i._onSettingsChanged()}),0)}else v.logError("Wow! {0} state you've tried to set isn't an array for some reason".format(e))}},{key:"getAnchorPoint",value:function(e){var t,i=0,n=this._$configButton.offset();return n.width=this._$configButton.outerWidth(),n.height=this._$configButton.outerHeight(),this._$configButton.parents().each((function(){var e=$(this);n.left-=e.scrollLeft()||0,n.top-=e.scrollTop()||0})),i=n.top+n.height+1,t=n.left+n.width,"fixed"!==e&&(i+=$(document).scrollTop()),{left:t,top:i}}},{key:"initScroll",value:function(){if(!this._scroll){var e=this;this._$data.addClass("tv-reuters-calendar__dcnt--scroll-inited"),this._scroll=new l.SidebarCustomScroll(this._$widget,this._$data,{vAlignBottom:!0,showBottomShadow:!1,bubbleScrollEvent:function(){return!!e._scroll&&(!!e._scroll.atEnd()||e._historyEnd&&e._scroll.atStart())}}),this._initInfiniteScroll()}}},{key:"destroyScroll",value:function(){this._$data.removeClass("tv-reuters-calendar__dcnt--scroll-inited"),this._scroll&&(this._scroll.destroy(),delete this._scroll,this.resize())}},{key:"updateScroll",value:function(){this._scroll&&(this._scroll.updateScrollBar(),this._scroll.atEnd()&&this._scroll.scrollToEnd(),this._scroll.updateScrollBar())}},{key:"_scrollToUpcoming",value:function(){if(!this._scroll)return!1;var e=this._$data.find(".tv-reuters-calendar__item--upcoming").eq(0);if(!e.length)return!1;var t=e.closest(".tv-reuters-calendar__day-content").position().top+e.position().top;return this._scroll.scrollTo(t,{position:"top"}),this._scroll.atStart()&&this._scroll.scrollToEnd(),!0}},{key:"scrollToLastVisibleItem",value:function(){if(this._scroll){var e,t=this._$widget.outerHeight();this._$data.children().each((function(){e||$(this).position().top+$(this).height()>t&&(e=$(this).position().top)
})),this._scroll.animateTo(e-15)}}},{key:"_initInfiniteScroll",value:function(){this._scroll.scrolltostart.subscribe(this,this._onScrollToStart),this._onScrollToStart()}},{key:"_onScrollToStart",value:function(){var e=this;this._scroll&&this.currencyFilterState.length&&(e._historyLoading||e._historyEnd||e._bridge.visible.value()&&this._scroll.atStart()&&(e._historyLoading=!0,e._$data.addClass("tv-reuters-calendar__scnt--loading"),e._chartEvents.requestMore().always((function(t){e._historyLoading=!1,e._$data.removeClass("tv-reuters-calendar__scnt--loading")}))))}},{key:"getScrollElements",value:function(){return{$scrollWrapper:this._$widget,$scrollInner:this._$data}}},{key:"_updateHighlight",value:function(){this._updateHighlightTimeoutId&&(clearTimeout(this._updateHighlightTimeoutId),delete this._updateHighlightTimeoutId);var e,t=this._dateBlocks,i=+new Date;this._$data.find(".tv-reuters-calendar__item--future").removeClass("tv-reuters-calendar__item--future"),this._$data.find(".tv-reuters-calendar__item--upcoming").removeClass("tv-reuters-calendar__item--upcoming");var n=null;e:for(var o=t.length;o--;)for(var a=t[o].items,s=a.length;s--;){var r=(c=a[s]).$element;if(!(c.timestamp>i))break e;e=s,n=t[o],r.addClass("tv-reuters-calendar__item--future")}if(n){var l=n.items[e].timestamp;for(o=e;o<n.items.length;o++){var c;if((c=n.items[o]).timestamp!==l)break;c.$element.addClass("tv-reuters-calendar__item--upcoming")}this._updateHighlightTimeoutId=setTimeout(this._updateHighlight.bind(this),l-i)}}},{key:"_highlightUpcoming",value:function(){this._$data.find(".tv-reuters-calendar__item--upcoming").highlight(4)}},{key:"_markToday",value:function(){var e=new Date,t=this._localDateHash(e),i=new Date;i.setHours(0,0,0,0),i.setDate(i.getDate()+1),this._markTodayTimeoutId&&clearTimeout(this._markTodayTimeoutId),this._markTodayTimeoutId=setTimeout(this._markToday.bind(this),i-e);for(var n=null,o=this._dateBlocks.length;o-- >0;)if(this._dateBlocks[o].localDateHash===t){n=this._dateBlocks[o].$element;break}var a=this._$data.find(".tv-reuters-calendar__date-block--today");1===a.size()&&a.is(n)||(a.removeClass("tv-reuters-calendar__date-block--today"),n&&n.addClass("tv-reuters-calendar__date-block--today"))}},{key:"resize",value:function(){var e,t=this._bridge.options.layout;if((e="wide"===t||"narrow"!==t&&this._bridge.width.value()>500)!==this._$container.hasClass("tv-reuters-calendar--wide-layout")){var i=this._topmostVisibleItem();this._$container.toggleClass("tv-reuters-calendar--wide-layout",e),this._scroll&&i&&(this._scroll.resize(),this._scroll.scrollTo(i.$element.position().top+i.offsetDelta,{position:"top"}))}if(this._scroll){var n=Math.max(0,this._bridge.height.value()-this._$header.outerHeight());this._$widget.height(n),this._scroll.resize()}else this._$widget.attr("style","")}},{key:"setLayout",value:function(e){this._bridge.options.layout!==e&&(this._bridge.options.layout=e,this.resize())}},{key:"_addNoContentStub",value:function(){this._$noContentStub||(this._$noContentStub=$(this._templates.noContent))
;var e=window.t("There are no events in the next 7 days");this.currencyFilterState.length||(e=window.t("No country has been selected. Please select at least 1 country to view the events")),this._$noContentStub.text(e).insertBefore(this._$data),this._scroll&&this._scroll.updateScroll()}},{key:"_updateLayout",value:function(e){e.noResults&&(this._historyEnd=!0),this._chartEvents.items().length?$(this._$noContentStub).detach():this._addNoContentStub();var t=e.added||[],i=e.changed||[];(t.length||i.length)&&(this._scroll&&this._scroll.save(),this._$data.css("display","none"),this._createItems(t),this._changeItems(i),this._updateHighlight(),this._markToday(),this._$data.css("display","block"),this._scroll&&(this._scroll.restore(),this._scroll.atEnd()&&this._scroll.scrollToEnd()),this.onLayoutUpdated.fire()),this._scroll&&this._onScrollToStart(!0)}},{key:"_topmostVisibleItem",value:function(){if(!this._scroll)return null;var e=-this._scroll.currentPosition(),t=this._dateBlocks;if(!t.length)return null;var i=null;if(1===t.length)i=t[0];else if(e>=t[t.length-1].$element.position().top)i=t[t.length-1];else if(e<=0)i=t[0];else{for(var n=0,o=t.length-1;o-n>1;)e>=t[r=n+o>>1].$element.position().top?n=r:o=r;i=t[n]}var a=i.items,s=a[n=0].$element.position().top;if(e>s){var r;for(o=a.length-1;o-n>1;){var l=a[r=n+o>>1].$element.position().top;e>=l?(s=l,n=r):o=r}}return{$element:a[n].$element,offsetDelta:e-s}}},{key:"_createDateBlock",value:function(e,t,i){var n=this,a=$(o.render(this._templates.dateBlock,{dateBlocks:[{localDateHash:e,collapsed:this._collapsedDateBlocksDict[e],localDateStr:t}]},this._templates)),s={localDateHash:e,items:[],$element:a,$contents:a.find(".js-expand__body.js-calendar-day")};a.tvExpand().tvExpand("setOpened",!this._collapsedDateBlocksDict[e]).on("beforeOpen",(function(){n._collapsedDateBlocksDict[e]=!0})).on("afterOpen",(function(){n.updateScroll()})).on("afterClose",(function(){delete n._collapsedDateBlocksDict[e],n.updateScroll()}));var r=this._dateBlocks,l=r[i];return l?(r.splice(i,0,s),a.insertBefore(l.$element)):(r.push(s),a.appendTo(this._$data)),s}},{key:"_localDateHash",value:function(e){return e.getFullYear()+"-"+("0"+(e.getMonth()+1)).slice(-2)+"-"+("0"+e.getDate()).slice(-2)}},{key:"_createItems",value:function(e){var t=this;if(e.length){var i,n={},a={},s=this._dateBlocks.map((function(e){return e.localDateHash})),r=this._dateBlocks[0]?this._dateBlocks[0].items[0]:void 0,l=this._dateBlocks[this._dateBlocks.length-1],c=l?l.items[l.items.length-1]:void 0;if(!r||e[0].timestamp>=c.timestamp)i="future";else{if(!(e[e.length-1].timestamp<=r.timestamp))return void v.logError("Don't know where to put events");i="past"}for(var d=e.length-1;d>=0;d--){var h=e[d];if(h.indicator=window.t(h.indicator),this._addDataToItem(h),-1!==s.indexOf(h.localDateHash)){var u=n[h.localDateHash];u?u.items.push(h):n[h.localDateHash]={items:[h]}}else a[h.localDateHash]?a[h.localDateHash].items.push(h):a[h.localDateHash]={localDateHash:h.localDateHash,localDateStr:h.localDateStr,items:[h]}}Object.keys(n).forEach((function(e){
var a=s.indexOf(e),r=$(o.render(t._templates.items,{items:n[e].items},t._templates));"past"===i?r.prependTo(t._dateBlocks[a].$contents):r.appendTo(t._dateBlocks[a].$contents),n[e].items=n[e].items.map((function(e){return t._prependItemToStorage(e,t._dateBlocks[a].$contents)})),t._dateBlocks[a].items="past"===i?n[e].items.concat(t._dateBlocks[a].items):t._dateBlocks[a].items.concat(n[e].items)}));var p=[];Object.keys(a).sort().forEach((function(e){p.push(a[e])}));var g=$(o.render(this._templates.dateBlock,{dateBlocks:p},this._templates));"past"===i?g.prependTo(this._$data):g.appendTo(this._$data),p.forEach((function(e){e.$element=t._$data.find('[data-hash="'+e.localDateHash+'"]'),e.$contents=e.$element.find(".js-expand__body.js-calendar-day"),e.$element.tvExpand().tvExpand("setOpened",!t._collapsedDateBlocksDict[e.localDateHash]).on("beforeOpen",(function(){t._collapsedDateBlocksDict[e.localDateHash]=!0})).on("afterOpen",(function(){t.updateScroll()})).on("afterClose",(function(){delete t._collapsedDateBlocksDict[e.localDateHash],t.updateScroll()})),e.items=e.items.map((function(i){return t._prependItemToStorage(i,e.$contents)}))})),this._dateBlocks="past"===i?p.concat(this._dateBlocks):this._dateBlocks.concat(p)}}},{key:"_prependItemToStorage",value:function(e,t){var i=this;return e.$element=t.find('[data-item-id="'+this._prepareItemId(e)+'"]'),e.comment&&e.$element.tvExpand().on("beforeOpen",(function(){e.$element.addClass("tv-reuters-calendar__item--expanded"),setTimeout((function(){i._scroll&&i._scroll.animateTo(e.$element.position().top+e.$element.parent().position().top-4)}),20)})).on("afterOpen",(function(){return i.updateScroll()})).on("afterClose",(function(){e.$element.removeClass("tv-reuters-calendar__item--expanded"),i.updateScroll()})),{timestamp:e.timestamp,id:e.id,$element:e.$element}}},{key:"_addDataToItem",value:function(e){e.formattedActual=b(e.actual,e.scale,e.unit,e.currency),e.formattedForecast=b(e.forecast,e.scale,e.unit,e.currency),e.formattedPrevious=b(e.previous,e.scale,e.unit,e.currency);var t=new Date(e.timestamp),i="";if(t.getTimezoneOffset){var n=-t.getTimezoneOffset()/60;i="UTC",i+=n<0?n:"+"+n}e.localTimeStr=("0"+t.getHours()).slice(-2)+":"+("0"+t.getMinutes()).slice(-2),e.localDateStr=window.t(this.months[t.getMonth()])+" "+t.getDate();var o=t.getFullYear(),a=e.localDateStr+", "+o;e.fullLocalDateTimeStr=a+" "+e.localTimeStr+" "+i,o!==this._refDate.getFullYear()&&(e.localDateStr=a),e.localDateHash=this._localDateHash(t);var s="";e.importance>0?s="tv-reuters-calendar__importance-indicator--high":0===e.importance&&(s="tv-reuters-calendar__importance-indicator--normal"),e.importanceModifier=s,e.flagSrc=(0,u.flagUrl)(e.country&&e.country.toLowerCase())}},{key:"_prepareItemId",value:function(e){return e.id.replace(/\n|\u21b5/g,"")}},{key:"_changeItems",value:function(e){var t=this;e.forEach((function(e){t._addDataToItem(e);var i=t._$data.find('[data-item-id="'+t._prepareItemId(e)+'"]');i.toggleClass("tv-reuters-calendar__item--expandable",!!e.comment),
i.html(o.render(t._templates.itemContent,e)),i.tvExpand("delegateEvents")}))}},{key:"_createTemplates",value:function(){var e=$("<a>").html(_);e.find("svg").attr("class","tv-reuters-calendar__drop-arrow");var t=e.html();return{calendarContent:'<div class="tv-reuters-calendar__header js-calendar-header"><span class="tv-reuters-calendar__header-column tv-reuters-calendar__header-column--time js-calendar-header-time">'+window.t("Time")+'</span><span class="tv-reuters-calendar__header-column tv-reuters-calendar__header-column--icons">{{#showHeaderIcons}}<span class="apply-common-tooltip tv-reuters-calendar__header-icon tv-reuters-calendar__importance-button js-embed-widget-calendar-importance i-hidden">'+w+'</span><span class="tv-reuters-calendar__header-icon tv-reuters-calendar__config-button js-embed-widget-calendar-config i-hidden">'+m+"</span>{{/showHeaderIcons}}{{#showGetWidgetBtn}}"+(0,p.getWidgetButtonHTML)("economic-calendar","tv-reuters-calendar__header-icon tv-reuters-calendar__get-widget-button")+'{{/showGetWidgetBtn}}</span><span class="tv-reuters-calendar__header-column-group tv-reuters-calendar__header-column-group"><span class="tv-reuters-calendar__header-column tv-reuters-calendar__header-column--actual">'+window.t("Actual")+'</span><span class="tv-reuters-calendar__header-column tv-reuters-calendar__header-column--forecast">'+window.t("Forecast")+'</span><span class="tv-reuters-calendar__header-column tv-reuters-calendar__header-column--prior">'+window.t("Prior")+'</span></span></div><div class="tv-reuters-calendar__scnt js-calendar-widget"><div class="tv-reuters-calendar__dcnt js-calendar-data"></div></div>',closestEventButton:'<a class="button widgetbar-icon-button">'+f+"</a>",configButton_widgetbar:'<a class="button widgetbar-icon-button">'+m+"</a>",configButton_widget:'<div class="tv-feed-widget__control-icon tv-feed-widget__control-icon--calendar-config">'+m+"</div>",configButton_page:'<div class="tv-feed-widget__calendar-filter-icon">'+m+"</div>",importanceSwitcher_widgetbar:'<a class="button widgetbar-icon-button">'+w+"</a>",importanceSwitcher_widget:'<div class="tv-feed-widget__control-icon tv-feed-widget__control-icon--importance-switcher">'+w+"</div>",importanceSwitcher_page:'<div class="tv-feed-widget__importance-switcher-icon">'+w+"</div>",dateBlock:'{{#dateBlocks}}<div data-hash="{{ localDateHash }}" class="tv-reuters-calendar__date-block{{#collapsed}} i-hidden{{/collapsed}}"><div data-type="day" class="tv-reuters-calendar__day js-expand__title">{{ localDateStr }}</div><div class="tv-reuters-calendar__day-content js-expand__body js-calendar-day">{{>items}}</div></div>{{/dateBlocks}}',items:'{{#items}}<div class="tv-reuters-calendar__item{{#comment}} tv-reuters-calendar__item--expandable{{/comment}}"{{#id}} data-item-id="{{ id }}{{/id}}">{{>itemContent}}</div>{{/items}}',
itemContent:'<div class="tv-reuters-calendar__heading-block {{#comment}}tv-reuters-calendar__heading-block--expandable js-expand__title{{/comment}}" data-type="event"><div class="tv-reuters-calendar__time-block"><span class="tv-reuters-calendar__time"><span class="tv-reuters-calendar__timebadge apply-common-tooltip" title="{{ fullLocalDateTimeStr }}">{{ localTimeStr }}</span></span><img class="tv-reuters-calendar__flag" src="{{flagSrc}}">'+(this._bridge.options.hideImportanceIndicator?"":'<span class="tv-reuters-calendar__importance-indicator {{&importanceModifier}}"></span>')+'</div><span class="tv-reuters-calendar__value-group {{^actual}}tv-reuters-calendar__value-group--no-actual{{/actual}}"><span class="tv-reuters-calendar__value tv-reuters-calendar__value--actual">{{ formattedActual }}</span><span class="tv-reuters-calendar__value">{{ formattedForecast }}</span><span class="tv-reuters-calendar__value">{{ formattedPrevious }}</span></span><div class="tv-reuters-calendar__heading"><span class="tv-reuters-calendar__heading-title apply-common-tooltip" title="{{ indicator }}">{{ indicator }}</span>{{#comment}}'+t+'{{/comment}}</div></div>{{#comment}}<div class="tv-reuters-calendar__comment js-expand__body js-calendar-comment i-hidden">{{ comment }}</div>{{/comment}}',noContent:'<div class="tv-widget-empty-message"></div>'}}},{key:"importanceFilterState",get:function(){return[].concat(this._getProperty("importanceFilter")||[])}},{key:"currencyFilterState",get:function(){return[].concat(this._getProperty("currencyFilter")||[])}},{key:"months",get:function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]}}]),e}();t.default=y,e.exports=t.default}).call(this,i("aIyQ"),i("nbsC"))},g996:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100px" height="100px"><path d="M50.008 0C29.768 0 9.526.342 7.144 1.03.544 2.93.4 3.64.066 35.444-.097 50.977.04 65.6.374 67.94c.808 5.67 3.695 8.535 9.47 9.398 6.977 1.044 7.848 2.302 7.848 11.355 0 4.23.436 8.537.97 9.57 1.826 3.543 4.7 2.06 15.778-8.146 5.987-5.515 11.518-10.438 12.29-10.938.772-.5 11.54-1.13 23.93-1.398 25.646-.554 26.73-.85 28.54-7.83.665-2.57.923-14.208.738-33.35-.32-33.097-.434-33.663-7.068-35.575C90.488.34 70.248 0 50.008 0zM15.002 20.608h69.94v10.37h-69.94V20.61zm0 25.927h69.94v10.37h-69.94v-10.37z"/><path fill="none" d="M64.358-.26h52.402v6.945H64.358z"/></svg>'},hpIU:function(e,t,i){"use strict";i.r(t);var n=i("mrSG"),o=i("txPx"),a=i("IWXC"),s=i("hOqT"),r=i("hY0g"),l=i.n(r),c=i("ku9n"),d=i("vGOY"),h=null;var u=i("YXQd");i.d(t,"Widget",(function(){return g}));var p=Object(o.getLogger)("Platform.GUI.Widgetbar.DetailsWidget"),g=function(e){function t(t){var i=e.call(this,t)||this;return i._quoteSessionScreenerMultiplexer=null,i._mounted=!1,i._headerRenderer=null,i._contentRenderer=null,i._updateHeader=function(){i._headerRenderer&&i._headerRenderer()},i._updateContent=function(){i._contentRenderer&&i._contentRenderer()},i._unsubscribe=function(e){var t
;e&&(null===(t=i._quoteSessionScreenerMultiplexer)||void 0===t||t.unsubscribe(i._bridge.id,i._symbol))},i._subscribe=function(e){var t;i._unsubscribe(i._symbol),i._symbol=e,i._headerProps.setValue({symbolName:i._symbol}),i._contentProps.setValue({source:"RightToolbar",symbol:i._symbol,widgetWidth:i._bridge.width.value()}),e&&(null===(t=i._quoteSessionScreenerMultiplexer)||void 0===t||t.subscribe(i._bridge.id,i._symbol,i._handleQuoteSessionScreenerUpdate.bind(i)))},i._handleOnConnect=function(){i._subscribe(i._symbol)},i._handleWidgetWidthUpdate=function(e){i._contentProps.setValue(Object(n.a)(Object(n.a)({},i._contentProps.value()),{widgetWidth:e}))},i._bridge=t,i._quoteSessionMultiplexer=Object(a.getQuoteSessionInstance)("full"),i._quoteSessionScreenerMultiplexer=new d.a(i._quoteSessionMultiplexer),i._symbol=t.symbol.value(),i._headerProps=new l.a({symbolName:i._symbol}),i._contentProps=new l.a({source:"RightToolbar",symbol:i._symbol,widgetWidth:i._bridge.width.value()}),i.mount(),i}return Object(n.c)(t,e),t.prototype.mount=function(){this._mounted?p.logWarn("Mount was called on already mounted widget"):(this._mounted=!0,this._bridge.symbol.subscribe(this._subscribe,{callWithLast:!0}),this._bridge.width.subscribe(this._handleWidgetWidthUpdate),this._headerProps.subscribe(this._updateHeader),this._contentProps.subscribe(this._updateContent),this._quoteSessionMultiplexer.onConnect.subscribe(this,this._handleOnConnect),this._subscribe(this._symbol),this._load())},t.prototype.unmount=function(){this._mounted?(this._mounted=!1,this._bridge.symbol.unsubscribe(this._subscribe),this._bridge.width.unsubscribe(this._handleWidgetWidthUpdate),this._headerProps.unsubscribe(this._updateHeader),this._contentProps.unsubscribe(this._updateContent),this._quoteSessionMultiplexer.onConnect.unsubscribe(this,this._handleOnConnect),e.prototype.unmount.call(this),this._loadModulePromise=null):p.logWarn("Unmount was called on already unmounted widget")},t.prototype._load=function(){var e=this;if(this._headerRenderer&&this._contentRenderer)return this._headerRenderer(),void this._contentRenderer();var t=this._loadModulePromise=Promise.all([Promise.all([i.e("vendors_embed"),i.e(2),i.e(4),i.e(11),i.e(28),i.e(49),i.e(56),i.e(204),i.e(208),i.e(227),i.e(10),i.e(24),i.e(39),i.e(40),i.e(42),i.e(47),i.e(50),i.e(48),i.e(54),i.e(59),i.e(96),i.e(163),i.e(182),i.e(218),i.e("symbol-details")]).then(i.bind(null,"mF3H")),Promise.all([i.e("vendors_embed"),i.e(2),i.e(4),i.e(11),i.e(28),i.e(49),i.e(56),i.e(204),i.e(208),i.e(227),i.e(10),i.e(24),i.e(39),i.e(40),i.e(42),i.e(47),i.e(50),i.e(48),i.e(54),i.e(59),i.e(96),i.e(163),i.e(182),i.e(218),i.e("symbol-details")]).then(i.bind(null,"TuZa")),Promise.resolve().then(i.t.bind(null,"q1tI",7)),Promise.resolve().then(i.t.bind(null,"i8i4",7))]).then((function(i){var o=i[0],a=i[1],s=i[2],r=i[3];t===e._loadModulePromise&&(e._headerRenderer=function(){r.render(s.createElement(o.DetailsHeader,Object(n.a)({},e._headerProps.value())),e._headerContainer)},e._contentRenderer=function(){
r.render(s.createElement(a.Details,Object(n.a)({},e._contentProps.value())),e._container)},e._headerRenderer(),e._contentRenderer())}))},t.prototype._handleQuoteSessionScreenerUpdate=function(e){if(this._symbol===e.symbolname){var t=Object(u.c)(this._symbol,e),o=t.header,a=t.body,s=Object(u.d)(e),r=s.symbolname,l=s.description,c=s.listedExchange,d=s.type,p=s.pricescale,g=s.typespecs;a.showTechnicalsDialog=r&&l&&c&&d?function(){return function(e,t,n,o,a,s){return Promise.all([i.e("vendors_embed"),i.e(2),i.e(3),i.e(5),i.e(9),i.e(43),i.e(85),i.e(122),i.e(204),i.e(338),i.e(8),i.e(79),i.e(96),i.e(163),i.e("technicals-dialog")]).then(i.bind(null,"ZUkS")).then((function(i){var r=new(0,i.TechnicalsDialogRenderer)(e,t,n,o,a,s);return null!==h&&h.hide(),r.show(),h=r,r}))}(r,l,c,d,g,p)}:void 0,this._setHeaderProps(Object(n.a)(Object(n.a)({},o),{complete:Boolean(e.complete)})),this._setProps(Object(n.a)(Object(n.a)({},a),{complete:Boolean(e.complete&&e.completeScreener)}))}},t.prototype._handleQuoteSessionUpdate=function(e){if(this._symbol===e.symbolname){var t=e.values,i=t.average_volume,n=t.last_price,o=t.open_price,a=t.low_price,r=t.high_price,l=t.ask,c=t.bid,d=t.pricescale,h=t.volume,u=t.short_name,p=t.minmov,g=t.minmove2,v=t.fractional,m=t.change,f=t.change_percent,_=t.current_session,w=t.exchange,b=t.pro_name,y=t.type,C=t.sector,S=t.industry;this._setProps({averageVolume:i,lastPrice:n,openPrice:o,lowPrice:a,highPrice:r,ask:l,bid:c,pricescale:d,volume:h,shortName:u,minMovePrimary:p,minMoveSecondary:g,fractional:v,change:m,changePercent:f,currentSession:_,exchange:w,proName:b,type:y,sector:C,industry:S,invalid:"ok"!==e.status,symbolDescription:Object(s.getTranslatedSymbolDescription)(e.values)})}},t.prototype._setHeaderProps=function(e){this._headerProps.setValue(Object(n.a)(Object(n.a)({},this._headerProps.value()),e))},t.prototype._setProps=function(e){this._contentProps.setValue(Object(n.a)(Object(n.a)({},this._contentProps.value()),e))},t}(c.a)},ioEH:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 15" width="16px" height="15px"><path fill-rule="evenodd" d="M1.6 0C.72 0 .008.675.008 1.5L0 15l3.2-3h11.2c.88 0 1.6-.675 1.6-1.5v-9c0-.825-.72-1.5-1.6-1.5H1.6zm4.823 6.36L8.73 8.37c.38.332 1.004.265 1.286-.138l2.856-4.082c.245-.35.128-.814-.26-1.035-.39-.22-.905-.115-1.15.235L9.15 6.648 6.907 4.693c-.362-.315-.95-.272-1.25.09l-2.492 3.02c-.275.332-.198.802.17 1.05.37.246.892.177 1.167-.156l1.92-2.338z"/></svg>'},jEqg:function(e,t,i){"use strict";i.r(t),i.d(t,"dottedDescriptionTruncate",(function(){return o}));var n=new Set([".","۔","܁","܂","…","、","。",".",",",":",";","-","ー"," ","(",")"]);function o(e,t){if(t<=0)return e;var i=e.length;if(i<=t)return e;if(i>t){var o=e[t],s=e[t-1];if(n.has(o)&&!n.has(s))return a(e,t)}for(var r=null,l=t-1;l>0;l--){var c=e[l];if(n.has(c))r=l;else if(null!==r)return a(e,r)}return e+"…"}function a(e,t){return e.slice(0,t)+"…"}},jJ9P:function(e,t){
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17 17"><g stroke="#cdbd28" stroke-linecap="round" stroke-width="0"><path d="M0 13h2v2H0zM3 13h13v2H3zM0 9h2v2H0zM3 5h13v2H3zM0 4.998h2v2H0zM3 9h13v2H3zM0 1h2v2H0zM3 1h13v2H3z"/></g></svg>'},jkvV:function(e,t,i){"use strict";i.r(t);i("YFKU");var n=i("q1tI"),o=i("TSYQ"),a=i("XAms"),s=i("Wz44"),r="http://www.w3.org/2000/svg";function l(e){var t=e.direction,i=e.theme,l=void 0===i?s:i;return n.createElement("svg",{xmlns:r,width:"9",height:"27",viewBox:"0 0 9 27",className:o(l.container,"right"===t?l.mirror:null),onContextMenu:a.a},n.createElement("g",{fill:"none",fillRule:"evenodd"},n.createElement("path",{className:l.background,d:"M4.5.5a4 4 0 0 1 4 4v18a4 4 0 1 1-8 0v-18a4 4 0 0 1 4-4z"}),n.createElement("path",{className:l.arrow,d:"M5.5 10l-2 3.5 2 3.5"})))}i.d(t,"Hider",(function(){return h}));var c=window.t("Hide Tab"),d=window.t("Open Tab");function h(e){var t=o(e.className,"apply-common-tooltip","common-tooltip-vertical","common-tooltip-otl");return n.createElement("div",{className:t,onClick:e.onClick,title:e.isMinimized?d:c},n.createElement(l,{direction:e.isMinimized?"left":"right"}))}},kGUJ:function(e,t,i){"use strict";i.r(t);var n=i("mrSG"),o=i("q1tI"),a=i("i8i4"),s=i("0UyP"),r=i("ku9n"),l=i("CYdy"),c=i("34Bw"),d=i("4Hmh"),h=i("R1a7"),u=i("hY0g"),p=i.n(u),g=function(){function e(){var e,t=this;this._count=new p.a(0),this._filterer=l.a.getInstance(),this._prevCount=0,this._updateCountWithPushStream=function(e){e.locale===window.locale&&(e.state===c.j.Live?(++t._prevCount,t._setCounter()):e.state===c.j.Ended&&(--t._prevCount,t._setCounter()))},this._setCounter=function(){null!==t._filterer&&null!==t._filterer.getFiltersState().live&&null!==t._filterer.getFiltersState().notificationLive&&t._filterer.getFiltersState().notificationLive?t._count.setValue(t._prevCount):t._count.setValue(0)},this._onLoadListLiveStreams(),null===(e=this._filterer)||void 0===e||e.subscribe(this._setCounter),Object(h.a)().then((function(e){e.globalStreamsChange().subscribe(null,t._updateCountWithPushStream)}))}return e.prototype.getCount=function(){return this._count},e.prototype.destroy=function(){var e,t=this;null===(e=this._filterer)||void 0===e||e.unsubscribe(this._setCounter),Object(h.a)().then((function(e){e.globalStreamsChange().unsubscribe(null,t._updateCountWithPushStream)})),this._filterer=null},e.prototype._onLoadListLiveStreams=function(){var e=this;i.e("gql-request").then(i.bind(null,"3Acn")).then((function(t){(new t.GqlRequest).getListLiveStreamUrl(window.locale).then((function(t){return null!==t&&e._notifications(t)}))}))},e.prototype._notifications=function(e){this._prevCount=e.streams.length,this._setCounter()},e}();i.d(t,"StreamsWidgetRenderer",(function(){return v}));var v=function(e){function t(t){var i=e.call(this,t)||this;return i._streamNotificationService=new g,i._streams=null,i._mounted=!1,i._headerRenderer=null,i._contentRenderer=null,i._updateHeader=function(){i._headerRenderer&&i._headerRenderer()},i._updateContent=function(){
i._contentRenderer&&i._contentRenderer()},i._updateStateStreamStorage=function(e){i._mounted||e.state===c.j.Scheduled||(i._streams=d.a.getInstance("widget"),i._streams.isFilled=!1)},i._sendSnowPlowAnalytics=function(){Object(s.getTracker)().then((function(e){null!==e&&e.trackStreamsActions(window.locale,"settingsStreamWidget",null)}))},i._setCounter=function(){i._bridge.clearNotifications(),i._bridge.notify(null,{notificationValue:i._streamNotificationService.getCount().value(),force:!0})},i._bridge=t,i._filterer=l.a.getInstance(),i._streamNotificationService.getCount().subscribe(i._setCounter),Object(h.a)().then((function(e){e.globalStreamsChange().subscribe(null,i._updateStateStreamStorage)})),i}return Object(n.c)(t,e),t.prototype.mount=function(){this._mounted||(this._mounted=!0,this._filterer.subscribe(this._updateHeader),this._filterer.subscribe(this._updateContent),this._filterer.subscribe(this._sendSnowPlowAnalytics),this._load(),Object(s.getTracker)().then((function(e){null!==e&&e.trackStreamsActions(window.locale,"openStreamWidget",null)})))},t.prototype.unmount=function(){this._mounted&&(this._mounted=!1,this._filterer.unsubscribe(this._updateHeader),this._filterer.unsubscribe(this._updateContent),this._filterer.unsubscribe(this._sendSnowPlowAnalytics),e.prototype.unmount.call(this),this._loadModulePromise=null)},t.prototype.destroy=function(){this._streamNotificationService.getCount().unsubscribe(this._setCounter),this._streamNotificationService.destroy(),e.prototype.destroy.call(this)},t.prototype._load=function(){var e=this;if(this._headerRenderer&&this._contentRenderer)return this._headerRenderer(),void this._contentRenderer();var t=this._loadModulePromise=Promise.all([Promise.all([i.e(1),i.e(29),i.e(49),i.e(63),i.e(214),i.e(287),i.e(341),i.e(48),i.e(254),i.e(255),i.e("streams-widget")]).then(i.bind(null,"EW6+")),Promise.all([i.e(1),i.e(29),i.e(49),i.e(63),i.e(214),i.e(287),i.e(341),i.e(48),i.e(254),i.e(255),i.e("streams-widget")]).then(i.bind(null,"moSK"))]).then((function(i){var s=i[0],r=i[1];t===e._loadModulePromise&&(e._headerRenderer=function(){a.render(o.createElement(r.StreamHeader,Object(n.a)({},{filtersState:e._filterer.getFiltersState(),settingsCallbacks:{onLiveClick:function(){return e._filterer.toggleFilter("live")},onRecentClick:function(){return e._filterer.toggleFilter("recent")},onNotificationLiveClick:function(){return e._filterer.toggleFilter("notificationLive")}}})),e._headerContainer)},e._contentRenderer=function(){a.render(o.createElement(s.WrapperStreamList,null),e._container)},e._headerRenderer(),e._contentRenderer())}))},t}(r.a)},kTIc:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 15" width="18" height="15"><g fill="none" stroke="currentColor"><path d="M12.5 2.5l5 5-5 5M10.5.5l-3 14M5.5 2.5l-5 5 5 5"/></g></svg>'},ku9n:function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));var n=function(){function e(e){this.hasLifecycle=!0,this._loadModulePromise=null;var t=e.container,i=e.header,n=e.id;this._container=t,this._headerContainer=i,
this._widgetId=n}return e.prototype.unmount=function(){var e=i.c.i8i4;if(e){var t=e.exports;t.unmountComponentAtNode(this._container),t.unmountComponentAtNode(this._headerContainer)}},e.prototype.destroy=function(){this._loadModulePromise=null,this.unmount()},e}()},"m2+w":function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i("VVxS"),o=i("Kxc7"),a=["short_name","last_price","change","change_percent"],s=["short_name","last_price","change_percent"],r=function(){function e(){}return e.prototype.get=function(){if(o.enabled("widget"))return s;var e=n.TVLocalStorage.getItem("widget.watchlist.view-state");return this._parse(e)||a},e.prototype.set=function(e){o.enabled("widget")||(null===e?n.TVLocalStorage.removeItem("widget.watchlist.view-state"):n.TVLocalStorage.setItem("widget.watchlist.view-state",JSON.stringify(this._normalize(e))))},e.prototype._parse=function(e){if(null===e)return null;try{var t=JSON.parse(e);return Array.isArray(t)?this._normalize(t):null}catch(i){return null}},e.prototype._normalize=function(e){var t=e.filter((function(e){return"string"==typeof e})),i=new Set(t),n=new Set(["short_name","volume","last_price","change","change_percent","rchp"]);return Array.from(i).filter((function(e){return n.has(e)}))},e}()},n2KA:function(e,t,i){"use strict";i.r(t),i.d(t,"BadgeAccount",(function(){return d})),i.d(t,"renderBadgeAccount",(function(){return h}));var n=i("mrSG"),o=i("q1tI"),a=i("i8i4"),s=i("o9lb"),r=i("VZBT"),l=i("LsFU"),c=i("bbtx");function d(e){var t=e.name,i=e.href,a=Object(n.e)(e,["name","href"]);return Object(l.isBadgeUser)(t)?o.createElement(s.a,Object(n.a)({name:t,href:i},a)):Object(c.isBadgeBroker)(t)?o.createElement(r.a,Object(n.a)({name:t,href:i},a)):null}function h(e,t){a.render(o.createElement(d,Object(n.a)({},t)),e)}},nVo0:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22" width="22" height="22"><path d="M6.5 1C5.67 1 5 1.67 5 2.5v1C5 4.33 5.67 5 6.5 5S8 4.33 8 3.5v-1C8 1.67 7.33 1 6.5 1zm8 0c-.83 0-1.5.67-1.5 1.5v1c0 .83.67 1.5 1.5 1.5S16 4.33 16 3.5v-1c0-.83-.67-1.5-1.5-1.5zM1 4v16h19V4h-3.05c-.238 1.164-1.262 2-2.45 2-1.186-.002-2.208-.838-2.445-2H8.95C8.71 5.164 7.687 6 6.5 6c-1.186-.002-2.208-.838-2.445-2H1zm20 2v15H3v1h19V6h-1zM2 8h17v11H2V8zm3 1v3h3V9H5zm4 0v3h3V9H9zm4 0v3h3V9h-3zm-8 4v3h3v-3H5zm4 0v3h3v-3H9zm4 0v3h3v-3h-3z"/></svg>'},o0rh:function(e,t,i){"use strict";i.r(t),i.d(t,"AlertsManageWidget",(function(){return o}));var n=i("mrSG"),o=function(e){function t(t){var i=e.call(this,t)||this;return i._props=t,i.mount(),i}return Object(n.c)(t,e),t.prototype.mount=function(){var e=this,t=Promise.all([i.e(1),i.e(29),i.e(49),i.e(63),i.e(212),i.e(261),i.e(274),i.e(322),i.e(41),i.e(48),i.e(60),i.e(80),i.e(134),i.e(223),i.e(225),i.e("alerts-manage-widget-impl")]).then(i.bind(null,"CvwY")).then((function(i){e._loadModulePromise===t&&(e._impl=new i.AlertsManageWidgetImpl(e._props))}));this._loadModulePromise=t},t.prototype.unmount=function(){var t;this._loadModulePromise=null,null===(t=this._impl)||void 0===t||t.destroy(),delete this._impl,
e.prototype.unmount.call(this)},t}(i("ku9n").a)},ohw9:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="45" height="45"><path fill="currentcolor" d="m29.5 10a4.5 4.5 0 0 1 4.5 4.5v15a4.5 4.5 0 0 1-4.5 4.5h-15a4.5 4.5 0 0 1-4.5-4.5v-15a4.5 4.5 0 0 1 4.5-4.5m0 1a3.5 3.5 0 0 0-3.5 3.5v15a3.5 3.5 0 0 0 3.5 3.5h15a3.5 3.5 0 0 0 3.5-3.5v-15a3.5 3.5 0 0 0-3.5-3.5M16 8h1v5h-1m11-5h1v5h-1M16 27a1 1 0 0 0 0 4 1 1 0 0 0 0-4m0 1a1 1 0 0 1 0 2 1 1 0 0 1 0-2m6-1a1 1 0 0 0 0 4 1 1 0 0 0 0-4m0 1a1 1 0 0 1 0 2 1 1 0 0 1 0-2m-6-7a1 1 0 0 0 0 4 1 1 0 0 0 0-4m0 1a1 1 0 0 1 0 2 1 1 0 0 1 0-2m6-1a1 1 0 0 0 0 4 1 1 0 0 0 0-4m0 1a1 1 0 0 1 0 2 1 1 0 0 1 0-2m6-1a1 1 0 0 0 0 4 1 1 0 0 0 0-4m0 1a1 1 0 0 1 0 2 1 1 0 0 1 0-2m-12-7a1 1 0 0 0 0 4 1 1 0 0 0 0-4m0 1a1 1 0 0 1 0 2 1 1 0 0 1 0-2m6-1a1 1 0 0 0 0 4 1 1 0 0 0 0-4m0 1a1 1 0 0 1 0 2 1 1 0 0 1 0-2m6-1a1 1 0 0 0 0 4 1 1 0 0 0 0-4m0 1a1 1 0 0 1 0 2 1 1 0 0 1 0-2"/></svg>'},oiRj:function(e,t,i){"use strict";i.r(t),i.d(t,"publishChart",(function(){return d})),i.d(t,"publishChartWidget",(function(){return h})),i.d(t,"setPublishChartOptions",(function(){return u}));var n,o=i("mrSG"),a=(i("P5fv"),i("Z9Tc")),s=i("DIB2"),r=i("Vdly"),l=0;function c(){clearTimeout(l),$(".publish-chart-button").removeClass("process")}function d(e,t){var d=Object(o.a)(Object(o.a)({},e),n);return new Promise((function(e){window.runOrSignIn((function(){var n;0!==(n=$(".publish-chart-button")).length&&(n.addClass("process"),l=setTimeout(c,3e4)),Object(a.whenVerified)({showDialog:!0,source:"Publish chart",silentPhoneVerification:null==d?void 0:d.silentPhoneVerification}).done((function(){e(function(e,t){return new Promise((function(n){!0!==t&&r.getBool("publish.showIntroText",!0)?Promise.all([i.e("vendors_embed"),i.e(1),i.e(2),i.e(3),i.e(5),i.e(9),i.e(20),i.e(27),i.e(38),i.e(293),i.e(0),i.e(8),i.e(247),i.e("publish-intro-dialog")]).then(function(t){(0,i("1ePh").createPublishIntroDialog)({type:s.a.Idea}).then((function(t){r.setValue("publish.showIntroText",!t),window.saver.publishChart(e).then(n)})).catch((function(){}))}.bind(null,i)).catch(void 0):window.saver.publishChart(e).then(n)}))}(d,t))})).fail((function(e){return(null==d?void 0:d.onPublishError)&&d.onPublishError(e)})).always(c)}),{source:"Publish chart",sourceMeta:"Chart"})}))}function h(e){d(e,!0)}function u(e){n=e}},pM3Z:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 14" width="15px" height="14px"><path d="M1.25 0C.562 0 .006.573.006 1.273L0 14l2.5-3h11.25c.688 0 1.25-.573 1.25-1.273V1.273C15 .573 14.437 0 13.75 0H1.25zM12 8H3V6h9v2zm0-3H3V3h9v2z"/></svg>'},tBUM:function(e,t,i){"use strict";i.r(t),i.d(t,"WidgetBarTabButtonViewModel",(function(){return r}));var n=i("mrSG"),o=i("hY0g"),a=i.n(o),s={isActive:!1,notificationCount:0},r=function(){function e(e){var t=Object(n.a)(Object(n.a)({},s),e);this.isActive=new a.a(t.isActive),this.notificationsCount=new a.a(t.notificationCount),this.icon=new a.a(t.icon),this.hint=new a.a(t.hint),this.onClick=new a.a(t.onClick),this.TabButtonComponent=e.TabButtonComponent}
return e.prototype.onActiveStateChange=function(e){this.isActive.setValue(e)},e.prototype.updateNotifications=function(e){this.notificationsCount.setValue(e)},e}()},uDbD:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="45" height="45"><path fill="currentcolor" d="M22.5 12a1 1 0 0 1 0 21 1 1 0 0 1 0-21m0 1a1 1 0 0 0 0 19 1 1 0 0 0 0-19m-7.15 16.85l.8.6-2.05 2.75-.8-.6zm13.48.57l.8-.6 2.07 2.78-.8.6zM22 22v-7h1v8h-6v-1zm9.93-2.95l-.58-.81a4 4 0 1 0-5.84-5.2l-.87-.49a5 5 0 1 1 7.3 6.5zm-11.57-6.5l-.87.48a4 4 0 1 0-5.9 5.17l-.6.8a5 5 0 1 1 7.36-6.46z"/></svg>'},uJ8n:function(e,t,i){e.exports={wrap:"wrap-379NmUSU",scrollWrap:"scrollWrap-379NmUSU",noScrollBar:"noScrollBar-379NmUSU",content:"content-379NmUSU",icon:"icon-379NmUSU",scrollBot:"scrollBot-379NmUSU",scrollTop:"scrollTop-379NmUSU",isVisible:"isVisible-379NmUSU",iconWrap:"iconWrap-379NmUSU",fadeBot:"fadeBot-379NmUSU",fadeTop:"fadeTop-379NmUSU"}},udDf:function(e,t,i){"use strict";(function(e){var t=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i("9uLv")),o=i("29gu"),a=i("9+gJ");function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s(this,e),this.opened=!1,this.animated=!1,this.$el=t.$el,this.delegateEvents(),this.$el.addClass("i-inited")}return t(e,[{key:"delegateEvents",value:function(){var e=this;this.$body=this.$el.find(".js-expand__body").first(),this.$el.find(".js-expand__title").first().off("click.js-expand").on("click.js-expand",(function(t){t.isDefaultPrevented()||e.toggle()}))}},{key:"setOpened",value:function(e){this.opened=e}},{key:"setPause",value:function(e){this.paused=e}},{key:"toggle",value:function(){this[this.opened?"close":"open"]()}},{key:"open",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!(this.animated||this.opened||this.paused)){if(this.opened=!0,this.animated=!0,this.$el.addClass("i-dropped").trigger("beforeOpen"),t)return this.$body.removeClass("i-hidden"),this.$el.trigger("afterOpen"),void(this.animated=!1);(0,a.lazyVelocity)().then((function(){e.$body.css("opacity",0).velocity("slideDown",{queue:!1,easing:"easeOutCubic",duration:.75*n.dur,complete:function(){e.$body.removeClass("i-hidden")}}).velocity({opacity:1},{queue:!1,easing:"easeOutCubic",duration:.5*n.dur,delay:.75*n.dur,complete:function(){e.$body.attr("style",""),e.$el.trigger("afterOpen"),e.animated=!1}})}))}}},{key:"close",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.animated&&this.opened&&!this.paused){if(this.opened=!1,this.animated=!0,
this.$el.removeClass("i-dropped").trigger("beforeClose"),t)return this.$body.addClass("i-hidden"),this.$el.trigger("beforeClose"),void(this.animated=!1);(0,a.lazyVelocity)().then((function(){e.$body.velocity({opacity:0},{queue:!1,easing:"easeOutCubic",duration:.5*n.dur}).velocity("slideUp",{queue:!1,easing:"easeOutCubic",duration:.75*n.dur,delay:.5*n.dur,complete:function(){e.$body.attr("style","").addClass("i-hidden"),e.$el.trigger("afterClose"),e.animated=!1}})}))}}}]),e}();$.fn.tvExpand=(0,o.createTvBlockWithInstance)("tv-expand",(function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new r(e.extend(i,{$el:t}))}))}).call(this,i("F/us"))},vTLT:function(e,t,i){e.exports={tableContainer:"tableContainer-3G2BFxc6",table:"table-3G2BFxc6"}},vvCS:function(e,t,i){e.exports={counter:"counter-1nuJd9UN"}},w68K:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 15" width="16px" height="15px"><path fill-rule="evenodd" d="M0 14.66h2.91V5.864H0v8.796zm16-8.063c0-.806-.655-1.466-1.455-1.466h-4.59l.692-3.35.022-.232c0-.3-.126-.58-.32-.777L9.576 0 4.793 4.83c-.27.264-.43.63-.43 1.034v7.33c0 .806.655 1.466 1.455 1.466h6.546c.603 0 1.12-.367 1.338-.895l2.196-5.167c.066-.17.102-.345.102-.535v-1.4l-.007-.008.007-.058z"/></svg>'},wfKj:function(e,t,i){"use strict";i.d(t,"a",(function(){return c}));var n,o=i("zM7N"),a=i("YFKU"),s=i("IMMp"),r=i("NWKS"),l=i("HGP3"),c=((n={})[o.StdTheme.Light]={name:o.StdTheme.Light,label:function(){return Object(a.t)("Light",{context:"colorThemeName"})},order:2,getThemedColor:function(e){return Object(l.getHexColorByName)(e)}},n[o.StdTheme.Dark]={name:o.StdTheme.Dark,label:function(){return Object(a.t)("Dark",{context:"colorThemeName"})},order:1,getThemedColor:function(e){var t=s[e]||e;return Object(l.getHexColorByName)(t)}},n);c.sa={isPrivate:!0,noChartTheme:!0,name:"sa",getThemedColor:function(e){var t=r[e]||e;return Object(l.getHexColorByName)(t)}}},wvCj:function(e,t){
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 21 21" width="21" height="21"><path d="M6 1.5A4.5 1.5 0 0 0 1.5 3 4.5 1.5 0 0 0 6 4.5 4.5 1.5 0 0 0 10.5 3 4.5 1.5 0 0 0 6 1.5zm8.8 2.7a4.5 1.5 0 0 0-4.5 1.5 4.5 1.5 0 0 0 4.5 1.5 4.5 1.5 0 0 0 4.5-1.5 4.5 1.5 0 0 0-4.5-1.5zm-12.6.7a4.5 1.5 0 0 0-.7.8A4.5 1.5 0 0 0 6 7.2a4.5 1.5 0 0 0 3.8-.7v-.8c0-.2.1-.5.2-.7a4.5 1.5 0 0 0-.2-.1 4.5 1.5 0 0 1-3.8.7 4.5 1.5 0 0 1-3.8-.7zm0 2.7a4.5 1.5 0 0 0-.7.8 4.5 1.5 0 0 0 3 1.4v-.3c0-.4.2-.7.5-1 .2-.1.3-.1.4-.2a4.5 1.5 0 0 1-3.2-.7zm16.4 0a4.5 1.5 0 0 1-3.8.7 4.5 1.5 0 0 1-1.3-.1c.2.1.3.2.5.3.3.3.5.6.5 1v.4a4.5 1.5 0 0 0 .3 0 4.5 1.5 0 0 0 4.5-1.5 4.5 1.5 0 0 0-.7-.8zM9.5 8A4.5 1.5 0 0 0 5 9.5 4.5 1.5 0 0 0 9.5 11 4.5 1.5 0 0 0 14 9.5 4.5 1.5 0 0 0 9.5 8zm-7.3 2.3a4.5 1.5 0 0 0-.7.8 4.5 1.5 0 0 0 3 1.4v-1.6a4.5 1.5 0 0 1-2.3-.6zm16.4 0a4.5 1.5 0 0 1-3.8.7 4.5 1.5 0 0 1-.3 0v1.6a4.5 1.5 0 0 0 .3 0 4.5 1.5 0 0 0 4.5-1.5 4.5 1.5 0 0 0-.7-.8zM5.7 11.4a4.5 1.5 0 0 0-.7.8 4.5 1.5 0 0 0 4.5 1.5 4.5 1.5 0 0 0 4.5-1.5 4.5 1.5 0 0 0-.7-.8 4.5 1.5 0 0 1-3.8.7 4.5 1.5 0 0 1-3.8-.7zM18.6 13a4.5 1.5 0 0 1-3.8.7 4.5 1.5 0 0 1-.3 0v1.6a4.5 1.5 0 0 0 .3 0 4.5 1.5 0 0 0 4.5-1.5 4.5 1.5 0 0 0-.7-.8zM5.7 14.1a4.5 1.5 0 0 0-.7.8 4.5 1.5 0 0 0 4.5 1.5 4.5 1.5 0 0 0 4.5-1.5 4.5 1.5 0 0 0-.7-.8 4.5 1.5 0 0 1-3.8.7 4.5 1.5 0 0 1-3.8-.7zm0 2.7a4.5 1.5 0 0 0-.7.8 4.5 1.5 0 0 0 4.5 1.5 4.5 1.5 0 0 0 4.5-1.5 4.5 1.5 0 0 0-.7-.8 4.5 1.5 0 0 1-3.8.7 4.5 1.5 0 0 1-3.8-.7z"/></svg>'},wy57:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18" fill="none"><path stroke="currentColor" d="M2.5 14.5c1.68-1.26 3.7-2 6.5-2s4.91.74 6.5 2m-13-11c1.68 1.26 3.7 2 6.5 2s4.91-.74 6.5-2"/><circle stroke="currentColor" cx="9" cy="9" r="8.5"/><path stroke="currentColor" d="M13.5 9c0 2.42-.55 4.58-1.4 6.12-.87 1.56-1.98 2.38-3.1 2.38s-2.23-.82-3.1-2.38c-.85-1.54-1.4-3.7-1.4-6.12s.55-4.58 1.4-6.12C6.77 1.32 7.88.5 9 .5s2.23.82 3.1 2.38c.85 1.54 1.4 3.7 1.4 6.12z"/></svg>'},xrkQ:function(e,t,i){e.exports={"css-value-widgets-margin":"4px",widget:"widget-1quyc-Kt",widgetHeader:"widgetHeader-1quyc-Kt",widgetTitle:"widgetTitle-1quyc-Kt",headerSpace:"headerSpace-1quyc-Kt"}},yLMQ:function(e,t){
e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path fill="currentColor" d="M23 18c0 2.75-2.25 5-5 5a5.02 5.02 0 0 1-3.23-8.83c.49-.46 1.03-.87 1.6-1.31l.15-.1c.46-.37.94-.74 1.4-1.15l.19.34c.26.48.49 1.08.49 1.65a10.9 10.9 0 0 1-.45 2.85l-.06.23-.01.06-.01.02-.18.64h.66c1.1 0 1.93-.4 2.5-1.06.38-.43.64-.95.8-1.5A4.84 4.84 0 0 1 23 18zm-1.79-5l-.13.8a3.8 3.8 0 0 1-.78 1.88c-.26.3-.62.54-1.09.65l.1-.46c.14-.66.29-1.53.29-2.27 0-.8-.32-1.58-.6-2.13a7.11 7.11 0 0 0-.6-.92l-.36-.45-.4.4c-.52.52-1.11.98-1.73 1.46l-.15.1c-.56.44-1.15.89-1.68 1.38A6.02 6.02 0 0 0 18 24c3.3 0 6-2.7 6-6a5.82 5.82 0 0 0-2.12-4.52zM10 4H9v2H6.5A2.5 2.5 0 0 0 4 8.5v11A2.5 2.5 0 0 0 6.5 22H10v-1H6.5A1.5 1.5 0 0 1 5 19.5v-11A1.5 1.5 0 0 1 6.5 7h13A1.5 1.5 0 0 1 21 8.5V10h1V8.5A2.5 2.5 0 0 0 19.5 6H17V4h-1v2h-6zm4 5h-2v2h2zM9 9H7v2h2zm-2 4h2v2H7zm0 4h2v2H7z"/></svg>'},yTtm:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 20" width="24" height="20" fill="none" stroke="currentColor"><path d="M.5 15.5V.5h23v15H.5zM4 19.5h15m-11-2h7"/><path d="M9.5 10.66V5.34c0-.38.4-.62.74-.44l4.94 2.66a.5.5 0 0 1 0 .88l-4.94 2.66a.5.5 0 0 1-.74-.44z"/></svg>'},zpSA:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.widgetBarWidgets={Watchlist:null,NewsWidget:i("RrLr"),Detail:i("hpIU"),CalendarWidget:i("1E3x"),ReutersCalendarWidget:i("fadt"),HotlistWidget:i("CNcW").HotlistRenderer,Messages:i("+SlM"),PublicChatsWidget:i("debi"),NotificationsWidgets:i("clWw"),NotesWidget:i("Maqz"),AlertsManageWidget:i("o0rh").AlertsManageWidget,AlertsLogWidget:i("/Jsq").AlertsLogWidget,ChatWidget:i("eF4M"),showSupportDialog:i("xOeO").showSupportDialog,StreamsWidget:i("kGUJ").StreamsWidgetRenderer}}}]);