/** * Highcharts JS v11.2.0 (2023-10-30) * * Dependency wheel module * * (c) 2010-2021 Torstein Honsi * * License: www.highcharts.com/license */!function(e){"object"==typeof module&&module.exports?(e.default=e,module.exports=e):"function"==typeof define&&define.amd?define("highcharts/modules/dependency-wheel",["highcharts","highcharts/modules/sankey"],function(t){return e(t),e.Highcharts=t,e}):e("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(e){"use strict";var t=e?e._modules:{};function s(e,t,s,i){e.hasOwnProperty(t)||(e[t]=i.apply(null,s),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:t,module:e[t]}})))}s(t,"Series/DependencyWheel/DependencyWheelPoint.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t){let{sankey:{prototype:{pointClass:s}}}=e.seriesTypes,{pInt:i,wrap:o}=t;return class extends s{constructor(){super(...arguments),this.angle=void 0,this.fromNode=void 0,this.index=void 0,this.linksFrom=void 0,this.linksTo=void 0,this.options=void 0,this.series=void 0,this.shapeArgs=void 0,this.toNode=void 0}getDataLabelPath(e){let t=this,s=t.series.chart.renderer,n=t.shapeArgs,a=t.angle<0||t.angle>Math.PI,r=n.start||0,d=n.end||0;return t.dataLabelPath?(t.dataLabelPath=t.dataLabelPath.destroy(),delete t.dataLabelPath):o(e,"destroy",function(e){return t.dataLabelPath&&(t.dataLabelPath=t.dataLabelPath.destroy()),e.call(this)}),t.dataLabelPath=s.arc({open:!0,longArc:Math.abs(Math.abs(r)-Math.abs(d)){e.graphic&&e.graphic.animate({opacity:1},{duration:t})},t*s++))}for(let e of this.points){let t=e.graphic;!e.isNode&&t&&t.attr({opacity:0}).animate({opacity:1},this.options.animation)}}}createNode(e){let t=super.createNode(e);return t.getSum=()=>t.linksFrom.concat(t.linksTo).reduce((e,t)=>e+t.weight,0),t.offset=e=>{let s=e=>e.fromNode===t?e.toNode:e.fromNode,i=0,o=t.linksFrom.concat(t.linksTo),n;o.sort((e,t)=>s(e).index-s(t).index);for(let e=0;et.index){o=o.slice(0,e).reverse().concat(o.slice(e).reverse()),n=!0;break}n||o.reverse();for(let t=0;t{let c=t*a,p=Math.cos(i+c)*(h+1),u=Math.sin(i+c)*(h+1);return o=e.curveFactor||0,(n=Math.abs(s.linkBase[3-l]*t-c))>Math.PI&&(n=2*Math.PI-n),(n*=h)