/**
 * Highstock JS v11.3.0 (2024-01-10)
 *
 * Hollow Candlestick series type for Highcharts Stock
 *
 * (c) 2010-2024 Karol Kolodziej
 *
 * License: www.highcharts.com/license
 */!function(t){"object"==typeof module&&module.exports?(t.default=t,module.exports=t):"function"==typeof define&&define.amd?define("highcharts/modules/hollowcandlestick",["highcharts","highcharts/modules/stock"],function(o){return t(o),t.Highcharts=o,t}):t("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){"use strict";var o=t?t._modules:{};function e(t,o,e,i){t.hasOwnProperty(o)||(t[o]=i.apply(null,e),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:o,module:t[o]}})))}e(o,"Series/HollowCandlestick/HollowCandlestickPoint.js",[o["Core/Series/SeriesRegistry.js"]],function(t){var o,e=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(t[e]=o[e])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});return function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return e(o,t),o.prototype.getClassName=function(){var o=t.prototype.getClassName.apply(this),e=this.index,i=this.series.hollowCandlestickData[e];return i.isBullish||"up"!==i.trendDirection||(o+="-bearish-up"),o},o}(t.seriesTypes.candlestick.prototype.pointClass)}),e(o,"Series/HollowCandlestick/HollowCandlestickSeries.js",[o["Series/HollowCandlestick/HollowCandlestickPoint.js"],o["Core/Series/SeriesRegistry.js"],o["Core/Utilities.js"],o["Core/Axis/Axis.js"]],function(t,o,e,i){var n,r=this&&this.__extends||(n=function(t,o){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(t[e]=o[e])})(t,o)},function(t,o){if("function"!=typeof o&&null!==o)throw TypeError("Class extends value "+String(o)+" is not a constructor or null");function e(){this.constructor=t}n(t,o),t.prototype=null===o?Object.create(o):(e.prototype=o.prototype,new e)}),s=o.seriesTypes.candlestick,l=e.addEvent,a=e.merge,c=function(t){function o(){var o=null!==t&&t.apply(this,arguments)||this;return o.hollowCandlestickData=[],o}return r(o,t),o.prototype.getPriceMovement=function(){var t=this.allGroupedData||this.yData,o=this.hollowCandlestickData;o.length=0,o.push({isBullish:!0,trendDirection:"up"});for(var e=1;e<t.length;e++){var i=t[e],n=t[e-1];o.push(this.isBullish(i,n))}},o.prototype.getLineColor=function(t){return"up"===t?this.options.upColor||"#06b535":this.options.color||"#f21313"},o.prototype.getPointFill=function(t){return t.isBullish?"transparent":"up"===t.trendDirection?this.options.upColor||"#06b535":this.options.color||"#f21313"},o.prototype.init=function(){t.prototype.init.apply(this,arguments),this.hollowCandlestickData=[]},o.prototype.isBullish=function(t,o){return{isBullish:t[0]<=t[3],trendDirection:t[3]<o[3]?"down":"up"}},o.prototype.pointAttribs=function(o,e){var i,n=t.prototype.pointAttribs.call(this,o,e),r=o.index,s=this.hollowCandlestickData[r];return n.fill=this.getPointFill(s)||n.fill,n.stroke=this.getLineColor(s.trendDirection)||n.stroke,e&&(i=this.options.states[e],n.fill=i.color||n.fill,n.stroke=i.lineColor||n.stroke,n["stroke-width"]=i.lineWidth||n["stroke-width"]),n},o.defaultOptions=a(s.defaultOptions,{color:"#f21313",dataGrouping:{groupAll:!0,groupPixelWidth:10},lineColor:"#f21313",upColor:"#06b535",upLineColor:"#06b535"}),o}(s);return l(c,"updatedData",function(){this.hollowCandlestickData.length&&(this.hollowCandlestickData.length=0)}),l(i,"postProcessData",function(){this.series.forEach(function(t){t.is("hollowcandlestick")&&t.getPriceMovement()})}),c.prototype.pointClass=t,o.registerSeriesType("hollowcandlestick",c),c}),e(o,"masters/modules/hollowcandlestick.src.js",[],function(){})});