!/**
 * Highcharts JS v12.6.0 (2026-04-13)
 * @module modules/arc-diagram
 * @requires highcharts/modules/sankey
 *
 * Arc diagram module
 *
 * (c) 2021-2026 Highsoft AS
 * Author: Piotr Madej
 *
 * 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,t._Highcharts.Series,t._Highcharts.SVGRenderer,t._Highcharts.SVGElement):"function"==typeof define&&define.amd?define("highcharts/modules/arc-diagram",["highcharts/highcharts"],function(t){return e(t,t.SeriesRegistry,t.Series,t.SVGRenderer,t.SVGElement)}):"object"==typeof exports?exports["highcharts/modules/arc-diagram"]=e(t._Highcharts,t._Highcharts.SeriesRegistry,t._Highcharts.Series,t._Highcharts.SVGRenderer,t._Highcharts.SVGElement):t.Highcharts=e(t.Highcharts,t.Highcharts.SeriesRegistry,t.Highcharts.Series,t.Highcharts.SVGRenderer,t.Highcharts.SVGElement)}("u"<typeof window?this:window,(t,e,o,s,i)=>(()=>{"use strict";var n,r,a={28:t=>{t.exports=i},512:t=>{t.exports=e},540:t=>{t.exports=s},820:t=>{t.exports=o},944:e=>{e.exports=t}},l={};function h(t){var e=l[t];if(void 0!==e)return e.exports;var o=l[t]={exports:{}};return a[t](o,o.exports,h),o.exports}h.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return h.d(e,{a:e}),e},h.d=(t,e)=>{for(var o in e)h.o(e,o)&&!h.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},h.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var d={};h.d(d,{default:()=>Z});var p=h(944),c=h.n(p),u=h(512),f=h.n(u);let{doc:m,win:g}=c();function y(t,e,o,s={}){let i="function"==typeof t&&t.prototype||t;Object.hasOwnProperty.call(i,"hcEvents")||(i.hcEvents={});let n=i.hcEvents;c().Point&&t instanceof c().Point&&t.series&&t.series.chart&&(t.series.chart.runTrackerClick=!0);let r=t.addEventListener;r&&r.call(t,e,o,!!c().supportsPassiveEvents&&{passive:void 0===s.passive?-1!==e.indexOf("touch"):s.passive,capture:!1}),n[e]||(n[e]=[]);let a={fn:o,order:"number"==typeof s.order?s.order:1/0};return n[e].push(a),n[e].sort((t,e)=>t.order-e.order),function(){!function(t,e,o){function s(e,o){let s=t.removeEventListener;s&&s.call(t,e,o,!1)}function i(o){let i,n;t.nodeName&&(e?(i={})[e]=!0:i=o,N(i,function(t,e){if(o[e])for(n=o[e].length;n--;)s(e,o[e][n].fn)}))}let n="function"==typeof t&&t.prototype||t;if(Object.hasOwnProperty.call(n,"hcEvents")){let t=n.hcEvents;if(e){let n=t[e]||[];o?(t[e]=n.filter(function(t){return o!==t.fn}),s(e,o)):(i(t),t[e]=[])}else i(t),delete n.hcEvents}}(t,e,o)}}function x(t,e=0,o){let s=e%2/2,i=o?-1:1;return(Math.round(t*i-s)+s)*i}function k(t){return null!=t}function b(t,e){let o;for(o in t||(t={}),e)t[o]=e[o];return t}let S=Array.prototype.find?function(t,e){return t.find(e)}:function(t,e){let o,s=t.length;for(o=0;o<s;o++)if(e(t[o],o))return t[o]};function v(t){return P(t)&&"number"==typeof t.nodeType}function P(t,e){let o;return!!t&&"object"==typeof t&&(!e||"[object Array]"!==(o=Object.prototype.toString.call(t))&&"[object Array Iterator]"!==o)}function L(t,...e){let o,s=[t,...e],i={},n=function(t,e){return"object"!=typeof t&&(t={}),N(e,function(o,s){if("__proto__"!==s&&"constructor"!==s){let i;!P(o,!0)||(i=o?.constructor,P(o,!0)&&!v(o)&&i?.name&&"Object"!==i.name)||v(o)?t[s]=e[s]:t[s]=n(t[s]||{},o)}}),t};!0===t&&(i=s[1],s=Array.prototype.slice.call(s,2));let r=s.length;for(o=0;o<r;o++)i=n(i,s[o]);return i}function N(t,e,o){for(let s in t)Object.hasOwnProperty.call(t,s)&&e.call(o||t[s],t[s],s,t)}function T(){let t=arguments,e=t.length;for(let o=0;o<e;o++){let e=t[o];if(null!=e)return e}}function C(t,e,o){return/%$/.test(t)?e*parseFloat(t)/100+(o||0):parseFloat(t)}let{series:{prototype:M,prototype:{pointClass:{prototype:H}}}}=f();!function(t){function e(){return this.data=[].concat(this.points||[],this.nodes),M.destroy.apply(this,arguments)}function o(){this.nodes&&(this.nodes.forEach(t=>{t.destroy()}),this.nodes.length=0),M.setData.apply(this,arguments)}function s(t){let e=arguments,o=this.isNode?this.linksTo.concat(this.linksFrom):[this.fromNode,this.toNode];"select"!==t&&o.forEach(t=>{t&&t.series&&(H.setState.apply(t,e),!t.isNode&&(t.fromNode.graphic&&H.setState.apply(t.fromNode,e),t.toNode&&t.toNode.graphic&&H.setState.apply(t.toNode,e)))}),H.setState.apply(this,e)}function i(t,e,o,s){let i=this.series.options.nodes,n=this.series.options.data,r=n?.length||0,a=n?.[this.index];if(H.update.call(this,t,!this.isNode&&e,o,s),this.isNode){let t=(i||[]).reduce((t,e,o)=>this.id===e.id?o:t,-1),s=L(i&&i[t]||{},n?.[this.index]||{});n&&(a?n[this.index]=a:n.length=r),i?t>=0?i[t]=s:i.push(s):this.series.options.nodes=[s],T(e,!0)&&this.series.chart.redraw(o)}}t.compose=function(t,n){let r=t.prototype,a=n.prototype;return r.setNodeState=s,r.setState=s,r.update=i,a.destroy=e,a.setData=o,n},t.createNode=function(t){let e=this.pointClass,o=(t,e)=>S(t,t=>t.id===e),s=o(this.nodes,t),i;if(!s){i=this.options.nodes&&o(this.options.nodes,t);let n=new e(this,b({className:"highcharts-node",isNode:!0,id:t,y:1},i));n.linksTo=[],n.linksFrom=[],n.getSum=function(){let t=0,e=0;return n.linksTo.forEach(e=>{t+=e.weight||0}),n.linksFrom.forEach(t=>{e+=t.weight||0}),Math.max(t,e)},n.offset=function(t,e){let o=0;for(let s=0;s<n[e].length;s++){if(n[e][s]===t)return o;o+=n[e][s].weight}},n.hasShape=function(){let t=0;return n.linksTo.forEach(e=>{e.outgoing&&t++}),!n.linksTo.length||t!==n.linksTo.length},n.index=this.nodes.push(n)-1,s=n}return s.formatPrefix="node",s.name=s.name||s.options.id||"",s.mass=T(s.options.mass,s.options.marker&&s.options.marker.radius,this.options.marker&&this.options.marker.radius,4),s},t.destroy=e,t.generatePoints=function(){let t=this.chart,e={};M.generatePoints.call(this),this.nodes||(this.nodes=[]),this.colorCounter=0,this.nodes.forEach(t=>{t.linksFrom.length=0,t.linksTo.length=0,t.level=t.options.level}),this.points.forEach(o=>{k(o.from)&&(e[o.from]||(e[o.from]=this.createNode(o.from)),e[o.from].linksFrom.push(o),o.fromNode=e[o.from],t.styledMode?o.colorIndex=T(o.options.colorIndex,e[o.from].colorIndex):o.color=o.options.color||e[o.from].color),k(o.to)&&(e[o.to]||(e[o.to]=this.createNode(o.to)),e[o.to].linksTo.push(o),o.toNode=e[o.to]),o.name=o.name||o.id},this),this.nodeLookup=e},t.setNodeState=s,t.updateNode=i}(n||(n={}));let O=n,{seriesTypes:{sankey:{prototype:{pointClass:E}}}}=f();class w extends E{isValid(){return!0}}b(w.prototype,{setState:O.setNodeState});var A=r||(r={});A.compose=function(t,e){return t.sankeyColumn=new W(t,e),t};class W{constructor(t,e){this.points=t,this.series=e}getTranslationFactor(t){let e=this.points,o=e.slice(),s=t.chart,i=t.options.minLinkWidth||0,n,r=0,a,l=(s.plotSizeY||0)-(t.options.borderWidth||0)-(e.length-1)*t.nodePadding;for(;e.length;){for(r=l/e.sankeyColumn.sum(),n=!1,a=e.length;a--;)e[a].getSum()*r<i&&(e.splice(a,1),l=Math.max(0,l-i),n=!0);if(!n)break}for(let t of(e.length=0,o))e.push(t);return r}top(t){let e=this.series,o=e.nodePadding,s=this.points.reduce((s,i)=>(s>0&&(s+=o),s+=Math.max(i.getSum()*t,e.options.minLinkWidth||0)),0);return((t="")=>({center:.5,right:1,middle:.5,bottom:1})[t]||0)(e.options.nodeAlignment||"center")*((e.chart.plotSizeY||0)-s)}left(t){let e=this.series,o=e.chart,s=e.options.equalNodes,i=o.inverted?o.plotHeight:o.plotWidth,n=e.nodePadding,r=this.points.reduce((o,r)=>(o>0&&(o+=n),o+=s?i/r.series.nodes.length-n:Math.max(r.getSum()*t,e.options.minLinkWidth||0)),0);return((o.plotSizeX||0)-Math.round(r))/2}sum(){return this.points.reduce((t,e)=>t+e.getSum(),0)}offset(t,e){let o=this.points,s=this.series,i=s.nodePadding,n=0,r;if(s.is("organization")&&t.hangsFrom)return{absoluteTop:t.hangsFrom.nodeY};for(let a=0;a<o.length;a++){let l=o[a].getSum(),h=Math.max(l*e,s.options.minLinkWidth||0),d=t.options[s.chart.inverted?"offsetHorizontal":"offsetVertical"],p=t.options.offset||0;if(r=l?h+i:0,o[a]===t)return{relativeTop:n+(k(d)?C(d,h):C(p,r))};n+=r}}}A.SankeyColumnAdditions=W;let _=r;var j=h(820),z=h.n(j),F=h(540),R=h.n(F),Y=h(28),X=h.n(Y);let{deg2rad:B}=c();function V(t,e){e=L(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},e);let o=this.renderer.url,s=this.text||this,i=s.textPath,{attributes:n,enabled:r}=e;if(t=t||i&&i.path,i&&i.undo(),t&&r){let e=y(s,"afterModifyTree",e=>{if(t&&r){let i=t.attr("id");i||t.attr("id",i=(0,p.uniqueKey)());let r={x:0,y:0};k(n.dx)&&(r.dx=n.dx,delete n.dx),k(n.dy)&&(r.dy=n.dy,delete n.dy),s.attr(r),this.attr({transform:""}),this.box&&(this.box=this.box.destroy());let a=e.nodes.slice(0);e.nodes.length=0,e.nodes[0]={tagName:"textPath",attributes:b(n,{"text-anchor":n.textAnchor,href:`${o}#${i}`}),children:a}}});s.textPath={path:t,undo:e}}else s.attr({dx:0,dy:0}),delete s.textPath;return this.added&&(s.textCache="",this.renderer.buildText(s)),this}function D(t){let e=t.bBox,o=this.element?.querySelector("textPath");if(o){let t=[],{b:s,h:i}=this.renderer.fontMetrics(this.element),n=i-s,r=RegExp('(<tspan>|<tspan(?!\\sclass="highcharts-br")[^>]*>|<\\/tspan>)',"g"),a=o.innerHTML.replace(r,"").split(/<tspan class="highcharts-br"[^>]*>/),l=a.length,h=(t,e)=>{let{x:i,y:r}=e,a=(o.getRotationOfChar(t)-90)*B,l=Math.cos(a),h=Math.sin(a);return[[i-n*l,r-n*h],[i+s*l,r+s*h]]};for(let e=0,s=0;s<l;s++){let i=a[s].length;for(let n=0;n<i;n+=5)try{let i=e+n+s,[r,a]=h(i,o.getStartPositionOfChar(i));0===n?(t.push(a),t.push(r)):(0===s&&t.unshift(a),s===l-1&&t.push(r))}catch{break}e+=i-1;try{let i=e+s,n=o.getEndPositionOfChar(i),[r,a]=h(i,n);t.unshift(a),t.unshift(r)}catch{break}}t.length&&t.push(t[0].slice()),e.polygon=t}return e}function G(t){let e=t.labelOptions,o=t.point,s=e[o.formatPrefix+"TextPath"]||e.textPath;s&&!e.useHTML&&(this.setTextPath(o.getDataLabelPath?.(this)||o.graphic,s),o.dataLabelPath&&!s.enabled&&(o.dataLabelPath=o.dataLabelPath.destroy()))}({compose:function(t){y(t,"afterGetBBox",D),y(t,"beforeAddingDataLabel",G);let e=t.prototype;e.setTextPath||(e.setTextPath=V)}}).compose(X());let{prototype:{symbols:q}}=R(),{seriesTypes:{column:I,sankey:$}}=f();class K extends ${createNodeColumns(){let t=this,e=t.chart,o=_.compose([],t);return o.sankeyColumn.maxLength=e.inverted?e.plotHeight:e.plotWidth,o.sankeyColumn.getTranslationFactor=t=>{let s=o.slice(),i=this.options.minLinkWidth||0,n,r=0,a,l,h=0,d=1,p=0,c=(e.plotSizeX||0)-(t.options.marker&&t.options.marker.lineWidth||0)-(o.length-1)*t.nodePadding;for(;o.length;){for(r=c/o.sankeyColumn.sum(),n=!1,a=o.length;a--;){l=o[a].getSum()*r*d;let t=Math.min(e.plotHeight,e.plotWidth);l>t?d=Math.min(t/l,d):l<i&&(o.splice(a,1),c-=i,l=i,n=!0),p+=l*(1-d)/2,h=Math.max(h,l)}if(!n)break}return o.length=0,s.forEach(t=>{t.scale=d,o.push(t)}),o.sankeyColumn.maxRadius=h,o.sankeyColumn.scale=d,o.sankeyColumn.additionalSpace=p,r},o.sankeyColumn.offset=function(s,i){let n=s.series.options.equalNodes,r=t.nodePadding,a=Math.min(e.plotWidth,e.plotHeight,(o.sankeyColumn.maxLength||0)/t.nodes.length-r),l=o.sankeyColumn.additionalSpace||0,h;for(let e=0;e<o.length;e++){let d=o[e].getSum()*(o.sankeyColumn.scale||0),p=n?a:Math.max(d*i,t.options.minLinkWidth||0);if(h=d?p+r:0,o[e]===s)return{relativeLeft:l+C(s.options.offset||0,h)};l+=h}},t.nodes.forEach(function(t){t.column=0,o.push(t)}),[o]}translateLink(t){let e=t.fromNode,o=t.toNode,s=this.chart,i=this.translationFactor,n=t.options,r=this.options,a=T(n.linkWeight,r.linkWeight,Math.max((t.weight||0)*i*e.scale,this.options.minLinkWidth||0)),l=t.series.options.centeredLinks,h=e.nodeY,d=(e,o)=>{let s=(e.offset(t,o)||0)*i;return Math.min(e.nodeX+s,e.nodeX+(e.shapeArgs&&e.shapeArgs.height||0)-a)},p=l?e.nodeX+((e.shapeArgs.height||0)-a)/2:d(e,"linksFrom"),c=l?o.nodeX+((o.shapeArgs.height||0)-a)/2:d(o,"linksTo"),u=h;p>c&&([p,c]=[c,p]),r.reversed&&([p,c]=[c,p],u=(s.plotSizeY||0)-u),t.shapeType="path",t.linkBase=[p,p+a,c,c+a];let f=(c+a-p)/Math.abs(c+a-p)*T(r.linkRadius,Math.min(Math.abs(c+a-p)/2,e.nodeY-Math.abs(a)));t.shapeArgs={d:[["M",p,u],["A",(c+a-p)/2,f,0,0,1,c+a,u],["L",c,u],["A",(c-p-a)/2,f-a,0,0,0,p+a,u],["Z"]]},t.dlBox={x:p+(c-p)/2,y:u-f,height:a,width:0},t.tooltipPos=s.inverted?[(s.plotSizeY||0)-t.dlBox.y-a/2,(s.plotSizeX||0)-t.dlBox.x]:[t.dlBox.x,t.dlBox.y+a/2],t.y=t.plotY=1,t.x=t.plotX=1,t.color||(t.color=e.color)}translateNode(t,e){let o=this.translationFactor,s=this.chart,i=s.inverted?s.plotWidth:s.plotHeight,n=this.options,r=Math.min(s.plotWidth,s.plotHeight,i/t.series.nodes.length-this.nodePadding),a=t.getSum()*(e.sankeyColumn.scale||0),l=n.equalNodes?r:Math.max(a*o,this.options.minLinkWidth||0),h=n.marker?.lineWidth||0,d=e.sankeyColumn.offset(t,o),p=x(T(d&&d.absoluteLeft,(e.sankeyColumn.left(o)||0)+(d&&d.relativeLeft||0)),h),c=L(n.marker,t.options.marker),u=c.symbol,f=c.radius,m=parseInt(n.offset??"100",10)*((s.inverted?s.plotWidth:s.plotHeight)-(x(this.colDistance*(t.column||0)+(c.lineWidth||0)/2,h)+(e.sankeyColumn.scale||0)*(e.sankeyColumn.maxRadius||0)/2))/100;if(t.sum=a,a){t.nodeX=p,t.nodeY=m;let e=t.options.width||n.width||l,o=t.options.height||n.height||l,i=m;n.reversed&&(i=(s.plotSizeY||0)-m,s.inverted&&(i=(s.plotSizeY||0)-m)),this.mapOptionsToLevel&&(t.dlOptions={...$.getDLOptions({level:this.mapOptionsToLevel[t.level],optionsPoint:t.options}),zIndex:void 0}),t.plotX=1,t.plotY=1,t.tooltipPos=s.inverted?[(s.plotSizeY||0)-i-o/2,(s.plotSizeX||0)-p-e/2]:[p+e/2,i+o/2],t.shapeType="path",t.shapeArgs={d:q[u||"circle"](p,i-(f||o)/2,f||e,f||o),width:f||e,height:f||o},t.dlBox={x:p+e/2,y:i,height:0,width:0}}else t.dlOptions={enabled:!1}}drawDataLabels(){if(this.options.dataLabels){let t=this.options.dataLabels.textPath;I.prototype.drawDataLabels.call(this,this.nodes),this.options.dataLabels.textPath=this.options.dataLabels.linkTextPath,I.prototype.drawDataLabels.call(this,this.data),this.options.dataLabels.textPath=t}}pointAttribs(t,e){if(t&&t.isNode){let{...t}=z().prototype.pointAttribs.apply(this,arguments);return t}return super.pointAttribs.apply(this,arguments)}markerAttribs(t){return t.isNode?super.markerAttribs.apply(this,arguments):{}}}K.defaultOptions=L($.defaultOptions,{centeredLinks:!1,equalNodes:!1,dataLabels:{linkTextPath:{attributes:{startOffset:"25%"}}},marker:{fillOpacity:1,lineWidth:0,states:{},symbol:"circle"},offset:"100%",reversed:!1}),b(K.prototype,{orderNodes:!1}),K.prototype.pointClass=w,f().registerSeriesType("arcdiagram",K);let Z=c();return d.default})());