/**
 * Highcharts JS v12.6.0 (2026-04-13)
 * @module highcharts/modules/series-on-point
 * @requires highcharts
 *
 * Series on point module
 *
 * (c) 2010-2026 Highsoft AS
 * Author: Rafał Sebestjański and Piotr Madej
 *
 * A commercial license may be required depending on use.
 * See www.highcharts.com/license
 */import*as t from"../highcharts.js";var e,s={};s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var n in e)s.o(e,n)&&!s.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);let n=t.default;var r=s.n(n);let{doc:o,win:i}=r();function l(t,e,s,n={}){let o="function"==typeof t&&t.prototype||t;Object.hasOwnProperty.call(o,"hcEvents")||(o.hcEvents={});let i=o.hcEvents;r().Point&&t instanceof r().Point&&t.series&&t.series.chart&&(t.series.chart.runTrackerClick=!0);let a=t.addEventListener;a&&a.call(t,e,s,!!r().supportsPassiveEvents&&{passive:void 0===n.passive?-1!==e.indexOf("touch"):n.passive,capture:!1}),i[e]||(i[e]=[]);let h={fn:s,order:"number"==typeof n.order?n.order:1/0};return i[e].push(h),i[e].sort((t,e)=>t.order-e.order),function(){!function(t,e,s){function n(e,s){let n=t.removeEventListener;n&&n.call(t,e,s,!1)}function r(s){let r,o;t.nodeName&&(e?(r={})[e]=!0:r=s,p(r,function(t,e){if(s[e])for(o=s[e].length;o--;)n(e,s[e][o].fn)}))}let o="function"==typeof t&&t.prototype||t;if(Object.hasOwnProperty.call(o,"hcEvents")){let t=o.hcEvents;if(e){let o=t[e]||[];s?(t[e]=o.filter(function(t){return s!==t.fn}),n(e,s)):(r(t),t[e]=[])}else r(t),delete o.hcEvents}}(t,e,s)}}function a(t){return null!=t}function h(t,e){let s;for(s in t||(t={}),e)t[s]=e[s];return t}function u(t,e,s,n){if(s=s||{},o?.createEvent&&(t.dispatchEvent||t.fireEvent&&t!==r())){let n=o.createEvent("Events");n.initEvent(e,!0,!0),s=h(n,s),t.dispatchEvent?t.dispatchEvent(s):t.fireEvent(e,s)}else if(t.hcEvents){s.target||h(s,{preventDefault:function(){s.defaultPrevented=!0},target:t,type:e});let n=[],r=t,o=!1;for(;r.hcEvents;)Object.hasOwnProperty.call(r,"hcEvents")&&r.hcEvents[e]&&(n.length&&(o=!0),n.unshift.apply(n,r.hcEvents[e])),r=Object.getPrototypeOf(r);o&&n.sort((t,e)=>t.order-e.order),n.forEach(e=>{!1===e.fn.call(t,s,t)&&s.preventDefault()})}n&&!s.defaultPrevented&&n.call(t,s)}let c=Array.prototype.find?function(t,e){return t.find(e)}:function(t,e){let s,n=t.length;for(s=0;s<n;s++)if(e(t[s],s))return t[s]};function p(t,e,s){for(let n in t)Object.hasOwnProperty.call(t,n)&&e.call(s||t[n],t[n],n,t)}let{setLength:f,splice:d}={convertToNumber:function(t,e){switch(typeof t){case"boolean":return+!!t;case"number":return isNaN(t)&&!e?null:t;default:return isNaN(t=parseFloat(`${t??""}`))&&!e?null:t}},setLength:function(t,e,s){return Array.isArray(t)?(t.length=e,t):t[s?"subarray":"slice"](0,e)},splice:function(t,e,s,n,r=[]){if(Array.isArray(t))return Array.isArray(r)||(r=Array.from(r)),{removed:t.splice(e,s,...r),array:t};let o=Object.getPrototypeOf(t).constructor,i=t[n?"subarray":"slice"](e,e+s),l=new o(t.length-s+r.length);return l.set(t.subarray(0,e),0),l.set(r,e),l.set(t.subarray(e+s),e+r.length),{removed:i,array:l}}},y=class{constructor(t={}){this.autoId=!t.id,this.columns={},this.id=t.id||(0,n.uniqueKey)(),this.rowCount=0,this.versionTag=(0,n.uniqueKey)();let e=0;p(t.columns||{},(t,s)=>{this.columns[s]=t.slice(),e=Math.max(e,t.length)}),this.applyRowCount(e)}applyRowCount(t){this.rowCount=t,p(this.columns,(e,s)=>{e.length!==t&&(this.columns[s]=f(e,t))})}deleteRows(t,e=1){if(e>0&&t<this.rowCount){let s=0;p(this.columns,(n,r)=>{this.columns[r]=d(n,t,e).array,s=n.length}),this.rowCount=s}u(this,"afterDeleteRows",{rowIndex:t,rowCount:e}),this.versionTag=(0,n.uniqueKey)()}getColumn(t,e){return this.columns[t]}getColumns(t,e){return(t||Object.keys(this.columns)).reduce((t,e)=>(t[e]=this.columns[e],t),{})}getRow(t,e){return(e||Object.keys(this.columns)).map(e=>this.columns[e]?.[t])}setColumn(t,e=[],s=0,n){this.setColumns({[t]:e},s,n)}setColumns(t,e,s){let r=this.rowCount;p(t,(t,e)=>{this.columns[e]=t.slice(),r=t.length}),this.applyRowCount(r),s?.silent||(u(this,"afterSetColumns"),this.versionTag=(0,n.uniqueKey)())}setRow(t,e=this.rowCount,s,r){let{columns:o}=this,i=s?this.rowCount+1:e+1,l=Object.keys(t);if(r?.addColumns!==!1)for(let t=0,e=l.length;t<e;t++){let e=l[t];o[e]||(o[e]=[])}p(o,(n,l)=>{n||r?.addColumns===!1||(n=Array(i)),n&&(s?n=d(n,e,0,!0,[t[l]??null]).array:n[e]=t[l]??null,o[l]=n)}),i>this.rowCount&&this.applyRowCount(i),r?.silent||(u(this,"afterSetRows"),this.versionTag=(0,n.uniqueKey)())}getModified(){return this.modified||this}},v=t.default.Point;var m=s.n(v);let g=t.default.SeriesRegistry;var b=s.n(g);let w=t.default.SVGRenderer;var P=s.n(w);let{composed:E}=r(),{bubble:C}=b().seriesTypes;var O=e||(e={});O.compose=function(t,e){var s;if(s="SeriesOnPoint",0>E.indexOf(s)&&E.push(s)){let{chartGetZData:s,seriesAfterInit:n,seriesAfterRender:r,seriesGetCenter:o,seriesShowOrHide:i,seriesTranslate:a}=R.prototype;t.types.pie.prototype.onPointSupported=!0,l(t,"afterInit",n),l(t,"afterRender",r),l(t,"afterGetCenter",o),l(t,"hide",i),l(t,"show",i),l(t,"translate",a),l(e,"beforeRender",s),l(e,"beforeRedraw",s)}return t};class R{constructor(t){this.getColumn=C.prototype.getColumn,this.getRadii=C.prototype.getRadii,this.getRadius=C.prototype.getRadius,this.getPxExtremes=C.prototype.getPxExtremes,this.getZExtremes=C.prototype.getZExtremes,this.chart=t.chart,this.series=t,this.options=t.options.onPoint}drawConnector(){this.connector||(this.connector=this.series.chart.renderer.path().addClass("highcharts-connector-seriesonpoint").attr({zIndex:-1}).add(this.series.markerGroup));let t=this.getConnectorAttributes();t&&this.connector.animate(t)}getConnectorAttributes(){let t=this.series.chart,e=this.options;if(!e)return;let s=e.connectorOptions||{},n=e.position,r=t.get(e.id);if(!(r instanceof m())||!n||!a(r.plotX)||!a(r.plotY))return;let o=a(n.x)?n.x:r.plotX,i=a(n.y)?n.y:r.plotY,l=o+(n.offsetX||0),h=i+(n.offsetY||0),u=s.width||1,c=s.stroke||this.series.color,p=s.dashstyle,f={d:P().prototype.crispLine([["M",o,i],["L",l,h]],u),"stroke-width":u};return t.styledMode||(f.stroke=c,f.dashstyle=p),f}seriesAfterInit(){this.onPointSupported&&this.options.onPoint&&(this.bubblePadding=!0,this.useMapGeometry=!0,this.onPoint=new R(this))}seriesAfterRender(){delete this.chart.bubbleZExtremes,this.onPoint&&this.onPoint.drawConnector()}seriesGetCenter(t){let e=this.options.onPoint,s=t.positions;if(e){let t=this.chart.get(e.id);t instanceof m()&&a(t.plotX)&&a(t.plotY)&&(s[0]=t.plotX,s[1]=t.plotY);let n=e.position;n&&(a(n.x)&&(s[0]=n.x),a(n.y)&&(s[1]=n.y),n.offsetX&&(s[0]+=n.offsetX),n.offsetY&&(s[1]+=n.offsetY))}let n=this.radii&&this.radii[this.index];"number"==typeof n&&!isNaN(n)&&n<1/0&&n>-1/0&&(s[2]=2*n),t.positions=s}seriesShowOrHide(){let t=this.chart.series;this.points?.forEach(e=>{let s=c(t,t=>{let s=((t.onPoint||{}).options||{}).id;return!!s&&s===e.id});s&&s.setVisible(!s.visible,!1)})}seriesTranslate(){this.onPoint&&(this.onPoint.getRadii(),this.radii=this.onPoint.radii)}chartGetZData(){let t=[];this.series.forEach(e=>{let s=e.options.onPoint;t.push(s?.z??null)});let e=new y({columns:{z:t}});this.series.forEach(t=>{t.onPoint&&(t.onPoint.dataTable=t.dataTable=e)})}}O.Additions=R;let x=e,A=r();x.compose(A.Series,A.Chart);let j=r();export{j as default};