import{g as t}from"./index-B1MHyEgd.js";function e(t,e){return e.forEach(function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach(function(r){if("default"!==r&&!(r in t)){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}})}),Object.freeze(t)}var r,o={exports:{}};var s,n=r?o.exports:(r=1,s="undefined"==typeof window?o.exports:window,o.exports=((t,e,r)=>(()=>{var o={448:t=>{t.exports=r},512:t=>{t.exports=e},944:e=>{e.exports=t}},s={};function n(t){var e=s[t];if(void 0!==e)return e.exports;var r=s[t]={exports:{}};return o[t](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var i={};n.d(i,{default:()=>b});var a=n(944),p=n.n(a),l=n(512),u=n.n(l);let{column:{prototype:{pointClass:d}}}=u().seriesTypes;var h=n(448),c=n.n(h);let{extend:f,merge:g,relativeLength:x,isNumber:y}=p();class m extends(c()){constructor(){super(...arguments),this.hasDerivedData=!0,this.allowDG=!1}init(){super.init.apply(this,arguments),this.renkoData=[]}setData(t,e,r){this.renkoData=[],super.setData(t,e,r,!1)}getXExtremes(t){return this.processData(),{min:(t=this.getColumn("x",!0))[0],max:t[t.length-1]}}getProcessedData(){let t=this.dataTable.modified,e=[],r=[],o=[],s=this.getColumn("x",!0),n=this.getColumn("y",!0);if(!this.renkoData||this.renkoData.length>0)return{modified:t,closestPointRange:1,cropped:!1,cropStart:0};let i=this.options.boxSize,a=y(i)?i:x(i,n[0]),p=[],l=s.length,u=0,d=n[0];for(let t=1;t<l;t++){let e=n[t]-n[t-1];if(e>a){2===u&&(d+=a);for(let r=0;r<e/a;r++)p.push({x:s[t]+r,low:d,y:d+a,color:this.options.color,upTrend:!0}),d+=a;u=1}else if(Math.abs(e)>a){1===u&&(d-=a);for(let r=0;r<Math.abs(e)/a;r++)p.push({x:s[t]+r,low:d-a,y:d,color:this.options.downColor,upTrend:!1}),d-=a;u=2}}for(let t of(this.renkoData=p,p))e.push(t.x),r.push(t.y),o.push(t.low);return this.processedData=p,t.setColumn("x",e),t.setColumn("y",r),t.setColumn("low",o),{modified:t,cropped:!1,cropStart:0,closestPointRange:1}}}m.defaultOptions=g(c().defaultOptions,{boxSize:4,groupPadding:0,pointPadding:0,downColor:"#ff0000",navigatorOptions:{type:"renko"},fillColor:"transparent",borderWidth:2,lineWidth:0,stickyTracking:!0,borderRadius:{where:"all"},tooltip:{pointFormat:'<span style="color:{point.color}">●</span> {series.name}: <b>{point.low:.2f} - {point.y:.2f}</b><br/>'}}),f(m.prototype,{pointClass:class extends d{getClassName(){return super.getClassName.call(this)+(this.upTrend?" highcharts-point-up":" highcharts-point-down")}}}),u().registerSeriesType("renko",m);let b=p();return i.default})())(s._Highcharts,s._Highcharts.SeriesRegistry,s._Highcharts.Series.types.column)),i=e({__proto__:null,default:t(n)},[n]);export{i as r};
//# sourceMappingURL=renko-C01vOsLx.js.map
