chunk-vendors-b16c2dec.97e5bd12.js 15 KB

12
  1. (self["webpackChunkapp"]=self["webpackChunkapp"]||[]).push([[9878],{44553:function(e,t,a){var n=a(70492);a(55269),a(39107),a(89562);var i=a(60548),r=a(34586),o=a(19918),s=a(86733),l=a(41241),c=a(36846),u=a(6921),g=a(53081);n.registerProcessor(i),n.registerVisual(r("graph","circle",null)),n.registerVisual(o),n.registerVisual(s),n.registerLayout(l),n.registerLayout(n.PRIORITY.VISUAL.POST_CHART_LAYOUT,c),n.registerLayout(u),n.registerCoordinateSystem("graphView",{create:g})},60548:function(e){function t(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.eachSeriesByType("graph",(function(e){var a=e.getCategoriesData(),n=e.getGraph(),i=n.data,r=a.mapArray(a.getName);i.filterSelf((function(e){var a=i.getItemModel(e),n=a.getShallow("category");if(null!=n){"number"===typeof n&&(n=r[n]);for(var o=0;o<t.length;o++)if(!t[o].isSelected(n))return!1}return!0}))}),this)}e.exports=t},19918:function(e){function t(e){var t={};e.eachSeriesByType("graph",(function(e){var a=e.getCategoriesData(),n=e.getData(),i={};a.each((function(n){var r=a.getName(n);i["ec-"+r]=n;var o=a.getItemModel(n),s=o.get("itemStyle.color")||e.getColorFromPalette(r,t);a.setItemVisual(n,"color",s);for(var l=["opacity","symbol","symbolSize","symbolKeepAspect"],c=0;c<l.length;c++){var u=o.getShallow(l[c],!0);null!=u&&a.setItemVisual(n,l[c],u)}})),a.count()&&n.each((function(e){var t=n.getItemModel(e),r=t.getShallow("category");if(null!=r){"string"===typeof r&&(r=i["ec-"+r]);for(var o=["color","opacity","symbol","symbolSize","symbolKeepAspect"],s=0;s<o.length;s++)null==n.getItemVisual(e,o[s],!0)&&n.setItemVisual(e,o[s],a.getItemVisual(r,o[s]))}}))}))}e.exports=t},36846:function(e,t,a){var n=a(22663),i=n.circularLayout;function r(e){e.eachSeriesByType("graph",(function(e){"circular"===e.get("layout")&&i(e,"symbolSize")}))}e.exports=r},22663:function(e,t,a){var n=a(45280),i=a(47181),r=i.getSymbolSize,o=i.getNodeGlobalScale,s=Math.PI,l=[];function c(e,t){var a=e.coordinateSystem;if(!a||"view"===a.type){var i=a.getBoundingRect(),r=e.getData(),o=r.graph,s=i.width/2+i.x,l=i.height/2+i.y,c=Math.min(i.width,i.height)/2,g=r.count();r.setLayout({cx:s,cy:l}),g&&(u[t](e,a,o,r,c,s,l,g),o.eachEdge((function(e){var t,a=e.getModel().get("lineStyle.curveness")||0,i=n.clone(e.node1.getLayout()),r=n.clone(e.node2.getLayout()),o=(i[0]+r[0])/2,c=(i[1]+r[1])/2;+a&&(a*=3,t=[s*a+o*(1-a),l*a+c*(1-a)]),e.setLayout([i,r,t])})))}}var u={value:function(e,t,a,n,i,r,o,s){var l=0,c=n.getSum("value"),u=2*Math.PI/(c||s);a.eachNode((function(e){var t=e.getValue("value"),a=u*(c?t:1)/2;l+=a,e.setLayout([i*Math.cos(l)+r,i*Math.sin(l)+o]),l+=a}))},symbolSize:function(e,t,a,n,i,c,u,g){var p=0;l.length=g;var d=o(e);a.eachNode((function(e){var t=r(e);isNaN(t)&&(t=2),t<0&&(t=0),t*=d;var a=Math.asin(t/2/i);isNaN(a)&&(a=s/2),l[e.dataIndex]=a,p+=2*a}));var h=(2*s-p)/g/2,y=0;a.eachNode((function(e){var t=h+l[e.dataIndex];y+=t,e.setLayout([i*Math.cos(y)+c,i*Math.sin(y)+u]),y+=t}))}};t.circularLayout=c},53081:function(e,t,a){var n=a(23845),i=a(76172),r=i.getLayoutRect,o=a(3726);function s(e,t,a){var n=e.getBoxLayoutParams();return n.aspect=a,r(n,{width:t.getWidth(),height:t.getHeight()})}function l(e,t){var a=[];return e.eachSeriesByType("graph",(function(e){var i=e.get("coordinateSystem");if(!i||"view"===i){var r=e.getData(),l=r.mapArray((function(e){var t=r.getItemModel(e);return[+t.get("x"),+t.get("y")]})),c=[],u=[];o.fromPoints(l,c,u),u[0]-c[0]===0&&(u[0]+=1,c[0]-=1),u[1]-c[1]===0&&(u[1]+=1,c[1]-=1);var g=(u[0]-c[0])/(u[1]-c[1]),p=s(e,t,g);isNaN(g)&&(c=[p.x,p.y],u=[p.x+p.width,p.y+p.height]);var d=u[0]-c[0],h=u[1]-c[1],y=p.width,f=p.height,m=e.coordinateSystem=new n;m.zoomLimit=e.get("scaleLimit"),m.setBoundingRect(c[0],c[1],d,h),m.setViewRect(p.x,p.y,y,f),m.setCenter(e.get("center")),m.setZoom(e.get("zoom")),a.push(m)}})),a}e.exports=l},86733:function(e){function t(e){return e instanceof Array||(e=[e,e]),e}function a(e){e.eachSeriesByType("graph",(function(e){var a=e.getGraph(),n=e.getEdgeData(),i=t(e.get("edgeSymbol")),r=t(e.get("edgeSymbolSize")),o="lineStyle.color".split("."),s="lineStyle.opacity".split(".");n.setVisual("fromSymbol",i&&i[0]),n.setVisual("toSymbol",i&&i[1]),n.setVisual("fromSymbolSize",r&&r[0]),n.setVisual("toSymbolSize",r&&r[1]),n.setVisual("color",e.get(o)),n.setVisual("opacity",e.get(s)),n.each((function(e){var i=n.getItemModel(e),r=a.getEdgeByIndex(e),l=t(i.getShallow("symbol",!0)),c=t(i.getShallow("symbolSize",!0)),u=i.get(o),g=i.get(s);switch(u){case"source":u=r.node1.getVisual("color");break;case"target":u=r.node2.getVisual("color");break}l[0]&&r.setVisual("fromSymbol",l[0]),l[1]&&r.setVisual("toSymbol",l[1]),c[0]&&r.setVisual("fromSymbolSize",c[0]),c[1]&&r.setVisual("toSymbolSize",c[1]),r.setVisual("color",u),r.setVisual("opacity",g)}))}))}e.exports=a},33586:function(e,t,a){var n=a(45280),i=n.scaleAndAdd;function r(e,t,a){for(var r=a.rect,o=r.width,s=r.height,l=[r.x+o/2,r.y+s/2],c=null==a.gravity?.1:a.gravity,u=0;u<e.length;u++){var g=e[u];g.p||(g.p=n.create(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),g.pp=n.clone(g.p),g.edges=null}var p=null==a.friction?.6:a.friction,d=p;return{warmUp:function(){d=.8*p},setFixed:function(t){e[t].fixed=!0},setUnfixed:function(t){e[t].fixed=!1},step:function(a){for(var r=[],o=e.length,s=0;s<t.length;s++){var u=t[s];if(!u.ignoreForceLayout){var g=u.n1,p=u.n2;n.sub(r,p.p,g.p);var h=n.len(r)-u.d,y=p.w/(g.w+p.w);isNaN(y)&&(y=0),n.normalize(r,r),!g.fixed&&i(g.p,g.p,r,y*h*d),!p.fixed&&i(p.p,p.p,r,-(1-y)*h*d)}}for(s=0;s<o;s++){var f=e[s];f.fixed||(n.sub(r,l,f.p),i(f.p,f.p,r,c*d))}for(s=0;s<o;s++){g=e[s];for(var m=s+1;m<o;m++){p=e[m];n.sub(r,p.p,g.p);h=n.len(r);0===h&&(n.set(r,Math.random()-.5,Math.random()-.5),h=1);var v=(g.rep+p.rep)/h/h;!g.fixed&&i(g.pp,g.pp,r,v),!p.fixed&&i(p.pp,p.pp,r,-v)}}var S=[];for(s=0;s<o;s++){f=e[s];f.fixed||(n.sub(S,f.p,f.pp),i(f.p,f.p,S,d),n.copy(f.pp,f.p))}d*=.992,a&&a(e,t,d<.01)}}}t.forceLayout=r},6921:function(e,t,a){var n=a(33586),i=n.forceLayout,r=a(74107),o=r.simpleLayout,s=a(22663),l=s.circularLayout,c=a(85669),u=c.linearMap,g=a(45280),p=a(33051);function d(e){e.eachSeriesByType("graph",(function(e){var t=e.coordinateSystem;if(!t||"view"===t.type)if("force"===e.get("layout")){var a=e.preservedPoints||{},n=e.getGraph(),r=n.data,s=n.edgeData,c=e.getModel("force"),d=c.get("initLayout");e.preservedPoints?r.each((function(e){var t=r.getId(e);r.setItemLayout(e,a[t]||[NaN,NaN])})):d&&"none"!==d?"circular"===d&&l(e,"value"):o(e);var h=r.getDataExtent("value"),y=s.getDataExtent("value"),f=c.get("repulsion"),m=c.get("edgeLength");p.isArray(f)||(f=[f,f]),p.isArray(m)||(m=[m,m]),m=[m[1],m[0]];var v=r.mapArray("value",(function(e,t){var a=r.getItemLayout(t),n=u(e,h,f);return isNaN(n)&&(n=(f[0]+f[1])/2),{w:n,rep:n,fixed:r.getItemModel(t).get("fixed"),p:!a||isNaN(a[0])||isNaN(a[1])?null:a}})),S=s.mapArray("value",(function(e,t){var a=n.getEdgeByIndex(t),i=u(e,y,m);isNaN(i)&&(i=(m[0]+m[1])/2);var r=a.getModel();return{n1:v[a.node1.dataIndex],n2:v[a.node2.dataIndex],d:i,curveness:r.get("lineStyle.curveness")||0,ignoreForceLayout:r.get("ignoreForceLayout")}})),x=(t=e.coordinateSystem,t.getBoundingRect()),b=i(v,S,{rect:x,gravity:c.get("gravity"),friction:c.get("friction")}),I=b.step;b.step=function(e){for(var t=0,i=v.length;t<i;t++)v[t].fixed&&g.copy(v[t].p,n.getNodeByIndex(t).getLayout());I((function(t,i,o){for(var s=0,l=t.length;s<l;s++)t[s].fixed||n.getNodeByIndex(s).setLayout(t[s].p),a[r.getId(s)]=t[s].p;for(s=0,l=i.length;s<l;s++){var c=i[s],u=n.getEdgeByIndex(s),p=c.n1.p,d=c.n2.p,h=u.getLayout();h=h?h.slice():[],h[0]=h[0]||[],h[1]=h[1]||[],g.copy(h[0],p),g.copy(h[1],d),+c.curveness&&(h[2]=[(p[0]+d[0])/2-(p[1]-d[1])*c.curveness,(p[1]+d[1])/2-(d[0]-p[0])*c.curveness]),u.setLayout(h)}e&&e(o)}))},e.forceLayout=b,e.preservedPoints=a,b.step()}else e.forceLayout=null}))}e.exports=d},89562:function(e,t,a){var n=a(70492),i=a(60553),r=i.updateCenterAndZoom;a(35540);var o={type:"graphRoam",event:"graphRoam",update:"none"};n.registerAction(o,(function(e,t){t.eachComponent({mainType:"series",query:e},(function(t){var a=t.coordinateSystem,n=r(a,e);t.setCenter&&t.setCenter(n.center),t.setZoom&&t.setZoom(n.zoom)}))}))},47181:function(e,t){function a(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var a=e.option.nodeScaleRatio,n=t.scale,i=n&&n[0]||1,r=t.getZoom(),o=(r-1)*a+1;return o/i}function n(e){var t=e.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}t.getNodeGlobalScale=a,t.getSymbolSize=n},41241:function(e,t,a){var n=a(33051),i=n.each,r=a(74107),o=r.simpleLayout,s=r.simpleLayoutEdge;function l(e,t){e.eachSeriesByType("graph",(function(e){var t=e.get("layout"),a=e.coordinateSystem;if(a&&"view"!==a.type){var n=e.getData(),r=[];i(a.dimensions,(function(e){r=r.concat(n.mapDimension(e,!0))}));for(var l=0;l<n.count();l++){for(var c=[],u=!1,g=0;g<r.length;g++){var p=n.get(r[g],l);isNaN(p)||(u=!0),c.push(p)}u?n.setItemLayout(l,a.dataToPoint(c)):n.setItemLayout(l,[NaN,NaN])}s(n.graph)}else t&&"none"!==t||o(e)}))}e.exports=l},74107:function(e,t,a){var n=a(45280);function i(e){var t=e.coordinateSystem;if(!t||"view"===t.type){var a=e.getGraph();a.eachNode((function(e){var t=e.getModel();e.setLayout([+t.get("x"),+t.get("y")])})),r(a)}}function r(e){e.eachEdge((function(e){var t=e.getModel().get("lineStyle.curveness")||0,a=n.clone(e.node1.getLayout()),i=n.clone(e.node2.getLayout()),r=[a,i];+t&&r.push([(a[0]+i[0])/2-(a[1]-i[1])*t,(a[1]+i[1])/2-(i[0]-a[0])*t]),e.setLayout(r)}))}t.simpleLayout=i,t.simpleLayoutEdge=r},40055:function(e,t,a){a(72404),a(55883)},93189:function(e,t,a){var n=a(33051),i=256;function r(){var e=n.createCanvas();this.canvas=e,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}r.prototype={update:function(e,t,a,n,r,o){var s=this._getBrush(),l=this._getGradient(e,r,"inRange"),c=this._getGradient(e,r,"outOfRange"),u=this.pointSize+this.blurSize,g=this.canvas,p=g.getContext("2d"),d=e.length;g.width=t,g.height=a;for(var h=0;h<d;++h){var y=e[h],f=y[0],m=y[1],v=y[2],S=n(v);p.globalAlpha=S,p.drawImage(s,f-u,m-u)}if(!g.width||!g.height)return g;var x=p.getImageData(0,0,g.width,g.height),b=x.data,I=0,L=b.length,M=this.minOpacity,w=this.maxOpacity,N=w-M;while(I<L){S=b[I+3]/256;var V=4*Math.floor(S*(i-1));if(S>0){var z=o(S)?l:c;S>0&&(S=S*N+M),b[I++]=z[V],b[I++]=z[V+1],b[I++]=z[V+2],b[I++]=z[V+3]*S*256}else I+=4}return p.putImageData(x,0,0),g},_getBrush:function(){var e=this._brushCanvas||(this._brushCanvas=n.createCanvas()),t=this.pointSize+this.blurSize,a=2*t;e.width=a,e.height=a;var i=e.getContext("2d");return i.clearRect(0,0,a,a),i.shadowOffsetX=a,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-t,t,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),e},_getGradient:function(e,t,a){for(var n=this._gradientPixels,i=n[a]||(n[a]=new Uint8ClampedArray(1024)),r=[0,0,0,0],o=0,s=0;s<256;s++)t[a](s/255,!0,r),i[o++]=r[0],i[o++]=r[1],i[o++]=r[2],i[o++]=r[3];return i}};var o=r;e.exports=o},72404:function(e,t,a){var n=a(93321),i=a(40488),r=a(95899),o=n.extend({type:"series.heatmap",getInitialData:function(e,t){return i(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var e=r.get(this.get("coordinateSystem"));if(e&&e.dimensions)return"lng"===e.dimensions[0]&&"lat"===e.dimensions[1]},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}});e.exports=o},55883:function(e,t,a){var n=a(38175),i=(n.__DEV__,a(70492)),r=a(51177),o=a(93189),s=a(33051);function l(e,t,a){var n=e[1]-e[0];t=s.map(t,(function(t){return{interval:[(t.interval[0]-e[0])/n,(t.interval[1]-e[0])/n]}}));var i=t.length,r=0;return function(e){for(var n=r;n<i;n++){var o=t[n].interval;if(o[0]<=e&&e<=o[1]){r=n;break}}if(n===i)for(n=r-1;n>=0;n--){o=t[n].interval;if(o[0]<=e&&e<=o[1]){r=n;break}}return n>=0&&n<i&&a[n]}}function c(e,t){var a=e[1]-e[0];return t=[(t[0]-e[0])/a,(t[1]-e[0])/a],function(e){return e>=t[0]&&e<=t[1]}}function u(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}var g=i.extendChartView({type:"heatmap",render:function(e,t,a){var n;t.eachComponent("visualMap",(function(t){t.eachTargetSeries((function(a){a===e&&(n=t)}))})),this.group.removeAll(),this._incrementalDisplayable=null;var i=e.coordinateSystem;"cartesian2d"===i.type||"calendar"===i.type?this._renderOnCartesianAndCalendar(e,a,0,e.getData().count()):u(i)&&this._renderOnGeo(i,e,n,a)},incrementalPrepareRender:function(e,t,a){this.group.removeAll()},incrementalRender:function(e,t,a,n){var i=t.coordinateSystem;i&&this._renderOnCartesianAndCalendar(t,n,e.start,e.end,!0)},_renderOnCartesianAndCalendar:function(e,t,a,n,i){var o,l,c=e.coordinateSystem;if("cartesian2d"===c.type){var u=c.getAxis("x"),g=c.getAxis("y");o=u.getBandWidth(),l=g.getBandWidth()}for(var p=this.group,d=e.getData(),h="itemStyle",y="emphasis.itemStyle",f="label",m="emphasis.label",v=e.getModel(h).getItemStyle(["color"]),S=e.getModel(y).getItemStyle(),x=e.getModel(f),b=e.getModel(m),I=c.type,L="cartesian2d"===I?[d.mapDimension("x"),d.mapDimension("y"),d.mapDimension("value")]:[d.mapDimension("time"),d.mapDimension("value")],M=a;M<n;M++){var w;if("cartesian2d"===I){if(isNaN(d.get(L[2],M)))continue;var N=c.dataToPoint([d.get(L[0],M),d.get(L[1],M)]);w=new r.Rect({shape:{x:Math.floor(Math.round(N[0])-o/2),y:Math.floor(Math.round(N[1])-l/2),width:Math.ceil(o),height:Math.ceil(l)},style:{fill:d.getItemVisual(M,"color"),opacity:d.getItemVisual(M,"opacity")}})}else{if(isNaN(d.get(L[1],M)))continue;w=new r.Rect({z2:1,shape:c.dataToRect([d.get(L[0],M)]).contentShape,style:{fill:d.getItemVisual(M,"color"),opacity:d.getItemVisual(M,"opacity")}})}var V=d.getItemModel(M);d.hasItemOption&&(v=V.getModel(h).getItemStyle(["color"]),S=V.getModel(y).getItemStyle(),x=V.getModel(f),b=V.getModel(m));var z=e.getRawValue(M),C="-";z&&null!=z[2]&&(C=z[2]),r.setLabelStyle(v,S,x,b,{labelFetcher:e,labelDataIndex:M,defaultText:C,isRectText:!0}),w.setStyle(v),r.setHoverStyle(w,d.hasItemOption?S:s.extend({},S)),w.incremental=i,i&&(w.useHoverLayer=!0),p.add(w),d.setItemGraphicEl(M,w)}},_renderOnGeo:function(e,t,a,n){var i=a.targetVisuals.inRange,s=a.targetVisuals.outOfRange,u=t.getData(),g=this._hmLayer||this._hmLayer||new o;g.blurSize=t.get("blurSize"),g.pointSize=t.get("pointSize"),g.minOpacity=t.get("minOpacity"),g.maxOpacity=t.get("maxOpacity");var p=e.getViewRect().clone(),d=e.getRoamTransform();p.applyTransform(d);var h=Math.max(p.x,0),y=Math.max(p.y,0),f=Math.min(p.width+p.x,n.getWidth()),m=Math.min(p.height+p.y,n.getHeight()),v=f-h,S=m-y,x=[u.mapDimension("lng"),u.mapDimension("lat"),u.mapDimension("value")],b=u.mapArray(x,(function(t,a,n){var i=e.dataToPoint([t,a]);return i[0]-=h,i[1]-=y,i.push(n),i})),I=a.getExtent(),L="visualMap.continuous"===a.type?c(I,a.option.range):l(I,a.getPieceList(),a.option.selected);g.update(b,v,S,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:s.color.getColorMapper()},L);var M=new r.Image({style:{width:v,height:S,x:h,y:y,image:g.canvas},silent:!0});this.group.add(M)},dispose:function(){}});e.exports=g}}]);
  2. //# sourceMappingURL=chunk-vendors-b16c2dec.97e5bd12.js.map