diff --git a/charting_library/ar-tv-chart.635204e2.html b/charting_library/ar-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/ar-tv-chart.635204e2.html
rename to charting_library/ar-tv-chart.5542ccdd.html
index bc1f40d1..4f96777a 100644
--- a/charting_library/ar-tv-chart.635204e2.html
+++ b/charting_library/ar-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/bundles/library.70a19cb4e3f37c0a5cdb.js b/charting_library/bundles/library.1ee6259bf3f44a7e9aad.js
similarity index 88%
rename from charting_library/bundles/library.70a19cb4e3f37c0a5cdb.js
rename to charting_library/bundles/library.1ee6259bf3f44a7e9aad.js
index 4990834a..f0bad830 100644
--- a/charting_library/bundles/library.70a19cb4e3f37c0a5cdb.js
+++ b/charting_library/bundles/library.1ee6259bf3f44a7e9aad.js
@@ -160,8 +160,8 @@ e.prototype.isActive=function(){return!0===this._options.active},e.prototype.isC
;var r=i("ocLq"),n=function(){function e(){}return e.prototype.init=function(e,t){e.new_sym(t(1),r.Std.period(e),r.Std.period(e)),this._source=t(0),this._scaleFactor1=1,this._scaleFactor2=1},e.prototype.main=function(e,t){var i=e.symbol.time,n=r.Std[this._source](e);e.select_sym(1);var o=r.Std[this._source](e),s=e.new_unlimited_var(o),a=e.new_unlimited_var(e.symbol.time);if(e.select_sym(0),isNaN(i))return null;var l=a.indexOf(i);-1!==l&&a.get(l)!==i&&(l=-1);var c=l<0?NaN:s.get(l);return[this._doCalculation(this._scaleFactor1,n,this._scaleFactor2,c)]},e}(),o={styles:{plot1:{linestyle:0,linewidth:2,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800080"}},precision:2,inputs:{source:"close",symbol2:""}},s=[{defval:"close",id:"source",name:"Source",options:["open","high","low","close","hl2","hlc3","ohlc4"],type:"text"},{id:"symbol2",name:"Symbol",type:"symbol",confirm:!0}],a=[{id:"plot1",type:"line"}],l={plot1:{title:"Plot",histogramBase:0}}},"7ktv":function(e,t,i){"use strict";i.r(t),i.d(t,"PriceDataSource",(function(){return a}));var r=i("mrSG"),n=i("fgLi"),o=i("aIyQ"),s=i.n(o),a=function(e){function t(t){var i=e.call(this)||this;return i._formatterChanged=new s.a,i._priceStepChanged=new s.a,i._currencyChanged=new s.a,i._metaInfo=null,i._priceStep=null,i._model=t,i}return Object(r.__extends)(t,e),t.prototype.firstValue=function(){return null},t.prototype.barColorer=function(){return null},t.prototype.base=function(){return 0},t.prototype.model=function(){return this._model},t.prototype.currencyChanged=function(){return this._currencyChanged},t.prototype.isCurrencySource=function(){return!0},t.prototype.priceRange=function(e,t){return null},t.prototype.isDraggable=function(){return!this._metaInfo||!this._metaInfo.linkedToSeries},t.prototype.priceLineColor=function(e){return e},t.prototype.formatterChanged=function(){return this._formatterChanged},t.prototype.priceStep=function(e){return this._priceStep},t.prototype.priceStepChanged=function(){return this._priceStepChanged},t.prototype.hasStateForAlert=function(){return!1},t.prototype.isIncludedInAutoScale=function(){return!0},t}(n.DataSource)},"7nsU":function(e,t,i){"use strict";i.r(t),i.d(t,"showConfirmInputsDialog",(function(){return r}));i("YFKU");function r(e,t,r,n,o){void 0===o&&(o="default"),Promise.all([i.e("react"),i.e(2),i.e(3),i.e(4),i.e(6),i.e(7),i.e(8),i.e(9),i.e(11),i.e(16),i.e(20),i.e(24),i.e(28),i.e(56),i.e(90),i.e(0),i.e(1),i.e(5),i.e(13),i.e(17),i.e(18),i.e(19),i.e(27),i.e(50),i.e("new-confirm-inputs-dialog")]).then(i.bind(null,"iqv3")).then((function(i){var s=new i.ConfirmInputsDialogRenderer(function(e){if("symbol"===e)return window.t("Add Symbol");return window.t("Confirm Inputs")}(o),e,t,o,r,n);return s.show(),s}))}},"7qI1":function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolRectangle",(function(){return h}));var r=i("mrSG"),n=i("YFKU"),o=i("hayr"),s=i("Ocx9"),a=i("tc+8"),l=i.n(a),c=i("Ss5c"),u=Object(n.t)("Rectangle"),h=function(e){function t(r,n){var o=this,s=n||t.createProperties()
;return(o=e.call(this,r,s)||this)._constructor="LineToolRectangle",i.e("lt-pane-views").then(function(e){var t=[new(0,i("GW0y").RectanglePaneView)(o,r)];o._setPaneViews(t)}.bind(null,i)).catch(void 0),o}return Object(r.__extends)(t,e),t.prototype.pointsCount=function(){return 2},t.prototype.properties=function(){return e.prototype.properties.call(this)},t.prototype.translatedType=function(){return u},t.prototype.name=function(){return"Rectangle"},t.prototype.setPoint=function(t,i,r){if(t<2)e.prototype.setPoint.call(this,t,i,r);else{if(r&&r.shift()&&this.properties().childs().snapTo45Degrees){var n=this.points()[0],o=this.points()[1],s={price:2===t?n.price:o.price,index:2===t?o.index:n.index};this._snapPoint45Degree(i,s)}3===t?(this._points[0].price=i.price,this._points[1].index=i.index):(this._points[1].price=i.price,this._points[0].index=i.index),this.normalizePoints()}},t.prototype.getStylesPropertyPage=function(){return o.propertyPages.LineToolRectangleStylesPropertyPage},t.prototype.template=function(){var t=e.prototype.template.call(this);return t.text=this.properties().childs().text.value(),t},t.createProperties=function(e){var i=new s.DefaultProperty("linetoolrectangle",e);return t._configureProperties(i),i},t.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"K4wI")).then((function(e){return e.RectangleDefinitionsViewModel}))},t.prototype._applyTemplateImpl=function(t){e.prototype._applyTemplateImpl.call(this,t),this.properties().childs().text.setValue(t.text)},t._configureProperties=function(e){c.LineDataSource._configureProperties(e),e.hasChild("text")||e.addChild("text",new l.a("")),e.addExclusion("text")},t}(c.LineDataSource)},"7qT/":function(e,t,i){"use strict";function r(e,t){return 100*(t-e)/Math.abs(e)}i.d(t,"a",(function(){return r}))},"8C8C":function(e,t,i){"use strict";i.r(t),i.d(t,"RestoreFactoryDefaultsUndoCommand",(function(){return n}));var r=i("mrSG"),n=function(e){function t(t,i,r){void 0===r&&(r="Restore Defaults");var n=e.call(this,r)||this;return n._chartModel=t,n._defaultProperty=i,n._state=i.state(),n}return Object(r.__extends)(t,e),t.prototype.redo=function(){this._chartModel.restoreFactoryDefaults(this._defaultProperty)},t.prototype.undo=function(){this._defaultProperty.mergeAndFire(this._state),this._chartModel.mainSeries().onChartStyleChanged()},t}(i("RDU5").UndoCommand)},"8OdW":function(e,t,i){"use strict";i.r(t),i.d(t,"MINUTE_SPAN",(function(){return r})),i.d(t,"HOUR_SPAN",(function(){return n})),i.d(t,"DAY_SPAN",(function(){return o})),i.d(t,"WEEK_SPAN",(function(){return s})),i.d(t,"MONTH_SPAN",(function(){return a})),i.d(t,"YEAR_SPAN",(function(){return l})),i.d(t,"DEFAULT_BAR_SPACING",(function(){return c}));var r=20,n=30,o=40,s=50,a=60,l=70,c=6},"8Uy/":function(e,t,i){"use strict";i.r(t),i.d(t,"LINESTYLE_SOLID",(function(){return r})),i.d(t,"LINESTYLE_DOTTED",(function(){return n})),i.d(t,"LINESTYLE_DASHED",(function(){return o})),i.d(t,"LINESTYLE_LARGE_DASHED",(function(){
return s})),i.d(t,"LINESTYLE_SPARSE_DOTTED",(function(){return a})),i.d(t,"LINESTYLE_SMALL_DASHED",(function(){return l}));var r=0,n=1,o=2,s=3,a=4,l=5},"8aff":function(e,t,i){"use strict";i.r(t),i.d(t,"CompareStudyPriceAxisView",(function(){return o}));var r=i("mrSG"),n=i("oXaB"),o=function(e){function t(t,i){var r=e.call(this)||this;return r._studyCompare=t,r._data=i,r}return Object(r.__extends)(t,e),t.prototype._updateRendererData=function(e,t,i){e.visible=!1,t.visible=!1;var r=this._studyCompare.lastValueData(this._data.plotIndex,!1);if(!r.noData){i.background=r.color,i.color=this.generateTextColor(r.color),i.coordinate=r.coordinate,i.floatCoordinate=r.floatCoordinate;var o=this._studyCompare.model().properties().scalesProperties;o.showSeriesLastValue.value()&&(e.text=this._axisText(r),e.visible=!0),t.text="",(o.showSymbolLabels.value()||o.seriesLastValueMode.value()===n.PriceAxisLastValueMode.LastPriceAndPercentageValue)&&(t.text=this._paneText(r),t.visible=t.text.length>0)}},t.prototype._paneText=function(e){var t="",i=this._studyCompare.model().properties().scalesProperties;i.showSymbolLabels.value()&&(t+=this._studyCompare.symbol()+" ");var r=this._studyCompare.priceScale();return null!==r&&i.showSeriesLastValue.value()&&i.seriesLastValueMode.value()===n.PriceAxisLastValueMode.LastPriceAndPercentageValue&&(t+=r.isPercentage()?e.formattedPriceAbsolute:e.formattedPricePercentage),t.trim()},t.prototype._axisText=function(e){var t=this._studyCompare.model().properties().scalesProperties,i=this._studyCompare.priceScale();return t.seriesLastValueMode.value()!==n.PriceAxisLastValueMode.LastPriceAndPercentageValue||null===i?e.text:i.isPercentage()?e.formattedPricePercentage:e.formattedPriceAbsolute},t}(i("KcY8").a)},"8gnj":function(e,t,i){"use strict";(function(t){var r=i("ESp1").HeikenAshi,n=i("LxhU").Interval,o=function(){var e=i("ocLq"),o=i("IiTo"),s=e.Symbol,a=e.StudyEngine,l=e.BarBuilder,c=e.BarSet;function u(e){this.host=e,this.cache={}}function h(e){var t=e.indexOf(",");return-1===t?e:e.slice(0,t)}function d(e){return e.has_empty_bars||e.force_session_rebuild}function p(e){return"string"==typeof e&&"="===e[0]}function f(e){if(!p(e))return{symbol:e};var t;try{t=JSON.parse(e.slice(1))}catch(i){return{symbol:e}}return t.type&&(0===t.type.indexOf("BarSetHeikenAshi@tv-basicstudies-")?t.builder=new r:console.error("unknown builder type: "+t.type)),"string"!=typeof t.symbol&&(t.session=t.symbol.session||t.session,t.currencyCode=t.symbol.currencyCode||t.currencyCode,t.symbol=t.symbol.symbol),t}u.prototype.getCache=function(e){return this.cache[e]},u.prototype.putCache=function(e,t){this.cache[e]=t},u.prototype.subscribe=function(e,t,i,r,n,o,s,a,l,c,u){var h=function(e,t,i,r,n,o,s,a){var l=d(n)?"_":"";return o+e+i+(t||"")+r+l+s+"_"+a}(e,t,i,r,a,l,n,u),p=this.getCache(h);return p||(p=this.createItem(e,t,i,r,a,c,l,n,u),this.putCache(h,p)),p.listeners.addListener(o,s),{key:h,listener:o}},u.prototype.unsubscribe=function(e){var t=this.getCache(e.key);t&&t.listeners.removeListener(e.listener)},
-u.prototype.removeUnused=function(){var e=[];for(var t in this.cache){if(this.cache[t])0===this.cache[t].listeners.listenersCount()&&e.push(t)}if(0!==e.length){for(var i=0;i=0;l--){var c=+a[l];if(o%c==0)return c+(r.isSeconds?"S":"")}return""}return o+(r.isSeconds?"S":"")},u.prototype.createItem=function(e,t,i,r,o,s,a,c,u){var p=new y,g=f(e);if(t=g.currencyCode||t,g.builder)return new m(p,g.symbol,t,i,r,g.builder,o,s,a);var v=h(i),S=this.rebuildFrom(v,h(r),o),b=d(o);if(!n.isEqual(v,S)||b){var w=o.has_empty_bars,P=Object.assign({},o);return b&&(P.has_empty_bars=!1,P.force_session_rebuild=!1),new m(p,g.symbol,t,i,S,new l(i,w),P,s,a,c,u)}var C=g.session&&"extended"!==g.session,x={currency:t};return new _(p,g.symbol,x,i,r,C,this.host,o,s,c,u)};var _=function(e,t,i,r,n,o,s,a,l,c,u){this.listeners=e,this.host=s;var d=this;this.host.resolve(t,i,(function(e){o&&e.regular_session&&(e.session=e.regular_session);var i=d.calculateFromTo(e,c||n||r,t,l,u);d.subs=d.host.subscribe(e,h(r),i,(function(e){d.listeners.fire(e)}),(function(e){d.listeners.onError(e)}))}),(function(e){d.listeners.onError(e)}))};_.prototype._createDWMAligner=function(e,t){var i=new o.SessionInfo(t.timezone,t.session,t.holidays,t.corrections);return s.newBarBuilder(e,i,i)},_.prototype.stop=function(){this.subs&&this.host.unsubscribe(this.subs)},_.prototype.calculateFromTo=function(e,i,r,n,a){var l,c,u,h=s.parsePeriod(i),d=(new Date).valueOf(),p=e.expired&&t.cal_to_utc(t.get_timezone(e.timezone),new Date(1e3*e.expiration_date))||d;if(""===h.resolution)c=h.interval,u="D";else if("S"===h.resolution)c=10*h.interval,u="";else{c=12*("D"===h.resolution?1:"W"===h.resolution?5:30)*h.interval,u="M"}if(h.range)c=h.range.interval,u=h.range.resolution;else if(this.host.calculateHistoryDepth){var f=this.host.calculateHistoryDepth(i,u,c);f&&(c=f.intervalBack||c,u=void 0===f.resolutionBack?u:f.resolutionBack)}var _=e.sessionString||e.session;if(l=o.alignPeriodsBack(_,e.holidays,e.corrections,u,c,1,p),n&&n.getRangeExtensionTime){var m=n.getRangeExtensionTime();m&&(l=Math.min(1e3*m,l))}var y=Math.ceil(1.5*a);return n&&n.getRangeExtensionCount&&(y+=n.getRangeExtensionCount()),y>0&&(l=o.alignPeriodsBack(_,e.holidays,e.corrections,h.resolution,h.interval,y,l)),{from:l,to:p+6e4}};var m=function(e,t,i,r,n,o,s,l,c,u,h){if(this.listeners=e,this.isRecalculated=!1,
-""===n)return console.error("unsupported resolution for rebuild: "+r),void this.listeners.onError("unsupported resolution for rebuild: "+r);this.symbolInfo=s;var d=this;this.engine=new a({tickerid:t,currencyCode:i,period:n,periodBase:r,body:o,sessionId:c,symbolInfo:s,rangeExtension:l,periodForInitialRange:u,additionalBarsCount:h,recalc:function(e,t){d._recalc(t)},out:function(e,t){d._out(e,t)},nonseriesOut:function(e,t){d._nonseriesOut(e,t)},setNoMoreData:function(){d.barset&&(d.barset.endOfData=!0)},onErrorCallback:function(e){d.listeners.onError(e)}})};m.prototype.stop=function(){this.engine?this.engine.stop():console.error("Internal library error 0x1")},m.prototype._recalc=function(e){this.isRecalculated&&console.error("recalc called twice!"),this.barset||(this.barset=new c(this.symbolInfo)),e&&(this.barset.nextTime=e.nextTime,this.barset.endOfData=e.endOfData),this.listeners.fire(this.barset),this.isRecalculated=!0},m.prototype._nonseriesOut=function(e,t){var i=Object.assign({},t);i.nonseries=!0,i.data=t.bars,delete i.bars,i.barsetSize=this.barset?this.barset.count():0,i.lastBar=this.barset?this.barset.bar(this.barset.count()-1):null,this.listeners.fire(i,!0)},m.prototype._out=function(e,t){var i=t[0];if(!isNaN(i)){var r={time:i,open:t[1],high:t[2],low:t[3],close:t[4],volume:t[5],updatetime:t[6]},n=t[7];this.barset||(this.barset=new c(e.info));var o=t[8];if(o instanceof Array)for(var s=0;s=0;l--){var c=+a[l];if(o%c==0)return c+(r.isSeconds?"S":"")}return""}return o+(r.isSeconds?"S":"")},u.prototype.createItem=function(e,t,i,r,o,s,a,c,u){var p=new y,g=f(e);if(t=g.currencyCode||t,g.builder)return new m(p,g.symbol,t,i,r,g.builder,o,s,a);var v=h(i),S=this.rebuildFrom(v,h(r),o),b=d(o);if(!n.isEqual(v,S)||b){var w=o.has_empty_bars,P=Object.assign({},o);return b&&(P.has_empty_bars=!1,P.force_session_rebuild=!1),new m(p,g.symbol,t,i,S,new l(i,w),P,s,a,c,u)}var C=g.session&&"extended"!==g.session,x={currency:t};return new _(p,g.symbol,x,i,r,C,this.host,o,s,c,u)};var _=function(e,t,i,r,n,o,s,a,l,c,u){this.listeners=e,this.host=s;var d=this;this.host.resolve(t,i,(function(e){o&&e.regular_session&&(e.session=e.regular_session);var i=d.calculateFromTo(e,c||n||r,t,l,u);d.subs=d.host.subscribe(e,h(r),i,(function(e){d.listeners.fire(e)}),(function(e){d.listeners.onError(e)}))}),(function(e){d.listeners.onError(e)}))};_.prototype.stop=function(){this.subs&&this.host.unsubscribe(this.subs)},_.prototype.calculateFromTo=function(e,i,r,n,a){var l,c,u,h=s.parsePeriod(i),d=(new Date).valueOf(),p=e.expired&&t.cal_to_utc(t.get_timezone(e.timezone),new Date(1e3*e.expiration_date))||d;if(""===h.resolution)c=h.interval,u="D";else if("S"===h.resolution)c=10*h.interval,u="";else{c=12*("D"===h.resolution?1:"W"===h.resolution?5:30)*h.interval,u="M"}if(h.range)c=h.range.interval,u=h.range.resolution;else if(this.host.calculateHistoryDepth){var f=this.host.calculateHistoryDepth(i,u,c);f&&(c=f.intervalBack||c,u=void 0===f.resolutionBack?u:f.resolutionBack)}var _=e.sessionString||e.session;if(l=o.alignPeriodsBack(_,e.holidays,e.corrections,u,c,1,p),n&&n.getRangeExtensionTime){var m=n.getRangeExtensionTime();m&&(l=Math.min(1e3*m,l))}var y=Math.ceil(1.5*a);return n&&n.getRangeExtensionCount&&(y+=n.getRangeExtensionCount()),y>0&&(l=o.alignPeriodsBack(_,e.holidays,e.corrections,h.resolution,h.interval,y,l)),{from:l,to:p+6e4}};var m=function(e,t,i,r,n,o,s,l,c,u,h){if(this.listeners=e,this.isRecalculated=!1,""===n)return console.error("unsupported resolution for rebuild: "+r),void this.listeners.onError("unsupported resolution for rebuild: "+r);this.symbolInfo=s
+;var d=this;this.engine=new a({tickerid:t,currencyCode:i,period:n,periodBase:r,body:o,sessionId:c,symbolInfo:s,rangeExtension:l,periodForInitialRange:u,additionalBarsCount:h,recalc:function(e,t){d._recalc(t)},out:function(e,t){d._out(e,t)},nonseriesOut:function(e,t){d._nonseriesOut(e,t)},setNoMoreData:function(){d.barset&&(d.barset.endOfData=!0)},onErrorCallback:function(e){d.listeners.onError(e)}})};m.prototype.stop=function(){this.engine?this.engine.stop():console.error("Internal library error 0x1")},m.prototype._recalc=function(e){this.isRecalculated&&console.error("recalc called twice!"),this.barset||(this.barset=new c(this.symbolInfo)),e&&(this.barset.nextTime=e.nextTime,this.barset.endOfData=e.endOfData),this.listeners.fire(this.barset),this.isRecalculated=!0},m.prototype._nonseriesOut=function(e,t){var i=Object.assign({},t);i.nonseries=!0,i.data=t.bars,delete i.bars,i.barsetSize=this.barset?this.barset.count():0,i.lastBar=this.barset?this.barset.bar(this.barset.count()-1):null,this.listeners.fire(i,!0)},m.prototype._out=function(e,t){var i=t[0];if(!isNaN(i)){var r={time:i,open:t[1],high:t[2],low:t[3],close:t[4],volume:t[5],updatetime:t[6]},n=t[7];this.barset||(this.barset=new c(e.info));var o=t[8];if(o instanceof Array)for(var s=0;s=1;--t){var r=this._ticker.slice(0,t);if(e(r)){this._root=r,this._contract=this._ticker.slice(t);break}}},m.prototype.exchange=function(e){if(this.hasOwnProperty("_ticker")||this.parse(),!(arguments.length>0))return this._exchange;null==e?delete this._exchange:this._exchange=e+""},m.prototype.ticker=function(e){if(this.hasOwnProperty("_ticker")||this.parse(),!(arguments.length>0))return this._ticker;null==e?delete this._ticker:this._ticker=e+"",delete this._root,delete this._contract},m.prototype.root=function(e){if(this.hasOwnProperty("_root")||this.parseAsFutures(),!(arguments.length>0))return this._root;null==e?delete this._root:(this._root=e+"",this._root&&(this._ticker=this._root+(this._contract||"")))},m.prototype.contract=function(e){if(this.hasOwnProperty("_contract")||this.parseAsFutures(),!(arguments.length>0))return this._root;null==e?delete this._contract:(this._contract=e+"",this._root&&(this._ticker=this._root+this._contract))},r(y,n),y.prototype.toString=function(){return this.hasOwnProperty("_normalizedValue")?this._normalizedValue:this.value},y.prototype.parse=function(){this._normalizedValue=this.value.replace(/^0+|\.0*$/g,"").replace(/(\.\d*?)0+$/,"$1").replace(/^(\.|$)/,"0$1")},g.prototype.toString=function(){return this.value},r(v,m),v.prototype.isIncomplete=!0,v.prototype.incompleteSuggest=function(){if("'"!==this.value)return String("'")},r(S,y),S.prototype.isIncomplete=!0;var b=new RegExp(e.map((function(e){return"("+("string"==typeof e.pattern?e.pattern.replace(/[\^\$\(\)\[\]\{\}\*\+\?\|\\]/g,"\\$&"):e.pattern.source)+")"})).concat(".").join("|"),"g");function w(t,i){var r,n=[];e:for(;r=b.exec(t);){for(var s=e.length;s--;)if(r[s+1]){if(e[s].ctor){var a=new e[s].ctor(r[s+1]);a._offset=r.index,n.push(a)}continue e}var l=new g(r[0]);l._offset=r.index,n.push(l)}if(i&&i.recover){var c;for(s=n.length;s--;){var u=n[s];if(u instanceof y||u instanceof m){if(void 0!==c){var h=new m(""),d=n.splice(s,c-s+1,h);h.value=d.map((function(e){return e.value})).join("")}c=s}else u instanceof o||(c=void 0)}}return n}function P(e){
@@ -190,23 +190,23 @@ for(var t,i=this._plates.length-1;i>=0;--i)if(t=this._hitTestDot(this._plates[i]
this._tooltip.setSource(this.renderer.source),this._tooltip.showPlate(e,t),e.hovered||e.pinned||this._tooltip.hide((function(){i.renderer.removeTooltip(e.id)}))},n.prototype.remove=function(){this._tooltip._removeLayout()},n.prototype.toggleVisibility=function(){this._tooltip._toggleLayout(this.visible),this.visible=!1},t.TooltipRenderer=r},BxxN:function(e,t,i){"use strict";function r(e){return decodeURIComponent(e.replace(/\+/g," ")).replace(/<\/?[^>]+(>|$)/g,"")}function n(e){var t=/([^&=]+)=?([^&]*)/g,i={};if(!e)return i;for(var n=t.exec(e);n;)i[r(n[1])]=r(n[2]),n=t.exec(e);return i}i.d(t,"a",(function(){return a}));var o=["mobileapp","mobileapp_new"];function s(e){if(0===location.search.length)return e;var t=n(window.location.search.substring(1));return o.forEach((function(i){void 0!==t[i]&&(e[i]=t[i])})),e}function a(e,t,i){void 0===e&&(e={}),void 0===t&&(t=""),void 0===i&&(i=!0);var r="/chart/";e.chartId&&(r=""+r+e.chartId+"/",delete e.chartId),i&&(e=s(e));var n=function(e){var t=[];for(var i in e)e.hasOwnProperty(i)&&null!=e[i]&&t.push({key:i,pair:encodeURIComponent(i)+"="+encodeURIComponent(e[i])});return t.sort((function(e,t){return e.key>t.key?1:e.key]+)>)/gi,""):e},TradingView.encodeSpread=function(e){return encodeURIComponent(e)},TradingView.clean=function(e,t,i){var r=[["&","&"],["<","<"],[">",">"],['"',"""],["'","'"],["'","'"]],n=e;if(!e||!e.replace)return n;for(var o=0;o'},CxTi:function(e,t,i){e.exports={css_value_currency_label_top:"6",css_value_currency_label_radius:"4",css_value_border_color_light:"#D1D4DC",css_value_border_color_dark:"#363A45","price-axis-currency-label-wrapper":"price-axis-currency-label-wrapper-opoVZ91E","price-axis-currency-label":"price-axis-currency-label-1aGvtcW9",readonly:"readonly-OYsh-rpT","price-axis-currency-label-text":"price-axis-currency-label-text-1o_xgUrU","price-axis-currency-label-arrow-down":"price-axis-currency-label-arrow-down-243KKK5C"}},DYI2:function(e,t){e.exports=''},Daqx:function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));var r=["Z","Y","X","W","V","U","T","S"],n=["A","B","C","D","E","F","G","H"],o=function(){function e(e){this.label=e}return e.prototype.equals=function(e){return null!==e&&this.label===e.label},e}();function s(e,t){var i="left"===e?r:n;return new o(t=0&&n.setLastBarClosed(!1)}r(n)}}(e,i,n),o)},unsubscribe:function(e){return t._cachedDatafeed.unsubscribe(e)},calculateHistoryDepth:this._externalDatafeed.calculateHistoryDepth?this._externalDatafeed.calculateHistoryDepth.bind(this._externalDatafeed):void 0})};function g(e,t){null!=e.graphicsCmds&&null!=e.graphicsCmds.create&&null!=e.graphicsCmds.create.vertlines&&e.graphicsCmds.create.vertlines.forEach((function(e){e.data.forEach(t)}))}function v(e,t){for(var i=e.length,r=t.length,n=0,o=0;o=r?e[o]=t[r-1].index:e[o]=t[n].index}}y.createDWMAligner=function(e,t,i,r,n){var o=new l.SessionInfo(t,i,r,n);return l.createDWMAligner(e,o)},y.prototype._barsCoefficients=function(e,t){if(void 0===o.parseSymbol(e).type)return{};var i=e+t;return this._barsCoefficientsCache[i]||(this._barsCoefficientsCache[i]={}),this._barsCoefficientsCache[i]},y.prototype.destroy=function(){this._cachedDatafeed.destroy(),this._externalDatafeed=null,this._pointsetsManager.pointsetsCreated().unsubscribeAll(this)},y.prototype.purgeCache=function(){this._endOfData={},this._resolveRequests={},this._sessionsLastDataCache={},this._studiesCache={}},y.prototype.purgeDataCache=function(){this._cachedDatafeed.purgeCache()},y.prototype._logMessage=function(e){t.enabled("charting_library_debug_mode")&&console.log(e)},y.prototype._extendRange=function(e,t){this._rangeExtensionData[e]||this.purgeRangeExtensionData(e),void 0===this._rangeExtensionData[e].summary&&(this._rangeExtensionData[e].summary=0),this._rangeExtensionData[e].summary+=t},y.prototype.on=function(e,t){return this._callbacks.hasOwnProperty(e)||(this._callbacks[e]=[]),this._callbacks[e].push(t),this},y.prototype._fireEvent=function(e,t,i){if(this._callbacks.hasOwnProperty(e)){for(var r=this._callbacks[e],n=0;nm[a].value[0];l?m.push({index:_(r),
-value:[r].concat(n)}):m[a].value=[r].concat(n),p||u([m[m.length-1]],l,m.length,y,i)}(e,t,l)},nonseriesOut:function(e,t){d(t,l)},setNoMoreData:function(){v=!0},recalc:function(e,i){p=!1,m.endOfData=v,t.error&&null!==t.error()||c(m,g>0?y:void 0,l,i)}});if(!S._studiesCache[e]||!S._studiesCache[e][o])throw Error("This should never happen");S._studiesCache[e][o].engine=f}catch(b){if(!b.studyError)throw b;h(b.message)}else h("Unsupported resolution. Did you forget to set has_intraday to true?")},w=function(e){h(e)},P=function(){return S._studiesCache[e]&&S._studiesCache[e][o]&&S._studiesCache[e][o].activeResolve===f};S._studiesCache[e][o].activeResolve=f,this.resolveSymbol(i,(function(){P()&&b.apply(S,arguments)}),(function(){P()&&w.apply(S,arguments)}))},y.prototype._createStudy=function(e,t,i,r,n,o,s){var a=this;function l(i,s,l){i=_(i),TradingView.ChartapiMessagerInstances[r].onDataUpdate(n,o,a._convertBarsTimeToUnix(i),s,l,a._extendedRange(e,t)),TradingView.ChartapiMessagerInstances[r].onStudyCompleted(n,o)}s=function(e){if(Array.isArray(e))return e;for(var t=[],i=a._studiesCache[r][n].metainfo.inputs,o=0;o0?1e3*p[0].value[0]:void 0;if(c.nextTime&&(!f||c.nextTime=0&&l&&e.lastBar){for(var c=[],d=0;d<=a;d++)c.push(n+.001*d);var p=e.lastBar.slice(0);p[0]=p[0]/1e3,TradingView.ChartapiMessagerInstances[r].onTimescaleUpdate(o,s,[{index:l-1,value:p}],t,l-1,c);var f=l+a,_=1e3*Math.trunc(c[a]);h(t,f,_),u.rebuildExtrapolatedData(r,t.full_name,i,t,_)}u._updateProjectionData(r,o,s,e)}))},y.prototype.onMoreTickmarksRequested=function(e,t,i,r,n){this._extrapolationManager.storage(e,i.full_name,r).onTickmarksNeeded(i,n)},y.prototype.removePointset=function(e){this._pointsetsManager.removePointset(e)},y.prototype.rebuildExtrapolatedData=function(e,t,i,r,n){this._extrapolationManager.storage(e,r.full_name,i).rebuild(n,r)},y.prototype.createPointset=function(e,t,i,r,n,o){var s=this._extrapolationManager.storage(e,r.full_name,n);this._pointsetsManager.createPointset(t,i,o,s,r,e)},y.prototype.studiesMetadata=function(){return 0===this._metainfoCache.length&&(this._metainfoCache=JSServer.studyLibrary.map((function(e){return e.metainfo})),this._metainfoCache.push({palettes:{},inputs:[],plots:[{id:"open",type:"line"},{id:"high",type:"line"},{id:"low",type:"line"},{id:"close",type:"line"},{id:"volume",type:"line"}],graphics:{},_metainfoVersion:48,description:"Unnamed Study",format:{type:"inherit"},is_hidden_study:!0,is_price_study:!1,shortDescription:"Unnamed Study",description_localized:"Unnamed Study",id:"BarSetHeikenAshi@tv-prostudies",shortId:"BarSetHeikenAshi",packageId:"tv-basicstudies",version:"13",fullId:"BarSetHeikenAshi@tv-basicstudies-13",productId:"tv-basicstudies",name:"BarSetHeikenAshi@tv-basicstudies"})),this._metainfoCache},y.prototype.searchSymbols=function(e,t,i,r){this._logMessage("Symbol search requested: search string `{0}`, exchange: `{1}`, type `{2}`".format(e,t,i));var n=this;this._externalDatafeed.searchSymbols(e,t,i,(function(e){n._logMessage("Symbol search response: {0}".format(JSON.stringify(e))),r(e)}))},y.prototype.resolveSymbol=function(e,t,i){o.isSymbolEncoded(e)||console.error("Expect to get symbol encoded string, but got the following instead: "+e);var r=o.parseSymbol(e),n={currency:r.currencyCode};this._resolveSymbolByName(r.symbol,n,t,i)},y.prototype._resolveSymbolByName=function(e,t,i,r){var n,o=t&&t.currency,s=e+(o?"_#_"+o:"");this._resolveRequests[s]?n=this._resolveRequests[s]:(n=this._resolveSymbolInternal(e,o||void 0),this._resolveRequests[s]=n),n.then(i).catch(r)},y.prototype._resolveSymbolInternal=function(e,i){var r=this;return new Promise(function(n,o){
-this._logMessage("Symbol resolve requested: `{0}` ".format(e));var s=!0;this._externalDatafeed.resolveSymbol(e,(function(i){s&&console.warn("`resolveSymbol` should return result asynchronously. Use `setTimeout` with 0 interval to execute the callback function."),r._logMessage("Symbol resolved: `{0}`, SymbolInfo in server response {1}".format(e,JSON.stringify(i))),function(e){if(e.base_name||(e.base_name=[e.name]),e.legs||(e.legs=[e.name]),e.exchange||(e.exchange=e["exchange-listed"]),e.full_name||(e.full_name=e.symbol||(e.exchange?e.exchange+":"+e.name:e.name)),e.pro_name||(e.pro_name=e.full_name),e.data_status||(e.data_status="streaming"),e.ticker||(e.ticker=e.symbol||e.name),!e.session&&e["session-regular"]&&(e.session=e["session-regular"]),!e.minmov&&e.minmovement&&(e.minmov=e.minmovement),e.supported_resolutions)for(var t=0;th)){var d=0,p=a.valueAt(h)[TradingView.TIME_PLOT];if(p=0&&o.setLastBarClosed(!1)}r(o)}}(e,i,o),s)},unsubscribe:function(e){return t._cachedDatafeed.unsubscribe(e)},calculateHistoryDepth:this._externalDatafeed.calculateHistoryDepth?this._externalDatafeed.calculateHistoryDepth.bind(this._externalDatafeed):void 0})};function y(e,t){null!=e.graphicsCmds&&null!=e.graphicsCmds.create&&null!=e.graphicsCmds.create.vertlines&&e.graphicsCmds.create.vertlines.forEach((function(e){e.data.forEach(t)}))}function g(e,t){for(var i=e.length,r=t.length,n=0,o=0;o=r?e[o]=t[r-1].index:e[o]=t[n].index}}m.createDWMAligner=function(e,t){return c.isDWM(e)?l.createAligner(e,t,!0):null},m.prototype._barsCoefficients=function(e,t){if(void 0===o.parseSymbol(e).type)return{};var i=e+t;return this._barsCoefficientsCache[i]||(this._barsCoefficientsCache[i]={}),this._barsCoefficientsCache[i]},m.prototype.destroy=function(){this._cachedDatafeed.destroy(),this._externalDatafeed=null,this._pointsetsManager.pointsetsCreated().unsubscribeAll(this)},m.prototype.purgeCache=function(){this._endOfData={},this._resolveRequests={},this._sessionsLastDataCache={},this._studiesCache={}},m.prototype.purgeDataCache=function(){this._cachedDatafeed.purgeCache()},m.prototype._logMessage=function(e){t.enabled("charting_library_debug_mode")&&console.log(e)},m.prototype._extendRange=function(e,t){this._rangeExtensionData[e]||this.purgeRangeExtensionData(e),void 0===this._rangeExtensionData[e].summary&&(this._rangeExtensionData[e].summary=0),this._rangeExtensionData[e].summary+=t},m.prototype.on=function(e,t){return this._callbacks.hasOwnProperty(e)||(this._callbacks[e]=[]),this._callbacks[e].push(t),this},m.prototype._fireEvent=function(e,t,i){if(this._callbacks.hasOwnProperty(e)){for(var r=this._callbacks[e],n=0;nm[a].value[0];l?m.push({index:_(r),value:[r].concat(n)}):m[a].value=[r].concat(n),p||u([m[m.length-1]],l,m.length,y,i)}(e,t,l)},
+nonseriesOut:function(e,t){d(t,l)},setNoMoreData:function(){v=!0},recalc:function(e,i){p=!1,m.endOfData=v,t.error&&null!==t.error()||c(m,g>0?y:void 0,l,i)}});if(!S._studiesCache[e]||!S._studiesCache[e][o])throw Error("This should never happen");S._studiesCache[e][o].engine=f}catch(b){if(!b.studyError)throw b;h(b.message)}else h("Unsupported resolution. Did you forget to set has_intraday to true?")},w=function(e){h(e)},P=function(){return S._studiesCache[e]&&S._studiesCache[e][o]&&S._studiesCache[e][o].activeResolve===f};S._studiesCache[e][o].activeResolve=f,this.resolveSymbol(i,(function(){P()&&b.apply(S,arguments)}),(function(){P()&&w.apply(S,arguments)}))},m.prototype._createStudy=function(e,t,i,r,n,o,s){var a=this;function l(i,s,l){i=_(i),TradingView.ChartapiMessagerInstances[r].onDataUpdate(n,o,a._convertBarsTimeToUnix(i),s,l,a._extendedRange(e,t)),TradingView.ChartapiMessagerInstances[r].onStudyCompleted(n,o)}s=function(e){if(Array.isArray(e))return e;for(var t=[],i=a._studiesCache[r][n].metainfo.inputs,o=0;o0?1e3*p[0].value[0]:void 0;if(c.nextTime&&(!f||c.nextTime=0&&l&&e.lastBar){for(var c=[],d=0;d<=a;d++)c.push(n+.001*d);var p=e.lastBar.slice(0);p[0]=p[0]/1e3,TradingView.ChartapiMessagerInstances[r].onTimescaleUpdate(o,s,[{index:l-1,value:p}],t,l-1,c);var f=l+a,_=1e3*Math.trunc(c[a]);h(t,f,_),u.rebuildExtrapolatedData(r,t.full_name,i,t,_)}u._updateProjectionData(r,o,s,e)}))},m.prototype.onMoreTickmarksRequested=function(e,t,i,r,n){this._extrapolationManager.storage(e,i.full_name,r).onTickmarksNeeded(i,n)},m.prototype.removePointset=function(e){this._pointsetsManager.removePointset(e)},m.prototype.rebuildExtrapolatedData=function(e,t,i,r,n){this._extrapolationManager.storage(e,r.full_name,i).rebuild(n,r)},m.prototype.createPointset=function(e,t,i,r,n,o){var s=this._extrapolationManager.storage(e,r.full_name,n);this._pointsetsManager.createPointset(t,i,o,s,r,e)},m.prototype.studiesMetadata=function(){return 0===this._metainfoCache.length&&(this._metainfoCache=JSServer.studyLibrary.map((function(e){return e.metainfo})),this._metainfoCache.push({palettes:{},inputs:[],plots:[{id:"open",type:"line"},{id:"high",type:"line"},{id:"low",type:"line"},{id:"close",type:"line"},{id:"volume",type:"line"}],graphics:{},_metainfoVersion:48,description:"Unnamed Study",format:{type:"inherit"},is_hidden_study:!0,is_price_study:!1,shortDescription:"Unnamed Study",description_localized:"Unnamed Study",id:"BarSetHeikenAshi@tv-prostudies",shortId:"BarSetHeikenAshi",packageId:"tv-basicstudies",version:"13",fullId:"BarSetHeikenAshi@tv-basicstudies-13",productId:"tv-basicstudies",name:"BarSetHeikenAshi@tv-basicstudies"})),this._metainfoCache},m.prototype.searchSymbols=function(e,t,i,r){this._logMessage("Symbol search requested: search string `{0}`, exchange: `{1}`, type `{2}`".format(e,t,i));var n=this;this._externalDatafeed.searchSymbols(e,t,i,(function(e){n._logMessage("Symbol search response: {0}".format(JSON.stringify(e))),r(e)}))},m.prototype.resolveSymbol=function(e,t,i){o.isSymbolEncoded(e)||console.error("Expect to get symbol encoded string, but got the following instead: "+e);var r=o.parseSymbol(e),n={currency:r.currencyCode};this._resolveSymbolByName(r.symbol,n,t,i)},m.prototype._resolveSymbolByName=function(e,t,i,r){var n,o=t&&t.currency,s=e+(o?"_#_"+o:"");this._resolveRequests[s]?n=this._resolveRequests[s]:(n=this._resolveSymbolInternal(e,o||void 0),this._resolveRequests[s]=n),n.then(i).catch(r)},m.prototype._resolveSymbolInternal=function(e,i){var r=this;return new Promise(function(n,o){this._logMessage("Symbol resolve requested: `{0}` ".format(e));var s=!0;this._externalDatafeed.resolveSymbol(e,(function(i){
+s&&console.warn("`resolveSymbol` should return result asynchronously. Use `setTimeout` with 0 interval to execute the callback function."),r._logMessage("Symbol resolved: `{0}`, SymbolInfo in server response {1}".format(e,JSON.stringify(i))),function(e){if(e.base_name||(e.base_name=[e.name]),e.legs||(e.legs=[e.name]),e.exchange||(e.exchange=e["exchange-listed"]),e.full_name||(e.full_name=e.symbol||(e.exchange?e.exchange+":"+e.name:e.name)),e.pro_name||(e.pro_name=e.full_name),e.data_status||(e.data_status="streaming"),e.ticker||(e.ticker=e.symbol||e.name),!e.session&&e["session-regular"]&&(e.session=e["session-regular"]),!e.minmov&&e.minmovement&&(e.minmov=e.minmovement),e.supported_resolutions)for(var t=0;th)){var d=0,p=a.valueAt(h)[TradingView.TIME_PLOT];if(pe&&n.logNormal("Study inputs migration is done, studyId: "+this._studyId+", inputs: "+JSON.stringify(r)),r},o.prototype._findMigration=function(e){for(var t=-1,i=this._maxFromVers,r=0;r=this._sessionEndMs?u.SessionStage.POST_SESSION:d(r.time_seconds_diff(e,this._sessionStartMs)/this._periodSec)},t.prototype.startOfBar=function(e){if(e===u.SessionStage.PRE_SESSION){var t=r.get_cal_from_unix_timestamp_ms(this._session.timezone,this._sessionStartMs-1),i=this._session.spec.alignToNearestSessionEnd(t,-1);return r.cal_to_utc(this._session.timezone,i)}if(e===u.SessionStage.POST_SESSION)return this._sessionEndMs;if(e<0)throw new Error("Negative offset is not supported");return this._sessionStartMs+r.time_seconds(this._periodSec*e)},t.prototype.endOfBar=function(e){if(e<0)throw new Error("Index cannot be negative");var t=this.startOfBar(e)+1e3*this._periodSec;return t>this._sessionEndMs?this._sessionEndMs:t},t.prototype.isLastBar=function(e,t){return t>=this._sessionStartMs+r.time_seconds(this._periodSec*(e+1)-1)},t.prototype.moveTo=function(e){
var t=this._session.timezone,i=r.utc_to_cal(t,e),n=this._session.spec.alignToSessionStart(i);this._sessionStartMs=r.cal_to_utc(t,i),r.add_minutes(i,n),this._sessionEndMs=r.cal_to_utc(t,i)},t.prototype.moveNext=function(){this.moveTo(this._sessionEndMs)},t}(f),m=i("OBgQ");function y(e,t){var i=r.clone(t),n=e.businessDaysToCalendarDays(i,1);n>1&&r.add_date(i,n-1);var o=e.leftBorderOfDailyBar(i);if(null===o)throw new Error("Cannot calculate left border of daily bar");return r.cal_to_utc(r.get_timezone(e.timezone()),o)}var g=function(e){function t(t,i,r,n,o){void 0===o&&(o=!1);var s=e.call(this)||this;return s._periodStart=-Number.MAX_VALUE,s._periodEnd=-Number.MAX_VALUE,s._periodLastBarStart=-Number.MAX_VALUE,s._periodStartDay=new m.a(0,0,0),s._periodEndDay=new m.a(0,0,0),s._period=r,s._sessionTgt=t,s._builder=n,s._useBusinessDays=o,s._sessionSrc=o?new p("Etc/UTC","24x7"):i||t,s}return Object(c.__extends)(t,e),t.prototype.builder=function(){return this._builder},t.prototype.alignTimeIfPossible=function(e){return this.tradingDayToSessionStart(e)},t.prototype.tradingDayToSessionStart=function(e){return this.moveTo(e),this.startOfBar(0)},t.prototype.indexOfBar=function(e){if(this._useBusinessDays){var t=m.a.fromCalendar(r.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e));return t.before(this._periodStartDay)?u.SessionStage.PRE_SESSION:this._periodEndDay.before(t)?u.SessionStage.POST_SESSION:0}return e=this._periodEnd?u.SessionStage.POST_SESSION:0},t.prototype.startOfBar=function(e){if(e===u.SessionStage.PRE_SESSION){var t=r.get_cal_from_unix_timestamp_ms(this._sessionTgt.timezone,this._periodStart-1),i=this._sessionTgt.spec.alignToNearestSessionEnd(t,-1);return r.cal_to_utc(this._sessionTgt.timezone,i)-1}return e===u.SessionStage.POST_SESSION||e>0?this._periodEnd:e===u.SessionStage.LASTBAR_SESSION?this._periodLastBarStart:this._periodStart},t.prototype.moveTo=function(e){var t=r.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e);this._sessionSrc.spec.correctTradingDay(t);var i=r.get_year(t),n=this._indexOfPeriodInYear(t),o=n+this._period,s=this._sessionTgt.spec,a=this._sessionTgt.timezone,l=this._builder.startOfPeriod(a,n,i);this._periodStart=y(s,l);var c=r.clone(l),u=s.businessDaysToCalendarDays(c,1);u>1&&r.add_date(c,u-1),this._periodStartDay=m.a.fromCalendar(c);var h=this._builder.startOfPeriod(a,o,i);this._periodEnd=y(s,h);var d=r.clone(h);for(r.add_date(d,-1);s.isCalWeekEnd(d);)r.add_date(d,-1);this._periodEndDay=m.a.fromCalendar(d),r.add_date(h,-1),function(e,t){for(;e.isCalWeekEnd(t);)r.add_date(t,-1)}(this._sessionTgt.spec,h),this._periodLastBarStart=y(s,h),(this._periodLastBarStart=this._periodLastBarStart},t.prototype.currentRange=function(){
return{from:this._periodStartDay,to:this._periodEndDay}},t.prototype.indexOfBarInYear=function(e){var t=r.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e),i=r.get_year(t),n=this._builder.indexOfPeriod(t),o=this._sessionTgt.timezone,s=this._builder.startOfPeriod(o,n,i),a=y(this._sessionTgt.spec,s);return s=r.get_cal_from_unix_timestamp_ms(r.get_timezone("Etc/UTC"),a),i=0&&(n-=7),d((n+i)/7))}var b=function(){function e(){}return e.prototype.indexOfPeriod=function(e){return r.get_day_of_year(e)-1},e.prototype.startOfPeriod=function(e,t,i){var n=r.days_per_year(i);return r.get_cal(r.get_timezone("Etc/UTC"),i,r.JANUARY,1+Math.min(t,n))},e}(),w=function(e){function t(t){var i=e.call(this)||this;return i._sessionsSpec=t,i}return Object(c.__extends)(t,e),t.prototype.indexOfPeriod=function(t){return e.prototype.indexOfPeriod.call(this,t)-function(e,t){var i=S(e,t),n=r.get_cal(r.get_timezone("Etc/UTC"),r.get_year(t),r.JANUARY,1);r.add_date(n,7*i);var o=i*e.weekEndsCount()+e.holidaysFromYearStart(n),s=r.get_day_of_year(t)-r.get_day_of_year(n);return o+s-e.calendarDaysToBusinessDays(n,s)}(this._sessionsSpec,t)},t.prototype.startOfPeriod=function(t,i,n){var o=7-this._sessionsSpec.weekEndsCount(),s=Math.max(0,d(i/o)-1),a=r.get_cal(r.get_timezone("Etc/UTC"),n,r.JANUARY,1),l=r.get_days_per_year(a);if(r.add_date(a,7*s),(i-=o*s-this._sessionsSpec.holidaysFromYearStart(a))>0){var c=this._sessionsSpec.businessDaysToCalendarDays(a,i);r.add_date(a,c)}var u=r.get_day_of_year(a)-1;return nr.get_days_per_year(n)?this.startOfPeriod(e,0,i+1):(r.add_date(n,s),n)},e}(),x=function(){function e(){}return e.prototype.indexOfPeriod=function(e){return r.get_month(e)
-},e.prototype.startOfPeriod=function(e,t,i){if(t<0){var n=d((11-t)/12);i-=n,t+=12*n}else t>r.DECEMBER&&(i++,t=r.JANUARY);return r.get_cal(r.get_timezone("Etc/UTC"),i,t,1)},e}();function T(e,t,i,r){void 0===r&&(r=!1);var n=o.Interval.parse(e),s=n.multiplier();return n.kind()===o.ResolutionKind.Minutes?new _(60*s,t):n.kind()===o.ResolutionKind.Seconds?new _(s,t):n.kind()===o.ResolutionKind.Range?new _(60*s,t):new g(t,i,s,function(e,t){switch(e){case o.ResolutionKind.Days:return new P(t);case o.ResolutionKind.Weeks:return new C(t);case o.ResolutionKind.Months:return new x}throw new Error("Unknown dwm resolution: "+e)}(n.kind(),t),r)}function L(e,t,i,r,n,a,l){var c,u,h=new p("Etc/UTC",e,t,i),d=o.Interval.parse(n+r),f=d.isDWM();f?(u=s(d,l),c=864e5):(u=d.inMilliseconds(),c=60*h.spec.findSession(0,0,0).getEntry().length()*1e3);var _=c/u,m=(f?7:7-h.spec.weekEndsCount())*_;return as.startOffset()+s.length()&&n===s.dayOfWeek()-1&&(n++,o-=1440),n===s.dayOfWeek()&&o>=s.startOffset()&&o0&&e.stroke(),this._data.fillBackground&&(e.fillStyle=this.getColor(),e.fill())}},e}()},InMJ:function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("Ocx9").DefaultProperty,o=i("hayr").propertyPages,s=window.t("Flat Bottom");function a(e,t){this._constructor="LineToolFlatBottom";var n=t||a.createProperties();r.call(this,e,n),this.version=a.version,i.e("lt-pane-views").then(function(e){var t=i("gr7S").FlatBottomPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(a,r),a.version=1,a.prototype.pointsCount=function(){return 3},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Flat Bottom"},a.prototype.hasEditableCoordinates=function(){return!1},a.prototype.addPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),r.prototype.addPoint.call(this,e)},a.prototype.setLastPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),r.prototype.setLastPoint.call(this,e)},a.prototype.setPoint=function(e,t,i){if(i&&i.shift()&&1===e){this._snapPoint45Degree(t,this.points()[0])}if(2===e)this._points[1].index=t.index;else if(3===e)return this._points[0].index=t.index,void(this._points[2].price=t.price);r.prototype.setPoint.call(this,e,t)},a.prototype.canHasAlert=function(){return!0},a.prototype._getAlertPlots=function(){var e=this._points[0],t=this._points[1],i=[];e.index<=t.index?(i.push(e),i.push(t)):(i.push(t),i.push(e));var r=this._points[2];r.time=t.time,r.index=t.index;var n,o,s,a,l={price:r.price,time:e.time,index:e.index},c=[];r.index<=l.index?(c.push(r),c.push(l)):(c.push(l),c.push(r)),i[0].price>c[0].price?(n=i,o=c):c[0].price>i[0].price||c[1].price>i[1].price?(n=c,o=i):(n=i,o=c);var u=this.properties().extendLeft.value(),h=this.properties().extendRight.value();return e.index<=t.index?(s=u,a=h):(s=h,a=u),[this._linePointsToAlertPlot(n,"Upper",s,a),this._linePointsToAlertPlot(o,"Lower",u,a)]},a.prototype.getInputsPropertyPage=function(){return null},a.prototype.getStylesPropertyPage=function(){return o.LineToolFlatBottomStylesPropertyPage},a.prototype._getPropertyDefinitionsViewModelClass=function(){
-return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("vm8R").GeneralTrendFiguresDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new n("linetoolflatbottom",e);return a._configureProperties(t),t},a._configureProperties=function(e){r._configureProperties(e)},t.LineToolFlatBottom=a},IzGk:function(e,t,i){"use strict";i.r(t),i.d(t,"translatedIntervalString",(function(){return n}));i("YFKU");var r=i("pPtI");function n(e){var t=Object(r.getTranslatedResolutionModel)(e,!0);return null===t?e:t.multiplier+(t.mayOmitShortKind?"":t.shortKind)}},J2xC:function(e,t,i){e.exports={"css-value-header-toolbar-height":"38px"}},JOqt:function(e,t,i){"use strict";i.r(t),i.d(t,"debounce",(function(){return r}));var r=function(e,t){var i,r,n=0;function o(){e.apply(r,i)}return function(){r=this,i=arguments,clearTimeout(n),n=setTimeout(o,t)}}},JT5O:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyMarket",(function(){return o}));var r=i("aIyQ"),n=i.n(r),o=function(){function e(e,t){this.visibilityChanged=new n.a,this._dialogPromise=null,this._dialog=null,this._chartWidgetCollection=e,this._options=t}return e.prototype.isVisible=function(){return null!==this._dialog&&this._dialog.isVisible()},e.prototype.show=function(e){var t;null===this._dialog&&this._requestDialog(e),null===(t=this._dialog)||void 0===t||t.open(e)},e.prototype.hide=function(){var e;null===(e=this._dialog)||void 0===e||e.hide()},e.prototype.onCustomScriptModified=function(){var e;null===(e=this._dialog)||void 0===e||e.updateUserStudies()},e.prototype.resetAllPages=function(){var e;null===(e=this._dialog)||void 0===e||e.resetAllStudies()},e.prototype._requestDialog=function(e){var t=this;if(null===this._dialogPromise){var r=void 0;r=Promise.all([i.e("react"),i.e(3),i.e(4),i.e(6),i.e(7),i.e(9),i.e(11),i.e(16),i.e(32),i.e(63),i.e(64),i.e(72),i.e(0),i.e(5),i.e(13),i.e("study-market")]).then(i.bind(null,"zbLM")).then((function(e){return new e.IndicatorsLibraryContainer(t._chartWidgetCollection,t._options)})),this._dialogPromise=r.then((function(i){t._dialog=i,t._dialog.getVisibilityChanged().subscribe(null,(function(e){t.visibilityChanged.fire(e)})),t._dialog.open(e)}))}return this._dialogPromise},e}()},JcHK:function(e,t,i){"use strict";function r(e){return e.getAll().some((function(e){return e.isInitialized()}))}function n(e,t){var i=e.getAll(),r=function(){t(),i.forEach((function(e){e.chartWidgetInitialized.unsubscribe(null,r)}))};i.forEach((function(e){e.chartWidgetInitialized.subscribe(null,r,!0)}))}i.r(t),i.d(t,"isAnyChartWidgetInitialized",(function(){return r})),i.d(t,"waitAnyChartWidgetInitialized",(function(){return n}))},JjUe:function(e,t,i){"use strict";i.r(t),i.d(t,"OverlayDataWindowView",(function(){return S}));var r=i("mrSG"),n=i("ivNn"),o=i("4miz"),s=i("GH0z"),a=i("k9/m"),l=i("7qT/"),c=i("Ialn"),u=i("qFKp"),h=i("38az"),d=i("e92V"),p=i("mMWL"),f=i("Tmoa"),_=u.CheckMobile.any(),m=_&&!0,y=new s.PercentageFormatter,g=window.t("n/a"),v=g+" ("+g+"%)",S=function(e){function t(t,i){
-var r=e.call(this)||this;return r._invalidated=!0,r._study=t,r._model=i,r._items.push(new o.a(window.t("Open"),"")),r._items.push(new o.a(window.t("High"),"")),r._items.push(new o.a(window.t("Low"),"")),r._items.push(new o.a(window.t("Close"),"")),r._items.push(new o.a("","")),r._items.push(new o.a("","")),r._items.push(new o.a(window.t("Change"),"")),r.update(),r}return Object(r.__extends)(t,e),t.prototype.items=function(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._items},t.prototype.update=function(){this._invalidated=!0},t.prototype._updateImpl=function(){if(this._header=this._study.title(),this._items[0].setValue(g),this._items[1].setValue(g),this._items[2].setValue(g),this._items[3].setValue(g),this._items[6].setValue(v),!this._model.timeScale().isEmpty()&&0!==this._study.data().size()){for(var e=this._showLastPriceAndChangeOnly(),t=0,i=this._items;t=0?0:1,basedOnPrevClose:n.change>=0?0:1}}}else{var o=this._study.data().search(i-1,a.PlotRowSearchMode.NearestLeft,1),s=o&&o.value[4]||null;if(null!==s)return{values:{change:e-s,percentChange:Object(l.a)(s,e)},priceDirection:{basedOnCurrentBar:e>=t?0:1,basedOnPrevClose:e>=s?0:1}}}return{priceDirection:{basedOnCurrentBar:e>=t?0:1,basedOnPrevClose:e>=t?0:1}}},t.prototype._color=function(e,t,i){var r=Object(f.resetTransparency)(h.SeriesBarColorer.upColor(this._study.properties())),n=Object(f.resetTransparency)(h.SeriesBarColorer.downColor(this._study.properties()));if(i&&!m)return t.priceDirection?r:n;var o=this._study.properties().childs().style.value();if(10===o){var s=this._study.barColorer().barStyle(e,!1)
-;return null!=s.barBorderColor?Object(f.resetTransparency)(s.barBorderColor):Object(f.resetTransparency)(s.barColor)}var a=!1;return 0===o?a=this._study.properties().childs().barStyle.childs().barColorsOnPrevClose.value():1===o?a=this._study.properties().childs().candleStyle.childs().barColorsOnPrevClose.value():9===o&&(a=!0),a?0===t.priceDirection.basedOnPrevClose?r:n:0===t.priceDirection.basedOnCurrentBar?r:n},t}(o.b)},JmuD:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)},t.hasProperty=function(e,t){return t in e}},K4L1:function(e,t,i){"use strict";var r=i("Eyy1").assert,n=i("lCO3").Version,o=i("uOxu").getLogger("Chart.Study.Versioning"),s=i("Wt0y"),a=i("0YCj"),l=i("TcSq").extractPineId,c=i("Si3H").migrateMetaInfoAndPropState;function u(e,t){if(!e)throw new Error("No studies metainfo");var r=i("EyEd");if(this._studiesMetainfo=e,!t)throw new Error("No studies migrations");this._studiesMigrations=t,this._migrations={};for(var n=0;n=22)return t;for(var i={},r=0,n=0;;){var o=t[n];if(void 0===o)break;var s=t[o.id];o.isFake&&(o.id="in_"+r++),i[n]=o,i[o.id]=s,n++}return i}]}u.prototype.updateMetaInfo=function(e){if(!e)return e;r(!e.isTVScript,"This method should update only built-in java indicators metaInfo. For Pine indicators use updateMetaInfoAsync");for(var t=null,i=this._studiesMetainfo,n=0;n=12&&l<=26){var c={};for(s=0;s=12&&c<=26){var h=n.columns;n.columns=[];for(var d=0;dt&&o.logWarn("Bad integer input max value in metaInfo id="+e.id+" title="+e.description))}},u._fixInputsMaxValue=function(e,t){if(!TradingView.isAbsent(t)){var i=u.INPUT_MAX_VALUE;if(t.inputs)for(var r=0;ri&&(a.max=i))}if(e&&e.inputs){var n=u.splitInputs(e.inputs),o=n.arr;for(var s in o){var a;"integer"===(a=o[s]).type&&(a.max&&a.max>i&&(a.max=i))}e.inputs=TradingView.merge(n.obj,n.arr)}}},u.prototype.patchPropsStateAndMetaInfo=function(e,t,i){"Script$BOOKER"!==t.productId||t.alerts||delete e.alerts,u._fixInputsOrder(e,t),u._fixInputsMaxValue(e,t);var r=u.splitInputs(e.inputs);e.inputs=r.obj;var n=a.versionOf(t);ni&&(i=n))}e[i+1]=t},u.splitInputs=function(e){var t={},i={};for(var r in e)isNumber(parseInt(r,10))?t[r]=e[r]:i[r]=e[r];return{arr:t,obj:i}},u.findInputKeyById=function(e,t){var i=null;for(var r in e)if(isNumber(parseInt(r,10))&&e[r].id===t){i=r;break}return i},u.getInputKeyById=function(e,t){var i=u.findInputKeyById(e,t);if(!i)throw new Error("Cannot find input with id: "+t);return i},e.exports=u},K8V9:function(e,t){e.exports=''},K9GE:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dur=350,t.easingFunc={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:(4-2*e)*e-1},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){
-return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}};var r=function(){function e(e,t,i,r){this._mX1=e,this._mY1=t,this._mX2=i,this._mY2=r}return e.prototype.easingFunc=function(e){return this._mX1===this._mY1&&this._mX2===this._mY2?e:this._calcBezier(this._getTForX(e))},e.prototype._a=function(e,t){return 1-3*t+3*e},e.prototype._b=function(e,t){return 3*t-6*e},e.prototype._c=function(e){return 3*e},e.prototype._calcBezier=function(e){return((this._a(this._mY1,this._mY2)*e+this._b(this._mY1,this._mY2))*e+this._c(this._mY1))*e},e.prototype._getSlope=function(e){return 3*this._a(this._mX1,this._mX2)*e*e+2*this._b(this._mX1,this._mX2)*e+this._c(this._mX1)},e.prototype._getTForX=function(e){for(var t=e,i=0;i<4;++i){var r=this._getSlope(t);if(0===r)return t;t-=(this._calcBezier(t)-e)/r}return t},e}();t.CubicBezier=r,t.color={black0:"#000",black20:"#2b2d36",black25:"#2b2e37",black27:"#2f3241",black30:"#212121",black70:"#4A4A4A",black80:"#535353",black100:"#646464",black110:"#757575",black140:"#8A8A8A",black170:"#ADAEB0",black180:"#b4b4b4",black200:"#C8C8C8",black220:"#DADDE0",black230:"#ECECEC",black240:"#F2F2F2",black248:"#F8F8F8",black255:"#FFF",brand:"#3BB3E4",brandHover:"#3BABD8",brandActive:"#3898C2",brandDown:"#049DDC",brand220:"#3BB3E0",brand255:"#3BB3FF",brandNew:"#37A6EF",brandNew2:"#2196F3",spinner:"#00A2E2",brandMedium80:"#3C4650",brandMedium90:"#465a6e",brandMedium100:"#627384",brandMedium120:"#758696",brandMedium150:"#94959C",brandMedium190:"#9DB2BD",brandMedium220:"#E9EFF2",brandMedium230:"#EAECEF",brandMedium240:"#F1F3F6",brandDark:"#2A2C39",brandDark50:"#252733",brandDark45:"#20222D",brandDarkText:"#6A6B74",danger:"#FF4A68",dangerHover:"#F24965",dangerDown:"#FF173E",success:"#3CBC98",success55:"#37BC9B",success250:"#00FFC0",successHover:"#38B395",successDown:"#00A97F",attention:"#FFC84A",attention50:"#F89E30",growing:"#37bc9b",falling:"#ff4a68"}},KUek:function(e,t,i){"use strict";i.r(t);var r,n,o=i("Eyy1"),s=i("aIyQ"),a=i.n(s),l=i("k9/m"),c=i("hsV8"),u=i("jy4L"),h=i("w4Ji"),d=i("jenN"),p=i("uOxu"),f=Object(p.getLogger)("Chart.StudyDataSource");!function(e){e[e.Undefined=0]="Undefined",e[e.Loading=1]="Loading",e[e.Completed=2]="Completed",e[e.Error=3]="Error"}(r||(r={})),function(e){e[e.Idle=0]="Idle",e[e.AwaitingConnection=1]="AwaitingConnection",e[e.AwaitingParent=2]="AwaitingParent",e[e.AwaitingFirstDataUpdate=3]="AwaitingFirstDataUpdate",e[e.Active=4]="Active"}(n||(n={}));var _=function(){function e(e,t,i,o){this._inputs=null,this._status=n.Idle,this._studyId=null,this._turnaroundCounter=1,this._studyStatus={type:r.Undefined},this._studyStatusChanged=new a.a,this._graphics=new d.LiveStudyGraphics,this._dataCleared=new a.a,this._dataUpdated=new a.a,this._boundOnGatewayIsConnectedChanged=this._onGatewayIsConnectedChanged.bind(this),this._ongoingDataUpdate=Promise.resolve(),this._gateway=e,this._metaInfo=o,this._series=t,this._turnaroundPrefix=i,this._plots=new l.PlotList(Object(h.studyPlotFunctionMap)(o),h.studyEmptyPlotValuePredicate),
-this._gateway.isConnected().subscribe(this._boundOnGatewayIsConnectedChanged)}return e.prototype.destroy=function(){this.stop(),this._gateway.isConnected().unsubscribe(this._boundOnGatewayIsConnectedChanged),this._dataUpdated.destroy(),this._dataCleared.destroy(),this._studyStatusChanged.destroy()},e.prototype.metaInfo=function(){return this._metaInfo},e.prototype.inputs=function(){return this._inputs},e.prototype.setInputs=function(e){this._inputs=e,null!==this._studyId&&(this._turnaroundCounter++,this._onStudyStatusChangedTo({type:r.Undefined}),this._gateway.modifyStudy(this._studyId,this._turnaround(),e,this._onMessage.bind(this)),this._status===n.Active&&this._changeStatusTo(n.AwaitingFirstDataUpdate))},e.prototype.isStarted=function(){return this._status!==n.Idle},e.prototype.isActive=function(){return this._status===n.Active},e.prototype.start=function(){this.isStarted()?f.logNormal("start: data source is already started, nothing to do"):(Object(o.assert)(null!==this._inputs,"Inputs should be defined when starting a study data source"),this._gateway.isConnected().value()?this._createStudy():this._changeStatusTo(n.AwaitingConnection))},e.prototype.stop=function(){this.isStarted()?(null!==this._studyId&&(this._gateway.removeStudy(this._studyId),this._studyId=null,this._onStudyStatusChangedTo({type:r.Undefined})),this._changeStatusTo(n.Idle)):f.logNormal("stop: data source is already stopped, nothing to do")},e.prototype.studyId=function(){return this._studyId},e.prototype.studyStatus=function(){return this._studyStatus},e.prototype.studyStatusChanged=function(){return this._studyStatusChanged},e.prototype.plots=function(){return this._plots},e.prototype.graphics=function(){return this._graphics},e.prototype.clearData=function(){this._plots.clear(),this._graphics.clear(),this._dataCleared.fire()},e.prototype.stopAndStealData=function(){Object(o.assert)(this._status===n.Active,"Couldn't steal data from non-active data source"),this.stop();var e=this._plots,t=this._graphics.extract();return this._plots=new l.PlotList(Object(h.studyPlotFunctionMap)(this._metaInfo),h.studyEmptyPlotValuePredicate),{plots:e,graphics:t}},e.prototype.dataCleared=function(){return this._dataCleared},e.prototype.dataUpdated=function(){return this._dataUpdated},e.prototype._changeStatusTo=function(e){Object(o.assert)(this._status!==e,"Source and destination status should be distinct"),f.logNormal("Status changed from "+n[this._status]+" to "+n[e]),this._status=e},e.prototype._createStudy=function(){var e=this._series.seriesId();null!=e?this._createStudyUsingParentId(e):(this._changeStatusTo(n.AwaitingParent),this._series.dataEvents().completed().subscribe(this,this._onSeriesCompleted,!0))},e.prototype._createStudyUsingParentId=function(e){Object(o.assert)(this._status!==n.Active,'Status should not be "Active" when creating a study'),Object(o.assert)(this._studyStatus.type===r.Undefined,'Study status should be "Undefined" when creating a study'),Object(o.assert)(null===this._studyId,"Study id should be empty when creating a study"),
-this._studyId=Object(u.makeNextStudyId)(),this._gateway.createStudy(this._studyId,this._turnaround(),e,this._metaInfo.fullId+"!",Object(o.ensureNotNull)(this._inputs),this._onMessage.bind(this)),this._changeStatusTo(n.AwaitingFirstDataUpdate)},e.prototype._onGatewayIsConnectedChanged=function(e){e?this._onGatewayConnected():this._onGatewayDisconnected()},e.prototype._onGatewayConnected=function(){this._status===n.AwaitingConnection&&this._createStudy()},e.prototype._onGatewayDisconnected=function(){this._status!==n.Idle&&this._status!==n.AwaitingConnection&&(this._studyId=null,this._changeStatusTo(n.AwaitingConnection),this._studyStatus.type!==r.Undefined&&this._onStudyStatusChangedTo({type:r.Undefined})),this._turnaroundCounter=1},e.prototype._onSeriesCompleted=function(){this._status===n.AwaitingParent&&this._createStudyUsingParentId(Object(o.ensure)(this._series.seriesId()))},e.prototype._onStudyStatusChangedTo=function(e){var t=this._studyStatus;this._studyStatus=e,f.logNormal("Study status type changed from "+r[t.type]+" to "+r[e.type]),this._studyStatusChanged.fire(t,e)},e.prototype._onMessage=function(e){if("data_update"===e.method){var t=e.params,i=t.customId,r=t.turnaround,n=t.plots,o=t.nonseries;i===this._studyId&&this._checkTurnaround(r)&&this._onDataUpdate(n,o)}else if("study_loading"===e.method){var s=e.params,a=(i=s[0],r=s[1],s[2]);i===this._studyId&&this._checkTurnaround(r)&&this._onStudyLoading(a)}else if("study_completed"===e.method){var l=e.params;i=l[0],r=l[1],a=l[2];i===this._studyId&&this._checkTurnaround(r)&&this._onStudyCompleted(a)}else if("study_error"===e.method){var c=e.params,u=(i=c[0],r=c[1],c[2]),h=c[3];a=c[4];i===this._studyId&&this._checkTurnaround(r)&&this._onStudyError(u,h,a)}},e.prototype._onDataUpdate=function(e,t){var i=Object(c.unpackNonSeriesData)(t.d);return this._ongoingDataUpdate=this._ongoingDataUpdate.then((function(){return i}),(function(){return i})).then(this._onDataUnpacked.bind(this,e,t.indexes)),this._ongoingDataUpdate},e.prototype._onDataUnpacked=function(e,t,i){this._status!==n.Idle&&(this._status===n.AwaitingFirstDataUpdate&&(this._changeStatusTo(n.Active),this.clearData()),this._mergePlots(e),null!==i&&(i.indexes_replace?(Object(o.assert)("nochange"!==t),this._graphics.replaceIndexesTo(t)):("nochange"!==t&&this._graphics.replaceIndexesTo(t),void 0!==i.graphicsCmds&&this._graphics.processCommands(i.graphicsCmds,this._metaInfo.graphics))),this._dataUpdated.fire(e,i,t))},e.prototype._onStudyLoading=function(e){this._onStudyStatusChangedTo({type:r.Loading,startTime:Date.now()})},e.prototype._onStudyError=function(e,t,i){this.clearData(),this._onStudyStatusChangedTo({type:r.Error,reason:e})},e.prototype._onStudyCompleted=function(e){this._onStudyStatusChangedTo({type:r.Completed})},e.prototype._mergePlots=function(e){this._plots.merge(e)},e.prototype._turnaround=function(){return""+this._turnaroundPrefix+this._turnaroundCounter},e.prototype._checkTurnaround=function(e){var t=this._turnaround()
-;return e===t||e===this._series.turnaround()||e===this._series.turnaround()+"_"+t},e}(),m=i("kcTO"),y=i("Ocx9"),g=i("Kxc7");i.d(t,"sessionsPreferencesDefault",(function(){return S})),i.d(t,"Sessions",(function(){return b}));var v=new m.PriceFormatter,S={graphics:{backgrounds:{outOfSession:{color:"#2196F3",transparency:92,visible:!1}},vertlines:{sessBreaks:{color:"#4985e7",style:2,visible:!1,width:1}}}},b=function(){function e(e,t){var i=this;this._studySource=null,this._paneViews=[],this._metaInfo=null,this._destroyed=!1,this._isStarted=!1,this._loadedGraphics=null,this._model=e,this._doubleClickHandler=t;var r=e.mainSeries();this._properties=new y.DefaultProperty("sessions"),this._removeDuplicateProperties(),this._properties.subscribe(this,this._onPropertiesChanged),e.studyMetaInfoRepository().findById({type:"java",studyId:"Sessions@tv-basicstudies"}).then((function(t){i._destroyed||null===i._loadedGraphics&&(i._setMetaInfo(t),null!==i._metaInfo&&(i._studySource=new _(e.chartApi(),r,"sessions_",i._metaInfo),i._createPaneViews(),i._studySource.dataCleared().subscribe(i,i.updateAllViews),i._studySource.dataUpdated().subscribe(i,i.updateAllViews),i._studySource.setInputs({}),i._processHibernate()))})),e.timeScale().onReset().subscribe(this,this._clearData),e.timeScale().logicalRangeChanged().subscribe(this,this.updateAllViews),e.mainSeries().properties().extendedHours.subscribe(this,this._updateVisibleOutOfSessionBackground),e.mainSeries().properties().interval.subscribe(this,this._processHibernate),this._updateVisibleOutOfSessionBackground(e.mainSeries().properties().extendedHours)}return e.prototype.start=function(){this._isStarted=!0,this._processHibernate()},e.prototype.restart=function(){this._clearData(),g.enabled("stop_study_on_restart")&&this.stop(),this.start()},e.prototype.isStarted=function(){return this._isStarted},e.prototype.stop=function(){this._isStarted=!1,null!==this._studySource&&this._studySource.stop()},e.prototype.paneViews=function(e){return e.containsMainSeries()?this._paneViews:[]},e.prototype.priceAxisViews=function(e,t){return[]},e.prototype.updateAllViews=function(){this._paneViews.forEach((function(e){return e.update()}))},e.prototype.destroy=function(){this._destroyed=!0,null!==this._studySource&&(this._studySource.dataCleared().unsubscribe(this,this.updateAllViews),this._studySource.dataUpdated().unsubscribe(this,this.updateAllViews),this._studySource.destroy(),this._studySource=null),this._model.timeScale().logicalRangeChanged().unsubscribe(this,this.updateAllViews),this._model.timeScale().onReset().unsubscribe(this,this._clearData),this._model.mainSeries().properties().extendedHours.unsubscribe(this,this._updateVisibleOutOfSessionBackground),this._model.mainSeries().properties().interval.unsubscribe(this,this._processHibernate),this._properties.unsubscribe(this,this._onPropertiesChanged)},e.prototype.series=function(){return this._model.mainSeries()},e.prototype.priceScale=function(){return this.series().priceScale()},e.prototype.graphics=function(){
-return this._loadedGraphics||Object(o.ensureNotNull)(this._studySource).graphics()},e.prototype.properties=function(){return this._properties},e.prototype.graphicsInfo=function(){return Object(o.ensureNotNull)(this._metaInfo).graphics},e.prototype.firstValue=function(e){return this._model.mainSeries().firstValue()},e.prototype.formatter=function(){return v},e.prototype.state=function(e){var t={properties:this._properties.state()};return e&&null!==this._metaInfo&&(t.data={graphics:Object(d.saveStudyGraphics)(this.graphics()),metaInfo:this._metaInfo}),t},e.prototype.restoreState=function(e,t){this._properties.mergeAndFire(e.properties),this._removeDuplicateProperties(),this._updateVisibleOutOfSessionBackground(this._model.mainSeries().properties().extendedHours),void 0!==e.data&&t&&(this._loadStudyGraphics(e.data.graphics),this._setMetaInfo(e.data.metaInfo),this._createPaneViews())},e.prototype.restoreOldState=function(e,t){var i={properties:{graphics:e.state.graphics}};void 0!==e.data&&void 0!==e.metaInfo&&t&&(i.data={metaInfo:e.metaInfo,graphics:e.data.graphics}),this.restoreState(i,t)},e.prototype.applyPreferences=function(e){this._properties.mergePreferences(e)},e.prototype.metaInfo=function(){return Object(o.ensureNotNull)(this._metaInfo)},e.prototype._loadStudyGraphics=function(e){if(void 0!==e.backgrounds){var t=e.backgrounds.findIndex((function(e){return"inSession"===e.styleId}));e.backgrounds.splice(t,1)}this._loadedGraphics=Object(d.loadStudyGraphics)(e)},e.prototype._setMetaInfo=function(e){void 0!==e.graphics.backgrounds&&void 0!==e.graphics.backgrounds.inSession&&delete e.graphics.backgrounds.inSession,this._metaInfo=e},e.prototype._updateVisibleOutOfSessionBackground=function(e){this._outOfSessionVisibilityProperty().setValue(e.value())},e.prototype._clearData=function(){null!==this._studySource&&this._studySource.clearData()},e.prototype._createPaneViews=function(){var e=this,t={mouseDoubleClickHandler:this._doubleClickHandler};Object(d.createGraphicsPaneViews)(this,this._model,t).then((function(t){e._paneViews=t,e._model.lightUpdate()}))},e.prototype._onPropertiesChanged=function(){this._processHibernate(),this.updateAllViews()},e.prototype._processHibernate=function(){if(null!==this._studySource){var e=this._canBeHibernated(),t=this._isHibernated(),i=this._studySource.isStarted();!t&&e&&i?this._studySource.stop():!t||e||i||this._studySource.start()}},e.prototype._canBeHibernated=function(){return this._model.mainSeries().isDWM()||!this._outOfSessionVisibilityProperty().value()&&!this._vertLinesVisibleProperty().value()},e.prototype._isHibernated=function(){return this._isStarted&&(null===this._studySource||!this._studySource.isStarted())},e.prototype._outOfSessionVisibilityProperty=function(){return this._properties.childs().graphics.childs().backgrounds.childs().outOfSession.childs().visible},e.prototype._vertLinesVisibleProperty=function(){return this._properties.childs().graphics.childs().vertlines.childs().sessBreaks.childs().visible},e.prototype._removeDuplicateProperties=function(){
-this._properties.hasChild("properties")&&(this._properties.removeProperty("properties"),Object(y.saveDefaultProperties)(!0),this._properties.childChanged("",null),Object(y.saveDefaultProperties)(!1))},e}()},KcY8:function(e,t,i){"use strict";var r=i("mrSG"),n=i("aO4+"),o=i("f6yo"),s=i("Tmoa"),a=i("Ialn"),l=i("8Uy/"),c=i("jFln"),u=i("ikwP"),h=i("VdBB"),d=i("qFKp").CheckMobile.any()?10:0,p=function(){function e(e,t){this.setData(e,t)}return e.prototype.setData=function(e,t){this._data=Object(r.__assign)({},e),this._commonData=Object(r.__assign)({},t)},e.prototype.draw=function(e,t,i,r,n,o){if(this._data.visible){e.font=t.font;var h,d=Math.floor((this._data.tickVisible?t.tickLength:0)*o),p=Math.floor((this._data.borderVisible?t.borderSize:0)*o),f=Math.floor(t.paddingTop*o),_=Math.floor(t.paddingBottom*o),m=Math.floor(t.paddingInner*o),y=Math.floor(t.paddingOuter*o),g=this._data.text,v=Math.round(t.baselineOffset*o),S=void 0!==this._data.labelIcon,b=Math.max(1,Math.floor(o)),w=Math.floor(t.fontSize*o)+f+_;if(w%2!=b%2&&(w+=1),S)h=w;else{var P=Math.ceil(i.measureText(e,g));h=Math.round(P*o)+d+p+m+y}var C=this._commonData.coordinate;this._commonData.fixedCoordinate&&(C=this._commonData.fixedCoordinate);var x,T,L="right"===n,I=this._getOffsetScaled(L,r,o),M=Math.ceil(r*o),O=L?M:0,A=O;e.fillStyle=Object(s.resetTransparency)(this._commonData.background),e.lineWidth=1,Object(c.setLineStyle)(e,l.LINESTYLE_SOLID),e.lineCap="butt";var k=Math.round(C*o)-Math.floor(.5*o),E=Math.floor(k+b/2-w/2),D=E+w;if(g||S){if(L?(x=O-d,T=(A=O-h)+y):(A=O+h,x=O+d,T=O+p+d+m),O+=I,A+=I,x+=I,e.beginPath(),e.moveTo(O,E),e.lineTo(A,E),e.lineTo(A,D),e.lineTo(O,D),e.fill(),0!==I&&this._data.fillOffset){e.fillStyle=t.paneBackgroundColor;var V=L?Math.ceil(r*o)+1:0;e.beginPath(),e.moveTo(O,E),e.lineTo(V,E),e.lineTo(V,D),e.lineTo(O,D),e.fill()}if(S){switch(this._data.labelIcon){case 0:this._drawPlusIcon(e,O,A,E,k,D,b)}return}this._data.tickVisible&&(e.fillStyle=this._commonData.color,e.fillRect(O,k,x-O,b)),e.textAlign="left",e.fillStyle=this._commonData.color,Object(u.drawScaled)(e,o,(function(){e.fillText(g,(T+I)/o,(D-_-v)/o)}))}if(this._data.secondLine){var B=Math.ceil(i.measureText(e,this._data.secondLine)*o)+m+y;e.fillStyle=Object(s.resetTransparency)(this._commonData.background),this._data.text&&(E+=w+b,D+=w+b),L?(O=(A=Math.min(A,M-B))+B,T=A+y):(A=(O=Math.max(A-B,p))+B,T=O+m),O+=I,A+=I,e.beginPath(),e.moveTo(O,E),e.lineTo(A,E),e.lineTo(A,D),e.lineTo(O,D),e.fill(),e.textAlign="left",e.fillStyle=this._commonData.color;var R=this._data.secondLine;Object(u.drawScaled)(e,o,(function(){e.fillText(Object(a.startWithLTR)(R),(T+I)/o,(D-_-v)/o)}))}}},e.prototype.height=function(e,t){if(!this._data.visible)return 0;var i=e.fontSize+e.paddingTop+e.paddingBottom;return this._data.secondLine&&t?2*i+1:i},e.prototype.hitTest=function(e){var t=this._data.hitTestData;if(void 0===t)return null
-;var i=this._data.offset,r=Object(n.box)(new n.Point(t.xl+i-d,t.y-d),new n.Point(t.xl+i+t.containerWidth+d,t.y+t.containerHeight+d)),s=t.left&&Object(o.pointInBox)(e,r),a=Object(n.box)(new n.Point(t.xr-i-d,t.y-d),new n.Point(t.xr-i+t.containerWidth+d,t.y+t.containerHeight+d)),l=t.right&&Object(o.pointInBox)(e,a);if(s||l){var c=s?"left":"right";return new h.HitTestResult(h.HitTestResult.CUSTOM,{mouseClickHandler:void 0===t.mouseClickHandler?void 0:t.mouseClickHandler.bind(this,e,c),tooltip:t.tooltip})}return null},e.prototype._getOffsetScaled=function(e,t,i){var r=e?-1:1,n=0===this._data.offset?0:r*this._data.offset,o=0===n?0:r*Math.max(1,Math.round(Math.abs(n)*i));return e&&t*i%1!=0&&(o=r*(Math.abs(o)+1)),o},e.prototype._drawPlusIcon=function(e,t,i,r,n,o,s){e.fillStyle=this._commonData.color;var a=Math.abs(t-i),l=Math.round(.5*a);l%2!=s%2&&(l+=1);var c=Math.floor((a-l)/2),u=Math.min(t,i),h=u+Math.floor(a/2-s/2);e.fillRect(u+c,n,l,s),e.fillRect(h,r+c,s,l)},e}();i.d(t,"a",(function(){return f}));var f=function(){function e(e){this._commonRendererData={coordinate:0,color:"#FFF",background:"#000"},this._axisRendererData={text:"",visible:!1,tickVisible:!0,borderVisible:!0,offset:0},this._paneRendererData={text:"",visible:!1,tickVisible:!1,borderVisible:!1,offset:1,fillOffset:!0},this._invalidated=!0,this._axisRenderer=new(e||p)(this._axisRendererData,this._commonRendererData),this._paneRenderer=new(e||p)(this._paneRendererData,this._commonRendererData)}return e.prototype.text=function(){return this._axisRendererData.text},e.prototype.secondLineText=function(){return this._axisRendererData.secondLine},e.prototype.background=function(){return this._commonRendererData.background},e.prototype.color=function(){return this.generateTextColor(this.background())},e.prototype.generateTextColor=function(e){return Object(s.colorFromBackground)(e)},e.prototype.coordinate=function(){return this._updateRendererDataIfNeeded(),this._commonRendererData.coordinate},e.prototype.floatCoordinate=function(){return this._updateRendererDataIfNeeded(),this._commonRendererData.floatCoordinate||this._commonRendererData.coordinate},e.prototype.update=function(){this._invalidated=!0},e.prototype.height=function(e,t){return void 0===t&&(t=!1),Math.max(this._axisRenderer.height(e,t),this._paneRenderer.height(e,t))},e.prototype.getFixedCoordinate=function(){return this._commonRendererData.fixedCoordinate||0},e.prototype.setFixedCoordinate=function(e){this._commonRendererData.fixedCoordinate=e},e.prototype.isVisible=function(){return this._updateRendererDataIfNeeded(),this._axisRendererData.visible||this._paneRendererData.visible},e.prototype.isAxisLabelVisible=function(){return this._updateRendererDataIfNeeded(),this._axisRendererData.visible},e.prototype.isPaneLabelVisible=function(){return this._updateRendererDataIfNeeded(),this._paneRendererData.visible},e.prototype.renderer=function(){return this._updateRendererDataIfNeeded(),this._axisRenderer.setData(this._axisRendererData,this._commonRendererData),
-this._paneRenderer.setData(this._paneRendererData,this._commonRendererData),this._axisRenderer},e.prototype.paneRenderer=function(){return this._updateRendererDataIfNeeded(),this._axisRenderer.setData(this._axisRendererData,this._commonRendererData),this._paneRenderer.setData(this._paneRendererData,this._commonRendererData),this._paneRenderer},e.prototype.setPaneRendererLabelIcon=function(e){this._paneRendererData.labelIcon=e},e.prototype._updateRendererDataIfNeeded=function(){this._invalidated&&(this._updateRendererData(this._axisRendererData,this._paneRendererData,this._commonRendererData),this._invalidated=!1)},e}()},Ke3L:function(e,t,i){"use strict";i.r(t),i.d(t,"ProjectionSeriesPriceAxisView",(function(){return l}));var r=i("mrSG"),n=i("Eyy1"),o=i("k9/m"),s=i("TQMj"),a=i("oXaB"),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.lastPrice=function(){return this._getSource().data().lastProjectionPrice},t.prototype._updateRendererData=function(e,t,i){e.visible=!1,t.visible=!1;var r=this._getData().model,s=this._getSource(),l=s.priceScale(),c=r.timeScale(),u=this.lastPrice();if(!c.isEmpty()&&!l.isEmpty()&&void 0!==u){var h=c.visibleBarsStrictRange();if(null!==h){var d=h.firstBar(),p=h.lastBar(),f=s.data(),_=f.search(p,o.PlotRowSearchMode.NearestLeft);if(null!==_){var m=s.nearestIndex(d,o.PlotRowSearchMode.NearestRight);if(void 0!==m){var y=s.model().properties().scalesProperties,g=Object(n.ensureNotNull)(f.valueAt(m))[TradingView.CLOSE_PLOT],v=i.background,S=y.showSeriesLastValue.value(),b=!1,w=!1,P=!1,C=s.lastValueData(TradingView.CLOSE_PLOT,!1),x=s.properties();if(8===x.style.value()&&x.haStyle.showRealLastPrice.value()){var T=s.lastValueData(TradingView.CLOSE_PLOT,!0);if(T.noData||T.color===i.background||(v=T.color),!T.noData&&!C.noData){var L=T.index===C.index;b=L&&y.showSymbolLabels.value(),w=y.seriesLastValueMode.value()===a.PriceAxisLastValueMode.LastPriceAndPercentageValue,S=S&&L,P=L&&this._isCountdownEnabled()&&x.showCountdown.value()}}else{v=s.barColorer().barStyle(_.index,!0).barColor}i.background=v,i.color=this.generateTextColor(v),i.coordinate=l.priceToCoordinate(u,g),e.visible=S||P,C.noData||(C.text=l.formatPrice(u,g),C.formattedPriceAbsolute=l.formatPriceAbsolute(u),C.formattedPricePercentage=l.formatPricePercentage(u,g),e.text=this._axisFirstLineText(C,S,w),e.secondLine=P?this._countdownText():"",t.text=this._paneText(C,S,b,w)),t.visible=b||S&&w}}}}},t}(s.SeriesPriceAxisView)},Kmdw:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererArrowUp",(function(){return l})),i.d(t,"PaneRendererArrowDown",(function(){return c}));var r=i("mrSG"),n=i("2WC2"),o=i("aO4+"),s=i("Hr11"),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._sign=0,t._thinArrow=!1,t._thinArrowLineWidth=0,t._headHeight=0,t._arrowWidth=0,t}return Object(r.__extends)(t,e),t.prototype.setData=function(e,t){this._setBaseData(e,t)},t.prototype._drawItemShape=function(e,t,i){
-var r=t.pixelRatio,n=this._lineWidth(t)%2?.5:0,o=this._sign,a=this._arrowWidth,l=this._headHeight,c=Math.abs(i.height),u=Math.round(i.x*r)+n,h=i.vertOffset,d=Math.round((i.y+h+o*c/2)*r)+n,p=Object(s.ceiledEven)(a*r),f=p/2,_=Math.round(c*r),m=Math.round(l*r);e.translate(u,d),this._thinArrow?(e.moveTo(0,0),e.lineTo(-f,-f*o),e.moveTo(0,0),e.lineTo(f,-f*o),e.moveTo(0,0),e.lineTo(0,-_*o),e.moveTo(-f,-_*o),e.lineTo(f,-_*o)):(e.moveTo(0,0),_r.DECEMBER&&(i++,t=r.JANUARY);return r.get_cal(r.get_timezone("Etc/UTC"),i,t,1)},e}();function T(e,t,i,r){void 0===r&&(r=!1);var n=o.Interval.parse(e),s=n.multiplier();return n.kind()===o.ResolutionKind.Minutes?new _(60*s,t):n.kind()===o.ResolutionKind.Seconds?new _(s,t):n.kind()===o.ResolutionKind.Range?new _(60*s,t):new g(t,i,s,function(e,t){switch(e){case o.ResolutionKind.Days:return new P(t);case o.ResolutionKind.Weeks:return new C(t);case o.ResolutionKind.Months:return new x}throw new Error("Unknown dwm resolution: "+e)}(n.kind(),t),r)}function L(e,t,i,r,n,a,l){var c,u,h=new p("Etc/UTC",e,t,i),d=o.Interval.parse(n+r),f=d.isDWM();f?(u=s(d,l),c=864e5):(u=d.inMilliseconds(),c=60*h.spec.findSession(0,0,0).getEntry().length()*1e3);var _=c/u,m=(f?7:7-h.spec.weekEndsCount())*_;return as.startOffset()+s.length()&&n===s.dayOfWeek()-1&&(n++,o-=1440),n===s.dayOfWeek()&&o>=s.startOffset()&&o0&&e.stroke(),this._data.fillBackground&&(e.fillStyle=this.getColor(),e.fill())}},e}()},InMJ:function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("Ocx9").DefaultProperty,o=i("hayr").propertyPages,s=window.t("Flat Bottom");function a(e,t){this._constructor="LineToolFlatBottom";var n=t||a.createProperties();r.call(this,e,n),this.version=a.version,i.e("lt-pane-views").then(function(e){var t=i("gr7S").FlatBottomPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(a,r),a.version=1,a.prototype.pointsCount=function(){return 3},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Flat Bottom"},a.prototype.hasEditableCoordinates=function(){return!1},a.prototype.addPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),r.prototype.addPoint.call(this,e)},a.prototype.setLastPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),r.prototype.setLastPoint.call(this,e)},a.prototype.setPoint=function(e,t,i){if(i&&i.shift()&&1===e){this._snapPoint45Degree(t,this.points()[0])}if(2===e)this._points[1].index=t.index;else if(3===e)return this._points[0].index=t.index,void(this._points[2].price=t.price);r.prototype.setPoint.call(this,e,t)},a.prototype.canHasAlert=function(){return!0},a.prototype._getAlertPlots=function(){var e=this._points[0],t=this._points[1],i=[];e.index<=t.index?(i.push(e),i.push(t)):(i.push(t),i.push(e));var r=this._points[2];r.time=t.time,r.index=t.index;var n,o,s,a,l={price:r.price,time:e.time,index:e.index},c=[];r.index<=l.index?(c.push(r),c.push(l)):(c.push(l),c.push(r)),i[0].price>c[0].price?(n=i,o=c):c[0].price>i[0].price||c[1].price>i[1].price?(n=c,o=i):(n=i,o=c);var u=this.properties().extendLeft.value(),h=this.properties().extendRight.value();return e.index<=t.index?(s=u,a=h):(s=h,a=u),
+[this._linePointsToAlertPlot(n,"Upper",s,a),this._linePointsToAlertPlot(o,"Lower",u,a)]},a.prototype.getInputsPropertyPage=function(){return null},a.prototype.getStylesPropertyPage=function(){return o.LineToolFlatBottomStylesPropertyPage},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("vm8R").GeneralTrendFiguresDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new n("linetoolflatbottom",e);return a._configureProperties(t),t},a._configureProperties=function(e){r._configureProperties(e)},t.LineToolFlatBottom=a},IzGk:function(e,t,i){"use strict";i.r(t),i.d(t,"translatedIntervalString",(function(){return n}));i("YFKU");var r=i("pPtI");function n(e){var t=Object(r.getTranslatedResolutionModel)(e,!0);return null===t?e:t.multiplier+(t.mayOmitShortKind?"":t.shortKind)}},J2xC:function(e,t,i){e.exports={"css-value-header-toolbar-height":"38px"}},JOqt:function(e,t,i){"use strict";i.r(t),i.d(t,"debounce",(function(){return r}));var r=function(e,t){var i,r,n=0;function o(){e.apply(r,i)}return function(){r=this,i=arguments,clearTimeout(n),n=setTimeout(o,t)}}},JT5O:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyMarket",(function(){return o}));var r=i("aIyQ"),n=i.n(r),o=function(){function e(e,t){this.visibilityChanged=new n.a,this._dialogPromise=null,this._dialog=null,this._chartWidgetCollection=e,this._options=t}return e.prototype.isVisible=function(){return null!==this._dialog&&this._dialog.isVisible()},e.prototype.show=function(e){var t;null===this._dialog&&this._requestDialog(e),null===(t=this._dialog)||void 0===t||t.open(e)},e.prototype.hide=function(){var e;null===(e=this._dialog)||void 0===e||e.hide()},e.prototype.onCustomScriptModified=function(){var e;null===(e=this._dialog)||void 0===e||e.updateUserStudies()},e.prototype.resetAllPages=function(){var e;null===(e=this._dialog)||void 0===e||e.resetAllStudies()},e.prototype._requestDialog=function(e){var t=this;if(null===this._dialogPromise){var r=void 0;r=Promise.all([i.e("react"),i.e(3),i.e(4),i.e(6),i.e(7),i.e(9),i.e(11),i.e(16),i.e(32),i.e(63),i.e(64),i.e(72),i.e(0),i.e(5),i.e(13),i.e("study-market")]).then(i.bind(null,"zbLM")).then((function(e){return new e.IndicatorsLibraryContainer(t._chartWidgetCollection,t._options)})),this._dialogPromise=r.then((function(i){t._dialog=i,t._dialog.getVisibilityChanged().subscribe(null,(function(e){t.visibilityChanged.fire(e)})),t._dialog.open(e)}))}return this._dialogPromise},e}()},JcHK:function(e,t,i){"use strict";function r(e){return e.getAll().some((function(e){return e.isInitialized()}))}function n(e,t){var i=e.getAll(),r=function(){t(),i.forEach((function(e){e.chartWidgetInitialized.unsubscribe(null,r)}))};i.forEach((function(e){e.chartWidgetInitialized.subscribe(null,r,!0)}))}i.r(t),i.d(t,"isAnyChartWidgetInitialized",(function(){return r})),i.d(t,"waitAnyChartWidgetInitialized",(function(){return n}))},JjUe:function(e,t,i){"use strict";i.r(t),
+i.d(t,"OverlayDataWindowView",(function(){return S}));var r=i("mrSG"),n=i("ivNn"),o=i("4miz"),s=i("GH0z"),a=i("k9/m"),l=i("7qT/"),c=i("Ialn"),u=i("qFKp"),h=i("38az"),d=i("e92V"),p=i("mMWL"),f=i("Tmoa"),_=u.CheckMobile.any(),m=_&&!0,y=new s.PercentageFormatter,g=window.t("n/a"),v=g+" ("+g+"%)",S=function(e){function t(t,i){var r=e.call(this)||this;return r._invalidated=!0,r._study=t,r._model=i,r._items.push(new o.a(window.t("Open"),"")),r._items.push(new o.a(window.t("High"),"")),r._items.push(new o.a(window.t("Low"),"")),r._items.push(new o.a(window.t("Close"),"")),r._items.push(new o.a("","")),r._items.push(new o.a("","")),r._items.push(new o.a(window.t("Change"),"")),r.update(),r}return Object(r.__extends)(t,e),t.prototype.items=function(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._items},t.prototype.update=function(){this._invalidated=!0},t.prototype._updateImpl=function(){if(this._header=this._study.title(),this._items[0].setValue(g),this._items[1].setValue(g),this._items[2].setValue(g),this._items[3].setValue(g),this._items[6].setValue(v),!this._model.timeScale().isEmpty()&&0!==this._study.data().size()){for(var e=this._showLastPriceAndChangeOnly(),t=0,i=this._items;t=0?0:1,basedOnPrevClose:n.change>=0?0:1}}}else{var o=this._study.data().search(i-1,a.PlotRowSearchMode.NearestLeft,1),s=o&&o.value[4]||null;if(null!==s)return{values:{change:e-s,percentChange:Object(l.a)(s,e)},priceDirection:{basedOnCurrentBar:e>=t?0:1,basedOnPrevClose:e>=s?0:1}}}return{priceDirection:{basedOnCurrentBar:e>=t?0:1,basedOnPrevClose:e>=t?0:1}}},t.prototype._color=function(e,t,i){
+var r=Object(f.resetTransparency)(h.SeriesBarColorer.upColor(this._study.properties())),n=Object(f.resetTransparency)(h.SeriesBarColorer.downColor(this._study.properties()));if(i&&!m)return t.priceDirection?r:n;var o=this._study.properties().childs().style.value();if(10===o){var s=this._study.barColorer().barStyle(e,!1);return null!=s.barBorderColor?Object(f.resetTransparency)(s.barBorderColor):Object(f.resetTransparency)(s.barColor)}var a=!1;return 0===o?a=this._study.properties().childs().barStyle.childs().barColorsOnPrevClose.value():1===o?a=this._study.properties().childs().candleStyle.childs().barColorsOnPrevClose.value():9===o&&(a=!0),a?0===t.priceDirection.basedOnPrevClose?r:n:0===t.priceDirection.basedOnCurrentBar?r:n},t}(o.b)},JmuD:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)},t.hasProperty=function(e,t){return t in e}},K4L1:function(e,t,i){"use strict";var r=i("Eyy1").assert,n=i("lCO3").Version,o=i("uOxu").getLogger("Chart.Study.Versioning"),s=i("Wt0y"),a=i("0YCj"),l=i("TcSq").extractPineId,c=i("Si3H").migrateMetaInfoAndPropState;function u(e,t){if(!e)throw new Error("No studies metainfo");var r=i("EyEd");if(this._studiesMetainfo=e,!t)throw new Error("No studies migrations");this._studiesMigrations=t,this._migrations={};for(var n=0;n=22)return t;for(var i={},r=0,n=0;;){var o=t[n];if(void 0===o)break;var s=t[o.id];o.isFake&&(o.id="in_"+r++),i[n]=o,i[o.id]=s,n++}return i}]}u.prototype.updateMetaInfo=function(e){if(!e)return e;r(!e.isTVScript,"This method should update only built-in java indicators metaInfo. For Pine indicators use updateMetaInfoAsync");for(var t=null,i=this._studiesMetainfo,n=0;n=12&&l<=26){var c={};for(s=0;s=12&&c<=26){var h=n.columns;n.columns=[];for(var d=0;dt&&o.logWarn("Bad integer input max value in metaInfo id="+e.id+" title="+e.description))}},u._fixInputsMaxValue=function(e,t){if(!TradingView.isAbsent(t)){var i=u.INPUT_MAX_VALUE;if(t.inputs)for(var r=0;ri&&(a.max=i))}if(e&&e.inputs){var n=u.splitInputs(e.inputs),o=n.arr;for(var s in o){var a;"integer"===(a=o[s]).type&&(a.max&&a.max>i&&(a.max=i))}e.inputs=TradingView.merge(n.obj,n.arr)}}},
+u.prototype.patchPropsStateAndMetaInfo=function(e,t,i){"Script$BOOKER"!==t.productId||t.alerts||delete e.alerts,u._fixInputsOrder(e,t),u._fixInputsMaxValue(e,t);var r=u.splitInputs(e.inputs);e.inputs=r.obj;var n=a.versionOf(t);ni&&(i=n))}e[i+1]=t},u.splitInputs=function(e){var t={},i={};for(var r in e)isNumber(parseInt(r,10))?t[r]=e[r]:i[r]=e[r];return{arr:t,obj:i}},u.findInputKeyById=function(e,t){var i=null;for(var r in e)if(isNumber(parseInt(r,10))&&e[r].id===t){i=r;break}return i},u.getInputKeyById=function(e,t){var i=u.findInputKeyById(e,t);if(!i)throw new Error("Cannot find input with id: "+t);return i},e.exports=u},K8V9:function(e,t){e.exports=''},K9GE:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dur=350,t.easingFunc={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:(4-2*e)*e-1},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){
+return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}};var r=function(){function e(e,t,i,r){this._mX1=e,this._mY1=t,this._mX2=i,this._mY2=r}return e.prototype.easingFunc=function(e){return this._mX1===this._mY1&&this._mX2===this._mY2?e:this._calcBezier(this._getTForX(e))},e.prototype._a=function(e,t){return 1-3*t+3*e},e.prototype._b=function(e,t){return 3*t-6*e},e.prototype._c=function(e){return 3*e},e.prototype._calcBezier=function(e){return((this._a(this._mY1,this._mY2)*e+this._b(this._mY1,this._mY2))*e+this._c(this._mY1))*e},e.prototype._getSlope=function(e){return 3*this._a(this._mX1,this._mX2)*e*e+2*this._b(this._mX1,this._mX2)*e+this._c(this._mX1)},e.prototype._getTForX=function(e){for(var t=e,i=0;i<4;++i){var r=this._getSlope(t);if(0===r)return t;t-=(this._calcBezier(t)-e)/r}return t},e}();t.CubicBezier=r,t.color={black0:"#000",black20:"#2b2d36",black25:"#2b2e37",black27:"#2f3241",black30:"#212121",black70:"#4A4A4A",black80:"#535353",black100:"#646464",black110:"#757575",black140:"#8A8A8A",black170:"#ADAEB0",black180:"#b4b4b4",black200:"#C8C8C8",black220:"#DADDE0",black230:"#ECECEC",black240:"#F2F2F2",black248:"#F8F8F8",black255:"#FFF",brand:"#3BB3E4",brandHover:"#3BABD8",brandActive:"#3898C2",brandDown:"#049DDC",brand220:"#3BB3E0",brand255:"#3BB3FF",brandNew:"#37A6EF",brandNew2:"#2196F3",spinner:"#00A2E2",brandMedium80:"#3C4650",brandMedium90:"#465a6e",brandMedium100:"#627384",brandMedium120:"#758696",brandMedium150:"#94959C",brandMedium190:"#9DB2BD",brandMedium220:"#E9EFF2",brandMedium230:"#EAECEF",brandMedium240:"#F1F3F6",brandDark:"#2A2C39",brandDark50:"#252733",brandDark45:"#20222D",brandDarkText:"#6A6B74",danger:"#FF4A68",dangerHover:"#F24965",dangerDown:"#FF173E",success:"#3CBC98",success55:"#37BC9B",success250:"#00FFC0",successHover:"#38B395",successDown:"#00A97F",attention:"#FFC84A",attention50:"#F89E30",growing:"#37bc9b",falling:"#ff4a68"}},KUek:function(e,t,i){"use strict";i.r(t);var r,n,o=i("Eyy1"),s=i("aIyQ"),a=i.n(s),l=i("k9/m"),c=i("hsV8"),u=i("jy4L"),h=i("w4Ji"),d=i("jenN"),p=i("uOxu"),f=Object(p.getLogger)("Chart.StudyDataSource");!function(e){e[e.Undefined=0]="Undefined",e[e.Loading=1]="Loading",e[e.Completed=2]="Completed",e[e.Error=3]="Error"}(r||(r={})),function(e){e[e.Idle=0]="Idle",e[e.AwaitingConnection=1]="AwaitingConnection",e[e.AwaitingParent=2]="AwaitingParent",e[e.AwaitingFirstDataUpdate=3]="AwaitingFirstDataUpdate",e[e.Active=4]="Active"}(n||(n={}));var _=function(){function e(e,t,i,o){this._inputs=null,this._status=n.Idle,this._studyId=null,this._turnaroundCounter=1,this._studyStatus={type:r.Undefined},this._studyStatusChanged=new a.a,this._graphics=new d.LiveStudyGraphics,this._dataCleared=new a.a,this._dataUpdated=new a.a,
+this._boundOnGatewayIsConnectedChanged=this._onGatewayIsConnectedChanged.bind(this),this._ongoingDataUpdate=Promise.resolve(),this._gateway=e,this._metaInfo=o,this._series=t,this._turnaroundPrefix=i,this._plots=new l.PlotList(Object(h.studyPlotFunctionMap)(o),h.studyEmptyPlotValuePredicate),this._gateway.isConnected().subscribe(this._boundOnGatewayIsConnectedChanged)}return e.prototype.destroy=function(){this.stop(),this._gateway.isConnected().unsubscribe(this._boundOnGatewayIsConnectedChanged),this._dataUpdated.destroy(),this._dataCleared.destroy(),this._studyStatusChanged.destroy()},e.prototype.metaInfo=function(){return this._metaInfo},e.prototype.inputs=function(){return this._inputs},e.prototype.setInputs=function(e){this._inputs=e,null!==this._studyId&&(this._turnaroundCounter++,this._onStudyStatusChangedTo({type:r.Undefined}),this._gateway.modifyStudy(this._studyId,this._turnaround(),e,this._onMessage.bind(this)),this._status===n.Active&&this._changeStatusTo(n.AwaitingFirstDataUpdate))},e.prototype.isStarted=function(){return this._status!==n.Idle},e.prototype.isActive=function(){return this._status===n.Active},e.prototype.start=function(){this.isStarted()?f.logNormal("start: data source is already started, nothing to do"):(Object(o.assert)(null!==this._inputs,"Inputs should be defined when starting a study data source"),this._gateway.isConnected().value()?this._createStudy():this._changeStatusTo(n.AwaitingConnection))},e.prototype.stop=function(){this.isStarted()?(null!==this._studyId&&(this._gateway.removeStudy(this._studyId),this._studyId=null,this._onStudyStatusChangedTo({type:r.Undefined})),this._changeStatusTo(n.Idle)):f.logNormal("stop: data source is already stopped, nothing to do")},e.prototype.studyId=function(){return this._studyId},e.prototype.studyStatus=function(){return this._studyStatus},e.prototype.studyStatusChanged=function(){return this._studyStatusChanged},e.prototype.plots=function(){return this._plots},e.prototype.graphics=function(){return this._graphics},e.prototype.clearData=function(){this._plots.clear(),this._graphics.clear(),this._dataCleared.fire()},e.prototype.stopAndStealData=function(){Object(o.assert)(this._status===n.Active,"Couldn't steal data from non-active data source"),this.stop();var e=this._plots,t=this._graphics.extract();return this._plots=new l.PlotList(Object(h.studyPlotFunctionMap)(this._metaInfo),h.studyEmptyPlotValuePredicate),{plots:e,graphics:t}},e.prototype.dataCleared=function(){return this._dataCleared},e.prototype.dataUpdated=function(){return this._dataUpdated},e.prototype._changeStatusTo=function(e){Object(o.assert)(this._status!==e,"Source and destination status should be distinct"),f.logNormal("Status changed from "+n[this._status]+" to "+n[e]),this._status=e},e.prototype._createStudy=function(){var e=this._series.seriesId();null!=e?this._createStudyUsingParentId(e):(this._changeStatusTo(n.AwaitingParent),this._series.dataEvents().completed().subscribe(this,this._onSeriesCompleted,!0))},e.prototype._createStudyUsingParentId=function(e){
+Object(o.assert)(this._status!==n.Active,'Status should not be "Active" when creating a study'),Object(o.assert)(this._studyStatus.type===r.Undefined,'Study status should be "Undefined" when creating a study'),Object(o.assert)(null===this._studyId,"Study id should be empty when creating a study"),this._studyId=Object(u.makeNextStudyId)(),this._gateway.createStudy(this._studyId,this._turnaround(),e,this._metaInfo.fullId+"!",Object(o.ensureNotNull)(this._inputs),this._onMessage.bind(this)),this._changeStatusTo(n.AwaitingFirstDataUpdate)},e.prototype._onGatewayIsConnectedChanged=function(e){e?this._onGatewayConnected():this._onGatewayDisconnected()},e.prototype._onGatewayConnected=function(){this._status===n.AwaitingConnection&&this._createStudy()},e.prototype._onGatewayDisconnected=function(){this._status!==n.Idle&&this._status!==n.AwaitingConnection&&(this._studyId=null,this._changeStatusTo(n.AwaitingConnection),this._studyStatus.type!==r.Undefined&&this._onStudyStatusChangedTo({type:r.Undefined})),this._turnaroundCounter=1},e.prototype._onSeriesCompleted=function(){this._status===n.AwaitingParent&&this._createStudyUsingParentId(Object(o.ensure)(this._series.seriesId()))},e.prototype._onStudyStatusChangedTo=function(e){var t=this._studyStatus;this._studyStatus=e,f.logNormal("Study status type changed from "+r[t.type]+" to "+r[e.type]),this._studyStatusChanged.fire(t,e)},e.prototype._onMessage=function(e){if("data_update"===e.method){var t=e.params,i=t.customId,r=t.turnaround,n=t.plots,o=t.nonseries;i===this._studyId&&this._checkTurnaround(r)&&this._onDataUpdate(n,o)}else if("study_loading"===e.method){var s=e.params,a=(i=s[0],r=s[1],s[2]);i===this._studyId&&this._checkTurnaround(r)&&this._onStudyLoading(a)}else if("study_completed"===e.method){var l=e.params;i=l[0],r=l[1],a=l[2];i===this._studyId&&this._checkTurnaround(r)&&this._onStudyCompleted(a)}else if("study_error"===e.method){var c=e.params,u=(i=c[0],r=c[1],c[2]),h=c[3];a=c[4];i===this._studyId&&this._checkTurnaround(r)&&this._onStudyError(u,h,a)}},e.prototype._onDataUpdate=function(e,t){var i=Object(c.unpackNonSeriesData)(t.d);return this._ongoingDataUpdate=this._ongoingDataUpdate.then((function(){return i}),(function(){return i})).then(this._onDataUnpacked.bind(this,e,t.indexes)),this._ongoingDataUpdate},e.prototype._onDataUnpacked=function(e,t,i){this._status!==n.Idle&&(this._status===n.AwaitingFirstDataUpdate&&(this._changeStatusTo(n.Active),this.clearData()),this._mergePlots(e),null!==i&&(i.indexes_replace?(Object(o.assert)("nochange"!==t),this._graphics.replaceIndexesTo(t)):("nochange"!==t&&this._graphics.replaceIndexesTo(t),void 0!==i.graphicsCmds&&this._graphics.processCommands(i.graphicsCmds,this._metaInfo.graphics))),this._dataUpdated.fire(e,i,t))},e.prototype._onStudyLoading=function(e){this._onStudyStatusChangedTo({type:r.Loading,startTime:Date.now()})},e.prototype._onStudyError=function(e,t,i){this.clearData(),this._onStudyStatusChangedTo({type:r.Error,reason:e})},e.prototype._onStudyCompleted=function(e){this._onStudyStatusChangedTo({
+type:r.Completed})},e.prototype._mergePlots=function(e){this._plots.merge(e)},e.prototype._turnaround=function(){return""+this._turnaroundPrefix+this._turnaroundCounter},e.prototype._checkTurnaround=function(e){var t=this._turnaround();return e===t||e===this._series.turnaround()||e===this._series.turnaround()+"_"+t},e}(),m=i("kcTO"),y=i("Ocx9"),g=i("Kxc7");i.d(t,"sessionsPreferencesDefault",(function(){return S})),i.d(t,"Sessions",(function(){return b}));var v=new m.PriceFormatter,S={graphics:{backgrounds:{outOfSession:{color:"#2196F3",transparency:92,visible:!1}},vertlines:{sessBreaks:{color:"#4985e7",style:2,visible:!1,width:1}}}},b=function(){function e(e,t){var i=this;this._studySource=null,this._paneViews=[],this._metaInfo=null,this._destroyed=!1,this._isStarted=!1,this._loadedGraphics=null,this._model=e,this._doubleClickHandler=t;var r=e.mainSeries();this._properties=new y.DefaultProperty("sessions"),this._removeDuplicateProperties(),this._properties.subscribe(this,this._onPropertiesChanged),e.studyMetaInfoRepository().findById({type:"java",studyId:"Sessions@tv-basicstudies"}).then((function(t){i._destroyed||null===i._loadedGraphics&&(i._setMetaInfo(t),null!==i._metaInfo&&(i._studySource=new _(e.chartApi(),r,"sessions_",i._metaInfo),i._createPaneViews(),i._studySource.dataCleared().subscribe(i,i.updateAllViews),i._studySource.dataUpdated().subscribe(i,i.updateAllViews),i._studySource.setInputs({}),i._processHibernate()))})),e.timeScale().onReset().subscribe(this,this._clearData),e.timeScale().logicalRangeChanged().subscribe(this,this.updateAllViews),e.mainSeries().properties().extendedHours.subscribe(this,this._updateVisibleOutOfSessionBackground),e.mainSeries().properties().interval.subscribe(this,this._processHibernate),this._updateVisibleOutOfSessionBackground(e.mainSeries().properties().extendedHours)}return e.prototype.start=function(){this._isStarted=!0,this._processHibernate()},e.prototype.restart=function(){this._clearData(),g.enabled("stop_study_on_restart")&&this.stop(),this.start()},e.prototype.isStarted=function(){return this._isStarted},e.prototype.stop=function(){this._isStarted=!1,null!==this._studySource&&this._studySource.stop()},e.prototype.paneViews=function(e){return e.containsMainSeries()?this._paneViews:[]},e.prototype.priceAxisViews=function(e,t){return[]},e.prototype.updateAllViews=function(){this._paneViews.forEach((function(e){return e.update()}))},e.prototype.destroy=function(){this._destroyed=!0,null!==this._studySource&&(this._studySource.dataCleared().unsubscribe(this,this.updateAllViews),this._studySource.dataUpdated().unsubscribe(this,this.updateAllViews),this._studySource.destroy(),this._studySource=null),this._model.timeScale().logicalRangeChanged().unsubscribe(this,this.updateAllViews),this._model.timeScale().onReset().unsubscribe(this,this._clearData),this._model.mainSeries().properties().extendedHours.unsubscribe(this,this._updateVisibleOutOfSessionBackground),this._model.mainSeries().properties().interval.unsubscribe(this,this._processHibernate),
+this._properties.unsubscribe(this,this._onPropertiesChanged)},e.prototype.series=function(){return this._model.mainSeries()},e.prototype.priceScale=function(){return this.series().priceScale()},e.prototype.graphics=function(){return this._loadedGraphics||Object(o.ensureNotNull)(this._studySource).graphics()},e.prototype.properties=function(){return this._properties},e.prototype.graphicsInfo=function(){return Object(o.ensureNotNull)(this._metaInfo).graphics},e.prototype.firstValue=function(e){return this._model.mainSeries().firstValue()},e.prototype.formatter=function(){return v},e.prototype.state=function(e){var t={properties:this._properties.state()};return e&&null!==this._metaInfo&&(t.data={graphics:Object(d.saveStudyGraphics)(this.graphics()),metaInfo:this._metaInfo}),t},e.prototype.restoreState=function(e,t){this._properties.mergeAndFire(e.properties),this._removeDuplicateProperties(),this._updateVisibleOutOfSessionBackground(this._model.mainSeries().properties().extendedHours),void 0!==e.data&&t&&(this._loadStudyGraphics(e.data.graphics),this._setMetaInfo(e.data.metaInfo),this._createPaneViews())},e.prototype.restoreOldState=function(e,t){var i={properties:{graphics:e.state.graphics}};void 0!==e.data&&void 0!==e.metaInfo&&t&&(i.data={metaInfo:e.metaInfo,graphics:e.data.graphics}),this.restoreState(i,t)},e.prototype.applyPreferences=function(e){this._properties.mergePreferences(e)},e.prototype.metaInfo=function(){return Object(o.ensureNotNull)(this._metaInfo)},e.prototype._loadStudyGraphics=function(e){if(void 0!==e.backgrounds){var t=e.backgrounds.findIndex((function(e){return"inSession"===e.styleId}));e.backgrounds.splice(t,1)}this._loadedGraphics=Object(d.loadStudyGraphics)(e)},e.prototype._setMetaInfo=function(e){void 0!==e.graphics.backgrounds&&void 0!==e.graphics.backgrounds.inSession&&delete e.graphics.backgrounds.inSession,this._metaInfo=e},e.prototype._updateVisibleOutOfSessionBackground=function(e){this._outOfSessionVisibilityProperty().setValue(e.value())},e.prototype._clearData=function(){null!==this._studySource&&this._studySource.clearData()},e.prototype._createPaneViews=function(){var e=this,t={mouseDoubleClickHandler:this._doubleClickHandler};Object(d.createGraphicsPaneViews)(this,this._model,t).then((function(t){e._paneViews=t,e._model.lightUpdate()}))},e.prototype._onPropertiesChanged=function(){this._processHibernate(),this.updateAllViews()},e.prototype._processHibernate=function(){if(null!==this._studySource){var e=this._canBeHibernated(),t=this._isHibernated(),i=this._studySource.isStarted();!t&&e&&i?this._studySource.stop():!t||e||i||this._studySource.start()}},e.prototype._canBeHibernated=function(){return this._model.mainSeries().isDWM()||!this._outOfSessionVisibilityProperty().value()&&!this._vertLinesVisibleProperty().value()},e.prototype._isHibernated=function(){return this._isStarted&&(null===this._studySource||!this._studySource.isStarted())},e.prototype._outOfSessionVisibilityProperty=function(){
+return this._properties.childs().graphics.childs().backgrounds.childs().outOfSession.childs().visible},e.prototype._vertLinesVisibleProperty=function(){return this._properties.childs().graphics.childs().vertlines.childs().sessBreaks.childs().visible},e.prototype._removeDuplicateProperties=function(){this._properties.hasChild("properties")&&(this._properties.removeProperty("properties"),Object(y.saveDefaultProperties)(!0),this._properties.childChanged("",null),Object(y.saveDefaultProperties)(!1))},e}()},KcY8:function(e,t,i){"use strict";var r=i("mrSG"),n=i("aO4+"),o=i("f6yo"),s=i("Tmoa"),a=i("Ialn"),l=i("8Uy/"),c=i("jFln"),u=i("ikwP"),h=i("VdBB"),d=i("qFKp").CheckMobile.any()?10:0,p=function(){function e(e,t){this.setData(e,t)}return e.prototype.setData=function(e,t){this._data=Object(r.__assign)({},e),this._commonData=Object(r.__assign)({},t)},e.prototype.draw=function(e,t,i,r,n,o){if(this._data.visible){e.font=t.font;var h,d=Math.floor((this._data.tickVisible?t.tickLength:0)*o),p=Math.floor((this._data.borderVisible?t.borderSize:0)*o),f=Math.floor(t.paddingTop*o),_=Math.floor(t.paddingBottom*o),m=Math.floor(t.paddingInner*o),y=Math.floor(t.paddingOuter*o),g=this._data.text,v=Math.round(t.baselineOffset*o),S=void 0!==this._data.labelIcon,b=Math.max(1,Math.floor(o)),w=Math.floor(t.fontSize*o)+f+_;if(w%2!=b%2&&(w+=1),S)h=w;else{var P=Math.ceil(i.measureText(e,g));h=Math.round(P*o)+d+p+m+y}var C=this._commonData.coordinate;this._commonData.fixedCoordinate&&(C=this._commonData.fixedCoordinate);var x,T,L="right"===n,I=this._getOffsetScaled(L,r,o),M=Math.ceil(r*o),O=L?M:0,A=O;e.fillStyle=Object(s.resetTransparency)(this._commonData.background),e.lineWidth=1,Object(c.setLineStyle)(e,l.LINESTYLE_SOLID),e.lineCap="butt";var k=Math.round(C*o)-Math.floor(.5*o),E=Math.floor(k+b/2-w/2),D=E+w;if(g||S){if(L?(x=O-d,T=(A=O-h)+y):(A=O+h,x=O+d,T=O+p+d+m),O+=I,A+=I,x+=I,e.beginPath(),e.moveTo(O,E),e.lineTo(A,E),e.lineTo(A,D),e.lineTo(O,D),e.fill(),0!==I&&this._data.fillOffset){e.fillStyle=t.paneBackgroundColor;var V=L?Math.ceil(r*o)+1:0;e.beginPath(),e.moveTo(O,E),e.lineTo(V,E),e.lineTo(V,D),e.lineTo(O,D),e.fill()}if(S){switch(this._data.labelIcon){case 0:this._drawPlusIcon(e,O,A,E,k,D,b)}return}this._data.tickVisible&&(e.fillStyle=this._commonData.color,e.fillRect(O,k,x-O,b)),e.textAlign="left",e.fillStyle=this._commonData.color,Object(u.drawScaled)(e,o,(function(){e.fillText(g,(T+I)/o,(D-_-v)/o)}))}if(this._data.secondLine){var B=Math.ceil(i.measureText(e,this._data.secondLine)*o)+m+y;e.fillStyle=Object(s.resetTransparency)(this._commonData.background),this._data.text&&(E+=w+b,D+=w+b),L?(O=(A=Math.min(A,M-B))+B,T=A+y):(A=(O=Math.max(A-B,p))+B,T=O+m),O+=I,A+=I,e.beginPath(),e.moveTo(O,E),e.lineTo(A,E),e.lineTo(A,D),e.lineTo(O,D),e.fill(),e.textAlign="left",e.fillStyle=this._commonData.color;var R=this._data.secondLine;Object(u.drawScaled)(e,o,(function(){e.fillText(Object(a.startWithLTR)(R),(T+I)/o,(D-_-v)/o)}))}}},e.prototype.height=function(e,t){if(!this._data.visible)return 0;var i=e.fontSize+e.paddingTop+e.paddingBottom
+;return this._data.secondLine&&t?2*i+1:i},e.prototype.hitTest=function(e){var t=this._data.hitTestData;if(void 0===t)return null;var i=this._data.offset,r=Object(n.box)(new n.Point(t.xl+i-d,t.y-d),new n.Point(t.xl+i+t.containerWidth+d,t.y+t.containerHeight+d)),s=t.left&&Object(o.pointInBox)(e,r),a=Object(n.box)(new n.Point(t.xr-i-d,t.y-d),new n.Point(t.xr-i+t.containerWidth+d,t.y+t.containerHeight+d)),l=t.right&&Object(o.pointInBox)(e,a);if(s||l){var c=s?"left":"right";return new h.HitTestResult(h.HitTestResult.CUSTOM,{mouseClickHandler:void 0===t.mouseClickHandler?void 0:t.mouseClickHandler.bind(this,e,c),tooltip:t.tooltip})}return null},e.prototype._getOffsetScaled=function(e,t,i){var r=e?-1:1,n=0===this._data.offset?0:r*this._data.offset,o=0===n?0:r*Math.max(1,Math.round(Math.abs(n)*i));return e&&t*i%1!=0&&(o=r*(Math.abs(o)+1)),o},e.prototype._drawPlusIcon=function(e,t,i,r,n,o,s){e.fillStyle=this._commonData.color;var a=Math.abs(t-i),l=Math.round(.5*a);l%2!=s%2&&(l+=1);var c=Math.floor((a-l)/2),u=Math.min(t,i),h=u+Math.floor(a/2-s/2);e.fillRect(u+c,n,l,s),e.fillRect(h,r+c,s,l)},e}();i.d(t,"a",(function(){return f}));var f=function(){function e(e){this._commonRendererData={coordinate:0,color:"#FFF",background:"#000"},this._axisRendererData={text:"",visible:!1,tickVisible:!0,borderVisible:!0,offset:0},this._paneRendererData={text:"",visible:!1,tickVisible:!1,borderVisible:!1,offset:1,fillOffset:!0},this._invalidated=!0,this._axisRenderer=new(e||p)(this._axisRendererData,this._commonRendererData),this._paneRenderer=new(e||p)(this._paneRendererData,this._commonRendererData)}return e.prototype.text=function(){return this._axisRendererData.text},e.prototype.secondLineText=function(){return this._axisRendererData.secondLine},e.prototype.background=function(){return this._commonRendererData.background},e.prototype.color=function(){return this.generateTextColor(this.background())},e.prototype.generateTextColor=function(e){return Object(s.colorFromBackground)(e)},e.prototype.coordinate=function(){return this._updateRendererDataIfNeeded(),this._commonRendererData.coordinate},e.prototype.floatCoordinate=function(){return this._updateRendererDataIfNeeded(),this._commonRendererData.floatCoordinate||this._commonRendererData.coordinate},e.prototype.update=function(){this._invalidated=!0},e.prototype.height=function(e,t){return void 0===t&&(t=!1),Math.max(this._axisRenderer.height(e,t),this._paneRenderer.height(e,t))},e.prototype.getFixedCoordinate=function(){return this._commonRendererData.fixedCoordinate||0},e.prototype.setFixedCoordinate=function(e){this._commonRendererData.fixedCoordinate=e},e.prototype.isVisible=function(){return this._updateRendererDataIfNeeded(),this._axisRendererData.visible||this._paneRendererData.visible},e.prototype.isAxisLabelVisible=function(){return this._updateRendererDataIfNeeded(),this._axisRendererData.visible},e.prototype.isPaneLabelVisible=function(){return this._updateRendererDataIfNeeded(),this._paneRendererData.visible},e.prototype.renderer=function(){
+return this._updateRendererDataIfNeeded(),this._axisRenderer.setData(this._axisRendererData,this._commonRendererData),this._paneRenderer.setData(this._paneRendererData,this._commonRendererData),this._axisRenderer},e.prototype.paneRenderer=function(){return this._updateRendererDataIfNeeded(),this._axisRenderer.setData(this._axisRendererData,this._commonRendererData),this._paneRenderer.setData(this._paneRendererData,this._commonRendererData),this._paneRenderer},e.prototype.setPaneRendererLabelIcon=function(e){this._paneRendererData.labelIcon=e},e.prototype._updateRendererDataIfNeeded=function(){this._invalidated&&(this._updateRendererData(this._axisRendererData,this._paneRendererData,this._commonRendererData),this._invalidated=!1)},e}()},Ke3L:function(e,t,i){"use strict";i.r(t),i.d(t,"ProjectionSeriesPriceAxisView",(function(){return l}));var r=i("mrSG"),n=i("Eyy1"),o=i("k9/m"),s=i("TQMj"),a=i("oXaB"),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.lastPrice=function(){return this._getSource().data().lastProjectionPrice},t.prototype._updateRendererData=function(e,t,i){e.visible=!1,t.visible=!1;var r=this._getData().model,s=this._getSource(),l=s.priceScale(),c=r.timeScale(),u=this.lastPrice();if(!c.isEmpty()&&!l.isEmpty()&&void 0!==u){var h=c.visibleBarsStrictRange();if(null!==h){var d=h.firstBar(),p=h.lastBar(),f=s.data(),_=f.search(p,o.PlotRowSearchMode.NearestLeft);if(null!==_){var m=s.nearestIndex(d,o.PlotRowSearchMode.NearestRight);if(void 0!==m){var y=s.model().properties().scalesProperties,g=Object(n.ensureNotNull)(f.valueAt(m))[TradingView.CLOSE_PLOT],v=i.background,S=y.showSeriesLastValue.value(),b=!1,w=!1,P=!1,C=s.lastValueData(TradingView.CLOSE_PLOT,!1),x=s.properties();if(8===x.style.value()&&x.haStyle.showRealLastPrice.value()){var T=s.lastValueData(TradingView.CLOSE_PLOT,!0);if(T.noData||T.color===i.background||(v=T.color),!T.noData&&!C.noData){var L=T.index===C.index;b=L&&y.showSymbolLabels.value(),w=y.seriesLastValueMode.value()===a.PriceAxisLastValueMode.LastPriceAndPercentageValue,S=S&&L,P=L&&this._isCountdownEnabled()&&x.showCountdown.value()}}else{v=s.barColorer().barStyle(_.index,!0).barColor}i.background=v,i.color=this.generateTextColor(v),i.coordinate=l.priceToCoordinate(u,g),e.visible=S||P,C.noData||(C.text=l.formatPrice(u,g),C.formattedPriceAbsolute=l.formatPriceAbsolute(u),C.formattedPricePercentage=l.formatPricePercentage(u,g),e.text=this._axisFirstLineText(C,S,w),e.secondLine=P?this._countdownText():"",t.text=this._paneText(C,S,b,w)),t.visible=b||S&&w}}}}},t}(s.SeriesPriceAxisView)},Kmdw:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererArrowUp",(function(){return l})),i.d(t,"PaneRendererArrowDown",(function(){return c}));var r=i("mrSG"),n=i("2WC2"),o=i("aO4+"),s=i("Hr11"),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._sign=0,t._thinArrow=!1,t._thinArrowLineWidth=0,t._headHeight=0,t._arrowWidth=0,t}return Object(r.__extends)(t,e),t.prototype.setData=function(e,t){
+this._setBaseData(e,t)},t.prototype._drawItemShape=function(e,t,i){var r=t.pixelRatio,n=this._lineWidth(t)%2?.5:0,o=this._sign,a=this._arrowWidth,l=this._headHeight,c=Math.abs(i.height),u=Math.round(i.x*r)+n,h=i.vertOffset,d=Math.round((i.y+h+o*c/2)*r)+n,p=Object(s.ceiledEven)(a*r),f=p/2,_=Math.round(c*r),m=Math.round(l*r);e.translate(u,d),this._thinArrow?(e.moveTo(0,0),e.lineTo(-f,-f*o),e.moveTo(0,0),e.lineTo(f,-f*o),e.moveTo(0,0),e.lineTo(0,-_*o),e.moveTo(-f,-_*o),e.lineTo(f,-_*o)):(e.moveTo(0,0),_'},Ltzl:function(e,t,i){"use strict";i.r(t),i.d(t,"SaveLineToolStateUndoCommand",(function(){return o}));var r=i("mrSG"),n=i("Eyy1"),o=function(e){function t(t,i,r,n){void 0===n&&(n=!0);var o=e.call(this,r,n)||this;return o._newStates=[],o._model=t,o._savedStates=i.map((function(e){return e.state(!1)})),o}return Object(r.__extends)(t,e),t.prototype.redo=function(){this._applyState(this._newStates)},t.prototype.undo=function(){0===this._newStates.length&&this.saveNewState(),this._applyState(this._savedStates)},t.prototype.saveNewState=function(){var e=this,t=this._savedStates.map((function(t){return Object(n.ensureNotNull)(e._model.dataSourceForId(t.id))}));this._newStates=t.map((function(e){return e.state(!1)}))},t.prototype._applyState=function(e){for(var t=0,i=e;t0&&(this._kind=e,this._multiplier=t)}return e.prototype.kind=function(){return this._kind},e.prototype.multiplier=function(){return this._multiplier},e.prototype.isValid=function(){return this.kind()!==r.Invalid&&this.multiplier()>0},e.prototype.isDWM=function(){return this.isValid()&&!this.isRange()&&!this.isIntraday()},e.prototype.isIntraday=function(){var e=c.has(this.kind());return this.isValid()&&!this.isRange()&&e},e.prototype.isSeconds=function(){return this.kind()===r.Seconds},e.prototype.isMinutes=function(){return this.kind()===r.Minutes},e.prototype.isMinuteHours=function(){return this.kind()===r.Minutes&&d(this.multiplier())},e.prototype.isDays=function(){return this.kind()===r.Days},e.prototype.isWeeks=function(){return this.kind()===r.Weeks},e.prototype.isMonths=function(){return this.kind()===r.Months},e.prototype.isRange=function(){return this.kind()===r.Range},e.prototype.isTimeBased=function(){return!this.isRange()},e.prototype.letter=function(){return this.isValid()&&this.kind()!==r.Minutes?this.kind()[0].toUpperCase():""},e.prototype.value=function(){return this.isValid()?this.kind()===r.Minutes?this.multiplier()+"":this.multiplier()+this.letter():""},e.prototype.isEqualTo=function(t){if(!(t instanceof e))throw new Error("Argument is not an Interval");return!(!this.isValid()||!t.isValid())&&(this.kind()===t.kind()&&this.multiplier()===t.multiplier())},e.prototype.inMilliseconds=function(e){if(void 0===e&&(e=Date.now()),!this.isValid()||this.isRange())return NaN;if(this.isMonths()){var t=new Date(e);return t.setUTCMonth(t.getUTCMonth()+(this.multiplier()||1)),+t-e}var i=this.multiplier();return a[this.kind()]*i},e.isEqual=function(t,i){return e.parse(t).isEqualTo(e.parse(i))},e.parse=function(t){t=(t+"").toUpperCase().split(",")[0];var i=o.exec(t);return null!==i?"H"===i[2]?new e(r.Minutes,60*h(i[1])):new e(l[i[2]],h(i[1])):null!==(i=s.exec(t))?new e(r.Minutes,h(i[1])):new e(r.Invalid,0)},e.kind=function(t){return e.parse(t).kind()},e.isValid=function(t){return e.parse(t).isValid()},e.isDWM=function(t){return e.parse(t).isDWM()},e.isIntraday=function(t){return e.parse(t).isIntraday()},e.isSeconds=function(t){return e.parse(t).isSeconds()
},e.isMinutes=function(t){return e.parse(t).isMinutes()},e.isMinuteHours=function(t){return e.parse(t).isMinuteHours()},e.isDays=function(t){return e.parse(t).isDays()},e.isWeeks=function(t){return e.parse(t).isWeeks()},e.isMonths=function(t){return e.parse(t).isMonths()},e.isRange=function(t){return e.parse(t).isRange()},e.isTimeBased=function(t){return e.parse(t).isTimeBased()},e.normalize=function(t){var i=e.parse(t);return i.isValid()?i.value():null},e}();function h(e){return 0===e.length?1:parseInt(e,10)}function d(e){return e>=60&&!(e%60)}},"M7/j":function(e,t,i){"use strict";i.r(t),i.d(t,"itemsRangeIsValid",(function(){return h})),i.d(t,"splitItems",(function(){return d})),i.d(t,"PaneRendererBaseline",(function(){return p}));var r=i("mrSG"),n=i("aO4+"),o=i("hBTJ"),s=i("GEp6"),a=i("Zp/P"),l=i("Y7w9"),c=i("cPgM"),u=i("VdBB");function h(e){if(0===e.length)return!1;var t=e.findIndex((function(e){return Object(a.coordinateIsValid)(e.y)}));if(-1===t)return!1;for(var i=e.length-1;i>t&&!Object(a.coordinateIsValid)(e[i].y);)i--;return!(t>=i)}function d(e,t){for(var i=[],r=[],s=null,l=0;l=t&&r.push(c),s=c;else{if(null===s)continue;c=s}if(Object(a.coordinateIsValid)(u.y)&&(c.y>t&&u.yt))if(Math.abs(c.x-u.x)<1){var h=new n.Point(c.x,t);i.push(h),r.push(h)}else{var d=Object(o.intersectLineSegments)(c,u,new n.Point(c.x,t),new n.Point(u.x,t));if(null!==d){h=c.add(u.subtract(c).scaled(d));i.push(h),r.push(h)}}}return{topItems:i,bottomItems:r}}var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._data=null,t}return Object(r.__extends)(t,e),t.prototype.setData=function(e){this._data=e},t.prototype.hitTest=function(e){if(null===this._data)return null;for(var t=this._data,i=t.items,r=t.topLineWidth,o=t.bottomLineWidth,c=Object(a.selectionTolerance)((r+o)/2),h=Object(l.lowerbound)(i,e,(function(e,t){return e.x<=t.x})),d=Math.max(1,h-1),p=Math.min(i.length-1,h+1),f=d;f<=p;++f){var _=i[f-1],m=i[f];if(Object(s.distanceToSegment)(new n.Point(_.x,_.y),new n.Point(m.x,m.y),new n.Point(e.x,e.y)).distance<=c)return new u.HitTestResult(u.HitTestResult.REGULAR)}return null},t.prototype._drawImpl=function(e){if(null!==this._data){var t=this._data,i=t.items,r=t.baseLevelCoordinate,n=t.bottom,o=t.bottomFillColor1,s=t.bottomFillColor2,a=t.topFillColor1,l=t.topFillColor2,c=t.topLineColor,u=t.bottomLineColor,p=t.topLineWidth,f=t.bottomLineWidth;if(h(i)){var _=d(i,r),m=_.topItems,y=_.bottomItems;e.lineCap="round",e.lineJoin="round",e.translate(.5,.5),0!==m.length&&(e.beginPath(),e.moveTo(m[0].x,r),this._makeLine(e,m,!0,0),e.closePath(),e.fillStyle=this._makeLinearGradient(e,a,l,r-n,r),e.fill(),e.beginPath(),this._makeLine(e,m,!1,0),e.lineWidth=p,e.strokeStyle=c,e.stroke()),0!==y.length&&(e.beginPath(),e.moveTo(y[0].x,r),this._makeLine(e,y,!0,1),e.closePath(),e.fillStyle=this._makeLinearGradient(e,o,s,r,r+n),e.fill(),e.beginPath(),this._makeLine(e,y,!1,1),e.lineWidth=f,e.strokeStyle=u,e.stroke())}}},
@@ -323,22 +323,22 @@ return d})),i.d(t,"linking",(function(){return p}));var r,n=i("hY0g"),o=i.n(n),s
this._symbolProperty().unsubscribe(this,this._onSymbolPropertyChange),this._watchedSymbol.unsubscribe(this._watchedSymbolListenerBound),this._mainSeries().dataEvents().symbolResolved().unsubscribe(this,this._updateSeriesSymbolInfo),this._mainSeries().dataEvents().symbolError().unsubscribe(this,this._updateSeriesSymbolInfo),this._intervalProperty().unsubscribe(this,this._onIntervalPropertyChange),this._watchedInterval.unsubscribe(this._watchedIntervalListenerBound),this._timeFrameProperty().unsubscribe(this,this._onIntervalPropertyChange),this._watchedTimeFrame.unsubscribe(this._watchedTimeFrameListenerBound),delete this._watchedSymbol.hook,delete this._watchedSymbol.writeLock}this._activeChartWidget=null,this._chartWidgetBindingState=r.NotBound},e.prototype.getChartWidget=function(){return this._activeChartWidget},e.prototype.bindToChartWidgetCollection=function(e){var t=this;this._chartWidgetCollection=e,this.unbindFromChartWidget(),e.activeChartWidget.subscribe((function(e){t.unbindFromChartWidget(),t.bindToChartWidget(e)}),{callWithLast:!0})},e.prototype.bindToSearchCharts=function(e){var t=this;this.unbindFromSearchCharts(),this._searchCharts=e,e.onSearchBySymbol.subscribe(this,this._onSearchBySymbol),e.loadingSymbol.subscribe((function(e){!1===e&&(t._feedBySymbolDebounceCounter=0)})),this._watchedSymbol.subscribe(this._onSymbolLinkBound)},e.prototype.unbindFromSearchCharts=function(){this._searchCharts&&(this._searchCharts.onSearchBySymbol.unsubscribe(this,this._onSearchBySymbol),this._watchedSymbol.unsubscribe(this._onSymbolLinkBound),this._searchCharts=null)},e.prototype.setPreventFeedBySymbol=function(e){this._preventFeedBySymbol=e},e.prototype._onSearchBySymbol=function(e){if(!e.resolved_symbol)throw new Error("no resolved_symbol");this._selfEmit=!0,this._watchedSymbol.setValue(e.resolved_symbol),this._selfEmit=!1},e.prototype._onSymbolLink=function(e){if(!this._selfEmit){if(!this._searchCharts){var t="No search charts defined";throw u.logError(t),new Error(t)}this._preventFeedBySymbol||this._loadSearchCharts(e)}},e.prototype._loadSearchCharts=function(e){var t=this;if(!this._searchCharts){var i="No search charts defined";throw u.logError(i),new Error(i)}if(this._searchChartsLoadDebounced)this._feedBySymbolDebounceCounter<100&&(this._feedBySymbolDebounceCounter++,this._searchChartsLoadDebounced(e));else{var r=function(e){return t._searchCharts?(!0===t._searchCharts.loadingSymbol.value()?t._feedBySymbolDebounceCounter<100&&(t._feedBySymbolDebounceCounter++,t._searchChartsLoadDebounced=Object(a.debounce)(r,2e3),t._searchChartsLoadDebounced(e)):t._searchChartsLoadDebounced=null,t._searchCharts.feedBySymbol.call(t._searchCharts,e)):function(){}};!0===this._searchCharts.loadingSymbol.value()?this._feedBySymbolDebounceCounter<100&&(this._feedBySymbolDebounceCounter++,this._searchChartsLoadDebounced=Object(a.debounce)(r,2e3),this._searchChartsLoadDebounced(e)):this._searchCharts.feedBySymbol(e)}},e.prototype._mainSeries=function(){if(!this._activeChartWidget)throw new Error("ChartWidget is undefined")
;return this._activeChartWidget.model().mainSeries()},e.prototype._properties=function(){return this._mainSeries().properties()},e.prototype._symbolProperty=function(){return this._properties().symbol},e.prototype._intervalProperty=function(){return this._properties().interval},e.prototype._timeFrameProperty=function(){if(!this._activeChartWidget)throw new Error("ChartWidget is undefined");return this._activeChartWidget.model().model().appliedTimeFrame()},e.prototype._timeFramePropertyState=function(){return Object(l.timeFramePropertyState)(this._timeFrameProperty())},e.prototype._watchedSymbolListener=function(e){this._symbolProperty().value()!==e&&this._chartWidgetCollection.setSymbol(e)},e.prototype._sendSnowplowAnalytics=function(){if(!window.user.do_not_track)throw new Error("unsupported")},e.prototype._onSymbolPropertyChange=function(){var e=this._symbolProperty().value()!==this._watchedSymbol.value();this._watchedSymbol.setValue(this._symbolProperty().value()),e&&this._chartWidgetCollection.setSymbol(this._symbolProperty().value())},e.prototype._onSymbolResolved=function(e){var t=this._mainSeries().symbolInfo();t&&this._applyValuesFromSymbolInfo(t)},e.prototype._applyValuesFromSymbolInfo=function(e){var t=e.pro_name||s.enabled("trading_terminal")&&(e.full_name||e.name)||"";this._proSymbol.setValue(t),e.aliases&&this._symbolNamesList.setValue(e.aliases)},e.prototype._updateSeriesSymbolInfo=function(){this._seriesShortSymbol.setValue(this._properties().shortName.value());var e=this._mainSeries().symbolInfo();e?(this._applyValuesFromSymbolInfo(e),e.hasOwnProperty("supported_resolutions")?this._watchedSupportedResolutions.setValue(e.supported_resolutions):this._watchedSupportedResolutions.setValue(void 0),this._watchedIntraday.setValue(!!e.has_intraday)):(this._watchedIntraday.deleteValue(),this._proSymbol.deleteValue())},e.prototype._watchedIntervalListener=function(e){this._intervalProperty().value()!==e&&this._chartWidgetCollection.setResolution(e)},e.prototype._onIntervalPropertyChange=function(){var e=this._intervalProperty().value()!==this._watchedInterval.value();this._watchedInterval.setValue(this._intervalProperty().value()),e&&this._chartWidgetCollection.setResolution(this._intervalProperty().value())},e.prototype._watchedTimeFrameListener=function(e){h(this._timeFramePropertyState(),e)||this._chartWidgetCollection.setTimeFrame(e)},e.prototype._onTimeFramePropertyChange=function(){var e=this._timeFramePropertyState(),t=!h(e,this._watchedTimeFrame.value());this._watchedTimeFrame.setValue(e),t&&this._chartWidgetCollection.setTimeFrame(e)},e.prototype._onChartModelCreated=function(e){if(!this._activeChartWidget)throw new Error("ChartWidget is undefined");this._chartWidgetBindingState=r.BoundToModel,this._activeChartWidget.modelCreated().unsubscribe(this,this._onChartModelCreated);var t=this._symbolProperty();t.subscribe(this,this._onSymbolPropertyChange),this._watchedSymbol.setValue(t.value()),this._watchedSymbol.subscribe(this._watchedSymbolListenerBound);var i=this._mainSeries()
;i.dataEvents().symbolResolved().subscribe(this,this._onSymbolResolved),this._watchedSymbol.hook=function(e){return i.symbolSameAsCurrent(e)&&(e=i.symbol()),e},i.dataEvents().symbolResolved().subscribe(this,this._updateSeriesSymbolInfo),i.dataEvents().symbolError().subscribe(this,this._updateSeriesSymbolInfo),i.dataEvents().symbolNotPermitted().subscribe(this,this._updateSeriesSymbolInfo),i.dataEvents().symbolGroupNotPermitted().subscribe(this,this._updateSeriesSymbolInfo),i.dataEvents().extendedHoursNotPermitted().subscribe(this,this._updateSeriesSymbolInfo),this._updateSeriesSymbolInfo();var n=this._intervalProperty();n.subscribe(this,this._onIntervalPropertyChange),this._watchedInterval.setValue(n.value()),this._watchedInterval.subscribe(this._watchedIntervalListenerBound),this._timeFrameProperty().subscribe(this,this._onTimeFramePropertyChange),this._watchedTimeFrame.setValue(this._timeFramePropertyState()),this._watchedTimeFrame.subscribe(this._watchedTimeFrameListenerBound),this._activeChartWidget.readOnly()&&(this._watchedSymbol.writeLock=!0)},e}();window.TradingView=window.TradingView||{};var p=new d;window.TradingView.Linking=p},PYn8:function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("Ocx9").DefaultProperty,o=i("hayr").propertyPages,s=window.t("Three Drives Pattern");function a(e,t){this._constructor="LineToolThreeDrivers";var n=t||a.createProperties();r.call(this,e,n),i.e("lt-pane-views").then(function(e){var t=i("S6aM").LineToolThreeDrivesPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(a,r),a.prototype.pointsCount=function(){return 7},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Three Drives Pattern"},a.prototype.getStylesPropertyPage=function(){return o.LineToolABCDPatternStylesPropertyPage},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("y4pE").AbcdPatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new n("linetoolthreedrivers",e);return a._configureProperties(t),t},a._configureProperties=function(e){r._configureProperties(e)},t.LineToolThreeDrivers=a},PgQx:function(e,t){e.exports=''},PoSe:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,i){var r,n,o,s=null,a=0;i=i||{};var l=function(){a=!1===i.leading?0:Date.now(),s=null,o=e.apply(r,n),s||(r=n=null)};return function(){var c=Date.now();a||!1!==i.leading||(a=c);var u=t-(c-a);return r=this,n=arguments,u<=0||u>t?(s&&(clearTimeout(s),s=null),a=c,o=e.apply(r,n),s||(r=n=null)):s||!1===i.trailing||(s=setTimeout(l,u)),o}},
-e.exports=t.default},Q19o:function(e,t,i){"use strict";(function(t,r,n){var o=i("Eyy1").ensureNotNull,s=i("jA0t"),a=i("9iCb").applyOverridesToStudy,l=i("0YCj"),c=i("5JMW"),u=c.LineDataSourceApi,h=c.isLineToolRiskReward,d=i("N1UO").StudyApi,p=i("ltKl").SeriesApi,f=i("QrSB").SelectionApi,_=i("mf9N").PaneApi,m=i("IiTo"),y=i("LxhU").Interval,g=i("jCNj"),v=i("2jXJ").supportedLineTools,S=i("7MZv").showTooManyStudiesNotice,b=i("ogJP").isNumber,w=i("ogJP").inherit,P=i("vu5c").onSeriesCompletedOrErrorReceived,C=i("CW80").createLineToolProperties,x=i("96Yh"),T=x.lineToolEntityInfo,L=x.studyEntityInfo,I=i("lReN").LineToolsGroupControllerApi,M=i("ocrj").RemoveSourcesCommand,O=i("FDyI").ChartWidgetApiBase,A=i("mMWL"),k=function(e,i){O.call(this,e),this._panes=new WeakMap,this._studies=new WeakMap,this._lineDataSources=new WeakMap,this._activateChart=i,this._selectionApi=null,this._visibleBarsChanged=new t,this._chartWidget.onAboutToBeDestroyed().subscribe(this,this._destroy,!0),this._chartWidget.withModel(this,(function(){this._chartWidget.model().timeScale().visibleBarsStrictRangeChanged().subscribe(this,this._onVisibleBarsChanged)}))};function E(e,t){return t.map((function(t){return e.dataSourceForId(t)}))}function D(e,t){var i=n.utc_to_cal(t.timezone,1e3*e),r=t.spec.correctTradingDay(i);return n.set_hms(r,0,0,0,0,g.get_timezone("Etc/UTC")),r.getTime()/1e3}w(k,O),k.prototype._getPaneApi=function(e){var t=this._panes.get(e);return void 0===t&&(t=new _(e,this._chartWidget),this._panes.set(e,t)),t},k.prototype._getStudyApi=function(e){var t=this._studies.get(e);return void 0===t&&(t=new d(e,this._chartWidget.model()),this._studies.set(e,t)),t},k.prototype._getLineDataSourceApi=function(e){var t=this._lineDataSources.get(e);return void 0===t&&(t=new u(e,this._chartWidget.model().model(),{apiPointsToDataSource:this._convertUserPointsToDataSource.bind(this),dataSourcePointsToPriced:function(e){var t=this._chartWidget.model().mainSeries().syncModel(),i=this._chartWidget.model().timeScale();return e.map((function(e){var r=i.normalizeBarIndex(e.index);return{price:e.price,time:t.projectTime(r.time_t,r.offset)}}))}.bind(this)}),this._lineDataSources.set(e,t)),t},k.prototype._makeSubscriptionFromDelegate=function(e){return{subscribe:e.subscribe.bind(e),unsubscribe:e.unsubscribe.bind(e),unsubscribeAll:e.unsubscribeAll.bind(e)}},k.prototype.executeActionById=function(e){this._chartWidget.executeActionById(e)},k.prototype.getCheckableActionState=function(e){return this._chartWidget.getCheckableActionState(e)},k.prototype.setZoomEnabled=function(e){this._chartWidget.model().model().setZoomEnabled(e)},k.prototype.setScrollEnabled=function(e){this._chartWidget.model().model().setScrollEnabled(e)},k.prototype.refreshMarks=function(){this._chartWidget.refreshMarks()},k.prototype.clearMarks=function(){this._chartWidget.clearMarks()},k.prototype.symbol=function(){return this._chartWidget.getSymbol()},k.prototype.symbolExt=function(){var e=this._chartWidget.model().mainSeries().symbolInfo();return e?{symbol:e.name,full_name:e.full_name,
-exchange:e.exchange,description:e.description,type:e.type}:null},k.prototype.resolution=function(){return this._chartWidget.model().mainSeries().properties().interval.value()},k.prototype.setSymbol=function(e,t){if(e!==this.symbol()){var i=this._chartWidget.model().mainSeries().dataEvents();t&&P(i,(function(e){e||t()})),this._activateChart(),this._chartWidget.setSymbol(e)}},k.prototype.resetData=function(){this._chartWidget.model().mainSeries().rerequestData()},k.prototype.setResolution=function(e,t){var i=y.normalize(e);if(null!==i&&i!==this.resolution()){var r=this._chartWidget.model().mainSeries().dataEvents();t&&P(r,(function(e){e||t()})),this._activateChart(),this._chartWidget.setResolution(i)}},k.prototype.setEntityVisibility=function(e,t){console.warn("`setEntityVisibility` is deprecated. Use shape/study API instead");var i=this._chartWidget.model().model().dataSourceForId(e);if(i){var r=i.properties();r&&r.visible&&r.visible.setValue(t)}},k.prototype.getAllStudies=function(){return this._chartWidget.model().model().allStudies().map(L)},k.prototype.availableZOrderOperations=function(e){var t=E(this._chartWidget.model().model(),e);return this._chartWidget.model().availableZOrderOperations(t)},k.prototype.sendToBack=function(e){var t=E(this._chartWidget.model().model(),e);this._chartWidget.model().sendToBack(t)},k.prototype.bringToFront=function(e){var t=E(this._chartWidget.model().model(),e);this._chartWidget.model().bringToFront(t)},k.prototype.insertAfter=function(e,t){var i=this._chartWidget.model().model(),r=E(i,e),n=i.dataSourceForId(t);this._chartWidget.model().insertAfter(r,n)},k.prototype.insertBefore=function(e,t){var i=this._chartWidget.model().model(),r=E(i,e),n=i.dataSourceForId(t);this._chartWidget.model().insertBefore(r,n)},k.prototype.bringForward=function(e){var t=E(this._chartWidget.model().model(),e);this._chartWidget.model().bringForward(t)},k.prototype.sendBackward=function(e){var t=E(this._chartWidget.model().model(),e);this._chartWidget.model().sendBackward(t)},k.prototype.showPropertiesDialog=function(e){var t=this._chartWidget.model().model().dataSourceForId(e);if(null===t)throw new Error("Study or shape "+e+" does not exist");this._chartWidget.showChartPropertiesForSource(t)},k.prototype.getAllShapes=function(){return this._chartWidget.model().model().allLineTools().map(T).filter((function(e){return null!==e.name}))},k.prototype.removeAllShapes=function(){this._chartWidget.removeAllDrawingTools()},k.prototype.removeAllStudies=function(){this._chartWidget.removeAllStudies()},k.prototype.removeEntity=function(e,t){var i=this._chartWidget.model().chartModel().dataSourceForId(e);i?t&&t.disableUndo?new M(this._chartWidget.model().chartModel(),[i],"").redo():this._chartWidget.model().removeSource(i,!0):console.warn("Can't find a source with id: "+e)},k.prototype.removeEntityWithUndo=function(e){var t=this._chartWidget.model().chartModel().dataSourceForId(e);this._chartWidget.model().removeSource(t,!1)},k.prototype.selection=function(){
-return null===this._selectionApi&&(this._selectionApi=new f(this._chartWidget.model().model())),this._selectionApi},k.prototype.createStudyTemplate=function(e){return this._chartWidget.model().model().studyTemplate(e.saveSymbol,e.saveInterval)},k.prototype.drawOnAllCharts=function(e){A.drawOnAllCharts.setValue(e)},k.prototype.applyStudyTemplate=function(e){this._chartWidget.model().applyStudyTemplate(e,""+1e3*Math.random())},k.prototype.setVisibleRange=function(e,t){if(void 0!==e&&e.from&&e.to&&!isNaN(e.from)&&!isNaN(e.to)){var i=this._chartWidget.model().model().mainSeries(),n=[parseInt(e.from),parseInt(e.to)],o=y.isDWM(i.interval())&&!r.enabled("disable_resolution_rebuild")?this._alignPoints(n):n,s=o[0],a=o[1],l=void 0!==t&&"function"==typeof t,c=new Promise(function(e){this._chartWidget.setVisibleTimeRange(s,a,l?{}:t,e)}.bind(this));return l&&(console.warn("setVisibleRange now returns a Promise object and don't accept callback as the last argument"),c.then(t)),c}console.warn("Wrong time range: "+JSON.stringify(e)+'. Expected an object with "from" and "to" numeric values.')},k.prototype._getSession=function(){var e=this._chartWidget.model().mainSeries().symbolInfo();return new m.SessionInfo(e.timezone,e.session,e.holidays,e.corrections)},k.prototype.getVisibleRange=function(){var e={from:0,to:0},t=this._chartWidget.model().timeScale(),i=t.visibleBarsStrictRange();if(null===i)return e;var r=this._chartWidget.model().mainSeries(),n=r.syncModel();if(null===n)return e;var s=o(r.data().last()),a=i.lastBar()-s.index,l=a<=0?t.indexToTimePoint(i.lastBar()):n.projectTime(s.value[TradingView.TIME_PLOT],a);if(e.from=+t.indexToTimePoint(Math.max(0,i.firstBar()))||0,e.to=+l||0,y.isDWM(r.interval())){var c=this._getSession();e.from=D(e.from,c),e.to=D(e.to,c)}return e},k.prototype.getTimeScaleLogicalRange=function(){return this._chartWidget.model().timeScale().logicalRange()},k.prototype.getVisiblePriceRange=function(){return console.warn("`getVisiblePriceRange` is deprecated. Use Price Scale API instead"),this._chartWidget.model().mainSeries()?this._chartWidget.model().mainSeries().priceScale().priceRangeInPrice():null},k.prototype.scrollPosition=function(){return this._chartWidget.model().timeScale().rightOffset()},k.prototype.defaultScrollPosition=function(){return this._chartWidget.model().timeScale().defaultRightOffsetProperty().value()},k.prototype._createTradingPrimitive=function(e,t){var i=this;var r,n,s=this._chartWidget.model().model(),a=s.paneForSource(s.mainSeries());return(t?s:this._chartWidget.model()).createLineTool(a,(r=TradingView.CLOSE_PLOT,{index:(n=o(i._chartWidget.model().mainSeries().bars().last())).index,price:n.value[r]}),e)._adapter},k.prototype.createOrderLine=function(e){e=e||{};return this._createTradingPrimitive("LineToolOrder",e.disableUndo)},k.prototype.createPositionLine=function(e){e=e||{};return this._createTradingPrimitive("LineToolPosition",e.disableUndo)},k.prototype.createExecutionShape=function(e){e=e||{};return this._createTradingPrimitive("LineToolExecution",e.disableUndo)},
-k.prototype.createShape=function(e,t){return this.createMultipointShape([e],t)},k.prototype._alignPoints=function(e){var t=this._chartWidget.model().model(),i=t.mainSeries();if(t.timeScale().isEmpty())return e;var r=this._getSession(),n=m.createDWMAligner(i.interval(),r);return null===n?e:e.map((function(e){return e?(n.moveTo(1e3*e),n.startOfBar(0)/1e3):e}))},k.prototype._convertUserPointsToDataSource=function(e){var t=this._chartWidget.model().model(),i=t.mainSeries(),n=t.timeScale().points(),o=i.data();if(t.timeScale().isEmpty())return null;var s=e.map((function(e){return e.time})),a=y.isDWM(i.interval())&&!r.enabled("disable_resolution_rebuild")?this._alignPoints(s):s;function l(e,t,r){var s=n.closestIndexLeft(e)||0,a={index:s},l=n.valueAt(s);if(e>l&&s===n.lastIndex()){var c=i.syncModel().distance(l,e);c.success&&(a.index=a.index+c.result)}if(b(t))a.price=t;else{var u=r?["open","high","low","close"].indexOf(r)+1:1;u<=0&&(u=1),a.price=o.valueAt(s)[u]}return a}for(var c=[],u=0;u2)throw new Error("Wrong points count for "+t.shape+". Required 1 or 2");2===l.length&&(p.startChanging(1,l[1]),p.setPoint(1,l[1]),p.endChanging())}else{var f=p.pointsCount();if(f!==l.length&&-1!==f)throw new Error("Wrong points count for "+t.shape+". Required "+f);for(var _=1;_this._minValue&&e.maxValue()5;if(c||!t){if(c&&!this._moveExceededManhattanDistance&&t){var u=.5*s,h=a>=u&&!this._options.treatVertTouchDragAsPageScroll,d=u>a&&!this._options.treatHorzTouchDragAsPageScroll;h||d||(this._preventDragProcess=!0)}c&&(this._moveExceededManhattanDistance=!0,this._cancelClick=!0,t&&this._clearLongTapTimeout()),this._preventDragProcess||(this._processEvent(i,this._handler.pressedMouseMoveEvent),t&&Object(o.a)(e))}}}},e.prototype._mouseUpHandler=function(e){if(!("button"in e)||0===e.button){var t=this._makeCompatEvent(e);this._clearLongTapTimeout(),this._mouseMoveStartPosition=null,this._mousePressed=!1,this._unsubscribeRoot&&(this._unsubscribeRoot(),this._unsubscribeRoot=null);var i=l(e);if(i&&this._mouseLeaveHandler(e),this._processEvent(t,this._handler.mouseUpEvent),i?++this._tapCount:++this._clickCount,this._clickTimeoutId&&(this._clickCount>1||this._tapCount>1))Math.abs(this._clickPosition.x-t.localX)+Math.abs(this._clickPosition.y-t.localY)<(i?15:5)&&!this._cancelClick&&this._processEvent(t,this._handler.mouseDoubleClickEvent),this._resetClickTimeout();else this._cancelClick||this._processEvent(t,this._handler.mouseClickEvent);if(l(e)&&(0===this._tapCount&&Object(o.a)(e),this._mouseLeaveHandler(e),0===e.touches.length&&this._longTapActive&&(this._longTapActive=!1,Object(o.a)(e))),r.isFF)this._target.ownerDocument.documentElement.removeEventListener("mouseleave",this._onFirefoxOutsideMouseUp)}},e.prototype._clearLongTapTimeout=function(){null!==this._longTapTimeoutId&&(clearTimeout(this._longTapTimeoutId),this._longTapTimeoutId=null)},e.prototype._mouseDownHandler=function(e){if(!("button"in e)||0===e.button){var t=this._target.ownerDocument.documentElement;r.isFF&&t.addEventListener("mouseleave",this._onFirefoxOutsideMouseUp);var i=this._makeCompatEvent(e);this._cancelClick=!1,this._moveExceededManhattanDistance=!1,this._preventDragProcess=!1,l(e)&&this._mouseEnterHandler(e),this._mouseMoveStartPosition={x:i.pageX,y:i.pageY},this._unsubscribeRoot&&(this._unsubscribeRoot(),this._unsubscribeRoot=null);var n=this._mouseMoveWithDownHandler.bind(this),o=this._mouseUpHandler.bind(this);this._unsubscribeRoot=function(){t.removeEventListener("touchmove",n),t.removeEventListener("touchend",o),t.removeEventListener("mousemove",n),t.removeEventListener("mouseup",o)},t.addEventListener("touchmove",n,{passive:!1}),t.addEventListener("touchend",o,{passive:!1}),this._clearLongTapTimeout(),l(e)&&1===e.touches.length?this._longTapTimeoutId=setTimeout(this._longTapHandler.bind(this,e),240):(t.addEventListener("mousemove",n),t.addEventListener("mouseup",o)),
-this._mousePressed=!0,this._processEvent(i,this._handler.mouseDownEvent),this._clickTimeoutId||(this._clickCount=0,this._tapCount=0,this._clickTimeoutId=setTimeout(this._resetClickTimeout.bind(this),500),this._clickPosition={x:i.localX,y:i.localY})}},e.prototype._init=function(){var e=this;this._target.addEventListener("mouseenter",this._mouseEnterHandler.bind(this)),this._target.addEventListener("touchcancel",this._clearLongTapTimeout.bind(this));var t=this._target.ownerDocument,i=function(t){e._handler.mouseDownOutsideEvent&&(t.target&&e._target.contains(t.target)||e._handler.mouseDownOutsideEvent())};this._unsubscribeOutsideEvents=function(){t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",i)},t.addEventListener("mousedown",i),t.addEventListener("touchstart",i,{passive:!0}),this._target.addEventListener("mouseleave",this._mouseLeaveHandler.bind(this)),this._target.addEventListener("contextmenu",this._longTapHandler.bind(this)),this._target.addEventListener("touchstart",this._mouseDownHandler.bind(this),{passive:!0}),Modernizr.mobiletouch||this._target.addEventListener("mousedown",this._mouseDownHandler.bind(this)),this._initPinch(),this._target.addEventListener("touchmove",(function(){}),{passive:!1})},e.prototype._initPinch=function(){var e=this;void 0===this._handler.pinchStartEvent&&void 0===this._handler.pinchEvent&&void 0===this._handler.pinchEndEvent||(this._target.addEventListener("touchstart",(function(t){return e._checkPinchState(t.touches)}),{passive:!0}),this._target.addEventListener("touchmove",(function(t){if(2===t.touches.length&&null!==e._startPinchMiddlePoint&&void 0!==e._handler.pinchEvent){var i=a(t.touches[0],t.touches[1])/e._startPinchDistance;e._handler.pinchEvent(e._startPinchMiddlePoint,i),Object(o.a)(t)}}),{passive:!1}),this._target.addEventListener("touchend",(function(t){e._checkPinchState(t.touches)})))},e.prototype._checkPinchState=function(e){1===e.length&&(this._pinchPrevented=!1),2!==e.length||this._pinchPrevented||this._longTapActive?this._stopPinch():this._startPinch(e)},e.prototype._startPinch=function(e){var t=this._target.getBoundingClientRect()||{left:0,top:0};this._startPinchMiddlePoint={x:(e[0].clientX-t.left+(e[1].clientX-t.left))/2,y:(e[0].clientY-t.top+(e[1].clientY-t.top))/2},this._startPinchDistance=a(e[0],e[1]),void 0!==this._handler.pinchStartEvent&&this._handler.pinchStartEvent(),this._clearLongTapTimeout()},e.prototype._stopPinch=function(){null!==this._startPinchMiddlePoint&&(this._startPinchMiddlePoint=null,void 0!==this._handler.pinchEndEvent&&this._handler.pinchEndEvent())},e.prototype._mouseLeaveHandler=function(e){this._unsubscribeMousemove&&this._unsubscribeMousemove();var t=this._makeCompatEvent(e);this._processEvent(t,this._handler.mouseLeaveEvent)},e.prototype._longTapHandler=function(e){l(e)||Object(o.a)(e);var t=this._makeCompatEvent(e);this._processEvent(t,this._handler.longTapEvent),this._processEvent(t,this._handler.contextMenuEvent),this._cancelClick=!0,this._longTapActive=!0},e.prototype._processEvent=function(e,t){
-t&&t.call(this._handler,e)},e.prototype._makeCompatEvent=function(e){var t;t="touches"in e&&e.touches.length?e.touches[0]:"changedTouches"in e&&e.changedTouches.length?e.changedTouches[0]:e;var i=this._target.getBoundingClientRect()||{left:0,top:0};return{clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY,screenX:t.screenX,screenY:t.screenY,localX:t.clientX-i.left,localY:t.clientY-i.top,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey,type:e.type.startsWith("mouse")?"mouse":"touch",target:t.target,view:e.view,preventDefault:function(){Object(o.a)(e)}}},e}();function a(e,t){var i=e.clientX-t.clientX,r=e.clientY-t.clientY;return Math.sqrt(i*i+r*r)}function l(e){return Boolean(e.touches)}},Si3H:function(e,t,i){"use strict";i.r(t);var r=i("Eyy1"),n=i("0YCj"),o=i.n(n),s=i("ogJP"),a=function(){function e(){}return e.prototype.targetMetaInfoVersion=function(){return 47},e.prototype.migrateMetaInfo=function(e){var t=e,i=e;if(i._metainfoVersion=47,t.defaults&&void 0!==t.defaults.precision){var r=t.defaults&&t.defaults.precision,n=Object(s.isNumber)(r)?r:parseInt(r);0===n?i.format={type:"volume"}:isFinite(n)?i.format={type:"price",precision:n}:i.format={type:"inherit"},delete t.defaults.precision}else i.format={type:"inherit"}},e.prototype.migratePropState=function(e){},e}(),l=i("mrSG"),c=function(){function e(){}return e.prototype.targetMetaInfoVersion=function(){return 50},e.prototype.migrateMetaInfo=function(e){var t=e,i=e;if(i._metainfoVersion=50,void 0!==t.defaults&&void 0!==t.defaults.ohlcPlots&&void 0!==t.ohlcPlots)for(var n=t.ohlcPlots,o=t.defaults.ohlcPlots,s=Object(r.ensureDefined)(Object(r.ensureDefined)(i.defaults).ohlcPlots),a=0,c=Object.keys(o);a=n.targetMetaInfoVersion()||(n.migrateMetaInfo(e),void 0!==t&&n.migratePropState(t),Object(r.assert)(e._metainfoVersion===n.targetMetaInfoVersion()))}))}u.sort((function(e,t){return e.targetMetaInfoVersion()-t.targetMetaInfoVersion()}))},SqfW:function(e,t,i){"use strict";i.d(t,"b",(function(){return s})),i.d(t,"a",(function(){return a}));var r=i("mrSG"),n=i("tqok"),o=i("hsV8");function s(e,t){if(e.index>=t.length)return null;var i=t[e.index];return i===n.a?null:{startPrice:e.startPrice,endPrice:e.endPrice,index:i,extendTop:e.extendTop,extendBottom:e.extendBottom}}function a(e,t,i){var n=Object(o.ensureTimePointIndexIndex)(i.indexOf(e.index));return Object(r.__assign)(Object(r.__assign)({id:t},e),{index:n})}},Ss5c:function(e,t,i){"use strict";(function(e){
+e.exports=t.default},Q19o:function(e,t,i){"use strict";(function(t,r){var n=i("Eyy1").ensureNotNull,o=i("jA0t"),s=i("9iCb").applyOverridesToStudy,a=i("0YCj"),l=i("5JMW"),c=l.LineDataSourceApi,u=l.isLineToolRiskReward,h=i("N1UO").StudyApi,d=i("ltKl").SeriesApi,p=i("QrSB").SelectionApi,f=i("mf9N").PaneApi,_=i("IiTo"),m=i("LxhU").Interval,y=i("jCNj"),g=i("2jXJ").supportedLineTools,v=i("7MZv").showTooManyStudiesNotice,S=i("ogJP").isNumber,b=i("ogJP").inherit,w=i("vu5c").onSeriesCompletedOrErrorReceived,P=i("CW80").createLineToolProperties,C=i("96Yh"),x=C.lineToolEntityInfo,T=C.studyEntityInfo,L=i("lReN").LineToolsGroupControllerApi,I=i("ocrj").RemoveSourcesCommand,M=i("FDyI").ChartWidgetApiBase,O=i("mMWL"),A=function(e,i){M.call(this,e),this._panes=new WeakMap,this._studies=new WeakMap,this._lineDataSources=new WeakMap,this._activateChart=i,this._selectionApi=null,this._visibleBarsChanged=new t,this._chartWidget.onAboutToBeDestroyed().subscribe(this,this._destroy,!0),this._chartWidget.withModel(this,(function(){this._chartWidget.model().timeScale().visibleBarsStrictRangeChanged().subscribe(this,this._onVisibleBarsChanged)}))};function k(e,t){return t.map((function(t){return e.dataSourceForId(t)}))}function E(e,t){var i=r.utc_to_cal(t.timezone,1e3*e),n=t.spec.correctTradingDay(i);return r.set_hms(n,0,0,0,0,y.get_timezone("Etc/UTC")),n.getTime()/1e3}b(A,M),A.prototype._getPaneApi=function(e){var t=this._panes.get(e);return void 0===t&&(t=new f(e,this._chartWidget),this._panes.set(e,t)),t},A.prototype._getStudyApi=function(e){var t=this._studies.get(e);return void 0===t&&(t=new h(e,this._chartWidget.model()),this._studies.set(e,t)),t},A.prototype._getLineDataSourceApi=function(e){var t=this._lineDataSources.get(e);return void 0===t&&(t=new c(e,this._chartWidget.model().model(),{apiPointsToDataSource:this._convertUserPointsToDataSource.bind(this),dataSourcePointsToPriced:function(e){var t=this._chartWidget.model().mainSeries().syncModel(),i=this._chartWidget.model().timeScale();return e.map((function(e){var r=i.normalizeBarIndex(e.index);return{price:e.price,time:t.projectTime(r.time_t,r.offset)}}))}.bind(this)}),this._lineDataSources.set(e,t)),t},A.prototype._makeSubscriptionFromDelegate=function(e){return{subscribe:e.subscribe.bind(e),unsubscribe:e.unsubscribe.bind(e),unsubscribeAll:e.unsubscribeAll.bind(e)}},A.prototype.executeActionById=function(e){this._chartWidget.executeActionById(e)},A.prototype.getCheckableActionState=function(e){return this._chartWidget.getCheckableActionState(e)},A.prototype.setZoomEnabled=function(e){this._chartWidget.model().model().setZoomEnabled(e)},A.prototype.setScrollEnabled=function(e){this._chartWidget.model().model().setScrollEnabled(e)},A.prototype.refreshMarks=function(){this._chartWidget.refreshMarks()},A.prototype.clearMarks=function(){this._chartWidget.clearMarks()},A.prototype.symbol=function(){return this._chartWidget.getSymbol()},A.prototype.symbolExt=function(){var e=this._chartWidget.model().mainSeries().symbolInfo();return e?{symbol:e.name,full_name:e.full_name,
+exchange:e.exchange,description:e.description,type:e.type}:null},A.prototype.resolution=function(){return this._chartWidget.model().mainSeries().properties().interval.value()},A.prototype.setSymbol=function(e,t){if(e!==this.symbol()){var i=this._chartWidget.model().mainSeries().dataEvents();t&&w(i,(function(e){e||t()})),this._activateChart(),this._chartWidget.setSymbol(e)}},A.prototype.resetData=function(){this._chartWidget.model().mainSeries().rerequestData()},A.prototype.setResolution=function(e,t){var i=m.normalize(e);if(null!==i&&i!==this.resolution()){var r=this._chartWidget.model().mainSeries().dataEvents();t&&w(r,(function(e){e||t()})),this._activateChart(),this._chartWidget.setResolution(i)}},A.prototype.setEntityVisibility=function(e,t){console.warn("`setEntityVisibility` is deprecated. Use shape/study API instead");var i=this._chartWidget.model().model().dataSourceForId(e);if(i){var r=i.properties();r&&r.visible&&r.visible.setValue(t)}},A.prototype.getAllStudies=function(){return this._chartWidget.model().model().allStudies().map(T)},A.prototype.availableZOrderOperations=function(e){var t=k(this._chartWidget.model().model(),e);return this._chartWidget.model().availableZOrderOperations(t)},A.prototype.sendToBack=function(e){var t=k(this._chartWidget.model().model(),e);this._chartWidget.model().sendToBack(t)},A.prototype.bringToFront=function(e){var t=k(this._chartWidget.model().model(),e);this._chartWidget.model().bringToFront(t)},A.prototype.insertAfter=function(e,t){var i=this._chartWidget.model().model(),r=k(i,e),n=i.dataSourceForId(t);this._chartWidget.model().insertAfter(r,n)},A.prototype.insertBefore=function(e,t){var i=this._chartWidget.model().model(),r=k(i,e),n=i.dataSourceForId(t);this._chartWidget.model().insertBefore(r,n)},A.prototype.bringForward=function(e){var t=k(this._chartWidget.model().model(),e);this._chartWidget.model().bringForward(t)},A.prototype.sendBackward=function(e){var t=k(this._chartWidget.model().model(),e);this._chartWidget.model().sendBackward(t)},A.prototype.showPropertiesDialog=function(e){var t=this._chartWidget.model().model().dataSourceForId(e);if(null===t)throw new Error("Study or shape "+e+" does not exist");this._chartWidget.showChartPropertiesForSource(t)},A.prototype.getAllShapes=function(){return this._chartWidget.model().model().allLineTools().map(x).filter((function(e){return null!==e.name}))},A.prototype.removeAllShapes=function(){this._chartWidget.removeAllDrawingTools()},A.prototype.removeAllStudies=function(){this._chartWidget.removeAllStudies()},A.prototype.removeEntity=function(e,t){var i=this._chartWidget.model().chartModel().dataSourceForId(e);i?t&&t.disableUndo?new I(this._chartWidget.model().chartModel(),[i],"").redo():this._chartWidget.model().removeSource(i,!0):console.warn("Can't find a source with id: "+e)},A.prototype.removeEntityWithUndo=function(e){var t=this._chartWidget.model().chartModel().dataSourceForId(e);this._chartWidget.model().removeSource(t,!1)},A.prototype.selection=function(){
+return null===this._selectionApi&&(this._selectionApi=new p(this._chartWidget.model().model())),this._selectionApi},A.prototype.createStudyTemplate=function(e){return this._chartWidget.model().model().studyTemplate(e.saveSymbol,e.saveInterval)},A.prototype.drawOnAllCharts=function(e){O.drawOnAllCharts.setValue(e)},A.prototype.applyStudyTemplate=function(e){this._chartWidget.model().applyStudyTemplate(e,""+1e3*Math.random())},A.prototype.setVisibleRange=function(e,t){if(void 0!==e&&e.from&&e.to&&!isNaN(e.from)&&!isNaN(e.to)){var i=[parseInt(e.from),parseInt(e.to)],r=this._alignPoints(i),n=r[0],o=r[1],s=void 0!==t&&"function"==typeof t,a=new Promise(function(e){this._chartWidget.setVisibleTimeRange(n,o,s?{}:t,e)}.bind(this));return s&&(console.warn("setVisibleRange now returns a Promise object and don't accept callback as the last argument"),a.then(t)),a}console.warn("Wrong time range: "+JSON.stringify(e)+'. Expected an object with "from" and "to" numeric values.')},A.prototype._getSession=function(){var e=this._chartWidget.model().mainSeries().symbolInfo();return new _.SessionInfo(e.timezone,e.session,e.holidays,e.corrections)},A.prototype.getVisibleRange=function(){var e={from:0,to:0},t=this._chartWidget.model().timeScale(),i=t.visibleBarsStrictRange();if(null===i)return e;var r=this._chartWidget.model().mainSeries(),o=r.syncModel();if(null===o)return e;var s=n(r.data().last()),a=i.lastBar()-s.index,l=a<=0?t.indexToTimePoint(i.lastBar()):o.projectTime(s.value[TradingView.TIME_PLOT],a);if(e.from=+t.indexToTimePoint(Math.max(0,i.firstBar()))||0,e.to=+l||0,m.isDWM(r.interval())){var c=this._getSession();e.from=E(e.from,c),e.to=E(e.to,c)}return e},A.prototype.getTimeScaleLogicalRange=function(){return this._chartWidget.model().timeScale().logicalRange()},A.prototype.getVisiblePriceRange=function(){return console.warn("`getVisiblePriceRange` is deprecated. Use Price Scale API instead"),this._chartWidget.model().mainSeries()?this._chartWidget.model().mainSeries().priceScale().priceRangeInPrice():null},A.prototype.scrollPosition=function(){return this._chartWidget.model().timeScale().rightOffset()},A.prototype.defaultScrollPosition=function(){return this._chartWidget.model().timeScale().defaultRightOffsetProperty().value()},A.prototype._createTradingPrimitive=function(e,t){var i=this;var r,o,s=this._chartWidget.model().model(),a=s.paneForSource(s.mainSeries());return(t?s:this._chartWidget.model()).createLineTool(a,(r=TradingView.CLOSE_PLOT,{index:(o=n(i._chartWidget.model().mainSeries().bars().last())).index,price:o.value[r]}),e)._adapter},A.prototype.createOrderLine=function(e){e=e||{};return this._createTradingPrimitive("LineToolOrder",e.disableUndo)},A.prototype.createPositionLine=function(e){e=e||{};return this._createTradingPrimitive("LineToolPosition",e.disableUndo)},A.prototype.createExecutionShape=function(e){e=e||{};return this._createTradingPrimitive("LineToolExecution",e.disableUndo)},A.prototype.createShape=function(e,t){return this.createMultipointShape([e],t)},A.prototype._alignPoints=function(e){
+var t=this._chartWidget.model().model(),i=t.mainSeries(),r=i.interval();if(t.timeScale().isEmpty()||!m.isDWM(r))return e;var n=_.createAligner(r,i.symbolInfo(),!0);return null===n?e:e.map((function(e){return e?(n.moveTo(1e3*e),n.startOfBar(0)/1e3):e}))},A.prototype._convertUserPointsToDataSource=function(e){var t=this._chartWidget.model().model(),i=t.mainSeries(),r=t.timeScale().points(),n=i.data();if(t.timeScale().isEmpty())return null;var o=e.map((function(e){return e.time})),s=this._alignPoints(o);function a(e,t,o){var s=r.closestIndexLeft(e)||0,a={index:s},l=r.valueAt(s);if(e>l&&s===r.lastIndex()){var c=i.syncModel().distance(l,e);c.success&&(a.index=a.index+c.result)}if(S(t))a.price=t;else{var u=o?["open","high","low","close"].indexOf(o)+1:1;u<=0&&(u=1),a.price=n.valueAt(s)[u]}return a}for(var l=[],c=0;c2)throw new Error("Wrong points count for "+t.shape+". Required 1 or 2");2===l.length&&(p.startChanging(1,l[1]),p.setPoint(1,l[1]),p.endChanging())}else{var f=p.pointsCount();if(f!==l.length&&-1!==f)throw new Error("Wrong points count for "+t.shape+". Required "+f);for(var _=1;_this._minValue&&e.maxValue()5;if(c||!t){if(c&&!this._moveExceededManhattanDistance&&t){var u=.5*s,h=a>=u&&!this._options.treatVertTouchDragAsPageScroll,d=u>a&&!this._options.treatHorzTouchDragAsPageScroll;h||d||(this._preventDragProcess=!0)}c&&(this._moveExceededManhattanDistance=!0,this._cancelClick=!0,t&&this._clearLongTapTimeout()),this._preventDragProcess||(this._processEvent(i,this._handler.pressedMouseMoveEvent),t&&Object(o.a)(e))}}}},e.prototype._mouseUpHandler=function(e){if(!("button"in e)||0===e.button){var t=this._makeCompatEvent(e);this._clearLongTapTimeout(),this._mouseMoveStartPosition=null,this._mousePressed=!1,this._unsubscribeRoot&&(this._unsubscribeRoot(),this._unsubscribeRoot=null);var i=l(e);if(i&&this._mouseLeaveHandler(e),this._processEvent(t,this._handler.mouseUpEvent),i?++this._tapCount:++this._clickCount,this._clickTimeoutId&&(this._clickCount>1||this._tapCount>1))Math.abs(this._clickPosition.x-t.localX)+Math.abs(this._clickPosition.y-t.localY)<(i?15:5)&&!this._cancelClick&&this._processEvent(t,this._handler.mouseDoubleClickEvent),this._resetClickTimeout();else this._cancelClick||this._processEvent(t,this._handler.mouseClickEvent);if(l(e)&&(0===this._tapCount&&Object(o.a)(e),this._mouseLeaveHandler(e),0===e.touches.length&&this._longTapActive&&(this._longTapActive=!1,Object(o.a)(e))),r.isFF)this._target.ownerDocument.documentElement.removeEventListener("mouseleave",this._onFirefoxOutsideMouseUp)}},e.prototype._clearLongTapTimeout=function(){null!==this._longTapTimeoutId&&(clearTimeout(this._longTapTimeoutId),this._longTapTimeoutId=null)},e.prototype._mouseDownHandler=function(e){if(!("button"in e)||0===e.button){var t=this._target.ownerDocument.documentElement;r.isFF&&t.addEventListener("mouseleave",this._onFirefoxOutsideMouseUp);var i=this._makeCompatEvent(e);this._cancelClick=!1,this._moveExceededManhattanDistance=!1,this._preventDragProcess=!1,l(e)&&this._mouseEnterHandler(e),this._mouseMoveStartPosition={x:i.pageX,y:i.pageY},this._unsubscribeRoot&&(this._unsubscribeRoot(),this._unsubscribeRoot=null);var n=this._mouseMoveWithDownHandler.bind(this),o=this._mouseUpHandler.bind(this);this._unsubscribeRoot=function(){t.removeEventListener("touchmove",n),t.removeEventListener("touchend",o),t.removeEventListener("mousemove",n),t.removeEventListener("mouseup",o)},t.addEventListener("touchmove",n,{passive:!1}),t.addEventListener("touchend",o,{passive:!1}),this._clearLongTapTimeout(),l(e)&&1===e.touches.length?this._longTapTimeoutId=setTimeout(this._longTapHandler.bind(this,e),240):(t.addEventListener("mousemove",n),t.addEventListener("mouseup",o)),this._mousePressed=!0,this._processEvent(i,this._handler.mouseDownEvent),this._clickTimeoutId||(this._clickCount=0,this._tapCount=0,this._clickTimeoutId=setTimeout(this._resetClickTimeout.bind(this),500),this._clickPosition={x:i.localX,y:i.localY})}},e.prototype._init=function(){var e=this
+;this._target.addEventListener("mouseenter",this._mouseEnterHandler.bind(this)),this._target.addEventListener("touchcancel",this._clearLongTapTimeout.bind(this));var t=this._target.ownerDocument,i=function(t){e._handler.mouseDownOutsideEvent&&(t.target&&e._target.contains(t.target)||e._handler.mouseDownOutsideEvent())};this._unsubscribeOutsideEvents=function(){t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",i)},t.addEventListener("mousedown",i),t.addEventListener("touchstart",i,{passive:!0}),this._target.addEventListener("mouseleave",this._mouseLeaveHandler.bind(this)),this._target.addEventListener("contextmenu",this._longTapHandler.bind(this)),this._target.addEventListener("touchstart",this._mouseDownHandler.bind(this),{passive:!0}),Modernizr.mobiletouch||this._target.addEventListener("mousedown",this._mouseDownHandler.bind(this)),this._initPinch(),this._target.addEventListener("touchmove",(function(){}),{passive:!1})},e.prototype._initPinch=function(){var e=this;void 0===this._handler.pinchStartEvent&&void 0===this._handler.pinchEvent&&void 0===this._handler.pinchEndEvent||(this._target.addEventListener("touchstart",(function(t){return e._checkPinchState(t.touches)}),{passive:!0}),this._target.addEventListener("touchmove",(function(t){if(2===t.touches.length&&null!==e._startPinchMiddlePoint&&void 0!==e._handler.pinchEvent){var i=a(t.touches[0],t.touches[1])/e._startPinchDistance;e._handler.pinchEvent(e._startPinchMiddlePoint,i),Object(o.a)(t)}}),{passive:!1}),this._target.addEventListener("touchend",(function(t){e._checkPinchState(t.touches)})))},e.prototype._checkPinchState=function(e){1===e.length&&(this._pinchPrevented=!1),2!==e.length||this._pinchPrevented||this._longTapActive?this._stopPinch():this._startPinch(e)},e.prototype._startPinch=function(e){var t=this._target.getBoundingClientRect()||{left:0,top:0};this._startPinchMiddlePoint={x:(e[0].clientX-t.left+(e[1].clientX-t.left))/2,y:(e[0].clientY-t.top+(e[1].clientY-t.top))/2},this._startPinchDistance=a(e[0],e[1]),void 0!==this._handler.pinchStartEvent&&this._handler.pinchStartEvent(),this._clearLongTapTimeout()},e.prototype._stopPinch=function(){null!==this._startPinchMiddlePoint&&(this._startPinchMiddlePoint=null,void 0!==this._handler.pinchEndEvent&&this._handler.pinchEndEvent())},e.prototype._mouseLeaveHandler=function(e){this._unsubscribeMousemove&&this._unsubscribeMousemove();var t=this._makeCompatEvent(e);this._processEvent(t,this._handler.mouseLeaveEvent)},e.prototype._longTapHandler=function(e){l(e)||Object(o.a)(e);var t=this._makeCompatEvent(e);this._processEvent(t,this._handler.longTapEvent),this._processEvent(t,this._handler.contextMenuEvent),this._cancelClick=!0,this._longTapActive=!0},e.prototype._processEvent=function(e,t){t&&t.call(this._handler,e)},e.prototype._makeCompatEvent=function(e){var t;t="touches"in e&&e.touches.length?e.touches[0]:"changedTouches"in e&&e.changedTouches.length?e.changedTouches[0]:e;var i=this._target.getBoundingClientRect()||{left:0,top:0};return{clientX:t.clientX,clientY:t.clientY,
+pageX:t.pageX,pageY:t.pageY,screenX:t.screenX,screenY:t.screenY,localX:t.clientX-i.left,localY:t.clientY-i.top,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey,type:e.type.startsWith("mouse")?"mouse":"touch",target:t.target,view:e.view,preventDefault:function(){Object(o.a)(e)}}},e}();function a(e,t){var i=e.clientX-t.clientX,r=e.clientY-t.clientY;return Math.sqrt(i*i+r*r)}function l(e){return Boolean(e.touches)}},Si3H:function(e,t,i){"use strict";i.r(t);var r=i("Eyy1"),n=i("0YCj"),o=i.n(n),s=i("ogJP"),a=function(){function e(){}return e.prototype.targetMetaInfoVersion=function(){return 47},e.prototype.migrateMetaInfo=function(e){var t=e,i=e;if(i._metainfoVersion=47,t.defaults&&void 0!==t.defaults.precision){var r=t.defaults&&t.defaults.precision,n=Object(s.isNumber)(r)?r:parseInt(r);0===n?i.format={type:"volume"}:isFinite(n)?i.format={type:"price",precision:n}:i.format={type:"inherit"},delete t.defaults.precision}else i.format={type:"inherit"}},e.prototype.migratePropState=function(e){},e}(),l=i("mrSG"),c=function(){function e(){}return e.prototype.targetMetaInfoVersion=function(){return 50},e.prototype.migrateMetaInfo=function(e){var t=e,i=e;if(i._metainfoVersion=50,void 0!==t.defaults&&void 0!==t.defaults.ohlcPlots&&void 0!==t.ohlcPlots)for(var n=t.ohlcPlots,o=t.defaults.ohlcPlots,s=Object(r.ensureDefined)(Object(r.ensureDefined)(i.defaults).ohlcPlots),a=0,c=Object.keys(o);a=n.targetMetaInfoVersion()||(n.migrateMetaInfo(e),void 0!==t&&n.migratePropState(t),Object(r.assert)(e._metainfoVersion===n.targetMetaInfoVersion()))}))}u.sort((function(e,t){return e.targetMetaInfoVersion()-t.targetMetaInfoVersion()}))},SqfW:function(e,t,i){"use strict";i.d(t,"b",(function(){return s})),i.d(t,"a",(function(){return a}));var r=i("mrSG"),n=i("tqok"),o=i("hsV8");function s(e,t){if(e.index>=t.length)return null;var i=t[e.index];return i===n.a?null:{startPrice:e.startPrice,endPrice:e.endPrice,index:i,extendTop:e.extendTop,extendBottom:e.extendBottom}}function a(e,t,i){var n=Object(o.ensureTimePointIndexIndex)(i.indexOf(e.index));return Object(r.__assign)(Object(r.__assign)({id:t},e),{index:n})}},Ss5c:function(e,t,i){"use strict";(function(e){
var r=i("Eyy1").ensureDefined,n=i("aO4+").Point,o=i("4TVt").LineToolPriceAxisView,s=i("fJhV").LineDataSourceTimeAxisView,a=i("fgLi").DataSource,l=i("mMWL"),c=i("LxhU"),u=c.Interval,h=c.ResolutionKind,d=i("pPtI").getServerInterval,p=i("uOxu").getLogger("Chart.LineDataSource"),f=i("FQhm"),_=i("aIyQ"),m=i("hayr").propertyPages,y=i("WkOR").areEqualSymbols,g=i("Kxc7"),v=i("ytGH").LineToolWidthsProperty,S=g.enabled("datasource_copypaste");function b(t,i){a.call(this),this._model=t,this._properties=i,this._pointAdded=new _,this._pointChanged=new _,this._onTemplateApplying=new _,this._onTemplateApplied=new _,this._paneViews=[],this._points=[],this._fixedPoints=[],this._timePoint=[],this._currentPointsetId=null,this._properties.hasChild("symbol")||this._properties.addChild("symbol",new e(t.mainSeries().symbol())),this._properties.hasChild("interval")||this._properties.addChild("interval",new e(t.mainSeries().interval())),this.calcIsActualSymbol(),this._properties.intervalsVisibilities.listeners().subscribe(this,b.prototype.calcIsActualSymbol);var r=this;if(this._properties.listeners().subscribe(this,(function(){r.propertiesChanged()})),this._createPointsProperties(),this.m_priceAxisViews=[],this.m_timeAxisViews=[],this.pointsCount()>0)for(var n=0;n=i.multiplier()&&(t=e.key)})),t},b.prototype.calcIsActualSymbol=function(){var e=this._properties.symbol,t=this._model.mainSeries(),i=e.value();if(this._isActualSymbol=t.symbolSameAsCurrent(i),this._isActualSymbol){var r=t.symbol();y(i,r)||(p.logWarn('Possible drawing "migrating" detected from "'+i+'" to "'+r+'"'),p.logWarn("Series symbolInfo: "+JSON.stringify(t.symbolInfo())),p.logWarn((new Error).stack)),e.setValue(r)}this.calcIsActualInterval(),this.calcIsActualCurrency()},b.prototype.calcIsActualCurrency=function(){if(this._model.currencyLabelEnabled()){var e=this.ownerSource();if(null===e)return void(this._isActualCurrency=!1);var t=this._properties.currencyId.value();if(null!==t)this._isActualCurrency=t===this.ownerSource().symbolSource().currency();else{var i=e.symbolSource().symbolInfo();this._isActualCurrency=null!==i&&i.currency_code===i.original_currency_code}}else this._isActualCurrency=!0},b.prototype.calcIsActualInterval=function(){var e=this._properties,t=this._model.mainSeries(),i=u.parse(t.interval()),r=e.intervalsVisibilities;if(this._isActualInterval=!1,i.isSeconds()&&i.multiplier()<60){var n=r.seconds.value(),o=r.secondsFrom.value(),s=r.secondsTo.value();this._isActualInterval=n&&i.multiplier()>=o&&i.multiplier()<=s}if(i.isSeconds()&&i.multiplier()>=60){var a=Math.floor(i.multiplier()/60);n=r.minutes.value(),o=r.minutesFrom.value(),s=r.minutesTo.value();this._isActualInterval=n&&a>=o&&a<=s}if(i.isMinutes()&&i.multiplier()<60){n=r.minutes.value(),o=r.minutesFrom.value(),s=r.minutesTo.value();this._isActualInterval=n&&i.multiplier()>=o&&i.multiplier()<=s}if(i.isMinutes()&&i.multiplier()>=60){var l=Math.floor(i.multiplier()/60);n=r.hours.value(),o=r.hoursFrom.value(),s=r.hoursTo.value();this._isActualInterval=n&&l>=o&&l<=s}if(i.isDays()){n=r.days.value(),o=r.daysFrom.value(),s=r.daysTo.value();this._isActualInterval=n&&i.multiplier()>=o&&i.multiplier()<=s}if(i.isWeeks()&&(this._isActualInterval=r.weeks.value()),i.isMonths()&&(this._isActualInterval=r.months.value()),i.isRange()&&(this._isActualInterval=r.ranges.value()),!this._isActualInterval&&this._model.selection().isSelected(this)){var c=this;this._model.selectionMacro((function(e){e.removeSourceFromSelection(c)}))}},b.PointIndexProperty=function(t,i){e.call(this),this._lineSource=t,this._pointIndex=i},inherit(b.PointIndexProperty,e),b.PointIndexProperty.prototype.value=function(){return this._lineSource.points()[this._pointIndex].index},b.PointIndexProperty.prototype.setValue=function(e){var t=this._lineSource.points()[this._pointIndex];t.index=e,this._lineSource.setPoint(this._pointIndex,t),this._lineSource._model.updateSource(this._lineSource),this._listeners.fire(this),this._lineSource.endChanging(!0),this._lineSource._syncMultichartState(),this._lineSource._properties.lastUpdateTime.setValue((new Date).valueOf())},b.prototype._syncMultichartState=function(){var e={points:this._timePoint,interval:this._model.mainSeries().interval()}
@@ -371,19 +371,18 @@ e.prototype.addLineTools=function(e){var t=this;this._doAndFireOnChange((functio
;n=this.screenPointToPoint(_),(TradingView.isNaN(n.price)||TradingView.isNaN(n.index))&&(n=this.screenPointToPoint(p))}}else this._fakePointAdded&&(this._points.splice(1,1),this._fakePointAdded=!1);return n},c.prototype._fixVerticalDiameterPoints=function(e,t,i){var r=this.pointToScreenPoint(e)[0],n=this.pointToScreenPoint(t)[0],o=this._model.timeScale(),s=o.indexToCoordinate(e.index),a=o.indexToCoordinate(i.index),l=2*Math.abs(s-a);l*=t.price>e.price?1:-1,e.price=this.screenPointToPoint({x:r.x,y:n.y+l}).price},c.prototype.addPoint=function(e,t,i){var r=o.prototype.addPoint.call(this,e,t,i);return r&&(this._fakePointAdded=!1),r},c.prototype.setPoint=function(e,t,i){var o=Object.assign({},t),s=this.pointToScreenPoint(this._points[0])[0],a=this.pointToScreenPoint(this._points[1])[0],l=this.pointToScreenPoint(this._points[2])[0];switch(e){case 0:if(i&&i.shift()){this._snapPoint45Degree(o,this._points[1]),this._points[0]=o,this._points[2]=this._preparePointInternal(this._points[2],i,!0),this._points[0].index===this._points[1].index&&this._fixVerticalDiameterPoints(this._points[0],this._points[1],this._points[2]);break}s=this.pointToScreenPoint(o)[0];var c=a.subtract(s),u=s.add(a).scaled(.5);d=(d=new r(-c.y,c.x)).normalized(),l=u.add(d.scaled(this._dist)),l=this.screenPointToPoint(l),this._points[0]=o,this._points[2]=l;break;case 1:if(i&&i.shift()){this._snapPoint45Degree(o,this._points[0]),this._points[1]=o,this._points[2]=this._preparePointInternal(this._points[2],i,!0),this._points[0].index===this._points[1].index&&this._fixVerticalDiameterPoints(this._points[1],this._points[0],this._points[2]);break}c=(a=this.pointToScreenPoint(o)[0]).subtract(s),u=s.add(a).scaled(.5);d=(d=new r(-c.y,c.x)).normalized(),l=u.add(d.scaled(this._dist)),l=this.screenPointToPoint(l),this._points[1]=o,this._points[2]=l;break;case 2:o=this.pointToScreenPoint(o)[0];var h=n(s,a,o).distance;c=a.subtract(s),u=s.add(a).scaled(.5);d=(d=new r(-c.y,c.x)).normalized(),l=u.add(d.scaled(h)),l=this.screenPointToPoint(l),this._points[2]=l;break;case 3:o=this.pointToScreenPoint(o)[0];var d;h=n(s,a,o).distance,c=a.subtract(s),u=s.add(a).scaled(.5);d=(d=new r(-c.y,c.x)).normalized(),l=u.add(d.scaled(h)),l=this.screenPointToPoint(l),this._points[2]=l}this.normalizePoints()},c.prototype.pointsCount=function(){return 3},c.prototype.translatedType=function(){return l},c.prototype.name=function(){return"Ellipse"},c.prototype.hasEditableCoordinates=function(){return!1},c.version=2,c.prototype.migrateVersion=function(e,t,i){if(1===e&&2===this._points.length){var r=this._points[0].price,n=.5*(this._points[0].price+this._points[1].price);this._points[0]={price:n,index:this._points[0].index},this._points[1]={price:n,index:this._points[1].index},this._points.push({price:r,index:this._points[0].index})}if(1===e&&2===this._timePoint.length){r=this._timePoint[0].price,n=.5*(this._timePoint[0].price+this._timePoint[1].price);this._timePoint[0].price=n,this._timePoint[1].price=n;var o={price:r,offset:this._timePoint[0].offset,time_t:this._timePoint[0].time_t}
;this._timePoint.push(o)}},c.prototype.getInputsPropertyPage=function(){return null},c.prototype.getStylesPropertyPage=function(){return a.LineToolEllipseStylesPropertyPage},c.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("Zd1D").GeneralFiguresDefinitionsViewModel}.bind(null,i)).catch(i.oe)},c.createProperties=function(e){var t=new s("linetoolellipse",e);return c._configureProperties(t),t},c._configureProperties=function(e){o._configureProperties(e)},t.LineToolEllipse=c},V0al:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererXCross",(function(){return s}));var r=i("mrSG"),n=i("2WC2"),o=i("aO4+"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype._drawItemShapeUsingCSSPixels=function(e,t){var i=t.width,r=t.height,n=t.x-i/2,o=t.vertOffset,s=t.y-r/2+o;e.moveTo(n,s),e.lineTo(n+i,s+r),e.moveTo(n,s+r),e.lineTo(n+i,s)},t.prototype._calcBoundingBox=function(t){var i=t.width,r=t.height,n=t.x-i/2,s=t.vertOffset,a=t.y-r/2+s,l=n,c=n+i,u=a,h=a+r,d=new o.Point(l,u),p=new o.Point(c,h),f=Object(o.box)(d,p),_=e.prototype._calcBoundingBox.call(this,t);return _&&(f=this._unionBox(f,_)),f},t}(n.c)},V3Oj:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolText",(function(){return p})),i.d(t,"LineToolTextAbsolute",(function(){return f}));var r=i("mrSG"),n=i("Eyy1"),o=i("YFKU"),s=i("hayr"),a=i("Ss5c"),l=i("tc+8"),c=i.n(l),u=i("Ocx9"),h=Object(o.t)("Text",{context:"tool"}),d=Object(o.t)("Anchored Text"),p=function(e){function t(r,n){var o=this,s=n||t.createProperties();return(o=e.call(this,r,s)||this)._constructor="LineToolText",o._barSpacing=r.timeScale().barSpacing(),i.e("lt-pane-views").then(function(e){var t=i("mr3a").TextPaneView;o._setPaneViews([new t(o,r)])}.bind(null,i)).catch(void 0),o}return Object(r.__extends)(t,e),t.prototype.setPoint=function(e,t,i){var r,n=this.properties().childs();if(0===e&&n.wordWrapWidth.value()){var o=this.model().timeScale();r=this.isFixed()?this.fixedPoints()[0].x:o.indexToCoordinate(this.points()[0].index);var s=o.indexToCoordinate(t.index)-r-~~(n.fontsize.value()/6);if(!isFinite(s))return;n.wordWrapWidth.setValue(Math.max(100,s))}},t.prototype.pointsCount=function(){return 1},t.prototype.translatedType=function(){return h},t.prototype.name=function(){return"Text"},t.prototype.setPriceScale=function(t){e.prototype.setPriceScale.call(this,t),t&&t.priceRange()&&(this._priceDencity=t.height()/Object(n.ensureNotNull)(t.priceRange()).length(),this._isPriceDencityLog=t.isLog())},t.prototype.restoreSize=function(){var e=Object(n.ensureNotNull)(this.priceScale());this._barSpacing=this.model().timeScale().barSpacing(),this._priceDencity=e.height()/Object(n.ensureNotNull)(e.priceRange()).length(),this.updateAllViews(),this._model.updateSource(this)},t.prototype.properties=function(){return e.prototype.properties.call(this)},t.prototype.template=function(){var t=e.prototype.template.call(this)
;return t.text=this.properties().childs().text.value(),t},t.prototype.state=function(t){var i=e.prototype.state.call(this,t);return t&&(i.state.fixedSize=!1),i},t.prototype.getInputsPropertyPage=function(){return null},t.prototype.getStylesPropertyPage=function(){return s.propertyPages.LineToolTextStylesPropertyPage},t.prototype.barSpacing=function(){return this._barSpacing},t.prototype.priceDencity=function(){return this._priceDencity},t.prototype.isPriceDencityLog=function(){return this._isPriceDencityLog},t.prototype.hasEditableCoordinates=function(){return!1},t.createProperties=function(e){var i=new u.DefaultProperty("linetooltext",e);return t._configureProperties(i),i},t.prototype._applyTemplateImpl=function(t){e.prototype._applyTemplateImpl.call(this,t),this.properties().childs().text.setValue(t.text)},t.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"QWxu")).then((function(e){return e.TextDefinitionsViewModel}))},t._configureProperties=function(e){a.LineDataSource._configureProperties(e),e.hasChild("text")||e.addChild("text",new c.a(window.t("Text"))),e.addExclusion("text")},t}(a.LineDataSource),f=function(e){function t(i,r){var n=r||t.createProperties();return e.call(this,i,n)||this}return Object(r.__extends)(t,e),t.prototype.isSynchronizable=function(){return!1},t.prototype.translatedType=function(){return d},t.prototype.name=function(){return"Anchored Text"},t.prototype.hasEditableCoordinates=function(){return!1},t.prototype.isFixed=function(){return!0},t.createProperties=function(e){var i=new u.DefaultProperty("linetooltextabsolute",e);return t._configureProperties(i),i},t._configureProperties=function(e){p._configureProperties(e)},t}(p)},VNzU:function(e,t,i){"use strict";i.r(t);var r=i("mrSG");i("Dq3s");i.d(t,"layouts",(function(){return s})),i.d(t,"isSingleLayout",(function(){return a})),i.d(t,"isMultipleLayout",(function(){return l}));var n,o={s:{title:"1 chart",count:1,sizer:function(e,t){if(0!==t)throw new RangeError("invalid index");return e}}};n={};var s=Object(r.__assign)(Object(r.__assign)({},o),n);function a(e){return"s"===e}function l(e){return!a(e)}},VVxS:function(e,t,i){"use strict";var r=function(){try{this.isAvailable=!0,this.localStorage=window.localStorage,this.localStorage.setItem("tvlocalstorage.available","true")}catch(e){delete this.isAvailable,delete this.localStorage}this._updateLength()};r.prototype.length=0,r.prototype.isAvailable=!1,r.prototype.localStorage={"tvlocalstorage.available":"false"},r.prototype._updateLength=function(){if(this.isAvailable)this.length=this.localStorage.length;else{var e,t=0;for(e in this.localStorage)this.localStorage.hasOwnProperty(e)&&t++;this.length=t}},r.prototype.key=function(e){return this.isAvailable?this.localStorage.key(e):Object.keys(this.localStorage)[e]},r.prototype.getItem=function(e){return this.isAvailable?this.localStorage.getItem(e):void 0===this.localStorage[e]?null:this.localStorage[e]},r.prototype.setItem=function(e,t){
-this.isAvailable?this.localStorage.setItem(e,t):this.localStorage[e]=t,this._updateLength()},r.prototype.removeItem=function(e){this.isAvailable?this.localStorage.removeItem(e):delete this.localStorage[e],this._updateLength()},r.prototype.clear=function(){this.isAvailable?this.localStorage.clear():this.localStorage={},this._updateLength()};var n=function(e){this.storage=e};n.prototype.getItem=function(e){return Promise.resolve(this.storage.getItem(e))},n.prototype.setItem=function(e,t){return Promise.resolve(this.storage.setItem(e,t))},window.TVLocalStorage=new r,window.TVLocalStorageAsync=new n(window.TVLocalStorage),e.exports={TVLocalStorage:window.TVLocalStorage,TVLocalStorageAsync:window.TVLocalStorageAsync}},VdBB:function(e,t,i){"use strict";i.r(t),i.d(t,"HitTestResult",(function(){return r}));var r=function(){function e(e,t,i){this._result=e,this._data=t,this._eraseMarker=i}return e.prototype.result=function(){return this._result},e.prototype.data=function(){return this._data},e.prototype.eraseMarker=function(){return this._eraseMarker},e.MOVEPOINT_BACKGROUND=1,e.REGULAR=2,e.MOVEPOINT=3,e.CHANGEPOINT=4,e.CUSTOM=5,e.CUSTOM_MOVE=6,e}()},Vdly:function(e,t,i){"use strict";(function(e,t){i("qFKp");i("BHQF").fetch;var r=i("dTSQ").regExpEscape,n=i("FBuY").TVXWindowEvents,o=i("VVxS").TVLocalStorage,s=i("aIyQ"),a=["s.tradingview.com","betacdn.tradingview.com"],l=window.TVSettings=function(){var t=!1,i=e.enabled("cqg_terminal"),c=null;try{t=!TradingView.onWidget()&&parent&&parent!==window&&!!parent.IS_DEMO_PAGE}catch(A){}if(t){var u={"widgetbar.layout-settings":{widgets:{},settings:{minimized:!0}},notShowMainWizard:!0},h=function(e,t,i){var r=u[e];return null==r?t:r},d=function(){};return{loaded:!1,loadedModel:!1,getValue:h,getJSON:h,getBool:h,getFloat:h,getInt:h,setValue:d,setJSON:d,remove:d,keys:function(){return Object.keys(u)},keysMask:function(){return[]},sync:d,onSync:{subscribe:function(){}}}}var p=12e4;"local"===window.environment&&(p=5e3);var f,_,m=TradingView.onWidget()?"tradingview-widget":"tradingview",y={},g=[],v=[/^widgetbar\.widget\.watchlist.+/,/.+quicks$/,/^widgetbar\.layout-settings$/,/^ChartSideToolbarWidget\.visible$/,/^onwidget\.watchlist$/,/^domepanel.visible$/,/^orderpanel.visible$/,/^chart\.favoriteDrawings$/,/^chart\.favoriteDrawingsPosition$/,/^loadChartDialog.favorites$/,/^ChartFavoriteDrawingToolbarWidget\.visible/,/^trading\.chart\.proterty$/,/^trading_floating_toolbar\.position$/,/^trading\.orderWidgetMode\./,/^symbolWatermark$/,/^pinereference\.size$/,/^pinereference\.position$/,/^hint\.+/];function S(e){return m+"."+e}function b(e,t){var r;return r=y[e],window.is_authenticated&&!i||null!=r||(r=y[e]),null==r?t:r}function w(e,t,i){i=i||{};var r=""+t;return y[e]!==r&&(y[e]=r,x(e)),i.forceFlush&&!_&&(_=setTimeout((function(){_=void 0,T()}),10)),l}function P(e,t){return t=t||{},null!=y[e]&&(delete y[e],x(e)),t.forceFlush&&T(),l}function C(){f=void 0,g.length&&T()}function x(e){if(c)null==y[e]?c.removeValue(e):c.setValue(e,y[e]);else if(!window.is_authenticated||i)try{
-null==y[e]?o.removeItem(S(e)):o.setItem(S(e),y[e])}catch(A){}else g.push(e),f||(f=setTimeout(C,p));n.emit("settings",JSON.stringify({key:e,value:y[e]}))}function T(e){}function L(){return Object.keys(y)}function I(e){for(var t=0;t=0;o--)e.test(i[o])&&n.push(i[o]),e.lastIndex=0;return n},sync:function(t){c?M(c.initialSettings||{}):window.is_authenticated&&!i?M(t||{}):(function(){if(TradingView.onWidget()&&a.includes(window.location.host))for(var e=o.length;e--;){var t=o.key(e);if(0===t.indexOf("tradingview.")){var i=t.replace("tradingview.",m+".");o.setItem(i,o.getItem(t)),o.removeItem(t)}}}(),function(){y={};for(var t=m+".",i=!e.enabled("save_chart_properties_to_local_storage"),r=o.length;r--;){var n=o.key(r);if(n&&n.substring(0,t.length)===t){var s=n.substring(t.length);i&&!I(s)||(y[s]=o.getItem(n))}}}()),O.fire()},onSync:O,setSettingsAdapter:function(e){c=e}}}();t&&t.exports&&(t.exports=l)}).call(this,i("Kxc7"),i("YuTi")(e))},VgjZ:function(e,t,i){"use strict";i.r(t),i.d(t,"PriceAxisRendererOptionsProvider",(function(){return o}));var r=i("XlJ7"),n=i("zDbI"),o=function(){function e(e){this._rendererOptions={borderSize:1,tickLength:4,offsetSize:1,fontSize:NaN,font:"",color:"",paneBackgroundColor:"",paddingBottom:0,paddingInner:0,paddingOuter:0,paddingTop:0,baselineOffset:0},this._chartModel=e}return e.prototype.options=function(){var e=this._rendererOptions,t=this._chartModel.properties(),i=t.scalesProperties.fontSize.value();return e.fontSize!==i&&(e.fontSize=i,e.font=Object(r.makeFont)(i,n.CHART_FONT_FAMILY,""),e.paddingTop=Math.floor(i/3.5),e.paddingBottom=e.paddingTop,e.paddingInner=Math.max(Math.ceil(i/2-e.tickLength/2),0),e.paddingOuter=Math.ceil(i/2+e.tickLength/2),
-e.baselineOffset=Math.round(i/5)),e.color=t.scalesProperties.textColor.value(),e.paneBackgroundColor=t.paneProperties.background.value(),this._rendererOptions},e}()},W3MX:function(e){
+this.isAvailable?this.localStorage.setItem(e,t):this.localStorage[e]=t,this._updateLength()},r.prototype.removeItem=function(e){this.isAvailable?this.localStorage.removeItem(e):delete this.localStorage[e],this._updateLength()},r.prototype.clear=function(){this.isAvailable?this.localStorage.clear():this.localStorage={},this._updateLength()};var n=function(e){this.storage=e};n.prototype.getItem=function(e){return Promise.resolve(this.storage.getItem(e))},n.prototype.setItem=function(e,t){return Promise.resolve(this.storage.setItem(e,t))},window.TVLocalStorage=new r,window.TVLocalStorageAsync=new n(window.TVLocalStorage),e.exports={TVLocalStorage:window.TVLocalStorage,TVLocalStorageAsync:window.TVLocalStorageAsync}},VdBB:function(e,t,i){"use strict";i.r(t),i.d(t,"HitTestResult",(function(){return r}));var r=function(){function e(e,t,i){this._result=e,this._data=t,this._eraseMarker=i}return e.prototype.result=function(){return this._result},e.prototype.data=function(){return this._data},e.prototype.eraseMarker=function(){return this._eraseMarker},e.MOVEPOINT_BACKGROUND=1,e.REGULAR=2,e.MOVEPOINT=3,e.CHANGEPOINT=4,e.CUSTOM=5,e.CUSTOM_MOVE=6,e}()},Vdly:function(e,t,i){"use strict";(function(e){i("qFKp");i("BHQF").fetch;var t=i("dTSQ").regExpEscape,r=i("FBuY").TVXWindowEvents,n=i("VVxS").TVLocalStorage,o=i("aIyQ"),s=i("Kxc7"),a=["s.tradingview.com","betacdn.tradingview.com"],l=s.enabled("use_localstorage_for_settings"),c=window.TVSettings=function(){var e=!1,i=null;function u(){return!i&&l}try{e=!TradingView.onWidget()&&parent&&parent!==window&&!!parent.IS_DEMO_PAGE}catch(I){}if(e){var h={"widgetbar.layout-settings":{widgets:{},settings:{minimized:!0}},notShowMainWizard:!0},d=function(e,t,i){var r=h[e];return null==r?t:r},p=function(){};return{loaded:!1,loadedModel:!1,getValue:d,getJSON:d,getBool:d,getFloat:d,getInt:d,setValue:p,setJSON:p,remove:p,keys:function(){return Object.keys(h)},keysMask:function(){return[]},sync:p,onSync:{subscribe:function(){}}}}window.environment;var f,_=TradingView.onWidget()?"tradingview-widget":"tradingview",m={},y=[/^widgetbar\.widget\.watchlist.+/,/.+quicks$/,/^widgetbar\.layout-settings$/,/^ChartSideToolbarWidget\.visible$/,/^onwidget\.watchlist$/,/^domepanel.visible$/,/^orderpanel.visible$/,/^chart\.favoriteDrawings$/,/^chart\.favoriteDrawingsPosition$/,/^loadChartDialog.favorites$/,/^ChartFavoriteDrawingToolbarWidget\.visible/,/^trading\.chart\.proterty$/,/^trading_floating_toolbar\.position$/,/^trading\.orderWidgetMode\./,/^symbolWatermark$/,/^pinereference\.size$/,/^pinereference\.position$/,/^hint\.+/];function g(e){return _+"."+e}function v(e,t){var i=m[e];return null==i?t:i}function S(e,t,i){i=i||{};var r=""+t;return m[e]!==r&&(m[e]=r,w(e)),i.forceFlush&&!f&&(f=setTimeout((function(){f=void 0,P()}),10)),c}function b(e,t){return t=t||{},null!=m[e]&&(delete m[e],w(e)),t.forceFlush&&P(),c}function w(e){if(i)null==m[e]?i.removeValue(e):i.setValue(e,m[e]);else if(u())try{null==m[e]?n.removeItem(g(e)):n.setItem(g(e),m[e])}catch(I){}else 0;r.emit("settings",JSON.stringify({key:e,value:m[e]}))
+}function P(e){}function C(){return Object.keys(m)}function x(e){for(var t=0;t=0;o--)e.test(r[o])&&n.push(r[o]),e.lastIndex=0;return n},sync:function(e){i?T(i.initialSettings||{}):u()?(function(){if(TradingView.onWidget()&&a.includes(window.location.host))for(var e=n.length;e--;){var t=n.key(e);if(0===t.indexOf("tradingview.")){var i=t.replace("tradingview.",_+".");n.setItem(i,n.getItem(t)),n.removeItem(t)}}}(),function(){m={};for(var e=_+".",t=!s.enabled("save_chart_properties_to_local_storage"),i=n.length;i--;){var r=n.key(i);if(r&&r.substring(0,e.length)===e){var o=r.substring(e.length);t&&!x(o)||(m[o]=n.getItem(r))}}}()):T(e||{}),L.fire()},onSync:L,setSettingsAdapter:function(e){i=e}}}();e&&e.exports&&(e.exports=c)}).call(this,i("YuTi")(e))},VgjZ:function(e,t,i){"use strict";i.r(t),i.d(t,"PriceAxisRendererOptionsProvider",(function(){return o}));var r=i("XlJ7"),n=i("zDbI"),o=function(){function e(e){this._rendererOptions={borderSize:1,tickLength:4,offsetSize:1,fontSize:NaN,font:"",color:"",paneBackgroundColor:"",paddingBottom:0,paddingInner:0,paddingOuter:0,paddingTop:0,baselineOffset:0},this._chartModel=e}return e.prototype.options=function(){var e=this._rendererOptions,t=this._chartModel.properties(),i=t.scalesProperties.fontSize.value();return e.fontSize!==i&&(e.fontSize=i,e.font=Object(r.makeFont)(i,n.CHART_FONT_FAMILY,""),e.paddingTop=Math.floor(i/3.5),e.paddingBottom=e.paddingTop,e.paddingInner=Math.max(Math.ceil(i/2-e.tickLength/2),0),e.paddingOuter=Math.ceil(i/2+e.tickLength/2),e.baselineOffset=Math.round(i/5)),e.color=t.scalesProperties.textColor.value(),e.paneBackgroundColor=t.paneProperties.background.value(),this._rendererOptions},e}()},W3MX:function(e){
e.exports=JSON.parse('{"color-aqua-spring":"#ebf9f5","color-army-green":"#3d2c12","color-army-green-2":"#31230d","color-athens-gray-1":"#f2f3f5","color-athens-gray-2":"#f7f8fa","color-athens-gray-3":"#eceff2","color-black":"#000000","color-blue-dianne":"#21384d","color-bluish":"#2185cc","color-bright-gray":"#363c4e","color-brownish-grey":"#8d6e63","color-carnation":"#f04561","color-catskill-white":"#e1ecf2","color-charade":"#2f3241","color-charcoal-grey":"#323337","color-curious-blue":"#299dcd","color-dark-blue-grey":"#123440","color-darkness-blue-grey":"#12213b","color-dark-grey":"#292a2d","color-dark-grey-blue":"#28415a","color-dark-sky-blue":"#37a6ef","color-dark-slate-blue":"#194453","color-deep-sea-blue":"#016087","color-duck-egg-blue":"#e1eff9","color-ebony-clay":"#262b3e","color-foam":"#d7f0fb","color-gull-gray":"#9db2bd","color-humming-bird":"#d3eef9","color-keppel-1":"#37bc9b","color-keppel-2":"#34b293","color-lavender-blush":"#ffedf0","color-lightish-purple":"#a75ee8","color-loblolly":"#c5cbce","color-manatee":"#878ca8","color-mandy":"#eb4d5c","color-medium-blue":"#2e7bb2","color-milk-chocolate":"#6f2626","color-mirage-1":"#131722","color-mirage-2":"#171b29","color-mirage-3":"#1c2030","color-mischka":"#d6d8e0","color-morning-glory":"#9addcc","color-oslo-gray":"#8b8e95","color-pale":"#fff2cf","color-pale-grey-1":"#f9fafb","color-pale-grey-2":"#e7ebee","color-pale-sky":"#6b7988","color-picton-blue-1":"#3bb3e4","color-picton-blue-2":"#41bef1","color-puerto-rico":"#3bc2a1","color-purple-brown":"#4e2934","color-purple-brown-2":"#3d2028","color-radical-red":"#ff4a68","color-regent-gray":"#8797a5","color-scooter":"#38acdb","color-silver-tree":"#53b987","color-slate-gray":"#758696","color-sundown":"#ffa4b3","color-sunglow":"#ffca3b","color-tan-hide":"#ff9850","color-trout-1":"#4c525e","color-trout-2":"#4f5966","color-violet-1":"#332738","color-violet-2":"#271d2b","color-water-blue":"#1592e6","color-white":"#ffffff","color-white-ice":"#ebf7fc","color-wild-watermelon":"#ff5773","color-bg-primary":"color-white","color-bg-primary-hover":"color-cold-gray-100","color-bg-secondary":"color-white","color-bg-highlight":"color-cold-gray-50","color-bg-scroll-buttons":"color-cold-gray-100","color-legacy-bg-scroll-buttons":"color-cold-gray-850","color-legacy-bg-widget":"color-white","color-text-primary":"color-cold-gray-900","color-text-secondary":"color-cold-gray-500","color-text-tertiary":"color-cold-gray-400","color-text-disabled":"color-cold-gray-300","color-box-shadow":"color-cold-gray-300","color-divider":"color-cold-gray-150","color-divider-hover":"color-cold-gray-100","color-active-hover-text":"color-black","color-alert-text":"color-black","color-border-table":"color-cold-gray-100","color-brand":"color-tv-blue-500","color-brand-active":"color-tv-blue-600","color-brand-hover":"color-tv-blue-600","color-brand-light":"color-picton-blue-2","color-chart-page-bg":"color-cold-gray-150","color-common-tooltip-bg":"color-cold-gray-800","color-common-tooltip-text":"color-cold-gray-100","color-danger":"color-radical-red","color-depthrenderer-stroke-style":"color-athens-gray-1","color-highlight-new":"color-pale","color-input-bg":"color-white","color-input-publish-bg":"color-white","color-link":"color-tv-blue-500","color-link-hover":"color-tv-blue-600","color-link-active":"color-tv-blue-600","color-list-nth-child-bg":"color-athens-gray-2","color-pane-bg":"color-white","color-pane-secondary-bg":"color-cold-gray-100","color-popup-menu-item-hover-bg":"color-cold-gray-100","color-popup-menu-separator":"color-cold-gray-150","color-replay-data-mode":"color-radical-red","color-screener-header-bg":"color-athens-gray-2","color-screener-description":"color-trout-2","color-legacy-success":"color-keppel-1","color-success":"color-minty-green-500","color-success-hover":"color-minty-green-600","color-success-active":"color-minty-green-700","color-toolbar-button-text":"color-cold-gray-900","color-toolbar-button-text-hover":"color-black","color-toolbar-button-text-active":"color-tv-blue-500","color-toolbar-button-text-active-hover":"color-tv-blue-600","color-toolbar-button-background-hover":"color-cold-gray-100","color-toolbar-button-background-secondary-hover":"color-cold-gray-150","color-toolbar-toggle-button-background-active":"color-tv-blue-500","color-toolbar-toggle-button-background-active-hover":"color-tv-blue-600","color-toolbar-interactive-element-text-normal":"color-cold-gray-900","color-toolbar-interactive-element-text-hover":"color-black","color-toolbar-opened-element-bg":"color-cold-gray-100","color-tooltip-bg":"color-ebony-clay","color-tv-dialog-caption":"color-trout-2","color-tv-dropdown-item-hover-bg":"color-athens-gray-1","color-underlined-text":"color-slate-gray","color-widget-pages-bg":"color-white","color-warning":"color-tan-orange-500","color-growing":"color-minty-green-400","color-falling":"color-ripe-red-400","color-collapse-tabs-border":"color-athens-gray-3","color-forex-icon":"color-bright-gray","color-list-item-active-bg":"color-dark-sky-blue","color-list-item-hover-bg":"color-white-ice","color-list-item-text":"color-ebony-clay","color-site-widget-hover":"color-athens-gray-1","color-attention":"color-sunglow","color-price-axis-label-back":"color-cold-gray-150","color-price-axis-label-text":"color-cold-gray-650","color-price-axis-gear":"color-cold-gray-900","color-price-axis-gear-hover":"#000000","color-price-axis-highlight":"color-cold-gray-150","color-marker-flagged":"color-ripe-red-400","color-marker-flagged-hovered":"color-ripe-red-600","color-bid":"color-tv-blue-500","color-ask":"color-ripe-red-400","color-sell":"color-ripe-red-400","color-buy":"color-tv-blue-500","color-neutral":"color-cold-gray-500","color-border":"#dadde0","color-border-chat-fields":"#c9cbcd","color-border-hover":"#c8c8c8","color-button-hover-bg":"#f2f2f2","color-depthrenderer-fill-style":"#555555","color-disabled-border-and-color":"#ececec","color-disabled-input":"#ececec","color-readonly-input":"#b4b4b4","color-empty-container-message":"#8a8a8a","color-icons":"#7d7d7d","color-input-textarea-readonly":"#555555","color-item-active-blue":"#eff9ff","color-item-hover-active-bg":"#f1f3f6","color-item-hover-bg":"#edf1f2","color-item-hover-blue":"#c6e9f8","color-item-selected-blue":"#eafafe","color-item-active-text":"color-white","color-item-active-bg":"color-tv-blue-500","color-list-item":"#888989","color-news-highlight":"#f2f5f8","color-placeholder":"#adaeb0","color-row-hover-active-bg":"#f1f3f6","color-sb-scrollbar-body-bg":"#d8d8d8","color-screener-header-bg-hover":"#f1f3f6","color-section-separator-border":"#b5b7b9","color-separator-table-chat":"#eaecef","color-tag-active-bg":"#cfdce3","color-tag-hover-bg":"#dce6ea","color-text-regular":"#4a4a4a","color-tv-button-checked":"#757575","color-white-theme-tooltip-text":"#333333","color-brand-dark":"#2a2c39","color-scroll-bg":"color-cold-gray-400","color-scroll-border":"color-item-hover-active-bg","color-widget-border":"color-cold-gray-100","color-scroll-buttons-arrow":"color-white","color-control-intent-default":"color-cold-gray-200","color-control-intent-success":"color-minty-green-600","color-control-intent-primary":"color-tv-blue-500","color-control-intent-warning":"color-tan-orange-500","color-control-intent-danger":"color-ripe-red-500","color-seeking-alpha-brand":"#ff7200","color-pro":"color-minty-green-400","color-pro-hover":"color-minty-green-600","color-pro-plus":"color-tv-blue-500","color-pro-plus-hover":"color-tv-blue-600","color-pro-premium":"color-tan-orange-500","color-pro-premium-hover":"color-tan-orange-700","color-trial":"color-cold-gray-500","color-trial-hover":"color-cold-gray-600","color-mod":"color-ripe-red-400","color-mod-hover":"color-ripe-red-600","color-top":"color-banana-yellow-700","color-top-hover":"color-banana-yellow-800","color-ad":"color-banana-yellow-a700","color-broker-featured":"color-minty-green-400","color-broker-featured-hover":"color-minty-green-600","color-alert-status-active":"color-minty-green-400","color-alert-status-stopped":"color-ripe-red-500","color-alert-status-stopped-auto":"color-tan-orange-500","color-covid19-confirmed":"color-ripe-red-500","color-covid19-recovered":"color-minty-green-500","color-covid19-deaths":"color-cold-gray-450","color-blue-gray-950":"#0C0E15","color-cold-gray-50":"#F8F9FD","color-cold-gray-100":"#F0F3FA","color-cold-gray-150":"#E0E3EB","color-cold-gray-200":"#D1D4DC","color-cold-gray-250":"#C1C4CD","color-cold-gray-300":"#B2B5BE","color-cold-gray-350":"#A3A6AF","color-cold-gray-400":"#9598A1","color-cold-gray-450":"#868993","color-cold-gray-500":"#787B86","color-cold-gray-550":"#6A6D78","color-cold-gray-600":"#5D606B","color-cold-gray-650":"#50535E","color-cold-gray-700":"#434651","color-cold-gray-750":"#363A45","color-cold-gray-800":"#2A2E39","color-cold-gray-850":"#1E222D","color-cold-gray-900":"#131722","color-cold-gray-950":"#0C0E15","color-ripe-red-50":"#FFEBEE","color-ripe-red-100":"#FFCDD2","color-ripe-red-200":"#ef9a9a","color-ripe-red-300":"#E57373","color-ripe-red-400":"#EF5350","color-ripe-red-500":"#F44336","color-ripe-red-600":"#E53935","color-ripe-red-700":"#D32F2F","color-ripe-red-800":"#C62828","color-ripe-red-900":"#B71C1C","color-ripe-red-a200":"#FF5252","color-tan-orange-50":"#FFF3E0","color-tan-orange-100":"#FFE0B2","color-tan-orange-200":"#FFCC80","color-tan-orange-300":"#ffb74d","color-tan-orange-400":"#FFA726","color-tan-orange-500":"#FF9800","color-tan-orange-600":"#FB8C00","color-tan-orange-700":"#F57C00","color-tan-orange-800":"#EF6C00","color-tan-orange-900":"#e65100","color-tan-orange-a200":"#ffab40","color-tan-orange-a400":"#ff9100","color-tan-orange-a700":"#FF6D00","color-iguana-green-100":"#C8E6C9","color-iguana-green-200":"#A5D6A7","color-iguana-green-300":"#81c784","color-iguana-green-400":"#66BB6A","color-iguana-green-500":"#4caf50","color-iguana-green-600":"#43a047","color-iguana-green-700":"#388e3c","color-iguana-green-900":"#1B5E20","color-iguana-green-a700":"#00c853","color-banana-yellow-100":"#FFF9C4","color-banana-yellow-200":"#FFF59D","color-banana-yellow-300":"#FFF176","color-banana-yellow-400":"#ffee58","color-banana-yellow-500":"#ffeb3b","color-banana-yellow-600":"#fdd835","color-banana-yellow-700":"#fbc02d","color-banana-yellow-800":"#f9a825","color-banana-yellow-900":"#F57F17","color-banana-yellow-a400":"#ffea00","color-banana-yellow-a700":"#ffd600","color-tv-blue-50":"#E3F2FD","color-tv-blue-100":"#BBDEFB","color-tv-blue-200":"#90CAF9","color-tv-blue-300":"#64B5F6","color-tv-blue-400":"#42A5F5","color-tv-blue-500":"#2196F3","color-tv-blue-600":"#1E88E5","color-tv-blue-700":"#1976D2","color-tv-blue-800":"#1565C0","color-tv-blue-900":"#0d47a1","color-tv-blue-a100":"#82b1ff","color-tv-blue-a200":"#448aff","color-tv-blue-a400":"#2979ff","color-tv-blue-a600":"#2962FF","color-tv-blue-a700":"#144987","color-tv-blue-a800":"#143661","color-tv-blue-a900":"#132742","color-deep-blue-100":"#D1C4E9","color-deep-blue-200":"#B39DDB","color-deep-blue-300":"#9575cd","color-deep-blue-400":"#7e57c2","color-deep-blue-500":"#673ab7","color-deep-blue-700":"#512da8","color-deep-blue-800":"#4527A0","color-deep-blue-900":"#311B92","color-deep-blue-a100":"#b388ff","color-deep-blue-a700":"#6200EA","color-minty-green-100":"#B2DFDB","color-minty-green-200":"#80cbc4","color-minty-green-300":"#4db6ac","color-minty-green-400":"#26a69a","color-minty-green-500":"#009688","color-minty-green-600":"#00897b","color-minty-green-700":"#00796b","color-minty-green-900":"#004D40","color-minty-green-a400":"#1de9b6","color-minty-green-a700":"#00BFA5","color-grapes-purple-100":"#E1BEE7","color-grapes-purple-200":"#CE93D8","color-grapes-purple-300":"#ba68c8","color-grapes-purple-400":"#ab47bc","color-grapes-purple-500":"#9c27b0","color-grapes-purple-600":"#8e24aa","color-grapes-purple-700":"#7b1fa2","color-grapes-purple-800":"#6A1B9A","color-grapes-purple-900":"#4A148C","color-grapes-purple-a700":"#aa00ff","color-berry-pink-100":"#F8BBD0","color-berry-pink-200":"#f48fb1","color-berry-pink-300":"#f06292","color-berry-pink-400":"#ec407a","color-berry-pink-500":"#e91e63","color-berry-pink-600":"#D81B60","color-berry-pink-700":"#C2185B","color-berry-pink-900":"#880E4F","color-berry-pink-a200":"#ff4081","color-sky-blue-100":"#B2EBF2","color-sky-blue-200":"#80DEEA","color-sky-blue-300":"#4dd0e1","color-sky-blue-400":"#26c6da","color-sky-blue-500":"#00bcd4","color-sky-blue-600":"#00acc1","color-sky-blue-700":"#0097A7","color-sky-blue-800":"#00838F","color-sky-blue-900":"#006064","color-sky-blue-a400":"#00e5ff","color-sky-blue-a700":"#00B8D4","color-deep-blue-600":"#5E35B1","color-facebook":"#1877F2","color-twitter":"#1DA1F2","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-700","color-replay-mode":"color-tv-blue-500","color-replay-mode-icon":"color-white","color-replay-mode-hover":"color-tv-blue-600","color-delay-mode":"color-berry-pink-600","color-delay-mode-bg":"color-berry-pink-600","color-eod-mode":"color-berry-pink-600","color-eod-mode-bg":"color-berry-pink-600","color-data-problem":"color-ripe-red-600","color-data-problem-bg":"color-ripe-red-400","color-data-problem-hover":"color-ripe-red-700","color-list-item-bg-highlighted":"color-tv-blue-50","color-list-item-bg-selected":"color-tv-blue-100"}')
},W5mg:function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));var r=["first_visible_bar_time","last_visible_bar_time"];function n(e){return!e.groupId&&"time"!==e.type&&!e.isHidden&&!r.includes(e.id)}},WIS0:function(e,t,i){"use strict";i.r(t),i.d(t,"DatafeedRequestsCachedProcessor",(function(){return d}));var r=i("mrSG"),n=i("Eyy1"),o=i("LxhU"),s=i("Y7w9"),a=i("ocLq"),l=i("Kxc7");i("HbRj");function c(e,t){return e.ticker+(e.currency_code?"_#_"+e.currency_code:"")+"_#_"+t}function u(e){return new Date(e).toISOString()}var h=function(){function e(e,t,i,r){this._cache={bars:[]},this._nextSubscriptionId=0,this._pendingSubscribers=[],this._subscribers=[],this._requesting=!1,this._leftDate=null,this._gaps=[],this._needPurgeCache=!1,this._realtimeOn=!1,this._endOfData=!1,this._resetCacheTimeout=null,this._errorMessage=null,this._destroyed=!1,this._emptyResponsesCount=0,this._datafeed=e,this._symbolInfo=t,this._resolution=Object(n.ensureNotNull)(o.Interval.normalize(i)),this._dwmAligner=r}return e.prototype.destroy=function(){0!==this._subscribers.length&&console.warn("Destroying with not-empty state"),this._clearResetCacheTimeout(),this._unsubscribeRealtime(),this._purgeCache(),delete this._datafeed,this._destroyed=!0},e.prototype.addSubscription=function(e,t,i){var r=this,n=this._getNextSubscriptionId(),o=Math.floor(e.from/1e3),s=Math.floor(e.to/1e3);this._pendingSubscribers.push({key:n,range:{from:o,to:s},onHistoryCallback:t,onErrorCallback:i}),this._clearResetCacheTimeout();return setTimeout((function(){r._destroyed||r._processPendingSubscribers()}),0),n},e.prototype.removeSubscription=function(e){var t=this,i=this._pendingSubscribers.find((function(t){return t.key===e}));if(i)this._pendingSubscribers.splice(this._pendingSubscribers.indexOf(i),1);else{var r=this._subscribers.find((function(t){return t.key===e}));if(r)return this._subscribers.splice(this._subscribers.indexOf(r),1),void(this._subscribers.length||(this._symbolInfo.expired||this._symbolInfo.expiration_date?this._unsubscribeRealtime():this._resetCacheTimeout=setTimeout((function(){t._purgeCacheDelayed(),t._unsubscribeRealtime()}))));console.warn("Unknown subscription symbol={0}, resolution={1}, key={2}".format(this._symbolInfo.name,this._resolution,e))}},e.prototype._purgeCacheDelayed=function(){this._logMessage("Reset cache"),this._needPurgeCache=!0,this._clearResetCacheTimeout()},e.prototype._logMessage=function(e,t){if(l.enabled("charting_library_debug_mode")||t){var i=this._symbolInfo.currency_code;console.log("FEED ["+this._symbolInfo.name+"|"+this._resolution+(i?"|"+i:"")+"]: "+e)}},e.prototype._clearResetCacheTimeout=function(){null!==this._resetCacheTimeout&&(clearTimeout(this._resetCacheTimeout),this._resetCacheTimeout=null)},e.prototype._purgeCache=function(){this._cache={bars:[]},this._gaps=[],this._errorMessage=null,this._needPurgeCache=!1,this._leftDate=null,this._endOfData=!1},e.prototype._processPendingSubscribers=function(){var e=this,t=this._pendingSubscribers
;if(t.length)if(this._requesting)this._logMessage("Processing is skipped due active request");else{if(this._logMessage("Processing pending subscribers, count="+t.length),this._needPurgeCache&&this._purgeCache(),this._errorMessage){var i=this._errorMessage;return this._logMessage("Return error: "+i),this._pendingSubscribers=[],void t.forEach((function(e){e.onErrorCallback(i)}))}var r=t.reduce((function(e,t){return Math.min(t.range.from,e)}),1/0);if(this._logMessage('Leftmost requested "from" is '+u(1e3*r)),!this._leftDate||r0?this._logMessage("Bars to return for request {0}: total {1} bars in [{2} ... {3}] ".format(e.key,r.count(),u(r.bars[0].time),u(r.bars[r.count()-1].time))):this._logMessage("Request {0}. Nothing to return.".format(e.key)),t.barset=r;var n=this._inGapNextTime(i.from);if(n)this._logMessage("Request {0} is in gap, nextTime = {1}".format(e.key,u(1e3*n))),r.nextTime=n;else if(0===r.count()){var o=this._cache.bars.length&&this._cache.bars[this._cache.bars.length-1].time/1e3;o&&i.from>o&&(this._logMessage("Request {0} is in gap, nextTime = {1}".format(e.key,u(1e3*o))),r.nextTime=o||void 0)}this._endOfData&&null!==this._leftDate&&e.range.from<=this._leftDate&&(r.endOfData=!0),e.onHistoryCallback(r)},e.prototype._createBarset=function(e){var t=Object(s.lowerbound)(this._cache.bars,1e3*e,(function(e,t){return e.time0){var r=" ["+u(e[0].time)+" ... "+u(e[e.length-1].time)+"]";i._logMessage("Receiving bars: total "+e.length+" bars in "+r+", requested range: "+s)}else i._logMessage("Receiving bars: barset is empty, requested range: "+s);i._requesting=!1,i._processBars(e,t)}}),(function(e){i._destroyed||(a?i._logMessage("getBars callback is already called before",!0):(a=!0,i._requesting=!1,i._errorMessage=e||null,i._processPendingSubscribers()))}),r)}},e.prototype._processBars=function(e,t){this._checkBars(e),this._alignBarsTime(e),e.length>0?(this._emptyResponsesCount=0,this._processFullBarset(e,t)):(this._emptyResponsesCount+=1,this._processEmptyBarset(t)),this._processPendingSubscribers()},e.prototype._processEmptyBarset=function(t){t&&t.nextTime?(this._logMessage("Next time received: `{0}`".format(u(1e3*t.nextTime))),this._addGap(t.nextTime),this._leftDate=Math.min(this._leftDate||e._now()/1e3,t.nextTime+1)):t&&t.noData?(this._logMessage("EOD received"),this._setEndOfData()):this._logMessage("nextTime or noData should present in metainfo when empty barset is returned"),50===this._emptyResponsesCount&&(this._logMessage("EOD detected due 50 empty responses in a row"),this._setEndOfData())},e.prototype._setEndOfData=function(){this._endOfData=!0,this._cache.bars.length&&(this._leftDate=this._cache.bars[0].time/1e3)},e.prototype._processFullBarset=function(e,t){var i=e[0].time;null!==this._leftDate&&i<1e3*this._leftDate&&this._logMessage("Returned more data than needed"),this._putToCache(e)?null!==this._leftDate&&this._cache.bars.length&&this._leftDate>this._cache.bars[0].time/1e3&&(this._leftDate=this._cache.bars[0].time/1e3):this._logMessage("Incremental update failed. Starting full update. Returned data should be in the requested range.",!0),t&&t.nextTime?console.warn("nextTime should be set when there is no data in the requested period only"):t&&t.noData&&console.warn("noData should be set when there is no data in the requested period and earlier only")},e.prototype._addGap=function(t){if(!this._gaps.find((function(e){return e.from===t}))){var i=(this._cache.bars.length?this._cache.bars[0].time:e._now())/1e3;this._gaps.push({from:t,to:i})}},e.prototype._inGapNextTime=function(e){var t=this._gaps.find((function(t){return t.frome}));return t?t.from:null},
-e.prototype._getNextSubscriptionId=function(){return this._nextSubscriptionId++},e.prototype._checkBars=function(e,t){if(void 0===t&&(t=!1),l.enabled("charting_library_debug_mode"))for(var i=function(i){if(e[i].time<=e[i-1].time){var n="Wrong bars time: time {0} of bar {1} should be more than time {2} of bar {3}".format(e[i].time,i,e[i-1].time,i-1);t&&r._dwmAligner&&(n+="\nCheck that you provide DWM bars without time part, i.e. 00:00 GMT"),console.error(n)}["high","low","open","close","time"].some((function(t){return"number"!=typeof e[i][t]||!isFinite(e[i][t])}))&&console.error("Wrong bars values: all OHLC values should be numbers")},r=this,n=1;n=this._cache.bars[0].time){var t=this._cache.bars[this._cache.bars.length-1].time===e[e.length-1].time;if(this._cache.bars=[],!t)return this._leftDate=null,!1;this._logMessage("Received history up to now instead of incremental update. Return exactly what is requested.")}return this._cache.bars=Object(r.__spreadArrays)(e,this._cache.bars),this._checkBars(this._cache.bars,!0),!0},e.prototype._putToCacheNewBar=function(e){var t=this._cache.bars.length,i=e.time,r=0===t?NaN:this._cache.bars[t-1].time;0===t||r=0&&!function(){try{return/^(192|172|10)\.[0-9][0-9][0-9]\.[0-9][0-9][0-9]\.[0-9][0-9][0-9]/.test(location.hostname)||/^.*((?:\.local)|localhost)$/.test(location.hostname)}catch(e){return!1}}()&&setTimeout((function(){try{var e=function(){var e=0;return JSON.parse(urlParams.logo).image&&(e="C",r.enabled("link_to_tradingview")||(e="D")),e}();window.ga&&(0!==e&&window.ga("send","event","s",e),urlParams.utm||window.ga("send","event","l"))}catch(t){}}),3e4)}},Wh6B:function(e,t,i){"use strict";var r=i("Eyy1").ensureNotNull,n=i("Ss5c").LineDataSource,o=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=i("08i5"),l=window.t("Forecast");function c(e,t){this._constructor="LineToolPrediction";var r=t||c.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("Ay2m").PredictionPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(c,n),c.prototype.isSynchronizable=function(){return!1},c.prototype.status=function(){return this._properties.status.value()},c.prototype.setStatus=function(e){return this._properties.status.setValue(e)},
-c.prototype.pointsCount=function(){return 2},c.prototype.translatedType=function(){return l},c.prototype.name=function(){return"Forecast"},c.prototype.restorePoints=function(e,t,i){n.prototype.restorePoints.call(this,e,t,i),this.checkAlert()},c.prototype.checkAlert=function(){if(!(this._points.length<2||this._model.mainSeries().bars().isEmpty())){var e=this._points[1];if(this.status())e.index>this._model.timeScale().baseIndex()&&this.setStatus(a.AlertStatus.Waiting);else{var t=this._model.mainSeries().bars().valueAt(e.index);if(null!==t){var i=this.direction();if(i===a.Direction.Up&&t[TradingView.HIGH_PLOT]>=e.price)this.setStatus(a.AlertStatus.Success);else if(i===a.Direction.Down&&t[TradingView.LOW_PLOT]<=e.price)this.setStatus(a.AlertStatus.Success);else{var n=r(this._model.mainSeries().bars().lastIndex());e.index!==n&&this.setStatus(a.AlertStatus.Failure)}}}}},c.prototype.addPoint=function(e){var t=n.prototype.addPoint.call(this,e);return t&&this.checkAlert(),t},c.prototype.endChanging=function(){n.prototype.endChanging.call(this),this.setStatus(a.AlertStatus.Waiting),this.checkAlert()},c.prototype.onData=function(e){n.prototype.onData.call(this,e),this.checkAlert()},c.prototype.endMoving=function(){n.prototype.endMoving.call(this),this.setStatus(a.AlertStatus.Waiting),this.checkAlert()},c.prototype.direction=function(){if(this.points().length<2)return a.Direction.Up;var e=this.points()[0];return this.points()[1].price>e.price?a.Direction.Up:a.Direction.Down},c.prototype.getStylesPropertyPage=function(){return s.LineToolPredictionStylesPropertyPage},c.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("Pwwq").PredictionDefinitionsViewModel}.bind(null,i)).catch(i.oe)},c.prototype.cloneable=function(){return!1},c.createProperties=function(e){var t=new o("linetoolprediction",e);return c._configureProperties(t),t},c._configureProperties=function(e){n._configureProperties(e),e.merge({status:a.AlertStatus.Waiting})},t.LineToolPrediction=c},WkOR:function(e,t,i){"use strict";i.r(t),i.d(t,"areEqualSymbols",(function(){return o})),i.d(t,"includesEqualSymbol",(function(){return s}));var r=i("Kxc7"),n=r.enabled("uppercase_instrument_names");function o(e,t){return void 0===e?void 0===t:void 0!==t&&(n?e.toUpperCase()===t.toUpperCase():e===t)}function s(e,t){return e.some((function(e){return o(t,e)}))}},WkYF:function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("Ocx9").DefaultProperty,o=i("hayr").propertyPages,s=window.t("Date Range");function a(e,t){this._constructor="LineToolDateRange";var n=t||a.createProperties();r.call(this,e,n),i.e("lt-pane-views").then(function(e){var t=i("3xLB").DateRangePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(a,r),a.prototype.pointsCount=function(){return 2},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Date Range"},a.prototype.getStylesPropertyPage=function(){
-return o.LineToolDateRangeStylesPropertyPage},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("Ax76").GeneralDatePriceRangeDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new n("linetooldaterange",e);return a._configureProperties(t),t},a._configureProperties=function(e){r._configureProperties(e)},t.LineToolDateRange=a},WmDe:function(e,t,i){"use strict";TradingView.PublishedChartsTimeline=function(){},TradingView.LinearRegressionPaneView=function(){},TradingView.study_PivotPointsStandard=function(){},TradingView.study_PivotPointsHighLow=function(){},TradingView.study_ZigZag=function(){},TradingView.study_LinearRegression=function(){},TradingView.study_ElliottWave=function(){},TradingView.ESDStudyBase=function(){},TradingView.Pro=function(){this.hasPackage=function(){return!1}},window.user={is_pro:!1,settings:{}},TradingView.Pro.prototype.isPaidPro=function(){return!1},TradingView.Pro.prototype.hasActivePackages=function(){return!1},TradingView.Pro.prototype.isSupportAvailable=function(){return!1},TradingView.Pro.prototype.getStudies=function(){return[]},TradingView.Pro.prototype.getProduct=function(){return{}},TradingView.Pro.prototype.getStudiesOrder=function(){return[]},TradingView.AlertLabel=function(){},TradingView.getDataVendorString=function(){},TradingView.study_VbPVisible=function(){},TradingView.study_VbPSessions=function(){},TradingView.study_ESD$TV_DIVIDENDS=function(){},TradingView.study_ESD$TV_SPLITS=function(){},TradingView.study_ESD$TV_EARNINGS=function(){},TradingView.MockupRequestedCache=function(e){e&&e([])},TradingView.MockupRequestedCache.invalidate=function(){},TradingView.LinetoolTemplatesList=function(){}},Wo0S:function(e,t,i){e.exports={"common-tooltip":"common-tooltip-s2GEoMlT","common-tooltip--hidden":"common-tooltip--hidden-Z0EAvXgv","common-tooltip--horizontal":"common-tooltip--horizontal-13imOC5w","common-tooltip--farther":"common-tooltip--farther-2yXMAkHF","common-tooltip--vertical":"common-tooltip--vertical-mcRoucek","common-tooltip-farther":"common-tooltip-farther-XoKytD99","common-tooltip--no-pointer-events":"common-tooltip--no-pointer-events-3nL0Vygu","common-tooltip--direction_normal":"common-tooltip--direction_normal-3u9ejKM2","common-tooltip__body":"common-tooltip__body-356XFpBj","common-tooltip__button-container":"common-tooltip__button-container-3EjyKV3s","common-tooltip__body--no-buttons":"common-tooltip__body--no-buttons-3quqi1Sv","common-tooltip__button":"common-tooltip__button-1rnQgujz","common-tooltip--direction_reversed":"common-tooltip--direction_reversed-XN-JUTdr","common-tooltip__ear-holder":"common-tooltip__ear-holder-yIJjpvgu","common-tooltip__ear-holder--below":"common-tooltip__ear-holder--below-1rmzWejA","common-tooltip__ear-holder--above":"common-tooltip__ear-holder--above-1D8FkNkw","common-tooltip__ear-holder--before":"common-tooltip__ear-holder--before-oXq5sFXr",
-"common-tooltip__ear-holder--after":"common-tooltip__ear-holder--after-BnAcuW1N","common-tooltip__body--with-hotkey":"common-tooltip__body--with-hotkey-2wXRtgYZ","common-tooltip__body--width_wide":"common-tooltip__body--width_wide-3oG604Li","common-tooltip__body--width_narrow":"common-tooltip__body--width_narrow-34hrFTFo","common-tooltip__body--no-padding":"common-tooltip__body--no-padding-2vVe6Xco","common-tooltip__hotkey-block":"common-tooltip__hotkey-block-2gS_uAOl","common-tooltip__hotkey-block--divider":"common-tooltip__hotkey-block--divider-rQ38KmpQ","common-tooltip__hotkey-text":"common-tooltip__hotkey-text-1eb7dyCg","common-tooltip__hotkey-button":"common-tooltip__hotkey-button-1XJ40e4D","common-tooltip__plus-sign":"common-tooltip__plus-sign-3CKSupKp"}},Wt0y:function(e,t,i){"use strict";function r(e){void 0===e&&(e=location.host);return-1!==["i18n.tradingview.com","partial.tradingview.com","www.tradingview.com","wwwcn.tradingview.com"].indexOf(e)||-1!==["d33t3vvu2t2yu5.cloudfront.net","dwq4do82y8xi7.cloudfront.net","s.tradingview.com","s3.tradingview.com"].indexOf(e)||e.match(/^[a-z]{2}\.tradingview\.com/)||e.match(/prod-[^.]+.tradingview.com/)?"battle":-1!==e.indexOf("tradingview.com")?"staging":e.match(/webcharts/)?"staging_local":(e.match(/^localhost(:\d+)?$/),"local")}function n(){return"local"===r()}function o(){return"battle"===r()}function s(){return!o()}i.r(t),i.d(t,"environment",(function(){return r})),i.d(t,"isLocal",(function(){return n})),i.d(t,"isProd",(function(){return o})),i.d(t,"isDebug",(function(){return s}))},XAms:function(e,t,i){"use strict";function r(e){e.preventDefault()}i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return o}));var n=["input:not([type])",'input[type="text"]','input[type="email"]','input[type="password"]','input[type="search"]','input[type="number"]','input[type="url"]',"textarea","a[href]",'*[contenteditable="true"]'];function o(e){var t=e.target;t&&!t.closest(n.join(", "))&&e.preventDefault()}},XFad:function(e,t,i){"use strict";var r=i("5rJj"),n=i("aDyP").LineToolPitchfork,o=window.t("Schiff Pitchfork");function s(e,t){var i=t||s.createProperties();n.call(this,e,i),this._constructor="LineToolSchiffPitchfork2"}inherit(s,n),s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Schiff Pitchfork"},s.createProperties=function(e){var t=new r("linetoolschiffpitchfork2",e,!1,{range:[0,8]});return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolSchiffPitchfork2=s},XPit:function(e,t,i){"use strict";i.r(t),i.d(t,"TimePointIndexSearchMode",(function(){return r})),i.d(t,"seriesPlotFunctionMap",(function(){return l})),i.d(t,"barFunction",(function(){return c})),i.d(t,"SeriesData",(function(){return u}));var r,n=i("Eyy1"),o=i("k9/m");!function(e){e[e.FromLeft=-1]="FromLeft",e[e.FromRight=1]="FromRight"}(r||(r={}));var s={open:function(e){return e[1]},high:function(e){return e[2]},low:function(e){return e[3]},close:function(e){return e[4]},hl2:function(e){return(e[2]+e[3])/2},hlc3:function(e){
-return(e[2]+e[3]+e[4])/3},ohlc4:function(e){return(e[1]+e[2]+e[3]+e[4])/4}},a=["open","high","low","close","hl2","hlc3","ohlc4"];function l(){var e=new Map;return a.forEach((function(t,i){e.set(t,c(t))})),e}function c(e){return s[e]}var u=function(){function e(){this.m_bars=new o.PlotList(l()),this.m_nsBars=new o.PlotList(l())}return e.prototype.bars=function(){return this.m_bars},e.prototype.nsBars=function(){return this.m_nsBars},e.prototype.size=function(){return this.m_bars.size()+this.m_nsBars.size()},e.prototype.each=function(e){this.m_bars.each(e),this.m_nsBars.each(e)},e.prototype.clear=function(){this.m_bars.clear(),this.m_nsBars.clear(),this.lastProjectionPrice=void 0},e.prototype.isEmpty=function(){return this.m_bars.isEmpty()&&this.m_nsBars.isEmpty()},e.prototype.first=function(){return this.m_bars.isEmpty()?this.m_nsBars.first():this.m_bars.first()},e.prototype.last=function(){return this.m_nsBars.isEmpty()?this.m_bars.last():this.m_nsBars.last()},e.prototype.search=function(e,t){return this.nsBars().isEmpty()?this.bars().search(e,t):this.bars().isEmpty()||Object(n.ensureNotNull)(this.nsBars().firstIndex())<=e?this.nsBars().search(e,t):this.bars().search(e,t)},e.prototype.valueAt=function(e){var t=this.search(e);return null!==t?t.value:null},e.prototype.plotValueToTimePointIndex=function(e,t,i){if(i===r.FromRight){var n=function(i,r){var n=r[t];return null!=n&&e>=n};return null!==(o=this.m_bars.findLast(n))?o.index:null!==(s=this.m_nsBars.findLast(n))?s.index:this.m_bars.firstIndex()}if(i===r.FromLeft){var o,s,a=function(i,r){var n=r[t];return null!=n&&e<=n};return null!==(o=this.m_bars.findFirst(a))?o.index:null!==(s=this.m_nsBars.findFirst(a))?s.index:this.m_bars.lastIndex()}throw new Error("plotValueToTimePointIndex: unsupported search mode")},e}()},XUCF:function(e,t,i){"use strict";var r=i("Hr11").sign,n=i("Ss5c").LineDataSource,o=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=window.t("Ghost Feed");function l(e,t,i){this._source=e,this._index=t,this._bars=i||[]}function c(e,t,r){this._constructor="LineToolGhostFeed";var o=t||c.createProperties();if(o._source=this,!r){var s=Math.round(this.calculateATR(e));o.averageHL.setValue(s)}n.call(this,e,o),this._segments=[],o.averageHL.listeners().subscribe(this,c.prototype.regenerate),o.variance.listeners().subscribe(this,c.prototype.regenerate),o.points||o.addProperty("points"),this._currentAverageHL=this._properties.averageHL.value(),this._currentVariance=this._properties.variance.value(),this._currentInterval=e.mainSeries().interval(),this.properties().onRestoreFactoryDefaults().subscribe(this,this._handleRestoringFactoryDefaults),i.e("lt-pane-views").then(function(e){var t=i("dMkl").GhostFeedPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}l.prototype.setBars=function(e){this._bars=e||[]},l.prototype.clone=function(e){return new l(e,this._index,TradingView.clone(this._bars))},l.prototype.createBar=function(){
+e.prototype._getNextSubscriptionId=function(){return this._nextSubscriptionId++},e.prototype._checkBars=function(e,t){if(void 0===t&&(t=!1),l.enabled("charting_library_debug_mode"))for(var i=function(i){if(e[i].time<=e[i-1].time){var n="Wrong bars time: time {0} of bar {1} should be more than time {2} of bar {3}".format(e[i].time,i,e[i-1].time,i-1);t&&r._dwmAligner&&(n+="\nCheck that you provide DWM bars without time part, i.e. 00:00 GMT"),console.error(n)}["high","low","open","close","time"].some((function(t){return"number"!=typeof e[i][t]||!isFinite(e[i][t])}))&&console.error("Wrong bars values: all OHLC values should be numbers")},r=this,n=1;n=this._cache.bars[0].time){var t=this._cache.bars[this._cache.bars.length-1].time===e[e.length-1].time;if(this._cache.bars=[],!t)return this._leftDate=null,!1;this._logMessage("Received history up to now instead of incremental update. Return exactly what is requested.")}return this._cache.bars=Object(r.__spreadArrays)(e,this._cache.bars),this._checkBars(this._cache.bars,!0),!0},e.prototype._putToCacheNewBar=function(e){var t=this._cache.bars.length,i=e.time,r=0===t?NaN:this._cache.bars[t-1].time;0===t||r=0&&!function(){try{return/^(192|172|10)\.[0-9][0-9][0-9]\.[0-9][0-9][0-9]\.[0-9][0-9][0-9]/.test(location.hostname)||/^.*((?:\.local)|localhost)$/.test(location.hostname)}catch(e){return!1}}()&&setTimeout((function(){try{var e=function(){var e=0;return JSON.parse(urlParams.logo).image&&(e="C",r.enabled("link_to_tradingview")||(e="D")),e}();window.ga&&(0!==e&&window.ga("send","event","s",e),urlParams.utm||window.ga("send","event","l"))}catch(t){}}),3e4)}},Wh6B:function(e,t,i){"use strict";var r=i("Eyy1").ensureNotNull,n=i("Ss5c").LineDataSource,o=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=i("08i5"),l=window.t("Forecast");function c(e,t){this._constructor="LineToolPrediction";var r=t||c.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("Ay2m").PredictionPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(c,n),c.prototype.isSynchronizable=function(){return!1},c.prototype.status=function(){return this._properties.status.value()},c.prototype.setStatus=function(e){return this._properties.status.setValue(e)},c.prototype.pointsCount=function(){
+return 2},c.prototype.translatedType=function(){return l},c.prototype.name=function(){return"Forecast"},c.prototype.restorePoints=function(e,t,i){n.prototype.restorePoints.call(this,e,t,i),this.checkAlert()},c.prototype.checkAlert=function(){if(!(this._points.length<2||this._model.mainSeries().bars().isEmpty())){var e=this._points[1];if(this.status())e.index>this._model.timeScale().baseIndex()&&this.setStatus(a.AlertStatus.Waiting);else{var t=this._model.mainSeries().bars().valueAt(e.index);if(null!==t){var i=this.direction();if(i===a.Direction.Up&&t[TradingView.HIGH_PLOT]>=e.price)this.setStatus(a.AlertStatus.Success);else if(i===a.Direction.Down&&t[TradingView.LOW_PLOT]<=e.price)this.setStatus(a.AlertStatus.Success);else{var n=r(this._model.mainSeries().bars().lastIndex());e.index!==n&&this.setStatus(a.AlertStatus.Failure)}}}}},c.prototype.addPoint=function(e){var t=n.prototype.addPoint.call(this,e);return t&&this.checkAlert(),t},c.prototype.endChanging=function(){n.prototype.endChanging.call(this),this.setStatus(a.AlertStatus.Waiting),this.checkAlert()},c.prototype.onData=function(e){n.prototype.onData.call(this,e),this.checkAlert()},c.prototype.endMoving=function(){n.prototype.endMoving.call(this),this.setStatus(a.AlertStatus.Waiting),this.checkAlert()},c.prototype.direction=function(){if(this.points().length<2)return a.Direction.Up;var e=this.points()[0];return this.points()[1].price>e.price?a.Direction.Up:a.Direction.Down},c.prototype.getStylesPropertyPage=function(){return s.LineToolPredictionStylesPropertyPage},c.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("Pwwq").PredictionDefinitionsViewModel}.bind(null,i)).catch(i.oe)},c.prototype.cloneable=function(){return!1},c.createProperties=function(e){var t=new o("linetoolprediction",e);return c._configureProperties(t),t},c._configureProperties=function(e){n._configureProperties(e),e.merge({status:a.AlertStatus.Waiting})},t.LineToolPrediction=c},WkOR:function(e,t,i){"use strict";i.r(t),i.d(t,"areEqualSymbols",(function(){return o})),i.d(t,"includesEqualSymbol",(function(){return s}));var r=i("Kxc7"),n=r.enabled("uppercase_instrument_names");function o(e,t){return void 0===e?void 0===t:void 0!==t&&(n?e.toUpperCase()===t.toUpperCase():e===t)}function s(e,t){return e.some((function(e){return o(t,e)}))}},WkYF:function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("Ocx9").DefaultProperty,o=i("hayr").propertyPages,s=window.t("Date Range");function a(e,t){this._constructor="LineToolDateRange";var n=t||a.createProperties();r.call(this,e,n),i.e("lt-pane-views").then(function(e){var t=i("3xLB").DateRangePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(a,r),a.prototype.pointsCount=function(){return 2},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Date Range"},a.prototype.getStylesPropertyPage=function(){return o.LineToolDateRangeStylesPropertyPage},
+a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("Ax76").GeneralDatePriceRangeDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new n("linetooldaterange",e);return a._configureProperties(t),t},a._configureProperties=function(e){r._configureProperties(e)},t.LineToolDateRange=a},WmDe:function(e,t,i){"use strict";TradingView.PublishedChartsTimeline=function(){},TradingView.LinearRegressionPaneView=function(){},TradingView.study_PivotPointsStandard=function(){},TradingView.study_PivotPointsHighLow=function(){},TradingView.study_ZigZag=function(){},TradingView.study_LinearRegression=function(){},TradingView.study_ElliottWave=function(){},TradingView.ESDStudyBase=function(){},TradingView.Pro=function(){this.hasPackage=function(){return!1}},window.user={is_pro:!1,settings:{}},TradingView.Pro.prototype.isPaidPro=function(){return!1},TradingView.Pro.prototype.hasActivePackages=function(){return!1},TradingView.Pro.prototype.isSupportAvailable=function(){return!1},TradingView.Pro.prototype.getStudies=function(){return[]},TradingView.Pro.prototype.getProduct=function(){return{}},TradingView.Pro.prototype.getStudiesOrder=function(){return[]},TradingView.AlertLabel=function(){},TradingView.getDataVendorString=function(){},TradingView.study_VbPVisible=function(){},TradingView.study_VbPSessions=function(){},TradingView.study_ESD$TV_DIVIDENDS=function(){},TradingView.study_ESD$TV_SPLITS=function(){},TradingView.study_ESD$TV_EARNINGS=function(){},TradingView.MockupRequestedCache=function(e){e&&e([])},TradingView.MockupRequestedCache.invalidate=function(){},TradingView.LinetoolTemplatesList=function(){}},Wo0S:function(e,t,i){e.exports={"common-tooltip":"common-tooltip-s2GEoMlT","common-tooltip--hidden":"common-tooltip--hidden-Z0EAvXgv","common-tooltip--horizontal":"common-tooltip--horizontal-13imOC5w","common-tooltip--farther":"common-tooltip--farther-2yXMAkHF","common-tooltip--vertical":"common-tooltip--vertical-mcRoucek","common-tooltip-farther":"common-tooltip-farther-XoKytD99","common-tooltip--no-pointer-events":"common-tooltip--no-pointer-events-3nL0Vygu","common-tooltip--direction_normal":"common-tooltip--direction_normal-3u9ejKM2","common-tooltip__body":"common-tooltip__body-356XFpBj","common-tooltip__button-container":"common-tooltip__button-container-3EjyKV3s","common-tooltip__body--no-buttons":"common-tooltip__body--no-buttons-3quqi1Sv","common-tooltip__button":"common-tooltip__button-1rnQgujz","common-tooltip--direction_reversed":"common-tooltip--direction_reversed-XN-JUTdr","common-tooltip__ear-holder":"common-tooltip__ear-holder-yIJjpvgu","common-tooltip__ear-holder--below":"common-tooltip__ear-holder--below-1rmzWejA","common-tooltip__ear-holder--above":"common-tooltip__ear-holder--above-1D8FkNkw","common-tooltip__ear-holder--before":"common-tooltip__ear-holder--before-oXq5sFXr","common-tooltip__ear-holder--after":"common-tooltip__ear-holder--after-BnAcuW1N",
+"common-tooltip__body--with-hotkey":"common-tooltip__body--with-hotkey-2wXRtgYZ","common-tooltip__body--width_wide":"common-tooltip__body--width_wide-3oG604Li","common-tooltip__body--width_narrow":"common-tooltip__body--width_narrow-34hrFTFo","common-tooltip__body--no-padding":"common-tooltip__body--no-padding-2vVe6Xco","common-tooltip__hotkey-block":"common-tooltip__hotkey-block-2gS_uAOl","common-tooltip__hotkey-block--divider":"common-tooltip__hotkey-block--divider-rQ38KmpQ","common-tooltip__hotkey-text":"common-tooltip__hotkey-text-1eb7dyCg","common-tooltip__hotkey-button":"common-tooltip__hotkey-button-1XJ40e4D","common-tooltip__plus-sign":"common-tooltip__plus-sign-3CKSupKp"}},Wt0y:function(e,t,i){"use strict";function r(e){void 0===e&&(e=location.host);return-1!==["i18n.tradingview.com","partial.tradingview.com","www.tradingview.com","wwwcn.tradingview.com"].indexOf(e)||-1!==["d33t3vvu2t2yu5.cloudfront.net","dwq4do82y8xi7.cloudfront.net","s.tradingview.com","s3.tradingview.com"].indexOf(e)||e.match(/^[a-z]{2}\.tradingview\.com/)||e.match(/prod-[^.]+.tradingview.com/)?"battle":-1!==e.indexOf("tradingview.com")?"staging":e.match(/webcharts/)?"staging_local":(e.match(/^localhost(:\d+)?$/),"local")}function n(){return"local"===r()}function o(){return"battle"===r()}function s(){return!o()}i.r(t),i.d(t,"environment",(function(){return r})),i.d(t,"isLocal",(function(){return n})),i.d(t,"isProd",(function(){return o})),i.d(t,"isDebug",(function(){return s}))},XAms:function(e,t,i){"use strict";function r(e){e.preventDefault()}i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return o}));var n=["input:not([type])",'input[type="text"]','input[type="email"]','input[type="password"]','input[type="search"]','input[type="number"]','input[type="url"]',"textarea","a[href]",'*[contenteditable="true"]'];function o(e){var t=e.target;t&&!t.closest(n.join(", "))&&e.preventDefault()}},XFad:function(e,t,i){"use strict";var r=i("5rJj"),n=i("aDyP").LineToolPitchfork,o=window.t("Schiff Pitchfork");function s(e,t){var i=t||s.createProperties();n.call(this,e,i),this._constructor="LineToolSchiffPitchfork2"}inherit(s,n),s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Schiff Pitchfork"},s.createProperties=function(e){var t=new r("linetoolschiffpitchfork2",e,!1,{range:[0,8]});return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolSchiffPitchfork2=s},XPit:function(e,t,i){"use strict";i.r(t),i.d(t,"TimePointIndexSearchMode",(function(){return r})),i.d(t,"seriesPlotFunctionMap",(function(){return l})),i.d(t,"barFunction",(function(){return c})),i.d(t,"SeriesData",(function(){return u}));var r,n=i("Eyy1"),o=i("k9/m");!function(e){e[e.FromLeft=-1]="FromLeft",e[e.FromRight=1]="FromRight"}(r||(r={}));var s={open:function(e){return e[1]},high:function(e){return e[2]},low:function(e){return e[3]},close:function(e){return e[4]},hl2:function(e){return(e[2]+e[3])/2},hlc3:function(e){return(e[2]+e[3]+e[4])/3},ohlc4:function(e){return(e[1]+e[2]+e[3]+e[4])/4}
+},a=["open","high","low","close","hl2","hlc3","ohlc4"];function l(){var e=new Map;return a.forEach((function(t,i){e.set(t,c(t))})),e}function c(e){return s[e]}var u=function(){function e(){this.m_bars=new o.PlotList(l()),this.m_nsBars=new o.PlotList(l())}return e.prototype.bars=function(){return this.m_bars},e.prototype.nsBars=function(){return this.m_nsBars},e.prototype.size=function(){return this.m_bars.size()+this.m_nsBars.size()},e.prototype.each=function(e){this.m_bars.each(e),this.m_nsBars.each(e)},e.prototype.clear=function(){this.m_bars.clear(),this.m_nsBars.clear(),this.lastProjectionPrice=void 0},e.prototype.isEmpty=function(){return this.m_bars.isEmpty()&&this.m_nsBars.isEmpty()},e.prototype.first=function(){return this.m_bars.isEmpty()?this.m_nsBars.first():this.m_bars.first()},e.prototype.last=function(){return this.m_nsBars.isEmpty()?this.m_bars.last():this.m_nsBars.last()},e.prototype.search=function(e,t){return this.nsBars().isEmpty()?this.bars().search(e,t):this.bars().isEmpty()||Object(n.ensureNotNull)(this.nsBars().firstIndex())<=e?this.nsBars().search(e,t):this.bars().search(e,t)},e.prototype.valueAt=function(e){var t=this.search(e);return null!==t?t.value:null},e.prototype.plotValueToTimePointIndex=function(e,t,i){if(i===r.FromRight){var n=function(i,r){var n=r[t];return null!=n&&e>=n};return null!==(o=this.m_bars.findLast(n))?o.index:null!==(s=this.m_nsBars.findLast(n))?s.index:this.m_bars.firstIndex()}if(i===r.FromLeft){var o,s,a=function(i,r){var n=r[t];return null!=n&&e<=n};return null!==(o=this.m_bars.findFirst(a))?o.index:null!==(s=this.m_nsBars.findFirst(a))?s.index:this.m_bars.lastIndex()}throw new Error("plotValueToTimePointIndex: unsupported search mode")},e}()},XUCF:function(e,t,i){"use strict";var r=i("Hr11").sign,n=i("Ss5c").LineDataSource,o=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=window.t("Ghost Feed");function l(e,t,i){this._source=e,this._index=t,this._bars=i||[]}function c(e,t,r){this._constructor="LineToolGhostFeed";var o=t||c.createProperties();if(o._source=this,!r){var s=Math.round(this.calculateATR(e));o.averageHL.setValue(s)}n.call(this,e,o),this._segments=[],o.averageHL.listeners().subscribe(this,c.prototype.regenerate),o.variance.listeners().subscribe(this,c.prototype.regenerate),o.points||o.addProperty("points"),this._currentAverageHL=this._properties.averageHL.value(),this._currentVariance=this._properties.variance.value(),this._currentInterval=e.mainSeries().interval(),this.properties().onRestoreFactoryDefaults().subscribe(this,this._handleRestoringFactoryDefaults),i.e("lt-pane-views").then(function(e){var t=i("dMkl").GhostFeedPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}l.prototype.setBars=function(e){this._bars=e||[]},l.prototype.clone=function(e){return new l(e,this._index,TradingView.clone(this._bars))},l.prototype.createBar=function(){
var e=this._source.properties().averageHL.value(),t=this._source.properties().variance.value()/100,i=this._source._model.mainSeries().base(),r=Math.random(),n=e*(1-2*r)*t,o=e*(1+(.5-(r=Math.random()))*t),s=n-o/2,a=s+o;return{o:(s+Math.random()*o)/i,h:a/i,l:s/i,c:(s+Math.random()*o)/i}},l.prototype.generate=function(){this._bars=[];var e=this._source.points(),t=e[this._index],i=e[this._index+1];if(t&&i&&t.index!==i.index){this._avgHL=this._source.properties().averageHL.value(),this._variance=this._source.properties().variance.value()/100;for(var n=this._index?t.index+1:t.index,o=r(i.index-t.index),s=n;s!==i.index;s+=o)this._bars.push(this.createBar())}},l.prototype.bars=function(){return this._bars},l.prototype.setSize=function(e){if(e0&&this._points[this._points.length-1].index===e.index){this._lastPoint=null,this.normalizePoints(),this.createServerPoints();for(var t=0;t1&&this.generateBars(this._points.length-2),i||this._finished},c.prototype.finish=function(){this._finished=!0,this._lastPoint=null,this.normalizePoints(),this.createServerPoints()},c.prototype.setPoint=function(e,t,i){if(n.prototype.setPoint.call(this,e,t,i),e>0){var r=this.points()[e-1],o=t.index-r.index;this._segments[e-1].setSize(Math.abs(o))}if(er&&i.push(this),i},i.prototype.mergeAndFire=function(e){var t=this.merge(e,!0);this._muteChildChanges=!0,t.forEach((function(e){e._muteChildChanges=!0})),t.forEach((function(e){e._muteChildChanges=!1,e.listeners().fire(e)})),this._muteChildChanges=!1,t.length>0&&this.listeners().fire(this)},i.prototype.state=function(e){var t=this._value;void 0===t&&(t={});for(var i=0;i=0},i.prototype.addChild=function(e,t){this[e]=t,-1===this._childs.indexOf(e)&&this._childs.push(e),t.listeners().subscribe(this,i.prototype.childChanged)},
i.prototype.childChanged=function(e,t){this._muteChildChanges||this.listeners().fire(this)},i.prototype.subscribe=function(e,t){this.listeners().subscribe(e,t,!1)},i.prototype.unsubscribe=function(e,t){this.listeners().unsubscribe(e,t)},i.prototype.unsubscribeAll=function(e){this.listeners().unsubscribeAll(e)},i.prototype.childs=function(){return this},e.exports=i}).call(this,i("aIyQ"))},teHb:function(e,t,i){"use strict";i.r(t),i.d(t,"ratioStudyItem",(function(){return s}));var r=i("mrSG"),n=i("7dm8"),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype._doCalculation=function(e,t,i,r){return e*t/(i*r)},t}(n.a),s={name:"Ratio",metainfo:{_metainfoVersion:15,defaults:n.b,plots:n.d,styles:n.e,description:"Ratio",shortDescription:"Ratio",is_price_study:!1,inputs:n.c,id:"Ratio@tv-basicstudies-1"},constructor:o}},tqok:function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var r=-2e6},tzRX:function(e,t){e.exports=''},"u+0B":function(e,t,i){"use strict";i.r(t),i.d(t,"TextWidthCache",(function(){return n}));var r=/[2-9]/g,n=function(){function e(e){void 0===e&&(e=50),this._actualSize=0,this._usageTick=1,this._oldestTick=1,this._tick2Labels={},this._cache={},this._maxSize=e}return e.prototype.reset=function(){this._actualSize=0,this._cache={},this._usageTick=1,this._oldestTick=1,this._tick2Labels={}},e.prototype.measureText=function(e,t,i){var n=i||r,o=String(t).replace(n,"0");if(this._cache[o])return this._cache[o].width;if(this._actualSize===this._maxSize){var s=this._tick2Labels[this._oldestTick];delete this._tick2Labels[this._oldestTick],delete this._cache[s],this._oldestTick++,this._actualSize--}var a=e.measureText(o).width;return 0===a&&t.length?0:(this._cache[o]={width:a,tick:this._usageTick},this._tick2Labels[this._usageTick]=o,this._actualSize++,this._usageTick++,a)},e}()},u0yd:function(e,t,i){"use strict";var r=i("Zp/P").coordinateIsValid,n=i("gyZD").PaneRendererLine;function o(e){e.forceLineColor=!1,n.call(this,e),this.color1=e.color1,this.color2=e.color2,this.bottom=e.bottom,this.isSeries=!!e.isSeries,this._simpleMode=e.simpleMode}inherit(o,n),o.prototype._drawImpl=function(e){if(0!==this.items.length){e.lineCap="square",e.strokeStyle=this.lineColor,e.lineWidth=this.lineWidth,e.lineStyle=this.lineStyle,e.lineWidth=1;for(var t=0;t=0&&!r(this.items[i].y);)i--;if(!(t>=i)){e.translate(.5,.5)
;for(var o={},s=this.items,a=t;a<=i;a++){var l=s[a];if(h=l.style?l.style.color:this.lineColor,a=1&&(r+=8*(1+encodeURIComponent(e[i]).length),!(i-1>0&&r+8*(1+encodeURIComponent(e[i-1]).length)>t));i--);return e.slice(i)}(y(e,t).map(g),75497472)}function S(e,t,i,n){if(t!==c||n.id!==u){var o=new Date;if(e<=r.NORMAL&&function(e,t,i,r,n){var o={id:s,message:String(t),subSystemId:r,timestamp:Number(e)};s+=1,i.push(o),void 0!==n&&i.length>n&&i.splice(0,1)}(o,t,i,n.id,n.maxCount),e<=d&&(!n.highRate||_())&&(!l||n.id.match(l))){var a=o.toISOString()+":"+n.id+":"+t;switch(e){case r.DEBUG:console.debug(a);break;case r.INFO:case r.NORMAL:n.color?console.log("%c"+a,"color: "+n.color):console.log(a);break;case r.WARNING:console.warn(a);break;case r.ERROR:console.error(a)}c=t,u=n.id,h&&clearTimeout(h),h=setTimeout((function(){c=null,u=null,h=NaN}),1e3)}}}function b(e,t){void 0===t&&(t={});var i=[];a.push(i);var n=Object.assign(t,{id:e});function o(e){return function(t){return S(e,t,i,n)}}return{logDebug:o(r.DEBUG),logError:o(r.ERROR),logInfo:o(r.INFO),logNormal:o(r.NORMAL),logWarn:o(r.WARNING)}}var w=b("logger"),P=n.lon=function(e,t){m(r.DEBUG),w.logNormal("Debug logging enabled"),p=Boolean(e),l=t||null,x()},C=n.loff=function(){m(r.INFO),w.logInfo("Debug logging disabled")};function x(){try{o&&(localStorage.setItem("tv.logger.logHighRate",String(p)),localStorage.setItem("tv.logger.loglevel",String(d)))}catch(e){w.logWarn("Cannot save logger state (level: "+d+", high-rate: "+p+") to localStorage: "+e.message)}}!function(){p=!!o&&"true"===localStorage.getItem("tv.logger.logHighRate");var e=parseInt(o&&localStorage.getItem("tv.logger.loglevel")||"");Number.isNaN(e)&&(e=r.WARNING),m(e),
+favoriteStudyTemplatesService:c}));l=Modernizr.mobiletouch?["full"]:e.enabled("caption_buttons_text_if_possible")?void 0:["medium"];return new n(new r,{chartSaver:window.saver,chartApiInstance:ChartApiInstance,chartWidgetCollection:t.chartWidgetCollection,defaultIntervals:Object.keys(ChartApiInstance.defaultResolutions()),defaultFavoriteStyles:a.chartTypes,defaultFavoriteIntervals:a.intervals,hideStudyTemplates:!0,resizerBridge:o,studyMarket:window.studyMarket,studyTemplates:ee,favoriteStudyTemplatesService:c,allowedModes:l,saveChartService:t.saveChartService,loadChartService:t.loadChartService,chartChangesWatcher:s,onClick:le})}({chartWidgetCollection:M,saveChartService:O,loadChartService:A});null!==k?k.load().then((function(e){Q=e.getComponent(),$.resolve()})):($.promise.catch((function(){})),$.reject("header widget is not loaded"));var Y=function(e){if(K){var t=urlParams.toolbarbg&&/^[0-9a-f]+$/i.test(urlParams.toolbarbg)?String(urlParams.toolbarbg):void 0;if(t){var i=document.createElement("style");i.textContent="body,.chart-controls-bar,#footer-chart-panel{background-color:#"+t+" !important}",document.head.appendChild(i)}return new o({bgColor:t,chartWidgetCollection:e,drawingsAccess:urlParams.drawingsAccess?JSON.parse(urlParams.drawingsAccess):void 0,resizerBridge:E.allocate({areaName:"left"}),onClick:le})}return null}(M),G=null;window.tradingViewApi=new j(M,window.ChartApiInstance,O,A);var Z=null;g.bindToChartWidgetCollection(M),TradingView.isNaN(urlParams.studyCountLimit)||(TradingView.STUDY_COUNT_LIMIT=Math.max(2,+urlParams.studyCountLimit)),TradingView.isNaN(urlParams.ssreqdelay)||W(Math.max(0,+urlParams.ssreqdelay)),window.ChartApiInstance.connect(),Promise.all([i.e(31),i.e(39),i.e(75),i.e(14),i.e(29),i.e(35),i.e(47),i.e("floating-toolbars")]).then(function(e){var t=i("tPkB");window.lineToolPropertiesToolbar=new t(M)}.bind(null,i)).catch(i.oe);var te=document.querySelector(".tv-content");function ie(){Y&&Y.load(),G&&G.load().then((function(e){window.footerWidget=e.getComponent()})),Z&&Z.load().then((function(e){window.widgetbar=e}))}null!==te&&te.addEventListener("contextmenu",(function(e){null!==e.target&&"input"!==e.target.tagName.toLowerCase()&&"textarea"!==e.target.tagName.toLowerCase()&&e.preventDefault()})),q.resolve(),M.undoHistory.undoStack().onChange().subscribe(null,L((function(){v.emit("onAutoSaveNeeded")}),1e3*(urlParams.autoSaveDelay||5),{leading:!1,trailing:!0})),chartWidget.withModel(null,(function(){if(ChartApiInstance.on("realtime_tick",(function(e){v.emit("onTick",e)})),!a.savedThemeName()&&J){var t=a.getStdTheme(J);t&&t.content&&void 0===u&&(M.applyTheme(t.content,!1,!1,J,!0,!0),window.applyOverrides(window.__defaultsOverrides))}e.enabled("charting_library_debug_mode")&&v.subscribeToAll((function(){var e=Array.prototype.slice.call(arguments);console.log('Event "{0}", arguments: {1}'.format(e[0],JSON.stringify(e.slice(1))))})),R&&(R(M),R=null)})),c.isAnyChartWidgetInitialized(M)?ie():c.waitAnyChartWidgetInitialized(M,ie),v.subscribe("chart_load_requested",(function(e){
+window.tradingViewApi.loadChart({json:JSON.parse(e.content),extendedData:e})}))};window.addEventListener("unload",(function(){window.chartWidgetCollection&&(window.chartWidgetCollection.destroy(),window.chartWidgetCollection=null),window.containerElement=null,A(),window.ChartApiInstance&&(window.ChartApiInstance.destroy(),window.ChartApiInstance=null)})),e.enabled("saveload_storage_customization")&&(window.parent[urlParams.uid].saveLoadAdapter?u.setCustomAdapter(window.parent[urlParams.uid].saveLoadAdapter):void 0!==urlParams.chartsStorageUrl&&urlParams.chartsStorageUrl&&void 0!==urlParams.clientId&&urlParams.clientId?u.initialize(urlParams.clientId,urlParams.userId,urlParams.chartsStorageUrl,urlParams.chartsStorageVer||"1.0"):(e.setEnabled("saveload_storage_customization",!1),e.setEnabled("header_saveload",!1)));var ie,re=x();function ne(){re.resolve()}window.parent[urlParams.uid].loadLastChart&&e.enabled("saveload_storage_customization")?u.getCharts((function(e){if(0!==e.length){var t=e.sort((function(e,t){return t.modified_iso-e.modified_iso}))[0];u.getChartContent(t,(function(e){var t=JSON.parse(e.content);t.extendedData=e,urlParams.chartContent=JSON.stringify({json:t}),ne()}),ne)}else ne()}),ne):ne(),null!=(ie=window.parent[window.urlParams.uid].settingsAdapter)?(TVSettings.setSettingsAdapter(ie),TVSettings.sync()):e.enabled("use_localstorage_for_settings")&&TVSettings.sync();var oe,se,ae=x();function le(e){var t=TradingView.bottomWidgetBar;t&&t.turnOffMaximize()}Promise.all([ae.promise,re.promise]).then((function(){k.trigger(window,"resize");var t,i,r,n,o,s,a=document.querySelector(".loading-indicator");if(a&&(a.style.display="none"),setTimeout(te,0),e.enabled("14851")&&(Math.random()<=.02||e.enabled("cqg_terminal")||e.enabled("amp_terminal"))){t=window,i=document,r="script",n="ga",t.GoogleAnalyticsObject=n,t.ga=t.ga||function(){(t.ga.q=t.ga.q||[]).push(arguments)},t.ga.l=1*new Date,o=i.createElement(r),s=i.getElementsByTagName(r)[0],o.async=1,o.src="//www.google-analytics.com/analytics.js",s.parentNode.insertBefore(o,s);var l=document.URL.match(new RegExp("(:?.*://)([^/]+)/.*"))[2];ga("create","UA-112911840-1","auto"),ga("set","anonymizeIp",!0),ga("set",{hostname:l,page:l,referrer:l}),ga("send","pageview")}})),oe=!0,window.parent[urlParams.uid].datafeed.onReady((function(e){oe&&console.warn("`onReady` should return result asynchronously. Use `setTimeout` with 0 interval to execute the callback function."),window.configurationData=e,ae.resolve()})),oe=!1,window.getFunctionFromArguments=function(e){return window.parent[urlParams.uid][e]},window.createShortcutAction=(se=h.createGroup({desc:"API"}),function(e,t){se.add({hotkey:d(e),handler:t})}),window.initializationFinished=function(){window.chartWidgetCollection.undoHistory.clearStack()},window.headerReady=function(){return $.promise},window.createButton=function(e){if(null===Q)throw new Error("Cannot create button: header widget is not ready or is not loaded - use `headerReady` to wait until header is ready");var t=(e=e||{}).align||"left";return Q.addButton(t)
+},window.getAllFeatures=function(){const t=e.getAllFeatures();return Object.keys(t).forEach((function(e){isNaN(parseFloat(e))||delete t[e]})),t}}).call(this,i("Kxc7"))},uOxu:function(e,t,i){"use strict";i.r(t),i.d(t,"LOGLEVEL",(function(){return r})),i.d(t,"getLogLevel",(function(){return f})),i.d(t,"isHighRateEnabled",(function(){return _})),i.d(t,"setLogLevel",(function(){return m})),i.d(t,"getRawLogHistory",(function(){return y})),i.d(t,"serializeLogHistoryEntry",(function(){return g})),i.d(t,"getLogHistory",(function(){return v})),i.d(t,"getLogger",(function(){return b})),i.d(t,"loggingOn",(function(){return P})),i.d(t,"loggingOff",(function(){return C}));var r,n="undefined"!=typeof window?window:{},o=!1;try{localStorage.getItem(""),o=!0}catch(T){}!function(e){e[e.ERROR=1]="ERROR",e[e.WARNING=2]="WARNING",e[e.INFO=3]="INFO",e[e.NORMAL=4]="NORMAL",e[e.DEBUG=5]="DEBUG"}(r||(r={}));var s=0,a=[],l=null,c=null,u=null,h=NaN,d=r.WARNING,p=!1;function f(){return d}function _(){return p}function m(e){e=Math.max(r.ERROR,Math.min(r.DEBUG,e)),d=e,x()}function y(e,t){var i=a.reduce((function(e,t){return e.concat(t)}),[]);return i.sort((function(e,t){return e.id-t.id})),void 0!==t&&(i=i.filter((function(e){return e.subSystemId===t}))),"number"==typeof e&&(i=i.slice(-e)),i}function g(e){return new Date(e.timestamp).toISOString()+":"+e.subSystemId+":"+e.message.replace(/"/g,"'")}function v(e,t){return function(e,t){var i,r=0;for(i=e.length-1;i>=1&&(r+=8*(1+encodeURIComponent(e[i]).length),!(i-1>0&&r+8*(1+encodeURIComponent(e[i-1]).length)>t));i--);return e.slice(i)}(y(e,t).map(g),75497472)}function S(e,t,i,n){if(t!==c||n.id!==u){var o=new Date;if(e<=r.NORMAL&&function(e,t,i,r,n){var o={id:s,message:String(t),subSystemId:r,timestamp:Number(e)};s+=1,i.push(o),void 0!==n&&i.length>n&&i.splice(0,1)}(o,t,i,n.id,n.maxCount),e<=d&&(!n.highRate||_())&&(!l||n.id.match(l))){var a=o.toISOString()+":"+n.id+":"+t;switch(e){case r.DEBUG:console.debug(a);break;case r.INFO:case r.NORMAL:n.color?console.log("%c"+a,"color: "+n.color):console.log(a);break;case r.WARNING:console.warn(a);break;case r.ERROR:console.error(a)}c=t,u=n.id,h&&clearTimeout(h),h=setTimeout((function(){c=null,u=null,h=NaN}),1e3)}}}function b(e,t){void 0===t&&(t={});var i=[];a.push(i);var n=Object.assign(t,{id:e});function o(e){return function(t){return S(e,t,i,n)}}return{logDebug:o(r.DEBUG),logError:o(r.ERROR),logInfo:o(r.INFO),logNormal:o(r.NORMAL),logWarn:o(r.WARNING)}}var w=b("logger"),P=n.lon=function(e,t){m(r.DEBUG),w.logNormal("Debug logging enabled"),p=Boolean(e),l=t||null,x()},C=n.loff=function(){m(r.INFO),w.logInfo("Debug logging disabled")};function x(){try{o&&(localStorage.setItem("tv.logger.logHighRate",String(p)),localStorage.setItem("tv.logger.loglevel",String(d)))}catch(e){w.logWarn("Cannot save logger state (level: "+d+", high-rate: "+p+") to localStorage: "+e.message)}}!function(){p=!!o&&"true"===localStorage.getItem("tv.logger.logHighRate");var e=parseInt(o&&localStorage.getItem("tv.logger.loglevel")||"");Number.isNaN(e)&&(e=r.WARNING),m(e),
w.logNormal("Init with settings - level: "+d+", high-rate: "+p)}(),n.performance&&n.performance.now?w.logNormal("Sync logger and perf times, now is "+n.performance.now()):w.logWarn("Perf time is not available")},uPb3:function(e,t,i){"use strict";(function(e,r){i("xrEm");var n=i("u+0B").TextWidthCache,o=i("7KDR").Separator,s=i("5VQP").ContextMenuManager,a=i("i1o5").InvalidationLevel,l=i("ikwP"),c=l.createBoundCanvas,u=l.getContext2D,h=l.drawScaled,d=l.hardResizeCanvas,p=l.clearRect,f=l.fillRect,_=l.Size,m=i("S8xo").MouseEventHandler,y=i("PC8g").trackEvent,g=i("XlJ7").makeFont,v=i("8OdW"),S=i("CW80").isLineTool,b=i("mE5r").PriceAxisesContainer,w=i("1IXQ").PriceAxisWidget,P=i("3/8U").axesHighlightColor,C=i("zDbI").CHART_FONT_FAMILY,x={contextMenuEnabled:!0,timezoneMenuEnabled:!0,pressedMouseMoveScale:!0};function T(t,i,r,n,s){this._options=Object.assign({},x,i),this.chart=t,this._properties=t.properties().scalesProperties,this.contextMenu=null,this._element=document.createElement("tr"),this._backgroundBasedTheme=s;var a=t.model().model().rendererOptionsProvider(),l=this.backgroundColor.bind(this);function u(){throw new Error("Time axis does not support real price scales")}var h=this;var d={titlesProvider:r,stubContextMenuProvider:function(e,t){var i=h.getContextMenuActions(!0),r=n(e,t);return r[r.length-1]===h.chart.actions().scalesProperties?Array.prototype.splice.apply(r,[r.length-2,0,new o].concat(i)):(r.push(new o),r=r.concat(i)),r},backgroundBasedTheme:s,rendererOptionsProvider:a,getBackgroundColor:l};this._onLabelHovered=new e,this._lhsStubContainer=new b(this._properties,w.LHS,u,d,this._options.priceAxisLabelsOptions),this._lhsStubContainer.onLabelHovered().subscribe(this,function(e,t){this._onLabelHovered.fire(e,t)}.bind(this)),this._rhsStubContainer=new b(this._properties,w.RHS,u,d,this._options.priceAxisLabelsOptions),this._rhsStubContainer.onLabelHovered().subscribe(this,function(e,t){this._onLabelHovered.fire(e,t)}.bind(this)),this._element.appendChild(this._lhsStubContainer.getElement()),this._cell=document.createElement("td"),this._element.appendChild(this._cell),this._cell.classList.add("chart-markup-table","time-axis"),this._cell.style.height="25px",this._dv=document.createElement("div"),this._dv.style.width="100%",this._dv.style.height="100%",this._dv.style.position="relative",this._dv.style.overflow="hidden",this._cell.appendChild(this._dv),this._canvasConfiguredHandler=function(){this.chart.model().model().lightUpdate()}.bind(this),this._canvasBinding=c(this._dv,new _(16,16)),this._canvasBinding.subscribeCanvasConfigured(this._canvasConfiguredHandler);var p=this._canvasBinding.canvas;p.style.position="absolute",p.style.zIndex="1",p.style.left="0",p.style.top="0",this._topCanvasConfiguredHandler=function(){this.chart.model().model().lightUpdate()}.bind(this),this._topCanvasBinding=c(this._dv,new _(16,16)),this._topCanvasBinding.subscribeCanvasConfigured(this._topCanvasConfiguredHandler);var f=this._topCanvasBinding.canvas;f.style.position="absolute",f.style.zIndex="2",f.style.left="0",f.style.top="0",
this._element.appendChild(this._rhsStubContainer.getElement()),this.restoreDefaultCursor(),this.update(),this._minVisibleSpan=v.MINUTE_SPAN,this._mouseEventHandler=new m(this._topCanvasBinding.canvas,this,{treatVertTouchDragAsPageScroll:!0,treatHorzTouchDragAsPageScroll:!1}),this.size=new _(0,0)}T.prototype.destroy=function(){this._mouseEventHandler.destroy(),this._topCanvasBinding.unsubscribeCanvasConfigured(this._topCanvasConfiguredHandler),this._topCanvasBinding.destroy(),this._canvasBinding.unsubscribeCanvasConfigured(this._canvasConfiguredHandler),this._canvasBinding.destroy(),this._rhsStubContainer.onLabelHovered().unsubscribeAll(this),this._lhsStubContainer.onLabelHovered().unsubscribeAll(this),this._lhsStubContainer.destroy(),this._rhsStubContainer.destroy(),this.chart.properties().paneProperties.background.unsubscribeAll(this)},T.prototype.getElement=function(){return this._element},T.prototype.hasCanvas=function(e){return this._canvasBinding.canvas===e||this._topCanvasBinding.canvas===e},T.prototype._BORDER_SIZE=1,T.prototype._OFFSET_SIZE=1,T.prototype._TICK_LENGTH=3,T.prototype.onLabelHovered=function(){return this._onLabelHovered},T.prototype.backgroundColor=function(){return this.chart.model().model().backgroundColor().value()},T.prototype.lineColor=function(){return this._properties.lineColor.value()},T.prototype.textColor=function(){return this._properties.textColor.value()},T.prototype.fontSize=function(){return this._properties.fontSize.value()},T.prototype.baseFont=function(){return g(this.fontSize(),C,"")},T.prototype.baseBoldFont=function(){return g(this.fontSize(),C,"bold")},T.prototype.rendererOptions=function(){this._rendererOptions||(this._rendererOptions={borderSize:this._BORDER_SIZE,offsetSize:this._OFFSET_SIZE,tickLength:this._TICK_LENGTH,fontSize:NaN,font:"",widthCache:new n});var e=this._rendererOptions;if(e.fontSize!==this.fontSize()){var t=this.fontSize();e.fontSize=t,e.font=this.baseFont(),e.font=g(this.fontSize(),C,""),e.paddingTop=Math.ceil(t/2.5),e.paddingBottom=e.paddingTop,e.paddingHorizontal=Math.ceil(t/2),e.baselineOffset=Math.round(this.fontSize()/5),e.widthCache.reset()}return this._rendererOptions},T.prototype._zoomAvailable=function(){return!this.chart.model().timeScale().isEmpty()&&this.chart.model().model().zoomEnabled()&&this._options.pressedMouseMoveScale},T.prototype.mouseDownEvent=function(e){if(this._mousedown||!this._zoomAvailable())return!0;this._mousedown=!0;var t=this.chart.model();t.timeScale().isEmpty()||t.startScaleTime(e.localX)},T.prototype.mouseDownOutsideEvent=function(e){this._zoomAvailable()&&this._mousedown&&(this._mousedown=!1,this.chart.model().endScaleTime(),this.restoreDefaultCursor())},T.prototype.pressedMouseMoveEvent=function(e){if(this._zoomAvailable()){var t=this.chart.model(),i=!1,r=(new Date).valueOf();if(this._lastScrollScaleTime)r-this._lastScrollScaleTime<100&&(i=!0);i||(t.scaleTimeTo(e.localX),this._lastScrollScaleTime=r)}},T.prototype.mouseUpEvent=function(e){this._zoomAvailable()&&(this._mousedown=!1,this.chart.model().endScaleTime(),
this.restoreDefaultCursor())},T.prototype.contextMenuEvent=function(e){this._options.contextMenuEnabled&&this._createContextMenu().then((function(t){t.show(e)}))},T.prototype.mouseEnterEvent=function(e){this.chart.model().model().zoomEnabled()&&this.setCursor("ew-resize")},T.prototype.mouseLeaveEvent=function(e){this.restoreDefaultCursor()},T.prototype._createContextMenu=function(){return s.createMenu(this.getContextMenuActions(),{statName:"TimeScaleContextMenu"})},T.prototype.getContextMenuActions=function(e){var t=this.chart;t.updateActions();var i=t.actions(),n=[];return e||n.push(i.timeScaleReset,new o),this._options.timezoneMenuEnabled&&n.push(i.applyTimeZone),n.push(i.sessionBreaks),r.enabled("charting_library_base")||n.push(i.extendedHours),n},T.prototype.mouseClickEvent=function(e){},T.prototype.mouseDoubleClickEvent=function(e){y("GUI","Double click time scale"),this.chart.model().resetTimeScale()},T.prototype.optimalHeight=function(){var e=this.rendererOptions();return Math.ceil(e.offsetSize+e.borderSize+e.tickLength+e.fontSize+e.paddingTop+e.paddingBottom)},T.prototype.setSizes=function(e,t,i){this.size&&this.size.equals(e)||(this.size=e,this._canvasBinding.resizeCanvas({width:e.w,height:e.h}),this._topCanvasBinding.resizeCanvas({width:e.w,height:e.h}),this._cell.style.width=e.w+"px",this._cell.style.height=e.h+"px"),this._lhsStubContainer.setSizes(e.h,t),this._rhsStubContainer.setSizes(e.h,i)},T.prototype._spanIndex=function(e){for(var t=[v.MINUTE_SPAN,v.HOUR_SPAN,v.DAY_SPAN,v.MONTH_SPAN,v.YEAR_SPAN],i=t.length-1;i>0;){if(t[i]<=e)return i;i--}return i},T.prototype._spanOffset=function(e,t){if(t0&&this._hightlightBackground(e,r,t)}var n=i.model().crossHairSource();n.startMeasurePoint()&&this._hightlightBackground(e,n.measurePoints(),t)}},T.prototype.drawTickMarks=function(e,t){var i=this.chart.model().timeScale().marks();if(i&&0!==i.length){var r=i.reduce((function(e,t){return e.span>t.span?e:t}),i[0]).span;r>30&&r<40&&(r=30),e.save(),e.strokeStyle=this.lineColor()
;var n=this.rendererOptions(),o=n.borderSize+n.tickLength+n.paddingTop+n.fontSize-n.baselineOffset;e.textAlign="center",e.fillStyle=this.lineColor();var s=Math.max(1,Math.floor(t)),a=Math.floor(.5*t),l=Math.round(n.tickLength*t);e.beginPath();for(var c=i.length;c--;){var u=Math.round(i[c].coord*t);e.rect(u-a,0,s,l)}e.fill(),e.fillStyle=this.textColor();var d=this;h(e,t,(function(){e.font=d.baseFont();for(var t=0;t=r&&e.fillText(n.label,n.coord,o)}})),e.restore()}},T.prototype.drawBackLabels=function(e,t){e.save();var i=new Set,r=this.chart.model(),n=r.dataSources();r.selection().sources().forEach((function(e){i.add(e)})),r.hoveredSource()&&i.add(r.hoveredSource()),r.sourcesBeingMoved().forEach((function(e){i.add(e)}));var o=r.lineBeingEdited()||r.lineBeingCreated();o&&i.add(o),i.add(this.chart.model().crossHairSource()),n=n.concat(r.model().customSources());for(var s=this.rendererOptions(),a=0;a=s)&&(r={value:s,view:o})}}})),i.view&&t.push(i.view),r.view&&t.push(r.view),t},T.prototype._addViewsOrMaxMin=function(e,t){e.length<=1?e.forEach((function(e){if(e.timeAxisViews){var i=e.timeAxisViews();i&&i.length&&t.push(i)}})):t.push(this._minMaxViews(e))},T.prototype.drawCrossHairLabel=function(e,t){e.save(),e.clearRect(0,0,Math.ceil(this.size.w*t)+1,Math.ceil(this.size.h*t)+1);var i,r=this.chart.model(),n=[],o=r.lineBeingEdited()||r.lineBeingCreated();o&&o.timeAxisViews&&((i=o.timeAxisViews())&&i.length&&n.push(i));(this._addViewsOrMaxMin(r.sourcesBeingMoved(),n),this._addViewsOrMaxMin(r.selection().sources(),n),r.hoveredSource()&&!r.selection().isSelected(r.hoveredSource()))&&(r.hoveredSource().timeAxisViews&&(i=r.hoveredSource().timeAxisViews())&&i.length&&n.push(i));(i=r.crossHairSource().timeAxisViews())&&i.length&&n.push(i);var s=this.rendererOptions();n.forEach((function(i){i.forEach((function(i){e.save(),i.renderer().draw(e,s,t),e.restore()}))})),e.restore()},T.prototype.hardResetCanvas=function(){this.size&&(d(this._canvasBinding,this.size),d(this._topCanvasBinding,this.size))},T.prototype.paint=function(e){if(0!==e)if(e!==a.Cursor){var t=u(this._canvasBinding.canvas),i=this._canvasBinding.pixelRatio;if(this.drawBackground(t,i),this.chart.model()){this.drawTickMarks(t,i),this.drawBackLabels(t,i),this.chart.model().crossHairSource().updateAllViews();r=u(this._topCanvasBinding.canvas);this.drawCrossHairLabel(r,i)}this._lhsStubContainer.paint(e),this._rhsStubContainer.paint(e)}else{var r=u(this._topCanvasBinding.canvas)
-;this.drawCrossHairLabel(r,this._topCanvasBinding.pixelRatio)}},T.prototype.restoreDefaultCursor=function(){this.setCursor("")},T.prototype.setCursor=function(e){var t="";"grabbing"!==e&&"ew-resize"!==e||(t="time-axis--cursor-"+e),this._currentCursorClassName!==t&&(this._currentCursorClassName&&this._cell.classList.remove(this._currentCursorClassName),t&&this._cell.classList.add(t),this._currentCursorClassName=t,this._cell.style.cursor)},T.prototype.updatePriceAxisStubs=function(){var e=this.chart.model().model(),t=this.chart.isMaximizedPane()?this.chart.maximizedPaneWidget().state():e.paneForSource(e.mainSeries());if(t){var i=e.priceScaleSlotsCount();this._lhsStubContainer.setScales([],i.left,t.leftPriceScales().length,i.left+i.right),this._rhsStubContainer.setScales([],i.right,t.rightPriceScales().length,i.left+i.right)}},T.prototype.getScreenshotData=function(){var e={};return e.content=this._canvasBinding.canvas.toDataURL(),e.canvas=this._canvasBinding.canvas,e.contentWidth=this.size.w,e.contentHeight=this.size.h,e.lhsStub=this._lhsStubContainer.getScreenshotData(),e.rhsStub=this._rhsStubContainer.getScreenshotData(),e},t.TimeAxisWidget=T}).call(this,i("aIyQ"),i("Kxc7"))},"uXw/":function(e,t,i){"use strict";(function(t){var r=i("IiTo"),n=i("LxhU").Interval,o=i("Y7w9").lowerbound,s=i("aIyQ"),a=function(){var e={},a=new Map,l=null,c=new s,u="undefined"!=typeof window?window:t,h=i("ocLq"),d=u.PineJsCalendar?u.PineJsCalendar:i("jCNj");function p(e,t){var i=new r.SessionInfo(e.timezone,e.session,e.holidays,e.corrections);return h.Symbol.newBarBuilder(t,i,i)}function f(){a.forEach((function(t,i){var r=t.symbol,n=t.symbolInfo,o=t.pointsets,s=r;e.hasOwnProperty(s)||(e[s]=[]);var a=function(e,t,i){for(var r=0,n=null,o=0;o0){var c=t.getOffsetSinceLastRealBar(e,l[0],l[1]);c>r&&(r=c,n=l)}}return n}(n,i,o);null!==a&&i.ready()&&i.ensureExtrapolatedTo(n,a[0],a[1]);for(var l=0;l=o)return 0;var u=y(e,a,l,i,o);if(u>=1e3)return u;return s.findDistanceInBars(i,o,e)}(s,a,t,e[0].value[0]/1e3,i);var l=o(e,1e3*t,(function(e,t){return e.value[0]4*(7-i.spec.weekEndsCount())){h=_/7*(7-i.spec.weekEndsCount())}else{for(var m=0,y={},g=p;g.valueOf()<=f.valueOf();g=d.add_days_considering_dst(i.timezone,g,1)){void 0===y[S=d.get_day_of_week(g)]&&(y[S]=i.spec.isWeekEnd(S)),y[S]&&m++}h=_-m}if(t.isDays())o=Math.ceil(h/t.multiplier());else{var v=t.isSeconds()?t.multiplier():60*t.multiplier();if(_<1)if(i.spec.findSession(i.spec.getWeekIndex(p),d.get_day_of_week(p),d.get_minutes_from_midnight(p)).getEntry()===i.spec.findSession(i.spec.getWeekIndex(f),d.get_day_of_week(f),d.get_minutes_from_midnight(f)).getEntry())return Math.ceil((n-r)/v);var S=i.spec.entries()[0].dayOfWeek(),b=60*i.spec.entries().reduce((function(e,t){return e+(t.dayOfWeek()===S?t.length():0)}),0);o=Math.ceil(h*b/v)}}return o}return{createPointset:function(e,t,i,r,n,o){var s={guid:e,points:i},c=a.get(r);void 0===c&&(c={symbol:t,symbolInfo:n,session:o,pointsets:[]},a.set(r,c)),c.pointsets.push(s),null===l&&(l=setTimeout(f,0))},removePointset:function(t){var i=[];a.forEach((function(e,r){for(var n=e.pointsets,o=0;o0;)this.removeProperty(this._childs[0]);this._initValues=[];for(var t=0;tl&&t0){var c=t.getOffsetSinceLastRealBar(e,l[0],l[1]);c>r&&(r=c,n=l)}}return n}(n,i,o);null!==a&&i.ready()&&i.ensureExtrapolatedTo(n,a[0],a[1]);for(var l=0;l=o)return 0;var c=new r.SessionInfo(e.timezone,e.session,e.holidays,e.corrections),u=_(e,a,c,i,o);if(u>=1e3)return u;return s.findDistanceInBars(i,o,e)}(s,a,t,e[0].value[0]/1e3,i);var l=o(e,1e3*t,(function(e,t){return e.value[0]4*(7-i.spec.weekEndsCount())){d=_/7*(7-i.spec.weekEndsCount())}else{for(var m=0,y={},g=p;g.valueOf()<=f.valueOf();g=h.add_days_considering_dst(i.timezone,g,1)){void 0===y[S=h.get_day_of_week(g)]&&(y[S]=i.spec.isWeekEnd(S)),y[S]&&m++}d=_-m}if(t.isDays())o=Math.ceil(d/t.multiplier());else{var v=t.isSeconds()?t.multiplier():60*t.multiplier();if(_<1)if(i.spec.findSession(i.spec.getWeekIndex(p),h.get_day_of_week(p),h.get_minutes_from_midnight(p)).getEntry()===i.spec.findSession(i.spec.getWeekIndex(f),h.get_day_of_week(f),h.get_minutes_from_midnight(f)).getEntry())return Math.ceil((n-r)/v);var S=i.spec.entries()[0].dayOfWeek(),b=60*i.spec.entries().reduce((function(e,t){return e+(t.dayOfWeek()===S?t.length():0)}),0);o=Math.ceil(d*b/v)}}return o}function m(e,t,i){var n=r.createAligner(t,i);return null!==n&&(e=e.map((function(e){return n.alignTimeIfPossible(1e3*e)/1e3}))),e}return{createPointset:function(e,t,i,r,n,o){var s={guid:e,points:i},c=a.get(r);void 0===c&&(c={symbol:t,symbolInfo:n,session:o,pointsets:[]},a.set(r,c)),c.pointsets.push(s),null===l&&(l=setTimeout(d,0))},removePointset:function(t){var i=[];a.forEach((function(e,r){for(var n=e.pointsets,o=0;o0;)this.removeProperty(this._childs[0]);this._initValues=[];for(var t=0;tl&&t1?u(e[n],t.slice(1),i):(e[n]&&e[n].setValue?e[n].setValue(i):e[n]=i,!0))}function h(e){i||p.logWarn("Path `"+e+"` does not exist.")}}function y(e,t,i,r){window.__defaultsOverrides&&m(e,t,i,window.__defaultsOverrides,r)}
diff --git a/charting_library/charting_library.js b/charting_library/charting_library.js
index 5ced6d49..4e0c16fc 100644
--- a/charting_library/charting_library.js
+++ b/charting_library/charting_library.js
@@ -1 +1 @@
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.TradingView={})}(this,(function(t){"use strict";var e=function(){return(e=Object.assign||function(t){for(var e,o=arguments,n=1,i=arguments.length;n'},t}();window.TradingView=window.TradingView||{},window.TradingView.version=r,t.version=r,t.widget=s,Object.defineProperty(t,"__esModule",{value:!0})}));
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.TradingView={})}(this,(function(t){"use strict";var e=function(){return(e=Object.assign||function(t){for(var e,o=arguments,n=1,i=arguments.length;n'},t}();window.TradingView=window.TradingView||{},window.TradingView.version=r,t.version=r,t.widget=s,Object.defineProperty(t,"__esModule",{value:!0})}));
diff --git a/charting_library/cs-tv-chart.635204e2.html b/charting_library/cs-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/cs-tv-chart.635204e2.html
rename to charting_library/cs-tv-chart.5542ccdd.html
index 674049e4..c7611fc1 100644
--- a/charting_library/cs-tv-chart.635204e2.html
+++ b/charting_library/cs-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/da_DK-tv-chart.635204e2.html b/charting_library/da_DK-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/da_DK-tv-chart.635204e2.html
rename to charting_library/da_DK-tv-chart.5542ccdd.html
index 92375e3d..e9c316a2 100644
--- a/charting_library/da_DK-tv-chart.635204e2.html
+++ b/charting_library/da_DK-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/de-tv-chart.635204e2.html b/charting_library/de-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/de-tv-chart.635204e2.html
rename to charting_library/de-tv-chart.5542ccdd.html
index 30dbdc7b..2ee039e8 100644
--- a/charting_library/de-tv-chart.635204e2.html
+++ b/charting_library/de-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/el-tv-chart.635204e2.html b/charting_library/el-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/el-tv-chart.635204e2.html
rename to charting_library/el-tv-chart.5542ccdd.html
index 0093181c..708fd742 100644
--- a/charting_library/el-tv-chart.635204e2.html
+++ b/charting_library/el-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/en-tv-chart.635204e2.html b/charting_library/en-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/en-tv-chart.635204e2.html
rename to charting_library/en-tv-chart.5542ccdd.html
index a8df6fcb..2325334a 100644
--- a/charting_library/en-tv-chart.635204e2.html
+++ b/charting_library/en-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/es-tv-chart.635204e2.html b/charting_library/es-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/es-tv-chart.635204e2.html
rename to charting_library/es-tv-chart.5542ccdd.html
index d7cee272..e589f7cf 100644
--- a/charting_library/es-tv-chart.635204e2.html
+++ b/charting_library/es-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/et_EE-tv-chart.635204e2.html b/charting_library/et_EE-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/et_EE-tv-chart.635204e2.html
rename to charting_library/et_EE-tv-chart.5542ccdd.html
index 3b4136db..1b935eee 100644
--- a/charting_library/et_EE-tv-chart.635204e2.html
+++ b/charting_library/et_EE-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/fa-tv-chart.635204e2.html b/charting_library/fa-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/fa-tv-chart.635204e2.html
rename to charting_library/fa-tv-chart.5542ccdd.html
index 8fb67381..fdfb3e4d 100644
--- a/charting_library/fa-tv-chart.635204e2.html
+++ b/charting_library/fa-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/fr-tv-chart.635204e2.html b/charting_library/fr-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/fr-tv-chart.635204e2.html
rename to charting_library/fr-tv-chart.5542ccdd.html
index 1b0baeca..ed9184e3 100644
--- a/charting_library/fr-tv-chart.635204e2.html
+++ b/charting_library/fr-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/he_IL-tv-chart.635204e2.html b/charting_library/he_IL-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/he_IL-tv-chart.635204e2.html
rename to charting_library/he_IL-tv-chart.5542ccdd.html
index 01fecff6..24a1dd46 100644
--- a/charting_library/he_IL-tv-chart.635204e2.html
+++ b/charting_library/he_IL-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/hu_HU-tv-chart.635204e2.html b/charting_library/hu_HU-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/hu_HU-tv-chart.635204e2.html
rename to charting_library/hu_HU-tv-chart.5542ccdd.html
index bd560bb9..642d0e77 100644
--- a/charting_library/hu_HU-tv-chart.635204e2.html
+++ b/charting_library/hu_HU-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/id_ID-tv-chart.635204e2.html b/charting_library/id_ID-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/id_ID-tv-chart.635204e2.html
rename to charting_library/id_ID-tv-chart.5542ccdd.html
index 6ef7cf5c..c79640bb 100644
--- a/charting_library/id_ID-tv-chart.635204e2.html
+++ b/charting_library/id_ID-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/it-tv-chart.635204e2.html b/charting_library/it-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/it-tv-chart.635204e2.html
rename to charting_library/it-tv-chart.5542ccdd.html
index 96bca7a0..e2f10eb8 100644
--- a/charting_library/it-tv-chart.635204e2.html
+++ b/charting_library/it-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/ja-tv-chart.635204e2.html b/charting_library/ja-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/ja-tv-chart.635204e2.html
rename to charting_library/ja-tv-chart.5542ccdd.html
index cae85965..aeb209f0 100644
--- a/charting_library/ja-tv-chart.635204e2.html
+++ b/charting_library/ja-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/ko-tv-chart.635204e2.html b/charting_library/ko-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/ko-tv-chart.635204e2.html
rename to charting_library/ko-tv-chart.5542ccdd.html
index 4698d023..d2d98ea9 100644
--- a/charting_library/ko-tv-chart.635204e2.html
+++ b/charting_library/ko-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/ms_MY-tv-chart.635204e2.html b/charting_library/ms_MY-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/ms_MY-tv-chart.635204e2.html
rename to charting_library/ms_MY-tv-chart.5542ccdd.html
index 5652061a..a0006f9f 100644
--- a/charting_library/ms_MY-tv-chart.635204e2.html
+++ b/charting_library/ms_MY-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/nl_NL-tv-chart.635204e2.html b/charting_library/nl_NL-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/nl_NL-tv-chart.635204e2.html
rename to charting_library/nl_NL-tv-chart.5542ccdd.html
index 26a370f9..8afa773e 100644
--- a/charting_library/nl_NL-tv-chart.635204e2.html
+++ b/charting_library/nl_NL-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/no-tv-chart.635204e2.html b/charting_library/no-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/no-tv-chart.635204e2.html
rename to charting_library/no-tv-chart.5542ccdd.html
index e1889972..1f40419f 100644
--- a/charting_library/no-tv-chart.635204e2.html
+++ b/charting_library/no-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/pl-tv-chart.635204e2.html b/charting_library/pl-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/pl-tv-chart.635204e2.html
rename to charting_library/pl-tv-chart.5542ccdd.html
index 821c2d5d..539abd01 100644
--- a/charting_library/pl-tv-chart.635204e2.html
+++ b/charting_library/pl-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/pt-tv-chart.635204e2.html b/charting_library/pt-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/pt-tv-chart.635204e2.html
rename to charting_library/pt-tv-chart.5542ccdd.html
index 77e45f19..b04d584c 100644
--- a/charting_library/pt-tv-chart.635204e2.html
+++ b/charting_library/pt-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/ro-tv-chart.635204e2.html b/charting_library/ro-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/ro-tv-chart.635204e2.html
rename to charting_library/ro-tv-chart.5542ccdd.html
index 3cfe665d..cff0e7ec 100644
--- a/charting_library/ro-tv-chart.635204e2.html
+++ b/charting_library/ro-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/ru-tv-chart.635204e2.html b/charting_library/ru-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/ru-tv-chart.635204e2.html
rename to charting_library/ru-tv-chart.5542ccdd.html
index 14486298..7fd8a64d 100644
--- a/charting_library/ru-tv-chart.635204e2.html
+++ b/charting_library/ru-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/sk_SK-tv-chart.635204e2.html b/charting_library/sk_SK-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/sk_SK-tv-chart.635204e2.html
rename to charting_library/sk_SK-tv-chart.5542ccdd.html
index ea46ac26..3625f247 100644
--- a/charting_library/sk_SK-tv-chart.635204e2.html
+++ b/charting_library/sk_SK-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/sv-tv-chart.635204e2.html b/charting_library/sv-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/sv-tv-chart.635204e2.html
rename to charting_library/sv-tv-chart.5542ccdd.html
index 309c51dc..43112efa 100644
--- a/charting_library/sv-tv-chart.635204e2.html
+++ b/charting_library/sv-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/th-tv-chart.635204e2.html b/charting_library/th-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/th-tv-chart.635204e2.html
rename to charting_library/th-tv-chart.5542ccdd.html
index e39adb3a..78b3a2a6 100644
--- a/charting_library/th-tv-chart.635204e2.html
+++ b/charting_library/th-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/tr-tv-chart.635204e2.html b/charting_library/tr-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/tr-tv-chart.635204e2.html
rename to charting_library/tr-tv-chart.5542ccdd.html
index 25b6d14b..c66a017f 100644
--- a/charting_library/tr-tv-chart.635204e2.html
+++ b/charting_library/tr-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/vi-tv-chart.635204e2.html b/charting_library/vi-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/vi-tv-chart.635204e2.html
rename to charting_library/vi-tv-chart.5542ccdd.html
index 4ba45258..bc6c9330 100644
--- a/charting_library/vi-tv-chart.635204e2.html
+++ b/charting_library/vi-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/zh-tv-chart.635204e2.html b/charting_library/zh-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/zh-tv-chart.635204e2.html
rename to charting_library/zh-tv-chart.5542ccdd.html
index acda2008..6affb699 100644
--- a/charting_library/zh-tv-chart.635204e2.html
+++ b/charting_library/zh-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/charting_library/zh_TW-tv-chart.635204e2.html b/charting_library/zh_TW-tv-chart.5542ccdd.html
similarity index 99%
rename from charting_library/zh_TW-tv-chart.635204e2.html
rename to charting_library/zh_TW-tv-chart.5542ccdd.html
index 86c79a04..263447ad 100644
--- a/charting_library/zh_TW-tv-chart.635204e2.html
+++ b/charting_library/zh_TW-tv-chart.5542ccdd.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/datafeeds/udf/dist/bundle.js b/datafeeds/udf/dist/bundle.js
index e0a7dee5..3a77f9b8 100644
--- a/datafeeds/udf/dist/bundle.js
+++ b/datafeeds/udf/dist/bundle.js
@@ -1 +1 @@
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.Datafeeds={})}(this,function(e){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};var s=!1;function n(e){var t;s&&(t=new Date,console.log(t.toLocaleTimeString()+"."+t.getMilliseconds()+"> "+e))}function c(e){return void 0===e?"":"string"==typeof e?e:e.message}var i=(t.prototype.getBars=function(e,t,r,s){var o=this,i={symbol:e.ticker||"",resolution:t,from:r,to:s};return void 0!==e.currency_code&&(i.currencyCode=e.currency_code),new Promise(function(a,u){o._requester.sendRequest(o._datafeedUrl,"history",i).then(function(e){if("ok"===e.s||"no_data"===e.s){var t=[],r={noData:!1};if("no_data"===e.s)r.noData=!0,r.nextTime=e.nextTime;else for(var s=void 0!==e.v,o=void 0!==e.o,i=0;it.lastBarTime){if(r.length<2)throw new Error("Not enough bars in history for proper pulse update. Need at least 2.");r=r[r.length-2];t.listener(r)}t.lastBarTime=s.time,t.listener(s)}}}else n("DataPulseProvider: Data comes for already unsubscribed subscription #"+e)},o);function o(e,t){this._subscribers={},this._requestsPending=0,this._historyProvider=e,setInterval(this._updateData.bind(this),t)}var u=(l.prototype.subscribeQuotes=function(e,t,r,s){this._subscribers[s]={symbols:e,fastSymbols:t,listener:r},n("QuotesPulseProvider: subscribed quotes with #"+s)},l.prototype.unsubscribeQuotes=function(e){delete this._subscribers[e],n("QuotesPulseProvider: unsubscribed quotes with #"+e)},l.prototype._updateQuotes=function(s){var o=this;if(!(0 "+e))}function c(e){return void 0===e?"":"string"==typeof e?e:e.message}var i=(t.prototype.getBars=function(e,t,r,s){var o=this,i={symbol:e.ticker||"",resolution:t,from:r,to:s};return void 0!==e.currency_code&&(i.currencyCode=e.currency_code),new Promise(function(a,u){o._requester.sendRequest(o._datafeedUrl,"history",i).then(function(e){if("ok"===e.s||"no_data"===e.s){var t=[],r={noData:!1};if("no_data"===e.s)r.noData=!0,r.nextTime=e.nextTime;else for(var s=void 0!==e.v,o=void 0!==e.o,i=0;it.lastBarTime){if(r.length<2)throw new Error("Not enough bars in history for proper pulse update. Need at least 2.");r=r[r.length-2];t.listener(r)}t.lastBarTime=s.time,t.listener(s)}}}else n("DataPulseProvider: Data comes for already unsubscribed subscription #"+e)},o);function o(e,t){this._subscribers={},this._requestsPending=0,this._historyProvider=e,setInterval(this._updateData.bind(this),t)}var u=(l.prototype.subscribeQuotes=function(e,t,r,s){this._subscribers[s]={symbols:e,fastSymbols:t,listener:r},n("QuotesPulseProvider: subscribed quotes with #"+s)},l.prototype.unsubscribeQuotes=function(e){delete this._subscribers[e],n("QuotesPulseProvider: unsubscribed quotes with #"+e)},l.prototype._updateQuotes=function(s){var o=this;if(!(0