!/**
 * Highcharts JS v13.0.0 (2026-06-11)
 * @module highcharts/modules/venn
 * @requires highcharts
 *
 * (c) 2017-2026 Highsoft AS
 * Authors: Jon Arild Nygård
 *
 * 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.Color,t._Highcharts.SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/modules/venn",["highcharts/highcharts"],function(t){return e(t,t.Color,t.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/modules/venn"]=e(t._Highcharts,t._Highcharts.Color,t._Highcharts.SeriesRegistry):t.Highcharts=e(t.Highcharts,t.Highcharts.Color,t.Highcharts.SeriesRegistry)}("u"<typeof window?this:window,function(t,e,r){return function(){"use strict";var n,i,o,a,s,u={512:function(t){t.exports=r},620:function(t){t.exports=e},944:function(e){e.exports=t}},c={};function l(t){var e=c[t];if(void 0!==e)return e.exports;var r=c[t]={exports:{}};return u[t](r,r.exports,l),r.exports}l.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return l.d(e,{a:e}),e},l.d=function(t,e){for(var r in e)l.o(e,r)&&!l.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},l.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var f={};l.d(f,{default:function(){return tr}});var p=l(944),h=l.n(p),d=l(620),v=l.n(d);(n=a||(a={})).getCenterOfPoints=function(t){var e=t.reduce(function(t,e){return t.x+=e.x,t.y+=e.y,t},{x:0,y:0});return{x:e.x/t.length,y:e.y/t.length}},n.getDistanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},n.getAngleBetweenPoints=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)},n.pointInPolygon=function(t,e){var r,n,i=t.x,o=t.y,a=e.length,s=!1;for(r=0,n=a-1;r<a;n=r++){var u=e[r],c=u[0],l=u[1],f=e[n],p=f[0],h=f[1];l>o!=h>o&&i<(p-c)*(o-l)/(h-l)+c&&(s=!s)}return s};var g=a,y=g.getAngleBetweenPoints,x=g.getCenterOfPoints,m=g.getDistanceBetweenPoints;!function(t){function e(t,e){var r=Math.pow(10,e);return Math.round(t*r)/r}function r(t){if(t<=0)throw Error("radius of circle must be a positive number.");return(0,p.correctFloat)(Math.PI*t*t)}function n(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}function i(t,r){var n=m(t,r),i=t.r,o=r.r,a=[];if(n<i+o&&n>Math.abs(i-o)){var s=i*i,u=(s-o*o+n*n)/(2*n),c=Math.sqrt(s-u*u),l=t.x,f=r.x,p=t.y,h=r.y,d=l+u*(f-l)/n,v=p+u*(h-p)/n,g=-(c/n*(h-p)),y=-(c/n*(f-l));a=[{x:e(d+g,14),y:e(v-y,14)},{x:e(d-g,14),y:e(v+y,14)}]}return a}function o(t){return t.reduce(function(t,e,r,n){var o=n.slice(r+1).reduce(function(t,n,o){var a=[r,o+r+1];return t.concat(i(e,n).map(function(t){return t.indexes=a,t}))},[]);return t.concat(o)},[])}function a(t,e){return m(t,e)<=e.r+1e-10}function s(t,e){return!e.some(function(e){return!a(t,e)})}function u(t){return o(t).filter(function(e){return s(e,t)})}t.round=e,t.getAreaOfCircle=r,t.getCircularSegmentArea=n,t.getOverlapBetweenCircles=function(t,i,o){var a=0;if(o<t+i){if(o<=Math.abs(i-t))a=r(t<i?t:i);else{var s=(t*t-i*i+o*o)/(2*o);a=n(t,t-s)+n(i,i-(o-s))}a=e(a,14)}return a},t.getCircleCircleIntersection=i,t.getCirclesIntersectionPoints=o,t.isCircle1CompletelyOverlappingCircle2=function(t,e){return m(t,e)+e.r<t.r+1e-10},t.isPointInsideCircle=a,t.isPointInsideAllCircles=s,t.isPointOutsideAllCircles=function(t,e){return!e.some(function(e){return a(t,e)})},t.getCirclesIntersectionPolygon=u,t.getAreaOfIntersectionBetweenCircles=function(t){var e,r=u(t);if(r.length>1){var n=x(r),i=(r=r.map(function(t){return t.angle=y(n,t),t}).sort(function(t,e){return e.angle-t.angle}))[r.length-1],o=r.reduce(function(e,r){var n=e.startPoint,i=x([n,r]),o=r.indexes.filter(function(t){return n.indexes.indexOf(t)>-1}).reduce(function(e,o){var a=t[o],s=y(a,r),u=y(a,n),c=u-s+(u<s?2*Math.PI:0),l=u-c/2,f=m(i,{x:a.x+a.r*Math.sin(l),y:a.y+a.r*Math.cos(l)}),p=a.r;return f>2*p&&(f=2*p),(!e||e.width>f)&&(e={r:p,largeArc:+(f>p),width:f,x:r.x,y:r.y}),e},null);if(o){var a=o.r;e.arcs.push(["A",a,a,0,o.largeArc,1,o.x,o.y]),e.startPoint=r}return e},{startPoint:i,arcs:[]}).arcs;0===o.length||1===o.length||(o.unshift(["M",i.x,i.y]),e={center:n,d:o})}return e}}(s||(s={}));var b=s,O=function(){return(O=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},C=function(t,e){var r=e.animatableAttribs,n=e.onComplete,i=e.css,o=e.renderer,a=t.series&&t.series.chart.hasRendered?void 0:t.series&&t.series.options.animation,s=t.graphic;if(e.attribs=O(O({},e.attribs),{class:t.getClassName()}),t.shouldDraw())s||(t.graphic=s="text"===e.shapeType?o.text():"image"===e.shapeType?o.image(e.imageUrl||"").attr(e.shapeArgs||{}):o[e.shapeType](e.shapeArgs||{}),s.add(e.group)),i&&s.css(i),s.attr(e.attribs).animate(r,!e.isNew&&a,n);else if(s){var u=function(){t.graphic=s=s&&s.destroy(),"function"==typeof n&&n()};Object.keys(r).length?s.animate(r,void 0,function(){return u()}):u()}},A=l(512),w=l.n(A),P=(i=function(t,e){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),M=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return P(e,t),e.prototype.isValid=function(){return(0,p.isNumber)(this.value)},e.prototype.shouldDraw=function(){return!!this.shapeArgs},e}(w().seriesTypes.scatter.prototype.pointClass),_={borderColor:"var(--highcharts-neutral-color-20)",borderDashStyle:"solid",borderWidth:1,brighten:0,clip:!1,colorByPoint:!0,dataLabels:{enabled:!0,verticalAlign:"middle",formatter:function(){return this.point.name}},inactiveOtherPoints:!0,marker:!1,opacity:.75,showInLegend:!1,legendType:"point",states:{hover:{opacity:1,borderColor:"var(--highcharts-neutral-color-80)"},select:{color:"var(--highcharts-neutral-color-20)",borderColor:"var(--highcharts-neutral-color-100)",animation:!1},inactive:{opacity:.075}},tooltip:{pointFormat:"{point.name}: {point.value}"},legendSymbol:"rectangle"},j=function(){return(j=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},I=b.getAreaOfCircle,T=b.getCircleCircleIntersection,S=b.getOverlapBetweenCircles,N=b.isPointInsideAllCircles,E=b.isPointInsideCircle,L=b.isPointOutsideAllCircles,B=g.getDistanceBetweenPoints;function V(t){var e={};return t.filter(function(t){return 2===t.sets.length}).forEach(function(t){t.sets.forEach(function(r,n,i){var o;(0,p.isObject)(e[r])||(e[r]={totalOverlap:0,overlapping:{}}),e[r]={totalOverlap:(e[r].totalOverlap||0)+t.value,overlapping:j(j({},e[r].overlapping||{}),((o={})[i[1-n]]=t.value,o))}})}),t.filter(k).forEach(function(t){var r=e[t.sets[0]];(0,p.extend)(t,r)}),t}function H(t,e,r,n,i){var o,a,s=t(e),u=t(r),c=i||100,l=n||1e-10,f=r-e,p=1;if(e>=r)throw Error("a must be smaller than b.");if(s*u>0)throw Error("f(a) and f(b) must have opposite signs.");if(0===s)o=e;else if(0===u)o=r;else for(;p++<=c&&0!==a&&f>l;)f=(r-e)/2,s*(a=t(o=e+f))>0?e=o:r=o;return o}function D(t){for(var e=t.slice(0,-1),r=e.length,n=[],i=function(t,e){return t.sum+=e[t.i],t},o=0;o<r;o++)n[o]=e.reduce(i,{sum:0,i:o}).sum/r;return n}function X(t,e,r){var n=t+e;return r<=0?n:I(t<e?t:e)<=r?0:H(function(n){return r-S(t,e,n)},0,n)}function k(t){return(0,p.isArray)(t.sets)&&1===t.sets.length}function F(t){var e={};return(0,p.isObject)(t)&&(0,p.isNumber)(t.value)&&t.value>-1&&(0,p.isArray)(t.sets)&&t.sets.length>0&&!t.sets.some(function(t){var r=!1;return!e[t]&&(0,p.isString)(t)?e[t]=!0:r=!0,r})}function U(t,e){return e.reduce(function(e,r){var n=0;if(r.sets.length>1){var i=r.value-function(t){var e=0;if(2===t.length){var r=t[0],n=t[1];e=S(r.r,n.r,B(r,n))}return e}(r.sets.map(function(e){return t[e]}));n=Math.round(i*i*1e11)/1e11}return e+n},0)}function R(t,e){return void 0!==e.totalOverlap&&void 0!==t.totalOverlap?e.totalOverlap-t.totalOverlap:NaN}var W={geometry:g,geometryCircles:b,addOverlapToSets:V,getCentroid:D,getDistanceBetweenCirclesByOverlap:X,getLabelWidth:function(t,e,r){var n=e.reduce(function(t,e){return Math.min(e.r,t)},1/0),i=r.filter(function(e){return!E(t,e)}),o=function(r,n){return H(function(o){var a={x:t.x+n*o,y:t.y};return-(r-o)+(N(a,e)&&L(a,i)?0:Number.MAX_VALUE)},0,r)};return 2*Math.min(o(n,-1),o(n,1))},getMarginFromCircles:function(t,e,r){var n=e.reduce(function(e,r){var n=r.r-B(t,r);return n<=e?n:e},Number.MAX_VALUE);return r.reduce(function(e,r){var n=B(t,r)-r.r;return n<=e?n:e},n)},isSet:k,layoutGreedyVenn:function(t){var e=[],r={};t.filter(function(t){return 1===t.sets.length}).forEach(function(t){r[t.sets[0]]=t.circle={x:Number.MAX_VALUE,y:Number.MAX_VALUE,r:Math.sqrt(t.value/Math.PI)}});var n=function(t,r){var n=t.circle;n&&(n.x=r.x,n.y=r.y),e.push(t)};V(t);var i=t.filter(k).sort(R);n(i.shift(),{x:0,y:0});for(var o=t.filter(function(t){return 2===t.sets.length}),a=0;a<i.length;a++)!function(t){var i=t.circle;if(i){var a=i.r,s=t.overlapping;n(t,e.reduce(function(t,n,u){var c=n.circle;if(!c||!s)return t;for(var l=s[n.sets[0]],f=X(a,c.r,l),p=[{x:c.x+f,y:c.y},{x:c.x-f,y:c.y},{x:c.x,y:c.y+f},{x:c.x,y:c.y-f}],h=0,d=e.slice(u+1);h<d.length;h++){var v=d[h],g=v.circle,y=s[v.sets[0]];if(g){var x=X(a,g.r,y);p=p.concat(T({x:c.x,y:c.y,r:f},{x:g.x,y:g.y,r:x}))}}for(var m=0,b=p;m<b.length;m++){var O=b[m];i.x=O.x,i.y=O.y;var C=U(r,o);C<t.loss&&(t.loss=C,t.coordinates=O)}return t},{loss:Number.MAX_VALUE,coordinates:void 0}).coordinates)}}(i[a]);return r},loss:U,nelderMead:function(t,e){for(var r=function(t,e){return t.fx-e.fx},n=function(t,e,r,n){return e.map(function(e,i){return t*e+r*n[i]})},i=function(e,r){return r.fx=t(r),e[e.length-1]=r,e},o=function(e){var r=e[0];return e.map(function(e){var i=n(.5,r,.5,e);return i.fx=t(i),i})},a=function(e,r,i,o){var a=n(i,e,o,r);return a.fx=t(a),a},s=function(e){var r=e.length,n=Array(r+1);n[0]=e,n[0].fx=t(e);for(var i=0;i<r;++i){var o=e.slice();o[i]=o[i]?1.05*o[i]:.001,o.fx=t(o),n[i+1]=o}return n}(e),u=0;u<100;u++){s.sort(r);var c=s[s.length-1],l=D(s),f=a(l,c,2,-1);if(f.fx<s[0].fx){var p=a(l,c,3,-2);s=i(s,p.fx<f.fx?p:f)}else if(f.fx>=s[s.length-2].fx){var h=void 0;s=f.fx>c.fx?(h=a(l,c,.5,.5)).fx<c.fx?i(s,h):o(s):(h=a(l,c,1.5,-.5)).fx<f.fx?i(s,h):o(s)}else s=i(s,f)}return s[0]},processVennData:function(t,e){var r=(null==t?void 0:t.columns)?Array(t.rowCount).fill(void 0).map(function(e,r){return t.getRowObject(r)}):[],n=r.reduce(function(t,e){var r;return e.sets&&F(r=e)&&k(r)&&r.value>0&&-1===t.indexOf(e.sets[0])&&t.push(e.sets[0]),t},[]).sort(),i=r.reduce(function(t,r){return r.sets&&F(r)&&!r.sets.some(function(t){return -1===n.indexOf(t)})&&(t[r.sets.sort().join(e)]={sets:r.sets,value:r.value||0}),t},{});return n.reduce(function(t,r,n,i){return i.slice(n+1).forEach(function(n){t.push(r+e+n)}),t},[]).forEach(function(t){if(!i[t]){var r={sets:t.split(e),value:0};i[t]=r}}),Object.keys(i).map(function(t){return i[t]})},sortByTotalOverlap:R},q=(o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(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 r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),z=h().animObject,Y=v().parse,G=b.getAreaOfIntersectionBetweenCircles,J=b.getCirclesIntersectionPolygon,K=b.isCircle1CompletelyOverlappingCircle2,Q=b.isPointInsideAllCircles,Z=b.isPointOutsideAllCircles,$=g.getCenterOfPoints,tt=w().seriesTypes.scatter,te=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return q(e,t),e.getLabelPosition=function(t,e){var r=t.reduce(function(r,n){var i=n.r/2;return[{x:n.x,y:n.y},{x:n.x+i,y:n.y},{x:n.x-i,y:n.y},{x:n.x,y:n.y+i},{x:n.x,y:n.y-i}].reduce(function(r,n){var i=W.getMarginFromCircles(n,t,e);return r.margin<i&&(r.point=n,r.margin=i),r},r)},{point:void 0,margin:-Number.MAX_VALUE}).point,n=W.nelderMead(function(r){return-W.getMarginFromCircles({x:r[0],y:r[1]},t,e)},[r.x,r.y]);return Q(r={x:n[0],y:n[1]},t)&&Z(r,e)||(r=t.length>1?$(J(t)):{x:t[0].x,y:t[0].y}),r},e.getLabelValues=function(t,r){var n=t.sets,i=r.reduce(function(t,e){var r=n.indexOf(e.sets[0])>-1;return e.circle&&t[r?"internal":"external"].push(e.circle),t},{internal:[],external:[]});i.external=i.external.filter(function(t){return i.internal.some(function(e){return!K(t,e)})});var o=e.getLabelPosition(i.internal,i.external),a=W.getLabelWidth(o,i.internal,i.external);return{position:o,width:a}},e.layout=function(t){var r={},n={};if(t.length>0)for(var i=W.layoutGreedyVenn(t),o=t.filter(W.isSet),a=0;a<t.length;a++){var s=t[a],u=s.sets,c=u.join(),l=W.isSet(s)?i[c]:G(u.map(function(t){return i[t]}));l&&(r[c]=l,n[c]=e.getLabelValues(s,o))}return{mapOfIdToShape:r,mapOfIdToLabelValues:n}},e.getScale=function(t,e,r){var n=r.bottom-r.top,i=r.right-r.left,o=(r.right+r.left)/2,a=(r.top+r.bottom)/2,s=Math.min(i>0?1/i*t:1,n>0?1/n*e:1);return{scale:s,centerX:t/2-o*s,centerY:e/2-a*s}},e.updateFieldBoundaries=function(t,e){var r=e.x-e.r,n=e.x+e.r,i=e.y+e.r,o=e.y-e.r;return(!(0,p.isNumber)(t.left)||t.left>r)&&(t.left=r),(!(0,p.isNumber)(t.right)||t.right<n)&&(t.right=n),(!(0,p.isNumber)(t.top)||t.top>o)&&(t.top=o),(!(0,p.isNumber)(t.bottom)||t.bottom<i)&&(t.bottom=i),t},e.prototype.animate=function(t){if(!t)for(var e=z(this.options.animation),r=function(t){var r=t.shapeArgs;if(t.graphic&&r){var n={},i={};r.d?n.opacity=.001:(n.r=0,i.r=r.r),t.graphic.attr(n).animate(i,e),r.d&&setTimeout(function(){var e;null==(e=null==t?void 0:t.graphic)||e.animate({opacity:1})},e.duration)}},n=0,i=this.points;n<i.length;n++)r(i[n])},e.prototype.drawPoints=function(){for(var t=this.chart,e=this.group,r=this.points||[],n=t.renderer,i=0;i<r.length;i++){var o=r[i],a={zIndex:(0,p.isArray)(o.sets)?o.sets.length:0},s=o.shapeArgs;t.styledMode||(0,p.extend)(a,this.pointAttribs(o,o.state)),C(o,{isNew:!o.graphic,animatableAttribs:s,attribs:a,group:e,renderer:n,shapeType:(null==s?void 0:s.d)?"path":"circle"})}},e.prototype.init=function(){tt.prototype.init.apply(this,arguments),delete this.opacity},e.prototype.pointAttribs=function(t,e){var r=this.options||{},n=(null==t?void 0:t.options)||{},i=e&&r.states[e]||{},o=(0,p.merge)(r,n,i);return{fill:Y(o.color||t.color).brighten(o.brightness).get(),opacity:o.opacity,stroke:o.borderColor,"stroke-width":o.borderWidth,dashstyle:o.borderDashStyle}},e.prototype.translate=function(){var t,r=this.chart;this.dataTable.modified=this.dataTable,this.generatePoints();for(var n=W.processVennData(this.dataTable,e.splitter),i=e.layout(n),o=i.mapOfIdToShape,a=i.mapOfIdToLabelValues,s=Object.keys(o).filter(function(t){var e=o[t];return e&&(0,p.isNumber)(e.r)}).reduce(function(t,r){return e.updateFieldBoundaries(t,o[r])},{top:0,bottom:0,left:0,right:0}),u=e.getScale(r.plotWidth,r.plotHeight,s),c=u.scale,l=u.centerX,f=u.centerY,h=0,d=this.points;h<d.length;h++){var v=d[h],g=(0,p.isArray)(v.sets)?v.sets:[],y=g.join(),x=o[y],m=a[y]||{},b=null==(t=v.options)?void 0:t.dataLabels,O=void 0,C=m.width,A=m.position;if(x){if(x.r)O={x:l+x.x*c,y:f+x.y*c,r:x.r*c};else if(x.d){var w=x.d;w.forEach(function(t){"M"===t[0]?(t[1]=l+t[1]*c,t[2]=f+t[2]*c):"A"===t[0]&&(t[1]=t[1]*c,t[2]=t[2]*c,t[6]=l+t[6]*c,t[7]=f+t[7]*c)}),O={d:w}}A?(A.x=l+A.x*c,A.y=f+A.y*c):A={},(0,p.isNumber)(C)&&(C=Math.round(C*c))}v.shapeArgs=O,A&&O&&(v.plotX=A.x,v.plotY=A.y),C&&O&&(v.dlOptions=(0,p.merge)({style:{width:C}},(0,p.isObject)(b,!0)?b:void 0,{zIndex:void 0}),delete v.dlOptions.zIndex),v.name=v.options.name||g.join("∩")}},e.splitter="highcharts-split",e.defaultOptions=(0,p.merge)(tt.defaultOptions,_),e}(tt);(0,p.extend)(te.prototype,{axisTypes:[],directTouch:!0,isCartesian:!1,pointArrayMap:["value"],pointClass:M,utils:W}),(0,p.addEvent)(te,"afterSetOptions",function(t){var e=t.options.states||{};if(this.is("venn"))for(var r=0,n=Object.keys(e);r<n.length;r++)e[n[r]].halo=!1}),w().registerSeriesType("venn",te);var tr=h();return f.default}()});