chunk-vendors-b886e5fb.f2ea3bb7.js 17 KB

12
  1. (self["webpackChunkapp"]=self["webpackChunkapp"]||[]).push([[2520],{8985:function(t,e,n){var r=n(70492),i={type:"axisAreaSelect",event:"axisAreaSelected"};r.registerAction(i,(function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},(function(e){e.axis.model.setActiveIntervals(t.intervals)}))})),r.registerAction("parallelAxisExpand",(function(t,e){e.eachComponent({mainType:"parallel",query:t},(function(e){e.setAxisExpand(t)}))}))},17817:function(t,e,n){var r=n(70492),i=n(7832);n(77471),n(22586),n(36793),n(21418),n(2190),r.registerPreprocessor(i)},22586:function(t,e,n){var r=n(38175),i=(r.__DEV__,n(70492)),a=n(33051),o=n(30801),s=n(4272),u=["#ddd"],l=i.extendComponentModel({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var n=this.option;!e&&o.replaceVisualOption(n,t,["inBrush","outOfBrush"]);var r=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:u},r.hasOwnProperty("liftZ")||(r.liftZ=5)},setAreas:function(t){t&&(this.areas=a.map(t,(function(t){return c(this.option,t)}),this))},setBrushOption:function(t){this.brushOption=c(this.option,t),this.brushType=this.brushOption.brushType}});function c(t,e){return a.merge({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new s(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var h=l;t.exports=h},36793:function(t,e,n){var r=n(70492),i=n(33051),a=n(63448),o=n(77471),s=o.layoutCovers,u=r.extendComponentView({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new a(e.getZr())).on("brush",i.bind(this._onBrush,this)).mount()},render:function(t){return this.model=t,l.apply(this,arguments)},updateTransform:function(t,e){return s(e),l.apply(this,arguments)},updateView:l,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var n=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:i.clone(t),$from:n}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:i.clone(t),$from:n})}});function l(t,e,n,r){(!r||r.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}t.exports=u},21418:function(t,e,n){var r=n(70492);r.registerAction({type:"brush",event:"brush"},(function(t,e){e.eachComponent({mainType:"brush",query:t},(function(e){e.setAreas(t.areas)}))})),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},(function(){})),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},(function(){}))},7832:function(t,e,n){var r=n(33051),i=["rect","polygon","keep","clear"];function a(t,e){var n=t&&t.brush;if(r.isArray(n)||(n=n?[n]:[]),n.length){var a=[];r.each(n,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(a=a.concat(e))}));var s=t&&t.toolbox;r.isArray(s)&&(s=s[0]),s||(s={feature:{}},t.toolbox=[s]);var u=s.feature||(s.feature={}),l=u.brush||(u.brush={}),c=l.type||(l.type=[]);c.push.apply(c,a),o(c),e&&!c.length&&c.push.apply(c,i)}}function o(t){var e={};r.each(t,(function(t){e[t]=1})),t.length=0,r.each(e,(function(e,n){t.push(n)}))}t.exports=a},95170:function(t,e,n){var r=n(40765),i=n(60479),a=n(51177),o=a.linePolygonIntersect,s={lineX:u(0),lineY:u(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&r.contain(n.range,t[0],t[1])},rect:function(t,e,n){var a=n.range;if(!t||a.length<=1)return!1;var s=t.x,u=t.y,l=t.width,c=t.height,h=a[0];return!!(r.contain(a,s,u)||r.contain(a,s+l,u)||r.contain(a,s,u+c)||r.contain(a,s+l,u+c)||i.create(t).contain(h[0],h[1])||o(s,u,s+l,u,a)||o(s,u,s,u+c,a)||o(s+l,u,s+l,u+c,a)||o(s,u+c,s+l,u+c,a))||void 0}}};function u(t){var e=["x","y"],n=["width","height"];return{point:function(e,n,r){if(e){var i=r.range,a=e[t];return l(a,i)}},rect:function(r,i,a){if(r){var o=a.range,s=[r[e[t]],r[e[t]]+r[n[t]]];return s[1]<s[0]&&s.reverse(),l(s[0],o)||l(s[1],o)||l(o[0],s)||l(o[1],s)}}}}function l(t,e){return e[0]<=t&&t<=e[1]}var c=s;t.exports=c},77471:function(t,e,n){var r=n(70492),i=n(33051),a=n(60479),o=n(30801),s=n(95170),u=n(270),l=n(64562),c=["inBrush","outOfBrush"],h="__ecBrushSelect",p="__ecInBrushSelectEvent",d=r.PRIORITY.VISUAL.BRUSH;function f(t){t.eachComponent({mainType:"brush"},(function(e){var n=e.brushTargetManager=new l(e.option,t);n.setInputRanges(e.areas,t)}))}function g(t,e,n,r,i){if(i){var a=t.getZr();if(!a[p]){a[h]||(a[h]=y);var o=u.createOrUpdate(a,h,n,e);o(t,r)}}}function y(t,e){if(!t.isDisposed()){var n=t.getZr();n[p]=!0,t.dispatchAction({type:"brushSelect",batch:e}),n[p]=!1}}function v(t,e,n,r){for(var i=0,a=e.length;i<a;i++){var o=e[i];if(t[o.brushType](r,n,o.selectors,o))return!0}}function m(t){var e=t.brushSelector;if(i.isString(e)){var n=[];return i.each(s,(function(t,r){n[r]=function(n,r,i,a){var o=r.getItemLayout(n);return t[e](o,i,a)}})),n}if(i.isFunction(e)){var r={};return i.each(s,(function(t,n){r[n]=e})),r}return e}function x(t,e){var n=t.option.seriesIndex;return null!=n&&"all"!==n&&(i.isArray(n)?i.indexOf(n,e)<0:e!==n)}function b(t){var e=t.selectors={};return i.each(s[t.brushType],(function(n,r){e[r]=function(r){return n(r,e,t)}})),t}r.registerLayout(d,(function(t,e,n){t.eachComponent({mainType:"brush"},(function(t){n&&"takeGlobalCursor"===n.type&&t.setBrushOption("brush"===n.key?n.brushOption:{brushType:!1})})),f(t)})),r.registerVisual(d,(function(t,e,n){var r,a,s=[];t.eachComponent({mainType:"brush"},(function(e,n){var u={brushId:e.id,brushIndex:n,brushName:e.name,areas:i.clone(e.areas),selected:[]};s.push(u);var l=e.option,h=l.brushLink,p=[],d=[],f=[],g=0;n||(r=l.throttleType,a=l.throttleDelay);var y=i.map(e.areas,(function(t){return b(i.defaults({boundingRect:_[t.brushType](t)},t))})),M=o.createVisualMappings(e.option,c,(function(t){t.mappingMethod="fixed"}));function S(t){return"all"===h||p[t]}function T(t){return!!t.length}function w(t,e){var n=t.coordinateSystem;g|=n.hasAxisBrushed(),S(e)&&n.eachActiveState(t.getData(),(function(t,e){"active"===t&&(d[e]=1)}))}function A(n,r,a){var o=m(n);if(o&&!x(e,r)&&(i.each(y,(function(r){o[r.brushType]&&e.brushTargetManager.controlSeries(r,n,t)&&a.push(r),g|=T(a)})),S(r)&&T(a))){var s=n.getData();s.each((function(t){v(o,a,s,t)&&(d[t]=1)}))}}i.isArray(h)&&i.each(h,(function(t){p[t]=1})),t.eachSeries((function(t,e){var n=f[e]=[];"parallel"===t.subType?w(t,e,n):A(t,e,n)})),t.eachSeries((function(t,e){var n={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};u.selected.push(n);var r=m(t),i=f[e],a=t.getData(),s=S(e)?function(t){return d[t]?(n.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return v(r,i,a,t)?(n.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"};(S(e)?g:T(i))&&o.applyVisual(c,M,a,s)}))})),g(e,r,a,s,n)}));var _={lineX:i.noop,lineY:i.noop,rect:function(t){return M(t.range)},polygon:function(t){for(var e,n=t.range,r=0,i=n.length;r<i;r++){e=e||[[1/0,-1/0],[1/0,-1/0]];var a=n[r];a[0]<e[0][0]&&(e[0][0]=a[0]),a[0]>e[0][1]&&(e[0][1]=a[0]),a[1]<e[1][0]&&(e[1][0]=a[1]),a[1]>e[1][1]&&(e[1][1]=a[1])}return e&&M(e)}};function M(t){return new a(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}e.layoutCovers=f},58362:function(t,e,n){n(74560),n(91724),n(12733)},12733:function(t,e,n){var r=n(70492),i=n(33051),a=n(51177),o=n(78988),s=n(85669),u={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},l={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]},c=r.extendComponentView({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,n){var r=this.group;r.removeAll();var i=t.coordinateSystem,a=i.getRangeInfo(),o=i.getOrient();this._renderDayRect(t,a,r),this._renderLines(t,a,o,r),this._renderYearText(t,a,o,r),this._renderMonthText(t,o,r),this._renderWeekText(t,a,o,r)},_renderDayRect:function(t,e,n){for(var r=t.coordinateSystem,i=t.getModel("itemStyle").getItemStyle(),o=r.getCellWidth(),s=r.getCellHeight(),u=e.start.time;u<=e.end.time;u=r.getNextNDay(u,1).time){var l=r.dataToRect([u],!1).tl,c=new a.Rect({shape:{x:l[0],y:l[1],width:o,height:s},cursor:"default",style:i});n.add(c)}},_renderLines:function(t,e,n,r){var i=this,a=t.coordinateSystem,o=t.getModel("splitLine.lineStyle").getLineStyle(),s=t.get("splitLine.show"),u=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var l=e.start,c=0;l.time<=e.end.time;c++){p(l.formatedDate),0===c&&(l=a.getDateInfo(e.start.y+"-"+e.start.m));var h=l.date;h.setMonth(h.getMonth()+1),l=a.getDateInfo(h)}function p(e){i._firstDayOfMonth.push(a.getDateInfo(e)),i._firstDayPoints.push(a.dataToRect([e],!1).tl);var u=i._getLinePointsOfOneWeek(t,e,n);i._tlpoints.push(u[0]),i._blpoints.push(u[u.length-1]),s&&i._drawSplitline(u,o,r)}p(a.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(i._getEdgesPoints(i._tlpoints,u,n),o,r),s&&this._drawSplitline(i._getEdgesPoints(i._blpoints,u,n),o,r)},_getEdgesPoints:function(t,e,n){var r=[t[0].slice(),t[t.length-1].slice()],i="horizontal"===n?0:1;return r[0][i]=r[0][i]-e/2,r[1][i]=r[1][i]+e/2,r},_drawSplitline:function(t,e,n){var r=new a.Polyline({z2:20,shape:{points:t},style:e});n.add(r)},_getLinePointsOfOneWeek:function(t,e,n){var r=t.coordinateSystem;e=r.getDateInfo(e);for(var i=[],a=0;a<7;a++){var o=r.getNextNDay(e.time,a),s=r.dataToRect([o.time],!1);i[2*o.day]=s.tl,i[2*o.day+1]=s["horizontal"===n?"bl":"tr"]}return i},_formatterLabel:function(t,e){return"string"===typeof t&&t?o.formatTplSimple(t,e):"function"===typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,n,r,i){e=e.slice();var a=["center","bottom"];"bottom"===r?(e[1]+=i,a=["center","top"]):"left"===r?e[0]-=i:"right"===r?(e[0]+=i,a=["center","top"]):e[1]-=i;var o=0;return"left"!==r&&"right"!==r||(o=Math.PI/2),{rotation:o,position:e,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(t,e,n,r){var i=t.getModel("yearLabel");if(i.get("show")){var o=i.get("margin"),s=i.get("position");s||(s="horizontal"!==n?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(u[0][0]+u[1][0])/2,c=(u[0][1]+u[1][1])/2,h="horizontal"===n?0:1,p={top:[l,u[h][1]],bottom:[l,u[1-h][1]],left:[u[1-h][0],c],right:[u[h][0],c]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=i.get("formatter"),g={start:e.start.y,end:e.end.y,nameMap:d},y=this._formatterLabel(f,g),v=new a.Text({z2:30});a.setTextStyle(v.style,i,{text:y}),v.attr(this._yearTextPositionControl(v,p[s],n,s,o)),r.add(v)}},_monthTextPositionControl:function(t,e,n,r,i){var a="left",o="top",s=t[0],u=t[1];return"horizontal"===n?(u+=i,e&&(a="center"),"start"===r&&(o="bottom")):(s+=i,e&&(o="middle"),"start"===r&&(a="right")),{x:s,y:u,textAlign:a,textVerticalAlign:o}},_renderMonthText:function(t,e,n){var r=t.getModel("monthLabel");if(r.get("show")){var o=r.get("nameMap"),s=r.get("margin"),l=r.get("position"),c=r.get("align"),h=[this._tlpoints,this._blpoints];i.isString(o)&&(o=u[o.toUpperCase()]||[]);var p="start"===l?0:1,d="horizontal"===e?0:1;s="start"===l?-s:s;for(var f="center"===c,g=0;g<h[p].length-1;g++){var y=h[p][g].slice(),v=this._firstDayOfMonth[g];if(f){var m=this._firstDayPoints[g];y[d]=(m[d]+h[0][g+1][d])/2}var x=r.get("formatter"),b=o[+v.m-1],_={yyyy:v.y,yy:(v.y+"").slice(2),MM:v.m,M:+v.m,nameMap:b},M=this._formatterLabel(x,_),S=new a.Text({z2:30});i.extend(a.setTextStyle(S.style,r,{text:M}),this._monthTextPositionControl(y,f,e,l,s)),n.add(S)}}},_weekTextPositionControl:function(t,e,n,r,i){var a="center",o="middle",s=t[0],u=t[1],l="start"===n;return"horizontal"===e?(s=s+r+(l?1:-1)*i[0]/2,a=l?"right":"left"):(u=u+r+(l?1:-1)*i[1]/2,o=l?"bottom":"top"),{x:s,y:u,textAlign:a,textVerticalAlign:o}},_renderWeekText:function(t,e,n,r){var o=t.getModel("dayLabel");if(o.get("show")){var u=t.coordinateSystem,c=o.get("position"),h=o.get("nameMap"),p=o.get("margin"),d=u.getFirstDayOfWeek();i.isString(h)&&(h=l[h.toUpperCase()]||[]);var f=u.getNextNDay(e.end.time,7-e.lweek).time,g=[u.getCellWidth(),u.getCellHeight()];p=s.parsePercent(p,g["horizontal"===n?0:1]),"start"===c&&(f=u.getNextNDay(e.start.time,-(7+e.fweek)).time,p=-p);for(var y=0;y<7;y++){var v=u.getNextNDay(f,y),m=u.dataToRect([v.time],!1).center,x=y;x=Math.abs((y+d)%7);var b=new a.Text({z2:30});i.extend(a.setTextStyle(b.style,o,{text:h[x]}),this._weekTextPositionControl(m,n,c,p,g)),r.add(b)}}}});t.exports=c},68569:function(t,e,n){n(71264),n(42719),n(12159),n(38036),n(70766),n(2536),n(72078)},60953:function(t,e,n){n(71264),n(42719),n(12159),n(49498),n(66100),n(2536),n(72078)},32620:function(t,e,n){n(71264),n(42719),n(12159),n(3496),n(45578),n(2536),n(72078)},13967:function(t,e,n){var r=n(33051),i=n(85669),a=n(6398),o=n(19233),s=r.each,u=i.asc,l=function(t,e,n,r){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=r,this._dataZoomModel=n};function c(t,e,n){var r=[1/0,-1/0];return s(n,(function(t){var n=t.getData();n&&s(n.mapDimension(e,!0),(function(t){var e=n.getApproximateExtent(t);e[0]<r[0]&&(r[0]=e[0]),e[1]>r[1]&&(r[1]=e[1])}))})),r[1]<r[0]&&(r=[NaN,NaN]),h(t,r),r}function h(t,e){var n=t.getAxisModel(),r=n.getMin(!0),i="category"===n.get("type"),a=i&&n.getCategories().length;null!=r&&"dataMin"!==r&&"function"!==typeof r?e[0]=r:i&&(e[0]=a>0?0:NaN);var o=n.getMax(!0);return null!=o&&"dataMax"!==o&&"function"!==typeof o?e[1]=o:i&&(e[1]=a>0?a-1:NaN),n.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function p(t,e){var n=t.getAxisModel(),r=t._percentWindow,a=t._valueWindow;if(r){var o=i.getPixelPrecision(a,[0,500]);o=Math.min(o,20);var s=e||0===r[0]&&100===r[1];n.setRange(s?null:+a[0].toFixed(o),s?null:+a[1].toFixed(o))}}function d(t){var e=t._minMaxSpan={},n=t._dataZoomModel,r=t._dataExtent;s(["min","max"],(function(a){var o=n.get(a+"Span"),s=n.get(a+"ValueSpan");null!=s&&(s=t.getAxisModel().axis.scale.parse(s)),null!=s?o=i.linearMap(r[0]+s,r,[0,100],!0):null!=o&&(s=i.linearMap(o,[0,100],r,!0)-r[0]),e[a+"Span"]=o,e[a+"ValueSpan"]=s}))}l.prototype={constructor:l,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[],e=this.ecModel;return e.eachSeries((function(n){if(a.isCoordSupported(n.get("coordinateSystem"))){var r=this._dimName,i=e.queryComponents({mainType:r+"Axis",index:n.get(r+"AxisIndex"),id:n.get(r+"AxisId")})[0];this._axisIndex===(i&&i.componentIndex)&&t.push(n)}}),this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,n,r=this._dimName,i=this.ecModel,a=this.getAxisModel(),o="x"===r||"y"===r;return o?(e="gridIndex",t="x"===r?"y":"x"):(e="polarIndex",t="angle"===r?"radius":"angle"),i.eachComponent(t+"Axis",(function(t){(t.get(e)||0)===(a.get(e)||0)&&(n=t)})),n},getMinMaxSpan:function(){return r.clone(this._minMaxSpan)},calculateDataWindow:function(t){var e,n=this._dataExtent,r=this.getAxisModel(),a=r.axis.scale,l=this._dataZoomModel.getRangePropMode(),c=[0,100],h=[],p=[];s(["start","end"],(function(r,o){var s=t[r],u=t[r+"Value"];"percent"===l[o]?(null==s&&(s=c[o]),u=a.parse(i.linearMap(s,c,n))):(e=!0,u=null==u?n[o]:a.parse(u),s=i.linearMap(u,n,c)),p[o]=u,h[o]=s})),u(p),u(h);var d=this._minMaxSpan;function f(t,e,n,r,s){var u=s?"Span":"ValueSpan";o(0,t,n,"all",d["min"+u],d["max"+u]);for(var l=0;l<2;l++)e[l]=i.linearMap(t[l],n,r,!0),s&&(e[l]=a.parse(e[l]))}return e?f(p,h,n,c,!1):f(h,p,c,n,!0),{valueWindow:p,percentWindow:h}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=c(this,this._dimName,e),d(this);var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,p(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,p(this,!0))},filterData:function(t,e){if(t===this._dataZoomModel){var n=this._dimName,r=this.getTargetSeriesModels(),i=t.get("filterMode"),a=this._valueWindow;"none"!==i&&s(r,(function(t){var e=t.getData(),r=e.mapDimension(n,!0);r.length&&("weakFilter"===i?e.filterSelf((function(t){for(var n,i,o,s=0;s<r.length;s++){var u=e.get(r[s],t),l=!isNaN(u),c=u<a[0],h=u>a[1];if(l&&!c&&!h)return!0;l&&(o=!0),c&&(n=!0),h&&(i=!0)}return o&&n&&i})):s(r,(function(n){if("empty"===i)t.setData(e=e.map(n,(function(t){return o(t)?t:NaN})));else{var r={};r[n]=a,e.selectRange(r)}})),s(r,(function(t){e.setApproximateExtent(a,t)})))}))}function o(t){return t>=a[0]&&t<=a[1]}}};var f=l;t.exports=f}}]);
  2. //# sourceMappingURL=chunk-vendors-b886e5fb.f2ea3bb7.js.map