"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[4273],{76607:(e,t,o)=>{o.d(t,{DateAndPriceBaseProperties:()=>p,allPropertiesStateKeysBase:()=>d,nonThemedFactoryDefaultsBase:()=>c,themedFactoryDefaultsBase:()=>m});var r=o(19625),s=o(24633),a=o(19063),l=o(31229),n=o(12988),i=o(38039);const u=(0,r.getHexColorByName)("color-tv-blue-500"),c={linewidth:2,fontsize:12,fillLabelBackground:!0,fillBackground:!0,backgroundTransparency:60,showVolume:!0,intervalsVisibilities:{...l.intervalsVisibilitiesDefaults},customText:{visible:!1,fontsize:12,bold:!1,italic:!1}},m=new Map([[s.StdTheme.Light,{textcolor:(0,r.getHexColorByName)("color-black"),labelBackgroundColor:(0,r.getHexColorByName)("color-white"),linecolor:u,backgroundColor:(0,a.generateColor)(u,85),shadow:"rgba(0, 0, 0, 0.2)",customText:{color:u}}],[s.StdTheme.Dark,{textcolor:(0,r.getHexColorByName)("color-white"),labelBackgroundColor:(0,r.getHexColorByName)("color-cold-gray-800"),linecolor:u,backgroundColor:(0,a.generateColor)(u,85),shadow:"rgba(0, 0, 0, 0.4)",customText:{color:u}}]]),d=["customText.text"];function h(e){const{showVolume:t=!0,...o}=e;return{...o,showVolume:t}}class p extends i.LineDataSourceProperty{constructor({nonThemedDefaultsKeys:e,themedDefaultsKeys:t,state:o,...r}){super({nonThemedDefaultsKeys:e,themedDefaultsKeys:t,templateKeys:[...e??[],...t??[],...d],state:o?h(o):void 0,...r});const s=o?.customText;this._textProperty=new n.Property(s?.text??""),this.childs().customText?.addChild("text",this._textProperty)}template(){const e=super.template();return e.customText.text=this._textProperty.value(),e}}},42214:(e,t,o)=>{o.r(t),o.d(t,{LineToolDateRange:()=>f});var r=o(50151),s=o(29875),a=o(61105),l=o(24633),n=o(32679),i=o(11402),u=o(76607),c=o(6590);const m={...u.nonThemedFactoryDefaultsBase,extendTop:!1,extendBottom:!1},d=u.themedFactoryDefaultsBase,h=(0,n.extractThemedColors)((0,r.ensureDefined)(d.get(l.StdTheme.Light)),(0,r.ensureDefined)(d.get(l.StdTheme.Dark))),p=(0,n.extractAllPropertiesKeys)((0,r.ensureDefined)(d.get(l.StdTheme.Light))),y=(0,n.extractAllPropertiesKeys)(m),g=[...new Set([...p,...y,...c.commonLineToolPropertiesStateKeys,...u.allPropertiesStateKeysBase])];class x extends u.DateAndPriceBaseProperties{static create(e,t){return new this({defaultName:"linetooldaterange",factoryDefaultsSupplier:()=>(0,i.factoryDefaultsForCurrentTheme)(m,d),nonThemedDefaultsKeys:y,themedDefaultsKeys:p,allStateKeys:g,themedColors:h,replaceThemedColorsOnThemeChange:!0,state:t,theme:e})}}class f extends s.LineDataSource{constructor(e,t,r,s){super(e,t??f.createProperties(e.backgroundTheme().spawnOwnership()),r,s),this._volumeCalculator=null,Promise.all([o.e(2870),o.e(2211),o.e(1583)]).then(o.bind(o,33406)).then((e=>{this._setPaneViews([new e.DateRangePaneView(this,this._model)])}))}destroy(){super.destroy(),null!==this._volumeCalculator&&this._volumeCalculator.destroy()}pointsCount(){return 2}name(){return"Date 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,r.assert)(null===this._volumeCalculator),this._volumeCalculator=new a.SeriesTimeRangeVolumeCalculator(this._model.mainSeries())),super.setOwnerSource(e)}static createProperties(e,t){const o=x.create(e,t);return this._configureProperties(o),o}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([o.e(3401),o.e(3889),o.e(8009),o.e(6204),o.e(1963),o.e(8537)]).then(o.bind(o,14336))).GeneralDatePriceRangeDefinitionsViewModel}}}}]);