"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[574],{94512:(e,t,i)=>{i.d(t,{LineToolHorzLinePriceAxisView:()=>o});var r=i(36281),s=i(52859);class o extends r.PriceAxisView{constructor(e){super(),this._source=e}_updateRendererData(e,t,i){e.visible=!1;const r=this._source.points(),o=this._source.priceScale();if(0===r.length||null===o||o.isEmpty())return;const n=r[0];if(!isFinite(n.price))return;const l=this._source.ownerSource(),a=null!==l?l.firstValue():null;if(null===a)return;const c=(0,s.resetTransparency)(this._source.properties().linecolor.value());i.background=c,i.textColor=this.generateTextColor(c),i.coordinate=o.priceToCoordinate(n.price,a),e.text=o.formatPrice(n.price,a),e.visible=!0}}},80102:(e,t,i)=>{i.r(t),i.d(t,{LineToolHorzRay:()=>c});var r=i(50151),s=i(78176),o=i(43337),n=i(94512),l=i(41414),a=i(65045);class c extends l.LineDataSource{constructor(e,t,r,s){super(e,t??c.createProperties(e.backgroundTheme().spawnOwnership()),r,s),this._priceAxisView=new n.LineToolHorzLinePriceAxisView(this),Promise.all([i.e(6290),i.e(986),i.e(6668),i.e(1583)]).then(i.bind(i,39470)).then((({HorzRayPaneView:e})=>{this._setPaneViews([new e(this,this._model)])}))}pointsCount(){return 1}name(){return"Horizontal Ray"}priceAxisViews(e,t){return this.isSourceHidden()||t!==this.priceScale()||!this._model.selection().isSelected(this)&&!this.properties().childs().showPrice.value()||e!==this._model.paneForSource(this)?null:[this._priceAxisView]}updateAllViews(e){super.updateAllViews(e),this._priceAxisView.update(e)}template(){const e=super.template();return e.text=this.properties().childs().text.value(),e}canHasAlert(){return!0}static createProperties(e,t){const i=new s.DefaultProperty({defaultName:"linetoolhorzray",state:t,theme:e});return this._configureProperties(i),i}_getAlertPlots(){const e=this._points[0],t={index:e.index+1,price:e.price},i=this._linePointsToAlertPlot([e,t],null,!1,!0);return null!==i?[i]:[]}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(3198),i.e(5410),i.e(2745),i.e(8823),i.e(8537)]).then(i.bind(i,91509))).HorizontalRayDefinitionsViewModel}_applyTemplateImpl(e){super._applyTemplateImpl(e),this.properties().childs().text.setValue(e.text||"")}static _configureProperties(e){super._configureProperties(e),e.hasChild("text")||e.addChild("text",new o.Property("")),e.addExcludedKey("text",1),e.addChild("textsColors",new a.LineToolColorsProperty([(0,r.ensureDefined)(e.child("textcolor"))]))}}}}]);