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