fusioncharts
Version:
FusionCharts JavaScript charting framework
1 lines • 53.9 kB
JavaScript
!function(t){"object"==typeof module&&"undefined"!=typeof module.exports?module.exports=t:t()}(function(){(window.webpackJsonpFusionCharts=window.webpackJsonpFusionCharts||[]).push([[8],{1094:function(t,e,i){"use strict";var n=i(181);e.__esModule=!0,e["default"]=void 0;var a=n(i(1095));e.Treemap=a["default"];var r={name:"treemap",type:"package",requiresFusionCharts:!0,extension:function(t){return t.addDep(a["default"])}};e["default"]=r},1095:function(t,e,i){"use strict";var n=i(181);e.__esModule=!0,e["default"]=void 0;var a=n(i(1096))["default"];e["default"]=a},1096:function(t,e,i){"use strict";var n=i(181);e.__esModule=!0,e["default"]=void 0;var a=n(i(201)),r=n(i(406)),o=i(199),l=i(187),s=i(296),h=n(i(1097)),c=n(i(1099)),g=i(195),d=n(i(480)),f=i(509),u=n(i(511)),p=n(i(949)),v=n(i(953)),m=n(i(477)),b=n(i(319)),y=(0,g.getDep)("redraphael","plugin");(0,b["default"])(y),y.addSymbol({backIcon:function(t,e,i){var n=i-1,a=e+n,r=a-n/2,o=t+n,l=r-n;return["M",t,e-n,"L",t-n,e,t,a,t,r,o,r,o,l,o-n,l,"Z"]},homeIcon:function(t,e,i){var n=i-1,a=2*n,r=t-n,o=r+a/6,l=e+n,s=o+a/4,h=l-n/2,c=s+a/6,g=h+n/2,d=c+a/4,f=g-n;return["M",t,e-n,"L",r,e,o,e,o,l,s,l,s,h,c,h,c,g,d,g,d,f,d+a/6,f,"Z"]}});var x=function(t){function e(){var e;return(e=t.call(this)||this)._lastAttached={},e.hasGradientLegend=!0,e.addToEnv("ref",(0,c["default"])()),e.registerFactory("legend",u["default"]),e.registerFactory("legend",v["default"],["canvas"]),e.registerFactory("colormanager-decider",p["default"],["legend"]),e.registerFactory("mouseTracker",m["default"]),e.registerFactory("dataset",d["default"],["vCanvas"]),e}(0,a["default"])(e,t),e.getName=function(){return"TreeMap"};var i=e.prototype;return i.getName=function(){return"TreeMap"},i.__setDefaultConfig=function(){t.prototype.__setDefaultConfig.call(this),this.config.enablemousetracking=!0,this.config.skipCanvasDrawing=!0,this.config.valuefontbold=0},i.configureAttributes=function(t){this.config.skipConfigureIteration={},this.config.valuesset=!1,this.parseChartAttr(t),this.createComponent(t),this.setTooltipStyle(),this.configureChildren(),this._createToolBox()},i.mouseoutHandler=function(t,e,i){var n=this.config.datasetOrder||this.getDatasets(),a=this.getChildren("mouseTracker")[0];n[e]._firePlotEvent("fc-mouseout",i,t),delete a._lastDatasetIndex,delete a._lastPointIndex},i._mouseEvtHandler=function(t,e){var i,n,a,r,o,s=this,h=e.mouseTracker,c=t.originalEvent,g=s.config,d=g.canvasLeft,f=g.canvasRight,u=g.canvasBottom,p=g.canvasTop,v=g.datasetOrder||s.getDatasets(),m=(0,l.getMouseCoordinate)(s.getFromEnv("chart-container"),c,s),b=m.chartX,y=m.chartY,x=!1,k=v.length,C=h._lastDatasetIndex,w=h._lastPointIndex;if(b>d&&b<f&&y>p&&y<u||s.config.plotOverFlow)for(;k--&&!x;)(i=v[k])&&(n=i._getHoveredPlot&&i._getHoveredPlot(b,y))&&n.hovered&&(x=!0,n.datasetIndex=k,o=h.getMouseEvents(t,n.datasetIndex,n.pointIndex));if((!x||o&&o.fireOut)&&void 0!==C&&v[C]&&v[C]._firePlotEvent&&(o&&!o.events.length?h.mouseoutTimer=setTimeout(function(){s.mouseoutHandler(t,C,w)},20):(s.mouseoutHandler(t,C,w),clearTimeout(h.mouseoutTimer))),x)for((r=o.events&&o.events.length)&&(h._lastDatasetIndex=n.datasetIndex,w=h._lastPointIndex=n.pointIndex),a=0;a<r;a+=1)i&&i._firePlotEvent&&i._firePlotEvent(o.events[a],w,t)},i._checkInvalidSpecificData=function(){if(!this.getFromEnv("dataSource").data)return!0},i.addData=function(){var t=this.getFromEnv("ref"),e=t.algorithmFactory,i=Array.prototype.slice.call(arguments,0);i.unshift("addData"),i.unshift(this._getCleanValue()),e.realTimeUpdate.apply(this,i)},i.removeData=function(){var t=this.getFromEnv("ref"),e=t.algorithmFactory,i=Array.prototype.slice.call(arguments,0);i.unshift("deleteData"),i.unshift(this._getCleanValue()),e.realTimeUpdate.apply(this,i)},i.triggerKDTreePartioning=function(){var t=this.getDatasets()[0];t.addJob("partitioning",t.kdTreePartioning.bind(t),o.priorityList.tracker)},i.resetSingleTracker=function(){var t=this.getDatasets()[0],e=t&&t.graphics&&t.graphics.singleTracker;e&&e.attr({x:0,y:0,width:0,height:0,stroke:"rgba(255,255,255,0)","fill-opacity":0})},i._manageLegendSpace=function(){f._manageLegendSpace.call(this)},i.manageGradientLegendSpace=function(t){return f.manageGradientLegendSpace.call(this,t)},i.flushKDTree=function(){this.getDatasets()[0].kdTree={}},i._createToolBox=function(){t.prototype._createToolBox.call(this);var e,i="t"===this.config.toolbarVAlign?"chartMenuBar":"actionBar",n=this.getFromEnv("tool-config");e=this.getChildren(i)[0];for(var a=0;a<2;a++)e.attachChild(s.Tool,"tool",(0===a?"home":"back")+"-"+e.getId()+"-"+this.getId());e.getChild("back-"+e.getId()+"-"+this.getId()).configure(Object.assign({},n,{name:"backIcon",isHidden:!0})),e.getChild("home-"+e.getId()+"-"+this.getId()).configure(Object.assign({},n,{name:"homeIcon",isHidden:!0})),this.addToEnv("toolbarBtns",{back:e.getChild("back-"+e.getId()+"-"+this.getId()),home:e.getChild("home-"+e.getId()+"-"+this.getId())})},i._getCleanValue=function(){var t=this.getFromEnv("number-formatter");return function(e){return t.getCleanValue(e)}},i.getDSdef=function(){return h["default"]},e}(r["default"]);e["default"]=x},1097:function(t,e,i){"use strict";var n=i(181);e.__esModule=!0,e["default"]=void 0;var a=n(i(204)),r=n(i(201)),o=i(202),l=i(199),s=i(187),h=i(195),c=n(i(1098)),g=s.preDefStr.DEFAULT,d=function(t,e,i){return i.getFromEnv("animationManager").setAnimation({el:"group",attr:{name:t},container:e,state:"appearing",component:i,doNotRemove:!0,label:"group"})},f=function(t,e,i){return t>=e&&t<=i},u=function(t,e,i){var n=t[e];t[e]=t[i],t[i]=n},p=function(t){var e,i,n=t,a=n&&n[0]&&n[0].plotDetails.rect||5,r=Math.max,o=Math.floor,l=Math.sqrt,s=Math.min,h=Math.log,c=Math.exp,g=Math.pow;for(e=(n=n||[]).length;e--;)n[e].r>a&&(a=n[e].r),n[e].x=+n[e].plotDetails.rect.x,n[e].y=+n[e].plotDetails.rect.y;return i={tree:function d(t,e,i,n){var a,g={},f=e,p=i,v=n?"y":"x";return f===p?(g.point=t[f],g):p-f==1?(t[f][v]>t[p][v]?(g.point=t[f],g.left={point:t[p]}):(g.point=t[p],g.left={point:t[f]}),g):(a=f+p>>1,n?function m(t,e,i,n){for(var a,g,d,f,p,v,b,y,x,k,C=i,w=n;w>C;){for(w-C>600&&(g=e-C+1,d=h(a=w-C+1),f=.5*c(2*d/3),p=.5*l(d*f*(a-f)/a)*(g-a/2<0?-1:1),v=r(C,o(e-g*f/a+p)),b=s(w,o(e+(a-g)*f/a+p)),m(t,e,v,b)),y=t[e],x=C,k=w,u(t,C,e),t[w].y>y.y&&u(t,C,w);x<k;){for(u(t,x,k),x++,k--;t[x].y<y.y;)x++;for(;t[k].y>y.y;)k--}t[C].y===y.y?u(t,C,k):u(t,++k,w),k<=e&&(C=k+1),e<=k&&(w=k-1)}}(t,a,f,p):function b(t,e,i,n){for(var a,g,d,f,p,v,m,y,x,k,C=i,w=n;w>C;){for(w-C>600&&(g=e-C+1,d=h(a=w-C+1),f=.5*c(2*d/3),p=.5*l(d*f*(a-f)/a)*(g-a/2<0?-1:1),v=r(C,o(e-g*f/a+p)),m=s(w,o(e+(a-g)*f/a+p)),b(t,e,v,m)),y=t[e],x=C,k=w,u(t,C,e),t[w].x>y.x&&u(t,C,w);x<k;){for(u(t,x,k),x++,k--;t[x].x<y.x;)x++;for(;t[k].x>y.x;)k--}t[C].x===y.x?u(t,C,k):u(t,++k,w),k<=e&&(C=k+1),e<=k&&(w=k-1)}}(t,a,f,p),g.point=t[a],g.left=d(t,f,a-1,!n),g.right=d(t,a+1,p,!n),g)}(n,0,n.length-1,!1),search:function(t,e){function i(i){var n=f(t,i.x1,i.x2)&&f(e,i.y1,i.y2),a=function(t,e,i,n){return l(g(t-i,2)+g(e-n,2))}(t,e,i.point.x,i.point.y);if(!o)return o=i,p=n,void(v=a);n?p?i.point.i>o.point.i&&(o=i,p=n,v=a):(o=i,p=n,v=a):p||a<v&&(o=i,p=n,v=a)}function n(t){t&&t.point&&(f(t.point.x,h,c)&&f(t.point.y,d,u)&&i(t),h<=t.point.x&&r(t.left),c>=t.point.x&&r(t.right))}function r(t){t&&t.point&&(f(t.point.x,h,c)&&f(t.point.y,d,u)&&i(t),d<=t.point.y&&n(t.left),u>=t.point.y&&n(t.right))}var o,s=this.tree,h=t-a,c=t+a,d=e-a,u=e+a,p=!1,v=0;return n(s),o&&o.point||o},searchTreemap:function(t,e){var i;return function n(a,r){if(a&&a.point){var o=a.point.x,l=o+a.point.plotDetails.rect.width,s=a.point.y,h=s+a.point.plotDetails.rect.height;a.point.x2=l,a.point.y2=h,t>=o&&t<=l&&e>=s&&e<=h&&function(t){i?t.i>i.i&&(i=t):i=t}(a.point),n(a.left,!r),n(a.right,!r)}}(this.tree,!1),i}},n.sort(function(t,e){return t.i-e.i}),i};(0,h.addDep)({name:"treeMapAnimation",type:"animationRule",extension:c["default"]});var v=function(t){function e(){var e;e=t.call(this)||this;var i=(0,a["default"])(e);return i.components={},i.conf={},i.graphics={elemStore:{rect:[],label:[],highlight:[],hot:[],polypath:[]}},e}(0,r["default"])(e,t);var i=e.prototype;return i.getName=function(){return"treeMap"},i.configureAttributes=function(t){if(t){this.config.JSONData=t.data[0];var e,i,n,a=this.getFromEnv("chart"),r=this.conf,o=a.getFromEnv("chart-attrib");r.metaTreeInf={},e=o.algorithm||"squarified",r.algorithm=e.toLowerCase(),r.range=void 0,r.horizontalPadding=(0,s.pluckNumber)(o.horizontalpadding,5),r.horizontalPadding=r.horizontalPadding<0?0:r.horizontalPadding,r.verticalPadding=(0,s.pluckNumber)(o.verticalpadding,5),r.verticalPadding=r.verticalPadding<0?0:r.verticalPadding,r.showParent=(0,s.pluckNumber)(o.showparent,1),r.showChildLabels=(0,s.pluckNumber)(o.showchildlabels,0),r.showHoverEffect=(0,s.pluckNumber)(o.showhovereffect,1),r.highlightParentsOnHover=(0,s.pluckNumber)(o.highlightparentsonhover,0),r.defaultParentBGColor=(0,s.pluck)(o.defaultparentbgcolor,void 0),r.defaultNavigationBarBGColor=(0,s.pluck)(o.defaultnavigationbarbgcolor,r.defaultParentBGColor),r.showTooltip=(0,s.pluckNumber)(o.showtooltip,1),r.baseFontSize=(0,s.pluckNumber)(o.basefontsize,10),r.baseFontSize=r.baseFontSize<1?1:r.baseFontSize,r.labelFontSize=(0,s.pluckNumber)(o.labelfontsize,void 0),r.labelFontSize=r.labelFontSize<1?1:r.labelFontSize,r.baseFont=(0,s.pluck)(o.basefont,"Verdana, Sans"),r.labelFont=(0,s.pluck)(o.labelfont,void 0),r.showTextOutline=(0,s.pluckNumber)(o.textoutline,0),r.baseFontColor=(0,s.pluck)(o.basefontcolor,"#000000").replace(/^#?([a-f0-9]+)/gi,"#$1"),r.labelFontColor=(0,s.pluck)(o.labelfontcolor,void 0),r.labelFontColor&&(r.labelFontColor=r.labelFontColor.replace(/^#?([a-f0-9]+)/gi,"#$1")),r.labelFontBold=(0,s.pluckNumber)(o.labelfontbold,0),r.labelFontItalic=(0,s.pluckNumber)(o.labelfontitalic,0),r.plotBorderThickness=(0,s.pluckNumber)(o.plotborderthickness,1),r.plotBorderThickness=r.plotBorderThickness<0?0:r.plotBorderThickness>5?5:r.plotBorderThickness,r.plotBorderColor=(0,s.pluck)(o.plotbordercolor,"#000000").replace(/^#?([a-f0-9]+)/gi,"#$1"),r.tooltipSeparationCharacter=(0,s.pluck)(o.tooltipsepchar,","),r.plotToolText=(0,s.parseUnsafeString)((0,s.pluck)(o.plottooltext,"")),r.parentLabelLineHeight=(0,s.pluckNumber)(o.parentlabellineheight,12),r.parentLabelLineHeight=r.parentLabelLineHeight<0?0:r.parentLabelLineHeight,r.labelGlow=r.showTextOutline?0:(0,s.pluckNumber)(o.labelglow,1),r.labelGlowIntensity=(0,s.pluckNumber)(o.labelglowintensity,100)/100,r.labelGlowIntensity=r.labelGlowIntensity<0?0:r.labelGlowIntensity>1?1:r.labelGlowIntensity,r.labelGlowColor=(0,s.pluck)(o.labelglowcolor,"#ffffff").replace(/^#?([a-f0-9]+)/gi,"#$1"),r.labelGlowRadius=(0,s.pluckNumber)(o.labelglowradius,2),r.labelGlowRadius=r.labelGlowRadius<0?0:r.labelGlowRadius>10?10:r.labelGlowRadius,r.btnResetChartTooltext=(0,s.pluck)(o.btnresetcharttooltext,"Back to Top"),r.btnBackChartTooltext=(0,s.pluck)(o.btnbackcharttooltext,"Back to Parent"),r.rangeOutBgColor=(0,s.pluck)(o.rangeoutbgcolor,"#808080").replace(/^#?([a-f0-9]+)/gi,"#$1"),r.rangeOutBgAlpha=(0,s.pluckNumber)(o.rangeoutbgalpha,100),r.rangeOutBgAlpha=r.rangeOutBgAlpha<1||r.rangeOutBgAlpha>100?100:r.rangeOutBgAlpha,i=(0,s.pluckNumber)(o.maxdepth),r.maxDepth=void 0!==i?Math.max(i,1):void 0,n=r.showNavigationBar=(0,s.pluckNumber)(o.shownavigationbar,1),r.slicingMode=(0,s.pluck)(o.slicingmode,"alternate"),r.navigationBarHeight=(0,s.pluckNumber)(o.navigationbarheight),r.navigationBarHeightRatio=(0,s.pluckNumber)(o.navigationbarheightratio),r.navigationBarBorderColor=(0,s.pluck)(o.navigationbarbordercolor,r.plotBorderColor).replace(/^#?([a-f0-9]+)/gi,"#$1"),r.navigationBarBorderThickness=n?(0,s.pluckNumber)(o.navigationbarborderthickness,r.plotBorderThickness):0,r.seperatorAngle=(0,s.pluckNumber)(o.seperatorangle)*(Math.PI/180),r.isConfigured=!0,this.setState("dirty",!0)}},i.createContainer=function(){var t,e,i,n,a=this.getLinkedParent().getChildContainer();t=this.getContainer("plots")||this.addContainer("plots",d("plots",a.defaultGroup,this)),e=this.getContainer("datalabels")||this.addContainer("datalabels",d("datalabels",a.defaultGroup,this).insertAfter(t)),i=this.getContainer("tracker")||this.addContainer("tracker",d("tracker",a.defaultGroup,this)),!this.getContainer("line-hot")&&this.addContainer("line-hot",d("line-hot",i,this)),n=this.getContainer("labelhighlight")||this.addContainer("labelhighlight",d("labelhighlight",e,this)),!this.getContainer("labelfloat")&&this.addContainer("labelfloat",d("labelfloat",e,this).insertAfter(n))},i._getHoveredPlot=function(t,e){var i,n,a;for(n=(a=Object.keys(this.config.kdTree||{})).length-1;n>-1;n--)if(this.config.kdTree[a[n]].searchTreemap(t,e)){i=this.config.kdTree[a[n]].searchTreemap(t,e);break}if(i)return this.pointObj=i,{pointIndex:i.i||i.index,hovered:!0,pointObj:i}},i.kdTreePartioning=function(){var t,e,i=this.getFromEnv("chartConfig").trackerConfig,n={};for(t=i.length;t--;)i[t].i=t,void 0===n[i[t].node.meta.depth]&&(n[i[t].node.meta.depth]=[]),n[i[t].node.meta.depth].push(i[t]);for(this.config.kdTree={},t=(e=Object.keys(n)).length-1;t>-1;t--)this.config.kdTree[e[t]]=p&&p(n[e[t]])},i._rolloverResponseSetter=function(t,e,i){var n=t.getData(),a=i.getFromEnv("animationManager"),r=this.getFromEnv("chart");n&&0!==n.showHoverEffect&&(r.getState("drill")||(a.setAnimationState("mouseOver"),a.setAnimation({el:t,label:"rect",component:i,attr:t.getData().setRolloverAttr})),r.plotEventHandler(t,e,"DataPlotRollOver"))},i._rolloutResponseSetter=function(t,e,i){var n=t.getData(),a=i.getFromEnv("animationManager"),r=this.getFromEnv("chart");n&&0!==n.showHoverEffect&&(r.getState("drill")||(a.setAnimationState("mouseOut"),a.setAnimation({el:t,label:"rect",component:i,doNotRemove:!0,attr:t.getData().setRolloutAttr})),r.plotEventHandler(t,e,"DataPlotRollOut"))},i._getParentNode=function(t){void 0===t&&(t=[]);var e,i=this.conf.navigationBarNodes||[],n=i.length,a=t.length,r=t[a-2],o=t[a-1],l=!1;if(a<2)return!1;for(e=0;e<n;e++)if(i[e].id===r.id){l=!0;break}return l?o:r},i._firePlotEvent=function(t,e,i){var n,a=this.config.currentToolTip,r=this.getFromEnv("chartConfig").trackerConfig[e||0],o=r&&r.node&&r.node.plotItem,h=r&&r.plotDetails&&r.plotDetails.toolText,c=this.getFromEnv("toolTipController"),d=i.originalEvent,f=this.graphics.singleTracker,u=this.pointObj.plotDetails,p=this._getParentNode(r&&r.node.path),v=p&&p.rect;if(o?n=this.conf.highlightParentsOnHover&&p?{x:v.x,y:v.y,width:v.width,height:v.height,stroke:"rgba(255,255,255,0)"}:{x:u.rect.x||0,y:u.rect.y||0,width:u.rect.width||0,height:u.rect.height||0,stroke:"rgba(255,255,255,0)"}:(o=r&&(r.node.plotItem||r.node.polyPathItem),(u={}).rect={}),f=this.graphics.singleTracker=this.getFromEnv("animationManager").setAnimation({el:this.graphics.singleTracker||"rect",attr:n,component:this,label:"tracker",container:this.getContainer("tracker"),doNotRemove:!0}).toFront(),o)switch(o.node.style.cursor="pointer",f.node.style.cursor="pointer",t){case"fc-mouseover":this.conf.showHoverEffect?r.evtFns.hover[0](f):f.attr("fill",s.TRACKER_FILL),h&&(a?c.draw(d,h,a):a=this.config.currentToolTip=c.draw(d,h));break;case"fc-mouseout":o.node.style.cursor=g,f.node.style.cursor="pointer",f.attr({x:0,y:0,width:0,height:0,stroke:"#ffffff","stroke-width":"0px"}),f.toFront(),c.hide(a),this._rolloutResponseSetter(o,i,this);break;case"fc-click":r&&r.evtFns&&r.evtFns.click&&r.evtFns.click[0](),this.config.kdTree={},this.addJob("click",this.kdTreePartioning.bind(this),l.priorityList.tracker);break;case"fc-mousemove":h&&(a?c.draw(d,h,a):a=this.config.currentToolTip=c.draw(d,h))}},i.draw=function(){var t,e,i,n,a,r,o,h=this,c=h.conf,g=h.getFromEnv("chart"),d=h.getFromEnv("chartConfig"),f=d.trackerConfig,u=d.canvasLeft,p=d.canvasTop,v=c.metaTreeInf,m=h.graphics.elemStore,b={},y=c._graphicPool||(c._graphicPool={}),x={},k=["fontFamily","fontSize","fontWeight","fontStyle"],C={},w=c,I=this.getFromEnv("ref"),P=h.getFromEnv("animationManager"),T=I.containerManager,A=I.algorithmFactory,_={};for(f&&(f.length=0),h.createContainer(),r=(0,s.parsexAxisStyles)({},{},h.getFromEnv("chart-attrib"),{fontFamily:"Verdana,sans",fontSize:"10px"}),n=0,a=k.length;n<a;n++)(o=k[n])in r&&(C[o]=r[o]);T.remove(),t=h.getContainer("plots"),h.getContainer("datalabels").css(C),c.colorRange=h.getFromEnv("colorManager"),v.effectiveWidth=d.canvasRight-u,v.effectiveHeight=d.canvasBottom-p,v.startX=u,v.startY=p,x.x=v.effectiveWidth/2,x.y=v.effectiveHeight/2,x.x=v.effectiveWidth/2,x.y=v.effectiveHeight/2,b.drawPolyPath=function(e,i,n){var a;return _[n.id]&&delete _[n.id],(a=P.setAnimation({el:b.graphicPool(!1,"polyPathItem")||"path",container:t,attr:{path:e.path},css:i,state:g.getState("drill")?"updating":"appearing",label:"path",component:h}))&&m.polypath.push(a),a},b.drawRect=function(e,i,n,a,r){var o,l={},c={};for(o in _[r.id]&&delete _[r.id],e)e[o]<0&&(e[o]=0,c.visibility="hidden");return(0,s.extend2)(l,e),l.x=x.x,l.y=x.y,l.height=0,l.width=0,P.setAnimation({el:b.graphicPool(!1,"plotItem")||"rect",container:t,attr:e,css:Object.assign(i,c),state:g.getState("drill")?"updating":"appearing",props:r.__props,label:"rect",component:h}).toFront()},b.drawText=function(t,e,i,n,a,r){void 0===a&&(a={});var o,l,c,d,f,u={},p=t,v=i.textAttrs,y=i.highlightAttrs;return o=g.getState("drill")?"updating":"appearing",_[r.id]&&delete _[r.id],(0,s.extend2)(u,v),delete u.fill,u["stroke-linejoin"]="round",delete a.opacity,p=e.x<0||e.y<0?s.BLANKSTRING:p,c=Object.assign({},v,a,{text:p,x:e.x,y:e.y,visibility:"visible"}),(l=P.setAnimation({el:b.graphicPool(!1,"labelItem")||b.graphicPool(!1,"pathlabelItem")||"text",container:h.getContainer("labelfloat"),component:h,attr:c,state:o,label:"labelItem"})).outlineText(h.conf.showTextOutline,c.fill),l.show(),f="hidden"!==y.visibility,delete y.visibility,d=P.setAnimation({el:b.graphicPool(!1,"highlightItem")||b.graphicPool(!1,"pathhighlightItem")||"text",container:h.getContainer("labelhighlight"),component:h,attr:Object.assign({},a,y,{x:e.x,y:e.y,text:f?p:"",visibility:"visible"}),css:{lineHeight:1.2*u.fontSize+"px"},state:o,label:"highlightItem"}),h.prevLabelGlowVisibility!==f&&!0===f&&d.show(),h.prevLabelGlowVisibility=f,m.label.push(void 0),m.highlight.push(void 0),{label:l,highlightMask:d}},b.disposeItems=function(t,e){var i,n,a,r=e||["plotItem","labelItem","hotItem","highlightItem","polyPathItem","pathlabelItem","pathhighlightItem","stackedpolyPathItem","stackedpathlabelItem","stackedpathhighlightItem"];for(i=0;i<r.length;i+=1)(n=t[a=r[i]])&&"text"===n.type&&n.attr({text:"","text-bound":[]}),n&&!n.removed&&(n=P.setAnimation({el:n,component:h})),t[a]=void 0},b.disposeChild=function(){var t,e=function(){return t.disposeItems};return function(i){var n=i.getParent();t||(t=this,e=e()),n?t.disposeChild(n):function a(t,i){var n;for(e(t),n=0;n<(t.getChildren()||[]).length;n++)n=a(t.getChildren()[n],n);return i}(i,0)}}(),b.disposeSelectedChildren=function(){var t,e=function(){return t.addRemovalNodes};return function(i){var n=i.getParent();t||(t=this,e=e()),n?t.addRemovalNodes(n):function a(t,i){var n;for(e(t),n=0;n<(t.getChildren()||[]).length;++n)n=a(t.getChildren()[n],n);return i}(i,0)}}(),b.addRemovalNodes=function(t){_[t.id]=t},b.hideNodes=function(){var t,e,i,n,a=["plotItem","labelItem","hotItem","highlightItem","polyPathItem","pathlabelItem","pathhighlightItem","stackedpolyPathItem","stackedpathlabelItem","stackedpathhighlightItem"];for(var r in _)for(i=_[r],t=0;t<a.length;t+=1)(e=i[n=a[t]])&&"text"===e.type&&e.attr({text:"","text-bound":[]}),e=e&&!e.removed&&P.setAnimation({el:e,component:h,label:"gen"}),i[n]=void 0},b.graphicPool=function(t,e,i){var n,a=y[e];if(a||(a=y[e]=[]),"hotItem"!==e&&"pathhotItem"!==e||i.remove(),t)a.push(i);else if(n=a.splice(0,1)[0])return n.show(),n},b.disposeComplimentary=function(t){var e,i,n=t.getParent(),a=t.getSiblingCount("left");n&&(e=(i=n.getChildren()).splice(a,1)[0],this.disposeChild(t),i.splice(a,0,e)),this.removeLayers()},b.removeLayers=function(){var t,e,i,n;for(e=(n=m.hot).length,t=0;t<e;t++)(i=n[t])&&i.remove();n.length=0},h.getState("dirty")&&(A.init(c.algorithm,!0,c.maxDepth),e=A.plotOnCanvas(h.config.JSONData,g._getCleanValue()),T.init(h,v,b,void 0,e)),T.draw(),i=A.applyShadeFiltering({fill:w.rangeOutBgColor,opacity:.01*w.rangeOutBgAlpha},function(t){this.plotItem&&this.plotItem.css(t)}),h.addExtEventListener("legendUpdate",function(t,e){i.call(this,{start:e.maxMinArray[0].min,end:e.maxMinArray[0].max}),c.range={min:e.maxMinArray[0].min,max:e.maxMinArray[0].max}},h.getFromEnv("colorManager")),c.isConfigured=!1,h.addJob("buildKDTreeID",h.kdTreePartioning.bind(h),l.priorityList.tracker)},i.getType=function(){return"dataset"},i.setJSONIndex=function(t){this.config.index=t},i.getJSONIndex=function(){return this.config.index||0},e}(o.ComponentInterface);e["default"]=v},1098:function(t,e,i){"use strict";e.__esModule=!0,e["default"]=void 0;e["default"]={"*.dataset.treeMap":function(){var t=this.getFromEnv("canvasConfig"),e=t.canvasLeft+t.canvasHeight/2,i=t.canvasWidth/2+t.canvasTop,n={appearing:[{initialAttr:{opacity:0},finalAttr:{opacity:1},slot:"final"}],updating:[{initialAttr:{opacity:0},finalAttr:{opacity:1},slot:"final"}],disappearing:[{initialAttr:{opacity:1},finalAttr:{opacity:0},slot:"initial"}]},a={appearing:[{initialAttr:{opacity:0},finalAttr:{opacity:1},slot:"final"}],updating:function(t){return[{initialAttr:{opacity:0,path:"string"!=typeof t.el?t.el.attr("path"):t.attr.path},finalAttr:{opacity:1,path:t.attr.path},slot:"final"}]}},r={appearing:function(){return[{initialAttr:{x:i,y:e,width:0,height:0,opacity:0},finalAttr:{opacity:1},slot:"plot"}]},disappearing:[{finalAttr:{opacity:0},slot:"initial"}],updating:function(t){var e=t.props.prev&&t.props.prev.x===t.attr.x,i=t.props.prev&&t.props.prev.y===t.attr.y,n=t.props.prev&&t.props.prev.height===t.attr.height,a=t.props.prev&&t.props.prev.width===t.attr.width;return e&&i&&n&&a?[{initialAttr:{opacity:0},finalAttr:{opacity:1},slot:"final"}]:t.props.prev?[{initialAttr:{x:t.props.prev.x,y:t.props.prev.y,width:t.props.prev.width,height:t.props.prev.height},slot:"plot"}]:[{initialAttr:{x:t.attr.x,y:t.attr.y,width:t.attr.width,height:t.attr.height},slot:"plot"}]}};return{"rect.appearing":r.appearing,"rect.updating":r.updating,"rect.disappearing":r.disappearing,"path.appearing":a.appearing,"path.updating":a.updating,"path.disappearing":r.disappearing,"labelItem.appearing":n.appearing,"labelItem.updating":n.updating,"labelItem.disappearing":n.disappearing,"highlightItem.appearing":n.appearing,"highlightItem.updating":n.updating,"highlightItem.disappearing":n.disappearing,"gen.disappearing":n.disappearing,"*":null}}}},1099:function(t,e,i){"use strict";var n=i(181);e.__esModule=!0,e["default"]=void 0;var a,r=n(i(201)),o=i(187),l=i(199),s="drillup",h="hidden",c="none",g="click",d="ClickedState",f="VisibileRoot",u="dataplotclick",p="dataplotrollover",v="dataplotrollout",m="drilldown",b=1,y=function(t,e){var i,n,r,b,y,x,k,C,I,A=function(){function t(t,e,i){this.node=t,this.bucket=e?new P:a,this.cleansingFn=i}var e=t.prototype;return e.get=function(){var t=this.order,e=this.bucket,i=this.cleansingFn;return function n(a,r){var o,l,s,h,c,g=["label","value","data","svalue"];if(a)for(c in o=new T(a.label,i(a.value),i(a.svalue)),0===(s=a.data||[]).length&&e&&e.addInBucket(o),o.setDepth(r),a)-1===g.indexOf(c)&&o.setMeta(c,a[c]);for(t&&(s=t(s)),l=0;l<s.length;l++)h=n(s[l],r+1),o.addChild(h);return o}(this.node,0)},e.getBucket=function(){return this.bucket},t.getMaxDepth=function(){return n},t}();function _(t){r=t}return i=function(t,e){var i={},n=e&&e.exception,r=function(){function t(t){this.iterAPI=t}return t.prototype.initWith=function(t){return this.iterAPI(t)},t}();return i.df=function(t){var e=t,i=[],r=!1;return i.push(e),{next:function(t){var e,o;if(!r){if(o=i.shift(),!n||o!==n||(o=i.shift()))return((e=t!==a&&o.getDepth()>=t?[]:o.getChildren())&&e.length||0)&&[].unshift.apply(i,e),0===i.length&&(r=!0),o;r=!0}},reset:function(){r=!1,e=t,i.length=0,i.push(e)}}},i.bf=function(t){var e=t,i=[],n=[],a=!1;return i.push(e),n.push(e),{next:function(){var t,e;if(!a)return((t=(e=i.shift()).getChildren())&&t.length||0)&&[].push.apply(i,t),0===i.length&&(a=!0),e},nextBatch:function(){var t;if(!a)return((t=n.shift().getChildren())&&t.length||0)&&[].push.apply(n,t),0===i.length&&(a=!0),t},reset:function(){a=!1,e=t,i.length=0,i.push(e)}}},{df:new r(i.df).initWith(t),bf:new r(i.bf).initWith(t)}},y=function(){var t={};function e(){this.con={}}return e.prototype.constructor=e,e.prototype.get=function(t){return this.con[t]},e.prototype.set=function(t,e){this.con[t]=e},e.prototype["delete"]=function(t){return delete this.con[t]},{getInstance:function(i){var n;return t[i]?(n=t[i],n):n=t[i]=new e}}}(),k=[],C=!1,I={visibility:"visible",opacity:1},b={controlPreAnimVisibility:function(t,e){var n,a,r,o;if(t){for(a=t;a=a.getParent();)n=a;for(r=i(n,{exception:t}).df;o=r.next();)(o.overAttr||(o.overAttr={})).visibility=h,k.push(o);return x=e||t.getParent(),C=!1,k}},displayAll:function(t){var e,n;if(t){for(e=i(t.getParent()||t).df;n=e.next();)(n.overAttr||(n.overAttr={})).visibility="visible";x=a,k.length=0,C=!1}},controlPostAnimVisibility:function(){var t,e,r,o;if(!C&&(C=!0,x)){for(r=i(x).df;o=r.next(n);)o.dirtyNode&&((e=o.dirtyNode)&&e.plotItem.attr(I),(t=e&&e.textItem)&&t.label&&t.label.attr(I),t&&t.label&&t.highlightMask.attr(I));x=a,k.length=0}}},t.AbstractTreeMaker=A,t.iterator=i,t.initConfigurationForlabel=function(t,e,i){var r=e,l=t.x,s=t.y,c=r/2,g=i.showParent?0:1,d=i.showChildLabels;return function(t,e,f){var u,p,v,m=!1,b={x:a,y:a,width:a,height:a},y={},x=0,k={};if(v=t.meta,t)return t.isLeaf(n)||(m=!0),y.label=t.getLabel(),b.width=e.width-2*l,b.x=e.x+e.width/2,p=e.height-2*s,!m&&p<r&&(b.height=-1),!f&&m?(b.height=d?b.height?b.height:e.height-2*s:-1,b.y=e.y+e.height/2):g?(b.y=-1,s=0,r=0,u=h):(b.height=b.height?b.height:r,b.y=e.y+s+c),x+=2*s,x+=r,y.rectShiftY=x,y.textRect=b,i.labelGlow?(k["stroke-width"]=i.labelGlowRadius,k.opacity=i.labelGlowIntensity,k.stroke=i.labelGlowColor,k.visibility="hidden"===u?"hidden":"visible"):k.visibility=h,{conf:y,attr:{fontSize:i.labelFontSize||i.baseFontSize,fontFamily:i.labelFont||i.baseFont,fill:(0,o.convertColor)(v&&v.fontcolor&&w(v.fontcolor)||i.labelFontColor||i.baseFontColor),fontWeight:i.labelFontBold&&"bold",fontStyle:i.labelFontItalic&&"italic",visibility:u},highlight:k}}},t.context=y,t.mapColorManager=function(t,e,i){var r=w(i?t.defaultNavigationBarBGColor:t.defaultParentBGColor);return function(i,o,l){var s,h,g,d={},f=i.cssConf,u=i.meta,p=u.fillcolor?w(u.fillcolor):a,v=i.getParent(),m=i.getColorValue();return t.isLegendEnabled=!0,t.isLegendEnabled&&m?e&&e.getColorByValue(m)?function(t,e){var i=t.range;return!i||i.min<=e&&e<=i.max}(l,m)?i.presentColor="#"+e.getColorByValue(m):i.presentColor=w(l.rangeOutBgColor):i.presentColor=w(e&&e.rangeOutsideColor):i.presentColor=a,p&&(i.presentColor=p),g=t.isLegendEnabled&&m?e&&e.getColorByValue(m)&&"#"+e.getColorByValue(m)||w(e&&e.rangeOutsideColor):a,i.isLeaf(n)?d.fill=p||g||r:(s=(h=(v||i).cssConf)&&h.fill,g=g||s,d.fill=p||g),d.stroke=o?t.navigationBarBorderColor:t.plotBorderColor,d.strokeWidth=o?t.navigationBarBorderThickness:t.plotBorderThickness,d["stroke-dasharray"]=c,o||f&&"--"===f["stroke-dasharray"]&&(d["stroke-dasharray"]=f["stroke-dasharray"],d.strokeWidth=f.strokeWidth),d}},t.abstractEventRegisterer=function(i,n,r,o){var h,c,b,y=n.getFromEnv("chart"),x=n.getFromEnv("toolbarBtns"),k=n.conf,C=i.drawTree,w=o.disposeChild,I=t.context,P=arguments,T=d,A=f,F=u,S=p,E=v,N={colorValue:"svalue",label:"name",value:"value",rect:"metrics"};function B(t){var e,i={};for(e in N)i[N[e]]=t[e];return i}return c=I.getInstance(T),y._intSR={},y._intSR.backToParent=h=function(e){var l=this,c=l,g=c&&l.getParent(),u=t.context,p=d,v=f,m=u.getInstance(p).get(v)||{};y.config.trackerConfig.length=0,y.triggerKDTreePartioning(),e?y.fireChartInstanceEvent("beforedrillup",{node:l,withoutHead:!k.showParent},a,function(){g&&(m.state=s,m.node=[{virginNode:t.getVisibleRoot()},g],w(c),C.apply(g,P)),y.fireChartInstanceEvent(s,{node:l,withoutHead:!k.showParent,drillUp:h,drillUpToTop:b}),l=l&&l.getParent()},function(){y.fireChartInstanceEvent("drillupcancelled",{node:l,withoutHead:!k.showParent})}):(g&&(m.state=s,m.node=[{virginNode:t.getVisibleRoot()},g],w(c),C.apply(g,[i,n,r,o])),l=l&&l.getParent())},y._intSR.resetTree=b=function(e){var i,n=this,r=n&&n.getParent(),o=t.context,l=d,c=f,g=o.getInstance(l).get(c)||{};for(y.config.trackerConfig.length=0,y.triggerKDTreePartioning();r;)i=r,r=r.getParent();e?y.fireChartInstanceEvent("beforedrillup",{node:n,withoutHead:!k.showParent},a,function(){i&&(g.state=s,g.node=[{virginNode:t.getVisibleRoot()},i],w(i),C.apply(i,P),y.fireChartInstanceEvent(s,{node:n,sender:y.fusionCharts,withoutHead:!k.showParent,drillUp:h,drillUpToTop:b}))},function(){y.fireChartInstanceEvent("drillupcancelled",{node:n,withoutHead:!k.showParent})}):i&&(g.state=s,g.node=[{virginNode:t.getVisibleRoot()},i],w(i),C.apply(i,P))},{click:function(t,i){var n,r,d,f=t.virginNode,u=y.getFromEnv("animationManager");if(y.state=g,y.fireChartInstanceEvent(F,B(t.virginNode)),r=f.getParent()){if(f===i)d=r,y.flushKDTree(),n=s;else if(f.next)d=f,y.flushKDTree(),n=m;else{if(i===(d=r))return void(n=a);n=m}n&&y.fireChartInstanceEvent("before"+n,{node:d,withoutHead:!k.showParent},a,function(){y.config.trackerConfig.length=0,c.set(A,{node:t,state:n}),w.call(o,d),_(d),u.setAnimationState("drill"),y.setState("drill",!0),e.draw(),u.onAnimationComplete(function(){y.setState("drill",!1)}),y.fireChartInstanceEvent(n,{node:d,withoutHead:!k.showParent,drillUp:h,drillUpToTop:b})},function(){y.fireChartInstanceEvent(n+"cancelled",{node:d,withoutHead:!k.showParent})}),y.addJob("attachEventToBtns",function(){y._lastAttached.backToParent&&x.back&&x.back.removeEventListener("fc-click",y._lastAttached.backToParent),y._lastAttached.resetTree&&x.home&&x.home.removeEventListener("fc-click",y._lastAttached.resetTree),y._lastAttached.backToParent=h.bind(d),y._lastAttached.resetTree=b.bind(d),x.back&&x.back.addEventListener("fc-click",y._lastAttached.backToParent),x.home&&x.home.addEventListener("fc-click",y._lastAttached.resetTree)},l.priorityList.kdTree),y.resetSingleTracker()}},mouseover:function(t){var e=B(t.virginNode);y.fireChartInstanceEvent(S,e,a,a,function(){y.fireChartInstanceEvent(S+"cancelled",e)})},mouseout:function(t){var e=B(t.virginNode);y.fireChartInstanceEvent(E,B(t.virginNode),a,a,function(){y.fireChartInstanceEvent(E+"cancelled",e)})}}},t.setMaxDepth=function(t){return n=t},t.getVisibleRoot=function(){return r},t.setVisibleRoot=_,t.visibilityController=b,t},x=function(t,e){var i,n,h,c,g,u,p,v=t.AbstractTreeMaker;function m(t){for(var e,i=t.getChildren(),n=0,a=0;a<(i&&i.length);a++)m(e=i[a]),n+=e.getValue()||0;isNaN(t.value)&&(t.value=n)}i={sliceanddice:{areaBaseCalculator:function(t,e){var i=t,n=e;return function(t,e,a){var r,o,l,s,h,c,g,d={},f=0;if(t)return a&&(f=a.textMargin||f),g=f,r=t.getParent(),o=t.getSibling("left"),r?(l=r.getValue(),s=(c=r.rect).height-2*n-g,h=c.width-2*i,d.effectiveRect={height:s,width:h,x:c.x+i,y:c.y+n+g},d.effectiveArea=s*h,d.ratio=t.getValue()/l,o?e.call(t,d,o,r):(d.lastIsParent=!0,e.call(t,d,r))):null}},applyShadeFiltering:function(t,e,i){return t.setRangeOutEffect(e,i),this.applyShadeFiltering.reset=function(){t.resetPointers()},function(e){t.moveLowerShadePointer(e.start),t.moveHigherShadePointer(e.end)}},alternateModeManager:function(){return function(t,e){var i,n,r,o,l,s=t.effectiveArea*t.ratio,h=t.effectiveRect,c=e.rect;return t.lastIsParent?(o=h.x,l=h.y,i=h.height,n=h.width,r=this.isDirectionVertical=!0):(i=h.height+h.y-(c.height+c.y),n=h.width+h.x-(c.width+c.x),r=this.isDirectionVertical=!e.isDirectionVertical),r?(n=s/i,o=o!==a?o:c.x,l=l!==a?l:c.y+c.height):(i=s/n,o=o!==a?o:c.x+c.width,l=l!==a?l:c.y),{height:i,width:n,x:o,y:l}}},horizontalVerticalManager:function(t){var e=Boolean("vertical"===t);return function(t,i){var n,r,o,l,s,h=this,c=t.effectiveArea,g=t.ratio,d=c*g,f=t.effectiveRect,u=i.rect,p=t.lastIsParent;return p?(l=f.x,s=f.y,n=f.height,r=f.width,o=h.isDirectionVertical=!i.isDirectionVertical):(n=f.height+f.y-(u.height+u.y),r=f.width+f.x-(u.width+u.x),o=h.isDirectionVertical=!arguments[2].isDirectionVertical),(o=e?o:!o)?(0===n&&(n=f.height,l=l!==a?l:u.x+u.width,s=s!==a?s:u.y),r=d/n,l=l!==a?l:u.x,s=s!==a?s:u.y+u.height):(0===r&&(r=f.width,l=l!==a?l:u.x,s=s!==a?s:u.y+u.height),n=d/r,l=l!==a?l:u.x+u.width,s=s!==a?s:u.y),{height:n,width:r,x:l,y:s}}},drawTree:function(e,i,n,r){var h,c,g,v,b,y,x,k,C=i.getFromEnv("chart"),w=C.config||(C.config={}),I=w.trackerConfig||(w.trackerConfig=[]),P=i.getFromEnv("number-formatter"),T=i.getFromEnv("toolbarBtns"),A=r.drawRect,_=r.drawText,F=r.drawHot,S=n.horizontalPadding,E=n.verticalPadding,N=i.getFromEnv("smartLabel"),B=(0,t.iterator)(this).df,R=e.areaBaseCalculator(S,E),M=i.conf,L=M.highlightParentsOnHover,V=t.context,D=t.visibilityController,H=i.conf.colorRange,O=t.mapColorManager(M,H),z=t.abstractEventRegisterer(e,i,n,r),G=z.click,W=z.mouseover,j=z.mouseout,K=M.slicingMode,U=e["alternate"===K?"alternateModeManager":"horizontalVerticalManager"](K),Y=C._intSR,J=d,X=f;for(k=(x=V.getInstance(J).get(X)||{}).node,x.node&&x.state&&(x.state.toLowerCase()===s?k instanceof Array?D.controlPreAnimVisibility(k[0].virginNode,k[1]):D.controlPreAnimVisibility(k.virginNode):D.displayAll(x.node.virginNode)),h=M.parentLabelLineHeight,g=t.initConfigurationForlabel({x:5,y:5},h,M),v=c=B.next(p=t.setMaxDepth(this.getDepth()+u));v.getParent();)v=v.getParent();!w.valuesset&&m(v),w.valuesset=!0,M.showNavigationBar?(T.home.hide(),T.back.hide()):v!==c?(T.home.show(),T.back.show()):(T.home.hide(),T.back.hide()),N.useEllipsesOnOverflow(C.config.useEllipsesWhenOverflow),N.setStyle(M._setStyle={fontSize:(M.labelFontSize||M.baseFontSize)+"px",fontFamily:M.labelFont||M.baseFont,lineHeight:1.2*(M.labelFontSize||M.baseFontSize)+"px"}),y=Y.backToParent,b=Y.resetTree,C.addJob("attachEventToBtns",function(){C._lastAttached.backToParent&&T.back&&T.back.removeEventListener("fc-click",C._lastAttached.backToParent),C._lastAttached.resetTree&&T.home&&T.home.removeEventListener("fc-click",C._lastAttached.resetTree),C._lastAttached.backToParent=y.bind(c),C._lastAttached.resetTree=b.bind(c),T.back&&T.back.addEventListener("fc-click",C._lastAttached.backToParent),T.home&&T.home.addEventListener("fc-click",C._lastAttached.resetTree)},l.priorityList.kdTree),function $(t,e){var n,l,s,h,d,f,u,v,m,b,y,x,k,C,w,T,S={},E={},D={},H=o.BLANKSTRING;t&&t.value&&(w=P.yAxis(t.getValue()),T=P.sYAxis(t.getColorValue()),t.setPath(),l=t.rect||{},s=t.textRect||{},v=t.rect={},t.textRect={},v.width=e.width,v.height=e.height,v.x=e.x,v.y=e.y,C=O(t,a,i.conf),(k=t.plotItem)&&r.graphicPool(!0,"plotItem",k,l),t.__props||(t.__props={}),t.__props.curr=Object.assign({},v),t.__props.node=Object.assign({},t),k=t.plotItem=A(v,Object.assign({},C,t.getColorValue()&&{fill:t.presentColor}||{}),l,t.overAttr,t),t.__props.prev=Object.assign({},v),t.cssConf=C,y=(b=g(t,v)).conf,S.textMargin=y.rectShiftY,m=t.textRect=y.textRect,x=N.getSmartText(y.label,m.width,m.height).text,t.plotItem=k,(d=t.labelItem)?(f=t.highlightItem,r.graphicPool(!0,"labelItem",d,l),r.graphicPool(!0,"highlightItem",f,l)):s=s||{},u=_(x,m,{textAttrs:b.attr,highlightAttrs:b.highlight},s,t.overAttr,t),t.labelItem=u.label,t.highlightItem=u.highlightMask,E.virginNode=t,E.plotItem=k,E.textItem=u,E.virginNode.dirtyNode=E,t.getColorValue()&&(H=M.tooltipSeparationCharacter+T),M.showTooltip?E.toolText=(0,o.parseTooltext)(M.plotToolText,[1,2,3,119,122],{label:t.getLabel(),formattedValue:w,formattedsValue:T},{value:t.getValue(),svalue:t.getColorValue()})||t.getLabel()+M.tooltipSeparationCharacter+w+H:E.toolText=o.BLANKSTRING,E.rect=v,D.hover=[function(t){var e,i,n,a,r;n=V.getInstance("hover"),i=this.virginNode,e=L&&!i.next?i.getParent()||i:this.virginNode,n.set("element",e),a=e.cssConf,r=(0,o.convertColor)((0,o.getLightColor)(a.fill,80),60),t.attr({fill:r}),W(this)}.bind(E),function(){var t,e,i;e=(t=V.getInstance("hover").get("element")).cssConf,i=(0,o.convertColor)(e.fill||"#fff",0),t.plotItem.tracker.attr({fill:i}),j(this)}.bind(E)],D.tooltip=[E.toolText],D.click=[function(){G(this,c)}.bind(E)],(h=t.hotItem)&&r.graphicPool(!0,"hotItem",h,l),I.push({node:t,key:"hotItem",plotDetails:E,evtFns:D,callback:F}),$(n=B.next(p),R(n,U,S)))}(c,n)}},squarified:{orderNodes:function(){return this.sort(function(t,e){return parseFloat(t.value,10)<parseFloat(e.value,10)?1:-1})},areaBaseCalculator:function(t,e){var i=t,n=e;return function(t,e,a){var r,o,l,s,h,c,g={},d=0;if(t&&0!==t.length)return a&&(d=a.textMargin||d),s=d,(r=(h=t[0]).getParent())?(o=(c=r.rect).height-2*n-s,l=c.width-2*i,g.effectiveRect={height:o,width:l,x:c.x+i,y:c.y+n+s},g.effectiveArea=o*l,e.call(h,g,r)):null}},layoutManager:{RowLayout:function(){function t(t,e){this.totalValue=e,this._rHeight=t.height,this._rWidth=t.width,this._rx=t.x,this._ry=t.y,this._rTotalArea=t.height*t.width,this.nodes=[],this._prevAR=a,this._rHeight<this._rWidth&&(this._hSegmented=!0)}return t.prototype.addNode=function(t){var e,i,n,a,r,o,l,s,h,c,g,d,f,u,p,v,m,b=t,y=this._rTotalArea,x=this._hSegmented,k=this._rx,C=this._ry,w=0;for(this.nodes.push(b),a=0,o=this.nodes.length;a<o;a++)w+=parseFloat(this.nodes[a].getValue(),10);for(e=y*(w/this.totalValue),x?(n=this._rHeight,g=k+(i=e/n),d=C,u=this._rHeight,p=this._rWidth-i):(i=this._rWidth,g=k,d=C+(n=e/i),u=this._rHeight-n,p=this._rWidth),a=0,r=this.nodes.length;a<r;a++)l=(b=this.nodes[a]).getValue()/w*e,b.hRect=b.rect||{},b._hRect=b._rect||{},c=b.rect={},x?(c.width=h=i,c.height=s=l/h,c.x=k,c.y=C,C+=s):(c.height=s=n,c.width=h=l/s,c.x=k,c.y=C,k+=h),v=Math.max(c.height,c.width)/Math.min(c.height,c.width),!isFinite(v)&&(v=0),b.aspectRatio=v;if(this.nodes.length>1){if(this.prevAR<b.aspectRatio){for(this.nodes.pop().rect={},a=0,o=this.nodes.length;a<o;a++)1===o&&this.nodes[a].firstPassed?this.nodes[a].rect=this.nodes[a]._hRect:this.nodes[a].rect=this.nodes[a].hRect,f=this.nodes[a]._rect={},m=this.nodes[a].rect,f.width=m.width,f.height=m.height,f.x=m.x,f.y=m.y;return!1}}else b&&(f=b._rect={},m=b.rect,f.width=m.width,f.height=m.height,f.x=m.x,f.y=m.y,b.firstPassed=!0);return this.prevAR=b.aspectRatio,this.height=n,this.width=i,this.getNextLogicalDivision=function(){return{height:u,width:p,x:g,y:d}},b},t}()},applyShadeFiltering:function(t,e,i){return t.setRangeOutEffect(e,i),this.applyShadeFiltering.reset=function(){t.resetPointers()},function(e){t.moveLowerShadePointer(e.start),t.moveHigherShadePointer(e.end)}},drawTree:function(e,i,n,r){var h,c,g,v,b,y,x,k,C=i.getFromEnv("chart"),w=i.getFromEnv("chartConfig"),I=w.trackerConfig||(w.trackerConfig=[]),P=i.getFromEnv("number-formatter"),T=i.getFromEnv("toolbarBtns"),A=n.horizontalPadding,_=n.verticalPadding,F=e.areaBaseCalculator(A,_),S=e.layoutManager.RowLayout,E=i.getFromEnv("smartLabel"),N=r.drawRect,B=r.drawText,R=r.drawHot,M=(0,t.iterator)(this).bf,L=i.conf,V=L.highlightParentsOnHover,D=t.context,H=i.conf.colorRange,O=t.mapColorManager(L,H),z=t.abstractEventRegisterer(e,i,n,r),G=z.click,W=z.mouseover,j=z.mouseout,K=C._intSR,U=t.visibilityController,Y=d,J=f;for(k=(x=D.getInstance(Y).get(J)||{}).node,x.node&&x.state&&(x.state.toLowerCase()===s?k instanceof Array?U.controlPreAnimVisibility(k[0].virginNode,k[1]):U.controlPreAnimVisibility(k.virginNode):U.displayAll(x.node.virginNode)),h=L.parentLabelLineHeight,g=t.initConfigurationForlabel({x:5,y:5},h,L),v=c=M.next(p=t.setMaxDepth(this.getDepth()+u));v.getParent();)v=v.getParent();!w.valuesset&&m(v),w.valuesset=!0,L.showNavigationBar?(T.home.hide(),T.back.hide()):v!==c?(T.home.show(),T.back.show()):(T.home.hide(),T.back.hide()),E.useEllipsesOnOverflow(C.config.useEllipsesWhenOverflow),E.setStyle(L._setStyle={fontSize:(L.labelFontSize||L.baseFontSize)+"px",fontFamily:L.labelFont||L.baseFont,lineHeight:1.2*(L.labelFontSize||L.baseFontSize)+"px"}),b=K.backToParent,y=K.resetTree,C.addJob("attachEventToBtns",function(){C._lastAttached.backToParent&&T.back&&T.back.removeEventListener("fc-click",C._lastAttached.backToParent),C._lastAttached.resetTree&&T.home&&T.home.removeEventListener("fc-click",C._lastAttached.resetTree),C._lastAttached.backToParent=b.bind(c),C._lastAttached.resetTree=y.bind(c),T.back&&T.back.addEventListener("fc-click",C._lastAttached.backToParent),T.home&&T.home.addEventListener("fc-click",C._lastAttached.resetTree)},l.priorityList.kdTree),function X(t,e){var n,l,s,h,d,f,u,v,m,b,y,x,k,C,w,T,A,_,M,H={},z=0,K={},U={},Y={},J=o.BLANKSTRING;if(t&&t.value&&(_=P.yAxis(t.getValue()),M=P.sYAxis(t.getColorValue()),t.setPath(),(n=t.__initRect)&&(H.x=n.x,H.y=n.y,H.width=n.width,H.height=n.height),d=t.textRect||{},n=t.rect=t.__initRect={},t.textRect={},n.width=e.width,n.height=e.height,n.x=e.x,n.y=e.y,A=O(t,a,i.conf),(k=t.plotItem)&&r.graphicPool(!0,"plotItem",k,H),t.__props||(t.__props={}),t.__props.curr=Object.assign({},n),t.__props.node=Object.assign({},t),k=t.plotItem=N(n,Object.assign({},A,t.getColorValue()&&{fill:t.presentColor}||{}),H,t.overAttr,t),t.__props.prev=Object.assign({},n),t.cssConf=A,C=(T=g(t,n)).conf,K.textMargin=C.rectShiftY,f=t.textRect=C.textRect,w=E.getSmartText(C.label,f.width,f.height).text,(h=t.labelItem)?(l=t.highlightItem,r.graphicPool(!0,"labelItem",h,H),r.graphicPool(!0,"highlightItem",l,H)):d=d||{},v=B(w,f,{textAttrs:T.attr,highlightAttrs:T.highlight},d,t.overAttr,t),t.labelItem=v.label,t.highlightItem=v.highlightMask,t.plotItem=k,U.virginNode=t,U.plotItem=k,U.textItem=v,U.virginNode.dirtyNode=U,t.getColorValue()&&(J=L.tooltipSeparationCharacter+M),L.showTooltip?U.toolText=(0,o.parseTooltext)(L.plotToolText,[1,2,3,119,122],{label:t.getLabel(),formattedValue:_,formattedsValue:M},{value:t.getValue(),svalue:t.getColorValue()})||t.getLabel()+L.tooltipSeparationCharacter+_+J:U.toolText=o.BLANKSTRING,U.rect=n,Y.hover=[function(t){var e,i,n,a,r;n=D.getInstance("hover"),i=this.virginNode,e=V&&!i.next?i.getParent()||i:this.virginNode,n.set("element",e),a=e.cssConf,r=(0,o.convertColor)(a.fill&&(0,o.getLightColor)(a.fill,80),60),t.attr({fill:r}),W(this)}.bind(U),function(t){var e,i;e=D.getInstance("hover").get("element").cssConf,i=(0,o.convertColor)(e.fill||"#fff",0),t.attr({fill:i}),j(this)}.bind(U)],Y.tooltip=[U.toolText],Y.click=[function(){G(this,c)}.bind(U)],(s=t.hotItem)&&r.graphicPool(!0,"hotItem",s,H),I.push({node:t,key:"hotItem",plotDetails:U,evtFns:Y,callback:R}),u=p!==a&&t.getDepth()>=p?a:t.getChildren()))for(m=0,b=(y=F(u,function(t,e){var i,n,a,r,o=0,l=[];for(i=new S({width:t.effectiveRect.width,height:t.effectiveRect.height,x:t.effectiveRect.x,y:t.effectiveRect.y},e.getValue()),n=u.length;o++!==n;)a=u[o-1],!1===i.addNode(a)?(r=i.getNextLogicalDivision(),i=new S(r,e.getValue()-z),o--):(z+=parseFloat(a.getValue(),10),l.push(a));return l},K)).length;m<b;m++)X(x=y[m],x.rect)}(c,n)}}};var b=function(t){function e(){return t.apply(this,arguments)||this}return(0,r["default"])(e,t),e.getName=function(){return"TreeMaker"},e.prototype.order=function(t){var e=i[n],a=e.orderNodes;return a?a.apply(t,[e]):t},e}(v);function y(e,i,n){var a;return a=(h=new b(e,g,i)).get(),!1!==n&&(c=a),t.setVisibleRoot(a),a}function x(){var a,r=i[n];e.realTimeUpdate=C.apply(this,arguments),(a=Array.prototype.slice.call(arguments,0)).unshift(r),r.drawTree.apply(t.getVisibleRoot(),a)}function C(){var t,e,a=i[n];return(e=Array.prototype.slice.call(arguments,0)).unshift(a),t=e.slice(-1)[0],function(){var i=Array.prototype.slice.call(arguments,0),n=i.shift(),r=i.shift(),o=k(c,function(t){a.drawTree.apply(t||c,e)},t,n);o[r].apply(this,i)}}return e.init=function(e,a,r){return n=e,g=a,u=t.setMaxDepth(r),i[n]},e.plotOnCanvas=function(t,e){return c=y(t,e),x},e.applyShadeFiltering=function(t,e){var a,r,o=i[n];return r=o.applyShadeFiltering(h.getBucket(),t,e),function(t){(a=Array.prototype.slice.call(arguments,0)).unshift(t),r.apply(h.getBucket(),a)}},e.setTreeBase=function(t){return t&&(c=t)},e.realTimeUpdate=C,e.makeTree=y,e},k=function(t,e,i,n){var r;function o(e){var i,n=0,a=t;if(!e.length)return t;for(;a;){if(i=l.call(a,e[n]),n===e.length-1&&i)return r=i.getValue(),i;a=i,n+=1}}function l(t){var e,i,n,a=this.getChildren()||[],r=a.length,o=function(t){return t.toLowerCase().trim()};for(e=0;e<r;e+=1)if(o((n=a[e]).label)===o(t)){i=n;break}return i}return{deleteData:function(t,n){var a=o(t),l=(void 0).iterator(a).df,s=a&&a.getParent(),h=a&&a.getSiblingCount("left"),c=s&&s.getChildren(),g=(void 0).getVisibleRoot();if(a&&s){for(c.splice(h,1),a===g&&(g=a.getParent()||g);a;)i.disposeItems(a),a=l.next();for(;s;)s.setValue(-r,!0),s=s.getParent();n&&e(g)}},addData:function(t,i,r,l){for(var s,h,c,g,d=0,f=!0,u=(void 0).getVisibleRoot();t.length;)if(s=t.pop(),d=(h=(void 0).makeTree(s,n,!1)).getValue(),c=o(i||[]))for(c.getChildren()||(g=c.getValue(),f=!1),c.addChildren(h,l);c;)c.setValue(d,f),g&&(d-=g,g=a,f=!0),c=c.getParent();r&&e(u)}}},C=function(t,e){var i,n,r,l,h,c,g,u,p=!1,v=function(n,c){var g,u,p,v,m,y,k,C,w,P,T,A,_,F,S=l.colorRange,E=t.mapColorManager(l,S,!0),N={get:function(t,e,i){var n={y:t.startY,height:t.effectiveHeight},a=g[e],r=a.getParent();return A?(n._x=t.startX+t.effectiveWidth,n._width=0):(n._x=t.startX,n._width=t.effectiveWidth),n.x=A||(A=t.startX),A+=n.width=i?t.effectiveWidth*(a.getValue()/r.getValue()):t.effectiveWidth/u,n},resetAllocation:function(){A=a}},B=l.parentLabelLineHeight,R=t.initConfigurationForlabel({x:5,y:5},B,l),M=h.drawPolyPath,L=h.drawText,V=h.drawHot,D={navigationHistory:{path:"polyPathItem",label:"pathlabelItem",highlightItem:"pathhighlightItem",hotItem:"pathhotItem"}},H=i.getFromEnv("chart"),O=H.config.trackerConfig,z=i.getFromEnv("smartLabel"),G=function(i){return function(){var n=t.context,a=d,r=f,o=H.getFromEnv("animationManager"),l=n.getInstance(a).get(r)||{};O.length=0,l.state=s,l.node=[{virginNode:t.getVisibleRoot()},i],h.disposeChild(i),o.setAnimationState("drill"),H.setState("drill",!0),e.draw([i,i,i]),o.onAnimationComplete(function(){H.setState("drill",!1)}),H.resetSingleTracker()}},W=function(t){return l.showTooltip?t.getLabel():o.BLANKSTRING},j=l._setStyle,K=b.get().navigationBar,U=2*x("navigationBar"),Y=K*r.effectiveHeight,J=Math.min(Y-(U+6),j.fontSize.replace(/\D+/g,"")),X=J+"px";for(D.stacked={path:"stacked"+D.navigationHistory.path,label:"stacked"+D.navigationHistory.label,highlightItem:"stacked"+D.navigationHistory.highlightItem,hotItem:"stacked"+D.navigationHistory.hotItem},N.resetAllocation(),function(e){var i=t.getVisibleRoot();(g=e?i.getChildren():l.navigationBarNodes=i.getPath()||[].concat(i)).pop(),u=g.length}(c),z.setStyle({fontSize:X,lineHeight:X}),p=0;p<u;p+=1)y=g[p],v=(m=I(k=N.get(n,p,c),c?"both":(_=p,F=u,1===F?"both":0===_?"left":_<F-1?"no":"right"),a)).offset,y[D[c?"stacked":"navigationHistory"].path]=M(m,E(y,!0,l),y),(T=(w=(C=R(y,k,!0)).conf).textRect).width-=2*v,T.y=k.y+k.height/2,P=L(z.getSmartText(w.label,T.width,Math.max(J,T.height)).text,T,{textAttrs:C.attr,highlightAttrs:C.highlight},{y:k.height/10,"font-size":l._setStyle.fontSize,"font-family":l._setStyle.fontFamily},(c?"stacked":"")+"path",y),y[D[c?"stacked":"navigationHistory"].label]=P.label,y[D[c?"stacked":"navigationHistory"].highlightItem]=P.highlightMask,O.push({node:y,key:D[c?"stacked":"navigationHistory"].hotItem,plotDetails:{rect:k},evtFns:{click:[G(y)],hover:[function(){},function(){}],tooltip:[W(y)]},callback:V})},m=function(t){return{treeMap:w,navigationBar:v,stackedNavigation:P}[t]},b=(g={treeMap:1,navigationBar:0,stackedNavigation:0},{set:function(t){var e,i=(0,o.pluckNumber)(l.navigationBarHeightRatio,l.navigationBarHeight/r.effectiveHeight,.15);e=(6+(l.labelFontSize?Math.max(l.labelFontSize,l.baseFontSize):l.baseFontSize)+2*x("navigationBar"))/r.effectiveHeight,(i=Math.max(e,i))<.1?i=.1:i>.15&&(i=.15),l.navigationBarHeightRatio=i,g=t?{treeMap:1-i,navigationBar:i,stackedNavigation:0}:{treeMap:1,navigationBar:0,stackedNavigation:0}},get:function(){return g}}),y=0,x=function(t){var e=l.verticalPadding,i=l.plotBorderThickness,n=l.navigationBarBorderThickness;return e+("navigationBar"===t?n:i)},k=function(t){var e=r.effectiveWidth,i=r.effectiveHeight,n=x(t),a=b.get()[t];return y>=1&&(y=0),y+=a,{effectiveHeight:Math.round(a*i*100)/100-n,effectiveWidth:e,startX:r.startX,startY:r.startY+n+Math.round((y-a)*i*100)/100}},C=function(){function t(){}var e=t.prototype;return e.init=function(t,e){(this.conf||(this.conf={})).name=t.name,this.setDrawingArea(t.drawingAreaMeasurement),this.draw=this.draw(e)},e.setDrawingArea=function(t){this.conf.drawingAreaMeasurement=t},e.draw=function(t){return function(){var e=this.conf;e.drawingAreaMeasurement.effectiveHeight>0&&t(e.drawingAreaMeasurement)}},e.eventCallback=function(){},t}();function w(e){var a=l.plotBorderThickness;p&&(l.plotBorderThickness=0),n.apply(t.getVisibleRoot(),[i,{width:e.effectiveWidth,height:e.effectiveHeight,x:e.startX,y:e.startY,horizontalPadding:l.horizontalPadding,verticalPadding:l.verticalPadding},h]),l.plotBorderThickness=a}function I(t,e,i){var n=t.x,a=t.y,r=t.width,s=t.height,h=l.seperatorAngle/2,c=["M",n,a],g=(0,o.pluckNumber)(h?s/2*(1-Math.tan(h)):i,15),d=["M",t._x,a],f=function(t){return{both:["h",t,"v",s/2,"v",s/2,"h",-t,"v",-s/2,"v",-s/2],right:["h",t,"v",s/2,"v",s/2,"h",-t,"l",g,-s/2,"l",-g,-s/2],no:["h",t,"l",g,s/2,"l",-g,s/2,"h",-t,"l",g,-s/2,"l",-g,-s/2],left:["h",t,"l",g,s/2,"l",-g,s/2,"h",-t,"v",-s/2,"v",-s/2]}};return{path:c.concat(f(r)[e]),_path:d.concat(f(t._width).both),offset:g}}function P(){var t=Array.prototype.splice.call(arguments,0);t.push(!0),m("navigationBar").apply(this,t)}return u=[],c={get:function(){return u},set:function(t){var e;return t?((e=new C).init({name:t.type,drawingAreaMeasurement:t.drawingArea},t.drawFn),u.push(e)):u.length=0,u}},e.init=function(){var t,e=["navigationBar","treeMap","stackedNavigation"],a=Array.prototype.slice.call(arguments,0);for(i=a[0],r=a[1],l=i.conf,h=a[2],n=a[4],c.get().length>=e.length&&c.set();e.length;)t=e.shift(),c.set({type:t,drawFn:m(t),drawingArea:k(t)})},e.draw=function(i){var n,a,r,o=t.getVisibleRoot();for(h.disposeSelectedChildren(o,i?i[1