(self["webpackChunknewfront"]=self["webpackChunknewfront"]||[]).push([[193],{37670:(e,t,o)=>{var i=o(33051),n=o(93321),r=o(9327),a=o(4272),s=o(78988),l=s.encodeHTML,d=s.addCommas,h=o(68833),u=h.wrapTreePathInfo,c=n.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(e,t){var o={name:e.name,children:e.data};p(o);var n=e.levels||[],s=this.designatedVisualItemStyle={},l=new a({itemStyle:s},this,t);n=e.levels=f(n,t);var d=i.map(n||[],(function(e){return new a(e,l,t)}),this),h=r.createTree(o,this,u);function u(e){e.wrapMethod("getItemModel",(function(e,t){var o=h.getNodeByDataIndex(t),i=d[o.depth];return e.parentModel=i||l,e}))}return h.data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(e){var t=this.getData(),o=this.getRawValue(e),n=i.isArray(o)?d(o[0]):d(o),r=t.getName(e);return l(r+": "+n)},getDataParams:function(e){var t=n.prototype.getDataParams.apply(this,arguments),o=this.getData().tree.getNodeByDataIndex(e);return t.treePathInfo=u(o,this),t},setLayoutInfo:function(e){this.layoutInfo=this.layoutInfo||{},i.extend(this.layoutInfo,e)},mapIdToIndex:function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=i.createHashMap(),this._idIndexMapCount=0);var o=t.get(e);return null==o&&t.set(e,o=this._idIndexMapCount++),o},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)}});function p(e){var t=0;i.each(e.children,(function(e){p(e);var o=e.value;i.isArray(o)&&(o=o[0]),t+=o}));var o=e.value;i.isArray(o)&&(o=o[0]),(null==o||isNaN(o))&&(o=t),o<0&&(o=0),i.isArray(e.value)?e.value[0]=o:e.value=o}function f(e,t){var o=t.get("color");if(o){var n;if(e=e||[],i.each(e,(function(e){var t=new a(e),o=t.get("color");(t.get("itemStyle.color")||o&&"none"!==o)&&(n=!0)})),!n){var r=e[0]||(e[0]={});r.color=o.slice()}return e}}e.exports=c},45255:(e,t,o)=>{var i=o(70492),n=o(33051),r=o(51177),a=o(4130),s=o(68833),l=o(2711),d=o(9176),h=o(60479),u=o(32892),c=o(34584),p=o(59066),f=o(78988),g=f.windowOpen,m=n.bind,v=r.Group,y=r.Rect,_=n.each,w=3,x=["label"],b=["emphasis","label"],I=["upperLabel"],D=["emphasis","upperLabel"],M=10,R=1,T=2,N=p([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),C=function(e){var t=N(e);return t.stroke=t.fill=t.lineWidth=null,t},S=i.extendChartView({type:"treemap",init:function(e,t){this._containerGroup,this._storage=A(),this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(e,t,o,i){var r=t.findComponents({mainType:"series",subType:"treemap",query:i});if(!(n.indexOf(r,e)<0)){this.seriesModel=e,this.api=o,this.ecModel=t;var a=["treemapZoomToNode","treemapRootToNode"],l=s.retrieveTargetInfo(i,a,e),d=i&&i.type,h=e.layoutInfo,u=!this._oldTree,c=this._storage,p="treemapRootToNode"===d&&l&&c?{rootNodeGroup:c.nodeGroup[l.node.getRawIndex()],direction:i.direction}:null,f=this._giveContainerGroup(h),g=this._doRender(f,e,p);u||d&&"treemapZoomToNode"!==d&&"treemapRootToNode"!==d?g.renderFinally():this._doAnimation(f,g,e,p),this._resetController(o),this._renderBreadcrumb(e,o,l)}},_giveContainerGroup:function(e){var t=this._containerGroup;return t||(t=this._containerGroup=new v,this._initEvents(t),this.group.add(t)),t.attr("position",[e.x,e.y]),t},_doRender:function(e,t,o){var i=t.getData().tree,r=this._oldTree,s=A(),l=A(),d=this._storage,h=[],u=n.curry(G,t,l,d,o,s,h);p(i.root?[i.root]:[],r&&r.root?[r.root]:[],e,i===r||!r,0);var c=f(d);return this._oldTree=i,this._storage=l,{lastsForAnimation:s,willDeleteEls:c,renderFinally:g};function p(e,t,o,i,r){function s(e){return e.getId()}function l(n,a){var s=null!=n?e[n]:null,l=null!=a?t[a]:null,d=u(s,l,o,r);d&&p(s&&s.viewChildren||[],l&&l.viewChildren||[],d,i,r+1)}i?(t=e,_(e,(function(e,t){!e.isRemoved()&&l(t,t)}))):new a(t,e,s,s).add(l).update(l).remove(n.curry(l,null)).execute()}function f(e){var t=A();return e&&_(e,(function(e,o){var i=t[o];_(e,(function(e){e&&(i.push(e),e.__tmWillDelete=1)}))})),t}function g(){_(c,(function(e){_(e,(function(e){e.parent&&e.parent.remove(e)}))})),_(h,(function(e){e.invisible=!0,e.dirty()}))}},_doAnimation:function(e,t,o,i){if(o.get("animation")){var r=o.get("animationDurationUpdate"),a=o.get("animationEasing"),s=c.createWrap();_(t.willDeleteEls,(function(e,t){_(e,(function(e,o){if(!e.invisible){var n,l=e.parent;if(i&&"drillDown"===i.direction)n=l===i.rootNodeGroup?{shape:{x:0,y:0,width:l.__tmNodeWidth,height:l.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var d=0,h=0;l.__tmWillDelete||(d=l.__tmNodeWidth/2,h=l.__tmNodeHeight/2),n="nodeGroup"===t?{position:[d,h],style:{opacity:0}}:{shape:{x:d,y:h,width:0,height:0},style:{opacity:0}}}n&&s.add(e,n,r,a)}}))})),_(this._storage,(function(e,o){_(e,(function(e,i){var l=t.lastsForAnimation[o][i],d={};l&&("nodeGroup"===o?l.old&&(d.position=e.position.slice(),e.attr("position",l.old)):(l.old&&(d.shape=n.extend({},e.shape),e.setShape(l.old)),l.fadein?(e.setStyle("opacity",0),d.style={opacity:1}):1!==e.style.opacity&&(d.style={opacity:1})),s.add(e,d,r,a))}))}),this),this._state="animating",s.done(m((function(){this._state="ready",t.renderFinally()}),this)).start()}},_resetController:function(e){var t=this._controller;t||(t=this._controller=new d(e.getZr()),t.enable(this.seriesModel.get("roam")),t.on("pan",m(this._onPan,this)),t.on("zoom",m(this._onZoom,this)));var o=new h(0,0,e.getWidth(),e.getHeight());t.setPointerChecker((function(e,t,i){return o.contain(t,i)}))},_clearController:function(){var e=this._controller;e&&(e.dispose(),e=null)},_onPan:function(e){if("animating"!==this._state&&(Math.abs(e.dx)>w||Math.abs(e.dy)>w)){var t=this.seriesModel.getData().tree.root;if(!t)return;var o=t.getLayout();if(!o)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x+e.dx,y:o.y+e.dy,width:o.width,height:o.height}})}},_onZoom:function(e){var t=e.originX,o=e.originY;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var n=i.getLayout();if(!n)return;var r=new h(n.x,n.y,n.width,n.height),a=this.seriesModel.layoutInfo;t-=a.x,o-=a.y;var s=u.create();u.translate(s,s,[-t,-o]),u.scale(s,s,[e.scale,e.scale]),u.translate(s,s,[t,o]),r.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:r.x,y:r.y,width:r.width,height:r.height}})}},_initEvents:function(e){e.on("click",(function(e){if("ready"===this._state){var t=this.seriesModel.get("nodeClick",!0);if(t){var o=this.findTarget(e.offsetX,e.offsetY);if(o){var i=o.node;if(i.getLayout().isLeafRoot)this._rootToNode(o);else if("zoomToNode"===t)this._zoomToNode(o);else if("link"===t){var n=i.hostTree.data.getItemModel(i.dataIndex),r=n.get("link",!0),a=n.get("target",!0)||"blank";r&&g(r,a)}}}}}),this)},_renderBreadcrumb:function(e,t,o){function i(t){"animating"!==this._state&&(s.aboveViewRoot(e.getViewRoot(),t)?this._rootToNode({node:t}):this._zoomToNode({node:t}))}o||(o=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2),o||(o={node:e.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new l(this.group))).render(e,t,o.node,m(i,this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=A(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},_rootToNode:function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},findTarget:function(e,t){var o,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},(function(i){var n=this._storage.background[i.getRawIndex()];if(n){var r=n.transformCoordToLocal(e,t),a=n.shape;if(!(a.x<=r[0]&&r[0]<=a.x+a.width&&a.y<=r[1]&&r[1]<=a.y+a.height))return!1;o={node:i,offsetX:r[0],offsetY:r[1]}}}),this),o}});function A(){return{nodeGroup:[],background:[],content:[]}}function G(e,t,o,i,a,s,l,d,h,u){if(l){var c=l.getLayout(),p=e.getData();if(p.setItemGraphicEl(l.dataIndex,null),c&&c.isInView){var f=c.width,g=c.height,m=c.borderWidth,_=c.invisible,w=l.getRawIndex(),M=d&&d.getRawIndex(),S=l.viewChildren,A=c.upperHeight,G=S&&S.length,H=l.getModel("itemStyle"),W=l.getModel("emphasis.itemStyle"),L=X("nodeGroup",v);if(L){if(h.add(L),L.attr("position",[c.x||0,c.y||0]),L.__tmNodeWidth=f,L.__tmNodeHeight=g,c.isAboveViewRoot)return L;var V=l.getModel(),E=X("background",y,u,R);if(E&&O(L,E,G&&c.upperLabelHeight),G)r.isHighDownDispatcher(L)&&r.setAsHighDownDispatcher(L,!1),E&&(r.setAsHighDownDispatcher(E,!0),p.setItemGraphicEl(l.dataIndex,E));else{var z=X("content",y,u,T);z&&P(L,z),E&&r.isHighDownDispatcher(E)&&r.setAsHighDownDispatcher(E,!1),r.setAsHighDownDispatcher(L,!0),p.setItemGraphicEl(l.dataIndex,L)}return L}}}function O(t,o,i){if(o.dataIndex=l.dataIndex,o.seriesIndex=e.seriesIndex,o.setShape({x:0,y:0,width:f,height:g}),_)B(o);else{o.invisible=!1;var n=l.getVisual("borderColor",!0),a=W.get("borderColor"),s=C(H);s.fill=n;var d=N(W);if(d.fill=a,i){var h=f-2*m;F(s,d,n,h,A,{x:m,y:0,width:h,height:A})}else s.text=d.text=null;o.setStyle(s),r.setElementHoverStyle(o,d)}t.add(o)}function P(t,o){o.dataIndex=l.dataIndex,o.seriesIndex=e.seriesIndex;var i=Math.max(f-2*m,0),n=Math.max(g-2*m,0);if(o.culling=!0,o.setShape({x:m,y:m,width:i,height:n}),_)B(o);else{o.invisible=!1;var a=l.getVisual("color",!0),s=C(H);s.fill=a;var d=N(W);F(s,d,a,i,n),o.setStyle(s),r.setElementHoverStyle(o,d)}t.add(o)}function B(e){!e.invisible&&s.push(e)}function F(t,o,i,a,s,d){var h=V.get("name"),u=V.getModel(d?I:x),p=V.getModel(d?D:b),f=u.getShallow("show");r.setLabelStyle(t,o,u,p,{defaultText:f?h:null,autoColor:i,isRectText:!0,labelFetcher:e,labelDataIndex:l.dataIndex,labelProp:d?"upperLabel":"label"}),Z(t,d,c),Z(o,d,c),d&&(t.textRect=n.clone(d)),t.truncate=f&&u.get("ellipsis")?{outerWidth:a,outerHeight:s,minChar:2}:null}function Z(t,o,i){var n=t.text;if(!o&&i.isLeafRoot&&null!=n){var r=e.get("drillDownIcon",!0);t.text=r?r+" "+n:n}}function X(e,i,n,r){var s=null!=M&&o[e][M],l=a[e];return s?(o[e][M]=null,Y(l,s,e)):_||(s=new i({z:k(n,r)}),s.__tmDepth=n,s.__tmStorageName=e,q(l,s,e)),t[e][w]=s}function Y(e,t,o){var i=e[w]={};i.old="nodeGroup"===o?t.position.slice():n.extend({},t.shape)}function q(e,t,o){var n=e[w]={},r=l.parentNode;if(r&&(!i||"drillDown"===i.direction)){var s=0,d=0,h=a.background[r.getRawIndex()];!i&&h&&h.old&&(s=h.old.width,d=h.old.height),n.old="nodeGroup"===o?[0,d]:{x:s,y:d,width:0,height:0}}n.fadein="nodeGroup"!==o}}function k(e,t){var o=e*M+t;return(o-1)/o}e.exports=S}}]);