"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[4520],{738597:(e,i,o)=>{o.d(i,{getSeriesStylePropertiesDefinitions:()=>Oe});var t=o(609838),n=o(664902),r=o(308954),l=(o(881593),o(650802)),s=o(156963),a=o(372605),c=(o(648067),o(849303)),d=o(311757);const u=new n.TranslatedString("change color bars based on previous close",t.t(null,void 0,o(829353))),p=(new n.TranslatedString("change use volume weighted bars",t.t(null,void 0,o(495108))),new n.TranslatedString("change HLC bars",t.t(null,void 0,o(655740)))),h=new n.TranslatedString("change bar up color",t.t(null,void 0,o(476804))),y=new n.TranslatedString("change bar down color",t.t(null,void 0,o(171816))),f=new n.TranslatedString("change thin bars",t.t(null,void 0,o(672886))),g=new n.TranslatedString("change line price source",t.t(null,void 0,o(17119))),v=new n.TranslatedString("change line color",t.t(null,void 0,o(687828))),S=new n.TranslatedString("change line width",t.t(null,void 0,o(669125))),P=new n.TranslatedString("change area price source",t.t(null,void 0,o(201316))),w=new n.TranslatedString("change area line color",t.t(null,void 0,o(200661))),b=new n.TranslatedString("change area line width",t.t(null,void 0,o(206610))),T=new n.TranslatedString("change area fill color",t.t(null,void 0,o(897008))),m=new n.TranslatedString("change baseline price source",t.t(null,void 0,o(156819))),D=new n.TranslatedString("change baseline top line color",t.t(null,void 0,o(268621))),C=new n.TranslatedString("change baseline top line width",t.t(null,void 0,o(535339))),_=new n.TranslatedString("change baseline bottom line color",t.t(null,void 0,o(104164))),k=new n.TranslatedString("change baseline bottom line width",t.t(null,void 0,o(438990))),$=new n.TranslatedString("change baseline fill top area color",t.t(null,void 0,o(112673))),L=new n.TranslatedString("change baseline fill bottom area color",t.t(null,void 0,o(273163))),M=new n.TranslatedString("change base level",t.t(null,void 0,o(831547))),W=new n.TranslatedString("change high-low body visibility",t.t(null,void 0,o(330033))),V=new n.TranslatedString("change high-low body color",t.t(null,void 0,o(281080))),B=new n.TranslatedString("change high-low borders visibility",t.t(null,void 0,o(279236))),I=new n.TranslatedString("change high-low border color",t.t(null,void 0,o(676885))),O=new n.TranslatedString("change high-low labels visibility",t.t(null,void 0,o(142981))),x=new n.TranslatedString("change high-low labels color",t.t(null,void 0,o(531937))),A=(new n.TranslatedString("change renko wick visibility",t.t(null,void 0,o(109473))),new n.TranslatedString("change renko wick up color",t.t(null,void 0,o(707747))),new n.TranslatedString("change renko wick down color",t.t(null,void 0,o(875986))),new n.TranslatedString("change the display of real prices on price scale (instead of Heiken-Ashi price)",t.t(null,void 0,o(639783))),new n.TranslatedString("change range thin bars",t.t(null,void 0,o(328143))),new n.TranslatedString("change range bars style",t.t(null,void 0,o(735116))),
new n.TranslatedString("change {candleType} body visibility",t.t(null,void 0,o(647202)))),j=new n.TranslatedString("change {candleType} up color",t.t(null,void 0,o(861118))),F=new n.TranslatedString("change {candleType} down color",t.t(null,void 0,o(136320))),E=new n.TranslatedString("change {candleType} border visibility",t.t(null,void 0,o(123986))),N=new n.TranslatedString("change {candleType} up border color",t.t(null,void 0,o(405464))),U=new n.TranslatedString("change {candleType} down border color",t.t(null,void 0,o(492330))),H=new n.TranslatedString("change {candleType} wick visibility",t.t(null,void 0,o(239987))),R=new n.TranslatedString("change {candleType} wick up color",t.t(null,void 0,o(445543))),z=new n.TranslatedString("change {candleType} wick down color",t.t(null,void 0,o(660164))),G=new n.TranslatedString("change {chartType} up color",t.t(null,void 0,o(59414))),J=new n.TranslatedString("change {chartType} down color",t.t(null,void 0,o(685503))),q=new n.TranslatedString("change {chartType} projection bar up color",t.t(null,void 0,o(50453))),K=new n.TranslatedString("change {chartType} projection bar down color",t.t(null,void 0,o(618465))),Q=new n.TranslatedString("change {chartType} border bar up color",t.t(null,void 0,o(811107))),X=new n.TranslatedString("change {chartType} border bar down color",t.t(null,void 0,o(179088))),Y=new n.TranslatedString("change {chartType} projection border bar up color",t.t(null,void 0,o(761250))),Z=new n.TranslatedString("change {chartType} projection border bar up color",t.t(null,void 0,o(761250))),ee=new n.TranslatedString("change column up color",t.t(null,void 0,o(985709))),ie=new n.TranslatedString("change column down color",t.t(null,void 0,o(112155))),oe=new n.TranslatedString("change column price source",t.t(null,void 0,o(166890))),te=t.t(null,void 0,o(563243)),ne=(t.t(null,void 0,o(735612)),t.t(null,void 0,o(586953))),re=t.t(null,void 0,o(405536)),le=t.t(null,void 0,o(587151)),se=t.t(null,void 0,o(855314)),ae=t.t(null,void 0,o(883760)),ce=t.t(null,void 0,o(872269)),de=t.t(null,void 0,o(226458)),ue=t.t(null,void 0,o(224248)),pe=t.t(null,void 0,o(301277)),he=t.t(null,void 0,o(457417)),ye=t.t(null,void 0,o(350430)),fe=t.t(null,void 0,o(986846)),ge=t.t(null,void 0,o(658747)),ve=t.t(null,void 0,o(111157)),Se=t.t(null,void 0,o(683610)),Pe=t.t(null,void 0,o(339667)),we=(t.t(null,void 0,o(280293)),t.t(null,void 0,o(994089))),be=t.t(null,void 0,o(405704)),Te=(t.t(null,void 0,o(729881)),t.t(null,void 0,o(507445))),me=t.t(null,void 0,o(883760)),De=t.t(null,void 0,o(872269)),Ce=t.t(null,void 0,o(194420)),_e=t.t(null,void 0,o(983678)),ke=t.t(null,void 0,o(715857)),$e=t.t(null,void 0,o(275310));t.t(null,void 0,o(832733)),t.t(null,void 0,o(16812)),t.t(null,void 0,o(463528));function Le(e,i,o,t){return(0,r.createCheckablePropertyDefinition)({checked:(0,r.convertToDefinitionProperty)(e,i.barColorsOnPrevClose,u)},{id:`${o}${t}`,title:te})}function Me(e,i,o,t,n,s){const a=void 0;return(0,r.createOptionsPropertyDefinition)({disabled:a&&(0,
r.convertFromReadonlyWVToDefinitionProperty)(a.ownership()),option:(0,r.convertToDefinitionProperty)(e,i.priceSource,s)},{id:`${t}${n}`,title:ue,options:new l.WatchedValue(o)})}function We(e,i,o,t){const n=(0,d.removeSpaces)(o.originalText());return[(0,r.createTwoColorsPropertyDefinition)({checked:(0,r.convertToDefinitionProperty)(e,i.drawBody,A.format({candleType:o})),color1:(0,r.getColorDefinitionProperty)(e,i.upColor,null,j.format({candleType:o})),color2:(0,r.getColorDefinitionProperty)(e,i.downColor,null,F.format({candleType:o}))},{id:`${t}Symbol${n}CandlesColor`,title:ae}),(0,r.createTwoColorsPropertyDefinition)({checked:(0,r.convertToDefinitionProperty)(e,i.drawBorder,E.format({candleType:o})),color1:(0,r.getColorDefinitionProperty)(e,i.borderUpColor,null,N.format({candleType:o})),color2:(0,r.getColorDefinitionProperty)(e,i.borderDownColor,null,U.format({candleType:o}))},{id:`${t}Symbol${n}BordersColor`,title:ce}),(0,r.createTwoColorsPropertyDefinition)({checked:(0,r.convertToDefinitionProperty)(e,i.drawWick,H.format({candleType:o})),color1:(0,r.getColorDefinitionProperty)(e,i.wickUpColor,null,R.format({candleType:o})),color2:(0,r.getColorDefinitionProperty)(e,i.wickDownColor,null,z.format({candleType:o}))},{id:`${t}Symbol${n}WickColors`,title:de})]}function Ve(e,i,o,t){return[Me(e,i,o,t,"SymbolLinePriceSource",g),(0,r.createLinePropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.color,null,v),width:(0,r.convertToDefinitionProperty)(e,i.linewidth,S)},{id:`${t}SymbolLineStyle`,title:pe})]}function Be(e,i,o,t){const n=[];{const l=(0,d.removeSpaces)(o.originalText()),s=(0,r.createColorPropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.upColor,null,G.format({chartType:o}))},{id:`${t}Symbol${l}UpBars`,title:Se}),a=(0,r.createColorPropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.downColor,null,J.format({chartType:o}))},{id:`${t}Symbol${l}DownBars`,title:Pe}),c=(0,r.createColorPropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.upColorProjection,null,q.format({chartType:o}))},{id:`${t}Symbol${l}ProjectionUpBars`,title:we}),u=(0,r.createColorPropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.downColorProjection,null,K.format({chartType:o}))},{id:`${t}Symbol${l}ProjectionDownBars`,title:be});n.push(s,a,c,u)}return n}function Ie(e,i,o,t){const n=[];{const l=(0,d.removeSpaces)(o.originalText()),s=(0,r.createTwoColorsPropertyDefinition)({color1:(0,r.getColorDefinitionProperty)(e,i.upColor,null,G.format({chartType:o})),color2:(0,r.getColorDefinitionProperty)(e,i.borderUpColor,null,Q.format({chartType:o}))},{id:`${t}Symbol${l}UpBars`,title:Se}),a=(0,r.createTwoColorsPropertyDefinition)({color1:(0,r.getColorDefinitionProperty)(e,i.downColor,null,J.format({chartType:o})),color2:(0,r.getColorDefinitionProperty)(e,i.borderDownColor,null,X.format({chartType:o}))},{id:`${t}Symbol${l}DownBars`,title:Pe}),c=(0,r.createTwoColorsPropertyDefinition)({color1:(0,r.getColorDefinitionProperty)(e,i.upColorProjection,null,q.format({chartType:o})),color2:(0,
r.getColorDefinitionProperty)(e,i.borderUpColorProjection,null,Y.format({chartType:o}))},{id:`${t}Symbol${l}ProjectionUpBars`,title:we}),u=(0,r.createTwoColorsPropertyDefinition)({color1:(0,r.getColorDefinitionProperty)(e,i.downColorProjection,null,K.format({chartType:o})),color2:(0,r.getColorDefinitionProperty)(e,i.borderDownColorProjection,null,Z.format({chartType:o}))},{id:`${t}Symbol${l}ProjectionDownBars`,title:be});n.push(s,a,c,u)}return n}function Oe(e,i,d,u,g){switch(d){case 0:return function(e,i,o,t){return[Le(e,i,t,"SymbolBarStyleBarColorsOnPrevClose"),void 0,(0,r.createCheckablePropertyDefinition)({checked:(0,r.convertToDefinitionProperty)(e,i.dontDrawOpen,p)},{id:`${t}SymbolDontDrawOpen`,title:ne}),(0,r.createColorPropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.upColor,null,h)},{id:`${t}SymbolUpColor`,title:re}),(0,r.createColorPropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.downColor,null,y)},{id:`${t}SymbolDownColor`,title:le}),(0,r.createCheckablePropertyDefinition)({checked:(0,r.convertToDefinitionProperty)(e,i.thinBars,f)},{id:`${t}SymbolBarThinBars`,title:se})].filter(a.isExistent)}(e,i.barStyle.childs(),xe(i)&&i.useVolumeWeightBars,g);case 1:return function(e,i,r,l){return[Le(e,i,l,"SymbolCandleStyleBarColorsOnPrevClose"),void 0,...We(e,i,new n.TranslatedString("candle",t.t(null,void 0,o(130792))),l)].filter(a.isExistent)}(e,i.candleStyle.childs(),xe(i)&&i.useVolumeWeightBars,g);case 2:return Ve(e,i.lineStyle.childs(),u.seriesPriceSources,g);case 14:return Ve(e,i.lineWithMarkersStyle.childs(),u.seriesPriceSources,g);case 15:return Ve(e,i.steplineStyle.childs(),u.seriesPriceSources,g);case 3:return function(e,i,o,t){return[Me(e,i,o,t,"SymbolAreaPriceSource",P),(0,r.createLinePropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.linecolor,null,w),width:(0,r.convertToDefinitionProperty)(e,i.linewidth,b)},{id:`${t}SymbolAreaLineStyle`,title:pe}),(0,r.createTwoColorsPropertyDefinition)({color1:(0,r.getColorDefinitionProperty)(e,i.color1,i.transparency,T),color2:(0,r.getColorDefinitionProperty)(e,i.color2,i.transparency,T)},{id:`${t}SymbolAreaFills`,title:fe})]}(e,i.areaStyle.childs(),u.seriesPriceSources,g);case 16:return function(e,i,o,t){return[(0,r.createLinePropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.highLineColor,null,w),width:(0,r.convertToDefinitionProperty)(e,i.highLineWidth,b)},{id:`${t}SymbolHLCAreaHighLineStyle`,title:_e}),(0,r.createLinePropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.lowLineColor,null,w),width:(0,r.convertToDefinitionProperty)(e,i.lowLineWidth,b)},{id:`${t}SymbolHLCAreaLowLineStyle`,title:$e}),(0,r.createLinePropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.closeLineColor,null,w),width:(0,r.convertToDefinitionProperty)(e,i.closeLineWidth,b)},{id:`${t}SymbolHLCAreaCloseLineStyle`,title:ke}),(0,r.createTwoColorsPropertyDefinition)({color1:(0,r.getColorDefinitionProperty)(e,i.highCloseFillColor,null,T),color2:(0,r.getColorDefinitionProperty)(e,i.closeLowFillColor,null,T)},{
id:`${t}SymbolHLCAreaFills`,title:fe})]}(e,i.hlcAreaStyle.childs(),u.seriesPriceSources,g);case 9:return We(e,i.hollowCandleStyle.childs(),new n.TranslatedString("hollow candles",t.t(null,void 0,o(375165))),g);case 10:return function(e,i,o,t){return[Me(e,i,o,t,"SymbolBaseLinePriceSource",m),(0,r.createLinePropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.topLineColor,null,D),width:(0,r.convertToDefinitionProperty)(e,i.topLineWidth,C)},{id:`${t}SymbolBaseLineTopLine`,title:he}),(0,r.createLinePropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.bottomLineColor,null,_),width:(0,r.convertToDefinitionProperty)(e,i.bottomLineWidth,k)},{id:`${t}SymbolBaseLineBottomLine`,title:ye}),(0,r.createTwoColorsPropertyDefinition)({color1:(0,r.getColorDefinitionProperty)(e,i.topFillColor1,null,$),color2:(0,r.getColorDefinitionProperty)(e,i.topFillColor2,null,$)},{id:`${t}SymbolBaseLineTopFills`,title:ge}),(0,r.createTwoColorsPropertyDefinition)({color1:(0,r.getColorDefinitionProperty)(e,i.bottomFillColor1,null,L),color2:(0,r.getColorDefinitionProperty)(e,i.bottomFillColor2,null,L)},{id:`${t}SymbolBaseLineBottomFills`,title:ve}),(0,r.createNumberPropertyDefinition)({value:(0,r.convertToDefinitionProperty)(e,i.baseLevelPercentage,M,[c.floor])},{id:`${t}SymbolBaseLevelPercentage`,title:Te,type:0,min:new l.WatchedValue(0),max:new l.WatchedValue(100),step:new l.WatchedValue(1),unit:new l.WatchedValue("%")})]}(e,i.baselineStyle.childs(),u.seriesPriceSources,g);case 13:return function(e,i,o,t){return[Me(e,i,o,t,"SymbolColumnPriceSource",oe),Le(e,i,t,"SymbolColumnStyleColumnColorsOnPrevClose"),(0,r.createColorPropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.upColor,null,ee)},{id:`${t}SymbolUpColor`,title:re}),(0,r.createColorPropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.downColor,null,ie)},{id:`${t}SymbolDownColor`,title:le})]}(e,i.columnStyle.childs(),u.seriesPriceSources,g)}if(12===d&&s.enabled("chart_style_hilo")){return function(e,i,o){return[(0,r.createColorPropertyDefinition)({checked:(0,r.convertToDefinitionProperty)(e,i.drawBody,W),color:(0,r.getColorDefinitionProperty)(e,i.color,null,V)},{id:`${o}SymbolBodiesColor`,title:me}),(0,r.createColorPropertyDefinition)({checked:(0,r.convertToDefinitionProperty)(e,i.showBorders,B),color:(0,r.getColorDefinitionProperty)(e,i.borderColor,null,I)},{id:`${o}SymbolBorderColor`,title:De}),(0,r.createTextPropertyDefinition)({checked:(0,r.convertToDefinitionProperty)(e,i.showLabels,O),color:(0,r.getColorDefinitionProperty)(e,i.labelColor,null,x)},{id:`${o}SymbolLabels`,title:Ce,isEditable:!1,isMultiLine:!1})]}(e,i.hiloStyle.childs(),g)}if(!i.hasOwnProperty("haStyle"))return[];if(u.isJapaneseChartsAvailable&&8===d){return function(e,i,r){const l=[];return l.push(Le(e,i,r,"SymbolHAStyleBarColorsOnPrevClose"),...We(e,i,new n.TranslatedString("Heikin Ashi",t.t(null,void 0,o(240530))),r)),l}(e,i.haStyle.childs(),g)}if(u.isJapaneseChartsAvailable&&s.enabled("japanese_chart_styles")){if(4===d||5===d||6===d||7===d||8===d)switch(d){case 4:
return function(e,i,r){return[...Ie(e,i,new n.TranslatedString("renko",t.t(null,void 0,o(47500))),r)]}(e,i.renkoStyle.childs(),g);case 5:return Be(e,i.kagiStyle.childs(),new n.TranslatedString("kagi",t.t(null,void 0,o(932387))),g);case 6:return Be(e,i.pnfStyle.childs(),new n.TranslatedString("point & figure",t.t(null,void 0,o(77828))),g);case 7:return Ie(e,i.pbStyle.childs(),new n.TranslatedString("line break",t.t(null,void 0,o(259905))),g)}0}return[]}function xe(e){return!("inputs"in e)}},44520:(e,i,o)=>{o.d(i,{SeriesPropertyDefinitionsViewModel:()=>ue,basePriceSources:()=>ce,seriesPrecisionValues:()=>de});var t=o(650151),n=o(609838),r=o(664902),l=o(156963),s=o(308954),a=o(650802),c=o(982552),d=o(681434),u=o(738597),p=o(849303);const h=new r.TranslatedString("change {inputName} property",n.t(null,void 0,o(621547)));function y(e){return e.map((e=>({value:e,title:n.t(e,{context:"input"},o(788601))})))}function f(e,i,l,c,u,f,g){const v=[];return l.forEach((l=>{if(!function(e,i){return!e.isHidden&&(void 0===e.visible||function(e,i){if(!e)return!0;const o=e.split("==");return!(o.length<2)&&i[o[0]].value()===o[1]}(e.visible,i))}(l,c))return;const S=l.id;if(!c.hasOwnProperty(S))return;const P=c[S],w=function(e,i){return"style"===e.id?"Box size assignment method":"boxSize"===e.id?"Box size":i.childs().name.value()}(l,u[S]),b=function(e){return n.t(e,{context:"input"},o(788601))}(w),T=new r.TranslatedString(w,b);if("options"in l){const i=(0,t.ensure)(l.options);v.push((0,s.createOptionsPropertyDefinition)({option:(0,s.convertToDefinitionProperty)(e,P,h.format({inputName:T}))},{id:`${g}${l.name}`,title:b,options:new a.WatchedValue(y(i))}))}else if("integer"!==l.type){if("float"===l.type){let o;return o=function(e,i){return!((i===(0,d.chartStyleStudyId)(4)||i===(0,d.chartStyleStudyId)(6))&&"boxSize"===e||i===(0,d.chartStyleStudyId)(5)&&"reversalAmount"===e)}(S,i)||null===f.value()?new a.WatchedValue(l.min):f,void v.push((0,s.createNumberPropertyDefinition)({value:(0,s.convertToDefinitionProperty)(e,P,h.format({inputName:T}))},{id:`${g}${l.name}`,title:b,type:1,min:o,max:new a.WatchedValue(l.max),defval:l.defval}))}"text"!==l.type?"bool"!==l.type||v.push((0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,P,h.format({inputName:T}))},{id:`${g}${l.name}`,title:b})):v.push((0,s.createTextPropertyDefinition)({text:(0,s.convertToDefinitionProperty)(e,P,h.format({inputName:T}))},{id:`${g}${l.name}`,title:b,isEditable:!0,isMultiLine:!1}))}else v.push((0,s.createNumberPropertyDefinition)({value:(0,s.convertToDefinitionProperty)(e,P,h.format({inputName:T}),[p.floor])},{id:`${g}${l.name}`,title:b,type:0,min:new a.WatchedValue(l.min),max:new a.WatchedValue(l.max),defval:l.defval}))})),v}var g=o(6835),v=o(817680),S=o(648067),P=o(144273),w=o(471453);const b=(0,
g.getLogger)("Chart.Definitions.Series"),T=l.enabled("show_average_close_price_line_and_label"),m=l.enabled("pre_post_market_sessions"),D=new r.TranslatedString("change decimal places",n.t(null,void 0,o(71809))),C=new r.TranslatedString("change timezone",n.t(null,void 0,o(820505))),_=(new r.TranslatedString("adjust data for dividends",n.t(null,void 0,o(342390))),new r.TranslatedString("use settlement as close on daily interval",n.t(null,void 0,o(398402))),new r.TranslatedString("adjust for contract changes",n.t(null,void 0,o(399511))),new r.TranslatedString("change session",n.t(null,void 0,o(765303)))),k=new r.TranslatedString("change extended hours color",n.t(null,void 0,o(31317))),$=new r.TranslatedString("change pre market color",n.t(null,void 0,o(746257))),L=new r.TranslatedString("change post market color",n.t(null,void 0,o(449973))),M=new r.TranslatedString("change price line visibility",n.t(null,void 0,o(867761))),W=new r.TranslatedString("change price line color",n.t(null,void 0,o(177640))),V=new r.TranslatedString("change price line width",n.t(null,void 0,o(497322))),B=new r.TranslatedString("change previous close price line visibility",n.t(null,void 0,o(259883))),I=new r.TranslatedString("change previous close price line color",n.t(null,void 0,o(891183))),O=new r.TranslatedString("change previous close price line width",n.t(null,void 0,o(87631))),x=(new r.TranslatedString("change pre/post market price lines visibility",n.t(null,void 0,o(350393))),new r.TranslatedString("change pre market line color",n.t(null,void 0,o(60852))),new r.TranslatedString("change post market line color",n.t(null,void 0,o(5969))),new r.TranslatedString("change bid and ask lines visibility",n.t(null,void 0,o(432311)))),A=new r.TranslatedString("change bid line color",n.t(null,void 0,o(436703))),j=new r.TranslatedString("change ask line color",n.t(null,void 0,o(129180))),F=new r.TranslatedString("change high and low price lines visibility",n.t(null,void 0,o(992556))),E=new r.TranslatedString("change high and low price line color",n.t(null,void 0,o(560944))),N=new r.TranslatedString("change high and low price line width",n.t(null,void 0,o(983708))),U=new r.TranslatedString("change average close price line visibility",n.t(null,void 0,o(498866))),H=new r.TranslatedString("change average close price line color",n.t(null,void 0,o(730385))),R=new r.TranslatedString("change average close price line width",n.t(null,void 0,o(568927))),z=(n.t(null,void 0,o(909994)),n.t(null,void 0,o(25866))),G=(n.t(null,void 0,o(710989)),n.t(null,void 0,o(999983)),n.t(null,void 0,o(362521))),J=n.t(null,void 0,o(915107)),q=n.t(null,void 0,o(8094)),K=n.t(null,void 0,o(947586)),Q=(n.t(null,void 0,o(906350)),n.t(null,void 0,o(173947))),X=n.t(null,void 0,o(587492)),Y=n.t(null,void 0,o(539280)),Z=n.t(null,void 0,o(330777)),ee=n.t(null,void 0,o(608136)),ie=n.t(null,void 0,o(931691)),oe=n.t(null,void 0,o(710591)),te=n.t(null,void 0,o(94884)),ne=n.t(null,void 0,o(822353)),re=n.t(null,void 0,o(204329)),le=n.t(null,void 0,o(439292)),se=n.t(null,void 0,o(470816)),ae=[{
priceScale:2,minMove:1,frac:!0},{priceScale:4,minMove:1,frac:!0},{priceScale:8,minMove:1,frac:!0},{priceScale:16,minMove:1,frac:!0},{priceScale:32,minMove:1,frac:!0},{priceScale:64,minMove:1,frac:!0},{priceScale:128,minMove:1,frac:!0},{priceScale:320,minMove:1,frac:!0}],ce=[{title:Y,value:"open",id:"price-source-open"},{title:Z,value:"high",id:"price-source-high"},{title:ee,value:"low",id:"price-source-low"},{title:ie,value:"close",id:"price-source-close"},{title:oe,value:"hl2",id:"price-source-hl2"},{title:te,value:"hlc3",id:"price-source-hlc3"},{title:ne,value:"ohlc4",id:"price-source-ohlc4"}];function de(){const e=[{title:re,value:"default"}],i=function(e=15){const i=[];for(let o=0;o<=e;o++)i.push({priceScale:Math.pow(10,o),minMove:1,frac:!1});return i}();for(let o=0;o<i.length;o++){const t=Math.log10(i[o].priceScale),n=0===t?"Integer":1===t?`${t} decimal`:`${t} decimals`;e.push({title:n,value:`${i[o].priceScale},${i[o].minMove},${i[o].frac}`})}for(let i=0;i<ae.length;i++)e.push({title:`${ae[i].minMove}/${ae[i].priceScale}`,value:`${ae[i].priceScale},${ae[i].minMove},${ae[i].frac}`});return e}class ue{constructor(e,i,o,t,n,r){this._definitions=null,this._inputsSubscriptions=null,this._isDestroyed=!1,this._propertyPages=null,this._seriesMinTickWV=null,this._sessionIdOptionsWV=new a.WatchedValue([]),this._series=e,this._undoModel=i,this._model=this._undoModel.model(),this._propertyPageId=o,this._propertyPageName=t,this._propertyPageIcon=n,this._timezonePropertyObj=r,this._series.onStyleChanged().subscribe(this,this._updateDefinitions),this._series.properties().childs().rangeStyle.childs().barStyle.listeners().subscribe(this,this._updateDefinitions),this._series.dataEvents().symbolResolved().subscribe(this,this._updateSeriesMinTickWV),this._series.dataEvents().symbolResolved().subscribe(this,this._updateSessionIdOptionsWV),this._updateSeriesMinTickWV(),this._updateSessionIdOptionsWV()}destroy(){null!==this._propertyPages&&this._propertyPages.forEach((e=>{(0,s.destroyDefinitions)(e.definitions.value())})),this._series.onStyleChanged().unsubscribe(this,this._updateDefinitions),this._series.properties().childs().rangeStyle.childs().barStyle.listeners().unsubscribeAll(this),this._series.dataEvents().symbolResolved().unsubscribeAll(this),this._unsubscribeInputsUpdate(),this._isDestroyed=!0}propertyPages(){return null===this._propertyPages?this._getDefinitions().then((e=>{var i;if(this._isDestroyed)throw new Error("SeriesPropertyDefinitionsViewModel already destroyed");return null===this._propertyPages&&(this._propertyPages=[{id:this._propertyPageId,title:this._propertyPageName,icon:this._propertyPageIcon,definitions:new a.WatchedValue(e.definitions),visible:null!==(i=e.visible)&&void 0!==i?i:new a.WatchedValue(!0).readonly()}]),this._propertyPages})):Promise.resolve(this._propertyPages)}_seriesMinTick(){const e=this._series.symbolInfo();return null!==e?e.minmov/e.pricescale:null}_updateSeriesMinTickWV(){
null===this._seriesMinTickWV?this._seriesMinTickWV=new a.WatchedValue(this._seriesMinTick()):this._seriesMinTickWV.setValue(this._seriesMinTick())}_updateSessionIdOptionsWV(){if(!m)return;const e=this._series.symbolInfo();if(null===e)return;const i=(e.subsessions||[]).filter((e=>!e.private)).map((e=>({title:(0,w.translateSessionDescription)(e.description),value:e.id})));this._sessionIdOptionsWV.setValue(i)}_updateDefinitions(){null!==this._definitions&&(0,s.destroyDefinitions)(this._definitions.definitions),this._definitions=null,this._unsubscribeInputsUpdate(),this._createSeriesDefinitions().then((e=>{if(this._isDestroyed)throw new Error("SeriesPropertyDefinitionsViewModel already destroyed");(0,t.ensureNotNull)(this._propertyPages)[0].definitions.setValue(e.definitions)}))}_getDefinitions(){return null===this._definitions?this._createSeriesDefinitions():Promise.resolve(this._definitions)}_unsubscribeInputsUpdate(){null!==this._inputsSubscriptions&&(this._inputsSubscriptions.forEach((e=>{e.unsubscribeAll(this)})),this._inputsSubscriptions=null)}_subscribeInputsUpdate(e,i){const o=[];e.forEach((e=>{if(void 0!==e.visible){const t=e.visible.split("==");if(2===t.length){const e=i[t[0]];-1===o.indexOf(e)&&(e.subscribe(this,this._updateDefinitions),o.push(e))}}})),o.length>0?this._inputsSubscriptions=o:this._inputsSubscriptions=null}_createSeriesDefinitions(){const e=this._series.properties().childs(),i=this._series.getInputsProperties(),r=this._series.getInputsInfoProperties(),l=e.style.value(),p=this._series.getStyleShortName();return new Promise((e=>{const o=17!==l?(0,d.chartStyleStudyId)(l):null;null!==o?(0,c.studyMetaInfoRepository)().findById({type:"java",studyId:o}).then((o=>{if(this._isDestroyed)throw new Error("SeriesPropertyDefinitionsViewModel already destroyed");if(null!==this._definitions)return void e(null);const n=(0,t.ensureNotNull)(this._seriesMinTickWV),l=f(this._undoModel,o.id,o.inputs,i,r,n,p);this._subscribeInputsUpdate(o.inputs,i),e(l)})).catch((i=>{b.logWarn(`Find meta info for create series definitions with error - ${(0,v.errorToString)(i)}`),e(null)})):e(null)})).then((i=>{if(this._isDestroyed)throw new Error("SeriesPropertyDefinitionsViewModel already destroyed");return null!==this._definitions?this._definitions:new Promise(((o,t)=>{if(17!==l){const t=(0,u.getSeriesStylePropertiesDefinitions)(this._undoModel,e,l,{seriesPriceSources:ce,isJapaneseChartsAvailable:true},"mainSeries");null!==i&&t.push(...i);o((0,s.createPropertyDefinitionsGeneralGroup)(t,"generalSymbolStylesGroup",(0,d.getTranslatedChartStyleName)(l)))}else t("unexpected chart style")})).then((i=>{const t=(0,s.createOptionsPropertyDefinition)({option:(0,s.convertToDefinitionProperty)(this._undoModel,e.minTick,D)},{id:`${p}SymbolMinTick`,title:Q,options:new a.WatchedValue(de())}),r=(0,s.createOptionsPropertyDefinition)({option:(0,s.convertToDefinitionProperty)(this._undoModel,this._timezonePropertyObj.property,C)},{id:`${p}SymbolTimezone`,title:X,options:new a.WatchedValue(this._timezonePropertyObj.values)});return this._definitions={
definitions:[i,(0,s.createPropertyDefinitionsGeneralGroup)(this._seriesPriceLinesDefinitions(p),"priceLinesGroup",n.t(null,void 0,o(131971))),(0,s.createPropertyDefinitionsGeneralGroup)([...this._seriesDataDefinitions(p),t,r],"dataModififcationGroup",n.t(null,void 0,o(181285)))]},this._definitions}))}))}_seriesDataDefinitions(e){const i=[];if(m){const o=this._series.sessionIdProxyProperty(),t=(0,P.combineWithFilteredUpdate)(((e,i)=>!i&&(0,d.symbolHasSeveralSessions)(this._series.symbolInfo())),((e,i)=>i||!e),this._series.symbolResolvingActive().weakReference(),(0,S.createWVFromProperty)(this._series.isDWMProperty()).ownership()),n=(0,s.createOptionsPropertyDefinition)({option:(0,s.convertToDefinitionProperty)(this._undoModel,o,_),visible:(0,s.convertFromReadonlyWVToDefinitionProperty)(t.ownership())},{id:"sessionId",title:z,options:this._sessionIdOptionsWV});i.push(n);const r=this._model.sessions().graphicsInfo();let l=!1;r.backgrounds&&(l=void 0!==r.backgrounds.outOfSession);const a=l?this._createOutOfSessionDefinition(e):this._createPrePostMarketDefinition(e);i.push(a)}return i}_createOutOfSessionDefinition(e){const i=this._model.sessions().properties().childs().graphics.childs().backgrounds.childs().outOfSession.childs();return(0,s.createColorPropertyDefinition)({color:(0,s.getColorDefinitionProperty)(this._undoModel,i.color,i.transparency,k)},{id:`${e}SymbolExtendedHoursColors`,title:G})}_createPrePostMarketDefinition(e){const i=(0,P.combineWithFilteredUpdate)(((e,i)=>!i&&(0,d.symbolHasPreOrPostMarket)(this._series.symbolInfo())&&!(0,d.isRegularSessionId)(this._series.sessionIdProxyProperty().value())),((e,i)=>i||!e),this._series.symbolResolvingActive().weakReference(),(0,S.createWVFromProperty)(this._series.isDWMProperty()).ownership()),o=this._model.sessions(),t=o.properties().childs().graphics.childs().backgrounds.childs().preMarket.childs(),n=o.properties().childs().graphics.childs().backgrounds.childs().postMarket.childs();return(0,s.createTwoColorsPropertyDefinition)({color1:(0,s.getColorDefinitionProperty)(this._undoModel,t.color,t.transparency,$),color2:(0,s.getColorDefinitionProperty)(this._undoModel,n.color,n.transparency,L),visible:(0,s.convertFromReadonlyWVToDefinitionProperty)(i.ownership())},{id:`${e}SymbolExtendedHoursColors`,title:G})}_seriesPriceLinesDefinitions(e){const i=[],o=this._series.properties().childs();if(this._series.hasClosePrice()){const t=(0,s.createLinePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._undoModel,o.showPriceLine,M),color:(0,s.getColorDefinitionProperty)(this._undoModel,o.priceLineColor,null,W),width:(0,s.convertToDefinitionProperty)(this._undoModel,o.priceLineWidth,V)},{id:`${e}SymbolLastValuePriceLine`,title:J});i.push(t)}if(this._series.hasClosePrice()){const t=(0,S.combineProperty)((e=>!e),this._series.isDWMProperty().weakReference()),n=(0,s.createLinePropertyDefinition)({visible:(0,s.makeProxyDefinitionProperty)(t.ownership()),checked:(0,s.convertToDefinitionProperty)(this._undoModel,o.showPrevClosePriceLine,B),color:(0,
s.getColorDefinitionProperty)(this._undoModel,o.prevClosePriceLineColor,null,I),width:(0,s.convertToDefinitionProperty)(this._undoModel,o.prevClosePriceLineWidth,O)},{id:`${e}SymbolPrevClosePriceLine`,title:q});i.push(n)}const t=o.highLowAvgPrice.childs(),n=(0,s.createLinePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._undoModel,t.highLowPriceLinesVisible,F),color:(0,s.getColorDefinitionProperty)(this._undoModel,t.highLowPriceLinesColor,null,E),width:(0,s.convertToDefinitionProperty)(this._undoModel,t.highLowPriceLinesWidth,N)},{id:`${e}SymbolHighLowPriceLines`,title:le});if(i.push(n),T){const o=(0,s.createLinePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._undoModel,t.averageClosePriceLineVisible,U),color:(0,s.getColorDefinitionProperty)(this._undoModel,t.averagePriceLineColor,null,H),width:(0,s.convertToDefinitionProperty)(this._undoModel,t.averagePriceLineWidth,R)},{id:`${e}SymbolAverageClosePriceLine`,title:se});i.push(o)}if(this._model.hasCustomSource("bidask")){const t=o.bidAsk,n=(0,s.createTwoColorsPropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._undoModel,t.childs().visible,x),color1:(0,s.getColorDefinitionProperty)(this._undoModel,t.childs().bidLineColor,null,A),color2:(0,s.getColorDefinitionProperty)(this._undoModel,t.childs().askLineColor,null,j)},{id:`${e}SymbolBidAskLines`,title:K});i.push(n)}return i}}}}]);