|
|
(self.webpackChunk=self.webpackChunk||[]).push([[60720,56047],{77578:function(t,e,a){"use strict";a.d(e,{Z:function(){return n}});const n=t=>t?"function"==typeof t?t():t:null},39722:function(t,e,a){"use strict";a.d(e,{t5:function(){return u}});var n=a(92310),r=a.n(n),o=a(55477),i=a(59301),l=a(36355),s=a(77578),d=a(17356),c=function(t,e){var a={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(a[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(a[n[r]]=t[n[r]])}return a};const u=t=>{const{hashId:e,prefixCls:a,className:n,style:l,placement:d="top",title:c,content:u,children:f}=t;return i.createElement("div",{className:r()(e,a,`${a}-pure`,`${a}-placement-${d}`,n),style:l},i.createElement("div",{className:`${a}-arrow`}),i.createElement(o.G,Object.assign({},t,{className:e,prefixCls:a}),f||((t,e,a)=>{if(e||a)return i.createElement(i.Fragment,null,e&&i.createElement("div",{className:`${t}-title`},(0,s.Z)(e)),i.createElement("div",{className:`${t}-inner-content`},(0,s.Z)(a)))})(a,c,u)))};e.ZP=t=>{const{prefixCls:e}=t,a=c(t,["prefixCls"]),{getPrefixCls:n}=i.useContext(l.E_),r=n("popover",e),[o,s]=(0,d.Z)(r);return o(i.createElement(u,Object.assign({},a,{prefixCls:r,hashId:s})))}},60324:function(t,e,a){"use strict";var n=a(92310),r=a.n(n),o=a(59301),i=a(77578),l=a(62892),s=a(36355),d=a(6848),c=a(39722),u=a(17356),f=function(t,e){var a={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(a[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(a[n[r]]=t[n[r]])}return a};const h=t=>{let{title:e,content:a,prefixCls:n}=t;return o.createElement(o.Fragment,null,e&&o.createElement("div",{className:`${n}-title`},(0,i.Z)(e)),o.createElement("div",{className:`${n}-inner-content`},(0,i.Z)(a)))},m=o.forwardRef(((t,e)=>{const{prefixCls:a,title:n,content:i,overlayClassName:c,placement:m="top",trigger:g="hover",mouseEnterDelay:p=.1,mouseLeaveDelay:v=.1,overlayStyle:w={}}=t,x=f(t,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:y}=o.useContext(s.E_),b=y("popover",a),[M,S]=(0,u.Z)(b),C=y(),I=r()(c,S);return M(o.createElement(d.Z,Object.assign({placement:m,trigger:g,mouseEnterDelay:p,mouseLeaveDelay:v,overlayStyle:w},x,{prefixCls:b,overlayClassName:I,ref:e,overlay:n||i?o.createElement(h,{prefixCls:b,title:n,content:i}):null,transitionName:(0,l.m)(C,"zoom-big",x.transitionName),"data-popover-inject":!0})))}));m._InternalPanelDoNotUseOrYouWillBeFired=c.ZP,e.Z=m},17356:function(t,e,a){"use strict";var n=a(17313),r=a(29878),o=a(19447),i=a(33166),l=a(83116),s=a(37613);const d=t=>{const{componentCls:e,popoverColor:a,minWidth:r,fontWeightStrong:i,popoverPadding:l,boxShadowSecondary:s,colorTextHeading:d,borderRadiusLG:c,zIndexPopup:u,marginXS:f,colorBgElevated:h,popoverBg:m}=t;return[{[e]:Object.assign(Object.assign({},(0,n.Wf)(t)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:u,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":h,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${e}-content`]:{position:"relative"},[`${e}-inner`]:{backgroundColor:m,backgroundClip:"padding-box",borderRadius:c,boxShadow:s,padding:l},[`${e}-title`]:{minWidth:r,marginBottom:f,color:d,fontWeight:i},[`${e}-inner-content`]:{color:a}})},(0,o.ZP)(t,{colorBg:"var(--antd-arrow-background-color)"}),{[`${e}-pure`]:{position:"relative",maxWidth:"none",margin:t.sizePopupArrow,display:"inline-block",[`${e}-content`]:{display:"inline-block"}}}]},c=t=>{const{componentCls:e}=t;return{[e]:i.i.map((a=>{const n=t[`${a}6`];return{[`&${e}-${a}`]:{"--antd-arrow-background-color":n,[`${e}-inner`]:{backgroundColor:n},[`${e}-arrow`]:{background:"transparent"}}}}))}},u=t=>{const{componentCls:e,lineWidth:a,lineType:n,colorSplit:r,paddingSM:o,controlHeight:i,fontSize:l,lineHeight:s,padding:d}=t,c=i-Math.round(l*s);return{[e]:{[`${e}-inner`]:{padding:0},[`${e}-title`]:{margin:0,padding:`${c/2}px ${d}px ${c/2-a}px`,borderBottom:`${a}px ${n} ${r}`},[`${e}-inner-content`]:{padding:`${o}px ${d}px`}}}};e.Z=(0,l.Z)("Popover",(t=>{const{colorBgElevated:e,colorText:a,wireframe:n}=t,o=(0,s.TS)(t,{popoverPadding:12,popoverBg:e,popoverColor:a});return[d(o),c(o),n&&u(o),(0,r._y)(o,"zoom-big")]}),(t=>({width:177,minWidth:177,zIndexPopup:t.zIndexPopupBase+30})),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})},56047:function(t,e,a){a(16896)},66607:function(t,e,a){var n=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=n(["value"],t.data),o=new r.List(a,this);return o.initData(t.data),o},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 n=a(3096);n.extendChartView({type:"wordCloud",render:function(t,e,a){var r=this.group;r.removeAll();var o=t.getData(),i=t.get("gridSize");t.layoutInstance.ondraw=function(t,e,a,l){var s=o.getItemModel(a),d=s.getModel("textStyle.normal"),c=s.getModel("textStyle.emphasis"),u=new n.graphic.Text({style:n.graphic.setTextStyle({},d,{x:l.info.fillTextOffsetX,y:l.info.fillTextOffsetY+.5*e,text:t,textBaseline:"middle",textFill:o.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),o.setItemGraphicEl(a,u),n.graphic.setHoverStyle(u,n.graphic.setTextStyle({},c,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,n,r,o,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 n=parseInt(a.data.substr(e.length),36);t[n]&&(t[n](),t[n]=void 0)}}),!0),window.clearImmediate=function(e){t[e]&&(t[e]=void 0)},function(a){var n=t.length;return t.push(a),window.postMessage(e+n.toString(36),"*"),n}}()||function(t){window.setTimeout(t,0)}),window.clearImmediate||(window.clearImmediate=window.msClearImmediate||window.webkitClearImmediate||window.mozClearImmediate||window.oClearImmediate||function(t){window.clearTimeout(t)}),n=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(n){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}}(),o=function(t){for(var e,a,n=t.length;n;e=Math.floor(Math.random()*n),a=t[--n],t[n]=t[e],t[e]=a);return t},(i=function(t,e){if(n){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,c,u,f,h,m,g=a.gridSize,p=g-a.maskGapWidth,v=Math.abs(a.maxRotation-a.minRotation),w=Math.min(a.maxRotation,a.minRotation),x=a.rotationStep;switch(a.color){case"random-dark":m=function(){return R(10,50)};break;case"random-light":m=function(){return R(50,90)};break;default:"function"==typeof a.color&&(m=a.color)}var y=null;"function"==typeof a.classes&&(y=a.classes);var b,M=!1,S=[],C=function(t){var e,a,n=t.currentTarget,r=n.getBoundingClientRect();t.touches?(e=t.touches[0].clientX,a=t.touches[0].clientY):(e=t.clientX,a=t.clientY);var o=e-r.left,i=a-r.top,l=Math.floor(o*(n.width/r.width||1)/g),s=Math.floor(i*(n.height/r.height||1)/g);return S[l][s]},I=function(t){var e=C(t);b!==e&&(b=e,e?a.hover(e.item,e.dimension,t):a.hover(void 0,void 0,t))},E=function(t){var e=C(t);e&&(a.click(e.item,e.dimension,t),t.preventDefault())},k=[],O=function(t){if(k[t])return k[t];var e=8*t,n=e,r=[];for(0===t&&r.push([u[0],u[1],0]);n--;){var o=1;"circle"!==a.shape&&(o=a.shape(n/e*2*Math.PI)),r.push([u[0]+t*o*Math.cos(-n/e*2*Math.PI),u[1]+t*o*Math.sin(-n/e*2*Math.PI)*a.ellipticity,n/e*2*Math.PI])}return k[t]=r,r},T=function(){return a.abortThreshold>0&&(new Date).getTime()-h>a.abortThreshold},P=function(e,a,n,r,o){e>=d||a>=c||e<0||a<0||(s[e][a]=!1,n&&t[0].getContext("2d").fillRect(e*g,a*g,p,p),M&&(S[e][a]={item:o,dimension:r}))},z=function(e){var n,i,l;Array.isArray(e)?(n=e[0],i=e[1]):(n=e.word,i=e.weight,l=e.attributes);var u=0===a.rotateRatio||Math.random()>a.rotateRatio?0:0===v?w:w+Math.round(Math.random()*v/x)*x,h=function(t,e,n){var o=a.weightFactor(e);if(o<=a.minSize)return!1;var i=1;o<r&&(i=function(){for(var t=2;t*o<r;)t+=2;return t}());var l=document.createElement("canvas"),s=l.getContext("2d",{willReadFrequently:!0});s.font=a.fontWeight+" "+(o*i).toString(10)+"px "+a.fontFamily;var d=s.measureText(t).width/i,c=Math.max(o*i,s.measureText("m").width,s.measureText("W").width)/i,u=d+2*c,f=3*c,h=Math.ceil(u/g),m=Math.ceil(f/g);u=h*g,f=m*g;var p=-d/2,v=.4*-c,w=Math.ceil((u*Math.abs(Math.sin(n))+f*Math.abs(Math.cos(n)))/g),x=Math.ceil((u*Math.abs(Math.cos(n))+f*Math.abs(Math.sin(n)))/g),y=x*g,b=w*g;l.setAttribute("width",y),l.setAttribute("height",b),s.scale(1/i,1/i),s.translate(y*i/2,b*i/2),s.rotate(-n),s.font=a.fontWeight+" "+(o*i).toString(10)+"px "+a.fontFamily,s.fillStyle="#000",s.textBaseline="middle",s.fillText(t,p*i,(v+.5*o)*i);var M=s.getImageData(0,0,y,b).data;if(T())return!1;for(var S,C,I,E=[],k=x,O=[w/2,x/2,w/2,x/2];k--;)for(S=w;S--;){I=g;t:for(;I--;)for(C=g;C--;)if(M[4*((S*g+I)*y+(k*g+C))+3]){E.push([k,S]),k<O[3]&&(O[3]=k),k>O[1]&&(O[1]=k),S<O[0]&&(O[0]=S),S>O[2]&&(O[2]=S);break t}}return{mu:i,occupied:E,bounds:O,gw:x,gh:w,fillTextOffsetX:p,fillTextOffsetY:v,fillTextWidth:d,fillTextHeight:c,fontSize:o}}(n,i,u);if(!h)return!1;if(T())return!1;if(!a.drawOutOfBound){var p=h.bounds;if(p[1]-p[3]+1>d||p[2]-p[0]+1>c)return!1}for(var b=f+1,S=function(r){var o=Math.floor(r[0]-h.gw/2),p=Math.floor(r[1]-h.gh/2);return h.gw,h.gh,!!function(t,e,n,r,o){for(var i=o.length;i--;){var l=t+o[i][0],u=e+o[i][1];if(l>=d||u>=c||l<0||u<0){if(!a.drawOutOfBound)return!1}else if(!s[l][u])return!1}return!0}(o,p,0,0,h.occupied)&&(function(e,n,r,o,i,l,s,d,c){var u,f,h=r.fontSize;u=m?m(o,i,h,l,s):a.color,f=y?y(o,i,h,l,s):a.classes;var p=r.bounds;p[3],p[0],p[1],p[3],p[2],p[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,(n+r.gh/2)*g*l),0!==d&&i.rotate(-d),i.textBaseline="middle",i.fillText(o,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 p={position:"absolute",display:"block",font:a.fontWeight+" "+h*r.mu+"px "+a.fontFamily,left:(e+r.gw/2)*g+r.fillTextOffsetX+"px",top:(n+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 v in u&&(p.color=u),s.textContent=o,p)s.style[v]=p[v];if(c)for(var w in c)s.setAttribute(w,c[w]);f&&(s.className+=f),t.appendChild(s)}}))}(o,p,h,n,i,f-b,r[2],u,l),function(e,n,r,o,i,l){var s,u,f=i.occupied,h=a.drawMask;if(h&&((s=t[0].getContext("2d")).save(),s.fillStyle=a.maskColor),M){var m=i.bounds;u={x:(e+m[3])*g,y:(n+m[0])*g,w:(m[1]-m[3]+1)*g,h:(m[2]-m[0]+1)*g}}for(var p=f.length;p--;){var v=e+f[p][0],w=n+f[p][1];v>=d||w>=c||v<0||w<0||P(v,w,h,u,l)}h&&s.restore()}(o,p,0,0,h,e),{gx:o,gy:p,rot:u,info:h})};b--;){var C=O(f-b);a.shuffle&&(C=[].concat(C),o(C));for(var I=0;I<C.length;I++){var E=S(C[I]);if(E)return E}}return null},$=function(e,a,n){if(a)return!t.some((function(t){var r=document.createEvent("CustomEvent");return r.initCustomEvent(e,!0,a,n||{}),!t.dispatchEvent(r)}),this);t.forEach((function(t){var r=document.createEvent("CustomEvent");r.initCustomEvent(e,!0,a,n||{}),t.dispatchEvent(r)}),this)};!function(){var e=t[0];if(e.getContext)d=Math.ceil(e.width/g),c=Math.ceil(e.height/g);else{var n=e.getBoundingClientRect();d=Math.ceil(n.width/g),c=Math.ceil(n.height/g)}if($("wordcloudstart",!0)){var r,o,i,l,m;if(u=a.origin?[a.origin[0]/g,a.origin[1]/g]:[d/2,c/2],f=Math.floor(Math.sqrt(d*d+c*c)),s=[],!e.getContext||a.clearCanvas)for(t.forEach((function(t){if(t.getContext){var e=t.getContext("2d");e.fillStyle=a.backgroundColor,e.clearRect(0,0,d*(g+1),c*(g+1)),e.fillRect(0,0,d*(g+1),c*(g+1))}else t.textContent="",t.style.backgroundColor=a.backgroundColor,t.style.position="relative"})),r=d;r--;)for(s[r]=[],o=c;o--;)s[r][o]=!0;else{var p=document.createElement("canvas").getContext("2d");p.fillStyle=a.backgroundColor,p.fillRect(0,0,1,1);var v,w,x=p.getImageData(0,0,1,1).data,y=e.getContext("2d").getImageData(0,0,d*g,c*g).data;for(r=d;r--;)for(s[r]=[],o=c;o--;){w=g;t:for(;w--;)for(v=g;v--;)for(i=4;i--;)if(y[4*((o*g+w)*d*g+(r*g+v))+i]!==x[i]){s[r][o]=!1;break t}!1!==s[r][o]&&(s[r][o]=!0)}y=p=x=void 0}if(a.hover||a.click){for(M=!0,r=d+1;r--;)S[r]=[];a.hover&&e.addEventListener("mousemove",I),a.click&&(e.addEventListener("click",E),e.addEventListener("touchstart",E),e.addEventListener("touchend",(function(t){t.preventDefault()})),e.style.webkitTapHighlightColor="rgba(0, 0, 0, 0)"),e.addEventListener("wordcloudstart",(function t(){e.removeEventListener("wordcloudstart",t),e.removeEventListener("mousemove",I),e.removeEventListener("click",E),b=void 0}))}i=0,0!==a.wait?(l=window.setTimeout,m=window.clearTimeout):(l=window.setImmediate,m=window.clearImmediate);var C=function(e,a){t.forEach((function(t){t.removeEventListener(e,a)}),this)},k=function t(){C("wordcloudstart",t),m(O)};!function(e,a){t.forEach((function(t){t.addEventListener(e,a)}),this)}("wordcloudstart",k);var O=l((function t(){if(i>=a.list.length)return m(O),$("wordcloudstop",!1),void C("wordcloudstart",k);h=(new Date).getTime();var e=z(a.list[i]),n=!$("wordclouddrawn",!0,{item:a.list[i],drawn:e});if(T()||n)return m(O),a.abort(),$("wordcloudabort",!1),$("wordcloudstop",!1),void C("wordcloudstart",k);i++,O=l(t,a.wait)}),a.wait)}}()}function R(t,e){return"hsl("+(360*Math.random()).toFixed()+","+(30*Math.random()+70).toFixed()+"%,"+(Math.random()*(e-t)+t).toFixed()+"%)"}}).isSupported=n,i.minFontSize=r,void 0===(a=function(){return i}.apply(e,[]))||(t.exports=a)},16896:function(t,e,a){var n=a(3096),r=a(7357);a(66607),a(31041);var o=a(19131);if(!o.isSupported)throw new Error("Sorry your browser not support wordCloud");n.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"),c=a.get("maskImage");if(c)try{d.drawImage(c,0,0,s.width,s.height),function(t){for(var e=t.getContext("2d"),a=e.getImageData(0,0,t.width,t.height),n=e.createImageData(a),r=0,o=0,i=0;i<a.data.length;i+=4)a.data[i+3]>128&&(r+=s=a.data[i]+a.data[i+1]+a.data[i+2],++o);var l=r/o;for(i=0;i<a.data.length;i+=4){var s=a.data[i]+a.data[i+1]+a.data[i+2];a.data[i+3]<128||s>l?(n.data[i]=0,n.data[i+1]=0,n.data[i+2]=0,n.data[i+3]=0):(n.data[i]=255,n.data[i+1]=255,n.data[i+2]=255,n.data[i+3]=255)}e.putImageData(n,0,0)}(s)}catch(t){console.error("Invalid mask image"),console.error(t.toString())}var u=a.get("sizeRange"),f=a.get("rotationRange"),h=l.getDataExtent("value"),m=Math.PI/180,g=a.get("gridSize");function p(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))}o(s,{list:l.mapArray("value",(function(t,e){var a=l.getItemModel(e);return[l.getName(e),a.get("textStyle.normal.textSize",!0)||n.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:f[0]*m,maxRotation:f[1]*m,clearCanvas:!c,rotateRatio:1,rotationStep:a.get("rotationStep")*m,drawOutOfBound:a.get("drawOutOfBound"),shuffle:!1,shape:a.get("shape")}),s.addEventListener("wordclouddrawn",p),a.layoutInstance&&a.layoutInstance.dispose(),a.layoutInstance={ondraw:null,dispose:function(){s.removeEventListener("wordclouddrawn",p),s.addEventListener("wordclouddrawn",(function(t){t.preventDefault()}))}}}))})),n.registerPreprocessor((function(t){var e=(t||{}).series;!n.util.isArray(e)&&(e=e?[e]:[]);var a=["shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function r(t){t&&n.util.each(a,(function(e){t.hasOwnProperty(e)&&(t["text"+n.format.capitalFirst(e)]=t[e])}))}n.util.each(e,(function(t){if(t&&"wordCloud"===t.type){var e=t.textStyle||{};r(e.normal),r(e.emphasis)}}))}))}}]); |