!/**
 * Highstock JS v12.6.0 (2026-04-13)
 * @module highcharts/indicators/pivot-points
 * @requires highcharts
 * @requires highcharts/modules/stock
 *
 * Indicator series type for Highcharts Stock
 *
 * (c) 2010-2026 Highsoft AS
 * Author: Paweł Fus
 *
 * A commercial license may be required depending on use.
 * See www.highcharts.com/license
 */function(t,o){"object"==typeof exports&&"object"==typeof module?module.exports=o(t._Highcharts,t._Highcharts.SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/indicators/pivot-points",["highcharts/highcharts"],function(t){return o(t,t.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/indicators/pivot-points"]=o(t._Highcharts,t._Highcharts.SeriesRegistry):t.Highcharts=o(t.Highcharts,t.Highcharts.SeriesRegistry)}("u"<typeof window?this:window,function(t,o){return function(){"use strict";var n,r,e={512:function(t){t.exports=o},944:function(o){o.exports=t}},a={};function i(t){var o=a[t];if(void 0!==o)return o.exports;var n=a[t]={exports:{}};return e[t](n,n.exports,i),n.exports}i.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(o,{a:o}),o},i.d=function(t,o){for(var n in o)i.o(o,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},i.o=function(t,o){return Object.prototype.hasOwnProperty.call(t,o)};var p={};i.d(p,{default:function(){return x}});var l=i(944),s=i.n(l),c=i(512),u=i.n(c),f=(n=function(t,o){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])})(t,o)},function(t,o){function r(){this.constructor=t}n(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)});function y(t,o){var n,r=t.series.pointArrayMap,e=r.length;for(u().seriesTypes.sma.prototype.pointClass.prototype[o].call(t);e--;)t[n="dataLabel"+r[e]]&&t[n].element&&t[n].destroy(),t[n]=null}var h=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return f(o,t),o.prototype.destroyElements=function(){y(this,"destroyElements")},o.prototype.destroy=function(){y(this,"destroyElements")},o}(u().seriesTypes.sma.prototype.pointClass),d=function(t,o,n){if(n||2==arguments.length)for(var r,e=0,a=o.length;e<a;e++)!r&&e in o||(r||(r=Array.prototype.slice.call(o,0,e)),r[e]=o[e]);return t.concat(r||Array.prototype.slice.call(o))};function v(t){return b(t)&&"number"==typeof t.nodeType}function g(t){var o=Object.prototype.toString.call(t);return"[object Array]"===o||"[object Array Iterator]"===o}function b(t,o){return!!t&&"object"==typeof t&&(!o||!g(t))}s().doc,s().win,Array.prototype.find;var m=(r=function(t,o){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])})(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 n(){this.constructor=t}r(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}),P=u().seriesTypes.sma,_=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return m(o,t),o.prototype.toYData=function(t){return[t.P]},o.prototype.translate=function(){var o=this;t.prototype.translate.apply(o),o.points.forEach(function(t){o.pointArrayMap.forEach(function(n){null!=t[n]&&(t["plot"+n]=o.yAxis.toPixels(t[n],!0))})}),o.plotEndPoint=o.xAxis.toPixels(o.endPoint,!0)},o.prototype.getGraphPath=function(o){for(var n,r,e,a,i=this,p=[[],[],[],[],[],[],[],[],[]],l=i.pointArrayMap.length,s=i.plotEndPoint,c=[],u=o.length;u--;){for(a=0,e=o[u];a<l;a++)null!=e[r=i.pointArrayMap[a]]&&p[a].push({plotX:e.plotX,plotY:e["plot"+r],isNull:!1},{plotX:s,plotY:e["plot"+r],isNull:!1},{plotX:s,plotY:null,isNull:!0});s=e.plotX}return p.forEach(function(o){c=c.concat(t.prototype.getGraphPath.call(i,o))}),c},o.prototype.drawDataLabels=function(){var o,n,r,e,a=this,i=a.pointArrayMap;a.options.dataLabels.enabled&&(n=a.points.length,i.concat([!1]).forEach(function(p,l){for(e=n;e--;)r=a.points[e],p?(r.y=r[p],r.pivotLine=p,r.plotY=r["plot"+p],o=r["dataLabel"+p],l&&(r["dataLabel"+i[l-1]]=r.dataLabel),r.dataLabels||(r.dataLabels=[]),r.dataLabels[0]=r.dataLabel=o=o&&o.element?o:null):r["dataLabel"+i[l-1]]=r.dataLabel;t.prototype.drawDataLabels.call(a)}))},o.prototype.getValues=function(t,o){var n,r,e,a,i,p,l,s=o.period,c=t.xData,u=t.yData,f=u?u.length:0,y=this[o.algorithm+"Placement"],h=[],d=[],v=[];if(!(c.length<s)&&g(u[0])&&4===u[0].length){for(l=s+1;l<=f+s;l+=s)e=c.slice(l-s-1,l),a=u.slice(l-s-1,l),r=e.length,n=e[r-1],p=y(this.getPivotAndHLC(a)),i=h.push([n].concat(p)),d.push(n),v.push(h[i-1].slice(1));return this.endPoint=e[0]+(n-e[0])/r*s,{values:h,xData:d,yData:v}}},o.prototype.getPivotAndHLC=function(t){var o=t[t.length-1][3],n=-1/0,r=1/0;return t.forEach(function(t){n=Math.max(n,t[1]),r=Math.min(r,t[2])}),[(n+r+o)/3,n,r,o]},o.prototype.standardPlacement=function(t){var o=t[1]-t[2];return[null,null,t[0]+o,2*t[0]-t[2],t[0],2*t[0]-t[1],t[0]-o,null,null]},o.prototype.camarillaPlacement=function(t){var o=t[1]-t[2];return[t[3]+1.5*o,t[3]+1.25*o,t[3]+1.1666*o,t[3]+1.0833*o,t[0],t[3]-1.0833*o,t[3]-1.1666*o,t[3]-1.25*o,t[3]-1.5*o]},o.prototype.fibonacciPlacement=function(t){var o=t[1]-t[2];return[null,t[0]+o,t[0]+.618*o,t[0]+.382*o,t[0],t[0]-.382*o,t[0]-.618*o,t[0]-o,null]},o.defaultOptions=function(t){for(var o=[],n=1;n<arguments.length;n++)o[n-1]=arguments[n];var r,e=d([t],o,!0),a={},i=function(t,o){return"object"!=typeof t&&(t={}),function(t,o,n){for(var r in t)Object.hasOwnProperty.call(t,r)&&o.call((0,t[r]),t[r],r,t)}(o,function(n,r){if("__proto__"!==r&&"constructor"!==r){var e;!b(n,!0)||(e=null==n?void 0:n.constructor,b(n,!0)&&!v(n)&&(null==e?void 0:e.name)&&"Object"!==e.name)||v(n)?t[r]=o[r]:t[r]=i(t[r]||{},n)}}),t};!0===t&&(a=e[1],e=Array.prototype.slice.call(e,2));var p=e.length;for(r=0;r<p;r++)a=i(a,e[r]);return a}(P.defaultOptions,{params:{index:void 0,period:28,algorithm:"standard"},marker:{enabled:!1},enableMouseTracking:!1,dataLabels:{enabled:!0,format:"{point.pivotLine}"},dataGrouping:{approximation:"averages"}}),o}(P);!function(t,o){var n;for(n in t||(t={}),o)t[n]=o[n]}(_.prototype,{nameBase:"Pivot Points",pointArrayMap:["R4","R3","R2","R1","P","S1","S2","S3","S4"],pointValKey:"P",pointClass:h}),u().registerSeriesType("pivotpoints",_);var x=s();return p.default}()});