/* Highcharts JS v9.0.1 (2021-02-15) (c) 2016-2021 Highsoft AS Authors: Jon Arild Nygard License: www.highcharts.com/license */ (function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/wordcloud",["highcharts"],function(l){a(l);a.Highcharts=l;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function l(a,d,k,w){a.hasOwnProperty(d)||(a[d]=w.apply(null,k))}a=a?a._modules:{};l(a,"Mixins/Polygon.js",[a["Core/Globals.js"],a["Core/Utilities.js"]],function(a,d){var k=d.find,w=d.isArray,m=d.isNumber,h=a.deg2rad, f=function(g,b){b=m(b)?b:14;b=Math.pow(10,b);return Math.round(g*b)/b},q=function(g,b){var c=b[0]-g[0];g=b[1]-g[1];return[[-g,c],[g,-c]]},t=function(g,b){g=g.map(function(c){return c[0]*b[0]+c[1]*b[1]});return{min:Math.min.apply(this,g),max:Math.max.apply(this,g)}},r=function(g,b){var c=g[0];g=g[1];var e=h*-b;b=Math.cos(e);e=Math.sin(e);return[f(c*b-g*e),f(c*e+g*b)]},B=function(g,b,c){g=r([g[0]-b[0],g[1]-b[1]],c);return[g[0]+b[0],g[1]+b[1]]},z=function(g){var b=g.axes;if(!w(b)){b=[];var c=c=g.concat([g[0]]); c.reduce(function(c,A){var e=q(c,A)[0];k(b,function(c){return c[0]===e[0]&&c[1]===e[1]})||b.push(e);return A});g.axes=b}return b},l=function(g,b){g=z(g);b=z(b);return g.concat(b)};return{getBoundingBoxFromPolygon:function(g){return g.reduce(function(b,c){var e=c[0];c=c[1];b.left=Math.min(e,b.left);b.right=Math.max(e,b.right);b.bottom=Math.max(c,b.bottom);b.top=Math.min(c,b.top);return b},{left:Number.MAX_VALUE,right:-Number.MAX_VALUE,bottom:-Number.MAX_VALUE,top:Number.MAX_VALUE})},getPolygon:function(g, b,c,e,A){var f=[g,b],C=g-c/2;g+=c/2;c=b-e/2;b+=e/2;return[[C,c],[g,c],[g,b],[C,b]].map(function(c){return B(c,f,-A)})},isPolygonsColliding:function(g,b){var c=l(g,b);return!k(c,function(c){var e=t(g,c);c=t(b,c);return!!(c.min>e.max||c.maxc.right||e.rightc.bottom||e.bottom=c&&("boolean"===typeof f&&e>=d-b&&(f={x:a-(d-e),y:-a}),d-=b,"boolean"===typeof f&&e>=d-b&&(f={x:-a,y:-a+(d-e)}),d-=b,"boolean"===typeof f&&(f=e>=d-b?{x:-a+(d-e),y:a}:{x:a,y:a-(d-e-b)}),f.x*=5,f.y*=5);return f}function b(c,e){var a=e.width/2,b=-(e.height/2),f=e.height/2;return!(-(e.width/2)c.right&&bc.bottom)}a.isRectanglesIntersecting=d;a.intersectsAnyWord=r;a.archimedeanSpiral=function(c,e){var a=e.field;e=!1;a=a.width*a.width+a.height*a.height;var b=.8*c;1E4>= c&&(e={x:b*Math.cos(b),y:b*Math.sin(b)},Math.min(Math.abs(e.x),Math.abs(e.y))a?c/a:1;c=a>c?a/c:1;return{width:b*e,height:b*c,ratioX:e,ratioY:c}};a.getRotation=function(c,a,b,d){var e=!1;f(c)&&f(a)&&f(b)&&f(d)&&0b&&(e=b+a%c*((d-b)/(c-1||1)));return e};a.getSpiral=function(c,a){var b,e=[];for(b=1;1E4>b;b++)e.push(c(b, a));return function(c){return 1E4>=c?e[c-1]:!1}};a.outsidePlayingField=b;a.intersectionTesting=function(c,a){var e=a.placed,d=a.field,f=a.rectangle,g=a.polygon,y=a.spiral,u=1,p={x:0,y:0},k=c.rect=m({},f);c.polygon=g;for(c.rotation=a.rotation;!1!==p&&(r(c,e)||b(k,d));)p=y(u),q(p)&&(k.left=f.left+p.x,k.right=f.right+p.x,k.top=f.top+p.y,k.bottom=f.bottom+p.y,c.polygon=l(p.x,p.y,g)),u++;return p};a.extendPlayingField=function(a,b){if(q(a)&&q(b)){var c=b.bottom-b.top;var e=b.right-b.left;b=a.ratioX;var f= a.ratioY;c=e*b>c*f?e:c;a=t(a,{width:a.width+c*b*2,height:a.height+c*f*2})}return a};a.updateFieldBoundaries=function(a,b){if(!f(a.left)||a.left>b.left)a.left=b.left;if(!f(a.right)||a.rightb.top)a.top=b.top;if(!f(a.bottom)||a.bottom\u25cf {series.name}: {point.weight}
'}});return n}(g);b(m.prototype,{animate:k.prototype.animate,animateDrilldown:t,animateDrillupFrom:t,pointClass:h,setClip:t,placementStrategy:{random:function(a,b){var c=b.field;b=b.rotation;return{x:f.getRandomPosition(c.width)-c.width/2,y:f.getRandomPosition(c.height)- c.height/2,rotation:f.getRotation(b.orientations,a.index,b.from,b.to)}},center:function(a,b){b=b.rotation;return{x:0,y:0,rotation:f.getRotation(b.orientations,a.index,b.from,b.to)}}},pointArrayMap:["weight"],spirals:{archimedean:f.archimedeanSpiral,rectangular:f.rectangularSpiral,square:f.squareSpiral},utils:{extendPlayingField:f.extendPlayingField,getRotation:f.getRotation,isPolygonsColliding:w,rotate2DToOrigin:z,rotate2DToPoint:d}});l.registerSeriesType("wordcloud",m);"";return m});l(a,"masters/modules/wordcloud.src.js", [],function(){})}); //# sourceMappingURL=wordcloud.js.map