/* Highcharts JS v9.3.1 (2021-11-05) (c) 2017-2021 Highsoft AS Authors: Jon Arild Nygard License: www.highcharts.com/license */ 'use strict';(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/venn",["highcharts"],function(n){a(n);a.Highcharts=n;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function n(a,r,m,y){a.hasOwnProperty(r)||(a[r]=y.apply(null,m))}a=a?a._modules:{};n(a,"Core/Geometry/GeometryUtilities.js",[],function(){var a;(function(a){a.getCenterOfPoints=function(a){var m=a.reduce(function(a, h){a.x+=h.x;a.y+=h.y;return a},{x:0,y:0});return{x:m.x/a.length,y:m.y/a.length}};a.getDistanceBetweenPoints=function(a,g){return Math.sqrt(Math.pow(g.x-a.x,2)+Math.pow(g.y-a.y,2))};a.getAngleBetweenPoints=function(a,g){return Math.atan2(g.x-a.x,g.y-a.y)}})(a||(a={}));return a});n(a,"Core/Geometry/CircleUtilities.js",[a["Core/Geometry/GeometryUtilities.js"]],function(a){var g=a.getAngleBetweenPoints,m=a.getCenterOfPoints,y=a.getDistanceBetweenPoints,q;(function(a){function k(a,d){d=Math.pow(10,d); return Math.round(a*d)/d}function h(a){if(0>=a)throw Error("radius of circle must be a positive number.");return Math.PI*a*a}function x(a,d){return a*a*Math.acos(1-d/a)-(a-d)*Math.sqrt(d*(2*a-d))}function B(a,d){var h=y(a,d),v=a.r,t=d.r,f=[];if(hMath.abs(v-t)){v*=v;var u=(v-t*t+h*h)/(2*h);t=Math.sqrt(v-u*u);v=a.x;f=d.x;a=a.y;var g=d.y;d=v+u*(f-v)/h;u=a+u*(g-a)/h;a=t/h*-(g-a);h=t/h*-(f-v);f=[{x:k(d+a,14),y:k(u-h,14)},{x:k(d-a,14),y:k(u+h,14)}]}return f}function r(a){return a.reduce(function(a, h,k,t){t=t.slice(k+1).reduce(function(a,d,t,f){var g=[k,t+k+1];return a.concat(B(h,d).map(function(a){a.indexes=g;return a}))},[]);return a.concat(t)},[])}function q(a,d){return y(a,d)<=d.r+1e-10}function w(a,d){return!d.some(function(d){return!q(a,d)})}function n(a){return r(a).filter(function(d){return w(d,a)})}a.round=k;a.getAreaOfCircle=h;a.getCircularSegmentArea=x;a.getOverlapBetweenCircles=function(a,d,f){var g=0;f2*c&&(e=2*c);if(!b||b.width>e)b={r:c,largeArc:e>c?1:0,width:e,x:h.x,y:h.y};return b},null);if(x){var p=x.r;d.arcs.push(["A",p,p,0,x.largeArc,1,x.x,x.y]);d.startPoint=h}return d},{startPoint:f,arcs:[]}).arcs;if(0!== d.length&&1!==d.length){d.unshift(["M",f.x,f.y]);var k={center:h,d:d}}}return k}})(q||(q={}));return q});n(a,"Series/DrawPointComposition.js",[],function(){var a;(function(a){function g(a){var h=this,f=a.animatableAttribs,g=a.onComplete,m=a.css,q=a.renderer,r=this.series&&this.series.chart.hasRendered?void 0:this.series&&this.series.options.animation,w=this.graphic;a.attribs=a.attribs||{};a.attribs["class"]=this.getClassName();if(this.shouldDraw())w||(this.graphic=w=q[a.shapeType](a.shapeArgs).add(a.group)), w.css(m).attr(a.attribs).animate(f,a.isNew?!1:r,g);else if(w){var n=function(){h.graphic=w=w&&w.destroy();"function"===typeof g&&g()};Object.keys(f).length?w.animate(f,void 0,function(){n()}):n()}}function r(){return!this.isNull}var q=[];a.compose=function(a){if(-1===q.indexOf(a)){q.push(a);var h=a.prototype;h.draw=g;h.shouldDraw||(h.shouldDraw=r)}return a}})(a||(a={}));return a});n(a,"Series/Venn/VennPoint.js",[a["Series/DrawPointComposition.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]], function(a,r,m){var g=this&&this.__extends||function(){var a=function(h,f){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,f){a.__proto__=f}||function(a,f){for(var h in f)f.hasOwnProperty(h)&&(a[h]=f[h])};return a(h,f)};return function(h,f){function g(){this.constructor=h}a(h,f);h.prototype=null===f?Object.create(f):(g.prototype=f.prototype,new g)}}(),q=m.isNumber;r=function(a){function h(){var f=null!==a&&a.apply(this,arguments)||this;f.options=void 0;f.series=void 0;return f} g(h,a);h.prototype.isValid=function(){return q(this.value)};h.prototype.shouldDraw=function(){return!!this.shapeArgs};return h}(r.seriesTypes.scatter.prototype.pointClass);a.compose(r);return r});n(a,"Series/Venn/VennUtils.js",[a["Core/Geometry/CircleUtilities.js"],a["Core/Geometry/GeometryUtilities.js"],a["Core/Utilities.js"]],function(a,r,m){function g(a){var b=a.filter(function(a){return 2===a.sets.length}).reduce(function(a,b){b.sets.forEach(function(e,c,p){A(a[e])||(a[e]={overlapping:{},totalOverlap:0}); a[e].totalOverlap+=b.value;a[e].overlapping[p[1-c]]=b.value});return a},{});a.filter(n).forEach(function(a){C(a,b[a.sets[0]])});return a}function q(a,b,c,e,l){var p=a(b),d=a(c);l=l||100;e=e||1e-10;var f=c-b,h=1;if(b>=c)throw Error("a must be smaller than b.");if(0e;){f=(c-b)/2;g=b+f;var k=a(g);0=c?e:w(ag;g++){b.sort(c);var p=b[b.length-1],k=h(b),m=f(k,p,2,-1);if(m.fx=b[b.length-2].fx){var n= void 0;m.fx>p.fx?(n=f(k,p,.5,.5),b=n.fxb)a.left=b;if(!u(a.right)||a.rightc)a.top=c;if(!u(a.bottom)||a.bottom