!/**
 * Highstock JS v12.6.0 (2026-04-13)
 * @module highcharts/indicators/volume-by-price
 * @requires highcharts
 * @requires highcharts/modules/stock
 *
 * Indicator series type for Highcharts Stock
 *
 * (c) 2010-2026 Highsoft AS
 * Author: Paweł Dalek
 *
 * A commercial license may be required depending on use.
 * See www.highcharts.com/license
 */function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(t._Highcharts,t._Highcharts.SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/indicators/volume-by-price",["highcharts/highcharts"],function(t){return e(t,t.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/indicators/volume-by-price"]=e(t._Highcharts,t._Highcharts.SeriesRegistry):t.Highcharts=e(t.Highcharts,t.Highcharts.SeriesRegistry)}("u"<typeof window?this:window,function(t,e){return function(){"use strict";var o,n,r={512:function(t){t.exports=e},944:function(e){e.exports=t}},i={};function a(t){var e=i[t];if(void 0!==e)return e.exports;var o=i[t]={exports:{}};return r[t](o,o.exports,a),o.exports}a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,{a:e}),e},a.d=function(t,e){for(var o in e)a.o(e,o)&&!a.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var s={};a.d(s,{default:function(){return j}});var p=a(944),u=a.n(p),l=a(512),c=a.n(l),h=(o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.destroy=function(){this.negativeGraphic&&(this.negativeGraphic=this.negativeGraphic.destroy()),t.prototype.destroy.apply(this,arguments)},e}(c().seriesTypes.sma.prototype.pointClass),d=function(t,e,o){if(o||2==arguments.length)for(var n,r=0,i=e.length;r<i;r++)!n&&r in e||(n||(n=Array.prototype.slice.call(e,0,r)),n[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))};function v(t,e,o,n){void 0===n&&(n={});var r="function"==typeof t&&t.prototype||t;Object.hasOwnProperty.call(r,"hcEvents")||(r.hcEvents={});var i=r.hcEvents;u().Point&&t instanceof u().Point&&t.series&&t.series.chart&&(t.series.chart.runTrackerClick=!0);var a=t.addEventListener;a&&a.call(t,e,o,!!u().supportsPassiveEvents&&{passive:void 0===n.passive?-1!==e.indexOf("touch"):n.passive,capture:!1}),i[e]||(i[e]=[]);var s={fn:o,order:"number"==typeof n.order?n.order:1/0};return i[e].push(s),i[e].sort(function(t,e){return t.order-e.order}),function(){!function(t,e,o){function n(e,o){var n=t.removeEventListener;n&&n.call(t,e,o,!1)}function r(o){var r,i;t.nodeName&&(e?(r={})[e]=!0:r=o,S(r,function(t,e){if(o[e])for(i=o[e].length;i--;)n(e,o[e][i].fn)}))}var i="function"==typeof t&&t.prototype||t;if(Object.hasOwnProperty.call(i,"hcEvents")){var a=i.hcEvents;if(e){var s=a[e]||[];o?(a[e]=s.filter(function(t){return o!==t.fn}),n(e,o)):(r(a),a[e]=[])}else r(a),delete i.hcEvents}}(t,e,o)}}function y(t){for(var e=t.length,o=t[0];e--;)t[e]>o&&(o=t[e]);return o}function m(t,e){return t>1e14?t:parseFloat(t.toPrecision(e||14))}u().doc,u().win;function g(t,e){var o;for(o in t||(t={}),e)t[o]=e[o];return t}function x(t){return P(t)&&"number"==typeof t.nodeType}function b(t){var e=Object.prototype.toString.call(t);return"[object Array]"===e||"[object Array Iterator]"===e}function P(t,e){return!!t&&"object"==typeof t&&(!e||!b(t))}function S(t,e,o){for(var n in t)Object.hasOwnProperty.call(t,n)&&e.call(o||t[n],t[n],n,t)}Array.prototype.find;var w=(n=function(t,e){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(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 o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),D=u().animObject,V=u().noop,A=c().seriesTypes,O=A.column.prototype,_=A.sma,C=Math.abs,E=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return w(e,t),e.prototype.init=function(e,o){var n=this;delete o.data,t.prototype.init.apply(n,arguments);var r=v(this.chart.constructor,"afterLinkSeries",function(){if(n.options){var t=n.options.params,o=n.linkedParent,i=e.get(t.volumeSeriesID);n.addCustomEvents(o,i)}r()},{order:1});return n},e.prototype.addCustomEvents=function(t,e){var o=this,n=function(){o.chart.redraw(),o.setData([]),o.zoneStarts=[],o.zoneLinesSVG&&(o.zoneLinesSVG=o.zoneLinesSVG.destroy())};return o.dataEventsToUnbind.push(v(t,"remove",function(){n()})),e&&o.dataEventsToUnbind.push(v(e,"remove",function(){n()})),o},e.prototype.animate=function(t){var e=this,o=e.chart.inverted,n=e.group,r={};if(!t&&n){var i=o?e.yAxis.top:e.xAxis.left;o?(n["forceAnimate:translateY"]=!0,r.translateY=i):(n["forceAnimate:translateX"]=!0,r.translateX=i),n.animate(r,g(D(e.options.animation),{step:function(t,o){e.group.attr({scaleX:Math.max(.001,o.pos)})}}))}},e.prototype.drawPoints=function(){this.options.volumeDivision.enabled&&(this.posNegVolume(!0,!0),O.drawPoints.apply(this,arguments),this.posNegVolume(!1,!1)),O.drawPoints.apply(this,arguments)},e.prototype.posNegVolume=function(t,e){var o,n,r,i,a=e?["positive","negative"]:["negative","positive"],s=this.options.volumeDivision,p=this.points.length,u=[],l=[],c=0;for(t?(this.posWidths=u,this.negWidths=l):(u=this.posWidths,l=this.negWidths);c<p;c++)(i=this.points[c])[a[0]+"Graphic"]=i.graphic,i.graphic=i[a[1]+"Graphic"],t&&(o=i.shapeArgs.width,(r=(n=this.priceZones[c]).wholeVolumeData)?(u.push(o/r*n.positiveVolumeData),l.push(o/r*n.negativeVolumeData)):(u.push(0),l.push(0))),i.color=e?s.styles.positiveColor:s.styles.negativeColor,i.shapeArgs.width=e?this.posWidths[c]:this.negWidths[c],i.shapeArgs.x=e?i.shapeArgs.x:this.posWidths[c]},e.prototype.translate=function(){var t,e,o,n,r,i,a,s,p,u,l=this,c=l.options,h=l.chart,f=l.yAxis,d=f.min,v=l.options.zoneLines,g=l.priceZones,x=0;O.translate.apply(l);var b=l.points;b.length&&(a=c.pointPadding<.5?c.pointPadding:.1,t=y(l.volumeDataArray),e=h.plotWidth/2,s=h.plotTop,o=C(f.toPixels(d)-f.toPixels(d+l.rangeStep)),r=C(f.toPixels(d)-f.toPixels(d+l.rangeStep)),a&&(n=C(o*(1-2*a)),x=C((o-n)/2),o=C(n)),b.forEach(function(n,a){p=n.barX=n.plotX=0,u=n.plotY=f.toPixels(g[a].start)-s-(f.reversed?o-r:o)-x,n.pointWidth=i=m(e*g[a].wholeVolumeData/t),n.shapeArgs=l.crispCol.apply(l,[p,u,i,o]),n.volumeNeg=g[a].negativeVolumeData,n.volumePos=g[a].positiveVolumeData,n.volumeAll=g[a].wholeVolumeData}),v.enabled&&l.drawZones(h,f,l.zoneStarts,v.styles))},e.prototype.getExtremes=function(){var e,o=this.options.compare,n=this.options.cumulative;return this.options.compare?(this.options.compare=void 0,e=t.prototype.getExtremes.call(this),this.options.compare=o):this.options.cumulative?(this.options.cumulative=!1,e=t.prototype.getExtremes.call(this),this.options.cumulative=n):e=t.prototype.getExtremes.call(this),e},e.prototype.getValues=function(t,e){var o=t.getColumn("x",!0),n=t.processedYData,r=this.chart,i=e.ranges,a=[],s=[],u=[],l=r.get(e.volumeSeriesID);if(!t.chart)return void(0,p.error)("Base series not found! In case it has been removed, add a new one.",!0,r);if(!l||!l.getColumn("x",!0).length){var c=l&&!l.getColumn("x",!0).length?" does not contain any data.":" not found! Check `volumeSeriesID`.";(0,p.error)("Series "+e.volumeSeriesID+c,!0,r);return}var h=b(n[0]);return h&&4!==n[0].length?void(0,p.error)("Type of "+t.name+" series is different than line, OHLC or candlestick.",!0,r):((this.priceZones=this.specifyZones(h,o,n,i,l)).forEach(function(t,e){a.push([t.x,t.end]),s.push(a[e][0]),u.push(a[e][1])}),{values:a,xData:s,yData:u})},e.prototype.specifyZones=function(t,e,o,n,r){var i=!!t&&function(t){for(var e,o=t.length,n=t[0][3],r=n,i=1;i<o;i++)(e=t[i][3])<n&&(n=e),e>r&&(r=e);return{min:n,max:r}}(o),a=this.zoneStarts=[],s=[],p=i?i.min:function(t){for(var e=t.length,o=t[0];e--;)t[e]<o&&(o=t[e]);return o}(o),u=i?i.max:y(o),l=0,c=1,h=this.linkedParent;if(!this.options.compareToMain&&h.dataModify&&(p=h.dataModify.modifyValue(p),u=h.dataModify.modifyValue(u)),null==p||null==u)return this.points.length&&(this.setData([]),this.zoneStarts=[],this.zoneLinesSVG&&(this.zoneLinesSVG=this.zoneLinesSVG.destroy())),[];var f=this.rangeStep=m(u-p)/n;for(a.push(p);l<n-1;l++)a.push(m(a[l]+f));a.push(u);for(var d=a.length;c<d;c++)s.push({index:c-1,x:e[0],start:a[c-1],end:a[c]});return this.volumePerZone(t,s,r,e,o)},e.prototype.volumePerZone=function(t,e,o,n,r){var i,a,s,p,u,l=this,c=o.getColumn("x",!0),h=o.getColumn("y",!0),f=e.length-1,d=r.length,v=h.length;return C(d-v)&&(n[0]!==c[0]&&h.unshift(0),n[d-1]!==c[v-1]&&h.push(0)),l.volumeDataArray=[],e.forEach(function(e){for(u=0,e.wholeVolumeData=0,e.positiveVolumeData=0,e.negativeVolumeData=0;u<d;u++){a=!1,s=!1,p=t?r[u][3]:r[u],i=u?t?r[u-1][3]:r[u-1]:p;var o=l.linkedParent;!l.options.compareToMain&&o.dataModify&&(p=o.dataModify.modifyValue(p),i=o.dataModify.modifyValue(i)),p<=e.start&&0===e.index&&(a=!0),p>=e.end&&e.index===f&&(s=!0),(p>e.start||a)&&(p<e.end||s)&&(e.wholeVolumeData+=h[u],i>p?e.negativeVolumeData+=h[u]:e.positiveVolumeData+=h[u])}l.volumeDataArray.push(e.wholeVolumeData)}),e},e.prototype.drawZones=function(t,e,o,n){var r,i=t.renderer,a=t.plotWidth,s=t.plotTop,p=this.zoneLinesSVG,u=[];o.forEach(function(o){r=e.toPixels(o)-s,u=u.concat(t.renderer.crispLine([["M",0,r],["L",a,r]],n.lineWidth))}),p?p.animate({d:u}):p=this.zoneLinesSVG=i.path(u).attr({"stroke-width":n.lineWidth,stroke:n.color,dashstyle:n.dashStyle,zIndex:this.group.zIndex+.1}).add(this.group)},e.defaultOptions=function(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];var n,r=d([t],e,!0),i={},a=function(t,e){return"object"!=typeof t&&(t={}),S(e,function(o,n){if("__proto__"!==n&&"constructor"!==n){var r;!P(o,!0)||(r=null==o?void 0:o.constructor,P(o,!0)&&!x(o)&&(null==r?void 0:r.name)&&"Object"!==r.name)||x(o)?t[n]=e[n]:t[n]=a(t[n]||{},o)}}),t};!0===t&&(i=r[1],r=Array.prototype.slice.call(r,2));var s=r.length;for(n=0;n<s;n++)i=a(i,r[n]);return i}(_.defaultOptions,{params:{index:void 0,period:void 0,ranges:12,volumeSeriesID:"volume"},zoneLines:{enabled:!0,styles:{color:"#0A9AC9",dashStyle:"LongDash",lineWidth:1}},volumeDivision:{enabled:!0,styles:{positiveColor:"rgba(144, 237, 125, 0.8)",negativeColor:"rgba(244, 91, 91, 0.8)"}},animationLimit:1e3,enableMouseTracking:!1,pointPadding:0,zIndex:-1,crisp:!0,dataGrouping:{enabled:!1},dataLabels:{align:"left",allowOverlap:!0,enabled:!0,format:"P: {point.volumePos:.2f} | N: {point.volumeNeg:.2f}",padding:0,style:{fontSize:"0.5em"},verticalAlign:"top"}}),e}(_);g(E.prototype,{nameBase:"Volume by Price",nameComponents:["ranges"],calculateOn:{chart:"render",xAxis:"afterSetExtremes"},pointClass:f,markerAttribs:V,drawGraph:V,getColumnMetrics:O.getColumnMetrics,crispCol:O.crispCol}),c().registerSeriesType("vbp",E);var j=u();return s.default}()});