!/**
 * Highcharts JS v12.6.0 (2026-04-13)
 * @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(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(e._Highcharts,e._Highcharts.Color,e._Highcharts.SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/modules/venn",["highcharts/highcharts"],function(e){return t(e,e.Color,e.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/modules/venn"]=t(e._Highcharts,e._Highcharts.Color,e._Highcharts.SeriesRegistry):e.Highcharts=t(e.Highcharts,e.Highcharts.Color,e.Highcharts.SeriesRegistry)}("u"<typeof window?this:window,(e,t,r)=>(()=>{"use strict";var n,i,o,s={512:e=>{e.exports=r},620:e=>{e.exports=t},944:t=>{t.exports=e}},l={};function a(e){var t=l[e];if(void 0!==t)return t.exports;var r=l[e]={exports:{}};return s[e](r,r.exports,a),r.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var c={};a.d(c,{default:()=>en});var u=a(944),f=a.n(u),p=a(620),h=a.n(p);(n=i||(i={})).getCenterOfPoints=function(e){let t=e.reduce((e,t)=>(e.x+=t.x,e.y+=t.y,e),{x:0,y:0});return{x:t.x/e.length,y:t.y/e.length}},n.getDistanceBetweenPoints=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},n.getAngleBetweenPoints=function(e,t){return Math.atan2(t.x-e.x,t.y-e.y)},n.pointInPolygon=function({x:e,y:t},r){let n=r.length,i,o,s=!1;for(i=0,o=n-1;i<n;o=i++){let[n,l]=r[i],[a,c]=r[o];l>t!=c>t&&e<(a-n)*(t-l)/(c-l)+n&&(s=!s)}return s};let d=i,{doc:y,win:g}=f();function x(e,t){let r;for(r in e||(e={}),t)e[r]=t[r];return e}function m(e){return A(e)&&"number"==typeof e.nodeType}function b(e){return"number"==typeof e&&!isNaN(e)&&e<1/0&&e>-1/0}function v(e){let t=Object.prototype.toString.call(e);return"[object Array]"===t||"[object Array Iterator]"===t}function A(e,t){return!!e&&"object"==typeof e&&(!t||!v(e))}function O(e,...t){let r,n=[e,...t],i={},o=function(e,t){return"object"!=typeof e&&(e={}),function(e,t,r){for(let n in e)Object.hasOwnProperty.call(e,n)&&t.call(r||e[n],e[n],n,e)}(t,function(r,n){if("__proto__"!==n&&"constructor"!==n){let i;!A(r,!0)||(i=r?.constructor,A(r,!0)&&!m(r)&&i?.name&&"Object"!==i.name)||m(r)?e[n]=t[n]:e[n]=o(e[n]||{},r)}}),e};!0===e&&(i=n[1],n=Array.prototype.slice.call(n,2));let s=n.length;for(r=0;r<s;r++)i=o(i,n[r]);return i}Array.prototype.find;let{getAngleBetweenPoints:M,getCenterOfPoints:C,getDistanceBetweenPoints:P}=d;!function(e){function t(e,t){let r=Math.pow(10,t);return Math.round(e*r)/r}function r(e){var t;if(e<=0)throw Error("radius of circle must be a positive number.");return(t=Math.PI*e*e)>1e14?t:parseFloat(t.toPrecision(14))}function n(e,t){return e*e*Math.acos(1-t/e)-(e-t)*Math.sqrt(t*(2*e-t))}function i(e,r){let n=P(e,r),i=e.r,o=r.r,s=[];if(n<i+o&&n>Math.abs(i-o)){let l=i*i,a=(l-o*o+n*n)/(2*n),c=Math.sqrt(l-a*a),u=e.x,f=r.x,p=e.y,h=r.y,d=u+a*(f-u)/n,y=p+a*(h-p)/n,g=-(c/n*(h-p)),x=-(c/n*(f-u));s=[{x:t(d+g,14),y:t(y-x,14)},{x:t(d-g,14),y:t(y+x,14)}]}return s}function o(e){return e.reduce((e,t,r,n)=>{let o=n.slice(r+1).reduce((e,n,o)=>{let s=[r,o+r+1];return e.concat(i(t,n).map(e=>(e.indexes=s,e)))},[]);return e.concat(o)},[])}function s(e,t){return P(e,t)<=t.r+1e-10}function l(e,t){return!t.some(function(t){return!s(e,t)})}function a(e){return o(e).filter(function(t){return l(t,e)})}e.round=t,e.getAreaOfCircle=r,e.getCircularSegmentArea=n,e.getOverlapBetweenCircles=function(e,i,o){let s=0;if(o<e+i){if(o<=Math.abs(i-e))s=r(e<i?e:i);else{let t=(e*e-i*i+o*o)/(2*o);s=n(e,e-t)+n(i,i-(o-t))}s=t(s,14)}return s},e.getCircleCircleIntersection=i,e.getCirclesIntersectionPoints=o,e.isCircle1CompletelyOverlappingCircle2=function(e,t){return P(e,t)+t.r<e.r+1e-10},e.isPointInsideCircle=s,e.isPointInsideAllCircles=l,e.isPointOutsideAllCircles=function(e,t){return!t.some(function(t){return s(e,t)})},e.getCirclesIntersectionPolygon=a,e.getAreaOfIntersectionBetweenCircles=function(e){let t=a(e),r;if(t.length>1){let n=C(t),i=(t=t.map(function(e){return e.angle=M(n,e),e}).sort(function(e,t){return t.angle-e.angle}))[t.length-1],o=t.reduce(function(t,r){let{startPoint:n}=t,i=C([n,r]),o=r.indexes.filter(function(e){return n.indexes.indexOf(e)>-1}).reduce(function(t,o){let s=e[o],l=M(s,r),a=M(s,n),c=a-l+(a<l?2*Math.PI:0),u=a-c/2,f=P(i,{x:s.x+s.r*Math.sin(u),y:s.y+s.r*Math.cos(u)}),{r:p}=s;return f>2*p&&(f=2*p),(!t||t.width>f)&&(t={r:p,largeArc:+(f>p),width:f,x:r.x,y:r.y}),t},null);if(o){let{r:e}=o;t.arcs.push(["A",e,e,0,o.largeArc,1,o.x,o.y]),t.startPoint=r}return t},{startPoint:i,arcs:[]}).arcs;0===o.length||1===o.length||(o.unshift(["M",i.x,i.y]),r={center:n,d:o})}return r}}(o||(o={}));let w=o,j=function(e,t){let{animatableAttribs:r,onComplete:n,css:i,renderer:o}=t,s=e.series&&e.series.chart.hasRendered?void 0:e.series&&e.series.options.animation,l=e.graphic;if(t.attribs={...t.attribs,class:e.getClassName()},e.shouldDraw())l||(e.graphic=l="text"===t.shapeType?o.text():"image"===t.shapeType?o.image(t.imageUrl||"").attr(t.shapeArgs||{}):o[t.shapeType](t.shapeArgs||{}),l.add(t.group)),i&&l.css(i),l.attr(t.attribs).animate(r,!t.isNew&&s,n);else if(l){let t=()=>{e.graphic=l=l&&l.destroy(),"function"==typeof n&&n()};Object.keys(r).length?l.animate(r,void 0,()=>t()):t()}};var E=a(512),_=a.n(E);let{scatter:{prototype:{pointClass:L}}}=_().seriesTypes,{getAreaOfCircle:I,getCircleCircleIntersection:S,getOverlapBetweenCircles:T,isPointInsideAllCircles:N,isPointInsideCircle:V,isPointOutsideAllCircles:H}=w,{getDistanceBetweenPoints:k}=d;function B(e){let t={};return e.filter(e=>2===e.sets.length).forEach(e=>{e.sets.forEach((r,n,i)=>{A(t[r])||(t[r]={totalOverlap:0,overlapping:{}}),t[r]={totalOverlap:(t[r].totalOverlap||0)+e.value,overlapping:{...t[r].overlapping||{},[i[1-n]]:e.value}}})}),e.filter(U).forEach(e=>{let r=t[e.sets[0]];x(e,r)}),e}function X(e,t,r,n,i){let o=e(t),s=e(r),l=i||100,a=n||1e-10,c=r-t,u,f,p=1;if(t>=r)throw Error("a must be smaller than b.");if(o*s>0)throw Error("f(a) and f(b) must have opposite signs.");if(0===o)u=t;else if(0===s)u=r;else for(;p++<=l&&0!==f&&c>a;)c=(r-t)/2,o*(f=e(u=t+c))>0?t=u:r=u;return u}function D(e){let t=e.slice(0,-1),r=t.length,n=[],i=(e,t)=>(e.sum+=t[e.i],e);for(let e=0;e<r;e++)n[e]=t.reduce(i,{sum:0,i:e}).sum/r;return n}function F(e,t,r){let n=e+t;return r<=0?n:I(e<t?e:t)<=r?0:X(n=>r-T(e,t,n),0,n)}function U(e){return v(e.sets)&&1===e.sets.length}function R(e){let t={};return A(e)&&b(e.value)&&e.value>-1&&v(e.sets)&&e.sets.length>0&&!e.sets.some(function(e){let r=!1;return t[e]||"string"!=typeof e?r=!0:t[e]=!0,r})}function W(e,t){return t.reduce(function(t,r){let n=0;if(r.sets.length>1){let t=r.value-function(e){let t=0;if(2===e.length){let r=e[0],n=e[1];t=T(r.r,n.r,k(r,n))}return t}(r.sets.map(function(t){return e[t]}));n=Math.round(t*t*1e11)/1e11}return t+n},0)}function q(e,t){return void 0!==t.totalOverlap&&void 0!==e.totalOverlap?t.totalOverlap-e.totalOverlap:NaN}let Y={geometry:d,geometryCircles:w,addOverlapToSets:B,getCentroid:D,getDistanceBetweenCirclesByOverlap:F,getLabelWidth:function(e,t,r){let n=t.reduce((e,t)=>Math.min(t.r,e),1/0),i=r.filter(t=>!V(e,t)),o=function(r,n){return X(o=>{let s={x:e.x+n*o,y:e.y};return-(r-o)+(N(s,t)&&H(s,i)?0:Number.MAX_VALUE)},0,r)};return 2*Math.min(o(n,-1),o(n,1))},getMarginFromCircles:function(e,t,r){let n=t.reduce((t,r)=>{let n=r.r-k(e,r);return n<=t?n:t},Number.MAX_VALUE);return r.reduce((t,r)=>{let n=k(e,r)-r.r;return n<=t?n:t},n)},isSet:U,layoutGreedyVenn:function(e){let t=[],r={};e.filter(e=>1===e.sets.length).forEach(e=>{r[e.sets[0]]=e.circle={x:Number.MAX_VALUE,y:Number.MAX_VALUE,r:Math.sqrt(e.value/Math.PI)}});let n=(e,r)=>{let n=e.circle;n&&(n.x=r.x,n.y=r.y),t.push(e)};B(e);let i=e.filter(U).sort(q);n(i.shift(),{x:0,y:0});let o=e.filter(e=>2===e.sets.length);for(let e of i){let i=e.circle;if(!i)continue;let s=i.r,l=e.overlapping;n(e,t.reduce((e,n,a)=>{let c=n.circle;if(!c||!l)return e;let u=l[n.sets[0]],f=F(s,c.r,u),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}];for(let e of t.slice(a+1)){let t=e.circle,r=l[e.sets[0]];if(!t)continue;let n=F(s,t.r,r);p=p.concat(S({x:c.x,y:c.y,r:f},{x:t.x,y:t.y,r:n}))}for(let t of p){i.x=t.x,i.y=t.y;let n=W(r,o);n<e.loss&&(e.loss=n,e.coordinates=t)}return e},{loss:Number.MAX_VALUE,coordinates:void 0}).coordinates)}return r},loss:W,nelderMead:function(e,t){let r=function(e,t){return e.fx-t.fx},n=(e,t,r,n)=>t.map((t,i)=>e*t+r*n[i]),i=(t,r)=>(r.fx=e(r),t[t.length-1]=r,t),o=t=>{let r=t[0];return t.map(t=>{let i=n(.5,r,.5,t);return i.fx=e(i),i})},s=(t,r,i,o)=>{let s=n(i,t,o,r);return s.fx=e(s),s},l=(t=>{let r=t.length,n=Array(r+1);n[0]=t,n[0].fx=e(t);for(let i=0;i<r;++i){let r=t.slice();r[i]=r[i]?1.05*r[i]:.001,r.fx=e(r),n[i+1]=r}return n})(t);for(let e=0;e<100;e++){l.sort(r);let e=l[l.length-1],t=D(l),n=s(t,e,2,-1);if(n.fx<l[0].fx){let r=s(t,e,3,-2);l=i(l,r.fx<n.fx?r:n)}else if(n.fx>=l[l.length-2].fx){let r;l=n.fx>e.fx?(r=s(t,e,.5,.5)).fx<e.fx?i(l,r):o(l):(r=s(t,e,1.5,-.5)).fx<n.fx?i(l,r):o(l)}else l=i(l,n)}return l[0]},processVennData:function(e,t){let r=v(e)?e:[],n=r.reduce(function(e,t){var r;return t.sets&&R(r=t)&&U(r)&&r.value>0&&-1===e.indexOf(t.sets[0])&&e.push(t.sets[0]),e},[]).sort(),i=r.reduce(function(e,r){return r.sets&&R(r)&&!r.sets.some(function(e){return -1===n.indexOf(e)})&&(e[r.sets.sort().join(t)]={sets:r.sets,value:r.value||0}),e},{});return n.reduce(function(e,r,n,i){return i.slice(n+1).forEach(function(n){e.push(r+t+n)}),e},[]).forEach(function(e){if(!i[e]){let r={sets:e.split(t),value:0};i[e]=r}}),Object.keys(i).map(function(e){return i[e]})},sortByTotalOverlap:q},{animObject:z}=f(),{parse:G}=h(),{getAreaOfIntersectionBetweenCircles:J,getCirclesIntersectionPolygon:K,isCircle1CompletelyOverlappingCircle2:Q,isPointInsideAllCircles:Z,isPointOutsideAllCircles:$}=w,{getCenterOfPoints:ee}=d,{scatter:et}=_().seriesTypes;class er extends et{static getLabelPosition(e,t){let r=e.reduce((r,n)=>{let 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((r,n)=>{let i=Y.getMarginFromCircles(n,e,t);return r.margin<i&&(r.point=n,r.margin=i),r},r)},{point:void 0,margin:-Number.MAX_VALUE}).point,n=Y.nelderMead(r=>-Y.getMarginFromCircles({x:r[0],y:r[1]},e,t),[r.x,r.y]);return Z(r={x:n[0],y:n[1]},e)&&$(r,t)||(r=e.length>1?ee(K(e)):{x:e[0].x,y:e[0].y}),r}static getLabelValues(e,t){let r=e.sets,n=t.reduce((e,t)=>{let n=r.indexOf(t.sets[0])>-1;return t.circle&&e[n?"internal":"external"].push(t.circle),e},{internal:[],external:[]});n.external=n.external.filter(e=>n.internal.some(t=>!Q(e,t)));let i=er.getLabelPosition(n.internal,n.external),o=Y.getLabelWidth(i,n.internal,n.external);return{position:i,width:o}}static layout(e){let t={},r={};if(e.length>0){let n=Y.layoutGreedyVenn(e),i=e.filter(Y.isSet);for(let o of e){let e=o.sets,s=e.join(),l=Y.isSet(o)?n[s]:J(e.map(e=>n[e]));l&&(t[s]=l,r[s]=er.getLabelValues(o,i))}}return{mapOfIdToShape:t,mapOfIdToLabelValues:r}}static getScale(e,t,r){let n=r.bottom-r.top,i=r.right-r.left,o=(r.right+r.left)/2,s=(r.top+r.bottom)/2,l=Math.min(i>0?1/i*e:1,n>0?1/n*t:1);return{scale:l,centerX:e/2-o*l,centerY:t/2-s*l}}static updateFieldBoundaries(e,t){let r=t.x-t.r,n=t.x+t.r,i=t.y+t.r,o=t.y-t.r;return(!b(e.left)||e.left>r)&&(e.left=r),(!b(e.right)||e.right<n)&&(e.right=n),(!b(e.top)||e.top>o)&&(e.top=o),(!b(e.bottom)||e.bottom<i)&&(e.bottom=i),e}animate(e){if(!e){let e=z(this.options.animation);for(let t of this.points){let r=t.shapeArgs;if(t.graphic&&r){let n={},i={};r.d?n.opacity=.001:(n.r=0,i.r=r.r),t.graphic.attr(n).animate(i,e),r.d&&setTimeout(()=>{t?.graphic?.animate({opacity:1})},e.duration)}}}}drawPoints(){let e=this.chart,t=this.group,r=this.points||[],n=e.renderer;for(let i of r){let r={zIndex:v(i.sets)?i.sets.length:0},o=i.shapeArgs;e.styledMode||x(r,this.pointAttribs(i,i.state)),j(i,{isNew:!i.graphic,animatableAttribs:o,attribs:r,group:t,renderer:n,shapeType:o?.d?"path":"circle"})}}init(){et.prototype.init.apply(this,arguments),delete this.opacity}pointAttribs(e,t){let r=this.options||{},n=e?.options||{},i=t&&r.states[t]||{},o=O(r,{color:e?.color},n,i);return{fill:G(o.color).brighten(o.brightness).get(),opacity:o.opacity,stroke:o.borderColor,"stroke-width":o.borderWidth,dashstyle:o.borderDashStyle}}translate(){let e=this.chart;this.dataTable.modified=this.dataTable,this.generatePoints();let t=Y.processVennData(this.options.data,er.splitter),{mapOfIdToShape:r,mapOfIdToLabelValues:n}=er.layout(t),i=Object.keys(r).filter(e=>{let t=r[e];return t&&b(t.r)}).reduce((e,t)=>er.updateFieldBoundaries(e,r[t]),{top:0,bottom:0,left:0,right:0}),o=er.getScale(e.plotWidth,e.plotHeight,i),s=o.scale,l=o.centerX,a=o.centerY;for(let e of this.points){let t=v(e.sets)?e.sets:[],i=t.join(),o=r[i],c=n[i]||{},u=e.options?.dataLabels,f,p=c.width,h=c.position;if(o){if(o.r)f={x:l+o.x*s,y:a+o.y*s,r:o.r*s};else if(o.d){let e=o.d;e.forEach(e=>{"M"===e[0]?(e[1]=l+e[1]*s,e[2]=a+e[2]*s):"A"===e[0]&&(e[1]=e[1]*s,e[2]=e[2]*s,e[6]=l+e[6]*s,e[7]=a+e[7]*s)}),f={d:e}}h?(h.x=l+h.x*s,h.y=a+h.y*s):h={},b(p)&&(p=Math.round(p*s))}e.shapeArgs=f,h&&f&&(e.plotX=h.x,e.plotY=h.y),p&&f&&(e.dlOptions=O(!0,{style:{width:p}},A(u,!0)?u:void 0,{zIndex:void 0})),e.name=e.options.name||t.join("∩")}}}er.splitter="highcharts-split",er.defaultOptions=O(et.defaultOptions,{borderColor:"#cccccc",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:"#333333"},select:{color:"#cccccc",borderColor:"#000000",animation:!1},inactive:{opacity:.075}},tooltip:{pointFormat:"{point.name}: {point.value}"},legendSymbol:"rectangle"}),x(er.prototype,{axisTypes:[],directTouch:!0,isCartesian:!1,pointArrayMap:["value"],pointClass:class extends L{isValid(){return b(this.value)}shouldDraw(){return!!this.shapeArgs}},utils:Y}),function(e,t,r,n={}){let i="function"==typeof e&&e.prototype||e;Object.hasOwnProperty.call(i,"hcEvents")||(i.hcEvents={});let o=i.hcEvents;f().Point&&e instanceof f().Point&&e.series&&e.series.chart&&(e.series.chart.runTrackerClick=!0);let s=e.addEventListener;s&&s.call(e,t,r,!!f().supportsPassiveEvents&&{passive:void 0===n.passive?-1!==t.indexOf("touch"):n.passive,capture:!1}),o[t]||(o[t]=[]);let l={fn:r,order:"number"==typeof n.order?n.order:1/0};o[t].push(l),o[t].sort((e,t)=>e.order-t.order)}(er,"afterSetOptions",function(e){let t=e.options.states||{};if(this.is("venn"))for(let e of Object.keys(t))t[e].halo=!1}),_().registerSeriesType("venn",er);let en=f();return c.default})());