Release v20.035 (from 64d1f18e)

Fixes tradingview/charting_library#6404
This commit is contained in:
jenkins@nwork.local
2022-01-25 15:12:43 +00:00
parent 44357813b0
commit 155a6d93bf
36 changed files with 54 additions and 54 deletions

View File

@@ -157,24 +157,24 @@ time:[-2366755200,-1691881200,-1680566400,-927507600,-85725e4,-844552800,-828219
const t=Object.assign({},this._initialPriceScaleState);return delete t.m_isLockScale,delete t.id,delete t.m_topMargin,delete t.m_bottomMargin,t}_originalPriceScaleState(){return this._initialPriceScaleState}}},"4TVt":function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolPriceAxisView",(function(){return n}));var s=i("Eyy1"),r=i("KcY8");class n extends r.a{constructor(e,t){super(),this._active=!1,this._source=e,this._data=t}setActive(e){this._active=e}_updateRendererData(e,t,i){e.visible=!1;const s=this._source.model();if(!s.timeScale()||s.timeScale().isEmpty())return;const r=this._source.priceScale();if(null===r||r.isEmpty())return;if(!s.selection().isSelected(this._source)&&!this._source.isForcedDrawPriceAxisLabel())return;if(null===s.timeScale().visibleBarsStrictRange())return;const n=this._source.priceAxisPoints(),o=this._data.pointIndex;if(n.length<=o)return;const a=n[o];if(!isFinite(a.price))return;const l=this._source.ownerSource(),c=null!==l?l.firstValue():null;if(null===c)return;let h=this._active?"#1565C0":s.isDark()?"#1E88E5":"#2196F3";this._data.backgroundProperty?h=this._data.backgroundProperty.value():this._data.backgroundPropertyGetter&&(h=this._data.backgroundPropertyGetter()),i.background=h,i.borderColor="#2E84A6",i.textColor=this.generateTextColor(h),i.coordinate=r.priceToCoordinate(a.price,c),e.text=this._formatPrice(a.price,c),e.visible=!0}_formatPrice(e,t){return Object(s.ensureNotNull)(this._source.priceScale()).formatPrice(e,t)}}},"4bfY":function(e,t,i){"use strict";var s=i("Ss5c").LineDataSource,r=i("5rJj"),n=i("j3hX"),o=n.LineToolWidthsProperty,a=n.LineToolColorsProperty;class l extends s{constructor(e,t){super(e,t||l.createProperties()),i.e("lt-pane-views").then(i.t.bind(null,"FzRY",7)).then(({FibCirclesPaneView:e})=>{this._setPaneViews([new e(this,this._model)])})}levelsCount(){return l.LevelsCount}pointsCount(){return 2}name(){return"Fib Circles"}processErase(e,t){var i="level"+t,s=this.properties()[i].visible;e.setProperty(s,!1,"Erase level line")}static createProperties(e){var t=new r("linetoolfibcircles",e,!1,{range:[1,11]});return l._configureProperties(t),t}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(33),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"6U6r"))).FibCirclesDefinitionsViewModel}static _configureProperties(e){s._configureProperties(e);for(var t=[e.child("trendline").child("linewidth")],i=[e.child("trendline").child("color")],r=1;r<=l.LevelsCount;r++)t.push(e.child("level"+r).child("linewidth")),i.push(e.child("level"+r).child("color"));e.addChild("linesColors",new a(i)),e.addChild("linesWidths",new o(t))}}l.LevelsCount=11,t.LineToolFibCircles=l},"4kQX":function(e,t,i){"use strict";i.r(t),i.d(t,"TimeFormatter",(function(){return r}));var s=i("kcTO");class r{constructor(e){this._formatStr=e||"%h:%m:%s"}format(e){ const t=Object.assign({},this._initialPriceScaleState);return delete t.m_isLockScale,delete t.id,delete t.m_topMargin,delete t.m_bottomMargin,t}_originalPriceScaleState(){return this._initialPriceScaleState}}},"4TVt":function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolPriceAxisView",(function(){return n}));var s=i("Eyy1"),r=i("KcY8");class n extends r.a{constructor(e,t){super(),this._active=!1,this._source=e,this._data=t}setActive(e){this._active=e}_updateRendererData(e,t,i){e.visible=!1;const s=this._source.model();if(!s.timeScale()||s.timeScale().isEmpty())return;const r=this._source.priceScale();if(null===r||r.isEmpty())return;if(!s.selection().isSelected(this._source)&&!this._source.isForcedDrawPriceAxisLabel())return;if(null===s.timeScale().visibleBarsStrictRange())return;const n=this._source.priceAxisPoints(),o=this._data.pointIndex;if(n.length<=o)return;const a=n[o];if(!isFinite(a.price))return;const l=this._source.ownerSource(),c=null!==l?l.firstValue():null;if(null===c)return;let h=this._active?"#1565C0":s.isDark()?"#1E88E5":"#2196F3";this._data.backgroundProperty?h=this._data.backgroundProperty.value():this._data.backgroundPropertyGetter&&(h=this._data.backgroundPropertyGetter()),i.background=h,i.borderColor="#2E84A6",i.textColor=this.generateTextColor(h),i.coordinate=r.priceToCoordinate(a.price,c),e.text=this._formatPrice(a.price,c),e.visible=!0}_formatPrice(e,t){return Object(s.ensureNotNull)(this._source.priceScale()).formatPrice(e,t)}}},"4bfY":function(e,t,i){"use strict";var s=i("Ss5c").LineDataSource,r=i("5rJj"),n=i("j3hX"),o=n.LineToolWidthsProperty,a=n.LineToolColorsProperty;class l extends s{constructor(e,t){super(e,t||l.createProperties()),i.e("lt-pane-views").then(i.t.bind(null,"FzRY",7)).then(({FibCirclesPaneView:e})=>{this._setPaneViews([new e(this,this._model)])})}levelsCount(){return l.LevelsCount}pointsCount(){return 2}name(){return"Fib Circles"}processErase(e,t){var i="level"+t,s=this.properties()[i].visible;e.setProperty(s,!1,"Erase level line")}static createProperties(e){var t=new r("linetoolfibcircles",e,!1,{range:[1,11]});return l._configureProperties(t),t}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(33),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"6U6r"))).FibCirclesDefinitionsViewModel}static _configureProperties(e){s._configureProperties(e);for(var t=[e.child("trendline").child("linewidth")],i=[e.child("trendline").child("color")],r=1;r<=l.LevelsCount;r++)t.push(e.child("level"+r).child("linewidth")),i.push(e.child("level"+r).child("color"));e.addChild("linesColors",new a(i)),e.addChild("linesWidths",new o(t))}}l.LevelsCount=11,t.LineToolFibCircles=l},"4kQX":function(e,t,i){"use strict";i.r(t),i.d(t,"TimeFormatter",(function(){return r}));var s=i("kcTO");class r{constructor(e){this._formatStr=e||"%h:%m:%s"}format(e){
return s.customFormatters.timeFormatter?s.customFormatters.timeFormatter.format(e):this._formatStr.replace("%h",Object(s.numberToStringWithLeadingZero)(e.getUTCHours(),2)).replace("%m",Object(s.numberToStringWithLeadingZero)(e.getUTCMinutes(),2)).replace("%s",Object(s.numberToStringWithLeadingZero)(e.getUTCSeconds(),2))}formatLocal(e){return s.customFormatters.timeFormatter?s.customFormatters.timeFormatter.formatLocal?s.customFormatters.timeFormatter.formatLocal(e):s.customFormatters.timeFormatter.format(e):this._formatStr.replace("%h",Object(s.numberToStringWithLeadingZero)(e.getHours(),2)).replace("%m",Object(s.numberToStringWithLeadingZero)(e.getMinutes(),2)).replace("%s",Object(s.numberToStringWithLeadingZero)(e.getSeconds(),2))}}},"4miz":function(e,t,i){"use strict";i.d(t,"a",(function(){return s})),i.d(t,"b",(function(){return r}));class s{constructor(e,t){this._visible=!0,this._title=e,this._value=t}title(){return this._title}setTitle(e){this._title=e}text(){return this._value}value(){return this._value}setValue(e){this._value=e}visible(){return this._visible}setVisible(e){this._visible=e}color(){return this._color}setColor(e){this._color=e}}class r{constructor(){this._items=[],this._header="",this._title=""}header(){return this._header}title(){return this._title}items(){return this._items}update(){}}},"4o++":function(e,t,i){"use strict";var s;i.r(t),i.d(t,"MagnetMode",(function(){return s})),function(e){e[e.WeakMagnet=0]="WeakMagnet",e[e.StrongMagnet=1]="StrongMagnet"}(s||(s={}))},"4u8j":function(e,t,i){"use strict";var s=i("Ss5c").LineDataSource,r=i("5rJj"),n=i("j3hX"),o=n.LineToolWidthsProperty,a=n.LineToolColorsProperty;class l extends s{constructor(e,t){super(e,t||l.createProperties()),i.e("lt-pane-views").then(i.t.bind(null,"ZJWf",7)).then(({GannFanPaneView:e})=>{this._setPaneViews([new e(this,this._model)])})}levelsCount(){return l.LevelsCount}pointsCount(){return 2}name(){return"Gann Fan"}processErase(e,t){var i="level"+t,s=this.properties()[i].visible;e.setProperty(s,!1,"Erase level line")}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(33),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"ASG6"))).GannFanDefinitionsViewModel}static createProperties(e){var t=new r("linetoolgannfan",e,!1,{range:[1,9]});return l._configureProperties(t),t}static _configureProperties(e){s._configureProperties(e);for(var t=[],i=[],r=1;r<=l.LevelsCount;r++)t.push(e.child("level"+r).child("linewidth")),i.push(e.child("level"+r).child("color"));e.addChild("linesColors",new a(i)),e.addChild("linesWidths",new o(t))}}l.LevelsCount=9,t.LineToolGannFan=l},"4vW/":function(e,t,i){"use strict";var s;i.r(t),i.d(t,"ColorType",(function(){return s})),function(e){e.Solid="solid",e.Gradient="gradient"}(s||(s={}))},"54XG":function(e,t,i){"use strict";i.r(t),i.d(t,"FavoriteStudyTemplateService",(function(){return r}));var s=i("ulZB");class r extends s.b{constructor(e,t){super(e,t,"FAVORITE_STUDY_TEMPLATES_CHANGED","StudyTemplates.quicks",[])}remove(e){this.set(this.get().filter(t=>t!==e))}}}, return s.customFormatters.timeFormatter?s.customFormatters.timeFormatter.format(e):this._formatStr.replace("%h",Object(s.numberToStringWithLeadingZero)(e.getUTCHours(),2)).replace("%m",Object(s.numberToStringWithLeadingZero)(e.getUTCMinutes(),2)).replace("%s",Object(s.numberToStringWithLeadingZero)(e.getUTCSeconds(),2))}formatLocal(e){return s.customFormatters.timeFormatter?s.customFormatters.timeFormatter.formatLocal?s.customFormatters.timeFormatter.formatLocal(e):s.customFormatters.timeFormatter.format(e):this._formatStr.replace("%h",Object(s.numberToStringWithLeadingZero)(e.getHours(),2)).replace("%m",Object(s.numberToStringWithLeadingZero)(e.getMinutes(),2)).replace("%s",Object(s.numberToStringWithLeadingZero)(e.getSeconds(),2))}}},"4miz":function(e,t,i){"use strict";i.d(t,"a",(function(){return s})),i.d(t,"b",(function(){return r}));class s{constructor(e,t){this._visible=!0,this._title=e,this._value=t}title(){return this._title}setTitle(e){this._title=e}text(){return this._value}value(){return this._value}setValue(e){this._value=e}visible(){return this._visible}setVisible(e){this._visible=e}color(){return this._color}setColor(e){this._color=e}}class r{constructor(){this._items=[],this._header="",this._title=""}header(){return this._header}title(){return this._title}items(){return this._items}update(){}}},"4o++":function(e,t,i){"use strict";var s;i.r(t),i.d(t,"MagnetMode",(function(){return s})),function(e){e[e.WeakMagnet=0]="WeakMagnet",e[e.StrongMagnet=1]="StrongMagnet"}(s||(s={}))},"4u8j":function(e,t,i){"use strict";var s=i("Ss5c").LineDataSource,r=i("5rJj"),n=i("j3hX"),o=n.LineToolWidthsProperty,a=n.LineToolColorsProperty;class l extends s{constructor(e,t){super(e,t||l.createProperties()),i.e("lt-pane-views").then(i.t.bind(null,"ZJWf",7)).then(({GannFanPaneView:e})=>{this._setPaneViews([new e(this,this._model)])})}levelsCount(){return l.LevelsCount}pointsCount(){return 2}name(){return"Gann Fan"}processErase(e,t){var i="level"+t,s=this.properties()[i].visible;e.setProperty(s,!1,"Erase level line")}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(33),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"ASG6"))).GannFanDefinitionsViewModel}static createProperties(e){var t=new r("linetoolgannfan",e,!1,{range:[1,9]});return l._configureProperties(t),t}static _configureProperties(e){s._configureProperties(e);for(var t=[],i=[],r=1;r<=l.LevelsCount;r++)t.push(e.child("level"+r).child("linewidth")),i.push(e.child("level"+r).child("color"));e.addChild("linesColors",new a(i)),e.addChild("linesWidths",new o(t))}}l.LevelsCount=9,t.LineToolGannFan=l},"4vW/":function(e,t,i){"use strict";var s;i.r(t),i.d(t,"ColorType",(function(){return s})),function(e){e.Solid="solid",e.Gradient="gradient"}(s||(s={}))},"54XG":function(e,t,i){"use strict";i.r(t),i.d(t,"FavoriteStudyTemplateService",(function(){return r}));var s=i("ulZB");class r extends s.b{constructor(e,t){super(e,t,"FAVORITE_STUDY_TEMPLATES_CHANGED","StudyTemplates.quicks",[])}remove(e){this.set(this.get().filter(t=>t!==e))}}},
"55Xp":function(e,t,i){"use strict";function s(e){const t=e.toString(),i=t.split(".")[1];let s=2;if(i){const e=i.match(/^([0]+)/);e&&(s=e[1].length+1)}return parseFloat(t).toFixed(s)}i.r(t),i.d(t,"roundToFirstValuable",(function(){return s}))},"5B3K":function(e,t,i){"use strict";i.r(t),i.d(t,"StudyError",(function(){return s}));class s extends Error{constructor(e){super(e),this.studyError=!0}}},"5C6T":function(e,t,i){"use strict";i.r(t),i.d(t,"PipFormatter",(function(){return r}));var s=i("kcTO");class r extends s.PriceFormatter{constructor(e,t,i,s){t||(t=1),"forex"!==i&&"cfd"!==i||!s?(super(1),this._isForex=!1):(super(s),this._isForex=!0),this._pipPriceScale=e,this._pipMinMove=t,this._pipMinMove2=s}format(e,t,i){let s=this._isForex?this._pipMinMove2:this._pipMinMove;return void 0===s&&(s=NaN),super.format(e*this._pipPriceScale/s,t,i)}}},"5JMW":function(e,t,i){"use strict";i.r(t),i.d(t,"isLineToolRiskReward",(function(){return a})),i.d(t,"LineDataSourceApi",(function(){return c}));var s=i("Eyy1"),r=i("ogJP");const n=new Map([["LineToolRiskRewardLong",2],["LineToolRiskRewardShort",2],["LineToolBezierQuadro",3],["LineToolBezierCubic",4]]);function o(e){const t=n.get(e.toolname);if(void 0!==t)return t;const i=e.pointsCount();return-1===i?e.points().length:i}function a(e){return"LineToolRiskRewardLong"===e||"LineToolRiskRewardShort"===e}const l=["alwaysShowStats","entryPrice","interval","lastUpdateTime","points","snapTo45Degrees","stopPrice","symbol","targetPrice"];class c{constructor(e,t,i){this._source=e,this._model=t,this._pointsConverter=i}isSelectionEnabled(){return this._source.isSelectionEnabled()}setSelectionEnabled(e){this._source.setSelectionEnabled(e)}isSavingEnabled(){return this._source.isSavedInChart()}setSavingEnabled(e){this._source.setSavingInChartEnabled(e)}isShowInObjectsTreeEnabled(){return this._source.showInObjectTree()}setShowInObjectsTreeEnabled(e){this._source.setShowInObjectsTreeEnabled(e)}isUserEditEnabled(){return this._source.userEditEnabled()}setUserEditEnabled(e){this._source.setUserEditEnabled(e)}bringToFront(){this._model.bringToFront([this._source])}sendToBack(){this._model.sendToBack([this._source])}getProperties(){return this._source.properties().state(l,!0)}setProperties(e){this._setProps(this._source.properties(),e,"")}getPoints(){let e=this._source.points();const t=o(this._source);return e.length>t&&(Object(s.assert)(a(this._source.toolname)),e=e.slice(0,t)),this._pointsConverter.dataSourcePointsToPriced(e)}setPoints(e){if(this._source.isFixed())return;const t=o(this._source);if(t!==e.length)throw new Error(`Wrong points count. Required: ${t}, provided: ${e.length}`);const i=this._pointsConverter.apiPointsToDataSource(e);this._model.startChangingLinetool(this._source),this._model.changeLinePoints(this._source,i),this._model.endChangingLinetool(!0),this._source.createServerPoints()}changePoint(e,t){if(this._source.isFixed())return;const i=this._pointsConverter.apiPointsToDataSource([e])[0];this._model.startChangingLinetool(this._source,Object.assign({},i),t), "55Xp":function(e,t,i){"use strict";function s(e){const t=e.toString(),i=t.split(".")[1];let s=2;if(i){const e=i.match(/^([0]+)/);e&&(s=e[1].length+1)}return parseFloat(t).toFixed(s)}i.r(t),i.d(t,"roundToFirstValuable",(function(){return s}))},"5B3K":function(e,t,i){"use strict";i.r(t),i.d(t,"StudyError",(function(){return s}));class s extends Error{constructor(e){super(e),this.studyError=!0}}},"5C6T":function(e,t,i){"use strict";i.r(t),i.d(t,"PipFormatter",(function(){return r}));var s=i("kcTO");class r extends s.PriceFormatter{constructor(e,t,i,s){t||(t=1),"forex"!==i&&"cfd"!==i||!s?(super(1),this._isForex=!1):(super(s),this._isForex=!0),this._pipPriceScale=e,this._pipMinMove=t,this._pipMinMove2=s}format(e,t,i){let s=this._isForex?this._pipMinMove2:this._pipMinMove;return void 0===s&&(s=NaN),super.format(e*this._pipPriceScale/s,t,i)}}},"5JMW":function(e,t,i){"use strict";i.r(t),i.d(t,"isLineToolRiskReward",(function(){return a})),i.d(t,"LineDataSourceApi",(function(){return c}));var s=i("Eyy1"),r=i("ogJP");const n=new Map([["LineToolRiskRewardLong",2],["LineToolRiskRewardShort",2],["LineToolBezierQuadro",3],["LineToolBezierCubic",4]]);function o(e){const t=n.get(e.toolname);if(void 0!==t)return t;const i=e.pointsCount();return-1===i?e.points().length:i}function a(e){return"LineToolRiskRewardLong"===e||"LineToolRiskRewardShort"===e}const l=["alwaysShowStats","entryPrice","interval","lastUpdateTime","points","snapTo45Degrees","stopPrice","symbol","targetPrice"];class c{constructor(e,t,i){this._source=e,this._model=t,this._pointsConverter=i}isSelectionEnabled(){return this._source.isSelectionEnabled()}setSelectionEnabled(e){this._source.setSelectionEnabled(e)}isSavingEnabled(){return this._source.isSavedInChart()}setSavingEnabled(e){this._source.setSavingInChartEnabled(e)}isShowInObjectsTreeEnabled(){return this._source.showInObjectTree()}setShowInObjectsTreeEnabled(e){this._source.setShowInObjectsTreeEnabled(e)}isUserEditEnabled(){return this._source.userEditEnabled()}setUserEditEnabled(e){this._source.setUserEditEnabled(e)}bringToFront(){this._model.bringToFront([this._source])}sendToBack(){this._model.sendToBack([this._source])}getProperties(){return this._source.properties().state(l,!0)}setProperties(e){this._setProps(this._source.properties(),e,"")}getPoints(){let e=this._source.points();const t=o(this._source);return e.length>t&&(Object(s.assert)(a(this._source.toolname)),e=e.slice(0,t)),this._pointsConverter.dataSourcePointsToPriced(e)}setPoints(e){if(this._source.isFixed())return;const t=o(this._source);if(t!==e.length)throw new Error(`Wrong points count. Required: ${t}, provided: ${e.length}`);const i=this._pointsConverter.apiPointsToDataSource(e);this._model.startChangingLinetool(this._source),this._model.changeLinePoints(this._source,i),this._model.endChangingLinetool(!0),this._source.createServerPoints()}changePoint(e,t){if(this._source.isFixed())return;const i=this._pointsConverter.apiPointsToDataSource([e])[0];this._model.startChangingLinetool(this._source,Object.assign({},i),t),
this._model.changeLinePoint(Object.assign({},i)),this._model.endChangingLinetool(!1),this._source.createServerPoints()}isHidden(){return this._source.isSourceHidden()}getRawPoints(){return this._source.points()}setRawPoint(e,t){this._model.startChangingLinetool(this._source,Object.assign({},t),e),this._model.changeLinePoint(Object.assign({},t)),this._model.endChangingLinetool(!1)}move(e,t){this._model.startMovingSources([this._source],{logical:e},null,new Map),this._model.moveSources({logical:t},new Map),this._model.endMovingSources(!1)}dataAndViewsReady(){return this._source.dataAndViewsReady()}zorder(){return this._source.zorder()}_setProps(e,t,i){for(const s in t){if(!t.hasOwnProperty(s))continue;const n=0===i.length?s:`${i}.${s}`;if(e.hasOwnProperty(s)){const i=t[s];Object(r.isHashObject)(i)?this._setProps(e[s],i,n):e[s].setValue(i)}else console.warn(`Unknown property "${n}"`)}}}},"5VQP":function(e,t,i){"use strict";i.r(t),i.d(t,"ContextMenuManager",(function(){return s}));var s,r=i("tWVy");!function(e){const t=[];function s(){Object(r.b)()}e.createMenu=async function(e,r={},n){const o=new((await Promise.all([i.e("react"),i.e(7),i.e(16),i.e(18),i.e(20),i.e(47),i.e(63),i.e(0),i.e(4),i.e(55),i.e("context-menu-renderer")]).then(i.bind(null,"cbq4"))).ContextMenuRenderer)(e,r,()=>{const e=t.indexOf(o);-1!==e&&t.splice(e,1),void 0!==n&&n()},s);return t.push(o),o},e.hideAll=s,e.getShown=function(){for(let e=0;e<t.length;e++)if(t[e].isShown())return t[e];return null}}(s||(s={}))},"5ZUI":function(e,t,i){"use strict";var s=i("WPQD").LineToolTrendLine,r=i("Ocx9").DefaultProperty;class n extends s{constructor(e,t){super(e,t||n.createProperties())}name(){return"Ray"}static createProperties(e){var t=new r("linetoolray",e);return n._configureProperties(t),t}static _configureProperties(e){s._configureProperties(e)}}t.LineToolRay=n},"5fI3":function(e,t,i){"use strict";function s(e){return function(e){return"="+JSON.stringify(e)}(e)}function r(e){return"="===e[0]}function n(e){if(!r(e))return{symbol:e};try{return JSON.parse(e.slice(1))}catch(t){return{symbol:e}}}i.r(t),i.d(t,"encodeExtendedSymbolOrGetSimpleSymbolString",(function(){return s})),i.d(t,"isEncodedExtendedSymbol",(function(){return r})),i.d(t,"decodeExtendedSymbol",(function(){return n}))},"5mo2":function(e,t,i){"use strict";i.r(t);var s=i("jCNj"),r=i("Y7w9"),n=i("txPx"),o=i("OBgQ");const a=Object(n.getLogger)("Chart.Model.SessionSpec");function l(e){return e>=48&&e<=57}class c{constructor(){this.entries=[],this.firstDayOfWeek=s.MONDAY,this.weekEndsCount=-1}parseSessions(e,t){if(this._clear(),this.timezone=e,"24x7"===(t=this._parseFirstDayOfWeek(t)).toLowerCase())for(const s of u)this.entries.push(c._createSessionEntry(s,0,0,0,0));else{let e=!1;const i=new Map;for(const s of t.split("|")){const t=s.split(":");if(1!==t.length&&2!==t.length){a.logError("Bad session section: "+s);continue}const r=1===t.length;if(r){if(e){a.logError("Duplicated default section: "+s);continue}e=!0}const n=r?h:c._parseWorkingDays(t[1]);for(const e of n)r&&i.has(e)||i.set(e,t[0])} this._model.changeLinePoint(Object.assign({},i)),this._model.endChangingLinetool(!1),this._source.createServerPoints()}isHidden(){return this._source.isSourceHidden()}getRawPoints(){return this._source.points()}setRawPoint(e,t){this._model.startChangingLinetool(this._source,Object.assign({},t),e),this._model.changeLinePoint(Object.assign({},t)),this._model.endChangingLinetool(!1)}move(e,t){this._model.startMovingSources([this._source],{logical:e},null,new Map),this._model.moveSources({logical:t},new Map),this._model.endMovingSources(!1)}dataAndViewsReady(){return this._source.dataAndViewsReady()}zorder(){return this._source.zorder()}_setProps(e,t,i){for(const s in t){if(!t.hasOwnProperty(s))continue;const n=0===i.length?s:`${i}.${s}`;if(e.hasOwnProperty(s)){const i=t[s];Object(r.isHashObject)(i)?this._setProps(e[s],i,n):e[s].setValue(i)}else console.warn(`Unknown property "${n}"`)}}}},"5VQP":function(e,t,i){"use strict";i.r(t),i.d(t,"ContextMenuManager",(function(){return s}));var s,r=i("tWVy");!function(e){const t=[];function s(){Object(r.b)()}e.createMenu=async function(e,r={},n){const o=new((await Promise.all([i.e("react"),i.e(7),i.e(16),i.e(18),i.e(20),i.e(47),i.e(63),i.e(0),i.e(4),i.e(55),i.e("context-menu-renderer")]).then(i.bind(null,"cbq4"))).ContextMenuRenderer)(e,r,()=>{const e=t.indexOf(o);-1!==e&&t.splice(e,1),void 0!==n&&n()},s);return t.push(o),o},e.hideAll=s,e.getShown=function(){for(let e=0;e<t.length;e++)if(t[e].isShown())return t[e];return null}}(s||(s={}))},"5ZUI":function(e,t,i){"use strict";var s=i("WPQD").LineToolTrendLine,r=i("Ocx9").DefaultProperty;class n extends s{constructor(e,t){super(e,t||n.createProperties())}name(){return"Ray"}static createProperties(e){var t=new r("linetoolray",e);return n._configureProperties(t),t}static _configureProperties(e){s._configureProperties(e)}}t.LineToolRay=n},"5fI3":function(e,t,i){"use strict";function s(e){return function(e){return"="+JSON.stringify(e)}(e)}function r(e){return"="===e[0]}function n(e){if(!r(e))return{symbol:e};try{return JSON.parse(e.slice(1))}catch(t){return{symbol:e}}}i.r(t),i.d(t,"encodeExtendedSymbolOrGetSimpleSymbolString",(function(){return s})),i.d(t,"isEncodedExtendedSymbol",(function(){return r})),i.d(t,"decodeExtendedSymbol",(function(){return n}))},"5mo2":function(e,t,i){"use strict";i.r(t);var s=i("jCNj"),r=i("Y7w9"),n=i("txPx"),o=i("OBgQ");const a=Object(n.getLogger)("Chart.Model.SessionSpec");function l(e){return e>=48&&e<=57}class c{constructor(){this.entries=[],this.firstDayOfWeek=s.MONDAY,this.weekEndsCount=-1,this.maxTradingDayLength=0}parseSessions(e,t){var i;if(this._clear(),this.timezone=e,"24x7"===(t=this._parseFirstDayOfWeek(t)).toLowerCase())for(const r of u)this.entries.push(c._createSessionEntry(r,0,0,0,0));else{let e=!1;const i=new Map;for(const s of t.split("|")){const t=s.split(":");if(1!==t.length&&2!==t.length){a.logError("Bad session section: "+s);continue}const r=1===t.length;if(r){if(e){a.logError("Duplicated default section: "+s);continue}e=!0}const n=r?h:c._parseWorkingDays(t[1])
for(const t of u){const e=i.get(t);if(void 0!==e)for(const i of e.split(","))this.entries.push(c._parseSessionEntry(t,i))}}this.entries.sort(p);const i=new Set;for(const s of this.entries)i.add(s.dayOfWeek());this.weekEndsCount=7-i.size}static parseHolidaysAndCorrections(e,t,i){const r=new Map,n=new Map,o=e=>{const t=this._parseDay(e),i=t.toString(),s=n.get(i);return void 0!==s?s:(n.set(i,t),t)};if(""!==t){const e=[];for(const i of t.split(",")){if(8!==i.length)throw new Error("bad holiday date: "+i);const t=o(i);r.set(t,e)}}if(""===i)return r;const a=s.get_timezone("Etc/UTC");for(const l of i.split(";")){const e=l.split(":");if(2!==e.length)throw new Error("bad correction section: "+l);const t=[];if("dayoff"!==e[0])for(const i of e[0].split(","))t.push(this._parseSessionEntry(1,i));for(const i of e[1].split(",")){if(8!==i.length)throw new Error("bad correction date: "+i);const e=o(i),n=s.get_day_of_week(s.get_cal(a,e.year,e.month-1,e.day)),l=[];for(const i of t)l.push(new _(n,i.startOffset(),i.length()));r.set(e,l)}}return r}_clear(){this.entries=[],this.timezone="",this.firstDayOfWeek=s.MONDAY,this.weekEndsCount=-1}_parseFirstDayOfWeek(e){const t=e.split(";");if(t.length>2)return a.logError("Only one `first day` specification expected @ session "+e),e;if(1===t.length)return e;let i=1;let r=t[0].indexOf("-")>=0?NaN:parseInt(t[0]);return isNaN(r)&&(i=0,r=parseInt(t[1])),r<s.SUNDAY||r>s.SATURDAY?(a.logError(`Unexpected day index @ session: ${e}; day index ${r}`),e):(this.firstDayOfWeek=r,t[i])}static _parseDay(e){const t=parseInt(e.substring(0,4)),i=parseInt(e.substring(4,6)),s=parseInt(e.substring(6,8));return new o.a(t,i,s)}static _parseSessionEntry(e,t){let i=t.split("-");2!==i.length&&(a.logError("Bad sessions entry: "+t),i=["0000","0000"]);let s=0,r=i[0];if(r.includes("F")){const e=r.split("F");r=e[0],s=""!==e[1]?parseInt(e[1]):1}let n=0,o=i[1];if(o.includes("F")){const e=o.split("F");o=e[0],n=""!==e[1]?parseInt(e[1]):1}if(!this._isCorrectSession(r)||!this._isCorrectSession(o))throw new Error("Incorrect entry syntax: "+t);const l=r,h=o;return this._createSessionEntry(e,c._minutesFromHHMM(l),c._minutesFromHHMM(h),s,n)}static _isCorrectSession(e){return 4===e.length&&l(e.charCodeAt(0))&&l(e.charCodeAt(1))&&l(e.charCodeAt(2))&&l(e.charCodeAt(3))}static _parseWorkingDays(e){const t=[];for(let i=0;i<e.length;i++){const s=+e[i];-1===t.indexOf(s)&&t.push(s)}return t}static _minutesFromHHMM(e){return s.get_minutes_from_hhmm(e)}static _createSessionEntry(e,t,i,r,n){0===i&&(i=s.minutesPerDay),r===n&&i<=t&&(r+=1),r>0&&(t-=r*s.minutesPerDay),n>0&&(i-=n*s.minutesPerDay);return new _(e,t,i-t)}}i.d(t,"workingDays",(function(){return h})),i.d(t,"workingDaysAndWeekEnds",(function(){return u})),i.d(t,"compareSessionEntries",(function(){return p})),i.d(t,"SessionEntry",(function(){return _})),i.d(t,"EntryIndex",(function(){return m})),i.d(t,"SessionSpec",(function(){return g}));const h=[s.MONDAY,s.TUESDAY,s.WEDNESDAY,s.THURSDAY,s.FRIDAY],u=[s.SUNDAY,s.MONDAY,s.TUESDAY,s.WEDNESDAY,s.THURSDAY,s.FRIDAY,s.SATURDAY];function d(e,t){ ;for(const e of n)r&&i.has(e)||i.set(e,t[0])}for(const t of u){const e=i.get(t);if(void 0!==e)for(const i of e.split(","))this.entries.push(c._parseSessionEntry(t,i))}}this.entries.sort(p);const s=new Map;for(const r of this.entries){const e=r.dayOfWeek();s.set(e,r.length()+(null!==(i=s.get(e))&&void 0!==i?i:0))}this.maxTradingDayLength=0,s.forEach(e=>{this.maxTradingDayLength=Math.max(this.maxTradingDayLength,e)}),this.weekEndsCount=7-s.size}static parseHolidaysAndCorrections(e,t,i){const r=new Map,n=new Map,o=e=>{const t=this._parseDay(e),i=t.toString(),s=n.get(i);return void 0!==s?s:(n.set(i,t),t)};if(""!==t){const e=[];for(const i of t.split(",")){if(8!==i.length)throw new Error("bad holiday date: "+i);const t=o(i);r.set(t,e)}}if(""===i)return r;const a=s.get_timezone("Etc/UTC");for(const l of i.split(";")){const e=l.split(":");if(2!==e.length)throw new Error("bad correction section: "+l);const t=[];if("dayoff"!==e[0])for(const i of e[0].split(","))t.push(this._parseSessionEntry(1,i));for(const i of e[1].split(",")){if(8!==i.length)throw new Error("bad correction date: "+i);const e=o(i),n=s.get_day_of_week(s.get_cal(a,e.year,e.month-1,e.day)),l=[];for(const i of t)l.push(new _(n,i.startOffset(),i.length()));r.set(e,l)}}return r}_clear(){this.entries=[],this.timezone="",this.firstDayOfWeek=s.MONDAY,this.weekEndsCount=-1}_parseFirstDayOfWeek(e){const t=e.split(";");if(t.length>2)return a.logError("Only one `first day` specification expected @ session "+e),e;if(1===t.length)return e;let i=1;let r=t[0].indexOf("-")>=0?NaN:parseInt(t[0]);return isNaN(r)&&(i=0,r=parseInt(t[1])),r<s.SUNDAY||r>s.SATURDAY?(a.logError(`Unexpected day index @ session: ${e}; day index ${r}`),e):(this.firstDayOfWeek=r,t[i])}static _parseDay(e){const t=parseInt(e.substring(0,4)),i=parseInt(e.substring(4,6)),s=parseInt(e.substring(6,8));return new o.a(t,i,s)}static _parseSessionEntry(e,t){let i=t.split("-");2!==i.length&&(a.logError("Bad sessions entry: "+t),i=["0000","0000"]);let s=0,r=i[0];if(r.includes("F")){const e=r.split("F");r=e[0],s=""!==e[1]?parseInt(e[1]):1}let n=0,o=i[1];if(o.includes("F")){const e=o.split("F");o=e[0],n=""!==e[1]?parseInt(e[1]):1}if(!this._isCorrectSession(r)||!this._isCorrectSession(o))throw new Error("Incorrect entry syntax: "+t);const l=r,h=o;return this._createSessionEntry(e,c._minutesFromHHMM(l),c._minutesFromHHMM(h),s,n)}static _isCorrectSession(e){return 4===e.length&&l(e.charCodeAt(0))&&l(e.charCodeAt(1))&&l(e.charCodeAt(2))&&l(e.charCodeAt(3))}static _parseWorkingDays(e){const t=[];for(let i=0;i<e.length;i++){const s=+e[i];-1===t.indexOf(s)&&t.push(s)}return t}static _minutesFromHHMM(e){return s.get_minutes_from_hhmm(e)}static _createSessionEntry(e,t,i,r,n){0===i&&(i=s.minutesPerDay),r===n&&i<=t&&(r+=1),r>0&&(t-=r*s.minutesPerDay),n>0&&(i-=n*s.minutesPerDay);return new _(e,t,i-t)}}i.d(t,"workingDays",(function(){return h})),i.d(t,"workingDaysAndWeekEnds",(function(){return u})),i.d(t,"compareSessionEntries",(function(){return p})),i.d(t,"SessionEntry",(function(){return _})),i.d(t,"EntryIndex",(function(){
return e.compareTo(t)<0}function p(e,t){return e.compareTo(t)}class _{constructor(e,t,i){this._dayOfWeek=e,this._start=t,this._length=i}start(){return this._start+s.minutesPerDay*this.sessionStartDaysOffset()}startOffset(){return this._start}sessionStartDaysOffset(){return this._start>=0?0:this._start%s.minutesPerDay==0?-Math.ceil(this._start/s.minutesPerDay):-Math.floor(this._start/s.minutesPerDay)}sessionEndDaysOffset(){const e=this._start+this._length;return e>=0?0:e%s.minutesPerDay==0?-Math.ceil(e/s.minutesPerDay):-Math.floor(e/s.minutesPerDay)}isOvernight(){return this._start<0}dayOfWeek(){return this._dayOfWeek}sessionStartDayOfWeek(){let e=this._dayOfWeek-this.sessionStartDaysOffset();return e<s.SUNDAY&&(e+=7),e}length(){return this._length}weight(){return this._dayOfWeek*s.minutesPerDay+this._start}compareTo(e){const t=this.weight(),i=t+this._length,s=e.weight(),r=s+e._length;return t<=s&&s<i||s<=t&&t<r?0:t>s?1:-1}contains(e){const t=60*s.get_hours(e)+s.get_minutes(e);let i=s.get_day_of_week(e)-this._dayOfWeek;i>0&&(i-=7);const r=i*s.minutesPerDay+t;return r>=this._start&&r<this._start+this._length}}class m{constructor(e,t,i){this.weekIndex=e,this.entryIndex=t,this.entries=i}getEntry(){return this.entries[this.entryIndex]}}function f(e,t){const i=Object(r.lowerbound)(e,t,(e,t)=>-1===e.day.compareTo(t));return i===e.length?null:e[i]}class g{constructor(e="Etc/UTC",t="0000-0000",i="",r=""){this._entries=[],this._firstDayOfWeek=s.MONDAY,this._entriesHash=new Map,this._holidayAndCorrectionMap=new Map,this._holidaySessions=[];const n=new c;n.parseSessions(e,t),this._entries=n.entries,this._timezone=n.timezone,this._firstDayOfWeek=n.firstDayOfWeek,this._weekEndsCount=n.weekEndsCount;const o=c.parseHolidaysAndCorrections(e,i,r),a=s.get_timezone(e);this._isThereCorrections=""!==i||""!==r,o.forEach((e,t)=>{this._holidayAndCorrectionMap.set(t.toString(),e),this._holidaySessions.push({day:t,sessions:e});const i=this.getWeekIndex(t.toCalendar(a));this._entriesHash.set(i,null)}),this._holidaySessions.sort((e,t)=>e.day.compareTo(t.day))}entries(){return this._entries}timezone(){return this._timezone}firstDayOfWeek(){return this._firstDayOfWeek}addSessionEntry(e,t,i,r,n){0===i&&(i=s.minutesPerDay),r===n&&i<=t&&(r+=1),r>0&&(t-=r*s.minutesPerDay),n>0&&(i-=n*s.minutesPerDay);const o=i-t;this._entries.push(new _(e,t,o))}longestSessionLength(){let e=0,t=0;for(const i of this._holidaySessions)i.sessions.forEach(t=>{e=Math.max(e,t.length())});return this._entries.forEach(e=>{t=Math.max(t,e.length())}),Math.max(e,t)}isWeekEnd(e){const t=Object(r.lowerbound)(this._entries,new _(e,0,0),(e,t)=>e.dayOfWeek()<t.dayOfWeek());return t>this._entries.length-1||this._entries[t].dayOfWeek()!==e}isCalWeekEnd(e){const t=s.get_day_of_week(e);if(!this._isThereCorrections)return this.isWeekEnd(t);const i=o.a.fromCalendar(e),r=this._holidayAndCorrectionMap.get(i.toString());return void 0===r?this.isWeekEnd(t):0===r.length}hasWeekEnds(){return this.weekEndsCount()>0}weekEndsCount(){return this._weekEndsCount}holidaysFromYearStart(e){ return m})),i.d(t,"SessionSpec",(function(){return g}));const h=[s.MONDAY,s.TUESDAY,s.WEDNESDAY,s.THURSDAY,s.FRIDAY],u=[s.SUNDAY,s.MONDAY,s.TUESDAY,s.WEDNESDAY,s.THURSDAY,s.FRIDAY,s.SATURDAY];function d(e,t){return e.compareTo(t)<0}function p(e,t){return e.compareTo(t)}class _{constructor(e,t,i){this._dayOfWeek=e,this._start=t,this._length=i}start(){return this._start+s.minutesPerDay*this.sessionStartDaysOffset()}startOffset(){return this._start}sessionStartDaysOffset(){return this._start>=0?0:this._start%s.minutesPerDay==0?-Math.ceil(this._start/s.minutesPerDay):-Math.floor(this._start/s.minutesPerDay)}sessionEndDaysOffset(){const e=this._start+this._length;return e>=0?0:e%s.minutesPerDay==0?-Math.ceil(e/s.minutesPerDay):-Math.floor(e/s.minutesPerDay)}isOvernight(){return this._start<0}dayOfWeek(){return this._dayOfWeek}sessionStartDayOfWeek(){let e=this._dayOfWeek-this.sessionStartDaysOffset();return e<s.SUNDAY&&(e+=7),e}length(){return this._length}weight(){return this._dayOfWeek*s.minutesPerDay+this._start}compareTo(e){const t=this.weight(),i=t+this._length,s=e.weight(),r=s+e._length;return t<=s&&s<i||s<=t&&t<r?0:t>s?1:-1}contains(e){const t=60*s.get_hours(e)+s.get_minutes(e);let i=s.get_day_of_week(e)-this._dayOfWeek;i>0&&(i-=7);const r=i*s.minutesPerDay+t;return r>=this._start&&r<this._start+this._length}}class m{constructor(e,t,i){this.weekIndex=e,this.entryIndex=t,this.entries=i}getEntry(){return this.entries[this.entryIndex]}}function f(e,t){const i=Object(r.lowerbound)(e,t,(e,t)=>-1===e.day.compareTo(t));return i===e.length?null:e[i]}class g{constructor(e="Etc/UTC",t="0000-0000",i="",r=""){this._entries=[],this._firstDayOfWeek=s.MONDAY,this._entriesHash=new Map,this._holidayAndCorrectionMap=new Map,this._holidaySessions=[];const n=new c;n.parseSessions(e,t),this._entries=n.entries,this._timezone=n.timezone,this._firstDayOfWeek=n.firstDayOfWeek,this._weekEndsCount=n.weekEndsCount,this._maxTradingDayLength=n.maxTradingDayLength;const o=c.parseHolidaysAndCorrections(e,i,r),a=s.get_timezone(e);this._isThereCorrections=""!==i||""!==r,o.forEach((e,t)=>{this._holidayAndCorrectionMap.set(t.toString(),e),this._holidaySessions.push({day:t,sessions:e});const i=this.getWeekIndex(t.toCalendar(a));this._entriesHash.set(i,null)}),this._holidaySessions.sort((e,t)=>e.day.compareTo(t.day))}entries(){return this._entries}timezone(){return this._timezone}firstDayOfWeek(){return this._firstDayOfWeek}addSessionEntry(e,t,i,r,n){0===i&&(i=s.minutesPerDay),r===n&&i<=t&&(r+=1),r>0&&(t-=r*s.minutesPerDay),n>0&&(i-=n*s.minutesPerDay);const o=i-t;this._entries.push(new _(e,t,o))}longestSessionLength(){let e=0,t=0;for(const i of this._holidaySessions)i.sessions.forEach(t=>{e=Math.max(e,t.length())});return this._entries.forEach(e=>{t=Math.max(t,e.length())}),Math.max(e,t)}isWeekEnd(e){const t=Object(r.lowerbound)(this._entries,new _(e,0,0),(e,t)=>e.dayOfWeek()<t.dayOfWeek());return t>this._entries.length-1||this._entries[t].dayOfWeek()!==e}isCalWeekEnd(e){const t=s.get_day_of_week(e);if(!this._isThereCorrections)return this.isWeekEnd(t)
if(!this._isThereCorrections)return 0;const t=s.get_timezone(this._timezone),i=new o.a(s.get_year(e),s.JANUARY,1),r=o.a.fromCalendar(e);let n=0;const a=this._selectHolidays(i,r);for(let o=0;o<a.length;o++){const e=a[o].day.toCalendar(t);this.isWeekEnd(s.get_day_of_week(e))?n+=0===a[o].sessions.length?0:-1:n+=0===a[o].sessions.length?1:0}return n}intradayCanBeBuiltFrom24x7(e){return this._entries.every(t=>t.start()%e==0&&t.length()%e==0)}indexOfSession(e,t,i){const n=this._getEntriesForWeek(e);let o=Object(r.lowerbound)(n,new _(t,i,0),d);if(o!==n.length)return new m(e,o,n);let a=e;const l=7-t+this._firstDayOfWeek-1;for(i=-(s.minutesPerDay-i+l*s.minutesPerDay);;){a++;const e=this._getEntriesForWeek(a);if(0!==e.length)return o=Object(r.lowerbound)(e,new _(this._firstDayOfWeek,i,0),d),new m(a,o,e)}}findSession(e,t,i,s=0){const r=this.indexOfSession(e,t,i),n=r.entries;let o=r.entryIndex;if(0!==s){const e=n[o].dayOfWeek(),t=s>0?1:-1;for(;;){const i=o+t;if(i<0||i>=n.length||n[i].dayOfWeek()!==e)break;o=i}}return new m(r.weekIndex,o,n)}getWeekIndex(e){if(!this._isThereCorrections)return 0;const t=s.get_day_of_week(e)-s.SUNDAY,i=s.get_timezone("Etc/UTC"),r=s.get_cal(i,s.get_year(e),s.get_month(e),s.get_day_of_month(e)-t);return Math.floor((r.getTime()+621672192e5)/1e3/86400/7)}correctTradingDay(e){const t=s.get_day_of_week(e),i=60*s.get_hours(e)+s.get_minutes(e),r=this.getWeekIndex(e),n=this.findSession(r,t,i,0),o=n.getEntry().dayOfWeek()-t+7*(n.weekIndex-r);return 0!==o&&s.add_date(e,o),e}alignToSessionStart(e,t=0){const i=s.get_day_of_week(e),r=60*s.get_hours(e)+s.get_minutes(e),n=this.getWeekIndex(e),o=this.findSession(n,i,r,t),a=o.getEntry(),l=a.dayOfWeek()-i+7*(o.weekIndex-n);0!==l&&s.add_date(e,l);const c=a.startOffset();return s.set_hms(e,c/60,c%60,0,0,s.get_timezone(this._timezone)),a.length()}businessDaysToCalendarDays(e,t){let i=this.getWeekIndex(e),r=s.get_day_of_week(e),n=0,o=0;for(;o<t;){const e=this._getEntriesForWeek(i);let a=0;for(let i=r;i<=s.SATURDAY;i++){n++;let s=!0;for(;a<e.length&&!(e[a].dayOfWeek()>i);)e[a].dayOfWeek()<i||s&&(s=!1,o++),a++;if(o>=t)return n}i++,r=s.SUNDAY}return n}calendarDaysToBusinessDays(e,t){let i=this.getWeekIndex(e),r=s.get_day_of_week(e),n=0,o=0;for(;n<t;){const e=this._getEntriesForWeek(i);let a=0;for(let i=r;i<=s.SATURDAY;i++){n++;let s=!0;for(;a<e.length&&!(e[a].dayOfWeek()>i);)e[a].dayOfWeek()<i||s&&(s=!1,o++),a++;if(n>=t)return o}i++,r=s.SUNDAY}return o}alignToNearestSessionStart(e,t){return this._alignToNearestSessionValue(e,t,this._entrySessionStart.bind(this))}alignToNearestSessionEnd(e,t){return this._alignToNearestSessionValue(e,t,this._entrySessionEnd.bind(this))}leftBorderOfDailyBar(e){const t=this._getEntriesForDay(e);return 0===t.length?null:(t.sort(p),this._getLeftEntryBorder(e,t[0]))}bordersOfDailyBar(e){const t=this._getEntriesForDay(e);if(0===t.length)return null;t.sort(p);const i=this._getLeftEntryBorder(e,t[0]),r=t[t.length-1],n=s.clone(e);let o=60*(r.startOffset()+r.length())-1;const a=Math.floor(o/3600);return o-=3600*a, ;const i=o.a.fromCalendar(e),r=this._holidayAndCorrectionMap.get(i.toString());return void 0===r?this.isWeekEnd(t):0===r.length}hasWeekEnds(){return this.weekEndsCount()>0}weekEndsCount(){return this._weekEndsCount}maxTradingDayLength(){return this._maxTradingDayLength}holidaysFromYearStart(e){if(!this._isThereCorrections)return 0;const t=s.get_timezone(this._timezone),i=new o.a(s.get_year(e),s.JANUARY,1),r=o.a.fromCalendar(e);let n=0;const a=this._selectHolidays(i,r);for(let o=0;o<a.length;o++){const e=a[o].day.toCalendar(t);this.isWeekEnd(s.get_day_of_week(e))?n+=0===a[o].sessions.length?0:-1:n+=0===a[o].sessions.length?1:0}return n}intradayCanBeBuiltFrom24x7(e){return this._entries.every(t=>t.start()%e==0&&t.length()%e==0)}indexOfSession(e,t,i){const n=this._getEntriesForWeek(e);let o=Object(r.lowerbound)(n,new _(t,i,0),d);if(o!==n.length)return new m(e,o,n);let a=e;const l=7-t+this._firstDayOfWeek-1;for(i=-(s.minutesPerDay-i+l*s.minutesPerDay);;){a++;const e=this._getEntriesForWeek(a);if(0!==e.length)return o=Object(r.lowerbound)(e,new _(this._firstDayOfWeek,i,0),d),new m(a,o,e)}}findSession(e,t,i,s=0){const r=this.indexOfSession(e,t,i),n=r.entries;let o=r.entryIndex;if(0!==s){const e=n[o].dayOfWeek(),t=s>0?1:-1;for(;;){const i=o+t;if(i<0||i>=n.length||n[i].dayOfWeek()!==e)break;o=i}}return new m(r.weekIndex,o,n)}getWeekIndex(e){if(!this._isThereCorrections)return 0;const t=s.get_day_of_week(e)-s.SUNDAY,i=s.get_timezone("Etc/UTC"),r=s.get_cal(i,s.get_year(e),s.get_month(e),s.get_day_of_month(e)-t);return Math.floor((r.getTime()+621672192e5)/1e3/86400/7)}correctTradingDay(e){const t=s.get_day_of_week(e),i=60*s.get_hours(e)+s.get_minutes(e),r=this.getWeekIndex(e),n=this.findSession(r,t,i,0),o=n.getEntry().dayOfWeek()-t+7*(n.weekIndex-r);return 0!==o&&s.add_date(e,o),e}alignToSessionStart(e,t=0){const i=s.get_day_of_week(e),r=60*s.get_hours(e)+s.get_minutes(e),n=this.getWeekIndex(e),o=this.findSession(n,i,r,t),a=o.getEntry(),l=a.dayOfWeek()-i+7*(o.weekIndex-n);0!==l&&s.add_date(e,l);const c=a.startOffset();return s.set_hms(e,c/60,c%60,0,0,s.get_timezone(this._timezone)),a.length()}businessDaysToCalendarDays(e,t){let i=this.getWeekIndex(e),r=s.get_day_of_week(e),n=0,o=0;for(;o<t;){const e=this._getEntriesForWeek(i);let a=0;for(let i=r;i<=s.SATURDAY;i++){n++;let s=!0;for(;a<e.length&&!(e[a].dayOfWeek()>i);)e[a].dayOfWeek()<i||s&&(s=!1,o++),a++;if(o>=t)return n}i++,r=s.SUNDAY}return n}calendarDaysToBusinessDays(e,t){let i=this.getWeekIndex(e),r=s.get_day_of_week(e),n=0,o=0;for(;n<t;){const e=this._getEntriesForWeek(i);let a=0;for(let i=r;i<=s.SATURDAY;i++){n++;let s=!0;for(;a<e.length&&!(e[a].dayOfWeek()>i);)e[a].dayOfWeek()<i||s&&(s=!1,o++),a++;if(n>=t)return o}i++,r=s.SUNDAY}return o}alignToNearestSessionStart(e,t){return this._alignToNearestSessionValue(e,t,this._entrySessionStart.bind(this))}alignToNearestSessionEnd(e,t){return this._alignToNearestSessionValue(e,t,this._entrySessionEnd.bind(this))}leftBorderOfDailyBar(e){const t=this._getEntriesForDay(e);return 0===t.length?null:(t.sort(p),
s.set_hms(n,a,o/60,o%60,0,s.get_timezone(this._timezone)),{from:i,to:n}}_getEntriesForWeek(e){let t=this._entriesHash.get(e);if(void 0===t)return this._entries;if(null!==t)return t;const i=s.get_timezone(this._timezone);t=this._entries.slice();const r=this._weekIndexToCalendar(e),n=this._weekIndexToCalendar(e+1),a=o.a.fromCalendar(r),l=o.a.fromCalendar(n),c=this._selectHolidays(a,l);for(const o of c){const e=o.day.toCalendar(i),r=s.get_day_of_week(e);t=t.filter(e=>e.dayOfWeek()!==r),t=t.concat(o.sessions)}return t.sort(p),this._entriesHash.set(e,t),t}_selectHolidays(e,t){const i=[];let s=e;for(;;){const e=f(this._holidaySessions,s);if(null===e)return i;if(!e.day.before(t))return i;i.push(e),s=e.day.addDays(1)}}_weekIndexToCalendar(e){const t=1e3*(86400*e*7+86400)-621672192e5,i=s.get_cal_from_unix_timestamp_ms(s.get_timezone("Etc/UTC"),t),r=s.get_timezone("Etc/UTC");return s.get_cal(r,s.get_year(i),s.get_month(i),s.get_day_of_month(i))}_alignToNearestSessionValue(e,t,i){const r=s.get_day_of_week(e),n=60*s.get_hours(e)+s.get_minutes(e),o=this.getWeekIndex(e);let a=this.findSession(o,r,n);if(a.getEntry().contains(e)&&o===a.weekIndex||1===t)return i(a,s.clone(e),t);let l=a.entryIndex-1;if(l<0){let e=a.weekIndex,t=a.entries;for(;l<0;)e--,t=this._getEntriesForWeek(e),l+=t.length;a=new m(e,l,t)}else a=new m(a.weekIndex,l,a.entries);return i(a,s.clone(e),t)}_entrySessionStart(e,t,i){return this._entrySessionValue(e,t,i,e=>60*e.start())}_entrySessionEnd(e,t,i){return this._entrySessionValue(e,t,i,e=>60*(e.start()+e.length())-1)}_entrySessionValue(e,t,i,r){let n=s.get_day_of_week(t);const o=e.getEntry();let a=o.dayOfWeek()-o.sessionStartDaysOffset();const l=this.getWeekIndex(t);let c=e.weekIndex-l,h=!1;if(a<s.SUNDAY&&(c<=0?h=!0:c--,a+=7),(c>0&&i>=0||c<0&&i<0)&&s.add_date(t,7*c),!o.contains(t)){let e=a-n;h&&i<0&&(e=-(7-a+n)),s.add_date(t,e),n=s.get_day_of_week(t)}o.isOvernight()&&n===o.dayOfWeek()&&s.add_date(t,-o.sessionStartDaysOffset());let u=r(o);const d=Math.floor(u/3600);return u-=3600*d,s.set_hms(t,d,u/60,u%60,0,s.get_timezone(this._timezone)),t}_getEntriesForDay(e){const t=s.get_day_of_week(e);return this._getEntriesForWeek(this.getWeekIndex(e)).filter(e=>e.dayOfWeek()===t)}_getLeftEntryBorder(e,t){const i=s.clone(e),r=t.startOffset();return s.set_hms(i,r/60,r%60,0,0,s.get_timezone(this._timezone)),i}}},"5rJj":function(e,t,i){"use strict";(function(t){var s=i("ogJP").isSameType,r=i("Ocx9").DefaultProperty;function n(e,t,i,s){this._map=Object.assign({},this._map,s),t&&(t=this.unpackLevels(t)),r.call(this,e,t,i)}inherit(n,r),n.prototype.state=function(e,i){e=e||[];var s=t.prototype.state.call(this,e);return i?s:this.packLevels(s)},n.prototype.clone=function(){for(var e=this.state(),t=new n(this._defaultName,e),i=0;i<this._exclusions.length;++i)t.addExclusion(this._exclusions[i]);return t},n.prototype.merge=function(e,i){return t.prototype.merge.call(this,this.unpackLevels(e),i)},n.prototype._map={prefixes:[""],range:[0,0],names:["coeff","color","visible","linestyle","linewidth"],typecheck:{pack:Object,unpack:Array}}, this._getLeftEntryBorder(e,t[0]))}bordersOfDailyBar(e){const t=this._getEntriesForDay(e);if(0===t.length)return null;t.sort(p);const i=this._getLeftEntryBorder(e,t[0]),r=t[t.length-1],n=s.clone(e);let o=60*(r.startOffset()+r.length())-1;const a=Math.floor(o/3600);return o-=3600*a,s.set_hms(n,a,o/60,o%60,0,s.get_timezone(this._timezone)),{from:i,to:n}}_getEntriesForWeek(e){let t=this._entriesHash.get(e);if(void 0===t)return this._entries;if(null!==t)return t;const i=s.get_timezone(this._timezone);t=this._entries.slice();const r=this._weekIndexToCalendar(e),n=this._weekIndexToCalendar(e+1),a=o.a.fromCalendar(r),l=o.a.fromCalendar(n),c=this._selectHolidays(a,l);for(const o of c){const e=o.day.toCalendar(i),r=s.get_day_of_week(e);t=t.filter(e=>e.dayOfWeek()!==r),t=t.concat(o.sessions)}return t.sort(p),this._entriesHash.set(e,t),t}_selectHolidays(e,t){const i=[];let s=e;for(;;){const e=f(this._holidaySessions,s);if(null===e)return i;if(!e.day.before(t))return i;i.push(e),s=e.day.addDays(1)}}_weekIndexToCalendar(e){const t=1e3*(86400*e*7+86400)-621672192e5,i=s.get_cal_from_unix_timestamp_ms(s.get_timezone("Etc/UTC"),t),r=s.get_timezone("Etc/UTC");return s.get_cal(r,s.get_year(i),s.get_month(i),s.get_day_of_month(i))}_alignToNearestSessionValue(e,t,i){const r=s.get_day_of_week(e),n=60*s.get_hours(e)+s.get_minutes(e),o=this.getWeekIndex(e);let a=this.findSession(o,r,n);if(a.getEntry().contains(e)&&o===a.weekIndex||1===t)return i(a,s.clone(e),t);let l=a.entryIndex-1;if(l<0){let e=a.weekIndex,t=a.entries;for(;l<0;)e--,t=this._getEntriesForWeek(e),l+=t.length;a=new m(e,l,t)}else a=new m(a.weekIndex,l,a.entries);return i(a,s.clone(e),t)}_entrySessionStart(e,t,i){return this._entrySessionValue(e,t,i,e=>60*e.start())}_entrySessionEnd(e,t,i){return this._entrySessionValue(e,t,i,e=>60*(e.start()+e.length())-1)}_entrySessionValue(e,t,i,r){let n=s.get_day_of_week(t);const o=e.getEntry();let a=o.dayOfWeek()-o.sessionStartDaysOffset();const l=this.getWeekIndex(t);let c=e.weekIndex-l,h=!1;if(a<s.SUNDAY&&(c<=0?h=!0:c--,a+=7),(c>0&&i>=0||c<0&&i<0)&&s.add_date(t,7*c),!o.contains(t)){let e=a-n;h&&i<0&&(e=-(7-a+n)),s.add_date(t,e),n=s.get_day_of_week(t)}o.isOvernight()&&n===o.dayOfWeek()&&s.add_date(t,-o.sessionStartDaysOffset());let u=r(o);const d=Math.floor(u/3600);return u-=3600*d,s.set_hms(t,d,u/60,u%60,0,s.get_timezone(this._timezone)),t}_getEntriesForDay(e){const t=s.get_day_of_week(e);return this._getEntriesForWeek(this.getWeekIndex(e)).filter(e=>e.dayOfWeek()===t)}_getLeftEntryBorder(e,t){const i=s.clone(e),r=t.startOffset();return s.set_hms(i,r/60,r%60,0,0,s.get_timezone(this._timezone)),i}}},"5rJj":function(e,t,i){"use strict";(function(t){var s=i("ogJP").isSameType,r=i("Ocx9").DefaultProperty;function n(e,t,i,s){this._map=Object.assign({},this._map,s),t&&(t=this.unpackLevels(t)),r.call(this,e,t,i)}inherit(n,r),n.prototype.state=function(e,i){e=e||[];var s=t.prototype.state.call(this,e);return i?s:this.packLevels(s)},n.prototype.clone=function(){
n.prototype._packLvlTpl=function(){return[]},n.prototype._unpackLvlTpl=function(){return{}},n.prototype._packLvlFill=function(e,t,i,s){return s.push(i[t]),s},n.prototype._unpackLvlFill=function(e,t,i,s){return s[t]=i[e],s},n.prototype._iterateLevels=function(e,t){for(var i in this._map.prefixes)for(var r=(this._map.prefixes[i]||"")+"level",n=this._map.range[0];n<=this._map.range[1];n++)if(e[r+n]&&s(e[r+n],t.typecheck())){var o=t.tpl();for(var a in this._map.names)o=t.fill(a,this._map.names[a],e[r+n],o);e[r+n]=o}return e},n.prototype.packLevels=function(e){return this._iterateLevels(e,{tpl:this._packLvlTpl,fill:this._packLvlFill,typecheck:this._map.typecheck.pack})},n.prototype.unpackLevels=function(e){return this._iterateLevels(e,{tpl:this._unpackLvlTpl,fill:this._unpackLvlFill,typecheck:this._map.typecheck.unpack})},n.prototype.saveDefaults=function(){TradingView.saveDefaults(this._defaultName,this.state(this._exclusions,!0))},e.exports=n}).call(this,i("tc+8"))},"68at":function(e,t,i){"use strict";var s=i("5rJj"),r=i("7ADh").LineToolFibWedgeBase,n=i("j3hX").LineToolColorsProperty;class o extends r{constructor(e,t){super(e,t||o.createProperties()),i.e("lt-pane-views").then(i.t.bind(null,"jlk4",7)).then(({ProjectionLinePaneView:e})=>{this._setPaneViews([new e(this,this._model)])})}levelsCount(){return 1}name(){return"Projection"}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(33),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"LzAw"))).ProjectionDefinitionsViewModel}static createProperties(e){var t=new s("linetoolprojection",e,!1,{range:[1,1]});return o._configureProperties(t),t}static _configureProperties(e){r._configureProperties(e),e.addChild("linesColors",new n([e.trendline.color]))}}t.LineToolProjection=o},"6I19":function(e,t,i){"use strict";i.d(t,"b",(function(){return y})),i.d(t,"c",(function(){return w})),i.d(t,"a",(function(){return C}));var s=i("Eyy1"),r=i("ivNn"),n=i("eJTA"),o=i("YFKU"),a=i("qFKp"),l=i("Tmoa"),c=i("Ialn"),h=i("k9/m"),u=i("CW80"),d=i("mMWL"),p=i("GH0z"),_=i("38az"),m=i("7qT/");const f=a.CheckMobile.any(),g=f&&!0,v=new p.PercentageFormatter,b=window.t("n/a"),S=`${b} (${b}%)`;function y(e,t){const i=Object(n.parseRgb)(t),s=Object(n.parseRgb)(e);return Object(n.distanceRgb)(i,s)<70?Object(n.rgbToHexString)(Object(n.invertRgb)(i)):t}function w(e){if(null===e)return null;const t=e.properties().child("background");return void 0===t?null:t.value()}class C{constructor(e,t){this._series=e,this._model=t,this._emptyValues=[{title:Object(o.t)("Open"),visible:!1,value:"",index:0,id:""},{title:Object(o.t)("High"),visible:!1,value:"",index:1,id:""},{title:Object(o.t)("Low"),visible:!1,value:"",index:2,id:""},{title:Object(o.t)("Close"),visible:!1,value:"",index:3,id:""},{title:"",visible:!1,value:"",index:4,id:""},{title:"",visible:!1,value:"",index:5,id:""},{title:Object(o.t)("Change"),visible:!1,value:"",index:6,id:""}]}getItems(){return this._emptyValues}getValues(e){const t=this._emptyValues.map(e=>Object.assign({},e)),i=this._showLastPriceAndChangeOnly() for(var e=this.state(),t=new n(this._defaultName,e),i=0;i<this._exclusions.length;++i)t.addExclusion(this._exclusions[i]);return t},n.prototype.merge=function(e,i){return t.prototype.merge.call(this,this.unpackLevels(e),i)},n.prototype._map={prefixes:[""],range:[0,0],names:["coeff","color","visible","linestyle","linewidth"],typecheck:{pack:Object,unpack:Array}},n.prototype._packLvlTpl=function(){return[]},n.prototype._unpackLvlTpl=function(){return{}},n.prototype._packLvlFill=function(e,t,i,s){return s.push(i[t]),s},n.prototype._unpackLvlFill=function(e,t,i,s){return s[t]=i[e],s},n.prototype._iterateLevels=function(e,t){for(var i in this._map.prefixes)for(var r=(this._map.prefixes[i]||"")+"level",n=this._map.range[0];n<=this._map.range[1];n++)if(e[r+n]&&s(e[r+n],t.typecheck())){var o=t.tpl();for(var a in this._map.names)o=t.fill(a,this._map.names[a],e[r+n],o);e[r+n]=o}return e},n.prototype.packLevels=function(e){return this._iterateLevels(e,{tpl:this._packLvlTpl,fill:this._packLvlFill,typecheck:this._map.typecheck.pack})},n.prototype.unpackLevels=function(e){return this._iterateLevels(e,{tpl:this._unpackLvlTpl,fill:this._unpackLvlFill,typecheck:this._map.typecheck.unpack})},n.prototype.saveDefaults=function(){TradingView.saveDefaults(this._defaultName,this.state(this._exclusions,!0))},e.exports=n}).call(this,i("tc+8"))},"68at":function(e,t,i){"use strict";var s=i("5rJj"),r=i("7ADh").LineToolFibWedgeBase,n=i("j3hX").LineToolColorsProperty;class o extends r{constructor(e,t){super(e,t||o.createProperties()),i.e("lt-pane-views").then(i.t.bind(null,"jlk4",7)).then(({ProjectionLinePaneView:e})=>{this._setPaneViews([new e(this,this._model)])})}levelsCount(){return 1}name(){return"Projection"}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(33),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"LzAw"))).ProjectionDefinitionsViewModel}static createProperties(e){var t=new s("linetoolprojection",e,!1,{range:[1,1]});return o._configureProperties(t),t}static _configureProperties(e){r._configureProperties(e),e.addChild("linesColors",new n([e.trendline.color]))}}t.LineToolProjection=o},"6I19":function(e,t,i){"use strict";i.d(t,"b",(function(){return y})),i.d(t,"c",(function(){return w})),i.d(t,"a",(function(){return C}));var s=i("Eyy1"),r=i("ivNn"),n=i("eJTA"),o=i("YFKU"),a=i("qFKp"),l=i("Tmoa"),c=i("Ialn"),h=i("k9/m"),u=i("CW80"),d=i("mMWL"),p=i("GH0z"),_=i("38az"),m=i("7qT/");const f=a.CheckMobile.any(),g=f&&!0,v=new p.PercentageFormatter,b=window.t("n/a"),S=`${b} (${b}%)`;function y(e,t){const i=Object(n.parseRgb)(t),s=Object(n.parseRgb)(e);return Object(n.distanceRgb)(i,s)<70?Object(n.rgbToHexString)(Object(n.invertRgb)(i)):t}function w(e){if(null===e)return null;const t=e.properties().child("background");return void 0===t?null:t.value()}class C{constructor(e,t){this._series=e,this._model=t,this._emptyValues=[{title:Object(o.t)("Open"),visible:!1,value:"",index:0,id:""},{title:Object(o.t)("High"),visible:!1,value:"",index:1,id:""},{title:Object(o.t)("Low"),visible:!1,value:"",index:2,id:""
;for(const s of t)s.visible=!i;t[0].value=b,t[1].value=b,t[2].value=b,t[3].value=b,t[6].value=S,t[5].visible=!1;const n=t[4];if(n.value=b,n.visible=!1,this._model.timeScale().isEmpty()||0===this._series.bars().size()||this._series.priceScale().isEmpty())return t;Object(r.isNumber)(e)||(e=Object(s.ensureNotNull)(this._series.data().last()).index);const o=this._series.nearestIndex(e,h.PlotRowSearchMode.NearestLeft);if(void 0===o)return t;const a=this._series.data().valueAt(o),u=w(this._series.model().paneForSource(this._series));if(null===a||null===u)return t;const d=a[1],p=a[2],m=a[3],f=a[4];if(null==d||null==p||null==m||null==f)return t;const C=this._series.formatter();let P=S;const x=this._changesData(f,o,i);void 0!==x.values&&(P=Object(c.forceLTRStr)(`${C.format(x.values.change,!0)} (${v.format(x.values.percentChange,!0)})`)),t[6].value=P,i?(t[5].value=C.format(f),t[5].visible=!0,t[6].visible=!0):(t[0].value=C.format(d),t[1].value=C.format(p),t[2].value=C.format(m),t[3].value=C.format(f),t[4].value=C.format(this._series.barFunction()(a)));let T=null;if(i&&!g)T=void 0===x.values||x.values.change>=0?_.SeriesBarColorer.upColor(this._series.properties()):_.SeriesBarColorer.downColor(this._series.properties());else{const e=this._series.barColorer().barStyle(o,!1);T=y(u,null!=e.barBorderColor?e.barBorderColor:e.barColor)}T=Object(l.resetTransparency)(y(u,T));for(const s of t)s.color=T;return t}_showLastPriceAndChangeOnly(){return f&&(null===this._model.crossHairSource().pane||Object(u.isLineToolName)(d.tool.value())||null!==this._model.lineBeingEdited())}_changesData(e,t,i){if(i&&!g){const e=this._series.quotes();if(null!==e)return{values:{change:e.change,percentChange:e.change_percent}}}else{const i=this._series.data().valueAt(t-1),s=i&&i[4]||null;if(null!==s)return{values:{change:e-s,percentChange:Object(m.a)(s,e)}}}return{}}}},"6ctS":function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><g fill="none" fill-rule="evenodd" stroke="currentColor" transform="translate(3 6)"><path d="M.964 8C3 4 6.679.5 11 .5 15.32.5 19 4 21.036 8 19 12 15.32 15.5 11 15.5 6.679 15.5 3 12 .964 8z"/><circle cx="11" cy="8" r="3.5"/></g></svg>'},"6et/":function(e,t,i){"use strict";i.r(t),i.d(t,"listen",(function(){return l})),i.d(t,"registerListener",(function(){return c})),i.d(t,"removeListener",(function(){return h})),i.d(t,"pushBackListener",(function(){return u})),i.d(t,"disable",(function(){return d})),i.d(t,"enable",(function(){return p}));var s=i("e3/o");const r=[];let n=null;function o(e){for(let t=0;t<r.length;t++)if(r[t].name===e)return t;return-1}function a(e){if(!n)for(let t=r.length-1;t>=0&&!0!==r[t].func(e);t--);}function l(e){e.addEventListener("keypress",a,!1)}function c(e,t){const i={name:e,func:t},s=o(i.name);s>-1?r[s]=i:r.push(i)}function h(e){r.forEach((t,i)=>{t.name===e&&r.splice(i,1)})}function u(e,t){const i={name:e,func:t},s=o(i.name);s>-1&&r.splice(s,1),r.unshift(i)}function d(){return n?null:(n=Object(s.randomHashN)(4),n)}function p(e){if(e!==n)throw Error("Lock id is outdated");n=null },{title:Object(o.t)("Close"),visible:!1,value:"",index:3,id:""},{title:"",visible:!1,value:"",index:4,id:""},{title:"",visible:!1,value:"",index:5,id:""},{title:Object(o.t)("Change"),visible:!1,value:"",index:6,id:""}]}getItems(){return this._emptyValues}getValues(e){const t=this._emptyValues.map(e=>Object.assign({},e)),i=this._showLastPriceAndChangeOnly();for(const s of t)s.visible=!i;t[0].value=b,t[1].value=b,t[2].value=b,t[3].value=b,t[6].value=S,t[5].visible=!1;const n=t[4];if(n.value=b,n.visible=!1,this._model.timeScale().isEmpty()||0===this._series.bars().size()||this._series.priceScale().isEmpty())return t;Object(r.isNumber)(e)||(e=Object(s.ensureNotNull)(this._series.data().last()).index);const o=this._series.nearestIndex(e,h.PlotRowSearchMode.NearestLeft);if(void 0===o)return t;const a=this._series.data().valueAt(o),u=w(this._series.model().paneForSource(this._series));if(null===a||null===u)return t;const d=a[1],p=a[2],m=a[3],f=a[4];if(null==d||null==p||null==m||null==f)return t;const C=this._series.formatter();let P=S;const x=this._changesData(f,o,i);void 0!==x.values&&(P=Object(c.forceLTRStr)(`${C.format(x.values.change,!0)} (${v.format(x.values.percentChange,!0)})`)),t[6].value=P,i?(t[5].value=C.format(f),t[5].visible=!0,t[6].visible=!0):(t[0].value=C.format(d),t[1].value=C.format(p),t[2].value=C.format(m),t[3].value=C.format(f),t[4].value=C.format(this._series.barFunction()(a)));let T=null;if(i&&!g)T=void 0===x.values||x.values.change>=0?_.SeriesBarColorer.upColor(this._series.properties()):_.SeriesBarColorer.downColor(this._series.properties());else{const e=this._series.barColorer().barStyle(o,!1);T=y(u,null!=e.barBorderColor?e.barBorderColor:e.barColor)}T=Object(l.resetTransparency)(y(u,T));for(const s of t)s.color=T;return t}_showLastPriceAndChangeOnly(){return f&&(null===this._model.crossHairSource().pane||Object(u.isLineToolName)(d.tool.value())||null!==this._model.lineBeingEdited())}_changesData(e,t,i){if(i&&!g){const e=this._series.quotes();if(null!==e)return{values:{change:e.change,percentChange:e.change_percent}}}else{const i=this._series.data().valueAt(t-1),s=i&&i[4]||null;if(null!==s)return{values:{change:e-s,percentChange:Object(m.a)(s,e)}}}return{}}}},"6ctS":function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><g fill="none" fill-rule="evenodd" stroke="currentColor" transform="translate(3 6)"><path d="M.964 8C3 4 6.679.5 11 .5 15.32.5 19 4 21.036 8 19 12 15.32 15.5 11 15.5 6.679 15.5 3 12 .964 8z"/><circle cx="11" cy="8" r="3.5"/></g></svg>'},"6et/":function(e,t,i){"use strict";i.r(t),i.d(t,"listen",(function(){return l})),i.d(t,"registerListener",(function(){return c})),i.d(t,"removeListener",(function(){return h})),i.d(t,"pushBackListener",(function(){return u})),i.d(t,"disable",(function(){return d})),i.d(t,"enable",(function(){return p}));var s=i("e3/o");const r=[];let n=null;function o(e){for(let t=0;t<r.length;t++)if(r[t].name===e)return t;return-1}function a(e){if(!n)for(let t=r.length-1;t>=0&&!0!==r[t].func(e);t--);}function l(e){
}l(window)},"6sst":function(e,t,i){"use strict";i.r(t),i.d(t,"OverlayStudyPriceLineAxisView",(function(){return r}));var s=i("TmNs");class r extends s.PriceLineAxisView{constructor(e){super(),this._study=e}_value(){return this._study.lastValueData("",!0)}_priceLineColor(e){return e}_lineWidth(){return 1}_isVisible(){const e=this._study.model().properties().scalesProperties.showSeriesLastValue.value();return this._study.properties().childs().showPriceLine.value()&&e}}},"6vtU":function(e,t,i){"use strict";i.r(t),i.d(t,"setAdditionalSymbolInfoFields",(function(){return r})),i.d(t,"getAdditionalSymbolInfoFields",(function(){return n}));let s=[];function r(e){s=e}function n(){return s}},"704P":function(e,t,i){"use strict";(function(e){var s=i("Ss5c").LineDataSource,r=i("jkoZ"),n=i("Ocx9").DefaultProperty,o=i("k9/m").PlotRowSearchMode,a=i("s1Gx").sortSourcesPreOrdered.LineToolExecution;class l{constructor(e,t){this._pane=e,this._timeScale=t}static recreateOrderedByBarsSourcesCache(e){l.clearOrderedByBarsSourcesCache();for(var t=l.prototype,i=e.sourcesByGroup().all(),s=0;s<i.length;++s){var r=i[s];if(r._adapter&&void 0!==r._adapter._index){var n=t._cachedByBarIndexOrderedExecutions[r._adapter._index];t._cachedByBarIndexOrderedExecutions[r._adapter._index]=n||[],t._cachedByBarIndexOrderedExecutions[r._adapter._index].push(r)}}}static clearOrderedByBarsSourcesCache(){l.prototype._cachedByBarIndexOrderedExecutions={}}getXYCoordinate(e,t,i){var s=0,r=e.getDirection(),n="buy"===r,a=this._pane.model().mainSeries();if(a.bars){var l=n?10:-10,c=a.bars().search(i,o.NearestLeft);if(null!==c){i=c.index;var u=n?c.value[TradingView.LOW_PLOT]:c.value[TradingView.HIGH_PLOT],d=a.priceScale(),p=a.firstValue();s=d.priceToCoordinate(u,p)+l}}e._index=i;var _=t.visibleBarsStrictRange();if(!isFinite(i)||null===_||i>_.lastBar()||i<_.firstBar())return{x:-1,y:-1};for(var m=this._cachedByBarIndexOrderedExecutions[i]||this._pane.sourcesByGroup().all(),f=m.length-1;f>=0;--f){var g=m[f];if(g instanceof h&&g._adapter._index===i&&g._adapter.getDirection()===r){if(g===e._line)break;var v=g._adapter._height();s=n?s+v:s-v}}return{x:t.indexToCoordinate(i),y:s}}}l.prototype._cachedByBarIndexOrderedExecutions={};class c{constructor(e){this._line=e}_height(){var e=this.getArrowHeight(),t=this.getArrowSpacing();this.getText()&&r.fontHeight(this.getFont());return e+t+0+10}getIndex(){return this._line._model.timeScale().baseIndex()-this._line.points()[0].index}setIndex(e){var t=this._line._model.timeScale().baseIndex()-Math.abs(e);this._line.startMoving({logical:this._line.points()[0]});var i=TradingView.merge({},this._line.points()[0]);return i.index=t,this._line.move({logical:i}),this._line.endMoving(),this}getTime(){return this._unixtime}setTime(e){return this._unixtime=e,this._line.restorePoints([{offset:0,price:this.getPrice(),time_t:this._unixtime}],[]),this._line.createServerPoints(),this}getPrice(){return this._line.points().length>0?this._line.points()[0].price:this._line._timePoint.length>0?this._line._timePoint[0].price:void 0}setPrice(e){ e.addEventListener("keypress",a,!1)}function c(e,t){const i={name:e,func:t},s=o(i.name);s>-1?r[s]=i:r.push(i)}function h(e){r.forEach((t,i)=>{t.name===e&&r.splice(i,1)})}function u(e,t){const i={name:e,func:t},s=o(i.name);s>-1&&r.splice(s,1),r.unshift(i)}function d(){return n?null:(n=Object(s.randomHashN)(4),n)}function p(e){if(e!==n)throw Error("Lock id is outdated");n=null}l(window)},"6sst":function(e,t,i){"use strict";i.r(t),i.d(t,"OverlayStudyPriceLineAxisView",(function(){return r}));var s=i("TmNs");class r extends s.PriceLineAxisView{constructor(e){super(),this._study=e}_value(){return this._study.lastValueData("",!0)}_priceLineColor(e){return e}_lineWidth(){return 1}_isVisible(){const e=this._study.model().properties().scalesProperties.showSeriesLastValue.value();return this._study.properties().childs().showPriceLine.value()&&e}}},"6vtU":function(e,t,i){"use strict";i.r(t),i.d(t,"setAdditionalSymbolInfoFields",(function(){return r})),i.d(t,"getAdditionalSymbolInfoFields",(function(){return n}));let s=[];function r(e){s=e}function n(){return s}},"704P":function(e,t,i){"use strict";(function(e){var s=i("Ss5c").LineDataSource,r=i("jkoZ"),n=i("Ocx9").DefaultProperty,o=i("k9/m").PlotRowSearchMode,a=i("s1Gx").sortSourcesPreOrdered.LineToolExecution;class l{constructor(e,t){this._pane=e,this._timeScale=t}static recreateOrderedByBarsSourcesCache(e){l.clearOrderedByBarsSourcesCache();for(var t=l.prototype,i=e.sourcesByGroup().all(),s=0;s<i.length;++s){var r=i[s];if(r._adapter&&void 0!==r._adapter._index){var n=t._cachedByBarIndexOrderedExecutions[r._adapter._index];t._cachedByBarIndexOrderedExecutions[r._adapter._index]=n||[],t._cachedByBarIndexOrderedExecutions[r._adapter._index].push(r)}}}static clearOrderedByBarsSourcesCache(){l.prototype._cachedByBarIndexOrderedExecutions={}}getXYCoordinate(e,t,i){var s=0,r=e.getDirection(),n="buy"===r,a=this._pane.model().mainSeries();if(a.bars){var l=n?10:-10,c=a.bars().search(i,o.NearestLeft);if(null!==c){i=c.index;var u=n?c.value[TradingView.LOW_PLOT]:c.value[TradingView.HIGH_PLOT],d=a.priceScale(),p=a.firstValue();s=d.priceToCoordinate(u,p)+l}}e._index=i;var _=t.visibleBarsStrictRange();if(!isFinite(i)||null===_||i>_.lastBar()||i<_.firstBar())return{x:-1,y:-1};for(var m=this._cachedByBarIndexOrderedExecutions[i]||this._pane.sourcesByGroup().all(),f=m.length-1;f>=0;--f){var g=m[f];if(g instanceof h&&g._adapter._index===i&&g._adapter.getDirection()===r){if(g===e._line)break;var v=g._adapter._height();s=n?s+v:s-v}}return{x:t.indexToCoordinate(i),y:s}}}l.prototype._cachedByBarIndexOrderedExecutions={};class c{constructor(e){this._line=e}_height(){var e=this.getArrowHeight(),t=this.getArrowSpacing();this.getText()&&r.fontHeight(this.getFont());return e+t+0+10}getIndex(){return this._line._model.timeScale().baseIndex()-this._line.points()[0].index}setIndex(e){var t=this._line._model.timeScale().baseIndex()-Math.abs(e);this._line.startMoving({logical:this._line.points()[0]});var i=TradingView.merge({},this._line.points()[0]);return i.index=t,this._line.move({logical:i}),
return this._line.points().length>0&&(this._line.points()[0].price=e),this._line._timePoint.length>0&&(this._line._timePoint[0].price=e),this}getText(){return this._line.properties().text.value()}setText(e){return this._line.properties().text.setValue(e||""),this._line.updateAllViewsAndRedraw(),this}getArrowHeight(){return this._line.properties().arrowHeight.value()}setArrowHeight(e){return this._line.properties().arrowHeight.setValue(e||5),this}getArrowSpacing(){return this._line.properties().arrowSpacing.value()}setArrowSpacing(e){return this._line.properties().arrowSpacing.setValue(e||1),this}getDirection(){return this._line.properties().direction.value()}setDirection(e){return this._line.properties().direction.setValue(e||"buy"),this}getArrowColor(){var e=this._line.properties();return"buy"===this.getDirection()?e.arrowBuyColor.value():e.arrowSellColor.value()}setArrowColor(e){return"buy"===this.getDirection()?this.setArrowBuyColor(e):this.setArrowSellColor(e),this}setArrowBuyColor(e){return this._line.properties().arrowBuyColor.setValue(e),this}setArrowSellColor(e){return this._line.properties().arrowSellColor.setValue(e),this}getTextColor(){return r.getColorFromProperties(this._line.properties().textColor,this._line.properties().textTransparency)}setTextColor(e){return r.setColorToProperties(e,this._line.properties().textColor,this._line.properties().textTransparency),this}getFont(){return r.getFontFromProperties(this._line.properties().fontFamily,this._line.properties().fontSize,this._line.properties().fontBold,this._line.properties().fontItalic)}setFont(e){return r.setFontToProperties(e,this._line.properties().fontFamily,this._line.properties().fontSize,this._line.properties().fontBold,this._line.properties().fontItalic),this}setTooltip(e){return null==e?e="":e+="",this._line.properties().tooltip.setValue(e),this}getTooltip(){return this._line.properties().tooltip.value()}remove(){this._line._model.removeSource(this._line),delete this._line}getPoints(){return this._line.points()}}class h extends s{constructor(e,t){super(e,t||h.createProperties()),this._adapter=new c(this),this.customization.forcePriceAxisLabel=!1,this.customization.disableErasing=!0,this.customization.showInObjectTree=!1,this.setSelectionEnabled(!1),i.e("lt-pane-views").then(i.t.bind(null,"tjxb",7)).then(({ExecutionPaneView:e})=>{this._setPaneViews([new e(this,this._model)])})}zorder(){return a}pointsCount(){return h.POINTS_COUNT}name(){return"Execution"}hasContextMenu(){return!1}state(){return null}updateAllViews(){return this._isVisible()?s.prototype.updateAllViews.call(this):null}priceAxisViews(e,t){return this._isVisible()?s.prototype.priceAxisViews.call(this,e,t):null}_isVisible(){return this._model.properties().tradingProperties.showExecutions.value()}paneViews(){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showExecutions.value()?s.prototype.paneViews.call(this):null}userEditEnabled(){return!1}showInObjectTree(){return!1}cloneable(){return!1}copiable(){return!1} this._line.endMoving(),this}getTime(){return this._unixtime}setTime(e){return this._unixtime=e,this._line.restorePoints([{offset:0,price:this.getPrice(),time_t:this._unixtime}],[]),this._line.createServerPoints(),this}getPrice(){return this._line.points().length>0?this._line.points()[0].price:this._line._timePoint.length>0?this._line._timePoint[0].price:void 0}setPrice(e){return this._line.points().length>0&&(this._line.points()[0].price=e),this._line._timePoint.length>0&&(this._line._timePoint[0].price=e),this}getText(){return this._line.properties().text.value()}setText(e){return this._line.properties().text.setValue(e||""),this._line.updateAllViewsAndRedraw(),this}getArrowHeight(){return this._line.properties().arrowHeight.value()}setArrowHeight(e){return this._line.properties().arrowHeight.setValue(e||5),this}getArrowSpacing(){return this._line.properties().arrowSpacing.value()}setArrowSpacing(e){return this._line.properties().arrowSpacing.setValue(e||1),this}getDirection(){return this._line.properties().direction.value()}setDirection(e){return this._line.properties().direction.setValue(e||"buy"),this}getArrowColor(){var e=this._line.properties();return"buy"===this.getDirection()?e.arrowBuyColor.value():e.arrowSellColor.value()}setArrowColor(e){return"buy"===this.getDirection()?this.setArrowBuyColor(e):this.setArrowSellColor(e),this}setArrowBuyColor(e){return this._line.properties().arrowBuyColor.setValue(e),this}setArrowSellColor(e){return this._line.properties().arrowSellColor.setValue(e),this}getTextColor(){return r.getColorFromProperties(this._line.properties().textColor,this._line.properties().textTransparency)}setTextColor(e){return r.setColorToProperties(e,this._line.properties().textColor,this._line.properties().textTransparency),this}getFont(){return r.getFontFromProperties(this._line.properties().fontFamily,this._line.properties().fontSize,this._line.properties().fontBold,this._line.properties().fontItalic)}setFont(e){return r.setFontToProperties(e,this._line.properties().fontFamily,this._line.properties().fontSize,this._line.properties().fontBold,this._line.properties().fontItalic),this}setTooltip(e){return null==e?e="":e+="",this._line.properties().tooltip.setValue(e),this}getTooltip(){return this._line.properties().tooltip.value()}remove(){this._line._model.removeSource(this._line),delete this._line}getPoints(){return this._line.points()}}class h extends s{constructor(e,t){super(e,t||h.createProperties()),this._adapter=new c(this),this.customization.forcePriceAxisLabel=!1,this.customization.disableErasing=!0,this.customization.showInObjectTree=!1,this.setSelectionEnabled(!1),i.e("lt-pane-views").then(i.t.bind(null,"tjxb",7)).then(({ExecutionPaneView:e})=>{this._setPaneViews([new e(this,this._model)])})}zorder(){return a}pointsCount(){return h.POINTS_COUNT}name(){return"Execution"}hasContextMenu(){return!1}state(){return null}updateAllViews(){return this._isVisible()?s.prototype.updateAllViews.call(this):null}priceAxisViews(e,t){return this._isVisible()?s.prototype.priceAxisViews.call(this,e,t):null}
isSynchronizable(){return!1}static createProperties(e){var t=new n("linetoolexecution",e,!1,!1);return h._configureProperties(t),t}static _configureProperties(e){s._configureProperties(e)}}h.POINTS_COUNT=1,t.ExecutionsPositionController=l,t.LineToolExecution=h}).call(this,i("Kxc7"))},"7ADh":function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolFibWedgeBase",(function(){return o}));var s=i("Eyy1"),r=i("aO4+"),n=i("Ss5c");class o extends n.LineDataSource{pointsCount(){return 3}hasEditableCoordinates(){return!1}setPoint(e,t){if(super.setPoint(e,t),!this._recursiveGuard)try{if(this._recursiveGuard=!0,2===e){const e=this.pointToScreenPoint(this._points[0])[0];let t=this.pointToScreenPoint(this._points[1])[0];const i=this.pointToScreenPoint(this._points[2])[0].subtract(e).length();let s=t.subtract(e);s.length()<=0&&(s=new r.Point(1,0)),t=e.add(s.normalized().scaled(i));const n=this.screenPointToPoint(t),o=this._pointsProperty.childs().points[1];o.childs().price.setValue(n.price),o.childs().bar.setValue(n.index)}else{const e=this.pointToScreenPoint(this._points[0])[0],t=this.pointToScreenPoint(this._points[1])[0];let i=this.pointToScreenPoint(this._points[2])[0];const s=t.subtract(e).length();let n=i.subtract(e);n.length()<=0&&(n=new r.Point(1,0)),i=e.add(n.normalized().scaled(s));const o=this.screenPointToPoint(i),a=this._pointsProperty.childs().points[2];a.childs().price.setValue(o.price),a.childs().bar.setValue(o.index)}}finally{this._recursiveGuard=!1}}addPoint(e){if(2===this._points.length){const t=this.pointToScreenPoint(this._points[0])[0],i=this.pointToScreenPoint(this._points[1])[0];let r=this.pointToScreenPoint(e)[0];const n=i.subtract(t).length(),o=r.subtract(t).normalized();r=t.add(o.scaled(n));const a=Object(s.ensureNotNull)(this.ownerSource()),l=Object(s.ensureNotNull)(a.firstValue()),c=Object(s.ensureNotNull)(this.priceScale()).coordinateToPrice(r.y,l);e={index:Math.round(this._model.timeScale().coordinateToIndex(r.x)),price:c}}return n.LineDataSource.prototype.addPoint.call(this,e)}}},"7ETO":function(e,t,i){"use strict";i.r(t);var s=i("ocLq");class r{main(e){const t=e.new_var(s.Std.open(e)),i=e.new_var(s.Std.close(e)),r=t.get(1),n=i.get(1),o=s.Std.ohlc4(e),a=s.Std.na(t.get(1))?(s.Std.open(e)+s.Std.close(e))/2:(r+n)/2;t.set(a),i.set(o);const l=s.Std.max(s.Std.high(e),s.Std.max(a,o)),c=s.Std.min(s.Std.low(e),s.Std.min(a,o)),h=s.Std.volume(e),u=e.symbol;return[u.time,a,l,c,o,h,u.updatetime,u.isBarClosed]}}function n(e){if(0===e.type.indexOf("BarSetHeikenAshi@tv-basicstudies-"))return new r;const t="unknown builder type: "+e.type;throw console.error(t),new Error(t)}i.d(t,"getChartStyleStudy",(function(){return n}))},"7Fue":function(e,t,i){"use strict";i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return n}));const s=["horizlines","vertlines","lines","hlines","textmarks","shapemarks","backgrounds","polygons","trendchannels","hhists","dwglabels","dwglines","dwgboxes","dwgtables","dwgtablecells"];function r(e){return!s.some(t=>e[t]().size>0)}function n(e){const t=new Map;return e.forEach((e,i)=>{ _isVisible(){return this._model.properties().tradingProperties.showExecutions.value()}paneViews(){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showExecutions.value()?s.prototype.paneViews.call(this):null}userEditEnabled(){return!1}showInObjectTree(){return!1}cloneable(){return!1}copiable(){return!1}isSynchronizable(){return!1}static createProperties(e){var t=new n("linetoolexecution",e,!1,!1);return h._configureProperties(t),t}static _configureProperties(e){s._configureProperties(e)}}h.POINTS_COUNT=1,t.ExecutionsPositionController=l,t.LineToolExecution=h}).call(this,i("Kxc7"))},"7ADh":function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolFibWedgeBase",(function(){return o}));var s=i("Eyy1"),r=i("aO4+"),n=i("Ss5c");class o extends n.LineDataSource{pointsCount(){return 3}hasEditableCoordinates(){return!1}setPoint(e,t){if(super.setPoint(e,t),!this._recursiveGuard)try{if(this._recursiveGuard=!0,2===e){const e=this.pointToScreenPoint(this._points[0])[0];let t=this.pointToScreenPoint(this._points[1])[0];const i=this.pointToScreenPoint(this._points[2])[0].subtract(e).length();let s=t.subtract(e);s.length()<=0&&(s=new r.Point(1,0)),t=e.add(s.normalized().scaled(i));const n=this.screenPointToPoint(t),o=this._pointsProperty.childs().points[1];o.childs().price.setValue(n.price),o.childs().bar.setValue(n.index)}else{const e=this.pointToScreenPoint(this._points[0])[0],t=this.pointToScreenPoint(this._points[1])[0];let i=this.pointToScreenPoint(this._points[2])[0];const s=t.subtract(e).length();let n=i.subtract(e);n.length()<=0&&(n=new r.Point(1,0)),i=e.add(n.normalized().scaled(s));const o=this.screenPointToPoint(i),a=this._pointsProperty.childs().points[2];a.childs().price.setValue(o.price),a.childs().bar.setValue(o.index)}}finally{this._recursiveGuard=!1}}addPoint(e){if(2===this._points.length){const t=this.pointToScreenPoint(this._points[0])[0],i=this.pointToScreenPoint(this._points[1])[0];let r=this.pointToScreenPoint(e)[0];const n=i.subtract(t).length(),o=r.subtract(t).normalized();r=t.add(o.scaled(n));const a=Object(s.ensureNotNull)(this.ownerSource()),l=Object(s.ensureNotNull)(a.firstValue()),c=Object(s.ensureNotNull)(this.priceScale()).coordinateToPrice(r.y,l);e={index:Math.round(this._model.timeScale().coordinateToIndex(r.x)),price:c}}return n.LineDataSource.prototype.addPoint.call(this,e)}}},"7ETO":function(e,t,i){"use strict";i.r(t);var s=i("ocLq");class r{main(e){const t=e.new_var(s.Std.open(e)),i=e.new_var(s.Std.close(e)),r=t.get(1),n=i.get(1),o=s.Std.ohlc4(e),a=s.Std.na(t.get(1))?(s.Std.open(e)+s.Std.close(e))/2:(r+n)/2;t.set(a),i.set(o);const l=s.Std.max(s.Std.high(e),s.Std.max(a,o)),c=s.Std.min(s.Std.low(e),s.Std.min(a,o)),h=s.Std.volume(e),u=e.symbol;return[u.time,a,l,c,o,h,u.updatetime,u.isBarClosed]}}function n(e){if(0===e.type.indexOf("BarSetHeikenAshi@tv-basicstudies-"))return new r;const t="unknown builder type: "+e.type;throw console.error(t),new Error(t)}i.d(t,"getChartStyleStudy",(function(){return n}))},"7Fue":function(e,t,i){
e.forEach(e=>{const s=Object.assign(Object.assign({},e),{styleId:i}),r=e.firstBarTime;let n=t.get(r);void 0===n&&(n=new Set,t.set(r,n)),n.add(s)})}),t}},"7KDR":function(e,t,i){"use strict";i.r(t),i.d(t,"Action",(function(){return l})),i.d(t,"ActionAsync",(function(){return c})),i.d(t,"Separator",(function(){return h}));var s=i("zRdu"),r=i("aIyQ"),n=i.n(r),o=i("/3z9"),a=i("e3/o");class l{constructor(e,t=a.guid()){this.type=s.a.Action,this._destroyed=!1,this._binding=null,this.id=t,this._onUpdate=new n.a,this._options=e,this.update(e)}execute(){this._options.checkable&&this.update({checked:!this._options.checked}),this._options.onExecute&&this._options.onExecute(this)}getLabel(){return this._options.label||""}getSubItems(){return this._options.subItems||[]}isDisabled(){return!0===this._options.disabled}isActive(){return!0===this._options.active}isCheckable(){return!0===this._options.checkable}isChecked(){return!0===this._options.checked}getPayload(){return this._options.payload}update(e){this._destroyed||(this._unbindShortcut(),e.hotkeyHash&&(this._options.shortcutHint=Object(o.humanReadableHash)(e.hotkeyHash)),this._options=Object.assign(this._options,e),this._bindShortcut(),this._onUpdate.fire(this))}onUpdate(){return this._onUpdate}getState(){return{label:this.getLabel(),disabled:this.isDisabled(),active:this.isActive(),subItems:this.getSubItems(),checkable:this.isCheckable(),checked:this.isChecked(),doNotCloseOnClick:this._options.doNotCloseOnClick||!1,shortcutHint:this._options.shortcutHint,hint:this._options.hint,icon:this._options.icon,iconChecked:this._options.iconChecked,toolbox:this._options.toolbox,showToolboxOnHover:this._options.showToolboxOnHover||!1,statName:this._options.statName,name:this._options.name,fullWidthLabel:this._options.fullWidthLabel}}getBinding(){return this._binding}setBinding(e){this._binding=e}destroy(){this._destroyed=!0,this._onUpdate.destroy(),null!==this._binding&&this._binding.destroy(),this._unbindShortcut()}_bindShortcut(){if(!this._options.hotkeyGroup||!this._options.hotkeyHash)return;const e="string"==typeof this._options.label?this._options.label:this._options.name;this._hotkeyAction=this._options.hotkeyGroup.add({hotkey:this._options.hotkeyHash,desc:e,handler:()=>this.execute(),isDisabled:()=>this.isDisabled()})}_unbindShortcut(){this._hotkeyAction&&(this._hotkeyAction.destroy(),delete this._hotkeyAction)}}class c extends l{constructor(e,t){super({},t),this.type=s.a.ActionAsync,this._loader=e,this._loaded=!1}loadOptions(){return this._loadingPromise||(this._loadingPromise=this._loader().then(e=>{this.update(e),this._loaded=!0})),this._loadingPromise}isLoaded(){return this._loaded}}class h{constructor(e,t=a.guid()){this.type=s.a.Separator,this.id=t,this._hint=e}getHint(){return this._hint}}},"7MWe":function(e,t,i){"use strict";i.r(t),i.d(t,"PriceScaleChangeUndoCommand",(function(){return a}));var s=i("Eyy1"),r=i("txPx"),n=i("RDU5");const o=Object(r.getLogger)("Chart.ChartUndoModel");class a extends n.UndoCommand{constructor(e,t,i,s){super("Scale price",!1), "use strict";i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return n}));const s=["horizlines","vertlines","lines","hlines","textmarks","shapemarks","backgrounds","polygons","trendchannels","hhists","dwglabels","dwglines","dwgboxes","dwgtables","dwgtablecells"];function r(e){return!s.some(t=>e[t]().size>0)}function n(e){const t=new Map;return e.forEach((e,i)=>{e.forEach(e=>{const s=Object.assign(Object.assign({},e),{styleId:i}),r=e.firstBarTime;let n=t.get(r);void 0===n&&(n=new Set,t.set(r,n)),n.add(s)})}),t}},"7KDR":function(e,t,i){"use strict";i.r(t),i.d(t,"Action",(function(){return l})),i.d(t,"ActionAsync",(function(){return c})),i.d(t,"Separator",(function(){return h}));var s=i("zRdu"),r=i("aIyQ"),n=i.n(r),o=i("/3z9"),a=i("e3/o");class l{constructor(e,t=a.guid()){this.type=s.a.Action,this._destroyed=!1,this._binding=null,this.id=t,this._onUpdate=new n.a,this._options=e,this.update(e)}execute(){this._options.checkable&&this.update({checked:!this._options.checked}),this._options.onExecute&&this._options.onExecute(this)}getLabel(){return this._options.label||""}getSubItems(){return this._options.subItems||[]}isDisabled(){return!0===this._options.disabled}isActive(){return!0===this._options.active}isCheckable(){return!0===this._options.checkable}isChecked(){return!0===this._options.checked}getPayload(){return this._options.payload}update(e){this._destroyed||(this._unbindShortcut(),e.hotkeyHash&&(this._options.shortcutHint=Object(o.humanReadableHash)(e.hotkeyHash)),this._options=Object.assign(this._options,e),this._bindShortcut(),this._onUpdate.fire(this))}onUpdate(){return this._onUpdate}getState(){return{label:this.getLabel(),disabled:this.isDisabled(),active:this.isActive(),subItems:this.getSubItems(),checkable:this.isCheckable(),checked:this.isChecked(),doNotCloseOnClick:this._options.doNotCloseOnClick||!1,shortcutHint:this._options.shortcutHint,hint:this._options.hint,icon:this._options.icon,iconChecked:this._options.iconChecked,toolbox:this._options.toolbox,showToolboxOnHover:this._options.showToolboxOnHover||!1,statName:this._options.statName,name:this._options.name,fullWidthLabel:this._options.fullWidthLabel}}getBinding(){return this._binding}setBinding(e){this._binding=e}destroy(){this._destroyed=!0,this._onUpdate.destroy(),null!==this._binding&&this._binding.destroy(),this._unbindShortcut()}_bindShortcut(){if(!this._options.hotkeyGroup||!this._options.hotkeyHash)return;const e="string"==typeof this._options.label?this._options.label:this._options.name;this._hotkeyAction=this._options.hotkeyGroup.add({hotkey:this._options.hotkeyHash,desc:e,handler:()=>this.execute(),isDisabled:()=>this.isDisabled()})}_unbindShortcut(){this._hotkeyAction&&(this._hotkeyAction.destroy(),delete this._hotkeyAction)}}class c extends l{constructor(e,t){super({},t),this.type=s.a.ActionAsync,this._loader=e,this._loaded=!1}loadOptions(){return this._loadingPromise||(this._loadingPromise=this._loader().then(e=>{this.update(e),this._loaded=!0})),this._loadingPromise}isLoaded(){return this._loaded}}class h{
this._newPriceScaleState=null,this._model=e,this._paneIndex=e.panes().indexOf(t),this._priceScaleId=i.id(),this._state=s}undo(){if(null!==this._newPriceScaleState)return void o.logDebug("PriceScaleChangeUndoCommand.undo: Command is already undone");const[e,t]=this._paneAndScale();this._newPriceScaleState=t.state(),this._model.restorePriceScaleState(e,t,this._state)}redo(){if(null===this._newPriceScaleState)return void o.logDebug("PriceScaleChangeUndoCommand.redo: Command is not undone");const[e,t]=this._paneAndScale();this._model.restorePriceScaleState(e,t,this._newPriceScaleState),this._newPriceScaleState=null}_paneAndScale(){const e=this._model.panes()[this._paneIndex],t=Object(s.ensureNotNull)(e.getPriceScaleById(this._priceScaleId));return[e,t]}}},"7RN7":function(e,t,i){"use strict";i.d(t,"b",(function(){return s})),i.d(t,"a",(function(){return r}));const s=52,r=5},"7dm8":function(e,t,i){"use strict";i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return o})),i.d(t,"d",(function(){return a})),i.d(t,"e",(function(){return l}));var s=i("ocLq");class r{init(e,t){e.new_sym(t(1),s.Std.period(e)),this._source=t(0),this._scaleFactor1=1,this._scaleFactor2=1}main(e,t){const i=e.symbol.time,r=s.Std[this._source](e);e.select_sym(1);const n=s.Std[this._source](e),o=e.new_unlimited_var(n),a=e.new_unlimited_var(e.symbol.time);if(e.select_sym(0),isNaN(i))return null;let l=a.indexOf(i);-1!==l&&a.get(l)!==i&&(l=-1);const c=l<0?NaN:o.get(l);return[this._doCalculation(this._scaleFactor1,r,this._scaleFactor2,c)]}}const n={styles:{plot1:{linestyle:0,linewidth:2,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800080"}},precision:2,inputs:{source:"close",symbol2:""}},o=[{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 s=i("fgLi"),r=i("aIyQ"),n=i.n(r),o=i("/tGj");class a extends s.DataSource{constructor(e){super(),this._formatterChanged=new n.a,this._priceStepChanged=new n.a,this._currencyChanged=new n.a,this._unitChanged=new n.a,this._priceRangeReadyChanged=new n.a,this._metaInfo=null,this._priceStep=null,this._priceRangeReady=!0,this._model=e}firstValue(){return null}barColorer(){return null}base(){return 0}model(){return this._model}currencyChanged(){return this._currencyChanged}isCurrencySource(){return!0}unitChanged(){return this._unitChanged}isUnitSource(){return!0}priceRange(e,t){return null}isDraggable(){return!this._metaInfo||!this._metaInfo.linkedToSeries}priceLineColor(e){return e}formatterChanged(){return this._formatterChanged}priceStep(e){return this._priceStep}priceStepChanged(){return this._priceStepChanged}hasStateForAlert(){return!1}isIncludedInAutoScale(){return!0}correctScaleMargins(e){return e}priceRangeReady(){return this._priceRangeReady}priceRangeReadyChanged(){ constructor(e,t=a.guid()){this.type=s.a.Separator,this.id=t,this._hint=e}getHint(){return this._hint}}},"7MWe":function(e,t,i){"use strict";i.r(t),i.d(t,"PriceScaleChangeUndoCommand",(function(){return a}));var s=i("Eyy1"),r=i("txPx"),n=i("RDU5");const o=Object(r.getLogger)("Chart.ChartUndoModel");class a extends n.UndoCommand{constructor(e,t,i,s){super("Scale price",!1),this._newPriceScaleState=null,this._model=e,this._paneIndex=e.panes().indexOf(t),this._priceScaleId=i.id(),this._state=s}undo(){if(null!==this._newPriceScaleState)return void o.logDebug("PriceScaleChangeUndoCommand.undo: Command is already undone");const[e,t]=this._paneAndScale();this._newPriceScaleState=t.state(),this._model.restorePriceScaleState(e,t,this._state)}redo(){if(null===this._newPriceScaleState)return void o.logDebug("PriceScaleChangeUndoCommand.redo: Command is not undone");const[e,t]=this._paneAndScale();this._model.restorePriceScaleState(e,t,this._newPriceScaleState),this._newPriceScaleState=null}_paneAndScale(){const e=this._model.panes()[this._paneIndex],t=Object(s.ensureNotNull)(e.getPriceScaleById(this._priceScaleId));return[e,t]}}},"7RN7":function(e,t,i){"use strict";i.d(t,"b",(function(){return s})),i.d(t,"a",(function(){return r}));const s=52,r=5},"7dm8":function(e,t,i){"use strict";i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return o})),i.d(t,"d",(function(){return a})),i.d(t,"e",(function(){return l}));var s=i("ocLq");class r{init(e,t){e.new_sym(t(1),s.Std.period(e)),this._source=t(0),this._scaleFactor1=1,this._scaleFactor2=1}main(e,t){const i=e.symbol.time,r=s.Std[this._source](e);e.select_sym(1);const n=s.Std[this._source](e),o=e.new_unlimited_var(n),a=e.new_unlimited_var(e.symbol.time);if(e.select_sym(0),isNaN(i))return null;let l=a.indexOf(i);-1!==l&&a.get(l)!==i&&(l=-1);const c=l<0?NaN:o.get(l);return[this._doCalculation(this._scaleFactor1,r,this._scaleFactor2,c)]}}const n={styles:{plot1:{linestyle:0,linewidth:2,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800080"}},precision:2,inputs:{source:"close",symbol2:""}},o=[{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 s=i("fgLi"),r=i("aIyQ"),n=i.n(r),o=i("/tGj");class a extends s.DataSource{constructor(e){super(),this._formatterChanged=new n.a,this._priceStepChanged=new n.a,this._currencyChanged=new n.a,this._unitChanged=new n.a,this._priceRangeReadyChanged=new n.a,this._metaInfo=null,this._priceStep=null,this._priceRangeReady=!0,this._model=e}firstValue(){return null}barColorer(){return null}base(){return 0}model(){return this._model}currencyChanged(){return this._currencyChanged}isCurrencySource(){return!0}unitChanged(){return this._unitChanged}isUnitSource(){return!0}priceRange(e,t){return null}isDraggable(){
return this._priceRangeReadyChanged}disablePriceRangeReady(){const e=this.priceScale();null===e||e.isAutoScale()||e.mainSource()!==this||(this._priceRangeReady=!1,e.recalculatePriceRangeOnce()),this._priceRangeReadyChanged.fire(!1)}_enablePriceRangeReady(){this._priceRangeReady=!0,this._priceRangeReadyChanged.fire(!0)}_onSourceCurrencyChanged(){Object(o.isSymbolSource)(this)||this._currencyChanged.fire()}_onSourceUnitChanged(){Object(o.isSymbolSource)(this)||this._unitChanged.fire()}_onSourcePriceRangeReadyChanged(e){Object(o.isSymbolSource)(this)||e||this.disablePriceRangeReady()}}},"7nsU":function(e,t,i){"use strict";i.r(t),i.d(t,"showConfirmInputsDialog",(function(){return s}));i("YFKU");function s(e,t,s,r,n="default"){Promise.all([i.e("react"),i.e(1),i.e(2),i.e(3),i.e(6),i.e(7),i.e(8),i.e(9),i.e(11),i.e(13),i.e(15),i.e(19),i.e(21),i.e(28),i.e(30),i.e(31),i.e(34),i.e(39),i.e(49),i.e(59),i.e(100),i.e(0),i.e(5),i.e(4),i.e(12),i.e(17),i.e(25),i.e(26),i.e(27),i.e(36),i.e(45),i.e(54),i.e("new-confirm-inputs-dialog")]).then(i.bind(null,"iqv3")).then(i=>{const o=new i.ConfirmInputsDialogRenderer(function(e){if("symbol"===e)return window.t("Add Symbol");return window.t("Confirm Inputs")}(n),e,t,n,s,r);return o.show(),o})}},"7qI1":function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolRectangle",(function(){return c}));var s=i("aO4+"),r=i("Ocx9"),n=i("tc+8"),o=i.n(n),a=i("Ss5c"),l=i("j3hX");class c extends a.LineDataSource{constructor(e,t){const s=t||c.createProperties();super(e,s),i.e("lt-pane-views").then(i.bind(null,"GW0y")).then(({RectanglePaneView:t})=>{const i=[new t(this,e)];this._setPaneViews(i)})}pointsCount(){return 2}textColorsProperty(){return this.properties().childs().showLabel.value()?super.textColorsProperty():null}properties(){return super.properties()}name(){return"Rectangle"}setPoint(e,t,i){if(e<2&&super.setPoint(e,t,i),i&&i.shift()&&this.properties().childs().snapTo45Degrees){const i=this._getAnchorPointForIndex(e);if(e>=4)return this._correctMiddlePoints(e,t,i),void this.normalizePoints();this._snapPoint45Degree(t,i)}switch(e){case 2:this._points[1].price=t.price,this._points[0].index=t.index;break;case 3:this._points[0].price=t.price,this._points[1].index=t.index;break;case 4:this._points[0].index=t.index;break;case 5:this._points[1].index=t.index;break;case 6:this._points[0].price=t.price;break;case 7:this._points[1].price=t.price}this.normalizePoints()}getPoint(e){return e<2?super.getPoint(e):this._getAnchorPointForIndex(e)}template(){const e=super.template();return e.text=this.properties().childs().text.value(),e}static createProperties(e){const t=new r.DefaultProperty("linetoolrectangle",e);return c._configureProperties(t),t}_getPropertyDefinitionsViewModelClass(){return Promise.all([i.e(33),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"K4wI")).then(e=>e.RectangleDefinitionsViewModel)}_applyTemplateImpl(e){super._applyTemplateImpl(e),this.properties().childs().text.setValue(e.text)}_snapPoint45Degree(e,t,i){const s=this.m_priceScale,r=this.ownerSource();if(null===s||null===r)return return!this._metaInfo||!this._metaInfo.linkedToSeries}priceLineColor(e){return e}formatterChanged(){return this._formatterChanged}priceStep(e){return this._priceStep}priceStepChanged(){return this._priceStepChanged}hasStateForAlert(){return!1}isIncludedInAutoScale(){return!0}correctScaleMargins(e){return e}priceRangeReady(){return this._priceRangeReady}priceRangeReadyChanged(){return this._priceRangeReadyChanged}disablePriceRangeReady(){const e=this.priceScale();null===e||e.isAutoScale()||e.mainSource()!==this||(this._priceRangeReady=!1,e.recalculatePriceRangeOnce()),this._priceRangeReadyChanged.fire(!1)}_enablePriceRangeReady(){this._priceRangeReady=!0,this._priceRangeReadyChanged.fire(!0)}_onSourceCurrencyChanged(){Object(o.isSymbolSource)(this)||this._currencyChanged.fire()}_onSourceUnitChanged(){Object(o.isSymbolSource)(this)||this._unitChanged.fire()}_onSourcePriceRangeReadyChanged(e){Object(o.isSymbolSource)(this)||e||this.disablePriceRangeReady()}}},"7nsU":function(e,t,i){"use strict";i.r(t),i.d(t,"showConfirmInputsDialog",(function(){return s}));i("YFKU");function s(e,t,s,r,n="default"){Promise.all([i.e("react"),i.e(1),i.e(2),i.e(3),i.e(6),i.e(7),i.e(8),i.e(9),i.e(11),i.e(13),i.e(15),i.e(19),i.e(21),i.e(28),i.e(30),i.e(31),i.e(34),i.e(39),i.e(49),i.e(59),i.e(100),i.e(0),i.e(5),i.e(4),i.e(12),i.e(17),i.e(25),i.e(26),i.e(27),i.e(36),i.e(45),i.e(54),i.e("new-confirm-inputs-dialog")]).then(i.bind(null,"iqv3")).then(i=>{const o=new i.ConfirmInputsDialogRenderer(function(e){if("symbol"===e)return window.t("Add Symbol");return window.t("Confirm Inputs")}(n),e,t,n,s,r);return o.show(),o})}},"7qI1":function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolRectangle",(function(){return c}));var s=i("aO4+"),r=i("Ocx9"),n=i("tc+8"),o=i.n(n),a=i("Ss5c"),l=i("j3hX");class c extends a.LineDataSource{constructor(e,t){const s=t||c.createProperties();super(e,s),i.e("lt-pane-views").then(i.bind(null,"GW0y")).then(({RectanglePaneView:t})=>{const i=[new t(this,e)];this._setPaneViews(i)})}pointsCount(){return 2}textColorsProperty(){return this.properties().childs().showLabel.value()?super.textColorsProperty():null}properties(){return super.properties()}name(){return"Rectangle"}setPoint(e,t,i){if(e<2&&super.setPoint(e,t,i),i&&i.shift()&&this.properties().childs().snapTo45Degrees){const i=this._getAnchorPointForIndex(e);if(e>=4)return this._correctMiddlePoints(e,t,i),void this.normalizePoints();this._snapPoint45Degree(t,i)}switch(e){case 2:this._points[1].price=t.price,this._points[0].index=t.index;break;case 3:this._points[0].price=t.price,this._points[1].index=t.index;break;case 4:this._points[0].index=t.index;break;case 5:this._points[1].index=t.index;break;case 6:this._points[0].price=t.price;break;case 7:this._points[1].price=t.price}this.normalizePoints()}getPoint(e){return e<2?super.getPoint(e):this._getAnchorPointForIndex(e)}template(){const e=super.template();return e.text=this.properties().childs().text.value(),e}static createProperties(e){const t=new r.DefaultProperty("linetoolrectangle",e);return c._configureProperties(t),t}
;const n=r.firstValue();if(null===n)return;const o=this._model.timeScale(),a=this.pointToScreenPoint(e)[0],l=this.pointToScreenPoint(t)[0],c=a.x-l.x,h=a.y-l.y,u=c<0?-1:1,d=h<0?-1:1,p=Math.max(Math.abs(c),Math.abs(h)),_=Math.round(o.coordinateToIndex(l.x+p*u)),m=Math.abs(o.indexToCoordinate(_)-l.x),f=s.coordinateToPrice(l.y+m*d,n);e.index=_,e.price=f}_correctMiddlePoints(e,t,i){e<6?this._correctRightLeftMiddlePoint(e,t,i):this._correctTopBottomMiddlePoint(e,t,i)}_correctRightLeftMiddlePoint(e,t,i){const r=this.pointToScreenPoint(t)[0],n=this.pointToScreenPoint(i)[0],o=this.pointToScreenPoint(this._points[0])[0],a=this.pointToScreenPoint(this._points[1])[0];let l=r.x-n.x;if(0===l)return;const c=o.x<a.x?1:-1,h=o.y<a.y?1:-1;switch(l*=c,e){case 4:{const e=a.y-h*l/2,t=this.screenPointToPoint(new s.Point(a.x,e));this._points[1].price=t.price;const i=this.screenPointToPoint(new s.Point(o.x+c*l,o.y+h*l/2));this._points[0].price=i.price,this._points[0].index=i.index;break}case 5:{const e=o.y-h*l/2,t=this.screenPointToPoint(new s.Point(o.x,e));this._points[0].price=t.price;const i=this.screenPointToPoint(new s.Point(a.x+c*l,a.y+h*l/2));this._points[1].price=i.price,this._points[1].index=i.index;break}}}_correctTopBottomMiddlePoint(e,t,i){const r=this.m_priceScale,n=this.ownerSource();if(null===r||null===n)return;const o=this._model.timeScale(),a=n.firstValue();if(null===a)return;const l=this.pointToScreenPoint(t)[0],c=this.pointToScreenPoint(i)[0],h=this.pointToScreenPoint(this._points[0])[0],u=this.pointToScreenPoint(this._points[1])[0],d=l.y-c.y,p=d<0?-1:1,_=h.x<u.x?1:-1,m=h.y<u.y?1:-1;switch(e){case 6:{const e=Math.floor(u.x-_*d/2),t=this.screenPointToPoint(new s.Point(e,u.y)),i=Math.abs(this._points[1].index-t.index),n=_*m*p*Math.ceil(i/2);if(0===n)return;this._points[1].index=this._points[1].index-n;const l=p*Math.abs(o.indexToCoordinate(this._points[1].index)-u.x);this._points[0].price=r.coordinateToPrice(h.y+l,a),this._points[0].index=this._points[0].index+n;break}case 7:{const e=Math.floor(h.x-_*d/2),t=this.screenPointToPoint(new s.Point(e,h.y)),i=Math.abs(this._points[0].index-t.index),n=_*m*p*Math.ceil(i/2);if(0===n)return;this._points[0].index=this._points[0].index-n;const l=p*Math.abs(o.indexToCoordinate(this._points[0].index)-h.x);this._points[1].price=r.coordinateToPrice(u.y+l,a),this._points[1].index=this._points[1].index+n;break}}}static _configureProperties(e){a.LineDataSource._configureProperties(e),e.hasChild("text")||e.addChild("text",new o.a("")),e.addExclusion("text"),e.addChild("linesColors",new l.LineToolColorsProperty([e.childs().color])),e.addChild("textsColors",new l.LineToolColorsProperty([e.childs().textColor],e.childs().showLabel))}_getAnchorPointForIndex(e){const t=this.points(),i=t[0],s=t[1];let r=0,n=0;switch(e){case 0:r=i.price,n=i.index;break;case 1:r=s.price,n=s.index;break;case 2:r=s.price,n=i.index;break;case 3:r=i.price,n=s.index;break;case 4:r=(s.price+i.price)/2,n=i.index;break;case 5:r=(s.price+i.price)/2,n=s.index;break;case 6:r=i.price,n=(s.index+i.index)/2;break;case 7:r=s.price, _getPropertyDefinitionsViewModelClass(){return Promise.all([i.e(33),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"K4wI")).then(e=>e.RectangleDefinitionsViewModel)}_applyTemplateImpl(e){super._applyTemplateImpl(e),this.properties().childs().text.setValue(e.text)}_snapPoint45Degree(e,t,i){const s=this.m_priceScale,r=this.ownerSource();if(null===s||null===r)return;const n=r.firstValue();if(null===n)return;const o=this._model.timeScale(),a=this.pointToScreenPoint(e)[0],l=this.pointToScreenPoint(t)[0],c=a.x-l.x,h=a.y-l.y,u=c<0?-1:1,d=h<0?-1:1,p=Math.max(Math.abs(c),Math.abs(h)),_=Math.round(o.coordinateToIndex(l.x+p*u)),m=Math.abs(o.indexToCoordinate(_)-l.x),f=s.coordinateToPrice(l.y+m*d,n);e.index=_,e.price=f}_correctMiddlePoints(e,t,i){e<6?this._correctRightLeftMiddlePoint(e,t,i):this._correctTopBottomMiddlePoint(e,t,i)}_correctRightLeftMiddlePoint(e,t,i){const r=this.pointToScreenPoint(t)[0],n=this.pointToScreenPoint(i)[0],o=this.pointToScreenPoint(this._points[0])[0],a=this.pointToScreenPoint(this._points[1])[0];let l=r.x-n.x;if(0===l)return;const c=o.x<a.x?1:-1,h=o.y<a.y?1:-1;switch(l*=c,e){case 4:{const e=a.y-h*l/2,t=this.screenPointToPoint(new s.Point(a.x,e));this._points[1].price=t.price;const i=this.screenPointToPoint(new s.Point(o.x+c*l,o.y+h*l/2));this._points[0].price=i.price,this._points[0].index=i.index;break}case 5:{const e=o.y-h*l/2,t=this.screenPointToPoint(new s.Point(o.x,e));this._points[0].price=t.price;const i=this.screenPointToPoint(new s.Point(a.x+c*l,a.y+h*l/2));this._points[1].price=i.price,this._points[1].index=i.index;break}}}_correctTopBottomMiddlePoint(e,t,i){const r=this.m_priceScale,n=this.ownerSource();if(null===r||null===n)return;const o=this._model.timeScale(),a=n.firstValue();if(null===a)return;const l=this.pointToScreenPoint(t)[0],c=this.pointToScreenPoint(i)[0],h=this.pointToScreenPoint(this._points[0])[0],u=this.pointToScreenPoint(this._points[1])[0],d=l.y-c.y,p=d<0?-1:1,_=h.x<u.x?1:-1,m=h.y<u.y?1:-1;switch(e){case 6:{const e=Math.floor(u.x-_*d/2),t=this.screenPointToPoint(new s.Point(e,u.y)),i=Math.abs(this._points[1].index-t.index),n=_*m*p*Math.ceil(i/2);if(0===n)return;this._points[1].index=this._points[1].index-n;const l=p*Math.abs(o.indexToCoordinate(this._points[1].index)-u.x);this._points[0].price=r.coordinateToPrice(h.y+l,a),this._points[0].index=this._points[0].index+n;break}case 7:{const e=Math.floor(h.x-_*d/2),t=this.screenPointToPoint(new s.Point(e,h.y)),i=Math.abs(this._points[0].index-t.index),n=_*m*p*Math.ceil(i/2);if(0===n)return;this._points[0].index=this._points[0].index-n;const l=p*Math.abs(o.indexToCoordinate(this._points[0].index)-h.x);this._points[1].price=r.coordinateToPrice(u.y+l,a),this._points[1].index=this._points[1].index+n;break}}}static _configureProperties(e){a.LineDataSource._configureProperties(e),e.hasChild("text")||e.addChild("text",new o.a("")),e.addExclusion("text"),e.addChild("linesColors",new l.LineToolColorsProperty([e.childs().color])),
n=(s.index+i.index)/2}return{index:n,price:r}}}},"7qT/":function(e,t,i){"use strict";function s(e,t){return 100*(t-e)/Math.abs(e)}i.d(t,"a",(function(){return s}))},"8Blv":function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolImage",(function(){return l}));var s=i("Eyy1"),r=i("Ocx9"),n=i("tc+8"),o=i.n(n),a=i("Ss5c");class l extends a.LineDataSource{constructor(e,t){super(e,t||l.createProperties()),this._cssWidth=0,this._cssHeight=0,this._angle=0,this._image=document.createElement("img");const r=this.properties();this._image.src=Object(s.ensureDefined)(r.child("url")).value(),this._image.onload=()=>{if(this._cssWidth&&this._cssHeight)return;const t=e.timeScale().width()/4,i=Object(s.ensureNotNull)(this.priceScale()).height()/4,r=this._image.width,n=this._image.height,o=Math.min(1,t/r),a=Math.min(1,i/n),l=Math.min(o,a),c=Math.round(l*r),h=Math.round(l*n);this._cssWidth=c,this._cssHeight=h},i.e("lt-pane-views").then(i.bind(null,"xiOp")).then(({ImagePaneView:t})=>{this._setPaneViews([new t(this,e)])})}state(e){const t=super.state(e);return Object.assign(Object.assign({},t),{cssWidth:this._cssWidth,cssHeight:this._cssHeight,angle:this._angle})}restoreData(e){this._cssWidth=e.cssWidth,this._cssHeight=e.cssHeight,this._angle=e.angle}cssWidth(){return this._cssWidth}cssHeight(){return this._cssHeight}angle(){return this._angle}pointsCount(){return 1}name(){return"Image"}image(){return this._image}setPoint(e,t,i){const r=this._model.timeScale(),n=Object(s.ensureNotNull)(this.priceScale()),o=Object(s.ensureNotNull)(this._model.paneForSource(this)),a=Object(s.ensureNotNull)(o.mainDataSource()),l=Object(s.ensureNotNull)(a.firstValue()),c=this._image.width,h=this._image.height,u=r.indexToCoordinate(t.index),d=n.priceToCoordinate(t.price,l),p=r.indexToCoordinate(this._points[0].index),_=n.priceToCoordinate(this._points[0].price,l),m=2*Math.abs(u-p)/c,f=2*Math.abs(d-_)/h,g=Math.min(m,f),v=Math.round(c*g),b=Math.round(h*g);this._cssWidth=v,this._cssHeight=b}static createProperties(e){const t=new r.DefaultProperty("linetoolimage",e);return l._configureProperties(t),t}static _configureProperties(e){a.LineDataSource._configureProperties(e),e.hasChild("url")||e.addChild("url",new o.a("")),e.addExclusion("url")}}},"8C8C":function(e,t,i){"use strict";i.r(t),i.d(t,"RestoreFactoryDefaultsUndoCommand",(function(){return r}));var s=i("RDU5");class r extends s.UndoCommand{constructor(e,t,i="Restore Defaults"){super(i),this._chartModel=e,this._defaultProperty=t,this._state=t.state()}redo(){this._chartModel.restoreFactoryDefaults(this._defaultProperty)}undo(){this._defaultProperty.mergeAndFire(this._state),this._chartModel.mainSeries().onChartStyleChanged()}}},"8OdW":function(e,t,i){"use strict";i.r(t),i.d(t,"MINUTE_SPAN",(function(){return s})),i.d(t,"HOUR_SPAN",(function(){return r})),i.d(t,"DAY_SPAN",(function(){return n})),i.d(t,"WEEK_SPAN",(function(){return o})),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}));const s=20,r=30,n=40,o=50,a=60,l=70,c=6}, e.addChild("textsColors",new l.LineToolColorsProperty([e.childs().textColor],e.childs().showLabel))}_getAnchorPointForIndex(e){const t=this.points(),i=t[0],s=t[1];let r=0,n=0;switch(e){case 0:r=i.price,n=i.index;break;case 1:r=s.price,n=s.index;break;case 2:r=s.price,n=i.index;break;case 3:r=i.price,n=s.index;break;case 4:r=(s.price+i.price)/2,n=i.index;break;case 5:r=(s.price+i.price)/2,n=s.index;break;case 6:r=i.price,n=(s.index+i.index)/2;break;case 7:r=s.price,n=(s.index+i.index)/2}return{index:n,price:r}}}},"7qT/":function(e,t,i){"use strict";function s(e,t){return 100*(t-e)/Math.abs(e)}i.d(t,"a",(function(){return s}))},"8Blv":function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolImage",(function(){return l}));var s=i("Eyy1"),r=i("Ocx9"),n=i("tc+8"),o=i.n(n),a=i("Ss5c");class l extends a.LineDataSource{constructor(e,t){super(e,t||l.createProperties()),this._cssWidth=0,this._cssHeight=0,this._angle=0,this._image=document.createElement("img");const r=this.properties();this._image.src=Object(s.ensureDefined)(r.child("url")).value(),this._image.onload=()=>{if(this._cssWidth&&this._cssHeight)return;const t=e.timeScale().width()/4,i=Object(s.ensureNotNull)(this.priceScale()).height()/4,r=this._image.width,n=this._image.height,o=Math.min(1,t/r),a=Math.min(1,i/n),l=Math.min(o,a),c=Math.round(l*r),h=Math.round(l*n);this._cssWidth=c,this._cssHeight=h},i.e("lt-pane-views").then(i.bind(null,"xiOp")).then(({ImagePaneView:t})=>{this._setPaneViews([new t(this,e)])})}state(e){const t=super.state(e);return Object.assign(Object.assign({},t),{cssWidth:this._cssWidth,cssHeight:this._cssHeight,angle:this._angle})}restoreData(e){this._cssWidth=e.cssWidth,this._cssHeight=e.cssHeight,this._angle=e.angle}cssWidth(){return this._cssWidth}cssHeight(){return this._cssHeight}angle(){return this._angle}pointsCount(){return 1}name(){return"Image"}image(){return this._image}setPoint(e,t,i){const r=this._model.timeScale(),n=Object(s.ensureNotNull)(this.priceScale()),o=Object(s.ensureNotNull)(this._model.paneForSource(this)),a=Object(s.ensureNotNull)(o.mainDataSource()),l=Object(s.ensureNotNull)(a.firstValue()),c=this._image.width,h=this._image.height,u=r.indexToCoordinate(t.index),d=n.priceToCoordinate(t.price,l),p=r.indexToCoordinate(this._points[0].index),_=n.priceToCoordinate(this._points[0].price,l),m=2*Math.abs(u-p)/c,f=2*Math.abs(d-_)/h,g=Math.min(m,f),v=Math.round(c*g),b=Math.round(h*g);this._cssWidth=v,this._cssHeight=b}static createProperties(e){const t=new r.DefaultProperty("linetoolimage",e);return l._configureProperties(t),t}static _configureProperties(e){a.LineDataSource._configureProperties(e),e.hasChild("url")||e.addChild("url",new o.a("")),e.addExclusion("url")}}},"8C8C":function(e,t,i){"use strict";i.r(t),i.d(t,"RestoreFactoryDefaultsUndoCommand",(function(){return r}));var s=i("RDU5");class r extends s.UndoCommand{constructor(e,t,i="Restore Defaults"){super(i),this._chartModel=e,this._defaultProperty=t,this._state=t.state()}redo(){this._chartModel.restoreFactoryDefaults(this._defaultProperty)}undo(){
"8Uy/":function(e,t,i){"use strict";i.r(t),i.d(t,"LINESTYLE_SOLID",(function(){return s})),i.d(t,"LINESTYLE_DOTTED",(function(){return r})),i.d(t,"LINESTYLE_DASHED",(function(){return n})),i.d(t,"LINESTYLE_LARGE_DASHED",(function(){return o})),i.d(t,"LINESTYLE_SPARSE_DOTTED",(function(){return a})),i.d(t,"LINESTYLE_SMALL_DASHED",(function(){return l}));const s=0,r=1,n=2,o=3,a=4,l=5},"8gnj":function(e,t,i){"use strict";var s=i("LxhU").Interval,r=i("OLhd").isAlignmentEnabled,n=i("7ETO").getChartStyleStudy,o=i("5fI3").decodeExtendedSymbol,a=function(){var e=i("ocLq"),t=e.StudyEngine,a=e.BarBuilder,l=e.BarSet;function c(e){this.host=e,this.cache={}}function h(e){throw console.error(e),e}c.prototype.getCache=function(e){return this.cache[e]},c.prototype.putCache=function(e,t){this.cache[e]=t},c.prototype.subscribe=function(e,t,i,s,r,n,o,a,l,c){var h=l(o),u=function(e,t,i,s,r,n,o,a){var l=r.has_empty_bars?"_":"";return n+e+s+(t||"")+(i||"")+l+"_"+o.countBack+"_"+o.to+"_"+Boolean(a)}(e,t,i,s,o,a,h,c),d=this.getCache(u);return d||(d=this.createItem(e,t,i,s,o,h,a,c),this.putCache(u,d)),d.listeners.addListener(r,n),{key:u,listener:r}},c.prototype.unsubscribe=function(e){var t=this.getCache(e.key);t&&t.listeners.removeListener(e.listener)},c.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<e.length;i++){var s=e[i],r=this.cache[s];this.cache[s]=null,r.stop()}this.removeUnused()}},c.prototype.rebuildFrom=function(e,t){var i=s.parse(e);if((i.isWeeks()||i.isMonths())&&t.has_weekly_and_monthly)return"1"+i.letter();if(i.isDWM()&&(void 0===t.has_daily||t.has_daily))return"1D";if(i.isDWM())return String(t.intraday_multipliers?t.intraday_multipliers[0]:1);if(i.isMinutes()&&void 0!==t.has_intraday&&!t.has_intraday&&h("Misconfiguration error: it is trying to request intraday resolution but symbol does not support it"),i.isSeconds()&&!t.has_seconds&&h("Misconfiguration error: it is trying to request seconds resolution but symbol does not support it"),i.isTicks())return t.has_ticks||h("Misconfiguration error: it is trying to request tick resolution but symbol does not support it"),"1T";var r=i.multiplier(),n=i.isSeconds()?t.seconds_multipliers:t.intraday_multipliers;if(n&&-1===n.indexOf(String(r))){for(var o=n.length-1;o>=0;o--){var a=Number(n[o]);if(r%a==0)return a+i.letter()}h("Misconfiguration error: it is trying to request "+i.value()+" but we cannot build it from lower resolution")}return i.value()};var u=s.parse("1M").inMilliseconds(0);c.prototype.createItem=function(e,t,i,l,c,m,f,g){var v=new _,b=o(e),S="string"!=typeof b.symbol?b.symbol:b;t=S["currency-id"]||t,i=S["unit-id"]||i;var y=S.symbol,w=S.session&&"extended"!==S.session;if("type"in b){var C=Object.assign({},c);return c.has_empty_bars&&(C.has_empty_bars=!1),new p(v,y,t,i,l,n(b),C,m,f)}g&&!r()&&h("Internal error: rebuilding is requested but it is disabled."), this._defaultProperty.mergeAndFire(this._state),this._chartModel.mainSeries().onChartStyleChanged()}}},"8OdW":function(e,t,i){"use strict";i.r(t),i.d(t,"MINUTE_SPAN",(function(){return s})),i.d(t,"HOUR_SPAN",(function(){return r})),i.d(t,"DAY_SPAN",(function(){return n})),i.d(t,"WEEK_SPAN",(function(){return o})),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}));const s=20,r=30,n=40,o=50,a=60,l=70,c=6},"8Uy/":function(e,t,i){"use strict";i.r(t),i.d(t,"LINESTYLE_SOLID",(function(){return s})),i.d(t,"LINESTYLE_DOTTED",(function(){return r})),i.d(t,"LINESTYLE_DASHED",(function(){return n})),i.d(t,"LINESTYLE_LARGE_DASHED",(function(){return o})),i.d(t,"LINESTYLE_SPARSE_DOTTED",(function(){return a})),i.d(t,"LINESTYLE_SMALL_DASHED",(function(){return l}));const s=0,r=1,n=2,o=3,a=4,l=5},"8gnj":function(e,t,i){"use strict";var s=i("LxhU").Interval,r=i("OLhd").isAlignmentEnabled,n=i("7ETO").getChartStyleStudy,o=i("5fI3").decodeExtendedSymbol,a=function(){var e=i("ocLq"),t=e.StudyEngine,a=e.BarBuilder,l=e.BarSet;function c(e){this.host=e,this.cache={}}function h(e){throw console.error(e),e}c.prototype.getCache=function(e){return this.cache[e]},c.prototype.putCache=function(e,t){this.cache[e]=t},c.prototype.subscribe=function(e,t,i,s,r,n,o,a,l,c){var h=l(o),u=function(e,t,i,s,r,n,o,a){var l=r.has_empty_bars?"_":"";return n+e+s+(t||"")+(i||"")+l+"_"+o.countBack+"_"+o.to+"_"+Boolean(a)}(e,t,i,s,o,a,h,c),d=this.getCache(u);return d||(d=this.createItem(e,t,i,s,o,h,a,c),this.putCache(u,d)),d.listeners.addListener(r,n),{key:u,listener:r}},c.prototype.unsubscribe=function(e){var t=this.getCache(e.key);t&&t.listeners.removeListener(e.listener)},c.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<e.length;i++){var s=e[i],r=this.cache[s];this.cache[s]=null,r.stop()}this.removeUnused()}},c.prototype.rebuildFrom=function(e,t){var i=s.parse(e);if((i.isWeeks()||i.isMonths())&&t.has_weekly_and_monthly)return"1"+i.letter();if(i.isDWM()&&(void 0===t.has_daily||t.has_daily))return"1D";if(i.isDWM())return String(t.intraday_multipliers?t.intraday_multipliers[0]:1);if(i.isMinutes()&&void 0!==t.has_intraday&&!t.has_intraday&&h("Misconfiguration error: it is trying to request intraday resolution but symbol does not support it"),i.isSeconds()&&!t.has_seconds&&h("Misconfiguration error: it is trying to request seconds resolution but symbol does not support it"),i.isTicks())return t.has_ticks||h("Misconfiguration error: it is trying to request tick resolution but symbol does not support it"),"1T";var r=i.multiplier(),n=i.isSeconds()?t.seconds_multipliers:t.intraday_multipliers;if(n&&-1===n.indexOf(String(r))){for(var o=n.length-1;o>=0;o--){var a=Number(n[o]);if(r%a==0)return a+i.letter()}h("Misconfiguration error: it is trying to request "+i.value()+" but we cannot build it from lower resolution")}return i.value()}
!g&&c.has_empty_bars&&h('Misconfiguration error: attempt to request data for symbol with "has_empty_bars" flag, but "disable_resolution_rebuild" featureset is enabled');var P,x,T=this.rebuildFrom(l,c);if(!s.isTicks(l)&&(!s.isEqual(l,T)||g)){r()||h('Misconfiguration error: remove "disable_resolution_rebuild" featureset or provide '+l+" data by yourself");var M=c.has_empty_bars;C=Object.assign({},c);c.has_empty_bars&&(C.has_empty_bars=!1);var I=Math.ceil((P=s.parse(l),x=s.parse(T),P.kind()===x.kind()?P.multiplier()/x.multiplier():(P.isMonths()?P.multiplier()*u:P.inMilliseconds())/(x.isMonths()?x.multiplier()*u:x.inMilliseconds())));return m=Object.assign({},m,{countBack:m.countBack*I}),new p(v,y,t,i,T,new a(l,M),C,m,f)}return new d(v,y,{currency:t,unit:i},l,w,this.host,c,m)};var d=function(e,t,i,s,r,n,o,a){this.listeners=e,this.host=n;var l=this;this.host.resolve(t,i,(function(e){r&&e.regular_session&&(e.session=e.regular_session),l.subs=l.host.subscribe(e,s,a,(function(e){l.listeners.fire(e)}),(function(e){l.listeners.onError(e)}))}),(function(e){l.listeners.onError(e)}))};d.prototype.stop=function(){this.subs&&this.host.unsubscribe(this.subs)};var p=function(e,i,s,r,n,o,a,l,c){this.listeners=e,this.isRecalculated=!1,this.symbolInfo=a;var h=this;this.engine=new t({tickerid:i,currencyCode:s,unitId:r,period:n,body:o,sessionId:c,symbolInfo:a,dataRange:l,forceAlignBars:!1,recalc:function(e,t){h._recalc(t)},out:function(e,t){h._out(e,t)},nonseriesOut:function(e,t){h._nonseriesOut(e,t)},setNoMoreData:function(){h.barset&&(h.barset.endOfData=!0)},onErrorCallback:function(e){h.listeners.onError(e)}})};p.prototype.stop=function(){this.engine?this.engine.stop():console.error("Internal library error 0x1")},p.prototype._recalc=function(e){this.isRecalculated&&console.error("recalc called twice!"),this.barset||(this.barset=new l(this.symbolInfo)),e&&(this.barset.firstLoadedTimeMs=e.firstLoadedTimeMs,this.barset.endOfData=e.endOfData),this.listeners.fire(this.barset),this.isRecalculated=!0},p.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)},p.prototype._out=function(e,t){var i=t[0];if(!isNaN(i)){var s={time:i,open:t[1],high:t[2],low:t[3],close:t[4],volume:t[5],updatetime:t[6]},r=t[7];this.barset||(this.barset=new l(e.info));var n=t[8];if(n instanceof Array)for(var o=0;o<n.length;o++){var a=t[9],c=n[o],h={time:c,open:a,high:a,low:a,close:a,volume:0,updatetime:c};this.barset.add(h,!0),this.isRecalculated&&this.listeners.fire(this.barset)}this.barset.add(s,r),this.barset.isBarClosed=r,this.isRecalculated&&this.listeners.fire(this.barset)}};var _=function(){this.listeners=[]};return _.prototype.listenersCount=function(){return this.listeners.reduce((function(e,t){return e+(t?1:0)}),0)},_.prototype.addListener=function(e,t){this.listeners.push({dataListener:e,onErrorCallback:t}),this.barset&&e(this.barset),this.errorMsg&&t(this.errorMsg)}, ;var u=s.parse("1M").inMilliseconds(0);c.prototype.createItem=function(e,t,i,l,c,m,f,g){var v=new _,b=o(e),S="string"!=typeof b.symbol?b.symbol:b;t=S["currency-id"]||t,i=S["unit-id"]||i;var y=S.symbol,w=S.session&&"extended"!==S.session;if("type"in b){var C=Object.assign({},c);return c.has_empty_bars&&(C.has_empty_bars=!1),new p(v,y,t,i,l,n(b),C,m,f)}g&&!r()&&h("Internal error: rebuilding is requested but it is disabled."),!g&&c.has_empty_bars&&h('Misconfiguration error: attempt to request data for symbol with "has_empty_bars" flag, but "disable_resolution_rebuild" featureset is enabled');var P,x,T=this.rebuildFrom(l,c);if(!s.isTicks(l)&&(!s.isEqual(l,T)||g)){r()||h('Misconfiguration error: remove "disable_resolution_rebuild" featureset or provide '+l+" data by yourself");var M=c.has_empty_bars;C=Object.assign({},c);c.has_empty_bars&&(C.has_empty_bars=!1);var I=Math.ceil((P=s.parse(l),x=s.parse(T),P.kind()===x.kind()?P.multiplier()/x.multiplier():(P.isMonths()?P.multiplier()*u:P.inMilliseconds())/(x.isMonths()?x.multiplier()*u:x.inMilliseconds())));return m=Object.assign({},m,{countBack:m.countBack*I}),new p(v,y,t,i,T,new a(l,M),C,m,f)}return new d(v,y,{currency:t,unit:i},l,w,this.host,c,m)};var d=function(e,t,i,s,r,n,o,a){this.listeners=e,this.host=n;var l=this;this.host.resolve(t,i,(function(e){r&&e.regular_session&&(e.session=e.regular_session),l.subs=l.host.subscribe(e,s,a,(function(e){l.listeners.fire(e)}),(function(e){l.listeners.onError(e)}))}),(function(e){l.listeners.onError(e)}))};d.prototype.stop=function(){this.subs&&this.host.unsubscribe(this.subs)};var p=function(e,i,s,r,n,o,a,l,c){this.listeners=e,this.isRecalculated=!1,this.symbolInfo=a;var h=this;this.engine=new t({tickerid:i,currencyCode:s,unitId:r,period:n,body:o,sessionId:c,symbolInfo:a,dataRange:l,forceAlignBars:!1,recalc:function(e,t){h._recalc(t)},out:function(e,t){h._out(e,t)},nonseriesOut:function(e,t){h._nonseriesOut(e,t)},setNoMoreData:function(){h.barset&&(h.barset.endOfData=!0)},onErrorCallback:function(e){h.listeners.onError(e)}})};p.prototype.stop=function(){this.engine?this.engine.stop():console.error("Internal library error 0x1")},p.prototype._recalc=function(e){this.isRecalculated&&console.error("recalc called twice!"),this.barset||(this.barset=new l(this.symbolInfo)),e&&(this.barset.firstLoadedTimeMs=e.firstLoadedTimeMs,this.barset.endOfData=e.endOfData),this.listeners.fire(this.barset),this.isRecalculated=!0},p.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)},p.prototype._out=function(e,t){var i=t[0];if(!isNaN(i)){var s={time:i,open:t[1],high:t[2],low:t[3],close:t[4],volume:t[5],updatetime:t[6]},r=t[7];this.barset||(this.barset=new l(e.info));var n=t[8];if(n instanceof Array)for(var o=0;o<n.length;o++){var a=t[9],c=n[o],h={time:c,open:a,high:a,low:a,close:a,volume:0,updatetime:c};this.barset.add(h,!0),
_.prototype.removeListener=function(e){var t=this.listeners.filter((function(t){return t.dataListener===e}));if(0!==t.length){var i=this.listeners.indexOf(t[0]);delete this.listeners[i]}},_.prototype.onError=function(e){this.errorMsg=e||"unspecified error";for(var t=this.listeners,i=t.length,s=0;s<i;s++){var r=t[s];r&&r.onErrorCallback&&r.onErrorCallback(e)}},_.prototype.fire=function(e,t){t||(this.barset=e);for(var i=this.listeners,s=i.length,r=0;r<s;r++){var n=i[r];n&&n.dataListener(e)}},{setupFeed:function(t){c.instance=new c(t),e.setupFeed(c.instance)},unsubscribeUnused:function(){c.instance.removeUnused()}}}();e.exports=a},"8pII":function(e){ this.isRecalculated&&this.listeners.fire(this.barset)}this.barset.add(s,r),this.barset.isBarClosed=r,this.isRecalculated&&this.listeners.fire(this.barset)}};var _=function(){this.listeners=[]};return _.prototype.listenersCount=function(){return this.listeners.reduce((function(e,t){return e+(t?1:0)}),0)},_.prototype.addListener=function(e,t){this.listeners.push({dataListener:e,onErrorCallback:t}),this.barset&&e(this.barset),this.errorMsg&&t(this.errorMsg)},_.prototype.removeListener=function(e){var t=this.listeners.filter((function(t){return t.dataListener===e}));if(0!==t.length){var i=this.listeners.indexOf(t[0]);delete this.listeners[i]}},_.prototype.onError=function(e){this.errorMsg=e||"unspecified error";for(var t=this.listeners,i=t.length,s=0;s<i;s++){var r=t[s];r&&r.onErrorCallback&&r.onErrorCallback(e)}},_.prototype.fire=function(e,t){t||(this.barset=e);for(var i=this.listeners,s=i.length,r=0;r<s;r++){var n=i[r];n&&n.dataListener(e)}},{setupFeed:function(t){c.instance=new c(t),e.setupFeed(c.instance)},unsubscribeUnused:function(){c.instance.removeUnused()}}}();e.exports=a},"8pII":function(e){
e.exports=JSON.parse('{"content":{"chartProperties":{"scalesProperties":{"textColor":"#B2B5BE","lineColor":"rgba(240, 243, 250, 0.12)","backgroundColor":"#ffffff"},"paneProperties":{"vertGridProperties":{"color":"rgba(240, 243, 250, 0.06)"},"horzGridProperties":{"color":"rgba(240, 243, 250, 0.06)"},"crossHairProperties":{"color:":"#9598A1"},"background":"#131722","backgroundGradientStartColor":"#181C27","backgroundGradientEndColor":"#131722","backgroundType":"gradient"}},"sessions":{"graphics":{"backgrounds":{"outOfSession":{"color":"#2196F3","transparency":92},"preMarket":{"color":"#FF9800","transparency":92},"postMarket":{"color":"#2196F3","transparency":92}},"vertlines":{"sessBreaks":{"color":"#4985e7","style":2,"width":1}}}},"mainSourceProperties":{"baseLineColor":"#5d606b","candleStyle":{"borderColor":"#378658","upColor":"#26a69a","wickColor":"#B5B5B8","wickUpColor":"#26a69a","wickDownColor":"#ef5350","downColor":"#ef5350","borderUpColor":"#26a69a","borderDownColor":"#ef5350"},"haStyle":{"borderColor":"#378658","upColor":"#26a69a","wickColor":"#B5B5B8","wickUpColor":"#26a69a","wickDownColor":"#ef5350","downColor":"#ef5350","borderUpColor":"#26a69a","borderDownColor":"#ef5350"},"barStyle":{"downColor":"#ef5350","upColor":"#26a69a"},"pnfStyle":{"downColor":"#ef5350","upColor":"#26a69a","upColorProjection":"#336854","downColorProjection":"#7f323f"},"baselineStyle":{"baselineColor":"rgba( 117, 134, 150, 1)","topFillColor1":"rgba( 38, 166, 154, 0.28)","topFillColor2":"rgba( 38, 166, 154, 0.05)","bottomFillColor1":"rgba( 239, 83, 80, 0.05)","bottomFillColor2":"rgba( 239, 83, 80, 0.28)","topLineColor":"rgba( 38, 166, 154, 1)","bottomLineColor":"rgba( 239, 83, 80, 1)"},"areaStyle":{"transparency":100,"color1":"rgba(33, 150, 243, 0.28)","color2":"#2196f3","linecolor":"#2196f3","linewidth":2,"linestyle":0},"renkoStyle":{"upColor":"#26a69a","downColor":"#ef5350","borderUpColor":"#26a69a","borderDownColor":"#ef5350","upColorProjection":"#336854","downColorProjection":"#7f323f","borderUpColorProjection":"#336854","borderDownColorProjection":"#7f323f","wickUpColor":"#26a69a","wickDownColor":"#ef5350"},"lineStyle":{"color":"#2196f3","linewidth":2,"linestyle":0},"kagiStyle":{"downColor":"#ef5350","upColor":"#26a69a","upColorProjection":"#336854","downColorProjection":"#7f323f"},"pbStyle":{"upColor":"#26a69a","downColor":"#ef5350","borderUpColor":"#26a69a","borderDownColor":"#ef5350","upColorProjection":"#336854","downColorProjection":"#7f323f","borderUpColorProjection":"#336854","borderDownColorProjection":"#7f323f"},"rangeStyle":{"upColor":"#26a69a","downColor":"#ef5350","upColorProjection":"#336854","downColorProjection":"#7f323f"}}}}')},"8qoI":function(e,t,i){"use strict";i.r(t),i.d(t,"StudyLegendView",(function(){return n}));var s=i("it7y"),r=i("e1Hy");class n extends s.StudyDataWindowView{constructor(e,t){super(e,t),this._showStudyValues=t.properties().paneProperties.legendProperties.showStudyValues,this._showStudyValues.subscribe(this,this.update)}isValuesVisible(){return this._showStudyValues.value()}additional(){ e.exports=JSON.parse('{"content":{"chartProperties":{"scalesProperties":{"textColor":"#B2B5BE","lineColor":"rgba(240, 243, 250, 0.12)","backgroundColor":"#ffffff"},"paneProperties":{"vertGridProperties":{"color":"rgba(240, 243, 250, 0.06)"},"horzGridProperties":{"color":"rgba(240, 243, 250, 0.06)"},"crossHairProperties":{"color:":"#9598A1"},"background":"#131722","backgroundGradientStartColor":"#181C27","backgroundGradientEndColor":"#131722","backgroundType":"gradient"}},"sessions":{"graphics":{"backgrounds":{"outOfSession":{"color":"#2196F3","transparency":92},"preMarket":{"color":"#FF9800","transparency":92},"postMarket":{"color":"#2196F3","transparency":92}},"vertlines":{"sessBreaks":{"color":"#4985e7","style":2,"width":1}}}},"mainSourceProperties":{"baseLineColor":"#5d606b","candleStyle":{"borderColor":"#378658","upColor":"#26a69a","wickColor":"#B5B5B8","wickUpColor":"#26a69a","wickDownColor":"#ef5350","downColor":"#ef5350","borderUpColor":"#26a69a","borderDownColor":"#ef5350"},"haStyle":{"borderColor":"#378658","upColor":"#26a69a","wickColor":"#B5B5B8","wickUpColor":"#26a69a","wickDownColor":"#ef5350","downColor":"#ef5350","borderUpColor":"#26a69a","borderDownColor":"#ef5350"},"barStyle":{"downColor":"#ef5350","upColor":"#26a69a"},"pnfStyle":{"downColor":"#ef5350","upColor":"#26a69a","upColorProjection":"#336854","downColorProjection":"#7f323f"},"baselineStyle":{"baselineColor":"rgba( 117, 134, 150, 1)","topFillColor1":"rgba( 38, 166, 154, 0.28)","topFillColor2":"rgba( 38, 166, 154, 0.05)","bottomFillColor1":"rgba( 239, 83, 80, 0.05)","bottomFillColor2":"rgba( 239, 83, 80, 0.28)","topLineColor":"rgba( 38, 166, 154, 1)","bottomLineColor":"rgba( 239, 83, 80, 1)"},"areaStyle":{"transparency":100,"color1":"rgba(33, 150, 243, 0.28)","color2":"#2196f3","linecolor":"#2196f3","linewidth":2,"linestyle":0},"renkoStyle":{"upColor":"#26a69a","downColor":"#ef5350","borderUpColor":"#26a69a","borderDownColor":"#ef5350","upColorProjection":"#336854","downColorProjection":"#7f323f","borderUpColorProjection":"#336854","borderDownColorProjection":"#7f323f","wickUpColor":"#26a69a","wickDownColor":"#ef5350"},"lineStyle":{"color":"#2196f3","linewidth":2,"linestyle":0},"kagiStyle":{"downColor":"#ef5350","upColor":"#26a69a","upColorProjection":"#336854","downColorProjection":"#7f323f"},"pbStyle":{"upColor":"#26a69a","downColor":"#ef5350","borderUpColor":"#26a69a","borderDownColor":"#ef5350","upColorProjection":"#336854","downColorProjection":"#7f323f","borderUpColorProjection":"#336854","borderDownColorProjection":"#7f323f"},"rangeStyle":{"upColor":"#26a69a","downColor":"#ef5350","upColorProjection":"#336854","downColorProjection":"#7f323f"}}}}')},"8qoI":function(e,t,i){"use strict";i.r(t),i.d(t,"StudyLegendView",(function(){return n}));var s=i("it7y"),r=i("e1Hy");class n extends s.StudyDataWindowView{constructor(e,t){super(e,t),this._showStudyValues=t.properties().paneProperties.legendProperties.showStudyValues,this._showStudyValues.subscribe(this,this.update)}isValuesVisible(){return this._showStudyValues.value()}additional(){
return null}destroy(){this._showStudyValues.unsubscribeAll(this)}_createValuesProvider(e,t){return new r.a(e,t)}}},"8sOK":function(e,t,i){"use strict";i.r(t);var s=i("2kV1"),r=i("7ktv"),n=i("kcTO"),o=i("aIyQ"),a=i.n(o),l=i("tc+8"),c=i.n(l),h=i("ww0J");class u extends h.a{text(){return`${this._source.title()} ${this._source.status()}`}}i.d(t,"StudyStub",(function(){return p}));class d{getItems(){return[]}getValues(e){return[]}}class p extends r.PriceDataSource{constructor(e,t,i){super(e),this._priceStep=.01,this._status=window.t("compiling..."),this._statusChanged=new a.a,this._formatter=new n.PriceFormatter(100),this._failed=!1,this._loading=!0,this._origState=t,this._title=i;this._properties=new c.a({visible:!0}),this._statusView=new s.StudyStatusView(this)}properties(){return this._properties}statusView(){return this._statusView}legendView(){return null}state(e){return this._origState}setStatus(e){this._status=e,this._statusChanged.fire()}formatter(){return this._formatter}title(){return this._title}titleInParts(){return[this._title]}isFailed(){return this._failed}isLoading(){return this._loading}setFailed(e){this._failed=e,this._failed&&(this._loading=!1),this._model.updateSource(this)}isSymbolInvalid(){return!1}start(){}status(){return this._status}onStatusChanged(){return this._statusChanged}firstValue(){return null}currency(){return null}unit(){return null}symbolSource(){return this._model.mainSeries()}valuesProvider(){return new d}statusProvider(e){return new u(this,this._model.properties().scalesProperties.textColor)}}},"8woN":function(e,t,i){"use strict";var s=i("Kxc7"),r=[{d:"E-Mini S&P 500",t:"ES"},{d:"E-Mini Nasdaq 100",t:"NQ"},{d:"Gold",t:"GC"},{d:"Silver",t:"SI"},{d:"Crude Oil WTI",t:"CL"},{d:"Natural Gas",t:"NG"},{d:"Australian Dollar",t:"6A"},{d:"Australian Dollar (Floor)",t:"AD"},{d:"Euro FX",t:"6E"},{d:"Euro FX (Floor)",t:"EC"},{d:"Corn",t:"ZC"},{d:"Corn (Floor)",t:"C"},{d:"Eurodollar",t:"GE"},{d:"Eurodollar (Floor)",t:"ED"}],n=function(){var e=[{pattern:"(",ctor:o},{pattern:")",ctor:a},{pattern:"+",ctor:c},{pattern:"-",ctor:h},{pattern:"*",ctor:u},{pattern:"/",ctor:d},{pattern:"^",ctor:p},{pattern:/\d+(?:\.\d*|(?![a-zA-Z0-9_!:.&]))|\.\d+/,ctor:g},{pattern:/\./,ctor:S},{pattern:s.enabled("charting_library_base")?/[a-zA-Z0-9_\u0370-\u1FFF_\u2E80-\uFFFF^][a-zA-Z0-9_\u0020\u0370-\u1FFF_\u2E80-\uFFFF_!:.&]*|'.+?'/:/[a-zA-Z0-9_\u0370-\u1FFF_\u2E80-\uFFFF][a-zA-Z0-9_\u0020\u0370-\u1FFF_\u2E80-\uFFFF_!|:.&]*|'.+?'/,ctor:f},{pattern:/'[^']*/,ctor:b},{pattern:/[\0-\x20\s]+/,ctor:n}];function t(e,t){var i=function(){};return i.prototype=t.prototype,e.prototype=new i,e}function i(){}function n(e){this.value=e}function o(){}function a(){}function l(){}function c(){}function h(){}function u(){}function d(){}function p(){}i.prototype.toString=function(){return this.value},t(n,i),t(o,i),o.prototype.value="(",t(a,i),a.prototype.value=")",t(l,i),t(c,l),c.prototype.value="+",c.prototype.precedence=0,c.prototype.commutative=!0,t(h,l),h.prototype.value="-",h.prototype.precedence=0,h.prototype.commutative=!1,t(u,l), return null}destroy(){this._showStudyValues.unsubscribeAll(this)}_createValuesProvider(e,t){return new r.a(e,t)}}},"8sOK":function(e,t,i){"use strict";i.r(t);var s=i("2kV1"),r=i("7ktv"),n=i("kcTO"),o=i("aIyQ"),a=i.n(o),l=i("tc+8"),c=i.n(l),h=i("ww0J");class u extends h.a{text(){return`${this._source.title()} ${this._source.status()}`}}i.d(t,"StudyStub",(function(){return p}));class d{getItems(){return[]}getValues(e){return[]}}class p extends r.PriceDataSource{constructor(e,t,i){super(e),this._priceStep=.01,this._status=window.t("compiling..."),this._statusChanged=new a.a,this._formatter=new n.PriceFormatter(100),this._failed=!1,this._loading=!0,this._origState=t,this._title=i;this._properties=new c.a({visible:!0}),this._statusView=new s.StudyStatusView(this)}properties(){return this._properties}statusView(){return this._statusView}legendView(){return null}state(e){return this._origState}setStatus(e){this._status=e,this._statusChanged.fire()}formatter(){return this._formatter}title(){return this._title}titleInParts(){return[this._title]}isFailed(){return this._failed}isLoading(){return this._loading}setFailed(e){this._failed=e,this._failed&&(this._loading=!1),this._model.updateSource(this)}isSymbolInvalid(){return!1}start(){}status(){return this._status}onStatusChanged(){return this._statusChanged}firstValue(){return null}currency(){return null}unit(){return null}symbolSource(){return this._model.mainSeries()}valuesProvider(){return new d}statusProvider(e){return new u(this,this._model.properties().scalesProperties.textColor)}}},"8woN":function(e,t,i){"use strict";var s=i("Kxc7"),r=[{d:"E-Mini S&P 500",t:"ES"},{d:"E-Mini Nasdaq 100",t:"NQ"},{d:"Gold",t:"GC"},{d:"Silver",t:"SI"},{d:"Crude Oil WTI",t:"CL"},{d:"Natural Gas",t:"NG"},{d:"Australian Dollar",t:"6A"},{d:"Australian Dollar (Floor)",t:"AD"},{d:"Euro FX",t:"6E"},{d:"Euro FX (Floor)",t:"EC"},{d:"Corn",t:"ZC"},{d:"Corn (Floor)",t:"C"},{d:"Eurodollar",t:"GE"},{d:"Eurodollar (Floor)",t:"ED"}],n=function(){var e=[{pattern:"(",ctor:o},{pattern:")",ctor:a},{pattern:"+",ctor:c},{pattern:"-",ctor:h},{pattern:"*",ctor:u},{pattern:"/",ctor:d},{pattern:"^",ctor:p},{pattern:/\d+(?:\.\d*|(?![a-zA-Z0-9_!:.&]))|\.\d+/,ctor:g},{pattern:/\./,ctor:S},{pattern:s.enabled("charting_library_base")?/[a-zA-Z0-9_\u0370-\u1FFF_\u2E80-\uFFFF^][a-zA-Z0-9_\u0020\u0370-\u1FFF_\u2E80-\uFFFF_!:.&]*|'.+?'/:/[a-zA-Z0-9_\u0370-\u1FFF_\u2E80-\uFFFF][a-zA-Z0-9_\u0020\u0370-\u1FFF_\u2E80-\uFFFF_!|:.&]*|'.+?'/,ctor:f},{pattern:/'[^']*/,ctor:b},{pattern:/[\0-\x20\s]+/,ctor:n}];function t(e,t){var i=function(){};return i.prototype=t.prototype,e.prototype=new i,e}function i(){}function n(e){this.value=e}function o(){}function a(){}function l(){}function c(){}function h(){}function u(){}function d(){}function p(){}i.prototype.toString=function(){return this.value},t(n,i),t(o,i),o.prototype.value="(",t(a,i),a.prototype.value=")",t(l,i),t(c,l),c.prototype.value="+",c.prototype.precedence=0,c.prototype.commutative=!0,t(h,l),h.prototype.value="-",h.prototype.precedence=0,h.prototype.commutative=!1,t(u,l),
u.prototype.value="*",u.prototype.precedence=1,u.prototype.commutative=!0,t(d,l),d.prototype.value="/",d.prototype.precedence=1,d.prototype.commutative=!1,t(p,l),p.prototype.value="^",p.prototype.precedence=2,p.prototype.commutative=!1;var _=/^'?(?:([A-Z0-9_]+):)?(.*?)'?$/i,m=/[+\-/*]/;function f(e){this.value=e}function g(e){this.value=e}function v(e){this.value=e}function b(){f.apply(this,arguments)}function S(){g.apply(this,arguments)}t(f,i),f.prototype.toString=function(){if(this.hasOwnProperty("_ticker")){var e=m.test(this._ticker)?"'":"";return e+(this._exchange?this._exchange+":":"")+this._ticker+e}return this.value},f.prototype.parse=function(){var e=_.exec(this.value);e[1]&&(this._exchange=e[1]),this._ticker=e[2]},f.prototype.parseAsFutures=function(){this.hasOwnProperty("_ticker")||this.parse();for(var e=function(e){return r.some((function(t){return t.t===e}))},t=2;t>=1;--t){var i=this._ticker.slice(0,t);if(e(i)){this._root=i,this._contract=this._ticker.slice(t);break}}},f.prototype.exchange=function(e){if(this.hasOwnProperty("_ticker")||this.parse(),!(arguments.length>0))return this._exchange;null==e?delete this._exchange:this._exchange=e+""},f.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},f.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||"")))},f.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))},t(g,i),g.prototype.toString=function(){return this.hasOwnProperty("_normalizedValue")?this._normalizedValue:this.value},g.prototype.parse=function(){this._normalizedValue=this.value.replace(/^0+|\.0*$/g,"").replace(/(\.\d*?)0+$/,"$1").replace(/^(\.|$)/,"0$1")},v.prototype.toString=function(){return this.value},t(b,f),b.prototype.isIncomplete=!0,b.prototype.incompleteSuggest=function(){if("'"!==this.value)return String("'")},t(S,g),S.prototype.isIncomplete=!0;var y=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 s,r=[];e:for(;s=y.exec(t);){for(var o=e.length;o--;)if(s[o+1]){if(e[o].ctor){var a=new e[o].ctor(s[o+1]);a._offset=s.index,r.push(a)}continue e}var l=new v(s[0]);l._offset=s.index,r.push(l)}if(i&&i.recover){var c;for(o=r.length;o--;){var h=r[o];if(h instanceof g||h instanceof f){if(void 0!==c){var u=new f(""),d=r.splice(o,c-o+1,u);u.value=d.map((function(e){return e.value})).join("")}c=o}else h instanceof n||(c=void 0)}}return r}function C(e){for(var t=[],i=0;i<e.length;i++)e[i]instanceof n||t.push(e[i]);return t}function P(e){e=C(e) u.prototype.value="*",u.prototype.precedence=1,u.prototype.commutative=!0,t(d,l),d.prototype.value="/",d.prototype.precedence=1,d.prototype.commutative=!1,t(p,l),p.prototype.value="^",p.prototype.precedence=2,p.prototype.commutative=!1;var _=/^'?(?:([A-Z0-9_]+):)?(.*?)'?$/i,m=/[+\-/*]/;function f(e){this.value=e}function g(e){this.value=e}function v(e){this.value=e}function b(){f.apply(this,arguments)}function S(){g.apply(this,arguments)}t(f,i),f.prototype.toString=function(){if(this.hasOwnProperty("_ticker")){var e=m.test(this._ticker)?"'":"";return e+(this._exchange?this._exchange+":":"")+this._ticker+e}return this.value},f.prototype.parse=function(){var e=_.exec(this.value);e[1]&&(this._exchange=e[1]),this._ticker=e[2]},f.prototype.parseAsFutures=function(){this.hasOwnProperty("_ticker")||this.parse();for(var e=function(e){return r.some((function(t){return t.t===e}))},t=2;t>=1;--t){var i=this._ticker.slice(0,t);if(e(i)){this._root=i,this._contract=this._ticker.slice(t);break}}},f.prototype.exchange=function(e){if(this.hasOwnProperty("_ticker")||this.parse(),!(arguments.length>0))return this._exchange;null==e?delete this._exchange:this._exchange=e+""},f.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},f.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||"")))},f.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))},t(g,i),g.prototype.toString=function(){return this.hasOwnProperty("_normalizedValue")?this._normalizedValue:this.value},g.prototype.parse=function(){this._normalizedValue=this.value.replace(/^0+|\.0*$/g,"").replace(/(\.\d*?)0+$/,"$1").replace(/^(\.|$)/,"0$1")},v.prototype.toString=function(){return this.value},t(b,f),b.prototype.isIncomplete=!0,b.prototype.incompleteSuggest=function(){if("'"!==this.value)return String("'")},t(S,g),S.prototype.isIncomplete=!0;var y=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 s,r=[];e:for(;s=y.exec(t);){for(var o=e.length;o--;)if(s[o+1]){if(e[o].ctor){var a=new e[o].ctor(s[o+1]);a._offset=s.index,r.push(a)}continue e}var l=new v(s[0]);l._offset=s.index,r.push(l)}if(i&&i.recover){var c;for(o=r.length;o--;){var h=r[o];if(h instanceof g||h instanceof f){if(void 0!==c){var u=new f(""),d=r.splice(o,c-o+1,u);u.value=d.map((function(e){return e.value})).join("")}c=o}else h instanceof n||(c=void 0)}}return r}function C(e){for(var t=[],i=0;i<e.length;i++)e[i]instanceof n||t.push(e[i]);return t}function P(e){e=C(e)
@@ -279,7 +279,7 @@ return!this.isVisible()||this.canBeHiddenByGlobalFlag()&&h.hideAllIndicators().v
if(t.params[3])return void this._resolveSymbol(t.params[3]).then(i);break;default:return void this._resolveSymbol(t.params[2]).then(i)}0,s(e)}})})}_recheckLineToolsActuality(){const e=this._model.paneForSource(this);null!==e&&e.sourcesByGroup().lineSourcesForAllSymbols().forEach(e=>{e.ownerSource()===this&&e.calcIsActualSymbol()})}_getSymbolObject(e){const t={symbol:e};return this._series&&this._series.extendedHours.value()&&(t.session="extended"),t}_onSymbolResolved(e,t){0}_resolvedSymbolKey(e){return e}_setStatus(e){this._status=e,this._statusView&&this._statusView.update(),this._model.updateSource(this),this._statusChanged.fire(e)}_bandsFirstValue(e){const t=Object(s.ensureNotNull)(this._metaInfo);if(!t.bands)return null;for(let i=0;i<t.bands.length;i++){const t=this.properties().childs().bands.childs()[i];if(t.childs().visible.value()){const i=t.childs().value.value();if(e&&0===i)continue;return i}}return null}_prepareInputs(e){Object(s.assert)(!!e,"options not set");const t=this.metaInfo(),i={},r=e.allowedInputTypes?new Set(e.allowedInputTypes):null;for(let s=0;s<t.inputs.length;s++){const n=t.inputs[s];if(null!==r&&!r.has(n.type))continue;if(n.isFake&&e.skipFakeInputs)continue;if(n.isMTFResolution&&e.noResolution)continue;if(n.isHidden&&e.skipHiddenInputs)continue;if("bool"===n.type&&e.skipHiddenInputs&&e.skipBooleanInputs)continue;if("color"===n.type&&e.skipHiddenInputs&&e.skipColorInputs)continue;if("time"===n.type&&e.skipHiddenInputs&&e.skipTimeInputs)continue;if(void 0!==n.groupId&&-1!==e.skippedGroups.indexOf(n.groupId))continue;if(-1!==e.skippedInputs.indexOf(n.id))continue;const o=this._prepareInput(n,e);"symbol"===n.type&&e.skipOptionalEmptySymbolInputs&&""===o||(i[n.id]=Object(f.clone)(o))}return i}_buildInputs(e){Object(s.assert)(!!e,"options not set");let t={};try{t=this._prepareInputs(e)}catch(i){b.logWarn("Failed to prepare study inputs: "+i)}if(e.asObject){const e={};return Object.keys(t).forEach(i=>{null!=t[i]&&(e[i]=t[i])}),e}{const e=[];return Object.keys(t).forEach(i=>{null!=t[i]&&e.push(t[i])}),e}}_prepareInput(e,t){const i=this._prepareInputValue(e,t);return!e.isFake||t.fakeInputsForDisplay||t.onlyAtomValues?i:{v:i,f:!0,t:e.type}}}},IiTo:function(e,t,i){"use strict";i.r(t);var s=i("jCNj"),r=i("LxhU"),n=i("Hr11"),o=i("ZmuQ"),a=i("E6p6");class l extends o.a{constructor(e,t){super(),this._sessionStartMs=-Number.MAX_VALUE,this._sessionEndMs=-Number.MAX_VALUE,this._periodSec=e,this._session=t}alignTimeIfPossible(e){const t=this.alignTime(e);return isNaN(t)?e:t}indexOfBar(e){return e<this._sessionStartMs?a.SessionStage.PRE_SESSION:e>=this._sessionEndMs?a.SessionStage.POST_SESSION:Object(n.toInt)(s.time_seconds_diff(e,this._sessionStartMs)/this._periodSec)}startOfBar(e){if(e===a.SessionStage.PRE_SESSION){const e=s.get_cal_from_unix_timestamp_ms(this._session.timezone,this._sessionStartMs-1),t=this._session.spec.alignToNearestSessionEnd(e,-1);return s.cal_to_utc(this._session.timezone,t)}if(e===a.SessionStage.POST_SESSION)return this._sessionEndMs if(t.params[3])return void this._resolveSymbol(t.params[3]).then(i);break;default:return void this._resolveSymbol(t.params[2]).then(i)}0,s(e)}})})}_recheckLineToolsActuality(){const e=this._model.paneForSource(this);null!==e&&e.sourcesByGroup().lineSourcesForAllSymbols().forEach(e=>{e.ownerSource()===this&&e.calcIsActualSymbol()})}_getSymbolObject(e){const t={symbol:e};return this._series&&this._series.extendedHours.value()&&(t.session="extended"),t}_onSymbolResolved(e,t){0}_resolvedSymbolKey(e){return e}_setStatus(e){this._status=e,this._statusView&&this._statusView.update(),this._model.updateSource(this),this._statusChanged.fire(e)}_bandsFirstValue(e){const t=Object(s.ensureNotNull)(this._metaInfo);if(!t.bands)return null;for(let i=0;i<t.bands.length;i++){const t=this.properties().childs().bands.childs()[i];if(t.childs().visible.value()){const i=t.childs().value.value();if(e&&0===i)continue;return i}}return null}_prepareInputs(e){Object(s.assert)(!!e,"options not set");const t=this.metaInfo(),i={},r=e.allowedInputTypes?new Set(e.allowedInputTypes):null;for(let s=0;s<t.inputs.length;s++){const n=t.inputs[s];if(null!==r&&!r.has(n.type))continue;if(n.isFake&&e.skipFakeInputs)continue;if(n.isMTFResolution&&e.noResolution)continue;if(n.isHidden&&e.skipHiddenInputs)continue;if("bool"===n.type&&e.skipHiddenInputs&&e.skipBooleanInputs)continue;if("color"===n.type&&e.skipHiddenInputs&&e.skipColorInputs)continue;if("time"===n.type&&e.skipHiddenInputs&&e.skipTimeInputs)continue;if(void 0!==n.groupId&&-1!==e.skippedGroups.indexOf(n.groupId))continue;if(-1!==e.skippedInputs.indexOf(n.id))continue;const o=this._prepareInput(n,e);"symbol"===n.type&&e.skipOptionalEmptySymbolInputs&&""===o||(i[n.id]=Object(f.clone)(o))}return i}_buildInputs(e){Object(s.assert)(!!e,"options not set");let t={};try{t=this._prepareInputs(e)}catch(i){b.logWarn("Failed to prepare study inputs: "+i)}if(e.asObject){const e={};return Object.keys(t).forEach(i=>{null!=t[i]&&(e[i]=t[i])}),e}{const e=[];return Object.keys(t).forEach(i=>{null!=t[i]&&e.push(t[i])}),e}}_prepareInput(e,t){const i=this._prepareInputValue(e,t);return!e.isFake||t.fakeInputsForDisplay||t.onlyAtomValues?i:{v:i,f:!0,t:e.type}}}},IiTo:function(e,t,i){"use strict";i.r(t);var s=i("jCNj"),r=i("LxhU"),n=i("Hr11"),o=i("ZmuQ"),a=i("E6p6");class l extends o.a{constructor(e,t){super(),this._sessionStartMs=-Number.MAX_VALUE,this._sessionEndMs=-Number.MAX_VALUE,this._periodSec=e,this._session=t}alignTimeIfPossible(e){const t=this.alignTime(e);return isNaN(t)?e:t}indexOfBar(e){return e<this._sessionStartMs?a.SessionStage.PRE_SESSION:e>=this._sessionEndMs?a.SessionStage.POST_SESSION:Object(n.toInt)(s.time_seconds_diff(e,this._sessionStartMs)/this._periodSec)}startOfBar(e){if(e===a.SessionStage.PRE_SESSION){const e=s.get_cal_from_unix_timestamp_ms(this._session.timezone,this._sessionStartMs-1),t=this._session.spec.alignToNearestSessionEnd(e,-1);return s.cal_to_utc(this._session.timezone,t)}if(e===a.SessionStage.POST_SESSION)return this._sessionEndMs
;if(e<0)throw new Error("Negative offset is not supported");return this._sessionStartMs+s.time_seconds(this._periodSec*e)}endOfBar(e){if(e<0)throw new Error("Index cannot be negative");const t=this.startOfBar(e)+1e3*this._periodSec;return t>this._sessionEndMs?this._sessionEndMs:t}isLastBar(e,t){return t>=this._sessionStartMs+s.time_seconds(this._periodSec*(e+1)-1)}moveTo(e){const t=this._session.timezone,i=s.utc_to_cal(t,e),r=this._session.spec.alignToSessionStart(i);this._sessionStartMs=s.cal_to_utc(t,i),s.add_minutes(i,r),this._sessionEndMs=s.cal_to_utc(t,i)}indexOfLastBarInSession(){return Object(n.toInt)((this._sessionEndMs-1-this._sessionStartMs)/1e3/this._periodSec)}moveNext(){this.moveTo(this._sessionEndMs)}}var c=i("OBgQ");function h(e,t){const i=s.clone(t),r=e.businessDaysToCalendarDays(i,1);r>1&&s.add_date(i,r-1);const n=e.leftBorderOfDailyBar(i);if(null===n)throw new Error("Cannot calculate left border of daily bar");return s.cal_to_utc(s.get_timezone(e.timezone()),n)}class u extends o.a{constructor(e,t,i,s,r=!1){super(),this._periodStart=-Number.MAX_VALUE,this._periodEnd=-Number.MAX_VALUE,this._periodLastBarStart=-Number.MAX_VALUE,this._periodStartDay=new c.a(0,0,0),this._periodEndDay=new c.a(0,0,0),this._period=i,this._sessionTgt=e,this._builder=s,this._useBusinessDays=r,this._sessionSrc=r?new o.b("Etc/UTC","24x7"):t||e}builder(){return this._builder}alignTimeIfPossible(e){return this.tradingDayToSessionStart(e)}tradingDayToSessionStart(e){return this.moveTo(e),this.startOfBar(0)}indexOfBar(e){if(this._useBusinessDays){const t=c.a.fromCalendar(s.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e));return t.before(this._periodStartDay)?a.SessionStage.PRE_SESSION:this._periodEndDay.before(t)?a.SessionStage.POST_SESSION:0}return e<this._periodStart?a.SessionStage.PRE_SESSION:e>=this._periodEnd?a.SessionStage.POST_SESSION:0}startOfBar(e){if(e===a.SessionStage.PRE_SESSION){const e=s.get_cal_from_unix_timestamp_ms(this._sessionTgt.timezone,this._periodStart-1),t=this._sessionTgt.spec.alignToNearestSessionEnd(e,-1);return s.cal_to_utc(this._sessionTgt.timezone,t)-1}return e===a.SessionStage.POST_SESSION||e>0?this._periodEnd:e===a.SessionStage.LASTBAR_SESSION?this._periodLastBarStart:this._periodStart}moveTo(e){const t=s.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e);this._sessionSrc.spec.correctTradingDay(t);const i=s.get_year(t),r=this._indexOfPeriodInYear(t),n=r+this._period,o=this._sessionTgt.spec,a=this._sessionTgt.timezone,l=this._builder.startOfPeriod(a,r,i);this._periodStart=h(o,l);const u=s.clone(l),d=o.businessDaysToCalendarDays(u,1);d>1&&s.add_date(u,d-1),this._periodStartDay=c.a.fromCalendar(u);const p=this._builder.startOfPeriod(a,n,i);this._periodEnd=h(o,p);const _=s.clone(p);for(s.add_date(_,-1);o.isCalWeekEnd(_);)s.add_date(_,-1);this._periodEndDay=c.a.fromCalendar(_),s.add_date(p,-1),function(e,t){for(;e.isCalWeekEnd(t);)s.add_date(t,-1)}(this._sessionTgt.spec,p),this._periodLastBarStart=h(o,p), ;if(e<0)throw new Error("Negative offset is not supported");return this._sessionStartMs+s.time_seconds(this._periodSec*e)}endOfBar(e){if(e<0)throw new Error("Index cannot be negative");const t=this.startOfBar(e)+1e3*this._periodSec;return t>this._sessionEndMs?this._sessionEndMs:t}isLastBar(e,t){return t>=this._sessionStartMs+s.time_seconds(this._periodSec*(e+1)-1)}moveTo(e){const t=this._session.timezone,i=s.utc_to_cal(t,e),r=this._session.spec.alignToSessionStart(i);this._sessionStartMs=s.cal_to_utc(t,i),s.add_minutes(i,r),this._sessionEndMs=s.cal_to_utc(t,i)}indexOfLastBarInSession(){return Object(n.toInt)((this._sessionEndMs-1-this._sessionStartMs)/1e3/this._periodSec)}moveNext(){this.moveTo(this._sessionEndMs)}}var c=i("OBgQ");function h(e,t){const i=s.clone(t),r=e.businessDaysToCalendarDays(i,1);r>1&&s.add_date(i,r-1);const n=e.leftBorderOfDailyBar(i);if(null===n)throw new Error("Cannot calculate left border of daily bar");return s.cal_to_utc(s.get_timezone(e.timezone()),n)}class u extends o.a{constructor(e,t,i,s,r=!1){super(),this._periodStart=-Number.MAX_VALUE,this._periodEnd=-Number.MAX_VALUE,this._periodLastBarStart=-Number.MAX_VALUE,this._periodStartDay=new c.a(0,0,0),this._periodEndDay=new c.a(0,0,0),this._period=i,this._sessionTgt=e,this._builder=s,this._useBusinessDays=r,this._sessionSrc=r?new o.b("Etc/UTC","24x7"):t||e}builder(){return this._builder}alignTimeIfPossible(e){return this.tradingDayToSessionStart(e)}tradingDayToSessionStart(e){return this.moveTo(e),this.startOfBar(0)}indexOfBar(e){if(this._useBusinessDays){const t=c.a.fromCalendar(s.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e));return t.before(this._periodStartDay)?a.SessionStage.PRE_SESSION:this._periodEndDay.before(t)?a.SessionStage.POST_SESSION:0}return e<this._periodStart?a.SessionStage.PRE_SESSION:e>=this._periodEnd?a.SessionStage.POST_SESSION:0}startOfBar(e){if(e===a.SessionStage.PRE_SESSION){const e=s.get_cal_from_unix_timestamp_ms(this._sessionTgt.timezone,this._periodStart-1),t=this._sessionTgt.spec.alignToNearestSessionEnd(e,-1);return s.cal_to_utc(this._sessionTgt.timezone,t)-1}return e===a.SessionStage.POST_SESSION||e>0?this._periodEnd:e===a.SessionStage.LASTBAR_SESSION?this._periodLastBarStart:this._periodStart}moveTo(e){const t=s.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e);this._sessionSrc.spec.correctTradingDay(t);const i=s.get_year(t),r=this._indexOfPeriodInYear(t),n=r+this._period,o=this._sessionTgt.spec,a=this._sessionTgt.timezone,l=this._builder.startOfPeriod(a,r,i);this._periodStart=h(o,l);const u=s.clone(l),d=o.businessDaysToCalendarDays(u,1);d>1&&s.add_date(u,d-1),this._periodStartDay=c.a.fromCalendar(u);const p=this._builder.startOfPeriod(a,n,i);this._periodEnd=h(o,p);const _=s.clone(p);for(s.add_date(_,-1);o.isCalWeekEnd(_);)s.add_date(_,-1);this._periodEndDay=c.a.fromCalendar(_),s.add_date(p,-1),function(e,t){for(;e.isCalWeekEnd(t);)s.add_date(t,-1)}(this._sessionTgt.spec,p),this._periodLastBarStart=h(o,p),
(this._periodLastBarStart<this._periodStart||this._periodLastBarStart===this._periodEnd)&&(this._periodLastBarStart=this._periodStart)}endOfBar(e){if(0!==e)throw new Error("index should be 0");return this._periodEnd}isLastBar(e,t){if(0!==e)throw new Error("index should be 0");return t>=this._periodLastBarStart}currentRange(){return{from:this._periodStartDay,to:this._periodEndDay}}indexOfBarInYear(e){const t=s.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e),i=s.get_year(t),r=this._builder.indexOfPeriod(t),o=this._sessionTgt.timezone;let a=this._builder.startOfPeriod(o,r,i),l=h(this._sessionTgt.spec,a);return a=s.get_cal_from_unix_timestamp_ms(s.get_timezone("Etc/UTC"),l),i<s.get_year(a)?(a=this._builder.startOfPeriod(o,r-1,i),l=h(this._sessionTgt.spec,a),{index:(r-1)/this._period,time:l}):{index:Object(n.toInt)(r/this._period),time:l}}sessionSrc(){return this._sessionSrc}_indexOfPeriodInYear(e){const t=this._builder.indexOfPeriod(e);let i=Object(n.toInt)(t/this._period)*this._period;return-1===t&&(i=-this._period),i}}function d(e,t){const i=s.get_day_of_week(t)-e.firstDayOfWeek();return i<0?i+7:i}function p(e,t){const i=s.get_day_of_year(t)-1;let r=d(e,t)-i%7;return 0===r?Object(n.toInt)(i/7):(r>=0&&(r-=7),Object(n.toInt)((r+i)/7))}class _{indexOfPeriod(e){return s.get_day_of_year(e)-1}startOfPeriod(e,t,i){const r=s.days_per_year(i);return s.get_cal(s.get_timezone("Etc/UTC"),i,s.JANUARY,1+Math.min(t,r))}}class m extends _{constructor(e){super(),this._sessionsSpec=e}indexOfPeriod(e){return super.indexOfPeriod(e)-function(e,t){const i=p(e,t),r=s.get_cal(s.get_timezone("Etc/UTC"),s.get_year(t),s.JANUARY,1);s.add_date(r,7*i);const n=i*e.weekEndsCount()+e.holidaysFromYearStart(r),o=s.get_day_of_year(t)-s.get_day_of_year(r);return n+o-e.calendarDaysToBusinessDays(r,o)}(this._sessionsSpec,e)}startOfPeriod(e,t,i){const r=7-this._sessionsSpec.weekEndsCount(),o=Math.max(0,Object(n.toInt)(t/r)-1),a=s.get_cal(s.get_timezone("Etc/UTC"),i,s.JANUARY,1),l=s.get_days_per_year(a);if(s.add_date(a,7*o),(t-=r*o-this._sessionsSpec.holidaysFromYearStart(a))>0){const e=this._sessionsSpec.businessDaysToCalendarDays(a,t);s.add_date(a,e)}let c=s.get_day_of_year(a)-1;return i<s.get_year(a)&&(c+=l),super.startOfPeriod(e,c,i)}}class f{constructor(e){this._builder=null,this._initialized=!1,this._session=e}indexOfPeriod(e){return this._getBuilder().indexOfPeriod(e)}startOfPeriod(e,t,i){return this._getBuilder().startOfPeriod(e,t,i)}_getBuilder(){return null!==this._builder&&this._initialized||(this._builder=this._session.spec.hasWeekEnds()?new m(this._session.spec):new _,this._initialized=!0),this._builder}}class g{constructor(e){this._session=e}indexOfPeriod(e){let t=p(this._session.spec,e);if(0===t){const i=s.get_timezone(this._session.spec.timezone());e<this.startOfPeriod(i,0,s.get_year(e))&&(t=-1)}return t}startOfPeriod(e,t,i){if(t<0){i--;const r=s.get_cal(s.get_timezone("Etc/UTC"),i,s.DECEMBER,31,23,59,59),o=this.indexOfPeriod(r),a=-1*t,l=Object(n.toInt)(o/a)*a;return this.startOfPeriod(e,l,i)} (this._periodLastBarStart<this._periodStart||this._periodLastBarStart===this._periodEnd)&&(this._periodLastBarStart=this._periodStart)}endOfBar(e){if(0!==e)throw new Error("index should be 0");return this._periodEnd}isLastBar(e,t){if(0!==e)throw new Error("index should be 0");return t>=this._periodLastBarStart}currentRange(){return{from:this._periodStartDay,to:this._periodEndDay}}indexOfBarInYear(e){const t=s.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e),i=s.get_year(t),r=this._builder.indexOfPeriod(t),o=this._sessionTgt.timezone;let a=this._builder.startOfPeriod(o,r,i),l=h(this._sessionTgt.spec,a);return a=s.get_cal_from_unix_timestamp_ms(s.get_timezone("Etc/UTC"),l),i<s.get_year(a)?(a=this._builder.startOfPeriod(o,r-1,i),l=h(this._sessionTgt.spec,a),{index:(r-1)/this._period,time:l}):{index:Object(n.toInt)(r/this._period),time:l}}sessionSrc(){return this._sessionSrc}_indexOfPeriodInYear(e){const t=this._builder.indexOfPeriod(e);let i=Object(n.toInt)(t/this._period)*this._period;return-1===t&&(i=-this._period),i}}function d(e,t){const i=s.get_day_of_week(t)-e.firstDayOfWeek();return i<0?i+7:i}function p(e,t){const i=s.get_day_of_year(t)-1;let r=d(e,t)-i%7;return 0===r?Object(n.toInt)(i/7):(r>=0&&(r-=7),Object(n.toInt)((r+i)/7))}class _{indexOfPeriod(e){return s.get_day_of_year(e)-1}startOfPeriod(e,t,i){const r=s.days_per_year(i);return s.get_cal(s.get_timezone("Etc/UTC"),i,s.JANUARY,1+Math.min(t,r))}}class m extends _{constructor(e){super(),this._sessionsSpec=e}indexOfPeriod(e){return super.indexOfPeriod(e)-function(e,t){const i=p(e,t),r=s.get_cal(s.get_timezone("Etc/UTC"),s.get_year(t),s.JANUARY,1);s.add_date(r,7*i);const n=i*e.weekEndsCount()+e.holidaysFromYearStart(r),o=s.get_day_of_year(t)-s.get_day_of_year(r);return n+o-e.calendarDaysToBusinessDays(r,o)}(this._sessionsSpec,e)}startOfPeriod(e,t,i){const r=7-this._sessionsSpec.weekEndsCount(),o=Math.max(0,Object(n.toInt)(t/r)-1),a=s.get_cal(s.get_timezone("Etc/UTC"),i,s.JANUARY,1),l=s.get_days_per_year(a);if(s.add_date(a,7*o),(t-=r*o-this._sessionsSpec.holidaysFromYearStart(a))>0){const e=this._sessionsSpec.businessDaysToCalendarDays(a,t);s.add_date(a,e)}let c=s.get_day_of_year(a)-1;return i<s.get_year(a)&&(c+=l),super.startOfPeriod(e,c,i)}}class f{constructor(e){this._builder=null,this._initialized=!1,this._session=e}indexOfPeriod(e){return this._getBuilder().indexOfPeriod(e)}startOfPeriod(e,t,i){return this._getBuilder().startOfPeriod(e,t,i)}_getBuilder(){return null!==this._builder&&this._initialized||(this._builder=this._session.spec.hasWeekEnds()?new m(this._session.spec):new _,this._initialized=!0),this._builder}}class g{constructor(e){this._session=e}indexOfPeriod(e){let t=p(this._session.spec,e);if(0===t){const i=s.get_timezone(this._session.spec.timezone());e<this.startOfPeriod(i,0,s.get_year(e))&&(t=-1)}return t}startOfPeriod(e,t,i){if(t<0){i--;const r=s.get_cal(s.get_timezone("Etc/UTC"),i,s.DECEMBER,31,23,59,59),o=this.indexOfPeriod(r),a=-1*t,l=Object(n.toInt)(o/a)*a;return this.startOfPeriod(e,l,i)}
const r=s.get_cal(s.get_timezone("Etc/UTC"),i,s.JANUARY,1),o=d(this._session.spec,r),a=0===o?7*t:7*(t+1)-o;return a>s.get_days_per_year(r)?this.startOfPeriod(e,0,i+1):(s.add_date(r,a),r)}}class v{indexOfPeriod(e){return s.get_month(e)}startOfPeriod(e,t,i){if(t<0){const e=Object(n.toInt)((11-t)/12);i-=e,t+=12*e}else t>s.DECEMBER&&(i++,t=s.JANUARY);return s.get_cal(s.get_timezone("Etc/UTC"),i,t,1)}}function b(e,t,i,s=!1){const n=r.Interval.parse(e),o=n.multiplier();return n.isMinutes()?new l(60*o,t):n.isSeconds()?new l(o,t):n.isTicks()?new l(1,t):n.isRange()?new l(60*o,t):new u(t,i,o,function(e,t){switch(e){case r.ResolutionKind.Days:return new f(t);case r.ResolutionKind.Weeks:return new g(t);case r.ResolutionKind.Months:return new v}throw new Error("Unknown dwm resolution: "+e)}(n.kind(),t),s)}function S(e,t,i,s,r,n,o){return w(e,t,i,s,r,n,o,0)}function y(e,t,i,s,r,n,o){return w(e,t,i,s,r,n,o,1)}function w(e,t,i,s,n,a,l,c){const h=r.Interval.parse(n+s);if(h.isMonths()){const e=new Date(l);return 0===c&&e.setUTCDate(1),function(e,t){T(e,Math.floor(t/12));let i=e.getUTCMonth()-t%12;i<0&&(T(e,1),i+=12);e.setUTCMonth(i);for(;e.getUTCMonth()!==i;)M(e,1)}(e,a*h.multiplier()),e.getTime()}const u=new o.b("Etc/UTC",e,t,i),d=h.inMilliseconds(),p=h.isDWM();let _;_=p?864e5:60*u.spec.findSession(0,0,0).getEntry().length()*1e3;let m=0;m=h.isWeeks()?7:7-u.spec.weekEndsCount();const f=_/d,g=m*f;let v;if(a<g)v=a/f;else{v=7*(a/g)}return p&&(v=Math.floor(v)),l-864e5*v}function C(e,t,i,s,n,a,l){const c=r.Interval.parse(n+s);if(c.isMonths()){const e=new Date(a),t=new Date(l);let i=12*(t.getUTCFullYear()-e.getUTCFullYear());return i+=t.getUTCMonth()-e.getUTCMonth(),Math.ceil(i/c.multiplier())}const h=new o.b("Etc/UTC",e,t,i),u=c.inMilliseconds();let d;d=c.isDWM()?864e5:60*h.spec.findSession(0,0,0).getEntry().length()*1e3;let p=0;p=c.isWeeks()?7:7-h.spec.weekEndsCount();const _=l-a,m=d/u,f=p*m;let g=_/864e5*m;return g>=f&&(g=_/6048e5*f),Math.ceil(g)}function P(e,t){const i=s.clone(t);return e.alignToSessionStart(i),s.cal_to_utc(s.get_timezone(e.timezone()),i)}function x(e,t){const i=s.utc_to_cal(t.timezone,+e);let r=s.get_day_of_week(i),n=s.get_minutes_from_midnight(i);const o=t.spec.findSession(t.spec.getWeekIndex(i),r,n).getEntry();return o.isOvernight()&&n>o.startOffset()+o.length()&&r===o.dayOfWeek()-1&&(r++,n-=1440),r===o.dayOfWeek()&&n>=o.startOffset()&&n<o.startOffset()+o.length()}function T(e,t){const i=e.getUTCMonth();e.setUTCFullYear(e.getUTCFullYear()-t),e.getUTCMonth()!==i&&M(e,1)}function M(e,t){e.setTime(e.getTime()-864e5*t)}i.d(t,"newBarBuilder",(function(){return b})),i.d(t,"alignPeriodsBackForDataRequest",(function(){return S})),i.d(t,"alignPeriodsBackForVisibleRange",(function(){return y})),i.d(t,"getPeriodsBetweenDates",(function(){return C})),i.d(t,"alignExchangeTimeToSessionStartAndReturnUTC",(function(){return P})),i.d(t,"isTradingNow",(function(){return x})),i.d(t,"SessionInfo",(function(){return o.b}))},IjC5:function(e,t,i){"use strict";i.r(t),i.d(t,"RectangleRenderer",(function(){return u})) const r=s.get_cal(s.get_timezone("Etc/UTC"),i,s.JANUARY,1),o=d(this._session.spec,r),a=0===o?7*t:7*(t+1)-o;return a>s.get_days_per_year(r)?this.startOfPeriod(e,0,i+1):(s.add_date(r,a),r)}}class v{indexOfPeriod(e){return s.get_month(e)}startOfPeriod(e,t,i){if(t<0){const e=Object(n.toInt)((11-t)/12);i-=e,t+=12*e}else t>s.DECEMBER&&(i++,t=s.JANUARY);return s.get_cal(s.get_timezone("Etc/UTC"),i,t,1)}}function b(e,t,i,s=!1){const n=r.Interval.parse(e),o=n.multiplier();return n.isMinutes()?new l(60*o,t):n.isSeconds()?new l(o,t):n.isTicks()?new l(1,t):n.isRange()?new l(60*o,t):new u(t,i,o,function(e,t){switch(e){case r.ResolutionKind.Days:return new f(t);case r.ResolutionKind.Weeks:return new g(t);case r.ResolutionKind.Months:return new v}throw new Error("Unknown dwm resolution: "+e)}(n.kind(),t),s)}function S(e,t,i,s,r,n,o){return w(e,t,i,s,r,n,o,0)}function y(e,t,i,s,r,n,o){return w(e,t,i,s,r,n,o,1)}function w(e,t,i,s,n,a,l,c){const h=r.Interval.parse(n+s);if(h.isMonths()){const e=new Date(l);return 0===c&&e.setUTCDate(1),function(e,t){T(e,Math.floor(t/12));let i=e.getUTCMonth()-t%12;i<0&&(T(e,1),i+=12);e.setUTCMonth(i);for(;e.getUTCMonth()!==i;)M(e,1)}(e,a*h.multiplier()),e.getTime()}const u=new o.b("Etc/UTC",e,t,i),d=h.inMilliseconds(),p=h.isDWM();let _;_=p?864e5:60*u.spec.maxTradingDayLength()*1e3;let m=0;m=h.isWeeks()?7:7-u.spec.weekEndsCount();const f=_/d,g=m*f;let v;if(a<g)v=a/f;else{v=7*(a/g)}return p&&(v=Math.floor(v)),l-864e5*v}function C(e,t,i,s,n,a,l){const c=r.Interval.parse(n+s);if(c.isMonths()){const e=new Date(a),t=new Date(l);let i=12*(t.getUTCFullYear()-e.getUTCFullYear());return i+=t.getUTCMonth()-e.getUTCMonth(),Math.ceil(i/c.multiplier())}const h=new o.b("Etc/UTC",e,t,i),u=c.inMilliseconds();let d;d=c.isDWM()?864e5:60*h.spec.maxTradingDayLength()*1e3;let p=0;p=c.isWeeks()?7:7-h.spec.weekEndsCount();const _=l-a,m=d/u,f=p*m;let g=_/864e5*m;return g>=f&&(g=_/6048e5*f),Math.ceil(g)}function P(e,t){const i=s.clone(t);return e.alignToSessionStart(i),s.cal_to_utc(s.get_timezone(e.timezone()),i)}function x(e,t){const i=s.utc_to_cal(t.timezone,+e);let r=s.get_day_of_week(i),n=s.get_minutes_from_midnight(i);const o=t.spec.findSession(t.spec.getWeekIndex(i),r,n).getEntry();return o.isOvernight()&&n>o.startOffset()+o.length()&&r===o.dayOfWeek()-1&&(r++,n-=1440),r===o.dayOfWeek()&&n>=o.startOffset()&&n<o.startOffset()+o.length()}function T(e,t){const i=e.getUTCMonth();e.setUTCFullYear(e.getUTCFullYear()-t),e.getUTCMonth()!==i&&M(e,1)}function M(e,t){e.setTime(e.getTime()-864e5*t)}i.d(t,"newBarBuilder",(function(){return b})),i.d(t,"alignPeriodsBackForDataRequest",(function(){return S})),i.d(t,"alignPeriodsBackForVisibleRange",(function(){return y})),i.d(t,"getPeriodsBetweenDates",(function(){return C})),i.d(t,"alignExchangeTimeToSessionStartAndReturnUTC",(function(){return P})),i.d(t,"isTradingNow",(function(){return x})),i.d(t,"SessionInfo",(function(){return o.b}))},IjC5:function(e,t,i){"use strict";i.r(t),i.d(t,"RectangleRenderer",(function(){return u}))
;var s=i("Eyy1"),r=i("aO4+"),n=i("f6yo"),o=i("GEp6"),a=i("VdBB"),l=i("Tmoa"),c=i("8Uy/"),h=i("gAom");class u{constructor(e,t,i){this._data=null,this._hitTestResult=e||new a.HitTestResult(a.HitTestResult.MOVEPOINT),this._backHitTestResult=t||new a.HitTestResult(a.HitTestResult.MOVEPOINT_BACKGROUND),this._forceOverrideTransparency=Boolean(i)}setData(e){this._data=e}hitTest(e,t){if(null===this._data||this._data.points.length<2||this._data.nohittest)return null;const[i,s]=this._getPointsInPhysicalSpace(t),n=new r.Point(s.x,i.y),a=new r.Point(i.x,s.y),l=new r.Point(e.x*t.pixelRatio,e.y*t.pixelRatio),c=this._extendAndHitTestLineSegment(l,i,n,t);if(null!==c)return c;const h=this._extendAndHitTestLineSegment(l,a,s,t);if(null!==h)return h;let u=Object(o.distanceToSegment)(n,s,l);return u.distance<=3?this._hitTestResult:(u=Object(o.distanceToSegment)(i,a,l),u.distance<=3?this._hitTestResult:this._data.fillBackground?this._hitTestBackground(l,i,s,t):null)}getColor(){const e=Object(s.ensure)(this._data);return void 0===e.transparency?e.backcolor:Object(l.generateColor)(e.backcolor,e.transparency,this._forceOverrideTransparency)}draw(e,t){if(null===this._data||this._data.points.length<2||this._data.linewidth<=0&&!this._data.fillBackground)return;e.save();const[i,s]=this._getPointsInPhysicalSpace(t),r=this._data.linewidth?Math.max(1,Math.floor(this._data.linewidth*t.pixelRatio)):0,n=this._data.fillBackground?this.getColor():void 0,o=Math.max(1,Math.floor(t.pixelRatio));Object(h.fillRectWithBorder)(e,i.x,i.y,s.x,s.y,n,this._data.color,r,c.LINESTYLE_SOLID,this._data.extendLeft,this._data.extendRight,"center",t.physicalWidth,this._data.includeRightEdge&&1===o?1:0),e.restore()}_getPointsInPhysicalSpace(e,t=0){const i=Object(s.ensureNotNull)(this._data),[n,o]=i.points,a=e.pixelRatio,l=Math.min(n.x,o.x),c=Math.max(n.x,o.x),h=Math.min(n.y,o.y),u=Math.max(n.y,o.y),d=Math.round(l*a)+t,p=Math.round(c*a)+t,_=Math.round(h*a)+t,m=Math.round(u*a)+t;return[new r.Point(d,_),new r.Point(p,m)]}_extendAndHitTestLineSegment(e,t,i,s){const r=this._extendAndClipLineSegment(t,i,s);if(null!==r){if(Object(o.distanceToSegment)(r[0],r[1],e).distance<=3)return this._hitTestResult}return null}_extendAndClipLineSegment(e,t,i){const n=Object(s.ensureNotNull)(this._data);if(Object(r.equalPoints)(e,t))return null;const o=i.physicalWidth,a=Math.min(e.x,t.x),l=Math.max(e.x,t.x),c=n.extendLeft?0:Math.max(a,0),h=n.extendRight?o:Math.min(l,o);return c>h||h<=0||c>=o?null:[new r.Point(c,e.y),new r.Point(h,t.y)]}_hitTestBackground(e,t,i,s){const o=this._extendAndClipLineSegment(t,i,s);return null!==o&&Object(n.pointInBox)(e,Object(r.box)(o[0],o[1]))?this._backHitTestResult:null}}},InMJ:function(e,t,i){"use strict";var s=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty;class n extends s{constructor(e,t){super(e,t||n.createProperties()),this.version=n.version,i.e("lt-pane-views").then(i.t.bind(null,"gr7S",7)).then(({FlatBottomPaneView:e})=>{this._setPaneViews([new e(this,this._model)])})}pointsCount(){return 3}name(){return"Flat Bottom"}hasEditableCoordinates(){ ;var s=i("Eyy1"),r=i("aO4+"),n=i("f6yo"),o=i("GEp6"),a=i("VdBB"),l=i("Tmoa"),c=i("8Uy/"),h=i("gAom");class u{constructor(e,t,i){this._data=null,this._hitTestResult=e||new a.HitTestResult(a.HitTestResult.MOVEPOINT),this._backHitTestResult=t||new a.HitTestResult(a.HitTestResult.MOVEPOINT_BACKGROUND),this._forceOverrideTransparency=Boolean(i)}setData(e){this._data=e}hitTest(e,t){if(null===this._data||this._data.points.length<2||this._data.nohittest)return null;const[i,s]=this._getPointsInPhysicalSpace(t),n=new r.Point(s.x,i.y),a=new r.Point(i.x,s.y),l=new r.Point(e.x*t.pixelRatio,e.y*t.pixelRatio),c=this._extendAndHitTestLineSegment(l,i,n,t);if(null!==c)return c;const h=this._extendAndHitTestLineSegment(l,a,s,t);if(null!==h)return h;let u=Object(o.distanceToSegment)(n,s,l);return u.distance<=3?this._hitTestResult:(u=Object(o.distanceToSegment)(i,a,l),u.distance<=3?this._hitTestResult:this._data.fillBackground?this._hitTestBackground(l,i,s,t):null)}getColor(){const e=Object(s.ensure)(this._data);return void 0===e.transparency?e.backcolor:Object(l.generateColor)(e.backcolor,e.transparency,this._forceOverrideTransparency)}draw(e,t){if(null===this._data||this._data.points.length<2||this._data.linewidth<=0&&!this._data.fillBackground)return;e.save();const[i,s]=this._getPointsInPhysicalSpace(t),r=this._data.linewidth?Math.max(1,Math.floor(this._data.linewidth*t.pixelRatio)):0,n=this._data.fillBackground?this.getColor():void 0,o=Math.max(1,Math.floor(t.pixelRatio));Object(h.fillRectWithBorder)(e,i.x,i.y,s.x,s.y,n,this._data.color,r,c.LINESTYLE_SOLID,this._data.extendLeft,this._data.extendRight,"center",t.physicalWidth,this._data.includeRightEdge&&1===o?1:0),e.restore()}_getPointsInPhysicalSpace(e,t=0){const i=Object(s.ensureNotNull)(this._data),[n,o]=i.points,a=e.pixelRatio,l=Math.min(n.x,o.x),c=Math.max(n.x,o.x),h=Math.min(n.y,o.y),u=Math.max(n.y,o.y),d=Math.round(l*a)+t,p=Math.round(c*a)+t,_=Math.round(h*a)+t,m=Math.round(u*a)+t;return[new r.Point(d,_),new r.Point(p,m)]}_extendAndHitTestLineSegment(e,t,i,s){const r=this._extendAndClipLineSegment(t,i,s);if(null!==r){if(Object(o.distanceToSegment)(r[0],r[1],e).distance<=3)return this._hitTestResult}return null}_extendAndClipLineSegment(e,t,i){const n=Object(s.ensureNotNull)(this._data);if(Object(r.equalPoints)(e,t))return null;const o=i.physicalWidth,a=Math.min(e.x,t.x),l=Math.max(e.x,t.x),c=n.extendLeft?0:Math.max(a,0),h=n.extendRight?o:Math.min(l,o);return c>h||h<=0||c>=o?null:[new r.Point(c,e.y),new r.Point(h,t.y)]}_hitTestBackground(e,t,i,s){const o=this._extendAndClipLineSegment(t,i,s);return null!==o&&Object(n.pointInBox)(e,Object(r.box)(o[0],o[1]))?this._backHitTestResult:null}}},InMJ:function(e,t,i){"use strict";var s=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty;class n extends s{constructor(e,t){super(e,t||n.createProperties()),this.version=n.version,i.e("lt-pane-views").then(i.t.bind(null,"gr7S",7)).then(({FlatBottomPaneView:e})=>{this._setPaneViews([new e(this,this._model)])})}pointsCount(){return 3}name(){return"Flat Bottom"}hasEditableCoordinates(){
return!1}addPoint(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),s.prototype.addPoint.call(this,e)}setLastPoint(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),s.prototype.setLastPoint.call(this,e)}setPoint(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,this._points[2].price=t.price,void this.normalizePoints();super.setPoint(e,t)}getPoint(e){return e<3?s.prototype.getPoint.call(this,e):3===e?{index:this._points[0].index,price:this._points[2].price}:void 0}canHasAlert(){return!0}_getAlertPlots(){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 s=this._points[2];s.time=t.time,s.index=t.index;var r,n,o,a,l={price:s.price,time:e.time,index:e.index},c=[];s.index<=l.index?(c.push(s),c.push(l)):(c.push(l),c.push(s)),i[0].price>c[0].price?(r=i,n=c):c[0].price>i[0].price||c[1].price>i[1].price?(r=c,n=i):(r=i,n=c);var h=this.properties().extendLeft.value(),u=this.properties().extendRight.value();return e.index<=t.index?(o=h,a=u):(o=u,a=h),[this._linePointsToAlertPlot(r,"Upper",o,a),this._linePointsToAlertPlot(n,"Lower",h,a)]}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(33),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"vm8R"))).GeneralTrendFiguresDefinitionsViewModel}static createProperties(e){var t=new r("linetoolflatbottom",e);return n._configureProperties(t),t}static _configureProperties(e){s._configureProperties(e)}}n.version=1,t.LineToolFlatBottom=n},J2xC:function(e,t,i){e.exports={"css-value-header-toolbar-height":"38px"}},JT5O:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyMarket",(function(){return n}));var s=i("hY0g"),r=i.n(s);class n{constructor(e,t){this._visibility=new r.a(!1),this._dialogPromise=null,this._dialog=null,this._chartWidgetCollection=e,this._options=t}visible(){return this._visibility.readonly()}show(e){var t;null===this._dialog&&this._requestDialog(e),null===(t=this._dialog)||void 0===t||t.open(e,void 0)}hide(){var e;null===(e=this._dialog)||void 0===e||e.hide()}resetAllPages(){var e;null===(e=this._dialog)||void 0===e||e.resetAllStudies()}_requestDialog(e){if(null===this._dialogPromise){let t;t=Promise.all([i.e("react"),i.e(1),i.e(2),i.e(3),i.e(6),i.e(8),i.e(9),i.e(15),i.e(35),i.e(41),i.e(70),i.e(82),i.e(0),i.e(5),i.e(37),i.e("study-market")]).then(i.bind(null,"zbLM")).then(e=>new e.IndicatorsLibraryContainer(this._chartWidgetCollection,this._options)),this._dialogPromise=t.then(t=>{this._dialog=t,this._dialog.visible().subscribe(e=>{this._visibility.setValue(e)}),this._dialog.open(e)})}return this._dialogPromise}}},JWMC:function(e,t,i){"use strict";i.r(t),i.d(t,"trackEvent",(function(){return l}));i("bSeV");var s=i("FQhm"),r=i("Kxc7"),n=i("txPx") return!1}addPoint(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),s.prototype.addPoint.call(this,e)}setLastPoint(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),s.prototype.setLastPoint.call(this,e)}setPoint(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,this._points[2].price=t.price,void this.normalizePoints();super.setPoint(e,t)}getPoint(e){return e<3?s.prototype.getPoint.call(this,e):3===e?{index:this._points[0].index,price:this._points[2].price}:void 0}canHasAlert(){return!0}_getAlertPlots(){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 s=this._points[2];s.time=t.time,s.index=t.index;var r,n,o,a,l={price:s.price,time:e.time,index:e.index},c=[];s.index<=l.index?(c.push(s),c.push(l)):(c.push(l),c.push(s)),i[0].price>c[0].price?(r=i,n=c):c[0].price>i[0].price||c[1].price>i[1].price?(r=c,n=i):(r=i,n=c);var h=this.properties().extendLeft.value(),u=this.properties().extendRight.value();return e.index<=t.index?(o=h,a=u):(o=u,a=h),[this._linePointsToAlertPlot(r,"Upper",o,a),this._linePointsToAlertPlot(n,"Lower",h,a)]}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(33),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"vm8R"))).GeneralTrendFiguresDefinitionsViewModel}static createProperties(e){var t=new r("linetoolflatbottom",e);return n._configureProperties(t),t}static _configureProperties(e){s._configureProperties(e)}}n.version=1,t.LineToolFlatBottom=n},J2xC:function(e,t,i){e.exports={"css-value-header-toolbar-height":"38px"}},JT5O:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyMarket",(function(){return n}));var s=i("hY0g"),r=i.n(s);class n{constructor(e,t){this._visibility=new r.a(!1),this._dialogPromise=null,this._dialog=null,this._chartWidgetCollection=e,this._options=t}visible(){return this._visibility.readonly()}show(e){var t;null===this._dialog&&this._requestDialog(e),null===(t=this._dialog)||void 0===t||t.open(e,void 0)}hide(){var e;null===(e=this._dialog)||void 0===e||e.hide()}resetAllPages(){var e;null===(e=this._dialog)||void 0===e||e.resetAllStudies()}_requestDialog(e){if(null===this._dialogPromise){let t;t=Promise.all([i.e("react"),i.e(1),i.e(2),i.e(3),i.e(6),i.e(8),i.e(9),i.e(15),i.e(35),i.e(41),i.e(70),i.e(82),i.e(0),i.e(5),i.e(37),i.e("study-market")]).then(i.bind(null,"zbLM")).then(e=>new e.IndicatorsLibraryContainer(this._chartWidgetCollection,this._options)),this._dialogPromise=t.then(t=>{this._dialog=t,this._dialog.visible().subscribe(e=>{this._visibility.setValue(e)}),this._dialog.open(e)})}return this._dialogPromise}}},JWMC:function(e,t,i){"use strict";i.r(t),i.d(t,"trackEvent",(function(){return l}));i("bSeV");var s=i("FQhm"),r=i("Kxc7"),n=i("txPx")
;const o=Object(n.getLogger)("Common.TrackEvent"),a=[/Study_(Drawing)_(.*)/,/(Study)_(.*)@tv-basicstudies/,/(Study)_(.*)/,/(Chart Style) (.*)/],l=(e,t,i)=>{if(r.enabled("charting_library_base"))return void((e,t,i)=>{t=t||e||i||"";let r="";for(let s=0;s<a.length;s++){const e=t.match(a[s]);if(e&&3===e.length){t=e[1],r=e[2];break}}Object(s.emit)(t.toLowerCase().replace(" ","_"),{category:e,label:i,value:r})})(e,t,i);let n=(e?e+":":"")+t;i&&(n+=" "+i),o.logNormal(n),r.enabled("widget")||!window._UNIT_TESTS&&window.gtag&&window.gtag("event",t,{event_category:e,event_label:i})};"undefined"!=typeof window&&(window.TradingView=window.TradingView||{},window.TradingView.trackEvent=l)},JcHK:function(e,t,i){"use strict";function s(e){return e.getAll().some(e=>e.isInitialized())}function r(e,t){const i=e.getAll(),s=()=>{t(),i.forEach(e=>{e.chartWidgetInitialized.unsubscribe(null,s)})};i.forEach(e=>{e.chartWidgetInitialized.subscribe(null,s,!0)})}i.r(t),i.d(t,"isAnyChartWidgetInitialized",(function(){return s})),i.d(t,"waitAnyChartWidgetInitialized",(function(){return r}))},JjUe:function(e,t,i){"use strict";i.r(t),i.d(t,"OverlayDataWindowView",(function(){return h}));var s=i("ivNn"),r=i("4miz"),n=i("qFKp"),o=i("e92V"),a=i("mMWL"),l=i("e1Hy");const c=n.CheckMobile.any();class h extends r.b{constructor(e,t){super(),this._invalidated=!0,this._study=e,this._model=t,this._valueProvider=this._createValuesProvider(e,t),this._items=this._valueProvider.getItems().map(e=>new r.a(e.title,"")),this.update()}items(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._items}update(){this._invalidated=!0}_updateImpl(){this._header=this._study.title();let e;this._showLastPriceAndChangeOnly()?e=this._study.data().lastIndex():(e=this._model.crossHairSource().appliedIndex(),Object(s.isNumber)(e)||(e=this._study.data().lastIndex()));const t=this._valueProvider.getValues(e);for(let i=0;i<t.length;++i){const e=t[i],s=this._items[i];s.setValue(e.value),s.setVisible(e.visible),s.setColor(e.color)}}_showLastPriceAndChangeOnly(){return c&&(null===this._model.crossHairSource().pane||Object(o.isLineToolName)(a.tool.value())||null!==this._model.lineBeingEdited())}_createValuesProvider(e,t){return new l.a(e,t)}}},JmuD:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasProperty=t.isObject=void 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 s=i("Eyy1").assert,r=i("lCO3").Version,n=i("txPx").getLogger("Chart.Study.Versioning"),o=i("Wt0y"),a=i("0YCj"),l=i("TcSq").extractPineId,c=i("Si3H").migrateMetaInfoAndPropState;function h(e,t){if(!e)throw new Error("No studies metainfo");var s=i("EyEd");if(this._studiesMetainfo=e,!t)throw new Error("No studies migrations");this._studiesMigrations=t,this._migrations={};for(var r=0;r<this._studiesMigrations.length;r++)for(var o=this._studiesMigrations[r],a=o.versFrom,l=o.versTo,c=0;c<o.studyMigrations.length;c++){var h=o.studyMigrations[c],u=h.studyId ;const o=Object(n.getLogger)("Common.TrackEvent"),a=[/Study_(Drawing)_(.*)/,/(Study)_(.*)@tv-basicstudies/,/(Study)_(.*)/,/(Chart Style) (.*)/],l=(e,t,i)=>{if(r.enabled("charting_library_base"))return void((e,t,i)=>{t=t||e||i||"";let r="";for(let s=0;s<a.length;s++){const e=t.match(a[s]);if(e&&3===e.length){t=e[1],r=e[2];break}}Object(s.emit)(t.toLowerCase().replace(" ","_"),{category:e,label:i,value:r})})(e,t,i);let n=(e?e+":":"")+t;i&&(n+=" "+i),o.logNormal(n),r.enabled("widget")||!window._UNIT_TESTS&&window.gtag&&window.gtag("event",t,{event_category:e,event_label:i})};"undefined"!=typeof window&&(window.TradingView=window.TradingView||{},window.TradingView.trackEvent=l)},JcHK:function(e,t,i){"use strict";function s(e){return e.getAll().some(e=>e.isInitialized())}function r(e,t){const i=e.getAll(),s=()=>{t(),i.forEach(e=>{e.chartWidgetInitialized.unsubscribe(null,s)})};i.forEach(e=>{e.chartWidgetInitialized.subscribe(null,s,!0)})}i.r(t),i.d(t,"isAnyChartWidgetInitialized",(function(){return s})),i.d(t,"waitAnyChartWidgetInitialized",(function(){return r}))},JjUe:function(e,t,i){"use strict";i.r(t),i.d(t,"OverlayDataWindowView",(function(){return h}));var s=i("ivNn"),r=i("4miz"),n=i("qFKp"),o=i("e92V"),a=i("mMWL"),l=i("e1Hy");const c=n.CheckMobile.any();class h extends r.b{constructor(e,t){super(),this._invalidated=!0,this._study=e,this._model=t,this._valueProvider=this._createValuesProvider(e,t),this._items=this._valueProvider.getItems().map(e=>new r.a(e.title,"")),this.update()}items(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._items}update(){this._invalidated=!0}_updateImpl(){this._header=this._study.title();let e;this._showLastPriceAndChangeOnly()?e=this._study.data().lastIndex():(e=this._model.crossHairSource().appliedIndex(),Object(s.isNumber)(e)||(e=this._study.data().lastIndex()));const t=this._valueProvider.getValues(e);for(let i=0;i<t.length;++i){const e=t[i],s=this._items[i];s.setValue(e.value),s.setVisible(e.visible),s.setColor(e.color)}}_showLastPriceAndChangeOnly(){return c&&(null===this._model.crossHairSource().pane||Object(o.isLineToolName)(a.tool.value())||null!==this._model.lineBeingEdited())}_createValuesProvider(e,t){return new l.a(e,t)}}},JmuD:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasProperty=t.isObject=void 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 s=i("Eyy1").assert,r=i("lCO3").Version,n=i("txPx").getLogger("Chart.Study.Versioning"),o=i("Wt0y"),a=i("0YCj"),l=i("TcSq").extractPineId,c=i("Si3H").migrateMetaInfoAndPropState;function h(e,t){if(!e)throw new Error("No studies metainfo");var s=i("EyEd");if(this._studiesMetainfo=e,!t)throw new Error("No studies migrations");this._studiesMigrations=t,this._migrations={};for(var r=0;r<this._studiesMigrations.length;r++)for(var o=this._studiesMigrations[r],a=o.versFrom,l=o.versTo,c=0;c<o.studyMigrations.length;c++){var h=o.studyMigrations[c],u=h.studyId

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{ {
"private": true, "private": true,
"description": "CL v20.034 (internal id e16a61a3 @ 2022-01-24T10:49:41.818Z)", "description": "CL v20.035 (internal id 64d1f18e @ 2022-01-25T15:08:34.498Z)",
"type": "module", "type": "module",
"main": "charting_library.cjs.js", "main": "charting_library.cjs.js",
"module": "charting_library.esm.js", "module": "charting_library.esm.js",