(self.webpackChunk=self.webpackChunk||[]).push([[56047],{56047:function(t,e,a){a(16896)},66607:function(t,e,a){var o=a(58347),r=a(3096);r.extendSeriesModel({type:"series.wordCloud",visualColorAccessPath:"textStyle.normal.color",optionUpdated:function(){var t=this.option;t.gridSize=Math.max(Math.floor(t.gridSize),4)},getInitialData:function(t,e){var a=o(["value"],t.data),n=new r.List(a,this);return n.initData(t.data),n},defaultOption:{maskImage:null,shape:"circle",left:"center",top:"center",width:"70%",height:"80%",sizeRange:[12,60],rotationRange:[-90,90],rotationStep:45,gridSize:8,drawOutOfBound:!1,textStyle:{normal:{fontWeight:"normal"}}}})},31041:function(t,e,a){var o=a(3096);o.extendChartView({type:"wordCloud",render:function(t,e,a){var r=this.group;r.removeAll();var n=t.getData(),i=t.get("gridSize");t.layoutInstance.ondraw=function(t,e,a,l){var s=n.getItemModel(a),d=s.getModel("textStyle.normal"),f=s.getModel("textStyle.emphasis"),u=new o.graphic.Text({style:o.graphic.setTextStyle({},d,{x:l.info.fillTextOffsetX,y:l.info.fillTextOffsetY+.5*e,text:t,textBaseline:"middle",textFill:n.getItemVisual(a,"color"),fontSize:e}),scale:[1/l.info.mu,1/l.info.mu],position:[(l.gx+l.info.gw/2)*i,(l.gy+l.info.gh/2)*i],rotation:l.rot});r.add(u),n.setItemGraphicEl(a,u),o.graphic.setHoverStyle(u,o.graphic.setTextStyle({},f,null,{forMerge:!0},!0))},this._model=t},remove:function(){this.group.removeAll(),this._model.layoutInstance.dispose()},dispose:function(){this._model.layoutInstance.dispose()}})},19131:function(t,e){"use strict";var a,o,r,n,i;window.setImmediate||(window.setImmediate=window.msSetImmediate||window.webkitSetImmediate||window.mozSetImmediate||window.oSetImmediate||function(){if(!window.postMessage||!window.addEventListener)return null;var t=[void 0],e="zero-timeout-message";return window.addEventListener("message",(function(a){if("string"==typeof a.data&&a.data.substr(0,e.length)===e){a.stopImmediatePropagation();var o=parseInt(a.data.substr(e.length),36);t[o]&&(t[o](),t[o]=void 0)}}),!0),window.clearImmediate=function(e){t[e]&&(t[e]=void 0)},function(a){var o=t.length;return t.push(a),window.postMessage(e+o.toString(36),"*"),o}}()||function(t){window.setTimeout(t,0)}),window.clearImmediate||(window.clearImmediate=window.msClearImmediate||window.webkitClearImmediate||window.mozClearImmediate||window.oClearImmediate||function(t){window.clearTimeout(t)}),o=function(){var t=document.createElement("canvas");if(!t||!t.getContext)return!1;var e=t.getContext("2d");return!!(e.getImageData&&e.fillText&&Array.prototype.some&&Array.prototype.push)}(),r=function(){if(o){for(var t,e,a=document.createElement("canvas").getContext("2d"),r=20;r;){if(a.font=r.toString(10)+"px sans-serif",a.measureText("W").width===t&&a.measureText("m").width===e)return r+1;t=a.measureText("W").width,e=a.measureText("m").width,r--}return 0}}(),n=function(t){for(var e,a,o=t.length;o;e=Math.floor(Math.random()*o),a=t[--o],t[o]=t[e],t[e]=a);return t},(i=function(t,e){if(o){Array.isArray(t)||(t=[t]),t.forEach((function(e,a){if("string"==typeof e){if(t[a]=document.getElementById(e),!t[a])throw"The element id specified is not found."}else if(!e.tagName&&!e.appendChild)throw"You must pass valid HTML elements, or ID of the element."}));var a={list:[],fontFamily:'"Trebuchet MS", "Heiti TC", "微軟正黑體", "Arial Unicode MS", "Droid Fallback Sans", sans-serif',fontWeight:"normal",color:"random-dark",minSize:0,weightFactor:1,clearCanvas:!0,backgroundColor:"#fff",gridSize:8,drawOutOfBound:!1,origin:null,drawMask:!1,maskColor:"rgba(255,0,0,0.3)",maskGapWidth:.3,wait:0,abortThreshold:0,abort:function(){},minRotation:-Math.PI/2,maxRotation:Math.PI/2,rotationStep:.1,shuffle:!0,rotateRatio:.1,shape:"circle",ellipticity:.65,classes:null,hover:null,click:null};if(e)for(var i in e)i in a&&(a[i]=e[i]);if("function"!=typeof a.weightFactor){var l=a.weightFactor;a.weightFactor=function(t){return t*l}}if("function"!=typeof a.shape)switch(a.shape){case"circle":default:a.shape="circle";break;case"cardioid":a.shape=function(t){return 1-Math.sin(t)};break;case"diamond":case"square":a.shape=function(t){var e=t%(2*Math.PI/4);return 1/(Math.cos(e)+Math.sin(e))};break;case"triangle-forward":a.shape=function(t){var e=t%(2*Math.PI/3);return 1/(Math.cos(e)+Math.sqrt(3)*Math.sin(e))};break;case"triangle":case"triangle-upright":a.shape=function(t){var e=(t+3*Math.PI/2)%(2*Math.PI/3);return 1/(Math.cos(e)+Math.sqrt(3)*Math.sin(e))};break;case"pentagon":a.shape=function(t){var e=(t+.955)%(2*Math.PI/5);return 1/(Math.cos(e)+.726543*Math.sin(e))};break;case"star":a.shape=function(t){var e=(t+.955)%(2*Math.PI/10);return(t+.955)%(2*Math.PI/5)-2*Math.PI/10>=0?1/(Math.cos(2*Math.PI/10-e)+3.07768*Math.sin(2*Math.PI/10-e)):1/(Math.cos(e)+3.07768*Math.sin(e))}}a.gridSize=Math.max(Math.floor(a.gridSize),4);var s,d,f,u,c,h,m,g=a.gridSize,v=g-a.maskGapWidth,w=Math.abs(a.maxRotation-a.minRotation),p=Math.min(a.maxRotation,a.minRotation),x=a.rotationStep;switch(a.color){case"random-dark":m=function(){return F(10,50)};break;case"random-light":m=function(){return F(50,90)};break;default:"function"==typeof a.color&&(m=a.color)}var M=null;"function"==typeof a.classes&&(M=a.classes);var y,I=!1,S=[],C=function(t){var e,a,o=t.currentTarget,r=o.getBoundingClientRect();t.touches?(e=t.touches[0].clientX,a=t.touches[0].clientY):(e=t.clientX,a=t.clientY);var n=e-r.left,i=a-r.top,l=Math.floor(n*(o.width/r.width||1)/g),s=Math.floor(i*(o.height/r.height||1)/g);return S[l][s]},b=function(t){var e=C(t);y!==e&&(y=e,e?a.hover(e.item,e.dimension,t):a.hover(void 0,void 0,t))},T=function(t){var e=C(t);e&&(a.click(e.item,e.dimension,t),t.preventDefault())},k=[],E=function(t){if(k[t])return k[t];var e=8*t,o=e,r=[];for(0===t&&r.push([u[0],u[1],0]);o--;){var n=1;"circle"!==a.shape&&(n=a.shape(o/e*2*Math.PI)),r.push([u[0]+t*n*Math.cos(-o/e*2*Math.PI),u[1]+t*n*Math.sin(-o/e*2*Math.PI)*a.ellipticity,o/e*2*Math.PI])}return k[t]=r,r},O=function(){return a.abortThreshold>0&&(new Date).getTime()-h>a.abortThreshold},R=function(e,a,o,r,n){e>=d||a>=f||e<0||a<0||(s[e][a]=!1,o&&t[0].getContext("2d").fillRect(e*g,a*g,v,v),I&&(S[e][a]={item:n,dimension:r}))},P=function(e){var o,i,l;Array.isArray(e)?(o=e[0],i=e[1]):(o=e.word,i=e.weight,l=e.attributes);var u=0===a.rotateRatio||Math.random()>a.rotateRatio?0:0===w?p:p+Math.round(Math.random()*w/x)*x,h=function(t,e,o){var n=a.weightFactor(e);if(n<=a.minSize)return!1;var i=1;nE[1]&&(E[1]=k),SE[2]&&(E[2]=S);break t}}return{mu:i,occupied:T,bounds:E,gw:x,gh:p,fillTextOffsetX:v,fillTextOffsetY:w,fillTextWidth:d,fillTextHeight:f,fontSize:n}}(o,i,u);if(!h)return!1;if(O())return!1;if(!a.drawOutOfBound){var v=h.bounds;if(v[1]-v[3]+1>d||v[2]-v[0]+1>f)return!1}for(var y=c+1,S=function(r){var n=Math.floor(r[0]-h.gw/2),v=Math.floor(r[1]-h.gh/2);return h.gw,h.gh,!!function(t,e,o,r,n){for(var i=n.length;i--;){var l=t+n[i][0],u=e+n[i][1];if(l>=d||u>=f||l<0||u<0){if(!a.drawOutOfBound)return!1}else if(!s[l][u])return!1}return!0}(n,v,0,0,h.occupied)&&(function(e,o,r,n,i,l,s,d,f){var u,c,h=r.fontSize;u=m?m(n,i,h,l,s):a.color,c=M?M(n,i,h,l,s):a.classes;var v=r.bounds;v[3],v[0],v[1],v[3],v[2],v[0],t.forEach((function(t){if(t.getContext){var i=t.getContext("2d"),l=r.mu;i.save(),i.scale(1/l,1/l),i.font=a.fontWeight+" "+(h*l).toString(10)+"px "+a.fontFamily,i.fillStyle=u,i.translate((e+r.gw/2)*g*l,(o+r.gh/2)*g*l),0!==d&&i.rotate(-d),i.textBaseline="middle",i.fillText(n,r.fillTextOffsetX*l,(r.fillTextOffsetY+.5*h)*l),i.restore()}else{var s=document.createElement("span"),m="";m="rotate("+-d/Math.PI*180+"deg) ",1!==r.mu&&(m+="translateX(-"+r.fillTextWidth/4+"px) scale("+1/r.mu+")");var v={position:"absolute",display:"block",font:a.fontWeight+" "+h*r.mu+"px "+a.fontFamily,left:(e+r.gw/2)*g+r.fillTextOffsetX+"px",top:(o+r.gh/2)*g+r.fillTextOffsetY+"px",width:r.fillTextWidth+"px",height:r.fillTextHeight+"px",lineHeight:h+"px",whiteSpace:"nowrap",transform:m,webkitTransform:m,msTransform:m,transformOrigin:"50% 40%",webkitTransformOrigin:"50% 40%",msTransformOrigin:"50% 40%"};for(var w in u&&(v.color=u),s.textContent=n,v)s.style[w]=v[w];if(f)for(var p in f)s.setAttribute(p,f[p]);c&&(s.className+=c),t.appendChild(s)}}))}(n,v,h,o,i,c-y,r[2],u,l),function(e,o,r,n,i,l){var s,u,c=i.occupied,h=a.drawMask;if(h&&((s=t[0].getContext("2d")).save(),s.fillStyle=a.maskColor),I){var m=i.bounds;u={x:(e+m[3])*g,y:(o+m[0])*g,w:(m[1]-m[3]+1)*g,h:(m[2]-m[0]+1)*g}}for(var v=c.length;v--;){var w=e+c[v][0],p=o+c[v][1];w>=d||p>=f||w<0||p<0||R(w,p,h,u,l)}h&&s.restore()}(n,v,0,0,h,e),{gx:n,gy:v,rot:u,info:h})};y--;){var C=E(c-y);a.shuffle&&(C=[].concat(C),n(C));for(var b=0;b=a.list.length)return m(E),z("wordcloudstop",!1),void C("wordcloudstart",k);h=(new Date).getTime();var e=P(a.list[i]),o=!z("wordclouddrawn",!0,{item:a.list[i],drawn:e});if(O()||o)return m(E),a.abort(),z("wordcloudabort",!1),z("wordcloudstop",!1),void C("wordcloudstart",k);i++,E=l(t,a.wait)}),a.wait)}}()}function F(t,e){return"hsl("+(360*Math.random()).toFixed()+","+(30*Math.random()+70).toFixed()+"%,"+(Math.random()*(e-t)+t).toFixed()+"%)"}}).isSupported=o,i.minFontSize=r,void 0===(a=function(){return i}.apply(e,[]))||(t.exports=a)},16896:function(t,e,a){var o=a(3096),r=a(7357);a(66607),a(31041);var n=a(19131);if(!n.isSupported)throw new Error("Sorry your browser not support wordCloud");o.registerLayout((function(t,e){t.eachSeriesByType("wordCloud",(function(a){var i=r.getLayoutRect(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),l=a.getData(),s=document.createElement("canvas");s.width=i.width,s.height=i.height;var d=s.getContext("2d"),f=a.get("maskImage");if(f)try{d.drawImage(f,0,0,s.width,s.height),function(t){for(var e=t.getContext("2d"),a=e.getImageData(0,0,t.width,t.height),o=e.createImageData(a),r=0,n=0,i=0;i128&&(r+=s=a.data[i]+a.data[i+1]+a.data[i+2],++n);var l=r/n;for(i=0;il?(o.data[i]=0,o.data[i+1]=0,o.data[i+2]=0,o.data[i+3]=0):(o.data[i]=255,o.data[i+1]=255,o.data[i+2]=255,o.data[i+3]=255)}e.putImageData(o,0,0)}(s)}catch(t){console.error("Invalid mask image"),console.error(t.toString())}var u=a.get("sizeRange"),c=a.get("rotationRange"),h=l.getDataExtent("value"),m=Math.PI/180,g=a.get("gridSize");function v(t){var e=t.detail.item;t.detail.drawn&&a.layoutInstance.ondraw&&(t.detail.drawn.gx+=i.x/g,t.detail.drawn.gy+=i.y/g,a.layoutInstance.ondraw(e[0],e[1],e[2],t.detail.drawn))}n(s,{list:l.mapArray("value",(function(t,e){var a=l.getItemModel(e);return[l.getName(e),a.get("textStyle.normal.textSize",!0)||o.number.linearMap(t,h,u),e]})).sort((function(t,e){return e[1]-t[1]})),fontFamily:a.get("textStyle.normal.fontFamily")||a.get("textStyle.emphasis.fontFamily")||t.get("textStyle.fontFamily"),fontWeight:a.get("textStyle.normal.fontWeight")||a.get("textStyle.emphasis.fontWeight")||t.get("textStyle.fontWeight"),gridSize:g,ellipticity:i.height/i.width,minRotation:c[0]*m,maxRotation:c[1]*m,clearCanvas:!f,rotateRatio:1,rotationStep:a.get("rotationStep")*m,drawOutOfBound:a.get("drawOutOfBound"),shuffle:!1,shape:a.get("shape")}),s.addEventListener("wordclouddrawn",v),a.layoutInstance&&a.layoutInstance.dispose(),a.layoutInstance={ondraw:null,dispose:function(){s.removeEventListener("wordclouddrawn",v),s.addEventListener("wordclouddrawn",(function(t){t.preventDefault()}))}}}))})),o.registerPreprocessor((function(t){var e=(t||{}).series;!o.util.isArray(e)&&(e=e?[e]:[]);var a=["shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function r(t){t&&o.util.each(a,(function(e){t.hasOwnProperty(e)&&(t["text"+o.format.capitalFirst(e)]=t[e])}))}o.util.each(e,(function(t){if(t&&"wordCloud"===t.type){var e=t.textStyle||{};r(e.normal),r(e.emphasis)}}))}))}}]);