fusioncharts
Version:
FusionCharts JavaScript charting framework
1 lines • 53.4 kB
JavaScript
!function(t){"object"==typeof module&&"undefined"!=typeof module.exports?module.exports=t:t()}(function(){"use strict";(self.webpackChunkFusionCharts=self.webpackChunkFusionCharts||[]).push([[12],{1641:(t,e,i)=>{var n=i(272);e.__esModule=!0,e["default"]=void 0;var a=n(i(1642));e.Treemap=a["default"];e["default"]={name:"treemap",type:"package",requiresFusionCharts:!0,extension:function(t){return t.addDep(a["default"])}}},1642:(t,e,i)=>{var n=i(272);e.__esModule=!0,e["default"]=void 0;var a=n(i(1643));e["default"]=a["default"]},1643:(t,e,i)=>{var n=i(272);e.__esModule=!0,e["default"]=void 0;var a=n(i(295)),r=n(i(548)),o=i(293),l=i(281),s=i(425),h=n(i(1644)),c=n(i(1646)),g=i(289),d=n(i(623)),f=i(653),u=n(i(655)),p=n(i(1471)),v=n(i(1475)),b=n(i(621)),m=n(i(449)),y=(0,g.getDep)("redraphael","plugin");(0,m["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",b["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){var e=this;e.config.skipConfigureIteration={},e.config.valuesset=!1,e.parseChartAttr(t),e.createComponent(t),e.setTooltipStyle(),e.configureChildren()},i.mouseoutHandler=function(t,e,i){var n=this,a=n.config.datasetOrder||n.getDatasets(),r=n.getChildren("mouseTracker")[0];a[e]._firePlotEvent("fc-mouseout",i,t),delete r._lastDatasetIndex,delete r._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(),b=(0,l.getMouseCoordinate)(s.getFromEnv("chart-container"),c,s),m=b.chartX,y=b.chartY,x=!1,k=v.length,C=h._lastDatasetIndex,w=h._lastPointIndex;if(m>d&&m<f&&y>p&&y<u||s.config.plotOverFlow)for(;k--&&!x;)(i=v[k])&&(n=i._getHoveredPlot&&i._getHoveredPlot(m,y))&&n.hovered&&(x=!0,n.datasetIndex=k,o=h.getMouseEvents(t,n.datasetIndex,n.pointIndex));if((!x||o&&o.fireOut)&&undefined!==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").algorithmFactory,e=Array.prototype.slice.call(arguments,0);e.unshift("addData"),e.unshift(this._getCleanValue()),t.realTimeUpdate.apply(this,e)},i.removeData=function(){var t=this.getFromEnv("ref").algorithmFactory,e=Array.prototype.slice.call(arguments,0);e.unshift("deleteData"),e.unshift(this._getCleanValue()),t.realTimeUpdate.apply(this,e)},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.attachMenuButtons=function(){t.prototype.attachMenuButtons.call(this);var e,i=this,n="t"===i.config.toolbarVAlign?"chartMenuBar":"actionBar",a=i.getFromEnv("tool-config");e=i.getChildren(n)[0];for(var r=0;r<2;r++)e.attachChild(s.Tool,"tool",(0===r?"home":"back")+"-"+e.getId()+"-"+i.getId());e.getChild("back-"+e.getId()+"-"+i.getId()).configure(Object.assign({},a,{name:"backIcon",isHidden:!0})),e.getChild("home-"+e.getId()+"-"+i.getId()).configure(Object.assign({},a,{name:"homeIcon",isHidden:!0})),i.addToEnv("toolbarBtns",{back:e.getChild("back-"+e.getId()+"-"+i.getId()),home:e.getChild("home-"+e.getId()+"-"+i.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},1644:(t,e,i)=>{var n=i(272);e.__esModule=!0,e["default"]=void 0;var a,r=n(i(295)),o=i(297),l=i(293),s=i(281),h=i(289),c=n(i(1645)),g=s.preDefStr.DEFAULT,d="pointer",f=function(t,e,i){return i.getFromEnv("animationManager").setAnimation({el:"group",attr:{name:t},container:e,state:"appearing",component:i,doNotRemove:!0,label:"group"})},u=function(t,e,i){return t>=e&&t<=i},p=function(t,e,i){var n=t[e];t[e]=t[i],t[i]=n},v=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;function d(t,e,i,n){for(var a,g,f,u,v,b,m,y,x=i,k=n;k>x;){for(k-x>600&&(g=e-x+1,f=h(a=k-x+1),u=.5*c(2*f/3),v=.5*l(f*u*(a-u)/a)*(g-a/2<0?-1:1),d(t,e,r(x,o(e-g*u/a+v)),s(k,o(e+(a-g)*u/a+v)))),b=t[e],m=x,y=k,p(t,x,e),t[k].x>b.x&&p(t,x,k);m<y;){for(p(t,m,y),m++,y--;t[m].x<b.x;)m++;for(;t[y].x>b.x;)y--}t[x].x===b.x?p(t,x,y):(y++,p(t,y,k)),y<=e&&(x=y+1),e<=y&&(k=y-1)}}function f(t,e,i,n){for(var a,g,d,u,v,b,m,y,x=i,k=n;k>x;){for(k-x>600&&(g=e-x+1,d=h(a=k-x+1),u=.5*c(2*d/3),v=.5*l(d*u*(a-u)/a)*(g-a/2<0?-1:1),f(t,e,r(x,o(e-g*u/a+v)),s(k,o(e+(a-g)*u/a+v)))),b=t[e],m=x,y=k,p(t,x,e),t[k].y>b.y&&p(t,x,k);m<y;){for(p(t,m,y),m++,y--;t[m].y<b.y;)m++;for(;t[y].y>b.y;)y--}t[x].y===b.y?p(t,x,y):(y++,p(t,y,k)),y<=e&&(x=y+1),e<=y&&(k=y-1)}}return i={tree:function v(t,e,i,n){var a,r={},o=e,l=i,s=n?"y":"x";return o===l?(r.point=t[o],r):l-o===1?(t[o][s]>t[l][s]?(r.point=t[o],r.left={point:t[l]}):(r.point=t[l],r.left={point:t[o]}),r):(a=o+l>>1,n?f(t,a,o,l):d(t,a,o,l),r.point=t[a],r.left=v(t,o,a-1,!n),r.right=v(t,a+1,l,!n),r)}(n,0,n.length-1,!1),search:function(t,e){function i(i){var n=u(t,i.x1,i.x2)&&u(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&&(u(t.point.x,h,c)&&u(t.point.y,d,f)&&i(t),h<=t.point.x&&r(t.left),c>=t.point.x&&r(t.right))}function r(t){t&&t.point&&(u(t.point.x,h,c)&&u(t.point.y,d,f)&&i(t),d<=t.point.y&&n(t.left),f>=t.point.y&&n(t.right))}var o,s=this.tree,h=t-a,c=t+a,d=e-a,f=e+a,p=!1,v=0;return n(s),o&&o.point||o},searchTreemap:function(t,e){var i,n=function(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)}};return n(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 b=function(t){function e(){var e,i=e=t.call(this)||this;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,r=this,o=r.getFromEnv("chart"),l=r.conf,h=o.getFromEnv("chart-attrib");l.metaTreeInf={},e=h.algorithm||"squarified",l.algorithm=e.toLowerCase(),l.range=a,l.horizontalPadding=(0,s.pluckNumber)(h.horizontalpadding,5),l.horizontalPadding=l.horizontalPadding<0?0:l.horizontalPadding,l.verticalPadding=(0,s.pluckNumber)(h.verticalpadding,5),l.verticalPadding=l.verticalPadding<0?0:l.verticalPadding,l.showParent=(0,s.pluckNumber)(h.showparent,1),l.showChildLabels=(0,s.pluckNumber)(h.showchildlabels,0),l.showHoverEffect=(0,s.pluckNumber)(h.showhovereffect,1),l.highlightParentsOnHover=(0,s.pluckNumber)(h.highlightparentsonhover,0),l.defaultParentBGColor=(0,s.pluck)(h.defaultparentbgcolor,a),l.defaultNavigationBarBGColor=(0,s.pluck)(h.defaultnavigationbarbgcolor,l.defaultParentBGColor),l.showTooltip=(0,s.pluckNumber)(h.showtooltip,1),l.baseFontSize=(0,s.pluckNumber)(h.basefontsize,10),l.baseFontSize=l.baseFontSize<1?1:l.baseFontSize,l.labelFontSize=(0,s.pluckNumber)(this.computeFontSize(h.labelfontsize),a),l.labelFontSize=l.labelFontSize<1?1:l.labelFontSize,l.baseFont=(0,s.pluck)(h.basefont,"Verdana, Sans"),l.labelFont=(0,s.pluck)(h.labelfont,a),l.showTextOutline=(0,s.pluckNumber)(h.textoutline,0),l.baseFontColor=(0,s.pluck)(h.basefontcolor,"#000000").replace(/^#?([a-f0-9]+)/gi,"#$1"),l.labelFontColor=(0,s.pluck)(h.labelfontcolor,a),l.labelFontColor&&(l.labelFontColor=l.labelFontColor.replace(/^#?([a-f0-9]+)/gi,"#$1")),l.labelFontBold=(0,s.pluckNumber)(h.labelfontbold,0),l.labelFontItalic=(0,s.pluckNumber)(h.labelfontitalic,0),l.plotBorderThickness=(0,s.pluckNumber)(h.plotborderthickness,1),l.plotBorderThickness=l.plotBorderThickness<0?0:l.plotBorderThickness>5?5:l.plotBorderThickness,l.plotBorderColor=(0,s.pluck)(h.plotbordercolor,"#000000").replace(/^#?([a-f0-9]+)/gi,"#$1"),l.tooltipSeparationCharacter=(0,s.pluck)(h.tooltipsepchar,","),l.plotToolText=(0,s.parseUnsafeString)((0,s.pluck)(h.plottooltext,""),!1),l.parentLabelLineHeight=(0,s.pluckNumber)(h.parentlabellineheight,12),l.parentLabelLineHeight=l.parentLabelLineHeight<0?0:l.parentLabelLineHeight,l.labelGlow=l.showTextOutline?0:(0,s.pluckNumber)(h.labelglow,1),l.labelGlowIntensity=(0,s.pluckNumber)(h.labelglowintensity,100)/100,l.labelGlowIntensity=l.labelGlowIntensity<0?0:l.labelGlowIntensity>1?1:l.labelGlowIntensity,l.labelGlowColor=(0,s.pluck)(h.labelglowcolor,"#ffffff").replace(/^#?([a-f0-9]+)/gi,"#$1"),l.labelGlowRadius=(0,s.pluckNumber)(h.labelglowradius,2),l.labelGlowRadius=l.labelGlowRadius<0?0:l.labelGlowRadius>10?10:l.labelGlowRadius,l.btnResetChartTooltext=(0,s.pluck)(h.btnresetcharttooltext,"Back to Top"),l.btnBackChartTooltext=(0,s.pluck)(h.btnbackcharttooltext,"Back to Parent"),l.rangeOutBgColor=(0,s.pluck)(h.rangeoutbgcolor,"#808080").replace(/^#?([a-f0-9]+)/gi,"#$1"),l.rangeOutBgAlpha=(0,s.pluckNumber)(h.rangeoutbgalpha,100),l.rangeOutBgAlpha=l.rangeOutBgAlpha<1||l.rangeOutBgAlpha>100?100:l.rangeOutBgAlpha,i=(0,s.pluckNumber)(h.maxdepth),l.maxDepth=i!==a?Math.max(i,1):a,n=l.showNavigationBar=(0,s.pluckNumber)(h.shownavigationbar,1),l.slicingMode=(0,s.pluck)(h.slicingmode,"alternate"),l.navigationBarHeight=(0,s.pluckNumber)(h.navigationbarheight),l.navigationBarHeightRatio=(0,s.pluckNumber)(h.navigationbarheightratio),l.navigationBarBorderColor=(0,s.pluck)(h.navigationbarbordercolor,l.plotBorderColor).replace(/^#?([a-f0-9]+)/gi,"#$1"),l.navigationBarBorderThickness=n?(0,s.pluckNumber)(h.navigationbarborderthickness,l.plotBorderThickness):0,l.seperatorAngle=(0,s.pluckNumber)(h.seperatorangle)*(Math.PI/180),l.isConfigured=!0,r.setState("dirty",!0)}},i.createContainer=function(){var t,e,i,n,a=this,r=a.getLinkedParent().getChildContainer();t=a.getContainer("plots")||a.addContainer("plots",f("plots",r.defaultGroup,a)),e=a.getContainer("datalabels")||a.addContainer("datalabels",f("datalabels",r.defaultGroup,a).insertAfter(t)),i=a.getContainer("tracker")||a.addContainer("tracker",f("tracker",r.defaultGroup,a)),!a.getContainer("line-hot")&&a.addContainer("line-hot",f("line-hot",i,a)),n=a.getContainer("labelhighlight")||a.addContainer("labelhighlight",f("labelhighlight",e,a)),!a.getContainer("labelfloat")&&a.addContainer("labelfloat",f("labelfloat",e,a).insertAfter(n))},i._getHoveredPlot=function(t,e){var i,n,a,r=this;for(n=(a=Object.keys(r.config.kdTree||{})).length-1;n>-1;n--)if(r.config.kdTree[a[n]].searchTreemap(t,e)){i=r.config.kdTree[a[n]].searchTreemap(t,e);break}if(i)return r.pointObj=i,{pointIndex:i.i||i.index,hovered:!0,pointObj:i}},i.kdTreePartioning=function(){var t,e,i=this,n=i.getFromEnv("chartConfig").trackerConfig,r={};for(t=n.length;t--;)n[t].i=t,r[n[t].node.meta.depth]===a&&(r[n[t].node.meta.depth]=[]),r[n[t].node.meta.depth].push(n[t]);for(i.config.kdTree={},t=(e=Object.keys(r)).length-1;t>-1;t--)i.config.kdTree[e[t]]=v&&v(r[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._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,r=a.config.currentToolTip,o=a.getFromEnv("chartConfig").trackerConfig[e||0],h=o&&o.node&&o.node.plotItem,c=o&&o.plotDetails&&o.plotDetails.toolText,f=a.getFromEnv("toolTipController"),u=i.originalEvent,p=a.graphics.singleTracker,v=a.pointObj.plotDetails,b=a._getParentNode(o&&o.node.path),m=b&&b.rect;if(h?n=a.conf.highlightParentsOnHover&&b?{x:m.x,y:m.y,width:m.width,height:m.height,stroke:"rgba(255,255,255,0)"}:{x:v.rect.x||0,y:v.rect.y||0,width:v.rect.width||0,height:v.rect.height||0,stroke:"rgba(255,255,255,0)"}:(h=o&&(o.node.plotItem||o.node.polyPathItem),(v={}).rect={}),p=a.graphics.singleTracker=a.getFromEnv("animationManager").setAnimation({el:a.graphics.singleTracker||"rect",attr:n,component:a,label:"tracker",container:a.getContainer("tracker"),doNotRemove:!0}).toFront(),h)switch(h.node.style.cursor=d,p.node.style.cursor=d,t){case"fc-mouseover":a.conf.showHoverEffect?o.evtFns.hover[0](p):p.attr("fill",s.TRACKER_FILL),c&&(r?f.draw(u,c,r):r=a.config.currentToolTip=f.draw(u,c));break;case"fc-mouseout":h.node.style.cursor=g,p.node.style.cursor=d,p.attr({x:0,y:0,width:0,height:0,stroke:"#ffffff","stroke-width":"0px"}),p.toFront(),f.hide(r),o.evtFns.hover[1](p);break;case"fc-click":o&&o.evtFns&&o.evtFns.click&&o.evtFns.click[0](),a.config.kdTree={},a.addJob("click",a.kdTreePartioning.bind(a),l.priorityList.tracker);break;case"fc-mousemove":c&&(r?f.draw(u,c,r):r=a.config.currentToolTip=f.draw(u,c))}},i.draw=function(){var t,e,i,n,r,o,h,c=this,g=c.conf,f=c.getFromEnv("chart"),u=c.getFromEnv("chartConfig"),p=u.trackerConfig,v=u.canvasLeft,b=u.canvasTop,m=g.metaTreeInf,y=c.graphics.elemStore,x={},k=g._graphicPool||(g._graphicPool={}),C={},w=["fontFamily","fontSize","fontWeight","fontStyle"],I={cursor:d},P=g,T=this.getFromEnv("ref"),A=c.getFromEnv("animationManager"),_=T.containerManager,F=T.algorithmFactory,S={};for(p&&(p.length=0),c.createContainer(),o=s.parsexAxisStyles.apply(this,[{},{},c.getFromEnv("chart-attrib"),{fontFamily:"Verdana,sans",fontSize:"10px"}]),n=0,r=w.length;n<r;n++)(h=w[n])in o&&(I[h]=o[h]);_.remove(),t=c.getContainer("plots"),c.getContainer("datalabels").css(I),g.colorRange=c.getFromEnv("colorManager"),m.effectiveWidth=u.canvasRight-v,m.effectiveHeight=u.canvasBottom-b,m.startX=v,m.startY=b,C.x=m.effectiveWidth/2,C.y=m.effectiveHeight/2,C.x=m.effectiveWidth/2,C.y=m.effectiveHeight/2,x.drawPolyPath=function(e,i,n){var a;return S[n.id]&&delete S[n.id],(a=A.setAnimation({el:x.graphicPool(!1,"polyPathItem")||"path",container:t,attr:{path:e.path},css:i,state:f.getState("drill")?"updating":"appearing",label:"path",component:c}))&&y.polypath.push(a),a},x.drawRect=function(e,i,n,a,r){var o,l={},h={};for(o in S[r.id]&&delete S[r.id],e)e[o]<0&&(e[o]=0,h.visibility="hidden");return(0,s.extend2)(l,e),l.x=C.x,l.y=C.y,l.height=0,l.width=0,A.setAnimation({el:x.graphicPool(!1,"plotItem")||"rect",container:t,attr:e,css:Object.assign(i,h),state:f.getState("drill")?"updating":"appearing",props:r.__props,label:"rect",component:c}).toFront()},x.drawText=function(t,e,i,n,a,r){void 0===a&&(a={});var o,l,h,g,d,u={},p=t,v=i.textAttrs,b=i.highlightAttrs;return o=f.getState("drill")?"updating":"appearing",S[r.id]&&delete S[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,h=Object.assign({},v,a,{text:p,x:e.x,y:e.y,visibility:"visible"}),(l=A.setAnimation({el:x.graphicPool(!1,"labelItem")||x.graphicPool(!1,"pathlabelItem")||"text",container:c.getContainer("labelfloat"),component:c,attr:h,state:o,label:"labelItem"})).outlineText(c.conf.showTextOutline,h.fill),l.show(),d="hidden"!==b.visibility,delete b.visibility,g=A.setAnimation({el:x.graphicPool(!1,"highlightItem")||x.graphicPool(!1,"pathhighlightItem")||"text",container:c.getContainer("labelhighlight"),component:c,attr:Object.assign({},a,b,{x:e.x,y:e.y,text:d?p:"",visibility:"visible"}),css:{lineHeight:1.2*u.fontSize+"px"},state:o,label:"highlightItem"}),c.prevLabelGlowVisibility!==d&&!0===d&&g.show(),c.prevLabelGlowVisibility=d,y.label.push(undefined),y.highlight.push(undefined),{label:l,highlightMask:g}},x.disposeItems=function(t,e){var i,n,r,o=e||["plotItem","labelItem","hotItem","highlightItem","polyPathItem","pathlabelItem","pathhighlightItem","stackedpolyPathItem","stackedpathlabelItem","stackedpathhighlightItem"];for(i=0;i<o.length;i+=1)(n=t[r=o[i]])&&"text"===n.type&&n.attr({text:"","text-bound":[]}),n&&!n.removed&&(n=A.setAnimation({el:n,component:c})),t[r]=a},x.disposeChild=function(){var t,e=function(){return t.disposeItems},i=function(t,n){var a,r;for(e(t),a=0;a<(t.getChildren()||[]).length;a++)r=t.getChildren(),a=i(r[a],a);return n};return function(n){var a=n.getParent();t||(t=this,e=e()),a?t.disposeChild(a):i(n,0)}}(),x.disposeSelectedChildren=function(){var t,e=function(){return t.addRemovalNodes},i=function(t,n){var a,r;for(e(t),a=0;a<(t.getChildren()||[]).length;++a)r=t.getChildren(),a=i(r[a],a);return n};return function(n){var a=n.getParent();t||(t=this,e=e()),a?t.addRemovalNodes(a):i(n,0)}}(),x.addRemovalNodes=function(t){S[t.id]=t},x.hideNodes=function(){var t,e,i,n,r=["plotItem","labelItem","hotItem","highlightItem","polyPathItem","pathlabelItem","pathhighlightItem","stackedpolyPathItem","stackedpathlabelItem","stackedpathhighlightItem"];for(var o in S)for(i=S[o],t=0;t<r.length;t+=1)(e=i[n=r[t]])&&"text"===e.type&&e.attr({text:"","text-bound":[]}),e=e&&!e.removed&&A.setAnimation({el:e,component:c,label:"gen"}),i[n]=a},x.graphicPool=function(t,e,i){var n,a=k[e];if(a||(a=k[e]=[]),"hotItem"!==e&&"pathhotItem"!==e||i.remove(),t)a.push(i);else if(n=a.splice(0,1)[0])return n.show(),n},x.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()},x.removeLayers=function(){var t,e,i,n;for(e=(n=y.hot).length,t=0;t<e;t++)(i=n[t])&&i.remove();n.length=0},c.getState("dirty")&&(F.init(g.algorithm,!0,g.maxDepth),e=F.plotOnCanvas(c.config.JSONData,f._getCleanValue()),_.init(c,m,x,undefined,e)),_.draw(),i=F.applyShadeFiltering({fill:P.rangeOutBgColor,opacity:.01*P.rangeOutBgAlpha},function(t){this.plotItem&&this.plotItem.css(t)}),c.addExtEventListener("legendUpdate",function(t,e){i.call(this,{start:e.maxMinArray[0].min,end:e.maxMinArray[0].max}),g.range={min:e.maxMinArray[0].min,max:e.maxMinArray[0].max}},c.getFromEnv("colorManager")),g.isConfigured=!1,c.addJob("buildKDTreeID",c.kdTreePartioning.bind(c),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"]=b},1645:(t,e)=>{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}}}},1646:(t,e,i)=>{var n=i(272);e.__esModule=!0,e["default"]=void 0;var a,r=n(i(295)),o=i(281),l=i(293),s="drillup",h="hidden",c="ClickedState",g="VisibileRoot",d="hover",f="drilldown",u="stacked",p=1,v=function(t,e){var i,n,r,d,u,p,v,b,m,y=function(){function t(t,e,i){this.node=t,this.bucket=e?new C: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 l,s,h,c,g,d=["label","value","data","svalue"];if(a)for(g in l=new w((0,o.parseUnsafeString)(a.label),i(a.value),i(a.svalue)),0===(h=a.data||[]).length&&e&&e.addInBucket(l),l.setDepth(r),a)-1===d.indexOf(g)&&l.setMeta(g,a[g]);for(t&&(h=t(h)),s=0;s<h.length;s++)c=n(h[s],r+1),l.addChild(c);return l}(this.node,0)},e.getBucket=function(){return this.bucket},t.getMaxDepth=function(){return n},t}();function k(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,i=t,r=[],o=!1;return r.push(i),e=function(t){var e,i;if(!o){if(i=r.shift(),!n||i!==n||(i=r.shift()))return((e=t!==a&&i.getDepth()>=t?[]:i.getChildren())&&e.length||0)&&[].unshift.apply(r,e),0===r.length&&(o=!0),i;o=!0}},{next:e,reset:function(){o=!1,i=t,r.length=0,r.push(i)}}},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)}},u=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}}}(),v=[],b=!1,m={visibility:"visible",opacity:1},d={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,v.push(o);return p=e||t.getParent(),b=!1,v}},displayAll:function(t){var e,n;if(t){for(e=i(t.getParent()||t).df;n=e.next();)(n.overAttr||(n.overAttr={})).visibility="visible";p=a,v.length=0,b=!1}},controlPostAnimVisibility:function(){var t,e,r,o;if(!b&&(b=!0,p)){for(r=i(p).df;o=r.next(n);)o.dirtyNode&&((e=o.dirtyNode)&&e.plotItem.attr(m),(t=e&&e.textItem)&&t.label&&t.label.attr(m),t&&t.label&&t.highlightMask.attr(m));p=a,v.length=0}}},t.AbstractTreeMaker=y,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,b=!1,m={x:a,y:a,width:a,height:a},y={},k=0,C={};if(v=t.meta,t)return t.isLeaf(n)||(b=!0),y.label=t.getLabel(),m.width=e.width-2*l,m.x=e.x+e.width/2,p=e.height-2*s,!b&&p<r&&(m.height=-1),!f&&b?(m.height=d?m.height?m.height:e.height-2*s:-1,m.y=e.y+e.height/2):g?(m.y=-1,s=0,r=0,u=h):(m.height=m.height?m.height:r,m.y=e.y+s+c),k+=2*s,k+=r,y.rectShiftY=k,y.textRect=m,i.labelGlow?(C["stroke-width"]=i.labelGlowRadius,C.opacity=i.labelGlowIntensity,C.stroke=i.labelGlowColor,C.visibility="hidden"===u?"hidden":"visible"):C.visibility=h,{conf:y,attr:{fontSize:i.labelFontSize||i.baseFontSize,fontFamily:i.labelFont||i.baseFont,fill:(0,o.convertColor)(v&&v.fontcolor&&x(v.fontcolor)||i.labelFontColor||i.baseFontColor),fontWeight:i.labelFontBold&&"bold",fontStyle:i.labelFontItalic&&"italic",visibility:u},highlight:C}}},t.context=u,t.mapColorManager=function(t,e,i){var r=x(i?t.defaultNavigationBarBGColor:t.defaultParentBGColor);return function(i,o,l){var s,h,c,g={},d=i.cssConf,f=i.meta,u=f.fillcolor?x(f.fillcolor):a,p=i.getParent(),v=i.getColorValue();return t.isLegendEnabled=!0,t.isLegendEnabled&&(0===v||v)?e&&e.getColorByValue(v)?!function(t,e){var i=t.range;return!i||i.min<=e&&e<=i.max}(l,v)?i.presentColor=x(l.rangeOutBgColor):i.presentColor="#"+e.getColorByValue(v):i.presentColor=x(e&&e.rangeOutsideColor):i.presentColor=a,u&&(i.presentColor=u),c=t.isLegendEnabled&&(0===v||v)?e&&e.getColorByValue(v)&&"#"+e.getColorByValue(v)||x(e&&e.rangeOutsideColor):a,i.isLeaf(n)?g.fill=u||c||r:(s=(h=(p||i).cssConf)&&h.fill,c=c||s,g.fill=u||c),g.stroke=o?t.navigationBarBorderColor:t.plotBorderColor,g.strokeWidth=o?t.navigationBarBorderThickness:t.plotBorderThickness,g["stroke-dasharray"]="none",o||d&&"--"===d["stroke-dasharray"]&&(g["stroke-dasharray"]=d["stroke-dasharray"],g.strokeWidth=d.strokeWidth),g}},t.abstractEventRegisterer=function(i,n,r,o){var h,d,u,p=n.getFromEnv("chart"),v=n.getFromEnv("toolbarBtns"),b=n.conf,m=i.drawTree,y=o.disposeChild,x=t.context,C=arguments,w=c,I=g,P="dataplotrollover",T="dataplotrollout",A={colorValue:"svalue",label:"name",value:"value",rect:"metrics"};function _(t){var e,i={};for(e in A)i[A[e]]=t[e];return i.fillColor=t.meta.fillcolor||t.cssConf.fill,i.fontColor=t.meta.fontcolor||t.cssConf.stroke,i}return d=x.getInstance(w),p._intSR={},p._intSR.backToParent=h=function(e){var l=this,d=l,f=d&&l.getParent(),v=t.context,x=c,k=g,w=v.getInstance(x).get(k)||{};p.config.trackerConfig.length=0,p.triggerKDTreePartioning(),e?p.fireChartInstanceEvent("beforedrillup",{node:l,withoutHead:!b.showParent},a,function(){f&&(w.state=s,w.node=[{virginNode:t.getVisibleRoot()},f],y(d),m.apply(f,C)),p.fireChartInstanceEvent(s,{node:l,withoutHead:!b.showParent,drillUp:h,drillUpToTop:u}),l=l&&l.getParent()},function(){p.fireChartInstanceEvent("drillupcancelled",{node:l,withoutHead:!b.showParent})}):(f&&(w.state=s,w.node=[{virginNode:t.getVisibleRoot()},f],y(d),m.apply(f,[i,n,r,o])),l=l&&l.getParent())},p._intSR.resetTree=u=function(e){var i,n=this,r=n&&n.getParent(),o=t.context,l=c,d=g,f=o.getInstance(l).get(d)||{};for(p.config.trackerConfig.length=0,p.triggerKDTreePartioning();r;)i=r,r=r.getParent();e?p.fireChartInstanceEvent("beforedrillup",{node:n,withoutHead:!b.showParent},a,function(){i&&(f.state=s,f.node=[{virginNode:t.getVisibleRoot()},i],y(i),m.apply(i,C),p.fireChartInstanceEvent(s,{node:n,sender:p.fusionCharts,withoutHead:!b.showParent,drillUp:h,drillUpToTop:u}))},function(){p.fireChartInstanceEvent("drillupcancelled",{node:n,withoutHead:!b.showParent})}):i&&(f.state=s,f.node=[{virginNode:t.getVisibleRoot()},i],y(i),m.apply(i,C))},{click:function(t,i){var n,r,c,g=t.virginNode,m=p.getFromEnv("animationManager");if(p.state="click",p.fireChartInstanceEvent("dataplotclick",_(t.virginNode)),r=g.getParent()){if(g===i)c=r,p.flushKDTree(),n=s;else if(g.next)c=g,p.flushKDTree(),n=f;else{if(i===(c=r))return void(n=a);n=f}n&&p.fireChartInstanceEvent("before"+n,{node:c,withoutHead:!b.showParent},a,function(){p.config.trackerConfig.length=0,d.set(I,{node:t,state:n}),y.call(o,c),k(c),m.setAnimationState("drill"),p.setState("drill",!0),e.draw(),m.onAnimationComplete(function(){p.setState("drill",!1)}),p.fireChartInstanceEvent(n,{node:c,withoutHead:!b.showParent,drillUp:h,drillUpToTop:u})},function(){p.fireChartInstanceEvent(n+"cancelled",{node:c,withoutHead:!b.showParent})}),p.addJob("attachEventToBtns",function(){p._lastAttached.backToParent&&v.back&&v.back.removeEventListener("fc-click",p._lastAttached.backToParent),p._lastAttached.resetTree&&v.home&&v.home.removeEventListener("fc-click",p._lastAttached.resetTree),p._lastAttached.backToParent=h.bind(c),p._lastAttached.resetTree=u.bind(c),v.back&&v.back.addEventListener("fc-click",p._lastAttached.backToParent),v.home&&v.home.addEventListener("fc-click",p._lastAttached.resetTree)},l.priorityList.kdTree),p.resetSingleTracker()}},mouseover:function(t){var e=_(t.virginNode);p.fireChartInstanceEvent(P,e,a,a,function(){p.fireChartInstanceEvent(P+"cancelled",e)})},mouseout:function(t){var e=_(t.virginNode);p.fireChartInstanceEvent(T,_(t.virginNode),a,a,function(){p.fireChartInstanceEvent(T+"cancelled",e)})}}},t.setMaxDepth=function(t){return n=t},t.getVisibleRoot=function(){return r},t.setVisibleRoot=k,t.visibilityController=d,t},b=function(t,e){var i,n,h,f,u,p,v,b=t.AbstractTreeMaker;function y(t){for(var e,i=t.getChildren(),n=0,a=0;a<(i&&i.length);a++)y(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=t.effectiveArea*t.ratio,c=t.effectiveRect,g=i.rect;return t.lastIsParent?(l=c.x,s=c.y,n=c.height,r=c.width,o=this.isDirectionVertical=!i.isDirectionVertical):(n=c.height+c.y-(g.height+g.y),r=c.width+c.x-(g.width+g.x),o=this.isDirectionVertical=!arguments[2].isDirectionVertical),(o=e?o:!o)?(0===n&&(n=c.height,l=l!==a?l:g.x+g.width,s=s!==a?s:g.y),r=h/n,l=l!==a?l:g.x,s=s!==a?s:g.y+g.height):(0===r&&(r=c.width,l=l!==a?l:g.x,s=s!==a?s:g.y+g.height),n=h/r,l=l!==a?l:g.x+g.width,s=s!==a?s:g.y),{height:n,width:r,x:l,y:s}}},drawTree:function(e,i,n,r){var h,f,u,b,m,x,k,C,w=i.getFromEnv("chart"),I=w.config||(w.config={}),P=I.trackerConfig||(I.trackerConfig=[]),T=i.getFromEnv("number-formatter"),A=i.getFromEnv("toolbarBtns"),_=r.drawRect,F=r.drawText,S=r.drawHot,E=n.horizontalPadding,N=n.verticalPadding,B=i.getFromEnv("smartLabel"),M=(0,t.iterator)(this).df,R=e.areaBaseCalculator(E,N),V=i.conf,L=V.highlightParentsOnHover,H=t.context,D=t.visibilityController,O=i.conf.colorRange,z=t.mapColorManager(V,O),G=t.abstractEventRegisterer(e,i,n,r),W=G.click,j=G.mouseover,K=G.mouseout,U=V.slicingMode,Y=e["alternate"===U?"alternateModeManager":"horizontalVerticalManager"](U),J=w._intSR,X=c,$=g;for(C=(k=H.getInstance(X).get($)||{}).node,k.node&&k.state&&(k.state.toLowerCase()===s?C instanceof Array?D.controlPreAnimVisibility(C[0].virginNode,C[1]):D.controlPreAnimVisibility(C.virginNode):D.displayAll(k.node.virginNode)),h=V.parentLabelLineHeight,u=t.initConfigurationForlabel({x:5,y:5},h,V),b=f=M.next(v=t.setMaxDepth(this.getDepth()+p));b.getParent();)b=b.getParent();!I.valuesset&&y(b),I.valuesset=!0,V.showNavigationBar?(A.home.hide(),A.back.hide()):b!==f?(A.home.show(),A.back.show()):(A.home.hide(),A.back.hide()),B.useEllipsesOnOverflow(w.config.useEllipsesWhenOverflow),B.setStyle(V._setStyle={fontSize:(V.labelFontSize||V.baseFontSize)+"px",fontFamily:V.labelFont||V.baseFont,lineHeight:1.2*(V.labelFontSize||V.baseFontSize)+"px"}),x=J.backToParent,m=J.resetTree,w.addJob("attachEventToBtns",function(){w._lastAttached.backToParent&&A.back&&A.back.removeEventListener("fc-click",w._lastAttached.backToParent),w._lastAttached.resetTree&&A.home&&A.home.removeEventListener("fc-click",w._lastAttached.resetTree),w._lastAttached.backToParent=x.bind(f),w._lastAttached.resetTree=m.bind(f),A.back&&A.back.addEventListener("fc-click",w._lastAttached.backToParent),A.home&&A.home.addEventListener("fc-click",w._lastAttached.resetTree)},l.priorityList.kdTree),function q(t,e){var n,l,s,h,c,g,p,b,m,y,x,k,C,w,I,A,E={},N={},D={},O=d,G=o.BLANKSTRING;t&&!isNaN(t.value)&&"undefined"!=typeof t.value&&(I=T.yAxis(t.getValue()),A=T.sYAxis(t.getColorValue()),t.setPath(),l=t.rect||{},s=t.textRect||{},b=t.rect={},t.textRect={},b.width=e.width,b.height=e.height,b.x=e.x,b.y=e.y,w=z(t,a,i.conf),(C=t.plotItem)&&r.graphicPool(!0,"plotItem",C,l),t.__props||(t.__props={}),t.__props.curr=Object.assign({},b),t.__props.node=Object.assign({},t),C=t.plotItem=_(b,Object.assign({},w,(t.getColorValue()||0===t.getColorValue())&&{fill:t.presentColor}||{}),l,t.overAttr,t),t.__props.prev=Object.assign({},b),t.cssConf=w,x=(y=u(t,b)).conf,E.textMargin=x.rectShiftY,m=t.textRect=x.textRect,k=B.getSmartText(x.label,m.width,m.height).text,t.plotItem=C,(c=t.labelItem)?(g=t.highlightItem,r.graphicPool(!0,"labelItem",c,l),r.graphicPool(!0,"highlightItem",g,l)):s=s||{},p=F(k,m,{textAttrs:y.attr,highlightAttrs:y.highlight},s,t.overAttr,t),t.labelItem=p.label,t.highlightItem=p.highlightMask,N.virginNode=t,N.plotItem=C,N.textItem=p,N.virginNode.dirtyNode=N,t.getColorValue()&&(G=V.tooltipSeparationCharacter+A),V.showTooltip?N.toolText=(0,o.parseTooltext)(V.plotToolText,[1,2,3,119,122],{label:t.getLabel(),formattedValue:I,formattedsValue:A},{value:t.getValue(),svalue:t.getColorValue()})||t.getLabel()+V.tooltipSeparationCharacter+I+G:N.toolText=o.BLANKSTRING,N.rect=b,D.hover=[function(t){var e,i,n,a,r;n=H.getInstance(O),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}),j(this)}.bind(N),function(t){var e,i,n;i=(e=H.getInstance(O).get("element")||{}).cssConf&&e.cssConf.fill,n=(0,o.convertColor)(i||"#fff",0),t.attr({fill:n}),K(this)}.bind(N)],D.tooltip=[N.toolText],D.click=[function(){W(this,f)}.bind(N)],(h=t.hotItem)&&r.graphicPool(!0,"hotItem",h,l),P.push({node:t,key:"hotItem",plotDetails:N,evtFns:D,callback:S}),q(n=M.next(v),R(n,Y,E)))}(f,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,b,m=t,y=this._rTotalArea,x=this._hSegmented,k=this._rx,C=this._ry,w=0;for(this.nodes.push(m),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=(m=this.nodes[a]).getValue()/w*e,m.hRect=m.rect||{},m._hRect=m._rect||{},c=m.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),m.aspectRatio=v;if(this.nodes.length>1){if(this.prevAR<m.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={},b=this.nodes[a].rect,f.width=b.width,f.height=b.height,f.x=b.x,f.y=b.y;return!1}}else m&&(f=m._rect={},b=m.rect,f.width=b.width,f.height=b.height,f.x=b.x,f.y=b.y,m.firstPassed=!0);return this.prevAR=m.aspectRatio,this.height=n,this.width=i,this.getNextLogicalDivision=function(){return{height:u,width:p,x:g,y:d}},m},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,f,u,b,m,x,k,C,w=i.getFromEnv("chart"),I=i.getFromEnv("chartConfig"),P=I.trackerConfig||(I.trackerConfig=[]),T=i.getFromEnv("number-formatter"),A=i.getFromEnv("toolbarBtns"),_=n.horizontalPadding,F=n.verticalPadding,S=e.areaBaseCalculator(_,F),E=e.layoutManager.RowLayout,N=i.getFromEnv("smartLabel"),B=r.drawRect,M=r.drawText,R=r.drawHot,V=(0,t.iterator)(this).bf,L=i.conf,H=L.highlightParentsOnHover,D=t.context,O=i.conf.colorRange,z=t.mapColorManager(L,O),G=t.abstractEventRegisterer(e,i,n,r),W=G.click,j=G.mouseover,K=G.mouseout,U=w._intSR,Y=t.visibilityController,J=c,X=g;for(C=(k=D.getInstance(J).get(X)||{}).node,k.node&&k.state&&(k.state.toLowerCase()===s?C instanceof Array?Y.controlPreAnimVisibility(C[0].virginNode,C[1]):Y.controlPreAnimVisibility(C.virginNode):Y.displayAll(k.node.virginNode)),h=L.parentLabelLineHeight,u=t.initConfigurationForlabel({x:5,y:5},h,L),b=f=V.next(v=t.setMaxDepth(this.getDepth()+p));b.getParent();)b=b.getParent();!I.valuesset&&y(b),I.valuesset=!0,L.showNavigationBar?(A.home.hide(),A.back.hide()):b!==f?(A.home.show(),A.back.show()):(A.home.hide(),A.back.hide()),N.useEllipsesOnOverflow(w.config.useEllipsesWhenOverflow),N.setStyle(L._setStyle={fontSize:(L.labelFontSize||L.baseFontSize)+"px",fontFamily:L.labelFont||L.baseFont,lineHeight:1.2*(L.labelFontSize||L.baseFontSize)+"px"}),m=U.backToParent,x=U.resetTree,w.addJob("attachEventToBtns",function(){w._lastAttached.backToParent&&A.back&&A.back.removeEventListener("fc-click",w._lastAttached.backToParent),w._lastAttached.resetTree&&A.home&&A.home.removeEventListener("fc-click",w._lastAttached.resetTree),w._lastAttached.backToParent=m.bind(f),w._lastAttached.resetTree=x.bind(f),A.back&&A.back.addEventListener("fc-click",w._lastAttached.backToParent),A.home&&A.home.addEventListener("fc-click",w._lastAttached.resetTree)},l.priorityList.kdTree),function $(t,e){var n,l,s,h,c,g,p,b,m,y,x,k,C,w,I,A,_,F,V,O={},G=0,U={},Y={},J={},X=d,q=o.BLANKSTRING;if(t&&t.value&&(F=T.yAxis(t.getValue()),V=T.sYAxis(t.getColorValue()),t.setPath(),(n=t.__initRect)&&(O.x=n.x,O.y=n.y,O.width=n.width,O.height=n.height),c=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,_=z(t,a,i.conf),(C=t.plotItem)&&r.graphicPool(!0,"plotItem",C,O),t.__props||(t.__props={}),t.__props.curr=Object.assign({},n),t.__props.node=Object.assign({},t),C=t.plotItem=B(n,Object.assign({},_,(t.getColorValue()||0===t.getColorValue())&&{fill:t.presentColor}||{}),O,t.overAttr,t),t.__props.prev=Object.assign({},n),t.cssConf=_,w=(A=u(t,n)).conf,U.textMargin=w.rectShiftY,g=t.textRect=w.textRect,I=N.getSmartText(w.label,g.width,g.height).text,(h=t.labelItem)?(l=t.highlightItem,r.graphicPool(!0,"labelItem",h,O),r.graphicPool(!0,"highlightItem",l,O)):c=c||{},b=M(I,g,{textAttrs:A.attr,highlightAttrs:A.highlight},c,t.overAttr,t),t.labelItem=b.label,t.highlightItem=b.highlightMask,t.plotItem=C,Y.virginNode=t,Y.plotItem=C,Y.textItem=b,Y.virginNode.dirtyNode=Y,t.getColorValue()&&(q=L.tooltipSeparationCharacter+V),L.showTooltip?Y.toolText=(0,o.parseTooltext)(L.plotToolText,[1,2,3,119,122],{label:t.getLabel(),formattedValue:F,formattedsValue:V},{value:t.getValue(),svalue:t.getColorValue()})||t.getLabel()+L.tooltipSeparationCharacter+F+q:Y.toolText=o.BLANKSTRING,Y.rect=n,J.hover=[function(t){var e,i,n,a,r;n=D.getInstance(X),i=this.virginNode,e=H&&!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}),j(this)}.bind(Y),function(t){var e,i,n;i=(e=D.getInstance(X).get("element")||{}).cssConf&&e.cssConf.fill,n=(0,o.convertColor)(i||"#fff",0),t.attr({fill:n}),K(this)}.bind(Y)],J.tooltip=[Y.toolText],J.click=[function(){W(this,f)}.bind(Y)],(s=t.hotItem)&&r.graphicPool(!0,"hotItem",s,O),P.push({node:t,key:"hotItem",plotDetails:Y,evtFns:J,callback:R}),p=v!==a&&t.getDepth()>=v?a:t.getChildren()))for(x=S(p,function(t,e){var i,n,a,r,o=0,l=[];for(i=new E({width:t.effectiveRect.width,height:t.effectiveRect.height,x:t.effectiveRect.x,y:t.effectiveRect.y},e.getValue()),n=p.length;o++!==n;)a=p[o-1],!1===i.addNode(a)?(r=i.getNextLogicalDivision(),i=new E(r,e.getValue()-G),o--):(G+=parseFloat(a.getValue(),10),l.push(a));return l},U),m=0,y=x.length;m<y;m++)$(k=x[m],k.rect)}(f,n)}}};var x=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}(b);function k(e,i,n){var a;return a=(h=new x(e,u,i)).get(),!1!==n&&(f=a),t.setVisibleRoot(a),a}function C(){var a,r=i[n];e.realTimeUpdate=w.apply(this,arguments),(a=Array.prototype.slice.call(arguments,0)).unshift(r),r.drawTree.apply(t.getVisibleRoot(),a)}function w(){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();m(f,function(t){a.drawTree.apply(t||f,e)},t,n)[r].apply(this,i)}}return e.init=function(e,a,r){return n=e,u=a,p=t.setMaxDepth(r),i[n]},e.plotOnCanvas=function(t,e){return f=k(t,e),C},e.applyShadeFiltering=function(t,e){var a,r;return r=i[n].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&&(f=t)},e.realTimeUpdate=w,e.makeTree=k,e},m=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,l=o(t),s=a.iterator(l).df,h=l&&l.getParent(),c=l&&l.getSiblingCount("left"),g=h&&h.getChildren(),d=a.getVisibleRoot();if(l&&h){for(g.splice(c,1),l===d&&(d=l.getParent()||d);l;)i.disposeItems(l),l=s.next();for(;h;)h.setValue(-r,!0),h=h.getParent();n&&e(d)}},addData:function(t,i,r,l){for(var s,h,c,g,d=0,f=!0,u=undefined.getVisibleRoot();t.length;)if(s=t.pop(),d=(h=undefined.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)}}},y=function(t,e){var i,n,r,l,h,d,f,p,v=function(n,d){var f,p,v,b,y,k,C,w,P,T,A,_,F=l.colorRange,S=t.mapColorManager(l,F,!0),E={get:function(t,e,i){var n={y:t.startY,height:t.effectiveHeight},a=f[e],r=a.getParent();return _?(n._x=t.startX+t.effectiveWidth,n._width=0):(n._x=t.startX,n._width=t.effectiveWidth),n.x=_||(_=t.startX),_+=n.width=i?t.effectiveWidth*(a.getValue()/r.getValue()):t.effectiveWidth/p,n},resetAllocation:function(){_=a}},N=function(t,e){return 1===e?"both":0===t?"left":t<e-1?"no":"right"},B=l.parentLabelLineHeight,M=t.initConfigurationForlabel({x:5,y:5},B,l),R=h.drawPolyPath,V=h.drawText,L=h.drawHot,H={navigationHistory:{path:"polyPathItem",label:"pathlabelItem",highlightItem:"pathhighlightItem",hotItem:"pathhotItem"}},D=i.getFromEnv("chart"),O=D.config.trackerConfig,z=i.getFromEnv("smartLabel"),G=function(i){return function(){var n=t.context,a=c,r=g,o=D.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"),D.setState("drill",!0),e.draw([i,i,i]),o.onAnimationComplete(function(){D.setState("drill",!1)}),D.resetSingleTracker()}},W=function(){return function(){}},j=function(){return function(){}},K=function(t){return l.showTooltip?t.getLabel():o.BLANKSTRING},U=l._setStyle,Y=m.get().navigationBar,J=2*x("navigationBar"),X=Y*r.effectiveHeight,$=Math.min(X-(J+6),U.fontSize.replace(/\D+/g,"")),q=$+"px";for(H.stacked={path:u+H.navigationHistory.path,label:u+H.navigationHistory.label,highlightItem:u+H.navigationHistory.highlightItem,hotItem:u+H.navigationHistory.hotItem},E.resetAllocation(),function(e){var i=t.getVisibleRoot();(f=e?i.getChildren():l.navigationBarNodes=i.getPath()||[].concat(i)).pop(),p=f.length}(d),z.setStyle({fontSize:q,lineHeight:q}),v=0;v<p;v+=1)k=f[v],b=(y=I(C=E.get(n,v,d),d?"both":N(v,p),a)).offset,k[H[d?"stacked":"navigationHistory"].path]=R(y,S(k,!0,l),k),(A=(P=(w=M(k,C,!0)).conf).textRect).width-=2*b,A.y=C.y+C.height/2,T=V(z.getSmartText(P.label,A.width,Math.max($,A.height)).text,A,{textAttrs:w.attr,highlightAttrs:w.highlight},{y:C.height/10,"font-size":l._setStyle.fontSize,"font-family":l._setStyle.fontFamily},(d?"stacked":"")+"path",k),k[H[d?"stacked":"navigationHistory"].label]=T.label,k[H[d?"stacked":"navigationHistory"].highlightItem]=T.highlightMask,O.push({node:k,key:H[d?"stacked":"navigationHistory"].hotItem,plotDetails:{rect:C},evtFns:{click:[G(k)],hover:[W(),j()],tooltip:[K(k)]},callback:L})},b=function(t){return{treeMap:w,navigationBar:v,stackedNavigation:P}[t]},m=(f={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))<.05?i=.05:i>.4&&(i=.4),l.navigationBarHeightRatio=i,f=t?{treeMap:1-i,navigationBar:i,stackedNavigation:0}:{treeMap:1,navigationBar:0,stackedNavigation:0}},get:function(){return f}}),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=m.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){var i=this;(i.conf||(i.conf={})).name=t.name,i.setDrawingArea(t.drawingAreaMeasurement),i.draw=i.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;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),b("navigationBar").apply(this,t)}return p=[],d={get:function(){return p},set:function(t){var e;return t?((e=new C).init({name:t.type,drawingAreaMeasurement:t.drawingArea},t.drawFn),p.push(e)):p.length=0,p}},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],d.get().length>=e.length&&d.set();e.length;)t=e.shift(),d.set({type:t,drawFn:b(t),drawingArea:k(t)})},e.draw=function(i){var n,a,r,o=t.getVisibleRoot();for(h.disposeSelectedChildren(o,i?i[1]:o),i&&(o=i[1]),o.getParent()?l.showNavigationBar&&e.heightProportion.set(!0):e.heightProportion.set(!1),a=d.get(),n=0;n<a.length;n+=1)(r=a[n]).setDrawingArea(k(r.conf.name)),i&&t.setVisibleRoot(i[n]),r.draw();h.hideNodes()},e.heightProportion=m,e.remove=function(){var e=t.getVisibleRoot();e&&h.disposeChild(e)},e},x=function(t){return t?t.replace(/^#*/,"#"):"#"+k},k="E5E5E5",C=function(){function t(){this._b=[],this._css=a,this.rangeOurEffectApplyFn=o.stubFN,this.stat