text: !function(i){"object"==typeof module&&module.exports?module.exports=i.default=i:"function"==typeof define&&define.amd?define("highcharts/modules/wordcloud",["highcharts"],function(t){return i(t),i.Highcharts=t,i}):i("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){function i(t,i,o,n){t.hasOwnProperty(i)||(t[i]=n.apply(null,o))}i(t=t?t._modules:{},"mixins/draw-point.js",[],function(){return function(t){(t.attribs=t.attribs||{}).class=this.getClassName(),function(t){var i,o=this,n=o.graphic,e=t.animatableAttribs,r=t.onComplete,a=t.css,s=t.renderer;o.shouldDraw()?(n||(o.graphic=n=s[t.shapeType](t.shapeArgs).add(t.group)),n.css(a).attr(t.attribs).animate(e,!t.isNew&&void 0,r)):n&&(i=function(){o.graphic=n=n.destroy(),"function"==typeof r&&r()},Object.keys(e).length?n.animate(e,void 0,function(){i()}):i())}.call(this,t)}}),i(t,"mixins/polygon.js",[t["parts/Globals.js"],t["parts/Utilities.js"]],function(t,i){function e(t,i){return i=l(i)?i:14,i=Math.pow(10,i),Math.round(t*i)/i}function r(t,i){return t=t.map(function(t){return t[0]*i[0]+t[1]*i[1]}),{min:Math.min.apply(this,t),max:Math.max.apply(this,t)}}function n(t,i){var o=t[0];t=t[1];var n=h*-i;return i=Math.cos(n),n=Math.sin(n),[e(o*i-t*n),e(o*n+t*i)]}function s(t,i,o){return[(t=n([t[0]-i[0],t[1]-i[1]],o))[0]+i[0],t[1]+i[1]]}function a(t){var a=t.axes;return o(a)||(a=[],t.concat([t[0]]).reduce(function(t,i){var o,n,e,r=(o=t,e=(n=i)[0]-o[0],[-(o=n[1]-o[1]),e]);return u(a,function(t){return t[0]===r[0]&&t[1]===r[1]})||a.push(r),i}),t.axes=a),a}var o=i.isArray,l=i.isNumber,h=t.deg2rad,u=t.find;return{getBoundingBoxFromPolygon:function(t){return t.reduce(function(t,i){var o=i[0];return i=i[1],t.left=Math.min(o,t.left),t.right=Math.max(o,t.right),t.bottom=Math.max(i,t.bottom),t.top=Math.min(i,t.top),t},{left:Number.MAX_VALUE,right:-Number.MAX_VALUE,bottom:-Number.MAX_VALUE,top:Number.MAX_VALUE})},getPolygon:function(t,i,o,n,e){var r=[t,i],a=t-o/2;return t+=o/2,[[a,o=i-n/2],[t,o],[t,i+=n/2],[a,i]].map(function(t){return s(t,r,-e)})},isPolygonsColliding:function(o,n){var t,i,e=(i=n,t=a(t=o),i=a(i),t.concat(i));return!u(e,function(t){var i=r(o,t);return!!((t=r(n,t)).min>i.max||t.max<i.min)})},movePolygon:function(i,o,t){return t.map(function(t){return[t[0]+i,t[1]+o]})},rotate2DToOrigin:n,rotate2DToPoint:s}}),i(t,"modules/wordcloud.src.js",[t["parts/Globals.js"],t["parts/Utilities.js"],t["mixins/draw-point.js"],t["mixins/polygon.js"]],function(o,t,i,n){function g(o,t){function n(t){var i=t.rect;return(i=!(i.left>e.right||i.right<e.left||i.top>e.bottom||i.bottom<e.top))&&(o.rotation%90||t.rotation%90)&&(i=h(r,t.polygon)),i}var i=!1,e=o.rect,r=o.polygon,a=o.lastCollidedWith;return a&&((i=n(a))||delete o.lastCollidedWith),i=i||!!l(t,function(t){var i=n(t);return i&&(o.lastCollidedWith=t),i})}function e(t,i){i=4*t;var o=Math.ceil((Math.sqrt(i)-1)/2),n=2*o+1,e=Math.pow(n,2),r=!1;return--n,t<=1e4&&("boolean"==typeof r&&e-n<=i&&(r={x:o-(e-i),y:-o}),e-=n,"boolean"==typeof r&&e-n<=i&&(r={x:-o,y:e-i-o}),e-=n,"boolean"==typeof r&&(r=e-n<=i?{x:e-i-o,y:o}:{x:o,y:o-(e-i-n)}),r.x*=5,r.y*=5),r}function r(t,i,o,n){var e=!1;return F(t)&&F(i)&&F(o)&&F(n)&&0<t&&-1<i&&o<n&&(e=o+i%t*((n-o)/(t-1||1))),e}function M(t,i){var o,n,e,r,a,s=i.placed,l=i.field,h=i.rectangle,u=i.polygon,d=i.spiral,c=1,p={x:0,y:0},m=t.rect=P({},h);for(t.polygon=u,t.rotation=i.rotation;!1!==p&&(g(t,s)||(o=m,0,e=(n=l).width/2,r=-n.height/2,a=n.height/2,!(-n.width/2<o.left&&e>o.right&&r<o.top&&a>o.bottom)));)p=d(c),S(p)&&(m.left=h.left+p.x,m.right=h.right+p.x,m.top=h.top+p.y,m.bottom=h.bottom+p.y,t.polygon=f(p.x,p.y,u)),c++;return p}function A(t,i){var o,n,e;return S(t)&&S(i)&&(e=i.bottom-i.top,o=i.right-i.left,i=t.ratioX,e=e*(n=t.ratioY)<o*i?o:e,t=s(t,{width:t.width+e*i*2,height:t.height+e*n*2})),t}var P=t.extend,a=t.isArray,F=t.isNumber,S=t.isObject,s=o.merge;t=o.noop;var l=o.find,j=n.getBoundingBoxFromPolygon,T=n.getPolygon,h=n.isPolygonsColliding,f=n.movePolygon,u=o.Series;o.seriesType("wordcloud","column",{allowExtendPlayingField:!0,animation:{duration:500},borderWidth:0,clip:!1,colorByPoint:!0,minFontSize:1,maxFontSize:25,placementStrategy:"center",rotation:{from:0,orientations:2,to:90},showInLegend:!1,spiral:"rectangular",style:{fontFamily:"sans-serif",fontWeight:"900",whiteSpace:"nowrap"},tooltip:{followPointer:!0,pointFormat:'<span style="color:{point.color}">●</span> {series.name}: <b>{point.weight}</b><br/>'}},{animate:u.prototype.animate,animateDrilldown:t,animateDrillupFrom:t,setClip:t,bindAxes:function(){var t={endOnTick:!1,gridLineWidth:0,lineWidth:0,maxPadding:0,startOnTick:!1,title:null,tickPositions:[]};u.prototype.bindAxes.call(this),P(this.yAxis.options,t),P(this.xAxis.options,t)},pointAttribs:function(t,i){return delete(t=o.seriesTypes.column.prototype.pointAttribs.call(this,t,i)).stroke,delete t["stroke-width"],t},deriveFontSize:function(t,i,o){return t=F(t)?t:0,i=F(i)?i:1,o=F(o)?o:1,Math.floor(Math.max(o,t*i))},drawPoints:function(){var l=this,h=l.hasRendered,t=l.xAxis,i=l.yAxis,u=l.group,d=l.options,c=d.animation,p=d.allowExtendPlayingField,m=l.chart.renderer,o=m.text().add(u),g=[],f=l.placementStrategy[d.placementStrategy],x=d.rotation,n=l.points.map(function(t){return t.weight}),y=Math.max.apply(null,n),b=l.points.sort(function(t,i){return i.weight-t.weight});b.forEach(function(t){var i=l.deriveFontSize(1/y*t.weight,d.maxFontSize,d.minFontSize),i=P({fontSize:i+"px"},d.style);o.css(i).attr({x:0,y:0,text:t.name}),i=o.getBBox(!0),t.dimensions={height:i.height,width:i.width}});var e,r,a,s,w=function(t,i,o){o=o.reduce(function(t,i){i=i.dimensions;var o=Math.max(i.width,i.height);return t.maxHeight=Math.max(t.maxHeight,i.height),t.maxWidth=Math.max(t.maxWidth,i.width),t.area+=o*o,t},{maxHeight:0,maxWidth:0,area:0});var n=i<t?t/i:1;return{width:(o=Math.max(o.maxHeight,o.maxWidth,.85*Math.sqrt(o.area)))*n,height:o*(t=t<i?i/t:1),ratioX:n,ratioY:t}}(t.len,i.len,b),v=function(t,i){for(var o=[],n=1;n<1e4;n++)o.push(t(n,i));return function(t){return t<=1e4&&o[t-1]}}(l.spirals[d.spiral],{field:w});b.forEach(function(t){var i,o=l.deriveFontSize(1/y*t.weight,d.maxFontSize,d.minFontSize),o=P({fontSize:o+"px"},d.style),n=f(t,{data:b,field:w,placed:g,rotation:x}),e=P(l.pointAttribs(t,t.selected&&"select"),{align:"center","alignment-baseline":"middle",x:n.x,y:n.y,text:t.name,rotation:n.rotation}),r=T(n.x,n.y,t.dimensions.width,t.dimensions.height,n.rotation),a=j(r),s=M(t,{rectangle:a,polygon:r,field:w,placed:g,spiral:v,rotation:n.rotation});!s&&p&&(s=M(t,{rectangle:a,polygon:r,field:w=A(w,a),placed:g,spiral:v,rotation:n.rotation})),S(s)?(e.x+=s.x,e.y+=s.y,a.left+=s.x,a.right+=s.x,a.top+=s.y,a.bottom+=s.y,(!F((n=w).left)||n.left>a.left)&&(n.left=a.left),(!F(n.right)||n.right<a.right)&&(n.right=a.right),(!F(n.top)||n.top>a.top)&&(n.top=a.top),(!F(n.bottom)||n.bottom<a.bottom)&&(n.bottom=a.bottom),w=n,g.push(t),t.isNull=!1):t.isNull=!0,c&&(i={x:e.x,y:e.y},h?(delete e.x,delete e.y):(e.x=0,e.y=0)),t.draw({animatableAttribs:i,attribs:e,css:o,group:u,renderer:m,shapeArgs:void 0,shapeType:"text"})}),o=o.destroy(),e=t.len,r=i.len,a=w,s=2*Math.max(Math.abs(a.top),Math.abs(a.bottom)),a=2*Math.max(Math.abs(a.left),Math.abs(a.right)),t=Math.min(0<a?1/a*e:1,0<s?1/s*r:1),l.group.attr({scaleX:t,scaleY:t})},hasData:function(){return S(this)&&!0===this.visible&&a(this.points)&&0<this.points.length},placementStrategy:{random:function(t,i){var o=i.field;return i=i.rotation,{x:Math.round(o.width*(Math.random()+.5)/2)-o.width/2,y:Math.round(o.height*(Math.random()+.5)/2)-o.height/2,rotation:r(i.orientations,t.index,i.from,i.to)}},center:function(t,i){return{x:0,y:0,rotation:r((i=i.rotation).orientations,t.index,i.from,i.to)}}},pointArrayMap:["weight"],spirals:{archimedean:function(t,i){var o=i.field;i=!1,o=o.width*o.width+o.height*o.height;var n=.8*t;return t<=1e4&&(i={x:n*Math.cos(n),y:n*Math.sin(n)},Math.min(Math.abs(i.x),Math.abs(i.y))<o||(i=!1)),i},rectangular:function(t,i){return t=e(t,i),i=i.field,t&&(t.x*=i.ratioX,t.y*=i.ratioY),t},square:e},utils:{extendPlayingField:A,getRotation:r,isPolygonsColliding:h,rotate2DToOrigin:n.rotate2DToOrigin,rotate2DToPoint:n.rotate2DToPoint},getPlotBox:function(){var t=this.chart,i=this[(o=t.inverted)?"yAxis":"xAxis"],o=this[o?"xAxis":"yAxis"];return{translateX:(i?i.left:t.plotLeft)+(i?i.len:t.plotWidth)/2,translateY:(o?o.top:t.plotTop)+(o?o.len:t.plotHeight)/2,scaleX:1,scaleY:1}}},{draw:i,shouldDraw:function(){return!this.isNull},isValid:function(){return!0},weight:1})}),i(t,"masters/modules/wordcloud.src.js",[],function(){})});