8 lines
14 KiB
JavaScript
8 lines
14 KiB
JavaScript
|
!/**
|
||
|
* Highcharts JS v11.4.1 (2024-04-04)
|
||
|
*
|
||
|
* (c) 2017-2024 Highsoft AS
|
||
|
* Authors: Jon Arild Nygard
|
||
|
*
|
||
|
* 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/venn",["highcharts"],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 r(e,t,r,n){e.hasOwnProperty(t)||(e[t]=n.apply(null,r),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:t,module:e[t]}})))}r(t,"Core/Geometry/GeometryUtilities.js",[],function(){var e,t;return(t=e||(e={})).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}},t.getDistanceBetweenPoints=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},t.getAngleBetweenPoints=function(e,t){return Math.atan2(t.x-e.x,t.y-e.y)},e}),r(t,"Core/Geometry/CircleUtilities.js",[t["Core/Geometry/GeometryUtilities.js"]],function(e){var t;let{getAngleBetweenPoints:r,getCenterOfPoints:n,getDistanceBetweenPoints:i}=e;return function(e){function t(e,t){let r=Math.pow(10,t);return Math.round(e*r)/r}function s(e){if(e<=0)throw Error("radius of circle must be a positive number.");return Math.PI*e*e}function o(e,t){return e*e*Math.acos(1-t/e)-(e-t)*Math.sqrt(t*(2*e-t))}function l(e,r){let n=i(e,r),s=e.r,o=r.r,l=[];if(n<s+o&&n>Math.abs(s-o)){let i=s*s,a=(i-o*o+n*n)/(2*n),u=Math.sqrt(i-a*a),c=e.x,f=r.x,h=e.y,p=r.y,d=c+a*(f-c)/n,y=h+a*(p-h)/n,g=-(u/n*(p-h)),x=-(u/n*(f-c));l=[{x:t(d+g,14),y:t(y-x,14)},{x:t(d-g,14),y:t(y+x,14)}]}return l}function a(e){return e.reduce((e,t,r,n)=>{let i=n.slice(r+1).reduce((e,n,i)=>{let s=[r,i+r+1];return e.concat(l(t,n).map(e=>(e.indexes=s,e)))},[]);return e.concat(i)},[])}function u(e,t){return i(e,t)<=t.r+1e-10}function c(e,t){return!t.some(function(t){return!u(e,t)})}function f(e){return a(e).filter(function(t){return c(t,e)})}e.round=t,e.getAreaOfCircle=s,e.getCircularSegmentArea=o,e.getOverlapBetweenCircles=function(e,r,n){let i=0;if(n<e+r){if(n<=Math.abs(r-e))i=s(e<r?e:r);else{let t=(e*e-r*r+n*n)/(2*n);i=o(e,e-t)+o(r,r-(n-t))}i=t(i,14)}return i},e.getCircleCircleIntersection=l,e.getCirclesIntersectionPoints=a,e.isCircle1CompletelyOverlappingCircle2=function(e,t){return i(e,t)+t.r<e.r+1e-10},e.isPointInsideCircle=u,e.isPointInsideAllCircles=c,e.isPointOutsideAllCircles=function(e,t){return!t.some(function(t){return u(e,t)})},e.getCirclesIntersectionPolygon=f,e.getAreaOfIntersectionBetweenCircles=function(e){let t=f(e),s;if(t.length>1){let o=n(t),l=(t=t.map(function(e){return e.angle=r(o,e),e}).sort(function(e,t){return t.angle-e.angle}))[t.length-1],a=t.reduce(function(t,s){let{startPoint:o}=t,l=n([o,s]),a=s.indexes.filter(function(e){return o.indexes.indexOf(e)>-1}).reduce(function(t,n){let a=e[n],u=r(a,s),c=r(a,o),f=c-(c-u+(c<u?2*Math.PI:0))/2,h=i(l,{x:a.x+a.r*Math.sin(f),y:a.y+a.r*Math.cos(f)}),{r:p}=a;return h>2*p&&(h=2*p),(!t||t.width>h)&&(t={r:p,largeArc:h>p?1:0,width:h,x:s.x,y:s.y}),t},null);if(a){let{r:e}=a;t.arcs.push(["A",e,e,0,a.largeArc,1,a.x,a.y]),t.startPoint=s}return t},{startPoint:l,arcs:[]}).arcs;0===a.length||1===a.length||(a.unshift(["M",l.x,l.y]),s={center:o,d:a})}return s}}(t||(t={})),t}),r(t,"Series/DrawPointUtilities.js",[],function(){return{draw:function(e,t){let{animatableAttribs:r,onComplete:n,css:i,renderer:s}=t,o=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||(l="text"===t.shapeType?s.text():"image"===t.shapeType?s.image(t.imageUrl||"").attr(t.shapeArgs||{}):s[t.shapeType](t.shapeArgs||{}),e.graphic=l,l.add(t.group)),i&&l.css(i),l.attr(t.attribs).animate(r,!t.isNew&&o,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()}}}}),r(t,"Series/Venn/VennPoint.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t){let{scatter:{prototype:{pointClass:r}}}=e.seriesTypes,{isNumber:n}=t;return class extends r{isValid(){return n(thi
|