From: shentao a&&(a=h),n.push(h)}for(var u=0;ua&&(a=d)}return r.y0=o,r.max=a,r}function vg(t){var e=0;d(t.children,function(t){vg(t);var i=t.value;y(i)&&(i=i[0]),e+=i});var i=t.value;y(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),i<0&&(i=0),y(t.value)?t.value[0]=i:t.value=i}function yg(t,e,i){function n(){r.ignore=r.hoverIgnore}function o(){r.ignore=r.normalIgnore}S_.call(this);var a=new Ob({z2:DL}),r=new Cb({z2:CL,silent:t.getModel("label").get("silent")});this.add(a),this.add(r),this.updateData(!0,t,"normal",e,i),this.on("emphasis",n).on("normal",o).on("mouseover",n).on("mouseout",o)}function xg(t,e,i){var n=t.getVisual("color");0===t.getVisual("visualMeta").length&&(n=null);var o=t.getModel("itemStyle").get("color");if(o)return o;if(n)return n;if(0===t.depth)return i.option.color[0];var a=i.option.color.length;return o=i.option.color[_g(t)%a]}function _g(t){for(var e=t;e.depth>1;)e=e.parentNode;return l(t.getAncestors()[0].children,e)}function wg(t,e,i){return i!==AL.NONE&&(i===AL.SELF?t===e:i===AL.ANCESTOR?t===e||t.isAncestorOf(e):t===e||t.isDescendantOf(e))}function bg(t,e){var i=t.children||[];t.children=Sg(i,e),i.length&&d(t.children,function(t){bg(t,e)})}function Sg(t,e){if("function"==typeof e)return t.sort(e);var i="asc"===e;return t.sort(function(t,e){var n=(t.getValue()-e.getValue())*(i?1:-1);return 0===n?(t.dataIndex-e.dataIndex)*(i?-1:1):n})}function Mg(t,e){return e=e||[0,0],f(["x","y"],function(i,n){var o=this.getAxis(i),a=e[n],r=t[n]/2;return"category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(a-r)-o.dataToCoord(a+r))},this)}function Ig(t,e){return e=e||[0,0],f([0,1],function(i){var n=e[i],o=t[i]/2,a=[],r=[];return a[i]=n-o,r[i]=n+o,a[1-i]=r[1-i]=e[1-i],Math.abs(this.dataToPoint(a)[i]-this.dataToPoint(r)[i])},this)}function Tg(t,e){var i=this.getAxis(),n=e instanceof Array?e[0]:e,o=(t instanceof Array?t[0]:t)/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))}function Ag(t,e){return f(["Radius","Angle"],function(i,n){var o=this["get"+i+"Axis"](),a=e[n],r=t[n]/2,s="dataTo"+i,l="category"===o.type?o.getBandWidth():Math.abs(o[s](a-r)-o[s](a+r));return"Angle"===i&&(l=l*Math.PI/180),l},this)}function Dg(t){var e,i=t.type;if("path"===i){var n=t.shape;(e=En(n.pathData,null,{x:n.x||0,y:n.y||0,width:n.width||0,height:n.height||0},"center")).__customPathData=t.pathData}else"image"===i?(e=new Je({})).__customImagePath=t.style.image:"text"===i?(e=new Cb({})).__customText=t.style.text:e=new(0,tS[i.charAt(0).toUpperCase()+i.slice(1)]);return e.__customGraphicType=i,e.name=t.name,e}function Cg(t,e,n,o,a,r){var s={},l=n.style||{};if(n.shape&&(s.shape=i(n.shape)),n.position&&(s.position=n.position.slice()),n.scale&&(s.scale=n.scale.slice()),n.origin&&(s.origin=n.origin.slice()),n.rotation&&(s.rotation=n.rotation),"image"===t.type&&n.style){h=s.style={};d(["x","y","width","height"],function(e){Lg(e,h,l,t.style,r)})}if("text"===t.type&&n.style){var h=s.style={};d(["x","y"],function(e){Lg(e,h,l,t.style,r)}),!l.hasOwnProperty("textFill")&&l.fill&&(l.textFill=l.fill),!l.hasOwnProperty("textStroke")&&l.stroke&&(l.textStroke=l.stroke)}if("group"!==t.type&&(t.useStyle(l),r)){t.style.opacity=0;var u=l.opacity;null==u&&(u=1),fo(t,{style:{opacity:u}},o,e)}r?t.attr(s):co(t,s,o,e),t.attr({z2:n.z2||0,silent:n.silent}),!1!==n.styleEmphasis&&to(t,n.styleEmphasis)}function Lg(t,e,i,n,o){null==i[t]||o||(e[t]=i[t],i[t]=n[t])}function kg(t,e,i,n){function o(t){null==t&&(t=u),v&&(c=e.getItemModel(t),d=c.getModel(zL),f=c.getModel(RL),p=e.getItemVisual(t,"color"),v=!1)}var s=t.get("renderItem"),l=t.coordinateSystem,h={};l&&(h=l.prepareCustoms?l.prepareCustoms():VL[l.type](l));var u,c,d,f,p,g=r({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:function(t,i){return null==i&&(i=u),e.get(e.getDimension(t||0),i)},style:function(i,n){null==n&&(n=u),o(n);var r=c.getModel(NL).getItemStyle();null!=p&&(r.fill=p);var s=e.getItemVisual(n,"opacity");return null!=s&&(r.opacity=s),io(r,d,null,{autoColor:p,isRectText:!0}),r.text=d.getShallow("show")?A(t.getFormattedLabel(n,"normal"),xl(e,n)):null,i&&a(r,i),r},styleEmphasis:function(i,n){null==n&&(n=u),o(n);var r=c.getModel(EL).getItemStyle();return io(r,f,null,{isRectText:!0},!0),r.text=f.getShallow("show")?D(t.getFormattedLabel(n,"emphasis"),t.getFormattedLabel(n,"normal"),xl(e,n)):null,i&&a(r,i),r},visual:function(t,i){return null==i&&(i=u),e.getItemVisual(i,t)},barLayout:function(t){if(l.getBaseAxis)return Qs(r({axis:l.getBaseAxis()},t),n)},currentSeriesIndices:function(){return i.getCurrentSeriesIndices()},font:function(t){return ho(t,i)}},h.api||{}),m={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:h.coordSys,dataInsideLength:e.count(),encode:Pg(t.getData())},v=!0;return function(t){return u=t,v=!0,s&&s(r({dataIndexInside:t,dataIndex:e.getRawIndex(t)},m),g)||{}}}function Pg(t){var e={};return d(t.dimensions,function(i,n){var o=t.getDimensionInfo(i);if(!o.isExtraCoord){var a=o.coordDim;(e[a]=e[a]||[])[o.coordDimIndex]=n}}),e}function Og(t,e,i,n,o,a){return(t=Ng(t,e,i,n,o,a))&&a.setItemGraphicEl(e,t),t}function Ng(t,e,i,n,o,a){var r=i.type;if(!t||r===t.__customGraphicType||"path"===r&&i.pathData===t.__customPathData||"image"===r&&i.style.image===t.__customImagePath||"text"===r&&i.style.text===t.__customText||(o.remove(t),t=null),null!=r){var s=!t;if(!t&&(t=Dg(i)),Cg(t,e,i,n,a,s),"group"===r){var l=t.children()||[],h=i.children||[];if(i.diffChildrenByName)Eg({oldChildren:l,newChildren:h,dataIndex:e,animatableModel:n,group:t,data:a});else{for(var u=0;u
-
- 0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),r+=o,l+=o}else{for(s=o+1;ls&&(l=s);var h=r;r=o-l,l=o-h}for(r++;rs&&(l=s);var h=r;r=o-l,l=o-h}else{for(s=n-o;l=0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),r+=o,l+=o}for(r++;r=r;l++)s-=r;var h=ge(i);return h>s&&(i="",h=0),s=t-h,n.ellipsis=i,n.ellipsisWidth=h,n.contentWidth=s,n.containerWidth=t,n}function Me(t,e){var i=e.containerWidth,n=e.font,o=e.contentWidth;if(!i)return"";var a=ge(t,n);if(a<=i)return t;for(var r=0;;r++){if(a<=o||r>=e.maxIterations){t+=e.ellipsis;break}var s=0===r?Ie(t,o,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*o/a):0;a=ge(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function Ie(t,e,i,n){for(var o=0,a=0,r=t.length;ao&&(o=n));var l=t.area*t.area,h=e*e*i;return l?uD(h*o/l,l/(h*a)):1/0}function Dc(t,e,i,n,o){var a=e===i.width?0:1,r=1-a,s=["x","y"],l=["width","height"],h=i[s[a]],u=e?t.area/e:0;(o||u>i[l[r]])&&(u=i[l[r]]);for(var c=0,d=t.length;c0;o--)Tf(a,r*=.99),If(a,n,i),Df(a,r),If(a,n,i)}function Mf(t,e,i,n,o){var a=[];d(e,function(t){var e=t.length,i=0;d(t,function(t){i+=t.getLayout().value});var r=(n-(e-1)*o)/i;a.push(r)}),a.sort(function(t,e){return t-e});var r=a[0];d(e,function(t){d(t,function(t,e){t.setLayout({y:e},!0);var i=t.getLayout().value*r;t.setLayout({dy:i},!0)})}),d(i,function(t){var e=+t.getValue()*r;t.setLayout({dy:e},!0)})}function If(t,e,i){d(t,function(t){var n,o,a,r=0,s=t.length;for(t.sort(Ef),a=0;a0){l=n.getLayout().y+o;n.setLayout({y:l},!0)}r=n.getLayout().y+n.getLayout().dy+e}if((o=r-e-i)>0){var l=n.getLayout().y-o;for(n.setLayout({y:l},!0),r=n.getLayout().y,a=s-2;a>=0;--a)(o=(n=t[a]).getLayout().y+n.getLayout().dy+e-r)>0&&(l=n.getLayout().y-o,n.setLayout({y:l},!0)),r=n.getLayout().y}})}function Tf(t,e){d(t.slice().reverse(),function(t){d(t,function(t){if(t.outEdges.length){var i=Of(t.outEdges,Af)/Of(t.outEdges,Rf),n=t.getLayout().y+(i-Nf(t))*e;t.setLayout({y:n},!0)}})})}function Af(t){return Nf(t.node2)*t.getValue()}function Df(t,e){d(t,function(t){d(t,function(t){if(t.inEdges.length){var i=Of(t.inEdges,Cf)/Of(t.inEdges,Rf),n=t.getLayout().y+(i-Nf(t))*e;t.setLayout({y:n},!0)}})})}function Cf(t){return Nf(t.node1)*t.getValue()}function Lf(t){d(t,function(t){t.outEdges.sort(kf),t.inEdges.sort(Pf)}),d(t,function(t){var e=0,i=0;d(t.outEdges,function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy}),d(t.inEdges,function(t){t.setLayout({ty:i},!0),i+=t.getLayout().dy})})}function kf(t,e){return t.node2.getLayout().y-e.node2.getLayout().y}function Pf(t,e){return t.node1.getLayout().y-e.node1.getLayout().y}function Of(t,e){for(var i=0,n=t.length,o=-1;++o
":"")+s.join(r?"
":", ")}(s):n(r?Ja(o,t,a[0]):l?s[0]:s),c=jo(h),f=o.getName(t),g=this.name;return g===vw&&(g=""),g=g?Ho(g)+(e?": ":"
"):"",e?c+g+u:g+c+(f?Ho(f)+": "+u:u)},isAnimationEnabled:function(){if(_x.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,i){var n=this.ecModel,o=CS.getColorFromPalette.call(this,t,e,i);return o||(o=n.getColorFromPalette(t,e,i)),o},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});u(uM,sM),u(uM,CS);var cM=function(){this.group=new S_,this.uid=So("viewComponent")};cM.prototype={constructor:cM,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){}};var dM=cM.prototype;dM.updateView=dM.updateLayout=dM.updateVisual=function(t,e,i,n){},Vi(cM),Hi(cM,{registerWhenExtend:!0});var fM=function(){var t=Pi();return function(e){var i=t(e),n=e.pipelineContext,o=i.large,a=i.incrementalRender,r=i.large=n.large,s=i.incrementalRender=n.incrementalRender;return(o^r||a^s)&&"reset"}},pM=Pi(),gM=fM();cr.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){fr(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){fr(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null};var mM=cr.prototype;mM.updateView=mM.updateLayout=mM.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},Vi(cr),Hi(cr,{registerWhenExtend:!0}),cr.markUpdateMethod=function(t,e){pM(t).updateMethod=e};var vM="\0__throttleOriginMethod",yM="\0__throttleRate",xM="\0__throttleType",_M={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i=t.getData(),n=(t.visualColorAccessPath||"itemStyle.color").split("."),o=t.get(n)||t.getColorFromPalette(t.get("name"),null,e.getSeriesCount());if(i.setVisual("color",o),!e.isSeriesFiltered(t)){"function"!=typeof o||o instanceof Ub||i.each(function(e){i.setItemVisual(e,"color",o(t.getDataParams(e)))});return{dataEach:i.hasItemOption?function(t,e){var i=t.getItemModel(e).get(n,!0);null!=i&&t.setItemVisual(e,"color",i)}:null}}}},wM={toolbox:{brush:{title:{rect:"ç©å½¢éæ©",polygon:"åé",lineX:"横åéæ©",lineY:"纵åéæ©",keep:"ä¿æéæ©",clear:"æ¸
é¤éæ©"}},dataView:{title:"æ°æ®è§å¾",lang:["æ°æ®è§å¾","å
³é","å·æ°"]},dataZoom:{title:{zoom:"åºå缩æ¾",back:"åºå缩æ¾è¿å"}},magicType:{title:{line:"åæ¢ä¸ºæçº¿å¾",bar:"åæ¢ä¸ºæ±ç¶å¾",stack:"åæ¢ä¸ºå å ",tiled:"åæ¢ä¸ºå¹³éº"}},restore:{title:"è¿å"},saveAsImage:{title:"ä¿å为å¾ç",lang:["å³é®å¦å为å¾ç"]}},series:{typeNames:{pie:"饼å¾",bar:"æ±ç¶å¾",line:"æçº¿å¾",scatter:"æ£ç¹å¾",effectScatter:"æ¶æ¼ªæ£ç¹å¾",radar:"é·è¾¾å¾",tree:"æ å¾",treemap:"ç©å½¢æ å¾",boxplot:"ç®±åå¾",candlestick:"K线å¾",k:"K线å¾",heatmap:"çåå¾",map:"å°å¾",parallel:"å¹³è¡åæ å¾",lines:"线å¾",graph:"å
³ç³»å¾",sankey:"æ¡åºå¾",funnel:"æ¼æå¾",gauge:"仪表çå¾",pictorialBar:"象形æ±å¾",themeRiver:"䏻颿²³æµå¾",sunburst:"ææ¥å¾"}},aria:{general:{withTitle:"è¿æ¯ä¸ä¸ªå
³äºâ{title}âçå¾è¡¨ã",withoutTitle:"è¿æ¯ä¸ä¸ªå¾è¡¨ï¼"},series:{single:{prefix:"",withName:"å¾è¡¨ç±»åæ¯{seriesType}ï¼è¡¨ç¤º{seriesName}ã",withoutName:"å¾è¡¨ç±»åæ¯{seriesType}ã"},multiple:{prefix:"å®ç±{seriesCount}个å¾è¡¨ç³»åç»æã",withName:"第{seriesId}ä¸ªç³»åæ¯ä¸ä¸ªè¡¨ç¤º{seriesName}ç{seriesType}ï¼",withoutName:"第{seriesId}ä¸ªç³»åæ¯ä¸ä¸ª{seriesType}ï¼",separator:{middle:"ï¼",end:"ã"}}},data:{allData:"å
¶æ°æ®æ¯ââ",partialData:"å
¶ä¸ï¼å{displayCnt}项æ¯ââ",withName:"{name}çæ°æ®æ¯{value}",withoutName:"{value}",separator:{middle:"ï¼",end:""}}}},bM=function(t,e){function i(t,e){if("string"!=typeof t)return t;var i=t;return d(e,function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),i}function n(t){var e=a.get(t);if(null==e){for(var i=t.split("."),n=wM.aria,o=0;o=e[0]&&t<=e[1]},Fs.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},Fs.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},Fs.prototype.unionExtent=function(t){var e=this._extent;t[0]
")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});ys({type:"radar",render:function(t,e,n){function o(t,e){var i=t.getItemVisual(e,"symbol")||"circle",n=t.getItemVisual(e,"color");if("none"!==i){var o=Vh(t.getItemVisual(e,"symbolSize")),a=dl(i,-1,-1,2,2,n);return a.attr({style:{strokeNoScale:!0},z2:100,scale:[o[0]/2,o[1]/2]}),a}}function a(e,i,n,a,r,s){n.removeAll();for(var l=0;l0){if(dn(l,h,(l+c)/2-(h-d)*o,(h+d)/2-(c-l)*o,c,d))return a}else if(un(l,h,c,d))return a;a++}return-1}}),qC=ep.prototype;qC.isPersistent=function(){return!this._incremental},qC.updateData=function(t){this.group.removeAll();var e=new YC({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},qC.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new On({silent:!0})),this.group.add(this._incremental)):this._incremental=null},qC.incrementalUpdate=function(t,e){var i=new YC;i.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(i,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(i,!0):(i.rectHover=!0,i.cursor="default",i.__startIndex=t.start,this.group.add(i))},qC.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},qC._setCommon=function(t,e,i){var n=e.hostModel;t.setShape({polyline:n.get("polyline"),curveness:n.get("lineStyle.curveness")}),t.useStyle(n.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var o=e.getVisual("color");o&&t.setStyle("stroke",o),t.setStyle("fill"),i||(t.seriesIndex=n.seriesIndex,t.on("mousemove",function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);i>0&&(t.dataIndex=i+t.__startIndex)}))},qC._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var $C={seriesType:"lines",plan:fM(),reset:function(t){var e=t.coordinateSystem,i=t.get("polyline"),n=t.pipelineContext.large;return{progress:function(o,a){var r=[];if(n){var s,l=o.end-o.start;if(i){for(var h=0,u=o.start;u
":"")+o.join("
"))}})},this),a.reverse(),a=a.join("
");var l=e.position;this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(s,l,o[0],o[1],this._tooltipContent,r):this._showTooltipContent(s,a,r,Math.random(),o[0],o[1],l)})},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,o=e.seriesIndex,a=n.getSeriesByIndex(o),r=e.dataModel||a,s=e.dataIndex,l=e.dataType,h=r.getData(),u=nm([h.getItemModel(s),r,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),c=u.get("trigger");if(null==c||"item"===c){var d=r.getDataParams(s,l),f=r.formatTooltip(s,!1,l),p="item_"+r.name+"_"+s;this._showOrMove(u,function(){this._showTooltipContent(u,f,d,p,t.offsetX,t.offsetY,t.position,t.target)}),i({type:"showTip",dataIndexInside:s,dataIndex:h.getRawIndex(s),seriesIndex:o,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){var o=n;n={content:o,formatter:o}}var a=new _o(n,this._tooltipModel,this._ecModel),r=a.get("content"),s=Math.random();this._showOrMove(a,function(){this._showTooltipContent(a,r,a.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,o,a,r,s){if(this._ticket="",t.get("showContent")&&t.get("show")){var l=this._tooltipContent,h=t.get("formatter");r=r||t.get("position");var u=e;if(h&&"string"==typeof h)u=Zo(h,i,!0);else if("function"==typeof h){var c=tk(function(e,n){e===this._ticket&&(l.setContent(n),this._updatePosition(t,r,o,a,l,i,s))},this);this._ticket=n,u=h(i,n,c)}l.setContent(u),l.show(t),this._updatePosition(t,r,o,a,l,i,s)}},_updatePosition:function(t,e,i,n,o,a,r){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var h=o.getSize(),u=t.get("align"),c=t.get("verticalAlign"),d=r&&r.getBoundingRect().clone();if(r&&d.applyTransform(r.transform),"function"==typeof e&&(e=e([i,n],a,o.el,d,{viewSize:[s,l],contentSize:h.slice()})),y(e))i=ik(e[0],s),n=ik(e[1],l);else if(w(e)){e.width=h[0],e.height=h[1];var f=Ko(e,{width:s,height:l});i=f.x,n=f.y,u=null,c=null}else"string"==typeof e&&r?(i=(p=lm(e,d,h))[0],n=p[1]):(i=(p=am(i,n,o.el,s,l,u?null:20,c?null:20))[0],n=p[1]);if(u&&(i-=hm(u)?h[0]/2:"right"===u?h[0]:0),c&&(n-=hm(c)?h[1]/2:"bottom"===c?h[1]:0),t.get("confine")){var p=rm(i,n,o.el,s,l);i=p[0],n=p[1]}o.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&ek(e,function(e,n){var o=e.dataByAxis||{},a=(t[n]||{}).dataByAxis||[];(i&=o.length===a.length)&&ek(o,function(t,e){var n=a[e]||{},o=t.seriesDataIndices||[],r=n.seriesDataIndices||[];(i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&o.length===r.length)&&ek(o,function(t,e){var n=r[e];i&=t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})})}),this._lastDataByCoordSys=t,!!i},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){_x.node||(this._tooltipContent.hide(),Yp("itemTooltip",e))}}),hs({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),hs({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){}),fm.prototype={constructor:fm,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:nT.prototype.dataToCoord,radiusToData:nT.prototype.coordToData},h(fm,nT),pm.prototype={constructor:pm,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:nT.prototype.dataToCoord,angleToData:nT.prototype.coordToData},h(pm,nT);var ok=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new fm,this._angleAxis=new pm,this._radiusAxis.polar=this._angleAxis.polar=this};ok.prototype={type:"polar",axisPointerEnabled:!0,constructor:ok,dimensions:["radius","angle"],model:null,containPoint:function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(t){var e=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getAngleAxis(),o=n.getExtent(),a=Math.min(o[0],o[1]),r=Math.max(o[0],o[1]);n.inverse?a=r-360:r=a+360;var s=Math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=Math.atan2(-i,e)/Math.PI*180,h=lr;)l+=360*h;return[s,l]},coordToPoint:function(t){var e=t[0],i=t[1]/180*Math.PI;return[Math.cos(i)*e+this.cx,-Math.sin(i)*e+this.cy]}};var ak=IS.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});n(ak.prototype,ZI);var rk={angle:{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}},radius:{splitNumber:5}};kT("angle",ak,gm,rk.angle),kT("radius",ak,gm,rk.radius),gs({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var sk={dimensions:ok.prototype.dimensions,create:function(t,e){var i=[];return t.eachComponent("polar",function(t,n){var o=new ok(n);o.update=vm;var a=o.getRadiusAxis(),r=o.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");ym(a,s),ym(r,l),mm(o,t,e),i.push(o),t.coordinateSystem=o,o.model=t}),t.eachSeries(function(e){if("polar"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"polar",index:e.get("polarIndex"),id:e.get("polarId")})[0];e.coordinateSystem=i.coordinateSystem}}),i}};Aa.register("polar",sk);var lk=["axisLine","axisLabel","axisTick","splitLine","splitArea"];XT.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),t.get("show")){var i=t.axis,n=i.polar,o=n.getRadiusAxis().getExtent(),a=i.getTicksCoords();"category"!==i.type&&a.pop(),d(lk,function(e){!t.get(e+".show")||i.scale.isBlank()&&"axisLine"!==e||this["_"+e](t,n,a,o)},this)}},_axisLine:function(t,e,i,n){var o=t.getModel("axisLine.lineStyle"),a=new Lb({shape:{cx:e.cx,cy:e.cy,r:n[_m(e)]},style:o.getLineStyle(),z2:1,silent:!0});a.style.fill=null,this.group.add(a)},_axisTick:function(t,e,i,n){var o=t.getModel("axisTick"),a=(o.get("inside")?-1:1)*o.get("length"),s=n[_m(e)],l=f(i,function(t){return new Gb({shape:xm(e,[s,s+a],t)})});this.group.add(Qb(l,{style:r(o.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_axisLabel:function(t,e,i,n){for(var o=t.axis,a=t.getCategories(),r=t.getModel("axisLabel"),s=t.getFormattedLabels(),l=r.get("margin"),h=o.getLabelsCoords(),u=0;u
"),o&&(a+=NP(o),null!=i&&(a+=" : ")),null!=i&&(a+=NP(n)),a},getData:function(){return this._data},setData:function(t){this._data=t}});u(EP,sM),EP.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var zP=l,RP=v,BP={min:RP(Fv,"min"),max:RP(Fv,"max"),average:RP(Fv,"average")},VP=ms({type:"marker",init:function(){this.markerGroupMap=z()},render:function(t,e,i){var n=this.markerGroupMap;n.each(function(t){t.__keep=!1});var o=this.type+"Model";e.eachSeries(function(t){var n=t[o];n&&this.renderSeries(t,n,e,i)},this),n.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});VP.extend({type:"markPoint",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(qv(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,e,i,n){var o=t.coordinateSystem,a=t.id,r=t.getData(),s=this.markerGroupMap,l=s.get(a)||s.set(a,new Ml),h=$v(o,t,e);e.setData(h),qv(e.getData(),t,n),h.each(function(t){var i=h.getItemModel(t),n=i.getShallow("symbolSize");"function"==typeof n&&(n=n(e.getRawValue(t),e.getDataParams(t))),h.setItemVisual(t,{symbolSize:n,color:i.get("itemStyle.color")||r.getVisual("color"),symbol:i.getShallow("symbol")})}),l.updateData(h),this.group.add(l.group),h.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),ss(function(t){t.markPoint=t.markPoint||{}}),EP.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end"},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});var GP=function(t,e,o,r){var s=t.getData(),l=r.type;if(!y(r)&&("min"===l||"max"===l||"average"===l||null!=r.xAxis||null!=r.yAxis)){var h,u;if(null!=r.yAxis||null!=r.xAxis)h=null!=r.yAxis?"y":"x",e.getAxis(h),u=T(r.yAxis,r.xAxis);else{var c=Zv(r,s,e,t);h=c.valueDataDim,c.valueAxis,u=Yv(s,h,l)}var d="x"===h?0:1,f=1-d,p=i(r),g={};p.type=null,p.coord=[],g.coord=[],p.coord[f]=-1/0,g.coord[f]=1/0;var m=o.get("precision");m>=0&&"number"==typeof u&&(u=+u.toFixed(Math.min(m,20))),p.coord[d]=g.coord[d]=u,r=[p,g,{type:l,valueIndex:r.valueIndex,value:u}]}return r=[Hv(t,r[0]),Hv(t,r[1]),a({},r[2])],r[2].type=r[2].type||"",n(r[2],r[0]),n(r[2],r[1]),r};VP.extend({type:"markLine",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markLineModel;if(e){var n=e.getData(),o=e.__from,a=e.__to;o.each(function(e){ty(o,e,!0,t,i),ty(a,e,!1,t,i)}),n.each(function(t){n.setItemLayout(t,[o.getItemLayout(t),a.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},renderSeries:function(t,e,i,n){function o(e,i,o){var a=e.getItemModel(i);ty(e,i,o,t,n),e.setItemVisual(i,{symbolSize:a.get("symbolSize")||g[o?0:1],symbol:a.get("symbol",!0)||p[o?0:1],color:a.get("itemStyle.color")||s.getVisual("color")})}var a=t.coordinateSystem,r=t.id,s=t.getData(),l=this.markerGroupMap,h=l.get(r)||l.set(r,new Fc);this.group.add(h.group);var u=ey(a,t,e),c=u.from,d=u.to,f=u.line;e.__from=c,e.__to=d,e.setData(f);var p=e.get("symbol"),g=e.get("symbolSize");y(p)||(p=[p,p]),"number"==typeof g&&(g=[g,g]),u.from.each(function(t){o(c,t,!0),o(d,t,!1)}),f.each(function(t){var e=f.getItemModel(t).get("lineStyle.color");f.setItemVisual(t,{color:e||c.getItemVisual(t,"color")}),f.setItemLayout(t,[c.getItemLayout(t),d.getItemLayout(t)]),f.setItemVisual(t,{fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolSize:d.getItemVisual(t,"symbolSize"),toSymbol:d.getItemVisual(t,"symbol")})}),h.updateData(f),u.line.eachItemGraphicEl(function(t,i){t.traverse(function(t){t.dataModel=e})}),h.__keep=!0,h.group.silent=e.get("silent")||t.get("silent")}}),ss(function(t){t.markLine=t.markLine||{}}),EP.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});var WP=function(t,e,i,n){var a=Hv(t,n[0]),r=Hv(t,n[1]),s=T,l=a.coord,h=r.coord;l[0]=s(l[0],-1/0),l[1]=s(l[1],-1/0),h[0]=s(h[0],1/0),h[1]=s(h[1],1/0);var u=o([{},a,r]);return u.coord=[a.coord,r.coord],u.x0=a.x,u.y0=a.y,u.x1=r.x,u.y1=r.y,u},FP=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];VP.extend({type:"markArea",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markAreaModel;if(e){var n=e.getData();n.each(function(e){var o=f(FP,function(o){return ay(n,e,o,t,i)});n.setItemLayout(e,o),n.getItemGraphicEl(e).setShape("points",o)})}},this)},renderSeries:function(t,e,i,n){var o=t.coordinateSystem,a=t.name,s=t.getData(),l=this.markerGroupMap,h=l.get(a)||l.set(a,{group:new S_});this.group.add(h.group),h.__keep=!0;var u=ry(o,t,e);e.setData(u),u.each(function(e){u.setItemLayout(e,f(FP,function(i){return ay(u,e,i,t,n)})),u.setItemVisual(e,{color:s.getVisual("color")})}),u.diff(h.__data).add(function(t){var e=new Rb({shape:{points:u.getItemLayout(t)}});u.setItemGraphicEl(t,e),h.group.add(e)}).update(function(t,i){var n=h.__data.getItemGraphicEl(i);co(n,{shape:{points:u.getItemLayout(t)}},e,t),h.group.add(n),u.setItemGraphicEl(t,n)}).remove(function(t){var e=h.__data.getItemGraphicEl(t);h.group.remove(e)}).execute(),u.eachItemGraphicEl(function(t,i){var n=u.getItemModel(i),o=n.getModel("label"),a=n.getModel("emphasis.label"),s=u.getItemVisual(i,"color");t.useStyle(r(n.getModel("itemStyle").getItemStyle(),{fill:zt(s,.4),stroke:s})),t.hoverStyle=n.getModel("emphasis.itemStyle").getItemStyle(),eo(t.style,t.hoverStyle,o,a,{labelFetcher:e,labelDataIndex:i,defaultText:u.getName(i)||"",isRectText:!0,autoColor:s}),to(t,{}),t.dataModel=e}),h.__data=u,h.group.silent=e.get("silent")||t.get("silent")}}),ss(function(t){t.markArea=t.markArea||{}});IS.registerSubTypeDefaulter("timeline",function(){return"slider"}),hs({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var i=e.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),e.resetOption("timeline"),r({currentIndex:i.option.currentIndex},t)}),hs({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)});var HP=IS.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(t,e,i){this._data,this._names,this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(t){HP.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],n=t.axisType,o=this._names=[];if("category"===n){var a=[];d(e,function(t,e){var n,r=Ii(t);w(t)?(n=i(t)).value=e:n=e,a.push(n),_(r)||null!=r&&!isNaN(r)||(r=""),o.push(r+"")}),e=a}var r={category:"ordinal",time:"time"}[n]||"number";(this._data=new yI([{name:"value",type:r}],this)).initData(e,o)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}});u(HP.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}}),sM);var ZP=cM.extend({type:"timeline"}),UP=function(t,e,i,n){nT.call(this,t,e,i),this.type=n||"value",this._autoLabelInterval,this.model=null};UP.prototype={constructor:UP,getLabelInterval:function(){var t=this.model,e=t.getModel("label"),i=e.get("interval");return null!=i&&"auto"!=i?i:((i=this._autoLabelInterval)||(i=this._autoLabelInterval=ll(f(this.scale.getTicks(),this.dataToCoord,this),hl(this,e.get("formatter")),e.getFont(),"horizontal"===t.get("orient")?0:90,e.get("rotate"))),i)},isLabelIgnored:function(t){if("category"===this.type){var e=this.getLabelInterval();return"function"==typeof e&&!e(t,this.scale.getLabel(t))||t%(e+1)}}},h(UP,nT);var jP=m,XP=d,YP=Math.PI;ZP.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(t,e,i,n){if(this.model=t,this.api=i,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var o=this._layout(t,i),a=this._createGroup("mainGroup"),r=this._createGroup("labelGroup"),s=this._axis=this._createAxis(o,t);t.formatTooltip=function(t){return Ho(s.scale.getLabel(t))},XP(["AxisLine","AxisTick","Control","CurrentPointer"],function(e){this["_render"+e](o,a,s,t)},this),this._renderAxisLabel(o,r,s,t),this._position(o,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),o=uy(t,e);null==i||"auto"===i?i="horizontal"===n?o.y+o.height/2';window.open().document.write(d)}else{var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});o.dispatchEvent(f)}},Jm("saveAsImage",gy);var KP=wM.toolbox.magicType;my.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:i(KP.title),option:{},seriesIndex:{}};var JP=my.prototype;JP.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return d(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var QP={line:function(t,e,i,o){if("bar"===t)return n({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},o.get("option.line")||{},!0)},bar:function(t,e,i,o){if("line"===t)return n({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},o.get("option.bar")||{},!0)},stack:function(t,e,i,o){if("line"===t||"bar"===t)return n({id:e,stack:"__ec_magicType_stack__"},o.get("option.stack")||{},!0)},tiled:function(t,e,i,o){if("line"===t||"bar"===t)return n({id:e,stack:""},o.get("option.tiled")||{},!0)}},tO=[["line","bar"],["stack","tiled"]];JP.onclick=function(t,e,i){var n=this.model,o=n.get("seriesIndex."+i);if(QP[i]){var a={series:[]};d(tO,function(t){l(t,i)>=0&&d(t,function(t){n.setIconStatus(t,"normal")})}),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},function(e){var o=e.subType,s=e.id,l=QP[i](o,s,e,n);l&&(r(l,e.option),a.series.push(l));var h=e.coordinateSystem;if(h&&"cartesian2d"===h.type&&("line"===i||"bar"===i)){var u=h.getAxesByScale("ordinal")[0];if(u){var c=u.dim+"Axis",d=t.queryComponents({mainType:c,index:e.get(name+"Index"),id:e.get(name+"Id")})[0].componentIndex;a[c]=a[c]||[];for(var f=0;f<=d;f++)a[c][d]=a[c][d]||{};a[c][d].boundaryGap="bar"===i}}}),e.dispatchAction({type:"changeMagicType",currentType:i,newOption:a})}},hs({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),Jm("magicType",my);var eO=wM.toolbox.dataView,iO=new Array(60).join("-"),nO="\t",oO=new RegExp("["+nO+"]+","g");Ty.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:i(eO.title),lang:i(eO.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},Ty.prototype.onclick=function(t,e){function i(){n.removeChild(a),x._dom=null}var n=e.getDom(),o=this.model;this._dom&&n.removeChild(this._dom);var a=document.createElement("div");a.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",a.style.backgroundColor=o.get("backgroundColor")||"#fff";var r=document.createElement("h4"),s=o.get("lang")||[];r.innerHTML=s[0]||o.get("title"),r.style.cssText="margin: 10px 20px;",r.style.color=o.get("textColor");var l=document.createElement("div"),h=document.createElement("textarea");l.style.cssText="display:block;width:100%;overflow:auto;";var u=o.get("optionToContent"),c=o.get("contentToOption"),d=_y(t);if("function"==typeof u){var f=u(e.getOption());"string"==typeof f?l.innerHTML=f:M(f)&&l.appendChild(f)}else l.appendChild(h),h.readOnly=o.get("readOnly"),h.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",h.style.color=o.get("textColor"),h.style.borderColor=o.get("textareaBorderColor"),h.style.backgroundColor=o.get("textareaColor"),h.value=d.value;var p=d.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:0;left:0;right:0;";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createElement("div"),y=document.createElement("div");m+=";background-color:"+o.get("buttonColor"),m+=";color:"+o.get("buttonTextColor");var x=this;hi(v,"click",i),hi(y,"click",function(){var t;try{t="function"==typeof c?c(l,e.getOption()):Iy(h.value,p)}catch(t){throw i(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),i()}),v.innerHTML=s[1],y.innerHTML=s[2],y.style.cssText=m,v.style.cssText=m,!o.get("readOnly")&&g.appendChild(y),g.appendChild(v),hi(h,"keydown",function(t){if(9===(t.keyCode||t.which)){var e=this.value,i=this.selectionStart,n=this.selectionEnd;this.value=e.substring(0,i)+nO+e.substring(n),this.selectionStart=this.selectionEnd=i+1,Q_(t)}}),a.appendChild(r),a.appendChild(l),a.appendChild(g),l.style.height=n.clientHeight-80+"px",n.appendChild(a),this._dom=a},Ty.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},Ty.prototype.dispose=function(t,e){this.remove(t,e)},Jm("dataView",Ty),hs({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var i=[];d(t.newOption.series,function(t){var n=e.getSeriesByName(t.name)[0];if(n){var o=n.get("data");i.push({name:t.name,data:Ay(t.data,o)})}else i.push(a({type:"scatter"},t))}),e.mergeOption(r({series:i},t.newOption))});var aO=d,rO="\0_ec_hist_store";jk.extend({type:"dataZoom.select"}),Xk.extend({type:"dataZoom.select"});var sO=wM.toolbox.dataZoom,lO=d,hO="\0_ec_\0toolbox-dataZoom_";Oy.defaultOption={show:!0,icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:i(sO.title)};var uO=Oy.prototype;uO.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,zy(t,e,this,n,i),Ey(t,e)},uO.onclick=function(t,e,i){cO[i].call(this)},uO.remove=function(t,e){this._brushController.unmount()},uO.dispose=function(t,e){this._brushController.dispose()};var cO={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(Cy(this.ecModel))}};uO._onBrush=function(t,e){function i(t,e,i){var r=e.getAxis(t),s=r.model,l=n(t,s,a),h=l.findRepresentativeAxisProxy(s).getMinMaxSpan();null==h.minValueSpan&&null==h.maxValueSpan||(i=jD(0,i.slice(),r.scale.getExtent(),0,h.minValueSpan,h.maxValueSpan)),l&&(o[l.id]={dataZoomId:l.id,startValue:i[0],endValue:i[1]})}function n(t,e,i){var n;return i.eachComponent({mainType:"dataZoom",subType:"select"},function(i){i.getAxisModel(t,e.componentIndex)&&(n=i)}),n}if(e.isEnd&&t.length){var o={},a=this.ecModel;this._brushController.updateCovers([]),new zm(Ny(this.model.option),a,{include:["grid"]}).matchOutputRanges(t,a,function(t,e,n){if("cartesian2d"===n.type){var o=t.brushType;"rect"===o?(i("x",n,e[0]),i("y",n,e[1])):i({lineX:"x",lineY:"y"}[o],n,e)}}),Dy(a,o),this._dispatchZoomAction(o)}},uO._dispatchZoomAction=function(t){var e=[];lO(t,function(t,n){e.push(i(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},Jm("dataZoom",Oy),ss(function(t){function e(t,e){if(e){var o=t+"Index",a=e[o];null==a||"all"==a||y(a)||(a=!1===a||"none"===a?[]:[a]),i(t,function(e,i){if(null==a||"all"==a||-1!==l(a,i)){var r={type:"select",$fromToolbox:!0,id:hO+t+i};r[o]=i,n.push(r)}})}}function i(e,i){var n=t[e];y(n)||(n=n?[n]:[]),lO(n,i)}if(t){var n=t.dataZoom||(t.dataZoom=[]);y(n)||(t.dataZoom=n=[n]);var o=t.toolbox;if(o&&(y(o)&&(o=o[0]),o&&o.feature)){var a=o.feature.dataZoom;e("xAxis",a),e("yAxis",a)}}});var dO=wM.toolbox.restore;Ry.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:dO.title},Ry.prototype.onclick=function(t,e,i){Ly(t),e.dispatchAction({type:"restore",from:this.uid})},Jm("restore",Ry),hs({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var fO,pO="urn:schemas-microsoft-com:vml",gO="undefined"==typeof window?null:window,mO=!1,vO=gO&&gO.document;if(vO&&!_x.canvasSupported)try{!vO.namespaces.zrvml&&vO.namespaces.add("zrvml",pO),fO=function(t){return vO.createElement("
"), this
+ }, this.saveAsLocalImage = function (a, b) {
+ var c = this.eagleEye.getImage(a, b);
+ return c.replace("image/png", "image/octet-stream"), window.location.href = c, this
+ }, this.paint = function () {
+ null != this.canvas && (this.graphics.save(), this.graphics.clearRect(0, 0, this.width, this.height), this.childs.forEach(function (a) {
+ 1 == a.visible && a.repaint(n.graphics)
+ }), 1 == this.eagleEye.visible && this.eagleEye.paint(this), this.graphics.restore())
+ }, this.repaint = function () {
+ 0 != this.frames && (this.frames < 0 && 0 == this.needRepaint || (this.paint(), this.frames < 0 && (this.needRepaint = !1)))
+ }, this.zoom = function (a) {
+ this.childs.forEach(function (b) {
+ 0 != b.visible && b.zoom(a)
+ })
+ }, this.zoomOut = function (a) {
+ this.childs.forEach(function (b) {
+ 0 != b.visible && b.zoomOut(a)
+ })
+ }, this.zoomIn = function (a) {
+ this.childs.forEach(function (b) {
+ 0 != b.visible && b.zoomIn(a)
+ })
+ }, this.centerAndZoom = function () {
+ this.childs.forEach(function (a) {
+ 0 != a.visible && a.centerAndZoom()
+ })
+ }, this.setCenter = function (a, b) {
+ var c = this;
+ this.childs.forEach(function (d) {
+ var e = a - c.canvas.width / 2, f = b - c.canvas.height / 2;
+ d.translateX = -e, d.translateY = -f
+ })
+ }, this.getBound = function () {
+ var a = {left: Number.MAX_VALUE, right: Number.MIN_VALUE, top: Number.MAX_VALUE, bottom: Number.MIN_VALUE};
+ return this.childs.forEach(function (b) {
+ var c = b.getElementsBound();
+ c.left < a.left && (a.left = c.left, a.leftNode = c.leftNode), c.top < a.top && (a.top = c.top, a.topNode = c.topNode), c.right > a.right && (a.right = c.right, a.rightNode = c.rightNode), c.bottom > a.bottom && (a.bottom = c.bottom, a.bottomNode = c.bottomNode)
+ }), a.width = a.right - a.left, a.height = a.bottom - a.top, a
+ }, this.toJson = function () {
+ {
+ var b = this, c = '{"version":"' + a.version + '",';
+ this.serializedProperties.length
+ }
+ return this.serializedProperties.forEach(function (a) {
+ var d = b[a];
+ "string" == typeof d && (d = '"' + d + '"'), c += '"' + a + '":' + d + ","
+ }), c += '"childs":[', this.childs.forEach(function (a) {
+ c += a.toJson()
+ }), c += "]", c += "}"
+ }, function () {
+ 0 == n.frames ? setTimeout(arguments.callee, 100) : n.frames < 0 ? (n.repaint(), setTimeout(arguments.callee, 1e3 / -n.frames)) : (n.repaint(), setTimeout(arguments.callee, 1e3 / n.frames))
+ }(), setTimeout(function () {
+ n.mousewheel(function (a) {
+ var b = null == a.wheelDelta ? a.detail : a.wheelDelta;
+ null != this.wheelZoom && (b > 0 ? this.zoomIn(this.wheelZoom) : this.zoomOut(this.wheelZoom))
+ }), n.paint()
+ }, 300), setTimeout(function () {
+ n.paint()
+ }, 1e3), setTimeout(function () {
+ n.paint()
+ }, 3e3)
+ }
+
+ c.prototype = {
+ get width() {
+ return this.canvas.width
+ }, get height() {
+ return this.canvas.height
+ }, set cursor(a) {
+ this.canvas.style.cursor = a
+ }, get cursor() {
+ return this.canvas.style.cursor
+ }, set mode(a) {
+ this.childs.forEach(function (b) {
+ b.mode = a
+ })
+ }
+ }, a.Stage = c
+}(JTopo), function (a) {
+ function b(c) {
+ function d(a, b, c, d) {
+ return function (e) {
+ e.beginPath(), e.strokeStyle = "rgba(0,0,236,0.5)", e.fillStyle = "rgba(0,0,236,0.1)", e.rect(a, b, c, d), e.fill(), e.stroke(), e.closePath()
+ }
+ }
+
+ var e = this;
+ this.initialize = function () {
+ b.prototype.initialize.apply(this, arguments), this.messageBus = new a.util.MessageBus, this.elementType = "scene", this.childs = [], this.zIndexMap = {}, this.zIndexArray = [], this.backgroundColor = "255,255,255", this.visible = !0, this.alpha = 0, this.scaleX = 1, this.scaleY = 1, this.mode = a.SceneMode.normal, this.translate = !0, this.translateX = 0, this.translateY = 0, this.lastTranslateX = 0, this.lastTranslateY = 0, this.mouseDown = !1, this.mouseDownX = null, this.mouseDownY = null, this.mouseDownEvent = null, this.areaSelect = !0, this.operations = [], this.selectedElements = [], this.paintAll = !1;
+ var c = "background,backgroundColor,mode,paintAll,areaSelect,translate,translateX,translateY,lastTranslatedX,lastTranslatedY,alpha,visible,scaleX,scaleY".split(",");
+ this.serializedProperties = this.serializedProperties.concat(c)
+ }, this.initialize(), this.setBackground = function (a) {
+ this.background = a
+ }, this.addTo = function (a) {
+ this.stage !== a && null != a && (this.stage = a)
+ }, null != c && (c.add(this), this.addTo(c)), this.show = function () {
+ this.visible = !0
+ }, this.hide = function () {
+ this.visible = !1
+ }, this.paint = function (a) {
+ if (0 != this.visible && null != this.stage) {
+ if (a.save(), this.paintBackgroud(a), a.restore(), a.save(), a.scale(this.scaleX, this.scaleY), 1 == this.translate) {
+ var b = this.getOffsetTranslate(a);
+ a.translate(b.translateX, b.translateY)
+ }
+ this.paintChilds(a), a.restore(), a.save(), this.paintOperations(a, this.operations), a.restore()
+ }
+ }, this.repaint = function (a) {
+ 0 != this.visible && this.paint(a)
+ }, this.paintBackgroud = function (a) {
+ null != this.background ? a.drawImage(this.background, 0, 0, a.canvas.width, a.canvas.height) : (a.beginPath(), a.fillStyle = "rgba(" + this.backgroundColor + "," + this.alpha + ")", a.fillRect(0, 0, a.canvas.width, a.canvas.height), a.closePath())
+ }, this.getDisplayedElements = function () {
+ for (var a = [], b = 0; b < this.zIndexArray.length; b++) for (var c = this.zIndexArray[b], d = this.zIndexMap[c], e = 0; e < d.length; e++) {
+ var f = d[e];
+ this.isVisiable(f) && a.push(f)
+ }
+ return a
+ }, this.getDisplayedNodes = function () {
+ for (var b = [], c = 0; c < this.childs.length; c++) {
+ var d = this.childs[c];
+ d instanceof a.Node && this.isVisiable(d) && b.push(d)
+ }
+ return b
+ }, this.paintChilds = function (b) {
+ for (var c = 0; c < this.zIndexArray.length; c++) for (var d = this.zIndexArray[c], e = this.zIndexMap[d], f = 0; f < e.length; f++) {
+ var g = e[f];
+ if (1 == this.paintAll || this.isVisiable(g)) {
+ if (b.save(), 1 == g.transformAble) {
+ var h = g.getCenterLocation();
+ b.translate(h.x, h.y), g.rotate && b.rotate(g.rotate), g.scaleX && g.scaleY ? b.scale(g.scaleX, g.scaleY) : g.scaleX ? b.scale(g.scaleX, 1) : g.scaleY && b.scale(1, g.scaleY)
+ }
+ 1 == g.shadow && (b.shadowBlur = g.shadowBlur, b.shadowColor = g.shadowColor, b.shadowOffsetX = g.shadowOffsetX, b.shadowOffsetY = g.shadowOffsetY), g instanceof a.InteractiveElement && (g.selected && 1 == g.showSelected && g.paintSelected(b), 1 == g.isMouseOver && g.paintMouseover(b)), g.paint(b), b.restore()
+ }
+ }
+ }, this.getOffsetTranslate = function (a) {
+ var b = this.stage.canvas.width, c = this.stage.canvas.height;
+ null != a && "move" != a && (b = a.canvas.width, c = a.canvas.height);
+ var d = b / this.scaleX / 2, e = c / this.scaleY / 2, f = {
+ translateX: this.translateX + (d - d * this.scaleX),
+ translateY: this.translateY + (e - e * this.scaleY)
+ };
+ return f
+ }, this.isVisiable = function (b) {
+ if (1 != b.visible) return !1;
+ if (b instanceof a.Link) return !0;
+ var c = this.getOffsetTranslate(), d = b.x + c.translateX, e = b.y + c.translateY;
+ d *= this.scaleX, e *= this.scaleY;
+ var f = d + b.width * this.scaleX, g = e + b.height * this.scaleY;
+ return d > this.stage.canvas.width || e > this.stage.canvas.height || 0 > f || 0 > g ? !1 : !0
+ }, this.paintOperations = function (a, b) {
+ for (var c = 0; c < b.length; c++) b[c](a)
+ }, this.findElements = function (a) {
+ for (var b = [], c = 0; c < this.childs.length; c++) 1 == a(this.childs[c]) && b.push(this.childs[c]);
+ return b
+ }, this.getElementsByClass = function (a) {
+ return this.findElements(function (b) {
+ return b instanceof a
+ })
+ }, this.addOperation = function (a) {
+ return this.operations.push(a), this
+ }, this.clearOperations = function () {
+ return this.operations = [], this
+ }, this.getElementByXY = function (b, c) {
+ for (var d = null, e = this.zIndexArray.length - 1; e >= 0; e--) for (var f = this.zIndexArray[e], g = this.zIndexMap[f], h = g.length - 1; h >= 0; h--) {
+ var i = g[h];
+ if (i instanceof a.InteractiveElement && this.isVisiable(i) && i.isInBound(b, c)) return d = i
+ }
+ return d
+ }, this.add = function (a) {
+ this.childs.push(a), null == this.zIndexMap[a.zIndex] && (this.zIndexMap[a.zIndex] = [], this.zIndexArray.push(a.zIndex), this.zIndexArray.sort(function (a, b) {
+ return a - b
+ })), this.zIndexMap["" + a.zIndex].push(a)
+ }, this.remove = function (b) {
+ this.childs = a.util.removeFromArray(this.childs, b);
+ var c = this.zIndexMap[b.zIndex];
+ c && (this.zIndexMap[b.zIndex] = a.util.removeFromArray(c, b)), b.removeHandler(this)
+ }, this.clear = function () {
+ var a = this;
+ this.childs.forEach(function (b) {
+ b.removeHandler(a)
+ }), this.childs = [], this.operations = [], this.zIndexArray = [], this.zIndexMap = {}
+ }, this.addToSelected = function (a) {
+ this.selectedElements.push(a)
+ }, this.cancleAllSelected = function (a) {
+ for (var b = 0; b < this.selectedElements.length; b++) this.selectedElements[b].unselectedHandler(a);
+ this.selectedElements = []
+ }, this.notInSelectedNodes = function (a) {
+ for (var b = 0; b < this.selectedElements.length; b++) if (a === this.selectedElements[b]) return !1;
+ return !0
+ }, this.removeFromSelected = function (a) {
+ for (var b = 0; b < this.selectedElements.length; b++) {
+ var c = this.selectedElements[b];
+ a === c && (this.selectedElements = this.selectedElements.del(b))
+ }
+ }, this.toSceneEvent = function (b) {
+ var c = a.util.clone(b);
+ if (c.x /= this.scaleX, c.y /= this.scaleY, 1 == this.translate) {
+ var d = this.getOffsetTranslate();
+ c.x -= d.translateX, c.y -= d.translateY
+ }
+ return null != c.dx && (c.dx /= this.scaleX, c.dy /= this.scaleY), null != this.currentElement && (c.target = this.currentElement), c.scene = this, c
+ }, this.selectElement = function (a) {
+ var b = e.getElementByXY(a.x, a.y);
+ if (null != b) if (a.target = b, b.mousedownHander(a), b.selectedHandler(a), e.notInSelectedNodes(b)) a.ctrlKey || e.cancleAllSelected(), e.addToSelected(b); else {
+ 1 == a.ctrlKey && (b.unselectedHandler(), this.removeFromSelected(b));
+ for (var c = 0; c < this.selectedElements.length; c++) {
+ var d = this.selectedElements[c];
+ d.selectedHandler(a)
+ }
+ } else a.ctrlKey || e.cancleAllSelected();
+ this.currentElement = b
+ }, this.mousedownHandler = function (b) {
+ var c = this.toSceneEvent(b);
+ if (this.mouseDown = !0, this.mouseDownX = c.x, this.mouseDownY = c.y, this.mouseDownEvent = c, this.mode == a.SceneMode.normal) this.selectElement(c), (null == this.currentElement || this.currentElement instanceof a.Link) && 1 == this.translate && (this.lastTranslateX = this.translateX, this.lastTranslateY = this.translateY); else {
+ if (this.mode == a.SceneMode.drag && 1 == this.translate) return this.lastTranslateX = this.translateX, void(this.lastTranslateY = this.translateY);
+ this.mode == a.SceneMode.select ? this.selectElement(c) : this.mode == a.SceneMode.edit && (this.selectElement(c), (null == this.currentElement || this.currentElement instanceof a.Link) && 1 == this.translate && (this.lastTranslateX = this.translateX, this.lastTranslateY = this.translateY))
+ }
+ e.dispatchEvent("mousedown", c)
+ }, this.mouseupHandler = function (b) {
+ this.stage.cursor != a.MouseCursor.normal && (this.stage.cursor = a.MouseCursor.normal), e.clearOperations();
+ var c = this.toSceneEvent(b);
+ null != this.currentElement && (c.target = e.currentElement, this.currentElement.mouseupHandler(c)), this.dispatchEvent("mouseup", c), this.mouseDown = !1
+ }, this.dragElements = function (b) {
+ if (null != this.currentElement && 1 == this.currentElement.dragable) for (var c = 0; c < this.selectedElements.length; c++) {
+ var d = this.selectedElements[c];
+ if (0 != d.dragable) {
+ var e = a.util.clone(b);
+ e.target = d, d.mousedragHandler(e)
+ }
+ }
+ }, this.mousedragHandler = function (b) {
+ var c = this.toSceneEvent(b);
+ this.mode == a.SceneMode.normal ? null == this.currentElement || this.currentElement instanceof a.Link ? 1 == this.translate && (this.stage.cursor = a.MouseCursor.closed_hand, this.translateX = this.lastTranslateX + c.dx, this.translateY = this.lastTranslateY + c.dy) : this.dragElements(c) : this.mode == a.SceneMode.drag ? 1 == this.translate && (this.stage.cursor = a.MouseCursor.closed_hand, this.translateX = this.lastTranslateX + c.dx, this.translateY = this.lastTranslateY + c.dy) : this.mode == a.SceneMode.select ? null != this.currentElement ? 1 == this.currentElement.dragable && this.dragElements(c) : 1 == this.areaSelect && this.areaSelectHandle(c) : this.mode == a.SceneMode.edit && (null == this.currentElement || this.currentElement instanceof a.Link ? 1 == this.translate && (this.stage.cursor = a.MouseCursor.closed_hand, this.translateX = this.lastTranslateX + c.dx, this.translateY = this.lastTranslateY + c.dy) : this.dragElements(c)), this.dispatchEvent("mousedrag", c)
+ }, this.areaSelectHandle = function (a) {
+ var b = a.offsetLeft, c = a.offsetTop, f = this.mouseDownEvent.offsetLeft,
+ g = this.mouseDownEvent.offsetTop, h = b >= f ? f : b, i = c >= g ? g : c,
+ j = Math.abs(a.dx) * this.scaleX, k = Math.abs(a.dy) * this.scaleY, l = new d(h, i, j, k);
+ e.clearOperations().addOperation(l), b = a.x, c = a.y, f = this.mouseDownEvent.x, g = this.mouseDownEvent.y, h = b >= f ? f : b, i = c >= g ? g : c, j = Math.abs(a.dx), k = Math.abs(a.dy);
+ for (var m = h + j, n = i + k, o = 0; o < e.childs.length; o++) {
+ var p = e.childs[o];
+ p.x > h && p.x + p.width < m && p.y > i && p.y + p.height < n && e.notInSelectedNodes(p) && (p.selectedHandler(a), e.addToSelected(p))
+ }
+ }, this.mousemoveHandler = function (b) {
+ this.mousecoord = {x: b.x, y: b.y};
+ var c = this.toSceneEvent(b);
+ if (this.mode == a.SceneMode.drag) return void(this.stage.cursor = a.MouseCursor.open_hand);
+ this.mode == a.SceneMode.normal ? this.stage.cursor = a.MouseCursor.normal : this.mode == a.SceneMode.select && (this.stage.cursor = a.MouseCursor.normal);
+ var d = e.getElementByXY(c.x, c.y);
+ null != d ? (e.mouseOverelement && e.mouseOverelement !== d && (c.target = d, e.mouseOverelement.mouseoutHandler(c)), e.mouseOverelement = d, 0 == d.isMouseOver ? (c.target = d, d.mouseoverHandler(c), e.dispatchEvent("mouseover", c)) : (c.target = d, d.mousemoveHandler(c), e.dispatchEvent("mousemove", c))) : e.mouseOverelement ? (c.target = d, e.mouseOverelement.mouseoutHandler(c), e.mouseOverelement = null, e.dispatchEvent("mouseout", c)) : (c.target = null, e.dispatchEvent("mousemove", c))
+ }, this.mouseoverHandler = function (a) {
+ var b = this.toSceneEvent(a);
+ this.dispatchEvent("mouseover", b)
+ }, this.mouseoutHandler = function (a) {
+ var b = this.toSceneEvent(a);
+ this.dispatchEvent("mouseout", b)
+ }, this.clickHandler = function (a) {
+ var b = this.toSceneEvent(a);
+ this.currentElement && (b.target = this.currentElement, this.currentElement.clickHandler(b)), this.dispatchEvent("click", b)
+ }, this.dbclickHandler = function (a) {
+ var b = this.toSceneEvent(a);
+ this.currentElement ? (b.target = this.currentElement, this.currentElement.dbclickHandler(b)) : e.cancleAllSelected(), this.dispatchEvent("dbclick", b)
+ }, this.mousewheelHandler = function (a) {
+ var b = this.toSceneEvent(a);
+ this.dispatchEvent("mousewheel", b)
+ }, this.touchstart = this.mousedownHander, this.touchmove = this.mousedragHandler, this.touchend = this.mousedownHander, this.keydownHandler = function (a) {
+ this.dispatchEvent("keydown", a)
+ }, this.keyupHandler = function (a) {
+ this.dispatchEvent("keyup", a)
+ }, this.addEventListener = function (a, b) {
+ var c = this, d = function (a) {
+ b.call(c, a)
+ };
+ return this.messageBus.subscribe(a, d), this
+ }, this.removeEventListener = function (a) {
+ this.messageBus.unsubscribe(a)
+ }, this.removeAllEventListener = function () {
+ this.messageBus = new a.util.MessageBus
+ }, this.dispatchEvent = function (a, b) {
+ return this.messageBus.publish(a, b), this
+ };
+ var f = "click,dbclick,mousedown,mouseup,mouseover,mouseout,mousemove,mousedrag,mousewheel,touchstart,touchmove,touchend,keydown,keyup".split(","),
+ g = this;
+ return f.forEach(function (a) {
+ g[a] = function (b) {
+ null != b ? this.addEventListener(a, b) : this.dispatchEvent(a)
+ }
+ }), this.zoom = function (a, b) {
+ null != a && 0 != a && (this.scaleX = a), null != b && 0 != b && (this.scaleY = b)
+ }, this.zoomOut = function (a) {
+ 0 != a && (null == a && (a = .8), this.scaleX /= a, this.scaleY /= a)
+ }, this.zoomIn = function (a) {
+ 0 != a && (null == a && (a = .8), this.scaleX *= a, this.scaleY *= a)
+ }, this.getBound = function () {
+ return {
+ left: 0,
+ top: 0,
+ right: this.stage.canvas.width,
+ bottom: this.stage.canvas.height,
+ width: this.stage.canvas.width,
+ height: this.stage.canvas.height
+ }
+ }, this.getElementsBound = function () {
+ return a.util.getElementsBound(this.childs)
+ }, this.translateToCenter = function (a) {
+ var b = this.getElementsBound(), c = this.stage.canvas.width / 2 - (b.left + b.right) / 2,
+ d = this.stage.canvas.height / 2 - (b.top + b.bottom) / 2;
+ a && (c = a.canvas.width / 2 - (b.left + b.right) / 2, d = a.canvas.height / 2 - (b.top + b.bottom) / 2), this.translateX = c, this.translateY = d
+ }, this.setCenter = function (a, b) {
+ var c = a - this.stage.canvas.width / 2, d = b - this.stage.canvas.height / 2;
+ this.translateX = -c, this.translateY = -d
+ }, this.centerAndZoom = function (a, b, c) {
+ if (this.translateToCenter(c), null == a || null == b) {
+ var d = this.getElementsBound(), e = d.right - d.left, f = d.bottom - d.top,
+ g = this.stage.canvas.width / e, h = this.stage.canvas.height / f;
+ c && (g = c.canvas.width / e, h = c.canvas.height / f);
+ var i = Math.min(g, h);
+ if (i > 1) return;
+ this.zoom(i, i)
+ }
+ this.zoom(a, b)
+ }, this.getCenterLocation = function () {
+ return {x: e.stage.canvas.width / 2, y: e.stage.canvas.height / 2}
+ }, this.doLayout = function (a) {
+ a && a(this, this.childs)
+ }, this.toJson = function () {
+ {
+ var a = this, b = "{";
+ this.serializedProperties.length
+ }
+ this.serializedProperties.forEach(function (c) {
+ var d = a[c];
+ "background" == c && (d = a._background.src), "string" == typeof d && (d = '"' + d + '"'), b += '"' + c + '":' + d + ","
+ }), b += '"childs":[';
+ var c = this.childs.length;
+ return this.childs.forEach(function (a, d) {
+ b += a.toJson(), c > d + 1 && (b += ",")
+ }), b += "]", b += "}"
+ }, e
+ }
+
+ b.prototype = new a.Element;
+ var c = {};
+ Object.defineProperties(b.prototype, {
+ background: {
+ get: function () {
+ return this._background
+ }, set: function (a) {
+ if ("string" == typeof a) {
+ var b = c[a];
+ null == b && (b = new Image, b.src = a, b.onload = function () {
+ c[a] = b
+ }), this._background = b
+ } else this._background = a
+ }
+ }
+ }), a.Scene = b
+}(JTopo), function (a) {
+ function b() {
+ this.initialize = function () {
+ b.prototype.initialize.apply(this, arguments), this.elementType = "displayElement", this.x = 0, this.y = 0, this.width = 32, this.height = 32, this.visible = !0, this.alpha = 1, this.rotate = 0, this.scaleX = 1, this.scaleY = 1, this.strokeColor = "22,124,255", this.borderColor = "22,124,255", this.fillColor = "22,124,255", this.shadow = !1, this.shadowBlur = 5, this.shadowColor = "rgba(0,0,0,0.5)", this.shadowOffsetX = 3, this.shadowOffsetY = 6, this.transformAble = !1, this.zIndex = 0;
+ var a = "x,y,width,height,visible,alpha,rotate,scaleX,scaleY,strokeColor,fillColor,shadow,shadowColor,shadowOffsetX,shadowOffsetY,transformAble,zIndex".split(",");
+ this.serializedProperties = this.serializedProperties.concat(a)
+ }, this.initialize(), this.paint = function (a) {
+ a.beginPath(), a.fillStyle = "rgba(" + this.fillColor + "," + this.alpha + ")", a.rect(-this.width / 2, -this.height / 2, this.width, this.height), a.fill(), a.stroke(), a.closePath()
+ }, this.getLocation = function () {
+ return {x: this.x, y: this.y}
+ }, this.setLocation = function (a, b) {
+ return this.x = a, this.y = b, this
+ }, this.getCenterLocation = function () {
+ return {x: this.x + this.width / 2, y: this.y + this.height / 2}
+ }, this.setCenterLocation = function (a, b) {
+ return this.x = a - this.width / 2, this.y = b - this.height / 2, this
+ }, this.getSize = function () {
+ return {width: this.width, height: this.heith}
+ }, this.setSize = function (a, b) {
+ return this.width = a, this.height = b, this
+ }, this.getBound = function () {
+ return {
+ left: this.x,
+ top: this.y,
+ right: this.x + this.width,
+ bottom: this.y + this.height,
+ width: this.width,
+ height: this.height
+ }
+ }, this.setBound = function (a, b, c, d) {
+ return this.setLocation(a, b), this.setSize(c, d), this
+ }, this.getDisplayBound = function () {
+ return {
+ left: this.x,
+ top: this.y,
+ right: this.x + this.width * this.scaleX,
+ bottom: this.y + this.height * this.scaleY
+ }
+ }, this.getDisplaySize = function () {
+ return {width: this.width * this.scaleX, height: this.height * this.scaleY}
+ }, this.getPosition = function (a) {
+ var b, c = this.getBound();
+ return "Top_Left" == a ? b = {x: c.left, y: c.top} : "Top_Center" == a ? b = {
+ x: this.cx,
+ y: c.top
+ } : "Top_Right" == a ? b = {x: c.right, y: c.top} : "Middle_Left" == a ? b = {
+ x: c.left,
+ y: this.cy
+ } : "Middle_Center" == a ? b = {x: this.cx, y: this.cy} : "Middle_Right" == a ? b = {
+ x: c.right,
+ y: this.cy
+ } : "Bottom_Left" == a ? b = {x: c.left, y: c.bottom} : "Bottom_Center" == a ? b = {
+ x: this.cx,
+ y: c.bottom
+ } : "Bottom_Right" == a && (b = {x: c.right, y: c.bottom}), b
+ }
+ }
+
+ function c() {
+ this.initialize = function () {
+ c.prototype.initialize.apply(this, arguments), this.elementType = "interactiveElement", this.dragable = !1, this.selected = !1, this.showSelected = !0, this.selectedLocation = null, this.isMouseOver = !1;
+ var a = "dragable,selected,showSelected,isMouseOver".split(",");
+ this.serializedProperties = this.serializedProperties.concat(a)
+ }, this.initialize(), this.paintSelected = function (a) {
+ 0 != this.showSelected && (a.save(), a.beginPath(), a.strokeStyle = "rgba(168,202,255, 0.9)", a.fillStyle = "rgba(168,202,236,0.7)", a.rect(-this.width / 2 - 3, -this.height / 2 - 3, this.width + 6, this.height + 6), a.fill(), a.stroke(), a.closePath(), a.restore())
+ }, this.paintMouseover = function (a) {
+ return this.paintSelected(a)
+ }, this.isInBound = function (a, b) {
+ return a > this.x && a < this.x + this.width * Math.abs(this.scaleX) && b > this.y && b < this.y + this.height * Math.abs(this.scaleY)
+ }, this.selectedHandler = function () {
+ this.selected = !0, this.selectedLocation = {x: this.x, y: this.y}
+ }, this.unselectedHandler = function () {
+ this.selected = !1, this.selectedLocation = null
+ }, this.dbclickHandler = function (a) {
+ this.dispatchEvent("dbclick", a)
+ }, this.clickHandler = function (a) {
+ this.dispatchEvent("click", a)
+ }, this.mousedownHander = function (a) {
+ this.dispatchEvent("mousedown", a)
+ }, this.mouseupHandler = function (a) {
+ this.dispatchEvent("mouseup", a)
+ }, this.mouseoverHandler = function (a) {
+ this.isMouseOver = !0, this.dispatchEvent("mouseover", a)
+ }, this.mousemoveHandler = function (a) {
+ this.dispatchEvent("mousemove", a)
+ }, this.mouseoutHandler = function (a) {
+ this.isMouseOver = !1, this.dispatchEvent("mouseout", a)
+ }, this.mousedragHandler = function (a) {
+ var b = this.selectedLocation.x + a.dx, c = this.selectedLocation.y + a.dy;
+ this.setLocation(b, c), this.dispatchEvent("mousedrag", a)
+ }, this.addEventListener = function (b, c) {
+ var d = this, e = function (a) {
+ c.call(d, a)
+ };
+ return this.messageBus || (this.messageBus = new a.util.MessageBus), this.messageBus.subscribe(b, e), this
+ }, this.dispatchEvent = function (a, b) {
+ return this.messageBus ? (this.messageBus.publish(a, b), this) : null
+ }, this.removeEventListener = function (a) {
+ this.messageBus.unsubscribe(a)
+ }, this.removeAllEventListener = function () {
+ this.messageBus = new a.util.MessageBus
+ };
+ var b = "click,dbclick,mousedown,mouseup,mouseover,mouseout,mousemove,mousedrag,touchstart,touchmove,touchend".split(","),
+ d = this;
+ b.forEach(function (a) {
+ d[a] = function (b) {
+ null != b ? this.addEventListener(a, b) : this.dispatchEvent(a)
+ }
+ })
+ }
+
+ function d() {
+ this.initialize = function () {
+ d.prototype.initialize.apply(this, arguments), this.editAble = !1, this.selectedPoint = null
+ }, this.getCtrlPosition = function (a) {
+ var b = 5, c = 5, d = this.getPosition(a);
+ return {left: d.x - b, top: d.y - c, right: d.x + b, bottom: d.y + c}
+ }, this.selectedHandler = function (b) {
+ d.prototype.selectedHandler.apply(this, arguments), this.selectedSize = {
+ width: this.width,
+ height: this.height
+ }, b.scene.mode == a.SceneMode.edit && (this.editAble = !0)
+ }, this.unselectedHandler = function () {
+ d.prototype.unselectedHandler.apply(this, arguments), this.selectedSize = null, this.editAble = !1
+ };
+ var b = ["Top_Left", "Top_Center", "Top_Right", "Middle_Left", "Middle_Right", "Bottom_Left", "Bottom_Center", "Bottom_Right"];
+ this.paintCtrl = function (a) {
+ if (0 != this.editAble) {
+ a.save();
+ for (var c = 0; c < b.length; c++) {
+ var d = this.getCtrlPosition(b[c]);
+ d.left -= this.cx, d.right -= this.cx, d.top -= this.cy, d.bottom -= this.cy;
+ var e = d.right - d.left, f = d.bottom - d.top;
+ a.beginPath(), a.strokeStyle = "rgba(0,0,0,0.8)", a.rect(d.left, d.top, e, f), a.stroke(), a.closePath(), a.beginPath(), a.strokeStyle = "rgba(255,255,255,0.3)", a.rect(d.left + 1, d.top + 1, e - 2, f - 2), a.stroke(), a.closePath()
+ }
+ a.restore()
+ }
+ }, this.isInBound = function (a, c) {
+ if (this.selectedPoint = null, 1 == this.editAble) for (var e = 0; e < b.length; e++) {
+ var f = this.getCtrlPosition(b[e]);
+ if (a > f.left && a < f.right && c > f.top && c < f.bottom) return this.selectedPoint = b[e], !0
+ }
+ return d.prototype.isInBound.apply(this, arguments)
+ }, this.mousedragHandler = function (a) {
+ if (null == this.selectedPoint) {
+ var b = this.selectedLocation.x + a.dx, c = this.selectedLocation.y + a.dy;
+ this.setLocation(b, c), this.dispatchEvent("mousedrag", a)
+ } else {
+ if ("Top_Left" == this.selectedPoint) {
+ var d = this.selectedSize.width - a.dx, e = this.selectedSize.height - a.dy,
+ b = this.selectedLocation.x + a.dx, c = this.selectedLocation.y + a.dy;
+ b < this.x + this.width && (this.x = b, this.width = d), c < this.y + this.height && (this.y = c, this.height = e)
+ } else if ("Top_Center" == this.selectedPoint) {
+ var e = this.selectedSize.height - a.dy, c = this.selectedLocation.y + a.dy;
+ c < this.y + this.height && (this.y = c, this.height = e)
+ } else if ("Top_Right" == this.selectedPoint) {
+ var d = this.selectedSize.width + a.dx, c = this.selectedLocation.y + a.dy;
+ c < this.y + this.height && (this.y = c, this.height = this.selectedSize.height - a.dy), d > 1 && (this.width = d)
+ } else if ("Middle_Left" == this.selectedPoint) {
+ var d = this.selectedSize.width - a.dx, b = this.selectedLocation.x + a.dx;
+ b < this.x + this.width && (this.x = b), d > 1 && (this.width = d)
+ } else if ("Middle_Right" == this.selectedPoint) {
+ var d = this.selectedSize.width + a.dx;
+ d > 1 && (this.width = d)
+ } else if ("Bottom_Left" == this.selectedPoint) {
+ var d = this.selectedSize.width - a.dx, b = this.selectedLocation.x + a.dx;
+ d > 1 && (this.x = b, this.width = d);
+ var e = this.selectedSize.height + a.dy;
+ e > 1 && (this.height = e)
+ } else if ("Bottom_Center" == this.selectedPoint) {
+ var e = this.selectedSize.height + a.dy;
+ e > 1 && (this.height = e)
+ } else if ("Bottom_Right" == this.selectedPoint) {
+ var d = this.selectedSize.width + a.dx;
+ d > 1 && (this.width = d);
+ var e = this.selectedSize.height + a.dy;
+ e > 1 && (this.height = e)
+ }
+ this.dispatchEvent("resize", a)
+ }
+ }
+ }
+
+ b.prototype = new a.Element, Object.defineProperties(b.prototype, {
+ cx: {
+ get: function () {
+ return this.x + this.width / 2
+ }, set: function (a) {
+ this.x = a - this.width / 2
+ }
+ }, cy: {
+ get: function () {
+ return this.y + this.height / 2
+ }, set: function (a) {
+ this.y = a - this.height / 2
+ }
+ }
+ }), c.prototype = new b, d.prototype = new c, a.DisplayElement = b, a.InteractiveElement = c, a.EditableElement = d
+}(JTopo), function (a) {
+ function b(c) {
+ this.initialize = function (c) {
+ b.prototype.initialize.apply(this, arguments), this.elementType = "node", this.zIndex = a.zIndex_Node, this.text = c, this.font = "12px Consolas", this.fontColor = "255,255,255", this.borderWidth = 0, this.borderColor = "255,255,255", this.borderRadius = null, this.dragable = !0, this.textPosition = "Bottom_Center", this.textOffsetX = 0, this.textOffsetY = 0, this.transformAble = !0, this.inLinks = null, this.outLinks = null;
+ var d = "text,font,fontColor,textPosition,textOffsetX,textOffsetY,borderRadius".split(",");
+ this.serializedProperties = this.serializedProperties.concat(d)
+ }, this.initialize(c), this.paint = function (a) {
+ if (this.image) {
+ var b = a.globalAlpha;
+ a.globalAlpha = this.alpha, null != this.image.alarm && null != this.alarm ? a.drawImage(this.image.alarm, -this.width / 2, -this.height / 2, this.width, this.height) : a.drawImage(this.image, -this.width / 2, -this.height / 2, this.width, this.height), a.globalAlpha = b
+ } else a.beginPath(), a.fillStyle = "rgba(" + this.fillColor + "," + this.alpha + ")", null == this.borderRadius || 0 == this.borderRadius ? a.rect(-this.width / 2, -this.height / 2, this.width, this.height) : a.JTopoRoundRect(-this.width / 2, -this.height / 2, this.width, this.height, this.borderRadius), a.fill(), a.closePath();
+ this.paintText(a), this.paintBorder(a), this.paintCtrl(a), this.paintAlarmText(a)
+ }, this.paintAlarmText = function (a) {
+ if (null != this.alarm && "" != this.alarm) {
+ var b = this.alarmColor || "255,0,0", c = this.alarmAlpha || .5;
+ a.beginPath(), a.font = this.alarmFont || "10px 寰î¿èéå´ç²¦";
+ var d = a.measureText(this.alarm).width + 6, e = a.measureText("é¢ï¿½").width + 6,
+ f = this.width / 2 - d / 2, g = -this.height / 2 - e - 8;
+ a.strokeStyle = "rgba(" + b + ", " + c + ")", a.fillStyle = "rgba(" + b + ", " + c + ")", a.lineCap = "round", a.lineWidth = 1, a.moveTo(f, g), a.lineTo(f + d, g), a.lineTo(f + d, g + e), a.lineTo(f + d / 2 + 6, g + e), a.lineTo(f + d / 2, g + e + 8), a.lineTo(f + d / 2 - 6, g + e), a.lineTo(f, g + e), a.lineTo(f, g), a.fill(), a.stroke(), a.closePath(), a.beginPath(), a.strokeStyle = "rgba(" + this.fontColor + ", " + this.alpha + ")", a.fillStyle = "rgba(" + this.fontColor + ", " + this.alpha + ")", a.fillText(this.alarm, f + 2, g + e - 4), a.closePath()
+ }
+ }, this.paintText = function (a) {
+ var b = this.text;
+ if (null != b && "" != b) {
+ a.beginPath(), a.font = this.font;
+ var c = a.measureText(b).width, d = a.measureText("é¢ï¿½").width;
+ a.fillStyle = "rgba(" + this.fontColor + ", " + this.alpha + ")";
+ var e = this.getTextPostion(this.textPosition, c, d);
+ a.fillText(b, e.x, e.y), a.closePath()
+ }
+ }, this.paintBorder = function (a) {
+ if (0 != this.borderWidth) {
+ a.beginPath(), a.lineWidth = this.borderWidth, a.strokeStyle = "rgba(" + this.borderColor + "," + this.alpha + ")";
+ var b = this.borderWidth / 2;
+ null == this.borderRadius || 0 == this.borderRadius ? a.rect(-this.width / 2 - b, -this.height / 2 - b, this.width + this.borderWidth, this.height + this.borderWidth) : a.JTopoRoundRect(-this.width / 2 - b, -this.height / 2 - b, this.width + this.borderWidth, this.height + this.borderWidth, this.borderRadius), a.stroke(), a.closePath()
+ }
+ }, this.getTextPostion = function (a, b, c) {
+ var d = null;
+ return null == a || "Bottom_Center" == a ? d = {
+ x: -this.width / 2 + (this.width - b) / 2,
+ y: this.height / 2 + c
+ } : "Top_Center" == a ? d = {
+ x: -this.width / 2 + (this.width - b) / 2,
+ y: -this.height / 2 - c / 2
+ } : "Top_Right" == a ? d = {
+ x: this.width / 2,
+ y: -this.height / 2 - c / 2
+ } : "Top_Left" == a ? d = {
+ x: -this.width / 2 - b,
+ y: -this.height / 2 - c / 2
+ } : "Bottom_Right" == a ? d = {
+ x: this.width / 2,
+ y: this.height / 2 + c
+ } : "Bottom_Left" == a ? d = {
+ x: -this.width / 2 - b,
+ y: this.height / 2 + c
+ } : "Middle_Center" == a ? d = {
+ x: -this.width / 2 + (this.width - b) / 2,
+ y: c / 2
+ } : "Middle_Right" == a ? d = {
+ x: this.width / 2,
+ y: c / 2
+ } : "Middle_Left" == a && (d = {
+ x: -this.width / 2 - b,
+ y: c / 2
+ }), null != this.textOffsetX && (d.x += this.textOffsetX), null != this.textOffsetY && (d.y += this.textOffsetY), d
+ }, this.setImage = function (b, c) {
+ if (null == b) throw new Error("Node.setImage(): éåæImageçµç¡
èæ¶è¹â!");
+ var d = this;
+ if ("string" == typeof b) {
+ var e = j[b];
+ null == e ? (e = new Image, e.src = b, e.onload = function () {
+ j[b] = e, 1 == c && d.setSize(e.width, e.height);
+ var f = a.util.genImageAlarm(e);
+ f && (e.alarm = f), d.image = e
+ }) : (c && this.setSize(e.width, e.height), this.image = e)
+ } else this.image = b, 1 == c && this.setSize(b.width, b.height)
+ }, this.removeHandler = function (a) {
+ var b = this;
+ this.outLinks && (this.outLinks.forEach(function (c) {
+ c.nodeA === b && a.remove(c)
+ }), this.outLinks = null), this.inLinks && (this.inLinks.forEach(function (c) {
+ c.nodeZ === b && a.remove(c)
+ }), this.inLinks = null)
+ }
+ }
+
+ function c() {
+ c.prototype.initialize.apply(this, arguments)
+ }
+
+ function d(a) {
+ this.initialize(), this.text = a, this.elementType = "TextNode", this.paint = function (a) {
+ a.beginPath(), a.font = this.font, this.width = a.measureText(this.text).width, this.height = a.measureText("é¢ï¿½").width, a.strokeStyle = "rgba(" + this.fontColor + ", " + this.alpha + ")", a.fillStyle = "rgba(" + this.fontColor + ", " + this.alpha + ")", a.fillText(this.text, -this.width / 2, this.height / 2), a.closePath(), this.paintBorder(a), this.paintCtrl(a), this.paintAlarmText(a)
+ }
+ }
+
+ function e(a, b, c) {
+ this.initialize(), this.text = a, this.href = b, this.target = c, this.elementType = "LinkNode", this.isVisited = !1, this.visitedColor = null, this.paint = function (a) {
+ a.beginPath(), a.font = this.font, this.width = a.measureText(this.text).width, this.height = a.measureText("é¢ï¿½").width, this.isVisited && null != this.visitedColor ? (a.strokeStyle = "rgba(" + this.visitedColor + ", " + this.alpha + ")", a.fillStyle = "rgba(" + this.visitedColor + ", " + this.alpha + ")") : (a.strokeStyle = "rgba(" + this.fontColor + ", " + this.alpha + ")", a.fillStyle = "rgba(" + this.fontColor + ", " + this.alpha + ")"), a.fillText(this.text, -this.width / 2, this.height / 2), this.isMouseOver && (a.moveTo(-this.width / 2, this.height), a.lineTo(this.width / 2, this.height), a.stroke()), a.closePath(), this.paintBorder(a), this.paintCtrl(a), this.paintAlarmText(a)
+ }, this.mousemove(function () {
+ var a = document.getElementsByTagName("canvas");
+ if (a && a.length > 0) for (var b = 0; b < a.length; b++) a[b].style.cursor = "pointer"
+ }), this.mouseout(function () {
+ var a = document.getElementsByTagName("canvas");
+ if (a && a.length > 0) for (var b = 0; b < a.length; b++) a[b].style.cursor = "default"
+ }), this.click(function () {
+ "_blank" == this.target ? window.open(this.href) : location = this.href, this.isVisited = !0
+ })
+ }
+
+ function f(a) {
+ this.initialize(arguments), this._radius = 20, this.beginDegree = 0, this.endDegree = 2 * Math.PI, this.text = a, this.paint = function (a) {
+ a.save(), a.beginPath(), a.fillStyle = "rgba(" + this.fillColor + "," + this.alpha + ")", a.arc(0, 0, this.radius, this.beginDegree, this.endDegree, !0), a.fill(), a.closePath(), a.restore(), this.paintText(a), this.paintBorder(a), this.paintCtrl(a), this.paintAlarmText(a)
+ }, this.paintSelected = function (a) {
+ a.save(), a.beginPath(), a.strokeStyle = "rgba(168,202,255, 0.9)", a.fillStyle = "rgba(168,202,236,0.7)", a.arc(0, 0, this.radius + 3, this.beginDegree, this.endDegree, !0), a.fill(), a.stroke(), a.closePath(), a.restore()
+ }
+ }
+
+ function g(a, b, c) {
+ this.initialize(), this.frameImages = a || [], this.frameIndex = 0, this.isStop = !0;
+ var d = b || 1e3;
+ this.repeatPlay = !1;
+ var e = this;
+ this.nextFrame = function () {
+ if (!this.isStop && null != this.frameImages.length) {
+ if (this.frameIndex++, this.frameIndex >= this.frameImages.length) {
+ if (!this.repeatPlay) return;
+ this.frameIndex = 0
+ }
+ this.setImage(this.frameImages[this.frameIndex], c), setTimeout(function () {
+ e.nextFrame()
+ }, d / a.length)
+ }
+ }
+ }
+
+ function h(a, b, c, d, e) {
+ this.initialize();
+ var f = this;
+ this.setImage(a), this.frameIndex = 0, this.isPause = !0, this.repeatPlay = !1;
+ var g = d || 1e3;
+ e = e || 0, this.paint = function (a) {
+ if (this.image) {
+ var b = this.width, d = this.height;
+ a.save(), a.beginPath(), a.fillStyle = "rgba(" + this.fillColor + "," + this.alpha + ")";
+ var f = (Math.floor(this.frameIndex / c) + e) * d, g = Math.floor(this.frameIndex % c) * b;
+ a.drawImage(this.image, g, f, b, d, -b / 2, -d / 2, b, d), a.fill(), a.closePath(), a.restore(), this.paintText(a), this.paintBorder(a), this.paintCtrl(a), this.paintAlarmText(a)
+ }
+ }, this.nextFrame = function () {
+ if (!this.isStop) {
+ if (this.frameIndex++, this.frameIndex >= b * c) {
+ if (!this.repeatPlay) return;
+ this.frameIndex = 0
+ }
+ setTimeout(function () {
+ f.isStop || f.nextFrame()
+ }, g / (b * c))
+ }
+ }
+ }
+
+ function i() {
+ var a = null;
+ return a = arguments.length <= 3 ? new g(arguments[0], arguments[1], arguments[2]) : new h(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]), a.stop = function () {
+ a.isStop = !0
+ }, a.play = function () {
+ a.isStop = !1, a.frameIndex = 0, a.nextFrame()
+ }, a
+ }
+
+ var j = {};
+ b.prototype = new a.EditableElement, c.prototype = new b, d.prototype = new c, e.prototype = new d, f.prototype = new c, Object.defineProperties(f.prototype, {
+ radius: {
+ get: function () {
+ return this._radius
+ }, set: function (a) {
+ this._radius = a;
+ var b = 2 * this.radius, c = 2 * this.radius;
+ this.width = b, this.height = c
+ }
+ }, width: {
+ get: function () {
+ return this._width
+ }, set: function (a) {
+ this._radius = a / 2, this._width = a
+ }
+ }, height: {
+ get: function () {
+ return this._height
+ }, set: function (a) {
+ this._radius = a / 2, this._height = a
+ }
+ }
+ }), g.prototype = new c, h.prototype = new c, i.prototype = new c, a.Node = c, a.TextNode = d, a.LinkNode = e, a.CircleNode = f, a.AnimateNode = i
+}(JTopo), function (a) {
+ function b(a, b) {
+ var c = [];
+ if (null == a || null == b) return c;
+ if (a && b && a.outLinks && b.inLinks) for (var d = 0; d < a.outLinks.length; d++) for (var e = a.outLinks[d], f = 0; f < b.inLinks.length; f++) {
+ var g = b.inLinks[f];
+ e === g && c.push(g)
+ }
+ return c
+ }
+
+ function c(a, c) {
+ var d = b(a, c), e = b(c, a), f = d.concat(e);
+ return f
+ }
+
+ function d(a) {
+ var b = c(a.nodeA, a.nodeZ);
+ return b = b.filter(function (b) {
+ return a !== b
+ })
+ }
+
+ function e(a, b) {
+ return c(a, b).length
+ }
+
+ function f(b, c, g) {
+ function h(b, c) {
+ var d = a.util.lineF(b.cx, b.cy, c.cx, c.cy), e = b.getBound(), f = a.util.intersectionLineBound(d, e);
+ return f
+ }
+
+ this.initialize = function (b, c, d) {
+ if (f.prototype.initialize.apply(this, arguments), this.elementType = "link", this.zIndex = a.zIndex_Link, 0 != arguments.length) {
+ this.text = d, this.nodeA = b, this.nodeZ = c, this.nodeA && null == this.nodeA.outLinks && (this.nodeA.outLinks = []), this.nodeA && null == this.nodeA.inLinks && (this.nodeA.inLinks = []), this.nodeZ && null == this.nodeZ.inLinks && (this.nodeZ.inLinks = []), this.nodeZ && null == this.nodeZ.outLinks && (this.nodeZ.outLinks = []), null != this.nodeA && this.nodeA.outLinks.push(this), null != this.nodeZ && this.nodeZ.inLinks.push(this), this.caculateIndex(), this.font = "12px Consolas", this.fontColor = "255,255,255", this.lineWidth = 2, this.lineJoin = "miter", this.transformAble = !1, this.bundleOffset = 20, this.bundleGap = 12, this.textOffsetX = 0, this.textOffsetY = 0, this.arrowsRadius = null, this.arrowsOffset = 0, this.dashedPattern = null, this.path = [];
+ var e = "text,font,fontColor,lineWidth,lineJoin".split(",");
+ this.serializedProperties = this.serializedProperties.concat(e)
+ }
+ }, this.caculateIndex = function () {
+ var a = e(this.nodeA, this.nodeZ);
+ a > 0 && (this.nodeIndex = a - 1)
+ }, this.initialize(b, c, g), this.removeHandler = function () {
+ var a = this;
+ this.nodeA && this.nodeA.outLinks && (this.nodeA.outLinks = this.nodeA.outLinks.filter(function (b) {
+ return b !== a
+ })), this.nodeZ && this.nodeZ.inLinks && (this.nodeZ.inLinks = this.nodeZ.inLinks.filter(function (b) {
+ return b !== a
+ }));
+ var b = d(this);
+ b.forEach(function (a, b) {
+ a.nodeIndex = b
+ })
+ }, this.getStartPosition = function () {
+ var a = {x: this.nodeA.cx, y: this.nodeA.cy};
+ return a
+ }, this.getEndPosition = function () {
+ var a;
+ return null != this.arrowsRadius && (a = h(this.nodeZ, this.nodeA)), null == a && (a = {
+ x: this.nodeZ.cx,
+ y: this.nodeZ.cy
+ }), a
+ }, this.getPath = function () {
+ var a = [], b = this.getStartPosition(), c = this.getEndPosition();
+ if (this.nodeA === this.nodeZ) return [b, c];
+ var d = e(this.nodeA, this.nodeZ);
+ if (1 == d) return [b, c];
+ var f = Math.atan2(c.y - b.y, c.x - b.x),
+ g = {x: b.x + this.bundleOffset * Math.cos(f), y: b.y + this.bundleOffset * Math.sin(f)}, h = {
+ x: c.x + this.bundleOffset * Math.cos(f - Math.PI),
+ y: c.y + this.bundleOffset * Math.sin(f - Math.PI)
+ }, i = f - Math.PI / 2, j = f - Math.PI / 2, k = d * this.bundleGap / 2 - this.bundleGap / 2,
+ l = this.bundleGap * this.nodeIndex, m = {x: g.x + l * Math.cos(i), y: g.y + l * Math.sin(i)},
+ n = {x: h.x + l * Math.cos(j), y: h.y + l * Math.sin(j)};
+ return m = {
+ x: m.x + k * Math.cos(i - Math.PI),
+ y: m.y + k * Math.sin(i - Math.PI)
+ }, n = {x: n.x + k * Math.cos(j - Math.PI), y: n.y + k * Math.sin(j - Math.PI)}, a.push({
+ x: b.x,
+ y: b.y
+ }), a.push({x: m.x, y: m.y}), a.push({x: n.x, y: n.y}), a.push({x: c.x, y: c.y}), a
+ }, this.paintPath = function (a, b) {
+ if (this.nodeA === this.nodeZ) return void this.paintLoop(a);
+ a.beginPath(), a.moveTo(b[0].x, b[0].y);
+ for (var c = 1; c < b.length; c++) null == this.dashedPattern ? a.lineTo(b[c].x, b[c].y) : a.JTopoDashedLineTo(b[c - 1].x, b[c - 1].y, b[c].x, b[c].y, this.dashedPattern);
+ if (a.stroke(), a.closePath(), null != this.arrowsRadius) {
+ var d = b[b.length - 2], e = b[b.length - 1];
+ this.paintArrow(a, d, e)
+ }
+ }, this.paintLoop = function (a) {
+ a.beginPath();
+ {
+ var b = this.bundleGap * (this.nodeIndex + 1) / 2;
+ Math.PI + Math.PI / 2
+ }
+ a.arc(this.nodeA.x, this.nodeA.y, b, Math.PI / 2, 2 * Math.PI), a.stroke(), a.closePath()
+ }, this.paintArrow = function (b, c, d) {
+ var e = this.arrowsOffset, f = this.arrowsRadius / 2, g = c, h = d, i = Math.atan2(h.y - g.y, h.x - g.x),
+ j = a.util.getDistance(g, h) - this.arrowsRadius, k = g.x + (j + e) * Math.cos(i),
+ l = g.y + (j + e) * Math.sin(i), m = h.x + e * Math.cos(i), n = h.y + e * Math.sin(i);
+ i -= Math.PI / 2;
+ var o = {x: k + f * Math.cos(i), y: l + f * Math.sin(i)},
+ p = {x: k + f * Math.cos(i - Math.PI), y: l + f * Math.sin(i - Math.PI)};
+ b.beginPath(), b.fillStyle = "rgba(" + this.strokeColor + "," + this.alpha + ")", b.moveTo(o.x, o.y), b.lineTo(m, n), b.lineTo(p.x, p.y), b.stroke(), b.closePath()
+ }, this.paint = function (a) {
+ if (null != this.nodeA && null != !this.nodeZ) {
+ var b = this.getPath(this.nodeIndex);
+ this.path = b, a.strokeStyle = "rgba(" + this.strokeColor + "," + this.alpha + ")", a.lineWidth = this.lineWidth, this.paintPath(a, b), b && b.length > 0 && this.paintText(a, b)
+ }
+ };
+ var i = -(Math.PI / 2 + Math.PI / 4);
+ this.paintText = function (a, b) {
+ var c = b[0], d = b[b.length - 1];
+ if (4 == b.length && (c = b[1], d = b[2]), this.text && this.text.length > 0) {
+ var e = (d.x + c.x) / 2 + this.textOffsetX, f = (d.y + c.y) / 2 + this.textOffsetY;
+ a.save(), a.beginPath(), a.font = this.font;
+ var g = a.measureText(this.text).width, h = a.measureText("é¢ï¿½").width;
+ if (a.fillStyle = "rgba(" + this.fontColor + ", " + this.alpha + ")", this.nodeA === this.nodeZ) {
+ var j = this.bundleGap * (this.nodeIndex + 1) / 2, e = this.nodeA.x + j * Math.cos(i),
+ f = this.nodeA.y + j * Math.sin(i);
+ a.fillText(this.text, e, f)
+ } else a.fillText(this.text, e - g / 2, f - h / 2);
+ a.stroke(), a.closePath(), a.restore()
+ }
+ }, this.paintSelected = function (a) {
+ a.shadowBlur = 10, a.shadowColor = "rgba(0,0,0,1)", a.shadowOffsetX = 0, a.shadowOffsetY = 0
+ }, this.isInBound = function (b, c) {
+ if (this.nodeA === this.nodeZ) {
+ var d = this.bundleGap * (this.nodeIndex + 1) / 2, e = a.util.getDistance(this.nodeA, {x: b, y: c}) - d;
+ return Math.abs(e) <= 3
+ }
+ for (var f = !1, g = 1; g < this.path.length; g++) {
+ var h = this.path[g - 1], i = this.path[g];
+ if (1 == a.util.isPointInLine({x: b, y: c}, h, i)) {
+ f = !0;
+ break
+ }
+ }
+ return f
+ }
+ }
+
+ function g(a, b, c) {
+ this.initialize = function () {
+ g.prototype.initialize.apply(this, arguments), this.direction = "horizontal"
+ }, this.initialize(a, b, c), this.getStartPosition = function () {
+ var a = {x: this.nodeA.cx, y: this.nodeA.cy};
+ return "horizontal" == this.direction ? this.nodeZ.cx > a.x ? a.x += this.nodeA.width / 2 : a.x -= this.nodeA.width / 2 : this.nodeZ.cy > a.y ? a.y += this.nodeA.height / 2 : a.y -= this.nodeA.height / 2, a
+ }, this.getEndPosition = function () {
+ var a = {x: this.nodeZ.cx, y: this.nodeZ.cy};
+ return "horizontal" == this.direction ? this.nodeA.cy < a.y ? a.y -= this.nodeZ.height / 2 : a.y += this.nodeZ.height / 2 : a.x = this.nodeA.cx < a.x ? this.nodeZ.x : this.nodeZ.x + this.nodeZ.width, a
+ }, this.getPath = function (a) {
+ var b = [], c = this.getStartPosition(), d = this.getEndPosition();
+ if (this.nodeA === this.nodeZ) return [c, d];
+ var f, g, h = e(this.nodeA, this.nodeZ), i = (h - 1) * this.bundleGap, j = this.bundleGap * a - i / 2;
+ return "horizontal" == this.direction ? (f = d.x + j, g = c.y - j, b.push({x: c.x, y: g}), b.push({
+ x: f,
+ y: g
+ }), b.push({x: f, y: d.y})) : (f = c.x + j, g = d.y - j, b.push({x: f, y: c.y}), b.push({
+ x: f,
+ y: g
+ }), b.push({x: d.x, y: g})), b
+ }, this.paintText = function (a, b) {
+ if (this.text && this.text.length > 0) {
+ var c = b[1], d = c.x + this.textOffsetX, e = c.y + this.textOffsetY;
+ a.save(), a.beginPath(), a.font = this.font;
+ var f = a.measureText(this.text).width, g = a.measureText("é¢ï¿½").width;
+ a.fillStyle = "rgba(" + this.fontColor + ", " + this.alpha + ")", a.fillText(this.text, d - f / 2, e - g / 2), a.stroke(), a.closePath(), a.restore()
+ }
+ }
+ }
+
+ function h(a, b, c) {
+ this.initialize = function () {
+ h.prototype.initialize.apply(this, arguments), this.direction = "vertical", this.offsetGap = 44
+ }, this.initialize(a, b, c), this.getStartPosition = function () {
+ var a = {x: this.nodeA.cx, y: this.nodeA.cy};
+ return "horizontal" == this.direction ? a.x = this.nodeZ.cx < a.x ? this.nodeA.x : this.nodeA.x + this.nodeA.width : a.y = this.nodeZ.cy < a.y ? this.nodeA.y : this.nodeA.y + this.nodeA.height, a
+ }, this.getEndPosition = function () {
+ var a = {x: this.nodeZ.cx, y: this.nodeZ.cy};
+ return "horizontal" == this.direction ? a.x = this.nodeA.cx < a.x ? this.nodeZ.x : this.nodeZ.x + this.nodeZ.width : a.y = this.nodeA.cy < a.y ? this.nodeZ.y : this.nodeZ.y + this.nodeZ.height, a
+ }, this.getPath = function (a) {
+ var b = this.getStartPosition(), c = this.getEndPosition();
+ if (this.nodeA === this.nodeZ) return [b, c];
+ var d = [], f = e(this.nodeA, this.nodeZ), g = (f - 1) * this.bundleGap, h = this.bundleGap * a - g / 2,
+ i = this.offsetGap;
+ return "horizontal" == this.direction ? (this.nodeA.cx > this.nodeZ.cx && (i = -i), d.push({
+ x: b.x,
+ y: b.y + h
+ }), d.push({x: b.x + i, y: b.y + h}), d.push({x: c.x - i, y: c.y + h}), d.push({
+ x: c.x,
+ y: c.y + h
+ })) : (this.nodeA.cy > this.nodeZ.cy && (i = -i), d.push({x: b.x + h, y: b.y}), d.push({
+ x: b.x + h,
+ y: b.y + i
+ }), d.push({x: c.x + h, y: c.y - i}), d.push({x: c.x + h, y: c.y})), d
+ }
+ }
+
+ function i(a, b, c) {
+ this.initialize = function () {
+ i.prototype.initialize.apply(this, arguments)
+ }, this.initialize(a, b, c), this.paintPath = function (a, b) {
+ if (this.nodeA === this.nodeZ) return void this.paintLoop(a);
+ a.beginPath(), a.moveTo(b[0].x, b[0].y);
+ for (var c = 1; c < b.length; c++) {
+ var d = b[c - 1], e = b[c], f = (d.x + e.x) / 2, g = (d.y + e.y) / 2;
+ g += (e.y - d.y) / 2, a.strokeStyle = "rgba(" + this.strokeColor + "," + this.alpha + ")", a.lineWidth = this.lineWidth, a.moveTo(d.x, d.cy), a.quadraticCurveTo(f, g, e.x, e.y), a.stroke()
+ }
+ if (a.stroke(), a.closePath(), null != this.arrowsRadius) {
+ var h = b[b.length - 2], i = b[b.length - 1];
+ this.paintArrow(a, h, i)
+ }
+ }
+ }
+
+ f.prototype = new a.InteractiveElement, g.prototype = new f, h.prototype = new f, i.prototype = new f, a.Link = f, a.FoldLink = g, a.FlexionalLink = h, a.CurveLink = i
+}(JTopo), function (a) {
+ function b(c) {
+ this.initialize = function (c) {
+ b.prototype.initialize.apply(this, null), this.elementType = "container", this.zIndex = a.zIndex_Container, this.width = 100, this.height = 100, this.childs = [], this.alpha = .5, this.dragable = !0, this.childDragble = !0, this.visible = !0, this.fillColor = "10,100,80", this.borderWidth = 0, this.borderColor = "255,255,255", this.borderRadius = null, this.font = "12px Consolas", this.fontColor = "255,255,255", this.text = c, this.textPosition = "Bottom_Center", this.textOffsetX = 0, this.textOffsetY = 0, this.layout = new a.layout.AutoBoundLayout
+ }, this.initialize(c), this.add = function (a) {
+ this.childs.push(a), a.dragable = this.childDragble
+ }, this.remove = function (a) {
+ for (var b = 0; b < this.childs.length; b++) if (this.childs[b] === a) {
+ a.parentContainer = null, this.childs = this.childs.del(b), a.lastParentContainer = this;
+ break
+ }
+ }, this.removeAll = function () {
+ this.childs = []
+ }, this.setLocation = function (a, b) {
+ var c = a - this.x, d = b - this.y;
+ this.x = a, this.y = b;
+ for (var e = 0; e < this.childs.length; e++) {
+ var f = this.childs[e];
+ f.setLocation(f.x + c, f.y + d)
+ }
+ }, this.doLayout = function (a) {
+ a && a(this, this.childs)
+ }, this.paint = function (a) {
+ this.visible && (this.layout && this.layout(this, this.childs), a.beginPath(), a.fillStyle = "rgba(" + this.fillColor + "," + this.alpha + ")", null == this.borderRadius || 0 == this.borderRadius ? a.rect(this.x, this.y, this.width, this.height) : a.drawImage(this.background, this.x, this.y-40, this.width, this.height+100), a.fill(), a.closePath(), this.paintText(a), this.paintBorder(a))
+ }, this.paintBorder = function (a) {
+ if (0 != this.borderWidth) {
+ a.beginPath(), a.lineWidth = this.borderWidth, a.strokeStyle = "rgba(" + this.borderColor + "," + this.alpha + ")";
+ var b = this.borderWidth / 2;
+ null == this.borderRadius || 0 == this.borderRadius ? a.rect(this.x - b, this.y - b, this.width + this.borderWidth, this.height + this.borderWidth) : a.JTopoRoundRect(this.x - b, this.y - b, this.width + this.borderWidth, this.height + this.borderWidth, this.borderRadius), a.stroke(), a.closePath()
+ }
+ }, this.paintText = function (a) {
+ var b = this.text;
+ if (null != b && "" != b) {
+ a.beginPath(), a.font = this.font;
+ var c = a.measureText(b).width, d = a.measureText("é¢ï¿½").width;
+ a.fillStyle = "rgba(" + this.fontColor + ", " + this.alpha + ")";
+ var e = this.getTextPostion(this.textPosition, c, d);
+ a.fillText(b, e.x, e.y), a.closePath()
+ }
+ }, this.getTextPostion = function (a, b, c) {
+ var d = null;
+ return null == a || "Bottom_Center" == a ? d = {
+ x: this.x + this.width / 2 - b / 2,
+ y: this.y + this.height + c
+ } : "Top_Center" == a ? d = {
+ x: this.x + this.width / 2 - b / 2,
+ y: this.y - c / 2
+ } : "Top_Right" == a ? d = {
+ x: this.x + this.width - b,
+ y: this.y - c / 2
+ } : "Top_Left" == a ? d = {
+ x: this.x,
+ y: this.y - c / 2
+ } : "Bottom_Right" == a ? d = {
+ x: this.x + this.width - b,
+ y: this.y + this.height + c
+ } : "Bottom_Left" == a ? d = {
+ x: this.x,
+ y: this.y + this.height + c
+ } : "Middle_Center" == a ? d = {
+ x: this.x + this.width / 2 - b / 2,
+ y: this.y + this.height / 2 + c / 2
+ } : "Middle_Right" == a ? d = {
+ x: this.x + this.width - b,
+ y: this.y + this.height / 2 + c / 2
+ } : "Middle_Left" == a && (d = {
+ x: this.x,
+ y: this.y + this.height / 2 + c / 2
+ }), null != this.textOffsetX && (d.x += this.textOffsetX), null != this.textOffsetY && (d.y += this.textOffsetY), d
+ }, this.paintMouseover = function () {
+ }, this.paintSelected = function (a) {
+ a.shadowBlur = 10, a.shadowColor = "rgba(0,0,0,1)", a.shadowOffsetX = 0, a.shadowOffsetY = 0
+ }
+ }
+
+ b.prototype = new a.InteractiveElement;
+ var c = {};
+ Object.defineProperties(b.prototype, {
+ background: {
+ get: function () {
+ return this._background
+ }, set: function (a) {
+ if ("string" == typeof a) {
+ var b = c[a];
+ null == b && (b = new Image, b.src = a, b.onload = function () {
+ c[a] = b
+ }), this._background = b
+ } else this._background = a
+ }
+ }
+ });
+
+ a.Container = b;
+}(JTopo), function (a) {
+ function b(a) {
+ var b = 0, c = 0;
+ a.forEach(function (a) {
+ b += a.cx, c += a.cy
+ });
+ var d = {x: b / a.length, y: c / a.length};
+ return d
+ }
+
+ function c(c, d) {
+ null == d && (d = {});
+ {
+ var e = d.cx, f = d.cy, g = d.minRadius, h = d.nodeDiameter, i = d.hScale || 1, j = d.vScale || 1;
+ d.beginAngle || 0, d.endAngle || 2 * Math.PI
+ }
+ if (null == e || null == f) {
+ var k = b(c);
+ e = k.x, f = k.y
+ }
+ var l = 0, m = [], n = [];
+ c.forEach(function (a) {
+ null == d.nodeDiameter ? (a.diameter && (h = a.diameter), h = a.radius ? 2 * a.radius : Math.sqrt(2 * a.width * a.height), n.push(h)) : n.push(h), l += h
+ }), c.forEach(function (a, b) {
+ var c = n[b] / l;
+ m.push(Math.PI * c)
+ });
+ var o = (c.length, m[0] + m[1]), p = n[0] / 2 + n[1] / 2, q = p / 2 / Math.sin(o / 2);
+ null != g && g > q && (q = g);
+ var r = q * i, s = q * j, t = d.animate;
+ if (t) {
+ var u = t.time || 1e3, v = 0;
+ c.forEach(function (b, c) {
+ v += 0 == c ? m[c] : m[c - 1] + m[c];
+ var d = e + Math.cos(v) * r, g = f + Math.sin(v) * s;
+ a.Animate.stepByStep(b, {x: d - b.width / 2, y: g - b.height / 2}, u).start()
+ })
+ } else {
+ var v = 0;
+ c.forEach(function (a, b) {
+ v += 0 == b ? m[b] : m[b - 1] + m[b];
+ var c = e + Math.cos(v) * r, d = f + Math.sin(v) * s;
+ a.cx = c, a.cy = d
+ })
+ }
+ return {cx: e, cy: f, radius: r, radiusA: r, radiusB: s}
+ }
+
+ function d(a, b) {
+ return function (c) {
+ var d = c.childs;
+ if (!(d.length <= 0)) for (var e = c.getBound(), f = d[0], g = (e.width - f.width) / b, h = (e.height - f.height) / a, i = (d.length, 0), j = 0; a > j; j++) for (var k = 0; b > k; k++) {
+ var l = d[i++], m = e.left + g / 2 + k * g, n = e.top + h / 2 + j * h;
+ if (l.setLocation(m, n), i >= d.length) return
+ }
+ }
+ }
+
+ function e(a, b) {
+ return null == a && (a = 0), null == b && (b = 0), function (c) {
+ var d = c.childs;
+ if (!(d.length <= 0)) for (var e = c.getBound(), f = e.left, g = e.top, h = 0; h < d.length; h++) {
+ var i = d[h];
+ f + i.width >= e.right && (f = e.left, g += b + i.height), i.setLocation(f, g), f += a + i.width
+ }
+ }
+ }
+
+ function f() {
+ return function (a, b) {
+ if (b.length > 0) {
+ for (var c = 1e7, d = -1e7, e = 1e7, f = -1e7, g = d - c, h = f - e, i = 0; i < b.length; i++) {
+ var j = b[i];
+ j.x <= c && (c = j.x), j.x >= d && (d = j.x), j.y <= e && (e = j.y), j.y >= f && (f = j.y), g = d - c + j.width, h = f - e + j.height
+ }
+ a.x = c, a.y = e, a.width = g, a.height = h
+ }
+ }
+ }
+
+ function g(b) {
+ var c = [], d = b.filter(function (b) {
+ return b instanceof a.Link ? !0 : (c.push(b), !1)
+ });
+ return b = c.filter(function (a) {
+ for (var b = 0; b < d.length; b++) if (d[b].nodeZ === a) return !1;
+ return !0
+ }), b = b.filter(function (a) {
+ for (var b = 0; b < d.length; b++) if (d[b].nodeA === a) return !0;
+ return !1
+ })
+ }
+
+ function h(a) {
+ var b = 0, c = 0;
+ return a.forEach(function (a) {
+ b += a.width, c += a.height
+ }), {width: b / a.length, height: c / a.length}
+ }
+
+ function i(a, b, c, d) {
+ b.x += c, b.y += d;
+ for (var e = q(a, b), f = 0; f < e.length; f++) i(a, e[f], c, d)
+ }
+
+ function j(a, b) {
+ function c(b, e) {
+ var f = q(a, b);
+ null == d[e] && (d[e] = {}, d[e].nodes = [], d[e].childs = []), d[e].nodes.push(b), d[e].childs.push(f);
+ for (var g = 0; g < f.length; g++) c(f[g], e + 1), f[g].parent = b
+ }
+
+ var d = [];
+ return c(b, 0), d
+ }
+
+ function k(b, c, d) {
+ return function (e) {
+ function f(f, g) {
+ for (var h = a.layout.getTreeDeep(f, g), k = j(f, g), l = k["" + h].nodes, m = 0; m < l.length; m++) {
+ var n = l[m], o = (m + 1) * (c + 10), p = h * d;
+ "down" == b || ("up" == b ? p = -p : "left" == b ? (o = -h * d, p = (m + 1) * (c + 10)) : "right" == b && (o = h * d, p = (m + 1) * (c + 10))), n.setLocation(o, p)
+ }
+ for (var q = h - 1; q >= 0; q--) for (var r = k["" + q].nodes, s = k["" + q].childs, m = 0; m < r.length; m++) {
+ var t = r[m], u = s[m];
+ if ("down" == b ? t.y = q * d : "up" == b ? t.y = -q * d : "left" == b ? t.x = -q * d : "right" == b && (t.x = q * d), u.length > 0 ? "down" == b || "up" == b ? t.x = (u[0].x + u[u.length - 1].x) / 2 : ("left" == b || "right" == b) && (t.y = (u[0].y + u[u.length - 1].y) / 2) : m > 0 && ("down" == b || "up" == b ? t.x = r[m - 1].x + r[m - 1].width + c : ("left" == b || "right" == b) && (t.y = r[m - 1].y + r[m - 1].height + c)), m > 0) if ("down" == b || "up" == b) {
+ if (t.x < r[m - 1].x + r[m - 1].width) for (var v = r[m - 1].x + r[m - 1].width + c, w = Math.abs(v - t.x), x = m; x < r.length; x++) i(e.childs, r[x], w, 0)
+ } else if (("left" == b || "right" == b) && t.y < r[m - 1].y + r[m - 1].height) for (var y = r[m - 1].y + r[m - 1].height + c, z = Math.abs(y - t.y), x = m; x < r.length; x++) i(e.childs, r[x], 0, z)
+ }
+ }
+
+ var g = null;
+ null == c && (g = h(e.childs), c = g.width, ("left" == b || "right" == b) && (c = g.width + 10)), null == d && (null == g && (g = h(e.childs)), d = 2 * g.height), null == b && (b = "down");
+ var k = a.layout.getRootNodes(e.childs);
+ if (k.length > 0) {
+ f(e.childs, k[0]);
+ var l = a.util.getElementsBound(e.childs), m = e.getCenterLocation(), n = m.x - (l.left + l.right) / 2,
+ o = m.y - (l.top + l.bottom) / 2;
+ e.childs.forEach(function (b) {
+ b instanceof a.Node && (b.x += n, b.y += o)
+ })
+ }
+ }
+ }
+
+ function l(b) {
+ return function (c) {
+ function d(a, c, e) {
+ var f = q(a, c);
+ if (0 != f.length) {
+ null == e && (e = b);
+ var g = 2 * Math.PI / f.length;
+ f.forEach(function (b, f) {
+ var h = c.x + e * Math.cos(g * f), i = c.y + e * Math.sin(g * f);
+ b.setLocation(h, i);
+ var j = e / 2;
+ d(a, b, j)
+ })
+ }
+ }
+
+ var e = a.layout.getRootNodes(c.childs);
+ if (e.length > 0) {
+ d(c.childs, e[0]);
+ var f = a.util.getElementsBound(c.childs), g = c.getCenterLocation(), h = g.x - (f.left + f.right) / 2,
+ i = g.y - (f.top + f.bottom) / 2;
+ c.childs.forEach(function (b) {
+ b instanceof a.Node && (b.x += h, b.y += i)
+ })
+ }
+ }
+ }
+
+ function m(a, b, c, d, e, f) {
+ for (var g = [], h = 0; c > h; h++) for (var i = 0; d > i; i++) g.push({x: a + i * e, y: b + h * f});
+ return g
+ }
+
+ function n(a, b, c, d, e, f) {
+ var g = e ? e : 0, h = f ? f : 2 * Math.PI, i = h - g, j = i / c, k = [];
+ g += j / 2;
+ for (var l = g; h >= l; l += j) {
+ var m = a + Math.cos(l) * d, n = b + Math.sin(l) * d;
+ k.push({x: m, y: n})
+ }
+ return k
+ }
+
+ function o(a, b, c, d, e, f) {
+ var g = f || "bottom", h = [];
+ if ("bottom" == g) for (var i = a - c / 2 * d + d / 2, j = 0; c >= j; j++) h.push({
+ x: i + j * d,
+ y: b + e
+ }); else if ("top" == g) for (var i = a - c / 2 * d + d / 2, j = 0; c >= j; j++) h.push({
+ x: i + j * d,
+ y: b - e
+ }); else if ("right" == g) for (var i = b - c / 2 * d + d / 2, j = 0; c >= j; j++) h.push({
+ x: a + e,
+ y: i + j * d
+ }); else if ("left" == g) for (var i = b - c / 2 * d + d / 2, j = 0; c >= j; j++) h.push({
+ x: a - e,
+ y: i + j * d
+ });
+ return h
+ }
+
+ function m(a, b, c, d, e, f) {
+ for (var g = [], h = 0; c > h; h++) for (var i = 0; d > i; i++) g.push({x: a + i * e, y: b + h * f});
+ return g
+ }
+
+ function p(a, b) {
+ if (a.layout) {
+ var c = a.layout, d = c.type, e = null;
+ if ("circle" == d) {
+ var f = c.radius || Math.max(a.width, a.height);
+ e = n(a.cx, a.cy, b.length, f, a.layout.beginAngle, a.layout.endAngle)
+ } else if ("tree" == d) {
+ var g = c.width || 50, h = c.height || 50, i = c.direction;
+ e = o(a.cx, a.cy, b.length, g, h, i)
+ } else {
+ if ("grid" != d) return;
+ e = m(a.x, a.y, c.rows, c.cols, c.horizontal || 0, c.vertical || 0)
+ }
+ for (var j = 0; j < b.length; j++) b[j].setCenterLocation(e[j].x, e[j].y)
+ }
+ }
+
+ function q(b, c) {
+ for (var d = [], e = 0; e < b.length; e++) b[e] instanceof a.Link && b[e].nodeA === c && d.push(b[e].nodeZ);
+ return d
+ }
+
+ function r(a, b, c) {
+ var d = q(a.childs, b);
+ if (0 == d.length) return null;
+ if (p(b, d), 1 == c) for (var e = 0; e < d.length; e++) r(a, d[e], c);
+ return null
+ }
+
+ function s(b, c) {
+ function d(a, b) {
+ var c = a.x - b.x, d = a.y - b.y;
+ i += c * f, j += d * f, i *= g, j *= g, j += h, b.x += i, b.y += j
+ }
+
+ function e() {
+ if (!(++k > 150)) {
+ for (var a = 0; a < l.length; a++) l[a] != b && d(b, l[a], l);
+ setTimeout(e, 1e3 / 24)
+ }
+ }
+
+ var f = .01, g = .95, h = -5, i = 0, j = 0, k = 0, l = c.getElementsByClass(a.Node);
+ e()
+ }
+
+ function t(a, b) {
+ function c(a, b, e) {
+ var f = q(a, b);
+ e > d && (d = e);
+ for (var g = 0; g < f.length; g++) c(a, f[g], e + 1)
+ }
+
+ var d = 0;
+ return c(a, b, 0), d
+ }
+
+ a.layout = a.Layout = {
+ layoutNode: r,
+ getNodeChilds: q,
+ adjustPosition: p,
+ springLayout: s,
+ getTreeDeep: t,
+ getRootNodes: g,
+ GridLayout: d,
+ FlowLayout: e,
+ AutoBoundLayout: f,
+ CircleLayout: l,
+ TreeLayout: k,
+ getNodesCenter: b,
+ circleLayoutNodes: c
+ }
+}(JTopo), function (a) {
+ function b() {
+ var b = new a.CircleNode;
+ return b.radius = 150, b.colors = ["#3666B0", "#2CA8E0", "#77D1F6"], b.datas = [.3, .3, .4], b.titles = ["A", "B", "C"], b.paint = function (a) {
+ var c = 2 * b.radius, d = 2 * b.radius;
+ b.width = c, b.height = d;
+ for (var e = 0, f = 0; f < this.datas.length; f++) {
+ var g = this.datas[f] * Math.PI * 2;
+ a.save(), a.beginPath(), a.fillStyle = b.colors[f], a.moveTo(0, 0), a.arc(0, 0, this.radius, e, e + g, !1), a.fill(), a.closePath(), a.restore(), a.beginPath(), a.font = this.font;
+ var h = this.titles[f] + ": " + (100 * this.datas[f]).toFixed(2) + "%", i = a.measureText(h).width,
+ j = (a.measureText("é¢ï¿½").width, (e + e + g) / 2), k = this.radius * Math.cos(j),
+ l = this.radius * Math.sin(j);
+ j > Math.PI / 2 && j <= Math.PI ? k -= i : j > Math.PI && j < 2 * Math.PI * 3 / 4 ? k -= i : j > 2 * Math.PI * .75, a.fillStyle = "#FFFFFF", a.fillText(h, k, l), a.moveTo(this.radius * Math.cos(j), this.radius * Math.sin(j)), j > Math.PI / 2 && j < 2 * Math.PI * 3 / 4 && (k -= i), j > Math.PI, a.fill(), a.stroke(), a.closePath(), e += g
+ }
+ }, b
+ }
+
+ function c() {
+ var b = new a.Node;
+ return b.showSelected = !1, b.width = 250, b.height = 180, b.colors = ["#3666B0", "#2CA8E0", "#77D1F6"], b.datas = [.3, .3, .4], b.titles = ["A", "B", "C"], b.paint = function (a) {
+ var c = 3, d = (this.width - c) / this.datas.length;
+ a.save(), a.beginPath(), a.fillStyle = "#FFFFFF", a.strokeStyle = "#FFFFFF", a.moveTo(-this.width / 2 - 1, -this.height / 2), a.lineTo(-this.width / 2 - 1, this.height / 2 + 3), a.lineTo(this.width / 2 + c + 1, this.height / 2 + 3), a.stroke(), a.closePath(), a.restore();
+ for (var e = 0; e < this.datas.length; e++) {
+ a.save(), a.beginPath(), a.fillStyle = b.colors[e];
+ var f = this.datas[e], g = e * (d + c) - this.width / 2, h = this.height - f - this.height / 2;
+ a.fillRect(g, h, d, f);
+ var i = "" + parseInt(this.datas[e]), j = a.measureText(i).width, k = a.measureText("é¢ï¿½").width;
+ a.fillStyle = "#FFFFFF", a.fillText(i, g + (d - j) / 2, h - k), a.fillText(this.titles[e], g + (d - j) / 2, this.height / 2 + k), a.fill(), a.closePath(), a.restore()
+ }
+ }, b
+ }
+
+ a.BarChartNode = c, a.PieChartNode = b
+}(JTopo), function (a) {
+ function b(b, c) {
+ var d, e = null;
+ return {
+ stop: function () {
+ return d ? (window.clearInterval(d), e && e.publish("stop"), this) : this
+ }, start: function () {
+ var a = this;
+ return d = setInterval(function () {
+ b.call(a)
+ }, c), this
+ }, onStop: function (b) {
+ return null == e && (e = new a.util.MessageBus), e.subscribe("stop", b), this
+ }
+ }
+ }
+
+ function c(a, c) {
+ c = c || {};
+ var d = c.gravity || .1, e = c.dx || 0, f = c.dy || 5, g = c.stop, h = c.interval || 30, i = new b(function () {
+ g && g() ? (f = .5, this.stop()) : (f += d, a.setLocation(a.x + e, a.y + f))
+ }, h);
+ return i
+ }
+
+ function d(a, c, d, e, f) {
+ var g = 1e3 / 24, h = {};
+ for (var i in c) {
+ var j = c[i], k = j - a[i];
+ h[i] = {
+ oldValue: a[i], targetValue: j, step: k / d * g, isDone: function (b) {
+ var c = this.step > 0 && a[b] >= this.targetValue || this.step < 0 && a[b] <= this.targetValue;
+ return c
+ }
+ }
+ }
+ var l = new b(function () {
+ var b = !0;
+ for (var d in c) h[d].isDone(d) || (a[d] += h[d].step, b = !1);
+ if (b) {
+ if (!e) return this.stop();
+ for (var d in c) if (f) {
+ var g = h[d].targetValue;
+ h[d].targetValue = h[d].oldValue, h[d].oldValue = g, h[d].step = -h[d].step
+ } else a[d] = h[d].oldValue
+ }
+ return this
+ }, g);
+ return l
+ }
+
+ function e(a) {
+ null == a && (a = {});
+ var b = a.spring || .1, c = a.friction || .8, d = a.grivity || 0, e = (a.wind || 0, a.minLength || 0);
+ return {
+ items: [], timer: null, isPause: !1, addNode: function (a, b) {
+ var c = {node: a, target: b, vx: 0, vy: 0};
+ return this.items.push(c), this
+ }, play: function (a) {
+ this.stop(), a = null == a ? 1e3 / 24 : a;
+ var b = this;
+ this.timer = setInterval(function () {
+ b.nextFrame()
+ }, a)
+ }, stop: function () {
+ null != this.timer && window.clearInterval(this.timer)
+ }, nextFrame: function () {
+ for (var a = 0; a < this.items.length; a++) {
+ var f = this.items[a], g = f.node, h = f.target, i = f.vx, j = f.vy, k = h.x - g.x, l = h.y - g.y,
+ m = Math.atan2(l, k);
+ if (0 != e) {
+ var n = h.x - Math.cos(m) * e, o = h.y - Math.sin(m) * e;
+ i += (n - g.x) * b, j += (o - g.y) * b
+ } else i += k * b, j += l * b;
+ i *= c, j *= c, j += d, g.x += i, g.y += j, f.vx = i, f.vy = j
+ }
+ }
+ }
+ }
+
+ function f(a, b) {
+ function c() {
+ return e = setInterval(function () {
+ return o ? void f.stop() : (a.rotate += g || .2, void(a.rotate > 2 * Math.PI && (a.rotate = 0)))
+ }, 100), f
+ }
+
+ function d() {
+ return window.clearInterval(e), f.onStop && f.onStop(a), f
+ }
+
+ var e = (b.context, null), f = {}, g = b.v;
+ return f.run = c, f.stop = d, f.onStop = function (a) {
+ return f.onStop = a, f
+ }, f
+ }
+
+ function g(a, b) {
+ function c() {
+ return window.clearInterval(g), h.onStop && h.onStop(a), h
+ }
+
+ function d() {
+ var d = b.dx || 0, i = b.dy || 2;
+ return g = setInterval(function () {
+ return o ? void h.stop() : (i += f, void(a.y + a.height < e.stage.canvas.height ? a.setLocation(a.x + d, a.y + i) : (i = 0, c())))
+ }, 20), h
+ }
+
+ var e = b.context, f = b.gravity || .1, g = null, h = {};
+ return h.run = d, h.stop = c, h.onStop = function (a) {
+ return h.onStop = a, h
+ }, h
+ }
+
+ function h(b, c) {
+ function d(c, d, e, f, g) {
+ var h = new a.Node;
+ return h.setImage(b.image), h.setSize(b.width, b.height), h.setLocation(c, d), h.showSelected = !1, h.dragable = !1, h.paint = function (a) {
+ a.save(), a.arc(0, 0, e, f, g), a.clip(), a.beginPath(), null != this.image ? a.drawImage(this.image, -this.width / 2, -this.height / 2) : (a.fillStyle = "rgba(" + this.style.fillStyle + "," + this.alpha + ")", a.rect(-this.width / 2, -this.height / 2, this.width / 2, this.height / 2), a.fill()), a.closePath(), a.restore()
+ }, h
+ }
+
+ function e(c, e) {
+ var f = c, g = c + Math.PI, h = d(b.x, b.y, b.width, f, g),
+ j = d(b.x - 2 + 4 * Math.random(), b.y, b.width, f + Math.PI, f);
+ b.visible = !1, e.add(h), e.add(j), a.Animate.gravity(h, {context: e, dx: .3}).run().onStop(function () {
+ e.remove(h), e.remove(j), i.stop()
+ }), a.Animate.gravity(j, {context: e, dx: -.2}).run()
+ }
+
+ function f() {
+ return e(c.angle, h), i
+ }
+
+ function g() {
+ return i.onStop && i.onStop(b), i
+ }
+
+ var h = c.context, i = (b.style, {});
+ return i.onStop = function (a) {
+ return i.onStop = a, i
+ }, i.run = f, i.stop = g, i
+ }
+
+ function i(a, b) {
+ function c(a) {
+ a.visible = !0, a.rotate = Math.random();
+ var b = g.stage.canvas.width / 2;
+ a.x = b + Math.random() * (b - 100) - Math.random() * (b - 100), a.y = g.stage.canvas.height, a.vx = 5 * Math.random() - 5 * Math.random(), a.vy = -25
+ }
+
+ function d() {
+ return c(a), h = setInterval(function () {
+ return o ? void i.stop() : (a.vy += f, a.x += a.vx, a.y += a.vy, void((a.x < 0 || a.x > g.stage.canvas.width || a.y > g.stage.canvas.height) && (i.onStop && i.onStop(a), c(a))))
+ }, 50), i
+ }
+
+ function e() {
+ window.clearInterval(h)
+ }
+
+ var f = .8, g = b.context, h = null, i = {};
+ return i.onStop = function (a) {
+ return i.onStop = a, i
+ }, i.run = d, i.stop = e, i
+ }
+
+ function j() {
+ o = !0
+ }
+
+ function k() {
+ o = !1
+ }
+
+ function l(b, c) {
+ function d() {
+ return n = setInterval(function () {
+ if (o) return void m.stop();
+ var a = f.y + h + Math.sin(k) * j;
+ b.setLocation(b.x, a), k += l
+ }, 100), m
+ }
+
+ function e() {
+ window.clearInterval(n)
+ }
+
+ var f = c.p1, g = c.p2, h = (c.context, f.x + (g.x - f.x) / 2), i = f.y + (g.y - f.y) / 2,
+ j = a.util.getDistance(f, g) / 2, k = Math.atan2(i, h), l = c.speed || .2, m = {}, n = null;
+ return m.run = d, m.stop = e, m
+ }
+
+ function m(a, b) {
+ function c() {
+ return h = setInterval(function () {
+ if (o) return void g.stop();
+ var b = e.x - a.x, c = e.y - a.y, h = b * f, i = c * f;
+ a.x += h, a.y += i, .01 > h && .1 > i && d()
+ }, 100), g
+ }
+
+ function d() {
+ window.clearInterval(h)
+ }
+
+ var e = b.position, f = (b.context, b.easing || .2), g = {}, h = null;
+ return g.onStop = function (a) {
+ return g.onStop = a, g
+ }, g.run = c, g.stop = d, g
+ }
+
+ function n(a, b) {
+ function c() {
+ return j = setInterval(function () {
+ a.scaleX += f, a.scaleY += f, a.scaleX >= e && d()
+ }, 100), i
+ }
+
+ function d() {
+ i.onStop && i.onStop(a), a.scaleX = g, a.scaleY = h, window.clearInterval(j)
+ }
+
+ var e = (b.position, b.context, b.scale || 1), f = .06, g = a.scaleX, h = a.scaleY, i = {}, j = null;
+ return i.onStop = function (a) {
+ return i.onStop = a, i
+ }, i.run = c, i.stop = d, i
+ }
+
+ a.Animate = {}, a.Effect = {};
+ var o = !1;
+ a.Effect.spring = e, a.Effect.gravity = c, a.Animate.stepByStep = d, a.Animate.rotate = f, a.Animate.scale = n, a.Animate.move = m, a.Animate.cycle = l, a.Animate.repeatThrow = i, a.Animate.dividedTwoPiece = h, a.Animate.gravity = g, a.Animate.startAll = k, a.Animate.stopAll = j
+}(JTopo), function (a) {
+ function b(a, b) {
+ var c = [];
+ if (0 == a.length) return c;
+ var d = b.match(/^\s*(\w+)\s*$/);
+ if (null != d) {
+ var e = a.filter(function (a) {
+ return a.elementType == d[1]
+ });
+ null != e && e.length > 0 && (c = c.concat(e))
+ } else {
+ var f = !1;
+ if (d = b.match(/\s*(\w+)\s*\[\s*(\w+)\s*([>=<])\s*['"](\S+)['"]\s*\]\s*/), (null == d || d.length < 5) && (d = b.match(/\s*(\w+)\s*\[\s*(\w+)\s*([>=<])\s*(\d+(\.\d+)?)\s*\]\s*/), f = !0), null != d && d.length >= 5) {
+ var g = d[1], h = d[2], i = d[3], j = d[4];
+ e = a.filter(function (a) {
+ if (a.elementType != g) return !1;
+ var b = a[h];
+ return 1 == f && (b = parseInt(b)), "=" == i ? b == j : ">" == i ? b > j : "<" == i ? j > b : "<=" == i ? j >= b : ">=" == i ? b >= j : "!=" == i ? b != j : !1
+ }), null != e && e.length > 0 && (c = c.concat(e))
+ }
+ }
+ return c
+ }
+
+ function c(a) {
+ if (a.find = function (a) {
+ return d.call(this, a)
+ }, e.forEach(function (b) {
+ a[b] = function (a) {
+ for (var c = 0; c < this.length; c++) this[c][b](a);
+ return this
+ }
+ }), a.length > 0) {
+ var b = a[0];
+ for (var c in b) {
+ var f = b[c];
+ "function" == typeof f && !function (b) {
+ a[c] = function () {
+ for (var c = [], d = 0; d < a.length; d++) c.push(b.apply(a[d], arguments));
+ return c
+ }
+ }(f)
+ }
+ }
+ return a.attr = function (a, b) {
+ if (null != a && null != b) for (var c = 0; c < this.length; c++) this[c][a] = b; else {
+ if (null != a && "string" == typeof a) {
+ for (var d = [], c = 0; c < this.length; c++) d.push(this[c][a]);
+ return d
+ }
+ if (null != a) for (var c = 0; c < this.length; c++) for (var e in a) this[c][e] = a[e]
+ }
+ return this
+ }, a
+ }
+
+ function d(d) {
+ var e = [], f = [];
+ this instanceof a.Stage ? (e = this.childs, f = f.concat(e)) : this instanceof a.Scene ? e = [this] : f = this, e.forEach(function (a) {
+ f = f.concat(a.childs)
+ });
+ var g = null;
+ return g = "function" == typeof d ? f.filter(d) : b(f, d), g = c(g)
+ }
+
+ var e = "click,mousedown,mouseup,mouseover,mouseout,mousedrag,keydown,keyup".split(",");
+ a.Stage.prototype.find = d, a.Scene.prototype.find = d
+}(JTopo), function (a) {
+ function b(a, b) {
+ this.x = a, this.y = b
+ }
+
+ function c(a) {
+ this.p = new b(0, 0), this.w = new b(1, 0), this.paint = a
+ }
+
+ function d(a, b, c) {
+ return function (d) {
+ for (var e = 0; b > e; e++) a(), c && d.turn(c), d.move(3)
+ }
+ }
+
+ function e(a, b) {
+ var c = 2 * Math.PI;
+ return function (d) {
+ for (var e = 0; b > e; e++) a(), d.turn(c / b)
+ }
+ }
+
+ function f(a, b, c) {
+ return function (d) {
+ for (var e = 0; b > e; e++) a(), d.resize(c)
+ }
+ }
+
+ function g(a) {
+ var b = 2 * Math.PI;
+ return function (c) {
+ for (var d = 0; a > d; d++) c.forward(1), c.turn(b / a)
+ }
+ }
+
+ function h(a) {
+ var b = 4 * Math.PI;
+ return function (c) {
+ for (var d = 0; a > d; d++) c.forward(1), c.turn(b / a)
+ }
+ }
+
+ function i(a, b, c, d) {
+ return function (e) {
+ for (var f = 0; b > f; f++) a(), e.forward(1), e.turn(c), e.resize(d)
+ }
+ }
+
+ var j = {};
+ c.prototype.forward = function (a) {
+ var b = this.p, c = this.w;
+ return b.x = b.x + a * c.x, b.y = b.y + a * c.y, this.paint && this.paint(b.x, b.y), this
+ }, c.prototype.move = function (a) {
+ var b = this.p, c = this.w;
+ return b.x = b.x + a * c.x, b.y = b.y + a * c.y, this
+ }, c.prototype.moveTo = function (a, b) {
+ return this.p.x = a, this.p.y = b, this
+ }, c.prototype.turn = function (a) {
+ var b = (this.p, this.w), c = Math.cos(a) * b.x - Math.sin(a) * b.y, d = Math.sin(a) * b.x + Math.cos(a) * b.y;
+ return b.x = c, b.y = d, this
+ }, c.prototype.resize = function (a) {
+ var b = this.w;
+ return b.x = b.x * a, b.y = b.y * a, this
+ }, c.prototype.save = function () {
+ return null == this._stack && (this._stack = []), this._stack.push([this.p, this.w]), this
+ }, c.prototype.restore = function () {
+ if (null != this._stack && this._stack.length > 0) {
+ var a = this._stack.pop();
+ this.p = a[0], this.w = a[1]
+ }
+ return this
+ }, j.Tortoise = c, j.shift = d, j.spin = e, j.polygon = g, j.spiral = i, j.star = h, j.scale = f, a.Logo = j
+}(window);
diff --git a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/alarm-details.html b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/alarm-details.html
index f0c91660..a50a399d 100644
--- a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/alarm-details.html
+++ b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/alarm-details.html
@@ -15,13 +15,9 @@
-->
VNF Alarm Details
-
-
-
-
-
+
Event Name
@@ -95,6 +91,6 @@
-
+
+
-
-
+
+
Id | - -Event Name | - -Source Name | - - -Priority | -Start Time | -Status | -Option | -
---|---|---|---|---|---|---|
Id | +Event Name | +Source Name | +Priority | +Start Time | +Status | +Option | +
{{row.alarmsHeader.id}} | - -{{row.alarmsHeader.eventName}} | - -{{row.alarmsHeader.sourceName}} | - - -{{row.alarmsHeader.priority}} | -{{row.alarmsHeader.createTime}} | -{{row.alarmsHeader.status == 1?"Active":"Closed"}} | -- - | -
{{tableState.pagination.start+$index+1}} | +{{row.alarmsHeader.eventName}} | +{{row.alarmsHeader.sourceName}} | +{{row.alarmsHeader.priority}} | +{{row.alarmsHeader.createTime}} | +{{row.alarmsHeader.status == 1?"Active":"Closed"}} | ++ + | +
- - | -||||||
+ + | +||||||
-
-
-
-
- |
- - | -|||||
+
+
+
+
+ |
+ + | +
- -
+ +
- -
+ +
+
-
Event Name | diff --git a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/performance.html b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/performance.html index 5b6747b7..94d52e56 100644 --- a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/performance.html +++ b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/performance.html @@ -19,26 +19,43 @@
---|
Id | - -Event Name | - -Source Name | - - -Priority | -Start Time | -Option | -
---|---|---|---|---|---|
Id | +Event Name | +Source Name | +Priority | +Start Time | +Option | +
{{row.performanceHeader.id}} | - -{{row.performanceHeader.eventName}} | - -{{row.performanceHeader.sourceName}} | - - -{{row.performanceHeader.priority}} | -{{row.performanceHeader.createTime}} | -- |
{{tableState.pagination.start+$index+1}} | +{{row.performanceHeader.eventName}} | +{{row.performanceHeader.sourceName}} | +{{row.performanceHeader.priority}} | +{{row.performanceHeader.createTime}} | ++ + | +
- | -|||||
+ + | +|||||
-
-
-
-
- |
- - | -||||
+
+
+
+
+ |
+ + | +