(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[5439],{67487:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ChartPropertyDefinitionsViewModel:()=>Ti});var r=i(85842),n=i(91599),o=i(16905),l=(i(16732),i(86880),i(89659)),a=i(73405),s=i(18632),c=i(61626),d=i(90366),h=i(18588),u=i(12827),p=i(51785),v=i(72769),g=i(37032),y=i(74121),P=i(20707),f=i(95786),b=i(68657);const w=new v.TranslatedString("change symbol description visibility",n.t(null,void 0,i(33285))),m=new v.TranslatedString("change symbol legend format",n.t(null,void 0,i(74990))),D=new v.TranslatedString("change open market status visibility",n.t(null,void 0,i(76249))),S=new v.TranslatedString("change chart values visibility",n.t(null,void 0,i(68730))),T=new v.TranslatedString("change last day change visibility",n.t(null,void 0,i(35682))),_=new v.TranslatedString("change bar change visibility",n.t(null,void 0,i(67860))),k=new v.TranslatedString("change bar change up color",n.t(null,void 0,i(11271))),C=new v.TranslatedString("change bar change down color",n.t(null,void 0,i(38692))),V=new v.TranslatedString("change use custom bar change colors",n.t(null,void 0,i(47590))),L=new v.TranslatedString("change indicator inputs visibility",n.t(null,void 0,i(33533))),W=new v.TranslatedString("change indicator titles visibility",n.t(null,void 0,i(20426))),O=new v.TranslatedString("change indicator values visibility",n.t(null,void 0,i(15027))),x=new v.TranslatedString("change legend background visibility",n.t(null,void 0,i(13882))),M=new v.TranslatedString("change legend background transparency",n.t(null,void 0,i(95802))),R=new v.TranslatedString("change volume values visibility",n.t(null,void 0,i(52164))),G=new v.TranslatedString("change symbol field visibility",n.t(null,void 0,i(68192))),F=n.t(null,void 0,i(42894)),E=n.t(null,void 0,i(71362)),A=n.t(null,void 0,i(88580)),H=n.t(null,void 0,i(27020)),Z=n.t(null,void 0,i(89979)),B=n.t(null,void 0,i(53577)),j=n.t(null,void 0,i(47062)),N=n.t(null,void 0,i(26817)),z=n.t(null,void 0,i(2931)),U=n.t(null,void 0,i(86960)),I=n.t(null,void 0,i(36926)),q=n.t(null,void 0,i(65340)),J=n.t(null,void 0,i(40926)),K=(0,o.isFeaturesetEnabled)("symbol_info_price_source"),Q=(0,o.isFeaturesetEnabled)("show_symbol_logos")&&(0,o.isFeaturesetEnabled)("show_symbol_logo_in_legend"),X=(0,o.isFeaturesetEnabled)("legend_bar_change_colors_based_on_value");var Y=i(47147),$=i(7973),ee=i(71664),te=i(82708),ie=i(63367);const re=new v.TranslatedString("change symbol labels visibility",n.t(null,void 0,i(56108))),ne=new v.TranslatedString("change symbol last value visibility",n.t(null,void 0,i(25900))),oe=new v.TranslatedString("change symbol last value mode",n.t(null,void 0,i(51419))),le=(new v.TranslatedString("change bid and ask labels visibility",n.t(null,void 0,i(41553))),new v.TranslatedString("change bid and ask lines visibility",n.t(null,void 0,i(96049))),new v.TranslatedString("change bid line color",n.t(null,void 0,i(40341))),new v.TranslatedString("change ask line color",n.t(null,void 0,i(66156))), new v.TranslatedString("change pre/post market price label visibility",n.t(null,void 0,i(76701))),new v.TranslatedString("change pre/post market price lines visibility",n.t(null,void 0,i(26085))),new v.TranslatedString("change pre market line color",n.t(null,void 0,i(64944))),new v.TranslatedString("change post market line color",n.t(null,void 0,i(35801))),new v.TranslatedString("change high and low price labels visibility",n.t(null,void 0,i(56987)))),ae=new v.TranslatedString("change high and low price lines visibility",n.t(null,void 0,i(84666))),se=new v.TranslatedString("change high and low price line color",n.t(null,void 0,i(3469))),ce=new v.TranslatedString("change high and low price line width",n.t(null,void 0,i(43542))),de=(new v.TranslatedString("change indicators and financials name labels visibility",n.t(null,void 0,i(86335))),new v.TranslatedString("change indicators name labels visibility",n.t(null,void 0,i(59270)))),he=(new v.TranslatedString("change indicators and financials value labels visibility",n.t(null,void 0,i(24360))),new v.TranslatedString("change indicators value labels visibility",n.t(null,void 0,i(6083)))),ue=new v.TranslatedString("change no overlapping labels",n.t(null,void 0,i(17590))),pe=new v.TranslatedString("change countdown to bar close visibility",n.t(null,void 0,i(99254))),ve=new v.TranslatedString("change currency label visibility",n.t(null,void 0,i(92216))),ge=new v.TranslatedString("change scale modes buttons visibility",n.t(null,void 0,i(16441))),ye=new v.TranslatedString("change unit label visibility",n.t(null,void 0,i(23555))),Pe=new v.TranslatedString("change currency and unit labels visibility",n.t(null,void 0,i(45368))),fe=new v.TranslatedString("change plus button visibility",n.t(null,void 0,i(39087))),be=new v.TranslatedString("toggle lock scale",n.t(null,void 0,i(89331))),we=new v.TranslatedString("change price to bar ratio",n.t(null,void 0,i(76999))),me=new v.TranslatedString("change date format",n.t(null,void 0,i(15644))),De=new v.TranslatedString("change time hours format",n.t(null,void 0,i(84804))),Se=new v.TranslatedString("change day of week on labels",n.t(null,void 0,i(86477))),Te=new v.TranslatedString("change save chart left edge position when changing interval",n.t(null,void 0,i(96944))),_e=new v.TranslatedString("change price line visibility",n.t(null,void 0,i(22912))),ke=new v.TranslatedString("change price line color",n.t(null,void 0,i(84199))),Ce=new v.TranslatedString("change price line width",n.t(null,void 0,i(54075))),Ve=new v.TranslatedString("change average close price label visibility",n.t(null,void 0,i(51646))),Le=new v.TranslatedString("change average close price line visibility",n.t(null,void 0,i(5352))),We=new v.TranslatedString("change average close price line color",n.t(null,void 0,i(45148))),Oe=new v.TranslatedString("change average close price line width",n.t(null,void 0,i(25197))),xe=(new v.TranslatedString("change previous close price line visibility",n.t(null,void 0,i(86911))), new v.TranslatedString("change previous close price line color",n.t(null,void 0,i(84242))),new v.TranslatedString("change previous close price line width",n.t(null,void 0,i(37798))),new v.TranslatedString("change symbol previous close value visibility",n.t(null,void 0,i(94209))),n.t(null,void 0,i(34993))),Me=n.t(null,void 0,i(10869)),Re=n.t(null,void 0,i(27912)),Ge=n.t(null,void 0,i(28503)),Fe=n.t(null,void 0,i(65507)),Ee=n.t(null,void 0,i(13163)),Ae=n.t(null,void 0,i(49166)),He=(n.t(null,void 0,i(24495)),n.t(null,void 0,i(32845))),Ze=(n.t(null,void 0,i(43528)),n.t(null,void 0,i(99989))),Be=(n.t(null,void 0,i(43274)),n.t(null,void 0,i(71661))),je=n.t(null,void 0,i(61728)),Ne=n.t(null,void 0,i(68063)),ze=n.t(null,void 0,i(73354)),Ue=n.t(null,void 0,i(39527)),Ie=n.t(null,void 0,i(88915)),qe=n.t(null,void 0,i(78031)),Je=n.t(null,void 0,i(11768)),Ke=n.t(null,void 0,i(43668)),Qe=n.t(null,void 0,i(27949)),Xe=n.t(null,void 0,i(20626)),Ye=n.t(null,void 0,i(21440)),$e=n.t(null,void 0,i(65955)),et=n.t(null,void 0,i(91957)),tt=(0,o.isFeaturesetEnabled)("show_average_close_price_line_and_label"),it=[{value:Y.PriceAxisLastValueMode.LastPriceAndPercentageValue,title:n.t(null,void 0,i(92868))},{value:Y.PriceAxisLastValueMode.LastValueAccordingToScale,title:n.t(null,void 0,i(31165))}];var rt=i(7321);var nt=i(22165),ot=i(74970),lt=i(90082);const at=new v.TranslatedString("change sessions breaks visibility",n.t(null,void 0,i(31169))),st=new v.TranslatedString("change sessions breaks color",n.t(null,void 0,i(23221))),ct=new v.TranslatedString("change sessions breaks width",n.t(null,void 0,i(40556))),dt=new v.TranslatedString("change sessions breaks style",n.t(null,void 0,i(72261))),ht=n.t(null,void 0,i(92496));var ut=i(42644) ;const pt=new v.TranslatedString("change chart background color",n.t(null,void 0,i(79836))),vt=new v.TranslatedString("change chart background type",n.t(null,void 0,i(29439))),gt=new v.TranslatedString("change vert grid lines color",n.t(null,void 0,i(20733))),yt=new v.TranslatedString("change horz grid lines color",n.t(null,void 0,i(5420))),Pt=new v.TranslatedString("change grid lines visibility",n.t(null,void 0,i(68726))),ft=new v.TranslatedString("change scales text color",n.t(null,void 0,i(45651))),bt=new v.TranslatedString("change scales font size",n.t(null,void 0,i(32556))),wt=new v.TranslatedString("change scales lines color",n.t(null,void 0,i(8570))),mt=new v.TranslatedString("change pane separators color",n.t(null,void 0,i(60031))),Dt=new v.TranslatedString("change crosshair color",n.t(null,void 0,i(45831))),St=new v.TranslatedString("change crosshair width",n.t(null,void 0,i(41178))),Tt=new v.TranslatedString("change crosshair style",n.t(null,void 0,i(5824))),_t=new v.TranslatedString("change symbol watermark visibility",n.t(null,void 0,i(16476))),kt=new v.TranslatedString("change symbol ticker watermark visibility",n.t(null,void 0,i(58338))),Ct=new v.TranslatedString("change interval watermark visibility",n.t(null,void 0,i(2821))),Vt=new v.TranslatedString("change symbol description watermark visibility",n.t(null,void 0,i(61990))),Lt=(new v.TranslatedString("change replay watermark visibility",n.t(null,void 0,i(33523))),new v.TranslatedString("change symbol watermark color",n.t(null,void 0,i(91651)))),Wt=new v.TranslatedString("change navigation buttons visibility",n.t(null,void 0,i(38783))),Ot=new v.TranslatedString("change pane buttons visibility",n.t(null,void 0,i(31655))),xt=new v.TranslatedString("change top margin",n.t(null,void 0,i(16257))),Mt=new v.TranslatedString("change bottom margin",n.t(null,void 0,i(27785))),Rt=new v.TranslatedString("change right margin",n.t(null,void 0,i(36036))),Gt=n.t(null,void 0,i(36926)),Ft=n.t(null,void 0,i(22373)),Et=n.t(null,void 0,i(42312)),At=n.t(null,void 0,i(2985)),Ht=n.t(null,void 0,i(98249)),Zt=n.t(null,void 0,i(65059)),Bt=n.t(null,void 0,i(79115)),jt=n.t(null,void 0,i(99758)),Nt=n.t(null,void 0,i(15928)),zt=n.t(null,void 0,i(37215)),Ut=n.t(null,void 0,i(37224)),It=n.t(null,void 0,i(55364)),qt=n.t(null,void 0,i(98033)),Jt=n.t(null,void 0,i(65388)),Kt=n.t(null,void 0,i(65244)),Qt=n.t(null,void 0,i(98415)),Xt=n.t(null,void 0,i(52188)),Yt=n.t(null,void 0,i(25962)),$t=n.t(null,{context:"unit"},i(85929));async function ei(e,t,r,s,c,d,h,u,p,v){const g=[],y=[],f=[],w=[],m=[],D=(0,a.createColorPropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,t.background,null,pt),gradientColor1:(0,a.getColorDefinitionProperty)(e,t.backgroundGradientStartColor,null,pt),gradientColor2:(0,a.getColorDefinitionProperty)(e,t.backgroundGradientEndColor,null,pt),type:(0,a.convertToDefinitionProperty)(e,t.backgroundType,vt)},{id:"chartBackground",title:Gt,noAlpha:!0}),S=t.vertGridProperties.childs(),T=t.horzGridProperties.childs(),_=(0,a.createOptionalTwoColorsPropertyDefinition)({ option:(0,a.convertToDefinitionProperty)(e,t.gridLinesMode,Pt),color1:(0,a.getColorDefinitionProperty)(e,S.color,null,gt),color2:(0,a.getColorDefinitionProperty)(e,T.color,null,yt)},{id:"gridLines",title:Zt,options:new l.WatchedValue([{title:Ft,value:"both"},{title:Et,value:"vert"},{title:At,value:"horz"},{title:Ht,value:"none"}]),color1Visible:v.vertLinesVisible,color2Visible:v.horzLinesVisible}),k=(0,P.createWVFromGetterAndSubscription)((()=>1!==e.model().panes().length),e.model().panesCollectionChanged()),C=(0,a.createLinePropertyDefinition)({visible:(0,a.convertFromReadonlyWVToDefinitionProperty)(k.ownership()),color:(0,a.getColorDefinitionProperty)(e,t.separatorColor,null,mt)},{id:"paneSeparators",title:Nt}),V=t.crossHairProperties.childs(),L=(0,a.createLinePropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,V.color,V.transparency,Dt),width:(0,a.convertToDefinitionProperty)(e,V.width,St),style:(0,a.convertToDefinitionProperty)(e,V.style,Tt)},{id:"crossHair",title:zt});g.push(D,_);{const t=function(e){const t=e.model().sessions().properties().childs().sessionHighlight.childs().vertlines.childs().sessBreaks.childs(),i=(0,nt.combineProperty)((e=>!e),e.mainSeries().isDWMProperty().weakReference());return(0,lt.createLinePropertyDefinition)({visible:(0,ot.makeProxyDefinitionProperty)(i.ownership()),checked:(0,a.convertToDefinitionProperty)(e,t.visible,at),color:(0,a.getColorDefinitionProperty)(e,t.color,null,st),width:(0,a.convertToDefinitionProperty)(e,t.width,ct),style:(0,a.convertToDefinitionProperty)(e,t.style,dt)},{id:"sessionBeaks",title:ht})}(e);g.push(t)}if(g.push(C,L),null!==r){const t=(0,b.combine)((e=>null===e),e.model().watermarkContentProvider().weakReference()),o=[(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,r.ticker,kt)},{id:"watermarkTicker",title:n.t(null,void 0,i(28420)),notFormatedTitle:!0}),(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,r.interval,Ct)},{id:"watermarkInterval",title:n.t(null,void 0,i(27569)),notFormatedTitle:!0}),(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,r.description,Vt)},{id:"watermarkDescription",title:n.t(null,void 0,i(97987)),notFormatedTitle:!0}),null].filter(rt.notNull),l=(0,a.createPropertyDefinitionsCheckableListOptionsGroup)(o,void 0,[(0,a.createColorPropertyDefinition)({color:(0,ut.getStdColorDefinitionProperty)(e,r.color,e.model().backgroundTheme().weakReference(),Lt)},{id:"watermarkColor"})],"watermark",Ut,t);g.push(l);const s=(0,b.combine)((e=>null!==e),e.model().watermarkContentProvider().weakReference()),c=(0,a.createColorPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,r.custom,_t),color:(0,ut.getStdColorDefinitionProperty)(e,r.color,e.model().backgroundTheme().weakReference(),Lt),visible:(0,a.convertFromReadonlyWVToDefinitionProperty)(s.ownership())},{id:"customWatermark",title:Ut});g.push(c)}const W=(0,a.createTextPropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,s.textColor,null,ft),size:(0, a.convertToDefinitionProperty)(e,s.fontSize,bt)},{id:"scalesText",title:Bt}),O=(0,a.createLinePropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,s.lineColor,null,wt)},{id:"scalesLine",title:jt});y.push(W,O);const x=(0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(e,d.property,Wt)},{id:"navButtons",title:It,options:new l.WatchedValue(d.values)}),M=(0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(e,h.property,Ot)},{id:"paneButtons",title:qt,options:new l.WatchedValue(h.values)});f.push(x,M);const R=(0,a.createNumberPropertyDefinition)({value:(0,a.convertToDefinitionProperty)(e,t.topMargin,xt,[$.floor])},{type:0,id:"paneTopMargin",title:Jt,min:new l.WatchedValue(0),max:new l.WatchedValue(25),step:new l.WatchedValue(1),unit:new l.WatchedValue("%")}),G=(0,a.createNumberPropertyDefinition)({value:(0,a.convertToDefinitionProperty)(e,t.bottomMargin,Mt,[$.floor])},{type:0,id:"paneBottomMargin",title:Kt,min:new l.WatchedValue(0),max:new l.WatchedValue(25),step:new l.WatchedValue(1),unit:new l.WatchedValue("%")});if(w.push(R,G),(0,o.isFeaturesetEnabled)("chart_property_page_right_margin_editor")){const t={value:(0,a.convertFromWVToDefinitionProperty)(e,c.value,Rt,[$.floor])},i={type:0,id:"paneRightMargin",title:Qt,min:c.min,max:c.max,step:new l.WatchedValue(1),unit:new l.WatchedValue($t)};if((0,o.isFeaturesetEnabled)("show_percent_option_for_right_margin")){const t=()=>{const t=new l.WatchedValue(0),i=new l.WatchedValue(0),r=new l.WatchedValue(0),n=new l.WatchedValue(""),o=(0,b.combine)(((e,o,l)=>{e?(i.setValue(0),r.setValue(99),n.setValue("%"),t.setValue(o)):(i.setValue(c.min.value()),r.setValue(c.max.value()),n.setValue($t),t.setValue(l))}),p.weakReference(),u.weakReference(),c.value.weakReference()),s=(0,b.combine)((e=>{p.value()?u.setValue(e):c.value.setValue(e)}),t.weakReference());return(0,a.createNumberPropertyDefinition)({value:(0,a.convertFromWVToDefinitionProperty)(e,t,Rt,void 0,(()=>{o.destroy(),s.destroy()}))},{type:0,id:"paneRightMarginValue",min:i,max:r,step:new l.WatchedValue(1),unit:n})},i=(F={option:(0,a.convertFromWVToDefinitionProperty)(e,p,Rt)},E={id:"paneRightMarginOptions",title:Qt,options:new l.WatchedValue([{title:Xt,value:!0},{title:Yt,value:!1}]).readonly()},A=t(),{propType:"optionalSet",properties:F,childrenDefinition:A,...E});m.push(i)}else{const e=(0,a.createNumberPropertyDefinition)(t,i);w.push(e)}}var F,E,A;const H=[(0,a.createPropertyDefinitionsGeneralGroup)(g,"chartBasicStylesAppearanceGroup",n.t(null,void 0,i(11569))),(0,a.createPropertyDefinitionsGeneralGroup)(y,"scalesAppearanceGroup",n.t(null,void 0,i(1807))),(0,a.createPropertyDefinitionsGeneralGroup)(f,"buttonsAppearanceGroup",n.t(null,void 0,i(87961))),(0,a.createPropertyDefinitionsGeneralGroup)(w,"marginsAppearanceGroup",n.t(null,void 0,i(57086)))];return m.length>0&&H.push((0,a.createPropertyDefinitionsGeneralGroup)(m,"rightMarginsAppearanceGroup",n.t(null,void 0,i(70715)))),{definitions:H}} var ti=i(55330),ii=i(78593),ri=i(39351),ni=i(84082),oi=i(18492),li=i(78589),ai=i(10840),si=i(96343),ci=i(1839),di=i(60571),hi=i(56241),ui=i(47077),pi=i(61080),vi=i(99742),gi=i(24096);const yi={symbol:{bold:ui,default:ai},legend:{bold:pi,default:si},scales:{bold:vi,default:ci},canvas:{bold:i(67640),default:hi},trading:{bold:gi,default:di}};const Pi=n.t(null,void 0,i(13163)),fi=n.t(null,void 0,i(71469)),bi=n.t(null,void 0,i(18417)),wi=n.t(null,void 0,i(43778)),mi=(n.t(null,void 0,i(65497)),n.t(null,void 0,i(57836)),n.t(null,void 0,i(45870)),n.t(null,void 0,i(69502)),n.t(null,void 0,i(45268)),n.t(null,void 0,i(70243)),!1);function Di(e=!1){const t=new Date(Date.UTC(1997,8,29));return ii.availableDateFormats.map((i=>({value:i,title:new ni.DateFormatter(i,e).format(t)})))}const Si=[{id:"symbol-text-source-description",value:"description",title:n.t(null,void 0,i(97987))},{id:"symbol-text-source-ticker",value:"ticker",title:n.t(null,void 0,i(28420))},{id:"symbol-text-source-ticker-and-description",value:"ticker-and-description",title:n.t(null,void 0,i(84446))}];(0,o.isFeaturesetEnabled)("symbol_info_long_description")&&Si.push({id:"symbol-text-source-long-description",value:"long-description",title:n.t(null,void 0,i(69461))});class Ti{constructor(e,t,i){this._propertyPages=null,this._maxRightOffsetPropertyObject=null,this._defaultRightOffsetPercentageWatchedValue=null,this._useRightOffsetPercentageWatchedValue=null,this._profitLossOptions=null,this._isDestroyed=!1,this._availableDateFormatValues=null,this._undoModel=e,this._model=this._undoModel.model(),this._series=this._model.mainSeries(),this._chartWidgetProperties=t,this._options=i,this._seriesPropertyDefinitionViewModel=this._createSeriesViewModel();const r=this._chartWidgetProperties.childs().paneProperties.childs(),n=(0,P.createWVFromProperty)(r.gridLinesMode);this._gridColorsVisibilities={gridLinesMode:n,vertLinesVisible:(0,b.combine)((e=>"both"===e||"vert"===e),n.weakReference()),horzLinesVisible:(0,b.combine)((e=>"both"===e||"horz"===e),n.weakReference())},this._legendPropertyPage=this._createLegendPropertyPage(),this._scalesPropertyPage=this._createScalesPropertyPage(),this._appearancePropertyPage=this._createAppearancePropertyPage(),this._tradingPropertyPage=this._createTradingPropertyPage(),this._eventsPropertyPage=this._createEventsPropertyPage(),this._alertsPropertyPage=this._createAlertsPropertyPage(),this._series.onStyleChanged().subscribe(this,this._updateDefinitions),this._series.priceScaleChanged().subscribe(this,this._updateDefinitions)}destroy(){null!==this._propertyPages&&this._propertyPages.filter(((e,t)=>0!==t)).forEach((e=>{(0,a.destroyDefinitions)(e.definitions.value())})),this._seriesPropertyDefinitionViewModel.destroy(),this._pipValueTypeSubscription?.unsubscribe(),this._availableDateFormatValues?.destroy(),this._series.onStyleChanged().unsubscribe(this,this._updateDefinitions),this._series.priceScaleChanged().unsubscribe(this,this._updateDefinitions),this._model.timeScale().maxRightOffsetChanged().unsubscribeAll(this), this._gridColorsVisibilities.vertLinesVisible.destroy(),this._gridColorsVisibilities.horzLinesVisible.destroy(),this._gridColorsVisibilities.gridLinesMode.destroy(),this._isDestroyed=!0}async propertyPages(){if(null===this._propertyPages){const e=await this._seriesPropertyDefinitionViewModel.propertyPages();if(this._isDestroyed)throw new Error("ChartPropertyDefinitionsViewModel already destroyed");if(null===this._propertyPages){this._propertyPages=[...e],this._propertyPages.push(this._legendPropertyPage,this._scalesPropertyPage,await this._appearancePropertyPage),null!==this._tradingPropertyPage&&this._propertyPages.push(this._tradingPropertyPage);const t=await this._alertsPropertyPage;t&&this._propertyPages.push(t);const i=await this._eventsPropertyPage;i&&this._propertyPages.push(i)}return this._propertyPages}return Promise.resolve(this._propertyPages)}_updatePlDisplayOptions(e){(0,r.ensureNotNull)(this._profitLossOptions).setValue([])}_updateDefinitions(){(0,a.destroyDefinitions)(this._scalesPropertyPage.definitions.value());const e=this._createScalesDefinitions();this._scalesPropertyPage.definitions.setValue(e.definitions)}_createSeriesViewModel(){const e={property:this._model.properties().childs().timezone,values:li.availableTimezones.map((e=>({value:e.id,title:e.title})))};return new u.SeriesPropertyDefinitionsViewModel(this._series,this._undoModel,"symbol",Pi,(0,r.ensureDefined)(yi.symbol),e)}_createLegendPropertyPage(){const e=this._chartWidgetProperties.childs().paneProperties.childs().legendProperties.childs(),t={property:this._series.properties().childs().statusViewStyle.childs().symbolTextSource,values:Si},o=function(e,t,r,o){const s=[],c=[];if(Q){const i=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showLogo,D)},{id:"showLogo",title:F});c.push(i)}const d=(0,a.createOptionsPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showSeriesTitle,w),option:(0,a.convertToDefinitionProperty)(e,r.property,m)},{id:"symbolTextSource",title:E,options:new l.WatchedValue(r.values)});if(c.push(d),null!==o){const t=(0,b.combineWithFilteredUpdate)(((t,i)=>"market"===t&&!(0,g.isEconomicSymbol)(e.mainSeries().symbolInfo())),((e,t)=>null!==e),e.mainSeries().marketStatusModel().status().weakReference(),e.mainSeries().symbolResolvingActive().weakReference()),i=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,o,D),visible:(0,a.convertFromReadonlyWVToDefinitionProperty)(t.ownership())},{id:"showOpenMarketStatus",title:q});c.push(i)}const h=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showSeriesOHLC,S)},{id:"ohlcTitle",title:A});if(c.push(h),!y.alwaysShowLastPriceAndLastDayChange){const i=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showBarChange,_),visible:(0,a.makeProxyDefinitionProperty)((0,P.combineProperty)((e=>12!==e&&20!==e),e.mainSeries().properties().childs().style.weakReference()).ownership())},{id:"barChange",title:Z});c.push(i)}if(X){const i=(0, a.createTwoColorsPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.useBarChangeCustomColors,V),color1:(0,a.getColorDefinitionProperty)(e,t.barChangeUpColor,null,k),color2:(0,a.getColorDefinitionProperty)(e,t.barChangeDownColor,null,C),visible:(0,a.makeProxyDefinitionProperty)((0,P.combineProperty)((e=>(0,g.isHLCBasedStyle)(e)||(0,g.isSingleValueBasedStyle)(e)),e.mainSeries().properties().childs().style.weakReference()).ownership())},{id:"barChangeColors",title:B});c.push(i)}if(c.push((0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showVolume,R),visible:(0,a.makeProxyDefinitionProperty)((0,P.combineProperty)((e=>20!==e),e.mainSeries().properties().childs().style.weakReference()).ownership())},{id:"barVolume",title:j})),y.lastDayChangeAvailable||y.alwaysShowLastPriceAndLastDayChange){const i=y.alwaysShowLastPriceAndLastDayChange?t.showBarChange:t.showLastDayChange,r=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i,T),visible:(0,a.makeProxyDefinitionProperty)((0,P.combineProperty)((e=>12!==e&&20!==e),e.mainSeries().properties().childs().style.weakReference()).ownership())},{id:"lastDayChange",title:H});c.push(r)}if(K){const i=(0,b.combineWithFilteredUpdate)(((t,i)=>e.model().symbolSources().some((e=>void 0!==e.symbolInfo()?.price_source_id))),((e,t)=>!e),e.model().symbolSourceResolvingActive().weakReference(),(0,P.createWVFromGetterAndSubscription)((()=>e.model().symbolSources().length),e.model().symbolSourceCollectionChanged()).ownership());c.push((0,a.createCheckablePropertyDefinition)({disabled:(0,a.convertFromReadonlyWVToDefinitionProperty)(e.model().symbolSourceResolvingActive().weakReference()),checked:(0,a.convertToDefinitionProperty)(e,t.showPriceSource,G),visible:(0,a.convertFromReadonlyWVToDefinitionProperty)(i.ownership())},{id:"priceSource",title:J}))}s.push((0,a.createPropertyDefinitionsGeneralGroup)(c,"seriesLegendVisibilityGroup",n.t(null,void 0,i(13163))));const u=[],p=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showStudyArguments,L)},{id:"studyArguments",title:z}),v=(0,a.createCheckableSetPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showStudyTitles,W)},{id:"studyTitles",title:N},[p]),Y=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showStudyValues,O)},{id:"studyValues",title:U}),$=(0,P.createWVFromGetterAndSubscription)((()=>e.model().priceDataSources().some((e=>!(0,f.isActingAsSymbolSource)(e)&&e.showInObjectTree()))),e.model().dataSourceCollectionChanged());u.push(v,Y),s.push((0,a.createPropertyDefinitionsGeneralGroup)(u,"studiesLegendVisibilityGroup",n.t(null,void 0,i(48394)),$));const ee=[],te=(0,a.createTransparencyPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showBackground,x),transparency:(0,a.convertToDefinitionProperty)(e,t.backgroundTransparency,M)},{id:"legendBgTransparency",title:I});return ee.push(te),s.push((0, a.createPropertyDefinitionsGeneralGroup)(ee,"generalLegendGroup")),{definitions:s}}(this._undoModel,e,t,this._options.marketStatusWidgetEnabled?p.showMarketOpenStatusProperty:null);return(0,s.createPropertyPage)(o,"legend",fi,(0,r.ensureDefined)(yi.legend))}_createScalesPropertyPage(){const e=this._createScalesDefinitions();return(0,s.createPropertyPage)(e,"scales",bi,(0,r.ensureDefined)(yi.scales))}_createScalesDefinitions(){const e=this._chartWidgetProperties.childs().scalesProperties.childs(),t={property:this._model.properties().childs().priceScaleSelectionStrategyName,values:(0,h.allPriceScaleSelectionStrategyInfo)().map((e=>({value:e.name,title:e.title})))};this._model.onWidget()?null===this._availableDateFormatValues&&(this._availableDateFormatValues=new l.WatchedValue(Di()).spawn()):null===this._availableDateFormatValues&&(this._availableDateFormatValues=(0,b.combine)((e=>Di(e)),(0,P.createWVFromProperty)(ti.withWeekdayProperty).ownership()));const r={property:oi.timeHoursFormatProperty,values:[{value:"24-hours",title:n.t(null,void 0,i(81743))},{value:"12-hours",title:n.t(null,void 0,i(4829))}]},s=this._model.mainSeriesScaleRatioProperty();return function(e,t,i,r){const n=r.seriesPriceScale.properties().childs(),s=[],c=[];if(r.currencyConversionEnabled||r.unitConversionEnabled){const t=r.currencyConversionEnabled&&r.unitConversionEnabled?Ue:r.currencyConversionEnabled?je:ze,i=r.currencyConversionEnabled&&r.unitConversionEnabled?Pe:r.currencyConversionEnabled?ve:ye,n=(0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(e,(0,te.currencyUnitMetricVisibilityProperty)(),i)},{id:"scalesCurrencyUnit",title:t,options:new l.WatchedValue((0,te.currencyUnitMetricVisibilityOptions)())});c.push(n)}const d=(0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(e,(0,ie.autoLogButtonsVisibilityProperty)(),ge)},{id:"autoLogButtonsVisibility",title:Ne,options:new l.WatchedValue((0,ie.autoLogButtonsVisibilityOptions)())});c.push(d);const h=(0,a.createNumberPropertyDefinition)({checked:(0,a.getLockPriceScaleDefinitionProperty)(e,n.lockScale,r.seriesPriceScale,be),value:(0,a.getScaleRatioDefinitionProperty)(e,r.mainSeriesScaleRatioProperty,we,[(0,$.limitedPrecision)(7),e=>e])},{id:"lockScale",title:Je,min:new l.WatchedValue(r.mainSeriesScaleRatioProperty.getMinValue()),max:new l.WatchedValue(r.mainSeriesScaleRatioProperty.getMaxValue()),step:new l.WatchedValue(r.mainSeriesScaleRatioProperty.getStepChangeValue())}),u=(0,a.createOptionsPropertyDefinition)({option:(0,a.getPriceScaleSelectionStrategyDefinitionProperty)(e,r.scalesPlacementPropertyObj.property)},{id:"scalesPlacement",title:qe,options:new l.WatchedValue(r.scalesPlacementPropertyObj.values)});c.push(h,u),s.push((0,a.createPropertyDefinitionsGeneralGroup)(c,"scalesPriceScaleGroup",Ke));const p=[],v=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,n.alignLabels,ue)},{id:"noOverlappingLabels",title:Ge});if(p.push(v),e.crosshairSource().isMenuEnabled()){const t=(0, a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,ee.addPlusButtonProperty,fe)},{id:"addPlusButton",title:Ie,solutionId:void 0});p.push(t)}if(r.countdownEnabled){const i=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showCountdown,pe)},{id:"countdown",title:Be});p.push(i)}if(r.seriesHasClosePrice){const r=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.showSymbolLabels,re)},{id:"symbolNameLabel",title:xe}),n=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.showSeriesLastValue,ne)},{id:"symbolValueLabel",title:Me}),o=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showPriceLine,_e)},{id:"symbolLine",title:Re}),s=(0,a.createLinePropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,t.priceLineColor,null,ke),width:(0,a.convertToDefinitionProperty)(e,t.priceLineWidth,Ce)},{id:"SymbolLastValuePriceLine",title:""}),c=(0,a.createOptionsPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.showSeriesLastValue,ne),option:(0,a.convertToDefinitionProperty)(e,i.seriesLastValueMode,oe)},{id:"symbolLastValueLabel",title:Me,options:new l.WatchedValue(it)});p.push((0,a.createPropertyDefinitionsCheckableListOptionsGroup)([r,n,o],void 0,[s,c],"symbolCheckableListGroup",Ee))}if(tt){const i=t.highLowAvgPrice.childs(),r=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.averageClosePriceLabelVisible,Ve)},{id:"averageClosePriceLabel",title:Me}),n=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.averageClosePriceLineVisible,Le)},{id:"averageCloseLine",title:Re}),o=(0,a.createLinePropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,i.averagePriceLineColor,null,We),width:(0,a.convertToDefinitionProperty)(e,i.averagePriceLineWidth,Oe)},{id:"averageClosePriceLine",title:""});p.push((0,a.createPropertyDefinitionsCheckableListOptionsGroup)([r,n],void 0,[o],"avgCloseCheckableListGroup",Ae))}let g,y;g=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.showStudyPlotLabels,de)},{id:"studyNameLabel",title:xe}),y=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.showStudyLastValue,he)},{id:"studyLastValueLabel",title:Me});const b=(0,P.createWVFromGetterAndSubscription)((()=>e.model().priceDataSources().some((e=>!(0,f.isActingAsSymbolSource)(e)&&e.showInObjectTree()))),e.model().dataSourceCollectionChanged());p.push((0,a.createPropertyDefinitionsCheckableListOptionsGroup)([g,y],void 0,[],"studiesCheckableListGroup",He,b));const w=t.highLowAvgPrice.childs(),m=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,w.highLowPriceLabelsVisible,le)},{id:"highLowPriceLabels",title:Me}),D=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,w.highLowPriceLinesVisible,ae)},{id:"highLowPriceLine",title:Re}),S=(0, a.createLinePropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,w.highLowPriceLinesColor,null,se),width:(0,a.convertToDefinitionProperty)(e,w.highLowPriceLinesWidth,ce)},{id:"highLowLineColors",title:""});p.push((0,a.createPropertyDefinitionsCheckableListOptionsGroup)([m,D],void 0,[S],"hiLowCheckableListGroup",Ze)),s.push((0,a.createPropertyDefinitionsGeneralGroup)(p,"scalesLabelsLineGroup",Fe));const T=[];if(r.withWeekdayProperty){const t=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,r.withWeekdayProperty,Se)},{id:"showWeekdayOnTimeScaleLabels",title:$e});T.push(t)}if((0,o.isFeaturesetEnabled)("scales_date_format")){const t=(0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(e,r.dateFormatPropertyObj.property,me)},{id:"dateFormat",title:Qe,options:r.dateFormatPropertyObj.values});T.push(t)}if((0,o.isFeaturesetEnabled)("scales_time_hours_format")){const t=(0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(e,r.timeHoursFormatPropertyObj.property,De)},{id:"timeHoursFormat",title:Xe,options:new l.WatchedValue(r.timeHoursFormatPropertyObj.values)});T.push(t)}{const t=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,r.saveLeftEdgeProperty,Te)},{id:"saveLeftChartEdge",title:et});T.push(t)}return T.length>0&&s.push((0,a.createPropertyDefinitionsGeneralGroup)(T,"scalesTimeScaleGroup",Ye)),{definitions:s}}(this._undoModel,this._series.properties().childs(),e,{disableSeriesPrevCloseValueProperty:this._series.isDWMProperty(),seriesHasClosePrice:this._series.hasClosePrice(),seriesPriceScale:this._series.priceScale(),mainSeriesScaleRatioProperty:s,scalesPlacementPropertyObj:t,dateFormatPropertyObj:{property:ri.dateFormatProperty,values:this._availableDateFormatValues},timeHoursFormatPropertyObj:r,currencyConversionEnabled:this._options.currencyConversionEnabled,unitConversionEnabled:this._options.unitConversionEnabled,countdownEnabled:this._options.countdownEnabled,withWeekdayProperty:this._model.onWidget()?void 0:ti.withWeekdayProperty,saveLeftEdgeProperty:e.saveLeftEdge})}_createMaxOffsetPropertyObject(){const e=this._model.timeScale(),t=new l.WatchedValue(Math.floor(e.maxRightOffset()));e.maxRightOffsetChanged().subscribe(this,(e=>{t.setValue(Math.floor(e))})),this._maxRightOffsetPropertyObject={value:e.defaultRightOffset(),min:new l.WatchedValue(0),max:t}}_createDefaultRightOffsetPercentageWatchedValue(){this._defaultRightOffsetPercentageWatchedValue=this._model.timeScale().defaultRightOffsetPercentage()}_createUseRightOffsetPercentageWatchedValue(){this._useRightOffsetPercentageWatchedValue=this._model.timeScale().usePercentageRightOffset()}async _createAppearancePropertyPage(){const e=this._chartWidgetProperties.childs(),t=e.paneProperties.childs(),i=e.scalesProperties.childs(),n=this._model.watermarkSource();let o=null;null!==n&&(o=n.properties().childs());const l={property:c.property(),values:c.availableValues()},a={property:d.property(),values:d.availableValues()} ;null===this._maxRightOffsetPropertyObject&&this._createMaxOffsetPropertyObject(),null===this._defaultRightOffsetPercentageWatchedValue&&this._createDefaultRightOffsetPercentageWatchedValue(),null===this._useRightOffsetPercentageWatchedValue&&this._createUseRightOffsetPercentageWatchedValue();const h=(0,r.ensureNotNull)(this._maxRightOffsetPropertyObject),u=(0,r.ensureNotNull)(this._defaultRightOffsetPercentageWatchedValue),p=(0,r.ensureNotNull)(this._useRightOffsetPercentageWatchedValue),v=await ei(this._undoModel,t,o,i,h,l,a,u,p,this._gridColorsVisibilities);return(0,s.createPropertyPage)(v,"canvas",wi,(0,r.ensureDefined)(yi.canvas))}_createTradingPropertyPage(){return null}async _createEventsPropertyPage(){return null}_createAlertsPropertyPage(){return null}}},47077:e=>{e.exports=''},67640:e=>{e.exports=''},99742:e=>{e.exports=''},61080:e=>{e.exports=''},24096:e=>{e.exports=''},10840:e=>{ e.exports=''},56241:e=>{e.exports=''},1839:e=>{e.exports=''},96343:e=>{e.exports=''},60571:e=>{e.exports=''}}]);