"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1455],{22523:(e,t,s)=>{s.d(t,{DateAndPriceBaseProperties:()=>f,allPropertiesStateKeysBase:()=>y,nonThemedFactoryDefaultsBase:()=>h,themedFactoryDefaultsBase:()=>m});var i=s(50151),r=s(58978),o=s(24633),a=s(65045),l=s(52859),n=s(37293),u=s(43337),c=s(88636);const d=(0,r.getHexColorByName)("color-tv-blue-500"),h={linewidth:2,fontsize:12,fillLabelBackground:!0,fillBackground:!0,backgroundTransparency:60,showVolume:!0,intervalsVisibilities:{...n.intervalsVisibilitiesDefaults},customText:{visible:!1,fontsize:12,bold:!1,italic:!1}},m=new Map([[o.StdTheme.Light,{textcolor:(0,r.getHexColorByName)("color-black"),labelBackgroundColor:(0,r.getHexColorByName)("color-white"),linecolor:d,backgroundColor:(0,l.generateColor)(d,85),shadow:"rgba(0, 0, 0, 0.2)",customText:{color:d}}],[o.StdTheme.Dark,{textcolor:(0,r.getHexColorByName)("color-white"),labelBackgroundColor:(0,r.getHexColorByName)("color-cold-gray-800"),linecolor:d,backgroundColor:(0,l.generateColor)(d,85),shadow:"rgba(0, 0, 0, 0.4)",customText:{color:d}}]]),y=["customText.text"];function p(e){const{showVolume:t=!0,...s}=e;return{...s,showVolume:t}}class f extends c.LineDataSourceProperty{constructor({nonThemedDefaultsKeys:e,themedDefaultsKeys:t,state:s,...r}){super({nonThemedDefaultsKeys:e,themedDefaultsKeys:t,templateKeys:[...e??[],...t??[],...y],state:s?p(s):void 0,...r});const o=s?.customText;this._textProperty=new u.Property(o?.text??""),this.childs().customText?.addChild("text",this._textProperty),this.addChild("textsColors",new a.LineToolColorsProperty([(0,i.ensureDefined)(this.childs().customText?.child("color"))]))}template(){const e=super.template();return e.customText.text=this._textProperty.value(),e}}},22003:(e,t,s)=>{s.r(t),s.d(t,{LineToolDateAndPriceRange:()=>T});var i=s(50151),r=s(41414),o=s(19233),a=s(58978),l=s(24633),n=s(78176),u=s(70031),c=s(31558),d=s(22523);const h=(0,a.getHexColorByName)("color-tv-blue-500"),m={...d.nonThemedFactoryDefaultsBase,drawBorder:!1,borderWidth:1,showBarsRange:!0,showDateTimeRange:!0,showPriceRange:!0,showPercentPriceRange:!0,showPipsPriceRange:!0},y=new Map([[l.StdTheme.Light,{...d.themedFactoryDefaultsBase.get(l.StdTheme.Light),borderColor:h}],[l.StdTheme.Dark,{...d.themedFactoryDefaultsBase.get(l.StdTheme.Dark),borderColor:h}]]),p=(0,n.extractThemedColors)((0,i.ensureDefined)(y.get(l.StdTheme.Light)),(0,i.ensureDefined)(y.get(l.StdTheme.Dark))),f=(0,n.extractAllPropertiesKeys)((0,i.ensureDefined)(y.get(l.StdTheme.Light))),g=(0,n.extractAllPropertiesKeys)(m),b=[...new Set([...f,...g,...c.commonLineToolPropertiesStateKeys,...d.allPropertiesStateKeysBase])];class v extends d.DateAndPriceBaseProperties{static create(e,t){return new this({defaultName:"linetooldateandpricerange",factoryDefaultsSupplier:()=>(0,u.factoryDefaultsForCurrentTheme)(m,y),nonThemedDefaultsKeys:g,themedDefaultsKeys:f,allStateKeys:b,themedColors:p,replaceThemedColorsOnThemeChange:!0,state:t,theme:e})}}class T extends r.LineDataSource{constructor(e,t,i,r){
super(e,t??T.createProperties(e.backgroundTheme().spawnOwnership()),i,r),this._volumeCalculator=null,Promise.all([s.e(6290),s.e(986),s.e(6668),s.e(1583)]).then(s.bind(s,33234)).then((e=>{this._setPaneViews([new e.DateAndPriceRangePaneView(this,this._model)])}))}destroy(){super.destroy(),null!==this._volumeCalculator&&this._volumeCalculator.destroy()}pointsCount(){return 2}name(){return"Date and Price Range"}template(){return this._properties.template()}volume(){if(null===this._volumeCalculator)return NaN;const e=this.points();return this._volumeCalculator.volume(e[0].index,e[1].index)}setOwnerSource(e){e===this._model.mainSeries()&&((0,i.assert)(null===this._volumeCalculator),this._volumeCalculator=new o.SeriesTimeRangeVolumeCalculator(this._model.mainSeries())),super.setOwnerSource(e)}static createProperties(e,t){const s=v.create(e,t);return this._configureProperties(s),s}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([s.e(3198),s.e(5410),s.e(2745),s.e(8823),s.e(8537)]).then(s.bind(s,86763))).GeneralDatePriceRangeDefinitionsViewModel}}},31558:(e,t,s)=>{s.d(t,{commonLineToolPropertiesStateKeys:()=>i});const i=["symbolStateVersion","zOrderVersion","frozen","title","interval","symbol","currencyId","unitId","visible","intervalsVisibilities.ticks","intervalsVisibilities.seconds","intervalsVisibilities.secondsFrom","intervalsVisibilities.secondsTo","intervalsVisibilities.minutes","intervalsVisibilities.minutesFrom","intervalsVisibilities.minutesTo","intervalsVisibilities.hours","intervalsVisibilities.hoursFrom","intervalsVisibilities.hoursTo","intervalsVisibilities.days","intervalsVisibilities.daysFrom","intervalsVisibilities.daysTo","intervalsVisibilities.weeks","intervalsVisibilities.weeksFrom","intervalsVisibilities.weeksTo","intervalsVisibilities.months","intervalsVisibilities.monthsFrom","intervalsVisibilities.monthsTo","intervalsVisibilities.ranges"];var r,o,a;!function(e){e[e.NotShared=0]="NotShared",e[e.SharedInLayout=1]="SharedInLayout",e[e.GloballyShared=2]="GloballyShared"}(r||(r={})),function(e){e.BeforeAllAction="BeforeAll",e.CustomAction="CustomAction"}(o||(o={})),function(e){e.FloatingToolbarButton="FloatingToolbarButton",e.Default="Default"}(a||(a={}))},88636:(e,t,s)=>{s.d(t,{LineDataSourceProperty:()=>l});var i=s(90054),r=s(16738),o=s(50151),a=s(78176);class l extends a.DefaultProperty{constructor({templateKeys:e,...t}){super({ignoreAllowSavingDefaults:!0,saveNonDefaultUserPreferencesOnly:!0,...t}),this._templateKeys=(0,o.ensureDefined)(e||this._allDefaultsKeys)}template(){return(0,a.extractState)(this.state(),this._templateKeys,[])}applyTemplate(e){this.mergeAndFire((0,a.extractState)((0,r.default)((0,i.default)(this._factoryDefaultsSupplier()),e),this._templateKeys))}}},70031:(e,t,s)=>{s.d(t,{factoryDefaultsForCurrentTheme:()=>n});var i=s(16738),r=s(90054),o=s(50151),a=s(45345),l=s(24633);function n(e,t){const s=a.watchedTheme.value()??l.StdTheme.Light,n=(0,r.default)(e);return(0,i.default)(n,(0,o.ensureDefined)(t.get(s))),n}}}]);