Files
ai/charting_library/bundles/library.9eee0bfe87c02df9a38d.js
2020-09-15 07:59:35 +00:00

677 lines
1.9 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window.webpackJsonp=window.webpackJsonp||[]).push([["library"],{"+6ja":function(e,t,i){"use strict";function n(e){for(var t=0;t<h.length;t++)if(e===h[t].id)return!0;return!1}var o,r,s,a,l,c,u,h;for(i.r(t),i.d(t,"availableTimezones",function(){return h}),i.d(t,"timezoneIsAvailable",function(){return n}),i("YFKU"),o=i("U/gD"),r=[{id:"Etc/UTC",title:window.t("UTC")},{id:"exchange",title:window.t("Exchange")}],a=0,l=s=[{id:"Africa/Cairo",title:window.t("Cairo"),offset:0},{id:"Africa/Johannesburg",title:window.t("Johannesburg"),offset:0},{id:"Africa/Lagos",title:window.t("Lagos"),offset:0},{id:"America/Argentina/Buenos_Aires",title:window.t("Buenos Aires"),offset:0},{id:"America/Bogota",title:window.t("Bogota"),offset:0},{id:"America/Caracas",title:window.t("Caracas"),offset:0},{id:"America/Chicago",title:window.t("Chicago"),offset:0},{id:"America/El_Salvador",title:window.t("San Salvador"),offset:0},{id:"America/Juneau",title:window.t("Juneau"),offset:0},{id:"America/Lima",title:window.t("Lima"),offset:0},{id:"America/Los_Angeles",title:window.t("Los Angeles"),offset:0},{id:"America/Mexico_City",title:window.t("Mexico City"),offset:0},{id:"America/New_York",title:window.t("New York"),offset:0},{id:"America/Phoenix",title:window.t("Phoenix"),offset:0},{id:"America/Santiago",title:window.t("Santiago"),offset:0},{id:"America/Sao_Paulo",title:window.t("Sao Paulo"),offset:0},{id:"America/Toronto",title:window.t("Toronto"),offset:0},{id:"America/Vancouver",title:window.t("Vancouver"),offset:0},{id:"US/Mountain",title:window.t("Denver"),offset:0},{id:"Asia/Almaty",title:window.t("Almaty"),offset:0},{id:"Asia/Ashkhabad",title:window.t("Ashkhabad"),offset:0},{id:"Asia/Bahrain",title:window.t("Bahrain"),offset:0},{id:"Asia/Bangkok",title:window.t("Bangkok"),offset:0},{id:"Asia/Chongqing",title:window.t("Chongqing"),offset:0},{id:"Asia/Dubai",title:window.t("Dubai"),offset:0},{id:"Asia/Ho_Chi_Minh",title:window.t("Ho Chi Minh"),offset:0},{id:"Asia/Hong_Kong",title:window.t("Hong Kong"),offset:0},{id:"Asia/Jakarta",title:window.t("Jakarta"),offset:0},{id:"Asia/Jerusalem",title:window.t("Jerusalem"),offset:0},{id:"Asia/Kolkata",title:window.t("Kolkata"),offset:0},{id:"Asia/Kuwait",title:window.t("Kuwait"),offset:0},{id:"Asia/Muscat",title:window.t("Muscat"),offset:0},{id:"Asia/Qatar",title:window.t("Qatar"),offset:0},{id:"Asia/Riyadh",title:window.t("Riyadh"),offset:0},{id:"Asia/Seoul",title:window.t("Seoul"),offset:0},{id:"Asia/Shanghai",title:window.t("Shanghai"),offset:0},{id:"Asia/Singapore",title:window.t("Singapore"),offset:0},{id:"Asia/Taipei",title:window.t("Taipei"),offset:0},{id:"Asia/Tehran",title:window.t("Tehran"),offset:0},{id:"Asia/Tokyo",title:window.t("Tokyo"),offset:0},{id:"Atlantic/Reykjavik",title:window.t("Reykjavik"),offset:0},{id:"Australia/Adelaide",title:window.t("Adelaide"),offset:0},{id:"Australia/Brisbane",title:window.t("Brisbane"),offset:0},{id:"Australia/Perth",title:window.t("Perth"),offset:0},{id:"Australia/Sydney",title:window.t("Sydney"),offset:0},{id:"Europe/Athens",title:window.t("Athens"),
offset:0},{id:"Europe/Belgrade",title:window.t("Belgrade"),offset:0},{id:"Europe/Berlin",title:window.t("Berlin"),offset:0},{id:"Europe/Copenhagen",title:window.t("Copenhagen"),offset:0},{id:"Europe/Helsinki",title:window.t("Helsinki"),offset:0},{id:"Europe/Istanbul",title:window.t("Istanbul"),offset:0},{id:"Europe/London",title:window.t("London"),offset:0},{id:"Europe/Luxembourg",title:window.t("Luxembourg"),offset:0},{id:"Europe/Madrid",title:window.t("Madrid"),offset:0},{id:"Europe/Moscow",title:window.t("Moscow"),offset:0},{id:"Europe/Oslo",title:window.t("Oslo"),offset:0},{id:"Europe/Paris",title:window.t("Paris"),offset:0},{id:"Europe/Riga",title:window.t("Riga"),offset:0},{id:"Europe/Rome",title:window.t("Rome"),offset:0},{id:"Europe/Stockholm",title:window.t("Stockholm"),offset:0},{id:"Europe/Tallinn",title:window.t("Tallinn"),offset:0},{id:"Europe/Vilnius",title:window.t("Vilnius"),offset:0},{id:"Europe/Warsaw",title:window.t("Warsaw"),offset:0},{id:"Europe/Zurich",title:window.t("Zurich"),offset:0},{id:"Pacific/Auckland",title:window.t("New Zealand"),offset:0},{id:"Pacific/Chatham",title:window.t("Chatham Islands"),offset:0},{id:"Pacific/Fakaofo",title:window.t("Tokelau"),offset:0},{id:"Pacific/Honolulu",title:window.t("Honolulu"),offset:0},{id:"Pacific/Norfolk",title:window.t("Norfolk Island"),offset:0}];a<l.length;a++)c=l[a],u=Object(o.a)(c.id),c.title="("+u.string+") "+c.title,c.offset=u.offset;s.sort(function(e,t){var i=e.offset-t.offset;return 0!==i?i:e.title.localeCompare(t.title)}),h=r.concat(s)},"+GxX":function(e,t,i){"use strict";var n=i("VVxS").TVLocalStorage;i("qFKp"),TradingView.FeatureToggle={force_prefix:"forcefeaturetoggle.",enableFeature:function(e){n.setItem(this.force_prefix+e,"true")},disableFeature:function(e){n.setItem(this.force_prefix+e,"false")},resetFeature:function(e){n.removeItem(this.force_prefix+e)}},TradingView.isFeatureEnabled=function(e){var t="featuretoggle.";return function(i){var o;return!("local"!==window.environment||!function(e){return-1===["alert_email_to_sms","black_friday_mainpage","black_friday_popup","black_friday","broker_ALOR_dev","broker_TRADESTATION_coming_soon","datawindow","hide-copy-readonly","chart_sharing","pwa","hide-alert-controls-on-property-page","trading-fast-renew-oauth-token","switching_trial_year_to_month_disabled","switching_year_to_month_disabled","default_year_billing_cycle_switcher","order_countries_zip","marketing-analytics"].indexOf(e)&&-1===e.indexOf("-maintenance")}(i))||(!e[i]||-1!==e[i])&&(!!("true"===n.getItem(TradingView.FeatureToggle.force_prefix+i)||window.is_authenticated&&"undefined"!=typeof user&&user.settings&&"true"===user.settings[TradingView.FeatureToggle.force_prefix+i])||!("false"===n.getItem(TradingView.FeatureToggle.force_prefix+i)||window.is_authenticated&&"undefined"!=typeof user&&user.settings&&"false"===user.settings[TradingView.FeatureToggle.force_prefix+i])&&(!!e[i]&&(1===e[i]||(void 0===(o=n.getItem(t+i))||null===o?function(i){var o=Math.random()<=e[i];return n.setItem(t+i,o),o}(i):"true"===o))))}
}(window.featureToggleState||{}),t.FeatureToggle=TradingView.FeatureToggle,t.isFeatureEnabled=TradingView.isFeatureEnabled},"+hLl":function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolBrush";var r=t||n.createProperties();o.call(this,e,r),this._finished=!1,i.e("lt-pane-views").then(function(e){var t=i("00XE").BrushPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=window.t("Brush");inherit(n,o),n.prototype.pointsCount=function(){return-1},n.prototype.finished=function(){return this._finished},n.prototype.finish=function(){this._finished=!0,this._lastPoint=null,this.normalizePoints(),this.createServerPoints()},n.prototype.title=function(){return a},n.prototype.name=function(){return"Brush"},n.prototype.hasEditableCoordinates=function(){return!1},n.prototype.percentDistance=function(e,t){return Math.abs((t-e)/e)},n.prototype.addPoint=function(e){var t,i;return!!this._finished||(this._lastPoint=null,this._points.length>0&&(t=this._points[this._points.length-1],i=this.pointToScreenPoint(t)[1],this.pointToScreenPoint(e)[1].subtract(i).length()<2)?this._finished:(o.prototype.addPoint.call(this,e),this._finished))},n.prototype.restorePoints=function(e,t,i){o.prototype.restorePoints.call(this,e,t,i),this._finished=!0},n.prototype.getInputsPropertyPage=function(){return null},n.prototype.getStylesPropertyPage=function(){return s.LineToolBrushStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("ZSes").BrushDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new r("linetoolbrush",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolBrush=n},"+q2u":function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"PaneRendererCrossShape",function(){return r}),n=i("mrSG"),o=i("2WC2"),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._drawItemShape=function(e,t){var i=t.width,n=t.height,o=t.x-i/2,r=t.vertOffset,s=t.y-n/2+r;e.moveTo(o+i/2,s),e.lineTo(o+i/2,s+n),e.moveTo(o,s+n/2),e.lineTo(o+i,s+n/2)},t}(o.c)},"//lt":function(e,t,i){"use strict";var n;i.r(t),i.d(t,"PaneCursorType",function(){return n}),function(e){e[e.Default=0]="Default",e[e.Pointer=1]="Pointer",e[e.Eraser=2]="Eraser",e[e.Dot=3]="Dot",e[e.Grabbing=4]="Grabbing",e[e.ZoomIn=5]="ZoomIn",e[e.VerticalResize=6]="VerticalResize"}(n||(n={}))},"/3z9":function(e,t,i){"use strict";function n(e){var t=0;return e.shiftKey&&(t+=1024),e.altKey&&(t+=512),e.ctrlKey&&(t+=256),e.metaKey&&(t+=2048),t}function o(e){return n(e)|e.keyCode}function r(e){var t="";return 256&e&&(t+=l?"^":"Ctrl + "),512&e&&(t+=l?"⌥":"Alt + "),1024&e&&(t+=l?"⇧":"Shift + "),2048&e&&(t+=l?"⌘":"Win + "),t}function s(e){var t=r(e),i=255&e;return t+=i in u?u[i]:String.fromCharCode(i)}var a,l,c,u,h
;for(i.r(t),i.d(t,"isMacKeyboard",function(){return l}),i.d(t,"Modifiers",function(){return c}),i.d(t,"modifiersFromEvent",function(){return n}),i.d(t,"hashFromEvent",function(){return o}),i.d(t,"humanReadableModifiers",function(){return r}),i.d(t,"humanReadableHash",function(){return s}),a=i("qFKp"),i.n(a),l=Object(a.isMac)()||a.CheckMobile.iOS(),function(e){e[e.None=0]="None",e[e.Alt=512]="Alt",e[e.Shift=1024]="Shift",e[e.Mod=l?2048:256]="Mod",e[e.Control=256]="Control",e[e.Meta=2048]="Meta"}(c||(c={})),u={9:"⇥",13:"↵",27:"Esc",8:l?"⌫":"Backspace",32:"Space",35:"End",36:"Home",37:"←",38:"↑",39:"→",40:"↓",45:"Ins",46:"Del",191:"/"},h=1;h<=16;h++)u[h+111]="F"+h},"/5ju":function(e,t,i){"use strict";function n(e,t,i,n){return Object(r.__awaiter)(this,void 0,void 0,function(){var o;return Object(r.__generator)(this,function(r){return o=new s.SaveRenameDialog({fields:[new a.InputField({name:y,label:e+":",error:t,maxLength:64})],title:i}),void 0!==n&&o.setField(y,n),[2,o.show().then(function(e){return e[y]})]})})}function o(){return Object(r.__awaiter)(this,void 0,void 0,function(){return Object(r.__generator)(this,function(e){return[2,new Promise(function(e){c.enabled("saved_charts_count_restriction")&&window.is_authenticated&&!window.user.is_pro?l.backend.getChartsCount(function(t){e(t<5)}):e(!0)})]})})}var r,s,a,l,c,u,h,d,p,_,f,m,y,g;i.r(t),i.d(t,"SaveChartService",function(){return g}),r=i("mrSG"),s=i("UJLt"),a=i("hkLy"),l=i("zUrt"),c=i("Kxc7"),u=i("hY0g"),h=i.n(u),d=i("FQhm"),p=i("htUT"),_=i("/z0S"),f=i("BxxN"),m={labelName:window.t("Chart layout name"),labelRename:window.t("Enter a new chart layout name"),error:window.t("Please enter chart layout name"),titleNew:window.t("Save New Chart Layout"),titleRename:window.t("Rename Chart Layout"),titleCopy:window.t("Copy Chart Layout"),valueCopy:window.t("{0} copy",{context:"ex: AAPL chart copy"})},y="chart-title",g=function(){function e(e,t){this._autosaveTimer=null,this._watchedAutoSaveEnabled=new h.a,this._toggleAutoSaveEnabledHandler=this._toggleAutoSaveEnabled.bind(this),this._chartWidgetCollection=e,this._chartSaver=t,this._chartChangesWatcher=new p.ChartChangesWatcher(e.undoHistory,t,d),e.saveKeysPressed().subscribe(this,this.saveChartOrShowTitleDialog),this._chartChangesWatcher.getOnChange().subscribe(this,this._onStateChanged)}return e.prototype.autoSaveEnabled=function(){return this._watchedAutoSaveEnabled},e.prototype.destroy=function(){0},e.prototype.cloneChart=function(){return Object(r.__awaiter)(this,void 0,void 0,function(){var e,t;return Object(r.__generator)(this,function(i){switch(i.label){case 0:return e=this._chartWidgetCollection,[4,o()];case 1:return i.sent()?[4,function(e){return Object(r.__awaiter)(this,void 0,void 0,function(){return Object(r.__generator)(this,function(t){return[2,n(m.labelRename,m.error,m.titleCopy,m.valueCopy.format(e))]})})}(e.metaInfo.name.value())]:[3,3];case 2:return t=i.sent(),this._saveCurrentChartAsNewWithTitle(t),[3,5];case 3:return[3,5];case 4:i.sent().open(),i.label=5;case 5:return[2]}})})},
e.prototype.saveChartAs=function(){Object(_.a)(this.cloneChart.bind(this),{source:"Clone chart"})},e.prototype.renameChart=function(){var e=this;Object(_.a)(function(){return Object(r.__awaiter)(e,void 0,void 0,function(){var e,t;return Object(r.__generator)(this,function(i){switch(i.label){case 0:return e=this._chartWidgetCollection,[4,function(e){return Object(r.__awaiter)(this,void 0,void 0,function(){return Object(r.__generator)(this,function(t){return[2,n(m.labelRename,m.error,m.titleRename,e)]})})}(e.metaInfo.name.value())];case 1:return t=i.sent(),e.metaInfo.name.setValue(t),this._doSave(),[2]}})})},{source:"Rename chart"})},e.prototype.saveNewChart=function(e,t,i){return Object(r.__awaiter)(this,void 0,void 0,function(){var s,a,l;return Object(r.__generator)(this,function(c){switch(c.label){case 0:return s=this._chartWidgetCollection,a=s.metaInfo.name.value(),[4,o()];case 1:return c.sent()?[4,function(e){return Object(r.__awaiter)(this,void 0,void 0,function(){return Object(r.__generator)(this,function(t){return[2,n(m.labelRename,m.error,m.titleNew,e)]})})}(a)]:[3,3];case 2:return l=c.sent(),s.metaInfo.name.setValue(l),this._doSave(e,t,i),[3,5];case 3:return[3,5];case 4:c.sent().open(),c.label=5;case 5:return[2]}})})},e.prototype.saveExistentChart=function(e,t,i){this._doSave(e,t,i)},e.prototype.saveChartOrShowTitleDialog=function(e,t,i){var n=this,o=window.saver.isSaveInProcess(),r=this._chartChangesWatcher.hasChanges(),s=!!this._chartWidgetCollection.metaInfo.id.value();window.is_authenticated&&(o||!r&&s)||Object(_.a)(function(){null!=n._chartWidgetCollection.metaInfo.id.value()?n.saveExistentChart(e,t,i):n.saveNewChart(e,t,i)},{source:"Save chart",sourceMeta:"Chart"})},e.prototype.whenReadyToSave=function(e){this._chartSaver.whenReadyToSave(e)},e.prototype.saveToJSON=function(){return this._chartSaver.saveToJSON()},e.prototype.saveChartSilently=function(e,t,i){this._chartSaver.saveChartSilently(e,t,i)},e.prototype.setAutoSaveEnabled=function(e){var t=this;window.is_authenticated&&window.saver.isSaveInProcess()||Object(_.a)(function(){t._watchedAutoSaveEnabled.setValue(e)},{source:"AutoSave chart"})},e.prototype._autoSaveEnabledSettingHandler=function(e){0},e.prototype._toggleAutoSaveEnabled=function(e){0},e.prototype._enableAutoSave=function(){0},e.prototype._disableAutoSave=function(){0},e.prototype._onStateChanged=function(e){e?this._startAutosave():this._stopAutosave()},e.prototype._saveCurrentChartAsNewWithTitle=function(e){var t=this._chartWidgetCollection;c.enabled("saveload_storage_customization")?(t.metaInfo.uid.deleteValue(),t.metaInfo.id.deleteValue(),t.metaInfo.name.setValue(e),this._doSave()):window.open(Object(f.a)({clone:t.metaInfo.uid.value(),name:e}),"_blank")},e.prototype._doSave=function(e,t,i,n){var o=this._chartWidgetCollection;void 0!==e&&e(),this._chartSaver.saveChartSilently(function(e){var i;i=o.metaInfo.uid.value(),"/chart/"===location.pathname&&(location.href="/chart/"+i),void 0!==t&&t(e)},function(){void 0!==i&&i()},{autoSave:Boolean(n)})},e.prototype._startAutosave=function(){
var e=this;c.enabled("charts_auto_save")&&null===this._autosaveTimer&&(this._autosaveTimer=setTimeout(function(){e._autosaveTimer=null,e._chartWidgetCollection.metaInfo.id.value()&&e._doSave(void 0,void 0,void 0,!0)},6e4))},e.prototype._stopAutosave=function(){null!==this._autosaveTimer&&(clearInterval(this._autosaveTimer),this._autosaveTimer=null)},e}()},"/DxK":function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolHorzLine";var s=t||n.createProperties();this._priceAxisView=new r(this),o.call(this,e,s),i.e("lt-pane-views").then(function(e){var t=i("ckl+").HorzLinePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("p1SQ").LineToolHorzLinePriceAxisView,s=i("tc+8"),a=i("Ocx9").DefaultProperty,l=i("hayr").propertyPages,c=window.t("Horizontal Line");inherit(n,o),n.prototype.state=function(e){var t=o.prototype.state.call(this,e);return t.points&&0!==t.points.length&&(t.points[0].offset=0),t},n.prototype.pointsCount=function(){return 1},n.prototype.title=function(){return c},n.prototype.name=function(){return"Horizontal Line"},n.prototype.priceAxisViews=function(e,t){return this.isSourceHidden()?null:t===this.priceScale()&&this.properties().showPrice.value()&&this._model.paneForSource(this)===e?[this._priceAxisView]:null},n.prototype.updateAllViews=function(){o.prototype.updateAllViews.call(this),this._priceAxisView.update()},n.prototype.canHasAlert=function(){return!0},n.prototype._getAlertPlots=function(){return[this.points()[0].price]},n.prototype.getInputsPropertyPage=function(){return l.LineToolHorzLineInputsPropertyPage},n.prototype.getStylesPropertyPage=function(){return l.LineToolHorzLineStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("NEbb").HorizontalLineDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.prototype.template=function(){var e=o.prototype.template.call(this);return e.text=this.properties().childs().text.value(),e},n.prototype._applyTemplateImpl=function(e){o.prototype._applyTemplateImpl.call(this,e),this.properties().childs().text.setValue(e.text)},n.createProperties=function(e){var t=new a("linetoolhorzline",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e),e.hasChild("text")||e.addChild("text",new s("")),e.addExclusion("text")},t.LineToolHorzLine=n},"/McG":function(e){e.exports={content:{chartProperties:{scalesProperties:{textColor:"#50535E",lineColor:"#50535E",backgroundColor:"#ffffff"},paneProperties:{vertGridProperties:{color:"#e1ecf2"},horzGridProperties:{color:"#e1ecf2"},background:"#ffffff"}},sessions:{graphics:{backgrounds:{outOfSession:{color:"#2196F3",transparency:80}},vertlines:{sessBreaks:{color:"#4985e7",style:2,width:1}}}},mainSourceProperties:{baseLineColor:"#B2B5BE",candleStyle:{borderColor:"#378658",upColor:"#26a69a",wickColor:"#737375",wickUpColor:"#26a69a",wickDownColor:"#ef5350",downColor:"#ef5350",
borderUpColor:"#26a69a",borderDownColor:"#ef5350"},haStyle:{borderColor:"#378658",upColor:"#26a69a",wickColor:"#737375",wickUpColor:"#26a69a",wickDownColor:"#ef5350",downColor:"#ef5350",borderUpColor:"#26a69a",borderDownColor:"#ef5350"},barStyle:{downColor:"#ef5350",upColor:"#26a69a"},pnfStyle:{downColor:"#ef5350",upColor:"#26a69a",upColorProjection:"#a9dcc3",downColorProjection:"#f5a6ae"},baselineStyle:{baselineColor:"rgba( 117, 134, 150, 1)",topFillColor1:"rgba( 38, 166, 154, 0.05)",topFillColor2:"rgba( 38, 166, 154, 0.05)",bottomFillColor1:"rgba( 239, 83, 80, 0.05)",bottomFillColor2:"rgba( 239, 83, 80, 0.05)",topLineColor:"rgba( 38, 166, 154, 1)",bottomLineColor:"rgba( 239, 83, 80, 1)"},areaStyle:{transparency:95,color1:"#2196f3",color2:"#2196f3",linecolor:"#2196f3",linewidth:3,linestyle:0},renkoStyle:{upColor:"#26a69a",downColor:"#ef5350",borderUpColor:"#26a69a",borderDownColor:"#ef5350",upColorProjection:"#a9dcc3",downColorProjection:"#f5a6ae",borderUpColorProjection:"#a9dcc3",borderDownColorProjection:"#f5a6ae",wickUpColor:"#26a69a",wickDownColor:"#ef5350"},lineStyle:{color:"#2196f3",linewidth:3,linestyle:0},kagiStyle:{downColor:"#ef5350",upColor:"#26a69a",upColorProjection:"#a9dcc3",downColorProjection:"#f5a6ae"},pbStyle:{upColor:"#26a69a",downColor:"#ef5350",borderUpColor:"#26a69a",borderDownColor:"#ef5350",upColorProjection:"#a9dcc3",downColorProjection:"#f5a6ae",borderUpColorProjection:"#a9dcc3",borderDownColorProjection:"#f5a6ae"},rangeStyle:{upColor:"#26a69a",downColor:"#ef5350",upColorProjection:"#a9dcc3",downColorProjection:"#f5a6ae"}}}}},"/ToI":function(e,t,i){"use strict";var n,o,r,s,a;i.r(t),i.d(t,"MoveToNewPriceScaleUndoCommand",function(){return s}),i.d(t,"MoveToExistingPriceScaleUndoCommand",function(){return a}),n=i("mrSG"),o=i("Eyy1"),r=function(e){function t(t,i,n,o){var r=e.call(this,t,i,o)||this;return r._sourcePaneRemoved=!1,r._targetPaneIndex=t.panes().indexOf(n),r}return Object(n.__extends)(t,e),t.prototype.redo=function(){var e,t,i,n,r=this._chartModel.panes()[this._initialPaneIndex],s=this._chartModel.panes()[this._targetPaneIndex],a=r!==s,l=this._targetPriceScale(s),c=Object(o.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),u=this._chartModel.children(c,!0);for(e=0,t=u;e<t.length;e++)i=t[e],a?(this._chartModel.detachSource(i),s.addDataSource(i,l,!1)):s.move(i,l);a?(this._sourcePaneRemoved=this._chartModel.detachSource(c),s.addDataSource(c,l,!1)):s.move(c,l),n=s.priceScalePosition(l),s.movePriceScale(l,n,this._targetPriceScaleIndex(c)),this._chartModel.fullUpdate()},t.prototype.undo=function(){var e,t,i,n,r,s,a;for(this._sourcePaneRemoved&&this._chartModel.createPane(this._initialPaneIndex),t=(e=this._chartModel.panes()[this._initialPaneIndex])!==this._chartModel.panes()[this._targetPaneIndex],i=Object(o.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),null===(n=e.getPriceScaleById(this._initialPriceScaleId))&&(n=e.createPriceScaleAtPosition(this._initialPriceScalePosition,this._initialPriceScaleIndex)),r=0,
s=this._chartModel.children(i,!0);r<s.length;r++)a=s[r],t?(this._chartModel.detachSource(a),e.addDataSource(a,n,!1)):e.move(a,n);t?(this._chartModel.detachSource(i),e.addDataSource(i,n,!1)):e.move(i,n),this._chartModel.fullUpdate()},t}(i("3u3j").a),s=function(e){function t(t,i,n,r,s){var a=e.call(this,t,i,n,s)||this;return a._targetPriceScalePosition=r,a._sourceScaleState=Object(o.ensureNotNull)(i.priceScale()).state(),delete a._sourceScaleState.m_isLockScale,delete a._sourceScaleState.id,a}return Object(n.__extends)(t,e),t.prototype._targetPriceScale=function(e){var t=e.createPriceScaleAtPosition(this._targetPriceScalePosition);return t.restoreState(this._sourceScaleState),t},t.prototype._targetPriceScaleIndex=function(e){return e===this._chartModel.mainSeries()?0:void 0},t}(r),a=function(e){function t(t,i,n,o,r){var s=e.call(this,t,i,n,r)||this;return s._targetPriceScaleId=o.id(),s}return Object(n.__extends)(t,e),t.prototype._targetPriceScale=function(e){return Object(o.ensureNotNull)(e.getPriceScaleById(this._targetPriceScaleId))},t.prototype._targetPriceScaleIndex=function(e){},t}(r)},"/Y2c":function(e,t,i){"use strict";(function(t){var n=i("Eyy1").assert,o=i("VNzU").layouts,r=i("Zo2/"),s=i("qFKp"),a=s.supportTouch,l=i("qFKp").isIE,c=i("qFKp").isEdge,u=i("x8jL").createUndoHistory,h=i("mMWL"),d=i("lxNp"),p=i("/3z9"),_=i("FQhm"),f=i("l7mP"),m=i("Kxc7"),y=i("ijBy").SetChartLayoutCommand,g=i("hY0g"),v=i("HySD").ResizerDetacherState,S=i("HV/F").delegateToPromise,b=i("sEk5"),w=i("lJvs"),P=i("uOxu").getLogger("Chart.ChartWidgetCollection"),C=(i("PC8g").trackEvent,i("wamh").ChangeToolBarsThemeUndoCommand),T=i("EsvI").getCurrentTheme,x=i("ULlu").unwrap,I=i("dfhE"),L={saveChartEnabled:!0,takeScreenshotEnabled:!0};e.exports=function(e){function s(){var e=Re+Ne,t=be?be.offsetHeight:0;return{width:ue.value()-2*e,height:he.value()-Ve-t-e,top:Ve,left:e}}function M(){return o[Ge].count}function A(e,t,i,n){return e<je.length?je[e].chartWidget.state(t,i,n):Q[e-je.length].content}function k(){var e,t;for(e=de?[de]:je.slice(0,Ye.count).filter(function(e){return!e.hiddenInLayout.value()}),t=0;t<e.length;t++)E(e[t],t,e.length)}function E(e,t,i){var n=Ye.sizer(s(),t,i,Be+Ne);n.width=Math.max(Math.round(n.width),0),n.height=Math.max(Math.round(n.height),0),n.top=Math.round(n.top),n.left=Math.round(n.left),e.metrics=n,$(e.container.value()).css(n),e.width.setValue(n.width),e.height.setValue(n.height)}function O(e){return e.rdState.owner.value()!==e}function D(e){function t(){o.visible.setValue(!o.hiddenInLayout.value()&&De.resizerBridge.visible.value())}var i,n,o;return e=Object.assign({chartWidgetCollection:Oe,isActive:0===je.length,barsMarksContainersFactory:V,undoHistory:me,readOnly:We,initialLoading:ie},e||{}),n=$(document.createElement("div")).addClass("chart-container").appendTo(ge).css({position:"absolute",overflow:"hidden"}),(l||c)&&n.css({"touch-action":"none","-ms-touch-action":"none"}),De.className&&n.addClass(De.className),(o={alive:new g(!0),container:new g(x(n)),width:new g,height:new g,hiddenInLayout:new g(!1),
visible:new g,rdState:new v,requestFullscreen:function(){ze.value()&&(B(o),Fe.setValue(o.chartWidget))},exitFullscreen:function(){Fe.value()===o.chartWidget&&B(null)},detachable:ze,fullscreenable:ze,fullscreen:new g}).rdState.pushOwner(o),je.push(o),o.hiddenInLayout.subscribe(t),De.resizerBridge.visible.subscribe(t),t(),function(e){var t,i=0,n=0;for(t=0;t<Ye.count;t++)je[t]&&O(je[t])||(je[t]===e&&(n=i),i++);E(e,n,i)}(o),Object.assign(e,o.rdState.bridge()),o.chartWidget=i=new r.ChartWidget(e),e.containsData?i.finishInitWithoutConnect():i.connect(),i.withModel(null,function(){var e=i.model().model();Me.forEach(function(t,i){e.addCustomSource(i,t)})}),N(),F(),Se.fire(i),i}function V(e){var t,i,n=[];return m.enabled("charting_library_base")&&(t=new b(e),n.push(t),i=new w(e),n.push(i)),n}function B(e){de!==e&&(de=e,R(Ge))}function R(e){function t(){je.every(function(e){return null!==e.chartWidget.model()})&&(N(),_.emit("layout_changed"))}function i(){t()}function n(e){e.hiddenInLayout.setValue(!0),$(e.container.value()).detach(),e.fullscreen.setValue(!1)}var r,s,a,l,c;e in o||(e="s"),r=o[e].count,_.emit("layout_about_to_be_changed",e),Ge=e,Ye=o[e];for(s=r;s<je.length;s++)O(a=je[s])&&a.rdState.bridge().attach();for(s=0;s<r||s<je.length;s++)a=je[s],(de?de!==a:!(s<r)||a&&O(a))?a&&n(a):(a?(ge.append($(a.container.value())),a.hiddenInLayout.setValue(!1),te&&(l=Q.shift())&&(ee=!0,a.chartWidget.loadContent(l.content,ie),ee=!1)):(c=s,D(Object.assign({},pe,Q.shift()||(Fe.value()?{content:Fe.value().state()}:null)||{},0===c||ne.value()?{}:{defSymbol:null})).modelCreated().subscribe(null,i,!0),a=je[s]),$(a.container.value()).toggleClass("multiple",r>1),a.fullscreen.setValue(de===a));k(),N(),function(){for(var e=Ye.count,t=e,i=0;i<e;i++)je[i]&&O(je[i])&&t--;He.setValue(t),ze.setValue(t>1)}(),t(),He.value()<1&&r>0&&je[r-1].rdState.bridge().attach()}function N(){var e,t=Math.min(Ye.count,je.length)-1;t<0?Fe.deleteValue():((e=Ue)<0&&(e=0),e>t&&(e=t),Fe.setValue(je[e].chartWidget))}function F(){var e,t;for(e=je.length;e--;)t=e===Ue,$(je[e].container.value()).toggleClass("active",t).toggleClass("inactive",!t)}function W(){}function j(e){var t=e.mainSeries().properties();t.style.subscribe(null,U),U(t.style),e.model().onSelectedSourceChanged().subscribe(null,z),z(e.selection().sources())}function U(e){Te.setValue(e.value())}function z(){var e=Ie.model();xe.setValue(e.selection().sources())}function H(e){var t,i,n,o=!1;for(t=0;t<je.length;t++)(n=(i=je[t].chartWidget).model())&&(n.mainSeries().properties().symbol.value()!==e||m.enabled("same_data_requery"))&&(o||(me.beginUndoMacro("Change Symbol"),o=!0),i.setSymbol(e));o&&me.endUndoMacro()}function Y(){var e={snapshotUrl:De.snapshotUrl},t=m.enabled("show_dialog_on_snapshot_ready")?f.getImageOfChart:f.getImageOfChartSilently;t(Oe,e,function(e){_.emit("onScreenshotReady",e)})}function G(e){if(0!==je.length){for(var t=je.length;t--;)je[t].chartWidget.setActive(!1);je[Ue].chartWidget.setActive(e)}}function q(e){
return m.enabled("charting_library_base")?e:"s"===e||pe.containsData||We||isProductFeatureEnabled(ProductFeatures.MULTIPLE_CHARTS)&&getProductFeatureConfig(ProductFeatures.MULTIPLE_CHARTS).limit>=o[e].count?e:"s"}function K(e,t){var i,n;if(te=!0,ie=Boolean(t),Q=[],e){for(e.charts||(e={layout:"s",charts:[e]}),Ge=q(e.layout||"s"),i=0;i<e.charts.length;i++)n=e.charts[i],Q.push({content:n});e.symbolLock&&ne.setValue(!0),e.intervalLock&&oe.setValue(!0),e.trackTimeLock&&re.setValue(!0)}ce.setValue(Ge),R(Ge),h.init(),h.tool.subscribe(J),h.tool.subscribe(Z),te=!1,ie=!1}function Z(){var e=Fe.value();je.forEach(function(t){t.chartWidget!==e&&t.chartWidget.updateCrossHairPositionIfNeeded()}),e&&e.updateCrossHairPositionIfNeeded()}function J(){je.forEach(function(e){e.chartWidget.onToolChanged()})}function X(){0==--Ae&&_.emitOnce("onChartReady")}var Q,ee,te,ie,ne,oe,re,se,ae,le,ce,ue,he,de,pe,_e,fe,me,ye,ge,ve,Se,be,we,Pe,Ce,Te,xe,Ie,Le,Me,Ae,ke,Ee,Oe=this,De=Object.assign({},L,e),Ve=1,Be=2,Re=0,Ne=0,Fe=new g,We=De.readOnly||!1,je=[],Ue=0,ze=new g,He=new g,Ye=null,Ge="s",qe=new g;Q=[],ee=!1,te=!1,ie=!1,ne=new g(!1),oe=new g(!1),re=new g(!1),se=new g(TVSettings.getBool("chart.syncCrosshair",!0)),ae=d.createGroup({desc:"Layout"}),le=se.value(),se.subscribe(function(e){var t,i;for(le=e=!!e,TVSettings.setValue("chart.syncCrosshair",e),t=0;t<je.length;++t)(i=je[t].chartWidget.model())&&i.model().lightUpdate()}),ce=new g(Ge),ue=De.resizerBridge.width,he=De.resizerBridge.height,de=null,"padding"in De&&(Be=De.padding),"topOffset"in De&&(Ve=De.topOffset),"edge"in De&&(Re=De.edge),"border"in De&&(Ne=De.border),pe=De.widgetOptions||{},_e=De.metaInfo||{},fe={id:new g(_e.id||null),name:new g(_e.name),description:new g(_e.description),username:new g(_e.username),uid:new g(_e.uid),lastModified:new g(_e.lastModified)},ye=function(e){_.emit("undo_redo_state_changed",e)},(me=u()).onChange().subscribe(null,ye),ge=$(De.resizerBridge.container.value()).eq(0),ve=$.Deferred(),Se=new t,be=null,we=null,Pe=null,De.seriesControlBarEnabled&&(Ee=Re+Ne+"px",(be=document.createElement("div")).style.left=Ee,be.style.right=Ee,be.style.bottom=Ee,be.classList.add("chart-toolbar","chart-controls-bar"),ge[0].appendChild(be),Promise.all([i.e("react"),i.e(3),i.e(6),i.e(15),i.e(35),i.e(38),i.e(39),i.e(52),i.e(55),i.e(0),i.e(1),i.e(8),i.e(44),i.e("chart-bottom-toolbar")]).then(function(e){var n,o=i("MfqI").BottomToolbarRenderer,r=De.resizerBridge,a=[r.container.spawn(),r.width.spawn(),r.height.spawn()],l=r.container.value(),c=function(){var e=l.getBoundingClientRect(),t=s();return t.top=e.top+t.top,t.left=e.left+t.left,t},u=new t,h=function(){u.fire()};a.forEach(function(e){e.subscribe(h)}),n=function(){a.forEach(function(e){e.destroy()}),u.destroy()},we=new o(be,u,c,Oe,ChartApiInstance,pe,De.seriesControlBar),Pe=function(){null!==we&&(we.destroy(),we=null,be.remove(),be=null),n()}}.bind(null,i)).catch(i.oe)),ue.subscribe(k),he.subscribe(k),this.updateLayout=k,Ce=new t,Te=new g,xe=new g,Ie=null,Fe.subscribe(function(e){var t,i;if(e){
for(i=je.length;i--;)if(je[i].chartWidget===e){t=i;break}if(!isFinite(t))throw new Error("Cannot make detached ChartWidget active");if(Ue!==t){for(de&&(O(je[t])||(de=je[t])),Ue=t,F(),i=je.length;i--;)je[i].chartWidget!==e&&je[i].chartWidget.setActive(!1);Z(),e.setActive(!0)}!function(e){var t,i;Ie!==e&&(Ie&&(Ie.modelCreated().unsubscribe(null,j),(t=Ie.model())&&(t.mainSeries().properties().style.unsubscribe(null,U),t.model().onSelectedSourceChanged().unsubscribe(null,z),Ie=null)),e&&(Ie=e,(i=e.model())?j(i):e.modelCreated().subscribe(null,j)))}(e)}},{callWithLast:!0}),Le=!1,We||ae.add({desc:"Switch active chart",hotkey:9,handler:W}),De.takeScreenshotEnabled&&ae.add({desc:"Screenshot",hotkey:p.Modifiers.Alt+83,handler:Y}),De.saveChartEnabled&&ae.add({desc:"Save Chart Layout",hotkey:p.Modifiers.Mod+83,handler:function(){Ce.fire()}}),Me=new Map,Object.assign(this,{createChartWidget:D,getAll:function(){return je.map(function(e){return e.chartWidget})},destroy:function(){G(!1),null!==Pe&&(Pe(),Pe=null),je.forEach(function(e){void 0!==e.timingsMeter&&e.timingsMeter.destroy(),e.chartWidget.destroy()}),De.resizerBridge.remove(),$(window).off("resize",k),$(document).off("onUpdate",k),h.tool.unsubscribe(Z),h.tool.unsubscribe(J),ve.resolve(),ge.remove(),Me.clear(),ae.destroy()},layout:ce,activeChartWidget:Fe,viewMode:qe,activeChartStyle:Te.readonly(),trySetChartStyleToActiveWidget:function(e){var t=Fe.value();return!!t&&t.trySetChartStyle(e)},selectedSources:xe.readonly(),metaInfo:fe,state:function(e,t,i){var n,o,r=[],s=M();for(n=0;n<s;n++)r.push(A(n,e,t,i));return o={name:Oe.metaInfo.name.value(),layout:Ge,charts:r},ne.value()&&(o.symbolLock=1),oe.value()&&(o.intervalLock=1),re.value()&&(o.trackTimeLock=1),o},asyncState:function(){var e,t,i=[],n=M();for(e=0;e<n;e++)i.push((t=e)<je.length?je[t].chartWidget.asyncState():Promise.resolve({}));return Promise.all(i).then(function(e){var t,i={charts:[]};for(t=0;t<e.length;t++)i.charts.push(e[t]);return i})},readOnly:function(){return We},lock:{symbol:ne,setSymbolLockWithUndo:function(e){var t,i,n,o;if(e!==ne.value()){if(me.beginUndoMacro("Symbol Lock"),e)for(i=(t=Fe.value()).getSymbol(),n=0;n<je.length;n++)(o=je[n].chartWidget)!==t&&o.getSymbol()!==i&&o.setSymbol(i);me.setWatchedValue(ne,e,"Symbol Lock"),me.endUndoMacro()}},interval:oe,setIntervalLockWithUndo:function(e){var t,i,n,o;if(e!==oe.value()){if(me.beginUndoMacro("Interval Lock"),e)for(i=(t=Fe.value()).getResolution(),n=0;n<je.length;n++)(o=je[n].chartWidget)!==t&&o.getResolution()!==i&&o.setResolution(i);me.setWatchedValue(oe,e,"Resolution Lock"),me.endUndoMacro()}},crosshair:se,trackTime:re,setTrackTimeWithUndo:function(e){re.value()!==e&&me.setWatchedValue(re,e,"Track Time")}},setSymbol:function(e){ne.value()?H(e):Fe.value().setSymbol(e)},setResolution:function(e){var t,i,n;if(!ee&&!Le)if(oe.value()){for(t=!1,i=0;i<je.length;i++)(n=je[i].chartWidget).model().mainSeries().properties().interval.value()!==e&&(t||(me.beginUndoMacro("Change Resolution"),t=!0),n.setResolution(e));t&&me.endUndoMacro()
}else Fe.value().setResolution(e)},setTimeFrame:function(e){var t,i,n;if(!ee&&!Le){if(Le=!0,oe.value())for(t=0;t<je.length;t++)n=(i=je[t].chartWidget).model().model().appliedTimeFrame().state(),e.res===n.res&&e.val===n.val||i.loadRange(e);else Fe.value().loadRange(e);Le=!1}},updateLayout:k,setChartLayoutWithUndo:function(e){return e=q(e),ce.value()!==e&&(me.pushUndoCommand(new y(Oe,e)),!0)},images:function(e){var t,i,n;if(e&&e.onlyActiveChart||de)return{layout:"s",hidpiRatio:window.hidpiCanvasRatio||1,theme:T().name,charts:[Fe.value().images()]};for(t=[],i=Ye.count,n=0;n<je.length&&n<i;n++)t.push(je[n].chartWidget.images());return{layout:Ge,hidpiRatio:window.hidpiCanvasRatio||1,theme:T().name,charts:t}},tags:function(){var e,t=[];for(e=0;e<je.length&&e<Ye.count;e++)t=t.concat(je[e].chartWidget.tags());return t=$.unique(t),t=$.map(t,function(e){return e.toLowerCase().replace(/\W+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")})},syncCrosshair:function(e,t,i,n){var o,r,s,a;if(i||le)for(o=Ye.count,r=0;r<je.length&&r<o;r++)(s=je[r].chartWidget)!==t&&je[r].rdState.bridge().visible.value()&&(a=s.model())&&a.model().setExternalPosition(e,n)},syncScroll:function(e,t){var i,n,o,r;if(re.value()){for(i=Ye.count,me.beginUndoMacro("Sync Time"),n=0;n<je.length&&n<i;n++)if(o=je[n].chartWidget.model()){if((r=o.model())===t)continue;r.syncTimeWithModel(t,e)}me.endUndoMacro()}},setSymbolAll:H,clearChartMetaInfo:function(){fe.id.setValue(null),fe.uid.setValue(void 0),fe.name.setValue(void 0)},takeScreenshot:Y,loadContent:K,purgeUnusedWidgets:function(){for(var e=o[Ge].count;e<je.length;e++)je[e].chartWidget.destroy();je.splice(o[Ge].count)},applyOverrides:function(e){for(var t=0;t<je.length;t++)je[t].chartWidget.applyOverrides(e)},applyStudiesOverrides:function(e){for(var t=0;t<je.length;t++)je[t].chartWidget.applyStudiesOverrides(e)},switchChart:W,startFullscreen:function(){De.resizerBridge.requestFullscreen()},exitFullscreen:function(){De.resizerBridge.exitFullscreen()},destroyPromise:function(){return ve.promise()},chartWidgetCreated:function(){return Se},saveKeysPressed:function(){return Ce},getContainer:function(){return ge},onWidget:pe.onWidget,applyTheme:function(e,t,i,n,o,r,s){var a,l;void 0===r&&(r=!0),a=T().name,l=t?[{chartWidget:Fe.value()}]:je,s?(o&&new C(a,n,r).redo(),l.forEach(function(t){t.chartWidget._model.model().restoreTheme(e,i,s)})):(me.beginUndoMacro("Apply Chart Theme"),o&&me.pushUndoCommand(new C(a,n,r)),l.forEach(function(t){t.chartWidget._model.model().restoreTheme(e,i)}),me.endUndoMacro())},setActive:G,inlineChartsCount:He.readonly(),revertToInline:function(){B(null);for(var e=0;e<je.length;e++)je[e].rdState.bridge().attach()},chartMarketStatuses:function(){return je.map(function(e){return e.chartWidget.getMarketStatusTooltip()})},chartSeriesStatuses:function(){return je.map(function(e){var t=e.chartWidget.model(),i=t?t.mainSeries().status():null,n=null===i?"":e.chartWidget.getDataTextStatus(i);return n+" ("+i+")"})},undoHistory:me,showAddCompareDialog:function(){var e=this
;return Promise.all([i.e("dialogs-core"),i.e(19),i.e(33),i.e(51),i.e(64),i.e("create-dialog"),i.e(46),i.e("add-compare-dialog")]).then(i.t.bind(null,"tkV1",7)).then(function(t){var i=t.AddCompareDialog,n=new i(e);return n.show()})},addCustomSource:function(e,t){var i,o;for(n(!Me.has(e),"Cannot create the same custom source multiple times"),Me.set(e,t),i=0;i<je.length;++i)(o=je[i].chartWidget.model())&&o.model().addCustomSource(e,t)},removeCustomSource:function(e){var t,i;for(n(Me.has(e),"Cannot remove not created custom source"),Me.remove(e),t=0;t<je.length;++t)(i=je[t].chartWidget.model())&&i.model().removeCustomSource(e)},setViewMode:function(e){qe.setValue(e)},moveActiveChartWithUndo:function(e){},activeChartCanBeMoved:function(){return!1},generalPropertiesDefinitions:function(){return Fe.value().generalPropertiesDefinitions()},reconnectChartApi:function(e){reconnectChartApiHelper(e)}}),K(De.content,!0),ce.subscribe(function(e){F(),R(e)}),ce.hook=function(e){return e===this.value()?e:q(e)},We&&(ce.writeLock=!0),$(window).on("resize",k),$(document).on("onUpdate",k),m.enabled("datasource_copypaste")&&De.globalEvents&&(ae.add({desc:"Paste sources",hotkey:d.Modifiers.Mod+86,handler:function(){Fe.value().onAppClipboardPaste()}}),ae.add({desc:"Copy sources",hotkey:d.Modifiers.Mod+67,handler:function(){Fe.value().onAppClipboardCopy()}}),ae.add({desc:"Cut sources",hotkey:d.Modifiers.Mod+88,handler:function(){Fe.value().onAppClipboardCut()}}),p.isMacKeyboard||(ae.add({desc:"Paste sources",hotkey:d.Modifiers.Shift+45,handler:function(){Fe.value().onAppClipboardPaste()}}),ae.add({desc:"Copy sources",hotkey:d.Modifiers.Mod+45,handler:function(){Fe.value().onAppClipboardCopy()}}),ae.add({desc:"Cut sources",hotkey:d.Modifiers.Shift+46,handler:function(){Fe.value().onAppClipboardCut()}}))),Ae=0,je.forEach(function(e){if(e){Ae++;var t=e.chartWidget;t.withModel(null,function(){var e,i,n=t.model().mainSeries();n.bars().size()>0||n.status()===I.STATUS_INVALID_SYMBOL||n.status()===I.STATUS_NO_BARS?X():(e=n.dataEvents(),i=function(){X(),e.barReceived().unsubscribe(null,i),e.completed().unsubscribe(null,i),e.error().unsubscribe(null,i)},e.barReceived().subscribe(null,i),e.completed().subscribe(null,i),e.error().subscribe(null,i))})}}),a()&&(ke=h.tool.setValue,h.tool.setValue=function(){Oe.selectedSources.value()&&Oe.activeChartWidget.value().model().lineBeingCreated()&&Oe.activeChartWidget.value().model().cancelCreatingLine(),ke.apply(h.tool,arguments)}),Promise.all(je.map(function(e){return S(e.chartWidget.modelCreated())})).then(function(){return Promise.all(je.map(function(e){return S(e.chartWidget.model().mainSeries().dataEvents().symbolResolved())}))}).then(function(){window.saver&&window.is_authenticated&&De.widgetOptions.justCloned&&window.saver.saveChartSilently()}).catch(P.logError.bind(P))}}).call(this,i("aIyQ"))},"/YGI":function(e,t,i){"use strict";var n,o,r,s,a,l,c;i.r(t),n=i("mrSG"),o=i("0YCj"),r=i.n(o),function(e){e.StudyCannotBeChild="cannot_be_child",e.StubWasRemoved="stub_was_removed",
e.CannotGetMetainfo="cannot_get_metainfo",e.Cancelled="cancelled",e.Unknown="unknown"}(s||(s={})),a=i("uOxu"),i.d(t,"StudyInserter",function(){return c}),l=Object(a.getLogger)("Chart.Studies.StudyInserter"),c=function(){function e(e,t,i){this._parentSource=void 0,this._propsState=void 0,this._preferredPriceScale=void 0,this._paneSize=void 0,this._forceOverlay=!1,this._studyMetaInfoRepository=t,this._inserterImpl=i,this._studyDescriptor=e}return e.prototype.setParentSource=function(e){this._parentSource=e||void 0},e.prototype.setPaneSize=function(e){this._paneSize=e},e.prototype.setPreferredPriceScale=function(e){this._preferredPriceScale=e},e.prototype.setForceOverlay=function(e){this._forceOverlay=e},e.prototype.setPropertiesState=function(e){this._propsState=e},e.prototype.insert=function(e,t){return Object(n.__awaiter)(this,void 0,void 0,function(){var i,o,r,a,c,u,h;return Object(n.__generator)(this,function(d){switch(d.label){case 0:p=this._inserterImpl,i=void 0!==p.createStub&&void 0!==p.removeStub?this._inserterImpl.createStub():null,o=!0,d.label=1;case 1:return d.trys.push([1,3,4,5]),[4,this._studyMetaInfoRepository.findById(this._studyDescriptor)];case 2:return r=d.sent(),[3,5];case 3:return d.sent(),l.logWarn("Cannot get study "+JSON.stringify(this._studyDescriptor)),[2,Promise.reject(s.CannotGetMetainfo)];case 4:return null!==i&&(o=this._inserterImpl.removeStub(i)),[7];case 5:return o?void 0!==t&&t.cancelled?[2,Promise.reject(s.Cancelled)]:this._canApplyStudyToParent(r)?(a=Object(n.__assign)({},r.defaults.inputs),void 0===e?[3,7]:[4,e(a,r.inputs,r)]):[2,Promise.reject(s.StudyCannotBeChild)]:[2,Promise.reject(s.StubWasRemoved)];case 6:return u=d.sent(),[3,8];case 7:u={},d.label=8;case 8:return c=u,void 0!==t&&t.cancelled?[2,Promise.reject(s.Cancelled)]:null===(h=this._insertStudy(r,c))?[2,Promise.reject(s.Unknown)]:[2,h]}var p})})},e.prototype._insertStudy=function(e,t){return this._inserterImpl.createStudy(e,t,null,this._propsState,this._forceOverlay,this._parentSource,this._preferredPriceScale,this._paneSize)},e.prototype._canApplyStudyToParent=function(e){return void 0===this._parentSource||r.a.canBeChild(e)},e}()},"/b+7":function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 13" width="22" height="13"><path fill="#37A6EF" fill-rule="nonzero" d="M19.354 4.932c.379.55.611 1.207.642 1.918A3.007 3.007 0 0 1 22 9.686a3.003 3.003 0 0 1-3 3.006H4a3.983 3.983 0 0 1-2.814-1.16l6.363-5.048a1.657 1.657 0 0 0 1.495.037l3.034 2.66a1.672 1.672 0 0 0 1.589 2.175 1.668 1.668 0 0 0 1.552-2.28l4.135-4.144zm-.942-.945L14.276 8.13a1.66 1.66 0 0 0-1.32.044l-3.034-2.66A1.672 1.672 0 0 0 8.333 3.34a1.668 1.668 0 0 0-1.611 2.097l-6.316 5.01A3.999 3.999 0 0 1 0 8.683a4.004 4.004 0 0 1 4.041-4.008A5.338 5.338 0 0 1 9.333 0a5.337 5.337 0 0 1 5.124 3.857 3.644 3.644 0 0 1 1.876-.517c.772 0 1.488.239 2.079.647z"/></svg>'},"/bs+":function(e,t,i){"use strict";function n(e,t,i,n){if(n.isDays())return i;if(e.moveTo(1e3*i),n.isIntraday()){var o=e.indexOfBar(1e3*i)
;if(o<0)throw new Error(i+" is out of the instrument session ");return e.endOfBar(o)/1e3}return e.startOfBar(r.SessionStage.LASTBAR_SESSION)/1e3}function o(e,t,i,n){var o,r;if(n.isDays())return i;if(o=1e3*i-1,e.moveTo(o),n.isIntraday()){if((r=e.indexOfBar(o))<0)throw new Error(i+" is out of the instrument session ");return e.startOfBar(r)/1e3}return i=e.startOfBar(0)/1e3}i.r(t),i.d(t,"barTimeToEndOfPeriod",function(){return n}),i.d(t,"endOfPeriodToBarTime",function(){return o});var r=i("E6p6")},"/hKg":function(e,t,i){"use strict";var n,o,r,s,a;i.r(t),i.d(t,"PaneRendererCandles",function(){return a}),n=i("Eyy1"),o=i("VdBB"),r=i("Zp/P"),s=i("jFln"),a=function(){function e(e){this._bars=[],this._barSpacing=1,this._barWidth=1,this._borderVisible=!1,this._barBorderWidth=1,this._wickVisible=!1,this._borderColor=void 0,this._wickColor=void 0,this._hittest=void 0,e&&this.setData(e)}return e.prototype.setData=function(e){this._bars=e.bars,this._barSpacing=e.barSpacing,this._barWidth=e.barWidth,this._borderVisible=e.borderVisible,this._wickVisible=e.wickVisible,this._borderColor=e.borderColor,this._wickColor=e.wickColor,this._hittest=e.hittest},e.prototype.draw=function(e){e.save();var t=this._bars;e.lineCap="square",this._barSpacing<1?(this._wickVisible&&function(e,t,i){var n,o;for(e.strokeStyle=i,e.lineWidth=1,e.beginPath(),n=t.length;n-- >0;)o=t[n],e.moveTo(o.time,o.low),e.lineTo(o.time,o.high);e.stroke()}(e,t,Object(n.ensureDefined)(this._wickColor)),function(e,t){var i,n,o,r;for(e.lineWidth=1,i="",n=!1,e.beginPath(),o=t.length;o-- >0;)i!==(r=t[o]).color&&(n&&(e.stroke(),e.beginPath(),n=!1),e.strokeStyle=r.color,i=r.color),e.moveTo(r.time,r.open),e.lineTo(r.time,r.close),n=!0;n&&e.stroke()}(e,t)):(t=t.slice().sort(function(e,t){return e.color>t.color?-1:e.color<t.color?1:0}),e.translate(-.5,-.5),e.lineWidth=this._barBorderWidth,this._wickVisible&&function(e,t,i){var n,o,r,s,a,l,c,u,h,d=i;for(e.fillStyle=i,n=t.length;n--;)(o=t[n]).wickColor&&o.wickColor!==d&&(e.fillStyle=o.wickColor,d=o.wickColor),r=o.time,s=o.open,a=o.high,l=o.low,c=o.close,u=Math.min(s,c),h=Math.max(s,c),e.fillRect(r,a,1,u-a),e.fillRect(r,h+1,1,l-h)}(e,t,Object(n.ensureDefined)(this._wickColor)),function(e,t,i,n){var o,r,a,l,c,u,h,d,p;for(o=t.length;o--;)a=(r=t[o]).time,l=Math.round(a-i),c=Math.round(a+i),u=r.open,h=r.close,d=Math.min(u,h),p=Math.max(u,h),t[o+1]&&r.color===t[o+1].color||(e.strokeStyle=r.color),e.fillStyle=r.color,Math.abs(d-p)<=1&&(e.fillStyle=r.borderColor),r.hollow?Object(s.strokeRectInner)(e,l,d,c-l+1,p-d+1):(n&&(l+=1,d+=1,c-=1,p-=1),e.fillRect(l,d,c-l+1,p-d+1))}(e,t,this._barWidth,this._borderVisible),this._borderVisible&&function(e,t,i,o){var r,a,l,c,u,h,d,p,_;for(r=t.length;r--;)a=t[r],t[r+1]&&a.borderColor===t[r+1].borderColor||(e.strokeStyle=a.borderColor?a.borderColor:Object(n.ensureDefined)(o)),a.hollow||(l=a.time,c=Math.round(l-i),u=Math.round(l+i),h=a.open,d=a.close,p=Math.min(h,d),_=Math.max(h,d),Object(s.strokeRectInner)(e,c,p,u-c+1,_-p+1))}(e,t,this._barWidth,this._borderColor)),e.restore()},e.prototype.hitTest=function(e){
var t,i,n,s,a,l,c,u=this._bars,h=.5*this._barSpacing;if(0===u.length)return null;if(e.x<u[0].time-h)return null;if(e.x>u[u.length-1].time+h)return null;for(t=null,i=0,n=u;i<n.length;i++)if(s=n[i],e.x<=s.time+h){t=s;break}return null===t?null:(a=Object(r.selectionTolerance)(this._barBorderWidth),l=Math.min(t.high,t.low),c=Math.max(t.high,t.low),l-a<=e.y&&e.y<=c+a?this._hittest||new o.HitTestResult(o.HitTestResult.REGULAR):null)},e}()},"/jjs":function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"Magnet",function(){return s}),n=i("Eyy1"),o=i("4o++"),r=i("zL3Q"),s=function(){function e(){}return e.prototype.align=function(e,t,i){var s,a,l,c,u,h,d,p,_,f,m=e;return Object(r.a)().value()?null===(s=i.mainDataSource())?m:s!==(a=s.model().mainSeries())?m:(l=a.priceScale(),c=a.bars(),l.isEmpty()||!c.contains(t)?m:null===(u=c.valueAt(t))?m:(h=[u[1],u[2],u[3],u[4]],d=Object(n.ensure)(a.firstValue()),p=h.map(function(e){return{y:l.priceToCoordinate(e,d),price:e}}),_=l.priceToCoordinate(e,d),p.sort(function(e,t){var i=Math.abs(e.y-_),n=Math.abs(t.y-_);return i-n}),f=p[0],(Object(r.b)().value()===o.MagnetMode.StrongMagnet||Math.abs(f.y-_)<50)&&(m=f.price),m)):m},e}()},"/kal":function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><g fill="none" fill-rule="evenodd" transform="translate(4 5)"><path fill="currentColor" d="M3 1h1v13.5H3z"/><circle stroke="currentColor" cx="3.5" cy="16.5" r="2"/><path fill="currentColor" d="M5.5 16H18v1H5.5z"/><path stroke="currentColor" d="M0 4L3.5.5 7 4m8 9l3.5 3.5L15 20"/></g></svg>'},"/mDy":function(e,t,i){},"/pi9":function(e){e.exports={"color-aqua-spring":"#ebf9f5","color-army-green":"#3d2c12","color-army-green-2":"#31230d","color-athens-gray-1":"#f2f3f5","color-athens-gray-2":"#f7f8fa","color-athens-gray-3":"#eceff2","color-black":"#000000","color-blue-dianne":"#21384d","color-bluish":"#2185cc","color-bright-gray":"#363c4e","color-brownish-grey":"#8d6e63","color-carnation":"#f04561","color-catskill-white":"#e1ecf2","color-charade":"#2f3241","color-charcoal-grey":"#323337","color-curious-blue":"#299dcd","color-dark-blue-grey":"#123440","color-darkness-blue-grey":"#12213b","color-dark-grey":"#292a2d","color-dark-grey-blue":"#28415a","color-dark-sky-blue":"#37a6ef","color-dark-slate-blue":"#194453","color-deep-sea-blue":"#016087","color-duck-egg-blue":"#e1eff9","color-ebony-clay":"#262b3e","color-foam":"#d7f0fb","color-gull-gray":"#9db2bd","color-humming-bird":"#d3eef9","color-keppel-1":"#37bc9b","color-keppel-2":"#34b293","color-lavender-blush":"#ffedf0","color-lightish-purple":"#a75ee8","color-loblolly":"#c5cbce","color-manatee":"#878ca8","color-mandy":"#eb4d5c","color-medium-blue":"#2e7bb2","color-milk-chocolate":"#6f2626","color-mirage-1":"#131722","color-mirage-2":"#171b29","color-mirage-3":"#1c2030","color-mischka":"#d6d8e0","color-morning-glory":"#9addcc","color-oslo-gray":"#8b8e95","color-pale":"#fff2cf","color-pale-grey-1":"#f9fafb","color-pale-grey-2":"#e7ebee","color-pale-sky":"#6b7988","color-picton-blue-1":"#3bb3e4","color-picton-blue-2":"#41bef1",
"color-puerto-rico":"#3bc2a1","color-purple-brown":"#4e2934","color-purple-brown-2":"#3d2028","color-radical-red":"#ff4a68","color-regent-gray":"#8797a5","color-scooter":"#38acdb","color-silver-tree":"#53b987","color-slate-gray":"#758696","color-sundown":"#ffa4b3","color-sunglow":"#ffca3b","color-tan-hide":"#ff9850","color-trout-1":"#4c525e","color-trout-2":"#4f5966","color-violet-1":"#332738","color-violet-2":"#271d2b","color-water-blue":"#1592e6","color-white":"#ffffff","color-white-ice":"#ebf7fc","color-wild-watermelon":"#ff5773","color-bg-primary":"color-white","color-bg-primary-hover":"color-cold-gray-100","color-bg-secondary":"color-cold-gray-50","color-bg-scroll-buttons":"color-cold-gray-100","color-legacy-bg-scroll-buttons":"color-cold-gray-850","color-legacy-bg-widget":"color-white","color-text-primary":"color-cold-gray-900","color-text-secondary":"color-cold-gray-500","color-text-tertiary":"color-cold-gray-400","color-text-disabled":"color-cold-gray-300","color-box-shadow":"color-cold-gray-300","color-divider":"color-cold-gray-150","color-divider-hover":"color-cold-gray-100","color-active-hover-text":"color-black","color-alert-text":"color-black","color-border-table":"color-cold-gray-100","color-brand":"color-tv-blue-500","color-brand-active":"color-tv-blue-600","color-brand-hover":"color-tv-blue-600","color-brand-light":"color-picton-blue-2","color-chart-page-bg":"color-cold-gray-150","color-common-tooltip-bg":"color-ebony-clay","color-common-tooltip-text":"color-athens-gray-1","color-danger":"color-radical-red","color-depthrenderer-stroke-style":"color-athens-gray-1","color-highlight-new":"color-pale","color-input-bg":"color-white","color-input-publish-bg":"color-white","color-link":"color-tv-blue-500","color-link-hover":"color-tv-blue-600","color-link-active":"color-tv-blue-600","color-list-nth-child-bg":"color-athens-gray-2","color-pane-bg":"color-white","color-pane-secondary-bg":"color-cold-gray-100","color-popup-menu-item-hover-bg":"color-cold-gray-100","color-popup-menu-separator":"color-catskill-white","color-replay-data-mode":"color-radical-red","color-screener-header-bg":"color-athens-gray-2","color-screener-description":"color-trout-2","color-legacy-success":"color-keppel-1","color-success":"color-minty-green-500","color-success-hover":"color-minty-green-600","color-success-active":"color-minty-green-700","color-toolbar-button-text":"color-cold-gray-900","color-toolbar-button-text-hover":"color-black","color-toolbar-button-text-active":"color-tv-blue-500","color-toolbar-button-text-active-hover":"color-tv-blue-600","color-toolbar-button-background-hover":"color-cold-gray-100","color-toolbar-button-background-secondary-hover":"color-cold-gray-150","color-toolbar-toggle-button-background-active":"color-tv-blue-500","color-toolbar-toggle-button-background-active-hover":"color-tv-blue-600","color-toolbar-interactive-element-text-normal":"color-cold-gray-900","color-toolbar-interactive-element-text-hover":"color-black","color-toolbar-opened-element-bg":"color-cold-gray-100",
"color-tooltip-bg":"color-ebony-clay","color-tv-dialog-caption":"color-trout-2","color-tv-dropdown-item-hover-bg":"color-athens-gray-1","color-underlined-text":"color-slate-gray","color-widget-pages-bg":"color-white","color-warning":"color-tan-orange-500","color-growing":"color-minty-green-400","color-falling":"color-ripe-red-400","color-collapse-tabs-border":"color-athens-gray-3","color-forex-icon":"color-bright-gray","color-list-item-active-bg":"color-dark-sky-blue","color-list-item-hover-bg":"color-white-ice","color-list-item-text":"color-ebony-clay","color-site-widget-hover":"color-athens-gray-1","color-attention":"color-sunglow","color-price-axis-label-back":"color-cold-gray-150","color-price-axis-label-text":"color-cold-gray-650","color-price-axis-gear":"color-cold-gray-900","color-price-axis-gear-hover":"#000000","color-price-axis-highlight":"color-cold-gray-150","color-marker-flagged":"color-ripe-red-400","color-marker-flagged-hovered":"color-ripe-red-600","color-bid":"color-tv-blue-500","color-ask":"color-ripe-red-400","color-sell":"color-ripe-red-400","color-buy":"color-tv-blue-500","color-neutral":"color-cold-gray-500","color-border":"#dadde0","color-border-chat-fields":"#c9cbcd","color-border-hover":"#c8c8c8","color-button-hover-bg":"#f2f2f2","color-depthrenderer-fill-style":"#555555","color-disabled-border-and-color":"#ececec","color-disabled-input":"#ececec","color-readonly-input":"#b4b4b4","color-empty-container-message":"#8a8a8a","color-icons":"#7d7d7d","color-input-textarea-readonly":"#555555","color-item-active-blue":"#eff9ff","color-item-hover-active-bg":"#f1f3f6","color-item-hover-bg":"#edf1f2","color-item-hover-blue":"#c6e9f8","color-item-selected-blue":"#eafafe","color-item-active-text":"color-white","color-item-active-bg":"color-tv-blue-500","color-list-item":"#888989","color-news-highlight":"#f2f5f8","color-placeholder":"#adaeb0","color-row-hover-active-bg":"#f1f3f6","color-sb-scrollbar-body-bg":"#d8d8d8","color-screener-header-bg-hover":"#f1f3f6","color-section-separator-border":"#b5b7b9","color-separator-table-chat":"#eaecef","color-tag-active-bg":"#cfdce3","color-tag-hover-bg":"#dce6ea","color-text-regular":"#4a4a4a","color-tv-button-checked":"#757575","color-white-theme-tooltip-text":"#333333","color-white-theme-tooltip-border":"#d6d6d6","color-brand-dark":"#2a2c39","color-scroll-bg":"color-cold-gray-400","color-scroll-border":"color-item-hover-active-bg","color-widget-border":"color-cold-gray-100","color-scroll-buttons-arrow":"color-white","color-control-intent-default":"color-cold-gray-200","color-control-intent-success":"color-minty-green-600","color-control-intent-primary":"color-tv-blue-500","color-control-intent-warning":"color-tan-orange-500","color-control-intent-danger":"color-ripe-red-500","color-seeking-alpha-brand":"#ff7200","color-pro":"color-minty-green-400","color-pro-hover":"color-minty-green-500","color-pro-plus":"color-tv-blue-500","color-pro-plus-hover":"color-tv-blue-600","color-pro-premium":"color-tan-orange-500","color-pro-premium-hover":"color-tan-orange-700",
"color-trial":"color-cold-gray-500","color-trial-hover":"color-cold-gray-600","color-mod":"color-ripe-red-400","color-mod-hover":"color-ripe-red-600","color-top":"color-banana-yellow-700","color-top-hover":"color-banana-yellow-800","color-ad":"color-banana-yellow-a700","color-ad-hover":"color-banana-yellow-700","color-broker-silver":"color-sky-blue-a700","color-broker-silver-hover":"color-sky-blue-800","color-broker-gold":"color-tv-blue-a700","color-broker-gold-hover":"color-tv-blue-800","color-broker-platinum":"color-deep-blue-a700","color-broker-platinum-hover":"color-deep-blue-800","color-broker-featured":"color-iguana-green-a700","color-broker-featured-hover":"color-iguana-green-600","color-blue-gray-950":"#0C0E15","color-cold-gray-50":"#F8F9FD","color-cold-gray-100":"#F0F3FA","color-cold-gray-150":"#E0E3EB","color-cold-gray-200":"#D1D4DC","color-cold-gray-250":"#C1C4CD","color-cold-gray-300":"#B2B5BE","color-cold-gray-350":"#A3A6AF","color-cold-gray-400":"#9598A1","color-cold-gray-450":"#868993","color-cold-gray-500":"#787B86","color-cold-gray-550":"#6A6D78","color-cold-gray-600":"#5D606B","color-cold-gray-650":"#50535E","color-cold-gray-700":"#434651","color-cold-gray-750":"#363A45","color-cold-gray-800":"#2A2E39","color-cold-gray-850":"#1E222D","color-cold-gray-900":"#131722","color-cold-gray-950":"#0C0E15","color-ripe-red-50":"#FFEBEE","color-ripe-red-100":"#FFCDD2","color-ripe-red-200":"#ef9a9a","color-ripe-red-300":"#E57373","color-ripe-red-400":"#EF5350","color-ripe-red-500":"#F44336","color-ripe-red-600":"#E53935","color-ripe-red-700":"#D32F2F","color-ripe-red-900":"#B71C1C","color-ripe-red-a200":"#FF5252","color-tan-orange-50":"#FFF3E0","color-tan-orange-100":"#FFE0B2","color-tan-orange-200":"#FFCC80","color-tan-orange-300":"#ffb74d","color-tan-orange-400":"#FFA726","color-tan-orange-500":"#FF9800","color-tan-orange-600":"#FB8C00","color-tan-orange-700":"#F57C00","color-tan-orange-800":"#EF6C00","color-tan-orange-900":"#e65100","color-tan-orange-a200":"#ffab40","color-tan-orange-a400":"#ff9100","color-tan-orange-a700":"#FF6D00","color-iguana-green-100":"#C8E6C9","color-iguana-green-200":"#A5D6A7","color-iguana-green-300":"#81c784","color-iguana-green-400":"#66BB6A","color-iguana-green-500":"#4caf50","color-iguana-green-600":"#43a047","color-iguana-green-700":"#388e3c","color-iguana-green-900":"#1B5E20","color-iguana-green-a700":"#00c853","color-banana-yellow-100":"#FFF9C4","color-banana-yellow-200":"#FFF59D","color-banana-yellow-300":"#FFF176","color-banana-yellow-400":"#ffee58","color-banana-yellow-500":"#ffeb3b","color-banana-yellow-600":"#fdd835","color-banana-yellow-700":"#fbc02d","color-banana-yellow-800":"#f9a825","color-banana-yellow-900":"#F57F17","color-banana-yellow-a400":"#ffea00","color-banana-yellow-a700":"#ffd600","color-tv-blue-50":"#E3F2FD","color-tv-blue-100":"#BBDEFB","color-tv-blue-200":"#90CAF9","color-tv-blue-300":"#64B5F6","color-tv-blue-400":"#42A5F5","color-tv-blue-500":"#2196F3","color-tv-blue-600":"#1E88E5","color-tv-blue-700":"#1976D2","color-tv-blue-800":"#1565C0",
"color-tv-blue-900":"#0d47a1","color-tv-blue-a100":"#82b1ff","color-tv-blue-a200":"#448aff","color-tv-blue-a400":"#2979ff","color-tv-blue-a700":"#2962FF","color-tv-blue-a900":"#132742","color-deep-blue-100":"#D1C4E9","color-deep-blue-200":"#B39DDB","color-deep-blue-300":"#9575cd","color-deep-blue-400":"#7e57c2","color-deep-blue-500":"#673ab7","color-deep-blue-700":"#512da8","color-deep-blue-800":"#4527A0","color-deep-blue-900":"#311B92","color-deep-blue-a100":"#b388ff","color-deep-blue-a700":"#6200EA","color-minty-green-100":"#B2DFDB","color-minty-green-200":"#80cbc4","color-minty-green-300":"#4db6ac","color-minty-green-400":"#26a69a","color-minty-green-500":"#009688","color-minty-green-600":"#00897b","color-minty-green-700":"#00796b","color-minty-green-900":"#004D40","color-minty-green-a400":"#1de9b6","color-minty-green-a700":"#00BFA5","color-grapes-purple-100":"#E1BEE7","color-grapes-purple-200":"#CE93D8","color-grapes-purple-300":"#ba68c8","color-grapes-purple-400":"#ab47bc","color-grapes-purple-500":"#9c27b0","color-grapes-purple-600":"#8e24aa","color-grapes-purple-700":"#7b1fa2","color-grapes-purple-800":"#6A1B9A","color-grapes-purple-900":"#4A148C","color-grapes-purple-a700":"#aa00ff","color-berry-pink-100":"#F8BBD0","color-berry-pink-200":"#f48fb1","color-berry-pink-300":"#f06292","color-berry-pink-400":"#ec407a","color-berry-pink-500":"#e91e63","color-berry-pink-700":"#C2185B","color-berry-pink-900":"#880E4F","color-berry-pink-a200":"#ff4081","color-sky-blue-100":"#B2EBF2","color-sky-blue-200":"#80DEEA","color-sky-blue-300":"#4dd0e1","color-sky-blue-400":"#26c6da","color-sky-blue-500":"#00bcd4","color-sky-blue-600":"#00acc1","color-sky-blue-700":"#0097A7","color-sky-blue-800":"#00838F","color-sky-blue-900":"#006064","color-sky-blue-a400":"#00e5ff","color-sky-blue-a700":"#00B8D4","color-facebook":"#1877F2","color-twitter":"#1DA1F2"}},"/z0S":function(e,t,i){"use strict";function n(e,t){o.enabled("saveload_requires_authentication")?window.runOrSignIn(e,t):e()}var o;i.d(t,"a",function(){return n}),o=i("Kxc7")},"08i5":function(e,t,i){"use strict";var n,o;i.r(t),i.d(t,"AlertStatus",function(){return n}),i.d(t,"Direction",function(){return o}),function(e){e[e.Waiting=0]="Waiting",e[e.Success=1]="Success",e[e.Failure=2]="Failure"}(n||(n={})),function(e){e[e.Up=1]="Up",e[e.Down=2]="Down"}(o||(o={}))},"0F0w":function(e,t,i){"use strict";var n,o,r,s,a,l,c,u,h,d,p,_;i.r(t),n=i("mrSG"),o=i("aIyQ"),r=i.n(o),s=i("Eyy1"),a=i("hY0g"),l=i.n(a),c=i("0waE"),u=i("uOxu"),h=Object(u.getLogger)("ChartApi.AbstractSession"),d="",p=function(){function e(e,t,i){this._isConnected=new l.a(!1),this._state=0,this._isConnectForbidden=!1,this._sessionId=d,this._sessionIdChanged=new r.a,this._chartApi=e,this._sessionPrefix=t,this._shouldReconnectAfterCriticalError=i}return e.prototype.destroy=function(){this._logNormal("Destroying session"),this._isConnected.unsubscribe(),this.disconnect(),this._sessionIdChanged.destroy(),delete this._chartApi,this._logNormal("Session has been destroyed")},e.prototype.isConnected=function(){
return this._isConnected},e.prototype.sessionId=function(){return this._sessionId},e.prototype.onSessionIdChanged=function(){return this._sessionIdChanged},e.prototype.connect=function(){0===this._state&&(Object(s.assert)(!this._isConnectForbidden,"Cannot call connect because it is forbidden at this moment"),this._setSessionId(this._sessionPrefix+"_"+Object(c.randomHash)()),this._logNormal("Connecting session - wait until transport stay connected"),this._state=1,this._chartApi.createSession(this._sessionId,this))},e.prototype.disconnect=function(){var e=this;0!==this._state&&(Object(s.assert)(this._sessionId!==d,"sessionId must not be invalid"),this._logNormal("Disconnecting session..."),this._forbidConnectWhile(function(){e._chartApi.connected()&&e._sendRemoveSession(),e._processDestroyingOnServer()}))},e.prototype.onMessage=function(e){var t,i;switch(e.method){case"connected":return void this._onChartApiConnected();case"disconnected":return void this._onChartApiDisconnected();case"critical_error":return t=String(e.params[0]),i=String(e.params[1]),void this._onCriticalError(t,i)}this._onMessage(e)},e.prototype._getChartApi=function(){return this._chartApi},e.prototype._generateLogMessage=function(e){return"["+this._sessionId+"] "+e},e.prototype._onCriticalError=function(e,t){var i=this;this._logError("Critical error. Reason="+e+", info="+t+"."),this._forbidConnectWhile(function(){i._processDestroyingOnServer()}),this._shouldReconnectAfterCriticalError?(this._logNormal("Reconnecting after critical error..."),this.connect()):this._logNormal("Reconnecting after critical error skipped")},e.prototype._onChartApiConnected=function(){Object(s.assert)(1===this._state,"Session is not registered"),this._logNormal("Transport is connected. Creating session on the server"),this._sendCreateSession(),this._state=2,this._isConnected.setValue(!0)},e.prototype._onChartApiDisconnected=function(){var e=this;this._logNormal("Transport is disconnected. Reconnecting..."),this._forbidConnectWhile(function(){e._processDestroyingOnServer()}),this.connect()},e.prototype._setSessionId=function(e){var t=this._sessionId;this._logNormal("Changing sessionId: old="+t+", new="+e),this._sessionId=e,this._sessionIdChanged.fire(e,t)},e.prototype._logNormal=function(e){h.logNormal(this._generateLogMessage(e))},e.prototype._logError=function(e){h.logError(this._generateLogMessage(e))},e.prototype._processDestroyingOnServer=function(){this._state=0,this._isConnected.setValue(!1),this._chartApi.removeSession(this._sessionId),this._setSessionId(d)},e.prototype._forbidConnectWhile=function(e){this._isConnectForbidden=!0,e(),this._isConnectForbidden=!1},e}(),i.d(t,"ChartSession",function(){return _}),Object(u.getLogger)("ChartSession"),_=function(e){function t(t,i){void 0===i&&(i=!1);var n=e.call(this,t,"cs",!1)||this;return n._sessionDisabled=!1,n._handler=null,n._criticalError=new r.a,n._disableStatistics=i,n}return Object(n.__extends)(t,e),t.prototype.destroy=function(){this._criticalError.destroy(),this._handler=null,e.prototype.destroy.call(this)},
t.prototype.serverTimeOffset=function(){return this._getChartApi().serverTimeOffset()},t.prototype.switchTimezone=function(e){return this._getChartApi().switchTimezone(this.sessionId(),e)},t.prototype.resolveSymbol=function(e,t,i){return this._getChartApi().resolveSymbol(this.sessionId(),e,t,i)},t.prototype.requestFirstBarTime=function(e,t,i){return this._getChartApi().requestFirstBarTime(this.sessionId(),e,t,i)},t.prototype.createSeries=function(e,t,i,n,o,r){return this._getChartApi().createSeries(this.sessionId(),e,t,i,n,o,r)},t.prototype.modifySeries=function(e,t,i,n,o){return this._getChartApi().modifySeries(this.sessionId(),e,t,i,n,o)},t.prototype.removeSeries=function(e,t){return!!this.isConnected().value()&&this._getChartApi().removeSeries(this.sessionId(),e,t)},t.prototype.requestMoreData=function(e,t,i){return this._getChartApi().requestMoreData(this.sessionId(),e,t,i)},t.prototype.requestMoreTickmarks=function(e,t,i){return this._getChartApi().requestMoreTickmarks(this.sessionId(),e,t,i)},t.prototype.requestMetadata=function(e,t){var i=this,n=function(){return i._getChartApi().requestMetadata(i.sessionId(),e,t)};n()},t.prototype.isCanCreateStudy=function(e){return this._getChartApi().isCanCreateStudy(e)},t.prototype.createStudy=function(e,t,i,n,o,r,s){return this._getChartApi().createStudy(this.sessionId(),e,t,i,n,o,r,s)},t.prototype.rebindStudy=function(e,t,i,n,o,r,s){return this._getChartApi().rebindStudy(this.sessionId(),e,t,i,n,o,r,s)},t.prototype.modifyStudy=function(e,t,i,n){return this._getChartApi().modifyStudy(this.sessionId(),e,t,i,n)},t.prototype.removeStudy=function(e,t,i){return this._getChartApi().removeStudy(this.sessionId(),e,t,i)},t.prototype.createPointset=function(e,t,i,n,o,r){return this._getChartApi().createPointset(this.sessionId(),e,t,i,n,o,r)},t.prototype.modifyPointset=function(e,t,i,n){return this._getChartApi().modifyPointset(this.sessionId(),e,t,i,n)},t.prototype.removePointset=function(e){return this._getChartApi().removePointset(this.sessionId(),e)},t.prototype.setVisibleTimeRange=function(e,t,i,n,o){this._getChartApi().setVisibleTimeRange(e,this.sessionId(),t,i,n,o)},t.prototype.criticalError=function(){return this._criticalError},t.prototype.connect=function(t){void 0===t&&(t=null),null!==t&&(this._handler=t),e.prototype.connect.call(this)},t.prototype.setHandler=function(e){this._handler=e},t.prototype.connected=function(){return this.isConnected().value()&&!this._sessionDisabled},t.prototype.disable=function(){this._sessionDisabled=!0},t.prototype.chartApi=function(){return this._getChartApi()},t.prototype._sendCreateSession=function(){var e=this;Object.keys(this).forEach(function(t){/^(s|st|symbol_)\d+$/.test(t)&&delete e[t]}),this._getChartApi().chartCreateSession(this.sessionId(),this._disableStatistics)},t.prototype._sendRemoveSession=function(){this._getChartApi().chartDeleteSession(this.sessionId())},t.prototype._onMessage=function(e){this._handler&&this._handler(e)},t.prototype._onCriticalError=function(t,i){this._criticalError.fire(t,i),
e.prototype._onCriticalError.call(this,t,i)},t}(p)},"0Pxc":function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolArc";var o=t||n.createProperties();h.call(this,e,o),this.version=n.version,i.e("lt-pane-views").then(function(e){var t=i("dKqZ").ArcPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("aO4+").Point,r=i("GEp6").distanceToLine,s=i("hfHJ"),a=s.rotationMatrix,l=s.scalingMatrix,c=s.translationMatrix,u=s.transformPoint,h=i("Ss5c").LineDataSource,d=i("Ocx9").DefaultProperty,p=i("hayr").propertyPages,_=window.t("Arc");inherit(n,h),n.prototype.startChanging=function(e,t){var i,n,s,a,l,c;h.prototype.startChanging.call(this,e,t),0!==e&&1!==e||(i=this.pointToScreenPoint(this._points[0])[0],n=this.pointToScreenPoint(this._points[1])[0],s=this.pointToScreenPoint(this._points[2])[0],this._dist=r(i,n,s).distance,a=n.subtract(i),l=new o(-a.y,a.x),c=i.add(n).scaled(.5),s.subtract(c).dotProduct(l)<0&&(this._dist=-this._dist))},n.prototype.pointsCount=function(){return 3},n.prototype.title=function(){return _},n.prototype.name=function(){return"Arc"},n.prototype.hasEditableCoordinates=function(){return!1},n.prototype.setPoint=function(e,t){var i,n,s,h,d,p,_,f,m,y,g,v,S=Object.assign({},t),b=this.pointToScreenPoint(this._points[0])[0],w=this.pointToScreenPoint(this._points[1])[0],P=this.pointToScreenPoint(this._points[2])[0];switch(e){case 0:b=this.pointToScreenPoint(S)[0],i=w.subtract(b),n=b.add(w).scaled(.5),s=(s=new o(-i.y,i.x)).normalized(),P=n.add(s.scaled(this._dist)),P=this.screenPointToPoint(P),this._points[0]=S,this._points[2]=P;break;case 1:h=r(b,w,P).distance,i=(w=this.pointToScreenPoint(S)[0]).subtract(b),n=b.add(w).scaled(.5),s=(s=new o(-i.y,i.x)).normalized(),P=n.add(s.scaled(this._dist)),P=this.screenPointToPoint(P),this._points[1]=S,this._points[2]=P;break;case 2:S=this.pointToScreenPoint(S)[0],h=r(b,w,S).distance,i=w.subtract(b),n=b.add(w).scaled(.5),s=(s=new o(-i.y,i.x)).normalized(),P=n.add(s.scaled(h)),d=n.add(s.scaled(-h)),p=i.length(),_=i.x/p,f=i.y/p,m=Math.acos(_),f<0&&(m=-m),y=c(-n.x,-n.y),S=u(y,S),g=u(y,P),y=a(-m),S=u(y,S),g=u(y,g),y=l(1,p/(2*h)),S=u(y,S),g=u(y,g),v=S.y*g.y>=0?new o(P.x,P.y):new o(d.x,d.y),v=this.screenPointToPoint(v),this._points[2]=v}this.normalizePoints()},n.version=2,n.prototype.migrateVersion=function(e,t,i){var n,o;1===e&&2===this._points.length&&(n=(2*this._points[0].price+3*this._points[1].price)/5,this._points.append({price:n,index:this._points[1].index})),1===e&&2===this._timePoint.length&&(o={price:n=(2*this._timePoint[0].price+3*this._timePoint[1].price)/5,offset:this._timePoint[1].offset,time_t:this._timePoint[1].time_t},this._timePoint.append(o))},n.prototype.getInputsPropertyPage=function(){return null},n.prototype.getStylesPropertyPage=function(){return p.LineToolArcStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("Zd1D").GeneralFiguresDefinitionsViewModel
}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new d("linetoolarc",e);return n._configureProperties(t),t},n._configureProperties=function(e){h._configureProperties(e)},t.LineToolArc=n},"0YCj":function(e,t,i){"use strict";(function(e,t){function n(e){TradingView.merge(this,{palettes:{},inputs:[],plots:[],graphics:{},defaults:{}}),TradingView.merge(this,e);var t=e.fullId||e.id;TradingView.merge(this,n.parseIdString(t)),this.name=this.id}i("Eyy1").assert;var o=i("uOxu").getLogger("Chart.Study.MetaInfo"),r=i("9iCb").applyOverridesToStudyDefaults,s=null;n.VERSION_STUDY_ARG_SOURCE=41,n.METAINFO_FORMAT_VERSION_SOS_V2=42,n.VERSION_PINE_PROTECT_TV_4164=43,n.CURRENT_METAINFO_FORMAT_VERSION=50,n.VERSION_NEW_STUDY_PRECISION_FORMAT=46,n.CHILD_STUDY_ALLOWED_PLOT_TYPES=["line"],n.canPlotBeSourceOfChildStudy=function(e){return n.CHILD_STUDY_ALLOWED_PLOT_TYPES.includes(e)},n.CHILD_STUDY_EXCLUDE_IDS=["CorrelationCoefficient@tv-basicstudies","Correlation - Log@tv-basicstudies-1"],n.CHILD_STUDY_PARENT_EXCLUDE_IDS=[],n.FilledArea={},n.FilledArea.TYPE_PLOTS="plot_plot",n.FilledArea.TYPE_HLINES="hline_hline",n.versionOf=function(e){var t="_metainfoVersion"in e&&isNumber(e._metainfoVersion)?e._metainfoVersion:0;return t<0&&o.logError("Metainfo format version cannot be negative: "+t),t},n.parseIdString=function(e){var t,i,n,o,r={};if(-1===e.indexOf("@"))r.shortId=e,r.packageId="tv-basicstudies",r.id=e+"@"+r.packageId,r.version=1;else if(t=e.split("@"),r.shortId=t[0],3===(i=t[1].split("-")).length)r.packageId=i.slice(0,2).join("-"),r.id=r.shortId+"@"+r.packageId,r.version=i[2];else if(1===i.length&&"decisionbar"===i[0])r.packageId="les-"+i[0],r.id=r.shortId+"@"+r.packageId,r.version=1;else{if(1!==i.length)throw new Error("unexpected study id:"+e);r.packageId="tv-"+i[0],r.id=r.shortId+"@"+r.packageId,r.version=1}return r.fullId=r.id+"-"+r.version,"tv-scripting"===r.packageId&&(0===(n=r.shortId).indexOf("Script$")||0===n.indexOf("StrategyScript$"))?(o=n.indexOf("_"),r.productId=o>=0?n.substring(0,o):r.packageId):r.productId=r.packageId,r},n.getPackageName=function(e){return(/^[^@]+@([^-]+-[^-]+)/.exec(e||"")||[0,"tv-basicstudies"])[1]},n.cutDollarHash=function(e){var t=e.indexOf("$"),i=e.indexOf("@");return-1===t?e:e.substr(0,t)+(i>=0?e.substr(i):"")},n.hasUserIdSuffix=function(e){return/^USER;[\d\w]+;\d+$/.test(e)},n.isStandardPine=function(e){return/^(Strategy)?Script\$STD;.*@tv-scripting$/.test(e)},n.getSourceIdByInputs=function(e,t){var i,o,r;if(!Array.isArray(e)||!t)return null;for(i=0;i<e.length;++i)if(o=e[i],n.isSourceInput(o)&&"string"==typeof t[o.id])return~(r=t[o.id]).indexOf("$")&&(r=r.split("$")[0]),r;return null},n.getSourceInputIds=function(e){var t,i,o=[],r=e.inputs;for(t=0;t<r.length;++t)i=r[t],n.isSourceInput(i)&&o.push(i.id);return o},n.setChildStudyMetaInfoPropertiesSourceId=function(t,i,o){var r,s,a,l;for(r=0;r<t.inputs.length;++r)s=t.inputs[r],n.isSourceInput(s)&&o instanceof e&&o.inputs&&o.inputs[s.id]&&(a=o.inputs[s.id].value()).indexOf("$")>0&&(l=a.replace(/^[^\$]+/,i),o.inputs[s.id].setValue(l))},
n.patchChildStudyMetaInfoState=function(e){e.state&&function e(t){if("object"==typeof t)for(var i in t)"string"==typeof t[i]&&/^[^\$]+\$\d+$/.test(t[i])?t[i]=t[i].replace(/^[^\$]+/,"{pid}"):e(t[i])}(e.state.inputs),e.state.isChildStudy=!0},n.prototype.parseValue=function(e,t){return"bool"===e?TradingView.parseBool(t):t},n.prototype.defaultInputs=function(){var e,t=[];for(e=0;e<this.inputs.length;e++)t.push(this.inputs[e].defval);return t},n.prototype.state=function(e){var t,i={};for(t in this)this.hasOwnProperty(t)&&(i[t]=this[t],!0!==e&&"id"===t&&(i[t]+="-"+this.version));return i},n.prototype.symbolInputId=function(){var e=this.inputs.filter(function(e){return"symbol"===e.type});return e.length>0?e[0].id:null},n.prototype.createDefaults=function(){var e,t;this.defaults&&((e=TradingView.clone(this.defaults)).precision="default",t=n.getStudyPropertyRootName(this),defaults.create(t,e))},n.prototype.removeDefaults=function(){defaults.remove(n.getStudyPropertyRootName(this))},n.findStudyMetaInfoByDescription=function(e,t){if(e){for(var i=0;i<e.length;++i)if(e[i].description.toLowerCase()===t.toLowerCase())return e[i];throw new Error("unexpected study id:"+t)}throw new Error("There is no studies metainfo")},n.isParentSourceId=function(e){return"string"==typeof e&&/^[^\$]+\$\d+$/.test(e)},n.isSourceInput=function(e){return e.id&&(("source"===e.id||"src"===e.id)&&("text"===e.type||"source"===e.type)||"source"===e.type)},n.getChildSourceInputTitles=function(e,t,i){var o,r,s,a,l={};if(t.plots&&t.plots.length&&e.options&&e.options.length)for(o=0;o<e.options.length;++o)s=(r=e.options[o])&&+r.split("$")[1],(a=isFinite(s)&&t.plots[s])&&~n.CHILD_STUDY_ALLOWED_PLOT_TYPES.indexOf(a.type)&&(l[r]=t.styles&&t.styles[a.id]&&t.styles[a.id].title||a.id,i&&(l[r]=i+":"+l[r]));return l},n.getStudyPropertyRootName=function(e){var t="study_"+e.id;return e.pine&&e.pine.version&&(t+="_"+e.pine.version.replace(".","_")),t},n.getStudyPropertyRootNameById=function(e){return"study_"+e},n.overrideDefaults=function(e){null!==s&&0!==e.length&&r(s,e,function(e){return TradingView.defaultProperties[n.getStudyPropertyRootName(e)]||null})},n.setDefaultsOverrides=function(e){s=e},n.isScriptStrategy=function(e){if(e.extra&&e.extra.kind)return e.extra.kind===TVScript.Kinds.STRATEGY;if(!0===e.isTVScriptStrategy)return!0;var t=e.TVScriptSourceCode||e.scriptSource;return!!t&&TVScript.isStrategy(t)},n.getOrderedInputIds=function(e){var t,i,n=[],o=e.inputs;for(t=0;t<o.length;++t)i=o[t],n.push(i.id);return n},n.canBeChild=function(e){var t,i,o;if(e&&"string"==typeof e)return!0;if(!e||e.extra&&!n.isAllowedSourceInputsCount(e.extra.sourceInputsCount)||!0===e.canNotBeChild||!1===e.canBeChild||~n.CHILD_STUDY_EXCLUDE_IDS.indexOf(e.id)||e.isTVScriptStrategy||e.TVScriptSourceCode&&TVScript.isStrategy(e.TVScriptSourceCode))return!1;for(t=e.inputs,i=0,o=0;o<t.length;++o)n.isSourceInput(t[o])&&++i;return n.isAllowedSourceInputsCount(i)},n.isAllowedSourceInputsCount=function(e){return 1===e},n.canHaveChildren=function(e){if(e){
if(e.isTVScriptStrategy||e.TVScriptSourceCode&&TVScript.isStrategy(e.TVScriptSourceCode))return!1;if(e.id&&!~n.CHILD_STUDY_PARENT_EXCLUDE_IDS.indexOf(e.id)&&Array.isArray(e.plots))for(var t=0;t<e.plots.length;++t)if(~n.CHILD_STUDY_ALLOWED_PLOT_TYPES.indexOf(e.plots[t].type))return!0}return!1},TradingView.StudyMetaInfo=n,t&&t.exports&&(t.exports=n)}).call(this,i("tc+8"),i("YuTi")(e))},"0gbU":function(e,t,i){"use strict";function n(e,t,i,n){o.call(this,e,t,i,n);var r=this;this._properties.minTick.listeners().subscribe(null,function(){r._recreatePriceFormattingDependencies()}),this.properties().minTick.listeners().subscribe(null,function(){r._model.fullUpdate()}),this._properties.merge({skipHistogramBaseOnAutoScale:!0})}var o=i("GVHu").Study,r=i("2Fqk").CompareLegendView,s=i("TrvT").CompareDataWindowView,a=i("hayr").propertyPages,l=i("Kxc7"),c=i("8aff").CompareStudyPriceAxisView,u=i("8xSi").CompareStatusView,h=i("n5al").createSeriesFormatter,d=i("n5al").seriesCurrency,p=!l.enabled("hide_study_compare_legend_item"),_=l.enabled("study_overlay_compare_legend_option"),f=l.enabled("force_exchange_as_title"),m=l.enabled("uppercase_instrument_names");inherit(n,o),n.prototype.createPriceAxisView=function(e){return new c(this,{plotIndex:"compare"})},n.prototype._showLastValueOnPriceScale=function(){return this._model.properties().scalesProperties.showSeriesLastValue.value()},n.prototype.createViews=function(){this._legendView||(this._legendView=new r(this,this._model)),this._dataWindowView||(this._dataWindowView=new s(this,this._model)),this._statusView||(this._statusView=new u(this,this._model.properties().scalesProperties.textColor)),o.prototype.createViews.call(this)},n.prototype._tryCreateFormatter=function(){var e=this.properties().inputs.symbol.value(),t=this._resolvedSymbols?this._resolvedSymbols[e]:null;return h(t,this.properties().minTick.value())},n.prototype._onSymbolResolved=function(e){o.prototype._onSymbolResolved.call(this,e),this._recreatePriceFormattingDependencies()},n.prototype.symbol=function(){var e,t=this.properties().inputs.symbol.value(),i=this._resolvedSymbols?this._resolvedSymbols[t]:null,n=i&&i.exchange&&0!==i.exchange.length;return e=f&&n?i.exchange:i?i.name:t,m?e.toUpperCase():e},n.prototype.currency=function(){return d(this.symbolInfo())},n.prototype.title=function(e,t,i,n){var o=this._titleInParts(e,t,i,n),r=o.join(", ");return m?r.toUpperCase():r},n.prototype.titleInParts=function(e,t,i,n){var o=this._titleInParts(e,t,i,n),r=o.join(", ");return[m?r.toUpperCase():r]},n.prototype._titleInParts=function(e,t,i,n){var o,r=this.properties().inputs.symbol.value(),s=this._resolvedSymbols?this._resolvedSymbols[r]:null,a=s&&s.exchange&&0!==s.exchange.length,l=[];return f&&a?l.push(s.exchange):s?(_?(o=this._model.mainSeries().properties().statusViewStyle.symbolTextSource.value(),l.push("description"===o?s.description:s.name)):l.push(s.name),a&&!n&&l.push([s.exchange])):l.push(r),l},n.prototype.symbolInfo=function(){if(!this._resolvedSymbols)return null;var e=this._properties.inputs.symbol.value()
;return e?this._resolvedSymbols[e]:null},n.prototype.lastPriceLabelFixedCoordinate=function(){return this._priceAxisViews[0]._fixedCoordinate},n.prototype.tags=function(){var e=this.symbol();return e?[e]:[]},n.prototype.statusView=function(){return p?o.prototype.statusView.call(this):null},n.prototype.getInputsPropertyPage=function(){return a.StudyCompareInputsPropertyPage},n.prototype.guiPlotName=function(e){return this.properties().inputs.symbol.value()},n.prototype.canOverrideMinTick=function(){return!0},t.study_Compare=n},"0waE":function(e,t,i){"use strict";function n(){return s.replace(/[xy]/g,function(e){var t=16*Math.random()|0,i="x"===e?t:3&t|8;return i.toString(16)})}function o(){return r(12)}function r(e){var t,i,n="";for(t=0;t<e;++t)i=Math.round(Math.random()*(a.length-1)),n+=a[i];return n}var s,a;i.r(t),i.d(t,"guid",function(){return n}),i.d(t,"randomHash",function(){return o}),i.d(t,"randomHashN",function(){return r}),s="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",a="0123456789abcdefghijklmopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"},"0wn8":function(e,t,i){},"0xda":function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolDisjointAngle";var r=t||n.createProperties();o.call(this,e,r),this.version=n.version,i.e("lt-pane-views").then(function(e){var t=i("iTb9").DisjointAnglePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=window.t("Disjoint Angle");inherit(n,o),n.version=1,n.prototype.pointsCount=function(){return 3},n.prototype.title=function(){return a},n.prototype.name=function(){return"Disjoint Angle"},n.prototype.hasEditableCoordinates=function(){return!1},n.prototype.addPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),o.prototype.addPoint.call(this,e)},n.prototype.setLastPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),o.prototype.setLastPoint.call(this,e)},n.prototype.setPoint=function(e,t,i){var n,r,s=.5*(this._points[1].price+this._points[2].price);i&&i.shift()&&1===e&&(n=0,this._snapPoint45Degree(t,this.points()[n])),e<3&&o.prototype.setPoint.call(this,e,t),0!==e&&2!==e&&(1===e?(r=this._points[1].price-s,this._points[2].price=this._points[1].price-2*r):3===e&&(r=t.price-this._points[2].price,this._points[0].price=this._points[1].price-r,this._points[0].index=t.index))},n.prototype.canHasAlert=function(){return!0},n.prototype._getAlertPlots=function(){var e,t,i,n,o,r,s,a,l,c=this._points[0],u=this._points[1],h=[];return c.index<=u.index?(h.push(c),h.push(u)):(h.push(u),h.push(c)),(e=this._points[2]).time=u.time,e.index=u.index,t={price:e.price+(u.price-c.price),time:c.time,index:c.index},i=[],e.index<=t.index?(i.push(e),i.push(t)):(i.push(t),i.push(e)),h[0].price>i[0].price?(n=h,o=i):i[0].price>h[0].price?(n=i,o=h):i[1].price>h[1].price?(n=i,o=h):(n=h,o=i),a=this.properties().extendLeft.value(),
l=this.properties().extendRight.value(),c.index<=u.index?(r=a,s=l):(r=l,s=a),[this._linePointsToAlertPlot(n,"Upper",r,s),this._linePointsToAlertPlot(o,"Lower",r,s)]},n.prototype.getInputsPropertyPage=function(){return null},n.prototype.getStylesPropertyPage=function(){return s.LineToolDisjointAngleStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("vm8R").GeneralTrendFiguresDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new r("linetooldisjointangle",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolDisjointAngle=n},"1AAW":function(e,t,i){"use strict";function n(e){var t,i,n,o,s,a,l,c,u=[];for(t=1;t<arguments.length;t++)u[t-1]=arguments[t];for(i=function(){var t,i=[];for(t=0;t<arguments.length;t++)i[t]=arguments[t];return e.apply(void 0,i.map(function(e){return e.value()}))},n=new r.a(i.apply(void 0,u)),o=function(){return n.setValue(i.apply(void 0,u))},a=0,l=s=u.map(function(e){return e.spawn()});a<l.length;a++)l[a].subscribe(o);return c=function(){return s.forEach(function(e){return e.destroy()})},n.readonly().spawn(c)}var o,r;i.d(t,"a",function(){return n}),o=i("hY0g"),r=i.n(o)},"1IXQ":function(e,t,i){"use strict";function n(e,t,i,o,r,s,a){this._options=Object.assign({},R,r),this._pane=e,this._priceScale=null,this._isLeft=n.isLeft(o),this._properties=t,this._rendererOptionsProvider=i,this._axisInfo=s,this._backgroundBasedTheme=a,this._size=null,this._offset=0,this._cell=document.createElement("div"),this._cell.className="price-axis",this._cell.style.width="25px",this._cell.style.left="0",this.canvas=b(this._cell,new w(16,16)),this.canvas.style.position="absolute",this.canvas.style.zIndex="1",this.canvas.style.left="0",this.canvas.style.top="0",this.ctx=this.canvas.getContext("2d"),this.top_canvas=b(this._cell,new w(16,16)),this.top_canvas.style.position="absolute",this.top_canvas.style.zIndex="2",this.top_canvas.style.left="0",this.top_canvas.style.top="0",this.top_ctx=this.top_canvas.getContext("2d"),this._currencyText="",this._currencyFontSize=0,this._currencyLabelWidth=null,this._options.currencyLabelEnabled?(this._currencyLabelWrapper=document.createElement("div"),this._currencyLabelWrapper.className=B["price-axis-currency-label-wrapper"],this._cell.appendChild(this._currencyLabelWrapper),this._currencyLabel=document.createElement("span"),this._currencyLabel.className=B["price-axis-currency-label"],this._currencyLabelWrapper.appendChild(this._currencyLabel)):(this._currencyLabelWrapper=null,this._currencyLabel=null),this.restoreDefaultCursor(),this.update(),this._updateTimeout=null,this._mouseEventHandler=new P(this.top_canvas,this,{treatVertTouchDragAsPageScroll:!1,treatHorzTouchDragAsPageScroll:!0}),this.contextMenu=null,this.actions=null,this._isVisible=!0,this._widthCache=new c(50),this._tickmarksCache=new _(12,D,"","#000"),this._color=null,this._fontSize=null,
this._prevOptimalWidth=0,this._highlighted=!1,this._properties.fontSize.subscribe(this,this._onFontSizeChanged)}function o(e){var t=new L(e);return function(e,i){return isNumber(i)&&!e.isLog()?t.format(i):""}}var r,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P,C,T,x,I,L,M,A,k,E,O,D,V,B,R,N,F;i("jJ9X"),r=i("aO4+"),s=r.Point,a=i("/3z9"),l=i("qFKp").CheckMobile,c=i("u+0B").TextWidthCache,u=i("7KDR"),h=u.Action,d=u.Separator,p=i("5VQP").ContextMenuManager,_=i("I5CP"),f=i("i1o5").InvalidationLevel,m=i("ikwP"),y=m.resizeCanvas,g=m.hardResizeCanvas,v=m.clearRect,S=m.fillRect,b=m.addCanvasTo,w=m.Size,P=i("S8xo").MouseEventHandler,C=i("PC8g").trackEvent,T=i("XlJ7").makeFont,x=i("YmeR").ActionBinder,I=i("uOxu").getLogger("Chart.PriceAxisWidget"),L=i("T6Of").LimitedPrecisionNumericFormatter,M=i("CW80").isLineTool,A=0,k=i("EsvI").themes,E=i("3/8U").axesHighlightColor,O=i("Kxc7"),D=i("zDbI").CHART_FONT_FAMILY,V=4,B=i("CxTi"),R={contextMenuEnabled:!0,currencyLabelEnabled:!1,pressedMouseMoveScale:!0,croppedTickMarks:!0},N=window.t("Merge All Scales Into One"),n.LHS="left",n.RHS="right",n.isLeft=function(e){return e===n.LHS||e!==n.RHS&&(I.logDebug("PriceAxisWidget.isLeft: wrong side"),!1)},n.prototype.destroy=function(){null!==this.actions&&this.actions.reset&&this.actions.reset.destroy(),this._mouseEventHandler.destroy(),this._properties.fontSize.unsubscribe(this,this._onFontSizeChanged),null!==this._priceScale&&this._priceScale.onMarksChanged().unsubscribe(this,this.onOptimalWidthNeedToBeRecalculated),this._priceScale=null,this._updateTimeout&&(clearTimeout(this._updateTimeout),this._updateTimeout=null),$(this.top_canvas).remove(),this._destroyed=!0},n.prototype.getElement=function(){return this._cell},n.prototype.backgroundColor=function(){return this._pane.chart().properties().paneProperties.background.value()},n.prototype.lineColor=function(){return this._properties.lineColor.value()},n.prototype.textColor=function(){return this._properties.textColor.value()},n.prototype.fontSize=function(){return this._properties.fontSize.value()},n.prototype.baseFont=function(){return T(this.fontSize(),D,"")},n.prototype._hasAlertLabel=function(){return!1},n.prototype.rendererOptions=function(){var e=this._rendererOptionsProvider.options();return this._color===e.color&&this._fontSize===e.fontSize||(this._tickmarksCache.reset(e.fontSize,D,"",e.color),this._color=e.color),this._fontSize!==e.fontSize&&(this._widthCache.reset(),this._fontSize=e.fontSize,this._currencyLabelWidth=null,this._currencyFontSize=0),this._hasAlertLabel()&&(e=Object.assign({},e,{paddingInner:Math.max(e.paddingInner,A)})),e},n.prototype.dataSourceAtPoint=function(e,t){function i(e,t){var i=f?f.result():0;e.result()>i&&(f=e,_=t)}var n,o,r,a,l,c,u,h,d=this._grouppedSources(),p=d.sources.concat(Array.from(d.topLevelSources)).concat(this._pane.state().customSources()),_=null,f=null;if(!this._priceScale)return null;for(n=new s(e,t),o=this._pane.state(),
r=p.length-1;r>=0;--r)if((l=(a=p[r]).priceAxisViews(o,this._priceScale))&&0!==l.length)for(c=l.length-1;c>=0;--c)null!==(u=l[c].renderer())&&void 0!==u.hitTest&&null!==(h=u.hitTest(n,this._size.w,this._isLeft?"left":"right"))&&i(h,a);return _},n.prototype._setCursorClassName=function(e){var t="";e&&(t="price-axis--cursor-"+e),this._currentCursorClassName!==t&&(this._currentCursorClassName&&this._cell.classList.remove(this._currentCursorClassName),t&&this._cell.classList.add(t),this._currentCursorClassName=t)},n.prototype.mouseClickEvent=function(e){var t=this.dataSourceAtPoint(e.localX,e.localY);t&&this._pane.chart().model().selectionMacro(function(e){e.selection().isSelected(t)||(e.clearSelection(),e.addSourceToSelection(t))})},n.prototype.mouseMoveEvent=function(e){this._priceScale&&(this.dataSourceAtPoint(e.localX,e.localY)?this._setCursorClassName("pointer"):this._setResizeCursor())},n.prototype._zoomAvailable=function(){return!this.priceScale().isEmpty()&&this._pane.chart().model().model().zoomEnabled()&&this._options.pressedMouseMoveScale},n.prototype.mouseDownEvent=function(e){var t,i;this._zoomAvailable()&&(t=this._pane.chart().model(),i=this._pane.state(),this._mousedown=!0,t.startScalePrice(i,this.priceScale(),e.localY))},n.prototype.pressedMouseMoveEvent=function(e){var t,i,n;this._zoomAvailable()&&(t=this._pane.chart().model(),i=this._pane.state(),n=this.priceScale(),t.scalePriceTo(i,n,e.localY))},n.prototype.mouseDownOutsideEvent=function(e){var t,i,n;this._zoomAvailable()&&this._pane.hasState()&&(t=this._pane.chart().model(),i=this._pane.state(),n=this.priceScale(),this._mousedown&&(this._mousedown=!1,t.endScalePrice(i,n),this.restoreDefaultCursor()))},n.prototype.mouseUpEvent=function(e){var t,i,n;this._zoomAvailable()&&(t=this._pane.chart().model(),i=this._pane.state(),n=this.priceScale(),this._mousedown=!1,t.endScalePrice(i,n),this.restoreDefaultCursor())},n.prototype.mouseEnterEvent=function(e){this._setResizeCursor()},n.prototype.mouseLeaveEvent=function(e){this._setCursorClassName("")},n.prototype._setResizeCursor=function(){this._priceScale.isPercentage()||this._priceScale.isIndexedTo100()?this._setCursorClassName(""):this._pane.chart().model().model().zoomEnabled()&&this._setCursorClassName("ns-resize")},n.prototype._initActions=function(e){var t,o;this._pane.hasState()&&null===this.actions&&(this.actions={},t=this,o=this._pane.chart().model(),this.actions.reset=new h({label:window.t("Reset Price Scale"),icon:i("LdoW"),shortcut:"Alt+R",shortcutHint:a.humanReadableHash(a.Modifiers.Alt+82),statName:"ResetScale",onExecute:n.prototype.reset.bind(this)}),this.actions.setAutoScale=new h({label:window.t("Auto (Fits Data To Screen)"),checkable:!0,checked:!0,statName:"ToggleAutoScale",onExecute:function(){o.togglePriceScaleAutoScaleMode(t.priceScale()),t._updateScalesActions()}}),this.actions.setPercentage=new h({label:window.t("Percent",{context:"scale_menu"}),checkable:!0,checked:this.priceScale().isPercentage(),statName:"TogglePercantage",onExecute:function(){
o.togglePriceScalePercentageScaleMode(t.priceScale()),t._updateScalesActions()}}),this.actions.setIndexedTo100=new h({label:window.t("Indexed to 100",{context:"scale_menu"}),checkable:!0,checked:this.priceScale().isIndexedTo100(),statName:"ToggleIndexedTo100",onExecute:function(){o.togglePriceScaleIndexedTo100ScaleMode(t.priceScale()),t._updateScalesActions()}}),this.actions.setLog=new h({label:window.t("Logarithmic",{context:"scale_menu"}),checkable:!0,checked:this.priceScale().isLog(),statName:"ToggleLogScale",onExecute:function(){o.togglePriceScaleLogScaleMode(t.priceScale()),t._updateScalesActions()}}),this.actions.setRegular=new h({label:window.t("Regular",{context:"scale_menu"}),checkable:!0,checked:this.priceScale().isRegular(),statName:"ToggleRegularScale",onExecute:function(){o.setPriceScaleRegularScaleMode(t.priceScale()),t._updateScalesActions()}}),this.actions.alignLabels=new h({label:window.t("No Overlapping Labels",{context:"scale_menu"}),checkable:!0,checked:!1,statName:"TogglePreciseLabels"}),this.actions.alignLabels.binding=new x(this.actions.alignLabels,this.priceScale().properties().alignLabels,this._pane.chart().model(),"No Overlapping Labels"),this.actions.invertScale=new h({label:window.t("Invert Scale",{context:"scale_menu"}),checkable:!0,checked:this.priceScale().isInverted(),statName:"Invert Scale",onExecute:function(){o.invertPriceScale(t.priceScale()),t._updateScalesActions()}}),this._updateScalesActions())},n.prototype._logAction=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().logSeriesScale:this.actions.setLog},n.prototype._percentageAction=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().percentSeriesScale:this.actions.setPercentage},n.prototype._indexedTo100Action=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().indexedTo100SeriesScale:this.actions.setIndexedTo100},n.prototype._autoScaleAction=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().autoSeriesScale:this.actions.setAutoScale},n.prototype._regularScaleAction=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().regularSeriesScale:this.actions.setRegular},n.prototype._lockScaleAction=function(){var e=this._pane.chart().actions().lockSeriesScale,t=F(this.priceScale(),this._pane.chart().model().model().mainSeriesScaleRatio());return e.update({hint:t}),e},n.prototype._invertAction=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().invertSeriesScale:this.actions.invertScale},n.prototype._isMainSeriesAxis=function(){return this.priceScale().hasMainSeries()},n.prototype._updateMainSeriesScalesActions=function(){this._isMainSeriesAxis()&&null!==this.actions&&this._updateScalesActions()},n.prototype._updateScalesActions=function(){var e=this.priceScale(),t=this._isMainSeriesAxis(),i=e.mainSource().properties(),n=t&&e.isLockScale(),o=t&&i.style.value()===TradingView.Series.STYLE_PNF;this.actions.setRegular.update({checked:e.isRegular(),disabled:n||o}),this.actions.setPercentage.update({
checked:e.isPercentage(),disabled:n||o}),this.actions.setIndexedTo100.update({checked:e.isIndexedTo100(),disabled:n||o}),this.actions.setLog.update({checked:e.isLog(),disabled:n||o}),this.actions.setAutoScale.update({checked:e.isAutoScale(),disabled:e.properties().autoScaleDisabled.value()})},n.prototype.mouseDoubleClickEvent=function(e){var t=this.dataSourceAtPoint(e.localX,e.localY);t?this._pane.processDoubleClickOnSource(t):(this.reset(),C("GUI","Double click price scale"))},n.prototype.contextMenuEvent=function(e){var t;if(this._options.contextMenuEnabled){if(null!==(t=this.dataSourceAtPoint(e.localX,e.localY)))return void this._pane.chart().model().selectionMacro(function(i){i.selection().isSelected(t)||(i.clearSelection(),i.addSourceToSelection(t)),this._pane.showContextMenuForSelection(e)}.bind(this));this._createContextMenu().then(function(t){t.show(e)})}},n.prototype._createContextMenu=function(){return p.createMenu(this.getContextMenuActions(),{statName:"PriceScaleContextMenu"})},n.prototype._createMergeScalesAction=function(){var e,t=this._pane.chart().actions(),i=this._pane.chart().model().model(),n=i.priceScaleSlotsCount();return n.left+n.right===1?0===n.left?t.moveScaleToLeft:t.moveScaleToRight:((e=[]).push(t.mergeLeftScalesAction),e.push(t.mergeRightScalesAction),new h({label:N,subItems:e}))},n.prototype.getContextMenuActions=function(){var e,t,i;return this._initActions(),e=this._pane.chart().actions(),(t=[]).push(this.actions.reset,new d,this._autoScaleAction()),this._isMainSeriesAxis()&&t.push(this._lockScaleAction()),t.push(e.scaleSeriesOnly,this._invertAction(),new d,this._regularScaleAction(),this._percentageAction(),this._indexedTo100Action(),this._logAction(),new d),l.any()||(t.push(this._createMergeScalesAction()),t.push(new d)),O.enabled("fundamental_widget")||(i=!1,t.push(new h({label:window.t("Labels"),subItems:[e.showSymbolLabelsAction,e.showSeriesLastValue,e.showStudyPlotNamesAction,e.showStudyLastValue,i?e.showFundamentalNamesAction:null,i?e.showFundamentalsLastValueAction:null,this.actions.alignLabels].filter(Boolean)}))),O.enabled("countdown")&&t.push(e.showCountdown),this._options.currencyLabelEnabled&&t.push(e.showCurrency),!TradingView.onWidget()&&O.enabled("show_chart_property_page")&&O.enabled("chart_property_page_scales")&&e.scalesProperties&&t.push(new d,e.scalesProperties),t},n.prototype._sameSideSources=function(){var e=this._isLeft?"left":"right";return this._pane.state().orderedSources(e)},n.prototype._grouppedSources=function(){var e,t,i=this._pane,n=i.chart().model(),o=this._sameSideSources().slice(),r=i.state(),s=this.priceScale(),a=new Set,l=n.lineBeingEdited()||n.lineBeingCreated();if(l&&a.add(l),n.sourcesBeingMoved().forEach(function(e){a.add(e)}),n.selection().sources().forEach(function(e){a.add(e)}),n.hoveredSource()&&a.add(n.hoveredSource()),s===r.defaultPriceScale())for(e=this._pane.state().dataSources(),t=0;t<e.length;t++)r.isOverlay(e[t])&&o.push(e[t]);return{sources:o,topLevelSources:a}},n.prototype.backLabels=function(e){
var t=[],i=this._grouppedSources(),n=function(n){var o,r,s,a;for(o=0;o<n.length;++o)if(r=n[o],(e||!i.topLevelSources.has(r))&&(s=r.priceAxisViews(this._pane.state(),this.priceScale())))for(a=0;a<s.length;a++)t.push(s[a])}.bind(this);return n(i.sources),n(this._pane.state().customSources()),t},n.prototype._isCurrencyLabelVisible=function(){return null!==this._currencyLabel&&!this._currencyLabel.classList.contains("js-hidden")},n.prototype.optimalWidth=function(){var e,t,i,n,o,r,s,a,l;if(!this.isVisible())return 0;if(e=32,t=this.rendererOptions(),this._pane.hasState())for(i=this.ctx,n=this.priceScale().marks(),i.setFont(this.baseFont()),n.length>0&&(e=Math.max(this._widthCache.measureText(i,n[0].label),this._widthCache.measureText(i,n[n.length-1].label))),r=(o=this.backLabels(!0)).length;r--;)(s=this._widthCache.measureText(i,o[r].text()))>e&&(e=s);return a=0,this._isCurrencyLabelVisible()&&(null===this._currencyLabelWidth&&(s=(l=this._currencyLabel.getBoundingClientRect()).right-l.left+1,this._currencyLabelWidth=2*V+s),a=this._currencyLabelWidth),Math.max(a,Math.ceil(t.offsetSize+t.borderSize+t.tickLength+t.paddingInner+t.paddingOuter+e))},n.prototype.setSizeAndOffset=function(e,t){if(e.w<0||e.h<0)throw new Error("Try to set invalid size to PriceAxisWidget "+JSON.stringify(e));null!==this._size&&this._size.equals(e)||(this._size=e,y(this.canvas,e),y(this.top_canvas,e),this._cell.style.width=e.w+"px",this._cell.style.height=e.h+"px",this._cell.style.minWidth=e.w+"px"),this._offset!==t&&(this._offset=t,this._cell.style.left=t+"px")},n.prototype.getWidth=function(){return this._size.w},n.prototype.getImage=function(){return this.canvas},n.prototype.update=function(){},n.prototype._hightlightBackground=function(e,t,i){var n,o,r,s,a,l,c,u;if(i){for(n=t[0].price,o=t[0].price,r=1;r<t.length;r++)n=Math.min(n,t[r].price),o=Math.max(o,t[r].price);s=i.firstValue(),a=this.priceScale().priceToCoordinate(n,s),l=this.priceScale().priceToCoordinate(o,s),c=this._backgroundBasedTheme.value(),u=E(c),S(e,1,a,this._size.w-1,l-a,u)}},n.prototype.drawBackground=function(e){var t,i,n,o,r;v(e,0,0,this._size.w,this._size.h,this.backgroundColor()),this._highlighted&&(e.globalAlpha=.5,t=k[this._backgroundBasedTheme.value()].getThemedColor("color-price-axis-highlight"),this._isLeft?S(e,0,0,this._size.w-1,this._size.h,t):S(e,1,0,this._size.w,this._size.h,t),e.globalAlpha=1),i=this._pane.chart().model(),n=this.priceScale(),(o=i.model().selection().sources().filter(function(e){return e.priceScale()===n}).filter(function(e){return M(e)}).reduce(function(e,t){var i=t.axisPoints();return 0===i.length?e:e.concat(i)},[])).length>0&&this._hightlightBackground(e,o,this.priceScale().mainSource()),(r=i.model().crossHairSource()).startMeasurePoint()&&this._hightlightBackground(e,r.measurePoints())},n.prototype.drawBorder=function(e){var t,i;e.save(),e.fillStyle=this.lineColor(),t=this.rendererOptions().borderSize,this._isLeft?(e.translate(-.5,-.5),i=this._size.w-t-1):(e.translate(.5,-.5),i=0),e.fillRect(i,0,t,this._size.h),e.restore()},
n.prototype.drawTickMarks=function(e){var t,i,n,o,r,s,a,l,c;if(e.save(),e.strokeStyle=this.lineColor(),t=this.priceScale().marks(),e.fillStyle=this.textColor(),e.setFont(this.baseFont()),i=this,e.translate(-.5,-.5),n=this.rendererOptions(),o=0!==t.length?this._tickmarksCache.getLabelImage(e,t[0].label).height:0,r=this._isCurrencyLabelVisible()?this._currencyLabelLineHeight()+Number(B.css_value_currency_label_top):0,s=t.map(function(e){var t;return!!this._options.croppedTickMarks||(t=e.coord-o/2,!(e.coord+o/2>this._size.h||t<r))},this),i._isLeft){for(e.fillStyle=i.lineColor(),e.beginPath(),a=this._size.w-n.offsetSize-n.borderSize-n.tickLength,l=t.length;l--;)s[l]&&e.rect(a,t[l].coord,n.tickLength,1);for(e.fill(),l=t.length;l--;)s[l]&&this._tickmarksCache.paintTo(e,t[l].label,a-n.paddingInner,t[l].coord,"right")}else{for(e.fillStyle=i.lineColor(),e.beginPath(),c=n.borderSize+n.offsetSize,l=t.length;l--;)s[l]&&e.rect(c,t[l].coord,n.tickLength,1);for(e.fill(),l=t.length;l--;)s[l]&&this._tickmarksCache.paintTo(e,t[l].label,c+n.tickLength+n.paddingInner,t[l].coord,"left")}e.restore()},n.prototype._alignLabels=function(){function e(e){var t,i,n,r,a;for(t=0;t<e.length;++t)if(n=(i=e[t]).priceAxisViews(w,v),s.has(i)&&n&&n.forEach(function(e){e.setFixedCoordinate(null)}),n){for(r=0;r<n.length;r++)(a=n[r]).isVisible()&&g.push(a);o===i&&n.length>0&&(y=n[0].floatCoordinate())}}var t,i,n,o,r,s,a,l,c,u,h,d,p,_,f,m,y=this._size.h/2,g=[],v=this.priceScale(),S=v.orderedSources().slice(),b=this._pane,w=b.state(),P=this.rendererOptions(),C=v===w.defaultPriceScale();if(C)for(t=this._pane.state().dataSources(),i=0;i<t.length;i++)w.isOverlay(t[i])&&S.push(t[i]);for(n=this._pane.chart().model().model(),o=v.mainSource(),r=n.selection().sources(),s=new Set,r.forEach(function(e){s.add(e)}),e(S),e(this._pane.state().customSources()),a=g.filter(function(e){return e.floatCoordinate()<=y}),l=g.filter(function(e){return e.floatCoordinate()>y}),a.sort(function(e,t){return t.floatCoordinate()-e.floatCoordinate()}),a.length&&l.length&&l.push(a[0]),l.sort(function(e,t){return e.floatCoordinate()-t.floatCoordinate()}),c=g.length,i=0;i<c;i++)(u=g[i]).setFixedCoordinate(u.coordinate());if((h=this.priceScale().properties()).alignLabels&&h.alignLabels.value()){for(i=1;i<a.length;i++)u=a[i],p=(d=a[i-1]).height(P,!1),_=u.coordinate(),f=d.getFixedCoordinate(),(_||f)&&_>f-p&&u.setFixedCoordinate(f-p);for(m=1;m<l.length;m++)u=l[m],p=(d=l[m-1]).height(P,!0),_=u.coordinate(),f=d.getFixedCoordinate(),(_||f)&&_<f+p&&u.setFixedCoordinate(f+p)}},n.prototype.drawBackLabels=function(e){var t,i,n=this.backLabels(),o=this.rendererOptions(),r=this._isLeft?"right":"left";for(t=0;t<n.length;t++)(i=n[t]).isAxisLabelVisible()&&(e.save(),i.renderer().draw(e,o,this._widthCache,this._size.w,r),e.restore())},n.prototype._minMaxViews=function(e){var t=this._pane.state(),i=this.priceScale(),n=[],o={value:null,view:null},r={value:null,view:null};return e.forEach(function(e){var n,s,a,l=e.priceAxisViews(t,i);if(l&&l.length)for(n=0;n<l.length;n++)a=(s=l[n]).coordinate(),
(null===o.value||o.value<=a)&&(o={value:a,view:s}),(null===r.value||r.value>=a)&&(r={value:a,view:s})}),o.view&&n.push(o.view),r.view&&n.push(r.view),n},n.prototype._isFromSameSide=function(e){return(this._isLeft?this._pane.state().leftPriceScales():this._pane.state().rightPriceScales()).includes(e)},n.prototype._addViewsOrMaxMin=function(e,t){var i,n=this._pane.state(),o=this.priceScale();o!==n.defaultPriceScale()&&(e=e.filter(function(e){return n.isOverlay(e)||this._isFromSameSide(e.priceScale())}.bind(this))),0!==e.length&&(1===e.length?(i=e[0].priceAxisViews(n,o))&&i.length&&t.push(i):t.push(this._minMaxViews(e)))},n.prototype.drawCrossHairLabel=function(e){var t,i,n,o,r,s=this._pane.chart().model().model(),a=this._pane.state(),l=this.priceScale(),c=[],u=this._pane.state(),h=this.priceScale()===a.defaultPriceScale(),d=s.lineBeingEdited()||s.lineBeingCreated();d&&(d.priceScale()===l||h&&a.isOverlay(d))&&(t=d.priceAxisViews(u,l))&&t.length&&c.push(t),this._addViewsOrMaxMin(s.sourcesBeingMoved(),c),this._addViewsOrMaxMin(s.selection().sources(),c),(i=s.hoveredSource())&&(n=a.customSources().includes(i)?l:i.priceScale(),!s.selection().isSelected(i)&&(this._isFromSameSide(n)||h&&a.isOverlay(i))&&(t=s.hoveredSource().priceAxisViews(u,l))&&t.length&&c.push(t)),(t=s.crossHairSource().priceAxisViews(u,l))&&t.length&&c.push(t),o=this.rendererOptions(),r=this._isLeft?"right":"left",c.forEach(function(t){t.forEach(function(t){e.save(),t.renderer().draw(e,o,this._widthCache,this._size.w,r),e.restore()},this)},this)},n.prototype.priceScale=function(){return this._priceScale},n.prototype.isVisible=function(){return this._isVisible},n.prototype.setVisible=function(e){(e=!!e)!==this._isVisible&&(this._cell.style.display=e?"table-cell":"none",this._isVisible=e)},n.prototype.setAutoScale=function(e){var t=this._pane.state(),i=this.priceScale(),n=this._pane.chart().model();n.setPriceAutoScale(t,i,e)},n.prototype.reset=function(){var e=this._pane.state(),t=this.priceScale(),i=this._pane.chart().model();i.resetPriceScale(e,t)},n.prototype.hardResetCanvas=function(){null!==this._size&&(g(this.canvas,this._size),g(this.top_canvas,this._size))},n.prototype._isMainPane=function(){return this._pane.state().containsMainSeries()},n.prototype.paint=function(e){this._isVisible&&e&&(this.top_ctx.clearRect(-.5,-.5,this._size.w,this._size.h),e===f.Cursor?this.drawCrossHairLabel(this.top_ctx):(this._alignLabels(),this.drawBackground(this.ctx),this.drawBorder(this.ctx),this._pane.hasState()&&(this._updateCurrencyLabel(),this.drawTickMarks(this.ctx),this.drawBackLabels(this.ctx),this.drawCrossHairLabel(this.top_ctx))))},n.prototype._updateCurrencyLabel=function(){if(null!==this._currencyLabel){var e=this._priceScale.currency();null!==e&&this._properties.showCurrency.value()?e!==this._currencyText&&(this._currencyText=e,this._currencyLabel.classList.remove("js-hidden"),this._currencyLabel.textContent=e,this._currencyLabelWidth=null):(this._currencyLabel.classList.add("js-hidden"),this._currencyText=""),this._updateCurrencyLabelFont()}},
n.prototype._currencyLabelLineHeight=function(){var e=this.rendererOptions();return Math.ceil(this.fontSize()+e.paddingTop+e.paddingBottom)},n.prototype._updateCurrencyLabelFont=function(){if(null!==this._currencyLabel){var e=this.fontSize();e!==this._currencyFontSize&&(this._currencyLabel.style.fontSize=e+"px",this._currencyLabel.style.lineHeight=this._currencyLabelLineHeight()+"px",this._currencyFontSize=e,this._currencyLabelWidth=null)}},n.prototype.restoreDefaultCursor=function(){this.setCursor("")},n.prototype.setCursor=function(e){var t="";"grabbing"!==e&&"ns-resize"!==e||(t="price-axis--cursor-"+e),this._currentCursorClassName!==t&&(this._currentCursorClassName&&this._cell.classList.remove(this._currentCursorClassName),t&&this._cell.classList.add(t),this._currentCursorClassName=t,this._cell.style.cursor)},n.prototype.onOptimalWidthNeedToBeRecalculated=function(){var e,t=this.optimalWidth();this._prevOptimalWidth<t&&this._pane&&(e=this._pane.chart(),this._updateTimeout||(this._updateTimeout=setTimeout(function(){e&&e.model().model().fullUpdate(),this._updateTimeout=null}.bind(this),100))),this._prevOptimalWidth=t},n.prototype._onFontSizeChanged=function(){this._currencyLabelWidth=null,this._updateCurrencyLabelFont(),this.onOptimalWidthNeedToBeRecalculated()},n.prototype.setPriceScale=function(e){this._priceScale!==e&&(null!==this._priceScale&&this._priceScale.onMarksChanged().unsubscribe(this,this.onOptimalWidthNeedToBeRecalculated),this._priceScale=e,null!==e&&e.onMarksChanged().subscribe(this,this.onOptimalWidthNeedToBeRecalculated))},n.prototype.axisInfo=function(){return this._axisInfo},n.prototype.setHighlighted=function(e){this._highlighted!==e&&(this._highlighted=e)},F=o(4),e.exports={PriceAxisWidget:n,scaleRatioForContextMenuTransformer:o}},"1Wlv":function(e,t,i){"use strict";(function(e,n){function o(t,i){r.call(this),i=Object.assign({},I,i),this._properties=new e(i),this._scalesProperties=t,this.m_height=0,this._internalHeightCache=null,this._internalHeightChanged=new n,this.m_priceRange=null,this._priceRangeChanged=new n,this.m_topMargin=0,this.m_bottomMargin=0,this._topPixelMargin=0,this._bottomPixelMargin=0,this.m_scrollStartPoint=null,this.m_scaleStartPoint=null,this.m_maxPriceRange=null,this.m_minPriceRange=null,this.m_priceRangeSnapshot=null,this._invalidatedForRange={isValid:!0,visibleBars:null};var s=this;this._coordinateToLogicalFunc=function(e,t){return s._coordinateToLogical(e,t)},this._logicalToCoordinateFunc=function(e,t,i){return s._logicalToCoordinate(e,t,i)},this.m_markBuilder=new f(this,100,this._coordinateToLogicalFunc,this._logicalToCoordinateFunc),this._modeChanged=new n,this._properties.isInverted.listeners().subscribe(this,o.prototype._onIsInvertedChanged),this._properties.listeners().subscribe(null,function(){if(s.mainSource()&&s.mainSource().model()){var e=s.mainSource().model().paneForSource(s.mainSource());s.mainSource().model().updatePane(e)}}),this._scalesProperties.listeners().subscribe(this,function(){this._marksCache=null}),this.setId(d())}
var r=i("Yj6H").PriceScaleBase,s=i("Ss5c").LineDataSource,a=i("7ktv").PriceDataSource,l=i("qJq3").Series,c=i("kcTO").PriceFormatter,u=i("GH0z").PercentageFormatter,h=i("Qb4w").PriceRange,d=i("0waE").randomHash,p=i("s1Gx").sortSources,_=i("3ClC").isStudy,f=i("lTLF").PriceTickMarkBuilder,m=i("TTFo"),y=m.fromPercent,g=m.toPercent,v=m.toPercentRange,S=m.fromIndexedTo100,b=m.toIndexedTo100,w=m.toIndexedTo100Range,P=m.fromLog,C=m.toLog,T=new u,x=new c(100,1),I={autoScale:!0,autoScaleDisabled:!1,lockScale:!1,percentage:!1,percentageDisabled:!1,log:!1,logDisabled:!1,alignLabels:!0,isInverted:!1,indexedTo100:!1};inherit(o,r),o.prototype.id=function(){return this._id},o.prototype.setId=function(e){this._id=e},o.prototype.initScaleProperties=function(){var e=this.isLockScale();e&&(this.properties().percentage.setValue(!1),this.properties().indexedTo100.setValue(!1),this.properties().log.setValue(!1),this.properties().autoScale.setValue(!1)),this.properties().percentageDisabled.setValue(e),this.properties().logDisabled.setValue(e),this._updateAutoScaleDisabledProperty(!1),this.properties().percentage.value()&&(this.properties().log.setValue(!1),this.properties().indexedTo100.setValue(!1)),this.properties().indexedTo100.value()&&(this.properties().log.setValue(!1),this.properties().percentage.setValue(!1))},o.prototype.isAutoScale=function(){return this._properties.autoScale.value()&&!this.isLockScale()},o.prototype.isLockScale=function(){return this._properties.lockScale.value()},o.prototype.isLog=function(){return this._properties.log.value()},o.prototype.isPercentage=function(){return this._properties.percentage.value()},o.prototype.isIndexedTo100=function(){return this._properties.indexedTo100.value()},o.prototype.isRegular=function(){return!this.isPercentage()&&!this.isLog()&&!this.isIndexedTo100()},o.prototype._convertPriceRangeFromLog=function(e){var t,i;return null===e?null:(t=P(e.minValue()),i=P(e.maxValue()),new h(t,i))},o.prototype._convertPriceRangeToLog=function(e){var t,i;return null===e?null:(t=C(e.minValue()),i=C(e.maxValue()),new h(t,i))},o.prototype._canConvertPriceRangeFromLog=function(e){var t,i;return null!==e&&(t=P(e.minValue()),i=P(e.maxValue()),isFinite(t)&&isFinite(i))},o.prototype._setAutoScaleValueWithDependentProperties=function(e){this._properties.autoScale.setValueSilently(e),e&&(this._properties.percentage.setValueSilently(!1),this._properties.indexedTo100.setValueSilently(!1),this._properties.lockScale.setValueSilently(!1),this._properties.logDisabled.setValueSilently(!1)),this._updateAutoScaleDisabledProperty(!0)},o.prototype._setLockScaleValueWithDependentProperties=function(e){this._properties.lockScale.setValueSilently(e),e&&(this._properties.autoScale.setValueSilently(!1),this._properties.percentage.setValueSilently(!1),this._properties.indexedTo100.setValueSilently(!1),this._properties.log.setValueSilently(!1)),this._properties.percentageDisabled.setValueSilently(e),this._properties.logDisabled.setValueSilently(e),this._updateAutoScaleDisabledProperty(!0)},
o.prototype._setPercentageValueWithDependentProperties=function(e){this._properties.percentage.setValueSilently(e),e&&(this._properties.autoScale.setValueSilently(!0),this._properties.log.setValueSilently(!1),this._properties.lockScale.setValueSilently(!1),this._properties.indexedTo100.setValueSilently(!1)),this._updateAutoScaleDisabledProperty(!0)},o.prototype._setIndexedTo100ValueWithDependentProperties=function(e){this._properties.indexedTo100.setValueSilently(e),e&&(this._properties.autoScale.setValueSilently(!0),this._properties.log.setValueSilently(!1),this._properties.lockScale.setValueSilently(!1),this._properties.percentage.setValueSilently(!1)),this._updateAutoScaleDisabledProperty(!0)},o.prototype._setLogValueWithDependentProperties=function(e){this._properties.log.setValueSilently(e),e&&(this._properties.lockScale.setValueSilently(!1),this._properties.percentage.setValueSilently(!1),this._properties.indexedTo100.setValueSilently(!1)),this._updateAutoScaleDisabledProperty(!0)},o.prototype._updateAutoScaleDisabledProperty=function(e){var t=this._properties.indexedTo100.value()||this._properties.percentage.value()||this._properties.lockScale.value();e?this._properties.autoScaleDisabled.setValueSilently(t):this._properties.autoScaleDisabled.setValue(t)},o.prototype.mode=function(){return{autoScale:this._properties.autoScale.value(),lockScale:this._properties.lockScale.value(),percentage:this._properties.percentage.value(),indexedTo100:this._properties.indexedTo100.value(),log:this._properties.log.value()}},o.prototype.setMode=function(e){var t={},i=this.mode(),n=this._properties.state(),o=null;void 0!==e.autoScale&&e.autoScale!==n.autoScale&&(t.autoScale=e.autoScale,this._setAutoScaleValueWithDependentProperties(e.autoScale)),void 0!==e.lockScale&&e.lockScale!==n.lockScale&&(t.lockScale=e.lockScale,this._setLockScaleValueWithDependentProperties(e.lockScale)),void 0!==e.percentage&&e.percentage!==n.percentage&&(t.percentage=e.percentage,this._setPercentageValueWithDependentProperties(e.percentage),this._invalidatedForRange.isValid=!1),void 0!==e.indexedTo100&&e.indexedTo100!==n.indexedTo100&&(t.indexedTo100=e.indexedTo100,this._setIndexedTo100ValueWithDependentProperties(e.indexedTo100),this._invalidatedForRange.isValid=!1),void 0!==e.log&&e.log!==n.log&&(t.log=e.log,this._setLogValueWithDependentProperties(e.log)),n.log&&!this._properties.log.value()&&(this._canConvertPriceRangeFromLog(this.m_priceRange)?null!==(o=this._convertPriceRangeFromLog(this.m_priceRange))&&this.setPriceRange(o):this.properties().autoScale.setValue(!0)),!n.log&&this._properties.log.value()&&null!==(o=this._convertPriceRangeToLog(this.m_priceRange))&&this.setPriceRange(o),n.autoScale!==this._properties.autoScale.value()&&this._properties.autoScale.listeners().fire(this._properties.autoScale),n.autoScaleDisabled!==this._properties.autoScaleDisabled.value()&&this._properties.autoScaleDisabled.listeners().fire(this._properties.autoScaleDisabled),
n.lockScale!==this._properties.lockScale.value()&&this._properties.lockScale.listeners().fire(this._properties.lockScale),n.percentage!==this._properties.percentage.value()&&(this._properties.percentage.listeners().fire(this._properties.percentage),this.updateFormatter()),n.indexedTo100!==this._properties.indexedTo100.value()&&(this._properties.indexedTo100.listeners().fire(this._properties.indexedTo100),this.updateFormatter()),n.percentageDisabled!==this._properties.percentageDisabled.value()&&this._properties.percentageDisabled.listeners().fire(this._properties.percentageDisabled),n.log!==this._properties.log.value()&&this._properties.log.listeners().fire(this._properties.log),n.logDisabled!==this._properties.logDisabled.value()&&this._properties.logDisabled.listeners().fire(this._properties.logDisabled),void 0===t.log&&void 0===t.percentage&&void 0===t.lockScale&&void 0===t.autoScale&&void 0===t.indexedTo100||this._modeChanged.fire(i,this.mode())},o.prototype.modeChanged=function(){return this._modeChanged},o.prototype.properties=function(){return this._properties},o.prototype.fontSize=function(){return this._scalesProperties.fontSize.value()},o.prototype.height=function(){return this.m_height},o.prototype.setHeight=function(e){this.m_height!==e&&(this.m_height=e,this._invalidateInternalHeightCache(),this._marksCache=null)},o.prototype.topPixelMargin=function(){return this.isInverted()?this.m_bottomMargin*this.height()+this._bottomPixelMargin:this.m_topMargin*this.height()+this._topPixelMargin},o.prototype.topMargin=function(){return this.m_topMargin},o.prototype.setTopMargin=function(e){if(!isNumber(e))throw new TypeError("invalid margin");if(e<0||e>30)throw new RangeError("invalid margin");this.m_topMargin!==e&&(this.m_topMargin=e,this._invalidateInternalHeightCache(),this._marksCache=null)},o.prototype.bottomPixelMargin=function(){return this.isInverted()?this.m_topMargin*this.height()+this._topPixelMargin:this.m_bottomMargin*this.height()+this._bottomPixelMargin},o.prototype.bottomMargin=function(){return this.m_bottomMargin},o.prototype.setBottomMargin=function(e){if(!isNumber(e))throw new TypeError("invalid margin");if(e<0||e>30)throw new RangeError("invalid margin");this.m_bottomMargin!==e&&(this.m_bottomMargin=e,this._invalidateInternalHeightCache(),this._marksCache=null)},o.prototype.internalHeight=function(){if(this._internalHeightCache)return this._internalHeightCache;var e=this.height()-this.topPixelMargin()-this.bottomPixelMargin();return this._internalHeightCache=e,e},o.prototype._invalidateInternalHeightCache=function(){this._internalHeightCache=null,this._internalHeightChanged.fire()},o.prototype.internalHeightChanged=function(){return this._internalHeightChanged},o.prototype.priceRange=function(){return this.makeSureItIsValid(),this.m_priceRange},o.prototype.priceRangeChanged=function(){return this._priceRangeChanged},o.prototype.setPriceRange=function(e,t,i){var n,o,r;if(!(e instanceof h))throw new TypeError("incorrect price range");return n=this.m_priceRange,
!!(t||null===n&&null!==e||null!==n&&!n.equals(e))&&(o=null!==this.m_maxPriceRange&&this.m_maxPriceRange.containsStrictly(e),r=null!==this.m_minPriceRange&&e.containsStrictly(this.m_minPriceRange),!(this.isLockScale()&&!t&&(o||r))&&(this._marksCache=null,this.m_priceRange=e,void(i||this._priceRangeChanged.fire(n,e))))},o.prototype.isEmpty=function(){return this.makeSureItIsValid(),0===this.m_height||!this.m_priceRange||this.m_priceRange.isEmpty()},o.prototype.invertedCoordinate=function(e){return this.isInverted()?e:this.height()-1-e},o.prototype.priceToLogical=function(e){return this.isLog()&&e?C(e):e},o.prototype.logicalToPrice=function(e){return this.isLog()?P(e):e},o.prototype._logicalToCoordinate=function(e,t,i){var n,o;return this.makeSureItIsValid(),this.isEmpty()?0:(e=this.priceToLogical(e),n=this.bottomPixelMargin()+(this.internalHeight()-1)*(e-this.priceRange().minValue())/(this.priceRange().maxValue()-this.priceRange().minValue()),o=this.invertedCoordinate(n),i?o:Math.round(o))},o.prototype.priceToCoordinate=function(e,t,i){return this.isPercentage()?e=g(e,t):this.isIndexedTo100()&&(e=b(e,t)),this._logicalToCoordinate(e,t,i)},o.prototype.pointsArrayToCoordinates=function(e,t){var i,n,o,r,s,a,l,c,u,h;if(this.makeSureItIsValid(),i=this.bottomPixelMargin(),n=this.priceRange().minValue(),o=this.priceRange().maxValue(),r=this.internalHeight()-1,s=this.isInverted(),a=r/(o-n),this.isPercentage())for(l=0;l<e.length;l++)e[l].y=g(e[l].y,t);if(this.isIndexedTo100())for(l=0;l<e.length;l++)e[l].y=b(e[l].y,t);if(this.isLog())for(l=0;l<e.length;l++)e[l].y=this.priceToLogical(e[l].y);for(l=0;l<e.length;l++)c=e[l].y,TradingView.isNaN(c)||void 0===c||null===c||(u=i+a*(c-n),h=s?u:this.m_height-1-u,e[l].y=Math.round(h))},o.prototype.pricesArrayToCoordinates=function(e,t){var i,n,o,r,s,a,l,c,u,h;if(this.makeSureItIsValid(),i=this.bottomPixelMargin(),n=this.priceRange().minValue(),o=this.priceRange().maxValue(),r=this.internalHeight()-1,s=this.isInverted(),a=r/(o-n),this.isPercentage())for(l=0;l<e.length;l++)e[l]=g(e[l],t);if(this.isIndexedTo100())for(l=0;l<e.length;l++)e[l]=b(e[l],t);if(this.isLog())for(l=0;l<e.length;l++)e[l]=this.priceToLogical(e[l]);for(l=0;l<e.length;l++)void 0!==(c=e[l])&&null!==c&&(u=i+a*(c-n),h=s?u:this.m_height-1-u,e[l]=Math.round(h))},o.prototype.barPricesToCoordinates=function(e,t){var i,n,o,r,s,a,l,c,u,h,d,p;if(this.makeSureItIsValid(),i=e,n=this.bottomPixelMargin(),o=this.priceRange().minValue(),r=this.priceRange().maxValue(),s=this.internalHeight()-1,a=null,this.isPercentage()?a=g:this.isIndexedTo100()?a=b:this.isLog()&&(a=function(e){return e?C(e):e}),null!==a)for(l=0;l<i.length;l++)i[l]&&(i[l].open=a(i[l].open,t),i[l].high=a(i[l].high,t),i[l].low=a(i[l].low,t),i[l].close=a(i[l].close,t),i[l].additionalPrice&&(i[l].additionalPrice=a(i[l].additionalPrice,t)));for(c=s/(r-o),u=this.isInverted(),l=0;l<i.length;l++)(h=i[l])&&(d=n+c*(h.open-o),p=u?d:this.m_height-1-d,h.open=Math.round(p),d=n+c*(h.high-o),p=u?d:this.m_height-1-d,h.high=Math.round(p),d=n+c*(h.low-o),p=u?d:this.m_height-1-d,
h.low=Math.round(p),d=n+c*(h.close-o),p=u?d:this.m_height-1-d,h.close=Math.round(p),h.additionalPrice&&(d=n+c*(h.additionalPrice-o),p=u?d:this.m_height-1-d,h.additionalPrice=Math.round(p)))},o.prototype._coordinateToLogical=function(e,t){var i,n;return this.makeSureItIsValid(),this.isEmpty()?0:(i=this.invertedCoordinate(e),n=this.priceRange().minValue()+(this.priceRange().maxValue()-this.priceRange().minValue())*((i-this.bottomPixelMargin())/(this.internalHeight()-1)),this.logicalToPrice(n))},o.prototype.coordinateToPrice=function(e,t){var i=this._coordinateToLogical(e,t);return this.isPercentage()?i=y(i,t):this.isIndexedTo100()&&(i=S(i,t)),i},o.prototype.dataSources=function(){return this.m_dataSources},o.prototype.orderedSources=function(){var e,t,i;if(this._cachedOrderedSoruces)return this._cachedOrderedSoruces;for(e=[],t=0;t<this.m_dataSources.length;t++)null==(i=this.m_dataSources[t]).zorder()&&i.setZorder(t+1),e.push(i);return e=p(e),this._cachedOrderedSoruces=e,this._cachedOrderedSoruces},o.prototype.invalidateSourcesCache=function(){this._cachedOrderedSoruces=null},o.prototype.isInverted=function(){return this._properties.isInverted.value()},o.prototype.isScaled=function(){return"number"==typeof this.m_scaleStartPoint},o.prototype.startScale=function(e){this.isPercentage()||this.isIndexedTo100()||null===this.m_scaleStartPoint&&null===this.m_priceRangeSnapshot&&(this.isEmpty()||(this.m_scaleStartPoint=this.m_height-e,this.m_priceRangeSnapshot=this.priceRange().clone()))},o.prototype.marks=function(){return this._marksCache?this._marksCache:(this.m_markBuilder.rebuildTickMarks(),this._marksCache=this.m_markBuilder.marks(),this._onMarksChanged.fire(),this._marksCache)},o.prototype.setMaxPriceRange=function(e){this.m_maxPriceRange=e},o.prototype.setMinPriceRange=function(e){this.m_minPriceRange=e},o.prototype.scaleTo=function(e){var t,i;this.isPercentage()||this.isIndexedTo100()||null!==this.m_scaleStartPoint&&(this.setMode({autoScale:!1}),(e=this.m_height-e)<0&&(e=0),t=(this.m_scaleStartPoint+.2*(this.m_height-1))/(e+.2*(this.m_height-1)),i=this.m_priceRangeSnapshot.clone(),t=Math.max(t,.1),i.scaleAroundCenter(t),this.setPriceRange(i))},o.prototype.endScale=function(){this.isPercentage()||this.isIndexedTo100()||null!==this.m_scaleStartPoint&&(this.m_scaleStartPoint=null,this.m_priceRangeSnapshot=null)},o.prototype.startScroll=function(e){this.isAutoScale()||null===this.m_scrollStartPoint&&null===this.m_priceRangeSnapshot&&(this.isEmpty()||(this.m_scrollStartPoint=e,this.m_priceRangeSnapshot=this.priceRange().clone()))},o.prototype.scrollTo=function(e){var t,i,n,o;this.isAutoScale()||null!==this.m_scrollStartPoint&&(t=this.priceRange().length()/(this.internalHeight()-1),i=e-this.m_scrollStartPoint,this.isInverted()&&(i*=-1),n=i*t,(o=this.m_priceRangeSnapshot.clone()).shift(n),this.setPriceRange(o,!0),this._marksCache=null)},o.prototype.endScroll=function(){this.isAutoScale()||null!==this.m_scrollStartPoint&&(this.m_scrollStartPoint=null,this.m_priceRangeSnapshot=null)},o.prototype.state=function(){var e={}
;return e.id=this._id,e.m_priceRange=!this.priceRange()||this.isPercentage()||this.isIndexedTo100()?null:this.priceRange().serialize(),e.m_isAutoScale=this.isAutoScale(),e.m_isPercentage=this._properties.percentage.value(),e.m_isIndexedTo100=this._properties.indexedTo100.value(),e.m_isLog=this._properties.log.value(),e.m_isLockScale=this.isLockScale(),e.m_isInverted=this.isInverted(),e.m_height=this.m_height,e.m_topMargin=this.m_topMargin,e.m_bottomMargin=this.m_bottomMargin,e.alignLabels=this._properties.alignLabels.value(),e},o.prototype.restoreState=function(e){var t,i=e.m_priceRange;if(void 0===i)throw new TypeError("invalid state");if(void 0===e.m_isAutoScale)throw new TypeError("invalid state");void 0!==e.id&&(this._id=e.id),t={autoScale:e.m_isAutoScale},void 0!==e.m_isPercentage&&(t.percentage=e.m_isPercentage),void 0!==e.m_isIndexedTo100&&(t.indexedTo100=e.m_isIndexedTo100),void 0!==e.m_isLog&&(t.log=e.m_isLog),void 0!==e.m_isLockScale&&(t.lockScale=e.m_isLockScale),void 0!==e.m_isInverted&&this._properties.isInverted.setValue(e.m_isInverted),void 0!==e.m_height&&this.setHeight(Math.max(0,e.m_height)),this.setMode(t),i?(i instanceof h||(i=new h(i)),this.setPriceRange(i,!0)):this.m_priceRange=null,void 0!==e.m_topMargin&&(this.m_topMargin=e.m_topMargin),void 0!==e.m_bottomMargin&&(this.m_bottomMargin=e.m_bottomMargin),void 0!==e.alignLabels&&this._properties.alignLabels.setValue(e.alignLabels),this._mainSource=void 0,this._scaleSeriesOnly=!1},o.prototype.mainSource=function(){var e,t;if(void 0!==this._mainSource)return this._mainSource;for(e=void 0,t=0;t<this.m_dataSources.length;t++){if(TradingView.isInherited(this.m_dataSources[t].constructor,l)){e=this.m_dataSources[t];break}!e&&this.m_dataSources[t]instanceof a&&(e=this.m_dataSources[t])}return this._mainSource=e,this._mainSource||null},o.prototype.formatter=function(){return this._formatter||this.updateFormatter(),this._formatter},o.prototype.formatPrice=function(e,t){return this.isPercentage()?e=g(e,t):this.isIndexedTo100()&&(e=b(e,t)),this.formatter().format(e)},o.prototype.formatPriceAbsolute=function(e){return this._mainSourceFormatter().format(e)},o.prototype.formatPricePercentage=function(e,t){return e=g(e,t),T.format(e)},o.prototype.updateFormatter=function(){var e,t;this._marksCache=null,t=100,(e=this.mainSource())&&(t=e.base()),this._formatter=null,this.isPercentage()?(this._formatter=T,t=100):this.isIndexedTo100()?(this._formatter=new c(100,1),t=100):this._formatter=e?e.formatter():x,this.m_markBuilder=new f(this,t,this._coordinateToLogicalFunc,this._logicalToCoordinateFunc),this.m_markBuilder.rebuildTickMarks()},o.prototype._onIsInvertedChanged=function(){this._marksCache=null,this.m_markBuilder.rebuildTickMarks()},o.prototype._mainSourceFormatter=function(){return this.mainSource().formatter()||x},o.prototype._recalculateSourcesForAutoscale=function(){var e,t;this._mainSource&&(this._scaleSeriesOnly=this._scalesProperties.scaleSeriesOnly.value()),e=this._scaleSeriesOnly&&this._hasSeries,t=function(t){
return!!(t.properties().visible.value()||t instanceof l)&&(e?TradingView.isInherited(t.constructor,l):t instanceof a)},this._sourcesForAutoscale=this.m_dataSources.filter(t)},o.prototype.sourcesForAutoscale=function(){return this._mainSource&&this._scaleSeriesOnly!==this._scalesProperties.scaleSeriesOnly.value()&&(this._sourcesForAutoscale=null),this._sourcesForAutoscale||this._recalculateSourcesForAutoscale(),this._sourcesForAutoscale},o.prototype.recalculatePriceRange=function(e){this._invalidatedForRange={visibleBars:e,isValid:!1}},o.prototype.makeSureItIsValid=function(){this._invalidatedForRange.isValid||(this._invalidatedForRange.isValid=!0,this.recalculatePriceRangeImpl())},o.prototype.recalculatePriceRangeImpl=function(){var e,t,i,n,o,r,s,a,l,c,u,d,p=this._invalidatedForRange.visibleBars;if(null!==p){for(e=null,t=this.sourcesForAutoscale(),i=this.isPercentage(),n=this.isIndexedTo100(),o=0,r=0,s=0;s<t.length;s++)(a=t[s]).properties().visible.value()&&(l=p.firstBar(),c=p.lastBar(),(d=(u=a.autoScaleInfo(l,c)).range)&&(i?d=v(d,a.firstValue()):n&&(d=w(d,a.firstValue())),e=null===e?d:e.merge(d)),void 0!==u.topPixelMargin&&(o=Math.max(o,u.topPixelMargin)),void 0!==u.bottomPixelMargin&&(r=Math.max(r,u.bottomPixelMargin)));(Math.abs(o-this._topPixelMargin)>0||Math.abs(r-this._bottomPixelMargin)>0)&&(this._bottomPixelMargin=r,this._topPixelMargin=o,this._marksCache=null,this._invalidateInternalHeightCache()),e?(e.minValue()===e.maxValue()&&(e=new h(e.minValue()-.5,e.maxValue()+.5)),this.setPriceRange(e)):this.m_priceRange||this.setPriceRange(new h(-.5,.5)),this._invalidatedForRange.isValid=!0}},o.prototype.sourcesToUpdateViews=function(){var e,t;if(!this._sourcesToUpdateViews)for(this._sourcesToUpdateViews=[],e=0;e<this.m_dataSources.length;e++)t=this.m_dataSources[e],TradingView.isInherited(t.constructor,s)&&!t.isActualSymbol()||this._sourcesToUpdateViews.push(t);return this._sourcesToUpdateViews},o.prototype.updatePaneViews=function(){var e,t=this.sourcesToUpdateViews();for(e=0;e<t.length;e++)t[e].updateAllViews()},o.prototype.canDetachSource=function(e){return this.m_dataSources.some(function(t){return t!==e&&t instanceof a&&!(_(t)&&t.isLinkedToSeries())})},t.PriceScale=o}).call(this,i("tc+8"),i("aIyQ"))},"1mZ4":function(e,t,i){"use strict";function n(e){this._data=e}function o(e,t){this._data=e,this._model=t,this.radius=this._data.radius||o.OUTER_RADIUS}function r(e,t,i,n){var o=i+n/2;_(e,t.x-o,t.y-o,2*o,2*o,(i+n)/2),e.closePath(),e.lineWidth=n*window.devicePixelRatio}function s(e,t,i,n){e.globalAlpha=.2,r(e,t,i,n),e.stroke(),e.globalAlpha=1}function a(e,t,i,n){r(e,t,i-n,n),e.fill(),e.stroke()}function l(e,t,i,n){e.globalAlpha=.2,e.beginPath(),e.arc(t.x,t.y,i+n/2,0,2*Math.PI,!0),e.closePath(),e.lineWidth=n*window.devicePixelRatio,e.stroke(),e.globalAlpha=1}function c(e,t,i,n){e.beginPath(),e.arc(t.x,t.y,i-n/2,0,2*Math.PI,!0),e.closePath(),e.lineWidth=n*window.devicePixelRatio,e.fill(),e.stroke()}function u(e){n.call(this,e)}
var h=i("VdBB").HitTestResult,d=i("6a0U").PaneRendererArrowsUpDown,p=i("f6yo").pointInBox,_=i("jFln").drawRoundRect;i("qFKp"),n.RADIUS=3.5,n.prototype.tolerance=2,n.prototype.setData=function(e){this._data=e},n.prototype.draw=function(e){var t,i,n,o;if(this._data)for(e.strokeStyle="#1E88E5",e.fillStyle=this._data.bgColor,t=this._data.vertOffset||0,i=0;i<this._data.points.length;i++)n=this._data.points[i],void 0===(o=n).x||TradingView.isNaN(o.x)||null===o.x||void 0===o.y||TradingView.isNaN(o.y)||null===o.y||this._drawMarker(e,n,t)},n.prototype._drawMarker=function(e,t,i){var o=n.RADIUS+.5+.75;e.beginPath(),e.arc(t.x+.5,t.y+.5+i,o,0,2*Math.PI,!0),e.closePath(),e.fill(),e.beginPath(),e.arc(t.x+.5,t.y+.5+i,n.RADIUS,0,2*Math.PI,!0),e.closePath(),e.lineWidth=window.devicePixelRatio,e.fill(),e.stroke()},n.prototype.hitTest=function(e){var t,i;if(!this._data)return null;for(t=0;t<this._data.points.length;t++)if((i=this._data.points[t]).subtract(e).length()<=n.RADIUS+this.tolerance)return new h(this._data.hittestResult,i.data);return null},n.prototype.doesIntersectWithBox=function(e){return!!this._data&&this._data.points.some(function(t){return p(t,e)})},o.OUTER_RADIUS=TradingView.isMobile.any()?16:8,o.prototype.tolerance=2,o.prototype._drawPoints=function(e,t,i,n){var o,r,s,a,l,c=this._data.currentPoint;for(o=0;o<t.length;o++)r=t[o],s=TradingView.isInteger(r.data)&&this._data.linePointBeingEdited===r.data,a=this.radius,l=r.subtract(c).length()<=a+this.tolerance,s||(i(e,r,a,this._data.strokeWidth||2),l&&n(e,r,a,this._data.selectedStrokeWidth))},o.prototype.draw=function(e){var t=this._data.points.filter(function(e){return!!e.square}),i=this._data.points.filter(function(e){return!e.square});t.length&&(e.fillStyle=this._data.backgroundColor,e.strokeStyle=this._data.color,this._drawPoints(e,t,a,s)),i.length&&(e.fillStyle=this._data.backgroundColor,e.strokeStyle=this._data.color,this._drawPoints(e,i,c,l))},o.prototype.hitTest=function(e){var t,i;for(t=0;t<this._data.points.length;t++)if((i=this._data.points[t]).subtract(e).length()<=this.radius+this.tolerance)return new h(this._data.hittestResult,i.data);return null},o.prototype.doesIntersectWithBox=function(e){return this._data.points.some(function(t){return p(t,e)})},inherit(u,n),u.prototype._drawMarker=function(e,t,i){var o=t.isUp?1:-1,r=d.prototype._calculateVerticalOffset(this._data.barSpacing),s=d.prototype._calculateMinHeight(this._data.barSpacing),a=i+o*r+o*s;e.beginPath(),e.arc(t.x+.5,t.y+.5+a,n.RADIUS,0,2*Math.PI,!0),e.closePath(),e.fill(),e.stroke()},t.SelectionRenderer=n,t.LineAnchor=o,t.SelectionRendererArrowsUpDown=u},"1pHB":function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><g fill="none" fill-rule="evenodd" transform="translate(4 5)"><circle stroke="currentColor" cx="9.5" cy="9.5" r="9"/><path stroke="currentColor" d="M7 14.5h2.5v-5H7"/><path stroke="currentColor" stroke-linecap="square" d="M9.5 14.5h2"/><path fill="currentColor" d="M9.5 7a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3z"/></g></svg>'},"2+aH":function(e,t,i){"use strict"
;(function(e){function n(t,i,n){var o,r,s,d,p,_;n=n||{},n=Object.assign({},y,n),o=this,u.call(this),this._properties=i,this._model=t,this._dataWindowView=new a(t),this._priceAxisViews=new Map,this._startMeasurePriceAxisViews=new Map,this._endMeasurePriceAxisViews=new Map,r=function(e,t){return function(i){var n,o=t(),r=e();return i===this.pane.defaultPriceScale()?{price:r,coordinate:o}:(n=i.mainSource().firstValue(),{price:i.coordinateToPrice(o,n),coordinate:o})}.bind(this)}.bind(this),s=function(e,t){return function(){return{time:this._model.timeScale().indexToUserTime(e()),coordinate:t()}}.bind(this)}.bind(this),this._currentPosPriceProvider=r(function(){return this.price}.bind(this),function(){return this.y}.bind(this)),this._startMeasurePriceProvider=r(function(){return this._startMeasurePoint.price}.bind(this),function(){return this._startMeasurePoint.y}.bind(this)),this._endMeasurePriceProvider=r(function(){return this._endMeasurePoint.price}.bind(this),function(){return this._endMeasurePoint.y}.bind(this)),d=s(function(){return this.appliedIndex()}.bind(this),function(){return this.appliedX()}.bind(this)),p=s(function(){return this._startMeasurePoint.index}.bind(this),function(){return this._startMeasurePoint.x}.bind(this)),_=s(function(){return this._endMeasurePoint.index}.bind(this),function(){return this._endMeasurePoint.x}.bind(this)),this._timeAxisView=new l(t,d),this._startMeasureTimeAxisView=new l(t,p),this._endMeasureTimeAxisView=new l(t,_),this._selectionRect=null,this._selectionPane=null,this.visible=!0,t.readOnly()?this.areLinesVisible=!0:h.cursorTool.subscribe(function(e){o.areLinesVisible="arrow"!==e},{callWithLast:!0}),this._movedDelegate=new e,this._subscribed=!1,this._linesShouldBeHidden=this._model.readOnly(),this._selectBarMode=new m(!1),this._barSelectedDelegate=new e,this._isOnHoveredChartWidget=!1,this._selectionView=new c(this)}function o(e,t,i){this.source=e,this.pane=t,this._axis=i||"x"}var r=i("aO4+").Point,s=(i("CW80").isLineToolName,i("KEYX").CrossHairPriceAxisView),a=i("vdSZ").CrosshairDataWindowView,l=i("Hm6r").CrosshairTimeAxisView,c=i("r813").CrosshairSelectionPaneView,u=i("fgLi").DataSource,h=i("mMWL"),d=i("N7ud").PaneRendererCrossHairLock,p=i("ogJP").isNaN,_=i("ZJ1Q").CrosshairPaneView,f=i("dLzo").CrossHairMeasurePaneView,m=i("hY0g"),y={menuEnabled:!1,menuForMainSourceOnly:!1};inherit(n,u),n.prototype.index=0,n.prototype.price=NaN,n.prototype.pane=null,n.prototype.color="white",n.prototype.style="",n.prototype.customization={disableSelection:!0},n.prototype.model=function(){return this._model},n.prototype.properties=function(){return this._properties},n.prototype.moved=function(){return this._movedDelegate},n.prototype.originX=function(){return this._originX},n.prototype.originY=function(){return this._originY},n.prototype.saveOriginCoord=function(e,t){this._originX=e,this._originY=t},n.prototype.originCoordX=function(){return this._originX},n.prototype.originCoordY=function(){return this._originY},n.prototype.clearOriginCoord=function(){this._originX=NaN,this._originY=NaN},
n.prototype.setPosition=function(e,t,i){this._subscribed||(this._model.mainSeries().onRestarted().subscribe(this,n.prototype.clearMeasure),this._subscribed=!0),this.setLockedPosition(i),this.visible=!0,this._tryToUpdateViews(e,t,i)},n.prototype.startSelection=function(e){this._selectionStartPoint=this.currentLogicalPoint(),this._selectionPane=e},n.prototype.clearSelection=function(){this._selectionStartPoint=null,this._selectionPane=null},n.prototype.selection=function(){return this._selectionStartPoint?{p1:this._selectionStartPoint,p2:this.currentLogicalPoint()}:null},n.prototype.selectionPane=function(){return this._selectionPane},n.prototype.update=function(){var e,t,i,n,o,r;this.visible?(e=this._priceScaleByPane(this.pane),t=this._originX||this.x,i=this._originY||this.y,n=this._model.timeScale().coordinateToIndex(t),o=NaN,null!==e&&(r=this.pane.mainDataSource().firstValue(),o=e.coordinateToPrice(i,r)),this._tryToUpdateViews(n,o,this.pane)):this._setIndexToLastSeriesBarIndex()},n.prototype._priceScaleByPane=function(e){return e&&!e.defaultPriceScale().isEmpty()?e.defaultPriceScale():null},n.prototype._tryToUpdateViews=function(e,t,i){this._tryToUpdateData(e,t,i)&&(this.updateAllViews(),this._movedDelegate.fire({time:this._model.timeScale().points().roughTime(this.index),price:this.price}))},n.prototype._tryToUpdateData=function(e,t,i){var n,o=this.x,r=this.y,s=this.price,a=this.index,l=this.pane,c=this._priceScaleByPane(i);return this.index=e,this.x=p(e)?NaN:this._model.timeScale().indexToCoordinate(e),null!==c?(this.pane=i,this.price=t,n=i.mainDataSource().firstValue(),this.y=c.priceToCoordinate(t,n)):(this.pane=null,this.price=NaN,this.y=NaN),o!==this.x||r!==this.y||a!==this.index||s!==this.price||l!==this.pane},n.prototype.setLockedPosition=function(e){delete this.lockedIndex,delete this.lockedX,e!==this._measurePane&&h.lockTimeAxis().value()&&(this.lockedIndex=this._model.timeScale().points().roughIndex(h.lockTimeAxisTime.value()),this.lockedX=this._model.timeScale().indexToCoordinate(this.lockedIndex))},n.prototype.clearPosition=function(){this.visible=!1,this._setIndexToLastSeriesBarIndex(),this.price=NaN,this.x=NaN,this.y=NaN,this.pane=null,this.clearOriginCoord()},n.prototype._setIndexToLastSeriesBarIndex=function(){var e=this._model.mainSeries().bars().lastIndex();this.index=null!==e?e:NaN},n.prototype.measureStartY=function(){var e=this._startMeasurePoint.price,t=this._measurePane,i=t.mainDataSource().firstValue();return t.defaultPriceScale().priceToCoordinate(e,i)},n.prototype.measureStartX=function(){return this._model.timeScale().indexToCoordinate(this._startMeasurePoint.index)},n.prototype.measureEndY=function(){var e=this._endMeasurePoint.price,t=this._measurePane,i=t.mainDataSource().firstValue();return t.defaultPriceScale().priceToCoordinate(e,i)},n.prototype.measureEndX=function(){return this._model.timeScale().indexToCoordinate(this._endMeasurePoint.index)},n.prototype.paneViews=function(e){var t=this._selectBarMode.value()&&this._isOnHoveredChartWidget,i=e===this.pane&&!t,n=[new _(this,e,i)]
;return e===this._selectionPane&&n.push(this._selectionView),e===this._measurePane&&(this._measurePaneView||(this._measurePaneView=new f(this,e)),this._measurePaneView.update(),n.push(this._measurePaneView)),h.lockTimeAxis().value()&&n.push(this._timeLockPaneView=this._timeLockPaneView||new o(this,e)),n},n.prototype.dataWindowView=function(){return this._dataWindowView},n.prototype._createPriceAxisViewOnDemand=function(e,t,i){var n=e.get(t);return void 0===n&&(n=new s(this,t,i),e.set(t,n)),n},n.prototype.priceAxisViews=function(e,t){var i;return!this._linesShouldBeHidden&&this.visible&&this.pane===e||(this._priceAxisViews.clear(),this._startMeasurePriceAxisViews.clear(),this._endMeasurePriceAxisViews.clear()),i=[],this._selectBarMode.value()&&this._isOnHoveredChartWidget||this.pane!==e||i.push(this._createPriceAxisViewOnDemand(this._priceAxisViews,t,this._currentPosPriceProvider)),this._startMeasurePoint&&i.push(this._createPriceAxisViewOnDemand(this._startMeasurePriceAxisViews,t,this._startMeasurePriceProvider)),this._endMeasurePoint&&i.push(this._createPriceAxisViewOnDemand(this._endMeasurePriceAxisViews,t,this._endMeasurePriceProvider)),i},n.prototype.timeAxisView=function(){if(this._linesShouldBeHidden||!this.visible&&!h.lockTimeAxis().value())return null;var e=[this._timeAxisView];return this._startMeasurePoint&&e.push(this._startMeasureTimeAxisView),this._endMeasurePoint&&e.push(this._endMeasureTimeAxisView),e},n.prototype.updateAllViews=function(){this._priceAxisViews.forEach(function(e){e.update()}),this._startMeasurePoint&&(this._startMeasurePriceAxisViews.forEach(function(e){e.update()}),this._startMeasureTimeAxisView.update()),this._endMeasurePoint&&(this._endMeasurePriceAxisViews.forEach(function(e){e.update()}),this._endMeasureTimeAxisView.update()),this._timeAxisView.update(),this._selectionView.update(),this._dataWindowView.update()},n.prototype.startMeasurePoint=function(){return this._startMeasurePoint||null},n.prototype.startMeasuring=function(e,t){this._startMeasurePoint=e,this._measurePane=t},n.prototype.finishMeasure=function(e){this._endMeasurePoint=e},n.prototype.endMeasurePoint=function(){return this._endMeasurePoint||null},n.prototype.measurePane=function(){return this._measurePane||null},n.prototype.clearMeasure=function(e){delete this._measurePane,delete this._startMeasurePoint,delete this._endMeasurePoint,delete this._lastValidMeasurePoint,this._model.lightUpdate()},n.prototype.measurePoints=function(){this.updateAllViews();var e=[this._startMeasurePoint];return this._endMeasurePoint?e.push(this._endMeasurePoint):(this._measurePane===this.pane&&(this._lastValidMeasurePoint={x:this.x,y:this.y,rawPrice:this.price,price:this.price,index:this.index}),this._lastValidMeasurePoint&&e.push(this._lastValidMeasurePoint)),e},n.prototype.lastValidMeasurePoint=function(){return this._lastValidMeasurePoint||null},n.prototype.currentLogicalPoint=function(){return{index:this.appliedIndex(),price:this.price}},n.prototype.currentPoint=function(){return new r(this.x,this.y)},
n.prototype.appliedIndex=function(){return isFinite(this.lockedIndex)&&this.lockedIndex||this.index},n.prototype.appliedX=function(){return isFinite(this.lockedX)&&this.lockedX||this.x},n.prototype.selectBarMode=function(){return this._selectBarMode},n.prototype.toggleSelectBarMode=function(){this._setSelectBarModeState(!this._selectBarMode.value())},n.prototype.onBarSelected=function(){return this._barSelectedDelegate},n.prototype._setSelectBarModeState=function(e){this._selectBarMode.setValue(e),this._model.lightUpdate()},n.prototype.trySelectCurrentBar=function(){var e,t=this._model.mainSeries().bars();t.contains(this.index)&&null!==(e=this._model.timeScale().indexToTimePoint(this.index))&&(this._setSelectBarModeState(!1),this._barSelectedDelegate.fire(e))},n.prototype.handleContextMenuEvent=function(){this._selectBarMode.value()&&this._setSelectBarModeState(!1)},n.prototype.setOnHoveredChartWidget=function(e){this._isOnHoveredChartWidget=e},n.prototype.isOnHoveredChartWidget=function(){return this._isOnHoveredChartWidget},n.prototype.setLinesShouldBeHidden=function(e){this._linesShouldBeHidden=e},n.prototype.linesShouldBeHidden=function(){return this._linesShouldBeHidden},o.prototype.update=function(){},o.prototype.renderer=function(){var e,t,i,n,o=this.source.visible&&this.source.areLinesVisible,r=h.lockTimeAxis().value(),s=o&&this._horzVisible,a=o||r;if(("y"!==this._axis||s)&&a)return e=9,t=11,i="y"===this._axis?this.pane.width()-e/2:this.source.lockedX+1,n="y"===this._axis?this.source.y:this.pane.height()-t/2-1,new d({x:i,y:n,width:e,height:t,bodyHeight:7})},t.CrossHair=n}).call(this,i("aIyQ"))},"22xp":function(e,t,i){"use strict";var n,o,r,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P,C,T,x,I,L,M,A,k,E,O,D;i.r(t),n=i("mrSG"),o=i("Eyy1"),i("YFKU"),r=i("j1f4"),s=i("uOxu"),a=i("beCu"),l=i("aIyQ"),c=i.n(l),u=i("Kxc7"),h=i("Hr11"),d=i("ogJP"),p=i("ZJKN"),_=function(){function e(e,t){Object(o.assert)(e<=t,"The left value should be greater than or equal to the right value"),this._left=e,this._right=t}return e.prototype.left=function(){return this._left},e.prototype.right=function(){return this._right},e.prototype.length=function(){return this._right-this._left+1},e.prototype.contains=function(e){return this._left<=e&&e<=this._right},e.prototype.equals=function(e){return this._left===e.left()&&this._right===e.right()},e.compare=function(e,t){return null===e||null===t?e===t:e.equals(t)},e}(),f=Object(s.getLogger)("Chart.TimePoints"),m=function(){function e(){this._zoffset=0,this._items=[]}return e.prototype.clear=function(){this._zoffset=0,this._items=[]},e.prototype.size=function(){return this._items.length},e.prototype.firstIndex=function(){return this._offsetToIndex(0)},e.prototype.lastIndex=function(){return this._offsetToIndex(this._items.length-1)},e.prototype.merge=function(e,t,i){var n,o,r,s,a,l,c,u;if(0===i.length)return f.logError("merge: 'values' does not contain any time points"),[]
;if(t>this._zoffset&&e+t>0)return f.logError("merge: when the first time point index is updated, we should fill the time points starting from the first one"),[];if(0===this._items.length)return this._items=i,this._zoffset=t,[{change:"rebuild",index:this._validOffsetToIndex(0)}];if((n=e+this._zoffset)<0){if(o=Math.abs(n),i.length<o)return f.logError("merge: 'values' does not contain enough time points to fill in the new items. 'index': "+e.toString()+", previous 'zoffset': "+this._zoffset.toString()+", new 'zoffset': "+t.toString()+", 'values.length': "+i.length),[];for(this._items=new Array(o).concat(this._items),this._zoffset=t,r=0;r<i.length;++r)this._items[e+r+t]=i[r];return[{change:"rebuild",index:this._validOffsetToIndex(0)}]}for(s=[],a=n;a<this._items.length&&a-n<i.length;++a)this._items[a]=i[a-n],s.push({change:"update",index:this._validOffsetToIndex(a),value:i[a-n]});if((l=n+i.length)>this._items.length)for(o=l-this._items.length,c=a;c<a+o;++c)u=this._items.length,this._items.push(i[c-n]),s.push({change:"append",index:this._validOffsetToIndex(u),value:i[c-n]});return this._zoffset=t,s},e.prototype.addTail=function(e,t){for(var i=t?1:0;i<e.length;i++)this._items.push(e[i])},e.prototype.remove=function(e){var t,i,n,o=this._indexToOffset(e);if(null===o)return[];for(t=this._items.splice(o),i=[],n=0;n<t.length;n++)i.push({change:"remove",index:e+n,value:t[n]});return i},e.prototype.valueAt=function(e){var t=this._indexToOffset(e);return null!==t?this._items[t]:null},e.prototype.indexOf=function(e,t){if(this._items.length<1)return null;if(e>this._items[this._items.length-1])return t?this._validOffsetToIndex(this._items.length-1):null;for(var i=0;i<this._items.length;++i){if(e===this._items[i])return this._validOffsetToIndex(i);if(e<this._items[i])return t?this._validOffsetToIndex(i):null}return null},e.prototype.state=function(){return{items:this._items,zoffset:this._zoffset}},e.prototype.restoreState=function(e){null!==e&&(this._items=e.items,this._zoffset=e.zoffset)},e.prototype.roughTime=function(e,t){var i,n,o,r,s,a,l,c,u,h;return void 0===t&&(t=null),null!==(i=this.valueAt(e))?i:!(n=this._items).length||n.length<2?null:(o=0,r=n.length-1,s=this._validOffsetToIndex(o),a=this._validOffsetToIndex(r),l=n[o],u=((c=n[r])-l)/(a-s),e<s?l-(h=s-e)*u:e>a?(h=e-a)<500&&null!=t?t(c,h):c+h*u:null)},e.prototype.roughIndex=function(e,t){var i,n,o,r,s,a,l,c,u,h,d,p;return void 0===t&&(t=null),!(i=this._items).length||i.length<2?null:(n=0,o=i.length-1,r=this._validOffsetToIndex(n),s=this._validOffsetToIndex(o),a=i[n],l=i[o],e>=a&&e<=l?this.closestIndexLeft(e):(c=(l-a)/(s-r),e<a?(u=a-e,r-(h=Math.round(u/c))):(d=500,e>l?(u=e-l,(h=Math.trunc(u/c))<d&&null!==t&&(p=t(l,e)).success&&(h=p.result),s+h):null)))},e.prototype.closestIndexLeft=function(e){var t,i,n,o,r,s=this._items;if(!s.length)return null;if(Number.isNaN(e))return null;if(e>=s[t=s.length-1])return this._validOffsetToIndex(t);if(e<(n=s[i=0]))return null;if(e===n)return this._validOffsetToIndex(i);for(;t>i+1;)if((r=s[o=i+t>>1])>e)t=o;else{
if(!(r<e))return r===e?this._validOffsetToIndex(o):null;i=o}return this._validOffsetToIndex(i)},e.prototype._validOffsetToIndex=function(e){return e-this._zoffset},e.prototype._offsetToIndex=function(e){return 0<=e&&e<this.size()?this._validOffsetToIndex(e):null},e.prototype._indexToOffset=function(e){var t=e+this._zoffset;return 0<=t&&t<this.size()?t:null},e}(),y=i("tc+8"),g=i.n(y),v=new Map([[0,.1],[11,.1],[1,.35],[9,.35],[12,.35],[8,.35]]),S=function(){function e(e,t){this._styleSpecificRanges=new Map,this._logicalRange=e,this._defaultStyle=t}return e.prototype.strictRange=function(e){var t,i;return null===this._logicalRange?null:(void 0===e&&(e=this._defaultStyle),void 0===(t=this._styleSpecificRanges.get(e))&&(i=(v.get(e)||0)/2,t=new p.BarsRange(Math.ceil(this._logicalRange.left()+i),Math.ceil(this._logicalRange.right()-i)),this._styleSpecificRanges.set(e,t)),t)},e.prototype.logicalRange=function(){return this._logicalRange},e.prototype.isValid=function(){return null!==this._logicalRange},e.invalid=function(){return new e(null,1)},e}(),b=i("Ocx9"),w=i("GhVi"),P=i("8OdW"),C=function(){function e(e,t){void 0===t&&(t=50),this._actualSize=0,this._usageTick=1,this._oldestTick=1,this._cache=new Map,this._tick2Labels=new Map,this._format=e,this._maxSize=t}return e.prototype.format=function(e){var t,i,n=this._cache.get(e.valueOf());return void 0!==n?n.string:(this._actualSize===this._maxSize&&(t=this._tick2Labels.get(this._oldestTick),this._tick2Labels.delete(this._oldestTick),this._cache.delete(Object(o.ensureDefined)(t)),this._oldestTick++,this._actualSize--),i=this._format(e),this._cache.set(e.valueOf(),{string:i,tick:this._usageTick}),this._tick2Labels.set(this._usageTick,e.valueOf()),this._actualSize++,this._usageTick++,i)},e}(),T=i("kcTO"),i.d(t,"TimeScale",function(){return D}),x={preserveBarSpacing:!1,lockVisibleTimeRangeOnResize:!1,rightBarStaysOnScroll:!0},I=u.enabled("low_density_bars"),L=50,M=u.enabled("high_density_bars")?.025:.5,A=I?1:5,k=Object(s.getLogger)("Chart.TimeScale"),E=new Map([[0,.9],[11,.9],[1,.8],[9,.8],[12,.8],[8,.8]]),D=function(){function e(e,t){var i=this;this._width=0,this._widthChanged=new c.a,this._rightOffset=10,this._maxRightOffsetChanged=new c.a,this._defaultRightOffsetProperty=new g.a(10),this._baseIndex=null,this._leftEdgeIndex=null,this._barSpacingChanged=new c.a,this._barSpacing=6,this._visibleBars=S.invalid(),this._visibleBarsInvalidated=!0,this._visibleBarsChanged=new c.a,this._logicalRangeChanged=new c.a,this._points=new m,this._tickMarks=new w.Tickmarks,this._onScroll=new c.a,this._resetDelegate=new c.a,this._scrollStartPoint=null,this._scaleStartPoint=null,this._commonTransitionStartState=null,this._formattedBySpan=new Map,this._options=Object(n.__assign)(Object(n.__assign)({},x),t),this._model=e,this._scalesProperties=e.properties().scalesProperties,this._defaultRightOffsetProperty.listeners().subscribe(this,function(e){i.setRightOffset(e.value())}),this._options.preserveBarSpacing&&(this._barSpacing=this._scalesProperties.childs().barSpacing.value()||6),
this._model.mainSeries().onStyleChanged().subscribe(this,this._invalidateVisibleBars),this._barSpacingChanged.subscribe(this,this._maxRightOffsetOnChanged),this._widthChanged.subscribe(this,this._maxRightOffsetOnChanged)}return e.prototype.destroy=function(){this._model.mainSeries().onStyleChanged().unsubscribe(this,this._invalidateVisibleBars),this._barSpacingChanged.destroy(),this._widthChanged.destroy()},e.prototype.isEmpty=function(){return 0===this._width||0===this._points.size()},e.prototype.update=function(e,t,i,n){this._visibleBarsInvalidated=!0,i.length>0&&this._points.merge(e,t,i),this._tickMarks.merge(n),this._correctOffset()},e.prototype.addTail=function(e,t,i){var n,r,s;for(this._tickMarks.removeTail(t),n=e.params,r=Object(o.ensureDefined)(this._tickMarks.maxIndex)+(i?0:1),s=0;s<n.marks.length;s++)n.marks[s].index=r+s;this._tickMarks.addTail(n.marks),this._points.addTail(n.changes,i),this._rightOffset-=n.changes.length},e.prototype.state=function(e){var t={m_barSpacing:this.barSpacing(),m_rightOffset:e?this._rightOffset:this._defaultRightOffsetProperty.value()};return e&&(t.points=this._points.state(),t.tickmarks=this._tickMarks.state(),t.width=this._width),t},e.prototype.restoreState=function(e,t){var i,n,o;void 0!==e.m_barSpacing&&void 0!==e.m_rightOffset?(i=e.m_barSpacing,o=(n=e.m_rightOffset<0&&!t?this.rightOffsetDefaultValue():e.m_rightOffset)<0?this.rightOffsetDefaultValue():Math.round(n),this._defaultRightOffsetProperty.setValue(o),this._rightOffset=n,t&&(this._points.restoreState(e.points||null),this._tickMarks.restoreState(e.tickmarks||null),e.width&&this._width>0&&(i*=this._width/e.width)),this._tryToUpdateBarSpacing(this._barSpacing,i),this._correctOffset()):k.logDebug("restoreState: invalid state")},e.prototype.marks=function(){var e,t,i,n,r,s,a,l,c,u,h;if(this.isEmpty())return null;for(e=this._barSpacing,t=5*((this._scalesProperties.childs().fontSize.value()||0)+4),i=Math.round(t/e),n=Object(o.ensureNotNull)(this.visibleBarsStrictRange()),r=Math.max(n.firstBar(),n.firstBar()-i),s=Math.max(n.lastBar(),n.lastBar()-i),a=[],l=0,c=this._tickMarks.build(e,t);l<c.length;l++)r<=(u=c[l]).index&&u.index<=s&&null!==(h=this._tickMarks.indexToTime(u.index))&&a.push({coord:this.indexToCoordinate(u.index),label:this.formatLabel(h,u.span),span:u.span,major:u.label>=P.DAY_SPAN});return a},e.prototype.visibleBarsStrictRange=function(){return this._visibleBarsInvalidated&&(this._visibleBarsInvalidated=!1,this._updateVisibleBars()),this._visibleBars.strictRange()},e.prototype.visibleBarsStrictRangeChanged=function(){return this._visibleBarsChanged},e.prototype.logicalRangeChanged=function(){return this._logicalRangeChanged},e.prototype.tickMarks=function(){return this._tickMarks},e.prototype.points=function(){return this._points},e.prototype.width=function(){return this._width},e.prototype.setWidth=function(e){var t,i;!Number.isFinite(e)||e<=0?k.logWarn("setWidth: invalid argument: "+e):this._width!==e&&(this._visibleBarsInvalidated=!0,
this._options.lockVisibleTimeRangeOnResize&&this._width&&(t=this._barSpacing*e/this._width,this._tryToUpdateBarSpacing(this._barSpacing,t)),null!==this._leftEdgeIndex&&Object(o.ensureNotNull)(this.visibleBarsStrictRange()).firstBar()<=this._leftEdgeIndex&&(i=this._width-e,this._rightOffset-=Math.round(i/this._barSpacing)+1),this._width=e,this._widthChanged.fire(e),this._correctOffset())},e.prototype.setLeftEdgeFix=function(e){var t,i,n;this._leftEdgeIndex=e,null!==(t=this.visibleBarsStrictRange())&&(i=t.firstBar()-e)<0&&(n=this._rightOffset-i-1,this.scrollToOffsetAnimated(n,500))},e.prototype.indexToCoordinate=function(e,t){var i,n;return this.isEmpty()?0:Object(d.isInteger)(e)?(i=this.baseIndex()+this._rightOffset-e,n=this._width-(i+.5)*this._barSpacing,t?n:Math.round(n)):0},e.prototype.indexToUserTime=function(e){return this._tickMarks.indexToTime(e)},e.prototype.timePointToIndex=function(e){return this._points.indexOf(e,!0)},e.prototype.indexToTimePoint=function(e){return this._points.valueAt(e)},e.prototype.timeToCoordinate=function(e){var t,i,n,r,s,a,l=this._points.closestIndexLeft(e);return null===l?null:(t=Object(o.ensureNotNull)(this._points.valueAt(l)),(i=this.indexToCoordinate(l,!0))<=0||i>=this._width?null:(n=this.barSpacing(),r=this.baseIndex(),s=Object(o.ensureNotNull)(this._points.valueAt(r))-Object(o.ensureNotNull)(this._points.valueAt(r-1)),(a=Math.round(i+(e-t)/s*n)+1)<=0||a>=this._width?null:a))},e.prototype.barIndexesToCoordinates=function(e){var t,i,n,o,r,s,a=this.baseIndex();for(t=0,i=e;t<i.length;t++)o=(n=i[t]).time,r=a+this._rightOffset-o,s=this._width-(r+.5)*this._barSpacing,n.time=Math.round(s),n.exactTime=s},e.prototype.indexesToCoordinates=function(e){var t,i,n,o,r=this.baseIndex(),s=r+this._rightOffset,a=this._width-s*this._barSpacing-.5*this._barSpacing;for(t=0,i=e;t<i.length;t++)o=a+(n=i[t]).x*this._barSpacing,n.x=Math.round(o)},e.prototype.rightOffsetForTimePoint=function(e){var t=this.timeToCoordinate(e);return null===t?null:this._rightOffsetForCoordinate(t)},e.prototype.scrollToRealtime=function(e,t){var i,n,o,s=this,l=this._defaultRightOffsetProperty.value();if(l<0&&(l=this.rightOffsetDefaultValue()),e)return i=this._rightOffset,(n=this.maxRightOffset())>0&&l>n&&(l=n),o=this._model,void Object(a.doAnimate)({from:i,to:l,duration:1e3,easing:r.easingFunc.easeInOutQuint,onComplete:t,onStep:function(e,t){s._visibleBarsInvalidated=!0,s._rightOffset=t,s._correctOffset(),o.recalculateAllPanes(),o.lightUpdate(),o.recalcVisibleRangeStudy(o.dataSources())}});this._visibleBarsInvalidated=!0,this._rightOffset=l,this._correctOffset(),void 0!==t&&t()},e.prototype.scrollToOffsetAnimated=function(e,t){var i,n,o,r,s=this;if(!isFinite(e))throw new RangeError("offset is required and must be finite number");if(i=void 0===t?400:t,!isFinite(i)||i<=0)throw new RangeError("animationDuration (optional) must be finite positive number");n=this._rightOffset,o=Date.now(),(r=function(){s._visibleBarsInvalidated=!0;var t=(Date.now()-o)/i;if(t>=1)return s._rightOffset=e,s._correctOffset(),
s._visibleBarsInvalidated=!0,s._model.recalculateAllPanes(),void s._model.lightUpdate();s._rightOffset=n+(e-n)*t,s._correctOffset(),s._model.recalculateAllPanes(),setTimeout(r,20)})()},e.prototype.defaultRightOffsetProperty=function(){return this._defaultRightOffsetProperty},e.prototype.rightOffsetDefaultValue=function(){return 10},e.prototype.barSpacing=function(){return this._barSpacing},e.prototype.setBarSpacing=function(e){Number.isFinite(e)?(e=this.getValidBarSpacing(e),this._tryToUpdateBarSpacing(this._barSpacing,e)&&(this._correctOffset(),this._options.preserveBarSpacing&&(Object(b.saveDefaultProperties)(!0),this._scalesProperties.childs().barSpacing.setValue(this._barSpacing),Object(b.saveDefaultProperties)(!1)))):k.logWarn("setBarSpacing: invalid argument: "+e)},e.prototype.barSpacingChanged=function(){return this._barSpacingChanged},e.prototype.getValidBarSpacing=function(e){return null==e&&(e=this.barSpacing()),e<this.minBarSpacing()?this.minBarSpacing():e>this.maxBarSpacing()?this.maxBarSpacing():e},e.prototype.isValidBarSpacing=function(e){return e>=this.minBarSpacing()&&e<=this.maxBarSpacing()},e.prototype.preserveBarSpacing=function(){return this._options.preserveBarSpacing},e.prototype.normalizeBarIndex=function(e){var t=0,i=0,n=this.baseIndex(),r=Object(o.ensureNotNull)(this._points.firstIndex());return e<r?(t=Object(o.ensureNotNull)(this._points.valueAt(r)),i=e-r):e>n?(t=Object(o.ensureNotNull)(this._points.valueAt(n)),i=e-n):(t=Object(o.ensureNotNull)(this._points.valueAt(e)),i=0),{time_t:t,offset:i}},e.prototype.denormalizeTimePoint=function(e){var t=this._points.indexOf(e.time_t,!1);if(null!==t)return t+e.offset},e.prototype.rightOffset=function(){return this._rightOffset},e.prototype.minRightOffset=function(){var e,t=this.points().firstIndex(),i=this._baseIndex;return null===t||null===i?null:null!==this._leftEdgeIndex?(e=this.width()/this._barSpacing,this._leftEdgeIndex-i+e-1):t-i-1+A},e.prototype.maxRightOffset=function(){return this.width()/this._barSpacing-A},e.prototype.maxRightOffsetChanged=function(){return this._maxRightOffsetChanged},e.prototype.onReset=function(){return this._resetDelegate},e.prototype.scrollStartPoint=function(){return this._scrollStartPoint},e.prototype.baseIndex=function(){return this._baseIndex||0},e.prototype.zoom=function(e,t,i){var n,o,r;Number.isFinite(e)&&Number.isFinite(t)?(n=this.coordinateToIndex(e),r=(o=this.barSpacing())+t*(o/10),this.setBarSpacing(r),(void 0!==i?!i:this._options.rightBarStaysOnScroll)||this.setRightOffset(this.rightOffset()-.5+(n-this._coordinateToFloatIndex(e)))):k.logWarn("zoom: invalid arguments: "+e+", "+t+", "+i)},e.prototype.zoomToBarsRange=function(e,t){var i,n,o;t<=e||(i=this.baseIndex(),this._rightOffset=t-i,n=E.get(this._model.mainSeries().style())||.6,o=Math.max(t-e+n,A),this.setBarSpacing(this.width()/o),this._visibleBarsInvalidated=!0)},e.prototype.coordinateToIndex=function(e){return Math.ceil(this._coordinateToFloatIndex(e))},e.prototype.canZoomIn=function(){return this.barSpacing()<this.maxBarSpacing()},
e.prototype.canZoomOut=function(){return this.barSpacing()>M},e.prototype.minBarSpacing=function(){return M},e.prototype.maxBarSpacing=function(){return I?this.width():L},e.prototype.resetRightOffset=function(){this.setRightOffset(this._defaultRightOffsetProperty.value())},e.prototype.reset=function(){this._visibleBarsInvalidated=!0,this._points=new m,this._scrollStartPoint=null,this._scaleStartPoint=null,this._clearCommonTransitionsStartState(),this._tickMarks.reset(),this._leftEdgeIndex=null,this._resetDelegate.fire()},e.prototype.setBaseIndex=function(e){Number.isFinite(e)?(this._visibleBarsInvalidated=!0,this._baseIndex=e,this._correctOffset()):k.logDebug("setBaseIndex: invalid argument: "+e)},e.prototype.setRightOffset=function(e){Number.isFinite(e)?(this._visibleBarsInvalidated=!0,this._rightOffset=e,this._correctOffset()):k.logWarn("setRightOffset: invalid argument: "+e)},e.prototype.correctBarSpacing=function(){this.isEmpty()||this.points().size()<this.width()/this.barSpacing()&&(this.setRightOffset(this._defaultRightOffsetProperty.value()),this.setBarSpacing(this.width()/(this.points().size()+this.rightOffset())))},e.prototype.logicalRange=function(){return this._visibleBarsInvalidated&&(this._visibleBarsInvalidated=!1,this._updateVisibleBars()),this._visibleBars.logicalRange()},e.prototype.restoreDefault=function(){this._visibleBarsInvalidated=!0,this.setBarSpacing(6),this.resetRightOffset()},e.prototype.restoreRightOffsetPropertyToDefault=function(){this._defaultRightOffsetProperty.setValue(this.rightOffsetDefaultValue())},e.prototype.startScale=function(e){this._scrollStartPoint&&this.endScroll(),null===this._scaleStartPoint&&null===this._commonTransitionStartState&&(this.isEmpty()||(this._scaleStartPoint=e,this._saveCommonTransitionsStartState()))},e.prototype.scaleTo=function(e){var t,i;null!==this._commonTransitionStartState&&(t=Object(h.clamp)(this._width-e,0,this._width),i=Object(h.clamp)(this._width-Object(o.ensureNotNull)(this._scaleStartPoint),0,this._width),0!==t&&0!==i&&this.setBarSpacing(this._commonTransitionStartState.barSpacing*t/i))},e.prototype.endScale=function(){null!==this._scaleStartPoint&&(this._scaleStartPoint=null,this._clearCommonTransitionsStartState())},e.prototype.startScroll=function(e){null===this._scrollStartPoint&&null===this._commonTransitionStartState&&(this.isEmpty()||(this._scrollStartPoint=e,this._saveCommonTransitionsStartState()))},e.prototype.scrollTo=function(e){if(this._visibleBarsInvalidated=!0,null!==this._scrollStartPoint){var t=(this._scrollStartPoint-e)/this.barSpacing();this._rightOffset=Object(o.ensureNotNull)(this._commonTransitionStartState).rightOffset+t,this._correctOffset(),this._onScroll.fire()}},e.prototype.endScroll=function(){null!==this._scrollStartPoint&&(this._scrollStartPoint=null,this._clearCommonTransitionsStartState())},e.prototype.formatLabel=function(e,t){var i=this,n=this._formattedBySpan.get(t);return void 0===n&&(n=new C(function(e){return i.formatLabelImpl(e,t)}),this._formattedBySpan.set(t,n)),n.format(new Date(e))},
e.prototype.formatLabelImpl=function(e,t){if(!(e&&e instanceof Date))return"incorrect time";var i=this._model.mainSeries().isDWM();return t<P.MINUTE_SPAN&&!i?Object(T.numberToStringWithLeadingZero)(e.getUTCHours(),2)+":"+Object(T.numberToStringWithLeadingZero)(e.getUTCMinutes(),2)+":"+Object(T.numberToStringWithLeadingZero)(e.getUTCSeconds(),2):t<P.DAY_SPAN&&!i?Object(T.numberToStringWithLeadingZero)(e.getUTCHours(),2)+":"+Object(T.numberToStringWithLeadingZero)(e.getUTCMinutes(),2):t<P.WEEK_SPAN?e.getUTCDate().toString():t<P.MONTH_SPAN?e.getUTCDate().toString():t<P.YEAR_SPAN?(void 0===O&&(O=[window.t("Jan"),window.t("Feb"),window.t("Mar"),window.t("Apr"),window.t("May"),window.t("Jun"),window.t("Jul"),window.t("Aug"),window.t("Sep"),window.t("Oct"),window.t("Nov"),window.t("Dec")]),O)[e.getUTCMonth()]:e.getUTCFullYear().toString()},e.prototype.onScroll=function(){return this._onScroll},e.prototype._updateVisibleBars=function(){var e,t,i,n,o=this._visibleBars;this.isEmpty()?this._visibleBars.isValid()&&(this._visibleBars=S.invalid(),this._visibleBarsChanged.fire(null,o.strictRange()),this._logicalRangeChanged.fire(null,o.logicalRange())):(e=this.baseIndex(),t=this.width()/this._barSpacing,n=(i=this._rightOffset+e)-t,Number.isFinite(n)&&Number.isFinite(i)?(this._visibleBars=new S(new _(n,i),this._model.mainSeries().style()),p.BarsRange.compare(o.strictRange(),this._visibleBars.strictRange())||this._visibleBarsChanged.fire(this._visibleBars.strictRange(),o.strictRange()),_.compare(o.logicalRange(),this._visibleBars.logicalRange())||this._logicalRangeChanged.fire(this._visibleBars.logicalRange(),o.logicalRange())):k.logWarn("updateVisibleBars error: baseIndex: "+e+", barSpacing: "+this._barSpacing+", rightOffset: "+this._rightOffset))},e.prototype._rightOffsetForCoordinate=function(e){return(this._width+1-e)/this._barSpacing},e.prototype._invalidateVisibleBars=function(){this._visibleBarsInvalidated=!0},e.prototype._correctOffset=function(){var e,t=this.maxRightOffset();this._rightOffset>t&&(this._rightOffset=t,this._visibleBarsInvalidated=!0),null!==(e=this.minRightOffset())&&this._rightOffset<e&&(this._rightOffset=e,this._visibleBarsInvalidated=!0)},e.prototype._tryToUpdateBarSpacing=function(e,t){return e!==t&&(this._visibleBarsInvalidated=!0,this._barSpacing=t,this._barSpacingChanged.fire(e,t),!0)},e.prototype._coordinateToFloatIndex=function(e){var t=this._rightOffsetForCoordinate(e),i=this.baseIndex(),n=i+this.rightOffset()-t;return Math.round(1e6*n)/1e6},e.prototype._saveCommonTransitionsStartState=function(){this._commonTransitionStartState={barSpacing:this.barSpacing(),rightOffset:this.rightOffset()}},e.prototype._clearCommonTransitionsStartState=function(){this._commonTransitionStartState=null},e.prototype._maxRightOffsetOnChanged=function(){this._maxRightOffsetChanged.fire(this.maxRightOffset())},e}()},"23IT":function(e,t,i){"use strict";function n(e){return"line"===e.type}function o(e){return"shapes"===e.type}function r(e){return"chars"===e.type}function s(e){return"arrows"===e.type}function a(e){
return"dataoffset"===e.type}function l(e){return"ohlc_open"===e.type}function c(e){return"ohlc_high"===e.type}function u(e){return"ohlc_low"===e.type}function h(e){return"ohlc_close"===e.type}function d(e){return l(e)||c(e)||u(e)||h(e)}function p(e){return"colorer"===e.type}function _(e){return"bar_colorer"===e.type}function f(e){return"bg_colorer"===e.type}function m(e){return"text_colorer"===e.type}function y(e){return"ohlc_colorer"===e.type}function g(e){return"alertcondition"===e.type}function v(e){return"ohlc_bars"===e.plottype}function S(e){return"ohlc_candles"===e.plottype}var b,w;i.r(t),i.d(t,"LineStudyPlotStyle",function(){return b}),i.d(t,"isLinePlot",function(){return n}),i.d(t,"isShapesPlot",function(){return o}),i.d(t,"isCharsPlot",function(){return r}),i.d(t,"isArrowsPlot",function(){return s}),i.d(t,"isDataOffsetPlot",function(){return a}),i.d(t,"isOhlcOpenPlot",function(){return l}),i.d(t,"isOhlcHighPlot",function(){return c}),i.d(t,"isOhlcLowPlot",function(){return u}),i.d(t,"isOhlcClosePlot",function(){return h}),i.d(t,"isOhlcPlot",function(){return d}),i.d(t,"isColorerPlot",function(){return p}),i.d(t,"isBarColorerPlot",function(){return _}),i.d(t,"isBgColorerPlot",function(){return f}),i.d(t,"isTextColorerPlot",function(){return m}),i.d(t,"isOhlcColorerPlot",function(){return y}),i.d(t,"isAlertConditionPlot",function(){return g}),i.d(t,"isOhlcPlotStyleBars",function(){return v}),i.d(t,"isOhlcPlotStyleCandles",function(){return S}),i.d(t,"PlotSymbolSize",function(){return w}),function(e){e[e.Line=0]="Line",e[e.Histogram=1]="Histogram",e[e.Cross=3]="Cross",e[e.Area=4]="Area",e[e.Columns=5]="Columns",e[e.Circles=6]="Circles",e[e.LineWithBreaks=7]="LineWithBreaks",e[e.AreaWithBreaks=8]="AreaWithBreaks",e[e.StepLine=9]="StepLine"}(b||(b={})),function(e){e.Auto="auto",e.Tiny="tiny",e.Small="small",e.Normal="normal",e.Large="large",e.Huge="huge"}(w||(w={}))},"29fS":function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"PaneRendererBars",function(){return r}),n=i("VdBB"),o=i("Zp/P"),r=function(){function e(e){this._bars=e.bars,this._barSpacing=e.barSpacing,this._barWidth=Object(o.optimalBarWidth)(e.barSpacing),this._barLineWidth=e.thinBars?1:Math.max(1,Math.round(this._barWidth)),this._dontDrawOpen=e.dontDrawOpen,this._thinBars=e.thinBars}return e.prototype.draw=function(e){var t,i,n,o,r,s,a;for(e.save(),e.translate(.5,.5),t="",i=this._barLineWidth,n=this._thinBars?1:this._barWidth,o=this._thinBars?1:n/2,r=0,s=this._bars;r<s.length;r++)t!==(a=s[r]).color&&(e.fillStyle=a.color,t=a.color),e.fillRect(Math.round(a.time-i/2),Math.round(a.high-o),Math.round(i),Math.round(a.low-a.high+n)),i<this._barSpacing-1&&(this._dontDrawOpen||e.fillRect(Math.round(a.time-1.5*this._barWidth),Math.round(a.open-o),Math.round(1.5*this._barWidth),Math.round(n)),e.fillRect(Math.round(a.time),Math.round(a.close-o),Math.round(1.5*this._barWidth),Math.round(n)));e.restore()},e.prototype.hitTest=function(e){var t,i,r,s,a,l,c,u=this._bars,h=.5*this._barSpacing;if(0===u.length)return null;if(e.x<u[0].time-h)return null
;if(e.x>u[u.length-1].time+h)return null;for(t=null,i=0,r=u;i<r.length;i++)if(s=r[i],e.x<=s.time+h){t=s;break}return null===t?null:(a=Object(o.selectionTolerance)(this._barLineWidth),l=Math.min(t.high,t.low),c=Math.max(t.high,t.low),l-a<=e.y&&e.y<=c+a?new n.HitTestResult(n.HitTestResult.REGULAR):null)},e}()},"2Fqk":function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"CompareLegendView",function(){return r}),n=i("mrSG"),o=i("TrvT"),r=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._additional=null,n._showStudyValues=i.properties().paneProperties.legendProperties.showStudyValues,n._showStudyValues.subscribe(n,n.update),n}return Object(n.__extends)(t,e),t.prototype.isValuesVisible=function(){return this._showStudyValues.value()},t.prototype.destroy=function(){this._showStudyValues.unsubscribeAll(this)},t.prototype.additional=function(){return this._additional},t.prototype._updateImpl=function(){e.prototype._updateImpl.call(this)},t}(o.CompareDataWindowView)},"2OVc":function(e,t,i){"use strict";var n,o,r,s,a;i.r(t),i.d(t,"InsertStudyCommand",function(){return a}),n=i("mrSG"),o=i("Eyy1"),r=i("RDU5"),s=i("PC8g"),a=function(e){function t(t,i,n,o,r,s,a,l,c,u){var h=e.call(this,u)||this;return h._studyId=null,h._chartModel=t,h._studyMetaInfo=i,h._props=o,h._addAsOverlay=r,h._parentId=null==s?null:s.id(),h._inputs=n,h._targetZOrder=c,h._preferredPriceScale=a,h._paneSize=l,h}return Object(n.__extends)(t,e),t.prototype.redo=function(){var e=null===this._parentId?void 0:this._chartModel.dataSourceForId(this._parentId),t=this._chartModel.insertStudyWithParams(this._studyMetaInfo,this._inputs,this._targetZOrder,this._props,this._addAsOverlay,e,this._preferredPriceScale,this._paneSize,null===this._studyId?void 0:this._studyId);this._studyId=t.id(),t.childStudyByRebind().subscribe(null,function(){return Object(s.trackEvent)("SOS","Apply SOS","Rebind SOS")})},t.prototype.undo=function(){var e=Object(o.ensureNotNull)(this._chartModel.dataSourceForId(Object(o.ensureNotNull)(this._studyId)));this._chartModel.removeSource(e)},t.prototype.insertedStudy=function(){return this._chartModel.dataSourceForId(Object(o.ensureNotNull)(this._studyId))},t}(r.UndoCommand)},"2WC2":function(e,t,i){"use strict";function n(e,t,i){var n=e.get(t);return void 0!==n?n:(e.set(t,i),i)}function o(e,t,i,o){return n(n(e,t,new Map),i,o)}function r(e,t,i,o,r){var s=n(e,t,new Map),a=n(s,i,new Map);return n(a,o,r)}var s,a,l,c,u=i("mrSG"),h=i("Eyy1"),d=i("aO4+"),p=i("VdBB"),_=function(){function e(){this._map=new Map,this._size=0}return e.prototype.size=function(){return this._size},e.prototype.clear=function(){this._map.clear(),this._size=0},e}(),f=(function(e){function t(){return e.call(this)||this}Object(u.__extends)(t,e),t.prototype._add=function(e,t){n(this._map,e,[]).push(t),++this._size},t.prototype._get=function(e){return n(this._map,e,[])},t.prototype._forEach=function(e){this._map.forEach(function(t,i){e(i,t)})}}(_),function(e){function t(){return e.call(this)||this}Object(u.__extends)(t,e),t.prototype._add=function(e,t,i){
o(this._map,e,t,[]).push(i),++this._size},t.prototype._get=function(e,t){return o(this._map,e,t,[])},t.prototype._forEach=function(e){this._map.forEach(function(t,i){t.forEach(function(t,n){e(i,n,t)})})}}(_),function(e){function t(){return e.call(this)||this}Object(u.__extends)(t,e),t.prototype._add=function(e,t,i,n){r(this._map,e,t,i,[]).push(n),++this._size},t.prototype._get=function(e,t,i){return r(this._map,e,t,i,[])},t.prototype._forEach=function(e){this._map.forEach(function(t,i){t.forEach(function(t,n){t.forEach(function(t,o){e(i,n,o,t)})})})}}(_),i("gBDZ")),m=function(e){function t(t){var i=e.call(this)||this;return i._maxSize=t,i._keysQueue=[],i}return Object(u.__extends)(t,e),t.prototype.get=function(e){var t,i,o,r;return e.text&&e.fontSize?(t=e.fontSize,i=e.text,void 0!==(r=(o=n(this._map,t,new Map)).get(i))?r:(this._size>=this._maxSize?this._deleteFirstKey():++this._size,this._keysQueue.push([t,i]),r=new f.b(e.text,e.bold,e.italic,e.font,e.fontSize),o.set(i,r),r)):null},t.prototype._deleteFirstKey=function(){var e=this._keysQueue.shift(),t=e[0],i=e[1],n=this._map.get(t);n.delete(i),0===n.size&&this._map.delete(t)},t}(_),y=i("zDbI");i.d(t,"b",function(){return a}),i.d(t,"c",function(){return l}),i.d(t,"a",function(){return c}),s=5e3,l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(u.__extends)(t,e),t.prototype._startPath=function(e,t,i){e.beginPath(),e.lineWidth=2,e.strokeStyle=t},t.prototype._endPath=function(e){e.stroke()},t}(a=function(){function e(e,t){void 0===t&&(t={skipRenderingOptimizations:!1}),this._height=void 0!==e.height?e.height:e.width,this._width=void 0!==e.width?e.width:e.height,this._items=[],this._barSpacing=0,this._textCache=t.textCache||new m(s),t.skipRenderingOptimizations?this._drawImpl=this._drawWithoutOptimizations.bind(this):this._drawImpl=this._drawWithOptimizations.bind(this),this._color=e.color,this._borderColor=e.borderColor,this._vertOffset=e.vertOffset||0,e.text&&(this._text=e.text,this._fontSize=e.fontSize,this._textColor=e.textColor),void 0!==e.items&&void 0!==e.barSpacing&&this.setData(e.items,e.barSpacing)}return e.prototype.draw=function(e){this._preDrawInit(),this._drawImpl(e)},e.prototype.hitTest=function(e){var t,i,n,o,r,s,a,l,c,u,h,_,f,m,y,g,v,S=p.HitTestResult.REGULAR;for(t=0,i=this._items;t<i.length;t++)if(n=i[t]){if(o=n.vertOffset,r=Math.max(n.height,n.width),new d.Point(n.x,n.y+o).subtract(e).length()<=r)return new p.HitTestResult(S,{});if((s=this._getTextCache(n))&&(a=s.textImageWidth,l=s.textImageHeight,c=a/2,u=n.y+o+n.textVertOffset,h=o>0?0:-l,_=o>0?l:0,f=e.x,m=e.y,y=n.x-c,g=u+h,v=n.x+c,f>y&&f<v&&m>g&&m<u+_))return new p.HitTestResult(S,{})}return null},e.prototype.setData=function(e,t){this._setBaseData(e,t)},e.prototype._setBaseData=function(e,t){var i,n,o,r,s,a,l;for(this._items.length=0,this._barSpacing=t,i=0,n=e;i<n.length;i++)r=void 0===(o=n[i]).width?Object(h.ensureDefined)(this._width):o.width,s=void 0===o.height?Object(h.ensureDefined)(this._height):o.height,
l=(a=void 0===o.vertOffset?this._vertOffset:o.vertOffset)>0?s:-s,this._items.push(Object(u.__assign)({width:r,height:s,vertOffset:a,textVertOffset:l,shapeWidth:0,shapeHeight:0,stepX:0,stepY:0},o))},e.prototype._drawItemText=function(e,t){var i,n,o,r,s=this._getTextCache(t);null!==s&&(i=t.x,n=t.vertOffset,o=t.y+n+t.textVertOffset,r=t.style&&void 0!==t.style.textColor?t.style.textColor:this._textColor,s.paintTo(e,r,i,o,f.a.Center,n>0?f.c.Top:f.c.Bottom))},e.prototype._drawWithOptimizations=function(e){var t,i,n,o,r,s,a,l=null,c=!1;for(n=0,o=this._items;n<o.length;n++)(r=o[n]).style&&void 0!==r.style.color?(t=r.style.color,i=r.style.borderColor):(t=this._color,i=this._borderColor),l!==t&&(l=t,c&&this._endPath(e),this._startPath(e,t,i)),this._drawItemShape(e,r),c=!0;for(c&&this._endPath(e),s=0,a=this._items;s<a.length;s++)r=a[s],this._drawItemText(e,r)},e.prototype._drawWithoutOptimizations=function(e){var t,i,n,o,r,s;for(n=0,o=this._items;n<o.length;n++)r=o[n],s=Object(h.ensureDefined)(r.style),t=Object(h.ensureDefined)(s.color),i=s.borderColor,this._startPath(e,t,i),this._drawItemShape(e,r),this._endPath(e),this._drawItemText(e,r)},e.prototype._drawItemShape=function(e,t){},e.prototype._preDrawInit=function(){},e.prototype._startPath=function(e,t,i){},e.prototype._endPath=function(e){},e.prototype._getTextCache=function(e){var t=e.text||this._text,i=e.fontSize||this._fontSize;return this._textCache.get({text:t,bold:!1,italic:!1,font:y.CHART_FONT_FAMILY,fontSize:i})},e}()),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(u.__extends)(t,e),t.prototype._startPath=function(e,t,i){e.beginPath(),e.fillStyle=t,e.strokeStyle=i},t.prototype._endPath=function(e){e.fill(),e.stroke()},t}(a)},"2bPF":function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolBarsPattern";var r=t||n.createProperties();o.call(this,e,r),r.mirrored.listeners().subscribe(this,n.prototype.mirror),r.flipped.listeners().subscribe(this,n.prototype.flip),this._scaleCoeff=1,this.version=n.version,this._pattern=[],this._properties.mode.listeners().subscribe(this,n.prototype.onModeChanged),i.e("lt-pane-views").then(function(e){var t=i("c6sA").BarsPatternPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("7KDR").Action,s=i("Ocx9").DefaultProperty,a=i("k9/m").PlotRowSearchMode,l=i("hayr").propertyPages,c=i("Ye2/").LineToolBarsPatternMode,u=window.t("Bars Pattern");inherit(n,o),n.version=2,n.prototype.onModeChanged=function(){var e=this.patternPriceDiff();e*=this._pressCoeff,this._points[1].price=this._timePoint[1].price=this._points[0].price+e},n.prototype.additionalActions=function(e){var t=this;return[new r({checked:this.properties().mirrored.value(),checkable:!0,label:window.t("Mirrored"),payload:{target:this},onExecute:function(t){var i=t.getPayload(),n=i.target;e.setProperty(n.properties().mirrored,!n.properties().mirrored.value(),"Bats Pattern Mirroring"),n.updateAllViews(),n._model.updateSource(n)}}),new r({
checked:this.properties().flipped.value(),checkable:!0,label:window.t("Flipped"),payload:{target:this},onExecute:function(t){var i=t.getPayload(),n=i.target;e.setProperty(n.properties().flipped,!n.properties().flipped.value(),"Bats Pattern Flipping"),n.updateAllViews(),n._model.updateSource(n)}}),new r({checkable:!0,label:window.t("Restore Size"),onExecute:function(i){var n=t.points()[0],o=t.patternPriceDiff(),r=n.price+o,s=n.index+t._pattern.length-1;e.startChangingLinetool(t,{price:r,index:s},1,{}),e.changeLinePoint({price:r,index:s},{}),e.endChangingLinetool()}})]},n.prototype.pointsCount=function(){return 2},n.prototype.state=function(e){var t=o.prototype.state.call(this,e);return t.pattern=this._pattern,t},n.prototype.restoreData=function(e){e.pattern&&(this._pattern=e.pattern)},n.prototype.title=function(){return u},n.prototype.name=function(){return"Bars Pattern"},n.prototype.hasEditableCoordinates=function(){return!1},n.prototype.cloneData=function(e){this._pattern=TradingView.clone(e._pattern)},n.prototype.mirror=function(){var e,t,i,n,o,r=this._pattern,s=r[0][TradingView.HIGH_PLOT],a=Math.min(r[0][TradingView.LOW_PLOT],r[0][TradingView.HIGH_PLOT]),l=Math.max(r[0][TradingView.LOW_PLOT],r[0][TradingView.HIGH_PLOT]);for(e=1;e<r.length;e++)a=Math.min(a,r[e][TradingView.LOW_PLOT]),l=Math.max(l,r[e][TradingView.HIGH_PLOT]);if(a<l)for(t=(a+l)/2,i=function(e){var i=e-t,n=t-i;return n},e=0;e<r.length;e++)r[e][TradingView.HIGH_PLOT]=i(r[e][TradingView.HIGH_PLOT]),r[e][TradingView.LOW_PLOT]=i(r[e][TradingView.LOW_PLOT]),r[e][TradingView.OPEN_PLOT]=i(r[e][TradingView.OPEN_PLOT]),r[e][TradingView.CLOSE_PLOT]=i(r[e][TradingView.CLOSE_PLOT]);n=r[0][TradingView.HIGH_PLOT]-s,o=r[r.length-1][TradingView.LOW_PLOT]-r[0][TradingView.HIGH_PLOT],this._points[0].price+=n,this._points[1].price=this._points[0].price+o,this.updateAllViews()},n.prototype.flip=function(){var e,t,i;for(this._points[0].price=this._points[1].price,e=0;e<this._pattern.length/2;e++)t=this._pattern[e],this._pattern[e]=this._pattern[this._pattern.length-e-1],this._pattern[this._pattern.length-e-1]=t;i=this._pattern[this._pattern.length-1][TradingView.LOW_PLOT]-this._pattern[0][TradingView.HIGH_PLOT],this._points[1].price=this._points[0].price+i,this.updateAllViews()},n.prototype.firstPatternPrice=function(){var e,t=parseInt(this.properties().mode.value(),10);return t===c.LineHL2?(this._pattern[0][TradingView.HIGH_PLOT]+this._pattern[0][TradingView.LOW_PLOT])/2:(e={0:TradingView.HIGH_PLOT,1:TradingView.CLOSE_PLOT,2:TradingView.OPEN_PLOT,3:TradingView.OPEN_PLOT,4:TradingView.HIGH_PLOT,5:TradingView.LOW_PLOT}[t],this._pattern[0][e])},n.prototype.lastPatternPrice=function(){var e,t=parseInt(this.properties().mode.value(),10);return t===c.LineHL2?(this._pattern[this._pattern.length-1][TradingView.HIGH_PLOT]+this._pattern[this._pattern.length-1][TradingView.LOW_PLOT])/2:(e={0:TradingView.LOW_PLOT,1:TradingView.CLOSE_PLOT,2:TradingView.CLOSE_PLOT,3:TradingView.OPEN_PLOT,4:TradingView.HIGH_PLOT,5:TradingView.LOW_PLOT}[t],this._pattern[this._pattern.length-1][e])},
n.prototype.patternPriceDiff=function(){return this.lastPatternPrice()-this.firstPatternPrice()},n.prototype.pressCoeff=function(){var e=this.patternPriceDiff(),t=this.points()[0].price,i=this.points()[1].price,n=i-t,o=n/e;return this._pressCoeff=o,o},n.prototype.addPoint=function(e,t){var i,n,r,s,l,u,h,d,p,_,f,m=this._model.mainSeries(),y=m.nearestIndex(e.index,a.NearestRight);if(this.properties().mode.value()===c.Bars?e.price=m.bars().valueAt(y)[TradingView.HIGH_PLOT]:e.price=m.bars().valueAt(y)[TradingView.CLOSE_PLOT],i=this.priceScale(),n=this.ownerSource().firstValue(),r=.05*i.height(),s=i.priceToCoordinate(e.price,n)-r,e.price=i.coordinateToPrice(s,n),l=o.prototype.addPoint.call(this,e,t,!0)){for(u=Math.min(this.points()[0].index,this.points()[1].index),h=Math.max(this.points()[0].index,this.points()[1].index),y=this._model.mainSeries().nearestIndex(u,a.NearestRight),d=this._model.mainSeries().nearestIndex(h,a.NearestLeft),this.points()[0].index>this.points()[1].index&&(this._points[0].price=this._points[1].price),this._pattern=[],p=y;p<=d;p++)_=this._model.mainSeries().data().valueAt(p),this._pattern.push(TradingView.clone(_));this._pattern.length>0&&(f=this.patternPriceDiff(),this._points[1].price=this._points[0].price+f,this._points[1].index=this._points[0].index+(d-y),this.normalizePoints(),this.createServerPoints())}return l},n.prototype.setPoint=function(e,t,i){1===e&&t.index<=this._points[0].index&&(t.index=this._points[0].index+1),0===e&&t.index>=this._points[1].index&&(t.index=this._points[1].index-1),o.prototype.setPoint.call(this,e,t,i)},n.prototype.migrateVersion=function(e,t,i){if(1===e&&this._pattern.length>0){var n=this.patternPriceDiff();2===this._timePoint.length&&(this._timePoint[1].price=this._timePoint[0].price+n),2===this._points.length&&(this._points[1].price=this._points[0].price+n)}},n.prototype.getInputsPropertyPage=function(){return null},n.prototype.getStylesPropertyPage=function(){return l.LineToolBarsPatternStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("8ioM").BarsPatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new s("linetoolbarspattern",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e),e.addExclusion("mirrored"),e.addExclusion("flipped")},t.LineToolBarsPattern=n},"2cgs":function(e,t,i){"use strict";var n=i("ocLq");JSServer.studyLibrary=[{name:"Accumulation/Distribution",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#808000"}},precision:4,inputs:{}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Accumulation/Distribution",shortDescription:"Accum/Dist",is_price_study:!1,inputs:[],id:"Accumulation/Distribution@tv-basicstudies-1",scriptIdPart:"",
name:"Accumulation/Distribution"},constructor:function(){this.f_0=function(e,t,i,o){return n.Std.or(n.Std.and(n.Std.eq(e,t),n.Std.eq(e,i)),n.Std.eq(t,i))?0:(2*e-i-t)/(t-i)*o},this.main=function(e,t){var i;return this._context=e,this._input=t,i=this.f_0(n.Std.close(this._context),n.Std.high(this._context),n.Std.low(this._context),n.Std.volume(this._context)),[n.Std.cum(i,this._context)]}}},{name:"Accumulative Swing Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#3C78D8"}},precision:4,inputs:{in_0:10}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"ASI",histogramBase:0,joinPoints:!1}},description:"Accumulative Swing Index",shortDescription:"ASI",is_price_study:!1,inputs:[{id:"in_0",name:"Limit Move Value",defval:10,type:"float",min:.1,max:1e5}],id:"Accumulative Swing Index@tv-basicstudies-1",scriptIdPart:"",name:"Accumulative Swing Index"},constructor:function(){this.f_0=function(e,t){var i=t.new_var(n.Std.open(t)),o=t.new_var(n.Std.high(t)),r=t.new_var(n.Std.low(t)),s=t.new_var(n.Std.close(t)),a=n.Std.abs(o-s.get(1)),l=n.Std.abs(r-s.get(1)),c=n.Std.abs(o-r),u=n.Std.abs(s.get(1)-i.get(1)),h=n.Std.max(a,l),d=n.Std.iff(a>=n.Std.max(l,c),a-.5*l+.25*u,n.Std.iff(l>=n.Std.max(a,c),l-.5*a+.25*u,c+.25*u));return n.Std.iff(0===d,0,(s-s.get(1)+.5*(s-i)+.25*(s.get(1)-i.get(1)))/d*h/e*50)},this.f_1=function(e,t){var i=this.f_0(e,t);return n.Std.cum(i,t)},this.main=function(e,t){var i;return this._context=e,this._input=t,i=this._input(0),[this.f_1(i,this._context)]}}},{name:"Advance/Decline",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:10}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Advance/Decline",shortDescription:"AD",is_price_study:!1,inputs:[{id:"in_0",name:"length",defval:10,type:"integer",min:1,max:2e3}],id:"Advance/Decline@tv-basicstudies-1",scriptIdPart:"",name:"Advance/Decline"},constructor:function(){this.f_0=function(e,t){return n.Std.gt(e,t)},this.f_1=function(e,t){return n.Std.lt(e,t)},this.f_2=function(e,t){return 0===t?e:e/t},this.main=function(e,t){var i,o,r,s,a,l,c;return this._context=e,this._input=t,i=this._input(0),o=this.f_0(n.Std.close(this._context),n.Std.open(this._context)),r=this._context.new_var(o),s=n.Std.sum(r,i,this._context),a=this.f_1(n.Std.close(this._context),n.Std.open(this._context)),l=this._context.new_var(a),c=n.Std.sum(l,i,this._context),[this.f_2(s,c)]}}},{name:"Arnaud Legoux Moving Average",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,inputs:{in_0:9,in_1:.85,in_2:6}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{
title:"Plot",histogramBase:0,joinPoints:!1}},description:"Arnaud Legoux Moving Average",shortDescription:"ALMA",is_price_study:!0,inputs:[{id:"in_0",name:"Window Size",defval:9,type:"integer",min:0,max:5e3},{id:"in_1",name:"Offset",defval:.85,type:"float",min:-1e12,max:1e12},{id:"in_2",name:"Sigma",defval:6,type:"float",min:-1e12,max:1e12}],id:"Arnaud Legoux Moving Average@tv-basicstudies-1",scriptIdPart:"",name:"Arnaud Legoux Moving Average"},constructor:function(){this.main=function(e,t){var i,o,r,s,a;return this._context=e,this._input=t,i=n.Std.close(this._context),o=this._input(0),r=this._input(1),s=this._input(2),a=this._context.new_var(i),[n.Std.alma(a,o,r,s)]}}},{name:"Aroon",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF6A00"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0094FF"}},precision:4,inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"Upper",histogramBase:0,joinPoints:!1},plot_1:{title:"Lower",histogramBase:0,joinPoints:!1}},description:"Aroon",shortDescription:"Aroon",is_price_study:!1,inputs:[{id:"in_0",name:"length",defval:14,type:"integer",min:1,max:2e3}],id:"Aroon@tv-basicstudies-1",scriptIdPart:"",name:"Aroon"},constructor:function(){this.f_0=function(e,t){return 100*(e+t)/t},this.main=function(e,t){var i,o,r,s,a,l,c,u,h;return this._context=e,this._input=t,i=this._input(0),o=n.Std.high(this._context),r=i+1,s=this._context.new_var(o),a=n.Std.highestbars(s,r,this._context),l=this.f_0(a,i),c=n.Std.low(this._context),u=this._context.new_var(c),h=n.Std.lowestbars(u,r,this._context),[l,this.f_0(h,i)]}}},{name:"Average Price",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,id:"AveragePrice@tv-basicstudies-1",scriptIdPart:"",name:"Average Price",description:"Average Price",shortDescription:"Average Price",is_price_study:!0,plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#85200C"}},precision:4,inputs:{}},styles:{plot_0:{title:"Plot"}},inputs:[]},constructor:function(){this.main=function(e,t){return this._context=e,this._input=t,[n.Std.ohlc4(this._context)]}}},{name:"Average Directional Index",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:14,in_1:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"ADX",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Average Directional Index",shortDescription:"ADX",is_price_study:!1,inputs:[{id:"in_0",name:"ADX Smoothing",defval:14,type:"integer",min:-1e12,max:1e12},{id:"in_1",name:"DI Length",defval:14,type:"integer",min:-1e12,max:1e12}],id:"average_directional_Index@tv-basicstudies-1",scriptIdPart:"",
name:"Average Directional Index"},constructor:function(){this.f_0=function(e){var t=this._context.new_var(n.Std.high(this._context)),i=n.Std.change(t),o=this._context.new_var(n.Std.low(this._context)),r=-n.Std.change(o),s=this._context.new_var(n.Std.tr(void 0,this._context)),a=n.Std.rma(s,e,this._context),l=this._context.new_var(n.Std.and(n.Std.gt(i,r),n.Std.gt(i,0))?i:0),c=n.Std.fixnan(100*n.Std.rma(l,e,this._context)/a,this._context),u=this._context.new_var(n.Std.and(n.Std.gt(r,i),n.Std.gt(r,0))?r:0),h=n.Std.fixnan(100*n.Std.rma(u,e,this._context)/a,this._context);return[c,h]},this.f_1=function(e,t){var i=this.f_0(e),o=i[0],r=i[1],s=o+r,a=this._context.new_var(n.Std.abs(o-r)/(n.Std.eq(s,0)?1:s)),l=100*n.Std.rma(a,t,this._context);return[l]},this.main=function(e,t){return this._context=e,this._input=t,this.f_1(this._input(0),this._input(1))}}},{name:"Average True Range",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Average True Range",shortDescription:"ATR",is_price_study:!1,inputs:[{id:"in_0",name:"length",defval:14,type:"integer",min:1,max:2e3}],id:"Average True Range@tv-basicstudies-1",scriptIdPart:"",name:"Average True Range"},constructor:function(){this.main=function(e,t){var i,o,r;return this._context=e,this._input=t,i=this._input(0),o=n.Std.tr(this._context),r=this._context.new_var(o),[n.Std.rma(r,i,this._context)]}}},{name:"Awesome Oscillator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:1,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,palettes:{palette_0:{colors:{0:{color:"#FF0000",width:1,style:0},1:{color:"#008000",width:1,style:0}}}},inputs:{}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",palette:"palette_0",target:"plot_0",type:"colorer"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Awesome Oscillator",shortDescription:"AO",is_price_study:!1,palettes:{palette_0:{colors:{0:{name:"Color 0"},1:{name:"Color 1"}}}},inputs:[],id:"Awesome Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Awesome Oscillator"},constructor:function(){this.f_0=function(e,t){return e-t},this.f_1=function(e){return n.Std.le(e,0)?0:1},this.main=function(e,t){var i,o,r,s,a,l,c,u,h;return this._context=e,this._input=t,i=n.Std.hl2(this._context),o=this._context.new_var(i),r=n.Std.sma(o,5,this._context),s=this._context.new_var(i),a=n.Std.sma(s,34,this._context),c=l=this.f_0(r,a),u=this._context.new_var(l),h=n.Std.change(u),[c,this.f_1(h)]}}},{name:"Balance of Power",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{}},plots:[{
id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Balance of Power",shortDescription:"Balance of Power",is_price_study:!1,inputs:[],id:"Balance of Power@tv-basicstudies-1",scriptIdPart:"",name:"Balance of Power"},constructor:function(){this.f_0=function(e,t,i,n){return(e-t)/(i-n)},this.main=function(e,t){return this._context=e,this._input=t,[this.f_0(n.Std.close(this._context),n.Std.open(this._context),n.Std.high(this._context),n.Std.low(this._context))]}}},{name:"Bollinger Bands",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,filledAreasStyle:{fill_0:{color:"#000080",transparency:90,visible:!0}},inputs:{in_0:20,in_1:2}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Median",histogramBase:0,joinPoints:!1},plot_1:{title:"Upper",histogramBase:0,joinPoints:!1},plot_2:{title:"Lower",histogramBase:0,joinPoints:!1}},description:"Bollinger Bands",shortDescription:"BB",is_price_study:!0,filledAreas:[{id:"fill_0",objAId:"plot_1",objBId:"plot_2",type:"plot_plot",title:"Plots Background"}],inputs:[{id:"in_0",name:"length",defval:20,type:"integer",min:1,max:1e4},{id:"in_1",name:"mult",defval:2,type:"float",min:.001,max:50}],id:"Bollinger Bands@tv-basicstudies-1",scriptIdPart:"",name:"Bollinger Bands"},constructor:function(){this.f_0=function(e,t){return e*t},this.f_1=function(e,t){return e+t},this.f_2=function(e,t){return e-t},this.main=function(e,t){var i,o,r,s,a,l,c,u;return this._context=e,this._input=t,i=n.Std.close(this._context),o=this._input(0),r=this._input(1),s=this._context.new_var(i),a=n.Std.sma(s,o,this._context),l=this._context.new_var(i),c=n.Std.stdev(l,o,this._context),u=this.f_0(r,c),[a,this.f_1(a,u),this.f_2(a,u)]}}},{name:"Bollinger Bands %B",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:1},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],filledAreasStyle:{fill_0:{color:"#008080",transparency:90,visible:!0}},inputs:{in_0:20,in_1:2}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Bollinger Bands %B",shortDescription:"BB %B",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"length",defval:20,type:"integer",min:1,max:1e4},{id:"in_1",name:"mult",defval:2,type:"float",
min:.001,max:50}],id:"Bollinger Bands %B@tv-basicstudies-1",scriptIdPart:"",name:"Bollinger Bands %B"},constructor:function(){this.f_0=function(e,t){return e*t},this.f_1=function(e,t){return e+t},this.f_2=function(e,t){return e-t},this.f_3=function(e,t,i){return(e-t)/(i-t)},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d;return this._context=e,this._input=t,i=n.Std.close(this._context),o=this._input(0),r=this._input(1),s=this._context.new_var(i),a=n.Std.sma(s,o,this._context),l=this._context.new_var(i),c=n.Std.stdev(l,o,this._context),u=this.f_0(r,c),h=this.f_1(a,u),d=this.f_2(a,u),[this.f_3(i,d,h)]}}},{name:"Bollinger Bands Width",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{in_0:20,in_1:2}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Bollinger Bands Width",shortDescription:"BBW",is_price_study:!1,inputs:[{id:"in_0",name:"length",defval:20,type:"integer",min:1,max:1e4},{id:"in_1",name:"mult",defval:2,type:"float",min:.001,max:50}],id:"Bollinger Bands Width@tv-basicstudies-1",scriptIdPart:"",name:"Bollinger Bands Width"},constructor:function(){this.f_0=function(e,t){return e*t},this.f_1=function(e,t){return e+t},this.f_2=function(e,t){return e-t},this.f_3=function(e,t,i){return(e-t)/i},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d;return this._context=e,this._input=t,i=n.Std.close(this._context),o=this._input(0),r=this._input(1),s=this._context.new_var(i),a=n.Std.sma(s,o,this._context),l=this._context.new_var(i),c=n.Std.stdev(l,o,this._context),u=this.f_0(r,c),h=this.f_1(a,u),d=this.f_2(a,u),[this.f_3(h,d,a)]}}},{name:"Chaikin Money Flow",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:20}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Chaikin Money Flow",shortDescription:"CMF",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"length",defval:20,type:"integer",min:1,max:2e3}],id:"Chaikin Money Flow@tv-basicstudies-1",scriptIdPart:"",name:"Chaikin Money Flow"},constructor:function(){this.f_0=function(e,t,i,o){return n.Std.or(n.Std.and(n.Std.eq(e,t),n.Std.eq(e,i)),n.Std.eq(t,i))?0:(2*e-i-t)/(t-i)*o},this.f_1=function(e,t){return e/t},this.main=function(e,t){var i,o,r,s,a,l,c;return this._context=e,this._input=t,i=this._input(0),o=this.f_0(n.Std.close(this._context),n.Std.high(this._context),n.Std.low(this._context),n.Std.volume(this._context)),r=this._context.new_var(o),s=n.Std.sum(r,i,this._context),a=n.Std.volume(this._context),l=this._context.new_var(a),c=n.Std.sum(l,i,this._context),[this.f_1(s,c)]}}},{name:"Chaikin Oscillator",metainfo:{
_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:3,in_1:10}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Chaikin Oscillator",shortDescription:"Chaikin Osc",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"short",defval:3,type:"integer",min:1,max:2e3},{id:"in_1",name:"long",defval:10,type:"integer",min:1,max:2e3}],id:"Chaikin Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Chaikin Oscillator"},constructor:function(){this.f_0=function(e,t){return e-t},this.main=function(e,t){var i,o,r,s,a,l,c;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=n.Std.accdist(this._context),s=this._context.new_var(r),a=n.Std.ema(s,i,this._context),l=this._context.new_var(r),c=n.Std.ema(l,o,this._context),[this.f_0(a,c)]}}},{name:"Chaikin Volatility",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Chaikin Volatility@tv-basicstudies-1",scriptIdPart:"",name:"Chaikin Volatility",description:"Chaikin Volatility",shortDescription:"Chaikin Volatility",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#F00000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{periods:10,rocLookback:10}},styles:{plot_0:{title:"Plot"}},bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"periods",type:"integer",name:"Periods"},{id:"rocLookback",type:"integer",name:"Rate of Change Lookback"}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.period=this._input(0),this.rocLookback=this._input(1)},this.main=function(e,t){var i,o;return this._context=e,this._input=t,i=this._context.new_var(n.Std.high(this._context)-n.Std.low(this._context)),o=this._context.new_var(n.Std.ema(i,this.period,this._context)),[n.Std.roc(o,this.rocLookback)]}}},{name:"Chande Kroll Stop",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:10,in_1:1,in_2:9}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"Long",histogramBase:0,joinPoints:!1},plot_1:{title:"Short",histogramBase:0,joinPoints:!1}},description:"Chande Kroll Stop",shortDescription:"Chande Kroll Stop",is_price_study:!0,inputs:[{id:"in_0",name:"p",defval:10,type:"integer",min:1,max:4999},{id:"in_1",name:"x",defval:1,type:"integer",min:1,max:1e12},{id:"in_2",name:"q",defval:9,type:"integer",min:1,max:1e12}],id:"Chande Kroll Stop@tv-basicstudies-1",scriptIdPart:"",
name:"Chande Kroll Stop"},constructor:function(){this.f_0=function(e,t,i){return e-t*i},this.f_1=function(e,t,i){return e+t*i},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d,p,_,f,m;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=this._input(2),s=n.Std.high(this._context),a=this._context.new_var(s),l=n.Std.highest(a,i,this._context),c=n.Std.atr(i,this._context),u=this.f_0(l,o,c),h=this._context.new_var(s),d=n.Std.lowest(h,i,this._context),p=this.f_1(d,o,c),_=this._context.new_var(u),f=n.Std.highest(_,r,this._context),m=this._context.new_var(p),[n.Std.lowest(m,r,this._context),f]}}},{name:"Chande Momentum Oscillator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008080"}},precision:4,inputs:{in_0:9}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Chande Momentum Oscillator",shortDescription:"ChandeMO",is_price_study:!1,inputs:[{id:"in_0",name:"length",defval:9,type:"integer",min:1,max:2e3}],id:"Chande Momentum Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Chande Momentum Oscillator"},constructor:function(){this.f_0=function(e){return n.Std.ge(e,0)?e:0},this.f_1=function(e){return n.Std.ge(e,0)?0:-e},this.f_2=function(e,t){return 100*e/t},this.f_3=function(e,t){return this.f_2(e-t,e+t)},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d;return this._context=e,this._input=t,i=this._input(0),o=n.Std.close(this._context),r=this._context.new_var(o),s=n.Std.change(r),a=this.f_0(s),l=this.f_1(s),c=this._context.new_var(a),u=n.Std.sum(c,i,this._context),h=this._context.new_var(l),d=n.Std.sum(h,i,this._context),[this.f_3(u,d)]}}},{name:"Chop Zone",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:5,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,palettes:{palette_0:{colors:{0:{color:"#34dddd",width:1,style:0},1:{color:"#006400",width:1,style:0},2:{color:"#98fb98",width:1,style:0},3:{color:"#00FF00",width:1,style:0},4:{color:"#8B0000",width:1,style:0},5:{color:"#FF0000",width:1,style:0},6:{color:"#FF7F00",width:1,style:0},7:{color:"#ffc04c",width:1,style:0},8:{color:"#FFFF00",width:1,style:0}}}},inputs:{}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",palette:"palette_0",target:"plot_0",type:"colorer"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Chop Zone",shortDescription:"Chop Zone",is_price_study:!1,palettes:{palette_0:{colors:{0:{name:"Color 0"},1:{name:"Color 1"},2:{name:"Color 2"},3:{name:"Color 3"},4:{name:"Color 4"},5:{name:"Color 5"},6:{name:"Color 6"},7:{name:"Color 7"},8:{name:"Color 8"}},valToIndex:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8}}},inputs:[],id:"chop_zone@tv-basicstudies-1",scriptIdPart:"",name:"Chop Zone"},constructor:function(){this.f_0=function(){
var e=n.Std.close(this._context),t=n.Std.hlc3(this._context),i=this._context.new_var(n.Std.high(this._context)),o=n.Std.highest(i,30,this._context),r=n.Std.lowest(i,30,this._context),s=25/(o-r)*r,a=this._context.new_var(e),l=this._context.new_var(n.Std.ema(a,34,this._context)),c=(l.get(1)-l.get(0))/t*s,u=n.Std.sqrt(1+c*c),h=n.Std.round(180*n.Std.acos(1/u)/3.141592653589793),d=n.Std.iff(n.Std.gt(c,0),-h,h),p=n.Std.and(n.Std.gt(d,-2.14),n.Std.le(d,-.71))?7:8,_=n.Std.and(n.Std.gt(d,-3.57),n.Std.le(d,-2.14))?6:p,f=n.Std.and(n.Std.gt(d,-5),n.Std.le(d,-3.57))?5:_,m=n.Std.le(d,-5)?4:f,y=n.Std.and(n.Std.lt(d,2.14),n.Std.ge(d,.71))?3:m,g=n.Std.and(n.Std.lt(d,3.57),n.Std.ge(d,2.14))?2:y,v=n.Std.and(n.Std.lt(d,5),n.Std.ge(d,3.57))?1:g,S=n.Std.ge(d,5)?0:v;return[1,S]},this.main=function(e,t){return this._context=e,this._input=t,this.f_0()}}},{name:"Choppiness Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:61.8},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:38.2}],filledAreasStyle:{fill_0:{color:"#008000",transparency:90,visible:!0}},inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Choppiness Index",shortDescription:"CHOP",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"length",defval:14,type:"integer",min:1,max:2e3}],id:"Choppiness Index@tv-basicstudies-1",scriptIdPart:"",name:"Choppiness Index"},constructor:function(){this.f_0=function(e,t,i,o){return 100*n.Std.log10(e/(t-i))/o},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d,p;return this._context=e,this._input=t,i=this._input(0),o=n.Std.atr(1,this._context),r=this._context.new_var(o),s=n.Std.sum(r,i,this._context),a=n.Std.high(this._context),l=this._context.new_var(a),c=n.Std.highest(l,i,this._context),u=n.Std.low(this._context),h=this._context.new_var(u),d=n.Std.lowest(h,i,this._context),p=n.Std.log10(i),[this.f_0(s,c,d,p)]}}},{name:"Commodity Channel Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#808000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:100},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:-100}],filledAreasStyle:{fill_0:{color:"#808000",transparency:90,visible:!0}},inputs:{in_0:20}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Commodity Channel Index",shortDescription:"CCI",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",
objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"length",defval:20,type:"integer",min:1,max:2e3}],id:"Commodity Channel Index@tv-basicstudies-1",scriptIdPart:"",name:"Commodity Channel Index"},constructor:function(){this.f_0=function(e,t,i){return(e-t)/(.015*i)},this.main=function(e,t){var i,o,r,s,a,l;return this._context=e,this._input=t,i=n.Std.hlc3(this._context),o=this._input(0),r=this._context.new_var(i),s=n.Std.sma(r,o,this._context),a=this._context.new_var(i),l=n.Std.dev(a,o,this._context),[this.f_0(i,s,l)]}}},{name:"Connors RSI",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:70},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:30}],filledAreasStyle:{fill_0:{color:"#800080",transparency:90,visible:!0}},inputs:{in_0:3,in_1:2,in_2:100}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"CRSI",histogramBase:0,joinPoints:!1}},description:"Connors RSI",shortDescription:"CRSI",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"RSI Length",defval:3,type:"integer",min:1},{id:"in_1",name:"UpDown Length",defval:2,type:"integer",min:1},{id:"in_2",name:"ROC Length",defval:100,type:"integer",min:1}],id:"Connors RSI@tv-basicstudies-1",scriptIdPart:"",name:"Connors RSI"},constructor:function(){var e;this.f_1=function(e,t,i){var o=i.new_var(n.Std.max(n.Std.change(e),0));return n.Std.rma(o,t,i)},this.f_2=function(e,t,i){var o=i.new_var(-n.Std.min(n.Std.change(e),0));return n.Std.rma(o,t,i)},this.f_3=(e=0,function(t){var i=t.get(0),o=t.get(1);return e=i===o?0:i>o?n.Std.nz(e)<=0?1:n.Std.nz(e)+1:n.Std.nz(e)>=0?-1:n.Std.nz(e)-1,this._context.new_var(e)}),this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d;return this._context=e,this._input=t,i=n.Std.close(this._context),o=this._context.new_var(i),r=this._input(0),s=this._input(1),a=this._input(2),l=n.Std.rsi(this.f_1(o,r,this._context),this.f_2(o,r,this._context)),c=this.f_3(o),u=n.Std.rsi(this.f_1(c,s,this._context),this.f_2(c,s,this._context)),h=this._context.new_var(n.Std.roc(o,1)),d=n.Std.percentrank(h,a),[n.Std.avg(l,u,d)]}}},{name:"Coppock Curve",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,inputs:{in_0:10,in_1:14,in_2:11}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Coppock Curve",shortDescription:"Coppock Curve",is_price_study:!1,inputs:[{id:"in_0",name:"WMA Length",defval:10,type:"integer",min:-1e12,max:5e3},{id:"in_1",name:"Long RoC Length",defval:14,type:"integer",min:1,max:4999},{id:"in_2",
name:"Short RoC Length",defval:11,type:"integer",min:1,max:4999}],id:"Coppock Curve@tv-basicstudies-1",scriptIdPart:"",name:"Coppock Curve"},constructor:function(){this.f_0=function(e,t){return e+t},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=this._input(2),s=n.Std.close(this._context),a=this._context.new_var(s),l=n.Std.roc(a,o),c=this._context.new_var(s),u=n.Std.roc(c,r),h=this.f_0(l,u),d=this._context.new_var(h),[n.Std.wma(d,i,this._context)]}}},{name:"Correlation Coeff",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:4,trackPrice:!1,transparency:40,visible:!0,color:"#800080"}},precision:4,inputs:{in_0:"AAPL",in_1:20}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Correlation Coefficient",shortDescription:"CC",is_price_study:!1,inputs:[{id:"in_0",name:"sym",defval:"AAPL",type:"symbol"},{id:"in_1",name:"length",defval:20,type:"integer",min:1,max:2e3}],id:"Correlation Coeff@tv-basicstudies-1",scriptIdPart:"",name:"Correlation Coeff"},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this._context.new_sym(this._input(0),n.Std.period(this._context),n.Std.period(this._context))},this.main=function(e,t){var i,o,r,s,a,l,c,u,h;return this._context=e,this._input=t,i=this._context.new_unlimited_var(this._context.symbol.time),this._input(0),n.Std.period(this._context),o=n.Std.close(this._context),r=this._input(1),this._context.select_sym(1),s=this._context.new_unlimited_var(this._context.symbol.time),a=n.Std.close(this._context),l=this._context.new_unlimited_var(a),this._context.select_sym(0),c=l.adopt(s,i,0),u=this._context.new_var(o),h=this._context.new_var(c),[n.Std.correlation(u,h,r,this._context)]}}},{name:"Correlation - Log",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Correlation - Log@tv-basicstudies-1",scriptIdPart:"",name:"Correlation - Log",description:"Correlation - Log",shortDescription:"Correlation - Log",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#800080"}},precision:4,inputs:{instrument:"INTC",instrument2:"AMZN",periods:25}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"instrument",name:"Instrument 1",type:"symbol",defval:"INTC"},{id:"instrument2",name:"Instrument 2",type:"symbol",defval:"AMZN"},{id:"periods",name:"Periods",type:"integer",defval:25}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this._context.new_sym(this._input(0),n.Std.period(this._context),n.Std.period(this._context)),this._context.new_sym(this._input(1),n.Std.period(this._context),n.Std.period(this._context)),this.period=this._input(2)},this.correlationLog=function(e,t,i,o){var r=n.Std.sma(e,i,o),s=n.Std.sma(t,i,o),a=o.new_var(e.get()*t.get())
;return(n.Std.sma(a,i,o)-r*s)/Math.sqrt(n.Std.variance2(e,r,i)*n.Std.variance2(t,s,i))},this.main=function(e,t){var i,o,r,s,a,l,c;return this._context=e,this._input=t,this._context.select_sym(1),i=this._context.new_var(this._context.symbol.time),this._context.select_sym(2),o=this._context.new_var(n.Std.close(this._context)),r=this._context.new_var(n.Std.log(o.get()/o.get(1))),s=this._context.new_var(this._context.symbol.time),this._context.select_sym(1),a=this._context.new_var(n.Std.close(this._context)),l=this._context.new_var(n.Std.log(a.get()/a.get(1))),c=this._context.new_var(r.adopt(s,i,0)),[this.correlationLog(l,c,this.period,this._context)]}}},{name:"Detrended Price Oscillator",metainfo:{_metainfoVersion:42,isTVScript:!1,isTVScriptStub:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#808000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:21,in_1:!1}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"DPO",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Detrended Price Oscillator",shortDescription:"DPO",is_price_study:!1,is_hidden_study:!1,id:"detrended_price_oscillator@tv-basicstudies-1",bands:[{id:"hline_0",name:"Zero",isHidden:!1}],inputs:[{id:"in_0",name:"Period",defval:21,type:"integer",min:1,max:1e12},{id:"in_1",name:"isCentered",defval:!1,type:"bool"}],scriptIdPart:"",name:"Detrended Price Oscillator"},constructor:function(){this.f_0=function(){var e=this._input(0),t=this._input(1),i=Math.floor(e/2+1),o=this._context.new_var(n.Std.close(this._context)),r=this._context.new_var(n.Std.sma(o,e,this._context)),s=this._context.new_var(n.Std.close(this._context)),a=s.get(i)-r,l=n.Std.close(this._context)-r.get(i),c=t?a:l,u=-i,h=t?u:0;return[c,h]},this.main=function(e,t){this._context=e,this._input=t;var i=this.f_0();return[{value:i[0],offset:i[1]}]}}},{name:"Directional Movement Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF7F00"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:14,in_1:14}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"+DI",histogramBase:0,joinPoints:!1},plot_1:{title:"-DI",histogramBase:0,joinPoints:!1},plot_2:{title:"ADX",histogramBase:0,joinPoints:!1}},description:"Directional Movement",shortDescription:"DMI",is_price_study:!1,inputs:[{id:"in_0",name:"DI Length",defval:14,type:"integer",min:1,max:2e3},{id:"in_1",name:"ADX Smoothing",defval:14,type:"integer",min:1,max:50}],id:"Directional Movement Index@tv-basicstudies-1",scriptIdPart:"",name:"Directional Movement Index"},constructor:function(){this.f_0=function(e){return-e},this.f_1=function(e,t){
return n.Std.and(n.Std.gt(e,t),n.Std.gt(e,0))?e:0},this.f_2=function(e,t){return 100*e/t},this.f_3=function(e,t){return e+t},this.f_4=function(e,t,i){return n.Std.abs(e-t)/(n.Std.eq(i,0)?1:i)},this.f_5=function(e){return 100*e},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P,C,T,x,I,L;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=n.Std.high(this._context),s=this._context.new_var(r),a=n.Std.change(s),l=n.Std.low(this._context),c=this._context.new_var(l),u=n.Std.change(c),h=this.f_0(u),d=n.Std.tr(this._context),p=this._context.new_var(d),_=n.Std.rma(p,i,this._context),f=this.f_1(a,h),m=this._context.new_var(f),y=n.Std.rma(m,i,this._context),g=this.f_2(y,_),v=n.Std.fixnan(g,this._context),S=this.f_1(h,a),b=this._context.new_var(S),w=n.Std.rma(b,i,this._context),P=this.f_2(w,_),C=n.Std.fixnan(P,this._context),T=this.f_3(v,C),x=this.f_4(v,C,T),I=this._context.new_var(x),L=n.Std.rma(I,o,this._context),[v,C,this.f_5(L)]}}},{name:"Donchian Channels",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF7F00"}},precision:4,filledAreasStyle:{fill_0:{color:"#0000FF",transparency:90,visible:!0}},inputs:{in_0:20}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Lower",histogramBase:0,joinPoints:!1},plot_1:{title:"Upper",histogramBase:0,joinPoints:!1},plot_2:{title:"Basis",histogramBase:0,joinPoints:!1}},description:"Donchian Channels",shortDescription:"DC",is_price_study:!0,filledAreas:[{id:"fill_0",objAId:"plot_1",objBId:"plot_0",type:"plot_plot",title:"Plots Background"}],inputs:[{id:"in_0",name:"length",defval:20,type:"integer",min:1,max:2e3}],id:"Donchian Channels@tv-basicstudies-1",scriptIdPart:"",name:"Donchian Channels"},constructor:function(){this.main=function(e,t){var i,o,r,s,a,l,c;return this._context=e,this._input=t,i=this._input(0),o=n.Std.low(this._context),r=this._context.new_var(o),s=n.Std.lowest(r,i,this._context),a=n.Std.high(this._context),l=this._context.new_var(a),[s,c=n.Std.highest(l,i,this._context),n.Std.avg(c,s)]}}},{name:"Double Exponential Moving Average",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"}},precision:4,inputs:{in_0:9}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Double EMA",shortDescription:"DEMA",is_price_study:!0,inputs:[{id:"in_0",name:"length",defval:9,type:"integer",min:1,max:1e4}],id:"Double Exponential Moving Average@tv-basicstudies-1",scriptIdPart:"",name:"Double Exponential Moving Average"},constructor:function(){
this.f_0=function(e,t){return 2*e-t},this.main=function(e,t){var i,o,r,s,a,l;return this._context=e,this._input=t,i=this._input(0),o=n.Std.close(this._context),r=this._context.new_var(o),s=n.Std.ema(r,i,this._context),a=this._context.new_var(s),l=n.Std.ema(a,i,this._context),[this.f_0(s,l)]}}},{name:"Ease of Movement",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#808000"}},precision:4,inputs:{in_0:1e4,in_1:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Ease Of Movement",shortDescription:"EOM",is_price_study:!1,inputs:[{id:"in_0",name:"Divisor",defval:1e4,type:"integer",min:1,max:1e9},{id:"in_1",name:"length",defval:14,type:"integer",min:1,max:2e3}],id:"Ease of Movement@tv-basicstudies-1",scriptIdPart:"",name:"Ease of Movement"},constructor:function(){this.f_0=function(e,t,i,n,o){return e*t*(i-n)/o},this.main=function(e,t){var i,o,r,s,a,l,c;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=n.Std.hl2(this._context),s=this._context.new_var(r),a=n.Std.change(s),l=this.f_0(i,a,n.Std.high(this._context),n.Std.low(this._context),n.Std.volume(this._context)),c=this._context.new_var(l),[n.Std.sma(c,o,this._context)]}}},{name:"Elders Force Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:13}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Elder's Force Index",shortDescription:"EFI",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"length",defval:13,type:"integer",min:1,max:2e3}],id:"Elders Force Index@tv-basicstudies-1",scriptIdPart:"",name:"Elders Force Index"},constructor:function(){this.f_0=function(e,t){return e*t},this.main=function(e,t){var i,o,r,s,a,l;return this._context=e,this._input=t,i=this._input(0),o=n.Std.close(this._context),r=this._context.new_var(o),s=n.Std.change(r),a=this.f_0(s,n.Std.volume(this._context)),l=this._context.new_var(a),[n.Std.ema(l,i,this._context)]}}},{name:"EMA Cross",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"},plot_2:{linestyle:0,linewidth:4,plottype:3,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,inputs:{in_0:9,in_1:26}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Short",histogramBase:0,joinPoints:!1},plot_1:{title:"Long",histogramBase:0,joinPoints:!1},plot_2:{title:"Crosses",
histogramBase:0,joinPoints:!1}},description:"EMA Cross",shortDescription:"EMA Cross",is_price_study:!0,inputs:[{id:"in_0",name:"Short",defval:9,type:"integer",min:1,max:2e3},{id:"in_1",name:"Long",defval:26,type:"integer",min:1,max:2e3}],id:"EMA Cross@tv-basicstudies-1",scriptIdPart:"",name:"EMA Cross"},constructor:function(){this.f_0=function(e,t){return e?t:n.Std.na()},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=n.Std.close(this._context),s=this._context.new_var(r),a=n.Std.ema(s,i,this._context),l=this._context.new_var(r),u=a,h=c=n.Std.ema(l,o,this._context),d=n.Std.cross(a,c,this._context),[u,h,this.f_0(d,a)]}}},{name:"Envelopes",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF7F00"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,filledAreasStyle:{fill_0:{color:"#0000FF",transparency:90,visible:!0}},inputs:{in_0:20,in_1:10,in_2:10,in_3:"Simple",in_4:"close"}},plots:[{id:"plot_1",type:"line"},{id:"plot_0",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Average",histogramBase:0,joinPoints:!1},plot_1:{title:"Upper",histogramBase:0,joinPoints:!1},plot_2:{title:"Lower",histogramBase:0,joinPoints:!1}},description:"Envelopes",shortDescription:"Envelopes",is_price_study:!0,filledAreas:[{id:"fill_0",objAId:"plot_1",objBId:"plot_2",type:"plot_plot",title:"Plots Background"}],inputs:[{id:"in_0",name:"Length",defval:20,type:"integer",min:1,max:2e3},{id:"in_1",name:"Upper Percentage",defval:2,type:"float",min:0},{id:"in_2",name:"Lower Percentage",defval:2,type:"float",min:0},{id:"in_3",name:"Method",type:"text",defval:"Simple",options:["Simple","Exponential","Weighted"]},{id:"in_4",name:"Source",defval:"close",type:"source",options:["open","high","low","close","hl2","hlc3","ohlc4"]}],id:"Envelope@tv-basicstudies-1",scriptIdPart:"",name:"Envelopes"},constructor:function(){this.f_0=function(e,t){return e*(1+t)},this.f_1=function(e,t){return e*(1-t)},this.main=function(e,t){var i,o;return this._context=e,this._input=t,i=this._context.new_var(n.Std[this._input(4)](this._context)),o=n.Std.sma(i,this._input(0),this._context),"Exponential"===this._input(3)?o=n.Std.ema(i,this._input(0),this._context):"Weighted"===this._input(3)&&(o=n.Std.wma(i,this._input(0),this._context)),[this.f_0(o,this._input(1)/100),o,this.f_1(o,this._input(2)/100)]}}},{name:"Standard Error",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Standard Error@tv-basicstudies-1",scriptIdPart:"",name:"Standard Error",description:"Standard Error",shortDescription:"Standard Error",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,
color:"#FF6D00"}},precision:4,inputs:{length:14}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"length",type:"integer",name:"Length"}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.period=this._input(0)},this.main=function(e,t){var i,o,r,s,a,l,c,u,h;for(this._context=e,this._input=t,i=this._context.new_var(n.Std.close(this._context)),s=0,a=0,l=0;l<this.period;l++)s+=l+1,a+=i.get(l);for(o=s/this.period,r=a/this.period,c=0,u=0,h=0,l=0;l<this.period;l++)h+=Math.pow(r-i.get(l),2),u+=(o-l-1)*(r-i.get(l)),c+=Math.pow(o-l-1,2);return u=Math.pow(u,2),[Math.sqrt((h-u/c)/(this.period-2))]}}},{name:"Standard Error Bands",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!0,id:"Standard Error Bands@tv-basicstudies-1",scriptIdPart:"",name:"Standard Error Bands",description:"Standard Error Bands",shortDescription:"Standard Error Bands",plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,transparency:0,trackPrice:!1,color:"#138484"},plot_1:{linestyle:0,visible:!0,linewidth:1,transparency:0,plottype:0,trackPrice:!1,color:"#741B47"},plot_2:{linestyle:0,visible:!0,linewidth:1,transparency:0,plottype:0,trackPrice:!1,color:"#138484"}},filledAreasStyle:{fill_0:{color:"#FFD966",transparency:84,visible:!0}},precision:4,inputs:{periods:21,errors:2,method:"Simple",averagePeriods:3}},styles:{plot_0:{title:"Plot 1"},plot_1:{title:"Plot 2"},plot_2:{title:"Plot 3"}},filledAreas:[{id:"fill_0",objAId:"plot_0",objBId:"plot_2",type:"plot_plot",title:"Background"}],inputs:[{id:"periods",type:"integer",name:"Periods"},{id:"errors",type:"float",name:"Standard Errors"},{id:"method",name:"Method",type:"text",defval:"Simple",options:["Simple","Exponential","Weighted"]},{id:"averagePeriods",type:"integer",name:"Averaging Periods"}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.period=this._input(0),this.errorDeviation=this._input(1),this.maMethod=this._input(2),this.averagePeriod=this._input(3)},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d,p,_,f,m,y,g,v;for(this._context=e,this._input=t,i=this._context.new_var(n.Std.close(this._context)),s=0,a=0,l=0;l<this.period;l++)s+=l+1,a+=i.get(l);for(o=s/this.period,r=a/this.period,c=0,u=0,h=0,l=0;l<this.period;l++)h+=Math.pow(r-i.get(l),2),u+=(o-l-1)*(r-i.get(l)),c+=Math.pow(o-l-1,2);return u=Math.pow(u,2),d=Math.sqrt((h-u/c)/(this.period-2)),p=n.Std.linreg(i,this.period,0),_=this._context.new_var(p+this.errorDeviation*d),f=this._context.new_var(p),m=this._context.new_var(p-this.errorDeviation*d),"Simple"===this.maMethod?(y=n.Std.sma(_,this.averagePeriod,this._context),g=n.Std.sma(f,this.averagePeriod,this._context),v=n.Std.sma(m,this.averagePeriod,this._context)):"Exponential"===this.maMethod?(y=n.Std.ema(_,this.averagePeriod,this._context),g=n.Std.ema(f,this.averagePeriod,this._context),v=n.Std.ema(m,this.averagePeriod,this._context)):(y=n.Std.wma(_,this.averagePeriod,this._context),
g=n.Std.wma(f,this.averagePeriod,this._context),v=n.Std.wma(m,this.averagePeriod,this._context)),[y,g,v]}}},{name:"Fisher Transform",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF7F00"}},precision:4,bands:[{color:"#FF7F00",linestyle:2,linewidth:1,visible:!0,value:1.5},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:.75},{color:"#FF7F00",linestyle:2,linewidth:1,visible:!0,value:0},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:-.75},{color:"#FF7F00",linestyle:2,linewidth:1,visible:!0,value:-1.5}],inputs:{in_0:9}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"Fisher",histogramBase:0,joinPoints:!1,isHidden:!1},plot_1:{title:"Trigger",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Fisher Transform",shortDescription:"Fisher",is_price_study:!1,bands:[{id:"hline_0",name:"Level",isHidden:!1},{id:"hline_1",name:"Level",isHidden:!1},{id:"hline_2",name:"Level",isHidden:!1},{id:"hline_3",name:"Level",isHidden:!1},{id:"hline_4",name:"Level",isHidden:!1}],inputs:[{id:"in_0",name:"Length",defval:9,type:"integer",min:1,max:1e12}],id:"fisher_transform@tv-basicstudies-1",scriptIdPart:"",name:"Fisher Transform"},constructor:function(){this.f_0=function(e){var t=n.Std.lt(e,-.99)?-.999:e,i=n.Std.gt(e,.99)?.999:t;return[i]},this.f_1=function(){var e,t,i=this._input(0),o=this._context.new_var(n.Std.hl2(this._context)),r=n.Std.highest(o,i,this._context),s=this._context.new_var(n.Std.hl2(this._context)),a=n.Std.lowest(s,i,this._context),l=this._context.new_var(),c=this.f_0(.66*((n.Std.hl2(this._context)-a)/n.Std.max(r-a,.001)-.5)+.67*n.Std.nz(l.get(1)));return l.set(c[0]),(e=this._context.new_var()).set(.5*n.Std.log((1+l.get(0))/n.Std.max(1-l.get(0),.001))+.5*n.Std.nz(e.get(1))),t=e.get(1),[e.get(0),t]},this.main=function(e,t){return this._context=e,this._input=t,this.f_1()}}},{name:"Historical Volatility",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{in_0:10}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Historical Volatility",shortDescription:"HV",is_price_study:!1,inputs:[{id:"in_0",name:"length",defval:10,type:"integer",min:1,max:1e12}],id:"historical_volatility@tv-basicstudies-1",scriptIdPart:"",name:"Historical Volatility"},constructor:function(){this.f_0=function(){
var e=this._input(0),t=n.Std.or(n.Std.isintraday(this._context),n.Std.and(n.Std.isdaily(this._context),n.Std.eq(n.Std.interval(this._context),1)))?1:7,i=this._context.new_var(n.Std.close(this._context)),o=this._context.new_var(n.Std.log(n.Std.close(this._context)/i.get(1))),r=100*n.Std.stdev(o,e,this._context)*n.Std.sqrt(365/t);return[r]},this.main=function(e,t){return this._context=e,this._input=t,this.f_0()}}},{name:"Hull MA",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,inputs:{in_0:9}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Hull Moving Average",shortDescription:"HMA",is_price_study:!0,inputs:[{id:"in_0",name:"length",defval:9,type:"integer",min:1,max:1e4}],id:"Hull MA@tv-basicstudies-1",scriptIdPart:"",name:"Hull MA"},constructor:function(){this.f_0=function(e,t){return 2*e-t},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d,p;return this._context=e,this._input=t,i=n.Std.close(this._context),r=(o=this._input(0))/2,s=this._context.new_var(i),a=n.Std.wma(s,r,this._context),l=this._context.new_var(i),c=n.Std.wma(l,o,this._context),u=this.f_0(a,c),h=n.Std.sqrt(o),d=n.Std.round(h),p=this._context.new_var(u),[n.Std.wma(p,d,this._context)]}}},{name:"Ichimoku Cloud",metainfo:{_metainfoVersion:42,isTVScript:!1,isTVScriptStub:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0496ff"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#991515"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#459915"},plot_3:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"},plot_4:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,palettes:{palette_0:{colors:{0:{color:"#008000",width:1,style:0},1:{color:"#FF0000",width:1,style:0}}}},filledAreasStyle:{fill_0:{color:"#000080",transparency:90,visible:!0}},inputs:{in_0:9,in_1:26,in_2:52,in_3:26}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"},{id:"plot_3",type:"line"},{id:"plot_4",type:"line"},{id:"plot_5",palette:"palette_0",target:"fill_0",type:"colorer"}],styles:{plot_0:{title:"Conversion Line",histogramBase:0,joinPoints:!1,isHidden:!1},plot_1:{title:"Base Line",histogramBase:0,joinPoints:!1,isHidden:!1},plot_2:{title:"Lagging Span",histogramBase:0,joinPoints:!1,isHidden:!1},plot_3:{title:"Lead 1",histogramBase:0,joinPoints:!1,isHidden:!1},plot_4:{title:"Lead 2",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Ichimoku Cloud",shortDescription:"Ichimoku",is_price_study:!0,is_hidden_study:!1,id:"Ichimoku Cloud@tv-basicstudies-1",palettes:{palette_0:{colors:{0:{name:"Color 0"},1:{name:"Color 1"}},valToIndex:{0:0,1:1}}},filledAreas:[{id:"fill_0",objAId:"plot_3",objBId:"plot_4",
type:"plot_plot",title:"Plots Background",isHidden:!1,palette:"palette_0"}],inputs:[{id:"in_0",name:"Conversion Line Periods",defval:9,type:"integer",min:1,max:1e12},{id:"in_1",name:"Base Line Periods",defval:26,type:"integer",min:1,max:1e12},{id:"in_2",name:"Lagging Span 2 Periods",defval:52,type:"integer",min:1,max:1e12},{id:"in_3",name:"Displacement",defval:26,type:"integer",min:1,max:1e12}],scriptIdPart:"",name:"Ichimoku Cloud"},constructor:function(){this.donchian=function(e){var t=this._context.new_var(n.Std.low(this._context)),i=this._context.new_var(n.Std.high(this._context)),o=n.Std.avg(n.Std.lowest(t,e,this._context),n.Std.highest(i,e,this._context));return o},this.f_1=function(){var e=this._input(0),t=this._input(1),i=this._input(2),o=this._input(3),r=this.donchian(e),s=this.donchian(t),a=n.Std.avg(r,s),l=this.donchian(i),c=n.Std.close(this._context),u=n.Std.gt(a,l)?0:1;return[r,s,c,a,l,-o,o,o,u]},this.main=function(e,t){this._context=e,this._input=t;var i=this.f_1();return[i[0],i[1],{value:i[2],offset:i[5]},{value:i[3],offset:i[6]},{value:i[4],offset:i[7]},i[8]]}}},{name:"Keltner Channels",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,filledAreasStyle:{fill_0:{color:"#0000FF",transparency:90,visible:!0}},inputs:{in_0:!0,in_1:20,in_2:1}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Upper",histogramBase:0,joinPoints:!1},plot_1:{title:"Middle",histogramBase:0,joinPoints:!1},plot_2:{title:"Lower",histogramBase:0,joinPoints:!1}},description:"Keltner Channels",shortDescription:"KC",is_price_study:!0,filledAreas:[{id:"fill_0",objAId:"plot_0",objBId:"plot_2",type:"plot_plot",title:"Plots Background"}],inputs:[{id:"in_0",name:"useTrueRange",defval:!0,type:"bool"},{id:"in_1",name:"length",defval:20,type:"integer",min:1,max:2e3},{id:"in_2",name:"mult",defval:1,type:"float",min:-1e12,max:1e12}],id:"Keltner Channels@tv-basicstudies-1",scriptIdPart:"",name:"Keltner Channels"},constructor:function(){this.f_0=function(e,t,i,n){return e?t:i-n},this.f_1=function(e,t,i){return e+t*i},this.f_2=function(e,t,i){return e-t*i},this.main=function(e,t){var i,o,r,s,a,l,c,u,h;return this._context=e,this._input=t,i=n.Std.close(this._context),o=this._input(0),r=this._input(1),s=this._input(2),a=this._context.new_var(i),l=n.Std.ema(a,r,this._context),c=this.f_0(o,n.Std.tr(this._context),n.Std.high(this._context),n.Std.low(this._context)),u=this._context.new_var(c),h=n.Std.ema(u,r,this._context),[this.f_1(l,h,s),l,this.f_2(l,h,s)]}}},{name:"Klinger Oscillator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,
trackPrice:!1,transparency:35,visible:!0,color:"#000080"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"}},precision:4,inputs:{}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1},plot_1:{title:"Signal",histogramBase:0,joinPoints:!1}},description:"Klinger Oscillator",shortDescription:"Klinger Oscillator",is_price_study:!1,inputs:[],id:"Klinger Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Klinger Oscillator"},constructor:function(){this.f_0=function(e,t){return n.Std.ge(e,0)?t:-t},this.f_1=function(e,t){return e-t},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d;return this._context=e,this._input=t,i=n.Std.hlc3(this._context),o=this._context.new_var(i),r=n.Std.change(o),s=this.f_0(r,n.Std.volume(this._context)),a=this._context.new_var(s),l=n.Std.ema(a,34,this._context),c=this._context.new_var(s),u=n.Std.ema(c,55,this._context),h=this.f_1(l,u),d=this._context.new_var(h),[h,n.Std.ema(d,13,this._context)]}}},{name:"Know Sure Thing",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:10,in_1:15,in_2:20,in_3:30,in_4:10,in_5:10,in_6:10,in_7:15,in_8:9}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"KST",histogramBase:0,joinPoints:!1},plot_1:{title:"Signal",histogramBase:0,joinPoints:!1}},description:"Know Sure Thing",shortDescription:"KST",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"roclen1",defval:10,type:"integer",min:1,max:2e3},{id:"in_1",name:"roclen2",defval:15,type:"integer",min:1,max:2e3},{id:"in_2",name:"roclen3",defval:20,type:"integer",min:1,max:2e3},{id:"in_3",name:"roclen4",defval:30,type:"integer",min:1,max:2e3},{id:"in_4",name:"smalen1",defval:10,type:"integer",min:1,max:2e3},{id:"in_5",name:"smalen2",defval:10,type:"integer",min:1,max:2e3},{id:"in_6",name:"smalen3",defval:10,type:"integer",min:1,max:2e3},{id:"in_7",name:"smalen4",defval:15,type:"integer",min:1,max:2e3},{id:"in_8",name:"siglen",defval:9,type:"integer",min:1,max:2e3}],id:"Know Sure Thing@tv-basicstudies-1",scriptIdPart:"",name:"Know Sure Thing"},constructor:function(){this.f_0=function(e,t,i,n){return e+2*t+3*i+4*n},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P,C,T,x,I,L,M,A,k,E,O,D,V,B,R,N;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=this._input(2),s=this._input(3),a=this._input(4),l=this._input(5),c=this._input(6),u=this._input(7),h=this._input(8),d=n.Std.close(this._context),p=i,_=this._context.new_var(d),f=n.Std.roc(_,p),m=a,y=this._context.new_var(f),g=n.Std.sma(y,m,this._context),v=o,S=this._context.new_var(d),b=n.Std.roc(S,v),w=l,
P=this._context.new_var(b),C=n.Std.sma(P,w,this._context),T=r,x=this._context.new_var(d),I=n.Std.roc(x,T),L=c,M=this._context.new_var(I),A=n.Std.sma(M,L,this._context),k=s,E=this._context.new_var(d),O=n.Std.roc(E,k),D=u,V=this._context.new_var(O),B=n.Std.sma(V,D,this._context),R=this.f_0(g,C,A,B),N=this._context.new_var(R),[R,n.Std.sma(N,h,this._context)]}}},{name:"Least Squares Moving Average",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,inputs:{in_0:25,in_1:0}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Least Squares Moving Average",shortDescription:"LSMA",is_price_study:!0,inputs:[{id:"in_0",name:"Length",defval:25,type:"integer",min:1,max:1e12},{id:"in_1",name:"Offset",defval:0,type:"integer",min:-1e12,max:1e12}],id:"Least Squares Moving Average@tv-basicstudies-1",scriptIdPart:"",name:"Least Squares Moving Average"},constructor:function(){this.main=function(e,t){var i,o,r,s;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=n.Std.close(this._context),s=this._context.new_var(r),[n.Std.linreg(s,i,o)]}}},{name:"Linear Regression Curve",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,inputs:{in_0:9}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Linear Regression Curve",shortDescription:"LRC",is_price_study:!0,inputs:[{id:"in_0",name:"Length",defval:9,type:"integer",min:1,max:2e3}],id:"Linear Regression Curve@tv-basicstudies-1",scriptIdPart:"",name:"Linear Regression Curve"},constructor:function(){this.main=function(e,t){var i,o,r;return this._context=e,this._input=t,i=n.Std.close(this._context),o=this._input(0),r=this._context.new_var(i),[n.Std.linreg(r,o,0)]}}},{name:"Linear Regression Slope",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Linear Regression Slope@tv-basicstudies-1",scriptIdPart:"",name:"Linear Regression Slope",description:"Linear Regression Slope",shortDescription:"Linear Regression Slope",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#FF0000"}},precision:4,inputs:{periods:14}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"periods",type:"integer",name:"Periods"}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.period=this._input(0)},this.linregSlope=function(e,t,i){var n,o,r,s=0,a=0,l=0,c=0;for(n=0;n<t;++n)o=e.get(n),s+=r=t-1-n+1,a+=o,l+=r*r,c+=o*r;return(t*c-s*a)/(t*l-s*s)},this.main=function(e,t){var i;return this._context=e,this._input=t,i=this._context.new_var(n.Std.close(this._context)),[this.linregSlope(i,this.period,0)]}}},{
name:"MA Cross",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"},plot_2:{linestyle:0,linewidth:4,plottype:3,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,inputs:{in_0:9,in_1:26}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Short",histogramBase:0,joinPoints:!1},plot_1:{title:"Long",histogramBase:0,joinPoints:!1},plot_2:{title:"Crosses",histogramBase:0,joinPoints:!1}},description:"MA Cross",shortDescription:"MA Cross",is_price_study:!0,inputs:[{id:"in_0",name:"Short",defval:9,type:"integer",min:1,max:2e3},{id:"in_1",name:"Long",defval:26,type:"integer",min:1,max:2e3}],id:"MA Cross@tv-basicstudies-1",scriptIdPart:"",name:"MA Cross"},constructor:function(){this.f_0=function(e,t){return e?t:n.Std.na()},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=n.Std.close(this._context),s=this._context.new_var(r),a=n.Std.sma(s,i,this._context),l=this._context.new_var(r),u=a,h=c=n.Std.sma(l,o,this._context),d=n.Std.cross(a,c,this._context),[u,h,this.f_0(d,a)]}}},{name:"MA with EMA Cross",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"},plot_2:{linestyle:0,linewidth:4,plottype:3,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,inputs:{in_0:10,in_1:10}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"MA",histogramBase:0,joinPoints:!1},plot_1:{title:"EMA",histogramBase:0,joinPoints:!1},plot_2:{title:"Crosses",histogramBase:0,joinPoints:!1}},description:"MA with EMA Cross",shortDescription:"MA/EMA Cross",is_price_study:!0,inputs:[{id:"in_0",name:"Length MA",defval:10,type:"integer",min:1,max:2e3},{id:"in_1",name:"Length EMA",defval:10,type:"integer",min:1,max:2e3}],id:"MA with EMA Cross@tv-basicstudies-1",scriptIdPart:"",name:"MA with EMA Cross"},constructor:function(){this.f_0=function(e,t){return e?t:n.Std.na()},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=n.Std.close(this._context),s=this._context.new_var(r),a=n.Std.sma(s,i,this._context),l=this._context.new_var(r),u=a,h=c=n.Std.ema(l,o,this._context),d=n.Std.cross(a,c,this._context),[u,h,this.f_0(d,a)]}}},{name:"Mass Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,inputs:{in_0:10}},plots:[{id:"plot_0",
type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Mass Index",shortDescription:"Mass Index",is_price_study:!1,inputs:[{id:"in_0",name:"length",defval:10,type:"integer",min:1,max:2e3}],id:"Mass Index@tv-basicstudies-1",scriptIdPart:"",name:"Mass Index"},constructor:function(){this.f_0=function(e,t){return e-t},this.f_1=function(e,t){return e/t},this.main=function(e,t){var i,o,r,s,a,l,c,u;return this._context=e,this._input=t,i=this._input(0),o=this.f_0(n.Std.high(this._context),n.Std.low(this._context)),r=this._context.new_var(o),s=n.Std.ema(r,9,this._context),a=this._context.new_var(s),l=n.Std.ema(a,9,this._context),c=this.f_1(s,l),u=this._context.new_var(c),[n.Std.sum(u,i,this._context)]}}},{name:"McGinley Dynamic",metainfo:{_metainfoVersion:42,isTVScript:!1,isTVScriptStub:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"McGinley Dynamic",shortDescription:"McGinley Dynamic",is_price_study:!0,is_hidden_study:!1,id:"mcginley_dynamic@tv-basicstudies-1",inputs:[{id:"in_0",name:"length",defval:14,type:"integer",min:1,max:1e12}],scriptIdPart:"",name:"McGinley Dynamic"},constructor:function(){this.f_0=function(){var e=this._input(0),t=n.Std.close(this._context),i=this._context.new_var(t),o=n.Std.ema(i,e,this._context),r=this._context.new_var(),s=r.get(1)+(t-r.get(1))/(e*n.Std.pow(t/r.get(1),4));return r.set(n.Std.na(r.get(1))?o:s),[r.get(0)]},this.main=function(e,t){return this._context=e,this._input=t,this.f_0()}}},{name:"Median Price",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,id:"Median Price@tv-basicstudies-1",scriptIdPart:"",name:"Median Price",description:"Median Price",shortDescription:"Median Price",is_price_study:!0,plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#85200C"}},precision:3,inputs:{}},styles:{plot_0:{title:"Plot"}},inputs:[]},constructor:function(){this.main=function(e,t){return this._context=e,this._input=t,[n.Std.hl2(this._context)]}}},{name:"Momentum",metainfo:{_metainfoVersion:30,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#808000"}},precision:4,inputs:{in_0:10,in_1:"close"}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Mom",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Momentum",shortDescription:"Mom",is_price_study:!1,inputs:[{id:"in_0",name:"Length",defval:10,type:"integer",min:1,max:2e3},{id:"in_1",name:"Source",defval:"close",type:"source",options:["open","high","low","close","hl2","hlc3","ohlc4"]}],id:"Momentum@tv-basicstudies-1",scriptIdPart:"",name:"Momentum"},constructor:function(){this.main=function(e,t){var i,o,r;return this._context=e,this._input=t,
i=this._input(0),o=n.Std[this._input(1)](this._context),[(r=this._context.new_var(o).get(i))?o-r:null]}}},{name:"Money Flow Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#459915"}},precision:4,bands:[{color:"#c0c0c0",linestyle:2,linewidth:1,visible:!0,value:80},{color:"#c0c0c0",linestyle:2,linewidth:1,visible:!0,value:20}],filledAreasStyle:{fill_0:{color:"#9915ff",transparency:90,visible:!0}},inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Money Flow Index",shortDescription:"MFI",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"Length",defval:14,type:"integer",min:1,max:2e3}],id:"Money Flow@tv-basicstudies-1",scriptIdPart:"",name:"Money Flow Index"},constructor:function(){this.f_0=function(e,t,i){return e*(n.Std.le(t,0)?0:i)},this.f_1=function(e,t,i){return e*(n.Std.ge(t,0)?0:i)},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d;return this._context=e,this._input=t,i=this._input(0),o=n.Std.hlc3(this._context),r=this._context.new_var(o),s=n.Std.change(r),a=this.f_0(n.Std.volume(this._context),s,o),l=this._context.new_var(a),c=n.Std.sum(l,i,this._context),u=this.f_1(n.Std.volume(this._context),s,o),h=this._context.new_var(u),d=n.Std.sum(h,i,this._context),[n.Std.rsi(c,d)]}}},{name:"Moving Average",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{in_0:9,in_1:"close",in_2:0}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Moving Average",shortDescription:"MA",is_price_study:!0,inputs:[{id:"in_0",name:"Length",defval:9,type:"integer",min:1,max:1e4},{id:"in_1",name:"Source",defval:"close",type:"source",options:["open","high","low","close","hl2","hlc3","ohlc4"]},{id:"in_2",name:"Offset",defval:0,type:"integer",min:-1e4,max:1e4}],id:"Moving Average@tv-basicstudies-1",scriptIdPart:"",name:"Moving Average"},constructor:function(){this.main=function(e,t){var i,o,r,s;return this._context=e,this._input=t,i=n.Std[this._input(1)](this._context),o=this._input(0),r=this._input(2),s=this._context.new_var(i),[{value:n.Std.sma(s,o,this._context),offset:r}]}}},{name:"Moving Average Channel",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#CC0000"}},precision:4,filledAreasStyle:{fill_0:{color:"#A2C4C9",transparency:90,visible:!0}},inputs:{in_0:20,in_1:20,in_2:0,in_3:0}},
plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"Upper",histogramBase:0,joinPoints:!1},plot_1:{title:"Lower",histogramBase:0,joinPoints:!1}},filledAreas:[{id:"fill_0",objAId:"plot_0",objBId:"plot_1",type:"plot_plot",title:"Plots Background"}],description:"Moving Average Channel",shortDescription:"MAC",is_price_study:!0,inputs:[{id:"in_0",name:"Upper Length",defval:20,type:"integer",min:1,max:1e4},{id:"in_1",name:"Lower Length",defval:20,type:"integer",min:1,max:1e4},{id:"in_2",name:"Upper Offset",defval:0,type:"integer",min:-1e4,max:1e4},{id:"in_3",name:"Lower Offset",defval:0,type:"integer",min:-1e4,max:1e4}],id:"Moving Average Channel@tv-basicstudies-1",scriptIdPart:"",name:"Moving Average Channel"},constructor:function(){this.main=function(e,t){var i,o,r,s,a,l,c,u;return this._context=e,this._input=t,i=n.Std.high(this._context),o=n.Std.low(this._context),r=this._input(0),s=this._input(1),a=this._input(2),l=this._input(3),c=this._context.new_var(i),u=this._context.new_var(o),[{value:n.Std.sma(c,r,this._context),offset:a},{value:n.Std.sma(u,s,this._context),offset:l}]}}},{name:"Moving Average Convergence/Divergence",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:1,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:12,in_1:26,in_3:"close",in_2:9}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Histogram",histogramBase:0,joinPoints:!1},plot_1:{title:"MACD",histogramBase:0,joinPoints:!1},plot_2:{title:"Signal",histogramBase:0,joinPoints:!1}},description:"MACD",shortDescription:"MACD",is_price_study:!1,inputs:[{id:"in_0",name:"fastLength",defval:12,type:"integer",min:1,max:2e3},{id:"in_1",name:"slowLength",defval:26,type:"integer",min:1,max:2e3},{id:"in_3",name:"Source",defval:"close",type:"source",options:["open","high","low","close","hl2","hlc3","ohlc4"]},{id:"in_2",name:"signalLength",defval:9,type:"integer",min:1,max:50}],id:"Moving Average Convergence/Divergence@tv-basicstudies-1",scriptIdPart:"",name:"MACD"},constructor:function(){this.f_0=function(e,t){return e-t},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d,p;return this._context=e,this._input=t,i=n.Std[this._input(2)](this._context),o=this._input(0),r=this._input(1),s=this._input(3),a=this._context.new_var(i),l=n.Std.ema(a,o,this._context),c=this._context.new_var(i),u=n.Std.ema(c,r,this._context),h=this.f_0(l,u),d=this._context.new_var(h),p=n.Std.ema(d,s,this._context),[this.f_0(h,p),h,p]}}},{name:"Moving Average Exponential",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,
inputs:{in_0:9,in_1:"close",in_2:0}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Moving Average Exponential",shortDescription:"EMA",is_price_study:!0,inputs:[{id:"in_0",name:"Length",defval:9,type:"integer",min:1,max:1e4},{id:"in_1",name:"Source",defval:"close",type:"source",options:["open","high","low","close","hl2","hlc3","ohlc4"]},{id:"in_2",name:"Offset",defval:0,type:"integer",min:-1e4,max:1e4}],id:"Moving Average Exponential@tv-basicstudies-1",scriptIdPart:"",name:"Moving Average Exponential"},constructor:function(){this.main=function(e,t){var i,o,r,s;return this._context=e,this._input=t,i=n.Std[this._input(1)](this._context),o=this._input(0),r=this._input(2),s=this._context.new_var(i),[{value:n.Std.ema(s,o,this._context),offset:r}]}}},{name:"Moving Average Weighted",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{in_0:9,in_1:"close",in_2:0}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Moving Average Weighted",shortDescription:"WMA",is_price_study:!0,inputs:[{id:"in_0",name:"Length",defval:9,type:"integer",min:1,max:2e3},{id:"in_1",name:"Source",defval:"close",type:"source",options:["open","high","low","close","hl2","hlc3","ohlc4"]},{id:"in_2",name:"Offset",defval:0,type:"integer",min:-1e4,max:1e4}],id:"Moving Average Weighted@tv-basicstudies-1",scriptIdPart:"",name:"Moving Average Weighted"},constructor:function(){this.main=function(e,t){var i,o,r,s;return this._context=e,this._input=t,i=n.Std[this._input(1)](this._context),o=this._input(0),r=this._input(2),s=this._context.new_var(i),[{value:n.Std.wma(s,o,this._context),offset:r}]}}},{name:"Moving Average Double",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,id:"Moving Average Double@tv-basicstudies-1",scriptIdPart:"",name:"Moving Average Double",description:"Moving Average Double",shortDescription:"Moving Average Double",is_price_study:!0,plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#85200C"},plot_1:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#1155CC"}},precision:4,inputs:{firstPeriods:14,secondPeriods:21,method:"Simple"}},styles:{plot_0:{title:"Plot 1"},plot_1:{title:"Plot 2"}},inputs:[{id:"firstPeriods",name:"1st Period",type:"integer",defval:14,min:1,max:1e4},{id:"secondPeriods",name:"2nd Period",type:"integer",defval:21,min:1,max:1e4},{id:"method",name:"Method",type:"text",defval:"Simple",options:["Simple","Exponential","Weighted"]}]},constructor:function(){this.main=function(e,t){var i,o,r;return this._context=e,this._input=t,i=this._context.new_var(n.Std.close(this._context)),"Exponential"===this._input(2)?(o=n.Std.ema(i,this._input(0),this._context),
r=n.Std.ema(i,this._input(1),this._context)):"Weighted"===this._input(2)?(o=n.Std.wma(i,this._input(0),this._context),r=n.Std.wma(i,this._input(1),this._context)):(o=n.Std.sma(i,this._input(0),this._context),r=n.Std.sma(i,this._input(1),this._context)),[o,r]}}},{name:"Moving Average Triple",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!0,id:"Moving Average Triple@tv-basicstudies-1",scriptIdPart:"",name:"Moving Average Triple",description:"Moving Average Triple",shortDescription:"Moving Average Triple",plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,transparency:0,trackPrice:!1,color:"#85200C"},plot_1:{linestyle:0,visible:!0,linewidth:1,transparency:0,plottype:0,trackPrice:!1,color:"#1155CC"},plot_2:{linestyle:0,visible:!0,linewidth:1,transparency:0,plottype:0,trackPrice:!1,color:"#F1C232"}},precision:4,inputs:{firstPeriods:14,secondPeriods:21,thirdPeriods:35,method:"Simple"}},styles:{plot_0:{title:"Plot 1"},plot_1:{title:"Plot 2"},plot_2:{title:"Plot 3"}},inputs:[{id:"firstPeriods",name:"1st Period",type:"integer",defval:14,min:1,max:1e4},{id:"secondPeriods",name:"2nd Period",type:"integer",defval:21,min:1,max:1e4},{id:"thirdPeriods",name:"3rd Period",type:"integer",defval:35,min:1,max:1e4},{id:"method",name:"Method",type:"text",defval:"Simple",options:["Simple","Exponential","Weighted"]}]},constructor:function(){this.main=function(e,t){var i,o,r,s;return this._context=e,this._input=t,i=this._context.new_var(n.Std.close(this._context)),"Exponential"===this._input(3)?(o=n.Std.ema(i,this._input(0),this._context),r=n.Std.ema(i,this._input(1),this._context),s=n.Std.ema(i,this._input(2),this._context)):"Weighted"===this._input(3)?(o=n.Std.wma(i,this._input(0),this._context),r=n.Std.wma(i,this._input(1),this._context),s=n.Std.wma(i,this._input(2),this._context)):(o=n.Std.sma(i,this._input(0),this._context),r=n.Std.sma(i,this._input(1),this._context),s=n.Std.sma(i,this._input(2),this._context)),[o,r,s]}}},{name:"Moving Average Modified",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!0,id:"Moving Average Modified@tv-basicstudies-1",scriptIdPart:"",name:"Moving Average Modified",description:"Moving Average Modified",shortDescription:"Moving Average Modified",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,transparency:0,trackPrice:!1,color:"#85200C"}},precision:4,inputs:{periods:10}},styles:{plot_0:{title:"Plot 1"}},inputs:[{id:"periods",name:"Period",type:"integer",defval:10,min:1,max:1e4}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.periods=this._input(0),this.mmaPrev=NaN},this.mma=function(e){var t=this.periods,i=NaN;return i=isNaN(this.mmaPrev)?n.Std.sma(e,t,this._context):(this.mmaPrev*(t-1)+e.get())/t,this.mmaPrev=i,i},this.main=function(e,t){var i;return this._context=e,this._input=t,
i=this._context.new_var(n.Std.close(this._context)),[this.mma(i,0),this.mma(i,1),this.mma(i,2)]}}},{name:"Moving Average Adaptive",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!0,id:"Moving Average Adaptive@tv-basicstudies-1",scriptIdPart:"",name:"Moving Average Adaptive",description:"Moving Average Adaptive",shortDescription:"Moving Average Adaptive",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,transparency:0,trackPrice:!1,color:"#85200C"}},precision:4,inputs:{periods:10}},styles:{plot_0:{title:"Plot 1"}},inputs:[{id:"periods",name:"Period",type:"integer",defval:10,min:1,max:1e4}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.periods=this._input(0),this.amaPrev=NaN},this.ama=function(e,t){var i=this.periods,o=e.get(),r=n.Std.stdev(t,i,this._context),s=n.Std.log(o/e.get(i))/(r*Math.sqrt(i)),a=.1*Math.abs(s),l=(o-this.amaPrev)*a+this.amaPrev;return this.amaPrev=isNaN(l)?o:l,l},this.main=function(e,t){var i,o;return this._context=e,this._input=t,i=this._context.new_var(n.Std.close(this._context)),o=this._context.new_var(n.Std.log(i.get()/i.get(1))),[this.ama(i,o)]}}},{name:"Moving Average Hamming",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!0,id:"Moving Average Hamming@tv-basicstudies-1",scriptIdPart:"",name:"Moving Average Hamming",description:"Moving Average Hamming",shortDescription:"Moving Average Hamming",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,transparency:0,trackPrice:!1,color:"#85200C"}},precision:4,inputs:{periods:10}},styles:{plot_0:{title:"Plot 1"}},inputs:[{id:"periods",name:"Period",type:"integer",defval:10,min:1,max:1e4}]},constructor:function(){this.init=function(e,t){var i,n,o,r;for(this._context=e,this._input=t,this.periods=this._input(0),i=[],n=0,o=1;o<=this.periods;++o)r=Math.sin((1+o)/this.periods*Math.PI/2),i.unshift(r),n+=r;this.hmaFactors=i,this.hmaFactorsSum=n},this.hma=function(e){var t,i=this.periods,n=0;for(t=0;t<i;++t)n+=e.get(i-t-1)*this.hmaFactors[t];return n/=this.hmaFactorsSum},this.main=function(e,t){var i;return this._context=e,this._input=t,i=this._context.new_var(n.Std.close(this._context)),[this.hma(i)]}}},{name:"Moving Average Multiple",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!0,id:"Moving Average Multiple@tv-basicstudies-1",scriptIdPart:"",name:"Moving Average Multiple",description:"Moving Average Multiple",shortDescription:"Moving Average Multiple",plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"},{id:"plot_3",type:"line"},{id:"plot_4",type:"line"},{id:"plot_5",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,transparency:0,trackPrice:!1,color:"#512DA8"},plot_1:{linestyle:0,visible:!0,linewidth:1,transparency:0,plottype:0,trackPrice:!1,color:"#F57C00"},plot_2:{linestyle:0,visible:!0,
linewidth:1,transparency:0,plottype:0,trackPrice:!1,color:"#26A69A"},plot_3:{linestyle:0,visible:!0,linewidth:1,transparency:0,plottype:0,trackPrice:!1,color:"#FBC02D"},plot_4:{linestyle:0,visible:!0,linewidth:1,transparency:0,plottype:0,trackPrice:!1,color:"#EC407A"},plot_5:{linestyle:0,visible:!0,linewidth:1,transparency:0,plottype:0,trackPrice:!1,color:"#5A54FF"}},precision:4,inputs:{firstPeriods:14,secondPeriods:21,thirdPeriods:35,fourthPeriods:50,fifthPeriods:100,sixthPeriods:200,method:"Simple"}},styles:{plot_0:{title:"Plot 1"},plot_1:{title:"Plot 2"},plot_2:{title:"Plot 3"},plot_3:{title:"Plot 4"},plot_4:{title:"Plot 5"},plot_5:{title:"Plot 6"}},inputs:[{id:"firstPeriods",name:"1st Period",type:"integer",defval:14,min:1,max:1e4},{id:"secondPeriods",name:"2nd Period",type:"integer",defval:21,min:1,max:1e4},{id:"thirdPeriods",name:"3rd Period",type:"integer",defval:35,min:1,max:1e4},{id:"fourthPeriods",name:"4th Period",type:"integer",defval:50,min:1,max:1e4},{id:"fifthPeriods",name:"5th Period",type:"integer",defval:100,min:1,max:1e4},{id:"sixthPeriods",name:"6th Period",type:"integer",defval:200,min:1,max:1e4},{id:"method",name:"Method",type:"text",defval:"Simple",options:["Simple","Exponential","Weighted"]}]},constructor:function(){this.main=function(e,t){var i,o,r,s,a,l,c;return this._context=e,this._input=t,i=this._context.new_var(n.Std.close(this._context)),"Exponential"===this._input(6)?(o=n.Std.ema(i,this._input(0),this._context),r=n.Std.ema(i,this._input(1),this._context),s=n.Std.ema(i,this._input(2),this._context),a=n.Std.ema(i,this._input(3),this._context),l=n.Std.ema(i,this._input(4),this._context),c=n.Std.ema(i,this._input(5),this._context)):"Weighted"===this._input(6)?(o=n.Std.wma(i,this._input(0),this._context),r=n.Std.wma(i,this._input(1),this._context),s=n.Std.wma(i,this._input(2),this._context),a=n.Std.wma(i,this._input(3),this._context),l=n.Std.wma(i,this._input(4),this._context),c=n.Std.wma(i,this._input(5),this._context)):(o=n.Std.sma(i,this._input(0),this._context),r=n.Std.sma(i,this._input(1),this._context),s=n.Std.sma(i,this._input(2),this._context),a=n.Std.sma(i,this._input(3),this._context),l=n.Std.sma(i,this._input(4),this._context),c=n.Std.sma(i,this._input(5),this._context)),[o,r,s,a,l,c]}}},{name:"Majority Rule",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Majority Rule@tv-basicstudies-1",scriptIdPart:"",name:"Majority Rule",description:"Majority Rule",shortDescription:"Majority Rule",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#F00000"}},precision:4,inputs:{rollingPeriod:14}},styles:{plot_0:{title:"Majority Rule"}},inputs:[{id:"rollingPeriod",type:"integer",name:"Rolling Period"}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.rollingPeriod=this._input(0)},this.main=function(e,t){var i,o;return this._context=e,this._input=t,o=(i=n.Std.close(this._context))>this._context.new_var(i).get(1)?1:0,
[100*n.Std.sma(this._context.new_var(o),this.rollingPeriod,this._context)]}}},{name:"Net Volume",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Net Volume",shortDescription:"Net Volume",is_price_study:!1,inputs:[],id:"Net Volume@tv-basicstudies-1",scriptIdPart:"",name:"Net Volume"},constructor:function(){this.f_0=function(e,t,i){return n.Std.gt(e,0)?t:n.Std.lt(i,0)?-t:0*t},this.main=function(e,t){var i,o,r;return this._context=e,this._input=t,i=n.Std.close(this._context),o=this._context.new_var(i),r=n.Std.change(o),[this.f_0(r,n.Std.volume(this._context),r)]}}},{name:"On Balance Volume",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"On Balance Volume",shortDescription:"OBV",is_price_study:!1,inputs:[],id:"On Balance Volume@tv-basicstudies-1",scriptIdPart:"",name:"On Balance Volume"},constructor:function(){this.f_0=function(e,t,i){return n.Std.gt(e,0)?t:n.Std.lt(i,0)?-t:0*t},this.main=function(e,t){var i,o,r,s;return this._context=e,this._input=t,i=n.Std.close(this._context),o=this._context.new_var(i),r=n.Std.change(o),s=this.f_0(r,n.Std.volume(this._context),r),[n.Std.cum(s,this._context)]}}},{name:"Parabolic SAR",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:3,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{in_0:.02,in_1:.02,in_2:.2}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Parabolic SAR",shortDescription:"SAR",is_price_study:!0,inputs:[{id:"in_0",name:"start",defval:.02,type:"float",min:-1e12,max:1e12},{id:"in_1",name:"increment",defval:.02,type:"float",min:-1e12,max:1e12},{id:"in_2",name:"maximum",defval:.2,type:"float",min:-1e12,max:1e12}],id:"Parabolic SAR@tv-basicstudies-1",scriptIdPart:"",name:"Parabolic SAR"},constructor:function(){this.main=function(e,t){var i,o,r;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=this._input(2),[n.Std.sar(i,o,r,this._context)]}}},{name:"Price Channel",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0080"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0080"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0496FF"}},precision:4,inputs:{in_0:20,in_1:0}},plots:[{id:"plot_0",
type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Highprice Line",histogramBase:0,joinPoints:!1},plot_1:{title:"Lowprice Line",histogramBase:0,joinPoints:!1},plot_2:{title:"Centerprice Line",histogramBase:0,joinPoints:!1}},description:"Price Channel",shortDescription:"PC",is_price_study:!1,inputs:[{id:"in_0",name:"Length",defval:20,type:"integer",min:1,max:2e3},{id:"in_1",name:"Offset Length",defval:0,type:"integer",min:1,max:2e3}],id:"Price Channel@tv-basicstudies-1",scriptIdPart:"",name:"Price Channel"},constructor:function(){this.main=function(e,t){var i,o,r,s,a,l,c,u;return this._context=e,this._input=t,i=n.Std.high(this._context),o=this._context.new_var(i),r=n.Std.low(this._context),s=this._context.new_var(r),a=this._input(0),l=this._input(1),[{value:c=n.Std.highest(o,a,this._context),offset:l},{value:u=n.Std.lowest(s,a,this._context),offset:l},{value:n.Std.avg(c,u),offset:l}]}}},{name:"Price Oscillator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{in_0:10,in_1:21}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Price Oscillator",shortDescription:"PPO",is_price_study:!1,inputs:[{id:"in_0",name:"shortlen",defval:10,type:"integer",min:1,max:2e3},{id:"in_1",name:"longlen",defval:21,type:"integer",min:1,max:2e3}],id:"Price Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Price Oscillator"},constructor:function(){this.f_0=function(e,t){return(e-t)/t*100},this.main=function(e,t){var i,o,r,s,a,l,c;return this._context=e,this._input=t,i=n.Std.close(this._context),o=this._input(0),r=this._input(1),s=this._context.new_var(i),a=n.Std.sma(s,o,this._context),l=this._context.new_var(i),c=n.Std.sma(l,r,this._context),[this.f_0(a,c)]}}},{name:"Price Volume Trend",metainfo:{_metainfoVersion:42,isTVScript:!1,isTVScriptStub:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"PVT",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Price Volume Trend",shortDescription:"PVT",is_price_study:!1,is_hidden_study:!1,id:"price_volume_trend@tv-basicstudies-1",inputs:[],scriptIdPart:"",name:"Price Volume Trend"},constructor:function(){this.f_0=function(){var e=this._context.new_var(n.Std.close(this._context)),t=n.Std.cum(n.Std.change(e)/e.get(1)*n.Std.volume(this._context),this._context);return[t]},this.main=function(e,t){return this._context=e,this._input=t,[this.f_0()[0]]}}},{name:"Rate Of Change",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:9}},plots:[{id:"plot_0",
type:"line"}],styles:{plot_0:{title:"ROC",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Rate Of Change",shortDescription:"ROC",is_price_study:!1,bands:[{id:"hline_0",name:"Zero Line",isHidden:!1}],inputs:[{id:"in_0",name:"length",defval:9,type:"integer",min:1,max:1e12}],id:"rate_of_change@tv-basicstudies-1",scriptIdPart:"",name:"Rate Of Change"},constructor:function(){this.main=function(e,t){var i,o;return this._context=e,this._input=t,i=this._context.new_var(n.Std.close(this._context)),o=this._input(0),[100*(i.get(0)-i.get(o))/i.get(o)]}}},{name:"Relative Strength Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:70},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:30}],filledAreasStyle:{fill_0:{color:"#800080",transparency:90,visible:!0}},inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Relative Strength Index",shortDescription:"RSI",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"Length",defval:14,type:"integer",min:1,max:2e3}],id:"Relative Strength Index@tv-basicstudies-1",scriptIdPart:"",name:"Relative Strength Index"},constructor:function(){this.f_0=function(e){return n.Std.max(e,0)},this.f_1=function(e){return-n.Std.min(e,0)},this.f_2=function(e,t){return n.Std.eq(e,0)?100:n.Std.eq(t,0)?0:100-100/(1+t/e)},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d;return this._context=e,this._input=t,i=n.Std.close(this._context),o=this._input(0),r=this._context.new_var(i),s=n.Std.change(r),a=this.f_0(s),l=this._context.new_var(a),c=n.Std.rma(l,o,this._context),u=this.f_1(s),h=this._context.new_var(u),d=n.Std.rma(h,o,this._context),[this.f_2(d,c)]}}},{name:"Relative Vigor Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:10}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"RVGI",histogramBase:0,joinPoints:!1},plot_1:{title:"Signal",histogramBase:0,joinPoints:!1}},description:"Relative Vigor Index",shortDescription:"RVGI",is_price_study:!1,inputs:[{id:"in_0",name:"Length",defval:10,type:"integer",min:1,max:2e3}],id:"Relative Vigor Index@tv-basicstudies-1",scriptIdPart:"",name:"Relative Vigor Index"},constructor:function(){this.f_0=function(e,t){return e-t},this.f_1=function(e,t){return e/t},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d,p,_,f;return this._context=e,this._input=t,i=this._input(0),
o=this.f_0(n.Std.close(this._context),n.Std.open(this._context)),r=this._context.new_var(o),s=n.Std.swma(r,this._context),a=this._context.new_var(s),l=n.Std.sum(a,i,this._context),c=this.f_0(n.Std.high(this._context),n.Std.low(this._context)),u=this._context.new_var(c),h=n.Std.swma(u,this._context),d=this._context.new_var(h),p=n.Std.sum(d,i,this._context),_=this.f_1(l,p),f=this._context.new_var(_),[_,n.Std.swma(f,this._context)]}}},{name:"Relative Volatility Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:80},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:20}],filledAreasStyle:{fill_0:{color:"#808000",transparency:90,visible:!0}},inputs:{in_0:10}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Relative Volatility Index",shortDescription:"RVI",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"length",defval:10,type:"integer",min:1,max:2e3}],id:"Relative Volatility Index@tv-basicstudies-1",scriptIdPart:"",name:"Relative Volatility Index"},constructor:function(){this.f_0=function(e,t){return n.Std.le(e,0)?0:t},this.f_1=function(e,t){return n.Std.gt(e,0)?0:t},this.f_2=function(e,t){return e/(e+t)*100},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d,p,_;return this._context=e,this._input=t,i=this._input(0),o=n.Std.close(this._context),r=this._context.new_var(o),s=n.Std.stdev(r,i,this._context),a=this._context.new_var(o),l=n.Std.change(a),c=this.f_0(l,s),u=this._context.new_var(c),h=n.Std.ema(u,14,this._context),d=this.f_1(l,s),p=this._context.new_var(d),_=n.Std.ema(p,14,this._context),[this.f_2(h,_)]}}},{name:"SMI Ergodic Indicator/Oscillator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF7F00"},plot_2:{linestyle:0,linewidth:1,plottype:1,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:5,in_1:20,in_2:5}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Indicator",histogramBase:0,joinPoints:!1},plot_1:{title:"Signal",histogramBase:0,joinPoints:!1},plot_2:{title:"Oscillator",histogramBase:0,joinPoints:!1}},description:"SMI Ergodic Indicator/Oscillator",shortDescription:"SMIIO",is_price_study:!1,inputs:[{id:"in_0",name:"shortlen",defval:5,type:"integer",min:1,max:2e3},{id:"in_1",name:"longlen",defval:20,type:"integer",min:1,max:2e3},{id:"in_2",name:"siglen",defval:5,type:"integer",min:1,max:2e3}],
id:"SMI Ergodic Indicator/Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"SMI Ergodic Indicator/Oscillator"},constructor:function(){this.f_0=function(e,t){return e-t},this.main=function(e,t){var i,o,r,s,a,l,c,u;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=this._input(2),s=n.Std.close(this._context),a=this._context.new_var(s),l=n.Std.tsi(a,i,o,this._context),c=this._context.new_var(l),[l,u=n.Std.ema(c,r,this._context),this.f_0(l,u)]}}},{name:"Smoothed Moving Average",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:7,in_1:"close"}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Smoothed Moving Average",shortDescription:"SMMA",is_price_study:!0,inputs:[{id:"in_0",name:"Length",defval:7,type:"integer",min:1,max:1e12},{id:"in_1",name:"Source",defval:"close",type:"source",options:["open","high","low","close","hl2","hlc3","ohlc4"]}],id:"smoothed_moving_average@tv-basicstudies-1",scriptIdPart:"",name:"Smoothed Moving Average"},constructor:function(){this.f_0=function(){var e=this._input(0),t=n.Std[this._input(1)](this._context),i=this._context.new_var(t),o=n.Std.sma(i,e,this._context),r=this._context.new_var(),s=(r.get(1)*(e-1)+t)/e;return r.set(n.Std.na(r.get(1))?o:s),[r.get(0)]},this.main=function(e,t){return this._context=e,this._input=t,this.f_0()}}},{name:"Standard Deviation",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,id:"Standard Deviation@tv-basicstudies-1",scriptIdPart:"",name:"Standard Deviation",description:"Standard Deviation",shortDescription:"Standard Deviation",is_price_study:!1,plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,color:"#26A69A"}},precision:4,inputs:{periods:5,deviations:1}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"periods",name:"Periods",type:"integer"},{id:"deviations",name:"Deviations",type:"float"}]},constructor:function(){this.main=function(e,t){var i,o,r;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=this._context.new_var(n.Std.close(this._context)),[n.Std.stdev(r,i,this._context)*o]}}},{name:"Stochastic",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:80},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:20}],filledAreasStyle:{fill_0:{color:"#800080",transparency:75,visible:!0}},inputs:{in_0:14,in_1:1,in_2:3}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"%K",histogramBase:0,joinPoints:!1},
plot_1:{title:"%D",histogramBase:0,joinPoints:!1}},description:"Stochastic",shortDescription:"Stoch",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"length",defval:14,type:"integer",min:1,max:1e4},{id:"in_1",name:"smoothK",defval:1,type:"integer",min:1,max:1e4},{id:"in_2",name:"smoothD",defval:3,type:"integer",min:1,max:1e4}],id:"Stochastic@tv-basicstudies-1",scriptIdPart:"",name:"Stochastic"},constructor:function(){this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d,p,_,f;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=this._input(2),s=n.Std.close(this._context),a=n.Std.high(this._context),l=n.Std.low(this._context),c=this._context.new_var(s),u=this._context.new_var(a),h=this._context.new_var(l),d=n.Std.stoch(c,u,h,i,this._context),p=this._context.new_var(d),_=n.Std.sma(p,o,this._context),f=this._context.new_var(_),[_,n.Std.sma(f,r,this._context)]}}},{name:"Stochastic RSI",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:80},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:20}],filledAreasStyle:{fill_0:{color:"#800080",transparency:80,visible:!0}},inputs:{in_0:14,in_1:14,in_2:3,in_3:3}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"%K",histogramBase:0,joinPoints:!1},plot_1:{title:"%D",histogramBase:0,joinPoints:!1}},description:"Stochastic RSI",shortDescription:"Stoch RSI",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"lengthRSI",defval:14,type:"integer",min:1,max:1e4},{id:"in_1",name:"lengthStoch",defval:14,type:"integer",min:1,max:1e4},{id:"in_2",name:"smoothK",defval:3,type:"integer",min:1,max:1e4},{id:"in_3",name:"smoothD",defval:3,type:"integer",min:1,max:1e4}],id:"Stochastic RSI@tv-basicstudies-1",scriptIdPart:"",name:"Stochastic RSI"},constructor:function(){this.f_1=function(e,t,i){var o=i.new_var(n.Std.max(n.Std.change(e),0));return n.Std.rma(o,t,i)},this.f_2=function(e,t,i){var o=i.new_var(-n.Std.min(n.Std.change(e),0));return n.Std.rma(o,t,i)},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d,p,_,f,m;return this._context=e,this._input=t,i=n.Std.close(this._context),o=this._input(0),r=this._input(1),s=this._input(2),a=this._input(3),l=this._context.new_var(i),c=n.Std.rsi(this.f_1(l,o,this._context),this.f_2(l,o,this._context)),u=this._context.new_var(c),h=this._context.new_var(c),d=this._context.new_var(c),p=n.Std.stoch(u,h,d,r,this._context),_=this._context.new_var(p),
f=n.Std.sma(_,s,this._context),m=this._context.new_var(f),[f,n.Std.sma(m,a,this._context)]}}},{name:"TRIX",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:18}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"TRIX",histogramBase:0,joinPoints:!1}},description:"TRIX",shortDescription:"TRIX",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"length",defval:18,type:"integer",min:1,max:2e3}],id:"TRIX@tv-basicstudies-1",scriptIdPart:"",name:"TRIX"},constructor:function(){this.f_0=function(e){return n.Std.log(e)},this.f_1=function(e){return 1e4*e},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d;return this._context=e,this._input=t,i=this._input(0),o=this.f_0(n.Std.close(this._context)),r=this._context.new_var(o),s=n.Std.ema(r,i,this._context),a=this._context.new_var(s),l=n.Std.ema(a,i,this._context),c=this._context.new_var(l),u=n.Std.ema(c,i,this._context),h=this._context.new_var(u),d=n.Std.change(h),[this.f_1(d)]}}},{name:"Triple EMA",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"}},precision:4,inputs:{in_0:9}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Triple EMA",shortDescription:"TEMA",is_price_study:!0,inputs:[{id:"in_0",name:"length",defval:9,type:"integer",min:1,max:1e4}],id:"Triple EMA@tv-basicstudies-1",scriptIdPart:"",name:"Triple EMA"},constructor:function(){this.f_0=function(e,t,i){return 3*(e-t)+i},this.main=function(e,t){var i,o,r,s,a,l,c,u;return this._context=e,this._input=t,i=this._input(0),o=n.Std.close(this._context),r=this._context.new_var(o),s=n.Std.ema(r,i,this._context),a=this._context.new_var(s),l=n.Std.ema(a,i,this._context),c=this._context.new_var(l),u=n.Std.ema(c,i,this._context),[this.f_0(s,l,u)]}}},{name:"True Strength Indicator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:25,in_1:13,in_2:13}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1},plot_1:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"True Strength Indicator",shortDescription:"True Strength Indicator",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"long",defval:25,type:"integer",min:1,max:4999},{id:"in_1",name:"short",defval:13,type:"integer",min:1,max:4999},{id:"in_2",name:"siglen",
defval:13,type:"integer",min:1,max:4999}],id:"True Strength Indicator@tv-basicstudies-1",scriptIdPart:"",name:"True Strength Indicator"},constructor:function(){this.main=function(e,t){var i,o,r,s,a,l,c;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=this._input(2),s=n.Std.close(this._context),a=this._context.new_var(s),l=n.Std.tsi(a,o,i,this._context),c=this._context.new_var(l),[l,n.Std.ema(c,r,this._context)]}}},{name:"Trend Strength Index",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Trend Strength Index@tv-basicstudies-1",scriptIdPart:"",name:"Trend Strength Index",description:"Trend Strength Index",shortDescription:"Trend Strength Index",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#F00000"}},precision:4,inputs:{periods:14}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"periods",type:"integer",name:"Periods"}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.period=this._input(0),this.invertedPeriod=1/this.period,this.sumX=(this.period-1)*this.period/2,this.sumXX=(this.period-1)*this.period*(2*this.period-1)/6,this.invertedPeriodSumXSumX=this.invertedPeriod*this.sumX*this.sumX},this.trendStrengthIndex=function(){var e,t,i,o,r=this._context.new_var(n.Std.close(this._context)),s=n.Std.sum(r,this.period,this._context),a=0,l=0;for(e=0;e<this.period;e++)t=r.get(e),l+=(this.period-1-e)*t,a+=t*t;return i=l-this.invertedPeriod*this.sumX*s,(o=(this.sumXX-this.invertedPeriodSumXSumX)*(a-this.invertedPeriod*s*s))<0?0==i?0:i>0?1:-1:i/(o=Math.sqrt(o))},this.main=function(e,t){return this._context=e,this._input=t,[this.trendStrengthIndex()]}}},{name:"Typical Price",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,id:"TypicalPrice@tv-basicstudies-1",scriptIdPart:"",name:"Typical Price",description:"Typical Price",shortDescription:"Typical Price",is_price_study:!0,plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#85200C"}},precision:3,inputs:{}},styles:{plot_0:{title:"Plot"}},inputs:[]},constructor:function(){this.main=function(e,t){return this._context=e,this._input=t,[n.Std.hlc3(this._context)]}}},{name:"Ultimate Oscillator",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:7,in_1:14,in_2:28}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"UO",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Ultimate Oscillator",shortDescription:"UO",is_price_study:!1,inputs:[{id:"in_0",name:"length7",defval:7,type:"integer",min:1,max:1e12},{id:"in_1",name:"length14",defval:14,type:"integer",min:1,max:1e12},{id:"in_2",name:"length28",defval:28,type:"integer",min:1,max:1e12}],id:"ultimate_oscillator@tv-basicstudies-1",
scriptIdPart:"",name:"Ultimate Oscillator"},constructor:function(){this.f_0=function(e,t,i){var o=this._context.new_var(e),r=this._context.new_var(t),s=n.Std.sum(o,i,this._context)/n.Std.sum(r,i,this._context);return[s]},this.f_1=function(){var e=this._input(0),t=this._input(1),i=this._input(2),o=this._context.new_var(n.Std.close(this._context)),r=n.Std.max(n.Std.high(this._context),o.get(1)),s=this._context.new_var(n.Std.close(this._context)),a=n.Std.min(n.Std.low(this._context),s.get(1)),l=n.Std.close(this._context)-a,c=r-a,u=this.f_0(l,c,e),h=this.f_0(l,c,t),d=this.f_0(l,c,i),p=100*(4*u[0]+2*h[0]+d[0])/7;return[p]},this.main=function(e,t){return this._context=e,this._input=t,this.f_1()}}},{name:"Volatility Close-to-Close",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Volatility Close-to-Close@tv-basicstudies-1",scriptIdPart:"",name:"Volatility Close-to-Close",description:"Volatility Close-to-Close",shortDescription:"Volatility Close-to-Close",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,color:"#0000FF"}},precision:4,inputs:{periods:10,daysPerYear:252}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"periods",name:"Periods",type:"integer",defval:10},{id:"daysPerYear",name:"Days Per Year",type:"integer",defval:252}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.period=this._input(0),this.daysPerYear=this._input(1)},this.stdev=function(e,t,i){var o=this.variance(e,t,i);return n.Std.sqrt(o)},this.variance=function(e,t,i){var o=n.Std.sma(e,t,i);return this.variance2(e,o,t)},this.variance2=function(e,t,i){var n,o,r=0;for(n=0;n<i;n++)r+=(o=e.get(n)-t)*o;return r/(i-1)},this.standardHistVol=function(){var e=this._context.new_var(n.Std.close(this._context)),t=this._context.new_var(n.Std.log(e.get()/e.get(1)));return 100*this.stdev(t,this.period,this._context)*n.Std.sqrt(this.daysPerYear)},this.main=function(e,t){return this._context=e,this._input=t,[this.standardHistVol()]}}},{name:"Volatility Zero Trend Close-to-Close",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Volatility Zero Trend Close-to-Close@tv-basicstudies-1",scriptIdPart:"",name:"Volatility Zero Trend Close-to-Close",description:"Volatility Zero Trend Close-to-Close",shortDescription:"Volatility Zero Trend Close-to-Close",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,color:"#0000FF"}},precision:4,inputs:{periods:10,daysPerYear:252}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"periods",name:"Periods",type:"integer",min:0,max:1e4},{id:"daysPerYear",name:"Days Per Year",type:"integer"}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.period=this._input(0),this.daysPerYear=this._input(1),this.currTime=NaN,this.prevTime=NaN},this.volatliityZTCTC=function(){
var e,t,i,o,r,s,a=this._context.new_var(n.Std.close(this._context));for(this.prevTime=this.currTime,this.currTime=a.symbol.time,e=Math.sqrt((this.currTime-this.prevTime)/864e5/this.daysPerYear),t=Math.log(n.Std.close(this._context)/a.get(1)),i=this._context.new_var(t/e),o=this._context.new_var(Math.pow(i,2)),r=0,s=0;s<this.period;s++)r+=o.get(s);return 100*Math.sqrt(r/this.period)},this.main=function(e,t){return this._context=e,this._input=t,[this.volatliityZTCTC()]}}},{name:"Volatility O-H-L-C",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Volatility O-H-L-C@tv-basicstudies-1",scriptIdPart:"",name:"Volatility O-H-L-C",description:"Volatility O-H-L-C",shortDescription:"Volatility O-H-L-C",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#F00000"}},precision:4,inputs:{periods:10,marketClosedPercentage:0,daysPerYear:252}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"periods",type:"integer",name:"Periods"},{id:"marketClosedPercentage",type:"float",name:"Market Closed Percentage",min:0,max:.999},{id:"daysPerYear",type:"integer",name:"Days Per Year"}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.period=this._input(0),this.marketClosedPercentage=this._input(1),this.daysPerYear=this._input(2),this.secondsPerYear=86400*this.daysPerYear,this.currTime=NaN,this.prevTime=NaN},this.square=function(e){return e*e},this.volatilityOHLC=function(){var e,t,i,o=this._context.new_var(Math.log(n.Std.open(this._context))),r=this._context.new_var(Math.log(n.Std.high(this._context))),s=this._context.new_var(Math.log(n.Std.low(this._context))),a=this._context.new_var(Math.log(n.Std.close(this._context))),l=this._context.new_var(n.Std.close(this._context));return this.prevTime=this.currTime,this.currTime=l.symbol.time,e=(this.currTime-this.prevTime)/1e3,t=.5*this.square(r.get()-s.get()),t-=(Math.log(4)-1)*this.square(a.get()-o.get()),this.marketClosedPercentage>0&&(t=.12*this.square(o.get()-a.get(1))/this.marketClosedPercentage+.88*t/(1-this.marketClosedPercentage)),t/=e,t*=this.secondsPerYear,i=this._context.new_var(t),100*Math.sqrt(n.Std.sum(i,this.period,this._context)/this.period)},this.main=function(e,t){return this._context=e,this._input=t,[this.volatilityOHLC()]}}},{name:"Volatility Index",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!0,id:"Volatility Index@tv-basicstudies-1",scriptIdPart:"",name:"Volatility Index",description:"Volatility Index",shortDescription:"Volatility Index",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#F00000"}},precision:3,inputs:{periods:10,atrMult:3,method:"Wilder Smoothing"}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"periods",name:"Periods",type:"integer"},{id:"atrMult",name:"ATR Mult",type:"float"},{id:"method",name:"Method",type:"text",defval:"Exponential",
options:["Exponential","Wilder Smoothing"]}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.period=this._input(0),this.atrMult=this._input(1),this.maMethod=this._input(2),this.nextsar=null,this.position=null,this.sic=null,this.bars=[],this.count=0,this.lastSar=null},this.highest=function(e,t){var i,n=this.bars.length-this.period,o=this.bars[n];for(i=n+1;i<this.bars.length;i++)this.bars[i]>o&&(o=this.bars[i]);return o},this.computeATR=function(){var e=n.Std.high(this._context)-n.Std.low(this._context),t=n.Std.high(this._context)-this.bars[this.bars.length-2],i=this.bars[this.bars.length-2]-n.Std.low(this._context);return this.tr=Math.max(e,t,i),"Exponential"===this.maMethod?this.atr=n.Std.ema(this._context.new_var(this.tr),this.period,this._context):this.atr=this.tr/this.period+(1-1/this.period)*this.atr,this.atr*this.atrMult},this.calculateVolatility=function(){var e,t,i,o;return n.Std.close(this._context)===this.bars[this.bars.length-1]?this.lastSar:(this.bars.push(n.Std.close(this._context)),1===this.count?(this.atr=n.Std.high(this._context)-n.Std.low(this._context),this.sic=n.Std.close(this._context)):this.count<this.period?(e=n.Std.high(this._context)-n.Std.low(this._context),t=n.Std.high(this._context)-this.bars[this.bars.length-2],i=this.bars[this.bars.length-2]-n.Std.low(this._context),this.atr+=Math.max(e,t,i),n.Std.close(this._context)>this.sic&&(this.sic=n.Std.close(this._context))):this.count===this.period?(e=n.Std.high(this._context)-n.Std.low(this._context),t=n.Std.high(this._context)-this.bars[this.bars.length-2],i=this.bars[this.bars.length-2]-n.Std.low(this._context),this.atr+=Math.max(e,t,i),this.atr*=1/this.period,n.Std.close(this._context)>this.sic&&(this.sic=n.Std.close(this._context)),this.position="LONG",this.nextsar=this.sic-this.atr*this.atrMult):(o=this.nextsar,"LONG"===this.position?n.Std.close(this._context)<o?(this.position="SHORT",this.sic=n.Std.close(this._context),this.nextsar=this.sic+this.computeATR()):(this.position="LONG",this.sic=Math.max(n.Std.close(this._context),this.sic),this.nextsar=this.sic-this.computeATR()):"SHORT"===this.position&&(n.Std.close(this._context)>o?(this.position="LONG",this.sic=n.Std.close(this._context),this.nextsar=this.sic-this.computeATR()):(this.position="SHORT",this.sic=Math.min(n.Std.close(this._context),this.sic),this.nextsar=this.sic+this.computeATR())),this.lastSar=o),this.count++,o)},this.main=function(e,t){return this._context=e,this._input=t,this._context.select_sym(0),[this.calculateVolatility()]}}},{name:"VWAP",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:0,transparency:0,visible:!0,color:"#3A6CA8"}},precision:4},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"VWAP",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"VWAP",shortDescription:"VWAP",is_price_study:!0,inputs:[],id:"VWAP@tv-basicstudies-1",scriptIdPart:"",name:"VWAP"},constructor:function(){this.f_1=function(e){e.hist=null,
e.add_hist()},this.init=function(e,t){this._isNewSession=null},this.main=function(e,t){var i,o,r;return this._context=e,this._input=t,i=e.new_var(),o=e.new_var(),(r=this._context.symbol.time)&&(null===this._isNewSession&&(this._isNewSession=n.Std.createNewSessionCheck(e)),this._isNewSession(r)&&(this.f_1(i),this.f_1(o))),i.set(n.Std.nz(i.get(1))+n.Std.hlc3(this._context)*n.Std.volume(this._context)),o.set(n.Std.nz(o.get(1))+n.Std.volume(this._context)),[i.get(0)/o.get(0)]}}},{name:"VWMA",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{in_0:20}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"VWMA",shortDescription:"VWMA",is_price_study:!0,inputs:[{id:"in_0",name:"len",defval:20,type:"integer",min:1,max:1e4}],id:"VWMA@tv-basicstudies-1",scriptIdPart:"",name:"VWMA"},constructor:function(){this.main=function(e,t){var i,o,r;return this._context=e,this._input=t,i=n.Std.close(this._context),o=this._input(0),r=this._context.new_var(i),[n.Std.vwma(r,o,this._context)]}}},{name:"Volume Oscillator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:5,in_1:10}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Volume Oscillator",shortDescription:"Volume Osc",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"shortlen",defval:5,type:"integer",min:1,max:4999},{id:"in_1",name:"longlen",defval:10,type:"integer",min:1,max:4999}],id:"Volume Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Volume Oscillator"},constructor:function(){this.f_0=function(e,t){return 100*(e-t)/t},this.main=function(e,t){var i,o,r,s,a,l,c;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=n.Std.volume(this._context),s=this._context.new_var(r),a=n.Std.ema(s,i,this._context),l=this._context.new_var(r),c=n.Std.ema(l,o,this._context),[this.f_0(a,c)]}}},{name:"Vortex Indicator",metainfo:{_metainfoVersion:42,isTVScript:!1,isTVScriptStub:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"VI +",histogramBase:0,joinPoints:!1,isHidden:!1},plot_1:{title:"VI -",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Vortex Indicator",shortDescription:"VI",is_price_study:!1,is_hidden_study:!1,id:"vortex_indicator@tv-basicstudies-1",inputs:[{id:"in_0",name:"Period",defval:14,type:"integer",min:2,max:1e12}],
scriptIdPart:"",name:"Vortex Indicator"},constructor:function(){this.f_0=function(){var e=this._input(0),t=this._context.new_var(n.Std.low(this._context)),i=this._context.new_var(n.Std.abs(n.Std.high(this._context)-t.get(1))),o=n.Std.sum(i,e,this._context),r=this._context.new_var(n.Std.high(this._context)),s=this._context.new_var(n.Std.abs(n.Std.low(this._context)-r.get(1))),a=n.Std.sum(s,e,this._context),l=this._context.new_var(n.Std.atr(1,this._context)),c=n.Std.sum(l,e,this._context),u=o/c,h=a/c;return[u,h]},this.main=function(e,t){return this._context=e,this._input=t,this.f_0()}}},{name:"Willams %R",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:-20},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:-80}],filledAreasStyle:{fill_0:{color:"#000080",transparency:90,visible:!0}},inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Williams %R",shortDescription:"%R",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"length",defval:14,type:"integer",min:1,max:2e3}],id:"Willams %R@tv-basicstudies-1",scriptIdPart:"",name:"Willams %R"},constructor:function(){this.f_0=function(e,t,i){return 100*(e-t)/(t-i)},this.main=function(e,t){var i,o,r,s,a,l,c;return this._context=e,this._input=t,i=this._input(0),o=n.Std.high(this._context),r=this._context.new_var(o),s=n.Std.highest(r,i,this._context),a=n.Std.low(this._context),l=this._context.new_var(a),c=n.Std.lowest(l,i,this._context),[this.f_0(n.Std.close(this._context),s,c)]}}},{name:"Williams Alligator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"}},precision:4,inputs:{in_0:21,in_1:13,in_2:8}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Jaw",histogramBase:0,joinPoints:!1},plot_1:{title:"Teeth",histogramBase:0,joinPoints:!1},plot_2:{title:"Lips",histogramBase:0,joinPoints:!1}},description:"Williams Alligator",shortDescription:"Alligator",is_price_study:!0,inputs:[{id:"in_0",name:"jawLength",defval:21,type:"integer",min:1,max:2e3},{id:"in_1",name:"teethLength",defval:13,type:"integer",min:1,max:2e3},{id:"in_2",name:"lipsLength",defval:8,type:"integer",min:1,max:2e3}],id:"Williams Alligator@tv-basicstudies-1",scriptIdPart:"",name:"Williams Alligator"},constructor:function(){
this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=this._input(2),s=n.Std.hl2(this._context),a=this._context.new_var(s),l=n.Std.ema(a,i,this._context),c=this._context.new_var(s),u=n.Std.ema(c,o,this._context),h=this._context.new_var(s),d=n.Std.ema(h,r,this._context),[{value:l,offset:8},{value:u,offset:5},{value:d,offset:3}]}}},{name:"Williams Fractals",metainfo:{_metainfoVersion:42,isTVScript:!1,isTVScriptStub:!1,defaults:{styles:{plot_0:{plottype:"shape_triangle_down",visible:!0,location:"BelowBar",transparency:0,color:"#800000"},plot_1:{plottype:"shape_triangle_up",visible:!0,location:"AboveBar",transparency:0,color:"#808000"}},precision:4,inputs:{in_0:2}},plots:[{id:"plot_0",type:"shapes"},{id:"plot_1",type:"shapes"}],styles:{plot_0:{title:"Down fractals",isHidden:!1},plot_1:{title:"Up fractals",isHidden:!1}},description:"Williams Fractal",shortDescription:"Fractals",is_price_study:!0,is_hidden_study:!1,id:"Williams Fractals@tv-basicstudies-1",inputs:[{id:"in_0",name:"Periods",defval:2,type:"integer",min:2,max:1e12}],scriptIdPart:"",name:"Williams Fractals",isCustomIndicator:!0},constructor:function(){this.f_0=function(){
var e=this._input(0),t=this._context.new_var(n.Std.high(this._context)),i=n.Std.or(n.Std.and(n.Std.and(n.Std.lt(t.get(e+2),t.get(e)),n.Std.lt(t.get(e+1),t.get(e))),n.Std.and(n.Std.lt(t.get(e-1),t.get(e)),n.Std.lt(t.get(e-2),t.get(e)))),n.Std.or(n.Std.or(n.Std.and(n.Std.lt(t.get(e+3),t.get(e)),n.Std.and(n.Std.and(n.Std.lt(t.get(e+2),t.get(e)),n.Std.eq(t.get(e+1),t.get(e))),n.Std.and(n.Std.lt(t.get(e-1),t.get(e)),n.Std.lt(t.get(e-2),t.get(e))))),n.Std.and(n.Std.and(n.Std.lt(t.get(e+4),t.get(e)),n.Std.lt(t.get(e+3),t.get(e))),n.Std.and(n.Std.and(n.Std.eq(t.get(e+2),t.get(e)),n.Std.le(t.get(e+1),t.get(e))),n.Std.and(n.Std.lt(t.get(e-1),t.get(e)),n.Std.lt(t.get(e-2),t.get(e)))))),n.Std.or(n.Std.and(n.Std.and(n.Std.lt(t.get(e+5),t.get(e)),n.Std.and(n.Std.lt(t.get(e+4),t.get(e)),n.Std.eq(t.get(e+3),t.get(e)))),n.Std.and(n.Std.and(n.Std.eq(t.get(e+2),t.get(e)),n.Std.le(t.get(e+1),t.get(e))),n.Std.and(n.Std.lt(t.get(e-1),t.get(e)),n.Std.lt(t.get(e-2),t.get(e))))),n.Std.and(n.Std.and(n.Std.and(n.Std.lt(t.get(e+6),t.get(e)),n.Std.lt(t.get(e+5),t.get(e))),n.Std.and(n.Std.eq(t.get(e+4),t.get(e)),n.Std.le(t.get(e+3),t.get(e)))),n.Std.and(n.Std.and(n.Std.eq(t.get(e+2),t.get(e)),n.Std.le(t.get(e+1),t.get(e))),n.Std.and(n.Std.lt(t.get(e-1),t.get(e)),n.Std.lt(t.get(e-2),t.get(e)))))))),o=this._context.new_var(n.Std.low(this._context)),r=n.Std.or(n.Std.and(n.Std.and(n.Std.gt(o.get(e+2),o.get(e)),n.Std.gt(o.get(e+1),o.get(e))),n.Std.and(n.Std.gt(o.get(e-1),o.get(e)),n.Std.gt(o.get(e-2),o.get(e)))),n.Std.or(n.Std.or(n.Std.and(n.Std.gt(o.get(e+3),o.get(e)),n.Std.and(n.Std.and(n.Std.gt(o.get(e+2),o.get(e)),n.Std.eq(o.get(e+1),o.get(e))),n.Std.and(n.Std.gt(o.get(e-1),o.get(e)),n.Std.gt(o.get(e-2),o.get(e))))),n.Std.and(n.Std.and(n.Std.gt(o.get(e+4),o.get(e)),n.Std.gt(o.get(e+3),o.get(e))),n.Std.and(n.Std.and(n.Std.eq(o.get(e+2),o.get(e)),n.Std.ge(o.get(e+1),o.get(e))),n.Std.and(n.Std.gt(o.get(e-1),o.get(e)),n.Std.gt(o.get(e-2),o.get(e)))))),n.Std.or(n.Std.and(n.Std.and(n.Std.gt(o.get(e+5),o.get(e)),n.Std.and(n.Std.gt(o.get(e+4),o.get(e)),n.Std.eq(o.get(e+3),o.get(e)))),n.Std.and(n.Std.and(n.Std.eq(o.get(e+2),o.get(e)),n.Std.ge(o.get(e+1),o.get(e))),n.Std.and(n.Std.gt(o.get(e-1),o.get(e)),n.Std.gt(o.get(e-2),o.get(e))))),n.Std.and(n.Std.and(n.Std.and(n.Std.gt(o.get(e+6),o.get(e)),n.Std.gt(o.get(e+5),o.get(e))),n.Std.and(n.Std.eq(o.get(e+4),o.get(e)),n.Std.ge(o.get(e+3),o.get(e)))),n.Std.and(n.Std.and(n.Std.eq(o.get(e+2),o.get(e)),n.Std.ge(o.get(e+1),o.get(e))),n.Std.and(n.Std.gt(o.get(e-1),o.get(e)),n.Std.gt(o.get(e-2),o.get(e))))))));return[r,i]},this.main=function(e,t){this._context=e,this._input=t;var i=this.f_0();return[{value:i[0],offset:-2},{value:i[1],offset:-2}]}}}]},"2h0C":function(e,t,i){function n(e,t,i,n,r,s){e?(this._control=e,this._property=t,this._applyOnFly=i,this._undoModel=n,this._undoText=r,this._doesNotAffectSave=!1,t&&(this._formatters=[],this._changed=!1,this.setValue(t.value()),t.listeners().subscribe(this,this.propertyChanged))):o.logDebug("Missing control")}var o=i("uOxu").getLogger("Chart.PropertyPage.Binding")
;n.prototype.addFormatter=function(e){this._formatters.push(e),this.setValue(this._property.value())},n.prototype._formatValue=function(e){return this._formatters.reduce(function(e,t){return t(e)},e)},n.prototype._setValueToProperty=function(e){this._setter?this._setter.call(this,e):this.setValueToProperty(e)},n.prototype._attachToControl=function(e,t){var i=this;t?e.on("keyup change input",function(e){var t=i.value();i._setValueToProperty(t),i.setValue(t)}):(e.keypress(function(e){if(i._changed=!0,13===e.which){var t=i.value();i._setValueToProperty(t),i.setValue(t)}}),e.focusout(function(e){var t=i.value();i.changed()&&(i._setValueToProperty(t),i.setValue(t))}),e.change(function(e){var t=i.value();$(e.target).is(".ticker")?(void 0!==i._changeTimerId&&clearTimeout(i._changeTimerId),i._changeTimerId=setTimeout(function(){i._setValueToProperty(t)},250)):i._setValueToProperty(t),i.setValue(t)}))},n.prototype.control=function(){return this._control},n.prototype.changed=function(){return this._changed},n.prototype.setValueToProperty=function(e){this._undoModel.setProperty(this._property,e,this._undoText,this._doesNotAffectSave),this._changed=!1},n.prototype.property=function(){return this._property},n.prototype.propertyChanged=function(e){this.setValue(e.value())},n.prototype.destroy=function(){this._property&&this._property.listeners().unsubscribe(this,this.propertyChanged)},n.prototype.disableAffectingSave=function(){this._doesNotAffectSave=!0},t.Binding=n},"2jXJ":function(e,t,i){"use strict";i.r(t),i.d(t,"supportedLineTools",function(){return n});var n={cursor:{name:"cursor",onlySelectable:!0},dot:{name:"dot",onlySelectable:!0},arrow_cursor:{name:"arrow",onlySelectable:!0},eraser:{name:"eraser",onlySelectable:!0},measure:{name:"measure",onlySelectable:!0},zoom:{name:"zoom",onlySelectable:!0},brush:{name:"LineToolBrush",onlySelectable:!0},text:{name:"LineToolText"},anchored_text:{name:"LineToolTextAbsolute"},note:{name:"LineToolNote"},anchored_note:{name:"LineToolNoteAbsolute"},callout:{name:"LineToolCallout"},balloon:{name:"LineToolBalloon"},arrow_up:{name:"LineToolArrowMarkUp"},arrow_down:{name:"LineToolArrowMarkDown"},arrow_left:{name:"LineToolArrowMarkLeft"},arrow_right:{name:"LineToolArrowMarkRight"},price_label:{name:"LineToolPriceLabel"},flag:{name:"LineToolFlagMark"},vertical_line:{name:"LineToolVertLine"},horizontal_line:{name:"LineToolHorzLine"},cross_line:{name:"LineToolCrossLine"},horizontal_ray:{name:"LineToolHorzRay"},trend_line:{name:"LineToolTrendLine"},info_line:{name:"LineToolInfoLine"},trend_angle:{name:"LineToolTrendAngle"},arrow:{name:"LineToolArrow"},ray:{name:"LineToolRay"},extended:{name:"LineToolExtended"},parallel_channel:{name:"LineToolParallelChannel"},disjoint_angle:{name:"LineToolDisjointAngle"},flat_bottom:{name:"LineToolFlatBottom"},pitchfork:{name:"LineToolPitchfork"},schiff_pitchfork_modified:{name:"LineToolSchiffPitchfork"},schiff_pitchfork:{name:"LineToolSchiffPitchfork2"},inside_pitchfork:{name:"LineToolInsidePitchfork"},pitchfan:{name:"LineToolPitchfan"},gannbox:{
name:"LineToolGannSquare"},gannbox_square:{name:"LineToolGannComplex"},gannbox_fixed:{name:"LineToolGannFixed"},gannbox_fan:{name:"LineToolGannFan"},fib_retracement:{name:"LineToolFibRetracement"},fib_trend_ext:{name:"LineToolTrendBasedFibExtension"},fib_speed_resist_fan:{name:"LineToolFibSpeedResistanceFan"},fib_timezone:{name:"LineToolFibTimeZone"},fib_trend_time:{name:"LineToolTrendBasedFibTime"},fib_circles:{name:"LineToolFibCircles"},fib_spiral:{name:"LineToolFibSpiral"},fib_speed_resist_arcs:{name:"LineToolFibSpeedResistanceArcs"},fib_wedge:{name:"LineToolFibWedge"},fib_channel:{name:"LineToolFibChannel"},xabcd_pattern:{name:"LineTool5PointsPattern"},cypher_pattern:{name:"LineToolCypherPattern"},abcd_pattern:{name:"LineToolABCD"},triangle_pattern:{name:"LineToolTrianglePattern"},"3divers_pattern":{name:"LineToolThreeDrivers"},head_and_shoulders:{name:"LineToolHeadAndShoulders"},elliott_impulse_wave:{name:"LineToolElliottImpulse"},elliott_triangle_wave:{name:"LineToolElliottTriangle"},elliott_triple_combo:{name:"LineToolElliottTripleCombo"},elliott_correction:{name:"LineToolElliottCorrection"},elliott_double_combo:{name:"LineToolElliottDoubleCombo"},cyclic_lines:{name:"LineToolCircleLines"},time_cycles:{name:"LineToolTimeCycles"},sine_line:{name:"LineToolSineLine"},long_position:{name:"LineToolRiskRewardLong"},short_position:{name:"LineToolRiskRewardShort"},forecast:{name:"LineToolPrediction"},date_range:{name:"LineToolDateRange"},price_range:{name:"LineToolPriceRange"},date_and_price_range:{name:"LineToolDateAndPriceRange"},bars_pattern:{name:"LineToolBarsPattern"},ghost_feed:{name:"LineToolGhostFeed"},projection:{name:"LineToolProjection"},rectangle:{name:"LineToolRectangle"},rotated_rectangle:{name:"LineToolRotatedRectangle"},ellipse:{name:"LineToolEllipse"},triangle:{name:"LineToolTriangle"},polyline:{name:"LineToolPolyline"},curve:{name:"LineToolBezierQuadro"},double_curve:{name:"LineToolBezierCubic"},arc:{name:"LineToolArc"},icon:{name:"LineToolIcon"}}},"2kV1":function(e,t,i){"use strict";var n,o,r,s,a,l,c;i.r(t),i.d(t,"StudyStatusView",function(){return c}),n=i("mrSG"),o=i("nBJD"),r=i("8sOK"),s={NONE:"Default"},a=!1,l="#ff0000",c=function(e){function t(t,i){var n=e.call(this,i)||this;return n._source=t,n}return Object(n.__extends)(t,e),t.prototype.color=function(){return this._source instanceof r.StudyStub?e.prototype.color.call(this):this._source.isFailed()||this._source.metaInfo&&this._source.metaInfo().isTVScriptStub?l:e.prototype.color.call(this)},t.prototype.getSplitTitle=function(){return this._source.isFailed()?[this._source.title(!0,s,void 0,a)+": "+this._source.status(),void 0]:this._source.titleInParts(!0,s,void 0,a)},t.prototype.update=function(){this._source.isFailed()?this._text=this._source.title(!0,s,void 0,a)+": "+this._source.status():this._text=this._source.title(!0,s,void 0,a)+" "+this._source.status()},t}(o.a)},"3/8U":function(e,t,i){"use strict";function n(e){return"dark"===e?"rgba(30,136,229,0.25)":"rgba(33,150,243,0.25)"}i.r(t),i.d(t,"axesHighlightColor",function(){return n})},
"38az":function(e,t,i){"use strict";function n(){this.backColorers=[]}function o(e){n.call(this),this._series=e}function r(e,t){n.call(this),this._study=e,this._plotIndex=t}var s=i("k9/m").PlotRowSearchMode;n.prototype.barStyle=function(e,t,i){var n,o={};for(n=this.backColorers.length-1;n>=0;n--)this.backColorers[n].applyBarStyle(e,t,o,i);return this.applyBarStyle(e,t,o,i),o},n.prototype.pushBackBarColorer=function(e){this.backColorers.push(e)},n.prototype.applyBarStyle=function(e,t,i){throw new Error("This function is supposed to be reimplemented in a subclass")},inherit(o,n),o.upColor=function(e,t){switch(e.style.value()){case TradingView.Series.STYLE_LINE:return e.lineStyle.color.value();case TradingView.Series.STYLE_AREA:return e.areaStyle.linecolor.value();case TradingView.Series.STYLE_BARS:return e.barStyle.upColor.value();case TradingView.Series.STYLE_CANDLES:return e.candleStyle.upColor.value();case TradingView.Series.STYLE_HOLLOW_CANDLES:return e.hollowCandleStyle.upColor.value();case TradingView.Series.STYLE_HEIKEN_ASHI:return e.haStyle.upColor.value();case TradingView.Series.STYLE_BASELINE:return e.baselineStyle.topLineColor.value();case TradingView.Series.STYLE_HILO:return e.hiloStyle.color.value()}throw new Error("Unknown series style")},o.downColor=function(e,t){switch(e.style.value()){case TradingView.Series.STYLE_LINE:return e.lineStyle.color.value();case TradingView.Series.STYLE_AREA:return e.areaStyle.linecolor.value();case TradingView.Series.STYLE_BARS:return e.barStyle.downColor.value();case TradingView.Series.STYLE_CANDLES:return e.candleStyle.downColor.value();case TradingView.Series.STYLE_HOLLOW_CANDLES:return e.hollowCandleStyle.downColor.value();case TradingView.Series.STYLE_HEIKEN_ASHI:return e.haStyle.downColor.value();case TradingView.Series.STYLE_BASELINE:return e.baselineStyle.bottomLineColor.value();case TradingView.Series.STYLE_HILO:return e.hiloStyle.color.value()}throw new Error("Unknown series style")},o.prototype._applyLineStyle=function(e,t,i,n,r){i.barColor=o.upColor(r)},o.prototype._applyAreaStyle=function(e,t,i,n,r){i.barColor=o.upColor(r)},o.prototype._applyBarStyle=function(e,t,i,n,r){var s,a=o.upColor(r),l=o.downColor(r),c=this.findBar(e,!1,n);r.barStyle.barColorsOnPrevClose.value()?(s=this.findPrevBar(e,!1,n),i.barColor=s[TradingView.CLOSE_PLOT]<=c[TradingView.CLOSE_PLOT]?a:l,i.barBorderColor=s[TradingView.CLOSE_PLOT]<=c[TradingView.CLOSE_PLOT]?a:l):(i.barColor=c[TradingView.OPEN_PLOT]<=c[TradingView.CLOSE_PLOT]?a:l,i.barBorderColor=c[TradingView.OPEN_PLOT]<=c[TradingView.CLOSE_PLOT]?a:l)},o.prototype._applyCandleStyle=function(e,t,i,n,r){
var s,a=o.upColor(r,t),l=o.downColor(r,t),c=r.candleStyle.borderUpColor?r.candleStyle.borderUpColor.value():r.candleStyle.borderColor.value(),u=r.candleStyle.borderDownColor?r.candleStyle.borderDownColor.value():r.candleStyle.borderColor.value(),h=r.candleStyle.wickUpColor?r.candleStyle.wickUpColor.value():r.candleStyle.wickColor.value(),d=r.candleStyle.wickDownColor?r.candleStyle.wickDownColor.value():r.candleStyle.wickColor.value(),p=this.findBar(e,!1,n);s=r.candleStyle.barColorsOnPrevClose.value()?this.findPrevBar(e,!1,n)[TradingView.CLOSE_PLOT]<=p[TradingView.CLOSE_PLOT]:p[TradingView.OPEN_PLOT]<=p[TradingView.CLOSE_PLOT],i.barColor=s?a:l,i.barBorderColor=s?c:u,i.barWickColor=s?h:d},o.prototype._applyHollowCandleStyle=function(e,t,i,n,r){var s=o.upColor(r,t),a=o.downColor(r,t),l=r.hollowCandleStyle.borderUpColor?r.hollowCandleStyle.borderUpColor.value():r.hollowCandleStyle.borderColor.value(),c=r.hollowCandleStyle.borderDownColor?r.hollowCandleStyle.borderDownColor.value():r.hollowCandleStyle.borderColor.value(),u=r.hollowCandleStyle.wickUpColor?r.hollowCandleStyle.wickUpColor.value():r.hollowCandleStyle.wickColor.value(),h=r.hollowCandleStyle.wickDownColor?r.hollowCandleStyle.wickDownColor.value():r.hollowCandleStyle.wickColor.value(),d=this.findBar(e,!1,n),p=this.findPrevBar(e,!1,n);p[TradingView.CLOSE_PLOT]<=d[TradingView.CLOSE_PLOT]?(i.barColor=s,i.barBorderColor=l,i.barWickColor=u):(i.barColor=a,i.barBorderColor=c,i.barWickColor=h),i.isBarHollow=d[TradingView.OPEN_PLOT]<=d[TradingView.CLOSE_PLOT]},o.prototype._applyHAStyle=function(e,t,i,n,r){var s,a=o.upColor(r,t),l=o.downColor(r,t),c=r.haStyle.borderUpColor.value(),u=r.haStyle.borderDownColor.value(),h=r.haStyle.wickUpColor.value(),d=r.haStyle.wickDownColor.value(),p=this.findBar(e,t,n);s=r.haStyle.barColorsOnPrevClose.value()?this.findPrevBar(e,t,n)[TradingView.CLOSE_PLOT]<=p[TradingView.CLOSE_PLOT]:p[TradingView.OPEN_PLOT]<=p[TradingView.CLOSE_PLOT],i.barColor=s?a:l,i.barBorderColor=s?c:u,i.barWickColor=s?h:d},o.prototype._applyBaseLineStyle=function(e,t,i,n,r){var s=this.findBar(e,t,n),a=r.baselineStyle,l=this._series.priceScale(),c=Math.round(l.height()*(Math.abs(100-a.baseLevelPercentage.value())/100)),u=this._series.firstValue(),h=l.coordinateToPrice(c,u);s[TradingView.CLOSE_PLOT]>h?i.barColor=o.upColor(r,t):i.barColor=o.downColor(r,t)},o.prototype._applyHiLoStyle=function(e,t,i,n,r){i.barColor=o.upColor(r,t),i.barBorderColor=r.hiloStyle.borderColor.value()},o.prototype.applyBarStyle=function(e,t,i,n){i||(i={}),i.barColor=null,i.barBorderColor=null,i.barWickColor=null,i.isBarHollow=null,i.isBarUp=null,i.upColor=null,i.downColor=null,i.isTwoColorBar=null,i.isMergedBar=null;var o=this._series.properties();switch(o.style.value()){case TradingView.Series.STYLE_LINE:this._applyLineStyle(e,t,i,n,o);break;case TradingView.Series.STYLE_AREA:this._applyAreaStyle(e,t,i,n,o);break;case TradingView.Series.STYLE_BARS:this._applyBarStyle(e,t,i,n,o);break;case TradingView.Series.STYLE_CANDLES:this._applyCandleStyle(e,t,i,n,o);break
;case TradingView.Series.STYLE_HOLLOW_CANDLES:this._applyHollowCandleStyle(e,t,i,n,o);break;case TradingView.Series.STYLE_HEIKEN_ASHI:this._applyHAStyle(e,t,i,n,o);break;case TradingView.Series.STYLE_BASELINE:this._applyBaseLineStyle(e,t,i,n,o);break;case TradingView.Series.STYLE_HILO:this._applyHiLoStyle(e,t,i,n,o)}return i},o.prototype.getSeriesBars=function(e){return e?this._series.nsBars():this._series.bars()},o.prototype._findBarFieldValue=function(e,t,i){var n=this.getSeriesBars(i).valueAt(e);if(null!==n)return n[t]},o.prototype.findBar=function(e,t,i){return i?i.value:this.getSeriesBars(t).valueAt(e)||[]},o.prototype.findPrevBar=function(e,t,i){var n;return i&&i.previousValue?i.previousValue:null!==(n=this._series.bars()._search(e,s.Exact))&&n>0?this._series.bars()._valueAt(n-1):[]},inherit(r,n),r.prototype.applyBarStyle=function(e,t,i){var n,o,r,s,a,l,c,u,h,d,p,_;return i||(i={}),t?i:(n=this._study.properties()).visible.value()?(o=this._study.metaInfo(),(r=this._study.data())&&0!==r.size()?(s=o.plots[this._plotIndex],this._study.getMinFirstBarIndexForPlot(s.id)>e?i:(a=n.styles[s.id]).visible&&!a.visible.value()?i:(l=this._study.offset(s.id),null===(c=r.valueAt(e-l))?i:null==(u=c[this._plotIndex+1])?i:(u=Math.round(u),h=o.plots[this._plotIndex].palette,d=n.palettes[h],p=o.palettes[h].valToIndex?o.palettes[h].valToIndex[u]:u,_=d.colors[p].color.value(),i.barColor=_,i.upColor=_.color,i.downColor=_.color,i))):i):i},t.SeriesBarColorer=o,t.StudyBarColorer=r},"3ClC":function(e,t,i){"use strict";function n(e,t){return void 0===t&&(t="shift"),{studyConstructor:e,colorRotationMode:t}}function o(e){return e instanceof f.Study}function r(e){return e instanceof StudyStrategy}function s(e){return e instanceof S.StudyStub}function a(e){return e instanceof Fundamental}function l(e){return!1}function c(e){return u(e)===b}function u(e){var t="study_"+(e.classId||e.shortId);return t.startsWith(b)?b:t}function h(e,t,i,n,o){var r,s;return s=new((r=u(n))in w?w[r].studyConstructor:f.Study)(e,t,i,n),void 0!==o&&s.setId(o),s}function d(e){var t=u(e);return t in w?w[t].colorRotationMode:1!==e.plots.length?"shift":void 0===e.pine?"loop":_.a.isStandardPine(e.id)?"loop":"shift"}var p,_,f,m,y,g,v,S,b,w,P;for(P in i.r(t),i.d(t,"isStudy",function(){return o}),i.d(t,"isStudyStrategy",function(){return r}),i.d(t,"isStudyStub",function(){return s}),i.d(t,"isFundamentalStudy",function(){return a}),i.d(t,"isESDStudy",function(){return l}),i.d(t,"isFundamentalStudyMetaInfo",function(){return c}),i.d(t,"createStudy",function(){return h}),i.d(t,"studyColorRotationMode",function(){return d}),p=i("0YCj"),_=i.n(p),f=i("GVHu"),i.n(f),m=i("FVma"),i.n(m),y=i("cKqi"),i.n(y),g=i("0gbU"),i.n(g),v=i("TMWk"),i.n(v),S=i("8sOK"),b="study_Internal$STD;Fund_",w={study_PivotPointsStandard:n(m.study_PivotPointsStandard),study_Overlay:n(y.study_Overlay,"loop"),study_Compare:n(g.study_Compare,"loop"),study_ScriptWithDataOffset:n(v.study_ScriptWithDataOffset)})w.hasOwnProperty(P)&&(TradingView[P]=w[P].studyConstructor)},"3UA0":function(e,t){e.exports.tzData={
"America/New_York":{time:[-2717668562,-1633298400,-1615154400,-1601848800,-1583704800,-1570399200,-1551650400,-1536530400,-1523224800,-1504476e3,-1491775200,-1473026400,-1459720800,-1441576800,-1428271200,-1410127200,-1396821600,-1378677600,-1365372e3,-1347228e3,-1333922400,-1315173600,-1301868e3,-1283724e3,-1270418400,-1252274400,-1238968800,-1220824800,-1207519200,-1189375200,-1176069600,-1157320800,-114462e4,-1125871200,-1112565600,-1094421600,-1081116e3,-1062972e3,-1049666400,-1031522400,-1018216800,-1000072800,-986767200,-968018400,-955317600,-936568800,-923263200,-905119200,-891813600,-880236e3,-76941e4,-765410400,-747266400,-733960800,-715816800,-702511200,-684367200,-671061600,-652917600,-639612e3,-620863200,-608162400,-589413600,-576108e3,-557964e3,-544658400,-526514400,-513208800,-495064800,-481759200,-463615200,-447285600,-431560800,-415836e3,-400111200,-384386400,-368661600,-352936800,-337212e3,-321487200,-305762400,-289432800,-273708e3,-257983200,-242258400,-226533600,-210808800,-195084e3,-179359200,-163634400,-147909600,-13158e4,-11646e4,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,126669600,152071200,162352800,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3],
offset:[-17762,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3]},"America/Los_Angeles":{
time:[-2717668378,-1633298400,-1615154400,-1601848800,-1583704800,-880236e3,-769420800,-765410400,-687995940,-662680800,-620866800,-608162400,-589417200,-576108e3,-557967600,-544658400,-526518e3,-513208800,-495068400,-481759200,-463618800,-450309600,-431564400,-418255200,-400114800,-386805600,-368665200,-355356e3,-337215600,-323906400,-305766e3,-292456800,-273711600,-261007200,-242262e3,-226533600,-210812400,-195084e3,-179362800,-163634400,-147913200,-13158e4,-116463600,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,126669600,152071200,162352800,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3],offset:[-28378,-28800,-25200,-28800,-25200,-28800,-25200,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800]},"America/Chicago":{
time:[-2717668236,-1633298400,-1615154400,-1601848800,-1583704800,-1563746400,-1551650400,-1538949600,-1520200800,-1504476e3,-1491775200,-1473026400,-1459720800,-1441576800,-1428271200,-1410127200,-1396821600,-1378677600,-1365372e3,-1347228e3,-1333922400,-1315173600,-1301868e3,-1283724e3,-1270418400,-1252274400,-1238968800,-1220824800,-1207519200,-1189375200,-1176069600,-1157320800,-114462e4,-1125871200,-1112565600,-1094421600,-1081116e3,-1067810400,-1045432800,-1031522400,-1018216800,-1000072800,-986767200,-968018400,-955317600,-936568800,-923263200,-905119200,-891813600,-880236e3,-769413600,-765410400,-747266400,-733960800,-715816800,-702511200,-684367200,-671061600,-652917600,-639612e3,-620863200,-608162400,-589413600,-576108e3,-557964e3,-544658400,-526514400,-513208800,-495064800,-481759200,-463615200,-447285600,-431560800,-415836e3,-400111200,-384386400,-368661600,-352936800,-337212e3,-321487200,-305762400,-289432800,-273708e3,-257983200,-242258400,-226533600,-210808800,-195084e3,-179359200,-163634400,-147909600,-13158e4,-11646e4,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,126669600,152071200,162352800,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3],
offset:[-21036,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600]},"America/Phoenix":{time:[-2717670498,-1633298400,-1615154400,-1601848800,-1583704800,-880236e3,-820540740,-812678340,-796867140,-84405600,-68680800,1924966800],offset:[-26898,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200]},"America/Toronto":{
time:[-2366755200,-1632088800,-1615154400,-1601771400,-1583712e3,-1567375200,-1554681600,-1534716e3,-1524088800,-1503266400,-149238e4,-1471816800,-1460930400,-1440972e3,-1428876e3,-1409522400,-1397426400,-1378072800,-1365976800,-1346623200,-1333922400,-1315173600,-1301868e3,-1283724e3,-1270418400,-1252274400,-1238968800,-1220824800,-1207519200,-1188770400,-1176069600,-1157320800,-1144015200,-1125871200,-1112565600,-1094421600,-1081116e3,-1062972e3,-1049666400,-1031522400,-1018216800,-1000072800,-986767200,-968018400,-955317600,-936568800,-880232400,-76941e4,-765410400,-747266400,-733960800,-715824e3,-702518400,-684374400,-671068800,-652924800,-634176e3,-620863200,-602719200,-589413600,-576108e3,-557964e3,-544658400,-526514400,-513208800,-495064800,-481759200,-463615200,-450309600,-431560800,-418255200,-400111200,-384386400,-368661600,-352936800,-337212e3,-321487200,-305762400,-289432800,-273708e3,-257983200,-242258400,-226533600,-210808800,-195084e3,-179359200,-163634400,-147909600,-13158e4,-11646e4,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,136346400,152071200,167796e3,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3],
offset:[-19052,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-14400,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3]},"America/Vancouver":{
time:[-2713910400,-1632088800,-1615154400,-880236e3,-769420800,-765410400,-747266400,-733960800,-715816800,-702511200,-684367200,-671061600,-652917600,-639612e3,-620863200,-608162400,-589413600,-576108e3,-557964e3,-544658400,-526514400,-513208800,-495064800,-481759200,-463615200,-450309600,-431560800,-418255200,-400111200,-386805600,-368661600,-355356e3,-337212e3,-323906400,-305762400,-292456800,-273708e3,-261007200,-242258400,-226533600,-210808800,-195084e3,-179359200,-163634400,-147909600,-13158e4,-11646e4,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,136346400,152071200,167796e3,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3],
offset:[-29548,-28800,-25200,-28800,-25200,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800]},"America/Argentina/Buenos_Aires":{time:[-2372112e3,-1567468800,-1233446400,-1222992e3,-1205971200,-1194048e3,-117288e4,-1162512e3,-1141344e3,-1130976e3,-1109808e3,-109944e4,-1078272e3,-1067817600,-1046649600,-1036281600,-1015113600,-1004745600,-983577600,-973209600,-952041600,-941587200,-931046400,-900892800,-890352e3,-83376e4,-82728e4,-752284800,-733795200,-197337600,-190857600,-184204800,-164505600,-152668800,-132969600,-121132800,-101433600,-86832e3,-71107200,-54777600,-39052800,-23328e3,-7603200,128131200,136598400,596937600,605059200,624412800,636508800,656467200,667958400,687916800,699408e3,719366400,731462400,938908800,952041600,1198972800,1205625600,1224374400,1237075200,1924981200],offset:[-14028,-15408,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-10800,-10800,-7200,-10800,-7200,-10800]},"America/El_Salvador":{time:[-1546300800,546998400,559699200,578448e3,591148800,1924970400],offset:[-21408,-21600,-18e3,-21600,-18e3,-21600]},"America/Sao_Paulo":{
time:[-1767225600,-1206968400,-1191369600,-1175385600,-1159833600,-633830400,-622076400,-602294400,-59184e4,-570758400,-560217600,-539136e3,-53136e4,-195436800,-184204800,-155174400,-150076800,-128908800,-121132800,-99964800,-89596800,-68428800,-57974400,499737600,511228800,530582400,540259200,562118400,571190400,592963200,602035200,624412800,634694400,656467200,666748800,687916800,697593600,719971200,728438400,750816e3,761702400,782265600,793152e3,813715200,823996800,84456e4,856051200,876096e3,888710400,908064e3,919555200,938908800,951609600,970963200,982454400,1003017600,1013904e3,1036281600,1045353600,1066521600,1076803200,1099353600,1108857600,1129420800,1140307200,1162684800,1172361600,119232e4,1203206400,1224374400,1234656e3,1255824e3,1266710400,1287273600,129816e4,1318723200,1330214400,1350777600,1361059200,1382227200,1392508800,1413676800,1424563200,1445126400,1456012800,1476576e3,1487462400,1508025600,1518912e3,1541289600,1550361600,1924981200],offset:[-11188,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800]},"America/Bogota":{time:[-2707689600,-1739059200,704851200,733881600,1924974e3],offset:[-17776,-17776,-18e3,-14400,-18e3]},"America/Caracas":{time:[-2524521600,-1826755200,-157766400,1197169200,1462069800,1924977600],offset:[-16064,-16060,-16200,-14400,-16200,-14400]},"Europe/Moscow":{time:[-2840140800,-1688256e3,-165681e4,-1641340800,-1627956e3,-1618700400,-1596416400,-1593804521,-1589846400,-1542416400,-1539478800,-1525305600,-1522713600,-1491177600,-1247529600,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,695786400,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1414288800,1925002800],
offset:[9017,9017,9079,12679,9079,16279,12679,16279,14400,10800,14400,18e3,14400,10800,7200,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,10800,7200,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800]},"Europe/Athens":{time:[-2344636800,-1686095940,-1182988800,-1178150400,-906854400,-904867200,-85725e4,-844473600,-828230400,-812419200,-552355200,-541641600,166492800,186195600,198036e3,213764400,228880800,244090800,260330400,275457600,291805200,307418400,323395200,338947200,354682800,370411200,386132400,401860800,417582e3,433310400,449031600,465364800,481086e3,496814400,512535600,528264e3,543985200,559713600,575434800,591163200,606884400,622612800,638334e3,654667200,670388400,686116800,701838e3,717566400,733287600,749016e3,764737200,780465600,796186800,811915200,828241200,846388800,859690800,877838400,891140400,909288e3,92259e4,941342400,954039600,972792e3,985489200,1004241600,1017543600,1035691200,1048993200,1067140800,1080442800,1099195200,1111892400,1130644800,1143342e3,1162094400,1174791600,1193544e3,1206846e3,1224993600,1238295600,1256443200,1269745200,1288497600,1301194800,1319947200,1332644400,1351396800,1364698800,1382846400,1396148400,1414296e3,1427598e3,1445745600,1459047600,14778e5,1490497200,1509249600,1521946800,1540699200,1554001200,1572148800,1585450800,1603598400,1616900400,1635652800,164835e4,1667102400,1679799600,1698552e3,1711854e3,1730001600,1743303600,1761451200,1774753200,1792900800,1806202800,1824955200,1837652400,1856404800,1869102e3,1887854400,1901156400,1919304e3,1932606e3],offset:[5692,5692,7200,10800,7200,10800,7200,3600,7200,3600,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"Europe/Belgrade":{
time:[-2713910400,-905821200,-85725e4,-844552800,-828219600,-812498400,-79677e4,-777938400,-766616400,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],offset:[4920,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Berlin":{time:[-2422051200,-1693702800,-1680476400,-1663452e3,-1650142800,-1632002400,-1618693200,-938901600,-85725e4,-844552800,-828219600,-812498400,-79677e4,-781048800,-776556e3,-765925200,-761173200,-748476e3,-733266e3,-717627600,-714603600,-71037e4,-701902800,-684972e3,-670453200,-654127200,-639003600,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],
offset:[3208,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,10800,7200,3600,7200,3600,7200,10800,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/London":{
time:[-3852662400,-1691964e3,-1680469200,-1664143200,-1650142800,-1633903200,-1617483600,-1601848800,-1586034e3,-1570399200,-1552165200,-1538344800,-152253e4,-15075e5,-1490562e3,-1473631200,-1460926800,-1442786400,-1428872400,-1410732e3,-1396213200,-1379282400,-1364763600,-1348437600,-1333314e3,-1315778400,-1301259600,-1284328800,-126981e4,-1253484e3,-1238360400,-1221429600,-1206910800,-118998e4,-1175461200,-1159135200,-1143406800,-1126476e3,-1111957200,-1095631200,-1080507600,-1063576800,-1049058e3,-1032127200,-1017608400,-1001282400,-986158800,-969228e3,-950475600,-942012e3,-904514400,-896043600,-875484e3,-864594e3,-844034400,-832539600,-812584800,-798066e3,-781048800,-772059600,-764802e3,-748476e3,-733352400,-719445600,-717026400,-706741200,-699483600,-687996e3,-668034e3,-654732e3,-636584400,-622072800,-605739600,-590623200,-57429e4,-558568800,-542235600,-527119200,-512600400,-496274400,-481150800,-46422e4,-449701200,-432165600,-417646800,-401320800,-386197200,-369266400,-354747600,-337816800,-323298e3,-306972e3,-291848400,-276732e3,-257979600,-245282400,-22653e4,-213228e3,-195080400,-182383200,-163630800,-150933600,-132181200,-119484e3,-100731600,-88034400,-68677200,-59004e3,-37238400,57726e3,69818400,89175600,101268e3,120625200,132717600,152074800,164167200,183524400,196221600,214974e3,227671200,246423600,259120800,278478e3,290570400,309927600,32202e4,341377200,354675600,372823200,386125200,404272800,417574800,435722400,449024400,467776800,481078800,499226400,512528400,530676e3,543978e3,562125600,575427600,593575200,606877200,625629600,638326800,657079200,670381200,688528800,701830800,719978400,733280400,751428e3,76473e4,782877600,796179600,814327200,828234e3,846381600,859683600,877831200,891133200,909280800,922582800,941335200,954032400,972784800,985482e3,1004234400,1017536400,1035684e3,1048986e3,1067133600,1080435600,1099188e3,1111885200,1130637600,1143334800,1162087200,1174784400,1193536800,1206838800,1224986400,1238288400,1256436e3,1269738e3,1288490400,1301187600,131994e4,1332637200,1351389600,1364691600,1382839200,1396141200,1414288800,1427590800,1445738400,1459040400,1477792800,149049e4,1509242400,1521939600,1540692e3,1553994e3,1572141600,1585443600,1603591200,1616893200,1635645600,1648342800,1667095200,1679792400,1698544800,1711846800,1729994400,1743296400,1761444e3,1774746e3,1792893600,1806195600,1824948e3,1837645200,1856397600,1869094800,1887847200,1901149200,1919296800,1932598800],
offset:[-75,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,0,3600,0,3600,7200,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0]},"Europe/Luxembourg":{time:[-2069712e3,-1692493200,-1680476400,-1662339600,-165015e4,-1632002400,-1618693200,-1612656e3,-1604278800,-1585515600,-1574038800,-1552255200,-1539997200,-1520546400,-1507510800,-1490569200,-1473642e3,-1459116e3,-1444006800,-142767e4,-1411866e3,-1396220400,-1379293200,-1364770800,-1348448400,-1333321200,-1316394e3,-1301266800,-1284339600,-126981e4,-1253484e3,-1238360400,-1221429600,-1206910800,-1191189600,-1175461200,-1160344800,-1143406800,-1127685600,-1111957200,-1096840800,-1080507600,-1063576800,-1049058e3,-1033336800,-1017608400,-1002492e3,-986158800,-969228e3,-950475600,-942012e3,-935182800,-85725e4,-844552800,-828219600,-812498400,-797979600,-781048800,-766616400,-745452e3,-733266e3,228880800,244004400,260330400,276058800,29178e4,307508400,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],
offset:[1476,3600,7200,3600,7200,3600,7200,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Madrid":{time:[-2177453684,-1631926800,-1616886e3,-1601168400,-158535e4,-1442451600,-142767e4,-1379293200,-1364770800,-1348448400,-1333321200,-1316390400,-1301266800,-1284339600,-1269817200,-1026954e3,-1017615600,-1001898e3,-999478800,-986083200,-951433200,-940208400,-873075600,-862614e3,-842835600,-828313200,-811386e3,-796863600,-779936400,-765414e3,-748486800,-733964400,-652323600,-639010800,135126e3,150253200,166575600,181702800,196815600,212547600,22887e4,243997200,260330400,276058800,29178e4,307508400,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],
offset:[-884,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,7200,3600,0,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Paris":{time:[-2486678340,-1855958340,-1689814800,-1680393600,-1665363600,-1648339200,-1635123600,-1616889600,-1604278800,-158544e4,-1574038800,-1552262400,-1539997200,-1520553600,-1507510800,-1490572800,-1470618e3,-1459123200,-1444006800,-1427673600,-1411952400,-1396224e3,-1379293200,-1364774400,-1348448400,-1333324800,-1316394e3,-1301270400,-1284339600,-1269820800,-1253494800,-1238371200,-1221440400,-1206921600,-1191200400,-1175472e3,-1160355600,-1143417600,-1127696400,-1111968e3,-1096851600,-1080518400,-1063587600,-1049068800,-1033347600,-1017619200,-1002502800,-986169600,-969238800,-950486400,-942012e3,-932432400,-85725e4,-844552800,-828219600,-812498400,-800064e3,-796258800,-781048800,-766616400,196822800,212547600,228880800,244004400,260330400,276058800,29178e4,307508400,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],
offset:[561,561,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,7200,3600,7200,3600,7200,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Rome":{time:[-3252096e3,-2403562204,-1690761600,-168048e4,-1664755200,-1648944e3,-163512e4,-1616889600,-1604275200,-1585526400,-1571011200,-1555286400,-932428800,-85725e4,-844552800,-828219600,-812498400,-798066e3,-781048800,-76671e4,-750895200,-733352400,-719452800,-70191e4,-689205600,-670453200,-114048e3,-103161600,-81993600,-71708400,-50544e3,-40258800,-18489600,-8204400,1296e4,23245200,43804800,54694800,75859200,86749200,107913600,118198800,138758400,149648400,170812800,181098e3,202262400,212547600,233107200,243997200,265161600,276051600,296611200,307501200,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],
offset:[2996,2996,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Warsaw":{time:[-2840140800,-1717027200,-1693702800,-1680476400,-1663452e3,-1650142800,-1632002400,-1618693200,-1600466400,-1587157200,-1501718400,-931730400,-85725e4,-844552800,-828219600,-812498400,-796600800,-778723200,-762652800,-748483200,-733266e3,-715212e3,-701902800,-684972e3,-670453200,-654127200,-639003600,-397090800,-386805600,-371084400,-355356e3,-334191600,-323301600,-307580400,-291852e3,-271292400,-260402400,-239842800,-228952800,-208393200,-197503200,-176338800,-166053600,228877200,244000800,260326800,276055200,291776400,307504800,323830800,338954400,354675600,370404e3,386125200,401853600,417574800,433303200,449024400,465357600,481078800,496807200,512528400,528256800,543978e3,559706400,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],
offset:[5040,5040,3600,7200,3600,7200,3600,7200,7200,10800,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Istanbul":{time:[-2840140800,-1869868800,-1693699200,-168048e4,-1570406400,-1552176e3,-1538352e3,-1522540800,-1507507200,-1490572800,-1440201600,-1428019200,-1409702400,-1396483200,-931046400,-922665600,-917827200,-892425600,-875836800,-764726400,-744336e3,-733795200,-716428800,-701913600,-684979200,-670464e3,-654134400,-639014400,-62208e4,-60696e4,-590025600,-575510400,-235612800,-194832e3,-177724800,-165715200,107917200,121226400,133927200,152676e3,164685600,184125600,196221600,215575200,228880800,245815200,260330400,267926400,428464800,433908e3,468122400,482806800,496720800,512528400,528256800,543978e3,559706400,575427600,591156e3,606877200,622605600,638326800,65466e4,670381200,686109600,701830800,717559200,733280400,749008800,764125200,780458400,796179600,811908e3,828234e3,846381600,859683600,877831200,891133200,909280800,922582800,941335200,954032400,972784800,985482e3,1004234400,1017536400,1035684e3,1048986e3,1067133600,1080435600,1099188e3,1111885200,1130637600,1143334800,1162087200,1174791600,1193544e3,1206846e3,1224993600,1238295600,1256443200,1269745200,1288497600,1301281200,1319947200,1332644400,1351396800,1364698800,1382846400,1396234800,1414296e3,1427598e3,1446955200,1459047600,1473206400,1925002800],offset:[6952,7016,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,10800,14400,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,10800]},"Europe/Zurich":{
time:[-3675196800,-2385244800,-904431600,-891122400,-872982e3,-859672800,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],offset:[2048,1786,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Australia/Sydney":{time:[-2364076800,-1672531140,-1665352800,-883605600,-876088800,-860364e3,-844639200,-828309600,-813189600,57722400,68007600,89172e3,100062e3,120621600,131511600,152071200,162961200,183520800,195015600,215575200,226465200,247024800,257914800,278474400,289364400,309924e3,320814e3,341373600,352263600,372823200,386737200,404877600,415767600,436327200,447217200,467776800,478666800,499226400,511326e3,530071200,542775600,562125600,57483e4,59418e4,606279600,625629600,636519600,657079200,667969200,688528800,699418800,719978400,731473200,752032800,762922800,783482400,794372400,814932e3,828241200,846381600,859690800,877831200,891140400,909280800,92259e4,941335200,954039600,967341600,985489200,1004234400,1017543600,1035684e3,1048993200,1067133600,1080442800,1099188e3,1111892400,1130637600,1143946800,1162087200,1174791600,1193536800,1207450800,1223172e3,1238900400,1254621600,127035e4,1286071200,1301799600,1317520800,1333249200,1349575200,1365303600,1381024800,1396753200,1412474400,1428202800,1443924e3,1459652400,1475373600,1491102e3,1506823200,1522551600,1538877600,1554606e3,1570327200,1586055600,1601776800,1617505200,1633226400,1648954800,1664676e3,1680404400,1696125600,1712458800,172818e4,1743908400,1759629600,1775358e3,1791079200,1806807600,1822528800,1838257200,1853978400,1869706800,1886032800,1901761200,1917482400,1933210800],
offset:[36292,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600]},"Australia/Brisbane":{time:[-2366755200,-1672531140,-1665352800,-883605600,-876088800,-860364e3,-844639200,-828309600,-813189600,57722400,68007600,625629600,636519600,657079200,667969200,688528800,699418800,1925028e3],offset:[36728,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3]},"Australia/Adelaide":{time:[-2364076800,-2230156800,-1672531140,-1665352800,-883605600,-876088800,-860364e3,-844639200,-828309600,-813189600,57722400,68007600,89172e3,100062e3,120621600,131511600,152071200,162961200,183520800,195015600,215575200,226465200,247024800,257914800,278474400,289364400,309924e3,320814e3,341373600,352263600,372823200,384318e3,404877600,415767600,436327200,447217200,467776800,478666800,499226400,511326e3,530071200,542775600,562125600,57483e4,59418e4,606279600,625629600,637729200,657079200,667969200,688528800,701233200,719978400,731473200,752032800,764132400,783482400,796186800,814932e3,828241200,846381600,859690800,877831200,891140400,909280800,92259e4,941335200,954039600,972784800,985489200,1004234400,1017543600,1035684e3,1048993200,1067133600,1080442800,1099188e3,1111892400,1130637600,1143946800,1162087200,1174791600,1193536800,1207450800,1223172e3,1238900400,1254621600,127035e4,1286071200,1301799600,1317520800,1333249200,1349575200,1365303600,1381024800,1396753200,1412474400,1428202800,1443924e3,1459652400,1475373600,1491102e3,1506823200,1522551600,1538877600,1554606e3,1570327200,1586055600,1601776800,1617505200,1633226400,1648954800,1664676e3,1680404400,1696125600,1712458800,172818e4,1743908400,1759629600,1775358e3,1791079200,1806807600,1822528800,1838257200,1853978400,1869706800,1886032800,1901761200,1917482400,1933210800],
offset:[33260,32400,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800]},"Australia/ACT":{time:[-2364076800,-1672531140,-1665352800,-883605600,-876088800,-860364e3,-844639200,-828309600,-813189600,57722400,68007600,89172e3,100062e3,120621600,131511600,152071200,162961200,183520800,195015600,215575200,226465200,247024800,257914800,278474400,289364400,309924e3,320814e3,341373600,352263600,372823200,386737200,404877600,415767600,436327200,447217200,467776800,478666800,499226400,511326e3,530071200,542775600,562125600,57483e4,59418e4,606279600,625629600,636519600,657079200,667969200,688528800,699418800,719978400,731473200,752032800,762922800,783482400,794372400,814932e3,828241200,846381600,859690800,877831200,891140400,909280800,92259e4,941335200,954039600,967341600,985489200,1004234400,1017543600,1035684e3,1048993200,1067133600,1080442800,1099188e3,1111892400,1130637600,1143946800,1162087200,1174791600,1193536800,1207450800,1223172e3,1238900400,1254621600,127035e4,1286071200,1301799600,1317520800,1333249200,1349575200,1365303600,1381024800,1396753200,1412474400,1428202800,1443924e3,1459652400,1475373600,1491102e3,1506823200,1522551600,1538877600,1554606e3,1570327200,1586055600,1601776800,1617505200,1633226400,1648954800,1664676e3,1680404400,1696125600,1712458800,172818e4,1743908400,1759629600,1775358e3,1791079200,1806807600,1822528800,1838257200,1853978400,1869706800,1886032800,1901761200,1917482400,1933210800],offset:[36292,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600]},"Asia/Almaty":{
time:[-1441152e3,-1247529600,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,695786400,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1925013600],offset:[18468,18e3,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,21600,18e3,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600]},"Asia/Ashkhabad":{time:[-1441152e3,-1247529600,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,695786400,192501e4],offset:[14012,14400,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,18e3,14400,18e3]},"Asia/Tokyo":{time:[-2587678861,-683769600,-672274800,-654739200,-640825200,-620265600,-609375600,-588816e3,-577926e3,1925024400],offset:[33539,32400,36e3,32400,36e3,32400,36e3,32400,36e3,32400]},"Asia/Taipei":{time:[-2335219200,-1017792e3,-766191600,-745804800,-733795200,-716860800,-699580800,-683856e3,-670636800,-65232e4,-639100800,-620784e3,-607564800,-589248e3,-576028800,-562896e3,-541728e3,-528681600,-510192e3,-497145600,-478656e3,-465609600,-449798400,-433987200,-418176e3,-402451200,-38664e4,-370915200,-355104e3,-339379200,-323568e3,-302486400,-291945600,-270950400,-260409600,134006400,149817600,165542400,181353600,299635200,307584e3,1925020800],offset:[29160,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800]},"Asia/Singapore":{time:[-2177452800,-2038176e3,-1167609600,-1073001600,-894153600,-879638400,-766972800,378691200,1925020800],offset:[24925,24925,25200,26400,26400,27e3,32400,27e3,28800]},"Asia/Shanghai":{time:[-2177452800,-933638400,-922060800,-908841600,-888796800,-881020800,-767836800,-745804800,-733795200,-716860800,-699580800,-683856e3,-670636800,-65232e4,-649987200,515556e3,527047200,545191200,558496800,577245600,589946400,608695200,622000800,640144800,653450400,671594400,6849e5,1925020800],offset:[29143,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800]},"Asia/Seoul":{
time:[-1948752e3,-1830384e3,-767318400,-681177600,-672192e3,-654739200,-640828800,-623376e3,-609379200,-588816e3,-577929600,-498096e3,-462672e3,-451699200,-429753600,-418262400,-399513600,-387417600,-368064e3,-355968e3,-336614400,-324518400,-305164800,-293068800,-264902400,547610400,560919600,57906e4,592369200,1925024400],offset:[30472,30600,32400,32400,36e3,32400,36e3,32400,36e3,32400,36e3,32400,30600,34200,30600,34200,30600,34200,30600,34200,30600,34200,30600,34200,30600,32400,36e3,32400,36e3,32400]},"Asia/Tehran":{time:[-1704153600,-757382400,247190400,259286400,277776e3,283996800,290822400,306547200,322444800,338515200,673228800,685497600,701222400,71712e4,732758400,748656e3,764294400,780192e3,795830400,811728e3,827366400,843264e3,858988800,874886400,890524800,906422400,922060800,937958400,953596800,969494400,985219200,1001116800,1016755200,1032652800,1048291200,1064188800,1079827200,1095724800,1111449600,1127347200,1206057600,1221955200,123768e4,1253577600,1269216e3,1285113600,1300752e3,1316649600,1332288e3,1348185600,1363910400,1379808e3,1395446400,1411344e3,1426982400,144288e4,1458518400,1474416e3,1490140800,1506038400,1521676800,1537574400,1553212800,1569110400,1584748800,1600646400,1616371200,1632268800,1647907200,1663804800,1679443200,1695340800,1710979200,1726876800,1742601600,1758499200,1774137600,1790035200,1805673600,1821571200,1837209600,1853107200,1868745600,1884643200,1900368e3,1916265600,1931904e3],offset:[12344,12344,12600,14400,18e3,14400,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600]},"Asia/Dubai":{time:[-1577923200,1925006400],offset:[13272,14400]},"Asia/Kolkata":{time:[-3645216e3,-3155673600,-2019686400,-891561600,-872035200,-862617600,-764121600,1925011800],offset:[21208,21200,19270,19800,23400,19800,23400,19800]},"Asia/Hong_Kong":{time:[-2056663398,-900882e3,-891547200,-884217600,-761176800,-747878400,-728508600,-717021e3,-697059e3,-683757e3,-668028600,-654726600,-636579e3,-623277e3,-605129400,-591827400,-573679800,-559773e3,-541625400,-528323400,-510179400,-498083400,-478729800,-466633800,-446675400,-435184200,-415225800,-403129800,-383776200,-371680200,-352326600,-340230600,-320877e3,-308781e3,-288822600,-277331400,-257373e3,-245881800,-225923400,-213827400,-194473800,-182377800,-163024200,-148509e3,-132784200,-117059400,-101334600,-85609800,-69280200,-53555400,-37830600,-22105800,-6381e3,9343800,25068600,40793400,56518200,72243e3,88572600,104297400,120022200,126070200,151471800,167196600,182921400,198646200,214371e3,295414200,309324600,1925020800],
offset:[27402,28800,32400,30600,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800]},"Asia/Bangkok":{time:[-2840140800,-1570060800,1925017200],offset:[24124,24124,25200]},"Asia/Chongqing":{time:[-2177452800,-933638400,-922060800,-908841600,-888796800,-881020800,-767836800,-745804800,-733795200,-716860800,-699580800,-683856e3,-670636800,-65232e4,-649987200,515556e3,527047200,545191200,558496800,577245600,589946400,608695200,622000800,640144800,653450400,671594400,6849e5,1925020800],offset:[29143,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800]},"Asia/Jerusalem":{time:[-2840140800,-1640995200,-933638400,-857347200,-844293600,-825811200,-812678400,-794188800,-779846400,-762645600,-748303200,-731116800,-681955200,-673228800,-667951200,-65232e4,-636415200,-62208e4,-608936400,-59184e4,-572475600,-558568800,-542840400,-527724e3,-514414800,-490838400,-482976e3,-459468e3,-451526400,-428544e3,-418251600,-400024800,-387417600,142387200,150854400,167184e3,178675200,334022400,337654800,452563200,462243600,482284800,495590400,516758400,526435200,545443200,558489600,576633600,589334400,609897600,620784e3,638323200,651628800,669772800,683683200,701827200,715737600,733708800,747187200,765158400,778032e3,796608e3,810086400,826848e3,842832e3,858902400,874195200,890352e3,90504e4,923018400,936324e3,955677600,970794e3,986778e3,1001293200,1017363600,1033952400,1048813200,1065142800,1081299600,1095814800,1112320800,1128823200,1143770400,1159668e3,117522e4,1189908e3,1206669600,1223172e3,1238119200,1254016800,1269568800,1284256800,1301623200,1317520800,1333072800,1348365600,1364522400,1382839200,1395972e3,1414288800,1427421600,1445738400,1458871200,1477792800,1490320800,1509242400,1521770400,1540692e3,1553824800,1572141600,1585274400,1603591200,1616724e3,1635645600,1648173600,1667095200,1679623200,1698544800,1711677600,1729994400,1743127200,1761444e3,1774576800,1792893600,1806026400,1824948e3,1837476e3,1856397600,1868925600,1887847200,190098e4,1919296800,1932429600],
offset:[8454,8440,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,14400,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"Asia/Kuwait":{time:[-719625600,1925002800],offset:[11212,10800]},"Asia/Muscat":{time:[-1577923200,1925006400],offset:[13272,14400]},"Asia/Qatar":{time:[-1577923200,76204800,1925002800],offset:[12368,14400,10800]},"Asia/Riyadh":{time:[-719625600,1925002800],offset:[11212,10800]},"Pacific/Auckland":{time:[-3192393600,-1330293600,-1320012e3,-1300658400,-1287352800,-1269208800,-1255903200,-1237759200,-1224453600,-1206309600,-1192399200,-117486e4,-1160949600,-1143410400,-1125871200,-1112565600,-1094421600,-1081116e3,-1062972e3,-1049666400,-1031522400,-1018216800,-1000072800,-986767200,-968018400,-955317600,-936568800,-923263200,-757382400,152676e3,162356400,183520800,195015600,215575200,226465200,247024800,257914800,278474400,289364400,309924e3,320814e3,341373600,352263600,372823200,384318e3,404877600,415767600,436327200,447217200,467776800,478666800,499226400,510116400,530676e3,541566e3,562125600,573620400,59418e4,60507e4,623815200,637729200,655264800,669178800,686714400,700628400,718164e3,732682800,749613600,764132400,781063200,795582e3,812512800,827031600,844567200,858481200,876016800,889930800,907466400,921985200,938916e3,953434800,970365600,984884400,100242e4,1016334e3,1033869600,1047783600,1065319200,1079838e3,1096768800,1111287600,1128218400,1142737200,1159668e3,1174186800,1191117600,1207450800,1222567200,1238900400,1254016800,127035e4,1285466400,1301799600,1316916e3,1333249200,1348970400,1365303600,138042e4,1396753200,1411869600,1428202800,1443319200,1459652400,1474768800,1491102e3,1506218400,1522551600,1538272800,1554606e3,1569722400,1586055600,1601172e3,1617505200,1632621600,1648954800,1664071200,1680404400,1695520800,1712458800,1727575200,1743908400,1759024800,1775358e3,1790474400,1806807600,1821924e3,1838257200,1853373600,1869706800,1885428e3,1901761200,1916877600,1933210800],
offset:[41944,41400,45e3,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800]},"Pacific/Chatham":{time:[-3192393600,-757382400,152678700,162359100,183523500,195018300,215577900,226467900,247027500,257917500,278477100,289367100,309926700,320816700,341376300,352266300,372825900,384320700,404880300,415770300,436329900,447219900,467779500,478669500,499229100,510119100,530678700,541568700,562128300,573623100,594182700,605072700,623817900,637731900,655267500,669181500,686717100,700631100,718166700,732685500,749616300,764135100,781065900,795584700,812515500,827034300,844569900,858483900,876019500,889933500,907469100,921987900,938918700,953437500,970368300,984887100,1002422700,1016336700,1033872300,1047786300,1065321900,1079840700,1096771500,1111290300,1128221100,1142739900,1159670700,1174189500,1191120300,1207453500,1222569900,1238903100,1254019500,1270352700,1285469100,1301802300,1316918700,1333251900,1348973100,1365306300,1380422700,1396755900,1411872300,1428205500,1443321900,1459655100,1474771500,1491104700,1506221100,1522554300,1538275500,1554608700,1569725100,1586058300,1601174700,1617507900,1632624300,1648957500,1664073900,1680407100,1695523500,1712461500,1727577900,1743911100,1759027500,1775360700,1790477100,1806810300,1821926700,1838259900,1853376300,1869709500,1885430700,1901763900,1916880300,1933213500],offset:[44028,44100,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500]},"Pacific/Fakaofo":{time:[-2177452800,1325203200,1925038800],offset:[-41096,-39600,46800]},"Pacific/Honolulu":{time:[-2334139200,-1157320800,-1155470400,-880236e3,-769429800,-765410400,-712188e3,1924956e3],
offset:[-37886,-37800,-34200,-37800,-34200,-34200,-37800,-36e3]},"America/Mexico_City":{time:[-1514763396,-1343091600,-1234828800,-1220317200,-1207180800,-1191369600,-975283200,-963187200,-917136e3,-907372800,-821923200,-810086400,-627523200,-613008e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,989114400,1001815200,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1175392800,1193536800,1207447200,1224986400,1238896800,1256436e3,1270346400,1288490400,1301796e3,131994e4,1333245600,1351389600,13653e5,1382839200,1396749600,1414288800,1428199200,1445738400,1459648800,1477792800,1491098400,1509242400,1522548e3,1540692e3,1554602400,1572141600,1586052e3,1603591200,1617501600,1635645600,1648951200,1667095200,1680400800,1698544800,1712455200,1729994400,1743904800,1761444e3,1775354400,1792893600,1806804e3,1824948e3,1838253600,1856397600,1869703200,1887847200,1901757600,1919296800,1933207200],offset:[-23796,-25200,-21600,-25200,-21600,-25200,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600]},"Africa/Cairo":{time:[-2185401600,-929836800,-923097600,-906163200,-892857600,-875836800,-857779200,-844300800,-825811200,-812678400,-794188800,-779846400,-762652800,-399081600,-38664e4,-368323200,-355104e3,-336783600,-323643600,-305161200,-292021200,-273625200,-260485200,-242089200,-228949200,-210553200,-197413200,-178930800,-165790800,-147394800,-134254800,-115858800,-102632400,-84322800,-71096400,-52700400,-39474e3,-21164400,-7938e3,10371600,23598e3,41907600,55134e3,7353e4,86756400,105066e3,118292400,136602e3,149828400,168138e3,181364400,199760400,212986800,231296400,244522800,262832400,276058800,294368400,307594800,325990800,339217200,357526800,370753200,396406800,402289200,426819600,433825200,452221200,465447600,483757200,496983600,515293200,528519600,546829200,560055600,578451600,591678e3,610419600,623214e3,641523600,65475e4,673059600,686286e3,704682e3,717908400,736218e3,749444400,767754e3,780980400,799027200,812332800,830476800,843782400,861926400,875232e3,893376e3,906681600,925430400,938736e3,95688e4,970185600,988329600,1001635200,1019779200,1033084800,1051228800,1064534400,1083283200,1096588800,1114732800,1128038400,1146182400,1158883200,1177632e3,1189123200,1209081600,1219968e3,1240531200,1250812800,1272585600,1281484800,1284076800,1285891200,1400198400,1403827200,1406851200,1411689600,1924999200],
offset:[7509,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"Africa/Johannesburg":{time:[-2458166400,-2109283200,-860968800,-845244e3,-829519200,-813794400,1924999200],offset:[6720,5400,7200,10800,7200,10800,7200]},"Asia/Kathmandu":{time:[-1577923200,504921600,1925012700],offset:[20476,19800,20700]},"US/Mountain":{time:[-2717668796,-1633298400,-1615154400,-1601848800,-1583704800,-1570399200,-1551650400,-1538949600,-1534111200,-880236e3,-769417200,-765410400,-147909600,-13158e4,-11646e4,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,126669600,152071200,162352800,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3],
offset:[-25196,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200]},"Europe/Helsinki":{time:[-2890252800,-1535932800,-875664e3,-859762800,354679200,370407600,386128800,401857200,417582e3,433310400,449031600,465364800,481086e3,496814400,512535600,528264e3,543985200,559713600,575434800,591163200,606884400,622612800,638334e3,654667200,670388400,686116800,701838e3,717566400,733287600,749016e3,764737200,780465600,796186800,811915200,828241200,846388800,859690800,877838400,891140400,909288e3,92259e4,941342400,954039600,972792e3,985489200,1004241600,1017543600,1035691200,1048993200,1067140800,1080442800,1099195200,1111892400,1130644800,1143342e3,1162094400,1174791600,1193544e3,1206846e3,1224993600,1238295600,1256443200,1269745200,1288497600,1301194800,1319947200,1332644400,1351396800,1364698800,1382846400,1396148400,1414296e3,1427598e3,1445745600,1459047600,14778e5,1490497200,1509249600,1521946800,1540699200,1554001200,1572148800,1585450800,1603598400,1616900400,1635652800,164835e4,1667102400,1679799600,1698552e3,1711854e3,1730001600,1743303600,1761451200,1774753200,1792900800,1806202800,1824955200,1837652400,1856404800,1869102e3,1887854400,1901156400,1919304e3,1932606e3],offset:[5989,5989,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"Europe/Stockholm":{
time:[-2871676800,-2208988800,-1692493200,-1680476400,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],offset:[4332,3614,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Copenhagen":{time:[-2524521600,-2398291200,-1692493200,-1680483600,-935107200,-85725e4,-844552800,-828219600,-812498400,-79677e4,-781048800,-769381200,-747007200,-736376400,-715212e3,-706741200,-683157600,-675291600,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],
offset:[3020,3020,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Atlantic/Reykjavik":{time:[-1956614400,-1668214800,-1647212400,-1636678800,-161343e4,-1605142800,-1581894e3,-1539565200,-153135e4,-968029200,-952293600,-942012e3,-920239200,-909961200,-888789600,-877906800,-857944800,-846457200,-826495200,-815007600,-795045600,-783558e3,-762991200,-752108400,-731541600,-717634800,-700092e3,-686185200,-668642400,-654735600,-636588e3,-623286e3,-605743200,-591836400,-573688800,-559782e3,-542239200,-528332400,-510789600,-496882800,-47934e4,-465433200,-447890400,-433983600,-415836e3,-401929200,-384386400,-370479600,-352936800,-33903e4,-321487200,-307580400,-290037600,-276130800,-258588e3,-244681200,-226533600,-212626800,-195084e3,-181177200,-163634400,-149727600,-132184800,-118278e3,-100735200,-86828400,-68680800,-54774e3,1924992e3],offset:[-5280,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0]},"Europe/Tallinn":{time:[-2840140800,-1638316800,-1632002400,-1618693200,-1593820800,-1535932800,-927936e3,-892944e3,-85725e4,-844552800,-828219600,-812498400,-797644800,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909288e3,92259e4,941342400,1017543600,1035691200,1048993200,1067140800,1080442800,1099195200,1111892400,1130644800,1143342e3,1162094400,1174791600,1193544e3,1206846e3,1224993600,1238295600,1256443200,1269745200,1288497600,1301194800,1319947200,1332644400,1351396800,1364698800,1382846400,1396148400,1414296e3,1427598e3,1445745600,1459047600,14778e5,1490497200,1509249600,1521946800,1540699200,1554001200,1572148800,1585450800,1603598400,1616900400,1635652800,164835e4,1667102400,1679799600,1698552e3,1711854e3,1730001600,1743303600,1761451200,1774753200,1792900800,1806202800,1824955200,1837652400,1856404800,1869102e3,1887854400,1901156400,1919304e3,1932606e3],
offset:[5940,5940,3600,7200,3600,5940,7200,10800,7200,3600,7200,3600,7200,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"Europe/Riga":{time:[-2840140800,-1632002400,-1618693200,-1601676e3,-1597266e3,-1377302400,-928022400,-899510400,-85725e4,-844552800,-828219600,-812498400,-79677e4,-795830400,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,843966e3,859690800,877838400,891140400,909288e3,92259e4,941342400,985489200,1004241600,1017543600,1035691200,1048993200,1067140800,1080442800,1099195200,1111892400,1130644800,1143342e3,1162094400,1174791600,1193544e3,1206846e3,1224993600,1238295600,1256443200,1269745200,1288497600,1301194800,1319947200,1332644400,1351396800,1364698800,1382846400,1396148400,1414296e3,1427598e3,1445745600,1459047600,14778e5,1490497200,1509249600,1521946800,1540699200,1554001200,1572148800,1585450800,1603598400,1616900400,1635652800,164835e4,1667102400,1679799600,1698552e3,1711854e3,1730001600,1743303600,1761451200,1774753200,1792900800,1806202800,1824955200,1837652400,1856404800,1869102e3,1887854400,1901156400,1919304e3,1932606e3],offset:[5794,5794,9394,5794,9394,5794,7200,10800,7200,3600,7200,3600,7200,3600,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"Europe/Vilnius":{
time:[-2840140800,-1672531200,-1585094400,-1561248e3,-1553558400,-928195200,-900115200,-85725e4,-844552800,-828219600,-812498400,-802137600,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891140400,909284400,922586400,941338800,1048993200,1067140800,1080442800,1099195200,1111892400,1130644800,1143342e3,1162094400,1174791600,1193544e3,1206846e3,1224993600,1238295600,1256443200,1269745200,1288497600,1301194800,1319947200,1332644400,1351396800,1364698800,1382846400,1396148400,1414296e3,1427598e3,1445745600,1459047600,14778e5,1490497200,1509249600,1521946800,1540699200,1554001200,1572148800,1585450800,1603598400,1616900400,1635652800,164835e4,1667102400,1679799600,1698552e3,1711854e3,1730001600,1743303600,1761451200,1774753200,1792900800,1806202800,1824955200,1837652400,1856404800,1869102e3,1887854400,1901156400,1919304e3,1932606e3],offset:[6076,5040,5736,3600,7200,3600,10800,7200,3600,7200,3600,7200,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,7200,3600,7200,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"America/Lima":{time:[-2524521600,-1938556800,-1009843200,-1002067200,-986774400,-971049600,-955324800,-9396e5,504921600,512697600,536457600,544233600,631152e3,638928e3,757382400,765158400,1924974e3],offset:[-18492,-18516,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3]},"America/Santiago":{
time:[-2524521600,-1892678400,-1688428800,-1619222400,-1593820800,-1336003200,-13176e5,-1304380800,-1286064e3,-1272844800,-1254528e3,-1241308800,-1222992e3,-1209772800,-1191369600,-1178150400,-870566400,-865296e3,-740534400,-736387200,-718070400,-713667600,-36633600,-23932800,-3369600,7516800,24451200,37756800,55900800,69206400,87955200,100656e3,118195200,132105600,150854400,163555200,182304e3,195609600,213753600,227059200,245203200,258508800,277257600,289958400,308707200,321408e3,340156800,353462400,371606400,384912e3,403056e3,416361600,434505600,447811200,46656e4,479260800,498009600,510710400,529459200,545184e3,560908800,574214400,592358400,605664e3,624412800,637113600,653443200,668563200,687312e3,700617600,718761600,732067200,750211200,763516800,781660800,794966400,813715200,826416e3,845164800,85968e4,876614400,88992e4,906854400,923184e3,939513600,952819200,971568e3,984268800,1003017600,1015718400,1034467200,1047168e3,1065916800,1079222400,1097366400,1110672e3,1128816e3,1142121600,1160870400,1173571200,119232e4,1206835200,1223769600,1237075200,1255219200,1270339200,1286668800,1304812800,1313884800,1335657600,1346544e3,1367107200,1378598400,1398556800,1410048e3,1463270400,1471132800,149472e4,1502582400,1526169600,1534032e3,1554595200,1567900800,1586044800,1599350400,1617494400,16308e5,1648944e3,1662249600,1680393600,1693699200,1712448e3,1725753600,1743897600,1757203200,1775347200,1788652800,1806796800,1820102400,1838246400,1851552e3,1870300800,1883001600,1901750400,1915056e3,19332e5],offset:[-16966,-16966,-18e3,-16966,-14400,-16966,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-10800,-14400,-18e3,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800]},"Asia/Bahrain":{time:[-1577923200,76204800,1925002800],offset:[12368,14400,10800]},"Asia/Jakarta":{time:[-3231273600,-1451693568,-117288e4,-876614400,-766022400,-683856e3,-620784e3,-189388800,1925017200],offset:[25632,25632,26400,27e3,32400,27e3,28800,27e3,25200]},"Africa/Lagos":{time:[-1588464e3,1924995600],offset:[816,3600]},"Pacific/Norfolk":{
time:[-2177452800,-599616e3,152071200,162961200,1443924e3,1570327200,1586055600,1601776800,1617505200,1633226400,1648954800,1664676e3,1680404400,1696125600,1712458800,172818e4,1743908400,1759629600,1775358e3,1791079200,1806807600,1822528800,1838257200,1853978400,1869706800,1886032800,1901761200,1917482400,1933210800],offset:[40312,40320,41400,45e3,41400,39600,43200,39600,43200,39600,43200,39600,43200,39600,43200,39600,43200,39600,43200,39600,43200,39600,43200,39600,43200,39600,43200,39600,43200]},"America/Juneau":{time:[-3225169588,-2188987200,-880236e3,-769420800,-765410400,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,126669600,152071200,162352800,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,438998400,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3],offset:[54139,-32261,-28800,-25200,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-28800,-28800,-25200,-28800,-25200,-28800,-25200,-32400,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400]},"Asia/Ho_Chi_Minh":{time:[-2004048e3,-1851552e3,-852080400,-782614800,-767836800,-718070400,-457747200,-315622800,171849600,1925017200],offset:[25600,25590,25200,28800,32400,25200,28800,25200,28800,25200]},"Australia/Perth":{
time:[-2337897600,-1672531140,-1665352800,-883605600,-876088800,-860364e3,-844639200,152071200,162961200,436327200,447217200,690343200,699418800,1165111200,1174791600,1193536800,1206846e3,1224986400,1238295600,1925020800],offset:[27804,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800]},"Europe/Oslo":{time:[-2366755200,-1691881200,-1680566400,-927507600,-85725e4,-844552800,-828219600,-812498400,-79677e4,-781048800,-765320400,-340840800,-324507600,-308786400,-293058e3,-277336800,-261608400,-245887200,-230158800,-214437600,-198709200,-182988e3,-166654800,-147909600,-135205200,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],offset:[2580,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]}}},"3mf1":function(e,t,i){"use strict";i.r(t),i.d(t,"availableIcons",function(){return n});var n=function(){var e,t,i=[];for(e=(i=(i=(i=(i=i.concat([61536,61537,61538,61539])).concat([61725,61726])).concat([61575,61576,61796,61797])).concat([61779,61780,61781,61782,61783,61784,61785,61786])).slice(0),t=61440;t<=61846;t++)-1===i.indexOf(t)&&(t%16==15&&61487!==t||t>=61620&&t<=61630||61718!==t&&61719!==t&&61472!==t&&61619!==t&&e.push(t));return e}()},"3u3j":function(e,t,i){"use strict";var n,o,r,s;i.d(t,"a",function(){return s}),n=i("mrSG"),o=i("Eyy1"),r=i("RDU5"),s=function(e){function t(t,i,n){var r,s,a=e.call(this,n)||this;return a._chartModel=t,a._sourceId=i.id(),
r=Object(o.ensureNotNull)(i.priceScale()),a._initialPriceScaleId=r.id(),s=Object(o.ensureNotNull)(t.paneForSource(i)),a._initialPriceScalePosition=s.priceScalePosition(r),a._initialPriceScaleIndex=s.priceScaleIndex(r,a._initialPriceScalePosition),a._initialPaneIndex=t.panes().indexOf(s),a}return Object(n.__extends)(t,e),t}(r.UndoCommand)},"4TVt":function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"LineToolPriceAxisView",function(){return s}),n=i("mrSG"),o=i("Eyy1"),r=i("KcY8"),s=function(e){function t(t,i){var n=e.call(this)||this;return n._active=!1,n._source=t,n._data=i,n}return Object(n.__extends)(t,e),t.prototype.setActive=function(e){this._active=e},t.prototype._updateRendererData=function(e,t,i){var n,o,r,s,a,l,c,u;e.visible=!1,(n=this._source.model()).timeScale()&&!n.timeScale().isEmpty()&&(null===(o=this._source.priceScale())||o.isEmpty()||(n.selection().isSelected(this._source)||this._source.isForcedDrawPriceAxisLabel())&&null!==n.timeScale().visibleBarsStrictRange()&&(r=this._source.axisPoints(),s=this._data.pointIndex,r.length<=s||(a=r[s],isFinite(a.price)&&null!==(c=null!==(l=this._source.ownerSource())?l.firstValue():null)&&(u=this._active?"#1565C0":n.isDark()?"#1E88E5":"#2196F3",this._data.backgroundProperty?u=this._data.backgroundProperty.value():this._data.backgroundPropertyGetter&&(u=this._data.backgroundPropertyGetter()),i.background=u,i.borderColor="#2E84A6",i.color=this.generateTextColor(u),i.coordinate=o.priceToCoordinate(a.price,c),e.text=this._formatPrice(a.price,c),e.visible=!0))))},t.prototype._formatPrice=function(e,t){return Object(o.ensureNotNull)(this._source.priceScale()).formatPrice(e,t)},t}(r.a)},"4bfY":function(e,t,i){"use strict";function n(){a.call(this)}function o(e,t){this._constructor="LineToolFibCircles";var s=t||o.createProperties();r.call(this,e,s),e._fibCirclesLabelsCache||(e._fibCirclesLabelsCache=new n),i.e("lt-pane-views").then(function(e){var t=i("FzRY").FibCirclesPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var r=i("Ss5c").LineDataSource,s=i("5rJj"),a=i("xUGI"),l=i("hayr").propertyPages,c=window.t("Fib Circles");inherit(n,a),n.prototype.levelsCount=function(){return o.LevelsCount},inherit(o,r),o.LevelsCount=11,o.prototype.levelsCount=function(){return o.LevelsCount},o.prototype.pointsCount=function(){return 2},o.prototype.title=function(){return c},o.prototype.name=function(){return"Fib Circles"},o.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},o.prototype.getStylesPropertyPage=function(){return l.LineToolFibCirclesStylesPropertyPage},o.createProperties=function(e){var t=new s("linetoolfibcircles",e,!1,{range:[1,11]});return o._configureProperties(t),t},o.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("6U6r").FibCirclesDefinitionsViewModel}.bind(null,i)).catch(i.oe)},o._configureProperties=function(e){r._configureProperties(e)},
t.LineToolFibCircles=o},"4kQX":function(e,t,i){"use strict";var n,o;i.r(t),i.d(t,"TimeFormatter",function(){return o}),n=i("kcTO"),o=function(){function e(e){this._formatStr=e||"%h:%m:%s"}return e.prototype.format=function(e){return n.customFormatters.timeFormatter?n.customFormatters.timeFormatter.format(e):this._formatStr.replace("%h",Object(n.numberToStringWithLeadingZero)(e.getUTCHours(),2)).replace("%m",Object(n.numberToStringWithLeadingZero)(e.getUTCMinutes(),2)).replace("%s",Object(n.numberToStringWithLeadingZero)(e.getUTCSeconds(),2))},e.prototype.formatLocal=function(e){return n.customFormatters.timeFormatter?n.customFormatters.timeFormatter.formatLocal?n.customFormatters.timeFormatter.formatLocal(e):n.customFormatters.timeFormatter.format(e):this._formatStr.replace("%h",Object(n.numberToStringWithLeadingZero)(e.getHours(),2)).replace("%m",Object(n.numberToStringWithLeadingZero)(e.getMinutes(),2)).replace("%s",Object(n.numberToStringWithLeadingZero)(e.getSeconds(),2))},e}()},"4miz":function(e,t,i){"use strict";var n,o;i.d(t,"a",function(){return n}),i.d(t,"b",function(){return o}),n=function(){function e(e,t){this._visible=!0,this._title=e,this._value=t}return e.prototype.title=function(){return this._title},e.prototype.setTitle=function(e){this._title=e},e.prototype.text=function(){return this._value},e.prototype.value=function(){return this._value},e.prototype.setValue=function(e){this._value=e},e.prototype.visible=function(){return this._visible},e.prototype.setVisible=function(e){this._visible=e},e.prototype.color=function(){return this._color},e.prototype.setColor=function(e){this._color=e},e}(),o=function(){function e(){this._items=[],this._header="",this._title=""}return e.prototype.header=function(){return this._header},e.prototype.title=function(){return this._title},e.prototype.items=function(){return this._items},e.prototype.update=function(){},e}()},"4o++":function(e,t,i){"use strict";var n;i.r(t),i.d(t,"MagnetMode",function(){return n}),function(e){e[e.WeakMagnet=0]="WeakMagnet",e[e.StrongMagnet=1]="StrongMagnet"}(n||(n={}))},"4u8j":function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolGannFan";var r=t||n.createProperties();o.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("ZJWf").GannFanPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("5rJj"),s=i("hayr").propertyPages,a=window.t("Gann Fan");inherit(n,o),n.LevelsCount=9,n.prototype.levelsCount=function(){return n.LevelsCount},n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return a},n.prototype.name=function(){return"Gann Fan"},n.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},n.prototype.getStylesPropertyPage=function(){return s.LineToolGannFanStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){
return i("ASG6").GannFanDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new r("linetoolgannfan",e,!1,{range:[1,9]});return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolGannFan=n},"5/lF":function(e,t,i){"use strict";function n(e){var t=new Image;return t.width=_,t.height=_,t.src=e,t}var o,r,s,a,l,c,u,h,d,p,_,f,m;i.r(t),i.d(t,"TrendLineStatsRenderer",function(){return m}),o=i("aO4+"),r=i("f6yo"),s=i("Eyy1"),a=i("qFKp"),l=i("qgcf"),c=i("VdBB"),u=i("jFln"),h=i("ogJP"),d=null,p={angle:{dark:n("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjQ5OTk5IDE1SDIuNjU3NzFMMy4wNjEwNCAxNC4yNjA2TDkuMDYxMDQgMy4yNjA1N0w5LjMwMDQ2IDIuODIxNjJMMTAuMTc4NCAzLjMwMDQ4TDkuOTM4OTMgMy43Mzk0Mkw3LjUxMzg1IDguMTg1NDJDMTAuNTYyMSA5LjY3MjA1IDEwLjk0NTEgMTIuNjI2MSAxMC45OTMxIDE0SDE0LjVIMTVWMTVIMTQuNUgzLjQ5OTk5Wk05Ljk5MTk3IDE0QzkuOTQyMzYgMTIuNzI1OSA5LjU4NjI5IDEwLjI4OCA3LjAzNDM1IDkuMDY0NDlMNC4zNDIyNiAxNEg5Ljk5MTk3WiIgZmlsbD0iI0Y4RjlGRCIvPgo8L3N2Zz4K"),light:n("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMy40OTk5OSAxNUgyLjY1NzcxTDMuMDYxMDQgMTQuMjYwNkw5LjA2MTA0IDMuMjYwNTdMOS4zMDA0NiAyLjgyMTYyTDEwLjE3ODQgMy4zMDA0OEw5LjkzODkzIDMuNzM5NDJMNy41MTM4NSA4LjE4NTQyQzEwLjU2MjEgOS42NzIwNSAxMC45NDUxIDEyLjYyNjEgMTAuOTkzMSAxNEgxNC41SDE1VjE1SDE0LjVIMy40OTk5OVpNOS45OTE5NyAxNEM5Ljk0MjM2IDEyLjcyNTkgOS41ODYyOSAxMC4yODggNy4wMzQzNSA5LjA2NDQ5TDQuMzQyMjYgMTRIOS45OTE5N1oiIGZpbGw9IiMyQTJFMzkiLz4NCjwvc3ZnPg0K")},barsRange:{dark:n("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMiAzVjMuNVY1SDFWNlYxM1YxNEgyVjE1LjVWMTZIM1YxNS41VjE0SDRWMTNWNlY1SDNWMy41VjNIMlpNOC4yMDcxMSA3LjVMNy44NTM1NSA3Ljg1MzU1TDYuNzA3MTEgOUgxMS4yOTI5TDEwLjE0NjQgNy44NTM1NUw5Ljc5Mjg5IDcuNUwxMC41IDYuNzkyODlMMTAuODUzNiA3LjE0NjQ1TDEyLjg1MzYgOS4xNDY0NUwxMy4yMDcxIDkuNUwxMi44NTM2IDkuODUzNTVMMTAuODUzNiAxMS44NTM2TDEwLjUgMTIuMjA3MUw5Ljc5Mjg5IDExLjVMMTAuMTQ2NCAxMS4xNDY0TDExLjI5MjkgMTBINi43MDcxMUw3Ljg1MzU1IDExLjE0NjRMOC4yMDcxMSAxMS41TDcuNSAxMi4yMDcxTDcuMTQ2NDUgMTEuODUzNkw1LjE0NjQ1IDkuODUzNTVMNC43OTI4OSA5LjVMNS4xNDY0NSA5LjE0NjQ1TDcuMTQ2NDUgNy4xNDY0NUw3LjUgNi43OTI4OUw4LjIwNzExIDcuNVpNMyA2SDJWMTNIM1Y2Wk0xNSAzLjVWM0gxNlYzLjVWNUgxN1Y2VjEzVjE0SDE2VjE1LjVWMTZIMTVWMTUuNVYxNEgxNFYxM1Y2VjVIMTVWMy41Wk0xNSA2SDE2VjEzSDE1VjZaIiBmaWxsPSIjRjhGOUZEIi8+DQo8L3N2Zz4NCg=="),
light:n("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMiAzVjMuNVY1SDFWNlYxM1YxNEgyVjE1LjVWMTZIM1YxNS41VjE0SDRWMTNWNlY1SDNWMy41VjNIMlpNOC4yMDcxMSA3LjVMNy44NTM1NSA3Ljg1MzU1TDYuNzA3MTEgOUgxMS4yOTI5TDEwLjE0NjQgNy44NTM1NUw5Ljc5Mjg5IDcuNUwxMC41IDYuNzkyODlMMTAuODUzNiA3LjE0NjQ1TDEyLjg1MzYgOS4xNDY0NUwxMy4yMDcxIDkuNUwxMi44NTM2IDkuODUzNTVMMTAuODUzNiAxMS44NTM2TDEwLjUgMTIuMjA3MUw5Ljc5Mjg5IDExLjVMMTAuMTQ2NCAxMS4xNDY0TDExLjI5MjkgMTBINi43MDcxMUw3Ljg1MzU1IDExLjE0NjRMOC4yMDcxMSAxMS41TDcuNSAxMi4yMDcxTDcuMTQ2NDUgMTEuODUzNkw1LjE0NjQ1IDkuODUzNTVMNC43OTI4OSA5LjVMNS4xNDY0NSA5LjE0NjQ1TDcuMTQ2NDUgNy4xNDY0NUw3LjUgNi43OTI4OUw4LjIwNzExIDcuNVpNMyA2SDJWMTNIM1Y2Wk0xNSAzLjVWM0gxNlYzLjVWNUgxN1Y2VjEzVjE0SDE2VjE1LjVWMTZIMTVWMTUuNVYxNEgxNFYxM1Y2VjVIMTVWMy41Wk0xNSA2SDE2VjEzSDE1VjZaIiBmaWxsPSIjMkEyRTM5Ii8+DQo8L3N2Zz4NCg==")},priceRange:{dark:n("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMyAySDMuNUgxMy41SDE0VjNIMTMuNUgzLjVIM1YyWk04LjUgMy43OTI4OUw4Ljg1MzU1IDQuMTQ2NDVMMTAuODUzNiA2LjE0NjQ1TDExLjIwNzEgNi41TDEwLjUgNy4yMDcxMUwxMC4xNDY0IDYuODUzNTVMOSA1LjcwNzExVjEyLjI5MjlMMTAuMTQ2NCAxMS4xNDY0TDEwLjUgMTAuNzkyOUwxMS4yMDcxIDExLjVMMTAuODUzNiAxMS44NTM2TDguODUzNTUgMTMuODUzNkw4LjUgMTQuMjA3MUw4LjE0NjQ1IDEzLjg1MzZMNi4xNDY0NSAxMS44NTM2TDUuNzkyODkgMTEuNUw2LjUgMTAuNzkyOUw2Ljg1MzU1IDExLjE0NjRMOCAxMi4yOTI5VjUuNzA3MTFMNi44NTM1NSA2Ljg1MzU1TDYuNSA3LjIwNzExTDUuNzkyODkgNi41TDYuMTQ2NDUgNi4xNDY0NUw4LjE0NjQ1IDQuMTQ2NDVMOC41IDMuNzkyODlaTTMuNSAxNkgzVjE1SDMuNUgxMy41SDE0VjE2SDEzLjVIMy41WiIgZmlsbD0iI0Y4RjlGRCIvPg0KPC9zdmc+DQo="),light:n("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMyAySDMuNUgxMy41SDE0VjNIMTMuNUgzLjVIM1YyWk04LjUgMy43OTI4OUw4Ljg1MzU1IDQuMTQ2NDVMMTAuODUzNiA2LjE0NjQ1TDExLjIwNzEgNi41TDEwLjUgNy4yMDcxMUwxMC4xNDY0IDYuODUzNTVMOSA1LjcwNzExVjEyLjI5MjlMMTAuMTQ2NCAxMS4xNDY0TDEwLjUgMTAuNzkyOUwxMS4yMDcxIDExLjVMMTAuODUzNiAxMS44NTM2TDguODUzNTUgMTMuODUzNkw4LjUgMTQuMjA3MUw4LjE0NjQ1IDEzLjg1MzZMNi4xNDY0NSAxMS44NTM2TDUuNzkyODkgMTEuNUw2LjUgMTAuNzkyOUw2Ljg1MzU1IDExLjE0NjRMOCAxMi4yOTI5VjUuNzA3MTFMNi44NTM1NSA2Ljg1MzU1TDYuNSA3LjIwNzExTDUuNzkyODkgNi41TDYuMTQ2NDUgNi4xNDY0NUw4LjE0NjQ1IDQuMTQ2NDVMOC41IDMuNzkyODlaTTMuNSAxNkgzVjE1SDMuNUgxMy41SDE0VjE2SDEzLjVIMy41WiIgZmlsbD0iIzJBMkUzOSIvPg0KPC9zdmc+DQo=")}},_=18,f=new Map,m=function(){function e(e,t,i){this._fontSize=0,this._preRendered=!1,this._boundingBox=null,this._rect=null,this._padding=null,this._textPoint=null,this._textSizeCache=t,this._data=e,this._fontSize=e.fontSize?e.fontSize:12,this._lineSpacing=Object(h.isNumber)(this._data.lineSpacing)&&this._data.lineSpacing?this._data.lineSpacing:0,
e.lines=this._lines=Object(l.wordWrap)(e.text,this.fontStyle(),e.wordWrapWidth),this._hittest=i||new c.HitTestResult(c.HitTestResult.MOVEPOINT)}return e.prototype.fontStyle=function(){return(this._data.bold?"bold ":"")+(this._data.italic?"italic ":"")+this._fontSize+"px "+this._data.font},e.prototype.draw=function(e){var t,i,n,o,r,l,c,h,d,p,f,m,y,g,v,S;if(0===this._data.points.length)return{width:0};if(this._preRender(),t=this._fontSize+this._lineSpacing,e.textBaseline="top",e.font=this.fontStyle(),i=Object(s.ensureNotNull)(this._rect),this._rect){if("right"!==this._data.horzAlign&&"center"!==this._data.horzAlign||!0!==this._data.doNotAlignText&&(e.textAlign="right"===this._data.horzAlign?"end":"center"),this._data.backgroundRoundRect?(Object(u.drawRoundRect)(e,i.x,i.y,i.w,i.h,this._data.backgroundRoundRect),e.fillStyle=this._data.backgroundColor,e.fill(),e.globalAlpha=1):(e.fillStyle=this._data.backgroundColor,e.fillRect(i.x,i.y,i.w,i.h),e.globalAlpha=1),!a.isIE&&this._data.icons)for(n=0,o=Math.ceil((_-this._fontSize)/2),r=Object(s.ensureNotNull)(this._padding),l=0,c=this._data.icons;l<c.length;l++)h=c[l],d=i.x+r.left,p=i.y+r.top+t*n-o,this._drawIcon(e,d,p,h,Boolean(this._data.isDark)),n+=1}else"right"===this._data.horzAlign?e.textAlign="end":"center"===this._data.horzAlign&&(e.textAlign="center");for(m=(f=Object(s.ensureNotNull)(this._textPoint)).x,y=f.y,e.fillStyle=this._data.color,g=0,v=this._lines;g<v.length;g++)S=v[g],e.fillText(S,m,y),y+=t;return{width:i.w+2}},e.prototype.hitTest=function(e){return 0===this._data.points.length?null:(this._preRender(),this._boundingBox&&Object(r.pointInBox)(e,this._boundingBox)?this._hittest:null)},e.prototype._preRender=function(){var e,t,i,n,r,l,c,u,h,p,f,m,y,g,v,S,b;if(!this._preRendered){if(e=function(){if(null!==d)return d;var e=document.createElement("canvas");return e.width=0,e.height=0,d=e.getContext("2d"),Object(s.ensureNotNull)(d)}(),i=t=this._data.points[0].x+(this._data.offsetX||0),r=n=this._data.points[0].y+(this._data.offsetY||0),u=((l=this._fontSize)+(c=this._lineSpacing))*this._lines.length-c,e.textBaseline="top",e.font=this.fontStyle(),h=[],this._data.wordWrapWidth)for(p=this._data.wordWrapWidth,f=0;f<this._lines.length;f++)h.push(this._data.wordWrapWidth);else for(p=0,f=0;f<this._lines.length;f++)m=e.measureText(this._lines[f]).width,h.push(m),p=Math.max(p,m);y={top:this._data.paddingTop,right:this._data.paddingRight,bottom:this._data.paddingBottom,left:this._data.paddingLeft},g={x:Math.floor(t),y:Math.floor(n),w:Math.ceil(p+y.left+y.right),h:Math.ceil(u+y.top+y.bottom)},i+=y.left,r+=y.top,!a.isIE&&this._data.icons&&(v=void 0!==this._data.textPadding?this._data.textPadding:Math.round(l/2),i+=_+v,g.w+=_+v),"bottom"!==this._data.vertAlign&&"middle"!==this._data.vertAlign||(r+=(S="middle"===this._data.vertAlign?n-g.h/2:n-g.h-(g.y-n))-g.y,g.y=S),"right"!==this._data.horzAlign&&"center"!==this._data.horzAlign||(i+=(b="center"===this._data.horzAlign?t-g.w/2:t-g.w-(g.x-t))-g.x,g.x=b,!0!==this._data.doNotAlignText&&("right"===this._data.horzAlign?(e.textAlign="end",
i+=p):(e.textAlign="center",i+=p/2))),g.w%2!=0&&g.w++,g.x+=.5,g.y+=.5,this._boundingBox=Object(o.box)(new o.Point(g.x,g.y),new o.Point(g.x+g.w,g.y+g.h)),this._rect=g,this._padding=y,this._textPoint={x:i,y:r},this._textSizeCache&&(this._textSizeCache.widths=h),this._preRendered=!0}},e.prototype._drawIcon=function(e,t,i,n,o){var r,a,l=window.devicePixelRatio||1,c=""+n+this._data.isDark+l,u=f.get(c);u||((u=document.createElement("canvas")).width=_*l,u.height=_*l,r=Object(s.ensureNotNull)(u.getContext("2d")),a=p[n][o?"dark":"light"],r.drawImage(a,0,0,_*l,_*l),f.set(c,u)),e.drawImage(u,t,i,_,_)},e}()},"54XG":function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"FavoriteStudyTemplateService",function(){return r}),n=i("mrSG"),o=i("ulZB"),r=function(e){function t(t,i){return e.call(this,t,i,"FAVORITE_STUDY_TEMPLATES_CHANGED","StudyTemplates.quicks",[])||this}return Object(n.__extends)(t,e),t.prototype.remove=function(e){this.set(this.get().filter(function(t){return t!==e}))},t}(o.b)},"55Xp":function(e,t,i){"use strict";function n(e){var t,i=e.toString(),n=i.split(".")[1],o=2;return n&&(t=n.match(/^([0]+)/))&&(o=t[1].length+1),parseFloat(i).toFixed(o)}i.r(t),i.d(t,"roundToFirstValuable",function(){return n})},"5B3K":function(e,t,i){"use strict";var n,o;i.r(t),i.d(t,"StudyError",function(){return o}),n=i("mrSG"),o=function(e){function t(t){var i=e.call(this,t)||this;return i.studyError=!0,i}return Object(n.__extends)(t,e),t}(Error)},"5C6T":function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"PipFormatter",function(){return r}),n=i("mrSG"),o=i("kcTO"),r=function(e){function t(t,i,n,o){var r=this;return i||(i=1),"forex"!==n&&"cfd"!==n||!o?(r=e.call(this,1)||this)._isForex=!1:(r=e.call(this,o)||this)._isForex=!0,r._pipPriceScale=t,r._pipMinMove=i,r._pipMinMove2=o,r}return Object(n.__extends)(t,e),t.prototype.format=function(t,i,n){var o=this._isForex?this._pipMinMove2:this._pipMinMove;return void 0===o&&(o=NaN),e.prototype.format.call(this,t*this._pipPriceScale/o,i,n)},t}(o.PriceFormatter)},"5JMW":function(e,t,i){"use strict";function n(e){return"LineToolRiskRewardLong"===e||"LineToolRiskRewardShort"===e}var o,r,s;i.r(t),i.d(t,"isLineToolRiskReward",function(){return n}),i.d(t,"LineDataSourceApi",function(){return s}),o=i("ogJP"),r=["alwaysShowStats","entryPrice","interval","lastUpdateTime","points","singleChartOnly","snapTo45Degrees","stopPrice","symbol","targetPrice"],s=function(){function e(e,t,i){this._source=e,this._model=t,this._pointsConverter=i}return e.prototype.isSelectionEnabled=function(){return this._source.isSelectionEnabled()},e.prototype.setSelectionEnabled=function(e){this._source.setSelectionEnabled(e)},e.prototype.isSavingEnabled=function(){return this._source.isSavedInChart()},e.prototype.setSavingEnabled=function(e){this._source.setSavingInChartEnabled(e)},e.prototype.isShowInObjectsTreeEnabled=function(){return this._source.showInObjectTree()},e.prototype.setShowInObjectsTreeEnabled=function(e){this._source.setShowInObjectsTreeEnabled(e)},e.prototype.isUserEditEnabled=function(){
return this._source.userEditEnabled()},e.prototype.setUserEditEnabled=function(e){this._source.setUserEditEnabled(e)},e.prototype.bringToFront=function(){this._model.bringToFront([this._source])},e.prototype.sendToBack=function(){this._model.sendToBack([this._source])},e.prototype.getProperties=function(){return this._source.properties().state(r,!0)},e.prototype.setProperties=function(e){this._setProps(this._source.properties(),e,"")},e.prototype.getPoints=function(){var e=this._source.points();return n(this._source.getConstructor())&&(e=e.slice(0,2)),this._pointsConverter.dataSourcePointsToPriced(e)},e.prototype.setPoints=function(e){var t,i,o=n(this._source.getConstructor())?2:this._source.pointsCount(),r=-1===o?this._source.points().length:o;if(r!==e.length)throw new Error("Wrong points count. Required="+r);for(t=this._pointsConverter.apiPointsToDataSource(e),i=0;i<t.length;++i)this._source.setPoint(i,t[i]);this._source.createServerPoints()},e.prototype._setProps=function(e,t,i){var n,r,s;for(n in t)t.hasOwnProperty(n)&&(r=0===i.length?n:i+"."+n,e.hasOwnProperty(n)?(s=t[n],Object(o.isHashObject)(s)?this._setProps(e[n],s,r):e[n].setValue(s)):console.warn('Unknown property "'+r+'"'))},e}()},"5VQP":function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"ContextMenuManager",function(){return r}),n=i("mrSG"),o=i("tWVy"),function(e){function t(){Object(o.b)()}var r=[];e.createMenu=function(e,o,s){return void 0===o&&(o={}),Object(n.__awaiter)(this,void 0,void 0,function(){var a,l;return Object(n.__generator)(this,function(n){switch(n.label){case 0:return[4,Promise.all([i.e("react"),i.e(3),i.e(20),i.e(63),i.e(1),i.e("context-menu-renderer")]).then(i.bind(null,"cbq4"))];case 1:return a=n.sent(),l=new a.ContextMenuRenderer(e,o,function(){var e=r.indexOf(l);-1!==e&&r.splice(e,1),void 0!==s&&s()},t),r.push(l),[2,l]}})})},e.hideAll=t,e.getShown=function(){for(var e=0;e<r.length;e++)if(r[e].isShown())return r[e];return null}}(r||(r={}))},"5ZUI":function(e,t,i){"use strict";function n(e,t){var i=t||n.createProperties();o.call(this,e,i),this._constructor="LineToolRay"}var o=i("WPQD").LineToolTrendLine,r=i("Ocx9").DefaultProperty,s=window.t("Ray");inherit(n,o),n.prototype.title=function(){return s},n.prototype.name=function(){return"Ray"},n.createProperties=function(e){var t=new r("linetoolray",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolRay=n},"5fI3":function(e,t,i){"use strict";function n(e){return"="+JSON.stringify(e)}i.r(t),i.d(t,"encodeExtendedSymbol",function(){return n})},"5mo2":function(e,t,i){"use strict";function n(e){return e>=48&&e<=57}function o(e,t){return e.compareTo(t)<0}function r(e,t){return e.compareTo(t)}function s(e,t){var i=Object(l.lowerbound)(e,t,function(e,t){return-1===e.day.compareTo(t)});return i===e.length?null:e[i]}var a,l,c,u,h,d,p,_,f,m,y,g;i.r(t),a=i("jCNj"),l=i("Y7w9"),c=i("uOxu"),u=i("OBgQ"),h=Object(c.getLogger)("Chart.Model.SessionSpec"),d=function(){function e(){this.entries=[],this.firstDayOfWeek=a.MONDAY,this.weekEndsCount=-1}
return e.prototype.parseSessions=function(t,i){var n,o,s,a,l,c,u,d,f,m,y,g,v,S,b,w,P,C,T,x,I,L,M;if(this._clear(),this.timezone=t,"24x7"===(i=this._parseFirstDayOfWeek(i)).toLowerCase())for(n=0,o=_;n<o.length;n++)s=o[n],this.entries.push(e._createSessionEntry(s,0,0,0,0));else{for(a=!1,l=new Map,c=0,u=i.split("|");c<u.length;c++)if(1===(f=(d=u[c]).split(":")).length||2===f.length){if(m=1===f.length){if(a){h.logError("Duplicated default section: "+d);continue}a=!0}for(y=0,g=m?p:e._parseWorkingDays(f[1]);y<g.length;y++)v=g[y],m&&l.has(v)||l.set(v,f[0])}else h.logError("Bad session section: "+d);for(S=0,b=_;S<b.length;S++)if(v=b[S],void 0!==(w=l.get(v)))for(P=0,C=w.split(",");P<C.length;P++)T=C[P],this.entries.push(e._parseSessionEntry(v,T))}for(this.entries.sort(r),x=new Set,I=0,L=this.entries;I<L.length;I++)M=L[I],x.add(M.dayOfWeek());this.weekEndsCount=7-x.size},e.parseHolidaysAndCorrections=function(e,t,i){var n,o,r,s,l,c,u,h,d,p,_,m,y,g,v,S,b,w,P,C,T,x=this,I=new Map,L=new Map,M=function(e){var t=x._parseDay(e),i=t.toString(),n=L.get(i);return void 0!==n?n:(L.set(i,t),t)};if(""!==t)for(n=[],o=0,r=t.split(",");o<r.length;o++){if(8!==(s=r[o]).length)throw new Error("bad holiday date: "+s);l=M(s),I.set(l,n)}if(""===i)return I;for(c="dayoff",u=a.get_timezone("Etc/UTC"),h=0,d=i.split(";");h<d.length;h++){if(2!==(_=(p=d[h]).split(":")).length)throw new Error("bad correction section: "+p);if(m=[],_[0]!==c)for(y=0,g=_[0].split(",");y<g.length;y++)s=g[y],m.push(this._parseSessionEntry(1,s));for(v=0,S=_[1].split(",");v<S.length;v++){if(8!==(s=S[v]).length)throw new Error("bad correction date: "+s);for(l=M(s),b=a.get_day_of_week(a.get_cal(u,l.year,l.month-1,l.day)),w=[],P=0,C=m;P<C.length;P++)T=C[P],w.push(new f(b,T.startOffset(),T.length()));I.set(l,w)}}return I},e.prototype._clear=function(){this.entries=[],this.timezone="",this.firstDayOfWeek=a.MONDAY,this.weekEndsCount=-1},e.prototype._parseFirstDayOfWeek=function(e){var t,i,n=e.split(";");return n.length>2?(h.logError("Only one `first day` specification expected @ session "+e),e):1===n.length?e:(t=1,i=n[0].indexOf("-")>=0?NaN:parseInt(n[0]),isNaN(i)&&(t=0,i=parseInt(n[1])),i<a.SUNDAY||i>a.SATURDAY?(h.logError("Unexpected day index @ session: "+e+"; day index "+i),e):(this.firstDayOfWeek=i,n[t]))},e._parseDay=function(e){var t=parseInt(e.substring(0,4)),i=parseInt(e.substring(4,6)),n=parseInt(e.substring(6,8));return new u.a(t,i,n)},e._parseSessionEntry=function(t,i){var n,o,r,s,a,l,c,u=i.split("-");if(2!==u.length&&(h.logError("Bad sessions entry: "+i),u=["0000","0000"]),n=0,(o=u[0]).includes("F")&&(o=(r=o.split("F"))[0],n=""!==r[1]?parseInt(r[1]):1),s=0,(a=u[1]).includes("F")&&(a=(r=a.split("F"))[0],s=""!==r[1]?parseInt(r[1]):1),!this._isCorrectSession(o)||!this._isCorrectSession(a))throw new Error("Incorrect entry syntax: "+i);return l=o,c=a,this._createSessionEntry(t,e._minutesFromHHMM(l),e._minutesFromHHMM(c),n,s)},e._isCorrectSession=function(e){return 4===e.length&&n(e.charCodeAt(0))&&n(e.charCodeAt(1))&&n(e.charCodeAt(2))&&n(e.charCodeAt(3))},
e._parseWorkingDays=function(e){var t,i,n=[];for(t=0;t<e.length;t++)i=+e[t],-1===n.indexOf(i)&&n.push(i);return n},e._minutesFromHHMM=function(e){return a.get_minutes_from_hhmm(e)},e._createSessionEntry=function(e,t,i,n,o){return 0===i&&(i=a.minutesPerDay),n===o&&i<=t&&(n+=1),n>0&&(t-=n*a.minutesPerDay),o>0&&(i-=o*a.minutesPerDay),new f(e,t,i-t)},e}(),i.d(t,"workingDays",function(){return p}),i.d(t,"workingDaysAndWeekEnds",function(){return _}),i.d(t,"compareSessionEntries",function(){return r}),i.d(t,"SessionEntry",function(){return f}),i.d(t,"EntryIndex",function(){return m}),i.d(t,"SessionSpec",function(){return g}),p=[a.MONDAY,a.TUESDAY,a.WEDNESDAY,a.THURSDAY,a.FRIDAY],_=[a.SUNDAY,a.MONDAY,a.TUESDAY,a.WEDNESDAY,a.THURSDAY,a.FRIDAY,a.SATURDAY],f=function(){function e(e,t,i){this._dayOfWeek=e,this._start=t,this._length=i}return e.prototype.start=function(){return this._start+a.minutesPerDay*this.sessionStartDaysOffset()},e.prototype.startOffset=function(){return this._start},e.prototype.sessionStartDaysOffset=function(){return this._start>=0?0:this._start%a.minutesPerDay==0?-Math.ceil(this._start/a.minutesPerDay):-Math.floor(this._start/a.minutesPerDay)},e.prototype.isOvernight=function(){return this._start<0},e.prototype.dayOfWeek=function(){return this._dayOfWeek},e.prototype.sessionStartDayOfWeek=function(){var e=this._dayOfWeek-this.sessionStartDaysOffset();return e<a.SUNDAY&&(e+=7),e},e.prototype.length=function(){return this._length},e.prototype.weight=function(){return this._dayOfWeek*a.minutesPerDay+this._start},e.prototype.compareTo=function(e){var t=this.weight(),i=t+this._length,n=e.weight(),o=n+e._length;return t<=n&&n<i||n<=t&&t<o?0:t>n?1:-1},e.prototype.contains=function(e){var t,i=60*a.get_hours(e)+a.get_minutes(e),n=a.get_day_of_week(e),o=n-this._dayOfWeek;return o>0&&(o-=7),(t=o*a.minutesPerDay+i)>=this._start&&t<this._start+this._length},e}(),m=function(){function e(e,t,i){this.weekIndex=e,this.entryIndex=t,this.entries=i}return e.prototype.getEntry=function(){return this.entries[this.entryIndex]},e}(),y=621672192e5,g=function(){function e(e,t,i,n){var o,r,s,l=this;void 0===e&&(e="Etc/UTC"),void 0===t&&(t="0000-0000"),void 0===i&&(i=""),void 0===n&&(n=""),this._entries=[],this._firstDayOfWeek=a.MONDAY,this._entriesHash=new Map,this._holidayAndCorrectionMap=new Map,this._holidaySessions=[],(o=new d).parseSessions(e,t),this._entries=o.entries,this._timezone=o.timezone,this._firstDayOfWeek=o.firstDayOfWeek,this._weekEndsCount=o.weekEndsCount,r=d.parseHolidaysAndCorrections(e,i,n),s=a.get_timezone(e),this._isThereCorrections=""!==i||""!==n,r.forEach(function(e,t){l._holidayAndCorrectionMap.set(t.toString(),e),l._holidaySessions.push({day:t,sessions:e});var i=l.getWeekIndex(t.toCalendar(s));l._entriesHash.set(i,null)}),this._holidaySessions.sort(function(e,t){return e.day.compareTo(t.day)})}return e.prototype.entries=function(){return this._entries},e.prototype.timezone=function(){return this._timezone},e.prototype.firstDayOfWeek=function(){return this._firstDayOfWeek},
e.prototype.addSessionEntry=function(e,t,i,n,o){0===i&&(i=a.minutesPerDay),n===o&&i<=t&&(n+=1),n>0&&(t-=n*a.minutesPerDay),o>0&&(i-=o*a.minutesPerDay);var r=i-t;this._entries.push(new f(e,t,r))},e.prototype.longestSessionLength=function(){var e,t,i=0,n=0;for(e=0,t=this._holidaySessions;e<t.length;e++)t[e].sessions.forEach(function(e){i=Math.max(i,e.length())});return this._entries.forEach(function(e){n=Math.max(n,e.length())}),Math.max(i,n)},e.prototype.isWeekEnd=function(e){var t=Object(l.lowerbound)(this._entries,new f(e,0,0),function(e,t){return e.dayOfWeek()<t.dayOfWeek()});return t>this._entries.length-1||this._entries[t].dayOfWeek()!==e},e.prototype.isCalWeekEnd=function(e){var t,i,n=a.get_day_of_week(e);return this._isThereCorrections?(t=u.a.fromCalendar(e),void 0===(i=this._holidayAndCorrectionMap.get(t.toString()))?this.isWeekEnd(n):0===i.length):this.isWeekEnd(n)},e.prototype.hasWeekEnds=function(){return this.weekEndsCount()>0},e.prototype.weekEndsCount=function(){return this._weekEndsCount},e.prototype.holidaysFromYearStart=function(e){var t,i,n,o,r,s,l;if(!this._isThereCorrections)return 0;for(t=a.get_timezone(this._timezone),i=new u.a(a.get_year(e),a.JANUARY,1),n=u.a.fromCalendar(e),o=0,r=this._selectHolidays(i,n),s=0;s<r.length;s++)l=r[s].day.toCalendar(t),this.isWeekEnd(a.get_day_of_week(l))?o+=0===r[s].sessions.length?0:-1:o+=0===r[s].sessions.length?1:0;return o},e.prototype.intradayCanBeBuiltFrom24x7=function(e){return this._entries.every(function(t){return t.start()%e==0&&t.length()%e==0})},e.prototype.indexOfSession=function(e,t,i){var n,r,s,c=this._getEntriesForWeek(e),u=Object(l.lowerbound)(c,new f(t,i,0),o);if(u!==c.length)return new m(e,u,c);for(n=e,r=7-t+this._firstDayOfWeek-1,i=-(a.minutesPerDay-i+r*a.minutesPerDay);;)if(n++,0!==(s=this._getEntriesForWeek(n)).length)return u=Object(l.lowerbound)(s,new f(this._firstDayOfWeek,i,0),o),new m(n,u,s)},e.prototype.findSession=function(e,t,i,n){var o,r,s,a,l,c;if(void 0===n&&(n=0),r=(o=this.indexOfSession(e,t,i)).entries,s=o.entryIndex,0!==n)for(a=r[s].dayOfWeek(),l=n>0?1:-1;!((c=s+l)<0||c>=r.length||r[c].dayOfWeek()!==a);)s=c;return new m(o.weekIndex,s,r)},e.prototype.getWeekIndex=function(e){var t,i,n;return this._isThereCorrections?(t=a.get_day_of_week(e)-a.SUNDAY,i=a.get_timezone("Etc/UTC"),n=a.get_cal(i,a.get_year(e),a.get_month(e),a.get_day_of_month(e)-t),Math.floor((n.getTime()+y)/1e3/86400/7)):0},e.prototype.correctTradingDay=function(e){var t=a.get_day_of_week(e),i=60*a.get_hours(e)+a.get_minutes(e),n=this.getWeekIndex(e),o=this.findSession(n,t,i,0),r=o.getEntry().dayOfWeek(),s=o.weekIndex-n,l=r-t+7*s;return 0!==l&&a.add_date(e,l),e},e.prototype.alignToSessionStart=function(e,t){var i,n,o,r,s,l,c;return void 0===t&&(t=0),i=a.get_day_of_week(e),n=60*a.get_hours(e)+a.get_minutes(e),o=this.getWeekIndex(e),0!==(l=(s=(r=this.findSession(o,i,n,t)).getEntry()).dayOfWeek()-i+7*(r.weekIndex-o))&&a.add_date(e,l),c=s.startOffset(),a.set_hms(e,c/60,c%60,0,0,a.get_timezone(this._timezone)),s.length()},
e.prototype.businessDaysToCalendarDays=function(e,t){for(var i,n,o,r,s=this.getWeekIndex(e),l=a.get_day_of_week(e),c=0,u=0;u<t;){for(i=this._getEntriesForWeek(s),n=0,o=l;o<=a.SATURDAY;o++){for(c++,r=!0;n<i.length&&!(i[n].dayOfWeek()>o);)i[n].dayOfWeek()<o?n++:(r&&(r=!1,u++),n++);if(u>=t)return c}s++,l=a.SUNDAY}return c},e.prototype.calendarDaysToBusinessDays=function(e,t){for(var i,n,o,r,s=this.getWeekIndex(e),l=a.get_day_of_week(e),c=0,u=0;c<t;){for(i=this._getEntriesForWeek(s),n=0,o=l;o<=a.SATURDAY;o++){for(c++,r=!0;n<i.length&&!(i[n].dayOfWeek()>o);)i[n].dayOfWeek()<o?n++:(r&&(r=!1,u++),n++);if(c>=t)return u}s++,l=a.SUNDAY}return u},e.prototype.alignToNearestSessionStart=function(e,t){return this._alignToNearestSessionValue(e,t,this._entrySessionStart.bind(this))},e.prototype.alignToNearestSessionEnd=function(e,t){return this._alignToNearestSessionValue(e,t,this._entrySessionEnd.bind(this))},e.prototype.leftBorderOfDailyBar=function(e){var t=this._getEntriesForDay(e);return 0===t.length?null:(t.sort(r),this._getLeftEntryBorder(e,t[0]))},e.prototype.bordersOfDailyBar=function(e){var t,i,n,o,s,l=this._getEntriesForDay(e);return 0===l.length?null:(l.sort(r),t=this._getLeftEntryBorder(e,l[0]),i=l[l.length-1],n=a.clone(e),o=60*(i.startOffset()+i.length())-1,o-=3600*(s=Math.floor(o/3600)),a.set_hms(n,s,o/60,o%60,0,a.get_timezone(this._timezone)),{from:t,to:n})},e.prototype._getEntriesForWeek=function(e){var t,i,n,o,s,l,c,h,d=this._entriesHash.get(e);if(void 0===d)return this._entries;if(null!==d)return d;for(t=a.get_timezone(this._timezone),d=this._entries.slice(),i=this._weekIndexToCalendar(e),n=this._weekIndexToCalendar(e+1),o=u.a.fromCalendar(i),s=u.a.fromCalendar(n),l=function(e){var i=e.day,n=i.toCalendar(t),o=a.get_day_of_week(n);d=(d=d.filter(function(e){return e.dayOfWeek()!==o})).concat(e.sessions)},c=0,h=this._selectHolidays(o,s);c<h.length;c++)l(h[c]);return d.sort(r),this._entriesHash.set(e,d),d},e.prototype._selectHolidays=function(e,t){for(var i,n=[],o=e;;){if(null===(i=s(this._holidaySessions,o)))return n;if(!i.day.before(t))return n;n.push(i),o=i.day.addDays(1)}},e.prototype._weekIndexToCalendar=function(e){var t=1e3*(86400*e*7+86400)-y,i=a.get_cal_from_unix_timestamp_ms(a.get_timezone("Etc/UTC"),t),n=a.get_timezone("Etc/UTC");return a.get_cal(n,a.get_year(i),a.get_month(i),a.get_day_of_month(i))},e.prototype._alignToNearestSessionValue=function(e,t,i){var n,o,r,s=a.get_day_of_week(e),l=60*a.get_hours(e)+a.get_minutes(e),c=this.getWeekIndex(e),u=this.findSession(c,s,l);if(u.getEntry().contains(e)&&c===u.weekIndex||1===t)return i(u,a.clone(e),t);if((n=u.entryIndex-1)<0){for(o=u.weekIndex,r=u.entries;n<0;)o--,n+=(r=this._getEntriesForWeek(o)).length;u=new m(o,n,r)}else u=new m(u.weekIndex,n,u.entries);return i(u,a.clone(e),t)},e.prototype._entrySessionStart=function(e,t,i){return this._entrySessionValue(e,t,i,function(e){return 60*e.start()})},e.prototype._entrySessionEnd=function(e,t,i){return this._entrySessionValue(e,t,i,function(e){return 60*(e.start()+e.length())-1})},
e.prototype._entrySessionValue=function(e,t,i,n){var o,r,s,l=a.get_day_of_week(t),c=e.getEntry(),u=c.dayOfWeek()-c.sessionStartDaysOffset(),h=this.getWeekIndex(t),d=e.weekIndex-h,p=!1;return u<a.SUNDAY&&(d<=0?p=!0:d--,u+=7),(d>0&&i>=0||d<0&&i<0)&&a.add_date(t,7*d),c.contains(t)||(o=u-l,p&&i<0&&(o=-(7-u+l)),a.add_date(t,o),l=a.get_day_of_week(t)),c.isOvernight()&&l===c.dayOfWeek()&&a.add_date(t,-c.sessionStartDaysOffset()),r=n(c),r-=3600*(s=Math.floor(r/3600)),a.set_hms(t,s,r/60,r%60,0,a.get_timezone(this._timezone)),t},e.prototype._getEntriesForDay=function(e){var t=a.get_day_of_week(e),i=this._getEntriesForWeek(this.getWeekIndex(e));return i.filter(function(e){return e.dayOfWeek()===t})},e.prototype._getLeftEntryBorder=function(e,t){var i=a.clone(e),n=t.startOffset();return a.set_hms(i,n/60,n%60,0,0,a.get_timezone(this._timezone)),i},e}()},"5rJj":function(e,t,i){"use strict";(function(t){function n(e,t,i,n){this._map=Object.assign({},this._map,n),t&&(t=this.unpackLevels(t)),r.call(this,e,t,i),this.updateCollectibleProperty()}var o=i("ogJP").isSameType,r=i("Ocx9").DefaultProperty,s=i("vADo");inherit(n,r),n.prototype.state=function(e,i){(e=e||[]).push("__collectibleLines");var n=t.prototype.state.call(this,e);return i?n:this.packLevels(n)},n.prototype.clone=function(){var e,t,i=this.state();for(this.__collectibleLines&&(i.__collectibleLines=this.__collectibleLines.state()),e=new n(this._defaultName,i),t=0;t<this._exclusions.length;++t)e.addExclusion(this._exclusions[t]);return e},n.prototype.merge=function(e,i){var n=t.prototype.merge.call(this,this.unpackLevels(e),i);return this.updateCollectibleProperty(),n},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,n){return n.push(i[t]),n},n.prototype._unpackLvlFill=function(e,t,i,n){return n[t]=i[e],n},n.prototype._iterateLevels=function(e,t){var i,n,r,s,a;for(i in this._map.prefixes)for(n=(this._map.prefixes[i]||"")+"level",r=this._map.range[0];r<=this._map.range[1];r++)if(e[n+r]&&o(e[n+r],t.typecheck())){for(a in s=t.tpl(),this._map.names)s=t.fill(a,this._map.names[a],e[n+r],s);e[n+r]=s}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))},n.prototype.updateCollectibleProperty=function(){var e,t;this.__collectibleLines&&(e=this,t=[],this.__collectibleLines._childs.forEach(function(i){var n,o=e.__collectibleLines[i].value(),r=o.split("."),s=e[r[0]];for(n=1;n<r.length&&s;++n)s=s[r[n]];s&&t.push({property:s.color,defaultValue:s.color.value()})}),
this.collectibleColors?this.collectibleColors.reloadProperties(t):this.collectibleColors=new s(t))},e.exports=n}).call(this,i("tc+8"))},"68at":function(e,t,i){"use strict";function n(){a.call(this)}function o(e,t){this._constructor="LineToolProjection";var n=t||o.createProperties();l.call(this,e,n),i.e("lt-pane-views").then(function(e){var t=i("jlk4").ProjectionLinePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var r=i("5rJj"),s=i("9QkW").LineToolFibWedge,a=i("xUGI"),l=i("Ss5c").LineDataSource,c=i("hayr").propertyPages,u=window.t("Projection");inherit(n,a),n.prototype.levelsCount=function(){return 1},inherit(o,s),o.prototype.title=function(){return u},o.prototype.name=function(){return"Projection"},o.prototype.hasEditableCoordinates=function(){return!1},o.prototype.getCache=function(){return this._model._projectionLabelsCache||(this._model._projectionLabelsCache=new n),this._model._projectionLabelsCache},o.prototype.getStylesPropertyPage=function(){return c.LineToolProjectionStylesPropertyPage},o.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("LzAw").ProjectionDefinitionsViewModel}.bind(null,i)).catch(i.oe)},o.createProperties=function(e){var t=new r("linetoolprojection",e,!1,{range:[1,1]});return o._configureProperties(t),t},o._configureProperties=function(e){s._configureProperties(e)},t.LineToolProjection=o},"6Kf3":function(e,t,i){"use strict";var n,o,r,s,a,l;i.d(t,"a",function(){return l}),n=i("/pi9"),o=i("Eyy1"),r={},s=Object.keys(n).length,a=/^#[0-9A-F]{6}$/i,Object.keys(n).forEach(function(e){var t=function e(t,i){var o,r;return void 0===i&&(i=[]),(o=n[t])?a.test(o)?o:(r=o,i.push(t),-1!==i.indexOf(r)?(console.warn("Colors definitions cycled"),o):i.length>s?(console.warn("Too many variables-link in HEX-color search: "+i[0]),null):e(r,i)):null}(e);r[e]=Object(o.ensureNotNull)(t)}),l=r},"6a0U":function(e,t,i){"use strict";function n(e){this.items=e.items,this.barSpacing=e.barSpacing,this.colorUp=e.colorup,this.colorDn=e.colordown,this.colorBorderUp=e.colorBorderUp,this.colorBorderDown=e.colorBorderDown,this.width=this._calculateWidth(e.barSpacing),this.minHeight=e.minHeight,this.vertOffset=this._calculateVerticalOffset(e.barSpacing)}function o(e,t,i,n){this.x=e,this.y=t,this.height=i,this.isUp=n}var r=i("aO4+").Point,s=i("VdBB").HitTestResult;n.prototype._calculateVerticalOffset=function(e){return Math.round((e||0)/4)},n.prototype._calculateMinHeight=function(e){return this.width||this._calculateWidth(e)},n.prototype._calculateWidth=function(e){e=e||this.barSpacing;return Math.round(e/2)},n.prototype.draw=function(e){var t,i,n,o,r,s,a,l=this.width,c=l<4,u=Math.max(parseInt(l/2),1),h=Math.round(this.width/2),d=Math.round(this.width);for(e.translate(1,1),t=0,i=this.items.length;t<i;t++)o=(n=this.items[t]).isUp?-1:1,r=Math.abs(n.height),s=n.y-o*this.vertOffset,e.beginPath(),e.translate(n.x,s),c?(e.moveTo(0,0),e.lineTo(-h,-h*o),e.moveTo(0,0),e.lineTo(h,-h*o),
e.moveTo(0,0),e.lineTo(0,-r*o),e.moveTo(-h,-r*o),e.lineTo(h,-r*o),e.lineWidth=u,e.strokeStyle=n.isUp?this.colorUp:this.colorDn,e.stroke()):(e.moveTo(0,0),r<d?(e.lineTo(l,-r*o),e.lineTo(-l,-r*o)):(e.lineTo(l,-d*o),e.lineTo(h,-d*o),e.lineTo(h,-r*o),e.lineTo(-h,-r*o),e.lineTo(-h,-d*o),e.lineTo(-l,-d*o)),e.lineTo(0,0),a=n.isUp?this.colorBorderUp:this.colorBorderDown,e.strokeStyle=a,e.stroke(),e.fillStyle=n.isUp?this.colorUp:this.colorDn,e.fill()),e.translate(-n.x,-s);e.translate(-1,-1)},n.prototype.hitTest=function(e){var t,i,n,o,r,a,l,c,u,h=Math.round(this.width/2),d=Math.round(this.width);for(t=0;t<this.items.length;++t)if((i=this.items[t])&&void 0!==i.x&&null!==i.x&&!TradingView.isNaN(i.x)&&void 0!==i.y&&null!==i.y&&!TradingView.isNaN(i.y)&&(n=Math.abs(i.height),o=i.isUp?-1:1,r=n+d,l=(a=i.y-o*this.vertOffset)-o*r,c=i.x-h,u=i.x+h,c<e.x&&e.x<u&&(i.isUp?a<e.y&&e.y<l:l<e.y&&e.y<a)))return new s(s.REGULAR);return null},inherit(o,r),t.PaneRendererArrowsUpDown=TradingView.PaneRendererArrowsUpDown=n,t.PaneRendererArrowsUpDownItem=TradingView.PaneRendererArrowsUpDownItem=o},"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";function n(e){for(var t=0;t<d.length;t++)if(d[t].name===e)return t;return-1}function o(e){if(!p)for(var t=d.length-1;t>=0&&!0!==d[t].func(e);t--);}function r(e){e.addEventListener("keypress",o,!1)}function s(e,t){var i={name:e,func:t},o=n(i.name);o>-1?d[o]=i:d.push(i)}function a(e){d.forEach(function(t,i){t.name===e&&d.splice(i,1)})}function l(e,t){var i={name:e,func:t},o=n(i.name);o>-1&&d.splice(o,1),d.unshift(i)}function c(){return p?null:p=Object(h.randomHashN)(4)}function u(e){if(e!==p)throw Error("Lock id is outdated");p=null}var h,d,p;i.r(t),i.d(t,"listen",function(){return r}),i.d(t,"registerListener",function(){return s}),i.d(t,"removeListener",function(){return a}),i.d(t,"pushBackListener",function(){return l}),i.d(t,"disable",function(){return c}),i.d(t,"enable",function(){return u}),h=i("0waE"),d=[],p=null,r(window)},"6ptY":function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"PaneRendererSquare",function(){return r}),n=i("mrSG"),o=i("2WC2"),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._drawItemShape=function(e,t){var i=t.height,n=Math.round(i/2),o=t.x-n,r=t.vertOffset,s=t.y+r-n;e.rect(o,s,i,i)},t}(o.a)},"6sst":function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"OverlayStudyPriceLineAxisView",function(){return r}),n=i("mrSG"),o=i("TmNs"),r=function(e){function t(t){var i=e.call(this)||this;return i._study=t,i}return Object(n.__extends)(t,e),t.prototype._value=function(){return this._study.lastValueData("",!0)},t.prototype._priceLineColor=function(e){return e},t.prototype._lineWidth=function(){return 1},
t.prototype._isVisible=function(){var e=this._study.model().properties().scalesProperties,t=e.showSeriesLastValue.value();return this._study.properties().childs().showPriceLine.value()&&t},t}(o.PriceLineAxisView)},"6xeX":function(e,t,i){"use strict";function n(e){return"string"==typeof e&&0!==e.trim().length}function o(e,t){var i,n,o,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return e.hasOwnProperty("text")?(i=s&&(0,c.forceLTRStr)(e.text)||e.text,e.hasOwnProperty("color")&&r?((n=document.createElement("span")).style.cssText="color: "+e.color,h.html(n,i),t.appendChild(n)):h.html(t,i)):(o=s&&(0,c.forceLTRStr)(e)||e,h.html(t,o)),t}function r(e,t){var i,n;Array.isArray(e)&&2===e.length?((i=document.createElement("dl")).appendChild(o(e[0],document.createElement("dt"))),i.appendChild(o(e[1],document.createElement("dd"),!0,!0)),t.appendChild(i)):e.hasOwnProperty("br")&&e.br?t.appendChild(document.createElement("br")):((n=document.createElement("dl")).appendChild(o(e,document.createElement("dt"))),t.appendChild(n),e.hasOwnProperty("listItem")&&n.classList.add("list-item"))}function s(e,t){var i,n=(0,c.forceLTRStr)(e.text);e.attr=e.attr||{},i=document.createElement("a"),h.attr(i,"href",e.href),h.addClass(i,e.class),h.attr(i,e.attr.name,e.attr.value),h.html(i,n),t.appendChild(i)}function a(e,t){var i,n,o,a,l,u,d,p,_,f,m,y,g,v,S,b,w,P,C,T,x=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if("string"==typeof e)i=(0,c.forceLTRStr)(e),n=document.createElement("h2"),h.html(n,i),t.appendChild(n);else if(e.hasOwnProperty("lines"))for(o=0;o<e.lines.length;o++)e.lines[o].hasOwnProperty("line")?0===o?e.lines[o].line.isEmpty||(a=document.createElement("h2"),h.html(a,e.lines[o].line),t.appendChild(a)):r(e.lines[o].line,t):e.lines[o].hasOwnProperty("link")&&s(e.lines[o].link,t);else e.hasOwnProperty("title")&&(l=document.createElement("h2"),h.html(l,e.title),t.appendChild(l)),e.hasOwnProperty("actual")&&(u=e.actual&&(0,c.forceLTRStr)(e.actual),d=document.createElement("dl"),(p=document.createElement("dt")).textContent=window.t("Actual")+": ",_=document.createElement("dd"),h.html(_,u||"—"),d.appendChild(p),d.appendChild(_),t.appendChild(d)),e.hasOwnProperty("forecast")&&(f=e.forecast&&(0,c.forceLTRStr)(e.forecast),m=document.createElement("dl"),(y=document.createElement("dt")).textContent=window.t("Forecast")+": ",g=document.createElement("dd"),h.html(g,f||"—"),m.appendChild(y),m.appendChild(g),t.appendChild(m)),e.hasOwnProperty("previous")&&(v=e.previous&&(0,c.forceLTRStr)(e.previous),S=document.createElement("dl"),(b=document.createElement("dt")).textContent=window.t("Previous")+": ",w=document.createElement("dd"),h.html(w,v||"—"),S.appendChild(b),S.appendChild(w),t.appendChild(S)),e.hasOwnProperty("timestamp")&&(P=document.createElement("dl"),(C=document.createElement("dt")).textContent=window.t("Date")+": ",T=document.createElement("dd"),h.html(T,function(e,t){var i=new Date(e+t),n=Math.round(Math.abs(t)/6e4),o="UTC";return 0!==n&&(o+=t>0?"+":"-",
o+=Math.floor(n/60),n%60&&(o+=":"+n%60)),i.getUTCFullYear()+"-"+("0"+(i.getUTCMonth()+1)).slice(-2)+"-"+("0"+i.getUTCDate()).slice(-2)+" "+("0"+i.getUTCHours()).slice(-2)+":"+("0"+i.getUTCMinutes()).slice(-2)+" ("+o+")"}(e.timestamp,x)||"—"),P.appendChild(C),P.appendChild(T),t.appendChild(P))}var l,c,u,h;Object.defineProperty(t,"__esModule",{value:!0}),t.Tooltip=void 0,l=function(){function e(e,t){var i,n;for(i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),i("oWyD"),c=i("Ialn"),u=i("ULlu"),h=function(e){var t,i;if(e&&e.__esModule)return e;if(t={},null!=e)for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(u),t.Tooltip=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.direction,n=void 0===i?"top":i,o=t.clickable,r=void 0!==o&&o,s=t.wide,a=void 0!==s&&s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._direction=n,this._tooltipShown=!1,this._tooltipX=void 0,this._tooltipY=void 0,this._tooltipItems=null,this._width=a?250:200,this._tooltip=document.createElement("div"),this._tooltip.classList.add("tv-chart-events-source__tooltip"),this._tooltip.style.position="absolute",this._tooltip.style.width=this._width+"px",this._tooltipContent=document.createElement("div"),this._tooltipContent.classList.add("tv-chart-events-source__tooltip__content"),this._tooltip.appendChild(this._tooltipContent),r&&this._tooltip.classList.add("tv-chart-events-source__tooltip--clickable")}return l(e,[{key:"show",value:function(){var e,t,i,o,r,s,l,c,u,d,p,_,f,m,y,g,v,S,b,w=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},P=w.items,C=void 0===P?[]:P,T=w.x,x=void 0===T?0:T,I=w.y,L=void 0===I?0:I,M=w.wrapElement,A=void 0===M?null:M,k=w.timeOffset,E=void 0===k?"":k,O=w.leftBorderColor,D=void 0===O?null:O;if(A&&!function(e){var t,i,o,r,s;if(!e||0===e.length)return!0;for(t=0;t<e.length;t++){if(n(e[t])||e[t].id||n(e[t].title))return!1;if(e[t].lines)for(o=(i=e[t].lines).length,r=0;r<o;r++)if(n(s=i[r])||n(s.line))return!1}return!0}(C)){if(e=h.contentWidth(A),t=h.contentHeight(A),i=!1,o=!1,this._tooltipShown||(A.appendChild(this._tooltip),this._tooltipShown=!0,i=!0,o=!0),x===this._tooltipX&&L===this._tooltipY||(i=!0),i&&(r=Math.max(Math.min(x-this._width/2,e-this._width-10),0),this._tooltip.style.left=Math.round(r)+"px",this._tooltip.style.bottom=Math.round(t-L+10)+"px"),this._tooltipItems||(o=!0),!o)for(s=C.length;s--;)if(this._tooltipItems[s]!==C[s]){o=!0;break}if(o){if(l=void 0,C.length<=1)l=C;else{for(c={},u=C.length;u--;)null==(d=C[u].importance)&&(d=-1),c[d]||(c[d]=[]),c[d].push(C[u]);if((p=Object.keys(c).sort(function(e,t){return e-t})).length<=1)l=c[p[0]];else for(l=[],_=p.length;_--;)for(m=(f=c[p[_]]).length;m--;)l.push(f[m])}for(this._tooltipContent.innerHTML="",y=l.length;y--;)v="",
(g=l[y]).hasOwnProperty("importance")?("string"==typeof g.importance&&("earnings"===g.importance?v="--importance-earnings":"splits"===g.importance?v="--importance-splits":"dividends"===g.importance?v="--importance-dividends":"list"===g.importance&&(v="--importance-list")),0===g.importance?v="--importance-normal":g.importance>0&&(v="--importance-high")):D||(v="--importance-none"),S="tv-chart-events-source__tooltip__item",v&&(S+=" "+S+v),b=document.createElement("div"),h.attr(b,"class",S),D&&(b.style.borderLeftColor=D),a(g,b,E),this._tooltipContent.appendChild(b);this._tooltipItems=C}"bottom"===this._direction&&(this._tooltip.style.bottom=Math.round(t-L-h.contentHeight(this._tooltipContent)+10)+"px")}}},{key:"hide",value:function(){this._tooltipShown&&(this._tooltip.parentElement&&this._tooltip.parentElement.removeChild(this._tooltip),this._tooltipShown=!1)}},{key:"isOpened",value:function(){return this._tooltipShown}},{key:"getElem",value:function(){return this._tooltip}}]),e}()},"704P":function(e,t,i){"use strict";(function(e){function n(e,t){this._pane=e,this._timeScale=t}function o(e){this._line=e}function r(e,t){this._adapter=new o(this),this._constructor="LineToolExecution";var n=t||r.createProperties();this.customization={forcePriceAxisLabel:!1,disableSelection:!0,disableErasing:!0},s.call(this,e,n),i.e("lt-pane-views").then(function(e){var t=i("tjxb").ExecutionPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var s=i("Ss5c").LineDataSource,a=i("jkoZ"),l=i("Ocx9").DefaultProperty,c=i("k9/m").PlotRowSearchMode,u=i("s1Gx").sortSourcesPreOrdered,h=u.LineToolExecution;n.prototype._cachedByBarIndexOrderedExecutions={},n.recreateOrderedByBarsSourcesCache=function(e){var t,i,o,r,s;for(n.clearOrderedByBarsSourcesCache(),t=n.prototype,i=e.orderedSources(),o=0;o<i.length;++o)(r=i[o])._adapter&&void 0!==r._adapter._index&&(s=t._cachedByBarIndexOrderedExecutions[r._adapter._index],t._cachedByBarIndexOrderedExecutions[r._adapter._index]=s||[],t._cachedByBarIndexOrderedExecutions[r._adapter._index].push(r))},n.clearOrderedByBarsSourcesCache=function(){n.prototype._cachedByBarIndexOrderedExecutions={}},n.prototype.getXYCoordinate=function(e,t,i){var n,o,s,a,l,u,h,d,p,_,f=0,m=e.getDirection(),y="buy"===m,g=this._pane.model().mainSeries();if(g.bars&&(n=y?10:-10,null!==(o=g.bars().search(i,c.NearestLeft))&&(i=o.index,s=y?o.value[TradingView.LOW_PLOT]:o.value[TradingView.HIGH_PLOT],a=g.priceScale(),l=g.firstValue(),f=a.priceToCoordinate(s,l)+n)),e._index=i,u=t.visibleBarsStrictRange(),!isFinite(i)||null===u||i>u.lastBar()||i<u.firstBar())return{x:-1,y:-1};for(d=(h=this._cachedByBarIndexOrderedExecutions[i]||this._pane.orderedSources()).length-1;d>=0;--d)if((p=h[d])instanceof r&&p._adapter._index===i&&p._adapter.getDirection()===m){if(p===e._line)break;_=p._adapter._height(),f=y?f+_:f-_}return{x:t.indexToCoordinate(i),y:f}},o.prototype._height=function(){var e=this.getArrowHeight(),t=this.getArrowSpacing(),i=0;return this.getText()&&a.fontHeight(this.getFont()),e+t+i+10},
o.prototype.getIndex=function(){var e=this._line._model.timeScale(),t=e.baseIndex(),i=this._line.points()[0].index;return t-i},o.prototype.setIndex=function(e){var t,i=this._line._model.timeScale(),n=i.baseIndex(),o=n-Math.abs(e);return this._line.startMoving({logical:this._line.points()[0]}),(t=TradingView.merge({},this._line.points()[0])).index=o,this._line.move({logical:t}),this._line.endMoving(),this},o.prototype.getTime=function(){return this._unixtime},o.prototype.setTime=function(e){var t=this._line._model.mainSeries();return this._unixtime=ChartApiInstance.alignTimePoint?ChartApiInstance.alignTimePoint(e,t.interval(),t.symbolInfo()):e,this._line.restorePoints([{offset:0,price:this.getPrice(),time_t:this._unixtime}],[]),this._line.createServerPoints(),this},o.prototype.getPrice=function(){return this._line.points().length>0?this._line.points()[0].price:this._line._timePoint.length>0?this._line._timePoint[0].price:void 0},o.prototype.setPrice=function(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},o.prototype.getText=function(){return this._line.properties().text.value()},o.prototype.setText=function(e){return this._line.properties().text.setValue(e||""),this._line.updateAllViewsAndRedraw(),this},o.prototype.getArrowHeight=function(){return this._line.properties().arrowHeight.value()},o.prototype.setArrowHeight=function(e){return this._line.properties().arrowHeight.setValue(e||5),this},o.prototype.getArrowSpacing=function(){return this._line.properties().arrowSpacing.value()},o.prototype.setArrowSpacing=function(e){return this._line.properties().arrowSpacing.setValue(e||1),this},o.prototype.getDirection=function(){return this._line.properties().direction.value()},o.prototype.setDirection=function(e){return this._line.properties().direction.setValue(e||"buy"),this},o.prototype.getArrowColor=function(){var e=this._line.properties();return"buy"===this.getDirection()?e.arrowBuyColor.value():e.arrowSellColor.value()},o.prototype.setArrowColor=function(e){return"buy"===this.getDirection()?this.setArrowBuyColor(e):this.setArrowSellColor(e),this},o.prototype.setArrowBuyColor=function(e){return this._line.properties().arrowBuyColor.setValue(e),this},o.prototype.setArrowSellColor=function(e){return this._line.properties().arrowSellColor.setValue(e),this},o.prototype.getTextColor=function(){return a.getColorFromProperties(this._line.properties().textColor,this._line.properties().textTransparency)},o.prototype.setTextColor=function(e){return a.setColorToProperties(e,this._line.properties().textColor,this._line.properties().textTransparency),this},o.prototype.getFont=function(){return a.getFontFromProperties(this._line.properties().fontFamily,this._line.properties().fontSize,this._line.properties().fontBold,this._line.properties().fontItalic)},o.prototype.setFont=function(e){
return a.setFontToProperties(e,this._line.properties().fontFamily,this._line.properties().fontSize,this._line.properties().fontBold,this._line.properties().fontItalic),this},o.prototype.setTooltip=function(e){return null==e?e="":e+="",this._line.properties().tooltip.setValue(e),this},o.prototype.getTooltip=function(){return this._line.properties().tooltip.value()},o.prototype.remove=function(){this._line._model.removeSource(this._line),delete this._line},o.prototype.getPoints=function(){return this._line.points()},inherit(r,s),r.prototype.zorder=function(){return h},r.POINTS_COUNT=1,r.prototype.pointsCount=function(){return r.POINTS_COUNT},r.prototype.title=function(){return"Execution"},r.prototype.name=function(){return"Execution"},r.prototype.hasContextMenu=function(){return!1},r.prototype.state=function(){return null},r.prototype.updateAllViews=function(){return this._isVisible()?s.prototype.updateAllViews.call(this):null},r.prototype.priceAxisViews=function(e,t){return this._isVisible()?s.prototype.priceAxisViews.call(this,e,t):null},r.prototype._isVisible=function(){return this._model.properties().tradingProperties.showExecutions.value()},r.prototype.paneViews=function(){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showExecutions.value()?s.prototype.paneViews.call(this):null},r.prototype.userEditEnabled=function(){return!1},r.prototype.showInObjectTree=function(){return!1},r.prototype.getInputsPropertyPage=function(){return null},r.prototype.cloneable=function(){return!1},r.prototype.copiable=function(){return!1},r.createProperties=function(e){var t=new l("linetoolexecution",e,!1,!1);return r._configureProperties(t),t},r._configureProperties=function(e){s._configureProperties(e)},t.ExecutionsPositionController=n,t.LineToolExecution=r}).call(this,i("Kxc7"))},"7Fue":function(e,t,i){"use strict";function n(e){return!s.some(function(t){return e[t]().size>0})}function o(e){var t=new Map;return e.forEach(function(e,i){e.forEach(function(e){var n=Object(r.__assign)(Object(r.__assign)({},e),{styleId:i}),o=e.firstBarTime,s=t.get(o);void 0===s&&(s=new Set,t.set(o,s)),s.add(n)})}),t}var r,s;i.d(t,"a",function(){return n}),i.d(t,"b",function(){return o}),r=i("mrSG"),s=["horizlines","vertlines","lines","hlines","textmarks","shapemarks","backgrounds","polygons","trendchannels","hhists","dwglabels","dwglines"]},"7KDR":function(e,t,i){"use strict";var n,o,r,s,a,l,c,u,h;i.r(t),i.d(t,"Action",function(){return c}),i.d(t,"ActionAsync",function(){return u}),i.d(t,"Separator",function(){return h}),n=i("mrSG"),o=i("zRdu"),r=i("aIyQ"),s=i.n(r),a=i("/3z9"),l=i("0waE"),u=function(e){function t(t){var i=e.call(this,{})||this;return i.type=o.a.ActionAsync,i._loader=t,i._loaded=!1,i}return Object(n.__extends)(t,e),t.prototype.loadOptions=function(){var e=this;return this._loadingPromise?this._loadingPromise:(this._loadingPromise=this._loader().then(function(t){e.update(t),e._loaded=!0}),this._loadingPromise)},t.prototype.isLoaded=function(){return this._loaded},t
}(c=function(){function e(e){this.type=o.a.Action,this.id=l.guid(),this._destroyed=!1,this._onUpdate=new s.a,this._options=e,this.update(e)}return e.prototype.execute=function(){this._options.checkable&&this.update({checked:!this._options.checked}),this._options.onExecute&&this._options.onExecute(this)},e.prototype.getLabel=function(){return this._options.label||""},e.prototype.getSubItems=function(){return this._options.subItems||[]},e.prototype.isDisabled=function(){return!0===this._options.disabled},e.prototype.isActive=function(){return!0===this._options.active},e.prototype.isCheckable=function(){return!0===this._options.checkable},e.prototype.isChecked=function(){return!0===this._options.checked},e.prototype.getPayload=function(){return this._options.payload},e.prototype.update=function(e){this._destroyed||(this._unbindShortcut(),e.hotkeyHash&&(this._options.shortcutHint=Object(a.humanReadableHash)(e.hotkeyHash)),this._options=Object.assign(this._options,e),this._bindShortcut(),this._onUpdate.fire(this))},e.prototype.onUpdate=function(){return this._onUpdate},e.prototype.getState=function(){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}},e.prototype.destroy=function(){this._destroyed=!0,this._onUpdate.destroy(),this._unbindShortcut()},e.prototype._bindShortcut=function(){var e,t=this;this._options.hotkeyGroup&&this._options.hotkeyHash&&(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:function(){return t.execute()},isDisabled:function(){return t.isDisabled()}}))},e.prototype._unbindShortcut=function(){this._hotkeyAction&&(this._hotkeyAction.destroy(),delete this._hotkeyAction)},e}()),h=function(){function e(e){this.type=o.a.Separator,this.id=l.guid(),this._hint=e}return e.prototype.getHint=function(){return this._hint},e}()},"7MZv":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showTooManyStudiesNotice=function(e){"number"!=typeof e&&(e=TradingView.STUDY_COUNT_LIMIT),(0,n.showNoticeDialog)({title:window.t("Warning"),content:window.t("Studies limit exceeded: {0} studies per layout.\nPlease, remove some studies.").format(e)})};var n=i("brCa")},"7RN7":function(e,t,i){"use strict";var n,o;i.d(t,"b",function(){return n}),i.d(t,"a",function(){return o}),n=52,o=5},"7dm8":function(e,t,i){"use strict";var n,o,r,s,a,l;i.d(t,"a",function(){return o}),i.d(t,"b",function(){return r}),i.d(t,"c",function(){return s}),i.d(t,"d",function(){return a}),i.d(t,"e",function(){return l}),n=i("ocLq"),o=function(){function e(){}
return e.prototype.init=function(e,t){e.new_sym(t(1),n.Std.period(e),n.Std.period(e)),this._source=t(0),this._scaleFactor1=1,this._scaleFactor2=1},e.prototype.main=function(e,t){var i,o,r,s,a,l=e.symbol.time,c=n.Std[this._source](e);return e.select_sym(1),i=n.Std[this._source](e),o=e.new_unlimited_var(i),r=e.new_unlimited_var(e.symbol.time),e.select_sym(0),isNaN(l)?null:(-1!==(s=r.indexOf(l))&&r.get(s)!==l&&(s=-1),a=s<0?NaN:o.get(s),[this._doCalculation(this._scaleFactor1,c,this._scaleFactor2,a)])},e}(),r={styles:{plot1:{linestyle:0,linewidth:2,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800080"}},precision:2,inputs:{source:"close",symbol2:""}},s=[{defval:"close",id:"source",name:"Source",options:["open","high","low","close","hl2","hlc3","ohlc4"],type:"text"},{id:"symbol2",name:"Symbol",type:"symbol",confirm:!0}],a=[{id:"plot1",type:"line"}],l={plot1:{title:"Plot",histogramBase:0}}},"7ktv":function(e,t,i){"use strict";var n,o,r,s,a;i.r(t),i.d(t,"PriceDataSource",function(){return a}),n=i("mrSG"),o=i("fgLi"),r=i("aIyQ"),s=i.n(r),(a=function(e){function t(t){var i=e.call(this)||this;return i._formatterChanged=new s.a,i._priceStepChanged=new s.a,i._metaInfo=null,i._priceStep=null,i._model=t,i}return Object(n.__extends)(t,e),t.prototype.firstValue=function(){return null},t.prototype.barColorer=function(){return null},t.prototype.base=function(){return 0},t.prototype.model=function(){return this._model},t.prototype.priceRange=function(e,t){return null},t.prototype.isDraggable=function(){return!this._metaInfo||!this._metaInfo.linkedToSeries},t.prototype.priceLineColor=function(e){return e},t.prototype.formatterChanged=function(){return this._formatterChanged},t.prototype.priceStep=function(e){return this._priceStep},t.prototype.priceStepChanged=function(){return this._priceStepChanged},t.prototype.autoScaleInfo=function(e,t){return{range:this.priceRange(e,t)}},t.prototype.hasStateForAlert=function(){return!1},t}(o.DataSource)).prototype.superclass=o.DataSource},"7nsU":function(e,t,i){"use strict";function n(e,t,n,o,r){void 0===r&&(r="default"),Promise.all([i.e("react"),i.e(2),i.e(3),i.e(5),i.e(6),i.e(7),i.e(11),i.e(14),i.e(17),i.e(48),i.e(77),i.e(0),i.e(1),i.e(4),i.e(9),i.e(10),i.e(12),i.e(16),i.e(41),i.e("new-confirm-inputs-dialog")]).then(i.bind(null,"iqv3")).then(function(i){var s=new i.ConfirmInputsDialogRenderer(function(e){if("symbol"===e)return window.t("Add Symbol");return window.t("Confirm Inputs")}(r),e,t,r,n,o);return s.show(),s})}i.r(t),i.d(t,"showConfirmInputsDialog",function(){return n});i("YFKU")},"7qI1":function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolRectangle";var r=t||n.createProperties();o.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("GW0y").RectanglePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=window.t("Rectangle");inherit(n,o),n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return a},
n.prototype.name=function(){return"Rectangle"},n.prototype.setPoint=function(e,t,i){var n,r,s;e<2?o.prototype.setPoint.call(this,e,t,i):(i&&i.shift()&&this._properties.snapTo45Degrees&&(n=this.points()[0],r=this.points()[1],s={price:2===e?n.price:r.price,index:2===e?r.index:n.index},this._snapPoint45Degree(t,s)),3===e?(this._points[0].price=t.price,this._points[1].index=t.index):(this._points[1].price=t.price,this._points[0].index=t.index),this.normalizePoints())},n.prototype.getStylesPropertyPage=function(){return s.LineToolRectangleStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("Zd1D").GeneralFiguresDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new r("linetoolrectangle",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolRectangle=n},"7qT/":function(e,t,i){"use strict";function n(e,t){return 100*(t-e)/Math.abs(e)}i.d(t,"a",function(){return n})},"8C8C":function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"RestoreFactoryDefaultsUndoCommand",function(){return r}),n=i("mrSG"),o=i("RDU5"),r=function(e){function t(t,i,n){void 0===n&&(n="Restore Defaults");var o=e.call(this,n)||this;return o._chartModel=t,o._defaultProperty=i,o._state=i.state(),o}return Object(n.__extends)(t,e),t.prototype.redo=function(){this._chartModel.restoreFactoryDefaults(this._defaultProperty)},t.prototype.undo=function(){this._defaultProperty.mergeAndFire(this._state),this._chartModel.mainSeries().onChartStyleChanged()},t}(o.UndoCommand)},"8OdW":function(e,t,i){"use strict";var n,o,r,s,a,l,c;i.r(t),i.d(t,"MINUTE_SPAN",function(){return n}),i.d(t,"HOUR_SPAN",function(){return o}),i.d(t,"DAY_SPAN",function(){return r}),i.d(t,"WEEK_SPAN",function(){return s}),i.d(t,"MONTH_SPAN",function(){return a}),i.d(t,"YEAR_SPAN",function(){return l}),i.d(t,"DEFAULT_BAR_SPACING",function(){return c}),n=20,o=30,r=40,s=50,a=60,l=70,c=6},"8Uy/":function(e,t,i){"use strict";var n,o,r,s,a;i.r(t),i.d(t,"LINESTYLE_SOLID",function(){return n}),i.d(t,"LINESTYLE_DOTTED",function(){return o}),i.d(t,"LINESTYLE_DASHED",function(){return r}),i.d(t,"LINESTYLE_LARGE_DASHED",function(){return s}),i.d(t,"LINESTYLE_SPARSE_DOTTED",function(){return a}),n=0,o=1,r=2,s=3,a=4},"8aff":function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"CompareStudyPriceAxisView",function(){return s}),n=i("mrSG"),o=i("oXaB"),r=i("KcY8"),s=function(e){function t(t,i){var n=e.call(this)||this;return n._studyCompare=t,n._data=i,n}return Object(n.__extends)(t,e),t.prototype._updateRendererData=function(e,t,i){var n,r;e.visible=!1,t.visible=!1,(n=this._studyCompare.lastValueData(this._data.plotIndex,!1)).noData||(i.background=n.color,i.color=this.generateTextColor(n.color),i.coordinate=n.coordinate,i.floatCoordinate=n.floatCoordinate,(r=this._studyCompare.model().properties().scalesProperties).showSeriesLastValue.value()&&(e.text=this._axisText(n),e.visible=!0),t.text="",
(r.showSymbolLabels.value()||r.seriesLastValueMode.value()===o.PriceAxisLastValueMode.LastPriceAndPercentageValue)&&(t.text=this._paneText(n),t.visible=t.text.length>0))},t.prototype._paneText=function(e){var t,i="",n=this._studyCompare.model().properties().scalesProperties;return n.showSymbolLabels.value()&&(i+=this._studyCompare.symbol()+" "),null!==(t=this._studyCompare.priceScale())&&n.showSeriesLastValue.value()&&n.seriesLastValueMode.value()===o.PriceAxisLastValueMode.LastPriceAndPercentageValue&&(i+=t.isPercentage()?e.formattedPriceAbsolute:e.formattedPricePercentage),i.trim()},t.prototype._axisText=function(e){var t=this._studyCompare.model().properties().scalesProperties,i=this._studyCompare.priceScale();return t.seriesLastValueMode.value()!==o.PriceAxisLastValueMode.LastPriceAndPercentageValue||null===i?e.text:i.isPercentage()?e.formattedPricePercentage:e.formattedPriceAbsolute},t}(r.a)},"8gnj":function(e,t,i){"use strict";(function(t){var n=i("ESp1").HeikenAshi,o=i("LxhU").Interval,r=function(){function e(e){this.host=e,this.cache={}}function r(e){var t=e.indexOf(",");return-1===t?e:e.slice(0,t)}function s(e){return e.has_empty_bars||e.force_session_rebuild}function a(e){return"string"==typeof e&&"="===e[0]}function l(e){if(!a(e))return{symbol:e};var t;try{t=JSON.parse(e.slice(1))}catch(t){return{symbol:e}}return t.type&&(0===t.type.indexOf("BarSetHeikenAshi@tv-basicstudies-")?t.builder=new n:console.error("unknown builder type: "+t.type)),"string"!=typeof t.symbol&&(t.session=t.symbol.session||t.session,t.symbol=t.symbol.symbol),t}var c,u,h,d=i("ocLq"),p=i("IiTo"),_=d.Symbol,f=d.StudyEngine,m=d.BarBuilder,y=d.BarSet;return e.prototype.getCache=function(e){return this.cache[e]},e.prototype.putCache=function(e,t){this.cache[e]=t},e.prototype.subscribe=function(e,t,i,n,o,r,a,l,c,u){var h=function(e,t,i,n,o,r,a){return o+e+t+i+(s(n)?"_":"")+r+"_"+a}(e,t,i,a,l,n,u),d=this.getCache(h);return d||(d=this.createItem(e,t,i,a,c,l,n,u),this.putCache(h,d)),d.listeners.addListener(o,r),{key:h,listener:o}},e.prototype.unsubscribe=function(e){var t=this.getCache(e.key);t&&t.listeners.removeListener(e.listener)},e.prototype.removeUnused=function(){var e,t,i,n,o=[];for(e in this.cache)this.cache[e]&&0===this.cache[e].listeners.listenersCount()&&o.push(e);if(0!==o.length){for(t=0;t<o.length;t++)i=o[t],n=this.cache[i],this.cache[i]=null,n.stop();this.removeUnused()}},e.prototype.rebuildFrom=function(e,t,i){var n,o,r,s,a=_.parsePeriod(e),l=_.parsePeriod(t);if(""!==a.resolution&&!a.isSeconds){if(i.has_weekly_and_monthly)return a.resolution;if(void 0===i.has_daily||i.has_daily)return"D";""!==l.resolution&&(l.resolution="",l.interval=i.intraday_multipliers?i.intraday_multipliers[0]:1)}if(a.isIntraday&&void 0!==i.has_intraday&&!i.has_intraday)return"";if(a.isSeconds&&!i.has_seconds)return"";if(n=""!==a.resolution?l.interval:""===l.resolution?Math.min(a.interval,l.interval):a.interval,(o=a.isIntraday?i.intraday_multipliers:i.seconds_multipliers)&&-1===o.indexOf(n)){
for(r=o.length-1;r>=0;r--)if(n%(s=+o[r])==0)return s+(a.isSeconds?"S":"");return""}return n+(a.isSeconds?"S":"")},e.prototype.createItem=function(e,t,i,n,a,d,p,_){var f,y,g,v,S,b,w=new h,P=l(e);return P.builder?new u(w,P.symbol,t,i,P.builder,n,a,d):(f=r(t),y=this.rebuildFrom(f,r(i),n),g=s(n),!o.isEqual(f,y)||g?(v=n.has_empty_bars,S=Object.assign({},n),g&&(S.has_empty_bars=!1,S.force_session_rebuild=!1),new u(w,P.symbol,t,y,new m(t,v),S,a,d,p,_)):(b=P.session&&"extended"!==P.session,new c(w,P.symbol,t,i,b,this.host,n,a,p,_)))},(c=function(e,t,i,n,o,s,a,l,c,u){this.listeners=e,this.host=s;var h=this;this.host.resolve(t,function(e){o&&e.regular_session&&(e.session=e.regular_session);var s=h.calculateFromTo(e,c||n||i,t,l,u);h.subs=h.host.subscribe(e,r(i),s,function(e){h.listeners.fire(e)},function(e){h.listeners.onError(e)})},function(e){h.listeners.onError(e)})}).prototype._createDWMAligner=function(e,t){var i=new p.SessionInfo(t.timezone,t.session,t.holidays,t.corrections);return _.newBarBuilder(e,i,i)},c.prototype.stop=function(){this.subs&&this.host.unsubscribe(this.subs)},c.prototype.calculateFromTo=function(e,i,n,o,r){var s,a,l,c,u,h,d,f=_.parsePeriod(i),m=(new Date).valueOf(),y=e.expired&&t.cal_to_utc(t.get_timezone(e.timezone),new Date(1e3*e.expiration_date))||m;return""===f.resolution?(a=f.interval,l="D"):"S"===f.resolution?(a=10*f.interval,l=""):(a=12*("D"===f.resolution?1:"W"===f.resolution?5:30)*f.interval,l="M"),f.range?(a=f.range.interval,l=f.range.resolution):this.host.calculateHistoryDepth&&(c=this.host.calculateHistoryDepth(i,l,a))&&(a=c.intervalBack||a,l=void 0===c.resolutionBack?l:c.resolutionBack),u=e.sessionString||e.session,s=p.alignPeriodsBack(u,e.holidays,e.corrections,l,a,1,y),o&&o.getRangeExtensionTime&&(h=o.getRangeExtensionTime())&&(s=Math.min(1e3*h,s)),d=Math.ceil(1.5*r),o&&o.getRangeExtensionCount&&(d+=o.getRangeExtensionCount()),d>0&&(s=p.alignPeriodsBack(u,e.holidays,e.corrections,f.resolution,f.interval,d,s)),{from:s,to:y+6e4}},(u=function(e,t,i,n,o,r,s,a,l,c){if(this.listeners=e,this.isRecalculated=!1,""===n)return console.error("unsupported resolution for rebuild: "+i),void this.listeners.onError("unsupported resolution for rebuild: "+i);this.symbolInfo=r;var u=this;this.engine=new f({tickerid:t,period:n,periodBase:i,body:o,sessionId:a,symbolInfo:r,rangeExtension:s,periodForInitialRange:l,additionalBarsCount:c,recalc:function(e,t){u._recalc(t)},out:function(e,t){u._out(e,t)},nonseriesOut:function(e,t){u._nonseriesOut(e,t)},setNoMoreData:function(){u.barset&&(u.barset.endOfData=!0)},onErrorCallback:function(e){u.listeners.onError(e)}})}).prototype.stop=function(){this.engine?this.engine.stop():console.error("Internal library error 0x1")},u.prototype._recalc=function(e){this.isRecalculated&&console.error("recalc called twice!"),this.barset||(this.barset=new y(this.symbolInfo)),e&&(this.barset.nextTime=e.nextTime,this.barset.endOfData=e.endOfData),this.listeners.fire(this.barset),this.isRecalculated=!0},u.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)},u.prototype._out=function(e,t){var i,n,o,r,s,a,l,c=t[0];if(!isNaN(c)){if(i={time:c,open:t[1],high:t[2],low:t[3],close:t[4],volume:t[5],updatetime:t[6]},n=t[7],this.barset||(this.barset=new y(e.info)),(o=t[8])instanceof Array)for(r=0;r<o.length;r++)s=t[9],l={time:a=o[r],open:s,high:s,low:s,close:s,volume:0,updatetime:a},this.barset.add(l,!0),this.isRecalculated&&this.listeners.fire(this.barset);this.barset.add(i,n),this.barset.isBarClosed=n,this.isRecalculated&&this.listeners.fire(this.barset)}},(h=function(){this.listeners=[]}).prototype.listenersCount=function(){return this.listeners.reduce(function(e,t){return e+(t?1:0)},0)},h.prototype.addListener=function(e,t){this.listeners.push({dataListener:e,onErrorCallback:t}),this.barset&&e(this.barset),this.errorMsg&&t(this.errorMsg)},h.prototype.removeListener=function(e){var t,i=this.listeners.filter(function(t){return t.dataListener===e});0!==i.length&&(t=this.listeners.indexOf(i[0]),delete this.listeners[t])},h.prototype.onError=function(e){var t,i,n,o;for(this.errorMsg=e||"unspecified error",i=(t=this.listeners).length,n=0;n<i;n++)(o=t[n])&&o.onErrorCallback&&o.onErrorCallback(e)},h.prototype.fire=function(e,t){var i,n,o,r;for(t||(this.barset=e),n=(i=this.listeners).length,o=0;o<n;o++)(r=i[o])&&r.dataListener(e)},{isSymbolEncoded:a,setupFeed:function(t){e.instance=new e(t),d.setupFeed(e.instance)},parseSymbol:l,unsubscribeUnused:function(){e.instance.removeUnused()}}}();e.exports=r}).call(this,i("jCNj"))},"8pII":function(e){e.exports={content:{chartProperties:{scalesProperties:{textColor:"#D9D9D9",lineColor:"#787878",backgroundColor:"#ffffff"},paneProperties:{vertGridProperties:{color:"#363c4e"},horzGridProperties:{color:"#363c4e"},background:"#131722"}},sessions:{graphics:{backgrounds:{outOfSession:{color:"#1E88E5",transparency:80}},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.05)",topFillColor2:"rgba( 38, 166, 154, 0.05)",bottomFillColor1:"rgba( 239, 83, 80, 0.05)",bottomFillColor2:"rgba( 239, 83, 80, 0.05)",topLineColor:"rgba( 38, 166, 154, 1)",bottomLineColor:"rgba( 239, 83, 80, 1)"},areaStyle:{transparency:95,color1:"#2196f3",color2:"#2196f3",linecolor:"#2196f3",linewidth:3,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:3,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";var n,o,r;i.r(t),i.d(t,"StudyLegendView",function(){return r}),n=i("mrSG"),o=i("it7y"),r=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._showStudyValues=i.properties().paneProperties.legendProperties.showStudyValues,n._showStudyValues.subscribe(n,n.update),n}return Object(n.__extends)(t,e),t.prototype.isValuesVisible=function(){return this._showStudyValues.value()},t.prototype.additional=function(){return null},t.prototype.destroy=function(){this._showStudyValues.unsubscribeAll(this)},t.prototype._updateImpl=function(){var t,i,n;for(e.prototype._updateImpl.call(this),t=this._showStudyValues.value(),i=0,n=this._items;i<n.length;i++)n[i].setVisible(t)},t}(o.StudyDataWindowView)},"8sOK":function(e,t,i){"use strict";var n,o,r,s,a,l,c,u;i.r(t),i.d(t,"StudyStub",function(){return u}),n=i("mrSG"),o=i("2kV1"),r=i("7ktv"),s=i("kcTO"),a=i("tc+8"),l=i.n(a),c=100,(u=function(e){function t(t,i,n){var r,a=e.call(this,t)||this;return a._priceStep=1/c,a._status=window.t("compiling..."),a._formatter=new s.PriceFormatter(c),a._failed=!1,a._loading=!0,a._origState=i,a._title=n,r={visible:!0},a._properties=new l.a(r),a._statusView=new o.StudyStatusView(a,a._model.properties().scalesProperties.textColor),a._statusView.setText(a._title+" "+a._status),a}return Object(n.__extends)(t,e),t.prototype.properties=function(){return this._properties},t.prototype.statusView=function(){return this._statusView},t.prototype.legendView=function(){return null},t.prototype.state=function(e){return this._origState},t.prototype.setStatus=function(e){this._status=e,this._statusView.setText(this._title+" "+this._status)},t.prototype.formatter=function(){return this._formatter},t.prototype.title=function(){return this._title},t.prototype.titleInParts=function(){return[this._title,void 0]},t.prototype.isFailed=function(){return this._failed},t.prototype.isLoading=function(){return this._loading},t.prototype.setFailed=function(e){this._failed=e,this._failed&&(this._loading=!1)},t.prototype.start=function(){},t.prototype.status=function(){return this._status},t.prototype.firstValue=function(){return null},t.prototype.currency=function(){return null},t}(r.PriceDataSource)).prototype.superclass=r.PriceDataSource},"8woN":function(e,t,i){"use strict";(function(t){var i=[{
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(){function e(e,t){var i=function(){};return i.prototype=t.prototype,e.prototype=new i,e}function n(){}function o(e){this.value=e}function r(){}function s(){}function a(){}function l(){}function c(){}function u(){}function h(){}function d(){}function p(e){this.value=e}function _(e){this.value=e}function f(e){this.value=e}function m(){p.apply(this,arguments)}function y(){_.apply(this,arguments)}function g(e,t){var i,n,r,s,a,l,c,u,h=[];e:for(;i=I.exec(e);){for(n=L.length;n--;)if(i[n+1]){L[n].ctor&&((r=new L[n].ctor(i[n+1]))._offset=i.index,h.push(r));continue e}(s=new f(i[0]))._offset=i.index,h.push(s)}if(t&&t.recover)for(n=h.length;n--;)(l=h[n])instanceof _||l instanceof p?(void 0!==a&&(c=new p(""),u=h.splice(n,a-n+1,c),c.value=u.map(function(e){return e.value}).join("")),a=n):l instanceof o||(a=void 0);return h}function v(e){var t,i=[];for(t=0;t<e.length;t++)e[t]instanceof o||i.push(e[t]);return i}function S(e){var t,i,n,o,l,c,u;for(e=v(e),t=[],i=[],o=0;o<e.length;o++)(l=e[o])instanceof a?i.length&&i[i.length-1].minPrecedence>l.precedence&&(i[i.length-1].minPrecedence=l.precedence):l instanceof r?i.push(n={minPrecedence:1/0,openBraceIndex:o}):l instanceof s&&(c=e[(n=i.pop()).openBraceIndex-1],(u=e[o+1])instanceof a&&!(u.precedence<=n.minPrecedence)||!(!(c instanceof a)||c.precedence<n.minPrecedence||c.precedence===n.minPrecedence&&c.commutative)||(t.unshift(n.openBraceIndex),t.push(o),i.length&&i[i.length-1].minPrecedence>n.minPrecedence&&(i[i.length-1].minPrecedence=n.minPrecedence)));for(o=t.length;o--;)e.splice(t[o],1);return e}function b(e){if("string"!=typeof e)throw new TypeError("expression must be a string");return(e=g(e)).filter(function(e){return e instanceof p}).map(function(e){return e.exchange()}).filter(function(e){return e})}function w(e){return 1!==(e=b(e)).length?null:e[0]}function P(e,t){return(e=b(e)).some(function(e){return t.includes((e||"").toUpperCase())})}function C(e){return e.join("")}var T,x,I,L=[{pattern:"(",ctor:r},{pattern:")",ctor:s},{pattern:"+",ctor:l},{pattern:"-",ctor:c},{pattern:"*",ctor:u},{pattern:"/",ctor:h},{pattern:"^",ctor:d},{pattern:/\d+(?:\.\d*|(?![a-zA-Z0-9_!:\.&]))|\.\d+/,ctor:_},{pattern:/\./,ctor:y},{pattern:t.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:p},{pattern:/'[^']*/,ctor:m},{pattern:/[\0-\x20\s]+/,ctor:o}];return n.prototype.toString=function(){return this.value},e(o,n),e(r,n),r.prototype.value="(",e(s,n),s.prototype.value=")",e(a,n),e(l,a),l.prototype.value="+",l.prototype.precedence=0,
l.prototype.commutative=!0,e(c,a),c.prototype.value="-",c.prototype.precedence=0,c.prototype.commutative=!1,e(u,a),u.prototype.value="*",u.prototype.precedence=1,u.prototype.commutative=!0,e(h,a),h.prototype.value="/",h.prototype.precedence=1,h.prototype.commutative=!1,e(d,a),d.prototype.value="^",d.prototype.precedence=2,d.prototype.commutative=!1,T=/^'?(?:([A-Z0-9_]+):)?(.*?)'?$/i,x=/[\+\-\/\*]/,e(p,n),p.prototype.toString=function(){if(this.hasOwnProperty("_ticker")){var e=x.test(this._ticker)?"'":"";return e+(this._exchange?this._exchange+":":"")+this._ticker+e}return this.value},p.prototype.parse=function(){var e=T.exec(this.value);e[1]&&(this._exchange=e[1]),this._ticker=e[2]},p.prototype.parseAsFutures=function(){var e,t,n;for(this.hasOwnProperty("_ticker")||this.parse(),e=function(e){return i.some(function(t){return t.t===e})},t=2;t>=1;--t)if(e(n=this._ticker.slice(0,t))){this._root=n,this._contract=this._ticker.slice(t);break}},p.prototype.exchange=function(e){if(this.hasOwnProperty("_ticker")||this.parse(),!(arguments.length>0))return this._exchange;null===e||void 0===e?delete this._exchange:this._exchange=e+""},p.prototype.ticker=function(e){if(this.hasOwnProperty("_ticker")||this.parse(),!(arguments.length>0))return this._ticker;null===e||void 0===e?delete this._ticker:this._ticker=e+"",delete this._root,delete this._contract},p.prototype.root=function(e){if(this.hasOwnProperty("_root")||this.parseAsFutures(),!(arguments.length>0))return this._root;null===e||void 0===e?delete this._root:(this._root=e+"",this._root&&(this._ticker=this._root+(this._contract||"")))},p.prototype.contract=function(e){if(this.hasOwnProperty("_contract")||this.parseAsFutures(),!(arguments.length>0))return this._root;null===e||void 0===e?delete this._contract:(this._contract=e+"",this._root&&(this._ticker=this._root+this._contract))},e(_,n),_.prototype.toString=function(){return this.hasOwnProperty("_normalizedValue")?this._normalizedValue:this.value},_.prototype.parse=function(){this._normalizedValue=this.value.replace(/^0+|\.0*$/g,"").replace(/(\.\d*?)0+$/,"$1").replace(/^(\.|$)/,"0$1")},f.prototype.toString=function(){return this.value},e(m,p),m.prototype.isIncomplete=!0,m.prototype.incompleteSuggest=function(){if("'"!==this.value)return String("'")},e(y,_),y.prototype.isIncomplete=!0,I=new RegExp(L.map(function(e){return"("+("string"==typeof e.pattern?e.pattern.replace(/[\^\$\(\)\[\]\{\}\*\+\?\|\\]/g,"\\$&"):e.pattern.source)+")"}).concat(".").join("|"),"g"),{tokenize:g,validate:function(e){var i,n,l,c,u,h,d,m,y;if(t.enabled("charting_library_base"))return{currentState:"var"};for(n="var",l="operator",c=i="init",u={warnings:[],errors:[],isEmpty:!0},h=[],d=0;d<e.length;d++)if(!((m=e[d])instanceof o))if(delete u.isEmpty,m.isIncomplete&&(y={status:"incomplete",reason:"incomplete_token",offset:m._offset,token:m},m.incompleteSuggest&&(y.recover={append:m.incompleteSuggest()}),u.warnings.push(y),d!==e.length-1))y.status="error";else if(m instanceof p||m instanceof _){if(c===n){u.errors.push({status:"error",reason:"unexpected_token",
offset:m._offset,token:m});continue}c=n}else if(m instanceof a){if(c!==n){u.errors.push({status:"error",reason:"unexpected_token",offset:m._offset,token:m});continue}c=l}else if(m instanceof r){if(c===n){u.errors.push({status:"error",reason:"unexpected_token",offset:m._offset,token:m});continue}h.push(m),c=i}else if(m instanceof s){if(c!==n){u.errors.push({status:"error",reason:"unexpected_token",offset:m._offset,token:m});continue}h.pop()||u.errors.push({status:"error",reason:"unbalanced_brace",offset:m._offset,token:m,recover:{prepend:new r}}),c=n}else m instanceof f&&u.errors.push({status:"error",reason:"unparsed_entity",offset:m._offset,token:m});for(u.braceBalance=h.length,c!==n&&u.warnings.push({status:"incomplete"});h.length;)y={status:"incomplete",reason:"unbalanced_brace",offset:(m=h.pop())._offset,token:m},c===n&&(y.recover={append:new s}),u.warnings.push(y);return u.currentState=c,0===u.warnings.length&&delete u.warnings,0===u.errors.length&&delete u.errors,u},factorOutBraces:S,normalizeTokens:function(e){for(var t=0;t<e.length;t++)e[t].parse&&e[t].parse();return e},flip:function(e){var t=function(e){var t,i,n,l,c,u,d,p,f;for(i=1,n=2,l=3,c=t=0,u=0,p=0;p<e.length;p++)if(!((f=e[p])instanceof o))switch(c){case t:if(!(f instanceof _&&1==+f.value))return!1;c=i;break;case i:if(!(c===i&&f instanceof h))return!1;c=n,d=p+1;break;case n:if(f instanceof r)c=l,u=1;else if(f instanceof a)return!1;break;case l:f instanceof r?u++:f instanceof s&&--u<=0&&(c=n)}return e.slice(d)}(e);return S(t||[new _("1"),new h,new r].concat(e).concat(new s))},hasBatsSymbols:function(e){return P(e,["BATS"])},hasEodSymbols:function(e){return(e=w(e))&&-1!==e.toUpperCase().indexOf("_EOD")},hasChxjpySymbols:function(e){return P(e,["CHXJPY"])},hasFreeDelaySymbols:function(e){return P(e,pro.getProductsByType(pro.PRODUCT_TYPES.exchange).map(function(e){return e.exchange.toUpperCase()+"_DLY"}))},getExchange:w,isExchange:function(e,t){return!!(e=w(e))&&e.substr(0,t.length)===t},SymbolToken:p,IncompleteSymbolToken:m,NumberToken:_,BinaryOperatorToken:a,OpenBraceToken:r,CloseBraceToken:s,ticker:function(e){return new p(e).ticker()},shortName:function(e){if("string"!=typeof e)throw new TypeError("expression must be a string");var t=S(v(g(e)));return t.forEach(function(e){e instanceof p&&e.exchange(null)}),C(t)},normalize:function(e){if("string"!=typeof e)throw new TypeError("expression must be a string");return C(S(v(g(e))))}}}();e.exports=n}).call(this,i("Kxc7"))},"8xAY":function(e,t,i){"use strict";var n;i.r(t),i.d(t,"LabelSettings",function(){return n}),function(e){e.offset=8,e.fontSize=12,e.lineSpacing=16,e.rectRadius=4,e.bgColorLight="rgba(227,242,253,0.9)",e.bgColorDark="rgba(67,70,81,0.9)",e.textColorLight="#2A2E39",e.textColorDark="#F8F9FD",e.textPadding=10,e.paddingTopBottom=13,e.paddingLeftRight=10}(n||(n={}))},"8xSi":function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"CompareStatusView",function(){return r}),n=i("mrSG"),o=i("2kV1"),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),
t.prototype.getSplitTitle=function(){return this._source.isFailed()?[this._source.title(!0,void 0,!1,!1)+": "+this._source.status(),void 0]:this._source.titleInParts(!0,void 0,!1,!1)},t.prototype.update=function(){this._source.isFailed()?this._text=this._source.title(!0,void 0,!1,!1)+": "+this._source.status():this._text=this._source.title(!0,void 0,!1,!1)+" "+this._source.status()},t}(o.StudyStatusView)},"96Yh":function(e,t,i){"use strict";function n(e){return{id:e.id(),name:(t=e.getConstructor(),Object.keys(l.supportedLineTools).find(function(e){return l.supportedLineTools[e].name===t})||null)};var t}function o(e){return{id:e.id(),name:e.metaInfo().description}}function r(e){return{id:e.id(),name:"Main Series"}}function s(e,t){return t===e.mainSeries()?r(e.mainSeries()):Object(a.isStudy)(t)?o(t):Object(c.isLineTool)(t)?n(t):null}var a,l,c;i.r(t),i.d(t,"lineToolEntityInfo",function(){return n}),i.d(t,"studyEntityInfo",function(){return o}),i.d(t,"seriesEntityInfo",function(){return r}),i.d(t,"entityForDataSource",function(){return s}),a=i("3ClC"),l=i("2jXJ"),c=i("CW80")},"972a":function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"MarkLocation",function(){return n}),i.d(t,"HAlign",function(){return o}),i.d(t,"VAlign",function(){return r}),i.d(t,"LineStyle",function(){return s}),function(e){e.AboveBar="AboveBar",e.BelowBar="BelowBar",e.Top="Top",e.Bottom="Bottom",e.Right="Right",e.Left="Left",e.Absolute="Absolute",e.AbsoluteUp="AbsoluteUp",e.AbsoluteDown="AbsoluteDown"}(n||(n={})),function(e){e.Left="left",e.Center="center",e.Right="right"}(o||(o={})),function(e){e.Top="top",e.Middle="middle",e.Bottom="bottom"}(r||(r={})),function(e){e[e.Solid=0]="Solid",e[e.Dotted=1]="Dotted",e[e.Dashed=2]="Dashed"}(s||(s={}))},"9Jkk":function(e,t,i){"use strict";function n(e){return null!==e&&void 0!==e}var o,r,s,a,l,c,u,h,d,p,_,f,m,y;i.r(t),o=i("mrSG"),r=i("Eyy1"),s=i("XlJ7"),a=i("x0JF"),l=i("Y7w9"),c=i("Zp/P"),u=i("VdBB"),h=function(){function e(){this._data=null,this._barWidth=null}return e.prototype.setData=function(e){this._data=e,this._barWidth=Math.max(1,Math.round(Object(c.optimalHiLoWidth)(e.barSpacing)))},e.prototype.draw=function(e){var t,i,n,o,r,a;if(null!==this._data&&null!==this._barWidth){for(e.save(),e.translate(.5,.5),e.textAlign="center",e.fillStyle=this._data.labelColor,e.font=Object(s.makeFont)(this._data.fontSize,this._data.font),t=this._data.bars,i=this._data.inverted,n=0;n<t.length;++n)o=t[n],r=Math.min(o.high,o.low),a=Math.max(o.high,o.low),e.fillText(i?o.lowLabel:o.highLabel,o.time,r-this._data.labelsPadding),e.fillText(i?o.highLabel:o.lowLabel,o.time,a+this._data.labelsPadding+this._data.fontSize);e.restore()}},e.prototype.hitTest=function(e){var t,i,n,o,r,s,a;return null===this._data||null===this._barWidth?null:(t=this._data.bars,i=.5*this._data.barSpacing,0===t.length?null:e.x<t[0].time-i?null:e.x>t[t.length-1].time+i?null:(n=t[Object(l.lowerbound)(t,e.x-i,function(e,t){return e.time<t})],e.x<n.time-i||e.x>n.time+i?null:(o=Object(c.selectionTolerance)(this._barWidth),r=Math.min(n.high,n.low),
s=Math.max(n.high,n.low),r-o-(a=this._data.fontSize)<=e.y&&e.y<=r+o?new u.HitTestResult(u.HitTestResult.REGULAR):s-o<=e.y&&e.y<=s+o+a?new u.HitTestResult(u.HitTestResult.REGULAR):null)))},e}(),d=i("/hKg"),p=i("Zy3/"),_=i("1mZ4"),f=i("u+0B"),m=i("zDbI"),i.d(t,"SeriesHiLoPaneView",function(){return y}),y=function(e){function t(t,i){var n,o=e.call(this,t,i)||this;return o._widthsCache=new f.TextWidthCache,o._labelsRenderer=new h,o._candlesRenderer=new d.PaneRendererCandles,o._canvas=document.createElement("canvas"),o._context=Object(r.ensureNotNull)(o._canvas.getContext("2d")),n=t.properties(),o._context.font=Object(s.makeFont)(n.hiloStyle.fontSize.value(),m.CHART_FONT_FAMILY),o}return Object(o.__extends)(t,e),t.prototype.renderer=function(e,t,i){var n,o,r,s,a,l,u;return this._invalidated&&(n=this._series().formatter(),o=this._needLabels(),this._updateImpl(this._barUpdater.bind(this,n,o)),this._invalidated=!1),r=this._series().properties().hiloStyle,s=this._model().timeScale().barSpacing(),a=this._needLabels()&&this._bars().every(function(e){return e.highLabelWidth<=s&&e.lowLabelWidth<=s}),l={bars:this._bars(),wickVisible:!1,barSpacing:s,borderVisible:r.showBorders.value(),barWidth:Object(c.optimalHiLoWidth)(s),font:m.CHART_FONT_FAMILY,fontSize:r.fontSize.value(),labelColor:r.labelColor.value(),inverted:this._series().priceScale().isInverted(),labelsPadding:3},u=new p.CompositeRenderer,this._candlesRenderer.setData(l),u.append(this._candlesRenderer),a&&(this._labelsRenderer.setData(l),u.append(this._labelsRenderer)),this._model().selection().isSelected(this._series())&&this._isMarkersEnabled&&u.append(new _.SelectionRenderer(this._selectionData)),u},t.prototype.topPixelMargin=function(){return this._margin()},t.prototype.bottomPixelMargin=function(){return this._margin()},t.prototype._margin=function(){var e=this._series().properties().hiloStyle;return e.showLabels.value()?e.fontSize.value()+6:0},t.prototype._barUpdater=function(e,t,i,o){var r=i[2],s=i[3];return!(!n(r)||!n(s))&&(o.high=o.open=r,o.low=o.close=s,t&&(o.highLabel=e.format(r),o.highLabelWidth=this._getLabelWidth(o.highLabel),o.lowLabel=e.format(s),o.lowLabelWidth=this._getLabelWidth(o.lowLabel)),!0)},t.prototype._needLabels=function(){var e=this._model().timeScale().barSpacing(),t=this._series().properties().hiloStyle.showLabels.value();return t&&e>5},t.prototype._getLabelWidth=function(e){return this._widthsCache.measureText(this._context,e)},t}(a.SeriesBarCandlesPaneView)},"9QkW":function(e,t,i){"use strict";function n(){a.call(this)}function o(e,t){this._constructor="LineToolFibSpeedResistanceArcs";var s=t||o.createProperties();r.call(this,e,s),e._fibWedgeLabelsCache||(e._fibWedgeLabelsCache=new n),i.e("lt-pane-views").then(function(e){var t=i("1SUO").FibWedgePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var r=i("Ss5c").LineDataSource,s=i("5rJj"),a=i("xUGI"),l=i("hayr").propertyPages,c=window.t("Fib Wedge");inherit(n,a),n.prototype.levelsCount=function(){return o.LevelsCount},inherit(o,r),o.LevelsCount=11,
o.prototype.levelsCount=function(){return o.LevelsCount},o.prototype.getCache=function(){return this._model._fibWedgeLabelsCache||(this._model._fibWedgeLabelsCache=new n),this._model._fibWedgeLabelsCache},o.prototype.pointsCount=function(){return 3},o.prototype.title=function(){return c},o.prototype.name=function(){return"Fib Wedge"},o.prototype.hasEditableCoordinates=function(){return!1},o.prototype.setPoint=function(e,t){var i,n,o,s,a,l,c;r.prototype.setPoint.call(this,e,t),this._recursiveGuard||(this._recursiveGuard=!0,2===e?(i=this.pointToScreenPoint(this._points[0])[0],n=this.pointToScreenPoint(this._points[1])[0],s=(o=this.pointToScreenPoint(this._points[2])[0]).subtract(i).length(),a=n.subtract(i).normalized(),n=i.add(a.scaled(s)),l=this.screenPointToPoint(n),this._properties.points[1].price.setValue(l.price),this._properties.points[1].bar.setValue(l.index)):(i=this.pointToScreenPoint(this._points[0])[0],n=this.pointToScreenPoint(this._points[1])[0],o=this.pointToScreenPoint(this._points[2])[0],c=n.subtract(i).length(),a=o.subtract(i).normalized(),o=i.add(a.scaled(c)),l=this.screenPointToPoint(o),this._properties.points[2].price.setValue(l.price),this._properties.points[2].bar.setValue(l.index)),this._recursiveGuard=!1)},o.prototype.addPoint=function(e){var t,i,n,o,s,a,l;return 2===this._points.length&&(t=this.pointToScreenPoint(this._points[0])[0],i=this.pointToScreenPoint(this._points[1])[0],n=this.pointToScreenPoint(e)[0],o=i.subtract(t).length(),s=n.subtract(t).normalized(),n=t.add(s.scaled(o)),a=this.ownerSource().firstValue(),l=this.priceScale().coordinateToPrice(n.y,a),e={index:Math.round(this._model.timeScale().coordinateToIndex(n.x)),price:l}),r.prototype.addPoint.call(this,e)},o.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},o.prototype.getInputsPropertyPage=function(){return null},o.prototype.getStylesPropertyPage=function(){return l.LineToolFibWedgeStylesPropertyPage},o.createProperties=function(e){var t=new s("linetoolfibwedge",e,!1,{range:[1,11]});return o._configureProperties(t),t},o.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("6mGk").FibWedgeDefinitionsViewModel}.bind(null,i)).catch(i.oe)},o._configureProperties=function(e){r._configureProperties(e)},t.LineToolFibWedge=o},"9dnG":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"><path d="M5 11l9-7 9 7-9 7z"/><path d="M23 14l-9 7-9-7"/><path d="M23 17l-9 7-9-7"/></g></svg>'},"9iCb":function(e,t,i){"use strict";function n(e,t,i,n){var o,r,s,a,l,d,p,_,f,m,y,g,v,S,b,w,P=i.split(".");if(0!==P.length&&0!==P[0].length)if(b=P[0],r=(o={name:(w=b.split(":"))[0],type:2===w.length?w[1]:null}).name,l=!(a=null!==(s=o.type))||"band"===s,d=!a||"area"===s,p=!a||"input"===s,_=!a||"plot"===s?h.getPlotIdByTitle(e,r):null,f=l?h.getBandIndexByName(e,r):null,
m=d?h.getFilledAreaIdByTitle(e,r):null,y=p?h.getInputByName(e,r):null,g=t.hasOwnProperty(r),(null!==_?1:0)+(null!==f?1:0)+(null!==m?1:0)+(null!==y?1:0)+(g?1:0)>1)c.logWarn("Study '"+e.description+"' has ambiguous identifier '"+r+"'");else if(v=P[1],null!==_){if(1===P.length)return void c.logWarn("Path of sub-property of '"+r+"' plot for study '"+e.description+"' must be not empty");S=P.slice(1),u.applyPlotProperty(e,t,_,S,n)}else if(null!==y)u.applyInputValue(t,y,n);else if(null!==f){if(void 0===v)return void c.logWarn("Property name of '"+r+"' band for study '"+e.description+"' must be set");u.applyBandProperty(t,f,v,n)}else if(null!==m){if(void 0===v)return void c.logWarn("Property name of '"+r+"' area for study '"+e.description+"' must be set");u.applyFilledAreaProperty(t,m,v,n)}else g?u.setRootProperty(t,P,n):c.logWarn("Study '"+e.description+"' has no plot or input '"+r+"'")}function o(e,t){var i,o=e.properties(),r=o.state();for(i in t)t.hasOwnProperty(i)&&n(e.metaInfo(),r,i,t[i]);o.mergeAndFire(r)}function r(e,t,i){var o,r,s,a,l;for(o in e)e.hasOwnProperty(o)&&-1!==(r=o.indexOf("."))&&(s=o.substr(0,r),null!==(a=h.getMetaInfoByDescription(t,s))?null!==(l=i(a))?n(a,l,o.substr(r+1),e[o]):c.logWarn("Cannot apply overrides for study "+s):c.logWarn("There is no such study "+s))}var s,a,l,c,u,h;i.r(t),i.d(t,"applyOverridesToStudy",function(){return o}),i.d(t,"applyOverridesToStudyDefaults",function(){return r}),s=i("Eyy1"),a=i("23IT"),l=i("uOxu"),c=Object(l.getLogger)("Chart.Model.StudyPropertiesOverrider"),function(e){var t={line:a.LineStudyPlotStyle.Line,histogram:a.LineStudyPlotStyle.Histogram,cross:a.LineStudyPlotStyle.Cross,area:a.LineStudyPlotStyle.Area,columns:a.LineStudyPlotStyle.Columns,circles:a.LineStudyPlotStyle.Circles,line_with_breaks:a.LineStudyPlotStyle.LineWithBreaks,area_with_breaks:a.LineStudyPlotStyle.AreaWithBreaks};e.applyPlotProperty=function(e,i,n,o,r){var l,u,h;if(void 0!==i.styles)if("color"!==(l=o[0]))if(void 0!==(u=i.styles[n])&&u.hasOwnProperty(l)){if("plottype"===l){if(void 0===(h=t[String(r)]))return void c.logWarn("Unsupported plot type for plot: "+r);r=h}u[l]=r}else c.logWarn("Study plot does not have property '"+l+"'");else!function(e,t,i,n,o){void 0!==e.styles?null===t&&!isNaN(n)&&n>0?c.logWarn("Study plot does not have color #"+n):((0===n||isNaN(n))&&(Object(s.ensureDefined)(e.styles[i]).color=String(o),n=0),null!==t&&(Object(s.ensureDefined)(t.colors[n]).color=String(o))):c.logWarn("Study does not have styles")}(i,function(e,t,i){var n,o,r,s;if(void 0===e.plots)return null;for(n=0,o=e.plots;n<o.length;n++)if(r=o[n],Object(a.isColorerPlot)(r)&&void 0!==t.palettes&&(s=t.palettes[r.palette],r.target===i&&void 0!==s))return s;return null}(e,i,n),n,o.length>1?parseInt(o[1]):NaN,r);else c.logWarn("Study does not have styles")},e.applyBandProperty=function(e,i,n,o){var r,s;if(void 0!==e.bands)if(void 0!==(r=e.bands[i])&&r.hasOwnProperty(n)){if("plottype"===n){if(void 0===(s=t[String(o)]))return void c.logWarn("Unsupported plot type for band: "+o);o=s}r[n]=o
}else c.logWarn("Study band does not have property '"+n+"'");else c.logWarn("Study does not have bands")},e.applyFilledAreaProperty=function(e,t,i,n){if(void 0!==e.filledAreasStyle){var o=e.filledAreasStyle[t];void 0!==o&&o.hasOwnProperty(i)?o[i]=n:c.logWarn("Study area does not have property '"+i+"'")}else c.logWarn("Study does not have areas")},e.applyInputValue=function(e,t,i){void 0!==e.inputs&&e.inputs.hasOwnProperty(t)?e.inputs[t]=i:c.logWarn("Study does not have input '"+t+"'")},e.setRootProperty=function(e,t,i){var n,o,r,s,a;if(0!==t.length){for(n=e,o=0,r=t.slice(0,-1);o<r.length&&(s=r[o],null!=n&&n.hasOwnProperty(s));o++)n=n[s];a=t[t.length-1],null!=n&&n.hasOwnProperty(a)?n[a]=i:c.logWarn("Study does not have property "+t.join("."))}}}(u||(u={})),function(e){e.getInputByName=function(e,t){var i,n,o;if(void 0===e.inputs)return null;for(t=t.toLowerCase(),i=0,n=e.inputs;i<n.length;i++)if((o=n[i]).name.toLowerCase()===t)return o.id;return null},e.getPlotIdByTitle=function(e,t){var i,n;if(void 0===e.styles)return null;for(i in t=t.toLowerCase(),e.styles)if((void 0!==(n=e.styles[i])&&void 0!==n.title?n.title:i).toLowerCase()===t)return i;return null},e.getFilledAreaIdByTitle=function(e,t){var i,n,o;if(void 0===e.filledAreas)return null;for(t=t.toLowerCase(),i=0,n=e.filledAreas;i<n.length;i++)if((o=n[i]).title.toLowerCase()===t)return o.id;return null},e.getBandIndexByName=function(e,t){if(void 0===e.bands)return null;t=t.toLowerCase();for(var i=0;i<e.bands.length;++i)if(e.bands[i].name.toLowerCase()===t)return i;return null},e.getMetaInfoByDescription=function(e,t){var i,n,o;for(t=t.toLowerCase(),i=0,n=e;i<n.length;i++)if((o=n[i]).description.toLowerCase()===t||o.shortDescription.toLowerCase()===t)return o;return null}}(h||(h={}))},"9nLJ":function(e,t,i){"use strict";(function(t,n){function o(e,i,n,o,r){this._chartWidgetCollection=e,this._chartApiInstance=i,this._saveChartService=n,this._loadChartService=o,this._alertsDispatcher=r,this._proxyWatchListChangedDelegate=null,this._lockDrawingsWatchedValue=null,this._hideDrawingsWatchedValue=null,this._magnetEnabledWatchedValue=null,this._magnetModeWatchedValue=null,this._alertService=this._alertsDispatcher?new AlertService(this._alertsDispatcher):null,this._activeChangedChangedDelegate=new t,this._chartWidgetCollection.activeChartWidget.subscribe(function(){this._activeChangedChangedDelegate.fire()}.bind(this)),this._chartWidgets=new WeakMap,this._activateChart=function(t){e.activeChartWidget.setValue(t)}}var r=i("PT1i").linking,s=i("Q19o"),a=i("VNzU").layouts,l=i("FQhm"),c=i("5VQP").ContextMenuManager,u=i("mMWL"),h=i("pPtI"),d=i("zUrt").backend,p=i("uOxu"),_=i("brCa").createNoticeDialog,f=i("oNDq").createConfirmDialog,m=i("2jXJ"),y=i("sJA2").ThemesApi,g=i("pZll").symbolSearchUIService,v=i("ZjKI").CLOSE_POPUPS_AND_DIALOGS_COMMAND,S=i("LxhU").Interval;o.prototype.subscribe=function(e,t){l.subscribe(e,t)},o.prototype.unsubscribe=function(e,t){l.unsubscribe(e,t)},o.prototype.onContextMenu=function(e){l.subscribe("onContextMenu",function(t){
t.callback(e(t.unixtime,t.price))})},o.prototype.onGrayedObjectClicked=function(e){l.subscribe("onGrayedObjectClicked",e)},o.prototype.activeChart=function(){return this._getChartWidgetApi(this._chartWidgetCollection.activeChartWidget.value())},o.prototype._getChartWidgetApi=function(e){var t=this._chartWidgets.get(e);return void 0===t&&(t=new s(e,this._activateChart.bind(null,e)),this._chartWidgets.set(e,t)),t},o.prototype.onActiveChartChanged=function(){return this._activeChangedChangedDelegate},o.prototype.changeSymbol=function(e,t,i){r.interval.setValue(S.normalize(t)),r.symbol.setValue(e),i&&this.activeChart().onDataLoaded().subscribe(null,i,!0)},o.prototype.setLayout=function(e){this._chartWidgetCollection.layout.setValue(e)},o.prototype.layout=function(){return this._chartWidgetCollection.layout.value()},o.prototype.layoutName=function(){return this._chartWidgetCollection.metaInfo.name.value()},o.prototype.chartsCount=function(){return a[this.layout()].count},o.prototype.chart=function(e){if(void 0===e&&(e=0),e<0||e>=this.chartsCount())throw Error("Incorrect index: "+e);return this._getChartWidgetApi(this._chartWidgetCollection.getAll()[e])},o.prototype.getSymbolInterval=function(e){var t={symbol:r.symbol.value(),interval:r.interval.value()};return e&&e(t),t},o.prototype.saveChart=function(e){var t=this;this._saveChartService.whenReadyToSave(function(){var i=t._saveChartService.saveToJSON();return e&&e(JSON.parse(i.content))})},o.prototype.loadChart=function(e){this._chartApiInstance.disconnect(),this._chartWidgetCollection.loadContent(e.json),this._chartWidgetCollection.purgeUnusedWidgets(),e.extendedData&&(this._chartWidgetCollection.metaInfo.id.setValue(e.extendedData.uid),this._chartWidgetCollection.metaInfo.uid.setValue(e.extendedData.uid),this._chartWidgetCollection.metaInfo.name.setValue(e.extendedData.name)),this._chartApiInstance.connect(),r.symbol.setValue(this.activeChart().symbol()),l.emit("chart_loaded")},o.prototype.getStudiesList=function(){return this._chartApiInstance.allStudiesMetadata().filter(function(e){return!e.is_hidden_study}).map(function(e){return e.description})},o.prototype.getSavedCharts=function(e){d.getCharts(e)},o.prototype.loadChartFromServer=function(e){d.loadChart(e)},o.prototype.saveChartToServer=function(e,t,i){this._saveChartService.saveChartSilently(e,t,i)},o.prototype.removeChartFromServer=function(e,t){d.removeChart(e,t)},o.prototype.getIntervals=function(){var e=[],t=h.getCustomResolutions();return null!==this._chartApiInstance&&(e=this._chartApiInstance.defaultResolutions()),h.mergeResolutions(e,t)},o.prototype.closePopupsAndDialogs=function(){var e,t,n=document.querySelectorAll("._tv-dialog-title-close");for(e=0;e<n.length;e++)n[e].click();(t=i.c.KHon)&&t.exports.closeAllDialogs(),c.hideAll(),l.emit(v)},o.prototype.selectLineTool=function(e){m.supportedLineTools[e]&&(e=m.supportedLineTools[e].name,u.tool.value()!==e&&u.tool.setValue(e))},o.prototype.selectedLineTool=function(){var e,t=Object.keys(m.supportedLineTools),i=u.tool.value()
;for(e=0;e<t.length;++e)if(m.supportedLineTools[t[e]].name===i)return t[e];return""},o.prototype.lockAllDrawingTools=function(){return null===this._lockDrawingsWatchedValue&&(this._lockDrawingsWatchedValue=new n(u.lockDrawings().value()),this._lockDrawingsWatchedValue.subscribe(function(e){u.lockDrawings().setValue(e)}),u.lockDrawings().subscribe(this,function(){this._lockDrawingsWatchedValue.setValue(u.lockDrawings().value())})),this._lockDrawingsWatchedValue},o.prototype.hideAllDrawingTools=function(){return null===this._hideDrawingsWatchedValue&&(this._hideDrawingsWatchedValue=new n(u.hideAllDrawings().value()),this._hideDrawingsWatchedValue.subscribe(function(e){u.hideAllDrawings().setValue(e)}),u.hideAllDrawings().subscribe(this,function(){this._hideDrawingsWatchedValue.setValue(u.hideAllDrawings().value())})),this._hideDrawingsWatchedValue},o.prototype.magnetEnabled=function(){return null===this._magnetEnabledWatchedValue&&(this._magnetEnabledWatchedValue=new n(u.properties().magnet.value()),this._magnetEnabledWatchedValue.subscribe(function(e){u.properties().magnet.setValue(e)}),u.properties().magnet.subscribe(this,function(){this._magnetEnabledWatchedValue.setValue(u.properties().magnet.value())})),this._magnetEnabledWatchedValue},o.prototype.magnetMode=function(){return null===this._magnetModeWatchedValue&&(this._magnetModeWatchedValue=new n(u.properties().magnetMode.value()),this._magnetModeWatchedValue.subscribe(function(e){u.properties().magnetMode.setValue(e)}),u.properties().magnetMode.subscribe(this,function(){this._magnetModeWatchedValue.setValue(u.properties().magnetMode.value())})),this._magnetModeWatchedValue},o.prototype.mainSeriesPriceFormatter=function(){return this._chartWidgetCollection.activeChartWidget.value().model().mainSeries().priceScale().formatter()},o.prototype.showNoticeDialog=function(e){function t(){i&&(i(),i=null)}var i=(e=e||{}).callback;_({title:e.title,content:e.body||""}).then(function(e){e.on("action:ok",t),e.on("afterClose",t),e.open()})},o.prototype.showConfirmDialog=function(e){function t(e){i&&(i(e),i=null)}if(!(e=e||{}).callback)throw Error("callback must be exist");var i=e.callback;f({title:e.title,content:e.body||""}).then(function(e){e.on("action:yes",function(){e.close(),t(!0)}),e.on("action:no",t.bind(null,!1)),e.on("afterClose",t.bind(null,!1)),e.open()})},o.prototype.logs=function(){return{getLogHistory:p.getLogHistory,enable:p.loggingOn,disable:p.loggingOff}},o.prototype.showLoadChartDialog=function(){var e=this._loadChartService;e&&e.showLoadDialog()},o.prototype.showSaveAsChartDialog=function(){var e=this._saveChartService;e&&window.runOrSignIn(function(){e.saveChartAs()},{source:"Save as chart dialogue"})},o.prototype.drawOnAllCharts=function(e){return u.drawOnAllCharts().setValue(e)},o.prototype.themes=function(){return new y({chartWidgetCollection:this._chartWidgetCollection})},o.prototype.undoRedoState=function(){return this._chartWidgetCollection.undoHistory.state()},o.prototype.takeScreenshot=function(){this._chartWidgetCollection.takeScreenshot()},
o.prototype.setSymbolSearchUI=function(e){g().setSymbolGetter(e)},o.prototype.setIntervalLinkingEnabled=function(e){this._chartWidgetCollection.lock.interval.setValue(e)},o.prototype.setTimeFrame=function(e){this._chartWidgetCollection.setTimeFrame(e)},o.prototype.symbolSync=function(){return this._chartWidgetCollection.lock.symbol},o.prototype.intervalSync=function(){return this._chartWidgetCollection.lock.interval},o.prototype.crosshairSync=function(){return this._chartWidgetCollection.lock.crosshair},o.prototype.timeSync=function(){return this._chartWidgetCollection.lock.trackTime},e.exports=o}).call(this,i("aIyQ"),i("hY0g"))},"9zVu":function(e,t,i){"use strict";var n,o,r,s,a,l;i.r(t),i.d(t,"DrawingToolbarBootloader",function(){return l}),n=i("mrSG"),o=i("OiSa"),r=i("7RN7"),s=i("cZRT"),a=i("YuHv"),l=function(e){function t(t){var i=e.call(this)||this;return i._opts=t,o.isDrawingToolbarVisible.value()&&(i._opts.resizerBridge.negotiateWidth(r.b),i._opts.resizerBridge.container.value().appendChild(Object(a.a)())),i}return Object(n.__extends)(t,e),t.prototype._startLoading=function(){var e=this;return Promise.all([i.e("react"),i.e(3),i.e(6),i.e(15),i.e(53),i.e(58),i.e(0),i.e(1),i.e(8),i.e("line-tools-icons"),i.e(42),i.e("drawing-toolbar")]).then(i.bind(null,"5f7t")).then(function(t){return new t.DrawingToolbarRenderer(e._opts.resizerBridge.container.value(),Object(n.__assign)({},e._opts))})},t}(s.a)},AE9l:function(e,t,i){},AVbJ:function(e){e.exports={"color-bg-primary":"color-cold-gray-850","color-bg-primary-hover":"color-cold-gray-800","color-bg-secondary":"color-cold-gray-900","color-bg-scroll-buttons":"color-cold-gray-800","color-legacy-bg-scroll-buttons":"color-cold-gray-550","color-legacy-bg-widget":"color-cold-gray-900","color-text-primary":"color-cold-gray-300","color-text-secondary":"color-cold-gray-500","color-text-tertiary":"color-cold-gray-400","color-text-disabled":"color-cold-gray-650","color-divider":"color-cold-gray-700","color-divider-hover":"color-cold-gray-800","color-box-shadow":"color-black","color-active-hover-text":"color-gull-gray","color-alert-text":"color-loblolly","color-border":"color-bright-gray","color-border-chat-fields":"color-bright-gray","color-border-hover":"color-trout-1","color-border-table":"color-cold-gray-800","color-brand":"color-tv-blue-700","color-brand-active":"color-tv-blue-600","color-brand-hover":"color-tv-blue-600","color-button-hover-bg":"color-mirage-3","color-chart-page-bg":"color-cold-gray-800","color-common-tooltip-text":"color-loblolly","color-common-tooltip-bg":"color-trout-2","color-danger":"color-ripe-red-600","color-depthrenderer-fill-style":"color-catskill-white","color-depthrenderer-stroke-style":"color-trout-1","color-disabled-border-and-color":"color-ebony-clay","color-disabled-input":"color-bright-gray","color-empty-container-message":"color-slate-gray","color-highlight-new":"color-dark-slate-blue","color-icons":"color-slate-gray","color-input-bg":"color-charade","color-input-textarea-readonly":"color-trout-1","color-input-publish-bg":"color-mirage-1",
"color-item-active-blue":"color-blue-dianne","color-item-hover-active-bg":"color-charade","color-item-hover-bg":"color-ebony-clay","color-item-hover-blue":"color-blue-dianne","color-item-selected-blue":"color-blue-dianne","color-item-active-text":"color-cold-gray-200","color-item-active-bg":"color-tv-blue-700","color-link":"color-tv-blue-700","color-link-hover":"color-tv-blue-600","color-link-active":"color-tv-blue-600","color-list-item":"color-slate-gray","color-list-nth-child-bg":"color-mirage-3","color-news-highlight":"color-charade","color-pane-bg":"color-mirage-1","color-pane-secondary-bg":"color-cold-gray-850","color-placeholder":"color-trout-2","color-popup-menu-item-hover-bg":"color-cold-gray-800","color-popup-menu-separator":"color-bright-gray","color-row-hover-active-bg":"color-ebony-clay","color-sb-scrollbar-body-bg":"color-trout-2","color-screener-header-bg":"color-mirage-3","color-screener-header-bg-hover":"color-ebony-clay","color-screener-description":"color-loblolly","color-section-separator-border":"color-bright-gray","color-separator-table-chat":"color-bright-gray","color-success":"color-minty-green-700","color-success-hover":"color-minty-green-600","color-success-active":"color-minty-green-500","color-tag-active-bg":"color-bright-gray","color-tag-hover-bg":"color-charade","color-text-regular":"color-loblolly","color-toolbar-button-text":"color-cold-gray-500","color-toolbar-button-text-hover":"color-cold-gray-450","color-toolbar-button-text-active":"color-tv-blue-700","color-toolbar-button-text-active-hover":"color-tv-blue-600","color-toolbar-button-background-hover":"color-cold-gray-800","color-toolbar-button-background-secondary-hover":"color-cold-gray-750","color-toolbar-toggle-button-background-active":"color-tv-blue-700","color-toolbar-toggle-button-background-active-hover":"color-tv-blue-600","color-toolbar-interactive-element-text-normal":"color-cold-gray-300","color-toolbar-interactive-element-text-hover":"color-cold-gray-250","color-toolbar-opened-element-bg":"color-cold-gray-800","color-tooltip-bg":"color-bright-gray","color-tv-button-checked":"color-slate-gray","color-tv-dialog-caption":"color-athens-gray-2","color-tv-dropdown-item-hover-bg":"color-charade","color-underlined-text":"color-gull-gray","color-widget-pages-bg":"color-mirage-2","color-warning":"color-tan-orange-700","color-forex-icon":"color-white","color-list-item-active-bg":"color-medium-blue","color-list-item-hover-bg":"color-ebony-clay","color-list-item-text":"color-loblolly","color-price-axis-label-back":"color-cold-gray-800","color-price-axis-label-text":"color-cold-gray-500","color-price-axis-gear":"color-cold-gray-500","color-price-axis-gear-hover":"color-cold-gray-400","color-price-axis-highlight":"color-cold-gray-800","color-bid":"color-tv-blue-700","color-scroll-bg":"color-cold-gray-750","color-scroll-border":"color-cold-gray-850","color-widget-border":"color-cold-gray-800","color-scroll-buttons-arrow":"color-white","color-control-intent-default":"color-cold-gray-650",
"color-control-intent-success":"color-minty-green-600","color-control-intent-primary":"color-tv-blue-700","color-control-intent-warning":"color-tan-orange-500","color-control-intent-danger":"color-ripe-red-700","color-growing":"color-minty-green-600","color-falling":"color-ripe-red-600"}},"AWC/":function(e,t,i){e.exports={container:"container-2BvS3Fpg",inner:"inner-3YzQuyJx","border-left":"border-left-LYAXTdyL","border-right":"border-right-OzIcepiV","border-top":"border-top-193CSDqN","border-bottom":"border-bottom-2lZASSTD","top-right-radius":"top-right-radius-FE25nrPp","top-left-radius":"top-left-radius-1ELOZlIb","bottom-right-radius":"bottom-right-radius-7zqIiaLN","bottom-left-radius":"bottom-left-radius-xCxQ998i"}},AXy7:function(e,t,i){"use strict";function n(e,t){this._source=t,this._properties=e,this._points=[new l(-1,-1)],this._invalidated=!0,this._lineRenderer=new u}function o(){this._data=null}function r(e){this._source=e,this._points=[],this._bandBgRenderer=new o}function s(e,t,i){this._source=e,this._points=[],a(t.type===h.FilledArea.TYPE_HLINES,"Wrong filledArea type: "+t.type),this._initBandIndexes(t.objAId,t.objBId),this._fillStyleProps=i,this._bandBgRenderer=new o}var a=i("Eyy1").assert,l=i("aO4+").Point,c=i("Hr11").clamp,u=i("l4sv").HorizontalLineRenderer,h=i("0YCj"),d=i("Tmoa");n.prototype.update=function(){this._invalidated=!0},n.prototype.updateImpl=function(){var e,t,i=this._source.priceScale();i&&!i.isEmpty()?(e=this._properties.value.value(),isNumber(e)?(t=this._source.firstValue(),this._points[0]=new l(-1,i.priceToCoordinate(e,t))):this._points[0]=new l(-1,NaN)):this._points[0]=new l(-1,-1)},n.prototype.renderer=function(){this._invalidated&&(this.updateImpl(),this._invalidated=!1);var e={};return e.width=this._source.model().timeScale().width(),e.height=this._source.priceScale().height(),e.points=this._points,e.color=this._properties.color.value(),e.linewidth=this._properties.linewidth.value(),e.linestyle=this._properties.linestyle.value(),this._lineRenderer.setData(e),this._lineRenderer},o.prototype.setData=function(e){this._data=e},o.prototype.draw=function(e){var t,i,n;null!==this._data&&0!==this._data.points.length&&(t=e.canvas.width,e.fillStyle=d.generateColor(this._data.backcolor,this._data.transparency),i=Math.min(this._data.points[0],this._data.points[1]),n=Math.max(this._data.points[0],this._data.points[1]),e.fillRect(0,i,t,n-i))},o.prototype.hitTest=function(e){return null},r.prototype.update=function(){var e,t,i,n;this._points=[],this._source.properties().bandsBackground.fillBackground.value()&&(e=this._source.properties().bands[0],t=this._source.properties().bands[1],(i=this._source.priceScale())&&!i.isEmpty()&&(n=this._source.firstValue(),this._points.push(i.priceToCoordinate(e.value.value(),n)),this._points.push(i.priceToCoordinate(t.value.value(),n))))},r.prototype.renderer=function(){var e={};return e.points=this._points,e.backcolor=this._source.properties().bandsBackground.backgroundColor.value(),e.transparency=this._source.properties().bandsBackground.transparency.value(),
this._bandBgRenderer.setData(e),this._bandBgRenderer},s.prototype._initBandIndexes=function(e,t){var i,n;for(this._bandAKey=null,this._bandBKey=null,i=0;i<this._source.metaInfo().bands.length;++i)n=this._source.metaInfo().bands[i],null!==this._bandAKey||n.id!==e?null!==this._bandBKey||n.id!==t||(this._bandBKey=i):this._bandAKey=i},s.prototype.update=function(){var e,t,i,n;this._points=[],this._fillStyleProps.visible.value()&&(e=this._source.properties().bands[this._bandAKey],t=this._source.properties().bands[this._bandBKey],(i=this._source.priceScale())&&!i.isEmpty()&&(n=this._source.firstValue(),this._points.push(i.priceToCoordinate(e.value.value(),n)),this._points.push(i.priceToCoordinate(t.value.value(),n))))},s.prototype.renderer=function(){var e,t=this._fillStyleProps.transparency.value();return t=c(t,0,100),(e={}).points=this._points,e.backcolor=d.generateColor(this._fillStyleProps.color.value(),t),e.transparency=this._fillStyleProps.transparency.value(),this._bandBgRenderer.setData(e),this._bandBgRenderer},t.BandPaneView=n,t.BandBackgroundPaneView=r,t.HlineFillPaneView=s},"Aba+":function(e,t,i){},ApcL:function(e,t,i){"use strict";function n(e,t,i,o,r){var s,l;return void 0===r&&(r=!0),void 0===t[e]?(L.logDebug("We haven't had this property "+o+"."+e+" yet, please, remove it from whiteList"),null):Object(a.isObject)(i[e])?(s=Object.keys(i[e]),l="",s.map(function(s){var a;return(a={})[s]=n(s,t[e],i[e],o+"."+e,r),a}).reduce(function(e,t){return e[l=Object.keys(t)[0]]=t[l],e},{})):r?t[e].value():t[e]}function o(e,t,i){var o,r,s,a,l,c,u,h,d,p,_;return void 0===i&&(i=U),o={timezone:"",priceScaleSelectionStrategyName:"auto",timeScale:{defaultRightOffset:e.timeScale().defaultRightOffsetProperty().value()},mainSeries:{},sessions:{},paneProperties:{},scalesProperties:{},chartEventsSourceProperties:{},tradingProperties:{}},r=["timeScale","mainSeries","sessions"],s=i.mainSeries,a=Object.keys(i),l=Object.keys(s),c=t.properties(),u=e.properties(),h=i.sessions,d=Object.keys(h),p=e.sessions(),_=p.properties(),l.forEach(function(e){o.mainSeries[e]=n(e,c,s,"mainSeries")}),d.forEach(function(e){o.sessions[e]=n(e,_,h,"sessions")}),a.forEach(function(e){r.includes(e)||(o[e]=n(e,u,i,"preferences"))}),o}function r(e,t,i){var o,r,s,a,l,c,u;return void 0===i&&(i=z),o={timeScale:{defaultRightOffset:e.timeScale().rightOffsetDefaultValue()},mainSeries:{},sessions:Object(I.deepExtend)({},x.sessionsPreferencesDefault),paneProperties:{},scalesProperties:{},chartEventsSourceProperties:{},tradingProperties:{},priceScaleSelectionStrategyName:"auto"},r=["timeScale","mainSeries","sessions"],s=i.mainSeries,a=Object.keys(i),l=Object.keys(s),c=Object(T.factoryDefaults)("chartproperties.mainSeriesProperties"),u=Object(T.factoryDefaults)("chartproperties"),l.forEach(function(e){o.mainSeries[e]=n(e,c,s,"mainSeries",!1)}),a.forEach(function(e){r.includes(e)||(o[e]=n(e,u,i,"preferences",!1))}),o}var s,a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P,C,T,x,I,L,M,A,k,E,O,D,V,B,R,N,F,W,j,U,z;i.r(t),s=i("mrSG"),a=i("ogJP"),l=i("vTIA"),c={color:"",style:0,width:0},u={
upColor:"",downColor:"",drawWick:!1,drawBorder:!1,borderColor:"",borderUpColor:"",borderDownColor:"",wickColor:"",wickUpColor:"",wickDownColor:"",barColorsOnPrevClose:!1},h={upColor:"",downColor:"",drawWick:!1,drawBorder:!1,borderColor:"",borderUpColor:"",borderDownColor:"",wickColor:"",wickUpColor:"",wickDownColor:""},d={upColor:"",downColor:"",barColorsOnPrevClose:!1,dontDrawOpen:!1,thinBars:!0},p={color:"",linestyle:0,linewidth:0,styleType:0},_={color1:"",color2:"",linecolor:"",linestyle:0,linewidth:0,transparency:0},f={topFillColor1:"",topFillColor2:"",bottomFillColor1:"",bottomFillColor2:"",topLineColor:"",bottomLineColor:"",topLineWidth:0,bottomLineWidth:0,transparency:0,baseLevelPercentage:0},m={color:"",showBorders:!1,borderColor:"",showLabels:!1,labelColor:"",fontSize:0},y={upColor:"",downColor:"",drawWick:!1,drawBorder:!1,borderColor:"",borderUpColor:"",borderDownColor:"",wickColor:"",wickUpColor:"",wickDownColor:"",showRealLastPrice:!1,barColorsOnPrevClose:!1,inputs:{}},g={upColor:"",downColor:"",borderUpColor:"",borderDownColor:"",upColorProjection:"",downColorProjection:"",borderUpColorProjection:"",borderDownColorProjection:"",wickUpColor:"",wickDownColor:"",inputs:{boxSize:0,style:"",atrLength:0,wicks:!1}},v={upColor:"",downColor:"",borderUpColor:"",borderDownColor:"",upColorProjection:"",downColorProjection:"",borderUpColorProjection:"",borderDownColorProjection:"",inputs:{source:"",lb:0}},S={upColor:"",downColor:"",upColorProjection:"",downColorProjection:"",inputs:{style:"",atrLength:0,reversalAmount:0}},b={upColor:"",downColor:"",upColorProjection:"",downColorProjection:"",inputs:{reversalAmount:0,boxSize:0,style:"",atrLength:0}},w={upColor:"",downColor:"",upColorProjection:"",downColorProjection:"",thinBars:!1,inputs:{range:0,phantomBars:!1}},P=i("uOxu"),C=i("oXaB"),T=i("wZIs"),x=i("KUek"),I=i("FIi8"),i.d(t,"gridPreferencesDefault",function(){return M}),i.d(t,"crossHairPreferencesDefault",function(){return A}),i.d(t,"legendPreferencesDefault",function(){return k}),i.d(t,"panePreferencesDefault",function(){return E}),i.d(t,"scalesPreferencesBaseDefault",function(){return O}),i.d(t,"scalesPreferencesToApplyDefault",function(){return D}),i.d(t,"chartEventsSourceBreaksPreferencesDefault",function(){return V}),i.d(t,"chartEventsSourcePreferencesDefault",function(){return B}),i.d(t,"timeScalePreferencesDefault",function(){return R}),i.d(t,"priceScalePreferencesDefault",function(){return N}),i.d(t,"statusViewPreferencesDefault",function(){return F}),i.d(t,"mainSeriesPreferencesDefault",function(){return W}),i.d(t,"chartPreferencesBaseDefault",function(){return j}),i.d(t,"chartPreferencesToApplyDefault",function(){return U}),i.d(t,"chartPreferencesToRestoreDefault",function(){return z}),i.d(t,"createPreferencesObject",function(){return n}),i.d(t,"preferencesByWhiteList",function(){return o}),i.d(t,"defaultsPreferencesByWhiteList",function(){return r}),L=Object(P.getLogger)("Chart.ApplyPreferencesToAllCharts"),M={color:"",style:0},A={color:"",style:0,transparency:0,width:0},k={showStudyArguments:!1,
showStudyTitles:!1,showStudyValues:!1,showSeriesTitle:!1,showSeriesOHLC:!1,showLegend:!1,showBarChange:!0,showBackground:!0,backgroundTransparency:0,wrapText:!1},E={background:"",topMargin:0,bottomMargin:0,rightOffset:0,horzGridProperties:Object(I.deepExtend)({},M),vertGridProperties:Object(I.deepExtend)({},M),crossHairProperties:Object(I.deepExtend)({},A),legendProperties:Object(I.deepExtend)({},k)},O={lineColor:"",textColor:"",fontSize:0,scaleSeriesOnly:!1,showSeriesLastValue:!1,seriesLastValueMode:C.PriceAxisLastValueMode.LastValueAccordingToScale,showSeriesPrevCloseValue:!1,showStudyLastValue:!1,showSymbolLabels:!1,showStudyPlotLabels:!1,showFundamentalLastValue:!1,showFundamentalNameLabel:!1,showCurrency:!0},D=Object(s.__assign)({},O),V={color:"",visible:!1,style:0,width:0},B={visible:!1,futureOnly:!1,breaks:Object(I.deepExtend)({},V)},R={defaultRightOffset:0},N={autoScale:!1,autoScaleDisabled:!1,lockScale:!1,percentage:!1,percentageDisabled:!1,log:!1,logDisabled:!1,alignLabels:!1,isInverted:!1,indexedTo100:!1},F={fontSize:16,showExchange:!0,showInterval:!0,symbolTextSource:"description"},W={style:0,minTick:0,showPriceLine:!1,priceLineWidth:0,priceLineColor:"",showPrevClosePriceLine:!1,prevClosePriceLineWidth:0,extendedHours:!1,prevClosePriceLineColor:"",esdShowDividends:!1,esdShowSplits:!1,esdShowEarnings:!1,esdShowBreaks:!1,dividendsAdjustment:!1,statusViewStyle:Object(I.deepExtend)({},F),priceAxisProperties:Object(I.deepExtend)({},N),esdBreaksStyle:Object(I.deepExtend)({},c),candleStyle:Object(I.deepExtend)({},u),hollowCandleStyle:Object(I.deepExtend)({},h),barStyle:Object(I.deepExtend)({},d),lineStyle:Object(I.deepExtend)({},p),areaStyle:Object(I.deepExtend)({},_),baselineStyle:Object(I.deepExtend)({},f),hiloStyle:Object(I.deepExtend)({},m),haStyle:Object(I.deepExtend)({},y),renkoStyle:Object(I.deepExtend)({},g),pbStyle:Object(I.deepExtend)({},v),kagiStyle:Object(I.deepExtend)({},S),pnfStyle:Object(I.deepExtend)({},b),rangeStyle:Object(I.deepExtend)({},w)},j={priceScaleSelectionStrategyName:"auto",timeScale:Object(I.deepExtend)({},R),mainSeries:Object(I.deepExtend)({},W),sessions:Object(I.deepExtend)({},x.sessionsPreferencesDefault),paneProperties:Object(I.deepExtend)({},E),chartEventsSourceProperties:Object(I.deepExtend)({},B),tradingProperties:Object(I.deepExtend)({},l.tradingPreferencesDefault)},U=Object(s.__assign)({timezone:"",scalesProperties:Object(I.deepExtend)({},D)},j),z=Object(s.__assign)({scalesProperties:Object(I.deepExtend)({},O)},j)},Az04:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolRotatedRectangle";var o=t||n.createProperties();s.call(this,e,o),i.e("lt-pane-views").then(function(e){var t=i("lZ9F").RotatedRectanglePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("aO4+").Point,r=i("GEp6").distanceToLine,s=i("Ss5c").LineDataSource,a=i("Ocx9").DefaultProperty,l=i("hayr").propertyPages,c=window.t("Rotated Rectangle");inherit(n,s),n.prototype.startChanging=function(e,t){var i,n,o,a
;s.prototype.startChanging.call(this,e,t),0!==e&&1!==e||(n=(i=this._paneViews[0])._points[0],o=i._points[1],a=i._points[2],this._distance=r(n,o,a).distance)},n.prototype.setPoint=function(e,t,i){var n,r,a,l,c,u;s.prototype.setPoint.call(this,e,t,i),0!==e&&1!==e||((n=this._paneViews[0]).update(),r=n._points[0],a=n._points[1].subtract(r),l=new o(a.y,-a.x).normalized().scaled(this._distance),c=r.add(l),u=this.screenPointToPoint(c),this._points[2]=u)},n.prototype.endChanging=function(){delete this._distance},n.prototype.pointsCount=function(){return 3},n.prototype.title=function(){return c},n.prototype.name=function(){return"Rotated Rectangle"},n.prototype.hasEditableCoordinates=function(){return!1},n.prototype.getInputsPropertyPage=function(){return null},n.prototype.getStylesPropertyPage=function(){return l.LineToolRectangleStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("Zd1D").GeneralFiguresDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new a("linetoolrotatedrectangle",e);return n._configureProperties(t),t},n._configureProperties=function(e){s._configureProperties(e)},t.LineToolRotatedRectangle=n},"B4/o":function(e,t,i){"use strict";(function(e){function n(e){this._line=e,this._data={bodyText:"order",quantityText:"0"},this._editable=!0,this._mode="",this._direction="buy",this._active=!0}function o(e){return null==e?e="":e+="",e}function r(e,t){this._adapter=new n(this),this._constructor="LineToolOrder";var o=t||r.createProperties();s.call(this,e,o),this.customization.disableSelection=!1,i.e("lt-pane-views").then(function(e){var t=i("LMGK").OrderPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var s=i("QIuV"),a=i("4TVt").LineToolPriceAxisView,l=i("jkoZ"),c=i("Ss5c").LineDataSource,u=i("Ocx9").DefaultProperty,h=i("s1Gx").sortSourcesPreOrdered,d=h.LineToolOrder;n.prototype.setMode=function(e){return this._mode=e,this._line.updateAllViewsAndRedraw(),this},n.prototype.setDirection=function(e){return this._direction=e,this._line.updateAllViewsAndRedraw(),this},n.prototype.setActive=function(e){return this._active=e,this._line.updateAllViewsAndRedraw(),this},n.prototype.setEditable=function(e){return this._editable=e,this._line.updateAllViewsAndRedraw(),this},n.prototype.getPrice=function(){return this._line.points().length>0?this._line.points()[0].price:this._line._timePoint.length>0?this._line._timePoint[0].price:void 0},n.prototype.setPrice=function(e){if(this._line.points().length>0){var t=this._line.points()[0];t.price=e,this._line._points[0]=t,this._line.normalizePoints(),this._line.updateAllViewsAndRedraw()}return this._line._timePoint.length>0&&(this._line._timePoint[0].price=e),this},n.prototype.getText=function(){return this._data.bodyText},n.prototype.setText=function(e){return this._data.bodyText=e||"",this._line.updateAllViewsAndRedraw(),this},n.prototype.setTooltip=function(e){
return this._line.properties().tooltip.setValue(o(e)),this},n.prototype.getTooltip=function(){return this._line.properties().tooltip.value()},n.prototype.setModifyTooltip=function(e){return this._line.properties().modifyTooltip.setValue(o(e)),this},n.prototype.getModifyTooltip=function(){return this._line.properties().modifyTooltip.value()},n.prototype.setCancelTooltip=function(e){return this._line.properties().cancelTooltip.setValue(o(e)),this},n.prototype.getCancelTooltip=function(){return this._line.properties().cancelTooltip.value()},n.prototype.getQuantity=function(){return this._data.quantityText},n.prototype.setQuantity=function(e){return this._data.quantityText=e||"",this._line.updateAllViewsAndRedraw(),this},n.prototype.getExtendLeft=function(){var e=this._line.properties().extendLeft.value();return"inherit"===e?this._line._model.properties().tradingProperties.extendLeft.value():e},n.prototype.setExtendLeft=function(e){return this._line.properties().extendLeft.setValue(e),this},n.prototype.getLineLength=function(){var e=this._line.properties().lineLength.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineLength.value():e},n.prototype.setLineLength=function(e){return this._line.properties().lineLength.setValue(Math.max(0,Math.min(e,100))),this},n.prototype.getLineColor=function(){var e=this._line.properties();return"buy"===this._direction?this._active?e.lineActiveBuyColor.value():e.lineInactiveBuyColor.value():this._active?e.lineActiveSellColor.value():e.lineInactiveSellColor.value()},n.prototype.setLineColor=function(e){return"buy"===this._direction?this._active?this.setLineActiveBuyColor(e):this.setLineInactiveBuyColor(e):this._active?this.setLineActiveSellColor(e):this.setLineInactiveSellColor(e),this},n.prototype.setLineActiveBuyColor=function(e){return this._line.properties().lineActiveBuyColor.setValue(e),this},n.prototype.setLineInactiveBuyColor=function(e){return this._line.properties().lineInactiveBuyColor.setValue(e),this},n.prototype.setLineActiveSellColor=function(e){return this._line.properties().lineActiveSellColor.setValue(e),this},n.prototype.setLineInactiveSellColor=function(e){return this._line.properties().lineInactiveSellColor.setValue(e),this},n.prototype.getLineStyle=function(){var e=this._line.properties().lineStyle.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineStyle.value():e},n.prototype.setLineStyle=function(e){return this._line.properties().lineStyle.setValue(e),this},n.prototype.getLineWidth=function(){var e=this._line.properties().lineWidth.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineWidth.value():e},n.prototype.setLineWidth=function(e){return this._line.properties().lineWidth.setValue(e),this},n.prototype.getBodyBorderColor=function(){var e=this._line.properties();return"buy"===this._direction?this._active?e.bodyBorderActiveBuyColor.value():e.bodyBorderInactiveBuyColor.value():this._active?e.bodyBorderActiveSellColor.value():e.bodyBorderInactiveSellColor.value()},
n.prototype.setBodyBorderColor=function(e){return"buy"===this._direction?this._active?this.setBodyBorderActiveBuyColor(e):this.setBodyBorderInactiveBuyColor(e):this._active?this.setBodyBorderActiveSellColor(e):this.setBodyBorderInactiveSellColor(e),this},n.prototype.setBodyBorderActiveBuyColor=function(e){return this._line.properties().bodyBorderActiveBuyColor.setValue(e),this},n.prototype.setBodyBorderInactiveBuyColor=function(e){return this._line.properties().bodyBorderInactiveBuyColor.setValue(e),this},n.prototype.setBodyBorderActiveSellColor=function(e){return this._line.properties().bodyBorderActiveSellColor.setValue(e),this},n.prototype.setBodyBorderInactiveSellColor=function(e){return this._line.properties().bodyBorderInactiveSellColor.setValue(e),this},n.prototype.getBodyBackgroundColor=function(){return l.getColorFromProperties(this._line.properties().bodyBackgroundColor,this._line.properties().bodyBackgroundTransparency)},n.prototype.setBodyBackgroundColor=function(e){return l.setColorToProperties(e,this._line.properties().bodyBackgroundColor,this._line.properties().bodyBackgroundTransparency),this},n.prototype.getBodyTextColor=function(){var e=this._line.properties();return"limit"===this._mode?this._active?e.bodyTextActiveLimitColor.value():e.bodyTextInactiveLimitColor.value():"stop"===this._mode?this._active?e.bodyTextActiveStopColor.value():e.bodyTextInactiveStopColor.value():"buy"===this._direction?this._active?e.bodyTextActiveBuyColor.value():e.bodyTextInactiveBuyColor.value():this._active?e.bodyTextActiveSellColor.value():e.bodyTextInactiveSellColor.value()},n.prototype.setBodyTextColor=function(e){return"limit"===this._mode?this._active?this.setBodyTextActiveLimitColor(e):this.setBodyTextInactiveLimitColor(e):"stop"===this._mode?this._active?this.setBodyTextActiveStopColor(e):this.setBodyTextInactiveStopColor(e):"buy"===this._direction?this._active?this.setBodyTextActiveBuyColor(e):this.setBodyTextInactiveBuyColor(e):this._active?this.setBodyTextActiveSellColor(e):this.setBodyTextInactiveSellColor(e),this},n.prototype.setBodyTextInactiveLimitColor=function(e){return this._line.properties().bodyTextInactiveLimitColor.setValue(e),this},n.prototype.setBodyTextActiveLimitColor=function(e){return this._line.properties().bodyTextActiveLimitColor.setValue(e),this},n.prototype.setBodyTextInactiveStopColor=function(e){return this._line.properties().bodyTextInactiveStopColor.setValue(e),this},n.prototype.setBodyTextActiveStopColor=function(e){return this._line.properties().bodyTextActiveStopColor.setValue(e),this},n.prototype.setBodyTextInactiveBuyColor=function(e){return this._line.properties().bodyTextInactiveBuyColor.setValue(e),this},n.prototype.setBodyTextActiveBuyColor=function(e){return this._line.properties().bodyTextActiveBuyColor.setValue(e),this},n.prototype.setBodyTextInactiveSellColor=function(e){return this._line.properties().bodyTextInactiveSellColor.setValue(e),this},n.prototype.setBodyTextActiveSellColor=function(e){return this._line.properties().bodyTextActiveSellColor.setValue(e),this},
n.prototype.getBodyFont=function(){return l.getFontFromProperties(this._line.properties().bodyFontFamily,this._line.properties().bodyFontSize,this._line.properties().bodyFontBold,this._line.properties().bodyFontItalic)},n.prototype.setBodyFont=function(e){return l.setFontToProperties(e,this._line.properties().bodyFontFamily,this._line.properties().bodyFontSize,this._line.properties().bodyFontBold,this._line.properties().bodyFontItalic),this},n.prototype.getQuantityBorderColor=function(){var e=this._line.properties();return"buy"===this._direction?this._active?e.quantityBorderActiveBuyColor.value():e.quantityBorderInactiveBuyColor.value():this._active?e.quantityBorderActiveSellColor.value():e.quantityBorderInactiveSellColor.value()},n.prototype.setQuantityBorderColor=function(e){return"buy"===this._direction?this._active?this.setQuantityBorderActiveBuyColor(e):this.setQuantityBorderInactiveBuyColor(e):this._active?this.setQuantityBorderActiveSellColor(e):this.setQuantityBorderInactiveSellColor(e),this},n.prototype.setQuantityBorderActiveBuyColor=function(e){return this._line.properties().quantityBorderActiveBuyColor.setValue(e),this},n.prototype.setQuantityBorderInactiveBuyColor=function(e){return this._line.properties().quantityBorderInactiveBuyColor.setValue(e),this},n.prototype.setQuantityBorderActiveSellColor=function(e){return this._line.properties().quantityBorderActiveSellColor.setValue(e),this},n.prototype.setQuantityBorderInactiveSellColor=function(e){return this._line.properties().quantityBorderInactiveSellColor.setValue(e),this},n.prototype.getQuantityBackgroundColor=function(){var e=this._line.properties();return"buy"===this._direction?this._active?e.quantityBackgroundActiveBuyColor.value():e.quantityBackgroundInactiveBuyColor.value():this._active?e.quantityBackgroundActiveSellColor.value():e.quantityBackgroundInactiveSellColor.value()},n.prototype.setQuantityBackgroundColor=function(e){return"buy"===this._direction?this._active?this.setQuantityBackgroundActiveBuyColor(e):this.setQuantityBackgroundInactiveBuyColor(e):this._active?this.setQuantityBackgroundActiveSellColor(e):this.setQuantityBackgroundInactiveSellColor(e),this},n.prototype.setQuantityBackgroundActiveBuyColor=function(e){return this._line.properties().quantityBackgroundActiveBuyColor.setValue(e),this},n.prototype.setQuantityBackgroundInactiveBuyColor=function(e){return this._line.properties().quantityBackgroundInactiveBuyColor.setValue(e),this},n.prototype.setQuantityBackgroundActiveSellColor=function(e){return this._line.properties().quantityBackgroundActiveSellColor.setValue(e),this},n.prototype.setQuantityBackgroundInactiveSellColor=function(e){return this._line.properties().quantityBackgroundInactiveSellColor.setValue(e),this},n.prototype.getQuantityTextColor=function(){return l.getColorFromProperties(this._line.properties().quantityTextColor,this._line.properties().quantityTextTransparency)},n.prototype.setQuantityTextColor=function(e){
return l.setColorToProperties(e,this._line.properties().quantityTextColor,this._line.properties().quantityTextTransparency),this},n.prototype.getQuantityFont=function(){return l.getFontFromProperties(this._line.properties().quantityFontFamily,this._line.properties().quantityFontSize,this._line.properties().quantityFontBold,this._line.properties().quantityFontItalic)},n.prototype.setQuantityFont=function(e){return l.setFontToProperties(e,this._line.properties().quantityFontFamily,this._line.properties().quantityFontSize,this._line.properties().quantityFontBold,this._line.properties().quantityFontItalic),this},n.prototype.getCancelButtonBorderColor=function(){var e=this._line.properties();return"buy"===this._direction?this._active?e.cancelButtonBorderActiveBuyColor.value():e.cancelButtonBorderInactiveBuyColor.value():this._active?e.cancelButtonBorderActiveSellColor.value():e.cancelButtonBorderInactiveSellColor.value()},n.prototype.setCancelButtonBorderColor=function(e){return"buy"===this._direction?this._active?this.setCancelButtonBorderActiveBuyColor(e):this.setCancelButtonBorderInactiveBuyColor(e):this._active?this.setCancelButtonBorderActiveSellColor(e):this.setCancelButtonBorderInactiveSellColor(e),this},n.prototype.setCancelButtonBorderActiveBuyColor=function(e){return this._line.properties().cancelButtonBorderActiveBuyColor.setValue(e),this},n.prototype.setCancelButtonBorderInactiveBuyColor=function(e){return this._line.properties().cancelButtonBorderInactiveBuyColor.setValue(e),this},n.prototype.setCancelButtonBorderActiveSellColor=function(e){return this._line.properties().cancelButtonBorderActiveSellColor.setValue(e),this},n.prototype.setCancelButtonBorderInactiveSellColor=function(e){return this._line.properties().cancelButtonBorderInactiveSellColor.setValue(e),this},n.prototype.getCancelButtonBackgroundColor=function(){return l.getColorFromProperties(this._line.properties().cancelButtonBackgroundColor,this._line.properties().cancelButtonBackgroundTransparency)},n.prototype.setCancelButtonBackgroundColor=function(e){return l.setColorToProperties(e,this._line.properties().cancelButtonBackgroundColor,this._line.properties().cancelButtonBackgroundTransparency),this},n.prototype.getCancelButtonIconColor=function(){var e=this._line.properties();return"buy"===this._direction?this._active?e.cancelButtonIconActiveBuyColor.value():e.cancelButtonIconInactiveBuyColor.value():this._active?e.cancelButtonIconActiveSellColor.value():e.cancelButtonIconInactiveSellColor.value()},n.prototype.setCancelButtonIconColor=function(e){return"buy"===this._direction?this._active?this.setCancelButtonIconActiveBuyColor(e):this.setCancelButtonIconInactiveBuyColor(e):this._active?this.setCancelButtonIconActiveSellColor(e):this.setCancelButtonIconInactiveSellColor(e),this},n.prototype.setCancelButtonIconActiveBuyColor=function(e){return this._line.properties().cancelButtonIconActiveBuyColor.setValue(e),this},n.prototype.setCancelButtonIconInactiveBuyColor=function(e){
return this._line.properties().cancelButtonIconInactiveBuyColor.setValue(e),this},n.prototype.setCancelButtonIconActiveSellColor=function(e){return this._line.properties().cancelButtonIconActiveSellColor.setValue(e),this},n.prototype.setCancelButtonIconInactiveSellColor=function(e){return this._line.properties().cancelButtonIconInactiveSellColor.setValue(e),this},n.prototype.block=function(){this._blocked=!0,this._line.updateAllViewsAndRedraw()},n.prototype.unblock=function(){this._blocked=!1,this._line.updateAllViewsAndRedraw()},n.prototype.isFunction=function(e){return"function"==typeof e},n.prototype.onCancel=function(e,t){return t?this.isFunction(t)&&(this._onCancelData=e,this._onCancelCallback=t):this.isFunction(e)&&(this._onCancelCallback=e),this},n.prototype.callOnCancel=function(){this.isFunction(this._onCancelCallback)&&this._onCancelCallback.call(this,this._onCancelData)},n.prototype.isOnCancelCallbackPresent=function(){return this.isFunction(this._onCancelCallback)},n.prototype.onModify=function(e,t){return t?this.isFunction(t)&&(this._onModifyData=e,this._onModifyCallback=t):this.isFunction(e)&&(this._onModifyCallback=e),this},n.prototype.callOnModify=function(){this.isFunction(this._onModifyCallback)&&this._onModifyCallback.call(this,this._onModifyData)},n.prototype.onMove=function(e,t){return t?this.isFunction(t)&&(this._onMoveData=e,this._onMoveCallback=t):this.isFunction(e)&&(this._onMoveCallback=e),this},n.prototype.callOnMove=function(){this.isFunction(this._onMoveCallback)&&this._onMoveCallback.call(this,this._onMoveData)},n.prototype.onContextMenu=function(e,t){return t?this.isFunction(t)&&(this._onContextMenuData=e,this._onContextMenuCallback=t):this.isFunction(e)&&(this._onContextMenuCallback=e),this},n.prototype.shouldShowContextMenu=function(){return this.isFunction(this._onContextMenuCallback)},n.prototype.callOnContextMenu=function(){if(this.isFunction(this._onContextMenuCallback))return this._onContextMenuCallback.call(this,this._onContextMenuData)},n.prototype.remove=function(){this._line._model.removeSource(this._line),delete this._line},n.prototype.shouldShowModifyOrder=function(){return!!this._onModifyCallback},inherit(r,s),r.prototype.zorder=function(){return d},r.prototype.setPoint=function(e,t,i){this._points[e]=t,this.normalizePoints()},r.prototype.addPoint=function(e,t){return this._points.push(e),this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),!0},r.prototype.title=function(){return"Order"},r.prototype.name=function(){return"Order"},r.prototype.endMoving=function(e){var t=this._startMovingPoint&&this._currentMovingPoint&&this._startMovingPoint.price!==this._currentMovingPoint.price;s.prototype.endMoving.call(this),!e&&t&&this._adapter.callOnMove()},r.prototype.createPriceAxisView=function(e){var t={pointIndex:e,backgroundPropertyGetter:this._adapter.getLineColor.bind(this._adapter)};return this._priceAxisView=new a(this,t),this._priceAxisView},r.prototype.paneViews=function(){
return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showOrders.value()?c.prototype.paneViews.call(this):null},r.prototype.priceAxisViews=function(t,i){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showOrders.value()?c.prototype.priceAxisViews.call(this,t,i):null},r.prototype.hasContextMenu=function(){return this._adapter.shouldShowContextMenu()},r.prototype.contextMenuItems=function(){return this._adapter.callOnContextMenu()},r.prototype.onlyYMoving=function(){return!0},r.prototype.movable=function(){return Boolean(this._adapter._onMoveCallback)},r.createProperties=function(e){var t=new u("linetoolorder",e,!1,!1);return r._configureProperties(t),t},r._configureProperties=function(e){s._configureProperties(e)},t.LineToolOrder=r}).call(this,i("Kxc7"))},BBCR:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path fill="none" fill-rule="evenodd" stroke="currentColor" stroke-linecap="square" d="M6.145 11.968L14 5.5l7.855 6.468a.3.3 0 0 1-.191.532H6.336a.3.3 0 0 1-.19-.532zm0 4.064L14 22.5l7.855-6.468a.3.3 0 0 0-.191-.532H6.336a.3.3 0 0 0-.19.532z"/></svg>'},BHQF:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetch=function(e,t){return arguments.length>2&&void 0!==arguments[2]&&arguments[2],window.fetch(e,t)},(0,i("uOxu").getLogger)("Fetch")},BOPY:function(e,t,i){"use strict";function n(e,t){this.source=e,this._rendererFactory=t}function o(e,t){this._barWidth=e.barWidth,this._plates=e.plates,this._tooltip=e.tooltip,this._model=t}function r(){this._layout=[],this._currentId=void 0,this.tooltipHovered=!1}var s=i("aO4+").Point,a=i("f6yo").pointInCircle,l=i("VdBB").HitTestResult,c=i("zDbI").CHART_FONT_FAMILY;n.prototype.update=function(){},n.prototype.renderer=function(e,t,i){return this._rendererFactory(this.source)},o.prototype.draw=function(e){e.save();for(var t=0;t<this._plates.length;t++)if(this._plates[t].highlightByAuthor){this._highlightByAuthor=!0;break}this._plates.forEach(this._drawItem.bind(this,e)),this._tooltip.draw(this._plates.map(function(e){return this._plateTransform(e)}.bind(this)),e),this._tooltip.endDraw(),e.restore()},o.prototype._drawItem=function(e,t){e.save(),this._highlightByAuthor&&!t.highlightByAuthor&&(e.globalAlpha=.4);var i=this._dotTransform(t);i.mine?this._drawTriangle(e,i):this._drawDot(e,i),e.restore()},o.prototype._commonTransform=function(e){var t=Math.max(1.4*e.minSize,this._barWidth+4),i={up:-1,down:1}[e.direction]*(e.yInverted?-1:1),n=i*(t*(e.order+.6)+.25*t),o=e.y+n,r=TradingView.clone(e.overridedTheme||this.themes[e.theme]);return r.dotBorderWidth=e.hovered||e.highlightByAuthor?4:2,{id:e.id,theme:r,themeName:e.theme,x:Math.round(e.x+1),y:Math.round(o),yInverted:e.yInverted,pinned:e.pinned,hovered:e.hovered}},o.prototype._dotTransform=function(e){var t=this._commonTransform(e);return t.radius=Math.max(e.minSize/2,.4*this._barWidth),t.label=e.label,t.labelFontColor=e.labelFontColor,
t.labelFontSize=Math.ceil(Math.max(10,Math.min(t.radius,20))),this._model.updateDotData(e,t)},o.prototype._plateTransform=function(e){var t=this._commonTransform(e);return this._model.updatePlateData(e,t)},o.THEMES=["green","red","neutral","yellow","blue"],o.prototype.themes={green:{border:"#78C143",background:"#8DDD54"},red:{border:"#CC4545",background:"#ED5A5A"},neutral:{border:"#EAC300",background:"#FFD400"},yellow:{border:"#EAC300",background:"#FFD400"},blue:{border:"#047ACE",background:"#0496FF"}},o.prototype._drawTriangle=function(e,t){var i,n,o,r;e.strokeStyle=t.theme.border,e.fillStyle=t.theme.background,e.lineWidth=t.theme.dotBorderWidth,i=t,n=t.radius,o=Math.cos(Math.PI/6)*n,r=Math.sin(Math.PI/6)*n,e.translate(i.x,i.y),"up"===t.direction!==t.yInverted&&e.rotate(Math.PI),t.public||(e.lineWidth/=2),e.beginPath(),e.moveTo(0,-n),e.lineTo(o,r),e.lineTo(-o,r),e.lineTo(0,-n),e.closePath(),e.stroke(),t.public&&e.fill()},o.prototype._drawDot=function(e,t){e.strokeStyle=t.theme.border,e.fillStyle=t.theme.background,e.lineWidth=t.theme.dotBorderWidth,e.beginPath(),e.arc(t.x,t.y,t.radius,0,2*Math.PI,!0),e.closePath(),e.stroke(),e.fill(),t.label&&t.radius>6&&(e.textAlign="center",e.textBaseline="middle",e.font="bold "+t.labelFontSize+"px "+c,e.fillStyle=t.labelFontColor,e.fillText(t.label,t.x,t.y))},o.prototype.hitTest=function(e){var t,i;for(i=this._plates.length-1;i>=0;--i)if(t=this._hitTestDot(this._plates[i],e))return t;return null},o.prototype._hitTestDot=function(e,t){var i=this._dotTransform(e),n=new s(i.x,i.y);return a(t,n,Math.max(i.radius,8))?new l(l.REGULAR,e):null},r.prototype._createLayout=function(){throw new Error("Child class must override this member")},r.prototype._updatePlate=function(e){throw new Error("Child class must override this member")},r.prototype._getContainer=function(e){return this._container&&this._context===e||(this._context=e,this._container=$(e.canvas).parent()),this._container},r.prototype._plateArrowSize=14,r.prototype.showPlate=function(e,t){var i,n,o,r,s,a,l,c;this._currentId===e.id&&this._layout&&0!==this._layout.length&&null!=this._layout[0].parentNode||(this._currentId=e.id,this._createLayout(),this._getContainer(t).append(this._layout),i=this,this._layout.hover(function(){i.tooltipHovered=!0,$(this).stop(!0).fadeTo(0,1)},function(){i.tooltipHovered=!1})),(n=Math.round(e.barWidth/2))>15&&(n=15),n<10&&(n=10),this._updatePlate(e),o=t.canvas.getBoundingClientRect(),r=e.x-this._layout.outerWidth()<this._plateArrowSize,s=o.width-e.x+Math.round(e.barWidth/2+n),r&&(s-=this._layout.outerWidth()+2*this._plateArrowSize),a=o.height,l=20,c=10,this._layout.toggleClass("right",r),this._layout.css({top:Math.min(Math.max(e.y,l),a-this._layout.outerHeight()-c),right:s,fontSize:n+"px",display:"block"})},r.prototype._removeLayout=function(){this.tooltipHovered||(this._layout.stop(!0),this._layout.remove())},r.prototype._toggleLayout=function(e){this._layout.toggle(e)},r.prototype.hide=function(e){this.tooltipHovered?this._layout.stop(!0).fadeTo(0,1):this._layout.fadeOut(400,function(){
$(this).remove(),e()})},r.prototype.setSource=function(e){this.source=e},t.BarsMarksContainerPaneView=n,t.BarsMarksContainerRenderer=o,t.BarMarkTooltip=r},Bt3k:function(e,t,i){"use strict";function n(e,t){this.tooltips={},this.tooltipFactory=e,this.source=t}function o(e,t){this.renderer=e,this._tooltip=t,this.visible=!1}n.prototype.findOrCreateTooltip=function(e){var t=this.tooltips[e.id];return null==t&&(e.hovered||e.pinned)&&(t=this._createTooltip(),this.tooltips[e.id]=t),t},n.prototype.showPlate=function(e,t){var i=this.findOrCreateTooltip(e);null!=i&&(i._drawPlate(e,t),i.plateData=e)},n.prototype.draw=function(e,t){this.hoveredId=null;for(var i=0;i<e.length;i++)e[i].hovered&&(this.hoveredId=e[i].id);e.forEach(function(e){this.showPlate(e,t)}.bind(this))},n.prototype.endDraw=function(){var e,t,i=this;for(e in this.tooltips)this.tooltips.hasOwnProperty(e)&&((t=this.tooltips[e]).toggleVisibility(),i.hoveredId&&t.plateData.id!==i.hoveredId&&!t.plateData.pinned&&(t.remove(),delete this.tooltips[e]))},n.prototype.removeAll=function(){var e;for(e in this.tooltips)this.tooltips.hasOwnProperty(e)&&this.tooltips[e].remove();this.tooltips={}},n.prototype.removeTooltip=function(e){delete this.tooltips[e]},n.prototype._createTooltip=function(){return new o(this,this.tooltipFactory())},o.prototype._drawPlate=function(e,t){var i=this;this.visible=!0,this._tooltip.setSource(this.renderer.source),this._tooltip.showPlate(e,t),e.hovered||e.pinned||this._tooltip.hide(function(){i.renderer.removeTooltip(e.id)})},o.prototype.remove=function(){this._tooltip._removeLayout()},o.prototype.toggleVisibility=function(){this._tooltip._toggleLayout(this.visible),this.visible=!1},t.TooltipRenderer=n},BxxN:function(e,t,i){"use strict";function n(e){return decodeURIComponent(e.replace(/\+/g," ")).replace(/<\/?[^>]+(>|$)/g,"")}function o(e){var t,i=/([^&=]+)=?([^&]*)/g,o={};if(!e)return o;for(t=i.exec(e);t;)o[n(t[1])]=n(t[2]),t=i.exec(e);return o}function r(e){if(0===location.search.length)return e;var t=o(window.location.search.substring(1));return a.forEach(function(i){void 0!==t[i]&&(e[i]=t[i])}),e}function s(e,t,i){var n,o;return void 0===e&&(e={}),void 0===t&&(t=""),void 0===i&&(i=!0),n="/chart/",e.chartId&&(n=""+n+e.chartId+"/",delete e.chartId),i&&(e=r(e)),o=function(e){var t,i=[];for(t in e)e.hasOwnProperty(t)&&null!=e[t]&&i.push({key:t,pair:encodeURIComponent(t)+"="+encodeURIComponent(e[t])});return i.sort(function(e,t){return e.key>t.key?1:e.key<t.key?-1:0}).map(function(e){return e.pair}).join("&")}(e),0===t.length&&0===o.length||(n=n+"?"+t+o),n}i.d(t,"a",function(){return s});var a=["mobileapp","mobileapp_new"]},CHw2:function(e,t,i){"use strict";function n(e,t){var i=t||n.createProperties();o.call(this,e,i),this._constructor="LineToolExtended"}var o=i("WPQD").LineToolTrendLine,r=i("Ocx9").DefaultProperty,s=window.t("Extended Line");inherit(n,o),n.prototype.title=function(){return s},n.prototype.name=function(){return"Extended Line"},n.createProperties=function(e){var t=new r("linetoolextended",e);return n._configureProperties(t),t},
n._configureProperties=function(e){o._configureProperties(e)},t.LineToolExtended=n},CJIV:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolHorzRay";var s=t||n.createProperties();this._priceAxisView=new r(this),o.call(this,e,s),i.e("lt-pane-views").then(function(e){var t=i("1oDZ").HorzRayPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("p1SQ").LineToolHorzLinePriceAxisView,s=i("tc+8"),a=i("Ocx9").DefaultProperty,l=i("hayr").propertyPages,c=window.t("Horizontal Ray");inherit(n,o),n.prototype.pointsCount=function(){return 1},n.prototype.title=function(){return c},n.prototype.name=function(){return"Horizontal Ray"},n.prototype.priceAxisViews=function(e,t){return this.isSourceHidden()?null:t===this.priceScale()&&this.properties().showPrice.value()&&this._model.paneForSource(this)===e?[this._priceAxisView]:null},n.prototype.updateAllViews=function(){o.prototype.updateAllViews.call(this),this._priceAxisView.update()},n.prototype.canHasAlert=function(){return!0},n.prototype._getAlertPlots=function(){var e=this._points[0],t={index:e.index+1,price:e.price};return[this._linePointsToAlertPlot([e,t],null,!1,!0)]},n.prototype.getStylesPropertyPage=function(){return l.LineToolHorzLineStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("e0H+").HorizontalRayDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.prototype.template=function(){var e=o.prototype.template.call(this);return e.text=this.properties().childs().text.value(),e},n.prototype._applyTemplateImpl=function(e){o.prototype._applyTemplateImpl.call(this,e),this.properties().childs().text.setValue(e.text)},n.createProperties=function(e){var t=new a("linetoolhorzray",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e),e.hasChild("text")||e.addChild("text",new s("")),e.addExclusion("text")},t.LineToolHorzRay=n},CLNU:function(e,t,i){(function(e){TradingView.cleanButAmpersand=function(e,t){var i=t?["&amp;"]:["&"];return TradingView.clean(e,t,i)},TradingView.strip_tags=function(e){return e&&e.replace?e.replace(/(<([^>]+)>)/gi,""):e},TradingView.encodeSpread=function(e){return encodeURIComponent(e)},TradingView.clean=function(e,t,i){var n,o,r,s=[["&","&amp;"],["<","&lt;"],[">","&gt;"],['"',"&quot;"],["'","&#039;"],["'","&#39;"]],a=e;if(!e||!e.replace)return a;for(n=0;n<s.length;n++)o=s[n][0],r=s[n][1],i&&i.indexOf&&-1!==i.indexOf(t?r:o)||(a=t?a.replace(new RegExp(r,"g"),o):a.replace(new RegExp(o,"g"),r));return a},e&&e.exports&&(e.exports={clean:TradingView.clean,cleanButAmpersand:TradingView.cleanButAmpersand,stripTags:TradingView.strip_tags})}).call(this,i("YuTi")(e))},CW80:function(e,t,i){"use strict";function n(e,t,i,n){return Object(d.assert)(Object(m.a)(e),"Unknown line tool: "+e),new(Object(d.ensureDefined)(f[e]))(t,i)}function o(e,t){
return Object(d.assert)(Object(m.a)(e),e+" should be name of the line tool"),Object(d.ensureDefined)(f[e]).createProperties(t)}function r(e,t,i,n,o){throw Object(d.assert)(Object(m.b)(e),e+" should be name of the study line tool"),new Error("Property creation is not implemented for study line tool "+e)}function s(e){return e instanceof _.LineDataSource}function a(e){return!1}function l(e){var t=null;return t}function c(e){var t,i;for(t in f)if(f[t]===e)return t;if(e===LineToolVbPFixed)return"LineToolVbPFixed";if(e===LineToolRegressionTrend)return"LineToolRegressionTrend";for(i in mtpredictorlinetoolset)if(mtpredictorlinetoolset[i]===e)return i;return Object(d.assert)(!1,"Trying to get classname of unknown line tool"),null}function u(e,t,i){var o,r,s,a,l,u,_=Object(d.ensureNotNull)(c(t.constructor)),f=t.properties().clone();return f.visible.setValue(!0),o=Object(d.ensureNotNull)(t.ownerSource()),(r=n(_,e,f)).setOwnerSource(o),s=t.fixedPoints(),(i?s.map(function(e){return e.add(new p.Point(20,20))}):s).forEach(function(e){return r.addFixedPoint(e)}),a=t.normalizedPoints(),l=i?function(e,t){var i=Object(d.ensureNotNull)(t.priceScale()),n=Object(d.ensureNotNull)(t.firstValue());return e.map(function(e){var t=e.price,o=i.priceToCoordinate(t,n)-40,r=i.coordinateToPrice(o,n);return Object(h.__assign)(Object(h.__assign)({},e),{price:r})})}(a,o):a,u=t.points(),r.restorePoints(l,u),r.cloneData&&r.cloneData(t),r.checkAlert&&r.checkAlert(),r}var h,d,p,_,f,m;i.r(t),i.d(t,"createLineTool",function(){return n}),i.d(t,"createLineToolProperties",function(){return o}),i.d(t,"createStudyLineToolProperties",function(){return r}),i.d(t,"isLineTool",function(){return s}),i.d(t,"isStudyLineTool",function(){return a}),i.d(t,"tryFindStudyLineToolNameByStudyId",function(){return l}),i.d(t,"lineToolClassName",function(){return c}),i.d(t,"cloneLineTool",function(){return u}),h=i("mrSG"),d=i("Eyy1"),p=i("aO4+"),_=i("Ss5c"),f=i("OH2X"),m=i("e92V"),i.d(t,"isLineToolName",function(){return m.a}),i.d(t,"isStudyLineToolName",function(){return m.b}),function(e){var t,i,n;for(t=0,i=Object.keys(e);t<i.length;t++)n=i[t],TradingView[n]=e[n]}(f)},CwKc: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"><path stroke-linecap="square" d="M11.5 21.5v-7m3 7v-5m3 5v-3m-9 3v-5"/><path d="M5.5 22v-3"/><path stroke-linecap="square" d="M5.5 13.5l4.297-4.297a2.406 2.406 0 0 1 3.406 0l2.594 2.594c.94.94 2.463.943 3.406 0L23.5 7.5M22.5 12.5v6m-3-3h6"/></g></svg>'},CxTi:function(e,t,i){e.exports={css_value_currency_label_top:"6","price-axis-currency-label-wrapper":"price-axis-currency-label-wrapper-opoVZ91E","price-axis-currency-label":"price-axis-currency-label-1aGvtcW9"}},DYI2: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 5)"><path d="M.964 9C3 5 6.679 1.5 11 1.5c4.32 0 8 3.5 10.036 7.5C19 13 15.32 16.5 11 16.5 6.679 16.5 3 13 .964 9z"/><circle cx="11" cy="9" r="3.5"/><path stroke-linecap="square" d="M2.5 17.5l17-17"/></g></svg>'},Daqx:function(e,t,i){"use strict";function n(e,t){var i="left"===e?o:r,n=t<i.length?i[t]:"";return new s(n)}var o,r,s;i.r(t),i.d(t,"PriceAxisNameInfo",function(){return s}),i.d(t,"getPriceAxisNameInfo",function(){return n}),o=["Z","Y","X","W","V","U","T","S"],r=["A","B","C","D","E","F","G","H"],s=function(){function e(e){this.label=e}return e.prototype.equals=function(e){return null!==e&&this.label===e.label},e}()},Dq3s:function(e){e.exports={}},E6p6:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"SessionStage",function(){return n}),function(e){e[e.PRE_SESSION=-1]="PRE_SESSION",e[e.POST_SESSION=-2]="POST_SESSION",e[e.LASTBAR_SESSION=-3]="LASTBAR_SESSION"}(n||(n={}))},EJcV:function(e,t,i){"use strict";(function(t){function n(e){var t=e.findIndex(function(e){return e.index!==c});return 0===t?e:e.slice(t)}function o(e,t){var i=new m.SessionInfo(t.timezone,t.session,t.holidays,t.corrections);return d.Symbol.newBarBuilder(e,i,i)}function r(e,t){null!=e.graphicsCmds&&null!=e.graphicsCmds.create&&null!=e.graphicsCmds.create.vertlines&&e.graphicsCmds.create.vertlines.forEach(function(e){e.data.forEach(t)})}function s(e,t){var i,n,o=e.length,r=t.length,s=0;for(i=0;i<o;++i){for(n=e[i];s<r&&t[s].value[0]<n;)++s;s>=r?e[i]=t[r-1].index:e[i]=t[s].index}}var a,l,c,u,h=i("rQHv"),d=i("ocLq"),p=i("8gnj"),_=i("Ofm5"),f=i("uXw/"),m=i("IiTo"),y=i("LxhU").Interval,g=i("FQhm"),v=i("TlGQ").visitObject,S=i("ogJP").isObject;i("2cgs"),i("MrEN"),a=i("WIS0").DatafeedRequestsCachedProcessor,l=i("+6ja").timezoneIsAvailable,c=-5e6,(u=function(e){var t=this;this._studiesCache={},this._sessionsLastDataCache={},this._metainfoCache=[],this._barsCoefficientsCache={},this._extrapolationManager=_,this._externalDatafeed=e,this._datafeedConfiguration=null,this._marketStatusWatchers={},this._resolveRequests={},this._callbacks={},this._serverTimeOffset=0,t._logMessage("Datafeed settings received: {0}".format(JSON.stringify(window.configurationData))),t._datafeedConfiguration=t._adoptConfigurationData(window.configurationData),t._fireEvent("configuration_received"),t._externalDatafeed.getServerTime&&t._externalDatafeed.getServerTime(function(e){t._serverTimeOffset=e-(new Date).valueOf()/1e3}),this._pointsetsManager=f,this._pointsetsManager.pointsetsCreated().subscribe(this,this._onPointsetsCreated),this._rangeExtensionData={},this._quotesInfo=[],this._depthInfo=[],this._fullNameSymbolInfoMap={},this._endOfData={},this._computeStudyCounter=0,this._cachedDatafeed=new a(e,u.createDWMAligner),this._extendedRange=function(e){return t._rangeExtensionData[e]&&t._rangeExtensionData[e].summary},this._extendedRangeForStudy=function(e){var i=t._rangeExtensionData[e]
;return i?(i.summary||0)+(i.realtimeBarsCount||0):0},this._extendedTime=function(e){return t._rangeExtensionData[e]&&t._rangeExtensionData[e].time},p.setupFeed({resolve:function(e,i,n){t._resolveSymbolByName(e,i,n)},subscribe:function(e,i,n,r,s){return t._cachedDatafeed.subscribe(e,i,n,function(e,i,n){return function(r){var s,a;r&&r.count()&&(s=o(i,e),a=1e3*t.getCurrentUTCTime(),s.moveTo(a),s.indexOfBar(a)>=0&&r.setLastBarClosed(!1)),n(r)}}(e,i,r),s)},unsubscribe:function(e){return t._cachedDatafeed.unsubscribe(e)},calculateHistoryDepth:this._externalDatafeed.calculateHistoryDepth?this._externalDatafeed.calculateHistoryDepth.bind(this._externalDatafeed):void 0})}).createDWMAligner=function(e,t,i,n,o){var r=new m.SessionInfo(t,i,n,o);return m.createDWMAligner(e,r)},u.prototype._barsCoefficients=function(e,t){if(void 0===p.parseSymbol(e).type)return{};var i=e+t;return this._barsCoefficientsCache[i]||(this._barsCoefficientsCache[i]={}),this._barsCoefficientsCache[i]},u.prototype.destroy=function(){this._cachedDatafeed.destroy(),this._externalDatafeed=null,this._pointsetsManager.pointsetsCreated().unsubscribeAll(this)},u.prototype.purgeCache=function(){this._endOfData={},this._resolveRequests={},this._sessionsLastDataCache={},this._studiesCache={}},u.prototype.purgeDataCache=function(){this._cachedDatafeed.purgeCache()},u.prototype._logMessage=function(e){t.enabled("charting_library_debug_mode")&&console.log(e)},u.prototype._extendRange=function(e,t){this._rangeExtensionData[e]||this.purgeRangeExtensionData(e),void 0===this._rangeExtensionData[e].summary&&(this._rangeExtensionData[e].summary=0),this._rangeExtensionData[e].summary+=t},u.prototype.on=function(e,t){return this._callbacks.hasOwnProperty(e)||(this._callbacks[e]=[]),this._callbacks[e].push(t),this},u.prototype._fireEvent=function(e,t,i){var n,o;if(this._callbacks.hasOwnProperty(e)){for(n=this._callbacks[e],o=0;o<n.length;++o)n[o](t);i||(this._callbacks[e]=[])}},u.prototype._adoptConfigurationData=function(e){var t,i,n,o=TradingView.merge({},e),r=o.supported_resolutions;if(!r||0===r.length)return o.supported_resolutions=void 0,o;for(t=[],i=0;i<r.length;i++){if(n=r[i],-1!==t.indexOf(n))throw new Error("Duplicating resolution `"+n+"`");t.push(n)}return o.supported_resolutions=t,o},u.prototype.supportedResolutions=function(){return this._datafeedConfiguration.supported_resolutions},u.prototype.supportedSymbolsTypes=function(){return this._datafeedConfiguration.symbols_types||[]},u.prototype.supportedExchangesList=function(){return this._datafeedConfiguration.exchanges||[]},u.prototype.futuresRegex=function(){return this._datafeedConfiguration.futures_regex||/$a/},u.prototype._findStudyObject=function(e){var t=e.split("@")[0],i=JSServer.studyLibrary.filter(function(i){return i.metainfo.id===e||i.metainfo.shortDescription===t});if(0===i.length)throw Error("Study `"+e+"` not found");return i[0]},u.prototype.getMarks=function(e,t,i,n,o){var r,s={red:6,green:5,blue:4,yellow:3}
;this._externalDatafeed.getMarks&&this._datafeedConfiguration.supports_marks&&(this._logMessage("Requesting bars marks: symbol {0}, resolution {1}, range [{2} ... {3}]".format(e.full_name,o,new Date(1e3*t).toUTCString(),new Date(1e3*i).toUTCString())),r=this,this._externalDatafeed.getMarks(e,t,i,function(t){var i,a,l=t.map(function(e){return e.time=parseInt(e.time),e});r._logMessage("Received bars marks: symbol {0}, resolution {1}, marks {2}".format(e.full_name,o,JSON.stringify(l))),i=u.createDWMAligner(o,e.timezone,e.session,e.holidays,e.corrections),a=l.map(function(e){return e.tickmark=null!==i?i.tradingDayToSessionStart(1e3*e.time)/1e3:e.time,e.direction=s[e.color],e.onClicked=function(){g.emit("onMarkClick",e.id)},e.label=!!e.label&&e.label[0],e}),n(a)},o))},u.prototype.getTimescaleMarks=function(e,t,i,n,o){if(this._externalDatafeed.getTimescaleMarks&&this._datafeedConfiguration.supports_timescale_marks){this._logMessage("Requesting timescale marks: symbol {0}, resolution {1}, range [{2} ... {3}]".format(e.full_name,o,new Date(1e3*t).toUTCString(),new Date(1e3*i).toUTCString()));var r=this;this._externalDatafeed.getTimescaleMarks(e,t,i,function(t){var i,s;r._logMessage("Received timescale marks: symbol {0}, resolution {1}, marks {2}".format(e.full_name,o,JSON.stringify(t))),i=u.createDWMAligner(o,e.timezone,e.session,e.holidays,e.corrections),s=t.map(function(e){return e.tickmark=null!==i?i.tradingDayToSessionStart(1e3*e.time)/1e3:e.time,e}),n(s)},o)}},u.prototype._computeStudy=function(e,t,i,n,o,r,s,a,l,u,h,p){function _(e,t,i){var n,o,r,s,l,h,d,p,_=e.time,m="number"==typeof t?[t]:t;for(n=0;n<m.length;++n)(o=m[n])&&"object"==typeof o&&(g["plot_"+n]=o.offset,o=o.value,v++),"number"==typeof o&&isNaN(o)&&(o=void 0),m[n]=o;(s=(r=y.length-1)<0||_>y[r].value[0])?y.push({index:(l=_,p=a(),l<p?c:0===(h=y.length)?0:(d=y[h-1].index)===c?0:d+1),value:[_].concat(m)}):y[r].value=[_].concat(m),f||u([y[y.length-1]],s,y.length,g,i)}var f=!0,m=this._computeStudyCounter++,y=[],g={},v=0,S=!1,b=this,w=function(a){var c,u=d.Symbol.parsePeriod(n);if(!u.isIntraday||a.has_intraday)try{if(c=new d.StudyEngine({tickerid:i,symbolInfo:a,period:n,body:t,sessionId:e,onErrorCallback:h,rangeExtension:s,input:function(e){return r[e]},out:function(e,t){_(e,t,a)},nonseriesOut:function(e,t){p(t,a)},setNoMoreData:function(){S=!0},recalc:function(e,i){f=!1,y.endOfData=S,t.error&&null!==t.error()||l(y,v>0?g:void 0,a,i)}}),!b._studiesCache[e]||!b._studiesCache[e][o])throw Error("This should never happen");b._studiesCache[e][o].engine=c}catch(e){if(!e.studyError)throw e;h(e.message)}else h("Unsupported resolution. Did you forget to set has_intraday to true?")},P=function(e){h(e)},C=function(){return b._studiesCache[e]&&b._studiesCache[e][o]&&b._studiesCache[e][o].activeResolve===m};b._studiesCache[e][o].activeResolve=m,this.resolveSymbol(i,function(){C()&&w.apply(b,arguments)},function(){C()&&P.apply(b,arguments)})},u.prototype._createStudy=function(e,t,i,o,a,l,c){function u(i,r,s){i=n(i),
TradingView.ChartapiMessagerInstances[o].onDataUpdate(a,l,p._convertBarsTimeToUnix(i),r,s,p._extendedRange(e,t)),TradingView.ChartapiMessagerInstances[o].onStudyCompleted(a,l)}var h,d,p=this;c=function(e){var t,i,n;if(Array.isArray(e))return e;for(t=[],i=p._studiesCache[o][a].metainfo.inputs,n=0;n<i.length;n++)t[n]=e[i[n].id];return t}(c),TradingView.ChartapiMessagerInstances[o].onStudyLoading(a,l),h=null,d=!1,p._computeStudy(o,i,e,t,a,c,{getRangeExtensionCount:p._extendedRangeForStudy.bind(this,o),getRangeExtensionTime:p._extendedTime.bind(this,o)},function(){if(null===h){var e=p._sessionsLastDataCache[o][0];if(void 0===e)return 1/0;h=e.value[0]}return h},function(e,t,i){d&&0===e.length||u(e,t?{data:{offsets:t}}:null,i)},function(i,r,s,c,u){i=n(i);var h=c?{data:{offsets:c}}:null;TradingView.ChartapiMessagerInstances[o].onDataUpdate(a,l,p._convertBarsTimeToUnix(i),h,u,p._extendedRange(e,t))},function(e){TradingView.ChartapiMessagerInstances[o].onStudyError(a,l,e)},function(e,t){var i;switch(d=!0,e.type){case"projection":this._updateProjectionData(o,a,l,e);break;case"study_graphics":(function(e,t){var i,n;null!==t&&0!==t.length&&(i={},r(e.data,function(e){i[e.time]=!0}),(n=Object.keys(i).map(Number).sort(function(e,t){return e-t})).forEach(function(e,t){i[e]=t}),r(e.data,function(e){e.index=i[e.time]}),s(n,t),e.indexes=n)})(i={data:e.data,indexes:[]},p._sessionsLastDataCache[o]),u([],i,t);break;case"non_series_data":(function(e,t){var i,n;null!==t&&0!==t.length&&(i={},v(e,function(e){S(e)&&Object.keys(e).forEach(function(t){t.endsWith("__t")&&(i[e[t]]=!0)})},{visitInstances:!0}),(n=Object.keys(i).map(Number).sort(function(e,t){return e-t})).forEach(function(e,t){i[e]=t}),Object.assign(e,v(e,function(e){return S(e)&&Object.keys(e).forEach(function(t){t.endsWith("__t")&&(e[t.slice(0,-3)]=i[e[t]])}),e},{visitInstances:!0})),s(n,t),e.indexes=n)})(i={data:e.data,indexes:[]},p._sessionsLastDataCache[o]),u([],i,t);break;default:console.warn("unsupported non-series data type for study "+e.type)}}.bind(this))},u.prototype.stopSources=function(e){var t,i;for(t in this._studiesCache[e])(i=this._studiesCache[e][t])&&(i.engine&&i.engine.stop(),i.activeResolve=-1);p.unsubscribeUnused()},u.prototype.recreateSources=function(e,t,i,n){var o,r;for(o in this.stopSources(i),this._studiesCache[i])(r=this._studiesCache[i][o])&&(r.symbol=e,r.resolution=t,"series"===r.type&&this.createSeries(e,t,i,o,r.turnaround,n));for(o in this._studiesCache[i])(r=this._studiesCache[i][o])&&"study"===r.type&&this._createStudy(e,t,r.studyObject,i,o,r.turnaround,r.inputs)},u.prototype.removeStudy=function(e,t){this._studiesCache[e]&&this._studiesCache[e][t]&&this._studiesCache[e][t].engine&&(this._studiesCache[e][t].engine.stop(),p.unsubscribeUnused()),this._studiesCache[e][t]=null},u.prototype.removeSeries=function(e,t){this.removeStudy(e,t)},u.prototype.recomputeStudy=function(e,t,i,n){var o=this._studiesCache[i][e];if(!o)throw Error("This should never happen");o.inputs=t,o.turnaround=n,o.engine&&o.engine.stop(),
this._createStudy(o.symbol,o.resolution,o.studyObject,i,e,n,t)},u.prototype._convertBarsTimeToUnix=function(e){var t,i,n=[];for(t=0;t<e.length;++t)(i={index:e[t].index,value:[].concat(e[t].value)}).value[0]/=1e3,n.push(i);return n.endOfData=e.endOfData,n},u.prototype.createStudy=function(e,t,i,n,o,r,s){var a=this._findStudyObject(r),l=new a.constructor;this._studiesCache[i]=this._studiesCache[i]||{},this._studiesCache[i][n]={studyObject:l,symbol:e,resolution:t,guid:n,type:"study",inputs:s,metainfo:a.metainfo,turnaround:o},this._createStudy(e,t,l,i,n,o,s)},u.prototype.purgeRangeExtensionData=function(e){e?this._rangeExtensionData[e]={summary:0,realtimeBarsCount:0}:this._rangeExtensionData={}},u.prototype.ensureExtendedTo=function(e,t,i){var n,o,r=this._studiesCache[t][e];if(!r)throw Error("This should never happen");void 0!==(n=this._extendedTime(t))&&n<=i||(this.purgeRangeExtensionData(t),this._rangeExtensionData[t]||(this._rangeExtensionData[t]={}),this._rangeExtensionData[t].time=i,o=this,setTimeout(function(){o.recreateSources(r.symbol,r.resolution,t,!0)},0))},u.prototype.extendSeriesRange=function(e,t,i){var n,o=this._studiesCache[t][e];if(!o)throw Error("This should never happen");if(this._isEndOfData(t,e,o.turnaround))return n=o.engine.runner.host.symbolInfo.data_status,void setTimeout(function(){TradingView.ChartapiMessagerInstances[t].onSeriesCompleted(e,o.turnaround,n)},0);this._requestMoreData(e,t,i+10)},u.prototype._requestMoreData=function(e,t,i){var n,o,r,s=this._studiesCache[t][e];if(!s)throw Error("This should never happen");o=(n=this._barsCoefficients(s.symbol,s.resolution)).barsCoefficient||1,this._extendRange(t,i*o),n.barsCoefficient||(n.expectedBarsCount=this._extendedRange(t)),r=this,setTimeout(function(){r.recreateSources(s.symbol,s.resolution,t,!0)},0)},u.prototype._updateProjectionData=function(e,t,i,n){var o=n.barsetSize?this._convertBarsTimeToUnix([{index:n.barsetSize-1,exTime:n.lastBar?n.lastBar[0]/1e3:0,value:n.lastBar}]):null;TradingView.ChartapiMessagerInstances[e].onProjectionUpdate(t,i,n,o)},u.prototype.updateSeriesTurnaround=function(e,t,i){this._studiesCache[e]||(this._studiesCache[e]={}),this._studiesCache[e][t]||(this._studiesCache[e][t]={}),this._studiesCache[e][t].type="series",this._studiesCache[e][t].turnaround=i},u.prototype.seriesTurnaround=function(e,t){return this._studiesCache[e]&&this._studiesCache[e][t]&&this._studiesCache[e][t].turnaround},u.prototype.createSeries=function(e,i,n,o,r,s){function a(e,t,o){l._extrapolationManager.storage(n,e.full_name,i).setLastBarTime(t,o)}var l,c=e,u=new d.OHLCV;this._studiesCache[n]=this._studiesCache[n]||{},this._sessionsLastDataCache[n]=null,this._studiesCache[n][o]={symbol:e,resolution:i,studyObject:u,guid:o,type:"series",turnaround:r,symbolInfo:null},TradingView.ChartapiMessagerInstances[n].onSeriesLoading(o,r),l=this,this._computeStudy(n,u,c,i,o,[],{getRangeExtensionCount:l._extendedRange.bind(this,n),getRangeExtensionTime:l._extendedTime.bind(this,n)},function(){return-1/0},function(t,c,u,h){var d,p,_,f,m,y=l._studiesCache[n][o]
;if(!y)throw Error("This should never happen");l._sessionsLastDataCache[n]=t,y.symbolInfo=u,p=(d=l._convertBarsTimeToUnix(t)).length>0?1e3*d[0].value[0]:void 0,h.nextTime&&(!p||h.nextTime<p/1e3)?l.ensureExtendedTo(o,n,h.nextTime):h.endOfData||0!==d.length?(0!==d.length&&((_=l._barsCoefficients(e,i)).expectedBarsCount&&_.barsCount&&(_.barsCoefficient=Math.min(Math.max(_.barsCoefficient||1,parseInt(_.expectedBarsCount/(d.length-_.barsCount)+.5)),100)),_.barsCount=d.length,f=d[d.length-1],a(u,d.length-1,1e3*f.value[0]),l.rebuildExtrapolatedData(n,e.name,i,u,1e3*f.value[0]),s&&TradingView.ChartapiMessagerInstances[n].onSeriesClearData(o,r),TradingView.ChartapiMessagerInstances[n].onTimescaleUpdate(o,r,d,u,0),m=l._extrapolationManager.storage(n,u.full_name,i),Promise.resolve().then(function(){l._pointsetsManager.broadcastPointsetsUpdates(u.full_name,i,t,m,u,function(e,t){TradingView.ChartapiMessagerInstances[n].onPointsetDataUpdate(e,r,t,u)})})),h.endOfData&&(l._logMessage("Series has no more data on server: {0}".format(u.full_name)),l._setEndOfData(n,o,r)),0===d.length&&TradingView.ChartapiMessagerInstances[n].onSeriesClearData(o,r),TradingView.ChartapiMessagerInstances[n].onSeriesCompleted(o,r,u.data_status)):l._requestMoreData(o,n,100)},function(e,t,s,c,u){var h,d=l._convertBarsTimeToUnix(e),p=d[d.length-1];if(t){if(l._rangeExtensionData[n]||l.purgeRangeExtensionData(n),void 0===l._rangeExtensionData[n].realtimeBarsCount&&(l._rangeExtensionData[n].realtimeBarsCount=0),l._rangeExtensionData[n].realtimeBarsCount+=1,!l._studiesCache[n][o])throw Error("This should never happen");h=s-1,l._logMessage("New bar arrived: symbol {0}, bar {1}".format(u.full_name,JSON.stringify(p))),TradingView.ChartapiMessagerInstances[n].onTimescaleUpdate(o,r,[p],u,h),a(u,h,1e3*p.value[0]),l.rebuildExtrapolatedData(n,u.full_name,i,u,1e3*p.value[0])}else l._logMessage("Last bar update: symbol {0}, bar {1}".format(u.full_name,JSON.stringify(p))),TradingView.ChartapiMessagerInstances[n].onDataUpdate(o,r,d,null,u);l._fireEvent("realtime_tick",e[e.length-1],!0)},function(e){l._logMessage("Series error: {0}".format(e)),TradingView.ChartapiMessagerInstances[n].onSeriesError(o,e),t.enabled("clear_bars_on_series_error")&&TradingView.ChartapiMessagerInstances[n].onSeriesClearData(o,r)},function(e,t){var s,c,u,h,d,p,_;if("projection"!==e.type)throw new Error("unexpected non-series data type for series "+e.type);if(s=e.projectionTime/1e3,c=-1,(e.data||[]).forEach(function(e){c=Math.max(c,e[0]||0)}),c=Math.min(c,100),u=e.barsetSize,s&&c>=0&&u&&e.lastBar){for(h=[],d=0;d<=c;d++)h.push(s+.001*d);(p=e.lastBar.slice(0))[0]=p[0]/1e3,TradingView.ChartapiMessagerInstances[n].onTimescaleUpdate(o,r,[{index:u-1,value:p}],t,u-1,h),a(t,u+c,_=1e3*Math.trunc(h[c])),l.rebuildExtrapolatedData(n,t.full_name,i,t,_)}l._updateProjectionData(n,o,r,e)})},u.prototype.onMoreTickmarksRequested=function(e,t,i,n,o){this._extrapolationManager.storage(e,i.full_name,n).onTickmarksNeeded(i,o)},u.prototype.removePointset=function(e){this._pointsetsManager.removePointset(e)},
u.prototype.rebuildExtrapolatedData=function(e,t,i,n,o){this._extrapolationManager.storage(e,n.full_name,i).rebuild(o,n)},u.prototype.createPointset=function(e,t,i,n,o,r){var s=this._extrapolationManager.storage(e,n.full_name,o);this._pointsetsManager.createPointset(t,i,r,s,n,e)},u.prototype.studiesMetadata=function(){return 0===this._metainfoCache.length&&(this._metainfoCache=JSServer.studyLibrary.map(function(e){return e.metainfo}),this._metainfoCache.push({palettes:{},inputs:[],plots:[{id:"open",type:"line"},{id:"high",type:"line"},{id:"low",type:"line"},{id:"close",type:"line"},{id:"volume",type:"line"}],graphics:{},_metainfoVersion:48,description:"Unnamed Study",format:{type:"inherit"},is_hidden_study:!0,is_price_study:!1,shortDescription:"Unnamed Study",description_localized:"Unnamed Study",id:"BarSetHeikenAshi@tv-prostudies",shortId:"BarSetHeikenAshi",packageId:"tv-basicstudies",version:"13",fullId:"BarSetHeikenAshi@tv-basicstudies-13",productId:"tv-basicstudies",name:"BarSetHeikenAshi@tv-basicstudies"})),this._metainfoCache},u.prototype.searchSymbols=function(e,t,i,n){this._logMessage("Symbol search requested: search string `{0}`, exchange: `{1}`, type `{2}`".format(e,t,i));var o=this;this._externalDatafeed.searchSymbols(e,t,i,function(e){o._logMessage("Symbol search response: {0}".format(JSON.stringify(e))),n(e)})},u.prototype.resolveSymbol=function(e,t,i){p.isSymbolEncoded(e)||console.error("Expect to get symbol encoded string, but got the following instead: "+e);var n=p.parseSymbol(e).symbol;this._resolveSymbolByName(n,t,i)},u.prototype._resolveSymbolByName=function(e,t,i){var n;this._resolveRequests[e]?n=this._resolveRequests[e]:(n=this._resolveSymbolInternal(e),this._resolveRequests[e]=n),n.then(t).catch(i)},u.prototype._resolveSymbolInternal=function(e){var i=this;return new Promise(function(n,o){this._logMessage("Symbol resolve requested: `{0}` ".format(e));var r=!0;this._externalDatafeed.resolveSymbol(e,function(o){r&&console.warn("`resolveSymbol` should return result asynchronously. Use `setTimeout` with 0 interval to execute the callback function."),i._logMessage("Symbol resolved: `{0}`, SymbolInfo in server response {1}".format(e,JSON.stringify(o))),function(e){var t,i;if(e.base_name||(e.base_name=[e.name]),e.legs||(e.legs=[e.name]),e.exchange||(e.exchange=e["exchange-listed"]),e.full_name||(e.full_name=e.symbol||(e.exchange?e.exchange+":"+e.name:e.name)),e.pro_name||(e.pro_name=e.full_name),e.data_status||(e.data_status="streaming"),e.ticker||(e.ticker=e.symbol||e.name),!e.session&&e["session-regular"]&&(e.session=e["session-regular"]),!e.minmov&&e.minmovement&&(e.minmov=e.minmovement),e.supported_resolutions)for(t=0;t<e.supported_resolutions.length;t++)(i=y.parse(e.supported_resolutions[t])).isValid()&&(e.supported_resolutions[t]=i.value())}(o),function(e){function i(e){console.warn("SymbolInfo validation: "+e)}var n,o
;if(e.has_empty_bars&&t.enabled("disable_resolution_rebuild")&&i('both has_empty_bars field and featureset "disable_resolution_rebuild" are enabled and may cause data issues (see #3329)'),(void 0===e.minmov||e.minmov<=0)&&i("minmov must be positive"),(void 0===e.pricescale||e.pricescale<=0)&&i("pricescale must be positive"),void 0!==e.name&&0!==e.name.length||i("name must be non-empty string"),void 0!==e.session&&0!==e.session.length||i("session must be non-empty string"),void 0===e.timezone||0===e.timezone.length?i("timezone must be non-empty string"):"exchange"!==e.timezone&&l(e.timezone)||"UTC"!==e.timezone&&i('unsupported timezone "{0}"'.format(e.timezone)),void 0!==e.intraday_multipliers)if(n=e.intraday_multipliers,Array.isArray(n))for(o=0;o<n.length;++o)"string"!=typeof n[o]&&i('intraday_multipliers[{0}] = "{1}" must be string (now: {2})'.format(o+1,n[o],typeof n[o]));else i("intraday_multipliers must be array");(e.supported_resolutions||[]).filter(function(e){return!y.isValid(e)}).forEach(function(e){i("supported_resolutions field contains invalid value: "+e)})}(o),i._logMessage("Symbol info after post-processing: `{0}`, SymbolInfo {1}".format(e,JSON.stringify(o))),i._fullNameSymbolInfoMap[o.full_name]=o,n(o)},function(t){i._logMessage("Symbol resolve failed: `{0}`, reason: `{1}`".format(e,t)),o(t)}),r=!1}.bind(this))},u.prototype._createMarketStatusWatchers=function(e,t){void 0===this._marketStatusWatchers[e]&&(this._marketStatusWatchers[e]={});var i=this;t.forEach(function(t){void 0===i._marketStatusWatchers[e][t]&&(i._marketStatusWatchers[e][t]=new h(i._resolveSymbolByName.bind(i),e,t))})},u.prototype._removeMarketStatusWatchers=function(e){var t=this;Object.keys(this._marketStatusWatchers[e]||{}).forEach(function(i){t._marketStatusWatchers[e][i].stop()}),this._marketStatusWatchers[e]={}},u.prototype._stopQuotesSubscription=function(e){this._quotesInfo[e].listenerGUID&&(this._externalDatafeed.unsubscribeQuotes(this._quotesInfo[e].listenerGUID),this._quotesInfo[e].listenerGUID=void 0),this._removeMarketStatusWatchers(e)},u.prototype._startQuotesSubscription=function(e){function i(t,i){var n=r._marketStatusWatchers[e][t.n];t.symbolname=t.n,t.status=t.s,t.values=t.v,t.values.change=t.v.ch,t.values.last_price=t.v.lp,t.values.change_percent=t.v.chp,t.values.current_session=t.v.cs||n&&n.marketStatus(),t.values.pricescale=i.pricescale,t.values.minmov=i.minmov,t.values.minmove2=i.minmove2||0,t.values.fractional=i.fractional||!1,n&&t.v.cs&&n.stop(),TradingView.ChartapiMessagerInstances[e].onQuotesData([e].concat([t]))}function n(e){e.forEach(function(e){void 0!==o[e.n]?null!==o[e.n]&&i(e,o[e.n]):r._resolveSymbolByName(e.n,function(t){o[e.n]=t,i(e,t)},function(){o[e.n]=null})})}var o={},r=this,s=this._quotesInfo[e].symbols;0!==s.length&&(this._externalDatafeed.getQuotes&&!t.enabled("charting_library")?this._externalDatafeed.getQuotes(s,function(t){r._quotesInfo[e]&&(n(t),r._quotesInfo[e].listenerGUID=e,r._externalDatafeed.subscribeQuotes(s,r._quotesInfo[e].fastSymbols,n,r._quotesInfo[e].listenerGUID))
},function(e){}):!this._externalDatafeed.getQuotes&&t.enabled("trading_terminal")&&setTimeout(function(){n(s.map(function(e){return{n:e,s:"ok",v:{}}}))}),this._createMarketStatusWatchers(e,s))},u.prototype._restartQuotesSubscription=function(e){this._stopQuotesSubscription(e),this._startQuotesSubscription(e)},u.prototype.quoteCreateSession=function(e){this._quotesInfo[e]={symbols:[],fastSymbols:[],listenerGUID:void 0}},u.prototype.quoteDeleteSession=function(e){this._stopQuotesSubscription(e),this._quotesInfo[e]=null},u.prototype.quoteSetFields=function(e,t){},u.prototype.quoteAddSymbols=function(e,t){this._quotesInfo[e].symbols=this._filteredSymbols(this._quotesInfo[e].symbols.concat(t)),this._restartQuotesSubscription(e)},u.prototype.quoteRemoveSymbols=function(e,t){this._quotesInfo[e].symbols=this._quotesInfo[e].symbols.filter(function(e){return t.indexOf(e)<0}),this._restartQuotesSubscription(e)},u.prototype.quoteFastSymbols=function(e,t){this._quotesInfo[e].fastSymbols=this._filteredSymbols(t),this._restartQuotesSubscription(e)},u.prototype.quoteHibernateAll=function(e){},u.prototype._stopDepthSubscription=function(e){this._depthInfo[e].listenerGUID&&(this._externalDatafeed.unsubscribeDepth(this._depthInfo[e].listenerGUID),this._depthInfo[e].listenerGUID=void 0)},u.prototype._startDepthSubscription=function(e){function t(e){return e.map(function(e){return{p:e.price,v:e.volume}})}function i(e){var i={};return i.s=o,i.bids=t(e.bids),i.asks=t(e.asks),i}var n=this,o=this._depthInfo[e].symbol;o&&this._externalDatafeed.subscribeDepth&&(n._depthInfo[e].listenerGUID=this._externalDatafeed.subscribeDepth(o,function(t){var o;n._depthInfo[e]&&((o=t).snapshot?TradingView.ChartapiMessagerInstances[e].onDepthData([e].concat([i(o)])):TradingView.ChartapiMessagerInstances[e].onDepthUpdate([e].concat([i(o)])))}))},u.prototype._restartDepthSubscription=function(e){this._stopDepthSubscription(e),this._startDepthSubscription(e)},u.prototype.depthCreateSession=function(e){this._depthInfo[e]={symbol:null,listenerGUID:void 0}},u.prototype.depthDeleteSession=function(e){this._depthInfo[e].symbol=null,this._stopDepthSubscription(e),delete this._depthInfo[e]},u.prototype.depthSetSymbol=function(e,t){this._depthInfo[e].symbol=t,this._restartDepthSubscription(e)},u.prototype._filteredSymbols=function(e){var t=[];return e.forEach(function(e){e instanceof Object||t.indexOf(e)<0&&t.push(e)}),t},u.prototype._isEndOfData=function(e,t,i){var n=e+"!"+t+"@"+i;return!!this._endOfData[n]},u.prototype._setEndOfData=function(e,t,i){var n=e+"!"+t+"@"+i;this._endOfData[n]=!0},u.prototype.alignTimePoint=function(e,i,n){return t.enabled("disable_resolution_rebuild")?e:o(i,n).alignTimeIfPossible(1e3*e)/1e3},u.prototype.serverTimeOffset=function(){return this._serverTimeOffset},u.prototype.getCurrentUTCTime=function(){return(new Date).valueOf()/1e3+this._serverTimeOffset},u.prototype._onPointsetsCreated=function(e){var t,i,n,o=e.session,r=e.symbolInfo,s=this._studiesCache[o],a=this._sessionsLastDataCache[o]
;if(null!=s&&null!=a)for(t in s)if("series"===(i=s[t]).type&&null!==i.symbolInfo&&i.symbolInfo.full_name===r.full_name)return n=this._extrapolationManager.storage(o,r.full_name,i.resolution),void this._pointsetsManager.broadcastPointsetsUpdates(r.full_name,i.resolution,a,n,r,function(e,t){TradingView.ChartapiMessagerInstances[o].onPointsetDataUpdate(e,null,t,r)})},e.exports=u}).call(this,i("Kxc7"))},EKrn:function(e,t,i){"use strict";function n(e){this.items=e.items,this.barSpacing=e.barSpacing,this.histogramBase=e.histogramBase,this.lineColor=e.lineColor,this.lineWidth=e.lineWidth}var o=i("aO4+").Point,r=i("GEp6").distanceToSegment,s=i("Zp/P").selectionTolerance,a=i("VdBB").HitTestResult;n.prototype.draw=function(e){var t,i,n,o,r;for(e.translate(.5,.5),e.fillStyle=this.lineColor,t=this.lineWidth,i=0;i<this.items.length;++i)o=(n=this.items[i]).x,r=n.y,n.style&&(e.fillStyle=n.style.color,t=n.style.width),e.fillRect(Math.round(o-.5*t),r,t,this.histogramBase-r)},n.prototype.hitTest=function(e){var t,i,n,l,c=s(this.lineWidth);for(l=0;l<this.items.length;++l)if(i=(t=this.items[l]).x,n=t.y,r(new o(i,n),new o(i,this.histogramBase),new o(e.x,e.y)).distance<=c)return new a(a.REGULAR);return null},t.PaneRendererHistogram=TradingView.PaneRendererHistogram=n},ESp1:function(e,t,i){"use strict";var n,o;i.r(t),i.d(t,"HeikenAshi",function(){return o}),n=i("ocLq"),o=function(){function e(){}return e.prototype.main=function(e){var t,i,o,r,s=e.new_var(n.Std.open(e)),a=e.new_var(n.Std.close(e)),l=s.get(1),c=a.get(1),u=n.Std.ohlc4(e),h=n.Std.na(s.get(1))?(n.Std.open(e)+n.Std.close(e))/2:(l+c)/2;return s.set(h),a.set(u),t=n.Std.max(n.Std.high(e),n.Std.max(h,u)),i=n.Std.min(n.Std.low(e),n.Std.min(h,u)),o=n.Std.volume(e),[(r=e.symbol).time,h,t,i,u,o,r.updatetime,r.isBarClosed]},e}()},EX27:function(e,t,i){"use strict";function n(e,t,i){if(e[t])if(void 0!==i)e[t][i]&&(clearTimeout(e[t][i]),delete e[t][i]);else{for(var o in e[t])e[t].hasOwnProperty(o)&&n(e,t,o);delete e[t]}}function o(e,t,i,o){n(e,t,i),e[t]||(e[t]={}),e[t][i]=o}var r=i("XPit").TimePointIndexSearchMode,s=i("IiTo"),a=i("ocLq"),l=i("EJcV"),c=i("MrEN"),u=i("XzZr"),h=u.ChartApiInterface,d=u.HandlerInfo,p=i("ogJP").requireFullInterfaceImplementation,_=i("uOxu").getLogger("Chart.ChartApiLocal");TradingView.STUDY_COUNT_LIMIT=210,JSServer.ChartApi=function(e){this._notificationHandlers={},this._sessions={},this.studyCounter=0,this._seriesTimers={},this._studyTimers={},this._connected=!1,this._enabled=!1,this._studyEngine=new l(e),this._callbacks={},this._symbolIdCache={},this._seriesIdCache={},this._recentSeriesId={},this._enableLogging=!1,this._enabledMoreBarsRequest=!0,this._serverTimeOffset=0;var t=this;this._studyEngine.on("configuration_received",function(){t._fireEvent("configuration_received")}),this._studyEngine.on("realtime_tick",function(e){var i={time:e.value[0]/1e3,open:e.value[1],high:e.value[2],low:e.value[3],close:e.value[4],volume:e.value[5]};t._fireEvent("realtime_tick",i,!0)}),this._setVisibleRangeTimeout={}},JSServer.ChartApi.prototype._makeSymbolKey=function(e,t){
if(!e||!t)throw Error("incorrect identifiers");return e+"_"+t},JSServer.ChartApi.prototype._makeSeriesKey=function(e,t){if(!e||!t)throw Error("incorrect identifiers");return e+"_"+t},JSServer.ChartApi.prototype.destroy=function(){this._studyEngine.destroy(),this._studyEngine=null},JSServer.ChartApi.prototype.purgeCache=function(e){this._studyEngine.purgeCache(),this._studyEngine.purgeRangeExtensionData(),this._studyEngine.purgeDataCache(),this._symbolIdCache={},this._seriesIdCache={},this._recentSeriesId={}},JSServer.ChartApi.prototype.setAdditionalBarsRequestEnabled=function(e){this._enabledMoreBarsRequest=e},JSServer.ChartApi.prototype.defaultWatchlistSymbols=function(){return this._watchlistSettings.default_symbols},JSServer.ChartApi.prototype.defaultResolutions=function(){return this._studyEngine.supportedResolutions()||["1","3","5","15","30","45","60","120","180","240","1D","1W","1M"]},JSServer.ChartApi.prototype.supportedSymbolsTypes=function(){return this._studyEngine.supportedSymbolsTypes()},JSServer.ChartApi.prototype.supportedExchangesList=function(){return this._studyEngine.supportedExchangesList()},JSServer.ChartApi.prototype.futuresRegex=function(){return this._studyEngine.futuresRegex()},JSServer.ChartApi.prototype.start=function(){this._enabled=!0,this._fireEvent("start_enabled")},JSServer.ChartApi.prototype._logMessage=function(e){this._enableLogging&&console.log(e)},JSServer.ChartApi.prototype.unsubscribe=function(e,t){var i=this._callbacks[e];i&&i.splice(i.indexOf(t),1)},JSServer.ChartApi.prototype.on=function(e,t){return this._callbacks.hasOwnProperty(e)||(this._callbacks[e]=[]),this._callbacks[e].push(t),this},JSServer.ChartApi.prototype._fireEvent=function(e,t,i){var n,o;if(this._callbacks.hasOwnProperty(e))for(n=this._callbacks[e].slice(0),i||(this._callbacks[e]=[]),o=0;o<n.length;++o)n[o](t)},JSServer.ChartApi.prototype.chartCreateSession=function(e,t){},JSServer.ChartApi.prototype.chartDeleteSession=function(e){},JSServer.ChartApi.prototype.createSession=function(e,t){TradingView.ChartapiMessagerInstances[e]=new c(this,e),this._sessions[e]=t,this._notificationHandlers[e]={},this.connected()&&t.onMessage({method:"connected",params:[]})},JSServer.ChartApi.prototype.removeSession=function(e){delete this._sessions[e],delete this._notificationHandlers[e],this._studyEngine.stopSources(e),n(this._seriesTimers,e),n(this._studyTimers,e)},JSServer.ChartApi.prototype.connected=function(){return this._connected},JSServer.ChartApi.prototype.connect=function(){if(this._enabled)this.connected()||(this._connected=!0,this.sessionid="dummy session id",this._notifySessions({method:"connected",params:[]}));else{var e=this;this.on("start_enabled",function(){e.connect()})}},JSServer.ChartApi.prototype.disconnect=function(){this._connected=!1,this._notifySessions({method:"disconnected",params:[]}),this.purgeCache(),this.studyCounter=0},JSServer.ChartApi.prototype.switchTimezone=function(e,t){if(TradingView.ChartapiMessagerInstances[e].timezone()!==t&&(TradingView.ChartapiMessagerInstances[e].setTimezone(t),
this._recentSeriesId[e])){var i=this;this._doWhenSeriesSymbolIdIsReady(e,this._recentSeriesId[e],function(t){var n=i._seriesIdCache[i._makeSeriesKey(e,i._recentSeriesId[e])].resolution;i._studyEngine.recreateSources(t.name,n,e,!0),i._doWhenSeriesDataReceived(e,function(){var n=i._seriesIdCache[i._makeSeriesKey(e,i._recentSeriesId[e])].resolution,o=TradingView.ChartapiMessagerInstances[e].lastBarTime(i._recentSeriesId[e]);o&&i._studyEngine.rebuildExtrapolatedData(e,t.name,n,t.info,1e3*o)})})}},JSServer.ChartApi.prototype.receiveLocalResponse=function(e){this._logMessage("< "+e.method),this._dispathNotification(e),this._fireEvent("message_"+e.method,void 0,!0)},JSServer.ChartApi.prototype.getMarks=function(e,t,i,n,o){this._studyEngine.getMarks(e,t,i,n,o)},JSServer.ChartApi.prototype.getTimescaleMarks=function(e,t,i,n,o){this._studyEngine.getTimescaleMarks(e,t,i,n,o)},JSServer.ChartApi.prototype.resolveSymbol=function(e,t,i,n,o){function r(t,n){Object.keys(s._seriesIdCache).some(function(e){return s._seriesIdCache[e].symbolId===t})&&TradingView.ChartapiMessagerInstances[e].onSeriesClearData(0,""),TradingView.ChartapiMessagerInstances[e].onSymbolError(t,n),s._symbolIdCache[s._makeSymbolKey(e,t)]={name:i,status:"invalid_symbol"},s._fireEvent("resolve_fail",{session:e,symbolId:t},!0),s._fireEvent(s._makeSymbolKey(e,t)+"_resolve_fail")}this._notificationHandlers[e][t]=new d(n,t),this._symbolIdCache[this._makeSymbolKey(e,t)]=null;var s=this;this._studyEngine.resolveSymbol(i,function(n){n.errmsg?r(t,n.errmsg):(s._symbolIdCache[s._makeSymbolKey(e,t)]={name:i,info:n,status:"ok"},s._fireEvent("symbol_resolved",{symbolInfo:n,symbolId:t,session:e},!0),s._fireEvent(s._makeSymbolKey(e,t)+"_resolved",n),TradingView.ChartapiMessagerInstances[e].onSymbolResolved(t,n))},function(e){r(t,e)})},JSServer.ChartApi.prototype._doWhenSymbolIdIsReady=function(e,t,i){function n(){r&&(i({name:o._symbolIdCache[o._makeSymbolKey(e,t)].name,info:o._symbolIdCache[o._makeSymbolKey(e,t)].info}),r=!1,o.unsubscribe(o._makeSymbolKey(e,t)+"_resolved",n),o.unsubscribe(o._makeSymbolKey(e,t)+"_resolve_fail",n))}var o=this,r=!0;this._symbolIdCache[this._makeSymbolKey(e,t)]?n():(this.on(this._makeSymbolKey(e,t)+"_resolved",n),this.on(this._makeSymbolKey(e,t)+"_resolve_fail",n))},JSServer.ChartApi.prototype._doWhenSeriesDataReceived=function(e,t){TradingView.ChartapiMessagerInstances[e].seriesCompleted.subscribe(null,t,!0)},JSServer.ChartApi.prototype._doWhenSeriesSymbolIdIsReady=function(e,t,i,n){function o(){var t;i({name:(t=l._symbolIdCache[l._makeSymbolKey(e,c)]).name,info:t.info})}function r(){l.unsubscribe("symbol_resolved",a),l.unsubscribe("resolve_fail",s)}function s(t){t.symbolId===c&&t.session===e&&(r(),n&&n())}function a(t){t.symbolId===c&&t.session===e&&(r(),o())}var l=this,c=this._seriesIdCache[e+"_"+t].symbolId;this._symbolIdCache[this._makeSymbolKey(e,c)]?o():(this.on("symbol_resolved",a),this.on("resolve_fail",s))},JSServer.ChartApi.prototype.createSeries=function(e,t,i,n,o,r,s){i=i||"";var l=this;this._notificationHandlers[e][t]=new d(function(r){
if("series_completed"===r.method){var c=a.Symbol.parsePeriod(o);c.range&&l._applyRange(e,n,t,i,c.range)}s(r)},t),this._recentSeriesId[e]=t,TradingView.ChartapiMessagerInstances[e].setResolution(a.Symbol.parsePeriod(o).pureResolution),this._seriesIdCache[e+"_"+t]={symbolId:n,resolution:o,turnaround:i},this._studyEngine.updateSeriesTurnaround(e,t,i),this._doWhenSeriesSymbolIdIsReady(e,t,function(n){l._studyEngine.seriesTurnaround(e,t)===i&&l._studyEngine.createSeries(n.name,o,e,t,i)})},JSServer.ChartApi.prototype.removeSeries=function(e,t,i){this._notificationHandlers[e][t]=new d(i,t),this._studyEngine.removeSeries(e,t),n(this._seriesTimers,e,t)},JSServer.ChartApi.prototype.setVisibleTimeRange=function(e,t,i,n,o,s){function a(){var a,l,c,u,h=e.data(),d=h.plotValueToTimePointIndex(i,TradingView.TIME_PLOT,r.FromLeft),p=h.plotValueToTimePointIndex(n,TradingView.TIME_PLOT,r.FromRight);d>p||(a=0,(l=h.valueAt(p)[TradingView.TIME_PLOT])<n&&e.syncModel()&&(c=e.syncModel().distance(l,n)).success&&(p+=a=c.result),u=h.last().value[TradingView.TIME_PLOT],!o||l===u&&0===a||(o.applyDefaultRightMargin=!1,o.percentRightMargin=0),TradingView.ChartapiMessagerInstances[t].onSeriesTimeframeUpdate(f,m,d,p,o),e.requestMoreData(),s&&s())}function l(e,t){e===f&&t===m&&(u.unsubscribe(null,l),h.unsubscribe(null,c),a())}function c(e,t){e===f&&t===m&&u.unsubscribe(null,l)}var u,h,d=e.data(),p=d.bars().first(),_=null!==p&&p.value[0]<=i,f=this._recentSeriesId[t],m=this._seriesIdCache[t+"_"+f].turnaround;_?a():(u=TradingView.ChartapiMessagerInstances[t].seriesCompleted,h=TradingView.ChartapiMessagerInstances[t].seriesError,void 0!==this._setVisibleRangeTimeout[t]&&clearTimeout(this._setVisibleRangeTimeout[t]),this._setVisibleRangeTimeout[t]=setTimeout(function(){delete this._setVisibleRangeTimeout[t],u.subscribe(null,l,!0),h.subscribe(null,c,!0),this._studyEngine.ensureExtendedTo(f,t,i)}.bind(this),0))},JSServer.ChartApi.prototype._applyRange=function(e,t,i,n,o){var r,a,l,c=TradingView.ChartapiMessagerInstances[e].lastBarTime(i);c&&(r=this._symbolIdCache[this._makeSymbolKey(e,t)].info,a=s.alignPeriodsBack(r.session,r.holidays,r.corrections,o.resolution,o.interval,1,1e3*c),l=chartWidget.model().mainSeries(),this.setVisibleTimeRange(l,e,a/1e3,c,{applyDefaultRightMargin:!0}))},JSServer.ChartApi.prototype.modifySeries=function(e,t,i,n,o,r,s){var l,c;i=i||"",l=this._seriesIdCache[e+"_"+t]?this._seriesIdCache[e+"_"+t].resolution:void 0,TradingView.ChartapiMessagerInstances[e].setResolution(a.Symbol.parsePeriod(o).pureResolution),c=this,this._notificationHandlers[e][t]=new d(function(s){var u,h;"series_completed"===s.method&&(u=a.Symbol.parsePeriod(l),(h=a.Symbol.parsePeriod(o)).range&&u.range!==h.range&&c._applyRange(e,n,t,i,h.range)),r(s)},t),this._recentSeriesId[e]=t,this._studyEngine.updateSeriesTurnaround(e,t,i),s&&(this._seriesIdCache[this._makeSeriesKey(e,s)]=null),this._seriesIdCache[this._makeSymbolKey(e,t)]={symbolId:n,resolution:o,turnaround:i},this._doWhenSeriesSymbolIdIsReady(e,t,function(t){c._studyEngine.purgeRangeExtensionData(e),
c._studyEngine.recreateSources(t.name,o,e,!0)})},JSServer.ChartApi.prototype.requestMoreData=function(e,t,i,n){var r,s;this._enabledMoreBarsRequest&&(r=this,s=setTimeout(function(){r._notificationHandlers[e][t]=new d(n,t),r._studyEngine.extendSeriesRange(t,e,i)},0),o(this._seriesTimers,e,t,s))},JSServer.ChartApi.prototype.setStudiesAccessController=function(e){this.studiesAccessController=e},JSServer.ChartApi.prototype.setWatchlistSettings=function(e){this._watchlistSettings=e},JSServer.ChartApi.prototype.allStudiesMetadata=function(){return this._studyEngine.studiesMetadata()},JSServer.ChartApi.prototype.requestMetadata=function(e,t,i){this._notificationHandlers[e][t]=new d(i,t);var n=this.studiesAccessController.getEnabledTools();TradingView.ChartapiMessagerInstances[e].onRequestMetadata(t,n)},JSServer.ChartApi.prototype.isCanCreateStudy=function(){return this.studyCounter<TradingView.STUDY_COUNT_LIMIT},JSServer.ChartApi.prototype.createStudy=function(e,t,i,n,o,r,s){var a,l,c;if(!this.isCanCreateStudy())throw Error("Exceeded the limit of studies");a=this,i=i||"",this._notificationHandlers[e][t]=new d(s,t),l=this._seriesIdCache[this._makeSeriesKey(e,n)].symbolId,c=this._seriesIdCache[this._makeSeriesKey(e,n)].resolution,this._doWhenSymbolIdIsReady(e,l,function(n){a._studyEngine.createStudy(n.name,c,e,t,i,o,r),a.studyCounter++})},JSServer.ChartApi.prototype.rebindStudy=function(e,t,i,n,o,r,s,a){throw new Error("Not implemented")},JSServer.ChartApi.prototype.removeStudy=function(e,t){this._notificationHandlers[e][t]=null,this._studyEngine.removeStudy(e,t),this.studyCounter--,n(this._studyTimers,e,t)},JSServer.ChartApi.prototype.modifyStudy=function(e,t,i,n,r){var s=this,a=setTimeout(function(){i=i||"",s._notificationHandlers[e][t]=new d(r,t),s._studyEngine.recomputeStudy(t,n,e,i)},0);o(this._studyTimers,e,t,a)},JSServer.ChartApi.prototype.createPointset=function(e,t,i,n,o,r,s){i=i||"",this._notificationHandlers[e][t]=new d(s,t);var a=this;this._doWhenSymbolIdIsReady(e,n,function(i){a._studyEngine.createPointset(e,t,i.info.full_name,i.info,o,r)})},JSServer.ChartApi.prototype.modifyPointset=function(e,t,i,n,o){throw Error("This call is not implemented")},JSServer.ChartApi.prototype.removePointset=function(e,t,i){this._notificationHandlers[e][t]=null,this._studyEngine.removePointset(t)},JSServer.ChartApi.prototype.requestMoreTickmarks=function(e,t,i,n){this._notificationHandlers[e][t]=new d(n,t);var o=this;this._doWhenSeriesSymbolIdIsReady(e,t,function(n){var r=o._seriesIdCache[o._makeSeriesKey(e,t)].resolution;o._studyEngine.onMoreTickmarksRequested(e,n.name,n.info,r,i)})},JSServer.ChartApi.prototype.requestFirstBarTime=function(e,t,i,n){this._notificationHandlers[e][t]=new d(n,t)},JSServer.ChartApi.prototype._invokeHandler=function(e,t){e&&e(t)},JSServer.ChartApi.prototype._sendRequest=function(e,t){throw Error("This method is not implemented")},JSServer.ChartApi.prototype._onMessage=function(e){throw Error("This method is not implemented")},JSServer.ChartApi.prototype._convertTimescaleResponse=function(e){
var t,i=e.marks;for(t=0;t<i.length;++t)i[t]={span:i[t][0],time:i[t][1],index:i[t][2]};return e},JSServer.ChartApi.prototype._dispathNotification=function(e){var t,i,n,o,r,s,a,l,c,u,h=e.params.shift();if(this._notificationHandlers[h])switch(e.method){case"timescale_update":for(o in t=e.params[0],i=e.params[1],(n=this._convertTimescaleResponse(i)).clear=0===i.changes.length&&0===i.marks.length,this._sessions[h].onMessage({method:"timescale_update",params:n}),t)(r={}).customId=o,r.plots=t[o].series,t[o].ns&&(r.nonseries=t[o].ns),r.turnaround=t[o].turnaround,s={method:"data_update",params:r},this._invokeNotificationHandler(h,o,s);break;case"tickmark_update":(n=this._convertTimescaleResponse(e.params[0])).changes=[],this._sessions[h].onMessage({method:"timescale_update",params:n});break;case"data_update":for(o in e.params[0]){a=e.params[0][o],(r={}).customId=o,r.plots=a.series?a.series:a.plots,r.turnaround=a.turnaround,"s"in a&&"ns"in a&&(r.plots=a.s,r.nonseries=a.ns);for(l=0;l<r.plots.length;l++)for(c in r.plots[l].value)1e100===r.plots[l].value[c]&&(r.plots[l].value[c]=void 0);s={method:"data_update",params:r},this._invokeNotificationHandler(h,o,s)}break;case"index_update":for(o in e.params[0])s={method:"index_update",params:e.params[0][o]},this._invokeNotificationHandler(h,o,s);break;case"critical_error":_.logNormal(new Date+" critical_error session:"+this.sessionid+" reason:"+e.params[0]),this._sessions[h].onMessage({method:"critical_error",params:e.params});break;case"quote_symbol_data":case"quote_list_fields":case"depth_symbol_error":case"depth_symbol_success":case"dd":case"dpu":case"depth_bar_last_value":this._sessions[h].onMessage({method:e.method,params:e.params});break;default:u=e.params[0],this._invokeNotificationHandler(h,u,e)}},JSServer.ChartApi.prototype._invokeNotificationHandler=function(e,t,i){if(void 0!==t){var n=this._notificationHandlers[e][t];void 0!==n&&n&&this._invokeHandler(n.handler,i),"series_deleted"!==i.method&&"study_deleted"!==i.method||delete this._notificationHandlers[e][t]}},JSServer.ChartApi.prototype.searchSymbols=function(e,t,i,n,o,r,s,a,l,c){0===e.length&&0===t.length&&0===i.length&&c([]),this._studyEngine.searchSymbols(e,t,i,c)},JSServer.ChartApi.prototype._notifySessions=function(e){var t,i;for(t in this._sessions){if(!this._sessions.hasOwnProperty(t))return;"function"==typeof(i=this._sessions[t]).onMessage&&i.onMessage(e)}},JSServer.ChartApi.prototype.unpack=function(e){throw Error("This method is not implemented")},JSServer.ChartApi.prototype.quoteCreateSession=function(e){return this._studyEngine.quoteCreateSession(e)},JSServer.ChartApi.prototype.quoteDeleteSession=function(e){return this._studyEngine.quoteDeleteSession(e)},JSServer.ChartApi.prototype.quoteSetFields=function(e,t){return this._studyEngine.quoteSetFields(e,t)},JSServer.ChartApi.prototype.quoteAddSymbols=function(e,t){return-1!==t.indexOf(void 0)&&(console.warn("Got undefined in quoteAddSymbols"),t=t.filter(function(e){return!!e})),this._studyEngine.quoteAddSymbols(e,t)},
JSServer.ChartApi.prototype.quoteRemoveSymbols=function(e,t){return this._studyEngine.quoteRemoveSymbols(e,t)},JSServer.ChartApi.prototype.quoteFastSymbols=function(e,t){return this._studyEngine.quoteFastSymbols(e,t)},JSServer.ChartApi.prototype.quoteHibernateAll=function(e){return this._studyEngine.quoteHibernateAll(e)},JSServer.ChartApi.prototype.depthCreateSession=function(e){return this._studyEngine.depthCreateSession(e)},JSServer.ChartApi.prototype.depthDeleteSession=function(e){return this._studyEngine.depthDeleteSession(e)},JSServer.ChartApi.prototype.depthSetSymbol=function(e,t){return this._studyEngine.depthSetSymbol(e,t)},JSServer.ChartApi.prototype.depthClearSymbol=function(e){},JSServer.ChartApi.prototype.depthSetScale=function(e,t){},JSServer.ChartApi.prototype.createStudiesAccessController=function(e,t,i){return new this.StudiesAccessController(this._studyEngine,e&&JSON.parse(e)||{type:"black",tools:[]})},JSServer.ChartApi.prototype.StudiesAccessController=function(e,t){this._studyEngine=e,this._studiesAccess=t},JSServer.ChartApi.prototype.StudiesAccessController.prototype._findTool=function(e){var t,i,n=null;for(t=0;t<this._studiesAccess.tools.length;++t)if((i=this._studiesAccess.tools[t]).name===e||i===e){n=i;break}return n},JSServer.ChartApi.prototype.StudiesAccessController.prototype.getEnabledTools=function(){return this._studyEngine.studiesMetadata().filter(function(e){return this.isToolEnabled(e.description)||e.is_hidden_study},this)},JSServer.ChartApi.prototype.StudiesAccessController.prototype.isToolEnabled=function(e){var t=this._findTool(e);return"black"===this._studiesAccess.type?!t||t.grayed:!!t},JSServer.ChartApi.prototype.StudiesAccessController.prototype.isToolGrayed=function(e){var t=this._findTool(e);return t&&t.grayed},JSServer.ChartApi.prototype.serverTimeOffset=function(){return this._studyEngine.serverTimeOffset()},JSServer.ChartApi.prototype.alignTimePoint=function(e,t,i){return this._studyEngine.alignTimePoint(e,t,i)},JSServer.ChartApi.prototype.disconnectCount=function(){return 0},p(JSServer.ChartApi,"JSServer.ChartApi",h,"ChartApiInterface"),e.exports=JSServer.ChartApi},Ecpn:function(e,t,i){"use strict";function n(e){return e in o}i.d(t,"a",function(){return n});var o={PivotPointsStandard:!0}},EqoR:function(e,t,i){"use strict";function n(e,t){var i=t||n.createProperties();r.call(this,e,i),this._constructor="LineToolInsidePitchfork"}var o=i("5rJj"),r=i("aDyP").LineToolPitchfork,s=window.t("Inside Pitchfork");inherit(n,r),n.prototype.title=function(){return s},n.prototype.name=function(){return"Inside Pitchfork"},n.createProperties=function(e){var t=new o("linetoolinsidepitchfork",e,!1,{range:[0,8]});return n._configureProperties(t),t},n._configureProperties=function(e){r._configureProperties(e)},t.LineToolInsidePitchfork=n},Ery9:function(e,t,i){"use strict";function n(e){I=e}function o(e,t,i,n){L=e,M=t,A=i,k=n}function r(e){M=e}function s(e,t){throw new Error("Not implemented")}function a(e,t){void 0===t&&(t=function(){});var i=function(t){e(t.map(function(e){return{id:e.id,
name:e.name,image_url:String(e.id),modified_iso:e.timestamp,short_symbol:e.symbol,interval:e.resolution}}))};if(!I)return $.ajax({url:"{0}/{1}/charts?client={2}&user={3}".format(A,encodeURIComponent(k),encodeURIComponent(L),encodeURIComponent(M)),type:"GET",crossDomain:!0}).done(function(e){var n=Object(C.parseJSONorNot)(e);if("ok"!==n.status)return x.logWarn("Charts list request failed: "+n.message),void t();i(n.data)}).fail(t);I.getAllCharts().then(i).catch(t)}function l(e,t){I?I.removeChart(e).then(t):$.ajax({url:"{0}/{1}/charts?client={2}&user={3}&chart={4}".format(A,encodeURIComponent(k),encodeURIComponent(L),encodeURIComponent(M),encodeURIComponent(e)),type:"DELETE",crossDomain:!0}).done(function(e){var i=Object(C.parseJSONorNot)(e);"ok"!==i.status&&x.logWarn("Chart delete request failed: "+i.message),t()})}function c(e,t,i,n,o,r,s){var a,l=o.id.value(),c={name:e,content:JSON.stringify(n),symbol:t,resolution:i};I?I.saveChart(Object(w.__assign)(Object(w.__assign)({},c),{id:l})).then(r).catch(s):(a="{0}/{1}/charts?client={2}&user={3}".format(A,encodeURIComponent(k),encodeURIComponent(L),encodeURIComponent(M)),void 0!==l&&null!==l&&(a+="&chart="+encodeURIComponent(l)),$.ajax({url:a,data:c,type:"POST",crossDomain:!0}).done(function(e){var t=Object(C.parseJSONorNot)(e);if("ok"!==t.status)return x.logWarn("Chart save request failed: "+t.message),void s();r(t.id)}).fail(function(){s()}))}function u(e,t,i){var n=function(t){var i=JSON.parse(t);return i.uid=e.id,i};I?I.getChartContent(e.id).then(function(e){var i=n(e);t(i)}).catch(i):$.ajax({url:"{0}/{1}/charts?client={2}&user={3}&chart={4}".format(A,encodeURIComponent(k),encodeURIComponent(L),encodeURIComponent(M),encodeURIComponent(e.id)),type:"GET",crossDomain:!0}).done(function(e){var i,o=Object(C.parseJSONorNot)(e);"ok"===o.status?(i=n(o.data.content),t(i)):x.logWarn("Chart load request failed: "+o.message)}).fail(function(){i&&i()})}function h(e){u(e,function(e){P.emit("chart_load_requested",e)},function(){x.logWarn("Error loading chart")})}function d(e,t){I?I.removeStudyTemplate({name:e}).then(t):$.ajax({url:"{0}/{1}/study_templates?client={2}&user={3}&template={4}".format(A,encodeURIComponent(k),encodeURIComponent(L),encodeURIComponent(M),encodeURIComponent(e)),type:"DELETE",crossDomain:!0}).done(function(e){var i=Object(C.parseJSONorNot)(e);"ok"!==i.status&&x.logWarn("Chart delete request failed: "+i.message),t()})}function p(e,t){I?I.getStudyTemplateContent({name:e}).then(function(e){t({content:e})}):$.ajax({url:"{0}/{1}/study_templates?client={2}&user={3}&template={4}".format(A,encodeURIComponent(k),encodeURIComponent(L),encodeURIComponent(M),encodeURIComponent(e)),type:"GET",crossDomain:!0}).done(function(e){t(Object(C.parseJSONorNot)(e).data)})}function _(e,t){var i={name:e.name,content:e.content};I?I.saveStudyTemplate(i).then(t.bind(null,{error:""})).catch(function(e){var i=null!=e?e.toString():"error";t({error:i})}):$.ajax({url:"{0}/{1}/study_templates?client={2}&user={3}".format(A,encodeURIComponent(k),encodeURIComponent(L),encodeURIComponent(M)),
type:"POST",crossDomain:!0,data:i}).done(function(e){var i=Object(C.parseJSONorNot)(e);"ok"!==i.status&&x.logWarn("Template save request failed: "+i.message),t({error:"ok"===i.status?"":i.status})})}function f(e){if(E)e(E);else{E=[];var t=function(t){E=t.map(function(e){return{is_default:!1,name:e.name}}),e(E)};I?I.getAllStudyTemplates().then(t):$.ajax({url:"{0}/{1}/study_templates?client={2}&user={3}".format(A,encodeURIComponent(k),encodeURIComponent(L),encodeURIComponent(M)),type:"GET",crossDomain:!0}).done(function(e){if(null!==E){var i=Object(C.parseJSONorNot)(e);"ok"===i.status?t(i.data):x.logWarn("Templates list request failed: "+i.message)}})}}function m(){E=null}function y(e,t){throw new Error("Not implemented")}function g(e,t){throw new Error("Not implemented")}function v(e,t){throw new Error("Not implemented")}function S(e,t,i){throw new Error("Not implemented")}function b(e,t,i){throw new Error("Not implemented")}var w,P,C,T,x,I,L,M,A,k,E;i.r(t),i.d(t,"setCustomAdapter",function(){return n}),i.d(t,"initialize",function(){return o}),i.d(t,"updateUser",function(){return r}),i.d(t,"getChartsCount",function(){return s}),i.d(t,"getCharts",function(){return a}),i.d(t,"removeChart",function(){return l}),i.d(t,"saveChart",function(){return c}),i.d(t,"getChartContent",function(){return u}),i.d(t,"loadChart",function(){return h}),i.d(t,"removeStudyTemplate",function(){return d}),i.d(t,"getStudyTemplateContent",function(){return p}),i.d(t,"saveStudyTemplate",function(){return _}),i.d(t,"getStudyTemplatesList",function(){return f}),i.d(t,"invalidateStudyTemplatesList",function(){return m}),i.d(t,"getStudyTemplateContentById",function(){return y}),i.d(t,"getStandardStudyTemplateContentById",function(){return g}),i.d(t,"removeStudyTemplateById",function(){return v}),i.d(t,"renameStudyTemplate",function(){return S}),i.d(t,"replaceStudyTemplate",function(){return b}),w=i("mrSG"),P=i("FQhm"),C=i("ogJP"),T=i("uOxu"),x=Object(T.getLogger)("Chart.SaveloadAdapter.Library"),I=null,E=null},EsvI:function(e,t,i){"use strict";function n(e){return Object(A.fetch)("/theme/?themeName="+encodeURIComponent(e),{credentials:"include",method:"GET"}).then(function(e){return e.json()}).then(function(e){var t={};return e.content&&(t.content=JSON.parse(e.content)),t})}function o(){var e;return(e={})[N.Light]=JSON.parse(JSON.stringify(V)),e[N.Dark]=JSON.parse(JSON.stringify(B)),e}function r(){return[N.Light,N.Dark]}function s(e){return o()[e]}function a(e,t){var i=e.content===t.content;return function(e,t){void 0===e&&(e={});try{!function e(t,i,n){var o,r;for(o in t)if(t.hasOwnProperty(o))if(r=i.concat(o),"object"==typeof t[o])e(t[o],r,n);else if(n(r,t[o]))throw new Error("exit")}(e,[],t)}catch(e){return}}(e.content,function(e,n){var o=function(e,t){void 0===t&&(t={});for(var i=t,n=0;n<e.length;n++){if(!i||"object"!=typeof i)return;i=i[e[n]]}if("string"==typeof i||"number"==typeof i)return i;return}(e,t.content);return!(i=function(e,t){if("string"==typeof e&&"string"==typeof t)try{
return Object(D.areEqualRgb)(Object(D.parseRgb)(e),Object(D.parseRgb)(t))}catch(i){return e===t}return e===t}(n,o))}),i}function l(e,t){var i=U.a[e];if(!i)throw new Error("No such color "+e);return i}function c(e){return!e.isPrivate}function u(){return H[W.watchedTheme.value()]||H[Y]}function h(e){return u().getThemedColor(e)}function d(e,t,i,n,o,r,s){void 0===o&&(o=!0),void 0===r&&(r=!1),void 0===s&&(s=!1);var a=t?Promise.resolve(S(e)):m(e);return a.then(function(a){if(void 0!==a.content){var l=!t;s&&(void 0!==(c=a.content).chartProperties&&Object(L.applyDefaultsOverrides)(c.chartProperties),void 0!==c.mainSourceProperties&&Object(L.applyDefaultsOverrides)(c.mainSourceProperties,void 0,!0,"mainSeriesProperties")),n.applyTheme(a.content,l,i,e,t,o,r)}var c}),a}function p(){Object(W.setTheme)(Object(M.getValue)(G)||Y)}function _(){return Object(M.getValue)(G)||null}function f(){Object(M.setValue)(G,u().name,{forceFlush:!0})}function m(e){return n(e)}function y(){return O||Object(A.fetch)("/themes/",{credentials:"include",method:"GET"}).then(function(e){return O=e.json()})}function g(){return r()}function v(e){return g().includes(e)}function S(e){return s(e)||{content:void 0}}function b(e,t){var i=t||u().name,n=s(i),o=0!==e.length&&e.split(".");return n&&n.content&&o?o.reduce(function(e,t){return e[t]},n.content):null}function w(e,t){return function(e,t){var i=new FormData;return i.append("content",JSON.stringify(t)),i.append("name",e),O=null,Object(A.fetch)("/save-theme/",{credentials:"include",method:"POST",body:i}).then(function(e){return e.json()},function(e){return E.logError(e)})}(e,t)}function P(e){return function(e){var t=new FormData;return t.append("name",e),O=null,Object(A.fetch)("/remove-theme/",{credentials:"include",method:"POST",body:t}).then(function(e){return e.json()},function(e){return E.logError(e)})}(e)}function C(e){return function(e){return n(e).then(function(e){return Boolean(e.content)})}(e)}function T(e){return function(e){return F[e]||e}(e)}function x(e){return function(e){var t=o();return r().some(function(i){return a(t[i],e)})}(e)}function I(e){return{content:{chartProperties:{paneProperties:e.model().properties().paneProperties.state(),scalesProperties:e.model().properties().scalesProperties.state()},sessions:e.model().sessions().properties().state(),mainSourceProperties:e.model().mainSeries().properties().state()}}}var L,M,A,k,E,O,D,V,B,R,N,F,W,j,U,z,H,Y,G;i.r(t),i("bSeV"),i("YFKU"),L=i("wZIs"),M=i("Vdly"),A=i("BHQF"),k=i("uOxu"),E=Object(k.getLogger)("Themes.Provider"),O=null,D=i("eJTA"),V=i("/McG"),B=i("8pII"),function(e){e.Light="light",e.Dark="dark"}(N||(N={})),(R={})[N.Light]=window.t("Light",{context:"colorThemeName"}),R[N.Dark]=window.t("Dark",{context:"colorThemeName"}),R.Black=window.t("Black",{context:"colorThemeName"}),R.Blue=window.t("Blue",{context:"colorThemeName"}),R.Grey=window.t("Grey",{context:"colorThemeName"}),R.White=window.t("White",{context:"colorThemeName"}),F=R,W=i("oiZD"),j=i("AVbJ"),U=i("6Kf3"),i.d(t,"themes",function(){return H}),
i.d(t,"DEFAULT_THEME",function(){return Y}),i.d(t,"isPublicTheme",function(){return c}),i.d(t,"getCurrentTheme",function(){return u}),i.d(t,"getThemedColor",function(){return h}),i.d(t,"loadTheme",function(){return d}),i.d(t,"restoreTheme",function(){return p}),i.d(t,"savedThemeName",function(){return _}),i.d(t,"syncTheme",function(){return f}),i.d(t,"getTheme",function(){return m}),i.d(t,"getThemeNames",function(){return y}),i.d(t,"getStdThemeNames",function(){return g}),i.d(t,"isStdThemeName",function(){return v}),i.d(t,"getStdTheme",function(){return S}),i.d(t,"getStdThemedValue",function(){return b}),i.d(t,"saveTheme",function(){return w}),i.d(t,"removeTheme",function(){return P}),i.d(t,"isThemeExist",function(){return C}),i.d(t,"translateStdThemeName",function(){return T}),i.d(t,"isStdTheme",function(){return x}),i.d(t,"extractThemeFromModel",function(){return I}),(z={})[N.Light]={name:N.Light,label:window.t("Light",{context:"colorThemeName"}),order:2,getThemedColor:function(e){return l(e)}},z[N.Dark]={name:N.Dark,label:window.t("Dark",{context:"colorThemeName"}),order:1,getThemedColor:function(e){return l(j[e]||e)}},H=z,Y="light",G="current_theme.name"},EyEd:function(e,t,i){"use strict";function n(e){this._studyId=e,this._maxToVers=o.ZERO,this._maxFromVers=o.ZERO,this._migrs=[]}var o=i("lCO3").Version,r=i("uOxu").getLogger("Chart.StudyMigration");n.prototype.addMigration=function(e,t,i){var n=o.parse(e),r=o.parse(t);n.isGreater(this._maxFromVers)&&(this._maxFromVers=n),r.isGreater(this._maxToVers)&&(this._maxToVers=r),this._migrs.push({fromVers:n,toVers:r,rules:i})},n.prototype.updateInputs=function(e,t,i){var n,o,s;if(!i)return i;for(n=TradingView.clone(i),o=e;o.isLess(t)&&null!=(s=this._findMigration(o));){if(r.logNormal("Migrating study inputs from "+s.fromVers+" to "+s.toVers+" version, studyId: "+this._studyId+", migration: "+JSON.stringify(s)+", inputs: "+JSON.stringify(i)),n=this._applyMigration(n,s),!o.isLess(s.toVers))throw new Error("Problems in study migration process... Possible infinite cycle has been detected and stopped.");o=s.toVers}return o>e&&r.logNormal("Study inputs migration is done, studyId: "+this._studyId+", inputs: "+JSON.stringify(n)),n},n.prototype._findMigration=function(e){var t,i,n=-1,o=this._maxFromVers;for(t=0;t<this._migrs.length;t++)(i=this._migrs[t]).fromVers.isLess(e)||i.fromVers.isLessOrEqual(o)&&(o=i.fromVers,n=t);return n<0?null:this._migrs[n]},n.prototype._applyMigration=function(e,t){var i,n,o=e;for(i=0;i<t.rules.length;i++)n=t.rules[i],o=this._getApplyRuleFun(n.type)(o,n);return o},n.prototype._getApplyRuleFun=function(e){if("inputRemoved"===e)return n._applyInputRemovedRule;if("inputChangedType"===e)return n._applyInputChangedTypeRule;if("inputChangedMinMax"===e)return n._applyInputChangedMinMaxRule;if("inputChangedOptions"===e)return n._applyInputChangedOptionsRule;throw new Error("Unknown migration rule type: "+e)},n._applyInputRemovedRule=function(e,t){if(!(t.inputId in e))return e
;if("removeVal"!==t.action)throw new Error("Unexpected rule.action="+t.action+" in rule.type="+t.type);var i=e[t.inputId];return delete e[t.inputId],r.logNormal("Input "+t.inputId+"="+i+" removed"),e},n._applyInputChangedTypeRule=function(e,t){var i=e[t.inputId];if("resetToDefVal"===t.action)return e[t.inputId]=t.defVal,r.logNormal("Input "+t.inputId+"="+i+" reset to default value "+t.defVal),e;if("convertVal"===t.action){if(null==i)return e;if("float"===t.inputTypeFrom&&"integer"===t.inputType)return e[t.inputId]=Math.round(e[t.inputId]),r.logNormal("Input "+t.inputId+"="+i+" converted to value "+e[t.inputId]),e;if("integer"===t.inputTypeFrom&&"float"===t.inputType)return e;if("text"===t.inputTypeFrom&&"source"===t.inputType)return n._isValidSource(i,t.options)?e:(e[t.inputId]=t.defVal,e);throw new Error("Cannot convertVal from "+t.inputTypeFrom+" to "+t.inputType)}throw new Error("Unknown action "+t.action+" for rule with type "+t.type)},n._isValidSource=function(e,t){return e.indexOf("$")>=0||t.indexOf(e)>=0},n._applyInputChangedMinMaxRule=function(e,t){if("adjustValIfNeeded"!==t.action)throw new Error("Unknown action "+t.action+" for rule with type "+t.type);var i=e[t.inputId];return i<t.minVal?e[t.inputId]=t.minVal:i>t.maxVal&&(e[t.inputId]=t.maxVal),r.logNormal("Input "+t.inputId+"="+i+" adjusted to value "+e[t.inputId]),e},n._applyInputChangedOptionsRule=function(e,t){if(!(["text"].indexOf(t.inputType)>=0&&"resetToDefValIfNeeded"===t.action))throw new Error("Unexpected rule.inputType="+t.inputType+" in rule.action="+t.action);var i=e[t.inputId];return t.options.indexOf(i)<0&&(e[t.inputId]=t.defVal,r.logNormal("Input "+t.inputId+"="+i+" reset to default value "+t.defVal)),e},e.exports=n},Eyy1:function(e,t,i){"use strict";function n(e){if(void 0===e)throw new Error("Value is undefined");return e}function o(e){if(null===e)throw new Error("Value is null");return e}Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function(e,t){if(!e)throw new Error("Assertion failed"+(t?": "+t:""))},t.ensureDefined=n,t.ensureNotNull=o,t.ensure=function(e){return o(n(e))},t.ensureNever=function(e){}},F58L:function(e,t,i){"use strict";var n,o,r,s,a,l,c,u,h,d,p;i.r(t),i.d(t,"StudyTemplates",function(){return p}),n=i("zUrt"),o=i("PC8g"),r=i("aIyQ"),s=i.n(r),a=i("hY0g"),l=i.n(a),c=i("oNDq"),u=i("uOxu"),h=Object(u.getLogger)("Platform.StudyTemplates"),d={confirmDelete:window.t("Do you really want to delete Study Template '{0}' ?")},p=function(){function e(e){var t=this;this._chartWidgetCollection=e.chartWidgetCollection,this._favoriteStudyTemplatesService=e.favoriteStudyTemplatesService,window.loginStateChange.subscribe(null,n.backend.invalidateStudyTemplatesList),this._list=new l.a([]),this._onChange=new s.a,this._list.subscribe(function(){return t._onChange.fire()})}return e.prototype.findRecordByName=function(e){return this._list.value().find(function(t){return t.name===e})||null},e.prototype.showSaveAsDialog=function(){var e=this,t=this._chartWidgetCollection.activeChartWidget.value().model()
;Promise.all([i.e("react"),i.e(2),i.e(5),i.e(7),i.e(11),i.e(31),i.e(39),i.e(68),i.e(0),i.e(4),i.e(9),i.e("study-template-dialog")]).then(i.bind(null,"IDfV")).then(function(i){new i.StudyTemplateSaver({controller:t,onSave:function(t){e._list.setValue(t)}}).show()})},e.prototype.applyTemplate=function(e){var t=this,i=this.findRecordByName(e);null!==i?window.runOrSignIn(function(){var e=t._chartWidgetCollection.activeChartWidget.value(),r=function(t){Object(o.trackEvent)("GUI","Load Study Template"),e.model().applyStudyTemplate(JSON.parse(t.content),i.name)};void 0!==i.id?i.is_default?n.backend.getStandardStudyTemplateContentById(i.id,r):n.backend.getStudyTemplateContentById(i.id,r):n.backend.getStudyTemplateContent(i.name,r)},{source:"Study templates apply"}):h.logNormal("Template "+name+" not found in cache")},e.prototype.deleteStudyTemplate=function(e){var t=this.findRecordByName(e);null!==t?this._removeTemplate(t):h.logNormal("Template "+e+" not found in cache")},e.prototype.list=function(){return this._list.value()},e.prototype.getOnChange=function(){return this._onChange},e.prototype.refreshStudyTemplateList=function(e){var t=this;n.backend.getStudyTemplatesList(function(i){t._list.setValue(i),void 0!==e&&e()})},e.prototype._removeTemplate=function(e){var t=this;window.runOrSignIn(function(){Object(c.createConfirmDialog)({type:"modal",content:document.createTextNode(d.confirmDelete.format(e.name))}).then(function(i){i.on("action:yes",function(i){var o=function(){t.refreshStudyTemplateList(function(){var n=t.list();t._list.setValue(n.filter(function(t){return t!==e})),t._favoriteStudyTemplatesService&&t._favoriteStudyTemplatesService.remove(e.name),i.actionLoader("yes","stop"),i.close()})};i.actionLoader("yes","start"),n.backend.invalidateStudyTemplatesList(),void 0!==e.id?n.backend.removeStudyTemplateById(e.id,o):n.backend.removeStudyTemplate(e.name,o)}),i.open()})},{source:"Study templates delete"})},e}()},FBsw:function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"OverlayPriceAxisView",function(){return s}),n=i("mrSG"),o=i("KcY8"),r=i("oXaB"),s=function(e){function t(t){var i=e.call(this)||this;return i._source=t,i}return Object(n.__extends)(t,e),t.prototype._updateRendererData=function(e,t,i){var n,o,s,a;e.visible=!1,t.visible=!1,(n=this._source.lastValueData("close",!1)).noData||(o=this._source.model(),null!==(s=this._source.priceScale())&&o.isPriceScaleVisible(s)&&(i.background=n.color,i.color=this.generateTextColor(n.color),i.coordinate=n.coordinate,i.floatCoordinate=n.floatCoordinate,(a=this._source.model().properties().scalesProperties).showSeriesLastValue.value()&&(e.text=this._text(n),e.visible=!0),t.text="",(a.showSymbolLabels.value()||a.seriesLastValueMode.value()===r.PriceAxisLastValueMode.LastPriceAndPercentageValue)&&(t.text=this._paneText(n),t.visible=t.text.length>0)))},t.prototype._paneText=function(e){var t,i="",n=this._source.model().properties().scalesProperties;return n.showSymbolLabels.value()&&(i+=this._source.symbol()+" "),
null!==(t=this._source.priceScale())&&n.showSeriesLastValue.value()&&n.seriesLastValueMode.value()===r.PriceAxisLastValueMode.LastPriceAndPercentageValue&&(i+=t.isPercentage()?e.formattedPriceAbsolute:e.formattedPricePercentage),i.trim()},t.prototype._text=function(e){var t=this._source.model().properties().scalesProperties,i=this._source.priceScale();return t.seriesLastValueMode.value()!==r.PriceAxisLastValueMode.LastPriceAndPercentageValue||null===i?e.text:i.isPercentage()?e.formattedPricePercentage:e.formattedPriceAbsolute},t}(o.a)},FBuY:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"TVXWindowEvents",function(){return r}),i("HbRj"),n=i("uOxu"),o=Object(n.getLogger)("XWindowEvents"),function(e){var t="tvxwevents.",i={};window.addEventListener("storage",function(e){if(null!==e.newValue){var n=e.key;n&&n.startsWith(t)&&(n=n.substr(t.length),i[n]&&i[n].forEach(function(t){t.call(e.newValue,e.newValue)}))}}),e.on=function(e,t){i[e]||(i[e]=[]),i[e].push(t)},e.off=function(e,t){if(i[e]){var n=i[e].indexOf(t);-1!==n&&(1===i[e].length?delete i[e]:i[e].splice(n,1))}},e.current=function(e){return TVLocalStorage.getItem(t+e)},e.emit=function(e,i){if(void 0===i&&(i=(new Date).valueOf()),i!==TVLocalStorage.getItem(t+e))try{TVLocalStorage.setItem(t+e,i)}catch(e){o.logError(e.message)}}}(r||(r={}))},FDyI:function(e,t,i){"use strict";var n,o,r,s,a;i.r(t),i.d(t,"ChartWidgetApiBase",function(){return a}),n=i("Eyy1"),o=i("LxhU"),r=i("IiTo"),s=i("/bs+"),a=function(){function e(e){this._chartWidget=e}return e.prototype.exportData=function(e){var t=this;return i.e("export-data").then(i.bind(null,"SIoL")).then(function(i){return i.exportData(t._chartWidget.model().model(),e)})},e.prototype.barTimeToEndOfPeriod=function(e){var t=this._prepareEndOfPeriodArgs();return Object(s.barTimeToEndOfPeriod)(t.barBuilder,t.session,e,t.intervalObj)},e.prototype.endOfPeriodToBarTime=function(e){var t=this._prepareEndOfPeriodArgs();return Object(s.endOfPeriodToBarTime)(t.barBuilder,t.session,e,t.intervalObj)},e.prototype._prepareEndOfPeriodArgs=function(){var e=this._chartWidget.model().model(),t=e.timezone(),i=Object(n.ensureNotNull)(e.mainSeries().symbolInfo()),s=e.mainSeries().interval(),a=new r.SessionInfo(t,i.session,i.holidays,i.corrections),l=Object(r.newBarBuilder)(s,a,a),c=o.Interval.parse(s);return{barBuilder:l,session:a.spec,intervalObj:c}},e}()},FIi8:function(e,t,i){"use strict";function n(e){var t,i=[];for(t=1;t<arguments.length;t++)i[t-1]=arguments[t];return e&&"object"==typeof e?0===i.length?e:(i.forEach(function(t){void 0!==t&&null!==t&&"object"==typeof t&&Object.keys(t).forEach(function(i){var r,s,a=e[i],l=t[i],c=l===e;c||(r=Array.isArray(l),l&&(o(l)||r)?(s=void 0,s=r?a&&Array.isArray(a)?a:[]:a&&o(a)?a:{},e[i]=n(s,l)):void 0!==l&&(e[i]=l))})}),e):e}function o(e){var t,i,n;return!(!e||"[object Object]"!==Object.prototype.toString.call(e))&&(!(t=Object.getPrototypeOf(e))||(i=Object.hasOwnProperty.toString,"function"==typeof(n=t.hasOwnProperty("constructor")&&t.constructor)&&i.call(n)===i.call(Object)))}i.r(t),
i.d(t,"deepExtend",function(){return n})},FKaq:function(e,t,i){"use strict";var n,o,r,s,a,l;i.r(t),i.d(t,"SetPriceScaleSelectionStrategyCommand",function(){return l}),n=i("mrSG"),o=i("Eyy1"),r=i("RDU5"),s=i("MWAT"),a=function(){function e(e){this._leftScales=e.leftPriceScales().map(function(e){return e.id()}),this._rightScales=e.rightPriceScales().map(function(e){return e.id()})}return e.prototype.restorePane=function(e){this._leftScales.reverse().map(function(t){return Object(o.ensureNotNull)(e.getPriceScaleById(t))}).forEach(function(t){return e.movePriceScale(t,"left")}),this._rightScales.reverse().map(function(t){return Object(o.ensureNotNull)(e.getPriceScaleById(t))}).forEach(function(t){return e.movePriceScale(t,"right")})},e}(),l=function(e){function t(t,i,n){var o=e.call(this,n)||this;return o._chartModel=t,o._targetStrategy=Object(s.createPriceScaleSelectionStrategy)(i),o._initialState=t.panes().map(function(e){return new a(e)}),o}return Object(n.__extends)(t,e),t.prototype.redo=function(){var e=this;this._chartModel.panes().forEach(function(t){return t.setPriceScaleSelectionStrategy(e._targetStrategy)}),this._chartModel.fullUpdate()},t.prototype.undo=function(){var e,t=this._chartModel.panes();for(e=0;e<t.length;e++)this._initialState[e].restorePane(t[e]);this._chartModel.fullUpdate()},t}(r.UndoCommand)},FQhm:function(e,t,i){"use strict";function n(e,t,i){h[e].unsubscribe(i,t)}function o(e,t,i){r(e,t,i)}function r(e,t,i,n){h.hasOwnProperty(e)||(h[e]=new u.a),p[e]?t.call(i):h[e].subscribe(i,t,n)}function s(e){d.push(e)}function a(e){var t,i,n=[];for(t=1;t<arguments.length;t++)n[t-1]=arguments[t];i=[e].concat(n),d.forEach(function(e){e.apply(null,i)}),h.hasOwnProperty(e)&&h[e].fire.apply(h[e],n)}function l(e){p[e]&&console.warn("Something went wrong: emitOnce called multiple times with same event ("+e+")"),p[e]=!0,a.apply(null,arguments)}var c,u,h,d,p;i.r(t),i.d(t,"unsubscribe",function(){return n}),i.d(t,"on",function(){return o}),i.d(t,"subscribe",function(){return r}),i.d(t,"subscribeToAll",function(){return s}),i.d(t,"emit",function(){return a}),i.d(t,"emitOnce",function(){return l}),c=i("aIyQ"),u=i.n(c),h={},d=[],p={}},FVHe:function(e,t,i){"use strict";function n(e,t){return!(!e&&!t)&&(!(!e||t)||(!(e||!t)||(e.index!==t.index||e.price!==t.price)))}function o(e,t){var i=document.createElement("canvas");return i.width=e,i.height=t,i.style.position="absolute",i.style.top="0",i.style.zIndex="1000",i.style.left="0",i}var r,s,a,l,c,u,h,d,p,_,f;i.r(t),i.d(t,"TrendLineStatsCache",function(){return f}),r=i("Eyy1"),s=i("aO4+"),a=i("uOxu"),l=i("5/lF"),c=i("zDbI"),u=i("8xAY"),h=u.LabelSettings.fontSize,d=u.LabelSettings.lineSpacing,p=u.LabelSettings.paddingTopBottom,_=Object(a.getLogger)("Chart.LineToolTrendLine"),f=function(){function e(){var e,t,i;this._sourcesToRow=new Map,this._rowsToSources=new Map,this._currentWidth=400,this._actualCapacity=0,this._currentSymbol="",this._canvas=o(this._currentWidth,1),this._ctx=Object(r.ensureNotNull)(this._canvas.getContext("2d")),t=h+(e=d),i=3,this._rowHeight=t*i-e+2*p+2}
return e.prototype.canvas=function(){return this._canvas},e.prototype.topByRow=function(e){return e*this._rowHeight},e.prototype.rowHeight=function(e){return this._rowHeight},e.prototype.rowWidth=function(e){var t=Object(r.ensureDefined)(this._rowsToSources.get(e));return Object(r.ensureDefined)(this._sourcesToRow.get(t)).width},e.prototype.currentWidth=function(){return this._currentWidth},e.prototype.removeSource=function(e){var t,i=this._sourcesToRow.get(e);void 0!==i&&(t=i.rowIndex,this._ctx.save(),this._ctx.clearRect(0,this.topByRow(t),this._currentWidth,this.rowHeight(t)),this._ctx.restore(),this._sourcesToRow.delete(e),this._rowsToSources.delete(t))},e.prototype.updateSource=function(e,t){var i,n,o,r,s,a,l=e.properties().symbol.value();return this._currentSymbol!==l&&(_.logDebug("TrendLineCache. Clearing canvas because of changing symbol from "+this._currentSymbol+" to "+l),this._currentSymbol=l,this._sourcesToRow.clear(),this._rowsToSources.clear()),i=e.id(),void 0===(n=this._sourcesToRow.get(i))&&(n={effectiveState:null,rowIndex:o=this._findEmptyRow(i),width:0},this._sourcesToRow.set(i,n),this._rowsToSources.set(o,i)),r=n.effectiveState,s=this._effectiveState(e),this._effectiveStatesEquals(r,s)||(a=t(),this._repaintSource(i,n.rowIndex,a),n.effectiveState=s),n},e.prototype._findEmptyRow=function(e){for(var t,i=0;void 0!==this._rowsToSources.get(i);)i++;return this._rowsToSources.set(i,e),i>=this._actualCapacity&&(this._actualCapacity++,t=this._canvas,this._canvas=o(this._currentWidth,this._rowHeight*this._actualCapacity),this._ctx=Object(r.ensureNotNull)(this._canvas.getContext("2d")),this._ctx.drawImageOriginal?this._ctx.drawImageOriginal(t,0,0,t.width,t.height):this._ctx.drawImage(t,0,0,t.width,t.height),this._ctx.translate(.5,.5),this._ctx.font=h+"px "+c.CHART_FONT_FAMILY,_.logDebug("TrendLineCache. Expanding cache to "+this._actualCapacity+" items")),i},e.prototype._effectiveState=function(e){var t=e.properties(),i={p1:Object.assign({},e.points()[0]),p2:Object.assign({},e.points()[1]),props:e.properties(),showBars:t.showBarsRange.value(),showTimeRange:t.showDateTimeRange.value(),showDistance:t.showDistance.value(),showPriceRange:t.showPriceRange.value(),showAngle:t.showAngle.value(),dark:e.model().isDark(),priceRange:void 0,barSpacing:void 0};return!0===i.showAngle&&(i.priceRange=Object(r.ensureNotNull)(Object(r.ensureNotNull)(e.priceScale()).priceRange()).state(),i.barSpacing=e.model().timeScale().barSpacing()),i},e.prototype._effectiveStatesEquals=function(e,t){var i,o;if(null!==e&&null===t)return!1;if(null===e&&null!==t)return!1;if(i=Object(r.ensureNotNull)(e),o=Object(r.ensureNotNull)(t),n(i.p1,o.p1))return!1;if(n(i.p2,o.p2))return!1;if(i.dark!==o.dark)return!1;if(i.showBars!==o.showBars)return!1;if(i.showTimeRange!==o.showTimeRange)return!1;if(i.showDistance!==o.showDistance)return!1;if(i.showPriceRange!==o.showPriceRange)return!1;if(i.showAngle!==o.showAngle)return!1;if(i.showAngle&&o.showAngle){if(i.priceRange.min!==o.priceRange.min)return!1;if(i.priceRange.max!==o.priceRange.max)return!1
;if(i.barSpacing!==o.barSpacing)return!1}return!0},e.prototype._repaintSource=function(e,t,i){var n;this._ctx.save(),this._ctx.translate(0,this.topByRow(t)),i.points[0]=new s.Point(0,0),i.offsetX=0,i.offsetY=0,delete i.horzAlign,delete i.vertAlign,this._ctx.clearRect(0,0,this._currentWidth,this.rowHeight(t)),n=new l.TrendLineStatsRenderer(i,{widths:[]}).draw(this._ctx),Object(r.ensureDefined)(this._sourcesToRow.get(e)).width=n.width,this._ctx.restore()},e}()},FVma:function(e,t,i){"use strict";(function(e){function n(e,t,i,n){this._prices=[],this._canvas=document.createElement("canvas"),this._cache=this._canvas.getContext("2d"),this.reset({font:e,fontSize:t,backColors:i,colors:n}),this._priceAxisFontSize=11}function o(e,t){this._model=e,this._source=t,this._pivots=[],this._textCache={}}function r(e,t){this._source=e,this._model=e._model,this._prices=[],this._invidated=!0,this._cache=t}function s(e,t,i,n){var o,r,s;for(p.call(this,e,t,i,n),o=["P","S1/R1","S2/R2","S3/R3","S4/R4","S5/R5"],r=this.properties().levelsStyle.visibility,s=0;s<o.length;s++)r[o[s]].listeners().subscribe(this,TradingView.Study.prototype.processHibernate)}var a=i("aO4+").Point,l=i("eJTA"),c=l.parseRgb,u=l.rgbToBlackWhiteString,h=i("2kV1").StudyStatusView,d=i("it7y").StudyDataWindowView,p=i("Qq0B").NonSeriesStudy,_=i("dUDn").StandardPivotPointsPriceAxisView,f=i("KtbP").PanePriceAxisView,m=i("pJOz").TrendLineRenderer,y=i("loH8"),g=i("VdBB").HitTestResult,v=i("Zy3/").CompositeRenderer,S=i("k9/m").PlotRowSearchMode,b=i("hayr").propertyPages,w=i("a7Ha").LineEnd,P=i("zDbI").CHART_FONT_FAMILY;n.prototype.destroy=function(){},n.prototype.reset=function(e){this._prices=[],this._params=e,this._cache.setFont(e.fontSize+"px "+e.font);var t=this;this._labelWidth=["P","S1","R1","S2","R2","S3","R3","S4","R4","S5","R5","/"].reduce(function(e,i){var n=t._cache.measureText(i).width;return Math.max(n,e)},0)},n.prototype.rowHeight=function(){return this._priceAxisFontSize+4},n.prototype._labelRectByIndex=function(e){var t=0,i=Math.round(this._topByIndex(e)),n=Math.round(this._labelWidth+4),o=this._params.fontSize+8;return{left:t,top:i,width:n,height:o}},n.prototype.params=function(){return this._params},n.prototype._centerByIndex=function(e){return Math.round((e+.5)*(this._params.fontSize+8))},n.prototype._topByIndex=function(e){return Math.round(e*(this._params.fontSize+8))},n.prototype.setPrices=function(e){var t,i,n,o,r,s,a=8,l=!1,c=function(e,t){return void 0===e&&void 0===t||e.formatted===t.formatted};if(e.length!==this._prices.length)l=!0;else for(t=0;t<this._prices.length;t++)if(!c(this._prices[t],e[t])){l=!0;break}if(l){for((i=this)._cache.save(),i._cache.font=this._priceAxisFontSize+"px "+P,i._cache.restore(),n=this._labelWidth+6,n*=o=window.hidpiCanvasRatio||1,this._canvas.setAttribute("width",n),r=Math.max(e.length,22)*(this._params.fontSize+a),r*=o,this._canvas.setAttribute("height",r),this._canvas.style.width=n,this._canvas.style.height=r,this._prices=e,this._cache.clearRect(0,0,n,r),this._cache.save(),this._cache.translate(.5,.5),
this._cache.font=this._params.fontSize+"px "+this._params.font,this._cache.textBaseline="middle",t=0;t<this._prices.length;t++)this._prices[t]&&(s=["P","S1","R1","S2","R2","S3","R3","S4","R4","S5","R5"][t],this._cache.fillStyle=this._params.backColors[t],this._cache.fillText(s,0,this._centerByIndex(t)),this._cache.fillText("/",0,this._centerByIndex(t+11)));this._prices=e,this._cache.restore()}},o.prototype.setCache=function(e){this._cache=e},o.prototype.priceAxisViews=function(e,t){return this._priceAxisViews},o.prototype.mergeLabel=function(e,t,i){var n=""+t;void 0===e[n]?(e[n]={},e[n].text=i,e[n].ids=[this.complete(i)]):(e[n].text+="/"+i,e[n].ids.push(this.complete(i)))},o.prototype.complete=function(e){return"P"===e?e:"S"+e[1]+"/R"+e[1]},o.prototype.update=function(){this._invalidated=!0},o.prototype._updateImpl=function(){var e,t,i,n,o,r,s,a,l,c,u,h,d,p,_,f,m,y;if(this._source.pricesView().prices(),this._pivots=[],this._source.customData()&&this._source.customData().pivots&&this._source.properties().visible.value()&&(e=this._source.customData().pivots,t=this._source._indexes,i=this._model.timeScale(),(n=this._source.priceScale())&&!n.isEmpty()&&!i.isEmpty()&&e&&(r=(o=i.visibleBarsStrictRange()).firstBar(),s=o.lastBar(),this._source.ownerSource())))for(a=this._source.ownerSource().firstValue(),l=0;l<e.length;l++)if(e[l]&&(c=t[e[l].startIndex],!((u=t[e[l].endIndex])<r||c>s)))for(f in h={},(d=this._source.properties().levelsStyle.visibility).P.value()&&this.mergeLabel(h,e[l].p,"P"),d["S1/R1"].value()&&(this.mergeLabel(h,e[l].s1,"S1"),this.mergeLabel(h,e[l].r1,"R1")),d["S2/R2"].value()&&(this.mergeLabel(h,e[l].s2,"S2"),this.mergeLabel(h,e[l].r2,"R2")),d["S3/R3"].value()&&(this.mergeLabel(h,e[l].s3,"S3"),this.mergeLabel(h,e[l].r3,"R3")),d["S4/R4"].value()&&(this.mergeLabel(h,e[l].s4,"S4"),this.mergeLabel(h,e[l].r4,"R4")),d["S5/R5"].value()&&(this.mergeLabel(h,e[l].s5,"S5"),this.mergeLabel(h,e[l].r5,"R5")),p=i.indexToCoordinate(c),_=i.indexToCoordinate(u),h)m=parseFloat(f),y=n.priceToCoordinate(m,a),this._pivots.push({x1:p,x2:_,y:y,label:h[f].text,labelIds:h[f].ids})},o.prototype.renderer=function(){var e,t,i,n,o,r,s,l,c,u,h,d,p,_,f,S;for(this._invalidated&&(this._updateImpl(),this._invalidated=!1),e=new v,t=this._source.properties().levelsStyle.colors,i=this._source.properties().levelsStyle.widths,n=0;n<this._pivots.length;n++)if(o=this._pivots[n],s={points:[r=new a(o.x1,o.y),new a(o.x2,o.y)],width:this._model.timeScale().width(),height:this._source.priceScale().height(),color:t[o.labelIds[0]].value(),linewidth:i[o.labelIds[0]].value(),linestyle:CanvasEx.LINESTYLE_SOLID,extendleft:!1,extendright:!1,leftend:w.Normal,rightend:w.Normal},(l=new m).setData(s),l.setHitTest(new g(g.REGULAR)),e.append(l),this._source.properties().levelsStyle.showLabels.value())for(c=o.label.split("/"),u=0,h=0;h<c.length;h++)d=["P","S1","R1","S2","R2","S3","R3","S4","R4","S5","R5"].indexOf(c[h]),h>0&&(p=this._cache._labelRectByIndex(d+11),_={left:r.x-p.width+u,top:Math.round(r.y-p.height/2),width:p.width,height:p.height},u+=p.width/2,
f=this._cache._canvas,S=new y(f,p,_),e.append(S)),p=this._cache._labelRectByIndex(d),_={left:r.x-p.width+u,top:Math.round(r.y-p.height/2),width:p.width,height:p.height},u+=p.width,f=this._cache._canvas,S=new y(f,p,_),e.append(S);return e},r.prototype._updateImpl=function(){var e,t,i,n,o,r,s,a,l,c,u,h,d,p,_,f,m,y,g,v;if(!this._model.timeScale().isEmpty()&&!this._source.priceScale().isEmpty()&&null!==(e=this._model.timeScale().visibleBarsStrictRange())&&this._source.customData()&&this._source.customData().pivots&&(t=this._model.mainSeries(),i=this._source.priceScale(),null!==(n=t.bars().search(e.lastBar(),S.NearestLeft)))){for(o=n.index,r=this._source.customData().pivots,s=this._source._indexes,a=this._source.properties(),l=this._source.firstValue(),c=0;c<r.length;c++)if(r[c]&&(u=s[r[c].startIndex],h=s[r[c].endIndex],d=a.inputs.showHistoricalPivots.value(),h>=o&&u<=o||!d))for(p=["p","s1","r1","s2","r2","s3","r3","s4","r4","s5","r5"],this._prices=[],_=0;_<p.length;_++)f=p[_],void 0!==(m=r[c][f])&&(y=i.priceToCoordinate(m,l),g={P:"P",S1:"S1/R1",S2:"S2/R2",S3:"S3/R3",S4:"S4/R4",S5:"S5/R5",R1:"S1/R1",R2:"S2/R2",R3:"S3/R3",R4:"S4/R4",R5:"S5/R5"},v=a.levelsStyle.colors[g[f.toUpperCase()]].value(),this._prices.push({formatted:i.formatPrice(m,l),price:m,coordinate:y,color:v}));this._cache.setPrices(this._prices)}},r.prototype.update=function(){this._invidated=!0},r.prototype.prices=function(){return this._invidated&&(this._updateImpl(),this._invidated=!1),this._prices},inherit(s,p),s.prototype.lastValueData=function(e,t,i){var n=["P","S1","R1","S2","R2","S3","R3","S4","R4","S5","R5"].indexOf(e.toUpperCase()),o={noData:!0},r=this._pricesView.prices()[n];return null!==r&&void 0!==r?r:o},s.prototype.lastPriceLabelFixedCoordinate=function(e){var t=["P","S1","R1","S2","R2","S3","R3","S4","R4","S5","R5"].indexOf(e.toUpperCase()),i=this._priceAxisViews[t];return i._fixedCoordinate},s.prototype.priceLabelText=function(e){return this._metaInfo.shortDescription+":"+e.toUpperCase()},s.prototype.pricesView=function(){return this._pricesView},s.prototype._getActualCacheParams=function(){var e={};return e.font=this.properties().font.value(),e.fontSize=this.properties().fontsize.value(),e.backColors=[this.properties().levelsStyle.colors.P.value(),this.properties().levelsStyle.colors["S1/R1"].value(),this.properties().levelsStyle.colors["S1/R1"].value(),this.properties().levelsStyle.colors["S2/R2"].value(),this.properties().levelsStyle.colors["S2/R2"].value(),this.properties().levelsStyle.colors["S3/R3"].value(),this.properties().levelsStyle.colors["S3/R3"].value(),this.properties().levelsStyle.colors["S4/R4"].value(),this.properties().levelsStyle.colors["S4/R4"].value(),this.properties().levelsStyle.colors["S5/R5"].value(),this.properties().levelsStyle.colors["S5/R5"].value()],e.colors=e.backColors.map(function(e){return"black"===u(c(e),150)?"white":"black"}),e},s.prototype.updateAllViews=function(){p.prototype.updateAllViews.call(this),this._pricesView.update()},s.prototype.createViews=function(){var e,t,i,s,a=this._getActualCacheParams()
;for(this._cache&&this._cache.destroy(),this._cache=new n(a.font,a.fontSize,a.backColors,a.colors),this._priceAxisViews=[],e=["P","S1","R1","S2","R2","S3","R3","S4","R4","S5","R5"],this._paneViews.length=0,(t=new o(this._model,this)).setCache(this._cache),this._paneViews.push(t),i=0;i<e.length;i++)s=new _(this,{name:e[i],cache:this._cache}),this._priceAxisViews.push(s),this._paneViews.push(new f(s,this,this._model));this._dataWindowView||(this._dataWindowView=new d(this,this._model)),this._statusView||(this._statusView=new h(this,this._model.properties().scalesProperties.textColor)),this._legendView=null,this._pricesView=new r(this,this._cache)},s.prototype._postProcessGraphics=function(){},s.prototype.isVisible=function(){var e,t,i;if(!this.properties().visible.value())return!1;for(e=["P","S1/R1","S2/R2","S3/R3","S4/R4","S5/R5"],t=this.properties().levelsStyle.visibility,i=0;i<e.length;i++)if(t[e[i]].value())return!0;return!1},s.prototype.stop=function(){TradingView.Study.prototype.stop.call(this),this._cache&&(this._cache.destroy(),this._cache=null)},s.prototype.priceRange=function(t,i){var n,o,r,s,a,l,c,u;if(!this.customData()||!this.customData().pivots||!this._indexes)return null;if(!this.priceScale())return null;for(n=this.customData().pivots,o=this._indexes,r=null,s=0;s<n.length;s++)if(n[s]&&(a=o[n[s].startIndex],!(o[n[s].endIndex]<t||a>i)))for(l=[],(c=this._properties.levelsStyle.visibility).P.value()&&l.push(n[s].p),c["S1/R1"].value()&&l.push(n[s].s1,n[s].r1),c["S2/R2"].value()&&l.push(n[s].s2,n[s].r2),c["S3/R3"].value()&&l.push(n[s].s3,n[s].r3),c["S4/R4"].value()&&l.push(n[s].s4,n[s].r4),c["S5/R5"].value()&&l.push(n[s].s5,n[s].r5),u=0;u<l.length;u++)l[u]&&(null===r?r=new e(l[u],l[u]):r.apply(l[u],l[u]));return this.priceScale().isLog()&&r?new e(this.priceScale().priceToLogical(r.minValue()),this.priceScale().priceToLogical(r.maxValue())):r},s.prototype.getStylesPropertyPage=function(){return b.StudyPivotPointsStandardStylesPropertyPage},t.study_PivotPointsStandard=s}).call(this,i("Qb4w").PriceRange)},FaJS:function(e,t,i){"use strict";function n(e,t){var i;return t.isLog()||e.isEmpty()||t.isEmpty()?null:null===(i=function(e){var t,i;return e.isEmpty()?null:null===(t=e.priceRange())?null:(i=t.length(),e.internalHeight()/i)}(t))?null:e.getValidBarSpacing()/Math.max(a,i)}function o(e,t,i){var n,o,r,a;return e.isLog()||null===i||e.isEmpty()?null:null===(n=e.priceRange())||n.isEmpty()?null:(o=e.internalHeight()/(t/i))===(r=n.length())?n:(a=(o-r)/2,new s.PriceRange(n.minValue()-a,n.maxValue()+a))}function r(e,t){var i,n;return e.isLog()||null===t||e.isEmpty()?null:null===(i=e.priceRange())?null:(n=i.length(),e.internalHeight()/n*t)}var s,a;i.r(t),i.d(t,"scaleRatio",function(){return n}),i.d(t,"priceRangeByScaleRatio",function(){return o}),i.d(t,"barSpacingByScaleRatio",function(){return r}),s=i("Qb4w"),a=1e-10},Fixu:function(e,t,i){"use strict";function n(e,t){0}function o(e){n()}function r(e){n()}function s(e){n()}function a(e){0}var l;i.r(t),i.d(t,"trackDrawingCreated",function(){return o}),
i.d(t,"trackDrawingPasted",function(){return r}),i.d(t,"trackDrawingCloned",function(){return s}),i.d(t,"trackChartStyleChanged",function(){return a}),l=i("Eyy1"),i("dfhE")},FsE7:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolFibTimeZone";var r=t||n.createProperties();o.call(this,e,r),this.version=n.version,i.e("lt-pane-views").then(function(e){var t=i("wgWl").FibTimeZonePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("5rJj"),s=i("hayr").propertyPages,a=window.t("Fib Time Zone");inherit(n,o),n.version=2,n.LevelsCount=11,n.prototype.levelsCount=function(){return n.LevelsCount},n.prototype.migrateVersion=function(e,t,i){var n;if(1===e){for(i.properties.level1.color.setValue(i.properties.baselinecolor.value()),n=2;n<=11;n++)i.properties["level"+n].color.setValue(i.properties.linecolor.value());for(n=1;n<=11;n++)i.properties["level"+n].linewidth.setValue(i.properties.linewidth.value()),i.properties["level"+n].linestyle.setValue(i.properties.linestyle.value())}},n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return a},n.prototype.name=function(){return"Fib Time Zone"},n.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},n.prototype.getStylesPropertyPage=function(){return s.LineToolFibTimeZoneStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("SMr9").FibTimezoneDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new r("linetoolfibtimezone",e,!1,{range:[1,11]});return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolFibTimeZone=n},GEp6:function(e,t,i){"use strict";function n(e,t,i){var n=t.subtract(e),o=i.subtract(e),r=o.dotProduct(n)/n.dotProduct(n),s=e.addScaled(n,r);return{coeff:r,distance:s.subtract(i).length()}}Object.defineProperty(t,"__esModule",{value:!0}),t.distanceToLine=n,t.distanceToSegment=function(e,t,i){var o,r,s=n(e,t,i);return 0<=s.coeff&&s.coeff<=1?s:(o=e.subtract(i).length())<(r=t.subtract(i).length())?{coeff:0,distance:o}:{coeff:1,distance:r}}},GH0z:function(e,t,i){"use strict";var n,o,r,s,a;i.r(t),i.d(t,"PercentageFormatter",function(){return a}),n=i("mrSG"),o=i("kcTO"),r=i("Ialn"),s="%",a=function(e){function t(t){void 0===t&&(t=100);var i=e.call(this,t)||this;return i.type="percentage",i}return Object(n.__extends)(t,e),t.prototype.state=function(){var e=o.PriceFormatter.prototype.state.call(this);return e.percent=!0,e},t.prototype.parse=function(t){return t=t.replace(s,""),e.prototype.parse.call(this,t)},t.prototype.format=function(t,i,n,o,a){void 0===a&&(a=!0);var l=e.prototype.format.call(this,t,i,n,o,!1)+s;return a?Object(r.forceLTRStr)(l):l},t.serialize=function(e){return e.state()},t.deserialize=function(e){return new t(e.priceScale)},t}(o.PriceFormatter)},GK7n:function(e,t,i){
"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,i){var n,o=2*Z,r=document.createElement("canvas");return r.width=t*o,r.height=i*o,r.style.width=t+"px",r.style.height=i+"px",(n=r.getContext("2d")).setTransform(o,0,0,o,0,0),n.drawImage(e,0,0,t,i),r}function r(e,t){return function(){i.e("ie-fallback-logos").then(function(){J=i("j1nX"),e.call(t)}.bind(null,i)).catch(i.oe)}}function s(e){return!P||e>T}var a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P,C,T,x,I,L,M,A,k,E,O,D,V,B,R,N,F,W,j,U,z,H,Y,G,q,K,Z,J,X,Q,$,ee,te;Object.defineProperty(t,"__esModule",{value:!0}),t.Branding=void 0,a=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i,n,o=[],r=!0,s=!1,a=void 0;try{for(i=e[Symbol.iterator]();!(r=(n=i.next()).done)&&(o.push(n.value),!t||o.length!==t);r=!0);}catch(e){s=!0,a=e}finally{try{!r&&i.return&&i.return()}finally{if(s)throw a}}return o}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function e(e,t){var i,n;for(i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),c=i("aO4+"),u=i("f6yo"),h=i("Kxc7"),d=function(e){var t,i;if(e&&e.__esModule)return e;if(t={},null!=e)for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(h),p=i("VdBB"),_=i("j1f4"),f=i("Tmoa"),m=i("beCu"),y=i("jFln"),g=i("eJTA"),v=i("JOqt").debounce,S=i("/b+7"),b=i("zDbI").CHART_FONT_FAMILY,w=!1,P=d.enabled("adaptive_logo"),C=d.enabled("small_no_display"),w=d.enabled("38914"),T=500,x=480,L="Ch{0}ar{1}t{2}by{3}{4}".format("",""," "," ",I="TradingView"),M="po{0}wer{1}ed{2}by{3}{4}".format("",""," "," ",I),A="by{3}{4}".format("",""," "," ",I),k=w?A:M,E="site_branding",O="widget_branding",D="widget_referral_branding",V="widget_custom_branding",B="widget_custom_no_powered_branding",R="fundamental_branding",N="fundamental_custom_branding",F="fundamental_custom_no_powered_branding",W="library_branding",j="library_custom_branding",U="library_custom_no_powered_branding",z=.2,H=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,Y=H&&navigator.userAgent.toLowerCase().indexOf("windows")>-1,G=navigator.userAgent.toLowerCase().indexOf("chrome")>-1&&-1===navigator.userAgent.toLowerCase().indexOf("edge"),ee=window.navigator.userAgent,te=ee.indexOf("MSIE "),q=te>0?parseInt(ee.substring(te+5,ee.indexOf(".",te)),10):ee.indexOf("Trident/")>0&&($=ee.indexOf("rv:"),parseInt(ee.substring($+3,ee.indexOf(".",$)),10)),K=window.urlParams||{},window.initData,Z=window.hidpiCanvasRatio||1,J=null,X=function(){function e(t){var i=t.layout,o=void 0===i?E:i,s=t.symbol,a=void 0===s?"":s,l=t.model,c=t.onReadyCallback;n(this,e),this._model=l,this._image=null,this._imageReady=!1,this._needDisplayImage=!1,this._imageWidth=22,this._imageHeight=13,this._layout=o,this._symbol=a,
this.showAnimatedBranding=d.enabled("show_animated_logo")||this._layout===O,this.show=!0,this.width=100,this.height=14,this._bottomShift=0,this._brandCircleSize=32,this._animatedWidth=this._brandCircleSize,this._animatedOpacity=0,this.width=this.showAnimatedBranding?this._brandCircleSize:100,this.height=14,this._fillColor=_.color.brandNew,this._colorOldBlue=_.color.brandNew2,this._colorOldGray=_.color.black30,this._strokeColor=_.color.black255,this._brandCircleShadowColor=_.color.black0,this._strokeWidth=4,this._fontSize=this.showAnimatedBranding?11:14,this._font="px "+b,this._txt="TradingView",this._onReadyCallback=c,this._upscaleRatio=G?1:2,this._verticalTextShift=H?this.showAnimatedBranding?2:4:0,this._strokeCanv=null,this._fillCanv=null,q&&(this._init=r(this._init,this)),this._init()}return l(e,[{key:"_init",value:function(){this._checkLayout(),this.show&&(this._updateStrokeColor(),this.showAnimatedBranding?(this._loadImage(S,"tvLogo"),this._createFillText()):this._loadImage(S,"tvLogo"),this._model.properties().paneProperties.background.subscribe(this,this._updateStrokeColor),this._model.onChartThemeLoaded().subscribe(this,this._updateStrokeColor))}},{key:"_updateStrokeColor",value:function(){var e=(0,f.getLuminance)(this._model.properties().paneProperties.background.value());this._strokeCanv=null,this._fillCanv=null,e>z?(this._brandCircleColor=_.color.black255,this._animatedColorBg=_.color.black255,this._brandCircleShadowOpacity=.09,this._strokeOpacity=.8):(this._brandCircleColor=_.color.black27,this._animatedColorBg=_.color.black27,this._brandCircleShadowOpacity=.09,this._strokeOpacity=.1)}},{key:"_loadImage",value:function(e,t){var i,n=this;this._needDisplayImage&&(this._image=new Image,this.showAnimatedBranding&&(this._imageWhite=new Image),q?(this._image.src=J.fallbackImages[t+"Blue"],this.showAnimatedBranding&&(this._imageWhite.src=J.fallbackImages[t+"White"])):(i=e.replace(/fill="#[\da-f]{6}"/i,'fill="#FFFFFF"'),this._image.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(e),this.showAnimatedBranding&&(this._imageWhite.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(i))),this._image.addEventListener("load",function(){Y&&(n._image=o(n._image,n._imageWidth,n._imageHeight)),n._imageReady=!0,"function"==typeof n._onReadyCallback&&n._onReadyCallback()}))}},{key:"_checkLayout",value:function(){switch(this._layout){case O:case D:case V:case R:case N:case j:case W:this.show=!0;break;case E:case B:case F:case U:this.show=!1}switch(this._layout){case W:this._needDisplayImage=!0,this._txt=window.t(L);break;case j:this._txt=window.t(k)}}},{key:"_drawTextStroke",value:function(e){var t,i;this._strokeCanv||(this._strokeCanv=document.createElement("canvas"),t=this._strokeCanv.getContext("2d"),i=Math.round(this._strokeWidth*this._upscaleRatio),t.font=this._fontSize*this._upscaleRatio+this._font,this._textWidth=t.measureText(this._txt).width,this._strokeCanv.width=(this._textWidth+2*i)*Z,this._strokeCanv.height=(this._fontSize+2*i)*this._upscaleRatio*Z,
this._strokeCanv.width%2==0&&(this._strokeCanv.width+=1,this._strokeCanv.height+=1),t.textBaseline="top",t.textAlign="start",t.font=this._fontSize*this._upscaleRatio+this._font,t.strokeStyle=this._strokeColor,t.lineWidth=this._strokeWidth*this._upscaleRatio*Z,t.lineJoin="round",t.strokeText(this._txt,i,this._verticalTextShift)),e.save(),e.globalAlpha=this._strokeOpacity,e.drawImage(this._strokeCanv,0,0,this._strokeCanv.width,this._strokeCanv.height,0,0,this._strokeCanv.width/this._upscaleRatio/Z,this._strokeCanv.height/this._upscaleRatio/Z),e.restore()}},{key:"_drawTextFill",value:function(e){this._createFillText(),e.save(),e.drawImage(this._fillCanv,0,0,this._fillCanv.width,this._fillCanv.height,0,0,this._fillCanv.width/this._upscaleRatio/Z,this._fillCanv.height/this._upscaleRatio/Z),e.restore()}},{key:"_createFillText",value:function(){var e,t;null===this._fillCanv&&(this._fillCanv=document.createElement("canvas"),e=this._fillCanv.getContext("2d"),t=Math.round(this._strokeWidth*this._upscaleRatio),e.font=this._fontSize*this._upscaleRatio+this._font,void 0===this._textWidth&&(this._textWidth=Math.round(e.measureText(this._txt).width)),this._setSizeFillTextCanvas(t),e.textBaseline="top",e.textAlign="start",e.font=this._fontSize*this._upscaleRatio+this._font,e.fillStyle=this._fillColor,e.fillText(this._txt,t,this._verticalTextShift))}},{key:"_updateFillTextWithColor",value:function(e){var t=Math.round(this._strokeWidth*this._upscaleRatio),i=this._fillCanv.getContext("2d");this._setSizeFillTextCanvas(t),i.clearRect(0,0,this._fillCanv.width,this._fillCanv.height),i.textBaseline="top",i.textAlign="start",i.font=this._fontSize*this._upscaleRatio+this._font,i.fillStyle=e,i.fillText(this._txt,t,this._verticalTextShift)}},{key:"_setSizeFillTextCanvas",value:function(e){this._fillCanv.width=(this._textWidth+2*e)*Z,this._fillCanv.height=(this._fontSize+2*e)*this._upscaleRatio*Z,this._fillCanv.width%2==0&&(this._fillCanv.width+=1,this._fillCanv.height+=1)}},{key:"_drawFillTextCropWidth",value:function(e,t,i){this._fillCanv?this._updateFillTextWithColor(i):this._createFillText(),e.save(),e.drawImage(this._fillCanv,0,0,t*this._upscaleRatio*Z,this._fillCanv.height,0,0,t,this._fillCanv.height/this._upscaleRatio/Z),e.restore()}},{key:"_drawBgCircle",value:function(e){e.save(),e.beginPath(),e.fillStyle=this._brandCircleShadowColor,e.globalAlpha=this._brandCircleShadowOpacity,e.arc(this._imageWidth/2,this._imageHeight/2,this._brandCircleSize/2+1,0,2*Math.PI),e.fill(),e.closePath(),e.restore(),e.save(),e.beginPath(),e.fillStyle=this._brandCircleColor,e.arc(this._imageWidth/2,this._imageHeight/2,this._brandCircleSize/2,0,2*Math.PI,!1),e.fill(),e.closePath(),e.restore()}},{key:"_drawFillRectWithRoundedCorner",value:function(e,t,i,n,o,r,s){e.save(),(0,y.drawRoundRect)(e,t-1,i-1,n+2,o+2,r),e.globalAlpha=this._brandCircleShadowOpacity,e.fillStyle=this._brandCircleShadowColor,e.fill(),e.closePath(),e.restore(),e.save(),(0,y.drawRoundRect)(e,t,i,n,o,r),e.fillStyle=s,e.fill(),e.closePath(),e.restore()}},{key:"_drawImageWithColor",
value:function(e){e.save(),e.globalAlpha=this._animatedOpacity,e.drawImage(this._imageWhite,0,-.5,this._imageWidth,this._imageHeight),e.restore(),e.save(),e.globalAlpha=1-this._animatedOpacity,e.drawImage(this._image,0,-.5,this._imageWidth,this._imageHeight),e.restore()}},{key:"bottomShift",value:function(){return this._bottomShift}},{key:"hasAnimation",value:function(){return this.showAnimatedBranding}},{key:"minimizedAnimationWidth",value:function(){return this._brandCircleSize}},{key:"maximizedAnimationWidth",value:function(){return this._fillCanv.width/this._upscaleRatio/Z+this._brandCircleSize-3}},{key:"animatedDrawStep",value:function(e,t){var i,n,o,r,s,l,c,u,h,d,p,_,f,m,y,v;this._animatedWidth=t,i=this._animatedWidth<this._brandCircleSize+20?0:this._animatedWidth/this.maximizedAnimationWidth(),n=(0,g.parseRgb)(this._brandCircleColor),r=(o=a(n,3))[0],s=o[1],l=o[2],c=(0,g.parseRgb)(this._fillColor),h=(u=a(c,3))[0],d=u[1],p=u[2],_=(0,g.parseRgb)(this._strokeColor),m=(f=a(_,3))[0],y=f[1],v=f[2],this._animatedColorBg=(0,g.rgbaToString)((0,g.blendRgba)([r,s,l,(0,g.normalizeAlphaComponent)(1)],[h,d,p,(0,g.normalizeAlphaComponent)(i)])),this._animatedColorText=(0,g.rgbaToString)((0,g.blendRgba)([h,d,p,(0,g.normalizeAlphaComponent)(1)],[m,y,v,(0,g.normalizeAlphaComponent)(i)])),this._animatedOpacity=i}},{key:"draw",value:function(e,t){var i,n,o,r,a,l,c,u,h,d;this.showAnimatedBranding?this._needDisplayImage&&this._imageReady&&(e.save(),i=(this._brandCircleSize-this._imageWidth)/2,n=(this._brandCircleSize-this._imageHeight)/2,e.translate(-i,-n),this._drawFillRectWithRoundedCorner(e,0,0,this._animatedWidth,this._brandCircleSize,this._brandCircleSize/2,this._animatedColorBg),e.translate(i,n),this._drawImageWithColor(e),o=12+(G?-.5:0),r=this._imageWidth+o,this._animatedWidth>r&&(e.translate(this._imageWidth/2+o,.5),this._drawFillTextCropWidth(e,this._animatedWidth-r,this._animatedColorText)),e.restore(),this.width=this._animatedWidth,this.height=this._brandCircleSize,this._bottomShift=this._brandCircleSize-this._imageHeight):this._layout===V||this._layout===N?(a="12px "+b,e.font=a,l=e.measureText(this._txt).width,this.width=l+e.measureText("TradingView").width,e.save(),e.globalAlpha=.7,e.fillStyle=this._colorOldGray,e.fillText(this._txt,0,12),e.fillStyle=this._colorOldBlue,e.fillText("TradingView",l,12),e.restore()):function(e){return!C||e>x}(t)&&(this._needDisplayImage&&this._imageReady?(e.save(),c=(this._brandCircleSize-this._imageWidth)/2,e.translate(c,0),this._drawBgCircle(e),e.drawImage(this._image,0,-.5,this._imageWidth,this._imageHeight),u=12+(G?-.5:0),e.translate(this._imageWidth+u,-.5),(h=s(t))&&(this._drawTextStroke(e),this._drawTextFill(e)),e.restore(),this.width=this._imageWidth+c,this.width+=h?u+this._strokeCanv.width/this._upscaleRatio/Z:c,this.height=this._brandCircleSize,this._bottomShift=this._brandCircleSize-this._imageHeight):(e.save(),e.translate(G?-.5:0,-.5),(d=s(t))&&(this._drawTextStroke(e),this._drawTextFill(e)),e.restore(),d&&(this.width=this._strokeCanv.width/this._upscaleRatio/Z)))}}]),e}(),
Q=function(){function e(t){var i=t.layout,o=void 0===i?E:i,s=t.src,a=t.onReadyCallback;n(this,e),this._img=new Image,this._ready=!1,this.show=!1,this.width=0,this.height=0,this._layout=o,this._src=s,this._onReadyCallback=a,q&&(this._init=r(this._init,this)),this._init()}return l(e,[{key:"_init",value:function(){var e,t,i=this;this._checkLayout(),this.show&&(e=this._src.match(/(\w+)\.svg/),q&&e&&2===e.length?(t=e[1],this._img.src=J.fallbackImages[t],this._img.addEventListener("load",function(){var e=J.logoSizes;t in e?(i.width=e[t].width,i.height=e[t].height):(i.width=135,i.height=25),i._ready=!0,"function"==typeof i._onReadyCallback&&i._onReadyCallback()})):(this._img.src=this._src,this._img.addEventListener("load",function(){i.width=Math.round(i._img.width),i.height=Math.round(i._img.height),Y&&(i._img=o(i._img,i.width,i.height)),i._ready=!0,"function"==typeof i._onReadyCallback&&i._onReadyCallback()})))}},{key:"_checkLayout",value:function(){switch(this._layout){case V:case B:case N:case F:case j:case U:this.show=!0;break;case E:case O:case D:case R:case W:this.show=!1}}},{key:"draw",value:function(e){this._ready&&e.drawImage(this._img,0,0,this.width,this.height)}}]),e}(),t.Branding=function(){function e(t,i){var o,r=this;n(this,e),this._model=t,this._mainSeries=this._model.mainSeries(),this._canvasWidth=0,this._showAllowance=i,this._paneHeight=0,this._left=13,this._bottom=24,this._layout=E,this._needToShow=!0,this._customLogoSrc="",this._customLogoLink="",this._checkLayout(),this._layout!==V&&this._layout!==N||(this._left=8,this._bottom=5),o=function(){r._needToShow?r._layout===E?r._showBranding=window.innerWidth>=768:r._showBranding=!0:r._showBranding=!1},this._resizeHandlerDelayed=v(o,200),o(),window.addEventListener("resize",this._resizeHandlerDelayed),this._model.isSnapshot()?this._init():this._mainSeries.dataEvents().symbolResolved().subscribe(this,this._init),this._cubicBezier=new _.CubicBezier(.4,.01,.22,1)}return l(e,[{key:"destroy",value:function(){window.removeEventListener("resize",this._resizeHandlerDelayed)}},{key:"_init",value:function(){var e=this,t=this._mainSeries.symbolInfo()||{};this._powBy=new X({layout:this._layout,symbol:t.name,model:this._model,onReadyCallback:function(){return e._model.fullUpdate()}}),this._custom=new Q({layout:this._layout,src:this._customLogoSrc,onReadyCallback:function(){return e._model.fullUpdate()}}),this._openAnimation=null,this._closeAnimation=null}},{key:"_checkLayout",value:function(){if(d.enabled("widget"));else if(d.enabled("charting_library")||d.enabled("amp_terminal")||d.enabled("cqg_terminal")||d.enabled("trading_terminal")){var e=JSON.parse(K.logo)||{};e.image?(this._customLogoSrc=e.image,this._customLogoLink=e.link,this._needToShow=d.enabled("widget_logo"),d.enabled("link_to_tradingview")?this._layout=j:this._layout=U):(this._layout=W,this._needToShow=d.enabled("widget_logo"))}else this._layout=E}},{key:"_startOpenAnimation",value:function(){null===this._openAnimation&&(null!==this._closeAnimation&&(this._closeAnimation.stop(),this._closeAnimation=null),
this._openAnimation=(0,m.doAnimate)({from:this._currentStateForAnimation(),to:this._openedStateForAnimation(),duration:200,easing:this._cubicBezier.easingFunc,onStep:this._animatedDrawStep.bind(this)}))}},{key:"_startCloseAnimation",value:function(){null===this._closeAnimation&&(null!==this._openAnimation&&(this._openAnimation.stop(),this._openAnimation=null),this._closeAnimation=(0,m.doAnimate)({from:this._currentStateForAnimation(),to:this._closedStateForAnimation(),duration:200,easing:this._cubicBezier.easingFunc,onStep:this._animatedDrawStep.bind(this)}))}},{key:"_currentStateForAnimation",value:function(){return this._powBy.width}},{key:"_closedStateForAnimation",value:function(){return this._powBy.minimizedAnimationWidth()}},{key:"_openedStateForAnimation",value:function(){return this._powBy.maximizedAnimationWidth()}},{key:"_animatedDrawStep",value:function(e,t){this._powBy.animatedDrawStep(e,t),this._model.lightUpdate()}},{key:"_hasAnimation",value:function(){return this._powBy.hasAnimation()}},{key:"updateAllViews",value:function(){}},{key:"priceAxisViews",value:function(){return[]}},{key:"onClickOutside",value:function(){}},{key:"hasContextMenu",value:function(){return!1}},{key:"hitTest",value:function(e){var t=this;return!this._showBranding||d.enabled("logo_without_link")?null:this._powBy&&this._layout!==E&&this._layout!==B&&this._layout!==F&&(0,u.pointInBox)(e,(0,c.box)(new c.Point(this._left,this._paneHeight-Math.max(this._powBy.height,void 0!==this._custom?this._custom.height:0)-this._bottom),new c.Point(this._left+Math.max(this._powBy.width,void 0!==this._custom?this._custom.width:0),this._paneHeight-this._bottom)))?new p.HitTestResult(p.HitTestResult.CUSTOM,{mouseClickHandler:function(){window.open(t.tvUrl(),"_blank").opener=null},mouseEnterHandler:function(){t._hasAnimation()&&t._startOpenAnimation()},mouseLeaveHandler:function(){t._hasAnimation()&&t._startCloseAnimation()}}):null}},{key:"tvUrl",value:function(){var e,t="https://www.tradingview.com/";if(this._customLogoLink)return this._customLogoLink;if(this._layout===W||this._layout===j){switch(e=void 0,!0){case d.enabled("charting_library"):e="library";break;case d.enabled("trading_terminal"):case d.enabled("amp_terminal"):case d.enabled("cqg_terminal"):e="trading-terminal"}return t+="/"===t[t.length-1]?"?":"&",t+="utm_source="+window.location.origin+"&utm_medium=library"+(e?"&utm_campaign="+e:"")}return t}},{key:"draw",value:function(e){if(this._showBranding){var t=0;K.utm=!0,this._powBy&&this._powBy.show&&(t=this._powBy.height-this._powBy.bottomShift(),e.save(),e.translate(this._left,this._paneHeight-this._bottom-t),this._powBy.draw(e,this._canvasWidth),e.restore()),this._custom&&this._custom.show&&(e.save(),e.translate(this._left,this._paneHeight-this._bottom-t-this._custom.height),this._custom.draw(e),e.restore())}}},{key:"renderer",value:function(e,t){return this._paneHeight=e,this._canvasWidth=t,{draw:this.draw.bind(this),hitTest:this.hitTest.bind(this)}}},{key:"paneViews",value:function(e){if(!this._showAllowance())return[]
;var t=d.enabled("move_logo_to_main_pane");return t&&e.isMainPane()||!t&&e.isLast()||e.isMaximized()?[{renderer:this.renderer.bind(this)}]:[]}}]),e}()},GUQs:function(e,t,i){"use strict";function n(e){e.cancelable&&e.preventDefault()}function o(e){return function(t){n(t),e()}}i.d(t,"a",function(){return n}),i.d(t,"b",function(){return o})},GVHu:function(e,t,i){"use strict";(function(e,n,o){function r(e,t,i,n){this._study=e,this.m_series=t,this.m_model=i,this._plotName=n,this._visible=!1,this._points=[new Y(0,0)],this._invalidated=!0,this._lineRenderer=new f}function s(e,t,i){var n,o,r=new G(t,i,!0);for(r.addExclusion("visible"),r.addExclusion("precision"),r.addExclusion("minTick"),n=0;n<e.inputs.length;++n)(o=e.inputs[n]).isHidden&&(r.addExclusion("inputs."+n.toString()),r.addExclusion("inputs."+o.id));return r}function a(e,t){var i,n,o,r;if(t.plots)for(i=0;i<t.plots.length;i++)o=(n=t.plots[i]).id,oe.isColorerPlot(n)||(r={visible:!0,color:"#0496FF",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:2,plottype:re.Line,histogramBase:0,transparency:50,trackPrice:!1,joinPoints:!1},oe.isBarColorerPlot(n)&&(r.transparency=0),r.plottype=n.type,r.title=o,e.styles&&o in e.styles&&TradingView.merge(r,e.styles[o]),e.styles[o]=r)}function l(e,t,i,o){var r,s,a,c,u,h,d,p,_,f;for(this._titleStrCache={},this._titleInPartsCache={},this._resolvedSymbols={},this._priceAxisViewsBase=[],this._priceLinesAxisViews=[],this._paneViews=[],this._hlinesPriceAsisViews=[],this._horizlinesPriceAsisViews=[],O.call(this,e),this._model=e,this._chartApi=e._chartApi,this._series=i instanceof TradingView.Series?i:this._model.mainSeries(),i instanceof l&&(this._source=i,this._isChildStudy=!0,this._source.setChild(this)),this._numericFormatter=new Z,this._metaInfo=o,this._properties=t,this._properties.listeners().subscribe(this,this._onPropertiesChanged),this._properties.visible.listeners().subscribe(this,this.visibleChanged),this._properties.visible.listeners().subscribe(this,this.processHibernate),r=0;r<this._metaInfo.plots.length;r++)s=this._metaInfo.plots[r].id,null!=(a=this.properties().styles[s])&&null!=a.visible&&a.visible.listeners().subscribe(this,this.processHibernate);for(c in this._metaInfo.graphics)for(u in this._metaInfo.graphics[c])(h=this._properties.graphics[c][u]).visible&&h.visible.listeners().subscribe(this,this.processHibernate);if(this._showStudyArgumentsProperty=this.model().properties().paneProperties.legendProperties.showStudyArguments,this._turnaroundCounter=0,this._turnaround="st"+this._turnaroundCounter,this._status="",this._loading=!0,this._studyId=null,this._plotFields=[],d=this.metaInfo().plots)for(r=0,p=d.length;r<p;r++)u=d[r].id,this._plotFields.push(u);this._invalidateLastNonEmptyPlotRowCache(),this.m_data=new Q(le(this._metaInfo),function(e,t){return null==e[t]}),this._graphics=new j,this._plotOffsets={},this._plotOffsetsMetaInfoOverride={},this._studyModified=!1,this._tagsChanged=new n,this.createViews(),_=this,this._handler=function(e){_.onData(e)},this._handler.isTVScriptStrategy=this._metaInfo.isTVScriptStrategy,
this._recreatePriceFormattingDependencies(),_=this,this._properties.precision.listeners().subscribe(this,this._precisionChanged),this._showStudyArgumentsProperty.listeners().subscribe(this,this.invalidateTitleCache),this._properties.description.listeners().subscribe(this,this.invalidateTitleCache),this._properties.inputs.listeners().subscribe(this,this.invalidateTitleCache),this._properties.shortDescription&&this._properties.shortDescription.listeners().subscribe(this,this.invalidateTitleCache),de.enabled("update_study_formatter_on_symbol_resolve")&&e.mainSeries().dataEvents().symbolResolved().subscribe(this,this._recreatePriceFormattingDependencies),e.mainSeries().dataEvents().symbolResolved().subscribe(this,this.invalidateTitleCache),_=this,f={},this._simplePlotsCount=o.plots.filter(function(e,t){if(_.isLinePlot(t))return!0;if(_.isOHLCSeriesPlot(t)){var i=_.metaInfo().plots[t].target;return!f[i]&&(f[i]=i,!0)}return!1}).length,this._properties.showInDataWindow.listeners().subscribe(e,e.fullUpdate),this.hasBarColorer()&&this._properties.visible.listeners().subscribe(e.mainSeries(),e.mainSeries().invalidateBarStylesCache),this.onStart=new n,this._childStudyByRebind=new n,this._symbolsResolved=new n,this._formatterChanged=new n,this._priceStepChanged=new n,this.parentSource().formatterChanged().subscribe(this,this._onSourceFormatterChanged),this.parentSource().priceStepChanged().subscribe(this,this._onSourcePriceStepChanged),this._ongoingDataUpdate=Promise.resolve(),this._isDestroyed=!1,this._definitionsViewModel=null}function c(e,t){return e&&e[t]&&e[t].hasOwnProperty("showLast")?e[t].showLast.value():null}var u=i("Eyy1"),h=u.assert,d=u.ensureNotNull,p=i("hsV8").unpackNonSeriesData,_=i("38az").StudyBarColorer,f=i("l4sv").HorizontalLineRenderer,m=i("AXy7"),y=m.BandPaneView,g=m.BandBackgroundPaneView,v=m.HlineFillPaneView,S=i("hezA").StudyPriceAxisView,b=i("KtbP").PanePriceAxisView,w=i("I9zs"),P=w.StudyPaneView,C=w.StudyBackgroundPaneView,T=w.StudyPlotShapesPaneView,x=w.StudyPlotCharsPaneView,I=w.StudyPlotArrowsPaneView,L=w.StudyPlotBarsPaneView,M=w.StudyPlotCandlesPaneView,A=i("x40+"),k=A.PlotFillPaneView,E=A.AreaBackgroundPaneView,O=i("7ktv").PriceDataSource,D=i("it7y").StudyDataWindowView,V=i("8qoI").StudyLegendView,B=i("2kV1").StudyStatusView,R=i("jenN"),N=R.emptyStudyGraphics,F=R.loadStudyGraphics,W=R.saveStudyGraphics,j=R.LiveStudyGraphics,U=R.createGraphicsPaneViews,z=R.createGraphicsPriceAxisViews,H=i("XzZr").ChartApiInterface,Y=i("aO4+").Point,G=i("Ocx9").DefaultProperty,q=i("kcTO").PriceFormatter,K=i("nEwK").VolumeFormatter,Z=i("zXvd").NumericFormatter,J=i("GH0z").PercentageFormatter,X=i("k9/m"),Q=X.PlotList,$=X.PlotRowSearchMode,ee=X.mergeMinMax,te=i("972a").MarkLocation,ie=i("0YCj"),ne=(i("cBZt").extractStudyId,i("TcSq").extractPineId,
i("FQhm")),oe=i("23IT"),re=oe.LineStudyPlotStyle,se=i("hayr").propertyPages,ae=i("TmNs").StudyPriceLineAxisView,le=i("w4Ji").studyPlotFunctionMap,ce=i("jy4L").makeNextStudyId,ue=i("jy4L").makeNextSymbolId,he=i("5fI3").encodeExtendedSymbol,de=i("Kxc7"),pe=i("uOxu").getLogger("Chart.Study"),_e=(Number(window.TELEMETRY_SERVER_TIME_DIFF_THRESHOLD),de.enabled("datasource_copypaste")),fe=100;r.prototype.update=function(){this._invalidated=!0},r.prototype.updateImpl=function(){this._visible=!1;var e=this._study.lastValueData(this._plotName,!0);e.noData||(this._visible=!0,this._points=[new Y(0,e.coordinate)],this._color=e.color)},r.prototype.renderer=function(){this._invalidated&&(this.updateImpl(),this._invalidated=!1);var e={};return e.width=this.m_model.timeScale().width(),e.height=this._study.priceScale().height(),e.points=this._points,e.color=this._color,e.linewidth=this._study.properties().styles[this._plotName].linewidth.value(),e.linestyle=CanvasEx.LINESTYLE_DOTTED,e.visible=this._visible,this._lineRenderer.setData(e),this._lineRenderer},inherit(l,O),TradingView.Study=l,l.prototype.lastValueData=function(e,t,i){var n,o,r,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P,C,T,x={noData:!0};if(this._model.timeScale().isEmpty()||null==this.priceScale()||this.priceScale().isEmpty()||this.data().isEmpty())return x;if(null===(n=this._model.timeScale().visibleBarsStrictRange()))return x;if(!this.properties().visible.value())return x;if(o=this.properties().styles,r=this.properties().ohlcPlots,o&&o[e]&&(s=o[e]),r&&r[e]&&(s=r[e]),!s||!s.visible.value())return x;for(l=this.metaInfo().plots,a=0;a<l.length&&!(l[a].id===e||this.isOHLCClosePlot(a)&&l[a].target===e);a++);if(c=a+1,u=this.offset(e),null==(h=this.nearestIndex(n.lastBar()-u,$.NearestLeft,c)))return x;if(p=null!==(d=this._lastNonEmptyPlotRow(c))&&n.contains(d.index),_=null!==d?d.value:null,!(f=t||p?_:this.data().valueAt(h))||!isNumber(f[c]))return x;for(m={noData:!1},y=null,g=null,S=0;S<l.length;S++)l[S].target===e&&(this.isSelfColorerPlot(S)||this.isOHLCColorerPlot(S))&&(y=S,g=this.metaInfo().palettes[l[S].palette],v=this.properties().palettes[l[S].palette]);return b=f[c],i&&(m.price=b),(w=this.firstValue(!0))?(m.text=this.priceScale().formatPrice(b,w),m.formattedPriceAbsolute=this.priceScale().formatPriceAbsolute(b),m.formattedPricePercentage=this.priceScale().formatPricePercentage(b,w),P=s.color.value(),y&&f.length>y+1&&void 0!==(C=f[y+1])&&null!==C?(T=g.valToIndex?g.valToIndex[C]:C,m.color=v.colors[T].color.value()):m.color=P,m.floatCoordinate=this.priceScale().priceToCoordinate(b,w,!0),m.coordinate=Math.round(m.floatCoordinate),m.item=f,m):x},l.prototype.isFailed=function(){return this._failed},l.prototype.isLoading=function(){return this._loading},l.prototype.series=function(){return this._series},l.prototype.model=function(){return this._model},l.prototype.currency=function(){var e=this.metaInfo();return Boolean(e)&&e.is_price_study?this.parentSource().currency():null},l.prototype._invalidateLastNonEmptyPlotRowCache=function(){this._lastNonEmptyPlotRowCache={}},
l.prototype.clearData=function(){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.clear(),this._graphics.clear&&this._graphics.clear(),this._plotOffsets={}},l.prototype.onTagsChanged=function(){return this._tagsChanged},l.prototype.properties=function(){return this._properties},l.prototype.state=function(e,t){var i,n,o,r,s=TradingView.className(this.constructor),a={type:s,id:this.id(),state:this.properties().state(),zorder:this.zorder()};for(this.metaInfo()instanceof ie?a.metaInfo=TradingView.clone(this.metaInfo().state()):(a.metaInfo=TradingView.clone(this.metaInfo()),a.metaInfo.id=ie.parseIdString(a.metaInfo.id+(a.metaInfo.version?"-"+a.metaInfo.version:"")).fullId),e&&(a.data=this.data().state(),a.data.symbols=this._resolvedSymbols,a.data.graphics=W(this.graphics()),a.data.plotOffsets=this._plotOffsets),this.ownerSource()&&(a.ownerSource=this.ownerSource().id()),i=0;i<this._metaInfo.inputs.length;i++)"bar_time"===this._metaInfo.inputs[i].type&&(n=this._metaInfo.inputs[i].id,(o=a.state.inputs[n])<0&&(r=this._rightOffsetToUnixTime(-o),a.state.inputs[n]=r&&r>=0?r:0));return this._isChildStudy&&ie.patchChildStudyMetaInfoState(a),a},l.prototype._plotsForAlert=function(){var e=this,t=this._metaInfo,i=[oe.isLinePlot,oe.isShapesPlot,oe.isCharsPlot,oe.isArrowsPlot,oe.isOhlcPlot,oe.isAlertConditionPlot];return t.plots.map(function(e,t){return e.pinePlotIndex=t,e}).filter(function(e){return i.some(function(t){return t(e)})}).map(function(i){var n={id:i.id,type:i.type,pinePlotIndex:i.pinePlotIndex,offset:e.offset(i.id)};return t.styles&&void 0!==t.styles[i.id]&&(n.title=t.styles[i.id].title||"",n.text=t.styles[i.id].text||""),i.target&&t.ohlcPlots&&t.ohlcPlots[i.target]&&(n.ohlcTitle=t.ohlcPlots[i.target].title),n})},l.prototype._collectDepsForAlert=function(){throw new Error("Not implemented")},l.prototype.idForAlert=function(){return O.prototype.idForAlert.call(this)},l.prototype.dependenciesForAlerts=function(){throw new Error("Not implemented")},l.prototype._hasPlotData=function(){var e=this.data();return!e.isEmpty()&&null!==e.findLast(function(e,t){var i,n;for(i=t.length-1;i>0;i--)if(null!==(n=t[i])&&void 0!==n&&!isNaN(n))return!0;return!1})},l.prototype._hasAvailableAlertPlots=function(){return!1},l.prototype._hasAlertablePlots=function(){return(this.metaInfo().plots||[]).some(function(e){return"line"===e.type})},l.prototype._hasAlertConditions=function(){if(this.metaInfo().plots.some(oe.isAlertConditionPlot))return!0;var e=this.stateForAlert();return!(!e.alerts||!e.alerts.conditions)},l.prototype.hasStateForAlert=function(){return!1},l.prototype.stateForAlert=function(){throw new Error("Not implemented")},l.prototype.isSavedInStudyTemplates=function(){for(var e=0;e<this._metaInfo.inputs.length;e++)if("bar_time"===this._metaInfo.inputs[e].type)return!1;return!0},l.prototype.restoreData=function(e){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.restoreState(e),this._resolvedSymbols=e.symbols,this._graphics=e.graphics?F(e.graphics):N(),this._postProcessGraphics(),this._plotOffsets=e.plotOffsets,
this._loading=!1},l.prototype.restart=function(){this._restarting=!0,this.clearData(),de.enabled("stop_study_on_restart")&&this.stop(),setTimeout(this.start.bind(this),0)},l.prototype.stop=function(e){if(!0===e&&this._children)for(var t=0;t<this._children.length;++t)this._children[t].stop(!0);this._chartApi&&this._chartApi.connected()&&this._studyId&&this._chartApi.removeStudy(this._studyId,this._handler,this._isChildStudy),this._studyId=null,this.clearData(),this._unsubscribeExtendedHours(),this.recalculate()},l.prototype._isStopped=function(){return null===this._studyId},l.prototype.symbolsResolved=function(){return this._symbolsResolved},l.prototype.resolvedSymbolInfoBySymbol=function(e){return this._resolvedSymbols&&e&&this._resolvedSymbols[e]||null},l.prototype._onSymbolResolved=function(e){},l.prototype._resolveSymbol=function(e){if(""===e)return new Promise(function(t,i){t(e)});var t=e;return new Promise(function(i,n){this._chartApi.resolveSymbol(ue(),he({symbol:t}),function(t){switch(t.method){case"symbol_resolved":this._loading=!1,this._failed=!1,this._resolvedSymbols[e]=t.params[1],this._onSymbolResolved(e),this.invalidateTitleCache(!0),i(e);break;case"symbol_error":if(this._loading=!1,this._failed=!0,"permission denied"===t.params[1]&&t.params[2])switch(t.params[2]){case TradingView.Series.PD_REASON_EXTENDED_HOURS:break;case TradingView.Series.PD_REASON_SYMBOL:if(t.params[3])return void i(this._resolveSymbol(t.params[3]));break;default:return void i(this._resolveSymbol(t.params[2]))}n(e)}}.bind(this))}.bind(this))},l.prototype._allSymbolsAreResolved=function(){var e,t,i,n,o=[];for(e=0;e<this._metaInfo.inputs.length;e++)"symbol"===this._metaInfo.inputs[e].type&&(t=this._metaInfo.inputs[e].id,""===(i=this._properties.inputs[t].value())||this._resolvedSymbols[i]||(n=this._resolveSymbol(i),o.push(n)));return 0===o.length?Promise.resolve():Promise.all(o).catch(function(e){return this._status=window.t("Invalid Symbol"),this.stop(!0),this._model.updateSource(this),Promise.reject("Invalid symbol, "+e)}.bind(this)).then(function(){null!==this._studyId&&this.stop(!0),this.start(!0),this._symbolsResolved.fire()}.bind(this))},l.prototype._allInputsAreValid=function(){var e,t,i;for(e=0;e<this._metaInfo.inputs.length;e++)if("bar_time"===this._metaInfo.inputs[e].type&&(t=this._metaInfo.inputs[e].id,void 0===(i=this._properties.inputs[t].value())||null==i))return!1;return!0},l.prototype.sourceId=function(){return this._studyId},l.prototype.parentSource=function(){return this._source||this._series},l.prototype.source=function(){return this.parentSource()},l.prototype.ownerSource=function(){return this._isChildStudy?this._source:O.prototype.ownerSource.call(this)},l.prototype.getAllOwnerSources=function(){for(var e=[],t=this.ownerSource();null!=t;)e.push(t),t=t.ownerSource();return e},l.prototype.isChildStudy=function(){return!!this._isChildStudy},l.prototype.setChild=function(e){e instanceof l&&e.source()===this&&(this._children||(this._children=[]),-1===this._children.indexOf(e)&&this._children.push(e))},
l.prototype.unsetChild=function(e){if(e instanceof l&&e.source()===this&&this._children){var t=this._children.indexOf(e);~t&&this._children.splice(t,1)}},l.prototype.hasChildren=function(){return!(!this._children||!this._children.length)},l.prototype.getAllChildren=function(){var e,t,i,n;if(!Array.isArray(this._children))return[];for(e=this._children.slice(),t=0;t<e.length;++t)for(i=e[t].getAllChildren(),n=0;n<i.length;++n)~e.indexOf(i[n])||e.push(i[n]);return e},l.prototype._debugId=function(){var e=[];return this._studyId&&e.push(this._studyId),e.push(this._metaInfo.fullId),e.push(this._metaInfo.description),JSON.stringify({study:e})},l.prototype.isStarted=function(){return!!this._studyId},l.prototype.isRestarting=function(){return!!this._restarting},l.prototype.isVisible=function(){var e,t,i;if(!this.properties().visible.value())return!1;if(this._metaInfo.plots.length>0)return!0;for(e in this._metaInfo.graphics)for(t in this._metaInfo.graphics[e])if(!(i=this.properties().graphics[e][t]).visible||i.visible.value())return!0;return!!this._metaInfo.isTVScriptStrategy},l.prototype.start=function(e,t){var i,n=this._model.mainSeries();n.isStarted()?(this._isChildStudy&&this._source.isHibernated()&&this._source.start(),i=!this._isChildStudy&&!this.hasChildren()&&!this.isVisible(),!this._chartApi||!this._chartApi.connected()||i&&!0!==t||this._allSymbolsAreResolved().then(function(){this._startAfterSymbolsResolved(e,t)}.bind(this)).catch(function(e){pe.logError("ERROR: "+this._debugId()+" start failed, "+e),delete this._restarting}.bind(this))):n.dataEvents().completed().subscribe(this,function(){this.start(e,t)},!0)},l.prototype._getStudyIdWithLatestVersion=function(){var e=ie.cutDollarHash(this._metaInfo.id),t=e;return e.indexOf("@tv-scripting")>=0?t+="-101!":t+="-"+this._metaInfo.version,t},l.prototype._startAfterSymbolsResolved=function(e,t){var i,n;if(!this.isStarted()||this._restarting){if(this._isChildStudy){if(!this._source.isStarted()||this._source.isRestarting())return void this._source.onStart.subscribe(this,this._startAfterSymbolsResolved,!0);ie.setChildStudyMetaInfoPropertiesSourceId(this._metaInfo,this._source.sourceId(),this._properties)}if(this._studyId=ce(),delete this._restarting,this._allInputsAreValid()&&(this._inputs=this.inputs({keepOptionalSymbolsEmpty:!0}),i=this._getStudyIdWithLatestVersion(),this._incrementTurnaround(),this._chartApi.createStudy(this._studyId,this._turnaround,this._isChildStudy?this._source.sourceId():this._series._seriesId,i,this._inputs,this._handler,this._isChildStudy),this._studyName=i,this._subscribeExtendedHours(),this.onStart.fire(),!0===e&&this._children))for(n=0;n<this._children.length;++n)this._children[n].start(!0,t)}},l.prototype._rightOffsetToUnixTime=function(e){var t,i=null;return this._series.bars().size()>=e&&(t=d(this._series.bars().lastIndex())-e,i=d(this._series.bars().valueAt(t))[TradingView.TIME_PLOT]),i},l.prototype.getSymbolString=function(e){return this._series&&this._series.extendedHours.value()?"="+JSON.stringify({symbol:e,session:"extended"}):e},
l.prototype._titleInputs=function(e){return this.inputs({symbolsForDisplay:!0,skipHiddenInputs:!0,skipFakeInputs:!1,fakeInputsForDisplay:!0,asObject:!1,skippedGroups:[],noExchanges:e})},l.prototype.inputsForAlert=function(){var e=this.offset(),t=this.inputs();return e&&t.push(e),t},l.prototype.inputs=function(e){var t={symbolsForDisplay:!1,symbolsForChartApi:!0,skipHiddenInputs:!1,skipFakeInputs:!1,skipBooleanInputs:de.enabled("dont_show_boolean_study_arguments"),asObject:!0,skippedGroups:[],noExchanges:!1,keepOptionalSymbolsEmpty:!1};return TradingView.merge(t,e),this._buildInputs(t)},l.prototype._buildInputs=function(e){var t,i;h(!!e,"options not set"),t={};try{t=this._prepareInputs(e)}catch(e){pe.logWarn("Failed to prepare study inputs: "+e)}return e.asObject?(i={},Object.keys(t).forEach(function(e){null!=t[e]&&(i[e]=t[e])}),i):(i=[],Object.keys(t).forEach(function(e){null!=t[e]&&i.push(t[e])}),i)},l.prototype._prepareInputs=function(e){var t,i,n,o;for(h(!!e,"options not set"),t={},i=0;i<this._metaInfo.inputs.length;i++)(n=this._metaInfo.inputs[i]).isFake&&e.skipFakeInputs||n.isHidden&&e.skipHiddenInputs||"bool"===n.type&&e.skipHiddenInputs&&e.skipBooleanInputs||-1===e.skippedGroups.indexOf(n.groupId)&&(o=this._prepareInput(n,e),t[n.id]=TradingView.clone(o));return t},l.prototype._prepareInput=function(e,t){var i=this._prepareInputValue(e,t);return!e.isFake||t.fakeInputsForDisplay?i:t.onlyAtomValues?i:{v:i,f:!0,t:e.type}},l.prototype._prepareInputValue=function(e,t){var i,n,o,r,s,a=e.id;if("symbol"===e.type){if(i=this._properties.inputs[a].value(),n=this._resolvedSymbols&&this._resolvedSymbols[i],""===i&&e.optional){if(t&&t.keepOptionalSymbolsEmpty)return i;i=this._model.mainSeries().symbol(),n=this._model.mainSeries().symbolInfo()}return t&&t.symbolsForDisplay?n&&(o=n.exchange,i=n.name,o&&!t.noExchanges&&(i+=", "+o)):(n&&(i=n.ticker||n.full_name),t&&t.symbolsForChartApi&&(i=this.getSymbolString(i))),i}return"bar_time"===e.type?((r=this._properties.inputs[a].value())<0&&(r=(s=this._rightOffsetToUnixTime(-r))&&s>=0?s:r),r):this._metaInfo.isTVScript||this._metaInfo.pine?"text"===a?this._metaInfo.defaults.inputs.text:"pineId"===a?this._metaInfo.scriptIdPart:"pineVersion"===a?this._metaInfo.pine?this._metaInfo.pine.version:"-1":this._properties.inputs[a].value():this._properties.inputs[a].value()},l.prototype._rebindToSource=function(e,t){var i,n,o,r,s,a,c=this.parentSource();if(this._isChildStudy){if(this._source.unsetChild(this),delete this._nonPriceParent,n=null,e===this._model.mainSeries())delete this._source,delete this._isChildStudy,delete this._ownerSource,i=this._series._seriesId,n=H.REBIND_STUDY_CHILD_TO_STANDALONE;else{if(!(e instanceof l))return pe.logError("Unable to rebind study to source of this type"),!1;this._ownerSource=e,this._source=e,i=this._source.sourceId(),this._source.setChild(this),this._source.isHibernated()&&this._source.start()}this._incrementTurnaround(),this._chartApi.rebindStudy(this._studyId,this._turnaround,i,this._studyName,t,this._handler,n)}else{
if(!(e instanceof l))return pe.logError("Unable to rebind study to source of this type"),!1;if((o=e.isHibernated())&&e.start(),r=!1,this._canCreateStudyWithRebindType(H.REBIND_STUDY_STANDALONE_TO_CHILD)&&(this._incrementTurnaround(),r=this._chartApi.rebindStudy(this._studyId,this._turnaround,e.sourceId(),this._studyName,t,this._handler,H.REBIND_STUDY_STANDALONE_TO_CHILD)),!r)return o&&e.stop(),!1;this._isChildStudy=!0,this._ownerSource=e,this._source=e,this._source.setChild(this),this._childStudyByRebind.fire()}return this.m_priceScale!==(s=e.priceScale())&&this._model.paneForSource(this)===(a=this._model.paneForSource(e))&&a.move(this,s,!0),c.formatterChanged().unsubscribe(this,this._onSourceFormatterChanged),this.parentSource().formatterChanged().subscribe(this,this._onSourceFormatterChanged),c.priceStepChanged().unsubscribe(this,this._onSourcePriceStepChanged),this.parentSource().priceStepChanged().subscribe(this,this._onSourcePriceStepChanged),this._recreatePriceFormattingDependencies(),!0},l.prototype.childStudyByRebind=function(){return this._childStudyByRebind},l.prototype._changeInputsImpl=function(e,t){var i,n,o,r,s,a=this.source(),c=this._properties.inputs&&this._properties.inputs.state(),u=ie.getSourceIdByInputs(this._metaInfo.inputs,c),h=!0;if(u)if("high"===u||"open"===u||"low"===u||"close"===u||"hl2"===u||"ohl3"===u||"ohlc4"===u)a=this._model.mainSeries();else for(i=this._model.dataSources(),n=0;n<i.length;++n)if(i[n]instanceof l&&i[n].sourceId()===u){a=i[n];break}if(a!==this.source()){if(!this._rebindToSource(a,e)&&c)for(o in t)if(t.hasOwnProperty(o)&&t[o]!==e[o]&&0===e[o].indexOf(u)){r=this._properties.inputs[o],s=t[o],r.setValue(s),h=!1;break}}else this._incrementTurnaround(),this._chartApi.modifyStudy(this._studyId,this._turnaround,e,this._handler);this.invalidateTitleCache(),h&&(this._studyModified=h)},l.prototype._incrementTurnaround=function(){this._turnaround="st"+ ++this._turnaroundCounter},l.prototype._tryChangeInputs=function(){var e=TradingView.clone(this._inputs);this.isStarted()&&this._chartApi.connected()?this._allInputsAreValid()?this._allSymbolsAreResolved().then(function(){if(!this._isStopped()){var t=this.inputs({keepOptionalSymbolsEmpty:!0});JSON.stringify(t)!==JSON.stringify(this._inputs)&&(this._changeInputsImpl(t,e),this._inputs=t)}}.bind(this)).catch(function(e){pe.logError("ERROR: "+this._debugId()+" _tryChangeInputs: cannot modify study, "+e)}.bind(this)):this.stop():(this.stop(!0),this.start(!0)),this._tagsChanged.fire()},l.prototype.testInputValue=function(e,t){var i,n;return!ie.canBeChild(this._metaInfo)||!ie.isSourceInput(e)||(!(i=this._properties.inputs&&this._properties.inputs[e.id])||(n=l.getInputRebindType(e,i.value(),t),!!this._canCreateStudyWithRebindType(n)))},l.prototype._canCreateStudyWithRebindType=function(e){return e!==H.REBIND_STUDY_STANDALONE_TO_CHILD||this._chartApi.isCanCreateStudy(!0)},l.prototype.changeStyles=function(){var e=void 0!==this._metaInfo.inputs.find(function(e){return"symbol"===e.type})
;!this.isStarted()&&!e||this._restarting||(this._inputs?this._tryChangeInputs():this._chartApi&&this._chartApi.connected()&&this.restart(),this.hasBarColorer()&&this._model.mainSeries().invalidateBarStylesCache(),this.createViews(),this.recalculate(!0),this.updateAllViews())},l.prototype._onPropertiesChanged=function(){this.changeStyles(),ne.emit("study_properties_changed",this._id)},l.prototype._isModifiedStudyInputs=function(e){if(void 0===this._oldStudyInputs)return this._oldStudyInputs=e,!0;var t=Object.keys(this._oldStudyInputs);return h(t.length===Object.keys(e).length,"keys quantity should be equal"),t.forEach(function(t){h(e.hasOwnProperty(t),"key '"+t+"' should existing in studyInputs"),this._oldStudyInputs[t]!==e[t]&&(this._oldStudyInputs=e)},this),this._oldStudyInputs===e},l.prototype.visibleChanged=function(){this._series instanceof TradingView.Series&&this._series.invalidateBarColorerCache()},l.prototype.processHibernate=function(){this.isHibernateAllowed()&&(!this._studyId&&this.isVisible()&&this.start(),this._studyId&&!this.isVisible()&&this.stop())},l.prototype.isHibernated=function(){return!this.isVisible()&&!this._studyId},l.prototype.isHibernateAllowed=function(){return!this._isChildStudy&&!this.hasChildren()},l.prototype.lastPriceLabelFixedCoordinate=function(e){return this._priceAxisViewsCache[e]._fixedCoordinate},l.prototype.priceLabelText=function(e){var t,i,n,o;return 1===this._simplePlotsCount?this._metaInfo.shortDescription:(t=this._metaInfo.styles,i=this._metaInfo.ohlcPlots,t&&t[e]&&(n=t[e]),i&&i[e]&&(n=i[e]),o=n.title,this._metaInfo.is_price_study?this._metaInfo.shortDescription+":"+o:o)},l.prototype.createPriceAxisView=function(e){return new S(this,{plotIndex:e})},l.prototype.createPriceLineAxisView=function(e){return new ae(this,e)},l.prototype.createViews=function(){var e,t,i,n,o,s,a,l;if(this._priceAxisViewsBase=[],this._priceLinesAxisViews=[],this._paneViews=[],e={},this._priceAxisViewsCache={},this.metaInfo().plots)for(t=0;t<this.metaInfo().plots.length;t++)if(!(this.isSelfColorerPlot(t)||this.isTextColorerPlot(t)||this.isBarColorerPlot(t)||this.isOHLCColorerPlot(t)||this.isAlertConditionPlot(t)))if(i=this.metaInfo().plots[t].id,this.isBgColorerPlot(t))this._paneViews.push(new C(this,this._series,this._model,i));else if(this.isPlotShapesPlot(t))this._paneViews.push(new T(this,this._series,this._model,i));else if(this.isPlotCharsPlot(t))this._paneViews.push(new x(this,this._series,this._model,i));else if(this.isPlotArrowsPlot(t))this._paneViews.push(new I(this,this._series,this._model,i));else if(this.isOHLCSeriesPlot(t)){if(e[n=this.metaInfo().plots[t].target])continue;e[n]=n,this.isOHLCBarsPlot(t)?this._paneViews.push(new L(this,this._series,this._model,n)):this.isOHLCCandlesPlot(t)&&this._paneViews.push(new M(this,this._series,this._model,n)),o=this.createPriceAxisView(n),this._priceAxisViewsCache[n]=o,this._priceAxisViewsBase.push(o),this._paneViews.push(new b(o,this,this._model))}else o=this.createPriceAxisView(i),this._priceAxisViewsCache[i]=o,this._priceAxisViewsBase.push(o),
this._priceLinesAxisViews.push(this.createPriceLineAxisView(i)),this._paneViews.push(new P(this,this._series,this._model,i)),this.properties().styles[i].trackPrice.value()&&this._paneViews.push(new r(this,this._series,this._model,i)),this._paneViews.push(new b(o,this,this._model));if(this._properties.bands)for(t=0;t<this._properties.bands.childCount();t++)this._properties.bands[t].visible.value()&&this._paneViews.push(new y(this._properties.bands[t],this));if(this._properties.bandsBackground&&this._paneViews.push(new g(this)),s=this._paneViews,U(this,this.model()).then(function(e){for(var t=0;t<e.length;t++)s.push(e[t]);this._model.lightUpdate()}.bind(this)),this._properties.areaBackground&&this._paneViews.push(new E(this)),this._properties.filledAreas&&this._metaInfo.filledAreas)for(t=0;t<this._metaInfo.filledAreas.length;++t)a=this._metaInfo.filledAreas[t],l=this._properties.filledAreasStyle[a.id],a.type===ie.FilledArea.TYPE_PLOTS||a.palette?this._paneViews.push(new k(this,a,l)):a.type===ie.FilledArea.TYPE_HLINES?this._paneViews.push(new v(this,a,l)):pe.logWarn("Unsupported filledArea type: "+a.type);this._dataWindowView||(this._dataWindowView=new D(this,this._model)),this._legendView||(this._legendView=new V(this,this._model)),this._statusView||(this._statusView=new B(this,this._model.properties().scalesProperties.textColor)),this._priceAxisViews=[].concat(this._priceAxisViewsBase,this._hlinesPriceAsisViews,this._horizlinesPriceAsisViews)},l.prototype.recalculate=function(e){var t=this._model.paneForSource(this);this._model.recalculatePane(t,e),this._model.updateSource(this)},l.prototype.data=function(){return this.m_data},l.prototype.metaInfo=function(){return this._metaInfo},l.prototype.graphicsInfo=function(){return this._metaInfo.graphics},l.prototype.status=function(){return this._status},l.prototype.title=function(e,t,i,n){var o,r;return i=void 0===i?!this._showStudyArgumentsProperty.value():i,o=JSON.stringify([e,t,i,n]),this._titleStrCache[o]?this._titleStrCache[o]:this._titleInPartsCache[o]?this._joinTitlesParts(this._titleInPartsCache[o]):(r=this._title(e,t,i,n),this._titleStrCache[o]=r,r)},l.prototype.titleInParts=function(e,t,i,n){var o,r;return i=void 0===i?!this._showStudyArgumentsProperty.value():i,o=JSON.stringify([e,t,i,n]),this._titleInPartsCache[o]?this._titleInPartsCache[o]:(r=this._titleInParts(e,t,i,n),this._titleInPartsCache[o]=r,r)},l.prototype._title=function(e,t,i,n){var o=this._titleInParts(e,t,i,n);return this._joinTitlesParts(o)},l.prototype._joinTitlesParts=function(e){var t=e[1].join(", ");return e[0]+(t.length>0?" ("+t+")":"")},l.prototype._titleInParts=function(e,t,i,n){var o,r,s,a,l,c,u,h,d,p,_,f,m,y="";if(y=e?this._metaInfo.shortDescription||this._properties.shortDescription&&this._properties.shortDescription.value()||"Study":this._metaInfo.description||this._properties.description&&this._properties.description.value()||"Study",t=t||{},o=window.t(y),r=[],!i&&(r=this._titleInputs(n)||[]).length>0){if(s={},
this._isChildStudy)for(a=0;a<this._metaInfo.inputs.length;++a)if(l=this._metaInfo.inputs[a],ie.isSourceInput(l)){c=l.id,(u=this._properties.inputs[c].value()).indexOf("$")>=0&&this._source&&(h=this._source.metaInfo(),d=this._source.title(e,null,!0,n),1===h.plots.length?s[u]=d:(p=u.split("$")[1],_=h.plots[p].id,f=h.styles&&h.styles[_]&&h.styles[_].title||_,s[u]=d+":"+f));break}m=this,r=r.map(function(e){var i=isNumber(e)?m._numericFormatter.format(e):s&&s[e]||e;return t[i]&&(i=t[i]),i})}return[o,r]},l.prototype.invalidateTitleCache=function(e){if(this._titleStrCache={},this._titleInPartsCache={},!0===e&&this._children)for(var t=0;t<this._children.length;++t)this._children[t].invalidateTitleCache(e)},l.prototype.graphics=function(){return this._graphics},l.prototype.turnaround=function(e){return!0===e?this.source().turnaround(!0)+"_"+this._turnaround:this._turnaround},l.prototype._checkTurnaround=function(e){return e===this._turnaround||e===this._model.mainSeries().turnaround()||e===this.turnaround(!0)},l.prototype._getStatusTextOnStudyError=function(e){var t;return(t=e.split(":",2)[0]).length>0?window.t(t):""},l.prototype._handleStudyError=function(e){delete this._loadingStartTime,this._failed=!0,this._loading=!1,this.clearData(),e.params[2],this._status=this._getStatusTextOnStudyError(e.params[2]),this._statusView.update(),this._model.updateSource(this)},l.prototype.onData=function(e){var t,i,n,o=this;switch(e.method){case"study_loading":this._status=window.t("loading..."),this._failed=!1,this._loading=!0,this._statusView.update(),this._model.updateSource(this),o._loadingStartTime=(new Date).getTime();break;case"study_error":this._handleStudyError(e);break;case"study_completed":if(!this._checkTurnaround(e.params[1]))return;t="chartSession:"+o._chartApi._sessionid,i=(new Date).getTime()-this._loadingStartTime,pe.logDebug(t+", Study "+this._metaInfo.description+" loading took "+i+" ms"),delete this._loadingStartTime,this._loading=!1,this._status="",this._statusView.update(),n=this._model.paneForSource(this),this._model.recalculatePane(n),this._updateSources(),this._model.fullUpdate();break;case"study_deleted":break;case"data_update":if(e.params.customId!==this.sourceId()||!this._checkTurnaround(e.params.turnaround))return;h(!!e.params.nonseries,"data.params.nonseries is missing"),this._onDataUpdate(e.params.plots,e.params.nonseries)}},l.prototype._onDataUpdate=function(e,t){this._studyModified&&(this.clearData(),this._studyModified=!1);var i=p(t.d);return this._ongoingDataUpdate=this._ongoingDataUpdate.then(function(){return i},function(){return i}).then(this._onDataUnpacked.bind(this,e,t.indexes)),this._ongoingDataUpdate},l.prototype._onDataUnpacked=function(e,t,i){this._isDestroyed||("nochange"!==t&&this._processPlotOffsets(i),this.transformData(e),this._mergeData(e),null!==i&&(i.indexes_replace?(h("nochange"!==t),this._graphics.replaceIndexesTo(t)):("nochange"!==t&&this._graphics.replaceIndexesTo(t),void 0!==i.graphicsCmds&&this._graphics.processCommands(i.graphicsCmds,this._metaInfo.graphics))),
this._onDataUpdated(e,i,t))},l.prototype._onDataUpdated=function(e,t,i){this.hasBarColorer()&&e.length>0&&this._model.mainSeries().invalidateBarStylesCache(e[0].index),null!==t&&this._postProcessGraphics();var n=this._model.paneForSource(this);this._model.recalculatePane(n),this._updateSources()},l.prototype.transformData=function(e){},l.prototype.moveData=function(e){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.move(e)},l.prototype.replaceData=function(e,t,i){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.remove(e+1),this.m_data.addTail(i,t)},l.prototype._updateSources=function(){this._model.updateSource(this),this.hasBarColorer()&&this._model.updateSource(this._model.mainSeries())},l.processPlotOffsets=function(e,t){t&&t.indexes_replace||(e._plotOffsets=t&&t.offsets||{})},l.prototype._processPlotOffsets=function(e){l.processPlotOffsets(this,e)},l.prototype._mergeData=function(e){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.merge(e)},l.prototype._postProcessGraphics=function(){this._priceAxisViews=[].concat(this._priceAxisViewsBase,z(this))},l.prototype._getNonPriceParent=function(){var e,t;if(this._nonPriceParent)return this._nonPriceParent;for(e=this.source();e instanceof l;){if(!(t=e.metaInfo()).is_price_study||"Compare@tv-basicstudies"===t.id)return this._nonPriceParent=e,e;e=e.source()}},l.prototype.firstValue=function(e){var t,i,n,o,r,s,a;return!this._isChildStudy&&"Compare@tv-basicstudies"===this._metaInfo.id||!this._metaInfo.is_price_study?null===(t=this._model.timeScale().visibleBarsStrictRange())?null:(i=t.firstBar(),n=t.lastBar(),o=null,s=(r=this)._metaInfo.plots,null===o&&this.data().range(i,n).each(function(t,i){var n,a,l,c;for(n=0;n<s.length;++n)if(!r.isSelfColorerPlot(n)&&null!=(a=i[n+1])&&(l=s[n].id,(c=r.properties().styles[l]).visible&&c.visible.value()&&!(e&&Math.abs(a)<1e-10)))return o=a,!0;return!1}),this._nonPriceFirstValue=o,o):this._isChildStudy&&(a=this._getNonPriceParent())&&this.priceScale()===a.priceScale()?void 0!==a._nonPriceFirstValue?a._nonPriceFirstValue:a.firstValue():this._series.firstValue()},l.offset=function(e,t){var i=0;return e._plotOffsets&&void 0!==e._plotOffsets[t]&&(i+=e._plotOffsets[t]),void 0!==e._plotOffsetsMetaInfoOverride[t]?i+=e._plotOffsetsMetaInfoOverride[t]:e.properties().offsets&&void 0!==e.properties().offsets[t]&&(i+=e.properties().offsets[t].val.value()),e.properties().offset&&(i+=e.properties().offset.val.value()),i},l.prototype.offset=function(e){return l.offset(this,e)},l.prototype.priceRange=function(e,t){var i,n,r,s,a,l,c,u,h,d,p,_,f,m,y,g,v;if(TradingView.isInteger(e)){if(TradingView.isInteger(t)){for(i=null,r=(n=this)._metaInfo,a=[],c=null,u=0;u<r.plots.length;++u)if(!(n.isSelfColorerPlot(u)||n.isTextColorerPlot(u)||n.isBarColorerPlot(u)||n.isBgColorerPlot(u)||n.isOHLCColorerPlot(u)||n.isAlertConditionPlot(u))&&(h=r.plots[u].id,n.isOHLCSeriesPlot(u)?(p=r.plots[u].target,d=n.properties().ohlcPlots[p]):d=n.properties().styles[h],d.visible.value()&&(l=null,d.location&&(l=d.location.value()),
s||(_=[te.Absolute,te.Top,te.Bottom].indexOf(l)<0,s=(n.isPlotShapesPlot(u)||n.isPlotCharsPlot(u))&&_||n.isPlotArrowsPlot(u)),n.isLinePlot(u)||(n.isPlotShapesPlot(u)||n.isPlotCharsPlot(u))&&d.location.value()===te.Absolute||n.isOHLCSeriesPlot(u)))){if(f={name:h,offset:n.offset(h)},m=n.properties().styles[h].plottype.value(),!n.properties().skipHistogramBaseOnAutoScale&&[re.Histogram,re.Columns,re.Area].indexOf(m)>=0){if(y=n.properties().styles[h].histogramBase.value(),!isNumber(y))continue;c=ee(c,{min:y,max:y})}a.push(f)}if(g=n.m_data.minMaxOnRangeCached(e,t,a),g=ee(c,g),s&&(a=[{name:"low",offset:0},{name:"high",offset:0}],v=n.series().data().bars().minMaxOnRangeCached(e,t,a),g=ee(g,v)),null!==g&&(i=new o(g.min,g.max)),r.bands)for(u=0;u<r.bands.length;u++)if(n.properties().bands[u].visible.value()){if(y=n.properties().bands[u].value.value(),!isNumber(y))continue;i?i.apply(y,y):i=new o(y,y)}return this._postProcessPriceRange(i)}pe.logDebug("priceRange: incorrect endBar")}else pe.logDebug("priceRange: incorrect startBar")},l.prototype._postProcessPriceRange=function(e){var t,i;return e&&e.minValue()===e.maxValue()&&!this.metaInfo().is_price_study&&(t=.005*e.minValue(),e=new o(e.minValue()-t,e.maxValue()+t)),(i=this.priceScale())&&i.isLog()&&e?new o(this.priceScale().priceToLogical(e.minValue()),this.priceScale().priceToLogical(e.maxValue())):e},l.prototype.paneViews=function(){return this.properties().visible.value()?this._paneViews:null},l.prototype.dataWindowView=function(){return this._dataWindowView},l.prototype.legendView=function(){return this._legendView},l.prototype.statusView=function(){return this._statusView},l.prototype.priceAxisViews=function(e,t){return this.properties().oldShowLastValue&&!this.properties().oldShowLastValue.value()?null:e.findTargetPriceAxisViews(this,t,this._priceAxisViews,this._priceLinesAxisViews)},l.prototype._showLastValueOnPriceScale=function(){return this._model.properties().scalesProperties.showStudyLastValue.value()},l.prototype.isLinePlot=function(e){var t=this._metaInfo.plots[e];return oe.isLinePlot(t)},l.prototype.isSelfColorerPlot=function(e){var t=this._metaInfo.plots[e];return oe.isColorerPlot(t)},l.prototype.isTextColorerPlot=function(e){var t=this._metaInfo.plots[e];return oe.isTextColorerPlot(t)},l.prototype.isBarColorerPlot=function(e){var t=this._metaInfo.plots[e];return oe.isBarColorerPlot(t)},l.prototype.isBgColorerPlot=function(e){var t=this._metaInfo.plots[e];return oe.isBgColorerPlot(t)},l.prototype.isPlotShapesPlot=function(e){var t=this._metaInfo.plots[e];return oe.isShapesPlot(t)},l.prototype.isPlotCharsPlot=function(e){var t=this._metaInfo.plots[e];return oe.isCharsPlot(t)},l.prototype.isPlotArrowsPlot=function(e){var t=this._metaInfo.plots[e];return oe.isArrowsPlot(t)},l.prototype.isOHLCBarsPlot=function(e){var t=this._metaInfo.plots[e].target,i=this.metaInfo().defaults.ohlcPlots[t];return i&&this.isOHLCSeriesPlot(e)&&oe.isOhlcPlotStyleBars(i)},l.prototype.isOHLCCandlesPlot=function(e){
var t=this._metaInfo.plots[e].target,i=this.metaInfo().defaults.ohlcPlots[t];return i&&this.isOHLCSeriesPlot(e)&&oe.isOhlcPlotStyleCandles(i)},l.prototype.isOHLCSeriesPlot=function(e){var t=this._metaInfo.plots[e];return oe.isOhlcPlot(t)},l.prototype.isOHLCOpenPlot=function(e){var t=this._metaInfo.plots[e];return oe.isOhlcOpenPlot(t)},l.prototype.isOHLCHighPlot=function(e){var t=this._metaInfo.plots[e];return oe.isOhlcHighPlot(t)},l.prototype.isOHLCLowPlot=function(e){var t=this._metaInfo.plots[e];return oe.isOhlcLowPlot(t)},l.prototype.isOHLCClosePlot=function(e){var t=this._metaInfo.plots[e];return oe.isOhlcClosePlot(t)},l.prototype.isOHLCColorerPlot=function(e){var t=this._metaInfo.plots[e];return oe.isOhlcColorerPlot(t)},l.prototype.isDataOffsetPlot=function(e){var t=this._metaInfo.plots[e];return oe.isDataOffsetPlot(t)},l.prototype.isAlertConditionPlot=function(e){var t=this._metaInfo.plots[e];return oe.isAlertConditionPlot(t)},l.prototype.hasBarColorer=function(){for(var e=0;e<this._metaInfo.plots.length;++e)if(this.isBarColorerPlot(e))return!0;return!1},l.prototype.barColorer=function(){var e,t,i=null;for(e=0;e<this._metaInfo.plots.length;++e)this.isBarColorerPlot(e)&&(t=new _(this,e),null==i?i=t:i.pushBackBarColorer(t));if(null==i)throw new Error("Cannot create BarColorer: study doesn't have a bar_colorer plot!");return i},l.prototype.base=function(){return"Volume"===this._metaInfo.id?1:0},l.prototype._priceScaleByProperties=function(){if("default"===this.properties().precision.value())return null;var e=parseInt(this.properties().precision.value());return isFinite(e)?Math.pow(10,e):null},l.prototype._formatterByProperties=function(){var e=this._priceScaleByProperties();return null!==e?new q(e):null},l.prototype._priceScaleByMetaInfo=function(){var e,t=this.metaInfo().format,i=isNumber(t.precision)?Math.pow(10,t.precision):void 0;return"price"===t.type||"percent"===t.type?i||fe:"volume"===t.type?void 0===t.precision&&null!==(e=this.series().symbolInfo())&&isNumber(e.volume_precision)?Math.pow(10,e.volume_precision):1:"inherit"===t.type?null:(pe.logWarn("Unsupported format type: "+t.type),null)},l.prototype._formatterByMetaInfo=function(){var e,t,i=this.metaInfo().format,n=isNumber(i.precision)?Math.pow(10,i.precision):void 0;switch(i.type){case"price":return new q(n);case"volume":return void 0===(e=i.precision)&&(e=(t=this.series().symbolInfo())&&isNumber(t.volume_precision)?t.volume_precision:0),new K(e);case"percent":return new J(n);case"inherit":return null;default:return pe.logWarn("Unsupported format type: "+i.type),null}},l.prototype._onSourceFormatterChanged=function(){null===this._formatter&&(null!==this.priceScale()&&this.priceScale().updateFormatter(),this._formatterChanged.fire())},l.prototype._onSourcePriceStepChanged=function(){null===this._priceStep&&this._priceStepChanged.fire()},l.prototype._precisionChanged=function(){this._recreatePriceFormattingDependencies()},l.prototype._recreatePriceFormattingDependencies=function(){this._recreateFormatter(),this._recreatePriceStep()},
l.prototype._recreateFormatter=function(){this._formatter=this._tryCreateFormatter(),this._formatterChanged.fire(),null!==this.priceScale()&&this.priceScale().updateFormatter(),this._model.fullUpdate()},l.prototype._recreatePriceStep=function(){var e=null,t=this._tryToGetPriceScale();null!==t&&(e=1/t),this._priceStep!==e&&(this._priceStep=e,this._priceStepChanged.fire())},l.prototype._tryToGetPriceScale=function(){var e=this._priceScaleByProperties();return null===e&&(e=this._priceScaleByMetaInfo()),e},l.prototype._tryCreateFormatter=function(){var e=this._formatterByProperties();return null===e&&(e=this._formatterByMetaInfo()),e},l.prototype.formatter=function(){return this._formatter||this.parentSource().formatter(!1)},l.prototype.priceStep=function(){return this._priceStep||this.parentSource().priceStep(!1)},l.prototype.setOwnerSource=function(e){O.prototype.setOwnerSource.call(this,e),this._recreatePriceFormattingDependencies()},l.prototype.nearestIndex=function(e,t,i){if(TradingView.isInteger(e)){var n=this.data().search(e,t,i);return null!==n?n.index:void 0}pe.logDebug("nearestIndex: incorrect logicalPoint")},l.prototype._lastNonEmptyPlotRow=function(e){var t,i;return TradingView.isInteger(e)?void 0!==this._lastNonEmptyPlotRowCache[e]?this._lastNonEmptyPlotRowCache[e]:(t=1e3,null===(i=this.data().findLast(function(t,i){return void 0!==i[e]},t))?null:(this._lastNonEmptyPlotRowCache[e]=i,this._lastNonEmptyPlotRowCache[e])):(pe.logDebug("_lastNonEmptyPlotRow: incorrect plotIndex"),null)},l.prototype.updateAllViews=function(){var e;for(e=0;e<this._paneViews.length;e++)this._paneViews[e].update();for(this._dataWindowView.update(),null!==this._legendView&&this._legendView.update(),this._statusView.update(),e=0;e<this._priceAxisViews.length;e++)this._priceAxisViews[e].update();this._priceLinesAxisViews.forEach(function(e){e.update()})},l.prototype.tags=function(){return!this._metaInfo||!this._metaInfo.description||this._metaInfo.isTVScriptStub||this._metaInfo.is_hidden_study||this._metaInfo.isTVScript&&"tv-scripting"===this._metaInfo.productId?[]:[this._metaInfo.description]},l.prototype.onExtendedHoursChanged=function(){this.restart()},l.prototype.hasSymbolInputs=function(){for(var e=this._metaInfo.inputs.length;e--;)if("symbol"===this._metaInfo.inputs[e].type)return!0;return!1},l.prototype.canOverrideMinTick=function(){return!1},l.prototype._subscribeExtendedHours=function(){!this._isSubscribedToExtendedHours&&this.hasSymbolInputs()&&(this._series.onExtendedHoursChanged().subscribe(this,this.onExtendedHoursChanged),this._isSubscribedToExtendedHours=!0)},l.prototype._unsubscribeExtendedHours=function(){this._isSubscribedToExtendedHours&&(this._series.onExtendedHoursChanged().unsubscribe(this,this.onExtendedHoursChanged),delete this._isSubscribedToExtendedHours)},l.prototype.removeByRemoveAllStudies=function(){return!0},l.prototype.canHaveChildren=function(){return void 0===this._canHaveChildren&&(this._canHaveChildren=!!ie.canHaveChildren(this._metaInfo)),this._canHaveChildren},l.getInputRebindType=function(e,t,i){
var n=ie.isSourceInput(e);return n&&!~t.indexOf("$")&&~i.indexOf("$")?H.REBIND_STUDY_STANDALONE_TO_CHILD:n&&~t.indexOf("$")&&!~i.indexOf("$")?H.REBIND_STUDY_CHILD_TO_STANDALONE:0},l.prototype.getPlotFields=function(){return this._plotFields},l.prototype.getMinFirstBarIndexForPlot=function(e){var t,i=c(this._properties.styles,e)||c(this._properties.ohlcPlots,e)||c(this._properties.filledAreasStyle,e);return null===i?-1/0:null===(t=this.data().lastIndex())?-1/0:t-i+1},l.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.resolve(null)},l.prototype.getPropertyDefinitionsViewModel=function(){if(null===this._definitionsViewModel){var e=this;return e._getPropertyDefinitionsViewModelClass().then(function(t){if(e._isDestroyed)throw new Error("Study "+e.title()+" already deleted");return null===t?null:(null===e._definitionsViewModel&&(e._definitionsViewModel=new t(e._model.undoModel(),e)),e._definitionsViewModel)}).catch(function(e){return pe.logWarn(e),e})}return Promise.resolve(this._definitionsViewModel)},l.prototype.getInputsPropertyPage=function(){return se.StudyInputsPropertyPage},l.prototype.getStylesPropertyPage=function(){return se.StudyStylesPropertyPage},l.prototype.getDisplayPropertyPage=function(){return se.StudyDisplayPropertyPage},l.prototype.isPine=function(){return void 0!==this._metaInfo.pine},l.prototype.isStandardPine=function(){return this.isPine()&&ie.isStandardPine(this._metaInfo.id)},l.prototype.isLinkedToSeries=function(){return!0===this._metaInfo.linkedToSeries},l.prototype._getTelemetryObjectName=function(){return"study"},l.prototype._getTelemetryAdditionalData=function(){var e="";return this._metaInfo.pine&&this._metaInfo.pine.version&&this._metaInfo.shortId.indexOf("USER")>=0&&(e="_v"+this._metaInfo.pine.version),{symbol:this.series().actualSymbol(),resolution:this.series().interval(),study:this._metaInfo.shortId+e}},l.prototype._sendTelemetryReport=function(e,t,i){void 0===i&&(i=this._getTelemetryAdditionalData());var n=Object.assign(t,{additional:i});telemetry.sendChartReport(e,n)},l.prototype._sendTelemetryCounter=function(e,t){this._sendTelemetryReport(e,{count:1},t)},l.prototype._sendTelemetryTiming=function(e,t,i){this._sendTelemetryReport(e,{value:t},i)},l.prototype.destroy=function(){var e,t,i,n,o,r;for(this._isDestroyed=!0,this._legendView&&this._legendView.destroy(),this.parentSource().formatterChanged().unsubscribe(this,this._onSourceFormatterChanged),this.parentSource().priceStepChanged().unsubscribe(this,this._onSourcePriceStepChanged),this._properties.listeners().unsubscribe(this,this.changeStyles),this._properties.visible.listeners().unsubscribe(this,this.visibleChanged),this._properties.visible.listeners().unsubscribe(this,this.processHibernate),e=0;e<this._metaInfo.plots.length;e++)t=this._metaInfo.plots[e].id,null!=(i=this.properties().styles[t])&&null!=i.visible&&i.visible.listeners().unsubscribe(this,this.processHibernate)
;for(n in this._metaInfo.graphics)for(o in this._metaInfo.graphics[n])(r=this._properties.graphics[n][o]).visible&&r.visible.listeners().unsubscribe(this,this.processHibernate);this._properties.precision.listeners().unsubscribe(this,this._precisionChanged),this._showStudyArgumentsProperty.listeners().unsubscribe(this,this.invalidateTitleCache),this._properties.description.listeners().unsubscribe(this,this.invalidateTitleCache),this._properties.shortDescription&&this._properties.shortDescription.listeners().unsubscribe(this,this.invalidateTitleCache),this._model.mainSeries().dataEvents().symbolResolved().unsubscribeAll(this),this._properties.showInDataWindow.listeners().unsubscribe(this._model,this._model.fullUpdate),this.hasBarColorer()&&this._properties.visible.listeners().unsubscribe(this._model.mainSeries(),this._model.mainSeries().invalidateBarStylesCache),this._model.mainSeries().dataEvents().symbolResolved().unsubscribe(this,this._recreatePriceFormattingDependencies)},l.prototype.desiredPriceScalePosition=function(){return this.metaInfo().isTVScriptStub?"overlay":this.metaInfo().linkedToSeries?"as-series":void 0===this.metaInfo().priceScale?null:["right","left","overlay"][this.metaInfo().priceScale]},l.prototype.guiPlotName=function(e){var t=this.properties().styles;return t&&t[e]&&t[e].title?t[e].title.value():this.title()},l.prototype.defaultPlotIdForAlert=function(){return this._metaInfo.plots.length?this._metaInfo.plots[0].id:null},l.prototype.formatterChanged=function(){return this._formatterChanged},l.prototype.copiable=function(){return _e&&!this.isChildStudy()},l.prototype.setPriceScale=function(e){O.prototype.setPriceScale.call(this,e),ne.emit("study_event",this.id(),"price_scale_changed")},l.prototype.disconnect=function(){this._studyId=null},t.Study=l,t.prepareStudyProperties=function(t,n,o,r,c){return function(t,n,o,r,c,u){var d,p=function(t,n,o,r){var s,l,c,u,d,p,_,f=i("K4L1");if(ie.versionOf(t)<1)throw new Error("This function cannot work with metainfo of the old format version. Required format version >= 1");return a(s=TradingView.clone(defaults("study")),t),l=ie.getStudyPropertyRootName(t),c=TradingView.clone(defaults(l,r)),t.isTVScript&&t.TVScriptSourceCode!==c.TVScriptSourceCode&&(c=TradingView.clone(TradingView.factoryDefaults(l,r))),TradingView.merge(s,c),n&&(h(!(n instanceof e),"propsState should not be an instance of Property"),TradingView.merge(s,n)),u=TradingView.clone(t),d={},f.mergeInputsObjPart(d,u.defaults.inputs),f.mergeInputsObjPart(d,s.inputs),s.inputs=d,delete u.inputs,delete u.defaults.inputs,p={},TradingView.merge(p,u.defaults),TradingView.merge(p,TradingView.factoryDefaults(l)),TradingView.merge(p,s),TradingView.merge(p,u),delete p.defaults,s=p,null!==o&&(_=o.model().studiesColorRotatorFactory().getColorRotator(t),"Overlay@tv-basicstudies"===t.id?s.lineStyle.color=_.getColor(s.lineStyle.color,t):TradingView.merge(s,function(e,t){var i,n;for(i in e.styles)(n=e.styles[i].color)&&(e.styles[i].color=t.getColor(n));return e}(s,_))),n&&TradingView.merge(s.styles,n.styles),s
}(t,n,o,r),_=ie.getSourceInputIds(t);return _.length>0&&(d=_[0],u instanceof l?p.inputs[d]="{pid}$0":void 0!==p.inputs[d]&&-1!==p.inputs[d].indexOf("$")&&(p.inputs[d]="close")),s(t,c,p)}(t,n,o,r,ie.getStudyPropertyRootName(t),c)},t.prepareStudyPropertiesForLoadChart=function(e,t,n,o,r,l){return function(e,t,n,o,r,l,c){var u=function(e,t,n,o,r){var s,l,c,u,h=i("K4L1");return e.version&&n.version&&e.version!==n.version&&pe.logWarn("Serialized metaInfo version "+e.version+" is not equal to the saved state version "+n.version),s=TradingView.clone(defaults("study")),TradingView.merge(s,TradingView.factoryDefaults(ie.getStudyPropertyRootName(e))),a(s,e),TradingView.merge(s,n),s=r.updateStudyState(s,e,t),(l=TradingView.clone(t||e))&&ie.versionOf(l)>=1&&(c={},h.mergeInputsObjPart(c,l.defaults.inputs),h.mergeInputsObjPart(c,s.inputs),s.inputs=c,delete l.inputs,delete l.defaults.inputs,u={},TradingView.merge(u,l.defaults),TradingView.merge(u,TradingView.factoryDefaults(ie.getStudyPropertyRootName(l))),TradingView.merge(u,s),delete l.defaults,TradingView.merge(u,l),s=u),s}(e,t,n,0,r);return s(t||e,l,u)}(e,t,n,0,r,ie.getStudyPropertyRootName(e))}}).call(this,i("tc+8"),i("aIyQ"),i("Qb4w").PriceRange)},GVQo:function(e,t,i){"use strict";function n(){try{return JSON.parse(r.TVLocalStorage.getItem("application-clipboard"))}catch(e){return null}}function o(e){try{r.TVLocalStorage.setItem("application-clipboard",JSON.stringify(e))}catch(e){}}var r;i.r(t),i.d(t,"get",function(){return n}),i.d(t,"set",function(){return o}),r=i("VVxS")},GhVi:function(e,t,i){"use strict";(function(t){function i(){this._marksByIndex={},this._marksBySpan=[],this.changed=new t}i.prototype.reset=function(){this._marksByIndex={},this._marksBySpan=[],delete this.minIndex,delete this.maxIndex,delete this._cache,this.changed.fire()},i.prototype.minIndex=void 0,i.prototype.maxIndex=void 0,i.prototype.merge=function(e){var t,i,n,o,r,s=this._marksBySpan,a={};for(t=0;t<e.length;t++){if(n=(i=e[t]).index,o=i.span,r=this._marksByIndex[i.index]){if(r.index===i.index&&r.span===i.span){r.time=i.time;continue}this._removeTickmark(r)}this._marksByIndex[n]=i,this.minIndex<=n||(this.minIndex=n),this.maxIndex>=n||(this.maxIndex=n),s[o]||(s[o]=[]),s[o].push(i),a[o]=!0}for(o=s.length;o--;)s[o]&&(s[o].length||delete s[o],a[o]&&s[o].sort(this._sortByIndexAsc));delete this._cache,this.changed.fire()},i.prototype._removeTickmark=function(e){var t,i,n=e.index;this._marksByIndex[n]===e&&(delete this._marksByIndex[n],n<=this.minIndex&&this.minIndex++,n>=this.maxIndex&&this.maxIndex--,this.maxIndex<this.minIndex&&(delete this.minIndex,delete this.maxIndex),-1!==(i=(t=this._marksBySpan[e.span]).indexOf(e))&&t.splice(i,1))},i.prototype._sortByIndexAsc=function(e,t){return e.index-t.index},i.prototype.removeTail=function(e){var t,i={};for(t in this.maxIndex=0,this._marksByIndex)this._marksByIndex[t].time<e&&(i[t]=this._marksByIndex[t],this.maxIndex=Math.max(this.maxIndex,t));this._marksByIndex=i},i.prototype.addTail=function(e){for(var t=0;t<e.length;t++)e[t].index=this.maxIndex+t+1
;this.merge(e)},i.prototype.indexToTime=function(e){var t=this._marksByIndex[e];return t?new Date(1e3*t.time):null},i.prototype.density=function(){var e=this.maxIndex-this.minIndex;if(0!==e)return 1e3*(this._marksByIndex[this.maxIndex].time-this._marksByIndex[this.minIndex].time)/e},i.prototype.estimateLeft=function(e){var t=this.density();if(t)return(1e3*this._marksByIndex[this.minIndex].time-e)/t},i.prototype.nearestIndex=function(e){for(var t,i=this.minIndex,n=this.maxIndex;n-i>2;){if(1e3*this._marksByIndex[i].time===e)return i;if(1e3*this._marksByIndex[n].time===e)return n;t=Math.round((i+n)/2),1e3*this._marksByIndex[t].time>e?n=t:i=t}return i},i.prototype.build=function(e,t){var i,n,o,r,s,a,l,c,u,h,d,p,_,f,m=Math.ceil(t/e);if(this._maxbar===m&&this._cache)return this._cache;for(this._maxbar=m,i=[],n=this._marksBySpan.length;n--;)if(this._marksBySpan[n]){for(o=i,i=[],r=o.length,s=0,l=(a=this._marksBySpan[n]).length,c=1/0,u=-1/0,h=0;h<l;h++){for(p=(d=a[h]).index;s<r;){if(!((f=(_=o[s]).index)<p)){c=f;break}s++,i.push(_),u=f,c=1/0}c-p>=m&&p-u>=m&&(i.push(d),u=p)}for(;s<r;s++)i.push(o[s])}return this._cache=i,this._cache},i.prototype.state=function(){var e,t=[];for(e=this._marksBySpan.length;e--;)this._marksBySpan[e]&&(t=t.concat(this._marksBySpan[e]));return{marks:t=t.map(function(e){return[e.span,e.time,e.index]}),version:2}},i.prototype.restoreState=function(e){if(this._marksByIndex={},this._marksBySpan=[],delete this.maxIndex,delete this.minIndex,e&&e.marks&&e.marks.length)if(2===e.version){var t=e.marks.map(function(e){return{span:e[0],time:e[1],index:e[2]}});this.merge(t)}else this.merge(e.marks)},e.exports.Tickmarks=i}).call(this,i("aIyQ"))},GmZZ:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"LineToolVertLineTimeAxisView",function(){return r}),n=i("kw0O"),o=i("sWfm"),r=function(){function e(e,t){this._renderer=new o.a,this._rendererData={background:"",color:"",coordinate:0,text:"",visible:!1,width:0},this._invalidated=!0,this._source=e,this._model=t,this._renderer.setData(this._rendererData)}return e.prototype.update=function(){this._invalidated=!0},e.prototype.coordinate=function(){return this._rendererData.coordinate},e.prototype.renderer=function(){return this._invalidated&&this._updateImpl(),this._renderer},e.prototype._updateImpl=function(){var e,t,i=this._rendererData;i.visible=!1,this._model.timeScale().isEmpty()||0!==this._source.points().length&&(i.width=this._model.timeScale().width(),i.visible=!0,i.text="",i.background=this._source.properties().linecolor.value(),i.color=Object(n.a)(i.background),e=this._source.points()[0].index,i.coordinate=this._model.timeScale().indexToCoordinate(e),(t=this._model.timeScale().indexToUserTime(e))&&(i.text=this._model.dateTimeFormatter().format(t)),this._invalidated=!1)},e}()},HGup:function(e,t,i){"use strict";var n,o,r,s,a,l;i.d(t,"a",function(){return s}),i.d(t,"c",function(){return a}),i.d(t,"b",function(){return l}),n=i("mrSG"),o=i("Eyy1"),r=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}return Object(n.__extends)(t,e),
t.prototype.redo=function(){var e,t,i=this,n=Object(o.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),r=this._chartModel.children(n,!0);r.forEach(function(e){return i._chartModel.detachSource(e)}),this._chartModel.detachSource(n),e=this._chartModel.createPane(this.targetPaneIndex()),t=e.findSuitableScale(n),e.addDataSource(n,t,!1),r.forEach(function(i){return e.addDataSource(i,t,!1)}),this._chartModel.fullUpdate()},t.prototype.undo=function(){var e,t,i,n=this,r=Object(o.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),s=this._chartModel.children(r,!0);s.forEach(function(e){return n._chartModel.detachSource(e)}),e=this._chartModel.detachSource(r),Object(o.assert)(e,"Undo of detaching must remove pane"),t=this._chartModel.panes()[this._initialPaneIndex],null===(i=t.getPriceScaleById(this._initialPriceScaleId))&&(i=t.createPriceScaleAtPosition(this._initialPriceScalePosition,this._initialPriceScaleIndex)),t.addDataSource(r,i,!0),s.forEach(function(e){return t.addDataSource(e,i,!1)}),this._chartModel.fullUpdate()},t}(i("3u3j").a),s=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}return Object(n.__extends)(t,e),t.prototype.targetPaneIndex=function(){return this._initialPaneIndex+1},t}(r),a=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}return Object(n.__extends)(t,e),t.prototype.targetPaneIndex=function(){return this._initialPaneIndex},t}(r),l=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}return Object(n.__extends)(t,e),t.prototype.targetPaneIndex=function(){return this._chartModel.panes().length},t}(r)},HLXm:function(e,t,i){"use strict";function n(e){"LineToolGannComplex"!==e.type||void 0!==e.version&&1!==e.version||(e.type="LineToolGannFixed")}i.r(t),i.d(t,"migrateState",function(){return n})},"HV/F":function(e,t,i){"use strict";function n(e){return new Promise(function(t,i){e.subscribe(null,t,!0)})}i.r(t),i.d(t,"delegateToPromise",function(){return n})},Hm6r:function(e,t,i){"use strict";var n,o;i.r(t),i.d(t,"CrosshairTimeAxisView",function(){return o}),n=i("sWfm"),o=function(){function e(e,t){this._renderer=new n.a,this._rendererData={background:"#4c525e",color:"white",coordinate:0,text:"",visible:!1,width:0},this._invalidated=!0,this._model=e,this._valueProvider=t,this._renderer.setData(this._rendererData)}return e.prototype.update=function(){this._invalidated=!0},e.prototype.renderer=function(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._renderer},e.prototype.coordinate=function(){return this._rendererData.coordinate},e.prototype._updateImpl=function(){var e,t,i=this._rendererData;i.visible=!1,(e=this._model.timeScale()).isEmpty()||(i.width=e.width(),(t=this._valueProvider()).time&&(i.coordinate=t.coordinate,i.text=this._model.dateTimeFormatter().format(t.time),i.visible=!0))},e}()},Hr11:function(e,t,i){"use strict";function n(e,t){return e<=t}function o(e,t){return e>=t}function r(e,t,i){return Math.min(Math.max(e,t),i)}function s(e){return e<0?-1:e>0?1:0}function a(e){
if(e<0)return f.logDebug("MathEx.isBaseDecimal: argument less zero"),!1;for(var t=e;t>1;t/=10)if(t%10!=0)return!1;return!0}function l(e,t,i){return t-e<=i}function c(e,t,i){return Math.abs(e-t)<i}function u(e){return e<=0?(f.logDebug("MathEx.log10: argument less or equal zero"),NaN):Math.log(e)/Math.log(10)}function h(e,t){return e<t?-1:e>t?1:0}function d(e,t){var i,n;if(void 0===t&&(t=h),e.length<1)throw Error("array is empty");for(i=e[0],n=0;n<e.length;++n)t(e[n],i)<0&&(i=e[n]);return i}function p(e,t){var i,n;if(void 0===t&&(t=h),e.length<1)throw Error("array is empty");for(i=e[0],n=0;n<e.length;++n)t(e[n],i)>0&&(i=e[n]);return i}var _,f;i.r(t),i.d(t,"lessThan",function(){return n}),i.d(t,"greaterThan",function(){return o}),i.d(t,"clamp",function(){return r}),i.d(t,"sign",function(){return s}),i.d(t,"isBaseDecimal",function(){return a}),i.d(t,"greaterOrEqual",function(){return l}),i.d(t,"equal",function(){return c}),i.d(t,"log10",function(){return u}),i.d(t,"defComparator",function(){return h}),i.d(t,"min",function(){return d}),i.d(t,"max",function(){return p}),_=i("uOxu"),f=Object(_.getLogger)("Common.MathEx")},HySD:function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"ResizerDetacherState",function(){return s}),n=i("Eyy1"),o=i("hY0g"),r=i.n(o),s=function(){function e(e){var t=this;this._alive=new r.a,this._container=new r.a,this._width=new r.a,this._height=new r.a,this._fullscreen=new r.a,this._detachable=new r.a,this._fullscreenable=new r.a,this._visible=new r.a,this._availWidth=new r.a,this._availHeight=new r.a,this._owner=new r.a,this._ownersStack=[],this.owner=this._owner.readonly(),this._bridge={alive:this._alive.readonly(),container:this._container.readonly(),width:this._width.readonly(),height:this._height.readonly(),fullscreen:this._fullscreen.readonly(),detachable:this._detachable.readonly(),fullscreenable:this._fullscreenable.readonly(),visible:this._visible.readonly(),availWidth:this._availWidth.readonly(),availHeight:this._availHeight.readonly(),remove:function(){var e=t._owner.value();e&&e.remove&&e.remove()},negotiateWidth:function(e){var i=t._owner.value();i&&i.negotiateWidth&&i.negotiateWidth(e)},negotiateHeight:function(e){var i=t._owner.value();i&&i.negotiateHeight&&i.negotiateHeight(e)},requestFullscreen:function(){var e=t._owner.value();e&&e.requestFullscreen&&e.requestFullscreen()},exitFullscreen:function(){var e=t._owner.value();e&&e.exitFullscreen&&e.exitFullscreen()},detach:function(e){var i=t._owner.value();i&&i.detach&&i.detach(e)},attach:function(){var e=t._owner.value();e&&e.attach&&e.attach()}},e&&this.pushOwner(e)}return e.prototype.bridge=function(){return this._bridge},e.prototype.pushOwner=function(e){var t,i,n,o;if(e.alive.value()){for(t=0,i=this._ownersStack;t<i.length;t++)n=i[t],this._unsubscribeOwner(n);o={owner:e},this._ownersStack.push(o),this._subscribeOwner(o)}},e.prototype._subscribeOwner=function(e){var t,i,n=this,o=e.owner;e.deathWatcher||(this._alive.setValue(!0),e.deathWatcher=o.alive.spawn(),e.deathWatcher.subscribe(function(t){t||n._deadHandler(e)})),
this._owner.setValue(o),e.subscriptions||(t=e.subscriptions=[],this._visible.setValue(!1),(i=function(e,i){if(e){var n=e.spawn();t.push(n),n.subscribe(function(e){i.setValue(e)},{callWithLast:!0})}else i.deleteValue()})(o.container,this._container),i(o.width,this._width),i(o.height,this._height),i(o.fullscreen,this._fullscreen),i(o.detachable,this._detachable),i(o.fullscreenable,this._fullscreenable),i(o.availWidth,this._availWidth),i(o.availHeight,this._availHeight),i(o.visible,this._visible))},e.prototype._unsubscribeOwner=function(e,t){var i,n;if(e.subscriptions){for(i=0,n=e.subscriptions;i<n.length;i++)n[i].unsubscribe();e.subscriptions=null}t&&e.deathWatcher&&(e.deathWatcher.unsubscribe(),e.deathWatcher=null)},e.prototype._deadHandler=function(e){var t,i=this._ownersStack.indexOf(e);for(Object(n.assert)(-1!==i,"sanitized owner should be in stack"),t=this._ownersStack.length-1;t>=i;t--)this._unsubscribeOwner(this._ownersStack[t],!0);this._ownersStack.length=i,i>0?this._subscribeOwner(this._ownersStack[i-1]):(this._alive.setValue(!1),this._owner.deleteValue())},e}()},I4UZ:function(e,t,i){"use strict";var n,o,r,s,a;i.r(t),i.d(t,"HeaderToolbarBootloader",function(){return a}),n=i("mrSG"),o=i("yMne"),r=i("YuHv"),s=i("cZRT"),a=function(e){function t(t,i){var n=e.call(this)||this;return n._toolsBootloader=t,n._headerProps=i,n._headerProps.resizerBridge.negotiateHeight(o.HEADER_TOOLBAR_HEIGHT_EXPANDED),n._headerProps.resizerBridge.container.value().appendChild(Object(r.a)()),n}return Object(n.__extends)(t,e),t.prototype._startLoading=function(){var e=this;return Promise.all([this._toolsBootloader.load(),this._loadHeaderToolbar()]).then(function(t){var i=t[0];return new(0,t[1])(e._headerProps.resizerBridge.container.value(),Object(n.__assign)(Object(n.__assign)({},e._headerProps),{tools:i}))})},t.prototype._loadHeaderToolbar=function(){return Promise.all([i.e("react"),i.e(35),i.e(36),i.e(60),i.e(8),i.e(30),i.e("header-toolbar")]).then(i.bind(null,"KMbc")).then(function(e){return e.HeaderToolbarRenderer})},t}(s.a)},I5CP:function(e,t,i){"use strict";(function(t){function n(e,t,i,n){this.reset(e,t,i,n)}var o=i("XlJ7").makeFont,r=i("u+0B").TextWidthCache,s=t.enabled("charting_library_debug_mode");n.prototype.maxCount=200,n.prototype.reset=function(e,t,i,n){this._textWidthCache=new r(this.maxCount),this._fontSize=e,this._color=n,this._font=o(e,t,i),this._keys=[],this._hash={}},n.prototype.paintTo=function(e,t,i,n,o){var r=this.getLabelImage(e,t);"left"!==o&&(i-=r.textWidth),n-=Math.floor(r.height/2),e.drawImage(r.canvas,i,n)},n.prototype.getLabelHeight=function(e,t){return this.getLabelImage(e,t).height},n.prototype.getLabelImage=function(e,t){var i,n,o,r,a;return Object.prototype.hasOwnProperty.call(this._hash,t)?i=this._hash[t]:(this._keys.length>=this.maxCount&&(n=this._keys.shift(),delete this._hash[n]),i={text:t,textWidth:0,width:0,height:0,canvas:document.createElement("canvas")},o=Math.ceil(this._fontSize/4.5),r=Math.round(this._fontSize/10),a=Math.ceil(this._textWidthCache.measureText(e,t)),
i.textWidth=Math.round(Math.max(1,a)),i.width=Math.round(a+2*o),i.height=this._fontSize+2*o,0!==a?(this._keys.push(i.text),this._hash[i.text]=i):s&&console.log('Canvas 2d context measureText return zero width for "'+t+'" text'),i.canvas.width=i.width,i.canvas.height=i.height,(e=i.canvas.getContext("2d")).font=this._font,e.fillStyle=this._color,e.fillText(t,0,i.height-o-r)),i},e.exports=n}).call(this,i("Kxc7"))},I9zs:function(e,t,i){"use strict";function n(e,t,i,n){var o,r;for(this.m_study=e,this.m_series=t,this.m_model=i,this._plotName=n,this.m_items=[],this._invalidated=!0,this._isMarkersEnabled=K.enabled("source_selection_markers"),o=this.m_study.metaInfo().plots,this._colorer=null,this._palette=null,this._paletterProps=null,this._plotIndex=0,r=0;r<o.length;r++)o[r].id===this._plotName&&(this._plotIndex=r),this.m_study.isSelfColorerPlot(r)&&o[r].target===this._plotName&&(this._colorer=r,this._palette=this.m_study.metaInfo().palettes[o[r].palette],this._paletterProps=this.m_study.properties().palettes[o[r].palette])}function o(e,t,i,n){var o,r;for(this._study=e,this._series=t,this._model=i,this._plotName=n,this._items=[],this._invalidated=!0,this._isMarkersEnabled=K.enabled("source_selection_markers"),o=this._study.metaInfo().plots,r=0;r<o.length;r++)o[r].id===this._plotName&&(this._plotIndex=r,d(this._study.isBgColorerPlot(r),"Plot '"+this._plotName+"' is not a background colorer!"))}function r(e,t,i,n){var o,r;for(this.m_study=e,this.m_series=t,this.m_model=i,this.m_plotName=n,this.m_items=[],this.m_invalidated=!0,this.m_renderer=null,this._isMarkersEnabled=K.enabled("source_selection_markers"),this.m_selectionData=null,this.m_plotIndex=null,o=this.m_study.metaInfo().plots,r=0;r<o.length;r++)if(o[r].id===this.m_plotName){this.m_plotIndex=r;break}for(o=this.m_study.metaInfo().plots,this._colorer=null,this._textColorer=null,this._palette=null,this._textPalette=null,this._paletterProps=null,this._textPaletterProps=null,this._plotIndex=0,r=0;r<o.length;r++)o[r].id===this.m_plotName&&(this._plotIndex=r),this.m_study.isSelfColorerPlot(r)&&o[r].target===this.m_plotName&&(this._colorer=r,this._palette=this.m_study.metaInfo().palettes[o[r].palette],this._paletterProps=this.m_study.properties().palettes[o[r].palette]),this.m_study.isTextColorerPlot(r)&&o[r].target===this.m_plotName&&(this._textColorer=r,this._textPalette=this.m_study.metaInfo().palettes[o[r].palette],this._textPaletterProps=this.m_study.properties().palettes[o[r].palette])}function s(e,t,i,n){r.call(this,e,t,i,n)}function a(e,t,i,n){s.call(this,e,t,i,n)}function l(e,t,i,n){r.call(this,e,t,i,n),this._maxAbsValue=0}function c(e,t,i,n){var o,r;for(this.m_study=e,this.m_series=t,this.m_model=i,this.m_plotName=n,this.m_bars=[],this._invalidated=!0,this._isMarkersEnabled=K.enabled("source_selection_markers"),o=this.m_study.metaInfo().plots,this._colorer=null,this._palette=null,this._paletterProps=null,this._ohlcPlotIndexes={},r=0;r<o.length;r++)o[r].target===this.m_plotName&&(this.m_study.isOHLCOpenPlot(r)&&(this._ohlcPlotIndexes[TradingView.OPEN_PLOT]=r),
this.m_study.isOHLCHighPlot(r)&&(this._ohlcPlotIndexes[TradingView.HIGH_PLOT]=r),this.m_study.isOHLCLowPlot(r)&&(this._ohlcPlotIndexes[TradingView.LOW_PLOT]=r),this.m_study.isOHLCClosePlot(r)&&(this._ohlcPlotIndexes[TradingView.CLOSE_PLOT]=r),this.m_study.isOHLCColorerPlot(r)&&(this._colorer=r,this._palette=this.m_study.metaInfo().palettes[o[r].palette],this._paletterProps=this.m_study.properties().palettes[o[r].palette]))}function u(e,t,i,n){c.call(this,e,t,i,n)}function h(e,t,i,n){c.call(this,e,t,i,n)}var d=i("Eyy1").assert,p=i("aO4+").Point,_=i("eJTA"),f=_.rgbToHsl,m=_.hslToRgb,y=_.rgbToHexString,g=_.parseRgb,v=_.parseRgba,S=i("VdBB").HitTestResult,b=i("1mZ4"),w=b.SelectionRenderer,P=b.SelectionRendererArrowsUpDown,C=i("29fS").PaneRendererBars,T=i("EKrn").PaneRendererHistogram,x=i("oUqy").PaneRendererColumns,I=i("gyZD").PaneRendererLine,L=i("u0yd").PaneRendererArea,M=i("/hKg").PaneRendererCandles,A=i("UxRM").PaneRendererCross,k=i("Qymm").PaneRendererCircles,E=i("6a0U").PaneRendererArrowsUpDownItem,O=i("6a0U").PaneRendererArrowsUpDown,D=i("f3xO").PaneRendererUnicodeChar,V=i("VfPj").PaneRendererBackground,B=i("Zp8I").PaneRendererStepLine,R=i("Zy3/").CompositeRenderer,N=i("ga+R"),F=i("Hr11").clamp,W=i("Nu4p"),j=i("23IT"),U=j.LineStudyPlotStyle,z=j.PlotSymbolSize,H=i("972a").MarkLocation,Y=i("SXwY"),G=i("Tmoa"),q=i("k9/m").PlotRowSearchMode,K=i("Kxc7"),Z=i("Zp/P"),J=i("Kmdw"),X=i("akof"),Q=i("+q2u"),$=i("fxzW"),ee=i("P+Pi"),te=i("V0dR"),ie=i("6ptY"),ne=i("PF2b"),oe=i("V0al");TradingView.PaneRendererArrowUp=J.PaneRendererArrowUp,TradingView.PaneRendererArrowDown=J.PaneRendererArrowDown,TradingView.PaneRendererCircleShape=X.PaneRendererCircleShape,TradingView.PaneRendererCrossShape=Q.PaneRendererCrossShape,TradingView.PaneRendererDiamond=$.PaneRendererDiamond,TradingView.PaneRendererFlagShape=ee.PaneRendererFlagShape,TradingView.PaneRendererLabelUp=te.PaneRendererLabelUp,TradingView.PaneRendererLabelDown=te.PaneRendererLabelDown,TradingView.PaneRendererSquare=ie.PaneRendererSquare,TradingView.PaneRendererTriangleApexUp=ne.PaneRendererTriangleApexUp,TradingView.PaneRendererTriangleApexDown=ne.PaneRendererTriangleApexDown,TradingView.PaneRendererXCross=oe.PaneRendererXCross,n.isIndexValid=function(e,t){return null!==e&&e>=0&&e<t._length()},n.prototype.items=function(){return this.m_items},n.prototype.update=function(){this._invalidated=!0},n.prototype._updateImpl=function(){var e,t,i,o,r,s,a,l,c,u,h,d,_,f,m,y,g,v,b,w,P,C,T,x,I,L;if(this._histogramBase=null,this.m_items=[],!(this.m_model.timeScale().isEmpty()||this.m_study.priceScale().isEmpty()||null===(e=this.m_model.timeScale().visibleBarsStrictRange())||(t=this.m_series.nearestIndex(e.firstBar(),q.NearestRight),i=this.m_series.nearestIndex(e.lastBar(),q.NearestLeft),(o=this.m_study.offset(this._plotName))>0?(t-=o,i+=o):(t+=o,i-=o),(r=this.m_study.getMinFirstBarIndexForPlot(this._plotName))>i))){if(t=Math.max(r,t),a=(s=this.m_study.properties().styles[this._plotName]).plottype.value(),l=[U.Line,U.Area,U.Circles,U.Cross].indexOf(a)>=0,c=this.m_study.data(),
u=this.m_study.firstValue(),l&&c._length()>0){for(h=c._bsearch(t);n.isIndexValid(h,c)&&void 0===c._valueAt(h)[this._plotIndex+1];)h-=1;for(t=n.isIndexValid(h,c)?c._indexAt(h):t,d=c._bsearch(i);n.isIndexValid(d,c)&&void 0===c._valueAt(d)[this._plotIndex+1];)d+=1;i=n.isIndexValid(d,c)?c._indexAt(d):i}if(_=c.range(t,i),f=this.m_study.priceScale(),m=F(this._getTranspValue(),0,100),y={},g=function(e,t){var i=e+"@"+t;return y[i]||(this._plotName&&"vol"===this._plotName?y[i]=G.generateColor(e,t):y[i]=G.generateColor(e,t,!0)),y[i]}.bind(this),_.each(function(e,t){var i,n,r,a,c,u,h,d,_;return e+=o,e=Math.floor(e),i=(n=void 0===(i=t[this._plotIndex+1])||null===i)?NaN:i,(!l||!n)&&(r=new p(e,i),a=void 0!==t[this._colorer+1]||this._palette&&this._palette.addDefaultColor,this._colorer&&a&&(i=t[this._colorer+1],r.style={},null!=i?(c=this._palette.valToIndex?this._palette.valToIndex[i]:i,h=(u=this._paletterProps.colors[c]).color.value(),r.style.color=G.isHexColor(h)?g(h,m):h):(h=s.color.value(),r.style.color=g(h,100)),d=void 0!==c?u.width.value():s.linewidth.value(),_=void 0!==c?u.style.value():s.linestyle.value(),r.style.width=d,r.style.style=_),this.m_items.push(r),!1)}.bind(this)),f.pointsArrayToCoordinates(this.m_items,u),this.m_model.timeScale().indexesToCoordinates(this.m_items),s.histogramBase&&(this._histogramBase=this.m_study.priceScale().priceToCoordinate(s.histogramBase.value(),u)),this.m_model.selection().isSelected(this.m_study))for(v=N(t,i),this._selectionData={points:[],bgColor:this.m_model.backgroundColor()},this._selectionData.hittestResult=S.REGULAR,b=0;b<v.length;b++)w=v[b],P=this.m_study.data().valueAt(w),w+=o,null!==P&&(C=P[this._plotIndex+1],T=this.m_model.timeScale().indexToCoordinate(Math.floor(w)),x=this.m_study.priceScale().priceToCoordinate(C,u),this._selectionData.points.push(new p(T,x)));I=s,this._lineColor=G.generateColor(I.color.value(),m),this._lineWidth=I.linewidth.value(),L=I.color.value(),this._colorer&&null!=(C=this._paletterProps.colors[0])&&(L=C.color.value(),this._lineWidth=C.width.value(),this._lineColor=G.generateColor(C.color.value(),m)),this._color2=G.generateColor(L,m),this._color1=G.generateColor(n.addHueForColor(L),m)}},n.addHueForColor=Y(function(e){var t=f(g(e)),i=t[0]+.05;return t[0]=i-Math.floor(i),y(m(t))}),n.prototype._getTranspValue=function(){var e=this.m_study.properties(),t=e.styles[this._plotName],i=0,n=0,o=this.m_study.metaInfo();return"Volume@tv-basicstudies"===o.id&&o.version<=46&&"transparency"in e?(i=e.transparency.value(),i=isNumber(i)?i:n):(t.transparency&&(i=t.transparency.value(),i=isNumber(i)?i:n),i)},n.prototype.renderer=function(){var e,t,i,n,o,r=this.m_study.properties().styles[this._plotName];if(!r.visible.value())return null;if(!this.m_study.priceScale())return null;switch(this._invalidated&&(this._updateImpl(),this._invalidated=!1),(e={}).barSpacing=this.m_model.timeScale().barSpacing(),e.items=this.m_items,e.histogramBase=this._histogramBase?this._histogramBase:this.m_study.priceScale().height(),e.lineIndex=0,e.lineStyle=r.linestyle.value(),
e.lineColor=this._lineColor,e.lineWidth=this._lineWidth,e.lineWidth=isNumber(e.lineWidth)?e.lineWidth:1,e.color1=this._color1,e.color2=this._color2,e.bottom=e.histogramBase,this._colorer||(e.simpleMode=!0),t=new R,i=!!r.joinPoints&&r.joinPoints.value(),r.plottype.value()){case U.Line:case U.LineWithBreaks:t.append(new I(e));break;case U.Area:case U.AreaWithBreaks:t.append(new L(e));break;case U.Histogram:t.append(new T(e));break;case U.Columns:t.append(new x(e));break;case U.Cross:t.append(new A(e)),i&&((n=TradingView.merge({},e)).lineWidth=1,n.forceLineWidth=!0,t.append(new I(n)));break;case U.Circles:t.append(new k(e)),i&&((n=TradingView.merge({},e)).lineWidth=1,n.ignorePaletteLineWidth=!0,t.append(new I(n)));break;case U.StepLine:(o=new B).setData(e),t.append(o);break;default:t.append(new I(e))}return this.m_model.selection().isSelected(this.m_study)&&this._isMarkersEnabled&&t.append(new w(this._selectionData)),t},o.prototype.items=function(){return this._items},o.prototype.update=function(){this._invalidated=!0},o.prototype._scalesReady=function(){var e=this._model.timeScale(),t=this._study.priceScale();return e&&t&&!e.isEmpty()&&!t.isEmpty()},o.prototype._getTranspValue=function(){var e=this._study.properties(),t=e.styles[this._plotName],i=0,n=40;return t.transparency&&(i=t.transparency.value(),i=isNumber(i)?i:n),i},o.prototype._updateImpl=function(){var e,t,i,n,o,r,s,a,l,c;this._items=[],d(this._scalesReady(),"Scales must be ready!"),null!==(e=this._model.timeScale().visibleBarsStrictRange())&&(t=this._study.metaInfo().plots[this._plotIndex].palette,i=this._study.properties().palettes[t],n=i.colors,o=this._study.metaInfo().palettes[t],r=this._getTranspValue(),s=this._series.nearestIndex(e.firstBar(),q.NearestRight),a=this._series.nearestIndex(e.lastBar(),q.NearestLeft),(l=this._study.offset(this._plotName))>0?(s-=l,a+=l):(s+=l,a-=l),(c=this._study.getMinFirstBarIndexForPlot(this._plotName))>a||(s=Math.max(c,s),this._study.data().range(s,a).each(function(e,t){var i,s,a,c;return e+=l,i=t[this._plotIndex+1],s=new p(Math.floor(e)-.5),a=isNumber(r)?r:50,a=Math.min(a,100),a=Math.max(a,0),null!=i?(c=o.valToIndex?o.valToIndex[i]:i,s.color=G.generateColor(n[c].color.value(),a)):s.color=null,this._items.push(s),!1}.bind(this)),this._model.timeScale().indexesToCoordinates(this._items)))},o.prototype.renderer=function(){var e,t;if(this._study.properties().styles[this._plotName].visible&&this._study.properties().styles[this._plotName].visible.value()&&this._scalesReady())return this._invalidated&&(this._updateImpl(),this._invalidated=!1),e={items:this._items,y:0,h:this._study.priceScale().height(),w:Math.ceil(this._model.timeScale().barSpacing())},(t=new R).append(new V(e)),t},r.prototype.items=function(){return this.m_items},r.prototype.update=function(){this.m_invalidated=!0},r.prototype._scalesReady=function(){var e=this.m_model.timeScale(),t=this.m_study.priceScale();return e&&t&&!e.isEmpty()&&!t.isEmpty()},r.prototype._updateImpl=function(){var e,t,i,n,o,r,s,a,l,c,u,h,d,p,_,f,m,y,g,v;this.m_items=[],
this._scalesReady()&&(e=this.m_model.timeScale(),t=this.m_study.priceScale(),null!==(i=e.visibleBarsStrictRange())&&(n=this.m_series.nearestIndex(i.firstBar(),q.NearestRight),o=this.m_series.nearestIndex(i.lastBar(),q.NearestLeft),(r=this.m_study.offset(this.m_plotName))>0?(n-=r,o+=r):(n+=r,o-=r),(s=this.m_study.getMinFirstBarIndexForPlot(this.m_plotName))>o||(n=Math.max(s,n),a=this.m_study.data(),l=this.m_study.firstValue(),c=a.range(n,o),u=this._getTranspValue(),h=N(n,o),d=this.m_model.selection().isSelected(this.m_study),this.m_selectionData=d?{points:[],hittestResult:S.REGULAR,vertOffset:0,isDark:this.m_model.isDark(),bgColor:this.m_model.backgroundColor()}:null,(_=(p=this.m_series.properties().style.value())===TradingView.Series.STYLE_LINE?"lineStyle":p===TradingView.Series.STYLE_AREA?"areaStyle":null)?(f=this.m_series.properties()[_].priceSource.value(),m=f):(f="high",m="low"),y=this.m_study.priceScale().isInverted(),g=t.coordinateToPrice(t.height()*t.topMargin(),l),v=t.coordinateToPrice(t.height()*(1-t.bottomMargin()),l),this._topCoord=y?v:g,this._bottomCoord=y?g:v,c.each(function(e,t){var i,n,o,s,a,l,c,p=Math.floor(e+r),_=t[this.m_plotIndex+1];return null!==_&&void 0!==_&&(void 0!==(i=this._createItem(p,_,f,m))&&null!==i?(n=void 0!==t[this._colorer+1]||this._palette&&this._palette.addDefaultColor,this._colorer&&n&&(_=t[this._colorer+1],i.style={},null!=_?(a=this._palette.valToIndex?this._palette.valToIndex[_]:_,o=this._paletterProps.colors[a].color.value(),s=u>9?u-10:0,i.style.color=G.generateColor(o,u)):(o=this.m_study.properties().styles[this.m_plotName].color.value(),s=100,i.style.color=G.generateColor(o,100)),i.style.borderColor=G.generateColor(o,s)),l=void 0!==t[this._textColorer+1]||this._textPalette&&this._textPalette.addDefaultColor,this._textColorer&&l&&(_=t[this._textColorer+1],i.style||(i.style={}),null!=_?(a=this._textPalette.valToIndex?this._textPalette.valToIndex[_]:_,c=this._textPaletterProps.colors[a].color.value(),i.style.textColor=G.generateColor(c,u)):(c=this.m_study.properties().styles[this.m_plotName].textColor.value(),i.style.textColor=G.generateColor(c,100))),d&&-1!==h.indexOf(e)&&this.m_selectionData.points.push(i),this.m_items.push(i),!1):void 0)}.bind(this)),this._convertItemsToCoordinates())))},r.prototype._updateRenderer=function(){var e,t,i,n,o,r,s,a,l,c;this._updateImpl(),e=this.m_model.timeScale(),t={},i=this._getTranspValue(),n=e.barSpacing(),o=this._calculateShapeHeight(n),r=this.m_study.properties().styles[this.m_plotName].location.value(),s=this._calculateVerticalOffset(r,o+o/2),t.barSpacing=n,t.items=this.m_items,t.color=G.generateColor(this.m_study.properties().styles[this.m_plotName].color.value(),i),t.height=o,t.vertOffset=s,a=this.m_study.properties().styles[this.m_plotName].plottype.value(),l=W.plotShapesData[a],c=new R,l&&c.append(new TradingView[l.paneRendererClass](t)),this.m_model.selection().isSelected(this.m_study)&&this._isMarkersEnabled&&null!==this.m_selectionData&&(this.m_selectionData.vertOffset=s,c.append(new w(this.m_selectionData))),this.m_renderer=c},
r.prototype._getSeriesVal=function(e,t){var i;e=e||"close",i=null;try{i=this.m_series[e](t)}catch(e){}return i},r.prototype._getTranspValue=function(){var e,t=0;return this.m_study.properties().transparency&&(t=this.m_study.properties().transparency.value(),t=isNumber(t)?t:50),(e=this.m_study.properties().styles[this.m_plotName]).transparency&&(t=e.transparency.value(),t=isNumber(t)?t:50),F(t,0,100)},r.prototype._createItem=function(e,t,i,n){var o,r,s,a=this.m_study.properties().styles[this.m_plotName].location.value();if(!t&&a!==H.Absolute)return null;switch(a){case H.AboveBar:if(void 0===(o=this._getSeriesVal(i,e))||null==o)return null;r=o;break;case H.BelowBar:if(void 0===(s=this._getSeriesVal(n,e))||null==s)return null;r=s;break;case H.Top:r=this._topCoord;break;case H.Bottom:r=this._bottomCoord;break;case H.Absolute:r=t;break;default:throw new Error("Bad value: "+a)}return new p(e,r)},r.prototype._convertItemsToCoordinates=function(){var e=this.m_model.timeScale(),t=this.m_study.priceScale();e.indexesToCoordinates(this.m_items),t.pointsArrayToCoordinates(this.m_items,this.m_study.firstValue())},r.prototype._calculateVerticalOffset=function(e,t){var i=0;switch(e){case H.AboveBar:case H.Bottom:i=-t;break;case H.BelowBar:case H.Top:i=t}return this.m_study.priceScale().isInverted()&&(i*=-1),i},r.prototype._calculateShapeHeight=function(e,t){var i=e;switch(t){case z.Tiny:i=.3*e;break;case z.Small:i=.6*e;break;case z.Normal:i=e;break;case z.Large:i=1.5*e;break;case z.Huge:i=2*e}return i},r.prototype.renderer=function(){if(this.m_study.properties().styles[this.m_plotName].visible&&this.m_study.properties().styles[this.m_plotName].visible.value()&&this._scalesReady())return this.m_invalidated&&(this._updateRenderer(),this.m_invalidated=!1),this.m_renderer},inherit(s,r),s.prototype._updateRenderer=function(e){var t,i,n,o,r,s,a,l,c,u,h,d,p,_,f,m;this._updateImpl(),t=this.m_model.timeScale(),i={},n=this._getTranspValue(),o=t.barSpacing(),e.size?(s=e.size.value(),r=this._calculateShapeHeight(25,s)):r=Math.round(o/2),a=e.location.value(),l=G.generateColor(e.color.value(),n),c=n>19?n-10:0,u=this._calculateVerticalOffset(a,Math.round(1.5*r)),i.barSpacing=o,i.items=this.items(),i.color=l,i.borderColor=G.generateColor(e.color.value(),c),i.height=r,i.vertOffset=u,h=e.plottype.value(),d=W.plotShapesData[h],p=new R,void 0!==(_=e.text?e.text.value():void 0)&&""!==_.trim()&&(f=_.trim().replace(/\\n/gm,"\n"),f=TradingView.cleanButAmpersand(f,!0),i.text=f,i.fontSize=12,m=e.textColor?e.textColor.value():void 0,i.textColor=m?G.generateColor(m,n):l),null!=d&&p.append(new TradingView[d.paneRendererClass](i)),this.m_model.selection().isSelected(this.m_study)&&this._isMarkersEnabled&&null!==this.m_selectionData&&(this.m_selectionData.vertOffset=u,p.append(new w(this.m_selectionData))),this.m_renderer=p},s.prototype.renderer=function(){var e=this.m_study.properties().styles[this.m_plotName];if(e.visible&&e.visible.value()&&this._scalesReady())return this.m_invalidated&&(this._updateRenderer(e),this.m_invalidated=!1),this.m_renderer},
inherit(a,s),a.prototype.renderer=function(){var e,t,i,n,o,r,s,a,l,c,u,h,d,p=this.m_study.properties().styles[this.m_plotName];if(p.visible&&p.visible.value()&&this._scalesReady())return e=this.m_model.timeScale(),this.m_invalidated&&(this._updateImpl(),this.m_invalidated=!1),t={},i=this._getTranspValue(),n=e.barSpacing(),p.size?(r=p.size.value(),o=this._calculateShapeHeight(50,r)):o=Math.round(n),s=p.location.value(),a=G.generateColor(p.color.value(),i),l=this._calculateVerticalOffset(s,o),t.items=this.items(),t.barSpacing=n,t.char=p.char.value(),t.height=o,t.vertOffset=l,t.color=a,c=new R,void 0!==(u=p.text?p.text.value():void 0)&&""!==u.trim()&&(h=u.trim().replace(/\\n/gm,"\n"),h=TradingView.cleanButAmpersand(h,!0),t.text=h,t.fontSize=12,d=p.textColor?p.textColor.value():void 0,t.textColor=d?G.generateColor(d,i):a),c.append(new D(t)),this.m_model.selection().isSelected(this.m_study)&&this._isMarkersEnabled&&null!==this.m_selectionData&&(this.m_selectionData.vertOffset=l,c.append(new w(this.m_selectionData))),c},inherit(l,r),l.prototype.renderer=function(){var e,t,i,n,o,r,s,a,l;if(this.m_study.properties().styles[this.m_plotName].visible&&this.m_study.properties().styles[this.m_plotName].visible.value()&&this._scalesReady())return this.m_invalidated&&(this._updateImpl(),this.m_invalidated=!1),e={},t=F(this._getTranspValue(),0,100),i=this.m_model.timeScale().barSpacing(),e.items=this.m_items,e.barSpacing=i,e.colorup=G.generateColor(this.m_study.properties().styles[this.m_plotName].colorup.value(),t),e.colordown=G.generateColor(this.m_study.properties().styles[this.m_plotName].colordown.value(),t),o=(n=v(e.colorup))?100*(1-n[3]):0,s=(r=v(e.colordown))?100*(1-r[3]):0,e.colorBorderUp=G.generateColor("#000000",o),e.colorBorderDown=G.generateColor("#000000",s),e.minHeight=this.m_study.properties().styles[this.m_plotName].minHeight.value(),e.maxHeight=this.m_study.properties().styles[this.m_plotName].maxHeight.value(),(a=new R).append(new O(e)),this.m_model.selection().isSelected(this.m_study)&&null!==this.m_selectionData&&((l=this.m_selectionData).barSpacing=i,a.append(new P(l))),a},l.prototype._createItem=function(e,t,i,n){var o,r,s,a;if(0!==t){if(Math.abs(t)>this._maxAbsValue&&(this._maxAbsValue=Math.abs(t)),o=t>0){if(void 0===(s=this._getSeriesVal(n,e))||null==s)return null;r=s}else{if(void 0===(a=this._getSeriesVal(i,e))||null==a)return null;r=a}return new E(e,r,t,o)}},l.prototype._convertItemsToCoordinates=function(){var e,t,i,n,o,r,s,a,l=this.m_model.timeScale(),c=this.m_study.priceScale();for(l.indexesToCoordinates(this.m_items),c.pointsArrayToCoordinates(this.m_items,this.m_study.firstValue()),(e=Math.abs(this.m_study.properties().styles[this.m_plotName].minHeight.value()))>(t=Math.abs(this.m_study.properties().styles[this.m_plotName].maxHeight.value()))&&(i=e,e=t,t=i),n=(t-e)/this._maxAbsValue,o=this.m_items,r=0;r<o.length;r++)s=o[r],a=Math.abs(s.height),s.height=a*n+e},c.prototype.update=function(){this._invalidated=!0},c.prototype._updateImpl=function(){var e,t,i,n,o,r,s,a,l,c,u,h,d,_,f,m,y,g
;if(this.m_bars.length=0,!this.m_model.timeScale().isEmpty()&&!this.m_study.priceScale().isEmpty()&&null!==(e=this.m_model.timeScale().visibleBarsStrictRange())&&(t=this.m_series.nearestIndex(e.firstBar(),q.NearestRight),i=this.m_series.nearestIndex(e.lastBar(),q.NearestLeft),!((n=this.m_study.getMinFirstBarIndexForPlot(this.m_plotName))>i)&&(t=Math.max(n,t),o=this.m_study.data(),r=this.m_study.firstValue(),s=o.range(t,i),a=0,l=this.m_study.properties().ohlcPlots[this.m_plotName],c={},u=function(e,t){var i=e+"@"+t;return c[i]||(c[i]=G.generateColor(e,t)),c[i]},s.each(function(e,t){var i,n,o,r,s,c,h,d,p,_;for(e=Math.floor(e),i=!0,n={},o=TradingView.OPEN_PLOT;o<=TradingView.CLOSE_PLOT;++o){if(void 0===(r=t[this._ohlcPlotIndexes[o]+1])||null===r){i=!1;break}n[o]=r}return!!i&&(s=n[TradingView.OPEN_PLOT],c=n[TradingView.CLOSE_PLOT],h=Math.max(s,n[TradingView.HIGH_PLOT],n[TradingView.LOW_PLOT],c),d=Math.min(s,n[TradingView.HIGH_PLOT],n[TradingView.LOW_PLOT],c),(p={}).time=Math.round(e),p.open=s,p.high=h,p.low=d,p.close=c,_=this._colorer?null!=t[this._colorer+1]?this._plotValueToPaletteColor(t[this._colorer+1]):"rgba(0, 0, 0, 0)":l.color.value(),p.color=u(_,a),p.hollow=null,this.m_bars.push(p),!1)}.bind(this)),this.m_study.priceScale().barPricesToCoordinates(this.m_bars,r),this.m_model.timeScale().barIndexesToCoordinates(this.m_bars),this.m_model.selection().isSelected(this.m_study))))for(h=N(t,i),this._selectionData={points:[],hittestResult:S.REGULAR,isDark:this.m_model.isDark(),bgColor:this.m_model.backgroundColor()},d=0;d<h.length;d++)_=h[d],null!==(f=this.m_study.data().valueAt(_))&&(m=f[this._plotIndex+1],y=this.m_model.timeScale().indexToCoordinate(Math.floor(_)),g=this.m_study.priceScale().priceToCoordinate(m,r),this._selectionData.points.push(new p(y,g)))},c.prototype.items=function(){return this.m_bars},c.prototype._plotValueToPaletteColor=function(e){var t=this._palette.valToIndex?this._palette.valToIndex[e]:e,i=this._paletterProps.colors[t];return i.color.value()},inherit(u,c),u.prototype.renderer=function(){var e,t,i=this.m_study.properties().ohlcPlots[this.m_plotName];if(i.visible.value())return this._invalidated&&(this._updateImpl(),this._invalidated=!1),(e={}).bars=this.m_bars,e.barSpacing=this.m_model.timeScale().barSpacing(),e.dontDrawOpen=this.m_series.properties().barStyle.dontDrawOpen.value(),(t=new R).append(new C(e)),this.m_model.selection().isSelected(this.m_study)&&this._isMarkersEnabled&&t.append(new w(this._selectionData)),t},inherit(h,c),h.prototype.renderer=function(){var e,t,i=this.m_study.properties().ohlcPlots[this.m_plotName];if(i.visible.value())return this._invalidated&&(this._updateImpl(),this._invalidated=!1),(e={}).bars=this.m_bars,e.barSpacing=this.m_model.timeScale().barSpacing(),e.wickVisible=i.drawWick.value(),e.borderVisible=i.drawBorder.value(),e.barWidth=Z.optimalBarWidth(e.barSpacing),e.borderColor=i.borderColor.value(),e.wickColor=i.wickColor.value(),(t=new R).append(new M(e)),
this.m_model.selection().isSelected(this.m_series)&&this._isMarkersEnabled&&t.append(new w(this._selectionData)),t},t.StudyPaneView=n,t.StudyBackgroundPaneView=o,t.StudyPlotShapesPaneView=s,t.StudyPlotCharsPaneView=a,t.StudyPlotArrowsPaneView=l,t.StudyPlotCandlesPaneView=h,t.StudyPlotBarsPaneView=u},IDnv:function(e,t,i){"use strict";function n(e,t,i,o,r){var a;return void 0===r&&(r=!1),t>i?((a=n(e,i,t,o,r)).count=-a.count,a):s(e,t,1,function(e,t){return t>i||0!==o&&e>o},r)}function o(e,t,i,n){var o;return void 0===n&&(n=!1),s(e,t,o=i<0?-1:1,function(e,t){return e>=i*o},n)}function r(e,t,i){var n=i<0?-1:1,o=function(e,t){return e>=i*n},r=s(e,t,n,o,!0);return r.times}function s(e,t,i,n,o){var r,s,l,c,u,h,d,p,_=0,f=t;for(e.moveTo(f),r=0,s=Number.MAX_VALUE,l=!1,c=t,u=[];!n(_,f);){if(r>15)throw new Error("Internal error 0x10 while extrapolating.");if((h=e.indexOfBar(f))===a.SessionStage.PRE_SESSION&&1===i)f=e.startOfBar(0),e.moveTo(f);else if(h===a.SessionStage.PRE_SESSION&&-1===i)f=e.startOfBar(a.SessionStage.PRE_SESSION)-1,e.moveTo(f);else if(h===a.SessionStage.POST_SESSION&&1===i)f=e.startOfBar(a.SessionStage.POST_SESSION),e.moveTo(f);else{if(h===a.SessionStage.POST_SESSION&&-1===i)throw new Error("Internal error 0x12 while extrapolating.");if((d=e.startOfBar(h))>t&&i>0||t>d&&i<0){if(l&&s===d)throw new Error("Internal error 0x11 while extrapolating.");l=!0,s=d,r=0,_++,c=d,o&&u.push(c)}0===h&&-1===i?f=d-1:(f=e.startOfBar(h+i))>(p=e.startOfBar(a.SessionStage.POST_SESSION))&&(e.moveTo(p),f=e.startOfBar(0))}r++}return{time:c,times:u,count:_}}i.r(t),i.d(t,"extrapolateBarsFrontToTime",function(){return n}),i.d(t,"extrapolateBarsFrontByCount",function(){return o}),i.d(t,"extrapolateBarsFrontByCountAllPoints",function(){return r}),i.d(t,"extrapolateBars",function(){return s});var a=i("E6p6")},IVMC:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.reduce(function(e,t,i){return~e.indexOf(t)||e.push(t),e},[])},e.exports=t.default},IWXC:function(e,t,i){"use strict";function n(e){return void 0===e&&(e="full"),c[e]||o(e,new l.a(e)),c[e]}function o(e,t){void 0===e&&(e="full"),c[e]=t}function r(e){return void 0===e&&(e="full"),c[e]}function s(){var e,t;for(e in c)c.hasOwnProperty(e)&&(void 0!==(t=c[e])&&t.destroy(),delete c[e])}var a,l,c;i.r(t),i.d(t,"getQuoteSessionInstance",function(){return n}),i.d(t,"setQuoteSessionInstance",function(){return o}),i.d(t,"getQuoteSessionNoEnsure",function(){return r}),i.d(t,"destroyQuoteSessions",function(){return s}),a=i("hGf4"),l=i.n(a),c={}},Ialn:function(e,t,i){"use strict";function n(e){return""!==e&&d()&&void 0!==e&&null!==e?e.replace(y,""):e}function o(e){return""!==e&&d()&&void 0!==e&&null!==e?p+e:e}function r(e){return""!==e&&d()&&void 0!==e&&null!==e?_+e+m:e}function s(e){return _+e+m}function a(e){return""!==e&&d()&&void 0!==e&&null!==e?f+e+m:e}function l(e){return Object(h.getNormalizedScrollLeft)(e,"rtl")}function c(e,t){var i=Object(h.detectScrollType)();if("indeterminate"===i)return 0;switch(i){case"negative":
t=e.clientWidth-e.scrollWidth+t;break;case"reverse":t=e.scrollWidth-e.clientWidth-t}return t}function u(e){var t=g.exec(e);return t?v.test(t[0])?"rtl":"ltr":""}var h,d,p,_,f,m,y,g,v;i.r(t),i.d(t,"isRtl",function(){return d}),i.d(t,"stripLTRMarks",function(){return n}),i.d(t,"startWithLTR",function(){return o}),i.d(t,"forceLTRStr",function(){return r}),i.d(t,"forceLTRStrSsr",function(){return s}),i.d(t,"forceRTLStr",function(){return a}),i.d(t,"getLTRScrollLeft",function(){return l}),i.d(t,"getLTRScrollLeftOffset",function(){return c}),i.d(t,"detectAutoDirection",function(){return u}),h=i("oYVD"),d=function(){return"rtl"===window.document.dir},p="",_="",f="",m="",y=new RegExp(p+"|"+_+"|"+f+"|"+m,"g"),g=/[^\u0000-\u0040\u005B-\u0060\u007B-\u00BF\u00D7\u00F7\u02B9-\u02FF\u2000-\u200E\u2010-\u2029\u202C\u202F-\u2BFF]/,v=/[\u0590-\u07FF\u200F\u202B\u202E\uFB1D-\uFDFD\uFE70-\uFEFC]/},IiTo:function(e,t,i){"use strict";function n(e,t){return t-function(e,t){var i=new Date(t);return function(e,t){var i=t.multiplier()||0;switch(t.kind()){case y.ResolutionKind.Months:!function(e,t){o(e,Math.floor(t/12));var i=e.getUTCMonth()-t%12;for(i<0&&(o(e,1),i+=12),e.setUTCMonth(i);e.getUTCMonth()!==i;)r(e,1)}(e,i);break;case y.ResolutionKind.Weeks:!function(e,t){r(e,7*t)}(e,i);break;case y.ResolutionKind.Days:r(e,i);break;default:throw new Error("Unsupported resolution type")}}(i,e),i.getTime()}(e,t)}function o(e,t){var i=e.getUTCMonth();e.setUTCFullYear(e.getUTCFullYear()-t),e.getUTCMonth()!==i&&r(e,1)}function r(e,t){e.setTime(e.getTime()-864e5*t)}function s(e){return 0|e}function a(e,t){var i,n=f.clone(t),o=e.businessDaysToCalendarDays(n,1);if(o>1&&f.add_date(n,o-1),null===(i=e.leftBorderOfDailyBar(n)))throw new Error("Cannot calculate left border of daily bar");return f.cal_to_utc(f.get_timezone(e.timezone()),i)}function l(e,t){var i=f.get_day_of_week(t)-e.firstDayOfWeek();return i<0?i+7:i}function c(e,t){var i=f.get_day_of_year(t)-1,n=l(e,t)-i%7;return 0===n?s(i/7):(n>=0&&(n-=7),s((n+i)/7))}function u(e,t,i,n){var o,r;return void 0===n&&(n=!1),r=(o=y.Interval.parse(e)).multiplier(),o.kind()===y.ResolutionKind.Hours?new P(60*r*60,t):o.kind()===y.ResolutionKind.Minutes?new P(60*r,t):o.kind()===y.ResolutionKind.Seconds?new P(r,t):o.kind()===y.ResolutionKind.Range?new P(60*r,t):new T(t,i,r,function(e,t){switch(e){case y.ResolutionKind.Days:return new L(t);case y.ResolutionKind.Weeks:return new M(t);case y.ResolutionKind.Months:return new A}throw new Error("Unknown dwm resolution: "+e)}(o.kind(),t),n)}function h(e,t,i,o,r,s,a){var l,c,u,h,d=new b("Etc/UTC",e,t,i),p=y.Interval.parse(r+o),_=p.isDWM();return _?(c=n(p,a),l=864e5):(c=p.inMilliseconds(),l=60*d.spec.findSession(0,0,0).getEntry().length()*1e3),u=l/c,0,s<(h=(_?7:7-d.spec.weekEndsCount())*u)?a-864e5*(s/u):a-6048e5*(s/h)}function d(e,t){return!m.enabled("disable_resolution_rebuild")&&y.Interval.isDWM(e)?u(e,t,k):null}function p(e,t){var i=f.clone(t);return e.alignToSessionStart(i),f.cal_to_utc(f.get_timezone(e.timezone()),i)}function _(e,t){
var i=f.utc_to_cal(t.timezone,+e),n=f.get_day_of_week(i),o=f.get_minutes_from_midnight(i),r=t.spec.findSession(t.spec.getWeekIndex(i),n,o).getEntry();return r.isOvernight()&&o>r.startOffset()+r.length()&&n===r.dayOfWeek()-1&&(n++,o-=1440),n===r.dayOfWeek()&&o>=r.startOffset()&&o<r.startOffset()+r.length()}var f,m,y,g,v,S,b,w,P,C,T,x,I,L,M,A,k;i.r(t),f=i("jCNj"),m=i("Kxc7"),y=i("LxhU"),g=i("mrSG"),v=i("E6p6"),S=i("5mo2"),b=function(){function e(e,t,i,n){this.init(e,t,i,n)}return e.prototype.init=function(e,t,i,n){this.timezone=f.get_timezone(e),this.spec=new S.SessionSpec(e,t,i,n)},e}(),w=function(){function e(){}return e.prototype.alignTime=function(e){if(isNaN(e))return NaN;var t=this.indexOfBar(e);return t===v.SessionStage.POST_SESSION&&(this.moveTo(e),t=this.indexOfBar(e)),t<0?NaN:this.startOfBar(t)},e}(),P=function(e){function t(t,i){var n=e.call(this)||this;return n._sessionStartMs=Number.MIN_VALUE,n._sessionEndMs=Number.MIN_VALUE,n._periodSec=t,n._session=i,n}return Object(g.__extends)(t,e),t.prototype.alignTimeIfPossible=function(e){var t=this.alignTime(e);return isNaN(t)?e:t},t.prototype.indexOfBar=function(e){return e<this._sessionStartMs?v.SessionStage.PRE_SESSION:e>=this._sessionEndMs?v.SessionStage.POST_SESSION:s(f.time_seconds_diff(e,this._sessionStartMs)/this._periodSec)},t.prototype.startOfBar=function(e){var t,i;if(e===v.SessionStage.PRE_SESSION)return t=f.get_cal_from_unix_timestamp_ms(this._session.timezone,this._sessionStartMs-1),i=this._session.spec.alignToNearestSessionEnd(t,-1),f.cal_to_utc(this._session.timezone,i);if(e===v.SessionStage.POST_SESSION)return this._sessionEndMs;if(e<0)throw new Error("Negative offset is not supported");return this._sessionStartMs+f.time_seconds(this._periodSec*e)},t.prototype.endOfBar=function(e){if(e<0)throw new Error("Index cannot be negative");var t=this.startOfBar(e)+1e3*this._periodSec;return t>this._sessionEndMs?this._sessionEndMs:t},t.prototype.isLastBar=function(e,t){return t>=this._sessionStartMs+f.time_seconds(this._periodSec*(e+1)-1)},t.prototype.moveTo=function(e){var t=this._session.timezone,i=f.utc_to_cal(t,e),n=this._session.spec,o=n.alignToSessionStart(i);this._sessionStartMs=f.cal_to_utc(t,i),f.add_minutes(i,o),this._sessionEndMs=f.cal_to_utc(t,i)},t.prototype.moveNext=function(){this.moveTo(this._sessionEndMs)},t}(w),C=i("OBgQ"),T=function(e){function t(t,i,n,o,r){void 0===r&&(r=!1);var s=e.call(this)||this;return s._periodStart=-Number.MAX_VALUE,s._periodEnd=-Number.MAX_VALUE,s._periodLastBarStart=-Number.MAX_VALUE,s._periodStartDay=new C.a(0,0,0),s._periodEndDay=new C.a(0,0,0),s._period=n,s._sessionTgt=t,s._builder=o,s._useBusinessDays=r,s._sessionSrc=r?new b("Etc/UTC","24x7"):i||t,s}return Object(g.__extends)(t,e),t.prototype.builder=function(){return this._builder},t.prototype.alignTimeIfPossible=function(e){return this.tradingDayToSessionStart(e)},t.prototype.tradingDayToSessionStart=function(e){return this.moveTo(e),this.startOfBar(0)},t.prototype.indexOfBar=function(e){if(this._useBusinessDays){
var t=C.a.fromCalendar(f.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e));return t.before(this._periodStartDay)?v.SessionStage.PRE_SESSION:this._periodEndDay.before(t)?v.SessionStage.POST_SESSION:0}return e<this._periodStart?v.SessionStage.PRE_SESSION:e>=this._periodEnd?v.SessionStage.POST_SESSION:0},t.prototype.startOfBar=function(e){var t,i;return e===v.SessionStage.PRE_SESSION?(t=f.get_cal_from_unix_timestamp_ms(this._sessionTgt.timezone,this._periodStart-1),i=this._sessionTgt.spec.alignToNearestSessionEnd(t,-1),f.cal_to_utc(this._sessionTgt.timezone,i)-1):e===v.SessionStage.POST_SESSION||e>0?this._periodEnd:e===v.SessionStage.LASTBAR_SESSION?this._periodLastBarStart:this._periodStart},t.prototype.moveTo=function(e){var t,i,n,o,r,s,l,c,u,h,d=f.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e);for(this._sessionSrc.spec.correctTradingDay(d),t=f.get_year(d),n=(i=this._indexOfPeriodInYear(d))+this._period,o=this._sessionTgt.spec,r=this._sessionTgt.timezone,s=this._builder.startOfPeriod(r,i,t),this._periodStart=a(o,s),l=f.clone(s),(c=o.businessDaysToCalendarDays(l,1))>1&&f.add_date(l,c-1),this._periodStartDay=C.a.fromCalendar(l),u=this._builder.startOfPeriod(r,n,t),this._periodEnd=a(o,u),h=f.clone(u),f.add_date(h,-1);o.isCalWeekEnd(h);)f.add_date(h,-1);this._periodEndDay=C.a.fromCalendar(h),f.add_date(u,-1),function(e,t){for(;e.isCalWeekEnd(t);)f.add_date(t,-1)}(this._sessionTgt.spec,u),this._periodLastBarStart=a(o,u),(this._periodLastBarStart<this._periodStart||this._periodLastBarStart===this._periodEnd)&&(this._periodLastBarStart=this._periodStart)},t.prototype.endOfBar=function(e){if(0!==e)throw new Error("index should be 0");return this._periodEnd},t.prototype.isLastBar=function(e,t){if(0!==e)throw new Error("index should be 0");return t>=this._periodLastBarStart},t.prototype.currentRange=function(){return{from:this._periodStartDay,to:this._periodEndDay}},t.prototype.indexOfBarInYear=function(e){var t=f.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e),i=f.get_year(t),n=this._builder.indexOfPeriod(t),o=this._sessionTgt.timezone,r=this._builder.startOfPeriod(o,n,i),s=a(this._sessionTgt.spec,r);return r=f.get_cal_from_unix_timestamp_ms(f.get_timezone("Etc/UTC"),s),i<f.get_year(r)?(r=this._builder.startOfPeriod(o,n-1,i),s=a(this._sessionTgt.spec,r),{index:(n-1)/this._period,time:s}):{index:n/this._period,time:s}},t.prototype._indexOfPeriodInYear=function(e){var t=this._builder.indexOfPeriod(e),i=s(t/this._period)*this._period;return-1===t&&(i=-this._period),i},t}(w),x=function(){function e(){}return e.prototype.indexOfPeriod=function(e){return f.get_day_of_year(e)-1},e.prototype.startOfPeriod=function(e,t,i){var n=f.days_per_year(i);return f.get_cal(f.get_timezone("Etc/UTC"),i,f.JANUARY,1+Math.min(t,n))},e}(),I=function(e){function t(t){var i=e.call(this)||this;return i._sessionsSpec=t,i}return Object(g.__extends)(t,e),t.prototype.indexOfPeriod=function(t){return e.prototype.indexOfPeriod.call(this,t)-function(e,t){
var i,n=c(e,t),o=f.get_cal(f.get_timezone("Etc/UTC"),f.get_year(t),f.JANUARY,1);return f.add_date(o,7*n),n*e.weekEndsCount()+e.holidaysFromYearStart(o)+(i=f.get_day_of_year(t)-f.get_day_of_year(o))-e.calendarDaysToBusinessDays(o,i)}(this._sessionsSpec,t)},t.prototype.startOfPeriod=function(t,i,n){var o,r,a=7-this._sessionsSpec.weekEndsCount(),l=Math.max(0,s(i/a)-1),c=f.get_cal(f.get_timezone("Etc/UTC"),n,f.JANUARY,1),u=f.get_days_per_year(c);return f.add_date(c,7*l),(i-=a*l-this._sessionsSpec.holidaysFromYearStart(c))>0&&(o=this._sessionsSpec.businessDaysToCalendarDays(c,i),f.add_date(c,o)),r=f.get_day_of_year(c)-1,n<f.get_year(c)&&(r+=u),e.prototype.startOfPeriod.call(this,t,r,n)},t}(x),L=function(){function e(e){this._builder=null,this._initialized=!1,this._session=e}return e.prototype.indexOfPeriod=function(e){return this._getBuilder().indexOfPeriod(e)},e.prototype.startOfPeriod=function(e,t,i){return this._getBuilder().startOfPeriod(e,t,i)},e.prototype._getBuilder=function(){return null!==this._builder&&this._initialized||(this._builder=this._session.spec.hasWeekEnds()?new I(this._session.spec):new x,this._initialized=!0),this._builder},e}(),M=function(){function e(e){this._session=e}return e.prototype.indexOfPeriod=function(e){var t,i=c(this._session.spec,e);return 0===i&&(t=f.get_timezone(this._session.spec.timezone()),e<this.startOfPeriod(t,0,f.get_year(e))&&(i=-1)),i},e.prototype.startOfPeriod=function(e,t,i){var n=f.get_cal(f.get_timezone("Etc/UTC"),i,f.JANUARY,1),o=l(this._session.spec,n),r=0===o?7*t:7*(t+1)-o,s=f.get_days_per_year(n);return r>s?this.startOfPeriod(e,0,i+1):(f.add_date(n,r),n)},e}(),A=function(){function e(){}return e.prototype.indexOfPeriod=function(e){return f.get_month(e)},e.prototype.startOfPeriod=function(e,t,i){if(t<0){var n=s((11-t)/12);i-=n,t+=12*n}else t>f.DECEMBER&&(i++,t=f.JANUARY);return f.get_cal(f.get_timezone("Etc/UTC"),i,t,1)},e}(),i.d(t,"newBarBuilder",function(){return u}),i.d(t,"alignPeriodsBack",function(){return h}),i.d(t,"createDWMAligner",function(){return d}),i.d(t,"alignExchangeTimeToSessionStartAndReturnUTC",function(){return p}),i.d(t,"isTradingNow",function(){return _}),i.d(t,"SessionInfo",function(){return b}),k=new b("Etc/UTC","0000-0000:1234567")},IjC5:function(e,t,i){"use strict";var n,o,r,s,a,l,c,u;i.r(t),i.d(t,"RectangleRenderer",function(){return u}),n=i("Eyy1"),o=i("f6yo"),r=i("aO4+"),s=i("GEp6"),a=i("VdBB"),l=i("Tmoa"),c=i("jFln"),u=function(){function e(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)}return e.prototype.setData=function(e){this._data=e},e.prototype.draw=function(e){var t,i,n;null===this._data||this._data.points.length<2||(e.lineCap="butt",e.strokeStyle=this._data.color,e.lineWidth=this._data.linewidth,void 0!==this._data.linestyle&&Object(c.setLineStyle)(e,this._data.linestyle),i=(t=this._data.points)[0],n=t[1].subtract(i),e.beginPath(),e.rect(i.x,i.y,n.x,n.y),
this._data.linewidth>0&&e.stroke(),this._data.fillBackground&&(e.fillStyle=this.getColor(),e.fill()))},e.prototype.hitTest=function(e){var t,i,n,a,l,c,u,h,d;return null===this._data||this._data.points.length<2||this._data.nohittest?null:(i=(t=this._data.points)[0],n=t[1],a=new r.Point(n.x,i.y),l=new r.Point(i.x,n.y),Object(s.distanceToSegment)(i,a,e).distance<=3?this._hitTestResult:Object(s.distanceToSegment)(a,n,e).distance<=3?this._hitTestResult:Object(s.distanceToSegment)(n,l,e).distance<=3?this._hitTestResult:Object(s.distanceToSegment)(l,i,e).distance<=3?this._hitTestResult:this._data.fillBackground&&(c=Math.min(i.x,n.x),u=Math.max(i.x,n.x),h=Math.min(i.y,n.y),d=Math.max(i.y,n.y),i=new r.Point(c,h),n=new r.Point(u,d),Object(o.pointInBox)(e,Object(r.box)(i,n)))?this._backHitTestResult:null)},e.prototype.getColor=function(){var e=Object(n.ensure)(this._data);return void 0===e.transparency?e.backcolor:Object(l.generateColor)(e.backcolor,e.transparency,this._forceOverrideTransparency)},e}()},InMJ:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolFlatBottom";var r=t||n.createProperties();o.call(this,e,r),this.version=n.version,i.e("lt-pane-views").then(function(e){var t=i("gr7S").FlatBottomPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=window.t("Flat Bottom");inherit(n,o),n.version=1,n.prototype.pointsCount=function(){return 3},n.prototype.title=function(){return a},n.prototype.name=function(){return"Flat Bottom"},n.prototype.hasEditableCoordinates=function(){return!1},n.prototype.addPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),o.prototype.addPoint.call(this,e)},n.prototype.setLastPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),o.prototype.setLastPoint.call(this,e)},n.prototype.setPoint=function(e,t,i){if(i&&i.shift()&&1===e){this._snapPoint45Degree(t,this.points()[0])}e<3?o.prototype.setPoint.call(this,e,t):this._points[0].index=t.index},n.prototype.canHasAlert=function(){return!0},n.prototype._getAlertPlots=function(){var e,t,i,n,o,r,s,a,l,c=this._points[0],u=this._points[1],h=[];return c.index<=u.index?(h.push(c),h.push(u)):(h.push(u),h.push(c)),(e=this._points[2]).time=u.time,e.index=u.index,t={price:e.price,time:c.time,index:c.index},i=[],e.index<=t.index?(i.push(e),i.push(t)):(i.push(t),i.push(e)),h[0].price>i[0].price?(n=h,o=i):i[0].price>h[0].price?(n=i,o=h):i[1].price>h[1].price?(n=i,o=h):(n=h,o=i),a=this.properties().extendLeft.value(),l=this.properties().extendRight.value(),c.index<=u.index?(r=a,s=l):(r=l,s=a),[this._linePointsToAlertPlot(n,"Upper",r,s),this._linePointsToAlertPlot(o,"Lower",a,s)]},n.prototype.getInputsPropertyPage=function(){return null},n.prototype.getStylesPropertyPage=function(){return s.LineToolFlatBottomStylesPropertyPage},
n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("vm8R").GeneralTrendFiguresDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new r("linetoolflatbottom",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolFlatBottom=n},IzGk:function(e,t,i){"use strict";function n(e){var t=(""+e).match(/(.*)([DWM])/);return t?t[1]+window.t(t[2],{context:"interval_short"}):e}i.r(t),i.d(t,"translatedIntervalString",function(){return n});i("YFKU")},J2xC:function(e,t,i){e.exports={"css-value-header-toolbar-height":"38px"}},JOqt:function(e,t,i){"use strict";i.r(t),i.d(t,"debounce",function(){return n});var n=function(e,t){function i(){e.apply(o,n)}var n,o,r=0;return function(){o=this,n=arguments,clearTimeout(r),r=setTimeout(i,t)}}},JT5O:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"StudyMarket",function(){return r}),n=i("aIyQ"),o=i.n(n),r=function(){function e(e,t){this.visibilityChanged=new o.a,this._dialogPromise=null,this._dialog=null,this._chartWidgetCollection=e,this._options=t}return e.prototype.isVisible=function(){return null!==this._dialog&&this._dialog.isVisible()},e.prototype.show=function(e){var t=this;return null===this._dialog?this._requestDialog().then(function(){return t.show(e)}):this._dialog.show(e)},e.prototype.hide=function(){null!==this._dialog&&this._dialog.hide()},e.prototype.onCustomScriptModified=function(){null!==this._dialog&&this._dialog.onCustomScriptModified()},e.prototype.resetAllPages=function(){null!==this._dialog&&this._dialog.resetAllPages()},e.prototype.updateFavorites=function(){null!==this._dialog&&this._dialog.updateFavorites()},e.prototype.getDialog=function(){return this._dialog},e.prototype._requestDialog=function(){var e=this,t=function(t,n){Promise.all([i.e("dialogs-core"),i.e(19),i.e(32),i.e(66),i.e("create-dialog"),i.e("study-market")]).then(function(n){var o=i("24k8").StudyMarketDialog;t(new o(e._chartWidgetCollection,e._options))}.bind(null,i)).catch(n)};return null===this._dialogPromise&&(this._dialogPromise=new Promise(t).then(function(t){e._dialogPromise=null,e._dialog=t,e._dialog.visibilityChanged.subscribe(null,function(t){e.visibilityChanged.fire(t)})})),this._dialogPromise},e}()},JcHK:function(e,t,i){"use strict";function n(e){return e.getAll().some(function(e){return e.isInitialized()})}function o(e,t){var i=e.getAll(),n=function(){t(),i.forEach(function(e){e.chartWidgetInitialized.unsubscribe(null,n)})};i.forEach(function(e){e.chartWidgetInitialized.subscribe(null,n,!0)})}i.r(t),i.d(t,"isAnyChartWidgetInitialized",function(){return n}),i.d(t,"waitAnyChartWidgetInitialized",function(){return o})},JjUe:function(e,t,i){"use strict";var n,o,r,s,a,l,c,u,h,d,p,_,f,m,y,g,v;i.r(t),i.d(t,"OverlayDataWindowView",function(){return v}),n=i("mrSG"),o=i("ivNn"),r=i("4miz"),s=i("GH0z"),a=i("k9/m"),l=i("7qT/"),c=i("Ialn"),u=i("qFKp"),h=i("38az"),d=i("e92V"),p=i("mMWL"),_=u.CheckMobile.any(),
f=_&&!0,m=new s.PercentageFormatter,y=window.t("n/a"),g=y+" ("+y+"%)",v=function(e){function t(t,i){var n=e.call(this)||this;return n._invalidated=!0,n._study=t,n._model=i,n._items.push(new r.a(window.t("Open"),"")),n._items.push(new r.a(window.t("High"),"")),n._items.push(new r.a(window.t("Low"),"")),n._items.push(new r.a(window.t("Close"),"")),n._items.push(new r.a("","")),n._items.push(new r.a("","")),n._items.push(new r.a(window.t("Change"),"")),n.update(),n}return Object(n.__extends)(t,e),t.prototype.items=function(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._items},t.prototype.update=function(){this._invalidated=!0},t.prototype._updateImpl=function(){var e,t,i,n,r,s,l,u,h,d,p,_,f,v,S,b,w,P;if(this._header=this._study.title(),this._items[0].setValue(y),this._items[1].setValue(y),this._items[2].setValue(y),this._items[3].setValue(y),this._items[6].setValue(g),!this._model.timeScale().isEmpty()&&0!==this._study.data().size()){for(e=this._showLastPriceAndChangeOnly(),t=0,i=this._items;t<i.length;t++)i[t].setVisible(!e);if((n=this._items[4]).setVisible(!1),e?r=this._study.data().lastIndex():(r=this._model.crossHairSource().appliedIndex(),Object(o.isNumber)(r)||(r=this._study.data().lastIndex())),null!==r&&Object(o.isNumber)(r)&&null!==(s=this._study.data().search(r,a.PlotRowSearchMode.NearestLeft,1))&&(l=s.index,h=(u=s.value)[1],d=u[2],p=u[3],_=u[4],null!=h&&null!=d&&null!=p&&null!=_))for(f=this._study.formatter(),void 0!==(v=this._changesData(_,h,l,e)).values&&(S=Object(c.forceLTRStr)(f.format(v.values.change,!0)+" ("+m.format(v.values.percentChange,!0)+")"),this._items[6].setValue(S)),e?(this._items[5].setValue(f.format(_)),this._items[5].setVisible(!0),this._items[6].setVisible(!0)):(this._items[0].setValue(f.format(h)),this._items[1].setValue(f.format(d)),this._items[2].setValue(f.format(p)),this._items[3].setValue(f.format(_)),n.setValue(f.format(this._study.barFunction()(u))),this._items[5].setVisible(!1)),b=this._color(l,v,e),w=0,P=this._items;w<P.length;w++)P[w].setColor(b)}},t.prototype._showLastPriceAndChangeOnly=function(){return _&&(null===this._model.crossHairSource().pane||Object(d.a)(p.tool.value())||null!==this._model.lineBeingEdited())},t.prototype._changesData=function(e,t,i,n){var o,r,s;if(n&&!f){if(null!==(o=this._study.quotes()))return{values:{change:o.change,percentChange:o.change_percent},priceDirection:{basedOnCurrentBar:o.change>=0?0:1,basedOnPrevClose:o.change>=0?0:1}}}else if(null!==(s=(r=this._study.data().search(i-1,a.PlotRowSearchMode.NearestLeft,1))&&r.value[4]||null))return{values:{change:e-s,percentChange:Object(l.a)(s,e)},priceDirection:{basedOnCurrentBar:e>=t?0:1,basedOnPrevClose:e>=s?0:1}};return{priceDirection:{basedOnCurrentBar:e>=t?0:1,basedOnPrevClose:e>=t?0:1}}},t.prototype._color=function(e,t,i){var n,o,r,s=h.SeriesBarColorer.upColor(this._study.properties()),a=h.SeriesBarColorer.downColor(this._study.properties())
;return i&&!f?t.priceDirection?s:a:10===(n=this._study.properties().childs().style.value())?null!=(o=this._study.barColorer().barStyle(e,!1)).barBorderColor?o.barBorderColor:o.barColor:(r=!1,0===n?r=this._study.properties().childs().barStyle.childs().barColorsOnPrevClose.value():1===n?r=this._study.properties().childs().candleStyle.childs().barColorsOnPrevClose.value():9===n&&(r=!0),r?0===t.priceDirection.basedOnPrevClose?s:a:0===t.priceDirection.basedOnCurrentBar?s:a)},t}(r.b)},JmuD:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)},t.hasProperty=function(e,t){return t in e}},K4L1:function(e,t,i){"use strict";function n(e,t){var n,o,r,a,l,c,u,h,d;if(!e)throw new Error("No studies metainfo");if(n=i("EyEd"),this._studiesMetainfo=e,!t)throw new Error("No studies migrations");for(this._studiesMigrations=t,this._migrations={},o=0;o<this._studiesMigrations.length;o++)for(a=(r=this._studiesMigrations[o]).versFrom,l=r.versTo,c=0;c<r.studyMigrations.length;c++)h=(u=r.studyMigrations[c]).studyId,0!==u.rules.length?((d=h in this._migrations?this._migrations[h]:new n(h)).addMigration(a,l,u.rules),this._migrations[h]=d):s.logError("Study Migration should have at least one convertion rule");this._clientMigrations=[function(e,t){var i,n,o,r,s;if(0===this._studiesMetainfo.length||!e.isTVScript||e.version>=22)return t;for(i={},n=0,o=0;void 0!==(r=t[o]);)s=t[r.id],r.isFake&&(r.id="in_"+n++),i[o]=r,i[r.id]=s,o++;return i}]}var o=i("Eyy1").assert,r=i("lCO3").Version,s=i("uOxu").getLogger("Chart.Study.Versioning"),a=i("Wt0y"),l=i("0YCj"),c=i("TcSq").extractPineId,u=i("Si3H").migrateMetaInfoAndPropState;n.prototype.updateMetaInfo=function(e){var t,i,n;if(!e)return e;for(o(!e.isTVScript,"This method should update only built-in java indicators metaInfo. For Pine indicators use updateMetaInfoAsync"),t=null,i=this._studiesMetainfo,n=0;n<i.length;n++)if(i[n].id===e.id){t=i[n];break}return TradingView.clone(t)},n.prototype.updateMetaInfoAsync=function(e){var t,i,n,o;if(!e)return{sync:!1,result:Promise.reject("No old metaInfo was given")};if(new l(e),t=l.versionOf(e),e.isTVScript&&!e.pine&&t<l.VERSION_PINE_PROTECT_TV_4164);else if(!e.isTVScript||!e.pine){for(i=null,n=this._studiesMetainfo,o=0;o<n.length;o++)if(n[o].id===e.id){i=n[o];break}return{sync:!0,result:i?TradingView.clone(i):null}}},n.prototype.lastVersionOfStudy=function(e){return this._studiesMetainfo.find(function(t){return t.id===e}).version},n.prototype.updateStudyInputs=function(e,t,i,n,o){var a,l,c,u,h,d=TradingView.clone(n);if(e in this._migrations&&(a=r.parse(t),"last"===i?(c=this.lastVersionOfStudy(e),l=r.parse(c)):l=r.parse(i),d=this._migrations[e].updateInputs(a,l,d)),null==o)return d;for(u in o)u in d||(d[u]=o[u]);for(u in d)u in o||(h=d[u],s.logWarn("Extra input detected, studyId="+e+", versionFrom="+t+", inputId="+u+", inputValue="+h+", removing it and continue..."),delete d[u]);return d},n.prototype.updateStudyState=function(e,t,i){
var n,o,r,a,c,u,h,d,p,_,f,m,y;if(null==e||null==t||null==i)return e;for(e=TradingView.clone(e),t.isTVScript||!!t.pine||t.version===i.version||(n=i&&i.defaults.inputs,o=this.updateStudyInputs(t.id,t.version,i.version,e.inputs,n),e.inputs=o),r=0;r<this._clientMigrations.length;++r)o=this._clientMigrations[r].call(this,t,e.inputs),Object.keys(o).length===Object.keys(e.inputs).length?e.inputs=o:s.logWarn("StudyVersioning._clientMigrations application returned bad result. Skipping it...");if(a=l.versionOf(t),t.isTVScript&&t.TVScriptSourceCode&&a>=12&&a<=26){for(c={},r=0;r<t.plots.length;++r)u=t.plots[r],h=i.plots[r],c[u.id]=h.id;for(d=Object.keys(e.styles),r=0;r<d.length;++r)p=d[r],_=e.styles[p],delete e.styles[p],f=c[p],e.styles[f]=_;for(m=Object.keys(e.plots),r=0;r<m.length;++r)y=m[r],p=e.plots[y].id,e.plots[y].id=c[p]}return e},n.prototype.patchPointsBasedStudyState=function(e){return n._fixInputsMaxValue(e.state,e.metaInfo),e},n.prototype.patchPointsBasedStudyData=function(e,t){if(!a.isProd())return t;if(!e||!t)return t;var i=TradingView.clone(t);return"VbPFixed@tv-volumebyprice"===e.id&&e.version&&e.version<=4&&n._patchOldVolumeProfiles(0,i),i},n.prototype.patchStudyData=function(e,t,i,o){var r,s,c,u,h,d,p;if(!a.isProd())return{data:t,nsData:i,indexes:o};if(r=TradingView.clone(t),s=TradingView.clone(i),c=TradingView.clone(o),"VbPVisible@tv-volumebyprice"===e.id&&e.version&&e.version<=4&&n._patchOldVolumeProfiles(0,r.graphics),"VbPSessions@tv-volumebyprice"===e.id&&e.version&&e.version<=4&&n._patchOldVolumeProfiles(0,r.graphics),u=l.versionOf(e),e.isTVScript&&e.TVScriptSourceCode&&u>=12&&u<=26)for(h=r.columns,r.columns=[],d=0;d<h.length;++d)p="plot_"+d,r.columns.push(p);return{data:r,nsData:s,indexes:c}},n._patchOldVolumeProfiles=function(e,t){var i,n=t.hhists[e].data,o=[];for(i in n)o=o.concat(n[i]);t.hhists[0].data=o},n._fixInputsOrder=function(e,t){var i,o,r,s,a=l.getOrderedInputIds(t),c=n.splitInputs(e.inputs),u=c.arr,h=c.obj,d=TradingView.merge({},h);for(i=0;i<a.length;++i)o=a[i],null!==(r=n.findInputKeyById(u,o))&&(s=u[r],d[i]=s);e.inputs=d},n.INPUT_MAX_VALUE=1e12,n._verifyInputsMaxValue=function(e){var t,i,o=n.INPUT_MAX_VALUE;if(e.inputs)for(t=0;t<e.inputs.length;t++)"integer"===(i=e.inputs[t]).type&&i.max&&i.max>o&&s.logWarn("Bad integer input max value in metaInfo id="+e.id+" title="+e.description)},n._fixInputsMaxValue=function(e,t){var i,o,r,s,a,l;if(!TradingView.isAbsent(t)){if(i=n.INPUT_MAX_VALUE,t.inputs)for(o=0;o<t.inputs.length;o++)"integer"===(r=t.inputs[o]).type&&r.max&&r.max>i&&(r.max=i);if(e&&e.inputs){for(l in a=(s=n.splitInputs(e.inputs)).arr)"integer"===(r=a[l]).type&&r.max&&r.max>i&&(r.max=i);e.inputs=TradingView.merge(s.obj,s.arr)}}},n.prototype.patchPropsStateAndMetaInfo=function(e,t,i){var o,r,s,a,h,d,p,_,f,m,y,g,v,S,b,w,P,C,T;if("Script$BOOKER"!==t.productId||t.alerts||delete e.alerts,n._fixInputsOrder(e,t),n._fixInputsMaxValue(e,t),o=n.splitInputs(e.inputs),e.inputs=o.obj,(r=l.versionOf(t))<l.METAINFO_FORMAT_VERSION_SOS_V2&&t.isChildStudy&&(e.isChildStudy=t.isChildStudy),s=60,
t.isTVScript&&t.version<s&&("Script$TV_EARNINGS@tv-scripting"!==t.id&&"Script$TV_DIVIDENDS@tv-scripting"!==t.id&&"Script$TV_SPLITS@tv-scripting"!==t.id||delete t.TVScriptSourceCode),"Volume"!==t.id&&"Volume@tv-basicstudies"!==t.id||0!==t.inputs.length||(t.inputs=[{id:"length",type:"integer",defval:20,min:1,max:1e3}],t.plots.push({id:"vol_ma",type:"line"})),"Volume@tv-basicstudies"===t.id&&t.version&&t.version<=46&&(e.styles.vol.transparency=e.transparency||87),"PivotPointsStandard@tv-basicstudies"===t.id&&(0===t.inputs.length?(e.inputs={kind:"Traditional",showHistoricalPivots:!0},t.inputs=[{defval:"Traditional",id:"kind",type:"text",options:["Traditional","Fibonacci","Woodie","Classic","DeMark","Camarilla"]},{id:"showHistoricalPivots",type:"bool",defval:!0}]):1===t.inputs.length&&(e.inputs={kind:"Traditional"},t.inputs=[{defval:"Traditional",id:"kind",type:"text",options:["Traditional","Fibonacci","Woodie","Classic","DeMark","Camarilla"]},{id:"showHistoricalPivots",type:"bool",defval:!0}]),void 0===e._hardCodedDefaultsVersion&&(e._hardCodedDefaultsVersion=1,a=e.color,delete e.color,e.levelsStyle={colors:{P:a,"S1/R1":a,"S2/R2":a,"S3/R3":a,"S4/R4":a,"S5/R5":a}})),"CMF"===t.shortId&&2===t.inputs.length&&(e.inputs={length:e.inputs["length fast"]},t.inputs=t.inputs.splice(0,1),t.inputs[0].id="length"),t.defaults&&void 0===t.defaults.precision&&r<l.VERSION_NEW_STUDY_PRECISION_FORMAT&&(-1!==["Volume@tv-basicstudies","VbPVisible@tv-volumebyprice","VbPSessions@tv-volumebyprice"].indexOf(t.id)?t.defaults.precision=0:t.defaults.precision=4),h=60,t.version<h)for(d=["TV_DIVIDENDS","TV_SPLITS","TV_EARNINGS"],p="Script".length,_=0;_<d.length;_++)t.id.startsWith("Script$"+d[_]+"@tv-scripting")&&(t.fullId="ESD"+t.fullId.substring(p),t.id="ESD"+t.id.substring(p),t.name="ESD"+t.name.substring(p),t.shortId="ESD"+t.shortId.substring(p),t.productId="ESD"+t.productId.substring(p));if(r<l.VERSION_PINE_PROTECT_TV_4164&&(f={"StrategyScript$STD;Consecutive%1Ups/Downs%1Strategy":{pineId:"STD;Consecutive%1Ups%1Downs%1Strategy",className:"StrategyScript"},Script$EDGR_NET_INCOME_FROM_CONTINUING_OPERATIONS_APPLICABLE_TO_COMMON_V2:{pineId:"Script$EDGR_NET_INCOME_FROM_CONTINUING_OPS_APPLICABLE_TO_COMMON_V2",className:"Script"}},t.shortId in f&&(m=f[t.shortId].className+"$"+f[t.shortId].pineId,y={scriptIdPart:f[t.shortId].pineId,fullId:t.fullId.replace(t.shortId,m),id:t.id.replace(t.shortId,m),name:t.name.replace(t.shortId,m),shortId:m},TradingView.merge(t,y),TradingView.merge(e,y)),(v=(g=c(t.fullId))&&g.match(/^(USER)(_\d+)(;)(.*)$/))&&(S=v[0],y={scriptIdPart:b=v[1]+v[3]+v[2]+v[4],fullId:t.fullId.replace(S,b),id:t.id.replace(S,b),name:t.name.replace(S,b),shortId:t.shortId.replace(S,b)},TradingView.merge(t,y),TradingView.merge(e,y))),"MA"===t.id){switch(w=new l({id:"MAExp",properties:[{id:"is_price_study",type:"bool",value:"true"}],inputs:[{id:"length",type:"integer",defval:20,min:1,max:500},{id:"source",type:"text",defval:"close",options:["open","high","low","close"]}],plots:[{id:"MovAvgExp",type:"line"}],palettes:{}}),P=new l({id:"MASimple",
properties:[{id:"is_price_study",type:"bool",value:"true"}],inputs:[{id:"length",type:"integer",defval:20,min:1,max:500},{id:"source",type:"text",defval:"close",options:["open","high","low","close"]}],plots:[{id:"MovAvgSimple",type:"line"}],palettes:{}}),C=new l({id:"MAVolumeWeighted",properties:[{id:"is_price_study",type:"bool",value:"true"}],inputs:[{id:"length",type:"integer",defval:20,min:1,max:500},{id:"source",type:"text",defval:"close",options:["open","high","low","close"]}],plots:[{id:"MovAvgVolumeWeighted",type:"line"}],palettes:{}}),T=new l({id:"MAWeighted",properties:[{id:"is_price_study",type:"bool",value:"true"}],inputs:[{id:"length",type:"integer",defval:20,min:1,max:500},{id:"source",type:"text",defval:"close",options:["open","high","low","close"]}],plots:[{id:"MovAvgWeighted",type:"line"}],palettes:{}}),e.inputs.type){case"exp":t=w;break;case"simple":t=P;break;case"weighted":t=T;break;case"volume weighted":t=C}e.styles[t.plots[0].id]=e.styles.MovAvg,delete e.styles.MovAvg,delete e.inputs.type}return i.oldShowStudyLastValueProperty&&(e.oldShowLastValue=e.showLastValue),delete e.showLastValue,delete e.showStudyArguments,u(t,e),{propsState:e,metaInfo:t}},n.mergeInputs=function(e,t){n.mergeInputsArrPart(e,t),n.mergeInputsObjPart(e,t)},n.mergeInputsArrPart=function(e,t){var i,o,r=n.splitInputs(t);for(i in r.arr)(o=n.findInputKeyById(e,r.arr[i].id))?TradingView.merge(e[o],r.arr[i]):n.appendInputInfoToArr(e,r.arr[i])},n.mergeInputsObjPart=function(e,t){var i=n.splitInputs(t);TradingView.merge(e,i.obj)},n.appendInputInfoToArr=function(e,t){var i,n,o=-1;for(i in e)n=parseInt(i,10),isNumber(n)&&n>o&&(o=n);e[o+1]=t},n.splitInputs=function(e){var t,i={},n={};for(t in e)isNumber(parseInt(t,10))?i[t]=e[t]:n[t]=e[t];return{arr:i,obj:n}},n.findInputKeyById=function(e,t){var i,n=null;for(i in e)if(isNumber(parseInt(i,10))&&e[i].id===t){n=i;break}return n},n.getInputKeyById=function(e,t){var i=n.findInputKeyById(e,t);if(!i)throw new Error("Cannot find input with id: "+t);return i},e.exports=n},K8V9: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"><path d="M13.111 18.5H10.5a1 1 0 0 1-1-1v-11a1 1 0 0 1 1-1h11a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1h-8.389z"/><path d="M18.5 20v1.5a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1v-11a1 1 0 0 1 1-1H8"/></g></svg>'},KEYX:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"CrossHairPriceAxisView",function(){return r}),n=i("mrSG"),o=i("KcY8"),r=function(e){function t(t,i,n){var o=e.call(this)||this;return o._background="#4c525e",o._source=t,o._priceScale=i,o._valueProvider=n,o}return Object(n.__extends)(t,e),t.prototype._updateRendererData=function(e,t,i){var n,o,r;e.visible=!1,o=null!==(n=this._priceScale.mainSource())?n.firstValue():null,this._source.visible&&null!==this._source.pane&&!this._priceScale.isEmpty()&&null!==o&&(i.background=this._background,i.color=this.generateTextColor(this._background),r=this._valueProvider(this._priceScale),i.coordinate=r.coordinate,
e.text=this._priceScale.formatPrice(r.price,o),e.visible=!0)},t}(o.a)},KUek:function(e,t,i){"use strict";var n,o,r,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P;i.r(t),n=i("Eyy1"),o=i("aIyQ"),r=i.n(o),s=i("k9/m"),a=i("hsV8"),l=i("jy4L"),c=i("w4Ji"),u=i("jenN"),h=i("uOxu"),d=Object(h.getLogger)("Chart.StudyDataSource"),function(e){e[e.Undefined=0]="Undefined",e[e.Loading=1]="Loading",e[e.Completed=2]="Completed",e[e.Error=3]="Error"}(p||(p={})),function(e){e[e.Idle=0]="Idle",e[e.AwaitingConnection=1]="AwaitingConnection",e[e.AwaitingParent=2]="AwaitingParent",e[e.AwaitingFirstDataUpdate=3]="AwaitingFirstDataUpdate",e[e.Active=4]="Active"}(_||(_={})),f=function(){function e(e,t,i,n){this._inputs=null,this._status=_.Idle,this._studyId=null,this._turnaroundCounter=1,this._studyStatus={type:p.Undefined},this._studyStatusChanged=new r.a,this._graphics=new u.LiveStudyGraphics,this._dataCleared=new r.a,this._dataUpdated=new r.a,this._boundOnGatewayIsConnectedChanged=this._onGatewayIsConnectedChanged.bind(this),this._ongoingDataUpdate=Promise.resolve(),this._gateway=e,this._metaInfo=n,this._series=t,this._turnaroundPrefix=i,this._plots=new s.PlotList(Object(c.studyPlotFunctionMap)(n)),this._gateway.isConnected().subscribe(this._boundOnGatewayIsConnectedChanged)}return e.prototype.destroy=function(){this.stop(),this._gateway.isConnected().unsubscribe(this._boundOnGatewayIsConnectedChanged),this._dataUpdated.destroy(),this._dataCleared.destroy(),this._studyStatusChanged.destroy()},e.prototype.metaInfo=function(){return this._metaInfo},e.prototype.inputs=function(){return this._inputs},e.prototype.setInputs=function(e){this._inputs=e,null!==this._studyId&&(this._turnaroundCounter++,this._onStudyStatusChangedTo({type:p.Undefined}),this._gateway.modifyStudy(this._studyId,this._turnaround(),e,this._onMessage.bind(this)))},e.prototype.isStarted=function(){return this._status!==_.Idle},e.prototype.start=function(){this.isStarted()?d.logNormal("start: data source is already started, nothing to do"):(Object(n.assert)(null!==this._inputs,"Inputs should be defined when starting a study data source"),this._gateway.isConnected().value()?this._createStudy():this._changeStatusTo(_.AwaitingConnection))},e.prototype.stop=function(){this.isStarted()?(null!==this._studyId&&(this._gateway.removeStudy(this._studyId),this._studyId=null,this._onStudyStatusChangedTo({type:p.Undefined})),this._changeStatusTo(_.Idle)):d.logNormal("stop: data source is already stopped, nothing to do")},e.prototype.studyId=function(){return this._studyId},e.prototype.studyStatus=function(){return this._studyStatus},e.prototype.studyStatusChanged=function(){return this._studyStatusChanged},e.prototype.plots=function(){return this._plots},e.prototype.graphics=function(){return this._graphics},e.prototype.clearData=function(){this._plots.clear(),this._graphics.clear(),this._dataCleared.fire()},e.prototype.stealData=function(){var e,t;return Object(n.assert)(this._status===_.Idle,"Data source should be stopped when stealing data from it"),e=this._plots,t=this._graphics.extract(),
this._plots=new s.PlotList(Object(c.studyPlotFunctionMap)(this._metaInfo)),{plots:e,graphics:t}},e.prototype.dataCleared=function(){return this._dataCleared},e.prototype.dataUpdated=function(){return this._dataUpdated},e.prototype._changeStatusTo=function(e){Object(n.assert)(this._status!==e,"Source and destination status should be distinct"),d.logNormal("Status changed from "+_[this._status]+" to "+_[e]),this._status=e},e.prototype._createStudy=function(){var e=this._series.seriesId();null!=e?this._createStudyUsingParentId(e):(this._changeStatusTo(_.AwaitingParent),this._series.dataEvents().completed().subscribe(this,this._onSeriesCompleted,!0))},e.prototype._createStudyUsingParentId=function(e){Object(n.assert)(this._status!==_.Active,'Status should not be "Active" when creating a study'),Object(n.assert)(this._studyStatus.type===p.Undefined,'Study status should be "Undefined" when creating a study'),Object(n.assert)(null===this._studyId,"Study id should be empty when creating a study"),this._studyId=Object(l.makeNextStudyId)(),this._gateway.createStudy(this._studyId,this._turnaround(),e,this._metaInfo.fullId+"!",Object(n.ensureNotNull)(this._inputs),this._onMessage.bind(this)),this._changeStatusTo(_.AwaitingFirstDataUpdate)},e.prototype._onGatewayIsConnectedChanged=function(e){e?this._onGatewayConnected():this._onGatewayDisconnected()},e.prototype._onGatewayConnected=function(){this._status===_.AwaitingConnection&&this._createStudy()},e.prototype._onGatewayDisconnected=function(){this._status!==_.Idle&&this._status!==_.AwaitingConnection&&(this._studyId=null,this._changeStatusTo(_.AwaitingConnection),this._studyStatus.type!==p.Undefined&&this._onStudyStatusChangedTo({type:p.Undefined})),this._turnaroundCounter=1},e.prototype._onSeriesCompleted=function(){this._status===_.AwaitingParent&&this._createStudyUsingParentId(Object(n.ensure)(this._series.seriesId()))},e.prototype._onStudyStatusChangedTo=function(e){var t=this._studyStatus;this._studyStatus=e,d.logNormal("Study status type changed from "+p[t.type]+" to "+p[e.type]),this._studyStatusChanged.fire(t,e)},e.prototype._onMessage=function(e){var t,i,n,o,r,s,a,l,c,u,h;"data_update"===e.method?(i=(t=e.params).customId,n=t.turnaround,o=t.plots,r=t.nonseries,i===this._studyId&&this._checkTurnaround(n)&&this._onDataUpdate(o,r)):"study_loading"===e.method?(i=(s=e.params)[0],n=s[1],a=s[2],i===this._studyId&&this._checkTurnaround(n)&&this._onStudyLoading(a)):"study_completed"===e.method?(i=(l=e.params)[0],n=l[1],a=l[2],i===this._studyId&&this._checkTurnaround(n)&&this._onStudyCompleted(a)):"study_error"===e.method&&(i=(c=e.params)[0],n=c[1],u=c[2],h=c[3],a=c[4],i===this._studyId&&this._checkTurnaround(n)&&this._onStudyError(u,h,a))},e.prototype._onDataUpdate=function(e,t){var i=Object(a.unpackNonSeriesData)(t.d);return this._ongoingDataUpdate=this._ongoingDataUpdate.then(function(){return i},function(){return i}).then(this._onDataUnpacked.bind(this,e,t.indexes)),this._ongoingDataUpdate},e.prototype._onDataUnpacked=function(e,t,i){
this._status!==_.Idle&&(this._status===_.AwaitingFirstDataUpdate&&(this._changeStatusTo(_.Active),this.clearData()),this._mergePlots(e),null!==i&&(i.indexes_replace?(Object(n.assert)("nochange"!==t),this._graphics.replaceIndexesTo(t)):("nochange"!==t&&this._graphics.replaceIndexesTo(t),void 0!==i.graphicsCmds&&this._graphics.processCommands(i.graphicsCmds,this._metaInfo.graphics))),this._dataUpdated.fire(e,i,t))},e.prototype._onStudyLoading=function(e){this._onStudyStatusChangedTo({type:p.Loading,startTime:Date.now()})},e.prototype._onStudyError=function(e,t,i){this.clearData(),this._onStudyStatusChangedTo({type:p.Error,reason:e})},e.prototype._onStudyCompleted=function(e){this._onStudyStatusChangedTo({type:p.Completed})},e.prototype._mergePlots=function(e){this._plots.merge(e)},e.prototype._turnaround=function(){return""+this._turnaroundPrefix+this._turnaroundCounter},e.prototype._checkTurnaround=function(e){var t=this._turnaround();return e===t||e===this._series.turnaround()||e===this._series.turnaround()+"_"+t},e}(),m=i("kcTO"),y=i("Ocx9"),g=i("Kxc7"),i.d(t,"sessionsPreferencesDefault",function(){return w}),i.d(t,"Sessions",function(){return P}),v="Sessions@tv-basicstudies",S="sessions_",b=new m.PriceFormatter,w={graphics:{backgrounds:{outOfSession:{color:"#2196F3",transparency:80,visible:!1}},vertlines:{sessBreaks:{color:"#4985e7",style:2,visible:!1,width:1}}}},P=function(){function e(e,t){var i,n=this;this._studySource=null,this._paneViews=[],this._metaInfo=null,this._destroyed=!1,this._isStarted=!1,this._loadedGraphics=null,this._model=e,this._doubleClickHandler=t,i=e.mainSeries(),this._properties=new y.DefaultProperty("sessions"),this._properties.subscribe(this,this._onPropertiesChanged),e.studyMetaInfoRepository().findById({type:"java",studyId:v}).then(function(t){n._destroyed||null===n._loadedGraphics&&(n._setMetaInfo(t),null!==n._metaInfo&&(n._studySource=new f(e.chartApi(),i,S,n._metaInfo),n._createPaneViews(),n._studySource.dataCleared().subscribe(n,n.updateAllViews),n._studySource.dataUpdated().subscribe(n,n.updateAllViews),n._studySource.setInputs({}),n._processHibernate()))}),e.timeScale().onReset().subscribe(this,this._clearData),e.timeScale().logicalRangeChanged().subscribe(this,this.updateAllViews),e.mainSeries().properties().extendedHours.subscribe(this,this._updateVisibleOutOfSessionBackground),e.mainSeries().properties().interval.subscribe(this,this._processHibernate),this._updateVisibleOutOfSessionBackground(e.mainSeries().properties().extendedHours)}return e.prototype.start=function(){this._isStarted=!0,this._processHibernate()},e.prototype.restart=function(){this._clearData(),g.enabled("stop_study_on_restart")&&this.stop(),this.start()},e.prototype.isStarted=function(){return this._isStarted},e.prototype.stop=function(){this._isStarted=!1,null!==this._studySource&&this._studySource.stop()},e.prototype.paneViews=function(e){return e.containsMainSeries()?this._paneViews:[]},e.prototype.priceAxisViews=function(e,t){return[]},e.prototype.updateAllViews=function(){
this._paneViews.forEach(function(e){return e.update()})},e.prototype.destroy=function(){this._destroyed=!0,null!==this._studySource&&(this._studySource.dataCleared().unsubscribe(this,this.updateAllViews),this._studySource.dataUpdated().unsubscribe(this,this.updateAllViews),this._studySource.destroy(),this._studySource=null),this._model.timeScale().logicalRangeChanged().unsubscribe(this,this.updateAllViews),this._model.timeScale().onReset().unsubscribe(this,this._clearData),this._model.mainSeries().properties().extendedHours.unsubscribe(this,this._updateVisibleOutOfSessionBackground),this._model.mainSeries().properties().interval.unsubscribe(this,this._processHibernate),this._properties.unsubscribe(this,this._onPropertiesChanged)},e.prototype.series=function(){return this._model.mainSeries()},e.prototype.priceScale=function(){return this.series().priceScale()},e.prototype.graphics=function(){return this._loadedGraphics||Object(n.ensureNotNull)(this._studySource).graphics()},e.prototype.properties=function(){return this._properties},e.prototype.graphicsInfo=function(){return Object(n.ensureNotNull)(this._metaInfo).graphics},e.prototype.firstValue=function(e){return this._model.mainSeries().firstValue()},e.prototype.formatter=function(){return b},e.prototype.state=function(e){var t={properties:this._properties.state()};return e&&null!==this._metaInfo&&(t.data={graphics:Object(u.saveStudyGraphics)(this.graphics()),metaInfo:this._metaInfo}),t},e.prototype.restoreState=function(e,t){this._properties.mergeAndFire(e.properties),this._updateVisibleOutOfSessionBackground(this._model.mainSeries().properties().extendedHours),void 0!==e.data&&t&&(this._loadStudyGraphics(e.data.graphics),this._setMetaInfo(e.data.metaInfo),this._createPaneViews())},e.prototype.restoreOldState=function(e,t){var i={graphics:e.state.graphics},n={properties:i};void 0!==e.data&&void 0!==e.metaInfo&&t&&(n.data={metaInfo:e.metaInfo,graphics:e.data.graphics}),this.restoreState(n,t)},e.prototype.applyPreferences=function(e){this._properties.mergePreferences(e)},e.prototype.metaInfo=function(){return Object(n.ensureNotNull)(this._metaInfo)},e.prototype._loadStudyGraphics=function(e){if(void 0!==e.backgrounds){var t=e.backgrounds.findIndex(function(e){return"inSession"===e.styleId});e.backgrounds.splice(t,1)}this._loadedGraphics=Object(u.loadStudyGraphics)(e)},e.prototype._setMetaInfo=function(e){void 0!==e.graphics.backgrounds&&void 0!==e.graphics.backgrounds.inSession&&delete e.graphics.backgrounds.inSession,this._metaInfo=e},e.prototype._updateVisibleOutOfSessionBackground=function(e){this._outOfSessionVisibilityProperty().setValue(e.value())},e.prototype._clearData=function(){null!==this._studySource&&this._studySource.clearData()},e.prototype._createPaneViews=function(){var e=this,t={mouseDoubleClickHandler:this._doubleClickHandler};Object(u.createGraphicsPaneViews)(this,this._model,t).then(function(t){e._paneViews=t,e._model.lightUpdate()})},e.prototype._onPropertiesChanged=function(){this._processHibernate(),this.updateAllViews()},
e.prototype._processHibernate=function(){var e,t,i;null!==this._studySource&&(e=this._canBeHibernated(),t=this._isHibernated(),i=this._studySource.isStarted(),!t&&e&&i?this._studySource.stop():!t||e||i||this._studySource.start())},e.prototype._canBeHibernated=function(){return this._model.mainSeries().isDWM()||!this._outOfSessionVisibilityProperty().value()&&!this._vertLinesVisibleProperty().value()},e.prototype._isHibernated=function(){return this._isStarted&&(null===this._studySource||!this._studySource.isStarted())},e.prototype._outOfSessionVisibilityProperty=function(){return this._properties.childs().graphics.childs().backgrounds.childs().outOfSession.childs().visible},e.prototype._vertLinesVisibleProperty=function(){return this._properties.childs().graphics.childs().vertlines.childs().sessBreaks.childs().visible},e}()},KcY8:function(e,t,i){"use strict";var n,o=i("eJTA"),r=i("mrSG"),s=i("Tmoa"),a=i("Ialn"),l=i("8Uy/"),c=i("jFln"),u=function(){function e(e,t){this.setData(e,t)}return e.prototype.setData=function(e,t){this._data=Object(r.__assign)({},e),this._commonData=Object(r.__assign)({},t)},e.prototype.draw=function(e,t,i,n,o){var r,u,h,d,p,_,f,m,y,g,v,S,b,w,P,C,T,x,I,L,M;this._data.visible&&(r=t.fontSize,e.font=t.font,u=this._data.tickVisible?t.tickLength:0,h=this._data.borderVisible?t.borderSize:0,d=t.paddingTop,p=t.paddingBottom,_=t.paddingInner,f=t.paddingOuter,m=this._data.text,y=Math.ceil(i.measureText(e,m)),g=t.baselineOffset,v=t.fontSize+d+p,S=h+y+_+f+u,b=this._commonData.coordinate,this._commonData.fixedCoordinate&&(b=this._commonData.fixedCoordinate),P=(w=b-Math.floor(r/2)-d-.5)+v,x=T=(C="right"===o)?n-h-.5:.5,e.fillStyle=Object(s.resetTransparency)(this._commonData.background),e.lineWidth=1,Object(c.setLineStyle)(e,l.LINESTYLE_SOLID),e.lineCap="butt",m&&(C?(I=T-u,L=(x=T-S)+f):(x=T+S,I=T+u,L=T+h+u+_),e.beginPath(),e.moveTo(T,w),e.lineTo(x,w),e.lineTo(x,P),e.lineTo(T,P),e.fill(),this._data.tickVisible&&(e.beginPath(),e.strokeStyle=this._commonData.color,e.moveTo(T,b),e.lineTo(I,b),e.stroke()),e.textAlign="left",e.fillStyle=this._commonData.color,e.fillText(Object(a.startWithLTR)(m),L,P-p-g)),this._data.secondLine&&(M=Math.ceil(i.measureText(e,this._data.secondLine))+_+f,e.fillStyle=Object(s.resetTransparency)(this._commonData.background),this._data.text&&(w+=v+1,P+=v+1),C?(T=(x=Math.min(x,n-u))+M,L=x+f):(x=(T=Math.max(x-M,h))+M,L=T+_),e.beginPath(),e.moveTo(T,w),e.lineTo(x,w),e.lineTo(x,P),e.lineTo(T,P),e.fill(),e.textAlign="left",e.fillStyle=this._commonData.color,e.fillText(Object(a.startWithLTR)(this._data.secondLine),L,P-p-g)))},e.prototype.height=function(e,t){if(!this._data.visible)return 0;var i=e.fontSize+e.paddingTop+e.paddingBottom;return this._data.secondLine&&t?2*i+1:i},e}();i.d(t,"a",function(){return n}),n=function(){function e(e){this._commonRendererData={coordinate:0,color:"#FFF",background:"#000"},this._axisRendererData={text:"",visible:!1,tickVisible:!0,borderVisible:!0},this._paneRendererData={text:"",visible:!1,tickVisible:!1,borderVisible:!1},this._invalidated=!0,
this._axisRenderer=new(e||u)(this._axisRendererData,this._commonRendererData),this._paneRenderer=new(e||u)(this._paneRendererData,this._commonRendererData)}return e.prototype.text=function(){return this._axisRendererData.text},e.prototype.background=function(){return this._commonRendererData.background},e.prototype.color=function(){return this.generateTextColor(this.background())},e.prototype.generateTextColor=function(e){return"black"===Object(o.rgbToBlackWhiteString)(Object(o.parseRgb)(e),160)?"white":"black"},e.prototype.coordinate=function(){return this._updateRendererDataIfNeeded(),this._commonRendererData.coordinate},e.prototype.floatCoordinate=function(){return this._updateRendererDataIfNeeded(),this._commonRendererData.floatCoordinate||this._commonRendererData.coordinate},e.prototype.update=function(){this._invalidated=!0},e.prototype.height=function(e,t){return void 0===t&&(t=!1),Math.max(this._axisRenderer.height(e,t),this._paneRenderer.height(e,t))},e.prototype.getFixedCoordinate=function(){return this._commonRendererData.fixedCoordinate||0},e.prototype.setFixedCoordinate=function(e){this._commonRendererData.fixedCoordinate=e},e.prototype.isVisible=function(){return this._updateRendererDataIfNeeded(),this._axisRendererData.visible||this._paneRendererData.visible},e.prototype.isAxisLabelVisible=function(){return this._updateRendererDataIfNeeded(),this._axisRendererData.visible},e.prototype.isPaneLabelVisible=function(){return this._updateRendererDataIfNeeded(),this._paneRendererData.visible},e.prototype.renderer=function(){return this._updateRendererDataIfNeeded(),this._axisRenderer.setData(this._axisRendererData,this._commonRendererData),this._paneRenderer.setData(this._paneRendererData,this._commonRendererData),this._axisRenderer},e.prototype.paneRenderer=function(){return this._updateRendererDataIfNeeded(),this._axisRenderer.setData(this._axisRendererData,this._commonRendererData),this._paneRenderer.setData(this._paneRendererData,this._commonRendererData),this._paneRenderer},e.prototype._updateRendererDataIfNeeded=function(){this._invalidated&&(this._updateRendererData(this._axisRendererData,this._paneRendererData,this._commonRendererData),this._invalidated=!1)},e}()},Ke3L:function(e,t,i){"use strict";var n,o,r,s,a,l;i.r(t),i.d(t,"ProjectionSeriesPriceAxisView",function(){return l}),n=i("mrSG"),o=i("Eyy1"),r=i("k9/m"),s=i("TQMj"),a=i("oXaB"),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype.lastPrice=function(){return this._getSource().data().lastProjectionPrice},t.prototype._updateRendererData=function(e,t,i){var n,s,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P,C,T,x,I;e.visible=!1,t.visible=!1,n=this._getData().model,l=(s=this._getSource()).priceScale(),c=n.timeScale(),u=this.lastPrice(),c.isEmpty()||l.isEmpty()||void 0===u||null!==(h=c.visibleBarsStrictRange())&&(d=h.firstBar(),p=h.lastBar(),
null!==(f=(_=s.data()).search(p,r.PlotRowSearchMode.NearestLeft))&&void 0!==(m=s.nearestIndex(d,r.PlotRowSearchMode.NearestRight))&&(y=s.model().properties().scalesProperties,g=Object(o.ensureNotNull)(_.valueAt(m))[TradingView.CLOSE_PLOT],v=i.background,S=y.showSeriesLastValue.value(),b=!1,w=!1,P=!1,C=s.lastValueData(TradingView.CLOSE_PLOT,!1),8===(T=s.properties()).style.value()&&T.haStyle.showRealLastPrice.value()?((x=s.lastValueData(TradingView.CLOSE_PLOT,!0)).noData||x.color===i.background||(v=x.color),x.noData||C.noData||(b=(I=x.index===C.index)&&y.showSymbolLabels.value(),w=y.seriesLastValueMode.value()===a.PriceAxisLastValueMode.LastPriceAndPercentageValue,S=S&&I,P=I&&this._isCountdownEnabled()&&T.showCountdown.value())):v=s.barColorer().barStyle(f.index,!0).barColor,i.background=v,i.color=this.generateTextColor(v),i.coordinate=l.priceToCoordinate(u,g),e.visible=S||P,C.noData||(C.text=l.formatPrice(u,g),C.formattedPriceAbsolute=l.formatPriceAbsolute(u),C.formattedPricePercentage=l.formatPricePercentage(u,g),e.text=this._axisFirstLineText(C,S,w),e.secondLine=P?this._countdownText():"",t.text=this._paneText(C,S,b,w)),t.visible=b||S&&w))},t}(s.SeriesPriceAxisView)},Kmdw:function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"PaneRendererArrowUp",function(){return r}),i.d(t,"PaneRendererArrowDown",function(){return s}),n=i("mrSG"),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._sign=0,t._thinArrow=!1,t._thinArrowLineWidth=0,t._widthHalf=0,t._headHeight=0,t._arrowWidth=0,t}return Object(n.__extends)(t,e),t.prototype.setData=function(e,t){this._setBaseData(e,t)},t.prototype._drawItemShape=function(e,t){var i=this._sign,n=this._arrowWidth,o=this._widthHalf,r=this._headHeight,s=Math.abs(t.height),a=t.x,l=t.vertOffset,c=t.y+l+i*Math.round(s/2);e.translate(a,c),this._thinArrow?(e.moveTo(0,0),e.lineTo(-o,-o*i),e.moveTo(0,0),e.lineTo(o,-o*i),e.moveTo(0,0),e.lineTo(0,-s*i),e.moveTo(-o,-s*i),e.lineTo(o,-s*i)):(e.moveTo(0,0),s<r?(e.lineTo(n,-s*i),e.lineTo(-n,-s*i)):(e.lineTo(n,-r*i),e.lineTo(o,-r*i),e.lineTo(o,-s*i),e.lineTo(-o,-s*i),e.lineTo(-o,-r*i),e.lineTo(-n,-r*i)),e.lineTo(0,0)),e.translate(-a,-c)},t.prototype._preDrawInit=function(){var e=this._calculateWidth();this._arrowWidth=e,this._sign=this._isUp()?-1:1,this._thinArrow=e<4,this._thinArrowLineWidth=Math.max(e/2,1),this._widthHalf=Math.round(e/2),this._headHeight=Math.round(e)},t.prototype._startPath=function(e,t,i){e.beginPath(),e.fillStyle=t,e.strokeStyle=i,this._thinArrow&&(e.lineWidth=this._thinArrowLineWidth)},t.prototype._calculateWidth=function(){return Math.round(this._barSpacing/4)},t}(i("2WC2").a),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._isUp=function(){return!0},t}(o),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._isUp=function(){return!1},t}(o)},KnF9:function(e,t,i){"use strict";var n,o;i.r(t),i.d(t,"EnvironmentState",function(){return o}),n=i("qFKp"),o=function(){
function e(e){this._shift=!1,this._control=!1,this._alt=!1,void 0!==e&&(this._shift=Boolean(e.shiftKey),this._control=Boolean(Object(n.isMac)()?e.metaKey:e.ctrlKey),this._alt=Boolean(e.altKey))}return e.prototype.shift=function(){return this._shift},e.prototype.control=function(){return this._control},e.prototype.alt=function(){return this._alt},e.prototype.shiftOnly=function(){return this._shift&&!this._control&&!this._alt},e.prototype.controlOnly=function(){return this._control&&!this._shift&&!this._alt},e.prototype.altOnly=function(){return this._alt&&!this._shift&&!this._control},e.prototype.controlShift=function(){return this._shift&&this._control&&!this._alt},e}()},KtbP:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"PanePriceAxisView",function(){return r}),n=i("u+0B"),o=function(){function e(e){this._priceAxisViewRenderer=null,this._rendererOptions=null,this._align="right",this._width=0,this._textWidthCache=e}return e.prototype.setParams=function(e,t,i,n){this._priceAxisViewRenderer=e,this._rendererOptions=t,this._width=i,this._align=n},e.prototype.draw=function(e){null!==this._rendererOptions&&null!==this._priceAxisViewRenderer&&this._priceAxisViewRenderer.draw(e,this._rendererOptions,this._textWidthCache,this._width,this._align)},e.prototype.hitTest=function(e){return null},e}(),r=function(){function e(e,t,i){this._priceAxisView=e,this._textWidthCache=new n.TextWidthCache(50),this._dataSource=t,this._chartModel=i,this._fontSize=-1,this._renderer=new o(this._textWidthCache)}return e.prototype.update=function(){this._priceAxisView.update()},e.prototype.renderer=function(e,t){var i,n,o,r=this._chartModel.paneForSource(this._dataSource);return null===r?null:null===(i=this._dataSource.priceScale())?null:("overlay"===(n=r.priceScalePosition(i))&&(n=r.priceScalePosition(r.defaultPriceScale())),"overlay"===n?null:((o=this._chartModel.priceAxisRendererOptions()).fontSize!==this._fontSize&&(this._fontSize=o.fontSize,this._textWidthCache.reset()),this._renderer.setParams(this._priceAxisView.paneRenderer(),o,t,n),this._renderer))},e}()},"L/Ed":function(e,t,i){"use strict";var n;i.r(t),i.d(t,"ToolboxType",function(){return n}),function(e){e[e.Delete=0]="Delete"}(n||(n={}))},LAp3:function(e,t,i){"use strict";function n(e,t){return new a(e,t)}var o,r,s,a;i.d(t,"a",function(){return n}),o=i("mrSG"),r=i("ogJP"),s=i("5rJj"),a=function(e){function t(t,i){return e.call(this,t,i,!1,{names:["width","color","visible"]})||this}return Object(o.__extends)(t,e),t.prototype._iterateLevels=function(e,t){var i,n,o;for(i in e.levels)if(e.levels[i]&&Object(r.isSameType)(e.levels[i],t.typecheck())){for(o in n=t.tpl(),this._map.names)this._map.names.hasOwnProperty(o)&&(n=t.fill(o,this._map.names[o],e.levels[i],n));e.levels[i]=n}return e},t}(i.n(s).a)},LdoW: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"><path d="M6.5 15A8.5 8.5 0 1 0 15 6.5H8.5"/><path d="M12 10L8.5 6.5 12 3"/></g></svg>'},Ltzl:function(e,t,i){"use strict";var n,o,r,s
;i.r(t),i.d(t,"SaveLineToolStateUndoCommand",function(){return s}),n=i("mrSG"),o=i("Eyy1"),r=i("RDU5"),s=function(e){function t(t,i,n,o){void 0===o&&(o=!0);var r=e.call(this,n,o)||this;return r._model=t,r._savedState=i.state(!0),r}return Object(n.__extends)(t,e),t.prototype.redo=function(){this._toggleState()},t.prototype.undo=function(){this._toggleState()},t.prototype._getSource=function(){return Object(o.ensureNotNull)(this._model.dataSourceForId(this._savedState.id))},t.prototype._toggleState=function(){var e=this._getSource(),t=this._savedState;this._savedState=e.state(!0),this._model.restoreLineToolState(e,t)},t}(r.UndoCommand)},LxhU:function(e,t,i){"use strict";function n(e){return 0===e.length?1:parseInt(e,10)}function o(e){return e>=60&&!(e%60)}var r,s,a,l,c,u;i.r(t),i.d(t,"ResolutionKind",function(){return a}),i.d(t,"Interval",function(){return u}),i.d(t,"isHour",function(){return o}),r=/^(\d*)([SHDWMR])$/,s=/^(\d+)$/,function(e){e.Seconds="seconds",e.Minutes="minutes",e.Hours="hours",e.Days="days",e.Weeks="weeks",e.Months="months",e.Range="range",e.Invalid="invalid"}(a||(a={})),(l={})[a.Seconds]=1e3,l[a.Minutes]=60*l[a.Seconds],l[a.Hours]=60*l[a.Minutes],l[a.Days]=24*l[a.Hours],l[a.Weeks]=7*l[a.Days],c={S:a.Seconds,H:a.Hours,D:a.Days,W:a.Weeks,M:a.Months,R:a.Range},u=function(){function e(e,t){this._kind=a.Invalid,this._multiplier=0,e!==a.Invalid&&t>0&&(this._kind=e,this._multiplier=t)}return e.prototype.kind=function(){return this._kind},e.prototype.multiplier=function(){return this._multiplier},e.prototype.isValid=function(){return this.kind()!==a.Invalid&&this.multiplier()>0},e.prototype.isDWM=function(){return this.isValid()&&!this.isRange()&&!this.isIntraday()},e.prototype.isIntraday=function(){var e=-1!==[a.Seconds,a.Minutes,a.Hours].indexOf(this.kind());return this.isValid()&&!this.isRange()&&e},e.prototype.isSeconds=function(){return this.kind()===a.Seconds},e.prototype.isMinutes=function(){return this.kind()===a.Minutes},e.prototype.isHours=function(){return this.kind()===a.Hours},e.prototype.isDays=function(){return this.kind()===a.Days},e.prototype.isWeeks=function(){return this.kind()===a.Weeks},e.prototype.isMonths=function(){return this.kind()===a.Months},e.prototype.isRange=function(){return this.kind()===a.Range},e.prototype.isTimeBased=function(){return!this.isRange()},e.prototype.letter=function(){return this.isValid()&&this.kind()!==a.Minutes?this.kind()[0].toUpperCase():""},e.prototype.value=function(){return this.isValid()?this.kind()===a.Minutes?this.multiplier()+"":this.multiplier()+this.letter():""},e.prototype.isEqualTo=function(t){if(!(t instanceof e))throw new Error("Argument is not an Interval");return!(!this.isValid()||!t.isValid())&&(this.kind()===t.kind()&&this.multiplier()===t.multiplier())},e.prototype.inMilliseconds=function(e){var t,i;return void 0===e&&(e=Date.now()),!this.isValid()||this.isRange()?NaN:this.isMonths()?((t=new Date(e)).setUTCMonth(t.getUTCMonth()+(this.multiplier()||1)),+t-e):(i=this.multiplier(),l[this.kind()]*i)},
e.prototype.tryConvertToHighestKind=function(){var t=this.kind(),i=this.multiplier();return t===a.Minutes&&i&&o(i)?new e(a.Hours,i/60):new e(this.kind(),this.multiplier())},e.isEqual=function(t,i){return e.parse(t).isEqualTo(e.parse(i))},e.parse=function(t){t=(t+"").toUpperCase().split(",")[0];var i=r.exec(t);return null!==i?new e(c[i[2]],n(i[1])):null!==(i=s.exec(t))?new e(a.Minutes,n(i[1])):new e(a.Invalid,0)},e.kind=function(t){return e.parse(t).kind()},e.isValid=function(t){return e.parse(t).isValid()},e.isDWM=function(t){return e.parse(t).isDWM()},e.isIntraday=function(t){return e.parse(t).isIntraday()},e.isSeconds=function(t){return e.parse(t).isSeconds()},e.isMinutes=function(t){return e.parse(t).isMinutes()},e.isHours=function(t){return e.parse(t).isHours()},e.isDays=function(t){return e.parse(t).isDays()},e.isWeeks=function(t){return e.parse(t).isWeeks()},e.isMonths=function(t){return e.parse(t).isMonths()},e.isRange=function(t){return e.parse(t).isRange()},e.isTimeBased=function(t){return e.parse(t).isTimeBased()},e.normalize=function(t){var i=e.parse(t);return i.isValid()?i.value():null},e}()},"M7/j":function(e,t,i){"use strict";function n(e){var t,i;if(0===e.length)return!1;if(-1===(t=e.findIndex(function(e){return Object(l.coordinateIsValid)(e.y)})))return!1;for(i=e.length-1;i>t&&!Object(l.coordinateIsValid)(e[i].y);)i--;return!(t>=i)}function o(e,t){var i,n,o,a,c,u=[],h=[],d=null;for(i=0;i<e.length;i++){if(n=e[i],o=e[i+1]||{},Object(l.coordinateIsValid)(n.y))n.y<=t&&u.push(n),n.y>=t&&h.push(n),d=n;else{if(null===d)continue;n=d}Object(l.coordinateIsValid)(o.y)&&((n.y>t&&o.y<t||n.y<t&&o.y>t)&&(Math.abs(n.x-o.x)<1?(a=new r.Point(n.x,t),u.push(a),h.push(a)):null!==(c=Object(s.intersectLineSegments)(n,o,new r.Point(n.x,t),new r.Point(o.x,t)))&&(a=n.add(o.subtract(n).scaled(c)),u.push(a),h.push(a))))}return{topItems:u,bottomItems:h}}var r,s,a,l,c,u,h;i.r(t),i.d(t,"itemsRangeIsValid",function(){return n}),i.d(t,"splitItems",function(){return o}),i.d(t,"PaneRendererBaseline",function(){return h}),r=i("aO4+"),s=i("hBTJ"),a=i("GEp6"),l=i("Zp/P"),c=i("Y7w9"),u=i("VdBB"),h=function(){function e(){this._data=null}return e.prototype.setData=function(e){this._data=e},e.prototype.draw=function(e){var t,i,r,s,a,l,c,u,h,d,p,_,f,m,y;null!==this._data&&(i=(t=this._data).items,r=t.baseLevelCoordinate,s=t.bottom,a=t.bottomFillColor1,l=t.bottomFillColor2,c=t.topFillColor1,u=t.topFillColor2,h=t.topLineColor,d=t.bottomLineColor,p=t.topLineWidth,_=t.bottomLineWidth,n(i)&&(m=(f=o(i,r)).topItems,y=f.bottomItems,e.lineCap="round",e.lineJoin="round",e.translate(.5,.5),0!==m.length&&(e.beginPath(),e.moveTo(m[0].x,r),this._makeLine(e,m,!0,0),e.closePath(),e.fillStyle=this._makeLinearGradient(e,c,u,r-s,r),e.fill(),e.beginPath(),this._makeLine(e,m,!1,0),e.lineWidth=p,e.strokeStyle=h,e.stroke()),0!==y.length&&(e.beginPath(),e.moveTo(y[0].x,r),this._makeLine(e,y,!0,1),e.closePath(),e.fillStyle=this._makeLinearGradient(e,a,l,r,r+s),e.fill(),e.beginPath(),this._makeLine(e,y,!1,1),e.lineWidth=_,e.strokeStyle=d,e.stroke())))},
e.prototype.hitTest=function(e){var t,i,n,o,s,h,d,p,_,f,m;if(null===this._data)return null;for(i=(t=this._data).items,n=t.topLineWidth,o=t.bottomLineWidth,s=Object(l.selectionTolerance)((n+o)/2),h=Object(c.lowerbound)(i,e,function(e,t){return e.x<=t.x}),d=Math.max(1,h-1),p=Math.min(i.length-1,h+1),_=d;_<=p;++_)if(f=i[_-1],m=i[_],Object(a.distanceToSegment)(new r.Point(f.x,f.y),new r.Point(m.x,m.y),new r.Point(e.x,e.y)).distance<=s)return new u.HitTestResult(u.HitTestResult.REGULAR);return null},e.prototype._makeLine=function(e,t,i,n){var o,r,s,a,c,u,h,d,p,_;if(null!==this._data&&-1!==(o=t.findIndex(function(e){return Object(l.coordinateIsValid)(e.y)})))for(s=(r=this._data).barSpacing,a=r.baseLevelCoordinate,c=.25*s,h=t.length,d=o;d<h;d++)if(p=t[d],_=t[d+1]||{},Object(l.coordinateIsValid)(p.y)){if(0===n){if(u&&u.y>=a&&p.y>=a){e.moveTo(p.x,p.y);continue}}else if(u&&u.y<=a&&p.y<=a){e.moveTo(p.x,p.y);continue}if(u&&Object(l.coordinateIsValid)(u.y))e.lineTo(p.x,p.y),i&&!Object(l.coordinateIsValid)(_.y)&&e.lineTo(p.x,a);else if(_&&Object(l.coordinateIsValid)(_.y))i?(d!==o&&e.lineTo(p.x,a),e.lineTo(p.x,p.y)):e.moveTo(p.x,p.y);else if(i){if(0===d)continue;d!==o&&e.lineTo(p.x-c,a),e.lineTo(p.x-c,p.y),e.lineTo(p.x+c,p.y),e.lineTo(p.x+c,a)}else e.moveTo(p.x-c,p.y),e.lineTo(p.x+c,p.y);u=p}},e.prototype._makeLinearGradient=function(e,t,i,n,o){var r=e.createLinearGradient(0,n,0,o);return r.addColorStop(0,t),r.addColorStop(1,i),r},e}()},MA5A:function(e,t,i){"use strict";var n,o,r,s,a,l,c,u;i.r(t),i.d(t,"LineToolCrossLine",function(){return u}),n=i("mrSG"),o=i("Ocx9"),r=i("p1SQ"),s=i("GmZZ"),a=i("Ss5c"),l=i("hayr"),c=window.t("Cross Line"),(u=function(e){function t(n,o){var a=e.call(this,n,o||t.createProperties())||this;return a._constructor="LineToolCrossLine",a._priceAxisView=new r.LineToolHorzLinePriceAxisView(a),a._timeAxisView=new s.LineToolVertLineTimeAxisView(a,n),i.e("lt-pane-views").then(function(e){var t=i("amUF").CrossLinePaneView;a._setPaneViews([new t(a,a._model)])}.bind(null,i)).catch(void 0),a}return Object(n.__extends)(t,e),t.prototype.pointsCount=function(){return 1},t.prototype.title=function(){return c},t.prototype.name=function(){return"Cross Line"},t.prototype.priceAxisViews=function(e,t){return this.isSourceHidden()?null:t===this.priceScale()&&this.properties().showPrice.value()&&this._model.paneForSource(this)===e?[this._priceAxisView]:null},t.prototype.timeAxisViews=function(){return this.isSourceHidden()?null:this.properties().showTime.value()?[this._timeAxisView]:null},t.prototype.updateAllViews=function(){e.prototype.updateAllViews.call(this),this._priceAxisView.update(),this._timeAxisView.update()},t.prototype.canHasAlert=function(){return!1},t.prototype.getInputsPropertyPage=function(){return l.propertyPages.LineToolCrossLineInputsPropertyPage},t.prototype.getStylesPropertyPage=function(){return l.propertyPages.LineToolCrossLineStylesPropertyPage},t.prototype.lineColor=function(){return this.properties().linecolor.value()},t.prototype.lineWidth=function(){return this.properties().linewidth.value()},
t.prototype.lineStyle=function(){return this.properties().linestyle.value()},t.createProperties=function(e){var i=new o.DefaultProperty("linetoolcrossline",e);return t._configureProperties(i),i},t.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"xrdl")).then(function(e){return e.CrossLineDefinitionsViewModel})},t._configureProperties=function(e){a.LineDataSource._configureProperties(e)},t}(a.LineDataSource)).prototype.superclass=a.LineDataSource},MROS:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"ModelSelection",function(){return r}),n=i("Y7w9"),o=i("CW80"),r=function(){function e(){this._items=[],this._set=new Set}return e.prototype.isEmpty=function(){return 0===this._items.length},e.prototype.add=function(e){this._items.length>0&&!Object(o.isLineTool)(this._items[0])&&this.clear(),Object(o.isLineTool)(e)||this.clear();var t=Object(n.lowerbound)(this._items,e,function(e,t){return e.zorder()<t.zorder()});this._items.splice(t,0,e),this._set.add(e)},e.prototype.canBeAddedToSelection=function(e){return 0===this._items.length||Object(o.isLineTool)(this._items[0])&&Object(o.isLineTool)(e)},e.prototype.isSelected=function(e){return this._set.has(e)},e.prototype.sources=function(){return this._items.slice(0)},e.prototype.checkLineToolSelection=function(){this._items.forEach(function(e){return Object(o.isLineTool)(e)&&e.calcIsActualSymbol()}),this._items=this._items.filter(function(e){return!Object(o.isLineTool)(e)||e.isActualSymbol()})},e.prototype.remove=function(e){this._items=this._items.filter(function(t){return t!==e}),this._set.delete(e)},e.prototype.clear=function(){this._items=[],this._set.clear()},e.prototype.notFixedSources=function(){return this._items.filter(function(e){return!Object(o.isLineTool)(e)||!e.isFixed()})},e}()},MWAT:function(e,t,i){"use strict";function n(e){var t=Object(s.ensureDefined)(d.find(function(t){return t.name===e}));return new t.ctor(t)}function o(){return d}var r,s,a,l,c,u,h,d;i.r(t),i.d(t,"PriceScaleSelectionStrategyEvenly",function(){return c}),i.d(t,"PriceScaleSelectionStrategyAllRight",function(){return u}),i.d(t,"PriceScaleSelectionStrategyAllLeft",function(){return h}),i.d(t,"createPriceScaleSelectionStrategy",function(){return n}),i.d(t,"allPriceScaleSelectionStrategyInfo",function(){return o}),r=i("mrSG"),s=i("Eyy1"),a=i("3ClC"),c=function(e){function t(t){return e.call(this,t)||this}return Object(r.__extends)(t,e),t.prototype.apply=function(e){var t,i;for(e.containsMainSeries()&&(t=Object(s.ensureNotNull)(Object(s.ensureNotNull)(e.mainDataSource()).priceScale()),e.movePriceScale(t,"right",0)),i=e.model();e.leftPriceScales().length>e.rightPriceScales().length;)t=e.leftPriceScales()[e.leftPriceScales().length-1],e.movePriceScale(t,"right",this._targetPriceScaleIndex(t,i));for(;e.rightPriceScales().length-e.leftPriceScales().length>1;)t=e.rightPriceScales()[e.rightPriceScales().length-1],e.movePriceScale(t,"left",this._targetPriceScaleIndex(t,i))},
t.prototype.createNewPriceScaleIfPossible=function(e){if(!this.canCreateNewPriceScale(e))return e.createPriceScaleAtPosition("overlay");var t=e.leftPriceScales().length<e.rightPriceScales().length?"left":"right";return e.createPriceScaleAtPosition(t)},t}(l=function(){function e(e){this._priceScalesLimit=8,this._metaInfo=e}return e.prototype.metaInfo=function(){return this._metaInfo},e.prototype.findSuitableScale=function(e,t,i,n){var o,r,s,l,c;if(void 0!==n)return this._tryToGetDesiredPriceScale(e,t,n,i);if(Object(a.isStudy)(t)){if("Volume@tv-basicstudies"===(o=t.metaInfo()).id)return(r=e.createPriceScaleAtPosition("overlay")).setTopMargin(.75),r.setBottomMargin(0),r;if(null!==(s=t.desiredPriceScalePosition()))return this._tryToGetDesiredPriceScale(e,t,s,i);if(void 0!==i&&(Object(a.isStudy)(i)||e.isMainPane())&&o.is_price_study)return this._getPriceScaleTheSameAsForSource(i,e)}if(l=!1,Object(a.isStudy)(t)){if(void 0!==(c=t.metaInfo().groupingKey)&&null!==(r=e.model().findNonOverlayStudyWithGroupingKey(c,e)))return this._getPriceScaleTheSameAsForSource(r.study,r.pane);l=Boolean(t.metaInfo().is_price_study)}else t===e.model().mainSeries()&&(l=!0);return l&&null!==(r=this._findFirstScaleForPriceStudy(e))?r:this.createNewPriceScaleIfPossible(e)},e.prototype.canCreateNewPriceScale=function(e){return e.leftPriceScales().length+e.rightPriceScales().length<this._priceScalesLimit},e.prototype._getPriceScaleTheSameAsForSource=function(e,t){return t.isOverlay(e)?t.createPriceScaleAtPosition("overlay"):Object(s.ensureNotNull)(e.priceScale())},e.prototype._priceScaleIsPrice=function(e,t){var i=e.mainSource();return!!i&&(i===t.mainSeries()||!!Object(a.isStudy)(i)&&Boolean(i.metaInfo().is_price_study))},e.prototype._findFirstScaleForPriceStudy=function(e){var t,i=e.model();for(t=0;t<this._priceScalesLimit;t++){if(e.rightPriceScales().length>t&&this._priceScaleIsPrice(e.rightPriceScales()[t],i))return e.rightPriceScales()[t];if(e.leftPriceScales().length>t&&this._priceScaleIsPrice(e.leftPriceScales()[t],i))return e.leftPriceScales()[t]}return null},e.prototype._targetPriceScaleIndex=function(e,t){if(e.mainSource()===t.mainSeries())return 0},e.prototype._tryToGetDesiredPriceScale=function(e,t,i,n){switch(i){case"left":return this.canCreateNewPriceScale(e)?e.createPriceScaleAtPosition("left"):e.createPriceScaleAtPosition("overlay");case"right":return this.canCreateNewPriceScale(e)?e.createPriceScaleAtPosition("right"):e.createPriceScaleAtPosition("overlay");case"as-series":return void 0!==n?Object(s.ensureNotNull)(n.priceScale()):e.isMainPane()?Object(s.ensureNotNull)(Object(s.ensureNotNull)(e.mainDataSource()).priceScale()):this.createNewPriceScaleIfPossible(e);case"overlay":return e.createPriceScaleAtPosition("overlay")}},e}()),u=function(e){function t(t){return e.call(this,t)||this}return Object(r.__extends)(t,e),t.prototype.apply=function(e){var t=this,i=e.model();e.leftPriceScales().slice(0).forEach(function(n){return e.movePriceScale(n,"right",t._targetPriceScaleIndex(n,i))})},
t.prototype.createNewPriceScaleIfPossible=function(e){return this.canCreateNewPriceScale(e)?e.createPriceScaleAtPosition("right"):e.createPriceScaleAtPosition("overlay")},t}(l),h=function(e){function t(t){return e.call(this,t)||this}return Object(r.__extends)(t,e),t.prototype.apply=function(e){var t=this,i=e.model();e.rightPriceScales().slice(0).forEach(function(n){return e.movePriceScale(n,"left",t._targetPriceScaleIndex(n,i))})},t.prototype.createNewPriceScaleIfPossible=function(e){return this.canCreateNewPriceScale(e)?e.createPriceScaleAtPosition("left"):e.createPriceScaleAtPosition("overlay")},t}(l),d=[{name:"left",title:window.t("Stack On The Left"),ctor:h},{name:"right",title:window.t("Stack On The Right"),ctor:u},{name:"auto",title:window.t("Auto"),ctor:c}]},MXV9: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(4 4)"><path d="M.5 10.992c0 .287.226.508.505.508H2.65c.19.93.55 1.82 1.09 2.63L2.577 15.3a.5.5 0 0 0-.007.71l1.42 1.42a.5.5 0 0 0 .71-.007l1.17-1.163c.81.54 1.71.9 2.63 1.09v1.645c0 .284.227.505.508.505h1.984c.28 0 .508-.221.508-.505V17.35a7.46 7.46 0 0 0 2.63-1.09l1.17 1.163a.5.5 0 0 0 .71.007l1.42-1.42a.5.5 0 0 0-.007-.71l-1.163-1.17c.54-.81.9-1.7 1.09-2.63h1.645a.502.502 0 0 0 .505-.508V9.008a.503.503 0 0 0-.505-.508H17.35c-.19-.93-.55-1.82-1.09-2.63l1.163-1.17a.5.5 0 0 0 .007-.71l-1.42-1.42a.5.5 0 0 0-.71.007L14.13 3.74a7.46 7.46 0 0 0-2.63-1.09V1.005A.504.504 0 0 0 10.992.5H9.008a.504.504 0 0 0-.508.505V2.65c-.92.19-1.82.55-2.63 1.09L4.7 2.577a.5.5 0 0 0-.71-.007L2.57 3.99a.5.5 0 0 0 .007.71L3.74 5.87c-.54.81-.9 1.7-1.09 2.63H1.005a.503.503 0 0 0-.505.508v1.984z"/><circle cx="10" cy="10" r="2.5"/></g></svg>'},MY2c:function(e,t,i){"use strict";var n,o,r,s,a,l;i.r(t),i.d(t,"UndoStack",function(){return l}),n=i("RDU5"),o=i("aIyQ"),r=i.n(o),s=i("uOxu"),a=Object(s.getLogger)("Common.UndoStack"),l=function(){function e(){this._commands=[],this._onChange=new r.a}return e.prototype.onChange=function(){return this._onChange},e.prototype.isEmpty=function(){return 0===this._commands.length},e.prototype.clear=function(){this.isEmpty()||(this._commands.length=0,this._onChange.fire())},e.prototype.push=function(e){if(!(e instanceof n.UndoCommand))throw new TypeError("argument must be an instance of UndoCommand");this._commands.push(e),this._onChange.fire()},e.prototype.pop=function(){if(!this.isEmpty()){var e=this._commands.pop();return this._onChange.fire(),e}a.logDebug("pop: undo stack is empty")},e.prototype.head=function(){if(!this.isEmpty())return this._commands[this._commands.length-1]},e}()},MrEN:function(e,t,i){"use strict";(function(t){var n=i("IiTo"),o=i("LxhU").Interval,r=i("aIyQ"),s=i("Kxc7"),a=i("/bs+").barTimeToEndOfPeriod,l=function(e,t){this._server=e,this._session=t,this._timezone=null,this._timezoneId="",this._isDWM=!1,this._resolution=null,this.seriesCompleted=new r,this.seriesError=new r,this._lastBarTimes={}};l.prototype.lastBarTime=function(e){return this._lastBarTimes[e]},
l.prototype._userTimezone=function(){return this._timezone},l.prototype.setTimezone=function(e){this._timezone="exchange"===e?"exchange":t.get_timezone(e),this._timezoneId=e},l.prototype.timezone=function(){return this._timezoneId},l.prototype.setResolution=function(e){this._isDWM=o.isDWM(e),this._resolution=e},l.prototype.onRequestMetadata=function(e,t){this._server.receiveLocalResponse({method:"studies_metadata",params:[this._session,e,{errors:[],hash:"",metainfo:t,migrations:[]}]})},l.prototype.onSymbolResolved=function(e,t){this._server.receiveLocalResponse({method:"symbol_resolved",params:[this._session,e,t]})},l.prototype.onSymbolError=function(e,t){this._server.receiveLocalResponse({method:"symbol_error",params:[this._session,e,t]})},l.prototype.onStudyError=function(e,t,i){this._server.receiveLocalResponse({method:"study_error",params:[this._session,e,t,i]})},l.prototype.onSeriesLoading=function(e,t){this._server.receiveLocalResponse({method:"series_loading",params:[this._session,e,t]})},l.prototype.onSeriesCompleted=function(e,t,i){this._server.receiveLocalResponse({method:"series_completed",params:[this._session,e,i,t]}),this.seriesCompleted.fire(e,t)},l.prototype.onSeriesError=function(e,t){this._server.receiveLocalResponse({method:"series_error",params:[this._session,e,t]}),this.seriesError.fire(e,t)},l.prototype.onSeriesClearData=function(e,t){var i={};i[e]={series:[],turnaround:t},this._server.receiveLocalResponse({method:"timescale_update",params:[this._session,i,{index:0,zoffset:0,changes:[],marks:[],index_diff:[]}]})},l.prototype.onStudyCompleted=function(e,t){this._server.receiveLocalResponse({method:"study_completed",params:[this._session,e,t]})},l.prototype.onStudyLoading=function(e,t){this._server.receiveLocalResponse({method:"study_loading",params:[this._session,e,t]})},l.prototype._calcMarksTime=function(e,i,r,l){var c,u,h,d=t.get_timezone(i.timezone),p=new n.SessionInfo(i.timezone,i.session,i.holidays,i.corrections),_=n.newBarBuilder(this._resolution,p,p),f=this._isDWM&&!s.enabled("disable_resolution_rebuild"),m=s.enabled("end_of_period_timescale_marks"),y=!this._isDWM,g=o.parse(this._resolution);for(c=0;c<e.length;c++)u=r(e[c]),m&&(u=a(_,p.spec,u,g)),f&&(h=t.utc_to_cal(d,1e3*u),h=p.spec.correctTradingDay(h),t.set_hms(h,0,0,0,0,d),u=parseInt(h.valueOf()/1e3)),y&&(u=this.timeInTimezone(u,d)),e[c]=l(e[c],u)},l.prototype.onTickmarksUpdated=function(e,t,i,n){var r,s,a,l,c,u,h;if(o.isEqual(n,this._resolution)){for(r=t.slice(0),this._calcMarksTime(r,i,function(e){return e},function(e,t){return t}),s=[],a=[],c=0;c<r.length;++c)u=r[c],s.push([this._spanByTime(u,l),u,e+c]),a.push(u),l=u;h={method:"tickmark_update",params:[this._session,{index:e,zoffset:0,changes:a,marks:s,index_diff:[]}]},this._server.receiveLocalResponse(h)}},l.prototype.onTimescaleUpdate=function(e,t,i,n,o,r){var s,a,l,c,u,h,d,p,_=r&&r.slice(0);for(this._lastBarTimes[e]=_?_&&_[_.length-1]:i&&i[i.length-1].value[0],this._calcMarksTime(i,n,function(e){return e.value[0]},function(e,t){return e.exTime=t,e}),
_&&this._calcMarksTime(_,n,function(e){return e},function(e,t){return{markTime:t,time:e}}),(s={})[e]={series:i,turnaround:t},a=[],l=[],u=i.map(function(e){return{markTime:e.exTime,time:e.value[0]}}),_&&(u=u.concat(_)),h=0;h<u.length;++h)d=u[h].markTime,a.push([this._spanByTime(d,c),d,o+h]),l.push(u[h].time),c=d;p={method:"timescale_update",params:[this._session,s,{index:o,zoffset:0,changes:l,marks:a,index_diff:[]}]},this._server.receiveLocalResponse(p)},l.prototype.onSeriesTimeframeUpdate=function(e,t,i,n,o){var r={method:"series_timeframe",params:[this._session,e,t,i,n,o]};this._server.receiveLocalResponse(r)},l.prototype.onPointsetDataUpdate=function(e,t,i,n){this._onDataUpdate(e,t,i,null,n,1)},l.prototype.onDataUpdate=function(e,t,i,n,o){this._onDataUpdate(e,t,i,n,o,0)},l.prototype._onDataUpdate=function(e,t,i,n,o,r){var s,a={},l="",c=[];null!==n&&(l=JSON.stringify(n.data),c=n.indexes||[]),a[e]={s:i,ns:{d:l,indexes:c},turnaround:t},s={method:"data_update",params:[this._session,a]},this._server.receiveLocalResponse(s)},l.prototype.onQuotesData=function(e){this._server.receiveLocalResponse({method:"quote_symbol_data",params:e})},l.prototype.onDepthData=function(e){this._server.receiveLocalResponse({method:"dd",params:e})},l.prototype.onDepthUpdate=function(e){this._server.receiveLocalResponse({method:"dpu",params:e})},l.prototype.onProjectionUpdate=function(e,t,i,n){var o,r=i.data,s=r[r.length-1],a={data:{reversalAmount:i.reversalAmount,boxSize:i.boxSize,price:s?s[4]:i.price,bars:r.map(function(e,t){return{time:t,open:e[1],high:e[2],low:e[3],close:e[4],volume:e[5],factor:e[6],additionalPrice:e[6]}})}},l={};l[e]={s:n||[],ns:{d:JSON.stringify(a),indexes:r.map(function(e,t){return i.barsetSize+(e[0]||0)})},turnaround:t},o={method:"data_update",params:[this._session,l]},this._server.receiveLocalResponse(o)},l.prototype.timeInTimezone=function(e,i){return"exchange"===this._userTimezone()?parseInt(t.utc_to_cal(i,1e3*e).valueOf()/1e3):parseInt(t.utc_to_cal(this._userTimezone(),1e3*e).valueOf()/1e3)},l.prototype._spanByTime=function(e,t){function i(e){return 60*e*60*1e3}function n(e){return 60*e*1e3}var o,r,s,a,l=[{divisor:1,span:20},{divisor:(a=1,1e3*a),span:19},{divisor:n(5),span:21},{divisor:n(30),span:22},{divisor:i(1),span:30},{divisor:i(3),span:31},{divisor:i(6),span:32},{divisor:i(12),span:33}];if(!t)return 20;if(o=new Date(1e3*t),(r=new Date(1e3*e)).getUTCFullYear()!==o.getUTCFullYear())return 70;if(r.getUTCMonth()!==o.getUTCMonth())return 60;if(r.getUTCDate()!==o.getUTCDate())return 50;for(s=l.length-1;s>=0;--s)if(Math.floor(o/l[s].divisor)!==Math.floor(r/l[s].divisor))return l[s].span},TradingView.ChartapiMessagerInstances=[],e.exports=l}).call(this,i("jCNj"))},"N+BX":function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolBezierCubic";var r=t||n.createProperties();o.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("a6on").BezierCubicPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}
var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=window.t("Double Curve");inherit(n,o),n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return a},n.prototype.name=function(){return"Double Curve"},n.prototype.controlPoints=function(){var e=this.pointToScreenPoint(this.points()[0])[0],t=this.pointToScreenPoint(this.points()[1])[0],i=t.subtract(e).scaled(.5),n=i.transposed().scaled(.3),o=e.add(t).scaled(.33),r=e.add(t).scaled(.67),s=o.add(n),a=r.subtract(n);return[this.screenPointToPoint(s),this.screenPointToPoint(a)]},n.prototype.setLastPoint=function(e,t){o.prototype.setLastPoint.call(this,e,t),this._controlPoints=this.controlPoints()},n.prototype.addPoint=function(e,t,i){var n,r=o.prototype.addPoint.call(this,e,t,!0);return r&&(n=this.controlPoints(),delete this._controlPoints,this._points.push(n[0]),this._points.push(n[1]),i||(this.normalizePoints(),this.createServerPoints()),this._createPointProperty(2),this._createPointProperty(3)),r},n.prototype.restorePoints=function(e,t,i){o.prototype.restorePoints.call(this,e,t,i),this._createPointProperty(2),this._createPointProperty(3)},n.prototype.getStylesPropertyPage=function(){return s.LineToolBezierStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("b4fl").GeneralBezierDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new r("linetoolbeziercubic",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolBezierCubic=n},N1UO:function(e,t,i){"use strict";var n,o,r,s,a,l,c;i.r(t),i.d(t,"StudyApi",function(){return c}),n=i("mrSG"),i("YFKU"),o=i("Eyy1"),r=i("9iCb"),s=i("HGup"),a=i("jRfx"),l=i("/ToI"),c=function(){function e(e,t){this._study=e,this._undoModel=t,this._model=t.model()}return e.prototype.isUserEditEnabled=function(){return this._study.userEditEnabled()},e.prototype.setUserEditEnabled=function(e){this._study.setUserEditEnabled(e)},e.prototype.getInputsInfo=function(){return this._study.metaInfo().inputs.map(function(e){return Object(n.__assign)(Object(n.__assign)({},e),{localizedName:void 0!==e.name?window.t(e.name,{context:"input"}):""})})},e.prototype.getInputValues=function(){var e=this._study.inputs();return Object.keys(e).map(function(t){return{id:t,value:e[t]}})},e.prototype.setInputValues=function(e){var t,i,n=this.getInputValues(),o=function(e){void 0!==n.find(function(t){return t.id===e.id})?r._study.properties().inputs[e.id].setValue(e.value):console.warn('There is no such input: "'+e.id+'"')},r=this;for(t=0,i=e;t<i.length;t++)o(i[t])},e.prototype.mergeUp=function(){this._model.isMergeUpAvailableForSource(this._study)&&new a.c(this._model,this._study,"").redo()},e.prototype.mergeDown=function(){this._model.isMergeDownAvailableForSource(this._study)&&new a.a(this._model,this._study,"").redo()},e.prototype.unmergeUp=function(){
this._model.isUnmergeAvailableForSource(this._study)&&new s.c(this._model,this._study,"").redo()},e.prototype.unmergeDown=function(){this._model.isUnmergeAvailableForSource(this._study)&&new s.a(this._model,this._study,"").redo()},e.prototype.mergeUpWithUndo=function(){this._model.isMergeUpAvailableForSource(this._study)&&this._undoModel.mergeSourceUp(this._study)},e.prototype.mergeDownWithUndo=function(){this._model.isMergeDownAvailableForSource(this._study)&&this._undoModel.mergeSourceDown(this._study)},e.prototype.unmergeUpWithUndo=function(){this._model.isUnmergeAvailableForSource(this._study)&&this._undoModel.unmergeSourceUp(this._study)},e.prototype.unmergeDownWithUndo=function(){this._model.isUnmergeAvailableForSource(this._study)&&this._undoModel.unmergeSourceDown(this._study)},e.prototype.changePriceScale=function(e){var t,i,n,r=Object(o.ensureNotNull)(this._model.paneForSource(this._model.mainSeries())),s=Object(o.ensureNotNull)(this._model.paneForSource(this._study));switch(e){case"no-scale":Object(o.assert)(s.actionNoScaleIsEnabled(this._study),"Unable to leave a pane without any non-overlay price scale"),new l.MoveToNewPriceScaleUndoCommand(this._model,this._study,s,"overlay","").redo();break;case"as-series":Object(o.assert)(s===r,"Study should be on the main pane"),new l.MoveToExistingPriceScaleUndoCommand(this._model,this._study,s,this._model.mainSeries().priceScale(),"").redo();break;case"new-left":new l.MoveToNewPriceScaleUndoCommand(this._model,this._study,s,"left","").redo();break;case"new-right":new l.MoveToNewPriceScaleUndoCommand(this._model,this._study,s,"right","").redo();break;default:if(null===(t=this._model.dataSourceForId(e)))throw new Error("There is no study with entityId='"+e+"'");i=s===this._model.paneForSource(t),Object(o.assert)(i,"Both studies should be on the same pane"),n=Object(o.ensureNotNull)(t.priceScale()),new l.MoveToExistingPriceScaleUndoCommand(this._model,this._study,s,n,"").redo()}},e.prototype.isVisible=function(){return this._study.properties().visible.value()},e.prototype.setVisible=function(e){this._study.properties().visible.setValue(e)},e.prototype.bringToFront=function(){this._model.bringToFront([this._study])},e.prototype.sendToBack=function(){this._model.sendToBack([this._study])},e.prototype.applyOverrides=function(e){Object(r.applyOverridesToStudy)(this._study,e)},e}()},N22A:function(e,t,i){"use strict";function n(){return Object(o.a)(r)?Object(o.c)(r):null}var o,r;i.d(t,"a",function(){return n}),o=i("ObRt"),r={id:"TradingService"}},N7ud:function(e,t,i){"use strict";function n(e){this._data=e}n.prototype._drawShackle=function(e){var t=this._data.width-3,i=t/2,n=this._data.height-this._data.bodyHeight;e.moveTo(1.5,i),e.arc(this._data.width/2,i,i,Math.PI,2*Math.PI),n>i&&(e.moveTo(1.5,i),e.lineTo(1.5,n),e.moveTo(this._data.width-1.5,i),e.lineTo(this._data.width-1.5,n))},n.prototype.draw=function(e){var t,i,n,o;e.translate(this._data.x-this._data.width/2,this._data.y-this._data.height/2),t="rgba(153,153,153,.3)",i="rgba(153,153,153,.7)",n="#777",
o="rgba(255,255,255,.7)",e.strokeStyle=t,e.lineWidth=2,e.beginPath(),this._drawShackle(e),e.stroke(),e.closePath(),e.strokeStyle=i,e.lineWidth=1,e.beginPath(),e.rect(0,this._data.height-this._data.bodyHeight+.5,this._data.width,this._data.bodyHeight),e.closePath(),e.stroke(),e.translate(0,-1),e.strokeStyle=n,e.beginPath(),this._drawShackle(e),e.stroke(),e.closePath(),e.fillStyle=o,e.beginPath(),e.rect(1,this._data.height-this._data.bodyHeight+1.5,this._data.width-2,this._data.bodyHeight-2),e.fill(),e.beginPath(),e.rect(.5,this._data.height-this._data.bodyHeight+1,this._data.width-1,this._data.bodyHeight-1),e.stroke(),e.closePath(),e.fillStyle=n,e.fillRect(this._data.width/2-.5,this._data.height-this._data.bodyHeight/2,1,2)},t.PaneRendererCrossHairLock=TradingView.PaneRendererCrossHairLock=n},NJRZ:function(e,t,i){"use strict";function n(e,t){this._constructor="LineTool5PointsPattern";var r=t||n.createProperties();o.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("6MfG").Pattern5PaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=window.t("XABCD Pattern");inherit(n,o),n.prototype.pointsCount=function(){return 5},n.prototype.title=function(){return a},n.prototype.name=function(){return"XABCD Pattern"},n.prototype.getStylesPropertyPage=function(){return s.LineToolLineTool5PointsPatternStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("EFc4").Points5PatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new r("linetool5pointspattern",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineTool5PointsPattern=n},NhkU:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolPitchfan";var r=t||n.createProperties();o.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("l5Au").PitchfanLinePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("5rJj"),s=i("hayr").propertyPages,a=window.t("Pitchfan");inherit(n,o),n.LevelsCount=8,n.prototype.levelsCount=function(){return n.LevelsCount},n.prototype.pointsCount=function(){return 3},n.prototype.title=function(){return a},n.prototype.name=function(){return"Pitchfan"},n.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},n.prototype.getStylesPropertyPage=function(){return s.LineToolPitchfanStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("D+Nk").PitchBaseDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new r("linetoolpitchfan",e,!1,{range:[0,8]});return n._configureProperties(t),t},
n._configureProperties=function(e){o._configureProperties(e)},t.LineToolPitchfan=n},NsVT:function(e,t,i){"use strict";function n(e,t){var i,n,o,r,s,a,l=0;for(i=0,n=t;i<n.length&&(r=(o=n[i]).min,s=o.max,e<r||s<r||(a=Math.min(e,s),e!==(l=Math.max(l,a))));i++);return l}function o(e){var t,i,n,o,r,s=[];if(void 0===e)return[];for(Array.isArray(e)||(e=[e]),t=0,i=e;t<i.length;t++)n=i[t],o=void 0,r=void 0,isFinite(n)?o=r=Number(n):(o=+n.min,r=+n.max),(o<0||isNaN(o))&&(o=0),isNaN(r)&&(r=1/0),o<=r&&r>0&&s.push({min:o,max:r});return s.sort(function(e,t){return e.min-t.min||e.max-t.max}),s}function r(e,t){if(e.length!==t.length)return!1;for(var i=e.length;i--;){if(e[i].min!==t[i].min)return!1;if(e[i].max!==t[i].max)return!1}return!0}function s(e){var t=h.enabled("side_toolbar_in_fullscreen_mode"),i=h.enabled("header_in_fullscreen_mode");return"center"===e||"left"===e&&t||"top"===e&&i}var a,l,c,u,h,d,p;i.r(t),a=i("hY0g"),l=i.n(a),c=i("HySD"),u=i("+GxX"),h=i("Kxc7"),i.d(t,"ChartPage",function(){return p}),d=h.enabled("no_min_chart_width"),p=function(){function e(e){var t,i=this;if(this._processVisibility=function(e){var t=e.container.value();return i._affectsLayout(e.name)?(t&&t.classList.toggle("js-hidden",!1),!0):(t&&t.classList.toggle("js-hidden",!0),!1)},this._setWidth=function(e,t){var o,r=t;return i._fullscreenArea!==e.name&&(e.availWidth.setValue(t),e.canNegotiate.width&&(r=n(t,e.negotiations.width))),(o=e.container.value())&&(o.style.width=r+"px"),e.width.setValue(r),r},this._setHeight=function(e,t){var o,r=t;return i._fullscreenArea!==e.name&&(e.availHeight.setValue(t),e.canNegotiate.height&&(r=n(t,e.negotiations.height))),(o=e.container.value())&&(o.style.height=r+"px"),e.height.setValue(r),r},!(t=e.container.value()))throw new Error("bridge.container.value() must be an element");this._container=t,this._availableAreas=["left","tradingpanel","right","top","bottom","center","topleft"],this._areas={},this._bridge=e,this._width=e.width,this._height=e.height,this._width.subscribe(function(){return i.recalculate()}),this._height.subscribe(function(){return i.recalculate()}),this._bridge.visible.subscribe(function(){return i._updateVisibility()}),this._bridge.fullscreen.subscribe(function(){return i._onParentFullscreenChange()}),this.recalculate()}return e.prototype.allocate=function(e){var t,i,n=this,s=e&&e.areaName;if(-1===this._availableAreas.indexOf(s))throw new Error("unknown options.areaName");return this.free(s),t=this._createDOM(s),(i={name:s,canNegotiate:{width:"left"===s||"right"===s||"tradingpanel"===s||"topleft"===s,height:"top"===s||"bottom"===s||"topleft"===s},negotiations:{width:[],height:[]},remove:function(){for(var e in n._areas)n._areas[e]===i&&n.free(e)},negotiateWidth:function(e){if(i.canNegotiate.width){var t=o(e);r(i.negotiations.width,t)||(i.negotiations.width=t,n.recalculate())}},negotiateHeight:function(e){if(i.canNegotiate.height){var t=o(e);r(i.negotiations.height,t)||(i.negotiations.height=t,n.recalculate())}},requestFullscreen:function(){
n._fullscreenArea||("right"!==s&&"center"!==s||(n._fullscreenArea=s),"center"===s&&n._bridge.requestFullscreen(),n._updateFullscreen())},exitFullscreen:function(){s===n._fullscreenArea&&(n._fullscreenArea=void 0,"center"===s&&n._bridge.exitFullscreen(),n._updateFullscreen())},width:new l.a,height:new l.a,availWidth:new l.a,availHeight:new l.a,alive:new l.a(!0),container:new l.a(t),visible:new l.a(!0),fullscreen:new l.a(!0),rdState:new c.ResizerDetacherState}).rdState.pushOwner(i),this._areas[s]=i,i.rdState.owner.subscribe(function(e){var t,o,r,a=i.container.value();if(e!==i)a&&(a.innerHTML="",a.parentElement&&a.parentElement.removeChild(a));else{for(t=null,o=n._availableAreas.indexOf(s);o--;)if(r=n._availableAreas[o],n._affectsLayout(r)){t=n._areas[r].container.value();break}a&&(t&&a.parentElement?a.insertAdjacentElement("afterend",t):n._container.appendChild(a))}n.recalculate()},{callWithLast:!0}),i.rdState.bridge()},e.prototype.free=function(e){var t,i=this._areas[e];i&&(this._areas[e]=void 0,(t=i.container.value())&&t.parentElement&&t.parentElement.removeChild(t),i.alive.setValue(!1))},e.prototype.recalculate=function(){var e,t,i,n,o,r,s,a,l,c,u,h,p,_,f,m,y,g,v,S,b,w,P,C,T={};this._recalcSingleRunToken=T,e=this._areas.topleft,t=this._areas.left,i=this._areas.tradingpanel,n=this._areas.right,o=this._areas.top,r=this._areas.bottom,s=this._areas.center,a=this._width.value(),l=this._height.value(),c=0,u=0,h=0,p=0,_=0,f=0,m=0,T===this._recalcSingleRunToken&&e&&this._processVisibility(e)&&(m=this._setHeight(e,l),(f=this._setWidth(e,a))&&(f+=4)),T===this._recalcSingleRunToken&&t&&this._processVisibility(t)&&((y=t.container.value())&&(y.style.top=m+"px"),this._setHeight(t,l-m),(h=this._setWidth(t,a))&&(h+=4)),T===this._recalcSingleRunToken&&i&&this._processVisibility(i)&&(this._setHeight(i,l),g=a-h,d||(g-=300),_=this._setWidth(i,g)),T===this._recalcSingleRunToken&&n&&this._processVisibility(n)&&(this._setHeight(n,l),g=a-h-_,d||(g-=300),p=this._setWidth(n,g)),S=(v=_+p)?4:0,T===this._recalcSingleRunToken&&o&&this._processVisibility(o)&&(b=Math.max(f,h),(y=o.container.value())&&(y.style.left=b+"px"),g=a-b-_-p-S,this._setWidth(o,g),c=this._setHeight(o,l)),w=0,P=a-h-_-p-S,T===this._recalcSingleRunToken&&r&&this._processVisibility(r)&&((y=r.container.value())&&(y.style.left=h+"px",y.classList.toggle("no-border-top-left-radius",!h),y.classList.toggle("no-border-top-right-radius",!v)),this._setWidth(r,P),C=l-c,w=Math.min(300,C-0),u=this._setHeight(r,C)+4),T===this._recalcSingleRunToken&&s&&this._processVisibility(s)&&((y=s.container.value())&&(y.style.left=h+"px",y.style.top=c+"px",y.classList.toggle("no-border-bottom-left-radius",!u||!h),y.classList.toggle("no-border-bottom-right-radius",!v||!u)),this._setWidth(s,P),C=l-c-u,this._setHeight(s,Math.max(C,w))),T===this._recalcSingleRunToken&&i&&this._affectsLayout("tradingpanel")&&(y=i.container.value())&&(y.style.right=p+"px"),T===this._recalcSingleRunToken&&this._updateVisibility()},e.prototype._affectsLayout=function(e){var t,i=this._areas[e]
;return!!i&&(i.rdState.owner.value()===i&&(this._fullscreenArea&&this._fullscreenArea!==e?s(e):!((this._width.value()<=567||this._height.value()<=445)&&(t=["center","top","left","topleft"],Object(u.isFeatureEnabled)("mobile_show_bottom_panel")&&t.push("bottom"),!t.includes(e)))))},e.prototype._updateVisibility=function(){var e,t,i,n=this._bridge.visible.value();for(e=0;e<this._availableAreas.length;e++)t=this._availableAreas[e],(i=this._areas[t])&&(n&&this._affectsLayout(t)?i.visible.setValue(!0):i.visible.setValue(!1))},e.prototype._onParentFullscreenChange=function(){this._bridge.fullscreen.value()||(this._fullscreenArea=void 0,this._updateFullscreen())},e.prototype._updateFullscreen=function(){var e,t,i,n,o=void 0!==this._fullscreenArea;for(e=0;e<this._availableAreas.length;e++)t=this._availableAreas[e],(i=this._areas[t])&&(t!==this._fullscreenArea?(n=i.container.value())&&n.classList.toggle("js-hidden",o&&!s(t)):i.fullscreen.setValue(!0));this._updateVisibility(),this.recalculate()},e.prototype._createDOM=function(e){var t=document.createElement("div");return t.classList.add("layout__area--"+e),t.style.position="absolute","bottom"===e?t.style.bottom="0":t.style.top="0","right"===e||"tradingpanel"===e?t.style.right="0":t.style.left="0",t},e}()},Nu4p:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"plotShapesData",function(){return n}),i("YFKU"),n={shape_arrow_down:{guiName:window.t("Arrow Down"),id:"shape_arrow_down",paneRendererClass:"PaneRendererArrowDown",pineName:"shape.arrowdown",icon:"arrow_down"},shape_arrow_up:{guiName:window.t("Arrow Up"),id:"shape_arrow_up",paneRendererClass:"PaneRendererArrowUp",pineName:"shape.arrowup",icon:"arrow_up"},shape_circle:{guiName:window.t("Circle"),id:"shape_circle",paneRendererClass:"PaneRendererCircleShape",pineName:"shape.circle",icon:"circle"},shape_cross:{guiName:window.t("Cross"),id:"shape_cross",paneRendererClass:"PaneRendererCrossShape",pineName:"shape.cross",icon:"cross"},shape_diamond:{guiName:window.t("Diamond"),id:"shape_diamond",paneRendererClass:"PaneRendererDiamond",pineName:"shape.diamond",icon:"diamond"},shape_flag:{guiName:window.t("Flag"),id:"shape_flag",paneRendererClass:"PaneRendererFlagShape",pineName:"shape.flag",icon:"flag"},shape_label_down:{guiName:window.t("Label Down"),id:"shape_label_down",paneRendererClass:"PaneRendererLabelDown",pineName:"shape.labeldown",icon:"label_down"},shape_label_up:{guiName:window.t("Label Up"),id:"shape_label_up",paneRendererClass:"PaneRendererLabelUp",pineName:"shape.labelup",icon:"label_up"},shape_square:{guiName:window.t("Square"),id:"shape_square",paneRendererClass:"PaneRendererSquare",pineName:"shape.square",icon:"square"},shape_triangle_down:{guiName:window.t("Triangle Down"),id:"shape_triangle_down",paneRendererClass:"PaneRendererTriangleApexDown",pineName:"shape.triangledown",icon:"triangle_down"},shape_triangle_up:{guiName:window.t("Triangle Up"),id:"shape_triangle_up",paneRendererClass:"PaneRendererTriangleApexUp",pineName:"shape.triangleup",icon:"triangle_up"},shape_xcross:{guiName:window.t("X Cross"),
id:"shape_xcross",paneRendererClass:"PaneRendererXCross",pineName:"shape.xcross",icon:"x_cross"}}},OBgQ:function(e,t,i){"use strict";var n,o,r;i.d(t,"a",function(){return r}),n=i("jCNj"),o="Etc/UTC",r=function(){function e(e,t,i){this.year=e,this.month=t,this.day=i}return e.prototype.toString=function(){return this.year+"-"+this.month+"-"+this.day},e.prototype.compareTo=function(e){return this.year>e.year||this.year===e.year&&this.month>e.month||this.year===e.year&&this.month===e.month&&this.day>e.day?1:this.year===e.year&&this.month===e.month&&this.day===e.day?0:-1},e.prototype.before=function(e){return-1===this.compareTo(e)},e.prototype.toCalendar=function(e){return n.get_cal(n.get_timezone("Etc/UTC"),this.year,this.month-1,this.day)},e.prototype.addDays=function(t){var i=this.toCalendar(n.get_timezone(o));return n.add_date(i,t),e.fromCalendar(i)},e.fromCalendar=function(t){return new e(n.get_year(t),n.get_month(t)+1,n.get_day_of_month(t))},e}()},OH2X:function(e,t,i){"use strict";t.LineToolFibRetracement=i("t2ex").LineToolFibRetracement,t.LineToolFibChannel=i("xnA2").LineToolFibChannel,t.LineToolFibSpeedResistanceArcs=i("Yjuu").LineToolFibSpeedResistanceArcs,t.LineToolProjection=i("68at").LineToolProjection,t.LineToolTrendBasedFibExtension=i("ZtA1").LineToolTrendBasedFibExtension,t.LineToolElliott=i("xz+e").LineToolElliott,t.LineToolFibCircles=i("4bfY").LineToolFibCircles,t.LineToolVertLine=i("n40Z").LineToolVertLine,t.LineToolCrossLine=i("MA5A").LineToolCrossLine,t.LineToolBarsPattern=i("2bPF").LineToolBarsPattern,t.LineToolTrendBasedFibTime=i("yUly").LineToolTrendBasedFibTime,t.LineToolFibTimeZone=i("FsE7").LineToolFibTimeZone,t.LineToolCircleLines=i("tG6Q").LineToolCircleLines,t.LineToolDateRange=i("WkYF").LineToolDateRange,t.LineToolPriceRange=i("RDDl").LineToolPriceRange,t.LineToolDateAndPriceRange=i("UCMi").LineToolDateAndPriceRange,t.LineToolParallelChannel=i("qcGP").LineToolParallelChannel,t.LineToolTrendAngle=i("nW7S").LineToolTrendAngle,t.LineToolTrendLine=i("WPQD").LineToolTrendLine,t.LineToolInfoLine=i("yi8X").LineToolInfoLine,t.LineToolArrowMark=i("TohL").LineToolArrowMark,t.LineToolExecution=i("704P").LineToolExecution,t.LineToolPitchfan=i("NhkU").LineToolPitchfan,t.LineToolGannSquare=i("Z0Sh").LineToolGannSquare,t.LineToolFibSpeedResistanceFan=i("zZ5f").LineToolFibSpeedResistanceFan,t.LineToolGannComplex=i("nd9+").LineToolGannComplex,t.LineToolGannFixed=i("TBaH").LineToolGannFixed,t.LineToolGannFan=i("4u8j").LineToolGannFan,t.LineToolFibWedge=i("9QkW").LineToolFibWedge,t.LineToolPitchfork=i("aDyP").LineToolPitchfork,t.LineToolDisjointAngle=i("0xda").LineToolDisjointAngle,t.LineToolFlatBottom=i("InMJ").LineToolFlatBottom,t.LineToolIcon=i("icPo").LineToolIcon,t.LineToolRotatedRectangle=i("Az04").LineToolRotatedRectangle,t.LineToolFibSpiral=i("i80N").LineToolFibSpiral,t.LineToolHeadAndShoulders=i("aILO").LineToolHeadAndShoulders,t.LineToolTriangle=i("isVH").LineToolTriangle,t.LineToolTrianglePattern=i("lNN+").LineToolTrianglePattern,t.LineTool5PointsPattern=i("NJRZ").LineTool5PointsPattern,
t.LineToolThreeDrivers=i("PYn8").LineToolThreeDrivers,t.LineToolABCD=i("pKDv").LineToolABCD,t.LineToolPolyline=i("hP9j").LineToolPolyline,t.LineToolPrediction=i("Wh6B").LineToolPrediction,t.LineToolPriceLabel=i("zqZp").LineToolPriceLabel,t.LineToolNote=i("gLxC").LineToolNote,t.LineToolNoteAbsolute=i("gLxC").LineToolNoteAbsolute,t.LineToolBrush=i("+hLl").LineToolBrush,t.LineToolArc=i("0Pxc").LineToolArc,t.LineToolCallout=i("odCa").LineToolCallout,t.LineToolBalloon=i("me8f").LineToolBalloon,t.LineToolText=i("V3Oj").LineToolText,t.LineToolHorzLine=i("/DxK").LineToolHorzLine,t.LineToolHorzRay=i("CJIV").LineToolHorzRay,t.LineToolRectangle=i("7qI1").LineToolRectangle,t.LineToolEllipse=i("V086").LineToolEllipse,t.LineToolTimeCycles=i("kIXa").LineToolTimeCycles,t.LineToolSineLine=i("bv/X").LineToolSineLine,t.LineToolGhostFeed=i("XUCF").LineToolGhostFeed,t.LineToolBezierQuadro=i("Xyly").LineToolBezierQuadro,t.LineToolBezierCubic=i("N+BX").LineToolBezierCubic,t.LineToolArrow=i("QQu0").LineToolArrow,t.LineToolRay=i("5ZUI").LineToolRay,t.LineToolExtended=i("CHw2").LineToolExtended,t.LineToolSchiffPitchfork=i("v5F8").LineToolSchiffPitchfork,t.LineToolSchiffPitchfork2=i("XFad").LineToolSchiffPitchfork2,t.LineToolInsidePitchfork=i("EqoR").LineToolInsidePitchfork,t.LineToolTextAbsolute=i("V3Oj").LineToolTextAbsolute,t.LineToolArrowMarkLeft=i("TohL").LineToolArrowMarkLeft,t.LineToolArrowMarkRight=i("TohL").LineToolArrowMarkRight,t.LineToolArrowMarkUp=i("TohL").LineToolArrowMarkUp,t.LineToolArrowMarkDown=i("TohL").LineToolArrowMarkDown,t.LineToolFlagMark=i("aIha").LineToolFlagMark,t.LineToolCypherPattern=i("bTqm").LineToolCypherPattern,t.LineToolElliottImpulse=i("xz+e").LineToolElliottImpulse,t.LineToolElliottTriangle=i("xz+e").LineToolElliottTriangle,t.LineToolElliottTripleCombo=i("xz+e").LineToolElliottTripleCombo,t.LineToolElliottCorrection=i("xz+e").LineToolElliottCorrection,t.LineToolElliottDoubleCombo=i("xz+e").LineToolElliottDoubleCombo,t.LineToolRiskRewardLong=i("tDUI").LineToolRiskRewardLong,t.LineToolRiskRewardShort=i("tDUI").LineToolRiskRewardShort,t.LineToolPosition=i("ziJ5").LineToolPosition,t.LineToolOrder=i("B4/o").LineToolOrder},"OK+B":function(e,t,i){"use strict";var n,o,r=i("Eyy1").assert,s=i("eJTA"),a=s.rgba,l=s.rgbaToString,c=s.parseRgb,u=i("+GxX").isFeatureEnabled,h=i("cWHH"),d=i("1Wlv").PriceScale,p=i("8sOK").StudyStub,_=i("CW80"),f=_.createLineTool,m=_.createLineToolProperties,y=_.createStudyLineToolProperties,g=_.isLineToolName,v=_.isStudyLineToolName,S=i("Ss5c").LineDataSource,b=i("OH2X").LineToolBarsPattern,w=i("OH2X").LineToolCallout,P=i("HLXm"),C=i("GVHu"),T=C.Study,x=C.prepareStudyPropertiesForLoadChart,I=i("3ClC").createStudy,L=i("qJq3").Series,M=i("dfhE"),A=i("n5al"),k=i("0YCj"),E=i("Kxc7"),O=i("uOxu").getLogger("Chart.Serialization"),D=i("OH2X").LineToolParallelChannel,V=i("OH2X").LineToolTrendAngle,B=i("OH2X").LineToolGhostFeed,R=i("OH2X").LineToolElliott,N=i("7ktv").PriceDataSource,F=i("iDOr").Pane,W=i("Tmoa"),j=i("jofe").createDeferredPromise,U=i("ApcL").preferencesByWhiteList
;O=i("uOxu").getLogger("Chart.Serialization"),n=i("mPvX").LineToolsGroupModel,h.version=2,h.prototype.state=function(e,t,i){var n,o,r,s={panes:[]};for(n=0;n<this.panes().length;n++)s.panes.push(this.panes()[n].state(!0,e,!1,t,i));return s.timeScale=this._timeScale.state(e),o=null,r=this.properties(),s.chartProperties={paneProperties:r.paneProperties.state(),scalesProperties:r.scalesProperties.state(),publishedChartsTimelineProperties:o?o.state(e):void 0,chartEventsSourceProperties:r.chartEventsSourceProperties.state(),priceScaleSelectionStrategyName:r.priceScaleSelectionStrategyName.value()},r.chartEventsSourceProperties&&(s.chartProperties.chartEventsSourceProperties=r.chartEventsSourceProperties.state()),s.lineToolsGroups=this.lineToolsGroupModel().state(t),s.version=h.version,s.timezone=this.timezone(),s.sessions=this.sessions().state(e),s},h.prototype.chartPropertiesTransparencyMigrate=function(e){var t,i,n;e.chartProperties.paneProperties.crossHairProperties&&(n=e.chartProperties.paneProperties.crossHairProperties,W.isHexColor(n.color)&&(i=n.transparency/100,t=c(n.color),n.color=l(a(t,i)))),e.chartProperties.paneProperties.dataWindowProperties&&(n=e.chartProperties.paneProperties.dataWindowProperties,W.isHexColor(n.color)&&(i=n.transparency/100,t=c(n.color),n.color=l(a(t,i))))},h.prototype.resetDeferredStudies=function(){new o(this).reset()},h.prototype._getExceedingChildStudies=function(e){var t,i,n,o,r,s,a,l,c=[];for(t=0;t<e.length;++t)c=c.concat(e[t].sources||[]);for(i=0,n=1,o=[],r={},s=0,a=1e6;c.length&&--a;)((l=c[s]).ownerSource&&r[l.ownerSource]||!l.ownerSource)&&(r[l.id]=l,c.splice(c.indexOf(l),1),l.ownerSource&&"Study"===l.type&&l.state&&l.state.isChildStudy&&++i>n&&o.push(l)),s=(s+1)%c.length;return o},h.prototype.restoreState=function(e,t,i){var r,s,a,l,c,u,h,d,p,_,f,m,y,g;if(new o(this).reset(),r={},e.panes)if(Array.isArray(e.panes)){if(!(e.panes.length<1)){if(e.chartProperties&&!e.chartProperties.timezone&&(e.chartProperties.timezone=e.timezone),e.chartProperties&&(s=TradingView.factoryDefaults("chartproperties").scalesProperties,TradingView.merge(s,e.chartProperties.scalesProperties),!("showLastValue"in s)||"showSeriesLastValue"in s||"showStudyLastValue"in s||(s.showSeriesLastValueProperty=s.showLastValue,s.showStudyLastValueProperty=s.showLastValue),"showSeriesLastValue"in s&&(r.showSeriesLastValueProperty=!0),"showStudyLastValue"in s&&(r.showStudyLastValueProperty=!0),e.chartProperties.paneProperties.vertGridProperties=e.chartProperties.paneProperties.vertGridProperties||TradingView.clone(e.chartProperties.paneProperties.gridProperties),e.chartProperties.paneProperties.horzGridProperties=e.chartProperties.paneProperties.horzGridProperties||TradingView.clone(e.chartProperties.paneProperties.gridProperties),this._properties.paneProperties.merge(e.chartProperties.paneProperties),this._properties.scalesProperties.merge(s),e.chartProperties.timezone&&this._properties.timezone.setValue(e.chartProperties.timezone),
e.chartProperties.chartEventsSourceProperties&&this._properties.chartEventsSourceProperties&&this._properties.chartEventsSourceProperties.merge(e.chartProperties.chartEventsSourceProperties),this._timeScale.restoreState(e.timeScale,t),this._updateDateTimeFormatter()),e.timeScale&&this._timeScale.restoreState(e.timeScale,t),!this.readOnly()&&(a=this._getExceedingChildStudies(e.panes)).length)for(l=e.panes.length-1;l>=0;--l){for(u=(c=e.panes[l]).sources.length-1;u>=0;--u)h=c.sources[u],~a.indexOf(h)&&c.sources.splice(u,1);c.sources.length||e.panes.splice(l,1)}for(d=e.panes,this.panes()[0].restoreState(d[0],t,e.version,r,i),p=1,l=1;l<e.panes.length;l++)0!==(_=e.panes[l]).sources.length?((c=this.panes()[p]||this.createPane()).restoreState(_,t,e.version,r,i),p+=1):O.logWarn("Empty pane detected - restoring is skipped. idx="+l+", state="+JSON.stringify(_));for(this._invalidateBarColorerCaches(),f=this.dataSources(),m=0,l=0;l<f.length;l++)y=f[l],TradingView.isInherited(y.constructor,S)&&(m++,y.calcIsActualSymbol());return this._version=e.version,this.updateTimeScaleBaseIndex(),this.recalculateAllPanes(),this.fullUpdate(),this.syncESD(),g=TVLocalStorage.getItem("linetools_limit")||1e3,window.is_authenticated&&window.user&&window.user.settings&&(g=window.user.settings.linetools_limit||g),m>g&&m%100==0?{lines_limit_exceeded:!0,line_tools_count:m}:(e.sessions&&this.sessions().restoreState(e.sessions,t),e.lineToolsGroups&&(this._lineToolsGroupModel=n.fromState(this,e.lineToolsGroups)),{})}O.logDebug("ChartModel.restoreState: invalid state")}else O.logDebug("ChartModel.restoreState: invalid state");else O.logDebug("ChartModel.restoreState: invalid state")},F.prototype.state=function(e,t,i,n,o){function r(e){var r,s;return h.has(e)?h.get(e):(r=null,s=i&&!e.isSavedInStudyTemplates()||!e.state||!(r=e.state(t,o))||!e.isSavedInChart(t)||n&&e.isActualSymbol&&!e.isActualSymbol()?null:r,h.set(e,s),s)}function s(e){return null!==h.get(e)}var a,l,c,u={},h=new Map;if(e)for(u.sources=[],a=0;a<this.m_dataSources.length;a++)null!==(l=r(this.m_dataSources[a]))&&u.sources.push(l);for(u.leftAxisesState=this._leftPriceScales.map(function(e){var t={};return t.state=e.state(),t.sources=e.dataSources().filter(s).map(function(e){return e.id()}),t}),u.rightAxisesState=this._rightPriceScales.map(function(e){var t={};return t.state=e.state(),t.sources=e.dataSources().filter(s).map(function(e){return e.id()}),t}),u.overlayPriceScales={},a=0;a<this.m_dataSources.length;a++)c=this.m_dataSources[a],this.isOverlay(c)&&c.isSavedInChart(t)&&(u.overlayPriceScales[c.id()]=c.priceScale().state());return u.stretchFactor=this._stretchFactor,this.m_mainDataSource&&(u.mainSourceId=this.m_mainDataSource.id()),u.priceScaleRatio=this._currentPriceScaleRatio,u},F.prototype.sourceById=function(e){for(var t=0;t<this.m_dataSources.length;t++)if(this.m_dataSources[t].id()===e)return this.m_dataSources[t];return null},F.prototype.isESDStudy=function(e){
return"Script$TV_EARNINGS@tv-scripting"===e.id||"Script$TV_DIVIDENDS@tv-scripting"===e.id||"Script$TV_SPLITS@tv-scripting"===e.id||"ESD$TV_EARNINGS@tv-scripting"===e.id||"ESD$TV_DIVIDENDS@tv-scripting"===e.id||"ESD$TV_SPLITS@tv-scripting"===e.id},F.prototype.isStudyToSkip=function(e){return!!this.isESDStudy(e)},F.prototype.restoreState=function(e,t,i,n,o){function r(e){var t=defaults("chartproperties").paneProperties.axisProperties,i=new d(v.model().properties().scalesProperties,t);return i.restoreState(e.state),e.sources.forEach(function(e){var n=v.dataSourceForId(e);n&&function(e,t,i){g.add(e),void 0!==i.m_showSymbolLabels&&e instanceof L&&v.model().properties().scalesProperties.showSymbolLabels.setValue(i.m_showSymbolLabels),e.setPriceScale(t),t.addDataSource(e)}(n,i,t)}),0===i.dataSources().length?null:i}var s,a,l,c,u,h,p,_,f,m,y,g,v,b,w,P,C,x,I,M,A,k;if(n=n||{},e.stretchFactor&&(this._stretchFactor=e.stretchFactor),s={},e.sources){for(a=e.sources.filter(function(e){return!!e&&("MainSeries"===e.type||(!e.points||!e.points.some(function(e){return null===e.time_t||!isFinite(e.time_t)})||(O.logNormal("Dropped invalid "+e.type+". Reason: non-numeric point time"),!1)))}),l=-1!==this.m_dataSources.indexOf(this._model.mainSeries()),this.clearSeries(),this.m_mainDataSource=null,l&&this._addSourceToCollections(this._model.mainSeries()),u=(c=this.getZOrderMinMax()).minZOrder,h=c.maxZOrder,function(){var t,i,n,o,r,s=a.find(function(t){return t.id===e.mainSourceId});if(void 0!==s)if(TradingView[s.type]&&TradingView.isInherited(TradingView[s.type],S)){for(t=null,i=0;i<a.length;i++)if(n=a[i],!TradingView[s.type]||!TradingView.isInherited(TradingView[n.type],S)){if(null!==t)return void O.logWarn("Pane contains more than 1 possibly main sources - auto fix cannot be applied");t=n}null!==t?(o=e.mainSourceId,r=0,e.mainSourceId=t.id,a.forEach(function(e){e.ownerSource===o&&(e.ownerSource=t.id,r+=1)}),O.logNormal("Auto fix broken pane is applied, changed line tools="+r+", changed from="+o+" to="+t.id)):O.logWarn("Pane contains only line tools - possible we need to remove this pane?")}else O.logNormal("The type of main source is not line tool - fix is unnecessary");else O.logWarn("There is no main source with id "+e.mainSourceId+", total sources="+a.length)}(),p=0;p<a.length;p++)if("study_Sessions"===(f=(_=a[p]).type)){this.model().sessions().restoreOldState(_,t);break}for(p=0;p<e.sources.length;p++)"study_Sessions"!==(f=(_=e.sources[p]).type)&&(Math.abs(_.zorder)>1e200?(m=u-1,O.logWarn("Datasource zorder has bad value: "+_.zorder+" Resetting it to "+m),_.zorder=m):this.isZOrderAvailable(_.zorder)||l&&"MainSeries"===f&&this._model.mainSeries().zorder()===_.zorder||(_.zorder=h+1),s[y=_.id]=_.ownerSource,f&&("MainSeries"===f?this._restoreMainSeries(_,t,l,n,o):f.toLowerCase().startsWith("study")?this._restoreStudy(_,t,n):TradingView.isInherited(TradingView[f],S)?this._restoreLineTool(_,t):TradingView[f]&&TradingView[f].createFromState&&this._restoreSpecialSource(_,t)),u=Math.min(u,_.zorder),h=Math.max(h,_.zorder))}for(g=new Set,v=this,
b=e.leftAxisesState?e.leftAxisesState.map(r).filter(function(e){return null!==e}):null!==(w=r({state:e.leftAxisState,sources:e.leftAxisSources}))?[w]:[],this._leftPriceScales.slice().forEach(function(e){this.removePriceScale(e)}.bind(this)),this._leftPriceScales=[],b.forEach(function(e){v._placePriceScale(e,"left")}),P=e.rightAxisesState?e.rightAxisesState.map(r).filter(function(e){return null!==e}):null!==(C=r({state:e.rightAxisState,sources:e.rightAxisSources}))?[C]:[],this._rightPriceScales.forEach(function(e){this.removePriceScale(e)}.bind(this)),this._rightPriceScales=[],P.forEach(function(e){v._placePriceScale(e,"right")}),this._currentPriceScaleRatio=e.priceScaleRatio||e.leftPriceScaleRatio||e.rightPriceScaleRatio||null,p=0;p<this.m_dataSources.length;p++)x=this.m_dataSources[p],g.has(x)||((I=new d(this._model.properties().scalesProperties)).setHeight(this.m_height),I.addDataSource(x),e.overlayPriceScales&&e.overlayPriceScales[x.id()]&&((M=e.overlayPriceScales[x.id()]).m_isAutoScale=!0,M.m_isLog=!1,M.m_isPercentage=!1,M.m_isLockScale=!1,I.restoreState(M)),x.setPriceScale(I));for(y in s)(A=s[y])&&(x=this.dataSourceForId(y))&&this.dataSourceForId(y).setOwnerSource(this.dataSourceForId(A));if(e.mainSourceId&&!this.m_mainDataSource&&(this.m_mainDataSource=this.dataSourceForId(e.mainSourceId)),!this.m_mainDataSource)for(p=0;p<this.m_dataSources.length;p++)if(x=this.m_dataSources[p],TradingView.isInherited(x.constructor,N)){this.m_mainDataSource=x;break}for(p=0;p<this.m_dataSources.length;p++)x=this.m_dataSources[p],TradingView.isInherited(x.constructor,S)?(x.ownerSource()||x.setOwnerSource(this.mainDataSource()),x.isFixed()&&x.restoreFixedPoints(),x.fixAfterRestorePriceAxis&&x.fixAfterRestorePriceAxis()):TradingView.isInherited(x.constructor,T)&&(k=x.properties()).linkedToSeries&&k.linkedToSeries.value()&&(x.ownerSource()||x.setOwnerSource(this.model().mainSeries()));this._updateMargins(),this._cachedOrderedSoruces=null,this._cachedHitTestSources=null},F.prototype._restoreMainSeries=function(e,t,i,n,o){var r,s,a,l,c,h,d,p,_,f,m,y,g,v,S,b=e.id,w=e.state,P=e.zorder;if(w&&o&&(w.style=o.style||w.style,w.interval=o.interval||w.interval,w.symbol=o.symbol||w.symbol),w&&w.style===M.STYLE_HILO&&!u("chart_style_hilo")&&(w.style=M.STYLE_CANDLES),w&&["candleStyle","hollowCandleStyle","haStyle"].forEach(function(e){w[e]&&(w[e].wickUpColor=w[e].wickUpColor||w[e].wickColor,w[e].wickDownColor=w[e].wickDownColor||w[e].wickColor)}),w&&(w.statusViewStyle=w.statusViewStyle||{},w.statusViewStyle.symbolTextSource||(r=!!w.statusViewStyle.showSymbolAsDescription,w.statusViewStyle.symbolTextSource=r?"ticker":"description")),i||(s=this._model.mainSeries(),this._model.paneForSource(s).removeDataSource(s),this._addSourceToCollections(s)),this.m_mainDataSource=this._model.mainSeries(),
(a=w&&w.style?w.style:void 0)===L.STYLE_PNF&&"ATR"===this._model.mainSeries().properties().pnfStyle.inputs.style.value()?this._model.mainSeries().properties().pnfStyle.inputs.style._value="Traditional":a===L.STYLE_RENKO&&"ATR"===this._model.mainSeries().properties().renkoStyle.inputs.style.value()&&(this._model.mainSeries().properties().renkoStyle.inputs.style._value="Traditional"),w&&!w.hasOwnProperty("showSessions")&&(w.showSessions=!1),w&&!w.extendedHours&&(w.extendedHours=!1),w&&t&&(w.showCountdown=!1),w&&(t&&!("showSeriesLastValueProperty"in n)&&"showLastValue"in w&&this._model.properties().scalesProperties.showSeriesLastValue.setValue(w.showLastValue),delete w.showLastValue),w)for(l={haStyle:A.chartStyleStudyId(L.STYLE_HEIKEN_ASHI,!0),renkoStyle:A.chartStyleStudyId(L.STYLE_RENKO,!0),pbStyle:A.chartStyleStudyId(L.STYLE_PB,!0),kagiStyle:A.chartStyleStudyId(L.STYLE_KAGI,!0),pnfStyle:A.chartStyleStudyId(L.STYLE_PNF,!0),rangeStyle:A.chartStyleStudyId(L.STYLE_RANGE,!0)},c=this._model.studyVersioning(),h=this._model.mainSeries().styleStudyInfos(),d=Object.keys(M.SYMBOL_STRING_DATA),p=0;p<d.length;p++)a=d[p],f=(_=M.STYLE_SHORT_NAMES[a]+"Style")in e?e[_].studyId:l[_],null!=(a=w[_])&&(m=a.inputs,y=k.parseIdString(f),g=h[_].studyId,v=k.parseIdString(g),S=c.updateStudyInputs(y.id,y.version,v.version,m,null),a.inputs=S);this._model.mainSeries().restoreState(e,t),this._sourcesById.delete(this._model.mainSeries().id()),this._model.mainSeries().setId(b),this._sourcesById.set(b,this._model.mainSeries()),void 0!==P&&this._model.mainSeries().setZorder(P),this._model.mainSeries().properties().extendedHours.listeners().fire(this._model.mainSeries().properties().extendedHours),this._model.mainSeries().symbolInfo()&&this._model.mainSeries().dataEvents().fireSymbolResolved(this._model.mainSeries().symbolInfo())},F.prototype._restoreStudy=function(e,t,i){function n(i){function n(n){var o,l=x(c,i,u,null,h,n),d=I(f._model,l,n||f._model.mainSeries(),s);d.setId(r),t&&(o=h.patchStudyData(c,e.data,e.nonSeriesData,e.indexes),d.restoreData(o.data,o.nsData,o.indexes)),f._model.replaceStudyStub(_,d)||(_=d),a.add(r,d)}var s,a;_.setStatus(""),s=i||new k(c),a=new o(f._model),l&&e.state.isChildStudy?a.get(l).then(n):n()}var r,s,a,l,c,u,h,d,_,f,m;if(t&&void 0===e.data&&void 0===e.nonSeriesData&&void 0===e.indexes)O.logError("Cannot restore (skipping) study without data "+e.id+", "+e.metaInfo.id);else{if(r=e.id,s=e.state,a=e.zorder,l=e.ownerSource,c=TradingView.clone(e.metaInfo),Object.assign(c,k.parseIdString(c.id)),!this.isStudyToSkip(c)||t)return u=s,d=(h=this._model.studyVersioning()).patchPropsStateAndMetaInfo(u,c,{oldShowStudyLastValueProperty:t&&!i.showStudyLastValueProperty}),u=d.propsState,c=d.metaInfo,(_=new p(this._model,e,c.shortDescription)).setId(r),f=this,t?n(null):(m=h.updateMetaInfoAsync(c)).sync?n(m.result):m.result.then(function(e){n(e)}).catch(function(e){_.setStatus("error: "+e),_.setFailed(!0)}),_&&this._addSourceToCollections(_),delete this._cachedOrderedSoruces,delete this._cachedHitTestSources,_&&void 0!==a&&_.setZorder(a),_
;O.logNormal("Skipping study "+c.id)}},F.prototype._restoreLineTool=function(e,t,i){var n,o,s,a,l,c,u,h,d,_,S,C,T,x,I,L,M;if(i=void 0===i||i,R.migrateState(e),P.migrateState(e),n=e.type,o=e.id,s=e.state,a=i?e.zorder:this._newZOrderForLineTool(),r(g(n),"invalid data source type:"+n+" (expected to be a Line Tool)"),l=null,v(n)){if(h=(e=(l=this._model.studyVersioning()).patchPointsBasedStudyState(e)).metaInfo,Object.assign(h,k.parseIdString(h.fullId)),!t&&(d=h.productId,!pro.hasPackage(d)))return(_=new p(this._model,e,h.shortDescription)).setId(o),this._addSourceToCollections(_),void 0!==a&&_.setZorder(a),_.setStatus(window.t("not authorized")),void _.setFailed(!0);S=l.updateMetaInfo(h),u=y(n,h,C=S||h,s,l),t?u.merge({fixedSize:!1}):u.merge({fixedSize:!0}),c=f(n,this._model,u,C)}else u=m(n,s),t?u.merge({fixedSize:!1}):u.merge({fixedSize:!0}),c=new TradingView[n](this._model,u,!0);return c.setId(o),c.linkKey=e.linkKey,(T=e.alertId)&&"function"==typeof c.setAlert&&E.enabled("alerts")&&!this._model.readOnly()&&!this._model.isJustClonedChart()&&c.setAlert(T,{noChartSave:!0}),x=(x=e.indexes?e.indexes:[]).slice(0,e.points.length),c.isFixed()?c.restorePositionPercents(e.positionPercents):c.restorePoints(e.points,x,t),c instanceof b||c instanceof w||c instanceof V||c instanceof B||c instanceof D?c.restoreData(e):t&&c.restoreData&&(I=e,l&&(I.graphics=l.patchPointsBasedStudyData(I.metaInfo,I.graphics)),c.restoreData(I)),(L=null==e.version?1:e.version)!==(M=null==c.version?1:c.version)&&"function"==typeof c.migrateVersion&&c.migrateVersion(L,M,{pane:this,model:this._model,properties:u}),this._addSourceToCollections(c),delete this._cachedOrderedSoruces,delete this._cachedHitTestSources,void 0!==a&&c.setZorder(a),c},F.prototype._restoreSpecialSource=function(e,t){var i,n=TradingView[e.type];n&&n.createFromState&&(i=n.createFromState(e,t,this._model))&&(i.setId(e.id),this._addSourceToCollections(i),i.zorder&&i.setZorder(i.zorder))},h.prototype.studyTemplate=function(e){var t,i,n,o,r={panes:[]};for(t=0;t<this.panes().length;t++)i=!0,n=!1,o=!0,r.panes.push(this.panes()[t].state(i,n,o));return e&&(r.interval=this.mainSeries().interval()),r.version=h.version,r},h.prototype.theme=function(){var e={};return e.chartProperties={paneProperties:this.properties().paneProperties.state(),scalesProperties:this.properties().scalesProperties.state()},e.mainSourceProperties=this.mainSeries().state().state,delete e.mainSourceProperties.symbol,delete e.mainSourceProperties.interval,delete e.chartProperties.paneProperties.topMargin,delete e.chartProperties.paneProperties.bottomMargin,e.version=h.version,e},h.prototype.restoreTheme=function(e,t,i){var n,o,r={hollowCandle:{related:"candle"}};for(n in r)e.mainSourceProperties[n+"Style"]||(o=e.mainSourceProperties[r[n].related+"Style"],e.mainSourceProperties[n+"Style"]=TradingView.clone(o));this._undoModel.chartLoadTheme(this,e,t,i)},h.prototype.preferences=function(){return U(this,this.mainSeries())},o=function(){function e(n){var o=t.indexOf(n);return~o?i[o]:this instanceof e?(this._source=n,
this._studies={},this._deferreds={},t.push(n),void i.push(this)):new e(n)}var t=[],i=[];return e.prototype.add=function(e,t){this._deferreds[e]&&(this._deferreds[e].resolve(t),delete this._deferreds[e]),this._studies[e]=t},e.prototype.get=function(e){return this._studies[e]?Promise.resolve(this._studies[e]):(this._deferreds[e]||(this._deferreds[e]=j()),this._deferreds[e].promise)},e.prototype.reset=function(){var e=t.indexOf(this._source);~e&&(t.splice(e,1),i.splice(e,1))},e}(),e.exports=h},ObRt:function(e,t,i){"use strict";function n(e,t){if(o(e))throw new Error("Service already registered");l[e.id]=t;var i=c.get(e.id);void 0!==i&&(c.delete(e.id),i.resolve(t))}function o(e){return void 0!==l[e.id]}function r(e){var t=l[e.id];if(void 0===t)throw new Error("ServiceLocator: Service "+e.id+" not found");return t}function s(e){if(o(e))return Promise.resolve(r(e));var t=c.get(e.id);return void 0===t&&(t=Object(a.createDeferredPromise)(),c.set(e.id,t)),t.promise}var a,l,c;i.d(t,"b",function(){return n}),i.d(t,"a",function(){return o}),i.d(t,"c",function(){return r}),i.d(t,"d",function(){return s}),a=i("jofe"),l={},c=new Map},Ocx9:function(e,t,i){"use strict";(function(e){function n(e,t,i,n){var r=e?s.defaults:s.factoryDefaults,a=t.startsWith("study_")?TradingView.clone(r("study")):{},l=TradingView.clone(r(t,n));return t.startsWith("study_")&&l.inputs&&delete l.inputs.symbol,"linetoolicon"===t&&e&&(l.icon=s.defaults(t).icon),l=o(l,i),TradingView.merge(a,l),a}function o(e,t){var i,n={};for(i in e)t.indexOf(i)<0&&(n[i]=e[i]);return n}function r(t,i,o,s){var l;void 0===s&&(s=!0),this._defaultName=t,o?l=i:(l=n(s,t,[],null),i&&TradingView.merge(l,i)),a.call(this,l),this._defaultName=t,this._useUserPreferences=s,this.listeners().subscribe(this,r.prototype.onPropertyChanged),this._exclusions=[],this._restoreFactoryDefaultsEvent=new e}var s=i("wZIs"),a=i("tc+8");inherit(r,a),r._saveDefaults=!1,r.prototype.preferences=function(){return this.state(this._exclusions)},r.prototype.mergePreferences=function(e){this.mergeAndFire(o(e,this._exclusions))},r.prototype.addExclusion=function(e){this._exclusions.indexOf(e)<0&&this._exclusions.push(e)},r.prototype.restoreFactoryDefaults=function(){var e=n(!1,this._defaultName,this._exclusions,null);this.mergeAndFire(e),this._defaultName.startsWith("study_")||this.saveDefaults(),this._restoreFactoryDefaultsEvent.fire()},r.prototype.onRestoreFactoryDefaults=function(){return this._restoreFactoryDefaultsEvent},r.prototype.onPropertyChanged=function(){r._saveDefaults&&!this._defaultName.startsWith("study_")&&this.saveDefaults()},r.prototype.saveDefaults=function(){this._useUserPreferences&&s.saveDefaults(this._defaultName,this.preferences())},r.prototype.clone=function(e){var t,i=new r(this._defaultName,this.state(),e&&e.replaceByState,this._useUserPreferences);for(t=0;t<this._exclusions.length;++t)i.addExclusion(this._exclusions[t]);return i},t.DefaultProperty=r,t.saveDefaultProperties=function(e){r._saveDefaults=e}}).call(this,i("aIyQ"))},Ofm5:function(e,t,i){"use strict";var n=function(){
function e(e,t,i){return e+","+t+","+i}var t={},n=i("ocLq"),o=i("IDnv").extrapolateBarsFrontByCount,r=i("IDnv").extrapolateBarsFrontToTime,s=i("Y7w9").lowerbound_int,a=function(e,t,i){this._chartApiMessager=e,this._lastRealBarTime=null,this._lastRealBarIndex=null,this._resolution=t,this._extrapolatedBarsCache=[],this._onReadyCallbacks=[],this._requestedAmountOfBars=0,this._maxDepth=i||100};return a.prototype.ready=function(){return null!==this._lastRealBarIndex},a.prototype.rebuild=function(e,t){this._lastRealBarTime=e;var i=Math.max(this._extrapolatedBarsCache.length,this._requestedAmountOfBars);this._extrapolatedBarsCache=[],this.ensureExtrapolatedToBar(t,i)},a.prototype.historyExtrapolator=function(){return void 0===this._historyExtrapolator&&(this._historyExtrapolator=new a(null,this._resolution,Math.max(this._maxDepth,1500))),this._historyExtrapolator},a.prototype.getPointTimeUTC=function(e,t,i){if(0===t)return e;if(!this.ready()||e<this._lastRealBarTime/1e3)return this.historyExtrapolator().setLastBarTime(0,1e3*e),this.historyExtrapolator().getPointTimeUTC(e,t,i);var n=this.getOffsetSinceLastRealBar(i,e,t);return this.ensureExtrapolatedToBar(i,n+1),this._extrapolatedBarsCache[n]},a.prototype.findDistanceInBars=function(e,t,i){return e===t?0:(this.historyExtrapolator().setLastBarTime(0,1e3*e),this.historyExtrapolator().indexOfBar(t,i))},a.prototype.indexOfBar=function(e,t){this._ensureExtrapolatedToTime(t,1e3*e);var i=s(this._extrapolatedBarsCache,e);return i===this._extrapolatedBarsCache.length?-1:this._lastRealBarIndex+i+1},a.prototype._extrapolateData=function(e,t){var i,n,o;if(!this._lastRealBarTime)throw Error("No real bars known, so cannot extrapolate anything");if((i=t(this._lastRealBarTime))&&0!==i.length){for(n=0;n<i.length;++n)i[n]=i[n]/1e3;for(i[0]===this._lastRealBarTime/1e3&&(i=i.slice(1)),this._extrapolatedBarsCache=i,(o=i.slice(0)).sort(),n=0;n<o.length-1;++n)o[n]===o[n+1]&&console.error("Duplicating extrapolated bars: duplicated "+new Date(1e3*o[n]));null!==this._lastRealBarIndex&&null!==this._chartApiMessager&&this._chartApiMessager.onTickmarksUpdated(this._lastRealBarIndex+1,i,e,this._resolution)}},a.prototype.onTickmarksNeeded=function(e,t){if(this.ready())this.ensureExtrapolatedToBar(e,t);else{var i=this;this._onReadyCallbacks.push(function(){i.ensureExtrapolatedToBar(e,t)})}},a.prototype.ensureExtrapolatedTo=function(e,t,i){this.ensureExtrapolatedToBar(e,this.getOffsetSinceLastRealBar(e,t,i)+1)},a.prototype.getOffsetSinceLastRealBar=function(e,t,i){var n=0===this._extrapolatedBarsCache.length||t===this._lastRealBarTime/1e3,o=n?-1:this.indexOfBar(t,e)-this._lastRealBarIndex-1;return o+i},a.prototype.ensureExtrapolatedToBar=function(e,t){var i=this;return this._requestedAmountOfBars=t,this._extrapolateData(e,function(n){return i._extrapolatedBarsCache.length>=t||!i._shouldExtrapolateMore()?null:o(i.newBarBuilder(e),n,t,!0).times})},a.prototype._ensureExtrapolatedToTime=function(e,t){var i=this;return this._extrapolateData(e,function(n){var o,s
;return n>=t||!i._shouldExtrapolateMore()?null:(o=2e3,(s=r(i.newBarBuilder(e),n,t,o,!0)).times[s.length-1]<t&&console.warn("Extrapolation error: not enough data created"),s.times)})},a.prototype.newBarBuilder=function(e){var t=n.Symbol.newSession(e);return n.Symbol.newBarBuilder(this._resolution,t)},a.prototype._shouldExtrapolateMore=function(){return this._extrapolatedBarsCache.length<this._maxDepth},a.prototype.setLastBarTime=function(e,t){(null===this._lastRealBarIndex||this._lastRealBarIndex===e&&this._lastRealBarTime!==t)&&(this._extrapolatedBarsCache=[]),this._extrapolatedBarsCache&&this._extrapolatedBarsCache.length&&this._lastRealBarIndex!==e&&(this._lastRealBarIndex>e?this._extrapolatedBarsCache=[]:this._lastRealBarTime!==t&&this._extrapolatedBarsCache.shift(e-this._lastRealBarIndex)),this._lastRealBarIndex=e,this._lastRealBarTime=t;for(var i=0;i<this._onReadyCallbacks.length;++i)this._onReadyCallbacks[i]();this._onReadyCallbacks=[]},{remove:function(i,n,o){delete t[e(i,n,o)]},storage:function(i,o,r){var s=n.Symbol.parsePeriod(r),l=e(i,o,s.pureResolution);return t[l]?t[l]:function(e){return"undefined"!=typeof TradingView&&TradingView.ChartapiMessagerInstances?t[e]=new a(TradingView.ChartapiMessagerInstances[i],s.pureResolution):t[e]=new a(null,s.pureResolution),t[e]}(l)}}}();e.exports=n},OiSa:function(e,t,i){"use strict";var n,o,r,s,a,l,c;i.r(t),i.d(t,"isDrawingToolbarVisible",function(){return c}),n=i("Vdly"),o=i("Kxc7"),r=i("hY0g"),s=i.n(r),a=!o.enabled("hide_left_toolbar_by_default"),l=n.getBool("ChartDrawingToolbarWidget.visible",a),c=new s.a(l)},OsWk:function(e,t){
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15" width="15" height="15" fill="none"><path d="M3.00004 7.50008C3.00004 6.25729 3.50318 5.13298 4.31807 4.31809L3.61097 3.61098C2.6162 4.60574 2.00004 5.98143 2.00004 7.50008H3.00004ZM4.31807 4.31809C5.13296 3.50321 6.25727 3.00008 7.50004 3.00008V2.00008C5.98141 2.00008 4.60572 2.61623 3.61097 3.61098L4.31807 4.31809ZM4.31808 3.61098L2.55033 1.84323L1.84322 2.55033L3.61097 4.31809L4.31808 3.61098ZM7.50004 3.00008C8.74283 3.00008 9.86715 3.50321 10.682 4.31811L11.3891 3.611C10.3944 2.61624 9.01869 2.00008 7.50004 2.00008V3.00008ZM10.682 4.31811C11.4969 5.13299 12 6.2573 12 7.50008H13C13 5.98144 12.3839 4.60576 11.3891 3.611L10.682 4.31811ZM11.3891 4.31811L13.1569 2.55033L12.4498 1.84322L10.682 3.611L11.3891 4.31811ZM12 7.50008C12 8.74285 11.4969 9.86716 10.682 10.682L11.3891 11.3892C12.3839 10.3944 13 9.01872 13 7.50008H12ZM10.682 10.682C9.86715 11.4969 8.74283 12.0001 7.50004 12.0001V13.0001C9.01869 13.0001 10.3944 12.3839 11.3891 11.3892L10.682 10.682ZM10.682 11.3892L12.4498 13.1569L13.1569 12.4498L11.3891 10.682L10.682 11.3892ZM7.50004 12.0001C6.25727 12.0001 5.13296 11.497 4.31807 10.6821L3.61097 11.3892C4.60572 12.3839 5.98141 13.0001 7.50004 13.0001V12.0001ZM4.31807 10.6821C3.50318 9.86718 3.00004 8.74286 3.00004 7.50008H2.00004C2.00004 9.01873 2.6162 10.3944 3.61097 11.3892L4.31807 10.6821ZM2.55033 13.1569L4.31808 11.3892L3.61097 10.6821L1.84322 12.4498L2.55033 13.1569ZM8.00004 2.50007L8 -8.77353e-06L7 8.77353e-06L7.00004 2.50009L8.00004 2.50007ZM12.5001 8.00008L15 8L15 7L12.5 7.00008L12.5001 8.00008ZM2.50006 7.00008L1.564e-05 7L-1.564e-05 8L2.50003 8.00008L2.50006 7.00008ZM7.00004 12.5001L7 15L8 15L8.00004 12.5001L7.00004 12.5001Z"/></svg>'},Owlf:function(e,t,i){"use strict";i.d(t,"a",function(){return n});var n="large"},"P+Pi":function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"PaneRendererFlagShape",function(){return s}),n=i("mrSG"),o=i("2WC2"),r=3,s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._drawItemShape=function(e,t){var i=t.width,n=t.height,o=n/2,s=(i-r)/3,a=t.x-i/2,l=t.vertOffset,c=t.y-o+l;e.moveTo(a,c),e.lineTo(a+r,c),e.bezierCurveTo(a+s,c-s,a+2*s,c+s,a+i,c),e.lineTo(a+i,c+o),e.bezierCurveTo(a+i-s,c+o+s,a+i-2*s,c+o-s,a+r,c+o),e.lineTo(a+r,c+n),e.lineTo(a,c+n),e.lineTo(a,c)},t}(o.a)},PC8g:function(e,t,i){"use strict";var n,o,r,s,a,l,c;i.r(t),i.d(t,"trackEvent",function(){return c}),n=i("FQhm"),o=i("Kxc7"),r=i("uOxu"),s=Object(r.getLogger)("Common.TrackEvent"),a=[/Study_(Drawing)_(.*)/,/(Study)_(.*)@tv-basicstudies/,/(Study)_(.*)/,/(Chart Style) (.*)/],l=function(e,t,i){var o,r,s;for(t=t||e||i||"",o="",r=0;r<a.length;r++)if((s=t.match(a[r]))&&3===s.length){t=s[1],o=s[2];break}Object(n.emit)(t.toLowerCase().replace(" ","_"),{category:e,label:i,value:o})},c=function(e,t,i){var n,r,a;o.enabled("charting_library_base")?l(e,t,i):(n=(e?e+":":"")+t,i&&(n+=" "+i),s.logNormal(n),o.enabled("widget")||(r=window._gaq,window._UNIT_TESTS||void 0===r||(a=["_trackEvent",e,t],
void 0!==i&&a.push(i),r.push(a))))},"undefined"!=typeof window&&(window.TradingView=window.TradingView||{},window.TradingView.trackEvent=c)},PF2b:function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"PaneRendererTriangleApexUp",function(){return r}),i.d(t,"PaneRendererTriangleApexDown",function(){return s}),n=i("mrSG"),o=i("2WC2"),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._drawItemShape=function(e,t){var i=t.width,n=t.height,o=Math.round(n/3),r=t.x,s=t.vertOffset,a=s-2*o,l=t.y+a;e.moveTo(r,l),e.lineTo(r+i/2,l+n),e.lineTo(r-i/2,l+n),e.lineTo(r,l)},t}(o.a),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._drawItemShape=function(e,t){var i=t.width,n=t.height,o=Math.round(n/3),r=t.x-i/2,s=t.vertOffset-o,a=t.y+s;e.moveTo(r,a),e.lineTo(r+i,a),e.lineTo(r+i/2,a+n),e.lineTo(r,a)},t}(o.a)},PFI7:function(e,t,i){"use strict";function n(e){var t="attachEvent"in document,i=t?"complete"===document.readyState:"loading"!==document.readyState;i?e():document.addEventListener("DOMContentLoaded",function(){return e()})}function o(e){return e.offsetWidth+s<e.scrollWidth}var r,s;i.r(t),r=i("glKZ"),new Promise(n),s=/\b(msie|trident)\b/i.test(navigator.userAgent)?1:0,n(function(){document.addEventListener("mouseenter",function(e){var t,i=e.target;i instanceof HTMLElement&&i.matches(".apply-overflow-title")&&((t=i).getAttribute("title")||t.offsetWidth+s>=t.scrollWidth||t.setAttribute("title",t.textContent||""))},!0),document.addEventListener("mouseenter",function(e){var t,i,n,s,a,l,c=e.target;if(c instanceof HTMLElement&&c.matches(".apply-overflow-tooltip")){if(c.matches(".apply-overflow-tooltip--check-children")){for(t=!1,i=c.children,n=0;n<i.length;n++)if((s=i[n])instanceof HTMLElement&&o(s)){t=!0;break}if(!t)return}else if(!o(c))return;a="",a=c.matches&&c.matches(".apply-overflow-tooltip--allow-text")?c.textContent||"":Array.from(c.childNodes).reduce(function(e,t){return t.nodeType===Node.TEXT_NODE&&e.push(t.textContent||""),e},[]).join("").trim(),Object(r.showOnElement)(c,{text:a}),l=function(){Object(r.hide)(),["mouseleave","mousedown"].forEach(function(e){return c.removeEventListener(e,l)})},["mouseleave","mousedown"].forEach(function(e){return c.addEventListener(e,l)})}},!0)})},PT1i:function(e,t,i){"use strict";function n(e,t){return null===e&&null===t||null!==e&&null!==t&&e.res===t.res&&e.val===t.val}var o,r,s,a,l,c,u,h,d,p,_;i.r(t),i.d(t,"Linking",function(){return p}),i.d(t,"linking",function(){return _}),o=i("hY0g"),r=i.n(o),s=i("Kxc7"),a=i("JOqt"),l=i("uOxu"),c=Object(l.getLogger)("Linking"),u=2e3,h=100,function(e){e[e.NotBound=0]="NotBound",e[e.BoundToWidget=1]="BoundToWidget",e[e.BoundToModel=2]="BoundToModel"}(d||(d={})),p=function(){function e(){this._watchedSymbol=new r.a,this._seriesShortSymbol=new r.a,this._proSymbol=new r.a,this._watchedInterval=new r.a,this._watchedTimeFrame=new r.a(null),this._watchedIntraday=new r.a,this._watchedSupportedResolutions=new r.a,
this._symbolNamesList=new r.a,this._chartWidgetBindingState=d.NotBound,this._activeChartWidget=null,this._watchedSymbolListenerBound=this._watchedSymbolListener.bind(this),this._watchedIntervalListenerBound=this._watchedIntervalListener.bind(this),this._watchedTimeFrameListenerBound=this._watchedTimeFrameListener.bind(this),this._onSymbolLinkBound=this._onSymbolLink.bind(this),this._searchCharts=null,this._searchChartsLoadDebounced=null,this._selfEmit=!1,this._preventFeedBySymbol=!1,this._feedBySymbolDebounceCounter=0}return Object.defineProperty(e.prototype,"symbol",{get:function(){return this._watchedSymbol},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"proSymbol",{get:function(){return this._proSymbol},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"symbolNamesList",{get:function(){return this._symbolNamesList},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"seriesShortSymbol",{get:function(){return this._seriesShortSymbol.readonly()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"interval",{get:function(){return this._watchedInterval},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"timeFrame",{get:function(){return this._watchedTimeFrame},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"intraday",{get:function(){return this._watchedIntraday.readonly()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"supportedResolutions",{get:function(){return this._watchedSupportedResolutions.readonly()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"preventFeedBySymbol",{get:function(){return this._preventFeedBySymbol},enumerable:!0,configurable:!0}),e.prototype.bindToChartWidget=function(e){var t,i;this.unbindFromChartWidget(),this._activeChartWidget=e,(t=e.model())?this._onChartModelCreated(t):(e.modelCreated().subscribe(this,this._onChartModelCreated),this._chartWidgetBindingState=d.BoundToWidget,i=e.properties().mainSeriesProperties,this._watchedSymbol.setValue(i.symbol.value()),this._watchedInterval.setValue(i.interval.value()))},e.prototype.unbindFromChartWidget=function(){switch(this._chartWidgetBindingState){case d.BoundToWidget:if(!this._activeChartWidget)throw new Error("ChartWidget is undefined");this._activeChartWidget.modelCreated().unsubscribe(this,this._onChartModelCreated);break;case d.BoundToModel:this._symbolProperty().unsubscribe(this,this._onSymbolPropertyChange),this._watchedSymbol.unsubscribe(this._watchedSymbolListenerBound),this._mainSeries().dataEvents().symbolResolved().unsubscribe(this,this._updateSeriesSymbolInfo),this._mainSeries().dataEvents().symbolError().unsubscribe(this,this._updateSeriesSymbolInfo),this._intervalProperty().unsubscribe(this,this._onIntervalPropertyChange),this._watchedInterval.unsubscribe(this._watchedIntervalListenerBound),this._timeFrameProperty().unsubscribe(this,this._onIntervalPropertyChange),this._watchedTimeFrame.unsubscribe(this._watchedTimeFrameListenerBound),delete this._watchedSymbol.hook,
delete this._watchedSymbol.writeLock}this._activeChartWidget=null,this._chartWidgetBindingState=d.NotBound},e.prototype.getChartWidget=function(){return this._activeChartWidget},e.prototype.bindToChartWidgetCollection=function(e){var t=this;this._chartWidgetCollection=e,this.unbindFromChartWidget(),e.activeChartWidget.subscribe(function(e){t.unbindFromChartWidget(),t.bindToChartWidget(e)},{callWithLast:!0})},e.prototype.bindToSearchCharts=function(e){var t=this;this.unbindFromSearchCharts(),this._searchCharts=e,e.onSearchBySymbol.subscribe(this,this._onSearchBySymbol),e.loadingSymbol.subscribe(function(e){!1===e&&(t._feedBySymbolDebounceCounter=0)}),this._watchedSymbol.subscribe(this._onSymbolLinkBound)},e.prototype.unbindFromSearchCharts=function(){this._searchCharts&&(this._searchCharts.onSearchBySymbol.unsubscribe(this,this._onSearchBySymbol),this._watchedSymbol.unsubscribe(this._onSymbolLinkBound),this._searchCharts=null)},e.prototype.setPreventFeedBySymbol=function(e){this._preventFeedBySymbol=e},e.prototype._onSearchBySymbol=function(e){if(!e.resolved_symbol)throw new Error("no resolved_symbol");this._selfEmit=!0,this._watchedSymbol.setValue(e.resolved_symbol),this._selfEmit=!1},e.prototype._onSymbolLink=function(e){if(!this._selfEmit){if(!this._searchCharts){var t="No search charts defined";throw c.logError(t),new Error(t)}this._preventFeedBySymbol||this._loadSearchCharts(e)}},e.prototype._loadSearchCharts=function(e){var t,i,n=this;if(!this._searchCharts)throw t="No search charts defined",c.logError(t),new Error(t);this._searchChartsLoadDebounced?this._feedBySymbolDebounceCounter<h&&(this._feedBySymbolDebounceCounter++,this._searchChartsLoadDebounced(e)):(i=function(e){return n._searchCharts?(!0===n._searchCharts.loadingSymbol.value()?n._feedBySymbolDebounceCounter<h&&(n._feedBySymbolDebounceCounter++,n._searchChartsLoadDebounced=Object(a.debounce)(i,u),n._searchChartsLoadDebounced(e)):n._searchChartsLoadDebounced=null,n._searchCharts.feedBySymbol.call(n._searchCharts,e)):function(){}},!0===this._searchCharts.loadingSymbol.value()?this._feedBySymbolDebounceCounter<h&&(this._feedBySymbolDebounceCounter++,this._searchChartsLoadDebounced=Object(a.debounce)(i,u),this._searchChartsLoadDebounced(e)):this._searchCharts.feedBySymbol(e))},e.prototype._mainSeries=function(){if(!this._activeChartWidget)throw new Error("ChartWidget is undefined");return this._activeChartWidget.model().mainSeries()},e.prototype._properties=function(){return this._mainSeries().properties()},e.prototype._symbolProperty=function(){return this._properties().symbol},e.prototype._intervalProperty=function(){return this._properties().interval},e.prototype._timeFrameProperty=function(){if(!this._activeChartWidget)throw new Error("ChartWidget is undefined");return this._activeChartWidget.model().model().appliedTimeFrame()},e.prototype._watchedSymbolListener=function(e){(s.enabled("same_data_requery")||this._symbolProperty().value()!==e)&&this._chartWidgetCollection.setSymbol(e)},e.prototype._sendSnowplowAnalytics=function(){
if(!window.user.do_not_track)throw new Error("unsupported")},e.prototype._onSymbolPropertyChange=function(){var e=this._symbolProperty().value()!==this._watchedSymbol.value();this._watchedSymbol.setValue(this._symbolProperty().value()),e&&this._chartWidgetCollection.setSymbol(this._symbolProperty().value())},e.prototype._onSymbolResolved=function(e){var t=this._mainSeries().symbolInfo();t&&this._applyValuesFromSymbolInfo(t)},e.prototype._applyValuesFromSymbolInfo=function(e){var t=e.pro_name||s.enabled("trading_terminal")&&(e.full_name||e.name)||"";this._proSymbol.setValue(t),e.aliases&&this._symbolNamesList.setValue(e.aliases)},e.prototype._updateSeriesSymbolInfo=function(){this._seriesShortSymbol.setValue(this._properties().shortName.value());var e=this._mainSeries().symbolInfo();e?(this._applyValuesFromSymbolInfo(e),e.hasOwnProperty("supported_resolutions")?this._watchedSupportedResolutions.setValue(e.supported_resolutions):this._watchedSupportedResolutions.setValue(void 0),this._watchedIntraday.setValue(!!e.has_intraday)):(this._watchedIntraday.deleteValue(),this._proSymbol.deleteValue())},e.prototype._watchedIntervalListener=function(e){(s.enabled("same_data_requery")||this._intervalProperty().value()!==e)&&this._chartWidgetCollection.setResolution(e)},e.prototype._onIntervalPropertyChange=function(){var e=this._intervalProperty().value()!==this._watchedInterval.value();this._watchedInterval.setValue(this._intervalProperty().value()),e&&this._chartWidgetCollection.setResolution(this._intervalProperty().value())},e.prototype._watchedTimeFrameListener=function(e){n(this._timeFrameProperty().state(),e)||this._chartWidgetCollection.setTimeFrame(e)},e.prototype._onTimeFramePropertyChange=function(){var e=!n(this._timeFrameProperty().state(),this._watchedTimeFrame.value());this._watchedTimeFrame.setValue(this._timeFrameProperty().state()),e&&this._chartWidgetCollection.setTimeFrame(this._timeFrameProperty().state())},e.prototype._onChartModelCreated=function(e){var t,i,n,o;if(!this._activeChartWidget)throw new Error("ChartWidget is undefined");this._chartWidgetBindingState=d.BoundToModel,this._activeChartWidget.modelCreated().unsubscribe(this,this._onChartModelCreated),(t=this._symbolProperty()).subscribe(this,this._onSymbolPropertyChange),this._watchedSymbol.setValue(t.value()),this._watchedSymbol.subscribe(this._watchedSymbolListenerBound),(i=this._mainSeries()).dataEvents().symbolResolved().subscribe(this,this._onSymbolResolved),this._watchedSymbol.hook=function(e){return i.symbolSameAsCurrent(e)&&(e=i.symbol()),e},i.dataEvents().symbolResolved().subscribe(this,this._updateSeriesSymbolInfo),i.dataEvents().symbolError().subscribe(this,this._updateSeriesSymbolInfo),i.dataEvents().symbolNotPermitted().subscribe(this,this._updateSeriesSymbolInfo),i.dataEvents().symbolGroupNotPermitted().subscribe(this,this._updateSeriesSymbolInfo),i.dataEvents().extendedHoursNotPermitted().subscribe(this,this._updateSeriesSymbolInfo),this._updateSeriesSymbolInfo(),
(n=this._intervalProperty()).subscribe(this,this._onIntervalPropertyChange),this._watchedInterval.setValue(n.value()),this._watchedInterval.subscribe(this._watchedIntervalListenerBound),(o=this._timeFrameProperty()).subscribe(this,this._onTimeFramePropertyChange),this._watchedTimeFrame.setValue(o.state()),this._watchedTimeFrame.subscribe(this._watchedTimeFrameListenerBound),this._activeChartWidget.readOnly()&&(this._watchedSymbol.writeLock=!0)},e}(),window.TradingView=window.TradingView||{},_=new p,window.TradingView.Linking=_},PYn8:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolThreeDrivers";var r=t||n.createProperties();o.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("S6aM").LineToolThreeDrivesPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=window.t("Three Drives Pattern");inherit(n,o),n.prototype.pointsCount=function(){return 7},n.prototype.title=function(){return a},n.prototype.name=function(){return"Three Drives Pattern"},n.prototype.getStylesPropertyPage=function(){return s.LineToolABCDPatternStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("y4pE").AbcdPatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new r("linetoolthreedrivers",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolThreeDrivers=n},PgQx:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><g fill="none" fill-rule="evenodd"><path stroke="currentColor" d="M7.5 8.5h12v12a3 3 0 0 1-3 3h-6a3 3 0 0 1-3-3v-12z"/><path fill="currentColor" d="M17 6l-1-1h-5l-1 1H7v1h13V6z"/><path stroke="currentColor" stroke-linecap="square" d="M10.5 11.5v8m3-8v8m3-8v8"/></g></svg>'},PoSe:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,i){var n,o,r,s,a=null,l=0;return i=i||{},s=function(){l=!1===i.leading?0:Date.now(),a=null,r=e.apply(n,o),a||(n=o=null)},function(){var c,u=Date.now();return l||!1!==i.leading||(l=u),n=this,o=arguments,(c=t-(u-l))<=0||c>t?(a&&(clearTimeout(a),a=null),l=u,r=e.apply(n,o),a||(n=o=null)):a||!1===i.trailing||(a=setTimeout(s,c)),r}},e.exports=t.default},Q19o:function(e,t,i){"use strict";(function(t,n,o){function r(e,t){return t.map(function(t){return e.dataSourceForId(t)})}function s(e,t){var i=o.utc_to_cal(t.timezone,1e3*e),n=t.spec.correctTradingDay(i);return o.set_hms(n,0,0,0,0,b.get_timezone("Etc/UTC")),n.getTime()/1e3}
var a=i("Eyy1").ensureNotNull,l=i("jA0t"),c=i("9iCb").applyOverridesToStudy,u=i("0YCj"),h=i("5JMW"),d=h.LineDataSourceApi,p=h.isLineToolRiskReward,_=i("N1UO").StudyApi,f=i("ltKl").SeriesApi,m=i("QrSB").SelectionApi,y=i("mf9N").PaneApi,g=i("3mf1").availableIcons,v=i("IiTo"),S=i("LxhU").Interval,b=i("jCNj"),w=i("2jXJ").supportedLineTools,P=i("7MZv").showTooManyStudiesNotice,C=i("ogJP").isNumber,T=i("ogJP").inherit,x=i("vu5c").onSeriesCompletedOrErrorReceived,I=i("CW80").createLineToolProperties,L=i("96Yh"),M=L.lineToolEntityInfo,A=L.studyEntityInfo,k=i("lReN").LineToolsGroupControllerApi,E=i("FDyI").ChartWidgetApiBase,O=i("mMWL"),D=function(e,i){E.call(this,e),this._panes=new WeakMap,this._studies=new WeakMap,this._lineDataSources=new WeakMap,this._activateChart=i,this._selectionApi=null,this._visibleBarsChanged=new t,this._chartWidget.onAboutToBeDestroyed().subscribe(this,this._destroy,!0),this._chartWidget.withModel(this,function(){this._chartWidget.model().timeScale().visibleBarsStrictRangeChanged().subscribe(this,this._onVisibleBarsChanged)})};T(D,E),D.prototype._getPaneApi=function(e){var t=this._panes.get(e);return void 0===t&&(t=new y(e,this._chartWidget),this._panes.set(e,t)),t},D.prototype._getStudyApi=function(e){var t=this._studies.get(e);return void 0===t&&(t=new _(e,this._chartWidget.model()),this._studies.set(e,t)),t},D.prototype._getLineDataSourceApi=function(e){var t=this._lineDataSources.get(e);return void 0===t&&(t=new d(e,this._chartWidget.model().model(),{apiPointsToDataSource:this._convertUserPointsToDataSource.bind(this),dataSourcePointsToPriced:function(e){var t=this._chartWidget.model().mainSeries().syncModel(),i=this._chartWidget.model().timeScale();return e.map(function(e){var n=i.normalizeBarIndex(e.index);return{price:e.price,time:t.projectTime(n.time_t,n.offset)}})}.bind(this)}),this._lineDataSources.set(e,t)),t},D.prototype._makeSubscriptionFromDelegate=function(e){return{subscribe:e.subscribe.bind(e),unsubscribe:e.unsubscribe.bind(e),unsubscribeAll:e.unsubscribeAll.bind(e)}},D.prototype.executeActionById=function(e){this._chartWidget.executeActionById(e)},D.prototype.getCheckableActionState=function(e){return this._chartWidget.getCheckableActionState(e)},D.prototype.setZoomEnabled=function(e){this._chartWidget.model().model().setZoomEnabled(e)},D.prototype.setScrollEnabled=function(e){this._chartWidget.model().model().setScrollEnabled(e)},D.prototype.refreshMarks=function(){this._chartWidget.refreshMarks()},D.prototype.clearMarks=function(){this._chartWidget.clearMarks()},D.prototype.symbol=function(){return this._chartWidget.getSymbol()},D.prototype.symbolExt=function(){var e=this._chartWidget.model().mainSeries().symbolInfo();return e?{symbol:e.name,full_name:e.full_name,exchange:e.exchange,description:e.description,type:e.type}:null},D.prototype.resolution=function(){return this._chartWidget.model().mainSeries().properties().interval.value()},D.prototype.setSymbol=function(e,t){if(e!==this.symbol()||n.enabled("same_data_requery")){
var i=this._chartWidget.model().mainSeries().dataEvents();t&&x(i,function(e){e||t()}),this._activateChart(),this._chartWidget.setSymbol(e)}},D.prototype.resetData=function(){this._chartWidget.model().mainSeries().rerequestData()},D.prototype.setResolution=function(e,t){var i,n=S.normalize(e);null!==n&&n!==this.resolution()&&(i=this._chartWidget.model().mainSeries().dataEvents(),t&&x(i,function(e){e||t()}),this._activateChart(),this._chartWidget.setResolution(n))},D.prototype.setEntityVisibility=function(e,t){var i,n;console.warn("`setEntityVisibility` is deprecated. Use shape/study API instead"),(i=this._chartWidget.model().model().dataSourceForId(e))&&(n=i.properties())&&n.visible&&n.visible.setValue(t)},D.prototype.getAllStudies=function(){return this._chartWidget.model().model().allStudies().map(A)},D.prototype.availableZOrderOperations=function(e){var t=this._chartWidget.model().model(),i=r(t,e);return this._chartWidget.model().availableZOrderOperations(i)},D.prototype.sendToBack=function(e){var t=this._chartWidget.model().model(),i=r(t,e);this._chartWidget.model().sendToBack(i)},D.prototype.bringToFront=function(e){var t=this._chartWidget.model().model(),i=r(t,e);this._chartWidget.model().bringToFront(i)},D.prototype.insertAfter=function(e,t){var i=this._chartWidget.model().model(),n=r(i,e),o=i.dataSourceForId(t);this._chartWidget.model().insertAfter(n,o)},D.prototype.insertBefore=function(e,t){var i=this._chartWidget.model().model(),n=r(i,e),o=i.dataSourceForId(t);this._chartWidget.model().insertBefore(n,o)},D.prototype.bringForward=function(e){var t=r(this._chartWidget.model().model(),e);this._chartWidget.model().bringForward(t)},D.prototype.sendBackward=function(e){var t=r(this._chartWidget.model().model(),e);this._chartWidget.model().sendBackward(t)},D.prototype.showPropertiesDialog=function(e){var t=this._chartWidget.model().model().dataSourceForId(e);if(null===t)throw new Error("Study or shape "+e+" does not exist");this._chartWidget.showChartPropertiesForSource(t)},D.prototype.getAllShapes=function(){return this._chartWidget.model().model().allLineTools().map(M).filter(function(e){return null!==e.name})},D.prototype.removeAllShapes=function(){this._chartWidget.removeAllDrawingTools()},D.prototype.removeAllStudies=function(){this._chartWidget.removeAllStudies()},D.prototype.removeEntity=function(e){var t=this._chartWidget.model().chartModel().dataSourceForId(e);t?this._chartWidget.model().chartModel().removeSource(t,!0):console.warn("Can't find a source with id: "+e)},D.prototype.removeEntityWithUndo=function(e){var t=this._chartWidget.model().chartModel().dataSourceForId(e);this._chartWidget.model().removeSource(t,!1)},D.prototype.selection=function(){return null===this._selectionApi&&(this._selectionApi=new m(this._chartWidget.model().model())),this._selectionApi},D.prototype.createStudyTemplate=function(e){return this._chartWidget.model().model().studyTemplate(e.saveInterval)},D.prototype.drawOnAllCharts=function(e){O.drawOnAllCharts.setValue(e)},D.prototype.applyStudyTemplate=function(e){
this._chartWidget.model().applyStudyTemplate(e,""+1e3*Math.random())},D.prototype.setVisibleRange=function(e,t){var i,o,r,s,a,l,c;if(void 0!==e&&e.from&&e.to&&!isNaN(e.from)&&!isNaN(e.to))return i=this._chartWidget.model().model().mainSeries(),o=[parseInt(e.from),parseInt(e.to)],r=S.isDWM(i.interval())&&!n.enabled("disable_resolution_rebuild")?this._alignPoints(o):o,s=r[0],a=r[1],l=void 0!==t&&"function"==typeof t,c=new Promise(function(e){this._chartWidget.setVisibleTimeRange(s,a,l?{}:t,e)}.bind(this)),l&&(console.warn("setVisibleRange now returns a Promise object and don't accept callback as the last argument"),c.then(t)),c;console.warn("Wrong time range: "+JSON.stringify(e)+'. Expected an object with "from" and "to" numeric values.')},D.prototype._getSession=function(){var e=this._chartWidget.model().mainSeries(),t=e.symbolInfo();return new v.SessionInfo(t.timezone,t.session,t.holidays,t.corrections)},D.prototype.getVisibleRange=function(){var e,t,i,n,o,r,l={from:0,to:0},c=this._chartWidget.model().timeScale(),u=c.visibleBarsStrictRange();return null===u?l:null===(t=(e=this._chartWidget.model().mainSeries()).syncModel())?l:(i=a(e.data().last()),o=(n=u.lastBar()-i.index)<=0?c.indexToTimePoint(u.lastBar()):t.projectTime(i.value[TradingView.TIME_PLOT],n),l.from=+c.indexToTimePoint(Math.max(0,u.firstBar()))||0,l.to=+o||0,S.isDWM(e.interval())&&(r=this._getSession(),l.from=s(l.from,r),l.to=s(l.to,r)),l)},D.prototype.getTimeScaleLogicalRange=function(){return this._chartWidget.model().timeScale().logicalRange()},D.prototype.getVisiblePriceRange=function(){return console.warn("`getVisiblePriceRange` is deprecated. Use Price Scale API instead"),this._chartWidget.model().mainSeries()?this._chartWidget.model().mainSeries().priceScale().priceRangeInPrice():null},D.prototype.scrollPosition=function(){return this._chartWidget.model().timeScale().rightOffset()},D.prototype.defaultScrollPosition=function(){return this._chartWidget.model().timeScale().defaultRightOffsetProperty().value()},D.prototype._createTradingPrimitive=function(e,t){var i,n,o,r,s=this,l=this._chartWidget.model().model(),c=l.paneForSource(l.mainSeries()),u=t?l:this._chartWidget.model(),h=u.createLineTool(c,(i=TradingView.CLOSE_PLOT,n=a(s._chartWidget.model().mainSeries().bars().last()),o=n.index,r=n.value[i],{index:o,price:r}),e);return h._adapter},D.prototype.createOrderLine=function(e){e=e||{};return this._createTradingPrimitive("LineToolOrder",e.disableUndo)},D.prototype.createPositionLine=function(e){e=e||{};return this._createTradingPrimitive("LineToolPosition",e.disableUndo)},D.prototype.createExecutionShape=function(e){e=e||{};return this._createTradingPrimitive("LineToolExecution",e.disableUndo)},D.prototype.createShape=function(e,t){return this.createMultipointShape([e],t)},D.prototype._alignPoints=function(e){var t,i,n=this._chartWidget.model().model(),o=n.mainSeries();return n.timeScale().isEmpty()?e:(t=this._getSession(),null===(i=v.createDWMAligner(o.interval(),t))?e:e.map(function(e){return e?(i.moveTo(1e3*e),i.startOfBar(0)/1e3):e}))},
D.prototype._convertUserPointsToDataSource=function(e){var t,i,o,r,s,a,l,c,u,h,d,p,_,f=this._chartWidget.model().model(),m=f.mainSeries(),y=f.timeScale().points(),g=m.data();if(f.timeScale().isEmpty())return null;for(t=e.map(function(e){return e.time}),i=S.isDWM(m.interval())&&!n.enabled("disable_resolution_rebuild")?this._alignPoints(t):t,o=[],r=0;r<e.length;r++)s=e[r],o.push((a=i[r],l=s.price,c=s.channel,u=void 0,h=void 0,d=void 0,p=void 0,_=void 0,d=y.closestIndexLeft(a)||0,p={index:d},_=y.valueAt(d),a>_&&d===y.lastIndex()&&(u=m.syncModel().distance(_,a)).success&&(p.index=p.index+u.result),C(l)?p.price=l:((h=c?["open","high","low","close"].indexOf(c)+1:1)<=0&&(h=1),p.price=g.valueAt(d)[h]),p));return o},D.prototype.createMultipointShape=function(e,t,i){var n,o,r,s,a,l,c,u,h,d,_=t.disableUndo?this._chartWidget.model().model():this._chartWidget.model(),f=this._chartWidget.model().model(),m=f.mainSeries();if(!f.timeScale().isEmpty()){if(n=f.dataSourceForId(t.ownerStudyId)||m,o=f.paneForSource(n),r=this._convertUserPointsToDataSource(e),(s=w[t.shape]||w.flag).onlySelectable)throw new Error('Cannot create "'+t.shape+'" shape');if("LineToolPolyline"===s.name)r[0].price===r[r.length-1].price&&r[0].index===r[r.length-1].index||r.push(r[0]);else if("LineToolIcon"===s.name){if(t.icon=t.icon||t.overrides&&t.overrides.icon,!t.hasOwnProperty("icon"))throw new Error("icon must be specified in options");if(-1===g.indexOf(t.icon))throw new Error("icon value must be valid");t.overrides=t.overrides||{},t.overrides.icon=t.icon}if(a=I(s.name),t.overrides)for(l in t.overrides)a[l]?a[l].setValue(t.overrides[l]):p(s.name)&&-1!==["profitLevel","stopLevel"].indexOf(l)&&a.addProperty(l,t.overrides[l]);if(void 0!==a.text&&t.text&&a.text.setValue(t.text),c=_.createLineTool(o,r[0],s.name,a,void 0,n),p(s.name)){if(r.length>2)throw new Error("Wrong points count for "+t.shape+". Required 1 or 2");2===r.length&&(c.startChanging(1,r[1]),c.setPoint(1,r[1]),c.endChanging())}else{if((u=c.pointsCount())!==r.length&&-1!==u)throw new Error("Wrong points count for "+t.shape+". Required "+u);for(h=1;h<r.length&&this._chartWidget.model().lineBeingCreated();h++)_.coninueCreatingLine(r[h],null,h<r.length-1)}return t.lock&&c.setUserEditEnabled(!1),t.disableSelection&&(c.customization.disableSelection=!0),t.disableSave&&(c.customization.disableSave=!0),t.hasOwnProperty("showInObjectsTree")&&(c.customization.showInObjectsTree=t.showInObjectsTree),t.zOrder&&(d=this._chartWidget.model().availableZOrderOperations([c]),"top"===t.zOrder&&d.bringToFrontEnabled?_.bringToFront([c]):"bottom"===t.zOrder&&d.sendToBackEnabled&&_.sendToBack([c])),c.id()}},D.prototype.getShapeById=function(e){var t=this._chartWidget.model().model().getLineToolById(e);if(null===t)throw new Error("There is no such shape");return this._getLineDataSourceApi(t)},D.prototype.createStudy=function(e,t,i,n,o,r){var s,a,h;return"function"==typeof o?(console.warn('"createStudy" does not take "callback" parameter anymore'),
Promise.resolve(null)):(r=r||{}).checkLimit&&!this._chartWidget.model().canCreateStudy()?(P(),Promise.resolve(null)):(e=e.toLowerCase(),s=r.disableUndo?this._chartWidget.model().model():this._chartWidget.model(),a=u.findStudyMetaInfoByDescription(s.studiesMetaData(),e).id,(h=s.createStudyInserter({type:"java",studyId:a})).setForceOverlay(t),r.priceScale&&h.setPreferredPriceScale(function(e){switch(e){case"no-scale":return"overlay";case"as-series":return"as-series";case"new-left":return"left";case"new-right":return"right";default:throw new Error('The pricescale "'+e+'" is invalid, the only valid options are "no-scale", "as-series", "new-left" and "new-right".')}}(r.priceScale)),n&&(n=l.getStudyRecordFromArray([e].concat(n),this._chartWidget).inputs),h.insert(function(){return Promise.resolve(n||{})}).then(function(e){return o&&c(e,o),i&&e.setUserEditEnabled(!1),e.id()}))},D.prototype.getStudyById=function(e){var t=this._chartWidget.model().model().getStudyById(e);if(null===t)throw new Error("There is no such study");return this._getStudyApi(t)},D.prototype.getSeries=function(){var e=this._chartWidget.model().model(),t=e.mainSeries();return new f(t,e)},D.prototype.chartType=function(){return this._chartWidget.model().mainSeries().properties().style.value()},D.prototype.setChartType=function(e){this._chartWidget.model().mainSeries().properties().style.setValue(e)},D.prototype.priceFormatter=function(){return this._chartWidget.model().mainSeries().priceScale().formatter()},D.prototype.onDataLoaded=function(){return this._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().dataEvents().completed())},D.prototype.onSymbolChanged=function(){return this._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().dataEvents().symbolResolved())},D.prototype.onIntervalChanged=function(){return this._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().onIntervalChanged())},D.prototype.onVisibleRangeChanged=function(){return this._makeSubscriptionFromDelegate(this._visibleBarsChanged)},D.prototype.dataReady=function(e){var t=!this._chartWidget.model()||!this._chartWidget.model().mainSeries()||this._chartWidget.model().mainSeries().data().isEmpty();return e&&(t?this.onDataLoaded().subscribe(null,e,!0):e()),!t},D.prototype.crossHairMoved=function(e){this._makeSubscriptionFromDelegate(this._chartWidget.model().chartModel().crossHairMoved()).subscribe(null,e)},D.prototype._onVisibleBarsChanged=function(){var e=this._chartWidget.model().mainSeries(),t=e.data().isEmpty(),i=this._chartWidget.model().timeScale().visibleBarsStrictRange();null!==i&&t?e.dataEvents().completed().subscribe(this,this._onVisibleBarsChanged,!0):this._visibleBarsChanged.fire(this.getVisibleRange())},D.prototype._destroy=function(){var e=this._chartWidget.model();null!==e&&e.timeScale().visibleBarsStrictRangeChanged().unsubscribe(this,this._onVisibleBarsChanged)},D.prototype.setTimezone=function(e){this._chartWidget.setTimezone(e)},D.prototype.getTimezone=function(){return this._chartWidget.getTimezone()},
D.prototype.getPanes=function(){return this._chartWidget.model().chartModel().panes().map(function(e){return this._getPaneApi(e)},this)},D.prototype.canZoomOut=function(){return!this._chartWidget.model().zoomStack().isEmpty()},D.prototype.zoomOut=function(){this.canZoomOut()&&this._chartWidget.model().zoomFromViewport()},D.prototype.sessions=function(){return this._chartWidget.model().model().sessions()},D.prototype.shapesGroupController=function(){return new k(this._chartWidget.model().lineToolsGroupController(),this._chartWidget.model())},e.exports=D}).call(this,i("aIyQ"),i("Kxc7"),i("jCNj"))},QCyK:function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"spreadStudyItem",function(){return s}),n=i("mrSG"),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._doCalculation=function(e,t,i,n){return e*t-i*n},t}((o=i("7dm8")).a),s={name:"Spread",metainfo:{_metainfoVersion:15,defaults:o.b,plots:o.d,styles:o.e,description:"Spread",shortDescription:"Spread",is_price_study:!1,inputs:o.c,id:"Spread@tv-basicstudies-1"},constructor:r}},QFPC:function(e,t,i){"use strict";function n(e){function t(t,a){if(u)u.show(t,a?void 0:n);else if(a||!Boolean(r.getBool(c))){var l=s.tool.value();Promise.all([i.e("react"),i.e(70),i.e("touch-painting-hint")]).then(i.bind(null,"bCMn")).then(function(i){u=new i.TouchPaintingHintRenderer(Object(o.ensureNotNull)(e)),l===s.tool.value()&&u.show(t,a?void 0:n)})}}function n(){r.setValue(c,!0,{forceFlush:!0}),Object(o.ensureNotNull)(u).destroy()}var u=null;s.tool.subscribe(function(){var e=s.tool.value();Object(a.b)(e)&&"LineToolRegressionTrend"!==e&&!l.CheckMobile.any()?t(window.t("Click to set a point"),!0):l.CheckMobile.any()&&"LineToolBrush"!==e&&Object(a.a)(e)?t(window.t("Move the point to position the anchor then tap to place")):u&&u.hide()})}var o,r,s,a,l,c;i.r(t),i.d(t,"setupTouchPaintingHint",function(){return n}),o=i("Eyy1"),i("YFKU"),r=i("Vdly"),s=i("mMWL"),a=i("e92V"),l=i("qFKp"),c="hint.touchPainting"},QIuV:function(e,t,i){"use strict";function n(e,t){this.customization={forcePriceAxisLabel:!0,disableSelection:!0,disableErasing:!0},o.call(this,e,t)}var o=i("Ss5c").LineDataSource,r=i("ivNn").fixComputationError;inherit(n,o),n.POINTS_COUNT=1,n.prototype.pointsCount=function(){return n.POINTS_COUNT},n.prototype.hasContextMenu=function(){return!1},n.prototype.state=function(){return null},n.prototype.startMoving=function(){o.prototype.startMoving.apply(this,arguments),this._cursorMoved=!1},n.prototype.endMoving=function(){o.prototype.endMoving.apply(this,arguments),this._cursorMoved=!1},n.prototype.correctPoints=function(e){var t,i,n;for(this._currentMovingPoint&&this._startMovingPoint?this._currentMovingPoint.price-this._startMovingPoint.price&&(this._cursorMoved=!0):this._cursorMoved=!1,t=1/this.priceScale().mainSource().base(),i=0;i<e.length;i++)n=e[i],this._cursorMoved&&(n.price=this._currentMovingPoint.price),n.price=r(t*Math.round(n.price/t)),e[i]=n},n.prototype.userEditEnabled=function(){return!0},
n.prototype.movable=function(){return!1},n.prototype.canBeHidden=function(){return!1},n.prototype.isUserDeletable=function(){return!1},n.prototype.showInObjectTree=function(){return!1},n.prototype.getInputsPropertyPage=function(){return null},n.prototype.doesMovingAffectsUndo=function(){return!1},n.prototype.isAvailableInFloatingWidget=function(){return!1},n.prototype.timeAxisViews=function(){return null},n.prototype.cloneable=function(){return!1},n.prototype.copiable=function(){return!1},n._configureProperties=function(e){o._configureProperties(e)},e.exports=n},QQu0:function(e,t,i){"use strict";function n(e,t){var i=t||n.createProperties();o.call(this,e,i),this._constructor="LineToolArrow"}var o=i("WPQD").LineToolTrendLine,r=i("Ocx9").DefaultProperty,s=window.t("Arrow");inherit(n,o),n.prototype.title=function(){return s},n.prototype.name=function(){return"Arrow"},n.createProperties=function(e){var t=new r("linetoolarrow",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolArrow=n},QTwd:function(e,t,i){"use strict";var n,o,r,s,a,l,c;i.r(t),i.d(t,"RestoreDefaultsPreferencesUndoCommand",function(){return c}),n=i("mrSG"),o=i("RDU5"),r=i("ApcL"),s=i("ZZnO"),a=i("N22A"),l="Apply All Chart Properties",c=function(e){function t(t){var i,n=e.call(this,l)||this;return n._trading=null,n._oldHideFloatingPanel=null,n._oldNoConfirmEnabled=null,n._oldShowOnlyRejectionNotifications=null,n._oldShowPricesWithZeroVolume=null,n._oldOrderExecutedSoundEnabled=null,n._prevWatermarkPreferences=null,n._model=t,n._trading=Object(a.a)(),null!==n._trading&&(n._oldHideFloatingPanel=n._trading.hideFloatingPanel.value(),n._oldNoConfirmEnabled=n._trading.noConfirmEnabled.value(),n._oldShowOnlyRejectionNotifications=n._trading.showOnlyRejectionNotifications.value(),n._oldShowPricesWithZeroVolume=n._trading.showPricesWithZeroVolume.value(),n._oldOrderExecutedSoundEnabled=n._trading.orderExecutedSoundParams.enabled.value()),n._defaultsPreferences=Object(r.defaultsPreferencesByWhiteList)(n._model,n._model.mainSeries()),n._oldPreferences=t.preferences(),n._prevDateFormat=s.dateFormatProperty.value(),null!==(i=n._model.watermarkSource())&&(n._prevWatermarkPreferences=i.properties().state()),n}return Object(n.__extends)(t,e),t.prototype.redo=function(){null!==this._trading&&(this._trading.hideFloatingPanel.setValue(!1),this._trading.noConfirmEnabled.setValue(!1),this._trading.showOnlyRejectionNotifications.setValue(!1),this._trading.showPricesWithZeroVolume.setValue(!0),this._trading.orderExecutedSoundParams.enabled.setValue(!1)),this._model.applyPreferences(this._defaultsPreferences),this._model.mainSeries().onChartStyleChanged(),this._model.updateScales(),Object(s.removeSettingsValue)();var e=this._model.watermarkSource();null!==e&&e.restorePropertiesDefaults()},t.prototype.undo=function(){null!==this._trading&&(this._trading.hideFloatingPanel.setValue(this._oldHideFloatingPanel),this._trading.noConfirmEnabled.setValue(this._oldNoConfirmEnabled),
this._trading.showOnlyRejectionNotifications.setValue(this._oldShowOnlyRejectionNotifications),this._trading.showPricesWithZeroVolume.setValue(this._oldShowPricesWithZeroVolume),this._trading.orderExecutedSoundParams.enabled.setValue(this._oldOrderExecutedSoundEnabled)),this._model.applyPreferences(this._oldPreferences),this._model.mainSeries().onChartStyleChanged(),this._model.updateScales(),s.dateFormatProperty.setValue(this._prevDateFormat);var e=this._model.watermarkSource();null!==e&&null!==this._prevWatermarkPreferences&&e.properties().mergeAndFire(this._prevWatermarkPreferences)},t}(o.UndoCommand)},Qb4w:function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"PriceRange",function(){return s}),n=i("ogJP"),o=i("uOxu"),r=Object(o.getLogger)("Chart.PriceRange"),s=function(){function e(e,t){var i,n;null!==e&&"object"==typeof e?(i=e,this._minValue=i.m_minValue,this._maxValue=i.m_maxValue):(n=e,this._minValue=n,void 0!==t&&(this._maxValue=t))}return e.prototype.equals=function(e){return this._minValue===e._minValue&&this._maxValue===e._maxValue},e.prototype.clone=function(){return new e(this._minValue,this._maxValue)},e.prototype.minValue=function(){return this._minValue},e.prototype.setMinValue=function(e){this._minValue=e},e.prototype.maxValue=function(){return this._maxValue},e.prototype.setMaxValue=function(e){this._maxValue=e},e.prototype.length=function(){return this._maxValue-this._minValue},e.prototype.isEmpty=function(){return this._maxValue===this._minValue||this._maxValue!=this._maxValue||this._minValue!=this._minValue},e.prototype.serialize=function(){return{m_maxValue:this._maxValue,m_minValue:this._minValue}},e.prototype.state=function(){return{max:this._maxValue,min:this._minValue}},e.prototype.merge=function(t){return new e(Math.min(this.minValue(),t.minValue()),Math.max(this.maxValue(),t.maxValue()))},e.prototype.apply=function(e,t){this._minValue=Math.min(this._minValue,e),this._maxValue=Math.max(this._maxValue,t)},e.prototype.set=function(e,t){this._minValue=e,this._maxValue=t},e.prototype.scaleAroundCenter=function(e){var t,i,o;Object(n.isNumber)(e)?0!==this._maxValue-this._minValue&&(t=.5*(this._maxValue+this._minValue),i=this._maxValue-t,o=this._minValue-t,i*=e,o*=e,this._maxValue=t+i,this._minValue=t+o):r.logDebug("PriceRange.scaleAroundCenter: invalid coeff")},e.prototype.shift=function(e){Object(n.isNumber)(e)?(this._maxValue+=e,this._minValue+=e):r.logDebug("PriceRange.shift: invalid coeff")},e.prototype.containsStrictly=function(e){return e.minValue()>this._minValue&&e.maxValue()<this._maxValue},e}()},QloM:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"TabPriority",function(){return n}),i.d(t,"TabNames",function(){return o}),i.d(t,"TabOpenFrom",function(){return r}),function(e){e[e.Coordinates=100]="Coordinates",e[e.Display=100]="Display",e[e.Style=200]="Style",e[e.Inputs=300]="Inputs",e[e.Properties=250]="Properties"}(n||(n={})),function(e){e.background="Background",e.coordinates="Coordinates",e.drawings="Drawings",e.events="Events",e.eventsAndAlerts="Events & Alerts",
e.inputs="Inputs",e.properties="Properties",e.scales="Scales",e.legend="Legend",e.sourceCode="Source Code",e.style="Style",e.timezoneSessions="Timezone/Sessions",e.trading="Trading",e.visibility="Visibility"}(o||(o={})),function(e){e[e.Default=100]="Default",e[e.UserSave=200]="UserSave",e[e.Override=300]="Override"}(r||(r={}))},Qq0B:function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"NonSeriesStudy",function(){return s}),n=i("mrSG"),o=i("Eyy1"),r=i("GVHu"),(s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype.clearData=function(){this._customData=null,this._indexes=null},t.prototype.restoreData=function(e,t,i){r.Study.prototype.restoreData.call(this,e),this._customData=t,this._indexes=i},t.prototype.state=function(t){var i=e.prototype.state.call(this,t);return t&&(i.nonSeriesData=this._customData,i.indexes=this._indexes),i},t.prototype.customData=function(){return this._customData},t.prototype._setPaneViews=function(e){this._paneViews=e,this.model().lightUpdate()},t.prototype._onDataUpdated=function(t,i,n){null!==i&&(i.indexes_replace?(Object(o.assert)("nochange"!==n),this._indexes=n):(this._customData=i.data,"nochange"!==n&&(this._indexes=n))),e.prototype._onDataUpdated.call(this,t,i,n)},t}(r.Study)).prototype.superclass=r.Study},QrSB:function(e,t,i){"use strict";function n(e,t){var i=e.dataSourceForId(t);if(null===i)throw new Error('Chart has no study or shape with id "'+t+'"');return i}i.r(t),i.d(t,"SelectionApi",function(){return o});var o=function(){function e(e){this._model=e}return e.prototype.add=function(e){var t=this;Array.isArray(e)?this._model.selectionMacro(function(i){e.map(n.bind(null,t._model)).forEach(function(e){return i.addSourceToSelection(e)})}):this.add([e])},e.prototype.canBeAddedToSelection=function(e){var t=n(this._model,e);return this._model.selection().canBeAddedToSelection(t)},e.prototype.set=function(e){var t=this;Array.isArray(e)?this._model.selectionMacro(function(i){i.clearSelection(),e.map(n.bind(null,t._model)).forEach(function(e){return i.addSourceToSelection(e)})}):this.set([e])},e.prototype.remove=function(e){var t=this;Array.isArray(e)?this._model.selectionMacro(function(i){e.map(n.bind(null,t._model)).forEach(function(e){return i.removeSourceFromSelection(e)})}):this.remove([e])},e.prototype.contains=function(e){var t=n(this._model,e);return this._model.selection().isSelected(t)},e.prototype.allSources=function(){return this._model.selection().sources().map(function(e){return e.id()})},e.prototype.isEmpty=function(){return this._model.selection().isEmpty()},e.prototype.clear=function(){this._model.selectionMacro(function(e){e.clearSelection()})},e.prototype.onChanged=function(){return this._model.onSelectedSourceChanged()},e}()},Qtjj:function(e,t,i){"use strict";var n,o,r,s,a,l;i.r(t),i.d(t,"TimeSynchronizer",function(){return l}),n=i("LxhU"),o=i("jCNj"),r=i.n(o),s=i("IiTo"),a=null,l=function(){function e(e,t){var i,o;this._sourceTargetBarBuilder=null,this._cache=new Map,this._source=e,this._target=t,
this._isResolutionTheSame=n.Interval.isEqual(e.getResolution(),t.getResolution()),this._isSessionTheSame=(i=e.getSymbolInfo(),o=t.getSymbolInfo(),i.timezone===o.timezone&&i.session===o.session),this._shouldCorrectTradingDay=n.Interval.isDWM(e.getResolution())&&!this._isSessionTheSame}return e.prototype.sourceTimeToTargetTime=function(e){var t,i,n,o,s,a;return this._isSessionTheSame&&this._isResolutionTheSame?e:this._source.isValid()&&this._target.isValid()?(void 0===(t=this._cache.get(e))&&(i=1e3*e,this._shouldCorrectTradingDay&&(n=r.a.utc_to_cal(this._source.getSession().timezone,i),n=this._source.getSession().spec.correctTradingDay(n),o=new Date(n),r.a.set_hms(o,0,0,0,0,this._source.getSession().timezone),i=o.valueOf()),(s=this._sourceTargetBuilder()).moveTo(i),a=s.indexOfBar(i),t=s.startOfBar(Math.max(0,a))/1e3,this._cache.set(e,t)),t):e},e.prototype._sourceTargetBuilder=function(){if(null===this._sourceTargetBarBuilder){var e=this._isSessionTheSame?this._target.getSession():(null===a&&(a=new s.SessionInfo("Etc/UTC","24x7")),a);this._sourceTargetBarBuilder=Object(s.newBarBuilder)(this._target.getResolution(),this._target.getSession(),e)}return this._sourceTargetBarBuilder},e}()},Qymm:function(e,t,i){"use strict";function n(e){this.items=e.items,this.barSpacing=e.barSpacing,this.lineColor=e.lineColor||e.color,this.radius=e.lineWidth||e.height/2,this.vertOffset=e.vertOffset||0}var o=i("aO4+").Point,r=i("Zp/P").selectionTolerance,s=i("VdBB").HitTestResult;n.prototype.draw=function(e){var t,i,n,o,r,s,a,l=2*Math.PI,c=!1;for(n=0;n<this.items.length;++n)r=(o=this.items[n]).x,s=o.y+this.vertOffset,TradingView.isNaN(r)||TradingView.isNaN(s)||(null!=o.style?(a=o.style.color,t=o.style.width):(a=this.lineColor,t=this.radius),a!==i&&(i=a,c&&e.fill(),e.beginPath(),e.fillStyle=a),e.moveTo(r+t,s),e.arc(r,s,t,0,l,!1),c=!0);c&&e.fill()},n.prototype.hitTest=function(e){var t,i,n=2*this.radius,a=this.vertOffset,l=r(n);for(t=0;t<this.items.length;++t)if((i=this.items[t])&&new o(i.x,i.y+a).subtract(e).length()+this.radius<=l)return new s(s.REGULAR);return null},t.PaneRendererCircles=TradingView.PaneRendererCircles=n},RDDl:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolPriceRange";var r=t||n.createProperties();o.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("VghZ").PriceRangePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=window.t("Price Range");inherit(n,o),n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return a},n.prototype.name=function(){return"Price Range"},n.prototype.getStylesPropertyPage=function(){return s.LineToolDateRangeStylesPropertyPage},n.createProperties=function(e){var t=new r("linetoolpricerange",e);return n._configureProperties(t),t},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){
return i("Ax76").GeneralDatePriceRangeDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolPriceRange=n},RDU5:function(e,t,i){"use strict";i.r(t),i.d(t,"UndoCommand",function(){return n});var n=function(){function e(e,t){void 0===t&&(t=!0),this._customFlags={},this._text=e,this._executeOnPush=t}return e.prototype.text=function(){return this._text},e.prototype.executeOnPush=function(){return this._executeOnPush},e.prototype.customFlag=function(e){return this._customFlags[e]},e.prototype.setCustomFlag=function(e,t){this._customFlags[e]=t},e.prototype.canMerge=function(e){return!1},e.prototype.merge=function(e){throw new Error("Should be re-implemented in child classes")},e}()},RTYN:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"PositionAveragePriceAxisView",function(){return r}),n=i("mrSG"),o=i("4TVt"),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._formatPrice=function(e,t){return this._source.formatter().format(e)},t}(o.LineToolPriceAxisView)},RXmj:function(e,t,i){"use strict";(function(e,n){function o(t){this._chartWidgetCollection=t,this._chartAboutToBeSavedDelegate=new e,this._chartSavedDelegate=new e,this._prevChartState=null,this._chartHasBeenModified=new e,this._chartSizeLimitExceededDelegate=new e}function r(e,t){e.content=JSON.stringify(t)}var s=i("FIi8").deepExtend,a=i("ogJP").deepEquals,l=i("zUrt").backend,c=window.t("The publication preview could not be loaded. Please disable your browser extensions and try again.");o.prototype.chartHasBeenModified=function(){return this._chartHasBeenModified},o.prototype.chartSizeLimitExceeded=function(){return this._chartSizeLimitExceededDelegate},o.prototype.chartAboutToBeSaved=function(){return this._chartAboutToBeSavedDelegate},o.prototype.chartSaved=function(){return this._chartSavedDelegate},o.prototype.whenReadyToSave=function(e){var t,i,n=this._chartWidgetCollection,o=n.activeChartWidget.value(),r=o.model().mainSeries();r.symbolInfo()&&!r.hasDelayedSymbolIntervalChange()?e():(t=null,i=null,t=function(){r.dataEvents().symbolError().unsubscribe(null,i,!0),e()},i=function(){r.dataEvents().symbolResolved().unsubscribe(null,t,!0)},r.dataEvents().symbolResolved().subscribe(null,t,!0),r.dataEvents().symbolError().subscribe(null,i,!0))},o.prototype.saveToJSON=function(){var e=this._getCommonSavingInfo(!1);return r(e,this._getChartWidgetCollectionState(!1,!0)),e},o.prototype._fillAsyncInfo=function(e,t){var i=JSON.parse(e.content),n=this._chartWidgetCollection,o=t?n.asyncState():n.activeChartWidget.value().asyncState();return o.then(function(t){return e.content=JSON.stringify(s(i,t)),e})},o.prototype._getChartWidgetCollectionState=function(e,t,i,n){return e||(t=!0,n=!1),t?this._chartWidgetCollection.state(!!e,i,n):this._chartWidgetCollection.activeChartWidget.value().state(!!e,i,n)},o.prototype._getCommonSavingInfo=function(e){var t,i,n,o,r,s={publish_request_id:Math.random().toString(36).substring(2)
},a=this._chartWidgetCollection,l=a.activeChartWidget.value(),c=a.metaInfo,u=l.model().mainSeries(),h=u.properties(),d=u.symbolInfo();if(c.id.value()&&(s.id=c.id.value()),s.name=c.name.value()||"",s.description=c.description.value()||"",s.resolution=u.properties().interval.value(),s.symbol_type=null!==d&&d.type||"",s.exchange=null!==d&&d.exchange||"",s.listed_exchange=null!==d&&d.listed_exchange||"",null!==d&&u.isSpread()?(t=d.legs[0],i=(i=d.base_name[0]).split(":")[1],s.symbol=t,s.short_name=i,s.expression=d.full_name):(s.symbol=null!==d&&d.ticker||h.symbol.value(),s.short_name=h.shortName.value()),null!==d){for(n=[],o=0,r=d.legs.length;o<r;o++)n.push({symbol:d.legs[o],pro_symbol:d.base_name[o]});s.legs=JSON.stringify(n)}else s.legs=JSON.stringify([]);return s.is_realtime=e?"0":"1",s},o.prototype.publishChart=function(e){},o.prototype.publishScript=function(e,t,i){var n,o,r,s,a=this;a._scriptPublisher?a._scriptPublisher.openPublication(e,t):(n=i.ScriptPublisher,o=i.ScriptsProvider,r=i.CategoriesProvider,s=new o({publish:function(e){return new Promise(function(t,i){var n={closeForm:function(){if(e&&e.scriptPublication&&e.scriptPublication.updateScriptIdPart){var i=e.scriptPublication.updateScriptIdPart;publishedScripts.invalidateCache([i]),window.studyMarket&&(window.studyMarket.resetAllPages(),window.studyMarket.updateFavorites())}t()},showError:function(e){i(e)}};try{a.onPublish(e,n)}catch(e){i(c)}})}}),a._scriptPublisher=new n({scriptsProvider:s,categoriesProvider:new r}),a._scriptPublisher.openPublication(e,t))},o.prototype.onPublish=function(e,t){function i(e){return e.returnValue=window.t("Script may be not updated if you leave the page."),e.returnValue}function o(o){var r,s,a,l,c,h;window.removeEventListener("beforeunload",i),u.publishInProgress=!1,"ok:"===(r=o.responseText||o).substr(0,3)?(s=!1,t.savePrivacySetting&&(s=!e.is_public,TVSettings.setValue("publishchart.private",s)),a=r.substr(3),l=JSON.parse(a),u._chartWidgetCollection.metaInfo.id.value()||u._chartWidgetCollection.metaInfo.id.setValue(l.id),t.closeForm&&t.closeForm(),t.onPublishUrl&&t.onPublishUrl(l.publishUrl,l.uuid),u._lastPublishUrl=l.publishUrl,u.hWnd&&(c=l.publishUrl,t.ideaUrl&&(c=n.render(t.ideaUrl,{idea:l.idea})),u.hWnd.location=c)):((413===o.status||/^[\d\s]*request.+large/i.test(r.trim()))&&(r=window.t("This Chart Layout has a lot of objects and can't be published. Please remove the unused objects (drawings/indicators) through the Object Tree to continue publishing.")),h=r||window.t("Error occurred while publishing"),t.showError&&t.showError(h,{html:!0}),t.onPublishError&&t.onPublishError(h),u.hWnd&&(u.hWnd.close(),u.hWnd=null))}var s,a,l,c,u=this;u.publishInProgress||(s=t&&t.publishAllLayout,l=!1,r(a=u._getCommonSavingInfo(!0),this._getChartWidgetCollectionState(!0,s,!0,l)),a.image=JSON.stringify(this._chartWidgetCollection.images({onlyActiveChart:!s})),u._fillAsyncInfo(a,t&&t.publishAllLayout).then(function(t){var n=e.scriptPublication,r=!(!n||!n.updateScriptIdPart),s=new Promise(function(e,t){var o
;n?(r?(window.addEventListener("beforeunload",i),o=ScriptLib.publishNext(n.scriptSource,n.updateScriptIdPart)):o=ScriptLib.publishNew(n.scriptSource,n.scriptProtection),o.done(function(t){r||n.scriptProtection!==TVScript.Access.ACCESS_CLOSED_NEEDS_AUTH||PinePerm.add(window.user.username,t.pineId),e(t.publishedstudyscript_id)}).fail(t)):e()});r?s.then(function(i){var n={publishedstudyscript_id:i,description:e.description,tags:e.tags};$.ajax({url:"/script-update/",type:"post",dataType:"text",data:$.extend({},t,n),complete:o})},o):s.then(function(i){i&&(e.publishedstudyscript_id=i),$.ajax({url:"/publishchart/",type:"post",dataType:"text",data:$.extend({},t,e),complete:o})},o)}),u.publishInProgress=!0,t.onWidget&&!t.ideaUrl||""!==e.name&&""!==e.description&&e.description.length<=7e4&&e.name.length<=64&&($.cookie("publish_request_id",a.publish_request_id,{path:"/"}),c="/loading/",t.ideaUrl&&(c="/loading?"+urlParams.createUrlParams({ideaUrl:t.ideaUrl})),u.hWnd=window.open(c,"_blank")))},o.prototype._saveChart=function(e,t,i,n,o){var r=i,s=n;return r=function(e){t.id.value()||(t.id.setValue(e),t.uid.setValue(e)),"function"==typeof i&&i()},l.saveChart(e.name,e.short_name,e.resolution,e,t,r.bind(this),s.bind(this))},o.prototype.saveChartSilently=function(e,t,i){var n,o=this._getChartWidgetCollectionState(!1),s=this._chartWidgetCollection.metaInfo;if(a(this._prevChartState,o)[0]&&null!=s.id.value())return this._chartSavedDelegate.fire(!0),void(e&&e(s));r(n=this._getCommonSavingInfo(!1),o),(i=i||{}).chartName&&(n.name=i.chartName),n.name&&0!==n.name.length||!i.defaultChartName||(n.name=i.defaultChartName),n.name?(i.autoSave&&(n.autoSave=!0),$(window).on("beforeunload.savechart",function(){return window.t("Your chart is being saved, please wait a moment before you leave this page.")}),this._isSaveInProcess=!0,this._chartAboutToBeSavedDelegate.fire(),this._saveChart(n,s,function(){this._chartWidgetCollection.metaInfo.name.setValue(n.name),this._prevChartState=o,this._chartSavedDelegate.fire(!0),this._isSaveInProcess=!1,e&&e(s)}.bind(this),function(){this._chartSavedDelegate.fire(!1),this._isSaveInProcess=!1,t&&t.apply(null,arguments)}.bind(this),i),$(window).off("beforeunload.savechart")):console.warn("Saving chart with empty name is not allowed")},o.prototype.isSaveInProcess=function(){return this._isSaveInProcess},t.ChartSaver=o}).call(this,i("aIyQ"),i("OiQe"))},RqCd:function(e,t,i){"use strict";function n(e){return e.description||""}i.r(t),i.d(t,"getTranslatedSymbolDescription",function(){return n}),i("YFKU")},S8xo:function(e,t,i){"use strict";function n(e,t){var i=e.clientX-t.clientX,n=e.clientY-t.clientY;return Math.sqrt(i*i+n*n)}function o(e){return Boolean(e.touches)}var r,s,a,l,c;i.r(t),i.d(t,"MouseEventHandler",function(){return c}),r=i("bf9a"),s=i("qFKp"),a=i("Eyy1"),l=i("GUQs"),c=function(){function e(e,t,i){var n=this;this._clickCount=0,this._tapCount=0,this._clickTimeoutId=null,this._clickPosition={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY},this._longTapTimeoutId=null,this._longTapActive=!1,
this._mouseMoveStartPosition=null,this._moveExceededManhattanDistance=!1,this._cancelClick=!1,this._unsubscribeOutsideEvents=null,this._unsubscribeMousemove=null,this._unsubscribeRoot=null,this._startPinchMiddlePoint=null,this._startPinchDistance=0,this._pinchPrevented=!1,this._preventDragProcess=!1,this._mousePressed=!1,this._onFirefoxOutsideMouseUp=function(e){n._mouseUpHandler(e)},this._target=e,this._handler=t,this._options=i,this._init()}return e.prototype.destroy=function(){null!==this._unsubscribeOutsideEvents&&(this._unsubscribeOutsideEvents(),this._unsubscribeOutsideEvents=null),null!==this._unsubscribeMousemove&&(this._unsubscribeMousemove(),this._unsubscribeMousemove=null),null!==this._unsubscribeRoot&&(this._unsubscribeRoot(),this._unsubscribeRoot=null),this._clearLongTapTimeout(),this._resetClickTimeout()},e.prototype._mouseEnterHandler=function(e){var t,i,n=this;this._unsubscribeMousemove&&this._unsubscribeMousemove(),t=this._mouseMoveHandler.bind(this),this._unsubscribeMousemove=function(){n._target.removeEventListener("mousemove",t)},this._target.addEventListener("mousemove",t),o(e)&&this._mouseMoveHandler(e),i=this._makeCompatEvent(e),this._processEvent(i,this._handler.mouseEnterEvent)},e.prototype._resetClickTimeout=function(){null!==this._clickTimeoutId&&clearTimeout(this._clickTimeoutId),this._clickCount=0,this._tapCount=0,this._clickTimeoutId=null,this._clickPosition={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY}},e.prototype._mouseMoveHandler=function(e){if(!this._mousePressed||o(e)){var t=this._makeCompatEvent(e);this._processEvent(t,this._handler.mouseMoveEvent)}},e.prototype._mouseMoveWithDownHandler=function(e){var t,i,n,r,s,c,u,h,d;"button"in e&&0!==e.button||null===this._startPinchMiddlePoint&&(t=o(e),this._preventDragProcess&&t||(this._pinchPrevented=!0,i=this._makeCompatEvent(e),n=Object(a.ensure)(this._mouseMoveStartPosition),!(c=(r=Math.abs(n.x-i.pageX))+(s=Math.abs(n.y-i.pageY))>5)&&t||(c&&!this._moveExceededManhattanDistance&&t&&(h=s>=(u=.5*r)&&!this._options.treatVertTouchDragAsPageScroll,d=u>s&&!this._options.treatHorzTouchDragAsPageScroll,h||d||(this._preventDragProcess=!0)),c&&(this._moveExceededManhattanDistance=!0,this._cancelClick=!0,t&&this._clearLongTapTimeout()),this._preventDragProcess||(this._processEvent(i,this._handler.pressedMouseMoveEvent),t&&Object(l.a)(e)))))},e.prototype._mouseUpHandler=function(e){var t,i;"button"in e&&0!==e.button||(t=this._makeCompatEvent(e),this._clearLongTapTimeout(),this._mouseMoveStartPosition=null,this._mousePressed=!1,this._unsubscribeRoot&&(this._unsubscribeRoot(),this._unsubscribeRoot=null),(i=o(e))&&this._mouseLeaveHandler(e),this._processEvent(t,this._handler.mouseUpEvent),i?++this._tapCount:++this._clickCount,this._clickTimeoutId&&(this._clickCount>1||this._tapCount>1)?(Math.abs(this._clickPosition.x-t.localX)+Math.abs(this._clickPosition.y-t.localY)<(i?15:5)&&!this._cancelClick&&this._processEvent(t,this._handler.mouseDoubleClickEvent),
this._resetClickTimeout()):this._cancelClick||this._processEvent(t,this._handler.mouseClickEvent),o(e)&&(0===this._tapCount&&Object(l.a)(e),this._mouseLeaveHandler(e),0===e.touches.length&&this._longTapActive&&(this._longTapActive=!1,Object(l.a)(e))),s.isFF&&this._target.ownerDocument.documentElement.removeEventListener("mouseleave",this._onFirefoxOutsideMouseUp))},e.prototype._clearLongTapTimeout=function(){null!==this._longTapTimeoutId&&(clearTimeout(this._longTapTimeoutId),this._longTapTimeoutId=null)},e.prototype._mouseDownHandler=function(e){var t,i,n,r;"button"in e&&0!==e.button||(t=this._target.ownerDocument.documentElement,s.isFF&&t.addEventListener("mouseleave",this._onFirefoxOutsideMouseUp),i=this._makeCompatEvent(e),this._cancelClick=!1,this._moveExceededManhattanDistance=!1,this._preventDragProcess=!1,o(e)&&this._mouseEnterHandler(e),this._mouseMoveStartPosition={x:i.pageX,y:i.pageY},this._unsubscribeRoot&&(this._unsubscribeRoot(),this._unsubscribeRoot=null),n=this._mouseMoveWithDownHandler.bind(this),r=this._mouseUpHandler.bind(this),this._unsubscribeRoot=function(){t.removeEventListener("touchmove",n),t.removeEventListener("touchend",r),t.removeEventListener("mousemove",n),t.removeEventListener("mouseup",r)},t.addEventListener("touchmove",n,{passive:!1}),t.addEventListener("touchend",r,{passive:!1}),this._clearLongTapTimeout(),o(e)&&1===e.touches.length?this._longTapTimeoutId=setTimeout(this._longTapHandler.bind(this,e),240):(t.addEventListener("mousemove",n),t.addEventListener("mouseup",r)),this._mousePressed=!0,this._processEvent(i,this._handler.mouseDownEvent),this._clickTimeoutId||(this._clickCount=0,this._tapCount=0,this._clickTimeoutId=setTimeout(this._resetClickTimeout.bind(this),500),this._clickPosition={x:i.localX,y:i.localY}))},e.prototype._init=function(){var e,t,i=this;this._target.addEventListener("mouseenter",this._mouseEnterHandler.bind(this)),this._target.addEventListener("touchcancel",this._clearLongTapTimeout.bind(this)),e=this._target.ownerDocument,t=function(e){i._handler.mouseDownOutsideEvent&&(e.target&&i._target.contains(e.target)||i._handler.mouseDownOutsideEvent())},this._unsubscribeOutsideEvents=function(){e.removeEventListener("mousedown",t),e.removeEventListener("touchstart",t)},e.addEventListener("mousedown",t),e.addEventListener("touchstart",t,{passive:!0}),this._target.addEventListener("mouseleave",this._mouseLeaveHandler.bind(this)),this._target.addEventListener("contextmenu",this._longTapHandler.bind(this)),this._target.addEventListener("touchstart",this._mouseDownHandler.bind(this),{passive:!0}),Modernizr.mobiletouch||this._target.addEventListener("mousedown",this._mouseDownHandler.bind(this)),this._initPinch(),this._target.addEventListener("touchmove",function(){},{passive:!1})},e.prototype._initPinch=function(){var e=this;void 0===this._handler.pinchStartEvent&&void 0===this._handler.pinchEvent&&void 0===this._handler.pinchEndEvent||(this._target.addEventListener("touchstart",function(t){return e._checkPinchState(t.touches)},{passive:!0}),
this._target.addEventListener("touchmove",function(t){var i;2===t.touches.length&&null!==e._startPinchMiddlePoint&&void 0!==e._handler.pinchEvent&&(i=n(t.touches[0],t.touches[1])/e._startPinchDistance,e._handler.pinchEvent(e._startPinchMiddlePoint,i),Object(l.a)(t))},{passive:!1}),this._target.addEventListener("touchend",function(t){e._checkPinchState(t.touches)}))},e.prototype._checkPinchState=function(e){1===e.length&&(this._pinchPrevented=!1),2!==e.length||this._pinchPrevented||this._longTapActive?this._stopPinch():this._startPinch(e)},e.prototype._startPinch=function(e){var t=this._target.getBoundingClientRect()||{left:0,top:0};this._startPinchMiddlePoint={x:(e[0].clientX-t.left+(e[1].clientX-t.left))/2,y:(e[0].clientY-t.top+(e[1].clientY-t.top))/2},this._startPinchDistance=n(e[0],e[1]),void 0!==this._handler.pinchStartEvent&&this._handler.pinchStartEvent(),this._clearLongTapTimeout()},e.prototype._stopPinch=function(){null!==this._startPinchMiddlePoint&&(this._startPinchMiddlePoint=null,void 0!==this._handler.pinchEndEvent&&this._handler.pinchEndEvent())},e.prototype._mouseLeaveHandler=function(e){this._unsubscribeMousemove&&this._unsubscribeMousemove();var t=this._makeCompatEvent(e);this._processEvent(t,this._handler.mouseLeaveEvent)},e.prototype._longTapHandler=function(e){o(e)||Object(l.a)(e);var t=this._makeCompatEvent(e);this._processEvent(t,this._handler.longTapEvent),this._processEvent(t,this._handler.contextMenuEvent),this._cancelClick=!0,this._longTapActive=!0},e.prototype._processEvent=function(e,t){t&&t.call(this._handler,e)},e.prototype._makeCompatEvent=function(e){var t,i;return t="touches"in e&&e.touches.length?e.touches[0]:"changedTouches"in e&&e.changedTouches.length?e.changedTouches[0]:e,i=this._target.getBoundingClientRect()||{left:0,top:0},{clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY,screenX:t.screenX,screenY:t.screenY,localX:t.clientX-i.left,localY:t.clientY-i.top,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey,type:e.type.startsWith("mouse")?"mouse":"touch",target:t.target,view:e.view,preventDefault:function(){Object(l.a)(e)}}},e}()},SXwY:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var i=function i(n){var o=i.cache,r=""+(t?t.apply(this,arguments):n);return o.hasOwnProperty(r)||(o[r]=e.apply(this,arguments)),o[r]};return i.cache={},i},e.exports=t.default},Si3H:function(e,t,i){"use strict";function n(e,t){var i=s.a.versionOf(e),n=e;void 0===n._serverMetaInfoVersion&&(n._serverMetaInfoVersion=i),h.forEach(function(n){i<0||i>=n.targetMetaInfoVersion()||(n.migrateMetaInfo(e),void 0!==t&&n.migratePropState(t),Object(o.assert)(e._metainfoVersion===n.targetMetaInfoVersion()))})}var o,r,s,a,l,c,u,h;i.r(t),o=i("Eyy1"),r=i("0YCj"),s=i.n(r),a=i("ogJP"),l=function(){function e(){}return e.prototype.targetMetaInfoVersion=function(){return 47},e.prototype.migrateMetaInfo=function(e){var t,i,n=e,o=e;o._metainfoVersion=47,n.defaults&&void 0!==n.defaults.precision?(t=n.defaults&&n.defaults.precision,
0===(i=Object(a.isNumber)(t)?t:parseInt(t))?o.format={type:"volume"}:isFinite(i)?o.format={type:"price",precision:i}:o.format={type:"inherit"},delete n.defaults.precision):o.format={type:"inherit"}},e.prototype.migratePropState=function(e){},e}(),c=i("mrSG"),u=function(){function e(){}return e.prototype.targetMetaInfoVersion=function(){return 50},e.prototype.migrateMetaInfo=function(e){var t,i,n,r,s,a,l,u,h,d=e,p=e;if(p._metainfoVersion=50,void 0!==d.defaults&&void 0!==d.defaults.ohlcPlots&&void 0!==d.ohlcPlots)for(t=d.ohlcPlots,i=d.defaults.ohlcPlots,n=Object(o.ensureDefined)(Object(o.ensureDefined)(p.defaults).ohlcPlots),r=0,s=Object.keys(i);r<s.length;r++)"ohlc_candles"===(l=i[a=s[r]]).plottype&&(u=!1,void 0!==(h=t[a])&&(u=!!h.drawBorder,delete h.drawBorder),n[a]=Object(c.__assign)({borderColor:"#000000",drawBorder:u},l))},e.prototype.migratePropState=function(e){},e}(),i.d(t,"migrateMetaInfoAndPropState",function(){return n}),(h=[new l,new u]).sort(function(e,t){return e.targetMetaInfoVersion()-t.targetMetaInfoVersion()})},SqfW:function(e,t,i){"use strict";function n(e,t){if(e.index>=t.length)return null;var i=t[e.index];return i===s.a?null:{startPrice:e.startPrice,endPrice:e.endPrice,index:i,extendTop:e.extendTop,extendBottom:e.extendBottom}}function o(e,t,i){var n=Object(a.ensureTimePointIndexIndex)(i.indexOf(e.index));return Object(r.__assign)(Object(r.__assign)({id:t},e),{index:n})}var r,s,a;i.d(t,"b",function(){return n}),i.d(t,"a",function(){return o}),r=i("mrSG"),s=i("tqok"),a=i("hsV8")},Ss5c:function(e,t,i){"use strict";(function(e){function n(t,i){var o,r;if(c.call(this),this._model=t,this._properties=i,this._pointAdded=new y,this._pointChanged=new y,this._onTemplateApplying=new y,this._onTemplateApplied=new y,this._paneViews=[],this._points=[],this._fixedPoints=[],this._timePoint=[],this._currentPointsetId=null,this._properties.hasChild("symbol")||this._properties.addChild("symbol",new e(t.mainSeries().symbol())),this._properties.hasChild("interval")||this._properties.addChild("interval",new e(t.mainSeries().interval())),this.calcIsActualSymbol(),this._properties.intervalsVisibilities.listeners().subscribe(this,n.prototype.calcIsActualSymbol),this._properties.listeners().subscribe(this,this.propertiesChanged),this._createPointsProperties(),this.m_priceAxisViews=[],this.m_timeAxisViews=[],this.pointsCount()>0)for(o=0;o<this.pointsCount();o++)this.m_priceAxisViews.push(this.createPriceAxisView(o)),this.m_timeAxisViews.push(new l(this,o));r=this,this._properties.visible.listeners().subscribe(this,function(e){var t=!1===u.hideAllDrawings().value();e.value()?e.value()&&t&&m.emit("drawing_event",this._id,"show"):(r._model.selection().isSelected(this)&&r._model.selectionMacro(function(e){e.removeSourceFromSelection(r)}),t&&m.emit("drawing_event",this._id,"hide"))}),this.customization=this.customization||{forcePriceAxisLabel:!1,disableSelection:!1,disableErasing:!1,disableSave:!1,showInObjectsTree:!0},this._syncStateExclusions=[],this._definitionsViewModel=null}
var o,r=i("Eyy1").ensureDefined,s=i("aO4+").Point,a=i("4TVt").LineToolPriceAxisView,l=i("fJhV").LineDataSourceTimeAxisView,c=i("fgLi").DataSource,u=i("mMWL"),h=i("LxhU"),d=h.Interval,p=h.ResolutionKind,_=i("pPtI").getServerInterval,f=i("uOxu").getLogger("Chart.LineDataSource"),m=i("FQhm"),y=i("aIyQ"),g=i("hayr").propertyPages,v=i("WkOR").areEqualSymbols,S=i("Kxc7"),b=S.enabled("datasource_copypaste"),w=10;inherit(n,c),n.prototype.pointAdded=function(){return this._pointAdded},n.prototype.pointChanged=function(){return this._pointChanged},n.PointPriceProperty=function(t,i){e.call(this),this._lineSource=t,this._pointIndex=i,t.pointAdded().subscribe(this,function(e){this._pointIndex===e&&this._listeners.fire(this)}),t.pointChanged().subscribe(this,function(e){this._pointIndex===e&&this._listeners.fire(this)})},inherit(n.PointPriceProperty,e),n.PointPriceProperty.prototype.value=function(){var e=this._lineSource.points()[this._pointIndex].price,t=this._lineSource.ownerSource().formatter(),i=t.parse(t.format(e));return null!=i.price?i.price:i.value},n.PointPriceProperty.prototype.setValue=function(e){var t=this._lineSource.points()[this._pointIndex];t.price=parseFloat(e),this._lineSource.setPoint(this._pointIndex,t),this._lineSource._model.updateSource(this._lineSource),this._listeners.fire(this),this._lineSource.endChanging(!0),this._lineSource._syncMultichartState(),this._lineSource._properties.lastUpdateTime.setValue((new Date).valueOf())},n.prototype.enableCurrentIntervalVisibility=function(){var e,t,i,n,o,r,s,a=d.parse(this._model.mainSeries().interval());a.isSeconds()&&(a.multiplier()<60?(this.properties().intervalsVisibilities.seconds.setValue(!0),e=Math.min(this.properties().intervalsVisibilities.secondsFrom.value(),a.multiplier()),this.properties().intervalsVisibilities.secondsFrom.setValue(e),t=Math.max(this.properties().intervalsVisibilities.secondsTo.value(),a.multiplier()),this.properties().intervalsVisibilities.secondsTo.setValue(t)):a=new d(p.Minutes,a.multiplier()/60)),a.isMinutes()&&(a.multiplier()<60?(this.properties().intervalsVisibilities.minutes.setValue(!0),e=Math.min(this.properties().intervalsVisibilities.minutesFrom.value(),a.multiplier()),this.properties().intervalsVisibilities.minutesFrom.setValue(e),t=Math.max(this.properties().intervalsVisibilities.minutesTo.value(),a.multiplier()),this.properties().intervalsVisibilities.minutesTo.setValue(t)):(i=Math.floor(a.multiplier()/60),this.properties().intervalsVisibilities.hours.setValue(!0),n=Math.min(this.properties().intervalsVisibilities.hoursFrom.value(),i),this.properties().intervalsVisibilities.hoursFrom.setValue(n),o=Math.max(this.properties().intervalsVisibilities.hoursTo.value(),i),this.properties().intervalsVisibilities.hoursTo.setValue(o))),a.isDays()&&(this.properties().intervalsVisibilities.days.setValue(!0),r=Math.min(this.properties().intervalsVisibilities.daysFrom.value(),a.multiplier()),this.properties().intervalsVisibilities.daysFrom.setValue(r),s=Math.max(this.properties().intervalsVisibilities.daysTo.value(),a.multiplier()),
this.properties().intervalsVisibilities.daysTo.setValue(s)),a.isWeeks()&&this.properties().intervalsVisibilities.weeks.setValue(!0),a.isMonths()&&this.properties().intervalsVisibilities.months.setValue(!0)},n.prototype.getType=function(){return TradingView.className(this.constructor)},n.prototype.getConstructor=function(){return this._constructor||null},n.prototype.isActualSymbol=function(){return this._isActualSymbol},n.prototype.isActualInterval=function(){return this._isActualInterval},n.prototype.isSavedInChart=function(e){return!this.customization.disableSave},n.prototype.setSavingInChartEnabled=function(e){this.customization.disableSave=!e},n.prototype.showInObjectTree=function(){return this.customization.showInObjectsTree},n.prototype.isAvailableInFloatingWidget=function(){return!0},n.prototype.setShowInObjectsTreeEnabled=function(e){this.customization.showInObjectsTree=e},n.prototype.isSelectionEnabled=function(){return!this.customization.disableSelection},n.prototype.setSelectionEnabled=function(e){this.customization.disableSelection=!e},n.prototype.visibilityKeyByInterval=function(e){var t,i=d.parse(e);return n.IntervalsVisibilities.forEach(function(e){e.kind===i.kind()&&e.from<=i.multiplier()&&e.to>=i.multiplier()&&(t=e.key)}),t},n.prototype.calcIsActualSymbol=function(){var e,t=this._properties.symbol,i=this._model.mainSeries(),n=t.value();this._isActualSymbol=i.symbolSameAsCurrent(n),this._isActualSymbol&&(e=i.symbol(),v(n,e)||(f.logWarn('Possible drawing "migrating" detected from "'+n+'" to "'+e+'"'),f.logWarn("Series symbolInfo: "+JSON.stringify(i.symbolInfo())),f.logWarn((new Error).stack)),t.setValue(e)),this.calcIsActualInterval()},n.prototype.calcIsActualInterval=function(){var e,t,i,n,o,r,s=this._properties,a=this._model.mainSeries(),l=d.parse(a.interval()),c=s.intervalsVisibilities;this._isActualInterval=!1,l.isSeconds()&&l.multiplier()<60&&(e=c.seconds.value(),t=c.secondsFrom.value(),i=c.secondsTo.value(),this._isActualInterval=e&&l.multiplier()>=t&&l.multiplier()<=i),l.isSeconds()&&l.multiplier()>=60&&(n=Math.floor(l.multiplier()/60),e=c.minutes.value(),t=c.minutesFrom.value(),i=c.minutesTo.value(),this._isActualInterval=e&&n>=t&&n<=i),l.isMinutes()&&l.multiplier()<60&&(e=c.minutes.value(),t=c.minutesFrom.value(),i=c.minutesTo.value(),this._isActualInterval=e&&l.multiplier()>=t&&l.multiplier()<=i),l.isMinutes()&&l.multiplier()>=60&&(o=Math.floor(l.multiplier()/60),e=c.hours.value(),t=c.hoursFrom.value(),i=c.hoursTo.value(),this._isActualInterval=e&&o>=t&&o<=i),l.isHours()&&(e=c.hours.value(),t=c.hoursFrom.value(),i=c.hoursTo.value(),this._isActualInterval=e&&l.multiplier()>=t&&l.multiplier()<=i),l.isDays()&&(e=c.days.value(),t=c.daysFrom.value(),i=c.daysTo.value(),this._isActualInterval=e&&l.multiplier()>=t&&l.multiplier()<=i),l.isWeeks()&&(this._isActualInterval=c.weeks.value()),l.isMonths()&&(this._isActualInterval=c.months.value()),l.isRange()&&(this._isActualInterval=c.ranges.value()),!this._isActualInterval&&this._model.selection().isSelected(this)&&(r=this,
this._model.selectionMacro(function(e){e.removeSourceFromSelection(r)}))},n.PointIndexProperty=function(t,i){e.call(this),this._lineSource=t,this._pointIndex=i},inherit(n.PointIndexProperty,e),n.PointIndexProperty.prototype.value=function(){return this._lineSource.points()[this._pointIndex].index},n.PointIndexProperty.prototype.setValue=function(e){var t=this._lineSource.points()[this._pointIndex];t.index=e,this._lineSource.setPoint(this._pointIndex,t),this._lineSource._model.updateSource(this._lineSource),this._listeners.fire(this),this._lineSource.endChanging(!0),this._lineSource._syncMultichartState(),this._lineSource._properties.lastUpdateTime.setValue((new Date).valueOf())},n.prototype._syncMultichartState=function(){var e={points:this._timePoint,interval:this._model.mainSeries().interval()};this.linkKey&&!this.properties().singleChartOnly&&u.finishChangingLineTool({model:this._model,linkKey:this.linkKey,symbol:this._model.mainSeries().symbol(),finalState:e})},n.prototype._createPointProperty=function(e){var t,i=this._properties.points;i.addProperty(e),(t=i[e]).addChild("price",new n.PointPriceProperty(this,e)),t.addChild("bar",new n.PointIndexProperty(this,e))},n.prototype._createPointsProperties=function(){this._properties.addProperty("points");for(var e=0;e<this.pointsCount();e++)this._createPointProperty(e)},n.prototype.priceScale=function(){return this._ownerSource?this._ownerSource.m_priceScale:null},n.prototype.symbol=function(){return this._properties.symbol.value()},n.prototype.properties=function(){return this._properties},n.prototype.isSavedInStudyTemplates=function(){return!1},n.prototype.state=function(e){var t=TradingView.className(this.constructor),i={type:t,id:this.id(),state:this.properties().state(),points:this._timePoint,zorder:this.zorder(),linkKey:this.linkKey};return delete i.state.points,e&&(i.indexes=this._points),this.ownerSource()&&(i.ownerSource=this.ownerSource().id()),this.isFixed()&&(i.positionPercents=this._positionPercents||this.calcPositionPercents()),"version"in this&&1!==this.version&&(i.version=this.version),this.hasAlert.value()&&(i.alertId=this._alertId),i},n.prototype.template=function(){return this.properties().preferences()},n.prototype.applyTemplate=function(e){this._onTemplateApplying.fire(e),this._applyTemplateImpl(e),this.calcIsActualSymbol(),this.updateAllViews(),this.model().lightUpdate(),this._onTemplateApplied.fire()},n.prototype._applyTemplateImpl=function(e){var t=this.properties();t.mergePreferences(e),t.saveDefaults(),this.propertiesChanged()},n.prototype.clearData=function(){this._points=[]},n.prototype.currentPointsetId=function(){return"pointset_"+this._currentPointsetId},n.prototype.stop=function(){this.clearServerPoints(),this.hasAlert.value()&&TradingView.alertsDispatcher&&TradingView.alertsDispatcher.deleteAlert(this._alertId)},n.prototype.isStarted=function(){return null!==this._currentPointsetId},n.prototype.restart=function(){this.isFixed()||(this._currentPointsetId=null,this.createServerPoints())},n.prototype.tryCreateServerPoints=function(){
this.isFixed()||null===this._currentPointsetId&&this.createServerPoints()},n.prototype.normalizePoint=function(e){var t=this._model.timeScale().normalizeBarIndex(e.index);return t.price=e.price,t},n.prototype.normalizePoints=function(){var e,t;for(this._timePoint=[],e=0;e<this._points.length;e++)if(void 0!==this._points[e].index){if(!(t=this._model.timeScale().normalizeBarIndex(this._points[e].index)).time_t){this._timePoint=[];break}t.price=this._points[e].price,this._timePoint.push(t)}},n.prototype.denormalizeTimePoints=function(){var e,t,i=[];for(e=0;e<this._timePoint.length;e++){if(void 0===(t=this._model.timeScale().denormalizeTimePoint(this._timePoint[e]))){i=[];break}i.push({index:t,price:this._timePoint[e].price})}i.length>0&&(this._points=i)},n.prototype.restorePoints=function(e,t,i){this._timePoint=e,this._points=t,i||this.denormalizeTimePoints()},n.prototype.restoreExternalPoints=function(e){this.properties().interval.setValue(e.interval),this._timePoint=e.points,this.denormalizeTimePoints(),this.isActualSymbol()?this.createServerPoints():this.clearServerPoints()},n.prototype.restorePositionPercents=function(e){this._positionPercents=e},n.prototype.getLinkKey=function(){return this.linkKey||null},n.prototype.updateAllViewsAndRedraw=function(){this.updateAllViews(),this._model.updateSource(this)},n.prototype.propertiesChanged=function(){if(this.calcIsActualInterval(),this.updateAllViewsAndRedraw(),this.linkKey){var e=this.properties().state(this._syncStateExclusions);delete e.interval,u.changeLineStyle({linkKey:this.linkKey,state:e,model:this._model})}},n.prototype.points=function(){var e,t,i=[];for(e=0;e<this._points.length;e++)t=this._points[e],i.push({index:t.index,price:t.price,time:t.time});return this._lastPoint&&i.push({index:this._lastPoint.index,price:this._lastPoint.price,time:this._lastPoint.time}),this._currentMovingPoint&&this._startMovingPoint&&this.correctPoints(i),i},n.prototype.normalizedPoints=function(){return this._timePoint},n.prototype.axisPoints=function(){return this.points()},n.prototype.fixedPoints=function(){var e,t,i,n,o=[];if(this._positionPercents&&!this.priceScale().isEmpty())for(e=0;e<this._positionPercents.length;e++)t=this._positionPercents[e],i=this._model.timeScale().width()*t.x,n=this.priceScale().height()*t.y,o.push(new s(i,n));else for(e=0;e<this._fixedPoints.length;e++)o.push(this._fixedPoints[e].clone());return this._lastPoint&&o.push(this._lastPoint.clone()),this._currentMovingPoint&&this._startMovingPoint&&this.correctFixedPoints(o),o},n.prototype._preparePoint=function(e,t){var i=e;return t&&t.shift()&&this.points().length>=2&&this._properties.snapTo45Degrees&&this._snapPoint45Degree(i,this.points()[this.points().length-2]),i},n.prototype.addPoint=function(e,t,i){var n=this._preparePoint(e,t);return this._addPointIntenal(n,t,i)},n.prototype._addPointIntenal=function(e,t,i){this._points.push(e);var n=this._points.length===this.pointsCount();return n?(this._lastPoint=null,i||(this.normalizePoints(),this.createServerPoints())):this._lastPoint=e,
this._pointAdded.fire(this._points.length-1),n},n.prototype.addFixedPoint=function(e){this._fixedPoints.push(e);var t=this._fixedPoints.length===this.pointsCount();return t&&this.calcPositionPercents(),t},n.prototype.calcPositionPercents=function(){var e,t,i,n;if(!this.priceScale()||this.priceScale().isEmpty())return[];for(this._positionPercents=[],e=0;e<this._fixedPoints.length;e++)i=(t=this._fixedPoints[0]).x/this._model.timeScale().width(),n=t.y/this.priceScale().height(),this._positionPercents.push({x:i,y:n});return this._positionPercents},n.prototype.calcMiddlePoint=function(e,t){return new s((e.x+t.x)/2,(e.y+t.y)/2)},n.prototype.getPointByPosition=function(e,t,i,n){return[t,i,n][e]},n.prototype.restoreFixedPoints=function(){this._fixedPoints=this.fixedPoints()},n.prototype.onData=function(e){e.params.customId===this.currentPointsetId()&&this._onPointsetUpdated(e.params.plots)},n.prototype._onPointsetUpdated=function(e){var t,i,n,o;if(0!==e.length){for(t=0;t<e.length;t++)i=e[t],n=this._timePoint[i.index],o={index:i.value[0],time:new Date(1e3*i.value[1]),price:n.price},this._points.length<=i.index?(this._points.push(o),this._pointAdded.fire(this._points.length-1)):(this._points[i.index]=o,this._pointChanged.fire(i.index));this.checkAlert&&this.checkAlert(),this.updateAllViewsAndRedraw()}},n.prototype.startChanging=function(e,t){e<this.m_priceAxisViews.length&&this.m_priceAxisViews[e].setActive(!0),e<this.m_timeAxisViews.length&&this.m_timeAxisViews[e].setActive(!0),this._properties.lastUpdateTime.setValue((new Date).valueOf())},n.prototype.setPoint=function(e,t,i){if(i&&i.shift()&&this._properties.snapTo45Degrees){var n=0===e?1:e-1;this._snapPoint45Degree(t,this.points()[n])}this._points[e]=t,this._pointChanged.fire(e),this.normalizePoints()},n.prototype.startMoving=function(e,t,i){this.isFixed()&&this.restoreFixedPoints(),this._startMovingPoint=this.isFixed()?e.screen:e.logical,this._properties.lastUpdateTime.setValue((new Date).valueOf())},n.prototype.move=function(e,t,i){var n;n=i&&(i.shiftOnly()||i.controlShift())?this.isFixed()?this._alignScreenPointHorizontallyOrVertically(e.screen):this._alignPointHorizontallyOrVertically(e.logical):this.isFixed()?e.screen:e.logical,this._currentMovingPoint=n,this.updateAllViews()},n.prototype._alignPointHorizontallyOrVertically=function(e){var t=this.pointToScreenPoint(e)[1],i=this.pointToScreenPoint(this._startMovingPoint)[1],n=Math.abs(i.x-t.x),o=Math.abs(i.y-t.y),r=n<w&&o<w;return r?e:{index:n<o?this._startMovingPoint.index:e.index,price:n<o?e.price:this._startMovingPoint.price}},n.prototype._alignScreenPointHorizontallyOrVertically=function(e){var t=Math.abs(this._startMovingPoint.x-e.x),i=Math.abs(this._startMovingPoint.y-e.y),n=t<w&&i<w;return n?e:t<i?new s(this._startMovingPoint.x,e.y):new s(e.x,this._startMovingPoint.y)},n.prototype.startMovingPoint=function(){return this._startMovingPoint?TradingView.clone(this._startMovingPoint):null},n.prototype.currentMovingPoint=function(){return this._currentMovingPoint?TradingView.clone(this._currentMovingPoint):null},
n.prototype.correctPoints=function(e){var t,i,n=this._currentMovingPoint.index-this._startMovingPoint.index,o=this._currentMovingPoint.price-this._startMovingPoint.price;if(0===n&&0===o)return!1;for(t=0;t<e.length;t++)(i=e[t]).index+=n,i.price+=o,e[t]=i;return!0},n.prototype.correctFixedPoints=function(e){var t,i=this._currentMovingPoint.subtract(this._startMovingPoint);for(t=0;t<e.length;t++)e[t]=e[t].add(i)},n.prototype.endMoving=function(e){var t,i,n;if(this._properties.interval.setValue(this._model.mainSeries().interval()),t=!1,i=!1,this._currentMovingPoint&&this._startMovingPoint){if(t=this._currentMovingPoint.index!==this._startMovingPoint.index,i=this._currentMovingPoint.price!==this._startMovingPoint.price,this.isFixed())this.correctFixedPoints(this._fixedPoints);else if(this.correctPoints(this._points))for(m.emit("drawing_event",this._id,"move"),n=0;n<this._points.length;n++)this._pointChanged.fire(n);this._startMovingPoint=null,this._currentMovingPoint=null}if(this.isFixed())return this.calcPositionPercents(),void this.updateAllViews();this.normalizePoints(),this.updateAllViews(),t&&!e&&this.createServerPoints(),(i||t)&&this.synchronizeAlert(!this._alertUndoMode)},n.prototype.endChanging=function(e,t){var i;for(this._properties.interval.setValue(this._model.mainSeries().interval()),t||(this.normalizePoints(),this.createServerPoints()),i=0;i<this.m_priceAxisViews.length;i++)this.m_priceAxisViews[i].setActive(!1);for(i=0;i<this.m_timeAxisViews.length;i++)this.m_timeAxisViews[i].setActive(!1);this.synchronizeAlert(!e)},n.prototype.paneViews=function(){var e,t;if(this.isSourceHidden())return null;if(1===this._paneViews.length)return[this._paneViews[0]];for(e=[],t=this._paneViews.length-1;t>=0;--t)e.push(this._paneViews[t]);return e},n.prototype._setPaneViews=function(e){this._paneViews=e,this._model.lightUpdate()},n.prototype.dataWindowView=function(){return null},n.prototype.statusView=function(){return null},n.prototype.isSourceHidden=function(){return!this._properties.visible.value()||u.hideAllDrawings().value()&&this.canBeHidden()||!this._isActualInterval||!this._isActualSymbol},n.prototype.priceAxisViews=function(e,t){var i,n,o;return t!==this.priceScale()||this.isSourceHidden()?null:this._model.lineBeingEdited()===this&&(i=this._model.linePointBeingEdited())<this.m_priceAxisViews.length?(o=(n=this.m_priceAxisViews.slice())[i],n.splice(i,1),n.push(o),n):this.m_priceAxisViews},n.prototype.timeAxisViews=function(){var e,t,i;return this.isSourceHidden()?null:this._model.lineBeingEdited()===this&&(e=this._model.linePointBeingEdited())<this.m_timeAxisViews.length?(i=(t=this.m_timeAxisViews.slice())[e],t.splice(e,1),t.push(i),t):this.m_timeAxisViews},n.prototype.updateAllViews=function(){var e,t,i;if(!this._isActualSymbol)return null;if(!this._properties.visible.value())return null;if(null!==(e=this.paneViews()))for(t=e,i=0;i<t.length;i++)t[i].update();for(t=this.m_priceAxisViews,i=0;i<t.length;i++)t[i].update();for(t=this.m_timeAxisViews,i=0;i<t.length;i++)t[i].update()},n.prototype.setLastPoint=function(e,t){
this._lastPoint=this._preparePoint(e,t),this.updateAllViews()},n.prototype.lastPoint=function(){return this._lastPoint},n.prototype.setLastFixedPoint=function(e){this._lastFixedPoint=e,this.updateAllViews()},n.prototype.title=function(){return"Line Tool"},n.prototype.name=function(){return"Line Tool"},n._pointSetId=1,n.prototype.start=function(){this.createServerPoints()},n.prototype.createServerPoints=function(){var e,t,i,o,r,s;if(!this._recursiveGuard&&this._isActualSymbol&&this._model.chartApi().connected()&&(this.clearServerPoints(),!this._model.timeScale().isEmpty()&&(0===this._timePoint.length&&this.normalizePoints(),0!==this._timePoint.length))){for(this._currentPointsetId=++n._pointSetId,e=this._model.mainSeries().symbolId(),t=[],i=0;i<this._timePoint.length;i++)o=this._timePoint[i],t.push([o.time_t,o.offset]);r=_(this.properties().interval.value()),s=this,this._model.chartApi().createPointset(this.currentPointsetId(),"turnaround",e,r,t,function(e){s.onData(e)})}},n.prototype.clearServerPoints=function(){null!==this._currentPointsetId&&(this._model.chartApi().removePointset(this.currentPointsetId()),this._currentPointsetId=null)},n.prototype.isBeingEdited=function(){return this===this._model.lineBeingEdited()||this===this._model.sourceBeingMoved},n.prototype.isFixed=function(){return!1},n.prototype.isLocked=n.prototype.isFrozen=function(){return this.properties().frozen&&this.properties().frozen.value()},n.prototype.pointToScreenPoint=function(e){var t,i,n,o,r=this._model.timeScale(),a=this.priceScale(),l=this.ownerSource().firstValue();return!a||a.isEmpty()||r.isEmpty()||null==l?[new s(0,0),new s(0,0)]:(t=r.indexToCoordinate(e.index,!0),i=e.price,n=a.priceToCoordinate(i,l,!0),o=new s(t,n),t=r.indexToCoordinate(e.index,!1),n=a.priceToCoordinate(i,l,!1),[o,new s(t,n)])},n.prototype.screenPointToPoint=function(e){var t=this._model.timeScale(),i=this.priceScale(),n=t.coordinateToIndex(e.x),o=this.ownerSource().firstValue();if(null!==o&&isFinite(o))return{price:i.coordinateToPrice(e.y,o),index:n}},n.prototype.tags=function(){return[this._constructor]},n.prototype._snapPoint45Degree=function(e,t,i){var n,o,r,s,a,l,c,u=this._model.timeScale(),h=u.indexToCoordinate(t.index),d=u.indexToCoordinate(e.index)-h,p=this.m_priceScale,_=t.price,f=e.price,m=this.ownerSource().firstValue(),y=p.priceToCoordinate(_,m),g=p.priceToCoordinate(f,m)-y,v=Math.round(Math.atan2(d,g)/Math.PI*4);2===Math.abs(v)?i||(e.price=_):0===Math.abs(v)||4===Math.abs(v)?i||(e.index=t.index):0===Math.abs(v)||4===Math.abs(v)?i||(e.index=t.index):(n=Math.sqrt(d*d+g*g),o=d<0?-1:1,r=g<0?-1:1,s=Math.max(Math.abs(g),Math.abs(d)),s/=s*Math.sqrt(2)/n,a=Math.round(u.coordinateToIndex(h+s*o)),l=Math.abs(u.indexToCoordinate(a)-h),c=p.coordinateToPrice(y+l*r,m),e.index=a,e.price=c)},n.prototype.createPriceAxisView=function(e){return new a(this,{pointIndex:e})},n.prototype.version=1,n.prototype.alertId=function(){return this._alertId},n.prototype.setAlert=function(e,t){},n.prototype.removeAlert=function(){delete this._alertId,delete this._alert,
this.hasAlert.setValue(!1)},n.prototype._processAlertHandlers=function(e){var t,i,n,o=this;("unsubscribe"!==(e="subscribe"===e?"subscribe":"unsubscribe")||o._alertCallbacks)&&(i="subscribe"===e?"on":"off",t=o.properties(),n=o._alertCallbacks||{remove:o.removeAlert.bind(o),hovered:function(e,t){t?o._model.setHoveredSource(o):o._model.hoveredSource()===o&&o._model.setHoveredSource(null)},selected:function(e,t){t&&o._model.selectionMacro(function(e){e.addSourceToSelection(o)})},synchronizeSilently:function(e){o.synchronizeAlert(!1)}},o._alertCallbacks||(o._alertCallbacks=n),o.getAlert().done(function(r){r&&(r[i]("destroy",n.remove),r[i]("change:hovered",n.hovered),r[i]("change:selected",n.selected),t.extendLeft&&t.extendLeft[e](o,n.synchronizeSilently),t.extendRight&&t.extendRight[e](o,n.synchronizeSilently))}))},n.prototype.editAlert=function(e){},n.prototype.getAlert=function(e){},n.prototype.synchronizeAlert=function(e){var t=this;t.hasAlert.value()&&setTimeout(function(){function i(){t._alertUndoMode=!0,o.undoToCheckpoint(t._undoCheckpointAlert),setTimeout(function(){t._alertUndoMode=!1,t.localAndServerAlersMismatch=!1},0)}var n,o=t._getUndoHistory();t._undoCheckpointAlert||t._alertUndoMode||(n=o.undoStack().pop(),t._undoCheckpointAlert=o.createUndoCheckpoint(),n&&o.undoStack().push(n)),d.isSeconds(t.stateForAlert().interval)?t._alertUndoMode||(showInvalidTimeframeDialog(),i(),delete t._undoCheckpointAlert):t.getAlert().done(function(n){!function(e){var i=e.get("description")!==e.defaultDescription(),n=e.get("extra"),o=n.alertSeries(),r=t._model.mainSeries().stateForAlert();"MainSeries"===o.type&&r.actualSymbol===o.actualSymbol&&(n.mainSeries(r),n.alertSeries(r)),e.set("resolution",t.stateForAlert().interval),n.drawing(t),i||e.setDefaultDescription(),t.localAndServerAlersMismatch=!0}(n),e&&function(e){TradingView.alertsDispatcher.restartAlert(e,{success:function(){t.localAndServerAlersMismatch=!1},error:i,complete:function(){delete t._undoCheckpointAlert},actionSource:"drawing_sync"})}(n)}).fail(i)},0)},n.prototype._getUndoHistory=function(){return this._model._undoModel.undoHistory()},n.prototype.stateForAlert=function(){var e,t;return this.canHasAlert()?((e=this.state()).id=this.idForAlert(),e.uniqueId=this.idForAlert(),e.title=this.title(),e.interval=this._model.mainSeries().interval(),(t=this._getAlertPlots())&&(e.plots=t),e):null},n.prototype._getAlertPlots=function(){return null},n.prototype._linePointsToAlertPlot=function(e,t,i,n){if(2!==e.length)return f.logError("[Drawing Alert] Wrong points"),null;var o=this._model.timeScale();return!o||o.isEmpty()?null:{type:"LinePlot",title:t||this.title(),timestamp:o.indexToTimePoint(0),offset1:e[0].index,offset2:e[1].index,price1:e[0].price,price2:e[1].price,extendBackward:i||!1,extendForward:n||!1}},n.prototype.getAlertIsActive=function(e){this.getAlert({fromCache:!0}).done(function(t){e(!!t&&t.get("active"))}).fail(function(){e(!1)})},n.prototype.geometry=function(){var e=this,t=function(t){var i=t.x/e._model.timeScale().width(),n=t.y/e.priceScale().height()
;return new s(i,n)},i=this.points().map(function(i){var n=e.pointToScreenPoint(i)[0];return t(n)});return i},n.prototype.onlyYMoving=function(){return!1},n.prototype.model=function(){return this._model},n.prototype.isForcedDrawPriceAxisLabel=function(){return this.customization.forcePriceAxisLabel},n.prototype.getInputsPropertyPage=function(){return g.LineToolInputsPropertyPage},n.prototype.getVisibilitiesPropertyPage=function(){return g.LineToolVisibilitiesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("Cn8r").LineDataSourceDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.prototype.getPropertyDefinitionsViewModel=function(){if(null===this._definitionsViewModel){var e=this;return e._getPropertyDefinitionsViewModelClass().then(function(t){if(null===e._model.dataSourceForId(e._id))throw new Error("Linetool "+e.name()+" already deleted");return null===e._definitionsViewModel&&(e._definitionsViewModel=new t(e._model.undoModel(),e)),e._definitionsViewModel}).catch(function(e){return f.logWarn(e),e})}return Promise.resolve(this._definitionsViewModel)},n.prototype.hasEditableCoordinates=function(){return!0},n.prototype.getSourceIcon=function(){return{type:"loadSvg",svgId:"linetool."+this.getType()}},n.prototype.destroy=function(){this.stop(),null!==this._definitionsViewModel&&this._definitionsViewModel.destroy(),this._definitionsViewModel=null},n.prototype.setOwnerSource=function(e){c.prototype.setOwnerSource.call(this,e),e&&this.setPriceScale(e.priceScale())},n.prototype.getOrderTemplate=function(){return null},n.prototype.copiable=function(){return b},n.prototype.cloneable=function(){return!0},n.prototype.movable=function(){return!0},o={frozen:!1,visible:!0,intervalsVisibilities:{seconds:!0,secondsFrom:1,secondsTo:59,minutes:!0,minutesFrom:1,minutesTo:59,hours:!0,hoursFrom:1,hoursTo:24,days:!0,daysFrom:1,daysTo:366,weeks:!0,months:!0,ranges:!0}},n._configureProperties=function(t){var i,n;if(t.hasChild("visible")||t.addChild("visible",new e(o.visible)),t.hasChild("frozen")||t.addChild("frozen",new e(o.frozen)),t.addExclusion&&(t.addExclusion("visible"),t.addExclusion("frozen")),t.hasChild("intervalsVisibilities"))for(n in i=r(t.child("intervalsVisibilities")),o.intervalsVisibilities)i.hasChild(n)||i.addChild(n,new e(o.intervalsVisibilities[n]));else t.addChild("intervalsVisibilities",new e(o.intervalsVisibilities));t.addExclusion&&(t.addExclusion("symbol"),t.addExclusion("symbolInfo"),t.addExclusion("points"),t.addExclusion("interval")),t.hasChild("lastUpdateTime")||(t.addChild("lastUpdateTime",new e(0)),t.addExclusion&&t.addExclusion("lastUpdateTime"))},t.LineToolPriceAxisView=a,t.LineDataSource=n}).call(this,i("tc+8"))},SzKR:function(e,t,i){},T6Of:function(e,t,i){"use strict";var n,o;i.r(t),i.d(t,"LimitedPrecisionNumericFormatter",function(){return o}),n=i("ogJP"),o=function(){function e(e){void 0===e&&(e=1),this._precision=e}return e.prototype.format=function(e){var t,i
;return Object(n.isNumber)(e)||(e=parseFloat(e)),t=e.toFixed(this._precision),i=Math.pow(10,-this._precision),Math.max(parseFloat(t),i)+""},e.prototype.parse=function(e){var t=parseFloat(e);return isNaN(t)?{res:!1}:{res:!0,price:t,suggest:this.format(t)}},e}()},TBaH:function(e,t,i){"use strict";var n,o,r,s,a,l,c;i.r(t),i.d(t,"LineToolGannFixed",function(){return c}),n=i("mrSG"),o=i("aO4+"),r=i("Ss5c"),s=i("LAp3"),a=i("hayr"),l=window.t("Gann Square Fixed"),(c=function(e){function t(n,o){var r=e.call(this,n,o||t.createProperties())||this;return r._constructor="LineToolGannFixed",i.e("lt-pane-views").then(function(e){var t=i("wdUH").GannFixedPaneView;r._setPaneViews([new t(r,r.model())])}.bind(null,i)).catch(void 0),r.properties().childs().reverse.subscribe(r,r._reversePoints),r}return Object(n.__extends)(t,e),t.prototype.pointsCount=function(){return 2},t.prototype.title=function(){return l},t.prototype.name=function(){return"Gann Square Fixed"},t.prototype.properties=function(){return e.prototype.properties.call(this)},t.prototype.getStylesPropertyPage=function(){return a.propertyPages.LineToolGannFixedStylesPropertyPage},t.prototype.axisPoints=function(){var e=this.points(),t=this.getScreenPoints();return e.length<2||t.length<2?[]:[e[0],this.screenPointToPoint(t[1])]},t.prototype.getScreenPoints=function(){var e,t,i,n,r,s,a,l,c,u,h=this.points();return h.length<2?[]:null===(e=this._calcAngle())?[]:(t=h[0],i=h[1],n=this.pointToScreenPoint(t)[0],r=this.pointToScreenPoint(i)[0],s=Math.sqrt(Math.pow(n.x-r.x,2)+Math.pow(n.y-r.y,2)),c=(l=(a=new o.Point(Math.cos(e),-Math.sin(e))).normalized()).x<0?-1:1,u=l.y<0?-1:1,[n.addScaled(a,s),n.add(new o.Point(5*s*c,5*s*u))])},t.prototype.levelsCount=function(){return this.properties().childs().levels.childCount()},t.prototype.levels=function(){var e,t,i=[],n=this.properties().childs(),o=n.levels.childCount();for(e=0;e<o;e++)t=n.levels.childs()[e].childs(),i.push({index:e,visible:t.visible.value(),color:t.color.value(),width:t.width.value()});return i},t.prototype.fanLinesCount=function(){return this.properties().childs().fanlines.childCount()},t.prototype.fanLines=function(){var e,t,i=[],n=this.properties().childs(),o=n.fanlines.childCount();for(e=0;e<o;e++)t=n.fanlines.childs()[e].childs(),i.push({index:e,visible:t.visible.value(),x:t.x.value(),y:t.y.value(),color:t.color.value(),width:t.width.value()});return i},t.prototype.arcsCount=function(){return this.properties().childs().arcs.childCount()},t.prototype.arcs=function(){var e,t,i=[],n=this.properties().childs(),o=n.arcs.childCount();for(e=0;e<o;e++)t=n.arcs.childs()[e].childs(),i.push({index:e,visible:t.visible.value(),x:t.x.value(),y:t.y.value(),color:t.color.value(),width:t.width.value()});return i},t.prototype.arcsBackgroundTransparency=function(){return this.properties().childs().arcsBackground.childs().transparency.value()},t.prototype.isArcsBackgroundFilled=function(){return this.properties().childs().arcsBackground.childs().fillBackground.value()},t.createProperties=function(e){var i=Object(s.a)("linetoolgannfixed",e)
;return t._configureProperties(i),i},t.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"WfUZ")).then(function(e){return e.GannComplexAndFixedDefinitionsViewModel})},t._configureProperties=function(e){r.LineDataSource._configureProperties(e)},t.prototype._calcAngle=function(){var e,t,i,n,o,r=this.points();return r.length<2?null:(e=r[0],t=r[1],i=this.pointToScreenPoint(e)[0],(n=this.pointToScreenPoint(t)[0].subtract(i)).length()<=0?null:(n=n.normalized(),o=Math.acos(n.x),n.y>0&&(o=-o),o))},t.prototype._reversePoints=function(){var e=this._points,t=e[0],i=e[1];this._points[0]=i,this._points[1]=t,this.normalizePoints(),this.restart()},t}(r.LineDataSource)).prototype.superclass=r.LineDataSource},TMWk:function(e,t,i){"use strict";function n(e,t,i,n){s.call(this,e,t,i,n),this._underlyingData=new a(l(n))}var o=i("Eyy1").assert,r=i("ogJP").clone,s=i("GVHu").Study,a=i("k9/m").PlotList,l=i("w4Ji").studyPlotFunctionMap;inherit(n,s),n.prototype.clearData=function(){s.prototype.clearData.call(this),this._underlyingData.clear()},n.prototype._mergeData=function(e){var t,i;this._invalidateLastNonEmptyPlotRowCache(),t=this._underlyingData.firstIndex(),this._underlyingData.merge(e),t!==this._underlyingData.firstIndex()&&(this.m_data=new a(l(this._metaInfo),function(e,t){return null==e[t]})),i=this.m_data.lastIndex(),this._underlyingData.range(i,this._underlyingData.lastIndex()).each(function(e,t){return this.m_data.add(e,r(t)),!1}.bind(this)),this._plotsForStrategyProcessing().forEach(function(e){this._createStrategy(e.strategy,e.strategyIndex,e.targetIndex,i).rebuildData(this.m_data)},this)},n.prototype._plotsForStrategyProcessing=function(){var e=["dataoffset"],t=[];return this._metaInfo.plots.forEach(function(i,n){var r,s,a=e.indexOf(i.type)>-1;a&&(r=null,this._metaInfo.plots.forEach(function(e,t){e.id===i.target&&(r=t)}),o(r>=0,"target plot not found for strategy plot "+i.id),s={strategy:i.type,strategyIndex:n,targetIndex:r},t.push(s))},this),t},n.prototype._createStrategy=function(e,t,i,o){return new n["Strategy_"+e](t,i,o)},n.Strategy_dataoffset=function(e,t,i){this._strategyPlotIndex=e,this._targetPlotIndex=t,this._startIndex=i},n.Strategy_dataoffset.prototype.rebuildData=function(e){var t=this._targetPlotIndex+1,i=this._strategyPlotIndex+1,n=null,o=null;e.range(this._startIndex||e.firstIndex(),e.lastIndex()).each(function(r,s){var a,l,c,u=s[t],h=s[i]?Math.round(s[i]):null;return s[t]=null,s[i]=null,!(!h||h>0)&&(l={pointIndex:a=r+h,value:u},o?o.pointIndex!==l.pointIndex&&(a>=0&&(e.valueAt(a)[t]=u),c=!1,n&&(c=n.value<=o.value&&o.value<=u||n.value>=o.value&&o.value>=u),c?o.pointIndex>=0&&(e.valueAt(o.pointIndex)[t]=null):n=o,o=l):o=l,!1)})},t.study_ScriptWithDataOffset=n},TQMj:function(e,t,i){"use strict";function n(e){return("0"+e).slice(-2)}var o,r,s,a,l,c,u,h,d,p,_;i.r(t),i.d(t,"SeriesPriceAxisView",function(){return _}),o=i("mrSG"),r=i("Eyy1"),s=i("LxhU"),a=i("KcY8"),l=i("Kxc7"),c=i("oXaB"),u=l.enabled("countdown"),
h=l.enabled("price_scale_always_last_bar_value"),d=[0,1,2,3,9,8],p=l.enabled("force_exchange_as_title"),_=function(e){function t(t,i){var n=e.call(this)||this;return n._source=t,n._data=i,n}return Object(o.__extends)(t,e),t.prototype._getSource=function(){return this._source},t.prototype._getData=function(){return this._data},t.prototype._isCountdownEnabled=function(){return u},t.prototype._countdownText=function(){var e,t,i,o,a,l,c,u,h,d=s.Interval.parse(this._source.interval());return d.isDWM()||d.isSeconds()&&1===d.multiplier()?"":(e=1e3*Object(r.ensure)(Object(r.ensureNotNull)(this._source.data().bars().last()).value[0]),t=1e3*this._source.serverTimeOffset(),i=s.Interval.parse(this._source.interval()).inMilliseconds(),o=e.valueOf()+i,a=(new Date).valueOf()+t,(l=Math.round((o-a)/1e3))<=0?"":(c=null,(l=Math.min(l,i/1e3))>=3600&&(c=n(Math.floor(l/3600))),l%=3600,u=n(Math.floor(l/60)),l%=60,h=n(Math.floor(l)),null!==c?c+":"+u+":"+h:u+":"+h))},t.prototype._updateRendererData=function(e,t,i){var n,o,r,s,a,l,p,_,f,m,y,g;e.visible=!1,t.visible=!1,12!==(n=this._source.properties()).style.value()&&(r=(o=this._data.model.properties().scalesProperties).showSeriesLastValue.value(),s=u&&-1!==d.indexOf(n.style.value())&&n.showCountdown.value(),a=o.showSymbolLabels.value(),l=o.seriesLastValueMode.value()===c.PriceAxisLastValueMode.LastPriceAndPercentageValue,(p=this._source.lastValueData(void 0,h)).noData||(_=8===n.style.value(),(r||s||a)&&_&&n.haStyle.showRealLastPrice.value()&&(f=this._source.lastValueData(void 0,!1),m=this._source.lastValueData(void 0,!0),f.noData||m.noData||f.index!==m.index||(r=!1,s=!1,a=!1)),(r||s)&&(y=this._axisFirstLineText(p,r,l),g=s?this._countdownText():"",0===y.length?(e.text=g,e.secondLine=""):(e.text=y,e.secondLine=g),0===y.length&&0===g.length||(e.visible=!0)),(a||l)&&(t.text=this._paneText(p,r,a,l),t.visible=t.text.length>0),i.background=this._source.priceLineColor(p.color),i.color=this.generateTextColor(i.background),i.coordinate=p.coordinate,i.floatCoordinate=p.floatCoordinate))},t.prototype._paneText=function(e,t,i,n){var o,r="";return p?r+=(o=this._source.symbolInfo())?o.exchange+" ":"":i&&(r+=this._source.firstShortName()+" "),t&&n&&(r+=this._source.priceScale().isPercentage()?e.formattedPriceAbsolute:e.formattedPricePercentage),r.trim()},t.prototype._axisFirstLineText=function(e,t,i){return t?i?this._source.priceScale().isPercentage()?e.formattedPricePercentage:e.formattedPriceAbsolute:e.text:""},t}(a.a)},TTFo:function(e,t,i){"use strict";function n(e,t){return t<0&&(e=-e),e/100*t+t}function o(e,t){var i=100*(e-t)/t;return t<0?-i:i}function r(e,t){var i=o(e.minValue(),t),n=o(e.maxValue(),t);return new h.PriceRange(i,n)}function s(e,t){return e-=100,t<0&&(e=-e),e/100*t+t}function a(e,t){var i=100*(e-t)/t+100;return t<0?-i:i}function l(e,t){var i=a(e.minValue(),t),n=a(e.maxValue(),t);return new h.PriceRange(i,n)}function c(e){var t,i=Math.abs(e);return i<1e-8?0:(t=Object(d.log10)(i+1e-4)+4,e<0?-t:t)}function u(e){var t,i=Math.abs(e);return i<1e-8?0:(t=Math.pow(10,i-4)-1e-4,e<0?-t:t)}var h,d
;i.r(t),i.d(t,"fromPercent",function(){return n}),i.d(t,"toPercent",function(){return o}),i.d(t,"toPercentRange",function(){return r}),i.d(t,"fromIndexedTo100",function(){return s}),i.d(t,"toIndexedTo100",function(){return a}),i.d(t,"toIndexedTo100Range",function(){return l}),i.d(t,"toLog",function(){return c}),i.d(t,"fromLog",function(){return u}),h=i("Qb4w"),d=i("Hr11")},TcSq:function(e,t,i){"use strict";function n(e){var t=e.indexOf("$"),i=e.indexOf("@");return t<0&&i>=0?null:e.substring(Math.max(t+1,0),i>=0?i:e.length)}function o(e){return e.startsWith("PUB;")}i.r(t),i.d(t,"extractPineId",function(){return n}),i.d(t,"isPublisedPineId",function(){return o})},TlGQ:function(e,t,i){"use strict";function n(e,t,i){return Object(r.isArray)(e)?function(e,t,i){return e.map(function(e){var o=n(e,t,i),r=t(o);return void 0!==r?r:o})}(e,t,i):Object(r.isObject)(e)&&(Object(r.isHashObject)(e)||i&&i.visitInstances)?function(e,t,i){var o={};return Object.keys(e).forEach(function(r){var s=n(e[r],t,i),a=t(s);o[r]=void 0!==a?a:s}),o}(e,t,i):e}function o(e,t,i){var o=n(e,t,i),r=t(o);return void 0!==r?r:o}var r;i.r(t),i.d(t,"visitObject",function(){return o}),r=i("ogJP")},TmNs:function(e,t,i){"use strict";var n,o,r,s,a,l,c,u,h;i.r(t),n=i("mrSG"),o=i("KcY8"),r=i("Eyy1"),s=i("jFln"),a=i("8Uy/"),l=function(){function e(e,t){this.setData(e,t)}return e.prototype.setData=function(e,t){this._data=e,this._commonData=t},e.prototype.draw=function(e,t,i,n,o){if(this._data.visible){var l=this._commonData.coordinate;void 0!==this._commonData.fixedCoordinate&&(l=this._commonData.fixedCoordinate),e.lineWidth=Object(r.ensureDefined)(this._data.linewidth),e.lineCap="square",Object(s.setLineStyle)(e,void 0===this._data.linestyle?a.LINESTYLE_DOTTED:this._data.linestyle),e.strokeStyle=this._commonData.color,e.beginPath(),e.moveTo(0,l),e.lineTo(n,l),e.stroke()}},e.prototype.height=function(e,t){return 0},e}(),i.d(t,"PriceLineAxisView",function(){return c}),i.d(t,"SeriesPriceLineAxisView",function(){return u}),i.d(t,"StudyPriceLineAxisView",function(){return h}),c=function(e){function t(){return e.call(this,l)||this}return Object(n.__extends)(t,e),t.prototype._updateRendererData=function(e,t,i){if(t.visible=!1,e.visible=!1,this._isVisible()){var n=this._value();n.noData||(i.background="",i.color=this._priceLineColor(n.color),i.coordinate=n.coordinate,i.floatCoordinate=n.floatCoordinate,e.linewidth=this._lineWidth(),e.visible=!0)}},t}(o.a),u=function(e){function t(t){var i=e.call(this)||this;return i._series=t,i}return Object(n.__extends)(t,e),t.prototype._value=function(){return this._series.lastValueData(void 0,!0)},t.prototype._priceLineColor=function(e){return this._series.priceLineColor(e)},t.prototype._lineWidth=function(){return this._series.properties().priceLineWidth.value()},t.prototype._isVisible=function(){var e=this._series.model().properties().scalesProperties,t=e.showSeriesLastValue.value();return this._series.properties().showPriceLine.value()&&t},t}(c),h=function(e){function t(t,i){var n=e.call(this)||this;return n._study=t,n._plotname=i,n}
return Object(n.__extends)(t,e),t.prototype._value=function(){return this._study.lastValueData(this._plotname,!0)},t.prototype._lineWidth=function(){return this._study.properties().styles[this._plotname].linewidth.value()},t.prototype._priceLineColor=function(e){return e},t.prototype._isVisible=function(){var e=this._study.model().properties().scalesProperties,t=e.showStudyLastValue.value();return this._study.properties().styles[this._plotname].trackPrice.value()&&t},t}(c)},Tmoa:function(e,t,i){"use strict";function n(e,t,i){var n,o,s,a,u;return t=t||0,l(e)?(o=(n=Object(c.parseRgb)(e))[0],s=n[1],a=n[2],u=Object(c.normalizeAlphaComponent)(r(t)),Object(c.rgbaToString)([o,s,a,u])):i?Object(c.rgbaToString)(Object(c.rgba)(Object(c.parseRgb)(e),Object(c.normalizeAlphaComponent)(r(t)))):e}function o(e){return 100*(1-e)}function r(e){if(e<0||e>100)throw new Error("invalid transparency");return 1-e/100}function s(e){return l(e)?e:Object(c.rgbaToString)(Object(c.rgba)(Object(c.parseRgb)(e),Object(c.normalizeAlphaComponent)(1)))}function a(e){var t=Object(c.parseRgb)(e).map(function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)});return Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function l(e){return 0===e.indexOf("#")}var c;i.r(t),i.d(t,"generateColor",function(){return n}),i.d(t,"alphaToTransparency",function(){return o}),i.d(t,"transparencyToAlpha",function(){return r}),i.d(t,"resetTransparency",function(){return s}),i.d(t,"getLuminance",function(){return a}),i.d(t,"isHexColor",function(){return l}),c=i("eJTA")},TohL:function(e,t,i){"use strict";function n(e,t){var o=t||n.createProperties();l.call(this,e,o),i.e("lt-pane-views").then(function(t){var n=i("mr3a").TextPaneView,o=i("5Dp4").MarkPaneView,r=[new o(this,e,this.image,this.width,this.height,this.offsetX,this.offsetY)],s=this._createTextPaneView(n);null!==s&&r.push(s),this._setPaneViews(r)}.bind(this).bind(null,i)).catch(i.oe)}function o(e,t){this._constructor="LineToolArrowMarkLeft",n.call(this,e,t)}function r(e,t){this._constructor="LineToolArrowMarkUp",n.call(this,e,t)}function s(e,t){this._constructor="LineToolArrowMarkRight",n.call(this,e,t)}function a(e,t){this._constructor="LineToolArrowMarkDown",n.call(this,e,t)}var l=i("Ss5c").LineDataSource,c=i("tc+8"),u=i("Ocx9").DefaultProperty,h=i("hayr").propertyPages,d=window.t("Arrow Mark"),p=window.t("Arrow Mark Left"),_=window.t("Arrow Mark Up"),f=window.t("Arrow Mark Right"),m=window.t("Arrow Mark Down");inherit(n,l),n.prototype.width=21,n.prototype.height=21,n.prototype.offsetX=0,n.prototype.offsetY=0,n.prototype.paneViews=function(){var e=l.prototype.paneViews.call(this);return null!==e&&this._textPaneView&&e.push(this._textPaneView),e},n.prototype.pointsCount=function(){return 1},n.prototype.title=function(){return d},n.prototype.name=function(){return"Arrow Mark"},n.prototype.getStylesPropertyPage=function(){return h.LineToolArrowMarkStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){
return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("5sLb").ArrowMarkDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.prototype.template=function(){var e=l.prototype.template.call(this);return e.text=this.properties().childs().text.value(),e},n.prototype._applyTemplateImpl=function(e){l.prototype._applyTemplateImpl.call(this,e),this.properties().childs().text.setValue(e.text)},n.prototype._createTextPaneView=function(e){return null},n.createProperties=function(e){var t=new u("linetoolarrowmark",e);return n._configureProperties(t),t},n._configureProperties=function(e){l._configureProperties(e),e.hasChild("text")||e.addChild("text",new c("")),e.addExclusion("text")},inherit(o,n),o.prototype.image=new Image,o.prototype.image.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAB50lEQVR4AWMgETAKKAgIAGkQ5mCgAmCWdtTWV4yxvgFkWwKxOKUGssr5Gccrx9t+Vk6w+w/kxwKxIrmGMTKIivIohFvONKsI+e/cl/ofamgGECuTYyCTqJ2mqlK01Vnr+uj/HjNy/1v1J8AMzSTHUBYZP6MgpTjb97bNsf9dpmf9N++J/W/UEQEztAiIbUEGo2EpIObE8C4oVuVDzLuBmv869aT8t5+c+t+0K/q/YXs4GGsWeIAMRscwy/yhBiO8K2ijJKcYZXXYuj7qv/u0nP/W/Yn/jTsjQYYRwliDhUXKy8BVKdbmuW1T7H+3Gdn/LXrjQN4FaSDLUBa5MItyoOAvp67k/45T0pC9S56hSrHWhY4tif9D5pUDXZjz36w7Blkx+S5VDLNoBUWMY3fKfwdExMAw+WEq7Wvkoxhn+waUhFwRSYhcQxGxL26jpqQYbX3CBpjY3aeDYj+BothHpFNxcW75cIvJpmXB/516Uv/bT0r5b9IVRUY6xQSssr6GkcAc9dGuNe6/y7RMMnMUJmCWcNTSBgbHZeuG6P+eM/P+W/VRlPcRwSGoJMgvH265yKIq/L9LfzqKoZSXp0Em6cDy9BvU0Dhyy1PM4PAwMFWKs7kFZFsBsQQDlQAjr4a0MJAWxFdHAQAcI3sGHsO1dgAAAABJRU5ErkJggg==",o.prototype.offsetX=1,o.prototype.offsetY=-10,o.prototype.title=function(){return p},o.prototype.name=function(){return"Arrow Mark Left"},o.prototype._createTextPaneView=function(e){var t=new e(this,this._model,22,-3,"middle","left");return t.disableSelection(),t},o.createProperties=function(e){return n.createProperties(e)},inherit(r,n),r.prototype.image=new Image,r.prototype.image.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAACBklEQVR4AWMgErAoxVoXgmgGKgEWxTCLVseWxP9yYRbl1DCYSdrXyEc5we5vyLzy/0D6l5SXgStInFwDGcVt1JQU42zfOHan/HebkfPfqSv5v1KszXNBGyU5kDzpRoqLcytGW5+wbY797zA59b9Zd8x/xylp/22bYv8rRlkdBqrgINVIVvlwi8k29dH/Xadn/Tftiv5v2B4Opt1mZP+3ro/6Lx9i3k1K+DLL+hpGmpYF/3efnvPfvCcWZCAcW/TG/XeflvMfFM4yfkZBxIQvo4SjlrZSnO1Hp57U/9b9Cf+NOiKQDQXxgeKJ/516Uv4D1b0XtdNUxRu+gkqC/MBwvGzXGvffflLKf+POSISBCAwWtweGMyi8laKtzjKIivLgCUfLRdYN0f9dpmX+N+mKghiCieHh6wIMb2tguCuEW84E6ccIR7kgk3SLqvD/njPzYOFICIPVeczI/W9WEfJfzs84HmQOIhw9DEyV422/ufSn/7fqg4cjIQxWZwUMd+e+1P9A/Z+lHbX1weHLqyEtrBRncwsYm/+RsWaBBz4DwfLoehRjrG8IKAgIgOMHiK2AOA6IM6G4CKgIr6EgeZA6qPoMII4FYksgFmCA5gwJIFYEYmUotiXSUFuYHqh+cXw5TZlIQ5WxaR4mhuLBZBkqBcT+oJjFg/3B6kgAnFANyniwFEQdJgAAOuN7Bp7MBuYAAAAASUVORK5CYII=",r.prototype.offsetX=-9,r.prototype.offsetY=0,r.prototype.title=function(){return _},r.prototype.name=function(){return"Arrow Mark Up"},r.prototype._createTextPaneView=function(e){var t=new e(this,this._model,0,18,"top","center");return t.disableSelection(),t},r.createProperties=function(e){return n.createProperties(e)},inherit(s,n),
s.prototype.image=new Image,s.prototype.image.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAB60lEQVR4AWPAAziAWJBXQ1oYSDMyUAlIALGVUpzNLQkPA1Mgm5kahioCcZxygt1/5Xjbb3JBJulAPiulhioDcSbIUJf+9P8WVeH/5cMtFwkqCfKDgoNiQ636Ev57zsz7b90Q/V8x2vqyhKOWNqHg4ARiKZAhaNgWiItAhhp1RPw374n97zIt879da9x/pTjbj7K+hpE4gwNqoD9IMzasWeDx37A9HIxNuqL+209K+e/Uk/rftCwYGBwWkxnExbkRwYHpTZBGgti4M/K/dX/Cf/fpOf9t6sHBcULcRk0JaAYT6YYiMDw4XKdn/bdtjv2vGGf7RtrXyAdoDguZhiKwaVf0f4fJqf8du1NAQfVXMcyiFWQwmYYisFl3zH+3GTn/Q+aV/3dsSfyvFGtdSLFLHaek/XfqSga59JdcmEU5yKVkh6lFbxzQhdn/bZtiga6zeS7lZeAKMpCC2E/87z4t5791fdR/xSirw4I2SnKg2CcxnSK8aw+MGKceSMTIh5h3Q0szRvJzFCQJgXLUexk/oyCQd8nP+8DE7jEjF+jd6P9K0VZnRe00VWHeJcfQDJChzn2p/80qQv4rhFvOZBAV5QF5l5LyNBZann6W8zOOp0Z5Kg7Eloox1jekHbX1qVLyQ2NVQEBBQIBU7wIAOFZ7BmG7RzYAAAAASUVORK5CYII=",s.prototype.offsetX=-19,s.prototype.offsetY=-10,s.prototype.title=function(){return f},s.prototype.name=function(){return"Arrow Mark Right"},s.prototype._createTextPaneView=function(e){var t=new e(this,this._model,-22,-3,"middle","right",!0);return t.disableSelection(),t},s.createProperties=function(e){return n.createProperties(e)},inherit(a,n),a.prototype.image=new Image,a.prototype.image.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAB/UlEQVR4AWPAATj3Wij8J4RB6hhIAFIgTS9a8nBhmKFSpBiqDNJ0P80PF4YZqkyyobfD7HDh4WJolaKY+G5zhXvoMXva2xifoWB5dD07zeTvFKvxioDMFY6RFUgEGvzzQVk8OGafVib9v5fkhc9QkDxIHVj9vaKY/7vM5b+HS/JFA80TAhnKA8TGZSoiS057GYFiFqzhTpQTPkNB8iB1YPUnPQz+5ykKzQGaYwjE3CBDmUCuBWKHabqSZ0656oI0EY1B6idoSx4F6reDupIJFrTMQCwtxsYcvNZY5uU5T0OiDDwLdOFKI9knvMzM/kD9kmBz0AAbEKs6iHAX7zSX/3nF3xyvgZd8Tf9vM5P/ZiXAmQdNBazYEgIjEHOBwiVHXmjWcSctnAbeDLH5f8xR83+SjNBEoHo9sD4owGWwIBDb9mtJHMIVviDxDg3x3UB11kDMD9ZHADCDwkeAmdlvhZHMI2C4oRh4xl3//1IDmbvszAxeQHXiUPWEATR8lE0EubJB4QYMP7CBF31M/m82k/usy8uRCpRXAKsjEXCCwiteVqD/qIPG/+tBVv/3WCj8C5Pi7wCKawMxBwMZgBEaXlbtGuI7T7ro/G9QFdsI5JsDMR/+cCQcvuLsLAzubRoSa4FsJyAWBSdwsgEifKVBXoYmcBYGagCoQZzEGggAoyq6zKXuV5gAAAAASUVORK5CYII=",a.prototype.offsetX=-9,a.prototype.offsetY=-18,a.prototype.title=function(){return m},a.prototype.name=function(){return"Arrow Mark Down"},a.prototype._createTextPaneView=function(e){var t=new e(this,this._model,0,-23,"bottom","center");return t.disableSelection(),t},a.createProperties=function(e){return n.createProperties(e)},s.prototype.version=o.prototype.version=a.prototype.version=r.prototype.version=2,t.LineToolArrowMark=n,t.LineToolArrowMarkLeft=o,t.LineToolArrowMarkRight=s,t.LineToolArrowMarkUp=r,t.LineToolArrowMarkDown=a},TrvT:function(e,t,i){"use strict";var n,o,r,s,a,l,c,u;i.r(t),i.d(t,"CompareDataWindowView",function(){return u}),n=i("mrSG"),o=i("it7y"),r=i("e92V"),s=i("mMWL"),a=i("qFKp"),l=i("ogJP"),c=a.CheckMobile.any(),u=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._studyCompare=t,n}return Object(n.__extends)(t,e),t.prototype._updateImpl=function(){e.prototype._updateImpl.call(this),this._items[0].setTitle(this._studyCompare.guiPlotName(""))},t.prototype._hideValues=function(){return!1},t.prototype._currentIndex=function(){
var e,t=this._model.crossHairSource().lockedIndex,i=c&&(null===this._model.crossHairSource().pane&&void 0===t||Object(r.a)(s.tool.value())||null!==this._model.lineBeingEdited());return i?e=this._study.data().lastIndex():(e=this._model.crossHairSource().appliedIndex(),Object(l.isNumber)(e)||(e=this._study.data().lastIndex())),e},t}(o.StudyDataWindowView)},TzTt:function(e,t,i){"use strict";function n(e,t){var i,n;return i=null==t?document.documentElement:9===t.nodeType?t.documentElement:t,r&&(n=r.get(i)),n||((n=i.ownerDocument.createRange()).selectNodeContents(i),r&&r.set(i,n)),n.createContextualFragment(e)}function o(e,t){var i,o,r,s=n(e,t);if("firstElementChild"in s)i=s.firstElementChild;else for(i=null,o=0;o<s.childNodes.length;o++)if(1===(r=s.childNodes[o]).nodeType){i=r;break}return null!==i&&s.removeChild(i),i}var r;i.r(t),i.d(t,"parseHtml",function(){return n}),i.d(t,"parseHtmlElement",function(){return o}),"WeakMap"in window&&(r=new WeakMap)},"U/gD":function(e,t,i){"use strict";function n(e,t){var i,n,r;return void 0===t&&(t=Date.now()),n="",(r=(i=Object(o.get_timezone)(e).offset_utc(t))/1e3/60/60)%1&&(n=":"+r%1*60),"",{offset:i,string:"UTC"+(r>0?"+"+(r-r%1)+n:0===r?"":String(r-r%1+n))}}var o;i.d(t,"a",function(){return n}),o=i("jCNj")},"U0+/":function(e,t,i){"use strict";function n(e){e.description_localized=window.t(e.description,{context:"study"})}function o(e,t){var i,n,o,r,s,u=new a.a(t);return Object(l.migrateMetaInfoAndPropState)(u),i=!0,-1===(n=e.findIndex(function(e){return e.id===u.id}))?e.push(u):(r=void 0!==(o=e[n]).pine?c.Version.parse(o.pine.version):null,null===(s=void 0!==u.pine?c.Version.parse(u.pine.version):null)||null===r||s.isGreaterOrEqual(r)?(o.removeDefaults(),e[n]=u):i=!1),i&&u.createDefaults(),u}var r,s,a,l,c,u,h,d;i.r(t),i.d(t,"StudyMetaInfoRepository",function(){return d}),i("YFKU"),r=i("Eyy1"),s=i("0YCj"),a=i.n(s),l=i("Si3H"),c=i("lCO3"),u=i("uOxu"),h=Object(u.getLogger)("Chart.Studies.StudyMetaInfoRepository",{color:"#606"}),d=function(){function e(e){this._nextRequestNumber=1,this._rawStudiesMetaInfo=[],this._isReady=!1,this._metaInfoQueryQueue=[],this._javaMetaInfoQueryQueue=[],this._javaStudiesMetaInfo=[],this._pineMetaInfoCache=[],this._studiesMigrations=[],this._gateway=e}return e.prototype.requestMetaInfo=function(){var e,t=this;return this._requestStarted(),e=this._makeNextRequestId(),h.logNormal("Requesting metainfo #"+e),new Promise(function(i){h.logNormal("Requesting studies metadata #"+e),t._gateway.requestMetadata(e,function(n){var o;h.logNormal("Requesting studies metadata #"+e+" finished"),o=n.params[1].metainfo.slice(),t._processLibraryMetaInfo(o),t._requestFinished(),i()})})},e.prototype.findById=function(e){if(!this._isReady)return this._enqueueMetaInfoQuery(e);var t=this._findStudyMetaInfo(e);if(null!==t)return Promise.resolve(t);if("pine"===e.type)return this._compilePine(e);throw new ReferenceError("unexpected study id="+e.studyId+" with type="+e.type)},e.prototype.findByIdSync=function(e){return this._findStudyMetaInfo(e)},e.prototype.isReady=function(){
return this._isReady},e.prototype.findAllJavaStudies=function(){return this._isReady?Promise.resolve(this._javaStudiesMetaInfo):this._enqueueJavaMetaInfoQuery()},e.prototype.getInternalMetaInfoArray=function(){return this._javaStudiesMetaInfo},e.prototype.getMigrations=function(){return this._studiesMigrations},e.prototype.addPineMetaInfo=function(e){return o(this._pineMetaInfoCache,e)},e.prototype._processMigrations=function(e){throw new Error("not implemented")},e.prototype._processSiteMetaInfo=function(e,t){throw new Error("not implemented")},e.prototype._processLibraryMetaInfo=function(e){var t,i,r;for(t=0,i=e;t<i.length;t++)n(r=i[t]),o(this._javaStudiesMetaInfo,r);this._javaStudiesMetaInfo=this._javaStudiesMetaInfo.sort(function(e,t){var i=e.description_localized||e.description,n=t.description_localized||t.description;return i>n?1:i<n?-1:0}),a.a.overrideDefaults(this._javaStudiesMetaInfo)},e.prototype._requestStarted=function(){this._isReady=!1,this._javaStudiesMetaInfo=[],this._pineMetaInfoCache=[],this._studiesMigrations=[],this._rawStudiesMetaInfo=[]},e.prototype._requestFinished=function(){this._isReady=!0,this._processPendingMetaInfoQueries(),this._processPendingFullMetaInfoQueries()},e.prototype._enqueueMetaInfoQuery=function(e){var t=this;return new Promise(function(i){t._metaInfoQueryQueue.push({studyDescriptor:e,resolver:i})})},e.prototype._enqueueJavaMetaInfoQuery=function(){var e=this;return new Promise(function(t){e._javaMetaInfoQueryQueue.push({resolver:t})})},e.prototype._processPendingMetaInfoQueries=function(){for(;this._metaInfoQueryQueue.length;){var e=this._metaInfoQueryQueue.shift();this.findById(e.studyDescriptor).then(e.resolver)}},e.prototype._processPendingFullMetaInfoQueries=function(){for(;this._javaMetaInfoQueryQueue.length;){this._javaMetaInfoQueryQueue.shift().resolver(this._javaStudiesMetaInfo)}},e.prototype._findStudyMetaInfo=function(e){return"java"===e.type?this._javaStudiesMetaInfo.find(function(t){return t.id===e.studyId})||null:this._pineMetaInfoCache.find(function(t){return t.scriptIdPart===e.pineId&&(void 0===e.pineVersion||Object(r.ensureDefined)(t.pine).version===e.pineVersion)})||null},e.prototype._makeNextRequestId=function(){return"metadata_"+this._nextRequestNumber++},e.prototype._compilePine=function(e){throw new Error("unsupported")},e}()},UCMi:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolDateAndPriceRange";var r=t||n.createProperties();o.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("UcQu").DateAndPriceRangePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=window.t("Date and Price Range");inherit(n,o),n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return a},n.prototype.name=function(){return"Date and Price Range"},n.prototype.getStylesPropertyPage=function(){return s.LineToolDateAndPriceRangeStylesPropertyPage},n.createProperties=function(e){
var t=new r("linetooldateandpricerange",e);return n._configureProperties(t),t},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("Ax76").GeneralDatePriceRangeDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolDateAndPriceRange=n},UCjq:function(e,t,i){"use strict";function n(e,t){return e.position-t.position}function o(e,t,i){var n=(e.position-t.position)/(e.time-t.time);return Math.sign(n)*Math.min(Math.abs(n),i)}function r(e){return!e||!e.customization||!e.customization.disableSelection}var s,a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P,C,T,x,I,L,M,A,k;i.r(t),s=i("Eyy1"),a=i("aO4+"),l=i("qFKp"),c=i("FQhm"),u=i("ogJP"),h=i("FIi8"),d=i("VdBB"),p=i("vTIA"),_=i("CW80"),f=i("mMWL"),m=i("bOGh"),y=i("fTGZ"),g=i("ikwP"),v=i("mE5r"),S=i("1IXQ"),b=function(){function e(e,t,i,n){this._position1=null,this._position2=null,this._position3=null,this._position4=null,this._animationStartPosition=null,this._duration=0,this._speed=0,this._terminated=!1,this._minSpeed=e,this._maxSpeed=t,this._acceleration=i,this._minMove=n}return e.prototype.addPosition=function(e,t){if(null!==this._position1){if(this._position1.time===t)return void(this._position1.position=e);if(Math.abs(this._position1.position-e)<this._minMove)return}this._position4=this._position3,this._position3=this._position2,this._position2=this._position1,this._position1={time:t,position:e}},e.prototype.start=function(e,t){var i,r,s,a,l,c,u,h,d,p,_;if(null!==this._position1&&null!==this._position2&&!(t-this._position1.time>50)){for(i=0,a=[r=o(this._position1,this._position2,this._maxSpeed)],l=[s=n(this._position1,this._position2)],i+=s,null!==this._position3&&(c=o(this._position2,this._position3,this._maxSpeed),Math.sign(c)===Math.sign(r)&&(u=n(this._position2,this._position3),a.push(c),l.push(u),i+=u,null!==this._position4&&(h=o(this._position3,this._position4,this._maxSpeed),Math.sign(h)===Math.sign(r)&&(d=n(this._position3,this._position4),a.push(h),l.push(d),i+=d)))),p=0,_=0;_<a.length;++_)p+=l[_]/i*a[_];var f,m;if(!(Math.abs(p)<this._minSpeed))this._animationStartPosition={position:e,time:t},this._speed=p,this._duration=(f=p,m=this._acceleration,Math.abs(f/m))}},e.prototype.getPosition=function(e){var t,i,n;return Object(s.ensureNotNull)(this._animationStartPosition).position+(t=this._speed,i=this._progressDuration(e),n=this._acceleration,Math.sign(t)*(Math.abs(t*i)+.5*n*(i*i)))},e.prototype.finished=function(e){return null===this._animationStartPosition||this._progressDuration(e)===this._duration},e.prototype.terminated=function(){return this._terminated},e.prototype.terminate=function(){this._terminated=!0},e.prototype._progressDuration=function(e){var t=Object(s.ensureNotNull)(this._animationStartPosition),i=e-t.time;return Math.min(i,this._duration)},e}(),w=i("hY0g"),P=i.n(w),C=i("1AAW"),T=i("XcdR"),x=i("dDSx"),i.d(t,"customizationSelectionEnabled",function(){return r}),
i.d(t,"PaneWidgetBase",function(){return k}),I={contextMenuEnabled:!0,priceScaleContextMenuEnabled:!0,tradeContextMenuEnabled:!1,legendWidgetEnabled:!0,controlsEnabled:!0,propertyPagesEnabled:!0,sourceSelectionEnabled:!0},L=l.CheckMobile.any(),M=l.CheckMobile.any(),A=!1,k=function(){function e(e,t,i){var n,o,r,a,l,c,h,d=this;this._legendWidget=null,this._paneControls=null,this._isDestroyed=!1,this._startTrackPoint=null,this._exitTrackingModeOnNextTry=!1,this._startMoveLineToolParams=null,this._preventSourceChange=!1,this._size=new g.Size(0,0),this._themedColor=null,this._startScrollingPos=null,this._isScrolling=!1,this._scrollPriceScale=null,this._scrollXAnimation=null,this._scrollYAnimation=null,this._prevPinchScale=1,this._pinching=!1,this._longTap=!1,this._contextMenuOpenedOnLastMouseDown=!1,this._hideNotMainSourcesInLegendSpawn=null,this._lastClickedSourceId=null,this._chart=e,this._state=t,this._options=Object(u.merge)(Object(u.clone)(I),i),this._state&&(this._state.onDestroyed().subscribe(this,this._onStateDestroyed,!0),this._state.dataSourcesCollectionChanged().subscribe(this,this._onDataSourcesCollectionChanged)),n={contextMenuEnabled:this._options.priceScaleContextMenuEnabled,pressedMouseMoveScale:this._options.handleScale.axisPressedMouseMove,currencyLabelEnabled:this._options.currencyLabelEnabled,croppedTickMarks:this._options.croppedTickMarks},o=this._chart.properties().paneProperties.background,r=function(e,t,i,o,r){return new S.PriceAxisWidget(d,i,t,e,n,o,r)},a=e.properties().scalesProperties,l=this._chartModel().rendererOptionsProvider(),c={backgroundBasedTheme:e.backgroundBasedTheme(),rendererOptionsProvider:l},h={showLabels:!1},this._lhsPriceAxisesContainer=new v.PriceAxisesContainer(o,a,"left",r,c,h),this._rhsPriceAxisesContainer=new v.PriceAxisesContainer(o,a,"right",r,c,h),this._paneCell=document.createElement("td"),this._paneCell.classList.add("chart-markup-table","pane"),this._div=document.createElement("div"),this._div.style.width="100%",this._div.style.height="100%",this._div.style.position="relative",this._div.style.overflow="hidden",this._paneCell.appendChild(this._div),this._canvas=Object(g.addCanvasTo)(this._div,new g.Size(16,16)),this._canvas.style.position="absolute",this._canvas.style.left="0",this._canvas.style.top="0",this._ctx=Object(s.ensureNotNull)(this._canvas.getContext("2d")),this._topCanvas=Object(g.addCanvasTo)(this._div,new g.Size(16,16)),this._topCanvas.style.position="absolute",this._topCanvas.style.left="0",this._topCanvas.style.top="0",this._topCtx=Object(s.ensureNotNull)(this._topCanvas.getContext("2d")),this._tooltipSelector=document.createElement("div"),this._tooltipSelector.classList.add("tooltip","tooltip-selector","tooltip-selector-hidden"),this._div.appendChild(this._tooltipSelector),this._rowElement=document.createElement("tr"),this._rowElement.appendChild(this._lhsPriceAxisesContainer.getElement()),this._rowElement.appendChild(this._paneCell),this._rowElement.appendChild(this._rhsPriceAxisesContainer.getElement()),
this._options.legendWidgetEnabled&&this._loadAndCreateLegendWidget(),this._state&&!this._chart.readOnly()&&this._options.controlsEnabled&&this._loadAndCreatePaneControlsWidget()}return e.prototype.destroy=function(){null!==this._hideNotMainSourcesInLegendSpawn&&this._hideNotMainSourcesInLegendSpawn.destroy(),this._legendWidget&&(this._legendWidget.destroy(),delete this._legendWidget),null!==this._paneControls&&(this._paneControls.destroy(),delete this._paneControls),this._lhsPriceAxisesContainer.destroy(),this._rhsPriceAxisesContainer.destroy(),this.hasState()&&(this.state().onDestroyed().unsubscribeAll(this),this.state().dataSourcesCollectionChanged().unsubscribeAll(this))},e.prototype.size=function(){return this._size},e.prototype.setSize=function(e){Object(s.assert)(e.w>=0&&e.h>=0,"Try to set invalid size to PaneWidget "+JSON.stringify(e)),this._size.equals(e)||(this._size=e,Object(g.resizeCanvas)(this._canvas,e),Object(g.resizeCanvas)(this._topCanvas,e),this._ctx=Object(s.ensureNotNull)(this._canvas.getContext("2d")),this._paneCell.style.width=e.w+"px",this._paneCell.style.height=e.h+"px",this._rowElement.classList.toggle("js-hidden",0===e.h),null!==this._legendWidget&&this._legendWidget.updateWidgetModeBySize(e),null!==this._paneControls&&this._paneControls.updateWidgetModeByWidth(e.w))},e.prototype.width=function(){return this._size.w},e.prototype.height=function(){return this._size.h},e.prototype.state=function(){return Object(s.ensureNotNull)(this._state)},e.prototype.hasState=function(){return null!==this._state},e.prototype.setState=function(e){this.hasState()&&(this.state().onDestroyed().unsubscribeAll(this),this.state().dataSourcesCollectionChanged().unsubscribeAll(this)),this._state=e,this.hasState()&&(this.state().onDestroyed().subscribe(this,this._onStateDestroyed,!0),this.state().dataSourcesCollectionChanged().subscribe(this,this._onDataSourcesCollectionChanged),this.updatePriceAxisWidgets())},e.prototype.getScreenshotData=function(){return{leftAxis:this._lhsPriceAxisesContainer.getScreenshotData(),rightAxis:this._rhsPriceAxisesContainer.getScreenshotData(),content:this._canvas.toDataURL(),contentWidth:this._size.w,contentHeight:this._size.h}},e.prototype.hardResetCanvas=function(){this._size.equals(new g.Size(0,0))||(Object(g.hardResizeCanvas)(this._canvas,this._size),Object(g.hardResizeCanvas)(this._topCanvas,this._size),this._lhsPriceAxisesContainer.hardResetCanvas(),this._rhsPriceAxisesContainer.hardResetCanvas())},e.prototype.updatePriceAxisWidgets=function(){var e,t,i,n,o,r;this.hasState()&&(t=(e=this._chartModel()).paneForSource(e.mainSeries()))&&(i=e.priceScaleSlotsCount(),o=(n=this.state()).visibleLeftPriceScales(),r=n.visibleRightPriceScales(),this._lhsPriceAxisesContainer.setScales(o,i.left,t.leftPriceScales().length,i.left+i.right),this._rhsPriceAxisesContainer.setScales(r,i.right,t.rightPriceScales().length,i.left+i.right))},e.prototype.update=function(){this.hasState()&&(this._lhsPriceAxisesContainer.update(),this._rhsPriceAxisesContainer.update(),
null!==this._legendWidget&&this._legendWidget.update(),this.updateControls())},e.prototype.updateControls=function(){this.hasState()&&null!==this._paneControls&&this._paneControls.update()},e.prototype.updateThemedColors=function(e){this._themedColor=e,this._updateByThemedColors()},e.prototype.statusWidget=function(){return this._legendWidget},e.prototype.getElement=function(){return this._rowElement},e.prototype.canvasElement=function(){return this._canvas},e.prototype.hasCanvas=function(e){return this._canvas===e||this._topCanvas===e},e.prototype.pinchStartEvent=function(){this._options.handleScale.pinch&&(this._terminateActiveAnimations(),this._prevPinchScale=1,this._pinching=!0)},e.prototype.pinchEvent=function(e,t){if(this._options.handleScale.pinch){var i=5*(t-this._prevPinchScale);this._prevPinchScale=t,this._chartModel().zoomTime(e.x,i,!0),this._prevPinchScale=t}},e.prototype.pinchEndEvent=function(){this._pinching=!1},e.prototype.mouseClickEvent=function(e){var t,i,n,o,r,a;this.hasState()&&(t=this._dataSourceAtPoint(e.localX,e.localY),i=this._chartUndoModel(),n=t&&t.source,o=t&&!t.isCustom&&null!==t.source?t.source.id():null,this._lastClickedSourceId!==o&&(null!==this._lastClickedSourceId&&(r=i.model().dataSourceForId(this._lastClickedSourceId))&&r.onClickOutside&&(r.onClickOutside(e),i.model().updateSource(r)),this._lastClickedSourceId=o),!this._isSelectBarModeEnabled()||this.trackingModeEnabled()&&!this._exitTrackingModeOnNextTry||i.crossHairSource().trySelectCurrentBar(),t&&t.hittest&&t.hittest.result()===d.HitTestResult.CUSTOM&&(a=t.hittest.data().mouseClickHandler)&&(a(e),i.model().updateSource(Object(s.ensureNotNull)(n))),this._isSelectBarModeEnabled()||t&&t.source===i.crossHairSource()||this._tryExitTrackingMode(),n instanceof y.BarsMarksContainer&&t&&Object(s.ensureNotNull)(t.hittest).data()&&n.onClicked(Object(s.ensureNotNull)(t.hittest).data()),n&&Object(_.isLineTool)(n)&&Object(c.emit)("drawing_event",n.id(),"click"))},e.prototype.exitTrackingMode=function(){null!==this._state&&null!==this._startTrackPoint&&(this._exitTrackingModeOnNextTry=!0,this._tryExitTrackingMode())},e.prototype.trackingModeEnabled=function(){return null!==this._state&&null!==this._startTrackPoint},e.prototype._tryExitTrackingMode=function(){this._exitTrackingModeOnNextTry&&(this._startTrackPoint=null,this._clearCursorPosition())},e.prototype._clearCursorPosition=function(){this._chartModel().clearCurrentPosition()},e.prototype._dataSourceAtPoint=function(e,t){var i,n,o,r,s,l,c,u,h,d,_,f,m,y,g,v,S,b,w,P,C,T,x,I,L=null,M=null,A=null;if(!this.hasState())return null;for(n=(i=this.state()).height(),o=i.width(),r=!1,s=function(e,t,i,n){var o=A?A.result():0;e.result()>o&&(A=e,L=t,M=i,r=n)},l=new a.Point(e,t),this._hitTestCustomSources(i.customSources(p.CustomSourceLayer.Foreground),l,s),c=i.hitTestSources(),u=this._chartUndoModel(),h=c.length;0<h--;)if(null!==(_=(d=c[h]).paneViews()))for(f=u.selection().isSelected(d)||d===u.hoveredSource(),m=_.length;0<m--;)(y=_[m].renderer(n,o,f))&&y.hitTest&&null!==(g=y.hitTest(l))&&s(g,d,y,!1)
;for(m=(S=(v=u.crossHairSource()).paneViews(i)||[]).length-1;m>=0;--m)(y=S[m].renderer(n,o))&&y.hitTest&&(g=y.hitTest(l))&&s(g,v,y,!1);if(this.containsMainSeries()){for(b=u.barsMarksSources(),h=0;h<b.length;++h)for(w=(d=b[h]).paneViews()||[],y=void 0,P=void 0,m=0;m<w.length;m++)if(null!==(y=w[m].renderer(n,o))&&(P=y.hitTest(l))){A=P,L=d,M=y,r=!1;break}null!==(T=(C=u.activeStrategySource().value())&&C.strategyOrdersPaneView())&&(I=(x=T.renderer(n,o))&&x.hitTest(l))&&(A=I,L=C,M=x,r=!1)}return null===L&&this._hitTestCustomSources(i.customSources(p.CustomSourceLayer.Background),l,s),null===L&&null!==this._legendWidget&&(L=this._legendWidget.dataSourceAtPoint(e,t)),{source:L,hittest:A,renderer:M,isCustom:r}},e.prototype._hitTestCustomSources=function(e,t,i){var n,o,r,a,l,c,u,h=Object(s.ensureNotNull)(this._state),d=h.height(),p=h.width(),_=this._chartUndoModel().hoveredSource();for(n=e.length-1;n>=0;--n)if(0!==(r=(o=e[n]).paneViews(h)).length)for(a=r.length-1;a>=0;--a)l=o===_,null!==(c=r[a].renderer(d,p,l))&&null!==(u=c.hitTest(t))&&i(u,o,c,!0)},e.prototype._tryStartMovingLineTool=function(e,t,i,n){var o,l,c,u,h,d;return!(null===t.source||!t.source.movable()||null!==this._startTrackPoint)&&(this._preventSourceChange?(this._startMoveLineToolParams=null,!1):(o=this._chartUndoModel(),l=Object(s.ensureNotNull)(Object(s.ensureNotNull)(this._state).mainDataSource()).firstValue(),c=Object(s.ensureNotNull)(t.source.priceScale()).coordinateToPrice(e.localY,Object(s.ensureNotNull)(l)),u=r(t.source)?o.selection().sources():[t.source],h=new a.Point(e.localX,e.localY),d={index:n,price:c},this._startMoveLineToolParams={source:u,startPoint:{logical:d,screen:h},data:t.hittest&&t.hittest.data(),envState:i},!0))},e.prototype._chartModel=function(){return this._chart.model().model()},e.prototype._chartUndoModel=function(){return this._chart.model()},e.prototype._externalPaneXCoord=function(e,t){var i,n,o=this._div.getBoundingClientRect(),r=o.left+document.body.scrollLeft;return t+=r,n=(i=Object(s.ensureNotNull)(this._chart.paneByState(e)))._div.getBoundingClientRect().left+document.body.scrollLeft,i._correctXCoord(t-n)},e.prototype._externalPaneYCoord=function(e,t){var i,n,o=this._div.getBoundingClientRect(),r=o.left+document.body.scrollTop;return t+=r,n=(i=Object(s.ensureNotNull)(this._chart.paneByState(e)))._div.getBoundingClientRect().left+document.body.scrollTop,i._correctYCoord(t-n)},e.prototype._correctXCoord=function(e){return Math.max(0,Math.min(e,this._size.w-1))},e.prototype._correctYCoord=function(e){return Math.max(0,Math.min(e,this._size.h-1))},e.prototype._processScroll=function(e){var t,i,n;if(this._chart.model().model().scrollEnabled()){if(t=Date.now(),this._startScrollingPos||this._preventScroll()||(this._startScrollingPos={x:e.clientX,y:e.clientY,timestamp:t,localX:e.localX,localY:e.localY}),null!==this._scrollXAnimation&&this._scrollXAnimation.addPosition(e.localX,t),null!==this._scrollYAnimation&&this._scrollYAnimation.addPosition(e.localY,t),i=this._chartUndoModel(),n=this.state().defaultPriceScale(),
this._startScrollingPos&&!this._isScrolling&&(this._startScrollingPos.x!==e.clientX||this._startScrollingPos.y!==e.clientY))return i.beginUndoMacro("scroll").setCustomFlag("doesnt_affect_save",!0),null===this._scrollXAnimation&&M&&(this._scrollXAnimation=new b(.2,3.2,-.0026,15),this._scrollXAnimation.addPosition(this._startScrollingPos.localX,this._startScrollingPos.timestamp),this._scrollXAnimation.addPosition(e.localX,t)),null===this._scrollYAnimation&&A&&M&&(this._scrollYAnimation=new b(.2,3.2,-.0026,15),this._scrollYAnimation.addPosition(this._startScrollingPos.localY,this._startScrollingPos.timestamp),this._scrollYAnimation.addPosition(e.localY,t)),i.selection().isEmpty()||(n=i.selection().sources()[0].priceScale()),null===n||n.isEmpty()||(this._scrollPriceScale=n,i.startScrollPrice(this.state(),n,e.localY)),i.startScrollTime(e.localX),this._isScrolling=!0,void this.setCursorForTool();this._isScrolling&&(null!==this._scrollPriceScale&&i.scrollPriceTo(this.state(),this._scrollPriceScale,e.localY),i.scrollTimeTo(e.localX))}},e.prototype._finishScroll=function(){var e=this._chartUndoModel();e.endScrollTime(),null!==this._scrollPriceScale&&e.endScrollPrice(this.state(),this._scrollPriceScale),e.endUndoMacro(),this._isScrolling=!1,this._startScrollingPos=null,this._scrollPriceScale=null,this.setCursorForTool()},e.prototype._endScroll=function(e){var t,i,n,o,r,s,a=this;if(!this._isScrolling)return!1;if(t=this._isScrolling&&this._scrollUndoCommandInStack(),this._isScrolling){if(i=Date.now(),null!==this._scrollXAnimation&&this._scrollXAnimation.start(e.localX,i),null!==this._scrollYAnimation&&this._scrollYAnimation.start(e.localY,i),n=this._chartUndoModel(),(null===this._scrollXAnimation||this._scrollXAnimation.finished(i))&&(null===this._scrollYAnimation||this._scrollYAnimation.finished(i)))return this._finishScroll(),t;o=this._scrollXAnimation,r=this._scrollYAnimation,s=function(){var e,t,i;(null!==o&&!o.terminated()||null!==r&&!r.terminated())&&(e=Date.now(),t=null===o||o.finished(e),i=null===r||r.finished(e),null===o||o.terminated()||n.scrollTimeTo(o.getPosition(e)),null===r||r.terminated()||null===a._scrollPriceScale||n.scrollPriceTo(a.state(),a._scrollPriceScale,r.getPosition(e)),t&&i?a._finishScroll():requestAnimationFrame(s))},requestAnimationFrame(s)}return t},e.prototype._terminateActiveAnimations=function(){var e=Date.now(),t=null===this._scrollXAnimation||this._scrollXAnimation.finished(e),i=null===this._scrollYAnimation||this._scrollYAnimation.finished(e);null===this._scrollXAnimation&&null===this._scrollYAnimation||t&&i||this._finishScroll(),null!==this._scrollXAnimation&&(this._scrollXAnimation.terminate(),this._scrollXAnimation=null),null!==this._scrollYAnimation&&(this._scrollYAnimation.terminate(),this._scrollYAnimation=null)},e.prototype._preventScroll=function(){return L&&this._longTap||this._contextMenuOpenedOnLastMouseDown||Object(_.isLineToolName)(f.tool.value())||Boolean(this._chartUndoModel().lineBeingCreated())||null!==this._startTrackPoint},e.prototype._isSelectBarModeEnabled=function(){
return this._chartUndoModel().crossHairSource().selectBarMode().value()},e.prototype._updateByThemedColors=function(){null!==this._legendWidget&&this._legendWidget.updateThemedColors(this._themedColor),null!==this._paneControls&&this._paneControls.updateThemedColors(this._themedColor)},e.prototype._scrollUndoCommandInStack=function(){var e,t,i=this._chartUndoModel().undoHistory().undoStack();return!i.isEmpty()&&((e=i.head())instanceof m.a&&(!e.isEmpty()&&((t=e.commands()[0])instanceof x.PriceScaleChangeUndoCommand||t instanceof T.a)))},e.prototype._onStateDestroyed=function(){this.setState(null)},e.prototype._getHideNotMainSourcesValue=function(){return!this._chart.isActive()&&!this._chart.crossHairSyncEnabled()},e.prototype._onDataSourcesCollectionChanged=function(){null!==this._legendWidget&&this._legendWidget.updateLayout()},e.prototype._loadAndCreateLegendWidget=function(){var e=this;Promise.all([i.e(61),i.e("chart-widget-gui")]).then(i.bind(null,"sAH5")).then(function(t){var i,n,o;e._isDestroyed||(i=t.LegendWidget,(n=Object(h.deepExtend)({},e._options.legendWidget)).canShowSourceCode=!e._chart.onWidget(),n.readOnlyMode=n.readOnlyMode||e._chart.readOnly(),o=new P.a(e._getHideNotMainSourcesValue()),e._hideNotMainSourcesInLegendSpawn=Object(C.a)(function(){return{}},e._chart.chartWidgetCollection().activeChartWidget,e._chart.chartWidgetCollection().lock.crosshair),e._hideNotMainSourcesInLegendSpawn.subscribe(function(){o.setValue(e._getHideNotMainSourcesValue())}),e._legendWidget=new i(e._chartUndoModel(),e,e._chart.backgroundBasedTheme(),o,n,{showContextMenuForSelection:e.showContextMenuForSelection.bind(e),showContextMenuForSources:e.showContextMenuForSources.bind(e),updateActions:e._chart.updateActions.bind(e._chart),showChartPropertiesForSource:e._chart.showChartPropertiesForSource.bind(e._chart),showGeneralChartProperties:e._chart.showGeneralChartProperties.bind(e._chart),showObjectsTreeDialog:e._chart.showObjectsTreeDialog.bind(e._chart)}),e._div.appendChild(e._legendWidget.getElement()),e._legendWidget.updateLayout(),e._legendWidget.updateWidgetModeBySize(e._size),e._legendWidget.updateThemedColors(e._themedColor))})},e.prototype._loadAndCreatePaneControlsWidget=function(){var e=this;Promise.all([i.e(61),i.e("chart-widget-gui")]).then(i.bind(null,"lvAK")).then(function(t){if(!e._isDestroyed){var i=t.PaneControlsWidget;e._paneControls=new i(e._chartUndoModel(),e,{backgroundThemeName:e._chart.backgroundBasedTheme()},{toggleMaximizePane:e._chart.toggleMaximizePane.bind(e._chart)},e._div),e._paneControls.updateWidgetModeByWidth(e._size.w),e._paneControls.updateThemedColors(e._themedColor)}})},e}()},UJLt:function(e,t,i){"use strict";var n,o,r,s,a;Object.defineProperty(t,"__esModule",{value:!0}),t.SaveRenameDialog=void 0,n=function(){function e(e,t){var i,n;for(i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),i("/mDy"),o=i("oNDq"),r="yes",s="close",a=0,
t.SaveRenameDialog=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.fields,n=t.confirm,o=t.manager,r=t.title,s=void 0===r?"":r,a=t.destroyOnClose,l=void 0===a||a,c=t.modal,u=void 0!==c&&c;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._form=document.createElement("div"),this._fields=i,this._appendFieldsToForm(),this._title=s,this._destroyOnClose=l,this._modal=u,this._manager=o,this._isConfirmDialogOpened=!1,n&&(this._needCheckConfirm=!0,this._shouldShowConfirm=n.shouldShowDialog,this._getConfirmMessage=n.getMessage)}return n(e,[{key:"setField",value:function(e,t){this._fields.find(function(t){return t.name===e}).value=t}},{key:"show",value:function(){var e=this,t=this._createDialog(),i=new Promise(function(i){t.then(function(t){t.on("action:submit",function(t){return e._onSubmit(t,i)}),t.open(),t.on("beforeClose",e._unmountFields.bind(e)),e._fields[a].select()})});return i}},{key:"_appendFieldsToForm",value:function(){var e=this;this._fields.forEach(function(t){t.appendTo(e._form)})}},{key:"_createDialog",value:function(){var e=this,t=470,n=13;return new Promise(function(o){Promise.all([i.e("dialogs-core"),i.e(19),i.e("create-dialog")]).then(function(r){var s=i("YDhE").createDialog;o(s({type:e._modal?"modal":"popup",title:e._title,content:$(e._form),actionsWrapTemplate:'<div class="tv-dialog__section tv-dialog__section--actions i-align_right tv-dialog__section--no-border">',width:t,destroyOnClose:e._destroyOnClose,manager:e._manager,isClickOutFn:function(){if(e._isConfirmDialogOpened)return!1},actions:[{name:"submit",type:"primary",text:window.t("Save"),key:n,addClass:"js-submit-button"},{name:"cancel",type:"default",text:window.t("Cancel"),method:"close",addClass:"js-cancel-button"}]}))}.bind(null,i)).catch(i.oe)})}},{key:"_onSubmit",value:function(e,t){var i=this,n=this._validate();if(n)e.error(n.error),n.focus();else{if(!this._needCheckConfirm)return t(this._collectValues(),e),void e.close();Promise.resolve(this._shouldShowConfirm(this._collectValues())).then(function(n){if(!n)return t(i._collectValues(),e),void e.close();i._showConfirmDialog().then(function(n){n===s&&(e.focus(),i._fields[a].focus()),n===r&&(t(i._collectValues(),e),e.close())})})}}},{key:"_showConfirmDialog",value:function(){var e=this;return new Promise(function(t){Promise.resolve(e._getConfirmMessage(e._collectValues())).then(function(i){e._isConfirmDialogOpened=!0,(0,o.createConfirmDialog)({type:"modal",content:document.createTextNode(i),manager:e._manager}).then(function(i){i.on("action:yes",function(e){t(r),e.close()}),i.on("afterClose",function(){t(s),e._isConfirmDialogOpened=!1}),i.open()})})})}},{key:"_validate",value:function(){return this._fields.find(function(e){return!e.valid})}},{key:"_collectValues",value:function(){return this._fields.reduce(function(e,t){return e[t.name]=t.value,e},{})}},{key:"_unmountFields",value:function(){this._fields.forEach(function(e){e.unmount&&e.unmount()})}}]),e}()},ULlu:function(e,t,i){"use strict"
;function n(e){return e[0]}function o(e,t,i){return"string"!=typeof t?e:void 0===i||null===i?(e.removeAttribute(t),e):(e.setAttribute(t,String(i)),e)}function r(e,t){return"string"==typeof t&&e.classList.add(t),e}function s(e,t){return void 0===t?e:(null===t&&(e.innerHTML=""),"string"!=typeof t&&"number"!=typeof t||(e.innerHTML=String(t)),e)}function a(e){var t=window.getComputedStyle(e);return[t.paddingLeft,t.paddingRight].reduce(function(e,t){return e-Number((t||"").replace("px",""))},e.clientWidth)}function l(e){var t=window.getComputedStyle(e);return[t.paddingTop,t.paddingBottom].reduce(function(e,t){return e-Number((t||"").replace("px",""))},e.clientHeight)}function c(e,t){var i;i=function(i){return i(e).trigger(t)},window.jQuery&&i(window.jQuery)}i.r(t),i.d(t,"unwrap",function(){return n}),i.d(t,"attr",function(){return o}),i.d(t,"addClass",function(){return r}),i.d(t,"html",function(){return s}),i.d(t,"contentWidth",function(){return a}),i.d(t,"contentHeight",function(){return l}),i.d(t,"trigger",function(){return c})},UlDV:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"RestrictedToolsetBootloader",function(){return r}),n=i("mrSG"),o=i("cZRT"),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._startLoading=function(){return Promise.all([i.e("react"),i.e(3),i.e(6),i.e(15),i.e(20),i.e(35),i.e(37),i.e(39),i.e(52),i.e(53),i.e(54),i.e(0),i.e(1),i.e(8),i.e(44),i.e("restricted-toolset")]).then(i.bind(null,"miV2")).then(function(e){return e.getRestrictedToolSet()})},t}(o.a)},UqOQ:function(e,t,i){"use strict";var n,o,r,s,a,l;i.d(t,"a",function(){return l}),n=i("mrSG"),o=i("Eyy1"),r=i("aIyQ"),s=i.n(r),a=i("0waE"),l=function(){function e(e,t,i){this._onChanged=new s.a,this._lineToolsSet=new Set,this._lineTools=Object(n.__spreadArrays)(e),this._lineToolsSet=new Set(this._lineTools),this._name=t,this.id=i||Object(a.randomHashN)(6)}return e.prototype.lineTools=function(){return this._lineTools},e.prototype.name=function(){return this._name},e.prototype.setName=function(e){var t=this;this._doAndFireOnChange(function(){t._name=e})},e.prototype.isActualSymbol=function(){return this._lineTools.length>0&&this._lineTools[0].isActualSymbol()},e.prototype.containsLineTool=function(e){return this._lineToolsSet.has(e)},e.prototype.addLineTools=function(e){var t=this;this._doAndFireOnChange(function(){var i;e.forEach(function(e){return t._lineToolsSet.add(e)}),(i=t._lineTools).push.apply(i,e)})},e.prototype.excludeLineTool=function(e){var t=this;this._doAndFireOnChange(function(){t._lineToolsSet.delete(e);var i=t._lineTools.indexOf(e);t._lineTools.splice(i,1)})},e.prototype.excludeLineTools=function(e){var t=this;this._doAndFireOnChange(function(){var i=new Set(e);e.forEach(function(e){return t._lineToolsSet.delete(e)}),t._lineTools=t._lineTools.filter(function(e){return!i.has(e)})})},e.prototype.state=function(){return{id:this.id,name:this._name,tools:this._lineTools.map(function(e){return e.id()})}},e.prototype.visibility=function(){
var e=this._lineTools.some(function(e){return e.properties().visible.value()}),t=this._lineTools.some(function(e){return!e.properties().visible.value()});return e&&!t?"Visible":t&&!e?"Invisible":"Partial"},e.prototype.locked=function(){var e=this._lineTools.some(function(e){return e.properties().frozen.value()}),t=this._lineTools.some(function(e){return!e.properties().frozen.value()});return e&&!t?"Locked":t&&!e?"Unlocked":"Partial"},e.prototype.onChanged=function(){return this._onChanged},e.fromState=function(t,i){return new e(i.tools.map(function(e){return Object(o.ensureNotNull)(t.dataSourceForId(e))}),i.name,i.id)},e.prototype._doAndFireOnChange=function(e){var t,i=this.visibility(),n=this.locked();e(),t={visibilityChanged:this.visibility()!==i,lockedChanged:n!==this.locked()},this._onChanged.fire(t)},e}()},UxRM:function(e,t,i){"use strict";function n(e){this.items=e.items,this.barSpacing=e.barSpacing,this.lineColor=e.lineColor,this.lineWidth=e.lineWidth,this.lineStyle=e.lineStyle}var o=i("aO4+").Point,r=i("GEp6").distanceToSegment,s=i("Zp/P").selectionTolerance,a=i("VdBB").HitTestResult;n.prototype.draw=function(e){var t,i,n,o,r,s,a,l,c=!1;for(n=0;n<this.items.length;++n)r=(o=this.items[n]).x,s=o.y,TradingView.isNaN(r)||TradingView.isNaN(s)||(null!=o.style?(a=o.style.color,t=o.style.width):(a=this.lineColor,t=this.lineWidth),a!==i&&(i=a,c&&e.fill(),e.beginPath(),e.fillStyle=a),l=3*t,e.rect(r-l/2,s-t/2,l,t),e.rect(r-t/2,s-l/2,t,l),c=!0);c&&e.fill()},n.prototype.hitTest=function(e){var t,i,n,l,c,u=s(this.lineWidth);for(c=1;c<this.items.length;++c)if(t=this.items[c-1],i=this.items[c],n=t.x,l=i.x,r(new o(n,t.y),new o(l,i.y),new o(e.x,e.y)).distance<=u)return new a(a.REGULAR);return null},t.PaneRendererCross=TradingView.PaneRendererCross=n},V086:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolEllipse";var o=t||n.createProperties();s.call(this,e,o),this.version=n.version,i.e("lt-pane-views").then(function(e){var t=i("obU/").EllipsePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("aO4+").Point,r=i("GEp6").distanceToLine,s=i("Ss5c").LineDataSource,a=i("Ocx9").DefaultProperty,l=i("hayr").propertyPages,c=window.t("Ellipse");inherit(n,s),n.prototype.startChanging=function(e,t){var i,n,o;s.prototype.startChanging.call(this,e,t),0!==e&&1!==e||(i=this.pointToScreenPoint(this._points[0])[0],n=this.pointToScreenPoint(this._points[1])[0],o=this.pointToScreenPoint(this._points[2])[0],this._dist=r(i,n,o).distance||0)},n.prototype._preparePoint=function(e,t){var i=this._preparePointInternal(e,t,!1);return t&&t.shift()&&this._points[0].index===this._points[1].index&&this._fixVerticalDiameterPoints(this._points[1],this._points[0],i),i},n.prototype._preparePointInternal=function(e,t,i){var n,r,a,l,c,u,h,d,p,_,f=Object.assign({},e);if(t&&t.shift()){if(n=this.points().length,!this._fakePointAdded&&3===n&&!i)return f;(this._fakePointAdded||2===n||i)&&(this._snapPoint45Degree(e,this._points[0]),this._fakePointAdded?this._points[1]=e:i||(this._fakePointAdded=!0,
s.prototype._addPointIntenal.call(this,e)),r=this.pointToScreenPoint(this._points[0])[0],l=(a=this.pointToScreenPoint(this._points[1])[0]).x-r.x,c=a.y-r.y,u=Math.sqrt(l*l+c*c)/2,h=a.subtract(r),d=r.add(a).scaled(.5),p=(p=new o(-h.y,h.x)).normalized(),_=d.add(p.scaled(u)),f=this.screenPointToPoint(_),(TradingView.isNaN(f.price)||TradingView.isNaN(f.index))&&(f=this.screenPointToPoint(d)))}else this._fakePointAdded&&(this._points.splice(1,1),this._fakePointAdded=!1);return f},n.prototype._fixVerticalDiameterPoints=function(e,t,i){var n=this.pointToScreenPoint(e)[0],o=this.pointToScreenPoint(t)[0],r=this._model.timeScale(),s=r.indexToCoordinate(e.index),a=r.indexToCoordinate(i.index),l=2*Math.abs(s-a);l*=t.price>e.price?1:-1,e.price=this.screenPointToPoint({x:n.x,y:o.y+l}).price},n.prototype.addPoint=function(e,t,i){var n=s.prototype.addPoint.call(this,e,t,i);return n&&(this._fakePointAdded=!1),n},n.prototype.setPoint=function(e,t,i){var n,s,a,l,c=Object.assign({},t),u=this.pointToScreenPoint(this._points[0])[0],h=this.pointToScreenPoint(this._points[1])[0],d=this.pointToScreenPoint(this._points[2])[0];switch(e){case 0:if(i&&i.shift()){this._snapPoint45Degree(c,this._points[1]),this._points[0]=c,this._points[2]=this._preparePointInternal(this._points[2],i,!0),this._points[0].index===this._points[1].index&&this._fixVerticalDiameterPoints(this._points[0],this._points[1],this._points[2]);break}u=this.pointToScreenPoint(c)[0],n=h.subtract(u),s=u.add(h).scaled(.5),a=(a=new o(-n.y,n.x)).normalized(),d=s.add(a.scaled(this._dist)),d=this.screenPointToPoint(d),this._points[0]=c,this._points[2]=d;break;case 1:if(i&&i.shift()){this._snapPoint45Degree(c,this._points[0]),this._points[1]=c,this._points[2]=this._preparePointInternal(this._points[2],i,!0),this._points[0].index===this._points[1].index&&this._fixVerticalDiameterPoints(this._points[1],this._points[0],this._points[2]);break}n=(h=this.pointToScreenPoint(c)[0]).subtract(u),s=u.add(h).scaled(.5),a=(a=new o(-n.y,n.x)).normalized(),d=s.add(a.scaled(this._dist)),d=this.screenPointToPoint(d),this._points[1]=c,this._points[2]=d;break;case 2:case 3:c=this.pointToScreenPoint(c)[0],l=r(u,h,c).distance,n=h.subtract(u),s=u.add(h).scaled(.5),a=(a=new o(-n.y,n.x)).normalized(),d=s.add(a.scaled(l)),d=this.screenPointToPoint(d),this._points[2]=d}this.normalizePoints()},n.prototype.pointsCount=function(){return 3},n.prototype.title=function(){return c},n.prototype.name=function(){return"Ellipse"},n.prototype.hasEditableCoordinates=function(){return!1},n.version=2,n.prototype.migrateVersion=function(e,t,i){var n,o,r;1===e&&2===this._points.length&&(n=this._points[0].price,o=.5*(this._points[0].price+this._points[1].price),this._points[0]={price:o,index:this._points[0].index},this._points[1]={price:o,index:this._points[1].index},this._points.push({price:n,index:this._points[0].index})),1===e&&2===this._timePoint.length&&(n=this._timePoint[0].price,o=.5*(this._timePoint[0].price+this._timePoint[1].price),this._timePoint[0].price=o,this._timePoint[1].price=o,r={price:n,
offset:this._timePoint[0].offset,time_t:this._timePoint[0].time_t},this._timePoint.push(r))},n.prototype.getInputsPropertyPage=function(){return null},n.prototype.getStylesPropertyPage=function(){return l.LineToolEllipseStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("Zd1D").GeneralFiguresDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new a("linetoolellipse",e);return n._configureProperties(t),t},n._configureProperties=function(e){s._configureProperties(e)},t.LineToolEllipse=n},V0al:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"PaneRendererXCross",function(){return r}),n=i("mrSG"),o=i("2WC2"),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._drawItemShape=function(e,t){var i=t.width,n=t.height,o=t.x-i/2,r=t.vertOffset,s=t.y-n/2+r;e.moveTo(o,s),e.lineTo(o+i,s+n),e.moveTo(o,s+n),e.lineTo(o+i,s)},t}(o.c)},V0dR:function(e,t,i){"use strict";var n,o,r,s,a,l,c,u;i.r(t),i.d(t,"PaneRendererLabelBase",function(){return l}),i.d(t,"PaneRendererLabelUp",function(){return c}),i.d(t,"PaneRendererLabelDown",function(){return u}),n=i("mrSG"),o=i("aO4+"),r=i("VdBB"),s=i("2WC2"),a=2,l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype.setData=function(e,t){var i,n,o,r,s,a,l,c,u,h;for(this._setBaseData(e,t),i=this._isUp(),n=0,o=this._items;n<o.length;n++)s=(r=o[n]).height,r.stepX=Math.round(s/2*.65)+.5,r.stepY=r.stepX,a=r.stepX/2,null!==(l=this._getTextCache(r))?(c=l.textImageWidth,u=l.textImageHeight,r.shapeWidth=c+2*r.stepX,r.shapeHeight=u+2*a+r.stepY,h=Math.sign(r.vertOffset)*r.stepY*1.5,r.vertOffset=h,r.textVertOffset=0===h?i?r.stepY+a+u:-r.stepY-a:h>0?r.stepY+a:-r.stepY-a):(r.shapeWidth=2*r.stepX,r.shapeHeight=2.5*r.stepY)},t.prototype.hitTest=function(e){var t,i,n,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S,b=this._isUp(),w=b?1:-1;for(t=0,i=this._items;t<i.length;t++){if(a=(s=(n=i[t]).stepY)/2,l=n.shapeWidth,c=n.shapeHeight,u=w*a,0!==(h=n.vertOffset)&&h<0===b&&(u=-w*(c+a)),new o.Point(n.x,n.y+h+u).subtract(e).length()<=a)return new r.HitTestResult(r.HitTestResult.REGULAR);if(d=l/2,u=0,0!==h&&h<0===b&&(u=-w*(c+s)),p=n.y+h+u,_=b?s:-c,f=b?c:-s,m=e.x,y=e.y,g=n.x-d,v=p+_,S=n.x+d,m>g&&m<S&&y>v&&y<p+f)return new r.HitTestResult(r.HitTestResult.REGULAR)}return null},t.prototype._drawItemShape=function(e,t){var i,n,o,r,s,l,c,u,h,d,p=this._isUp(),_=p?1:-1,f=Math.round(t.shapeWidth/2)-.5,m=Math.round(t.shapeHeight)-.5,y=0,g=t.vertOffset,v=t.stepX,S=t.stepY;0!==g&&g<0===p&&(y=-_*Math.round(m+S)),i=t.x+.5,n=t.y+g+y+.5,r=(o=m-S>=3*a)&&f>=1.5*a,s=o&&f-v>=1.5*a,l=f,c=S*_,u=f,h=m*_,d=_*a,e.translate(i,n),e.moveTo(0,0),e.lineTo(v,c),s?(e.lineTo(l-a,c),e.arcTo(l,c,u,h,a)):e.lineTo(l,c),r?(e.lineTo(u,h-d),e.arcTo(u,h,-u,h,a),e.lineTo(-u+a,h),e.arcTo(-u,h,-l,c,a)):(e.lineTo(u,h),e.lineTo(-u,h)),s?(e.lineTo(-l,c+d),e.arcTo(-l,c,l,c,a)):e.lineTo(-l,c),
e.lineTo(-v,c),e.lineTo(0,0),e.translate(-i,-n)},t}(s.a),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._isUp=function(){return!0},t}(l),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._isUp=function(){return!1},t}(l)},V3Oj:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolText";var o=t||n.createProperties();r.call(this,e,o),this._timeScale=e.timeScale(),this._barSpacing=e.timeScale().barSpacing(),i.e("lt-pane-views").then(function(e){var t=i("mr3a").TextPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}function o(e,t){var i=t||o.createProperties();n.call(this,e,i)}var r=i("Ss5c").LineDataSource,s=i("fgLi").DataSource,a=i("tc+8"),l=i("Ocx9").DefaultProperty,c=i("hayr").propertyPages,u=window.t("Text",{context:"tool"});inherit(n,r),n.MIN_WIDTH=100,n.prototype.setPoint=function(e,t){var i,o,r=this.properties();if(0===e&&r.wordWrapWidth&&r.wordWrapWidth.value()){if(i=this.isFixed()?this.fixedPoints()[0].x:this._timeScale.indexToCoordinate(this.points()[0].index),o=this._timeScale.indexToCoordinate(t.index)-i-~~(r.fontsize.value()/6),!isFinite(o))return;r.wordWrapWidth.setValue(Math.max(n.MIN_WIDTH,o))}},n.prototype.pointsCount=function(){return 1},n.prototype.title=function(){return u},n.prototype.name=function(){return"Text"},n.prototype.setPriceScale=function(e){s.prototype.setPriceScale.call(this,e),e&&e.priceRange()&&(this._priceDencity=e.height()/e.priceRange().length(),this._isPriceDencityLog=e.isLog())},n.prototype.restoreSize=function(){this._barSpacing=this._model.timeScale().barSpacing(),this._priceDencity=this.priceScale().height()/this.priceScale().priceRange().length(),this.updateAllViews(),this._model.updateSource(this)},n.prototype.template=function(){var e=r.prototype.template.call(this);return e.text=this.properties().childs().text.value(),e},n.prototype._applyTemplateImpl=function(e){r.prototype._applyTemplateImpl.call(this,e),this.properties().childs().text.setValue(e.text)},n.createProperties=function(e){var t=new l("linetooltext",e);return n._configureProperties(t),t},n._configureProperties=function(e){r._configureProperties(e),e.hasChild("text")||e.addChild("text",new a(window.t("Text"))),e.addExclusion("text")},inherit(o,n),o.prototype.title=function(){return window.t("Anchored Text")},o.prototype.name=function(){return"Anchored Text"},n.prototype.hasEditableCoordinates=function(){return!1},o.prototype.isFixed=function(){return!0},o.createProperties=function(e){var t=new l("linetooltextabsolute",e);return o._configureProperties(t),t},o._configureProperties=function(e){n._configureProperties(e)},n.prototype.state=function(e){var t=r.prototype.state.call(this,e);return e&&(t.state.fixedSize=!1),t},n.prototype.getInputsPropertyPage=function(){return null},n.prototype.getStylesPropertyPage=function(){return c.LineToolTextStylesPropertyPage},
n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("QWxu").TextDefinitionsViewModel}.bind(null,i)).catch(i.oe)},t.LineToolText=n,t.LineToolTextAbsolute=o},VNzU:function(e,t,i){"use strict";function n(e){return"s"===e}function o(e){return!n(e)}var r,s,a,l;i.r(t),r=i("mrSG"),i("Dq3s"),i.d(t,"layouts",function(){return l}),i.d(t,"isSingleLayout",function(){return n}),i.d(t,"isMultipleLayout",function(){return o}),s={s:{title:"1 chart",count:1,sizer:function(e,t){if(0!==t)throw new RangeError("invalid index");return e}}},a={},l=Object(r.__assign)(Object(r.__assign)({},s),a)},VVxS:function(e,t,i){"use strict";var n,o=function(){try{this.isAvailable=!0,this.localStorage=window.localStorage,this.localStorage.setItem("tvlocalstorage.available","true")}catch(e){delete this.isAvailable,delete this.localStorage}this._updateLength()};o.prototype.length=0,o.prototype.isAvailable=!1,o.prototype.localStorage={"tvlocalstorage.available":"false"},o.prototype._updateLength=function(){var e,t;if(this.isAvailable)this.length=this.localStorage.length;else{for(t in e=0,this.localStorage)this.localStorage.hasOwnProperty(t)&&e++;this.length=e}},o.prototype.key=function(e){return this.isAvailable?this.localStorage.key(e):Object.keys(this.localStorage)[e]},o.prototype.getItem=function(e){return this.isAvailable?this.localStorage.getItem(e):void 0===this.localStorage[e]?null:this.localStorage[e]},o.prototype.setItem=function(e,t){this.isAvailable?this.localStorage.setItem(e,t):this.localStorage[e]=t,this._updateLength()},o.prototype.removeItem=function(e){this.isAvailable?this.localStorage.removeItem(e):delete this.localStorage[e],this._updateLength()},o.prototype.clear=function(){this.isAvailable?this.localStorage.clear():this.localStorage={},this._updateLength()},(n=function(e){this.storage=e}).prototype.getItem=function(e){return Promise.resolve(this.storage.getItem(e))},n.prototype.setItem=function(e,t){return Promise.resolve(this.storage.setItem(e,t))},window.TVLocalStorage=new o,window.TVLocalStorageAsync=new n(window.TVLocalStorage),e.exports={TVLocalStorage:window.TVLocalStorage,TVLocalStorageAsync:window.TVLocalStorageAsync}},VdBB:function(e,t,i){"use strict";i.r(t),i.d(t,"HitTestResult",function(){return n});var n=function(){function e(e,t,i){this._result=e,this._data=t,this._eraseMarker=i}return e.prototype.result=function(){return this._result},e.prototype.data=function(){return this._data},e.prototype.eraseMarker=function(){return this._eraseMarker},e.MOVEPOINT_BACKGROUND=1,e.REGULAR=2,e.MOVEPOINT=3,e.CHANGEPOINT=4,e.CUSTOM=5,e.CUSTOM_MOVE=6,e}()},Vdly:function(e,t,i){"use strict";(function(e,t){var n,o,r,s,a,l;i("qFKp"),n=i("dTSQ").regExpEscape,o=i("FBuY").TVXWindowEvents,r=i("VVxS").TVLocalStorage,s=i("aIyQ"),i("brCa").showNoticeDialog,a=["s.tradingview.com","betacdn.tradingview.com"],l=window.TVSettings=function(){function t(e){return w+"."+e}function i(e,t){var i;return i=P[e],
window.is_authenticated&&!A||null!=i||(i=P[e]),null==i?t:i}function c(e,t,i){i=i||{};var n=""+t;return P[e]!==n&&(P[e]=n,d(e)),i.forceFlush&&!x&&(x=setTimeout(function(){x=void 0,p()},b)),l}function u(e,t){return t=t||{},null!=P[e]&&(delete P[e],d(e)),t.forceFlush&&p(),l}function h(){T=void 0,C.length&&p()}function d(e){if(k)null==P[e]?k.removeValue(e):k.setValue(e,P[e]);else if(!window.is_authenticated||A)try{null==P[e]?r.removeItem(t(e)):r.setItem(t(e),P[e])}catch(e){}else C.push(e),T||(T=setTimeout(h,S));o.emit("settings",JSON.stringify({key:e,value:P[e]}))}function p(t){e.enabled("widget")||window.is_authenticated&&!A&&C.length}function _(){return Object.keys(P)}function f(e){for(var t=0;t<I.length;++t)if(I[t].exec(e))return!0;return!1}function m(e){var t,i,n,o;for(P={},t=0===Object.keys(e).length,i=w+".",n=r.length;n--;)(o=r.key(n))&&o.substring(0,i.length)===i&&(t&&c(o.substring(i.length),r.getItem(o)),r.removeItem(o));Object.keys(e).forEach(function(t){P[t]=e[t]+""})}var y,g,v,S,b,w,P,C,T,x,I,L,M=!1,A=e.enabled("cqg_terminal"),k=null;try{M=!TradingView.onWidget()&&parent&&parent!==window&&!!parent.IS_DEMO_PAGE}catch(e){}return M?(y={"widgetbar.layout-settings":{widgets:{},settings:{minimized:!0}},notShowMainWizard:!0},{loaded:!1,loadedModel:!1,getValue:g=function(e,t,i){var n=y[e];return null==n?t:n},getJSON:g,getBool:g,getFloat:g,getInt:g,setValue:v=function(){},setJSON:v,remove:v,keys:function(){return Object.keys(y)},keysMask:function(){return[]},sync:v,onSync:{subscribe:function(){}}}):(S=12e4,b=10,"local"===window.environment&&(S=5e3),w=TradingView.onWidget()?"tradingview-widget":"tradingview",P={},C=[],I=[/^widgetbar\.widget\.watchlist.+/,/.+quicks$/,/^widgetbar\.layout-settings$/,/^ChartSideToolbarWidget\.visible$/,/^onwidget\.watchlist$/,/^domepanel.visible$/,/^orderpanel.visible$/,/^chart\.favoriteDrawings$/,/^chart\.favoriteDrawingsPosition$/,/^loadChartDialog.favorites$/,/^ChartFavoriteDrawingToolbarWidget\.visible/,/^trading\.chart\.proterty$/,/^trading_floating_toolbar\.position$/,/^trading\.orderWidgetMode\./,/^symbolWatermark$/],o.on("settings",function(e){var t=JSON.parse(e);null==t.value?delete P[t.key]:P[t.key]=t.value}),L=new s,document.addEventListener("visibilitychange",function(){"hidden"!==document.visibiltyState&&!0!==document.hidden||p()}),window.addEventListener("unload",function(){p()}),{loaded:!1,loadedModel:!1,getValue:i,getJSON:function(e,t){var n=i(e,void 0);if(null==n)return t;try{return JSON.parse(n)}catch(i){return u(e),t}},getBool:function(e,t){var n=i(e);return null==n?t:!(!n||"false"===n||0==+n)},getFloat:function(e,t,n){var o,r=i(e,void 0);if(null==r)return t;if(o=parseFloat(r),!isFinite(o))throw new TypeError('"'+r+'" is not float (key: "'+e+'")');return o},getInt:function(e,t,n){var o,r=i(e,void 0);if(null==r)return t;if(o=parseInt(r,10),!isFinite(o))throw new TypeError('"'+r+'" is not int (key: "'+e+'")');return o},setValue:c,setJSON:function(e,t,i){return c(e,JSON.stringify(t),i),l},remove:u,keys:_,keysMask:function(e,t){var i,o=_(),r=[]
;for(e=new RegExp("^"+n(e).replace(/\\\*\\\*/gi,".+").replace(/\\\*/gi,"[^.]+")+"$","gi"),i=o.length-1;i>=0;i--)e.test(o[i])&&r.push(o[i]),e.lastIndex=0;return r},sync:function(t){k?m(k.initialSettings||{}):window.is_authenticated&&!A?m(t||{}):(function(){var e,t,i,n;if(TradingView.onWidget()&&a.includes(window.location.host))for(e="tradingview.",t=r.length;t--;)0===(i=r.key(t)).indexOf(e)&&(n=i.replace(e,w+"."),r.setItem(n,r.getItem(i)),r.removeItem(i))}(),function(){var t,i,n,o,s;for(P={},t=w+".",i=!e.enabled("save_chart_properties_to_local_storage"),n=r.length;n--;)(o=r.key(n))&&o.substring(0,t.length)===t&&(s=o.substring(t.length),i&&!f(s)||(P[s]=r.getItem(o)))}()),L.fire()},onSync:L,setSettingsAdapter:function(e){k=e}})}(),t&&t.exports&&(t.exports=l)}).call(this,i("Kxc7"),i("YuTi")(e))},VfPj:function(e,t,i){"use strict";function n(e){this._items=e.items,this._y=e.y,this._h=e.h,this._w=e.w}n.prototype.draw=function(e){},n.prototype.drawBackground=function(e){var t,i,n;for(e.save(),e.translate(-.5,-.5),t=0;t<this._items.length;++t)null!=(i=this._items[t]).color&&(e.fillStyle=i.color,n=t===this._items.length-1?this._w:this._items[t+1].x-i.x,e.fillRect(i.x,this._y,n,this._h));e.restore()},n.prototype.hitTest=function(e){return null},t.PaneRendererBackground=TradingView.PaneRendererBackground=n},VgjZ:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"PriceAxisRendererOptionsProvider",function(){return r}),n=i("XlJ7"),o=i("zDbI"),r=function(){function e(e){this._rendererOptions={borderSize:1,tickLength:4,offsetSize:1,fontSize:NaN,font:"",color:"",paddingBottom:0,paddingInner:0,paddingOuter:0,paddingTop:0,baselineOffset:0},this._chartModel=e}return e.prototype.options=function(){var e=this._rendererOptions,t=this._fontSize();return e.fontSize!==t&&(e.fontSize=t,e.font=Object(n.makeFont)(t,o.CHART_FONT_FAMILY,""),e.paddingTop=Math.floor(t/3.5),e.paddingBottom=e.paddingTop,e.paddingInner=Math.max(Math.ceil(t/2-e.tickLength/2),0),e.paddingOuter=Math.ceil(t/2+e.tickLength/2),e.baselineOffset=Math.round(t/5)),e.color=this._textColor(),this._rendererOptions},e.prototype._textColor=function(){return this._chartModel.properties().scalesProperties.textColor.value()},e.prototype._fontSize=function(){return this._chartModel.properties().scalesProperties.fontSize.value()},e}()},W5mg:function(e,t,i){"use strict";function n(e){return!e.groupId&&"time"!==e.type&&!e.isHidden&&!o.includes(e.id)}i.d(t,"a",function(){return n});var o=["first_visible_bar_time","last_visible_bar_time"]},WIS0:function(e,t,i){"use strict";function n(e,t){return e.ticker+"_"+t}function o(e){return new Date(e).toISOString()}var r,s,a,l,c,u,h,d;i.r(t),i.d(t,"DatafeedRequestsCachedProcessor",function(){return d}),r=i("mrSG"),s=i("Eyy1"),a=i("LxhU"),l=i("Y7w9"),c=i("ocLq"),u=i("Kxc7"),i("HbRj"),h=function(){function e(e,t,i,n){this._cache={bars:[]},this._nextSubscriptionId=0,this._pendingSubscribers=[],this._subscribers=[],this._requesting=!1,this._leftDate=null,this._gaps=[],this._needPurgeCache=!1,this._realtimeOn=!1,this._endOfData=!1,
this._resetCacheTimeout=null,this._errorMessage=null,this._destroyed=!1,this._emptyResponsesCount=0,this._datafeed=e,this._symbolInfo=t,this._resolution=Object(s.ensureNotNull)(a.Interval.normalize(i)),this._dwmAligner=n}return e.prototype.destroy=function(){0!==this._subscribers.length&&console.warn("Destroying with not-empty state"),this._clearResetCacheTimeout(),this._unsubscribeRealtime(),this._purgeCache(),delete this._datafeed,this._destroyed=!0},e.prototype.addSubscription=function(e,t,i){var n=this,o=this._getNextSubscriptionId(),r=Math.floor(e.from/1e3),s=Math.floor(e.to/1e3);return this._pendingSubscribers.push({key:o,range:{from:r,to:s},onHistoryCallback:t,onErrorCallback:i}),this._clearResetCacheTimeout(),setTimeout(function(){n._destroyed||n._processPendingSubscribers()},0),o},e.prototype.removeSubscription=function(e){var t,i=this,n=this._pendingSubscribers.find(function(t){return t.key===e});if(n)this._pendingSubscribers.splice(this._pendingSubscribers.indexOf(n),1);else{if(t=this._subscribers.find(function(t){return t.key===e}))return this._subscribers.splice(this._subscribers.indexOf(t),1),void(this._subscribers.length||(this._symbolInfo.expired||this._symbolInfo.expiration_date?this._unsubscribeRealtime():this._resetCacheTimeout=setTimeout(function(){i._purgeCacheDelayed(),i._unsubscribeRealtime()})));console.warn("Unknown subscription symbol={0}, resolution={1}, key={2}".format(this._symbolInfo.name,this._resolution,e))}},e.prototype._purgeCacheDelayed=function(){this._logMessage("Reset cache"),this._needPurgeCache=!0,this._clearResetCacheTimeout()},e.prototype._logMessage=function(e,t){(u.enabled("charting_library_debug_mode")||t)&&console.log("FEED [{0}|{1}]: {2}".format(this._symbolInfo.name,this._resolution,e))},e.prototype._clearResetCacheTimeout=function(){null!==this._resetCacheTimeout&&(clearTimeout(this._resetCacheTimeout),this._resetCacheTimeout=null)},e.prototype._purgeCache=function(){this._cache={bars:[]},this._gaps=[],this._errorMessage=null,this._needPurgeCache=!1,this._leftDate=null,this._endOfData=!1},e.prototype._processPendingSubscribers=function(){var e,t,i,n,r,s=this,l=this._pendingSubscribers;if(l.length)if(this._requesting)this._logMessage("Processing is skipped due active request");else{if(this._logMessage("Processing pending subscribers, count="+l.length),this._needPurgeCache&&this._purgeCache(),this._errorMessage)return e=this._errorMessage,this._logMessage("Return error: "+e),this._pendingSubscribers=[],void l.forEach(function(t){t.onErrorCallback(e)});t=l.reduce(function(e,t){return Math.min(t.range.from,e)},1/0),this._logMessage('Leftmost requested "from" is '+o(1e3*t)),this._leftDate&&!(t<this._leftDate)||(i=(a.Interval.parse(this._resolution).inMilliseconds(Date.now())||0)/1e3,r=!(n=!this._leftDate)&&!!this._cache.bars.length&&this._cache.bars[0].time/1e3-t<i,!n&&r||this._endOfData)?(this._pendingSubscribers=[],l.forEach(function(e){var t=s._moveSubscriberToRealtime(e);s._returnHistoryDataToSubscriber(e,t)}),
this._subscribeRealtimeIfNeeded()):this._ensureRequestedTo(t)}},e.prototype._moveSubscriberToRealtime=function(e){var t={key:e.key,onHistoryCallback:e.onHistoryCallback,barset:null};return this._subscribers.push(t),t},e.prototype._subscribeRealtimeIfNeeded=function(){!this._subscribers.length||this._realtimeOn||this._symbolInfo.expired||this._symbolInfo.expiration_date||this._subscribeRealtime()},e.prototype._subscribeRealtime=function(){var e,t,i=this;this._symbolInfo.expired||this._realtimeOn||(e=function(e){i._dwmAligner&&(e.time=i._dwmAligner.tradingDayToSessionStart(e.time)),i._putToCacheNewBar(e),i._subscribers.forEach(function(t){var i=t.barset;if(null===i)throw new Error("subscirber.barset is null");i.add(e),t.onHistoryCallback(i)})},t=function(){i._unsubscribeRealtime();var e=i._leftDate;i._purgeCache(),e&&i._ensureRequestedTo(e)},this._realtimeOn=!0,this._datafeed.subscribeBars(this._symbolInfo,this._resolution,e,n(this._symbolInfo,this._resolution),t),this._logMessage("Subscribed to realtime"))},e.prototype._unsubscribeRealtime=function(){!this._symbolInfo.expired&&this._realtimeOn&&(this._datafeed.unsubscribeBars(n(this._symbolInfo,this._resolution)),this._logMessage("Unsubscribed from realtime"),this._realtimeOn=!1)},e.prototype._returnHistoryDataToSubscriber=function(e,t){var i,n,r=e.range,s=this._createBarset(r.from);s.count()>0?this._logMessage("Bars to return for request {0}: total {1} bars in [{2} ... {3}] ".format(e.key,s.count(),o(s.bars[0].time),o(s.bars[s.count()-1].time))):this._logMessage("Request {0}. Nothing to return.".format(e.key)),t.barset=s,(i=this._inGapNextTime(r.from))?(this._logMessage("Request {0} is in gap, nextTime = {1}".format(e.key,o(1e3*i))),s.nextTime=i):0===s.count()&&(n=this._cache.bars.length&&this._cache.bars[this._cache.bars.length-1].time/1e3)&&r.from>n&&(this._logMessage("Request {0} is in gap, nextTime = {1}".format(e.key,o(1e3*n))),s.nextTime=n||void 0),this._endOfData&&null!==this._leftDate&&e.range.from<=this._leftDate&&(s.endOfData=!0),e.onHistoryCallback(s)},e.prototype._createBarset=function(e){var t=Object(l.lowerbound)(this._cache.bars,1e3*e,function(e,t){return e.time<t});return new c.BarSet(this._symbolInfo,this._cache.bars.slice(t))},e.prototype._ensureRequestedTo=function(t){var i,n,r,s=this;this._leftDate&&this._leftDate<t?this._processPendingSubscribers():(i=!this._leftDate,this._requesting=!0,n=t,r=this._leftDate?this._leftDate-1:this._symbolInfo.expiration_date||Math.floor(e._now()/1e3),this._leftDate=t,this._logMessage("Requesting data: [{0} ... {1}] ".format(o(1e3*n),o(1e3*r))),this._datafeed.getBars(this._symbolInfo,this._resolution,n,r,function(e,t){s._destroyed||(s._requesting=!1,s._processBars(e,t))},function(e){s._requesting=!1,s._errorMessage=e||null,s._processPendingSubscribers()},i))},e.prototype._processBars=function(e,t){this._checkBars(e),this._alignBarsTime(e),e.length>0?(this._emptyResponsesCount=0,this._processFullBarset(e,t)):(this._emptyResponsesCount+=1,this._processEmptyBarset(t)),this._processPendingSubscribers()},
e.prototype._processEmptyBarset=function(t){this._logMessage("Receiving bars: barset is empty"),t&&t.nextTime?(this._logMessage("Next time received: `{0}`".format(o(1e3*t.nextTime))),this._addGap(t.nextTime),this._leftDate=Math.min(this._leftDate||e._now()/1e3,t.nextTime+1)):t&&t.noData?(this._logMessage("EOD received"),this._setEndOfData()):this._logMessage("nextTime or noData should present in metainfo when empty barset is returned"),50===this._emptyResponsesCount&&(this._logMessage("EOD detected due 50 empty responses in a row"),this._setEndOfData())},e.prototype._setEndOfData=function(){this._endOfData=!0,this._cache.bars.length&&(this._leftDate=this._cache.bars[0].time/1e3)},e.prototype._processFullBarset=function(e,t){var i=e[0].time,n=e[e.length-1].time;this._logMessage("Receiving bars: total {0} bars in [{1} ... {2}] ".format(e.length,o(i),o(n))),null!==this._leftDate&&i<1e3*this._leftDate&&this._logMessage("Returned more data than needed"),this._putToCache(e)?null!==this._leftDate&&this._cache.bars.length&&this._leftDate>this._cache.bars[0].time/1e3&&(this._leftDate=this._cache.bars[0].time/1e3):this._logMessage("Incremental update failed. Starting full update. Returned data should be in the requested range.",!0),t&&t.nextTime?console.warn("nextTime should be set when there is no data in the requested period only"):t&&t.noData&&console.warn("noData should be set when there is no data in the requested period and earlier only")},e.prototype._addGap=function(t){var i,n=this._gaps.find(function(e){return e.from===t});n||(i=(this._cache.bars.length?this._cache.bars[0].time:e._now())/1e3,this._gaps.push({from:t,to:i}))},e.prototype._inGapNextTime=function(e){var t=this._gaps.find(function(t){return t.from<e&&t.to>e});return t?t.from:null},e.prototype._getNextSubscriptionId=function(){return this._nextSubscriptionId++},e.prototype._checkBars=function(e,t){var i,n;if(void 0===t&&(t=!1),u.enabled("charting_library_debug_mode"))for(i=1;i<e.length;i++)e[i].time<=e[i-1].time&&(n="Wrong bars time: time {0} of bar {1} should be more than time {2} of bar {3}".format(e[i].time,i,e[i-1].time,i-1),t&&this._dwmAligner&&(n+="\nCheck that you provide DWM bars without time part, i.e. 00:00 GMT"),console.error(n))},e.prototype._putToCache=function(e){if(0===e.length)return!0;if(this._cache.bars.length===e.length&&this._cache.bars[0].time===e[0].time&&this._cache.bars[this._cache.bars.length-1].time===e[e.length-1].time)return this._logMessage("Time range of received data is the same as cached one. Skip the update."),!0;if(0!==this._cache.bars.length&&e[e.length-1].time===this._cache.bars[0].time&&this._cache.bars.splice(0,1),0!==this._cache.bars.length&&e[e.length-1].time>=this._cache.bars[0].time){var t=this._cache.bars[this._cache.bars.length-1].time===e[e.length-1].time;if(this._cache.bars=[],!t)return this._leftDate=null,!1;this._logMessage("Received history up to now instead of incremental update. Return exactly what is requested.")}return this._cache.bars=Object(r.__spreadArrays)(e,this._cache.bars),
this._checkBars(this._cache.bars,!0),!0},e.prototype._putToCacheNewBar=function(e){var t=this._cache.bars.length,i=e.time,n=0===t?NaN:this._cache.bars[t-1].time,r=0===t||n<i;r?this._cache.bars.push(e):n===i?this._cache.bars[t-1]=e:console.error("putToCacheNewBar: time violation, previous bar time: "+o(n)+" should be less or equal to new time: "+o(i))},e.prototype._alignBarsTime=function(e){if(this._dwmAligner)for(var t=0;t<e.length;t++)e[t].time=this._dwmAligner.tradingDayToSessionStart(e[t].time)},e._now=function(){return Date.now()+6e4},e}(),d=function(){function e(e,t){this._threads={},this._datafeed=e,this._dwmAlignerCreator=t}return e.prototype.destroy=function(){this._forEachThread(function(e,t){return t.destroy()}),this._threads={},delete this._datafeed},e.prototype.purgeCache=function(){this._forEachThread(function(e,t){return t.destroy()}),this._threads={}},e.prototype.subscribe=function(e,t,i,o,r){var s=n(e,t);return this._threads[s]||(this._threads[s]=this._createThread(e,t)),s+'"'+this._threads[s].addSubscription(i,o,r)},e.prototype.unsubscribe=function(e){var t,i,n=e.split('"');2===n.length?(t=n[0],i=parseInt(n[1]),this._threads.hasOwnProperty(t)?this._threads[t].removeSubscription(i):console.warn("Data thread doesnt exist: "+e)):console.warn("Wrong guid format")},e.prototype._createThread=function(e,t){var i=this._dwmAlignerCreator(t,e.timezone,e.session,e.holidays,e.corrections);return new h(this._datafeed,e,t,i)},e.prototype._forEachThread=function(e){var t=this;Object.keys(this._threads).forEach(function(i){return e(i,t._threads[i])})},e}()},WPQD:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolTrendLine";var r=t||n.createProperties();o.call(this,e,r),e._trendLineStatsCache||(e._trendLineStatsCache=new a),i.e("lt-pane-views").then(function(e){var t=i("ocVb").TrendLinePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=i("FVHe").TrendLineStatsCache,l=window.t("Trend Line");inherit(n,o),n.prototype.stop=function(){o.prototype.stop.call(this),this._model._trendLineStatsCache.removeSource(this.id())},n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return l},n.prototype.name=function(){return"Trend Line"},n.prototype.canHasAlert=function(){return!0},n.prototype._getAlertPlots=function(){return[this._linePointsToAlertPlot(this._points,null,this.properties().extendLeft.value(),this.properties().extendRight.value())]},n.prototype.getStylesPropertyPage=function(){return s.LineToolTrendLineStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("auWl").TrendLineDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new r("linetooltrendline",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolTrendLine=n},Wc1E:function(e,t,i){
"use strict";var n,o,r,s,a,l,c,u,h,d;i.r(t),i.d(t,"DataModeIndicator",function(){return d}),n=i("mrSG"),i("YFKU"),i("HbRj"),o=i("quTg"),r=i("r8Gw"),s={connecting:"tv-data-mode--connecting",delayed:"tv-data-mode--delayed",delayed_streaming:"tv-data-mode--delayed",endofday:"tv-data-mode--endofday",forbidden:"tv-data-mode--forbidden",realtime:"tv-data-mode--realtime",snapshot:"tv-data-mode--snapshot",loading:"tv-data-mode--loading",replay:"tv-data-mode--replay"},a={connecting:window.t("Connecting"),delayed:window.t("Delayed"),delayed_streaming:window.t("Delayed"),endofday:window.t("End of Day"),forbidden:window.t("Instrument is not allowed"),realtime:window.t("Real-time"),snapshot:window.t("Snapshot"),loading:"",replay:window.t("Replay Mode")},l={connecting:window.t("C",{context:"data_mode_connecting_letter"}),delayed:window.t("D",{context:"data_mode_delayed_letter"}),delayed_streaming:window.t("D",{context:"data_mode_delayed_streaming_letter"}),endofday:window.t("E",{context:"data_mode_end_of_day_letter"}),forbidden:window.t("F",{context:"data_mode_forbidden_letter"}),realtime:window.t("R",{context:"data_mode_realtime_letter"}),snapshot:window.t("S",{context:"data_mode_snapshot_letter"}),loading:"",replay:window.t("R",{context:"data_mode_replay_letter"})},u={streaming:"realtime"},h={classMap:s,classSuffix:"",data:{values:{update_mode:"connecting"}},labelMap:a,modeInterval:c=600,short:!1,shortLabelMap:l,showTooltip:!0,tooltipType:"custom"},d=function(e){function t(t){var i=e.call(this,t)||this;return i._quoteSessionPrefix="data-mode-indicator",i._componentClass="tv-data-mode",i._init(t),i}return Object(n.__extends)(t,e),t.prototype.getLabel=function(){return!0===this._shortMode?this._shortLabelMap[this._value]||"":e.prototype.getLabel.call(this)},t.prototype.setMode=function(e,t){this.update({values:{update_mode:e,update_mode_seconds:t}})},t.prototype.hide=function(){this._el.classList.add("i-hidden")},t.prototype.show=function(){this._el.classList.remove("i-hidden")},t.prototype.getTooltipText=function(){var e="",t=this.getValue();if(""===t)return e;switch(t){case"delayed":e=window.t("Quotes are delayed by {0} min and updated every 30 seconds");break;case"delayed_streaming":e=window.t("Quotes are delayed by {0} min");break;default:e=this._labelMap[t]||e}return["delayed","delayed_streaming"].includes(t)&&(e=e.format(Math.round(this._modeInterval/60))),e},t.prototype._init=function(t){void 0===t&&(t={});var i=Object.assign({},h,t);this._modeInterval=i.modeInterval||c,this._shortLabelMap=i.shortLabelMap||l,e.prototype._init.call(this,i),this._render()},t.prototype._getValueFromData=function(e){var t;return t=void 0!==e.values&&void 0!==e.values.update_mode?e.values.update_mode:this.getValue(),u[t]||t},t.prototype._updateValue=function(t,i){void 0!==t.values&&void 0!==t.values.update_mode_seconds&&(this._modeInterval=t.values.update_mode_seconds),e.prototype._updateValue.call(this,t,i)},t}(r.a)},"Wh/T":function(e,t,i){"use strict";var n=i("Kxc7");window.onload=function(){location.hostname.indexOf(".")>=0&&!function(){try{
return/^(192|172|10)\.[0-9][0-9][0-9]\.[0-9][0-9][0-9]\.[0-9][0-9][0-9]/.test(location.hostname)||/^.*((?:\.local)|localhost)$/.test(location.hostname)}catch(e){return!1}}()&&setTimeout(function(){try{var e=function(){var e=0,t=JSON.parse(urlParams.logo);return t.image&&(e="C",n.enabled("link_to_tradingview")||(e="D")),e}();window.ga&&(0!==e&&window.ga("send","event","s",e),urlParams.utm||window.ga("send","event","l"))}catch(e){}},3e4)}},Wh6B:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolPrediction";var o=t||n.createProperties();r.call(this,e,o),i.e("lt-pane-views").then(function(e){var t=i("Ay2m").PredictionPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Eyy1").ensureNotNull,r=i("Ss5c").LineDataSource,s=i("Ocx9").DefaultProperty,a=i("hayr").propertyPages,l=i("08i5"),c=window.t("Forecast");inherit(n,r),n.prototype.status=function(){return this._properties.status.value()},n.prototype.setStatus=function(e){return this._properties.status.setValue(e)},n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return c},n.prototype.name=function(){return"Forecast"},n.prototype.restorePoints=function(e,t,i){r.prototype.restorePoints.call(this,e,t,i),this.checkAlert()},n.prototype.checkAlert=function(){var e,t,i,n;this._points.length<2||this._model.mainSeries().bars().isEmpty()||(e=this._points[1],this.status()?e.index>this._model.timeScale().baseIndex()&&this.setStatus(l.AlertStatus.Waiting):null!==(t=this._model.mainSeries().bars().valueAt(e.index))&&((i=this.direction())===l.Direction.Up&&t[TradingView.HIGH_PLOT]>=e.price?this.setStatus(l.AlertStatus.Success):i===l.Direction.Down&&t[TradingView.LOW_PLOT]<=e.price?this.setStatus(l.AlertStatus.Success):(n=o(this._model.mainSeries().bars().lastIndex()),e.index!==n&&this.setStatus(l.AlertStatus.Failure))))},n.prototype.addPoint=function(e){var t=r.prototype.addPoint.call(this,e);return t&&this.checkAlert(),t},n.prototype.endChanging=function(){r.prototype.endChanging.call(this),this.setStatus(l.AlertStatus.Waiting),this.checkAlert()},n.prototype.onData=function(e){r.prototype.onData.call(this,e),this.checkAlert()},n.prototype.endMoving=function(){r.prototype.endMoving.call(this),this.setStatus(l.AlertStatus.Waiting),this.checkAlert()},n.prototype.direction=function(){var e;return this.points().length<2?l.Direction.Up:(e=this.points()[0],this.points()[1].price>e.price?l.Direction.Up:l.Direction.Down)},n.prototype.getStylesPropertyPage=function(){return a.LineToolPredictionStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("Pwwq").PredictionDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.prototype.cloneable=function(){return!1},n.createProperties=function(e){var t=new s("linetoolprediction",e);return n._configureProperties(t),t},n._configureProperties=function(e){r._configureProperties(e),e.merge({status:l.AlertStatus.Waiting})},t.LineToolPrediction=n},
WkOR:function(e,t,i){"use strict";function n(e,t){return void 0===e?void 0===t:void 0!==t&&(s?e.toUpperCase()===t.toUpperCase():e===t)}function o(e,t){return e.some(function(e){return n(t,e)})}var r,s;i.r(t),i.d(t,"areEqualSymbols",function(){return n}),i.d(t,"includesEqualSymbol",function(){return o}),r=i("Kxc7"),s=r.enabled("uppercase_instrument_names")},WkYF:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolDateRange";var r=t||n.createProperties();o.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("3xLB").DateRangePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=window.t("Date Range");inherit(n,o),n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return a},n.prototype.name=function(){return"Date Range"},n.prototype.getStylesPropertyPage=function(){return s.LineToolDateRangeStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("Ax76").GeneralDatePriceRangeDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new r("linetooldaterange",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolDateRange=n},WmDe:function(e,t,i){"use strict";TradingView.PublishedChartsTimeline=function(){},TradingView.LinearRegressionPaneView=function(){},TradingView.study_PivotPointsStandard=function(){},TradingView.study_PivotPointsHighLow=function(){},TradingView.study_ZigZag=function(){},TradingView.study_LinearRegression=function(){},TradingView.study_ElliottWave=function(){},TradingView.ESDStudyBase=function(){},TradingView.Pro=function(){this.hasPackage=function(){return!1}},window.user={is_pro:!1,settings:{}},TradingView.Pro.prototype.isPaidPro=function(){return!1},TradingView.Pro.prototype.hasActivePackages=function(){return!1},TradingView.Pro.prototype.isSupportAvailable=function(){return!1},TradingView.Pro.prototype.getStudies=function(){return[]},TradingView.Pro.prototype.getProduct=function(){return{}},TradingView.Pro.prototype.getStudiesOrder=function(){return[]},TradingView.AlertLabel=function(){},TradingView.getDataVendorString=function(){},TradingView.study_VbPVisible=function(){},TradingView.study_VbPSessions=function(){},TradingView.study_ESD$TV_DIVIDENDS=function(){},TradingView.study_ESD$TV_SPLITS=function(){},TradingView.study_ESD$TV_EARNINGS=function(){},TradingView.MockupRequestedCache=function(e){e&&e([])},TradingView.MockupRequestedCache.invalidate=function(){},TradingView.LinetoolTemplatesList=function(){}},Wo0S:function(e,t,i){e.exports={"common-tooltip":"common-tooltip-s2GEoMlT","common-tooltip--hidden":"common-tooltip--hidden-Z0EAvXgv","common-tooltip--horizontal":"common-tooltip--horizontal-13imOC5w","common-tooltip--farther":"common-tooltip--farther-2yXMAkHF",
"common-tooltip--vertical":"common-tooltip--vertical-mcRoucek","common-tooltip-farther":"common-tooltip-farther-XoKytD99","common-tooltip--no-pointer-events":"common-tooltip--no-pointer-events-3nL0Vygu","common-tooltip--direction_normal":"common-tooltip--direction_normal-3u9ejKM2","common-tooltip__body":"common-tooltip__body-356XFpBj","common-tooltip__button-container":"common-tooltip__button-container-3EjyKV3s","common-tooltip__body--no-buttons":"common-tooltip__body--no-buttons-3quqi1Sv","common-tooltip__button":"common-tooltip__button-1rnQgujz","common-tooltip--direction_reversed":"common-tooltip--direction_reversed-XN-JUTdr","common-tooltip__ear-holder":"common-tooltip__ear-holder-yIJjpvgu","common-tooltip__ear-holder--below":"common-tooltip__ear-holder--below-1rmzWejA","common-tooltip__ear-holder--above":"common-tooltip__ear-holder--above-1D8FkNkw","common-tooltip__ear-holder--before":"common-tooltip__ear-holder--before-oXq5sFXr","common-tooltip__ear-holder--after":"common-tooltip__ear-holder--after-BnAcuW1N","common-tooltip__body--with-hotkey":"common-tooltip__body--with-hotkey-2wXRtgYZ","common-tooltip__body--width_wide":"common-tooltip__body--width_wide-3oG604Li","common-tooltip__body--width_narrow":"common-tooltip__body--width_narrow-34hrFTFo","common-tooltip__body--no-padding":"common-tooltip__body--no-padding-2vVe6Xco","common-tooltip__hotkey-block":"common-tooltip__hotkey-block-2gS_uAOl","common-tooltip__hotkey-block--divider":"common-tooltip__hotkey-block--divider-rQ38KmpQ","common-tooltip__hotkey-text":"common-tooltip__hotkey-text-1eb7dyCg","common-tooltip__hotkey-button":"common-tooltip__hotkey-button-1XJ40e4D","common-tooltip__plus-sign":"common-tooltip__plus-sign-3CKSupKp"}},Wt0y:function(e,t,i){"use strict";function n(e){var t;return void 0===e&&(e=location.host),t=["d33t3vvu2t2yu5.cloudfront.net","dwq4do82y8xi7.cloudfront.net","s.tradingview.com","s3.tradingview.com"],-1!==["i18n.tradingview.com","partial.tradingview.com","www.tradingview.com","wwwcn.tradingview.com"].indexOf(e)||-1!==t.indexOf(e)||e.match(/^[a-z]{2}\.tradingview\.com/)||e.match(/prod-[^.]+.tradingview.com/)?"battle":-1!==e.indexOf("tradingview.com")?"staging":e.match(/webcharts/)?"staging_local":(e.match(/^localhost(:\d+)?$/),"local")}function o(){return"local"===n()}function r(){return"battle"===n()}function s(){return!r()}i.r(t),i.d(t,"environment",function(){return n}),i.d(t,"isLocal",function(){return o}),i.d(t,"isProd",function(){return r}),i.d(t,"isDebug",function(){return s})},XAms:function(e,t,i){"use strict";function n(e){e.preventDefault()}function o(e){var t=e.target;t&&!t.closest(r.join(", "))&&e.preventDefault()}i.d(t,"a",function(){return n}),i.d(t,"b",function(){return o});var r=["input:not([type])",'input[type="text"]','input[type="email"]','input[type="password"]','input[type="search"]','input[type="number"]','input[type="url"]',"textarea","a[href]",'*[contenteditable="true"]']},XFad:function(e,t,i){"use strict";function n(e,t){var i=t||n.createProperties();r.call(this,e,i),
this._constructor="LineToolSchiffPitchfork2"}var o=i("5rJj"),r=i("aDyP").LineToolPitchfork,s=window.t("Schiff Pitchfork");inherit(n,r),n.prototype.title=function(){return s},n.prototype.name=function(){return"Schiff Pitchfork"},n.createProperties=function(e){var t=new o("linetoolschiffpitchfork2",e,!1,{range:[0,8]});return n._configureProperties(t),t},n._configureProperties=function(e){r._configureProperties(e)},t.LineToolSchiffPitchfork2=n},XPit:function(e,t,i){"use strict";function n(){var e=new Map;return c.forEach(function(t,i){e.set(t,o(t))}),e}function o(e){return l[e]}var r,s,a,l,c,u;i.r(t),i.d(t,"TimePointIndexSearchMode",function(){return a}),i.d(t,"seriesPlotFunctionMap",function(){return n}),i.d(t,"barFunction",function(){return o}),i.d(t,"SeriesData",function(){return u}),r=i("Eyy1"),s=i("k9/m"),function(e){e[e.FromLeft=-1]="FromLeft",e[e.FromRight=1]="FromRight"}(a||(a={})),l={open:function(e){return e[1]},high:function(e){return e[2]},low:function(e){return e[3]},close:function(e){return e[4]},hl2:function(e){return(e[2]+e[3])/2},hlc3:function(e){return(e[2]+e[3]+e[4])/3},ohlc4:function(e){return(e[1]+e[2]+e[3]+e[4])/4}},c=["open","high","low","close","hl2","hlc3","ohlc4"],u=function(){function e(){this.m_bars=new s.PlotList(n()),this.m_nsBars=new s.PlotList(n())}return e.prototype.bars=function(){return this.m_bars},e.prototype.nsBars=function(){return this.m_nsBars},e.prototype.size=function(){return this.m_bars.size()+this.m_nsBars.size()},e.prototype.each=function(e){this.m_bars.each(e),this.m_nsBars.each(e)},e.prototype.clear=function(){this.m_bars.clear(),this.m_nsBars.clear(),this.lastProjectionPrice=void 0},e.prototype.isEmpty=function(){return this.m_bars.isEmpty()&&this.m_nsBars.isEmpty()},e.prototype.first=function(){return this.m_bars.isEmpty()?this.m_nsBars.first():this.m_bars.first()},e.prototype.last=function(){return this.m_nsBars.isEmpty()?this.m_bars.last():this.m_nsBars.last()},e.prototype.search=function(e,t){return this.nsBars().isEmpty()?this.bars().search(e,t):this.bars().isEmpty()?this.nsBars().search(e,t):Object(r.ensureNotNull)(this.nsBars().firstIndex())<=e?this.nsBars().search(e,t):this.bars().search(e,t)},e.prototype.valueAt=function(e){var t=this.search(e);return null!==t?t.value:null},e.prototype.plotValueToTimePointIndex=function(e,t,i){var n,o,r,s;if(i===a.FromRight)return n=function(i,n){var o=n[t];return void 0!==o&&null!==o&&e>=o},null!==(o=this.m_bars.findLast(n))?o.index:null!==(r=this.m_nsBars.findLast(n))?r.index:this.m_bars.firstIndex();if(i===a.FromLeft)return s=function(i,n){var o=n[t];return void 0!==o&&null!==o&&e<=o},null!==(o=this.m_bars.findFirst(s))?o.index:null!==(r=this.m_nsBars.findFirst(s))?r.index:this.m_bars.lastIndex();throw new Error("plotValueToTimePointIndex: unsupported search mode")},e}()},XUCF:function(e,t,i){"use strict";function n(e,t,i){this._source=e,this._index=t,this._bars=i||[]}function o(e,t,n){var r,a;this._constructor="LineToolGhostFeed",(r=t||o.createProperties())._source=this,n||(a=Math.round(this.calculateATR(e)),
r.averageHL.setValue(a)),s.call(this,e,r),this._segments=[],r.averageHL.listeners().subscribe(this,o.prototype.regenerate),r.variance.listeners().subscribe(this,o.prototype.regenerate),r.points||r.addProperty("points"),this._currentAverageHL=this._properties.averageHL.value(),this._currentVariance=this._properties.variance.value(),this._currentInterval=e.mainSeries().interval(),this.properties().onRestoreFactoryDefaults().subscribe(this,this._handleRestoringFactoryDefaults),i.e("lt-pane-views").then(function(e){var t=i("dMkl").GhostFeedPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var r=i("Hr11").sign,s=i("Ss5c").LineDataSource,a=i("Ocx9").DefaultProperty,l=i("hayr").propertyPages,c=window.t("Ghost Feed");n.prototype.setBars=function(e){this._bars=e||[]},n.prototype.clone=function(e){return new n(e,this._index,TradingView.clone(this._bars))},n.prototype.createBar=function(){var e,t,i,n=this._source.properties().averageHL.value(),o=this._source.properties().variance.value()/100,r=this._source._model.mainSeries().base(),s=Math.random(),a=n*(1-2*s)*o;return i=(t=a-(e=n*(1+(.5-(s=Math.random()))*o))/2)+e,{o:(t+Math.random()*e)/r,h:i/r,l:t/r,c:(t+Math.random()*e)/r}},n.prototype.generate=function(){var e,t,i,n,o,s;if(this._bars=[],t=(e=this._source.points())[this._index],i=e[this._index+1],t&&i&&t.index!==i.index)for(this._avgHL=this._source.properties().averageHL.value(),this._variance=this._source.properties().variance.value()/100,n=this._index?t.index+1:t.index,o=r(i.index-t.index),s=n;s!==i.index;s+=o)this._bars.push(this.createBar())},n.prototype.bars=function(){return this._bars},n.prototype.setSize=function(e){if(e<this._bars.length)this._bars.splice(e,this._bars.length-e);else for(;this._bars.length<e;)this._bars.push(this.createBar())},inherit(o,s),o.prototype._handleRestoringFactoryDefaults=function(){var e=Math.round(this.calculateATR());this.properties().averageHL.setValue(e)},o.prototype.destroy=function(){this.properties().onRestoreFactoryDefaults().unsubscribe(this,this._handleRestoringFactoryDefaults),s.prototype.destroy.call(this)},o.prototype.regenerate=function(){this._currentAverageHL=this._properties.averageHL.value(),this._currentVariance=this._properties.variance.value(),this._segments.forEach(function(e){e.generate()}),this.updateAllViews(),this._model.updateSource(this)},o.prototype.propertiesChanged=function(){s.prototype.propertiesChanged.call(this),this._currentAverageHL===this._properties.averageHL.value()&&this._currentVariance===this._properties.variance.value()||this.regenerate()},o.prototype.pointsCount=function(){return-1},o.prototype.title=function(){return c},o.prototype.name=function(){return"Ghost Feed"},o.prototype.segmentBars=function(e){return this._segments[e].bars()},o.prototype.segments=function(){return this._segments},o.prototype.generateBars=function(e){this._segments.length<=e&&this._segments.push(new n(this,e)),this._segments[e].generate()},o.prototype.addPoint=function(e){var t,i
;if(this._points.length>0&&this._points[this._points.length-1].index===e.index){for(this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),t=0;t<this._points.length;t++)this._createPointProperty(t);return!0}return i=s.prototype.addPoint.call(this,e),this._finished&&(this._lastPoint=null),this._points.length>1&&this.generateBars(this._points.length-2),i||this._finished},o.prototype.finish=function(){this._finished=!0,this._lastPoint=null,this.normalizePoints(),this.createServerPoints()},o.prototype.setPoint=function(e,t,i){var n,o;s.prototype.setPoint.call(this,e,t,i),e>0&&(n=this.points()[e-1],o=t.index-n.index,this._segments[e-1].setSize(Math.abs(o))),e<this.points().length-1&&(o=this.points()[e+1].index-t.index,this._segments[e].setSize(Math.abs(o)))},o.prototype.state=function(e){var t=s.prototype.state.call(this,e);return t.segments=this._segments.map(function(e){return{bars:e.bars()}}),t},o.prototype.restoreData=function(e){var t=this;e.segments&&(this._segments=e.segments.map(function(e,i){return new n(t,i,[].concat(e.bars))})),this._currentAverageHL=this._properties.averageHL.value(),this._currentVariance=this._properties.variance.value()},o.prototype.onData=function(e){if(s.prototype.onData.call(this,e),0===this.properties().points._childs.length)for(var t=0;t<this._points.length;t++)this._createPointProperty(t);this._currentInterval!==this._model.mainSeries().interval()&&(this.regenerate(),this._currentInterval=this._model.mainSeries().interval())},o.prototype.cloneData=function(e){var t=this;this._segments=e._segments.map(function(e){return e.clone(t)})},o.prototype.calculateATR=function(e){var t,i=(void 0!==e?e:this._model).mainSeries(),n=[];return i.bars().each(function(e,t){n.push(t[TradingView.HIGH_PLOT]-t[TradingView.LOW_PLOT])}),t=0===n.length?0:n.reduce(function(e,t){return e+t},0)/n.length,t*=i.base()},o.prototype.getInputsPropertyPage=function(){return l.LineToolGhostFeedInputsPropertyPage},o.prototype.getStylesPropertyPage=function(){return l.LineToolGhostFeedStylesPropertyPage},o.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("fIc+").GhostFeedDefinitionsViewModel}.bind(null,i)).catch(i.oe)},o.createProperties=function(e){var t=new a("linetoolghostfeed",e);return o._configureProperties(t),t},o._configureProperties=function(e){s._configureProperties(e)},t.LineToolGhostFeed=o},XcdR:function(e,t,i){"use strict";var n,o,r,s,a;i.d(t,"a",function(){return a}),n=i("mrSG"),o=i("uOxu"),r=i("RDU5"),s=Object(o.getLogger)("Chart.ChartUndoModel"),a=function(e){function t(t,i,n){var o=e.call(this,n,!1)||this;return o._newRightOffsetAndBarSpacing=null,o.setCustomFlag("doesnt_affect_save",!0),o._model=t,o._rightOffsetAndBarSpacing=i,o}return Object(n.__extends)(t,e),t.prototype.undo=function(){if(null===this._newRightOffsetAndBarSpacing){var e=this._model.timeScale();this._newRightOffsetAndBarSpacing={barSpacing:e.barSpacing(),rightOffset:e.rightOffset()},
e.setBarSpacing(this._rightOffsetAndBarSpacing.barSpacing),e.setRightOffset(this._rightOffsetAndBarSpacing.rightOffset)}else s.logDebug("TimeScaleChangeUndoCommand.undo: Command is already undone")},t.prototype.redo=function(){if(null!==this._newRightOffsetAndBarSpacing){var e=this._model.timeScale();e.setBarSpacing(this._newRightOffsetAndBarSpacing.barSpacing),e.setRightOffset(this._newRightOffsetAndBarSpacing.rightOffset),this._newRightOffsetAndBarSpacing=null}else s.logDebug("TimeScaleChangeUndoCommand.redo: Command is not undone")},t}(r.UndoCommand)},XlJ7:function(e,t,i){"use strict";function n(e,t,i,n){return(n?n+" ":"")+(i?i+" ":"")+e+"px "+t}function o(e){var t=r.exec(e);return null===t?null:{family:t[5],size:parseInt(t[3])*("pt"===t[4]?.75:1),bold:Boolean(t[1]),italic:Boolean(t[2])}}i.r(t),i.d(t,"makeFont",function(){return n}),i.d(t,"parseFont",function(){return o});var r=/(bold )?(italic )?(\d+)(px|pt) (.*)$/},Xyly:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolBezierQuadro";var r=t||n.createProperties();o.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("4Ptp").BezierQuadroPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=window.t("Curve");inherit(n,o),n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return a},n.prototype.name=function(){return"Curve"},n.prototype.controlPoint=function(){var e=this.pointToScreenPoint(this.points()[0])[0],t=this.pointToScreenPoint(this.points()[1])[0],i=t.subtract(e).scaled(.5),n=i.transposed().scaled(.3),o=e.add(t).scaled(.5),r=o.add(n),s=this.screenPointToPoint(r);return s},n.prototype.setLastPoint=function(e,t){o.prototype.setLastPoint.call(this,e,t),this._controlPoint=this.controlPoint()},n.prototype.addPoint=function(e,t,i){var n,r=o.prototype.addPoint.call(this,e,t,!0);return r&&(n=this.controlPoint(),this._points.push(n),delete this._controlPoint,i||(this.normalizePoints(),this.createServerPoints()),this._createPointProperty(2)),r},n.prototype.restorePoints=function(e,t,i){o.prototype.restorePoints.call(this,e,t,i),this._createPointProperty(2)},n.prototype.getStylesPropertyPage=function(){return s.LineToolBezierStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("b4fl").GeneralBezierDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new r("linetoolbezierquadro",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolBezierQuadro=n},XzZr:function(e,t,i){"use strict";function n(){}var o=i("ogJP").declareClassAsPureInterface;TradingView.WEB_SOCKET_WAS_CONNECTED=!1,n.REBIND_STUDY_STANDALONE_TO_CHILD=1,n.REBIND_STUDY_CHILD_TO_STANDALONE=2,n.prototype.defaultWatchlistSymbols=function(){},n.prototype.defaultResolutions=function(){},
n.prototype.supportedSymbolsTypes=function(){},n.prototype.supportedExchangesList=function(){},n.prototype.futuresRegex=function(){},n.prototype.quoteCreateSession=function(e){},n.prototype.quoteDeleteSession=function(e){},n.prototype.quoteSetFields=function(e,t){},n.prototype.quoteAddSymbols=function(e,t){},n.prototype.quoteRemoveSymbols=function(e,t){},n.prototype.quoteFastSymbols=function(e,t){},n.prototype.depthCreateSession=function(e,t,i){},n.prototype.depthDeleteSession=function(e){},n.prototype.depthSetSymbol=function(e,t){},n.prototype.depthClearSymbol=function(e){},n.prototype.depthSetScale=function(e,t){},n.prototype.chartCreateSession=function(e,t){},n.prototype.chartDeleteSession=function(e){},n.prototype.createSession=function(e,t){},n.prototype.removeSession=function(e){},n.prototype.connected=function(){},n.prototype.connect=function(){},n.prototype.disconnect=function(){},n.prototype.switchTimezone=function(e,t){},n.prototype.resolveSymbol=function(e,t,i,n,o){},n.prototype.createSeries=function(e,t,i,n,o,r,s){},n.prototype.removeSeries=function(e,t,i){},n.prototype.modifySeries=function(e,t,i,n,o,r){},n.prototype.requestMoreData=function(e,t,i,n){},n.prototype.requestMetadata=function(e,t,i){},n.prototype.isCanCreateStudy=function(e,t){},n.prototype.createStudy=function(e,t,i,n,o,r,s){},n.prototype.rebindStudy=function(e,t,i,n,o,r,s,a){},n.prototype.removeStudy=function(e,t,i){},n.prototype.modifyStudy=function(e,t,i,n,o){},n.prototype.createPointset=function(e,t,i,n,o,r,s){},n.prototype.modifyPointset=function(e,t,i,n,o){},n.prototype.removePointset=function(e,t,i){},n.prototype.requestMoreTickmarks=function(e,t,i,n){},n.prototype.requestFirstBarTime=function(e,t,i,n){},n.prototype._invokeHandler=function(e,t){},n.prototype._sendRequest=function(e,t){},n.prototype._onMessage=function(e){},n.prototype._convertTimescaleResponse=function(e){},n.prototype._dispathNotification=function(e){},n.prototype._invokeNotificationHandler=function(e,t,i){},n.prototype._notifySessions=function(e){},n.prototype.unpack=function(e){},n.prototype.searchSymbols=function(e,t,i,n,o,r,s,a,l,c){},n.prototype.serverTimeOffset=function(){},n.prototype.getMarks=function(e,t,i,n,o){},n.prototype.getTimescaleMarks=function(e,t,i,n,o){},o(n,"ChartApiInterface"),e.exports.HandlerInfo=function(e,t){this.handler=e,this.customId=t},e.exports.ChartApiInterface=n},Y5iK:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"MainSeriesScaleRatioProperty",function(){return r}),n=i("aIyQ"),o=i.n(n),r=function(){function e(e){this._changed=new o.a,this._model=e}return e.prototype.getStepChangeValue=function(){return.1},e.prototype.getMinValue=function(){return 1e-7},e.prototype.getMaxValue=function(){return 9999},e.prototype.value=function(){return this._model.mainSeriesScaleRatio()},e.prototype.setValue=function(e,t){(e!==this.value()||t)&&(this._model.setMainSeriesScaleRatio(e),this._onChanged())},e.prototype.state=function(){return null},e.prototype.clone=function(){return new e(this._model)},e.prototype.listeners=function(){
return this._changed},e.prototype.subscribe=function(e,t){this._changed.subscribe(e,t)},e.prototype.unsubscribe=function(e,t){this._changed.unsubscribe(e,t)},e.prototype.unsubscribeAll=function(e){this._changed.unsubscribeAll(e)},e.prototype._onChanged=function(){this._changed.fire(this)},e}()},Y7w9:function(e,t,i){"use strict";function n(e,t){return e<t}function o(e,t,i,n,o){var r,s,a;for(void 0===n&&(n=0),void 0===o&&(o=e.length),r=o-n;0<r;)i(e[a=n+(s=r>>1)],t)?(n=a+1,r-=s+1):r=s;return n}function r(e,t,i,r){return void 0===i&&(i=0),void 0===r&&(r=e.length),o(e,t,n,i,r)}function s(e,t,i,n,o){var r,s,a;for(void 0===n&&(n=0),void 0===o&&(o=e.length),r=o-n;0<r;)i(t,e[a=n+(s=r>>1)])?r=s:(n=a+1,r-=s+1);return n}function a(e,t,i,o){return void 0===i&&(i=0),void 0===o&&(o=e.length),s(e,t,n,i,o)}function l(e,t){return e.filter(function(e){return!t.includes(e)})}function c(e,t){var i=e.indexOf(t);return i<0?e.slice():[t].concat(e.slice(0,i)).concat(e.slice(i+1))}function u(e,t,i){var n=new Set(t),o=[],s=[];return e.forEach(function(e,t){n.has(e)||(o.push(e),s.push(t))}),i<e.length-1&&(i=r(s,i+1)),o.splice.apply(o,Object(d.__spreadArrays)([i,0],t)),o}function h(e,t,i){var n=new Set(t),o=[],s=[];return e.forEach(function(e,t){n.has(e)||(o.push(e),s.push(t))}),i<=e.length-1&&(i=r(s,i)),o.splice.apply(o,Object(d.__spreadArrays)([i,0],t)),o}i.r(t),i.d(t,"lowerbound",function(){return o}),i.d(t,"lowerbound_int",function(){return r}),i.d(t,"upperbound",function(){return s}),i.d(t,"upperbound_int",function(){return a}),i.d(t,"subtract",function(){return l}),i.d(t,"moveToHead",function(){return c}),i.d(t,"moveAfter",function(){return u}),i.d(t,"moveBefore",function(){return h});var d=i("mrSG")},YCFM:function(e,t,i){},"Ye2/":function(e,t,i){"use strict";var n;i.r(t),i.d(t,"LineToolBarsPatternMode",function(){return n}),function(e){e[e.Bars=0]="Bars",e[e.Line=1]="Line",e[e.OpenClose=2]="OpenClose",e[e.LineOpen=3]="LineOpen",e[e.LineHigh=4]="LineHigh",e[e.LineLow=5]="LineLow",e[e.LineHL2=6]="LineHL2"}(n||(n={}))},Yj6H:function(e,t,i){"use strict";var n,o,r,s,a,l,c,u,h,d,p;i.r(t),i.d(t,"PriceScaleBase",function(){return p}),n=i("Eyy1"),o=i("aIyQ"),r=i.n(o),s=i("Qb4w"),a=i("TTFo"),l=i("qJq3"),c=i("7ktv"),u=i("0gbU"),h=i("cKqi"),d=i("3ClC"),p=function(){function e(){this._marksCache=null,this._onMarksChanged=new r.a,this.m_dataSources=[],this._sourcesForAutoscale=null,this._sourcesToUpdateViews=null,this._hasSeries=!1,this._seriesLikeSources=[],this._priceDataSources=[]}return e.prototype.addDataSource=function(e,t){var i,n=this;(t||-1===this.m_dataSources.indexOf(e))&&(e instanceof c.PriceDataSource&&(this._priceDataSources.push(e),e instanceof u.study_Compare||e instanceof h.study_Overlay?this._seriesLikeSources.push(e):e instanceof l.Series&&(i=e.properties(),this._hasSeries||(i.childs().lockScale&&(this.setMode({lockScale:i.childs().lockScale.value()}),i.removeProperty("lockScale")),i.childs().pnfStyle.childs().lockScale&&i.childs().pnfStyle.removeProperty("lockScale")),this._seriesLikeSources.push(e),this._hasSeries=!0)),
e.properties().visible.listeners().subscribe(null,function(){return n._sourcesForAutoscale=null}),this.m_dataSources.push(e),this._mainSource=void 0,this._sourcesForAutoscale=null,this._sourcesToUpdateViews=null,this.updateFormatter(),this.initScaleProperties(),this.invalidateSourcesCache())},e.prototype.removeDataSource=function(e){var t,i,o=this.m_dataSources.indexOf(e);Object(n.assert)(-1!==o,"Source is not attached to scale"),e.properties().visible.listeners().unsubscribeAll(this),this.m_dataSources.splice(o,1),e instanceof c.PriceDataSource&&(t=this._priceDataSources.indexOf(e),Object(n.assert)(-1!==t,"Source is not found"),this._priceDataSources.splice(t,1),(e instanceof u.study_Compare||e instanceof h.study_Overlay||e instanceof l.Series)&&(i=this._seriesLikeSources.indexOf(e),Object(n.assert)(-1!==i,"Source is not found"),this._seriesLikeSources.splice(i,1),e instanceof l.Series&&(this._hasSeries=!1))),this.mainSource()||this.setMode({autoScale:!0}),this._mainSource=void 0,this._sourcesForAutoscale=null,this._sourcesToUpdateViews=null,this.updateFormatter(),this.invalidateSourcesCache()},e.prototype.currency=function(){var e,t,i,n,o;if(this.isIndexedTo100()||this.isPercentage()||0===this._seriesLikeSources.length)return null;for(e=null,t=0,i=this._priceDataSources;t<i.length;t++)if((n=i[t]).isVisible()){if(null===(o=n.currency()))return null;if(null!==e){if(o!==e)return null}else e=o}return e},e.prototype.onMarksChanged=function(){return this._onMarksChanged},e.prototype.priceRangeInPrice=function(){var e,t,i;return this.isEmpty()?null:null===(e=this.mainSource())?null:(t=Object(n.ensureNotNull)(e.firstValue()),i=this.height(),{from:this.coordinateToPrice(i-1,t),to:this.coordinateToPrice(0,t)})},e.prototype.setPriceRangeInPrice=function(e){var t,i,n,o,r,l,c;this.isPercentage()||this.isIndexedTo100()||(i=(t=this.isInverted())?this.bottomMargin():this.topMargin(),n=t?this.topMargin():this.bottomMargin(),r=(o=this.isLog())?Object(a.toLog)(e.from):e.from,r+=n*(c=(l=o?Object(a.toLog)(e.to):e.to)-r),l-=i*c,this.setMode({autoScale:!1}),this.setPriceRange(new s.PriceRange(r,l)),this._marksCache=null,this._onMarksChanged.fire())},e.prototype.hasMainSeries=function(){return this._hasSeries},e.prototype.getStudies=function(){return this.dataSources().filter(d.isStudy)},e}()},Yjuu:function(e,t,i){"use strict";function n(){a.call(this)}function o(e,t){this._constructor="LineToolFibSpeedResistanceArcs";var s=t||o.createProperties();r.call(this,e,s),e._fibSpeedResistanceArcsLabelsCache||(e._fibSpeedResistanceArcsLabelsCache=new n),i.e("lt-pane-views").then(function(e){var t=i("bcXK").FibSpeedResistanceArcsPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var r=i("Ss5c").LineDataSource,s=i("5rJj"),a=i("xUGI"),l=i("hayr").propertyPages,c=window.t("Fib Speed Resistance Arcs");inherit(n,a),n.prototype.levelsCount=function(){return o.LevelsCount},inherit(o,r),o.LevelsCount=11,o.prototype.levelsCount=function(){return o.LevelsCount},o.prototype.pointsCount=function(){return 2},
o.prototype.title=function(){return c},o.prototype.name=function(){return"Fib Speed Resistance Arcs"},o.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},o.prototype.getStylesPropertyPage=function(){return l.LineToolFibSpeedResistanceArcsStylesPropertyPage},o.createProperties=function(e){var t=new s("linetoolfibspeedresistancearcs",e,!1,{range:[1,11]});return o._configureProperties(t),t},o.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("pdv6").FibSpeedResistanceArcsDefinitionsViewModel}.bind(null,i)).catch(i.oe)},o._configureProperties=function(e){r._configureProperties(e)},t.LineToolFibSpeedResistanceArcs=o},YlKu:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"ApplyLineToolTemplateUndoCommand",function(){return r}),n=i("mrSG"),o=i("RDU5"),r=function(e){function t(t,i,n){var o=e.call(this,n)||this;return o._source=t,o._newState=i,o._oldState=t.properties().state(),o}return Object(n.__extends)(t,e),t.prototype.redo=function(){this._source.applyTemplate(this._newState)},t.prototype.undo=function(){this._source.applyTemplate(this._oldState)},t}(o.UndoCommand)},YmeR:function(e,t,i){function n(e,t,i,n,s){i?(o.call(this,e,t,!0,i,n),s?e.update({onExecute:s.bind(this)}):e.update({onExecute:this.onActionCallback.bind(this)})):r.logDebug("Missed undo model")}var o=i("2h0C").Binding,r=i("uOxu").getLogger("Chart.PropertyPage.ActionBinder");inherit(n,o),n.prototype.onActionCallback=function(e){this._undoModel.setProperty(this._property,this.value(),this._undoText)},n.prototype.value=function(){return this.control().isChecked()},n.prototype.setValue=function(e){this.control().update({checked:Boolean(e)})},t.ActionBinder=n},YuHv:function(e,t,i){"use strict";function n(e,t){var i,n;return void 0===e&&(e=[]),void 0===t&&(t=[]),i=document.createElement("div"),n=document.createElement("div"),i.appendChild(n),i.classList.add(o.container),n.classList.add(o.inner),e.forEach(function(e){i.classList.add(o[e])}),t.forEach(function(e){i.classList.add(o[e])}),i}var o;i.d(t,"a",function(){return n}),o=i("AWC/")},Z0Sh:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolGannSquare";var o=t||n.createProperties();s.call(this,e,o),i.e("lt-pane-views").then(function(e){var t=i("eg8N").GannSquarePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o,r,s=i("Ss5c").LineDataSource,a=i("5rJj"),l=i("hayr").propertyPages,c=window.t("Gann Box");inherit(n,s),n.HLevelsCount=7,n.VLevelsCount=7,n.prototype.hLevelsCount=function(){return n.HLevelsCount},n.prototype.vLevelsCount=function(){return n.VLevelsCount},n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return c},n.prototype.name=function(){return"Gann Box"},o=[4.5,9,11.25,18,22.5,36,45],r=function(){for(var e=[],t=1e10,i=o.length-1,n=1,r=0,s=0;s<t;)s=o[r]*n,e.push(Math.round(s)),e.push(Math.ceil(-s)),r===i-1&&(n*=10),r=(r+1)%i
;return e.sort(function(e,t){return e<t?-1:e>t?1:0}),e}(),n.prototype._alignPriceOnPattern=function(e,t){var i,n,r,s,a,l,c=Math.round(1e6*(e.price-t.price))/1e6;if(0===c)return t.price;for(i=o[0],n=o[o.length-1],r=1,s=Math.abs(c);s<i*r||n*r<s;)s<i*r?r*=.1:n*r<s&&(r*=10);for(a=n*r,l=o.length-2;l>=0&&!(o[l]*r<s);--l)a=o[l]*r;return e.price=t.price+(c>=0?a:-a),e},n.prototype._alignTimeOnPattern=function(e,t){var i,n=e.index-t.index;if(0===n)return 0;for(i=r.length-2;i>=0&&!(r[i]<n);--i);return i+=n>0?1:0,e.index=t.index+r[i],e},n.prototype._alignPointsFixedIncrement=function(e,t){return this._alignTimeOnPattern(e,t),this._alignPriceOnPattern(e,t),e},n.prototype._preparePoint=function(e,t){return t&&t.shift()&&0!==this._points.length&&this._alignPointsFixedIncrement(e,this._points[0]),s.prototype._preparePoint.call(this,e,t)},n.prototype.setPoint=function(e,t,i){if(i&&i.shift()){var n=0===e?this._points[1]:this._points[0];this._alignPointsFixedIncrement(t,n)}s.prototype.setPoint.call(this,e,t,i)},n.prototype.getStylesPropertyPage=function(){return l.LineToolGannSquareStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("2liL").GannSquareDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new a("linetoolgannsquare",e,!1,{range:[1,7],prefixes:["h","v"],names:["coeff","color","visible"]});return n._configureProperties(t),t},n._configureProperties=function(e){s._configureProperties(e)},t.LineToolGannSquare=n},Z8aO:function(e,t,i){"use strict";var n,o,r,s,a;i.r(t),i.d(t,"SeriesPriceLinePaneView",function(){return a}),n=i("mrSG"),o=i("aO4+"),r=i("k4w6"),s=i("8Uy/"),a=function(e){function t(t){var i=e.call(this,t)||this;return i._lineRendererData.linestyle=s.LINESTYLE_DOTTED,i}return Object(n.__extends)(t,e),t.prototype._updateImpl=function(){if(this._lineRendererData.visible=!1,this._series.properties().showPriceLine.value()&&12!==this._series.properties().style.value()){var e=this._series.lastValueData(void 0,!0);e.noData||(this._lineRendererData.visible=!0,this._lineRendererData.points=[new o.Point(0,e.coordinate)],this._lineRendererData.color=this._series.priceLineColor(e.color),this._lineRendererData.width=this._model.timeScale().width(),this._lineRendererData.height=this._series.priceScale().height(),this._lineRendererData.linewidth=this._series.properties().priceLineWidth.value())}},t}(r.a)},ZAbA:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"SeriesDataEvents",function(){return r}),n=i("aIyQ"),o=i.n(n),r=function(){function e(){this._completed=new o.a,this._error=new o.a,this._symbolError=new o.a,this._symbolResolved=new o.a,this._seriesError=new o.a,this._symbolNotPermitted=new o.a,this._symbolGroupNotPermitted=new o.a,this._extendedHoursNotPermitted=new o.a,this._chartTypeNotPermitted=new o.a,this._intradaySpreadNotPermitted=new o.a,this._intradayExchangeNotPermitted=new o.a,this._customIntervalNotPermitted=new o.a,
this._secondsIntervalNotPermitted=new o.a,this._tickMarksRangeChanged=new o.a,this._barReceived=new o.a,this._messageReceived=new o.a}return e.prototype.completed=function(){return this._completed},e.prototype.error=function(){return this._error},e.prototype.symbolError=function(){return this._symbolError},e.prototype.symbolResolved=function(){return this._symbolResolved},e.prototype.seriesError=function(){return this._seriesError},e.prototype.symbolNotPermitted=function(){return this._symbolNotPermitted},e.prototype.symbolGroupNotPermitted=function(){return this._symbolGroupNotPermitted},e.prototype.extendedHoursNotPermitted=function(){return this._extendedHoursNotPermitted},e.prototype.chartTypeNotPermitted=function(){return this._chartTypeNotPermitted},e.prototype.intradaySpreadNotPermitted=function(){return this._intradaySpreadNotPermitted},e.prototype.intradayExchangeNotPermitted=function(){return this._intradayExchangeNotPermitted},e.prototype.customIntervalNotPermitted=function(){return this._customIntervalNotPermitted},e.prototype.secondsIntervalNotPermitted=function(){return this._secondsIntervalNotPermitted},e.prototype.tickMarksRangeChanged=function(){return this._tickMarksRangeChanged},e.prototype.barReceived=function(){return this._barReceived},e.prototype.messageReceived=function(){return this._messageReceived},e.prototype.fireCompleted=function(){this._completed.fire()},e.prototype.fireError=function(){this._error.fire()},e.prototype.fireSymbolError=function(e){this._symbolError.fire(e),this.fireError()},e.prototype.fireSymbolResolved=function(e){this._symbolResolved.fire(e)},e.prototype.fireSeriesError=function(e){this._seriesError.fire(e),this.fireError()},e.prototype.fireSymbolNotPermitted=function(e){this._symbolNotPermitted.fire(e),this.fireError()},e.prototype.fireSymbolGroupNotPermitted=function(e){this._symbolGroupNotPermitted.fire(e),this.fireError()},e.prototype.fireExtendedHoursNotPermitted=function(){this._extendedHoursNotPermitted.fire(),this.fireError()},e.prototype.fireChartTypeNotPermitted=function(e){this._chartTypeNotPermitted.fire(e),this.fireError()},e.prototype.fireIntradaySpreadNotPermitted=function(){this._intradaySpreadNotPermitted.fire(),this.fireError()},e.prototype.fireIntradayExchangeNotPermitted=function(){this._intradayExchangeNotPermitted.fire(),this.fireError()},e.prototype.fireCustomIntervalNotPermitted=function(){this._customIntervalNotPermitted.fire(),this.fireError()},e.prototype.fireSecondsIntervalNotPermitted=function(){this._secondsIntervalNotPermitted.fire(),this.fireError()},e.prototype.fireTickMarksRangeChanged=function(e){this._tickMarksRangeChanged.fire(e)},e.prototype.fireBarReceived=function(e){this._barReceived.fire(e)},e.prototype.fireMessageReceived=function(e){this._messageReceived.fire(e)},e}()},ZJ1Q:function(e,t,i){"use strict";var n,o,r,s,a,l,c,u,h;i.r(t),n=i("qFKp"),o=i("Tmoa"),r=i("8Uy/"),s=i("jFln"),a=i("VdBB"),l=function(){function e(e){this._data=e}return e.prototype.draw=function(e){
var t,i,n,o,a,l,c=this._data.vertLinesVisible,u=this._data.horzLinesVisible;(c||u)&&(e.lineStyle=this._data.lineStyle,e.lineWidth=this._data.lineWidth,e.strokeStyle=this._data.color,e.fillStyle=this._data.color,t=this._data.lineStyle===r.LINESTYLE_DASHED||this._data.lineStyle===r.LINESTYLE_DOTTED||this._data.lineStyle===r.LINESTYLE_SPARSE_DOTTED,i=this._data.lineWidth%2==0?.5:0,n=this._data.x+1+i,o=this._data.y+i,a=this._data.w,l=this._data.h,c&&n>=0&&(t?Object(s.drawDashedLineVertical)(e,n,0,l):Object(s.drawSolidLine)(e,n,0,n,l)),u&&o>=0&&(t?Object(s.drawDashedLineHorizontal)(e,0,o,a):Object(s.drawSolidLine)(e,0,o,a,o)),this._data.drawCenter&&(e.beginPath(),e.arc(n,o,3,0,2*Math.PI,!0),e.fillStyle=this._data.color,e.fill()))},e.prototype.hitTest=function(e){return void 0===this._data.mouseClickHandler?null:new a.HitTestResult(a.HitTestResult.CUSTOM,{mouseClickHandler:this._data.mouseClickHandler})},e}(),c=i("mMWL"),u=i("CW80"),i.d(t,"CrosshairPaneView",function(){return h}),h=function(){function e(e,t,i){this._rendererData={},this._renderer=new l(this._rendererData),this._source=e,this._pane=t,this._horzVisible=i}return e.prototype.update=function(){},e.prototype.renderer=function(e,t,i){var s,a,l,h,d,p,_=this._source.visible&&this._source.areLinesVisible,f=Object(c.lockTimeAxis)().value(),m=this._rendererData;return _&&null!==this._pane?(m.horzLinesVisible=_&&this._horzVisible,m.vertLinesVisible=_||f,s=this._source.model(),a=this._source.properties(),l=this._source.selectBarMode().value()&&this._source.isOnHoveredChartWidget(),d=(h=n.CheckMobile.any()&&Object(u.isLineToolName)(s.currentTool())&&!l)?s.isDark()?"#1E88E5":"#2196F3":a.childs().color.value(),p=a.childs().transparency.value(),!h&&p>0&&(d=Object(o.generateColor)(d,p)),m.color=d,m.lineWidth=a.childs().width.value(),m.lineStyle=a.childs().style.value(),m.drawCenter=h&&this._pane===this._source.pane,m.w=this._pane.width(),m.h=this._pane.height(),m.x=void 0!==this._source.lockedX&&isFinite(this._source.lockedX)&&this._source.lockedX||this._source.x,m.y=this._source.y,l&&(m.x=Math.max(0,this._source.x-1),m.vertLinesVisible=!0,m.lineStyle=r.LINESTYLE_SOLID,m.lineWidth=2,m.color="#ff0000"),this._renderer):null},e}()},ZJKN:function(e,t,i){"use strict";var n,o;i.r(t),i.d(t,"BarsRange",function(){return o}),n=i("Eyy1"),o=function(){function e(e,t){Object(n.assert)(e<=t,"The last bar in the bars range should be greater than or equal to the first bar"),this._firstBar=e,this._lastBar=t}return e.prototype.firstBar=function(){return this._firstBar},e.prototype.lastBar=function(){return this._lastBar},e.prototype.count=function(){return this._lastBar-this._firstBar+1},e.prototype.contains=function(e){return this._firstBar<=e&&e<=this._lastBar},e.prototype.equals=function(e){return this._firstBar===e.firstBar()&&this._lastBar===e.lastBar()},e.compare=function(e,t){return null===e||null===t?e===t:e.equals(t)},e}()},ZUZx:function(e,t,i){"use strict";function n(){!0}var o,r;i.r(t),i.d(t,"enableReloadPagePopup",function(){return n}),i("YFKU"),o=i("qFKp"),
Object(o.isMac)()&&o.isSafari&&!o.CheckMobile.iOS()&&!Object(o.haveEverReceivedTouchEvent)()&&(r=function(){Object(o.markAsReceivedTouch)(),document.removeEventListener("touchstart",r)},document.addEventListener("touchstart",r,!1))},ZZnO:function(e,t,i){"use strict";function n(){return r.getValue(l,Object(a.defaultDateFormat)())}function o(){c.setValue(Object(a.defaultDateFormat)()),r.remove(l)}var r,s,a,l,c;i.r(t),i.d(t,"dateFormatProperty",function(){return c}),i.d(t,"removeSettingsValue",function(){return o}),r=i("Vdly"),s=i("m/cY"),a=i("e1ZQ"),l="date_format",c=Object(s.a)(n()),r.onSync.subscribe(null,function(){return c.setValue(n())}),c.listeners().subscribe(null,function(){return r.setValue(l,c.value())})},ZjKI:function(e,t,i){"use strict";i.r(t),i.d(t,"CLOSE_POPUPS_AND_DIALOGS_COMMAND",function(){return n});var n="CLOSE_POPUPS_AND_DIALOGS_COMMAND"},"Zo2/":function(e,t,i){"use strict";(function(t,n){function o(e){var i,o,r,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S,b;ge.call(this,e),this._options.timeScaleWidget&&(this._options.timeScaleWidget.pressedMouseMoveScale=this._options.handleScale.axisPressedMouseMove),i=this,this._guid=re(),this._startSpinner(this._options.container.value()),o=this._options.content,r=this._options.readOnly,this._backgroundBasedTheme=new t("light"),this._removeMaximizeHotkey=null,i._hotkeys=P.createGroup({desc:"Chart actions",isDisabled:function(){return!i._isActive}}),s=this._options.containsData,a=this._options.onWidget,(l=this._options.onCmeWidget)&&he.logWarn("[ChartWidget] 'onCmeWidget' option is depricated"),c=this._options.widgetCustomer,u=this._options.timezone,h=this._options.hideSymbolSearch,d=this._options.defSymbol,p=V.isValid(this._options.defInterval)?this._options.defInterval:void 0,_=parseInt(this._options.defStyle),f=F.isValidStyle(_)?_:void 0,m=this._options.defExtendedHours,y=this._options.defTimeframe,this._chartWidgetCollection=this._options.chartWidgetCollection||null,this._content=o,this._initialLoading=this._options.initialLoading,this._readOnly=r,this._containsData=s,this._showChartEvents=!s&&this._options.chartEventsEnabled,this._defSymbol=d,this._defInterval=p,this._defTimeframe=y,this._defStyle=f,this._onWidget=!!a,this._onWidget&&(l?this._widgetCustomer="cme":c&&(this._widgetCustomer=c)),this._hideSymbolSearch=h,this._paneWidgets=[],this._maximizedPaneWidget=null,this._timeAxisSeparator=null,this._paneSeparators=[],this._timeAxisWidget=null,this._frameTime=30,this._model=null,this._metaInfo={},this._drawRafId=0,this._lhsAxesWidth=0,this._rhsAxesWidth=0,(g=this._contentSeriesProperties())&&(d=g.symbol,p=g.interval),void 0===this._options.useUserChartPreferences&&(this._options.useUserChartPreferences=!0),this._properties=new J("chartproperties",void 0,void 0,this._options.useUserChartPreferences),v="chartproperties.mainSeriesProperties",S=this._options.useUserChartPreferences?ue.defaults(v):ue.factoryDefaults(v),this._properties.mainSeriesProperties.merge(S),p=p||S.interval||"D",F.isValidStyle(f)||(f=F.isValidStyle(S.style)?S.style:j(V.isRange(p))),
this._properties.mainSeriesProperties.merge({visible:!0,symbol:d||DEFAULT_SYMBOL,shortName:"",timeframe:"",onWidget:this._onWidget,interval:p,style:f,extendedHours:m,lineStyle:{styleType:ue.factoryDefaults("chartproperties.mainSeriesProperties.lineStyle.styleType")}}),this._containsData&&this._properties.mainSeriesProperties.merge({showCountdown:!1}),u&&ee(u)&&this._properties.timezone.setValue(u),this._tagsChanged=new n,this._modelCreated=new n,this._disconnected=new n,this._reconnectBailout=new n,this._connected=new n,this._redrawPanes=new n,this._onScroll=new n,this.chartWidgetInitialized=new n,this._chartSession=new te(ChartApiInstance),this._metaInfoRepository=new de(this._chartSession),this.lhsPriceAxisWidthChanged=new n,this.rhsPriceAxisWidthChanged=new n,this._timingsMeter=null,this._isActive=this._options.isActive,this._options.container.subscribe(function(e){i._setElement($(e))},{callWithLast:!0}),b=function(){i.resize()},this._options.width.subscribe(b),this._options.height.subscribe(b),this._options.visible.subscribe(this._updateTimingsMeterState.bind(this)),this._properties.paneProperties.background.listeners().subscribe(this,this._updateThemedColor),this._aboutToBeDestroyed=new n,this._actions=null,this._definitionsViewModel=null}var r,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P,C,T,x,I,L,M,A,k,E,O,D,V,B,R,N,F,W,j,U,z,H,Y,G,q,K,Z,J,X,Q,ee,te,ie,ne,oe,re,se,ae,le,ce,ue,he,de,pe,_e,fe,me,ye,ge,ve,Se,be,we,Pe,Ce,Te;i("YCFM"),i("YFKU"),r=i("Eyy1").assert,s=i("Y7w9").moveToHead,a=i("mkn5").PaneWidget,l=i("sw9I"),c=i("mNEU"),u=i("1IXQ").PriceAxisWidget,h=i("uPb3").TimeAxisWidget,d=i("fTGZ").BarsMarksContainer,p=i("qJq3").Series,_=i("Kxc7"),f=i("+GxX").isFeatureEnabled,m=i("YmeR").ActionBinder,y=i("mKT+").resolveAndShowEditObjectDialog,g=i("Vdly").setValue,v=i("QloM").TabNames,S=i("cdbK").showGoToDateDialog,b=i("efOF").CustomEvent,w=i("/3z9"),P=i("lxNp"),C=i("7nsU").showConfirmInputsDialog,T=i("GVHu").Study,x=i("8sOK").StudyStub,I=i("3ClC").isStudy,L=i("Ss5c").LineDataSource,M=i("CW80").isLineToolName,A=i("CW80").isLineTool,k=i("7KDR"),E=k.Action,O=k.Separator,i("L/Ed").ToolboxType,D=i("mMWL"),V=i("LxhU").Interval,B=i("pPtI"),R=B.setLastUsedResolution,N=B.getDefaultResolution,F=i("n5al"),W=F.isRangeStyle,j=F.getDefaultStyle,U=i("pvsv").showSymbolInfoDialog,z=i("i1o5").InvalidateMask,H=i("i1o5").InvalidationLevel,Y=i("nqXy").MouseWheelHelper,G=i("PT1i").linking,q=i("mYjs").showChangeIntervalDialog,K=i("u5Q5").showDialog,Z=i("u5Q5").activateKeyPressHandler,J=i("Ocx9").DefaultProperty,X=i("+6ja"),Q=X.availableTimezones,ee=X.timezoneIsAvailable,te=i("0F0w").ChartSession,ie=i("0YCj"),ne=i("c2JX").Spinner,oe=i("PC8g").trackEvent,re=i("0waE").guid,se=i("Tmoa"),ae=i("ikwP").Size,le=i("oNU6").MarketStatusIndicator,ce=i("Wc1E").DataModeIndicator,ue=i("wZIs"),he=i("uOxu").getLogger("ChartWidget",{color:"#606"}),de=i("U0+/").StudyMetaInfoRepository,pe=i("VNzU").isMultipleLayout,_e=i("b1GK").addPerfMark,fe=i("KnF9").EnvironmentState,me=i("FQhm"),ye=i("zDbI").CHART_FONT_FAMILY,ge=i("wjVR").ChartWidgetBase,
ve=i("qFKp").CheckMobile.any(),Se=window.t("On The Left"),be=window.t("On The Right"),we=window.t("Move Scale To Left"),Pe=window.t("Move Scale To Right"),Ce=.5,Te=_.enabled("chart_content_overrides_by_defaults"),inherit(o,ge),o.prototype.isInitialized=function(){return Boolean(this._inited)},o.prototype._getChartPropertyDefinitionsViewModel=function(){if(null===this._definitionsViewModel){var e=this;return new Promise(function(t,n){Promise.all([i.e(13),i.e(47),i.e("general-property-page")]).then(function(o){if(e._isDestroyed)n("Chart widget already destroyed");else{var r=i("5lPo").ChartPropertyDefinitionsViewModel;e.withModel(e,function(){null===e._definitionsViewModel&&(e._definitionsViewModel=new r(e.model(),e.properties(),e._options)),t(e._definitionsViewModel)})}}.bind(null,i)).catch(i.oe)})}return Promise.resolve(this._definitionsViewModel)},o.prototype._initMaximizeHotkey=function(e){function t(e){e.defaultPrevented||w.modifiersFromEvent(e)===w.Modifiers.Alt&&e.stopPropagation()}function i(e){e.defaultPrevented||w.modifiersFromEvent(e)===w.Modifiers.Alt&&(e.preventDefault(),e.stopPropagation(),n.toggleFullscreen())}var n=this;return e.addEventListener("mousedown",t,!0),e.addEventListener("click",i,!0),function(){e.removeEventListener("mousedown",t,!0),e.removeEventListener("click",i,!0)}},o.prototype.toggleFullscreen=function(){var e=this.getResizerDetacher();e.fullscreenable.value()&&(e.fullscreen.value()?e.exitFullscreen():e.requestFullscreen())},o.prototype.backgroundBasedTheme=function(){return this._backgroundBasedTheme.readonly()},o.prototype._updateThemedColor=function(){var e,t=this._properties.paneProperties.background.value(),i=se.getLuminance(t),n=i<Ce;for(this._jqMainDiv.toggleClass("chart-widget--themed-dark",n),this._jqMainDiv.toggleClass("chart-widget--themed-light",!n),this._backgroundBasedTheme.setValue(n?"dark":"light"),this._model.model().isPropertyDefault("chartProperties.paneProperties.background",t,this._backgroundBasedTheme.value())&&(t=null),e=0;e<this._paneWidgets.length;e++)this._paneWidgets[e].updateThemedColors(t)},o.prototype._isLineToolModeExceptBrush=function(){var e=D.tool.value();return M(e)&&"LineToolBrush"!==e&&!this.selectBarMode().value()},o.prototype.updateCrossHairPositionIfNeeded=function(){var e,t,i,n,o;this._model&&(e=D.tool.value(),this._model.model().setCurrentTool(e),TradingView.isMobile.any()&&(t=this._maximizedPaneWidget||this._paneWidgets[0],(this._isLineToolModeExceptBrush()||ve&&this.selectBarMode().value())&&t.hasState()&&(i=t.state(),n=.5*this._model.model().timeScale().width(),o=.5*i.defaultPriceScale().height(),this._model.model().setAndSaveCurrentPosition(n,o,i))),this._model&&TradingView.isMobile.any()&&this._model.model().crossHairSource().updateAllViews())},o.prototype.exitTrackingMode=function(){ve&&(this._paneWidgets.forEach(function(e){e.exitTrackingMode()}),this._model.model().clearCurrentPosition())},o.prototype.onToolChanged=function(){this.selectBarMode().value()&&this.toggleSelectBarMode(),this.exitTrackingMode()},
o.prototype.trackingModePaneWidget=function(){if(!ve)return null;for(var e=0;e<this._paneWidgets.length;++e)if(this._paneWidgets[e].trackingModeEnabled())return this._paneWidgets[e];return null},o.prototype._setElement=function(e){this._jqMainDiv&&(this._jqMainDiv.remove(),this._jqParent.empty()),this._controlBarNavigation&&(this._controlBarNavigation.destroy(),this._controlBarNavigation=null),null!==this._removeMaximizeHotkey&&this._removeMaximizeHotkey(),this._removeMaximizeHotkey=this._initMaximizeHotkey(e[0]);var t=e.prop("ownerDocument");this._jqParent=$(t.createElement("div")).addClass("chart-container-border").prependTo(e),this._jqMainDiv=$('<div class="chart-widget"/>',t),this._elTooltipDiv=t.createElement("div"),this._elTooltipDiv.className="tooltip-wrapper",this._jqMainDiv.append(this._elTooltipDiv),this._elMainTable=t.createElement("table"),this._elMainTable.className="chart-markup-table",this._elMainTable.setAttribute("cellpading","0"),this._elMainTable.setAttribute("cellspacing","0"),this._jqMainDiv.append(this._elMainTable),(this._options.controlBarEnabled||_.enabled("control_bar"))&&Promise.all([i.e(61),i.e("chart-widget-gui")]).then(function(e){if(!this._isDestroyed){this._controlBarNavigation&&this._controlBarNavigation.destroy();var t=i("TGRH").ControlBarNavigation;this._controlBarNavigation=new t(this,this._jqMainDiv[0],this._options.controlBar),this._model&&this._adjustSize()}}.bind(this).bind(null,i)).catch(i.oe),this._containsData||this.createIndicatorImage(),(this._options.handleScale.mouseWheel||this._options.handleScroll.mouseWheel)&&(this._mouseWheelHelper=new Y,this._onWheelBound=this._onMousewheel.bind(this),this._jqMainDiv[0].addEventListener("wheel",this._onWheelBound,{passive:!1})),this.resize(),this._justActivated=!1,this.withModel(this,function(){this._jqParent.append(this._jqMainDiv),this._jqMainDiv.on("mousedown",this._beginRequestActive.bind(this)),this._jqMainDiv.on("mouseup",this._endRequestActive.bind(this)),this._jqMainDiv.on("touchstart",this._beginRequestActive.bind(this)),this._jqMainDiv.on("touchmove",this._endRequestActive.bind(this)),this._jqMainDiv.on("touchend",this._endRequestActive.bind(this)),this._jqParent.on("click",this._requestActive.bind(this))}),this._inited&&(null!==this._timeAxisWidget&&(this._timeAxisWidget.destroy(),this._timeAxisWidget=null),this._paneWidgets.length=0,this._paneSeparators.length=0,this._update(z.full()))},o.prototype._beginRequestActive=function(){var e=!1;this._chartWidgetCollection&&(e=this._chartWidgetCollection.activeChartWidget.value()!==this,this._chartWidgetCollection.activeChartWidget.setValue(this)),e&&(TradingView.isMobile.any()&&this._isLineToolModeExceptBrush()&&this.updateCrossHairPositionIfNeeded(),this._justActivated=!0)},o.prototype._endRequestActive=function(){var e=this;this._justActivated&&setTimeout(function(){e._justActivated=!1},0)},o.prototype._requestActive=function(){this._beginRequestActive(),this._endRequestActive()},o.prototype.justActivated=function(){return this._justActivated},
o.prototype._onMousewheel=function(e){var t,i,n,o,r,s,a;if(this.model().model().zoomEnabled()&&(TradingView.onWidget()||!parent||parent===window||!parent.IS_DEMO_PAGE)&&this.model()&&!this.noScroll&&!this.model().timeScale().isEmpty()&&(i=(t=this._mouseWheelHelper.processWheel(e)).deltaX/100,n=-t.deltaY/100,0!==i&&this._options.handleScroll.mouseWheel||0!==n&&this._options.handleScale.mouseWheel)){switch(e.cancelable&&e.preventDefault(),e.deltaMode){case e.DOM_DELTA_PAGE:i*=120,n*=120;break;case e.DOM_DELTA_LINE:i*=32,n*=32}if(0!==n&&this._options.handleScale.mouseWheel){if(o=Math.sign(n)*Math.min(1,Math.abs(n)),r=this._jqMainDiv[0].getBoundingClientRect(),s=e.clientX-this._lhsAxesWidth-r.left,!Number.isFinite(s)||!Number.isFinite(o))return void he.logWarn("Incorrect mouse wheel processing: scrollPosition: "+s+", zoomScale: "+o);a=new fe(e).control(),this.model().model().zoomTime(s,o,!!a||void 0)}0!==i&&this._options.handleScroll.mouseWheel&&this.model().scrollChart(-80*i)}},o.prototype.setTimezone=function(e){e&&ee(e)?this._properties.timezone.setValue(e):console.warn("Incorrect timezone: "+JSON.stringify(e))},o.prototype.getTimezone=function(){return this._properties.timezone.value()},o.prototype.refreshMarks=function(){this.model().barsMarksSources().forEach(function(e){e.refreshData()})},o.prototype.clearMarks=function(){this.model().barsMarksSources().forEach(function(e){e.clearMarks()})},o.prototype.metaInfoRepository=function(){return this._metaInfoRepository},o.prototype._init=function(){var e,t,i=this;this.model()&&this.model().mainSeries().clearData(),this.initColors(),this._makeDefaultGui(),e=function(){i._checkObsoleteTimezone(),i._chartSession&&i._chartSession.connected()&&this._model.restart(),this._content&&(this.initColors(),this._updateGui(),this.update());var e=i._model.mainSeries();e.marketStatus.subscribe(function(t){i.indicatorImage&&i._updateDataAndMarketStatus(t,e.status())},{callWithLast:!0}),this._resizeHandler=function(){this._adjustSize(),this._model&&this._model.mainSeries().requestMoreData(),this.paint(),this.checkCompactMode(),this.resizeIndicator()}.bind(this),this._resizeHandler(),this._jqParent.append(this._jqMainDiv),this._spinner&&(this._spinner.stop(),delete this._spinner),f("chrome_canvas_fix")&&navigator.userAgent.match(/windows.+chrome/i)&&$(window).on("visibilitychange:chart_"+this._guid,function(e,t){if(t){for(var n=0;n<i._paneWidgets.length;n++)i._paneWidgets[n].hardResetCanvas();i._timeaxiswidget&&i._timeaxiswidget.hardResetCanvas(),i.paint(z.light())}}),$(window).on("keydown:chart_"+this._guid,function(e){27===e.which&&e.preventDefault()}),this._initBarsMarksSources(),this._activateSymbolSearchHotkeys(),this.model().timeScale().onScroll().subscribe(this,function(){this._onScroll.fire()}),this._inited=!0}.bind(this),void 0===(t=this._makeDefaultModel())?e():t.then(e)},o.prototype._activateSymbolSearchHotkeys=function(){this.readOnly()||this._hideSymbolSearch||Z()},o.prototype._checkObsoleteTimezone=function(){var e=this._properties.timezone.value()
;ee(e)||this._properties.timezone.setValue({UTC:"Etc/UTC",EST:"America/New_York",CST:"America/Chicago",PST:"America/Los_Angeles"}[e]||"exchange")},o.prototype._initBarsMarksSources=function(){var e=this;this.withModel(this,function(){this.model().barsMarksSources().forEach(function(t){t.onNeedRepaint.subscribe(e,function(){e.model().model().lightUpdate()})})})},o.prototype.initColors=function(){this._properties.paneProperties.background.listeners().subscribe(this,o.prototype.setBackgroundColor),this._properties.paneProperties.vertGridProperties.color.listeners().subscribe(this,o.prototype.redrawPanes),this._properties.paneProperties.horzGridProperties.color.listeners().subscribe(this,o.prototype.redrawPanes),this._properties.scalesProperties.lineColor.listeners().subscribe(this,o.prototype.setScaleLineColor),this._properties.scalesProperties.textColor.listeners().subscribe(this,o.prototype.setScaleTextColor)},o.prototype.paneWidgets=function(){return this._paneWidgets},o.prototype.paneByCanvas=function(e){for(var t=0;t<this._paneWidgets.length;t++)if(this._paneWidgets[t].hasCanvas(e))return this._paneWidgets[t];return null},o.prototype.paneByState=function(e){for(var t=0;t<this._paneWidgets.length;t++)if(this._paneWidgets[t].state()===e)return this._paneWidgets[t];return null},o.prototype.timeAxisByCanvas=function(e){return e===this._timeAxisWidget.canvas||e===this._timeAxisWidget.top_canvas?this._timeAxisWidget:null},o.prototype.properties=function(){return this._properties},o.prototype.emulateCriticalError=function(){this._chartSession.removeSeries("-1",null)},o.prototype.readOnly=function(){return this._readOnly},o.prototype.onDisconnected=function(){return this._disconnected},o.prototype.onReconnectBailout=function(){return this._reconnectBailout},o.prototype.onConnected=function(){return this._connected},o.prototype.onRedrawPanes=function(){return this._redrawPanes},o.prototype.onScroll=function(){return this._onScroll},o.prototype.modelCreated=function(){return this._modelCreated},o.prototype.setResolution=function(e){var t,i;this._model?(t=this._model.mainSeries().properties(),i=window.t("Change Resolution"),this._model.setResolutionProperty(t.interval,e,this,i)):this._properties.mainSeriesProperties.merge({interval:e})},o.prototype.getResolution=function(){return this._model?this._model.mainSeries().properties().interval.value():this._properties.mainSeriesProperties.interval.value()},o.prototype.addOverlayStudy=function(e,t){var i=this.model();return this._options.isSymbolAvailable(e).then(function(n){var o,r;return n?(o=i.createStudyInserter({type:"java",studyId:"Overlay@tv-basicstudies"}),_.enabled("use_overrides_for_overlay")&&(r=ue.factoryDefaults("study_Overlay@tv-basicstudies.style"),o.setPropertiesState({style:r})),o.setForceOverlay(t),o.insert(function(){return Promise.resolve({symbol:e})})):null})},o.prototype.addCompareStudy=function(e){var t=this.model();return this._options.isSymbolAvailable(e).then(function(i){return i?t.createStudyInserter({type:"java",studyId:"Compare@tv-basicstudies"
}).insert(function(){return Promise.resolve({symbol:e})}):null})},o.prototype.updateActions=function(){var e,t,i,n,o,r,s=this.actions(),a=this._model.dataSources(),l=!1,c=!1;for(e=0,t=a.length;e<t;e++)i=a[e],TradingView.isInherited(i.constructor,L)&&i.isUserDeletable()&&(l=!0),TradingView.isInherited(i.constructor,T)&&i.removeByRemoveAllStudies()&&(c=!0),TradingView.isInherited(i.constructor,x)&&(c=!0);this._readOnly||(s.paneRemoveAllStudies&&s.paneRemoveAllStudies.update({disabled:!c}),s.paneRemoveAllDrawingTools&&s.paneRemoveAllDrawingTools.update({disabled:!l}),s.paneRemoveAllStudiesDrawingTools&&s.paneRemoveAllStudiesDrawingTools.update({disabled:!c&&!l})),n=this,o=[],r=function(e){return e.id===n.model().model().properties().timezone.value()},Q.forEach(function(e){if(!e.separator){var t=new E({label:e.title,checkable:!0,checked:r(e),statName:"SetTimeZone",onExecute:function(){n.model().setProperty(n.model().model().properties().timezone,e.id,"Changed Time Zone")}});o.push(t)}},this),s.applyTimeZone.update({subItems:o}),s.addToWatchlist&&s.addToWatchlist.update({label:window.t("Add to Watchlist {0}").format(this.getSymbol(!0))}),s.addToTextNotes&&s.addToTextNotes.update({label:window.t("Add Text Note for {0}").format(this.getSymbol(!0))})},o.prototype.applyTheme=function(e){var t=this;Promise.resolve().then(function(n){var o=i("EsvI");e=e||o.getCurrentTheme().name,o.loadTheme(e,!0,!0,t._chartWidgetCollection)}.bind(null,i)).catch(i.oe)},o.prototype.actions=function(){return null===this._actions&&this._setActions(),this._actions},o.prototype._setActions=function(){var e,t,n,o,r,s,a,l,c,u,h,d,p,f,y,b,C,T,x,I,L,M,A,k,V,B,N,F,W,j,H,Y,Z,J,X,Q,$,ee,te,ie,ne,re,se,ae,le,ce,ue,he,de,pe,_e,fe,me,ye,ge,ve,Ce,Te,xe,Ie=this,Le=[];if(!this._readOnly){for(Le=[new E({label:window.t("Eraser"),payload:"eraser",statName:"Eraser"}),new O,new E({label:window.t("Trend Line"),payload:"LineToolTrendLine",statName:"LineToolTrendLine"}),new E({label:window.t("Horizontal Line"),payload:"LineToolHorzLine",statName:"LineToolHorzLine"}),new E({label:window.t("Vertical Line"),payload:"LineToolVertLine",statName:"LineToolVertLine"}),new E({label:window.t("Arrow"),payload:"LineToolArrow",statName:"LineToolArrow"}),new E({label:window.t("Ray"),payload:"LineToolRay",statName:"LineToolRay"}),new E({label:window.t("Extended"),payload:"LineToolExtended",statName:"LineToolExtended"}),new E({label:window.t("Parallel Channel"),payload:"LineToolParallelChannel",statName:"LineToolParallelChannel"}),new O,new E({label:window.t("Pitchfork"),payload:"LineToolPitchfork",statName:"LineToolPitchfork"}),new E({label:window.t("Schiff Pitchfork"),payload:"LineToolSchiffPitchfork",statName:"LineToolSchiffPitchfork"}),new E({label:window.t("Pitchfan"),payload:"LineToolPitchfan",statName:"LineToolPitchfan"}),new E({label:window.t("Gann Square"),payload:"LineToolGannSquare",statName:"LineToolGannSquare"}),new E({label:window.t("Gann Fan"),payload:"LineToolGannFan",statName:"LineToolGannFan"}),new E({label:window.t("Fib Retracement"),payload:"LineToolFibRetracement",
statName:"LineToolFibRetracement"}),new E({label:window.t("Trend-Based Fib Extension"),payload:"LineToolTrendBasedFibExtension",statName:"LineToolTrendBasedFibExtension"}),new E({label:window.t("Fib Speed Resistance Fan"),payload:"LineToolFibSpeedResistanceFan",statName:"LineToolFibSpeedResistanceFan"}),new E({label:window.t("Fib Time Zone"),payload:"LineToolFibTimeZone",statName:"LineToolFibTimeZone"}),new E({label:window.t("Circle Lines"),payload:"LineToolCircleLines",statName:"LineToolCircleLines"}),new E({label:window.t("Fib Circles"),payload:"LineToolFibCircles",statName:"LineToolFibCircles"}),new E({label:window.t("Fib Speed Resistance Arcs"),payload:"LineToolFibSpeedResistanceArcs",statName:"LineToolFibSpeedResistanceArcs"}),new O,new E({label:window.t("Rectangle"),payload:"LineToolRectangle",statName:"LineToolRectangle"}),new E({label:window.t("Ellipse"),payload:"LineToolEllipse",statName:"LineToolEllipse"}),new E({label:window.t("Triangle"),payload:"LineToolTriangle",statName:"LineToolTriangle"}),new E({label:window.t("Polyline"),payload:"LineToolPolyline",statName:"LineToolPolyline"}),new E({label:window.t("Arc"),payload:"LineToolArc",statName:"LineToolArc"}),new O,new E({label:window.t("Text",{context:"tool"}),payload:"LineToolText",statName:"LineToolText"}),new E({label:window.t("Anchored Text"),payload:"LineToolTextAbsolute",statName:"LineToolTextAbsolute"}),new E({label:window.t("Balloon"),payload:"LineToolBalloon",statName:"LineToolBalloon"}),new E({label:window.t("Price Label"),payload:"LineToolPriceLabel",statName:"LineToolPriceLabel"}),new O,new E({label:window.t("Elliott Wave Subminuette"),payload:"LineToolElliottSubminuette",statName:"LineToolElliottSubminuette"}),new E({label:window.t("Elliott Wave Minor"),payload:"LineToolElliottMinor",statName:"LineToolElliottMinor"}),new E({label:window.t("Elliott Wave Circle"),payload:"LineToolElliottCircle",statName:"LineToolElliottCircle"}),new E({label:window.t("Elliott Minor Retracement"),payload:"LineToolElliottMinorRetr",statName:"LineToolElliottMinorRetr"}),new E({label:window.t("Elliott Major Retracement"),payload:"LineToolElliottMajorRetr",statName:"LineToolElliottMajorRetr"}),new O,new E({label:window.t("Brush"),payload:"LineToolBrush",statName:"LineToolBrush"}),new O,new E({label:window.t("Forecast"),payload:"LineToolPrediction",statName:"LineToolPrediction"})],t=function(e){D.tool.setValue(e.getPayload())},n=0;n<Le.length;n++)Le[n]instanceof E&&Le[n].update({onExecute:t});e=new E({label:window.t("Settings..."),icon:i("MXV9"),statName:"ScalesProperties",onExecute:function(){Ie.showGeneralChartProperties(v.scales)}})}this._hotkeys.add({desc:"Maximize",hotkey:P.Modifiers.Alt+13,handler:function(){Ie.toggleFullscreen()},isDisabled:function(){return!Ie._options.fullscreenable.value()}}),this._hotkeys.add({desc:"Cancel selection",hotkey:27,handler:function(){Ie._model.selectionMacro(function(e){e.clearSelection()})},isDisabled:function(){return!Ie._model||0===Ie._model.selection().sources().length}}),Ie.withModel(null,function(){
Ie._model.onSelectedSourceChanged().subscribe(null,function(){Ie._hotkeys.promote()})}),o=new E({label:window.t("Reset Chart"),icon:i("LdoW"),statName:"ResetChart",onExecute:this.GUIResetScales.bind(this),hotkeyGroup:this._hotkeys,hotkeyHash:P.Modifiers.Alt+82}),r=new E({label:window.t("Invert Scale"),statName:"Invert Scale",checkable:!0,onExecute:function(){Ie._model.invertPriceScale(Ie._model.mainSeries().priceScale())},hotkeyGroup:this._hotkeys,hotkeyHash:P.Modifiers.Alt+73}),s=new E({label:window.t("Auto (Fits Data To Screen)"),checkable:!0,onExecute:function(){var e=Ie._model.mainSeries().priceScale();Ie._model.togglePriceScaleAutoScaleMode(e),s.update({checked:e.isAutoScale()})}}),a=new E({label:window.t("Lock Price To Bar Ratio"),checkable:!0,statName:"ToggleLockScale",onExecute:function(){Ie._model.togglePriceScaleLockScaleMode(Ie._model.mainSeries().priceScale())}}),l=new E({label:window.t("Regular"),checkable:!0,statName:"ToggleRegularScale",onExecute:function(){var e=Ie._model.mainSeries().priceScale();Ie._model.setPriceScaleRegularScaleMode(e),l.update({checked:e.isRegular()})}}),c=new E({label:window.t("Percent"),checkable:!0,statName:"TogglePercantage",onExecute:function(){Ie._model.togglePriceScalePercentageScaleMode(Ie._model.mainSeries().priceScale())},hotkeyGroup:this._hotkeys,hotkeyHash:P.Modifiers.Alt+80}),u=new E({label:window.t("Indexed to 100"),checkable:!0,statName:"ToggleIndexedTo100",onExecute:function(){Ie._model.togglePriceScaleIndexedTo100ScaleMode(Ie._model.mainSeries().priceScale())}}),h=new E({label:window.t("Logarithmic"),statName:"ToggleLogScale",checkable:!0,onExecute:function(){Ie._model.togglePriceScaleLogScaleMode(Ie._model.mainSeries().priceScale())},hotkeyGroup:this._hotkeys,hotkeyHash:P.Modifiers.Alt+76}),d=new E({label:window.t("Undo"),onExecute:function(){oe("GUI","Undo"),Ie._model.undoHistory().undo()},disabled:!0,hotkeyGroup:this._hotkeys,hotkeyHash:P.Modifiers.Mod+90}),p=new E({label:window.t("Redo"),onExecute:function(){oe("GUI","Redo"),Ie._model.undoHistory().redo()},disabled:!0,hotkeyGroup:this._hotkeys,hotkeyHash:P.Modifiers.Mod+89}),Ie.withModel(null,function(){Ie._model.undoHistory().undoStack().onChange().subscribe(Ie,Ie.updateUndoRedo),Ie._model.undoHistory().redoStack().onChange().subscribe(Ie,Ie.updateUndoRedo)}),f=[new E({label:window.t("Loading")})],y=new E({name:"apply-color-theme",label:window.t("Color Theme"),icon:i("opke"),subItems:f,statName:"ColorTheme"}),b=new E({label:window.t("Time Zone"),statName:"TimeZone"}),C=new E({label:window.t("Change Symbol..."),shortcutHint:window.t("Any Symbol"),statName:"ChangeSymbol",onExecute:function(){K({callback:this.setSymbol.bind(this),ownerDocument:this._jqParent.prop("ownerDocument")})}}),g("symboledit.dialog_last_entry",""),T=new E({label:window.t("Change Interval..."),shortcutHint:window.t("Any Number"),statName:"ChangeInterval",onExecute:function(){q({callback:function(e){R(e),G.interval.setValue(e)},ownerDocument:Ie._jqParent.prop("ownerDocument")})}}),
TradingView.onWidget()||(this._options.addToWatchlistEnabled&&(x=new E({label:window.t("Add To Watchlist"),icon:i("a9Kt"),statName:"AddToWatchlist",onExecute:function(){var e,t,i;if(window.widgetbar){for(e=window.widgetbar.setPage("base"),i=0;i<e.widgets.length;i++)if("watchlist"===e.widgets[i].type){t=e.widgets[i].widgetObject;break}if(!t)return;t.addHighlight(Ie.getSymbol())}},hotkeyGroup:this._hotkeys,hotkeyHash:P.Modifiers.Alt+87})),I=new E({label:window.t("Add To Text Notes"),statName:"AddToTextNotes",onExecute:function(){runOrSignIn(function(){TradingView.bottomWidgetBar&&(TradingView.bottomWidgetBar.toggleWidget("text_notes",!0),TradingView.bottomWidgetBar._widgets.text_notes.addNote(null,Ie.getSymbol(!0),Ie.getSymbol()))},{source:"Add text note in chart context menu"})},hotkeyGroup:this._hotkeys,hotkeyHash:P.Modifiers.Alt+78})),L=new E({label:window.t("Reset Time Scale"),icon:i("LdoW"),statName:"ResetScale",onExecute:function(){Ie.model().resetTimeScale()},hotkeyGroup:this._hotkeys,hotkeyHash:P.Modifiers.Mod+P.Modifiers.Alt+81}),M=new E({label:window.t("Insert Drawing Tool"),subItems:Le,statName:"InsertDravingTool"}),A=new E({label:window.t("Remove All Indicators"),statName:"RemoveAllIndicators",onExecute:this.removeAllStudies.bind(this)}),k=new E({label:window.t("Remove All Drawing Tools"),statName:"RemoveAllDrawingTools",onExecute:this.removeAllDrawingTools.bind(this)}),V=new E({label:window.t("All Indicators And Drawing Tools"),statName:"RemoveAllIndicatorsAndDrawingTools",onExecute:this.removeAllStudiesDrawingTools.bind(this)}),B=new E({label:window.t("Insert Indicator..."),statName:"InsertIndicator",onExecute:this.showIndicators.bind(this),hotkeyGroup:this._hotkeys,hotkeyHash:191}),new E({label:window.t("Insert Indicator..."),statName:"InsertIndicator",onExecute:this.showIndicators.bind(this),hotkeyGroup:this._hotkeys,hotkeyHash:111}),N=new E({label:window.t("Compare or Add Symbol..."),statName:"CompareOrAddSymbol",onExecute:this.showCompareOrAdd.bind(this)}),F=new E({label:window.t("Compare..."),statName:"Compare",onExecute:this.showCompareOrAdd.bind(this)}),W=new E({label:window.t("Object Tree..."),statName:"ObjectsTree",onExecute:this.showObjectsTreePanelOrDialog.bind(this)}),j=new E({label:window.t("Settings..."),icon:i("MXV9"),statName:"ChartProperties",onExecute:function(){Ie.showGeneralChartProperties()}}),H=new E({label:window.t("Settings..."),icon:i("MXV9"),statName:"MainSeriesProperties",onExecute:function(){Ie.showGeneralChartProperties(v.style)}}),Y=new E({label:window.t("Lock/Unlock"),statName:"ToggleLockSelectedObject",onExecute:this.toggleLockSelectedObject.bind(this)}),Z=new E({label:window.t("Hide"),icon:i("DYI2"),statName:"HideSelectedObject",onExecute:this.hideSelectedObject.bind(this)}),_.enabled("property_pages")&&(J=new E({label:window.t("Settings..."),icon:i("MXV9"),statName:"EditSelectedObject",onExecute:function(){Ie.showSelectedSourceProperties()}})),this.withModel(null,function(){Ie.model().mainSeries().properties().priceAxisProperties.subscribe(Ie,Ie._updateScalesActions)}),
(X=new E({label:window.t("Scale Price Chart Only"),checkable:!0,statName:"ScalePriceChartOnly"})).binder=new m(X,this._properties.scalesProperties.scaleSeriesOnly,this.model(),window.t("Scale Price Chart Only")),Q=this.model().model(),this._properties.scalesProperties.scaleSeriesOnly.listeners().subscribe(null,function(){Q.recalculateAllPanes(),Q.invalidate(z.full())}),$=new E({label:window.t("Drawings Toolbar"),checkable:!0,statName:"ToggleDrawingToolbar"}),(ee=this._options.isDrawingToolbarVisible)&&(ee.subscribe(function(e){$.update({checked:e})},{callWithLast:!0}),$.update({onExecute:function(){ee.setValue(!ee.value())}})),(te=new E({label:window.t("Stay in Drawing Mode"),checkable:!0,statName:"ToggleStayInDrawingMode"})).binder=new m(te,D.properties().stayInDrawingMode,this.model(),window.t("Stay In Drawing Mode")),(ie=new E({label:window.t("Sync drawings to all charts"),checkable:!0,statName:"ToggleSyncDrawings"})).binder=new m(ie,D.properties().drawOnAllCharts,this.model(),"SyncDrawings"),(ne=new E({label:window.t("Lock All Drawing Tools"),checkable:!0,statName:"ToggleLockDrawings"})).binder=new m(ne,D.lockDrawings(),this.model(),window.t("Lock drawings"),function(){D.lockDrawings().setValue(this.value())}),(re=new E({label:window.t("Hide All Drawing Tools"),checkable:!0,statName:"ToggleHideAllDrawingTools"})).binder=new m(re,D.hideAllDrawings(),this.model(),window.t("Hide All Drawing Tools"),function(){D.hideAllDrawings().setValue(this.value())}),(se=new E({label:window.t("Hide Marks On Bars"),checkable:!0,statName:"ToggleHideMarksOnBars"})).binder=new m(se,D.hideMarksOnBars(),this.model(),window.t("Hide Marks On Bars"),function(){D.hideMarksOnBars().setValue(this.value())}),(ae=new E({label:window.t("Extended Trading Hours"),checkable:!0,statName:"ToggleExtendedHours"})).binder=new m(ae,this.model().mainSeries().properties().extendedHours,this.model(),window.t("Change Extended Hours")),(le=new E({label:window.t("Symbol Last Value Label"),checkable:!0,checked:!1,statName:"ToggleSymbolLastValue"})).binder=new m(le,this.properties().scalesProperties.showSeriesLastValue,this.model(),window.t("Show Symbol Last Value")),(ce=new E({label:window.t("Symbol Name Label"),checkable:!0,checked:!1,statName:"ToggleSymbolLabels"})).binding=new m(ce,this.properties().scalesProperties.showSymbolLabels,this.model(),"Undo Show Symbol Labels"),(ue=new E({label:window.t("Indicator Last Value Label"),checkable:!0,checked:!1,statName:"ToggleStudyLastValue"})).binder=new m(ue,this.properties().scalesProperties.showStudyLastValue,this.model(),window.t("Show Indicator Last Value")),(he=new E({label:window.t("Indicator Name Label"),checkable:!0,checked:!1,statName:"ToggleIndicatorsLabels"})).binding=new m(he,this.properties().scalesProperties.showStudyPlotLabels,this.model(),"Undo Show Indicator Labels"),(de=new E({label:window.t("Financials Last Value Label"),checkable:!0,checked:!1,statName:"ToggleFundamentalsLastValue"
})).binder=new m(de,this.properties().scalesProperties.showFundamentalLastValue,this.model(),"Show Financials Last Value"),(pe=new E({label:window.t("Financials Name Label"),checkable:!0,checked:!1,statName:"ToggleFundamentalsLabels"})).binding=new m(pe,this.properties().scalesProperties.showFundamentalNameLabel,this.model(),"Show Financials Name Label"),(_e=new E({label:window.t("Countdown To Bar Close"),checkable:!0,checked:!1,statName:"ToggleCountdown"})).binder=new m(_e,this.model().mainSeries().properties().showCountdown,this.model(),_e.getLabel()),(fe=new E({label:window.t("Currency"),checkable:!0,checked:!0,statName:"ToggleScalesCurrency"})).binder=new m(fe,this.properties().scalesProperties.showCurrency,this.model(),"Change Currency Label Visibility"),me=null,this._options.goToDateEnabled&&(me=new E({label:window.t("Go to Date..."),statName:"GoToDate",onExecute:function(){var e=Ie._chartWidgetCollection.activeChartWidget.value();S(e.model())},hotkeyGroup:this._hotkeys,hotkeyHash:P.Modifiers.Alt+71})),ye=new E({label:window.t("Symbol Info..."),icon:i("1pHB"),checkable:!1,statName:"SymbolInfo",onExecute:function(){var e=Ie.model().mainSeries().symbol(),t=Ie.model().mainSeries().symbolInfo();U(e,{symbolInfo:t})}}),ge=new E({label:Se,statName:"MergeAllScalesToLeft",onExecute:function(){Ie.model().mergeAllScales("left")}}),ve=new E({label:be,statName:"MergeAllScalesToRight",onExecute:function(){Ie.model().mergeAllScales("right")}}),Ce=new E({label:we,statName:"MoveScaleToLeft",onExecute:function(){Ie.model().mergeAllScales("left")}}),Te=new E({label:Pe,statName:"MoveScaleToRight",onExecute:function(){Ie.model().mergeAllScales("right")}}),this._actions={chartProperties:j,mainSeriesPropertiesAction:H,timeScaleReset:L,chartReset:o,invertSeriesScale:r,logSeriesScale:h,autoSeriesScale:s,lockSeriesScale:a,regularSeriesScale:l,percentSeriesScale:c,indexedTo100SeriesScale:u,compareOrAdd:N,compare:F,paneObjectTree:W,insertIndicator:B,insertDrawingTool:M,applyColorTheme:y,symbolSearch:C,showSymbolInfoDialog:ye,changeInterval:T,seriesHide:Z,studyHide:Z,lineToggleLock:Y,lineHide:Z,scaleSeriesOnly:X,drawingToolbarAction:$,stayInDrawingModeAction:te,syncModeAction:ie,lockDrawingsAction:ne,hideAllDrawingsAction:re,hideAllMarks:se,applyTimeZone:b,extendedHours:ae,showCountdown:_e,showCurrency:fe,showSeriesLastValue:le,showSymbolLabelsAction:ce,showStudyLastValue:ue,showStudyPlotNamesAction:he,showFundamentalsLastValueAction:de,showFundamentalNamesAction:pe,undo:d,redo:p,mergeLeftScalesAction:ge,mergeRightScalesAction:ve,moveScaleToLeft:Ce,moveScaleToRight:Te,moveChartAction:void 0},e&&(this._actions.scalesProperties=e),x&&(this._actions.addToWatchlist=x),_.enabled("show_source_code")&&(this._actions.viewSourceCode=new E({label:window.t("Source Code..."),statName:"OpenSelectedObjectSource",onExecute:this.openSelectedObjectSource.bind(this)})),!TradingView.onWidget()&&_.enabled("text_notes")&&(this._actions.addToTextNotes=I),null!==me&&(this._actions.gotoDate=me),this.createSessionBreaksActions(),this.readOnly()||(xe=new E({
label:window.t("Remove"),icon:i("PgQx"),statName:"RemoveSelectedObject",onExecute:function(){var e;this._chartWidgetCollection&&(e=this._chartWidgetCollection.activeChartWidget.value()),e||(e=this),e.removeSelectedSources()}.bind(this),hotkeyGroup:this._hotkeys,hotkeyHash:w.isMacKeyboard?8:46}),w.isMacKeyboard&&new E({statName:"RemoveSelectedObjectMacDelete",onExecute:function(){this.removeSelectedSources()}.bind(this),hotkeyGroup:this._hotkeys,hotkeyHash:46}),this._actions.insertDrawingTool=M,this._actions.paneRemoveAllStudies=A,this._actions.paneRemoveAllDrawingTools=k,this._actions.paneRemoveAllStudiesDrawingTools=V,this._actions.seriesRemove=xe,this._actions.studyRemove=xe,this._actions.lineRemove=xe,_.enabled("property_pages")&&(this._actions.format=J),this._actions.lockDrawingsAction=ne,this._actions.hideAllDrawingsAction=re,this._actions.hideAllMarks=se),this._actions.showPriceLine=new E({label:window.t("Price Line"),checkable:!0,statName:"TogglePriceLine"}),this._actions.showPriceLine.binding=new m(this._actions.showPriceLine,this.model().mainSeries().properties().showPriceLine,this.model(),"Undo Toggle Price Line"),this.readOnly()||(this._actions.horzLineRightThere=new E({label:window.t("Draw Horizontal Line Here"),onExecute:function(){Ie.activePaneWidget&&Ie.activePaneWidget.drawRightThere("LineToolHorzLine")},hotkeyGroup:this._hotkeys,hotkeyHash:P.Modifiers.Alt+72}),this._actions.vertLineRightThere=new E({label:window.t("Draw Vertical Line Here"),onExecute:function(){Ie.activePaneWidget&&Ie.activePaneWidget.drawRightThere("LineToolVertLine")},hotkeyGroup:this._hotkeys,hotkeyHash:P.Modifiers.Alt+86}),this._actions.crossLineRightThere=new E({label:window.t("Draw Cross Line Here"),onExecute:function(){Ie.activePaneWidget&&Ie.activePaneWidget.drawRightThere("LineToolCrossLine")},hotkeyGroup:this._hotkeys,hotkeyHash:P.Modifiers.Alt+67})),this._updateScalesActions()},o.prototype.executeActionById=function(e){if("takeScreenshot"===e)return console.warn('Action "takeScreenshot" is deprecated. Use method "takeScreenshot" instead'),void this._chartWidgetCollection.takeScreenshot();"lockDrawingsAction"===e&&console.warn('Action "lockDrawingsAction" is deprecated. Use method "lockAllDrawingTools" instead'),"hideAllDrawingsAction"===e&&console.warn('Action "hideAllDrawingsAction" is deprecated. Use method "hideAllDrawingTools" instead'),e in this._actions?this._actions[e]instanceof E&&this._actions[e].execute():console.warn("Unknown action id: "+e)},o.prototype.getCheckableActionState=function(e){if("lockDrawingsAction"===e)return console.warn('Action "lockDrawingsAction" is deprecated. Use method "lockAllDrawingTools" instead'),null;if("hideAllDrawingsAction"===e)return console.warn('Action "hideAllDrawingsAction" is deprecated. Use method "hideAllDrawingTools" instead'),null;if(e in this._actions){var t=this._actions[e];if(t instanceof E&&t.isCheckable())return t.isChecked();console.warn("Action "+e+" has no state")}else console.warn("Unknown action id: "+e);return null},o.prototype._updateScalesActions=function(){
var e,t,i,n,o;null!==this._actions&&(t=(e=this.model().mainSeries()).priceScale(),i=e.properties(),n=t.isLockScale(),o=i.style.value()===p.STYLE_PNF,this._actions.percentSeriesScale.update({disabled:n||o,checked:t.isPercentage()}),this._actions.logSeriesScale.update({disabled:n||o,checked:t.isLog()}),this._actions.regularSeriesScale.update({disabled:n||o,checked:t.isRegular()}),this._actions.indexedTo100SeriesScale.update({disabled:n||o,checked:t.isIndexedTo100()}),this._actions.invertSeriesScale.update({checked:t.isInverted()}),this._actions.lockSeriesScale.update({checked:t.isLockScale()}),this._actions.autoSeriesScale.update({checked:t.isAutoScale(),disabled:t.properties().autoScaleDisabled.value()}))},o.prototype.removeAllStudies=function(){this._model.removeAllStudies()},o.prototype.removeAllDrawingTools=function(){this._model.removeAllDrawingTools()},o.prototype.removeAllStudiesDrawingTools=function(){this._model.removeAllStudiesAndDrawingTools()},o.prototype.model=function(){return this._model},o.prototype.defaultSymbol=function(){return this._defSymbol},o.prototype.connect=function(){this._handler=function(e){this._onData(e)}.bind(this),this._boundOnChartSessionIsConnectedChanged=this._onChartSessionIsConnectedChanged.bind(this),this._chartSession.isConnected().subscribe(this._boundOnChartSessionIsConnectedChanged),this._chartSession.criticalError().subscribe(this,this._onChartSessionCriticalError),this._chartSession.connect(this._handler)},o.prototype.finishInitWithoutConnect=function(){this._chartSession.disable(),this._init(),this.chartWidgetInitialized.fire()},o.prototype.reconnect=function(){this._chartSession.disconnect(),this._chartSession.connect()},o.prototype.update=function(){if(this._model){for(var e=0;e<this._paneWidgets.length;e++)this._paneWidgets[e].update();this._timeAxisWidget.update()}},o.prototype.paint=function(e){e||(e=z.full());for(var t=0;t<this._paneWidgets.length;t++)this._paneWidgets[t].paint(e.invalidateForPane(t),!1);this._timeAxisWidget&&this._timeAxisWidget.paint(e.fullInvalidation()),this._redrawPanes.fire()},o.prototype._makeDefaultGui=function(){this._makeChartWidget(),this._makeLoadingScreen(),this._model&&(this._makeTimeAxisWidget(),this._makePaneWidgetsAndSeparators()),this._adjustSize(),this._updateScalesActions(),$(this._elMainTable).selectable(!1),this.update(),this.paint()},o.prototype.widget=function(){return this._jqMainDiv},o.prototype.restoreState=function(e,t,i){this._adjustSize();this._model.restoreState(this._content,t,i);this._setActions()},o.prototype.redrawPanes=function(e){for(var t=0;t<this._paneWidgets.length;t++)this._paneWidgets[t].paint();this._redrawPanes.fire()},o.prototype.setBackgroundColor=function(e){this.scaleBackgroundColor=e.value();for(var t=0;t<this._paneWidgets.length;t++)this._paneWidgets[t].paint(),this._paneWidgets[t].setCursorForTool();this.update(),this.paint()},o.prototype.setScaleLineColor=function(e){this.scaleLineColor=e.value(),this._paneSeparators.forEach(function(e){e.update()}),this.update(),this.paint()},
o.prototype.setScaleTextColor=function(e){this.scaleTextColor=e.value(),this.update(),this.paint()},o.prototype.setTimingsMeter=function(e){this._timingsMeter=e,this._updateTimingsMeterState()},o.prototype._updateTimingsMeterState=function(){var e=this._options.visible.value();null!==this._timingsMeter&&(e?this._timingsMeter.startCollect():this._timingsMeter.stopCollect())},o.prototype._update=function(e){var t,i=e?e.fullInvalidation():H.Full;if(null!==this._timingsMeter&&this._timingsMeter.startDraw(i),i===H.Full){for(this._model?this._updateGui():this._adjustSize(),this._timeAxisWidget.update(),t=0;t<this._paneWidgets.length;t++)this._paneWidgets[t].setState(this._model.panes()[t]),null!==this._paneWidgets[t].statusWidget()&&this._paneWidgets[t].statusWidget().updateLayout();this._dataWindowWidget&&this._dataWindowWidget.fullUpdate()}else if(i===H.Light){for(this._timeAxisWidget.update(),t=0;t<this._paneWidgets.length;t++)null!==this._paneWidgets[t].statusWidget()&&this._paneWidgets[t].statusWidget().update();this._dataWindowWidget&&this._dataWindowWidget.update()}else if(i===H.Cursor){for(t=0;t<this._paneWidgets.length;t++)null!==this._paneWidgets[t].statusWidget()&&this._paneWidgets[t].statusWidget().update();this._dataWindowWidget&&this._dataWindowWidget.update()}this.paint(e),null!==this._timingsMeter&&this._timingsMeter.stopDraw(),e&&e.panesOrderInvalidated()&&me.emit("panes_order_changed")},o.prototype._createVolumeIfNeeded=function(){var e=_.enabled("create_volume_indicator_by_default")&&this._options.addVolume,t=!this._content,i=_.enabled("charting_library_base"),n=_.enabled("create_volume_indicator_by_default_once"),o=this._content&&!this._content.loading;e&&(t||i&&o&&!n)&&this._model.mainSeries().dataEvents().symbolResolved().subscribe(this,function(){var e=this;setTimeout(function(){var t,i,n,o,r=e._model.model().mainSeries().symbolInfo();r&&(t=!r.has_no_volume,!e.containsVolume()&&t?(i=ue.factoryDefaults("chartproperties.volumePaneSize"),(n=e._model.model().createStudyInserter({type:"java",studyId:"Volume@tv-basicstudies"})).setForceOverlay(_.enabled("volume_force_overlay")),n.setPaneSize(i),_.enabled("hide_volume_ma")&&n.setPropertiesState({styles:{vol_ma:{visible:!1}}}),n.insert()):!t&&e.containsVolume()&&(o=e.model().dataSources().filter(function(e){return e instanceof T&&"Volume"===e.metaInfo().shortId})[0],e._model.model().removeSource(o)))},0)},n)},o.prototype._createSessions=function(e){var t=this.showGeneralChartProperties.bind(this,v.timezoneSessions);e.createSessions(t)},o.prototype._makeDefaultModel=function(){function e(){var e,i={readOnly:a.readOnly(),isSnapshot:!!a._containsData,timeScale:a._options.timeScale,crossHairOptions:a._options.crossHairOptions,esdEnabled:a._options.esdEnabled};return void 0!==a._options.watermarkEnabled&&(i.watermarkEnabled=a._options.watermarkEnabled),void 0!==a._options.shiftVisibleRangeOnNewBar&&(i.shiftVisibleRangeOnNewBar=a._options.shiftVisibleRangeOnNewBar),e=c(a._chartSession,function(e){if(!(e instanceof z))throw new Error("Invalid mask")
;a._invalidateMask?a._invalidateMask.merge(e):a._invalidateMask=e,a._draw_planned||(a._draw_planned=!0,a._options.visible.when(function(){var e=!document.hidden,i=a.screen&&a.screen.isShown();null!==a._timingsMeter&&e&&!i&&a._timingsMeter.startWaitingDraw(),a._drawRafId=a._jqParent.prop("ownerDocument").defaultView.requestAnimationFrame(t)}))},a._properties,n,a._metaInfoRepository,a,a._options.undoHistory,a._options.barsMarksContainersFactory,i),a._createSessions(e.chartModel()),e}function t(){a._draw_planned=!1,a._drawRafId=0,a._inLoadingState||a._invalidateMask&&(a._invalidateMask=a._update(a._invalidateMask))}var i,n,r,s,a=this;if(this._content&&this._content.timeScale.points&&(i=this._content.timeScale.points.items[0],n={startDate:i}),!this._metaInfoRepository.getInternalMetaInfoArray())throw new Error("Cannot create chart model: studies metainfo is absent");return _.enabled("lean_chart_load")?this._model=this._model||e():this._model=e(),this._createVolumeIfNeeded(),r=function(){var e;this._model.onTagsChanged().subscribe(this,o.prototype.onModelTagsChanged),this._updateGui(),this._modelCreated.fire(this._model),this._tagsChanged.fire(),e=this._model.mainSeries(),this._defTimeframe&&e.setDefaultTimeframe(this._defTimeframe),this._model.lineCancelled().subscribe(this,this.onLineCancelled),e.dataEvents().symbolNotPermitted().subscribe(null,function(t){e.properties().symbol.setValue(t)}),e.properties().style.unsubscribe(this,this._onChartStyleChanged),e.properties().style.subscribe(this,this._onChartStyleChanged),e.dataEvents().completed().subscribe(this,function(){this._addPerfMark("SeriesCompleted")},!0),e.dataEvents().barReceived().subscribe(this,function(){this._addPerfMark("SeriesFirstDataReceived")},!0),this._options.handleSessionErrors&&(e.dataEvents().chartTypeNotPermitted().subscribe(null,function(){e.properties().interval.setValue("D")}),e.dataEvents().intradaySpreadNotPermitted().subscribe(null,function(){e.properties().interval.setValue("D")}),e.dataEvents().customIntervalNotPermitted().subscribe(null,function(){e.properties().interval.setValue(N(W(e.properties().style.value())))}),e.dataEvents().intradayExchangeNotPermitted().subscribe(null,function(){e.properties().interval.setValue("D")}),a._options.muteSessionErrors||e.dataEvents().extendedHoursNotPermitted().subscribe(null,function(){})),this._options.handleSessionErrors&&(e.requestingIntradayWhenNotSupported.subscribe(null,function(){e.properties().interval.setValue("D"),a._options.muteSessionErrors}),e.requestingResolutionWhenNotSupported.subscribe(null,function(t){e.properties().interval.setValue(t)}))}.bind(this),this._content?(Te&&this._initialLoading&&(s={symbol:this._defSymbol,interval:this._defInterval,style:this._defStyle}),this.restoreState(this._content,this._containsData,s),Te&&this._defSymbol&&this.model().model().setPriceAutoScaleForAllMainSources()):this._setActions(),r()},o.prototype._onChartStyleChanged=function(){oe("Chart","Chart Style "+this._model.mainSeries().getStyleShortName().toUpperCase())},
o.prototype._updateGui=function(){this._model&&(this._makeTimeAxisWidget(),this._makePaneWidgetsAndSeparators(),$(this._elMainTable).selectable(!1),this._adjustSize())},o.prototype.setVisibleTimeRange=function(e,t,i,n){this._chartSession.setVisibleTimeRange(this._model.mainSeries(),e,t,i||{},n)},o.prototype._makeChartWidget=function(){},o.prototype._makeLoadingScreen=function(){if(_.enabled("lean_chart_load")){if(this.screen)return;this.screen=new o.LoadingScreen(this,this._jqParent)}else this.screen=new o.LoadingScreen(this,this._jqMainDiv)},o.prototype._setSymbol=function(e,t){if(this._model){var i=this._model.mainSeries();if(!t&&i.symbolSameAsCurrent(e)&&!_.enabled("same_data_requery"))return;this._model.selectionMacro(function(e){e.clearSelection()}),this._model.setScreenChartProperty(i.properties().symbol,e,this,"Change Symbol",_.enabled("same_data_requery"))}else this._properties.mainSeriesProperties.merge({symbol:e})},o.prototype.setSymbol=function(e,t){return this._setSymbol.apply(this,arguments)},o.prototype.loadRange=function(e){this._model&&(this.screen.show(),this._model.loadRange(e))},o.prototype.getSymbol=function(e){var t;return(t=this._model?this._model.mainSeries().properties():this._properties.mainSeriesProperties)?e&&t.shortName&&t.shortName.value()?t.shortName.value():t.symbol.value():""},o.LoadingScreen=function(e,t){this._cw=e,this.$element=$('<div class="chart-loading-screen">'),this.$shield=$('<div class="chart-loading-screen-shield">').appendTo(this.$element),this.$element.appendTo(t),this._showed=!1,this._cw.withModel(this,this._connectToModel)},o.LoadingScreen.prototype._connectToModel=function(){this._cw.model().mainSeries().dataEvents().messageReceived().subscribe(this,function(e){switch(e.method){case"symbol_error":e.params[1]!==p.PERMISSION_DENIED&&this.hide();break;case"series_error":_.enabled("hide_loading_screen_on_series_error")&&this.hide();break;case"series_completed":this.hide()}})},o.LoadingScreen.prototype.show=function(){this._cw._inLoadingState=!0,this._showed||(this._showed=!0,this._show())},o.LoadingScreen.prototype._show=function(){var e=this._cw.properties().paneProperties.background.value();this.$shield.css("background",e),this.$element.addClass("fade")},o.LoadingScreen.prototype.hide=function(){delete this._cw._inLoadingState,this._showed&&this._hide()},o.LoadingScreen.prototype._hide=function(){this._showed=!1,this.$element.removeClass("fade")},o.LoadingScreen.prototype.$canvas=null,o.LoadingScreen.prototype.context=null,o.LoadingScreen.prototype.isShown=function(){return this._showed},o.prototype.unsetActivePaneWidget=function(){this.activePaneWidget=!1},o.prototype.setActivePaneWidget=function(e){this.activePaneWidget=e},o.prototype.maximizedPaneWidget=function(){return this._maximizedPaneWidget},o.prototype.isMaximizedPane=function(){return null!==this._maximizedPaneWidget},o.prototype.toggleMaximizePane=function(e){if(!(this._paneWidgets.length<2)){this._maximizedPaneWidget?(this._maximizedPaneWidget.state().setMaximized(!1),this._maximizedPaneWidget=null,
this._paneSeparators.forEach(function(e){e.show()})):(this._maximizedPaneWidget=e,this._maximizedPaneWidget.state().setMaximized(!0),this._paneSeparators.forEach(function(e){e.hide()}));for(var t=this._paneWidgets.length;t--;)this._paneWidgets[t].updateControls(),this._paneWidgets[t].updatePriceAxisWidgets();this._timeAxisWidget.updatePriceAxisStubs(),this._adjustSize(),this.updateIndicatorImagePosition(),this.updateCrossHairPositionIfNeeded()}},o.prototype._makePaneWidgetsAndSeparators=function(){var e,t,i,n,o=this._model.panes(),r=o.length,s=this._paneWidgets.length;for(e=r;e<s;e++)(t=this._paneWidgets.pop()).destroy(),(i=this._paneSeparators.pop())&&i.destroy();for(e=s;e<r;e++)(t=new a(this,o[e],{contextMenuEnabled:this._options.paneContextMenuEnabled,currencyLabelEnabled:this._options.currencyLabelEnabled,handleScale:this._options.handleScale,handleScroll:this._options.handleScroll,priceScaleContextMenuEnabled:this._options.priceScaleContextMenuEnabled,tradeContextMenuEnabled:this._options.tradeContextMenuEnabled,symbolMarkerEnabled:this._options.symbolMarkerEnabled,legendWidgetEnabled:this._options.legendWidgetEnabled,legendWidget:this._options.legendWidget,propertyPagesEnabled:this._options.propertyPagesEnabled,sourceSelectionEnabled:this._options.sourceSelectionEnabled,controlsEnabled:this._options.paneControlsEnabled,croppedTickMarks:this._options.croppedTickMarks})).onMouseLeave=this.unsetActivePaneWidget.bind(this),t.onMouseEnter=this.setActivePaneWidget.bind(this),this._paneWidgets.push(t),e>0&&(i=new l(this,e-1,e),this._paneSeparators.push(i),this._timeAxisWidget?$(i.row).insertBefore(this._timeAxisWidget.getElement()):$(i.row).appendTo(this._elMainTable)),this._timeAxisWidget?this._elMainTable.insertBefore(t.getElement(),this._timeAxisWidget.getElement()):this._elMainTable.appendChild(t.getElement());for(null!==this._timeAxisSeparator&&this._timeAxisSeparator.destroy(),this._timeAxisSeparator=new l(this,this._paneWidgets.length-1,0,!0),$(this._timeAxisSeparator.row).insertBefore(this._timeAxisWidget.getElement()),e=0;e<r;e++)n=o[e],(t=this._paneWidgets[e]).hasState()&&t.state()===n?t.updatePriceAxisWidgets():t.setState(n);for(e=r;e--;)this._paneWidgets[e].updateControls();this._updateThemedColor()},o.prototype._titlesProvider=function(e,t){var i,n=this.model(),o=this._maximizedPaneWidget?this._maximizedPaneWidget.state():n.paneForSource(n.mainSeries()),r="right"===e?o.rightPriceScales():o.leftPriceScales();return r.length<t+1?[]:((i=r[t].orderedSources().filter(function(e){return e===n.mainSeries()||e instanceof T})).reverse(),(i=s(i,n.mainSeries())).map(function(e){return e.title(!0,void 0,!1)}))},o.prototype._menuItemsProvider=function(e,t){var i,n,o,r=this.model(),s=this._maximizedPaneWidget?this._maximizedPaneWidget.state():r.paneForSource(r.mainSeries()),a="right"===e?s.visibleRightPriceScales():s.visibleLeftPriceScales();return a.length<t+1?[]:(i=a[t],n=r.panes().indexOf(s),o=this._paneWidgets[n],
("right"===e?o.rightPriceAxisesContainer():o.leftPriceAxisesContainer()).findAxisWidgetForScale(i).getContextMenuActions())},o.prototype._makeTimeAxisWidget=function(){if(this._timeAxisWidget)this._timeAxisWidget.updatePriceAxisStubs();else{var e=this.model();this._timeAxisWidget=new h(this,this._options.timeScaleWidget,this._titlesProvider.bind(this),this._menuItemsProvider.bind(this),this._backgroundBasedTheme),this._elMainTable.appendChild(this._timeAxisWidget.getElement()),this._timeAxisWidget.updatePriceAxisStubs(),this._timeAxisWidget.onLabelHovered().subscribe(this,function(t,i){var n=this._maximizedPaneWidget?this._maximizedPaneWidget.state():e.paneForSource(e.mainSeries()),o=this.paneByState(n);o.highlightedPriceAxis().setValue(i?t:null),this.model().model().lightUpdate()})}},o.prototype.insertStudy=function(e,t,i){var n=this;return new Promise(function(o){t?window.runOrSignIn(function(){o(n._insertStudy(e,t,i))},{source:"study on study"}):o(n._insertStudy(e,t,i))}).catch(function(){})},o.prototype._insertStudy=function(e,t,i){var n,o,r=this._model.createStudyInserter(e,t,i);return r.setForceOverlay("java"===e.type&&"Volume@tv-basicstudies"===e.studyId&&_.enabled("volume_force_overlay")),n=this,(o=r.insert(function(e,t,i){return new Promise(function(e,o){n.isSymbolicStudy(i)?(oe("GUI","Confirmation dialogs","Symbol confirmation dialog"),C(i,n.model(),e,o,"symbol")):n.hasConfirmInputs(t)?(oe("GUI","Confirmation dialogs","Inputs confirmation dialog"),C(i,n.model(),e,o)):e({})})})).catch(function(e){}),o},o.prototype.hasConfirmInputs=function(e){var t,i;if(void 0===e)return!1;for(t=0;t<e.length;++t)if(void 0!==(i=e[t]).confirm&&i.confirm)return!0;return!1},o.prototype.isSymbolicStudy=function(e){switch(e.id){case"Overlay@tv-basicstudies":case"CorrelationCoefficient@tv-basicstudies":case"Correlation Coeff@tv-basicstudies":case"Correlation - Log@tv-basicstudies-1":case"Spread@tv-basicstudies":case"Ratio@tv-basicstudies":return!0;default:return!1}},o.prototype.getPriceAxisMaxWidthByName=function(e){return"left"===e?this.maxLhsPriceAxisWidth:this.maxRhsPriceAxisWidth},o.prototype.getPriceAxisWidthChangedByName=function(e){return"left"===e?this.lhsPriceAxisWidthChanged:this.rhsPriceAxisWidthChanged},o.prototype._adjustSize=function(){function e(e,t){return e+t}function t(e,t){t.forEach(function(t,i){e[i]=Math.max(e[i],t)})}var i,n,o,r,s,a,c,h,d,p,_,f,m,y,g=0,v=null===this._model?null:this._model.model().priceScaleSlotsCount(),S=new Uint32Array(null===v?0:v.left),b=new Uint32Array(null===v?0:v.right);this._paneWidgets.forEach(function(e){var i,n;this._maximizedPaneWidget&&this._maximizedPaneWidget!==e||(i=e.leftPriceAxisesContainer().optimalWidths(),n=e.rightPriceAxisesContainer().optimalWidths(),t(S,i),t(b,n),g+=e.stretchFactor())},this),i=this._lhsAxesWidth=S.reduce(e,0),n=this._rhsAxesWidth=b.reduce(e,0),o=this._width(),r=this._height(),s=Math.max(o-i-n,0),a=this._paneSeparators.length,c=l.HEIGHT,h=this.isMaximizedPane()?0:c*a,d=null!==this._timeAxisWidget?this._timeAxisWidget.optimalHeight():0,
f=(_=r<(p=h+d)?0:r-p)/g,m=0,y=!1,this._paneWidgets.forEach(function(e,t){var i,n;this._model&&e.setState(this._model.panes()[t]),i=0,this.isMaximizedPane()?i=this._maximizedPaneWidget===e?_:0:(n=0,n=t===this._paneWidgets.length-1?_-m:Math.round(e.stretchFactor()*f),i=Math.max(n,2),m+=i),e.setPriceAxisSizes(u.LHS,i,S),e.setPriceAxisSizes(u.RHS,i,b),y=y||i!==e.height(),e.setSize(new ae(s,i)),this._model&&e.state()&&this._model.setPaneHeight(e.state(),i)},this),null!==this._timeAxisWidget&&this._timeAxisWidget.setSizes(new ae(s,d),S,b),this._model&&this._model.setWidth(s),this._controlBarNavigation&&this._controlBarNavigation.updatePosition(),this.maxLhsPriceAxisWidth!==i&&(this.maxLhsPriceAxisWidth=i,this.lhsPriceAxisWidthChanged.fire(i)),this.maxRhsPriceAxisWidth!==n&&(this.maxRhsPriceAxisWidth=n,this.rhsPriceAxisWidthChanged.fire(n)),y&&me.emit("panes_height_changed")},o.prototype._onChartSessionIsConnectedChanged=function(e){e?this._onConnection():this._onDisconnect()},o.prototype._onChartSessionCriticalError=function(e,t){this._disconnected.fire(!0)},o.prototype._onData=function(e){switch(e.method){case"reconnect_bailout":this._reconnectBailout.fire();break;default:this._model.onData(e)}},o.prototype._onConnection=function(){this._online=!0,this._model?(this._model.restart(),this._updateGui(),this.update(),this.paint(),this._connected.fire()):this.requestMetadata()},o.prototype._onDisconnect=function(){this._model&&this._model.disconnect(),this._online=!1,this.update(),this.paint(),this._disconnected.fire()},o.prototype._applyStudiesOverrides=function(){ie.overrideDefaults(this._metaInfoRepository.getInternalMetaInfoArray())},o.prototype.requestMetadata=function(){this._addPerfMark("RequestMetadataStart"),this._metaInfoRepository.requestMetaInfo().then(function(){this._addPerfMark("RequestMetadataEnd"),this._inited?this.model().model().setStudiesMetaData(this._metaInfoRepository.getInternalMetaInfoArray(),this._metaInfoRepository.getMigrations()):(this._init(),this.chartWidgetInitialized.fire(),_.enabled("charting_library_base")||he.logDebug("initialized"))}.bind(this))},o.prototype.studiesMetaData=function(){return this._model.studiesMetaData()},o.prototype.getTimeScale=function(){return this._timeAxisWidget},o.prototype.chartWidgetCollection=function(){return this._chartWidgetCollection},o.prototype.setSeriesStyle=function(e,t){this._model.setProperty(e.properties().style,t)},o.prototype.showObjectsTreePanelOrDialog=function(){var e=!1,t=window.widgetbar;t&&t.isVisible()&&(e="object_tree"===t.setPage("object_tree").name),e||this.showObjectsTreeDialog()},o.prototype.showObjectsTreeDialog=function(e){var t=this;Promise.all([i.e("dialogs-core"),i.e(19),i.e(32),i.e(33),i.e(51),i.e(57),i.e("create-dialog"),i.e(46),i.e("objecttreedialog")]).then(function(n){new(0,i("SDvV").ObjectTreeDialog)({chartWidget:t,activeTab:e},t._model).show()}.bind(null,i)).catch(i.oe)},o.prototype._showChartProperties=function(e,t,i,n){t&&(g("properties_dialog.active_tab.chart",t),i.tabName=t);var o=this;return new Promise(function(t){
y(e,o._model,i,o._chartWidgetCollection,n).then(function(e){t(e.isVisible()?e:null)})})},o.prototype.showGeneralChartProperties=function(e){if(!_.enabled("show_chart_property_page"))return Promise.resolve(null);var t=this;return this._showChartProperties(this._model.mainSeries(),e,{doNotCloseOnBgClick:!0,onResetToDefault:function(){t._model.restorePreferences(t._model),t.applyTheme(t)}}).then(function(e){if(null===e)return null;var i=function(){e.hide(),t._chartWidgetCollection.activeChartWidget.unsubscribe(i)};return t._chartWidgetCollection.activeChartWidget.subscribe(i),e})},o.prototype.showChartPropertiesForSource=function(e,t,i,n){return _.enabled("property_pages")?e===this._model.model().mainSeries()?this.showGeneralChartProperties(t):((i=i||{}).onResetToDefault=this._model.restorePropertiesForSource.bind(this._model,e),this._showChartProperties(e,t,i,n)):Promise.resolve(null)},o.prototype.generalPropertiesDefinitions=function(){return this._getChartPropertyDefinitionsViewModel().then(function(e){return e.propertyPages()})},o.prototype.propertiesDefinitionsForSource=function(e){return A(e)||I(e)?e.getPropertyDefinitionsViewModel().then(function(e){return null===e?null:e.propertyPages()}).catch(function(e){return he.logWarn(e),null}):Promise.resolve(null)},o.prototype.showCompareOrAdd=function(){this._chartWidgetCollection.showAddCompareDialog()},o.prototype.showIndicators=function(e){if(window.studyMarket)return window.studyMarket.isVisible()?void window.studyMarket.hide():(window.studyMarket.show(e),window.studyMarket)},o.prototype.removeSelectedSources=function(){this.removeDataSources(this._model.selection().sources())},o.prototype.removeDataSources=function(e){var t,i=e.filter(function(e){return e!==this._model.mainSeries()&&e!==this._model.lineBeingCreated()&&!(e instanceof d)}.bind(this));0!==i.length&&(t=null,I(i[0])&&(r(1===i.length,"Cannot remove several studies (no multi select for studies)"),t=i[0]),i.find(function(e){return e.hasAlert.value()&&e.isUserDeletable()}),t&&t.hasChildren()?showDeleteStudyTreeConfirm(this._model.removeSelectedSources.bind(this._model)):this._model.removeSelectedSources())},o.prototype.unlinkSelectedLine=function(){var e=this._model,t=e.selection().sources().filter(function(e){return A(e)});e.unlinkLines(t)},o.prototype.copyLineToOtherCharts=function(){var e=this._model,t=e.selection().sources().filter(function(e){return A(e)});e.copyToOtherCharts(t)},o.prototype.hideSelectedObject=function(){this.hideDataSources(this._model.selection().sources())},o.prototype.hideDataSources=function(e){var t,i;e.length&&(t=e.map(function(e){return e.properties().visible}),i=e.map(function(){return!1}),this._model.setProperties(t,i,"Hide "+e[0].title()))},o.prototype.toggleLockSelectedObject=function(){var e=this._model;e.selection().sources().forEach(function(t){var i=t.properties().frozen.value();e.setProperty(t.properties().frozen,!i,(i?window.t("Unlock"):window.t("Lock"))+" "+t.title())})},o.prototype.showSelectedSourceProperties=function(){var e=this._model.selection().sources()[0]
;e&&this.showSourceProperties(e)},o.prototype.showSourceProperties=function(e){var t=null;e===this._model.mainSeries()&&(t=v.style),this.showChartPropertiesForSource(e,t)},o.prototype.openSelectedObjectSource=function(e){},o.prototype.setTimeAxisVisible=function(e){this._timeAxisWidget.setVisible(e),this._adjustSize()},o.prototype.isTextTool=function(e){switch(e){case"LineToolBalloon":case"LineToolText":case"LineToolTextAbsolute":case"LineToolCallout":case"LineToolNote":case"LineToolNoteAbsolute":return!0}return!1},o.prototype.tags=function(){return this._model?this._model.calculateDefaultTags():[]},o.prototype.state=function(e,t,i){return this._model.state(e,t,i)},o.prototype.asyncState=function(){return this._model.asyncState()},o.prototype.metaInfo=function(){var e=this._metaInfo;return this._model&&(e.systemTags=this._model.calculateDefaultTags()),e},o.prototype.image=function(){function e(e,t,i){0!==e.getWidth()&&d.drawImage(e.getImage(),t,i)}var t,i,n,o,r,s,a,l,c,u,h=document.createElement("canvas"),d=h.getContext("2d"),p=0,_=this._timeAxisWidget.size.h,f=this.properties().scalesProperties.lineColor.value();for(i=0;i<this._paneWidgets.length;i++)(t=this._paneWidgets[i])&&t.state()&&(t.state().recalculate(!0),0===i&&(p=t.leftPriceAxisesContainer().getWidth()+t.size().w+t.rightPriceAxisesContainer().getWidth()),_+=t.size().h);for(_+=this._paneWidgets.length-1,this._update(),n=25,o=5,h.width=p+2*o,h.height=_+n+2*o,d.fillStyle="#F2F5F8",d.fillRect(0,0,h.width,h.height),r=n+o,s=o,(a=this.mainSeriesQuotesAndMetainfo()).ohlc&&(l="{0} O:{1} H:{2} L:{3} C:{4}".format(a.meta.symbol,a.ohlc[0],a.ohlc[1],a.ohlc[2],a.ohlc[3]),d.fillStyle="#000",d.font="12px "+ye,d.fillText(l,s,o+15)),i=0;i<this._paneWidgets.length;i++)e((t=this._paneWidgets[i]).leftPriceAxisesContainer(),s,r),c=t.leftPriceAxisesContainer().getWidth(),d.drawImage(t.canvasElement(),s+c,r),null!==(u=t.statusWidget())&&u.renderTo(d,s+5,r+5),e(t.rightPriceAxisesContainer(),s+c+t.size().w,r),r+=t.size().h,i<this._paneWidgets.length-1&&(d.fillStyle=f,d.fillRect(s,r,p,1),r++);return d.drawImage(this._timeAxisWidget.lhsCanvas,s,r),d.drawImage(this._timeAxisWidget.canvas,s+t.leftPriceAxisesContainer().getWidth(),r),d.drawImage(this._timeAxisWidget.rhsCanvas,s+t.leftPriceAxisesContainer().getWidth()+t.size().w,r),d.lineWidth=1,d.strokeStyle="#000",d.strokeRect(o+.5,n+o+.5,p-1,_-1),h},o.prototype.images=function(){function e(e){var i,n,o,r,s,a;for(e.paint(H.Light,t._onWidget),(i=e.getScreenshotData()).containsMainSeries=e.containsMainSeries(),i.studies=[],n=e.state().dataSources(),o=0;o<n.length;o++)r=n[o],s=t.properties().paneProperties.legendProperties,a=r.statusView(),r instanceof T?r.properties().visible.value()&&a&&s.showStudyTitles.value()&&s.showLegend.value()&&i.studies.push(r.statusView().text()):r instanceof p&&a&&s.showLegend.value()&&s.showSeriesTitle.value()&&(i.mainSeriesText=r.statusView().text());return i}var t,i,n,o,r,s,a;if(TradingView.printing=!0,t=this,i=this._model.selection().sources(),this._model.selectionMacro(function(e){e.clearSelection()}),
n=[],this.isMaximizedPane())n.push(e(this._maximizedPaneWidget));else for(o=0;o<this._paneWidgets.length;o++)r=this._paneWidgets[o],n.push(e(r)),o<this._paneWidgets.length-1&&n.push(this._paneSeparators[o].image());return s=null,this._timeAxisWidget&&(n.push(this._timeAxisSeparator.image()),this._timeAxisWidget.paint(H.Light),s=this._timeAxisWidget.getScreenshotData()),TradingView.printing=!1,this._model.selectionMacro(function(e){i.forEach(function(t){e.addSourceToSelection(t)})}),this._model.invalidate(z.light()),a=this.mainSeriesQuotesAndMetainfo(),{panes:n,timeAxis:s,colors:{text:this.properties().scalesProperties.textColor.value(),bg:this.properties().paneProperties.background.value(),scales:this.properties().scalesProperties.lineColor.value()},meta:a.meta,ohlc:a.ohlc,quotes:a.quotes}},o.prototype.mainSeriesQuotesAndMetainfo=function(){var e,t,i,n,o,r,s,a=this._model&&this._model.mainSeries();return a&&(n=function(e){return null==e?"":a.formatter().format(e,void 0,void 0,!0,!1)+""},o=function(e){return null==e?"":e+""},e={resolution:a.interval(),symbol:a.symbol()},(r=a.symbolInfo())&&(e.symbol=r.full_name,e.description=r.description,e.exchange=r.exchange),null!==(s=a.bars().last())&&(t=s.value.slice(1,5).map(n)),a.quotes()&&(i={change:n(a.quotes().change),changePercent:o(a.quotes().change_percent),last:n(a.quotes().last_price)})),{meta:e,ohlc:t,quotes:i}},o.prototype.onTagsChanged=function(){return this._tagsChanged},o.prototype.onModelTagsChanged=function(){this._tagsChanged.fire()},o.prototype.onAboutToBeDestroyed=function(){return this._aboutToBeDestroyed},o.prototype.destroy=function(){var e,t,i;for(this._aboutToBeDestroyed.fire(),null!==this._removeMaximizeHotkey&&(this._removeMaximizeHotkey(),this._removeMaximizeHotkey=null),0!==this._drawRafId&&this._jqParent.prop("ownerDocument").defaultView.cancelAnimationFrame(this._drawRafId),this._model.model().destroy(),null!==this._timingsMeter&&(this._timingsMeter.stopCollect(),this._timingsMeter=null),this._chartSession.criticalError().unsubscribe(this,this._onChartSessionCriticalError),this._chartSession.isConnected().unsubscribe(this._boundOnChartSessionIsConnectedChanged),this._chartSession.destroy(),e=0;e<this._paneWidgets.length;e++)this._paneWidgets[e].destroy();for(this._paneWidgets.length=0,e=0;e<this._paneSeparators.length;e++)this._paneSeparators[e].destroy();for(t in this._paneSeparators.length=0,this._controlBarNavigation&&(this._controlBarNavigation.destroy(),this._controlBarNavigation=void 0),$(window).off("visibilitychange:chart_"+this._guid),$(window).off("keydown:chart_"+this._guid),this._jqMainDiv&&this._jqMainDiv.remove(),this._actions)(i=this._actions[t])instanceof E&&(i.destroy(),i.binder&&i.binder.destroy());null!==this._timeAxisWidget&&(this._timeAxisWidget.destroy(),this._timeAxisWidget=null),null!==this._definitionsViewModel&&this._definitionsViewModel.destroy(),this._hotkeys&&(this._hotkeys.destroy(),this._hotkeys=null),this._jqMainDiv[0].removeEventListener("wheel",this._onWheelBound),this._isDestroyed=!0},o.prototype.title=function(){
return window.t("Chart Properties")},o.prototype.symbolProperty=function(){return this._model.mainSeries().properties().shortName?this._model.mainSeries().properties().shortName:this._model.mainSeries().properties().symbol},o.prototype.loadContent=function(e,t){var i,n,o,r,s,a;for(this.screen.show(),i=this,this.isMaximizedPane()&&this.toggleMaximizePane(),n=i._model.model().dataSources(),o=0;o<n.length;o++)(r=n[o])!==i._model.mainSeries()&&i._model.model().removeSource(r,!0);for(this._model.disconnect(),i.activePaneWidget=!1,i._model.mainSeries().purgeSymbolInfo(),e.loading=!0,this._content=e,this._initialLoading=Boolean(t),o=0;o<e.panes.length;++o)for(a=0;a<e.panes[o].sources.length;++a)if(e.panes[o].sources[a].state.symbol){s=e.panes[o].sources[a].state;break}if(!s)throw Error("An error occured while determining main series ion the chart");i._properties.mainSeriesProperties.merge({visible:!0,symbol:s.symbol,timeframe:"",onWidget:i._onWidget,interval:s.interval||"D",style:s.style}),i._init(),G.interval.setValue(s.interval),i._model.undoHistory().clearStack()},o.prototype._contentSeriesProperties=function(){var e,t,i;if(this._content)for(e=this._content.panes.length;e-- >0;)for(i=(t=this._content.panes[e].sources).length;i-- >0;)if("MainSeries"===t[i].type)return t[i].state},o.prototype.updateUndoRedo=function(){this._model&&(this.actions().undo.update({disabled:this._model.undoHistory().undoStack().isEmpty()}),this.actions().redo.update({disabled:this._model.undoHistory().redoStack().isEmpty()}))},o.prototype.createSessionBreaksActions=function(e){var t=new E({label:window.t("Session Breaks"),checkable:!0,statName:"ToggleSessionBreaks"});t.binder=new m(t,this._model.chartModel().sessions().properties().graphics.vertlines.sessBreaks.visible,this.model(),"Session Breaks"),this._actions.sessionBreaks=t},o.prototype.updateActionForIntradayOnly=function(e){!e||!e instanceof E||e.update({disabled:this.model().mainSeries().isDWM()})},o.prototype.withModel=function(e,t){this.model()?t.call(e):this.modelCreated().subscribe(e,t,!0)},o.prototype.containsVolume=function(){return this.model().dataSources().some(function(e){return e instanceof T&&"Volume"===e.metaInfo().shortId})},o.prototype.containsStudyByPredicate=function(e){return!!this._model&&this._model.dataSources().some(function(t){if(!(t instanceof T))return!1;var i=t.metaInfo();return e(i)})},o.prototype.containsStudy=function(e){return this.containsStudyByPredicate(function(t){return t.id===e||t.fullId===e})},o.prototype.isSmall=function(){return this._width()<550||this._height()<300},o.prototype.onWidget=function(){return this._onWidget},o.prototype.onCmeWidget=function(){return"cme"===this.widgetCustomer()},o.prototype.widgetCustomer=function(){return this._widgetCustomer},o.prototype._width=function(){return this._options.width.value()},o.prototype._height=function(){return this._options.height.value()},o.prototype.resize=function(){var e={height:this._height()+"px",width:this._width()+"px"};this._jqMainDiv.css(e),this._elMainTable.style.height=e.height,
this._elMainTable.style.width=e.width,this._resizeHandler&&this._jqMainDiv&&this._resizeHandler()},o.prototype.chartSession=function(){return this._chartSession},o.prototype.maxLhsPriceAxisWidth=0,o.prototype.maxRhsPriceAxisWidth=0,o.prototype.GUIResetScales=function(){oe("GUI","Reset Scales");var e=this.model();e&&e.resetScales()},o.prototype.onLineCancelled=function(){D.resetToCursor()},o.prototype.createIndicatorImage=function(){var e=this;this._indicatorBindingPriceAxisName="right",this._indicatorImageMargin="marginRight",this.indicatorImage=this._jqParent[0].getElementsByClassName("chart-status-picture")[0],this.indicatorImage?this.indicatorImage.innerHTML="":(this.indicatorImage=this._jqParent.prop("ownerDocument").createElement("span"),this.indicatorImage.className="chart-status-picture",this._jqParent.append(this.indicatorImage)),this._options.marketStatusWidgetEnabled&&(this.indicatorText=$('<span class="series-status-text apply-common-tooltip"><span class="js-market-status tv-market-status--series-status" data-name="market-status"></span></span>'),this.indicatorText.appendTo(this.indicatorImage),this.indicatorDot&&this.indicatorDot.stop(),this.indicatorDot=new le({el:this.indicatorText.find(".js-market-status")[0],classSuffix:"--for-chart"}),this.indicatorDot.start(),_.enabled("display_data_mode")&&($('<span class="js-data-mode tv-data-mode--series-status"></span>').appendTo(this.indicatorText),this.dataModeIndicator&&this.dataModeIndicator.stop(),this.dataModeIndicator=new ce({el:this.indicatorText.find(".js-data-mode")[0],classSuffix:"--for-chart"}),this.dataModeIndicator.start())),e.withModel(null,function(){var t=e._model.mainSeries();t.onStatusChanged().subscribe(null,e.updateIndicatorImage.bind(e)),t.marketStatus.subscribe(e.updateIndicatorImage.bind(e)),e.updateIndicatorImage(),e.checkCompactMode(),e._model.model().onRearrangePanes().subscribe(null,function(){e.resetIndicatorSize(),e.resizeIndicator()})}),this._indicatorPriceAxisWidthChanged=this.getPriceAxisWidthChangedByName(this._indicatorBindingPriceAxisName),this._indicatorPriceAxisWidthChanged.subscribe(this,this.updateIndicatorImagePosition),this.updateIndicatorImagePosition()},o.prototype._updateDataWarningIndicator=function(){},o.prototype.updateIndicatorImage=function(){var e,t,i,n=this,o=this._model;o&&(t=(e=o.mainSeries()).status(),i=e.quotes()?e.quotes().update_mode_seconds:null,n._updateDataAndMarketStatus(e.marketStatus.value(),t,i))},o.prototype.checkCompactMode=function(){this._jqMainDiv.toggleClass("i-compact",this._width()<=400),this.indicatorImage&&(this._indicatorWidth=this.indicatorImage.clientWidth)},o.prototype.getDataTextStatus=function(e){var t;switch(e){case p.STATUS_LOADING:case p.STATUS_RESOLVING:t="loading";break;case p.STATUS_INVALID_SYMBOL:t="invalid";break;case p.STATUS_NO_BARS:t="forbidden";break;case p.STATUS_DELAYED:t="delayed";break;case p.STATUS_DELAYED_STREAMING:t="delayed_streaming";break;case p.STATUS_EOD:case p.STATUS_PULSE:t="endofday";break;case p.STATUS_OFFLINE:t="connecting";break;case p.STATUS_SNAPSHOT:
t="snapshot";break;case p.STATUS_READY:t="realtime";break;case p.STATUS_REPLAY:t="replay";break;default:t=e}return t},o.prototype._updateDataAndMarketStatus=function(e,t){var i;void 0!==this.indicatorText&&(i=this.getDataTextStatus(t),t===p.STATUS_LOADING||t===p.STATUS_RESOLVING?this.indicatorDot.setStatus("loading"):t===p.STATUS_INVALID_SYMBOL?this.indicatorDot.reset():i===t&&he.logWarn("unhandled data mode "+i),_.enabled("display_data_mode")&&this.dataModeIndicator.setMode(i),!["loading","invalid","replay"].includes(i)&&e?this.indicatorDot.setStatus(e,!0):"invalid"===i?this.indicatorDot.setStatus("invalid",!0):"replay"===i&&this.indicatorDot.setStatus("replay"),this.resizeIndicator())},o.prototype.resetIndicatorSize=function(){var e,t;null!==this._paneWidgets[0]&&null!==(e=this._paneWidgets[0].statusWidget())&&null!==(t=e.firstTitle())&&(t.style.paddingRight="")},o.prototype.resizeIndicator=function(){var e,t,i,n,o;null!==this._paneWidgets[0]&&null!==(e=this._paneWidgets[0].statusWidget())&&null!==(t=e.firstTitle())&&(i=this._width()<150?0:this._indicatorWidth+10,t.style.paddingRight=i+"px"),this._options.marketStatusWidgetEnabled&&_.enabled("display_data_mode")&&this.indicatorDot&&this.dataModeIndicator&&(this.indicatorDot.isShortModeEnabled()&&this.dataModeIndicator.isShortModeEnabled()?(n=[this.indicatorDot.getTooltipText(),this.dataModeIndicator.getTooltipText()].filter(function(e){return e}).join(", "),this.indicatorText.attr("title",n)):this.indicatorText.attr("title",""),this.indicatorText.get(0).dispatchEvent(new b("common-tooltip-update"))),this.indicatorImage&&(this._indicatorWidth=this.indicatorImage.clientWidth),o=this._width(),this._options.marketStatusWidgetEnabled&&this.indicatorDot&&(o>650?(this.indicatorDot.setTooltipEnabled(!1),this.indicatorDot.disableShortMode()):o>550?(this.indicatorDot.setTooltipEnabled(!1),this.indicatorDot.disableShortMode()):(this.indicatorDot.setTooltipEnabled(!1),this.indicatorDot.enableShortMode())),_.enabled("display_data_mode")&&this.dataModeIndicator&&(o>650?(this.dataModeIndicator.setTooltipEnabled(!1),this.dataModeIndicator.disableShortMode()):o>550?(this.dataModeIndicator.setTooltipEnabled(!0),this.dataModeIndicator.enableShortMode()):(this.dataModeIndicator.setTooltipEnabled(!1),this.dataModeIndicator.enableShortMode()))},o.prototype.updateIndicatorImagePosition=function(){this.indicatorImage&&(this.indicatorImage.style[this._indicatorImageMargin]=this.getPriceAxisMaxWidthByName(this._indicatorBindingPriceAxisName)+"px")},o.prototype._getMainSeriesPaneWidget=function(){for(var e=0;e<this._paneWidgets.length;e++)if(this._paneWidgets[e].containsMainSeries())return this._paneWidgets[e];return null},o.prototype.getMarketStatusTooltip=function(){return this._options.marketStatusWidgetEnabled&&this.indicatorDot?this.indicatorDot.getTooltipText():"-"},o.prototype._startSpinner=function(e){this._spinner||e&&(this._spinner=(new ne).spin(e))},o.prototype.isJustClonedChart=function(){return!!(this._options||{}).justCloned},o.prototype.setDataWindowWidget=function(e){
this._dataWindowWidget=e},o.prototype.removeDataWindowWidget=function(){this._dataWindowWidget=null},_.enabled("datasource_copypaste")&&(o.prototype.onAppClipboardPaste=function(e,t){he.logDebug("[[paste]]"),this._model&&this._model.pasteSourceFromClip(e,t)},o.prototype.onAppClipboardCopy=function(e){e||(e=this._model.selection().sources()),e.filter(function(e){return e instanceof T&&e.isChildStudy()}).length?he.logDebug("Can not copy child study"):(he.logDebug("[[copy]]"),this._model&&this._model.copySourcesToClip(e))},o.prototype.onAppClipboardCut=function(e){he.logDebug("[[cut]]"),this._model&&this._model.cutSourcesToClip(e||this._model.selection().sources())}),o.prototype.applyOverrides=function(e){var t,i={};for(t in e)t.startsWith("mainSeriesProperties.priceAxisProperties")||(i[t]=e[t]);applyPropertiesOverrides(this.properties(),null,!1,i,null),this._model&&(applyPropertiesOverrides(this._model.model().properties(),null,!1,i),applyPropertiesOverrides(this._model.mainSeries().properties(),null,!1,i,"mainSeriesProperties"))},o.prototype.applyStudiesOverrides=function(e){ie.setDefaultsOverrides(e),this._applyStudiesOverrides()},o.prototype.setActive=function(e){this._isActive=e,ve&&(e&&this.selectBarMode().value()?this.startTrackingMode():this.exitTrackingMode()),this._paneWidgets.forEach(function(e){e.update()}),e||this.model().selectionMacro(function(e){e.clearSelection()})},o.prototype.isActive=function(){return this._isActive},o.prototype.trackTime=function(){return this._chartWidgetCollection.lock.trackTime},o.prototype.crossHairSyncEnabled=function(){return this._chartWidgetCollection.lock.crosshair.value()},o.prototype.isMultipleLayout=function(){return pe(this._chartWidgetCollection.layout.value())},o.prototype.id=function(){return this._guid},o.prototype.selectBarMode=function(){return this._model.model().selectBarMode()},o.prototype.toggleSelectBarMode=function(){this.selectBarMode().value()||(D.resetToCursor(!0),this._model.lineBeingCreated()&&this._model.cancelCreatingLine()),this._model.model().toggleSelectBarMode(),this.selectBarMode().value()&&this.startTrackingMode()},o.prototype.startTrackingMode=function(){var e,t;ve&&(this.exitTrackingMode(),this.updateCrossHairPositionIfNeeded(),e=this._maximizedPaneWidget||this._paneWidgets[0],t=this._model.model().crossHairSource().currentPoint(),e.startTrackingMode(t,t,new fe))},o.prototype.onBarSelected=function(){return this._model.model().onBarSelected()},o.prototype.trySetChartStyle=function(e){var t=this.model();return!!t&&(t.mainSeries().properties().style.value()===e||!!_.enabled("charting_library_base")&&(this._setChartStyle(e),!0))},o.prototype._setChartStyle=function(e){var t=this.model(),i=t.mainSeries().properties().style;t.setChartStyleProperty(i,e,"Change Series Style")},o.prototype.showReplayOrderConfirmationDialog=function(){if(!this.model().isInReplay())return Promise.resolve()},o.prototype._addPerfMark=function(e){_e("ChartWidget."+this._guid+"."+e)},o.prototype.requestFullscreen=function(){this._options.requestFullscreen()},
o.prototype.getResizerDetacher=function(){return this._options},e.exports.ChartWidget=o,e.exports.trackingModeIsAvailable=ve}).call(this,i("hY0g"),i("aIyQ"))},"Zp/P":function(e,t,i){"use strict";function n(e,t,i,n,o,r){var s,a,l,c;return Object(u.equalPoints)(e,t)?null:(s=new u.Point(0,0),a=new u.Point(i,n),o?r?(l=Object(h.intersectLineAndBox)(Object(u.lineThroughPoints)(e,t),Object(u.box)(s,a)),Array.isArray(l)?l:null):null===(c=Object(h.intersectRayAndBox)(t,e,Object(u.box)(s,a)))||Object(u.equalPoints)(t,c)?null:Object(u.lineSegment)(t,c):r?null===(c=Object(h.intersectRayAndBox)(e,t,Object(u.box)(s,a)))||Object(u.equalPoints)(e,c)?null:Object(u.lineSegment)(e,c):(l=Object(h.intersectLineSegmentAndBox)(Object(u.lineSegment)(e,t),Object(u.box)(s,a)),Array.isArray(l)?l:null))}function o(e,t,i,n){var o,r,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P=5,C=1,T=.35,x=.2,I=.5*i,L=C*C,M=Math.sqrt(1+L),A=t.subtract(e),k=A.normalized(),E=P*i;return n&&(E=Math.min(E,A.length()*T)),E*M*x<=(o=I*C)?[]:(r=k.scaled(E),s=t.subtract(r),l=C*E,c=(a=k.transposed()).scaled(l),u=s.add(c),h=s.subtract(c),d=u.subtract(t).normalized().scaled(o),p=h.subtract(t).normalized().scaled(o),_=t.add(d),f=t.add(p),m=I*(M-1),y=a.scaled(m),g=Math.min(E-I*C/M,I*M*C),v=k.scaled(g),S=t.subtract(y),b=t.add(y),[[u,_],[h,f],[S,(w=t.subtract(v)).subtract(y)],[b,w.add(y)]])}function r(e){return.3*e}function s(e){return.4*e}function a(e){return f+.5*e}function l(e){return null!==e&&void 0!==e&&!Object(p.isNaN)(e)}function c(e,t){void 0!==t&&Object(_.setLineStyle)(e,t)}var u,h,d,p,_,f;i.r(t),i.d(t,"extendAndClipLineSegment",function(){return n}),i.d(t,"getArrowPoints",function(){return o}),i.d(t,"optimalBarWidth",function(){return r}),i.d(t,"optimalHiLoWidth",function(){return s}),i.d(t,"selectionTolerance",function(){return a}),i.d(t,"coordinateIsValid",function(){return l}),i.d(t,"setValidLineStyle",function(){return c}),u=i("aO4+"),h=i("hBTJ"),d=i("qFKp"),p=i("ogJP"),_=i("jFln"),f=d.CheckMobile.any()?12:2},Zp8I:function(e,t,i){"use strict";var n,o,r,s,a,l,c;i.r(t),i.d(t,"PaneRendererStepLine",function(){return c}),n=i("VdBB"),o=i("aO4+"),r=i("jFln"),s=i("Y7w9"),a=i("GEp6"),l=i("Zp/P"),c=function(){function e(){this._data=null}return e.prototype.setData=function(e){this._data=e},e.prototype.draw=function(e){var t,i,n,o,s,a,l,c,u,h;if(null!==this._data&&0!==this._data.items.length){for(i=(t=this._data).lineWidth,n=t.lineStyle,o=t.lineColor,s=t.items,e.save(),e.lineCap="square",e.strokeStyle=o,e.lineWidth=i,i%2==0&&e.translate(-.5,-.5),void 0!==n&&Object(r.setLineStyle)(e,n),e.beginPath(),e.moveTo(s[0].x,s[0].y),a=s.length,l=0;l<a;l++)c=s[l],e.lineTo(c.x,c.y),(u=s[l+1])&&(h=Math.round((c.x+u.x)/2),e.lineTo(h,c.y),e.lineTo(h,u.y));e.stroke(),e.restore()}},e.prototype.hitTest=function(e){var t,i,r,c,u,h,d,p,_,f,m,y,g;if(null===this._data||0===this._data.items.length)return null;for(i=(t=this._data).items,r=t.lineWidth,c=Object(l.selectionTolerance)(r),u=Object(s.lowerbound)(i,e,function(e,t){return e.x<=t.x}),h=Math.max(0,u-1),d=Math.min(i.length-1,u+1),
p=h;p<d;p++)if(_=i[p],(f=i[p+1])&&(m=Math.round((_.x+f.x)/2),y=new o.Point(m,_.y),g=new o.Point(m,f.y),Math.min(Object(a.distanceToSegment)(_,y,e).distance,Object(a.distanceToSegment)(y,g,e).distance,Object(a.distanceToSegment)(g,f,e).distance)<=c))return new n.HitTestResult(n.HitTestResult.REGULAR);return null},e}()},ZtA1:function(e,t,i){"use strict";function n(e){a.call(this,e)}function o(e,t){this._constructor="LineToolTrendBasedFibExtension";var s=t||o.createProperties();r.call(this,e,s),this.version=o.version,e._trendBasedFibExtensionLabelsCache||(e._trendBasedFibExtensionLabelsCache=new n(s.fibLevelsBasedOnLogScale)),i.e("lt-pane-views").then(function(e){var t=i("6sSH").TrendBasedFibExtensionPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var r=i("Ss5c").LineDataSource,s=i("5rJj"),a=i("xUGI"),l=i("hayr").propertyPages,c=window.t("Trend-Based Fib Extension");inherit(n,a),n.prototype.levelsCount=function(){return o.LevelsCount},n.prototype.points=function(e){return[e.points()[0],e.points()[1]]},n.prototype.startPoint=function(e,t){var i,n=e.points()[2].price;return this._calculateLogLevels(e)?(i=e.ownerSource().firstValue(),{price:n,coordinate:e.priceScale().priceToCoordinate(n,i,!0)}):{price:n}},n.prototype.priceRange=function(e,t){var i,n,o,r,s=this.points(e),a=s[0],l=s[1],c=t?a.price-l.price:l.price-a.price;return this._calculateLogLevels(e)?(i=e.priceScale(),n=e.ownerSource().firstValue(),o=i.priceToCoordinate(a.price,n,!0),r=i.priceToCoordinate(l.price,n,!0),{price:c,coordinate:t?o-r:r-o}):{price:c}},n.prototype.sourceIsReady=function(e){return e.points().length>=3},inherit(o,r),o.version=2,o.LevelsCount=24,o.prototype.levelsCount=function(){return o.LevelsCount},o.prototype.stop=function(){r.prototype.stop.call(this),this._model._trendBasedFibExtensionLabelsCache.removeSource(this.id())},o.prototype.pointsCount=function(){return 3},o.prototype.title=function(){return c},o.prototype.name=function(){return"Trend-Based Fib Extension"},o.prototype.migrateVersion=function(e,t,i){1===e&&this.properties().extendLines.setValue(!0)},o.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},o.prototype.getStylesPropertyPage=function(){return l.LineToolTrendBasedFibExtensionStylesPropertyPage},o.createProperties=function(e){var t=new s("linetooltrendbasedfibextension",e,!1,{range:[0,8]});return o._configureProperties(t),t},o.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("17v9").FibDrawingsWith24LevelsDefinitionsViewModel}.bind(null,i)).catch(i.oe)},o._configureProperties=function(e){r._configureProperties(e)},o.prototype.fibLevelsBasedOnLogScale=function(){return this.properties().fibLevelsBasedOnLogScale.value()&&this.priceScale().isLog()},t.LineToolTrendBasedFibExtension=o},"Zy3/":function(e,t,i){"use strict";i.r(t),i.d(t,"CompositeRenderer",function(){return n});var n=function(){function e(){
this._renderers=[],this._globalAlpha=1}return e.prototype.setGlobalAlpha=function(e){this._globalAlpha=e},e.prototype.append=function(e){this._renderers.push(e)},e.prototype.insert=function(e,t){this._renderers.splice(t,0,e)},e.prototype.clear=function(){this._renderers.length=0},e.prototype.draw=function(e){for(var t=0;t<this._renderers.length;t++)e.save(),e.globalAlpha=this._globalAlpha,this._renderers[t].draw(e),e.restore()},e.prototype.drawBackground=function(e){var t,i;for(e.save(),e.globalAlpha=this._globalAlpha,t=0;t<this._renderers.length;t++)(i=this._renderers[t]).drawBackground&&i.drawBackground(e);e.restore()},e.prototype.hitTest=function(e){var t,i,n=null;for(t=this._renderers.length-1;t>=0;t--)null!==(i=this._renderers[t].hitTest(e))&&(null===n||i.result()>n.result())&&(n=i);return n},e.prototype.doesIntersectWithBox=function(e){return this._renderers.some(function(t){return!!t.doesIntersectWithBox&&t.doesIntersectWithBox(e)})},e}()},a7Ha:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"LineEnd",function(){return n}),function(e){e[e.Normal=0]="Normal",e[e.Arrow=1]="Arrow",e[e.Circle=2]="Circle"}(n||(n={}))},a9Kt:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><g fill="none" fill-rule="evenodd"><path stroke="currentColor" d="M13 22.5H5.5a2 2 0 0 1-2-2v-14a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2V14"/><path stroke="currentColor" stroke-linecap="square" d="M18.5 15.5v8m-4-4h8"/><path fill="currentColor" d="M7 8h11v1H7zm0 4h11v1H7zm0 4h5v1H7z"/></g></svg>'},aDyP:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolPitchfork";var i=t||n.createProperties();o.call(this,e,i),this._properties.style.listeners().subscribe(this,n.prototype._recreatePaneView),this._recreatePaneView()}var o=i("Ss5c").LineDataSource,r=i("5rJj"),s=i("7KDR").Action,a=i("hayr").propertyPages,l=i("rCHB").LineToolPitchforkStyle,c=null,u=window.t("Pitchfork");inherit(n,o),n.LevelsCount=8,n.prototype.levelsCount=function(){return n.LevelsCount},n.prototype.additionalActions=function(){var e,t,i=[],n=["Original","Modified Schiff","Inside","Schiff"];for(e=0;e<4;e++)t=new s({checked:this.properties().style.value()===e,checkable:!0,label:window.t(n[e]),payload:{target:this,value:e},onExecute:function(e){var t=e.getPayload(),i=t.target,n=t.value;i.properties().style.setValue(n),i.updateAllViews(),i._model.updateSource(i)}}),i.push(t);return[i[0],i[3],i[1],i[2]]},n.prototype._recreatePaneView=function(){if(null!==c){var e=[];this._properties.style.value()===l.Original?e=[new c.PitchforkLinePaneView(this,this._model)]:this._properties.style.value()===l.Schiff?e=[new c.SchiffPitchforkLinePaneView(this,this._model)]:this._properties.style.value()===l.Schiff2?e=[new c.SchiffPitchfork2LinePaneView(this,this._model)]:this._properties.style.value()===l.Inside&&(e=[new c.InsidePitchforkLinePaneView(this,this._model)]),this._setPaneViews(e)}else i.e("lt-pane-views").then(function(e){null===c&&(c=i("cT+B")),this._recreatePaneView()}.bind(this).bind(null,i)).catch(i.oe)},n.prototype.pointsCount=function(){
return 3},n.prototype.title=function(){return u},n.prototype.name=function(){return"Pitchfork"},n.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},n.prototype.getStylesPropertyPage=function(){return a.LineToolPitchforkStylesPropertyPage},n.createProperties=function(e){var t=new r("linetoolpitchfork",e,!1,{range:[0,8]});return n._configureProperties(t),t},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("HCdA").PitchForkDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolPitchfork=n},aILO:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolHeadAndShoulders";var r=t||n.createProperties();o.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("Fx2Q").LineToolHeadAndShouldersPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=window.t("Head and Shoulders");inherit(n,o),n.prototype.pointsCount=function(){return 7},n.prototype.title=function(){return a},n.prototype.name=function(){return"Head and Shoulders"},n.prototype.getStylesPropertyPage=function(){return s.LineToolLineTool5PointsPatternStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("EFc4").Points5PatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new r("linetoolheadandshoulders",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolHeadAndShoulders=n},aIha:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolFlagMark";var s=t||n.createProperties();r.call(this,e,s),i.e("lt-pane-views").then(function(t){var n=i("5Dp4").MarkPaneView,r=new n(this,e,this.image,25,25,-8,-21);r.setAnchors(new o(0,0)),this._setPaneViews([r])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("aO4+").Point,r=i("Ss5c").LineDataSource,s=i("Ocx9").DefaultProperty,a=window.t("Flag Mark");inherit(n,r),n.prototype.image=new Image,n.prototype.image.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAAsElEQVR4AWMYWcDExOS/YUd4hWF7+H90bNAePpO2liDwJTxyi2htyVXLvlBOWlry2bAtVIumwWXQERFF4zgJ20iPiP8JDCpLeqSuJ6ZdoRJ0SMIRx7QbQtmItgSXnGFbRCzMEnIzK8ISWgL6WzJqibGxsYaFhYUC7SxBWMQPNMjazMxMjebBZWhoKAq00NHc3FyL5nFiaWkpDTTYz8jISI/mEW9qaqoExGFgS+gFRgEAaE0hWxrw50oAAAAASUVORK5CYII=",n.prototype.pointsCount=function(){return 1},n.prototype.title=function(){return a},n.prototype.name=function(){return"Flag Mark"},n.prototype.version=2,n.createProperties=function(e){var t=new s("linetoolflagmark",e);return n._configureProperties(t),t},n._configureProperties=function(e){r._configureProperties(e)},t.LineToolFlagMark=n},aIyQ:function(e,t,i){"use strict"
;(function(e){function t(){this._listeners=[]}function n(e){return!e.singleshot}i("uOxu").getLogger("Common.Delegate");t.prototype.subscribe=function(e,t,i){var n={object:e,member:t,singleshot:!!i};this._listeners.push(n)},t.prototype.unsubscribe=function(e,t){var i,n;for(i=0;i<this._listeners.length;++i)if((n=this._listeners[i]).object===e&&n.member.prototype===t.prototype){this._listeners.splice(i,1);break}},t.prototype.unsubscribeAll=function(e){var t;for(t=this._listeners.length-1;t>=0;--t)this._listeners[t].object===e&&this._listeners.splice(t,1)},t.prototype.destroy=function(){delete this._listeners},t.prototype.fire=function(){var e,t,i,o=this._listeners;for(this._listeners=this._listeners.filter(n),e=o.length,t=0;t<e;++t)(i=o[t]).member.apply(i.object||null,arguments)},"undefined"!=typeof window&&(window.Delegate=t),e&&e.exports&&(e.exports=t)}).call(this,i("YuTi")(e))},"aO4+":function(e,t,i){"use strict";function n(e,t){return new a(e,t)}function o(e,t){return e.x===t.x&&e.y===t.y}function r(e,t,i){if(0===e&&0===t)throw new Error("A and B can not be both equal to zero.");return{A:e,B:t,C:i}}function s(e,t){return{edge:e,isPositive:t}}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){this.x=e,this.y=t}return e.prototype.add=function(t){return new e(this.x+t.x,this.y+t.y)},e.prototype.addScaled=function(t,i){return new e(this.x+i*t.x,this.y+i*t.y)},e.prototype.subtract=function(t){return new e(this.x-t.x,this.y-t.y)},e.prototype.dotProduct=function(e){return this.x*e.x+this.y*e.y},e.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.scaled=function(t){return new e(this.x*t,this.y*t)},e.prototype.normalized=function(){return this.scaled(1/this.length())},e.prototype.transposed=function(){return new e(-this.y,this.x)},e.prototype.clone=function(){return new e(this.x,this.y)},e}();t.Point=a,t.point=n,t.equalPoints=o,t.line=r,t.lineThroughPoints=function(e,t){if(o(e,t))throw new Error("Points should be distinct");return r(e.y-t.y,t.x-e.x,e.x*t.y-t.x*e.y)},t.lineSegment=function(e,t){if(o(e,t))throw new Error("Points of a segment should be distinct");return[e,t]},t.halfplane=s,t.halfplaneThroughPoint=function(e,t){return s(e,e.A*t.x+e.B*t.y+e.C>0)},t.box=function(e,t){return{min:n(Math.min(e.x,t.x),Math.min(e.y,t.y)),max:n(Math.max(e.x,t.x),Math.max(e.y,t.y))}},t.equalBoxes=function(e,t){return o(e.min,t.min)&&o(e.max,t.max)}},akof:function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"PaneRendererCircleShape",function(){return s}),n=i("mrSG"),o=i("2WC2"),r=2*Math.PI,s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._drawItemShape=function(e,t){var i=Math.max(t.width,t.height)/2,n=t.x,o=t.vertOffset,s=t.y+o;e.moveTo(n+i,s),e.arc(n,s,i,0,r,!1)},t}(o.a)},b1GK:function(e,t,i){"use strict";function n(){}function o(e){r(e),s(e)}var r,s;i.r(t),i.d(t,"addPerfMark",function(){return o}),r=console.timeStamp?console.timeStamp.bind(console):n,
s=window.performance&&performance.mark?performance.mark.bind(performance):n},bJYc:function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"SetPropertyUndoCommand",function(){return s}),n=i("mrSG"),o=i("RDU5"),r=i("Ocx9"),s=function(e){function t(t,i,n,o,r){var s=e.call(this,n)||this;return s._targetObj=t,s._newValue=i,s._oldValue=s._targetObj.value(),s._model=o,r&&s.setCustomFlag("doesnt_affect_save",!0),s}return Object(n.__extends)(t,e),t.prototype.redo=function(){Object(r.saveDefaultProperties)(!0),this._targetObj.setValue(this._newValue),Object(r.saveDefaultProperties)(!1),this._model.recalculateAllPanes(),this._model.lightUpdate()},t.prototype.undo=function(){Object(r.saveDefaultProperties)(!0),this._targetObj.setValue(this._oldValue),Object(r.saveDefaultProperties)(!1),this._model.recalculateAllPanes(),this._model.lightUpdate()},t}(o.UndoCommand)},bKFv:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"StatsPosition",function(){return n}),function(e){e[e.Left=0]="Left",e[e.Center=1]="Center",e[e.Right=2]="Right"}(n||(n={}))},bOGh:function(e,t,i){"use strict";var n,o,r;i.d(t,"a",function(){return r}),n=i("mrSG"),o=i("RDU5"),r=function(e){function t(t){var i=e.call(this,t,!1)||this;return i._subcommands=[],i}return Object(n.__extends)(t,e),t.prototype.addCommand=function(e){this._subcommands.push(e)},t.prototype.isEmpty=function(){return 0===this._subcommands.length},t.prototype.redo=function(){for(var e=0;e<this._subcommands.length;e++)this._subcommands[e].redo()},t.prototype.undo=function(){for(var e=this._subcommands.length-1;e>=0;e--)this._subcommands[e].undo()},t.prototype.commands=function(){return this._subcommands},t}(o.UndoCommand)},bSeV:function(e,t){},bTqm:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolCypherPattern";var r=t||n.createProperties();o.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("mjK7").CypherPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("NJRZ").LineTool5PointsPattern,a=window.t("Cypher Pattern");inherit(n,s),n.prototype.title=function(){return a},n.prototype.name=function(){return"Cypher Pattern"},n.createProperties=function(e){var t=new r("linetoolcypherpattern",e);return n._configureProperties(t),t},n._configureProperties=function(e){s._configureProperties(e)},t.LineToolCypherPattern=n},bc0y:function(e,t,i){},beCu:function(e,t,i){"use strict";function n(e){return new a(e)}var o,r,s,a;i.r(t),i.d(t,"doAnimate",function(){return n}),o=i("mrSG"),r=i("j1f4"),s={from:0,duration:250,easing:r.easingFunc.easeOutCubic},a=function(){function e(e){var t,i=this;this._doing=!0,this._options=Object(o.__assign)(Object(o.__assign)({},s),e),t=performance.now(),window.requestAnimationFrame(function(e){i._animation(t,i._options.from,e)})}return e.prototype.stop=function(){this._doing=!1},e.prototype._animation=function(e,t,i){var n,o,r,s,a,l,c,u,h=this;this._doing?(o=(n=(i=!i||i<1e12?performance.now():i)-e)>=this._options.duration||t===this._options.to,
l=this._options.from,c=this._options.to,u=this._options.easing(n/this._options.duration),r=l*(1-u)+c*u,a=(s=o?this._options.to:r)-t,this._options.onStep(a,s),o?this._finishAnimation():window.requestAnimationFrame(function(t){h._animation(e,s,t)})):this._finishAnimation()},e.prototype._finishAnimation=function(){this._options.onComplete&&this._options.onComplete()},e}()},biIa:function(e,t,i){"use strict";var n,o,r,s,a,l,c;i.r(t),i.d(t,"SeriesWaterlinePaneView",function(){return c}),n=i("mrSG"),o=i("aO4+"),r=i("k4w6"),s=i("//lt"),a=i("VdBB"),l=i("8Uy/"),c=function(e){function t(t){var i=e.call(this,t)||this,n={cursorType:s.PaneCursorType.VerticalResize,pressedMouseMoveHandler:function(e){var i=t.priceScale(),n=t.properties().baselineStyle,o=i.height(),r=100-e.y/o*100,s=r<0?0:Math.round(10*r)/10;n.baseLevelPercentage.setValue(Math.max(Math.min(s,100),0))}};return i._lineRenderer.setHitTest(new a.HitTestResult(a.HitTestResult.CUSTOM_MOVE,n)),i._lineRendererData.visible=!0,i._lineRendererData.linestyle=l.LINESTYLE_SPARSE_DOTTED,i}return Object(n.__extends)(t,e),t.prototype._updateImpl=function(){var e=this._series.properties().baselineStyle,t=Math.abs(100-e.baseLevelPercentage.value());this._lineRendererData.width=this._model.timeScale().width(),this._lineRendererData.height=this._series.priceScale().height(),this._lineRendererData.points=[new o.Point(0,Math.round(this._lineRendererData.height*(t/100)))],this._lineRendererData.color=e.baselineColor.value()},t}(r.a)},brCa:function(e,t,i){"use strict";function n(e){return new Promise(function(t){Promise.all([i.e("dialogs-core"),i.e(19),i.e("create-dialog")]).then(function(n){var o=i("YDhE").createDialog;t(o(Object(r.__assign)(Object(r.__assign)({},s),e)))}.bind(null,i)).catch(void 0)})}function o(e){n(e).then(function(e){return e.open()})}var r,s;i.r(t),i.d(t,"createNoticeDialog",function(){return n}),i.d(t,"showNoticeDialog",function(){return o}),r=i("mrSG"),i("YFKU"),s={width:400,destroyOnClose:!0,title:window.t("Notification"),content:window.t("You are notified"),contentWrapTemplate:'<div class="tv-dialog__section tv-dialog__section--no-border"><div class="tv-text"><p></p></div></div>',actionsWrapTemplate:'<div class="tv-dialog__section tv-dialog__section--actions tv-dialog__section--no-border">',actions:[{name:"ok",type:"primary",text:window.t("Ok"),method:"close",key:[13,32]}]}},"bv/X":function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolSineLine";var r=t||n.createProperties();o.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("piZW").SineLinePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=window.t("Sine Line");inherit(n,o),n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return a},n.prototype.name=function(){return"Sine Line"},n.prototype.getStylesPropertyPage=function(){return s.LineToolTimeCyclesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){
return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("LX4V").CyclicAndSineLinesPatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new r("linetoolsineline",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolSineLine=n},c2JX:function(e,t,i){"use strict";function n(e){return void 0===e&&(e=""),'\n\t\t<div class="tv-spinner" role="progressbar">\n\t\t\t<div class="tv-spinner__spinner-layer">\n\t\t\t\t<div class="tv-spinner__background tv-spinner__width_element"></div>\n\t\t\t\t<div class="tv-spinner__circle-clipper tv-spinner__width_element tv-spinner__circle-clipper--left"></div>\x3c!--\n\t\t\t\t--\x3e<div class="tv-spinner__circle-clipper tv-spinner__width_element tv-spinner__circle-clipper--right"></div>\n\t\t\t</div>\n\t\t</div>\n\t'}var o,r,s,a,l;i.r(t),i.d(t,"renderSpinnerTemplate",function(){return n}),i.d(t,"Spinner",function(){return l}),o=i("SzKR"),r=i("TzTt"),s=i("Owlf"),a=Object(r.parseHtmlElement)(n()),l=function(){function e(e){this._shown=!1,this._el=a.cloneNode(!0),this.setSize(e||s.a)}return e.prototype.spin=function(e){return this._el.classList.add("tv-spinner--shown"),void 0===this._container&&(this._container=e,e.appendChild(this._el)),this._shown=!0,this},e.prototype.stop=function(e){return e&&void 0!==this._container&&this._container.removeChild(this._el),this._el.classList.remove("tv-spinner--shown"),this._shown=!1,this},e.prototype.setStyle=function(e){var t=this;return Object.keys(e).forEach(function(i){var n=e[i];void 0!==n&&t._el.style.setProperty(i,n)}),this},e.prototype.setSize=function(e){var t=void 0!==e?"tv-spinner--size_"+e:"";return this._el.className="tv-spinner "+t+" "+(this._shown?"tv-spinner--shown":""),this},e.prototype.getEl=function(){return this._el},e.prototype.destroy=function(){this.stop(),delete this._el,delete this._container},e}()},cBZt:function(e,t,i){"use strict";function n(e,t){return e+"@"+t}function o(e){return e.replace(/(@[^-]+-[^-]+).*$/,"$1")}i.r(t),i.d(t,"studyIdString",function(){return n}),i.d(t,"extractStudyId",function(){return o})},cKqi:function(e,t,i){"use strict";function n(e,t){this._source=e,this._model=t,this._points=[new s(0,0)],this._lineRenderer=new C}function o(e,t){return null==e[t]}function r(e,t,i,n){this._waterlineView=null,l.call(this,e,t,i,n),this.m_data=new k(A(),o),this._formatter=null,this._paneView=null;var r=this;this.properties().minTick.listeners().subscribe(null,function(){r._recreatePriceFormattingDependencies(),r.updateAllViews(),r._model.fullUpdate()}),this.properties().style.listeners().subscribe(this,this._updateBarFunction),this.properties().lineStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this.properties().areaStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this.properties().baselineStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this._updateBarFunction(),this._quotesProvider=new V,
B&&this._quotesProvider.quotesUpdate().subscribe(this,this._onQuotesUpdate)}var s=i("aO4+").Point,a=i("qJq3").Series,l=i("GVHu").Study,c=i("k9/m").PlotRowSearchMode,u=i("FBsw").OverlayPriceAxisView,h=i("KtbP").PanePriceAxisView,d=i("x0JF"),p=d.SeriesAreaPaneView,_=d.SeriesLinePaneView,f=d.SeriesHollowCandlesPaneView,m=d.SeriesCandlesPaneView,y=d.SeriesBarsPaneView,g=d.SeriesBaselinePaneView,v=i("biIa").SeriesWaterlinePaneView,S=i("i3nr").OverlayStatusView,b=i("JjUe").OverlayDataWindowView,w=i("z8/4").OverlayLegendView,P=i("38az").SeriesBarColorer,C=i("l4sv").HorizontalLineRenderer,T=i("hayr").propertyPages,x=i("Kxc7"),I=i("6sst").OverlayStudyPriceLineAxisView,L=i("Qb4w").PriceRange,M=i("XPit").barFunction,A=i("XPit").seriesPlotFunctionMap,k=i("k9/m").PlotList,E=i("n5al").createSeriesFormatter,O=i("n5al").seriesCurrency,D=i("n5al").extractSymbolNameFromSymbolInfo,V=i("wOSo").QuotesProvider,B=i("qFKp").CheckMobile.any()&&!1,R=!x.enabled("hide_study_overlay_legend_item"),N=x.enabled("uppercase_instrument_names"),F=i("uOxu").getLogger("Chart.StudyOverlay"),W=x.enabled("study_overlay_compare_legend_option");n.prototype.update=function(){if(this._visible=!1,this._source.properties().showPriceLine.value()){var e=this._source.lastValueData(void 0,!0);e.noData||(this._visible=!0,this._points=[new s(0,e.coordinate)],this._color=e.color)}},n.prototype.renderer=function(){var e={};return e.width=this._model.timeScale().width(),e.height=this._source.priceScale().height(),e.points=this._points,e.color=this._color,e.linewidth=1,e.linestyle=CanvasEx.LINESTYLE_DOTTED,e.visible=this._visible,this._lineRenderer.setData(e),this._lineRenderer},inherit(r,l),r.prototype._showLastValueOnPriceScale=function(){return this._model.properties().scalesProperties.showSeriesLastValue.value()},r.prototype.symbol=function(){var e,t=this.properties().inputs.symbol.value(),i=this._resolvedSymbols?this._resolvedSymbols[t]:null;return e=i?i.name:t,N?e.toUpperCase():e},r.prototype.currency=function(){return O(this.symbolInfo())},r.prototype.lastValueData=function(e,t,i){var n,o,r,s,l,u,h,d,p,_,f,m,y,g={noData:!0};if(this._model.timeScale().isEmpty()||null==this.priceScale()||this.priceScale().isEmpty()||this.data().isEmpty())return g;if(null===(n=this._model.timeScale().visibleBarsStrictRange()))return g;if(!this.properties().visible.value())return g;if(null==(o=this.nearestIndex(n.lastBar(),c.NearestLeft,TradingView.OPEN_PLOT)))return g;if(s=null!==(r=this._lastNonEmptyPlotRow(TradingView.CLOSE_PLOT))&&n.contains(r.index),l=null!==r?r.value:null,null===(u=t||s?l:this.data().valueAt(o)))return g;if(h=this._barFunction(u),!isNumber(h))return g;if(d={noData:!1},i&&(d.price=h),!(p=this.firstValue()))return g;switch(d.text=this.priceScale().formatPrice(h,p),d.text=this.priceScale().formatPrice(h,p),d.formattedPriceAbsolute=this.priceScale().formatPriceAbsolute(h),d.formattedPricePercentage=this.priceScale().formatPricePercentage(h,p),d.floatCoordinate=this.priceScale().priceToCoordinate(h,p,!0),d.coordinate=Math.round(d.floatCoordinate),d.item=u,
(_=this.properties()).style.value()){case a.STYLE_BARS:d.color=u[TradingView.OPEN_PLOT]<=u[TradingView.CLOSE_PLOT]?_.barStyle.upColor.value():_.barStyle.downColor.value();break;case a.STYLE_CANDLES:case a.STYLE_HOLLOW_CANDLES:d.color=u[TradingView.OPEN_PLOT]<=u[TradingView.CLOSE_PLOT]?_.candleStyle.upColor.value():_.candleStyle.downColor.value();break;case a.STYLE_LINE:d.color=_.lineStyle.color.value();break;case a.STYLE_AREA:d.color=_.areaStyle.color1.value();break;case a.STYLE_BASELINE:f=_.baselineStyle,m=this.priceScale(),y=Math.round(m.height()*(Math.abs(100-f.baseLevelPercentage.value())/100)),d.color=d.coordinate<y?_.baselineStyle.topLineColor.value():_.baselineStyle.bottomLineColor.value()}return d},r.prototype.firstValue=function(){var e,t,i=this._model.timeScale().visibleBarsStrictRange();return null===i?null:(e=i.firstBar(),0===this.data().size()?null:null!==(t=this.data().search(e,c.NearestRight,TradingView.OPEN_PLOT))?this._barFunction(t.value):null)},r.prototype.barFunction=function(){return this._barFunction},r.prototype._updateBarFunction=function(){var e=this.priceSource()||"close";this._barFunction=M(e)},r.prototype.priceSource=function(){switch(this._properties.style.value()){case a.STYLE_LINE:return this._properties.lineStyle.priceSource.value();case a.STYLE_AREA:return this._properties.areaStyle.priceSource.value();case a.STYLE_BASELINE:return this._properties.baselineStyle.priceSource.value()}return null},r.prototype.priceRange=function(e,t){var i,n,o;if(TradingView.isInteger(e)){if(TradingView.isInteger(t))return 0===this.m_data.size()?null:(o=null!==(n=null!==(i=this.priceSource())?this.m_data.minMaxOnRangeCached(e,t,[{name:i,offset:0}]):this.m_data.minMaxOnRangeCached(e,t,[{name:"low",offset:0},{name:"high",offset:0}]))?new L(n.min,n.max):null,this._postProcessPriceRange(o));F.logDebug("priceRange: incorrect endBar")}else F.logDebug("priceRange: incorrect startBar")},r.prototype.createViews=function(){var e,t,i;switch(this._priceAxisViews=[],e=new u(this),this._priceAxisViewsBase=[e],t=new I(this),this._priceLinesAxisViews=[t],this._paneViews=[],i=null,this._properties.style.value()){case a.STYLE_BARS:i=new y(this,this._model);break;case a.STYLE_CANDLES:i=new m(this,this._model);break;case a.STYLE_HOLLOW_CANDLES:i=new f(this,this._model);break;case a.STYLE_LINE:i=new _(this,this._model);break;case a.STYLE_AREA:i=new p(this,this._model);break;case a.STYLE_BASELINE:i=new g(this,this._model),this._waterlineView=new v(this)}i&&this._paneViews.push(i),null!==this._waterlineView&&this._paneViews.push(this._waterlineView),this._paneViews.push(new n(this,this._model)),this._dataWindowView||(this._dataWindowView=new b(this,this._model)),this._legendView||(this._legendView=new w(this,this._model)),this._statusView||(this._statusView=new S(this,this._model.properties().scalesProperties.textColor)),this._priceAxisViews=[].concat(this._priceAxisViewsBase,this._hlinesPriceAsisViews,this._horizlinesPriceAsisViews),this._paneViews.push(new h(e,this,this._model))},r.prototype.barColorer=function(){
return new P(this)},r.prototype.start=function(e){this._formatter=null,l.prototype.start.apply(this,arguments),this.priceScale()&&this.priceScale().updateFormatter(),B&&this._setQuotesSymbol(this.symbol())},r.prototype._tryCreateFormatter=function(){var e=this.properties().inputs.symbol.value(),t=this._resolvedSymbols[e];return E(t,this.properties().minTick.value())},r.prototype.formatter=function(){return this._formatter||this._recreateFormatter(),this._formatter},r.prototype._tryChangeInputs=function(){l.prototype._tryChangeInputs.call(this),this.m_formatter=null,this.priceScale().updateFormatter()},r.prototype.title=function(e,t,i,n){var o=this._titleInParts(e,t,i,n),r=o.join(", ");return N?r.toUpperCase():r},r.prototype.titleInParts=function(e,t,i,n){var o=this._titleInParts(e,t,i,n),r=o.join(", ");return[N?r.toUpperCase():r]},r.prototype._titleInParts=function(e,t,i,n){var o,r=this.properties().inputs.symbol.value(),s=this._resolvedSymbols[r],a=[];return s?(W?(o=this._model.mainSeries().properties().statusViewStyle.symbolTextSource.value(),a.push("description"===o?s.description:s.name)):a.push(s.name),!n&&s.exchange&&0!==s.exchange.length&&a.push([s.exchange])):a.push(r),a},r.prototype.bars=function(){return this.m_data},r.prototype.open=function(e){return this.bars().valueAt(e)[TradingView.OPEN_PLOT]},r.prototype.high=function(e){return this.bars().valueAt(e)[TradingView.HIGH_PLOT]},r.prototype.low=function(e){return this.bars().valueAt(e)[TradingView.LOW_PLOT]},r.prototype.close=function(e){return this.bars().valueAt(e)[TradingView.CLOSE_PLOT]},r.prototype.hl2=function(e){return(this.high(e)+this.low(e))/2},r.prototype.hlc3=function(e){return(this.high(e)+this.low(e)+this.close(e))/3},r.prototype.ohlc4=function(e){return(this.open(e)+this.high(e)+this.low(e)+this.close(e))/4},r.prototype.symbolInfo=function(){if(!this._resolvedSymbols)return null;var e=this._properties.inputs.symbol.value();return e?this._resolvedSymbols[e]:null},r.prototype._onSymbolResolved=function(e){B&&this._setQuotesSymbol(e)},r.prototype._setQuotesSymbol=function(e){var t=this.symbolInfo(),i=D(t,e);this._quotesProvider.setQuotesSessionSymbol(i)},r.prototype.stop=function(e){l.prototype.stop.call(this,e),this._quotesProvider.setQuotesSessionSymbol(null)},r.prototype.quotes=function(){return this._quotesProvider.quotes()},r.prototype._onQuotesUpdate=function(e,t){this._legendView&&void 0!==t.values.prev_close_price&&(this._legendView.update(),this._model.updateSource(this))},r.prototype.destroy=function(){this._quotesProvider.quotesUpdate().unsubscribeAll(this),this._quotesProvider.destroy(),l.prototype.destroy.call(this)},r.prototype.lastPriceLabelFixedCoordinate=function(){return this._priceAxisViews[0]._fixedCoordinate},r.prototype.tags=function(){var e=[],t=this.symbolInfo();return t?e.push(t.name):this._properties.inputs.symbol.value()&&e.push(this._properties.inputs.symbol.value()),e},r.prototype.statusView=function(){return R?l.prototype.statusView.call(this):null},r.prototype._getPropertyDefinitionsViewModelClass=function(){
return Promise.all([i.e(13),i.e(47),i.e("study-property-pages-with-definitions")]).then(function(e){return i("WUYT").StudyOverlayDefinitionsViewModel}.bind(null,i)).catch(i.oe)},r.prototype.getStylesPropertyPage=function(){return T.StudyOverlayStylesPropertyPage},r.prototype.defaultPlotIdForAlert=function(){return""},r.prototype.changeStyles=function(){this.m_data.each(function(e,t){t[TradingView.STYLE_PLOT]=null}),l.prototype.changeStyles.call(this)},t.study_Overlay=r},cWHH:function(e,t,i){"use strict";(function(t,n,o){function r(e,i,o,s,h,d,p,_){var m,y,g,v,S;for(f.call(this,d),_=Object.assign({},u,_),this._options=_,this._version=r.version,this._readOnly=_.readOnly,this._studiesMetaInfoRepository=h,this._properties=o,this._modelIntervals=[],this._isSnapshot=_.isSnapshot,this._rendererOptionsProvider=new ne(this),this._lastBackgroundColor=void 0,this._lastOriginalColor=void 0,this.setStudiesMetaData(this._studiesMetaInfoRepository.getInternalMetaInfoArray(),this._studiesMetaInfoRepository.getMigrations()),this._sourcesBeingMoved=[],this._lineBeingCreated=null,this._lineBeingEdited=null,this._linePointBeingEdited=null,Y.init(),m=this,this._panes=[],this.m_gridSource=new x,y=this._readOnly?new t(G("chartproperties.paneProperties.crossHairProperties")):this._properties.paneProperties.crossHairProperties,this.m_crossHairSource=new C(this,y,_.crossHairOptions),this.m_crossHairSource.selectBarMode().subscribe(function(e){if(e&&m.lineBeingCreated()){var t=Y.tool.value();m.cancelCreatingLine(),Y.tool.setValue(t)}}),this.m_width=0,this._tagsChanged=new n,this._lineCancelled=new n,this._magnet=new I,(g=new q("chartproperties.mainSeriesProperties")).addExclusion("minTick"),g.addExclusion("priceAxisProperties.lockScale"),g.addExclusion("priceAxisProperties.percentage"),g.addExclusion("priceAxisProperties.indexedTo100"),g.addExclusion("priceAxisProperties.isInverted"),g.addExclusion("priceAxisProperties.log"),g.addExclusion("priceAxisProperties.logDisabled"),g.addExclusion("priceAxisProperties.percentageDisabled"),g.addExclusion("priceAxisProperties.autoScaleDisabled"),this._chartApi=e,this._invalidateHandler=i,g.merge(o.mainSeriesProperties.state()),this.m_mainSeries=new H(this,g,s),this._timeScale=new L(this,_.timeScale),this.createPane(void 0,{axisProperties:g.priceAxisProperties.state(["autoScale"])}),(v=this._panes[0]).setStretchFactor(2*v.stretchFactor()),v._isMainPane=!0,this._selection=new te,this._selectedSourceChanged=new n,this._properties.listeners().subscribe(this,r.prototype.propertyChangeHandler),this._properties.timezone.listeners().subscribe(null,function(){m._chartApi&&m._chartApi.connected()&&m._chartApi.switchTimezone(m.timezone())}),this._timeScale.defaultRightOffsetProperty().listeners().subscribe(null,function(){m.recalculateAllPanes()}),v.addDataSource(this.m_mainSeries,this._panes[0].findSuitableScale(this.m_mainSeries)),this._mainSeriesScaleRatioProperty=new Q(this),this.m_mainSeries.dataEvents().completed().subscribe(this,function(){if(this.crossHairSource().update(),
this._scrollingState&&this.gotoTime(),l.enabled("fix_left_edge")&&this.m_mainSeries.endOfData()){var e=this.m_mainSeries.bars().first();null!==e&&this._timeScale.setLeftEdgeFix(e.index)}}.bind(this)),this.m_mainSeries.onIntervalChanged().subscribe(this,function(){this._oldStartVisibleIndex=-1,this._oldEndVisibleIndex=-1}),this.m_mainSeries.dataEvents().barReceived().subscribe(this,r.prototype.updateTimeScaleBaseIndex),this.m_mainSeries.properties().symbol.listeners().subscribe(this,this.setPriceAutoScaleForAllMainSources),this._readOnly||(g.addChild("priceAxisProperties",this.m_mainSeries.m_priceScale.properties()),this._properties.paneProperties.legendProperties.showStudyTitles.listeners().subscribe(this,function(e){e.value()||m._properties.paneProperties.legendProperties.showStudyArguments.setValue(!1)})),this._barsMarksSources=p(this),S=0;S<this._barsMarksSources.length;S++)this._barsMarksSources[S].setOwnerSource(this.m_mainSeries);this._syncPointCache={},this._watermarkSource=_.watermarkEnabled?new T(this,this.m_mainSeries):null,this._oldStartVisibleIndex=-1,this._oldEndVisibleIndex=-1,this._currentTool="",Y.hideAllDrawings().subscribe(this,this._onDrawingsVisibilityChanged),this._properties.scalesProperties.listeners().subscribe(this,r.prototype.fullUpdate),this._id=Z.guid(),this._studyInserted=new n,this._chartThemeLoaded=new n,this._resetScales=new n,this._studyShiftColorStartOffset=void 0,this._linePointBeingEdited=null,this._lineBeingEdited=null,this._lineBeingCreated=null,ce.subscribe(this,this._updateDateTimeFormatter),this.mainSeries().properties().interval.subscribe(this,this._updateDateTimeFormatter),this._updateDateTimeFormatter(),this._sessions=null,this._studyColorRotatorFactory=new a(this),c&&this._options.esdEnabled&&this._createESDWatcher(),this._onInitialized()}var s,a,l,c,u,h=i("Eyy1").assert,d=i("Eyy1").ensureNotNull,p=i("aO4+").Point,_=i("eJTA"),f=i("gP14").ChartModelBase,m=_.parseRgb,y=_.rgbToBlackWhiteString,g=i("CW80"),v=g.createLineTool,S=g.createLineToolProperties,b=g.isLineToolName,w=g.isLineTool,P=g.isStudyLineTool,C=i("2+aH").CrossHair,T=i("rY0k").Watermark,x=i("hY3j").Grid,I=i("/jjs").Magnet,L=i("22xp").TimeScale,M=i("fTGZ").BarsMarksContainer,A=i("qFKp").CheckMobile,k=i("i1o5").InvalidateMask,E=i("i1o5").InvalidationLevel,O=i("GVHu"),D=O.Study,V=i("Qq0B").NonSeriesStudy,B=i("3ClC"),R=B.createStudy,N=B.isStudy,F=B.isFundamentalStudy,W=O.prepareStudyProperties,j=i("K4L1"),U=i("8sOK").StudyStub,z=i("k9/m").PlotRowSearchMode,H=i("qJq3").Series,Y=i("mMWL"),G=i("wZIs").defaults,q=i("Ocx9").DefaultProperty,K=i("Qtjj").TimeSynchronizer,Z=i("0waE"),J=i("uOxu").getLogger("Chart.ChartModel"),X=i("FQhm"),Q=i("Y5iK").MainSeriesScaleRatioProperty,ee=i("FaJS").scaleRatio,te=i("MROS").ModelSelection,ie=i("Y7w9").subtract,ne=i("VgjZ").PriceAxisRendererOptionsProvider,oe=i("KnF9").EnvironmentState,re=i("EsvI").getStdThemedValue,se=i("eJTA"),ae=i("/YGI").StudyInserter,le=i("PC8g").trackEvent,ce=i("ZZnO").dateFormatProperty,ue=i("KUek").Sessions,he=i("vTIA").CustomSourceLayer;X=i("FQhm"),s=i("jCNj"),
a=i("i126").StudyColorRotatorFactory,l=i("Kxc7"),c=!1,u={isSnapshot:!1,readOnly:!1,watermarkEnabled:!0,shiftVisibleRangeOnNewBar:!0},inherit(r,f),r.prototype.applyPreferences=function(e){for(var t in e)void 0!==this._properties[t]&&"m_mainSeries"!==this._properties[t]&&this._properties[t].mergeAndFire(e[t]);void 0!==e.timeScale&&this._timeScale.defaultRightOffsetProperty().setValue(e.timeScale.defaultRightOffset),this._properties.saveDefaults(),this.m_mainSeries.applyPreferences(e.mainSeries),this.sessions().applyPreferences(e.sessions),this.recalculateAllPanes(),this.fullUpdate()},r.prototype.setStudiesMetaData=function(e,t){this._studiesMetaData=e,this._studyVersioning=new j(this._studiesMetaData,t)},r.prototype.isSnapshot=function(){return this._isSnapshot},r.prototype.currentTool=function(){return this._currentTool},r.prototype.setCurrentTool=function(e){this._currentTool=e},r.prototype.timezone=function(){return this._properties.timezone.value()},r.prototype.version=function(){return this._version},r.prototype.setVersion=function(e){this._version=e},r.prototype.initConnection=function(){this._chartApi.switchTimezone(this.timezone())},r.prototype.updatePane=function(e){var t=this._paneInvalidationMask(e);this.invalidate(t)},r.prototype.fullUpdate=function(){this.invalidate(k.full())},r.prototype.lightUpdate=function(){this.invalidate(k.light())},r.prototype.studiesMetaData=function(){return this._studiesMetaData},r.prototype.studyVersioning=function(){return this._studyVersioning},r.prototype.disconnect=function(){var e,t,i;for(this.sessions().stop(),e=this.dataSources(),i=0;i<e.length;i++)(t=e[i]).disconnect&&t.disconnect()},r.prototype.restart=function(){var e,t,i;for(this.initConnection(),this._timeScale.reset(),this.m_mainSeries.restart(),e=this.dataSources(),t=0;t<e.length;t++)(i=e[t]).restart&&i!==this.m_mainSeries&&i.restart();this.sessions().restart()},r.prototype.startNotStartedStudies=function(){var e,t;if(!this.m_mainSeries.isStarted())throw new Error("Cannot start studies: main series is not started");for(e=this.dataSources(),t=0;t<e.length;t++)N(e[t])&&!e[t].isStarted()&&e[t].restart&&e[t]!==this.m_mainSeries&&e[t].restart()},r.prototype.updateLineTools=function(){var e,t,i=this.dataSources();for(e=0;e<i.length;e++)w(i[e])&&((t=i[e]).tryCreateServerPoints(),t.checkAlert&&t.checkAlert())},r.prototype.realignLineTools=function(){for(var e=0;e<this._panes.length;e++)this._panes[e].realignLineTools()},r.prototype.readOnly=function(){return this._readOnly},r.prototype.properties=function(){return this._properties},r.prototype.lineCancelled=function(){return this._lineCancelled},r.prototype.crossHairMoved=function(){return this.m_crossHairSource.moved()},r.prototype.chartApi=function(){return this._chartApi},r.prototype.isPropertyDefault=function(e,t,i){var n=re(e,i);return null!==n&&se.areEqualRgba(se.parseRgba(n),se.parseRgba(t))},r.prototype.propertyChangeHandler=function(){this.lightUpdate()},r.prototype._onDrawingsVisibilityChanged=function(e){var t,i,n,o=!1===e.value(),r=this.dataSources()
;for(t=0;t<r.length;t++)i=r[t],n=w(i)&&i.properties().visible.value(),o&&n?X.emit("drawing_event",i.id(),"show"):!o&&n&&X.emit("drawing_event",i.id(),"hide");this.selectionMacro(function(e){e.clearSelection()})},r.prototype.updateAllPaneViews=function(){var e;for(e=0;e<this._panes.length;e++)this._panes[e].updateAllViews()},r.prototype.mainSeries=function(){return this.m_mainSeries},r.prototype.timeScale=function(){return this._timeScale},r.prototype.gridSource=function(){return this.m_gridSource},r.prototype.watermarkSource=function(){return this._watermarkSource},r.prototype.crossHairSource=function(){return this.m_crossHairSource},r.prototype.publishedChartsTimelineSource=function(){return null},r.prototype.barsMarksSources=function(){return this._barsMarksSources},r.prototype.width=function(){return this.m_width},r.prototype.setPaneHeight=function(e,t){e.setHeight(t),this.recalculateAllPanes(),this.lightUpdate()},r.prototype.setWidth=function(e){var t;for(this.m_width=e,this._timeScale.setWidth(this.m_width),t=0;t<this._panes.length;++t)this._panes[t].setWidth(e);this.recalculateAllPanes(),this.recalcVisibleRangeStudy(this.dataSources())},r.prototype.priceScaleSlotsCount=function(){var e,t,i,n,o=0,r=0;return this._panes.forEach(function(e){o=Math.max(e.leftPriceScales().length,o),r=Math.max(e.rightPriceScales().length,r)}),e=o+r,A.any()?(n="right"===(i=(t=this.paneForSource(this.mainSeries())).priceScalePosition(this.mainSeries().priceScale())),"overlay"===i&&(n=t.rightPriceScales().length>0),n?{left:0,right:1,totallySlots:e}:{left:1,right:0,totallySlots:e}):{left:o,right:r,totallySlots:o+r}},r.prototype.startScalePrice=function(e,t,i){e.startScalePrice(t,i)},r.prototype.scalePriceTo=function(e,t,i){e.scalePriceTo(t,i),this.mainSeries().priceScale().isLockScale()?this.lightUpdate():this.invalidate(this._paneInvalidationMask(e,E.Light)),this._setScalesResetAvailable(!0)},r.prototype.endScalePrice=function(e,t){e.endScalePrice(t),this.invalidate(this._paneInvalidationMask(e,E.Light))},r.prototype.startScrollPrice=function(e,t,i){e.startScrollPrice(t,i)},r.prototype.scrollPriceTo=function(e,t,i){e.scrollPriceTo(t,i),this.invalidate(this._paneInvalidationMask(e,E.Light))},r.prototype.endScrollPrice=function(e,t){e.endScrollPrice(t),this.invalidate(this._paneInvalidationMask(e,E.Light))},r.prototype.setPriceAutoScale=function(e,t,i){e.setPriceAutoScale(t,i),this.invalidate(this._paneInvalidationMask(e,E.Light))},r.prototype.restorePriceScaleState=function(e,t,i){e.restorePriceScaleState(t,i),this.invalidate(this._paneInvalidationMask(e,E.Light))},r.prototype.resetPriceScale=function(e,t){this._setScalesResetAvailable(!1),e.resetPriceScale(t),this.invalidate(this._paneInvalidationMask(e,E.Light))},r.prototype.updateScales=function(e,t){this._undoModel._chartWidget._updateScalesActions()},r.prototype.startScaleTime=function(e){this._timeScale.startScale(e)},r.prototype.mainSeriesScaleRatioProperty=function(){return this._mainSeriesScaleRatioProperty},r.prototype.mainSeriesScaleRatioPropertyOnChanged=function(){
this._mainSeriesScaleRatioProperty.listeners().fire(this._mainSeriesScaleRatioProperty)},r.prototype.mainSeriesScaleRatio=function(){return ee(this._timeScale,this.m_mainSeries.priceScale())},r.prototype.setMainSeriesScaleRatio=function(e){this.paneForSource(this.m_mainSeries).applyPriceScaleRatio(this.m_mainSeries.priceScale(),e)},r.prototype.scaleTimeTo=function(e){this._timeScale.scaleTo(e),this.recalculateAllPanes(),this.lightUpdate(),this._setScalesResetAvailable(!0)},r.prototype.endScaleTime=function(){this._timeScale.endScale(),this.lightUpdate(),this.mainSeries().requestMoreData(),this.recalcVisibleRangeStudy(this.dataSources())},r.prototype.startScrollTime=function(e){this._timeScale.startScroll(e),this._isTimeScrolling=!0},r.prototype.scrollTimeTo=function(e){this._timeScale.scrollTo(e),this.recalculateAllPanes(),this.updateCrossHair(),this.lightUpdate(),this._setScalesResetAvailable(!0)},r.prototype.endScrollTime=function(){this._timeScale.endScroll(),this.lightUpdate(),this.mainSeries().requestMoreData(),this.recalcVisibleRangeStudy(this.dataSources()),this._isTimeScrolling=!1},r.prototype.recalcStudyBasedLineTools=function(){this.dataSources().forEach(function(e){P(e)&&e.recalcStudyIfNeeded&&e.recalcStudyIfNeeded()})},r.prototype.recalcVisibleRangeStudy=function(e,t){void 0!==this._recalcVRTimerId&&clearTimeout(this._recalcVRTimerId);var i=this;this._recalcVRTimerId=setTimeout(function(){i._recalcVisibleRangeStudy(e,t)},500)},r.prototype._recalcVisibleRangeStudy=function(e,t){var i,n,o,r,s,a,l,c,u,h,d,p,_,f,m,y;if(!this.timeScale().isEmpty()&&(i=this.timeScale().visibleBarsStrictRange(),n=this.mainSeries().nearestData(i.firstBar(),z.NearestRight),o=this.mainSeries().nearestData(i.lastBar(),z.NearestLeft),r=this.mainSeries().bars().lastIndex(),s=n?n.index:void 0,a=o?o.index:void 0,l=s===this._oldStartVisibleIndex,c=a===this._oldEndVisibleIndex,!l||!c||t))for(this._oldStartVisibleIndex=s,this._oldEndVisibleIndex=a,u={first_visible_bar_time:1e3*Math.floor(n&&n.value?n.value[TradingView.TIME_PLOT]:0),last_visible_bar_time:1e3*Math.floor(o&&o.value?o.value[TradingView.TIME_PLOT]:0),subscribeRealtime:o&&o.index===r},h=0;h<e.length;h++)if(N(e[h])){for(p=(d=e[h]).metaInfo().inputs,_=[],f=0;f<p.length;f++)u.hasOwnProperty(p[f].id)&&_.push(p[f].id);for(m=d.properties().inputs,f=0;f<_.length;f++)m[y=_[f]].setValueSilently(u[y]);_.length>0&&m.listeners().fire(m)}},r.prototype.onResetScales=function(){return this._resetScales},r.prototype.resetTimeScale=function(){this._timeScale.restoreDefault(),this.recalculateAllPanes(),this.mainSeries().requestMoreData(),this.recalcVisibleRangeStudy(this.dataSources()),this.updateCrossHair(),this.lightUpdate(),this._resetScales.fire(),this._setScalesResetAvailable(!1)},r.prototype.restoreTimeScaleState=function(e){this._timeScale.restoreState(e),this.recalculateAllPanes(),this.updateCrossHair(),this.lightUpdate(),this._setScalesResetAvailable(!0)},r.prototype.restoreFactoryDefaults=function(e){e.restoreFactoryDefaults(),this.recalcVisibleRangeStudy(this.dataSources(),!0)},
r.prototype.selectionMacro=function(e){var t,i,n=this.selection().sources();e({removeSourceFromSelection:function(e){this._selection.remove(e)}.bind(this),addSourceToSelection:function(e,t){var i=this._selection.isSelected(e);i&&this._lastHittestData===t||e&&e.customization&&e.customization.disableSelection||(this._lastHittestData=t,i||this._selection.add(e))}.bind(this),clearSelection:function(){this._selection.clear()}.bind(this),selection:this.selection.bind(this)}),t=ie(n,this.selection().sources()),(i=ie(this.selection().sources(),n)).concat(n).forEach(function(e){e.updateAllViews()}),TradingView.alertsDispatcher&&(t.filter(function(e){return e.hasAlert&&e.hasAlert.value()}).forEach(function(e){e.getAlert({fromCache:!0}).done(function(e){e&&e.set("selected",!1)})}),i.forEach(function(e){e.hasAlert&&e.hasAlert.value()&&e.getAlert({fromCache:!0}).done(function(e){e&&e.set("selected",!0)})})),this.lightUpdate(),this.setHoveredSource(null),(t.length>0||i.length>0)&&this._selectedSourceChanged.fire()},r.prototype.checkLineToolSelection=function(){this._selection.checkLineToolSelection()},r.prototype.onSelectedSourceChanged=function(){return this._selectedSourceChanged},r.prototype.selection=function(){return this._selection},r.prototype.invalidate=function(e){this._invalidateHandler&&this._invalidateHandler(e)},r.prototype.dataSources=function(){var e,t,i,n=[];for(n.push(this.m_crossHairSource),e=0;e<this._panes.length;++e)for(t=this._panes[e].dataSources(),i=0;i<t.length;i++)n.push(t[i]);return n},r.prototype.orderedDataSources=function(e){var t,i,n=[];for(n.push(this.m_crossHairSource),t=0;t<this._panes.length;t++)i=this._panes[t].orderedSources().slice(),e&&i.reverse(),n=n.concat(i);return n},r.prototype.dataSourceForId=function(e){var t,i;for(i=0;i<this._panes.length;++i)if(t=this._panes[i].dataSourceForId(e))return t;return null},r.prototype.children=function(e,t){return this.dataSources().filter(function(i){return(!0!==t||!N(i)||!i.isChildStudy())&&i.ownerSource()===e})},r.prototype.setAndSaveCurrentPosition=function(e,t,i,n){this.m_crossHairSource.saveOriginCoord(e,t),this.setCurrentPosition(e,t,i,n)},r.prototype.setCurrentPosition=function(e,t,i,n){var o,r,s,a,l,c,u,h,d,p,_,f,m,y,g,v=NaN,S=Math.round(this._timeScale.coordinateToIndex(e));if(i&&((o=i.defaultPriceScale()).isEmpty()||(r=i.mainDataSource().firstValue(),v=o.coordinateToPrice(t,r))),this._isSettingsExternalPosition||!this._lineBeingCreated&&!b(this.currentTool())||(v=this._magnet.align(v,S,i)),this._isTimeScrolling)this.m_crossHairSource.setPosition(this.m_crossHairSource.index,v,i);else{for(this.m_crossHairSource.setOnHoveredChartWidget(!0),this.m_crossHairSource.setPosition(S,v,i),this.m_crossHairSource.dataWindowView().update(),a=(s=this._panes).length;a--;)for(c=(l=s[a].dataSources()).length;c--;)(u=l[c].dataWindowView())&&u.update(),(h=l[c].legendView())&&h.update();this._lineBeingCreated?this._isSettingsExternalPosition||(this._lineBeingCreated.setLastPoint({index:S,price:v},n),this._lineBeingCreated.updateAllViews(),this.lightUpdate(),
d=this._lineBeingCreated.lastPoint(),p=this.mainSeries().syncModel(),_=this._timeScale.points().roughTime(d.index,p.projectTime.bind(p)),Y.setLineToolLastPoint({model:this,linkKey:this._lineBeingCreated.linkKey,symbol:this.mainSeries().symbol(),point:{timeStamp:_,price:d.price}})):this.crossHairSource().startMeasurePoint()?this.lightUpdate():this.invalidate(k.cursor()),this._isSettingsExternalPosition||(f=this._undoModel._chartWidget)._chartWidgetCollection&&(p=this.mainSeries().syncModel())&&(m={timeStamp:_=this._timeScale.points().roughTime(S,p.projectTime.bind(p))},(y=i.mainDataSource())instanceof H&&(m.price=v,m.symbol=y.symbol()),m.syncModel=p,g=(g=this._lineBeingCreated||null!==this._linePointBeingEdited||this._sourcesBeingMoved.length)&&Y.drawOnAllCharts().value(),f._chartWidgetCollection.syncCrosshair(m,f,g,n))}},r.prototype.clearCurrentPosition=function(){var e,t,i,n,o,r,s,a=this.crossHairSource();for(a.clearPosition(),a.dataWindowView().update(),t=(e=this._panes).length;t--;)for(n=(i=e[t].dataSources()).length;n--;)(o=i[n].dataWindowView())&&o.update(),(r=i[n].legendView())&&r.update();this.invalidate(k.cursor()),(s=this._undoModel._chartWidget)._chartWidgetCollection&&s._chartWidgetCollection.syncCrosshair(NaN,s)},r.prototype.onSyncScrollNeeded=function(e){var t,i,n=this._undoModel._chartWidget;n._chartWidgetCollection&&(t=this.mainSeries().syncModel())&&(i=1e3*this._timeScale.points().roughTime(e,t.projectTime.bind(t)),n._chartWidgetCollection.syncScroll(i,this))},r.prototype.syncTimeWithModel=function(e,t){var i,n,o,r=this.mainSeries(),a=r.syncModel();null!==a&&(i=1e3*this.createSyncPoint(e.mainSeries().syncModel(),a).sourceTimeToTargetTime(t/1e3),n=s.get_timezone(this.timezone()),o=s.utc_to_cal(n,i).getTime(),this._gotoTimeImpl(o,{centerIfVisible:!1}))},r.prototype.gotoTime=function(e){return this._gotoTimeImpl(e,{centerIfVisible:!0})},r.prototype._gotoTimeImpl=function(e,t){var i,n,o,r,s,a,l=this.timeScale(),c=this.mainSeries();if(void 0!==e)this._scrollingState&&this._scrollingState.deferred.reject(),i=$.Deferred(),this._scrollingState={targetDate:e,deferred:i,centerIfVisible:t.centerIfVisible};else{if(!this._scrollingState)return J.logError("scrollTo called without an argument"),$.Deferred().reject().promise();e=this._scrollingState.targetDate,i=this._scrollingState.deferred}return(n=function(t){var i,n,o,r,s;if(l.tickMarks().indexToTime(l.tickMarks().minIndex).valueOf()-e<0){for(i=l.tickMarks().nearestIndex(e),n=d(c.bars().lastIndex()),i=Math.min(i,n),o=l.tickMarks().indexToTime(i).valueOf();o<e&&i<n;)i++,o=l.tickMarks().indexToTime(i).valueOf();return s=(r=l.visibleBarsStrictRange()).lastBar()-r.firstBar(),!t&&r.contains(i)||(l.zoomToBarsRange(i-s/2,i+s/2),c.requestMoreData()),{timestamp:l.indexToTimePoint(i)}}}(this._scrollingState.centerIfVisible))||(o=l.tickMarks().minIndex,s=(r=l.visibleBarsStrictRange()).lastBar()-r.firstBar(),c.endOfData()?(l.zoomToBarsRange(o-s/2,o+s/2),n={timestamp:l.indexToTimePoint(o),eod:!0}):(a=this.timeScale().tickMarks().estimateLeft(e),
c.requestMoreData(Math.ceil(a+s/2)))),n&&(this.fullUpdate(),this._scrollingState=null,i.resolve(n)),i.promise()},r.prototype.createSyncPoint=function(e,t){var i,n,o=this._syncPointCache[e.uniqueId()];if(o){if(i=o[t.uniqueId()])return i}else this._syncPointCache[e.uniqueId()]={};return n=new K(e,t),this._syncPointCache[e.uniqueId()][t.uniqueId()]=n,n},r.prototype.setExternalPosition=function(e,t){var i,n,o,r,s,a,l,c,u,h,d,p=this.crossHairSource();if(p.setOnHoveredChartWidget(!1),!Number.isNaN(e)&&isNumber(e.timeStamp)&&(n=this.mainSeries().syncModel())&&(o=this.createSyncPoint(e.syncModel,n).sourceTimeToTargetTime(e.timeStamp),i=this._timeScale.points().roughIndex(o,n.distance.bind(n))),isFinite(i)&&isFinite(e.price))return this._isSettingsExternalPosition=!0,r=this.paneForSource(this.mainSeries()),s=this._timeScale.indexToCoordinate(i),a=r.mainDataSource().firstValue(),l=this.mainSeries().priceScale().priceToCoordinate(e.price,a,!0),this.setCurrentPosition(s,l,r,t||new oe),p.setOnHoveredChartWidget(!1),void delete this._isSettingsExternalPosition;for(isFinite(i)?p.setPosition(i,NaN,null):(p.clearPosition(),p.dataWindowView().update()),u=(c=this.dataSources()).length;u--;)(h=c[u].dataWindowView())&&h.update(),(d=c[u].legendView())&&d.update();this.invalidate(k.cursor())},r.prototype.updateCrossHair=function(){this.m_crossHairSource.update()},r.prototype.updateTimeScale=function(e,t,i,n,o,r){var s,a,l;if(r)for(this._timeScale.reset(),s=this.dataSources(),a=0;a<s.length;a++)s[a].clearData&&s[a].clearData();if(n.length>0)for(s=this.dataSources(),a=0;a<s.length;a++)s[a].moveData&&s[a].moveData(n);this._timeScale.update(e,t,i,o),l="ChartModel.prototype.updateTimeScale("+e+","+t+","+i.length+","+n.length+","+o.length+","+r+")",l+="TimeScale: {first:"+this._timeScale.points().firstIndex()+",last:"+this._timeScale.points().lastIndex()+"}",J.logDebug(l),this.recalculateAllPanes(),this.lightUpdate()},r.prototype.updateTimeScaleBaseIndex=function(e){var t,i,n,o,r,s,a,l,c,u=this.mainSeries().bars();u.isEmpty()||(i=(t=this.timeScale()).baseIndex(),n=d(u.lastIndex()),o=t.visibleBarsStrictRange(),null!==(r=t.logicalRange())&&(s=r.contains(i),e&&e.index>0&&(a=n-i,l=s?null:t.rightOffset()-a,!this._options.shiftVisibleRangeOnNewBar&&s&&((c=t.width()/(r.length()+a))>=t.minBarSpacing()?(t.setBarSpacing(c),l=t.rightOffset()+a):o.lastBar()!==i&&(l=t.rightOffset()-a)),null!==l&&t.setRightOffset(l))),t.setBaseIndex(n))},r.prototype.recalculatePane=function(e){e&&e.recalculate()},r.prototype.paneForSource=function(e){for(var t=this._panes.length-1;t>=0;t--)if(-1!==this._panes[t].dataSources().indexOf(e))return this._panes[t];return e instanceof M?this.paneForSource(this.m_mainSeries):null},r.prototype.recalculateAllPanes=function(){for(var e=0;e<this._panes.length;++e)this._panes[e].recalculate();this.updateAllPaneViews(),this.crossHairSource().updateAllViews()},r.prototype._invalidateBarColorerCaches=function(){var e,t,i=this.dataSources();for(e=0;e<i.length;++e)(t=i[e])instanceof H&&t.invalidateBarColorerCache()},
r.prototype.createStudyInserter=function(e){return new ae(e,this._studiesMetaInfoRepository,{createStudy:this.insertStudyWithParams.bind(this)})},r.prototype.insertStudyWithParams=function(e,t,i,n,o,r,s,a,l){var c,u,h,d,p,_;return null!==r&&void 0!==r||(r=this.mainSeries()),c=null,o||void 0===e.groupingKey||null!==(u=this.findNonOverlayStudyWithGroupingKey(e.groupingKey))&&(c=u.pane),null===c&&(o||e.is_price_study?c=this.paneForSource(r):(c=this.createPane(),void 0!==a&&c.setPaneSize(a))),"Compare@tv-basicstudies"===e.id&&this.m_mainSeries.priceScale().setMode({log:!1,percentage:!0}),h=Object.assign({},n,{inputs:t}),d=W(e,h,c,this.studyVersioning(),r),p=R(this,d,r,e,l),this._recalcVisibleRangeStudy([p],!0),p.start(),_=c.findSuitableScale(p,r,s),null!==i&&c.id()===i.paneId?c.insertDataSource(p,_,i.zorder):c.addDataSource(p,_),p.properties().linkedToSeries&&p.properties().linkedToSeries.value()&&p.setOwnerSource(this.mainSeries()),this.recalculatePane(c),this.fullUpdate(),this._invalidateBarColorerCaches(),this.recalcVisibleRangeStudy(this.dataSources(),!0),this._studyInserted.fire(p),p},r.prototype.studyInserted=function(){return this._studyInserted},r.prototype.insertStudyStub=function(e){var t=this.mainSeries(),i=this.paneForSource(t),n=new U(this,null,e),o=i.createPriceScaleAtPosition("overlay");return i.addDataSource(n,o),this.recalculatePane(i),this.fullUpdate(),n},r.prototype.removeStudyStub=function(e){var t=this.dataSourceForId(e);return null===t?(J.logNormal("StudyStub id="+e+" is not found in chart model"),!1):(this.removeSource(t),!0)},r.prototype.detachSource=function(e,t){var i=this.paneForSource(e);if(i)return i.removeDataSource(e),i.isEmpty()?(this._lineBeingCreated&&i===this._paneBeingCreatedLineOn&&this.cancelCreatingLine(),this.removePane(i,t),!0):(this.fullUpdate(),this._alertsList&&this._alertsList.trigger("reset"),!1)},r.prototype.removeSource=function(e,t){var i,n,o;if(this.selectionMacro(function(t){t.removeSourceFromSelection(e)}),this._sourcesBeingMoved.includes(e)&&(this._sourcesBeingMoved=this._sourcesBeingMoved.filter(function(t){return t!==e}),this._sourcesBeingMoved.length||(this._linePointBeingMoved=null)),e===this._lineBeingEdited&&(this._lineBeingEdited=null,Y.isToolEditingNow.setValue(!1)),e===this._lineBeingCreated&&(this._lineBeingCreated=null),e.stop&&e.stop(),i=this.detachSource(e,t),e.metaInfo&&e.metaInfo()&&"Compare@tv-basicstudies"===e.metaInfo().id){for(n=this.paneForSource(this.m_mainSeries).dataSources(),o=0;o<n.length;o++)if(n[o].metaInfo&&"Compare@tv-basicstudies"===n[o].metaInfo().id)return;this.m_mainSeries.priceScale().setMode({percentage:!1})}return this.fullUpdate(),this._invalidateBarColorerCaches(),N(e)&&(X.emit("study_event",e.id(),"remove"),e.isChildStudy()&&e.source().unsetChild(e)),e.destroy&&e.destroy(),w(e)&&X.emit("drawing_event",e.id(),"remove"),i},r.prototype._unmergeAvailable=function(e){return e===this.m_mainSeries||TradingView.isInherited(e.constructor,D)&&!e.isLinkedToSeries()&&!TradingView.isInherited(e.constructor,V)&&e.showInObjectTree()},
r.prototype.isMergeUpAvailableForSource=function(e){return!!this._unmergeAvailable(e)&&this.paneForSource(e)!==this.panes()[0]},r.prototype.isMergeDownAvailableForSource=function(e){var t;return!!this._unmergeAvailable(e)&&this.paneForSource(e)!==(t=this.panes())[t.length-1]},r.prototype.isUnmergeAvailableForSource=function(e){return!!this._unmergeAvailable(e)&&this.paneForSource(e).dataSources().filter(this._unmergeAvailable,this).length>1},r.prototype.createLineTool=function(e,t,i,n,o,r){var s,a,l,c,u,h,d,_;return b(i)?("LineToolExecution"!==i&&le("drawings","Study_Drawing_"+i),n&&(s=n.state(),n=S(i,s)),a=v(i,this,n,null),n||(n=a.properties()),l=!a.linkKey&&!o,Y.drawOnAllCharts().value()?a.linkKey=o||Z.randomHash():a.linkKey=o,a.toolname=i,a.setOwnerSource(r||e.mainDataSource()),c=e.defaultPriceScale(),e.addDataSource(a,c),a.isFixed()?(h=e.mainDataSource().firstValue(),d=this._timeScale.indexToCoordinate(t.index),_=c.priceToCoordinate(t.price,h),u=a.addFixedPoint(new p(d,_))):u=a.addPoint(t),u||(this._lineBeingCreated=a,this._paneBeingCreatedLineOn=e),l&&a.enableCurrentIntervalVisibility(),this.fullUpdate(),a):null},r.prototype.lineBeingCreated=function(){return this._lineBeingCreated},r.prototype.paneBeingCreatedLineOn=function(){return this._paneBeingCreatedLineOn},r.prototype.coninueCreatingLine=function(e,t,i,n){var o,r=this._lineBeingCreated.addPoint(e,t,i);return this._lineBeingCreated.updateAllViews(),o=new k(E.Light),r&&(this._paneBeingCreatedLineOn=null,this._lineBeingCreated=null),this.invalidate(o),r},r.prototype.cancelCreatingLine=function(){if(this._lineBeingCreated){var e=this._lineBeingCreated;this.removeSource(this._lineBeingCreated),this._lineBeingCreated=null,this._lineCancelled.fire(),Y.drawOnAllCharts().value()&&!e.properties().singleChartOnly&&Y.cancelLineTool({model:this})}},r.prototype.startChangingLinetool=function(e,t,i,n){var o,r,s;this._lineBeingEdited=e,Y.isToolEditingNow.setValue(!0),this._linePointBeingEdited=i,this._lineBeingEdited.startChanging(i,t),o=this.paneForSource(e),this._lineBeingEdited.startDragPoint&&this._lineBeingEdited.startDragPoint(i,t),this._lineBeingEdited.setPoint(i,t,n),this._lineBeingEdited.updateAllViews(),(r=this._paneInvalidationMask(o,E.Light)).force=!0,this.invalidate(r),e.linkKey&&!e.properties().singleChartOnly&&(s=this.externalTimeStamp(t.index),Y.startChangingLineTool({linkKey:e.linkKey,model:this,symbol:this.mainSeries().symbol(),point:{price:t.price,timeStamp:s},pointIndex:i,envState:n}))},r.prototype.lineBeingEdited=function(){return this._lineBeingEdited},r.prototype.linePointBeingEdited=function(){return this._linePointBeingEdited},r.prototype.changeLinePoint=function(e,t){var i,n,o,r,s,a=this.paneForSource(this._lineBeingEdited);void 0!==e.x&&void 0!==e.y?(o=this._lineBeingEdited.priceScale(),r=a.mainDataSource().firstValue(),i=o.coordinateToPrice(e.y,r),n=Math.round(this.timeScale().coordinateToIndex(e.x)),i=this._magnet.align(i,n,a),this._lineBeingEdited.setPoint(this._linePointBeingEdited,{price:i,index:n
},t)):this._lineBeingEdited.setPoint(this._linePointBeingEdited,e,t),this._lineBeingEdited.updateAllViews(),this.lightUpdate(),this._lineBeingEdited.linkKey&&!this._lineBeingEdited.properties().singleChartOnly&&(s=this.externalTimeStamp(n),Y.changeLineTool({linkKey:this._lineBeingEdited.linkKey,model:this,symbol:this.mainSeries().symbol(),point:{price:i,timeStamp:s},envState:t}))},r.prototype.endChangingLinetool=function(e){var t,i=this._lineBeingEdited;this._lineBeingEdited.endChanging(!1,e),this._lineBeingEdited=null,Y.isToolEditingNow.setValue(!1),this._linePointBeingEdited=null,this.lightUpdate(),t={points:i._timePoint,interval:this.mainSeries().interval()},i.linkKey&&!i.properties().singleChartOnly&&Y.finishChangingLineTool({model:this,linkKey:i.linkKey,symbol:this.mainSeries().symbol(),finalState:t})},r.prototype.startMovingSources=function(e,t,i,n){var o,r,s;this._sourcesBeingMoved=e,this._linePointBeingMoved=i,o=this,this._sourcesBeingMoved.forEach(function(e){var r,s;e.startMoving(t,i,n),r=o.paneForSource(e),(s=o._paneInvalidationMask(r,E.Light)).force=!0,o.invalidate(s)}),(r=e.filter(function(e){return e.linkKey&&!e.properties().singleChartOnly}).map(function(e){return e.linkKey})).length&&(s=o.externalTimeStamp(t.logical.index),Y.startMovingLineTool({linkKeys:r,model:o,symbol:o.mainSeries().symbol(),point:{price:t.logical.price,timeStamp:s},envState:n}))},r.prototype.sourcesBeingMoved=function(){return this._sourcesBeingMoved},r.prototype.moveSources=function(e,t){var i,n,o=this;this._sourcesBeingMoved.filter(function(e){return!e.isLocked||!e.isLocked()}).forEach(function(i){i.move(e,o._linePointBeingMoved,t)}),this.lightUpdate(),i=this._sourcesBeingMoved.filter(function(e){return!e.properties().singleChartOnly&&!!e.linkKey}).map(function(e){return e.linkKey}),n=o.externalTimeStamp(e.logical.index),Y.moveLineTool({linkKeys:i,model:o,point:{price:e.logical.price,timeStamp:n},envState:t})},r.prototype.endMovingSources=function(e){var t,i,n=this;this._sourcesBeingMoved.forEach(function(t){var i,o=n.paneForSource(t);t.endMoving(e),(i=n._paneInvalidationMask(o,E.Light)).invalidateAll(E.Light),i.force=!0,n.invalidate(i)}),t=this._sourcesBeingMoved.filter(function(e){return!e.properties().singleChartOnly&&!!e.linkKey}).map(function(e){return e.linkKey}),i=this._sourcesBeingMoved.filter(function(e){return!e.properties().singleChartOnly&&!!e.linkKey}).map(function(e){return{points:e._timePoint,interval:n.mainSeries().interval()}}),t.length&&Y.finishMovingLineTool({linkKeys:t,model:n,finalStates:i}),this._sourcesBeingMoved=[],this._linePointBeingMoved=null},r.prototype.finishLineTool=function(e){var t=this.lineBeingCreated();t&&(t.finish&&t.finish(),!e&&Y.drawOnAllCharts().value()&&t.linkKey&&!t.properties().singleChartOnly&&Y.finishLineTool({linkKey:t.linkKey,model:this}))},r.prototype.calculateDefaultTags=function(){var e,t,i=[],n=this.dataSources();for(e=0;e<n.length;e++)(t=n[e]).tags&&(i=i.concat(t.tags()));return i},r.prototype.changeZOrder=function(e,t){this.paneForSource(e).changeZOrder(e,t),this.fullUpdate()
},r.prototype._sendTo=function(e,t){var i,n={},o=this;for(i in e.forEach(function(e){var t=o.paneForSource(e),i=o._panes.indexOf(t);n[i]||(n[i]=[]),n[i].push(e)}),n)t(o._panes[i],n[i]);this.fullUpdate()},r.prototype.sendToBack=function(e){this._sendTo(e,function(e,t){e.sendToBack(t)})},r.prototype.bringToFront=function(e){this._sendTo(e,function(e,t){e.bringToFront(t)})},r.prototype.setTimeViewport=function(e,t){this.timeScale().zoomToBarsRange(e,t),this.recalculateAllPanes(),this.lightUpdate()},r.prototype.zoomToViewport=function(e,t,i,n,r){var s,a,l;this.setTimeViewport(e,t),s=Math.min(i,n),a=Math.max(i,n),(l=r.defaultPriceScale()).isPercentage()||l.setMode({autoScale:!1}),l.isLog()&&(s=l.priceToLogical(s),a=l.priceToLogical(a)),l.setPriceRange(new o(s,a)),this.recalculateAllPanes(),this.invalidate(this._paneInvalidationMask(r,E.Light)),this._setScalesResetAvailable(!0)},r.prototype.clearAllStudies=function(){var e,t=this.dataSources();for(e=0;e<t.length;e++)t[e].clearData&&t[e].clearData()},r.prototype.allStudies=function(){return this._getAllSources(function(e){return N(e)})},r.prototype.allLineTools=function(){return this._getAllSources(w)},r.prototype.getStudyById=function(e){var t=this.dataSourceForId(e);return null!==t&&N(t)?t:null},r.prototype.getLineToolById=function(e){var t=this.dataSourceForId(e);return null!==t&&w(t)?t:null},r.prototype._getAllSources=function(e){var t,i,n,o,r,s=[],a=this._panes,l=a.length;for(t=0;t<l;++t)for(n=(i=a[t].orderedSources()).length,o=0;o<n;++o)e(r=i[o])&&s.push(r);return s},r.prototype.getStudyById=function(e){var t=this.dataSourceForId(e);return t instanceof D?t:null},r.prototype.backgroundColor=function(){return this._properties.paneProperties.background._value},r.prototype.backgroundCounterColor=function(){var e,t=this.backgroundColor();return void 0!==this._lastBackgroundColor&&void 0!==this._lastOriginalColor&&t===this._lastBackgroundColor||(e=y(m(t),150),this._lastBackgroundColor=t,this._lastOriginalColor="black"===e?"white":"black"),this._lastOriginalColor},r.prototype.isDark=function(){return"white"===this.backgroundCounterColor()},r.prototype.updateAllVolumeStudies=function(){var e,t,i,n,o,r,s=this._panes;for(e=s.length;e--;)for(t=!1,o=(n=(i=s[e]).dataSources()).length;o--;)r=n[o],N(r)&&"Volume"===r.metaInfo().shortId&&(r.updateAllViews(),t||(this.updatePane(i),t=!0))},r.prototype.alertsList=function(){return this._alertsList},r.prototype.setInterval=function(e,t){var i=setInterval(e,t);return this._modelIntervals.push(i),i},r.prototype.clearInterval=function(e){clearInterval(e);var t=this._modelIntervals.indexOf(e);t>-1&&this._modelIntervals.splice(t,1)},r.prototype.clearIntervals=function(){for(var e=0;e<this._modelIntervals.length;e++)clearInterval(this._modelIntervals[e]);this._modelIntervals=[]},r.prototype.destroy=function(){var e;for(e=0;e<this._barsMarksSources.length;e++)this._barsMarksSources[e].destroy();for(this.clearIntervals(),Y.hideAllDrawings().unsubscribe(this,this._onDrawingsVisibilityChanged),this.resetDeferredStudies(),
e=0;e<this._barsMarksSources.length;e++)this._barsMarksSources[e].destroy();for(e=0;e<this._panes.length;e++)this._panes[e].destroy();this._panes.length=0,this._sessions=null,this._timeScale.destroy(),ce.unsubscribe(this,this._updateDateTimeFormatter),this.mainSeries().properties().interval.unsubscribe(this,this._updateDateTimeFormatter),f.prototype.destroy.call(this)},r.prototype.countUserStudies=function(e){var t,i,n,o,r,s,a=0;for(e=e||{},t=0;t<this._panes.length;t++)for(i=this._panes[t].dataSources(),n=0;n<i.length;n++)if(o=i[n],N(o)&&!F(o)&&o.showInObjectTree()){if(r=o.metaInfo&&o.metaInfo()){if(s=r.id,e.dontCountVolume&&"Volume@tv-basicstudies"===s)continue;if(e.dontCountCompare&&"Compare@tv-basicstudies"===s)continue;if(e.dontCountOverlay&&"Overlay@tv-basicstudies"===s)continue}a++}return a},r.prototype.isJustClonedChart=function(){return this._undoModel.isJustClonedChart()},r.prototype.undoModel=function(){return this._undoModel},r.prototype.copyToOtherCharts=function(e){var t=this;e.forEach(function(e){var i;e.linkKey=e.linkKey||Z.randomHash(),i=e.state(),t.mainSeries().syncModel()&&(i.points=e._timePoint.map(function(e){var i=t.timeScale().timePointToIndex(e.time_t)+e.offset;return{price:e.price,timeStamp:t.externalTimeStamp(i)}}),i.linetool=e.getType(),i.model=t,i.symbol=t.mainSeries().symbol(),i.finalState={points:e._timePoint,interval:t.mainSeries().interval()},Y.copyLineTool(i))})},r.prototype.restoreSource=function(e,t,i,n,o){var r,s,a,l;return r=e?this.createPane(t):this.panes()[t],s=n.type.toLowerCase().startsWith("study")?r._restoreStudy(n):r._restoreLineTool(n),a=null,n.ownerSource&&(a=r.dataSourceForId(n.ownerSource)),s.setOwnerSource(a),l=null,o?l=r.getPriceScaleById(o.id):s.ownerSource()&&(l=s.ownerSource().priceScale()),l?(s.setPriceScale(l),l.addDataSource(s)):(l=r.createPriceScaleAtPosition(o.position,o.priceScaleIndex),o&&o.id&&l.setId(o.id),s.setPriceScale(l),l.addDataSource(s),"overlay"===o.position&&s.metaInfo&&"Volume@tv-basicstudies"===s.metaInfo().id&&(l.setTopMargin(.75),l.setBottomMargin(0))),s.start(),s.restore&&s.restore(),e&&r.restoreState(i),this.recalculateAllPanes(),this.mainSeries().invalidateBarColorerCache(),this.fullUpdate(),s},r.prototype.restoreLineToolState=function(e,t){e.restorePoints(t.points,t.indexes||[]),e.properties().merge(t.state),e.restoreData&&e.restoreData(t),e.createServerPoints(),this.fullUpdate(),e.linkKey&&Y.restoreLineToolState({model:this,linkKey:e.linkKey,state:t})},r.prototype.onChartThemeLoaded=function(){return this._chartThemeLoaded},r.prototype.chartThemeLoaded=function(){this._chartThemeLoaded.fire()},r.prototype.selectBarMode=function(){return this.m_crossHairSource.selectBarMode()},r.prototype.toggleSelectBarMode=function(){this.m_crossHairSource.toggleSelectBarMode()},r.prototype.onBarSelected=function(){return this.m_crossHairSource.onBarSelected()},r.prototype.isSeriesStyleSupported=function(e){return this.m_mainSeries.isStyleSupported(e)},r.prototype.getStudyShiftColorStartOffset=function(){return this._studyShiftColorStartOffset},
r.prototype.setStudyShiftColorStartOffset=function(e){this._studyShiftColorStartOffset=e},r.prototype.setPriceAutoScaleForAllMainSources=function(){var e,t;for(e=0;e<this._panes.length;++e)null===(t=this._panes[e].mainDataSource())||t.priceScale().isLockScale()||t.priceScale().setMode({autoScale:!0})},r.prototype.isInReplay=function(){return this.m_mainSeries.isInReplay()},r.prototype.switchToReplay=function(e,t){},r.prototype.switchToRealtime=function(){},r.prototype.defaultResolutions=function(){return this.chartApi().chartApi().defaultResolutions()},r.prototype.rendererOptionsProvider=function(){return this._rendererOptionsProvider},r.prototype.priceAxisRendererOptions=function(){return this._rendererOptionsProvider.options()},r.prototype.magnet=function(){return this._magnet},r.prototype.isPriceScaleVisible=function(e){var t,i=this.paneForSource(e.mainSource()),n=i.priceScalePosition(e);return"overlay"===n||(t=this.priceScaleSlotsCount(),i.priceScaleIndex(e,n)<t[n])},r.prototype.studyMetaInfoRepository=function(){return this._studiesMetaInfoRepository},r.prototype.createSessions=function(e){h(null===this._sessions,"Sessions are already created"),this.addCustomSource("sessions",function(t){return t._sessions=new ue(t,e),t._sessions.start(),t._sessions},he.Background)},r.prototype.sessions=function(){return d(this._sessions)},r.prototype.studiesColorRotatorFactory=function(){return this._studyColorRotatorFactory},e.exports=r}).call(this,i("tc+8"),i("aIyQ"),i("Qb4w").PriceRange)},cXAR:function(e,t,i){"use strict";function n(e,t){var i=Object(r.parseRgb)(t),n=Object(r.parseRgb)(e);return Object(r.distanceRgb)(i,n)<70?Object(r.rgbToHexString)(Object(r.invertRgb)(i)):t}var o,r,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w;i.r(t),i.d(t,"SeriesDataWindowView",function(){return w}),o=i("mrSG"),r=i("eJTA"),s=i("ivNn"),a=i("4miz"),l=i("IzGk"),c=i("k9/m"),u=i("GH0z"),h=i("7qT/"),d=i("Ialn"),p=i("qFKp"),_=i("38az"),f=i("e92V"),m=i("mMWL"),y=p.CheckMobile.any(),g=y&&!0,v=new u.PercentageFormatter,S=window.t("n/a"),b=S+" ("+S+"%)",w=function(e){function t(t,i){var n=e.call(this)||this;return n._invalidated=!0,n._series=t,n._model=i,n._items.push(new a.a(window.t("Open"),"")),n._items.push(new a.a(window.t("High"),"")),n._items.push(new a.a(window.t("Low"),"")),n._items.push(new a.a(window.t("Close"),"")),n._items.push(new a.a("","")),n._items.push(new a.a("","")),n._items.push(new a.a(window.t("Change"),"")),n.update(),n}return Object(o.__extends)(t,e),t.prototype.update=function(){this._invalidated=!0},t.prototype.items=function(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._items},t.prototype._updateImpl=function(){var e,t,i,o,r,a,u,h,p,f,m,y,w,P,C,T,x,I,L,M,A=this._series.symbolInfo();for(A?(this._header=[A.name,Object(l.translatedIntervalString)(this._series.interval()),A.exchange].join(", "),this._title=A.description):this._header=this._series.symbol(),e=this._showLastPriceAndChangeOnly(),t=0,i=this._items;t<i.length;t++)i[t].setVisible(!e);if(this._items[0].setValue(S),this._items[1].setValue(S),
this._items[2].setValue(S),this._items[3].setValue(S),this._items[6].setValue(b),this._items[5].setVisible(!1),(o=this._items[4]).setValue(S),o.setVisible(!1),!this._model.timeScale().isEmpty()&&0!==this._series.bars().size()){if(r=this._model.crossHairSource().appliedIndex(),e||!Object(s.isNumber)(r)){if(null===(a=this._series.data().last()))return;r=a.index}if(void 0!==(u=this._series.nearestIndex(r,c.PlotRowSearchMode.NearestLeft))&&(h=this._series.data().valueAt(u),p=function(e){if(null===e)return null;var t=e.properties().child("background");return void 0===t?null:t.value()}(this._series.model().paneForSource(this._series)),null!==h&&null!==p&&(f=h[1],m=h[2],y=h[3],w=h[4],null!=f&&null!=m&&null!=y&&null!=w)))for(P=this._series.formatter(),C=b,void 0!==(T=this._changesData(w,u,e)).values&&(C=Object(d.forceLTRStr)(P.format(T.values.change,!0)+" ("+v.format(T.values.percentChange,!0)+")")),this._items[6].setValue(C),e?(this._items[5].setValue(P.format(w)),this._items[5].setVisible(!0),this._items[6].setVisible(!0)):(this._items[0].setValue(P.format(f)),this._items[1].setValue(P.format(m)),this._items[2].setValue(P.format(y)),this._items[3].setValue(P.format(w)),this._items[4].setValue(P.format(this._series.barFunction()(h)))),x=null,x=n(p,x=e&&!g?void 0===T.values||T.values.change>=0?_.SeriesBarColorer.upColor(this._series.properties()):_.SeriesBarColorer.downColor(this._series.properties()):n(p,null!=(I=this._series.barColorer().barStyle(u,!1)).barBorderColor?I.barBorderColor:I.barColor)),L=0,M=this._items;L<M.length;L++)M[L].setColor(x)}},t.prototype._showLastPriceAndChangeOnly=function(){return y&&(null===this._model.crossHairSource().pane||Object(f.a)(m.tool.value())||null!==this._model.lineBeingEdited())},t.prototype._changesData=function(e,t,i){var n,o,r;if(i&&!g){if(null!==(n=this._series.quotes()))return{values:{change:n.change,percentChange:n.change_percent}}}else if(null!==(r=(o=this._series.data().valueAt(t-1))&&o[4]||null))return{values:{change:e-r,percentChange:Object(h.a)(r,e)}};return{}},t}(a.b)},cZRT:function(e,t,i){"use strict";var n,o;i.d(t,"a",function(){return o}),n=3e3,o=function(){function e(){var e=this;this._retries=5,this._cache=null,this._tryLoad=function(t){e._retries=e._retries-1;e._startLoading().then(t,0!==e._retries?function(){return setTimeout(function(){return e._tryLoad(t)},n)}:void 0)}}return e.prototype.load=function(){return this._cache||(this._cache=new Promise(this._tryLoad)),this._cache},e}()},cdbK:function(e,t,i){"use strict";function n(e){Promise.all([i.e("react"),i.e(2),i.e(5),i.e(14),i.e(20),i.e(28),i.e(31),i.e(50),i.e(56),i.e(0),i.e(4),i.e(12),i.e(24),i.e(45),i.e("go-to-date-dialog-impl")]).then(function(t){i("uUY/").showGoToDateDialog(e)}.bind(null,i)).catch(void 0)}i.r(t),i.d(t,"showGoToDateDialog",function(){return n})},d13A:function(e,t,i){"use strict";function n(e,t,i){return void 0===i&&(i="promise rejected by time-out"),new Promise(function(n,o){var r=setTimeout(function(){return o(i)},t);e.then(function(e){clearTimeout(r),n(e)}),e.catch(function(e){
clearTimeout(r),o(e)})})}i.r(t),i.d(t,"makeTimeLimited",function(){return n})},d1Pk:function(e,t,i){"use strict";function n(e,t,i,n,o,s){if(s)return Math.round(Object(r.ensureDefined)(e.coordinate)+Object(r.ensureDefined)(t.coordinate)*i);var a=e.price+t.price*i;return n.priceToCoordinate(a,o)}function o(e,t,i,n,o,s){if(!s)return e.price+t.price*i;var a=Object(r.ensureDefined)(e.coordinate)+Object(r.ensureDefined)(t.coordinate)*i;return n.coordinateToPrice(a,o)}var r;i.r(t),i.d(t,"fibLevelCoordinate",function(){return n}),i.d(t,"fibLevelPrice",function(){return o}),r=i("Eyy1")},d700:function(e,t,i){"use strict";function n(e){if("INPUT"===e.tagName){var t=e.type;return"text"===t||"email"===t||"number"===t||"password"===t||"search"===t||"tel"===t||"url"===t}return"TEXTAREA"===e.tagName||e.isContentEditable}function o(e,t){var i,o;if(!t)return!1;if(27===(i=255&e)||i>>>4==7)return!1;switch(e^i){case r.Modifiers.Alt:return(38===i||40===i)&&"SELECT"===t.tagName||n(t);case r.Modifiers.Alt+r.Modifiers.Shift:return n(t);case r.Modifiers.Mod:return!(67!==i&&(r.isMacKeyboard||45!==i)||!(o=t.ownerDocument&&t.ownerDocument.getSelection())||o.isCollapsed)||n(t);case r.Modifiers.Mod+r.Modifiers.Shift:return i>=33&&i<=40&&n(t);case r.Modifiers.Shift:case 0:return!!(9!==i||t.ownerDocument&&t!==t.ownerDocument.body&&t!==t.ownerDocument.documentElement)&&((13===i||32===i||!function(e){if("BUTTON"===e.tagName)return!0;if("INPUT"===e.tagName){var t=e.type;if("submit"===t||"button"===t||"reset"===t||"checkbox"===t||"radio"===t)return!0}return!1}(t))&&("form"in t||t.isContentEditable))}return!1}i.d(t,"b",function(){return n}),i.d(t,"a",function(){return o});var r=i("/3z9")},dDSx:function(e,t,i){"use strict";(function(e){function n(t,i,n,o,r,s,a,l,c){I.call(this,a),this._chartWidget=s,this.m_model=new T(t,i,n,o,r,this,l,c),this.m_zoomStack=new N,this._onSimpleZoomIn=new e,this._onSimpleZoomOut=new e,this._currentCustomMoveSource=null,this._currentLineMoveCommand=null,this.beginUndoMacro=a.beginUndoMacro.bind(a),this.endUndoMacro=a.endUndoMacro.bind(a),this.createUndoCheckpoint=a.createUndoCheckpoint.bind(a),this.undoToCheckpoint=a.undoToCheckpoint.bind(a)}function o(e,t,i,n){F.call(this,i),this._priceScale=t,this._newMode=e,this._model=n}function r(e,t,i,n){F.call(this,i),this._property=e,this._newValue=t,this._model=n,this._priceScale=this._model.mainSeries().priceScale()}function s(e,t,i,n){F.call(this,"scale price",!1),this.m_model=e,this.m_pane=t,this.m_priceScale=i,this.m_state=n,this.m_newPriceScaleState=null}function a(e,t,i,n){this._model=e,this._series=t,this._oldSymbol=t.symbol(),this._oldInterval=t.interval(),this._symbol=i,this._interval=n}function l(e,t){F.call(this,"Remove Drawing(s)"),this._model=e,this._linetoolsIds=t.map(function(e){return e.id()}),this._statesByPaneIndexes={}}function c(e,t,i,n,o){F.call(this,"Move Drawing(s)",!1),this._model=e,this._sourceIds=t.map(function(e){return e.id()}),this._points=null,this._origPoints={screen:i.screen.clone(),logical:{index:i.logical.index,price:i.logical.price}},
this._pointIndex=n,this._envState=o}function u(e,t,i){F.call(this,"Move "+t[0].title()+" "+(i>0?"Forward":"Backward")),this._model=e,this._sourcesIds=t.map(function(e){return e.id()}),this._shift=i}function h(e,t,i,n,o,r){F.call(this,"Zoom"),this._model=e,this._startBar=t,this._endBar=i,this._startPrice=n,this._endPrice=o,this._pane=r}function d(e,t,i){F.call(this,"Zoom"),this._baseCmd=e,this._zoomStack=t,this._inOut=i}function p(e,t,i,n,o){F.call(this,"",!1),this._model=e,this._paneA=t,this._paneB=i,this._prevStretchA=n,this._currStretchA=o}function _(e,t,i){F.call(this,"Apply Chart Theme"),this._model=e,this._newChartProps=TradingView.factoryDefaults("chartproperties"),this._newSeriesProps=TradingView.factoryDefaults("chartproperties.mainSeriesProperties"),this._newSessionProps=t.sessions||TradingView.factoryDefaults("sessions"),["candleStyle","hollowCandleStyle","haStyle"].forEach(function(e){t.mainSourceProperties[e].wickUpColor=t.mainSourceProperties[e].wickUpColor||t.mainSourceProperties[e].wickColor,t.mainSourceProperties[e].wickDownColor=t.mainSourceProperties[e].wickDownColor||t.mainSourceProperties[e].wickColor}),t.chartProperties.paneProperties.vertGridProperties=t.chartProperties.paneProperties.vertGridProperties||t.chartProperties.paneProperties.gridProperties,t.chartProperties.paneProperties.horzGridProperties=t.chartProperties.paneProperties.horzGridProperties||t.chartProperties.paneProperties.gridProperties,t.chartProperties.paneProperties.legendProperties=this._model.properties().state().paneProperties.legendProperties,this._newChartProps=C({},this._newChartProps,t.chartProperties),delete this._newChartProps.scalesProperties.showLeftScale,delete this._newChartProps.scalesProperties.showRightScale,delete this._newChartProps.scalesProperties.scaleSeriesOnly,delete this._newChartProps.scalesProperties.showSeriesLastValue,delete this._newChartProps.scalesProperties.showStudyLastValue,delete this._newChartProps.scalesProperties.showSymbolLabels,delete this._newChartProps.scalesProperties.showStudyPlotLabels,delete this._newChartProps.scalesProperties.showFundamentalNameLabel,delete this._newChartProps.scalesProperties.showFundamentalLastValue,e.timeScale().preserveBarSpacing()&&delete this._newChartProps.scalesProperties.barSpacing,this._newSeriesProps=C({},this._newSeriesProps,t.mainSourceProperties),this._oldChartProps=e.properties().state(),delete this._oldChartProps.paneProperties.topMargin,delete this._oldChartProps.paneProperties.bottomMargin,this._oldSeriesProps=e.mainSeries().properties().state(),this._oldSessionsProps=this._model.sessions().state(),i||(delete this._oldSeriesProps.style,delete this._oldSeriesProps.symbol,delete this._oldSeriesProps.interval,delete this._oldSeriesProps.extendedHours,delete this._newSeriesProps.style,delete this._newSeriesProps.symbol,delete this._newSeriesProps.interval,delete this._newSeriesProps.extendedHours)}function f(e,t,i,n,o){F.call(this,e),this._property=t,this._value=i,this._forceSetProperty=o,this._prevValue=t.value(),this._cw=n}function m(e,t){
F.call(this,"Stop Sincing Drawing"),this._model=e,this._sourceId=t.id(),this._linkKey=t.linkKey}function y(e,t,i){F.call(this,"Paste Drawing"),this._model=e,this._clipboardData=t,this._paneIndex=this._model.panes().indexOf(i||this._model.paneForSource(this._model.mainSeries())),this._source=null}function g(e,t){F.call(this,"Paste Indicator"),this._model=e,this._clipboardData=t}function v(e,t){F.call(this,"Move",!1),this._origPoint=e.clone(),this._point=null,this._handler=t}var S=i("aO4+").Point,b=i("CW80"),w=b.isLineTool,P=i("Ss5c").LineDataSource,C=i("FIi8").deepExtend,T=i("OK+B"),x=i("beCu").doAnimate,I=i("onDC").ChartUndoModelBase,L=i("Ocx9"),M=L.saveDefaultProperties,A=i("GVQo"),k=i("qJq3").Series,E=i("GVHu"),O=E.Study,D=i("8sOK").StudyStub,V=i("0YCj"),B=i("0waE"),R=i("7MZv").showTooManyStudiesNotice,N=i("MY2c").UndoStack,F=i("RDU5").UndoCommand,W=i("Ltzl").SaveLineToolStateUndoCommand,j=i("YlKu").ApplyLineToolTemplateUndoCommand,U=i("s9sR").SetResolutionUndoCommand,z=i("8C8C").RestoreFactoryDefaultsUndoCommand,H=i("/ToI"),Y=H.MoveToNewPriceScaleUndoCommand,G=H.MoveToExistingPriceScaleUndoCommand,q=i("2OVc").InsertStudyCommand,K=i("FKaq").SetPriceScaleSelectionStrategyCommand,Z=i("/YGI").StudyInserter,J=i("PC8g").trackEvent,X=i("Fixu").trackDrawingPasted,Q=i("uOxu").getLogger("Chart.ChartUndoModel"),$=i("QTwd").RestoreDefaultsPreferencesUndoCommand,ee=i("bJYc").SetPropertyUndoCommand;inherit(n,I),n.prototype.version=function(){return this.m_model._version},n.prototype.onData=function(e){switch(e.method){case"timescale_update":var t=e.params;this.m_model.updateTimeScale(t.index,t.zoffset,t.changes,t.index_diff,t.marks,t.clear)}},n.prototype.paneForSource=function(e){return this.m_model.paneForSource(e)},n.prototype.createPane=function(e){return this.m_model.createPane(e)},n.prototype.readOnly=function(){return this.m_model.readOnly()},n.prototype.restart=function(){this.m_model.restart()},n.prototype.disconnect=function(){this.m_model.disconnect()},n.prototype.studiesMetaData=function(){return this.m_model.studiesMetaData()},n.prototype.studyVersioning=function(){return this.m_model.studyVersioning()},n.prototype.chartModel=function(){return this._model()},n.prototype._model=function(){return this.m_model},n.prototype.pushUndoCommand=function(e){this._pushUndoCommand(e)},n.prototype._pushUndoCommand=function(e){this._undoHistory.pushUndoCommand(e)},n.prototype.startScalePrice=function(e,t,i){this.pushUndoCommand(new s(this.m_model,e,t,t.state())),this.chartModel().startScalePrice(e,t,i)},n.prototype.scalePriceTo=function(e,t,i){this.chartModel().scalePriceTo(e,t,i)},n.prototype.endScalePrice=function(e,t){this.chartModel().endScalePrice(e,t)},n.prototype.startScrollPrice=function(e,t,i){t.isAutoScale()||(this._initialPriceScrollState=t.state(),this._initialPriceScrollPos=i,this.chartModel().startScrollPrice(e,t,i))},n.prototype.scrollPriceTo=function(e,t,i){
t.isAutoScale()||(this._initialPriceScrollPos&&Math.abs(this._initialPriceScrollPos-i)>20&&(this.pushUndoCommand(new s(this.m_model,e,t,this._initialPriceScrollState)),delete this._initialPriceScrollState,delete this._initialPriceScrollPos),this.chartModel().scrollPriceTo(e,t,i))},n.prototype.endScrollPrice=function(e,t){t.isAutoScale()||(delete this._initialPriceScrollState,delete this._initialPriceScrollPos,this.chartModel().endScrollPrice(e,t))},n.prototype.setPriceAutoScale=function(e,t,i){this.pushUndoCommand(new s(this.m_model,e,t,t.state())),this.chartModel().setPriceAutoScale(e,t,i)},n.prototype.resetPriceScale=function(e,t){this.pushUndoCommand(new s(this.m_model,e,t,t.state())),this.chartModel().resetPriceScale(e,t)},n.prototype.setWidth=function(e){this.m_model.setWidth(e)},n.prototype.setPaneHeight=function(e,t){this.m_model.setPaneHeight(e,t)},n.prototype.gridSource=function(){return this.m_model.gridSource()},n.prototype.watermarkSource=function(){return this.m_model.watermarkSource()},n.prototype.addAlertsSource=function(e){return this.m_model.addAlertsSource(e)},n.prototype.alertsSources=function(){return this.m_model.alertsSources()},n.prototype.publishedChartsTimelineSource=function(){return this.m_model.publishedChartsTimelineSource()},n.prototype.barsMarksSources=function(){return this.m_model.barsMarksSources()},n.prototype.crossHairSource=function(){return this.m_model.crossHairSource()},n.prototype.model=function(){return this.m_model},n.prototype.chartWidget=function(){return this._chartWidget},n.prototype.mainSeries=function(){return this.m_model.m_mainSeries},n.prototype.mainSeriesScaleRatioProperty=function(){return this.m_model.mainSeriesScaleRatioProperty()},n.prototype.panes=function(){return this.m_model.panes()},n.prototype.timeScale=function(){return this.m_model.timeScale()},n.prototype.selectionMacro=function(e){return this.m_model.selectionMacro(e)},n.prototype.setHoveredSource=function(e,t){this.m_model.setHoveredSource(e,t)},n.prototype.selection=function(){return this.m_model.selection()},n.prototype.onSelectedSourceChanged=function(){return this.m_model.onSelectedSourceChanged()},n.prototype.hoveredSource=function(){return this.m_model.hoveredSource()},n.prototype.activeStrategySource=function(){return this.m_model.activeStrategySource()},n.prototype.invalidate=function(e){this.m_model.invalidate(e)},n.prototype.setCurrentPosition=function(e,t,i,n){this.m_model.setCurrentPosition(e,t,i,n)},n.prototype.setAndSaveCurrentPosition=function(e,t,i,n){this.m_model.setAndSaveCurrentPosition(e,t,i,n)},n.prototype.modifySeries=function(e,t,i){var n=new a(this.m_model,e,t,i);this.pushUndoCommand(n)},n.prototype.canCreateStudy=function(e){return this.model().chartApi().chartApi().isCanCreateStudy(e)},n.prototype.checkIfFeatureAvailable=function(e,t){var i=this.canCreateStudy(),n=t&&t instanceof O;return!this.readOnly()&&n&&(i=this.canCreateStudy(!0)),!!i||(n||R(),!1)},n.prototype._insertStudy=function(e,t,i,n,o,r,s,a){var l=new q(this.m_model,e,t,i,n,o,r,s,a||null,"Insert "+e.description)
;return this.pushUndoCommand(l),l.insertedStudy()},n.prototype.insertStudyWithoutCheck=function(e){return this._insertStudy(e)},n.prototype.createStudyInserter=function(e,t,i){var n,o=this,r=null,s={createStudy:function(e,t,i,n,s,a,l,c){return o.checkIfFeatureAvailable(e,a)?(J("studies","Study_"+e.id),"Compare@tv-basicstudies"===e.id&&J("compare","symbol:"+t.symbol),o._insertStudy(e,t,n,s,a,l,c,r)):(Q.logNormal("Cannot insert study "+e.id),null)}};return void 0!==i&&(s.createStub=function(){var e=o.m_model.insertStudyStub(i);return r={targetPaneId:o.m_model.paneForSource(e).id(),targetZOrder:e.zorder()},e.id()},s.removeStub=function(e){return o.m_model.removeStudyStub(e)}),(n=new Z(e,this.m_model._studiesMetaInfoRepository,s)).setParentSource(t),n},n.prototype.setProperty=function(e,t,i,n){if(e&&e.value()!==t){var o=new ee(e,t,i,this.m_model,n);this.pushUndoCommand(o),this.emitEvent("setProperty")}},n.prototype.setProperties=function(e,t,i){var n=this;this.beginUndoMacro(i),this.m_model.selectionMacro(function(){for(var o=0;o<e.length;o++)n.setProperty(e[o],t[o],i)}),this.endUndoMacro()},n.prototype.setPriceScaleMode=function(e,t,i){var n,r,s=Object.keys(e),a=t.mode(),l=!1;for(n=0;n<s.length;n++)if(a[s[n]]!==e[s[n]]){l=!0;break}l&&(r=new o(e,t,i,this.m_model),this.pushUndoCommand(r))},n.prototype.setPriceScaleSelectionStrategy=function(e){var t,i;this.m_model.properties().priceScaleSelectionStrategyName.value()!==e&&(J("Chart","Change PriceScale Selection Strategy"),t="Set Price Scale Selection Stretegy to "+e,this.beginUndoMacro(t),this.setProperty(this.m_model.properties().priceScaleSelectionStrategyName,e,t),i=new K(this.m_model,e,t),this.pushUndoCommand(i),this.endUndoMacro())},n.prototype.setScaleRatioProperty=function(e,t,i){if(e.value()!==t){var n=new r(e,t,i,this.m_model);this.pushUndoCommand(n)}},n.prototype.setScreenChartProperty=function(e,t,i,n,o){if(o||e.value()!==t){var r=new f(n,e,t,i,o);this.pushUndoCommand(r)}},n.prototype.setResolutionProperty=function(e,t,i,n){if(e.value()!==t){var o=new U(e,t,i,n);this.pushUndoCommand(o)}},n.prototype.removeLineTools=function(e){var t,i,n,o=this.lineBeingCreated();o&&-1!==(t=e.indexOf(o))&&(this.cancelCreatingLine(),e.splice(t,1)),n=(i=new l(this.m_model,e)).removedIds(),this.pushUndoCommand(i),this.emitEvent("removeSources",[n])},n.prototype.detachToRight=function(e,t){var i,n;J("Chart","Move to new right scale"),i=window.t("Move {title} To New Price Scale").format({title:e.title()}),n=new Y(this.m_model,e,t,"right",i),this.pushUndoCommand(n),this.emitEvent("moveSource",[e])},n.prototype.detachToLeft=function(e,t){var i,n;J("Chart","Move to new left scale"),i=window.t("Move {title} To New Left Scale").format({title:e.title()}),n=new Y(this.m_model,e,t,"left",i),this.pushUndoCommand(n),this.emitEvent("moveSource",[e])},n.prototype.detachNoScale=function(e,t){var i,n;J("Chart","Make source no scale"),i=window.t("Make {title} No Scale (Full Screen)").format({title:e.title()}),n=new Y(this.m_model,e,t,"overlay",i),this.pushUndoCommand(n),
this.emitEvent("moveSource",[e])},n.prototype.moveToScale=function(e,t,i,n){J("Chart","Move source to target scale");var o=new G(this.m_model,e,t,i,n);this.pushUndoCommand(o),this.emitEvent("moveSource",[e])},n.prototype.lineBeingCreated=function(){return this.m_model.lineBeingCreated()},n.prototype.paneBeingCreatedLineOn=function(){return this.m_model.paneBeingCreatedLineOn()},n.prototype.cancelCreatingLine=function(){this.m_model.cancelCreatingLine()},n.prototype.lineCancelled=function(){return this.m_model.lineCancelled()},n.prototype.startChangingLinetool=function(e,t,i,n){this._currentLineChangeCommand=new W(this.m_model,e,"Change "+i+"point",!1),this.m_model.startChangingLinetool(e,t,i,n)},n.prototype.lineBeingEdited=function(){return this.m_model.lineBeingEdited()},n.prototype.changeLinePoint=function(e,t){this.m_model.changeLinePoint(e,t)},n.prototype.endChangingLinetool=function(e){this.m_model.endChangingLinetool(e),this.pushUndoCommand(this._currentLineChangeCommand),this._currentLineChangeCommand=null},n.prototype.startMovingSources=function(e,t,i,n){e.filter(function(e){return e.doesMovingAffectsUndo()}).length&&(this._currentLineMoveCommand=new c(this.m_model,e,t,i,n)),this.m_model.startMovingSources(e,t,i,n)},n.prototype.sourcesBeingMoved=function(){return this.m_model.sourcesBeingMoved()},n.prototype.moveSources=function(e,t){null!==this._currentLineMoveCommand&&this._currentLineMoveCommand.setPoint(e,t),this.m_model.moveSources(e,t)},n.prototype.endMovingSource=function(e){this.m_model.endMovingSources(e);var t=this._currentLineMoveCommand;return this._currentLineMoveCommand=null,null!==t&&!t.isEmpty()&&(this.pushUndoCommand(t),!0)},n.prototype.dataSources=function(){return this.m_model.dataSources()},n.prototype.orderedDataSources=function(e){return this.m_model.orderedDataSources(e)},n.prototype.dataSourceForId=function(e){return this.m_model.dataSourceForId(e)},n.prototype.state=function(e,t,i){return this.m_model.state(e,t,i)},n.prototype.asyncState=function(){return this.m_model.asyncState()},n.prototype.restoreState=function(e,t,i){return this.m_model.restoreState(e,t,i)},n.prototype.calculateDefaultTags=function(){return this.m_model.calculateDefaultTags()},n.prototype.onTagsChanged=function(){return this.m_model.onTagsChanged()},n.prototype.changeZOrder=function(e,t){var i=new u(this.m_model,e,t);this.pushUndoCommand(i),this.emitEvent("changeZOrder",[e,t])},n.prototype._removeAllStudiesImpl=function(){var e,t,i=this.m_model.dataSources();for(e=0;e<i.length;e++)t=i[e],(TradingView.isInherited(t.constructor,O)&&!t.isChildStudy()&&t.removeByRemoveAllStudies()||TradingView.isInherited(t.constructor,D))&&this.removeSource(t)},n.prototype.removeAllStudies=function(){this.beginUndoMacro(window.t("Remove all studies")),this._removeAllStudiesImpl(),this.endUndoMacro()},n.prototype._removeAllDrawingToolsImpl=function(e){var t=this;this.selectionMacro(function(){var i,n,o;for(t.lineBeingCreated()&&t.cancelCreatingLine(),i=t.dataSources(),n=0;n<i.length;n++)o=i[n],
TradingView.isInherited(o.constructor,P)&&o.isActualSymbol()&&o.isUserDeletable()&&(e&&e!==o._constructor||t.removeSource(o))})},n.prototype.removeAllDrawingTools=function(e){this.beginUndoMacro(window.t("Remove all drawing tools")),this._removeAllDrawingToolsImpl(),this.endUndoMacro()},n.prototype.removeAllStudiesAndDrawingTools=function(){this.beginUndoMacro(window.t("Remove all studies and drawing tools")),this._removeAllDrawingToolsImpl(),this._removeAllStudiesImpl(),this.endUndoMacro()},n.prototype.unlinkLines=function(e){var t,i;this.beginUndoMacro("Stop syncing line tool(s)"),t=this.m_model,i=this,e.forEach(function(e){var n=new m(t,e);i.pushUndoCommand(n)}),this.endUndoMacro()},n.prototype.copyToOtherCharts=function(e){this.m_model.copyToOtherCharts(e)},n.prototype.moveLeft=function(){var e,t;try{this.beginUndoMacro("Move Left")}catch(e){return}e=this.m_model.timeScale().width(),t=this,x({to:e/5,onStep:function(e){t.startScrollTime(e),t.scrollTimeTo(0),t.endScrollTime()},onComplete:function(){t.endUndoMacro()}})},n.prototype.moveRight=function(){var e,t;try{this.beginUndoMacro("Move Right")}catch(e){return}e=this.m_model.timeScale().width(),t=this,x({to:e/5,onStep:function(e){t.startScrollTime(0),t.scrollTimeTo(e),t.endScrollTime()},onComplete:function(){t.endUndoMacro()}})},n.prototype.scrollChart=function(e){this.m_model.scrollEnabled()&&(this.startScrollTime(0),this.scrollTimeTo(e),this.endScrollTime())},n.prototype.scrollChartByBar=function(e){if(this.m_model.scrollEnabled()){var t=e*this.m_model.timeScale().barSpacing();this.startScrollTime(0),this.scrollTimeTo(t),this.endScrollTime()}},n.prototype.resetScales=function(){this.beginUndoMacro("Reset scales"),this.resetTimeScale(),this.panes().forEach(function(e){e.leftPriceScales().forEach(function(t){this.resetPriceScale(e,t)},this),e.rightPriceScales().forEach(function(t){this.resetPriceScale(e,t)},this)},this),this.endUndoMacro(),this.m_model.recalculateAllPanes()},n.prototype.zoomToViewport=function(e,t,i,n,o){var r=new h(this.m_model,e,t,i,n,o),s=new d(r,this.m_zoomStack,!0);this.pushUndoCommand(s)},n.prototype.zoomFromViewport=function(){var e=new d(this.m_zoomStack.head(),this.m_zoomStack,!1);this.pushUndoCommand(e)},n.prototype.zoomStack=function(){return this.m_zoomStack},n.prototype.addPaneStretchFactorUndoCommand=function(e,t,i,n){var o=new p(this.m_model,e,t,i,n);this.pushUndoCommand(o)},n.prototype._restoreFactoryDefaults=function(e){var t=new z(this.m_model,e);this.pushUndoCommand(t)},n.prototype._restoreLineToolFactoryDefaults=function(e){var t,i="Load default drawing template";this.beginUndoMacro(i),this.saveLineToolState(e,i),t=new z(this.m_model,e.properties(),i),this.pushUndoCommand(t),this.saveLineToolState(e,i),this.endUndoMacro(),this.model().updateSource(e)},n.prototype.restorePropertiesForSource=function(e){w(e)?this._restoreLineToolFactoryDefaults(e):this._restoreFactoryDefaults(e.properties())},n.prototype.restorePreferences=function(){var e=new $(this.model());this.pushUndoCommand(e)},n.prototype.chartLoadTheme=function(e,t,i,n){
var o=new _(e,t,i);n?o.redo():this.pushUndoCommand(o)},n.prototype.applyLineToolTemplate=function(e,t,i){this.beginUndoMacro(i),this.saveLineToolState(e,i);var n=new j(e,t,i);this.pushUndoCommand(n),this.saveLineToolState(e,i),this.endUndoMacro(),this.model().updateSource(e)},n.prototype.onSimpleZoomIn=function(){return this._onSimpleZoomIn},n.prototype.onSimpleZoomOut=function(){return this._onSimpleZoomOut},n.prototype.alertsList=function(){return this.m_model.alertsList()},n.prototype.alertsListChanged=function(){return this.m_model.alertsListChanged()},n.prototype.isJustClonedChart=function(){return this._chartWidget.isJustClonedChart()},n.prototype.copySourcesToClip=function(e){var t,i;if(e)return t={sources:[]},i=this,e.filter(function(e){return e.copiable()}).forEach(function(e){var n={};if(e instanceof P)n.type="drawing",n.geometry=e.geometry();else{if(!(e instanceof O))return!1;n.type="study"}if(n.source=e.state&&e.state(),delete n.source.alertId,delete n.source.linkKey,!n.source)return!1;n.modelId=i.m_model._id,t.sources.push(n)}),!!t.sources.length&&(1===t.sources.length?t.title=e[0].title&&e[0].title():t.title="Drawings",A.set(t),!0)},n.prototype.cutSourcesToClip=function(e){var t,i,n=this.copySourcesToClip(e);if(!n)return!1;t=1===e.length?"Cut "+e[0].title:"Cut sources",this.beginUndoMacro(t),i=this,this.m_model.selectionMacro(function(){e.forEach(function(e){i.removeSource(e)})}),this.endUndoMacro()},n.prototype.pasteLineTool=function(e,t){var i=new y(this.m_model,t,e);return this.pushUndoCommand(i),i.source()},n.prototype.pasteStudy=function(e){var t=new g(this.m_model,e);this.pushUndoCommand(t)},n.prototype.pasteSourceFromClip=function(e,t){var i,n,o=A.get();if(!o)return!1;this.beginUndoMacro("Paste "+o.title),i=this,n=0,o.sources.forEach(function(t){if("drawing"===t.type){var o=i.pasteLineTool(e,t);n<5&&null!==o&&(X(o),n+=1)}"study"===t.type&&t.source&&t.source.metaInfo&&i.checkIfFeatureAvailable(new V(t.source.metaInfo))&&i.pasteStudy(t)}),this.endUndoMacro()},n.prototype.trackTime=function(){return this._chartWidget.trackTime()},n.prototype.isInReplay=function(){return this.m_model.isInReplay()},n.prototype.switchToReplay=function(e,t){},n.prototype.switchToRealtime=function(){},n.prototype.startCustomMoving=function(e,t,i){this._currentCustomMoveCommand=new v(t,i),this._currentCustomMoveSource=e},n.prototype.customMoveBeingProcessed=function(){return null!==this._currentCustomMoveSource},n.prototype.processCustomMove=function(e){this._currentCustomMoveCommand.setPoint(e)},n.prototype.endCustomMoving=function(){null!==this._currentCustomMoveCommand.point()&&(this.pushUndoCommand(this._currentCustomMoveCommand),this._currentCustomMoveCommand=null,this._currentCustomMoveSource=null)},n.prototype.saveLineToolState=function(e,t){this.pushUndoCommand(new W(this.m_model,e,t))},n.prototype.togglePriceScaleAutoScaleMode=function(e){var t={autoScale:!e.isAutoScale()};this.setPriceScaleMode(t,e,"Auto Scale")},n.prototype.togglePriceScaleLockScaleMode=function(e){var t={lockScale:!e.isLockScale()}
;this.setPriceScaleMode(t,e,"Lock Scale")},n.prototype.setPriceScaleRegularScaleMode=function(e){this.setPriceScaleMode({log:!1,percentage:!1,indexedTo100:!1},e,"Regular")},n.prototype.togglePriceScaleIndexedTo100ScaleMode=function(e){var t={indexedTo100:!e.isIndexedTo100()};this.setPriceScaleMode(t,e,"Indexed to 100")},n.prototype.togglePriceScalePercentageScaleMode=function(e){var t={percentage:!e.isPercentage()};this.setPriceScaleMode(t,e,"Percent")},n.prototype.togglePriceScaleLogScaleMode=function(e){var t={log:!e.isLog()};this.setPriceScaleMode(t,e,"Logarithmic")},n.prototype.invertPriceScale=function(e){var t=e.properties().isInverted;this.setProperty(t,!t.value(),"Invert Scale")},inherit(o,F),o.prototype.redo=function(){this._oldMode=this._priceScale.mode(),M(!0),this._priceScale.setMode(this._newMode),M(!1),this._model&&(this._model.recalculateAllPanes(),this._model.lightUpdate())},o.prototype.undo=function(){M(!0),this._priceScale.setMode(this._oldMode),M(!1),this._oldMode=null,this._model&&(this._model.recalculateAllPanes(),this._model.lightUpdate())},inherit(r,F),r.prototype.redo=function(){this._oldValue=this._property.value(),this._oldMode=this._priceScale.mode(),M(!0),this._priceScale.setMode({autoScale:!1,percentage:!1,log:!1}),this._property.setValue(this._newValue),M(!1),this._model&&(this._model.recalculateAllPanes(),this._model.lightUpdate())},r.prototype.undo=function(){M(!0),this._property.setValue(this._oldValue),this._priceScale.setMode(this._oldMode),M(!1),this._oldMode=null,this._model&&(this._model.recalculateAllPanes(),this._model.lightUpdate())},inherit(s,F),s.prototype.undo=function(){null===this.m_newPriceScaleState?(this.m_newPriceScaleState=this.m_priceScale.state(),this.m_model.restorePriceScaleState(this.m_pane,this.m_priceScale,this.m_state)):Q.logDebug("PriceScaleChangeUndoCommand.undo: Command is already undone")},s.prototype.redo=function(){null!==this.m_newPriceScaleState?(this.m_model.restorePriceScaleState(this.m_pane,this.m_priceScale,this.m_newPriceScaleState),this.m_newPriceScaleState=null):Q.logDebug("PriceScaleChangeUndoCommand.redo: Command is not undone")},inherit(a,F),a.prototype.redo=function(){this._model.modifySeries(this._series,this._symbol,this._interval)},a.prototype.undo=function(){this._model.modifySeries(this._series,this._oldSymbol,this._oldInterval)},inherit(l,F),l.prototype.removedIds=function(){return this._linetoolsIds},l.prototype.redo=function(){var e,t,i,n;for(e=0;e<this._linetoolsIds.length;e++)t=this._model.dataSourceForId(this._linetoolsIds[e]),i=this._model.paneForSource(t),n=this._model.panes().indexOf(i),this._statesByPaneIndexes[n]=this._statesByPaneIndexes[n]||[],this._statesByPaneIndexes[n].push({state:t.state(),owner:t.ownerSource().id()}),i.removeDataSource(t);delete this._linetools},l.prototype.undo=function(){var e,t,i,n,o,r,s;for(e in this._linetools=[],this._statesByPaneIndexes)for(t=this._model.panes()[e],i=this._statesByPaneIndexes[e],n=0;n<i.length;n++)o=i[n],r=this._model.dataSourceForId(o.owner),
(s=t._restoreLineTool(o.state)).setOwnerSource(r),s.updateAllViews(),this._linetools.push(s);this._model.lightUpdate()},inherit(c,F),c.prototype.pointsAreEquals=function(e,t){return!!e==!!t&&(!e&&!t||e.subtract(t).length()<1)},c.prototype.setPoint=function(e,t){this.pointsAreEquals(this._origPoints.screen,e.screen)||(this._points={screen:e.screen.clone(),logical:{index:e.logical.index,price:e.logical.price}}),this._envState=t},c.prototype.undo=function(){var e=this,t=this._sourceIds.map(function(t){return e._model.dataSourceForId(t)});e._model.startMovingSources(t,this._points,e._pointIndex),e._model.moveSources(this._origPoints),e._model.endMovingSources()},c.prototype.redo=function(){var e=this,t=this._sourceIds.map(function(t){return e._model.dataSourceForId(t)});e._model.startMovingSources(t,this._origPoints,e._pointIndex),e._model.moveSources(this._points,this._envState),e._model.endMovingSources()},c.prototype.isEmpty=function(){return null===this._points},inherit(u,F),u.prototype.undo=function(){var e=this,t=this._sourcesIds.map(function(t){return e._model.dataSourceForId(t)});this._shift<0&&t.reverse(),t.forEach(function(t){e._model.changeZOrder(t,-e._shift)})},u.prototype.redo=function(){var e=this,t=this._sourcesIds.map(function(t){return e._model.dataSourceForId(t)});this._shift>0&&t.reverse(),t.forEach(function(t){e._model.changeZOrder(t,e._shift)})},n.prototype.removePane=function(e){var t=this.m_model.panes()[e].dataSources().slice();this._removeSources(t,!1,"Remove pane")},inherit(h,F),h.prototype.redo=function(){this._timeScaleState=this._model.timeScale().state(),this._priceScaleState=this._pane.defaultPriceScale().state(),this._model.zoomToViewport(this._startBar,this._endBar,this._startPrice,this._endPrice,this._pane)},h.prototype.undo=function(){this._model.timeScale().restoreState(this._timeScaleState),this._pane.defaultPriceScale().restoreState(this._priceScaleState),this._model.recalculateAllPanes(),this._model.lightUpdate()},inherit(d,F),d.prototype.undo=function(){if(this._inOut){if(this._baseCmd!==this._zoomStack.head())return void Q.logDebug("zoom stack inconsistency");this._baseCmd.undo(),this._zoomStack.pop()}else this._baseCmd.redo(),this._zoomStack.push(this._baseCmd)},d.prototype.redo=function(){if(this._inOut)this._baseCmd.redo(),this._zoomStack.push(this._baseCmd);else{if(this._baseCmd!==this._zoomStack.head())return void Q.logDebug("zoom stack inconsistency");this._baseCmd.undo(),this._zoomStack.pop()}},inherit(p,F),p.prototype.redo=function(){var e=this._paneA._stretchFactor+this._paneB._stretchFactor;this._paneA._stretchFactor=this._currStretchA,this._paneB._stretchFactor=e-this._currStretchA,this._model.fullUpdate()},p.prototype.undo=function(){var e=this._paneA._stretchFactor+this._paneB._stretchFactor;this._paneA._stretchFactor=this._prevStretchA,this._paneB._stretchFactor=e-this._prevStretchA,this._model.fullUpdate()},inherit(_,F),_.prototype._merge=function(e,t,i){var n=this._model;M(!0),e&&(n.properties().paneProperties.mergeAndFire(e.paneProperties),
n.properties().scalesProperties.mergeAndFire(e.scalesProperties)),n.mainSeries().priceScale().setMode({autoScale:t.priceAxisProperties.autoScale,percentage:t.priceAxisProperties.percentage,log:t.priceAxisProperties.log,lockScale:t.priceAxisProperties.lockScale}),n.mainSeries().properties().mergeAndFire(t),n.mainSeries().properties().saveDefaults(),n.mainSeries().createPaneView(),n.mainSeries().invalidateBarStylesCache(),n._version=t.version,n.recalculateAllPanes(),n.fullUpdate(),n.properties().saveDefaults(),n.sessions().restoreState({properties:i}),M(!1)},_.prototype.undo=function(){this._merge(this._oldChartProps,this._oldSeriesProps,this._oldSessionsProps),this._model.mainSeries().onChartStyleChanged(),this._model.updateScales(),this._model.chartThemeLoaded()},_.prototype.redo=function(){this._merge(this._newChartProps,this._newSeriesProps,this._newSessionProps),this._model.mainSeries().onChartStyleChanged(),this._model.updateScales(),this._model.chartThemeLoaded()},inherit(f,F),f.prototype.redo=function(){this._cw.screen.show(),this._property.setValue(this._value,this._forceSetProperty)},f.prototype.undo=function(){this._cw.screen.show(),this._property.setValue(this._prevValue,this._forceSetProperty)},inherit(m,F),m.prototype.redo=function(){delete this._model.dataSourceForId(this._sourceId).linkKey},m.prototype.undo=function(){this._model.dataSourceForId(this._sourceId).linkKey=this._linkKey},inherit(y,F),y.prototype.redo=function(){var e,t,i,n,o,r,s,a=this._model.panes()[this._paneIndex],l=a.dataSourceForId(this._clipboardData.source.ownerSource)||a.mainDataSource();this._sourceState||(e=!0,this._clipboardData.source.state.symbol===((t=a.mainDataSource()).symbol?t.symbol():"")&&(l instanceof k&&(e=!1),l instanceof O&&(e=!l.metaInfo().is_price_study)),delete(i=TradingView.clone(this._clipboardData.source)).state.symbol,e?(n=this._model,o=function(e){var t=e.x*n.timeScale().width(),i=e.y*l.priceScale().height();return new S(t,i)},r=l.firstValue(),i.points=this._clipboardData.geometry.map(function(e){var t=o(e),i=n.timeScale().coordinateToIndex(t.x),s=n.timeScale().normalizeBarIndex(i);return s.price=l.priceScale().coordinateToPrice(t.y,r),s})):this._model._id===this._clipboardData.modelId&&l.id()===this._clipboardData.source.ownerSource&&(i.points=function(e,t){var i,n,o,r,s=t.priceScale(),a=[],l=t.firstValue();for(i=0;i<e.length;i++)n={offset:e[i].offset,time_t:e[i].time_t},o=e[i].price,r=s.priceToCoordinate(o,l),r-=40,o=s.coordinateToPrice(r,l),n.price=o,a.push(n);return a}(this._clipboardData.source.points,l)),i.id=B.guid(),this._sourceState=i),(s=a._restoreLineTool(this._sourceState,null,!1)).calcIsActualSymbol(),s.setOwnerSource(l),s.setPriceScale(l.priceScale()),l.priceScale().addDataSource(s),s.createServerPoints(),this._model.lightUpdate(),this._source=s},y.prototype.undo=function(){var e;this._sourceState||Q.logError("This command was never executed - nothing to undo"),e=this._model.panes()[this._paneIndex].dataSourceForId(this._sourceState.id),this._model.removeSource(e),this._source=null},
y.prototype.source=function(){return this._source},inherit(g,F),g.prototype.redo=function(){var e,t,i,n;this._sourceState||((e=TradingView.clone(this._clipboardData.source)).id=B.guid(),this._sourceState=e),t=null,i=null,this._sourceState.metaInfo.is_price_study?(t=this._model.paneForSource(this._model.mainSeries()),i=this._model.mainSeries().priceScale()):i=(t=this._model.createPane()).defaultPriceScale(),(n=t._restoreStudy(this._sourceState)).metaInfo().linkedToSeries&&n.setOwnerSource(this._model.mainSeries()),n.start(),n.setPriceScale(i),t.move(n,i)},g.prototype.undo=function(){this._sourceState||Q.logError("This command was never executed - nothing to undo");var e=this._model.dataSourceForId(this._sourceState.id);this._model.removeSource(e)},inherit(v,F),v.prototype.setPoint=function(e){this._point=e.clone(),this._handler(e)},v.prototype.point=function(){return this._point},v.prototype.undo=function(){this._handler(this._origPoint)},v.prototype.redo=function(){this._handler(this._point)},t.ChartUndoModel=n,t.PriceScaleChangeUndoCommand=s}).call(this,i("aIyQ"))},dLzo:function(e,t,i){"use strict";var n,o,r,s,a,l,c,u,h,d,p,_,f,m,y,g;i.r(t),i.d(t,"CrossHairMeasurePaneView",function(){return g}),n=i("aO4+"),o=i("Eyy1"),r=i("Ialn"),s=i("GH0z"),a=i("5C6T"),l=i("nda6"),c=i("pJOz"),u=i("IjC5"),h=i("qgcf"),d=i("Zy3/"),p=i("8Uy/"),_=i("a7Ha"),f=i("zDbI"),m=window.t("{0} bars"),y=new l.TimeSpanFormatter,g=function(){function e(e,t){this._pipFormatter=null,this._lastSymbolInfo=null,this._horzTrenRenderer=new c.TrendLineRenderer,this._vertTrenRenderer=new c.TrendLineRenderer,this._bgRenderer=new u.RectangleRenderer,this._labelRenderer=new h.TextRenderer,this._p1=null,this._p2=null,this._label=null,this._source=e,this._pane=t}return e.prototype.update=function(){var e,t,i,l,c,u,d,g,v,S,b,w,P,C,T,x,I,L,M,A,k,E,O,D,V,B,R,N,F,W,j,U,z,H,Y,G,q,K,Z,J=this._source.endMeasurePoint(),X=this._source.lastValidMeasurePoint();if(null!==J)e=J.price,t=J.index;else if(this._source.measurePane()===this._source.pane)e=this._source.price,t=this._source.index;else{if(null===X)return this._p1=null,void(this._p2=null);e=X.rawPrice,t=X.index}i=Object(o.ensureNotNull)(this._source.startMeasurePoint()),l=Object(o.ensureNotNull)(this._source.measurePane()),e=this._source.model().magnet().align(e,t,l),c=i.price,u=e-(c=this._source.model().magnet().align(c,i.index,l)),d=t-i.index,g=Object(r.forceLTRStr)(""+d),v=Object(o.ensureNotNull)(l.mainDataSource()),S=Object(o.ensureNotNull)(v.formatter()).format(u),Math.abs(c)>1e-8&&(b=u/c,S+=" ("+(new s.PercentageFormatter).format(100*b)+")"),w=Object(r.forceLTRStr)(S),this._label=w+"\n"+m.format(g),P=Object(o.ensureNotNull)(v.firstValue()),C=this._source.model().timeScale().indexToCoordinate(i.index),T=this._source.model().timeScale().indexToCoordinate(t),x=l.defaultPriceScale().priceToCoordinate(c,P),I=l.defaultPriceScale().priceToCoordinate(e,P),this._p1=new n.Point(C,x),this._p2=new n.Point(T,I),L=this._source.model().timeScale().indexToUserTime(i.index),M=this._source.model().timeScale().indexToUserTime(t),
A=null,null!==L&&null!==M&&(null!==(k=this._pane.model().mainSeries().symbolInfo())&&k!==this._lastSymbolInfo&&(this._pipFormatter=new a.PipFormatter(k.pricescale,k.minmov,k.type,k.minmove2),this._lastSymbolInfo=k),A=(M.valueOf()-L.valueOf())/1e3),O=null!==(E=this._pipFormatter?this._pipFormatter.format(u):null)?" , "+E:"",V=null!==(D=null!==A?y.format(A):null)?", "+Object(r.startWithLTR)(D):"",this._label=Object(r.forceLTRStr)(w+O)+"\n"+m.format(g)+V,B={points:[this._p1,this._p2],linewidth:0,fillBackground:!0,color:"rgba(30,136,229,0.2)",backcolor:"rgba(30,136,229,0.2)"},this._bgRenderer.setData(B),R=this._p1.add(this._p2).scaled(.5),N=l.defaultPriceScale().height(),F=Math.round(R.y),W={points:[new n.Point(this._p1.x,F),new n.Point(this._p2.x,F)],width:this._source.model().timeScale().width(),height:N,color:"#1E88E5",linewidth:2,linestyle:p.LINESTYLE_SOLID,extendleft:!1,extendright:!1,leftend:_.LineEnd.Normal,rightend:_.LineEnd.Arrow},this._horzTrenRenderer.setData(W),j=Math.round(R.x),W={points:[new n.Point(j,this._p1.y),new n.Point(j,this._p2.y)],width:this._source.model().timeScale().width(),height:N,color:"#1E88E5",linewidth:2,linestyle:p.LINESTYLE_SOLID,extendleft:!1,extendright:!1,leftend:_.LineEnd.Normal,rightend:_.LineEnd.Arrow},this._vertTrenRenderer.setData(W),U={x:0,y:10},z=function(e,t){return{points:[t],text:e,color:"#FFFFFF",horzAlign:"center",vertAlign:"middle",font:f.CHART_FONT_FAMILY,offsetX:U.x,offsetY:U.y,bold:!1,italic:!1,fontsize:12,padding:8,highlightBorder:!1,backgroundColor:"rgba(30,136,229,0.9)",backgroundTransparency:10,backgroundVertInflate:5,backgroundHorzInflate:5,backgroundRoundRect:4}},H=.5*(this._p1.x+this._p2.x),Y=this._p2.y,G=new n.Point(H,Y),q=z(Object(o.ensureNotNull)(this._label),G),this._labelRenderer.setData(q),K=this._labelRenderer.measure(),Z=Object(h.calculateLabelPosition)(K,this._p1,this._p2,U,this._pane.height()),this._labelRenderer.setPoints([Z])},e.prototype.renderer=function(){if(null===this._p1||null===this._p2)return null;var e=new d.CompositeRenderer;return e.append(this._bgRenderer),e.append(this._horzTrenRenderer),e.append(this._vertTrenRenderer),e.append(this._labelRenderer),e},e}()},dTSQ:function(e,t,i){"use strict";function n(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}i.r(t),i.d(t,"regExpEscape",function(){return n})},dUDn:function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"StandardPivotPointsPriceAxisView",function(){return s}),n=i("mrSG"),o=i("KcY8"),r=["P","S1","R1","S2","R2","S3","R3","S4","R4","S5","R5"],s=function(e){function t(t,i){var n,o=e.call(this)||this;return o._source=t,o._data=i,n=i.name,o._completeName="P"===n.toUpperCase()?"P":"S"+n[1]+"/R"+n[1],o}return Object(n.__extends)(t,e),t.prototype._updateRendererData=function(e,t,i){var n,o,s,a,l,c,u,h;e.visible=!1,t.visible=!1,(n=this._source.properties()).visible.value()&&(o=this._completeName,(s=n.levelsStyle.visibility)[o]&&s[o].value()&&(a=this._source.model().timeScale(),l=this._source.priceScale(),
a.isEmpty()||null===a.visibleBarsStrictRange()||null!==l&&l.isEmpty()||(c=this._source.customData())&&c.pivots&&(u=this._source.pricesView().prices()[r.indexOf(this._data.name.toUpperCase())])&&(i.background=u.color,i.color=this.generateTextColor(u.color),i.coordinate=u.coordinate,i.floatCoordinate=u.floatCoordinate,(h=this._source.model().properties().scalesProperties).showStudyLastValue.value()&&(e.text=u.formatted,e.visible=!0),h.showStudyPlotLabels.value()&&(t.text=this._source.priceLabelText(this._data.name),t.visible=!0))))},t}(o.a)},dfhE:function(e,t,i){"use strict";var n,o,r,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P,C,T,x,I,L,M,A,k,E,O,D;i.r(t),i.d(t,"STATUS_OFFLINE",function(){return r}),i.d(t,"STATUS_RESOLVING",function(){return s}),i.d(t,"STATUS_LOADING",function(){return a}),i.d(t,"STATUS_READY",function(){return l}),i.d(t,"STATUS_INVALID_SYMBOL",function(){return c}),i.d(t,"STATUS_SNAPSHOT",function(){return u}),i.d(t,"STATUS_EOD",function(){return h}),i.d(t,"STATUS_PULSE",function(){return d}),i.d(t,"STATUS_DELAYED",function(){return p}),i.d(t,"STATUS_DELAYED_STREAMING",function(){return _}),i.d(t,"STATUS_NO_BARS",function(){return f}),i.d(t,"STATUS_REPLAY",function(){return m}),i.d(t,"STYLE_LINE_TYPE_MARKERS",function(){return y}),i.d(t,"STYLE_LINE_TYPE_STEP",function(){return g}),i.d(t,"STYLE_LINE_TYPE_SIMPLE",function(){return v}),i.d(t,"STYLE_BARS",function(){return S}),i.d(t,"STYLE_CANDLES",function(){return b}),i.d(t,"STYLE_LINE",function(){return w}),i.d(t,"STYLE_AREA",function(){return P}),i.d(t,"STYLE_RENKO",function(){return C}),i.d(t,"STYLE_KAGI",function(){return T}),i.d(t,"STYLE_PNF",function(){return x}),i.d(t,"STYLE_PB",function(){return I}),i.d(t,"STYLE_HEIKEN_ASHI",function(){return L}),i.d(t,"STYLE_HOLLOW_CANDLES",function(){return M}),i.d(t,"STYLE_BASELINE",function(){return A}),i.d(t,"STYLE_RANGE",function(){return k}),i.d(t,"STYLE_HILO",function(){return E}),i.d(t,"STYLE_SHORT_NAMES",function(){return O}),i.d(t,"SYMBOL_STRING_DATA",function(){return D}),r=0,s=1,a=2,l=3,c=4,u=5,h=6,d=7,p=8,_=9,f=10,m=11,y=0,g=1,v=2,S=0,b=1,w=2,P=3,C=4,T=5,x=6,I=7,L=8,M=9,A=10,k=11,E=12,(n={})[0]="bar",n[1]="candle",n[9]="hollowCandle",n[2]="line",n[3]="area",n[4]="renko",n[7]="pb",n[5]="kagi",n[6]="pnf",n[8]="ha",n[10]="baseline",n[11]="range",n[12]="hilo",O=n,(o={})[4]={type:"BarSetRenko@tv-prostudies",basicStudyVersion:34},o[7]={type:"BarSetPriceBreak@tv-prostudies",basicStudyVersion:34},o[5]={type:"BarSetKagi@tv-prostudies",basicStudyVersion:34},o[6]={type:"BarSetPnF@tv-prostudies",basicStudyVersion:34},o[8]={type:"BarSetHeikenAshi@tv-basicstudies",basicStudyVersion:60},o[11]={type:"BarSetRange@tv-basicstudies",basicStudyVersion:72},D=o},di4O:function(e,t,i){"use strict";function n(){var e,t,i=a.getJSON(u),n=Object.assign({},h,i);return void 0===i&&(void 0!==a.getJSON("chartproperties")&&void 0!==(e=a.getJSON("chartproperties").symbolWatermarkProperties)&&(t=Object(s.tryParseRgba)(e.color),n=Object.assign(n,e),null!==t&&(0!==t[3]?n.visibility=!0:(t[3]=.25,n.color=Object(s.rgbaToString)(t)))),
delete n.transparency),n}function o(){return null===d&&(d=new c.a(n()),a.onSync.subscribe(null,function(){null!==d&&d.mergeAndFire(n())}),d.listeners().subscribe(null,function(){null!==d&&a.setJSON(u,d.state())})),d}function r(){null!==d&&d.mergeAndFire(h)}var s,a,l,c,u,h,d;i.r(t),i.d(t,"watermarkProperty",function(){return o}),i.d(t,"restoreWatermarkPropertyDefaults",function(){return r}),s=i("eJTA"),a=i("Vdly"),l=i("tc+8"),c=i.n(l),u="symbolWatermark",h={visibility:!1,color:"rgba(80, 83, 94, 0.25)"},d=null},e1ZQ:function(e,t,i){"use strict";var n,o,r,s,a,l,c,u,h,d,p,_,f,m;i.r(t),i.d(t,"dateFormatFunctions",function(){return _}),i.d(t,"availableDateFormats",function(){return f}),i.d(t,"defaultDateFormat",function(){return m}),n=i("YFKU"),o=i("kcTO"),r={1:n.t("Jan"),2:n.t("Feb"),3:n.t("Mar"),4:n.t("Apr"),5:n.t("May"),6:n.t("Jun"),7:n.t("Jul"),8:n.t("Aug"),9:n.t("Sep"),10:n.t("Oct"),11:n.t("Nov"),12:n.t("Dec")},s=function(e,t){return(t?e.getMonth():e.getUTCMonth())+1},a=function(e,t){return t?e.getDate():e.getUTCDate()},l=function(e,t){return t?e.getFullYear():e.getUTCFullYear()},c=function(e,t){return Object(o.numberToStringWithLeadingZero)(a(e,t),2)},u=function(e,t){return r[s(e,t)]},h=function(e,t){return Object(o.numberToStringWithLeadingZero)(s(e,t),2)},d=function(e,t){return Object(o.numberToStringWithLeadingZero)(l(e,t)%100,2)},p=function(e,t){return Object(o.numberToStringWithLeadingZero)(l(e,t),4)},_={"dd MMM 'yy":function(e,t){return c(e,t)+" "+u(e,t)+" '"+d(e,t)},"MMM dd":function(e,t){return u(e,t)+" "+c(e,t)},"yyyy-MM-dd":function(e,t){return p(e,t)+"-"+h(e,t)+"-"+c(e,t)},"yy-MM-dd":function(e,t){return d(e,t)+"-"+h(e,t)+"-"+c(e,t)},"yy/MM/dd":function(e,t){return d(e,t)+"/"+h(e,t)+"/"+c(e,t)},"yyyy/MM/dd":function(e,t){return p(e,t)+"/"+h(e,t)+"/"+c(e,t)},"dd-MM-yyyy":function(e,t){return c(e,t)+"-"+h(e,t)+"-"+p(e,t)},"dd-MM-yy":function(e,t){return c(e,t)+"-"+h(e,t)+"-"+d(e,t)},"dd/MM/yy":function(e,t){return c(e,t)+"/"+h(e,t)+"/"+d(e,t)},"dd/MM/yyyy":function(e,t){return c(e,t)+"/"+h(e,t)+"/"+p(e,t)},"MM/dd/yy":function(e,t){return h(e,t)+"/"+c(e,t)+"/"+d(e,t)},"MM/dd/yyyy":function(e,t){return h(e,t)+"/"+c(e,t)+"/"+p(e,t)}},f=Object.keys(_),m=function(){return-1!==["ja","ko","zh","zh_TW"].indexOf(window.language||"")?"yyyy-MM-dd":"dd MMM 'yy"}},e92V:function(e,t,i){"use strict";function n(e){return!1}function o(e){return e in r||!1}var r;i.d(t,"b",function(){return n}),i.d(t,"a",function(){return o}),r=i("OH2X")},eJTA:function(e,t,i){"use strict";function n(e,t,i){return M.isNaN(t)?e:t<e?e:t>i?i:Math.round(t)}function o(e,t,i){return M.isNaN(t)?e:t<e?e:t>i?i:Math.round(1e4*t)/1e4}function r(e){return n(0,e,255)}function s(e){return n(0,e,255)}function a(e){return n(0,e,255)}function l(e){return o(0,e,1)}function c(e){return o(0,e,1)}function u(e){return o(0,e,1)}function h(e){return o(0,e,1)}function d(e){return o(0,e,1)}function p(e){return o(0,e,1)}function _(e){var t,i=e[0],n=e[1],o=e[2],r=i/255,s=n/255,a=o/255,l=Math.min(r,s,a),c=Math.max(r,s,a),u=0,h=0,d=(l+c)/2;if(l===c)u=0,
h=0;else switch(t=c-l,h=d>.5?t/(2-c-l):t/(c+l),c){case r:u=((s-a)/t+(s<a?6:0))/6;break;case s:u=((a-r)/t+2)/6;break;case a:u=((r-s)/t+4)/6}return[u,h,d]}function f(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function m(e){var t,i,n,o,l,c=e[0],u=e[1],h=e[2];return 0===u?t=i=n=h:(t=f(l=2*h-(o=h<.5?h*(1+u):h+u-h*u),o,c+1/3),i=f(l,o,c),n=f(l,o,c-1/3)),[r(255*t),s(255*i),a(255*n)]}function y(e){return A[0]*e[0]+A[1]*e[1]+A[2]*e[2]}function g(e,t,i){var n,o;return void 0===i&&(i=.05),o=(n=_(e))[0]+t*i,n[0]=c(o-Math.floor(o)),m(n)}function v(e,t,i){var n,o,r,s,a;return void 0===i&&(i=.05),n=e[0],o=e[1],r=e[2],s=e[3],[(a=g([n,o,r],t,i))[0],a[1],a[2],s]}function S(e,t){return t in e}function b(e){var t=E.re.exec(e);return null!==t?E.parse(t):null}function w(e){var t=O.re.exec(e);return null!==t?O.parse(t):null}function P(e){var t=D.re.exec(e);return null!==t?D.parse(t):null}function C(e){var t=V.re.exec(e);return null!==t?V.parse(t):null}function T(e){return"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function x(e){var t,i,n,o,r;if(e=e.toLowerCase(),S(k,e)){if(null!==(t=w(k[e])))return t;throw new Error("Invalid named color definition")}return null!==(i=b(e))?i:null!==(n=w(e))?n:null!==(o=P(e))?o:null!==(r=C(e))?[r[0],r[1],r[2]]:null}function I(e){var t,i,n,o,r;if(e=e.toLowerCase(),S(k,e)){if(null!==(t=w(k[e])))return[t[0],t[1],t[2],1];throw new Error("Invalid named color definition")}return null!==(i=b(e))?[i[0],i[1],i[2],1]:null!==(n=w(e))?[n[0],n[1],n[2],1]:null!==(o=P(e))?[o[0],o[1],o[2],1]:null!==(r=C(e))?r:null}function L(e){var t=I(e);if(null!==t)return t;throw new Error("Passed color string does not match any of the known color representations")}var M,A,k,E,O,D,V;Object.defineProperty(t,"__esModule",{value:!0}),M=i("ivNn"),t.normalizeRedComponent=r,t.normalizeGreenComponent=s,t.normalizeBlueComponent=a,t.normalizeAlphaComponent=l,t.rgb=function(e,t,i){return[r(e),s(t),a(i)]},t.areEqualRgb=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]},t.rgba=function(e,t,i,n){var o,c;return Array.isArray(e)?(n=t,[(o=e)[0],o[1],o[2],l(n)]):(c=t,i=i||0,n=n||0,[r(e),s(c),a(i),l(n)])},t.areEqualRgba=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},t.normalizeHue=c,t.normalizeHslSaturation=u,t.normalizeHsvSaturation=h,t.normalizeLightness=d,t.normalizeValue=p,t.hsl=function(e,t,i){return[c(e),u(t),d(i)]},t.areEqualHsl=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]},t.hsv=function(e,t,i){return[c(e),h(t),p(i)]},t.areEqualHsv=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]},t.rgbToHsl=_,t.hslToRgb=m,t.rgbToHsv=function(e){var t=e[0],i=e[1],n=e[2],o=t/255,r=i/255,s=n/255,a=Math.min(o,r,s),l=Math.max(o,r,s),c=l-a,u=0,h=0===l?0:c/l,d=l;if(l===a)u=0;else switch(l){case t:u=((r-s)/c+(r<s?6:0))/6;break;case i:u=((s-o)/c+2)/6;break;case n:u=((o-r)/c+4)/6}return[u,h,d]},t.hsvToRgb=function(e){var t=e[0],i=e[1],n=e[2],o=Math.floor(6*t),l=6*t-o,c=n*(1-i),u=n*(1-l*i),h=n*(1-(1-l)*i),d=0,p=0,_=0;switch(o%6){case 0:d=n,p=h,_=c;break;case 1:d=u,p=n,
_=c;break;case 2:d=c,p=n,_=h;break;case 3:d=c,p=u,_=n;break;case 4:d=h,p=c,_=n;break;case 5:d=n,p=c,_=u}return[r(255*d),s(255*p),a(255*_)]},A=[.199,.687,.114],t.rgbToGrayscale=y,t.distanceRgb=function(e,t){var i=e[0],n=e[1],o=e[2],r=t[0],s=t[1],a=t[2],l=r-i,c=s-n,u=a-o;return Math.sqrt(l*l+c*c+u*u)},t.invertRgb=function(e){return[255-e[0],255-e[1],255-e[2]]},t.darkenRgb=function(e,t){var i=_(e);return m([i[0],i[1],d(i[2]-t/100)])},t.blendRgba=function(e,t){var i=e[0],n=e[1],o=e[2],c=e[3],u=t[0],h=t[1],d=t[2],p=t[3],_=l(1-(1-p)*(1-c)),f=r(u*p/_+i*c*(1-p)/_),m=s(h*p/_+n*c*(1-p)/_),y=a(d*p/_+o*c*(1-p)/_);return[f,m,y,_]},t.shiftRgb=g,t.shiftRgba=v,t.shiftColor=function(e,t,i){return void 0===i&&(i=.05),T(v(L(e),t,i))},k={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",feldspar:"#d19275",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslateblue:"#8470ff",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",
red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",violetred:"#d02090",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},function(e){e.re=/^rgb\(\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*\)$/,e.parse=function(e){return[r(parseInt(e[1],10)),s(parseInt(e[2],10)),a(parseInt(e[3],10))]}}(E||(E={})),t.rgbToString=function(e){return"rgb("+e[0]+", "+e[1]+", "+e[2]+")"},function(e){e.re=/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,e.parse=function(e){return[r(parseInt(e[1],16)),s(parseInt(e[2],16)),a(parseInt(e[3],16))]}}(O||(O={})),t.rgbToHexString=function(e){var t=e[0],i=e[1],n=e[2],o=t.toString(16),r=i.toString(16),s=n.toString(16);return"#"+(1===o.length?"0":"")+o+(1===r.length?"0":"")+r+(1===s.length?"0":"")+s},function(e){e.re=/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/,e.parse=function(e){return[r(parseInt(e[1]+e[1],16)),s(parseInt(e[2]+e[2],16)),a(parseInt(e[3]+e[3],16))]}}(D||(D={})),function(e){e.re=/^rgba\(\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?[\d]{0,10}(?:\.\d+)?)\s*\)$/,e.parse=function(e){return[r(parseInt(e[1],10)),s(parseInt(e[2],10)),a(parseInt(e[3],10)),l(parseFloat(e[4]))]}}(V||(V={})),t.rgbaToString=T,t.rgbToBlackWhiteString=function(e,t){if(t<0||t>255)throw new Error("invalid threshold value, valid values are [0, 255]");return y(e)>=t?"white":"black"},t.tryParseRgb=x,t.parseRgb=function(e){var t=x(e);if(null!==t)return t;throw new Error("Passed color string does not match any of the known color representations")},t.tryParseRgba=I,t.parseRgba=L},ePL1:function(e,t,i){"use strict";i.r(t),i.d(t,"types",function(){return n});var n={ECONOMIC:"economic",QUANDL:"quandl"}},ei7k:function(e,t,i){"use strict";function n(e){return Object(r.clean)(JSON.stringify(e))}function o(e){return JSON.parse(Object(r.clean)(e,!0))}var r;i.d(t,"b",function(){return n}),i.d(t,"a",function(){return o}),r=i("CLNU")},f3xO:function(e,t,i){"use strict";var n,o,r,s,a,l,c,u,h,d,p;i.r(t),i.d(t,"PaneRendererUnicodeChar",function(){return p}),n=i("mrSG"),o=i("/SnT"),r=i.n(o),s=i("Eyy1"),a=i("aO4+"),l=i("2WC2"),c=i("VdBB"),u=i("Zp/P"),h=i("zDbI"),d=i("gBDZ"),p=function(e){function t(t,i){var n,o=e.call(this,t,i)||this;return o._heightEnsured=Object(s.ensureDefined)(o._height),n=t.char.slice(0,40),o._ch=r()(n)[0]||" ",o._fontFamily=t.fontFamily||h.CHART_FONT_FAMILY,o._charCache=new d.b(o._ch,!1,!1,o._fontFamily,o._heightEnsured),o}return Object(n.__extends)(t,e),t.prototype.hitTest=function(e){var t,i,n,o=Object(u.selectionTolerance)(this._heightEnsured);for(t=0,i=this._items;t<i.length;t++)if(n=i[t],
new a.Point(n.x,n.y+n.vertOffset).subtract(e).length()<=o)return new c.HitTestResult(c.HitTestResult.REGULAR);return null},t.prototype._drawItemShape=function(e,t){var i,n=t.x,o=t.vertOffset>0?1:-1,r=t.y+t.vertOffset-o*Math.round(this._heightEnsured/2);i=t.style&&void 0!==t.style.color?t.style.color:this._color,this._charCache.paintTo(e,i,n,r,d.a.Center,t.vertOffset>0?d.c.Middle:d.c.Bottom)},t.prototype._startPath=function(e,t,i){},t.prototype._endPath=function(e){},t}(l.b)},f6yo:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i("hBTJ");t.pointInHalfplane=function(e,t){var i=t.edge,n=i.A*e.x+i.B*e.y+i.C>0;return n===t.isPositive},t.pointInTriangle=function(e,t,i,o){var r=t.add(i).scaled(.5),s=r.add(o).scaled(.5),a=n.intersectLineSegments(t,i,s,e);return null===a&&null===(a=n.intersectLineSegments(i,o,s,e))&&null===(a=n.intersectLineSegments(o,t,s,e))},t.pointInBox=function(e,t){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},t.pointInPolygon=function(e,t){var i,n,o,r=t.length-1,s=!1,a=e.x,l=e.y;for(i=0;i<t.length;i++)n=t[i],o=t[r],(n.y<l&&o.y>=l||o.y<l&&n.y>=l)&&n.x+(l-n.y)/(o.y-n.y)*(o.x-n.x)<a&&(s=!s),r=i;return s},t.pointInCircle=function(e,t,i){var n=(e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y),o=i*i;return n<=o}},fJhV:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"LineDataSourceTimeAxisView",function(){return r}),n=i("kw0O"),o=i("sWfm"),r=function(){function e(e,t){this._rendererData={background:"#2196F3",color:"",coordinate:0,text:"",visible:!1,width:0},this._renderer=new o.a,this._active=!1,this._invalidated=!0,this._source=e,this._pointIndex=t,this._renderer.setData(this._rendererData)}return e.prototype.setActive=function(e){this._active=e},e.prototype.update=function(){this._invalidated=!0},e.prototype.renderer=function(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._renderer},e.prototype.coordinate=function(){return this._rendererData.coordinate},e.prototype._updateImpl=function(){var e,t,i,o,r,s=this._rendererData;s.visible=!1,(t=(e=this._source.model()).timeScale()).isEmpty()||(i=this._source.axisPoints()).length<=this._pointIndex||e.selection().isSelected(this._source)&&(s.text="",o=i[this._pointIndex].index,s.coordinate=t.indexToCoordinate(o),(r=t.indexToUserTime(o))&&(s.text=e.dateTimeFormatter().format(r)),s.background=this._active?"#1565C0":e.isDark()?"#1E88E5":"#2196F3",s.color=Object(n.a)(s.background),s.width=t.width(),s.visible=!0)},e}()},fPdn:function(e,t,i){"use strict";window.TradingView=window.TradingView||{},window.requireAll=function(e){return e.keys().map(e)},i("6jKD"),i("bZMm"),i("P5fv"),i("YFKU"),i("sE80"),i("si6p"),i("bf9a"),i("6Q5q"),i("e+pU"),i("QfXN"),i("lPLC"),i("mKhQ"),i("32f0"),i("Myip"),i("2+4i"),i("QYoC"),i("oA7e"),i("qFKp"),i("1oAu"),i("ogJP"),i("jFln"),i("HbRj"),i("VVxS"),i("CLNU"),i("mZrn"),i("Vdly"),i("+GxX"),i("xL1m")},fTGZ:function(e,t,i){"use strict";(function(e,n,o){function r(t,i){var r,a=t._undoModel._chartWidget,l=a.onWidget(),c=!1
;c=l?a._options&&!a._options.hideIdeas:!!e.enabled("bars_marks")&&TVSettings.getBool("BarsMarksContainer.visibile",!1),i?i.merge({visible:c,frozen:!1}):i=new n({visible:c,frozen:!1}),r=this,i.visible.listeners().subscribe(null,function(t){l||a._containsData||!e.enabled("bars_marks")||TVSettings.setValue("BarsMarksContainer.visibile",!!t.value()),r._tooltip&&r._tooltip.removeAll()}),s._configureProperties(i),s.call(this,t,i),this.onNeedRepaint=new o,this._requests=[],this._marks={},this._loadedRange=null,this._getDataTimeout=null,this._collectedRange=null,this._model.mainSeries().onSymbolIntervalChanged().subscribe(this,this.clearMarks),this._model.mainSeries().dataEvents().symbolResolved().subscribe(this,this.clearMarks),this._model.mainSeries().dataEvents().tickMarksRangeChanged().subscribe(this,this.getData),this._initialize(),this.pinnedTooltips={},this._tooltip=new u(this._createTooltip.bind(this),this)}var s=i("Ss5c").LineDataSource,a=i("ogJP").isNumber,l=i("BOPY").BarsMarksContainerPaneView,c=i("BOPY").BarsMarksContainerRenderer,u=i("Bt3k").TooltipRenderer,h=i("LxhU").Interval,d=i("n5al").isPriceSourceStyle,p=i("uOxu").getLogger("Chart.BarsMarksContainer");inherit(r,s),r.prototype._constructor="Child class must override this member",r.prototype._initialize=function(e){throw new Error("Child class must override this member")},r.prototype.onClicked=function(){throw new Error("Child class must override this member")},r.prototype._getData=function(e){throw new Error("Child class must override this member")},r.prototype._createTooltip=function(){throw new Error("Child class must override this member")},r.prototype.updateDotData=function(e,t){return t},r.prototype.updatePlateData=function(e,t){},r.prototype.isAvailableInFloatingWidget=function(){return!1},r.prototype._plateViewData=function(e){return{}},r.prototype.pinTooltip=function(e,t){this.pinnedTooltips[e]=t},r.prototype.timeScale=function(){return this._model.timeScale()},r.prototype.getIntervalInTicks=function(){var e=this._model.mainSeries().properties().interval.value(),t=h.parse(e);if(!t.isValid())throw new TypeError("Unexpected interval");return t.isRange()?60:t.inMilliseconds()/1e3},r.prototype._maxDate=Math.round(new Date(2037,0,1).getTime()/1e3),r.prototype.getVisibleTickMarksRange=function(){var e,t;return this.timeScale().isEmpty()?{start:0,end:0}:(e=this.timeScale().visibleBarsStrictRange()).lastBar()>this.timeScale().points().firstIndex()&&e.firstBar()<this.timeScale().points().lastIndex()?(t=e.lastBar()<this.timeScale().points().lastIndex()?this.timeScale().indexToTimePoint(e.lastBar()):this._maxDate,{start:(e={start:this.timeScale().indexToTimePoint(Math.max(e.firstBar(),this.timeScale().points().firstIndex())),end:t}).start?e.start:void 0,end:e.end?e.end:void 0}):{start:0,end:0}},r.prototype.getVisibleRangePlates=function(){var e=[],t=this.getVisibleTickMarksRange(),i=this.getIntervalInTicks();return Object.keys(this._marks).forEach(function(n){var o=this._marks[n],r=o.tickmark;r>=t.start&&r<=t.end+i&&e.push(o)},this),e},
r.prototype.getPublishedPlates=function(){var e={},t=this;return is_authenticated?(this.getVisibleRangePlates().forEach(function(i){i.is_public&&(t.pinnedTooltips[i.id]||i.user__id===user.id)&&(e[i.id]=i)}),e):e},r.prototype._maxPlatesPerBar=10,r.prototype.filterDisplayedPlates=function(e){return e=e.reduce(function(e,t){var i=this._getIndex(t.tickmark);return e[i]=e[i]||[],e[i].push(t),e}.bind(this),{}),e=Object.keys(e).reduce(function(t,i){var n=e[i];return n=(n=n.sort(function(e,t){return t.views_count-e.views_count})).slice(0,this._maxPlatesPerBar),t.concat(n)}.bind(this),[])},r.prototype._layout=function(e){switch(e){default:case 0:return"up";case 1:return"down";case 2:return"up";case 3:case 4:case 5:case 6:return"up"}},r.prototype._theme=function(e){switch(e){default:case 0:return"neutral";case 1:return"green";case 2:return"red";case 3:return"yellow";case 4:return"blue";case 5:return"green";case 6:return"red"}},r.prototype._offset=function(e,t,i){var n;switch(e){default:case"up":n=null===i?t[TradingView.HIGH_PLOT]:i(t);break;case"down":n=null===i?t[TradingView.LOW_PLOT]:i(t)}return this.priceScale().priceToCoordinate(n,this.ownerSource().firstValue())},r.prototype._getIndex=function(e){return this.timeScale().timePointToIndex(e)},r.prototype.getViewData=function(){return{barWidth:this.barWidth(),plates:this.getPlatesViewData(),tooltip:this._tooltip}},r.prototype.barWidth=function(){return this.timeScale().barSpacing()},r.prototype.getPlatesViewData=function(){var e,t,i,n,o,r,s,a=this._model.mainSeries();if(a.data().isEmpty())return[];for(e=d(a.style())?a.barFunction():null,t=this.filterDisplayedPlates(this.getVisibleRangePlates()),i=this,n={},o=this._model.lastHittestData(),r=(t=(t=t.map(function(t){var r,s,a,l,c,u,h,d=this._getIndex(t.tickmark),p=this._getBar(d);return null!==p&&(r=this._layout(t.direction),s=this._theme(t.direction),a=o&&o.id===t.id,l=this.timeScale().indexToCoordinate(d),c=this._offset(r,p,e),u=this.priceScale().isInverted(),h=0,d in n||(n[d]={up:0,down:0}),h=n[d][r]++,TradingView.merge({id:t.id,x:l,y:c,yInverted:u,order:h,direction:r,theme:s,hovered:a,pinned:!0===i.pinnedTooltips[t.id],user__id:t.user__id,label:t.label,labelFontColor:t.labelFontColor||"#444",minSize:t.minSize||5},this._plateViewData(t)))}.bind(this))).filter(function(e){return!!e})).filter(function(e){return!0===e.hovered}),s=0;s<t.length;s++)null!=r[0]&&t[s].user__id===r[0].user__id&&(t[s].highlightByAuthor=!0);return t.sort(function(e,t){return e.hovered&&!t.hovered?1:0}),t},r.prototype._getBar=function(e){return this._model.mainSeries().data().valueAt(e)},r.prototype.paneViews=function(){var e=this;return this._properties.visible.value()?[new l(this,function(t){return new c(t.getViewData(),e)})]:[]},r.prototype.dataWindowView=function(){return null},r.prototype.priceAxisViews=function(){return null},r.prototype.statusView=function(){return null},r.prototype.updateAllViews=function(){},r.prototype.pointsCount=function(){return 0},r.prototype.properties=function(){return this._properties},
r.prototype._rangeDifference=function(e){return e=Object.assign({},e),this._loadedRange&&(e.start<this._loadedRange.start?e.end=this._loadedRange.start:e.end>this._loadedRange.end&&(e.start=this._loadedRange.end)),e},r.prototype._rangeUnion=function(e,t){return e=Object.assign({},e),t&&(e.start=Math.min(t.start,e.start),e.end=Math.max(t.end,e.end)),e},r.prototype._pushGetDataStack=function(e){a(e.start)&&a(e.end)?(this._getDataTimeout&&clearTimeout(this._getDataTimeout),this._collectedRange=this._rangeUnion(e,this._collectedRange),this._getDataTimeout=setTimeout(function(){this._getData(this._collectedRange),this._getDataTimeout=this._collectedRange=null}.bind(this),300)):p.logError("Wrong tickmark range")},r.prototype.roundRange=function(e){return{start:Math.round(e.start),end:Math.round(e.end)}},r.prototype.refreshData=function(){this.getData(this._lastRange)},r.prototype.getData=function(e){a(e.start)&&a(e.end)?(this._lastRange=e,(e=Object.assign({},e)).end=this._maxDate,this._pushGetDataStack(e)):p.logError("Wrong range")},r.prototype._abortAllRequests=function(){this._requests.forEach(function(e){e.abort()}),this._requests=[],this._getDataTimeout&&clearTimeout(this._getDataTimeout),this._getDataTimeout=this._collectedRange=null},r.prototype.clearMarks=function(){this._abortAllRequests(),this._marks={},this._loadedRange=null},t.BarsMarksContainer=r}).call(this,i("Kxc7"),i("tc+8"),i("aIyQ"))},fgLi:function(e,t,i){"use strict";var n,o,r,s,a,l;i.r(t),i.d(t,"DataSource",function(){return l}),n=i("hY0g"),o=i.n(n),r=i("0waE"),s=i("aIyQ"),a=i.n(s),l=function(){function e(){this.hasAlert=new o.a(!1),this._zorder=0,this.m_priceScale=null,this._id=Object(r.randomHashN)(6),this._ownerSource=null,this._userEditEnabled=!0,this._onPriceScaleChanged=new a.a,this._ownerSourceChanged=new a.a}return e.prototype.id=function(){return this._id},e.prototype.preferNoScale=function(){return!1},e.prototype.idForAlert=function(){return this._id},e.prototype.setId=function(e){this._id=e},e.prototype.zorder=function(){return this._zorder},e.prototype.setZorder=function(e){"number"==typeof e&&this._zorder!==e&&(this._zorder=e)},e.prototype.title=function(){throw new Error("Implement this fun in a subclass")},e.prototype.priceScale=function(){return this.m_priceScale},e.prototype.setPriceScale=function(e){this.m_priceScale=e,this._onPriceScaleChanged.fire()},e.prototype.ownerSource=function(){return this._ownerSource},e.prototype.setOwnerSource=function(e){this._ownerSource=e,this._ownerSourceChanged.fire()},e.prototype.ownerSourceChanged=function(){return this._ownerSourceChanged},e.prototype.isSavedInChart=function(e){return!0},e.prototype.isSavedInStudyTemplates=function(){return!0},e.prototype.isRemovedByStudyTemplates=function(){return!0},e.prototype.hasContextMenu=function(){return!0},e.prototype.showInObjectTree=function(){return!0},e.prototype.setUserEditEnabled=function(e){this._userEditEnabled=e},e.prototype.userEditEnabled=function(){return this._userEditEnabled},e.prototype.canBeHidden=function(){return this.userEditEnabled()},
e.prototype.isUserDeletable=function(){return this.userEditEnabled()},e.prototype.canHasAlert=function(){return!1},e.prototype.properties=function(){throw new Error("Implement this fun in a subclass")},e.prototype.isVisible=function(){return this.properties().visible.value()},e.prototype.statusView=function(){return null},e.prototype.dataWindowView=function(){return null},e.prototype.legendView=function(){return null},e.prototype.priceAxisViews=function(e,t){return null},e.prototype.updateAllViews=function(){},e.prototype.paneViews=function(){return null},e.prototype.isFailed=function(){return!1},e.prototype.isLoading=function(){return!1},e.prototype.isChildStudy=function(){return!1},e.prototype.hasChildren=function(){return!1},e.prototype.canHaveChildren=function(){return!1},e.prototype.onClickOutside=function(){},e.prototype.getInputsPropertyPage=function(){return null},e.prototype.getStylesPropertyPage=function(){return null},e.prototype.getDisplayPropertyPage=function(){return null},e.prototype.getVisibilitiesPropertyPage=function(){return null},e.prototype.getStrategyPropertyPage=function(){return null},e.prototype.getSourceIcon=function(){return null},e.prototype.state=function(e){throw new Error("Implement this fun in a subclass")},e.prototype.onPriceScaleChanged=function(){return this._onPriceScaleChanged},e.prototype.doesMovingAffectsUndo=function(){return!0},e.prototype.copiable=function(){return!1},e.prototype.cloneable=function(){return!1},e.prototype.movable=function(){return!1},e}()},fs3R: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(6 4)"><rect width="15" height="12" rx="2" x=".5" y="7.5"/><path stroke-linecap="round" stroke-width="2" d="M8 14v2"/><path d="M11.5 7.5V4a3.5 3.5 0 0 0-7 0v3.5"/></g></svg>'},fxzW:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"PaneRendererDiamond",function(){return r}),n=i("mrSG"),o=i("2WC2"),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._drawItemShape=function(e,t){var i=Math.round(t.height/2),n=t.x,o=t.vertOffset,r=t.y+o;e.moveTo(n,r-i),e.lineTo(n+i,r),e.lineTo(n,r+i),e.lineTo(n-i,r),e.lineTo(n,r-i)},t}(o.a)},g5Qf:function(e,t,i){"use strict";function n(){return a}function o(){null===a&&(a=new Promise(function(e){Promise.all([i.e(22),i.e(29),i.e(32),i.e(65),i.e(18),i.e(25),i.e("line-tools-icons"),i.e(42),i.e("floating-toolbars")]).then(function(t){if(null===s){var n=i("gmn6").FavoriteDrawingToolbar;s=new n({left:window.innerWidth/2,top:r.HEADER_TOOLBAR_HEIGHT_EXPANDED+61}),e(s)}}.bind(null,i)).catch(void 0)}))}var r,s,a;i.r(t),i.d(t,"getFavoriteDrawingToolbarPromise",function(){return n}),i.d(t,"createFavoriteDrawingToolbar",function(){return o}),i("YFKU"),r=i("yMne"),s=null,a=null},gBDZ:function(e,t,i){"use strict";var n,o,r,s,a;i.d(t,"a",function(){return r}),i.d(t,"c",function(){return s}),i.d(t,"b",function(){return a}),n=i("XlJ7"),o=i("Eyy1"),function(e){e.Left="left",
e.Right="right",e.Center="center"}(r||(r={})),function(e){e.Top="top",e.Bottom="bottom",e.Middle="middle"}(s||(s={})),a=function(){function e(e,t,i,r,s){var a,l,c,u,h,d,p;for(this._canvasesMap={},this._lines=e.split(/[^\S\r\n]*(?:\r\n|\r|\n)/),this._font=function(e,t,i,o){return Object(n.makeFont)(o,i,(e?"bold ":"")+(t?"italic ":""))}(t,i,r,s),this._fontSize=s,this._verticalPadding=~~(s/6),a=document.createElement("canvas"),(l=Object(o.ensureNotNull)(a.getContext("2d"))).font=this._font,c=0,u=0,h=this._lines;u<h.length;u++)d=h[u],p=l.measureText(d).width,c=Math.max(c,p);this.textImageWidth=c+1,this.textImageHeight=this._lines.length*s+this._verticalPadding}return e.prototype.paintTo=function(e,t,i,n,o,r){var s,a,l=this._getTextImage(t);0!==l.width&&0!==l.height&&(s=function(e,t,i){var n=e;switch(t){case"left":break;case"right":n-=i;break;case"center":n-=i/2}return Math.round(n)}(i,o,this.textImageWidth),a=function(e,t,i){var n=e;switch(t){case"top":break;case"bottom":n-=i;break;case"middle":n-=i/2}return Math.round(n)}(n,r,this.textImageHeight),e.drawImage(l,s-.5,a-.5))},e.prototype._getTextImage=function(e){var t,i,n,r,s,a,l;if(this._canvasesMap[e])return this._canvasesMap[e];for((t=document.createElement("canvas")).setAttribute("width",String(this.textImageWidth)),t.setAttribute("height",String(this.textImageHeight)),(i=Object(o.ensureNotNull)(t.getContext("2d"))).textBaseline="top",i.font=this._font,i.textAlign="center",i.fillStyle=e,n=Math.round(this.textImageWidth/2),r=this._verticalPadding,s=0,a=this._lines;s<a.length;s++)l=a[s],i.fillText(l,n,r),r+=this._fontSize;return this._canvasesMap[e]=t,t},e}()},gLxC:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolNote";var o=t||n.createProperties();r.call(this,e,o),this.version=n.version,i.e("lt-pane-views").then(function(e){var t=i("Dz+H").NotePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}function o(e,t){var i=t||o.createProperties();n.call(this,e,i)}var r=i("Ss5c").LineDataSource,s=i("tc+8"),a=i("Ocx9").DefaultProperty,l=i("hayr").propertyPages,c=window.t("Note");inherit(n,r),n.TOOLTIP_WIDTH=300,n.TOOLTIP_PADDING=10,n.TOOLTIP_LINESPACING=5,n.version=1,n.prototype.pointsCount=function(){return 1},n.prototype.title=function(){return c},n.prototype.name=function(){return"Note"},n.prototype.getTooltipWidth=function(){return n.TOOLTIP_WIDTH},n.prototype.getTooltipPadding=function(){return n.TOOLTIP_PADDING},n.prototype.getTooltipLineSpacing=function(){return n.TOOLTIP_LINESPACING},n.prototype.template=function(){var e=r.prototype.template.call(this);return e.text=this.properties().childs().text.value(),e},n.prototype._applyTemplateImpl=function(e){r.prototype._applyTemplateImpl.call(this,e),this.properties().childs().text.setValue(e.text)},n.createProperties=function(e){var t=new a("linetoolnote",e);return n._configureProperties(t),t},n._configureProperties=function(e){r._configureProperties(e),e.hasChild("text")||e.addChild("text",new s(window.t("Text"))),e.addExclusion("text")},inherit(o,n),
o.prototype.title=function(){return window.t("Anchored Note")},o.prototype.name=function(){return"Anchored Note"},o.prototype.isFixed=function(){return!0},o.prototype.hasEditableCoordinates=function(){return!1},o.createProperties=function(e){var t=new a("linetoolnoteabsolute",e);return o._configureProperties(t),t},o._configureProperties=function(e){n._configureProperties(e)},n.prototype.state=function(e){var t=r.prototype.state.call(this,e);return e&&(t.state.fixedSize=!1),t},n.prototype.getStylesPropertyPage=function(){return l.LineToolNotePropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("74nv").NoteDefinitionsViewModel}.bind(null,i)).catch(i.oe)},t.LineToolNote=n,t.LineToolNoteAbsolute=o},gMtF:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"LineToolRiskRewardPriceAxisView",function(){return r}),n=i("mrSG"),o=i("KcY8"),r=function(e){function t(t,i){var n=e.call(this)||this;return n._source=t,n._data=i,n}return Object(n.__extends)(t,e),t.prototype._updateRendererData=function(e,t,i){var n,o,r,s,a;e.visible=!1,n=this._source.priceScale(),0===this._source.points().length||null===n||n.isEmpty()||null!==(r=null!==(o=this._source.ownerSource())?o.firstValue():null)&&(s=this._data.priceProperty.value(),a=this._data.colorProperty.value(),i.background=a,i.color=this.generateTextColor(a),i.coordinate=n.priceToCoordinate(s,r),e.text=n.formatPrice(s,r),e.visible=!0)},t}(o.a)},gP14:function(e,t,i){"use strict";function n(e,t){var i=e.indexOf(t);return-1!==i&&(e.splice(i,1),!0)}var o,r,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P,C,T,x,I;i.r(t),o=i("Eyy1"),r=i("vTIA"),s=i("8sOK"),a=i("LxhU"),l=i("3ClC"),c=i("aIyQ"),u=i.n(c),h=i("hY0g"),d=i.n(h),p=i("i1o5"),_=i("Kxc7"),f=i("iDOr"),m=i("4kQX"),y=i("gQ5K"),g={dateFormat:"yyyy-MM-dd",timeFormat:"%h:%m:%s",dateTimeSeparator:" "},v=function(){function e(e){void 0===e&&(e={});var t=Object.assign({},g,e);this._dateFormatter=new y.DateFormatter(t.dateFormat),this._timeFormatter=new m.TimeFormatter(t.timeFormat),this._separator=t.dateTimeSeparator}return e.prototype.format=function(e){return""+this._dateFormatter.format(e)+this._separator+this._timeFormatter.format(e)},e.prototype.formatLocal=function(e){return""+this._dateFormatter.formatLocal(e)+this._separator+this._timeFormatter.formatLocal(e)},e}(),S=i("ZZnO"),b=i("mPvX"),w=i("tc+8"),P=i.n(w),C=function(){function e(e){this._appliedTimeFrame=new P.a(null),this._appliedTimeFrameInfo=null,this._model=e,e.mainSeries().dataEvents().messageReceived().subscribe(this,this._onSeriesMessageReceived)}return e.prototype.destroy=function(){this._model.timeScale().logicalRangeChanged().unsubscribeAll(this),this._model.mainSeries().dataEvents().messageReceived().unsubscribeAll(this)},e.prototype.appliedTimeFrame=function(){return this._appliedTimeFrame},e.prototype._onSeriesMessageReceived=function(e){if("series_timeframe"===e.method){var t=this._model.timeScale()
;t.logicalRangeChanged().unsubscribe(this,this._invalidateAppliedTimeFrame),t.logicalRangeChanged().subscribe(this,this._invalidateAppliedTimeFrame),this._appliedTimeFrameInfo={logicalRange:t.logicalRange(),baseIndex:t.baseIndex()}}},e.prototype._invalidateAppliedTimeFrame=function(){var e,t,i,n,o;null!==this._appliedTimeFrameInfo&&(t=(e=this._model.timeScale()).logicalRange(),i=e.baseIndex(),n=this._appliedTimeFrameInfo.logicalRange,o=this._appliedTimeFrameInfo.baseIndex,null!==t&&null!==n&&i-t.left()==o-n.left()&&i-t.right()==o-n.right()||(this._appliedTimeFrame.merge(null),e.logicalRangeChanged().unsubscribe(this,this._invalidateAppliedTimeFrame)))},e}(),T=i("uOxu"),i("CW80"),i.d(t,"ChartModelBase",function(){return I}),x=Object(T.getLogger)("Chart.ChartModel"),I=function(){function e(e){this._onRearrangePanes=new u.a,this._lineToolsGroupModel=new b.LineToolsGroupModel,this._panes=[],this._tagsChanged=new u.a,this._strategySources=[],this._strategySourcesChange=new u.a,this._activeStrategySource=new d.a(null),this._panesCollectionChanged=new u.a,this._dataSourceCollectionChanged=new u.a,this._scrollEnabled=_.enabled("chart_scroll"),this._zoomEnabled=_.enabled("chart_zoom"),this._isScalesResetAvailableChanged=new u.a,this._isScalesResetAvailable=!1,this._esdWatcher=null,this._hoveredSource=null,this._hoveredSourceChanged=new u.a,this._lastHittestData=null,this._fgCustomSources=[],this._bgCustomSources=[],this._allCustomSources=[],this._customSourcesMap=new Map,this._undoModel=e}return e.prototype.destroy=function(){this._hoveredSourceChanged.destroy(),null!==this._watermarkSource&&(this._watermarkSource.destroy(),this._watermarkSource=null),Array.from(this._customSourcesMap.keys()).forEach(this._removeCustomSource,this),Object(o.assert)(0===this._fgCustomSources.length),Object(o.assert)(0===this._bgCustomSources.length),Object(o.assert)(0===this._allCustomSources.length),Object(o.assert)(0===this._customSourcesMap.size),null!==this._esdWatcher&&this._esdWatcher.destroy(),this._appliedTimeFrame.destroy()},e.prototype.addStrategySource=function(e){-1===this._strategySources.indexOf(e)&&(this._strategySources.push(e),this._strategySourcesChange.fire(),this.setActiveStrategySource(e))},e.prototype.removeStrategySource=function(e){var t,i=this._strategySources.indexOf(e);-1!==i&&(this._strategySources.splice(i,1)[0]===this._activeStrategySource.value()&&this.unsetActiveStrategySource(),this._strategySources.length>0&&(t=this._strategySources[this._strategySources.length-1],this.setActiveStrategySource(t)),this._strategySourcesChange.fire())},e.prototype.setActiveStrategySource=function(e){-1!==this._strategySources.indexOf(e)&&this._activeStrategySource.setValue(e)},e.prototype.unsetActiveStrategySource=function(){this._activeStrategySource.setValue(null)},e.prototype.activeStrategySource=function(){return this._activeStrategySource},e.prototype.strategySources=function(){return this._strategySources},e.prototype.strategySourcesChange=function(){return this._strategySourcesChange},
e.prototype.setScrollEnabled=function(e){this._scrollEnabled=e},e.prototype.scrollEnabled=function(){return this._scrollEnabled},e.prototype.setZoomEnabled=function(e){this._zoomEnabled=e},e.prototype.zoomEnabled=function(){return this._zoomEnabled},e.prototype.onTagsChanged=function(){return this._tagsChanged},e.prototype.canZoomIn=function(){return this._timeScale.canZoomIn()&&this._zoomEnabled},e.prototype.canZoomOut=function(){return this._timeScale.canZoomOut()&&this._zoomEnabled},e.prototype.onPaneTagsChanged=function(){this._tagsChanged.fire()},e.prototype.panesCollectionChanged=function(){return this._panesCollectionChanged},e.prototype.dataSourceCollectionChanged=function(){return this._dataSourceCollectionChanged},e.prototype.updateCrosshair=function(){var e,t,i=this.crossHairSource(),n=i.pane;null!==n&&(e=i.originCoordX(),t=i.originCoordY(),this.setAndSaveCurrentPosition(e,t,n))},e.prototype.zoomTime=function(e,t,i){var n,o;this._zoomEnabled&&((n=this.timeScale()).isEmpty()||0===t||(o=n.width(),e=Math.max(1,Math.min(e,o-2)),n.zoom(e,t,i),this.updateCrosshair(),this.recalculateAllPanes(),this.lightUpdate(),this.mainSeries().requestMoreData(),this.recalcVisibleRangeStudy(this.dataSources()),this._setScalesResetAvailable(!0)))},e.prototype.lineToolsGroupModel=function(){return this._lineToolsGroupModel},e.prototype.restoreLineToolsGroups=function(e){this._lineToolsGroupModel=b.LineToolsGroupModel.fromState(this,e)},e.prototype.updateSource=function(e){var t=this._invalidationMaskForSource(e);null!==t&&this.invalidate(t)},e.prototype.replaceStudyStub=function(e,t){var i,n,o,r=this.paneForSource(e);return null!==r&&(i=e.priceScale(),n=e.zorder(),o=e.ownerSource(),this.paneForSource(e)===r?r.replaceSource(e,t,i):(r.insertDataSource(t,i,n),this.removeSource(e)),t.setOwnerSource(o),this.dataSources().forEach(function(i){i.ownerSource()===e&&i.setOwnerSource(t)}),t.start(),this.recalculatePane(r),this.fullUpdate(),!0)},e.prototype.insertStudyStub=function(e){var t=this.mainSeries(),i=Object(o.ensureNotNull)(this.paneForSource(t)),n=new s.StudyStub(this,null,e),r=i.createPriceScaleAtPosition("overlay");return i.addDataSource(n,r,!1),this.recalculatePane(i),this.fullUpdate(),n},e.prototype.removeStudyStub=function(e){var t=this.dataSourceForId(e);return null===t?(x.logNormal("StudyStub id="+e+" is not found in chart model"),!1):(this.removeSource(t),!0)},e.prototype.setHoveredSource=function(e,t){var i,n,o=this._hoveredSource!==e;(o||this._lastHittestData!==t)&&(this._lastHittestData=t,i=null,this._hoveredSource&&(this._hoveredSource.updateAllViews(),i=new p.InvalidateMask,null!==(n=this._invalidationMaskForSource(this._hoveredSource,p.InvalidationLevel.Light))&&i.merge(n)),this._hoveredSource=e,e&&(e.updateAllViews(),i||(i=new p.InvalidateMask),null!==(n=this._invalidationMaskForSource(e,p.InvalidationLevel.Light))&&i.merge(n)),i&&this.invalidate(i),o&&this._hoveredSourceChanged.fire(e))},e.prototype.hoveredSource=function(){return this._hoveredSource},e.prototype.hoveredSourceChanged=function(){
return this._hoveredSourceChanged},e.prototype.lastHittestData=function(){return this._lastHittestData},e.prototype.findNonOverlayStudyWithGroupingKey=function(e,t){var i,n,o,r=void 0!==t?[t]:this._panes,s=function(t){var i=t.dataSources().find(function(i){return Object(l.isStudy)(i)&&i.metaInfo().groupingKey===e&&!t.isOverlay(i)});if(void 0!==i)return{value:{pane:t,study:i}}};for(i=0,n=r;i<n.length;i++)if("object"==typeof(o=s(n[i])))return o.value;return null},e.prototype.movePaneUp=function(e){this.movePane(e,e-1)},e.prototype.movePaneDown=function(e){this.movePane(e,e+1)},e.prototype.movePane=function(e,t){var i=this._panes[e];this._panes.splice(e,1),this._panes.splice(t,0,i),this._panesCollectionChanged.fire(this._panes),this._onRearrangePanes.fire(),this.invalidate(p.InvalidateMask.panesOrder())},e.prototype.isScalesResetAvailableChanged=function(){return this._isScalesResetAvailableChanged},e.prototype.isScalesResetAvailable=function(){return this._isScalesResetAvailable},e.prototype.panes=function(){return this._panes},e.prototype.paneForId=function(e){return this._panes.find(function(t){return t.id()===e})||null},e.prototype.createPane=function(t,i){var n,o,r=this,s=this._undoModel.chartWidget();return s.isMaximizedPane()&&s.toggleMaximizePane(),n=this._properties.paneProperties,i&&n.merge(i),o=new f.Pane(this._timeScale,n,this),void 0!==t?this._panes.splice(t,0,o):this._panes.push(o),o.onTagsChanged().subscribe(this,e.prototype.onPaneTagsChanged),o.dataSourcesCollectionChanged().subscribe(this,function(){return r._dataSourceCollectionChanged.fire(o)}),this._panesCollectionChanged.fire(this._panes),this.invalidate(p.InvalidateMask.panesOrder()),o},e.prototype.removePane=function(e){var t,i,n=this._undoModel.chartWidget();n.isMaximizedPane()&&n.toggleMaximizePane(),(t=e).destroy(),-1!==(i=this._panes.indexOf(t))&&(this._panes.splice(i,1),e.dataSourcesCollectionChanged().unsubscribeAll(this),e.onTagsChanged().unsubscribeAll(this)),this.crossHairSource().pane===e&&this.clearCurrentPosition(),this._panesCollectionChanged.fire(this._panes),this.invalidate(p.InvalidateMask.panesOrder())},e.prototype.changePanesHeight=function(e,t){var i,n,r,s,a,l,c,u,h,d,p,_,f;if(!(this._panes.length<2)){for(Object(o.assert)(e>=0&&e<this._panes.length,"Invalid pane index"),i=this._panes[e],n=this._panes.reduce(function(e,t){return e+t.stretchFactor()},0),s=(r=this._panes.reduce(function(e,t){return e+t.height()},0))-30*(this._panes.length-1),t=Math.min(s,Math.max(30,t)),a=n/r,l=i.height(),i.setStretchFactor(t*a),c=t-l,u=this._panes.length-1,h=0,d=this._panes;h<d.length;h++)(p=d[h])!==i&&(_=Math.min(s,Math.max(30,p.height()-c/u)),c-=p.height()-_,u-=1,f=_*a,p.setStretchFactor(f));this.fullUpdate()}},e.prototype.onRearrangePanes=function(){return this._onRearrangePanes},e.prototype.addCustomSource=function(e,t,i){var n;void 0===i&&(i=r.CustomSourceLayer.Foreground),this._customSourcesMap.has(e)&&x.logWarn('Attempt to add the same custom source multiple time "'+e+'"'),x.logNormal('Adding custom source "'+e+'"'),n=t(this),
(i===r.CustomSourceLayer.Background?this._bgCustomSources:this._fgCustomSources).push(n),this._allCustomSources.push(n),this._customSourcesMap.set(e,n),this.lightUpdate()},e.prototype.removeCustomSource=function(e){this._removeCustomSource(e),this.lightUpdate()},e.prototype.customSources=function(e){switch(e){case r.CustomSourceLayer.Background:return this._bgCustomSources;case r.CustomSourceLayer.Foreground:return this._fgCustomSources;default:return this._allCustomSources}},e.prototype.dateTimeFormatter=function(){return this._dateTimeFormatter},e.prototype.dateFormatter=function(){return this._dateFormatter},e.prototype.timeFormatter=function(){return this._timeFormatter},e.prototype.externalTimeStamp=function(e){var t=this.mainSeries().syncModel();return this.timeScale().points().roughTime(e,t&&t.projectTime.bind(t))},e.prototype.appliedTimeFrame=function(){return this._appliedTimeFrame.appliedTimeFrame()},e.prototype.syncESD=function(){null!==this._esdWatcher&&this._esdWatcher.syncESDStudies()},e.prototype._createESDWatcher=function(){},e.prototype._updateDateTimeFormatter=function(){var e,t=S.dateFormatProperty.value(),i=new y.DateFormatter(t);this._dateFormatter=i,this.mainSeries().isDWM()?(this._dateTimeFormatter=i,this._timeFormatter=new m.TimeFormatter("%h:%m")):(e=a.Interval.parse(this.mainSeries().interval()).isSeconds()?"%h:%m:%s":"%h:%m",this._dateTimeFormatter=new v({dateFormat:t,timeFormat:e,dateTimeSeparator:" "}),this._timeFormatter=new m.TimeFormatter(e))},e.prototype._setScalesResetAvailable=function(e){this._isScalesResetAvailable!==e&&(this._isScalesResetAvailable=e,this._isScalesResetAvailableChanged.fire())},e.prototype._invalidationMaskForSource=function(e,t){var i,n;return e===this.crossHairSource()?p.InvalidateMask.cursor():(void 0===t&&(t=p.InvalidationLevel.Light),this._watermarkSource===e?this._paneInvalidationMask(Object(o.ensureNotNull)(this.paneForSource(this.mainSeries())),t):-1!==this._allCustomSources.indexOf(e)?((i=new p.InvalidateMask).invalidateAll(t),i):null!==(n=this.paneForSource(e))?this._paneInvalidationMask(n,t):null)},e.prototype._paneInvalidationMask=function(e,t){var i=new p.InvalidateMask,n=this._panes.indexOf(e);return void 0===t&&(t=p.InvalidationLevel.Light),i.invalidatePane(n,t),i},e.prototype._removeCustomSource=function(e){var t,i,r=this._customSourcesMap.get(e);void 0!==r?(x.logNormal('Removing custom source "'+e+'"'),t=n(this._fgCustomSources,r)!==n(this._bgCustomSources,r),i=n(this._allCustomSources,r),Object(o.assert)(t,"Source should be presented in one of the layers"),Object(o.assert)(i,"Source should be presented in the array"),this._customSourcesMap.delete(e),r.destroy()):x.logWarn('Attempt to remove custom source which does not exist in the model - "'+e+'"')},e.prototype._onInitialized=function(){this._appliedTimeFrame=new C(this)},e}()},gQ5K:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"DateFormatter",function(){return r}),n=i("kcTO"),o=i("e1ZQ"),r=function(){function e(e){void 0===e&&(e="yyyy-MM-dd"),
this._dateFormatFunc=o.dateFormatFunctions[e]}return e.prototype.format=function(e){return n.customFormatters&&n.customFormatters.dateFormatter?n.customFormatters.dateFormatter.format(e):this._dateFormatFunc(e,!1)},e.prototype.formatLocal=function(e){return n.customFormatters.dateFormatter?n.customFormatters.dateFormatter.formatLocal?n.customFormatters.dateFormatter.formatLocal(e):n.customFormatters.dateFormatter.format(e):this._dateFormatFunc(e,!0)},e}()},gWck:function(e,t,i){"use strict";var n,o,r,s,a;i.r(t),i.d(t,"SeriesLegendView",function(){return a}),n=i("mrSG"),o=i("cXAR"),r=i("n5al"),s={open:window.t("O",{context:"in_legend"}),high:window.t("H",{context:"in_legend"}),low:window.t("L",{context:"in_legend"}),close:window.t("C",{context:"in_legend"}),hl2:window.t("HL2",{context:"in_legend"}),hlc3:window.t("HLC3",{context:"in_legend"}),ohlc4:window.t("OHLC4",{context:"in_legend"})},a=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._showBarChange=i.properties().paneProperties.legendProperties.showBarChange,n._showSeriesOHLC=i.properties().paneProperties.legendProperties.showSeriesOHLC,n._seriesStyle=t.properties().childs().style,n._items[0].setTitle(s.open),n._items[1].setTitle(s.high),n._items[2].setTitle(s.low),n._items[3].setTitle(s.close),n._items[6].setTitle(""),n._showBarChange.subscribe(n,n.update),n._showSeriesOHLC.subscribe(n,n.update),n._items[4].setTitle(""),n}return Object(n.__extends)(t,e),t.prototype.isValuesVisible=function(){return this._showSeriesOHLC.value()||this._showBarChange.value()},t.prototype.additional=function(){return null},t.prototype.destroy=function(){this._showBarChange.unsubscribeAll(this),this._showSeriesOHLC.unsubscribeAll(this)},t.prototype._updateImpl=function(){var t,i,n,o,s,a,l,c;e.prototype._updateImpl.call(this),t=this._showSeriesOHLC.value(),i=this._showBarChange.value(),n=12===this._series.style(),(o=this._items[6]).setVisible(o.visible()&&i&&!n),this._showLastPriceAndChangeOnly()?(s=this._items[5]).setVisible(s.visible()&&t):(a=Object(r.isPriceSourceStyle)(this._seriesStyle.value()),l=t&&!a,c=t&&a,this._items[0].setVisible(l&&!n),this._items[1].setVisible(l),this._items[2].setVisible(l),this._items[3].setVisible(l&&!n),this._items[4].setVisible(c))},t}(o.SeriesDataWindowView)},"ga+R":function(e,t,i){"use strict";e.exports=function(e,t){var i,n=10,o=e%n;for(o&&(e=e-o+n),i=[];e<=t;e+=n)i.push(e);return i}},glKZ:function(e,t,i){"use strict";function n(){clearTimeout(f),clearTimeout(m),clearTimeout(y)}function o(){var e=document.getElementById(g);e?v=e:((v=document.createElement("div")).id=g,document.body.appendChild(v))}function r(){v&&(v.innerHTML="")}function s(e){var t=e.getAttribute("title");return t&&(Object(P.b)(e,"text",t),e.removeAttribute("title")),Object(P.a)(e,"text")||""}function a(e){var t,i,n,o,r,s,a=O.cloneNode(!0),l=h(a),c=e.content;switch(c.type){case"element":l.innerHTML="",l.appendChild(c.data);break;case"html":l.innerHTML=c.data;break;case"text":e.hotkey?((i=V.cloneNode(!0)).innerText=c.data,l.appendChild(i)):l.innerText=c.data}
return e.hotkey&&(n="none"!==c.type,o=D.cloneNode(!0),r=Object(C.a)(e.hotkey),s=r.keys.map(function(e){return'<span class="'+L["common-tooltip__hotkey-button"]+'">'+e+"</span>"}),o.innerHTML=(t=r.text).format.apply(t,s).replace(/\s\+\s/g,'<span class="'+L["common-tooltip__plus-sign"]+'">+</span>'),l.classList.add(L["common-tooltip__body--with-hotkey"]),n&&o.classList.add(L["common-tooltip__hotkey-block--divider"]),l.appendChild(o)),a.addEventListener("contextmenu",I.a),a}function l(e,t){var i,n,o,r,s,a,l,c,d,p,_,f,m,y,g=t.rect;g&&(!function(e,t){var i,n=w.includes(t)?b[t]:"";(i=e.classList).remove.apply(i,w.map(function(e){return b[e]}).filter(function(e){return!!e})),n&&!e.classList.contains(n)&&e.classList.add(n)}(e,t.colorTheme||"default"),t.addClass&&e.classList.add(t.addClass),(i=h(e)).classList.toggle(L["common-tooltip__body--width_wide"],Boolean(t.wide)),i.classList.toggle(L["common-tooltip__body--no-padding"],Boolean(t.noPadding)),i.classList.toggle(L["common-tooltip__body--width_narrow"],Boolean(t.narrow)),i.classList.toggle(L["common-tooltip__body--no-buttons"],!0),e.classList.toggle(L["common-tooltip--no-pointer-events"],!Modernizr.pointerevents),i.style.left=u(0),i.style.width=u(i.clientWidth+(Boolean(t.noPadding)?0:2)),n=document.body.clientWidth,o=window.innerHeight,s=(r=t.vertical)&&g.w<20||!r&&g.h<20,e.classList.toggle(L["common-tooltip--farther"],s),e.classList.toggle(L["common-tooltip--vertical"],r),e.classList.toggle(L["common-tooltip--horizontal"],!r),a=e.querySelector("."+L["common-tooltip__ear-holder"]),l="",r?(e.style.left=u(g.x+g.w),e.style.top=u(g.y-(e.offsetHeight-g.h)/2),c=(e.querySelector(":last-child")||i).getBoundingClientRect().right+M>n,e.classList.toggle(L["common-tooltip--direction_reversed"],c),e.classList.toggle(L["common-tooltip--direction_normal"],!c),l=c?"after":"before",Object(x.isRtl)()?(l=t.otr?"after":l,l=t.otl?"before":l):(l=t.otr?"before":l,l=t.otl?"after":l),a.classList.toggle(L["common-tooltip__ear-holder--before"],"before"===l),a.classList.toggle(L["common-tooltip__ear-holder--after"],"after"===l),"after"===l&&(e.style.left="auto",e.style.right=u(n-g.x))):(d=g.x-(i.offsetWidth-g.w)/2,p=n-M-e.offsetWidth,_=Math.max(M,Math.min(d,p)),e.style.bottom=u(o-g.y),e.style.left=u(_),c=p<d,e.classList.toggle(L["common-tooltip--direction_reversed"],c),e.classList.toggle(L["common-tooltip--direction_normal"],!c),l=i.getBoundingClientRect().top<M?"below":"above",l=t.above?"above":l,l=t.below?"below":l,a.classList.toggle(L["common-tooltip__ear-holder--above"],"above"===l),a.classList.toggle(L["common-tooltip__ear-holder--below"],"below"===l),"below"===l&&(e.style.bottom="auto",e.style.top=u(g.y+g.h)),f=function(e){return e.querySelector("."+L["common-tooltip__button-container"])}(e),m=i.getBoundingClientRect().left,y=Math.trunc(g.x+g.w/2-(m+i.clientWidth/2)),e.style.left=u(_+y),e.style.width=u(i.clientWidth+f.clientWidth),y=c?Math.max(0,y):Math.min(0,y),f.style.left=u(-y),i.style.left=u(-y)))}function c(e){e.classList.toggle(L["common-tooltip--hidden"],!0)}function u(e){
return Math.floor(e)+"px"}function h(e){return e.querySelector("."+L["common-tooltip__body"])}function d(e){var t,i=Object(S.ensureNotNull)(F).options;l(e,i),function(e){e.classList.toggle(L["common-tooltip--hidden"],!1)}(e),j.observe(document,{childList:!0,subtree:!0}),N=!0,i.forceHideOnMove&&(t=function(){document.removeEventListener("mousemove",t),Y()},document.addEventListener("mousemove",t))}function p(e){var t,i,n,o,r;return function(e){return"content"in e}(e)?e:(t=e.inner,i=e.html,n=e.text,o=Object(_.__rest)(e,["inner","html","text"]),r={type:"none"},t&&(r={type:"element",data:t}),n&&(r={type:i?"html":"text",data:n}),Object(_.__assign)({content:r},o))}var _,f,m,y,g,v,S,b,w,P,C,T,x,I,L,M,A,k,E,O,D,V,B,R,N,F,W,j,U,z,H,Y;i.r(t),_=i("mrSG"),i("bf9a"),f=0,m=0,y=0,g="tooltip-root-element","interactive"===document.readyState?o():document.addEventListener("DOMContentLoaded",o),S=i("Eyy1"),b={default:"",white:"theme-white","round-shadow":"theme-round-shadow"},w=Object.keys(b),P=i("ljE9"),C=i("ei7k"),T=i("TzTt"),x=i("Ialn"),i("HbRj"),I=i("XAms"),L=i("Wo0S"),M=10,A='\n\t<div id="'+"common-tooltip-wrapper"+'" class="'+L["common-tooltip"]+'">\n\t\t<div class="'+L["common-tooltip__ear-holder"]+'" >\n\t\t\t<div class="'+L["common-tooltip__body"]+' js-tooltip-body"></div>\n\t\t</div>\n\t\t<div class="'+L["common-tooltip__button-container"]+'"></div>\n\t</div>\n',k='\n\t<div class="'+L["common-tooltip__hotkey-block"]+'"></div>\n',E='\n\t<div class="'+L["common-tooltip__hotkey-text"]+'"></div>\n',O=Object(T.parseHtmlElement)(A),D=Object(T.parseHtmlElement)(k),V=Object(T.parseHtmlElement)(E),B=i("lxNp"),i.d(t,"showOnElement",function(){return U}),i.d(t,"show",function(){return z}),i.d(t,"updateTooltipText",function(){return H}),i.d(t,"hide",function(){return Y}),R=500,N=!1,F=null,W=null,Modernizr.mobiletouch||document.addEventListener("mouseover",function(e){var t,i,n=e.target,o=e.currentTarget,r=function(e,t,i){for(var n,o=[];e&&e!==t;)e.classList&&e.classList.contains(i)&&o.push(e),e=e.parentElement||(n=e.parentNode)&&(n.nodeType===Node.ELEMENT_NODE?n:null);return o}(n,o,"apply-common-tooltip"),s=function(t){var i,n;if("buttons"in e){if(1&e.buttons)return"continue"}else if(1===e.which)return"continue";if((i=function(){return U(t)})())return n=function(){t.removeEventListener("common-tooltip-update",i),t.removeEventListener("mouseleave",n),t.removeEventListener("mousedown",n),document.removeEventListener("scroll",n),W&&(W.destroy(),W=null),Y()},t.addEventListener("common-tooltip-update",i),t.addEventListener("mouseleave",n),t.addEventListener("mousedown",n),document.addEventListener("scroll",n),null===W&&(W=Object(B.createGroup)({desc:"Tooltip"})).add({desc:"Hide",hotkey:27,handler:n}),"break"};for(t=0,i=r;t<i.length&&"break"!==s(i[t]);t++);},!0),j=new MutationObserver(function(){if(F&&F.options.target){("isConnected"in F.options.target?F.options.target.isConnected:document.body.contains(F.options.target))||Y()}}),U=function(e,t){var i,n,o,r,a;return void 0===t&&(t={}),n=(i=p(t)).content,o=Object(_.__rest)(i,["content"]),
r=function(e){var t=s(e),i=e.getBoundingClientRect(),n={h:i.height,w:i.width,x:i.left,y:i.top},o=e.getAttribute("data-color-theme")||"",r=e.classList.contains("common-tooltip-html"),a=parseInt(e.getAttribute("data-tooltip-delay")||""),l={type:"none"};return t&&(l={type:r?"html":"text",data:t}),{above:e.classList.contains("common-tooltip-above"),below:e.classList.contains("common-tooltip-below"),otl:e.classList.contains("common-tooltip-otl"),otr:e.classList.contains("common-tooltip-otr"),vertical:e.classList.contains("common-tooltip-vertical"),hotkey:e.getAttribute("data-tooltip-hotkey"),narrow:e.classList.contains("common-tooltip-narrow"),colorTheme:o,tooltipDelay:a,rect:n,content:l,target:e}}(e),a=Object.assign(r,o),"none"!==n.type&&(a.content=n),!("none"===a.content.type&&!a.hotkey)&&(a.target=e,z(a),!0)},z=function(e){var t,i,o,s=p(e),l=a(s);F={options:s,element:l},t=l,r(),v&&v.appendChild(t),n(),N?d(l):(c(l),i=function(){return d(l)},o=function(e){return"number"!=typeof e.tooltipDelay||isNaN(e.tooltipDelay)?R:e.tooltipDelay}(s),f=setTimeout(i,o))},H=function(e){return s(e)},Y=function(){var e,t,i,o,s;(n(),j.disconnect(),N&&F)&&(e=F.element,t=F.options,i=function(){e.removeEventListener("mouseleave",i),c(e),y=setTimeout(function(){r(),N=!1,F=null},R/2)},t.tooltipHideDelay?(o=function(){e.querySelector(":hover")?e.addEventListener("mouseleave",i):i()},s=t.tooltipHideDelay,m=setTimeout(o,s)):i())}},gyZD:function(e,t,i){"use strict";function n(e){this.items=e.items,this._simpleMode=e.simpleMode,this.barSpacing=e.barSpacing,this.lineColor=e.lineColor,this.lineWidth=e.lineWidth,this.lineStyle=e.lineStyle,this.withMarkers=e.withMarkers,this.hittest=e.hittest,this.ignorePaletteLineWidth=e.ignorePaletteLineWidth,this.forceLineColor=!!e.forceLineColor}var o=i("aO4+").Point,r=i("GEp6").distanceToSegment,s=i("Zp/P"),a=i("VdBB").HitTestResult;n.prototype.draw=function(e){e.lineCap="square",e.lineJoin=this.withMarkers?"round":"miter",e.strokeStyle=this.lineColor,e.fillStyle=this.lineColor,e.lineWidth=this.lineWidth,e.lineStyle=this.lineStyle,s.setValidLineStyle(e,this.lineStyle),this._simpleMode?this._drawSimpleMode(e):this._drawLines(e)},n.prototype._drawSimpleMode=function(e){var t,i,n,o;if(e.beginPath(),this.walkLine(e,this.items),e.stroke(),this.withMarkers){for(t=this.lineWidth+2,i=2*Math.PI,e.beginPath(),o=this.items.length;o--;)(n=this.items[o])&&(e.moveTo(n.x,n.y),e.arc(n.x,n.y,t,0,i));e.fill()}},n.prototype.walkLine=function(e,t,i,n){var o,r,a,l,c,u,h,d,p,_;if(t){for(o=.25*this.barSpacing,h=s.coordinateIsValid,d=0,p=t.length;d<p;d++)if(h((_=t[d]).y)){a=_,r=d;break}if(void 0!==r&&a)for(d=r,p=t.length;d<p;d++){if(c=t[d],u=t[d+1]||{},h(c.y))if(l&&h(l.y))e.lineTo(c.x,c.y),i&&!h(u.y)&&e.lineTo(c.x,n);else if(u&&h(u.y))i?(d!==r&&e.lineTo(c.x,n),e.lineTo(c.x,c.y)):e.moveTo(c.x,c.y);else if(i){if(0===d)continue;d!==r&&e.lineTo(c.x-o,n),e.lineTo(c.x-o,c.y),e.lineTo(c.x+o,c.y),e.lineTo(c.x+o,n)}else e.moveTo(c.x-o,c.y),e.lineTo(c.x+o,c.y);l=c}}},n.prototype._drawLines=function(e){function t(t,i,n){
a(i.y)&&(a(t.y)?e.lineTo(i.x,i.y):n&&a(n.y)?e.moveTo(i.x,i.y):(e.moveTo(i.x-r,i.y),e.lineTo(i.x+r,i.y)))}var i,n,o,r,a,l,c,u,h,d,p,_,f;if(this.items.length){for(r=.25*this.barSpacing,a=s.coordinateIsValid,e.beginPath(),(l=this.items[0])&&e.moveTo(l.x,l.y),c=e.strokeStyle,u=e.lineWidth,h=e.lineStyle,d=1;d<this.items.length;++d)i=this.items[d-1],n=this.items[d],o=this.items[d+1],n.style&&!this.forceLineColor?(p=n.style.color,_=n.style.width,f=n.style.style):(p=this.lineColor,_=this.lineWidth,f=this.lineStyle),this.ignorePaletteLineWidth&&(_=this.lineWidth),(p!==c||_!==u||f!==h)&&(c=p,u=_,h=f,e.stroke(),e.beginPath(),e.strokeStyle=p,e.lineWidth=_,s.setValidLineStyle(e,f),e.moveTo(i.x,i.y)),t(i,n,o);e.stroke()}},n.prototype.hitTest=function(e){for(var t,i,n,l,c,u,h=s.selectionTolerance(this.lineWidth),d=0,p=this.items.length-1;p-d>2;)c=Math.round((p+d)/2),this.items[c].x<=e.x?d=c:p=c;for(d=Math.max(1,d-1),p=Math.min(this.items.length-1,p+1),u=d;u<=p;++u)if(t=this.items[u-1],i=this.items[u],n=t.x,l=i.x,r(new o(n,t.y),new o(l,i.y),new o(e.x,e.y)).distance<=h)return this.hittest?this.hittest:new a(a.REGULAR);return null},t.PaneRendererLine=TradingView.PaneRendererLine=n},h24c:function(e,t,i){"use strict";function n(e){var t,i,n,o;return i=~~(t=/^[,\s]*(\d*)\s*([hdwms]?)\s*$/i.exec(e)||[])[1],n=t[2]&&t[2].toUpperCase()||null,(o={qty:!i&&n?1:i,unit:n}).error=!i&&!n,o.intraday=!(o.error||o.unit&&"H"!==o.unit),o}function o(e){var t,i,o;return u.enabled("allow_supported_resolutions_set_only")?null!==(t=p.Interval.normalize(e))&&Object(h.isAvailable)(t):!(i=n(e)).error&&(i.intraday?d.linking.intraday.value():!(o=d.linking.supportedResolutions.value())||null!==i.unit&&!!~o.indexOf(i.unit))}function r(){return!1}function s(e){return!e.ctrlKey&&(!e.metaKey&&(!!e.charCode&&(!(!e.which||e.which<=32)&&(null===e.target||!/^(input|textarea)$/i.test(e.target.tagName)))))}function a(e,t){return!t&&(e===d.linking.symbol.value()||e===d.linking.seriesShortSymbol.value())}function l(e,t){var i=d.linking.symbol.value()||"";i=function(e,t){if(!t)return e;if(f.test(e)){var i=e.split(/\//);i.length&&(e=i[i.length-1])}else e=d.linking.seriesShortSymbol.value()||e;return e}(i,t),e.val(i)}function c(e){Object(h.setLastUsedResolution)(e),d.linking.interval.setValue(e)}var u,h,d,p,_,f;i.r(t),i.d(t,"parseIntervalValue",function(){return n}),i.d(t,"intervalIsSupported",function(){return o}),i.d(t,"canShowSpreadActions",function(){return r}),i.d(t,"globalKeypressMatches",function(){return s}),i.d(t,"skipAccept",function(){return a}),i.d(t,"syncSymbolSearch",function(){return l}),i.d(t,"setLinkingResolution",function(){return c}),u=i("Kxc7"),h=i("pPtI"),d=i("PT1i"),p=i("LxhU"),_=i("ePL1"),f=new RegExp("^"+_.types.QUANDL,"i")},hBTJ:function(e,t,i){"use strict";function n(e,t){var i,n,o=e.A,r=t.A,s=e.B,a=t.B,l=e.C,u=t.C,h=o*a-r*s;return Math.abs(h)<1e-6?null:(i=(s*u-a*l)/h,n=(r*l-o*u)/h,new c.Point(i,n))}function o(e,t,i,n){var o,r,s=function(e,t,i,n){var o,r=t.subtract(e),s=n.subtract(i),a=r.x*s.y-r.y*s.x
;return Math.abs(a)<1e-6?null:((o=e.subtract(i)).y*s.x-o.x*s.y)/a}(e,t,i,n);return null===s?null:(o=t.subtract(e).scaled(s).add(e),r=u.distanceToSegment(i,n,o),Math.abs(r.distance)<1e-6?s:null)}function r(e,t){var i,n,o;for(i=0,n=e;i<n.length;i++)if(o=n[i],c.equalPoints(o,t))return!1;return e.push(t),!0}function s(e,t){return!(e.length>0&&c.equalPoints(e[e.length-1],t))&&(e.push(t),!0)}function a(e,t){var i,o,r,a,l,u=[];for(i=0;i<e.length;++i)o=e[i],r=e[(i+1)%e.length],a=c.lineThroughPoints(o,r),h.pointInHalfplane(o,t)?(s(u,o),h.pointInHalfplane(r,t)||null!==(l=n(a,t.edge))&&s(u,l)):h.pointInHalfplane(r,t)&&null!==(l=n(a,t.edge))&&s(u,l);return u.length>=3?u:null}var l,c,u,h;Object.defineProperty(t,"__esModule",{value:!0}),l=i("Eyy1"),c=i("aO4+"),u=i("GEp6"),h=i("f6yo"),t.intersectLineSegmentAndBox=function(e,t){function i(e,t,i,n,o,r){var s=0;return e<i?s|=1:e>o&&(s|=2),t<n?s|=4:t>r&&(s|=8),s}for(var n,o,r,s=e[0].x,a=e[0].y,l=e[1].x,u=e[1].y,h=t.min.x,d=t.min.y,p=t.max.x,_=t.max.y,f=i(s,a,h,d,p,_),m=i(l,u,h,d,p,_),y=!1,g=0;;){if(g>1e3)throw new Error("Cohen - Sutherland algorithm: infinity loop");if(g++,!(f|m)){y=!0;break}if(f&m)break;o=void 0,r=void 0,8&(n=f||m)?(o=s+(l-s)*(_-a)/(u-a),r=_):4&n?(o=s+(l-s)*(d-a)/(u-a),r=d):2&n?(r=a+(u-a)*(p-s)/(l-s),o=p):(r=a+(u-a)*(h-s)/(l-s),o=h),n===f?f=i(s=o,a=r,h,d,p,_):m=i(l=o,u=r,h,d,p,_)}return y?c.equalPoints(c.point(s,a),c.point(l,u))?c.point(s,a):c.lineSegment(c.point(s,a),c.point(l,u)):null},t.intersectLines=n,t.intersectLineSegments=o,t.intersectLineAndBox=function(e,t){var i,n,o,s,a,u=t.min.x,h=t.min.y,d=t.max.x,p=t.max.y;if(0===e.A)return i=-e.C/e.B,h<=i&&i<=p?c.lineSegment(c.point(u,i),c.point(d,i)):null;if(0===e.B)return n=-e.C/e.A,u<=n&&n<=d?c.lineSegment(c.point(n,h),c.point(n,p)):null;switch(o=[],a=function(t){var i=function(e,t){return-(e.C+e.B*t)/e.A}(e,t);u<=i&&i<=d&&r(o,new c.Point(i,t))},(s=function(t){var i=function(e,t){return-(e.C+e.A*t)/e.B}(e,t);h<=i&&i<=p&&r(o,new c.Point(t,i))})(u),a(h),s(d),a(p),o.length){case 0:return null;case 1:return o[0];case 2:return c.equalPoints(o[0],o[1])?o[0]:c.lineSegment(o[0],o[1])}return l.assert(!1,"We should have at most two intersection points"),null},t.intersectRayAndBox=function(e,t,i){var n,r=o(e,t,i.min,new c.Point(i.max.x,i.min.y)),s=o(e,t,new c.Point(i.max.x,i.min.y),i.max),a=o(e,t,i.max,new c.Point(i.min.x,i.max.y)),l=o(e,t,new c.Point(i.min.x,i.max.y),i.min),u=[];return null!==r&&r>=0&&u.push(r),null!==s&&s>=0&&u.push(s),null!==a&&a>=0&&u.push(a),null!==l&&l>=0&&u.push(l),0===u.length?null:(u.sort(function(e,t){return e-t}),n=h.pointInBox(e,i)?u[0]:u[u.length-1],e.addScaled(t.subtract(e),n))},t.intersectPolygonAndHalfplane=a,t.intersectPolygons=function(e,t){var i,n,o,r,s,l=e;for(i=0;i<t.length&&null!==l;++i)n=t[i],o=t[(i+1)%t.length],r=t[(i+2)%t.length],s=c.lineThroughPoints(n,o),l=a(l,c.halfplaneThroughPoint(s,r));return l}},hGf4:function(e,t,i){"use strict";(function(e,t){function n(t,i){this.options=Object.assign({throttleTimeout:125},i),this._connected=!1,this._symbol_data={},this._subscriptions={},
this._delayed_subscriptions=[],this.onConnect=new e,this.onDisconnect=new e,this._quoteApi=new o(window.ChartApiInstance),this._type=t||"full",this._delayUpdateFastSymbols=s(this._updateFastSymbols,250),this._throttledSymbolData={},this._formatterValuesCache={},this._waitingForFormatters={},this._snapshotValuesCache={},this._waitingForSnapshot={},this.connect()}var o,r=i("kcTO").PriceFormatter,s=i("JOqt").debounce,a=i("PoSe"),l=i("IVMC"),c=i("0waE"),u=i("i/Bj").parseUpdateMode,h=i("FIi8").deepExtend;o=i("wi9r"),n.prototype.destroy=function(){this._quoteApi.destroy(),this._quoteApi=null,this._connected=!1,this.onDisconnect.fire()},n.prototype.typeFields={},n.prototype.typeFields.simple=["ch","chp","current_session","description","local_description","language","exchange","fractional","is_tradable","lp","lp_time","minmov","minmove2","original_name","pricescale","pro_name","short_name","type","update_mode","volume","currency_code"],n.prototype.typeFields.simpleDetailed=[].concat(n.prototype.typeFields.simple,["ask","bid","fundamentals","high_price","is_tradable","low_price","open_price","prev_close_price","rch","rchp","rtc","rtc_time","status","basic_eps_net_income","beta_1_year","earnings_per_share_basic_ttm","industry","market_cap_basic","price_earnings_ttm","sector","volume","dividends_yield","timezone"]),n.prototype.typeFields.full=[],n.prototype.connect=function(e){this._quoteApi.connect(this.quoteHandler.bind(this))},n.prototype.quoteHandler=function(e){var t=e.method,i=e.params;switch(t){case"connected":this._connected||(this._connected=!0,this.onConnected());break;case"quote_list_fields":break;case"quote_symbol_data":this._connected&&this.onSymbolData(i[0]);break;case"disconnected":this._connected&&(this._connected=!1,this.onDisconnect.fire())}},n.prototype.onConnected=function(){this.setFields();var e=Object.keys(this._symbol_data);e.length&&this._quoteApi.quoteAddSymbols(e,{forcePermission:!0}),this._delayed_subscriptions.forEach(function(e){this.subscribe.apply(this,e)},this),this._delayed_subscriptions=[],this.onConnect.fire()},n.prototype.setFields=function(){var e=n.prototype.typeFields[this._type];e&&e.length&&this._quoteApi.quoteSetFields(e)},n.prototype.onSymbolData=function(e){var t=e.symbolname,i=this._throttledSymbolData[t];i||(i=this._throttledSymbolData[t]={fnDispatch:a(this.dipatchSymbolData.bind(this),this.options.throttleTimeout)}),i.cache?h(i.cache,e):i.cache=e,i.fnDispatch(t)},n.prototype._parseUpdateMode=function(e){var t=u(e.update_mode);null!==t&&(e.update_mode=t.mode,e.update_mode_seconds=t.interval)},n.prototype.dipatchSymbolData=function(e){var t,i,n=this._symbol_data[e],o=this._throttledSymbolData[e].cache;if(delete this._throttledSymbolData[e].cache,this._symbol_data[e])for(t in h(n,o),n.values&&this._parseUpdateMode(n.values),this._subscriptions)(i=this._subscriptions[t])[e]&&i[e].forEach(function(e){e(n,o)})},n.prototype.subscribe=function(e,t,i){var n,o;this._connected?(this._subscriptions[e]=this._subscriptions[e]||{},n=this._subscriptions[e],t=[].concat(t),o=[],
t.forEach(function(e){this._symbol_data[e]?n&&n[e]||this._symbol_data[e].subscribers_count++:(this._symbol_data[e]={subscribers_count:1},o.push(e)),n[e]=n[e]||[],n[e].push(i),n[e].fast=!0,this._symbol_data[e]&&this._symbol_data[e].values&&i(this._symbol_data[e],this._symbol_data[e])},this),o.length&&(this._quoteApi.quoteAddSymbols(o,{forcePermission:!0}),this._delayUpdateFastSymbols())):this._delayed_subscriptions.push(arguments)},n.prototype.unsubscribe=function(e,t,i){var n,o=this._subscriptions[e];o&&(o[t]&&i?(~(n=o[t].indexOf(i))&&o[t].splice(n,1),o[t].length||delete o[t]):delete o[t]),o&&0===Object.keys(o).length&&delete this._subscriptions[e],this._symbol_data.hasOwnProperty(t)&&(o&&!o[t]&&this._symbol_data[t].subscribers_count--,this._symbol_data[t].subscribers_count||(delete this._symbol_data[t],this._quoteApi.quoteRemoveSymbols([t]),this._delayUpdateFastSymbols()))},n.prototype.setFastSymbols=function(e,t){var i,n;if(this._subscriptions[e])for(n in i=this._subscriptions[e])i[n].fast=-1!==t.indexOf(n);this._delayUpdateFastSymbols()},n.prototype._updateFastSymbols=function(){if(this._connected){var e=this._fastSymbols();0===e.length?this._quoteApi.quoteHibernateAll():this._quoteApi.quoteFastSymbols(e)}},n.prototype._delayUpdateFastSymbols=n.prototype._updateFastSymbols,n.prototype._fastSymbols=function(){var e,t,i,n=[];for(e in this._subscriptions)for(i in t=this._subscriptions[e])t[i].fast&&n.push(i);return n=l(n)},n.prototype.formatter=function(e,t){function i(e){var i=t&&!e.fractional?1:e.minmov;return new r(e.pricescale,i,e.fractional,e.minmove2)}var n,o=this;return this._waitingForFormatters[e]?this._waitingForFormatters[e]:(n=new Promise(function(t,n){if(o._formatterValuesCache[e])t(i(o._formatterValuesCache[e]));else{var r=c.guid();o.subscribe(r,[e],function(s){"error"===s.status&&(o._waitingForFormatters[e]=null,n("Quotes snapshot is not received")),function(e){return e&&null!=e.pricescale&&null!=e.minmov}(s.values)&&(o._waitingForFormatters[e]=null,o._formatterValuesCache[e]=s.values,t(i(s.values)),o.unsubscribe(r,e))})}}),this._waitingForFormatters[e]=n,n)},n.prototype.snapshot=function(e){var t,i=this;return this._waitingForSnapshot[e]?this._waitingForSnapshot[e]:(t=new Promise(function(t,n){if(i._snapshotValuesCache[e])t(i._snapshotValuesCache[e]);else{var o=c.guid();i.subscribe(o,[e],function(r){"error"===r.status&&(i._waitingForSnapshot[e]=null,n("Quotes snapshot is not received"));var s=r.values;s&&s.minmov&&s.pricescale&&s.description&&(i._waitingForSnapshot[e]=null,i._snapshotValuesCache[e]=s,t(s),i.unsubscribe(o,e))})}}),this._waitingForSnapshot[e]=t,t)},TradingView.QuoteSessionMultiplexer=n,t&&t.exports&&(t.exports=n)}).call(this,i("aIyQ"),i("YuTi")(e))},hP9j:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolPolyline";var o=t||n.createProperties();r.call(this,e,o),i.e("lt-pane-views").then(function(e){var t=i("C2CE").PolylinePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}
var o=i("aO4+").Point,r=i("Ss5c").LineDataSource,s=i("Ocx9").DefaultProperty,a=i("hayr").propertyPages,l=window.t("Polyline");inherit(n,r),n.prototype.pointsCount=function(){return-1},n.prototype.title=function(){return l},n.prototype.name=function(){return"Polyline"},n.prototype.hasEditableCoordinates=function(){return!1},n.prototype.addPoint=function(e){var t,i,n,s,a,l,c,u,h=this._model.timeScale().indexToCoordinate(e.index),d=e.price,p=this.ownerSource().firstValue(),_=this.priceScale().priceToCoordinate(d,p),f=5;if(this._points.length>0){if(t=this._points[this._points.length-1],i=this._model.timeScale().indexToCoordinate(t.index),n=t.price,s=this.priceScale().priceToCoordinate(n,p),new o(h,_).subtract(new o(i,s)).length()<f)return this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),!0;if(a=this._points[0],l=this._model.timeScale().indexToCoordinate(a.index),c=a.price,u=this.priceScale().priceToCoordinate(c,p),new o(h,_).subtract(new o(l,u)).length()<f)return this._properties.filled.setValue(!0),this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),!0}return r.prototype.addPoint.call(this,e)},n.prototype.setPoint=function(e,t){var i,n,s,a,l,c,u;r.prototype.setPoint.call(this,e,t),this._model.timeScale().isEmpty()||this.priceScale().isEmpty()||e!==this._points.length-1&&0!==e||(i=5,n=this.ownerSource().firstValue(),s=this._model.timeScale().indexToCoordinate(t.index),a=this.priceScale().priceToCoordinate(t.price,n),l=e===this._points.length-1?this._points[0]:this._points[this._points.length-1],c=this._model.timeScale().indexToCoordinate(l.index),u=this.priceScale().priceToCoordinate(l.price,n),new o(s,a).subtract(new o(c,u)).length()<i&&this._properties.filled.setValue(!0))},n.prototype.getInputsPropertyPage=function(){return null},n.prototype.getStylesPropertyPage=function(){return a.LineToolPolylineStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("91EF").PolylinesDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new s("linetoolpolyline",e);return n._configureProperties(t),t},n._configureProperties=function(e){r._configureProperties(e),e.addExclusion("filled")},t.LineToolPolyline=n},hY0g:function(e,t,i){"use strict";(function(e){function t(e){if(!(this instanceof t))return new t(e);arguments.length>0&&(this._value=e),this._listeners=[]}t.prototype.value=function(){return this._owner?this._owner._value:this._value},t.prototype.setValue=function(e,t){var i,n,o,r=this._owner?this._owner:this;if("function"==typeof r.hook&&(e=r.hook(e)),r.writeLock)return r._value;if(!t&&r._value===e&&r.hasOwnProperty("_value"))return e;for(r._value=e,i=r._listeners.slice(),n=0,o=0;o<i.length;o++)i[o].once&&(r._listeners.splice(o-n,1),n++),i[o].cb(e);return e},t.prototype.deleteValue=function(){var e,t,i,n=this._owner?this._owner:this;if(n.hasOwnProperty("_value")){if(n.writeLock)return n._value;for(delete n._value,e=n._listeners.slice(),
t=0,i=0;i<e.length;i++)e[i].once&&(n._listeners.splice(i-t,1),t++),e[i].cb()}},t.prototype.subscribe=function(e,t){var i,n,o;if("function"!=typeof e)throw new TypeError("callback must be a function");i=!!t&&!!t.once,n=!!t&&!!t.callWithLast,o=this._owner?this._owner:this,n&&o.hasOwnProperty("_value")&&(e(o._value),i)||o._listeners.push({cb:e,owner:this,once:!!t&&!!t.once})},t.prototype.unsubscribe=function(e){var t,i,n=this._owner?this._owner:this;for(void 0===e&&(e=null),i=(t=n._listeners).length;i--;)t[i].owner!==this&&n!==this||t[i].cb!==e&&null!==e||t.splice(i,1)},t.prototype.listeners=function(){return(this._owner?this._owner:this)._listeners},t.prototype.readonly=function(){if(this._readonlyInstance)return this._readonlyInstance;var e=this._readonlyInstance=new function(){};return e.subscribe=this.subscribe.bind(this),e.unsubscribe=this.unsubscribe.bind(this),e.value=this.value.bind(this),e.when=this.when.bind(this),e.spawn=function(){return this.spawn().readonly()}.bind(this),this.destroy&&(e.destroy=this.destroy.bind(this)),e},t.prototype.spawn=function(e){var i=new t;return delete i._listeners,i._owner=this._owner||this,i.destroy=function(){"function"==typeof e&&e(),this.unsubscribe(),delete this._owner},i},t.prototype.when=function(e){var t,i=this;this.value()?e():(t=function(n){n&&(i.unsubscribe(t),e())},i.subscribe(t))},t.prototype.opposite=function(){var e,i;return this._opposite||(e=this,i=new t(!this.value()),this.subscribe(function(e){i.setValue(!e)}),i.subscribe(function(t){e.setValue(!t)}),this._opposite=i),this._opposite},"undefined"!=typeof window&&(window.WatchedValue=t),e&&e.exports&&(e.exports=t)}).call(this,i("YuTi")(e))},hY3j:function(e,t,i){"use strict";function n(){this.visible=!0,this.horzLinesVisible=!0,this.horzLinesColor="white",this.horzLinesStyle="",this.vertLinesVisible=!0,this.vertLinesColor="white",this.vertLinesStyle=""}function o(e,t){this.source=e,this.pane=t,this._renderer=new r}function r(){this.data=null}n.prototype.paneViews=function(e){return[new o(this,e)]},o.prototype.update=function(){},o.prototype.renderer=function(){var e={};return this.pane.defaultPriceScale().isEmpty()||this.pane.timeScale().isEmpty()?null:(e.horzLinesVisible=!0,e.vertLinesVisible=!0,e.horzLinesColor=this.pane._model.properties().paneProperties.horzGridProperties.color.value(),e.vertLinesColor=this.pane._model.properties().paneProperties.vertGridProperties.color.value(),e.horzLineStyle=this.pane._model.properties().paneProperties.horzGridProperties.style.value(),e.vertLineStyle=this.pane._model.properties().paneProperties.vertGridProperties.style.value(),e.priceMarks=this.pane.defaultPriceScale().marks(),e.timeMarks=this.pane.timeScale().marks(),e.w=this.pane.width(),e.h=this.pane.height(),this._renderer.setData(e),this._renderer)},r.prototype.setData=function(e){this.data=e},r.prototype.draw=function(e){var t;if(null!==this.data){if(e.lineWidth=1,this.data.vertLinesVisible){for(e.strokeStyle=this.data.vertLinesColor,CanvasEx.setLineStyle(e,this.data.vertLineStyle),e.beginPath(),
t=0;t<this.data.timeMarks.length;t++)e.moveTo(this.data.timeMarks[t].coord+1,0),e.lineTo(this.data.timeMarks[t].coord+1,this.data.h);e.stroke()}if(this.data.horzLinesVisible){for(e.strokeStyle=this.data.horzLinesColor,CanvasEx.setLineStyle(e,this.data.horzLineStyle),e.beginPath(),t=0;t<this.data.priceMarks.length;t++)e.moveTo(0,this.data.priceMarks[t].coord),e.lineTo(this.data.w,this.data.priceMarks[t].coord);e.stroke()}}},t.Grid=n},hayr:function(e,t,i){"use strict";function n(e,t){Promise.all([i.e(21),i.e(22),i.e(29),i.e(69),i.e(18),i.e(25),i.e("ds-property-pages")]).then(function(t){o.ChartStylesPropertyPage=i("11dv"),o.LineToolABCDPatternStylesPropertyPage=i("UDBZ"),o.LineToolArcStylesPropertyPage=i("g+Cd"),o.LineToolArrowMarkStylesPropertyPage=i("e3Xi"),o.LineToolBalloonStylesPropertyPage=i("wt/7"),o.LineToolBarsPatternStylesPropertyPage=i("JGUD").LineToolBarsPatternStylesPropertyPage,o.LineToolBezierStylesPropertyPage=i("GjuB"),o.LineToolBrushStylesPropertyPage=i("qrDX"),o.LineToolCalloutStylesPropertyPage=i("NHMx"),o.LineToolCircleLinesStylesPropertyPage=i("MKMD"),o.LineToolDateAndPriceRangeStylesPropertyPage=i("ytZH"),o.LineToolDateRangeStylesPropertyPage=i("IfF0"),o.LineToolDisjointAngleStylesPropertyPage=i("jflP"),o.LineToolElliottStylesPropertyPage=i("1WFa"),o.LineToolEllipseStylesPropertyPage=i("vDrZ"),o.LineToolFibChannelStylesPropertyPage=i("qf46"),o.LineToolFibCirclesStylesPropertyPage=i("o4FW"),o.LineToolFibRetracementStylesPropertyPage=i("k7QS"),o.LineToolFibSpeedResistanceArcsStylesPropertyPage=i("uHqD"),o.LineToolFibSpeedResistanceFanStylesPropertyPage=i("68yv"),o.LineToolFibSpiralStylesPropertyPage=i("a4eO"),o.LineToolFibTimeZoneStylesPropertyPage=i("SSqB"),o.LineToolFibWedgeStylesPropertyPage=i("ISmD"),o.LineToolFlatBottomStylesPropertyPage=i("5fTj"),o.LineToolGannComplexStylesPropertyPage=i("JM7/").LineToolGannComplexStylesPropertyPage,o.LineToolGannFixedStylesPropertyPage=i("QxMc").LineToolGannFixedStylesPropertyPage,o.LineToolGannFanStylesPropertyPage=i("6rcL"),o.LineToolGannSquareStylesPropertyPage=i("B0+Q"),o.LineToolGhostFeedInputsPropertyPage=i("/1PJ").LineToolGhostFeedInputsPropertyPage,o.LineToolGhostFeedStylesPropertyPage=i("/1PJ").LineToolGhostFeedStylesPropertyPage,o.LineToolHorzLineInputsPropertyPage=i("/0lf").LineToolHorzLineInputsPropertyPage,o.LineToolHorzLineStylesPropertyPage=i("/0lf").LineToolHorzLineStylesPropertyPage,o.LineToolIconStylesPropertyPage=i("u2Ui"),o.LineToolInputsPropertyPage=i("n3Kh"),o.LineToolLineTool5PointsPatternStylesPropertyPage=i("kr49"),o.LineToolNotePropertyPage=i("JyhW"),o.LineToolParallelChannelStylesPropertyPage=i("To5g"),o.LineToolPitchfanStylesPropertyPage=i("LkNV"),o.LineToolPitchforkStylesPropertyPage=i("2KYr"),o.LineToolPolylineStylesPropertyPage=i("Ej6X"),o.LineToolPredictionStylesPropertyPage=i("QPOT"),o.LineToolPriceLabelStylesPropertyPage=i("68pv"),o.LineToolProjectionStylesPropertyPage=i("JCAo"),o.LineToolRectangleStylesPropertyPage=i("SSGo"),o.LineToolRiskRewardInputsPropertyPage=i("XXYQ").LineToolRiskRewardInputsPropertyPage,
o.LineToolRiskRewardStylesPropertyPage=i("XXYQ").LineToolRiskRewardStylesPropertyPage,o.LineToolTextStylesPropertyPage=i("cqAO"),o.LineToolTimeCyclesPropertyPage=i("8TiD"),o.LineToolTrendAngleInputsPropertyPage=i("qpZX").LineToolTrendAngleInputsPropertyPage,o.LineToolTrendAngleStylesPropertyPage=i("qpZX").LineToolTrendAngleStylesPropertyPage,o.LineToolTrendBasedFibExtensionStylesPropertyPage=i("xj4C"),o.LineToolTrendBasedFibTimeStylesPropertyPage=i("bllF"),o.LineToolTrendLineStylesPropertyPage=i("lNYe"),o.LineToolInfoLineStylesPropertyPage=i("lNYe"),o.LineToolTrianglePatternStylesPropertyPage=i("kNI9"),o.LineToolTriangleStylesPropertyPage=i("5Y1l"),o.LineToolVertLineInputsPropertyPage=i("ePt6").LineToolVertLineInputsPropertyPage,o.LineToolVertLineStylesPropertyPage=i("ePt6").LineToolVertLineStylesPropertyPage,o.LineToolCrossLineInputsPropertyPage=i("nzyg").LineToolCrossLineInputsPropertyPage,o.LineToolCrossLineStylesPropertyPage=i("nzyg").LineToolCrossLineStylesPropertyPage,o.LineToolVisibilitiesPropertyPage=i("RTm2"),o.StudyCompareInputsPropertyPage=i("y4lV"),o.StudyDisplayPropertyPage=i("o6hY").StudyDisplayPropertyPage,o.StudyInputsPropertyPage=i("L9lC").StudyInputsPropertyPage,o.StudyLineDataSourcePropertyPage=i("ICcj"),o.StudyOverlayStylesPropertyPage=i("y9kM"),o.StudyPivotPointsStandardStylesPropertyPage=i("1aTc"),o.StudyStylesPropertyPage=i("o6hY").StudyStylesPropertyPage,s.logNormal("Property pages loaded"),e()}.bind(null,i)).catch(t)}var o,r,s=i("uOxu").getLogger("Chart.DataSourcePropertyPages"),a=i("mpWx").retries;t.propertyPages={},o=t.propertyPages,r=null,t.loadPropertyPages=function(){return null!==r?r:(s.logNormal("Start loading property pages"),r=a(function(){return new Promise(n)},2))}},hezA:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"StudyPriceAxisView",function(){return r}),n=i("mrSG"),o=i("KcY8"),r=function(e){function t(t,i){var n=e.call(this)||this;return n._model=t.model(),n._source=t,n._data=i,n}return Object(n.__extends)(t,e),t.prototype._updateRendererData=function(e,t,i){var n,o,r;e.visible=!1,t.visible=!1,n=this._source.model(),null!==(o=this._source.priceScale())&&n.isPriceScaleVisible(o)&&((r=this._source.lastValueData(this._data.plotIndex,!1)).noData||(i.background=r.color,i.color=this.generateTextColor(r.color),i.coordinate=r.coordinate,i.floatCoordinate=r.floatCoordinate,this._showAxisLabel()&&(e.text=r.text,e.visible=!0),this._updatePaneRendererData(t)))},t.prototype._showPaneLabel=function(){return this._model.properties().scalesProperties.showStudyPlotLabels.value()},t.prototype._showAxisLabel=function(){return this._model.properties().scalesProperties.showStudyLastValue.value()},t.prototype._updatePaneRendererData=function(e){e.text="",this._showPaneLabel()&&(e.text=this._source.priceLabelText(this._data.plotIndex),e.visible=!0)},t}(o.a)},hfHJ:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i("aO4+");t.identityMatrix=function(){return[[1,0,0],[0,1,0],[0,0,1]]},t.multiplyMatrices=function(e,t){var i,n,o,r=[[0,0,0],[0,0,0],[0,0,0]]
;for(i=0;i<3;i++)for(n=0;n<3;n++)for(o=0;o<3;o++)r[i][n]+=e[i][o]*t[o][n];return r},t.rotationMatrix=function(e){var t=Math.cos(e),i=Math.sin(e);return[[t,-i,0],[i,t,0],[0,0,1]]},t.scalingMatrix=function(e,t){return[[e,0,0],[0,t,0],[0,0,1]]},t.translationMatrix=function(e,t){return[[1,0,e],[0,1,t],[0,0,1]]},t.transformPoint=function(e,t){var i,o,r=[t.x,t.y,1],s=[0,0,0];for(i=0;i<3;i++)for(o=0;o<3;o++)s[i]+=r[o]*e[i][o];return new n.Point(s[0],s[1])}},hkLy:function(e,t,i){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),n=function(){function e(e,t){var i,n;for(i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),t.InputField=function(){function e(t){var i,n=t.label,o=t.name,r=t.maxLength,s=t.error,a=void 0===s?"":s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._name=o,this._field=document.createElement("label"),this._field.classList.add("tv-rename-chart-dialog__field"),(i=document.createElement("span")).classList.add("tv-rename-chart-dialog__label"),i.innerHTML=n,this._inputElement=document.createElement("input"),this._inputElement.classList.add("tv-control-input"),this._inputElement.setAttribute("type","text"),this._inputElement.setAttribute("name",o),this._inputElement.setAttribute("maxlength",r),this._field.appendChild(i),this._field.appendChild(this._inputElement),this._error=a}return n(e,[{key:"appendTo",value:function(e){e.appendChild(this._field)}},{key:"focus",value:function(){this._inputElement.focus()}},{key:"select",value:function(){this.focus(),this._inputElement.select()}},{key:"value",set:function(e){this._inputElement.value=e},get:function(){return this._inputElement.value}},{key:"name",get:function(){return this._name}},{key:"valid",get:function(){return!!this._inputElement.value.trim()}},{key:"error",set:function(e){this._error=e},get:function(){return this._error}}]),e}()},hsV8:function(e,t,i){"use strict";function n(e){if(e<0)throw new Error("TimePointIndexIndex should be non-negative integer");return e}function o(e){var t,i;if(""===e)return Promise.resolve(null);if(t=JSON.parse(e),!Object(r.isObject)(t)||"function"==typeof t)return Promise.reject(new Error("Non-object content in the non-series envelope"));if(Object(r.hasProperty)(t,"indexes_replace"))return Promise.resolve({indexes_replace:!0});if(i={indexes_replace:!1},Object(r.hasProperty)(t,"offsets")&&(i.offsets=t.offsets),Object(r.hasProperty)(t,"isUpdate")){if("boolean"!=typeof t.isUpdate)return Promise.reject(new Error('Invalid type of "isUpdate" field'));i.isUpdate=t.isUpdate}return Object(r.hasProperty)(t,"data")&&(i.data=t.data),Object(r.hasProperty)(t,"graphicsCmds")&&(i.graphicsCmds=Object(s.b)(t.graphicsCmds)),Promise.resolve(i)}var r,s;i.r(t),i.d(t,"ensureTimePointIndexIndex",function(){return n}),i.d(t,"unpackNonSeriesData",function(){return o}),i("mrSG"),r=i("JmuD"),s=i("qySK")},htUT:function(e,t,i){
"use strict";var n,o,r;i.r(t),i.d(t,"ChartChangesWatcher",function(){return r}),n=i("aIyQ"),o=i.n(n),r=function(){function e(e,t,i){this._hasChanges=!1,this._undoHistory=e,this._chartSaver=t,this._globalEvents=i,this._onValueChanged=new o.a,this._subscribe()}return e.prototype.destroy=function(){this._unsubscribe(),this._onValueChanged.destroy()},e.prototype.hasChanges=function(){return this._hasChanges},e.prototype.getOnChange=function(){return this._onValueChanged},e.prototype._subscribe=function(){this._globalEvents.subscribe("chart_loaded",this._handleChartLoaded,this),this._undoHistory.undoStack().onChange().subscribe(this,this._handleChangeUndoStack),this._chartSaver.chartSaved().subscribe(this,this._handleChartSaved)},e.prototype._unsubscribe=function(){this._globalEvents.unsubscribe("chart_loaded",this._handleChartLoaded,this),this._undoHistory.undoStack().onChange().unsubscribe(this,this._handleChangeUndoStack),this._chartSaver.chartSaved().unsubscribe(this,this._handleChartSaved)},e.prototype._setChanges=function(e){this._hasChanges=e,this._onValueChanged.fire(e)},e.prototype._handleChartLoaded=function(){this._setChanges(!1)},e.prototype._handleChangeUndoStack=function(){var e=this._undoHistory.undoStack().head();e&&!e.customFlag("doesnt_affect_save")&&this._setChanges(!0)},e.prototype._handleChartSaved=function(e){e&&this._setChanges(!1)},e}()},"hyq/":function(e,t,i){"use strict";function n(e,t){e.setUTCMonth(e.getUTCMonth()+t)}function o(e,t){var i;return s.Std.ismonthly(e)?((i=new Date(t)).getUTCDay()<function(e,t){return new Date(t,e,0).getDate()}(i.getUTCMonth(),i.getUTCFullYear())?(n(i,s.Std.interval(e)),i=s.Std.add_days_considering_dst("Etc/UTC",i,1-i.getUTCDay())):n(i=s.Std.add_days_considering_dst("Etc/UTC",i,1),s.Std.interval(e)),i.valueOf()):t+a.Interval.parse(e.symbol.resolution).inMilliseconds(t)}function r(e,t){switch(t){case"Auto":return function(e){if(s.Std.isweekly(e)||s.Std.ismonthly(e))return"12M";if(s.Std.isdaily(e))return"1M";if(s.Std.isintraday(e)){var t=s.Std.interval(e);return t>=1&&t<=15?"1D":"1W"}throw new Error("Unexpected resolution type: "+e.symbol.resolution)}(e);case"Daily":return"1D";case"Weekly":return"1W";case"Monthly":return"1M";case"Yearly":return"12M";default:throw new Error("No such pivTimeFrame: "+t)}}var s,a,l,c,u,h;i.r(t),i.d(t,"pivotPointsStandardStudyItem",function(){return h}),s=i("ocLq"),a=i("LxhU"),l=function(){return function(){this.p=NaN,this.r1=NaN,this.s1=NaN,this.r2=NaN,this.s2=NaN,this.r3=NaN,this.s3=NaN,this.r4=NaN,this.s4=NaN,this.r5=NaN,this.s5=NaN,this.startIndex__t=NaN,this.endIndex__t=NaN}}(),c=function(){return function(){this.pivots=[]}}(),u=function(){function e(){this._secondaryRes="1D",this._firstMainSeriesBarTime=NaN}return e.prototype.init=function(e,t){var i,n=t(0),o=t(1),a=t(2),l=t(3);this._data=new c,this._firstMainSeriesBarTime=NaN,this._kindPP=function(e){switch(e){case"Traditional":return 0;case"Fibonacci":return 1;case"Woodie":return 2;case"Classic":return 3;case"DeMark":return 4;case"Camarilla":return 5;default:
throw new Error("Unknown kind "+e)}}(n),this._showHistoricalPivots=o,this._historicalPivotsToKeep=l,this._pivTimeFrame=a,this._isValidResolution=function(e,t){return!(s.Std.isdaily(e)&&"Daily"===t||s.Std.isweekly(e)&&("Daily"===t||"Weekly"===t)||s.Std.ismonthly(e)&&("Daily"===t||"Weekly"===t||"Monthly"===t))}(e,this._pivTimeFrame),this._isValidResolution||s.Std.error("You cannot see this pivot timeframe on this resolution"),this._isValidResolution&&(this._secondaryRes=r(e,this._pivTimeFrame)),i=""===e.symbol.resolution?String(Math.max(30,2*e.symbol.interval)):e.symbol.period,e.new_sym(e.symbol.tickerid,this._secondaryRes,this._secondaryRes,i)},e.prototype.main=function(e){var t,i,n,r,a,c,u,h,d,p,_,f,m,y,g;return this._isValidResolution?e.symbol.time?(isNaN(this._firstMainSeriesBarTime)&&(this._firstMainSeriesBarTime=e.symbol.time,this._removeUnusedPivots()),e.symbol.isLastBar&&e.symbol.isNewBar?this._createResponse():null):(e.select_sym(1),t=e.new_var(s.Std.open(e)),i=e.new_var(s.Std.high(e)),n=e.new_var(s.Std.low(e)),r=e.new_var(s.Std.close(e)),a=e.new_var(s.Std.time(e)),c=this._data,u=t.get(0),h=a.get(0),d=t.get(1),p=i.get(1),_=n.get(1),f=r.get(1),m=e.symbol.isLastBar,0!==c.pivots.length&&e.symbol.isNewBar&&(y=c.pivots[c.pivots.length-1]).endIndex__t!==h&&(y.endIndex__t=h),0!==e.symbol.index&&e.symbol.isNewBar?(g=function(e,t,i,n,o,r,a,c){var u,h=new l,d=NaN,p=i-n;switch(c){case 0:d=(i+n+o)/3,h.p=d,h.r1=2*d-n,h.s1=2*d-i,h.r2=d+(i-n),h.s2=d-(i-n),h.r3=2*d+(i-2*n),h.s3=2*d-(2*i-n),h.r4=3*d+(i-3*n),h.s4=3*d-(3*i-n),h.r5=4*d+(i-4*n),h.s5=4*d-(4*i-n);break;case 1:d=(i+n+o)/3,h.p=d,h.r1=d+.382*p,h.s1=d-.382*p,h.r2=d+.618*p,h.s2=d-.618*p,h.r3=d+p,h.s3=d-p;break;case 2:d=(i+n+2*e)/4,h.p=d,h.r1=2*d-n,h.s1=2*d-i,h.r2=d+p,h.s2=d-p,h.r3=i+2*(d-n),h.s3=n-2*(i-d),h.r4=h.r3+p,h.s4=h.s3-p;break;case 3:d=(i+n+o)/3,h.p=d,h.r1=2*d-n,h.s1=2*d-i,h.r2=d+p,h.s2=d-p,h.r3=d+2*p,h.s3=d-2*p,h.r4=d+3*p,h.s4=d-3*p;break;case 4:u=NaN,d=(u=s.Std.equal(t,o)?i+n+2*o:s.Std.greater(o,t)?2*i+n+o:2*n+i+o)/4,h.p=d,h.r1=u/2-n,h.s1=u/2-i;break;case 5:d=(i+n+o)/3,h.p=d,h.r1=o+1.1*p/12,h.s1=o-1.1*p/12,h.r2=o+1.1*p/6,h.s2=o-1.1*p/6,h.r3=o+1.1*p/4,h.s3=o-1.1*p/4,h.r4=o+1.1*p/2,h.s4=o-1.1*p/2;break;default:throw new Error("Unknown kind")}return h.startIndex__t=r,h.endIndex__t=a,h}(u,d,p,_,f,h,o(e,h),this._kindPP),e.select_sym(0),this._showHistoricalPivots||(c.pivots=[]),c.pivots.push(g),c.pivots.length>this._historicalPivotsToKeep&&c.pivots.shift(),m?this._createResponse():null):(e.select_sym(0),null)):null},e.prototype._createResponse=function(){return 0===this._data.pivots.length?null:{nonseries:!0,type:"non_series_data",data:{data:this._data}}},e.prototype._removeUnusedPivots=function(){var e=this,t=Math.max(this._data.pivots.findIndex(function(t){return t.startIndex__t>e._firstMainSeriesBarTime})-1,0);t>0&&this._data.pivots.splice(0,t)},e}(),h={name:"Pivot Points Standard",metainfo:{_metainfoVersion:44,defaults:{inputs:{kind:"Traditional",lookBack:15,pivTimeFrame:"Auto",showHistoricalPivots:!0},precision:"4"},description:"Pivot Points Standard",
id:"PivotPointsStandard@tv-basicstudies-80",inputs:[{defval:"Traditional",id:"kind",name:"Type",options:["Traditional","Fibonacci","Woodie","Classic","DeMark","Camarilla"],type:"text"},{defval:!0,id:"showHistoricalPivots",name:"Show historical pivots",type:"bool"},{defval:"Auto",id:"pivTimeFrame",name:"Pivots Timeframe",options:["Auto","Daily","Weekly","Monthly","Yearly"],type:"text"},{defval:15,id:"lookBack",max:5e3,min:2,name:"Number of Pivots Back",type:"integer"}],is_price_study:!0,linkedToSeries:!0,shortDescription:"Pivots"},constructor:u}},"i/Bj":function(e,t,i){"use strict";function n(e){if(void 0===e)return null;var t=e.match(/(delayed_streaming)_([\d]{1,4})/);return null===t?null:{mode:t[1],interval:parseInt(t[2])}}i.r(t),i.d(t,"parseUpdateMode",function(){return n})},i126:function(e,t,i){"use strict";var n,o,r,s,a,l,c,u;i.r(t),i.d(t,"StudyColorRotatorFactory",function(){return u}),n=i("eJTA"),o=i("Tmoa"),r=i("6Kf3"),s=i("3ClC"),a=["color-tan-orange-a700","color-sky-blue-400","color-banana-yellow-700","color-deep-blue-500","color-grapes-purple-a700","color-iguana-green-500","color-minty-green-a700","color-ripe-red-a200","color-berry-pink-200","color-tv-blue-a100","color-tan-orange-a200","color-sky-blue-a400","color-deep-blue-a100","color-grapes-purple-400","color-iguana-green-a700","color-minty-green-200","color-ripe-red-200","color-berry-pink-a200","color-ripe-red-500","color-grapes-purple-500","color-deep-blue-400","color-tv-blue-a200","color-sky-blue-500","color-iguana-green-400","color-minty-green-400","color-banana-yellow-600","color-tan-orange-500","color-berry-pink-400","color-ripe-red-300","color-grapes-purple-300","color-deep-blue-300","color-tv-blue-300","color-sky-blue-300","color-iguana-green-300","color-minty-green-300","color-banana-yellow-400","color-tan-orange-300","color-berry-pink-300"],l=function(){function e(e){this._offset=0,this._offset=e}return e.prototype.getColor=function(e){var t,i,s;return 0===this._offset?e:(t=a[(this._offset-1)%a.length],i=r.a[t],s=Object(o.isHexColor)(e)?1:Object(n.parseRgba)(e)[3],Object(o.generateColor)(i,Object(o.alphaToTransparency)(s)))},e}(),c=function(){function e(e,t){this._offset=e,this._modelStartOffset=t}return e.prototype.getColor=function(e){var t,i;return Object(o.isHexColor)(e)?(t=Object(n.parseRgb)(e),Object(n.rgbToHexString)(Object(n.shiftRgb)(t,this._offset,this._modelStartOffset))):(i=Object(n.parseRgba)(e),Object(n.rgbaToString)(Object(n.shiftRgba)(i,this._offset,this._modelStartOffset)))},e}(),u=function(){function e(e){this._chartModel=e}return e.prototype.getColorRotator=function(e){var t,i=Object(s.studyColorRotationMode)(e),n=this._calcDefaultColorsOffset(e);switch(i){case"loop":return new l(n);case"shift":return t=this._chartModel.getStudyShiftColorStartOffset(),new c(n,t)}},e.prototype._calcDefaultColorsOffset=function(e){var t=0;return this._chartModel.dataSources().filter(s.isStudy).forEach(function(i){var n,o,r,s,a=i.metaInfo().id===e.id,l=(n=i.metaInfo(),o=e,r=n.pine?n.pine.version:void 0,s=o.pine?o.pine.version:void 0,
r===s),c=a&&l;c&&t++}),t},e}()},i1o5:function(e,t,i){"use strict";var n,o;i.r(t),i.d(t,"InvalidationLevel",function(){return n}),i.d(t,"InvalidateMask",function(){return o}),function(e){e[e.Cursor=1]="Cursor",e[e.Light=2]="Light",e[e.Full=3]="Full"}(n||(n={})),o=function(){function e(e){this._panesOrderChanged=!1,this._invalidatedPanes=new Map,this._invalidationLevel=e||n.Cursor}return e.prototype.invalidatePane=function(e,t){var i=this._invalidatedPanes.get(e)||n.Cursor;this._invalidatedPanes.set(e,Math.max(i,t))},e.prototype.invalidatePanesOrder=function(){this._panesOrderChanged=!0},e.prototype.invalidateAll=function(e){this._invalidationLevel=Math.max(this._invalidationLevel,e)},e.prototype.fullInvalidation=function(){return this._invalidationLevel},e.prototype.invalidateForPane=function(e){var t=this._invalidatedPanes.get(e)||n.Cursor;return Math.max(t,this._invalidationLevel)},e.prototype.merge=function(e){var t=this;this._invalidationLevel=Math.max(this._invalidationLevel,e._invalidationLevel),this._panesOrderChanged=this._panesOrderChanged||e._panesOrderChanged,e._invalidatedPanes.forEach(function(e,i){var o=t._invalidatedPanes.get(i)||n.Cursor;t._invalidatedPanes.set(i,Math.max(o,e))})},e.prototype.panesOrderInvalidated=function(){return this._panesOrderChanged},e.prototype.exclude=function(e){var t,i,n,o;for(this._invalidationLevel<=e&&(this._invalidationLevel=0),t=[],this._invalidatedPanes.forEach(function(i,n){i<=e&&t.push(i)}),i=0,n=t;i<n.length;i++)o=n[i],this._invalidatedPanes.delete(o)},e.cursor=function(){return new e(n.Cursor)},e.light=function(){return new e(n.Light)},e.full=function(){return new e(n.Full)},e.panesOrder=function(){var t=e.full();return t.invalidatePanesOrder(),t},e}()},i3nr:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"OverlayStatusView",function(){return r}),n=i("mrSG"),o=i("2kV1"),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype.getSplitTitle=function(){return this._source.isFailed()?[this._source.title(!0,void 0,!1,!1)+": "+this._source.status(),void 0]:this._source.titleInParts(!0,void 0,!1,!1)},t.prototype.update=function(){this._source.isFailed()?this._text=this._source.title(!0,void 0,!1,!1)+": "+this._source.status():this._text=this._source.title(!0,void 0,!1,!1)+" "+this._source.status()},t}(o.StudyStatusView)},i80N:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolFibSpiral";var r=t||n.createProperties();o.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("8MBc").FibSpiralPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=window.t("Fib Spiral");inherit(n,o),n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return a},n.prototype.name=function(){return"Fib Spiral"},n.prototype.getStylesPropertyPage=function(){return s.LineToolFibSpiralStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){
return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("nBUU").FibSpiralDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new r("linetoolfibspiral",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolFibSpiral=n},iDOr:function(e,t,i){"use strict";(function(e){function n(t,i,o){g.call(this),this.m_timeScale=t,this._rightPriceScales=[],this._leftPriceScales=[],this._priceScaleSelectionStrategy=y(o.properties().priceScaleSelectionStrategyName.value()),this.m_dataSources=[],this.m_height=0,this.m_width=0,this.m_mainDataSource=null,this._properties=i,this._model=o,this._destroyed=new e,this._priceScaleRatioChanged=new e,this._priceScaleRatioChanged.subscribe(this,this._mainSeriesPaneScaleRatioOnChange),o.properties().priceScaleSelectionStrategyName.listeners().subscribe(null,function(e){this._priceScaleSelectionStrategy=y(e.value()),this._priceScaleSelectionStrategy.apply(this)}.bind(this)),this.m_timeScale.barSpacingChanged().subscribe(this,function(){this.m_mainDataSource===this._model.mainSeries()&&this._recalculatePriceScaleByScaleRatio(this.m_mainDataSource.priceScale())}.bind(this)),this._lockedPriceScale=null,this._currentPriceScaleRatio=null,i.topMargin.listeners().subscribe(this,n.prototype._updateMargins),i.bottomMargin.listeners().subscribe(this,n.prototype._updateMargins),this._updateMargins(),this._isInInsertManyDataSourcesState=!1,this._lastLineDataSourceZOrder=null,this._maximized=!1,this._isMainPane=!1,this._onPriceScalesChanged=new e}var o=i("Eyy1"),r=o.assert,s=i("Y7w9").moveToHead,a=i("704P").ExecutionsPositionController,l=i("Ss5c").LineDataSource,c=i("Qb4w").PriceRange,u=i("7ktv").PriceDataSource,h=i("uOxu").getLogger("Chart.Pane"),d=i("CW80").isLineTool,p=i("1Wlv").PriceScale,_=i("FaJS").scaleRatio,f=i("FaJS").priceRangeByScaleRatio,m=i("FaJS").barSpacingByScaleRatio,y=i("MWAT").createPriceScaleSelectionStrategy,g=i("yfAl").PaneBase,v=i("s1Gx").sortSources;inherit(n,g),n.DEFAULT_STRETCH_FACTOR=1e3,n.PANE_ANIMATION_DURATION=500,n.prototype.destroy=function(){var e,t;for(this._properties.topMargin.listeners().unsubscribe(this,n.prototype._updateMargins),this._properties.bottomMargin.listeners().unsubscribe(this,n.prototype._updateMargins),this._model.properties().priceScaleSelectionStrategyName.listeners().unsubscribeAll(this),this.m_timeScale.barSpacingChanged().unsubscribeAll(this),this._leftPriceScales.concat(this._rightPriceScales).forEach(function(e){e.modeChanged().unsubscribeAll(this),e.priceRangeChanged().unsubscribeAll(this),e.internalHeightChanged().unsubscribeAll(this)},this),this._priceScaleRatioChanged.unsubscribeAll(this),e=0;e<this.m_dataSources.length;e++)(t=this.m_dataSources[e]).destroy&&t.destroy();this._destroyed.fire()},n.prototype._defaultBottomMargin=function(){return.01*this._properties.bottomMargin.value()},n.prototype._defaultTopMargin=function(){return.01*this._properties.topMargin.value()},n.prototype._updateMargins=function(){
var e,t,i=this._defaultTopMargin(),n=this._defaultBottomMargin();for(this._leftPriceScales.forEach(function(e){e.setTopMargin(i),e.setBottomMargin(n)}),this._rightPriceScales.forEach(function(e){e.setTopMargin(i),e.setBottomMargin(n)}),e=0;e<this.m_dataSources.length;e++)(t=this.m_dataSources[e])instanceof TradingView.Study&&this.isOverlay(t)&&"Volume"!==t.metaInfo().shortId&&(!t.priceScale()||this._leftPriceScales.includes(t.priceScale())||this._rightPriceScales.includes(t.priceScale())||(t.priceScale().setTopMargin(i),t.priceScale().setBottomMargin(n),this.recalculatePriceScale(t.priceScale())));this._leftPriceScales.forEach(function(e){this.recalculatePriceScale(e)},this),this._rightPriceScales.forEach(function(e){this.recalculatePriceScale(e)},this),this.updateAllViews()},n.prototype.model=function(){return this._model},n.prototype.width=function(){return this.m_width},n.prototype.height=function(){return this.m_height},n.prototype.setWidth=function(e){this.m_width=e,this.updateAllViews()},n.prototype.setHeight=function(e){var t,i;for(this.m_height=e,this._leftPriceScales.forEach(function(t){t.setHeight(e)}),this._rightPriceScales.forEach(function(t){t.setHeight(e)}),t=0;t<this.m_dataSources.length;t++)i=this.m_dataSources[t],this.isOverlay(i)&&i.priceScale()&&i.priceScale().setHeight(e);this.updateAllViews()},n.prototype.leftPriceScales=function(){return this._leftPriceScales},n.prototype.rightPriceScales=function(){return this._rightPriceScales},n.prototype.visibleLeftPriceScales=function(){var e,t=this._model.priceScaleSlotsCount();return this._leftPriceScales.length>t.left?((e=s(this._leftPriceScales,this.mainDataSource().priceScale())).splice(t.left),e):this._leftPriceScales},n.prototype.visibleRightPriceScales=function(){var e,t=this._model.priceScaleSlotsCount();return this._rightPriceScales.length>t.right?((e=s(this._rightPriceScales,this.mainDataSource().priceScale())).splice(t.right),e):this._rightPriceScales},n.prototype.timeScale=function(){return this.m_timeScale},n.prototype.dataSources=function(){return this.m_dataSources},n.prototype.isOverlay=function(e){var t=e.priceScale();return"overlay"===this.priceScalePosition(t)},n.prototype._processMainSourceChange=function(){var e,t,i,n,o;if(null===this.m_mainDataSource)for(t=0;t<this.m_dataSources.length;t++)if((i=this.m_dataSources[t])instanceof u&&!this.isOverlay(i)&&(!i.properties().linkedToSeries||!i.properties().linkedToSeries.value())){this.m_mainDataSource=i,e=!0;break}if(this.m_mainDataSource&&e){for(n=[],t=0;t<this.m_dataSources.length;t++)(i=this.m_dataSources[t])instanceof l&&n.push(i);for(n=v(n),t=0;t<n.length;t++)this.move(n[t],this.m_mainDataSource.priceScale(),!0)}else if(!this.m_mainDataSource||this.isOverlay(this.m_mainDataSource)&&0===this.nonOverlayPricesSourcesCount())for(t=0;t<this.m_dataSources.length;t++)if((i=this.m_dataSources[t])instanceof u&&this.isOverlay(i)&&i.showInObjectTree()){this.m_mainDataSource=i,o=this._priceScaleSelectionStrategy.createNewPriceScaleIfPossible(this),this.move(i,o,!0),
this.recalculatePriceScale(i.priceScale());break}},n.prototype._newZOrderForLineTool=function(){var e,t,i,n=null;for(e=0;e<this.m_dataSources.length;++e)t=this.m_dataSources[e],d(t)&&(i=t.zorder(),(null===n||i>n)&&(n=i));return null===n&&(n=this.getZOrderMinMax().minZOrder-1),this.m_dataSources.forEach(function(e){e.zorder()>n&&e.setZorder(e.zorder()+1)}),n+1},n.prototype.beginInsertManyLineDataSources=function(){this._isInInsertManyDataSourcesState=!0,this._lastLineDataSourceZOrder=null},n.prototype.endInsertManyLineDataSources=function(){this._isInInsertManyDataSourcesState=!1,this._lastLineDataSourceZOrder=null},n.prototype.addDataSource=function(e,t,i){var n;d(e)&&!i?(n=null!==this._lastLineDataSourceZOrder?this._lastLineDataSourceZOrder:this._newZOrderForLineTool(),this._isInInsertManyDataSourcesState&&(this._lastLineDataSourceZOrder=n)):n=this.getZOrderMinMax().minZOrder-1,this.insertDataSource(e,t,n)},n.prototype.insertDataSource=function(e,t,i){t||(t=this.findSuitableScale(e)),this._addSourceToCollections(e);var o=!1;e===this._model.mainSeries()?(this.m_mainDataSource=e,o=!0):null===this.m_mainDataSource&&(this.m_mainDataSource=e,o=!0),t.addDataSource(e,this._isInInsertManyDataSourcesState),e.setPriceScale(t),e.onTagsChanged&&e.onTagsChanged().subscribe(this,n.prototype.onSourceTagsChanged),e.setZorder(i),o&&this._processMainSourceChange(),this._tagsChanged.fire(),TradingView.isInherited(e.constructor,u)&&this.recalculatePriceScale(t),this._invalidateSourcesCache()},n.prototype.priceScalePosition=function(e){return this._leftPriceScales.includes(e)?"left":this._rightPriceScales.includes(e)?"right":"overlay"},n.prototype.createPriceScaleAtPosition=function(e,t){var i,n=this._properties.axisProperties.state();return n.autoScale=!0,(i=new p(this._model.properties().scalesProperties,n)).setHeight(this.height()),i.setTopMargin(this._defaultTopMargin()),i.setBottomMargin(this._defaultBottomMargin()),this._placePriceScale(i,e,t),i},n.prototype._placePriceScale=function(e,t,i){var n,o;"overlay"!==t&&(n="left"===t?this._leftPriceScales:this._rightPriceScales,o=void 0===i?n.length:i,n.splice(o,0,e),e.modeChanged().subscribe(this,this._onPriceScaleModeChanged.bind(this,e)),e.internalHeightChanged().subscribe(this,this._recalculatePriceScaleByScaleRatio.bind(this,e)),e.priceRangeChanged().subscribe(this,this._recalculateTimeScaleByScaleRatio.bind(this,e)),e.priceRangeChanged().subscribe(this,this._onPriceScaleSetMinMaxPriceRange.bind(this,e)),e.isLockScale()&&(r(null===this._lockedPriceScale),this._lockedPriceScale=e,this._currentPriceScaleRatio=null),this._onPriceScalesChanged.fire())},n.prototype.removePriceScale=function(e){var t,i;e.modeChanged().unsubscribeAll(this),e.priceRangeChanged().unsubscribeAll(this),e.internalHeightChanged().unsubscribeAll(this),e===this._lockedPriceScale&&(this._lockedPriceScale=null,this._currentPriceScaleRatio=null),-1!==(t=this._leftPriceScales.indexOf(e))&&this._leftPriceScales.splice(t,1),-1!==(i=this._rightPriceScales.indexOf(e))&&this._rightPriceScales.splice(i,1),
this._onPriceScalesChanged.fire()},n.prototype.removeDataSource=function(e,t){var i,o,r=this.m_dataSources.indexOf(e);-1!==r?(this._removeSourceFromCollections(r),e!==this.m_mainDataSource||t||(this.m_mainDataSource=null),(i=e.priceScale())&&i.dataSources().indexOf(e)>=0&&i.removeDataSource(e),i&&null===i.mainSource()&&(0!==(o=i.dataSources().length)&&h.logError("Invalid priceScale state: empty mainSource but non-empty data sources="+o),this.removePriceScale(i)),e.onTagsChanged&&e.onTagsChanged().unsubscribe(this,n.prototype.onSourceTagsChanged),e instanceof u&&!t&&this._processMainSourceChange(),this._tagsChanged.fire(),i&&e instanceof u&&this.recalculatePriceScale(i),this._invalidateSourcesCache()):h.logDebug("removeDataSource: invalid data source")},n.prototype.startScalePrice=function(e,t){e.startScale(t)},n.prototype.scalePriceTo=function(e,t){e.scaleTo(t),this.updateAllViews()},n.prototype.endScalePrice=function(e){e.endScale()},n.prototype.startScrollPrice=function(e,t){e.startScroll(t)},n.prototype.scrollPriceTo=function(e,t){e.scrollTo(t),this.updateAllViews()},n.prototype.endScrollPrice=function(e){e.endScroll()},n.prototype.setPriceAutoScale=function(e,t){e.setMode({autoScale:t}),this.timeScale().isEmpty()?e.setPriceRange(null):this.recalculatePriceScale(e)},n.prototype.restorePriceScaleState=function(e,t){e.restoreState(t),this.updateAllViews()},n.prototype._updateCustomSourceAllViews=function(e){e.paneViews(this).length>0&&e.updateAllViews()},n.prototype.updateAllViews=function(){for(var e=0;e<this.m_dataSources.length;e++)this.m_dataSources[e].updateAllViews();this._model.customSources().forEach(this._updateCustomSourceAllViews,this)},n.prototype.defaultPriceScale=function(){var e=this.m_mainDataSource?this.m_mainDataSource.priceScale():null;return null===e&&(e=new p(this._model.properties().scalesProperties)),e},n.prototype._priceScaleIsPrice=function(e){var t=e.mainSource();return!!t&&(!!TradingView.isInherited(t.constructor,TradingView.Series)||!!TradingView.isInherited(t.constructor,TradingView.Study)&&t.metaInfo().is_price_study)},n.prototype.findSuitableScale=function(e,t,i){return this._priceScaleSelectionStrategy.findSuitableScale(this,e,t,i)},n.prototype.createNewPriceScaleIfPossible=function(){return this._priceScaleSelectionStrategy.createNewPriceScaleIfPossible(this)},n.prototype.canCreateNewPriceScale=function(){return this._priceScaleSelectionStrategy.canCreateNewPriceScale(this)},n.prototype.mainDataSource=function(){return this.m_mainDataSource},n.prototype.recalculatePriceScale=function(e){var t,i;e&&(t=e.sourcesForAutoscale(),e.isAutoScale()&&t&&t.length>0&&!this.timeScale().isEmpty()&&(i=this.timeScale().visibleBarsStrictRange(),e.recalculatePriceRange(i)),e.updatePaneViews())},n.prototype.resetPriceScale=function(e){var t=this.timeScale().visibleBarsStrictRange();e.isLockScale()||e.setMode({autoScale:!0}),e.recalculatePriceRange(t),this.updateAllViews()},n.prototype.recalculate=function(){var e,t;for(this.recalculatePriceScale(this.m_rightPriceScale),
this.recalculatePriceScale(this.m_leftPriceScale),e=0;e<this.m_dataSources.length;e++)t=this.m_dataSources[e],this.isOverlay(t)&&!d(t)&&this.recalculatePriceScale(t.priceScale());this.updateAllViews(),this._model.updatePane(this)},n.prototype.isEmpty=function(){return null===this.m_mainDataSource},n.prototype.move=function(e,t,i){this.removeDataSource(e,!0),this.addDataSource(e,t,i),this._processMainSourceChange(),this._invalidateSourcesCache(),this._onPriceScalesChanged.fire()},n.prototype.hitTestSources=function(){var e,t,i,n,o;if(this._cachedHitTestSources)return this._cachedHitTestSources;for(e=this.orderedSources(),t=[],i=[],n=0;n<e.length;n++)o=e[n],TradingView.isInherited(o.constructor,l)?t.push(o):i.push(o);return this._cachedHitTestSources=i.concat(t),this._cachedHitTestSources},n.prototype.allOrderedSources=function(){return this._cachedAllOrderedSources||(this._cachedAllOrderedSources=v(this.m_dataSources)),this._cachedAllOrderedSources},n.prototype.orderedSources=function(e){var t,i,n,o,r=function(){return void 0===e?this._cachedOrderedSoruces.all:(this._cachedOrderedSoruces[e]||(this._cachedOrderedSoruces[e]=this._cachedOrderedSoruces.all.filter(function(t){return this.priceScalePosition(t.priceScale())===e},this)),this._cachedOrderedSoruces[e])}.bind(this);if(this._cachedOrderedSoruces)return r();for(t=[],i=0,n=this.m_dataSources.length;i<n;i++)o=this.m_dataSources[i],TradingView.isInherited(o.constructor,l)&&!o.isActualSymbol()||t.push(o);return t=v(t),this._cachedOrderedSoruces={all:t},r()},n.prototype.customSources=function(e){return this._model.customSources(e)},n.prototype.createDrawingsCaches=function(){a.recreateOrderedByBarsSourcesCache(this)},n.prototype.clearDrawingCaches=function(){a.clearOrderedByBarsSourcesCache()},n.prototype._invalidateSourcesCache=function(){this._cachedOrderedSoruces=null,this._cachedHitTestSources=null,this._cachedAllOrderedSources=null,this._leftPriceScales.forEach(function(e){e.invalidateSourcesCache()}),this._rightPriceScales.forEach(function(e){e.invalidateSourcesCache()})},n.prototype.getZOrderMinMax=function(){var e,t,i,n,o=this.orderedSources();if(0===o.length)return{minZOrder:0,maxZOrder:0};for(e=o[0].zorder(),t=o[0].zorder(),i=1;i<o.length;i++)(n=o[i]).zorder()<e&&(e=n.zorder()),n.zorder()>t&&(t=n.zorder());return{minZOrder:e,maxZOrder:t}},n.prototype.isZOrderAvailable=function(e){var t;for(t=0;t<this.m_dataSources.length;t++)if(this.m_dataSources[t].zorder()===e)return!1;return!0},n.prototype.changeZOrder=function(e,t){var i,n,o,r,s,a=this.orderedSources().filter(function(e){return e.showInObjectTree()}),l=0;for(i=0,n=a.length;i<n;i++)if(a[i]===e){l=i;break}l>0&&t<0?(o=a[l-1].zorder(),r=e.zorder(),a[l-1].setZorder(r),e.setZorder(o)):l<a.length-1&&t>0&&(s=a[l+1].zorder(),r=e.zorder(),a[l+1].setZorder(r),e.setZorder(s)),this._invalidateSourcesCache(),this._dataSourcesCollectionChanged.fire()},n.prototype.onSourceTagsChanged=function(){this._tagsChanged.fire()},n.prototype.onDestroyed=function(){return this._destroyed},n.prototype.clearSeries=function(){
for(var e=this.m_dataSources.length-1;e>=0;e--)TradingView.isInherited(this.m_dataSources[e].constructor,TradingView.Series)&&this._removeSourceFromCollections(e)},n.prototype.nonOverlayPricesSourcesCount=function(){return this.m_dataSources.filter(function(e){return(!e.properties().linkedToSeries||!e.properties().linkedToSeries.value())&&(TradingView.isInherited(e.constructor,u)&&e.showInObjectTree()&&!this.isOverlay(e))},this).length},n.prototype.canHaveMoreNoScaleSources=function(){return this.nonOverlayPricesSourcesCount()>1},n.prototype.actionNoScaleIsEnabled=function(e){return!(!this.isOverlay(e)&&TradingView.isInherited(e.constructor,u))||this.canHaveMoreNoScaleSources()},n.prototype.executionsPositionController=function(){return this._executionsPositionController||(this._executionsPositionController=new a(this,this._model.timeScale())),this._executionsPositionController},n.prototype.isLast=function(){var e=this._model.panes(),t=e[e.length-1];return t===this},n.prototype.setMaximized=function(e){this._maximized=e},n.prototype.isMaximized=function(){return this._maximized},n.prototype.isMainPane=function(){var e=this._model.mainSeries(),t=!1;return this.m_dataSources.forEach(function(i){t||(t=i===e)}),this._isMainPane=t,t},n.prototype.properties=function(){return this._properties},n.prototype._mainSourceVisiblePriceRange=function(e){var t=this.m_timeScale.visibleBarsStrictRange();return null!==t?e.mainSource().priceRange(t.firstBar(),t.lastBar()):new c(-.5,.5)},n.prototype.priceScaleRatio=function(){return this._currentPriceScaleRatio},n.prototype.applyPriceScaleRatio=function(e,t){null!==this._lockedPriceScale&&this._lockedPriceScale!==e||this._currentPriceScaleRatio===t||!this.isMainPane()||null===this._lockedPriceScale&&e!==this.mainDataSource().priceScale()||(this._setNewPriceRangeByScaleRatio(e,t,this._mainSourceVisiblePriceRange(e),!0,!0),null!==this._lockedPriceScale?this._tryToApplyNewPriceScaleRatio():e.isLog()||this._model.mainSeriesScaleRatioPropertyOnChanged())},n.prototype._mainSeriesPaneScaleRatioOnChange=function(){this.isMainPane()&&this._model.mainSeriesScaleRatioPropertyOnChanged()},n.prototype._applyOldScaleRatioToPriceScale=function(){if(this._isRecalculatingScales||null===this._currentPriceScaleRatio)return!1;this._isRecalculatingScales=!0,this._setNewPriceRangeByScaleRatio(this._lockedPriceScale,this._currentPriceScaleRatio,this._mainSourceVisiblePriceRange(this._lockedPriceScale)),this._isRecalculatingScales=!1},n.prototype._applyOldScaleRatioToTimeScale=function(){if(this._isRecalculatingScales||null===this._currentPriceScaleRatio)return!1;this._isRecalculatingScales=!0,this._setNewBarSpacingByScaleRatio(),this._isRecalculatingScales=!1},n.prototype._tryToApplyNewPriceScaleRatio=function(){var e=_(this.m_timeScale,this._lockedPriceScale);this._currentPriceScaleRatio===e||this._lockedPriceScale.isLog()||(this._priceScaleRatioChanged.fire(this._currentPriceScaleRatio,e),this._currentPriceScaleRatio=e)},n.prototype._recalculatePriceScaleByScaleRatio=function(e){
this.isMainPane()&&e===this._lockedPriceScale&&(null!==this._currentPriceScaleRatio?this._applyOldScaleRatioToPriceScale():this._tryToApplyNewPriceScaleRatio())},n.prototype._recalculateTimeScaleByScaleRatio=function(e){e===this._lockedPriceScale&&(null!==this._currentPriceScaleRatio?this._applyOldScaleRatioToTimeScale():this._tryToApplyNewPriceScaleRatio())},n.prototype._setNewPriceRangeByScaleRatio=function(e,t,i,n,o){var r=f(e,this.m_timeScale.barSpacing(),t);e.setPriceRange(null!==r?r:i,n,o)},n.prototype._setMinMaxPriceRange=function(){var e=f(this._lockedPriceScale,this.m_timeScale.maxBarSpacing(),this._currentPriceScaleRatio),t=f(this._lockedPriceScale,this.m_timeScale.minBarSpacing(),this._currentPriceScaleRatio);null!==e&&this._lockedPriceScale.setMaxPriceRange(e),null!==t&&this._lockedPriceScale.setMinPriceRange(t)},n.prototype._onPriceScaleSetMinMaxPriceRange=function(e){e===this._lockedPriceScale&&this._setMinMaxPriceRange()},n.prototype._setNewBarSpacingByScaleRatio=function(){var e=this.m_timeScale.getValidBarSpacing(m(this._lockedPriceScale,this._currentPriceScaleRatio));this.m_timeScale.isValidBarSpacing(e)&&this.m_timeScale.setBarSpacing(e)},n.prototype._onPriceScaleModeChanged=function(e,t,i){if(i.lockScale&&(this._lockedPriceScale!==e&&null!==this._lockedPriceScale&&this._lockedPriceScale.setMode({lockScale:!1}),this._lockedPriceScale=e,this._currentPriceScaleRatio=_(this.m_timeScale,e)),t.lockScale&&!i.lockScale&&(this._lockedPriceScale=null,this._currentPriceScaleRatio=null),t.percentage!==i.percentage||t.indexedTo100!==i.indexedTo100){var n=this.timeScale().visibleBarsStrictRange();null!==n&&(e.recalculatePriceRange(n),e.updatePaneViews())}},n.prototype.lineToolsForArea=function(e){var t=this.m_height,i=this.m_width,n=this.logicalRectToPixels(e),o=function(e){return(e.paneViews()||[]).some(function(e){var o=e.renderer(t,i,!0);return o&&o.doesIntersectWithBox&&o.doesIntersectWithBox(n)})};return this.m_dataSources.filter(function(e){return d(e)}).filter(o)},n.prototype.getPriceScaleById=function(e){var t=this.m_dataSources.find(function(t){return null!==t.priceScale()&&t.priceScale().id()===e});return void 0===t?null:t.priceScale()},n.prototype.setPriceScaleSelectionStrategy=function(e){this._priceScaleSelectionStrategy=e,e.apply(this)},n.prototype.movePriceScale=function(e,t,i){var n,o,r=this.priceScalePosition(e);r!==t?(this.removePriceScale(e),this._placePriceScale(e,t,i),this._invalidateSourcesCache()):void 0!==i&&"overlay"!==r&&(o=(n="left"===r?this._leftPriceScales:this._rightPriceScales).indexOf(e),n.splice(o,1),n.splice(i,0,e))},n.prototype.onPriceScalesChanged=function(){return this._onPriceScalesChanged},n.prototype.priceScaleIndex=function(e,t){switch(t){case"left":return this.leftPriceScales().indexOf(e);case"right":return this.rightPriceScales().indexOf(e)}},n.prototype.findTargetPriceAxisViews=function(e,t,i,n){var o,r
;return this._model.paneForSource(e)!==this?null:t===e.priceScale()?i:"overlay"===this.priceScalePosition(e.priceScale())?t===this.defaultPriceScale()?i:null:(o=this.priceScalePosition(t))!==this.priceScalePosition(e.priceScale())?null:(r="left"===o?this.leftPriceScales():this.rightPriceScales()).indexOf(t)<r.indexOf(e.priceScale())?n:null},n.prototype.realignLineTools=function(){var e,t;for(e=0;e<this.m_dataSources.length;e++)t=this.m_dataSources[e],d(t)&&t.calcIsActualSymbol();this._invalidateSourcesCache()},n.prototype._addSourceToCollections=function(e){this.m_dataSources.push(e),this._sourcesById.set(e.id(),e),this._invalidateSourcesCache(),this._dataSourcesCollectionChanged.fire()},n.prototype._removeSourceFromCollections=function(e){var t=this.m_dataSources[e];this.m_dataSources.splice(e,1),this._sourcesById.delete(t.id()),this._invalidateSourcesCache(),this._dataSourcesCollectionChanged.fire()},t.Pane=n}).call(this,i("aIyQ"))},icPo:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolIcon";var r=t||n.createProperties();o.call(this,e,r),this.version=n.version,i.e("lt-pane-views").then(function(e){var t=i("8GeE").IconPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=window.t("Icon");inherit(n,o),n.version=1,n.anchorLimit=80,n.prototype.getAnchorLimit=function(){return n.anchorLimit},n.prototype.pointsCount=function(){return 1},n.prototype.title=function(){return a},n.prototype.name=function(){return"Icon"},n.prototype.hasEditableCoordinates=function(){return!1},n.prototype.applyTemplate=function(e){delete e.icon,o.prototype.applyTemplate.call(this,e)},n.prototype.startChanging=function(e,t){var i,r;o.prototype.startChanging.call(this,e,t),r=65536*(i=this.properties()).icon.value()+i.size.value(),this._startChangeWidth=this._paneViews[0]._cache[r],i.size.value()<n.anchorLimit?this._sizeScale=i.size.value()/n.anchorLimit:this._sizeScale=1,this._origScale=i.scale.value(),this._startChangeWidth*this._origScale<n.anchorLimit?this._resizeRatio=this._startChangeWidth/n.anchorLimit:this._resizeRatio=1},n.prototype.endChanging=function(){o.prototype.endChanging.call(this),delete this._startChangeWidth,delete this._sizeScale,delete this._resizeRatio},n.prototype.setPoint=function(e,t,i){var o,r,s,a,l,c,u,h,d,p=Object.assign({},t);i&&i.shift()&&this._properties.snapTo45Degrees&&this._snapPoint45Degree(p,this.points()[0]),o=this.pointToScreenPoint(this.points()[0])[1],r=this.pointToScreenPoint(p)[1],0===e||1===e?(s=r.subtract(o).normalized(),a=2*r.subtract(o).length(),a*=this._sizeScale,this._properties.size.setValue(a),l=-s.x,c=Math.acos(l),Math.asin(s.y)>0&&(c=2*Math.PI-c),0===e&&(c+=Math.PI),this._properties.angle.setValue(c)):(u=this._startChangeWidth,h=r.subtract(o).length(),this._origScale*u<n.anchorLimit?(d=n.anchorLimit/2,this._properties.scale.setValue(this._origScale*h/d)):(d=u/2,this._properties.scale.setValue(h/d)))},n.prototype.getInputsPropertyPage=function(){
return null},n.prototype.getStylesPropertyPage=function(){return s.LineToolIconStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("XCOO").IconsDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.prototype.getSourceIcon=function(){return{type:"text",text:String.fromCharCode(this.properties().icon.value())}},n.createProperties=function(e){var t=new r("linetoolicon",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e),e.addExclusion("angle"),e.addExclusion("scale")},t.LineToolIcon=n},ijBy:function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"SetChartLayoutCommand",function(){return s}),n=i("mrSG"),o=i("RDU5"),r=i("VNzU"),s=function(e){function t(t,i){var n=this,o="Change Chart Layout to "+r.layouts[i].title;return(n=e.call(this,o)||this)._chartWidgetCollection=t,n._newLayoutType=i,n._oldLayoutType=t.layout.value(),n}return Object(n.__extends)(t,e),t.prototype.redo=function(){this._chartWidgetCollection.layout.setValue(this._newLayoutType)},t.prototype.undo=function(){this._chartWidgetCollection.layout.setValue(this._oldLayoutType)},t}(o.UndoCommand)},ikwP:function(e,t,i){"use strict";function n(e,t){e.width=t.w,e.height=t.h;var i=e.getContext("2d");i&&i.translate(.5,.5)}function o(e,t){e.width=0,n(e,t)}function r(e,t,i,n,o,r){e.save(),e.translate(-.5,-.5),e.fillStyle=r,e.fillRect(t,i,n,o),e.restore()}function s(e,t,i,n,o,r){e.save(),e.translate(-.5,-.5),e.globalCompositeOperation="copy",e.fillStyle=r,e.fillRect(t,i,n,o),e.restore()}function a(e,t){var i=document.createElement("canvas");return e.appendChild(i),n(i,t),i}function l(e,t){return"center"===e.textAlign?0:Object(c.isRtl)()?"start"===e.textAlign||"right"===e.textAlign?t:0:"start"===e.textAlign||"left"===e.textAlign?0:t}var c,u;i.r(t),i.d(t,"Size",function(){return u}),i.d(t,"resizeCanvas",function(){return n}),i.d(t,"hardResizeCanvas",function(){return o}),i.d(t,"fillRect",function(){return r}),i.d(t,"clearRect",function(){return s}),i.d(t,"addCanvasTo",function(){return a}),i.d(t,"calcTextHorizontalShift",function(){return l}),c=i("Ialn"),u=function(){function e(e,t){this.w=e,this.h=t}return e.prototype.equals=function(e){return this.w===e.w&&this.h===e.h},e}()},isVH:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolTriangle";var r=t||n.createProperties();o.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("D4q4").TrianglePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=window.t("Triangle");inherit(n,o),n.prototype.pointsCount=function(){return 3},n.prototype.title=function(){return a},n.prototype.name=function(){return"Triangle"},n.prototype.getStylesPropertyPage=function(){return s.LineToolTriangleStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){
return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("Zd1D").GeneralFiguresDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new r("linetooltriangle",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolTriangle=n},it7y:function(e,t,i){"use strict";var n,o,r,s,a,l,c,u,h,d,p,_,f,m;i.r(t),i.d(t,"StudyDataWindowView",function(){return m}),n=i("mrSG"),o=i("ivNn"),r=i("4miz"),s=i("Kxc7"),a=i("k9/m"),l=i("23IT"),c=i("qFKp"),u=i("e92V"),h=i("mMWL"),d=c.CheckMobile.any(),p=window.t("n/a"),_=s.enabled("hide_last_na_study_output"),f=function(e){function t(t,i,n,o){var r=e.call(this,t,i)||this;return r.plotId=n,r.plotIndex=o,r}return Object(n.__extends)(t,e),t}(r.a),m=function(e){function t(t,i){var n,o,r,s,a=e.call(this)||this;if(a._invalidated=!0,a._study=t,a._model=i,!(n=t.metaInfo().plots))return a;for(o=0;o<n.length;++o)a._study.isSelfColorerPlot(o)||a._study.isBarColorerPlot(o)||a._study.isBgColorerPlot(o)||a._study.isDataOffsetPlot(o)||a._study.isOHLCColorerPlot(o)||a._study.isAlertConditionPlot(o)||(r=n[o].id,s=new f(a._study.guiPlotName(r),"",r,o),a._items.push(s));return a.update(),a}return Object(n.__extends)(t,e),t.prototype.update=function(){this._invalidated=!0},t.prototype.items=function(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._items},t.prototype._hideValues=function(){return d&&(null===this._model.crossHairSource().pane||Object(u.a)(h.tool.value())||null!==this._model.lineBeingEdited())},t.prototype._updateImpl=function(){var e,t,i,n,r,s,c,u,h,d,f,m,y,g,v,S,b,w,P,C,T,x,I,L,M,A,k,E,O;for(this._header=this._study.title(!0),this._title=this._study.title(),e=this._hideValues(),t=this._study.isVisible()&&!e?p:"",i=0,n=this._items;i<n.length;i++)(r=n[i]).setValue(t);if(!e&&(_&&this._items.length&&this._items[this._items.length-1].setValue(""),!this._model.timeScale().isEmpty())){if(s=this._study.metaInfo().plots,c={},u=this._study.metaInfo().palettes,s&&void 0!==u)for(h=0;h<s.length;h++)d=s[h],(Object(l.isColorerPlot)(d)||Object(l.isOhlcColorerPlot)(d))&&(c[d.target]={index:h,palette:u[d.palette],paletterProps:this._study.properties().palettes[d.palette]});if(null!==(f=this._currentIndex())&&Object(o.isNumber)(f))for(m=this._study.formatter(),y={},g=0,v=this._items;g<v.length;g++)S=(r=v[g]).plotId,b=r.plotIndex,w=this._study.offset(S),void 0!==(P=this._study.nearestIndex(f-w,a.PlotRowSearchMode.NearestLeft))&&(void 0===(C=y[S])&&(C=this._study.getMinFirstBarIndexForPlot(S),Number.isFinite(C)&&(y[S]=C)),C>P||(T=this._study.data().last(),null!==(x=this._study.data().valueAt(P)||(null!==T?T.value:null))&&(I=x[b+1],Object(o.isNumber)(I)&&(r.setValue(m.format(I)),L=this._study.properties().styles[S].color.value(),d=s[b],Object(l.isOhlcPlot)(d)&&(S=d.target||S,L=this._study.properties().ohlcPlots[S].color.value()),M=L,c[S]&&x.length>c[S].index+1&&(A=x[c[S].index+1],k=c[S].palette,void 0!==A&&null!==A&&void 0!==k&&(E=c[S].paletterProps,
O=k.valToIndex?k.valToIndex[A]:A,M=E.colors[void 0!==O?O:A].color.value())),r.setColor(M)))))}},t.prototype._currentIndex=function(){var e=this._model.crossHairSource().lockedIndex;return void 0!==e?e:null!==this._model.crossHairSource().pane?this._model.crossHairSource().appliedIndex():this._study.data().lastIndex()},t}(r.b)},ivNn:function(e,t,i){"use strict";function n(e){return Math.round(1e10*e)/1e10}Object.defineProperty(t,"__esModule",{value:!0}),t.isNumber=function(e){return"number"==typeof e&&isFinite(e)},t.isInteger=function(e){return"number"==typeof e&&e%1==0},t.isNaN=function(e){return!(e<=0||e>0)},t.fixComputationError=n,t.alignTo=function(e,t){var i=e/t,o=Math.floor(i),r=i-o;return r>2e-10?n(r>.5?(o+1)*t:o*t):e}},j1f4:function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"dur",function(){return n}),i.d(t,"easingFunc",function(){return o}),i.d(t,"CubicBezier",function(){return r}),i.d(t,"color",function(){return s}),n=350,o={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:(4-2*e)*e-1},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}},r=function(){function e(e,t,i,n){this._mX1=e,this._mY1=t,this._mX2=i,this._mY2=n}return e.prototype.easingFunc=function(e){return this._mX1===this._mY1&&this._mX2===this._mY2?e:this._calcBezier(this._getTForX(e))},e.prototype._a=function(e,t){return 1-3*t+3*e},e.prototype._b=function(e,t){return 3*t-6*e},e.prototype._c=function(e){return 3*e},e.prototype._calcBezier=function(e){return((this._a(this._mY1,this._mY2)*e+this._b(this._mY1,this._mY2))*e+this._c(this._mY1))*e},e.prototype._getSlope=function(e){return 3*this._a(this._mX1,this._mX2)*e*e+2*this._b(this._mX1,this._mX2)*e+this._c(this._mX1)},e.prototype._getTForX=function(e){var t,i,n=e;for(t=0;t<4;++t){if(0===(i=this._getSlope(n)))return n;n-=(this._calcBezier(n)-e)/i}return n},e}(),s={black0:"#000",black20:"#2b2d36",black25:"#2b2e37",black27:"#2f3241",black30:"#212121",black70:"#4A4A4A",black80:"#535353",black100:"#646464",black110:"#757575",black140:"#8A8A8A",black170:"#ADAEB0",black180:"#b4b4b4",black200:"#C8C8C8",black220:"#DADDE0",black230:"#ECECEC",black240:"#F2F2F2",black248:"#F8F8F8",black255:"#FFF",brand:"#3BB3E4",brandHover:"#3BABD8",brandActive:"#3898C2",brandDown:"#049DDC",brand220:"#3BB3E0",brand255:"#3BB3FF",brandNew:"#37A6EF",brandNew2:"#2196F3",spinner:"#00A2E2",brandMedium80:"#3C4650",brandMedium90:"#465a6e",brandMedium100:"#627384",brandMedium120:"#758696",brandMedium150:"#94959C",brandMedium190:"#9DB2BD",brandMedium220:"#E9EFF2",brandMedium230:"#EAECEF",brandMedium240:"#F1F3F6",brandDark:"#2A2C39",
brandDark50:"#252733",brandDark45:"#20222D",brandDarkText:"#6A6B74",danger:"#FF4A68",dangerHover:"#F24965",dangerDown:"#FF173E",success:"#3CBC98",success55:"#37BC9B",success250:"#00FFC0",successHover:"#38B395",successDown:"#00A97F",attention:"#FFC84A",attention50:"#F89E30",growing:"#37bc9b",falling:"#ff4a68"}},jA0t:function(e,t,i){"use strict";var n=function(){function e(e){return e.is_price_study}function t(e,t){var i,n=t.slice(0).toLowerCase();if(e){for(i=0;i<e.length;++i)if(e[i].description.toLowerCase()===n||e[i].shortDescription.toLowerCase()===n)return e[i];throw new Error("Can't find metainfo for `"+t+"`")}throw new Error("There is no studies metainfo at all")}function i(e){return e.inputs.map(function(e){return{id:e.id,type:e.type,name:e.name}})}var n={},o={bool:function(e){return!!e},integer:function(e){return parseInt(e)},float:function(e){return parseFloat(e)},string:function(e){return e}};return n.getStudyRecordFromArray=function(n,r){return function(n,r){var s,a,l,c,u,h,d,p,_;if(!Array.isArray(n))return{id:(s=t(r.model().studiesMetaData(),n)).id,overlay:e(s)};for(l=(a=n.slice(0))[0],c=e(s=t(r.model().studiesMetaData(),l)),u=i(s),d=a.splice(1),p=0;p<d.length;++p)h||(h={}),_=o[u[p].type]||o.string,h[u[p].id]=_(d[p]);return{id:s.id,name:l,overlay:c,inputs:h}}(n,r=r||chartWidget)},n.getStudyRecordFromObject=function(e,n,o){return function(e,n,o){function r(e){return e.name.toLowerCase()===a}var s,a,l,c=t(o.model().studiesMetaData(),e),u=i(c),h={};for(s in n)a=s.toLowerCase(),0!==(l=u.filter(r)).length?h[(l=l[0]).id]=n[s]:console.warn("Uknown input `"+s+"` of `"+e+"`");return{id:c.id,name:e,inputs:h}}(e,n,o=o||chartWidget)},n}();e.exports=n},jCNj:function(e,t,i){"use strict";function n(e){var t,i,n,o,r,s;if(this._name=e,(t=p[e])||(t={time:[],offset:[]},this._invalid=!0),t.time.length!==t.offset.length&&(t={time:[],offset:[]},this._invalid=!0),!t.time_utc){for(i=t.time,n=t.offset,o=i.length,r=new Array(o),s=0;s<o;s++)i[s]*=1e3,n[s]*=1e3,r[s]=i[s]-n[s];t.time_utc=r}this.tz=t}function o(e,t){var i,n,o,r=e.length;if(0===r)return-1;if(isNaN(t))throw Error("Key is NaN");for(o=s(((i=0)+(n=r-1))/2);;){if(e[o]>t){if((n=o-1)<i)return o}else if(n<(i=o+1))return o<r-1?o+1:-1;o=s((i+n)/2)}}function r(e){return e%4==0&&(e%100!=0||e%400==0)}var s,a,l,c,u,h,d,p=i("3UA0").tzData;n.prototype.offset_utc=function(e){return n._offset(this.tz.time_utc,this.tz.offset,e)},n.prototype.offset_loc=function(e){return n._offset(this.tz.time,this.tz.offset,e)},n.prototype.correction_loc=function(e){var t,i=this.tz.time,n=this.tz.offset,r=o(i,e);return r<1?0:(t=n[r]-n[r-1])>0&&e-i[r-1]<=t?t:0},n.prototype.is_valid=function(){return!this._invalid},n._offset=function(e,t,i){var n=o(e,i);return-1===n?0:t[n]},s=function(e){return 0|e},l=function(e){return 1e3*e},c=function(e,t){return s((s(e/1e3)-s(t/1e3))/60)},u=function(e,t){return s(s(e/1e3)-s(t/1e3))},h={0:0,1:31,2:59,3:90,4:120,5:151,6:181,7:212,8:243,9:273,10:304,11:334},d={SUNDAY:1,MONDAY:2,TUESDAY:3,WEDNESDAY:4,THURSDAY:5,FRIDAY:6,SATURDAY:7,JANUARY:0,FEBRUARY:1,MARCH:2,APRIL:3,MAY:4,
JUNE:5,JULY:6,AUGUST:7,SEPTEMBER:8,OCTOBER:9,NOVEMBER:10,DECEMBER:11,YEAR:1,MONTH:2,WEEK_OF_YEAR:3,DAY_OF_MONTH:5,DAY_OF_YEAR:6,DAY_OF_WEEK:7,HOUR_OF_DAY:11,MINUTE:12,SECOND:13,minutesPerDay:1440,secondsPerDay:(a=function(e){return 60*e*1e3})(1440),get_minutes_from_hhmm:function(e){return-1!==e.indexOf(":")&&(e=e.split(":").join("")),e%100+60*s(e/100)},get_year:function(e){return e.getUTCFullYear()},get_month:function(e){return e.getUTCMonth()},get_hours:function(e){return e.getUTCHours()},get_minutes:function(e){return e.getUTCMinutes()},get_seconds:function(e){return e.getUTCSeconds()},get_day_of_month:function(e){return e.getUTCDate()},get_day_of_week:function(e){return e.getUTCDay()+1},get_day_of_year:function(e){var t=e.getUTCMonth(),i=h[t];return t>d.JANUARY+1&&r(e.getUTCFullYear())&&(i+=1),i+e.getUTCDate()},get_week_of_year:function(e){var t=new Date(Date.UTC(e.getUTCFullYear(),0,1)).getUTCDay(),i=0===t?1:8-t,n=d.get_day_of_year(e),o=n-i;return Math.ceil(o/7)+1},get_minutes_from_midnight:function(e){return 60*d.get_hours(e)+d.get_minutes(e)},set_hms:function(e,t,i,n,o,r){e.setUTCHours(t),e.setUTCMinutes(i),e.setUTCSeconds(n),e.setUTCMilliseconds(o),d.correct_time(e,r)},correct_time:function(e,t){var i=e.getTime(),n=t.correction_loc(i);e.setTime(i+n)},add_days_considering_dst:function(e,t,i){var n,o=e.offset_utc(t),r=this.clone(t);return this.add_date(r,i),n=e.offset_utc(r),r.setTime(r.getTime()+o-n),r},add_date:function(e,t){e.setTime(e.getTime()+t*d.secondsPerDay)},add_minutes:function(e,t){e.setTime(e.getTime()+a(t))},clone:function(e){return new Date(e.getTime())},get_days_per_year:function(e){var t=e.getUTCFullYear();return this.days_per_year(t)},days_per_year:function(e){return r(e)?366:365},get_part:function(e,t){switch(t){case d.YEAR:return d.get_year(e);case d.MONTH:return d.get_month(e);case d.DAY_OF_MONTH:return d.get_day_of_month(e);case d.WEEK_OF_YEAR:return d.get_week_of_year(e);case d.DAY_OF_WEEK:return d.get_day_of_week(e);case d.HOUR_OF_DAY:return d.get_hours(e);case d.MINUTE:return d.get_minutes(e);case d.DAY_OF_YEAR:return d.get_day_of_year(e);case d.SECOND:return d.get_seconds(e);default:return e.getTime()}},time_minutes:a,time_seconds:l,time_minutes_diff:c,time_seconds_diff:u,utc_to_cal:function(e,t){var i=e.offset_utc(t);return new Date(t+i)},get_cal:function(e,t,i,n,o,r,s){var a=new Date(Date.UTC(t,i,n,o||0,r||0,s||0)),l=e.offset_utc(+a);return new Date(a.valueOf()-l)},get_cal_from_unix_timestamp_ms:function(e,t){return new Date(t+e.offset_utc(t))},get_cal_utc:function(e,t,i){return new Date(Date.UTC(e,t,i))},cal_to_utc:function(e,t){var i=t.getTime(),n=e.offset_loc(i);return i-n},get_timezone:function(e){return new n(e)},shift_day:function(e,t){var i=e-1;return(i+=t)>6?i%=7:i<0&&(i=(7+i%7)%7),i+1}},e.exports=d},jFln:function(e,t,i){"use strict";var n,o,r,s;i("xL1m"),n=i("Hr11"),o=n.greaterThan,r=n.lessThan,s=window.CanvasEx=i("8Uy/"),TradingView.resizeCanvas=function(e,t,i){var n,o,r,s,a,l=e.height,c=e.width;l&&c&&(l/=window.hidpiCanvasRatio||1,c/=window.hidpiCanvasRatio||1,l<1&&(l=1),
c<1&&(c=1),(n=document.createElement("canvas")).setAttribute("width",c),n.setAttribute("height",l),o=n.getContext("2d"),r=Math.min(c,t),s=Math.min(l,i),r&&s&&o.drawImage(e,0,0,r,s,0,0,r,s),e.height=i,e.width=t,a=e.getContext("2d"),r&&s&&a.drawImage(n,0,0,r,s,0,0,r,s))},s.computeDashPattern=function(e){return[[e.lineWidth,2*e.lineWidth],[5*e.lineWidth,6*e.lineWidth],[6*e.lineWidth,6*e.lineWidth],[e.lineWidth,4*e.lineWidth]][e.lineStyle-1]},s.drawLine=function(e,t,i,n,o){isFinite(t)&&isFinite(n)&&isFinite(i)&&isFinite(o)&&(e.lineStyle===s.LINESTYLE_DASHED||e.lineStyle===s.LINESTYLE_DOTTED||e.lineStyle===s.LINESTYLE_SPARSE_DOTTED?e.drawDashedLine(e,t,i,n,o):s.drawSolidLine(e,t,i,n,o))},s.drawArrow=function(e,t,i,n,o){isFinite(t)&&isFinite(n)&&isFinite(i)&&isFinite(o)&&(e.beginPath(),e.moveTo(n,o),e.lineTo(t,i),e.moveTo(t+2,i+2),e.lineTo(t-2,i+2),e.moveTo(t-1,i+1),e.lineTo(t+1,i+1),e.stroke())},s.drawSolidLine=function(e,t,i,n,o){e.beginPath(),e.moveTo(t,i),e.lineTo(n,o),e.stroke()},s.setLineStyle=function(e,t){e.lineStyle=t;var i=[];t!==s.LINESTYLE_SOLID&&(i=s.computeDashPattern(e)),s.setLineDash(e,i)},s.setLineDash=function(e,t){"function"==typeof e.setLineDash?e.setLineDash(t):void 0!==e.mozDash?e.mozDash=t:void 0!==e.webkitLineDash&&(e.webkitLineDash=t)},s.drawPoly=function(e,t,i){var n,o;for(e.beginPath(),e.moveTo(t[0].x,t[0].y),n=0;n<t.length;n++)o=t[n],e.lineTo(o.x,o.y);e.closePath(),e.stroke(),i&&e.fill()},s.drawRoundRect=function(e,t,i,n,o,r){e.beginPath(),e.moveTo(t+r,i),e.lineTo(t+n-r,i),e.arcTo(t+n,i,t+n,i+r,r),e.lineTo(t+n,i+o-r),e.arcTo(t+n,i+o,t+n-r,i+o,r),e.lineTo(t+r,i+o),e.arcTo(t,i+o,t,i+o-r,r),e.lineTo(t,i+r),e.arcTo(t,i,t+r,i,r)},s.drawDashedLineHorizontal=function(e,t,i,n){var o,r,a,l,c,u,h;for(e.save(),o=s.computeDashPattern(e),r=0,l=(a=e.lineWidth)/2,e.translate(-l,-l),c=!0,u=t+n;t<u;)h=o[r],c&&e.fillRect(t,i,h,a),c=!c,t+=h,r=r===o.length-1?0:r+1;e.restore()},s.drawDashedLineVertical=function(e,t,i,n){var o,r,a,l,c,u,h;for(e.save(),o=s.computeDashPattern(e),r=0,l=(a=e.lineWidth)/2,e.translate(-l,-l),c=!0,u=i+n;i<u;)h=o[r],c&&e.fillRect(t,i,a,h),c=!c,i+=h,r=r===o.length-1?0:r+1;e.restore()},s.strokeRectInner=function(e,t,i,n,o){var r=e.lineWidth;e.lineWidth=r*window.hidpiCanvasRatio,e.translate(.5,.5),e.strokeRect(t,i,n-1,o-1),e.translate(-.5,-.5),e.lineWidth=r},s.lineStyles=[],"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.setFont=function(e){if(this.font!==e)try{this.font=e}catch(e){}},CanvasRenderingContext2D.prototype.lineStyle=s.LINESTYLE_SOLID,s.originalSave=CanvasRenderingContext2D.prototype.save,s.originalRestore=CanvasRenderingContext2D.prototype.restore,CanvasRenderingContext2D.prototype.save=function(){s.lineStyles.push(this.lineStyle),s.originalSave.call(this)},CanvasRenderingContext2D.prototype.restore=function(){s.lineStyles.length>0&&(this.lineStyle=s.lineStyles.pop(),s.originalRestore.call(this))},CanvasRenderingContext2D.prototype.drawDashedLine=function(e,t,i,n,o){e.save();var r=s.computeDashPattern(e);if(e.beginPath(),
"function"==typeof e.setLineDash)e.setLineDash(r);else if(void 0!==e.mozDash)e.mozDash=r;else{if(void 0===e.webkitLineDash)return e.dashedLineTo(t,i,n,o,r),e.stroke(),void e.restore();e.webkitLineDash=r}e.moveTo(t,i),e.lineTo(n,o),e.stroke(),e.restore()},CanvasRenderingContext2D.prototype.dashedLineTo=function(e,t,i,n,s){var a,l,c,u,h,d,p={thereYet:o,cap:Math.min},_={thereYet:o,cap:Math.min};for(t-n>0&&(_.thereYet=r,_.cap=Math.max),e-i>0&&(p.thereYet=r,p.cap=Math.max),this.moveTo(e,t),a=e,l=t,c=0,u=!0;!p.thereYet(a,i)||!_.thereYet(l,n);)h=Math.atan2(n-t,i-e),d=s[c],a=p.cap(i,a+Math.cos(h)*d),l=_.cap(n,l+Math.sin(h)*d),u?this.lineTo(a,l):this.moveTo(a,l),c=(c+1)%s.length,u=!u}),e.exports=s},jJ9X:function(e,t,i){},jRfx:function(e,t,i){"use strict";var n,o,r,s,a,l;i.d(t,"c",function(){return s}),i.d(t,"a",function(){return a}),i.d(t,"b",function(){return l}),n=i("mrSG"),o=i("Eyy1"),r=function(e){function t(t,i,n){var o=e.call(this,t,i,n)||this;return o._restorePane=!1,o}return Object(n.__extends)(t,e),t.prototype.redo=function(){var e,t,i=this,n=this._chartModel.panes()[this._targetPaneIndex()],r=Object(o.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),s=this._chartModel.children(r,!0);s.forEach(function(e){return i._chartModel.detachSource(e)}),this._restorePane=this._chartModel.detachSource(r),e=n.findSuitableScale(r),n.addDataSource(r,e,!1),s.forEach(function(t){return n.addDataSource(t,e,!1)}),r===this._chartModel.mainSeries()&&(t=n.priceScalePosition(e),n.movePriceScale(e,t,0)),this._chartModel.fullUpdate()},t.prototype.undo=function(){var e,t,i,n,r=this;e=this._restorePane?this._chartModel.createPane(this._initialPaneIndex):this._chartModel.panes()[this._initialPaneIndex],t=Object(o.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),(i=this._chartModel.children(t,!0)).forEach(function(e){return r._chartModel.detachSource(e)}),this._chartModel.detachSource(t),null===(n=e.getPriceScaleById(this._initialPriceScaleId))&&(n=e.createPriceScaleAtPosition(this._initialPriceScalePosition,this._initialPriceScaleIndex)),e.addDataSource(t,n,!0),i.forEach(function(t){return e.addDataSource(t,n,!1)}),this._chartModel.fullUpdate()},t}(i("3u3j").a),s=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}return Object(n.__extends)(t,e),t.prototype._targetPaneIndex=function(){return this._initialPaneIndex-1},t}(r),a=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}return Object(n.__extends)(t,e),t.prototype._targetPaneIndex=function(){return this._initialPaneIndex+1},t}(r),l=function(e){function t(t,i,n,o){var r=e.call(this,t,i,o)||this;return r._targetPane=n,r}return Object(n.__extends)(t,e),t.prototype._targetPaneIndex=function(){return this._targetPane},t}(r)},jTis:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"CalloutConsts",function(){return n}),function(e){e[e.RoundRadius=8]="RoundRadius",e[e.TextMargins=2]="TextMargins",e[e.MinWidth=100]="MinWidth"}(n||(n={}))},jenN:function(e,t,i){"use strict";function n(e,t,n){return new Promise(function(r){
i.e("study-pane-views").then(function(s){var a=Object.keys(e.graphicsInfo());a.sort(function(e,t){return o(e)-o(t)}),r(a.map(function(o){var r,s=i("psYU").VertLinePaneView;return null===(r={backgrounds:null,hhists:null,horizlines:null,hlines:null,lines:null,polygons:null,shapemarks:null,textmarks:null,trendchannels:null,vertlines:s,dwglabels:null,dwglines:null}[o])?(u.logWarn(o+" is not supported by this build of graphics subsystem, skipping"),null):new r(e,t,n)}).filter(function(e){return null!==e}))}.bind(null,i)).catch(void 0)})}function o(e){switch(e){case"polygons":return-100;case"trendchannels":return-90;default:return 0}}function r(e){var t,i,n=Object.keys(e.graphicsInfo()),o=[],r=function(e){return u.logWarn(e+" is not supported by this build of graphics subsystem, skipping"),"continue"};for(t=0,i=n;t<i.length;t++)r(i[t]);return o}var s,a,l,c,u;i.r(t),i.d(t,"createGraphicsPaneViews",function(){return n}),i.d(t,"createGraphicsPriceAxisViews",function(){return r}),s=i("uOxu"),a=i("7Fue"),i.d(t,"isStudyGraphicsEmpty",function(){return a.a}),l=i("xWfy"),i.d(t,"StaticStudyGraphics",function(){return l.a}),i.d(t,"emptyStudyGraphics",function(){return l.b}),i.d(t,"loadStudyGraphics",function(){return l.c}),i.d(t,"saveStudyGraphics",function(){return l.d}),c=i("qySK"),i.d(t,"LiveStudyGraphics",function(){return c.a}),u=Object(s.getLogger)("Chart.StudyGraphics")},jkoZ:function(e,t,i){"use strict";var n=i("XlJ7").makeFont,o=i("XlJ7").parseFont,r=i("uOxu").getLogger,s=r("Model.ChartTradingUtils"),a={_fontHeightCache:{},_parsedColorCache:{},_parseColor:function(e){var t,i,n;return this._parsedColorCache[e]?this._parsedColorCache[e]:((t=document.createElement("div")).style.color=e,n={r:(i=t.style.color.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i)||t.style.color.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\,\s*(\d*\.?\d+)\s*\)$/i))[1],g:i[2],b:i[3],a:i[4]||"1"},this._parsedColorCache[e]=n,n)},getColorFromProperties:function(e,t){var i=1-t.value()/100,n=this._parseColor(e.value());return"rgba("+n.r+","+n.g+","+n.b+","+i+")"},setColorToProperties:function(e,t,i){var n,o=this._parseColor(e);t.setValue("rgb("+o.r+","+o.g+","+o.b+")"),n=100*(1-o.a),i.setValue(Math.max(0,Math.min(n,100)))},getFontFromProperties:function(e,t,i,o){return n(t.value(),e.value(),o.value()?"italic":"",i.value()?"bold":"")},setFontToProperties:function(e,t,i,n,r){var a=o(e);null!==a?(a.family.length>0&&t.setValue(a.family),i.setValue(a.size),n.setValue(a.bold),r.setValue(a.italic)):s.logError("Invalid font: "+e)},fontHeight:function(e){var t,i;return this._fontHeightCache[e]||((t=document.createElement("span")).appendChild(document.createTextNode("height")),document.body.appendChild(t),t.style.cssText="font: "+e+"; white-space: nowrap; display: inline;",i=t.offsetHeight,document.body.removeChild(t),this._fontHeightCache[e]=Math.ceil(i)),this._fontHeightCache[e]},drawPolyHoverOrPress:function(e,t,i,n){n?(e.save(),e.fillStyle="rgba(0, 0, 0, 0.15)",CanvasEx.drawPoly(e,t,!0),e.restore()):i&&(e.save(),e.fillStyle="rgba(0, 0, 0, 0.1)",
CanvasEx.drawPoly(e,t,!0),e.restore())},repaint:function(e){e.lightUpdate()},roundToMinTick:function(e,t){var i=e.mainSource().base(),n=1/i;return n*Math.round(t/n)}};e.exports=a},jofe:function(e,t,i){"use strict";function n(){var e,t,i=new Promise(function(i,n){e=i,t=n});return{promise:i,reject:t,resolve:e}}i.r(t),i.d(t,"createDeferredPromise",function(){return n})},jy4L:function(e,t,i){"use strict";function n(){return"ss_"+ ++r}function o(){return"st"+ ++s}var r,s;i.r(t),i.d(t,"makeNextSymbolId",function(){return n}),i.d(t,"makeNextStudyId",function(){return o}),r=0,s=0},k4w6:function(e,t,i){"use strict";var n,o,r,s;i.d(t,"a",function(){return s}),n=i("aO4+"),o=i("l4sv"),r=i("8Uy/"),s=function(){function e(e){this._lineRendererData={width:0,height:0,points:[new n.Point(0,0)],color:"rgba(0, 0, 0, 0)",linewidth:1,linestyle:r.LINESTYLE_SOLID,visible:!1},this._lineRenderer=new o.HorizontalLineRenderer,this._invalidated=!0,this._series=e,this._model=e.model(),this._lineRenderer.setData(this._lineRendererData)}return e.prototype.update=function(){this._invalidated=!0},e.prototype.renderer=function(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._lineRenderer},e}()},"k9/m":function(e,t,i){"use strict";function n(e,t){return null===e?t:null===t?e:{min:Math.min(e.min,t.min),max:Math.max(e.max,t.max)}}function o(e,t){for(var i=function(e,t){var i=e.length,n=t.length,o=i+n,r=0,s=0;for(;r<i&&s<n;)e[r].index<t[s].index?r++:e[r].index>t[s].index?s++:(r++,s++,o--);return o}(e,t),n=new Array(i),o=0,r=0,s=e.length,a=t.length,l=0;o<s&&r<a;)e[o].index<t[r].index?(n[l]=e[o],o++):e[o].index>t[r].index?(n[l]=t[r],r++):(n[l]=t[r],o++,r++),l++;for(;o<s;)n[l]=e[o],o++,l++;for(;r<a;)n[l]=t[r],r++,l++;return n}var r,s,a,l,c,u,h,d;i.r(t),i.d(t,"PlotRowSearchMode",function(){return u}),i.d(t,"PlotList",function(){return d}),i.d(t,"mergeMinMax",function(){return n}),i.d(t,"mergePlotRows",function(){return o}),r=i("Eyy1"),s=i("Y7w9"),a=i("tqok"),l=i("uOxu"),c=Object(l.getLogger)("Chart.PlotList"),function(e){e[e.NearestLeft=-1]="NearestLeft",e[e.Exact=0]="Exact",e[e.NearestRight=1]="NearestRight"}(u||(u={})),h=30,d=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=null),this._items=[],this._start=0,this._end=0,this._shareRead=!1,this._minMaxCache=new Map,this._rowSearchCache=new Map,this._rowSearchCacheWithoutEmptyValues=new Map,this._plotFunctions=e||new Map,this._emptyValuePredicate=t}return e.prototype.clear=function(){this._items=[],this._start=0,this._end=0,this._shareRead=!1,this._minMaxCache.clear(),this._rowSearchCache.clear(),this._rowSearchCacheWithoutEmptyValues.clear()},e.prototype.first=function(){return this.size()>0?this._items[this._start]:null},e.prototype.last=function(){return this.size()>0?this._items[this._end-1]:null},e.prototype.firstIndex=function(){return this.size()>0?this._indexAt(this._start):null},e.prototype.lastIndex=function(){return this.size()>0?this._indexAt(this._end-1):null},e.prototype.size=function(){return this._end-this._start},e.prototype.isEmpty=function(){
return 0===this.size()},e.prototype.contains=function(e){return null!==this._search(e,u.Exact)},e.prototype.valueAt=function(e){var t=this.search(e);return null!==t?t.value:null},e.prototype.add=function(e,t){var i,n;return this._shareRead?(c.logDebug("add: readonly collection modification attempt"),!1):(i={index:e,value:t},n=this._search(e,u.Exact),this._rowSearchCache.clear(),this._rowSearchCacheWithoutEmptyValues.clear(),null===n?(this._items.splice(this._lowerbound(e),0,i),this._start=0,this._end=this._items.length,!0):(this._items[n]=i,!1))},e.prototype.search=function(e,t,i){var n,o,r,s,a,l;return void 0===t&&(t=u.Exact),n=void 0!==i?this._rowSearchCacheWithoutEmptyValues:this._rowSearchCache,o=void 0!==i?1e4*(t+1)+i:t,void 0!==(r=n.get(e))&&void 0!==(s=r.get(o))?s:null===(a=this._search(e,t,i))?null:(l={index:this._indexAt(a),value:this._valueAt(a)},void 0===r&&(r=new Map,n.set(e,r)),r.set(o,l),l)},e.prototype.fold=function(e,t){var i,n=t;for(i=this._start;i<this._end;++i)n=e(this._indexAt(i),this._valueAt(i),n);return n},e.prototype.findFirst=function(e,t){var i,n,o,r=void 0!==t&&Math.min(this._start+t,this._end)||this._end;for(i=this._start;i<r;++i)if(e(n=this._indexAt(i),o=this._valueAt(i)))return{index:n,value:o};return null},e.prototype.findLast=function(e,t){var i,n,o,r=void 0!==t&&Math.max(this._end-t,this._start)||this._start;for(i=this._end-1;i>=r;--i)if(e(n=this._indexAt(i),o=this._valueAt(i)))return{index:n,value:o};return null},e.prototype.each=function(e){var t;for(t=this._start;t<this._end&&!e(this._indexAt(t),this._valueAt(t));++t);},e.prototype.reduce=function(e,t){var i,n=t;for(i=this._start;i<this._end;++i)n=e(n,this._indexAt(i),this._valueAt(i));return n},e.prototype.range=function(t,i){var n=new e(this._plotFunctions,this._emptyValuePredicate);return n._items=this._items,n._start=this._lowerbound(t),n._end=this._upperbound(i),n._shareRead=!0,n},e.prototype.minMaxOnRangeCached=function(e,t,i){var o,r,s,a;if(this.isEmpty())return null;for(o=null,r=0,s=i;r<s.length;r++)a=s[r],o=n(o,this._minMaxOnRangeCachedImpl(e,t,a));return o},e.prototype.minMaxOnRange=function(e,t,i){var o,r,s,a;if(this.isEmpty())return null;for(o=null,r=0,s=i;r<s.length;r++)a=s[r],o=n(o,this._minMaxOnRangeImpl(e,t,a));return o},e.prototype.merge=function(e){return this._shareRead?(c.logDebug("merge: readonly collection modification attempt"),null):0===e.length?null:this.isEmpty()||e[e.length-1].index<this._items[0].index?this._prepend(e):e[0].index>this._items[this._items.length-1].index?this._append(e):1===e.length&&e[0].index===this._items[this._items.length-1].index?(this._updateLast(e[0]),e[0]):this._merge(e)},e.prototype.addTail=function(e,t){var i,n,o,r;for(void 0===t&&(t=!1),i=0,t&&this._end-this._start>0&&(i=1,this._items[this._end-this._start-1].value=e[0].value),n=i;n<e.length;++n){if(o=e[n],null===(r=this.lastIndex())){c.logError("Can't add tail to the empty plotlist");break}this.add(r+1,o.value)}this._rowSearchCache.clear(),this._rowSearchCacheWithoutEmptyValues.clear()},e.prototype.move=function(e){
var t,i,n,o,r,s,l;if(this._shareRead)c.logDebug("move: readonly collection modification attempt");else if(0!==e.length){for(t=this._items.slice(),i=0,n=e;i<n.length;i++)o=n[i],null!==(r=this._bsearch(o.old))&&void 0!==t[r]&&(o.new===a.a?t[r]=void 0:(t[r]={index:o.new,value:t[r].value},null!==(s=this._bsearch(o.new))&&void 0!==(l=t[s])&&l.index===o.new&&(t[s]=void 0)));this._items=t.filter(function(e){return void 0!==e}).sort(function(e,t){return e.index-t.index}),this._rowSearchCache.clear(),this._rowSearchCacheWithoutEmptyValues.clear(),this._minMaxCache.clear(),this._start=0,this._end=this._items.length}},e.prototype.remove=function(e){var t,i;return this._shareRead?(c.logDebug("remove: readonly collection modification attempt"),null):null===(t=this._search(e,u.NearestRight))?null:(i=this._items.splice(t),this._end=this._items.length,this._minMaxCache.clear(),this._rowSearchCache.clear(),this._rowSearchCacheWithoutEmptyValues.clear(),i.length>0?i[0]:null)},e.prototype.state=function(){return{start:this._start,end:this._end,data:this._items,shareread:this._shareRead}},e.prototype.restoreState=function(e){e?(this._start=e.start,this._end=e.end,this._shareRead=e.shareread,this._items=e.data,this._minMaxCache.clear(),this._rowSearchCache.clear(),this._rowSearchCacheWithoutEmptyValues.clear()):this.clear()},e.prototype._indexAt=function(e){return this._items[e].index},e.prototype._valueAt=function(e){return this._items[e].value},e.prototype._length=function(){return this._items.length},e.prototype._search=function(e,t,i){var n=this._bsearch(e);if(null===n&&t!==u.Exact)switch(t){case u.NearestLeft:return this._searchNearestLeft(e,i);case u.NearestRight:return this._searchNearestRight(e,i);default:throw new TypeError("Unknown search mode")}if(void 0===i||null===n||t===u.Exact)return n;switch(t){case u.NearestLeft:return this._nonEmptyNearestLeft(n,i);case u.NearestRight:return this._nonEmptyNearestRight(n,i);default:throw new TypeError("Unknown search mode")}},e.prototype._nonEmptyNearestRight=function(e,t){for(var i=Object(r.ensure)(this._emptyValuePredicate),n=Object(r.ensure)(t);e<this._end&&i(this._valueAt(e),n);)e+=1;return e===this._end?null:e},e.prototype._nonEmptyNearestLeft=function(e,t){for(var i=Object(r.ensureNotNull)(this._emptyValuePredicate),n=Object(r.ensure)(t);e>=this._start&&i(this._valueAt(e),n);)e-=1;return e<this._start?null:e},e.prototype._searchNearestLeft=function(e,t){var i,n=this._lowerbound(e);return n>this._start&&(n-=1),i=n!==this._end&&this._indexAt(n)<e?n:null,void 0!==t&&null!==i?this._nonEmptyNearestLeft(i,t):i},e.prototype._searchNearestRight=function(e,t){var i=this._upperbound(e),n=i!==this._end&&e<this._indexAt(i)?i:null;return void 0!==t&&null!==n?this._nonEmptyNearestRight(n,t):n},e.prototype._bsearch=function(e){var t=this._lowerbound(e);return t===this._end||e<this._items[t].index?null:t},e.prototype._lowerbound=function(e){return Object(s.lowerbound)(this._items,e,function(e,t){return e.index<t},this._start,this._end)},e.prototype._upperbound=function(e){
return Object(s.upperbound)(this._items,e,function(e,t){return t.index>e},this._start,this._end)},e.prototype._plotMinMax=function(e,t,i){var n,o,r=null,s=this._plotFunctions.get(i.name);if(void 0===s)throw new Error('Plot "'+i.name+'" is not registered');for(n=e;n<t;n++)void 0===(o=s(this._items[n].value))||null===o||Number.isNaN(o)||(null===r?r={min:o,max:o}:(o<r.min&&(r.min=o),o>r.max&&(r.max=o)));return r},e.prototype._invalidateCacheForRow=function(e){var t=Math.floor(e.index/h);this._minMaxCache.forEach(function(e){return e.delete(t)})},e.prototype._prepend=function(e){return Object(r.assert)(!this._shareRead,"collection should not be readonly"),Object(r.assert)(0!==e.length,"plotRows should not be empty"),this._rowSearchCache.clear(),this._rowSearchCacheWithoutEmptyValues.clear(),this._minMaxCache.clear(),this._items=e.concat(this._items),this._start=0,this._end=this._items.length,e[0]},e.prototype._append=function(e){return Object(r.assert)(!this._shareRead,"collection should not be readonly"),Object(r.assert)(0!==e.length,"plotRows should not be empty"),this._rowSearchCache.clear(),this._rowSearchCacheWithoutEmptyValues.clear(),this._minMaxCache.clear(),this._items=this._items.concat(e),this._start=0,this._end=this._items.length,e[0]},e.prototype._updateLast=function(e){Object(r.assert)(!this.isEmpty(),"plot list should not be empty");var t=this._items[this._end-1];Object(r.assert)(t.index===e.index,"last row index should match new row index"),this._invalidateCacheForRow(e),this._rowSearchCache.delete(e.index),this._rowSearchCacheWithoutEmptyValues.delete(e.index),this._items[this._end-1]=e},e.prototype._merge=function(e){return Object(r.assert)(0!==e.length,"plot rows should not be empty"),this._rowSearchCache.clear(),this._rowSearchCacheWithoutEmptyValues.clear(),this._minMaxCache.clear(),this._items=o(this._items,e),this._start=0,this._end=this._items.length,e[0]},e.prototype._minMaxOnRangeCachedImpl=function(e,t,i){var o,s,a,l,c,u,d,p,_,f,m,y,g,v,S;if(this.isEmpty())return null;for(o=null,s=Object(r.ensureNotNull)(this.firstIndex()),a=Object(r.ensureNotNull)(this.lastIndex()),l=e-i.offset,c=t-i.offset,l=Math.max(l,s),c=Math.min(c,a),u=Math.ceil(l/h)*h,d=Math.max(u,Math.floor(c/h)*h),p=this._lowerbound(l),_=this._upperbound(Math.min(c,u,t)),o=n(o,this._plotMinMax(p,_,i)),void 0===(f=this._minMaxCache.get(i.name))&&(f=new Map,this._minMaxCache.set(i.name,f)),m=Math.max(u+1,l);m<d;m+=h)y=Math.floor(m/h),void 0===(g=f.get(y))&&(v=y*h,S=(y+1)*h-1,g=this._minMaxOnRangeImpl(v,S,i),f.set(y,g)),o=n(o,g);return p=this._lowerbound(d),_=this._upperbound(c),o=n(o,this._plotMinMax(p,_,i))},e.prototype._minMaxOnRangeImpl=function(e,t,i){var n=this._lowerbound(e-i.offset),o=Math.min(this._lowerbound(t-i.offset)+1,this._items.length);return this._items[this._end-1]&&this._items[o-1].index>t-i.offset&&(o=n),this._plotMinMax(n,o,i)},e}()},kIXa:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolTimeCycles";var r=t||n.createProperties();o.call(this,e,r),i.e("lt-pane-views").then(function(e){
var t=i("am+t").TimeCyclesPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=window.t("Time Cycles");inherit(n,o),n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return a},n.prototype.name=function(){return"Time Cycles"},n.prototype.setPoint=function(e,t,i){var n=Object.assign({},t),o=this._points[0],r=this._points[1];o.price=n.price,r.price=n.price,this._points[e]=n,this.normalizePoints()},n.prototype.addPoint=function(e,t,i){var n,r=o.prototype.addPoint.call(this,e,t,!0);return r&&(n=this._points[0],this._points[1].price=n.price,i||(this.normalizePoints(),this.createServerPoints())),r},n.prototype.getStylesPropertyPage=function(){return s.LineToolTimeCyclesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("BABJ").TimeCyclesPatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new r("linetooltimecycles",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolTimeCycles=n},kSsA:function(e,t,i){"use strict";t.createInputsPropertyPage=function(e,t){var i=e.getInputsPropertyPage();return null==i?null:new i(e.properties(),t,e)},t.createStudyStrategyPropertyPage=function(e,t){var i=e.getStrategyPropertyPage();return null==i?null:new i(e.properties(),t,e)},t.createStylesPropertyPage=function(e,t){var i=e.getStylesPropertyPage();return null==i?null:new i(e.properties(),t,e)},t.createDisplayPropertyPage=function(e,t){var i=e.getDisplayPropertyPage();return null==i?null:new i(e.properties(),t,e)},t.createVisibilitiesPropertyPage=function(e,t){var i=e.getVisibilitiesPropertyPage();return null==i?null:new i(e.properties(),t,e)},t.hasInputsPropertyPage=function(e){return null!==e.getInputsPropertyPage()},t.hasStylesPropertyPage=function(e){return null!==e.getStylesPropertyPage()}},kcTO:function(e,t,i){"use strict";function n(e,t){if(!Object(r.isNumber)(e))return"n/a";if(!Object(r.isInteger)(t))throw new TypeError("invalid length");if(t<0||t>16)throw new TypeError("invalid length");if(0===t)return e.toString();return("0000000000000000"+e.toString()).slice(-t)}var o,r,s,a,l,c,u,h,d;i.r(t),i.d(t,"customFormatters",function(){return c}),i.d(t,"formatterOptions",function(){return u}),i.d(t,"numberToStringWithLeadingZero",function(){return n}),i.d(t,"PriceFormatter",function(){return d}),o=i("YFKU"),r=i("ogJP"),s=i("Ialn"),a=i("uOxu"),l=Object(a.getLogger)("Chart.PriceFormatter"),c={dateFormatter:null,timeFormatter:null},u={decimalSign:".",decimalSignFractional:"'"},h={custom:o.t("Price format is invalid."),fraction:o.t("Fraction part is invalid."),secondFraction:o.t("Second fraction part is invalid.")},d=function(){function e(e,t,i,n){if(this.type="price",t||(t=1),Object(r.isNumber)(e)&&Object(r.isInteger)(e)||(e=100),e<0)throw new TypeError("invalid base")
;this._priceScale=e,this._minMove=t,this._minMove2=n,i&&void 0!==n&&n>0&&2!==n&&4!==n&&8!==n?l.logDebug("invalid minmove2"):(this._fractional=i,this.calculateDecimal())}return e.prototype.isFractional=function(){return!!this._fractional},e.prototype.state=function(){return{fractional:this._fractional,fractionalLength:this._fractionalLength,minMove:this._minMove,minMove2:this._minMove2,priceScale:this._priceScale}},e.prototype.calculateDecimal=function(){if(this._fractionalLength=0,this._priceScale>0&&this._minMove>0){var e=this._priceScale;for(this._fractional&&this._minMove2&&(e/=this._minMove2);e>1;)e/=10,this._fractionalLength++}},e.prototype.format=function(e,t,i,n,o){var r,a;return void 0===n&&(n=!0),void 0===o&&(o=!0),r="",e<0?(r=!1===n?"":"",e=-e):e&&!0===t&&(r="+"),a=this._fractional?r+this._formatAsFractional(e,i):r+this._formatAsDecimal(e,i),o?Object(s.forceLTRStr)(a):a},e.prototype.parse=function(e){return e=(e=Object(s.stripLTRMarks)(e)).replace("","-"),this._fractional?this._minMove2?this._parseAsDoubleFractional(e):this._parseAsSingleFractional(e):this._parseAsDecimal(e)},e.prototype.hasForexAdditionalPrecision=function(){return!this._fractional&&10===this._minMove2},e.serialize=function(e){return e.state()},e.deserialize=function(t){return new e(t.priceScale,t.minMove,t.fractional,t.minMove2)},e.prototype._formatAsDecimal=function(e,t){var i,o,r,s,a;return t=t||0,i=this._fractional?Math.pow(10,this._fractionalLength||0):Math.pow(10,t)*this._priceScale/this._minMove,o=Math.floor(e),(r=+(Math.round(e*i)-o*i).toFixed(this._fractionalLength))>=i&&(r-=i,o+=1),s="",1!==i&&(a=void 0!==this._fractionalLength?this._fractionalLength:NaN,s=u.decimalSign+n(+r.toFixed(this._fractionalLength)*this._minMove,a+t),s=this._removeEndingZeros(s,t)),o.toString()+s},e.prototype._getFractPart=function(e,t){var i=[0,5],n=[0,2,5,7];return 2===t?void 0===i[e]?-1:i[e]:4===t?void 0===n[e]?-1:n[e]:e},e.prototype._formatAsFractional=function(e,t){var i,o,r,s,a,l,c=this._priceScale/this._minMove,h=Math.floor(e),d=t?Math.floor(e*c)-h*c:Math.round(e*c)-h*c;if(d===c&&(d=0,h+=1),i="",t&&(o=(e-h-d/c)*c,i=n(o=Math.round(o*Math.pow(10,t)),t),i=this._removeEndingZeros(i,t)),!this._fractionalLength)throw new Error("_fractionalLength is not calculated");return r="",this._minMove2?(a=n(d=(d-(s=d%this._minMove2))/this._minMove2,this._fractionalLength),l=this._getFractPart(s,this._minMove2),r=a+u.decimalSignFractional+l):r=n((d=this._getFractPart(d,this._priceScale))*this._minMove,this._fractionalLength),h.toString()+u.decimalSignFractional+r+i},e.prototype._removeEndingZeros=function(e,t){for(var i=0;i<t&&"0"===e[e.length-1];i++)e=e.substr(0,e.length-1);return e},e.prototype._parseAsDecimal=function(e){var t,i=new RegExp(/^(\-?)[0-9]+$/),n=i.exec(e);return n?{price:t=parseFloat(e),res:!0,suggest:this.format(t)}:(n=new RegExp("^(-?)[0-9]+\\"+u.decimalSign+"[0-9]*$").exec(e))?{price:t=parseFloat(e.replace(u.decimalSign,".")),res:!0,suggest:this.format(t)}:{error:h.custom,res:!1}},e.prototype._patchFractPart=function(e,t){var i={0:0,5:1},n={0:0,
2:1,5:2,7:3};return 2===t?void 0===i[e]?-1:i[e]:4===t?void 0===n[e]?-1:n[e]:e},e.prototype._parseAsSingleFractional=function(e){var t,i,n,o,r,s=new RegExp(/^(\-?)[0-9]+$/),a=s.exec(e);return a?{price:t=parseFloat(e),res:!0,suggest:this.format(t)}:(a=new RegExp("^(-?)([0-9]+)\\"+u.decimalSignFractional+"([0-9]+)$").exec(e))?(i=!!a[1],n=parseInt(a[2]),o=this._priceScale,(r=this._patchFractPart(parseInt(a[3]),o))>=o||r<0?{error:h.fraction,res:!1}:(t=n+r/o,i&&(t=-t),{price:t,res:!0,suggest:this.format(t)})):{error:h.custom,res:!1}},e.prototype._parseAsDoubleFractional=function(e){var t,i,n,o,r,s,a,l,c=new RegExp(/^(\-?)[0-9]+$/),d=c.exec(e);return d?{price:t=parseFloat(e),res:!0,suggest:this.format(t)}:(d=new RegExp("^(-?)([0-9]+)\\"+u.decimalSignFractional+"([0-9]+)\\"+u.decimalSignFractional+"([0-9]+)$").exec(e))?(i=!!d[1],n=parseInt(d[2]),o=void 0!==this._minMove2?this._minMove2:NaN,r=this._priceScale/o,s=this._minMove2,a=this._patchFractPart(parseInt(d[3]),r),l=this._patchFractPart(parseInt(d[4]),s),a>=r||a<0?{error:h.fraction,res:!1}:void 0!==s&&l>=s||l<0?{error:h.secondFraction,res:!1}:(t=void 0!==s?n+a/r+l/(r*s):NaN,i&&(t=-t),{price:t,res:!0,suggest:this.format(t)})):{error:h.custom,res:!1}},e}()},kw0O:function(e,t,i){"use strict";function n(e){return"black"===Object(o.rgbToBlackWhiteString)(Object(o.parseRgb)(e),150)?"white":"black"}var o;i.d(t,"a",function(){return n}),o=i("eJTA")},l4sv:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"HorizontalLineRenderer",function(){return r}),n=i("VdBB"),o=i("jFln"),r=function(){function e(){this._data=null,this._hitTest=new n.HitTestResult(n.HitTestResult.REGULAR)}return e.prototype.setData=function(e){this._data=e},e.prototype.setHitTest=function(e){this._hitTest=e},e.prototype.draw=function(e){var t,i;null!==this._data&&0!==this._data.points.length&&!1!==this._data.visible&&((t=this._data.points[0].y)<0||t>this._data.height||(i=this._data.width,e.lineCap="square",e.strokeStyle=this._data.color,e.lineWidth=this._data.linewidth,void 0!==this._data.linestyle&&Object(o.setLineStyle)(e,this._data.linestyle),Object(o.drawLine)(e,0,t,i,t)))},e.prototype.hitTest=function(e){return null===this._data||!1===this._data.visible?null:0===this._data.points.length?null:Math.abs(e.y-this._data.points[0].y)<=5?this._hitTest:null},e}()},l7mP:function(e,t,i){"use strict";function n(e,t,n){void 0===t&&(t={}),Promise.all([i.e("react"),i.e(2),i.e(20),i.e(28),i.e(31),i.e(50),i.e(67),i.e(0),i.e(45),i.e("take-chart-image-dialog-impl")]).then(function(o){i("fMMV").getImageOfChart(e,t,n)}.bind(null,i)).catch(void 0)}function o(e,t,n){void 0===t&&(t={}),Promise.all([i.e("react"),i.e(2),i.e(20),i.e(28),i.e(31),i.e(50),i.e(67),i.e(0),i.e(45),i.e("take-chart-image-dialog-impl")]).then(function(o){i("fMMV").getImageOfChartSilently(e,t,n)}.bind(null,i)).catch(void 0)}i.r(t),i.d(t,"getImageOfChart",function(){return n}),i.d(t,"getImageOfChartSilently",function(){return o})},lA7n:function(e,t,i){"use strict";var n,o,r,s,a,l,c,u,h;i.r(t),n=i("Kxc7"),o=i("mrSG"),r=i("ulZB"),s=function(e){function t(t,i){
return e.call(this,t,i,"FAVORITE_CHARTS_CHANGED","loadChartDialog.favorites",{})||this}return Object(o.__extends)(t,e),t}(r.b),a=i("zUrt"),l=i("FBuY"),c=i("Vdly"),u=i("/z0S"),i.d(t,"LoadChartService",function(){return h}),h=function(){function e(e){var t=this;void 0===e&&(e=null),this._favoriteChartsService=new s(l.TVXWindowEvents,c),this._chartWidgetCollection=null,this._promise=null,this._getChartEntry=function(e){return{id:e.id,url:e.url,title:e.name,symbol:e.short_symbol,interval:e.interval,toolsCount:0,modified:e.modified_iso,active:function(){return t._isActiveChart(e.id)},openAction:function(){return a.backend.loadChart(e)},deleteAction:function(){return new Promise(function(i){a.backend.removeChart(e.image_url,function(){t._deleteChart(e.id),i()})})},favoriteAction:t._updateFavorites}},this._updateFavorites=function(e){return t._favoriteChartsService.set(e)},this._isActiveChart=function(e){return null!==t._chartWidgetCollection&&e===t._chartWidgetCollection.metaInfo.id.value()},this._deleteChart=function(e){t._isActiveChart(e)&&(n.enabled("saveload_storage_customization")?null!==t._chartWidgetCollection&&t._chartWidgetCollection.clearChartMetaInfo():location.href="/chart/"+location.search)},this._chartWidgetCollection=e}return e.prototype.showLoadDialog=function(){Object(u.a)(this._showLoadDialog.bind(this),{source:"Load chart",sourceMeta:"Chart"})},e.prototype._showLoadDialog=function(){var e=this;(n.enabled("saveload_requires_authentication")&&!window.is_authenticated?Promise.resolve([]):new Promise(function(e){a.backend.getCharts(function(t){e(t)})})).then(function(t){return t.map(e._getChartEntry)}).then(function(t){var n=e._promise=Promise.all([i.e("react"),i.e(2),i.e(3),i.e(5),i.e(6),i.e(7),i.e(62),i.e(0),i.e(1),i.e(4),i.e(10),i.e(24),i.e("load-chart-dialog")]).then(i.bind(null,"AMW5")).then(function(i){e._promise===n&&i.showLoadChartDialog(t,e._favoriteChartsService,e._chartWidgetCollection)})})},e}()},lCO3:function(e,t,i){"use strict";var n,o;i.r(t),i.d(t,"Version",function(){return o}),n=i("Eyy1"),o=function(){function e(e,t){this._major=e,this._minor=t}return e.prototype.major=function(){return this._major},e.prototype.minor=function(){return this._minor},e.prototype.isZero=function(){return 0===this._major&&0===this._minor},e.prototype.toString=function(){return this._major+"."+this._minor},e.prototype.compareTo=function(e){return this._major<e._major?-1:this._major>e._major?1:this._minor<e._minor?-1:this._minor>e._minor?1:0},e.prototype.isLess=function(e){return this.compareTo(e)<0},e.prototype.isLessOrEqual=function(e){return this.compareTo(e)<=0},e.prototype.isEqual=function(e){return 0===this.compareTo(e)},e.prototype.isGreater=function(e){return this.compareTo(e)>0},e.prototype.isGreaterOrEqual=function(e){return this.compareTo(e)>=0},e.parse=function(t){var i,o,r;if(t instanceof e)return new e(t.major(),t.minor());if("number"==typeof t)return Object(n.assert)(Math.floor(t)===t,"Version should not be a float number"),new e(t,0);if("string"==typeof t){
if(1===(i=t.split(".")).length)return o=parseInt(i[0],10),Object(n.assert)(!isNaN(o),"Bad version string: "+t),new e(o,0);if(2===i.length)return o=parseInt(i[0],10),Object(n.assert)(!isNaN(o),"Bad version string: "+t),r=parseInt(i[1],10),Object(n.assert)(!isNaN(r),"Bad version string: "+t),new e(o,r);throw new Error("Bad version string (one dot expected): "+t)}throw new Error("Bad version: "+t)},e.ZERO=new e(0,0),e}()},lJvs:function(e,t,i){"use strict";function n(e){a.call(this,e);var t=this;l.hideMarksOnBars().subscribe(this,function(){t._properties.visible.setValue(!l.hideMarksOnBars().value())}),this._paneView=new o(this)}function o(e,t){this.source=e,this._rendererFactory=t,this.stylesCache={},this.templatesCache={},this._lollipops={},this._createLollipops()}var r=i("aO4+").Point,s=i("vAx0").ESDPaneView,a=i("fTGZ").BarsMarksContainer,l=i("mMWL"),c=i("FQhm"),u=i("6xeX").Tooltip,h=i("zDbI").CHART_FONT_FAMILY;inherit(n,a),n.prototype._initialize=function(e){this._properties.visible.setValue(!0)},n.prototype.userEditEnabled=function(){return!1},n.prototype._constructor="UserDefinedTimescaleMarks",n.prototype._plateViewData=function(e){return{text:e.text}},n.prototype.onClicked=function(e){c.emit("onTimescaleMarkClick",e.id)},n.prototype.clearMarks=function(){a.prototype.clearMarks.call(this),this._paneView.clearCaches(),this.onNeedRepaint.fire()},n.prototype._getData=function(e){var t,i,n,o=this._model.mainSeries().symbolInfo();o&&(t=this.roundRange(this._rangeDifference(e)),i=this,n=this._model.mainSeries().properties().interval.value(),ChartApiInstance.getTimescaleMarks(o,t.start,t.end,function(t){t.forEach(function(e){i._marks[e.id]=e},i),i._loadedRange=i._rangeUnion(e,i._loadedRange),i.onNeedRepaint.fire()},n))},n.prototype.updatePlateData=function(e,t){return t.barWidth=this.barWidth(),t.text=e.text,t.tooltipMargin=-1*Math.max(e.minSize/2,.4*this.barWidth()),t},n.prototype.hasContextMenu=function(){return!1},n.prototype.paneViews=function(){return this._properties.visible.value()?[this._paneView]:[]},n.prototype.onClickOutside=function(e){this._paneView.onClickOutside(e)},inherit(o,s),o.prototype._createLollipops=function(){var e=this.source._model.timeScale(),t=s.prototype._getY.call(this.source),i=this.source._model.lastHittestData(),n=this;Object.keys(this.source._marks).forEach(function(o){var s=this.source._marks[o],a=s.id;n._lollipops[a]={id:a,basePoint:new r(e.indexToCoordinate(e.timePointToIndex(s.tickmark))+1,t),hovered:i&&i.id===a||a===n.getLastClickedLollipopId(),barY:null,label:s.label,color:s.color,items:s.tooltip,tooltip:n._lollipops.hasOwnProperty(a)?n._lollipops[a].tooltip:new u,visible:!0}},this)},o.prototype.clearCaches=function(){this.closeTooltips(),this.clearLastClicked(),this._lollipops={}},o.prototype.update=function(){this._createLollipops()},o.prototype.renderer=function(){return this.update(),s.prototype.renderer.call(this)},o.prototype._generateTemplateStyle=function(e,t,i){var n,o,r=e+t+i;return r in this.stylesCache||(n="default"!==e,o={strokeStyle:t,lineWidth:1,fillStyle:"white",
barLine:{lineStyle:CanvasEx.LINESTYLE_DASHED},lollipop:{width:32,height:96,circleHeight:16,radius:12,lineWidth:1.5,fillStyle:n?t:"white",fillCircle:n,strokeStyle:"#E2745B",text:{label:i,strokeStyle:n?"white":t,font:"normal 12px "+h}}},this.stylesCache[r]=o),this.stylesCache[r]},o.prototype.getTemplate=function(e,t){var i=e+t.color+t.label;return i in this.templatesCache||(this.templatesCache[i]=this.createTemplate(this._generateTemplateStyle(e,t.color,t.label))),this.templatesCache[i]},o.prototype.getStyle=function(e,t){return this._generateTemplateStyle(e,t.color,t.label)},o.prototype.createText=function(e,t){"string"==typeof e.items?t.addTextLine(e.items):Array.isArray(e.items)&&e.items.forEach(function(e){t.addTextLine(e)})},o.prototype.hasTooltip=function(e){return!!e.tooltip&&e.tooltip.length},e.exports=n},"lNN+":function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolTrianglePattern";var r=t||n.createProperties();o.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("Jej9").LineToolTrianglePatternPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=window.t("Triangle Pattern");inherit(n,o),n.prototype.pointsCount=function(){return 4},n.prototype.title=function(){return a},n.prototype.name=function(){return"Triangle Pattern"},n.prototype.getStylesPropertyPage=function(){return s.LineToolTrianglePatternStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("EFc4").Points5PatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new r("linetooltrianglepattern",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolTrianglePattern=n},lReN:function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"LineToolsGroupControllerApi",function(){return s}),n=i("s1Gx"),o=i("Eyy1"),r=i("CW80"),s=function(){function e(e,t){this._controller=e,this._model=t}return e.prototype.createGroupFromSelection=function(){return this._controller.createGroupFromSelection().id},e.prototype.removeGroup=function(e){var t=Object(o.ensureDefined)(this._groupById(e));this._controller.removeGroup(t)},e.prototype.groups=function(){return this._controller.groups().map(function(e){return e.id})},e.prototype.shapesInGroup=function(e){var t=Object(o.ensureDefined)(this._groupById(e));return Object(n.sortSources)(t.lineTools()).map(function(e){return e.id()})},e.prototype.excludeShapeFromGroup=function(e,t){var i=Object(o.ensureDefined)(this._groupById(e)),n=Object(o.ensureNotNull)(this._model.dataSourceForId(t));Object(o.assert)(Object(r.isLineTool)(n),"Passed shapeId is not a line tool"),this._controller.excludeLineToolFromGroup(i,n)},e.prototype.availableZOrderOperations=function(e){var t=Object(o.ensureDefined)(this._groupById(e));return this._controller.availableZOrderOperations(t)},
e.prototype.bringToFront=function(e){var t=Object(o.ensureDefined)(this._groupById(e));this._controller.bringToFront(t)},e.prototype.bringForward=function(e){var t=Object(o.ensureDefined)(this._groupById(e));this._controller.bringForward(t)},e.prototype.sendBackward=function(e){var t=Object(o.ensureDefined)(this._groupById(e));this._controller.sendBackward(t)},e.prototype.sendToBack=function(e){var t=Object(o.ensureDefined)(this._groupById(e));this._controller.sendToBack(t)},e.prototype.insertAfter=function(e,t){var i=Object(o.ensureDefined)(this._groupById(e)),n=Object(o.ensureNotNull)(this._groupById(t)||this._model.dataSourceForId(t));this._controller.insertAfter(i,n)},e.prototype.insertBefore=function(e,t){var i=Object(o.ensureDefined)(this._groupById(e)),n=Object(o.ensureNotNull)(this._groupById(t)||this._model.dataSourceForId(t));this._controller.insertBefore(i,n)},e.prototype.groupVisibility=function(e){return Object(o.ensureDefined)(this._groupById(e)).visibility()},e.prototype.setGroupVisibility=function(e,t){var i=Object(o.ensureDefined)(this._groupById(e));this._controller.setGroupVisibility(i,t)},e.prototype.groupLock=function(e){return Object(o.ensureDefined)(this._groupById(e)).locked()},e.prototype.setGroupLock=function(e,t){var i=Object(o.ensureDefined)(this._groupById(e));this._controller.setGroupLock(i,t)},e.prototype.getGroupName=function(e){return Object(o.ensureDefined)(this._groupById(e)).name()},e.prototype.setGroupName=function(e,t){var i=Object(o.ensureDefined)(this._groupById(e));this._controller.setGroupName(i,t)},e.prototype.canBeGroupped=function(e){var t=this,i=e.map(function(e){return Object(o.ensureNotNull)(t._model.dataSourceForId(e))});return!i.some(function(e){return!Object(r.isLineTool)(e)})&&this._controller.canBeGroupped(i)},e.prototype._groupById=function(e){return this._controller.groups().find(function(t){return t.id===e})},e}()},lTLF:function(e,t,i){"use strict";var n,o,r,s,a;i.r(t),n=i("Hr11"),o=1e-9,r=function(){function e(e,t){if(this._base=e,this._integralDividers=t,Object(n.isBaseDecimal)(this._base))this._fractionalDividers=[2,2.5,2];else{this._fractionalDividers=[];for(var i=this._base;1!==i;){if(i%2==0)this._fractionalDividers.push(2),i/=2;else{if(i%5!=0)throw new Error("unexpected base");this._fractionalDividers.push(2),this._fractionalDividers.push(2.5),i/=5}if(this._fractionalDividers.length>100)throw new Error("something wrong with base")}}}return e.prototype.tickSpan=function(e,t,i){for(var r,s,a,l=0===this._base?0:1/this._base,c=o,u=Math.pow(10,Math.max(0,Math.ceil(Object(n.log10)(e-t)))),h=0,d=this._integralDividers[0];r=Object(n.greaterOrEqual)(u,l,c)&&u>l+c,s=Object(n.greaterOrEqual)(u,i*d,c),a=Object(n.greaterOrEqual)(u,1,c),r&&s&&a;)u/=d,d=this._integralDividers[++h%this._integralDividers.length];if(u<=l+c&&(u=l),u=Math.max(1,u),this._fractionalDividers.length>0&&Object(n.equal)(u,1,c))for(h=0,d=this._fractionalDividers[0];Object(n.greaterOrEqual)(u,i*d,c)&&u>l+c;)u/=d,d=this._fractionalDividers[++h%this._fractionalDividers.length];return u},e}(),
i.d(t,"PriceTickMarkBuilder",function(){return a}),s=2.5,a=function(){function e(e,t,i,n){this._marks=[],this._priceScale=e,this._base=t,this._coordinateToLogicalFunc=i,this._logicalToCoordinateFunc=n}return e.prototype.base=function(){return this._base},e.prototype.setBase=function(e){if(e<0)throw new Error("base < 0");this._base=e},e.prototype.tickSpan=function(e,t,i){var n,o,s,a,l,c,u,h,d;if(void 0===i&&(i=0),e<t)throw new Error("high < low");return n=this._priceScale.height(),o=(e-t)*this._tickMarkHeight()/n,s=new r(this._base,[2,2.5,2]),a=new r(this._base,[2,2,2.5]),l=new r(this._base,[2.5,2,2]),c=0,(u=s.tickSpan(e,t,o))>i&&(c=u),(h=a.tickSpan(e,t,o))>i&&(c=Math.min(c,h)),(d=l.tickSpan(e,t,o))>i&&(c=Math.min(c,d)),c>0?c:e-t},e.prototype.rebuildTickMarks=function(){var e,t,i,n,o,r,s,a,l,c,u,h,d,p,_,f=this._priceScale;if(this._marks=[],!f.isEmpty()&&null!==(e=f.mainSource())&&(null===(t=e.firstValue())&&(t=0),i=f.height(),n=this._coordinateToLogicalFunc(i-1,t),o=this._coordinateToLogicalFunc(0,t),(r=Math.max(n,o))!==(s=Math.min(n,o))))for(l=r%(a=this.tickSpan(r,s)),l+=l<0?a:0,c=r>=s?1:-1,u=null,h=f.formatter(),d=NaN,p=r-l;p>s;p-=a)p===d&&(a=this.tickSpan(r,s,a)),d=p,_=this._logicalToCoordinateFunc(p,t,!0),null!==u&&Math.abs(_-u)<this._tickMarkHeight()||(this._marks.push({coord:Math.round(_),label:h.format(p)}),u=_,f.isLog()&&(a=this.tickSpan(p*c,s)))},e.prototype.marks=function(){return this._marks},e.prototype._fontHeight=function(){return this._priceScale.fontSize()},e.prototype._tickMarkHeight=function(){return Math.ceil(this._fontHeight()*s)},e}()},lUQk:function(e,t,i){"use strict";var n,o,r,s,a;i.r(t),i.d(t,"SeriesBase",function(){return a}),n=i("mrSG"),o=i("7ktv"),r=i("n5al"),s=i("kcTO"),(a=function(e){function t(t){var i=e.call(this,t)||this;return i._paneView=null,i._priceStep=null,i._base=100,i._formatter=new s.PriceFormatter(i._base),i._ignoreMinMoveFormatter=new s.PriceFormatter(i._base),i._ignoreMinMovePriceStep=null,i}return Object(n.__extends)(t,e),t.prototype.formatter=function(e){return void 0===e&&(e=!0),e?this._formatter:this._ignoreMinMoveFormatter},t.prototype.priceStep=function(e){return void 0===e&&(e=!0),e?this._priceStep:this._ignoreMinMovePriceStep},t.prototype.hasClosePrice=function(){return 12!==this.properties().style.value()},t.prototype.autoScaleInfo=function(e,t){var i,n=this.priceRange(e,t);return null===this._paneView?{range:n}:{range:n,topPixelMargin:(i=this._paneView).topPixelMargin?i.topPixelMargin():void 0,bottomPixelMargin:i.bottomPixelMargin?i.bottomPixelMargin():void 0}},t.prototype.base=function(){return this._base},t.prototype.currency=function(){return Object(r.seriesCurrency)(this.symbolInfo())},t.prototype._recreateFormatter=function(){this._formatter=Object(r.createSeriesFormatter)(this.symbolInfo(),this.properties().minTick.value()),this._ignoreMinMoveFormatter=Object(r.createSeriesFormatter)(this.symbolInfo(),this.properties().minTick.value(),!0),this.priceScale()&&this.priceScale().updateFormatter(),this._formatterChanged.fire()},
t.prototype._recreatePriceStep=function(){var e=Object(r.getSeriesPriceFormattingState)(this.symbolInfo()),t=e.minMove,i=e.priceScale,n=t/i;this._ignoreMinMovePriceStep=1/i,this._priceStep!==n&&(this._priceStep=n,this._priceStepChanged.fire())},t.prototype._recreatePriceFormattingDependencies=function(){this._recreateFormatter(),this._recreatePriceStep()},t}(o.PriceDataSource)).prototype.superclass=o.PriceDataSource},"lW/c":function(e,t,i){"use strict";var n,o,r,s,a,l,c;i.r(t),i("YFKU"),n=i("hY0g"),o=i.n(n),r=i("HySD"),s=function(){function e(e){var t,i,n,r,s=this;for(this._document=e,this.isFullscreen=new o.a,(t=function(){var e,t,i=["fullscreenElement","webkitFullscreenElement","mozFullscreenElement","mozFullScreenElement","msFullscreenElement"];for(e=0;e<i.length;e++)if((t=i[e])in s._document){s.isFullscreen.setValue(!!s._document[t]);break}})(),i=0,n=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"];i<n.length;i++)r=n[i],e.addEventListener(r,t,!1)}return e.prototype.enter=function(){var e,t,i,n=this._document.documentElement;for(e=0,t=["requestFullscreen","mozRequestFullScreen","webkitRequestFullscreen","msRequestFullscreen"];e<t.length;e++)if("function"==typeof n[i=t[e]]){n[i]();break}this.isFullscreen.setValue(!0)},e.prototype.exit=function(){var e,t,i,n=this._document;for(e=0,t=["exitFullscreen","mozCancelFullScreen","mozExitFullscreen","webkitExitFullscreen","msExitFullscreen"];e<t.length;e++)if("function"==typeof n[i=t[e]]){n[i]();break}this.isFullscreen.setValue(!1)},e}(),a=function(){return function(e){var t,i,n,r,s,a=this;for(this.isVisible=new o.a(!0),i=null,n=function(n){var o=n?n+"Hidden":"hidden";if(o in e)return t=n+"visibilitychange",(i=function(){a.isVisible.setValue(!e[o])})(),e.addEventListener(t,i,!1),"break"},r=0,s=["","moz","ms","webkit"];r<s.length&&"break"!==n(s[r]);r++);this.destroy=function(){i&&(e.removeEventListener(t,i,!1),i=null)}}}(),l=i("/3z9"),i.d(t,"Root",function(){return c}),c=function(){function e(e){this._window=e,this._fullscreenApi=new s(e.document),this._initFullscreen()}return e.prototype.allocate=function(){var e,t,i,n=this;return this.free(),(t=(e=this._window.document).createElement("div")).classList.add("js-rootresizer__contents"),t.style.position="relative",t.style.width="100%",t.style.height="100%",e.body.insertAdjacentElement("afterbegin",t),this._visibilityApi=new a(this._window.document),(i={alive:new o.a(!0),fullscreenable:new o.a(!0),container:new o.a(t),width:new o.a,height:new o.a,availWidth:new o.a,availHeight:new o.a,visible:this._visibilityApi.isVisible,fullscreen:this._fullscreenApi.isFullscreen,remove:function(){i.alive.setValue(!1)},attach:function(){i.alive.setValue(!1),n._window.close()},requestFullscreen:function(){n._requestFullscreen()},exitFullscreen:function(){n._exitFullscreen()}}).alive.subscribe(function(e){e||i!==n._area||n.free()}),this._area=i,this._resizeHandler=function(){var e=i.container.value(),t=e.clientWidth||800,n=e.clientHeight||600;i.availHeight.setValue(n),i.availWidth.setValue(t),
i.height.setValue(n),i.width.setValue(t)},this._resizeHandler(),this._window.addEventListener("resize",this._resizeHandler),new r.ResizerDetacherState(i).bridge()},e.prototype.free=function(){var e,t;this._resizeHandler&&(this._window.removeEventListener("resize",this._resizeHandler),this._resizeHandler=void 0),this._visibilityApi&&(this._visibilityApi.destroy(),this._visibilityApi=void 0),this._area&&(e=this._area,this._area=void 0,e.alive.setValue(!1),(t=e.container.value())&&t.parentElement&&t.parentElement.removeChild(t))},e.prototype._requestFullscreen=function(){this._fullscreenApi.enter()},e.prototype._exitFullscreen=function(){this._fullscreenApi.exit()},e.prototype._initFullscreen=function(){var e=this,t=this._window.document;this._fullscreenApi.isFullscreen.subscribe(function(i){var n;i?((n=e._exitFullscreenButton=t.createElement("div")).classList.add("tv-exit-fullscreen-button"),n.textContent=window.t("Exit Full Screen (ESC)"),n.addEventListener("click",function(t){t.preventDefault(),e._exitFullscreen()}),t.body.appendChild(n),e._onExitFullscreenEsc=function(t){27===Object(l.hashFromEvent)(t)&&(t.preventDefault(),e._exitFullscreen())},t.addEventListener("keyup",e._onExitFullscreenEsc)):((n=e._exitFullscreenButton)&&(n.parentElement&&n.parentElement.removeChild(n),e._exitFullscreenButton=void 0),e._onExitFullscreenEsc&&(t.removeEventListener("keyup",e._onExitFullscreenEsc),e._onExitFullscreenEsc=void 0)),e._resizeHandler&&e._resizeHandler()})},e}()},ljE9:function(e,t,i){"use strict";function n(e,t){var i=r.get(e);return i instanceof Function?i(t):i&&i[t]}function o(e,t,i){var n,o;i instanceof Function?r.set(e,i):((o=void 0===(n=r.get(e))||n instanceof Function?{}:n)[t]=i,r.set(e,o))}i.d(t,"a",function(){return n}),i.d(t,"b",function(){return o});var r=new WeakMap},loH8:function(e,t,i){"use strict";function n(e,t,i){this._cache=e,this._cacheRect=t,this._targetRect=i}var o=i("aO4+"),r=o.Point,s=o.box,a=i("f6yo").pointInBox,l=i("VdBB").HitTestResult;n.prototype.draw=function(e){e.translate(.5,.5),e.drawImage(this._cache,this._cacheRect.left,this._cacheRect.top,this._cacheRect.width,this._cacheRect.height,this._targetRect.left,this._targetRect.top,this._targetRect.width,this._targetRect.height),e.translate(-.5,-.5)},n.prototype.hitTest=function(e){var t=new r(this._targetRect.left,this._targetRect.top),i=t.add(new r(this._targetRect.width,this._targetRect.height));return a(e,s(t,i))?new l(l.REGULAR):null},e.exports=n},ltKl:function(e,t,i){"use strict";function n(e){switch(e){case 0:return"barStyle";case 1:return"candleStyle";case 2:return"lineStyle";case 3:return"areaStyle";case 4:return"renkoStyle";case 5:return"kagiStyle";case 6:return"pnfStyle";case 7:return"pbStyle";case 8:return"haStyle";case 9:return"hollowCandleStyle";case 10:return"baselineStyle";case 11:return"rangeStyle";case 12:return"hiloStyle";default:Object(o.ensureNever)(e)}throw new Error("unsupported chart style: "+e)}var o,r,s,a,l;i.r(t),i.d(t,"SeriesApi",function(){return l}),o=i("Eyy1"),r=i("jRfx"),s=i("HGup"),a=i("/ToI"),l=function(){
function e(e,t){this._series=e,this._model=t}return e.prototype.isUserEditEnabled=function(){return this._series.userEditEnabled()},e.prototype.setUserEditEnabled=function(e){this._series.setUserEditEnabled(e)},e.prototype.mergeUp=function(){this._model.isMergeUpAvailableForSource(this._series)&&new r.c(this._model,this._series,"").redo()},e.prototype.mergeDown=function(){this._model.isMergeDownAvailableForSource(this._series)&&new r.a(this._model,this._series,"").redo()},e.prototype.unmergeUp=function(){this._model.isUnmergeAvailableForSource(this._series)&&new s.c(this._model,this._series,"").redo()},e.prototype.unmergeDown=function(){this._model.isUnmergeAvailableForSource(this._series)&&new s.a(this._model,this._series,"").redo()},e.prototype.detachToRight=function(){new a.MoveToNewPriceScaleUndoCommand(this._model,this._series,this._pane(),"right","").redo()},e.prototype.detachToLeft=function(){new a.MoveToNewPriceScaleUndoCommand(this._model,this._series,this._pane(),"left","").redo()},e.prototype.detachNoScale=function(){new a.MoveToNewPriceScaleUndoCommand(this._model,this._series,this._pane(),"overlay","").redo()},e.prototype.changePriceScale=function(e){var t,i,n,r=Object(o.ensureNotNull)(this._model.paneForSource(this._series));switch(e){case"new-left":new a.MoveToNewPriceScaleUndoCommand(this._model,this._series,r,"left","").redo();break;case"new-right":new a.MoveToNewPriceScaleUndoCommand(this._model,this._series,r,"right","").redo();break;case"no-scale":Object(o.assert)(r.actionNoScaleIsEnabled(this._series),"Unable to leave a pane without any non-overlay price scale"),new a.MoveToNewPriceScaleUndoCommand(this._model,this._series,r,"overlay","").redo();break;default:if(null===(t=this._model.dataSourceForId(e)))throw new Error("There is no study with entityId='"+e+"'");i=this._model.paneForSource(t)===r,Object(o.assert)(i,"Study should be on the main pane"),n=Object(o.ensureNotNull)(t.priceScale()),new a.MoveToExistingPriceScaleUndoCommand(this._model,this._series,r,n,"").redo()}},e.prototype.isVisible=function(){return this._series.properties().visible.value()},e.prototype.setVisible=function(e){this._series.properties().visible.setValue(e)},e.prototype.bringToFront=function(){this._model.bringToFront([this._series])},e.prototype.sendToBack=function(){this._model.sendToBack([this._series])},e.prototype.entityId=function(){return this._series.id()},e.prototype.chartStyleProperties=function(e){return this._series.properties().child(n(e)).state(["inputs","inputsInfo"])},e.prototype.setChartStyleProperties=function(e,t){this._series.properties().child(n(e)).mergeAndFire(t)},e.prototype.barsCount=function(){return this._series.bars().size()},e.prototype._pane=function(){return Object(o.ensureNotNull)(this._model.paneForSource(this._series))},e}()},lxNp:function(e,t,i){"use strict";function n(e){return new p(_,e)}function o(e){_.listen(e)}function r(e){_.unlisten(e)}var s,a,l,c,u,h,d,p,_,f;i.r(t),i("mrSG"),s=i("/3z9"),a=i("d700"),l=i("hY0g"),c=i.n(l),u=function(){function e(){var e=this;this._groups=[],
this._pressedKeys=new c.a(0),this._keyDownListener=function(t){var i,n,o;if(!t.defaultPrevented&&(i=Object(s.hashFromEvent)(t),e._pressedKeys.setValue(i),!Object(a.a)(i,t.target)))for(n=e._groups.length;n-- >0;)if(!(o=e._groups[n]).isDisabled()){if(o.handleHotkey(i,t))return;if(o.modal)return}},this._keyUpListener=function(t){var i=Object(s.hashFromEvent)(t);e._pressedKeys.setValue(i)},this._blurEvent=function(){e._pressedKeys.setValue(0)},this._mouseEvent=function(t){var i=Object(s.modifiersFromEvent)(t),n=255&e._pressedKeys.value();e._pressedKeys.setValue(i|n)}}return e.prototype.listen=function(e){e.addEventListener("keydown",this._keyDownListener),e.addEventListener("keyup",this._keyUpListener),e.addEventListener("blur",this._blurEvent),e.addEventListener("mousemove",this._mouseEvent)},e.prototype.unlisten=function(e){e.removeEventListener("keydown",this._keyDownListener),e.removeEventListener("keyup",this._keyUpListener),e.removeEventListener("blur",this._blurEvent),e.removeEventListener("mousemove",this._mouseEvent)},e.prototype.registerGroup=function(e){this._groups.push(e)},e.prototype.unregisterGroup=function(e){for(var t=this._groups.length;t--;)this._groups[t]===e&&this._groups.splice(t,1)},e.prototype.promoteGroup=function(e){var t,i=this._groups.length-1;for(t=this._groups.length;t--;){if(this._groups[t]===e)return void(t!==i&&(this._groups.splice(t,1),this._groups.splice(i,0,e)));this._groups[t].modal&&(i=t-1)}},e.prototype.pressedKeys=function(){return this._pressedKeys},e}(),h=i("PC8g"),d=function(){function e(e,t){this._group=e,this.hotkey=t.hotkey,this.handler=t.handler,this.desc=t.desc,this.element=t.element||null,t.isDisabled?"function"==typeof t.isDisabled?this.isDisabled=t.isDisabled:this.isDisabled=function(){return!0}:this.isDisabled=function(){return!1}}return e.prototype.destroy=function(){this._group&&(this._group.remove(this),this._group=null)},e}(),p=function(){function e(e,t){this._actions=[],this._manager=e,this.modal=!(!t||!t.modal),t&&(this.desc=t.desc),t&&t.isDisabled?"function"==typeof t.isDisabled?this.isDisabled=t.isDisabled:this.isDisabled=function(){return!0}:this.isDisabled=function(){return!1},this._manager.registerGroup(this)}return e.prototype.add=function(e){var t=new d(this,e);return this._actions.push(t),t},e.prototype.remove=function(e){for(var t=this._actions.length;t-- >0;)this._actions[t]===e&&this._actions.splice(t,1)},e.prototype.handleHotkey=function(e,t){var i,n;for(i=this._actions.length;i-- >0;)if((n=this._actions[i]).hotkey===e&&(!n.element||t.target&&n.element.contains(t.target))&&!n.isDisabled())return n.handler(t),t.preventDefault(),Object(h.trackEvent)("Keyboard Shortcuts",Object(s.humanReadableHash)(e)),!0;return!1},e.prototype.promote=function(){this._manager.promoteGroup(this)},e.prototype.destroy=function(){this._actions.length=0,this._manager.unregisterGroup(this)},e}(),i.d(t,"pressedKeys",function(){return f}),i.d(t,"createGroup",function(){return n}),i.d(t,"registerWindow",function(){return o}),i.d(t,"unregisterWindow",function(){return r}),
i.d(t,"Modifiers",function(){return s.Modifiers}),_=new u,f=_.pressedKeys(),o(window)},"m/cY":function(e,t,i){"use strict";function n(e){return new r.a(e)}var o,r;i.d(t,"a",function(){return n}),o=i("tc+8"),r=i.n(o)},mE5r:function(e,t,i){"use strict";function n(e){return e/11}var o,r,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P,C,T;i.r(t),o=i("mrSG"),r=i("Eyy1"),s=i("ikwP"),a=i("i1o5"),l=i("aO4+"),c=i("XlJ7"),u=i("EsvI"),h=i("OsWk"),d=i("rL76"),p=i("zDbI"),_=parseInt(d.labelheight),f=parseInt(d.bottommargin),m=function(){function e(){this._wrapper=document.createElement("div"),this._element=document.createElement("div"),this._labelElement=document.createElement("div"),this._gearElement=document.createElement("div"),this._currentScale=1,this._info=null,this._mode="auto",this._wrapper.appendChild(this._element),this._wrapper.classList.add(d.wrapper),this._element.classList.add(d.label),this._labelElement.className=d.symbol,this._element.appendChild(this._labelElement),this._gearElement.className=d.gear,this._gearElement.innerHTML=h,this._element.appendChild(this._gearElement)}return e.prototype.getElement=function(){return this._wrapper},e.prototype.setMode=function(e){this._mode!==e&&(this._mode=e)},e.prototype.align=function(e,t){var i=n(t);Math.abs(i-this._currentScale)>.1&&(this._currentScale=i,Math.abs(this._currentScale-1)>.1?this._element.style.transform="scale("+this._currentScale+")":(this._currentScale=1,this._element.style.transform=""))},e.prototype.drawLabelForScreenshot=function(e,t){var i,o,r;null!==this._info&&"gear"!==this._mode&&(i=Object(c.makeFont)(t.fontSize,p.CHART_FONT_FAMILY),e.fillStyle=u.themes[t.theme].getThemedColor("color-price-axis-label-back"),e.globalAlpha=.5,e.beginPath(),o=n(t.fontSize)*_/2,r=Object(l.point)(t.offset+t.width/2,t.height/2),e.arc(r.x,r.y,o,0,2*Math.PI,!0),e.fill(),e.globalAlpha=1,e.fillStyle=u.themes[t.theme].getThemedColor("color-price-axis-label-text"),e.textAlign="center",e.font=i,e.textBaseline="middle",e.fillText(this._info.label,r.x,r.y))},e.prototype.setAxisNameInfo=function(e){this._info=e,null!==e&&(this._labelElement.textContent=e.label)},e.height=function(e){return(_+f)*e},e}(),y=i("aIyQ"),g=i.n(y),v=i("S8xo"),S=i("5VQP"),b=i("ljE9"),w={enableTooltip:!0,showLabels:!0,enableMenu:!0,enableHighlight:!0},P=function(){function e(e,t,i,n,r){var a=this;this._invalidated=!0,this._size=new s.Size(0,0),this._offset=0,this._axisInfo=null,this._onLabelHovered=new g.a,this._highlighted=!1,this._labelMode="auto",this._fixedLabelMode=null,this._isLeft="left"===e,this._rendererOptionsProvider=n.rendererOptionsProvider,this._sourcesTitlesProvider=n.sourcesTitlesProvider,this._contextMenuItemsProvider=n.contextMenuItemsProvider,this._backgroundBasedTheme=n.backgroundBasedTheme,this._properties=t,this._axisInfo=i,this._labelOptions=Object(o.__assign)(Object(o.__assign)({},w),r),this._properties.backgroundColor.subscribe(this,this._onPropertyChanged),this._properties.lineColor.subscribe(this,this._onPropertyChanged),this._cell=document.createElement("div"),
this._cell.classList.add(d["price-axis-stub"]),this._labelOptions.enableTooltip&&this._cell.classList.add("apply-common-tooltip","common-tooltip-html"),this._cell.style.width="25px",this._cell.style.height="100%",this._cell.style.position="absolute",this._cell.style.left="0",this._cell.style.overflow="hidden",this._labelOptions.showLabels?(this._label=new m,this._label.setAxisNameInfo(this._axisInfo),this._cell.appendChild(this._label.getElement()),this._labelOptions.enableTooltip&&Object(b.b)(this._cell,"text",function(e){return a._tooltipContent()})):this._label=null,this._mouseEventHandler=new v.MouseEventHandler(this._cell,this,{treatHorzTouchDragAsPageScroll:!0,treatVertTouchDragAsPageScroll:!0}),this._canvas=Object(s.addCanvasTo)(this._cell,new s.Size(16,16)),this._canvas.style.position="absolute",this._canvas.style.left="0",this._canvas.style.top="0",this._ctx=this._canvas.getContext("2d")}return e.prototype.destroy=function(){this._properties.backgroundColor.unsubscribe(this,this._onPropertyChanged),this._properties.lineColor.unsubscribe(this,this._onPropertyChanged),this._mouseEventHandler.destroy(),$(this._cell).remove()},e.prototype.mouseEnterEvent=function(e){null!==this._label&&"symbol"!==this._labelMode&&this._labelOptions.enableHighlight&&this._setHighlighted(!0)},e.prototype.mouseLeaveEvent=function(e){"symbol"!==this._labelMode&&this._setHighlighted(!1)},e.prototype.mouseDownEvent=function(e){var t=this;null===this._fixedLabelMode&&"symbol"!==this._labelMode&&this._labelOptions.enableMenu&&this._labelOptions.showLabels?(this._fixedLabelMode=this._labelMode,this.setLabelMode("gear"),S.ContextMenuManager.createMenu(this._contextMenuItemsProvider(),{statName:"PriceScaleLabelContextMenu"},function(){t.setLabelMode(Object(r.ensureNotNull)(t._fixedLabelMode)),t._fixedLabelMode=null}).then(function(e){return e.show(function(e,i){var n=t._cell.getBoundingClientRect();return{clientX:t._isLeft?n.left:n.right-e,clientY:n.top-Math.min(i,n.top),overrideHeight:n.top<i?n.top:void 0}},t.getElement(),!0)})):S.ContextMenuManager.hideAll()},e.prototype.update=function(){this._invalidated=!0},e.prototype.getElement=function(){return this._cell},e.prototype.onLabelHovered=function(){return this._onLabelHovered},e.prototype.setSizeAndOffset=function(e,t){if(e.w<0||e.h<0)throw new Error("Try to set invalid size to PriceAxisStub "+JSON.stringify(e));this._size.equals(e)||(this._size=e,Object(s.resizeCanvas)(this._canvas,e),this._cell.style.width=e.w+"px",this._cell.style.minWidth=e.w+"px",this._cell.style.height=e.h+"px",this._invalidated=!0),this._offset!==t&&(this._offset=t,this._cell.style.left=t+"px")},e.prototype.paint=function(e){e<a.InvalidationLevel.Full&&!this._invalidated||0!==this._size.w&&0!==this._size.h&&(this._invalidated=!1,this._drawBackground(),this._drawBorder())},e.prototype.hardResetCanvas=function(){Object(s.hardResizeCanvas)(this._canvas,this._size)},e.prototype.getWidth=function(){return this._size.w},e.prototype.getImage=function(){var e,t,i=document.createElement("canvas")
;return i.width=this._size.w,i.height=this._size.h,e=i.getContext("2d"),t=this._properties.backgroundColor.value(),Object(s.clearRect)(e,0,0,this._size.w,this._size.h,t),e.drawImage(this._canvas,0,0),null!==this._label&&this._label.drawLabelForScreenshot(e,{offset:0,width:this._size.w,height:this._size.h,fontSize:this._properties.fontSize.value(),theme:this._backgroundBasedTheme.value()}),i},e.prototype.setLabelMode=function(e){e!==this._labelMode&&(this._labelMode=e,null!==this._label&&this._label.setMode(e),this._cell.classList.toggle(d["fixed-gear"],"gear"===e),this._cell.classList.toggle(d["fixed-symbol"],"symbol"===e),this._cell.classList.toggle("apply-common-tooltip","symbol"!==e&&this._labelOptions.enableTooltip),this._cell.classList.toggle("common-tooltip-html","symbol"!==e&&this._labelOptions.enableTooltip))},e.prototype._setHighlighted=function(e){this._labelOptions.enableHighlight&&(this._onLabelHovered.fire(e),this._highlighted!==e&&(this._highlighted=e,this._invalidated=!0))},e.prototype._onPropertyChanged=function(){this._invalidated=!0},e.prototype._drawBorder=function(){var e,t,i=this._size.w;this._ctx.save(),this._ctx.fillStyle=this._properties.lineColor.value(),e=this._rendererOptionsProvider.options().borderSize,this._isLeft?(this._ctx.translate(-.5,-.5),t=i-e-1):(this._ctx.translate(.5,-.5),t=0),this._ctx.fillRect(t,0,e,this._size.h),this._ctx.restore()},e.prototype._drawBackground=function(){if(Object(s.clearRect)(this._ctx,0,0,this._size.w,this._size.h,this._properties.backgroundColor.value()),this._highlighted){var e=u.themes[this._backgroundBasedTheme.value()].getThemedColor("color-price-axis-highlight");this._ctx.globalAlpha=.5,this._isLeft?Object(s.fillRect)(this._ctx,0,0,this._size.w-1,this._size.h,e):Object(s.fillRect)(this._ctx,1,0,this._size.w,this._size.h,e),this._ctx.globalAlpha=1}},e.prototype._tooltipContent=function(){return this._sourcesTitlesProvider().join("<br>")},e}(),C=i("Daqx"),i.d(t,"PriceAxisesContainer",function(){return T}),T=function(){function e(e,t,i,n,r,a){this._axises=[],this._stubs=[],this._size=new s.Size(0,0),this._onLabelHovered=new g.a,this._scalesProperties=t,this._priceAxisWidgetFactory=n,this._rendererOptionsProvider=r.rendererOptionsProvider,this._titlesProvider=r.titlesProvider,this._contentMenuProvider=r.contentMenuProvider,this._backgroundBasedTheme=r.backgroundBasedTheme,this._labelsOptions=Object(o.__assign)(Object(o.__assign)({},w),a),this._stubProperties={lineColor:this._scalesProperties.lineColor,backgroundColor:e,fontSize:t.fontSize},this._side=i,this._cell=document.createElement("td"),this._cell.classList.add("chart-markup-table","price-axis-container"),this._cell.style.width="25px",this._cell.style.position="relative"}return e.prototype.destroy=function(){this.setScales([],0,0,0)},e.prototype.onLabelHovered=function(){return this._onLabelHovered},e.prototype.setScales=function(e,t,i,n){for(var o,s,a,l,c,u,h,d,p=this;e.length>this._axises.length&&this._axises.length<t;)o=Object(C.getPriceAxisNameInfo)(this._side,this._axises.length),
s=this._priceAxisWidgetFactory(this._side,this._rendererOptionsProvider,this._scalesProperties,o,this._backgroundBasedTheme),this._axises.push(s),this._cell.appendChild(s.getElement());for(;e.length<this._axises.length;)s=Object(r.ensureDefined)(this._axises.pop()),this._cell.removeChild(s.getElement()),s.destroy();for(a=0;a<this._axises.length;++a)this._axises[a].setPriceScale(e[a]);for(l=t-e.length,c=Math.max(0,l);this._stubs.length>c;)(u=Object(r.ensureDefined)(this._stubs.pop())).onLabelHovered().unsubscribeAll(this),this._cell.removeChild(u.getElement()),u.destroy();for(h=function(){var e=d._labelsOptions.showLabels?Object(C.getPriceAxisNameInfo)(d._side,d._stubs.length):null,t=d._stubs.length,i=new P(d._side,d._stubProperties,e,d._stubParams(t),d._labelsOptions);i.onLabelHovered().subscribe(d,function(t){p._labelsOptions.showLabels&&p._labelsOptions.enableHighlight&&p._onLabelHovered.fire(Object(r.ensureNotNull)(e),t)}),d._stubs.push(i),d._cell.appendChild(i.getElement())},d=this;this._stubs.length<l;)h();1===n?this._stubs.forEach(function(e,t){return e.setLabelMode("gear")}):this._stubs.forEach(function(e,t){return e.setLabelMode(t<i&&p._labelsOptions.enableMenu?"auto":"symbol")})},e.prototype.getElement=function(){return this._cell},e.prototype.optimalWidths=function(){return this._axises.map(function(e){return e.optimalWidth()})},e.prototype.setSizes=function(e,t){this._size=new s.Size(t.reduce(function(e,t){return e+t},0),e),this._cell.style.width=this._size.w+"px",this._cell.style.minWidth=this._size.w+"px",this._cell.style.height=this._size.h+"px",t.length!==this._axises.length+this._stubs.length&&Object(r.assert)(t.length===this._axises.length+this._stubs.length,"Widgets count should be the same as widths one");var i=0;this._forEachWidgetFromLeft(function(n,o){var r=t[o];n.setSizeAndOffset(new s.Size(r,e),i),i+=r})},e.prototype.update=function(){this._axises.forEach(function(e){return e.update()}),this._stubs.forEach(function(e){return e.update()})},e.prototype.paint=function(e){this._axises.forEach(function(t){return t.paint(e)}),this._stubs.forEach(function(t){return t.paint(e)})},e.prototype.hardResetCanvas=function(){this._axises.forEach(function(e){return e.hardResetCanvas()}),this._stubs.forEach(function(e){return e.hardResetCanvas()})},e.prototype.restoreDefaultCursor=function(){this._axises.forEach(function(e){return e.restoreDefaultCursor()})},e.prototype.getWidth=function(){return this._size.w},e.prototype.findAxisWidgetForScale=function(e){var t=this._axises.find(function(t){return t.priceScale()===e});return void 0===t?null:t},e.prototype.getScreenshotData=function(){return{content:this._getImage().toDataURL(),contentHeight:this._size.h,contentWidth:this._size.w}},e.prototype.getImage=function(){return this._getImage()},e.prototype.slotsCount=function(){return this._axises.length+this._stubs.length},e.prototype.highlightPriceAxisByLabel=function(e){this._axises.forEach(function(t){var i=t.axisInfo();t.setHighlighted(null!==i&&i.equals(e))})},e.prototype._stubParams=function(e){
var t=this,i=function(){return t._titlesProvider(t._side,e)},n=function(){return t._contentMenuProvider(t._side,e)};return{rendererOptionsProvider:this._rendererOptionsProvider,backgroundBasedTheme:this._backgroundBasedTheme,sourcesTitlesProvider:i,contextMenuItemsProvider:n}},e.prototype._getImage=function(){var e,t,i=this,n=document.createElement("canvas");return n.width=this._size.w,n.height=this._size.h,e=n.getContext("2d"),t=0,this._forEachWidgetFromLeft(function(n,o){var r=n.getWidth();0!==r&&(e.drawImage(n.getImage(),t,0,r,i._size.h),t+=r)}),n},e.prototype._forEachWidgetFromLeft=function(e){var t,i=Object(o.__spreadArrays)(this._axises,this._stubs),n="left"===this._side,r=n?i.length-1:0,s=n?-1:i.length,a=n?-1:1;for(t=r;t!==s;t+=a)e(i[t],t,i)},e}()},"mKT+":function(e,t,i){"use strict";function n(e,t,n,s,ve){var be,we;return void 0===n&&(n={}),be=s.activeChartWidget.value(),(we=u.enabled("test_force_old_properties_dialog"))&&(n.doNotCloseOnBgClick=!0),we||Object(a.isStudy)(e)&&(function(e){return e.metaInfo().inputs.filter(l.a).some(function(e){return"bar_time"===e.type})}(e)||function(e){return"Overlay"===e.metaInfo().shortId}(e))||Object(ge.isLineTool)(e)&&!function(e){return[h.LineToolTrendLine,d.LineToolInfoLine,p.LineToolTrendAngle,_.LineToolHorzLine,f.LineToolHorzRay,m.LineToolVertLine,y.LineToolCrossLine,g.LineToolParallelChannel,v.LineToolDisjointAngle,S.LineToolFlatBottom,b.LineToolArrowMark,w.LineToolBalloon,P.LineToolCallout,C.LineToolNote,T.LineToolPriceLabel,x.LineToolText,I.LineToolArc,L.LineToolBezierCubic,M.LineToolBezierQuadro,A.LineToolBrush,k.LineToolEllipse,E.LineToolPolyline,O.LineToolRectangle,D.LineToolRotatedRectangle,V.LineToolTriangle,B.LineTool5PointsPattern,R.LineToolABCD,N.LineToolCircleLines,F.LineToolElliott,W.LineToolHeadAndShoulders,j.LineToolSineLine,U.LineToolThreeDrivers,z.LineToolTimeCycles,H.LineToolTrianglePattern,Y.LineToolIcon,G.LineToolBarsPattern,q.LineToolDateAndPriceRange,K.LineToolDateRange,Z.LineToolGhostFeed,J.LineToolPrediction,X.LineToolPriceRange,Q.LineToolProjection,$.LineToolRiskRewardLong,$.LineToolRiskRewardShort,ee.LineToolGannSquare,te.LineToolGannComplex,ie.LineToolGannFan,ne.LineToolGannFixed,oe.LineToolFibChannel,re.LineToolFibCircles,se.LineToolFibRetracement,ae.LineToolFibSpeedResistanceArcs,le.LineToolFibSpeedResistanceFan,ce.LineToolFibSpiral,ue.LineToolFibTimeZone,he.LineToolFibWedge,de.LineToolTrendBasedFibExtension,pe.LineToolTrendBasedFibTime,_e.LineToolPitchfork,fe.LineToolPitchfan,me.LineToolFlagMark].some(function(t){return e instanceof t})}(e)?function(e,t,n,s){var a=Object(o.loadPropertyPages)(),l=function(o,r){Promise.all([i.e(21),i.e(22),i.e(29),i.e(33),i.e(34),i.e(75),i.e(18),i.e(25),i.e(27),i.e("editobjectdialog")]).then(function(r){a.then(function(){var r=i("Kqsj").EditObjectDialog,a=new r(e,t,s);a.show(n),o(a)})}.bind(null,i)).catch(r)};return Object(r.retries)(function(e){return new Promise(l)},2)}(e,t,n,ve):e!==t.mainSeries()&&!Object(a.isStudy)(e)&&Object(ge.isLineTool)(e)?be.propertiesDefinitionsForSource(e).then(function(n){
return o={propertyPages:n,model:t,source:e},Promise.all([i.e("react"),i.e(2),i.e(3),i.e(5),i.e(6),i.e(7),i.e(11),i.e(14),i.e(17),i.e(26),i.e(36),i.e(37),i.e(38),i.e(43),i.e(49),i.e(71),i.e(0),i.e(1),i.e(4),i.e(8),i.e(9),i.e(13),i.e(10),i.e(12),i.e(16),i.e(23),i.e(30),i.e(40),i.e("drawings-settings-dialog")]).then(i.bind(null,"W/vp")).then(function(e){var t=e.DrawingsSettingsDialogRenderer,i=new t(o);return null!==ye&&ye.hide(),i.show(),ye=i,i});var o}):Object(a.isStudy)(e)&&!Object(a.isESDStudy)(e)?function(e,t,n,o){return Promise.all([i.e("react"),i.e(2),i.e(3),i.e(5),i.e(6),i.e(7),i.e(11),i.e(14),i.e(15),i.e(17),i.e(26),i.e(36),i.e(38),i.e(48),i.e(49),i.e(59),i.e(0),i.e(1),i.e(4),i.e(8),i.e(9),i.e(10),i.e(12),i.e(16),i.e(23),i.e(30),i.e(41),i.e("new-edit-object-dialog")]).then(i.bind(null,"Y5hB")).then(function(i){var n=i.EditObjectDialogRenderer,r=new n(e,t,o);return r.show(),r})}(e,t,0,ve):be.generalPropertiesDefinitions().then(function(t){var o=n.tabName,r=Object(a.isESDStudy)(e)?"events":o&&Se[o];return function(e){return Promise.all([i.e("react"),i.e(2),i.e(3),i.e(5),i.e(6),i.e(7),i.e(11),i.e(14),i.e(15),i.e(17),i.e(26),i.e(37),i.e(43),i.e(72),i.e(0),i.e(1),i.e(4),i.e(9),i.e(13),i.e(10),i.e(12),i.e(16),i.e(23),i.e(40),i.e("general-chart-properties-dialog")]).then(i.bind(null,"PI1I")).then(function(t){var i=t.GeneralChartPropertiesDialogRenderer,n=new i(e);return null!==c&&c.hide(),n.show(),c=n,n})}({chartWidgetCollection:s,propertyPages:t,activePageId:r,model:be.model()})})}var o,r,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P,C,T,x,I,L,M,A,k,E,O,D,V,B,R,N,F,W,j,U,z,H,Y,G,q,K,Z,J,X,Q,$,ee,te,ie,ne,oe,re,se,ae,le,ce,ue,he,de,pe,_e,fe,me,ye,ge,ve,Se;i.r(t),o=i("hayr"),r=i("mpWx"),s=i("QloM"),a=i("3ClC"),l=i("W5mg"),c=null,u=i("Kxc7"),h=i("WPQD"),d=i("yi8X"),p=i("nW7S"),_=i("/DxK"),f=i("CJIV"),m=i("n40Z"),y=i("MA5A"),g=i("qcGP"),v=i("0xda"),S=i("InMJ"),b=i("TohL"),w=i("me8f"),P=i("odCa"),C=i("gLxC"),T=i("zqZp"),x=i("V3Oj"),I=i("0Pxc"),L=i("N+BX"),M=i("Xyly"),A=i("+hLl"),k=i("V086"),E=i("hP9j"),O=i("7qI1"),D=i("Az04"),V=i("isVH"),B=i("NJRZ"),R=i("pKDv"),N=i("tG6Q"),F=i("xz+e"),W=i("aILO"),j=i("bv/X"),U=i("PYn8"),z=i("kIXa"),H=i("lNN+"),Y=i("icPo"),G=i("2bPF"),q=i("UCMi"),K=i("WkYF"),Z=i("XUCF"),J=i("Wh6B"),X=i("RDDl"),Q=i("68at"),$=i("tDUI"),ee=i("Z0Sh"),te=i("nd9+"),ie=i("4u8j"),ne=i("TBaH"),oe=i("xnA2"),re=i("4bfY"),se=i("t2ex"),ae=i("Yjuu"),le=i("zZ5f"),ce=i("i80N"),ue=i("FsE7"),he=i("9QkW"),de=i("ZtA1"),pe=i("yUly"),_e=i("aDyP"),fe=i("NhkU"),me=i("aIha"),ye=null,ge=i("CW80"),i.d(t,"resolveAndShowEditObjectDialog",function(){return n}),(ve={})[s.TabNames.style]="symbol",ve[s.TabNames.legend]="legend",ve[s.TabNames.scales]="scales",ve[s.TabNames.trading]="trading",ve[s.TabNames.events]="events",Se=ve},mMWL:function(e,t,i){"use strict";function n(e){return"cursor"===e||"arrow"===e||"dot"===e}function o(e){if((void 0===e&&(e=!1),!e&&P)&&P.childs().stayInDrawingMode.value())return;M.setValue(A.value())}function r(e){var t=!1;return function(i){t||(t=!0,e.fire(i),t=!1)}}function s(){
ue||(M.setValue(b.getValue("chart.cursorPreference","cursor")),M.subscribe(function(e){return n(e)&&A.setValue(e)},{callWithLast:!0}),A.subscribe(function(e){e&&b.setValue("chart.cursorPreference",e)}),P=new m.DefaultProperty("drawings"),C=Object(f.a)(),T=Object(f.a)(),x=Object(f.a)(),I=Object(f.a)(),C.setValue(!1),T.setValue(!1),x.setValue(!1),I.setValue(!1),M.subscribe(function(){Object(w.emit)("onSelectedLineToolChanged")}),ue=!0,he.forEach(function(e){return e()}),he=[])}function a(e){ue?e():he.push(e)}function l(){return Object(_.ensureNotNull)(P)}function c(){return Object(_.ensureNotNull)(C)}function u(){return Object(_.ensureNotNull)(T)}function h(){return Object(_.ensureNotNull)(x)}function d(){return l().childs().drawOnAllCharts}function p(){return Object(_.ensureNotNull)(I)}var _,f,m,y,g,v,S,b,w,P,C,T,x,I,L,M,A,k,E,O,D,V,B,R,N,F,W,j,U,z,H,Y,G,q,K,Z,J,X,Q,$,ee,te,ie,ne,oe,re,se,ae,le,ce,ue,he;i.r(t),i.d(t,"toolIsCursor",function(){return n}),i.d(t,"resetToCursor",function(){return o}),i.d(t,"lockTimeAxisTime",function(){return L}),i.d(t,"tool",function(){return M}),i.d(t,"cursorTool",function(){return A}),i.d(t,"isToolEditingNow",function(){return k}),i.d(t,"createdLineTool",function(){return E}),i.d(t,"continuedLineTool",function(){return O}),i.d(t,"cancelledLineTool",function(){return D}),i.d(t,"beenSetLineToolLastPoint",function(){return V}),i.d(t,"startedMovingLineTool",function(){return B}),i.d(t,"movedLineTool",function(){return R}),i.d(t,"finishedMovingLineTool",function(){return N}),i.d(t,"startedChangingLineTool",function(){return F}),i.d(t,"changedLineTool",function(){return W}),i.d(t,"finishedChangingLineTool",function(){return j}),i.d(t,"removedLineTool",function(){return U}),i.d(t,"finishedLineTool",function(){return z}),i.d(t,"changedLineStyle",function(){return H}),i.d(t,"copiedLineTool",function(){return Y}),i.d(t,"restoredLineTool",function(){return G}),i.d(t,"restoredLineToolState",function(){return q}),i.d(t,"createLineTool",function(){return K}),i.d(t,"continueLineTool",function(){return Z}),i.d(t,"cancelLineTool",function(){return J}),i.d(t,"setLineToolLastPoint",function(){return X}),i.d(t,"startMovingLineTool",function(){return Q}),i.d(t,"moveLineTool",function(){return $}),i.d(t,"finishMovingLineTool",function(){return ee}),i.d(t,"startChangingLineTool",function(){return te}),i.d(t,"changeLineTool",function(){return ie}),i.d(t,"finishChangingLineTool",function(){return ne}),i.d(t,"removeLineTool",function(){return oe}),i.d(t,"finishLineTool",function(){return re}),i.d(t,"changeLineStyle",function(){return se}),i.d(t,"copyLineTool",function(){return ae}),i.d(t,"restoreLineTool",function(){return le}),i.d(t,"restoreLineToolState",function(){return ce}),i.d(t,"init",function(){return s}),i.d(t,"runOnDrawingStateReady",function(){return a}),i.d(t,"properties",function(){return l}),i.d(t,"hideAllDrawings",function(){return c}),i.d(t,"lockDrawings",function(){return u}),i.d(t,"hideMarksOnBars",function(){return h}),i.d(t,"drawOnAllCharts",function(){return d}),
i.d(t,"lockTimeAxis",function(){return p}),_=i("Eyy1"),f=i("m/cY"),m=i("Ocx9"),y=i("hY0g"),g=i.n(y),v=i("aIyQ"),S=i.n(v),b=i("Vdly"),w=i("FQhm"),P=null,C=null,T=null,x=null,I=null,L=new g.a,M=new g.a,A=new g.a,k=new g.a(!1),E=new S.a,O=new S.a,D=new S.a,V=new S.a,B=new S.a,R=new S.a,N=new S.a,F=new S.a,W=new S.a,j=new S.a,U=new S.a,z=new S.a,H=new S.a,Y=new S.a,G=new S.a,q=new S.a,K=r(E),Z=r(O),J=r(D),X=r(V),Q=r(B),$=r(R),ee=r(N),te=r(F),ie=r(W),ne=r(j),oe=r(U),re=r(z),se=r(H),ae=r(Y),le=r(G),ce=r(q),ue=!1,he=[]},mNEU:function(e,t,i){"use strict";e.exports=function(e,t,n,o,r,s,a,l,c){var u=i("dDSx").ChartUndoModel,h=new u(e,t,n,o,r,s,a,l,c);return h.model().fullUpdate(),h}},mPvX:function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"LineToolsGroupModel",function(){return s}),n=i("aIyQ"),o=i.n(n),r=i("UqOQ"),s=function(){function e(e){this._onChanged=new o.a,this._groups=[],this._groups=e||[]}return e.prototype.groups=function(){return this._groups.filter(function(e){return e.isActualSymbol()})},e.prototype.createGroup=function(e,t,i){var n,o=this;return t=t||this._generateNextName(),n=new r.a(e,t,i),this._groups.push(n),n.onChanged().subscribe(null,function(){return o._onChanged.fire()}),this._onChanged.fire(),n},e.prototype.addGroup=function(e){var t=this;this._groups.push(e),e.onChanged().subscribe(null,function(){return t._onChanged.fire()}),this._onChanged.fire()},e.prototype.removeGroup=function(e){var t=this._groups.findIndex(function(t){return t.id===e.id});this._groups.splice(t,1),this._onChanged.fire()},e.prototype.groupForId=function(e){return this._groups.find(function(t){return t.id===e})||null},e.prototype.groupForLineTool=function(e){return this._groups.find(function(t){return t.containsLineTool(e)})||null},e.prototype.removeLineTools=function(e){var t=this;this._groups.forEach(function(t){return t.excludeLineTools(e)}),this._groups.filter(function(e){return 0===e.lineTools().length}).forEach(function(e){return t.removeGroup(e)})},e.prototype.state=function(e){return{groups:(e?this._groups.filter(function(e){return e.isActualSymbol()}):this._groups).map(function(e){return e.state()})}},e.prototype.onChanged=function(){return this._onChanged},e.fromState=function(t,i){return new e(i.groups.map(function(e){return r.a.fromState(t,e)}))},e.prototype._generateNextName=function(){var e,t,i,n=new Set(this.groups().map(function(e){return e.name()}));for(e=1;;e++)if(t="Group "+e,i="Group_"+e,!n.has(t)&&!n.has(i))return t},e}()},mYjs:function(e,t,i){"use strict";function n(e,t){Promise.all([i.e(21),i.e(34),i.e(27),i.e("change-interval-dialog")]).then(i.t.bind(null,"MuC6",7)).then(function(i){new i.ChangeIntervalDialog(e).show(t)})}i.r(t),i.d(t,"showChangeIntervalDialog",function(){return n})},mZrn:function(e,t,i){"use strict";(function(e,t,n){function o(){var e,t,i=[/^\/chart\//,/^\/share-your-love\//];window.initData.lfs&&(e=document.getElementsByClassName("js-admin-warning")[0],document.body.removeChild(e)),t=!0,i.forEach(function(e){e.test(window.location.pathname)&&(t=!1)}),t&&window.location.reload(!0)}
function r(e){var t,i;window.iframeAuthWidget&&user.is_first_login&&(window.iframeAuthWidget.preventClose=!0),t=user.available_offers,$("html").toggleClass("is-authenticated",is_authenticated).toggleClass("is-not-authenticated",!is_authenticated).toggleClass("is-pro",is_authenticated&&user&&!!user.is_pro).toggleClass("is-not-pro",!(is_authenticated&&user&&user.is_pro)).toggleClass("is-trial",is_authenticated&&user&&!!user.is_trial).toggleClass("is-not-trial",!(is_authenticated&&user&&user.is_trial)).toggleClass("is-not-trial-available",void 0===t[l.trial]).toggleClass("is-trial-available",void 0!==t[l.trial]).toggleClass("is-upsale-available",is_authenticated&&void 0!==t[l.upsale]),window.TVSettings&&window.TVSettings.sync(user.settings),i=$(".js-header__gopro-button").find("span:visible").data("type")||"",$(".js-header__gopro-button").attr("href",is_authenticated?"/gopro/?source=header_go_pro_button&feature="+i:""),is_authenticated?($(".saved_charts_count").html(user.saved_charts),$(".treated_charts_count").html(user.treated_charts_count),$(".js-trial-days-left").html(user.trial_days_left_text||""),user.gsfn_fastpass_url&&((new Image).src=user.gsfn_fastpass_url),user.is_first_login&&($(function(){}),a("Conversion","First login"),user.prort_trial_started&&delete user.prort_trial_started,delete user.is_first_login),TradingView.setTrialAvailiable(void 0!==user.available_offers[l.trial])):(Object.keys(t).forEach(function(e){t[e].available_for_anons||delete t[e]}),user={username:"Guest",following:"0",followers:"0",ignore_list:{},available_offers:t},$(".user-info-username").html(user.username),TVLocalStorage.removeItem("trial_availiable"))}var s,a,l,c,u,h;i("P5fv"),s=i("FBuY").TVXWindowEvents,a=i("PC8g").trackEvent,l={},i("PFI7"),i("ZUZx"),$(document).ajaxSend(function(e,t,i){i.crossDomain&&!i.forceLanguageHeader||(window.locale?t.setRequestHeader("X-Language",window.locale):console.warn("window.locale is not defined"))}),(c=window.loginStateChange?window.loginStateChange:window.loginStateChange=new e).subscribe(null,r),s.on("loginStateChange",function(){var e=JSON.parse(this);window.user=e.user,window.is_authenticated=!!e.is_authenticated,c.fire()}),s.on("signOut",function(){o()}),u="user-obj-changed",h={},window.crossTabSyncUserAttr=function(e){var t={};e instanceof Array?e.forEach(function(e){t[e]=window.user[e]}):t[e]=window.user[e],s.emit(u,JSON.stringify(t))},window.onChangeUserAttrInAnotherTab=function(t){var i=new e;return h[t]||(h[t]=[]),h[t].push(i),i},s.on(u,function(e){var t,i;for(t in e=JSON.parse(e))if(window.user[t]=e[t],h[t])for(i=0;i<h[t].length;i++)h[t][i].fire(e[t])}),TradingView.changeLoginState=function(e){window.is_authenticated=!!e,s.emit("loginStateChange",JSON.stringify({is_authenticated:is_authenticated,user:user})),c.fire()},window.loginUser=function(e,t){window.TVDialogs&&window.TVDialogs.signModal&&window.TVDialogs.signModal.close(),user=$.extend(!0,{},e),TradingView.changeLoginState(!0),
"function"==typeof t&&window.TVDialogs&&window.TVDialogs.signModal?window.TVDialogs.signModal.on("signinSuccess",function(){t()}):"function"==typeof t&&t()},TradingView.signOut=function(){var e=t.clone(window.user);$.ajax({type:"POST",url:"/accounts/logout/",dataType:"html"}).done(function(){TradingView.changeLoginState(!1),s.emit("signOut"),o()}).fail(function(){window.user=e,TradingView.changeLoginState(!0)})},window.loginRequiredDelegate=new e,window.runOrSignIn=function(e,t){t||(t={}),t.verifiedPhoneRequired,(is_authenticated||n.enabled("charting_library_base"))&&e()},TradingView.runOrGoPro=function(e,t,i){isProductFeatureEnabled(t)&&e()},window.onLoginStateChange=r,TradingView.isPro=function(){return is_authenticated&&user.is_pro},TradingView.setTrialAvailiable=function(e){TVLocalStorage.setItem("trial_availiable",e?1:0)},$.fn.reverse=[].reverse,$(window).load(function(){window.loaded=!0}),TradingView.notificationsChanged=new e}).call(this,i("aIyQ"),i("F/us"),i("Kxc7"))},me8f:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolBalloon";var r=t||n.createProperties();o.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("Hyqq").BalloonPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("tc+8"),s=i("Ocx9").DefaultProperty,a=i("hayr").propertyPages,l=window.t("Balloon");inherit(n,o),n.prototype.pointsCount=function(){return 1},n.prototype.title=function(){return l},n.prototype.name=function(){return"Balloon"},n.prototype.getStylesPropertyPage=function(){return a.LineToolBalloonStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("RhWr").BalloonDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.prototype.template=function(){var e=o.prototype.template.call(this);return e.text=this.properties().childs().text.value(),e},n.prototype._applyTemplateImpl=function(e){o.prototype._applyTemplateImpl.call(this,e),this.properties().childs().text.setValue(e.text)},n.createProperties=function(e){var t=new s("linetoolballoon",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e),e.hasChild("text")||e.addChild("text",new r(window.t("Comment"))),e.addExclusion("text")},t.LineToolBalloon=n},mf9N:function(e,t,i){"use strict";var n,o,r,s,a,l,c,u;i.r(t),n=i("Eyy1"),o=function(){function e(e,t){this._model=e,this._priceScale=t}return e.prototype.getMode=function(){var e=this._priceScale.properties();return e.percentage.value()?2:e.indexedTo100.value()?3:e.log.value()?1:0},e.prototype.setMode=function(e){this._priceScale.setMode({percentage:2===e,log:1===e,indexedTo100:3===e})},e.prototype.isInverted=function(){return this._priceScale.isInverted()},e.prototype.setInverted=function(e){this._priceScale.properties().isInverted.setValue(e)},e.prototype.getVisiblePriceRange=function(){return this._priceScale.priceRangeInPrice()},
e.prototype.setVisiblePriceRange=function(e){this._priceScale.setPriceRangeInPrice(e),this._model.lightUpdate()},e.prototype.hasMainSeries=function(){return this._priceScale.hasMainSeries()},e.prototype.getStudies=function(){return this._priceScale.getStudies().map(function(e){return e.id()})},e}(),r=i("96Yh"),s=i("ogJP"),a=i("mrSG"),l=i("RDU5"),c=function(e){function t(t,i,n){var o=e.call(this,"Change Pane Height")||this;return o._model=t,o._paneIndex=i,o._paneHeight=n,o._prevStretchFactors=o._model.panes().map(function(e){return e.stretchFactor()}),o}return Object(a.__extends)(t,e),t.prototype.redo=function(){this._model.changePanesHeight(this._paneIndex,this._paneHeight)},t.prototype.undo=function(){var e,t=this._model.panes();for(e=0;e<t.length;++e)t[e].setStretchFactor(Object(n.ensureDefined)(this._prevStretchFactors[e]));this._model.fullUpdate()},t}(l.UndoCommand),i.d(t,"PaneApi",function(){return u}),u=function(){function e(e,t){this._priceScales=new WeakMap,this._pane=e,this._chartWidget=t}return e.prototype.hasMainSeries=function(){return this._pane.containsMainSeries()},e.prototype.getLeftPriceScales=function(){return this._pane.leftPriceScales().map(this._getPriceScaleApi,this)},e.prototype.getRightPriceScales=function(){return this._pane.rightPriceScales().map(this._getPriceScaleApi,this)},e.prototype.getMainSourcePriceScale=function(){var e,t=this._pane.mainDataSource();return null===t?null:null===(e=t.priceScale())?null:this._pane.isOverlay(t)?null:this._getPriceScaleApi(e)},e.prototype.setMaximized=function(e){var t,i,n;if(this._pane.isMaximized()!==e)for(t=0,i=this._chartWidget.paneWidgets();t<i.length;t++)if((n=i[t]).state()===this._pane){this._chartWidget.toggleMaximizePane(n);break}},e.prototype.getAllEntities=function(){var e=this._pane.model();return this._pane.allOrderedSources().map(function(t){return Object(r.entityForDataSource)(e,t)}).filter(s.notNull).filter(function(e){return null!==e.name})},e.prototype.getHeight=function(){return this._pane.height()},e.prototype.setHeight=function(e){var t,i,o=this._chartWidget.model().model(),r=o.panes();Object(n.assert)(r.length>1,"Unable to change pane's height if there is only one pane"),t=r.indexOf(this._pane),Object(n.assert)(-1!==t,"Invalid pane index"),i=new c(o,t,e),this._chartWidget.model().undoHistory().pushUndoCommand(i)},e.prototype.moveTo=function(e){var t=this.paneIndex();t!==e&&(Object(n.assert)(e>=0&&e<this._chartWidget.paneWidgets().length,"Invalid pane index"),this._chartWidget.model().movePane(t,e))},e.prototype.paneIndex=function(){return this._chartWidget.model().model().panes().indexOf(this._pane)},e.prototype._getPriceScaleApi=function(e){var t=this._priceScales.get(e);return void 0===t&&(t=new o(this._chartWidget.model().model(),e),this._priceScales.set(e,t)),t},e}()},mkn5:function(e,t,i){"use strict";(function(t,n){function o(e,i,n){h.call(this,e,i,n),this.setCursorForTool(),this._mouseEventHandler=new j(this._topCanvas,this,{treatVertTouchDragAsPageScroll:!this._options.handleScroll.vertTouchDrag,
treatHorzTouchDragAsPageScroll:!this._options.handleScroll.horzTouchDrag}),this.actions=[],this.readonlyActions=[],this._onKeyUpListener=this._onKeyUpListener.bind(this),$(window).on("keyup.panewidget",this._onKeyUpListener),this._overlays={},this._contextMenuX=0,this._contextMenuY=0,this._lockDrawingsProperty=D.lockDrawings(),this._prevHoveredHittest=null,this._startChangeLineToolParams=null,this._chart.withModel(this,function(){var e=this._chartUndoModel();e.onSimpleZoomIn().subscribe(this,this._updateCrosshairOnZoom),e.onSimpleZoomOut().subscribe(this,this._updateCrosshairOnZoom)}),this._highlightedPriceAxis=new t(null),this._highlightedPriceAxis.subscribe(function(e){this._highlightPriceAxisByLabel(e)}.bind(this)),this._prevPinchScale=0,this._firstZoomPoint=null,this._isDestroyed=!1}var r,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P,C,T,x,I,L,M,A,k,E,O,D,V,B,R,N,F,W,j,U,z,H,Y,G,q,K,Z,J,X,Q,ee,te,ie,ne,oe,re,se,ae,le,ce,ue,he,de,pe,_e,fe,me,ye;i("AE9l"),i("YFKU"),r=i("aO4+"),s=r.Point,a=i("GVHu").Study,l=i("Qq0B").NonSeriesStudy,c=i("UCjq"),u=c.customizationSelectionEnabled,h=c.PaneWidgetBase,d=i("1IXQ").PriceAxisWidget,p=i("1IXQ").scaleRatioForContextMenuTransformer(7),_=i("OH2X").LineToolOrder,f=i("OH2X").LineToolPosition,m=i("Ss5c").LineDataSource,y=i("OH2X").LineToolBrush,g=i("CW80"),v=g.isLineToolName,S=i("PC8g").trackEvent,b=i("QloM").TabNames,w=i("YmeR").ActionBinder,i("d13A").makeTimeLimited,P=i("ogJP").isArray,C=i("Eyy1").ensureNotNull,T=i("KnF9").EnvironmentState,x=i("7ktv").PriceDataSource,I=i("7KDR"),L=I.Action,M=I.Separator,A=I.ActionAsync,k=i("/3z9"),E=i("L/Ed").ToolboxType,O=i("5VQP").ContextMenuManager,D=i("mMWL"),V=i("VdBB").HitTestResult,B=i("i1o5").InvalidateMask,R=i("i1o5").InvalidationLevel,N=i("FQhm"),F=i("ikwP"),W=F.clearRect,j=i("S8xo").MouseEventHandler,U=i("GVQo"),z=i("glKZ"),H=i("//lt").PaneCursorType,Y=i("uOxu").getLogger("Chart.PaneWidget"),G=i("kSsA").hasStylesPropertyPage,q=i("vTIA").CustomSourceLayer,K=i("Fixu").trackDrawingCreated,Z=i("Daqx").getPriceAxisNameInfo,J=i("qFKp").CheckMobile.any(),X=i("z61+").MetaInfoHelper,Q=["LineToolOrder","LineToolPosition","AlertLabel"],ee=window.t("Pinned To Scale {label} (Hidden)"),te=window.t("Pinned To Right Scale (Hidden)"),ie=window.t("Pin To Scale {label} (Hidden)"),ne=window.t("Pin To Right Scale (Hidden)"),oe=window.t("Pinned To Scale {label}"),re=window.t("Pinned To Right Scale"),se=window.t("Pin To Scale {label}"),ae=window.t("Pin To Right Scale"),le=window.t("Pinned To Left Scale (Hidden)"),ce=window.t("Pin To Left Scale (Hidden)"),ue=window.t("Pinned To Left Scale"),he=window.t("Pin To Left Scale"),de=window.t("Pin To New Left Scale"),pe=window.t("Pin To New Right Scale"),_e=window.t("Pin To Scale (Now {label})"),fe=window.t("Pin To Scale (Now No Scale)"),me=window.t("Pin To Scale (Now Left)"),ye=window.t("Pin To Scale (Now Right)"),inherit(o,h),o.prototype.destroy=function(){for(var e in h.prototype.destroy.call(this),$(window).off("keyup.panewidget",this._onKeyUpListener),this._prevHoveredHittest=null,this._mouseEventHandler.destroy(),
this._rowElement.parentElement.removeChild(this._rowElement),this)delete this[e];this._isDestroyed=!0},o.prototype._highlightPriceAxisByLabel=function(e){this._lhsPriceAxisesContainer.highlightPriceAxisByLabel(e),this._rhsPriceAxisesContainer.highlightPriceAxisByLabel(e)},o.prototype.cancelZoom=function(){this._chartModel().crossHairSource().clearSelection(),this._firstZoomPoint=null,this._preventCrossHairMove()&&this._clearCursorPosition()},o.prototype._onKeyUpListener=function(e){27===e.keyCode&&(this._chartUndoModel().lineBeingCreated()&&this._chartUndoModel().cancelCreatingLine(),null!==this._firstZoomPoint&&this.cancelZoom(),this._chartModel().crossHairSource().clearMeasure(),this.setCursorForTool())},o.prototype.backgroundColor=function(){return this._chart.properties().paneProperties.background.value()},o.prototype.chart=function(){return this._chart},o.prototype.stretchFactor=function(){return this._state?this._state._stretchFactor:0},o.prototype.setStretchFactor=function(e){this.hasState()&&(this._state._stretchFactor=e)},o.prototype.mouseEnterEvent=function(e){var t,i;this.hasState()&&(this._chartUndoModel().crossHairSource().visible=!0,"function"==typeof this.onMouseEnter&&this.onMouseEnter(this),t=e.localX,i=e.localY,TradingView.supportTouch()||this._setCursorPosition(t,i,new T(e)))},o.prototype._crossHairShouldBeVisible=function(){var e=this._chartModel().crossHairSource();return v(D.tool.value())||e.startMeasurePoint()&&!e.endMeasurePoint()||null!==this._firstZoomPoint||null!==this._chartModel().lineBeingEdited()||null!==this._chartModel().lineBeingCreated()},o.prototype._preventCrossHairMove=function(){return!!J&&(null===this._chart.trackingModePaneWidget()&&(!!this._contextMenuOpenedOnLastMouseDown||!this._crossHairShouldBeVisible()&&null===this._startTrackPoint))},o.prototype._trackingModeShouldBeActive=function(){return!(!J||this._contextMenuOpenedOnLastMouseDown||this._crossHairShouldBeVisible())&&this._longTap},o.prototype._setCursorPosition=function(e,t,i){this._chartUndoModel().setAndSaveCurrentPosition(this._correctXCoord(e),this._correctYCoord(t),this._state,i)},o.prototype._setCursorPositionOnExternalPane=function(e,t,i,n){t=this._externalPaneXCoord(e,t),i=this._externalPaneYCoord(e,i),this._chart.paneByState(e)._setCursorPosition(t,i,n)},o.prototype._preventScroll=function(){return J&&this._longTap||this._contextMenuOpenedOnLastMouseDown||v(D.tool.value())||this._chartUndoModel().lineBeingCreated()||null!==this._startTrackPoint},o.prototype.hideInplaceEditor=function(){return!!this._inplaceEditor&&(this._inplaceEditor.remove(),this._inplaceEditor=void 0,!0)},o.prototype._processMouseMoveWhileZoom=function(e,t){this._preventCrossHairMove()||this._setCursorPosition(e.localX,e.localY,t)},o.prototype._finishZoom=function(e){var t=this.state(),i=t.defaultPriceScale(),n=t.mainDataSource().firstValue(),o=i.coordinateToPrice(e.localY,n),r=this._chartUndoModel(),s=Math.round(r.timeScale().coordinateToIndex(e.localX))
;s!==this._firstZoomPoint.index&&r.zoomToViewport(this._firstZoomPoint.index,s,this._firstZoomPoint.price,o,t),this._chartModel().crossHairSource().clearSelection(),this._firstZoomPoint=null,D.resetToCursor(),this._preventCrossHairMove()&&this._clearCursorPosition()},o.prototype.checkMovepoint=function(e){return e===V.MOVEPOINT||e===V.MOVEPOINT_BACKGROUND&&TradingView.isMobile.any()},o.prototype._handleSelectionMouseDownAndGetJustDeselectedSource=function(e,t){var i,n=this._chartUndoModel(),o=null;return e&&!e.isCustom&&u(e.source)&&(i=e.hittest&&e.hittest.result()>V.MOVEPOINT_BACKGROUND,TradingView.isMobile.any()&&e.hittest&&e.hittest.result()===V.MOVEPOINT_BACKGROUND&&(i=!0),this._preventSourceChange&&(i=!1),n.selectionMacro(function(n){i?(t.control()||n.selection().isSelected(e.source)||n.clearSelection(),t.control()&&n.selection().isSelected(e.source)?(o=e.source,n.removeSourceFromSelection(e.source)):n.addSourceToSelection(e.source,e.hittest&&e.hittest.data()),n.selection().sources().length>1&&S("GUI","Multiselect","Click Select")):t.control()||n.clearSelection()})),o},o.prototype._tryStartChangingLineTool=function(e,t,i,n){var o,r,s;return null===this._startTrackPoint&&(!this._preventSourceChange&&t.hittest&&t.hittest.result()===V.CHANGEPOINT?(o=this._chartUndoModel(),r=this._state.mainDataSource().firstValue(),s=t.source.priceScale().coordinateToPrice(e.localY,r),o.selectionMacro(function(e){e.clearSelection(),e.addSourceToSelection(t.source)}),s=o.model().magnet().align(s,n,this._state),this._startChangeLineToolParams={source:t.source,startPoint:{index:n,price:s},screenPoint:{x:e.localX,y:e.localY},data:t.hittest.data(),envState:i},!0):(this._startChangeLineToolParams=null,!1))},o.prototype._tryHandleEraserMouseDown=function(e,t){var i,n,o;return!(!e.source||"eraser"!==D.tool.value()||(o=e.source,o&&o.customization&&o.customization.disableErasing)||(i=this._chartUndoModel(),!(e.source instanceof m||e.source instanceof a)))&&(n=e.hittest.eraseMarker(),t.control()&&void 0!==n&&e.source.processErase?e.source.processErase(i,n):i.removeSource(e.source),!0)},o.prototype._tryStartCloning=function(e,t,i,n){if(i.control()){var o=this._chartUndoModel().selection().sources().filter(function(e){return e.cloneable()});if(n&&n.cloneable()&&o.push(n),o.length>0)return this._clonningAtMoveLineTools=o,this._startCloningPoint=new s(e.localX,e.localY),!0}return!1},o.prototype.mouseDownEvent=function(e){var t,i,o,r,a,l,c,u,h,d,p,_,f,y,g;if(this._longTap=!1,this._contextMenuOpenedOnLastMouseDown=!1,this._exitTrackingModeOnNextTry=null!==this._startTrackPoint,this.hasState()&&(this._terminateActiveAnimations(),null!==(t=this._chart.trackingModePaneWidget())&&t!==this&&(i=this._chartModel().crossHairSource().currentPoint(),this._chart.exitTrackingMode(),this.startTrackingMode(new s(e.localX,e.localY),new s(i.x,e.localY),new T(e))),
document.activeElement!==document.body&&document.activeElement!==document.documentElement?document.activeElement&&document.activeElement.blur?document.activeElement.blur():document.body.focus():document.getSelection?document.getSelection().removeAllRanges():document.selection&&document.selection.clear(),N.emit("mouse_down",{clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY}),this._updateCommonTooltip(null),o=this._chartUndoModel(),r=new T(e),o.mainSeries().clearGotoDateResult(),this.hideInplaceEditor(),!((a=this._state.defaultPriceScale()).isEmpty()||o.timeScale().isEmpty()||(l=o.crossHairSource(),TradingView.supportTouch()&&"LineToolBrush"!==D.tool.value()||(null!==(u=null!==(c=o.lineBeingCreated())?o.paneForSource(c):null)&&u!==this._state?this._setCursorPositionOnExternalPane(u,e.localX,e.localY,r):this._setCursorPosition(e.localX,e.localY,r)),r.control()&&l.startMeasurePoint()&&(l.clearMeasure(),D.resetToCursor(!0)),h=this._state.mainDataSource().firstValue(),d=a.coordinateToPrice(e.localY,h),p=this._chartModel().timeScale().coordinateToIndex(e.localX),l.startMeasurePoint()&&l.endMeasurePoint()&&l.clearMeasure(),r.shift()&&D.toolIsCursor(D.tool.value())&&o.selection().isEmpty()&&D.tool.setValue("measure"),this._tryStartMeasure(e,l,r,d,p)||this._tryFinishMeasure(e,l)||this._tryFinishZoom(e)||this._tryStartZoom(e,d,p,r)))))if(null!==this._startTrackPoint&&(this._initCrossHairPosition=l.currentPoint(),this._startTrackPoint=new s(e.localX,e.localY)),_=this._dataSourceAtPoint(e.localX,e.localY),TradingView.supportTouch()&&(this._preventSourceChange=null===_.source||!o.selection().isSelected(_.source)),this._isSelectBarModeEnabled()||this._isScrolling||!v(D.tool.value())&&!o.lineBeingCreated()){if(_.hittest&&_.hittest.result()===V.CUSTOM&&(f=_.hittest.data().mouseDownHandler)&&f(e),!this._chart.readOnly()){if(_&&_.hittest&&_.hittest.result()===V.CUSTOM_MOVE&&(f=_.hittest.data().pressedMouseMoveHandler))return void(_.isCustom?f(e):o.startCustomMoving(_.source,new s(e.localX,e.localY),f));if(y=this._handleSelectionMouseDownAndGetJustDeselectedSource(_,r),this._tryHandleEraserMouseDown(_,r))return;if(g=_.source&&TradingView.isInherited(_.source.constructor,m)&&_.source.isLocked(),!(this._lockDrawingsProperty.value()||g)&&_&&!_.isCustom){if(_.source&&_.source.userEditEnabled&&!_.source.userEditEnabled())return;if(this._tryStartChangingLineTool(e,_,r,p))return;if(_.hittest&&this.checkMovepoint(_.hittest.result())){if(this._tryStartCloning(e,_,r,y))return;if(this._tryStartMovingLineTool(e,_,r,p))return}}if(_.source&&_.source instanceof x&&_.source.isDraggable())return void(this._chart.draggingSource=_.source)}_.hittest&&_.hittest.result()===V.REGULAR||(this._processing=!0)}else(!n.enabled("charting_library_base")||p>=0)&&(r.shift()||o.selectionMacro(function(e){e.clearSelection()}),this._mouseDownEventForLineTool(e,r,p,d))},o.prototype.drawRightThere=function(e){var t,i,n;v(e)&&(i=(t=this._chartUndoModel()).crossHairSource(),
n=t.model().magnet().align(i.price,i.index,this._state),t.createLineTool(this.state(),{index:i.index,price:n},e))},o.prototype._finishTool=function(e){var t,i=this._chartUndoModel(),n=D.tool.value();D.resetToCursor(),this._preventCrossHairMove()&&this._clearCursorPosition(),i.selectionMacro(function(t){t.addSourceToSelection(e)}),this._chart.isTextTool(n)&&(t=i.createUndoCheckpoint(),this._chart.showChartPropertiesForSource(e,null,null,t).then(function(e){e.focusOnText()})),K(e)},o.prototype._mouseDownEventForLineTool=function(e,t,i,n){var o,r,a,l,c,u,h,d,p,_,f,m,g,S;if(this.hasState()){if(o=this._chartUndoModel(),r=!1,a=null,l=e.localX,c=e.localY,u=o.model().crossHairSource(),h=D.tool.value(),D.hideAllDrawings().setValue(!1),D.lockDrawings().setValue(!1),TradingView.supportTouch()&&v(h)&&"LineToolBrush"!==h&&!o.lineBeingCreated()&&(this._startTouchPoint=new s(l,c),this._initCrossHairPosition=u.currentPoint()),!o.lineBeingCreated()||o.lineBeingCreated()instanceof y)TradingView.supportTouch()&&"LineToolBrush"!==h||(S={index:i,price:o.model().magnet().align(n,i,this._state)},a=o.createLineTool(this._state,S,h),o.lineBeingCreated()||(r=!0));else if(d=o.lineBeingCreated().ownerSource().firstValue(),TradingView.supportTouch()){if(!this._startTouchPoint)return this._startTouchPoint=new s(l,c),_=(p=o.lineBeingCreated().points())[p.length-1],f=o.timeScale().indexToCoordinate(_.index),n=_.price,m=o.lineBeingCreated().priceScale().priceToCoordinate(n,d),void(this._lastDrawingPoint=new s(f,m))}else a=o.lineBeingCreated(),(g=o.paneForSource(a))!==this._state?(l=this._externalPaneXCoord(g,e.localX),c=this._externalPaneYCoord(g,e.localY),n=a.priceScale().coordinateToPrice(c,d),i=Math.round(o.timeScale().coordinateToIndex(l)),r=o.coninueCreatingLine({index:i,price:n},t)):(n=o.model().magnet().align(n,i,this._state),r=o.coninueCreatingLine({index:i,price:n},t));a&&o.selectionMacro(function(e){e.addSourceToSelection(a)}),r&&(this._finishTool(a),e.preventDefault())}},o.prototype._equalsCursorCache=function(e,t){return D.toolIsCursor(e.tool)?e.tool===t.tool&&e.theme===t.theme&&e.crosshair===t.crosshair:e.tool===t.tool&&e.theme===t.theme},o.prototype._setCursorClassName=function(e){var t="";e&&(t="pane--cursor-"+e),this._currentCursorClassName!==t&&(this._currentCursorClassName&&this._paneCell.classList.remove(this._currentCursorClassName),t&&this._paneCell.classList.add(t),this._currentCursorClassName=t,this._paneCell.style.cursor)},o.prototype.setCursorForTool=function(e,t){var i,n=D.tool.value();if(t&&t.control()&&e)this._setCursorClassName("pointer");else{if(D.toolIsCursor(n)){if(this._chart.draggingSource||this._isScrolling||this._chartUndoModel()&&this._chartUndoModel().sourcesBeingMoved().length)return void this._setCursorClassName("grabbing");if(e&&this._options.sourceSelectionEnabled)return void this._setCursorClassName("pointer")}
"eraser"!==n?"zoom"!==n?"dot"!==(i=D.cursorTool.value())?"arrow"!==i?this._setCursorClassName(""):this._setCursorClassName("default"):this._setCursorClassName("dot"):this._setCursorClassName("zoom-in"):this._setCursorClassName("eraser")}},o.prototype.setDragToAnotherPaneCursor=function(){this._setCursorClassName("grabbing")},o.prototype._updateCommonTooltip=function(e){var t,i,n,o=this._lastCommonTooltipData,r=null;if(e&&e.hittest&&(t=e.hittest.data())&&(r=t.tooltip||null),null!=o||null!=r)return null==r||""===r.text?(this._lastCommonTooltipData=null,void z.hide()):void(o&&r.text===o.text&&r.rect.x===o.rect.x&&r.rect.y===o.rect.y&&r.rect.w===o.rect.w&&r.rect.h===o.rect.h||(this._lastCommonTooltipData=r,i=TradingView.clone(r),n=this._paneCell.getBoundingClientRect(),i.rect.x+=n.left,i.rect.y+=n.top,z.show(i)))},o.prototype._processMouseMoveForCustomHandler=function(e,t){var i,n,o,r=e.hittest&&e.hittest.result()===V.CUSTOM;!r||null!==this._prevHoveredHittest&&this._prevHoveredHittest.renderer===e.renderer||((i=e.hittest.data().mouseEnterHandler)&&i(t),this._prevHoveredHittest=e),r&&(n=e.hittest.data().mouseMoveHandler)&&n(t),null!==this._prevHoveredHittest&&this._prevHoveredHittest.renderer!==e.renderer&&((o=this._prevHoveredHittest.hittest.data().mouseLeaveHandler)&&o(t),this._prevHoveredHittest=null)},o.prototype.mouseMoveEvent=function(e){var t,i,n,o,r,s,a,l,c,h,d;if(this.hasState()&&(t=this._dataSourceAtPoint(e.localX,e.localY),this._processMouseMoveForCustomHandler(t,e),i=this._chartUndoModel()))if(n=e.localX,o=e.localY,r=new T(e),null===this._firstZoomPoint){if(s=!1,!(this._chart.readOnly()||this._editDialog&&this._editDialog.isVisible())&&(a=D.tool.value(),l=null,this._processing||!D.toolIsCursor(a)&&"eraser"!==a&&!r.control()&&i.lineBeingCreated()||(s=!!(c=t&&t.source)&&-1!==Q.indexOf(c.toolname),t.hittest&&t.hittest.result()>V.MOVEPOINT_BACKGROUND?(l=t.source,t.source&&u(t.source)&&("eraser"!==a||t.source.constructor!==TradingView.Series)?i.setHoveredSource(t.source,t.hittest.data()):i.setHoveredSource(null)):i.setHoveredSource(null)),this._options.sourceSelectionEnabled&&(this._isSelectBarModeEnabled()?this._setCursorClassName("pointer"):this.setCursorForTool(l,r)),this._updateCommonTooltip(t),null!==t&&null!==t.hittest&&t.hittest.result()===V.CUSTOM_MOVE))switch((t.hittest.data()||{}).cursorType){case H.VerticalResize:this._setCursorClassName("ns-resize")}this._preventCrossHairMove()&&this._clearCursorPosition(),i.crossHairSource().setLinesShouldBeHidden(s),this._chart.readOnly()&&this._options.sourceSelectionEnabled&&(null!==t.source&&u(t.source)?i.setHoveredSource(t.source,t.hittest.data()):i.setHoveredSource(null,null)),i.lineBeingCreated()&&(h=i.lineBeingCreated(),(d=i.paneForSource(h))!==this._state)?this._setCursorPositionOnExternalPane(d,n,o,r):(a=D.tool.value(),TradingView.supportTouch()||this._setCursorPosition(n,o,r))}else this._processMouseMoveWhileZoom(e,r)},o.prototype._startChangeOrMoveLineToolIfNeeded=function(){var e;null!==this._startChangeLineToolParams&&(e=this._startChangeLineToolParams,
this._chartUndoModel().startChangingLinetool(e.source,e.startPoint,e.data,e.envState)),null!==this._startMoveLineToolParams&&(e=this._startMoveLineToolParams,this._chartUndoModel().startMovingSources(e.source,e.startPoint,e.data,e.envState)),this._startMoveLineToolParams=null,this._startChangeLineToolParams=null},o.prototype.pressedMouseMoveEvent=function(e){var t,i,o,r,a,l,c,u,h,d,p,_,f,m,g,S,b,w,P,C,x,I,L,M,A,k,E,O,V,B,R,N,F;if(this.hasState()&&!this._pinching){if(this._startChangeOrMoveLineToolIfNeeded(),this._touchMove=!0,this._preventSourceChange=!1,t=new T(e),o=(i=this._chartUndoModel()).crossHairSource(),r=e.localX,a=e.localY,null!==this._firstZoomPoint)return this._processMouseMoveWhileZoom(e),void(this._firstZoomPoint.draggingMode=!0);if(!TradingView.supportTouch()&&"touchmove"!==e.type||!o.startMeasurePoint()){if(l=D.tool.value(),TradingView.supportTouch()&&this._startTouchPoint&&v(l)&&"LineToolBrush"!==l&&!i.lineBeingCreated()&&!this._isSelectBarModeEnabled())return this._chart.justActivated()&&(this._initCrossHairPosition=o.currentPoint()),c=this._initCrossHairPosition,u=new s(r,a).subtract(this._startTouchPoint),h=c.add(u),void this._setCursorPosition(h.x,h.y,t);if(!TradingView.supportTouch()||!i.lineBeingCreated()||i.lineBeingCreated()instanceof y){if(null!==this._startTrackPoint?(this._exitTrackingModeOnNextTry=!1,c=this._initCrossHairPosition,u=new s(r,a).subtract(this._startTrackPoint),h=c.add(u),this._setCursorPosition(h.x,h.y,t)):this._preventCrossHairMove()||this._setCursorPosition(r,a,t),S=D.tool.value(),b=this._isSelectBarModeEnabled(),!v(S)||"LineToolBrush"===l||b||t.control()){if("LineToolBrush"===S&&!b){if((w=this._state.defaultPriceScale()).isEmpty())return;if(!(P=i.lineBeingCreated()))return;return C=new s(e.localX,e.localY),x=P.ownerSource().firstValue(),C.price=w.coordinateToPrice(e.localY,x),C.index=Math.round(i.timeScale().coordinateToIndex(e.localX)),void((!n.enabled("charting_library_base")||C.index>=0)&&i.coninueCreatingLine(C))}if(this._chart.draggingSource&&(I=e.target,(L=this._chart.paneByCanvas(I))&&(L!==this?L.setDragToAnotherPaneCursor():L.setCursorForTool()),(M=this._chart.timeAxisByCanvas(I))&&M.setCursor("grabbing")),!i.timeScale().isEmpty()&&((A=this._options.handleScroll).pressedMouseMove&&"touch"!==e.type||(A.horzTouchDrag||A.vertTouchDrag)&&"mouse"!==e.type))if(i.customMoveBeingProcessed())i.processCustomMove(new s(r,a));else{if(i.lineBeingEdited())return k=Math.round(i.timeScale().coordinateToIndex(r)),(!n.enabled("charting_library_base")||k>=0)&&i.changeLinePoint({x:r,y:a},t),void this.setCursorForTool();if(E=this,!i.sourcesBeingMoved().length)return t.control()&&this._clonningAtMoveLineTools?(O=new s(e.localX,e.localY),void(this._startCloningPoint.subtract(O).length()>8&&(V=this._clonningAtMoveLineTools,B=this.cloneLineTools(V,!0),R=B.map(function(e){return i.model().dataSourceForId(e)}),i.selectionMacro(function(e){e.clearSelection(),R.forEach(function(t){e.addSourceToSelection(t)})}),N=new s(e.localX,e.localY),w=R[0].priceScale(),
x=this._state.mainDataSource().firstValue(),F={index:i.timeScale().coordinateToIndex(e.localX),price:w.coordinateToPrice(e.localY,x)},i.startMovingSources(R,{logical:F,screen:N},t),this._clonningAtMoveLineTools=null,this._startCloningPoint=null))):void(this._chart.readOnly()||!t.control()||v(D.tool.value())?(this._processScroll(e),this._preventScroll()&&!this._preventCrossHairMove()&&null===this._startTrackPoint&&this._setCursorPosition(e.localX,e.localY,new T(e))):this._isSelecting||(o.startSelection(this._state),this._isSelecting=!0));i.sourcesBeingMoved().forEach(function(o){var l,c,u,h,d,p,_=o.priceScale();_.isEmpty()||(l=(o.ownerSource()||E._state.mainDataSource()).firstValue(),c=i.timeScale().coordinateToIndex(e.localX),u=_.coordinateToPrice(e.localY,l),E.setCursorForTool(),n.enabled("charting_library_base")&&i.sourcesBeingMoved().some(function(e){return!e.onlyYMoving()})&&0!==(h=o.points()).length&&h.reduce(function(e,t){return t.index<e.index?t:e}).index-((o.startMovingPoint()||o.currentMovingPoint()).index-c)<0||(d=new s(r,a),p={index:c,price:u},i.moveSources({screen:d,logical:p},t)))})}}}else if(this._startTouchPoint){if(d=i.lineBeingCreated(),(p=i.paneForSource(d))!==this._state)return void this._setCursorPositionOnExternalPane(p,e.localX,e.localY,t);_=e.localX-this._startTouchPoint.x,f=e.localY-this._startTouchPoint.y,m=this._lastDrawingPoint.x+_,g=this._lastDrawingPoint.y+f,this._setCursorPosition(m,g,t)}}else this._setCursorPosition(r,a,t)}},o.prototype._processMouseUpForCustomHandler=function(e){var t,i=this._dataSourceAtPoint(e.localX,e.localY);i.hittest&&i.hittest.result()===V.CUSTOM&&(t=i.hittest.data().mouseUpHandler)&&t(e)},o.prototype.mouseUpEvent=function(e){var t,i,n,o,r,s,a,l,c,u,h,d,p,_,f,m,g,b,w,P,C,x,I,L,M,A,k,E;if(this.hasState()){if(t=null!==this._startTrackPoint,this._longTap=!1,this._startMoveLineToolParams=null,this._startChangeLineToolParams=null,this._processMouseUpForCustomHandler(e),this._clonningAtMoveLineTools=null,i=this,delete this._isSelecting,(o=(n=this._chartUndoModel()).model().crossHairSource()).selection()&&null===this._firstZoomPoint&&(r=this._state.lineToolsForArea(o.selection()),n.selectionMacro(function(e){r.forEach(function(t){e.addSourceToSelection(t)})}),o.clearSelection(),S("GUI","Multiselect","Area Select")),N.emit("mouse_up",{clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY}),s=this._touchMove,delete this._touchMove,a=new T(e),l=D.tool.value(),TradingView.supportTouch()&&!s&&"LineToolBrush"!==l&&v(l)&&!n.lineBeingCreated()){if(this._chart.justActivated())return;return o.pane!==this._state?void this._setCursorPosition(e.localX,e.localY,a):(c=o.currentPoint(),u=this._state.defaultPriceScale(),h=this._state.mainDataSource().firstValue(),d=u.coordinateToPrice(c.y,h),_={index:p=Math.round(n.timeScale().coordinateToIndex(c.x)),price:d},f=n.createLineTool(this._state,_,l),n.selectionMacro(function(e){e.addSourceToSelection(f)}),n.lineBeingCreated()||(this._finishTool(f),e.preventDefault()),
void delete this._startTouchPoint)}if(n.lineBeingCreated()&&!(n.lineBeingCreated()instanceof y)&&this._startTouchPoint)return m=!1,delete this._startTouchPoint,s||(d=(g=(f=n.lineBeingCreated()).points()[f.points().length-1]).price,m=n.coninueCreatingLine({index:g.index,price:d},new T(e)),delete this._lastDrawingPoint),void(m&&(this._finishTool(f),e.preventDefault()));if(null!==this._firstZoomPoint&&this._firstZoomPoint.draggingMode)this._finishZoom(e);else if(!TradingView.supportTouch()&&"touchend"!==e.type||!this._tryFinishMeasure(e,o)){if(this._processing=!1,n.customMoveBeingProcessed()&&n.endCustomMoving(),n.lineBeingEdited())return n.endChangingLinetool(),void(this._preventCrossHairMove()&&this._clearCursorPosition());if("LineToolBrush"===l&&!this._isSelectBarModeEnabled()){if(null!==(b=n.lineBeingCreated())&&K(b),n.finishLineTool(),(u=this._state.defaultPriceScale()).isEmpty())return;if(!b)return;return h=b.ownerSource().firstValue(),d=u.coordinateToPrice(e.localY,h),p=Math.round(n.timeScale().coordinateToIndex(e.localX)),void n.coninueCreatingLine({index:p,price:d})}if(n.sourcesBeingMoved().length)return n.endMovingSource(),n.sourcesBeingMoved().forEach(function(e){i.setCursorForTool(e)}),void n.invalidate(B.cursor());if(this._chart.readOnly()||(w=this._dataSourceAtPoint(e.localX,e.localY),P=e.localX>=0&&e.localX<this._size.w,w&&w.source===o||!P||(C=n.timeScale().coordinateToIndex(e.localX),n.model().onSyncScrollNeeded(C))),x=this._endScroll(e),this._chart.draggingSource)for(I=e.target,(L=this._chart.paneByCanvas(I))&&L!==this&&(x&&n.undoHistory().undo(),n.mergeToPane(this._chart.draggingSource,L._state)),this._chart.timeAxisByCanvas(I)&&(x&&n.undoHistory().undo(),n.unmergeToNewBottomPane(this._chart.draggingSource)),this._chart.draggingSource=null,(M=this._chart.getTimeScale())&&M.restoreDefaultCursor(),w=this._dataSourceAtPoint(e.localX,e.localY),A=this._chart.paneWidgets(),k=0;k<A.length;k++)(E=A[k])===this&&w?E.setCursorForTool(w.source):E.setCursorForTool(),E._lhsPriceAxisesContainer.restoreDefaultCursor(),E._rhsPriceAxisesContainer.restoreDefaultCursor();this._preventSourceChange&&!t&&(w=this._dataSourceAtPoint(e.localX,e.localY)).source&&n.selectionMacro(function(e){e.addSourceToSelection(w.source)}),delete this._touchMove}}},o.prototype.mouseLeaveEvent=function(e){var t,i;this.hasState()&&(t=this._chartUndoModel())&&(TradingView.isMobile.any()||this._clearCursorPosition(),t.setHoveredSource(null),null!==this._prevHoveredHittest&&((i=this._prevHoveredHittest.hittest.data().mouseLeaveHandler)&&i(e),this._prevHoveredHittest=null),this._updateCommonTooltip(null),"function"==typeof this.onMouseLeave&&this.onMouseLeave(this))},o.prototype.showEditDialogForSource=function(e){if(this._options.propertyPagesEnabled&&(!e.userEditEnabled||e.userEditEnabled()))if(e===this._chartUndoModel().mainSeries())this._chart.showGeneralChartProperties(b.style);else{var t=this;this._chart.showChartPropertiesForSource(e).then(function(e){t._editDialog=e})}},o.prototype.processDoubleClickOnSource=function(e){
this.showEditDialogForSource(e)},o.prototype.mouseDoubleClickEvent=function(e){var t,i,n;this.hasState()&&((i=(t=!this._chart.readOnly()&&!v(D.tool.value())&&this._dataSourceAtPoint(e.localX,e.localY))&&t.hittest&&t.source)&&t.hittest.result()<=V.MOVEPOINT_BACKGROUND&&!TradingView.isMobile.any()&&(i=null),i&&!u(i)&&(i=null),t.isCustom?t.hittest.result()===V.CUSTOM&&void 0!==(n=t.hittest.data().mouseDoubleClickHandler)&&n(e):i?this.processDoubleClickOnSource(i):this._chart.readOnly()||v(D.tool.value())||this._chartUndoModel().lineBeingCreated()||!this._chartUndoModel().selection().isEmpty()||this._chart.toggleMaximizePane(this))},o.prototype.showContextMenuForSources=function(e,t){if(!e.length)return Promise.resolve(null);var i=e[0];return i.constructor===TradingView.Series?this._seriesContextMenu(i).then(function(e){return e.show(t),e}):TradingView.isInherited(i.constructor,a)?this._studyContextMenu(i).then(function(e){return e.show(t),e}):TradingView.isInherited(i.constructor,_)||TradingView.isInherited(i.constructor,f)?this._tradingDrawingsContextMenu(i).then(function(e){return e.show(t),e}):TradingView.isInherited(i.constructor,m)?this._lineContextMenu(e).then(function(e){return e.show(t),e}):(i===this._chartUndoModel().crossHairSource()&&i.handleContextMenuEvent(t),Promise.resolve(null))},o.prototype.showContextMenuForSelection=function(e){var t,i=this._chartUndoModel().selection();i.isEmpty()||(t=i.sources().filter(function(e){return e.hasContextMenu()}),this.showContextMenuForSources(t,e))},o.prototype.longTapEvent=function(e){this._longTap=!0,null===this._startTrackPoint&&this._trackingModeShouldBeActive()&&this.startTrackingMode(new s(e.localX,e.localY),new s(e.localX,e.localY),new T(e))},o.prototype.startTrackingMode=function(e,t,i){this._startChangeLineToolParams=null,this._startMoveLineToolParams=null,this._chartUndoModel().selectionMacro(function(e){e.clearSelection()}),this._startTrackPoint=e,this._exitTrackingModeOnNextTry=!1,this._setCursorPosition(t.x,t.y,i),this._initCrossHairPosition=this._chartModel().crossHairSource().currentPoint()},o.prototype.contextMenuEvent=function(e){var t,i,n,o,r,s,a,l=this._chartUndoModel();if(!l.crossHairSource().startMeasurePoint()||J){if(!this._pinching&&(null===this._firstZoomPoint||J||this.cancelZoom(),!this.hideInplaceEditor())){if(!D.toolIsCursor(D.tool.value())&&!this._isSelectBarModeEnabled()){if(TradingView.isMobile.any())return;return D.resetToCursor(!0),this.setCursorForTool(),void(l.lineBeingCreated()&&l.cancelCreatingLine())}if(this._options.contextMenuEnabled){if(t=this._dataSourceAtPoint(e.localX,e.localY),i=t?t.source:null,null!==this._startTrackPoint){if(this._preventSourceChange)return;this._clearCursorPosition()}this._contextMenuOpenedOnLastMouseDown=!0,this._contextMenuX=e.localX,this._contextMenuY=e.localY,n=t&&t.hittest?t.hittest.result():0,o=n>=V.REGULAR||n>=V.MOVEPOINT_BACKGROUND&&TradingView.isMobile.any(),t.isCustom?o&&t.hittest.result()===V.CUSTOM&&void 0!==(r=t.hittest.data().contextMenuHandler)&&r(e):(this._chart.updateActions(),s=!1,a=this,
l.selectionMacro(function(t){null!==i&&o?(t.selection().isSelected(i)||(t.clearSelection(),t.addSourceToSelection(i)),s=i.hasContextMenu()):(a._contextMenu(e).then(function(t){t.show(e)}),t.clearSelection())}),s&&(u(i)?a.showContextMenuForSelection(e):a.showContextMenuForSources([i],e)),this.paint())}}}else l.crossHairSource().clearMeasure()},o.prototype._contextMenu=function(e){function t(e){return e instanceof M}var i,n,o=this,r=this._initActions(e),s=o._customActions();for(r=r.filter(function(e){return null!==e}),s.remove.forEach(function(e){for(var t=0;t<r.length;t++)if(r[t]instanceof L&&r[t].getLabel()===e){r.splice(t,1);break}}),n=(i=s.top.concat(r).concat(s.bottom)).length-1;n>0;n--)t(i[n])&&t(i[n-1])&&i.splice(n,1);return i.length&&t(i[0])&&i.splice(0,1),i.length&&t(i[i.length-1])&&i.splice(i.length-1,1),O.createMenu(i,{statName:"ChartContextMenu"})},o.prototype.createRemoveMenu=function(){var e=this._chart.actions();return new L({label:window.t("Remove"),statName:"Remove",subItems:[e.paneRemoveAllStudies,e.paneRemoveAllDrawingTools,e.paneRemoveAllStudiesDrawingTools]})},o.prototype._initActions=function(e){var t,i,o,r=this,s=this._chart.actions(),a=[];return n.enabled("datasource_copypaste")&&(i=(((t=U.get())||{}).sources||[]).filter(function(e){return"study"===e.type||"drawing"===e.type}),t&&i.length&&(o=new L({label:window.t("Paste %s").replace("%s",window.t(t.title||t.type)),shortcutHint:k.humanReadableHash(k.Modifiers.Mod+86),statName:"Paste",onExecute:function(){r._chart.onAppClipboardPaste(r.state())}}),a.push(o))),a.length&&a.push(new M),a.push(s.chartReset),a.push(new M),a[a.length-1]instanceof M||a.push(new M),window.widgetbar&&(!window.widgetbar._customization||window.widgetbar._customization.watchlist)&&s.addToWatchlist&&a.push(s.addToWatchlist),n.enabled("text_notes")&&a.push(s.addToTextNotes),a[a.length-1]instanceof M||a.push(new M),a.push(this._createLockTimeAxisAction(e)),a.push(new M),a.push(s.paneObjectTree),n.enabled("charting_library_base")||a.push(s.applyColorTheme),a[a.length-1]instanceof M||a.push(new M),a.push(s.paneRemoveAllDrawingTools),a.push(s.paneRemoveAllStudies),a.push(new M),pro.hasPackage("mtp-mtpredictor")&&this.state().containsMainSeries()&&a.push(this._createMTPredictorActions(),new M),a.push(s.hideAllMarks),a.push(new M),n.enabled("show_chart_property_page")&&a.push(s.chartProperties),a[a.length-1]instanceof M&&a.pop(),a},o.prototype._customActions=function(){var e,t,i,o={top:[],bottom:[],remove:[]},r=this._chartUndoModel(),s=r.timeScale(),a=this._state&&this._state.defaultPriceScale();return n.enabled("custom_items_in_context_menu")?(e=s.isEmpty()?void 0:s.indexToUserTime(s.coordinateToIndex(this._contextMenuX)),a&&!a.isEmpty()&&(i=this._state.mainDataSource().firstValue(),t=a.coordinateToPrice(this._contextMenuY,i)),N.emit("onContextMenu",{unixtime:e?e/1e3:void 0,price:t,callback:function(e){[].concat(e).forEach(function(e){var t;e.text&&(e.text.length>1&&"-"===e.text[0]?o.remove.push(e.text.slice(1)):(t="-"===e.text?new M:new L({label:e.text,onExecute:e.click}),
e.position&&"top"===e.position?o.top.push(t):o.bottom.push(t)))})}}),o):o},o.prototype._timeAxisMenu=function(){if(this._chartUndoModel().timeScale().isEmpty())return null;var e=this._chart.getTimeScale();return new L({label:window.t("Time Scale"),subItems:e.getContextMenuActions(),statName:"TimeScale"})},o.prototype._seriesContextMenu=function(e){var t,i=this._chart.actions(),o=e.properties().visible.value(),r=[];return this._chart.readOnly()?(r=[o?this.createActionHide(e):this.createActionShow(e),new M]).push(this._createActionScale(e)):(!r.length||r[r.length-1]instanceof M||r.push(new M),n.enabled("symbol_info")&&r.push(i.showSymbolInfoDialog),!r.length||r[r.length-1]instanceof M||r.push(new M),r.push(this.createVisualOrderAction(e)),(t=this._createActionMove(e))&&r.push(t),r.push(this._createActionScale(e)),r.push(o?this.createActionHide(e):this.createActionShow(e)),r.push(new M),r.push(i.showPriceLine),r.push(new M),window.widgetbar&&(!window.widgetbar._customization||window.widgetbar._customization.watchlist)&&i.addToWatchlist&&r.push(i.addToWatchlist),n.enabled("text_notes")&&r.push(i.addToTextNotes),r[r.length-1]instanceof M||r.push(new M),pro.hasPackage("mtp-mtpredictor")&&r.push(this._createMTPredictorActions(),new M),r[r.length-1]instanceof M&&r.pop()),O.createMenu(r)},o.prototype._createActionScaleDetach=function(e,t,i,n){var o,r,s,a,l,c,u,h,d;return this.state().canCreateNewPriceScale()?(o=e.priceScale().canDetachSource(e),r=this._state.priceScalePosition(e.priceScale()),(s=o||r!==t)?(a=this._chartModel().priceScaleSlotsCount(),l={left:{labelled:se,sided:de},right:{labelled:se,sided:pe}},c="left"===t?this._state.leftPriceScales().length:this._state.rightPriceScales().length,u=a[t]>c?"labelled":"sided",h=Z(t,c).label,d=l[t][u].format({label:h}),new L({checkable:!1,disabled:!s,label:d,statName:n,payload:e,onExecute:i})):null):null},o.prototype._createActionScaleDetachLeft=function(e){return this._createActionScaleDetach(e,"left",o.prototype.onDetachLeft.bind(this),"ToggleScaleLeft")},o.prototype._createActionScaleDetachRight=function(e){return this._createActionScaleDetach(e,"right",o.prototype.onDetachRight.bind(this),"ToggleScaleRight")},o.prototype._createActionNoScale=function(e){var t=this._chartUndoModel().paneForSource(e),i=t.actionNoScaleIsEnabled(e);return new L({checkable:!0,checked:this.state().isOverlay(e),label:window.t("No Scale (Fullscreen)"),disabled:!i,statName:"ToggleNoScale",payload:e,onExecute:o.prototype.onNoScale.bind(this)})},o.prototype._createMoveToScaleAction=function(e,t,i,n){var r=e.priceScale()===t;return new L({checkable:!0,checked:r,label:i,statName:"ToggleScale",payload:{datasource:e,priceScale:t,undoText:n},onExecute:o.prototype.onMoveToScale.bind(this)})},o.prototype.createActionScaleItems=function(e){
var t,i,n=[],o=this._chartModel().priceScaleSlotsCount(),r=o.totallySlots>1,s=this._state.rightPriceScales(),a=this._state.leftPriceScales(),l=this._createActionScaleDetachRight(e),c=this._createActionScaleDetachLeft(e),u=s.length+a.length+(null===l?0:1)+(null===c?0:1),h=u>2,d={right:{hidden:{checked:{labelled:ee,sided:te},unchecked:{labelled:ie,sided:ne}},visible:{checked:{labelled:oe,sided:re},unchecked:{labelled:se,sided:ae}}},left:{hidden:{checked:{labelled:ee,sided:le},unchecked:{labelled:ie,sided:ce}},visible:{checked:{labelled:oe,sided:ue},unchecked:{labelled:se,sided:he}}}},p={left:this._state.visibleLeftPriceScales(),right:this._state.visibleRightPriceScales()},_=function(t,i){var n="right"===i?s:a,o=n[t],l=p[i].includes(o)?"visible":"hidden",c=e.priceScale()===o?"checked":"unchecked",u=r?"labelled":"sided",h=d[i],_={labelled:h.visible.unchecked.labelled,sided:h.visible.unchecked.sided},f=Z(i,t).label,m=h[l][c][u].format({label:f}),y=_[u].format({label:f});return{actionText:m,undoText:y}};for(t=0;t<s.length;t++)i=_(t,"right"),n.push(this._createMoveToScaleAction(e,s[t],i.actionText,i.undoText));for(null!==l&&n.push(l),h&&(s.length>0||null!==l)&&n.push(new M),t=0;t<a.length;t++)i=_(t,"left"),n.push(this._createMoveToScaleAction(e,a[t],i.actionText,i.undoText));return null!==c&&n.push(c),h&&(a.length>0||null!==c)&&n.push(new M),n.push(this._createActionNoScale(e)),n},o.prototype._createActionScale=function(e){var t=e.priceScale(),n=this._state.priceScalePosition(t),o="left"===n?this._state.leftPriceScales():this._state.rightPriceScales(),r=o.indexOf(t),s=this._chartModel().priceScaleSlotsCount(),a=s.totallySlots<2?"dontneedname":"needname",l=Z(n,r).label,c=_e.format({label:l}),u=fe,h={"left-needname":c,"left-dontneedname":me,"right-needname":c,"right-dontneedname":ye,"overlay-needname":u,"overlay-dontneedname":u},d=n+"-"+a,p=h[d];return new L({label:p,icon:i("/kal"),subItems:this.createActionScaleItems(e)})},o.prototype.toggleLockTimeAxis=function(e,t){var i,n,o;"boolean"!=typeof t&&(t=!D.lockTimeAxis().value()),t&&(n=(i=this._chartUndoModel().timeScale()).coordinateToIndex(e),o=i.points().roughTime(n),D.lockTimeAxisTime.setValue(o)),D.lockTimeAxis().setValue(t)},o.prototype._createLockTimeAxisAction=function(e){var t=D.lockTimeAxis().value();return new L({label:window.t("Lock Vertical Line On Time Axis"),statName:"ToggleLockCursorInTime",checkable:!0,checked:t,onExecute:this.toggleLockTimeAxis.bind(this,e.localX,!t)})},o.prototype._createHVLineAction=function(e,t){var i=this;return new L({label:"vertical"===(t="vertical"===t?"vertical":"horizontal")?window.t("Create Vertical Line"):window.t("Create Horizontal Line"),statName:"vertical"===t?"CreateVerticalLine":"CreateHorizontalLine",onExecute:function(){var n=C(i._state),o=n.mainDataSource().firstValue(),r=i._chartUndoModel().timeScale().coordinateToIndex(e.localX),s=n.defaultPriceScale().coordinateToPrice(e.localY,o),a=i._chartUndoModel().createLineTool(n,{index:r,price:s},"vertical"===t?"LineToolVertLine":"LineToolHorzLine");i._finishTool(a)}})},
o.prototype._createMTPredictorActions=function(){var e=this,t=function(t,i,n){return new L({label:t,onExecute:function(){var t,o,r,s=e._chartUndoModel(),a=s.timeScale(),l=C(e._state),c=l.defaultPriceScale();a.isEmpty()||c.isEmpty()||(n?(t=l.mainDataSource().firstValue(),o=c.coordinateToPrice(e._contextMenuY,t),r=Math.round(a.coordinateToIndex(e._contextMenuX)),s.createLineTool(l,{index:r,price:o},i)):D.tool.setValue(i))}})};return new L({label:window.t("MTPredictor"),subItems:[t(window.t("Apply Manual Risk/Reward"),"LineStudyMtpRiskReward",!1),t(window.t("Apply Manual Decision Point"),"LineStudyMtpDecisionPoint",!0),t(window.t("Analyze Trade Setup"),"LineStudyMtpAnalysis",!0),new L({label:window.t("Apply Elliott Wave"),subItems:[t(window.t("Apply Elliott Wave Intermediate"),"LineStudyMtpElliotWaveMain",!0),t(window.t("Apply Elliott Wave Major"),"LineStudyMtpElliotWaveMajor",!0),t(window.t("Apply Elliott Wave Minor"),"LineStudyMtpElliotWaveMinor",!0)]}),new L({label:window.t("Apply WPT Up Wave"),subItems:[t(window.t("Up Wave 1 or A"),"LineStudyMtpUpWave1OrA",!1),t(window.t("Up Wave 2 or B"),"LineStudyMtpUpWave2OrB",!1),t(window.t("Up Wave C"),"LineStudyMtpUpWaveC",!1),t(window.t("Up Wave 3"),"LineStudyMtpUpWave3",!1),t(window.t("Up Wave 4"),"LineStudyMtpUpWave4",!1),t(window.t("Up Wave 5"),"LineStudyMtpUpWave5",!1)]}),new L({label:window.t("Apply WPT Down Wave"),subItems:[t(window.t("Down Wave 1 or A"),"LineStudyMtpDownWave1OrA",!1),t(window.t("Down Wave 2 or B"),"LineStudyMtpDownWave2OrB",!1),t(window.t("Down Wave C"),"LineStudyMtpDownWaveC",!1),t(window.t("Down Wave 3"),"LineStudyMtpDownWave3",!1),t(window.t("Down Wave 4"),"LineStudyMtpDownWave4",!1),t(window.t("Down Wave 5"),"LineStudyMtpDownWave5",!1)]})]})},o.prototype.createEarningsShow=function(e){var t=this,i=this._chartUndoModel().mainSeries().properties().esdShowEarnings;return new L({label:window.t("Show Earnings"),checkable:!0,checked:i.value(),statName:"ToggleShowEarnings",onExecute:function(e){t._chartUndoModel().setProperty(i,e.isChecked(),"Show Earnings")}})},o.prototype.createDividendsShow=function(e){var t=this,i=this._chartUndoModel().mainSeries().properties().esdShowDividends;return new L({label:window.t("Show Dividends"),checkable:!0,checked:i.value(),statName:"ToggleShowDividends",onExecute:function(e){t._chartUndoModel().setProperty(i,e.isChecked(),"Show Dividends")}})},o.prototype.createSplitsShow=function(e){var t=this,i=this._chartUndoModel().mainSeries().properties().esdShowSplits;return new L({checkable:!0,label:window.t("Show Splits"),checked:i.value(),statName:"ToggleShowSplits",onExecute:function(e){t._chartUndoModel().setProperty(i,e.isChecked(),"Show Splits")}})},o.prototype._studyEsdContextMenu=function(e){var t=[];return this._chart.readOnly()||t.push(this.createDividendsShow(e),this.createSplitsShow(e),this.createEarningsShow(e)),O.createMenu(t)},o.prototype._studyContextMenu=function(e){var t,i,o,r=this,s=this._chart.actions(),a=e.properties().visible.value(),c=[]
;return e.userEditEnabled()?(this._chart.readOnly()?(c=[a?this.createActionHide(e):this.createActionShow(e),new M],TradingView.isInherited(e.constructor,l)||c.push(this._createActionScale(e))):(n.enabled("study_on_study")&&e.canHaveChildren()&&c.push(this.createActionAddChildStudy(e)),!c.length||c[c.length-1]instanceof M||c.push(new M),c.push(this.createVisualOrderAction(e)),TradingView.isInherited(e.constructor,l)||((t=this._createActionMove(e))&&c.push(t),c.push(this._createActionScale(e))),c.push(new M),(i=e.metaInfo()).pine&&s.viewSourceCode&&(c.push(s.viewSourceCode),s.viewSourceCode.update({disabled:!1}),ScriptLib.isAuthToGetPineSourceCode(i.scriptIdPart,i.pine.version).done(function(e){e||s.viewSourceCode.update({disabled:!0})}).fail(function(e){Y.logError("Failed isAuthToGetPineSourceCode, reason: "+e)})),c[c.length-1]instanceof M||c.push(new M),e.copiable()&&(o=new L({label:window.t("Copy"),shortcutHint:k.humanReadableHash(k.Modifiers.Mod+67),statName:"Copy",onExecute:function(){r._chart.onAppClipboardCopy([e])}}),c.push(o)),c.push(a?this.createActionHide(e):this.createActionShow(e)),c.push(this.createActionRemove(e)),c.push(new M),n.enabled("property_pages")&&new X(i).hasUserEditableOptions()&&c.push(this.createActionShowProperties(e)),c[c.length-1]instanceof M&&c.pop()),O.createMenu(c,{statName:"StudyContextMenu"})):O.createMenu(c)},o.prototype.createLineToolTemplateAction=function(e){var t=this;return window.lineToolPropertiesToolbar&&window.lineToolPropertiesToolbar.templatesList()?new A(function(){var i,n=window.lineToolPropertiesToolbar.templatesList(),o=[],r=new L({label:window.t("Save As..."),statName:"SaveAs",onExecute:function(){n.showSaveDialog(function(t){var i=JSON.stringify(e.template());n.saveTemplate(t,i)})}});return o.push(r),i=new L({label:window.t("Apply Default"),statName:"ApplyDefault",onExecute:function(){t._chartUndoModel().restorePropertiesForSource(e),window.lineToolPropertiesToolbar.onSourceChanged(e)}}),o.push(i),new Promise(function(e){n.templatesLoaded().then(function(){var e=n.getData();e.length&&o.push(new M),$.each(e,function(e,t){var i=new L({label:t,statName:"ApplyTemplate",onExecute:function(){n.loadTemplate(t)},toolbox:{type:E.Delete,action:function(){n.deleteAction(t)}},showToolboxOnHover:!0});o.push(i)})},function(e){Y.logWarn(e)}).then(function(){e({label:window.t("Template"),statName:"Template",subItems:o})})})}):null},o.prototype._createActionToggleLockObject=function(e){var t=e.properties().frozen.value();return new L({label:t?window.t("Unlock"):window.t("Lock"),statName:"ToggleLockSelectedObject",chackable:!0,icon:i(t?"fs3R":"qckB"),onExecute:this._chart.toggleLockSelectedObject.bind(this._chart)})},o.prototype._lineContextMenu=function(e){var t,r,s,a,l,c=[],u=this._chart,h=u.actions(),d=this,p=function(){c.push(d.createVisualOrderAction(e))},_=function(){var t,n=e.filter(function(e){return e.cloneable()});return n.length&&(t=new L({label:window.t("Clone"),callbackContext:{target:n},icon:i("K8V9"),shortcutHint:k.humanReadableHash(k.Modifiers.Mod)+"Drag",
doNotBindShortcut:!0,statName:"Clone",onExecute:o.prototype.cloneLineTools.bind(d,n,!1)}),c.push(t)),!!n.length},f=function(){var t,i=e.filter(function(e){return e.copiable()});return i.length&&(t=new L({label:window.t("Copy"),shortcutHint:k.humanReadableHash(k.Modifiers.Mod+67),statName:"Copy",onExecute:function(){u.onAppClipboardCopy(i)}}),c.push(t)),!!i.length},m=function(){if(n.enabled("support_multicharts")&&u.isMultipleLayout()){var t=new L({label:window.t("Sync To All Charts"),statName:"SyncDrawingToAllCharts",checkable:!0,checked:Boolean(e.some(function(e){return!!e.linkKey})),onExecute:function(e){var t;u.chartWidgetCollection()&&(t=u.chartWidgetCollection().activeChartWidget.value()),t||(t=u),e.isChecked()?t.copyLineToOtherCharts():t.unlinkSelectedLine()}});return c.push(t),!0}return!1};if(1===e.length){if(t=e[0],u.readOnly())c.push(h.lineHide);else if(t.userEditEnabled()&&(n.enabled("alerts")&&!d.chart().onWidget()&&t.hasAlert.value()&&(c.push(d._createEditAlertDrawingAction(t)),c.push(new M)),n.enabled("charting_library_base")||null!==(r=d.createLineToolTemplateAction(t))&&c.push(r),p(),c.push(h.paneObjectTree),c.push(new M),s=_(),s=f()||s,(s=m(t)||s)&&c.push(new M),c.push(this._createActionToggleLockObject(t)),c.push(h.lineHide),c.push(h.lineRemove),c.push(new M),n.enabled("property_pages")&&G(t,u.model())&&c.push(h.format),t.additionalActions))for(c.push(new M),a=t.additionalActions(u.model()),l=0;l<a.length;l++)c.push(a[l])}else c.push(h.paneObjectTree),p(),c.push(new M),_(),f(),m(),c.push(new M),c.push(h.lineHide),c.push(h.lineRemove);return O.createMenu(c,{statName:"LineContextMenu"})},o.prototype._tradingDrawingsContextMenu=function(e){return O.createMenu(e.contextMenuItems())},o.prototype._chartEventsContextMenu=function(e){var t,i,o,r=[];return n.enabled("property_pages")&&(t=this._chart,i=new L({label:window.t("Format..."),statName:"Format",onExecute:function(){t.showGeneralChartProperties(b.eventsAndAlerts)}}),r.push(i)),o=new L({label:window.t("Hide Events on Chart"),statName:"HideEvents",onExecute:function(){e.properties().visible.setValue(!1)}}),r.push(o),O.createMenu(r)},o.prototype._createAlertToggleHorzLineLabelAction=function(e){var t=this,i=getGlobalAlertSettingsProperty().line.visible;return new L({checkable:!0,label:window.t("Extend Alert Lines"),checked:i.value(),statName:"ToggleExtendAlertLine",onExecute:function(){var e=i.value()?window.t("Hide alert label lines"):window.t("Show alert label lines");t._chartUndoModel().setProperty(i,!i.value(),e)}})},o.prototype.cloneLineTools=function(e,t){return this._chartUndoModel().cloneLineTools(e,t)},o.prototype.setPriceAxisSizes=function(e,t,i){this._priceAxisesContainer(e).setSizes(t,i)},o.prototype.drawBackground=function(e,t){W(e,0,0,this._size.w,this._size.h,t)},o.prototype.drawGrid=function(e){var t,i,n=this.state(),o=this._chartUndoModel().gridSource(),r=o.paneViews(n),s=n.height(),a=n.width();for(t=0;t<r.length;t++)e.save(),(i=r[t].renderer(s,a))&&i.draw(e),e.restore()},o.prototype.drawWatermark=function(e){
var t,i,n,o,r,s,a=this._chartUndoModel().watermarkSource();if(null!==a&&(t=this.state()).containsMainSeries())for(i=a.paneViews(),n=t.height(),o=t.width(),r=0;r<i.length;r++)e.save(),(s=i[r].renderer(n,o))&&s.draw(e),e.restore()},o.prototype.drawCrossHair=function(e){var t,i,n,o,r,s,a=this._chartUndoModel().crossHairSource();if(!a.linesShouldBeHidden()&&(!a.visible&&D.lockTimeAxis().value()&&(a.setLockedPosition(this.state()),a.updateAllViews()),t=this.state(),i=a.paneViews(t)))for(n=t.height(),o=t.width(),r=0;r<i.length;r++)(s=i[r].renderer(n,o))&&(e.save(),s.draw(e),e.restore())},o.prototype._drawSource=function(e,t){var i,n,o,r,s,a,l,c=e.paneViews();if(c)for(n=(i=this.state()).height(),o=i.width(),r=this._chartUndoModel(),s=!this._chart.readOnly()&&(r.selection().isSelected(e)||r.hoveredSource()===e),a=0;a<c.length;a++)(l=c[a].renderer(n,o,s))&&(t.save(),l.draw(t),t.restore())},o.prototype._drawSourceStrategyOrders=function(e,t){var i,n,o,r,s=e._strategyOrdersPaneView;s&&(n=(i=this.state()).height(),o=i.width(),(r=s.renderer(n,o))&&(t.save(),r.draw(t),t.restore()))},o.prototype._drawSourceBackground=function(e,t){var i,n,o,r,s,a=e.paneViews();if(a)for(n=(i=this.state()).height(),o=i.width(),r=0;r<a.length;r++)(s=a[r].renderer(n,o))&&s.drawBackground&&(t.save(),s.drawBackground(t),t.restore())},o.prototype.drawActiveLineTool=function(e){var t=this,i=this._chartUndoModel();[i.lineBeingCreated(),i.lineBeingEdited()].concat(i.sourcesBeingMoved()).filter(function(e){return!!e}).forEach(function(n){i.paneForSource(n)===C(t._state)&&t._drawSource(n,e)})},o.prototype.disableDrawOnTop=function(e){return e&&e._metaInfo&&"Volume@tv-basicstudies"===e._metaInfo.id},o.prototype.drawSources=function(e){var t,i,n,o,r,s,a,l=this.state(),c=l.orderedSources(),u=l.model(),h=this,d=this._chartUndoModel(),p=d.selection().sources().filter(function(e){return!h.disableDrawOnTop(e)}),_=d.hoveredSource(),f=u.crossHairSource(),m=[d.lineBeingCreated(),d.lineBeingEdited()].concat(d.sourcesBeingMoved());for(this.disableDrawOnTop(_)&&(_=void 0),i=(t=d.model().panes()).length-1;i>=0;i--)t[i].createDrawingsCaches();for(n=this._state.customSources(q.Foreground),o=this._state.customSources(q.Background),i=0;i<o.length;++i)this._drawCustomSourceBackground(o[i],e);for(i=0;i<c.length;i++)this._drawSourceBackground(c[i],e);for(i=0;i<n.length;++i)this._drawCustomSourceBackground(n[i],e);for(i=0;i<o.length;++i)this._drawCustomSource(o[i],e);for(i=0;i<c.length;i++)(r=c[i])===f||p.includes(r)||r===_||m.includes(r)||this._drawSource(r,e);for(i=0;i<n.length;++i)(r=n[i])!==_&&this._drawCustomSource(r,e);for((s=p.filter(function(e){return!m.includes(e)&&c.includes(e)})).forEach(function(t){h._drawSource(t,e)}),_&&(s.includes(_)||-1!==m.indexOf(_)||-1===c.indexOf(_)?-1!==n.indexOf(_)&&this._drawCustomSource(_,e):this._drawSource(_,e)),(a=d.activeStrategySource().value())&&this.containsMainSeries()&&this._drawSourceStrategyOrders(a,e),i=t.length-1;i>=0;i--)t[i].clearDrawingCaches()},o.prototype._drawCustomSource=function(e,t){
var i,n,o=this.state(),r=o.height(),s=o.width(),a=this._chartUndoModel(),l=a.hoveredSource()===e,c=e.paneViews(o);for(i=0;i<c.length;++i)null!==(n=c[i].renderer(r,s,l))&&(t.save(),n.draw(t),t.restore())},o.prototype._drawCustomSourceBackground=function(e,t){var i,n,o=this.state(),r=o.height(),s=o.width(),a=e.paneViews(o);for(i=0;i<a.length;++i)null!==(n=a[i].renderer(r,s))&&void 0!==n.drawBackground&&(t.save(),n.drawBackground(t),t.restore())},o.prototype.recalculatePriceScale=function(){var e,t,i,n=this.state();for(n.leftPriceScales().forEach(function(e){n.recalculatePriceScale(e)}),n.rightPriceScales().forEach(function(e){n.recalculatePriceScale(e)}),e=n.dataSources(),t=0;t<e.length;++t)i=e[t],n.isOverlay(i)&&(i instanceof m||n.recalculatePriceScale(i.priceScale()),i.updateAllViews())},o.prototype.containsMainSeries=function(){return this.state().containsMainSeries()},o.prototype.drawBarsMarks=function(e,t){var i,n;this.containsMainSeries()&&!t&&(i=this._chartUndoModel().barsMarksSources(),n=this,i.forEach(function(t){n._drawSource(t,e)}))},o.prototype.paint=function(e,t){if(e&&this._chartUndoModel()&&this.hasState())if(e>R.Cursor&&this._state&&this.recalculatePriceScale(),this._lhsPriceAxisesContainer.paint(e),this._rhsPriceAxisesContainer.paint(e),e===R.Cursor)this._topCtx.clearRect(-.5,-.5,this._size.w,this._size.h),this.drawCrossHair(this._topCtx),this.drawActiveLineTool(this._topCtx);else{var i=this._ctx;this._topCtx.clearRect(-.5,-.5,this._size.w,this._size.h),this.drawBackground(i,this.backgroundColor()),this._state&&(this.drawGrid(i),this.drawWatermark(i),this.drawSources(i),this.drawBarsMarks(i,t),this.drawCrossHair(this._topCtx),this.drawActiveLineTool(this._topCtx))}},o.prototype._priceAxisesContainer=function(e){return d.isLeft(e)?this._lhsPriceAxisesContainer:this._rhsPriceAxisesContainer},o.prototype.onDetachLeft=function(e){var t=this.state(),i=e.getPayload();this.chart().model().detachToLeft(i,t)},o.prototype.onDetachRight=function(e){var t=this.state(),i=e.getPayload();this.chart().model().detachToRight(i,t)},o.prototype.onNoScale=function(e){var t=this.state(),i=e.getPayload();t.isOverlay(i)||this.chart().model().detachNoScale(i,t)},o.prototype.onMoveToScale=function(e){var t=e.getPayload();t.datasource.priceScale()!==t.priceScale&&this.chart().model().moveToScale(t.datasource,this._state,t.priceScale,t.undoText)},o.prototype.createActionLockScale=function(e){var t,i;return e instanceof TradingView.Series?(t=p(e.priceScale(),this._chartUndoModel().model().mainSeriesScaleRatio()),(i=new L({checkable:e.priceScale().isLockScale(),label:window.t("Lock Scale")+" "+t,statName:"LockScale"}))._binding=new w(i,e.priceScale().properties().lockScale,this._chartUndoModel(),"Lock Scale",function(){var t={lockScale:this.value()};this._undoModel.setPriceScaleMode(t,e.priceScale(),this._undoText)}),i):null},o.prototype.createActionMergeUp=function(e){return this._chartModel().isMergeUpAvailableForSource(e)?new L({label:window.t("Existing Pane Above"),statName:"MergeUp",payload:e,
onExecute:o.prototype.onMergeUp.bind(this)}):null},o.prototype.onMergeUp=function(e){var t=e.getPayload();this._chartUndoModel().mergeSourceUp(t)},o.prototype.createActionUnmergeUp=function(e){return this._chartModel().isUnmergeAvailableForSource(e)?new L({label:window.t("New Pane Above"),statName:"UnmergeUp",payload:e,onExecute:o.prototype.onUnmergeUp.bind(this)}):null},o.prototype.onUnmergeUp=function(e){var t=e.getPayload();this._chartUndoModel().unmergeSourceUp(t)},o.prototype.createActionMergeDown=function(e){return this._chartModel().isMergeDownAvailableForSource(e)?new L({label:window.t("Existing Pane Below"),statName:"MergeDown",payload:e,onExecute:o.prototype.onMergeDown.bind(this)}):null},o.prototype.onMergeDown=function(e){var t=e.getPayload();this._chartUndoModel().mergeSourceDown(t)},o.prototype.createActionUnmergeDown=function(e){return this._chartModel().isUnmergeAvailableForSource(e)?new L({label:window.t("New Pane Below"),statName:"UnmergeDown",payload:e,onExecute:o.prototype.onUnmergeDown.bind(this)}):null},o.prototype.onUnmergeDown=function(e){var t=e.getPayload();this._chartUndoModel().unmergeSourceDown(t)},o.prototype._mergeContentMenuItems=function(e){var t=[],i=this.createActionMergeUp(e);return i&&t.push(i),(i=this.createActionUnmergeUp(e))&&t.push(i),(i=this.createActionMergeDown(e))&&t.push(i),(i=this.createActionUnmergeDown(e))&&t.push(i),t},o.prototype.createActionShow=function(e){var t=new L({checkable:!0,label:window.t("Show"),icon:i("6ctS"),statName:"ToggleShow"});return t._binding=new w(t,e.properties().visible,this._chartUndoModel(),t.getLabel()),t._binding.setValue(e.properties().visible.value()),t},o.prototype.createActionHide=function(e){return new L({label:window.t("Hide"),icon:i("DYI2"),statName:"HideSelectedObject",onExecute:this._chart.hideDataSources.bind(this._chart,[e])})},o.prototype.createActionRemove=function(e){return new L({label:window.t("Remove"),icon:i("PgQx"),statName:"RemoveSelectedObject",onExecute:this._chart.removeDataSources.bind(this._chart,[e])})},o.prototype.createActionShowProperties=function(e){return new L({label:window.t("Settings..."),icon:i("MXV9"),statName:"EditSelectedObject",onExecute:this._chart.showSourceProperties.bind(this._chart,e)})},o.prototype.createActionAddChildStudy=function(e){var t=this;return new L({label:window.t("Add Indicator on {0}...").format(e.title(!0)),icon:i("CwKc"),statName:"ApplyIndicator",onExecute:function(){var i,n,o=t._chart.showIndicators(e);o&&(i=function(){S("SOS","Apply SOS","Apply by RC menu")},(n=t._chartModel().studyInserted()).subscribe(t,i),o.visibilityChanged.subscribe(t,function(e){e||n.unsubscribe(t,i)},!0))}})},o.prototype.bringObjectForward=function(e){this._chartUndoModel().bringForward(e)},o.prototype.sendObjectBackward=function(e){this._chartUndoModel().sendBackward(e)},o.prototype.sendObjectToBack=function(e){this._chartUndoModel().sendToBack(e)},o.prototype.bringObjectToFront=function(e){this._chartUndoModel().bringToFront(e)},o.prototype.sendGroupBackward=function(e){
this._chartUndoModel().lineToolsGroupController().sendBackward(e)},o.prototype.bringGroupForward=function(e){this._chartUndoModel().lineToolsGroupController().bringForward(e)},o.prototype.sendGroupToBack=function(e){this._chartUndoModel().lineToolsGroupController().sendToBack(e)},o.prototype.bringGroupToFront=function(e){this._chartUndoModel().lineToolsGroupController().bringToFront(e)},o.prototype.createVisualOrderAction=function(e){var t=P(e)?e:[e],n=this._chartUndoModel().availableZOrderOperations(t),r=[new L({label:window.t("Bring to Front"),statName:"BringToFront",disabled:!n.bringToFrontEnabled,onExecute:o.prototype.bringObjectToFront.bind(this,t)}),new L({label:window.t("Send to Back"),statName:"SendToBack",disabled:!n.sendToBackEnabled,onExecute:o.prototype.sendObjectToBack.bind(this,t)}),new L({label:window.t("Bring Forward"),statName:"BringForward",disabled:!n.bringForwardEnabled,onExecute:o.prototype.bringObjectForward.bind(this,t)}),new L({label:window.t("Send Backward"),statName:"SendBackward",disabled:!n.sendBackwardEnabled,onExecute:o.prototype.sendObjectBackward.bind(this,t)})];return new L({label:window.t("Visual Order"),icon:i("9dnG"),statName:"VisualOrder",subItems:r})},o.prototype._createActionMove=function(e){var t=this._mergeContentMenuItems(e);return t.length?new L({label:window.t("Move To"),icon:i("BBCR"),subItems:t}):null},o.prototype._createActionOrder=function(e){throw new Error("not supported")},o.prototype._updateCrosshairOnZoom=function(){if(D.lockTimeAxis().value()){var e=this._chartUndoModel().crossHairSource();e.setPosition(e.index,e.price,this.state())}},o.prototype.leftPriceAxisesContainer=function(){return this._lhsPriceAxisesContainer},o.prototype.rightPriceAxisesContainer=function(){return this._rhsPriceAxisesContainer},o.prototype._tryStartMeasure=function(e,t,i,n,o){return"measure"===D.tool.value()&&!t.startMeasurePoint()&&!i.control()&&(this._preventCrossHairMove()||this._setCursorPosition(e.localX,e.localY,i),n=this._chartModel().magnet().align(n,o,this._state),t.startMeasuring({price:n,index:o,x:e.localX,y:e.localY},this._state),!0)},o.prototype._tryFinishMeasure=function(e,t){var i,n;return!(!t.startMeasurePoint()||t.endMeasurePoint())&&(i=t.price,n=t.index,i=this._chartModel().magnet().align(i,n,this._state),t.finishMeasure({price:i,index:n,x:e.localX,y:e.localY}),D.resetToCursor(),this._preventCrossHairMove()&&this._clearCursorPosition(),!0)},o.prototype._tryFinishZoom=function(e){return null!==this._firstZoomPoint&&(this._finishZoom(e),!0)},o.prototype._tryStartZoom=function(e,t,i,n){var o,r,s=this._chart.model().model().zoomEnabled();return!("zoom"!==D.tool.value()||!s)&&(r=(o=this._chartUndoModel()).timeScale().indexToCoordinate(i)-.5*o.timeScale().barSpacing(),this._firstZoomPoint={price:t,index:i,x:r,y:e.localY},this._preventCrossHairMove()||this._setCursorPosition(e.localX,e.localY,n),this._chartModel().crossHairSource().startSelection(this._state),!0)},o.prototype.highlightedPriceAxis=function(){return this._highlightedPriceAxis},e.exports.PaneWidget=o
}).call(this,i("hY0g"),i("Kxc7"))},mpWx:function(e,t,i){"use strict";function n(e,t){var i,n=Promise.reject();for(i=0;i<t;++i)n=n.catch(e);return n}i.r(t),i.d(t,"retries",function(){return n})},n0Bl:function(e,t,i){"use strict";function n(e){var t,i,n=e.split("+"),r=n.pop().toUpperCase().charCodeAt(0);for(t=0;t<n.length;t++)"ctrl"===(i=n[t].toLowerCase())?r|=o.Modifiers.Control:"shift"===i?r|=o.Modifiers.Shift:"alt"===i&&(r|=o.Modifiers.Alt);return r}i.r(t),i.d(t,"migrateShortcut",function(){return n});var o=i("/3z9")},n40Z:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolVertLine";var r=t||n.createProperties();this._timeAxisView=new a(this,e),o.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("BSCN").VertLinePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=i("GmZZ").LineToolVertLineTimeAxisView,l=window.t("Vertical Line");inherit(n,o),n.prototype.pointsCount=function(){return 1},n.prototype.title=function(){return l},n.prototype.name=function(){return"Vertical Line"},n.prototype.timeAxisViews=function(){return this.isSourceHidden()?null:this.properties().showTime.value()?[this._timeAxisView]:null},n.prototype.updateAllViews=function(){o.prototype.updateAllViews.call(this),this._timeAxisView.update()},n.prototype.canHasAlert=function(){return!0},n.prototype._getAlertPlots=function(){var e=this._points[0],t={index:e.index,price:e.price+1};return[this._linePointsToAlertPlot([e,t],null,!0,!0)]},n.prototype.getInputsPropertyPage=function(){return s.LineToolVertLineInputsPropertyPage},n.prototype.getStylesPropertyPage=function(){return s.LineToolVertLineStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("FkpW").VerticalLineDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new r("linetoolvertline",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolVertLine=n},n5al:function(e,t,i){"use strict";function n(e){return-1!==x.indexOf(e)}function o(e){return-1!==I.indexOf(e)}function r(e){return 11===e}function s(e){return-1!==L.indexOf(e)}function a(e){return o(e)||s(e)}function l(e){a(e)&&11!==e&&S.setValue("chart.lastUsedStyle",e)}function c(){var e=S.getInt("chart.lastUsedStyle");return void 0===e?1:e}function u(e){return e?11:1}function h(e,t){var i=r(t),n=w.Interval.isRange(e);return!i&&n?u(!0):i&&!n?u(!1):t}function d(e,t){var i=b.SYMBOL_STRING_DATA[e];return void 0===i?null:t?i.type+"-"+i.basicStudyVersion:i.type}function p(e){var t=e.priceAxisProperties,i=t.lockScale.value(),n=6===e.style.value();(n||i)&&(t.log.setValue(!1),t.percentage.setValue(!1)),t.logDisabled.setValue(!(!n&&!i)),t.percentageDisabled.setValue(!(!n&&!i))}function _(e){return-1!==A.indexOf(e)}function f(e){return M.includes(e)}function m(e,t,i){var n,o,r,s,a
;return void 0===t&&(t="default"),void 0===i&&(i=!1),n=100,o=1,"default"===t?null!=e&&(n=e.pricescale,o=e.minmov,r=e.fractional,s=e.minmove2):(3!==(a=t.split(",")).length&&(a=["100","1","false"]),n=parseInt(a[0]),o=parseInt(a[1]),r="true"===a[2]),i&&(o=1),{priceScale:n,minMove:o,fractional:r,minMove2:s}}function y(e,t,i){if(void 0===i&&(i=!1),"default"===t&&null!=e&&("volume"===e.formatter||"volume"===e.format))return new T.VolumeFormatter(2);var n=m(e,t,i),o=n.priceScale,r=n.minMove,s=n.fractional,a=n.minMove2;return new P.PriceFormatter(o,r,s,a)}function g(e){return null==e?null:void 0===e.currency_code||""===e.currency_code?null:"spread"===e.type?null:e.currency_code}function v(e,t){var i=e&&(e.pro_name||e.full_name||e.name);return C.enabled("charting_library_single_symbol_request")&&t?i=t:C.enabled("use_ticker_on_symbol_info_update")&&e&&e.ticker&&(i=e.ticker),i}var S,b,w,P,C,T,x,I,L,M,A;i.r(t),i.d(t,"isRequiringRestartSeriesStyles",function(){return n}),i.d(t,"isRangeBasedStyle",function(){return o}),i.d(t,"isRangeStyle",function(){return r}),i.d(t,"isTimeBasedStyle",function(){return s}),i.d(t,"isValidStyle",function(){return a}),i.d(t,"setLastUsedStyle",function(){return l}),i.d(t,"getLastUsedStyle",function(){return c}),i.d(t,"getDefaultStyle",function(){return u}),i.d(t,"getChartStyleByResolution",function(){return h}),i.d(t,"chartStyleStudyId",function(){return d}),i.d(t,"preparePriceAxisProperties",function(){return p}),i.d(t,"hasProjection",function(){return _}),i.d(t,"isPriceSourceStyle",function(){return f}),i.d(t,"getSeriesPriceFormattingState",function(){return m}),i.d(t,"createSeriesFormatter",function(){return y}),i.d(t,"seriesCurrency",function(){return g}),i.d(t,"extractSymbolNameFromSymbolInfo",function(){return v}),S=i("Vdly"),b=i("dfhE"),w=i("LxhU"),P=i("kcTO"),C=i("Kxc7"),T=i("nEwK"),x=[4,5,6,7,8],I=[4,5,6,7,8,11],L=[0,1,9,2,3,10],M=[2,10,3],A=[4,7,5,6]},nBJD:function(e,t,i){"use strict";i.d(t,"a",function(){return n});var n=function(){function e(e){this._text="",this._size="13px",this._bold=!1,this._colorProperty=e}return e.prototype.text=function(){return this._text},e.prototype.setText=function(e){this._text=e},e.prototype.getSplitTitle=function(){return[this._text]},e.prototype.color=function(){return this._colorProperty.value()},e.prototype.bold=function(){return this._bold},e.prototype.size=function(){return this._size},e}()},nEwK:function(e,t,i){"use strict";var n,o,r,s,a;i.r(t),i.d(t,"PLACE_HOLDER",function(){return s}),i.d(t,"VolumeFormatter",function(){return a}),n=i("zXvd"),o=i("ogJP"),r=i("ivNn"),i("YFKU"),s="---",a=function(){function e(e){this.type="volume",this._numericFormatter=new n.NumericFormatter,this._fractionalValues=void 0!==e&&e>0,this._precision=e}return e.prototype.state=function(){return{precision:this._precision}},e.prototype.format=function(e){if(!Object(o.isNumber)(e))return s;var t="";return e<0&&(t="-",e=-e),e>=1e100?window.t("N/A"):(!this._fractionalValues||e>=995?e=Math.round(e):this._fractionalValues&&(e=+e.toFixed(this._precision)),
e<995?t+this._formatNumber(e):e<999995?t+this._formatNumber(e/1e3)+"K":e<999999995?(e=1e3*Math.round(e/1e3),t+this._formatNumber(e/1e6)+"M"):(e=1e6*Math.round(e/1e6),t+this._formatNumber(e/1e9)+"B"))},e.prototype.parse=function(e){var t,i,n;return"---"===e?{error:"not a number",res:!1,value:NaN}:(t={K:1e3,M:1e6,B:1e9},i=e.slice(-1),t.hasOwnProperty(i)?(n=this._numericFormatter.parse(e.slice(0,-1)),Object(o.isNumber)(n)?{res:!0,value:n*t[i]}:{error:"not a number",res:!1,value:NaN}):(n=this._numericFormatter.parse(e),Object(o.isNumber)(n)?{res:!0,value:n}:{error:"not a number",res:!1,value:NaN}))},e.serialize=function(e){return e.state()},e.deserialize=function(t){return new e(t.precision)},e.prototype._formatNumber=function(e){return this._fractionalValues&&(e=Object(r.fixComputationError)(e)),this._numericFormatter.format(e).replace(/(\.[1-9]*)0+$/,function(e,t){return t})},e}()},nW7S:function(e,t,i){"use strict";(function(e){function n(e,t){var o=t||n.createProperties();r.call(this,e,o),this._constructor="LineToolTrendAngle",this._properties.addChild("angle",new n.AngleProperty(this)),i.e("lt-pane-views").then(function(e){var t=i("XHET").TrendAnglePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("aO4+").Point,r=i("Ss5c").LineDataSource,s=i("Ocx9").DefaultProperty,a=i("hayr").propertyPages,l=window.t("Trend Angle");inherit(n,r),n.AngleProperty=function(t){e.call(this),this._lineSource=t},inherit(n.AngleProperty,e),n.AngleProperty.prototype.value=function(){var e=this._lineSource._angle,t=180*e/Math.PI;return Math.round(t)},n.AngleProperty.prototype.setValue=function(e){var t,i,n,r,s,a,l=e*Math.PI/180;this._lineSource._angle=l,t=this._lineSource.pointToScreenPoint(this._lineSource.points()[0])[0],i=Math.cos(this._lineSource._angle),n=-Math.sin(this._lineSource._angle),r=new o(i,n),s=t.addScaled(r,this._lineSource._distance),a=this._lineSource.screenPointToPoint(s),this._lineSource._points[1]=a,this._lineSource._model.updateSource(this._lineSource),this._lineSource.updateAllViews(),this._lineSource._model.updateSource(this._lineSource)},n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return l},n.prototype.name=function(){return"Trend Angle"},n.prototype._calculateAngle=function(){var e=this.pointToScreenPoint(this.points()[0])[0],t=this.pointToScreenPoint(this.points()[1])[0],i=t.subtract(e);i.length()>0?(i=i.normalized(),this._angle=Math.acos(i.x),i.y>0&&(this._angle=-this._angle),this._distance=t.subtract(e).length()):delete this._angle,this.properties().hasOwnProperty("angle")&&this.properties().angle.listeners().fire(this.properties().angle)},n.prototype.addPoint=function(e,t){var i=r.prototype.addPoint.call(this,e,t);return i&&this._calculateAngle(),i},n.prototype.setLastPoint=function(e,t){r.prototype.setLastPoint.call(this,e,t),this.points().length>1&&this._calculateAngle()},n.prototype.axisPoints=function(){var e,t,i,n,r,s,a=this.points();return a.length<2?[]:(e=[this.points()[0]],t=this.pointToScreenPoint(this.points()[0])[1],
i=Math.cos(this._angle)*this._distance,n=-Math.sin(this._angle)*this._distance,r=t.add(new o(i,n)),s=this.screenPointToPoint(r),e.push(s),e)},n.prototype.setPoint=function(e,t,i){r.prototype.setPoint.call(this,e,t,i),this.points().length>1&&1===e&&this._calculateAngle()},n.prototype.restoreData=function(e){this._angle=e.angle,this._distance=e.distance},n.prototype.state=function(e){var t=r.prototype.state.call(this,e);return t.angle=this._angle,t.distance=this._distance,t},n.prototype.cloneData=function(e){this._angle=e._angle,this._distance=e._distance},n.prototype.canHasAlert=function(){return!0},n.prototype._getAlertPlots=function(){return[this._linePointsToAlertPlot(this._points,null,this.properties().extendLeft.value(),this.properties().extendRight.value())]},n.prototype.getInputsPropertyPage=function(){return a.LineToolTrendAngleInputsPropertyPage},n.prototype.getStylesPropertyPage=function(){return a.LineToolTrendAngleStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("o1gc").TrendAngleDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new s("linetooltrendangle",e);return n._configureProperties(t),t},n._configureProperties=function(e){r._configureProperties(e)},t.LineToolTrendAngle=n}).call(this,i("tc+8"))},"nd9+":function(e,t,i){"use strict";var n,o,r,s,a,l,c,u,h,d;i.r(t),i.d(t,"LineToolGannComplex",function(){return d}),n=i("mrSG"),o=i("aO4+"),r=i("Eyy1"),s=i("T6Of"),a=i("Ss5c"),l=i("FaJS"),c=i("hayr"),u=i("LAp3"),h=window.t("Gann Square"),(d=function(e){function t(n,o){var r,a=e.call(this,n,o||t.createProperties())||this;return a.version=2,a._constructor="LineToolGannComplex",a._scaleRatioFormatter=new s.LimitedPrecisionNumericFormatter(7),i.e("lt-pane-views").then(function(e){var t=i("X4Cb").GannComplexPaneView;a._setPaneViews([new t(a,a.model())])}.bind(null,i)).catch(void 0),r=a.properties(),a._adjustScaleRatio(r),r.subscribe(a,a._adjustScaleRatio),r.childs().scaleRatio.subscribe(a,a._correctFirstPoint),a._syncStateExclusions=["scaleRatio"],r.addExclusion("scaleRatio"),a.properties().onRestoreFactoryDefaults().subscribe(a,a._handleRestoringFactoryDefaults),a._onTemplateApplying.subscribe(a,a._handleTemplateApplying),a._onTemplateApplied.subscribe(a,a._correctFirstPoint),a}return Object(n.__extends)(t,e),t.prototype.properties=function(){return e.prototype.properties.call(this)},t.prototype.migrateVersion=function(e,t,i){var n=this;1===e&&(this._points.length>=this.pointsCount()?setTimeout(function(){return n._migratePoint()}):this._timePoint.length>=this.pointsCount()&&this._pointAdded.subscribe(this,this._migratePoint))},t.prototype.destroy=function(){var e=this.properties();e.unsubscribe(this,this._adjustScaleRatio),e.childs().scaleRatio.unsubscribe(this,this._correctFirstPoint),this.properties().onRestoreFactoryDefaults().unsubscribe(this,this._handleRestoringFactoryDefaults),
this._onTemplateApplying.unsubscribe(this,this._handleTemplateApplying),this._onTemplateApplied.unsubscribe(this,this._correctFirstPoint)},t.prototype.pointsCount=function(){return 2},t.prototype.title=function(){return h},t.prototype.name=function(){return"Gann Square"},t.prototype.addPoint=function(t,i,n){var o,s;return this._points.length>1&&this._points.pop(),o=e.prototype.addPoint.call(this,t,i,n),s=this.priceScale(),!Object(r.ensureNotNull)(s).isLog()&&o&&this._correctFirstPoint(),o},t.prototype.setPoint=function(t,i,n){e.prototype.setPoint.call(this,t,i,n),void 0!==n&&n.shift()?this._correctPoint(t):this._correctScaleRatio()},t.prototype.setLastPoint=function(t,i){var n=this.priceScale(),o=Object(r.ensureNotNull)(n).isLog();o||(this._points[1]=t,this._correctPoint(1)),e.prototype.setLastPoint.call(this,t,i)},t.prototype.getStylesPropertyPage=function(){return c.propertyPages.LineToolGannComplexStylesPropertyPage},t.prototype.isReversed=function(){return this.properties().childs().reverse.value()},t.prototype.levelsCount=function(){return this.properties().childs().levels.childCount()},t.prototype.levels=function(){var e,t,i=[],n=this.properties().childs(),o=n.levels.childCount();for(e=0;e<o;e++)t=n.levels.childs()[e].childs(),i.push({index:e,visible:t.visible.value(),color:t.color.value(),width:t.width.value()});return i},t.prototype.fanLinesCount=function(){return this.properties().childs().fanlines.childCount()},t.prototype.fanLines=function(){var e,t,i=[],n=this.properties().childs(),o=n.fanlines.childCount();for(e=0;e<o;e++)t=n.fanlines.childs()[e].childs(),i.push({index:e,visible:t.visible.value(),x:t.x.value(),y:t.y.value(),color:t.color.value(),width:t.width.value()});return i},t.prototype.arcsCount=function(){return this.properties().childs().arcs.childCount()},t.prototype.arcs=function(){var e,t,i=[],n=this.properties().childs(),o=n.arcs.childCount();for(e=0;e<o;e++)t=n.arcs.childs()[e].childs(),i.push({index:e,visible:t.visible.value(),x:t.x.value(),y:t.y.value(),color:t.color.value(),width:t.width.value()});return i},t.prototype.arcsBackgroundTransparency=function(){return this.properties().childs().arcsBackground.childs().transparency.value()},t.prototype.isArcsBackgroundFilled=function(){return this.properties().childs().arcsBackground.childs().fillBackground.value()},t.prototype.isLabelsVisible=function(){return this.properties().childs().showLabels.value()},t.prototype.getLabelsStyle=function(){var e=this.properties().childs(),t=e.labelsStyle.childs(),i=t.font,n=t.fontSize,o=t.bold,r=t.italic,s=e.levels.childCount(),a=e.levels.childs()[s-1].childs();return{textColor:a.color.value(),font:i.value(),fontSize:n.value(),bold:o.value(),italic:r.value()}},t.prototype.getScaleRatioStep=function(){return 1e-7},t.prototype.getScaleRatioFormatter=function(){return this._scaleRatioFormatter},t.prototype.getPriceDiff=function(){var e,t=this.points();return t.length<2?null:(e=t[0],t[1].price-e.price)},t.prototype.getIndexDiff=function(){var e,t=this.points();return t.length<2?null:(e=t[0],t[1].index-e.index)
},t.prototype.getScaleRatio=function(){var e=this.getPriceDiff(),t=this.getIndexDiff();return null!==e&&null!==t&&0!==t?Math.abs(e/t):null},t.createProperties=function(e){var i=Object(u.a)("linetoolganncomplex",e);return t._configureProperties(i),i},t.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"WfUZ")).then(function(e){return e.GannComplexAndFixedDefinitionsViewModel})},t._configureProperties=function(e){a.LineDataSource._configureProperties(e)},t.prototype._correctScaleRatio=function(){var e=this.properties().childs(),t=this.getScaleRatio();e.scaleRatio.setValue(t)},t.prototype._getAdjustedScaleRatio=function(){var e=this.model().mainSeries().priceScale(),t=this.model().timeScale();return Object(l.scaleRatio)(t,e)},t.prototype._adjustScaleRatio=function(e){var t=e.scaleRatio.value();""!==t&&null!==t||e.scaleRatio.setValue(this._getAdjustedScaleRatio())},t.prototype._correctPoint=function(e){var t,i,n,o,r,s,a;this._points.length<2||null!==(t=this.getIndexDiff())&&(null!==(i=this.properties().childs().scaleRatio.value())&&(n=this._points[e],o=0===e?this._points[1]:this._points[0],r=n.price-o.price>0,s=n.index-o.index>0,a=r&&!s||!r&&s?-1:1,0===e&&(a=-a),n.price=o.price+a*t*i,this._pointChanged.fire(e)),this.normalizePoints())},t.prototype._correctFirstPoint=function(){this._correctPoint(this.isReversed()?0:1)},t.prototype._handleRestoringFactoryDefaults=function(){this.properties().childs().scaleRatio.setValue(this._getAdjustedScaleRatio())},t.prototype._handleTemplateApplying=function(e){""===e.scaleRatio&&(e.scaleRatio=this._getAdjustedScaleRatio())},t.prototype._migratePoint=function(){var e,t;this.points().length<this.pointsCount()||null!==(e=this._getScreenPoints())&&(t=this.screenPointToPoint(e[1]),this.setPoint(1,t),this._pointAdded.unsubscribe(this,this._migratePoint))},t.prototype._getScreenPoints=function(){var e,t,i,n,r,s,a,l,c,u,h,d=this._calcAngle();return null===d?null:(i=(t=this.points())[0],n=t[1],this.isReversed()&&(i=(e=[n,i])[0],n=e[1]),r=this.pointToScreenPoint(i)[0],s=this.pointToScreenPoint(n)[0],a=Math.sqrt(Math.pow(r.x-s.x,2)+Math.pow(r.y-s.y,2)),u=(c=(l=new o.Point(Math.cos(d),-Math.sin(d))).normalized()).x<0?-1:1,h=c.y<0?-1:1,[r.addScaled(l,a),r.add(new o.Point(5*a*u,5*a*h))])},t.prototype._calcAngle=function(){var e,t=this.points(),i=t[0],n=t[1],o=this.pointToScreenPoint(i)[0],r=this.pointToScreenPoint(n)[0],s=r.subtract(o),a=s.length();return a>0?(s=s.normalized(),e=Math.acos(s.x),s.y>0&&(e=-e),e):null},t}(a.LineDataSource)).prototype.superclass=a.LineDataSource},nda6:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"TimeSpanFormatter",function(){return n}),i("YFKU"),n=function(){function e(){}return e.prototype.format=function(e){var t,i,n,o,r=e<0;return e=Math.abs(e),e-=86400*(t=Math.floor(e/86400)),e-=3600*(i=Math.floor(e/3600)),e-=60*(n=Math.floor(e/60)),o="",t&&(o+=t+window.t("d",{context:"dates"})+" "),i&&(o+=i+window.t("h",{context:"dates"})+" "),n&&(o+=n+window.t("m",{
context:"dates"})+" "),e&&(o+=e+window.t("s",{context:"dates"})+" "),r&&(o="-"+o),o.trim()},e}()},nqXy:function(e,t,i){"use strict";i.r(t),i.d(t,"MouseWheelHelper",function(){return n});var n=function(){function e(){this._totalDeltaX=0,this._totalDeltaY=0,this._prevWheelTime=0}return e.prototype.processWheel=function(e){e.timeStamp-this._prevWheelTime>100&&this._reset(),this._totalDeltaX+=e.deltaX,this._totalDeltaY+=e.deltaY,this._prevWheelTime=e.timeStamp;var t={deltaX:e.deltaX,deltaY:e.deltaY};return 0===this._totalDeltaX||0===this._totalDeltaY?t:(Math.abs(this._totalDeltaX)>=Math.abs(3*this._totalDeltaY)&&(t.deltaY=0),Math.abs(this._totalDeltaY)>=Math.abs(3*this._totalDeltaX)&&(t.deltaX=0),t)},e.prototype._reset=function(){this._totalDeltaX=0,this._totalDeltaY=0},e}()},oNDq:function(e,t,i){"use strict";function n(e){return new Promise(function(t){Promise.all([i.e("dialogs-core"),i.e(19),i.e("create-dialog")]).then(function(n){var r=i("YDhE").createDialog;t(r(Object(o.__assign)(Object(o.__assign)({},a),e)))}.bind(null,i)).catch(void 0)})}var o,r,s,a;i.r(t),i.d(t,"createConfirmDialog",function(){return n}),o=i("mrSG"),i("YFKU"),r={key:13,name:"yes",text:window.t("Yes"),type:"success"},s={method:"close",name:"no",text:window.t("No"),type:"default"},a={actions:[r,s],actionsWrapTemplate:'<div class="tv-dialog__section tv-dialog__section--actions tv-dialog__section--no-border">',content:window.t("Are you sure?"),contentWrapTemplate:'<div class="tv-dialog__section tv-dialog__section--no-border"><div class="tv-text"><p></p></div></div>',destroyOnClose:!0,title:window.t("Confirmation"),width:400,dataset:{"dialog-type":"confirm-dialog"}}},oNU6:function(e,t,i){"use strict";var n,o,r,s,a,l,c;i.r(t),i.d(t,"MarketStatusIndicator",function(){return c}),n=i("mrSG"),i("YFKU"),o=i("0wn8"),r=i("r8Gw"),s={invalid:"tv-market-status--invalid",market:"tv-market-status--market",out_of_session:"tv-market-status--out-of-session",post_market:"tv-market-status--post-market",pre_market:"tv-market-status--pre-market",loading:"tv-market-status--loading",holiday:"tv-market-status--holiday",replay:"tv-market-status--replay"},a={invalid:window.t("Invalid Symbol"),market:window.t("Market Open"),out_of_session:window.t("Market Closed"),post_market:window.t("Post Market"),pre_market:window.t("Pre Market"),loading:window.t("Loading"),holiday:window.t("Holiday"),replay:""},l={classMap:s,classSuffix:"",data:{},extraTitle:"",labelMap:a,short:!1,showTooltip:!0,tooltipType:"custom"},c=function(e){function t(t){var i=e.call(this,t)||this;return i._quoteSessionPrefix="market-status-indicator",i._componentClass="tv-market-status",i._extraTitle="",i._init(t),i}return Object(n.__extends)(t,e),t.prototype.setStatus=function(e,t){var i={values:{current_session:e}};this.update(i,t)},t.prototype.getTooltipText=function(){var t=e.prototype.getTooltipText.call(this);return""===t?t:(""!==this._extraTitle&&(t=t+", "+this._extraTitle),t)},t.prototype.setExtraTitle=function(e){this._extraTitle=e},t.prototype.reset=function(){this._clearClasses(),
this._labelEl.textContent="",this._extraTitle="",this._el.setAttribute("title",""),this._value=""},t.prototype.enableShortMode=function(t){void 0===t&&(t=!0),void 0!==this._labelEl&&this._labelEl.classList.add("i-hidden"),e.prototype.enableShortMode.call(this)},t.prototype.disableShortMode=function(){void 0!==this._labelEl&&this._labelEl.classList.remove("i-hidden"),e.prototype.disableShortMode.call(this)},t.prototype._renderLabel=function(){this._labelEl.textContent=this.getLabel()},t.prototype._getValueFromData=function(e){return void 0!==e.values&&void 0!==e.values.current_session?e.values.current_session:this.getValue()},t.prototype._render=function(){this._renderLabelElement(),this._renderDotElement(),e.prototype._render.call(this)},t.prototype._init=function(t){var i=Object.assign({},l,t);e.prototype._init.call(this,i),this.setExtraTitle(i.extraTitle),this._render()},t.prototype._renderLabelElement=function(){void 0===this._labelEl&&(this._labelEl=document.createElement("span"),this._labelEl.classList.add(this._componentClass+"__label"),this._labelEl.classList.add(this._componentClass+"__label"+this._classSuffix),this._el.appendChild(this._labelEl))},t.prototype._renderDotElement=function(){void 0===this._dotEl&&(this._dotEl=document.createElement("span"),this._dotEl.classList.add(this._componentClass+"__dot"),this._dotEl.classList.add(this._componentClass+"__dot"+this._classSuffix),this._el.appendChild(this._dotEl))},t}(r.a)},oUqy:function(e,t,i){"use strict";function n(e){this.items=e.items,this.barSpacing=e.barSpacing,this.histogramBase=e.histogramBase,this.lineColor=e.lineColor,this.lineWidth=e.lineWidth}var o=i("VdBB").HitTestResult,r=5;n.prototype.draw=function(e){var t,i,n,o,s,a,l,c,u,h,d,p,_,f,m,y;if(0!==this.items.length){for(t=this.barSpacing,i=this.lineColor,n=this.histogramBase,e.translate(.5,.5),o={},s=this.items,a=null,l=0;l<s.length;++l)c=s[l],u=0===l?null:s[l-1],d=o[h=c.style?c.style.color:i]||[],p=Math.floor(c.x-.5*t),_=Math.ceil(p+t),a&&(f=_-p>r?1:0,a.right=p-f),m={item:c,prev:u,left:p,right:_},d.push(m),a=m,o[h]=d;for(h in o){for(d=o[h],e.fillStyle=h,e.strokeStyle=h,e.lineWidth=1,e.beginPath(),l=0;l<d.length;l++)y=(c=d[l]).item.y,p=c.left,_=c.right,e.rect(p,y,_-p,n-y);e.fill()}}},n.prototype.hitTest=function(e){var t,i,n,r=.5*this.barSpacing+this.lineWidth,s=e.x-r,a=e.x+r,l=this.items;for(t=l.length;t--;)if((i=l[t].x)>=s&&i<=a&&(n=l[t].y,e.y>=Math.min(n,this.histogramBase)&&e.y<=Math.max(n,this.histogramBase)))return new o(o.REGULAR);return null},t.PaneRendererColumns=TradingView.PaneRendererColumns=n},oWyD:function(e,t,i){},oXaB:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"PriceAxisLastValueMode",function(){return n}),function(e){e[e.LastPriceAndPercentageValue=0]="LastPriceAndPercentageValue",e[e.LastValueAccordingToScale=1]="LastValueAccordingToScale"}(n||(n={}))},ocLq:function(e,t,i){"use strict";(function(t){var n=i("5B3K").StudyError,o=i("Y7w9"),r=i("ogJP").inherit,s=i("E6p6").SessionStage,a=1e-10,l=function(){function e(e,t,i,n,o){var r,s=o,a=0;if(isNaN(e.get(t-1)))return{
index:NaN,value:NaN};for(r=0;r<t;++r)n(e.get(r),s)&&(a=r,s=e.get(r));return{index:a,value:s}}function l(e,t,i,n,o){var r,s,a;this._areaRight=e,this._areaLeft=t,this._pivotType=i,this._series=n,this._currentIndex=o.new_var(0),this._currentValue=o.new_var(NaN),this._pivotIndex=o.new_var(-1),this._index=C.n(o),this._isNewBar=o.symbol.isNewBar,r=this._currentIndex.get(1),s=this._currentValue.get(1),a=this._pivotIndex.get(1),this._index>1&&(this._currentIndex.set(r),this._currentValue.set(s),this._pivotIndex.set(a))}function c(e,t,i){var n,o,r,s,a;this._deviation=e,n=i.new_var(C.high(i)),o=i.new_var(C.low(i)),n.get(2*t+1),o.get(2*t+1),this._pivotHigh=new l(t,t,l.HIGH,n,i),this._pivotLow=new l(t,t,l.LOW,o,i),this._lastVal=i.new_var(NaN),this._lastIndex=i.new_var(-1),this._lastType=i.new_var(),this._index=C.n(i),this._isNewBar=i.symbol.isNewBar,this._isBarClosed=i.symbol.isBarClosed,r=this._lastIndex.get(1),s=this._lastVal.get(1),a=this._lastType.get(1),this._index>1&&this.addPivot(r,s,a),this.processPivot(this._pivotHigh),this.processPivot(this._pivotLow)}function u(e){this.symbol=e,this.vars=[],this.vars_index=0,this.ctx=[],this.ctx_index=0}function h(e){this.mindepth=0,this.original=NaN,this.modified=!1,this.symbol=e}function d(e){h.call(this,e),this.hist=new Float64Array(2e3),this.hist_pos=-1}function p(e,t,i,n,o,r){this.periodBase=i,this.tickerid=e,this.period=t,this.index=-1,this.time=NaN,this.open=NaN,this.high=NaN,this.low=NaN,this.close=NaN,this.volume=NaN,this.updatetime=NaN,this.isNewBar=!1,this.isBarClosed=!1,this.session=new w.SessionInfo("Etc/UTC","24x7"),this.other_sessions={},this.script=n,this.ticker=p.parseTicker(e);var s=p.parsePeriod(t);this.resolution=s.resolution,this.interval=s.interval,this.bb_cache={},this.minTick=o,this.periodForInitialRange=r}function _(e,t,i,n,o,r,s,a,l,c){this.body=r,this.symbols=[],this.runner=o,this.inputCallback=a,this.out=s,this.nonseriesOut=c,this.ctx=new u(this.add_sym(e,t,i,l,n)),this.init()}function f(e){this.symbols=[],this.barsets=[],this.subscription=[],this.host=e,this.isRecalculated=!1,this.start()}function m(e){this.runner=new f(e)}function y(e,t){this.info=e,this.bars=t||[],this.isBarClosed=!0}function g(e,t){this.period=e,this.generateEmptyBars=!!t}function v(){}var S="undefined"!=typeof window?window:t,b=S.PineJsCalendar?S.PineJsCalendar:i("jCNj"),w=i("IiTo"),P=i("IDnv").extrapolateBarsFrontToTime,C={max_series_default_size:10001,n:function(e){return e.symbol.index+1},nz:function(e,t){return t=t||0,isFinite(e)?e:t},na:function(e){return 0===arguments.length?NaN:isNaN(e)?1:0},isZero:function(e){return Math.abs(e)<=1e-10},toBool:function(e){return isFinite(e)&&!C.isZero(e)},eq:function(e,t){return C.isZero(e-t)},neq:function(e,t){return!C.eq(e,t)},ge:function(e,t){return C.isZero(e-t)||e>t},gt:function(e,t){return!C.isZero(e-t)&&e>t},lt:function(e,t){return!C.isZero(e-t)&&e<t},le:function(e,t){return C.isZero(e-t)||e<t},and:function(e,t){return isNaN(e)||isNaN(t)?NaN:C.isZero(e)||C.isZero(t)?0:1},or:function(e,t){
return isNaN(e)||isNaN(t)?NaN:C.isZero(e)&&C.isZero(t)?0:1},not:function(e){return isNaN(e)?NaN:C.isZero(e)?1:0},greaterOrEqual:function(e,t){return t-e<a},lessOrEqual:function(e,t){return e-t<a},equal:function(e,t){return Math.abs(e-t)<a},greater:function(e,t){return e-t>a},less:function(e,t){return t-e>a}};return C.max=Math.max,C.min=Math.min,C.pow=Math.pow,C.abs=Math.abs,C.log=Math.log,C.log10=function(e){return Math.log(e)/Math.LN10},C.sqrt=Math.sqrt,C.sign=function(e){return isNaN(e)?NaN:C.isZero(e)?0:e>0?1:-1},C.exp=Math.exp,C.sin=Math.sin,C.cos=Math.cos,C.tan=Math.tan,C.asin=Math.asin,C.acos=Math.acos,C.atan=Math.atan,C.floor=Math.floor,C.ceil=Math.ceil,C.round=Math.round,C.avg=function(e,t,i,n,o,r){var s,a;if(2===arguments.length)return(e+t)/2;for(s=0,a=0;a<arguments.length;a++)s+=arguments[a];return s/arguments.length},C.open=function(e){return e.symbol.open},C.high=function(e){return e.symbol.high},C.low=function(e){return e.symbol.low},C.close=function(e){return e.symbol.close},C.hl2=function(e){return(e.symbol.high+e.symbol.low)/2},C.hlc3=function(e){return(e.symbol.high+e.symbol.low+e.symbol.close)/3},C.ohlc4=function(e){return(e.symbol.open+e.symbol.high+e.symbol.low+e.symbol.close)/4},C.volume=function(e){return e.symbol.volume},C.updatetime=function(e){return e.symbol.updatetime},C.time=function(e,t,i){return e.symbol.bartime(t,i)},C.period=function(e){return e.symbol.period},C.tickerid=function(e){return e.symbol.tickerid},C.ticker=function(e){return e.symbol.ticker},C.interval=function(e){return e.symbol.interval},C.isdwm=function(e){return e.symbol.isdwm()},C.isintraday=function(e){return!e.symbol.isdwm()},C.isdaily=function(e){return"D"===e.symbol.resolution},C.isweekly=function(e){return"W"===e.symbol.resolution},C.ismonthly=function(e){return"M"===e.symbol.resolution},C.year=function(e){return C.timepart(e.symbol,b.YEAR,arguments[1])},C.month=function(e){return C.timepart(e.symbol,b.MONTH,arguments[1])},C.weekofyear=function(e){return C.timepart(e.symbol,b.WEEK_OF_YEAR,arguments[1])},C.dayofmonth=function(e){return C.timepart(e.symbol,b.DAY_OF_MONTH,arguments[1])},C.dayofweek=function(e){return C.timepart(e.symbol,b.DAY_OF_WEEK,arguments[1])},C.hour=function(e){return C.timepart(e.symbol,b.HOUR_OF_DAY,arguments[1])},C.minute=function(e){return C.timepart(e.symbol,b.MINUTE,arguments[1])},C.second=function(e){return C.timepart(e.symbol,b.SECOND,arguments[1])},C.add_days_considering_dst=function(e,t,i){return b.add_days_considering_dst(b.get_timezone(e),t,i)},C.selectSessionBreaks=function(e,t){var i,n,o,r,s,a;if(C.isdwm(e)||void 0===e.symbol.session.timezone)return[];if(i=p.newBarBuilder(e.symbol.period,e.symbol.session),n=[],o=t.length,i.moveTo(t[o-1]),1===o&&i.startOfBar(0)===t[0])n.push(t[0]);else{for(r=o-2;r>=0;--r)(s=t[r])>=i.startOfBar(0)||(i.moveTo(s),a=t[r+1],n.push(a));n.reverse()}return n},C.iff=function(e,t,i){return C.not(e)?i:t},C.rising=function(e,t){for(var i=1;i<t+1;++i)if(e.get(i)>e.get(0))return 0;return 1},C.falling=function(e,t){
for(var i=1;i<t+1;++i)if(e.get(i)<e.get(0))return 0;return 1},C.timepart=function(e,t,i){var n=b.utc_to_cal(e.timezone,i||e.bartime());return b.get_part(n,t)},C.rsi=function(e,t){return C.isZero(t)?100:C.isZero(e)?0:100-100/(1+e/t)},C.sum=function(e,t,i){var n=i.new_var(),o=C.nz(e.get())+C.nz(n.get(1))-C.nz(e.get(t));return n.set(o),o},C.sma=function(e,t,i){var n=C.sum(e,t,i),o=C.na(e.get(t-1))?NaN:n/t;return o},C.rma=function(e,t,i){var n=C.sum(e,t,i),o=t-1,r=e.get(o),s=i.new_var(),a=s.get(1),l=e.get(),c=C.na(r)?NaN:C.na(a)?n/t:(l+a*o)/t;return s.set(c),c},C.fixnan=function(e,t){var i=t.new_var();return isNaN(e)?i.get(1):(i.set(e),e)},C.tr=function(e,t){var i,n;return 1===arguments.length&&(t=e,e=void 0),i=void 0!==e&&!!e,n=t.new_var(C.close(t)).get(1),i&&isNaN(n)&&(n=C.close(t)),C.max(C.max(C.high(t)-C.low(t),C.abs(C.high(t)-n)),C.abs(C.low(t)-n))},C.atr=function(e,t){var i=t.new_var(C.tr(t));return C.sma(i,e,t)},C.ema=function(e,t,i){var n=C.sum(e,t,i),o=i.new_var(),r=e.get(0),s=e.get(t-1),a=o.get(1),l=C.na(s)?NaN:C.na(a)?n/t:2*(r-a)/(t+1)+a;return o.set(l),l},C.wma=function(e,t,i){var n,o=0;for(n=t=Math.round(t);n>=0;n--)o+=(t-n)*e.get(n);return 2*o/(t*(t+1))},C.vwma=function(e,t,i){var n=i.new_var(C.volume(i)),o=i.new_var(e.get(0)*C.volume(i));return C.sma(o,t,i)/C.sma(n,t,i)},C.swma=function(e,t){return(e.get(0)+2*e.get(1)+2*e.get(2)+e.get(3))/6},C.lowestbars=function(t,i,n){return-e(t,i,0,function(e,t){return C.lt(e,t)},Number.MAX_VALUE).index},C.lowest=function(t,i,n){return e(t,i,0,function(e,t){return C.lt(e,t)},Number.MAX_VALUE).value},C.highestbars=function(t,i,n){return-e(t,i,0,function(e,t){return C.gt(e,t)},Number.MIN_VALUE).index},C.highest=function(t,i,n){return e(t,i,0,function(e,t){return C.gt(e,t)},Number.MIN_VALUE).value},C.cum=function(e,t){var i=t.new_var(),n=C.nz(i.get(1))+e;return i.set(n),n},C.accdist=function(e){var t=C.high(e),i=C.low(e),n=C.close(e),o=C.volume(e);return C.cum(n===t&&n===i||t===i?0:o*(2*n-i-t)/(t-i),e)},C.correlation=function(e,t,i,n){var o=C.sma(e,i,n),r=C.sma(t,i,n),s=n.new_var(e.get()*t.get()),a=C.sma(s,i,n)-o*r;return a/Math.sqrt(C.variance2(e,o,i)*C.variance2(t,r,i))},C.stoch=function(e,t,i,n,o){var r=C.highest(t,n),s=C.lowest(i,n);return C.fixnan(100*(e.get()-s)/(r-s),o)},C.tsi=function(e,t,i,n){var o=n.new_var(C.change(e)),r=n.new_var(C.abs(C.change(e))),s=n.new_var(C.ema(o,i,n)),a=n.new_var(C.ema(r,i,n)),l=C.ema(s,t,n),c=C.ema(a,t,n);return l/c},C.cross=function(e,t,i){if(isNaN(e)||isNaN(t))return!1;var n,o=i.new_var((n=e-t)<0?-1:0===n?0:1);return!isNaN(o.get(1))&&o.get(1)!==o.get()},C.linreg=function(e,t,i){var n,o,r,s,a=0,l=0,c=0,u=0;for(n=0;n<t;++n)o=e.get(n),a+=r=t-1-n+1,l+=o,c+=r*r,u+=o*r;return l/t-(s=(t*u-a*l)/(t*c-a*a))*a/t+s+s*(t-1-i)},C.sar=function(e,t,i,n){function o(t,i){var n=f.get();return m.set(t),f.set(i),y.set(e),g.set(n),n}var r,s=C.high(n),a=C.low(n),l=C.close(n),c=n.new_var(s),u=n.new_var(a),h=n.new_var(l),d=h.get(1),p=u.get(1),_=c.get(1),f=n.new_var(),m=n.new_var(),y=n.new_var(),g=n.new_var(),v=g.get(1);if(isNaN(d))return NaN
;if(isNaN(v)&&(C.ge(l,d)?(m.set(1),f.set(Math.max(s,_)),v=Math.min(a,p)):(m.set(-1),v=Math.max(s,_),f.set(Math.min(a,p))),y.set(e)),1===m.get()){if(C.gt(s,f.get())&&(f.set(s),y.set(Math.min(y.get()+t,i))),C.le(a,v))return o(-1,a)}else if(C.lt(a,f.get())&&(f.set(a),y.set(Math.min(y.get()+t,i))),C.ge(s,v))return o(1,s);return r=v+y.get()*(f.get()-v),1===m.get()?C.ge(r,a)&&(r=a):C.le(r,s)&&(r=s),g.set(r),r},C.alma=function(e,t,i,n){var o,r,s,a=Math.floor(i*(t-1)),l=t/n*(t/n),c=[],u=0;for(o=0;o<t;++o)u+=r=Math.exp(-1*Math.pow(o-a,2)/(2*l)),c.push(r);for(o=0;o<t;++o)c[o]/=u;for(s=0,o=0;o<t;++o)s+=c[o]*e.get(t-o-1);return s},C.wvap=function(e,t){return e.get()-e.get(1)},C.change=function(e){return e.get()-e.get(1)},C.roc=function(e,t){var i=e.get(t),n=100*(e.get()-i)/i;return n},C.dev=function(e,t,i){var n=C.sma(e,t,i);return C.dev2(e,t,n)},C.dev2=function(e,t,i){var n,o,r=0;for(n=0;n<t;n++)o=e.get(n),r+=C.abs(o-i);return r/t},C.stdev=function(e,t,i){var n=C.variance(e,t,i);return C.sqrt(n)},C.variance=function(e,t,i){var n=C.sma(e,t,i);return C.variance2(e,n,t)},C.variance2=function(e,t,i){var n,o,r,s=0;for(n=0;n<i;n++)o=e.get(n),s+=(r=C.abs(o-t))*r;return s/i},C.percentrank=function(e,t){var i,n,o,r;if(C.na(e.get(t-1)))return NaN;for(i=0,n=e.get(),o=1;o<t;o++)r=e.get(o),C.ge(n,r)&&i++;return 100*i/t},C.createNewSessionCheck=function(e){if(void 0===e.symbol.session.timezone)return function(){return!1};var t=p.newBarBuilder(e.symbol.period,e.symbol.session);return function(e){return t.indexOfBar(e)===s.POST_SESSION&&(t.moveTo(e),!0)}},C.error=function(e){throw new n(e)},l.LOW=0,l.HIGH=1,l.prototype.isPivotFound=function(){return-1!==this._pivotIndex.get()},l.prototype.pivotIndex=function(){return this._pivotIndex.get()},l.prototype.currentValue=function(){return this._currentValue.get()},l.prototype.pivotType=function(){return this._pivotType},l.prototype.reset=function(){this._currentValue.set(NaN),this._currentIndex.set(0),this._pivotIndex.set(-1)},l.prototype.isRightSideOk=function(e){return e-this._currentIndex.get()===this._areaRight},l.prototype.isViolate=function(e,t){if(e<1||isNaN(this._currentValue.get()))return!0;var i=this._series.get(this._index-e);return!!isNaN(i)||(i===this._currentValue.get()?t:this._pivotType===l.HIGH?i>this._currentValue.get():i<this._currentValue.get())},l.prototype.processPoint=function(e){this.isViolate(e,!1)&&(this._currentValue.set(this._series.get()),this._currentIndex.set(e))},l.prototype.isRestartNeeded=function(e){return e-this._currentIndex.get()>this._areaRight},l.prototype.update=function(){var e,t;if(this._isNewBar&&this.isPivotFound()&&this.reset(),this.processPoint(this._index),this.isRightSideOk(this._index)){if(-1===this._pivotIndex.get()){for(e=!0,t=0;t<this._areaLeft;++t)if(this.isViolate(this._currentIndex.get()-1-t,!0)){e=!1;break}e&&this._pivotIndex.set(this._currentIndex.get())}}else-1!==this._pivotIndex.get()&&this._pivotIndex.set(-1);if(this.isRestartNeeded(this._index))for(this.reset(),t=0;t<=this._areaRight;++t)this.processPoint(this._index-this._areaRight+t)},
c.prototype.addPivot=function(e,t,i){this._lastIndex.set(e),this._lastVal.set(t),this._lastType.set(i)},c.prototype.updatePivot=function(e,t){this._lastIndex.set(e),this._lastVal.set(t)},c.prototype.lastPrice=function(){return this._lastVal.get()},c.prototype.lastIndex=function(){return this._lastIndex.get()},c.prototype.addPoint=function(e,t,i){var n;isNaN(this._lastVal.get())?this.addPivot(e,t,i):(n=this._lastVal.get(),this._lastType.get()!==i?Math.abs(n-t)/t>this._deviation&&this.addPivot(e,t,i):(i===l.HIGH?t>n:t<n)&&this.updatePivot(e,t))},c.prototype.processPivot=function(e){e.update(),this._isBarClosed&&e.isPivotFound()&&this.addPoint(e.pivotIndex(),e.currentValue(),e.pivotType())},C.zigzag=function(e,t,i){return new c(e,t,i).lastPrice()},C.zigzagbars=function(e,t,i){var n=new c(e,t,i);return-1===n.lastIndex()?NaN:n.lastIndex()-C.n(i)},u.prototype.new_sym=function(e,t,i,n){return this.symbol.script.add_sym(e,t,i,void 0,n)},u.prototype.select_sym=function(e){this.symbol=this.symbol.script.get_sym(e)},u.prototype.new_var=function(e){var t,i=this.vars;return i.length<=this.vars_index&&i.push(new h(this.symbol)),t=i[this.vars_index++],arguments.length>0&&t.set(e),t},u.prototype.new_unlimited_var=function(e){var t,i=this.vars;return i.length<=this.vars_index&&i.push(new d(this.symbol)),t=i[this.vars_index++],arguments.length>0&&t.set(e),t},u.prototype.new_ctx=function(){return this.ctx.length<=this.ctx_index&&this.ctx.push(new u(this.symbol)),this.ctx[this.ctx_index++]},u.prototype.prepare=function(e){var t,i;for(this.ctx_index=0,this.vars_index=0,t=0;t<this.vars.length;t++)this.vars[t].prepare(e);for(i=0;i<this.ctx.length;i++)this.ctx[i].prepare(e)},u.prototype.maxAdditionalDepth=function(){var e,t,i=0;for(e=0;e<this.vars.length;e++)t=this.vars[e].mindepth,!isNaN(t)&&t>i&&(i=t);return i},u.prototype.stop=function(){this.symbol=null,this.vars=null},h.prototype.valueOf=function(){return this.get(0)},h.prototype.get=function(e){return isNaN(e)&&(e=0),e=e||0,this.hist?e>=this.hist.length?(console.error("not enough depth: "+this),NaN):this._get(e):(this.mindepth=C.max(this.mindepth,e),NaN)},h.prototype._get=function(e){var t=this.hist_pos-e;return t<0&&(t+=this.hist.length),this.hist[t]},h.prototype.set=function(e){this.hist&&(this.hist[this.hist_pos]=e,this.modified=!0)},h.prototype.prepare=function(e){e===this.symbol&&(e.isNewBar?(this.original=this.get(0),!this.modified&&this.hist||this.add_hist()):this.set(this.original),this.modified=!1)},h.prototype.add_hist=function(){var e,t,i;if(!this.hist){for(e=C.na(this.mindepth)?C.max_series_default_size:C.max(this.mindepth+1,1),e=Math.round(e),t=new Array(e),i=0;i<e;i++)t[i]=NaN;this.hist=t,this.hist_pos=-1}this.hist_pos=Math.min(this.hist_pos+1,this.hist.length),this.hist_pos===this.hist.length&&(this.hist_pos=this.hist.length-1,this.hist.shift(),this.hist.push(NaN)),this.hist[this.hist_pos]=this.original},h.prototype.adopt=function(e,t,i){var n,o,r;return this.hist||(this.mindepth=NaN),n=t.get(),o=e.indexOf(n),0!==i&&(r=t.get(1),C.na(r)||(o=o===e.indexOf(r)?-1:o)),
o<0?NaN:this._get(o)},h.prototype.indexOf=function(e){var t,i,n,r;return this.hist?C.na(e)?-1:(t=this.hist.length,i=this.symbol.index+1,n=Math.min(t,i),0===(r=o.upperbound_int(this.hist,e,0,n))?-1:n-r):(this.mindepth=NaN,-1)},r(d,h),d.prototype.add_hist=function(){if(this.hist_pos=this.hist_pos+1,this.hist_pos===this.hist.length){var e=new Float64Array(2*this.hist.length);e.set(this.hist),this.hist=e}this.hist[this.hist_pos]=this.original},p.parseTicker=function(e){var t=e.indexOf(":");return-1===t?e:e.substr(t+1)},p.parsePeriod=function(e){var t,i,n,o,r,s,a;return(t=(e+="").slice(0)).indexOf(",")>=0&&(n=t.split(","),i=p.parsePeriod(n[1]),t=n[0]),o=!1,r=!1,s=t[t.length-1],-1==="DWM".indexOf(s)&&("S"===s?r=!0:(o=!0,s="")),{resolution:s,interval:a=parseInt(o?t:t.length>1?t.slice(0,t.length-1):1),pureResolution:[a,s].join(""),isIntraday:o,isSeconds:r,range:i}},p.newBarBuilder=function(e,t,i){var n=p.parsePeriod(e);return w.newBarBuilder(n.interval+n.resolution,t,i)},p.newSession=function(e){return new w.SessionInfo(e.timezone,e.session,e.holidays,e.corrections)},p.prototype.set_symbolinfo=function(e){for(var t in e||console.error("WARN: symbolinfo isn't defined for "+this.tickerid),this.info=e,this.timezone=b.get_timezone(e.timezone),this.session.init(e.timezone,e.session,e.holidays,e.corrections),this.other_sessions)this.other_sessions.hasOwnProperty(t)&&this.other_sessions[t].init(e.timezone,e.session,e.holidays,e.corrections)},p.prototype.get_session=function(e){if(!e)return this.session;var t=this.other_sessions[e];return t||(t=new w.SessionInfo("Etc/UTC","24x7"),this.other_sessions[e]=t),t},p.prototype.isdwm=function(){return""!==this.resolution&&"S"!==this.resolution},p.prototype.enable_dwm_aligning=function(e,t){this.dwm_aligner=p.newBarBuilder(this.period,e,t)},p.prototype.bartime=function(e,t){var i,n,o,r,s=this.time;return e&&(i=e,t&&(i+=t),(n=this.bb_cache[i])||(o=this.get_session(t),n=p.newBarBuilder(e,o),this.bb_cache[i]=n),s=n.alignTime(s)),!this.isdwm()||isNaN(s)?s:(r=b.utc_to_cal(this.timezone,s),this.session.spec.correctTradingDay(r),b.cal_to_utc(this.timezone,r))},p.prototype.lastbar=function(e){var t,i;isNaN(e.time)||(t=e.time,this.dwm_aligner&&(this.dwm_aligner.moveTo(t),t=this.dwm_aligner.startOfBar(0)),(i=this.time!==t)&&this.index>=0&&!this.isBarClosed&&(this.isNewBar=!1,this.isBarClosed=!0,this.script.calc(this)),this.time=t,this.open=e.open,this.high=e.high,this.low=e.low,this.close=e.close,this.volume=e.volume,this.updatetime=e.updatetime,this.isNewBar=i,this.isBarClosed=e.isBarClosed,this.isLastBar=e.isLastBar,this.isNewBar&&this.index++,this.script.calc(this))},_.prototype.calc=function(e){var t,i,n=this.ctx,o=this.body;n.prepare(e),t=o.main(n,this.inputCallback),i=this,this.out&&t&&(!isNaN(n.symbol.time)||t.nonseries)&&(t.nonseries?("projection"===t.type&&(t.projectionTime=n.symbol.time),this.nonseriesOut(n.symbol,t)):t.bars?t.bars.forEach(function(e){i.out(n.symbol,e)}):this.out(n.symbol,t))},_.prototype.init=function(){var e=this.ctx,t=this.body;t.init&&t.init(e,this.inputCallback),
t.main(e,this.inputCallback)},_.prototype.add_sym=function(e,t,i,n,o){var r=this.runner.add_sym(e,t,i,this,n,o);return this.symbols.push(r),r.isdwm()&&this.symbols.length>1&&r.enable_dwm_aligning(this.symbols[0].session,r.session),r},_.prototype.maxAdditionalDepth=function(){return this.ctx.maxAdditionalDepth()},_.prototype.stop=function(){this.symbols=null,this.ctx.stop(),this.ctx=null},_.prototype.get_sym=function(e){return this.symbols[e]},f.prototype.add_sym=function(e,t,i,n,o,r){var s=new p(e,t,i,n,o,r);return this.symbols.push(s),s},f.prototype.get_sym=function(e){return this.symbols[e]},f.prototype.out=function(e,t){if(this.nonseriesUpdate){var i=Object.assign({},this.nonseriesUpdate);t.splice(0,0,e.time),i.lastBar=t,this.host.nonseriesOut(e,i)}else this.host.out(e,t)},f.prototype.start=function(){function e(e,n){var r=f.feed.subscribe(e.tickerid,e.period,e.periodBase,e.periodForInitialRange,function(i){"series"===(i.nonseries?"nonseries":"series")?t.update(n,i):i.lastBar?(t.nonseriesUpdate=i,i.lastBar.isLastBar=!0,t.symbols[0].lastbar(i.lastBar),t.nonseriesUpdate=null):s.nonseriesOut(e,i)},s.onErrorCallback,s.symbolInfo,s.sessionId,s.rangeExtension,o);i.push(r)}var t,i,n,o,r,s=this.host;for(this._script=new _(s.tickerid,s.period,s.periodBase||s.period,s.periodForInitialRange,this,s.body,this.out.bind(this),s.input,s.symbolInfo.minmov/s.symbolInfo.pricescale,s.nonseriesOut),t=this,i=[],n=this.symbols,o=(s.additionalBarsCount||0)+t._script.maxAdditionalDepth(),r=0;r<n.length;r++)e(n[r],r);this.subscription=i},f.prototype.stop=function(){var e,t=this.subscription;if(t||this._script){for(e=0;e<t.length;e++)f.feed.unsubscribe(t[e]);this.subscription=null,this._script.stop(),this._script=null,this.symbols=null}else console.warn("Recurring script engine stop happened.")},f.prototype.update=function(e,t){var i,n;t?(i=this.symbols[e],this.isRecalculated?((n=t.bar(t.count()-1)).isBarClosed=t.isLastBarClosed(),n.isLastBar=!0,i.lastbar(n)):this.barsets[e]||(this.barsets[e]=t,i.set_symbolinfo(t.symbolinfo()),this.recalc())):console.error("Unexpected barset = null")},f.prototype.recalc=function(){var e,t,i,n,o,r,s,a=this.symbols;for(e=0;e<a.length;e++)if(!this.barsets[e])return;for(t=a.length-1;t>=0;t--)for(i=a[t],o=(n=this.barsets[t]).count(),r=0;r<o;r++)(s=n.bar(r)).isLastBar=r===o-1,s.isBarClosed=!s.isLastBar||n.isLastBarClosed(),i.lastbar(s);this.isRecalculated=!0,this.barsets[0]&&this.barsets[0].endOfData&&this.host.setNoMoreData(),this.host.recalc(this,{endOfData:this.barsets[0].endOfData,nextTime:this.barsets[0].nextTime})},f.feed={subscribe:function(e,t,i,n){console.error("must be initialized with setupFeed")},unsubscribe:function(e){console.error("must be initialized with setupFeed")}},m.prototype.stop=function(){this.runner.stop()},y.prototype.symbolinfo=function(){return this.info},y.prototype.isLastBarClosed=function(){return this.isBarClosed},y.prototype.setLastBarClosed=function(e){this.isBarClosed=e},y.prototype.bar=function(e){return this.bars[e]},y.prototype.count=function(){return this.bars.length},
y.prototype.add=function(e,t){var i=e,n=this.bars,o=n.length,r=i.time,s=0===o?NaN:n[o-1].time,a=0===o||s<r;a?n.push(i):s===r?n[o-1]=i:console.error("time order violation, prev: "+new Date(s).toUTCString()+", cur: "+new Date(r).toUTCString()),this.isBarClosed=!!t},g.prototype.init=function(e){this.bb=p.newBarBuilder(this.period,e.symbol.session),this.bbEmptyBars=this.generateEmptyBars?p.newBarBuilder(this.period,e.symbol.session):void 0},g.prototype.extrapolate=function(e,t){return isNaN(e)||isNaN(t)?void 0:P(this.bbEmptyBars,e,t,Number.MAX_SAFE_INTEGER,!0).times},g.prototype.main=function(e){var t=e.symbol.time,i=this.bb.alignTime(t),n=e.new_var(i),o=C.na(i),r=n.get(1),s=C.na(r)?1:C.neq(i,r),a=e.new_var(),l=e.new_var(),c=e.new_var(),u=e.new_var(),h=a.get(1),d=l.get(1),p=c.get(1),_=u.get(1),f=o?NaN:s?C.open(e):h,m=o?NaN:s?C.high(e):C.max(C.high(e),d),y=o?NaN:s?C.low(e):C.min(C.low(e),p),g=o?NaN:C.close(e),v=o?NaN:s?C.volume(e):C.volume(e)+_,S=o?NaN:t,b=e.symbol.isBarClosed&&this.bb.isLastBar(0,t),w=this.generateEmptyBars&&s?this.extrapolate(r,i):void 0,P=e.new_var(C.close(e)),T=P.get(1),x=w instanceof Array?T:NaN;return a.set(f),l.set(m),c.set(y),u.set(v),[i,f,m,y,g,v,S,b,w,x]},v.prototype.main=function(e){var t=C.open(e),i=C.high(e),n=C.low(e),o=C.close(e),r=C.volume(e),s=C.updatetime(e);return[t,i,n,o,r,s]},{Std:C,Series:h,Symbol:p,SymbolInfo:function(e,t){this.timezone=e||"America/New_York",this.session=t||"0000-0000"},StudyEngine:m,BarSet:y,OHLCV:v,BarBuilder:g,setupFeed:function(e){f.feed=e}}}();e.exports=l}).call(this,i("yLpj"))},odCa:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolCallout";var r=t||n.createProperties();o.call(this,e,r),this._barOffset=0,this._timeScale=e.timeScale(),i.e("lt-pane-views").then(function(e){var t=i("B4Hi").CalloutPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("fgLi").DataSource,s=i("tc+8"),a=i("Ocx9").DefaultProperty,l=i("hayr").propertyPages,c=i("jTis").CalloutConsts,u=window.t("Callout");inherit(n,o),n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return u},n.prototype.name=function(){return"Callout"},n.prototype.correctPoints=function(e){var t=this._currentMovingPoint.index-this._startMovingPoint.index,i=this._currentMovingPoint.price-this._startMovingPoint.price,n=e[1];n.index+=t,n.price+=i,e[1]=n},n.prototype.addPoint=function(e){var t=o.prototype.addPoint.call(this,e);return t&&this._calculateBarOffset(),t},n.prototype._calculateBarOffset=function(){this.points().length>1&&(this._barOffset=this.points()[1].index-this.points()[0].index)},n.prototype.setLastPoint=function(e){o.prototype.setLastPoint.call(this,e),2===this.points().length&&this._calculateBarOffset()},n.prototype.setPoint=function(e,t){var i,n,r,s,a;switch(e){case 0:o.prototype.setPoint.call(this,e,t),this._calculateBarOffset();break;case 1:if(!(i=this.properties()).wordWrapWidth)return;if(n=this._points,r=this._dragStartLeftEdgeIndex,s=Math.round((t.index-r)/2),
isFinite(r)&&isFinite(s)){if(n[1]={index:r+s,price:n[1].price},this._calculateBarOffset(),this.normalizePoints(),a=this._timeScale.indexToCoordinate(r+2*s)-this._timeScale.indexToCoordinate(r)-c.RoundRadius-c.TextMargins,!isFinite(a))return;i.wordWrapWidth.setValue(Math.max(c.MinWidth,a));break}n[1]=t,this._calculateBarOffset(),this.normalizePoints()}},n.prototype.startDragPoint=function(e,t){var i=this.properties();1===e&&i.wordWrap&&i.wordWrap.value()&&(this._dragStartLeftEdgeIndex=2*this.points()[1].index-t.index)},n.prototype.move=function(e,t,i){o.prototype.move.call(this,e,t,i),this._calculateBarOffset()},n.prototype.state=function(e){var t=o.prototype.state.call(this,e);return t.barOffset=this._barOffset,t},n.prototype.restoreData=function(e){e.barOffset?this._barOffset=e.barOffset:this._calculateBarOffset(),this._calculatePoint2()},n.prototype.setPriceScale=function(e){r.prototype.setPriceScale.call(this,e),e&&e.priceRange()&&this._calculatePoint2()},n.prototype.template=function(){var e=o.prototype.template.call(this);return e.text=this.properties().childs().text.value(),e},n.prototype._applyTemplateImpl=function(e){o.prototype._applyTemplateImpl.call(this,e),this.properties().childs().text.setValue(e.text)},n.prototype._calculatePoint2=function(){var e,t;this._model.lineBeingEdited()===this||this._model.sourcesBeingMoved().includes(this)||this._points.length<2||(e=this.points()[0],t=this.points()[1],this._points[1]={price:t.price,index:e.index+this._barOffset})},n.prototype.getStylesPropertyPage=function(){return l.LineToolCalloutStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("xhf0").CalloutDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new a("linetoolcallout",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e),e.hasChild("text")||e.addChild("text",new s(window.t("Text"))),e.addExclusion("text")},t.LineToolCallout=n},oiZD:function(e,t,i){"use strict";function n(e){s.setValue(e)}var o,r,s;i.r(t),o=i("hY0g"),r=i.n(o),i.d(t,"watchedTheme",function(){return s}),i.d(t,"setTheme",function(){return n}),(s=new r.a).subscribe(function(e){!function(e,t){var i,n,o,r,s;for(void 0===t&&(t=window),i="theme-"+e,n=t.document.documentElement.classList,o=0,r=Array.from(n);o<r.length;o++)(s=r[o]).startsWith("theme-")&&s!==i&&n.remove(s);n.add(i)}(e,window)})},okVO:function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"SyncModel",function(){return s}),n=i("IiTo"),o=i("IDnv"),r=0,s=function(){function e(e,t){this._extrapolatedData=[],this._modelId=r++,this._builderCache=null,this._resolution=t,this._symbolInfo=e,this._valid=Boolean(e.timezone)&&Boolean(e.session),this._session=new n.SessionInfo(e.timezone,e.session,e.holidays,e.corrections)}return e.prototype.getSymbolInfo=function(){return this._symbolInfo},e.prototype.getSession=function(){return this._session},e.prototype.getResolution=function(){
return this._resolution},e.prototype.uniqueId=function(){return this._modelId},e.prototype.distance=function(e,t){var i,n,r,s,a;return this.isValid()?(r=null!==(n=0!==(i=this._extrapolatedData.length)?this._extrapolatedData[0]:null)?this._extrapolatedData[i-1]:null,1e3*e!==n&&(this._extrapolatedData=[1e3*e],n=null,r=null),(null===n||null!==r&&1e3*t>r)&&(s=Object(o.extrapolateBarsFrontToTime)(this._barBuilder(),r||1e3*e,1e3*t,2e3,!0),this._extrapolatedData=this._extrapolatedData.concat(s.times),i=this._extrapolatedData.length),(r=this._extrapolatedData[i-1])<1e3*t?{success:!1}:-1===(a=this._extrapolatedData.indexOf(1e3*t))?{success:!1}:{success:!0,result:a}):{success:!1}},e.prototype.projectTime=function(e,t){var i,n,r,s;return this.isValid()?(r=null!==(n=(i=this._extrapolatedData.length)>0?this._extrapolatedData[0]:null)?this._extrapolatedData[i-1]:null,1e3*e!==n&&(this._extrapolatedData=[1e3*e],n=null,r=null),(null===n||t>=i)&&(s=Object(o.extrapolateBarsFrontByCount)(this._barBuilder(),r||1e3*e,t-i+1,!0),this._extrapolatedData=this._extrapolatedData.concat(s.times),i=this._extrapolatedData.length),i<t?e:this._extrapolatedData[t]/1e3):e},e.prototype.isValid=function(){return this._valid},e.prototype._barBuilder=function(){return null===this._builderCache&&(this._builderCache=Object(n.newBarBuilder)(this._resolution,this._session,this._session)),this._builderCache},e}()},onDC:function(e,t,i){"use strict";function n(e,t){var i=new Set,n=function(t){e.children(t,!1).forEach(function(e){i.has(e)||(i.add(e),n(e))})};return t.forEach(n),t.filter(function(e){return!i.has(e)}).map(function(t){return function e(t,i){var n,o=[],r=t.children(i,!1);for(n=0;n<r.length;n++)o=o.concat(e(t,r[n]));return o.push(i),o}(e,t)}).reduce(function(e,t){return e.concat(t)},[])}function o(e,t){var i,n,o=t[0],r=e.orderedSources().filter(function(e){return e.zorder()<o.zorder()});if(0===r.length)throw new Error("Cannot move backward source that alreadt on back");return i=r[r.length-1],Object(S.isLineTool)(i)&&null!==(n=e.model().lineToolsGroupModel().groupForLineTool(i))&&(i=n.lineTools()[0]),i}function r(e,t){var i,n,o,r=t[t.length-1],s=e.allOrderedSourcesWithoutSpecial().filter(function(e){return e.zorder()>r.zorder()});if(0===s.length)throw new Error("Cannot bring forward source that alreadt on back");return i=s[0],Object(S.isLineTool)(i)&&null!==(n=e.model().lineToolsGroupModel().groupForLineTool(i))&&(i=(o=n.lineTools())[o.length-1]),i}function s(e,t){return Object(c.ensureNotNull)(e.paneForSource(t.lineTools()[0]))}function a(e,t){return{bringForwardEnabled:e.bringForwardEnabled||t.bringForwardEnabled,bringToFrontEnabled:e.bringToFrontEnabled||t.bringToFrontEnabled,sendBackwardEnabled:e.sendBackwardEnabled||t.sendBackwardEnabled,sendToBackEnabled:e.sendToBackEnabled||t.sendToBackEnabled}}var l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P,C,T,x,I,L,M,A,k,E,O,D,V,B,R,N,F,W,j,U,z,H,Y,G,q,K,Z,J,X,Q,$,ee,te,ie,ne,oe,re,se,ae,le,ce,ue,he,de,pe,_e,fe,me,ye,ge,ve,Se,be,we,Pe,Ce;i.r(t),l=i("mrSG"),c=i("Eyy1"),u=i("7MZv"),h=i("4O8T"),d=i.n(h),p=i("uOxu"),
_=window.t("Move All Scales To Left"),f=window.t("Move All Scales To Right"),m=Object(p.getLogger)("Chart.MergeAllScales"),y=i("RDU5"),g=function(e){function t(t,i,n,o,r,s){var a=e.call(this,s)||this;return a._model=t,a._paneIndex=t.panes().indexOf(i),a._targetPosition=o,a._targetIndex=r,a._scaleId=n.id(),a._sourcePosition=i.priceScalePosition(n),"overlay"!==a._sourcePosition&&(a._sourceIndex=i.priceScaleIndex(n,a._sourcePosition)),a}return Object(l.__extends)(t,e),t.prototype.redo=function(){var e=this._model.panes()[this._paneIndex],t=Object(c.ensureNotNull)(e.getPriceScaleById(this._scaleId));e.movePriceScale(t,this._targetPosition,this._targetIndex),this._model.fullUpdate()},t.prototype.undo=function(){var e=this._model.panes()[this._paneIndex],t=Object(c.ensureNotNull)(e.getPriceScaleById(this._scaleId));e.movePriceScale(t,this._sourcePosition,this._sourceIndex),this._model.fullUpdate()},t}(y.UndoCommand),v=i("mMWL"),S=i("CW80"),b=function(e){function t(t,i,n,o){var r=e.call(this,o)||this;return r._createdIds=[],r._model=t,r._withoutShift=n,r._origStates=i.map(function(e){return e.state(!0)}),r}return Object(l.__extends)(t,e),t.prototype.redo=function(){var e=this,t=this._origStates.map(function(t){var i=Object(c.ensureNotNull)(e._model.dataSourceForId(t.id)),n=Object(S.cloneLineTool)(e._model,i,!e._withoutShift),o=Object(c.ensureNotNull)(i.priceScale()),r=Object(c.ensureNotNull)(e._model.paneForSource(i));return r.addDataSource(n,o,!1),e._model.updateSource(n),n});Object(v.drawOnAllCharts)().value()&&this._model.copyToOtherCharts(t),this._createdIds=t.map(function(e){return e.id()})},t.prototype.undo=function(){var e=this;this._createdIds.forEach(function(t){var i=Object(c.ensureNotNull)(e._model.dataSourceForId(t));e._model.removeSource(i)})},t.prototype.newIds=function(){return this._createdIds},t}(y.UndoCommand),i("GVHu"),i("YFKU"),i("HbRj"),w=window.t("Exclude line tools from group {group}"),P=function(e){function t(t,i,n){var o=e.call(this,w.format({group:i.name()}))||this;return o._model=t,o._groupId=i.id,o._groupName=i.name(),o._lineToolsIds=n.map(function(e){return e.id()}),o}return Object(l.__extends)(t,e),t.prototype.redo=function(){var e=this,t=Object(c.ensureNotNull)(this._model.lineToolsGroupModel().groupForId(this._groupId)),i=this._lineToolsIds.map(function(t){return e._model.dataSourceForId(t)});t.excludeLineTools(i),0===t.lineTools().length&&this._model.lineToolsGroupModel().removeGroup(t)},t.prototype.undo=function(){var e=this,t=this._lineToolsIds.map(function(t){return e._model.dataSourceForId(t)}),i=this._model.lineToolsGroupModel().groupForId(this._groupId);null!==i?i.addLineTools(t):this._model.lineToolsGroupModel().createGroup(t,this._groupName,this._groupId)},t}(y.UndoCommand),C=Object(p.getLogger)("Chart.RemoveSourcesCommand"),T=function(e){function t(t,i,o){var r=e.call(this,o)||this;return r._excludeLineToolsUndoCommands=[],r._chartModel=t,r._sourceIds=n(t,i).map(function(e){return e.id()}),r._sourceStates=[],r._paneIndexes=[],r._priceScalePositionIds=[],r._paneStates=[],
r._restorePanes=[],r}return Object(l.__extends)(t,e),t.prototype.removedIds=function(){return this._sourceIds},t.prototype.redo=function(){var e,t,i,n,o=this,r=this._sourceIds.map(function(e){return Object(c.ensureNotNull)(o._chartModel.dataSourceForId(e))});this._sourceStates=r.map(function(e){return Object(c.ensureNotNull)(e.state(!1))}),e=r.map(function(e){return Object(c.ensureNotNull)(o._chartModel.paneForSource(e))}),this._paneIndexes=e.map(function(e){return o._chartModel.panes().indexOf(e)}),t=this._chartModel.lineToolsGroupModel(),i=new Map,r.forEach(function(e){var n,o;Object(S.isLineTool)(e)&&null!==(n=t.groupForLineTool(e))&&((o=i.get(n)||[]).push(e),i.set(n,o))}),i.forEach(function(e,t){var i=new P(o._chartModel,t,e);i.redo(),o._excludeLineToolsUndoCommands.push(i)}),this._priceScalePositionIds=r.map(function(t,i){var n,o;return Object(S.isLineTool)(t)?null:(n=Object(c.ensureNotNull)(t.priceScale()),o=e[i].priceScalePosition(n),{id:n.id(),position:o,priceScaleIndex:e[i].priceScaleIndex(n,o)})}),n=new Set,r.forEach(function(e,t){Object(S.isLineTool)(e)||n.add(o._paneIndexes[t])}),this._paneStates=r.map(function(t,i){var r=o._paneIndexes[i];return n.has(r)?e[i].state():null}),this._restorePanes=r.map(function(e){return o._chartModel.removeSource(e)})},t.prototype.undo=function(){var e,t,i=this,n=[];for(e=this._sourceStates.length-1;e>=0;e--)t=this._chartModel.restoreSource(this._restorePanes[e],this._paneIndexes[e],this._paneStates[e],this._sourceStates[e],this._priceScalePositionIds[e]),n.push(t);n.some(function(e,t){return e.id()!==i._sourceIds[n.length-t-1]})&&C.logError("Source was restored improperly - source ids does not match"),this._excludeLineToolsUndoCommands.forEach(function(e){return e.undo()})},t}(y.UndoCommand),x=i("HGup"),I=i("jRfx"),L=i("s1Gx"),M=function(e){function t(t,i,n,o){var r=e.call(this,"Create line "+n,!1)||this;return r._lineId=null,r._lineState=null,r._model=t,r._paneIndex=t.panes().indexOf(i),r._lineTool=n,r._ownerSourceId=o.id(),r}return Object(l.__extends)(t,e),t.prototype.startCreatingLine=function(e,t,i){var n=this._model.panes()[this._paneIndex],o=this._model.dataSourceForId(this._ownerSourceId),r=this._model.createLineTool(n,e,this._lineTool,t,i,o);return this._lineId=r.id(),!this._model.lineBeingCreated()},t.prototype.continueCreatingLine=function(e,t,i){return this._model.coninueCreatingLine(e,t,i)},t.prototype.line=function(){return null===this._lineId?null:this._model.dataSourceForId(this._lineId)},t.prototype.undo=function(){var e=Object(c.ensureNotNull)(this.line());this._lineState=e.state(!1),this._model.removeSource(e),this._lineId=null},t.prototype.redo=function(){var e=this._model.restoreSource(!1,this._paneIndex,null,Object(c.ensureNotNull)(this._lineState),null);this._lineId=e.id(),this._lineState=null},t}(y.UndoCommand),A=function(e){function t(t,i,n){var o=e.call(this,n)||this;return o._sourcesByPanes=new Map,o._originalState=new Map,o._model=t,i.forEach(function(e){
var i=Object(c.ensureNotNull)(t.paneForSource(e)),n=t.panes().indexOf(i),r=o._sourcesByPanes.get(n)||[];r.push(e.id()),o._sourcesByPanes.set(n,r)}),Array.from(o._sourcesByPanes.keys()).forEach(function(e){var i=t.panes()[e],n=new Map;i.allOrderedSources().forEach(function(e){n.set(e.id(),e.zorder())}),o._originalState.set(e,n)}),o}return Object(l.__extends)(t,e),t.prototype.undo=function(){var e=this;this._originalState.forEach(function(t,i){var n=e._model.panes()[i],o=new Map;t.forEach(function(e,t){var i=Object(c.ensureNotNull)(n.dataSourceForId(t));o.set(i,e)}),n.setZOrders(o)})},t.prototype.redo=function(){var e=this;this._sourcesByPanes.forEach(function(t,i){var n=e._model.panes()[i],o=t.map(function(e){return Object(c.ensureNotNull)(n.dataSourceForId(e))});e._paneOperation(n,o)})},t}(y.UndoCommand),k=function(e){function t(t,i){return e.call(this,t,i,"Bring "+i[0].title()+" to front")||this}return Object(l.__extends)(t,e),t.prototype._paneOperation=function(e,t){e.bringToFront(t)},t}(A),E=function(e){function t(t,i){return e.call(this,t,i,"Send "+i[0].title()+" to back")||this}return Object(l.__extends)(t,e),t.prototype._paneOperation=function(e,t){e.sendToBack(t)},t}(A),O=function(e){function t(t,i,n,o){var r=e.call(this,t,i,o)||this;return r._targetSource=n,r}return Object(l.__extends)(t,e),t.prototype._paneOperation=function(e,t){e.insertAfter(t,this._targetSource)},t}(A),D=function(e){function t(t,i,n){return e.call(this,t,i,n,"Insert "+i[0].title()+" after "+n.title())||this}return Object(l.__extends)(t,e),t}(O),V=function(e){function t(t,i,n,o){var r=e.call(this,t,i,o)||this;return r._targetSource=n,r}return Object(l.__extends)(t,e),t.prototype._paneOperation=function(e,t){e.insertBefore(t,this._targetSource)},t}(A),B=function(e){function t(t,i,n){return e.call(this,t,i,n,"Insert "+i[0].title()+" before "+n.title())||this}return Object(l.__extends)(t,e),t}(V),R=function(e){function t(t,i,n){return e.call(this,t,n,o(i,n),"Send "+n[0].title()+" backward")||this}return Object(l.__extends)(t,e),t}(V),N=function(e){function t(t,i,n){return e.call(this,t,n,r(i,n),"Send "+n[0].title()+" backward")||this}return Object(l.__extends)(t,e),t}(O),F=function(e){function t(t,i){return e.call(this,t,i.lineTools(),o(s(t,i),i.lineTools()),"Send Group "+i.name()+" backward")||this}return Object(l.__extends)(t,e),t}(V),W=function(e){function t(t,i){return e.call(this,t,i.lineTools(),r(s(t,i),i.lineTools()),"Bring Group "+i.name()+" backward")||this}return Object(l.__extends)(t,e),t}(O),j=i("ogJP"),U=function(e){function t(t,i,n){var o=e.call(this,"Rearrange panes")||this;return o._chartModel=t,o._index=i,Object(j.isNumber)(n)?o._dstIndex=n:o._dstIndex="up"===n?i-1:i+1,o}return Object(l.__extends)(t,e),t.prototype.redo=function(){this._checkIndices()&&this._chartModel.movePane(this._index,this._dstIndex)},t.prototype.undo=function(){this._checkIndices()&&this._chartModel.movePane(this._dstIndex,this._index)},t.prototype._checkIndices=function(){var e=this._chartModel.panes().length
;return this._index>=0&&this._index<e&&this._dstIndex>=0&&this._dstIndex<e},t}(y.UndoCommand),z=i("XcdR"),H=i("Fixu"),Y=i("Ocx9"),G=i("n5al"),q=i("PT1i"),K=i("pPtI"),Z=function(e){function t(t,i,n,o,r,s){var a=e.call(this,o)||this;return a._prevPriceAxisProps={},a._property=t,a._mainSeries=n,a._value=i,a._model=r,a._chartWidget=s,a}return Object(l.__extends)(t,e),t.prototype.redo=function(){var e,t,i,n=this._mainSeries,o=n.properties();o.style===this._property&&n.isNeedRestart(this._value)&&this._chartWidget.screen.show(),this._prevResolution=o.interval.value(),this._prevValue=this._property.value(),this._storePriceAxisProps(),Object(Y.saveDefaultProperties)(!0),e=o.interval.value(),t=this._model.defaultResolutions(),i=Object(K.getResolutionByChartStyle)(this._value,e,t),q.linking.interval.setValue(i),n.setChartStyleWithIntervalIfNeeded(this._value,i),Object(G.setLastUsedStyle)(this._value),Object(G.preparePriceAxisProperties)(o),Object(Y.saveDefaultProperties)(!1),this._invalidateModel()},t.prototype.undo=function(){var e=this._mainSeries,t=e.properties();t.style===this._property&&e.isNeedRestart(this._value)&&this._chartWidget.screen.show(),Object(Y.saveDefaultProperties)(!0),e.setChartStyleWithIntervalIfNeeded(this._prevValue,this._prevResolution),this._restorePriceAxisProps(),q.linking.interval.setValue(this._prevResolution),Object(Y.saveDefaultProperties)(!1),this._invalidateModel()},t.prototype._storePriceAxisProps=function(){var e=this._mainSeries.priceScale();this._prevPriceAxisProps=e.mode()},t.prototype._restorePriceAxisProps=function(){this._mainSeries.priceScale().setMode(this._prevPriceAxisProps)},t.prototype._invalidateModel=function(){this._model&&(this._model.recalculateAllPanes(),this._model.lightUpdate())},t}(y.UndoCommand),J=function(e){function t(t,i){var n=e.call(this,"Change date range")||this;return n._modelsData=[],n._rangeOptions=i,n._modelsData.push({model:t,prevResolution:t.mainSeries().properties().interval.value(),barSpacing:t.timeScale().barSpacing(),rightOffset:t.timeScale().rightOffset(),rangeOptions:t.appliedTimeFrame().state()}),n}return Object(l.__extends)(t,e),t.prototype.redo=function(){var e,t,i,n,o,r,s,a,l,c,u=[];for(e=0,t=this._modelsData;e<t.length;e++)o=(n=(i=t[e]).model.mainSeries()).properties().interval,this._rangeOptions.res!==o.value()?(u.push(o),n.setDefaultTimeframe(this._rangeOptions.val),o.setValueSilently(this._rangeOptions.res)):n.loadDataTo(this._rangeOptions.val),(r=i.model.appliedTimeFrame()).merge(this._rangeOptions);for(s=0,a=u;s<a.length;s++)(o=a[s]).listeners().fire(o);for(l=0,c=this._modelsData;l<c.length;l++)(r=(i=c[l]).model.appliedTimeFrame()).listeners().fire(r)},t.prototype.undo=function(){var e,t,i,n,o,r,s,a,l=[];for(e=0,t=this._modelsData;e<t.length;e++)n=(i=t[e]).model.mainSeries().properties().interval,(o=i.prevResolution!==n.value())&&(l.push(n),n.setValueSilently(i.prevResolution)),i.model.appliedTimeFrame().merge(i.rangeOptions),(r=i.model.timeScale()).setBarSpacing(i.barSpacing),r.setRightOffset(i.rightOffset),o||(i.model.recalculateAllPanes(),
i.model.lightUpdate());for(s=0,a=l;s<a.length;s++)(n=a[s]).listeners().fire(n)},t.prototype.canMerge=function(e){return e instanceof t&&(e._rangeOptions.res===this._rangeOptions.res&&e._rangeOptions.val===this._rangeOptions.val)},t.prototype.merge=function(e){if(!(e instanceof t))throw new Error("Invalid command to merge");this._modelsData=this._modelsData.concat(e._modelsData)},t}(y.UndoCommand),X=i("beCu"),Q=i("UqOQ"),$=function(e){function t(t,i,n){var o=e.call(this,n)||this;return o._model=t,o._groupId=i.id,o._groupName=i.name(),o._lineToolsIds=i.lineTools().map(function(e){return e.id()}),o}return Object(l.__extends)(t,e),t.prototype.redo=function(){var e=Object(c.ensureNotNull)(this._model.lineToolsGroupModel().groupForId(this._groupId));this._model.lineToolsGroupModel().removeGroup(e)},t.prototype.undo=function(){var e=this,t=this._lineToolsIds.map(function(t){return e._model.dataSourceForId(t)}),i=new Q.a(t,this._groupName,this._groupId);this._model.lineToolsGroupModel().addGroup(i)},t}(y.UndoCommand),ee=window.t("Create line tools group"),te=function(e){function t(t,i){var n=e.call(this,ee)||this;return n._groupId=null,n._model=t,n._sourcesIds=i.map(function(e){return e.id()}),n}return Object(l.__extends)(t,e),t.prototype.redo=function(){var e=this,t=this._sourcesIds.map(function(t){return e._model.dataSourceForId(t)}),i=null===this._groupId?void 0:this._groupId;this._groupId=this._model.lineToolsGroupModel().createGroup(t,this._title,i).id},t.prototype.undo=function(){var e=Object(c.ensureNotNull)(this._model.lineToolsGroupModel().groupForId(Object(c.ensureNotNull)(this._groupId)));this._model.lineToolsGroupModel().removeGroup(e)},t.prototype.createdGroupId=function(){return this._groupId},t}(y.UndoCommand),ie=window.t("Add line tool(s) {lineTool} to group {group}"),ne=function(e){function t(t,i,n){var o=e.call(this,ie.format({group:i.name()}))||this;return o._model=t,o._groupId=i.id,o._lineToolsIds=n.map(function(e){return e.id()}),o}return Object(l.__extends)(t,e),t.prototype.redo=function(){var e=this,t=Object(c.ensureNotNull)(this._model.lineToolsGroupModel().groupForId(this._groupId)),i=this._lineToolsIds.map(function(t){return e._model.dataSourceForId(t)});t.addLineTools(i)},t.prototype.undo=function(){var e=this,t=this._lineToolsIds.map(function(t){return e._model.dataSourceForId(t)}),i=Object(c.ensureNotNull)(this._model.lineToolsGroupModel().groupForId(this._groupId));i.excludeLineTools(t)},t}(y.UndoCommand),oe=i("bJYc"),re=function(e){function t(t,i,n,o){var r=e.call(this,o)||this;return r._chartModel=t,r._groupId=i.id,r._oldName=i.name(),r._newName=n,r}return Object(l.__extends)(t,e),t.prototype.redo=function(){Object(c.ensureNotNull)(this._chartModel.lineToolsGroupModel().groupForId(this._groupId)).setName(this._newName)},t.prototype.undo=function(){Object(c.ensureNotNull)(this._chartModel.lineToolsGroupModel().groupForId(this._groupId)).setName(this._oldName)},t}(y.UndoCommand),se=window.t("Create line tools group from selection"),ae=window.t("Removing line tools group {name}"),
le=window.t("Add line tool {lineTool} to group {name}"),ce=window.t("Make group {group} visible"),ue=window.t("Make group {group} invisible"),he=window.t("Lock group {group}"),de=window.t("Unlock group {group}"),pe=window.t("Rename group {group} to {newName}"),_e=function(){function e(e){this._environment=e}return e.prototype.createGroupFromSelection=function(){var e,t,i,n,o,r,s,a,l,u,h=this,d=this._environment.model();return Object(c.assert)(!d.selection().isEmpty(),"Cannot create group from empty selection"),e=Object(L.sortSources)(d.selection().sources()),Object(c.assert)(e.every(function(e){return Object(S.isLineTool)(e)}),"A group could contain line tools only"),i=t=e.reduce(function(e,t){return e.zorder()>t.zorder()?e:t},e[0]),null!==(n=d.lineToolsGroupModel().groupForLineTool(t))&&(i=(o=n.lineTools())[o.length-1]),this._environment.beginUndoMacro(se),r=new Map,s=new Set,e.forEach(function(e){var t,i,n=h._groupForLineTool(e);null!==n&&((t=r.get(n)||[]).push(e),r.set(n,t),i=Object(c.ensureNotNull)(d.paneForSource(e)),s.add(i))}),Object(c.assert)(s.size<=1,"All selected sources should be on the same pane"),r.forEach(function(e,t){var i=new P(d,t,e);h._environment.pushUndoCommand(i)}),a=new te(d,Object(L.sortSources)(e)),this._environment.pushUndoCommand(a),l=new D(d,e,i),this._environment.pushUndoCommand(l),this._environment.endUndoMacro(),u=Object(c.ensureNotNull)(a.createdGroupId()),Object(c.ensureNotNull)(d.lineToolsGroupModel().groupForId(u))},e.prototype.removeGroup=function(e){var t,i,n=this._environment.model(),o=e.lineTools();this._environment.beginUndoMacro(ae.format({name:e.name()})),t=new $(n,e,""),this._environment.pushUndoCommand(t),i=new T(n,o,""),this._environment.pushUndoCommand(i),o.forEach(function(e){null!==e.getLinkKey()&&Object(v.removeLineTool)({model:n,linkKey:Object(c.ensureNotNull)(e.getLinkKey())})}),this._environment.endUndoMacro()},e.prototype.groups=function(){return this._environment.model().lineToolsGroupModel().groups()},e.prototype.excludeLineToolFromGroup=function(e,t){var i=this._environment.model(),n=new P(i,e,[t]);this._environment.pushUndoCommand(n)},e.prototype.addLineToolToGroup=function(e,t){var i,n=this._environment.model(),o=n.lineToolsGroupModel().groupForLineTool(t);o!==e&&(i=le.format({lineTool:t.title(),name:e.name()}),this._environment.beginUndoMacro(i),null!==o&&this._environment.pushUndoCommand(new P(n,o,[t])),this._environment.pushUndoCommand(new ne(n,e,[t])),this._environment.endUndoMacro())},e.prototype.bringToFront=function(e){var t=this._environment.model(),i=new k(t,e.lineTools());this._environment.pushUndoCommand(i),this._environment.emitEvent("changeZOrder",[e.lineTools()])},e.prototype.sendToBack=function(e){var t=this._environment.model(),i=new E(t,e.lineTools());this._environment.pushUndoCommand(i),this._environment.emitEvent("changeZOrder",[e.lineTools()])},e.prototype.bringForward=function(e){var t=this._environment.model(),i=new W(t,e);this._environment.pushUndoCommand(i),this._environment.emitEvent("changeZOrder",[e.lineTools()])},
e.prototype.sendBackward=function(e){var t=this._environment.model(),i=new F(t,e);this._environment.pushUndoCommand(i),this._environment.emitEvent("changeZOrder",[e.lineTools()])},e.prototype.insertAfter=function(e,t){var i,n,o,r=this._environment.model();i=t instanceof Q.a?(n=t.lineTools())[n.length-1]:t,o=new D(r,e.lineTools(),i),this._environment.pushUndoCommand(o),this._environment.emitEvent("changeZOrder",[e.lineTools()])},e.prototype.insertBefore=function(e,t){var i,n,o=this._environment.model();i=t instanceof Q.a?t.lineTools()[0]:t,n=new B(o,e.lineTools(),i),this._environment.pushUndoCommand(n),this._environment.emitEvent("changeZOrder",[e.lineTools()])},e.prototype.availableZOrderOperations=function(e){var t=this._environment.model(),i=e.lineTools(),n=i[0],o=i[i.length-1],r=Object(c.ensureNotNull)(t.paneForSource(i[0])),s=r.allOrderedSourcesWithoutSpecial(),a=s[0],l=s[s.length-1];return{bringForwardEnabled:o!==l,bringToFrontEnabled:o!==l,sendBackwardEnabled:n!==a,sendToBackEnabled:n!==a}},e.prototype.setGroupVisibility=function(e,t){var i=this,n=(t?ce:ue).format({group:e.name()}),o=this._environment.model();this._environment.beginUndoMacro(n),e.lineTools().forEach(function(e){var n=e.properties().visible,r=new oe.SetPropertyUndoCommand(n,t,"",o);i._environment.pushUndoCommand(r)}),this._environment.endUndoMacro()},e.prototype.setGroupLock=function(e,t){var i=this,n=(t?he:de).format({group:e.name()}),o=this._environment.model();this._environment.beginUndoMacro(n),e.lineTools().forEach(function(e){var n=e.properties().frozen,r=new oe.SetPropertyUndoCommand(n,t,"",o);i._environment.pushUndoCommand(r)}),this._environment.endUndoMacro()},e.prototype.setGroupName=function(e,t){var i=this._environment.model(),n=pe.format({group:e.name(),newName:t}),o=new re(i,e,t,n);this._environment.pushUndoCommand(o)},e.prototype.canBeGroupped=function(e){var t=this._environment.model(),i=new Set(e.map(function(e){return t.paneForSource(e)}));return i.size<=1},e.prototype._groupForLineTool=function(e){return this._environment.model().lineToolsGroupModel().groups().find(function(t){return t.containsLineTool(e)})||null},e}(),fe=i("3ClC"),me=!1,ye=window.t("Apply study template {template}"),ge=function(e){function t(t,i,n){var o=e.call(this,ye.format({template:n}))||this;return o._model=t,o._templateContent=i,o._initialState=t.studyTemplate(),o._initialGroupsState=t.lineToolsGroupModel().state(),o}return Object(l.__extends)(t,e),t.prototype.redo=function(){var e,t=this._merge(this._templateContent),i=t.filter(S.isLineTool),n=this._model.lineToolsGroupModel();n.removeLineTools(i),this._model.mainSeries().onChartStyleChanged(),e=this._model.mainSeries().properties(),Object(G.preparePriceAxisProperties)(e),this._model.recalcVisibleRangeStudy(this._model.dataSources(),!0)},t.prototype.undo=function(){this._merge(this._initialState),me&&this._model.restoreLineToolsGroups(this._initialGroupsState),this._model.mainSeries().onChartStyleChanged()},t.prototype._merge=function(e){
var t,i,o,r,s,a,l,c,u,h,d,p,_,f,m,y,g=this._model,v=g.mainSeries();for(v.priceScale().properties().lockScale.setValue(!1),e.interval&&(t=Object(G.getChartStyleByResolution)(e.interval,v.properties().style.value()),v.setChartStyleWithIntervalIfNeeded(t,e.interval)),[],o=[],r=(i=g.panes()).length;r--;)for(a=(s=i[r]).containsMainSeries(),c=(l=s.dataSources()).length;c--;)u=l[c],(!a||Object(fe.isStudy)(u)&&u.isRemovedByStudyTemplates())&&o.push(u);for(g.resetDeferredStudies(),h=n(g,o),d=0;d<h.length;++d)g.removeSource(h[d]);for(p=e.panes,function(e,t){return e.dataSources().some(function(e){return e instanceof AlertLabel&&e.alert().id===t.alert().id})},r=0;r<p.length;r++){for(_=!1,f=p[r],c=0;c<f.sources.length;c++)"MainSeries"===(u=f.sources[c]).type&&(delete u.state,_=!0);if((s=_?i[r]:g.createPane(r)).restoreState(p[r],!1,e.version),_)for(y=(m=g.mainSeries()).priceScale(),l=s.orderedSources(),d=0;d<l.length;d++)u=l[d],Object(S.isLineTool)(u)&&u.ownerSource()===m&&(u.setPriceScale(y),y.addDataSource(u));0}return g.syncESD(),v.priceScale().setMode({autoScale:!0}),g.setVersion(e.version),g.startNotStartedStudies(),g.recalculateAllPanes(),g.fullUpdate(),h},t}(y.UndoCommand),i.d(t,"ChartUndoModelBase",function(){return Ce}),ve=window.t("Send {title} backward"),Se=window.t("Bring {title} forward"),be=window.t("Insert {title} after {target}"),we=window.t("Insert {title} before {target}"),Pe=window.t("Create {name} line tool"),Ce=function(e){function t(t){var i=e.call(this)||this;return i._createLineCommand=null,i._initialTimeScrollState=null,i._initialTimeScrollPos=null,i._undoHistory=t,i._lineToolsGroupController=new _e({model:i._model.bind(i),pushUndoCommand:i._pushUndoCommand.bind(i),beginUndoMacro:i._undoHistory.beginUndoMacro.bind(i._undoHistory),endUndoMacro:i._undoHistory.endUndoMacro.bind(i._undoHistory),emitEvent:i.emitEvent.bind(i)}),i}return Object(l.__extends)(t,e),t.prototype.undoHistory=function(){return this._undoHistory},t.prototype.lineToolsGroupController=function(){return this._lineToolsGroupController},t.prototype.mergeAllScales=function(e){!function(e,t){e.beginUndoMacro("left"===t?_:f),e.model().panes().forEach(function(i){var n="left"===t?i.rightPriceScales():i.leftPriceScales(),o="left"===t?i.leftPriceScales():i.rightPriceScales(),r=o.concat(n),s=i.priceScalePosition(i.defaultPriceScale()),a="overlay"===s?r[0]:i.defaultPriceScale();e.movePriceScale(i,a,t,0),r.forEach(function(t){var n,o;if(t!==a)for(n=t.mainSource();null!==n;){if(e.moveToScale(n,i,a,""),(o=t.mainSource())===n){m.logError("Loop detected while trying to merge scales");break}n=o}})}),e.endUndoMacro(),e.model().fullUpdate()}(this,e)},t.prototype.movePriceScale=function(e,t,i,n){var o=new g(this._model(),e,t,i,n,window.t("Move scale"));this._pushUndoCommand(o)},t.prototype.createLineTool=function(e,t,i,n,o,r){var s,a,l,h=Pe.format({name:i});return"LineToolRegressionTrend"!==i||this.canCreateStudy()?(this.beginUndoMacro(h),this._createLineCommand=new M(this._model(),e,i,r||Object(c.ensureNotNull)(e.mainDataSource())),
s=this._createLineCommand.startCreatingLine(t,n,o||null),a=Object(c.ensureNotNull)(this._createLineCommand.line()),s&&(this._pushUndoCommand(this._createLineCommand),this._createLineCommand=null),void 0===o&&Object(v.drawOnAllCharts)().value()&&!a.properties().singleChartOnly&&(l=Object(c.ensureNotNull)(this.model().externalTimeStamp(t.index)),Object(v.createLineTool)({point:{price:t.price,timeStamp:l},linetool:i,properties:a.properties(),symbol:this.mainSeries().symbol(),model:this.model(),linkKey:Object(c.ensureNotNull)(a.getLinkKey())})),this.endUndoMacro(),a):(Object(u.showTooManyStudiesNotice)(),null)},t.prototype.coninueCreatingLine=function(e,t,i){var n,o,r,s,a=Object(c.ensureNotNull)(this._createLineCommand);return this.beginUndoMacro(a.text()),n=Object(c.ensureNotNull)(this._model().lineBeingCreated()),r=null,(o=a.continueCreatingLine(e,t,i))&&(this._pushUndoCommand(a),this._createLineCommand=null,r={points:n.normalizedPoints(),interval:this.mainSeries().interval()}),Object(v.drawOnAllCharts)().value()&&!n.properties().singleChartOnly&&(s=Object(c.ensureNotNull)(this._model().externalTimeStamp(e.index)),Object(v.continueLineTool)({point:{price:e.price,timeStamp:s},envState:t,finalState:r,model:this._model()})),this.endUndoMacro(),o},t.prototype.continueExternalLine=function(e,t,i){var n=Object(c.ensureNotNull)(this._createLineCommand),o=n.continueCreatingLine(e,t,i);return o&&(this._pushUndoCommand(n),this._createLineCommand=null),o},t.prototype.finishLineTool=function(e){this._model().finishLineTool(e)},t.prototype.loadRange=function(e){this._pushUndoCommand(new J(this._model(),e))},t.prototype.withMacro=function(e,t){var i=this.beginUndoMacro(e);try{t()}finally{this.endUndoMacro()}return i},t.prototype.canZoomIn=function(){return this.model().canZoomIn()},t.prototype.canZoomOut=function(){return this.model().canZoomOut()},t.prototype.zoomOut=function(){var e=this,t=this.timeScale().width();if(this.canZoomOut()){try{this.beginUndoMacro("Zoom Out")}catch(e){return}Object(X.doAnimate)({to:t/5,onStep:function(t){e.startScaleTime(0),e.scaleTimeTo(t),e.endScaleTime()},onComplete:function(){return e.endUndoMacro()}})}},t.prototype.zoomIn=function(){var e=this,t=this.timeScale().width();if(this.canZoomIn()){try{this.beginUndoMacro("Zoom In")}catch(e){return}Object(X.doAnimate)({to:t/5,onStep:function(t){e.startScaleTime(t),e.scaleTimeTo(0),e.endScaleTime()},onComplete:function(){return e.endUndoMacro()}})}},t.prototype.setChartStyleProperty=function(e,t,i){if(e.value()!==t){var n=new Z(e,t,this.mainSeries(),i,this.model(),this.chartWidget());this._pushUndoCommand(n),this.emitEvent("setChartStyleProperty"),Object(H.trackChartStyleChanged)(e.value())}},t.prototype.applyStudyTemplate=function(e,t){var i=new ge(this._model(),e,t);this._pushUndoCommand(i)},t.prototype.cloneLineTools=function(e,t){var i,n;for(i=0;i<Math.min(5,e.length);++i)Object(H.trackDrawingCloned)(e[i]);return n=new b(this._model(),e,t,window.t("Clone line tools")),this._pushUndoCommand(n),this.emitEvent("cloneLineTools"),n.newIds()},
t.prototype.removeSource=function(e,t){if(this.lineBeingCreated()!==e){var i="Remove "+e.title();this._removeSources([e],t,i)}else this.cancelCreatingLine()},t.prototype.removeSelectedSources=function(){var e,t=this._model().selection().sources();t.length&&(e=t.length>1?"Remove drawings group":"Remove "+t[0].title(),this._removeSources(t,!1,e))},t.prototype.mergeSourceUp=function(e){var t=new I.c(this._model(),e,"Merge up");this._mergeUnmergeSource(e,t)},t.prototype.mergeSourceDown=function(e){var t=new I.a(this._model(),e,"Merge down");this._mergeUnmergeSource(e,t)},t.prototype.mergeToPane=function(e,t){var i=this._model().panes().indexOf(t),n=new I.b(this._model(),e,i,"Merge to pane");this._mergeUnmergeSource(e,n)},t.prototype.unmergeSourceUp=function(e){var t=new x.c(this._model(),e,"Unmerge up");this._mergeUnmergeSource(e,t)},t.prototype.unmergeSourceDown=function(e){var t=new x.a(this._model(),e,"Unmerge down");this._mergeUnmergeSource(e,t)},t.prototype.unmergeToNewBottomPane=function(e){var t=new x.b(this._model(),e,"Unmerge to new bottom pane");this._mergeUnmergeSource(e,t)},t.prototype.availableZOrderOperations=function(e){var t,i,n,o,r,s,l,u=this._model().lineToolsGroupModel(),h=e.filter(S.isLineTool),d=h.map(function(e){return u.groupForLineTool(e)});for(Object(c.assert)(new Set(d).size<=1,"Cannot move line tools from different group"),t=0===d.length?null:d[0],i={bringForwardEnabled:!1,bringToFrontEnabled:!1,sendBackwardEnabled:!1,sendToBackEnabled:!1},n=new Set(h),o=function(e){var o,s,l,u,h;return Object(S.isLineTool)(e)&&null!==t?(o=Object(L.sortSources)(t.lineTools().filter(function(t){return!n.has(t)||t===e})),i=a(i,{bringForwardEnabled:e!==o[o.length-1],bringToFrontEnabled:e!==o[o.length-1],sendBackwardEnabled:e!==o[0],sendToBackEnabled:e!==o[0]}),"continue"):0===(s=Object(c.ensureNotNull)(r._model().paneForSource(e)).allOrderedSourcesWithoutSpecial()).length?"continue":(l=e.zorder(),u=s[0].zorder(),h=s[s.length-1].zorder(),void(i=a(i,{bringForwardEnabled:l!==h,bringToFrontEnabled:l!==h,sendBackwardEnabled:l!==u,sendToBackEnabled:l!==u})))},r=this,s=0,l=Object(L.sortSources)(e);s<l.length;s++)o(l[s]);return i},t.prototype.sendToBack=function(e){var t,i,n,o;if(!this.availableZOrderOperations(e).sendToBackEnabled)throw new Error("Send to back operation is unavailable");t=null,i=e[0],Object(S.isLineTool)(i)&&null!==(n=this._model().lineToolsGroupModel().groupForLineTool(i))&&(o=n.lineTools(),t=new B(this.model(),Object(L.sortSources)(e),o[0])),null===t&&(t=new E(this.model(),Object(L.sortSources)(e))),this._pushUndoCommand(t),this.emitEvent("changeZOrder",[e])},t.prototype.bringToFront=function(e){var t,i,n,o;if(!this.availableZOrderOperations(e).bringToFrontEnabled)throw new Error("Bring to front operation is unavailable");t=null,i=e[0],Object(S.isLineTool)(i)&&null!==(n=this._model().lineToolsGroupModel().groupForLineTool(i))&&(o=n.lineTools(),t=new D(this.model(),Object(L.sortSources)(e),o[o.length-1])),null===t&&(t=new k(this.model(),Object(L.sortSources)(e))),this._pushUndoCommand(t),
this.emitEvent("changeZOrder",[e])},t.prototype.sendBackward=function(e){var t,i,n=this;if(!this.availableZOrderOperations(e).sendBackwardEnabled)throw new Error("Send backward operation is unavailable");t=ve.format({title:e[0].title()}),i=function(e,t){return new R(n.model(),e,t)},this._sendBackOrBringForward(t,Object(L.sortSources)(e),i)},t.prototype.bringForward=function(e){var t,i,n=this;if(!this.availableZOrderOperations(e).bringForwardEnabled)throw new Error("Bring forward operation is unavailable");t=Se.format({title:e[0].title()}),i=function(e,t){return new N(n.model(),e,t)},this._sendBackOrBringForward(t,Object(L.sortSources)(e),i)},t.prototype.insertAfter=function(e,t){var i,n=this;e=Object(L.sortSources)(e),i=be.format({title:e[0].title(),target:t.title()}),this._insertAfterOrBefore(i,e,t,function(){return new D(n.model(),e,t)})},t.prototype.insertBefore=function(e,t){var i,n=this;e=Object(L.sortSources)(e),i=we.format({title:e[0].title(),target:t.title()}),this._insertAfterOrBefore(i,e,t,function(){return new B(n.model(),e,t)})},t.prototype.startScrollTime=function(e){var t=this.timeScale();this._initialTimeScrollState={rightOffset:t.rightOffset(),barSpacing:t.barSpacing()},this._initialTimeScrollPos=e,this.model().startScrollTime(e)},t.prototype.scrollTimeTo=function(e){var t=!1;return null!==this._initialTimeScrollPos&&null!==this._initialTimeScrollState&&Math.abs(e-this._initialTimeScrollPos)>20&&(this._pushUndoCommand(new z.a(this.model(),this._initialTimeScrollState,"Scroll Time")),this._initialTimeScrollPos=null,this._initialTimeScrollState=null,t=!0),this.model().scrollTimeTo(e),t},t.prototype.endScrollTime=function(){this.model().endScrollTime(),this._initialTimeScrollPos=null,this._initialTimeScrollState=null},t.prototype.startScaleTime=function(e){var t=this.timeScale(),i={rightOffset:t.rightOffset(),barSpacing:t.barSpacing()};this._pushUndoCommand(new z.a(this.model(),i,"Scale Time")),this.model().startScaleTime(e)},t.prototype.scaleTimeTo=function(e){this.model().scaleTimeTo(e)},t.prototype.endScaleTime=function(){this.model().endScaleTime()},t.prototype.resetTimeScale=function(){var e=this.timeScale(),t={rightOffset:e.rightOffset(),barSpacing:e.barSpacing()};this._pushUndoCommand(new z.a(this.model(),t,"Reset Time Scale")),this.model().resetTimeScale()},t.prototype.rearrangePanes=function(e,t){var i=new U(this._model(),e,t);this._pushUndoCommand(i)},t.prototype.movePane=function(e,t){var i=new U(this._model(),e,t);this._pushUndoCommand(i)},t.prototype._mergeUnmergeSource=function(e,t){var i,n,o=this;this.beginUndoMacro(t.text()),i=Object(c.ensureNotNull)(this._model().paneForSource(e)),n=new Set(i.orderedSources().filter(function(t){return Object(S.isLineTool)(t)&&t.ownerSource()===e})),this._model().lineToolsGroupModel().groups().filter(function(e){var t=e.lineTools().some(function(e){return n.has(e)}),i=e.lineTools().some(function(e){return!n.has(e)});return t&&i}).forEach(function(e){o._pushUndoCommand(new P(o._model(),e,e.lineTools()))}),this._pushUndoCommand(t),this.endUndoMacro()},
t.prototype._removeSources=function(e,t,i){var n,o,r=this;e=e.filter(function(e){return e.isUserDeletable()}),n=this._model(),o=n.lineToolsGroupModel(),this.beginUndoMacro(i),n.selectionMacro(function(s){var a,l,u=new Map;e.forEach(function(e){var t,i;Object(S.isLineTool)(e)&&(null!==(t=o.groupForLineTool(e))&&((i=u.get(t)||[]).push(e),u.set(t,i)),null!==e.getLinkKey()&&Object(v.removeLineTool)({model:r.model(),linkKey:Object(c.ensureNotNull)(e.getLinkKey())}))}),u.forEach(function(e,t){var i=new P(n,t,e);r._pushUndoCommand(i)}),l=(a=new T(n,e,i)).removedIds(),r._pushUndoCommand(a),!t&&l.length>0&&(1===l.length?r.emitEvent("removeSource",[l[0]]):r.emitEvent("removeSources",[l]))}),this.endUndoMacro()},t.prototype._insertAfterOrBefore=function(e,t,i,n){var o,r=this,s=Object(c.ensureNotNull)(this._model().paneForSource(i));if(t.some(function(e){return Object(S.isLineTool)(e)&&r._model().paneForSource(e)!==s}))throw new Error("Cannot insert line tool after target on another pane");this.beginUndoMacro(e),t.forEach(function(e){Object(c.ensureNotNull)(r.model().paneForSource(e))!==s&&r.mergeToPane(e,s)}),o=n(),this._pushUndoCommand(o),this.emitEvent("changeZOrder",[t]),this.endUndoMacro()},t.prototype._sendBackOrBringForward=function(e,t,i){var n=this,o=new Map;t.forEach(function(e){var t=Object(c.ensureNotNull)(n._model().paneForSource(e)),i=o.get(t)||[];i.push(e),o.set(t,i)}),this.beginUndoMacro(e),o.forEach(function(e,t){n._pushUndoCommand(i(t,e))}),this.endUndoMacro(),this.emitEvent("changeZOrder",[t])},t}(d.a)},opke:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path fill="currentcolor" d="m13.5 5a1 1 0 0 0 0 19 1 1 0 0 0 0-19m0 1a1 1 0 0 1 0 17 1 1 0 0 1 0-17zm2.31-.6A9.5 9.5 0 0 0 9 14.5a9.5 9.5 0 0 0 6.81 9.1l.99-.78A8.5 8.5 0 0 1 10 14.5a8.5 8.5 0 0 1 6.8-8.32"/></svg>'},p1SQ:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"LineToolHorzLinePriceAxisView",function(){return r}),n=i("mrSG"),o=i("KcY8"),r=function(e){function t(t){var i=e.call(this)||this;return i._source=t,i}return Object(n.__extends)(t,e),t.prototype._updateRendererData=function(e,t,i){var n,o,r,s,a,l;e.visible=!1,n=this._source.points(),o=this._source.priceScale(),0===n.length||null===o||o.isEmpty()||(r=n[0],isFinite(r.price)&&null!==(a=null!==(s=this._source.ownerSource())?s.firstValue():null)&&(l=this._source.properties().linecolor.value(),i.background=l,i.color=this.generateTextColor(l),i.coordinate=o.priceToCoordinate(r.price,a),e.text=o.formatPrice(r.price,a),e.visible=!0))},t}(o.a)},pJOz:function(e,t,i){function n(){this._data=null,this._hittest=new o(o.MOVEPOINT)}var o,r,s,a,l,c;i("qFKp"),o=i("VdBB").HitTestResult,r=i("a7Ha").LineEnd,s=i("GEp6").distanceToSegment,a=i("Zp/P"),l=a.extendAndClipLineSegment,c=a.getArrowPoints,n.prototype.setData=function(e){this._data=e},n.prototype.setHitTest=function(e){this._hittest=e},n.prototype.drawArrow=function(e,t,i,n){var o,r;if(!(t.subtract(e).length()<1))for(o=c(e,t,n,!1),r=0;r<o.length;++r)e=o[r][0],t=o[r][1],CanvasEx.drawLine(i,e.x,e.y,t.x,t.y)},
n.prototype.extendAndClipLineSegment=function(e,t){return l(e,t,this._data.width,this._data.height,this._data.extendleft,this._data.extendright)},n.prototype.drawCircle=function(e,t,i,n){n=Object.assign({fillStyle:"#000000"},n),t.save(),t.fillStyle=n.fillStyle,t.beginPath(),t.arc(e.x,e.y,i,0,2*Math.PI,!1),t.fill(),n.strokeWidth&&(t.lineWidth=n.strokeWidth,t.stroke()),t.restore()},n.prototype.draw=function(e){var t,i,n,o,r;null===this._data||this._data.points&&this._data.points.length<2||this._data.floatPoints&&this._data.floatPoints.length<2||(e.lineCap="butt",e.strokeStyle=this._data.color,e.lineWidth=this._data.linewidth,e.lineStyle=this._data.linestyle,i=(t=this._data.floatPoints||this._data.points)[0],n=t[1],this._data.overlayLineEndings?o=[i.clone(),n.clone()]:this.drawEnds(e,[i,n]),null!==(r=this.extendAndClipLineSegment(i,n))&&this._data.linewidth>0&&CanvasEx.drawLine(e,r[0].x,r[0].y,r[1].x,r[1].y),this._data.overlayLineEndings&&this.drawEnds(e,o))},n.prototype.drawEnds=function(e,t){var i=t[0],n=t[1];switch(this._data.leftend){case r.Arrow:this.drawArrow(n,i,e,e.lineWidth);break;case r.Circle:this.drawCircle(i,e,e.lineWidth,this._data.endstyle)}switch(this._data.rightend){case r.Arrow:this.drawArrow(i,n,e,e.lineWidth);break;case r.Circle:this.drawCircle(n,e,e.lineWidth,this._data.endstyle)}},n.prototype.hitTest=function(e){var t,i,n,o,r;return null===this._data||this._data.points&&this._data.points.length<2?null:this._data.floatPoints&&this._data.floatPoints.length<2?null:(t=TradingView.isMobile.any()?24:3,n=(i=this._data.floatPoints||this._data.points)[0],o=i[1],null!==(r=this.extendAndClipLineSegment(n,o))&&s(r[0],r[1],e).distance<=t?this._hittest:null)},t.TrendLineRenderer=n},pKDv:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolABCD";var r=t||n.createProperties();o.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("bFMU").ABCDPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=window.t("ABCD Pattern");inherit(n,o),n.prototype.pointsCount=function(){return 4},n.prototype.title=function(){return a},n.prototype.name=function(){return"ABCD Pattern"},n.prototype.getStylesPropertyPage=function(){return s.LineToolABCDPatternStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("y4pE").AbcdPatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new r("linetoolabcd",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolABCD=n},pPtI:function(e,t,i){"use strict";function n(e){return T.Interval.parse(e).value()}function o(e){var t,i,o;return!!T.Interval.isRange(e)||(t=n(e),o=!1,o=void 0===(i=L.linking.supportedResolutions.value())||-1!==i.map(n).indexOf(t),L.linking.intraday.value()?o:T.Interval.isDWM(e)&&o)}function r(e){
T.Interval.isValid(e)&&(T.Interval.isRange(e)?I.setValue("chart.lastUsedRangeResolution",e):I.setValue("chart.lastUsedTimeBasedResolution",e))}function s(e){var t,i,n,o,r,s,a=I.getValue("chart.lastUsedRangeResolution");if(void 0!==a&&T.Interval.isRange(a))return a;for(t="100R",i=0,n=e;i<n.length;i++)if(o=n[i],(r=T.Interval.parse(o)).isRange()){if("100R"===(s=r.value()))return s;t=s}return t}function a(e){var t,i,n,o,r,s,a=I.getValue("chart.lastUsedTimeBasedResolution");if(void 0!==a&&T.Interval.isTimeBased(a))return a;for(t="1D",i=0,n=e;i<n.length;i++)if(o=n[i],(r=T.Interval.parse(o)).isTimeBased()){if("1D"===(s=r.value()))return s;t=s}return t}function l(e){return e?"100R":"1D"}function c(e,t,i){var n=x.isRangeStyle(e),o=T.Interval.isRange(t);return!n&&o?a(i):n&&!o?s(i):t}function u(e){return T.Interval.isRange(e)?"1":e}function h(e){var t=T.Interval.parse(e),i=d(t.kind()),n=t.multiplier();return t.isValid()&&n<=i}function d(e){var t=V[e];return Number.isNaN(t)?1:t}function p(e){return d(T.Interval.kind(e))}function _(e){var t=f(I.getJSON(e,[]));return A()(t.filter(h).map(n))}function f(e){return Array.isArray(e)?e:Object.keys(e).map(T.Interval.normalize).filter(k.notNull)}function m(){var e,t,i,o=[];for(t=0;t<arguments.length;t++)o[t]=arguments[t];return i=(e=[]).concat.apply(e,o),y(i=A()(i.filter(h).map(n)))}function y(e){return e.sort(v)}function g(e){var t=T.Interval.parse(e),i=t.multiplier()||1;return t.kind()===T.ResolutionKind.Minutes&&Object(T.isHour)(i)?[T.ResolutionKind.Hours,Math.floor(i/60)]:[t.kind(),i]}function v(e,t){var i=g(e),n=i[0],o=i[1],r=g(t),s=r[0],a=r[1];return n!==s?B[n]-B[s]:o-a}function S(){return[]}function b(e){var t=w(e);return""+t.multiplier+t.shortKind}function w(e){var t=T.Interval.parse(e),i=t.multiplier(),n=t.kind();if(!t.isValid())throw new TypeError("Can't translate invalid interval");return t.kind()===T.ResolutionKind.Minutes&&Object(T.isHour)(i)&&(i=Math.floor(i/60),n=T.ResolutionKind.Hours),{multiplier:i.toString(),shortKind:P(n),hint:i+" "+P(n,i),mayOmitMultiplier:t.isDWM()&&1===i}}function P(e,t){if(!t)return R[e];switch(e){case T.ResolutionKind.Days:return window.t("day",{plural:"days",count:t});case T.ResolutionKind.Weeks:return window.t("week",{plural:"weeks",count:t});case T.ResolutionKind.Months:return window.t("month",{plural:"months",count:t});case T.ResolutionKind.Seconds:return window.t("second",{plural:"seconds",count:t});case T.ResolutionKind.Minutes:return window.t("minute",{plural:"minutes",count:t});case T.ResolutionKind.Hours:return window.t("hour",{plural:"hours",count:t});case T.ResolutionKind.Range:return window.t("range",{plural:"ranges",count:t});default:return e}}var C,T,x,I,L,M,A,k,E,O,D,V,B,R;i.r(t),i.d(t,"normalizeIntervalString",function(){return n}),i.d(t,"isAvailable",function(){return o}),i.d(t,"setLastUsedResolution",function(){return r}),i.d(t,"getRangeResolution",function(){return s}),i.d(t,"getTimeBasedResolution",function(){return a}),i.d(t,"getDefaultResolution",function(){return l}),i.d(t,"getResolutionByChartStyle",function(){return c}),
i.d(t,"getServerInterval",function(){return u}),i.d(t,"isResolutionMultiplierValid",function(){return h}),i.d(t,"getMaxResolutionValue",function(){return p}),i.d(t,"getResolutionsFromSettings",function(){return _}),i.d(t,"convertResolutionsFromSettings",function(){return f}),i.d(t,"mergeResolutions",function(){return m}),i.d(t,"sortResolutions",function(){return y}),i.d(t,"getCustomResolutions",function(){return S}),i.d(t,"getTranslatedResolution",function(){return b}),i.d(t,"getTranslatedResolutionModel",function(){return w}),C=i("bSeV"),i("YFKU"),T=i("LxhU"),x=i("n5al"),I=i("Vdly"),L=i("PT1i"),M=i("IVMC"),A=i.n(M),k=i("ogJP"),(E={})[T.ResolutionKind.Seconds]=60,E[T.ResolutionKind.Minutes]=1440,E[T.ResolutionKind.Hours]=24,E[T.ResolutionKind.Days]=365,E[T.ResolutionKind.Weeks]=52,E[T.ResolutionKind.Months]=12,E[T.ResolutionKind.Range]=1e3,E[T.ResolutionKind.Invalid]=NaN,V=E,(O={})[T.ResolutionKind.Seconds]=1,O[T.ResolutionKind.Minutes]=2,O[T.ResolutionKind.Hours]=3,O[T.ResolutionKind.Days]=4,O[T.ResolutionKind.Weeks]=5,O[T.ResolutionKind.Months]=6,O[T.ResolutionKind.Range]=7,O[T.ResolutionKind.Invalid]=8,B=O,(D={})[T.ResolutionKind.Invalid]="",D[T.ResolutionKind.Seconds]=window.t("s",{context:"interval_short"}),D[T.ResolutionKind.Minutes]=window.t("m",{context:"interval_short"}),D[T.ResolutionKind.Hours]=window.t("h",{context:"interval_short"}),D[T.ResolutionKind.Days]=window.t("D",{context:"interval_short"}),D[T.ResolutionKind.Weeks]=window.t("W",{context:"interval_short"}),D[T.ResolutionKind.Months]=window.t("M",{context:"interval_short"}),D[T.ResolutionKind.Range]=window.t("R",{context:"interval_short"}),R=D},pZll:function(e,t,i){"use strict";function n(){return Object(o.c)(r)}var o,r,s,a,l,c,u;i.r(t),o=i("ObRt"),r={id:"SymbolSearchUIService"},s=i("u5Q5"),a=function(){function e(){}return e.prototype.bindToInput=function(e,t){return Object(s.bindToInput)(e,t)},e}(),l=i("PT1i"),c=i("h24c"),u=function(){function e(){this._symbolGetter=null,this._deferredItems=[],this._symbolSearchActive=!1}return e.prototype.setSymbolGetter=function(e){var t=this;this._symbolGetter=e,this._deferredItems.forEach(function(i){t._bindToInputImpl(e,i.input,i.options)}),this._deferredItems=[]},e.prototype.bindToInput=function(e,t){return null===this._symbolGetter?this._deferredItems.push({input:e,options:t}):this._bindToInputImpl(this._symbolGetter,e,t),Promise.resolve({destroy:function(){},acceptTypeIn:function(){}})},e.prototype._bindToInputImpl=function(e,t,i){var n,o=this,r=$(t),s=function(e,t){},a=function(){r.blur(),o._symbolSearchActive||(o._symbolSearchActive=!0,i.currentSymbol=r.val(),e.getSymbol(i).then(function(e){r.blur(),r.trigger("accept-symbol",[e.symbol]),i.callback&&i.callback(e.symbol,e.interval),i.syncWithChartWidget&&!Object(c.skipAccept)(e.symbol,e.interval)&&s(e.symbol,e.interval),!0===i.clearAfterAccept?r.val(""):(""===r.val()&&i.onEmptyApply&&i.onEmptyApply(),r.val(e.symbol)),o._symbolSearchActive=!1}).catch(function(){r.blur(),o._symbolSearchActive=!1}))},u=function(e){e.preventDefault(),a()}
;i.syncWithChartWidget&&(Object(c.syncSymbolSearch)(r,!0),l.linking.seriesShortSymbol.subscribe(function(){Object(c.syncSymbolSearch)(r,!0)}),n=!1,s=function(e,t){n=!(e||t),e&&l.linking.symbol.setValue(e),t&&Object(c.setLinkingResolution)(t)},i.syncOnBlur&&r.on("blur",function(){n&&(Object(c.syncSymbolSearch)(r,!0),n=!1)})),r.focus(a),r.keypress(u),r.keydown(u)},e}(),i.d(t,"symbolSearchUIService",function(){return n}),Object(o.a)(r)||(window.initData&&window.initData.is_mobile_new?Object(o.b)(r,new u):Object(o.b)(r,new a))},pvsv:function(e,t,i){"use strict";function n(e,t){Promise.all([i.e("react"),i.e(2),i.e(5),i.e(28),i.e(73),i.e(0),i.e(4),i.e(24),i.e("symbol-info-dialog-impl")]).then(function(n){i("1Z/g").showSymbolInfoDialog(e,t)}.bind(null,i)).catch(void 0)}i.r(t),i.d(t,"showSymbolInfoDialog",function(){return n})},qE4g:function(e,t,i){"use strict";function n(e){e.addCustomSource("branding",function(t){return new o.Branding(t,function(t){var i,n=e.getAll();return 1===n.length||(i=n[0].model())&&i.model()===t}.bind(null,t))})}var o;i.r(t),i.d(t,"addBrandingSource",function(){return n}),o=i("GK7n")},qJq3:function(e,t,i){"use strict";(function(e,n,o,r){function s(t,o,r){var a,_,f,m=i("OK+B");l.call(this,t),this._dataEvents=new te,this._quotesProvider=new ne,this._quotesProvider.quotesUpdate().subscribe(this,this._onQuotesUpdate),this._boxSizeChanged=new e,this._tagsChanged=new e,this._symbolIntervalChanged=new e,this._intervalChanged=new e,this._extendedHoursChanged=new e,this.chartWidgetInitialized=new e,this._onStyleChanged=new e,this._onStatusChanged=new e,this._onRestarted=new e,this.requestingIntradayWhenNotSupported=new e,this.requestingResolutionWhenNotSupported=new e,this._priceScaleChanged=new e,this._onInReplayStateChanged=new e,this._replayExitedDueUnsupportedInterval=new e,this._replayExitedDueUnavailableForUserInterval=new e,this._requestOptions=r||{count:TradingView.DEFAULT_BAR_COUNT},this.m_model=t,this._chartApi=t._chartApi,this.m_data=new M,this.setProperties(o),this._prevChartStyle=o.style.value(),this.createPaneView(),this._dataWindowView=new d(this,t),this._legendView=new p(this,t),this._statusView=new c(this,this._model.properties().scalesProperties.textColor,this.properties().statusViewStyle),a=new h(this,{model:t}),this._priceLinePriceAxisView=new J(this),_=new u(this,{model:t}),this._priceAxisViews=[a,_],this._panePriceAxisView=new L(a,this,t),this._projectionPriceAxisView=new L(_,this,t),this._symbolInfo=null,this._status=s.STATUS_OFFLINE,this._syncModel=null,this._replaySubscriber=null,this._isReplayResolutionAvailableForUser=null,f=this,this._turnaroundCounter=1,this._turnaround="s"+this._turnaroundCounter,this._handler=function(e){f.onData(e)},this._haStyle={studyId:Y.chartStyleStudyId(s.STYLE_HEIKEN_ASHI,!0)},this._renkoStyle={studyId:Y.chartStyleStudyId(s.STYLE_RENKO,!0)},this._pbStyle={studyId:Y.chartStyleStudyId(s.STYLE_PB,!0)},this._kagiStyle={studyId:Y.chartStyleStudyId(s.STYLE_KAGI,!0)},this._pnfStyle={studyId:Y.chartStyleStudyId(s.STYLE_PNF,!0)},this._rangeStyle={
studyId:Y.chartStyleStudyId(s.STYLE_RANGE,!0)},this._properties.addExclusion&&this._properties.addExclusion("visible"),this._predictBars=0,this._futureBarsPaneView=null,this._properties.showInDataWindow.listeners().subscribe(t,m.prototype.fullUpdate),this.marketStatus=new n,this._seriesLoaded=!1,this.properties().minTick.listeners().subscribe(this,s.prototype._recreateFormatter),f=this,this.properties().minTick.listeners().subscribe(null,function(){f.m_model.fullUpdate()}),this._priceLineView=null,this._baseHorizontalLineView=new $(this),this._gotoDateResultCleared=!1,this._gotoDateView=null,this.bindStyleChange(),this.bindJapChartsInputs(),this._createIsDWMProperty(),this.createExtendedHoursProperty(),this.extendedHours.listeners().subscribe(this,function(e){this._extendedHoursChanged.fire(e),this.restart()}),this._dataEvents.extendedHoursNotPermitted().subscribe(this,function(){this._properties.extendedHours.setValue(!1)}),this._symbolIntervalChanged.subscribe(this,this.checkInterval),this.properties().showCountdown.listeners().subscribe(this,s.prototype._onChangeShowCountdown),this._onChangeShowCountdown(this.properties().showCountdown),this._recreatePriceFormattingDependencies(),this._isDWMCached=null,this.properties().lineStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this.properties().areaStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this.properties().baselineStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this._updateBarFunction()}var a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P,C,T,x,I,L,M,A,k,E,O,D,V,B,R,N,F,W,j,U,z,H,Y,G,q,K,Z,J,X,Q,$,ee,te,ie,ne,oe,re,se,ae;TradingView.DEFAULT_BAR_COUNT=300,TradingView.TIME_PLOT=0,TradingView.OPEN_PLOT=1,TradingView.HIGH_PLOT=2,TradingView.LOW_PLOT=3,TradingView.CLOSE_PLOT=4,TradingView.ADT_PLOT=6,TradingView.STYLE_PLOT=7,a=i("Eyy1").ensureNotNull,l=i("lUQk").SeriesBase,c=i("tBG4").SeriesStatusView,u=i("Ke3L").ProjectionSeriesPriceAxisView,h=i("TQMj").SeriesPriceAxisView,d=i("cXAR").SeriesDataWindowView,p=i("gWck").SeriesLegendView,_=i("x0JF"),f=_.SeriesAreaPaneView,m=_.SeriesLinePaneView,y=_.SeriesHollowCandlesPaneView,g=_.SeriesCandlesPaneView,v=_.SeriesBarsPaneView,S=_.SeriesHeikenAshiPaneView,b=_.SeriesBaselinePaneView,w=i("9Jkk").SeriesHiLoPaneView,P=i("biIa").SeriesWaterlinePaneView,C=i("Kxc7"),T=i("hayr").propertyPages,x=i("ZJKN").BarsRange,I=i("38az").SeriesBarColorer,L=i("KtbP").PanePriceAxisView,M=i("XPit").SeriesData,A=i("XPit").barFunction,k=i("XPit").seriesPlotFunctionMap,E=i("8woN"),O=i("k9/m"),D=O.PlotList,V=O.PlotRowSearchMode,B=O.mergeMinMax,R=i("hsV8").unpackNonSeriesData,N=i("okVO").SyncModel,F=i("PC8g").trackEvent,W=i("IzGk").translatedIntervalString,j=i("uOxu"),U=j.getLogger("Chart.Series"),z=j.getLogger("Chart.Series.Updates",{highRate:!0}),H=i("dfhE"),Y=i("n5al"),G=i("pPtI"),q=G.getServerInterval,K=G.getResolutionByChartStyle,Z=i("LxhU").Interval,J=i("TmNs").SeriesPriceLineAxisView,X=i("WkOR").areEqualSymbols,Q=i("WkOR").includesEqualSymbol,$=i("z+Sa").SeriesHorizontalBaseLinePaneView,
ee=i("Z8aO").SeriesPriceLinePaneView,te=i("ZAbA").SeriesDataEvents,ie=i("FIi8").deepExtend,ne=i("wOSo").QuotesProvider,oe=i("5fI3").encodeExtendedSymbol,re=i("FQhm"),se=i("qFKp").CheckMobile.any()&&!1,ae=!C.enabled("hide_series_legend_item"),Number(window.TELEMETRY_SERVER_TIME_DIFF_THRESHOLD),inherit(s,l),s.prototype.styleStudyInfos=function(){return{haStyle:this._haStyle,renkoStyle:this._renkoStyle,pbStyle:this._pbStyle,kagiStyle:this._kagiStyle,pnfStyle:this._pnfStyle,rangeStyle:this._rangeStyle}},s.prototype.styleStudyInfo=function(e){return this.styleStudyInfos()[e]},s.prototype.priceLineColor=function(e){return this.properties().priceLineColor.value()||e},s.prototype.endOfData=function(){return this._endOfData},s.prototype.serverTimeOffset=function(){return this._chartApi.serverTimeOffset()},s.prototype._onChangeShowCountdown=function(e){var t=this;e.value()?this._countdownUpdateTimer=this.m_model.setInterval(function(){t.isDWM()||(t._priceAxisViews[0].update(),t.m_model.updateSource(t))},500):(this.m_model.clearInterval(this._countdownUpdateTimer),delete this._countdownUpdateTimer)},s.prototype.lastValueData=function(e,t,i){var n,o,r,s,a,l,c,u,h,d={noData:!0};if(this.m_model.timeScale().isEmpty()||this.priceScale().isEmpty()||this.data().isEmpty())return d;if(null===(n=this.m_model.timeScale().visibleBarsStrictRange()))return d;if(t){if(null===(s=this.data().bars().last()))return d;o=s.value,r=s.index}else{if(null===(a=this.data().bars().search(n.lastBar(),V.NearestLeft)))return d;o=this.data().bars().valueAt(a.index),r=a.index}return l={noData:!1},c=void 0!==e?o[e]:this._barFunction(o),i&&(l.price=c),u=this.firstValue(),l.text=this.priceScale().formatPrice(c,u),l.formattedPriceAbsolute=this.priceScale().formatPriceAbsolute(c),l.formattedPricePercentage=this.priceScale().formatPricePercentage(c,u),h=this.barColorer().barStyle(r,!1),l.color=h.barColor,l.floatCoordinate=this.priceScale().priceToCoordinate(c,u,!0),l.coordinate=Math.round(l.floatCoordinate),l.index=r,l},s.prototype.prevClose=function(){var e,t;return this.priceScale().isEmpty()||this.data().isEmpty()||!this.quotes()?null:null==(e=this.quotes().prev_close_price)?null:(t=this.firstValue(),{coordinate:this.priceScale().priceToCoordinate(e,t),floatCoordinate:this.priceScale().priceToCoordinate(e,t,!0),text:this.priceScale().formatPrice(e,t)})},s.prototype.quotes=function(){return this.data().isEmpty()?null:this._quotesProvider.quotes()},s.prototype._createIsDWMProperty=function(){this._isDWMProperty=new o(this.isDWM()),this._onRestarted.subscribe(this,function(){this._isDWMProperty.setValue(this.isDWM())})},s.prototype.isDWMProperty=function(){return this._isDWMProperty},s.prototype._prepareChartApiParams=function(){
return this._requestOptions.startDate?!this._requestOptions.startDate||this._requestOptions.endDate||this._requestOptions.count?this._requestOptions.startDate&&this._requestOptions.endDate?["from_to",this._requestOptions.startDate,this._requestOptions.endDate]:["from_to",this._requestOptions.startDate,this._requestOptions.count]:["from_to",this._requestOptions.startDate]:this._requestOptions.count||TradingView.DEFAULT_BAR_COUNT},s.prototype._nextSymbolId=1,s.prototype._nextSeriesId=1,Object.assign(s,H),s.PERMISSION_DENIED="permission denied",s.PD_REASON_SYMBOL="symbol",s.PD_REASON_EXTENDED_HOURS="extended_hours",s.PD_REASON_GROUP_PERMISSION="group",s.STUDY_NOT_AUTH="study_not_auth",s.prototype.model=function(){return this.m_model},s.prototype.fixLastBar=function(e){},s.prototype.clearData=function(){this.data().clear()},s.prototype.data=function(){return this.m_data},s.prototype.symbolId=function(){return this._symbolId},s.prototype.seriesId=function(){return this._seriesId},s.prototype.isPulse=function(){return this._symbolInfo&&this._symbolInfo.resolutions.length>0},s.prototype.onTagsChanged=function(){return this._tagsChanged},s.prototype.onSymbolIntervalChanged=function(){return this._symbolIntervalChanged},s.prototype.onIntervalChanged=function(){return this._intervalChanged},s.prototype.onStatusChanged=function(){return this._onStatusChanged},s.prototype.onStyleChanged=function(){return this._onStyleChanged},s.prototype.onRestarted=function(){return this._onRestarted},s.prototype.onBoxSizeChanged=function(){return this._boxSizeChanged},s.prototype.status=function(){return this._status},s.prototype.isDWM=function(){var e,t;return null!==this._isDWMCached?this._isDWMCached:((e=Z.parse(this._properties.interval.value())).isDWM()?this._isDWMCached=!0:(t=e.isSeconds()?e.multiplier():60*e.multiplier(),this._isDWMCached=!(t<216e3)),this._isDWMCached)},s.prototype.lastPriceLabelFixedCoordinate=function(){return this._priceAxisViews[0]._fixedCoordinate},s.prototype.createPaneView=function(){this._paneView=null,this._projectionBarsPaneView=null,this._waterlineView=null,this._priceLineView=this.hasClosePrice()?new ee(this):null;var e=this._properties.style.value();switch(e){case s.STYLE_BARS:this._paneView=new v(this,this.m_model);break;case s.STYLE_CANDLES:this._paneView=new g(this,this.m_model);break;case s.STYLE_LINE:this._paneView=new m(this,this.m_model);break;case s.STYLE_AREA:this._paneView=new f(this,this.m_model);break;case s.STYLE_HEIKEN_ASHI:this._paneView=new S(this,this.m_model);break;case s.STYLE_HOLLOW_CANDLES:this._paneView=new y(this,this.m_model);break;case s.STYLE_BASELINE:this._paneView=new b(this,this.m_model),this._waterlineView=new P(this);break;case s.STYLE_HILO:this._paneView=new w(this,this.m_model);break;default:throw Error("Unknown chart style assigned: "+e)}},s.prototype._clearStylePlot=function(e,t){var i,n;0!==e.size()&&(i=t||a(e.firstIndex()),n=a(e.lastIndex())+1,e.range(i,n).each(function(e,t){t[TradingView.STYLE_PLOT]=null}))},s.prototype.invalidateBarStylesCache=function(e){
U.logDebug("Invalidate style cache starting from "+e),this._clearStylePlot(this.m_data.m_bars,e),this._clearStylePlot(this.m_data.m_nsBars)},s.prototype.invalidateBarColorerCache=function(){delete this._barColorerCache,this.invalidateBarStylesCache()},s.prototype.barColorer=function(){var e,t,i,n;if(this._barColorerCache)return this._barColorerCache;for(e=null,t=this.m_model.dataSources().length-1;t>=0;t--)(i=this.m_model.dataSources()[t]).metaInfo&&TradingView.isInherited(i.constructor,TradingView.Study)&&i.hasBarColorer()&&i.properties().visible.value()&&(n=i.barColorer(),null===e?e=n:e.pushBackBarColorer(n));return null===e?e=new I(this):e.pushBackBarColorer(new I(this)),this._barColorerCache=e,this._barColorerCache},s.prototype.properties=function(){return this._properties},s.prototype._barsState=function(e){var t=e.state();return t.data.forEach(function(e){e.value.splice(7,1)}),t},s.prototype.state=function(e){var t=this===this.m_model.mainSeries()?"MainSeries":TradingView.className(this.constructor),i={type:t,id:this.id(),state:this.properties().state(),zorder:this.zorder(),haStyle:this._haStyle,renkoStyle:this._renkoStyle,pbStyle:this._pbStyle,kagiStyle:this._kagiStyle,pnfStyle:this._pnfStyle,rangeStyle:this._rangeStyle};return this._symbolInfo&&this._symbolInfo.ticker&&(i.state.symbol=this._symbolInfo.ticker),e&&(i.bars=this._barsState(this.m_data.m_bars),i.nsBars=this._barsState(this.m_data.m_nsBars),i.symbolInfo=this._symbolInfo,i.rtPrice=this.data().lastProjectionPrice),i.boxSize=this.data().boxSize,i.reversalAmount=this.data().reversalAmount,i},s.prototype.restoreState=function(e,t){t&&this._setStatus(s.STATUS_SNAPSHOT),this._properties.mergeAndFire(e.state),this._prevChartStyle=this.properties().style.value(),this.createPaneView(),t&&this.restoreData(e.bars,e.nsBars,e.symbolInfo,e.rtPrice,e.boxSize,e.reversalAmount)},s.prototype.hasStateForAlert=function(){return!1},s.prototype.stateForAlert=function(){throw new Error("Not implemented")},s.prototype.idForAlert=function(){return l.prototype.idForAlert.call(this)},s.prototype.restoreData=function(e,t,i,n,o,r){this._status=s.STATUS_SNAPSHOT,this.m_data.m_bars.restoreState(e),this.m_data.m_nsBars.restoreState(t),this.updateSymbolInfo(i),this.m_data.lastProjectionPrice=n,this.m_data.boxSize=o,o||(this.properties().style.value()===s.STYLE_PNF?this.m_data.boxSize=this.properties().pnfStyle.inputs.boxSize.value():this.properties().style.value()===s.STYLE_RENKO&&(this.m_data.boxSize=this.properties().renkoStyle.inputs.boxSize.value())),this.m_data.reversalAmount=r,r||this.properties().style.value()===s.STYLE_KAGI&&(this.m_data.reversalAmount=this.properties().kagiStyle.inputs.reversalAmount.value())},s.prototype.setProperties=function(e){e.timeframe||e.merge({timeframe:""}),e.shortName||e.merge({shortName:""}),this._properties=e,this._properties.symbol.listeners().subscribe(this,s.prototype.changeSymbol),this._properties.interval.listeners().subscribe(this,s.prototype.changeInterval),
this._properties.timeframe.listeners().subscribe(this,s.prototype.changeTimeFrame),this._properties.listeners().subscribe(this,s.prototype.changeProperties)},s.prototype.changeSymbol=function(){this.setSymbolIntervalDelayed(),this.m_model.checkLineToolSelection()},s.prototype.changeInterval=function(){this.setSymbolIntervalDelayed()},s.prototype.changeTimeFrame=function(){F("GUI","Change timeframe")},s.prototype.title=function(){return this.properties().symbol.value()+", "+W(this.properties().interval.value())},s.prototype.changeProperties=function(e){e!==this._properties.symbol&&e!==this._properties.interval&&e!==this._properties.timeframe&&(this._tagsChanged.fire(),this.createPaneView(),this.updateAllViews(),this.m_model.updateSource(this),re.emit("series_properties_changed",this._id))},s.prototype._makeNextSymbolId=function(){return"symbol_"+this._nextSymbolId++},s.prototype._makeNextSeriesId=function(){return"s"+this._nextSeriesId++},s.prototype.onData=function(e){var t,i,n,o,r,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w=this;switch(e.method){case"symbol_resolved":if(e.params[0]!==this._symbolId){U.logNormal("command for old symbol. Expected:"+this._symbolId+", actual"+e.params[0]);break}this.updateSymbolInfo(e.params[1]),this.m_model.updateSource(this),this._dataEvents.fireSymbolResolved(this._symbolInfo),this.m_model.realignLineTools(),TradingView.onWidget()||(F("Symbol",e.params[1].listed_exchange,e.params[1].name),F("Symbol Type",e.params[1].type,e.params[1].listed_exchange)),t=this.symbolInfo().minmov/this.symbolInfo().pricescale,(i=this.properties()).style.value()===s.STYLE_RENKO&&i.renkoStyle.inputs.boxSize.value()<t?i.renkoStyle.inputs.merge({boxSize:t}):i.style.value()===s.STYLE_PNF&&i.pnfStyle.inputs.boxSize.value()<t?i.pnfStyle.inputs.merge({boxSize:t}):i.style.value()===s.STYLE_KAGI&&i.kagiStyle.inputs.reversalAmount.value()<t&&i.kagiStyle.inputs.merge({reversalAmount:t});break;case"symbol_error":if(e.params[0]!==this._symbolId){U.logNormal("command for old symbol. Expected:"+this._symbolId+", actual"+e.params[0]);break}if(this._setStatus(s.STATUS_INVALID_SYMBOL),this._properties.shortName.setValue(this._properties.symbol.value()),this.m_model.clearAllStudies(),this.updateAllViews(),this.m_model.updateSource(this),(n=e.params[1])===s.PERMISSION_DENIED)switch(e.params[2]){case s.PD_REASON_EXTENDED_HOURS:this._dataEvents.fireExtendedHoursNotPermitted();break;case s.PD_REASON_SYMBOL:this._dataEvents.fireSymbolNotPermitted(e.params[3]);break;case s.PD_REASON_GROUP_PERMISSION:this._dataEvents.fireSymbolGroupNotPermitted(e.params[3]);break;default:this._dataEvents.fireSymbolNotPermitted(e.params[2])}else this.m_model.resetTimeScale(),this._dataEvents.fireSymbolError(e);this.m_model.realignLineTools();break;case"series_timeframe":if(e.params[1]!==this._turnaround)break;o=e.params[2],r=e.params[3],l=e.params[4],c=this.m_model.timeScale(),u=r,void 0===l?u+=c.defaultRightOffsetProperty().value():l.applyDefaultRightMargin?u+=c.defaultRightOffsetProperty().value():l.percentRightMargin&&(h=r-o+1,
u+=(d=Math.max(0,Math.min(.99,l.percentRightMargin/100)))*h/(1-d)),this.m_model.setTimeViewport(o,u);break;case"series_error":n=e.params[2],delete this._loadingStartTime,C.enabled("charting_library_debug_mode")&&U.logNormal("Error reason: "+n),this._setStatus(C.enabled("no_bars_status")&&this._symbolInfo?s.STATUS_NO_BARS:s.STATUS_INVALID_SYMBOL),"string"==typeof n&&(n.startsWith("study_not_auth:")?(p=n.split(":",2)[1].split("@",2)[0])in{BarSetRenko:!0,BarSetPriceBreak:!0,BarSetKagi:!0,BarSetPnF:!0}?this._dataEvents.fireChartTypeNotPermitted(p):"BarSetSpread"===p?this._dataEvents.fireIntradaySpreadNotPermitted():"BarSetRange"===p&&this._dataEvents.fireCustomIntervalNotPermitted():"resolution_not_entitled"===n?this._dataEvents.fireIntradayExchangeNotPermitted():"custom_resolution"===n?this._dataEvents.fireCustomIntervalNotPermitted():"seconds_not_entitled"===n&&isFeatureEnabled("seconds_bars")&&this._dataEvents.fireSecondsIntervalNotPermitted()),this._seriesLoaded=!0,this._dataEvents.fireSeriesError(e);break;case"series_loading":if(e.params[1]!==this._turnaround)break;if(e.params[0]!==this._seriesId){U.logNormal("command for old series. Expected:"+this._seriesId+", actual"+e.params.customId);break}this._setStatus(s.STATUS_LOADING),w._loadingStartTime=(new Date).getTime();break;case"series_completed":if(e.params[2]!==this._turnaround)break;if(e.params[0]!==this._seriesId){U.logNormal("command for old series. Expected:"+this._seriesId+", actual"+e.params.customId);break}if(this._setSymbolIntervalDelay){if(this._willSymbolIntervalChanged())return void U.logNormal("command comes during symbol/interval changing");U.logNormal("series_completed comes when symbol interval delay present but symbol/interval should not be changed")}switch(_="chartSession:"+w._chartApi._sessionid,f=(new Date).getTime()-this._loadingStartTime,U.logDebug(_+", Series loading took "+f+" ms, eod:"+this._endOfData),delete this._loadingStartTime,"pulsed"===(m=e.params[1])&&(m="delayed"),m){case"streaming":this._setStatus(s.STATUS_READY);break;case"endofday":this._setStatus(s.STATUS_EOD);break;case"delayed":this._setStatus(s.STATUS_DELAYED);break;case"pulsed":this._setStatus(s.STATUS_PULSE);break;case"replay":this._setStatus(s.STATUS_REPLAY)}m.match(/delayed_streaming/)&&this._setStatus(s.STATUS_DELAYED_STREAMING),(y=this.m_model.paneForSource(this)).recalculatePriceScale(this.priceScale()),this.m_model.fullUpdate(),this.m_data.size()&&this._dataEvents.fireTickMarksRangeChanged({start:a(this.data().first()).value[TradingView.TIME_PLOT],end:a(this.data().last()).value[TradingView.TIME_PLOT]}),this.model().recalcVisibleRangeStudy(this.model().dataSources(),!0),this.model().recalcStudyBasedLineTools(),!this.m_priceScale.isLockScale()||this.model().timeScale().isEmpty()||this._seriesLoaded||(this.model().timeScale()._correctOffset(),this.model().timeScale().correctBarSpacing(),this.model().resetPriceScale(y,this.priceScale())),this._seriesLoaded=!0,this._dataEvents.fireCompleted(),this.requestMoreData();break;case"series_deleted":break;case"data_update":
if(e.params.customId!==this._seriesId){U.logNormal("command for old series. Expected:"+this._seriesId+", actual"+e.params.customId);break}if(e.params.turnaround!==this._turnaround){U.logNormal("command for old series turnaround. Expected:"+this._turnaround+", actual"+e.params.turnaround);break}if(this._setSymbolIntervalDelay){if(this._willSymbolIntervalChanged())return void U.logNormal("command comes during symbol/interval changing");U.logNormal("data_update comes when symbol interval delay present but symbol/interval should not be changed")}if(this.status()===s.STATUS_INVALID_SYMBOL)break;e.params.plots.length?(g=this.m_data.bars().size(),v=this.m_data.bars().firstIndex(),S=this.m_data.bars().merge(e.params.plots),(null===v||S.index<v)&&(this._endOfData=!1),b="Merge bars. earliestRow:"+S.index+"} ",b+="bars state:{firstBar:"+a(this.m_data.bars().firstIndex())+",lastBar:"+a(this.m_data.bars().lastIndex())+",size:"+this.m_data.bars().size()+"}",z.logDebug(b),g!==this.bars().size()&&(this._dataEvents.fireBarReceived(S),this.model().recalcVisibleRangeStudy(this.model().dataSources(),!0))):this.m_data.clear(),new Promise(function(t){var i=w.properties().style.value();e.params.nonseries&&"nochange"!==e.params.nonseries.indexes&&Y.isRangeBasedStyle(i)?w.parseJapProjBars(e.params.nonseries).then(function(e){w.m_data.m_nsBars=e.nsBars,w.m_data.lastProjectionPrice=e.lastPrice;var i=w.m_data.boxSize!==e.boxSize;w.m_data.boxSize=e.boxSize,w.m_data.reversalAmount=e.reversalAmount,i&&w._boxSizeChanged.fire(w.m_data.boxSize),t()}):(e.params.nonseries||(w.m_data.m_nsBars.clear(),w.m_data.lastProjectionPrice=void 0),t(),t())}).then(function(){w._statusView.invalidate();var e=w.m_model.paneForSource(w);w.m_model.updateAllVolumeStudies(),w.m_model.recalculatePane(e),w.m_model.updateSource(w),w.m_model.updateLineTools(),w.m_model.updateCrossHair()})}this._dataEvents.fireMessageReceived(e)},s.prototype.parseJapProjBars=function(e){var t,i,n,o=new D(k()),r=this.model().timeScale(),a=this.properties().style.value();return new Promise(function(l){e.d&&""!==e.d?R(e.d).then(function(c){var u,h,d,p,_=c.data;for(t=_.price,i=_.boxSize,n=_.reversalAmount,u=_.bars,h=0;u&&h<u.length;h++)d=[],p=e.indexes[u[h].time],d.push(r.points().valueAt(p)),d.push(u[h].open),d.push(u[h].high),d.push(u[h].low),d.push(u[h].close),d.push(u[h].volume),a===s.STYLE_KAGI?d.push(u[h].additionalPrice):a===s.STYLE_PNF&&d.push(u[h].factor),o.add(p,d);l({nsBars:o,lastPrice:t,boxSize:i,reversalAmount:n})}):l({nsBars:o,lastPrice:t,boxSize:i,reversalAmount:n})})},s.prototype.disconnect=function(){this._seriesId&&this._chartApi.removeSeries(this._seriesId),this._symbolId=null,this._seriesId=null,this.m_symbol=void 0,this._predictBars=0,this._status=s.STATUS_OFFLINE},s.prototype.isStarted=function(){return!!this._symbolId},s.prototype.restart=function(){var e,t;this._status!==s.STATUS_SNAPSHOT&&(e=i("OK+B"),this._onRestarted.fire(),this._setStatus(s.STATUS_RESOLVING),this.m_data=new M,this.updateSymbolInfo(null),this._prevSymbolId=this._symbolId,
this._symbolId=this._makeNextSymbolId(),t=this._properties.interval.value(),this._pendingTimeRange&&(t=this._generateTimeframe(t,this._pendingTimeRange),delete this._pendingTimeRange),this._onBeforeModifySeries(this.getSymbolString(),t),t=q(t),this._chartApi.resolveSymbol(this._symbolId,this._getResolvingSymbolString(),this._handler),this._seriesId?(this._turnaround="s"+ ++this._turnaroundCounter,this._chartApi.modifySeries(this._seriesId,this._turnaround,this._symbolId,t,this._handler,this._prevSymbolId)):(this._seriesId=this._makeNextSeriesId(),!1===this._chartApi.createSeries(this._seriesId,this._turnaround,this._symbolId,t,this._prepareChartApiParams(),this._handler)&&(this._seriesId=void 0)),this._properties.showInDataWindow.listeners().subscribe(this.m_model,e.prototype.fullUpdate),this.m_symbol=this._properties.symbol.value(),this.m_interval=this._properties.interval.value())},s.prototype._generateTimeframe=function(e,t){var i=t.slice(-1),n=e;return"ytd"===t?n+=",YTD":"d"===i?(n+=","+t.slice(0,-1),C.enabled("daily_timeframe_suffix")&&(n+="D")):"m"===i?n+=","+t.slice(0,-1)+"M":"all"===t&&(n+=",ALL"),n},s.prototype.hasDelayedSymbolIntervalChange=function(){return!!this._setSymbolIntervalDelay},s.prototype.setSymbolIntervalDelayed=function(){this._isDWMCached=null,this._willSymbolIntervalChanged()&&(this._setSymbolIntervalDelay&&(U.logNormal("Clear timeout to change symbol/interval #"+this._setSymbolIntervalDelay),clearTimeout(this._setSymbolIntervalDelay)),this._setSymbolIntervalDelay=setTimeout(function(){U.logNormal("Timeout #"+this._setSymbolIntervalDelay+' fired, new symbol will be "'+this._properties.symbol.value()+'"'),delete this._setSymbolIntervalDelay,this._setSymbolInterval(this._properties.symbol.value(),this._properties.interval.value())}.bind(this),30),U.logNormal("Started timeout #"+this._setSymbolIntervalDelay+' to change symbol/interval from "'+this.m_symbol+'" to "'+this._properties.symbol.value()+'"'))},s.prototype._willSymbolIntervalChanged=function(){var e=this._checkIntervalWillChanged(this._parseInterval(this._properties.interval.value()).interval),t=this._checkSymbolWillChanged(this._properties.symbol.value());return t||e},s.prototype._checkSymbolWillChanged=function(e){return!this.symbolSameAsCurrent(e)||C.enabled("same_data_requery")},s.prototype._checkIntervalWillChanged=function(e){return this.m_interval!==e||C.enabled("same_data_requery")},s.prototype._parseInterval=function(e){var t=(e+"").split(",");return{interval:2===t.length?t[0]:e,timeframe:2===t.length?t[1]:0}},s.prototype.rerequestData=function(){this._setSymbolInterval(this.m_symbol,this.m_interval,!0)},s.prototype._setSymbolInterval=function(e,t,i){var n,o,r,a,l,c,u;this.clearGotoDateResult(),(n=Z.isRange(t))&&this._properties.rangeStyle.inputs.range.setValue(Z.parse(t).multiplier()),r=(o=this._parseInterval(t)).interval,a=o.timeframe,l=this._checkSymbolWillChanged(e),c=this._checkIntervalWillChanged(r),(l||c||i)&&((n||Z.isRange(this.m_interval))&&(this._symbolId=null),this._syncModel=null,this.m_symbol=e,this.m_interval=r,
this.m_timeframe=a,this._symbolId&&!l||this.updateSymbolInfo(null),this.m_model.realignLineTools(),this._status!==s.STATUS_SNAPSHOT&&(this._setStatus(s.STATUS_RESOLVING),this._symbolIntervalChanged.fire(),c&&(u={timeframe:this._pendingTimeRange},this._intervalChanged.fire(this.m_interval,u),this._pendingTimeRange=u.timeframe&&u.timeframe.toLowerCase()),this._onRestarted.fire(),this._seriesLoaded=!1,this._chartApi&&this._chartApi.connected()&&(this._symbolId&&!l||(this._prevSymbolId=this._symbolId,this._symbolId=this._makeNextSymbolId(),this._chartApi.resolveSymbol(this._symbolId,this._getResolvingSymbolString(),this._handler)),this._seriesId?(this._onBeforeModifySeries(this.getSymbolString(),t),this._pendingTimeRange&&(t=this._generateTimeframe(t,this._pendingTimeRange),delete this._pendingTimeRange),this._turnaround="s"+ ++this._turnaroundCounter,this._predictBars=0,t=q(t),this._chartApi.modifySeries(this._seriesId,this._turnaround,this._symbolId,t,this._handler,this._prevSymbolId)):(this._onBeforeModifySeries(this.getSymbolString(),t),this._seriesId=this._makeNextSeriesId(),t=q(t),this._chartApi.createSeries(this._seriesId,this._turnaround,this._symbolId,t,this._prepareChartApiParams(),this._handler)))))},s.prototype.setDefaultTimeframe=function(e){this._pendingTimeRange=e},s.prototype.actualSymbol=function(){return this.symbolInfo()?this.symbolInfo().full_name:this.symbol()},s.prototype.proSymbol=function(){return this.symbolInfo()?this.symbolInfo().pro_name:this.symbol()},s.prototype.symbol=function(){return this.properties().symbol.value()},s.prototype.interval=function(){return this.properties().interval.value()},s.prototype.bars=function(){return this.m_data.m_bars},s.prototype.nsBars=function(){return this.m_data.m_nsBars},s.prototype.open=function(e){return this.m_data.valueAt(e)[TradingView.OPEN_PLOT]},s.prototype.high=function(e){return this.m_data.valueAt(e)[TradingView.HIGH_PLOT]},s.prototype.low=function(e){return this.m_data.valueAt(e)[TradingView.LOW_PLOT]},s.prototype.close=function(e){return this.m_data.valueAt(e)[TradingView.CLOSE_PLOT]},s.prototype.hl2=function(e){return(this.high(e)+this.low(e))/2},s.prototype.hlc3=function(e){return(this.high(e)+this.low(e)+this.close(e))/3},s.prototype.ohlc4=function(e){return(this.open(e)+this.high(e)+this.low(e)+this.close(e))/4},s.prototype.priceRange=function(e,t){var i,n,o,s,a,l,c,u;return TradingView.isInteger(e)?TradingView.isInteger(t)?this.data().isEmpty()?null:this.m_priceScale.isLockScale()&&null!==(i=this._model.mainSeriesScaleRatio())?(n=this.priceScale().internalHeight()/(this.model().timeScale().barSpacing()/i),s=((o=this.data().search(t,V.NearestLeft)).value[TradingView.HIGH_PLOT]+o.value[TradingView.LOW_PLOT])/2,new r(s-.5*n,s+.5*n)):(null!==(a=this.priceSource())?(l=this.data().bars().minMaxOnRangeCached(e,t,[{name:a,offset:0}]),c=this.data().nsBars().minMaxOnRangeCached(e,t,[{name:a,offset:0}])):(l=this.data().bars().minMaxOnRangeCached(e,t,[{name:"low",offset:0},{name:"high",offset:0}]),c=this.data().nsBars().minMaxOnRange(e,t,[{name:"low",
offset:0},{name:"high",offset:0}])),u=null!==(l=B(l,c))?l.min===l.max?new r(l.min-.5,l.max+.5):new r(l.min,l.max):new r(-.5,.5),this.priceScale().isLog()?new r(this.priceScale().priceToLogical(u.minValue()),this.priceScale().priceToLogical(u.maxValue())):u):(U.logDebug("Series.priceRange: incorrect endBar"),null):(U.logDebug("Series.priceRange: incorrect startBar"),null)},s.prototype.nearestData=function(e,t){if(TradingView.isInteger(e)){var i=this.data().search(e,t);return null!==i?i:void 0}U.logDebug("Series.nearestData: incorrect logicalPoint")},s.prototype.nearestIndex=function(e,t){var i=this.nearestData(e,t);return i?i.index:void 0},s.prototype.paneViews=function(){if(!this.properties().visible.value())return null;var e=[this._baseHorizontalLineView,this._paneView];return this._futureBarsPaneView&&e.push(this._futureBarsPaneView),this._projectionBarsPaneView&&e.push(this._projectionBarsPaneView),null!==this._waterlineView&&e.push(this._waterlineView),null!==this._priceLineView&&e.push(this._priceLineView),null!==this._gotoDateView&&e.push(this._gotoDateView),e.push(this._panePriceAxisView),e.push(this._projectionPriceAxisView),e},s.prototype.dataWindowView=function(){return this._dataWindowView},s.prototype.legendView=function(){return this._legendView},s.prototype.statusView=function(){return ae?this._statusView:null},s.prototype.priceAxisViews=function(e,t){return e.findTargetPriceAxisViews(this,t,this._priceAxisViews,[this._priceLinePriceAxisView])},s.prototype.purgeSymbolInfo=function(){this._symbolInfo=null,this._isDWMCached=null},s.prototype.symbolInfo=function(){return this._symbolInfo},s.prototype.updateSymbolInfo=function(e){var t,i,n=Y.extractSymbolNameFromSymbolInfo(e,this.m_symbol);this._symbolInfo=e,e&&(this._properties.shortName.setValue(e.name),t=this._properties.symbol.value(),i=n,C.enabled("uppercase_instrument_names")&&(t=t.toUpperCase(),i=i.toUpperCase()),n&&t!==i&&this._properties.symbol.setValue(n)),this._base=e?e.pricescale/e.minmov:100,this._recreatePriceFormattingDependencies(),this._statusView.update(),this.priceScale().updateFormatter(),this._quotesProvider.setQuotesSessionSymbol(n),this.checkInterval()},s.prototype._onQuotesUpdate=function(e,t){this.marketStatus.setValue(t.values.current_session),se&&void 0!==t.values.prev_close_price&&(this._legendView.update(),this.m_model.updateSource(this))},s.prototype.dataPoweredBy=function(){return null},s.prototype.symbolSameAsCurrent=function(e){if(X(this.m_symbol,e))return!0;var t=this._symbolInfo;if(t){if(X(t.full_name,e)||X(t.pro_name,e))return!0;if(X(t.ticker,e))return!0;if(t.aliases&&Q(t.aliases,e))return!0;if(t.alternatives&&Q(t.alternatives,e))return!0;if(0===e.indexOf("FRA:")&&X(t.pro_name,e.replace("FRA:","FWB:")))return!0}return!1},s.prototype.updateAllViews=function(){var e,t;for(this._paneView.update(),this._dataWindowView.update(),this._legendView.update(),this._statusView.update(),e=this._priceAxisViews.length,t=0;t<e;t++)this._priceAxisViews[t].update();this._priceLinePriceAxisView.update(),
this._futureBarsPaneView&&this._futureBarsPaneView.update(),this._projectionBarsPaneView&&this._projectionBarsPaneView.update(),null!==this._waterlineView&&this._waterlineView.update(),null!==this._priceLineView&&this._priceLineView.update(),null!==this._gotoDateView&&this._gotoDateView.update(),this._baseHorizontalLineView.update()},s.prototype._setStatus=function(e){this._status=e,this._statusView.update(),this.m_model.updateSource(this),this._onStatusChanged.fire()},s.prototype.requestMoreData=function(e){var t,i,n,o;this._status!==s.STATUS_READY&&this._status!==s.STATUS_PULSE&&this._status!==s.STATUS_DELAYED&&this._status!==s.STATUS_DELAYED_STREAMING&&this._status!==s.STATUS_EOD&&this._status!==s.STATUS_REPLAY||this.m_model.timeScale().isEmpty()||null!==(t=this.m_model.timeScale().visibleBarsStrictRange())&&0!==this.bars().size()&&(i=t.lastBar()-a(this.data().last()).index,this._predictBars<i&&(this._predictBars=i,this._chartApi&&this._chartApi.connected()&&this._chartApi.requestMoreTickmarks(this._seriesId,i,this._handler)),this._endOfData||(n=a(this.bars().firstIndex()),(o=e||n-t.firstBar())<=0||(Number.isFinite(o)?(this._endOfData=!0,this._chartApi&&this._chartApi.connected()&&(this._chartApi.requestMoreData(this._seriesId,o,this._handler),C.enabled("charting_library_base")&&(this._predictBars=0)),this._setStatus(s.STATUS_LOADING)):U.logWarn("requestMoreData: invalid bar count: "+o+", visible bars: ["+t.firstBar()+", "+t.lastBar()+"], last index: "+a(this.data().last()).index+", predicted bars: "+this._predictBars+", required bars:"+e))))},s.prototype.bindStyleChange=function(){var e=this;Object.keys(s.STYLE_SHORT_NAMES).map(function(e){return s.STYLE_SHORT_NAMES[e]+"Style"}).forEach(function(t){e._properties[t].listeners().subscribe(e,s.prototype.invalidateBarStylesCache)})},s.prototype.bindJapChartsInputs=function(){this._properties.style.listeners().subscribe(this,this.onChartStyleChanged),this._properties.renkoStyle.inputs.boxSize.listeners().subscribe(this,this.onInputChanged),this._properties.renkoStyle.inputs.style.listeners().subscribe(this,this.onInputChanged),this._properties.renkoStyle.inputs.atrLength.listeners().subscribe(this,this.onInputChanged),this._properties.renkoStyle.inputs.wicks.listeners().subscribe(this,this.onInputChanged),this._properties.pbStyle.inputs.lb.listeners().subscribe(this,this.onInputChanged),this._properties.kagiStyle.inputs.reversalAmount.listeners().subscribe(this,this.onInputChanged),this._properties.kagiStyle.inputs.style.listeners().subscribe(this,this.onInputChanged),this._properties.kagiStyle.inputs.atrLength.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.boxSize.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.reversalAmount.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.sources.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.style.listeners().subscribe(this,this.onInputChanged),
this._properties.pnfStyle.inputs.atrLength.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.oneStepBackBuilding.listeners().subscribe(this,this.onInputChanged),this._properties.rangeStyle.inputs.phantomBars.listeners().subscribe(this,this.onInputChanged)},s.prototype.createExtendedHoursProperty=function(){function e(){var e="undefined"!=typeof ProductFeatures&&isProductFeatureEnabled(ProductFeatures.EXTENDED_SESSION),i=t.model().readOnly(),n=t._properties.extendedHours.value(),o=C.enabled("widget");!n||o||i||e||(t._dataEvents.fireExtendedHoursNotPermitted(),n=!1),n&&t.isDWM()&&(n=!1),t.extendedHours.setValue(n)}var t=this;t.extendedHours=new o,t._properties.extendedHours.listeners().subscribe(null,e),t._properties.interval.listeners().subscribe(null,e),t.chartWidgetInitialized.subscribe(null,e),e()},s.prototype.dividendsAdjustmentProperty=function(){return null},s.prototype.setChartStyleWithIntervalIfNeeded=function(e,t){var i=t;void 0===t&&(i=K(e,this._properties.interval.value(),this._model.defaultResolutions())),Z.isEqual(i,this._properties.interval.value())||this._properties.interval.setValue(i),this._properties.style.setValue(e)},s.prototype.isNeedRestart=function(e){return this._status!==s.STATUS_SNAPSHOT&&(void 0===e&&(e=this.properties().style.value()),!Y.isRangeStyle(this._prevChartStyle)&&!Y.isRangeStyle(e)&&!(this._prevChartStyle===e||!Y.isRequiringRestartSeriesStyles(this._prevChartStyle)&&!Y.isRequiringRestartSeriesStyles(e)))},s.prototype.onChartStyleChanged=function(){this._updateBarFunction(),this.isNeedRestart()&&(this.data().clear(),this.model().timeScale().scrollToRealtime(!1),this.restart()),this._prevChartStyle=this.properties().style.value(),this._onStyleChanged.fire(this.properties().style.value()),this.invalidateBarStylesCache()},s.prototype.applyPreferences=function(e){var t=ie({},e);this.m_priceScale.setMode({autoScale:t.priceAxisProperties.autoScale,percentage:t.priceAxisProperties.percentage,log:t.priceAxisProperties.log,lockScale:t.priceAxisProperties.lockScale}),this.setChartStyleWithIntervalIfNeeded(t.style),delete t.style,delete t.interval,this._properties.mergePreferences(t),this._properties.saveDefaults(),this.createPaneView(),this.invalidateBarStylesCache()},s.prototype.barFunction=function(){return this._barFunction},s.prototype.priceSource=function(){var e=null;switch(this._properties.style.value()){case s.STYLE_LINE:e=this._properties.lineStyle.priceSource.value();break;case s.STYLE_AREA:e=this._properties.areaStyle.priceSource.value();break;case s.STYLE_BASELINE:e=this._properties.baselineStyle.priceSource.value()}return e},s.prototype._updateBarFunction=function(){if(this._properties.style.value()===s.STYLE_HILO)this._barFunction=A("low");else{var e=this.priceSource()||"close";this._barFunction=A(e)}},s.prototype.style=function(){return this.properties().style.value()},s.prototype.isRangeBasedStyle=function(){return Y.isRangeBasedStyle(this.style())},s.prototype.onInputChanged=function(){this.restart()},
s.prototype.onExtendedHoursChanged=function(){return this._extendedHoursChanged},s.prototype._getSymbolObject=function(){var e;return e={symbol:e=C.enabled("pay_attention_to_ticker_not_symbol")&&this._symbolInfo?this._symbolInfo.ticker:this.actualSymbol()},this.extendedHours.value()&&(e.session="extended"),s.SYMBOL_STRING_DATA.hasOwnProperty(this._properties.style.value())&&(e={symbol:e,type:this.styleStudyInfo(this.getStyleShortName()+"Style").studyId+"!",inputs:this.getInputsProperties().state()}),e},s.prototype.getSymbolString=function(){return oe(this._getSymbolObject())},s.prototype._getResolvingSymbolString=function(){var e=this._getSymbolObject();return oe(e)},s.prototype.getStyleShortName=function(){var e=this._properties.style.value();if(s.STYLE_SHORT_NAMES.hasOwnProperty(e))return s.STYLE_SHORT_NAMES[e];throw new Error("Missed short name for style "+e)},s.prototype.getStyleProperties=function(){return this._properties[this.getStyleShortName()+"Style"]},s.prototype.getInputsProperties=function(){return this.getStyleProperties().inputs||new o},s.prototype.getInputsInfoProperties=function(){return this.getStyleProperties().inputInfo||new o},s.prototype.getRealVisibleRange=function(){var e,t,i=this.model().timeScale().visibleBarsStrictRange();return null===i?null:(e=this.data().search(i.firstBar(),V.NearestRight),t=this.data().search(i.lastBar(),V.NearestLeft),null===e||null===t?null:new x(e.index,t.index))},s.prototype.firstValue=function(){var e=this.firstBar();return null===e?null:this._barFunction(e)},s.prototype.firstBar=function(){var e,t,i=this.model().timeScale().visibleBarsStrictRange();return null===i?null:(e=i.firstBar(),null!==(t=this.data().search(e,V.NearestRight))?t.value:null)},s.prototype.isSpread=function(){return null!==this._symbolInfo&&"spread"===this._symbolInfo.type},s.prototype.firstSymbol=function(){return this._symbolInfo?this._symbolInfo.legs[0]:""},s.prototype.firstShortName=function(){return E.ticker(this.firstSymbol())},s.prototype.loadDataTo=function(e){this._turnaround="s"+ ++this._turnaroundCounter;var t=this._properties.interval.value();t=this._generateTimeframe(t,e),this._chartApi.modifySeries(this._seriesId,this._turnaround,this._symbolId,t,this._handler)},s.prototype.checkInterval=function(){if(this._symbolInfo&&(Z.isIntraday(this.interval())&&!this._symbolInfo.has_intraday&&this.requestingIntradayWhenNotSupported.fire(),this._symbolInfo.hasOwnProperty("supported_resolutions"))){var e=Z.normalize(this._properties.interval.value());-1===this._symbolInfo.supported_resolutions.indexOf(e)&&this.requestingResolutionWhenNotSupported.fire(this._symbolInfo.supported_resolutions[0])}},s.prototype.priceScale=function(){return this.m_priceScale},s.prototype.setPriceScale=function(e){this.m_priceScale!==e&&(this.m_priceScale=e,this._priceScaleChanged.fire(e),this._properties.removeProperty("priceAxisProperties"),this._properties.addChild("priceAxisProperties",e.properties()),this._properties.priceAxisProperties.childChanged(),re.emit("series_event","price_scale_changed"))},
s.prototype.priceScaleChanged=function(){return this._priceScaleChanged},s.prototype.setGotoDateResult=function(e){this._gotoDateResultCleared=!1,i.e("series-pane-views").then(function(t){if(!this._gotoDateResultCleared){var n=i("+weX").GotoDateView;this._gotoDateView=new n(this,e),this.m_model.updateSource(this)}}.bind(this).bind(null,i)).catch(i.oe)},s.prototype.clearGotoDateResult=function(e){this._gotoDateView=null,this._gotoDateResultCleared=!0},s.prototype.syncModel=function(){var e,t;if(!this._syncModel){if(e=this.symbolInfo(),t=this.interval(),!e||!t)return null;this._syncModel=new N(e,t)}return this._syncModel},s.prototype.turnaround=function(){return this._turnaround},s.prototype.getStylesPropertyPage=function(){return C.enabled("show_chart_property_page")?T.ChartStylesPropertyPage:null},s.prototype.getSourceIcon=function(){return{type:"loadSvg",svgId:"series."+this.properties().style.value()}},s.prototype.isStyleSupported=function(e){return!0},s.prototype.isIntervalSupported=function(e){return!0},s.prototype.isStyleSupportedForReplay=function(e){return Y.isTimeBasedStyle(e)},s.prototype.isInReplay=function(){return null!==this._replaySubscriber},s.prototype._onBeforeModifySeries=function(e,t){},s.prototype._isExtendedHoursAllowed=function(){return this._symbolInfo&&-1!==["stock","index","futures"].indexOf(this._symbolInfo.type)},s.prototype._getTelemetryAdditionalData=function(e,t){t=void 0===t||t;var i={symbol:this.actualSymbol()};return t&&(i.resolution=this.interval()),void 0!==e&&(i.reason=e),i},s.prototype._sendTelemetryReport=function(e,t,i){void 0===i&&(i=this._getTelemetryAdditionalData());var n=Object.assign(t,{additional:i});telemetry.sendChartReport(e,n)},s.prototype._sendTelemetryCounter=function(e,t){this._sendTelemetryReport(e,{count:1},t)},s.prototype._sendTelemetryTiming=function(e,t,i){this._sendTelemetryReport(e,{value:t},i)},s.prototype.destroy=function(){this._replayExitedDueUnsupportedInterval.destroy(),this._replayExitedDueUnavailableForUserInterval.destroy(),this._quotesProvider.quotesUpdate().unsubscribeAll(this),this._quotesProvider.destroy(),this.clearGotoDateResult(),this._legendView.destroy(),this._paneView&&this._paneView.destroy&&this._paneView.destroy()},s.prototype.dataEvents=function(){return this._dataEvents},TradingView.Series=s,t.Series=s}).call(this,i("aIyQ"),i("hY0g"),i("tc+8"),i("Qb4w").PriceRange)},qcGP:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolParallelChannel";var r=t||n.createProperties();o.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("9FRF").ParallelChannelPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=window.t("Parallel Channel");inherit(n,o),n.prototype.addPoint=function(e){var t,i=o.prototype.addPoint.call(this,e);return i&&(t=this.points()[0],this._points[2].index=t.index,this._points[2].price=t.price+this._priceOffset),i},n.prototype.calculatePriceDiff=function(){
var e,t,i,n,o,r,s,a,l,c,u,h,d,p,_,f,m,y;if(3===this.points().length){if(e=this.points()[0],t=this.points()[1],i=this.points()[2],e.index===t.index)return;if(null===(n=this.priceScale()))return;if(n.isLog()){if((o=this._model.timeScale()).isEmpty())return;r=this.ownerSource().firstValue(),s=o.indexToCoordinate(e.index),a=o.indexToCoordinate(t.index),h=(l=n.priceToCoordinate(e.price,r))+(u=((c=n.priceToCoordinate(t.price,r))-l)/(a-s))*(o.indexToCoordinate(i.index)-s),d=n.priceToCoordinate(i.price,r)-h,r=this.ownerSource().firstValue(),p=.5*(l+c),_=n.coordinateToPrice(p,r),f=p+d,m=n.coordinateToPrice(f,r),this._priceOffset=m-_}else u=(t.price-e.price)/(t.index-e.index),y=e.price+u*(i.index-e.index),this._priceOffset=i.price-y}},n.prototype.setLastPoint=function(e,t){t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[0]),o.prototype.setLastPoint.call(this,e),this.calculatePriceDiff()},n.prototype.restorePoints=function(e,t,i){o.prototype.restorePoints.call(this,e,t,i),e&&e.length>=3&&(this._priceOffset=e[2].price-e[0].price)},n.prototype.setPoint=function(e,t,i){i&&i.shift()&&e<2&&this._snapPoint45Degree(t,this.points()[1-e]),o.prototype.setPoint.call(this,e,t,i),2===e&&this.calculatePriceDiff();var n=this.points()[0];this._points[2].index=n.index,this._points[2].price=n.price+this._priceOffset},n.prototype.pointsCount=function(){return 3},n.prototype.title=function(){return a},n.prototype.name=function(){return"Parallel Channel"},n.prototype.hasEditableCoordinates=function(){return!1},n.prototype.addPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[0]),o.prototype.addPoint.call(this,e,t)},n.prototype.fixAfterRestorePriceAxis=function(){this.priceScale().isLog()||delete this._priceOffset},n.prototype.cloneData=function(e){this._priceOffset=e._priceOffset},n.prototype.restoreData=function(e){e.priceOffset&&(this._priceOffset=e.priceOffset)},n.prototype.state=function(e){var t=o.prototype.state.call(this,e);return t.priceOffset=this._priceOffset,t},n.prototype.canHasAlert=function(){return!0},n.prototype._getAlertPlots=function(){function e(e,t){return e.index<=t.index?[e,t]:[t,e]}var t,i,n,o,r,s,a,l,c=[].concat(this._points).splice(0,2);return t=e((c=c.concat([{price:c[0].price+this._priceOffset,time:c[0].time,index:c[0].index},{price:c[1].price+this._priceOffset,time:c[1].time,index:c[1].index}]))[0],c[1]),i=e(c[2],c[3]),this._priceOffset<0?(o=i,n=t):(o=t,n=i),a=this.properties().extendLeft.value(),l=this.properties().extendRight.value(),c[0].index<=c[1].index?(r=a,s=l):(r=l,s=a),[this._linePointsToAlertPlot(n,"Upper",r,s),this._linePointsToAlertPlot(o,"Lower",r,s)]},n.prototype.getInputsPropertyPage=function(){return null},n.prototype.getStylesPropertyPage=function(){return s.LineToolParallelChannelStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("VkdP").ParallelChannelDefinitionsViewModel
}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new r("linetoolparallelchannel",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolParallelChannel=n},qckB: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(6 3)"><rect width="15" height="12" rx="2" x=".5" y="8.5"/><path stroke-linecap="round" stroke-width="2" d="M8 15v2"/><path d="M11.5 4a3.5 3.5 0 0 0-7 0v4.5"/></g></svg>'},qgcf:function(e,t,i){"use strict";function n(e,t,i,n,o){var r=.5*(t.x+i.x),a=i.y;return a=t.y>i.y?a-e.height-2*e.textBgPadding-n.y>0?a-e.height-n.y-2*e.textBgPadding:n.y-2*e.textBgPadding:a+e.height+e.textBgPadding+n.y>o?o-e.height-n.y:a+e.textBgPadding,new s.Point(r,a)}function o(){var e=document.createElement("canvas");e.width=0,e.height=0,p=Object(a.ensureNotNull)(e.getContext("2d"))}function r(e,t,i){var n,r,s,a,l,c,u,d,_;if(p||o(),i=Object(h.isString)(i)?parseInt(i):i,(n=(e+="").split(/[^\S\r\n]*(?:\r\n|\r|\n|$)/))[n.length-1]||n.pop(),!Object(h.isNumber)(i)||!isFinite(i)||i<=0)return n;for(p.font=t,r=[],s=0;s<n.length;s++)if(a=n[s],(l=p.measureText(a).width)<=i)r.push(a);else for(c=a.split(/([-\)\]\},.!?:;])|(\s+)/),u=0;c.length;){if((d=~~(i/l*(c.length+2)/3))<=0||p.measureText(c.slice(0,3*d-1).join("")).width<=i)for(;p.measureText(c.slice(0,3*(d+1)-1).join("")).width<=i;)d++;else for(;d>0&&p.measureText(c.slice(0,3*--d-1).join("")).width>i;);if(d>0)r.push(c.slice(0,3*d-1).join("")),c.splice(0,3*d);else{if(_=c[0]+(c[1]||""),u=1===u?1:~~(i/p.measureText(_).width*_.length),p.measureText(_.substr(0,u)).width<=i)for(;p.measureText(_.substr(0,u+1)).width<=i;)u++;else for(;u>1&&p.measureText(_.substr(0,--u)).width>i;);u<1&&(u=1),r.push(_.substr(0,u)),c[0]=_.substr(u),c[1]=""}if(p.measureText(c.join("")).width<=i){r.push(c.join(""));break}}return r}var s,a,l,c,u,h,d,p,_;i.r(t),i.d(t,"calculateLabelPosition",function(){return n}),i.d(t,"wordWrap",function(){return r}),i.d(t,"TextRenderer",function(){return _}),s=i("aO4+"),a=i("Eyy1"),l=i("f6yo"),c=i("VdBB"),u=i("jFln"),h=i("ogJP"),d=i("ikwP"),_=function(){function e(e,t){this._linesMaxWidth=null,this._fontSize=0,this._data=null,this._lines=[],this._hittest=t||new c.HitTestResult(c.HitTestResult.MOVEPOINT),void 0!==e&&this.setData(e)}return e.prototype.setData=function(e){var t,i,n,o=this._data,r=this.fontStyle();this._data=e,this._fontSize=e.fontsize||e.fontSize||30,t=null!==o&&e.text===o.text,i=null!==o&&e.wordWrapWidth===o.wordWrapWidth,n=r===this.fontStyle(),null!==o&&t&&i&&n?(this._data.lines=o.lines,this._lines=o.lines||[]):(this._linesMaxWidth=null,e.lines=this.wordWrap(e.text,e.wordWrapWidth),this._lines=e.lines||[])},e.prototype.draw=function(e){var t,i,n,o,r,s,a,l,c,h,p,_,f,m,y,g;if(null!==this._data&&0!==this._data.points.length){switch(t=this._x(),i=this._y(),n=this._fontSize,this._data.scaleY&&(n*=this._data.scaleY),i-=n*(this._lines.length-1),e.textBaseline="alphabetic",e.font=this.fontStyle(),
this._data.horzAlign){case"left":e.textAlign="start";break;case"right":e.textAlign="end";break;case"center":e.textAlign="center"}if(e.translate(t+.5,i+.5),t=0,i=0,this._data.scaleX&&this._data.scaleY&&(o=Math.min(this._data.scaleX,this._data.scaleY),e.scale(o,o)),r=this._getLinesMaxWidth(),s=Object(d.calcTextHorizontalShift)(e,r),a=0,this._data.backgroundColor||this._data.borderColor||this._data.highlightBorder&&this._data.wordWrapWidth){switch(l=t,this._data.horzAlign){case"left":break;case"right":l-=r;break;case"center":l-=r/2}c=n*this._lines.length,h=~~(n/3),this._data.backgroundHorzInflate&&(r+=2*this._data.backgroundHorzInflate,l-=this._data.backgroundHorzInflate),this._data.backgroundVertInflate&&(c+=2*this._data.backgroundVertInflate,i+=this._data.backgroundVertInflate),(p={x:Math.floor(l-h),y:Math.floor(i-n),w:Math.ceil(r+2*h),h:Math.ceil(c+2*h)}).w%2!=0&&p.w++,this._data.padding&&(p.h+=this._data.padding,a=this._data.padding),this._data.backgroundVertInflate&&(i+=this._data.backgroundVertInflate),this._data.backgroundRoundRect?(Object(u.drawRoundRect)(e,p.x,p.y,p.w,p.h,this._data.backgroundRoundRect),this._data.backgroundColor&&(e.fillStyle=this._data.backgroundColor,e.fill()),this._data.borderColor&&(_=~~Math.max(n/12,1),e.strokeStyle=this._data.borderColor,e.lineWidth=_,e.stroke())):(this._data.backgroundColor&&(e.fillStyle=this._data.backgroundColor,e.fillRect(p.x,p.y,p.w,p.h)),this._data.borderColor?(_=~~Math.max(n/12,1),e.strokeStyle=this._data.borderColor,e.lineWidth=_,e.strokeRect(p.x-_/2,p.y-_/2,p.w+_,p.h+_)):this._data.highlightBorder&&(e.strokeStyle=this._data.color,e.lineWidth=1,e.beginPath(),f=void 0,m=void 0,y=[3,1],e.dashedLineTo(p.x-.5,m=p.y-.5,f=p.x+p.w+.5,m,y),e.dashedLineTo(f,m,f,m=p.y+p.h+.5,y),e.dashedLineTo(f=p.x-.5,m,p.x+p.w+.5,m,y),e.dashedLineTo(f,p.y-.5,f,m,y),e.stroke()))}for(this._data.backgroundVertInflate&&!this._data.backgroundColor&&(i+=2*this._data.backgroundVertInflate),e.fillStyle=this._data.color,this._data.forceTextAlign&&(e.textAlign=this._data.horzAlign?this._data.horzAlign:"left"),this._data.forceTextAlign||(t+=s),g=0;g<this._lines.length;g++)e.fillText(this._lines[g],t,i),i+=n+a}},e.prototype.hitTest=function(e){var t,i,n,o,r,s;return null===this._data||0===this._data.points.length?null:(t=this._fontSize,this._data.scaleY&&(t*=this._data.scaleY),i=this._getLinesMaxWidth(),this._data.scaleX&&(i*=this._data.scaleX),n=this._data.points[0].x+this._data.offsetX,o=this._data.points[0].y+this._data.offsetY,"bottom"===this._data.vertAlign&&(o-=this._lines.length*this._fontSize),"middle"===this._data.vertAlign&&(o-=this._lines.length*this._fontSize/2),"right"===this._data.horzAlign?n-=i:"center"===this._data.horzAlign&&(n-=i/2),r=this._data.backgroundColor||this._data.borderColor?~~(t/6):0,s=this._data.borderColor?~~Math.max(t/12,1):0,e.x>=n-r-s&&e.x<=n+i+r+s&&e.y>=o-s&&e.y<=o+this._lines.length*this._fontSize+2*r+s?this._hittest:null)},e.prototype.doesIntersectWithBox=function(e){
return null!==this._data&&0!==this._data.points.length&&Object(l.pointInBox)(this._data.points[0],e)},e.prototype.measure=function(){var e,t,i,n;return null===this._data?{width:0,height:0,textBgPadding:0}:(e=this._fontSize,t=this._getLinesMaxWidth(),i=e*this._lines.length,n=~~(e/3),this._data.backgroundHorzInflate&&(t+=2*this._data.backgroundHorzInflate),this._data.backgroundVertInflate&&(i+=2*this._data.backgroundVertInflate),t=Math.ceil(t+2*n),i=Math.ceil(i+2*n),t%2!=0&&t++,this._data.padding&&(i+=this._data.padding),{width:t,height:i,textBgPadding:n})},e.prototype.setPoints=function(e,t){Object(a.ensureNotNull)(this._data).points=e,this._hittest=t||new c.HitTestResult(c.HitTestResult.MOVEPOINT)},e.prototype.fontStyle=function(){return null===this._data?"":(this._data.bold?"bold ":"")+(this._data.italic?"italic ":"")+this._fontSize+"px "+this._data.font},e.prototype.wordWrap=function(e,t,i){return r(e,i||this.fontStyle(),t)},e.prototype._getLinesMaxWidth=function(){var e,t;if(null!==this._linesMaxWidth)return this._linesMaxWidth;if(p||o(),p.textBaseline="alphabetic",p.font=this.fontStyle(),null!==this._data&&this._data.wordWrapWidth)return this._data.wordWrapWidth;for(e=0,t=0;t<this._lines.length;t++)e=Math.max(e,p.measureText(this._lines[t]).width);return this._linesMaxWidth=e,e},e.prototype._x=function(){var e=Object(a.ensureNotNull)(this._data);return e.points[0].x+e.offsetX},e.prototype._y=function(){var e,t=Object(a.ensureNotNull)(this._data),i=this._fontSize*this._lines.length;switch(t.scaleY&&(i*=t.scaleY),e=t.points[0].y+t.offsetY+i,t.vertAlign){case"top":break;case"bottom":e-=i;break;case"middle":e-=i/2}return e},e}()},quTg:function(e,t,i){},qySK:function(e,t,i){"use strict";function n(e){var t,i,n,o;if(!Object(a.isObject)(e))throw new Error("Graphics commands should be wrapped in an object");if(Object(a.hasProperty)(e,"create"),Object(a.hasProperty)(e,"erase"))for(t=e.erase,Object(s.assert)(Array.isArray(t),"Collection of erase commands should be array"),i=0,n=t;i<n.length;i++){if(o=n[i],!Object(a.isObject)(o)||!Object(a.hasProperty)(o,"action"))throw new Error("Command should be an object with 'action' property");Object(s.assert)("all"===o.action||"one"===o.action,"Erase command action should be 'all' or 'one'")}return e}function o(e,t){var i=new Map;return e.forEach(function(e,n){return i.set(n,t(e))}),i}function r(e,t,i,n,o){var r,a,l,c,u;if(void 0!==t)for(r=0,a=t;r<a.length;r++)c=(l=a[r]).styleId,void 0!==i&&Object(s.assert)(c in i,"Every style used by graphics primitive should be declared in study metainfo"),void 0===(u=e.get(c))&&(u=new d(o,n),e.set(c,u)),l.data.forEach(u.addData.bind(u))}var s,a,l,c,u,h,d;i.d(t,"b",function(){return n}),i.d(t,"a",function(){return h}),s=i("Eyy1"),a=i("JmuD"),l=i("SqfW"),c=i("7Fue"),u=i("xWfy"),h=function(){function e(){this._indexes=[],this._horizlines=new Map,this._vertlines=new Map,this._lines=new Map,this._hlines=new Map,this._textmarks=new Map,this._shapemarks=new Map,this._backgrounds=new Map,this._polygons=new Map,this._trendchannels=new Map,
this._hhists=new Map,this._dwglabels=new Map,this._dwglines=new Map,this._hhistsByTimePointIndex=new Map}return e.prototype.horizlines=function(){return this._horizlines},e.prototype.vertlines=function(){return this._vertlines},e.prototype.lines=function(){return this._lines},e.prototype.hlines=function(){return this._hlines},e.prototype.textmarks=function(){return this._textmarks},e.prototype.shapemarks=function(){return this._shapemarks},e.prototype.backgrounds=function(){return this._backgrounds},e.prototype.polygons=function(){return this._polygons},e.prototype.trendchannels=function(){return this._trendchannels},e.prototype.hhists=function(){return this._hhists},e.prototype.dwglabels=function(){return this._dwglabels},e.prototype.dwglines=function(){return this._dwglines},e.prototype.hhistsByTimePointIndex=function(){return this._hhistsByTimePointIndex},e.prototype.clear=function(){this._indexes=[],this._clearPrimitives()},e.prototype.extract=function(){var e=function(e){return e.extract()},t={indexes:this._indexes,horizlines:o(this._horizlines,e),vertlines:o(this._vertlines,e),lines:o(this._lines,e),hlines:o(this._hlines,e),textmarks:o(this._textmarks,e),shapemarks:o(this._shapemarks,e),backgrounds:o(this._backgrounds,e),polygons:o(this._polygons,e),trendchannels:o(this._trendchannels,e),hhists:o(this._hhists,e),dwglabels:o(this._dwglabels,e),dwglines:o(this._dwglines,e)};return this._hhistsByTimePointIndex=new Map,new u.a("data",t)},e.prototype.replaceIndexesTo=function(e){var t,i=this;this._indexes=e,t=function(e){return e.replaceIndexesTo(i._indexes)},this._horizlines.forEach(t),this._vertlines.forEach(t),this._lines.forEach(t),this._hlines.forEach(t),this._textmarks.forEach(t),this._shapemarks.forEach(t),this._backgrounds.forEach(t),this._polygons.forEach(t),this._trendchannels.forEach(t),this._hhists.forEach(t),this._dwglabels.forEach(t),this._dwglines.forEach(t),this._hhistsByTimePointIndex=Object(c.b)(this._hhists)},e.prototype.processCommands=function(e,t){void 0!==e.erase&&this._processEraseCommands(e.erase),void 0!==e.create&&this._processCreateCommands(e.create,t)},e.prototype._processCreateCommands=function(e,t){var i,n;for(i in e)if(e.hasOwnProperty(i))switch(n=i,Object(s.assert)(n in t,"There is a '"+n+"' in study response, but it doesn't present in graphics info!"),n){case"vertlines":r(this._vertlines,e[n],t[n],this._indexes,l.b)}this._hhistsByTimePointIndex=Object(c.b)(this._hhists)},e.prototype._processEraseCommands=function(e){var t,i,n=function(e){if("all"===e.action)o._clearPrimitives();else{var t=function(t){return t.deleteById(e.id)};switch(e.type){case"horizlines":o._horizlines.forEach(t);break;case"vertlines":o._vertlines.forEach(t);break;case"lines":o._lines.forEach(t);break;case"hlines":o._hlines.forEach(t);break;case"textmarks":o._textmarks.forEach(t);break;case"shapemarks":o._shapemarks.forEach(t);break;case"backgrounds":o._backgrounds.forEach(t);break;case"polygons":o._polygons.forEach(t);break;case"trendchannels":o._trendchannels.forEach(t);break;case"hhists":o._hhists.forEach(t)
;break;case"dwglabels":o._dwglabels.forEach(t);break;case"dwglines":o._dwglines.forEach(t)}}},o=this;for(t=0,i=e;t<i.length;t++)n(i[t]);this._hhistsByTimePointIndex=Object(c.b)(this._hhists)},e.prototype._clearPrimitives=function(){this._horizlines.clear(),this._vertlines.clear(),this._lines.clear(),this._hlines.clear(),this._textmarks.clear(),this._shapemarks.clear(),this._backgrounds.clear(),this._polygons.clear(),this._trendchannels.clear(),this._hhists.clear(),this._dwglabels.clear(),this._dwglines.clear(),this._hhistsByTimePointIndex=new Map},e}(),d=function(){function e(e,t){this._primitivesData=new Set,this._primitiveById=new Map,this._materializePrimitive=e,this._indexes=t}return e.prototype.forEach=function(e,t){var i=this;this._primitiveById.forEach(function(n){e.call(t,n,n,i)})},e.prototype.has=function(e){var t=!1;return this._primitiveById.forEach(function(i){t=t||i===e}),t},Object.defineProperty(e.prototype,"size",{get:function(){return this._primitiveById.size},enumerable:!0,configurable:!0}),e.prototype[Symbol.iterator]=function(){throw new Error("Not implemented")},e.prototype.entries=function(){throw new Error("Not implemented")},e.prototype.keys=function(){throw new Error("Not implemented")},e.prototype.values=function(){throw new Error("Not implemented")},e.prototype.hasId=function(e){return this._primitiveById.has(e)},e.prototype.addData=function(e){this._primitivesData.add(e),this._tryMaterialize(e)},e.prototype.deleteById=function(e){this._primitiveById.delete(e)},e.prototype.clear=function(){this._primitivesData.clear(),this._primitiveById.clear()},e.prototype.replaceIndexesTo=function(e){this._indexes=e,this._primitiveById.clear(),this._primitivesData.forEach(this._tryMaterialize,this)},e.prototype.extract=function(){var e=this._primitivesData;return this._primitivesData=new Set,this._primitiveById.clear(),e},e.prototype._tryMaterialize=function(e){var t=this._materializePrimitive(e,this._indexes);null!==t&&(Object(s.assert)(!this._primitiveById.has(e.id),"primitive with specified id should not exist"),this._primitiveById.set(e.id,t))},e}()},r813:function(e,t,i){"use strict";var n,o;i.r(t),i.d(t,"CrosshairSelectionPaneView",function(){return o}),n=i("IjC5"),o=function(){function e(e){this._renderer=new n.RectangleRenderer,this._rectangle=null,this._crosshair=e}return e.prototype.update=function(){var e=this._crosshair.selection();null!==e&&null!==this._crosshair.pane?this._rectangle=this._crosshair.pane.logicalRectToPixels(e):this._rectangle=null},e.prototype.renderer=function(e,t,i){var n,o;return this._rectangle?(o={backcolor:(n=this._crosshair.model().isDark())?"rgba(21, 101, 192, 0.3)":"rgba(33, 150, 243, 0.3)",color:n?"rgba(21, 101, 192, 0.8)":"rgba(33, 150, 243, 0.8)",fillBackground:!0,linewidth:1,points:[this._rectangle.min,this._rectangle.max]},this._renderer.setData(o),this._renderer):null},e}()},r8Gw:function(e,t,i){"use strict";var n,o,r,s,a;i.d(t,"a",function(){return a}),n=i("uOxu"),o=i("0waE"),r=i("IWXC"),i("glKZ"),s=Object(n.getLogger)("GUI.Blocks.AbstractIndicator"),
a=function(){function e(e){this._classSuffix="",this._quoteSessionPrefix="abstract-indicator",this._shortMode=!1,this._showTooltip=!0,this._subscribed=!1,this._tooltipType="custom",this._quoteSession=e.quoteSession}return e.prototype.getValue=function(){return this._value},e.prototype.getTooltipText=function(){return this._labelMap[this._value]||""},e.prototype.getLabel=function(){return this._labelMap[this._value]||""},e.prototype.getElement=function(){return this._el},e.prototype.update=function(e,t){this._updateValue(e,t),this._render()},e.prototype.setTooltipEnabled=function(e){void 0===e&&(e=!1),this._showTooltip!==e&&(this._showTooltip=e,this._renderTooltip())},e.prototype.enableShortMode=function(){!0!==this._shortMode&&(this._shortMode=!0,this._render())},e.prototype.disableShortMode=function(){!1!==this._shortMode&&(this._shortMode=!1,this._render())},e.prototype.isShortModeEnabled=function(){return this._shortMode},e.prototype.start=function(){!this._subscribed&&this._symbolName&&(this._quoteSession||(this._quoteSession=Object(r.getQuoteSessionInstance)("simple")),this._quoteSession.subscribe(this._getQuoteSessionId(),this._symbolName,this.update.bind(this)),this._subscribed=!0)},e.prototype.stop=function(){this._subscribed&&this._quoteSession&&this._symbolName&&(this._quoteSession.unsubscribe(this._getQuoteSessionId(),this._symbolName),this._subscribed=!1)},e.prototype._init=function(e){this._el=e.el?e.el:document.createElement("span"),this._el.innerHTML="",this._classMap=e.classMap,this._labelMap=e.labelMap,this._showTooltip=e.showTooltip,this._classSuffix=e.classSuffix,this._symbolName=e.symbol,e.tooltipType&&(this._tooltipType=e.tooltipType),this._quoteSessionGUID=Object(o.guid)(),!0===e.short&&this.enableShortMode(),e.data&&this._updateValue(e.data)},e.prototype._clearClasses=function(){var e=this;Object.values(this._classMap).map(function(t){e._el.classList.remove(""+t),e._el.classList.remove(""+t+e._classSuffix)})},e.prototype._render=function(){this._renderClasses(),this._renderTooltip(),this._renderLabel()},e.prototype._renderLabel=function(){this._el.textContent=this.getLabel()},e.prototype._updateValue=function(e,t){var i=this._getValueFromData(e);(t||i!==this._value)&&(this._value=i)},e.prototype._renderClasses=function(){var e,t,i,n=this._el.classList;for(t in n.add(this._componentClass,this._componentClass+this._classSuffix),e=this._classMap[this._value],this._classMap)(i=this._classMap[t])&&(i===e?n.add(i,i+this._classSuffix):n.remove(i,i+this._classSuffix));!e&&this._value&&s.logWarn("no className for status "+this._value)},e.prototype._renderTooltip=function(){this._el.setAttribute("title",this._showTooltip?this.getTooltipText():""),"custom"===this._tooltipType&&this._el.classList.toggle("apply-common-tooltip",this._showTooltip)},e.prototype._getQuoteSessionId=function(){return this._quoteSessionPrefix+"."+this._quoteSessionGUID},e}(),window.AbstractIndicator=a},rCHB:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"LineToolPitchforkStyle",function(){return n}),function(e){
e[e.Original=0]="Original",e[e.Schiff=1]="Schiff",e[e.Inside=2]="Inside",e[e.Schiff2=3]="Schiff2"}(n||(n={}))},rL76:function(e,t,i){e.exports={labelwidth:"19px",labelheight:"19px",bordersize:"2px",bottommargin:"5px",gearheight:"15px",gearwidth:"15px","price-axis-stub":"price-axis-stub-3MoqVLRB",wrapper:"wrapper-1tN_aWXZ",label:"label-NpaJWak6",symbol:"symbol-2JyFiLZ_",gear:"gear-3B_8TAjc","fixed-gear":"fixed-gear-IiZPkpoQ","fixed-symbol":"fixed-symbol-2A_FZK26"}},rQHv:function(e,t,i){"use strict";var n=i("IiTo"),o={},r=function(e,t,i){function r(){var e={};e.symbolname=d,e.status="ok",e.values={},e.values.current_session=u,o[d]=u,TradingView.ChartapiMessagerInstances[p].onQuotesData([p].concat([e]))}function s(){var e;a&&(l?u="out_of_session":(e=n.isTradingNow((new Date).getTime(),a)?"market":"out_of_session")!==u&&(u=e,r()))}var a,l,c={},u=o[i]||"out_of_session",h=!1,d=i,p=t,_=null;return e(i,function(e){h||function(e){a=new n.SessionInfo(e.timezone,e.session,e.holidays,e.corrections),l=e.expired,_=setInterval(s,6e4),s(),r()}(e)},function(){}),c.stop=function(){h=!0,_&&clearInterval(_)},c.marketStatus=function(){return u},c};e.exports=r},rY0k:function(e,t,i){"use strict";var n=i("IzGk").translatedIntervalString,o=i("RqCd").getTranslatedSymbolDescription,r=i("zDbI").CHART_FONT_FAMILY,s=i("di4O"),a=s.watermarkProperty,l=s.restoreWatermarkPropertyDefaults;t.Watermark=function(e,t){function i(e,t){var i=e.font;return c.hasOwnProperty(i)||(c[i]={}),c[i].hasOwnProperty(t)||(c[i][t]=e.measureText(t).width),c[i][t]}var s,c={},u=a();u.listeners().subscribe(this,function(){e.updateSource(this)}),this.destroy=function(){u.listeners().unsubscribeAll(this)},this.properties=function(){return u},this.restorePropertiesDefaults=function(){l()},s={renderer:function(e,s){return{draw:function(a){var l,c,h,d,p,_,f,m,y,g=t.symbolInfo();for(a.fillStyle=u.color.value(),l=g.name,/QUANDL/.test(g.exchange)&&(c=l.split(/\//)).length&&(l=c[c.length-1]),h={description:g.description,short_description:g.short_description,pro_name:g.pro_name,short_name:g.name,local_description:g.local_description,language:g.language},d=[{text:l?l+", "+n(t.interval()):"",font:"96px "+r,lineHeight:117,vertOffset:0},{text:o(h)||"",font:"48px "+r,lineHeight:58,vertOffset:5}],p=0,_=0;_<d.length;_++)(f=d[_]).text&&(a.font=f.font,m=i(a,f.text),f.zoom=m>s?s/m:1,p+=f.lineHeight*f.zoom);for(y=Math.max((e-p)/2,0),_=0;_<d.length;_++)(f=d[_]).text&&(a.save(),a.translate(s/2,y),a.textBaseline="top",a.textAlign="center",a.font=f.font,a.scale(f.zoom,f.zoom),a.fillText(f.text,0,f.vertOffset),a.restore(),y+=f.lineHeight*f.zoom)}}},update:function(){}},this.paneViews=function(){return t.symbolInfo()&&u.visibility.value()?[s]:[]}}},s1Gx:function(e,t,i){"use strict";function n(e){return Object(o.__spreadArrays)(e).sort(function(e,t){return e.zorder()-t.zorder()})}var o,r,s;i.r(t),i.d(t,"specialZOrderBase",function(){return r}),i.d(t,"sortSourcesPreOrdered",function(){return s}),i.d(t,"sortSources",function(){return n}),o=i("mrSG"),s={ChartEventsSource:(r=1e7)+1,Dividends:r+2,
Splits:r+3,Earnings:r+4,LineToolOrder:r+5,LineToolPosition:r+6,LineToolExecution:r+7,AlertLabel:r+8}},s9sR:function(e,t,i){"use strict";var n,o,r,s,a;i.r(t),i.d(t,"SetResolutionUndoCommand",function(){return a}),n=i("mrSG"),o=i("RDU5"),r=i("LxhU"),s=i("n5al"),a=function(e){function t(t,i,n,o){var r=e.call(this,o)||this;return r._property=t,r._value=i,r._prevValue=t.value(),r._chartWidget=n,r}return Object(n.__extends)(t,e),t.prototype.redo=function(){this._chartWidget.screen.show(),this._property.setValue(this._value),this._handleResolution(this._value)},t.prototype.undo=function(){this._chartWidget.screen.show(),this._property.setValue(this._prevValue),this._handleResolution(this._prevValue)},t.prototype._handleResolution=function(e){var t=this._chartWidget.model().mainSeries().properties(),i=t.style.value(),n=Object(s.isRangeStyle)(i),o=r.Interval.isRange(e);!n&&o?t.style.setValue(11):n&&!o&&t.style.setValue(Object(s.getLastUsedStyle)())},t}(o.UndoCommand)},sEk5:function(e,t,i){"use strict";function n(e){r.call(this,e);var t=this;a.hideMarksOnBars().subscribe(this,function(){t._properties.visible.setValue(!a.hideMarksOnBars().value())})}function o(e){s.call(this)}var r=i("fTGZ").BarsMarksContainer,s=i("BOPY").BarMarkTooltip,a=i("mMWL");inherit(n,r),n.prototype._initialize=function(e){this._properties.visible.setValue(!0)},n.prototype.userEditEnabled=function(){return!1},n.prototype._constructor="UserDefinedBarsMarks",n.prototype._plateViewData=function(e){var t={text:e.text};return"object"==typeof e.color&&(t.theme="user_defined_theme",t.overridedTheme={},t.overridedTheme.border=e.color.border,t.overridedTheme.background=e.color.background),t},n.prototype.onClicked=function(e){var t=e.id;this._marks[t].onClicked()},n.prototype.clearMarks=function(){r.prototype.clearMarks.call(this),this.onNeedRepaint.fire()},n.prototype._getData=function(e){var t,i,n,o=this._model.mainSeries().symbolInfo();o&&(t=this.roundRange(this._rangeDifference(e)),i=this,n=this._model.mainSeries().properties().interval.value(),ChartApiInstance.getMarks(o,t.start,t.end,function(t){t.forEach(function(e){i._marks[e.id]=e},i),i._loadedRange=i._rangeUnion(e,i._loadedRange),i.onNeedRepaint.fire()},n))},n.prototype._createTooltip=function(){return new o},n.prototype.updatePlateData=function(e,t){return t.barWidth=this.barWidth(),t.text=e.text,t.tooltipMargin=-1*Math.max(e.minSize/2,.4*this.barWidth()),t},n.prototype.hasContextMenu=function(){return!1},inherit(o,s),o.prototype._createLayout=function(){this._layout=$('<div class="bar-mark-tooltip"></div>'),this._layout_text=$('<div class="text"></div>').appendTo(this._layout)},o.prototype._updatePlate=function(e){this._currentId=e.id,this._layout.css("border-color",e.theme.border),this._layout.css("margin-top",e.tooltipMargin+"px"),this._layout_text.html(e.text),this._layout.append(this._layout_text)},e.exports=n},sJA2:function(e,t,i){"use strict";var n,o,r;i.r(t),n=i("EsvI"),o=i("oiZD"),i.d(t,"ThemesApi",function(){return r}),r=function(){function e(e){this._opts=e}
return e.prototype.isStdTheme=function(){return Promise.resolve(Object(n.isStdTheme)(Object(n.extractThemeFromModel)(this._getActiveChartModel())))},e.prototype.setStdTheme=function(e,t,i){return void 0===t&&(t=!0),Object(n.loadTheme)(e,!0,!1,this._opts.chartWidgetCollection,t,i).then(function(){})},e.prototype.setStdThemeForLayout=function(e,t){void 0===t&&(t=!0),Object(o.setTheme)(e),t&&Object(n.syncTheme)()},e.prototype.getCurrentThemeName=function(){return Object(n.getCurrentTheme)().name},e.prototype._getActiveChartModel=function(){return this._getActiveChartWidget().model()},e.prototype._getActiveChartWidget=function(){return this._opts.chartWidgetCollection.activeChartWidget.value()},e}()},sWfm:function(e,t,i){"use strict";var n,o,r;i.d(t,"a",function(){return r}),n=i("jFln"),o=/[1-9]/g,r=function(){function e(){this._data=null}return e.prototype.setData=function(e){this._data=e},e.prototype.draw=function(e,t){var i,r,s,a,l,c,u,h,d,p,_,f,m,y;null!==this._data&&!1!==this._data.visible&&0!==this._data.text.length&&(e.font=t.font,(i=Math.round(t.widthCache.measureText(e,this._data.text,o)))<=0||(s=(r=i+2*t.paddingHorizontal)/2,a=this._data.width,l=this._data.coordinate,(c=Math.floor(l-s)+.5)<0?(l+=Math.abs(0-c),c=Math.floor(l-s)+.5):c+r>a&&(l-=Math.abs(a-(c+r)),c=Math.floor(l-s)+.5),u=c+r,d=(h=-.5)+t.borderSize+t.paddingTop+t.fontSize+t.paddingBottom,e.fillStyle=this._data.background,e.lineWidth=1,Object(n.drawRoundRect)(e,c,h,u-c,d-h,1),e.fill(),p=Math.round(this._data.coordinate+1),f=(_=h)+t.borderSize+t.tickLength,e.strokeStyle=this._data.color,e.beginPath(),e.moveTo(p,_),e.lineTo(p,f),e.stroke(),e.fillStyle=this._data.color,e.textAlign="center",m=Math.round(c+s+.5),y=d-t.baselineOffset-t.paddingBottom,e.fillText(this._data.text,m,y)))},e}()},sw9I:function(e,t,i){"use strict";function n(e,t,i,o){if(this.chart=e,this.paneA=e.paneWidgets()[t],this.paneB=e.paneWidgets()[i],this.row=document.createElement("tr"),this.row.style.height=n.HEIGHT+"px",this.cell=document.createElement("td"),this.row.appendChild(this.cell),this.cell.classList.add("pane-separator"),this.cell.setAttribute("colspan","3"),this.cell.style.background=(this.chart.properties().scalesProperties.lineColor.value()||"").toString(),this.cell.addEventListener("click",function(){}),o)this._mouseEventHandler=null;else{var r=document.createElement("div");r.classList.add("handle"),this.cell.appendChild(r),this._mouseEventHandler=new s(r,this,{treatVertTouchDragAsPageScroll:!1,treatHorzTouchDragAsPageScroll:!0}),this._handleEl=r}}var o,r,s;i("bc0y"),o=i("TzTt").parseHtmlElement,r=i("Hr11").clamp,s=i("S8xo").MouseEventHandler,n.prototype.destroy=function(){null!==this._mouseEventHandler&&this._mouseEventHandler.destroy(),this.row.parentElement&&this.row.parentElement.removeChild(this.row)},n.HEIGHT=1,n.prototype.hide=function(){this.row.classList.add("js-hidden")},n.prototype.show=function(){this.row.classList.remove("js-hidden")},n.prototype.mouseDownEvent=function(e){this.startY=e.pageY,this.deltaY=0,
this.totalHeight=this.paneA.size().h+this.paneB.size().h,this.totalStretch=this.paneA.stretchFactor()+this.paneB.stretchFactor(),this.prevStretchA=this.paneA.stretchFactor(),this.minPaneHeight=30,this.maxPaneHeight=this.totalHeight-this.minPaneHeight,this.pixelStretchFactor=this.totalStretch/this.totalHeight,this._handleEl.classList.add("i-active")},n.prototype.pressedMouseMoveEvent=function(e){var t,i,n;this.deltaY=e.pageY-this.startY,t=this.paneA.size().h,i=r(t+this.deltaY,this.minPaneHeight,this.maxPaneHeight)*this.pixelStretchFactor,n=this.totalStretch-i,this.paneA.setStretchFactor(i),this.paneB.setStretchFactor(n),this.chart._adjustSize(),this.paneA.size().h!==t&&(this.startY=e.pageY),this.chart.paint()},n.prototype.mouseUpEvent=function(e){this.chart._model.addPaneStretchFactorUndoCommand(this.paneA._state,this.paneB._state,this.prevStretchA,this.paneA.stretchFactor()),this.startY=0,this.deltaY=0,this.totalHeight=0,this.totalStretch=0,this.minPaneHeight=0,this.maxPaneHeight=0,this.pixelStretchFactor=0,this._handleEl.classList.remove("i-active")},n.prototype.update=function(){this.cell.style.background=(this.chart.properties().scalesProperties.lineColor.value()||"").toString()},n.prototype.paint=function(){},n.prototype.image=function(){var e={},t=n.HEIGHT,i=this.paneA.leftPriceAxisesContainer().getWidth(),r=this.paneA.size().w,s=this.paneA.rightPriceAxisesContainer().getWidth(),a=o('<canvas width="'+i+'" height="'+t+'">'),l=a.getContext("2d");return l.fillStyle=this.chart.properties().scalesProperties.lineColor.value(),l.fillRect(0,0,i,t),e.leftAxis={content:a.toDataURL(),contentWidth:i,contentHeight:t},(l=(a=o('<canvas width="'+r+'" height="'+t+'">')).getContext("2d")).fillStyle=this.chart.properties().scalesProperties.lineColor.value(),l.fillRect(0,0,r,t),e.content=a.toDataURL(),e.contentWidth=r,e.contentHeight=t,(l=(a=o('<canvas width="'+s+'" height="'+t+'">')).getContext("2d")).fillStyle=this.chart.properties().scalesProperties.lineColor.value(),l.fillRect(0,0,s,t),e.rightAxis={content:a.toDataURL(),contentWidth:s,contentHeight:t},e},e.exports=n},t2ex:function(e,t,i){"use strict";function n(e){s.call(this,e)}function o(e,t){this._constructor="LineToolFibRetracement";var r=t||o.createProperties();a.call(this,e,r),this.version=o.version,this._properties._stateVersion=1,e._fibRetracementLabelsCache||(e._fibRetracementLabelsCache=new n(r.fibLevelsBasedOnLogScale)),i.e("lt-pane-views").then(function(e){var t=i("R7Bt").FibRetracementPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var r=i("5rJj"),s=i("xUGI"),a=i("Ss5c").LineDataSource,l=i("hayr").propertyPages,c=window.t("Fib Retracement");inherit(n,s),n.prototype.levelsCount=function(){return o.LevelsCount},inherit(o,a),o.version=2,o.LevelsCount=24,o.prototype.levelsCount=function(){return o.LevelsCount},o.prototype.stop=function(){a.prototype.stop.call(this),this._model._fibRetracementLabelsCache.removeSource(this.id())},o.prototype.pointsCount=function(){return 2},o.prototype.title=function(){return c},
o.prototype.name=function(){return"Fib Retracement"},o.prototype.migrateVersion=function(e,t,i){1===e&&this.properties().extendLines.setValue(!0)},o.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},o.prototype.getStylesPropertyPage=function(){return l.LineToolFibRetracementStylesPropertyPage},o.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("17v9").FibDrawingsWith24LevelsDefinitionsViewModel}.bind(null,i)).catch(i.oe)},o.createProperties=function(e){var t=new r("linetoolfibretracement",e,!1,{range:[1,24],names:["coeff","color","visible"]});return o._configureProperties(t),t},o._configureProperties=function(e){a._configureProperties(e)},o.prototype.fibLevelsBasedOnLogScale=function(){return this.properties().fibLevelsBasedOnLogScale.value()&&this.priceScale().isLog()},t.LineToolFibRetracement=o},tBG4:function(e,t,i){"use strict";function n(e){var t,i,n;return t="QUANDL"===(e=e||{}).exchange,i={symbolDescription:"",interval:"",exchange:"",chartStyle:"",extended:"",provider:""},e.description&&t?2===e.description.split("/").length?i.symbolDescription=e.description.split("/")[1]:e.description.split("'").filter(function(e){return e.length}).forEach(function(e){var t=[];t=e&&("/"===e[0]||/\d+\/\(?/.test(e))?[e]:e.split("/").filter(function(e){return e.length}),i.symbolDescription+=t[2===t.length?1:0]}):e.description?i.symbolDescription=e.description:i.symbolDescription=e.symbol,e.interval&&(i.interval=Object(s.translatedIntervalString)(e.interval)),t&&e.description&&((n=/[\w_]+\/[\w_]+/.exec(e.description))&&n[0]?i.provider=n[0].split("/")[0]:i.provider=e.description.split("/")[0]),e.exchange&&(i.exchange=e.exchange),i.chartStyle=function(e){return e.inputs,8===e.style?window.t("Heikin Ashi"):""}(e),e.extended&&(i.extended=window.t("ext",{context:"shorthand_for_extended_session"})),i}var o,r,s,a,l;i.r(t),o=i("mrSG"),r=i("nBJD"),i("Eyy1"),s=i("IzGk"),a=i("RqCd"),i.d(t,"SeriesStatusView",function(){return l}),l=function(e){function t(i,n,o){var r=e.call(this,n)||this;return r._invalidated=!0,r._series=i,r._statusViewProperties=o,r._series.onRestarted().subscribe(r,t.prototype.invalidate),r._series.dataEvents().symbolResolved().subscribe(r,t.prototype.invalidate),r._series.dataEvents().completed().subscribe(r,t.prototype.invalidate),r._series.onBoxSizeChanged().subscribe(r,t.prototype.invalidate),r._statusViewProperties.childs().symbolTextSource.listeners().subscribe(r,t.prototype.invalidate),r}return Object(o.__extends)(t,e),t.prototype.invalidate=function(){this._invalidated=!0,this.update()},t.prototype.getSeriesPrecision=function(){var e=4,t=this._series.symbolInfo();return t&&t.pricescale&&(e=Math.round(Math.log(t.pricescale)/Math.log(10))),e},t.prototype.round=function(e){var t=this.getSeriesPrecision(),i=Math.round(e*Math.pow(10,t))/Math.pow(10,t);return i?i.toString():""},t.prototype.update=function(){var e,t
;this._invalidated&&(this._bold=!1,this._size=this._statusViewProperties.childs().fontSize.value()+"px",this._text=(e=this._getTitleGenerationOptions(),t=n(e),(t.symbolDescription+(t.interval?", "+t.interval:"")+function(e,t){return void 0===t&&(t=", "),(e.provider?""+t+e.provider:"")+(e.exchange?""+t+e.exchange:"")+(e.chartStyle?""+t+e.chartStyle:"")+(e.extended?""+t+e.extended:"")}(t)).replace(/\'/g,"")),this._invalidated=!1)},t.prototype.getSplitTitle=function(){return e=this._getTitleGenerationOptions(),t=n(e),i=t.symbolDescription.replace(/\'/g,""),r=function(e){var t=[];return e.provider&&t.push(e.provider),e.exchange&&t.push(e.exchange),e.chartStyle&&t.push(e.chartStyle),e.extended&&t.push(e.extended),t}(t).map(function(e){return e.replace(/\'/g,"")}),Object(o.__spreadArrays)([i,t.interval||""],r);var e,t,i,r},t.prototype._getTitleGenerationOptions=function(){var e=this._series.symbolInfo();return{description:"ticker"===this._statusViewProperties.childs().symbolTextSource.value()?e&&e.name||void 0:Object(a.getTranslatedSymbolDescription)({pro_name:e&&e.pro_name||void 0,short_name:e&&e.name||void 0,description:e&&e.description||void 0,short_description:e&&e.short_description||void 0,local_description:e&&e.local_description||void 0,language:e&&e.language||void 0}),exchange:this._statusViewProperties.childs().showExchange.value()&&e&&e.exchange||void 0,symbol:this._series.symbol(),interval:this._statusViewProperties.childs().showInterval.value()?this._series.interval():void 0,style:this._series.properties().childs().style.value(),inputs:this._series.getInputsProperties().state(),boxSize:this._series.data().boxSize,reversalAmount:this._series.data().reversalAmount}},t}(r.a)},tDUI:function(e,t,i){"use strict";(function(e){function n(t,o){var r,s,c,u,d,p,_,f,m,y=o;a.call(this,t,y),o.stopLevel||o.profitLevel||(s=(r=t.timeScale().visibleBarsStrictRange()).firstBar(),c=r.lastBar(),u=t.mainSeries().priceRange(s,c),(d=t.mainSeries().priceScale()).isLog()&&(p=d.logicalToPrice(u.minValue()),_=d.logicalToPrice(u.maxValue()),u=new e(p,_)),u&&!u.isEmpty()&&(f=Math.round(.2*u.length()*t.mainSeries().base()),y.merge({stopLevel:f,profitLevel:f}))),m=this,y.stopLevel.listeners().subscribe(this,this.recalculate),y.stopLevel.listeners().subscribe(null,function(){m.properties().stopPrice._listeners.fire(m.properties().stopPrice)}),y.profitLevel.listeners().subscribe(this,this.recalculate),y.profitLevel.listeners().subscribe(null,function(){m.properties().targetPrice._listeners.fire(m.properties().targetPrice)}),y.addChild("entryPrice",new n.PriceProperty(this,0)),y.addChild("stopPrice",new n.StopPriceProperty(this)),y.addChild("targetPrice",new n.TargetPriceProperty(this)),y.addProperty("riskSize",250),y.addProperty("qty",0),y.addProperty("amountTarget",y.accountSize.value()),y.addProperty("amountStop",y.accountSize.value()),this._riskInPercentsFormatter=new h(2),this._riskInMoneyFormatter=new h,y.risk.subscribe(this,this._recalculateRiskSize),y.accountSize.subscribe(this,this._recalculateRiskSize),
y.riskDisplayMode.subscribe(this,this._recalculateRisk),y.riskDisplayMode.subscribe(this,this._recalculateRiskSize),y.entryPrice.subscribe(this,this._recalculateRiskSize),y.stopPrice.subscribe(this,this._recalculateRiskSize),y.profitLevel.subscribe(this,this._recalculateRiskSize),y.stopLevel.subscribe(this,this._recalculateRiskSize),y.qty.subscribe(this,this._recalculateRiskSize),"percents"===y.riskDisplayMode.value()&&y.risk.value()>100&&y.riskDisplayMode.setValueSilently("money"),this._syncStateExclusions=["entryPrice","stopPrice","targetPrice","riskSize","qty","amountTarget","amountStop","risk","accountSize"],this.version=n.version,this._entryPriceAxisView=new l(this,{colorProperty:y.linecolor,priceProperty:y.entryPrice}),this._stopPriceAxisView=new l(this,{colorProperty:y.stopBackground,priceProperty:y.stopPrice}),this._profitPriceAxisView=new l(this,{colorProperty:y.profitBackground,priceProperty:y.targetPrice}),i.e("lt-pane-views").then(function(e){var t=i("u+oH").RiskRewardPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}function o(e,t){var i,r;this._constructor="LineToolRiskRewardShort",i=t||o.createProperties(),n.call(this,e,i),(r=this.properties()).entryPrice.subscribe(this,this._recalculateQty),r.stopPrice.subscribe(this,this._recalculateQty),r.riskSize.subscribe(this,this._recalculateQty),r.entryPrice.subscribe(this,this._recalculateAmount),r.profitLevel.subscribe(this,this._recalculateAmount),r.stopLevel.subscribe(this,this._recalculateAmount),r.accountSize.subscribe(this,this._recalculateAmount),r.riskSize.subscribe(this,this._recalculateAmount),r.qty.subscribe(this,this._recalculateAmount)}function r(e,t){var i,o;this._constructor="LineToolRiskRewardLong",i=t||r.createProperties(),n.call(this,e,i),(o=this.properties()).entryPrice.subscribe(this,this._recalculateQty),o.stopPrice.subscribe(this,this._recalculateQty),o.riskSize.subscribe(this,this._recalculateQty),o.entryPrice.subscribe(this,this._recalculateAmount),o.profitLevel.subscribe(this,this._recalculateAmount),o.stopLevel.subscribe(this,this._recalculateAmount),o.accountSize.subscribe(this,this._recalculateAmount),o.riskSize.subscribe(this,this._recalculateAmount),o.qty.subscribe(this,this._recalculateAmount)}var s=i("Eyy1").ensureNotNull,a=i("Ss5c").LineDataSource,l=i("gMtF").LineToolRiskRewardPriceAxisView,c=i("mMWL"),u=i("Ocx9").DefaultProperty,h=i("zXvd").NumericFormatter,d=i("hayr").propertyPages,p=i("wGNx").RiskRewardPointIndex,_=window.t("Risk/Reward"),f=window.t("Risk/Reward short");inherit(n,a),n.prototype.riskFormatter=function(e){return"percents"===e?this._riskInPercentsFormatter:this._riskInMoneyFormatter},n.prototype.getRiskStep=function(e){return"percents"===e?.01:1},n.prototype._roundValue=function(e){return parseFloat(e.toFixed(2))},n.prototype.hasEditableCoordinates=function(){return!1},n.prototype._recalculateRisk=function(){var e=this.properties(),t=e.riskDisplayMode.value(),i=e.riskSize.value(),n=e.accountSize.value(),o=e.risk.value()
;o="percents"===t?this._roundValue(i/n*100):this._roundValue(n/100*o),this._riskInChange=!0,e.risk.setValue(this.riskFormatter(t).format(o)),this._riskInChange=!1},n.prototype._recalculateRiskSize=function(){var e,t,i,n;this._riskInChange||(t=(e=this.properties()).risk.value(),i=e.riskDisplayMode.value(),n=e.accountSize.value(),"percents"===i?e.riskSize.setValue(t/100*n):t>n?(e.risk.setValue(n),e.riskSize.setValue(n)):e.riskSize.setValue(t))},n.version=2,n.prototype.lastBarData=function(){var e,t,i,n,o=this._model.mainSeries().bars().firstIndex(),r=this._model.mainSeries().bars().lastIndex();return null===o||null===r||isNaN(o)||isNaN(r)?null:4===(e=this.points()).length?(t=e[p.ActualClose]).index<o?null:{closePrice:t.price,index:Math.min(r,t.index)}:(i=e[p.Close]).index<o?null:(n=Math.min(r,i.index),{closePrice:s(this._model.mainSeries().bars().valueAt(n))[TradingView.CLOSE_PLOT],index:n})},n.prototype.migrateVersion=function(e,t,i){var n,o,r,s;1===e&&this._points.length>=1&&((n=[]).push(this._points[0]),o={price:(o=this._points[0]).price,index:o.index+50},n.push(o),this._points[1]&&n.push(this._points[1]),this._points[2]&&n.push(this._points[2]),this._points=n,this._timePoint.length>=1&&(r=[],o=this._timePoint[0],r.push(o),s={price:o.price,time_t:o.time_t,offset:o.offset+50},r.push(s),this._timePoint[1]&&n.push(this._points[1]),this._timePoint[2]&&n.push(this._points[2]),this._timePoint=r))},n.prototype.checkAlert=function(){this.recalculate()},n.prototype.priceAxisViews=function(e,t){return this.isSourceHidden()?null:t!==this.priceScale()||this._model.paneForSource(this)!==e?null:[this._entryPriceAxisView,this._stopPriceAxisView,this._profitPriceAxisView]},n.prototype.updateAllViews=function(){this.isActualSymbol()&&this._properties.visible.value()&&(c.hideAllDrawings().value()&&this.userEditEnabled()||(a.prototype.updateAllViews.call(this),this._entryPriceAxisView.update(),this._stopPriceAxisView.update(),this._profitPriceAxisView.update()))},n.prototype.setPoint=function(e,t){switch(e){case 0:t.price=this._roundPrice(t.price),a.prototype.setPoint.call(this,e,t),this.recalculate();break;case 2:this.isActualSymbol()&&this.properties().stopPrice.setValue(this.preparseStopPrice(t.price));break;case 3:this.isActualSymbol()&&this.properties().targetPrice.setValue(this.preparseProfitPrice(t.price));break;case 1:t.price=this._roundPrice(t.price),a.prototype.setPoint.call(this,1,t),this.recalculate()}},n.PriceProperty=function(e,t){a.PointPriceProperty.call(this,e,t)},inherit(n.PriceProperty,a.PointPriceProperty),n.PriceProperty.prototype.setValue=function(e){var t=this._lineSource.points()[this._pointIndex];t.price=parseFloat(e),this._lineSource.setPoint(this._pointIndex,t),this._lineSource.recalculate(),this._lineSource._model.updateSource(this._lineSource),this._listeners.fire(this),this._lineSource.endChanging(),this._lineSource._syncMultichartState()},n.StopPriceProperty=function(e){n.PriceProperty.call(this,e,1)},inherit(n.StopPriceProperty,n.PriceProperty),n.StopPriceProperty.prototype.value=function(){
var e=this._lineSource.stopPrice(),t=this._lineSource.ownerSource().formatter(),i=t.parse(t.format(e));return null!=i.price?i.price:i.value},n.StopPriceProperty.prototype.setValue=function(e){var t=Math.round(Math.abs(e-this._lineSource.entryPrice())*this._lineSource._model.mainSeries().base());this._lineSource.properties().stopLevel.setValue(t),this._lineSource.properties().stopLevel.listeners().fire(this._lineSource.properties().stopLevel)},n.TargetPriceProperty=function(e){n.PriceProperty.call(this,e,2)},inherit(n.TargetPriceProperty,n.PriceProperty),n.TargetPriceProperty.prototype.value=function(){var e=this._lineSource.profitPrice(),t=this._lineSource.ownerSource().formatter(),i=t.parse(t.format(e));return null!=i.price?i.price:i.value},n.TargetPriceProperty.prototype.setValue=function(e){var t=Math.round(Math.abs(e-this._lineSource.entryPrice())*this._lineSource._model.mainSeries().base());this._lineSource.properties().profitLevel.setValue(t),this._lineSource.properties().profitLevel.listeners().fire(this._lineSource.properties().profitLevel)},n.prototype.pointsCount=function(){return 1},n.prototype.title=function(){return""},n.prototype.name=function(){return"Risk/Reward"},n.prototype.addPoint=function(e){var t,i;return e.price=this._roundPrice(e.price),a.prototype.addPoint.call(this,e,null,!0),t={price:e.price,index:e.index+50},a.prototype._addPointIntenal.call(this,t,null,!0),(i=this.calculateActualEntry(e,t))&&(a.prototype._addPointIntenal.call(this,i,null,!0),(t=this.findClosePoint(i,t))&&a.prototype._addPointIntenal.call(this,t,null,!0)),this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),!0},n.prototype._roundPrice=function(e){var t=this._model.mainSeries().base(),i=Math.round(e*t);return i/t},n.prototype.recalculate=function(){var e,t,i,n,o;this.properties().interval.value()===this._model.mainSeries().interval()&&0!==this.points().length&&(e=this.properties().targetPrice.value(),t=this.properties().stopPrice.value(),i=[this._points[0],this._points[1]],(n=this.calculateActualEntry(this.points()[0],this.points()[1]))&&(i.push(n),(o=this.findClosePoint(n,this.points()[1]))&&i.push(o)),this._points=i,e!==this.properties().targetPrice.value()&&this.properties().targetPrice._listeners.fire(this.properties().targetPrice),t!==this.properties().stopPrice.value()&&this.properties().stopPrice._listeners.fire(this.properties().stopPrice))},n.prototype.start=function(){a.prototype.start.call(this),this.recalculate()},n.prototype.startMoving=function(e,t,i){e.logical.price=this._roundPrice(e.logical.price),a.prototype.startMoving.call(this,e,t,i)},n.prototype.move=function(e,t,i){e.logical.price=this._roundPrice(e.logical.price),a.prototype.move.call(this,e,t,i),this.recalculate(),this._entryPriceAxisView.update()},n.prototype.correctPoints=function(e){return!!this.isActualSymbol()&&a.prototype.correctPoints.call(this,[e[0],e[1]])},n.prototype.entryPrice=function(){return this.points()[0].price},n.prototype.findClosePoint=function(e,t){
var i,n,o,r=this._model.mainSeries().bars(),a=s(r.firstIndex()),l=Math.max(e.index,a),c=s(r.lastIndex());for(i=l;i<=Math.min(c,t.index);i++)if(n=s(r.valueAt(i)),null!=(o=this.checkStopPrice(n)))return{index:i,price:o};return null},n.prototype.calculateActualEntry=function(e,t){var i,n,o=this._model.mainSeries().bars(),r=s(o.firstIndex()),a=Math.max(e.index,r),l=e.price,c=s(o.lastIndex());for(i=a;i<=Math.min(c,t.index);i++)if((n=s(o.valueAt(i)))[TradingView.HIGH_PLOT]>=l&&n[TradingView.LOW_PLOT]<=l)return{index:i,price:l};return null},n.prototype.axisPoints=function(){var e,t,i;if(!this._points[p.ActualEntry])return[];if(e=this._points[p.ActualEntry],t=null,4===this._points.length)t=this._points[p.ActualClose];else{if(!(i=this.lastBarData()))return[];t={index:i.index,price:i.closePrice}}return[e,t]},n.prototype.getInputsPropertyPage=function(){return d.LineToolRiskRewardInputsPropertyPage},n.prototype.getStylesPropertyPage=function(){return d.LineToolRiskRewardStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("RYNR").RiskRewardDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.prototype.template=function(){var e=this.properties(),t=a.prototype.template.call(this);return t.stopLevel=e.stopLevel.value(),t.profitLevel=e.profitLevel.value(),t},n.prototype._applyTemplateImpl=function(e){a.prototype._applyTemplateImpl.call(this,e);var t=this.properties();void 0!==e.stopLevel&&t.stopLevel.setValue(e.stopLevel),void 0!==e.profitLevel&&t.profitLevel.setValue(e.profitLevel)},n.prototype.getOrderTemplate=function(){return null},n._configureProperties=function(e){a._configureProperties(e),e.addExclusion("stopLevel"),e.addExclusion("profitLevel")},inherit(o,n),o.prototype._recalculateQty=function(){var e,t,i,n,o;0!==this.points().length&&(t=(e=this.properties()).entryPrice.value(),i=e.stopPrice.value(),n=e.riskSize.value(),o=Math.floor(n/Math.abs(i-t)),e.qty.setValue(o))},o.prototype._recalculateAmount=function(){var e,t,i,n,o,r,s,a;0!==this.points().length&&(t=(e=this.properties()).accountSize.value(),i=e.entryPrice.value(),n=e.qty.value(),o=e.stopPrice.value(),r=e.targetPrice.value(),s=this._roundValue(t+(i-r)*n),a=this._roundValue(t-(o-i)*n),e.amountTarget.setValue(s),e.amountStop.setValue(a))},o.prototype.title=function(){return f},o.prototype.name=function(){return"Risk/Reward short"},o.prototype.stopPrice=function(){return this.entryPrice()+this.properties().stopLevel.value()/this._model.mainSeries().base()},o.prototype.profitPrice=function(){return this.entryPrice()-this.properties().profitLevel.value()/this._model.mainSeries().base()},o.prototype.calculatePL=function(e){return this.entryPrice()-e},o.prototype.preparseStopPrice=function(e){e=this._roundPrice(e);var t=this.entryPrice()+1/this._model.mainSeries().base();return Math.max(e,t)},o.prototype.preparseProfitPrice=function(e){e=this._roundPrice(e);var t=this.entryPrice()-1/this._model.mainSeries().base();return Math.min(e,t)},
o.prototype.checkStopPrice=function(e){var t=this.stopPrice(),i=this.profitPrice();return e[TradingView.HIGH_PLOT]>=t?this.stopPrice():e[TradingView.LOW_PLOT]<=i?this.profitPrice():null},o.prototype._orderSide=function(){throw new Error("not supported")},o.createProperties=function(e){var t=new u("linetoolriskrewardshort",e);return o._configureProperties(t),t},o._configureProperties=function(e){n._configureProperties(e)},inherit(r,n),r.prototype._recalculateQty=function(){var e,t,i,n,o;0!==this.points().length&&(t=(e=this.properties()).entryPrice.value(),i=e.stopPrice.value(),n=e.riskSize.value(),o=Math.floor(n/Math.abs(t-i)),e.qty.setValue(o))},r.prototype._recalculateAmount=function(){var e,t,i,n,o,r,s,a;0!==this.points().length&&(t=(e=this.properties()).accountSize.value(),i=e.entryPrice.value(),n=e.qty.value(),o=e.stopPrice.value(),r=e.targetPrice.value(),s=this._roundValue(t+(r-i)*n),a=this._roundValue(t-(i-o)*n),e.amountTarget.setValue(s),e.amountStop.setValue(a))},r.prototype.stopPrice=function(){return this.entryPrice()-this.properties().stopLevel.value()/this._model.mainSeries().base()},r.prototype.profitPrice=function(){return this.entryPrice()+this.properties().profitLevel.value()/this._model.mainSeries().base()},r.prototype.calculatePL=function(e){return e-this.entryPrice()},r.prototype.preparseStopPrice=function(e){e=this._roundPrice(e);var t=this.entryPrice()-1/this._model.mainSeries().base();return Math.min(e,t)},r.prototype.preparseProfitPrice=function(e){e=this._roundPrice(e);var t=this.entryPrice()+1/this._model.mainSeries().base();return Math.max(e,t)},r.prototype.checkStopPrice=function(e){var t=this.stopPrice(),i=this.profitPrice();return e[TradingView.LOW_PLOT]<=t?this.stopPrice():e[TradingView.HIGH_PLOT]>=i?this.profitPrice():null},r.prototype.title=function(){return _},r.prototype.name=function(){return"Risk/Reward long"},r.prototype._orderSide=function(){throw new Error("not supported")},r.createProperties=function(e){var t=new u("linetoolriskrewardlong",e);return r._configureProperties(t),t},r._configureProperties=function(e){n._configureProperties(e)},t.LineToolRiskRewardLong=r,t.LineToolRiskRewardShort=o}).call(this,i("Qb4w").PriceRange)},tG6Q:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolCircleLines";var r=t||n.createProperties();o.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("GS+0").LineToolCircleLinesPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=window.t("Cyclic Lines");inherit(n,o),n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return a},n.prototype.name=function(){return"Cyclic Lines"},n.prototype.getStylesPropertyPage=function(){return s.LineToolCircleLinesStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("LX4V").CyclicAndSineLinesPatternDefinitionsViewModel
}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new r("linetoolcirclelines",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolCircleLines=n},tWVy:function(e,t,i){"use strict";function n(){r.fire()}var o,r;i.d(t,"a",function(){return r}),i.d(t,"b",function(){return n}),o=i("aIyQ"),r=new(i.n(o).a)},"tc+8":function(e,t,i){"use strict";(function(t){function i(e){if(this._listeners=new t,this._childs=[],this._muteChildChanges=!1,void 0!==e&&null!==e)if(this.isPrimitiveType(e))this._value=e;else for(var i in e)this.addProperty(i,e[i])}i.prototype.merge=function(e,t){var i,n,o,r,s=null;if(t&&(i=(s=[]).length),null==e)return s;if(this.isPrimitiveType(e))return t&&this._value!==e&&s.push(this),this._value=e,s;if(Array.isArray(e))for(n=0;n<e.length;n++)this[n]?(o=this[n].merge(e[n],t),t&&(s=s.concat(o))):(this.addProperty(n,e[n]),t&&s.push(this[n]));else for(r in e)this[r]?(o=this[r].merge(e[r],t),t&&(s=s.concat(o))):(this.addProperty(r,e[r]),t&&s.push(this[r]));return t&&s.length>i&&s.push(this),s},i.prototype.mergeAndFire=function(e){var t=this.merge(e,!0);this._muteChildChanges=!0,t.forEach(function(e){e._muteChildChanges=!0}),t.forEach(function(e){e._muteChildChanges=!1,e.listeners().fire(e)}),this._muteChildChanges=!1,t.length>0&&this.listeners().fire(this)},i.prototype.state=function(e){var t,i,n,o,r,s=this._value;for(void 0===s&&(s={}),t=0;t<this._childs.length;t++)if(i=this._childs[t],!e||-1===e.indexOf(i))if(e){for(n=[],o=0;o<e.length;o++)(r=e[o]).startsWith(i+".")&&n.push(r.substr(i.length+1));s[i]=this[i].state(n)}else s[i]=this[i].state();return s},i.prototype.clone=function(e){return new i(this.state())},i.prototype.isPrimitiveType=function(e){return!!isNumber(e)||(!!new TradingView.TypeValidator(String).check(e)||TradingView.isBoolean(e))},i.prototype.value=function(){return this._value},i.prototype.listeners=function(){return this._listeners},i.prototype.childCount=function(){return this._childs.length},i.prototype.childNames=function(){return this._childs},i.prototype.child=function(e){return this[e]},i.prototype.setValue=function(e,t){(this._value!==e||t)&&(this._value=e,this._listeners.fire(this))},i.prototype.setValueSilently=function(e){this._value=e},i.prototype.addProperty=function(e,t){var n=new i(t);this[e]=n,this._childs.push(e),n.listeners().subscribe(this,i.prototype.childChanged)},i.prototype.removeProperty=function(e){this[e].listeners().unsubscribe(this,i.prototype.childChanged),delete this[e],this._childs=this._childs.filter(function(t){return t!==e})},i.prototype.hasChild=function(e){return this._childs.indexOf(e)>=0},i.prototype.addChild=function(e,t){this[e]=t,-1===this._childs.indexOf(e)&&this._childs.push(e),t.listeners().subscribe(this,i.prototype.childChanged)},i.prototype.childChanged=function(e,t){this._muteChildChanges||this.listeners().fire(this)},i.prototype.subscribe=function(e,t){this.listeners().subscribe(e,t,!1)},i.prototype.unsubscribe=function(e,t){this.listeners().unsubscribe(e,t)},
i.prototype.unsubscribeAll=function(e){this.listeners().unsubscribeAll(e)},i.prototype.childs=function(){return this},e.exports=i}).call(this,i("aIyQ"))},teHb:function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"ratioStudyItem",function(){return s}),n=i("mrSG"),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._doCalculation=function(e,t,i,n){return e*t/(i*n)},t}((o=i("7dm8")).a),s={name:"Ratio",metainfo:{_metainfoVersion:15,defaults:o.b,plots:o.d,styles:o.e,description:"Ratio",shortDescription:"Ratio",is_price_study:!1,inputs:o.c,id:"Ratio@tv-basicstudies-1"},constructor:r}},tqok:function(e,t,i){"use strict";i.d(t,"a",function(){return n});var n=-2e6},"u+0B":function(e,t,i){"use strict";var n,o;i.r(t),i.d(t,"TextWidthCache",function(){return o}),n=/[2-9]/g,o=function(){function e(e){void 0===e&&(e=50),this._actualSize=0,this._usageTick=1,this._oldestTick=1,this._tick2Labels={},this._cache={},this._maxSize=e}return e.prototype.reset=function(){this._actualSize=0,this._cache={},this._usageTick=1,this._oldestTick=1,this._tick2Labels={}},e.prototype.measureText=function(e,t,i){var o,r,s=i||n,a=String(t).replace(s,"0");return this._cache[a]?this._cache[a].width:(this._actualSize===this._maxSize&&(o=this._tick2Labels[this._oldestTick],delete this._tick2Labels[this._oldestTick],delete this._cache[o],this._oldestTick++,this._actualSize--),0===(r=e.measureText(a).width)&&t.length?0:(this._cache[a]={width:r,tick:this._usageTick},this._tick2Labels[this._usageTick]=a,this._actualSize++,this._usageTick++,r))},e}()},u0yd:function(e,t,i){"use strict";function n(e){e.forceLineColor=!1,r.call(this,e),this.color1=e.color1,this.color2=e.color2,this.bottom=e.bottom,this.isSeries=!!e.isSeries,this._simpleMode=e.simpleMode}var o=i("Zp/P").coordinateIsValid,r=i("gyZD").PaneRendererLine;inherit(n,r),n.prototype.draw=function(e){var t,i,n,s,a,l,c,u,h,d,p,_;if(0!==this.items.length){for(e.lineCap="square",e.strokeStyle=this.lineColor,e.lineWidth=this.lineWidth,e.lineStyle=this.lineStyle,e.lineWidth=1,t=0;t<this.items.length&&!o(this.items[t].y);)t++;for(i=this.items.length-1;i>=0&&!o(this.items[i].y);)i--;if(!(t>=i)){for(e.translate(.5,.5),n={},s=this.items,a=t;a<=i;a++)c=(l=s[a]).style?l.style.color:this.lineColor,a<i&&s[a+1].style&&c!==(u=s[a+1].style.color)&&((h=n[u]||[]).push(l),n[u]=h),(d=n[c]||[]).push(l),n[c]=d;for(c in n){for(d=n[c],e.beginPath(),p=0,a=0;a<d.length;a++)d[a].style&&d[a].style.color!==c&&(e.moveTo(d[p].x,this.bottom),this.walkLine(e,d.slice(p,a),!0,this.bottom),p=a);e.moveTo(d[p].x,this.bottom),this.walkLine(e,d.slice(p,d.length),!0,this.bottom),e.closePath(),this.isSeries?((_=e.createLinearGradient(0,0,0,this.bottom)).addColorStop(0,this.color1),_.addColorStop(1,this.color2),e.fillStyle=_,this._simpleMode=!0):e.fillStyle=c,e.fill()}e.lineWidth=this.lineWidth,r.prototype.draw.call(this,e)}}},t.PaneRendererArea=TradingView.PaneRendererArea=n},u5Q5:function(e,t,i){"use strict";function n(){return new Promise(function(e){
Promise.all([i.e(21),i.e(22),i.e(34),i.e(74),i.e(18),i.e(27),i.e("symbolsearch")]).then(function(t){e(i("m5UM"))}.bind(null,i)).catch(void 0)})}function o(e,t){return n().then(function(i){return i.bindToInput(e,t)})}function r(e){Object(_.setLastUsedResolution)(e),f.linking.interval.setValue(e)}function s(e){if(!Object(h.globalKeypressMatches)(e))return!1;e.preventDefault();var t=String.fromCharCode(e.charCode);return function(e){return/[\d,]/.test(e)}(t)&&d.enabled("show_interval_dialog_on_key_press")?Object(p.showChangeIntervalDialog)({callback:r,ownerDocument:e.target&&e.target.ownerDocument},t):d.enabled("symbol_search_hot_key")&&n().then(function(i){Object(m.trackEvent)("GUI","SS","hotkey"),i.showDialog({initialValue:t,callback:function(e,t){f.linking.symbol.setValue(e),t&&r(t)},ownerDocument:e.target&&e.target.ownerDocument})}),!0}function a(){u.pushBackListener("symbolEdit",s)}function l(e){return n().then(function(t){return t.showDialog(e)})}function c(e){return n().then(function(t){return t.setSearchRequestDelay(e)})}var u,h,d,p,_,f,m;i.r(t),i.d(t,"bindToInput",function(){return o}),i.d(t,"activateKeyPressHandler",function(){return a}),i.d(t,"showDialog",function(){return l}),i.d(t,"setSearchRequestDelay",function(){return c}),u=i("6et/"),h=i("h24c"),d=i("Kxc7"),p=i("mYjs"),_=i("pPtI"),f=i("PT1i"),m=i("PC8g")},u8U4:function(e,t,i){"use strict";(function(e){function t(e){window.__defaultsOverrides=window.__defaultsOverrides||{},M(window.__defaultsOverrides,e),void 0!==TradingView.defaultProperties&&void 0!==TradingView.defaultProperties.chartproperties&&(window.applyDefaultsOverrides(TradingView.defaultProperties.chartproperties),window.applyDefaultOverridesToLinetools())}function n(){re.resolve()}function o(e){var t=TradingView.bottomWidgetBar;t&&t.turnOffMaximize()}var r,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P,C,T,x,I,L,M,A,k,E,O,D,V,B,R,N,F,W,j,U,z,H,Y,G,q,K,Z,J,X,Q,$,ee,te,ie,ne,oe,re,se,ae,le,ce;i("xdS3"),r=i("Eyy1").assert,i("fPdn"),i("wZIs"),i("WmDe"),JSON.parse(urlParams.disabledFeatures).forEach(function(t){e.setEnabled(t,!1)}),JSON.parse(urlParams.enabledFeatures).forEach(function(t){e.setEnabled(t,!0)}),s=i("UlDV").RestrictedToolsetBootloader,a=i("I4UZ").HeaderToolbarBootloader,l=i("9zVu").DrawingToolbarBootloader,c=i("OiSa").isDrawingToolbarVisible,u=i("EsvI"),h=i("oiZD").setTheme,d=i("JcHK"),p=i("Ery9"),_=i("lxNp"),f=i("n0Bl").migrateShortcut,m=i("RXmj").ChartSaver,y=i("/5ju").SaveChartService,g=i("lA7n").LoadChartService,v=i("F58L").StudyTemplates,S=i("54XG").FavoriteStudyTemplateService,b=i("PT1i").linking,w=i("FQhm"),P=i("kcTO"),C=P.formatterOptions,T=P.customFormatters,x=i("JT5O").StudyMarket,I=i("FBuY").TVXWindowEvents,L=i("jofe").createDeferredPromise,M=i("FIi8").deepExtend,A=i("PoSe"),k=i("LxhU").Interval,E=i("lW/c").Root,O=i("NsVT").ChartPage,D=i("IWXC").destroyQuoteSessions,V=i("ULlu"),B=new E(window),R=new O(B.allocate()),N=R.allocate({areaName:"center"}),R.allocate({areaName:"tradingpanel"}),i("Wh/T"),F=i("/Y2c"),W=i("g5Qf").createFavoriteDrawingToolbar,j=i("QFPC").setupTouchPaintingHint,
U=i("EX27"),z=i("0YCj"),H=i("9nLJ"),i("2cgs"),i("vIQA"),Y=i("u5Q5").setSearchRequestDelay,G=i("dfhE"),q=i("ocLq"),K=i("qE4g").addBrandingSource,Z=window.parent[urlParams.uid].getCustomIndicators,J=L(),X=L(),Q=e.enabled("left_toolbar"),Promise.all([J.promise,X.promise]).then(function(){window.ChartApiInstance.start()}),"function"==typeof Z?($=Z(q))&&$.then?$.then(function(e){if(!Array.isArray(e))return console.warn("custom_indicators_getter should be a function that returns a Promise object which result is an array of custom indicators"),void J.resolve();JSServer.studyLibrary.push.apply(JSServer.studyLibrary,e),J.resolve(),console.log("{0} custom indicators loaded.".format(e.length))}).catch(function(e){console.warn("Error loading custom indicators "+e),J.resolve()}):(console.warn("custom_indicators_getter should be a function that returns a Promise object"),J.resolve()):J.resolve(),window.widgetReady=function(e){w.subscribe("onChartReady",e)},function(e){u.themes[e]&&(h(e),u.syncTheme())}(ee=urlParams.theme&&urlParams.theme.toLowerCase()),window.applyStudiesOverrides=function(e){e&&window.chartWidgetCollection.applyStudiesOverrides(e)},window.applyOverrides=function(e){t(e),window.chartWidgetCollection.applyOverrides(e)},window.applyTradingCustomization=function(e){var t;for(t in e.order)TradingView.defaultProperties.linetoolorder[t]=e.order[t];for(t in e.position)TradingView.defaultProperties.linetoolposition[t]=e.position[t]},window.changeTheme=function(e,t){var i=u.themes[e.toLowerCase()];i&&window.tradingViewApi.themes().setStdTheme(i.name,!0,t&&t.disableUndo)},window.getTheme=function(){return window.tradingViewApi.themes().getCurrentThemeName()},window.is_authenticated=!1,window.parent[urlParams.uid].brokerFactory,JSON.parse(window.urlParams.brokerConfig),window.t("charts by TradingView"),window.t("powered by TradingView"),window.t("by TradingView"),te=null,ie=L(),ne=null,oe=function(){function n(){Z&&Z.load(),J&&J.load().then(function(e){window.footerWidget=e.getComponent()}),$&&$.load().then(function(e){window.widgetbar=e,null==window.tradingViewApi.watchlist()&&window.tradingViewApi.setWatchlistManager(null)})}var h,p,_,f,P,L,M,E,O,D,V,B,Z,J,$,oe,re,se,ae,le,ce,ue;if(!Modernizr.canvas||!Modernizr.canvastext)throw Error("Charting library cannot be running under this browser");e.setEnabled("charting_library_debug_mode","true"===urlParams.debug),e.setEnabled("chart_property_page_trading",!1),e.setEnabled("chart_property_page_template_button",!1),e.enabled("remove_library_container_border")&&null!==(h=document.querySelector("#library-container"))&&(h.style.border="0px",h.style.padding="1px"),e.enabled("no_min_chart_width")&&(window.document.body.style.minWidth="0px"),null!=urlParams.studiesOverrides&&z.setDefaultsOverrides(JSON.parse(urlParams.studiesOverrides)),r(void 0===TradingView.defaultProperties,"Default properties are inited before applying overrides"),t(JSON.parse(urlParams.overrides)),urlParams.numeric_formatting=urlParams.numeric_formatting&&JSON.parse(urlParams.numeric_formatting),
urlParams.numeric_formatting&&"string"==typeof urlParams.numeric_formatting.decimal_sign&&(C.decimalSign=urlParams.numeric_formatting.decimal_sign[0]),window.ChartApiInstance=new U(window.parent[urlParams.uid].datafeed),window.parent[urlParams.uid].customFormatters&&(window.parent[urlParams.uid].customFormatters.timeFormatter&&(T.timeFormatter=window.parent[urlParams.uid].customFormatters.timeFormatter),window.parent[urlParams.uid].customFormatters.dateFormatter&&(T.dateFormatter=window.parent[urlParams.uid].customFormatters.dateFormatter)),window.ChartApiInstance.setStudiesAccessController(window.ChartApiInstance.createStudiesAccessController(urlParams.studiesAccess)),p=urlParams.chartContent?JSON.parse(urlParams.chartContent).json:void 0,_=urlParams.interval||"D",f=function(e){var t=/(\d+)(\w+)/;return e.map(function(e){var i=t.exec(e.text),n=i[2].toLowerCase(),o=parseInt(i[1]),r="y"===n?12*o+"m":o+n,s=q.Symbol.parsePeriod(e.resolution);return{text:window.t(e.title)||o+window.t(n,{context:"dates",count:o}),description:e.description||"",value:r,targetResolution:e.resolution,requiresIntraday:s.isIntraday}})}(JSON.parse(urlParams.timeFrames)),P=function(e,t){return e?t!==G.STATUS_DELAYED&&t!==G.STATUS_DELAYED_STREAMING&&t!==G.STATUS_READY?[]:f.filter(function(t){return!(t.requiresIntraday&&!e.has_intraday)&&!(e.supported_resolutions&&e.supported_resolutions.indexOf(k.normalize(t.targetResolution))<0)}):[]},window.containerElement=window.parent.document.getElementById(urlParams.uid).parentElement,L=Boolean(!1),M={resizerBridge:N,padding:e.enabled("border_around_the_chart")?2:0,content:p,widgetOptions:{hideIdeas:!0,addVolume:window.ChartApiInstance.studiesAccessController.isToolEnabled("Volume"),handleSessionErrors:!0,muteSessionErrors:!0,timezone:urlParams.timezone,defSymbol:urlParams.symbol,defInterval:_,defTimeframe:urlParams.timeframe&&urlParams.timeframe.toLowerCase(),paneContextMenuEnabled:e.enabled("pane_context_menu"),priceScaleContextMenuEnabled:e.enabled("scales_context_menu"),currencyLabelEnabled:e.enabled("pricescale_currency"),tradeContextMenuEnabled:L,marketStatusWidgetEnabled:e.enabled("display_market_status"),legendWidgetEnabled:e.enabled("legend_widget"),legendWidget:{contextMenu:{settings:e.enabled("show_chart_property_page")}},timeScaleWidget:{contextMenuEnabled:e.enabled("scales_context_menu"),timezoneMenuEnabled:e.enabled("timezone_menu")},timeScale:{preserveBarSpacing:!1,lockVisibleTimeRangeOnResize:e.enabled("lock_visible_time_range_on_resize"),rightBarStaysOnScroll:e.enabled("right_bar_stays_on_scroll")},goToDateEnabled:e.enabled("go_to_date"),crossHairOptions:{menuEnabled:e.enabled("chart_crosshair_menu")},handleScale:{mouseWheel:e.enabled("mouse_wheel_scale"),pinch:e.enabled("pinch_scale"),axisPressedMouseMove:e.enabled("axis_pressed_mouse_move_scale")},handleScroll:{mouseWheel:e.enabled("mouse_wheel_scroll"),pressedMouseMove:e.enabled("pressed_mouse_move_scroll"),horzTouchDrag:e.enabled("horz_touch_drag_scroll"),vertTouchDrag:e.enabled("vert_touch_drag_scroll")},
shiftVisibleRangeOnNewBar:e.enabled("shift_visible_range_on_new_bar"),croppedTickMarks:e.enabled("cropped_tick_marks")},seriesControlBarEnabled:e.enabled("timeframes_toolbar"),seriesControlBar:{timeFramesWidgetEnabled:!0,timeFramesWidget:{goToDateEnabled:e.enabled("go_to_date"),availableTimeFrames:P},timeWidgetEnabled:!0,timeWidget:{timezoneMenuEnabled:e.enabled("timezone_menu")},adjustForDividendsButtonEnabled:!1,extendedHoursButtonEnabled:!1,percentageScaleButtonEnabled:!0,logScaleButtonEnabled:!0,autoScaleButtonEnabled:!0,fullscreenButtonEnabled:!0,mobileChangeLayoutEnabled:!1},globalEvents:!0,snapshotUrl:urlParams.snapshotUrl,mobileForceChartMaximizeEnabled:!1},Q&&(W(),M.widgetOptions.isDrawingToolbarVisible=c),p&&void 0!==p.extendedData&&(E=p.extendedData,M.metaInfo={id:E.uid,name:E.name,description:E.description,uid:E.uid,username:"",tags:""}),O=window.chartWidgetCollection=new F(M),K(O),window.studyMarket=new x(O),"undefined"!=typeof serviceLocator&&serviceLocator.registerService(CHART_WIDGET_COLLECTION_SERVICE,O),O.activeChartWidget.subscribe(function(e){w.emit("activeChartChanged",O.getAll().indexOf(e))}),window.saver=new m(O),D=new y(O,window.saver),V=new g(O),window.chartWidget=O.activeChartWidget.value(),window.pro=new TradingView.Pro,re={chartWidgetCollection:O,saveChartService:D,loadChartService:V},null!==(B=e.enabled("header_widget")?(se=R.allocate({areaName:"top"}),ae=new(0,i("htUT").ChartChangesWatcher)(re.chartWidgetCollection.undoHistory,window.saver,w),(le=JSON.parse(urlParams.favorites)).intervals=le.intervals.map(function(e){var t=""+e;return t.match(/1[DWMYdwmy]/)&&(t=t.slice(1)),t}),ce=null,e.enabled("study_templates")&&(ce=new S(I,TVSettings),ne=new v({chartWidgetCollection:re.chartWidgetCollection,favoriteStudyTemplatesService:ce})),ue=Modernizr.mobiletouch?["full"]:e.enabled("caption_buttons_text_if_possible")?void 0:["medium"],new a(new s,{chartSaver:window.saver,chartApiInstance:ChartApiInstance,chartWidgetCollection:re.chartWidgetCollection,defaultIntervals:Object.keys(ChartApiInstance.defaultResolutions()),defaultFavoriteStyles:le.chartTypes,defaultFavoriteIntervals:le.intervals,hideStudyTemplates:!0,resizerBridge:se,studyMarket:window.studyMarket,studyTemplates:ne,favoriteStudyTemplatesService:ce,allowedModes:ue,saveChartService:re.saveChartService,loadChartService:re.loadChartService,chartChangesWatcher:ae,onClick:o})):null)?B.load().then(function(e){te=e.getComponent(),ie.resolve()}):(ie.promise.catch(function(){}),ie.reject("header widget is not loaded")),Z=function(e){var t,i;return Q?((t=urlParams.toolbarbg&&/^[0-9a-f]+$/i.test(urlParams.toolbarbg)?String(urlParams.toolbarbg):void 0)&&((i=document.createElement("style")).textContent="body,.chart-controls-bar,#footer-chart-panel{background-color:#"+t+" !important}",document.head.appendChild(i)),new l({bgColor:t,chartWidgetCollection:e,drawingsAccess:urlParams.drawingsAccess?JSON.parse(urlParams.drawingsAccess):void 0,resizerBridge:R.allocate({areaName:"left"}),onClick:o})):null}(O),J=null,$=null,
window.tradingViewApi=new H(O,window.ChartApiInstance,D,V),b.bindToChartWidgetCollection(O),TradingView.isNaN(urlParams.studyCountLimit)||(TradingView.STUDY_COUNT_LIMIT=Math.max(2,+urlParams.studyCountLimit)),TradingView.isNaN(urlParams.ssreqdelay)||Y(Math.max(0,+urlParams.ssreqdelay)),window.ChartApiInstance.connect(),Promise.all([i.e(22),i.e(29),i.e(32),i.e(65),i.e(18),i.e(25),i.e("line-tools-icons"),i.e(42),i.e("floating-toolbars")]).then(function(e){var t=i("tPkB");window.lineToolPropertiesToolbar=new t(O)}.bind(null,i)).catch(i.oe),null!==(oe=document.querySelector(".tv-content"))&&oe.addEventListener("contextmenu",function(e){null!==e.target&&"input"!==e.target.tagName.toLowerCase()&&"textarea"!==e.target.tagName.toLowerCase()&&e.preventDefault()}),X.resolve(),O.undoHistory.undoStack().onChange().subscribe(null,A(function(){w.emit("onAutoSaveNeeded")},1e3*(urlParams.autoSaveDelay||5),{leading:!1,trailing:!0})),chartWidget.withModel(null,function(){if(ChartApiInstance.on("realtime_tick",function(e){w.emit("onTick",e)}),ee){var t=u.getStdTheme(ee);t&&t.content&&void 0===p&&(O.applyTheme(t.content,!1,!1,ee,!0,!0),window.applyOverrides(window.__defaultsOverrides))}e.enabled("charting_library_debug_mode")&&w.subscribeToAll(function(){var e=Array.prototype.slice.call(arguments);console.log('Event "{0}", arguments: {1}'.format(e[0],JSON.stringify(e.slice(1))))}),j&&(j(O.getContainer()[0]),j=null)}),d.isAnyChartWidgetInitialized(O)?n():d.waitAnyChartWidgetInitialized(O,n),w.subscribe("chart_load_requested",function(e){window.tradingViewApi.loadChart({json:JSON.parse(e.content),extendedData:e})})},window.addEventListener("unload",function(){window.chartWidgetCollection&&(window.chartWidgetCollection.destroy(),window.chartWidgetCollection=null),window.containerElement=null,D(),window.ChartApiInstance&&(window.ChartApiInstance.destroy(),window.ChartApiInstance=null)}),e.enabled("saveload_storage_customization")&&(window.parent[urlParams.uid].saveLoadAdapter?p.setCustomAdapter(window.parent[urlParams.uid].saveLoadAdapter):void 0!==urlParams.chartsStorageUrl&&urlParams.chartsStorageUrl&&void 0!==urlParams.clientId&&urlParams.clientId?p.initialize(urlParams.clientId,urlParams.userId,urlParams.chartsStorageUrl,urlParams.chartsStorageVer||"1.0"):(e.setEnabled("saveload_storage_customization",!1),e.setEnabled("header_saveload",!1))),re=L(),window.parent[urlParams.uid].loadLastChart&&e.enabled("saveload_storage_customization")?p.getCharts(function(e){if(0!==e.length){var t=e.sort(function(e,t){return t.modified_iso-e.modified_iso})[0];p.getChartContent(t,function(e){var t=JSON.parse(e.content);t.extendedData=e,urlParams.chartContent=JSON.stringify({json:t}),n()},n)}else n()},n):n(),null!=(ae=window.parent[window.urlParams.uid].settingsAdapter)?(TVSettings.setSettingsAdapter(ae),TVSettings.sync()):e.enabled("use_localstorage_for_settings")&&TVSettings.sync(),se=L(),Promise.all([se.promise,re.promise]).then(function(){var t,i,n,o,r,s,a,l;V.trigger(window,"resize"),
(t=document.querySelector(".loading-indicator"))&&(t.style.display="none"),setTimeout(oe,0),e.enabled("14851")&&(Math.random()<=.02||e.enabled("cqg_terminal")||e.enabled("amp_terminal"))&&(n=window,o=document,r="script",s="ga",n.GoogleAnalyticsObject=s,n.ga=n.ga||function(){(n.ga.q=n.ga.q||[]).push(arguments)},n.ga.l=1*new Date,a=o.createElement(r),l=o.getElementsByTagName(r)[0],a.async=1,a.src="//www.google-analytics.com/analytics.js",l.parentNode.insertBefore(a,l),i=document.URL.match(new RegExp("(:?.*://)([^/]+)/.*"))[2],ga("create","UA-112911840-1","auto"),ga("set","anonymizeIp",!0),ga("set",{hostname:i,page:i,referrer:i}),ga("send","pageview"))}),le=!0,window.parent[urlParams.uid].datafeed.onReady(function(e){le&&console.warn("`onReady` should return result asynchronously. Use `setTimeout` with 0 interval to execute the callback function."),window.configurationData=e,se.resolve()}),le=!1,window.getFunctionFromArguments=function(e){return window.parent[urlParams.uid][e]},window.createShortcutAction=(ce=_.createGroup({desc:"API"}),function(e,t){ce.add({hotkey:f(e),handler:t})}),window.initializationFinished=function(){window.chartWidgetCollection.undoHistory.clearStack()},window.headerReady=function(){return ie.promise},window.createButton=function(e){if(null===te)throw new Error("Cannot create button: header widget is not ready or is not loaded - use `headerReady` to wait until header is ready");var t=(e=e||{}).align||"left";return te.addButton(t)}}).call(this,i("Kxc7"))},uOxu:function(e,t,i){"use strict";function n(){return C}function o(){return T}function r(e){e=Math.max(_.ERROR,Math.min(_.DEBUG,e)),C=e,h()}function s(e,t){var i=v.reduce(function(e,t){return e.concat(t)},[]);return i.sort(function(e,t){return e.id-t.id}),void 0!==t&&(i=i.filter(function(e){return e.subSystemId===t})),"number"==typeof e&&(i=i.slice(-e)),i}function a(e){return new Date(e.timestamp).toISOString()+":"+e.subSystemId+":"+e.message.replace(/"/g,"'")}function l(e,t){return function(e,t){var i,n=0;for(i=e.length-1;i>=1&&(n+=8*(1+encodeURIComponent(e[i]).length),!(i-1>0&&n+8*(1+encodeURIComponent(e[i-1]).length)>t));i--);return e.slice(i)}(s(e,t).map(a),m)}function c(e,t,i,n){var r,s;if((t!==b||n.id!==w)&&(r=new Date,e<=_.NORMAL&&function(e,t,i,n,o){var r={id:f,message:String(t),subSystemId:n,timestamp:Number(e)};f+=1,i.push(r),void 0!==o&&i.length>o&&i.splice(0,1)}(r,t,i,n.id,n.maxCount),e<=C&&(!n.highRate||o())&&(!S||n.id.match(S)))){switch(s=r.toISOString()+":"+n.id+":"+t,e){case _.DEBUG:console.debug(s);break;case _.INFO:case _.NORMAL:n.color?console.log("%c"+s,"color: "+n.color):console.log(s);break;case _.WARNING:console.warn(s);break;case _.ERROR:console.error(s)}b=t,w=n.id,P&&clearTimeout(P),P=setTimeout(function(){b=null,w=null,P=NaN},1e3)}}function u(e,t){function i(e){return function(t){return c(e,t,n,o)}}var n,o;return void 0===t&&(t={}),n=[],v.push(n),o=Object.assign(t,{id:e}),{logDebug:i(_.DEBUG),logError:i(_.ERROR),logInfo:i(_.INFO),logNormal:i(_.NORMAL),logWarn:i(_.WARNING)}}function h(){try{
p&&(localStorage.setItem(g,String(T)),localStorage.setItem(y,String(C)))}catch(e){x.logWarn("Cannot save logger state (level: "+C+", high-rate: "+T+") to localStorage: "+e.message)}}var d,p,_,f,m,y,g,v,S,b,w,P,C,T,x,I,L;i.r(t),i.d(t,"LOGLEVEL",function(){return _}),i.d(t,"getLogLevel",function(){return n}),i.d(t,"isHighRateEnabled",function(){return o}),i.d(t,"setLogLevel",function(){return r}),i.d(t,"getRawLogHistory",function(){return s}),i.d(t,"serializeLogHistoryEntry",function(){return a}),i.d(t,"getLogHistory",function(){return l}),i.d(t,"getLogger",function(){return u}),i.d(t,"loggingOn",function(){return I}),i.d(t,"loggingOff",function(){return L}),d="undefined"!=typeof window?window:{},p=!1;try{localStorage.getItem(""),p=!0}catch(e){}!function(e){e[e.ERROR=1]="ERROR",e[e.WARNING=2]="WARNING",e[e.INFO=3]="INFO",e[e.NORMAL=4]="NORMAL",e[e.DEBUG=5]="DEBUG"}(_||(_={})),f=0,m=75497472,y="tv.logger.loglevel",g="tv.logger.logHighRate",v=[],S=null,b=null,w=null,P=NaN,C=_.WARNING,T=!1,x=u("logger"),I=d.lon=function(e,t){r(_.DEBUG),x.logNormal("Debug logging enabled"),T=Boolean(e),S=t||null,h()},L=d.loff=function(){r(_.INFO),x.logInfo("Debug logging disabled")},function(){T=!!p&&"true"===localStorage.getItem(g);var e=parseInt(p&&localStorage.getItem(y)||"");Number.isNaN(e)&&(e=_.WARNING),r(e),x.logNormal("Init with settings - level: "+C+", high-rate: "+T)}(),d.performance&&d.performance.now?x.logNormal("Sync logger and perf times, now is "+d.performance.now()):x.logWarn("Perf time is not available")},uPb3:function(e,t,i){"use strict";(function(e,n){function o(t,i,n,o,r){function s(){throw new Error("Time axis does not support real price scales")}var a,l;this._options=Object.assign({},x,i),this.chart=t,this._properties=t.properties().scalesProperties,this.contextMenu=null,this._element=document.createElement("tr"),this._backgroundBasedTheme=r,a=t.properties().paneProperties.background,l={titlesProvider:n,contentMenuProvider:o,backgroundBasedTheme:r,rendererOptionsProvider:t.model().model().rendererOptionsProvider()},this._onLabelHovered=new e,this._lhsStubContainer=new w(a,this._properties,P.LHS,s,l,this._options.priceAxisLabelsOptions),this._lhsStubContainer.onLabelHovered().subscribe(this,function(e,t){this._onLabelHovered.fire(e,t)}.bind(this)),this._rhsStubContainer=new w(a,this._properties,P.RHS,s,l,this._options.priceAxisLabelsOptions),this._rhsStubContainer.onLabelHovered().subscribe(this,function(e,t){this._onLabelHovered.fire(e,t)}.bind(this)),this._element.appendChild(this._lhsStubContainer.getElement()),this._cell=document.createElement("td"),this._element.appendChild(this._cell),this._cell.classList.add("chart-markup-table","time-axis"),this._cell.style.height="25px",this._dv=document.createElement("div"),this._dv.style.width="100%",this._dv.style.height="100%",this._dv.style.position="relative",this._dv.style.overflow="hidden",this._cell.appendChild(this._dv),this.canvas=f(this._dv,new m(16,16)),this.canvas.style.position="absolute",this.canvas.style.zIndex="1",this.canvas.style.left="0",
this.canvas.style.top="0",this.ctx=this.canvas.getContext("2d"),this.top_canvas=f(this._dv,new m(16,16)),this.top_canvas.style.position="absolute",this.top_canvas.style.zIndex="2",this.top_canvas.style.left="0",this.top_canvas.style.top="0",this.top_ctx=this.top_canvas.getContext("2d"),this._element.appendChild(this._rhsStubContainer.getElement()),this.restoreDefaultCursor(),this.update(),this._minVisibleSpan=S.MINUTE_SPAN,this._mouseEventHandler=new y(this.top_canvas,this,{treatVertTouchDragAsPageScroll:!0,treatHorzTouchDragAsPageScroll:!1})}var r,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P,C,T,x;i("xrEm"),r=i("u+0B").TextWidthCache,s=i("7KDR"),a=s.Separator,l=i("5VQP").ContextMenuManager,c=i("i1o5").InvalidationLevel,u=i("ikwP"),h=u.resizeCanvas,d=u.hardResizeCanvas,p=u.clearRect,_=u.fillRect,f=u.addCanvasTo,m=u.Size,y=i("S8xo").MouseEventHandler,g=i("PC8g").trackEvent,v=i("XlJ7").makeFont,S=i("8OdW"),b=i("CW80").isLineTool,w=i("mE5r").PriceAxisesContainer,P=i("1IXQ").PriceAxisWidget,C=i("3/8U").axesHighlightColor,T=i("zDbI").CHART_FONT_FAMILY,x={contextMenuEnabled:!0,timezoneMenuEnabled:!0,pressedMouseMoveScale:!0},o.prototype.destroy=function(){this._mouseEventHandler.destroy(),this._rhsStubContainer.onLabelHovered().unsubscribeAll(this),this._lhsStubContainer.onLabelHovered().unsubscribeAll(this),this._lhsStubContainer.destroy(),this._rhsStubContainer.destroy()},o.prototype.getElement=function(){return this._element},o.prototype._BORDER_SIZE=1,o.prototype._OFFSET_SIZE=1,o.prototype._TICK_LENGTH=3,o.prototype.onLabelHovered=function(){return this._onLabelHovered},o.prototype.backgroundColor=function(){return this.chart.properties().paneProperties.background.value()},o.prototype.lineColor=function(){return this._properties.lineColor.value()},o.prototype.textColor=function(){return this._properties.textColor.value()},o.prototype.fontSize=function(){return this._properties.fontSize.value()},o.prototype.baseFont=function(){return v(this.fontSize(),T,"")},o.prototype.baseBoldFont=function(){return v(this.fontSize(),T,"bold")},o.prototype.rendererOptions=function(){var e,t;return this._rendererOptions||(this._rendererOptions={borderSize:this._BORDER_SIZE,offsetSize:this._OFFSET_SIZE,tickLength:this._TICK_LENGTH,fontSize:NaN,font:"",widthCache:new r}),(e=this._rendererOptions).fontSize!==this.fontSize()&&(t=this.fontSize(),e.fontSize=t,e.font=this.baseFont(),e.font=v(this.fontSize(),T,""),e.paddingTop=Math.ceil(t/2.5),e.paddingBottom=e.paddingTop,e.paddingHorizontal=Math.ceil(t/2),e.baselineOffset=Math.round(this.fontSize()/5),e.widthCache.reset()),this._rendererOptions},o.prototype._zoomAvailable=function(){return!this.chart.model().timeScale().isEmpty()&&this.chart.model().model().zoomEnabled()&&this._options.pressedMouseMoveScale},o.prototype.mouseDownEvent=function(e){if(this._mousedown||!this._zoomAvailable())return!0;this._mousedown=!0;var t=this.chart.model();t.timeScale().isEmpty()||t.startScaleTime(e.localX)},o.prototype.mouseDownOutsideEvent=function(e){this._zoomAvailable()&&this._mousedown&&(this._mousedown=!1,
this.chart.model().endScaleTime(),this.restoreDefaultCursor())},o.prototype.pressedMouseMoveEvent=function(e){var t,i,n;this._zoomAvailable()&&(t=this.chart.model(),i=!1,n=(new Date).valueOf(),this._lastScrollScaleTime&&n-this._lastScrollScaleTime<100&&(i=!0),i||(t.scaleTimeTo(e.localX),this._lastScrollScaleTime=n))},o.prototype.mouseUpEvent=function(e){this._zoomAvailable()&&(this._mousedown=!1,this.chart.model().endScaleTime(),this.restoreDefaultCursor())},o.prototype.contextMenuEvent=function(e){this._options.contextMenuEnabled&&this._createContextMenu().then(function(t){t.show(e)})},o.prototype.mouseEnterEvent=function(e){this.chart.model().model().zoomEnabled()&&this.setCursor("ew-resize")},o.prototype.mouseLeaveEvent=function(e){this.restoreDefaultCursor()},o.prototype._createContextMenu=function(){return l.createMenu(this.getContextMenuActions(),{statName:"TimeScaleContextMenu"})},o.prototype.getContextMenuActions=function(){var e,t,i=this.chart;return i.updateActions(),e=i.actions(),t=n.enabled("charting_library_base")?[e.timeScaleReset,new a,e.applyTimeZone,e.sessionBreaks]:[e.timeScaleReset,new a,e.applyTimeZone,e.sessionBreaks,e.extendedHours],this._options.timezoneMenuEnabled||t.splice(2,1),t},o.prototype.mouseClickEvent=function(e){},o.prototype.mouseDoubleClickEvent=function(e){g("GUI","Double click time scale"),this.chart.model().resetTimeScale()},o.prototype.optimalHeight=function(){var e=this.rendererOptions();return Math.ceil(e.offsetSize+e.borderSize+e.tickLength+e.fontSize+e.paddingTop+e.paddingBottom)},o.prototype.setSizes=function(e,t,i){this.size&&this.size.equals(e)||(this.size=e,h(this.canvas,e),h(this.top_canvas,e),this.canvas.getContext("2d"),this.top_canvas.getContext("2d"),this._cell.style.width=e.w+"px",this._cell.style.height=e.h+"px"),this._lhsStubContainer.setSizes(e.h,t),this._rhsStubContainer.setSizes(e.h,i)},o.prototype._spanIndex=function(e){for(var t=[S.MINUTE_SPAN,S.HOUR_SPAN,S.DAY_SPAN,S.MONTH_SPAN,S.YEAR_SPAN],i=t.length-1;i>0;){if(t[i]<=e)return i;i--}return i},o.prototype._spanOffset=function(e,t){if(t<e)throw new Error("actual span cuold not be less then base");return this._spanIndex(t)-this._spanIndex(e)},o.prototype.update=function(){var e,t;this.chart.model()&&(e=this.chart.model().timeScale().marks())&&(t=this,this._minVisibleSpan=S.YEAR_SPAN,e.forEach(function(e){t._minVisibleSpan=Math.min(e.span,t._minVisibleSpan)}))},o.prototype._hightlightBackground=function(e,t){var i,n,o,r,s,a=this.chart.model(),l=a.timeScale(),c=t[0].index,u=t[0].index;for(i=1;i<t.length;i++)c=Math.min(c,t[i].index),u=Math.max(u,t[i].index);n=l.indexToCoordinate(c),o=l.indexToCoordinate(u),r=this._backgroundBasedTheme.value(),s=C(r),_(e,n,0,o-n,this.size.h-1,s)},o.prototype.drawBackground=function(e){var t,i,n;p(e,0,0,this.size.w,this.size.h,this.backgroundColor()),(t=this.chart.model())&&(t.timeScale().isEmpty()||(i=t.model().selection().sources().filter(function(e){return b(e)}).reduce(function(e,t){var i=t.axisPoints();return 0===i.length?e:e.concat(i)
},[])).length>0&&this._hightlightBackground(e,i),(n=t.model().crossHairSource()).startMeasurePoint()&&this._hightlightBackground(e,n.measurePoints()))},o.prototype.drawTickMarks=function(e){var t,i,n,o,r,s,a,l,c,u,h,d=this.chart.model().timeScale().marks();if(d&&0!==d.length){for((t=d.reduce(function(e,t){return e.span>t.span?e:t},d[0]).span)>30&&t<40&&(t=30),e.save(),e.strokeStyle=this.lineColor(),n=(i=this.rendererOptions()).borderSize+i.tickLength+i.paddingTop+i.fontSize-i.baselineOffset,e.textAlign="center",e.translate(.5,-.5),e.fillStyle=this.lineColor(),e.beginPath(),o=d.length;o--;)e.rect(d[o].coord,0,1,i.tickLength);for(e.fill(),e.fillStyle=this.textColor(),r={},s=this.baseFont(),a=this.baseBoldFont(),o=0;o<d.length;o++)(c=r[l=d[o].span>=t?a:s]||[]).push(d[o]),r[l]=c;for(u in r)for(e.setFont(u),h=r[u],o=0;o<h.length;o++)e.fillText(h[o].label,h[o].coord,n);e.restore()}},o.prototype.drawBackLabels=function(e){var t,i,n,o,r,s,a,l,c;for(e.save(),t=new Set,n=(i=this.chart.model()).dataSources(),i.selection().sources().forEach(function(e){t.add(e)}),i.hoveredSource()&&t.add(i.hoveredSource()),i.sourcesBeingMoved().forEach(function(e){t.add(e)}),(o=i.lineBeingEdited()||i.lineBeingCreated())&&t.add(o),t.add(this.chart.model().crossHairSource()),n=n.concat(i.model().customSources()),r=this.rendererOptions(),s=0;s<n.length;s++)if(a=n[s],!t.has(a)&&a.timeAxisViews&&(l=a.timeAxisViews()))for(c=0;c<l.length;c++)l[c].renderer().draw(e,r);e.restore()},o.prototype._minMaxViews=function(e){var t=[],i={value:null,view:null},n={value:null,view:null};return e.forEach(function(e){var t,o,r,s;if(e.timeAxisViews&&(t=e.timeAxisViews())&&t.length)for(o=0;o<t.length;o++)s=(r=t[o]).coordinate(),(null===i.value||i.value<=s)&&(i={value:s,view:r}),(null===n.value||n.value>=s)&&(n={value:s,view:r})}),i.view&&t.push(i.view),n.view&&t.push(n.view),t},o.prototype._addViewsOrMaxMin=function(e,t){e.length<=1?e.forEach(function(e){if(e.timeAxisViews){var i=e.timeAxisViews();i&&i.length&&t.push(i)}}):t.push(this._minMaxViews(e))},o.prototype.drawCrossHairLabel=function(e){var t,i,n,o,r;this.top_ctx.clearRect(-.5,-.5,this.size.w,this.size.h),i=[],(n=(t=this.chart.model()).lineBeingEdited()||t.lineBeingCreated())&&n.timeAxisViews&&(o=n.timeAxisViews())&&o.length&&i.push(o),this._addViewsOrMaxMin(t.sourcesBeingMoved(),i),this._addViewsOrMaxMin(t.selection().sources(),i),t.hoveredSource()&&!t.selection().isSelected(t.hoveredSource())&&t.hoveredSource().timeAxisViews&&(o=t.hoveredSource().timeAxisViews())&&o.length&&i.push(o),(o=t.crossHairSource().timeAxisView())&&o.length&&i.push(o),r=this.rendererOptions(),i.forEach(function(t){t.forEach(function(t){e.save(),t.renderer().draw(e,r),e.restore()})})},o.prototype.hardResetCanvas=function(){this.size&&(d(this.canvas,this.size),d(this.top_canvas,this.size))},o.prototype.paint=function(e){if(0!==e)if(e!==c.Cursor){var t=this.ctx;this.drawBackground(t),this.chart.model()&&(this.drawTickMarks(t),this.drawBackLabels(t),this.chart.model().crossHairSource().updateAllViews(),
this.drawCrossHairLabel(this.top_ctx)),this._lhsStubContainer.paint(e),this._rhsStubContainer.paint(e)}else this.drawCrossHairLabel(this.top_ctx)},o.prototype.restoreDefaultCursor=function(){this.setCursor("")},o.prototype.setCursor=function(e){var t="";"grabbing"!==e&&"ew-resize"!==e||(t="time-axis--cursor-"+e),this._currentCursorClassName!==t&&(this._currentCursorClassName&&this._cell.classList.remove(this._currentCursorClassName),t&&this._cell.classList.add(t),this._currentCursorClassName=t,this._cell.style.cursor)},o.prototype.updatePriceAxisStubs=function(){var e,t=this.chart.model().model(),i=this.chart.isMaximizedPane()?this.chart.maximizedPaneWidget().state():t.paneForSource(t.mainSeries());i&&(e=t.priceScaleSlotsCount(),this._lhsStubContainer.setScales([],e.left,i.leftPriceScales().length,e.left+e.right),this._rhsStubContainer.setScales([],e.right,i.rightPriceScales().length,e.left+e.right))},o.prototype.getScreenshotData=function(){var e={};return e.content=this.canvas.toDataURL(),e.contentWidth=this.size.w,e.contentHeight=this.size.h,e.lhsStub=this._lhsStubContainer.getScreenshotData(),e.rhsStub=this._rhsStubContainer.getScreenshotData(),e},t.TimeAxisWidget=o}).call(this,i("aIyQ"),i("Kxc7"))},"uXw/":function(e,t,i){"use strict";(function(t){var n=i("IiTo"),o=i("LxhU").Interval,r=i("Y7w9").lowerbound,s=i("aIyQ"),a=function(){function e(e){return e}function a(e,t){var i=new n.SessionInfo(e.timezone,e.session,e.holidays,e.corrections);return y.Symbol.newBarBuilder(t,i,i)}function l(){p.forEach(function(t,i){var n,o,r,s,a,l,c,u=t.symbol,h=t.symbolInfo,p=t.pointsets,_=e(u);for(d.hasOwnProperty(_)||(d[_]=[]),null!==(n=function(e,t,i){var n,o,r,s,a,l,c;for(n=0,o=null,r=0;r<i.length;r++)for(s=i[r].points,a=0;a<s.length;a++)(l=s[a])[1]>0&&(c=t.getOffsetSinceLastRealBar(e,l[0],l[1]))>n&&(n=c,o=l);return o}(h,i,p))&&i.ready()&&i.ensureExtrapolatedTo(h,n[0],n[1]),o=0;o<p.length;o++){for(r=p[o].points,s=[],a=0;a<r.length;++a)r[a][1]<0&&(r[a][1]=0),0!==r[a][1]?(l=i.getPointTimeUTC(r[a][0],r[a][1],h),s.push(l)):r[a][0]&&s.push(r[a][0]);c={guid:p[o].guid,points:s},d[_].push(c)}f.fire({symbolInfo:h,session:t.session})}),p.clear(),_=null}function c(e,t,i,n,o){var r,s,a,l=[];for(r=0;r<e.points.length;++r){if(null==(s=e.points[r]))return null;if(null===(a=u(t,s,i,n,o)))return null;l.push({index:r,value:[a,s]})}return l}function u(e,t,i,s,l){var c,u,d=a(s,l);return 1e3*(t=d.alignTimeIfPossible(1e3*t)/1e3)<e[0].value[0]?-function(e,t,i,r,s){var l,c=o.parse(t),u=new n.SessionInfo(e.timezone,e.session,e.holidays,e.corrections),d=a(e,t);if(i=d.alignTimeIfPossible(1e3*i)/1e3,r=d.alignTimeIfPossible(1e3*r)/1e3,i>=r)return 0;l=h(e,c,u,i,r);if(l>=1e3)return l;return s.findDistanceInBars(i,r,e)}(s,l,t,e[0].value[0]/1e3,i):(c=r(e,1e3*t,function(e,t){return e.value[0]<t}))!==e.length&&t<e[e.length-1].value[0]?(e[c].value[0]/1e3!==t&&0!==c&&c--,e[c].index):-1===(u=i.indexOfBar(t,s))?null:u}function h(e,t,i,n,o){var r,s,a,l,c,u,h,d,p,_,f,m,y,v,S,b;if(t.isMonths())y=o,v=new Date(1e3*n),S=new Date(1e3*y),
b=12*(S.getFullYear()-v.getFullYear()),b-=v.getMonth()+1,r=((b+=S.getMonth())<=0?0:b)/t.multiplier();else if(t.isWeeks())s=Math.ceil((o-n)/604800),r=Math.ceil(s/t.multiplier());else{if(a=g.utc_to_cal(i.timezone,+new Date(1e3*n)),l=g.utc_to_cal(i.timezone,+new Date(1e3*o)),(c=(o-n)/86400)>4*(7-i.spec.weekEndsCount()))u=c/7*(7-i.spec.weekEndsCount());else{for(h=0,d={},p=a;p.valueOf()<=l.valueOf();p=g.add_days_considering_dst(i.timezone,p,1))void 0===d[_=g.get_day_of_week(p)]&&(d[_]=i.spec.isWeekEnd(_)),d[_]&&h++;u=c-h}if(t.isDays())r=Math.ceil(u/t.multiplier());else{if(f=t.isHours()?60*t.multiplier()*60:t.isSeconds()?t.multiplier():60*t.multiplier(),c<1&&i.spec.findSession(i.spec.getWeekIndex(a),g.get_day_of_week(a),g.get_minutes_from_midnight(a)).getEntry()===i.spec.findSession(i.spec.getWeekIndex(l),g.get_day_of_week(l),g.get_minutes_from_midnight(l)).getEntry())return Math.ceil((o-n)/f);_=i.spec.entries()[0].dayOfWeek(),m=60*i.spec.entries().reduce(function(e,t){return e+(t.dayOfWeek()===_?t.length():0)},0),r=Math.ceil(u*m/f)}}return r}var d={},p=new Map,_=null,f=new s,m="undefined"!=typeof window?window:t,y=i("ocLq"),g=m.PineJsCalendar?m.PineJsCalendar:i("jCNj");return{createPointset:function(e,t,i,n,o,r){var s={guid:e,points:i},a=p.get(n);void 0===a&&(a={symbol:t,symbolInfo:o,session:r,pointsets:[]},p.set(n,a)),a.pointsets.push(s),null===_&&(_=setTimeout(l,0))},removePointset:function(e){var t,i,n,o=[];for(p.forEach(function(t,i){var n,r=t.pointsets;for(n=0;n<r.length;n++)if(r[n].guid===e)return r.splice(n,1),void(0===r.length&&o.push(i))}),t=0;t<o.length;t++)p.delete(o[t]);for(i in d)for(n=d[i],t=0;t<n.length;++t)if(n[t].guid===e)return void n.splice(t,1)},broadcastPointsetsUpdates:function(t,i,n,o,r,s){var a,l,u,h,p=e(t);if(d.hasOwnProperty(p))for(a=d[p].length,l=0;l<a;++l)null!==(h=c(u=d[p][l],n,o,r,i))&&s(u.guid,h)},pointsetsCreated:function(){return f},tests:{approxBarsInterval:h,indexOfTime:u}}}();e.exports=a}).call(this,i("yLpj"))},ulZB:function(e,t,i){"use strict";var n,o,r,s,a;i.d(t,"a",function(){return s}),i.d(t,"b",function(){return a}),n=i("mrSG"),o=i("aIyQ"),r=i.n(o),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._serialize=function(e){return e},t.prototype._deserialize=function(e){return e},t}(s=function(){function e(e,t,i,n,o){var s=this;this._onChange=new r.a,this._handleChange=function(){s._onChange.fire(s.get())},this._crossTabEvents=e,this._jsonKeyValueStore=t,this.CROSSTAB_EVENT_NAME=i,this.JSON_STORE_KEY=n,this.defaultStoreValue=this._serialize(o),this._subscribe()}return e.prototype.get=function(){var e=this._jsonKeyValueStore.getJSON(this.JSON_STORE_KEY,this.defaultStoreValue);return this._deserialize(e)},e.prototype.set=function(e,t){var i=this._serialize(e);this._jsonKeyValueStore.setJSON(this.JSON_STORE_KEY,i,t),this._crossTabEvents.emit(this.CROSSTAB_EVENT_NAME),this._onChange.fire(e)},e.prototype.getOnChange=function(){return this._onChange},e.prototype.destroy=function(){this._unsubscribe(),
this._onChange.destroy(),delete this._onChange},e.prototype._subscribe=function(){this._crossTabEvents.on(this.CROSSTAB_EVENT_NAME,this._handleChange),this._jsonKeyValueStore.onSync.subscribe(this,this._handleChange)},e.prototype._unsubscribe=function(){this._crossTabEvents.off(this.CROSSTAB_EVENT_NAME,this._handleChange),this._jsonKeyValueStore.onSync.unsubscribe(this,this._handleChange)},e}())},v5F8:function(e,t,i){"use strict";function n(e,t){var i=t||n.createProperties();r.call(this,e,i),this._constructor="LineToolSchiffPitchfork"}var o=i("5rJj"),r=i("aDyP").LineToolPitchfork,s=window.t("Modified Schiff Pitchfork");inherit(n,r),n.prototype.title=function(){return s},n.prototype.name=function(){return"Modified Schiff Pitchfork"},n.createProperties=function(e){var t=new o("linetoolschiffpitchfork",e,!1,{range:[0,8]});return n._configureProperties(t),t},n._configureProperties=function(e){r._configureProperties(e)},t.LineToolSchiffPitchfork=n},vADo:function(e,t,i){"use strict";(function(t){function i(e){t.call(this,""),this.subscribe(this,i.prototype.checkSelfColor),this.reloadProperties(e)}inherit(i,t),i.prototype.reloadProperties=function(e){for(;this._childs.length>0;)this.removeProperty(this._childs[0]);this._initValues=[];for(var t=0;t<e.length;++t)this._initValues.push(e[t].defaultValue),this.addChild(t,e[t].property);this.checkSelfColor()},i.prototype.setValue=function(e,i){if(this._value!==e||i){var n=this;this._childs.forEach(function(t){n[t].setValue(e||n._initValues[t])}),t.prototype.setValue.call(this,e,i)}},i.prototype.checkSelfColor=function(){var e,i=!0;for(e=0;e<this._initValues.length;++e)if(this[e].value()!==this[0].value()){i=!1;break}t.prototype.setValue.call(this,i?this[0].value():"")},e.exports=i}).call(this,i("tc+8"))},vAx0:function(e,t,i){"use strict";function n(e,t){this._lastClickedId=null,this._model=e,this._study=t,this._metaInfo=t.metaInfo(),this._lollipops={},this._textCache={},this.templatesCache={},this._invalidated=!0,this.templatesCache.hovered=this.createTemplate(this.hoveredStyle),this.templatesCache.default=this.createTemplate(this.defaultStyle),e.properties().paneProperties.background.subscribe(this,this.onPaneBgChange)}function o(e){this.data=e}function r(e){this.data=e,this._hittest=new c(c.CUSTOM,e)}function s(e,t){this._data=e,this._paneView=t,this.textRenderer=new s.TextRenderer(e.style.lollipop.importance)}var a=i("aO4+").Point,l=i("f6yo").pointInCircle,c=i("VdBB").HitTestResult,u=i("Zy3/").CompositeRenderer,h=i("6xeX").Tooltip,d=(i("GH0z").PercentageFormatter,i("55Xp").roundToFirstValuable,i("zDbI").CHART_FONT_FAMILY),p=10;n.prototype.onPaneBgChange=function(){this.defaultStyle.lollipop.fillStyle=this._model.properties().paneProperties.background.value(),this._stylesCache=null,Object.keys(this.templatesCache).forEach(function(e){0===e.indexOf("default")&&(this.templatesCache[e]=null)},this)},n.prototype.onClickOutside=function(){this.clearLastClicked()},n.prototype.clearLastClicked=function(){this._lastClickedId=null},n.prototype.closeTooltips=function(){var e,t
;for(e in this._lollipops)this._lollipops.hasOwnProperty(e)&&(t=this._lollipops[e]).visible&&(t.tooltip.isOpened()&&t.tooltip.hide(),t.visible=!1)},n.prototype.getLastClickedLollipopId=function(){return this._lastClickedId},n.prototype._setStackStudies=function(){this._stackStudies=[]},n.prototype._getY=function(){var e,t,i=0,n=this._model.panes();for(e=n.length;e--;)(t=n[e]).containsMainSeries()&&(i+=t.height());return i},n.prototype.update=function(){this._invalidated=!0},n.prototype.updateImpl=function(){var e,t,i,n,o,r,s,a,l,c;this._setStackStudies(),e=this,t=this._study.data(),n=(i=this._model.timeScale()).visibleBarsStrictRange(),o=this._model.mainSeries().bars(),r=this._study.priceScale(),s=this._model.mainSeries().firstBar(),r&&!r.isEmpty()&&!i.isEmpty()&&s&&t&&(this.closeTooltips(),a=this._getY(),l=n.firstBar(),c=n.lastBar(),t.range(l,c).each(function(t,n){var s,u=0;for(s=0;s<e._stackStudies.length;++s)e._stackStudies[s].data().contains(t)&&++u;t>l&&t<c&&e.addLollipop(a,o,i,r,t,n,u)}),this.afterUpdate(a,o,i,r))},n.prototype.addLollipop=function(e,t,i,n,o,r,s){var l,c,u,d,p,_,f,m,y=r[0],g=this._model.mainSeries().symbolInfo();g&&(l=g.name,c=null,u=this._study.metaInfo().id+"_"+y+"_"+l,(p=(d=this._model.lastHittestData())&&d.id===u)&&null!==(_=t.valueAt(o))&&(f=_[TradingView.LOW_PLOT],m=this._model.mainSeries().firstValue(),c=n.priceToCoordinate(f,m)),this._lollipops[u]=Object.assign({id:u,visible:!0,basePoint:new a(i.indexToCoordinate(o)+1,e),hovered:p||u===this.getLastClickedLollipopId(),barY:c,stack:s,tooltip:this._lollipops.hasOwnProperty(u)?this._lollipops[u].tooltip:new h},this.extraData(r)))},n.prototype.afterUpdate=function(e,t,i){},n.prototype.extraData=function(e){throw new Error("Not Implemented")},n.prototype.createText=function(e,t){throw new Error("Not Implemented")},n.prototype.showBarLine=function(){return!0},n.prototype.getStyle=function(e,t){var i,n=e;return t.stack&&(n+="_stack:"+t.stack),"hovered"===n?this.hoveredStyle:"default"===n?this.defaultStyle:(this._stylesCache||(this._stylesCache={}),this._stylesCache[n]||(i=TradingView.clone("hovered"===e?this.hoveredStyle:this.defaultStyle),t.stack&&(i.lollipop.incHeight=24*t.stack),this._stylesCache[n]=i),this._stylesCache[n])},n.prototype.hasTooltip=function(e){return!0},n.prototype.renderer=function(){var e,t,i,n,l,c,h,d,p;for(t in this._invalidated&&(this.updateImpl(),this._invalidated=!1),e=new u,this._lollipops)this._lollipops.hasOwnProperty(t)&&(i=this._lollipops[t],n=15,l=this.getStyle(i.hovered?"hovered":"default",i),i.visible&&(c=Object.assign({tooltipPoint:new a(i.basePoint.x,i.basePoint.y-l.lollipop.circleHeight-n-(l.lollipop.incHeight||0)),style:l,createText:this.createText.bind(this)},i),h=this.getTemplate(i.hovered?"hovered":"default",i),d={circlePoint:new a(i.basePoint.x,i.basePoint.y-l.lollipop.circleHeight-(l.lollipop.incHeight||0)),style:l,template:h,basePoint:i.basePoint,id:i.id,mouseClickHandler:this._lollipopMouseClickHandler.bind(this,i.id)},e.append(new r(d)),i.hovered&&this.hasTooltip(i)&&i.barY&&this.showBarLine()&&(p={
style:{lineStyle:l.barLine.lineStyle,strokeStyle:l.strokeStyle,lineWidth:l.lineWidth},startPoint:new a(i.basePoint.x,i.basePoint.y-l.lollipop.circleHeight),endPoint:new a(i.basePoint.x,i.barY)},e.append(new o(p))),e.append(new s(c,this))));return e},n.prototype.getTemplate=function(e,t){var i=e;return t.stack&&(i+="_stack:"+t.stack),this.templatesCache[i]||(this.templatesCache[i]=this.createTemplate(this.getStyle(e,t))),this.templatesCache[i]},n.prototype.createTemplate=function(e){var t=document.createElement("canvas"),i=t.getContext("2d"),n=new a(e.lollipop.width/2,e.lollipop.height-e.lollipop.circleHeight-(e.lollipop.incHeight||0));return this.drawCircle(i,e,n),this.drawLabel(i,e,n),t},n.prototype.drawCircle=function(e,t,i){e.strokeStyle=t.strokeStyle,e.fillStyle=t.lollipop.fillStyle,e.lineWidth=t.lollipop.lineWidth,CanvasEx.setLineStyle(e,CanvasEx.LINESTYLE_SOLID),e.beginPath(),e.arc(i.x,i.y,t.lollipop.radius,0,2*Math.PI,!1),e.closePath(),e.stroke(),t.lollipop.fillCircle&&e.fill()},n.prototype.drawLabel=function(e,t,i){e.textAlign="center",e.textBaseline="middle",e.fillStyle=t.lollipop.text.strokeStyle,e.font=t.lollipop.text.font,e.fillText(t.lollipop.text.label,i.x,i.y)},n.prototype._lollipopMouseClickHandler=function(e){this._lastClickedId=this._lastClickedId===e?null:e},o.prototype.draw=function(e){e.strokeStyle=this.data.style.strokeStyle,e.lineWidth=this.data.style.lineWidth,CanvasEx.setLineStyle(e,this.data.style.lineStyle),CanvasEx.drawLine(e,this.data.startPoint.x,this.data.startPoint.y,this.data.endPoint.x,this.data.endPoint.y)},o.prototype.hitTest=function(e){return null},r.prototype.hitTest=function(e){return l(e,this.data.circlePoint,this.data.style.lollipop.radius)?this._hittest:null},r.prototype.draw=function(e){var t=this.data.template;e.drawImage(t,this.data.basePoint.x-(.5+this.data.style.lollipop.width/2<<0)+.5,this.data.basePoint.y-this.data.style.lollipop.height+.5)},s.prototype.draw=function(e){this._data.createText(this._data,this.textRenderer),this._paneView.getLastClickedLollipopId()===this._data.id?this._data.tooltip.show({items:[this.textRenderer],x:this._data.basePoint.x,y:this._data.basePoint.y-this._data.style.lollipop.circleHeight-p-2*this._data.style.lollipop.radius*(this._data.stack?this._data.stack:0),wrapElement:e.canvas.parentNode,leftBorderColor:this._data.color}):this._data.tooltip.hide()},s.prototype.hitTest=function(e){return null},s.TextRenderer=function(e){this.lines=[],this.fontHeight=12,this.font=this.fontHeight+"px "+d,this.lineSpacing=8,this.fillStyle="black",e&&(this.importance=e)},s.TextRenderer.prototype.draw=function(e,t){var i,n,o=t.y;for(i=0;i<this.lines.length;i++)n=this.lines[i],e.font=this.font,n.options.fontWeight&&(e.font=n.options.fontWeight+" "+this.font),e.fillStyle=this.fillStyle,n.renderer(e,n.line,{x:t.x,y:o}),o+=this.lineSpacing+this.fontHeight},s.TextRenderer.prototype.measure=function(){return this.lines.length*(this.fontHeight+this.lineSpacing)-this.lineSpacing},s.TextRenderer.prototype.basicRenderer=function(e,t,i){e.fillText(t,i.x,i.y)},
s.TextRenderer.prototype.addMulticolorTextLine=function(e,t){this.addTextLine(e,t,this.multicolorRenderer)},s.TextRenderer.prototype.addTextLine=function(e,t,i){i||(i=this.basicRenderer),t||(t={}),this.lines.push({line:e,renderer:i,options:t})},s.TextRenderer.prototype.multicolorRenderer=function(e,t,i){var n,o,r=i.x;for(n=0;n<t.length;++n)o=t[n],e.fillStyle=o.color,e.fillText(o.text,r,i.y),r+=e.measureText(o.text).width},t.ESDPaneView=n},vIQA:function(e,t,i){"use strict";var n,o,r,s=i("ocLq");i("2cgs"),n=i("hyq/").pivotPointsStandardStudyItem,o=i("QCyK").spreadStudyItem,r=i("teHb").ratioStudyItem,JSServer.studyLibrary=JSServer.studyLibrary.concat([{name:"Compare",metainfo:{_metainfoVersion:15,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!0,defaults:{styles:{compare:{linestyle:0,linewidth:2,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800080"}},precision:4,inputs:{source:"close",symbol:""}},plots:[{id:"compare",type:"line"}],styles:{compare:{title:"Plot",histogramBase:0}},description:"Compare",shortDescription:"Compare",is_price_study:!0,inputs:[{defval:"close",id:"source",name:"Source",options:["open","high","low","close","hl2","hlc3","ohlc4"],type:"text"},{id:"symbol",name:"Symbol",type:"symbol",isHidden:!0}],id:"Compare@tv-basicstudies-1"},constructor:function(){this.init=function(e,t){this._context=e,this._context.new_sym(t(1),s.Std.period(this._context),s.Std.period(this._context))},this.main=function(e,t){var i,n,o,r;return this._context=e,i=this._context.new_unlimited_var(this._context.symbol.time),this._context.select_sym(1),n=this._context.new_unlimited_var(this._context.symbol.time),o=s.Std[t(0)](this._context),r=this._context.new_unlimited_var(o),this._context.select_sym(0),[r.adopt(n,i,0)]}}},{name:"Overlay",metainfo:{_metainfoVersion:15,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!0,defaults:{styles:{},precision:4,inputs:{symbol:""}},plots:[{id:"open",type:"line"},{id:"high",type:"line"},{id:"low",type:"line"},{id:"close",type:"line"}],styles:{open:{title:"Open"},high:{title:"High"},low:{title:"Low"},close:{title:"Close"}},description:"Overlay",shortDescription:"Overlay",is_price_study:!1,inputs:[{id:"symbol",name:"symbol",defval:"",type:"symbol",isHidden:!0}],id:"Overlay@tv-basicstudies-1"},constructor:function(){this.init=function(e,t){this._context=e,this._context.new_sym(t(0),s.Std.period(this._context),s.Std.period(this._context))},this.main=function(e,t){var i,n,o,r,a,l;return this._context=e,i=this._context.new_unlimited_var(this._context.symbol.time),this._context.select_sym(1),n=this._context.new_unlimited_var(this._context.symbol.time),o=this._context.new_unlimited_var(s.Std.open(this._context)),r=this._context.new_unlimited_var(s.Std.high(this._context)),a=this._context.new_unlimited_var(s.Std.low(this._context)),l=this._context.new_unlimited_var(s.Std.close(this._context)),this._context.select_sym(0),[o.adopt(n,i,1),r.adopt(n,i,1),a.adopt(n,i,1),l.adopt(n,i,1)]}}},{name:"Volume",metainfo:{_metainfoVersion:15,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,
transparency:65,defaults:{styles:{vol:{linestyle:0,linewidth:1,plottype:5,trackPrice:!1,transparency:65,visible:!0,color:"#000080"},vol_ma:{linestyle:0,linewidth:1,plottype:4,trackPrice:!1,transparency:65,visible:!1,color:"#0496FF"}},precision:0,palettes:{volumePalette:{colors:{0:{color:"#eb4d5c",width:1,style:0},1:{color:"#53b987",width:1,style:0}}}},inputs:{showMA:!1,maLength:20}},plots:[{id:"vol",type:"line"},{id:"volumePalette",palette:"volumePalette",target:"vol",type:"colorer"},{id:"vol_ma",type:"line"}],styles:{vol:{title:"Volume",histogramBase:0},vol_ma:{title:"Volume MA",histogramBase:0}},description:"Volume",shortDescription:"Volume",is_price_study:!1,palettes:{volumePalette:{colors:{0:{name:"Falling"},1:{name:"Growing"}}}},inputs:[{id:"showMA",name:"show MA",defval:!1,type:"bool",isHidden:!0},{id:"maLength",name:"MA Length",defval:20,type:"integer",min:1,max:2e3}],id:"Volume@tv-basicstudies-1"},constructor:function(){this.f_0=function(e,t){return s.Std.gt(e,t)?0:1},this.main=function(e,t){var i,n,o,r;return this._context=e,this._input=t,i=s.Std.volume(this._context),n=this.f_0(s.Std.open(this._context),s.Std.close(this._context)),o=s.Std.volume(this._context),r=this._context.new_var(o),[i,n,s.Std.sma(r,this._input(1),this._context)]}}},{name:"ZigZag",metainfo:{_metainfoVersion:23,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:2,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"}},precision:4,inputs:{in_0:5,in_1:10}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",target:"plot_0",type:"dataoffset"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Zig Zag",shortDescription:"ZigZag",is_price_study:!0,classId:"ScriptWithDataOffset",inputs:[{id:"in_0",name:"deviation",defval:5,type:"float",min:.001,max:100},{id:"in_1",name:"depth",defval:10,type:"integer",min:2,max:1e3}],id:"ZigZag@tv-basicstudies-1"},constructor:function(){this.main=function(e,t){var i,n;return this._context=e,this._input=t,i=this._input(0)/100,n=this._input(1)/2,[s.Std.zigzag(i,n,this._context),s.Std.zigzagbars(i,n,this._context)]}}},{name:"Sessions",metainfo:{_metainfoVersion:44,defaults:{graphics:{vertlines:{sessBreaks:{color:"#4985e7",style:2,visible:!1,width:1}}},linkedToSeries:!0,precision:4},description:"Sessions",graphics:{vertlines:{sessBreaks:{name:"Session Break"}}},id:"Sessions@tv-basicstudies-1",inputs:[],is_hidden_study:!0,is_price_study:!0,name:"Sessions@tv-basicstudies",palettes:{},plots:[],shortDescription:"Sessions"},constructor:function(){function e(e,t){return{id:e,time:e,extendBottom:!0,extendTop:!0}}this.init=function(){this._times=[]},this._getVerticalLineData=function(t){return s.Std.selectSessionBreaks(t,this._times).map(e)},this.main=function(e,t){var i,n,o;return s.Std.isdwm(e)?null:(i=s.Std.time(e),isNaN(i)?null:(0!==(n=this._times.length)&&this._times[n-1]===i||this._times.push(i),e.symbol.isLastBar&&e.symbol.isNewBar?0===(o=this._getVerticalLineData(e)).length?null:{nonseries:!0,type:"study_graphics",data:{graphicsCmds:{
create:{vertlines:[{styleId:"sessBreaks",data:o}]},erase:[{action:"all"}]}}}:null))}}},{name:"SuperTrend",metainfo:{_metainfoVersion:39,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:3,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"},plot_2:{linestyle:0,linewidth:3,plottype:"shape_arrow_up",trackPrice:!1,location:"BelowBar",transparency:35,visible:!0,color:"#00FF00"},plot_3:{linestyle:0,linewidth:3,plottype:"shape_arrow_down",trackPrice:!1,location:"AboveBar",transparency:35,visible:!0,color:"#FF0000"}},precision:4,palettes:{palette_0:{colors:{0:{color:"#008000",width:3,style:0},1:{color:"#800000",width:3,style:0}}}},inputs:{in_0:10,in_1:3}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",palette:"palette_0",target:"plot_0",type:"colorer"},{id:"plot_2",type:"shapes"},{id:"plot_3",type:"shapes"}],styles:{plot_0:{title:"SuperTrend",histogramBase:0,joinPoints:!1,isHidden:!1},plot_2:{title:"Up Arrow",histogramBase:0,joinPoints:!1,isHidden:!1},plot_3:{title:"Down Arrow",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"SuperTrend",shortDescription:"SuperTrend",is_price_study:!0,palettes:{palette_0:{colors:{0:{name:"Color 0"},1:{name:"Color 1"}},valToIndex:{0:0,1:1}}},inputs:[{id:"in_0",name:"Length",defval:10,type:"integer",min:1,max:100},{id:"in_1",name:"Factor",defval:3,type:"float",min:1,max:100}],id:"SuperTrend@tv-basicstudies-1",scriptIdPart:"",name:"SuperTrend",isCustomIndicator:!0},constructor:function(){this.f_0=function(){var e,t,i=this._input(0),n=this._input(1),o=s.Std.atr(i,this._context);return i=s.Std.hl2(this._context)+o*n,o=s.Std.hl2(this._context)-o*n,e=this._context.new_var(s.Std.close(this._context)),n=this._context.new_var(),t=s.Std.max(o,n.get(1)),n.set(s.Std.gt(e.get(1),n.get(1))?t:o),o=this._context.new_var(),t=s.Std.min(i,o.get(1)),o.set(s.Std.lt(e.get(1),o.get(1))?t:i),i=this._context.new_var(),e=s.Std.nz(i.get(1),1),e=s.Std.lt(s.Std.close(this._context),n.get(1))?-1:e,i.set(s.Std.gt(s.Std.close(this._context),o.get(1))?1:e),[n=s.Std.eq(i.get(0),1)?n.get(0):o.get(0),s.Std.eq(i.get(0),1)?0:1,1===i.get(0)&&-1===i.get(1),-1===i.get(0)&&1===i.get(1)]},this.main=function(e,t){this._context=e,this._input=t;var i=this.f_0();return[i[0],i[1],i[2],i[3]]}}},n,o,r])},vTIA:function(e,t,i){"use strict";var n,o;i.r(t),i.d(t,"tradingPreferencesDefault",function(){return n}),i.d(t,"CustomSourceLayer",function(){return o}),n={showPositions:!1,showOrders:!1,showExecutions:!1,extendLeft:!1,lineLength:0,lineWidth:0,lineStyle:0},function(e){e[e.Background=0]="Background",e[e.Foreground=1]="Foreground"}(o||(o={}))},vdSZ:function(e,t,i){"use strict";var n,o,r,s,a;i.r(t),i.d(t,"CrosshairDataWindowView",function(){return a}),n=i("mrSG"),o=i("ivNn"),r=i("4miz"),s=window.t("n/a"),a=function(e){function t(t){var i=e.call(this)||this;return i._invalidated=!0,i._dateItem=new r.a(window.t("Date"),""),i._timeItem=new r.a(window.t("Time"),""),i._model=t,i._items.push(i._dateItem),i._items.push(i._timeItem),i}return Object(n.__extends)(t,e),
t.prototype.update=function(){this._invalidated=!0},t.prototype.items=function(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._items},t.prototype._updateImpl=function(){var e,t,i,n=this._model.mainSeries().isDWM();if(this._timeItem.setVisible(!n),this._timeItem.setValue(s),this._dateItem.setValue(s),!this._model.timeScale().isEmpty()){if(e=this._model.crossHairSource().appliedIndex(),!Object(o.isNumber)(e)){if(null===(t=this._model.mainSeries().data().last()))return;e=t.index}null!==(i=this._model.timeScale().indexToUserTime(e))&&(this._dateItem.setValue(this._model.dateFormatter().format(i)),n||this._timeItem.setValue(this._model.timeFormatter().format(i)))}},t}(r.b)},vu5c:function(e,t,i){"use strict";function n(e,t){var i=function(){e.completed().unsubscribe(null,n),t(!1)},n=function(){e.error().unsubscribe(null,i),t(!0)};e.completed().subscribe(null,i,!0),e.error().subscribe(null,n,!0)}i.r(t),i.d(t,"onSeriesCompletedOrErrorReceived",function(){return n})},w4Ji:function(e,t,i){"use strict";function n(e){var t=new Map;return e.plots.forEach(function(e,i){t.set(e.id,function(e){return e[i+1]})}),t}i.r(t),i.d(t,"studyPlotFunctionMap",function(){return n})},wGNx:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"RiskRewardPointIndex",function(){return n}),function(e){e[e.Entry=0]="Entry",e[e.Close=1]="Close",e[e.ActualEntry=2]="ActualEntry",e[e.ActualClose=3]="ActualClose"}(n||(n={}))},wOSo:function(e,t,i){"use strict";var n,o,r,s,a;i.r(t),i.d(t,"QuotesProvider",function(){return a}),n=i("IWXC"),o=i("aIyQ"),r=i.n(o),s=i("0waE"),a=function(){function e(){this._quotes=null,this._quoteSessionSymbol=null,this._quoteSessionClientId="",this._quotesUpdate=new r.a}return e.prototype.setQuotesSessionSymbol=function(e){this._quoteSessionSymbol!==e&&(this._quoteSessionClientId||(this._quoteSessionClientId="series-"+Object(s.guid)()),this._unsubscribeQuoteSession(),e&&(this._quoteSessionSymbol=e,Object(n.getQuoteSessionInstance)("full").subscribe(this._quoteSessionClientId,this._quoteSessionSymbol,this._onUpdate.bind(this))))},e.prototype.quotesUpdate=function(){return this._quotesUpdate},e.prototype.quotes=function(){return this._quotes},e.prototype.destroy=function(){this._unsubscribeQuoteSession()},e.prototype._onUpdate=function(e,t){this._quotes=e&&e.values||null,t&&t.values&&t.values.current_session&&this._quotesUpdate.fire(e,t)},e.prototype._unsubscribeQuoteSession=function(){this._quoteSessionSymbol&&(Object(n.getQuoteSessionInstance)("full").unsubscribe(this._quoteSessionClientId,this._quoteSessionSymbol),this._quoteSessionSymbol=null,this._quotes=null)},e}()},wZIs:function(e,t,i){"use strict";function n(e,t,i,n,o){function r(e){return t&&t[e]?t[e]:e}function s(e,t,i,n){var o=r(t[0]);return!!e.hasOwnProperty(o)&&(t.length>1?s(e[o],t.slice(1),i):(e[o]&&e[o].setValue?e[o].setValue(i):e[o]=i,!0))}function a(e){i||y.logWarn("Path `"+e+"` does not exist.")}var l,c,u,h;if(n)for(l in n)u=r((c=l.split("."))[0]),h=void 0!==o&&o===c[0],0!==c.length&&h&&(u=r((c=c.slice(1))[0])),
0!==c.length&&e.hasOwnProperty(u)?s(e,c,n[l])||a(l):h&&a(l)}function o(e,t,i,o){window.__defaultsOverrides&&n(e,t,i,window.__defaultsOverrides,o)}function r(){var e=/^linetool.+/;Object.keys(TradingView.defaultProperties).forEach(function(t){e.test(t)&&o(TradingView.defaultProperties[t],null,!1,t)})}function s(e,t){return t?function(e,t){var i,n,o,r,s=v(e);window._UNIT_TESTS||(i=TradingView.clone(TVSettings.getJSON(e,null)),e.startsWith("study_")&&i&&function(e){if(!e)return!1;e=e.toString();var t=new RegExp("\\d+").exec(e);return null!==t&&t[0]===e}(i.version)&&(n=i.inputs,o=t.updateStudyInputs(i.id,i.version,"last",n,null),i.inputs=o,r=t.updateStudyState(i,i),i=r),TradingView.merge(s,i));return s}(e,t):function(e){var t,i=v(e);window._UNIT_TESTS||(t=TradingView.clone(TVSettings.getJSON(e,null)))&&TradingView.merge(i,t);return i}(e)}var a=i("dfhE"),l=i("rCHB").LineToolPitchforkStyle,c=i("Ye2/").LineToolBarsPatternMode,u=i("23IT").LineStudyPlotStyle,h=i("8OdW"),d=i("oXaB").PriceAxisLastValueMode,p=i("4o++").MagnetMode,_=i("a7Ha").LineEnd,f=i("bKFv").StatsPosition,m=i("KUek").sessionsPreferencesDefault,y=i("uOxu").getLogger("Chart.Defaults"),g=i("zDbI").CHART_FONT_FAMILY,v=function(e){var t,i,n,s,y,v,S,b,w=function(e,t){return{color:e,visible:t}},P=function(e,t,i){return{coeff:e,color:t,visible:i}},C=function(e,t,i,n,o){return{coeff:e,color:t,visible:i,linestyle:void 0===n?CanvasEx.LINESTYLE_SOLID:n,linewidth:void 0===o?1:o}},T=function(e,t,i){return{color:e,width:i,visible:t}},x=function(e,t,i,n,o){return{color:e,visible:t,width:i,x:n,y:o}},I=function(e,t,i,n,o,r){return{coeff1:e,coeff2:t,color:i,visible:n,linestyle:void 0===o?CanvasEx.LINESTYLE_SOLID:o,linewidth:void 0===r?1:r}};if(void 0===TradingView.defaultProperties){switch(window.locale){case"ar_AE":t="Asia/Dubai";break;case"au":t="Australia/Sydney";break;case"br":t="America/Sao_Paulo";break;case"ca":t="America/Toronto";break;case"de_DE":case"it":t="Europe/Berlin";break;case"es":t="Europe/Madrid";break;case"fa_IR":t="Asia/Tehran";break;case"fr":case"sv_SE":t="Europe/Paris";break;case"he_IL":case"tr":t="Europe/Athens";break;case"hu_HU":case"pl":t="Europe/Warsaw";break;case"id":case"th_TH":case"vi_VN":t="Asia/Bangkok";break;case"in":t="Asia/Kolkata";break;case"ja":case"kr":t="Asia/Tokyo";break;case"ms_MY":t="Asia/Singapore";break;case"ru":t="Europe/Moscow";break;case"uk":t="Europe/London";break;case"zh_CN":case"zh_TW":t="Asia/Shanghai";break;default:t="Etc/UTC"}TradingView.defaultProperties={chartproperties:{timezone:t,priceScaleSelectionStrategyName:"auto",dataWindowProperties:{background:"rgba( 255, 254, 206, 0.2)",border:"rgba( 96, 96, 144, 1)",font:"Verdana",fontBold:!1,fontItalic:!1,fontSize:10,transparency:80,visible:!0},paneProperties:{background:"#ffffff",vertGridProperties:{color:"#e1ecf2",style:CanvasEx.LINESTYLE_SOLID},horzGridProperties:{color:"#e1ecf2",style:CanvasEx.LINESTYLE_SOLID},crossHairProperties:{color:"#758696",style:CanvasEx.LINESTYLE_DASHED,transparency:0,width:1},topMargin:10,bottomMargin:8,axisProperties:{autoScale:!0,
autoScaleDisabled:!1,lockScale:!1,percentage:!1,percentageDisabled:!1,indexedTo100:!1,log:!1,logDisabled:!1,alignLabels:!0,isInverted:!1},legendProperties:{showStudyArguments:!0,showStudyTitles:!0,showStudyValues:!0,showSeriesTitle:!0,showSeriesOHLC:!0,showLegend:!0,showBarChange:!0,showBackground:!0,backgroundTransparency:50,wrapText:!1}},scalesProperties:{backgroundColor:"#ffffff",lineColor:"#50535E",textColor:"#50535E",fontSize:12,scaleSeriesOnly:!1,showSeriesLastValue:!0,seriesLastValueMode:d.LastValueAccordingToScale,showSeriesPrevCloseValue:!1,showStudyLastValue:!1,showSymbolLabels:!1,showStudyPlotLabels:!1,showFundamentalNameLabel:!1,showFundamentalLastValue:!1,barSpacing:h.DEFAULT_BAR_SPACING,showCurrency:!0},mainSeriesProperties:{style:a.STYLE_CANDLES,esdShowDividends:!0,esdShowSplits:!0,esdShowEarnings:!0,esdShowBreaks:!1,esdBreaksStyle:{color:"rgba( 235, 77, 92, 1)",style:CanvasEx.LINESTYLE_DASHED,width:1},esdFlagSize:2,showCountdown:!0,showInDataWindow:!0,visible:!0,showPriceLine:!0,priceLineWidth:1,priceLineColor:"",baseLineColor:"#B2B5BE",showPrevClosePriceLine:!1,prevClosePriceLineWidth:1,prevClosePriceLineColor:"rgba( 85, 85, 85, 1)",minTick:"default",extendedHours:!1,sessVis:!1,statusViewStyle:{fontSize:16,showExchange:!0,showInterval:!0,symbolTextSource:"description"},candleStyle:{upColor:"#26a69a",downColor:"#ef5350",drawWick:!0,drawBorder:!0,borderColor:"#378658",borderUpColor:"#26a69a",borderDownColor:"#ef5350",wickColor:"#737375",wickUpColor:"#26a69a",wickDownColor:"#ef5350",barColorsOnPrevClose:!1},hollowCandleStyle:{upColor:"#26a69a",downColor:"#ef5350",drawWick:!0,drawBorder:!0,borderColor:"rgba( 55, 134, 88, 1)",borderUpColor:"#26a69a",borderDownColor:"#ef5350",wickColor:"rgba( 115, 115, 117, 1)",wickUpColor:"#26a69a",wickDownColor:"#ef5350"},haStyle:{upColor:"#26a69a",downColor:"#ef5350",drawWick:!0,drawBorder:!0,borderColor:"rgba( 55, 134, 88, 1)",borderUpColor:"#26a69a",borderDownColor:"#ef5350",wickColor:"rgba( 115, 115, 117, 1)",wickUpColor:"#26a69a",wickDownColor:"#ef5350",showRealLastPrice:!1,barColorsOnPrevClose:!1,inputs:{},inputInfo:{}},barStyle:{upColor:"#26a69a",downColor:"#ef5350",barColorsOnPrevClose:!1,dontDrawOpen:!1,thinBars:!0},hiloStyle:{color:"#2196f3",showBorders:!0,borderColor:"#2196f3",showLabels:!0,labelColor:"#2196f3",fontSize:7},lineStyle:{color:"#2196f3",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:3,priceSource:"close",styleType:a.STYLE_LINE_TYPE_SIMPLE},areaStyle:{color1:"#2196f3",color2:"#2196f3",linecolor:"#2196f3",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:3,priceSource:"close",transparency:95},priceAxisProperties:{autoScale:!0,autoScaleDisabled:!1,lockScale:!1,percentage:!1,percentageDisabled:!1,indexedTo100:!1,log:!1,logDisabled:!1,isInverted:!1,alignLabels:!0},renkoStyle:{upColor:"#26a69a",downColor:"#ef5350",borderUpColor:"#26a69a",borderDownColor:"#ef5350",upColorProjection:"rgba( 169, 220, 195, 1)",downColorProjection:"rgba( 245, 166, 174, 1)",borderUpColorProjection:"rgba( 169, 220, 195, 1)",borderDownColorProjection:"rgba( 245, 166, 174, 1)",
wickUpColor:"#26a69a",wickDownColor:"#ef5350",inputs:{source:"close",boxSize:3,style:"ATR",atrLength:14,wicks:!0},inputInfo:{source:{name:"Source"},boxSize:{name:"Box size"},style:{name:"Style"},atrLength:{name:"ATR length"},wicks:{name:"Wicks"}}},pbStyle:{upColor:"#26a69a",downColor:"#ef5350",borderUpColor:"#26a69a",borderDownColor:"#ef5350",upColorProjection:"rgba( 169, 220, 195, 1)",downColorProjection:"rgba( 245, 166, 174, 1)",borderUpColorProjection:"rgba( 169, 220, 195, 1)",borderDownColorProjection:"rgba( 245, 166, 174, 1)",inputs:{source:"close",lb:3},inputInfo:{source:{name:"Source"},lb:{name:"Number of line"}}},kagiStyle:{upColor:"#26a69a",downColor:"#ef5350",upColorProjection:"rgba( 169, 220, 195, 1)",downColorProjection:"rgba( 245, 166, 174, 1)",inputs:{source:"close",style:"ATR",atrLength:14,reversalAmount:1},inputInfo:{source:{name:"Source"},style:{name:"Style"},atrLength:{name:"ATR length"},reversalAmount:{name:"Reversal amount"}}},pnfStyle:{upColor:"#26a69a",downColor:"#ef5350",upColorProjection:"rgba( 169, 220, 195, 1)",downColorProjection:"rgba( 245, 166, 174, 1)",inputs:{sources:"Close",reversalAmount:3,boxSize:1,style:"ATR",atrLength:14,oneStepBackBuilding:!1},inputInfo:{sources:{name:"Source"},boxSize:{name:"Box size"},reversalAmount:{name:"Reversal amount"},style:{name:"Style"},atrLength:{name:"ATR length"},oneStepBackBuilding:{name:"One step back building"}}},baselineStyle:{baselineColor:"rgba( 117, 134, 150, 1)",topFillColor1:"rgba( 38, 166, 154, 0.05)",topFillColor2:"rgba( 38, 166, 154, 0.05)",bottomFillColor1:"rgba( 239, 83, 80, 0.05)",bottomFillColor2:"rgba( 239, 83, 80, 0.05)",topLineColor:"rgba( 38, 166, 154, 1)",bottomLineColor:"rgba( 239, 83, 80, 1)",topLineWidth:3,bottomLineWidth:3,priceSource:"close",transparency:50,baseLevelPercentage:50},rangeStyle:{upColor:"#26a69a",downColor:"#ef5350",thinBars:!0,upColorProjection:"rgba( 169, 220, 195, 1)",downColorProjection:"rgba( 245, 166, 174, 1)",inputs:{range:10,phantomBars:!1},inputInfo:{range:{name:"Range"},phantomBars:{name:"Phantom bars"}}}},chartEventsSourceProperties:{visible:!0,futureOnly:!0,breaks:{color:"rgba(85, 85, 85, 1)",visible:!1,style:CanvasEx.LINESTYLE_DASHED,width:1}},tradingProperties:{showPositions:!0,showOrders:!0,showExecutions:!0,extendLeft:!0,lineLength:5,lineWidth:1,lineStyle:CanvasEx.LINESTYLE_DASHED},editorFontsList:["Verdana","Courier New","Times New Roman","Arial"],volumePaneSize:"large"},sessions:m,drawings:{magnet:!1,magnetMode:p.WeakMagnet,stayInDrawingMode:!1,drawOnAllCharts:!0},linetoolorder:{singleChartOnly:!0,extendLeft:"inherit",lineLength:"inherit",lineColor:"rgba( 255, 0, 0, 1)",lineActiveBuyColor:"rgb(64,148,232)",lineInactiveBuyColor:"rgba(64,148,232,.5)",lineActiveSellColor:"rgb(231,86,86)",lineInactiveSellColor:"rgba(231,86,86,.5)",lineStyle:"inherit",lineWidth:"inherit",bodyBorderActiveBuyColor:"rgb(64,148,232)",bodyBorderInactiveBuyColor:"rgba(64,148,232,.5)",bodyBorderActiveSellColor:"rgb(231,86,86)",bodyBorderInactiveSellColor:"rgba(231,86,86,.5)",
bodyBackgroundColor:"rgba( 255, 255, 255, 0.75)",bodyBackgroundTransparency:25,bodyTextInactiveLimitColor:"rgba(38,140,2,.5)",bodyTextActiveLimitColor:"rgb(38,140,2)",bodyTextInactiveStopColor:"rgba(231,86,86,.5)",bodyTextActiveStopColor:"rgb(231,86,86)",bodyTextInactiveBuyColor:"rgba(64,148,232,.5)",bodyTextActiveBuyColor:"rgb(64,148,232)",bodyTextInactiveSellColor:"rgba(231,86,86,.5)",bodyTextActiveSellColor:"rgb(231,86,86)",bodyFontFamily:"Verdana",bodyFontSize:9,bodyFontBold:!0,bodyFontItalic:!1,quantityBorderActiveBuyColor:"rgb(64,148,232)",quantityBorderInactiveBuyColor:"rgba(64,148,232,.5)",quantityBorderActiveSellColor:"rgb(231,86,86)",quantityBorderInactiveSellColor:"rgba(231,86,86,.5)",quantityBackgroundInactiveBuyColor:"rgba(64,148,232,.5)",quantityBackgroundActiveBuyColor:"rgb(64,148,232)",quantityBackgroundInactiveSellColor:"rgba(231,86,86,.5)",quantityBackgroundActiveSellColor:"rgb(231,86,86)",quantityTextColor:"rgba( 255, 255, 255, 1)",quantityTextTransparency:0,quantityFontFamily:"Verdana",quantityFontSize:9,quantityFontBold:!0,quantityFontItalic:!1,cancelButtonBorderActiveBuyColor:"rgb(64,148,232)",cancelButtonBorderInactiveBuyColor:"rgba(64,148,232,.5)",cancelButtonBorderActiveSellColor:"rgb(231,86,86)",cancelButtonBorderInactiveSellColor:"rgba(231,86,86,.5)",cancelButtonBackgroundColor:"rgba( 255, 255, 255, 0.75)",cancelButtonBackgroundTransparency:25,cancelButtonIconActiveBuyColor:"rgb(64,148,232)",cancelButtonIconInactiveBuyColor:"rgba(64,148,232,.5)",cancelButtonIconActiveSellColor:"rgb(231,86,86)",cancelButtonIconInactiveSellColor:"rgba(231,86,86,.5)",tooltip:"",modifyTooltip:"",cancelTooltip:""},linetoolposition:{singleChartOnly:!0,extendLeft:"inherit",lineLength:"inherit",lineBuyColor:"rgb(64,148,232)",lineSellColor:"rgb(231,86,86)",lineStyle:"inherit",lineWidth:"inherit",bodyBorderBuyColor:"rgb(64,148,232)",bodyBorderSellColor:"rgb(231,86,86)",bodyBackgroundColor:"rgba( 255, 255, 255, 0.75)",bodyBackgroundTransparency:25,bodyTextPositiveColor:"rgb(38,140,2)",bodyTextNeutralColor:"rgb(100,100,100)",bodyTextNegativeColor:"rgb(231,86,86)",bodyFontFamily:"Verdana",bodyFontSize:9,bodyFontBold:!0,bodyFontItalic:!1,quantityBorderBuyColor:"rgb(64,148,232)",quantityBorderSellColor:"rgb(231,86,86)",quantityBackgroundBuyColor:"rgb(64,148,232)",quantityBackgroundSellColor:"rgb(231,86,86)",quantityTextColor:"rgba( 255, 255, 255, 1)",quantityTextTransparency:0,quantityFontFamily:"Verdana",quantityFontSize:9,quantityFontBold:!0,quantityFontItalic:!1,reverseButtonBorderBuyColor:"rgb(64,148,232)",reverseButtonBorderSellColor:"rgb(231,86,86)",reverseButtonBackgroundColor:"rgba( 255, 255, 255, 0.75)",reverseButtonBackgroundTransparency:25,reverseButtonIconBuyColor:"rgb(64,148,232)",reverseButtonIconSellColor:"rgb(231,86,86)",closeButtonBorderBuyColor:"rgb(64,148,232)",closeButtonBorderSellColor:"rgb(231,86,86)",closeButtonBackgroundColor:"rgba( 255, 255, 255, 0.75)",closeButtonBackgroundTransparency:25,closeButtonIconBuyColor:"rgb(64,148,232)",closeButtonIconSellColor:"rgb(231,86,86)",tooltip:"",
protectTooltip:"",closeTooltip:"",reverseTooltip:""},linetoolexecution:{singleChartOnly:!0,direction:"buy",arrowHeight:8,arrowSpacing:1,arrowBuyColor:"#4094e8",arrowSellColor:"#e75656",text:"",textColor:"rgba( 0, 0, 0, 1)",textTransparency:0,fontFamily:"Verdana",fontSize:10,fontBold:!1,fontItalic:!1,tooltip:""},linetoolicon:{singleChartOnly:!0,color:"rgba( 61, 133, 198, 1)",size:40,icon:61536,angle:.5*Math.PI,scale:1},linetoolbezierquadro:{linecolor:"rgba( 21, 153, 128, 1)",linewidth:1,fillBackground:!1,backgroundColor:"rgba( 21, 56, 153, 0.5)",transparency:50,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!1,leftEnd:_.Normal,rightEnd:_.Normal},linetoolbeziercubic:{linecolor:"rgba( 21, 153, 128, 1)",linewidth:1,fillBackground:!1,backgroundColor:"rgba( 21, 56, 153, 0.5)",transparency:50,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!1,leftEnd:_.Normal,rightEnd:_.Normal},linetooltrendline:{linecolor:"rgba( 21, 153, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!1,leftEnd:_.Normal,rightEnd:_.Normal,font:"Verdana",textcolor:"rgba( 21, 119, 96, 1)",fontsize:12,bold:!1,italic:!1,snapTo45Degrees:!0,alwaysShowStats:!1,showMiddlePoint:!1,showPriceRange:!1,showBarsRange:!1,showDateTimeRange:!1,showDistance:!1,showAngle:!1,statsPosition:f.Right},linetoolinfoline:{linecolor:"rgba( 21, 153, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!1,leftEnd:_.Normal,rightEnd:_.Normal,font:"Verdana",textcolor:"rgba( 21, 119, 96, 1)",fontsize:12,bold:!1,italic:!1,snapTo45Degrees:!0,alwaysShowStats:!0,showMiddlePoint:!1,showPriceRange:!0,showBarsRange:!0,showDateTimeRange:!0,showDistance:!0,showAngle:!0,statsPosition:f.Center},linetooltimecycles:{linecolor:"rgba(21, 153, 128, 1)",linewidth:1,fillBackground:!0,backgroundColor:"rgba(106, 168, 79, 0.5)",transparency:50,linestyle:CanvasEx.LINESTYLE_SOLID},linetoolsineline:{linecolor:"rgba( 21, 153, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},linetooltrendangle:{singleChartOnly:!0,linecolor:"rgba( 21, 153, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,snapTo45Degrees:!0,font:"Verdana",textcolor:"rgba( 21, 119, 96, 1)",fontsize:12,bold:!0,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceRange:!1,showBarsRange:!1,extendRight:!1,extendLeft:!1,statsPosition:f.Right},linetooldisjointangle:{linecolor:"rgba( 18, 159, 92, 1)",linewidth:2,linestyle:CanvasEx.LINESTYLE_SOLID,fillBackground:!0,backgroundColor:"rgba( 106, 168, 79, 0.5)",transparency:50,extendLeft:!1,extendRight:!1,leftEnd:_.Normal,rightEnd:_.Normal,font:"Verdana",textcolor:"rgba( 18, 159, 92, 1)",fontsize:12,bold:!1,italic:!1,showPrices:!1,showPriceRange:!1,showDateTimeRange:!1,showBarsRange:!1},linetoolflatbottom:{linecolor:"rgba( 73, 133, 231, 1)",linewidth:2,linestyle:CanvasEx.LINESTYLE_SOLID,fillBackground:!0,backgroundColor:"rgba( 21, 56, 153, 0.5)",transparency:50,extendLeft:!1,extendRight:!1,leftEnd:_.Normal,rightEnd:_.Normal,font:"Verdana",textcolor:"rgba( 73, 133, 231, 1)",fontsize:12,bold:!1,italic:!1,
showPrices:!1,showPriceRange:!1,showDateTimeRange:!1,showBarsRange:!1},linetoolfibspiral:{counterclockwise:!1,linecolor:"rgba( 21, 153, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},linetooldaterange:{linecolor:"rgba(30,136,229,1)",linewidth:2,font:g,textcolor:"rgba( 255, 255, 255, 1)",fontsize:12,fillLabelBackground:!0,labelBackgroundColor:"rgba(30,136,229,0.9)",fillBackground:!0,backgroundColor:"rgba(30,136,229,0.2)",backgroundTransparency:60,drawBorder:!1,borderColor:"rgba(30,136,229,0.9)",extendTop:!1,extendBottom:!1},linetoolpricerange:{linecolor:"rgba(30,136,229,1)",linewidth:2,font:g,textcolor:"rgba( 255, 255, 255, 1)",fontsize:12,fillLabelBackground:!0,labelBackgroundColor:"rgba(30,136,229,0.9)",fillBackground:!0,backgroundColor:"rgba(30,136,229,0.2)",backgroundTransparency:60,drawBorder:!1,borderColor:"rgba(30,136,229,0.9)",extendLeft:!1,extendRight:!1},linetooldateandpricerange:{linecolor:"rgba(30,136,229,1)",linewidth:2,font:g,textcolor:"rgba( 255, 255, 255, 1)",fontsize:12,fillLabelBackground:!0,labelBackgroundColor:"rgba(30,136,229,0.9)",fillBackground:!0,backgroundColor:"rgba(30,136,229,0.2)",backgroundTransparency:60,drawBorder:!1,borderColor:"rgba(30,136,229,0.9)"},linetoolriskrewardshort:{linecolor:"rgba( 88, 88, 88, 1)",linewidth:1,font:"Verdana",textcolor:"rgba(255, 255, 255, 1)",fontsize:12,fillLabelBackground:!0,labelBackgroundColor:"rgba( 88, 88, 88, 1)",fillBackground:!0,stopBackground:"rgba( 255, 0, 0, 0.2)",profitBackground:"rgba( 0, 160, 0, 0.2)",stopBackgroundTransparency:80,profitBackgroundTransparency:80,drawBorder:!1,borderColor:"rgba( 102, 123, 139, 1)",compact:!1,riskDisplayMode:"percents",accountSize:1e3,risk:25,alwaysShowStats:!1},linetoolriskrewardlong:{linecolor:"rgba( 88, 88, 88, 1)",linewidth:1,font:"Verdana",textcolor:"rgba(255, 255, 255, 1)",fontsize:12,fillLabelBackground:!0,labelBackgroundColor:"rgba( 88, 88, 88, 1)",fillBackground:!0,stopBackground:"rgba( 255, 0, 0, 0.2)",profitBackground:"rgba( 0, 160, 0, 0.2)",stopBackgroundTransparency:80,profitBackgroundTransparency:80,drawBorder:!1,borderColor:"rgba( 102, 123, 139, 1)",compact:!1,riskDisplayMode:"percents",accountSize:1e3,risk:25,alwaysShowStats:!1},linetoolarrow:{linecolor:"rgba( 111, 136, 198, 1)",linewidth:2,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!1,leftEnd:_.Normal,rightEnd:_.Arrow,font:"Verdana",textcolor:"rgba( 21, 119, 96, 1)",fontsize:12,bold:!1,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceRange:!1,showBarsRange:!1,showDateTimeRange:!1,showDistance:!1,showAngle:!1,statsPosition:f.Right},linetoolray:{linecolor:"rgba( 21, 153, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!0,leftEnd:_.Normal,rightEnd:_.Normal,font:"Verdana",textcolor:"rgba( 21, 119, 96, 1)",fontsize:12,bold:!1,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceRange:!1,showBarsRange:!1,showDateTimeRange:!1,showDistance:!1,showAngle:!1,statsPosition:f.Right},linetoolextended:{linecolor:"rgba( 21, 153, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,
extendLeft:!0,extendRight:!0,leftEnd:_.Normal,rightEnd:_.Normal,font:"Verdana",textcolor:"rgba( 21, 119, 96, 1)",fontsize:12,bold:!1,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceRange:!1,showBarsRange:!1,showDateTimeRange:!1,showDistance:!1,showAngle:!1,statsPosition:f.Right},linetoolhorzline:{linecolor:"rgba( 128, 204, 219, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,showPrice:!0,showLabel:!1,font:"Verdana",textcolor:"rgba( 21, 119, 96, 1)",fontsize:12,bold:!1,italic:!1,horzLabelsAlign:"center",vertLabelsAlign:"top"},linetoolhorzray:{linecolor:"rgba( 128, 204, 219, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,showPrice:!0,showLabel:!1,font:"Verdana",textcolor:"rgba( 21, 119, 96, 1)",fontsize:12,bold:!1,italic:!1,horzLabelsAlign:"center",vertLabelsAlign:"top"},linetoolvertline:{linecolor:"rgba( 128, 204, 219, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,showTime:!0},linetoolcrossline:{linecolor:"rgba(6, 160, 227, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,showPrice:!0,showTime:!0},linetoolcirclelines:{trendline:{visible:!0,color:"rgba( 128, 128, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED},linecolor:"rgba( 128, 204, 219, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},linetoolfibtimezone:{horzLabelsAlign:"right",vertLabelsAlign:"bottom",baselinecolor:"rgba( 128, 128, 128, 1)",linecolor:"rgba( 0, 85, 219, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,showLabels:!0,font:g,fillBackground:!1,transparency:80,trendline:{visible:!0,color:"rgba( 128, 128, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED},level1:C(0,"rgba( 128, 128, 128, 1)",!0),level2:C(1,"rgba( 0, 85, 219, 1)",!0),level3:C(2,"rgba( 0, 85, 219, 1)",!0),level4:C(3,"rgba( 0, 85, 219, 1)",!0),level5:C(5,"rgba( 0, 85, 219, 1)",!0),level6:C(8,"rgba( 0, 85, 219, 1)",!0),level7:C(13,"rgba( 0, 85, 219, 1)",!0),level8:C(21,"rgba( 0, 85, 219, 1)",!0),level9:C(34,"rgba( 0, 85, 219, 1)",!0),level10:C(55,"rgba( 0, 85, 219, 1)",!0),level11:C(89,"rgba( 0, 85, 219, 1)",!0),__collectibleLines:["trendline","level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11"]},linetooltext:{color:"rgba( 102, 123, 139, 1)",font:"Verdana",fontsize:20,fillBackground:!1,backgroundColor:"rgba( 91, 133, 191, 0.9)",backgroundTransparency:70,drawBorder:!1,borderColor:"rgba( 102, 123, 139, 1)",bold:!1,italic:!1,fixedSize:!0,wordWrap:!1,wordWrapWidth:400},linetooltextabsolute:{singleChartOnly:!0,color:"rgba( 102, 123, 139, 1)",font:"Verdana",fontsize:20,fillBackground:!1,backgroundColor:"rgba( 155, 190, 213, 0.3)",backgroundTransparency:70,drawBorder:!1,borderColor:"rgba( 102, 123, 139, 1)",bold:!1,italic:!1,wordWrap:!1,wordWrapWidth:400},linetoolballoon:{color:"rgba( 102, 123, 139, 1)",backgroundColor:"rgba( 255, 254, 206, 0.7)",borderColor:"rgba( 140, 140, 140, 1)",fontWeight:"bold",fontsize:12,font:"Arial",transparency:30},linetoolbrush:{linecolor:"rgba( 53, 53, 53, 1)",linewidth:2,linestyle:CanvasEx.LINESTYLE_SOLID,smooth:5,fillBackground:!1,backgroundColor:"rgba( 21, 56, 153, 0.5)",
transparency:50,leftEnd:_.Normal,rightEnd:_.Normal},linetoolpolyline:{linecolor:"rgba( 53, 53, 53, 1)",linewidth:2,linestyle:CanvasEx.LINESTYLE_SOLID,fillBackground:!0,backgroundColor:"rgba( 21, 56, 153, 0.5)",transparency:50,filled:!1},linetoolarrowmark:{color:"rgba( 120, 120, 120, 1)",fontsize:20,font:"Verdana"},linetoolarrowmarkleft:{color:"rgba( 120, 120, 120, 1)",fontsize:20,font:"Verdana"},linetoolarrowmarkup:{color:"rgba( 120, 120, 120, 1)",fontsize:20,font:"Verdana"},linetoolarrowmarkright:{color:"rgba( 120, 120, 120, 1)",fontsize:20,font:"Verdana"},linetoolarrowmarkdown:{color:"rgba( 120, 120, 120, 1)",fontsize:20,font:"Verdana"},linetoolflagmark:{color:"rgba( 255, 0, 0, 1)"},linetoolnote:{markerColor:"rgba( 46, 102, 255, 1)",textColor:"rgba( 0, 0, 0, 1)",backgroundColor:"rgba( 255, 255, 255, 1)",backgroundTransparency:0,font:"Arial",fontSize:12,bold:!1,italic:!1,fixedSize:!0},linetoolnoteabsolute:{singleChartOnly:!0,markerColor:"rgba( 46, 102, 255, 1)",textColor:"rgba( 0, 0, 0, 1)",backgroundColor:"rgba( 255, 255, 255, 1)",backgroundTransparency:0,font:"Arial",fontSize:12,bold:!1,italic:!1,fixedSize:!0},linetoolpricelabel:{color:"rgba( 102, 123, 139, 1)",backgroundColor:"rgba( 255, 255, 255, 0.7)",borderColor:"rgba( 140, 140, 140, 1)",fontWeight:"bold",fontsize:11,font:g,transparency:30},linetoolrectangle:{color:"rgba( 21, 56, 153, 1)",fillBackground:!0,backgroundColor:"rgba( 21, 56, 153, 0.5)",linewidth:1,snapTo45Degrees:!0,transparency:50},linetoolrotatedrectangle:{color:"rgba( 152, 0, 255, 1)",fillBackground:!0,backgroundColor:"rgba( 142, 124, 195, 0.5)",transparency:50,linewidth:1,snapTo45Degrees:!0},linetoolellipse:{color:"rgba( 153, 153, 21, 1)",fillBackground:!0,backgroundColor:"rgba( 153, 153, 21, 0.5)",transparency:50,linewidth:1},linetoolarc:{color:"rgba( 153, 153, 21, 1)",fillBackground:!0,backgroundColor:"rgba( 153, 153, 21, 0.5)",transparency:50,linewidth:1},linetoolprediction:{singleChartOnly:!0,linecolor:"rgba( 28, 115, 219, 1)",linewidth:2,sourceBackColor:"rgba( 241, 241, 241, 1)",sourceTextColor:"rgba( 110, 110, 110, 1)",sourceStrokeColor:"rgba( 110, 110, 110, 1)",targetStrokeColor:"rgba( 47, 168, 255, 1)",targetBackColor:"rgba( 11, 111, 222, 1)",targetTextColor:"rgba( 255, 255, 255, 1)",successBackground:"rgba( 54, 160, 42, 0.9)",successTextColor:"rgba( 255, 255, 255, 1)",failureBackground:"rgba( 231, 69, 69, 0.5)",failureTextColor:"rgba( 255, 255, 255, 1)",intermediateBackColor:"rgba( 234, 210, 137, 1)",intermediateTextColor:"rgba( 109, 77, 34, 1)",transparency:10,centersColor:"rgba( 32, 32, 32, 1)"},linetooltriangle:{color:"rgba( 153, 21, 21, 1)",fillBackground:!0,backgroundColor:"rgba( 153, 21, 21, 0.5)",transparency:50,linewidth:1},linetoolcallout:{color:"rgba( 255, 255, 255, 1)",backgroundColor:"rgba( 153, 21, 21, 0.5)",transparency:50,linewidth:2,fontsize:12,font:"Verdana",bordercolor:"rgba( 153, 21, 21, 1)",bold:!1,italic:!1,wordWrap:!1,wordWrapWidth:400},linetoolparallelchannel:{linecolor:"rgba( 119, 52, 153, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,
extendRight:!1,fillBackground:!0,backgroundColor:"rgba( 180, 167, 214, 0.5)",transparency:50,showMidline:!1,midlinecolor:"rgba( 119, 52, 153, 1)",midlinewidth:1,midlinestyle:CanvasEx.LINESTYLE_DASHED},linetoolelliottimpulse:{degree:7,showWave:!0,color:"rgba( 61, 133, 198, 1)",linewidth:1},linetoolelliotttriangle:{degree:7,showWave:!0,color:"rgba( 255, 152, 0, 1)",linewidth:1},linetoolelliotttriplecombo:{degree:7,showWave:!0,color:"rgba( 106, 168, 79, 1)",linewidth:1},linetoolelliottcorrection:{degree:7,showWave:!0,color:"rgba( 61, 133, 198, 1)",linewidth:1},linetoolelliottdoublecombo:{degree:7,showWave:!0,color:"rgba( 106, 168, 79, 1)",linewidth:1},linetoolbarspattern:{singleChartOnly:!0,color:"rgba( 80, 145, 204, 1)",mode:c.Bars,mirrored:!1,flipped:!1},linetoolghostfeed:{singleChartOnly:!0,averageHL:20,variance:50,candleStyle:{upColor:"#6ba583",downColor:"#d75442",drawWick:!0,drawBorder:!0,borderColor:"#378658",borderUpColor:"#225437",borderDownColor:"#5b1a13",wickColor:"#737375"},transparency:50},study:{inputs:{},styles:{},palettes:{},bands:{},area:{},graphics:{},showInDataWindow:!0,visible:!0,showStudyArguments:!0,precision:"default"},linetoolpitchfork:{fillBackground:!0,transparency:80,style:l.Original,median:{visible:!0,color:"rgba( 165, 0, 0, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level0:C(.25,"rgba( 160, 107, 0, 1)",!1),level1:C(.382,"rgba( 105, 158, 0, 1)",!1),level2:C(.5,"rgba( 0, 155, 0, 1)",!0),level3:C(.618,"rgba( 0, 153, 101, 1)",!1),level4:C(.75,"rgba( 0, 101, 153, 1)",!1),level5:C(1,"rgba( 0, 0, 153, 1)",!0),level6:C(1.5,"rgba( 102, 0, 153, 1)",!1),level7:C(1.75,"rgba( 153, 0, 102, 1)",!1),level8:C(2,"rgba( 165, 0, 0, 1)",!1),__collectibleLines:["median","level0","level1","level2","level3","level4","level5","level6","level7","level8"]},linetoolpitchfan:{fillBackground:!0,transparency:80,median:{visible:!0,color:"rgba( 165, 0, 0, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level0:C(.25,"rgba( 160, 107, 0, 1)",!1),level1:C(.382,"rgba( 105, 158, 0, 1)",!1),level2:C(.5,"rgba( 0, 155, 0, 1)",!0),level3:C(.618,"rgba( 0, 153, 101, 1)",!1),level4:C(.75,"rgba( 0, 101, 153, 1)",!1),level5:C(1,"rgba( 0, 0, 153, 1)",!0),level6:C(1.5,"rgba( 102, 0, 153, 1)",!1),level7:C(1.75,"rgba( 153, 0, 102, 1)",!1),level8:C(2,"rgba( 165, 0, 0, 1)",!1),__collectibleLines:["median","level0","level1","level2","level3","level4","level5","level6","level7","level8"]},linetoolgannfan:{showLabels:!0,font:"Verdana",fillBackground:!0,transparency:80,level1:I(1,8,"rgba( 160, 107, 0, 1)",!0),level2:I(1,4,"rgba( 105, 158, 0, 1)",!0),level3:I(1,3,"rgba( 0, 155, 0, 1)",!0),level4:I(1,2,"rgba( 0, 153, 101, 1)",!0),level5:I(1,1,"rgba( 128, 128, 128, 1)",!0),level6:I(2,1,"rgba( 0, 101, 153, 1)",!0),level7:I(3,1,"rgba( 0, 0, 153, 1)",!0),level8:I(4,1,"rgba( 102, 0, 153, 1)",!0),level9:I(8,1,"rgba( 165, 0, 0, 1)",!0),__collectibleLines:["level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11"]},linetoolganncomplex:{fillBackground:!1,arcsBackground:{fillBackground:!0,transparency:80},
reverse:!1,scaleRatio:"",showLabels:!0,labelsStyle:{font:g,fontSize:12,bold:!1,italic:!1},levels:[T("rgba( 128, 128, 128, 1)",!0,1),T("rgba( 160, 107, 0, 1)",!0,1),T("rgba( 105, 158, 0, 1)",!0,1),T("rgba( 0, 155, 0, 1)",!0,1),T("rgba( 0, 153, 101, 1)",!0,1),T("rgba( 128, 128, 128, 1)",!0,1)],fanlines:[x("rgba( 165, 0, 255, 1)",!1,1,8,1),x("rgba( 165, 0, 0, 1)",!1,1,5,1),x("rgba( 128, 128, 128, 1)",!1,1,4,1),x("rgba( 160, 107, 0, 1)",!1,1,3,1),x("rgba( 105, 158, 0, 1)",!0,1,2,1),x("rgba( 0, 155, 0, 1)",!0,1,1,1),x("rgba( 0, 153, 101, 1)",!0,1,1,2),x("rgba( 0, 153, 101, 1)",!1,1,1,3),x("rgba( 0, 0, 153, 1)",!1,1,1,4),x("rgba( 102, 0, 153, 1)",!1,1,1,5),x("rgba( 165, 0, 255, 1)",!1,1,1,8)],arcs:[x("rgba( 160, 107, 0, 1)",!0,1,1,0),x("rgba( 160, 107, 0, 1)",!0,1,1,1),x("rgba( 160, 107, 0, 1)",!0,1,1.5,0),x("rgba( 105, 158, 0, 1)",!0,1,2,0),x("rgba( 105, 158, 0, 1)",!0,1,2,1),x("rgba( 0, 155, 0, 1)",!0,1,3,0),x("rgba( 0, 155, 0, 1)",!0,1,3,1),x("rgba( 0, 153, 101, 1)",!0,1,4,0),x("rgba( 0, 153, 101, 1)",!0,1,4,1),x("rgba( 0, 0, 153, 1)",!0,1,5,0),x("rgba( 0, 0, 153, 1)",!0,1,5,1)],__collectibleLines:["trendline","levels.0","levels.1","levels.2","levels.3","levels.4","levels.5","fanlines.0","fanlines.1","fanlines.2","fanlines.3","fanlines.4","fanlines.5","fanlines.6","fanlines.7","fanlines.8","fanlines.9","fanlines.10","arcs.0","arcs.1","arcs.2","arcs.3","arcs.4","arcs.5","arcs.6","arcs.7","arcs.8","arcs.9","arcs.10"]},linetoolgannfixed:{fillBackground:!1,arcsBackground:{fillBackground:!0,transparency:80},reverse:!1,levels:[T("rgba( 128, 128, 128, 1)",!0,1),T("rgba( 160, 107, 0, 1)",!0,1),T("rgba( 105, 158, 0, 1)",!0,1),T("rgba( 0, 155, 0, 1)",!0,1),T("rgba( 0, 153, 101, 1)",!0,1),T("rgba( 128, 128, 128, 1)",!0,1)],fanlines:[x("rgba( 165, 0, 255, 1)",!1,1,8,1),x("rgba( 165, 0, 0, 1)",!1,1,5,1),x("rgba( 128, 128, 128, 1)",!1,1,4,1),x("rgba( 160, 107, 0, 1)",!1,1,3,1),x("rgba( 105, 158, 0, 1)",!0,1,2,1),x("rgba( 0, 155, 0, 1)",!0,1,1,1),x("rgba( 0, 153, 101, 1)",!0,1,1,2),x("rgba( 0, 153, 101, 1)",!1,1,1,3),x("rgba( 0, 0, 153, 1)",!1,1,1,4),x("rgba( 102, 0, 153, 1)",!1,1,1,5),x("rgba( 165, 0, 255, 1)",!1,1,1,8)],arcs:[x("rgba( 160, 107, 0, 1)",!0,1,1,0),x("rgba( 160, 107, 0, 1)",!0,1,1,1),x("rgba( 160, 107, 0, 1)",!0,1,1.5,0),x("rgba( 105, 158, 0, 1)",!0,1,2,0),x("rgba( 105, 158, 0, 1)",!0,1,2,1),x("rgba( 0, 155, 0, 1)",!0,1,3,0),x("rgba( 0, 155, 0, 1)",!0,1,3,1),x("rgba( 0, 153, 101, 1)",!0,1,4,0),x("rgba( 0, 153, 101, 1)",!0,1,4,1),x("rgba( 0, 0, 153, 1)",!0,1,5,0),x("rgba( 0, 0, 153, 1)",!0,1,5,1)],__collectibleLines:["trendline","levels.0","levels.1","levels.2","levels.3","levels.4","levels.5","fanlines.0","fanlines.1","fanlines.2","fanlines.3","fanlines.4","fanlines.5","fanlines.6","fanlines.7","fanlines.8","fanlines.9","fanlines.10","arcs.0","arcs.1","arcs.2","arcs.3","arcs.4","arcs.5","arcs.6","arcs.7","arcs.8","arcs.9","arcs.10"]},linetoolgannsquare:{color:"rgba( 21, 56, 153, 0.8)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,font:g,showTopLabels:!0,showBottomLabels:!0,showLeftLabels:!0,showRightLabels:!0,
fillHorzBackground:!0,horzTransparency:80,fillVertBackground:!0,vertTransparency:80,reverse:!1,fans:w("rgba( 128, 128, 128, 1)",!1),hlevel1:P(0,"rgba( 128, 128, 128, 1)",!0),hlevel2:P(.25,"rgba( 160, 107, 0, 1)",!0),hlevel3:P(.382,"rgba( 105, 158, 0, 1)",!0),hlevel4:P(.5,"rgba( 0, 155, 0, 1)",!0),hlevel5:P(.618,"rgba( 0, 153, 101, 1)",!0),hlevel6:P(.75,"rgba( 0, 101, 153, 1)",!0),hlevel7:P(1,"rgba( 128, 128, 128, 1)",!0),vlevel1:P(0,"rgba( 128, 128, 128, 1)",!0),vlevel2:P(.25,"rgba( 160, 107, 0, 1)",!0),vlevel3:P(.382,"rgba( 105, 158, 0, 1)",!0),vlevel4:P(.5,"rgba( 0, 155, 0, 1)",!0),vlevel5:P(.618,"rgba( 0, 153, 101, 1)",!0),vlevel6:P(.75,"rgba( 0, 101, 153, 1)",!0),vlevel7:P(1,"rgba( 128, 128, 128, 1)",!0),__collectibleLines:["fans","hlevel1","hlevel2","hlevel3","hlevel4","hlevel5","hlevel6","hlevel7","vlevel1","vlevel2","vlevel3","vlevel4","vlevel5","vlevel6","vlevel7"]},linetoolfibspeedresistancefan:{fillBackground:!0,transparency:80,grid:{color:"rgba( 128, 128, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,visible:!0},linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,font:g,showTopLabels:!0,showBottomLabels:!0,showLeftLabels:!0,showRightLabels:!0,snapTo45Degrees:!0,hlevel1:P(0,"rgba( 128, 128, 128, 1)",!0),hlevel2:P(.25,"rgba( 160, 107, 0, 1)",!0),hlevel3:P(.382,"rgba( 105, 158, 0, 1)",!0),hlevel4:P(.5,"rgba( 0, 155, 0, 1)",!0),hlevel5:P(.618,"rgba( 0, 153, 101, 1)",!0),hlevel6:P(.75,"rgba( 0, 101, 153, 1)",!0),hlevel7:P(1,"rgba( 128, 128, 128, 1)",!0),vlevel1:P(0,"rgba( 128, 128, 128, 1)",!0),vlevel2:P(.25,"rgba( 160, 107, 0, 1)",!0),vlevel3:P(.382,"rgba( 105, 158, 0, 1)",!0),vlevel4:P(.5,"rgba( 0, 155, 0, 1)",!0),vlevel5:P(.618,"rgba( 0, 153, 101, 1)",!0),vlevel6:P(.75,"rgba( 0, 101, 153, 1)",!0),vlevel7:P(1,"rgba( 128, 128, 128, 1)",!0),__collectibleLines:["trendline","hlevel1","hlevel2","hlevel3","hlevel4","hlevel5","hlevel6","hlevel7","vlevel1","vlevel2","vlevel3","vlevel4","vlevel5","vlevel6","vlevel7"]},linetoolfibretracement:{showCoeffs:!0,showPrices:!0,font:g,fillBackground:!0,transparency:80,extendLines:!1,horzLabelsAlign:"left",vertLabelsAlign:"middle",reverse:!1,coeffsAsPercents:!1,fibLevelsBasedOnLogScale:!1,trendline:{visible:!0,color:"rgba( 128, 128, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED},levelsStyle:{linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level1:P(0,"rgba( 128, 128, 128, 1)",!0),level2:P(.236,"rgba( 204, 40, 40, 1)",!0),level3:P(.382,"rgba( 149, 204, 40, 1)",!0),level4:P(.5,"rgba( 40, 204, 40, 1)",!0),level5:P(.618,"rgba( 40, 204, 149, 1)",!0),level6:P(.786,"rgba( 40, 149, 204, 1)",!0),level7:P(1,"rgba( 128, 128, 128, 1)",!0),level8:P(1.618,"rgba( 40, 40, 204, 1)",!0),level9:P(2.618,"rgba( 204, 40, 40, 1)",!0),level10:P(3.618,"rgba( 149, 40, 204, 1)",!0),level11:P(4.236,"rgba( 204, 40, 149, 1)",!0),level12:P(1.272,"rgba( 149, 204, 40, 1)",!1),level13:P(1.414,"rgba( 204, 40, 40, 1)",!1),level16:P(2,"rgba( 40, 204, 149, 1)",!1),level14:P(2.272,"rgba( 149, 204, 40, 1)",!1),level15:P(2.414,"rgba( 40, 204, 40, 1)",!1),level17:P(3,"rgba( 40, 149, 204, 1)",!1),
level18:P(3.272,"rgba( 128, 128, 128, 1)",!1),level19:P(3.414,"rgba( 40, 40, 204, 1)",!1),level20:P(4,"rgba( 204, 40, 40, 1)",!1),level21:P(4.272,"rgba( 149, 40, 204, 1)",!1),level22:P(4.414,"rgba( 204, 40, 149, 1)",!1),level23:P(4.618,"rgba( 149, 204, 40, 1)",!1),level24:P(4.764,"rgba( 40, 204, 149, 1)",!1),__collectibleLines:["trendline","level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11","level12","level13","level14","level15","level16","level17","level18","level19","level20","level21","level22","level23","level24"]},linetoolfibchannel:{showCoeffs:!0,showPrices:!0,font:g,fillBackground:!0,transparency:80,extendLeft:!1,extendRight:!1,horzLabelsAlign:"left",vertLabelsAlign:"middle",coeffsAsPercents:!1,levelsStyle:{linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level1:P(0,"rgba( 128, 128, 128, 1)",!0),level2:P(.236,"rgba( 204, 40, 40, 1)",!0),level3:P(.382,"rgba( 149, 204, 40, 1)",!0),level4:P(.5,"rgba( 40, 204, 40, 1)",!0),level5:P(.618,"rgba( 40, 204, 149, 1)",!0),level6:P(.786,"rgba( 40, 149, 204, 1)",!0),level7:P(1,"rgba( 128, 128, 128, 1)",!0),level8:P(1.618,"rgba( 40, 40, 204, 1)",!0),level9:P(2.618,"rgba( 204, 40, 40, 1)",!0),level10:P(3.618,"rgba( 149, 40, 204, 1)",!0),level11:P(4.236,"rgba( 204, 40, 149, 1)",!0),level12:P(1.272,"rgba( 149, 204, 40, 1)",!1),level13:P(1.414,"rgba( 204, 40, 40, 1)",!1),level16:P(2,"rgba( 40, 204, 149, 1)",!1),level14:P(2.272,"rgba( 149, 204, 40, 1)",!1),level15:P(2.414,"rgba( 40, 204, 40, 1)",!1),level17:P(3,"rgba( 40, 149, 204, 1)",!1),level18:P(3.272,"rgba( 128, 128, 128, 1)",!1),level19:P(3.414,"rgba( 40, 40, 204, 1)",!1),level20:P(4,"rgba( 204, 40, 40, 1)",!1),level21:P(4.272,"rgba( 149, 40, 204, 1)",!1),level22:P(4.414,"rgba( 204, 40, 149, 1)",!1),level23:P(4.618,"rgba( 149, 204, 40, 1)",!1),level24:P(4.764,"rgba( 40, 204, 149, 1)",!1),__collectibleLines:["level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11","level12","level13","level14","level15","level16","level17","level18","level19","level20","level21","level22","level23","level24"]},linetoolprojection:{showCoeffs:!0,font:"Verdana",fillBackground:!0,transparency:80,color1:"rgba( 0, 128, 0, 0.2)",color2:"rgba( 255, 0, 0, 0.2)",linewidth:1,trendline:{visible:!0,color:"rgba( 128, 128, 128, 1)",linestyle:CanvasEx.LINESTYLE_SOLID},level1:C(1,"rgba( 128, 128, 128, 1)",!0)},linetool5pointspattern:{color:"rgba( 204, 40, 149, 1)",textcolor:"rgba( 255, 255, 255, 1)",fillBackground:!0,backgroundColor:"rgba( 204, 40, 149, 0.5)",font:"Verdana",fontsize:12,bold:!1,italic:!1,transparency:50,linewidth:1},linetoolcypherpattern:{color:"#CC2895",textcolor:"#FFFFFF",fillBackground:!0,backgroundColor:"#CC2895",font:"Verdana",fontsize:12,bold:!1,italic:!1,transparency:50,linewidth:1},linetooltrianglepattern:{color:"rgba( 149, 40, 255, 1)",textcolor:"rgba( 255, 255, 255, 1)",fillBackground:!0,backgroundColor:"rgba( 149, 40, 204, 0.5)",font:"Verdana",fontsize:12,bold:!1,italic:!1,transparency:50,linewidth:1},linetoolabcd:{
color:"rgba( 0, 155, 0, 1)",textcolor:"rgba( 255, 255, 255, 1)",font:"Verdana",fontsize:12,bold:!1,italic:!1,linewidth:2},linetoolthreedrivers:{color:"rgba( 149, 40, 255, 1)",textcolor:"rgba( 255, 255, 255, 1)",fillBackground:!0,backgroundColor:"rgba( 149, 40, 204, 0.5)",font:"Verdana",fontsize:12,bold:!1,italic:!1,transparency:50,linewidth:2},linetoolheadandshoulders:{color:"rgba( 69, 104, 47, 1)",textcolor:"rgba( 255, 255, 255, 1)",fillBackground:!0,backgroundColor:"rgba( 69, 168, 47, 0.5)",font:"Verdana",fontsize:12,bold:!1,italic:!1,transparency:50,linewidth:2},linetoolfibwedge:{singleChartOnly:!0,showCoeffs:!0,font:g,fillBackground:!0,transparency:80,trendline:{visible:!0,color:"rgba( 128, 128, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level1:C(.236,"rgba( 204, 40, 40, 1)",!0),level2:C(.382,"rgba( 149, 204, 40, 1)",!0),level3:C(.5,"rgba( 40, 204, 40, 1)",!0),level4:C(.618,"rgba( 40, 204, 149, 1)",!0),level5:C(.786,"rgba( 40, 149, 204, 1)",!0),level6:C(1,"rgba( 128, 128, 128, 1)",!0),level7:C(1.618,"rgba( 40, 40, 204, 1)",!1),level8:C(2.618,"rgba( 204, 40, 40, 1)",!1),level9:C(3.618,"rgba( 149, 40, 204, 1)",!1),level10:C(4.236,"rgba( 204, 40, 149, 1)",!1),level11:C(4.618,"rgba( 204, 40, 149, 1)",!1),__collectibleLines:["trendline","level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11"]},linetoolfibcircles:{showCoeffs:!0,font:g,fillBackground:!0,transparency:80,snapTo45Degrees:!0,coeffsAsPercents:!1,trendline:{visible:!0,color:"rgba( 128, 128, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED},level1:C(.236,"rgba( 204, 40, 40, 1)",!0),level2:C(.382,"rgba( 149, 204, 40, 1)",!0),level3:C(.5,"rgba( 40, 204, 40, 1)",!0),level4:C(.618,"rgba( 40, 204, 149, 1)",!0),level5:C(.786,"rgba( 40, 149, 204, 1)",!0),level6:C(1,"rgba( 128, 128, 128, 1)",!0),level7:C(1.618,"rgba( 40, 40, 204, 1)",!0),level8:C(2.618,"rgba( 204, 40, 40, 1)",!0),level9:C(3.618,"rgba( 149, 40, 204, 1)",!0),level10:C(4.236,"rgba( 204, 40, 149, 1)",!0),level11:C(4.618,"rgba( 204, 40, 149, 1)",!0),__collectibleLines:["trendline","level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11"]},linetoolfibspeedresistancearcs:{showCoeffs:!0,font:g,fillBackground:!0,transparency:80,fullCircles:!1,trendline:{visible:!0,color:"rgba( 128, 128, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED},level1:C(.236,"rgba( 204, 40, 40, 1)",!0),level2:C(.382,"rgba( 149, 204, 40, 1)",!0),level3:C(.5,"rgba( 40, 204, 40, 1)",!0),level4:C(.618,"rgba( 40, 204, 149, 1)",!0),level5:C(.786,"rgba( 40, 149, 204, 1)",!0),level6:C(1,"rgba( 128, 128, 128, 1)",!0),level7:C(1.618,"rgba( 40, 40, 204, 1)",!0),level8:C(2.618,"rgba( 204, 40, 40, 1)",!0),level9:C(3.618,"rgba( 149, 40, 204, 1)",!0),level10:C(4.236,"rgba( 204, 40, 149, 1)",!0),level11:C(4.618,"rgba( 204, 40, 149, 1)",!0),__collectibleLines:["trendline","level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11"]},linetooltrendbasedfibextension:{showCoeffs:!0,showPrices:!0,
font:g,fillBackground:!0,transparency:80,extendLines:!1,horzLabelsAlign:"left",vertLabelsAlign:"middle",reverse:!1,coeffsAsPercents:!1,fibLevelsBasedOnLogScale:!1,trendline:{visible:!0,color:"rgba( 128, 128, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED},levelsStyle:{linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level1:P(0,"rgba( 128, 128, 128, 1)",!0),level2:P(.236,"rgba( 204, 40, 40, 1)",!0),level3:P(.382,"rgba( 149, 204, 40, 1)",!0),level4:P(.5,"rgba( 40, 204, 40, 1)",!0),level5:P(.618,"rgba( 40, 204, 149, 1)",!0),level6:P(.786,"rgba( 40, 149, 204, 1)",!0),level7:P(1,"rgba( 128, 128, 128, 1)",!0),level8:P(1.618,"rgba( 40, 40, 204, 1)",!0),level9:P(2.618,"rgba( 204, 40, 40, 1)",!0),level10:P(3.618,"rgba( 149, 40, 204, 1)",!0),level11:P(4.236,"rgba( 204, 40, 149, 1)",!0),level12:P(1.272,"rgba( 149, 204, 40, 1)",!1),level13:P(1.414,"rgba( 204, 40, 40, 1)",!1),level16:P(2,"rgba( 40, 204, 149, 1)",!1),level14:P(2.272,"rgba( 149, 204, 40, 1)",!1),level15:P(2.414,"rgba( 40, 204, 40, 1)",!1),level17:P(3,"rgba( 40, 149, 204, 1)",!1),level18:P(3.272,"rgba( 128, 128, 128, 1)",!1),level19:P(3.414,"rgba( 40, 40, 204, 1)",!1),level20:P(4,"rgba( 204, 40, 40, 1)",!1),level21:P(4.272,"rgba( 149, 40, 204, 1)",!1),level22:P(4.414,"rgba( 204, 40, 149, 1)",!1),level23:P(4.618,"rgba( 149, 204, 40, 1)",!1),level24:P(4.764,"rgba( 40, 204, 149, 1)",!1),__collectibleLines:["trendline","level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11","level12","level13","level14","level15","level16","level17","level18","level19","level20","level21","level22","level23","level24"]},linetooltrendbasedfibtime:{showCoeffs:!0,font:"Verdana",fillBackground:!0,transparency:80,horzLabelsAlign:"right",vertLabelsAlign:"bottom",trendline:{visible:!0,color:"rgba( 128, 128, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED},level1:C(0,"rgba( 128, 128, 128, 1)",!0),level2:C(.382,"rgba( 204, 40, 40, 1)",!0),level3:C(.5,"rgba( 149, 204, 40, 1)",!1),level4:C(.618,"rgba( 40, 204, 40, 1)",!0),level5:C(1,"rgba( 40, 204, 149, 1)",!0),level6:C(1.382,"rgba( 40, 149, 204, 1)",!0),level7:C(1.618,"rgba( 128, 128, 128, 1)",!0),level8:C(2,"rgba( 40, 40, 204, 1)",!0),level9:C(2.382,"rgba( 204, 40, 40, 1)",!0),level10:C(2.618,"rgba( 149, 40, 204, 1)",!0),level11:C(3,"rgba( 204, 40, 149, 1)",!0),__collectibleLines:["trendline","level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11"]},linetoolschiffpitchfork:{fillBackground:!0,transparency:80,style:l.Schiff,median:{visible:!0,color:"rgba( 165, 0, 0, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level0:C(.25,"rgba( 160, 107, 0, 1)",!1),level1:C(.382,"rgba( 105, 158, 0, 1)",!1),level2:C(.5,"rgba( 0, 155, 0, 1)",!0),level3:C(.618,"rgba( 0, 153, 101, 1)",!1),level4:C(.75,"rgba( 0, 101, 153, 1)",!1),level5:C(1,"rgba( 0, 0, 153, 1)",!0),level6:C(1.5,"rgba( 102, 0, 153, 1)",!1),level7:C(1.75,"rgba( 153, 0, 102, 1)",!1),level8:C(2,"rgba( 165, 0, 0, 1)",!1),
__collectibleLines:["median","level0","level1","level2","level3","level4","level5","level6","level7","level8"]},linetoolschiffpitchfork2:{fillBackground:!0,transparency:80,style:l.Schiff2,median:{visible:!0,color:"rgba( 165, 0, 0, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level0:C(.25,"rgba( 160, 107, 0, 1)",!1),level1:C(.382,"rgba( 105, 158, 0, 1)",!1),level2:C(.5,"rgba( 0, 155, 0, 1)",!0),level3:C(.618,"rgba( 0, 153, 101, 1)",!1),level4:C(.75,"rgba( 0, 101, 153, 1)",!1),level5:C(1,"rgba( 0, 0, 153, 1)",!0),level6:C(1.5,"rgba( 102, 0, 153, 1)",!1),level7:C(1.75,"rgba( 153, 0, 102, 1)",!1),level8:C(2,"rgba( 165, 0, 0, 1)",!1),__collectibleLines:["median","level0","level1","level2","level3","level4","level5","level6","level7","level8"]},linetoolinsidepitchfork:{fillBackground:!0,transparency:80,style:l.Inside,median:{visible:!0,color:"rgba( 165, 0, 0, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level0:C(.25,"rgba( 160, 107, 0, 1)",!1),level1:C(.382,"rgba( 105, 158, 0, 1)",!1),level2:C(.5,"rgba( 0, 155, 0, 1)",!0),level3:C(.618,"rgba( 0, 153, 101, 1)",!1),level4:C(.75,"rgba( 0, 101, 153, 1)",!1),level5:C(1,"rgba( 0, 0, 153, 1)",!0),level6:C(1.5,"rgba( 102, 0, 153, 1)",!1),level7:C(1.75,"rgba( 153, 0, 102, 1)",!1),level8:C(2,"rgba( 165, 0, 0, 1)",!1),__collectibleLines:["median","level0","level1","level2","level3","level4","level5","level6","level7","level8"]}},o(TradingView.defaultProperties.chartproperties),r()}for(void 0===TradingView.defaultProperties["study_MA@tv-basicstudies"]&&(TradingView.defaultProperties["study_MA@tv-basicstudies"]={description:"Moving Average",shortDescription:"MA",inputs:{length:9,source:"close"},styles:{MovAvg:{visible:!0,color:"rgba( 4, 150, 255, 1)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1,plottype:u.Line,histogramBase:0,title:"MA"}}}),void 0===TradingView.defaultProperties["study_PivotPointsHighLow@tv-basicstudies"]&&(TradingView.defaultProperties["study_PivotPointsHighLow@tv-basicstudies"]={font:"Arial",fontsize:10,borderColor:"rgba( 83, 143, 31, 1)",backColor:"rgba( 240, 255, 204, 1)",textColor:"rgba( 0, 0, 0, 1)"}),void 0===TradingView.defaultProperties["study_PivotPointsStandard@tv-basicstudies"]&&(i="rgba( 212, 121, 40, 1)",n=!0,s=1,TradingView.defaultProperties["study_PivotPointsStandard@tv-basicstudies"]={_hardCodedDefaultsVersion:1,font:"Arial",fontsize:11,levelsStyle:{showLabels:!0,visibility:{P:n,"S1/R1":n,"S2/R2":n,"S3/R3":n,"S4/R4":n,"S5/R5":n},colors:{P:i,"S1/R1":i,"S2/R2":i,"S3/R3":i,"S4/R4":i,"S5/R5":i},widths:{P:s,"S1/R1":s,"S2/R2":s,"S3/R3":s,"S4/R4":s,"S5/R5":s}}}),void 0===TradingView.defaultProperties["study_ZigZag@tv-basicstudies"]&&(TradingView.defaultProperties["study_ZigZag@tv-basicstudies"]={color:"rgba( 86, 135, 29, 1)",linewidth:2}),void 0===TradingView.defaultProperties["study_ElliottWave@tv-basicstudies"]&&(TradingView.defaultProperties["study_ElliottWave@tv-basicstudies"]={inputs:{},level0:w("rgba( 255, 0, 0, 1)",!1),level1:w("rgba( 0, 128, 0, 1)",!1),level2:w("rgba( 0, 0, 255, 1)",!1),level3:w("rgba( 255, 0, 255, 1)",!1),
level4:w("rgba( 0, 128, 255, 1)",!0),level5:w("rgba( 255, 0, 0, 1)",!0),level6:w("rgba( 0, 128, 0, 1)",!0),level7:w("rgba( 0, 0, 255, 1)",!0),level8:w("rgba( 255, 0, 255, 1)",!0)}),void 0===TradingView.defaultProperties["study_LinearRegression@tv-basicstudies"]&&(TradingView.defaultProperties["study_LinearRegression@tv-basicstudies"]={styles:{upLine:{visible:!0,color:"rgba( 0, 0, 255, 0.3)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1},downLine:{visible:!0,color:"rgba( 0, 0, 255, 0.3)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1},baseLine:{visible:!0,color:"rgba( 255, 0, 0, 0.3)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1},extendLines:!0,showPearsons:!0,backgroundColor:"rgba( 153, 21, 21, 0.3)",transparency:70}}),void 0===TradingView.defaultProperties["study_RegressionTrend@tv-basicstudies"]&&(TradingView.defaultProperties["study_RegressionTrend@tv-basicstudies"]={linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,styles:{upLine:{visible:!0,color:"rgba( 0, 0, 255, 0.3)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1},downLine:{visible:!0,color:"rgba( 0, 0, 255, 0.3)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1},baseLine:{visible:!0,color:"rgba( 255, 0, 0, 0.3)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1},extendLines:!1,showPearsons:!0,transparency:70}}),void 0===TradingView.defaultProperties["study_Compare@tv-basicstudies"]&&(TradingView.defaultProperties["study_Compare@tv-basicstudies"]={minTick:"default"}),void 0===TradingView.defaultProperties["study_Overlay@tv-basicstudies"]&&(y="study_Overlay@tv-basicstudies",TradingView.defaultProperties[y]={style:a.STYLE_LINE,showPriceLine:!1,minTick:"default",candleStyle:{upColor:"rgba( 107, 165, 131, 1)",downColor:"rgba( 215, 84, 66, 1)",drawWick:!0,drawBorder:!0,borderColor:"rgba( 55, 134, 88, 1)",borderUpColor:"rgba( 34, 84, 55, 1)",borderDownColor:"rgba( 91, 26, 19, 1)",wickColor:"rgba( 115, 115, 117, 1)",wickUpColor:"rgba( 115, 115, 117, 1)",wickDownColor:"rgba( 115, 115, 117, 1)",barColorsOnPrevClose:!1},hollowCandleStyle:{upColor:"rgba( 107, 165, 131, 1)",downColor:"rgba( 215, 84, 66, 1)",drawWick:!0,drawBorder:!0,borderColor:"rgba( 55, 134, 88, 1)",borderUpColor:"rgba( 34, 84, 55, 1)",borderDownColor:"rgba( 91, 26, 19, 1)",wickColor:"rgba( 115, 115, 117, 1)",wickUpColor:"rgba( 115, 115, 117, 1)",wickDownColor:"rgba( 115, 115, 117, 1)",barColorsOnPrevClose:!1},barStyle:{upColor:"rgba( 107, 165, 131, 1)",downColor:"rgba( 215, 84, 66, 1)",barColorsOnPrevClose:!1,dontDrawOpen:!1,thinBars:!0},lineStyle:{color:"#2196f3",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:2,priceSource:"close",styleType:a.STYLE_LINE_TYPE_SIMPLE},areaStyle:{color1:"#2196f3",color2:"#2196f3",linecolor:"#2196f3",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:3,priceSource:"close",transparency:95},baselineStyle:{baselineColor:"rgba( 117, 134, 150, 1)",topFillColor1:"rgba( 83, 185, 135, 0.05)",topFillColor2:"rgba( 83, 185, 135, 0.05)",bottomFillColor1:"rgba( 235, 77, 92, 0.05)",bottomFillColor2:"rgba( 235, 77, 92, 0.05)",topLineColor:"rgba( 83, 185, 135, 1)",
bottomLineColor:"rgba( 235, 77, 92, 1)",topLineWidth:3,bottomLineWidth:3,priceSource:"close",transparency:50,baseLevelPercentage:50},styles:{open:{visible:!0,color:"rgba( 255, 0, 0, 1)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1,plottype:u.Line,histogramBase:0},high:{visible:!0,color:"rgba( 255, 0, 0, 1)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1,plottype:u.Line,histogramBase:0},low:{visible:!0,color:"rgba( 255, 0, 0, 1)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1,plottype:u.Line,histogramBase:0},close:{visible:!0,color:"rgba( 255, 0, 0, 1)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1,plottype:u.Line,histogramBase:0}}}),v=e.split("."),S=TradingView.defaultProperties,b=0;b<v.length;b++)S&&(S=S[v[b]]);return null!=S?TradingView.clone(S):{}};s.create=function(e,t){if(t){var i=v(e);TradingView.defaultProperties[e]=Object.assign(t,i)}},s.remove=function(e){TradingView.defaultProperties[e]=void 0},TradingView.saveDefaults=function(e,t){TVSettings.setJSON(e,t)},TradingView.factoryDefaults=v,window.applyDefaultOverridesToLinetools=r,window.applyDefaultsOverrides=o,window.applyPropertiesOverrides=n,window.defaults=s,t.applyDefaultOverridesToLinetools=r,t.applyDefaultsOverrides=o,t.applyPropertiesOverrides=n,t.defaults=s,t.factoryDefaults=v,t.saveDefaults=TradingView.saveDefaults},wamh:function(e,t,i){"use strict";var n,o,r,s,a;i.r(t),i.d(t,"ChangeToolBarsThemeUndoCommand",function(){return a}),n=i("mrSG"),o=i("EsvI"),r=i("oiZD"),s=i("RDU5"),a=function(e){function t(t,i,n){void 0===n&&(n=!0);var o=e.call(this,"Apply Toolbars Theme")||this;return o._prevThemeName=t,o._themeName=i,o._syncState=n,o}return Object(n.__extends)(t,e),t.prototype.undo=function(){Object(o.isStdThemeName)(this._prevThemeName)&&(Object(r.setTheme)(this._prevThemeName),this._syncState&&Object(o.syncTheme)())},t.prototype.redo=function(){Object(o.isStdThemeName)(this._themeName.toLowerCase())&&(Object(r.setTheme)(this._themeName.toLowerCase()),this._syncState&&Object(o.syncTheme)())},t}(s.UndoCommand)},wi9r:function(e,t,i){"use strict";(function(e){function t(e){this._chartApi=e,this._sessionid="qs_"+n(),this._sessionstarted=!1}var n=i("0waE").randomHash;t.prototype.destroy=function(){this._sessionstarted&&(this._chartApi.quoteDeleteSession(this._sessionid),this._sessionid=null,this._sessionstarted=!1)},t.prototype.connected=function(){return this._chartApi.connected()},t.prototype.connect=function(e){this._globalHandler=e,this._chartApi.createSession(this._sessionid,this),this._chartApi.connect()},t.prototype.disconnect=function(){this._chartApi.disconnect()},t.prototype.quoteAddSymbols=function(e,t){e=[].concat(e),t&&t.forcePermission&&(e=e.concat({flags:["force_permission"]})),this._chartApi.quoteAddSymbols(this._sessionid,e)},t.prototype.quoteRemoveSymbols=function(e){this._chartApi.quoteRemoveSymbols(this._sessionid,e)},t.prototype.quoteFastSymbols=function(e){this._chartApi.quoteFastSymbols(this._sessionid,e)},t.prototype.quoteSetFields=function(e){this._chartApi.quoteSetFields(this._sessionid,e)},t.prototype.onMessage=function(e){
switch(e.method){case"connected":this._sessionstarted||(this._chartApi.quoteCreateSession(this._sessionid),this._sessionstarted=!0);break;case"disconnected":this._sessionstarted=!1}this._globalHandler(e)},t.prototype.quoteHibernateAll=function(e){this._chartApi.quoteHibernateAll(this._sessionid)},TradingView.QuoteSession=t,e&&e.exports&&(e.exports=t)}).call(this,i("YuTi")(e))},wjVR:function(e,t,i){"use strict";function n(e,t,i){var n=t.mainSeries().syncModel(),o=e.mainSeries().syncModel(),r=i;return null!==n&&null!==o&&(r=e.createSyncPoint(n,o).sourceTimeToTargetTime(i)),e.timeScale().points().roughIndex(r,o&&o.distance.bind(o))}var o,r,s,a,l,c,u,h;i.r(t),i.d(t,"ChartWidgetBase",function(){return h}),o=i("mrSG"),r=i("Eyy1"),s=i("ogJP"),a=i("CW80"),l=i("mMWL"),c=i("KnF9"),u={addToWatchlistEnabled:!0,sourceSelectionEnabled:!0,propertyPagesEnabled:!0,paneContextMenuEnabled:!0,priceScaleContextMenuEnabled:!0,currencyLabelEnabled:!1,tradeContextMenuEnabled:!1,goToDateEnabled:!1,marketStatusWidgetEnabled:!0,chartWarningWidgetEnabled:!0,paneControlsEnabled:!0,isSymbolAvailable:function(e){return Promise.resolve(!0)},legendWidgetEnabled:!0,chartEventsEnabled:!0,esdEnabled:!1,croppedTickMarks:!0,handleScale:{mouseWheel:!0,pinch:!0,axisPressedMouseMove:!0},handleScroll:{mouseWheel:!0,pressedMouseMove:!0,horzTouchDrag:!0,vertTouchDrag:!0}},h=function(){function e(e){this.activePaneWidget=null,this._model=null,this._options=Object(s.merge)(Object(s.clone)(u),e),this._subscribeToDrawingState()}return e.prototype._subscribeToDrawingState=function(){var e,t,i=this;this._options.readOnly||(Object(l.init)(),e=function(e,t){if(null!==i._model){var n=i._model.model();e.model!==n&&t(n,i._model)}},t=function(e,t){return e.dataSources().find(function(e){return Object(a.isLineTool)(e)&&e.getLinkKey()===t})||null},l.createdLineTool.subscribe(null,function(t){e(t,function(e,i){var o,s=Object(r.ensureNotNull)(e.paneForSource(e.mainSeries())),a=n(e,t.model,t.point.timeStamp);null!==a&&(o={index:a,price:t.point.price},i.createLineTool(s,o,t.linetool,t.properties,t.linkKey,e.mainSeries()))})}),l.continuedLineTool.subscribe(null,function(t){e(t,function(e,i){var o,r,s=n(e,t.model,t.point.timeStamp);null!==s&&(o={index:s,price:t.point.price},null!==(r=e.lineBeingCreated())&&i.continueExternalLine(o,null===t.envState?void 0:t.envState,!!t.finalState)&&t.finalState&&r.restoreExternalPoints(t.finalState))})}),l.cancelledLineTool.subscribe(null,function(t){e(t,function(e,t){e.cancelCreatingLine()})}),l.beenSetLineToolLastPoint.subscribe(null,function(t){e(t,function(e,i){var o,r,s=e.lineBeingCreated();null!==s&&s.getLinkKey()===t.linkKey&&null!==(o=n(e,t.model,t.point.timeStamp))&&(r={index:o,price:t.point.price},s.setLastPoint(r),s.updateAllViews(),e.lightUpdate())})}),l.startedMovingLineTool.subscribe(null,function(i){e(i,function(e,o){var r,a,l=i.linkKeys.map(t.bind(null,e)).filter(s.notNull);if(l.length){if(null===(r=n(e,i.model,i.point.timeStamp)))return;a={index:r,price:i.point.price},e.startMovingSources(l,{logical:a
},null,null===i.envState?void 0:i.envState)}})}),l.movedLineTool.subscribe(null,function(t){e(t,function(e,i){var o,r,s=function(e){return t.linkKeys.some(function(t){return e.getLinkKey()===t})},a=e.sourcesBeingMoved().filter(function(e){return s(e)});a.length&&null!==(o=n(e,t.model,t.point.timeStamp))&&(r={index:o,price:t.point.price},e.moveSources({logical:r},null===t.envState?void 0:t.envState))})}),l.finishedMovingLineTool.subscribe(null,function(t){e(t,function(e,i){var n,o=e.sourcesBeingMoved();0!==o.length&&(n=function(e){for(var i=0;i<t.linkKeys.length;i++)if(t.linkKeys[i]===e.getLinkKey())return t.finalStates[i];return null},o.forEach(function(t){var i=n(t);e.endMovingSources(null!==i),null!==i&&t.restoreExternalPoints(i)}))})}),l.startedChangingLineTool.subscribe(null,function(i){e(i,function(e,o){var r,s=t(e,i.linkKey),a=n(e,i.model,i.point.timeStamp);null!==a&&null!==s&&(r={index:a,price:i.point.price},e.startChangingLinetool(s,r,i.pointIndex,null===i.envState?void 0:i.envState))})}),l.changedLineTool.subscribe(null,function(t){e(t,function(e,i){var o,r,s=e.lineBeingEdited();null!==s&&s.getLinkKey()===t.linkKey&&null!==(o=n(e,t.model,t.point.timeStamp))&&(r={index:o,price:t.point.price},e.changeLinePoint(r,null===t.envState?void 0:t.envState))})}),l.finishedChangingLineTool.subscribe(null,function(i){e(i,function(e,n){var o=t(e,i.linkKey);null!==e.lineBeingEdited()&&e.endChangingLinetool(!!i.finalState),null!==o&&i.finalState&&o.restoreExternalPoints(i.finalState)})}),l.removedLineTool.subscribe(null,function(i){e(i,function(e,n){var o=t(e,i.linkKey);null!==o&&n.removeSource(o,!1)})}),l.finishedLineTool.subscribe(null,function(i){e(i,function(e,n){null!==t(e,i.linkKey)&&e.finishLineTool(!1)})}),l.changedLineStyle.subscribe(null,function(i){e(i,function(e,n){var o=t(e,i.linkKey);null!==o&&(o.properties().merge(i.state),o.propertiesChanged())})}),l.restoredLineToolState.subscribe(null,function(i){e(i,function(e,r){var s,a=t(e,i.linkKey);null!==a&&((s=Object(o.__assign)({},i.state)).indexes=i.state.points.map(function(t){return{index:n(e,i.model,t.time_t),price:t.price}}),e.restoreLineToolState(a,s))})}),l.restoredLineTool.subscribe(null,function(t){e(t,function(e,i){e.restoreSource(t.state.restorePane,t.state.paneIndex,t.state.paneState,t.state.sourceState,null)})}),l.copiedLineTool.subscribe(null,function(t){e(t,function(e,i){var o,s,a,l=Object(r.ensureNotNull)(e.paneForSource(e.mainSeries())),u=t.points.map(function(i){return{index:Object(r.ensureNotNull)(n(e,t.model,i.timeStamp)),price:i.price}});if(0!==u.length){if(o=u[0],s=e.createLineTool(l,o,t.linetool,null,t.linkKey),e.lineBeingCreated())for(a=1;a<u.length;a++)a!==u.length-1||"LineToolBrush"!==t.linetool&&"LineToolGhostFeed"!==t.linetool||e.finishLineTool(!0),e.coninueCreatingLine(u[a],new c.EnvironmentState(void 0),a<u.length-1,!0);s.properties().interval.setValue(t.state.interval),s.properties().merge(t.state),s.restoreData&&s.restoreData(t),s.propertiesChanged(),t.finalState&&(s.calcIsActualSymbol(),s.restoreExternalPoints(t.finalState))}})}))},
e}()},x0JF:function(e,t,i){"use strict";function n(e,t){this.m_series=e,this.m_model=t,this.m_bars=[],this._invalidated=!0,this._isMarkersEnabled=x.enabled("source_selection_markers"),this._selectionData=null}function o(e,t){return void 0!==e[TradingView.OPEN_PLOT]&&void 0!==e[TradingView.HIGH_PLOT]&&void 0!==e[TradingView.LOW_PLOT]&&void 0!==e[TradingView.CLOSE_PLOT]&&(t.open=e[TradingView.OPEN_PLOT],t.high=e[TradingView.HIGH_PLOT],t.low=e[TradingView.LOW_PLOT],t.close=e[TradingView.CLOSE_PLOT],!0)}function r(e,t){n.call(this,e,t)}function s(e,t){n.call(this,e,t)}function a(e,t){n.call(this,e,t)}function l(e,t){n.call(this,e,t)}function c(e,t){this.m_series=e,this.m_model=t,this.m_items=[],this._isMarkersEnabled=x.enabled("source_selection_markers")}function u(e,t){c.call(this,e,t),this._invaidated=!0}function h(e,t){c.call(this,e,t),this._invaidated=!0}function d(e,t){c.call(this,e,t),this._invaidated=!0,this._renderer=new b}var p=i("aO4+").Point,_=i("1mZ4").SelectionRenderer,f=i("VdBB").HitTestResult,m=i("29fS").PaneRendererBars,y=i("gyZD").PaneRendererLine,g=i("Zp8I").PaneRendererStepLine,v=i("u0yd").PaneRendererArea,S=i("/hKg").PaneRendererCandles,b=i("M7/j").PaneRendererBaseline,w=i("Zy3/").CompositeRenderer,P=i("ga+R"),C=i("Tmoa"),T=i("k9/m").PlotRowSearchMode,x=i("Kxc7"),I=i("Zp/P");n.prototype._series=function(){return this.m_series},n.prototype._model=function(){return this.m_model},n.prototype._bars=function(){return this.m_bars},n.prototype.update=function(){this._invalidated=!0},n.prototype._updateImpl=function(e){var t,i,n,r,s,a,l,c,u,h,d,_,m,y,g=this;if(e=e||o,this.m_bars=[],!this.m_model.timeScale().isEmpty()&&!this.m_series.priceScale().isEmpty()&&null!==(t=this.m_model.timeScale().visibleBarsStrictRange())&&0!==this.m_series.bars().size()){for(i=this.m_series.nearestIndex(t.firstBar(),T.NearestRight),n=this.m_series.nearestIndex(t.lastBar(),T.NearestLeft);i<=n&&null===this.m_series.bars().valueAt(i);i++);if(!(i>n)&&(t=this.m_series.bars().range(i,n),r=this.m_series.priceScale(),s=this.m_series.barColorer(),a={},t.each(function(t,i){var n,o={};o.time=Math.round(t),e(i,o)&&(a.value=i,n=i[TradingView.STYLE_PLOT]?i[TradingView.STYLE_PLOT]:s.barStyle(t,!1,a),i[TradingView.STYLE_PLOT]=n,a.previousValue=i,o.color=n.barColor,o.borderColor=n.barBorderColor,o.wickColor=n.barWickColor,o.hollow=n.isBarHollow,g.m_bars.push(o))},this),0!==this.m_bars.length&&(l=this.m_series.firstValue(),r.barPricesToCoordinates(this.m_bars,l)),this.m_model.timeScale().barIndexesToCoordinates(this.m_bars),this.m_model.selection().isSelected(this.m_series)))for(c=P(i,n),this._selectionData={points:[],bgColor:this.m_model.backgroundColor()},this._selectionData.hittestResult=f.REGULAR,u=0;u<c.length;u++)h=c[u],null!==(d=this.m_series.bars().valueAt(h))&&(_=.5*(d[TradingView.OPEN_PLOT]+d[TradingView.CLOSE_PLOT]),m=this.m_model.timeScale().indexToCoordinate(h),y=this.m_series.priceScale().priceToCoordinate(_,l),this._selectionData.points.push(new p(m,y)))}},n.prototype.items=function(){return this.m_bars},inherit(r,n),
r.prototype.renderer=function(){var e,t,i;return this._invalidated&&(this._updateImpl(),this._invalidated=!1),(e={}).bars=this.m_bars,e.barSpacing=this.m_model.timeScale().barSpacing(),t=this.m_series.properties(),e.dontDrawOpen=t.barStyle.dontDrawOpen.value(),e.thinBars=t.style.value()===TradingView.Series.STYLE_RANGE?t.rangeStyle.thinBars.value():t.barStyle.thinBars.value(),(i=new w).append(new m(e)),this.m_model.selection().isSelected(this.m_series)&&this._isMarkersEnabled&&i.append(new _(this._selectionData)),i},inherit(s,n),s.prototype.renderer=function(){var e,t;return this._invalidated&&(this._updateImpl(),this._invalidated=!1),(e={}).bars=this.m_bars,e.barSpacing=this.m_model.timeScale().barSpacing(),e.wickVisible=this.m_series.properties().candleStyle.drawWick.value(),e.borderVisible=this.m_series.properties().candleStyle.drawBorder.value(),e.borderColor=this.m_series.properties().candleStyle.borderColor.value(),e.wickColor=this.m_series.properties().candleStyle.wickColor.value(),e.barWidth=I.optimalBarWidth(e.barSpacing),(t=new w).append(new S(e)),this.m_model.selection().isSelected(this.m_series)&&this._isMarkersEnabled&&t.append(new _(this._selectionData)),t},inherit(a,n),a.prototype.renderer=function(){var e,t;return this._invalidated&&(this._updateImpl(),this._invalidated=!1),(e={}).bars=this.m_bars,e.barSpacing=this.m_model.timeScale().barSpacing(),e.wickVisible=this.m_series.properties().haStyle.drawWick.value(),e.borderVisible=this.m_series.properties().haStyle.drawBorder.value(),e.borderColor=this.m_series.properties().haStyle.borderColor.value(),e.wickColor=this.m_series.properties().haStyle.wickColor.value(),e.barWidth=I.optimalBarWidth(e.barSpacing),(t=new w).append(new S(e)),this.m_model.selection().isSelected(this.m_series)&&this._isMarkersEnabled&&t.append(new _(this._selectionData)),t},inherit(l,n),l.prototype.renderer=function(){var e,t;return this._invalidated&&(this._updateImpl(),this._invalidated=!1),(e={}).bars=this.m_bars,e.barSpacing=this.m_model.timeScale().barSpacing(),e.wickVisible=this.m_series.properties().hollowCandleStyle.drawWick.value(),e.borderVisible=this.m_series.properties().hollowCandleStyle.drawBorder.value(),e.borderColor=this.m_series.properties().hollowCandleStyle.borderColor.value(),e.wickColor=this.m_series.properties().hollowCandleStyle.wickColor.value(),e.barWidth=I.optimalBarWidth(e.barSpacing),(t=new w).append(new S(e)),this.m_model.selection().isSelected(this.m_series)&&this._isMarkersEnabled&&t.append(new _(this._selectionData)),t},c.prototype.update=function(){var e,t,i,n,o,r,s,a,l,c,u,h,d,_;if(this.m_items=[],!this.m_model.timeScale().isEmpty()&&this.m_series.priceScale()&&!this.m_series.priceScale().isEmpty()&&null!==(e=this.m_model.timeScale().visibleBarsStrictRange())&&0!==this.m_series.bars().size()&&(t=this.m_series.nearestIndex(e.firstBar(),T.NearestRight),i=this.m_series.nearestIndex(e.lastBar(),T.NearestLeft),e=this.m_series.bars().range(t,i),o=this.m_series.priceScale(),r={color:this.m_series.properties().lineStyle.color.value()},
s=this.m_series.barFunction(),e.each(function(e,t){var i,o=s(t);return void 0!==o&&null!==o&&(void 0===n&&(n=o),(i=new p(e,o)).style=r,this.m_items.push(i),!1)}.bind(this)),o.pointsArrayToCoordinates(this.m_items,n),this.m_model.timeScale().indexesToCoordinates(this.m_items),this.m_model.selection().isSelected(this.m_series)))for(a=P(t,i),this._selectionData={points:[],isDark:this.m_model.isDark(),bgColor:this.m_model.backgroundColor()},this._selectionData.hittestResult=f.REGULAR,l=0;l<a.length;l++)c=a[l],u=this.m_series.data().valueAt(c),h=s(u),d=this.m_model.timeScale().indexToCoordinate(c),_=this.m_series.priceScale().priceToCoordinate(h,n),this._selectionData.points.push(new p(d,_))},inherit(u,c),u.prototype.update=function(){this._invalidated=!0},u.prototype.renderer=function(){var e,t,i,n;return this._invalidated&&(c.prototype.update.call(this),this._invalidated=!1),e=this.m_series.properties().lineStyle,t={barSpacing:this.m_model.timeScale().barSpacing(),items:this.m_items,lineColor:e.color.value(),lineStyle:e.linestyle.value(),withMarkers:e.styleType.value()===TradingView.Series.STYLE_LINE_TYPE_MARKERS,lineWidth:e.linewidth.value(),simpleMode:!0},e.styleType.value()===TradingView.Series.STYLE_LINE_TYPE_STEP?(i=new g).setData(t):i=new y(t),this.m_model.selection().isSelected(this.m_series)?((n=new w).append(i),this._isMarkersEnabled&&n.append(new _(this._selectionData))):n=i,n},inherit(h,c),h.prototype.update=function(){this._invalidated=!0},h.prototype.renderer=function(){var e,t,i;return this._invalidated&&(c.prototype.update.call(this),this._invalidated=!1),(e={}).simpleMode=!1,e.barSpacing=this.m_model.timeScale().barSpacing(),e.items=this.m_items,e.lineColor=this.m_series.properties().areaStyle.linecolor.value(),e.lineStyle=this.m_series.properties().areaStyle.linestyle.value(),e.lineWidth=this.m_series.properties().areaStyle.linewidth.value(),t=this.m_series.properties().areaStyle.transparency.value(),e.isSeries=!0,e.color1=C.generateColor(this.m_series.properties().areaStyle.color1.value(),t),e.color2=C.generateColor(this.m_series.properties().areaStyle.color2.value(),t),e.bottom=this.m_series.priceScale().height(),(i=new w).append(new v(e)),this.m_model.selection().isSelected(this.m_series)&&this._isMarkersEnabled&&i.append(new _(this._selectionData)),i},inherit(d,c),d.prototype.update=function(){this._invalidated=!0},d.prototype._updateImpl=function(){var e,t;c.prototype.update.call(this),t=(e=this.m_series.properties().baselineStyle).transparency.value(),this._topFillColor1=C.generateColor(e.topFillColor1.value(),t),this._topFillColor2=C.generateColor(e.topFillColor2.value(),t),this._bottomFillColor1=C.generateColor(e.bottomFillColor1.value(),t),this._bottomFillColor2=C.generateColor(e.bottomFillColor2.value(),t),this._topLineColor=e.topLineColor.value(),this._bottomLineColor=e.bottomLineColor.value(),this._topLineWidth=e.topLineWidth.value(),this._bottomLineWidth=e.bottomLineWidth.value(),this._barSpacing=this.m_model.timeScale().barSpacing(),this._bottom=this.m_series.priceScale().height(),
this._baseLevelCoordinate=Math.round(this._bottom*(Math.abs(100-e.baseLevelPercentage.value())/100))},d.prototype.renderer=function(){this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._renderer.setData({items:this.m_items,topFillColor1:this._topFillColor1,topFillColor2:this._topFillColor2,bottomFillColor1:this._bottomFillColor1,bottomFillColor2:this._bottomFillColor2,topLineColor:this._topLineColor,bottomLineColor:this._bottomLineColor,topLineWidth:this._topLineWidth,bottomLineWidth:this._bottomLineWidth,lineStyle:CanvasEx.LINESTYLE_SOLID,barSpacing:this._barSpacing,baseLevelCoordinate:this._baseLevelCoordinate,bottom:this._bottom});var e=new w;return e.append(this._renderer),this.m_model.selection().isSelected(this.m_series)&&e.append(new _(this._selectionData)),e},t.SeriesBarsPaneView=r,t.SeriesCandlesPaneView=s,t.SeriesHollowCandlesPaneView=l,t.SeriesLinePaneView=u,t.SeriesAreaPaneView=h,t.SeriesHeikenAshiPaneView=a,t.SeriesBaselinePaneView=d,t.SeriesBarCandlesPaneView=n},"x40+":function(e,t,i){"use strict";function n(){this._data=null}function o(e){this._source=e,this._points1=[],this._points2=[],this._timePoints=[],this._getBarSpacing=e.model().timeScale().barSpacing.bind(e.model().timeScale()),this._invalidated=!0,this._areaRenderer=new n,this._plIndex1=null,this._plIndex2=null}function r(e){o.call(this,e)}function s(e,t,i){var n,r;if(o.call(this,e),this._isHlineFill=t.type===u.FilledArea.TYPE_HLINES,a(this._isHlineFill||t.type===u.FilledArea.TYPE_PLOTS,"Wrong filledArea type: "+t.type),this._isHlineFill&&this._initBandIndexes(t.objAId,t.objBId),this._fillMetaInfo=t,this._fillStyleProps=i,n=e._metaInfo,t.palette)for(r in n.plots)if(n.plots[r].palette===t.palette){this._colorPlotOffset=parseInt(r),this._colorsMap=n.palettes[t.palette].valToIndex,this._colorValues=e.properties().palettes[t.palette].colors;break}}var a=i("Eyy1").assert,l=i("VdBB").HitTestResult,c=i("Zp/P").coordinateIsValid,u=i("0YCj"),h=i("Tmoa"),d=i("Hr11").clamp,p=i("k9/m").PlotRowSearchMode;n.prototype.setData=function(e){this._data=e},n.prototype.hitTest=function(e){var t,i,n;if(null===this._data)return null;for(n=1;n<this._data.points1.length;++n)if(t=this._data.points1[n],i=this._data.points2[n],this._data.timePoints[n]===e.x&&(e.y>=t&&e.y<=i||e.y<=t&&e.y>=i))return new l(l.REGULAR);return null},n.prototype.draw=function(e){var t,i,n,o,r,s,a,l,u,d,p,_,f,m,y,g,v,S;if(null!==this._data&&((t=this._data.isHlineFill)||0!==this._data.points1.length&&0!==this._data.points2.length)){for(i=this._data.timePoints,n=this._data.points1,o=this._data.points2,r=this._data.colors,s=isNumber(this._data.transparency)?this._data.transparency:50,s=Math.min(s,100),s=Math.max(s,0),a={},l=[],d=0;d<this._data.timePoints.length;d++)p={point1:t?this._data.level1:n[d],point2:t?this._data.level2:o[d],timePoint:i[d]},(_=c(p.point1)&&c(p.point2))&&(u=r?r[d]:this._data.backcolor,l.push(p)),(d===this._data.timePoints.length-1||r&&u!==r[d+1]||!_)&&(l.length>0&&null!==u&&((f=a[u]||[]).push(l),a[u]=f),l=_?[p]:[]);for(m in a){for(y=a[m],e.beginPath(),
g=0;g<y.length;g++){for(v=y[g],e.moveTo(v[0].timePoint,v[0].point1),S=1;S<v.length;S++)e.lineTo(v[S].timePoint,v[S].point1);for(S=v.length-1;S>=0;S--)e.lineTo(v[S].timePoint,v[S].point2)}e.closePath(),e.fillStyle=h.generateColor(m,s),e.fill()}}},o.prototype.update=function(){this._invalidated=!0},o.prototype._plotNames=function(){return this._source.metaInfo().plots.map(function(e){return e.id})},o.prototype._plotIndex1=function(){return null===this._plIndex1&&(this._plIndex1=this._plotNames().indexOf(this._plotAId())+1),this._plIndex1},o.prototype._plotIndex2=function(){return null===this._plIndex2&&(this._plIndex2=this._plotNames().indexOf(this._plotBId())+1),this._plIndex2},o.prototype._updateImpl=function(){var e,t,i,n,o,r,s,a,l,c,u,h,d,_,f,m,y,g,v,S,b,w,P,C,T,x,I;if(this._points1=[],this._points2=[],this._colorsMap&&(this._colors=[]),this._timePoints=[],this._visible()&&(e=this._source.priceScale(),t=this._source._model.timeScale(),e&&!e.isEmpty()&&!this._source._model.timeScale().isEmpty()&&!(this._source._series.bars().isEmpty()||(this._isHlineFill&&(i=this._source.firstValue(),n=this._source.properties().bands[this._bandAKey],o=this._source.properties().bands[this._bandBKey],this._level1=e.priceToCoordinate(n.value.value(),i),this._level2=e.priceToCoordinate(o.value.value(),i)),null===(r=this._source._model.timeScale().visibleBarsStrictRange())||(s=this._source._series.nearestIndex(r.firstBar(),p.NearestRight),a=this._source._series.nearestIndex(r.lastBar(),p.NearestLeft),(s=this._correctStartBarIndex(s))>a))))){if((l=this._source.data().range(s,a)).size()>0)for(c=l.firstIndex(),u=l.lastIndex(),h=this._source.offset(this._plotAId()),d=this._source.offset(this._plotBId()),_=Math.max(h,d),f=Math.min(h,d),m=c+_,c>(y=this._source.data().firstIndex())&&(m=c<_+y?_+y:c),g=u+f,u>(v=this._source.data().lastIndex())+f&&u<v&&(g=v+f),f<0&&u<=v+f&&(g=u),S=m<c?c+_:m>u?c+_:m,b=m;b<=g;++b)this._timePoints.push(t.indexToCoordinate(S++)),this._colors&&null!==(w=this._source.data().valueAt(b-f))&&(null==(P=w[this._colorPlotOffset+1])?this._colors.push(null):this._colors.push(this._colorValues[this._colorsMap[P]].color.value())),this._isHlineFill||(C=this._source.data().valueAt(b-h),T=this._source.data().valueAt(b-d),null!==C&&null!==T&&(x=C[this._plotIndex1()],I=T[this._plotIndex2()],this._points1.push(x),this._points2.push(I)));i=this._source.firstValue(),e.pricesArrayToCoordinates(this._points1,i),e.pricesArrayToCoordinates(this._points2,i)}},o.prototype.renderer=function(){this._invalidated&&(this._updateImpl(),this._invalidated=!1);var e={};return e.points1=this._points1,e.points2=this._points2,e.timePoints=this._timePoints,e.getBarSpacing=this._getBarSpacing,e.backcolor=this._color(),e.transparency=this._transparency(),e.isHlineFill=this._isHlineFill,e.level1=this._level1,e.level2=this._level2,this._colors&&(e.colors=this._colors),this._areaRenderer.setData(e),this._areaRenderer},o.prototype._plotAId=function(){a(!1,"Pure virtual call!")},o.prototype._plotBId=function(){a(!1,"Pure virtual call!")},
o.prototype._color=function(){a(!1,"Pure virtual call!")},o.prototype._transparency=function(){a(!1,"Pure virtual call!")},o.prototype._visible=function(){a(!1,"Pure virtual call!")},o.prototype._correctStartBarIndex=function(e){return e},inherit(r,o),r.prototype._plotAId=function(){return this._source.properties().area[0].name.value()},r.prototype._plotBId=function(){return this._source.properties().area[1].name.value()},r.prototype._color=function(){return this._source.properties().areaBackground.backgroundColor.value()},r.prototype._transparency=function(){var e=this._source.properties().areaBackground.transparency.value();return d(e,0,100)},r.prototype._visible=function(){return this._source.properties().areaBackground.fillBackground.value()},inherit(s,o),s.prototype._initBandIndexes=function(e,t){var i,n;for(this._bandAKey=null,this._bandBKey=null,i=0;i<this._source.metaInfo().bands.length;++i)n=this._source.metaInfo().bands[i],null!==this._bandAKey||n.id!==e?null!==this._bandBKey||n.id!==t||(this._bandBKey=i):this._bandAKey=i},s.prototype._plotAId=function(){return this._fillMetaInfo.objAId},s.prototype._plotBId=function(){return this._fillMetaInfo.objBId},s.prototype._color=function(){return this._fillStyleProps.color.value()},s.prototype._transparency=function(){return this._fillStyleProps.transparency.value()},s.prototype._visible=function(){return this._fillStyleProps.visible.value()},s.prototype._correctStartBarIndex=function(e){var t=this._source.getMinFirstBarIndexForPlot(this._fillMetaInfo.id);return Math.max(t,e)},t.PlotFillPaneView=s,t.AreaBackgroundPaneView=r},x8jL:function(e,t,i){"use strict";function n(){function e(e){var o,r,s;i.length>0?i[i.length-1].addCommand(e):(a.clear(),r=(o=n.head())&&o.text(),o&&o.canMerge(e)?o.merge(e):n.push(e),""!==(s=e.text())&&s!==r&&p.logNormal("DO: "+s)),e.executeOnPush()&&e.redo(),i.length||l.fire(t())}function t(){var e=n.head(),t=a.head();return{enableUndo:!n.isEmpty(),undoText:void 0===e?void 0:e.text(),enableRedo:!a.isEmpty(),redoText:void 0===t?void 0:t.text()}}var i=[],n=new r.UndoStack,a=new r.UndoStack,l=new d.a;return{beginUndoMacro:function(e){var t=new s.a(e);return i.push(t),t},clearStack:function(){n.clear(),a.clear(),l.fire(t())},createUndoCheckpoint:function(){return{lastActualCommand:n.isEmpty()?null:n.head()}},endUndoMacro:function(){var t=Object(o.ensureDefined)(i.pop());t.isEmpty()||e(t)},pushUndoCommand:e,redo:function(){if(a.isEmpty())return!1;var e=a.pop();return!!e&&(e.redo(),n.push(e),p.logNormal("REDO: "+e.text()),l.fire(t()),!0)},redoStack:function(){return a},setWatchedValue:function(t,i,n){if(t.value()!==i){var o=new c(t,i,n);e(o),o.redo()}},undo:function(){if(n.isEmpty())return!1;var e=n.pop();return!!e&&(e.undo(),a.push(e),p.logNormal("UNDO: "+e.text()),l.fire(t()),!0)},undoStack:function(){return n},undoToCheckpoint:function(e){for(;!n.isEmpty()&&e.lastActualCommand!==n.head();)n.pop().undo();a.clear(),l.fire(t())},state:t,onChange:function(){return l}}}var o,r,s,a,l,c,u,h,d,p;i.r(t),o=i("Eyy1"),r=i("MY2c"),s=i("bOGh"),a=i("mrSG"),
l=i("RDU5"),c=function(e){function t(t,i,n){var o=e.call(this,n)||this;return o._wv=t,o._newValue=i,o._oldValue=t.value(),o}return Object(a.__extends)(t,e),t.prototype.redo=function(){this._wv.setValue(this._newValue)},t.prototype.undo=function(){this._wv.setValue(this._oldValue)},t}(l.UndoCommand),u=i("uOxu"),h=i("aIyQ"),d=i.n(h),i.d(t,"createUndoHistory",function(){return n}),p=Object(u.getLogger)("Common.UndoHistory")},xUGI:function(e,t,i){"use strict";function n(e){this._fibLevelsBasedOnLogScaleProperty=e,this._sourcesToRow={},this._rowsToSources={},this._currentSymbol="",this._actualCapacity=0,this._actualWidth=1,this._numericFormatter=new r,this._percentageFormatter=new o}var o=i("GH0z").PercentageFormatter,r=i("zXvd").NumericFormatter,s=i("zDbI").CHART_FONT_FAMILY,a=i("d1Pk").fibLevelPrice;n.prototype.levelsCount=function(){return 0},n.prototype.topByRow=function(e){return e*n.ROW_HEIGHT},n.prototype.rowHeight=function(e){return n.ROW_HEIGHT},n.prototype.canvas=function(){this._canvas||(this._canvas=document.createElement("canvas"),this._cache=this._canvas.getContext("2d"),this._canvas.width=100,this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.zIndex="1000",this._canvas.style.left="0",this._canvas.getContext("2d").font="12px "+s);return this._canvas},n.ROW_HEIGHT=14,n.prototype.points=function(e){return[e.points()[0],e.points()[1]]},n.prototype.startPoint=function(e,t){var i,n=t?e.points()[0].price:e.points()[1].price;return this._calculateLogLevels(e)?(i=e.ownerSource().firstValue(),{price:n,coordinate:e.priceScale().priceToCoordinate(n,i,!0)}):{price:n}},n.prototype.priceRange=function(e,t){var i,n,o,r,s=this.points(e),a=s[0],l=s[1],c=t?l.price-a.price:a.price-l.price;return this._calculateLogLevels(e)?(i=e.priceScale(),n=e.ownerSource().firstValue(),o=i.priceToCoordinate(a.price,n,!0),r=i.priceToCoordinate(l.price,n,!0),{price:c,coordinate:t?r-o:o-r}):{price:c}},n.prototype.sourceIsReady=function(e){return e.points().length>=2},n.prototype._calculateLogLevels=function(e){return e.fibLevelsBasedOnLogScale&&e.fibLevelsBasedOnLogScale()},n.prototype._calculateWidth=function(e){var t,i,n,o,r,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P;if(!this.sourceIsReady(e))return null;if((t=this.canvas().getContext("2d")).font="12px "+s,i=!!e.properties().showPrices&&e.properties().showPrices.value(),n=!!e.properties().coeffsAsPercents&&e.properties().coeffsAsPercents.value(),o=e.properties().showCoeffs.value(),l=(r=this.points(e))[0],c=r[1],!l||!c)return null;if(null===(u=e.ownerSource().firstValue()))return 0;for(h=!1,(d=e.properties()).reverse&&d.reverse.value()&&(h=d.reverse.value()),p=this.startPoint(e,h),_=this.priceRange(e,h),f=this._calculateLogLevels(e),m=0,y=[],g=1;g<=this.levelsCount();g++)v=d["level"+g].coeff.value(),S="",o&&(S+=n?this._percentageFormatter.format(Math.round(1e4*v)/100):this._numericFormatter.format(v)),i&&(b=e.priceScale(),w=a(p,_,v,b,u,f),S+="("+b.formatPrice(w,u)+")"),P={text:S,left:m,width:t.measureText(S).width+4},y.push(P),m+=P.width;return{totalWidth:m,cells:y}},
n.prototype._effectiveState=function(e){var t,i,n,o,r={},s=e.properties();for(s.showPrices&&(r.showPrices=s.showPrices.value()),s.coeffsAsPercents&&(r.coeffsAsPercents=s.coeffsAsPercents.value()),r.showCoeffs=s.showCoeffs.value(),(t=e.priceScale())&&(t.formatter().state&&(r.formatter=e.priceScale().formatter().state()),r.logLevels=this._calculateLogLevels(e)),s.reverse&&(r.reverse=s.reverse.value()),r.p1=e.points()[0],r.p2=e.points()[1],3===e.points().length&&(r.p3=e.points()[2]),r.items=[],i=1;i<=this.levelsCount();i++)o={coeff:(n=s["level"+i]).coeff.value(),color:n.color.value()},r.items.push(o);return r},n.prototype._findEmptyRow=function(e){for(var t,i=0;this._rowsToSources[i];)i++;return this._rowsToSources[i]=e,i>=this._actualCapacity&&(this._actualCapacity++,t=this.canvas(),TradingView.resizeCanvas(t,this._actualWidth,n.ROW_HEIGHT*this._actualCapacity)),i},n.prototype._repaintSource=function(e,t,i){var o,r,a=n.ROW_HEIGHT*i.row,l=this.canvas().getContext("2d");for(l.clearRect(0,a,this._actualWidth,n.ROW_HEIGHT),l.textBaseline="bottom",l.font="12px "+s,a+=n.ROW_HEIGHT,o=0;o<e.cells.length;o++)r=e.cells[o],l.fillStyle=t.items[o].color,l.fillText(r.text,r.left,a)},n.prototype.removeSource=function(e){var t,i;this._sourcesToRow[e]&&(t=this._sourcesToRow[e].row,(i=this.canvas().getContext("2d")).save(),i.clearRect(0,this.topByRow(t),this._actualWidth,n.ROW_HEIGHT),i.restore(),delete this._sourcesToRow[e],delete this._rowsToSources[t])},n.prototype._effectiveStatesEquals=function(e,t){var i,n=function(e,t){return!(!e&&!t)&&(!(!e||t)||(!(e||!t)||(e.minMove!==t.minMove||(e.minMove2!==t.minMove2||(e.fractional!==t.fractional||e.fractionalLength!==t.fractionalLength)))))},o=function(e,t){return!(!e&&!t)&&(!(!e||t)||(!(e||!t)||(e.index!==t.index||e.price!==t.price)))},r=function(e,t){return e.coeff!==t.coeff||e.color!==t.color};if(e&&!t)return!1;if(!e&&t)return!1;if(e.showPrices!==t.showPrices)return!1;if(e.coeffsAsPercents!==t.coeffsAsPercents)return!1;if(e.showCoeffs!==t.showCoeffs)return!1;if(e.reverse!==t.reverse)return!1;if(e.logLevels!==t.logLevels)return!1;if(n(e.formatter,t.formatter))return!1;if(o(e.p1,t.p1))return!1;if(o(e.p2,t.p2))return!1;if(o(e.p3,t.p3))return!1;if(e.items.length!==t.items.length)return!1;for(i=0;i<e.items.length;i++)if(r(e.items[i],t.items[i]))return!1;return!0},n.prototype.updateSource=function(e){var t,i,o,r,s=e.properties().symbol.value();return this._currentSymbol!==s&&(this._currentSymbol=s,this._sourcesToRow={},this._rowsToSources={}),this._sourcesToRow[e.id()]||(t=this._findEmptyRow(e.id()),this._sourcesToRow[e.id()]={effectiveState:null,row:t}),i=this._sourcesToRow[e.id()].effectiveState,o=this._effectiveState(e),this._effectiveStatesEquals(i,o)||((r=this._calculateWidth(e))?(this._sourcesToRow[e.id()].effectiveState=o,r.totalWidth>this._actualWidth&&(TradingView.resizeCanvas(this.canvas(),r.totalWidth,n.ROW_HEIGHT*this._actualCapacity),this._actualWidth=r.totalWidth),t=this._sourcesToRow[e.id()],this._repaintSource(r,o,t),this._sourcesToRow[e.id()].effectiveState=o,
this._sourcesToRow[e.id()].preparedCells=r):this._sourcesToRow[e.id()].effectiveState=null),this._sourcesToRow[e.id()]},e.exports=n},xWfy:function(e,t,i){"use strict";function n(){return new l}function o(e){return new l("state",e)}function r(e){var t,i,n,o,r,a=function(e){var t,i=new Set;e.horizlines().forEach(function(e,t){e.forEach(function(e){i.add(e.startIndex),i.add(e.endIndex)})}),e.vertlines().forEach(function(e,t){e.forEach(function(e){i.add(e.index)})}),e.lines().forEach(function(e,t){e.forEach(function(e){i.add(e.startIndex),i.add(e.endIndex)})}),e.textmarks().forEach(function(e,t){e.forEach(function(e){i.add(e.time)})}),e.shapemarks().forEach(function(e,t){e.forEach(function(e){i.add(e.time)})}),e.backgrounds().forEach(function(e,t){e.forEach(function(e){i.add(e.start),i.add(e.stop)})}),e.polygons().forEach(function(e,t){e.forEach(function(e){e.points.forEach(function(e){i.add(e.index)})})}),e.trendchannels().forEach(function(e,t){e.forEach(function(e){i.add(e.startIndex),i.add(e.endIndex)})}),e.hhists().forEach(function(e,t){e.forEach(function(e){i.add(e.firstBarTime),i.add(e.lastBarTime)})}),e.dwglabels().forEach(function(e,t){e.forEach(function(e){i.add(e.x)})}),e.dwglines().forEach(function(e,t){e.forEach(function(e){i.add(e.x1),i.add(e.x2)})});t=Array.from(i);return t.sort(function(e,t){return e-t}),t}(e),l={indexes:a},c={currentId:0};return l.vertlines=(t=e.vertlines(),i=c,n=a,o=s.a,r=[],t.forEach(function(e,t){e.forEach(function(e){!function(e,t,i){var n,o,r,s=null;for(n=0,o=e;n<o.length;n++)(r=o[n]).styleId===t&&(s=r);null===s&&(s={styleId:t,data:[]},e.push(s)),s.data.push(i)}(r,t,o(e,++i.currentId,n))})}),r.length>0?r:void 0),l}var s,a,l;i.d(t,"a",function(){return l}),i.d(t,"b",function(){return n}),i.d(t,"c",function(){return o}),i.d(t,"d",function(){return r}),s=i("SqfW"),a=i("7Fue"),l=function(){function e(e,t){var i,n,o,r,l,c;this._indexes=[],this._horizlines=new Map,this._vertlines=new Map,this._lines=new Map,this._hlines=new Map,this._textmarks=new Map,this._shapemarks=new Map,this._backgrounds=new Map,this._polygons=new Map,this._trendchannels=new Map,this._hhists=new Map,this._dwglabels=new Map,this._dwglines=new Map,"data"===e?(i=t,this._indexes=i.indexes,this._vertlines=(o=i.vertlines,r=this._indexes,l=s.b,c=new Map,o.forEach(function(e,t){var i=c.get(t)||new Set;e.forEach(function(e){var t=l(e,r);null!==t&&i.add(t)}),c.set(t,i)}),c)):"state"===e&&(n=t,this._indexes=n.indexes||[],this._vertlines=function(e,t,i){var n,o,r,s=new Map;if(void 0===e)return s;for(n=function(e){var n=e.styleId,o=s.get(n)||new Set;e.data.forEach(function(e){var n=i(e,t);null!==n&&o.add(n)}),s.set(n,o)},o=0,r=e;o<r.length;o++)n(r[o]);return s}(n.vertlines,this._indexes,s.b)),this._hhistsByTimePointIndex=Object(a.b)(this._hhists)}return e.prototype.horizlines=function(){return this._horizlines},e.prototype.vertlines=function(){return this._vertlines},e.prototype.lines=function(){return this._lines},e.prototype.hlines=function(){return this._hlines},e.prototype.textmarks=function(){return this._textmarks},
e.prototype.shapemarks=function(){return this._shapemarks},e.prototype.backgrounds=function(){return this._backgrounds},e.prototype.polygons=function(){return this._polygons},e.prototype.trendchannels=function(){return this._trendchannels},e.prototype.hhists=function(){return this._hhists},e.prototype.dwglabels=function(){return this._dwglabels},e.prototype.dwglines=function(){return this._dwglines},e.prototype.hhistsByTimePointIndex=function(){return this._hhistsByTimePointIndex},e}()},xdS3:function(e,t,i){},xnA2:function(e,t,i){"use strict";function n(){a.call(this)}function o(e,t){this._constructor="LineToolFibChannel";var s=t||o.createProperties();r.call(this,e,s),this.version=o.version,e._fibChannelLabelsCache||(e._fibChannelLabelsCache=new n),i.e("lt-pane-views").then(function(e){var t=i("CR3a").FibChannelPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var r=i("Ss5c").LineDataSource,s=i("5rJj"),a=i("xUGI"),l=i("hayr").propertyPages,c=window.t("Fib Channel");inherit(n,a),n.prototype.levelsCount=function(){return o.LevelsCount},inherit(o,r),o.LevelsCount=24,o.version=2,o.prototype.levelsCount=function(){return o.LevelsCount},o.prototype.migrateVersion=function(e,t,i){i.properties.removeProperty("reverse")},o.prototype.pointsCount=function(){return 3},o.prototype.title=function(){return c},o.prototype.name=function(){return"Fib Channel"},o.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},o.prototype.getStylesPropertyPage=function(){return l.LineToolFibChannelStylesPropertyPage},o.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("17v9").FibDrawingsWith24LevelsDefinitionsViewModel}.bind(null,i)).catch(i.oe)},o.createProperties=function(e){var t=new s("linetoolfibchannel",e,!1,{range:[1,24],names:["coeff","color","visible"]});return o._configureProperties(t),t},o._configureProperties=function(e){r._configureProperties(e)},t.LineToolFibChannel=o},xrEm:function(e,t,i){},"xz+e":function(e,t,i){"use strict";function n(e,t){var o=t||n.createProperties();h.call(this,e,o),this.version=n.version,i.e("lt-pane-views").then(function(e){var t=i("Ht/7").ElliottLabelsPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}function o(e,t){n.call(this,e,t)}function r(e,t){this._constructor="LineToolElliottImpulse";var i=t||r.createProperties();o.call(this,e,i)}function s(e,t){this._constructor="LineToolElliottTriangle";var i=t||s.createProperties();o.call(this,e,i)}function a(e,t){this._constructor="LineToolElliottTripleCombo";var i=t||a.createProperties();o.call(this,e,i)}function l(e,t){n.call(this,e,t)}function c(e,t){this._constructor="LineToolElliottCorrection";var i=t||c.createProperties();l.call(this,e,i)}function u(e,t){var i=t||u.createProperties();l.call(this,e,i),this._constructor="LineToolElliottDoubleCombo"}
var h=i("Ss5c").LineDataSource,d=i("7KDR").Action,p=i("Ocx9").DefaultProperty,_=i("hayr").propertyPages,f=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],m=window.t("Elliott Impulse Wave (12345)"),y=window.t("Elliott Triangle Wave (ABCDE)"),g=window.t("Elliott Triple Combo Wave (WXYXZ)"),v=window.t("Elliott Correction Wave (ABC)"),S=window.t("Elliott Double Combo Wave (WXY)"),b=[{value:f[0],title:window.t("Supermillennium")},{value:f[1],title:window.t("Millennium")},{value:f[2],title:window.t("Submillennium")},{value:f[3],title:window.t("Grand Supercycle")},{value:f[4],title:window.t("Supercycle")},{value:f[5],title:window.t("Cycle")},{value:f[6],title:window.t("Primary")},{value:f[7],title:window.t("Intermediate")},{value:f[8],title:window.t("Minor",{context:"wave"})},{value:f[9],title:window.t("Minute",{context:"wave"})},{value:f[10],title:window.t("Minuette")},{value:f[11],title:window.t("Subminuette")},{value:f[12],title:window.t("Micro")},{value:f[13],title:window.t("Submicro")},{value:f[14],title:window.t("Miniscule")}];inherit(n,h),n.version=4,n.migrateState=function(e){var t={0:11,1:10,2:9,3:8,4:7,5:6,6:5,7:4,8:3},i={0:11,1:8};"LineToolElliottSubminuette"===e.type&&(e.type="LineToolElliottImpulse",e.state.degree=t[e.state.wavesize]),"LineToolElliottMinor"===e.type&&(e.type="LineToolElliottImpulse",e.state.degree=t[e.state.wavesize]),"LineToolElliottCircle"===e.type&&(e.type="LineToolElliottImpulse",e.state.degree=t[e.state.wavesize]),"LineToolElliottMinorRetr"===e.type&&(e.type="LineToolElliottCorrection",e.state.degree=i[e.state.wavesize]),"LineToolElliottMajorRetr"===e.type&&(e.type="LineToolElliottCorrection",e.state.degree=i[e.state.wavesize])},n.prototype.migrateVersion=function(e,t,i){if(i.properties.hasChild("background")&&i.properties.removeProperty("background"),i.properties.hasChild("backgroundColor")&&i.properties.removeProperty("backgroundColor"),i.properties.hasChild("showBackground")&&i.properties.removeProperty("showBackground"),1===e){var n=Object.assign({},this._timePoint[0]);this._timePoint.unshift(n),this._points.length>0&&(n=Object.assign({},this._points[0]),this._points.unshift(n))}},n.prototype.applyTemplate=function(e){delete e.background,delete e.backgroundColor,delete e.showBackground,h.prototype.applyTemplate.call(this,e)},n.prototype.title=function(){return"Elliott Labels"},n.prototype.name=function(){return"Elliott Labels"},n.prototype.additionalActions=function(e){var t=this,i=new d({label:window.t("Degree"),subItems:f.map(function(i){var n=b.filter(function(e){return e.value===i})[0];return new d({label:n.title,checkable:!0,checked:t.properties().degree.value()===i,onExecute:function(){e.setProperty(t.properties().degree,i,"Change Elliott Degree")}})})});return[i]},n.prototype.label=function(e){var t=f.length-this.properties().degree.value()-1,i=Math.floor(t/3),n=t%3,o=4*Math.floor(i),r=!!(i%2),s=["","brackets","circle"][n],a=this.labelsGroup(),l=a[i][e];return{fontIncrease:o,bold:r,decoration:s,label:l}},n.prototype.getStylesPropertyPage=function(){
return _.LineToolElliottStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("UHSU").ElliottPatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.prototype.availableDegreesValues=function(){return b},n.prototype.getDegrees=function(){return b.map(function(e){return e.title})},n.createProperties=function(e){var t=new p("linetoolelliott",e);return n._configureProperties(t),t},n._configureProperties=function(e){h._configureProperties(e)},inherit(o,n),o.prototype.pointsCount=function(){return 6},o._configureProperties=function(e){n._configureProperties(e)},inherit(r,o),r._labelsGroups=[["0","1","2","3","4","5"],["0","i","ii","iii","iv","v"],["0","1","2","3","4","5"],["0","I","II","III","IV","V"],["0","1","2","3","4","5"]],r.prototype.title=function(){return m},r.prototype.name=function(){return"Elliott Impulse Wave (12345)"},r.prototype.labelsGroup=function(){return r._labelsGroups},r.createProperties=function(e){var t=new p("linetoolelliottimpulse",e);return r._configureProperties(t),t},r._configureProperties=function(e){o._configureProperties(e)},inherit(s,o),s._labelsGroups=[["0","A","B","C","D","E"],["0","a","b","c","d","e"],["0","A","B","C","D","E"],["0","a","b","c","d","e"],["0","A","B","C","D","E"]],s.prototype.title=function(){return y},s.prototype.name=function(){return"Elliott Triangle Wave (ABCDE)"},s.prototype.labelsGroup=function(){return s._labelsGroups},s.createProperties=function(e){var t=new p("linetoolelliotttriangle",e);return s._configureProperties(t),t},s._configureProperties=function(e){o._configureProperties(e)},inherit(a,o),a._labelsGroups=[["0","W","X","Y","X","Z"],["0","w","x","y","x","z"],["0","W","X","Y","X","Z"],["0","w","x","y","x","z"],["0","W","X","Y","X","Z"]],a.prototype.title=function(){return g},a.prototype.name=function(){return"Elliott Triple Combo Wave (WXYXZ)"},a.prototype.labelsGroup=function(){return a._labelsGroups},a.createProperties=function(e){var t=new p("linetoolelliotttriplecombo",e);return a._configureProperties(t),t},a._configureProperties=function(e){o._configureProperties(e)},inherit(l,n),l.prototype.pointsCount=function(){return 4},l._configureProperties=function(e){n._configureProperties(e)},inherit(c,l),c._labelsGroups=[["0","A","B","C"],["0","a","b","c"],["0","A","B","C"],["0","a","b","c"],["0","A","B","C"]],c.prototype.title=function(){return v},c.prototype.name=function(){return"Elliott Correction Wave (ABC)"},c.prototype.labelsGroup=function(){return c._labelsGroups},c.createProperties=function(e){var t=new p("linetoolelliottcorrection",e);return c._configureProperties(t),t},c._configureProperties=function(e){l._configureProperties(e)},inherit(u,l),u._labelsGroups=[["0","W","X","Y"],["0","w","x","y"],["0","W","X","Y"],["0","w","x","y"],["0","W","X","Y"]],u.prototype.title=function(){return S},u.prototype.name=function(){return"Elliott Double Combo Wave (WXY)"},u.prototype.labelsGroup=function(){return u._labelsGroups},
u.createProperties=function(e){var t=new p("linetoolelliottdoublecombo",e);return u._configureProperties(t),t},u._configureProperties=function(e){l._configureProperties(e)},t.LineToolElliott=n,t.LineToolElliottImpulse=r,t.LineToolElliottTriangle=s,t.LineToolElliottTripleCombo=a,t.LineToolElliottCorrection=c,t.LineToolElliottDoubleCombo=u},yMne:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"HEADER_TOOLBAR_HEIGHT_EXPANDED",function(){return o}),i.d(t,"HEADER_TOOLBAR_HEIGHT_COLLAPSED",function(){return r}),n=i("J2xC"),o=parseInt(n["css-value-header-toolbar-height"]),r=3},yUly:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolTrendBasedFibTime";var r=t||n.createProperties();o.call(this,e,r),this.version=n.version,i.e("lt-pane-views").then(function(e){var t=i("SvjA").TrendBasedFibTimePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("5rJj"),s=i("hayr").propertyPages,a=window.t("Trend-Based Fib Time");inherit(n,o),n.LevelsCount=11,n.prototype.levelsCount=function(){return n.LevelsCount},n.version=1,n.prototype.pointsCount=function(){return 3},n.prototype.title=function(){return a},n.prototype.name=function(){return"Trend-Based Fib Time"},n.prototype.migrateVersion=function(e,t,i){},n.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},n.prototype.getStylesPropertyPage=function(){return s.LineToolTrendBasedFibTimeStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("u52p").TrendBasedFibTimeDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new r("linetooltrendbasedfibtime",e,!1,{range:[1,11]});return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolTrendBasedFibTime=n},yfAl:function(e,t,i){"use strict";var n,o,r,s,a,l,c,u;i.r(t),i.d(t,"PaneBase",function(){return u}),n=i("aO4+"),o=i("Eyy1"),r=i("aIyQ"),s=i.n(r),a=i("0waE"),l=i("Y7w9"),c=i("s1Gx"),u=function(){function e(){this._id=Object(a.randomHashN)(6),this._sourcesById=new Map,this._dataSourcesCollectionChanged=new s.a,this._tagsChanged=new s.a,this._stretchFactor=1e3}return e.prototype.id=function(){return this._id},e.prototype.dataSourceForId=function(e){return this._sourcesById.get(e)||null},e.prototype.replaceSource=function(e,t,i){var n=e.zorder();this.insertDataSource(t,i,n),this.removeDataSource(e),this._sourcesById.set(t.id(),t)},e.prototype.setZOrder=function(e,t){e.setZorder(t),this._invalidateSourcesCache(),this._dataSourcesCollectionChanged.fire()},e.prototype.setZOrders=function(e){e.forEach(function(e,t){t.setZorder(e)}),this._invalidateSourcesCache(),this._dataSourcesCollectionChanged.fire(),this.model().lightUpdate()},e.prototype.containsMainSeries=function(){return this._sourcesById.has(this.model().mainSeries().id())},e.prototype.sendToBack=function(e){
this._batchReorder(e,0,l.moveBefore)},e.prototype.bringToFront=function(e){var t=this.allOrderedSourcesWithoutSpecial().length-1;this._batchReorder(e,t,l.moveAfter)},e.prototype.sendBackward=function(e){var t,i=this.allOrderedSources(),n=i.indexOf(e[0]);0===n?this.bringToFront(e):(t=i[n-1],this.insertBefore(e,t))},e.prototype.bringForward=function(e){var t,i=this.allOrderedSourcesWithoutSpecial(),n=i.indexOf(e[e.length-1]);n===i.length-1?this.sendToBack(e):(t=i[n+1],this.insertAfter(e,t))},e.prototype.insertAfter=function(e,t){var i=this.allOrderedSources(),n=i.indexOf(t);this._batchReorder(e,n,l.moveAfter)},e.prototype.insertBefore=function(e,t){var i=this.allOrderedSources(),n=i.indexOf(t);this._batchReorder(e,n,l.moveBefore)},e.prototype.setPaneSize=function(e){var t;switch(e){case"large":t=1;break;case"medium":t=.6;break;case"small":t=.3;break;case"tiny":t=.15;break;default:throw new Error("Unknown size enum value: "+e)}this._stretchFactor=1e3*t},e.prototype.stretchFactor=function(){return this._stretchFactor},e.prototype.setStretchFactor=function(e){this._stretchFactor=e},e.prototype.onTagsChanged=function(){return this._tagsChanged},e.prototype.dataSourcesCollectionChanged=function(){return this._dataSourcesCollectionChanged},e.prototype.allOrderedSourcesWithoutSpecial=function(){return this.allOrderedSources().filter(function(e){return e.zorder()<c.specialZOrderBase})},e.prototype.logicalRectToPixels=function(e){var t=this.defaultPriceScale(),i=this.timeScale(),r=Object(o.ensureNotNull)(Object(o.ensureNotNull)(t.mainSource()).firstValue()),s=t.priceToCoordinate(e.p1.price,r),a=i.indexToCoordinate(e.p1.index),l=t.priceToCoordinate(e.p2.price,r),c=i.indexToCoordinate(e.p2.index),u=new n.Point(Math.min(a,c),Math.min(s,l)),h=new n.Point(Math.max(a,c),Math.max(s,l));return Object(n.box)(u,h)},e.prototype._batchReorder=function(e,t,i){var n=this.allOrderedSources(),o=i(n,e,t);o.forEach(function(e,t){return e.setZorder(t+1)}),this._invalidateSourcesCache(),this._dataSourcesCollectionChanged.fire(),this.model().lightUpdate()},e}()},yi8X:function(e,t,i){"use strict";var n,o,r,s,a,l;i.r(t),i.d(t,"LineToolInfoLine",function(){return l}),n=i("mrSG"),o=i("Ocx9"),r=i("WPQD"),s=i("hayr"),a=window.t("Info Line"),(l=function(e){function t(i,n){var o=e.call(this,i,n||t.createProperties())||this;return o._constructor="LineToolInfoLine",o}return Object(n.__extends)(t,e),t.prototype.pointsCount=function(){return 2},t.prototype.title=function(){return a},t.prototype.name=function(){return"Info Line"},t.prototype.getStylesPropertyPage=function(){return s.propertyPages.LineToolInfoLineStylesPropertyPage},t.createProperties=function(e){var i=new o.DefaultProperty("linetoolinfoline",e);return t._configureProperties(i),i},t._configureProperties=function(e){r.LineToolTrendLine._configureProperties(e)},t}(r.LineToolTrendLine)).prototype.superclass=r.LineToolTrendLine},"z+Sa":function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"SeriesHorizontalBaseLinePaneView",function(){return s}),n=i("mrSG"),o=i("aO4+"),r=i("k4w6"),s=function(e){
function t(t){return e.call(this,t)||this}return Object(n.__extends)(t,e),t.prototype._updateImpl=function(){var e,t;this._lineRendererData.visible=!1,((e=this._series.priceScale().mode()).percentage||e.indexedTo100)&&null!==(t=this._series.firstValue())&&(this._lineRendererData.visible=!0,this._lineRendererData.points=[new o.Point(0,this._series.priceScale().priceToCoordinate(t,t))],this._lineRendererData.width=this._model.timeScale().width(),this._lineRendererData.height=this._series.priceScale().height(),this._lineRendererData.color=this._series.properties().baseLineColor.value())},t}(r.a)},"z61+":function(e,t,i){"use strict";function n(e){return"strategy_props"===e.groupId}var o,r,s,a,l,c,u,h,d,p,_,f,m;i.r(t),i.d(t,"MetaInfoHelper",function(){return f}),o=i("mrSG"),r=i("Eyy1"),s=i("0YCj"),a=i.n(s),l=i("23IT"),c=i("ogJP"),u=i("uOxu"),h=i("W5mg"),d=i("Ecpn"),_=Object(u.getLogger)("Platform.GUI.PropertyDialog.Indicators.MetaInfo"),f=function(){function e(e){this._metaInfo=e}return e.prototype.hasUserEditableInputs=function(){return this._metaInfo.inputs.some(h.a)},e.prototype.getUserEditableInputs=function(){return this._metaInfo.inputs.filter(h.a)},e.prototype.hasUserEditableProperties=function(){return a.a.isScriptStrategy(this._metaInfo)},e.prototype.hasUserEditableStyles=function(){var e=this._metaInfo;return this.getUserEditablePlots().length>0||void 0!==e.bands||void 0!==e.filledAreas||Object(d.a)(e.shortId)||Object.values(e.graphics).some(function(e){return void 0!==e})},e.prototype.getUserEditablePlots=function(){var e=new Set,t=this._metaInfo;return t.plots.filter(function(i){var n,o,s;return!(Object(l.isColorerPlot)(i)||Object(l.isTextColorerPlot)(i)||Object(l.isDataOffsetPlot)(i)||Object(l.isOhlcColorerPlot)(i)||Object(l.isAlertConditionPlot)(i))&&(Object(l.isOhlcPlot)(i)?(n=i.target,!e.has(n)&&(e.add(n),o=Object(r.ensureDefined)(t.ohlcPlots),!Object(r.ensureDefined)(o[n]).isHidden)):void 0===(s=t.styles?t.styles[i.id]:void 0)||!s.isHidden)})},e.prototype.hasUserEditableOptions=function(){return this.hasUserEditableInputs()||this.hasUserEditableProperties()||this.hasUserEditableStyles()},e.prototype.getStrategyProperties=function(){var e,t,i,s,a,l=this._metaInfo,u=l.inputs.filter(n),h=Object(o.__assign)({},m);for(e=0,t=u;e<t.length;e++)h[s=(i=t[e]).internalID]=i,m.hasOwnProperty(s)||_.logWarn("Unknown strategy input internal id "+s+" in "+l.fullId);return Object(c.clone)((a=h,Object.values(a).forEach(r.ensureDefined),a))},e}(),(p={}).currency=void 0,p.backtest_fill_limits_assumption=void 0,p.calc_on_every_tick=void 0,p.calc_on_order_fills=void 0,p.commission_value=void 0,p.commission_type=void 0,p.initial_capital=void 0,p.pyramiding=void 0,p.slippage=void 0,p.default_qty_type=void 0,p.default_qty_value=void 0,m=p},"z8/4":function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"OverlayLegendView",function(){return s}),n=i("mrSG"),o=i("JjUe"),r=i("n5al"),s=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._additional=null,
n._showBarChange=i.properties().paneProperties.legendProperties.showBarChange,n._showSeriesOHLC=i.properties().paneProperties.legendProperties.showSeriesOHLC,n._seriesStyle=t.properties().childs().style,n._studyOverlay=t,n._showBarChange.subscribe(n,n.update),n._showSeriesOHLC.subscribe(n,n.update),n}return Object(n.__extends)(t,e),t.prototype.isValuesVisible=function(){return this._showSeriesOHLC.value()||this._showBarChange.value()},t.prototype.additional=function(){return this._additional},t.prototype.destroy=function(){this._showBarChange.unsubscribeAll(this),this._showSeriesOHLC.unsubscribeAll(this)},t.prototype._updateImpl=function(){var t,i,n,o;e.prototype._updateImpl.call(this),this._showLastPriceAndChangeOnly()||(t=Object(r.isPriceSourceStyle)(this._seriesStyle.value()),n=(i=this._showSeriesOHLC.value())&&!t,o=i&&t,this._items[0].setVisible(n),this._items[1].setVisible(n),this._items[2].setVisible(n),this._items[3].setVisible(n),this._items[6].setVisible(this._showBarChange.value()),this._items[4].setVisible(o))},t}(o.OverlayDataWindowView)},zDbI:function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"CHART_FONT_FAMILY",function(){return s}),n=i("qFKp"),o="'Trebuchet MS', Roboto, Ubuntu, sans-serif",r="system-ui, -apple-system",s=Object(n.isOnMobileAppPage)("old")?r:o},zL3Q:function(e,t,i){"use strict";function n(){var e=s.pressedKeys.value(),t=255&e,i=Boolean(e&s.Modifiers.Mod)&&(17===t||91===t),n=i&&(Object(h.isLineToolName)(u.tool.value())||u.isToolEditingNow.value()),o=Object(u.properties)().childs().magnet.value();d.setValue(n?!o:o),p.setValue(!o&&n?c.MagnetMode.StrongMagnet:Object(u.properties)().childs().magnetMode.value())}function o(){return d}function r(){return p}var s,a,l,c,u,h,d,p;i.d(t,"a",function(){return o}),i.d(t,"b",function(){return r}),s=i("lxNp"),a=i("hY0g"),l=i.n(a),c=i("4o++"),u=i("mMWL"),h=i("CW80"),d=new l.a(!1),p=new l.a(c.MagnetMode.WeakMagnet),Object(u.runOnDrawingStateReady)(function(){Object(u.properties)().childs().magnet.subscribe(null,n),Object(u.properties)().childs().magnetMode.subscribe(null,n),s.pressedKeys.subscribe(n),u.tool.subscribe(n),u.isToolEditingNow.subscribe(n),n()})},zRdu:function(e,t,i){"use strict";var n;i.d(t,"a",function(){return n}),function(e){e[e.Separator=0]="Separator",e[e.Action=1]="Action",e[e.ActionAsync=2]="ActionAsync"}(n||(n={}))},zUrt:function(e,t,i){"use strict";var n,o;i.r(t),i.d(t,"backend",function(){return o}),n=i("Ery9"),o=n},zXvd:function(e,t,i){"use strict";var n,o;i.r(t),i.d(t,"NumericFormatter",function(){return o}),n=i("kcTO"),o=function(){function e(e){this._precision=e}return e.prototype.format=function(t){return(void 0!==this._precision?t.toFixed(this._precision):e.formatNoE(t)).replace(".",n.formatterOptions.decimalSign)},e.prototype.parse=function(e){var t=e.replace(n.formatterOptions.decimalSign,"."),i=parseFloat(t);return this._precision&&(i=+i.toFixed(this._precision)),i},e.formatNoE=function(e){return e>=1e-15&&e<1?e.toFixed(15).replace(/\.?0+$/,""):String(e)},e}()},zZ5f:function(e,t,i){"use strict";function n(e,t){
this._constructor="LineToolFibSpeedResistanceFan";var r=t||n.createProperties();o.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("xp9B").FibSpeedResistanceFanPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("5rJj"),s=i("hayr").propertyPages,a=window.t("Fib Speed Resistance Fan");inherit(n,o),n.HLevelsCount=7,n.VLevelsCount=7,n.prototype.hLevelsCount=function(){return n.HLevelsCount},n.prototype.vLevelsCount=function(){return n.VLevelsCount},n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return a},n.prototype.name=function(){return"Fib Speed Resistance Fan"},n.prototype.processErase=function(e,t){var i="h"===t.type?"hlevel"+t.index:"vlevel"+t.index,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},n.prototype.getStylesPropertyPage=function(){return s.LineToolFibSpeedResistanceFanStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("2PB4").FibSpeedResistanceFanDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new r("linetoolfibspeedresistancefan",e,!1,{range:[1,7],prefixes:["h","v"],names:["coeff","color","visible"]});return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolFibSpeedResistanceFan=n},ziJ5:function(e,t,i){"use strict";(function(e){function n(e){this._line=e,this._data={bodyText:"position",quantityText:"0"},this._closeEnabled=!0,this._direction="buy",this._profitState="neutral"}function o(e){return null==e?e="":e+="",e}function r(e,t){var o,a,l,c,u,d;this._adapter=new n(this),this._constructor="LineToolPosition",o=t||r.createProperties(),s.call(this,e,o),i.e("lt-pane-views").then(function(e){var t=i("GzSs").PositionPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe),l=null!==(a=e.mainSeries().symbolInfo())?a.pricescale:100,c=null!==a&&a.fractional?a.minmov:1,u=null!==a&&a.fractional,d=null!==a?a.minmove2:void 0,this._formatter=new h(l,c,u,d)}var s=i("QIuV"),a=i("Ss5c").LineDataSource,l=i("RTYN").PositionAveragePriceAxisView,c=i("jkoZ"),u=i("Ocx9").DefaultProperty,h=i("kcTO").PriceFormatter,d=i("s1Gx").sortSourcesPreOrdered,p=d.LineToolPosition;n.prototype.setDirection=function(e){return this._direction=e,this._line.updateAllViewsAndRedraw(),this},n.prototype.setProfitState=function(e){return this._profitState=e,this._line.updateAllViewsAndRedraw(),this},n.prototype.getPrice=function(){return this._line.points().length>0?this._line.points()[0].price:this._line._timePoint.length>0?this._line._timePoint[0].price:void 0},n.prototype.setPrice=function(e){if(this._line.points().length>0){var t=this._line.points()[0];t.price=e,this._line._points[0]=t,this._line.normalizePoints(),this._line.updateAllViewsAndRedraw()}return this._line._timePoint.length>0&&(this._line._timePoint[0].price=e),this},n.prototype.getText=function(){
return this._data.bodyText},n.prototype.setText=function(e){return this._data.bodyText=e||"",this._line.updateAllViewsAndRedraw(),this},n.prototype.setTooltip=function(e){return this._line.properties().tooltip.setValue(o(e)),this},n.prototype.getTooltip=function(){return this._line.properties().tooltip.value()},n.prototype.setProtectTooltip=function(e){return this._line.properties().protectTooltip.setValue(o(e)),this},n.prototype.getProtectTooltip=function(){return this._line.properties().protectTooltip.value()},n.prototype.setCloseTooltip=function(e){return this._line.properties().closeTooltip.setValue(o(e)),this},n.prototype.getCloseTooltip=function(){return this._line.properties().closeTooltip.value()},n.prototype.setReverseTooltip=function(e){return this._line.properties().reverseTooltip.setValue(o(e)),this},n.prototype.getReverseTooltip=function(){return this._line.properties().reverseTooltip.value()},n.prototype.getQuantity=function(){return this._data.quantityText},n.prototype.setQuantity=function(e){return this._data.quantityText=e||"",this._line.updateAllViewsAndRedraw(),this},n.prototype.getExtendLeft=function(){var e=this._line.properties().extendLeft.value();return"inherit"===e?this._line._model.properties().tradingProperties.extendLeft.value():e},n.prototype.setExtendLeft=function(e){return this._line.properties().extendLeft.setValue(e),this},n.prototype.getLineLength=function(){var e=this._line.properties().lineLength.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineLength.value():e},n.prototype.setLineLength=function(e){return this._line.properties().lineLength.setValue(Math.max(0,Math.min(e,100))),this},n.prototype.getLineColor=function(){var e=this._line.properties(),t="buy"===this._direction?e.lineBuyColor:e.lineSellColor;return t.value()},n.prototype.setLineColor=function(e){return"buy"===this._direction?this.setLineBuyColor(e):this.setLineSellColor(e),this},n.prototype.setLineBuyColor=function(e){return this._line.properties().lineBuyColor.setValue(e),this},n.prototype.setLineSellColor=function(e){return this._line.properties().lineSellColor.setValue(e),this},n.prototype.getLineStyle=function(){var e=this._line.properties().lineStyle.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineStyle.value():e},n.prototype.setLineStyle=function(e){return this._line.properties().lineStyle.setValue(e),this},n.prototype.getLineWidth=function(){var e=this._line.properties().lineWidth.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineWidth.value():e},n.prototype.setLineWidth=function(e){return this._line.properties().lineWidth.setValue(e),this},n.prototype.getBodyBorderColor=function(){var e=this._line.properties(),t="buy"===this._direction?e.bodyBorderBuyColor:e.bodyBorderSellColor;return t.value()},n.prototype.setBodyBorderColor=function(e){return"buy"===this._direction?this.setBodyBorderBuyColor(e):this.setBodyBorderSellColor(e),this},n.prototype.setBodyBorderBuyColor=function(e){
return this._line.properties().bodyBorderBuyColor.setValue(e),this},n.prototype.setBodyBorderSellColor=function(e){return this._line.properties().bodyBorderSellColor.setValue(e),this},n.prototype.getBodyBackgroundColor=function(){return c.getColorFromProperties(this._line.properties().bodyBackgroundColor,this._line.properties().bodyBackgroundTransparency)},n.prototype.setBodyBackgroundColor=function(e){return c.setColorToProperties(e,this._line.properties().bodyBackgroundColor,this._line.properties().bodyBackgroundTransparency),this},n.prototype.getBodyTextColor=function(){var e=this._line.properties(),t="positive"===this._profitState?e.bodyTextPositiveColor:"negative"===this._profitState?e.bodyTextNegativeColor:e.bodyTextNeutralColor;return t.value()},n.prototype.setBodyTextColor=function(e){return"positive"===this._profitState?this.setBodyTextPositiveColor(e):"negative"===this._profitState?this.setBodyTextNegativeColor(e):this.setBodyTextNeutralColor(e),this},n.prototype.setBodyTextPositiveColor=function(e){return this._line.properties().bodyTextPositiveColor.setValue(e),this},n.prototype.setBodyTextNegativeColor=function(e){return this._line.properties().bodyTextNegativeColor.setValue(e),this},n.prototype.setBodyTextNeutralColor=function(e){return this._line.properties().bodyTextNeutralColor.setValue(e),this},n.prototype.getBodyFont=function(){return c.getFontFromProperties(this._line.properties().bodyFontFamily,this._line.properties().bodyFontSize,this._line.properties().bodyFontBold,this._line.properties().bodyFontItalic)},n.prototype.setBodyFont=function(e){return c.setFontToProperties(e,this._line.properties().bodyFontFamily,this._line.properties().bodyFontSize,this._line.properties().bodyFontBold,this._line.properties().bodyFontItalic),this},n.prototype.getQuantityBorderColor=function(){var e=this._line.properties(),t="buy"===this._direction?e.quantityBorderBuyColor:e.quantityBorderSellColor;return t.value()},n.prototype.setQuantityBorderColor=function(e){return"buy"===this._direction?this.setQuantityBorderBuyColor(e):this.setQuantityBorderSellColor(e),this},n.prototype.setQuantityBorderBuyColor=function(e){return this._line.properties().quantityBorderBuyColor.setValue(e),this},n.prototype.setQuantityBorderSellColor=function(e){return this._line.properties().quantityBorderSellColor.setValue(e),this},n.prototype.getQuantityBackgroundColor=function(){var e=this._line.properties(),t="buy"===this._direction?e.quantityBackgroundBuyColor:e.quantityBackgroundSellColor;return t.value()},n.prototype.setQuantityBackgroundColor=function(e){return"buy"===this._direction?this.setQuantityBackgroundBuyColor(e):this.setQuantityBackgroundSellColor(e),this},n.prototype.setQuantityBackgroundBuyColor=function(e){return this._line.properties().quantityBackgroundBuyColor.setValue(e),this},n.prototype.setQuantityBackgroundSellColor=function(e){return this._line.properties().quantityBackgroundSellColor.setValue(e),this},n.prototype.getQuantityTextColor=function(){
return c.getColorFromProperties(this._line.properties().quantityTextColor,this._line.properties().quantityTextTransparency)},n.prototype.setQuantityTextColor=function(e){return c.setColorToProperties(e,this._line.properties().quantityTextColor,this._line.properties().quantityTextTransparency),this},n.prototype.getQuantityFont=function(){return c.getFontFromProperties(this._line.properties().quantityFontFamily,this._line.properties().quantityFontSize,this._line.properties().quantityFontBold,this._line.properties().quantityFontItalic)},n.prototype.setQuantityFont=function(e){return c.setFontToProperties(e,this._line.properties().quantityFontFamily,this._line.properties().quantityFontSize,this._line.properties().quantityFontBold,this._line.properties().quantityFontItalic),this},n.prototype.getReverseButtonBorderColor=function(){var e=this._line.properties(),t="buy"===this._direction?e.reverseButtonBorderBuyColor:e.reverseButtonBorderSellColor;return t.value()},n.prototype.setReverseButtonBorderColor=function(e){return"buy"===this._direction?this.setReverseButtonBorderBuyColor(e):this.setReverseButtonBorderSellColor(e),this},n.prototype.setReverseButtonBorderBuyColor=function(e){return this._line.properties().reverseButtonBorderBuyColor.setValue(e),this},n.prototype.setReverseButtonBorderSellColor=function(e){return this._line.properties().reverseButtonBorderSellColor.setValue(e),this},n.prototype.getReverseButtonBackgroundColor=function(){return c.getColorFromProperties(this._line.properties().reverseButtonBackgroundColor,this._line.properties().reverseButtonBackgroundTransparency)},n.prototype.setReverseButtonBackgroundColor=function(e){return c.setColorToProperties(e,this._line.properties().reverseButtonBackgroundColor,this._line.properties().reverseButtonBackgroundTransparency),this},n.prototype.getReverseButtonIconColor=function(){var e=this._line.properties(),t="buy"===this._direction?e.reverseButtonIconBuyColor:e.reverseButtonIconSellColor;return t.value()},n.prototype.setReverseButtonIconColor=function(e){return"buy"===this._direction?this.setReverseButtonIconBuyColor(e):this.setReverseButtonIconSellColor(e),this},n.prototype.setReverseButtonIconBuyColor=function(e){return this._line.properties().reverseButtonIconBuyColor.setValue(e),this},n.prototype.setReverseButtonIconSellColor=function(e){return this._line.properties().reverseButtonIconSellColor.setValue(e),this},n.prototype.getCloseButtonBorderColor=function(){var e=this._line.properties(),t="buy"===this._direction?e.closeButtonBorderBuyColor:e.closeButtonBorderSellColor;return t.value()},n.prototype.setCloseButtonBorderColor=function(e){return"buy"===this._direction?this.setCloseButtonBorderBuyColor(e):this.setCloseButtonBorderSellColor(e),this},n.prototype.setCloseButtonBorderBuyColor=function(e){return this._line.properties().closeButtonBorderBuyColor.setValue(e),this},n.prototype.setCloseButtonBorderSellColor=function(e){return this._line.properties().closeButtonBorderSellColor.setValue(e),this},n.prototype.getCloseButtonBackgroundColor=function(){
return c.getColorFromProperties(this._line.properties().closeButtonBackgroundColor,this._line.properties().closeButtonBackgroundTransparency)},n.prototype.setCloseButtonBackgroundColor=function(e){return c.setColorToProperties(e,this._line.properties().closeButtonBackgroundColor,this._line.properties().closeButtonBackgroundTransparency),this},n.prototype.getCloseButtonIconColor=function(){var e=this._line.properties(),t="buy"===this._direction?e.closeButtonIconBuyColor:e.closeButtonIconSellColor;return t.value()},n.prototype.setCloseButtonIconColor=function(e){return"buy"===this._direction?this.setCloseButtonIconBuyColor(e):this.setCloseButtonIconSellColor(e),this},n.prototype.setCloseButtonIconBuyColor=function(e){return this._line.properties().closeButtonIconBuyColor.setValue(e),this},n.prototype.setCloseButtonIconSellColor=function(e){return this._line.properties().closeButtonIconSellColor.setValue(e),this},n.prototype.block=function(){this._blocked=!0,this._line.updateAllViewsAndRedraw()},n.prototype.unblock=function(){this._blocked=!1,this._line.updateAllViewsAndRedraw()},n.prototype.isFunction=function(e){return"function"==typeof e},n.prototype.onReverse=function(e,t){return t?this.isFunction(t)&&(this._onReverseData=e,this._onReverseCallback=t):this.isFunction(e)&&(this._onReverseCallback=e),this},n.prototype.callOnReverse=function(){this.isFunction(this._onReverseCallback)&&this._onReverseCallback.call(this,this._onReverseData)},n.prototype.isOnReverseCallbackPresent=function(){return this.isFunction(this._onReverseCallback)},n.prototype.onClose=function(e,t){return t?this.isFunction(t)&&(this._onCloseData=e,this._onCloseCallback=t):this.isFunction(e)&&(this._onCloseCallback=e),this},n.prototype.setCloseEnabled=function(e){return this._closeEnabled===e?this:(this._closeEnabled=e,this._onCloseCallback&&this._line.updateAllViewsAndRedraw(),this)},n.prototype.isCloseEnabled=function(){return this._closeEnabled},n.prototype.callOnClose=function(){this.isFunction(this._onCloseCallback)&&this._closeEnabled&&this._onCloseCallback.call(this,this._onCloseData)},n.prototype.isOnCloseCallbackPresent=function(){return this._closeEnabled&&this.isFunction(this._onCloseCallback)},n.prototype.onModify=function(e,t){return t?this.isFunction(t)&&(this._onModifyData=e,this._onModifyCallback=t):this.isFunction(e)&&(this._onModifyCallback=e),this},n.prototype.callOnModify=function(){this.isFunction(this._onModifyCallback)&&this._onModifyCallback.call(this,this._onModifyData)},n.prototype.onContextMenu=function(e,t){return t?this.isFunction(t)&&(this._onContextMenuData=e,this._onContextMenuCallback=t):this.isFunction(e)&&(this._onContextMenuCallback=e),this},n.prototype.shouldShowContextMenu=function(){return this.isFunction(this._onContextMenuCallback)},n.prototype.callOnContextMenu=function(){if(this.isFunction(this._onContextMenuCallback))return this._onContextMenuCallback.call(this,this._onContextMenuData)},n.prototype.remove=function(){this._line._model.removeSource(this._line),delete this._line},inherit(r,s),
r.prototype.zorder=function(){return p},r.prototype.setPoint=function(e,t,i){this._points[e]=t,this.normalizePoints()},r.prototype.addPoint=function(e,t){return this._points.push(e),this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),!0},r.prototype.title=function(){return"Position"},r.prototype.name=function(){return"Position"},r.prototype.createPriceAxisView=function(e){return this._priceAxisView=new l(this,{pointIndex:e,backgroundPropertyGetter:this._adapter.getLineColor.bind(this._adapter)}),this._priceAxisView},r.prototype.paneViews=function(){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showPositions.value()?a.prototype.paneViews.call(this):null},r.prototype.priceAxisViews=function(t,i){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showPositions.value()?a.prototype.priceAxisViews.call(this,t,i):null},r.prototype.hasContextMenu=function(){return this._adapter.shouldShowContextMenu()},r.prototype.contextMenuItems=function(){return this._adapter.callOnContextMenu()},r.prototype.formatter=function(){return this._formatter},r.createProperties=function(e){var t=new u("linetoolposition",e,!1,!1);return r._configureProperties(t),t},r._configureProperties=function(e){s._configureProperties(e)},t.LineToolPosition=r}).call(this,i("Kxc7"))},zqZp:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolPriceLabel";var r=t||n.createProperties();o.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("Ni7V").PriceLabelPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=window.t("Price Label");inherit(n,o),n.prototype.pointsCount=function(){return 1},n.prototype.title=function(){return a},n.prototype.name=function(){return"Price Label"},n.prototype.getStylesPropertyPage=function(){return s.LineToolPriceLabelStylesPropertyPage},n.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(13),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("hQgR").PriceLabelDefinitionsViewModel}.bind(null,i)).catch(i.oe)},n.createProperties=function(e){var t=new r("linetoolpricelabel",e);return n._configureProperties(t),t},n._configureProperties=function(e){o._configureProperties(e)},t.LineToolPriceLabel=n}},[["u8U4","runtime","vendors"]]]);